);function ert(t){let e=\"[0-5]\\\\d\";t.precision?e=`${e}\\\\.\\\\d{${t.precision}}`:t.precision==null\u0026\u0026(e=`${e}(\\\\.\\\\d+)?`);const n=t.precision?\"+\":\"?\";return`([01]\\\\d|2[0-3]):[0-5]\\\\d(:${e})${n}`}function sBn(t){return new RegExp(`^${ert(t)} dist/standalone.min.js - muse/esp32-eink-display - tscircuit )}function aBn(t){let e=`${Zit}T${ert(t)}`;const n=[];return n.push(t.local?\"Z?\":\"Z\"),t.offset\u0026\u0026n.push(\"([+-]\\\\d{2}:?\\\\d{2})\"),e=`${e}(${n.join(\"|\")})`,new RegExp(`^${e} dist/standalone.min.js - muse/esp32-eink-display - tscircuit )}function ABn(t,e){return!!((e===\"v4\"||!e)\u0026\u0026Z4n.test(t)||(e===\"v6\"||!e)\u0026\u0026tBn.test(t))}function cBn(t,e){if(!j4n.test(t))return!1;try{const[n]=t.split(\".\");if(!n)return!1;const o=n.replace(/-/g,\"+\").replace(/_/g,\"/\").padEnd(n.length+(4-n.length%4)%4,\"=\"),i=JSON.parse(atob(o));return!(typeof i!=\"object\"||i===null||\"typ\"in i\u0026\u0026i?.typ!==\"JWT\"||!i.alg||e\u0026\u0026i.alg!==e)}catch{return!1}}function lBn(t,e){return!!((e===\"v4\"||!e)\u0026\u0026eBn.test(t)||(e===\"v6\"||!e)\u0026\u0026nBn.test(t))}class P9 extends Sc{_parse(e){if(this._def.coerce\u0026\u0026(e.data=String(e.data)),this._getType(e)!==Sr.string){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_type,expected:Sr.string,received:r.parsedType}),Zs}const o=new fy;let i;for(const r of this._def.checks)if(r.kind===\"min\")e.data.length\u003cr.value\u0026\u0026(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_small,minimum:r.value,type:\"string\",inclusive:!0,exact:!1,message:r.message}),o.dirty());else if(r.kind===\"max\")e.data.length\u003er.value\u0026\u0026(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_big,maximum:r.value,type:\"string\",inclusive:!0,exact:!1,message:r.message}),o.dirty());else if(r.kind===\"length\"){const s=e.data.length\u003er.value,a=e.data.length\u003cr.value;(s||a)\u0026\u0026(i=this._getOrReturnCtx(e,i),s?sr(i,{code:lo.too_big,maximum:r.value,type:\"string\",inclusive:!0,exact:!0,message:r.message}):a\u0026\u0026sr(i,{code:lo.too_small,minimum:r.value,type:\"string\",inclusive:!0,exact:!0,message:r.message}),o.dirty())}else if(r.kind===\"email\")q4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"email\",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind===\"emoji\")n2e||(n2e=new RegExp(X4n,\"u\")),n2e.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"emoji\",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind===\"uuid\")J4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"uuid\",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind===\"nanoid\")W4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"nanoid\",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind===\"cuid\")K4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"cuid\",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind===\"cuid2\")V4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"cuid2\",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind===\"ulid\")z4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"ulid\",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind===\"url\")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),sr(i,{validation:\"url\",code:lo.invalid_string,message:r.message}),o.dirty()}else r.kind===\"regex\"?(r.regex.lastIndex=0,r.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"regex\",code:lo.invalid_string,message:r.message}),o.dirty())):r.kind===\"trim\"?e.data=e.data.trim():r.kind===\"includes\"?e.data.includes(r.value,r.position)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),o.dirty()):r.kind===\"toLowerCase\"?e.data=e.data.toLowerCase():r.kind===\"toUpperCase\"?e.data=e.data.toUpperCase():r.kind===\"startsWith\"?e.data.startsWith(r.value)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:{startsWith:r.value},message:r.message}),o.dirty()):r.kind===\"endsWith\"?e.data.endsWith(r.value)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:{endsWith:r.value},message:r.message}),o.dirty()):r.kind===\"datetime\"?aBn(r).test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:\"datetime\",message:r.message}),o.dirty()):r.kind===\"date\"?rBn.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:\"date\",message:r.message}),o.dirty()):r.kind===\"time\"?sBn(r).test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:\"time\",message:r.message}),o.dirty()):r.kind===\"duration\"?$4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"duration\",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind===\"ip\"?ABn(e.data,r.version)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"ip\",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind===\"jwt\"?cBn(e.data,r.alg)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"jwt\",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind===\"cidr\"?lBn(e.data,r.version)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"cidr\",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind===\"base64\"?oBn.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"base64\",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind===\"base64url\"?iBn.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:\"base64url\",code:lo.invalid_string,message:r.message}),o.dirty()):Pl.assertNever(r);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(i=\u003ee.test(i),{validation:n,code:lo.invalid_string,...is.errToObj(o)})}_addCheck(e){return new P9({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:\"email\",...is.errToObj(e)})}url(e){return this._addCheck({kind:\"url\",...is.errToObj(e)})}emoji(e){return this._addCheck({kind:\"emoji\",...is.errToObj(e)})}uuid(e){return this._addCheck({kind:\"uuid\",...is.errToObj(e)})}nanoid(e){return this._addCheck({kind:\"nanoid\",...is.errToObj(e)})}cuid(e){return this._addCheck({kind:\"cuid\",...is.errToObj(e)})}cuid2(e){return this._addCheck({kind:\"cuid2\",...is.errToObj(e)})}ulid(e){return this._addCheck({kind:\"ulid\",...is.errToObj(e)})}base64(e){return this._addCheck({kind:\"base64\",...is.errToObj(e)})}base64url(e){return this._addCheck({kind:\"base64url\",...is.errToObj(e)})}jwt(e){return this._addCheck({kind:\"jwt\",...is.errToObj(e)})}ip(e){return this._addCheck({kind:\"ip\",...is.errToObj(e)})}cidr(e){return this._addCheck({kind:\"cidr\",...is.errToObj(e)})}datetime(e){return typeof e==\"string\"?this._addCheck({kind:\"datetime\",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:\"datetime\",precision:typeof e?.precision\u003e\"u\"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...is.errToObj(e?.message)})}date(e){return this._addCheck({kind:\"date\",message:e})}time(e){return typeof e==\"string\"?this._addCheck({kind:\"time\",precision:null,message:e}):this._addCheck({kind:\"time\",precision:typeof e?.precision\u003e\"u\"?null:e?.precision,...is.errToObj(e?.message)})}duration(e){return this._addCheck({kind:\"duration\",...is.errToObj(e)})}regex(e,n){return this._addCheck({kind:\"regex\",regex:e,...is.errToObj(n)})}includes(e,n){return this._addCheck({kind:\"includes\",value:e,position:n?.position,...is.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:\"startsWith\",value:e,...is.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:\"endsWith\",value:e,...is.errToObj(n)})}min(e,n){return this._addCheck({kind:\"min\",value:e,...is.errToObj(n)})}max(e,n){return this._addCheck({kind:\"max\",value:e,...is.errToObj(n)})}length(e,n){return this._addCheck({kind:\"length\",value:e,...is.errToObj(n)})}nonempty(e){return this.min(1,is.errToObj(e))}trim(){return new P9({...this._def,checks:[...this._def.checks,{kind:\"trim\"}]})}toLowerCase(){return new P9({...this._def,checks:[...this._def.checks,{kind:\"toLowerCase\"}]})}toUpperCase(){return new P9({...this._def,checks:[...this._def.checks,{kind:\"toUpperCase\"}]})}get isDatetime(){return!!this._def.checks.find(e=\u003ee.kind===\"datetime\")}get isDate(){return!!this._def.checks.find(e=\u003ee.kind===\"date\")}get isTime(){return!!this._def.checks.find(e=\u003ee.kind===\"time\")}get isDuration(){return!!this._def.checks.find(e=\u003ee.kind===\"duration\")}get isEmail(){return!!this._def.checks.find(e=\u003ee.kind===\"email\")}get isURL(){return!!this._def.checks.find(e=\u003ee.kind===\"url\")}get isEmoji(){return!!this._def.checks.find(e=\u003ee.kind===\"emoji\")}get isUUID(){return!!this._def.checks.find(e=\u003ee.kind===\"uuid\")}get isNANOID(){return!!this._def.checks.find(e=\u003ee.kind===\"nanoid\")}get isCUID(){return!!this._def.checks.find(e=\u003ee.kind===\"cuid\")}get isCUID2(){return!!this._def.checks.find(e=\u003ee.kind===\"cuid2\")}get isULID(){return!!this._def.checks.find(e=\u003ee.kind===\"ulid\")}get isIP(){return!!this._def.checks.find(e=\u003ee.kind===\"ip\")}get isCIDR(){return!!this._def.checks.find(e=\u003ee.kind===\"cidr\")}get isBase64(){return!!this._def.checks.find(e=\u003ee.kind===\"base64\")}get isBase64url(){return!!this._def.checks.find(e=\u003ee.kind===\"base64url\")}get minLength(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e}}P9.create=t=\u003enew P9({checks:[],typeName:Ba.ZodString,coerce:t?.coerce??!1,...BA(t)});function uBn(t,e){const n=(t.toString().split(\".\")[1]||\"\").length,o=(e.toString().split(\".\")[1]||\"\").length,i=n\u003eo?n:o,r=Number.parseInt(t.toFixed(i).replace(\".\",\"\")),s=Number.parseInt(e.toFixed(i).replace(\".\",\"\"));return r%s/10**i}class zM extends Sc{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce\u0026\u0026(e.data=Number(e.data)),this._getType(e)!==Sr.number){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_type,expected:Sr.number,received:r.parsedType}),Zs}let o;const i=new fy;for(const r of this._def.checks)r.kind===\"int\"?Pl.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.invalid_type,expected:\"integer\",received:\"float\",message:r.message}),i.dirty()):r.kind===\"min\"?(r.inclusive?e.data\u003cr.value:e.data\u003c=r.value)\u0026\u0026(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_small,minimum:r.value,type:\"number\",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind===\"max\"?(r.inclusive?e.data\u003er.value:e.data\u003e=r.value)\u0026\u0026(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_big,maximum:r.value,type:\"number\",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind===\"multipleOf\"?uBn(e.data,r.value)!==0\u0026\u0026(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):r.kind===\"finite\"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.not_finite,message:r.message}),i.dirty()):Pl.assertNever(r);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit(\"min\",e,!0,is.toString(n))}gt(e,n){return this.setLimit(\"min\",e,!1,is.toString(n))}lte(e,n){return this.setLimit(\"max\",e,!0,is.toString(n))}lt(e,n){return this.setLimit(\"max\",e,!1,is.toString(n))}setLimit(e,n,o,i){return new zM({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:is.toString(i)}]})}_addCheck(e){return new zM({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:\"int\",message:is.toString(e)})}positive(e){return this._addCheck({kind:\"min\",value:0,inclusive:!1,message:is.toString(e)})}negative(e){return this._addCheck({kind:\"max\",value:0,inclusive:!1,message:is.toString(e)})}nonpositive(e){return this._addCheck({kind:\"max\",value:0,inclusive:!0,message:is.toString(e)})}nonnegative(e){return this._addCheck({kind:\"min\",value:0,inclusive:!0,message:is.toString(e)})}multipleOf(e,n){return this._addCheck({kind:\"multipleOf\",value:e,message:is.toString(n)})}finite(e){return this._addCheck({kind:\"finite\",message:is.toString(e)})}safe(e){return this._addCheck({kind:\"min\",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:is.toString(e)})._addCheck({kind:\"max\",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:is.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=\u003ee.kind===\"int\"||e.kind===\"multipleOf\"\u0026\u0026Pl.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind===\"finite\"||o.kind===\"int\"||o.kind===\"multipleOf\")return!0;o.kind===\"min\"?(n===null||o.value\u003en)\u0026\u0026(n=o.value):o.kind===\"max\"\u0026\u0026(e===null||o.value\u003ce)\u0026\u0026(e=o.value)}return Number.isFinite(n)\u0026\u0026Number.isFinite(e)}}zM.create=t=\u003enew zM({checks:[],typeName:Ba.ZodNumber,coerce:t?.coerce||!1,...BA(t)});class JM extends Sc{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Sr.bigint)return this._getInvalidInput(e);let o;const i=new fy;for(const r of this._def.checks)r.kind===\"min\"?(r.inclusive?e.data\u003cr.value:e.data\u003c=r.value)\u0026\u0026(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_small,type:\"bigint\",minimum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind===\"max\"?(r.inclusive?e.data\u003er.value:e.data\u003e=r.value)\u0026\u0026(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_big,type:\"bigint\",maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind===\"multipleOf\"?e.data%r.value!==BigInt(0)\u0026\u0026(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):Pl.assertNever(r);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return sr(n,{code:lo.invalid_type,expected:Sr.bigint,received:n.parsedType}),Zs}gte(e,n){return this.setLimit(\"min\",e,!0,is.toString(n))}gt(e,n){return this.setLimit(\"min\",e,!1,is.toString(n))}lte(e,n){return this.setLimit(\"max\",e,!0,is.toString(n))}lt(e,n){return this.setLimit(\"max\",e,!1,is.toString(n))}setLimit(e,n,o,i){return new JM({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:is.toString(i)}]})}_addCheck(e){return new JM({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!1,message:is.toString(e)})}negative(e){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!1,message:is.toString(e)})}nonpositive(e){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!0,message:is.toString(e)})}nonnegative(e){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!0,message:is.toString(e)})}multipleOf(e,n){return this._addCheck({kind:\"multipleOf\",value:e,message:is.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e}}JM.create=t=\u003enew JM({checks:[],typeName:Ba.ZodBigInt,coerce:t?.coerce??!1,...BA(t)});class lne extends Sc{_parse(e){if(this._def.coerce\u0026\u0026(e.data=!!e.data),this._getType(e)!==Sr.boolean){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.boolean,received:o.parsedType}),Zs}return Ax(e.data)}}lne.create=t=\u003enew lne({typeName:Ba.ZodBoolean,coerce:t?.coerce||!1,...BA(t)});class Ok extends Sc{_parse(e){if(this._def.coerce\u0026\u0026(e.data=new Date(e.data)),this._getType(e)!==Sr.date){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_type,expected:Sr.date,received:r.parsedType}),Zs}if(Number.isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_date}),Zs}const o=new fy;let i;for(const r of this._def.checks)r.kind===\"min\"?e.data.getTime()\u003cr.value\u0026\u0026(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:\"date\"}),o.dirty()):r.kind===\"max\"?e.data.getTime()\u003er.value\u0026\u0026(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:\"date\"}),o.dirty()):Pl.assertNever(r);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ok({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:\"min\",value:e.getTime(),message:is.toString(n)})}max(e,n){return this._addCheck({kind:\"max\",value:e.getTime(),message:is.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e!=null?new Date(e):null}}Ok.create=t=\u003enew Ok({checks:[],coerce:t?.coerce||!1,typeName:Ba.ZodDate,...BA(t)});class trt extends Sc{_parse(e){if(this._getType(e)!==Sr.symbol){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.symbol,received:o.parsedType}),Zs}return Ax(e.data)}}trt.create=t=\u003enew trt({typeName:Ba.ZodSymbol,...BA(t)});class o2e extends Sc{_parse(e){if(this._getType(e)!==Sr.undefined){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.undefined,received:o.parsedType}),Zs}return Ax(e.data)}}o2e.create=t=\u003enew o2e({typeName:Ba.ZodUndefined,...BA(t)});class une extends Sc{_parse(e){if(this._getType(e)!==Sr.null){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.null,received:o.parsedType}),Zs}return Ax(e.data)}}une.create=t=\u003enew une({typeName:Ba.ZodNull,...BA(t)});class AV extends Sc{constructor(){super(...arguments),this._any=!0}_parse(e){return Ax(e.data)}}AV.create=t=\u003enew AV({typeName:Ba.ZodAny,...BA(t)});class Gk extends Sc{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ax(e.data)}}Gk.create=t=\u003enew Gk({typeName:Ba.ZodUnknown,...BA(t)});class mQ extends Sc{_parse(e){const n=this._getOrReturnCtx(e);return sr(n,{code:lo.invalid_type,expected:Sr.never,received:n.parsedType}),Zs}}mQ.create=t=\u003enew mQ({typeName:Ba.ZodNever,...BA(t)});class nrt extends Sc{_parse(e){if(this._getType(e)!==Sr.undefined){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.void,received:o.parsedType}),Zs}return Ax(e.data)}}nrt.create=t=\u003enew nrt({typeName:Ba.ZodVoid,...BA(t)});class M9 extends Sc{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==Sr.array)return sr(n,{code:lo.invalid_type,expected:Sr.array,received:n.parsedType}),Zs;if(i.exactLength!==null){const s=n.data.length\u003ei.exactLength.value,a=n.data.length\u003ci.exactLength.value;(s||a)\u0026\u0026(sr(n,{code:s?lo.too_big:lo.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:\"array\",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null\u0026\u0026n.data.length\u003ci.minLength.value\u0026\u0026(sr(n,{code:lo.too_small,minimum:i.minLength.value,type:\"array\",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null\u0026\u0026n.data.length\u003ei.maxLength.value\u0026\u0026(sr(n,{code:lo.too_big,maximum:i.maxLength.value,type:\"array\",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=\u003ei.type._parseAsync(new w9(n,s,n.path,a)))).then(s=\u003efy.mergeArray(o,s));const r=[...n.data].map((s,a)=\u003ei.type._parseSync(new w9(n,s,n.path,a)));return fy.mergeArray(o,r)}get element(){return this._def.type}min(e,n){return new M9({...this._def,minLength:{value:e,message:is.toString(n)}})}max(e,n){return new M9({...this._def,maxLength:{value:e,message:is.toString(n)}})}length(e,n){return new M9({...this._def,exactLength:{value:e,message:is.toString(n)}})}nonempty(e){return this.min(1,e)}}M9.create=(t,e)=\u003enew M9({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ba.ZodArray,...BA(e)});function Yk(t){if(t instanceof Um){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=b8.create(Yk(o))}return new Um({...t._def,shape:()=\u003ee})}else return t instanceof M9?new M9({...t._def,type:Yk(t.element)}):t instanceof b8?b8.create(Yk(t.unwrap())):t instanceof jM?jM.create(Yk(t.unwrap())):t instanceof B8?B8.create(t.items.map(e=\u003eYk(e))):t}class Um extends Sc{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Pl.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Sr.object){const c=this._getOrReturnCtx(e);return sr(c,{code:lo.invalid_type,expected:Sr.object,received:c.parsedType}),Zs}const{status:o,ctx:i}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof mQ\u0026\u0026this._def.unknownKeys===\"strip\"))for(const c in i.data)s.includes(c)||a.push(c);const A=[];for(const c of s){const l=r[c],u=i.data[c];A.push({key:{status:\"valid\",value:c},value:l._parse(new w9(i,u,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof mQ){const c=this._def.unknownKeys;if(c===\"passthrough\")for(const l of a)A.push({key:{status:\"valid\",value:l},value:{status:\"valid\",value:i.data[l]}});else if(c===\"strict\")a.length\u003e0\u0026\u0026(sr(i,{code:lo.unrecognized_keys,keys:a}),o.dirty());else if(c!==\"strip\")throw new Error(\"Internal ZodObject error: invalid unknownKeys value.\")}else{const c=this._def.catchall;for(const l of a){const u=i.data[l];A.push({key:{status:\"valid\",value:l},value:c._parse(new w9(i,u,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=\u003e{const c=[];for(const l of A){const u=await l.key,g=await l.value;c.push({key:u,value:g,alwaysSet:l.alwaysSet})}return c}).then(c=\u003efy.mergeObjectSync(o,c)):fy.mergeObjectSync(o,A)}get shape(){return this._def.shape()}strict(e){return is.errToObj,new Um({...this._def,unknownKeys:\"strict\",...e!==void 0?{errorMap:(n,o)=\u003e{const i=this._def.errorMap?.(n,o).message??o.defaultError;return n.code===\"unrecognized_keys\"?{message:is.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Um({...this._def,unknownKeys:\"strip\"})}passthrough(){return new Um({...this._def,unknownKeys:\"passthrough\"})}extend(e){return new Um({...this._def,shape:()=\u003e({...this._def.shape(),...e})})}merge(e){return new Um({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=\u003e({...this._def.shape(),...e._def.shape()}),typeName:Ba.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Um({...this._def,catchall:e})}pick(e){const n={};for(const o of Pl.objectKeys(e))e[o]\u0026\u0026this.shape[o]\u0026\u0026(n[o]=this.shape[o]);return new Um({...this._def,shape:()=\u003en})}omit(e){const n={};for(const o of Pl.objectKeys(this.shape))e[o]||(n[o]=this.shape[o]);return new Um({...this._def,shape:()=\u003en})}deepPartial(){return Yk(this)}partial(e){const n={};for(const o of Pl.objectKeys(this.shape)){const i=this.shape[o];e\u0026\u0026!e[o]?n[o]=i:n[o]=i.optional()}return new Um({...this._def,shape:()=\u003en})}required(e){const n={};for(const o of Pl.objectKeys(this.shape))if(e\u0026\u0026!e[o])n[o]=this.shape[o];else{let r=this.shape[o];for(;r instanceof b8;)r=r._def.innerType;n[o]=r}return new Um({...this._def,shape:()=\u003en})}keyof(){return irt(Pl.objectKeys(this.shape))}}Um.create=(t,e)=\u003enew Um({shape:()=\u003et,unknownKeys:\"strip\",catchall:mQ.create(),typeName:Ba.ZodObject,...BA(e)}),Um.strictCreate=(t,e)=\u003enew Um({shape:()=\u003et,unknownKeys:\"strict\",catchall:mQ.create(),typeName:Ba.ZodObject,...BA(e)}),Um.lazycreate=(t,e)=\u003enew Um({shape:t,unknownKeys:\"strip\",catchall:mQ.create(),typeName:Ba.ZodObject,...BA(e)});class gne extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(r){for(const a of r)if(a.result.status===\"valid\")return a.result;for(const a of r)if(a.result.status===\"dirty\")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=r.map(a=\u003enew b5(a.ctx.common.issues));return sr(n,{code:lo.invalid_union,unionErrors:s}),Zs}if(n.common.async)return Promise.all(o.map(async r=\u003e{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await r._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let r;const s=[];for(const A of o){const c={...n,common:{...n.common,issues:[]},parent:null},l=A._parseSync({data:n.data,path:n.path,parent:c});if(l.status===\"valid\")return l;l.status===\"dirty\"\u0026\u0026!r\u0026\u0026(r={result:l,ctx:c}),c.common.issues.length\u0026\u0026s.push(c.common.issues)}if(r)return n.common.issues.push(...r.ctx.common.issues),r.result;const a=s.map(A=\u003enew b5(A));return sr(n,{code:lo.invalid_union,unionErrors:a}),Zs}}get options(){return this._def.options}}gne.create=(t,e)=\u003enew gne({options:t,typeName:Ba.ZodUnion,...BA(e)});const E8=t=\u003et instanceof s2e?E8(t.schema):t instanceof _Q?E8(t.innerType()):t instanceof pne?[t.value]:t instanceof WM?t.options:t instanceof a2e?Pl.objectValues(t.enum):t instanceof mne?E8(t._def.innerType):t instanceof o2e?[void 0]:t instanceof une?[null]:t instanceof b8?[void 0,...E8(t.unwrap())]:t instanceof jM?[null,...E8(t.unwrap())]:t instanceof srt||t instanceof fne?E8(t.unwrap()):t instanceof _ne?E8(t._def.innerType):[];class i2e extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Sr.object)return sr(n,{code:lo.invalid_type,expected:Sr.object,received:n.parsedType}),Zs;const o=this.discriminator,i=n.data[o],r=this.optionsMap.get(i);return r?n.common.async?r._parseAsync({data:n.data,path:n.path,parent:n}):r._parseSync({data:n.data,path:n.path,parent:n}):(sr(n,{code:lo.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Zs)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const r of n){const s=E8(r.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \\`${e}\\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,r)}}return new i2e({typeName:Ba.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...BA(o)})}}function r2e(t,e){const n=pQ(t),o=pQ(e);if(t===e)return{valid:!0,data:t};if(n===Sr.object\u0026\u0026o===Sr.object){const i=Pl.objectKeys(e),r=Pl.objectKeys(t).filter(a=\u003ei.indexOf(a)!==-1),s={...t,...e};for(const a of r){const A=r2e(t[a],e[a]);if(!A.valid)return{valid:!1};s[a]=A.data}return{valid:!0,data:s}}else if(n===Sr.array\u0026\u0026o===Sr.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let r=0;r\u003ct.length;r++){const s=t[r],a=e[r],A=r2e(s,a);if(!A.valid)return{valid:!1};i.push(A.data)}return{valid:!0,data:i}}else return n===Sr.date\u0026\u0026o===Sr.date\u0026\u0026+t==+e?{valid:!0,data:t}:{valid:!1}}class dne extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(r,s)=\u003e{if($it(r)||$it(s))return Zs;const a=r2e(r.value,s.value);return a.valid?((qit(r)||qit(s))\u0026\u0026n.dirty(),{status:n.value,value:a.data}):(sr(o,{code:lo.invalid_intersection_types}),Zs)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([r,s])=\u003ei(r,s)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}dne.create=(t,e,n)=\u003enew dne({left:t,right:e,typeName:Ba.ZodIntersection,...BA(n)});class B8 extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.array)return sr(o,{code:lo.invalid_type,expected:Sr.array,received:o.parsedType}),Zs;if(o.data.length\u003cthis._def.items.length)return sr(o,{code:lo.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),Zs;!this._def.rest\u0026\u0026o.data.length\u003ethis._def.items.length\u0026\u0026(sr(o,{code:lo.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),n.dirty());const r=[...o.data].map((s,a)=\u003e{const A=this._def.items[a]||this._def.rest;return A?A._parse(new w9(o,s,o.path,a)):null}).filter(s=\u003e!!s);return o.common.async?Promise.all(r).then(s=\u003efy.mergeArray(n,s)):fy.mergeArray(n,r)}get items(){return this._def.items}rest(e){return new B8({...this._def,rest:e})}}B8.create=(t,e)=\u003e{if(!Array.isArray(t))throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");return new B8({items:t,typeName:Ba.ZodTuple,rest:null,...BA(e)})};class hne extends Sc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.object)return sr(o,{code:lo.invalid_type,expected:Sr.object,received:o.parsedType}),Zs;const i=[],r=this._def.keyType,s=this._def.valueType;for(const a in o.data)i.push({key:r._parse(new w9(o,a,o.path,a)),value:s._parse(new w9(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?fy.mergeObjectAsync(n,i):fy.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Sc?new hne({keyType:e,valueType:n,typeName:Ba.ZodRecord,...BA(o)}):new hne({keyType:P9.create(),valueType:e,typeName:Ba.ZodRecord,...BA(n)})}}class ort extends Sc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.map)return sr(o,{code:lo.invalid_type,expected:Sr.map,received:o.parsedType}),Zs;const i=this._def.keyType,r=this._def.valueType,s=[...o.data.entries()].map(([a,A],c)=\u003e({key:i._parse(new w9(o,a,o.path,[c,\"key\"])),value:r._parse(new w9(o,A,o.path,[c,\"value\"]))}));if(o.common.async){const a=new Map;return Promise.resolve().then(async()=\u003e{for(const A of s){const c=await A.key,l=await A.value;if(c.status===\"aborted\"||l.status===\"aborted\")return Zs;(c.status===\"dirty\"||l.status===\"dirty\")\u0026\u0026n.dirty(),a.set(c.value,l.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const A of s){const c=A.key,l=A.value;if(c.status===\"aborted\"||l.status===\"aborted\")return Zs;(c.status===\"dirty\"||l.status===\"dirty\")\u0026\u0026n.dirty(),a.set(c.value,l.value)}return{status:n.value,value:a}}}}ort.create=(t,e,n)=\u003enew ort({valueType:e,keyType:t,typeName:Ba.ZodMap,...BA(n)});class cV extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.set)return sr(o,{code:lo.invalid_type,expected:Sr.set,received:o.parsedType}),Zs;const i=this._def;i.minSize!==null\u0026\u0026o.data.size\u003ci.minSize.value\u0026\u0026(sr(o,{code:lo.too_small,minimum:i.minSize.value,type:\"set\",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null\u0026\u0026o.data.size\u003ei.maxSize.value\u0026\u0026(sr(o,{code:lo.too_big,maximum:i.maxSize.value,type:\"set\",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const r=this._def.valueType;function s(A){const c=new Set;for(const l of A){if(l.status===\"aborted\")return Zs;l.status===\"dirty\"\u0026\u0026n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const a=[...o.data.values()].map((A,c)=\u003er._parse(new w9(o,A,o.path,c)));return o.common.async?Promise.all(a).then(A=\u003es(A)):s(a)}min(e,n){return new cV({...this._def,minSize:{value:e,message:is.toString(n)}})}max(e,n){return new cV({...this._def,maxSize:{value:e,message:is.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}cV.create=(t,e)=\u003enew cV({valueType:t,minSize:null,maxSize:null,typeName:Ba.ZodSet,...BA(e)});class lV extends Sc{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Sr.function)return sr(n,{code:lo.invalid_type,expected:Sr.function,received:n.parsedType}),Zs;function o(a,A){return t2e({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,e2e(),sV].filter(c=\u003e!!c),issueData:{code:lo.invalid_arguments,argumentsError:A}})}function i(a,A){return t2e({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,e2e(),sV].filter(c=\u003e!!c),issueData:{code:lo.invalid_return_type,returnTypeError:A}})}const r={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof uV){const a=this;return Ax(async function(...A){const c=new b5([]),l=await a._def.args.parseAsync(A,r).catch(h=\u003e{throw c.addIssue(o(A,h)),c}),u=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(u,r).catch(h=\u003e{throw c.addIssue(i(u,h)),c})})}else{const a=this;return Ax(function(...A){const c=a._def.args.safeParse(A,r);if(!c.success)throw new b5([o(A,c.error)]);const l=Reflect.apply(s,this,c.data),u=a._def.returns.safeParse(l,r);if(!u.success)throw new b5([i(l,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new lV({...this._def,args:B8.create(e).rest(Gk.create())})}returns(e){return new lV({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new lV({args:e||B8.create([]).rest(Gk.create()),returns:n||Gk.create(),typeName:Ba.ZodFunction,...BA(o)})}}class s2e extends Sc{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}s2e.create=(t,e)=\u003enew s2e({getter:t,typeName:Ba.ZodLazy,...BA(e)});class pne extends Sc{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return sr(n,{received:n.data,code:lo.invalid_literal,expected:this._def.value}),Zs}return{status:\"valid\",value:e.data}}get value(){return this._def.value}}pne.create=(t,e)=\u003enew pne({value:t,typeName:Ba.ZodLiteral,...BA(e)});function irt(t,e){return new WM({values:t,typeName:Ba.ZodEnum,...BA(e)})}class WM extends Sc{_parse(e){if(typeof e.data!=\"string\"){const n=this._getOrReturnCtx(e),o=this._def.values;return sr(n,{expected:Pl.joinValues(o),received:n.parsedType,code:lo.invalid_type}),Zs}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return sr(n,{received:n.data,code:lo.invalid_enum_value,options:o}),Zs}return Ax(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return WM.create(e,{...this._def,...n})}exclude(e,n=this._def){return WM.create(this.options.filter(o=\u003e!e.includes(o)),{...this._def,...n})}}WM.create=irt;class a2e extends Sc{_parse(e){const n=Pl.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==Sr.string\u0026\u0026o.parsedType!==Sr.number){const i=Pl.objectValues(n);return sr(o,{expected:Pl.joinValues(i),received:o.parsedType,code:lo.invalid_type}),Zs}if(this._cache||(this._cache=new Set(Pl.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=Pl.objectValues(n);return sr(o,{received:o.data,code:lo.invalid_enum_value,options:i}),Zs}return Ax(e.data)}get enum(){return this._def.values}}a2e.create=(t,e)=\u003enew a2e({values:t,typeName:Ba.ZodNativeEnum,...BA(e)});class uV extends Sc{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Sr.promise\u0026\u0026n.common.async===!1)return sr(n,{code:lo.invalid_type,expected:Sr.promise,received:n.parsedType}),Zs;const o=n.parsedType===Sr.promise?n.data:Promise.resolve(n.data);return Ax(o.then(i=\u003ethis._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}uV.create=(t,e)=\u003enew uV({type:t,typeName:Ba.ZodPromise,...BA(e)});class _Q extends Sc{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ba.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:s=\u003e{sr(o,s),s.fatal?n.abort():n.dirty()},get path(){return o.path}};if(r.addIssue=r.addIssue.bind(r),i.type===\"preprocess\"){const s=i.transform(o.data,r);if(o.common.async)return Promise.resolve(s).then(async a=\u003e{if(n.value===\"aborted\")return Zs;const A=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return A.status===\"aborted\"?Zs:A.status===\"dirty\"||n.value===\"dirty\"?aV(A.value):A});{if(n.value===\"aborted\")return Zs;const a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status===\"aborted\"?Zs:a.status===\"dirty\"||n.value===\"dirty\"?aV(a.value):a}}if(i.type===\"refinement\"){const s=a=\u003e{const A=i.refinement(a,r);if(o.common.async)return Promise.resolve(A);if(A instanceof Promise)throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");return a};if(o.common.async===!1){const a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status===\"aborted\"?Zs:(a.status===\"dirty\"\u0026\u0026n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=\u003ea.status===\"aborted\"?Zs:(a.status===\"dirty\"\u0026\u0026n.dirty(),s(a.value).then(()=\u003e({status:n.value,value:a.value}))))}if(i.type===\"transform\")if(o.common.async===!1){const s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Hk(s))return Zs;const a=i.transform(s.value,r);if(a instanceof Promise)throw new Error(\"Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.\");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=\u003eHk(s)?Promise.resolve(i.transform(s.value,r)).then(a=\u003e({status:n.value,value:a})):Zs);Pl.assertNever(i)}}_Q.create=(t,e,n)=\u003enew _Q({schema:t,typeName:Ba.ZodEffects,effect:e,...BA(n)}),_Q.createWithPreprocess=(t,e,n)=\u003enew _Q({schema:e,effect:{type:\"preprocess\",transform:t},typeName:Ba.ZodEffects,...BA(n)});class b8 extends Sc{_parse(e){return this._getType(e)===Sr.undefined?Ax(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}b8.create=(t,e)=\u003enew b8({innerType:t,typeName:Ba.ZodOptional,...BA(e)});class jM extends Sc{_parse(e){return this._getType(e)===Sr.null?Ax(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}jM.create=(t,e)=\u003enew jM({innerType:t,typeName:Ba.ZodNullable,...BA(e)});class mne extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===Sr.undefined\u0026\u0026(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}mne.create=(t,e)=\u003enew mne({innerType:t,typeName:Ba.ZodDefault,defaultValue:typeof e.default==\"function\"?e.default:()=\u003ee.default,...BA(e)});class _ne extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return cne(i)?i.then(r=\u003e({status:\"valid\",value:r.status===\"valid\"?r.value:this._def.catchValue({get error(){return new b5(o.common.issues)},input:o.data})})):{status:\"valid\",value:i.status===\"valid\"?i.value:this._def.catchValue({get error(){return new b5(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}_ne.create=(t,e)=\u003enew _ne({innerType:t,typeName:Ba.ZodCatch,catchValue:typeof e.catch==\"function\"?e.catch:()=\u003ee.catch,...BA(e)});class rrt extends Sc{_parse(e){if(this._getType(e)!==Sr.nan){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.nan,received:o.parsedType}),Zs}return{status:\"valid\",value:e.data}}}rrt.create=t=\u003enew rrt({typeName:Ba.ZodNaN,...BA(t)});class srt extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class A2e extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=\u003e{const r=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return r.status===\"aborted\"?Zs:r.status===\"dirty\"?(n.dirty(),aV(r.value)):this._def.out._parseAsync({data:r.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status===\"aborted\"?Zs:i.status===\"dirty\"?(n.dirty(),{status:\"dirty\",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new A2e({in:e,out:n,typeName:Ba.ZodPipeline})}}class fne extends Sc{_parse(e){const n=this._def.innerType._parse(e),o=i=\u003e(Hk(i)\u0026\u0026(i.value=Object.freeze(i.value)),i);return cne(n)?n.then(i=\u003eo(i)):o(n)}unwrap(){return this._def.innerType}}fne.create=(t,e)=\u003enew fne({innerType:t,typeName:Ba.ZodReadonly,...BA(e)});function art(t,e){const n=typeof t==\"function\"?t(e):typeof t==\"string\"?{message:t}:t;return typeof n==\"string\"?{message:n}:n}function P0(t,e={},n){return t?AV.create().superRefine((o,i)=\u003e{const r=t(o);if(r instanceof Promise)return r.then(s=\u003e{if(!s){const a=art(e,o),A=a.fatal??n??!0;i.addIssue({code:\"custom\",...a,fatal:A})}});if(!r){const s=art(e,o),a=s.fatal??n??!0;i.addIssue({code:\"custom\",...s,fatal:a})}}):AV.create()}var Ba;(function(t){t.ZodString=\"ZodString\",t.ZodNumber=\"ZodNumber\",t.ZodNaN=\"ZodNaN\",t.ZodBigInt=\"ZodBigInt\",t.ZodBoolean=\"ZodBoolean\",t.ZodDate=\"ZodDate\",t.ZodSymbol=\"ZodSymbol\",t.ZodUndefined=\"ZodUndefined\",t.ZodNull=\"ZodNull\",t.ZodAny=\"ZodAny\",t.ZodUnknown=\"ZodUnknown\",t.ZodNever=\"ZodNever\",t.ZodVoid=\"ZodVoid\",t.ZodArray=\"ZodArray\",t.ZodObject=\"ZodObject\",t.ZodUnion=\"ZodUnion\",t.ZodDiscriminatedUnion=\"ZodDiscriminatedUnion\",t.ZodIntersection=\"ZodIntersection\",t.ZodTuple=\"ZodTuple\",t.ZodRecord=\"ZodRecord\",t.ZodMap=\"ZodMap\",t.ZodSet=\"ZodSet\",t.ZodFunction=\"ZodFunction\",t.ZodLazy=\"ZodLazy\",t.ZodLiteral=\"ZodLiteral\",t.ZodEnum=\"ZodEnum\",t.ZodEffects=\"ZodEffects\",t.ZodNativeEnum=\"ZodNativeEnum\",t.ZodOptional=\"ZodOptional\",t.ZodNullable=\"ZodNullable\",t.ZodDefault=\"ZodDefault\",t.ZodCatch=\"ZodCatch\",t.ZodPromise=\"ZodPromise\",t.ZodBranded=\"ZodBranded\",t.ZodPipeline=\"ZodPipeline\",t.ZodReadonly=\"ZodReadonly\"})(Ba||(Ba={}));const Z=P9.create,_t=zM.create;JM.create;const je=lne.create;Ok.create;const Art=une.create,rd=AV.create,c2e=Gk.create;mQ.create;const dn=M9.create,Pt=Um.create,xo=gne.create,Iy=i2e.create;dne.create;const fQ=B8.create,Qc=hne.create,IQ=lV.create,$e=pne.create,Kn=WM.create,CQ=uV.create;b8.create,jM.create;const crt=_Q.createWithPreprocess,S5={string:(t=\u003eP9.create({...t,coerce:!0})),number:(t=\u003ezM.create({...t,coerce:!0})),boolean:(t=\u003elne.create({...t,coerce:!0})),bigint:(t=\u003eJM.create({...t,coerce:!0})),date:(t=\u003eOk.create({...t,coerce:!0}))},gBn=Zs;var S8=Z().or(_t()).transform(t=\u003eq1(t,\"Ω\").value),$M=Z().or(_t()).transform(t=\u003eq1(t,\"F\").value).transform(t=\u003eNumber.parseFloat(t.toPrecision(12))),Ine=Z().or(_t()).transform(t=\u003eq1(t,\"H\").value),O_=Z().or(_t()).transform(t=\u003eq1(t,\"V\").value),ce=Z().or(_t()).transform(t=\u003eq1(t).value),Cy=Z().or(_t()).transform(t=\u003eq1(t,\"Hz\").value),lt=ce,H3=Z().or(_t()).transform(t=\u003eq1(t,\"A\").value),Uk=Z().or(_t()).transform(t=\u003eq1(t).value),dBn=Uk,Ml=Uk,lrt=Z().datetime(),oA=Z().or(_t()).transform(t=\u003etypeof t==\"number\"?t:t.endsWith(\"deg\")?Number.parseFloat(t.split(\"deg\")[0]):t.endsWith(\"rad\")?Number.parseFloat(t.split(\"rad\")[0])*180/Math.PI:Number.parseFloat(t)),urt=_t().or(Z().endsWith(\"mAh\")).transform(t=\u003e{if(typeof t==\"string\"){const e=t.replace(\"mAh\",\"\"),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error(\"Invalid capacity\");return n}return t}).describe(\"Battery capacity in mAh\"),ki=Pt({x:lt,y:lt}),hBn=ki,D9=Pt({x:lt,y:lt,z:lt}),pBn=D9,Cne=Pt({width:_t(),height:_t()}),mBn=t=\u003e{const e=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";return Array.from({length:t},()=\u003ee[Math.floor(Math.random()*e.length)]).join(\"\")},so=t=\u003eZ().optional().default(()=\u003e`${t}_${mBn(10)}`),Q8=Kn([\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"]),_Bn=Kn([\"top_silkscreen\",\"bottom_silkscreen\",\"top_copper\",\"bottom_copper\",\"top_soldermask\",\"bottom_soldermask\",\"top_fabrication_note\",\"bottom_fabrication_note\",\"top_user_note\",\"bottom_user_note\",\"top_courtyard\",\"bottom_courtyard\",\"inner1_copper\",\"inner2_copper\",\"inner3_copper\",\"inner4_copper\",\"inner5_copper\",\"inner6_copper\",\"inner7_copper\",\"inner8_copper\",\"edge_cuts\",\"drill\"]),yne=Pt({project_relative_path:Z(),url:Z(),mimetype:Z()}),xne=ki.extend({rotation:oA.optional()}),l2e=Pt({size:ki.optional(),thickness:lt.optional()}),grt=Pt({font:l2e.optional()}),gV=Pt({value:Z(),at:xne.optional(),layer:Z().optional(),uuid:Z().optional(),hide:je().optional(),effects:grt.optional()}),drt=Pt({Reference:gV.optional(),Value:gV.optional(),Datasheet:gV.optional(),Description:gV.optional()}),hrt=Pt({through_hole:je().optional(),smd:je().optional(),exclude_from_pos_files:je().optional(),exclude_from_bom:je().optional()}),prt=Pt({name:Z(),type:Z(),shape:Z().optional(),at:xne.optional(),size:ki.optional(),drill:lt.optional(),layers:dn(Z()).optional(),removeUnusedLayers:je().optional(),uuid:Z().optional()}),mrt=Pt({path:Z(),offset:D9.optional(),scale:D9.optional(),rotate:D9.optional()}),_rt=Pt({footprintName:Z().optional(),version:xo([_t(),Z()]).optional(),generator:Z().optional(),generatorVersion:xo([_t(),Z()]).optional(),layer:Z().optional(),properties:drt.optional(),attributes:hrt.optional(),pads:dn(prt).optional(),embeddedFonts:je().optional(),model:mrt.optional()}),frt=Pt({hide:je().optional()}),Irt=Pt({offset:lt.optional(),hide:je().optional()}),Crt=Pt({font:l2e.optional(),justify:xo([Z(),dn(Z())]).optional(),hide:je().optional()}),yQ=Pt({value:Z(),id:xo([_t(),Z()]).optional(),at:xne.optional(),effects:Crt.optional()}),yrt=Pt({Reference:yQ.optional(),Value:yQ.optional(),Footprint:yQ.optional(),Datasheet:yQ.optional(),Description:yQ.optional(),ki_keywords:yQ.optional(),ki_fp_filters:yQ.optional()}),xrt=Pt({symbolName:Z().optional(),extends:Z().optional(),pinNumbers:frt.optional(),pinNames:Irt.optional(),excludeFromSim:je().optional(),inBom:je().optional(),onBoard:je().optional(),properties:yrt.optional(),embeddedFonts:je().optional()}),Dl=Pt({error_type:Z(),message:Z(),is_fatal:je().optional()}),qM=Kn([\"jlcpcb\",\"macrofab\",\"pcbway\",\"digikey\",\"mouser\",\"lcsc\"]),bu=Pt({type:$e(\"source_component\"),ftype:Z().optional(),source_component_id:Z(),name:Z(),manufacturer_part_number:Z().optional(),supplier_part_numbers:Qc(qM,dn(Z())).optional(),display_value:Z().optional(),display_name:Z().optional(),are_pins_interchangeable:je().optional(),internally_connected_source_port_ids:dn(dn(Z())).optional(),source_group_id:Z().optional(),subcircuit_id:Z().optional()}),u2e=bu.extend({ftype:$e(\"simple_capacitor\"),capacitance:$M,max_voltage_rating:O_.optional(),display_capacitance:Z().optional(),max_decoupling_trace_length:lt.optional()}),g2e=bu.extend({ftype:$e(\"simple_resistor\"),resistance:S8,display_resistance:Z().optional()}),Ene=bu.extend({ftype:$e(\"simple_diode\")}),Ert=bu.extend({ftype:$e(\"simple_fiducial\")}),d2e=Ene.extend({ftype:$e(\"simple_led\"),color:Z().optional(),wavelength:Z().optional()}),Brt=bu.extend({ftype:$e(\"simple_ground\")}),h2e=bu.extend({ftype:$e(\"simple_chip\")}),p2e=bu.extend({ftype:$e(\"simple_power_source\"),voltage:O_}),brt=bu.extend({ftype:$e(\"simple_current_source\"),current:H3,frequency:Cy.optional(),peak_to_peak_current:H3.optional(),wave_shape:Kn([\"sine\",\"square\",\"triangle\",\"sawtooth\",\"dc\"]).optional().default(\"dc\"),phase:_t().optional(),duty_cycle:_t().min(0).max(1).optional()}),Srt=bu.extend({ftype:$e(\"simple_fuse\"),current_rating_amps:_t().describe(\"Nominal current in amps the fuse is rated for\"),voltage_rating_volts:_t().describe(\"Voltage rating in volts, e.g. ±5V would be 5\")}),Qrt=bu.extend({ftype:$e(\"simple_ammeter\")}),vrt=Pt({must_be_connected:je().optional(),provides_power:je().optional(),requires_power:je().optional(),provides_ground:je().optional(),requires_ground:je().optional(),provides_voltage:xo([Z(),_t()]).optional(),requires_voltage:xo([Z(),_t()]).optional(),do_not_connect:je().optional(),include_in_board_pinout:je().optional(),can_use_internal_pullup:je().optional(),is_using_internal_pullup:je().optional(),needs_external_pullup:je().optional(),can_use_internal_pulldown:je().optional(),is_using_internal_pulldown:je().optional(),needs_external_pulldown:je().optional(),can_use_open_drain:je().optional(),is_using_open_drain:je().optional(),can_use_push_pull:je().optional(),is_using_push_pull:je().optional(),should_have_decoupling_capacitor:je().optional(),recommended_decoupling_capacitor_capacitance:xo([Z(),_t()]).optional(),is_configured_for_i2c_sda:je().optional(),is_configured_for_i2c_scl:je().optional(),is_configured_for_spi_mosi:je().optional(),is_configured_for_spi_miso:je().optional(),is_configured_for_spi_sck:je().optional(),is_configured_for_spi_cs:je().optional(),is_configured_for_uart_tx:je().optional(),is_configured_for_uart_rx:je().optional(),supports_i2c_sda:je().optional(),supports_i2c_scl:je().optional(),supports_spi_mosi:je().optional(),supports_spi_miso:je().optional(),supports_spi_sck:je().optional(),supports_spi_cs:je().optional(),supports_uart_tx:je().optional(),supports_uart_rx:je().optional()}),m2e=bu.extend({ftype:$e(\"simple_battery\"),capacity:urt}),_2e=bu.extend({ftype:$e(\"simple_inductor\"),inductance:Ine,display_inductance:Z().optional(),max_current_rating:_t().optional()}),f2e=bu.extend({ftype:$e(\"simple_push_button\")}),I2e=bu.extend({ftype:$e(\"simple_potentiometer\"),max_resistance:S8,display_max_resistance:Z().optional()}),wrt=bu.extend({ftype:$e(\"simple_crystal\"),frequency:_t().describe(\"Frequency in Hz\"),load_capacitance:_t().optional().describe(\"Load capacitance in pF\"),pin_variant:Kn([\"two_pin\",\"four_pin\"]).optional()}),C2e=bu.extend({ftype:$e(\"simple_pin_header\"),pin_count:_t(),gender:Kn([\"male\",\"female\"]).optional().default(\"male\")}),Prt=[\"usb_c\",\"m2\",\"jst_sh\",\"jst_gh\",\"jst_zh\",\"jst_ph\",\"jst_xh\",\"jst_vh\"],Mrt=bu.extend({ftype:$e(\"simple_connector\"),standard:Kn(Prt).optional(),pin_count:_t().int().positive().optional()}),y2e=bu.extend({ftype:$e(\"simple_pinout\")}),x2e=bu.extend({ftype:$e(\"simple_resonator\"),load_capacitance:$M,equivalent_series_resistance:S8.optional(),frequency:Cy}),E2e=bu.extend({ftype:$e(\"simple_transistor\"),transistor_type:Kn([\"npn\",\"pnp\"])}),B2e=bu.extend({ftype:$e(\"simple_test_point\"),footprint_variant:Kn([\"pad\",\"through_hole\"]).optional(),pad_shape:Kn([\"rect\",\"circle\"]).optional(),pad_diameter:xo([_t(),Z()]).optional(),hole_diameter:xo([_t(),Z()]).optional(),width:xo([_t(),Z()]).optional(),height:xo([_t(),Z()]).optional()}),b2e=bu.extend({ftype:$e(\"simple_mosfet\"),channel_type:Kn([\"n\",\"p\"]),mosfet_mode:Kn([\"enhancement\",\"depletion\"])}),S2e=bu.extend({ftype:$e(\"simple_op_amp\")}),Q2e=bu.extend({ftype:$e(\"simple_switch\")}),v2e=Pt({type:$e(\"source_project_metadata\"),name:Z().optional(),software_used_string:Z().optional(),project_url:Z().optional(),source_filesystem_md5_hash:Z().optional(),created_at:lrt.optional()}),Drt=Dl.extend({type:$e(\"source_missing_property_error\"),source_missing_property_error_id:so(\"source_missing_property_error\"),source_component_id:Z(),property_name:Z(),subcircuit_id:Z().optional(),error_type:$e(\"source_missing_property_error\").default(\"source_missing_property_error\")}).describe(\"The source code is missing a property\"),Nrt=Dl.extend({type:$e(\"source_failed_to_create_component_error\"),source_failed_to_create_component_error_id:so(\"source_failed_to_create_component_error\"),error_type:$e(\"source_failed_to_create_component_error\").default(\"source_failed_to_create_component_error\"),component_name:Z().optional(),subcircuit_id:Z().optional(),parent_source_component_id:Z().optional(),pcb_center:Pt({x:_t().optional(),y:_t().optional()}).optional(),schematic_center:Pt({x:_t().optional(),y:_t().optional()}).optional()}).describe(\"Error emitted when a component fails to be constructed\"),w2e=Dl.extend({type:$e(\"source_invalid_component_property_error\"),source_invalid_component_property_error_id:so(\"source_invalid_component_property_error\"),source_component_id:Z(),property_name:Z(),property_value:c2e().optional(),expected_format:Z().optional(),subcircuit_id:Z().optional(),error_type:$e(\"source_invalid_component_property_error\").default(\"source_invalid_component_property_error\")}).describe(\"The source component property is invalid\"),P2e=Dl.extend({type:$e(\"source_trace_not_connected_error\"),source_trace_not_connected_error_id:so(\"source_trace_not_connected_error\"),error_type:$e(\"source_trace_not_connected_error\").default(\"source_trace_not_connected_error\"),subcircuit_id:Z().optional(),source_group_id:Z().optional(),source_trace_id:Z().optional(),connected_source_port_ids:dn(Z()).optional(),selectors_not_found:dn(Z()).optional()}).describe(\"Occurs when a source trace selector does not match any ports\"),Rrt=Pt({type:$e(\"source_property_ignored_warning\"),source_property_ignored_warning_id:so(\"source_property_ignored_warning\"),source_component_id:Z(),property_name:Z(),subcircuit_id:Z().optional(),error_type:$e(\"source_property_ignored_warning\").default(\"source_property_ignored_warning\"),message:Z()}).describe(\"The source property was ignored\"),M2e=Pt({type:$e(\"source_pin_missing_trace_warning\"),source_pin_missing_trace_warning_id:so(\"source_pin_missing_trace_warning\"),warning_type:$e(\"source_pin_missing_trace_warning\").default(\"source_pin_missing_trace_warning\"),message:Z(),source_component_id:Z(),source_port_id:Z(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a source component pin is missing a trace connection\"),D2e=Pt({type:$e(\"source_missing_manufacturer_part_number_warning\"),source_missing_manufacturer_part_number_warning_id:so(\"source_missing_manufacturer_part_number_warning\"),warning_type:$e(\"source_missing_manufacturer_part_number_warning\").default(\"source_missing_manufacturer_part_number_warning\"),message:Z(),source_component_id:Z(),standard:Z(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a standard connector is missing manufacturer part number\"),N2e=Pt({type:$e(\"source_refdes_convention_warning\"),source_refdes_convention_warning_id:so(\"source_refdes_convention_warning\"),warning_type:$e(\"source_refdes_convention_warning\").default(\"source_refdes_convention_warning\"),message:Z(),source_component_id:Z(),refdes:Z(),source_component_ftype:Z(),expected_prefixes:dn(Z()),actual_prefix:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a source component reference designator does not match the component type convention\"),Trt=bu.extend({ftype:$e(\"simple_voltage_probe\")}),krt=bu.extend({ftype:$e(\"interconnect\")}),R2e=Dl.extend({type:$e(\"source_i2c_misconfigured_error\"),source_i2c_misconfigured_error_id:so(\"source_i2c_misconfigured_error\"),error_type:$e(\"source_i2c_misconfigured_error\").default(\"source_i2c_misconfigured_error\"),source_port_ids:dn(Z())}).describe(\"Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net\"),dV=Dl.extend({type:$e(\"source_component_misconfigured_error\"),source_component_misconfigured_error_id:so(\"source_component_misconfigured_error\"),error_type:$e(\"source_component_misconfigured_error\").default(\"source_component_misconfigured_error\"),source_component_ids:dn(Z()),source_port_ids:dn(Z()).optional()}).describe(\"Error emitted when one or more source components have an invalid or conflicting configuration\"),Frt=bu.extend({ftype:$e(\"simple_voltage_source\"),voltage:O_,frequency:Cy.optional(),peak_to_peak_voltage:O_.optional(),wave_shape:Kn([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]).optional(),phase:oA.optional(),duty_cycle:_t().optional().describe(\"Duty cycle as a fraction (0 to 1)\"),pulse_delay:Ml.optional(),rise_time:Ml.optional(),fall_time:Ml.optional(),pulse_width:Ml.optional(),period:Ml.optional()}),Lrt=xo([g2e,u2e,Ene,Ert,d2e,Brt,h2e,p2e,brt,Qrt,m2e,_2e,f2e,I2e,wrt,C2e,Mrt,y2e,x2e,Q2e,E2e,B2e,b2e,S2e,Srt,Trt,krt,Frt,v2e,Drt,w2e,Nrt,P2e,Rrt,M2e,D2e,N2e,R2e,dV]),Hrt=Pt({type:$e(\"source_port\"),pin_number:_t().optional(),port_hints:dn(Z()).optional(),name:Z(),source_port_id:Z(),source_component_id:Z().optional(),source_group_id:Z().optional(),most_frequently_referenced_by_name:Z().optional(),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional()}).merge(vrt),Ort=Pt({type:$e(\"source_component_internal_connection\"),source_component_internal_connection_id:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}),Grt=Pt({type:$e(\"source_trace\"),source_trace_id:Z(),connected_source_port_ids:dn(Z()),connected_source_net_ids:dn(Z()),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),max_length:_t().optional(),max_via_count:_t().int().nonnegative().optional(),name:Z().optional(),min_trace_thickness:_t().optional(),display_name:Z().optional()}),Yrt=Pt({type:$e(\"source_group\"),source_group_id:Z(),subcircuit_id:Z().optional(),parent_subcircuit_id:Z().optional(),parent_source_group_id:Z().optional(),is_subcircuit:je().optional(),show_as_schematic_box:je().optional(),name:Z().optional(),was_automatically_named:je().optional()}),Urt=Pt({type:$e(\"source_net\"),source_net_id:Z(),name:Z(),member_source_group_ids:dn(Z()),is_power:je().optional(),is_ground:je().optional(),is_digital_signal:je().optional(),is_analog_signal:je().optional(),is_positive_voltage_source:je().optional(),trace_width:_t().optional(),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional()}),Krt=Pt({type:$e(\"source_board\"),source_board_id:Z(),source_group_id:Z(),title:Z().optional()}).describe(\"Defines a board in the source domain\"),Vrt=Dl.extend({type:$e(\"source_ambiguous_port_reference\"),source_ambiguous_port_reference_id:so(\"source_ambiguous_port_reference\"),error_type:$e(\"source_ambiguous_port_reference\").default(\"source_ambiguous_port_reference\"),source_port_id:Z().optional(),source_component_id:Z().optional()}).describe(\"Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous\"),zrt=Pt({type:$e(\"source_pcb_ground_plane\"),source_pcb_ground_plane_id:Z(),source_group_id:Z(),source_net_id:Z(),subcircuit_id:Z().optional()}).describe(\"Defines a ground plane in the source domain\"),Kk=[\"top\",\"bottom\",\"inner1\",\"inner2\",\"inner3\",\"inner4\",\"inner5\",\"inner6\",\"inner7\",\"inner8\"],T2e=Kn(Kk),Pr=T2e.or(Pt({name:T2e})).transform(t=\u003etypeof t==\"string\"?t:t.name),Km=Kn([\"top\",\"bottom\"]),Jrt=Pt({type:$e(\"source_manually_placed_via\"),source_manually_placed_via_id:Z(),source_group_id:Z(),source_net_id:Z().min(1).optional(),subcircuit_id:Z().optional(),source_trace_id:Z().optional()}).describe(\"Defines a via that is manually placed in the source domain\"),Wrt=Pt({type:$e(\"source_unnamed_trace_warning\"),source_unnamed_trace_warning_id:so(\"source_unnamed_trace_warning\"),warning_type:$e(\"source_unnamed_trace_warning\").default(\"source_unnamed_trace_warning\"),message:Z(),source_trace_id:Z(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a source trace is missing a name\"),jrt=Pt({type:$e(\"source_no_power_pin_defined_warning\"),source_no_power_pin_defined_warning_id:so(\"source_no_power_pin_defined_warning\"),warning_type:$e(\"source_no_power_pin_defined_warning\").default(\"source_no_power_pin_defined_warning\"),message:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a chip has no source ports with requires_power=true\"),$rt=Pt({type:$e(\"source_no_ground_pin_defined_warning\"),source_no_ground_pin_defined_warning_id:so(\"source_no_ground_pin_defined_warning\"),warning_type:$e(\"source_no_ground_pin_defined_warning\").default(\"source_no_ground_pin_defined_warning\"),message:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a chip has no source ports marked as ground pins\"),qrt=Pt({type:$e(\"source_component_pins_underspecified_warning\"),source_component_pins_underspecified_warning_id:so(\"source_component_pins_underspecified_warning\"),warning_type:$e(\"source_component_pins_underspecified_warning\").default(\"source_component_pins_underspecified_warning\"),message:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Warning emitted when all ports on a source component are underspecified\"),Xrt=Dl.extend({type:$e(\"source_pin_must_be_connected_error\"),source_pin_must_be_connected_error_id:so(\"source_pin_must_be_connected_error\"),error_type:$e(\"source_pin_must_be_connected_error\").default(\"source_pin_must_be_connected_error\"),source_component_id:Z(),source_port_id:Z(),subcircuit_id:Z().optional()}).describe(\"Error emitted when a pin with mustBeConnected attribute is not connected to any trace\"),Zrt=Dl.extend({type:$e(\"unknown_error_finding_part\"),unknown_error_finding_part_id:so(\"unknown_error_finding_part\"),error_type:$e(\"unknown_error_finding_part\").default(\"unknown_error_finding_part\"),source_component_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Error emitted when an unexpected error occurs while finding a part\"),hV=Pt({type:$e(\"source_part_not_found_warning\"),source_part_not_found_warning_id:so(\"source_part_not_found_warning\"),warning_type:$e(\"source_part_not_found_warning\").default(\"source_part_not_found_warning\"),message:Z(),source_component_id:Z().optional(),subcircuit_id:Z().optional(),supplier_name:qM.optional(),manufacturer_part_number:Z().optional(),supplier_part_number:Z().optional(),part_name:Z().optional()}).describe(\"Warning emitted when a requested part can not be found\"),est=Pt({type:$e(\"source_confusing_net_name_warning\"),source_confusing_net_name_warning_id:so(\"source_confusing_net_name_warning\"),warning_type:$e(\"source_confusing_net_name_warning\").default(\"source_confusing_net_name_warning\"),message:Z(),source_net_ids:dn(Z()).min(2),net_name:Z(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when electrically disconnected source nets share a name\"),tst=Pt({type:$e(\"schematic_box\"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),width:lt,height:lt,is_dashed:je().default(!1),x:lt,y:lt,subcircuit_id:Z().optional()}).describe(\"Draws a box on the schematic\"),nst=Pt({type:$e(\"schematic_path\"),schematic_path_id:so(\"schematic_path\"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),fill_color:Z().optional(),is_filled:je().optional(),is_dashed:je().default(!1),stroke_width:lt.nullable().optional(),stroke_color:Z().optional(),dash_length:lt.optional(),dash_gap:lt.optional(),points:dn(ki),subcircuit_id:Z().optional()}),ost=Qc(Pt({left_margin:ce.optional(),right_margin:ce.optional(),top_margin:ce.optional(),bottom_margin:ce.optional()})),ist=Pt({left_size:_t(),right_size:_t(),top_size:_t().optional(),bottom_size:_t().optional()}),rst=Pt({left_side:Pt({pins:dn(_t()),direction:Kn([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),right_side:Pt({pins:dn(_t()),direction:Kn([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),top_side:Pt({pins:dn(_t()),direction:Kn([\"left-to-right\",\"right-to-left\"]).optional()}).optional(),bottom_side:Pt({pins:dn(_t()),direction:Kn([\"left-to-right\",\"right-to-left\"]).optional()}).optional()}),sst=xo([ist,rst]),ast=Pt({type:$e(\"schematic_component\"),size:Cne,center:ki,source_component_id:Z().optional(),schematic_component_id:Z(),schematic_sheet_id:Z().optional(),schematic_symbol_id:Z().optional(),pin_spacing:ce.optional(),pin_styles:ost.optional(),box_width:ce.optional(),symbol_name:Z().optional(),port_arrangement:sst.optional(),port_labels:Qc(Z()).optional(),symbol_display_value:Z().optional(),subcircuit_id:Z().optional(),schematic_group_id:Z().optional(),is_schematic_group:je().optional(),source_group_id:Z().optional(),is_box_with_pins:je().optional().default(!0)}),fBn=Pt({kicad_symbol:xrt.optional()}).catchall(c2e()),Ast=Pt({type:$e(\"schematic_symbol\"),schematic_symbol_id:Z(),name:Z().optional(),metadata:fBn.optional()}).describe(\"Defines a named schematic symbol that can be referenced by components.\"),cst=Pt({type:$e(\"schematic_line\"),schematic_line_id:so(\"schematic_line\"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),x1:lt,y1:lt,x2:lt,y2:lt,stroke_width:lt.nullable().optional(),color:Z().default(\"#000000\"),is_dashed:je().default(!1),dash_length:lt.optional(),dash_gap:lt.optional(),subcircuit_id:Z().optional()}).describe(\"Draws a styled line on the schematic\"),lst=Pt({type:$e(\"schematic_rect\"),schematic_rect_id:so(\"schematic_rect\"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),center:ki,width:lt,height:lt,rotation:oA.default(0),stroke_width:lt.nullable().optional(),color:Z().default(\"#000000\"),is_filled:je().default(!1),fill_color:Z().optional(),is_dashed:je().default(!1),subcircuit_id:Z().optional()}).describe(\"Draws a styled rectangle on the schematic\"),ust=Pt({type:$e(\"schematic_circle\"),schematic_circle_id:so(\"schematic_circle\"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),center:ki,radius:lt,stroke_width:lt.nullable().optional(),color:Z().default(\"#000000\"),is_filled:je().default(!1),fill_color:Z().optional(),is_dashed:je().default(!1),subcircuit_id:Z().optional()}).describe(\"Draws a styled circle on the schematic\"),gst=Pt({type:$e(\"schematic_arc\"),schematic_arc_id:so(\"schematic_arc\"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),center:ki,radius:lt,start_angle_degrees:oA,end_angle_degrees:oA,direction:Kn([\"clockwise\",\"counterclockwise\"]).default(\"counterclockwise\"),stroke_width:lt.nullable().optional(),color:Z().default(\"#000000\"),is_dashed:je().default(!1),subcircuit_id:Z().optional()}).describe(\"Draws a styled arc on the schematic\"),dst=Pt({type:$e(\"schematic_trace\"),schematic_trace_id:Z(),schematic_sheet_id:Z().optional(),source_trace_id:Z().optional(),junctions:dn(Pt({x:_t(),y:_t()})),edges:dn(Pt({from:Pt({x:_t(),y:_t()}),to:Pt({x:_t(),y:_t()}),is_crossing:je().optional(),from_schematic_port_id:Z().optional(),to_schematic_port_id:Z().optional()})),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional()}),IBn=Kn([\"center\",\"left\",\"right\",\"top\",\"bottom\"]),k2e=Pt({text:Z(),is_overlined:je().optional()}),hst=Pt({type:$e(\"schematic_text\"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),schematic_text_id:Z(),source_trace_id:Z().optional(),text:Z(),text_parts:dn(k2e).min(1).optional(),display_superscript:Z().optional(),font_size:_t().default(.18),position:Pt({x:lt,y:lt}),rotation:_t().default(0),anchor:xo([IBn.describe(\"legacy\"),Q8]).default(\"center\"),color:Z().default(\"#000000\"),subcircuit_id:Z().optional()}),pst=Pt({type:$e(\"schematic_port\"),schematic_port_id:Z(),source_port_id:Z(),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),center:ki,facing_direction:Kn([\"up\",\"down\",\"left\",\"right\"]).optional(),distance_from_component_edge:_t().optional(),side_of_component:Kn([\"top\",\"bottom\",\"left\",\"right\"]).optional(),true_ccw_index:_t().optional(),pin_number:_t().optional(),display_pin_label:Z().optional(),display_pin_label_text_parts:dn(k2e).min(1).optional(),display_pin_label_font_size:_t().positive().finite().optional(),subcircuit_id:Z().optional(),is_connected:je().optional(),is_internal_circuit_port:je().optional(),is_overlapping_internal_circuit_port:je().optional(),has_input_arrow:je().optional(),has_output_arrow:je().optional(),is_drawn_with_inversion_circle:je().optional()}).describe(\"Defines a port on a schematic component\"),mst=Pt({type:$e(\"schematic_net_label\"),schematic_net_label_id:so(\"schematic_net_label\"),schematic_sheet_id:Z().optional(),schematic_trace_id:Z().optional(),source_trace_id:Z().optional(),source_net_id:Z(),center:ki,anchor_position:ki.optional(),anchor_side:Kn([\"top\",\"bottom\",\"left\",\"right\"]),text:Z(),display_superscript:Z().optional(),symbol_name:Z().optional(),is_movable:je().optional(),subcircuit_id:Z().optional()}),_st=Dl.extend({type:$e(\"schematic_error\"),schematic_error_id:Z(),error_type:$e(\"schematic_port_not_found\").default(\"schematic_port_not_found\"),subcircuit_id:Z().optional()}).describe(\"Defines a schematic error on the schematic\"),fst=Dl.extend({type:$e(\"schematic_layout_error\"),schematic_layout_error_id:so(\"schematic_layout_error\"),error_type:$e(\"schematic_layout_error\").default(\"schematic_layout_error\"),source_group_id:Z(),schematic_group_id:Z(),subcircuit_id:Z().optional()}).describe(\"Error emitted when schematic layout fails for a group\"),Bne=Pt({type:$e(\"schematic_debug_object\"),label:Z().optional(),subcircuit_id:Z().optional()}),Ist=Bne.extend({shape:$e(\"rect\"),center:ki,size:Cne}),Cst=Bne.extend({shape:$e(\"line\"),start:ki,end:ki}),yst=Bne.extend({shape:$e(\"point\"),center:ki}),xst=Iy(\"shape\",[Ist,Cst,yst]),Est=Pt({type:$e(\"schematic_voltage_probe\"),schematic_voltage_probe_id:Z(),schematic_sheet_id:Z().optional(),source_component_id:Z().optional(),name:Z().optional(),position:ki,schematic_trace_id:Z(),voltage:O_.optional(),subcircuit_id:Z().optional(),color:Z().optional(),label_alignment:Q8.optional()}).describe(\"Defines a voltage probe measurement point on a schematic trace\"),F2e=Pt({type:$e(\"schematic_manual_edit_conflict_warning\"),schematic_manual_edit_conflict_warning_id:so(\"schematic_manual_edit_conflict_warning\"),warning_type:$e(\"schematic_manual_edit_conflict_warning\").default(\"schematic_manual_edit_conflict_warning\"),message:Z(),schematic_component_id:Z(),schematic_group_id:Z().optional(),subcircuit_id:Z().optional(),source_component_id:Z()}).describe(\"Warning emitted when a component has both manual placement and explicit schX/schY coordinates\"),Bst=Pt({type:$e(\"schematic_component_overlap_warning\"),schematic_component_overlap_warning_id:so(\"schematic_component_overlap_warning\"),warning_type:$e(\"schematic_component_overlap_warning\").default(\"schematic_component_overlap_warning\"),message:Z(),schematic_component_ids:fQ([Z(),Z()]),schematic_sheet_id:Z().optional()}).describe(\"Warning emitted when the rendered bounds of two schematic components overlap\"),bst=Pt({type:$e(\"schematic_component_styling_warning\"),schematic_component_styling_warning_id:so(\"schematic_component_styling_warning\"),warning_type:$e(\"schematic_component_styling_warning\").default(\"schematic_component_styling_warning\"),message:Z(),schematic_component_id:Z(),styling_issue_type:Z(),schematic_port_ids:dn(Z()).optional(),source_component_id:Z().optional(),schematic_sheet_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a schematic component has a visual styling issue\"),Sst=Pt({type:$e(\"schematic_element_outside_sheet_warning\"),schematic_element_outside_sheet_warning_id:so(\"schematic_element_outside_sheet_warning\"),warning_type:$e(\"schematic_element_outside_sheet_warning\").default(\"schematic_element_outside_sheet_warning\"),message:Z(),schematic_sheet_id:Z(),schematic_element_type:Kn([\"schematic_component\",\"schematic_net_label\",\"schematic_trace\"]),schematic_element_id:Z()}).describe(\"Warning emitted when a schematic component, net label, or trace extends outside its schematic sheet\"),Qst=lt.pipe(_t().positive().finite()),vst=Pt({type:$e(\"schematic_graphic\"),schematic_graphic_id:so(\"schematic_graphic\"),schematic_sheet_id:Z().optional(),asset:yne.optional(),svg_content:Z().optional(),width:Qst.optional(),height:Qst.optional()}).describe(\"References a graphic asset or inline SVG content with optional centered layout bounds on a schematic sheet\").superRefine(({asset:t,svg_content:e},n)=\u003e{t===void 0\u0026\u0026e===void 0\u0026\u0026n.addIssue({code:lo.custom,message:\"At least one of asset or svg_content is required\"})}),wst=Pt({type:$e(\"schematic_group\"),schematic_group_id:so(\"schematic_group\"),schematic_sheet_id:Z().optional(),source_group_id:Z(),is_subcircuit:je().optional(),subcircuit_id:Z().optional(),width:ce,height:ce,center:ki,schematic_component_ids:dn(Z()),show_as_schematic_box:je().optional(),name:Z().optional(),description:Z().optional()}).describe(\"Defines a group of components on the schematic\"),Pst=Pt({type:$e(\"schematic_table\"),schematic_table_id:so(\"schematic_table\"),schematic_sheet_id:Z().optional(),anchor_position:ki,column_widths:dn(lt),row_heights:dn(lt),cell_padding:lt.optional(),border_width:lt.optional(),subcircuit_id:Z().optional(),schematic_component_id:Z().optional(),anchor:Q8.optional()}).describe(\"Defines a table on the schematic\"),Mst=Pt({type:$e(\"schematic_table_cell\"),schematic_table_cell_id:so(\"schematic_table_cell\"),schematic_sheet_id:Z().optional(),schematic_table_id:Z(),start_row_index:_t(),end_row_index:_t(),start_column_index:_t(),end_column_index:_t(),text:Z().optional(),center:ki,width:lt,height:lt,horizontal_align:Kn([\"left\",\"center\",\"right\"]).optional(),vertical_align:Kn([\"top\",\"middle\",\"bottom\"]).optional(),font_size:lt.optional(),subcircuit_id:Z().optional()}).describe(\"Defines a cell within a schematic_table\"),L2e=Kn([\"a4\",\"ansi_b\"]),Dst=Pt({type:$e(\"schematic_sheet\"),schematic_sheet_id:so(\"schematic_sheet\"),name:Z().optional(),sheet_index:_t().optional(),sheet_size:L2e.optional(),sheet_width:_t().positive().optional(),sheet_height:_t().positive().optional(),subcircuit_id:Z().optional(),outline_color:Z().optional()}).describe(\"Defines a schematic sheet or page that components can be placed on\"),Nst=Pt({type:$e(\"schematic_missing_sheet_warning\"),schematic_missing_sheet_warning_id:so(\"schematic_missing_sheet_warning\"),warning_type:$e(\"schematic_missing_sheet_warning\").default(\"schematic_missing_sheet_warning\"),message:Z()}).describe(\"Circuit-wide warning emitted when a schematic has no schematic sheet. Display as a banner without attaching it to a component or drawing a target outline or leader line.\"),Rst=Pt({x:lt,y:lt,bulge:_t().optional()}),H2e=Pt({vertices:dn(Rst)}),O2e=Pt({outer_ring:H2e,inner_rings:dn(H2e).default([])}),G2e={from_left:\"from_left\",from_right:\"from_right\",from_top:\"from_top\",from_bottom:\"from_bottom\",from_above:\"from_above\",from_below:\"from_below\",from_x_neg:\"from_left\",from_x_pos:\"from_right\",from_y_pos:\"from_top\",from_y_neg:\"from_bottom\",from_z_pos:\"from_above\",from_z_neg:\"from_below\",from_front:\"from_top\",from_back:\"from_bottom\"},CBn={from_left:{x:-1,y:0,z:0},from_right:{x:1,y:0,z:0},from_top:{x:0,y:1,z:0},from_bottom:{x:0,y:-1,z:0},from_above:{x:0,y:0,z:1},from_below:{x:0,y:0,z:-1}},Tst=Kn([\"from_left\",\"from_right\",\"from_top\",\"from_bottom\",\"from_above\",\"from_below\",\"from_x_neg\",\"from_x_pos\",\"from_y_pos\",\"from_y_neg\",\"from_z_pos\",\"from_z_neg\",\"from_front\",\"from_back\"]).transform(t=\u003eG2e[t]).describe('The side exposing the receptacle where the cable or mating part is attached, following the 2D PCB diagram convention, not a 3D viewport frame. In project coordinate space, \"from_top\" is +Y, \"from_bottom\" -Y, \"from_left\" -X, \"from_right\" +X, \"from_above\" +Z and \"from_below\" -Z. A receptacle on the +Y edge is \"from_top\" even though the plug moves in -Y as it seats. Cartesian spellings such as \"from_y_pos\" are accepted and normalized to the named values, as are the deprecated \"from_front\" (now \"from_top\") and \"from_back\" (now \"from_bottom\").'),pV=Kn([\"leftside_top\",\"leftside_bottom\",\"rightside_top\",\"rightside_bottom\",\"topside_left\",\"topside_right\",\"bottomside_left\",\"bottomside_right\"]),yBn=[[\"leftside_top\",\"bottomside_left\",\"rightside_bottom\",\"topside_right\"],[\"leftside_bottom\",\"bottomside_right\",\"rightside_top\",\"topside_left\"]],xBn=(t,e)=\u003e{for(const n of yBn){const o=n.indexOf(t),i=n.indexOf(e);if(o!==-1\u0026\u0026i!==-1)return(i-o+n.length)%n.length*90}return null},kst=Pt({x:lt,y:lt,via:je().optional(),via_to_layer:Pr.optional()}),EBn=dn(kst),N9=Pt({x:lt,y:lt,via:je().optional(),to_layer:Pr.optional(),trace_width:lt.optional()}),Fst=Pt({min_trace_width:ce.optional(),min_board_edge_clearance:ce.optional(),min_via_hole_edge_to_via_hole_edge_clearance:ce.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:ce.optional(),min_trace_to_pad_edge_clearance:ce.optional(),min_pad_edge_to_pad_edge_clearance:ce.optional(),min_same_net_trace_edge_to_trace_edge_clearance:ce.optional(),min_different_net_trace_edge_to_trace_edge_clearance:ce.optional(),min_via_edge_to_pad_edge_clearance:ce.optional(),min_via_hole_diameter:ce.optional(),min_via_pad_diameter:ce.optional()}),Lst=Pt({type:$e(\"pcb_component\"),pcb_component_id:so(\"pcb_component\"),source_component_id:Z(),center:ki,layer:Pr,rotation:oA,display_offset_x:Z().optional().describe(\"How to display the x offset for this part, usually corresponding with how the user specified it\"),display_offset_y:Z().optional().describe(\"How to display the y offset for this part, usually corresponding with how the user specified it\"),width:ce,height:ce,do_not_place:je().optional(),is_allowed_to_be_off_board:je().optional(),subcircuit_id:Z().optional(),pcb_group_id:Z().optional(),position_mode:Kn([\"packed\",\"relative_to_group_anchor\",\"relative_to_another_component\",\"none\"]).optional(),anchor_position:ki.optional(),anchor_alignment:Q8.optional(),positioned_relative_to_pcb_group_id:Z().optional(),positioned_relative_to_pcb_board_id:Z().optional(),cable_insertion_center:ki.optional(),insertion_direction:Tst.optional(),pin1_location:pV.optional().describe(\"Location of pin 1 on the unrotated, top-view component footprint\"),supplier_pin1_location_map:Qc(qM,pV).optional().describe(\"Pin 1 location for each supplier's unrotated, top-view footprint\"),metadata:Pt({kicad_footprint:_rt.optional()}).optional(),obstructs_within_bounds:je().default(!0).describe(\"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath\")}).describe(\"Defines a component on the PCB\"),bne=Pt({type:$e(\"pcb_debug_object\"),pcb_debug_object_id:so(\"pcb_debug_object\"),label:Z().optional(),subcircuit_id:Z().optional()}),Hst=bne.extend({shape:$e(\"rect\"),center:ki,size:Cne}),Ost=bne.extend({shape:$e(\"line\"),start:ki,end:ki}),Gst=bne.extend({shape:$e(\"point\"),center:ki}),Yst=Iy(\"shape\",[Hst,Ost,Gst]),Ust=Pt({type:$e(\"pcb_hole\"),pcb_hole_id:so(\"pcb_hole\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e(\"circle\"),hole_diameter:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),BBn=Ust.describe(\"Defines a circular hole on the PCB\"),Kst=Pt({type:$e(\"pcb_hole\"),pcb_hole_id:so(\"pcb_hole\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e(\"rect\"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),bBn=Kst.describe(\"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square.\"),Vst=Pt({type:$e(\"pcb_hole\"),pcb_hole_id:so(\"pcb_hole\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:Kn([\"circle\",\"square\"]),hole_diameter:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),SBn=Vst.describe(\"Defines a circular or square hole on the PCB\"),zst=Pt({type:$e(\"pcb_hole\"),pcb_hole_id:so(\"pcb_hole\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e(\"oval\"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),QBn=zst.describe(\"Defines an oval hole on the PCB\"),Jst=Pt({type:$e(\"pcb_hole\"),pcb_hole_id:so(\"pcb_hole\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e(\"pill\"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),vBn=Jst.describe(\"Defines a pill-shaped hole on the PCB\"),Wst=Pt({type:$e(\"pcb_hole\"),pcb_hole_id:so(\"pcb_hole\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e(\"rotated_pill\"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,ccw_rotation:oA,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),wBn=Wst.describe(\"Defines a rotated pill-shaped hole on the PCB\"),jst=Vst.or(zst).or(Jst).or(Wst).or(Ust).or(Kst),PBn=Pt({type:$e(\"pcb_plated_hole\"),shape:$e(\"circle\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),outer_diameter:_t(),hole_diameter:_t(),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so(\"pcb_plated_hole\"),soldermask_margin:_t().optional()}),MBn=Pt({type:$e(\"pcb_plated_hole\"),shape:Kn([\"oval\",\"pill\"]),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),outer_width:_t(),outer_height:_t(),hole_width:_t(),hole_height:_t(),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,ccw_rotation:oA,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so(\"pcb_plated_hole\"),soldermask_margin:_t().optional()}),DBn=Pt({type:$e(\"pcb_plated_hole\"),shape:$e(\"circular_hole_with_rect_pad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:$e(\"circle\"),pad_shape:$e(\"rect\"),hole_diameter:_t(),rect_pad_width:_t(),rect_pad_height:_t(),rect_border_radius:_t().optional(),hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so(\"pcb_plated_hole\"),soldermask_margin:_t().optional(),rect_ccw_rotation:oA.optional()}),NBn=Pt({type:$e(\"pcb_plated_hole\"),shape:$e(\"pill_hole_with_rect_pad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:$e(\"pill\"),pad_shape:$e(\"rect\"),hole_width:_t(),hole_height:_t(),rect_pad_width:_t(),rect_pad_height:_t(),rect_border_radius:_t().optional(),hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so(\"pcb_plated_hole\"),soldermask_margin:_t().optional()}),RBn=Pt({type:$e(\"pcb_plated_hole\"),shape:$e(\"rotated_pill_hole_with_rect_pad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:$e(\"rotated_pill\"),pad_shape:$e(\"rect\"),hole_width:_t(),hole_height:_t(),hole_ccw_rotation:oA,rect_pad_width:_t(),rect_pad_height:_t(),rect_border_radius:_t().optional(),rect_ccw_rotation:oA,hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so(\"pcb_plated_hole\"),soldermask_margin:_t().optional()}),TBn=Pt({type:$e(\"pcb_plated_hole\"),shape:$e(\"hole_with_polygon_pad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:Kn([\"circle\",\"oval\",\"pill\",\"rotated_pill\"]),hole_diameter:_t().optional(),hole_width:_t().optional(),hole_height:_t().optional(),pad_outline:dn(Pt({x:lt,y:lt})).min(3),hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so(\"pcb_plated_hole\"),soldermask_margin:_t().optional(),ccw_rotation:oA.optional()}),$st=xo([PBn,MBn,DBn,NBn,RBn,TBn]),qst=Pt({type:$e(\"pcb_port\"),pcb_port_id:so(\"pcb_port\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),source_port_id:Z(),pcb_component_id:Z().optional(),x:lt,y:lt,layers:dn(Pr),is_board_pinout:je().optional()}).describe(\"Defines a port on the PCB\"),kBn=Pt({type:$e(\"pcb_smtpad\"),shape:$e(\"circle\"),pcb_smtpad_id:so(\"pcb_smtpad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,radius:_t(),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),FBn=Pt({type:$e(\"pcb_smtpad\"),shape:$e(\"rect\"),pcb_smtpad_id:so(\"pcb_smtpad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),rect_border_radius:_t().optional(),corner_radius:_t().optional(),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),soldermask_margin_left:_t().optional(),soldermask_margin_top:_t().optional(),soldermask_margin_right:_t().optional(),soldermask_margin_bottom:_t().optional(),solderpaste_margin:_t().optional()}),LBn=Pt({type:$e(\"pcb_smtpad\"),shape:$e(\"rotated_rect\"),pcb_smtpad_id:so(\"pcb_smtpad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),rect_border_radius:_t().optional(),corner_radius:_t().optional(),ccw_rotation:oA,layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),soldermask_margin_left:_t().optional(),soldermask_margin_top:_t().optional(),soldermask_margin_right:_t().optional(),soldermask_margin_bottom:_t().optional(),solderpaste_margin:_t().optional()}),Xst=Pt({type:$e(\"pcb_smtpad\"),shape:$e(\"pill\"),pcb_smtpad_id:so(\"pcb_smtpad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),HBn=Pt({type:$e(\"pcb_smtpad\"),shape:$e(\"rotated_pill\"),pcb_smtpad_id:so(\"pcb_smtpad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),ccw_rotation:oA,layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),OBn=Pt({type:$e(\"pcb_smtpad\"),shape:$e(\"polygon\"),pcb_smtpad_id:so(\"pcb_smtpad\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),points:dn(ki),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),Zst=Iy(\"shape\",[kBn,FBn,LBn,HBn,Xst,OBn]).describe(\"Defines an SMT pad on the PCB\"),GBn=Pt({type:$e(\"pcb_solder_paste\"),shape:$e(\"circle\"),pcb_solder_paste_id:so(\"pcb_solder_paste\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,radius:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),YBn=Pt({type:$e(\"pcb_solder_paste\"),shape:$e(\"rect\"),pcb_solder_paste_id:so(\"pcb_solder_paste\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),UBn=Pt({type:$e(\"pcb_solder_paste\"),shape:$e(\"pill\"),pcb_solder_paste_id:so(\"pcb_solder_paste\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),KBn=Pt({type:$e(\"pcb_solder_paste\"),shape:$e(\"rotated_rect\"),pcb_solder_paste_id:so(\"pcb_solder_paste\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),ccw_rotation:lt,layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),VBn=Pt({type:$e(\"pcb_solder_paste\"),shape:$e(\"rotated_pill\"),pcb_solder_paste_id:so(\"pcb_solder_paste\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),ccw_rotation:oA,layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),zBn=Pt({type:$e(\"pcb_solder_paste\"),shape:$e(\"oval\"),pcb_solder_paste_id:so(\"pcb_solder_paste\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),eat=xo([GBn,YBn,UBn,KBn,VBn,zBn]).describe(\"Defines solderpaste on the PCB\"),tat=Pt({type:$e(\"pcb_text\"),pcb_text_id:so(\"pcb_text\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),text:Z(),center:ki,layer:Pr,width:ce,height:ce,lines:_t(),align:Kn([\"bottom-left\"])}).describe(\"Defines text on the PCB\"),nat=Pt({route_type:$e(\"wire\"),x:lt,y:lt,width:lt,copper_pour_id:Z().optional(),is_inside_copper_pour:je().optional(),start_pcb_port_id:Z().optional(),end_pcb_port_id:Z().optional(),layer:Pr}),oat=Pt({route_type:$e(\"via\"),x:lt,y:lt,copper_pour_id:Z().optional(),is_inside_copper_pour:je().optional(),hole_diameter:lt.optional(),outer_diameter:lt.optional(),from_layer:Pr,to_layer:Pr}),iat=Pt({route_type:$e(\"through_pad\"),start:ki,end:ki,width:lt,start_layer:Pr,end_layer:Pr,pcb_smtpad_id:Z().optional(),pcb_plated_hole_id:Z().optional()}),Y2e=xo([nat,oat,iat]),rat=Pt({type:$e(\"pcb_trace\"),source_trace_id:Z().optional(),pcb_component_id:Z().optional(),pcb_trace_id:so(\"pcb_trace\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),route_thickness_mode:Kn([\"constant\",\"interpolated\"]).default(\"constant\").optional(),route_order_index:_t().optional(),should_round_corners:je().optional(),trace_length:_t().optional(),highlight_color:Z().optional(),route:dn(Y2e)}).describe(\"Defines a trace on the PCB\"),sat=Pt({type:$e(\"pcb_trace_warning\"),pcb_trace_warning_id:so(\"pcb_trace_warning\"),warning_type:$e(\"pcb_trace_warning\").default(\"pcb_trace_warning\"),message:Z(),center:ki.optional(),pcb_trace_id:Z(),source_trace_id:Z(),pcb_component_ids:dn(Z()),pcb_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Defines a trace warning on the PCB\"),aat=Pt({type:$e(\"pcb_trace_too_long_warning\"),pcb_trace_too_long_warning_id:so(\"pcb_trace_too_long_warning\"),warning_type:$e(\"pcb_trace_too_long_warning\").default(\"pcb_trace_too_long_warning\"),message:Z(),pcb_trace_id:Z(),source_net_id:Z().optional(),source_trace_id:Z().optional(),actual_trace_length:lt,maximum_trace_length:lt,subcircuit_id:Z().optional()}).describe(\"Warning emitted when a PCB trace is longer than its maximum allowed length\"),Aat=Pt({type:$e(\"pcb_trace_too_many_vias_warning\"),pcb_trace_too_many_vias_warning_id:so(\"pcb_trace_too_many_vias_warning\"),warning_type:$e(\"pcb_trace_too_many_vias_warning\").default(\"pcb_trace_too_many_vias_warning\"),message:Z(),pcb_trace_id:Z(),source_net_id:Z().optional(),source_trace_id:Z().optional(),actual_via_count:_t().int().nonnegative(),maximum_via_count:_t().int().nonnegative(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a PCB trace has more vias than its maximum allowed count\"),cat=Dl.extend({type:$e(\"pcb_trace_error\"),pcb_trace_error_id:so(\"pcb_trace_error\"),error_type:$e(\"pcb_trace_error\").default(\"pcb_trace_error\"),center:ki.optional(),pcb_trace_id:Z(),source_trace_id:Z(),pcb_component_ids:dn(Z()),pcb_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Defines a trace error on the PCB\"),lat=Dl.extend({type:$e(\"pcb_trace_missing_error\"),pcb_trace_missing_error_id:so(\"pcb_trace_missing_error\"),error_type:$e(\"pcb_trace_missing_error\").default(\"pcb_trace_missing_error\"),center:ki.optional(),source_trace_id:Z(),pcb_component_ids:dn(Z()),pcb_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Defines an error when a source trace has no corresponding PCB trace\"),uat=Dl.extend({type:$e(\"pcb_port_not_matched_error\"),pcb_error_id:so(\"pcb_error\"),error_type:$e(\"pcb_port_not_matched_error\").default(\"pcb_port_not_matched_error\"),pcb_component_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Defines a trace error on the PCB where a port is not matched\"),gat=Dl.extend({type:$e(\"pcb_port_not_connected_error\"),pcb_port_not_connected_error_id:so(\"pcb_port_not_connected_error\"),error_type:$e(\"pcb_port_not_connected_error\").default(\"pcb_port_not_connected_error\"),pcb_port_ids:dn(Z()),pcb_component_ids:dn(Z()),subcircuit_id:Z().optional()}).describe(\"Defines an error when a pcb port is not connected to any trace\"),dat=Pt({type:$e(\"pcb_net\"),pcb_net_id:so(\"pcb_net\"),source_net_id:Z().optional(),highlight_color:Z().optional()}).describe(\"Defines a net on the PCB\"),Sne=Pt({type:$e(\"pcb_via\"),pcb_via_id:so(\"pcb_via\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),x:lt,y:lt,outer_diameter:lt.default(\"0.6mm\"),hole_diameter:lt.default(\"0.25mm\"),from_layer:Pr.optional(),to_layer:Pr.optional(),layers:dn(Pr),pcb_trace_id:Z().optional(),source_trace_id:Z().optional(),source_net_id:Z().min(1).optional(),net_is_assignable:je().optional(),net_assigned:je().optional(),is_tented:je().optional(),tented_on_top:je().optional(),tented_on_bottom:je().optional()}).transform(({is_tented:t,...e})=\u003e(t!==void 0\u0026\u0026(e.tented_on_top??=t,e.tented_on_bottom??=t),e)).describe(\"Defines a via on the PCB\"),hat=Pt({type:$e(\"pcb_board\"),pcb_board_id:so(\"pcb_board\"),pcb_panel_id:Z().optional(),carrier_pcb_board_id:Z().optional(),is_subcircuit:je().optional(),subcircuit_id:Z().optional(),is_mounted_to_carrier_board:je().optional(),is_via_in_pad_allowed:je().optional(),width:ce.optional(),height:ce.optional(),center:ki,display_offset_x:Z().optional().describe(\"How to display the x offset for this board, usually corresponding with how the user specified it\"),display_offset_y:Z().optional().describe(\"How to display the y offset for this board, usually corresponding with how the user specified it\"),thickness:ce.optional().default(1.4),num_layers:_t().optional().default(4),allow_blind_and_buried_vias:je().optional().describe(\"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack.\"),outline:dn(ki).optional(),shape:Kn([\"rect\",\"polygon\"]).optional(),material:Kn([\"fr4\",\"fr1\"]).default(\"fr4\"),solder_mask_color:Z().optional(),silkscreen_color:Z().optional(),anchor_position:ki.optional(),anchor_alignment:Q8.optional(),position_mode:Kn([\"relative_to_panel_anchor\",\"none\"]).optional()}).merge(Fst).describe(\"Defines the board outline of the PCB\"),pat=Pt({type:$e(\"pcb_panel\"),pcb_panel_id:so(\"pcb_panel\"),width:ce,height:ce,center:ki,thickness:ce.optional().default(1.4),covered_with_solder_mask:je().optional().default(!0)}).describe(\"Defines a PCB panel that can contain multiple boards\"),mat=Dl.extend({type:$e(\"pcb_placement_error\"),pcb_placement_error_id:so(\"pcb_placement_error\"),error_type:$e(\"pcb_placement_error\").default(\"pcb_placement_error\"),subcircuit_id:Z().optional()}).describe(\"Defines a placement error on the PCB\"),_at=Dl.extend({type:$e(\"pcb_packing_error\"),pcb_packing_error_id:so(\"pcb_packing_error\"),error_type:$e(\"pcb_packing_error\").default(\"pcb_packing_error\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Defines a failure to pack PCB components within layout bounds\"),fat=Dl.extend({type:$e(\"pcb_panelization_placement_error\"),pcb_panelization_placement_error_id:so(\"pcb_panelization_placement_error\"),error_type:$e(\"pcb_panelization_placement_error\").default(\"pcb_panelization_placement_error\"),pcb_panel_id:Z().optional(),pcb_board_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Defines a panelization placement error on the PCB\"),Iat=Pt({type:$e(\"pcb_trace_hint\"),pcb_trace_hint_id:so(\"pcb_trace_hint\"),pcb_port_id:Z(),pcb_component_id:Z(),route:dn(N9),subcircuit_id:Z().optional()}).describe(\"A hint that can be used during generation of a PCB trace\"),Cat=Pt({type:$e(\"pcb_silkscreen_line\"),pcb_silkscreen_line_id:so(\"pcb_silkscreen_line\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),stroke_width:lt.default(\"0.1mm\"),x1:lt,y1:lt,x2:lt,y2:lt,layer:Km}).describe(\"Defines a silkscreen line on the PCB\"),yat=Pt({type:$e(\"pcb_silkscreen_path\"),pcb_silkscreen_path_id:so(\"pcb_silkscreen_path\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,route:dn(ki),stroke_width:ce}).describe(\"Defines a silkscreen path on the PCB\"),xat=Pt({type:$e(\"pcb_silkscreen_text\"),pcb_silkscreen_text_id:so(\"pcb_silkscreen_text\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),font:$e(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:lt.default(\"0.2mm\"),pcb_component_id:Z(),text:Z(),is_knockout:je().default(!1).optional(),knockout_padding:Pt({left:ce,top:ce,bottom:ce,right:ce}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:_t().optional(),layer:Pr,is_mirrored:je().default(!1).optional(),anchor_position:ki.default({x:0,y:0}),anchor_alignment:Q8.default(\"center\")}).describe(\"Defines silkscreen text on the PCB\"),Eat=Pt({type:$e(\"pcb_copper_text\"),pcb_copper_text_id:so(\"pcb_copper_text\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),font:$e(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:lt.default(\"0.2mm\"),pcb_component_id:Z(),text:Z(),is_knockout:je().default(!1).optional(),knockout_padding:Pt({left:ce,top:ce,bottom:ce,right:ce}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:_t().optional(),layer:Pr,is_mirrored:je().default(!1).optional(),anchor_position:ki.default({x:0,y:0}),anchor_alignment:Q8.default(\"center\")}).describe(\"Defines copper text on the PCB\"),Bat=Pt({type:$e(\"pcb_silkscreen_rect\"),pcb_silkscreen_rect_id:so(\"pcb_silkscreen_rect\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Pr,stroke_width:ce.default(\"1mm\"),corner_radius:ce.optional(),is_filled:je().default(!0).optional(),has_stroke:je().optional(),is_stroke_dashed:je().optional(),ccw_rotation:_t().optional()}).describe(\"Defines a silkscreen rect on the PCB\"),bat=Pt({type:$e(\"pcb_silkscreen_circle\"),pcb_silkscreen_circle_id:so(\"pcb_silkscreen_circle\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius:ce,layer:Km,stroke_width:ce.default(\"1mm\"),is_filled:je().optional()}).describe(\"Defines a silkscreen circle on the PCB\"),Sat=Pt({type:$e(\"pcb_silkscreen_oval\"),pcb_silkscreen_oval_id:so(\"pcb_silkscreen_oval\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius_x:lt,radius_y:lt,layer:Km,ccw_rotation:oA.optional()}).describe(\"Defines a silkscreen oval on the PCB\"),JBn=Pt({type:$e(\"pcb_silkscreen_graphic\"),pcb_silkscreen_graphic_id:so(\"pcb_silkscreen_graphic\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,image_asset:yne.optional()}),Qat=JBn.extend({shape:$e(\"brep\"),brep_shape:O2e}).describe(\"Defines a BRep silkscreen graphic on the PCB\"),vat=Iy(\"shape\",[Qat]).describe(\"Defines a silkscreen graphic on the PCB\"),wat=Pt({type:$e(\"pcb_silkscreen_pill\"),pcb_silkscreen_pill_id:so(\"pcb_silkscreen_pill\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Pr,ccw_rotation:_t().optional()}).describe(\"Defines a silkscreen pill on the PCB\"),U2e=Pt({type:$e(\"pcb_fabrication_note_text\"),pcb_fabrication_note_text_id:so(\"pcb_fabrication_note_text\"),subcircuit_id:Z().optional(),pcb_group_id:Z().optional(),font:$e(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:lt.default(\"1mm\"),pcb_component_id:Z(),text:Z(),ccw_rotation:_t().optional(),layer:Km,anchor_position:ki.default({x:0,y:0}),anchor_alignment:Kn([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),color:Z().optional()}).describe(\"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\"),K2e=Pt({type:$e(\"pcb_fabrication_note_path\"),pcb_fabrication_note_path_id:so(\"pcb_fabrication_note_path\"),pcb_component_id:Z(),subcircuit_id:Z().optional(),layer:Pr,route:dn(ki),stroke_width:ce,color:Z().optional()}).describe(\"Defines a fabrication path on the PCB for fabricators or assemblers\"),V2e=Pt({type:$e(\"pcb_fabrication_note_rect\"),pcb_fabrication_note_rect_id:so(\"pcb_fabrication_note_rect\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Km,stroke_width:ce.default(\"0.1mm\"),corner_radius:ce.optional(),is_filled:je().optional(),has_stroke:je().optional(),is_stroke_dashed:je().optional(),color:Z().optional()}).describe(\"Defines a fabrication note rectangle on the PCB\"),z2e=Pt({type:$e(\"pcb_fabrication_note_dimension\"),pcb_fabrication_note_dimension_id:so(\"pcb_fabrication_note_dimension\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,from:ki,to:ki,text:Z().optional(),text_ccw_rotation:_t().optional(),offset:ce.optional(),offset_distance:ce.optional(),offset_direction:Pt({x:_t(),y:_t()}).optional(),font:$e(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ce.default(\"1mm\"),color:Z().optional(),arrow_size:ce.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB fabrication notes\"),J2e=Pt({type:$e(\"pcb_note_text\"),pcb_note_text_id:so(\"pcb_note_text\"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),font:$e(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:lt.default(\"1mm\"),text:Z().optional(),anchor_position:ki.default({x:0,y:0}),anchor_alignment:Kn([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),layer:Km.default(\"top\"),is_mirrored_from_top_view:je().optional(),color:Z().optional()}).describe(\"Defines a documentation note in text on the PCB\"),W2e=Pt({type:$e(\"pcb_note_rect\"),pcb_note_rect_id:so(\"pcb_note_rect\"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),text:Z().optional(),center:ki,width:ce,height:ce,layer:Km.default(\"top\"),stroke_width:ce.default(\"0.1mm\"),corner_radius:ce.optional(),is_filled:je().optional(),has_stroke:je().optional(),is_stroke_dashed:je().optional(),color:Z().optional()}).describe(\"Defines a rectangular documentation note on the PCB\"),j2e=Pt({type:$e(\"pcb_note_path\"),pcb_note_path_id:so(\"pcb_note_path\"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),text:Z().optional(),route:dn(ki),layer:Km.default(\"top\"),stroke_width:ce.default(\"0.1mm\"),color:Z().optional()}).describe(\"Defines a polyline documentation note on the PCB\"),$2e=Pt({type:$e(\"pcb_note_line\"),pcb_note_line_id:so(\"pcb_note_line\"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),text:Z().optional(),x1:lt,y1:lt,x2:lt,y2:lt,layer:Km.default(\"top\"),stroke_width:lt.default(\"0.1mm\"),color:Z().optional(),is_dashed:je().optional()}).describe(\"Defines a straight documentation note line on the PCB\"),q2e=Pt({type:$e(\"pcb_note_dimension\"),pcb_note_dimension_id:so(\"pcb_note_dimension\"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),from:ki,to:ki,text:Z().optional(),text_ccw_rotation:_t().optional(),offset_distance:ce.optional(),offset_direction:Pt({x:_t(),y:_t()}).optional(),font:$e(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ce.default(\"1mm\"),layer:Km.default(\"top\"),color:Z().optional(),arrow_size:ce.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB documentation notes\"),Pat=Dl.extend({type:$e(\"pcb_footprint_overlap_error\"),pcb_error_id:so(\"pcb_error\"),error_type:$e(\"pcb_footprint_overlap_error\").default(\"pcb_footprint_overlap_error\"),pcb_smtpad_ids:dn(Z()).optional(),pcb_plated_hole_ids:dn(Z()).optional(),pcb_hole_ids:dn(Z()).optional(),pcb_keepout_ids:dn(Z()).optional()}).describe(\"Error emitted when a pcb footprint overlaps with another element\"),Mat=Dl.extend({type:$e(\"pcb_courtyard_overlap_error\"),pcb_error_id:so(\"pcb_error\"),error_type:$e(\"pcb_courtyard_overlap_error\").default(\"pcb_courtyard_overlap_error\"),pcb_component_ids:fQ([Z(),Z()])}).describe(\"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another\"),Dat=Pt({type:$e(\"pcb_keepout\"),shape:$e(\"outline\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),outline:dn(ki).min(2),stroke_width:ce,pcb_keepout_id:Z(),layers:dn(Z()),description:Z().optional(),excluded_pcb_component_ids:dn(Z()).optional()}),X2e=Pt({type:$e(\"pcb_keepout\"),shape:$e(\"rect\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:lt,height:lt,pcb_keepout_id:Z(),layers:dn(Z()),description:Z().optional(),excluded_pcb_component_ids:dn(Z()).optional()}).or(Pt({type:$e(\"pcb_keepout\"),shape:$e(\"circle\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius:lt,pcb_keepout_id:Z(),layers:dn(Z()),description:Z().optional(),excluded_pcb_component_ids:dn(Z()).optional()})).or(Dat),Qne=Pt({type:$e(\"pcb_cutout\"),pcb_cutout_id:so(\"pcb_cutout\"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_board_id:Z().optional(),pcb_panel_id:Z().optional()}),Nat=Qne.extend({shape:$e(\"rect\"),center:ki,width:ce,height:ce,rotation:oA.optional(),corner_radius:ce.optional()}),Rat=Qne.extend({shape:$e(\"circle\"),center:ki,radius:ce}),Tat=Qne.extend({shape:$e(\"polygon\"),points:dn(ki)}),kat=Qne.extend({shape:$e(\"path\"),route:dn(ki),slot_width:ce,slot_length:ce.optional(),space_between_slots:ce.optional(),slot_corner_radius:ce.optional()}),Z2e=Iy(\"shape\",[Nat,Rat,Tat,kat]).describe(\"Defines a cutout on the PCB, removing board material.\"),Fat=Dl.extend({type:$e(\"pcb_missing_footprint_error\"),pcb_missing_footprint_error_id:so(\"pcb_missing_footprint_error\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),error_type:$e(\"pcb_missing_footprint_error\").default(\"pcb_missing_footprint_error\"),source_component_id:Z()}).describe(\"Defines a missing footprint error on the PCB\"),mV=Dl.extend({type:$e(\"external_footprint_load_error\"),external_footprint_load_error_id:so(\"external_footprint_load_error\"),pcb_component_id:Z(),source_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),footprinter_string:Z().optional(),error_type:$e(\"external_footprint_load_error\").default(\"external_footprint_load_error\")}).describe(\"Defines an error when an external footprint fails to load\"),exe=Dl.extend({type:$e(\"circuit_json_footprint_load_error\"),circuit_json_footprint_load_error_id:so(\"circuit_json_footprint_load_error\"),pcb_component_id:Z(),source_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),error_type:$e(\"circuit_json_footprint_load_error\").default(\"circuit_json_footprint_load_error\"),circuit_json:dn(rd()).optional()}).describe(\"Defines an error when a circuit JSON footprint fails to load\"),Lat=Pt({type:$e(\"pcb_group\"),pcb_group_id:so(\"pcb_group\"),source_group_id:Z(),is_subcircuit:je().optional(),subcircuit_id:Z().optional(),width:ce.optional(),height:ce.optional(),center:ki,display_offset_x:Z().optional().describe(\"How to display the x offset for this group, usually corresponding with how the user specified it\"),display_offset_y:Z().optional().describe(\"How to display the y offset for this group, usually corresponding with how the user specified it\"),outline:dn(ki).optional(),anchor_position:ki.optional(),anchor_alignment:Q8.default(\"center\"),position_mode:Kn([\"packed\",\"relative_to_group_anchor\",\"none\"]).optional(),positioned_relative_to_pcb_group_id:Z().optional(),positioned_relative_to_pcb_board_id:Z().optional(),pcb_component_ids:dn(Z()),child_layout_mode:Kn([\"packed\",\"none\"]).optional(),name:Z().optional(),description:Z().optional(),layout_mode:Z().optional(),autorouter_configuration:Pt({trace_clearance:ce}).optional(),autorouter_used_string:Z().optional()}).describe(\"Defines a group of components on the PCB\"),Hat=Dl.extend({type:$e(\"pcb_autorouting_error\"),pcb_error_id:so(\"pcb_autorouting_error\"),error_type:$e(\"pcb_autorouting_error\").default(\"pcb_autorouting_error\"),subcircuit_id:Z().optional()}).describe(\"The autorouting has failed to route a portion of the board\"),txe=Pt({type:$e(\"pcb_manual_edit_conflict_warning\"),pcb_manual_edit_conflict_warning_id:so(\"pcb_manual_edit_conflict_warning\"),warning_type:$e(\"pcb_manual_edit_conflict_warning\").default(\"pcb_manual_edit_conflict_warning\"),message:Z(),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),source_component_id:Z()}).describe(\"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\"),Oat=Kn([\"x-\",\"x+\",\"y+\",\"y-\"]),Gat=Pt({type:$e(\"pcb_connector_not_in_accessible_orientation_warning\"),pcb_connector_not_in_accessible_orientation_warning_id:so(\"pcb_connector_not_in_accessible_orientation_warning\"),warning_type:$e(\"pcb_connector_not_in_accessible_orientation_warning\").default(\"pcb_connector_not_in_accessible_orientation_warning\"),message:Z(),pcb_component_id:Z(),source_component_id:Z().optional(),pcb_board_id:Z().optional(),facing_direction:Oat,recommended_facing_direction:Oat,subcircuit_id:Z().optional()}).describe(\"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction\"),Yat=Pt({type:$e(\"pcb_component_missing_courtyard_warning\"),pcb_component_missing_courtyard_warning_id:so(\"pcb_component_missing_courtyard_warning\"),warning_type:$e(\"pcb_component_missing_courtyard_warning\").default(\"pcb_component_missing_courtyard_warning\"),message:Z(),pcb_component_id:Z(),source_component_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Warning emitted when a PCB component has no courtyard geometry\"),nxe=Pt({type:$e(\"supplier_footprint_mismatch_warning\"),supplier_footprint_mismatch_warning_id:so(\"supplier_footprint_mismatch_warning\"),warning_type:$e(\"supplier_footprint_mismatch_warning\").default(\"supplier_footprint_mismatch_warning\"),message:Z(),source_component_id:Z(),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),supplier_name:qM.optional(),supplier_part_number:Z().optional(),supplier_footprint_url:Z().optional(),footprint_copper_intersection_over_union:_t()}).describe(\"Warning emitted when a supplier part footprint does not match the expected footprint\"),Uat=Pt({type:$e(\"pcb_fabricator_extra_charge_warning\"),pcb_fabricator_extra_charge_warning_id:so(\"pcb_fabricator_extra_charge_warning\"),warning_type:$e(\"pcb_fabricator_extra_charge_warning\").default(\"pcb_fabricator_extra_charge_warning\"),message:Z(),fabricator_preset:Z(),pcb_board_id:Z().optional(),pcb_via_ids:dn(Z()).optional(),subcircuit_id:Z().optional()}).describe(\"Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets.\"),Kat=Pt({type:$e(\"pcb_breakout_point\"),pcb_breakout_point_id:so(\"pcb_breakout_point\"),pcb_group_id:Z(),subcircuit_id:Z().optional(),source_trace_id:Z().optional(),source_port_id:Z().optional(),source_net_id:Z().optional(),layer:Pr.optional(),x:lt,y:lt}).describe(\"Defines a routing target within a pcb_group for a source_trace or source_net\"),Vat=Pt({type:$e(\"pcb_ground_plane\"),pcb_ground_plane_id:so(\"pcb_ground_plane\"),source_pcb_ground_plane_id:Z(),source_net_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Defines a ground plane on the PCB\"),zat=Pt({type:$e(\"pcb_ground_plane_region\"),pcb_ground_plane_region_id:so(\"pcb_ground_plane_region\"),pcb_ground_plane_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Pr,points:dn(ki)}).describe(\"Defines a polygon region of a ground plane\"),Jat=Pt({type:$e(\"pcb_thermal_spoke\"),pcb_thermal_spoke_id:so(\"pcb_thermal_spoke\"),pcb_ground_plane_id:Z(),shape:Z(),spoke_count:_t(),spoke_thickness:lt,spoke_inner_diameter:lt,spoke_outer_diameter:lt,pcb_plated_hole_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Pattern for connecting a ground plane to a plated hole\"),oxe=Pt({type:$e(\"pcb_copper_pour\"),pcb_copper_pour_id:so(\"pcb_copper_pour\"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Pr,source_net_id:Z().optional(),covered_with_solder_mask:je().optional().default(!0)}),Wat=oxe.extend({shape:$e(\"rect\"),center:ki,width:ce,height:ce,rotation:oA.optional()}),jat=oxe.extend({shape:$e(\"brep\"),brep_shape:O2e}),$at=oxe.extend({shape:$e(\"polygon\"),points:dn(ki)}),ixe=Iy(\"shape\",[Wat,jat,$at]).describe(\"Defines a copper pour on the PCB.\"),qat=Dl.extend({type:$e(\"pcb_component_outside_board_error\"),pcb_component_outside_board_error_id:so(\"pcb_component_outside_board_error\"),error_type:$e(\"pcb_component_outside_board_error\").default(\"pcb_component_outside_board_error\"),pcb_component_id:Z(),pcb_board_id:Z(),component_center:ki,component_bounds:Pt({min_x:_t(),max_x:_t(),min_y:_t(),max_y:_t()}),subcircuit_id:Z().optional(),source_component_id:Z().optional()}).describe(\"Error emitted when a PCB component is placed outside the board boundaries\"),Xat=Dl.extend({type:$e(\"pcb_component_not_on_board_edge_error\"),pcb_component_not_on_board_edge_error_id:so(\"pcb_component_not_on_board_edge_error\"),error_type:$e(\"pcb_component_not_on_board_edge_error\").default(\"pcb_component_not_on_board_edge_error\"),pcb_component_id:Z(),pcb_board_id:Z(),component_center:ki,pad_to_nearest_board_edge_distance:_t(),source_component_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"Error emitted when a component that must be placed on the board edge is centered away from the edge\"),vne=Dl.extend({type:$e(\"pcb_component_invalid_layer_error\"),pcb_component_invalid_layer_error_id:so(\"pcb_component_invalid_layer_error\"),error_type:$e(\"pcb_component_invalid_layer_error\").default(\"pcb_component_invalid_layer_error\"),pcb_component_id:Z().optional(),source_component_id:Z(),layer:Pr,subcircuit_id:Z().optional()}).describe(\"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)\"),Zat=Dl.extend({type:$e(\"pcb_via_clearance_error\"),pcb_error_id:so(\"pcb_error\"),error_type:$e(\"pcb_via_clearance_error\").default(\"pcb_via_clearance_error\"),pcb_via_ids:dn(Z()).min(2),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),pcb_center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe(\"Error emitted when vias are closer than the allowed clearance\"),eAt=Dl.extend({type:$e(\"pcb_via_trace_clearance_error\"),pcb_via_trace_clearance_error_id:so(\"pcb_via_trace_clearance_error\"),error_type:$e(\"pcb_via_trace_clearance_error\").default(\"pcb_via_trace_clearance_error\"),pcb_via_id:Z(),pcb_trace_id:Z(),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe(\"Error emitted when a via and trace are closer than the allowed clearance\"),tAt=Dl.extend({type:$e(\"pcb_pad_pad_clearance_error\"),pcb_pad_pad_clearance_error_id:so(\"pcb_pad_pad_clearance_error\"),error_type:$e(\"pcb_pad_pad_clearance_error\").default(\"pcb_pad_pad_clearance_error\"),pcb_pad_ids:dn(Z()).min(2),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe(\"Error emitted when pads are closer than the allowed clearance\"),nAt=Dl.extend({type:$e(\"pcb_pad_trace_clearance_error\"),pcb_pad_trace_clearance_error_id:so(\"pcb_pad_trace_clearance_error\"),error_type:$e(\"pcb_pad_trace_clearance_error\").default(\"pcb_pad_trace_clearance_error\"),pcb_pad_id:Z(),pcb_trace_id:Z(),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe(\"Error emitted when a pad and trace are closer than allowed clearance\"),rxe=Pt({type:$e(\"pcb_courtyard_rect\"),pcb_courtyard_rect_id:so(\"pcb_courtyard_rect\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Km,ccw_rotation:oA.optional(),color:Z().optional()}).describe(\"Defines a courtyard rectangle on the PCB\"),sxe=Pt({type:$e(\"pcb_courtyard_outline\"),pcb_courtyard_outline_id:so(\"pcb_courtyard_outline\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,outline:dn(ki).min(2)}).describe(\"Defines a courtyard outline on the PCB\"),axe=Pt({type:$e(\"pcb_courtyard_polygon\"),pcb_courtyard_polygon_id:so(\"pcb_courtyard_polygon\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,points:dn(ki).min(3),color:Z().optional()}).describe(\"Defines a courtyard polygon on the PCB\"),Axe=Pt({type:$e(\"pcb_courtyard_circle\"),pcb_courtyard_circle_id:so(\"pcb_courtyard_circle\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius:ce,layer:Km,color:Z().optional()}).describe(\"Defines a courtyard circle on the PCB\"),cxe=Pt({type:$e(\"pcb_courtyard_pill\"),pcb_courtyard_pill_id:so(\"pcb_courtyard_pill\"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,radius:ce,layer:Km,color:Z().optional()}).describe(\"Defines a courtyard pill on the PCB\"),WBn=[\"obj\",\"stl\",\"3mf\",\"gltf\",\"glb\",\"step\",\"wrl\"],oAt=[\"x+\",\"x-\",\"y+\",\"y-\",\"z+\",\"z-\"],jBn={obj:\"z+\",stl:\"z+\",\"3mf\":\"z+\",gltf:\"y+\",glb:\"y+\",step:\"z+\",wrl:\"y+\"},iAt=Pt({type:$e(\"cad_component\"),cad_component_id:Z(),pcb_component_id:Z(),source_component_id:Z(),position:D9,rotation:D9.optional(),size:D9.optional(),layer:Pr.optional(),subcircuit_id:Z().optional(),footprinter_string:Z().optional(),model_obj_url:Z().optional(),model_stl_url:Z().optional(),model_3mf_url:Z().optional(),model_gltf_url:Z().optional(),model_glb_url:Z().optional(),model_step_url:Z().optional(),model_wrl_url:Z().optional(),model_asset:yne.optional(),model_unit_to_mm_scale_factor:_t().optional(),model_board_normal_direction:Kn(oAt).optional().describe(`The direction in the model's coordinate space that is considered \"up\" or \"coming out of the board surface\"`),model_origin_position:D9.optional(),model_origin_alignment:Kn([\"unknown\",\"center\",\"center_of_component_on_board_surface\",\"bottom_center_of_component\"]).optional(),model_object_fit:Kn([\"contain_within_bounds\",\"fill_bounds\"]).optional().default(\"contain_within_bounds\"),model_jscad:rd().optional(),show_as_translucent_model:je().optional(),show_as_bounding_box:je().optional(),show_hidden_edges:je().optional(),anchor_alignment:Kn([\"center\",\"center_of_component_on_board_surface\"]).optional().default(\"center\")}).describe(\"Defines a component on the PCB\"),lxe=Kn([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]),$Bn=xo([Z(),_t()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),rAt=Pt({type:$e(\"simulation_voltage_source\"),simulation_voltage_source_id:so(\"simulation_voltage_source\"),is_dc_source:$e(!0).optional().default(!0),positive_source_port_id:Z().optional(),negative_source_port_id:Z().optional(),positive_source_net_id:Z().optional(),negative_source_net_id:Z().optional(),voltage:O_,ac_magnitude:O_.optional(),ac_phase:oA.optional()}).describe(\"Defines a DC voltage source for simulation\"),sAt=Pt({type:$e(\"simulation_voltage_source\"),simulation_voltage_source_id:so(\"simulation_voltage_source\"),is_dc_source:$e(!1),terminal1_source_port_id:Z().optional(),terminal2_source_port_id:Z().optional(),terminal1_source_net_id:Z().optional(),terminal2_source_net_id:Z().optional(),voltage:O_.optional(),frequency:Cy.optional(),peak_to_peak_voltage:O_.optional(),wave_shape:lxe.optional(),phase:oA.optional(),duty_cycle:$Bn.optional(),pulse_delay:Ml.optional(),rise_time:Ml.optional(),fall_time:Ml.optional(),pulse_width:Ml.optional(),period:Ml.optional(),ac_magnitude:O_.optional(),ac_phase:oA.optional()}).describe(\"Defines an AC voltage source for simulation\"),aAt=xo([rAt,sAt]).describe(\"Defines a voltage source for simulation\"),qBn=xo([Z(),_t()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),AAt=Pt({type:$e(\"simulation_current_source\"),simulation_current_source_id:so(\"simulation_current_source\"),is_dc_source:$e(!0).optional().default(!0),positive_source_port_id:Z().optional(),negative_source_port_id:Z().optional(),positive_source_net_id:Z().optional(),negative_source_net_id:Z().optional(),current:H3,ac_magnitude:H3.optional(),ac_phase:oA.optional()}).describe(\"Defines a DC current source for simulation\"),cAt=Pt({type:$e(\"simulation_current_source\"),simulation_current_source_id:so(\"simulation_current_source\"),is_dc_source:$e(!1),terminal1_source_port_id:Z().optional(),terminal2_source_port_id:Z().optional(),terminal1_source_net_id:Z().optional(),terminal2_source_net_id:Z().optional(),current:H3.optional(),frequency:Cy.optional(),peak_to_peak_current:H3.optional(),wave_shape:lxe.optional(),phase:oA.optional(),duty_cycle:qBn.optional(),ac_magnitude:H3.optional(),ac_phase:oA.optional()}).describe(\"Defines an AC current source for simulation\"),lAt=xo([AAt,cAt]).describe(\"Defines a current source for simulation\"),wne=P0(t=\u003et===\"V\"||t===\"A\"),uxe=P0(t=\u003et===\"Ω\"||t===\"F\"||t===\"H\"||t===\"V\"||t===\"A\"),uAt=xo([$e(\"spice_dc_sweep\"),$e(\"spice_dc_operating_point\"),$e(\"spice_transient_analysis\"),$e(\"spice_ac_analysis\")]),gAt=Pt({method:Kn([\"trap\",\"gear\"]).optional(),reltol:xo([_t(),Z()]).optional(),abstol:xo([_t(),Z()]).optional(),vntol:xo([_t(),Z()]).optional()}).describe(\"SPICE solver options for a simulation experiment\"),dAt=Pt({type:$e(\"simulation_experiment\"),simulation_experiment_id:so(\"simulation_experiment\"),name:Z(),experiment_type:uAt,time_per_step:Uk.optional(),start_time_ms:Ml.optional(),end_time_ms:Ml.optional(),spice_options:gAt.optional(),dc_sweep_voltage_source_id:Z().optional(),dc_sweep_current_source_id:Z().optional(),dc_sweep_start:_t().optional(),dc_sweep_stop:_t().optional(),dc_sweep_step:_t().refine(t=\u003et!==0).optional(),dc_sweep_unit:wne.optional(),ac_sweep_type:Kn([\"linear\",\"decade\",\"octave\"]).optional(),ac_samples_per_interval:_t().int().positive().optional(),ac_sample_count:_t().int().positive().optional(),ac_start_frequency_hz:_t().positive().optional(),ac_stop_frequency_hz:_t().positive().optional()}).superRefine((t,e)=\u003e{if(t.experiment_type===\"spice_dc_sweep\"){const n=[\"dc_sweep_start\",\"dc_sweep_stop\",\"dc_sweep_step\",\"dc_sweep_unit\"];for(const r of n)t[r]===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[r],message:`${r} is required for a DC sweep`});const o=t.dc_sweep_voltage_source_id!==void 0,i=t.dc_sweep_current_source_id!==void 0;o===i\u0026\u0026e.addIssue({code:lo.custom,path:[\"dc_sweep_voltage_source_id\"],message:\"Exactly one DC sweep voltage or current source ID is required\"})}t.experiment_type===\"spice_ac_analysis\"\u0026\u0026(t.ac_sweep_type===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"ac_sweep_type\"],message:\"ac_sweep_type is required for an AC analysis\"}),t.ac_start_frequency_hz===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"ac_start_frequency_hz\"],message:\"ac_start_frequency_hz is required for an AC analysis\"}),t.ac_stop_frequency_hz===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"ac_stop_frequency_hz\"],message:\"ac_stop_frequency_hz is required for an AC analysis\"}),t.ac_sweep_type===\"linear\"\u0026\u0026t.ac_sample_count===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"ac_sample_count\"],message:\"ac_sample_count is required for a linear AC analysis\"}),(t.ac_sweep_type===\"decade\"||t.ac_sweep_type===\"octave\")\u0026\u0026t.ac_samples_per_interval===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"ac_samples_per_interval\"],message:\"ac_samples_per_interval is required for decade and octave AC analyses\"}))}).describe(\"Defines a simulation experiment configuration\"),v8=Pt({simulation_parameter_sweep_id:Z(),sweep_index:_t().int().nonnegative(),parameter_value:_t(),parameter_unit:uxe}),hAt=Pt({type:$e(\"simulation_transient_voltage_graph\"),simulation_transient_voltage_graph_id:so(\"simulation_transient_voltage_graph\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),timestamps_ms:dn(_t()).optional(),voltage_levels:dn(_t()),source_component_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),time_per_step:Uk,start_time_ms:Ml,end_time_ms:Ml,name:Z().optional(),color:Z().optional()}).describe(\"Stores voltage measurements over time for a simulation\"),pAt=Pt({type:$e(\"simulation_transient_current_graph\"),simulation_transient_current_graph_id:so(\"simulation_transient_current_graph\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),timestamps_ms:dn(_t()).optional(),current_levels:dn(_t()),source_component_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),time_per_step:Uk,start_time_ms:Ml,end_time_ms:Ml,name:Z().optional(),color:Z().optional()}).describe(\"Stores current measurements over time for a simulation\"),mAt=Pt({type:$e(\"simulation_switch\"),simulation_switch_id:so(\"simulation_switch\"),source_component_id:Z().optional(),closes_at:Ml.optional(),opens_at:Ml.optional(),starts_closed:je().optional(),switching_frequency:Cy.optional()}).describe(\"Defines a switch for simulation timing control\"),_At=Pt({type:$e(\"simulation_voltage_probe\"),simulation_voltage_probe_id:so(\"simulation_voltage_probe\"),source_component_id:Z().optional(),name:Z().optional(),signal_input_source_port_id:Z().optional(),signal_input_source_net_id:Z().optional(),reference_input_source_port_id:Z().optional(),reference_input_source_net_id:Z().optional(),subcircuit_id:Z().optional(),color:Z().optional()}).describe(\"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.\").superRefine((t,e)=\u003e{if(t.reference_input_source_port_id||t.reference_input_source_net_id){const o=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,i=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;o\u0026\u0026i?e.addIssue({code:lo.custom,message:\"Cannot mix port and net connections in a differential probe.\"}):o?(!t.signal_input_source_port_id||!t.reference_input_source_port_id)\u0026\u0026e.addIssue({code:lo.custom,message:\"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id.\"}):i\u0026\u0026(!t.signal_input_source_net_id||!t.reference_input_source_net_id)\u0026\u0026e.addIssue({code:lo.custom,message:\"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id.\"})}else!!t.signal_input_source_port_id==!!t.signal_input_source_net_id\u0026\u0026e.addIssue({code:lo.custom,message:\"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id.\"})}),fAt=Pt({type:$e(\"simulation_current_probe\"),simulation_current_probe_id:so(\"simulation_current_probe\"),source_component_id:Z().optional(),name:Z().optional(),positive_source_port_id:Z().optional(),negative_source_port_id:Z().optional(),positive_source_net_id:Z().optional(),negative_source_net_id:Z().optional(),subcircuit_id:Z().optional(),color:Z().optional()}).describe(\"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint.\").superRefine((t,e)=\u003e{const n=!!t.positive_source_port_id,o=!!t.negative_source_port_id,i=!!t.positive_source_net_id,r=!!t.negative_source_net_id,s=n||o,a=i||r;if(s\u0026\u0026a){e.addIssue({code:lo.custom,message:\"Cannot mix port and net connections in a current probe.\"});return}if(s){(!n||!o)\u0026\u0026e.addIssue({code:lo.custom,message:\"Current probe using source ports requires both positive_source_port_id and negative_source_port_id.\"});return}if(a){(!i||!r)\u0026\u0026e.addIssue({code:lo.custom,message:\"Current probe using source nets requires both positive_source_net_id and negative_source_net_id.\"});return}e.addIssue({code:lo.custom,message:\"A current probe must have either positive/negative source port ids or positive/negative source net ids.\"})}),IAt=Dl.extend({type:$e(\"simulation_unknown_experiment_error\"),simulation_unknown_experiment_error_id:so(\"simulation_unknown_experiment_error\"),error_type:$e(\"simulation_unknown_experiment_error\").default(\"simulation_unknown_experiment_error\"),simulation_experiment_id:Z().optional(),subcircuit_id:Z().optional()}).describe(\"An unknown error occurred during the simulation experiment.\"),XBn=Kn([\"resistance\",\"capacitance\",\"inductance\",\"voltage\",\"current\"]),_V=Pt({type:$e(\"simulation_parameter_sweep\"),simulation_parameter_sweep_id:so(\"simulation_parameter_sweep\"),simulation_experiment_id:Z(),name:Z().optional(),parameter_values:dn(_t()).min(1),parameter_unit:uxe}),CAt=Iy(\"parameter_type\",[_V.extend({parameter_type:$e(\"resistance\"),resistor_source_component_id:Z()}),_V.extend({parameter_type:$e(\"capacitance\"),capacitor_source_component_id:Z()}),_V.extend({parameter_type:$e(\"inductance\"),inductor_source_component_id:Z()}),_V.extend({parameter_type:$e(\"voltage\"),source_net_id:Z()}),_V.extend({parameter_type:$e(\"current\"),current_source_component_id:Z()})]).describe(\"Repeats a simulation experiment over component parameter values\"),yAt=Pt({type:$e(\"simulation_dc_operating_point_voltage\"),simulation_dc_operating_point_voltage_id:so(\"simulation_dc_operating_point_voltage\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_voltage_probe_id:Z(),voltage:_t(),name:Z().optional(),color:Z().optional()}),xAt=Pt({type:$e(\"simulation_dc_operating_point_current\"),simulation_dc_operating_point_current_id:so(\"simulation_dc_operating_point_current\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_current_probe_id:Z(),current:_t(),name:Z().optional(),color:Z().optional()}),EAt=Pt({type:$e(\"simulation_dc_sweep_voltage_graph\"),simulation_dc_sweep_voltage_graph_id:so(\"simulation_dc_sweep_voltage_graph\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_voltage_probe_id:Z(),sweep_values:dn(_t()),sweep_unit:wne,voltage_levels:dn(_t()),name:Z().optional(),color:Z().optional()}).refine(t=\u003et.sweep_values.length===t.voltage_levels.length,{message:\"sweep_values and voltage_levels must have the same length\"}),BAt=Pt({type:$e(\"simulation_dc_sweep_current_graph\"),simulation_dc_sweep_current_graph_id:so(\"simulation_dc_sweep_current_graph\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_current_probe_id:Z(),sweep_values:dn(_t()),sweep_unit:wne,current_levels:dn(_t()),name:Z().optional(),color:Z().optional()}).refine(t=\u003et.sweep_values.length===t.current_levels.length,{message:\"sweep_values and current_levels must have the same length\"}),gxe=Pt({re:_t(),im:_t()}),bAt=Pt({type:$e(\"simulation_ac_sweep_voltage_graph\"),simulation_ac_sweep_voltage_graph_id:so(\"simulation_ac_sweep_voltage_graph\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_voltage_probe_id:Z(),frequencies_hz:dn(_t()),complex_voltages:dn(gxe),name:Z().optional(),color:Z().optional()}).refine(t=\u003et.frequencies_hz.length===t.complex_voltages.length,{message:\"frequencies_hz and complex_voltages must have the same length\"}),SAt=Pt({type:$e(\"simulation_ac_sweep_current_graph\"),simulation_ac_sweep_current_graph_id:so(\"simulation_ac_sweep_current_graph\"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_current_probe_id:Z(),frequencies_hz:dn(_t()),complex_currents:dn(gxe),name:Z().optional(),color:Z().optional()}).refine(t=\u003et.frequencies_hz.length===t.complex_currents.length,{message:\"frequencies_hz and complex_currents must have the same length\"}),QAt=Pt({type:$e(\"simulation_op_amp\"),simulation_op_amp_id:so(\"simulation_op_amp\"),source_component_id:Z().optional(),inverting_input_source_port_id:Z(),non_inverting_input_source_port_id:Z(),output_source_port_id:Z(),positive_supply_source_port_id:Z(),negative_supply_source_port_id:Z()}).describe(\"Defines a simple ideal operational amplifier for simulation\"),vAt=Pt({type:$e(\"simulation_spice_subcircuit\"),simulation_spice_subcircuit_id:so(\"simulation_spice_subcircuit\"),source_component_id:Z(),spice_pin_to_source_port_map:Qc(Z(),Z()),subcircuit_source:Z()}).describe(\"Defines a custom SPICE subcircuit model for simulation\"),wAt=t=\u003et!==void 0,PAt=Pt({type:$e(\"simulation_oscilloscope_trace\"),simulation_oscilloscope_trace_id:so(\"simulation_oscilloscope_trace\"),simulation_transient_voltage_graph_id:Z().optional(),simulation_transient_current_graph_id:Z().optional(),simulation_voltage_probe_id:Z().optional(),simulation_current_probe_id:Z().optional(),display_name:Z().optional(),color:Z().optional(),display_center_value:_t().optional(),display_center_offset_divs:_t().optional(),volts_per_div:_t().positive().optional(),amps_per_div:_t().positive().optional()}).describe(\"Defines how a simulation measurement is rendered as an oscilloscope-style trace.\").superRefine((t,e)=\u003e{const n=[t.simulation_transient_voltage_graph_id,t.simulation_voltage_probe_id].filter(wAt).length,o=[t.simulation_transient_current_graph_id,t.simulation_current_probe_id].filter(wAt).length;n+o!==1\u0026\u0026e.addIssue({code:lo.custom,message:\"An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe.\"}),n\u003e0\u0026\u0026t.amps_per_div!==void 0\u0026\u0026e.addIssue({code:lo.custom,message:\"Voltage oscilloscope traces must use volts_per_div, not amps_per_div.\"}),o\u003e0\u0026\u0026t.volts_per_div!==void 0\u0026\u0026e.addIssue({code:lo.custom,message:\"Current oscilloscope traces must use amps_per_div, not volts_per_div.\"})}),dxe=xo([Grt,Hrt,Ort,Lrt,Urt,Yrt,h2e,u2e,Ene,d2e,g2e,p2e,m2e,_2e,C2e,y2e,x2e,Q2e,E2e,B2e,b2e,S2e,I2e,f2e,zrt,Jrt,Krt,v2e,w2e,P2e,M2e,Wrt,est,D2e,N2e,jrt,$rt,qrt,Xrt,Zrt,hV,R2e,dV,Vrt,Lst,Yst,jst,Fat,mV,exe,txe,Gat,Yat,nxe,Uat,$st,X2e,qst,dat,tat,rat,sat,aat,Aat,Sne,Zst,eat,hat,pat,Lat,Iat,Cat,yat,xat,wat,Eat,Bat,bat,Sat,vat,cat,lat,mat,_at,fat,uat,gat,Zat,eAt,tAt,nAt,K2e,U2e,V2e,z2e,J2e,W2e,j2e,$2e,q2e,Hat,Pat,Mat,Kat,Z2e,Vat,zat,Jat,ixe,qat,Xat,vne,rxe,sxe,axe,Axe,cxe,tst,hst,cst,lst,ust,gst,ast,Ast,pst,dst,nst,_st,fst,mst,xst,Est,F2e,Bst,bst,Nst,Sst,vst,wst,Dst,Pst,Mst,iAt,aAt,lAt,dAt,hAt,pAt,yAt,xAt,EAt,BAt,bAt,SAt,CAt,mAt,_At,fAt,PAt,IAt,QAt,vAt]),U4=dxe;const R9=Object.freeze(Object.defineProperty({__proto__:null,all_layers:Kk,any_circuit_element:dxe,any_soup_element:U4,any_source_component:Lrt,asset:yne,base_circuit_json_error:Dl,battery_capacity:urt,brep_shape:O2e,cadModelDefaultDirectionMap:jBn,cad_component:iAt,cad_model_axis_directions:oAt,cad_model_formats:WBn,capacitance:$M,circuit_json_footprint_load_error:exe,current:H3,distance:lt,duration_ms:Uk,experiment_type:uAt,external_footprint_load_error:mV,frequency:Cy,getRotationBetweenPcbPin1Locations:xBn,getZodPrefixedIdWithDefault:so,inductance:Ine,insertionDirectionToCanonical:G2e,insertionDirectionToVector:CBn,insertion_direction:Tst,kicadAt:xne,kicadEffects:grt,kicadFont:l2e,kicadFootprintAttributes:hrt,kicadFootprintMetadata:_rt,kicadFootprintModel:mrt,kicadFootprintPad:prt,kicadFootprintProperties:drt,kicadProperty:gV,kicadSymbolEffects:Crt,kicadSymbolMetadata:xrt,kicadSymbolPinNames:Irt,kicadSymbolPinNumbers:frt,kicadSymbolProperties:yrt,kicadSymbolProperty:yQ,layer_ref:Pr,layer_string:T2e,length:ce,manufacturing_drc_properties:Fst,ms:Ml,ninePointAnchor:Q8,parseAndConvertSiUnit:q1,pcbRenderLayer:_Bn,pcb_autorouting_error:Hat,pcb_board:hat,pcb_breakout_point:Kat,pcb_component:Lst,pcb_component_invalid_layer_error:vne,pcb_component_missing_courtyard_warning:Yat,pcb_component_not_on_board_edge_error:Xat,pcb_component_outside_board_error:qat,pcb_connector_not_in_accessible_orientation_warning:Gat,pcb_copper_pour:ixe,pcb_copper_pour_brep:jat,pcb_copper_pour_polygon:$at,pcb_copper_pour_rect:Wat,pcb_copper_text:Eat,pcb_courtyard_circle:Axe,pcb_courtyard_outline:sxe,pcb_courtyard_overlap_error:Mat,pcb_courtyard_pill:cxe,pcb_courtyard_polygon:axe,pcb_courtyard_rect:rxe,pcb_cutout:Z2e,pcb_cutout_circle:Rat,pcb_cutout_path:kat,pcb_cutout_polygon:Tat,pcb_cutout_rect:Nat,pcb_debug_line:Ost,pcb_debug_object:Yst,pcb_debug_object_base:bne,pcb_debug_point:Gst,pcb_debug_rect:Hst,pcb_fabrication_note_dimension:z2e,pcb_fabrication_note_path:K2e,pcb_fabrication_note_rect:V2e,pcb_fabrication_note_text:U2e,pcb_fabricator_extra_charge_warning:Uat,pcb_footprint_overlap_error:Pat,pcb_ground_plane:Vat,pcb_ground_plane_region:zat,pcb_group:Lat,pcb_hole:jst,pcb_hole_circle_or_square_shape:SBn,pcb_hole_circle_shape:BBn,pcb_hole_oval_shape:QBn,pcb_hole_pill_shape:vBn,pcb_hole_rect_shape:bBn,pcb_hole_rotated_pill_shape:wBn,pcb_keepout:X2e,pcb_keepout_outline:Dat,pcb_manual_edit_conflict_warning:txe,pcb_missing_footprint_error:Fat,pcb_net:dat,pcb_note_dimension:q2e,pcb_note_line:$2e,pcb_note_path:j2e,pcb_note_rect:W2e,pcb_note_text:J2e,pcb_packing_error:_at,pcb_pad_pad_clearance_error:tAt,pcb_pad_trace_clearance_error:nAt,pcb_panel:pat,pcb_panelization_placement_error:fat,pcb_pin1_location:pV,pcb_placement_error:mat,pcb_plated_hole:$st,pcb_port:qst,pcb_port_not_connected_error:gat,pcb_port_not_matched_error:uat,pcb_route_hint:kst,pcb_route_hints:EBn,pcb_silkscreen_circle:bat,pcb_silkscreen_graphic:vat,pcb_silkscreen_graphic_brep:Qat,pcb_silkscreen_line:Cat,pcb_silkscreen_oval:Sat,pcb_silkscreen_path:yat,pcb_silkscreen_pill:wat,pcb_silkscreen_rect:Bat,pcb_silkscreen_text:xat,pcb_smtpad:Zst,pcb_smtpad_pill:Xst,pcb_solder_paste:eat,pcb_text:tat,pcb_thermal_spoke:Jat,pcb_trace:rat,pcb_trace_error:cat,pcb_trace_hint:Iat,pcb_trace_missing_error:lat,pcb_trace_route_point:Y2e,pcb_trace_route_point_through_pad:iat,pcb_trace_route_point_via:oat,pcb_trace_route_point_wire:nat,pcb_trace_too_long_warning:aat,pcb_trace_too_many_vias_warning:Aat,pcb_trace_warning:sat,pcb_via:Sne,pcb_via_clearance_error:Zat,pcb_via_trace_clearance_error:eAt,point:ki,point3:D9,point_with_bulge:Rst,port_arrangement:sst,position:hBn,position3:pBn,resistance:S8,ring:H2e,rotation:oA,route_hint_point:N9,schematic_arc:gst,schematic_box:tst,schematic_circle:ust,schematic_component:ast,schematic_component_overlap_warning:Bst,schematic_component_port_arrangement_by_sides:rst,schematic_component_port_arrangement_by_size:ist,schematic_component_styling_warning:bst,schematic_debug_line:Cst,schematic_debug_object:xst,schematic_debug_object_base:Bne,schematic_debug_point:yst,schematic_debug_rect:Ist,schematic_element_outside_sheet_warning:Sst,schematic_error:_st,schematic_graphic:vst,schematic_group:wst,schematic_layout_error:fst,schematic_line:cst,schematic_manual_edit_conflict_warning:F2e,schematic_missing_sheet_warning:Nst,schematic_net_label:mst,schematic_path:nst,schematic_pin_styles:ost,schematic_port:pst,schematic_rect:lst,schematic_sheet:Dst,schematic_sheet_size:L2e,schematic_symbol:Ast,schematic_table:Pst,schematic_table_cell:Mst,schematic_text:hst,schematic_text_part:k2e,schematic_trace:dst,schematic_voltage_probe:Est,simulation_ac_current_source:cAt,simulation_ac_sweep_current_graph:SAt,simulation_ac_sweep_voltage_graph:bAt,simulation_ac_voltage_source:sAt,simulation_complex_sample:gxe,simulation_current_probe:fAt,simulation_current_source:lAt,simulation_dc_current_source:AAt,simulation_dc_operating_point_current:xAt,simulation_dc_operating_point_voltage:yAt,simulation_dc_sweep_current_graph:BAt,simulation_dc_sweep_unit:wne,simulation_dc_sweep_voltage_graph:EAt,simulation_dc_voltage_source:rAt,simulation_experiment:dAt,simulation_op_amp:QAt,simulation_oscilloscope_trace:PAt,simulation_parameter_sweep:CAt,simulation_parameter_sweep_coordinate:v8,simulation_parameter_type:XBn,simulation_parameter_unit:uxe,simulation_spice_subcircuit:vAt,simulation_switch:mAt,simulation_transient_current_graph:pAt,simulation_transient_voltage_graph:hAt,simulation_unknown_experiment_error:IAt,simulation_voltage_probe:_At,simulation_voltage_source:aAt,size:Cne,source_ambiguous_port_reference:Vrt,source_board:Krt,source_component_base:bu,source_component_internal_connection:Ort,source_component_misconfigured_error:dV,source_component_pins_underspecified_warning:qrt,source_confusing_net_name_warning:est,source_failed_to_create_component_error:Nrt,source_group:Yrt,source_i2c_misconfigured_error:R2e,source_interconnect:krt,source_invalid_component_property_error:w2e,source_manually_placed_via:Jrt,source_missing_manufacturer_part_number_warning:D2e,source_missing_property_error:Drt,source_net:Urt,source_no_ground_pin_defined_warning:$rt,source_no_power_pin_defined_warning:jrt,source_part_not_found_warning:hV,source_pcb_ground_plane:zrt,source_pin_attributes:vrt,source_pin_missing_trace_warning:M2e,source_pin_must_be_connected_error:Xrt,source_port:Hrt,source_project_metadata:v2e,source_property_ignored_warning:Rrt,source_refdes_convention_warning:N2e,source_simple_ammeter:Qrt,source_simple_battery:m2e,source_simple_capacitor:u2e,source_simple_chip:h2e,source_simple_connector:Mrt,source_simple_connector_standards:Prt,source_simple_crystal:wrt,source_simple_current_source:brt,source_simple_diode:Ene,source_simple_fiducial:Ert,source_simple_fuse:Srt,source_simple_ground:Brt,source_simple_inductor:_2e,source_simple_led:d2e,source_simple_mosfet:b2e,source_simple_op_amp:S2e,source_simple_pin_header:C2e,source_simple_pinout:y2e,source_simple_potentiometer:I2e,source_simple_power_source:p2e,source_simple_push_button:f2e,source_simple_resistor:g2e,source_simple_resonator:x2e,source_simple_switch:Q2e,source_simple_test_point:B2e,source_simple_transistor:E2e,source_simple_voltage_probe:Trt,source_simple_voltage_source:Frt,source_trace:Grt,source_trace_not_connected_error:P2e,source_unnamed_trace_warning:Wrt,spice_simulation_options:gAt,supplier_footprint_mismatch_warning:nxe,supplier_name:qM,time:dBn,timestamp:lrt,unknown_error_finding_part:Zrt,visible_layer:Km,voltage:O_,wave_shape:lxe},Symbol.toStringTag,{value:\"Module\"}));var MAt={in:25.4,inch:25.4,mil:.0254,mm:1,m:1e3,cm:10,ft:304.8,feet:304.8},KA=t=\u003e{let e=typeof t==\"number\"?\"mm\":t.replace(/^[^a-zA-Z]+/g,\"\").toLowerCase();e||(e=\"mm\");const n=typeof t==\"number\"?t:Number.parseFloat(t.split(e)[0]);if(e in MAt)return n*MAt[e];throw new Error(`Unsupported unit: ${e}`)},sd=KA,ZBn=Object.defineProperty,e9n=(t,e)=\u003e{for(var n in e)ZBn(t,n,{get:e[n],enumerable:!0})},w8={};e9n(w8,{axial:()=\u003eJ7n,bga:()=\u003eW9n,breakoutheaders:()=\u003el6n,cap:()=\u003ef9n,crystal:()=\u003eC9n,d2pak:()=\u003ekAt,dfn:()=\u003ev7n,diode:()=\u003e_9n,dip:()=\u003ea9n,dpak:()=\u003eTAt,electrolytic:()=\u003eASn,fpc:()=\u003euSn,hc49:()=\u003ed6n,headermodule:()=\u003eP7n,jst:()=\u003eEbn,lcc:()=\u003etQn,led:()=\u003ey9n,led2835:()=\u003eE9n,led5050:()=\u003eb9n,lga:()=\u003eA6n,lqfp:()=\u003es6n,m2host:()=\u003ezSn,melf:()=\u003eM8n,micromelf:()=\u003eT8n,minimelf:()=\u003eE8n,mlp:()=\u003er7n,mountedpcbmodule:()=\u003eWSn,ms012:()=\u003eT7n,ms013:()=\u003eF7n,msop:()=\u003eNbn,pad:()=\u003eh6n,pinrow:()=\u003eZAt,platedhole:()=\u003eRSn,potentiometer:()=\u003erSn,pushbutton:()=\u003ee6n,qfn:()=\u003en7n,qfp:()=\u003ei7n,quad:()=\u003eeD,radial:()=\u003e$7n,res:()=\u003ez9n,rj45:()=\u003eX7n,sma:()=\u003eH8n,smb:()=\u003eJ8n,smbf:()=\u003edSn,smc:()=\u003eq8n,smdpads:()=\u003eBSn,smdpinheader:()=\u003eDSn,smdpushbutton:()=\u003eSSn,smdslideswitch:()=\u003ePSn,smf:()=\u003eU8n,smtpad:()=\u003exSn,sod110:()=\u003ebbn,sod123:()=\u003eU7n,sod123f:()=\u003e$6n,sod123fl:()=\u003ee8n,sod123w:()=\u003eP6n,sod128:()=\u003eA8n,sod323:()=\u003eR6n,sod323f:()=\u003ez6n,sod323fl:()=\u003eHbn,sod323w:()=\u003eTbn,sod523:()=\u003eC6n,sod723:()=\u003ei8n,sod80:()=\u003eS6n,sod882:()=\u003eY6n,sod882d:()=\u003eQ8n,sod923:()=\u003eL6n,soic:()=\u003e$9n,solderjumper:()=\u003e$bn,son:()=\u003eUbn,sop8:()=\u003eB6n,sot:()=\u003ekSn,sot143:()=\u003eHSn,sot223:()=\u003etbn,sot23:()=\u003ey7n,sot23w:()=\u003elbn,sot25:()=\u003eb7n,sot323:()=\u003efSn,sot343:()=\u003eYSn,sot363:()=\u003eh7n,sot457:()=\u003eZbn,sot563:()=\u003eN7n,sot723:()=\u003eH7n,sot886:()=\u003e_7n,sot89:()=\u003ef8n,sot963:()=\u003enSn,ssop:()=\u003eA7n,stampboard:()=\u003en6n,stampreceiver:()=\u003er6n,to220:()=\u003erct,to220f:()=\u003ey8n,to252:()=\u003eu9n,to263:()=\u003eg9n,to92:()=\u003ef6n,to92l:()=\u003eXSn,to92s:()=\u003embn,tqfp:()=\u003eo7n,tssop:()=\u003eu7n,usbcmidmount:()=\u003eeQn,vson:()=\u003eVbn,vssop:()=\u003ePbn,wson:()=\u003ejbn});var yi=(t,e,n)=\u003e({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:\"silkscreen_text_1\",font:\"tscircuit2024\",font_size:n,pcb_component_id:\"pcb_component_1\",text:\"{REF}\",layer:\"top\",anchor_position:{x:t,y:e},anchor_alignment:\"center\"}),fV=Z().or(dn(rd())).transform(t=\u003eArray.isArray(t)?t:(t.startsWith(\"(\")\u0026\u0026t.endsWith(\")\")\u0026\u0026(t=t.slice(1,-1)),t.split(\",\").map(e=\u003e{const n=Number(e);return isNaN(n)?e:n}))).pipe(dn(Z().or(_t()))),t9n=Kn([\"leftside\",\"rightside\"]),n9n=Kn([\"topside\",\"bottomside\"]),o9n=Kn([\"left\",\"right\"]),i9n=Kn([\"top\",\"bottom\"]),DAt=fV.pipe(xo([fQ([t9n,i9n]),fQ([n9n,o9n])])),Ii=Pt({norefdes:je().optional().describe(\"disable reference designator label\"),invert:je().optional().describe(\"install the part backwards: for a pin header, the LONG pins pass through the board instead of the short ones. It does not change which side of the board the part is on — that is the component's `layer`\"),faceup:je().optional().describe(\"DEPRECATED, and a no-op for through-hole parts. It meant 'the male pin header should face upwards, out of the top layer', which is what a correctly mounted header does by default; its other effect was to delete the pins below the board, leaving a through-hole part that cannot be soldered into its own plated holes. Use `layer` for which side of the board a part is on, and `invert` to install it backwards\"),nosilkscreen:je().optional().describe(\"omit all silkscreen elements from the footprint\"),rounded:ce.refine(t=\u003et\u003e=0,{message:\"rounded radius must be non-negative\"}).optional().describe(\"corner radius applied to all rectangular copper pads\"),pin1location:DAt.optional().describe(\"rotate the footprint to place pin 1 on a requested side\"),cathodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe(\"identify which diode pad is the cathode\"),anodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe(\"identify which diode pad is the anode\")}),ks=(t,e,n,o,i)=\u003e({pcb_plated_hole_id:\"\",type:\"pcb_plated_hole\",shape:\"circle\",x:e,y:n,hole_diameter:KA(o),outer_diameter:KA(i),pcb_port_id:\"\",layers:[\"top\",\"bottom\"],port_hints:[t.toString()]}),yy=t=\u003e{const{pn:e,x:n,y:o,holeDiameter:i,rectPadWidth:r,rectPadHeight:s,holeOffsetX:a=0,holeOffsetY:A=0,rectBorderRadius:c}=t;return{pcb_plated_hole_id:\"\",type:\"pcb_plated_hole\",shape:\"circular_hole_with_rect_pad\",x:n,y:o,hole_diameter:KA(i),hole_shape:\"circle\",pad_shape:\"rect\",rect_pad_width:KA(r),rect_pad_height:KA(s),...c!==void 0\u0026\u0026{rect_border_radius:c},pcb_port_id:\"\",layers:[\"top\",\"bottom\"],port_hints:[e.toString()],hole_offset_x:a,hole_offset_y:A}},Pne=Array.from({length:9},(t,e)=\u003eMath.cos(e/8*Math.PI-Math.PI)).map(t=\u003e({x:t,y:-Math.sqrt(1-t**2)})),xy=t=\u003e{if(t.length\u003c2)throw new Error(\"Rect union outline requires at least two bounds\");for(const c of t)if(c.minX\u003e=c.maxX||c.minY\u003e=c.maxY)throw new Error(\"Each rectangle bound must have min \u003c max on both axes\");for(let c=1;c\u003ct.length;c++){const l=t[c-1],u=t[c];if(u.minX\u003cl.minX||u.maxX\u003el.maxX||u.minY\u003el.minY||u.maxY\u003cl.maxY)throw new Error(\"Bounds must be ordered outer-to-inner with tighter X and larger Y span\")}const e=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].maxY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.maxY}),c.push({x:g.minX,y:g.maxY}),l-=1}return c},n=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].maxY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.maxY}),c.push({x:g.maxX,y:g.maxY}),l-=1}return c},o=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].minY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.minY}),c.push({x:g.maxX,y:g.minY}),l-=1}return c},i=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].minY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.minY}),c.push({x:g.minX,y:g.minY}),l-=1}return c},r=e(),s=n(),a=o(),A=i();return[...r.reverse(),...s,...a.reverse(),...A]};function xQ(t){return typeof t==\"string\"?t.trim().toLowerCase().endsWith(\"mil\")?parseFloat(t)*.0254:parseFloat(t):Number(t)}var Mne=xo([Z(),_t()]).transform(t=\u003exQ(t)),r9n=t=\u003eIi.extend({fn:Z(),num_pins:_t().optional().default(6),wide:je().optional(),narrow:je().optional(),w:Mne.optional(),p:Mne.default(t.p??\"2.54mm\"),id:Mne.optional(),od:Mne.optional(),nosquareplating:je().optional().default(!1).describe(\"do not use rectangular pad for pin 1\")}).transform(e=\u003e(!e.id\u0026\u0026!e.od?Math.abs(e.p-1.27)\u003c.01?(e.id=xQ(\"0.55mm\"),e.od=xQ(\"0.95mm\")):(e.id=xQ(\"0.8mm\"),e.od=xQ(\"1.6mm\")):e.id?e.od||(e.od=e.id*(1.5/1)):e.id=e.od*(1/1.5),e.w||(e.wide?e.w=xQ(\"600mil\"):e.narrow?e.w=xQ(\"300mil\"):e.w=xQ(t.w??\"300mil\")),e)),s9n=r9n({}),NAt=(t,e,n,o,i)=\u003e{const r=t/2,s=e\u003c=r,a=r-1,A=o,c=A*a;return s?{x:-n/2,y:c/2-(e-1)*A}:{x:n/2,y:-c/2+(e-r-1)*A}},a9n=t=\u003e{const e=s9n.parse(t),n=[];for(let _=0;_\u003ce.num_pins;_++){const{x:f,y:I}=NAt(e.num_pins,_+1,e.w,e.p??2.54,e.nosquareplating);if(_===0\u0026\u0026!e.nosquareplating){n.push(yy({pn:_+1,x:f,y:I,holeDiameter:e.id??\"0.8mm\",rectPadWidth:e.od??\"1mm\",rectPadHeight:e.od??\"1mm\"}));continue}n.push(ks(_+1,f,I,e.id??\"0.8mm\",e.od??\"1mm\"))}const o=(e.num_pins/2-1)*e.p+e.od,r=e.w-e.od-1,s=(e.num_pins/2-1)*e.p+e.od+.4,a={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...Pne.map(({x:_,y:f})=\u003e({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},A=[];for(let _=0;_\u003ce.num_pins;_++){const f=_+1,I=f\u003c=e.num_pins/2,C=NAt(e.num_pins,f,e.w,e.p??2.54,e.nosquareplating),y=.6,x=I?C.x-e.od/2-y:C.x+e.od/2+y,E=.3;A.push({type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:`pin_${f}`,layer:\"top\",pcb_component_id:`pin_${f}`,text:`{pin${f}}`,anchor_position:{x,y:C.y+E/2},font_size:E,font:\"tscircuit2024\",anchor_alignment:I?\"top_right\":\"top_left\"})}const c=yi(0,s/2+.5,.4),l=e.w+e.od,u=o,g=l/2+.25,h=g,d=u/2+.72,p=d,m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:xy([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:\"top\"};return{circuitJson:[...n,a,c,...A,m],parameters:e}},Jo=(t,e,n,o,i,r)=\u003e({type:\"pcb_smtpad\",x:e,y:n,width:o,height:i,layer:\"top\",shape:\"rect\",...r!==void 0\u0026\u0026{corner_radius:r},pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(s=\u003es.toString()):[t.toString()]}),iA=(t,e={})=\u003e({type:\"pcb_silkscreen_path\",layer:e.layer||\"top\",pcb_component_id:e.pcb_component_id||\"\",pcb_silkscreen_path_id:e.pcb_silkscreen_path_id||\"\",route:t,stroke_width:e.stroke_width||.1}),A9n=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(6)]).default(3),p:ce.default(\"2.29mm\").describe(\"pitch between adjacent lead positions\"),pw:ce.default(\"1.6mm\").describe(\"lead pad width along the pin column\"),pl:ce.default(\"3mm\").describe(\"lead pad length toward the package\"),tabw:ce.default(\"6.2mm\").describe(\"large tab pad width\"),tabh:ce.default(\"5.8mm\").describe(\"large tab pad height\"),span:ce.default(\"6.85mm\").describe(\"center-to-center distance from the leads to the tab\"),w:ce.default(\"6.6mm\").describe(\"package body width\"),h:ce.default(\"6.5mm\").describe(\"package body height\"),string:Z().optional()}),c9n={p:\"2.54mm\",pw:\"1.5mm\",pl:\"3.5mm\",tabw:\"8.38mm\",tabh:\"10.7mm\",span:\"10.21mm\",w:\"10.1mm\",h:\"10.1mm\"},l9n=t=\u003e{if(t.num_pins===3||t.num_pins===6)return t.num_pins;const e=t.string?.match(/^(?:d2pak|to252|to263)_(\\d+)/i),n=Number.parseInt(e?.[1]??\"3\",10);return n===5||n===6?6:3},RAt=(t,e)=\u003e{const n=A9n.parse({...e,...t,num_pins:l9n(t)}),{num_pins:o,p:i,pw:r,pl:s,tabw:a,tabh:A,span:c,w:l,h:u}=n,g=o===3?2:5,h=-c/2,d=c/2,p=[];for(let M=0;M\u003cg;M++){const k=o===3?M*2+1:M+1,R=o===3?(1-M*2)*i:((g-1)/2-M)*i;p.push(Jo(k,h,R,s,r))}p.push(Jo(o===3?2:6,d,0,a,A));const m=-l/2,_=l/2,f=Math.min(h-s/2,d-a/2),I=Math.max(h+s/2,d+a/2),C=(o===3?i:(g-1)/2*i)+r/2,y=Math.max(C,A/2),x=Math.max(y,u/2)+.2,E=[iA([{x:m,y:x},{x:_,y:x}]),iA([{x:m,y:-x},{x:_,y:-x}]),iA([{x:h-.3,y:x+.15},{x:h,y:x+.45},{x:h+.3,y:x+.15}])],B=Math.min(f,m)-.25,S=Math.max(I,_)+.25,Q=Math.max(y,u/2)+.25,w={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(B+S)/2,y:0},width:S-B,height:Q*2,layer:\"top\"};return{circuitJson:[...p,...E,yi(0,Q+.55,.5),w],parameters:n}},TAt=t=\u003eRAt(t),kAt=t=\u003eRAt(t,c9n),u9n=TAt,g9n=kAt,FAt=[{imperial:\"01005\",metric:\"0402\",p_mm_min:.5,pw_mm_min:.4,ph_mm_min:.3,w_mm_min:.58,h_mm_min:.21,courtyard_width_mm:1.2,courtyard_height_mm:.6},{imperial:\"0504\",metric:\"1310\",p_mm_min:1.1,pw_mm_min:.65,ph_mm_min:1.3,w_mm_min:.58,h_mm_min:.21},{imperial:\"1812\",metric:\"4532\",p_mm_min:4.275,pw_mm_min:1.125,ph_mm_min:3.4,w_mm_min:5.4,h_mm_min:3.4,courtyard_width_mm:5.9,courtyard_height_mm:3.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.386252,line_y_mm:1.71,stroke_width_mm:.12}},{imperial:\"0201\",metric:\"0603\",p_mm_min:.66,pw_mm_min:.46,ph_mm_min:.4,w_mm_min:.9,h_mm_min:.3,courtyard_width_mm:1.4,courtyard_height_mm:.7,rounded_pads:!0},{imperial:\"0402\",metric:\"1005\",p_mm_min:1.02,pw_mm_min:.54,ph_mm_min:.64,w_mm_min:1.56,h_mm_min:.64,courtyard_width_mm:1.86,courtyard_height_mm:.94,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.153641,line_y_mm:.38,stroke_width_mm:.12}},{imperial:\"0603\",metric:\"1608\",p_mm_min:1.65,pw_mm_min:.8,ph_mm_min:.95,w_mm_min:2.45,h_mm_min:.95,courtyard_width_mm:2.96,courtyard_height_mm:1.46,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.237258,line_y_mm:.5225,stroke_width_mm:.12}},{imperial:\"0805\",metric:\"2012\",p_mm_min:1.825,pw_mm_min:1.025,ph_mm_min:1.4,w_mm_min:2.8499999999999996,h_mm_min:1.4,courtyard_width_mm:3.36,courtyard_height_mm:1.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.227064,line_y_mm:.735,stroke_width_mm:.12}},{imperial:\"1206\",metric:\"3216\",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:1.75,w_mm_min:4.05,h_mm_min:1.75,courtyard_width_mm:4.56,courtyard_height_mm:2.26,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.727064,line_y_mm:.91,stroke_width_mm:.12}},{imperial:\"1210\",metric:\"3225\",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:2.65,w_mm_min:4.05,h_mm_min:2.65,courtyard_width_mm:4.56,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.723737,line_y_mm:1.355,stroke_width_mm:.12}},{imperial:\"2010\",metric:\"5025\",p_mm_min:4.625,pw_mm_min:1.225,ph_mm_min:2.65,w_mm_min:5.85,h_mm_min:2.65,courtyard_width_mm:6.36,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.527064,line_y_mm:1.36,stroke_width_mm:.12}},{imperial:\"2512\",metric:\"6332\",p_mm_min:5.925,pw_mm_min:1.225,ph_mm_min:3.35,w_mm_min:7.15,h_mm_min:3.35,courtyard_width_mm:7.66,courtyard_height_mm:3.86,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:2.177064,line_y_mm:1.71,stroke_width_mm:.12}}],d9n=Object.fromEntries(FAt.map(t=\u003e[t.metric,t])),h9n=Object.fromEntries(FAt.map(t=\u003e[t.imperial,t])),LAt=(t,e)=\u003e({type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:t,height:e,layer:\"top\"});Ii.extend({fn:Z().optional(),string:Z().optional(),tht:je(),p:ce.optional(),pw:ce.optional(),ph:ce.optional(),metric:lt.optional(),imperial:lt.optional(),w:ce.optional(),h:ce.optional(),cyw:ce.optional().describe(\"courtyard width\"),cyh:ce.optional().describe(\"courtyard height\"),nonpolarized:je().optional(),textbottom:je().optional(),roundedPads:je().optional()});var Dne=t=\u003e{let{fn:e,tht:n,p:o,pw:i,ph:r,metric:s,imperial:a,w:A,h:c,cyw:l,cyh:u,nonpolarized:g,textbottom:h,roundedPads:d,string:p}=t;if(typeof A==\"string\"\u0026\u0026(A=sd(A)),typeof c==\"string\"\u0026\u0026(c=sd(c)),typeof l==\"string\"\u0026\u0026(l=sd(l)),typeof u==\"string\"\u0026\u0026(u=sd(u)),typeof o==\"string\"\u0026\u0026(o=sd(o)),typeof i==\"string\"\u0026\u0026(i=sd(i)),typeof r==\"string\"\u0026\u0026(r=sd(r)),c!==void 0\u0026\u0026A!==void 0\u0026\u0026c\u003eA)throw new Error(\"height cannot be greater than width (rotated footprint not yet implemented)\");let m;if(s\u0026\u0026(m=d9n[s]),a\u0026\u0026(m=h9n[a]),m\u0026\u0026(A=m.w_mm_min,c=m.h_mm_min,o=m.p_mm_min,i=m.pw_mm_min,r=m.ph_mm_min),o===void 0||i===void 0||r===void 0)throw new Error(\"Could not determine required pad dimensions (p, pw, ph)\");let _=[];const f=e===\"res\"\u0026\u0026(g===!0||typeof p!=\"string\"||/^res(?:\\d{4}|\\d{5})(?:_|$)/i.test(p))?m?.nonpolarizedSilkscreen:void 0;if(f?.stroke_width_mm){const{line_half_length_mm:B=0,line_y_mm:S=0,stroke_width_mm:Q}=f;_=[{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-B,y:S},{x:B,y:S}],stroke_width:Q,pcb_silkscreen_path_id:\"\"},{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-B,y:-S},{x:B,y:-S}],stroke_width:Q,pcb_silkscreen_path_id:\"\"}]}else _=[{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:o/2,y:r/2+.4},{x:-o/2-i/2-.2,y:r/2+.4},{x:-o/2-i/2-.2,y:-r/2-.4},{x:o/2,y:-r/2-.4}],stroke_width:.1,pcb_silkscreen_path_id:\"\"}];const I=h?-r/2-.9:r/2+.9,C=yi(0,I,.2),y=m?.courtyard_width_mm\u0026\u0026m.courtyard_height_mm?LAt(m.courtyard_width_mm,m.courtyard_height_mm):l!==void 0\u0026\u0026u!==void 0?LAt(l,u):null,E=d??m?.rounded_pads??!1?Math.min(.125,Math.min(i,r)/8):void 0;return n?[ks(1,-o/2,0,i,i*1/.8),ks(2,o/2,0,i,i*1/.8),..._,C,...y?[y]:[]]:[Jo([\"1\",\"left\"],-o/2,0,i,r,E),Jo([\"2\",\"right\"],o/2,0,i,r,E),..._,C,...y?[y]:[]]},p9n=t=\u003e{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)r.type===\"pcb_smtpad\"\u0026\u0026(e=Math.min(e,r.x-r.width/2),n=Math.max(n,r.x+r.width/2),o=Math.min(o,r.y-r.height/2),i=Math.max(i,r.y+r.height/2)),r.type===\"pcb_plated_hole\"\u0026\u0026(e=Math.min(e,r.x-r.outer_diameter/2),n=Math.max(n,r.x+r.outer_diameter/2),o=Math.min(o,r.y-r.outer_diameter/2),i=Math.max(i,r.y+r.outer_diameter/2));if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(i))throw new Error(\"Could not determine diode copper bounds\");return{minX:e,maxX:n,minY:o,maxY:i}},HAt=(t,e={})=\u003eNne(p9n(t),e),m9n=({anodePin:t,cathodePin:e})=\u003e{if(t!==void 0\u0026\u0026t!==1\u0026\u0026t!==2)throw new Error(\"Diode anode pin must be 1 or 2\");if(e!==void 0\u0026\u0026e!==1\u0026\u0026e!==2)throw new Error(\"Diode cathode pin must be 1 or 2\");if(t!==void 0\u0026\u0026e!==void 0){if(t===e)throw new Error(\"Diode anode and cathode cannot use the same pin\");return e}if(e!==void 0)return e;if(t===1)return 2;if(t===2)return 1},Xd=t=\u003e{const e=t.p??t.pad_spacing;if(e===void 0||t.pl===void 0||t.pw===void 0)throw new Error(\"Diode fabrication note requires p or pad_spacing, pl, and pw\");const n=ce.parse(e),o=ce.parse(t.pl),i=ce.parse(t.pw);return Nne({minX:-n/2-o/2,maxX:n/2+o/2,minY:-i/2,maxY:i/2},{anodePin:t.anodepin,cathodePin:t.cathodepin})},Nne=(t,e={})=\u003e{const n=[],o=t.maxX-t.minX,i=t.maxY-t.minY,r=(t.minX+t.maxX)/2,s=(t.minY+t.maxY)/2,A=m9n(e)===1?x=\u003e2*r-x:x=\u003ex,c=i*.28,l=c*2,u=o*.2,h=Math.min(u,l*1.25),d=r-h/2,p=r+h/2,m=h*.18,_=d+m,f=p-m,I=Math.max(Math.min(o,i)*.035,.01),C=Math.max(Math.min(o,i)*.25,.1),y=x=\u003ee.idSuffix?`${x}_${e.idSuffix}`:x;return n.push({type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_anode_leg\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(d),y:s},{x:A(_),y:s}]},{type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_triangle\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(_),y:s+c},{x:A(f),y:s},{x:A(_),y:s-c},{x:A(_),y:s+c}]},{type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_cathode\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(f),y:s+c},{x:A(f),y:s-c}]},{type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_cathode_leg\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(f),y:s},{x:A(p),y:s}]},{type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:y(\"diode_fabrication_note_positive\"),pcb_component_id:\"\",layer:\"top\",font:\"tscircuit2024\",font_size:C,text:\"+\",anchor_position:{x:A(t.minX+o*.125),y:s},anchor_alignment:\"center\"},{type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:y(\"diode_fabrication_note_negative\"),pcb_component_id:\"\",layer:\"top\",font:\"tscircuit2024\",font_size:C,text:\"-\",anchor_position:{x:A(t.maxX-o*.125),y:s},anchor_alignment:\"center\"}),n},_9n=t=\u003e{const e=Dne({...t,roundedPads:!0});return{circuitJson:e.concat(HAt(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})),parameters:t}},f9n=t=\u003e({circuitJson:Dne(t),parameters:t}),I9n=Ii.extend({fn:$e(\"crystal\"),num_pins:$e(4).default(4),px:ce.default(\"2.2mm\").describe(\"horizontal pad center pitch\"),py:ce.default(\"1.7mm\").describe(\"vertical pad center pitch\"),pw:ce.default(\"1.4mm\").describe(\"pad width\"),ph:ce.default(\"1.2mm\").describe(\"pad height\")}),C9n=t=\u003e{const e=I9n.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Jo(1,-n/2,-o/2,i,r),Jo(2,n/2,-o/2,i,r),Jo(3,n/2,o/2,i,r),Jo(4,-n/2,o/2,i,r)],a=(n+i)/2+.2,A=(o+r)/2+.2,c=iA([{x:-a,y:-A},{x:a,y:-A},{x:a,y:A},{x:-a,y:A},{x:-a,y:-A}]),l=yi(0,A+.6,.5),u={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:\"top\"};return{circuitJson:[...s,c,l,u],parameters:e}},y9n=t=\u003e{const e=Dne(t);return{circuitJson:e.concat(HAt(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})).map(o=\u003eo.type!==\"pcb_silkscreen_path\"?o:{...o,route:o.route.map(i=\u003e({...i,x:-i.x}))}),parameters:t}},x9n=Ii.extend({fn:$e(\"led2835\"),num_pins:$e(2).default(2),p1w:ce.default(\"2.2mm\").describe(\"pin 1 (anode) pad width\"),p2w:ce.default(\"1.25mm\").describe(\"pin 2 (cathode) pad width\"),ph:ce.default(\"2.2mm\").describe(\"pad height\"),p1x:ce.default(\"-0.9mm\").describe(\"pin 1 pad center x\"),p2x:ce.default(\"1.375mm\").describe(\"pin 2 pad center x\"),w:ce.default(\"3.5mm\").describe(\"package body width\"),h:ce.default(\"2.8mm\").describe(\"package body height\")}),E9n=t=\u003e{const e=x9n.parse(t),{p1w:n,p2w:o,ph:i,p1x:r,p2x:s,w:a,h:A}=e,c=[Jo(1,r,0,n,i),Jo(2,s,0,o,i)],l=a/2+.45,u=A/2+.2,g=[iA([{x:s-o/2,y:-u},{x:-l,y:-u},{x:-l,y:u},{x:s-o/2,y:u}])],h=yi(0,u+.8,.5),d={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(r-n/2+s+o/2)/2,y:0},width:s+o/2-(r-n/2)+.5,height:Math.max(A,i)+.5,layer:\"top\"},p=Nne({minX:Math.min(r-n/2,s-o/2),maxX:Math.max(r+n/2,s+o/2),minY:-i/2,maxY:i/2},{anodePin:e.anodepin,cathodePin:e.cathodepin});return{circuitJson:[...c,...g,h,d,...p],parameters:e}},B9n=Ii.extend({fn:$e(\"led5050\"),num_pins:$e(6).default(6),p:ce.default(\"1.7mm\").describe(\"pin pitch along each column\"),rowspan:ce.default(\"4.8mm\").describe(\"distance between pad columns\"),pl:ce.default(\"2mm\").describe(\"pad length across the package edge\"),pw:ce.default(\"1.1mm\").describe(\"pad width along the pin column\"),w:ce.default(\"5mm\").describe(\"package body width\"),h:ce.default(\"5mm\").describe(\"package body height\")}),b9n=t=\u003e{const e=B9n.parse(t),{p:n,rowspan:o,pl:i,pw:r,w:s,h:a}=e,A=[];for(let m=0;m\u003c3;m++)A.push(Jo(m+1,-o/2,n-m*n,i,r)),A.push(Jo(6-m,o/2,n-m*n,i,r));const c=s/2,l=a/2+.2,u=[iA([{x:-c,y:l},{x:c,y:l}]),iA([{x:-c,y:-l},{x:c,y:-l}]),iA([{x:-o/2-i/2-.4,y:n+r/2},{x:-o/2-i/2-.4,y:n-r/2}])],g=yi(0,l+.8,.5),h={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:o+i+.5,height:Math.max(a,2*n+r)+.5,layer:\"top\"},p=[{color:\"green\",y:n},{color:\"red\",y:0},{color:\"blue\",y:-n}].flatMap(({color:m,y:_})=\u003eNne({minX:-o/2-i/2,maxX:o/2+i/2,minY:_-r/2,maxY:_+r/2},{idSuffix:m}));return{circuitJson:[...A,...u,g,h,...p],parameters:e}},Vk=t=\u003e{const{padSpacing:e,padWidth:n,padHeight:o,padPitch:i,numRows:r,textbottom:s,courtyardOutline:a}=t,A=[],c=(r-1)*(i/2);for(let Q=0;Q\u003cr;Q++)A.push(c-Q*i);const l=[];A.forEach((Q,w)=\u003e{l.push(Jo(w+1,-e/2,Q,n,o))}),A.slice().reverse().forEach((Q,w)=\u003e{l.push(Jo(w+r+1,e/2,Q,n,o))});const u=Math.max(...A)+o/2+.4,g=Math.min(...A)-o/2-.4,h=-e/2-n/2-.4,d=e/2+n/2+.4,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d*.5,y:u},{x:h*.5,y:u}],stroke_width:.12,pcb_silkscreen_path_id:\"silkscreen_top\"},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d*.5,y:g},{x:h*.5,y:g}],stroke_width:.12,pcb_silkscreen_path_id:\"silkscreen_bottom\"},_=-e/2,f=Math.max(...A),I=.2,C=_-n/2-.1,y=f+o/2+.1,x={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_marker\",route:[{x:C,y},{x:C-I,y},{x:C,y:y+I},{x:C,y}],stroke_width:.1},E=s?g-.9:u+.9,B=yi(0,E,.2),S=a?{type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:a}:null;return[...l,p,m,x,B,...S?[S]:[]]},S9n=Ii.extend({pw:ce.default(\"0.5mm\"),ph:ce.default(\"0.4mm\"),p:ce.default(\"0.7mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Q9n=1,v9n=t=\u003e{const e=S9n.parse(t);if(e.concave===!0)return[];const n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:Q9n,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:.95},{x:-1,y:-.95},{x:1,y:-.95},{x:1,y:.95}]})},w9n=Ii.extend({pw:ce.default(\"0.5mm\"),ph:ce.default(\"0.32mm\"),p:ce.default(\"0.5mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),P9n=1,M9n=t=\u003e{const e=w9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:P9n,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:1.25},{x:-1,y:-1.25},{x:1,y:-1.25},{x:1,y:1.25}]})},D9n=Ii.extend({pw:ce.default(\"0.9mm\"),ph:ce.default(\"0.4mm\"),p:ce.default(\"0.8mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),N9n=1.7,R9n=t=\u003e{const e=D9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:N9n,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.05},{x:-1.55,y:-1.05},{x:1.55,y:-1.05},{x:1.55,y:1.05}]})},T9n=Ii.extend({pw:ce.default(\"0.9mm\"),ph:ce.default(\"0.4mm\"),p:ce.default(\"0.8mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),k9n=1.7,F9n=t=\u003e{const e=T9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:k9n,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.88},{x:-1.55,y:-1.87},{x:1.55,y:-1.87},{x:1.55,y:1.88}]})},L9n=Ii.extend({pw:ce.default(\"0.7mm\"),ph:ce.default(\"0.64mm\"),p:ce.default(\"0.94mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),H9n=1.4,O9n=t=\u003e{const e=L9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:H9n,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.3,y:1.05},{x:-1.3,y:-1.05},{x:1.3,y:-1.05},{x:1.3,y:1.05}]})},G9n=Ii.extend({pw:ce.default(\"0.9mm\"),ph:ce.default(\"0.9mm\"),p:ce.default(\"1.34mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Y9n=3,U9n=t=\u003e{const e=G9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:Y9n,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-2.21,y:2.85},{x:-2.21,y:-2.85},{x:2.2,y:-2.85},{x:2.2,y:2.85}]})},K9n=t=\u003e{const e=t.array??t.x;if(typeof e==\"number\")return Number.isNaN(e)?void 0:e;if(typeof e==\"string\"){const n=Number.parseInt(e,10);return Number.isNaN(n)?void 0:n}if(typeof t.imperial==\"string\"){const o=t.imperial.match(/x(2|4)$/)?.[1];if(o)return Number.parseInt(o,10)}},V9n=t=\u003et?(typeof t==\"number\"?`${t}`:t).split(/[_x]/)[0]:void 0,z9n=t=\u003e{const e=K9n(t),n=V9n(t.imperial);return e===2\u0026\u0026n===\"0402\"?{circuitJson:v9n(t),parameters:t}:e===4\u0026\u0026n===\"0402\"?{circuitJson:M9n(t),parameters:t}:e===2\u0026\u0026n===\"0603\"?{circuitJson:R9n(t),parameters:t}:e===4\u0026\u0026n===\"0603\"?{circuitJson:F9n(t),parameters:t}:e===2\u0026\u0026n===\"0606\"?{circuitJson:O9n(t),parameters:t}:e===4\u0026\u0026n===\"1206\"?{circuitJson:U9n(t),parameters:t}:{circuitJson:Dne(t),parameters:t}},OAt=(t,{x:e,y:n,radius:o})=\u003e({type:\"pcb_smtpad\",x:e,y:n,radius:o,layer:\"top\",shape:\"circle\",pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(i=\u003ei.toString()):[t.toString()]}),GAt=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",K4=Z().transform(t=\u003e{const[e,n]=t.split(/[x ]/);return{x:parseFloat(e??\"\"),y:parseFloat(n??\"\")}}).pipe(Pt({x:_t(),y:_t()})),J9n=Ii.extend({fn:Z(),num_pins:_t().optional().default(64),grid:K4.optional(),p:lt.default(\"0.8mm\"),w:ce.optional(),h:ce.optional(),ball:ce.optional().describe(\"ball diameter\"),pad:ce.optional().describe(\"pad width/height\"),circularpads:je().optional().default(!0).describe(\"use circular pads\"),tlorigin:je().optional(),blorigin:je().optional(),trorigin:je().optional(),brorigin:je().optional(),missing:fV.default([])}).transform(t=\u003e{let e=\"tl\";if(t.blorigin\u0026\u0026(e=\"bl\"),t.trorigin\u0026\u0026(e=\"tr\"),t.brorigin\u0026\u0026(e=\"br\"),!t.grid){const o=Math.ceil(Math.sqrt(t.num_pins));t.grid={x:o,y:o}}return t.missing\u0026\u0026(t.missing=t.missing.map(o=\u003e{if(typeof o==\"number\")return o;if(o===\"center\")return\"center\";if(o===\"topleft\")return\"topleft\";const i=o.match(/([A-Z]+)(\\d+)/);if(!i)return o;const r=GAt.indexOf(i[1]),s=Number.parseInt(i[2])-1;return r*t.grid.x+s+1})),{...t,origin:e}}),W9n=t=\u003e{const e=J9n.parse(t);let{num_pins:n,grid:o,p:i,w:r,h:s,ball:a,pad:A,missing:c}=e;a??=.75/1.27*i,A??=e.ball===void 0?i*.5:a*.8;const l=[],u=(c??[]).filter(Y=\u003etypeof Y==\"number\"),g=o.x*o.y-n;if(c.length===0\u0026\u0026g\u003e0\u0026\u0026(Math.sqrt(g)%1===0?c.push(\"center\"):g===1\u0026\u0026c.push(\"topleft\")),c?.includes(\"center\")){const Y=Math.floor(Math.sqrt(g)),W=Math.floor((o.x-Y)/2),te=Math.floor((o.y-Y)/2);for(let j=te;j\u003cte+Y;j++)for(let J=W;J\u003cW+Y;J++)u.push(j*o.x+J+1)}c?.includes(\"topleft\")\u0026\u0026u.push(1);const h=new Set(u);let d=0;for(let Y=0;Y\u003co.y;Y++)for(let W=0;W\u003co.x;W++){const te=(W-(o.x-1)/2)*i,j=(Y-(o.y-1)/2)*i;let J=W,oe=Y;switch(e.origin){case\"bl\":J=W,oe=o.y-1-Y;break;case\"br\":J=o.x-1-W,oe=o.y-1-Y;break;case\"tr\":J=o.x-1-W,oe=Y;break}let ie=oe*o.x+J+1;if(h.has(ie)){d++;continue}ie-=d;const ne=[ie,`${GAt[oe]}${J+1}`];l.push(e.circularpads?OAt(ne,{x:te,y:j,radius:A/2}):Jo(ne,te,j,A,A))}const p=yi(0,o.y*i/2,.2),m=i/6;let _;const f=o.x*i/2,I=o.y*i/2;switch(e.origin){case\"bl\":_=[{x:-f,y:-I},{x:-f,y:-I-m},{x:-f-m,y:-I},{x:-f,y:-I}];break;case\"br\":_=[{x:f,y:-I},{x:f,y:-I-m},{x:f+m,y:-I},{x:f,y:-I}];break;case\"tr\":_=[{x:f,y:I},{x:f,y:I+m},{x:f+m,y:I},{x:f,y:I}];break;default:_=[{x:-f,y:I},{x:-f,y:I+m},{x:-f-m,y:I},{x:-f,y:I}];break}const C={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_marker\",route:_,stroke_width:.05},y=(o.x-1)*i+A,x=(o.y-1)*i+A,E=r??y,B=s??x,S=Math.max(y/2,E/2),Q=Math.max(x/2,B/2),w=1.715,M=1.765,k=S+w,R=k,F=Q+M,O=F,U={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:xy([{minX:-k,maxX:k,minY:-O,maxY:O},{minX:-R,maxX:R,minY:-F,maxY:F}]),layer:\"top\"};return{circuitJson:[...l,p,C,U],parameters:e}},XM=(t,e,n,o,i)=\u003e({type:\"pcb_smtpad\",x:e,y:n,width:o,height:i,radius:Math.min(o,i)/2,layer:\"top\",shape:\"pill\",pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(r=\u003er.toString()):[t.toString()]}),zk={thermalpadcenteroffsetx:ce.optional().default(0),thermalpadcenteroffsety:ce.optional().default(0)},EQ=(t,e)=\u003eJo([\"thermalpad\"],e.x,e.y,t.x,t.y),ZM=t=\u003eIi.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(t.w??\"5.3mm\")),p:ce.default(ce.parse(t.p??\"1.27mm\")),pw:ce.default(ce.parse(t.pw??\"0.6mm\")),pl:ce.default(ce.parse(t.pl??\"1.0mm\")),legsoutside:je().optional().default(t.legsoutside??!1),pillpads:je().optional().default(t.pillpads??!1),thermalpad:K4.optional(),...zk,silkscreen_stroke_width:_t().optional().default(.1)}).transform(e=\u003e(!e.pw\u0026\u0026!e.pl?(e.pw=ce.parse(\"0.6mm\"),e.pl=ce.parse(\"1.0mm\")):e.pw?e.pl||(e.pl=e.pw*(1/.6)):e.pw=e.pl*(.6/1),e)),j9n=ZM({}),hxe=t=\u003e{t.widthincludeslegs!==void 0\u0026\u0026(t.legsoutside=!t.widthincludeslegs);const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n\u003c=a,c=a-1,l=i,u=l*c,g=s?r/2:-r/2;return A?{x:-o/2-g,y:u/2-(n-1)*l}:{x:o/2+g,y:-u/2+(n-a-1)*l}},$9n=t=\u003e{const e=j9n.parse(t);return{circuitJson:IV(e),parameters:e}},IV=t=\u003e{const e=[],n=Math.min(t.pl,t.pw)/8;let o=0,i=0;for(let _=0;_\u003ct.num_pins;_++){const{x:f,y:I}=hxe({num_pins:t.num_pins,pn:_+1,w:t.w,p:t.p,pl:t.pl,legsoutside:t.legsoutside});o=Math.max(o,Math.abs(f)+t.pl/2),i=Math.max(i,Math.abs(I)+t.pw/2),t.pillpads?e.push(XM(_+1,f,I,t.pl,t.pw)):e.push(Jo(_+1,f,I,t.pl,t.pw,n))}t.thermalpad\u0026\u0026e.push(EQ(t.thermalpad,{x:t.thermalpadcenteroffsetx,y:t.thermalpadcenteroffsety}));const r=Math.min(1,t.p/2),s=t.w-(t.legsoutside?0:t.pl*2)-.2,a=(t.num_pins/2-1)*t.p+t.pw+r,A=yi(0,a/2+.4,a/12),c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",stroke_width:t.silkscreen_stroke_width??.1,route:[{x:-s/2,y:-a/2},{x:-s/2,y:a/2},...Pne.map(({x:_,y:f})=\u003e({x:_*s/6,y:f*s/6+a/2})),{x:s/2,y:a/2},{x:s/2,y:-a/2},{x:-s/2,y:-a/2}]},l=t.w/2,u=a/2,g=Math.max(o,l)+.25,h=Math.min(i,u)+.25,d=Math.min(o,l)+.25,p=Math.max(i,u)+.25,m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-g,maxX:g,minY:-h,maxY:h},{minX:-d,maxX:d,minY:-p,maxY:p}])};return[...e,c,A,m]},q9n=({num_pins:t,sidePinCounts:e,cw:n,ccw:o,startingpin:i})=\u003e{const r=[],s=e.left,a=s+1,A=e.left+e.bottom,c=A+1,l=e.left+e.bottom+e.right,u=l+1;let g=1;const h={};for(const d of i??[])h[d]=!0;!h.leftside\u0026\u0026!h.topside\u0026\u0026!h.rightside\u0026\u0026!h.bottomside\u0026\u0026(h.leftside=!0),!h.bottompin\u0026\u0026!h.leftpin\u0026\u0026!h.rightpin\u0026\u0026!h.toppin\u0026\u0026(h.leftside?h.toppin=!0:h.topside?h.rightpin=!0:h.rightside?h.bottompin=!0:h.bottomside\u0026\u0026(h.leftpin=!0)),h.leftside\u0026\u0026h.toppin?g=1:h.leftside\u0026\u0026h.bottompin?g=s:h.bottomside\u0026\u0026h.leftpin?g=a:h.bottomside\u0026\u0026h.rightpin?g=A:h.rightside\u0026\u0026h.bottompin?g=c:h.rightside\u0026\u0026h.toppin?g=l:h.topside\u0026\u0026h.rightpin?g=u:h.topside\u0026\u0026h.leftpin\u0026\u0026(g=t),r.push(-1);for(let d=0;d\u003ct;d++)r[g]=d+1,o||!n?(g++,g\u003et\u0026\u0026(g=1)):(g--,g\u003c1\u0026\u0026(g=t));return r},YAt=(t,e,n,o)=\u003e{if(e!==void 0\u0026\u0026o!==void 0\u0026\u0026e!==o)throw new Error(`Conflicting ${t} (${e}) and ${n} (${o})`);return o??e},UAt=t=\u003e{const e=YAt(\"lrpins\",t.lrpins,\"leftrightpins\",t.leftrightpins),n=YAt(\"tbpins\",t.tbpins,\"topbottompins\",t.topbottompins),o=t.num_pins/4,i={left:t.leftpins??e??o,top:t.toppins??n??o,right:t.rightpins??e??o,bottom:t.bottompins??n??o};if([t.leftpins,t.toppins,t.rightpins,t.bottompins,t.lrpins,t.leftrightpins,t.tbpins,t.topbottompins].some(s=\u003es!==void 0)){const s=Object.entries(i),a=s.find(([,c])=\u003e!Number.isInteger(c)||c\u003c1);if(a)throw new Error(`Quad ${a[0]} pin count must be a positive integer, got ${a[1]}`);const A=s.reduce((c,[,l])=\u003ec+l,0);if(A!==t.num_pins)throw new Error(`Quad side pin counts left=${i.left}, top=${i.top}, right=${i.right}, bottom=${i.bottom} require ${A} pins, got ${t.num_pins}`)}return i},KAt=Kn([\"leftside\",\"topside\",\"rightside\",\"bottomside\",\"toppin\",\"bottompin\",\"leftpin\",\"rightpin\"]),BQ=S5.number().int().positive().optional(),Rne=Ii.extend({fn:Z(),cc:je().default(!0).optional(),ccw:je().default(!0).optional(),startingpin:Z().or(dn(KAt)).transform(t=\u003etypeof t==\"string\"?t.slice(1,-1).split(\",\"):t).pipe(dn(KAt)).optional(),num_pins:_t().optional().default(64),leftpins:BQ,toppins:BQ,rightpins:BQ,bottompins:BQ,lrpins:BQ,leftrightpins:BQ,tbpins:BQ,topbottompins:BQ,w:ce.optional(),h:ce.optional(),p:ce.default(ce.parse(\"0.5mm\")),px:ce.optional().describe(\"top and bottom side pad pitch\"),py:ce.optional().describe(\"left and right side pad pitch\"),pw:ce.optional(),pl:ce.optional(),lrpw:ce.optional().describe(\"alias for leftrightpadwidth\"),lrpl:ce.optional().describe(\"alias for leftrightpadlength\"),leftrightpadwidth:ce.optional().describe(\"left and right side pad width\"),leftrightpadlength:ce.optional().describe(\"left and right side pad length\"),thermalpad:xo([$e(!0),K4]).optional(),...zk,pillpads:je().optional().default(!1),legsoutside:je().default(!1)}),Tne=t=\u003e{if(t.lrpw!==void 0\u0026\u0026t.leftrightpadwidth!==void 0\u0026\u0026t.lrpw!==t.leftrightpadwidth)throw new Error(`Conflicting lrpw (${t.lrpw}) and leftrightpadwidth (${t.leftrightpadwidth})`);if(t.lrpl!==void 0\u0026\u0026t.leftrightpadlength!==void 0\u0026\u0026t.lrpl!==t.leftrightpadlength)throw new Error(`Conflicting lrpl (${t.lrpl}) and leftrightpadlength (${t.leftrightpadlength})`);t.leftrightpadwidth=t.leftrightpadwidth??t.lrpw,t.leftrightpadlength=t.leftrightpadlength??t.lrpl,t.w\u0026\u0026!t.h?t.h=t.w:!t.w\u0026\u0026t.h\u0026\u0026(t.w=t.h);const e=UAt(t),n=Math.max(e.top,e.bottom),o=Math.max(e.left,e.right),i=t.px??t.p,r=t.py??t.p;if(!t.p\u0026\u0026!t.pw\u0026\u0026!t.pl\u0026\u0026t.w){const s=n+4;t.p=t.w/s}if(!t.p\u0026\u0026t.w\u0026\u0026t.h\u0026\u0026t.pw\u0026\u0026t.pl){const s=(t.w-t.pl*2)/Math.max(n-1,1),a=(t.h-t.pl*2)/Math.max(o-1,1);t.p=(s+a)/2}return!t.w\u0026\u0026!t.h\u0026\u0026t.p\u0026\u0026(t.w=i*(n+4),t.h=r*(o+4)),t.p\u0026\u0026!t.pw\u0026\u0026!t.pl?(t.pw=t.p/2,t.pl=t.p/2):t.pw?t.pl||(t.pl=t.pw*(1/.6)):t.pw=t.pl*(.6/1),t},VAt=Rne.transform(Tne),X9n=[\"left\",\"bottom\",\"right\",\"top\"],Z9n=t=\u003e{const{sidePinCounts:e,pn:n,w:o,h:i,p:r,px:s,py:a,pl:A,leftRightPadLength:c,legsoutside:l}=t,u=[e.left,e.bottom,e.right,e.top];let g=0,h=n-1;for(;g\u003cu.length-1\u0026\u0026h\u003e=u[g];)h-=u[g],g+=1;const d=u[g],p=X9n[g],m=p===\"left\"||p===\"right\"?a??r:s??r,_=p===\"left\"||p===\"right\"?c??A:A,f=m*(d-1),I=m*(d-1),C=l?_/2:-_/2;switch(p){case\"left\":return{x:-o/2-C+.1,y:I/2-h*m,o:\"vert\"};case\"bottom\":return{x:-f/2+h*m,y:-i/2-C+.1,o:\"horz\"};case\"right\":return{x:o/2+C-.1,y:-I/2+h*m,o:\"vert\"};case\"top\":return{x:f/2-h*m,y:i/2+C-.1,o:\"horz\"};default:throw new Error(\"Invalid pin number\")}},eD=t=\u003e{const e=VAt.parse(t),n=e.leftrightpadwidth??e.lrpw??e.pw,o=e.leftrightpadlength??e.lrpl??e.pl,i=UAt(e),r=[];let s=0,a=0;const A=q9n({...e,sidePinCounts:i}),c=Math.max(i.left,i.right),l=Math.max(i.top,i.bottom),u=i.left,g=u+1,h=i.left+i.bottom,d=h+1,p=i.left+i.bottom+i.right,m=p+1,_=e.num_pins;for(let R=0;R\u003ce.num_pins;R++){const{x:F,y:O,o:U}=Z9n({sidePinCounts:i,pin_count:e.num_pins,pn:R+1,w:e.w,h:e.h,p:e.p??.5,px:e.px,py:e.py,pl:e.pl,leftRightPadLength:o,legsoutside:e.legsoutside}),Y=U===\"vert\";let W=Y?n:e.pw,te=Y?o:e.pl;U===\"vert\"\u0026\u0026([W,te]=[te,W]);const j=Math.min(W,te)/8,J=A[R+1];s=Math.max(s,Math.abs(F)+W/2),a=Math.max(a,Math.abs(O)+te/2),r.push(e.pillpads?XM(J,F,O,W,te):Jo(J,F,O,W,te,j))}if(e.thermalpad){const R={x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety};if(typeof e.thermalpad==\"boolean\"){const F=(e.px??e.p)*(l-1)+e.pw,O=(e.py??e.p)*(c-1)+n;s=Math.max(s,Math.abs(R.x)+F/2),a=Math.max(a,Math.abs(R.y)+O/2),r.push(EQ({x:F,y:O},R))}else s=Math.max(s,Math.abs(R.x)+e.thermalpad.x/2),a=Math.max(a,Math.abs(R.y)+e.thermalpad.y/2),r.push(EQ(e.thermalpad,R))}const f=[];for(const[R,F,O]of[[\"top-left\",-1,1],[\"bottom-left\",-1,-1],[\"bottom-right\",1,-1],[\"top-right\",1,1]]){const U=e.w/2*F,Y=e.h/2*O;let W=\"none\",te=U,j=Y;const J=e.pw*2;A[1]===1\u0026\u0026R===\"top-left\"?W=\"in1\":A[_]===1\u0026\u0026R===\"top-left\"||A[m]===1\u0026\u0026R===\"top-right\"?W=\"in2\":A[p]===1\u0026\u0026R===\"top-right\"||A[u]===1\u0026\u0026R===\"bottom-left\"?W=\"in1\":A[g]===1\u0026\u0026R===\"bottom-left\"?W=\"in2\":A[h]===1\u0026\u0026R===\"bottom-right\"?W=\"in1\":A[d]===1\u0026\u0026R===\"bottom-right\"\u0026\u0026(W=\"in2\");const oe=W===\"in1\"?1:-1;if(e.legsoutside){const ie=W===\"in1\"?e.pl/2:e.pw/2,ne=W===\"in1\"?e.pw/2:e.pl/2;te+=ie*F*oe,j-=ne*O*oe}(W===\"none\"||e.legsoutside)\u0026\u0026f.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}`,route:[{x:U-J*F,y:Y},{x:U,y:Y},{x:U,y:Y-J*O}],type:\"pcb_silkscreen_path\",stroke_width:.1}),(W===\"in1\"||W===\"in2\")\u0026\u0026!e.legsoutside\u0026\u0026f.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_1`,route:[{x:U-J*F,y:Y},{x:U-J*F/2,y:Y}],type:\"pcb_silkscreen_path\",stroke_width:0},{layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_2`,route:[{x:U,y:Y-J*O/2},{x:U,y:Y-J*O}],type:\"pcb_silkscreen_path\",stroke_width:.1}),(W===\"in1\"||W===\"in2\")\u0026\u0026f.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_3`,route:[{x:te-.2*-F,y:j+.2*oe},{x:te,y:j},{x:te+.2*oe*-F,y:j+.2},{x:te-.2*-F,y:j+.2*oe}],type:\"pcb_silkscreen_path\",stroke_width:.1})}const I=yi(0,e.h/2+(e.legsoutside?e.pl*1.2:.5),.3),C=R=\u003eMath.ceil(R/.05)*.05,y=(l-1)*(e.px??e.p)+e.pw,x=(c-1)*(e.py??e.p)+n,E=y/2+.25,B=x/2+.25,S=e.w/2+.25,Q=e.h/2+.25,w=Math.max(S,C(s+.25)),M=Math.max(Q,C(a+.25)),k={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-w,maxX:w,minY:-B,maxY:B},{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-E,maxX:E,minY:-M,maxY:M}])};return{circuitJson:[...r,...f,I,k],parameters:e}},e7n=K4.refine(({x:t,y:e})=\u003eNumber.isInteger(t)\u0026\u0026Number.isInteger(e)\u0026\u0026t\u003e0\u0026\u0026e\u003e0,\"thermal via grid dimensions must be positive integers\"),pxe=ce.refine(t=\u003et\u003e0,{message:\"thermal via dimensions must be positive\"}),mxe=Pt({thermalvias:xo([$e(!0),e7n]).optional(),thermalviapitch:pxe.optional(),thermalviaid:pxe.optional().describe(\"thermal via inner (hole) diameter\"),thermalviaod:pxe.optional().describe(\"thermal via outer diameter\")}),kne={grid:{x:4,y:4},pitch:ce.parse(\"1mm\"),holeDiameter:ce.parse(\"0.3048mm\"),outerDiameter:ce.parse(\"0.6096mm\")},t7n=(t,e)=\u003e{if(!t.thermalvias)return[];const n=t.thermalvias===!0?kne.grid:t.thermalvias,o=t.thermalviapitch??kne.pitch,i=t.thermalviaid??kne.holeDiameter,r=t.thermalviaod??kne.outerDiameter;if(r\u003ci)throw new Error(\"thermalviaod must be greater than or equal to thermalviaid\");const s=(n.x-1)*o+r,a=(n.y-1)*o+r;if(s\u003ee.width||a\u003ee.height)throw new Error(\"thermal via grid must fit inside thermalpad\");return Array.from({length:n.x*n.y},(A,c)=\u003e{const l=c%n.x,u=Math.floor(c/n.x);return{pcb_via_id:\"\",type:\"pcb_via\",x:e.x+(l-(n.x-1)/2)*o,y:e.y+(u-(n.y-1)/2)*o,hole_diameter:i,outer_diameter:r,layers:[\"top\",\"bottom\"]}})},zAt=(t,e)=\u003e{if(!e.thermalvias)return t;const n=t.find(o=\u003eo.type===\"pcb_smtpad\"\u0026\u0026o.port_hints.includes(\"thermalpad\"));if(!n)throw new Error(\"thermalvias requires a thermalpad\");return[...t,...t7n(e,n)]};Rne.extend(mxe.shape).transform(Tne);var n7n=t=\u003e{const e={...t,legsoutside:!1,pl:t.pl??.875,pw:t.pw??.25},n=eD(e),o=mxe.parse(t);return{circuitJson:zAt(n.circuitJson,o),parameters:{...n.parameters,...o}}},o7n=t=\u003e{if(t.legsoutside=!0,!t.p)switch(t.num_pins){case 32:t.p=.8;break;case 44:case 48:t.p=.5;break;case 64:case 80:case 100:t.p=.5;break;case 144:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 32:case 44:case 48:case 64:case 80:case 100:t.pl=1.475;break;case 144:t.pl=1.6;break}if(!t.pw)switch(t.num_pins){case 32:t.pw=.55;break;case 44:case 48:case 64:case 80:case 100:t.pw=.3;break;case 144:t.pw=.25;break}return eD(t)},i7n=t=\u003e{t.legsoutside=!0;const e=VAt.parse(t);if(!t.p)switch(t.num_pins){case 44:case 64:t.p=.8;break;case 52:t.w===14?t.p=1:t.p=.65;break;case 208:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 44:case 52:case 64:t.pl=2.25;break;case 208:t.pl=1.65;break;default:t.pl=e.pl*4;break}if(!t.pw)switch(t.num_pins){case 44:case 64:t.pw=.5;break;case 52:t.w===14?t.pw=.45:t.pw=.55;break;case 208:t.pw=.3;break;default:t.pw=e.pw;break}return eD(t)};Rne.extend({}).transform(Tne);var r7n=t=\u003e(t.legsoutside=!1,t.thermalpad===void 0\u0026\u0026(t.thermalpad=!0),eD(t)),s7n=Ii.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(\"3.9mm\")),p:ce.default(ce.parse(\"1.27mm\")),pw:ce.optional(),pl:ce.optional(),legsoutside:je().optional().default(!1),thermalpad:K4.optional(),...zk,silkscreen_stroke_width:_t().optional().default(.1)}).transform(t=\u003e(t.pw==null\u0026\u0026t.pl==null?(t.pw=ce.parse(\"0.51mm\"),t.pl=ce.parse(\"1.1mm\")):t.pw==null?t.pw=t.pl*(.51/1.1):t.pl==null\u0026\u0026(t.pl=t.pw*(1.1/.51)),t)),a7n=t=\u003e{const{num_pins:e,pn:n,w:o,p:i}=t,r=e/2,s=n\u003c=r,a=r-1,A=i,c=A*a,l=o+ce.parse(\"0.2mm\"),u=(s?-1:1)*(l/2);return s?{x:u,y:c/2-(n-1)*A}:{x:u,y:-c/2+(n-r-1)*A}},A7n=t=\u003e{const e=s7n.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let _=0;_\u003ce.num_pins;_++){const{x:f,y:I}=a7n({num_pins:e.num_pins,pn:_+1,w:e.w,p:e.p,pl:e.pl,legsoutside:e.legsoutside});n.push(Jo(_+1,f,I,e.pl,e.pw,o))}e.thermalpad\u0026\u0026n.push(EQ(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const i=Math.min(1,e.p/2),r=e.w-(e.legsoutside?0:e.pl)-.2,s=(e.num_pins/2-1)*e.p+e.pw+i,a=yi(0,s/2+.4,s/12),A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",stroke_width:e.silkscreen_stroke_width??.1,route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...Pne.map(({x:_,y:f})=\u003e({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}]},c=(e.num_pins/2-1)*e.p+e.pw,l=e.legsoutside?e.w/2+e.pl:(e.w+.2)/2+e.pl/2,u=c/2,g=l+.25,h=g,d=u+.445,p=d,m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:xy([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:\"top\"};return{circuitJson:[...n,A,a,m],parameters:e}},c7n=Ii.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(\"3.0mm\")),p:ce.default(ce.parse(\"0.5mm\")),pw:ce.default(ce.parse(\"0.30mm\")),pl:ce.default(ce.parse(\"1.45mm\")),legsoutside:je().optional().default(!0),thermalpad:K4.optional(),...zk,silkscreen_stroke_width:_t().optional().default(.1)}),l7n=t=\u003e{const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n\u003c=a,c=a-1,l=i*c,u=s?r/2:-r/2;return A?{x:-o/2-u,y:l/2-(n-1)*i}:{x:o/2+u,y:-l/2+(n-a-1)*i}},u7n=t=\u003e{const e={...t},n=e.p,o=typeof n==\"string\"||typeof n==\"number\"?ce.parse(n):void 0,i=o!=null\u0026\u0026o\u003c=ce.parse(\"0.5mm\"),r=c7n.parse(e),s=[],a=r.rounded??Math.min(r.pl,r.pw)/8,A=i?r.w-ce.parse(\"0.15mm\"):r.w;for(let y=0;y\u003cr.num_pins;y++){const{x,y:E}=l7n({num_pins:r.num_pins,pn:y+1,w:A,p:r.p,pl:r.pl,legsoutside:r.legsoutside});s.push(Jo(y+1,x,E,r.pl,r.pw,a))}r.thermalpad\u0026\u0026s.push(EQ(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const c=Math.min(1,r.p/2),l=r.w-(r.legsoutside?0:r.pl*2)-.2,u=(r.num_pins/2-1)*r.p+r.pw+c,g=yi(0,u/2+.4,u/12),h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",stroke_width:r.silkscreen_stroke_width??.1,route:[{x:-l/2,y:-u/2},{x:-l/2,y:u/2},...Pne.map(({x:y,y:x})=\u003e({x:y*l/6,y:x*l/6+u/2})),{x:l/2,y:u/2},{x:l/2,y:-u/2},{x:-l/2,y:-u/2}]},d=(r.num_pins/2-1)*r.p+r.pw,p=r.w/2+(r.legsoutside?r.pl:0),m=r.w/2+.25,_=p+.18,f=d/2+.25,I=f+.35,C={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-_,maxX:_,minY:-f,maxY:f},{minX:-m,maxX:m,minY:-I,maxY:I}])};return{circuitJson:[...s,h,g,C],parameters:r}},g7n=[{x:-1.45,y:.93},{x:-.73,y:.93},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.93},{x:1.45,y:.93},{x:1.45,y:-.93},{x:.73,y:-.93},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.93},{x:-1.45,y:-.93}],d7n=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"3.1mm\"),h:Z().default(\"2.0mm\"),p:Z().default(\"0.65mm\"),pl:Z().default(\"1.03mm\"),pw:Z().default(\"0.35mm\"),string:Z().optional()}),h7n=t=\u003e{const e=d7n.parse({...t,fn:\"sot363\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=JAt(p+1,n,i);A.push(Jo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/4,y:o/2+.1},{x:n/4,y:o/2+.1}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/4,y:-o/2-.1},{x:n/4,y:-o/2-.1}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=JAt(1,n,i),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=yi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:g7n,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},JAt=(t,e,n,o)=\u003et\u003c=3?{x:-.84,y:n-(t-1)*n}:{x:.84,y:-n+(t-4)*n},p7n=[{x:-.75,y:1},{x:-.75,y:-1},{x:.75,y:-1},{x:.75,y:1}],m7n=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"1.01mm\"),h:Z().default(\"1.45mm\"),p:Z().default(\"0.5mm\"),pl:Z().default(\"0.33mm\"),pw:Z().default(\"0.27mm\"),string:Z().optional()}),_7n=t=\u003e{const e=m7n.parse({...t,fn:\"sot886\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=WAt(p+1,n,i,r);A.push(Jo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=WAt(1,n,i,r),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=yi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:p7n,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},WAt=(t,e,n,o)=\u003e{const i=e/2-o/2;return t\u003c=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},f7n=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:.55},{x:2.05,y:.55},{x:2.05,y:-.55},{x:1.05,y:-.55},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5},{x:-2.05,y:-.39},{x:-1.05,y:-.39},{x:-1.05,y:.39},{x:-2.05,y:.39}],I7n=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:1.5},{x:2.05,y:1.5},{x:2.05,y:.39},{x:1.05,y:.39},{x:1.05,y:-.39},{x:2.05,y:-.39},{x:2.05,y:-1.5},{x:1.05,y:-1.5},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5}],jAt=Ii.extend({fn:Z(),num_pins:_t().default(3),w:Z().default(\"2.275mm\"),h:Z().default(\"2.74mm\"),pl:Z().default(\"1.325mm\"),pw:Z().default(\"0.6mm\"),p:Z().default(\"0.95mm\"),string:Z().optional()}),C7n=ZM({p:\"0.95mm\",w:\"1.6mm\",legsoutside:!0}),y7n=t=\u003e{const e=t.string?.match(/^sot23_(\\d+)/),n=e?Number.parseInt(e[1],10):3;if(n===6||n===8){const i=C7n.parse({...t,num_pins:n});return{circuitJson:IV(i),parameters:i}}const o=jAt.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:E7n(o),parameters:o};if(o.num_pins===5)return{circuitJson:qAt(o),parameters:o};throw new Error(\"Invalid number of pins\")},x7n=t=\u003e{const{pn:e,w:n,p:o}=t;return e===1?{x:-n/2,y:o}:e===2?{x:-n/2,y:-o}:{x:n/2,y:0}},E7n=t=\u003e{const e=[],n=Number.parseFloat(t.w);Number.parseFloat(t.h);const o=Number.parseFloat(t.pl),i=Number.parseFloat(t.pw),r=Number.parseFloat(t.p),s=t.rounded??Math.min(o,i)/8;for(let c=0;c\u003ct.num_pins;c++){const{x:l,y:u}=x7n({num_pins:t.num_pins,pn:c+1,w:n,p:r});e.push(Jo(c+1,l,u,o,i,s))}const a=yi(0,Number.parseInt(t.h),.3),A={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:f7n,layer:\"top\"};return[...e,a,A]},$At=t=\u003e{const{w:e,p:n,h:o,pn:i}=t;if(i===1)return{x:-e/2,y:n};if(i===2)return{x:-e/2,y:0};if(i===3)return{x:-e/2,y:-n};if(i===4)return{x:e/2,y:-n};if(i===5)return{x:e/2,y:n};throw new Error(\"Invalid pin number\")},qAt=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.p),r=Number.parseFloat(t.pl),s=Number.parseFloat(t.pw),a=t.rounded??Math.min(r,s)/8;for(let f=1;f\u003c=t.num_pins;f++){const{x:I,y:C}=$At({w:n,h:o,p:i,pn:f});e.push(Jo(f,I,C,r,s,a))}const A=(t.num_pins+1)/2*i,c=o,l={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-A/3,y:c/2+i/1.3},{x:A/3,y:c/2+i/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-A/3,y:-c/2-i/1.3},{x:A/3,y:-c/2-i/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},g=yi(0,c+.3,.3),h=$At({w:n,h:o,p:i,pn:1});h.x=h.x-s*1.5;const d=.3,p=.4,m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_indicator\",route:[{x:h.x+d/2,y:h.y},{x:h.x-d/2,y:h.y+p/2},{x:h.x-d/2,y:h.y-p/2},{x:h.x+d/2,y:h.y}],stroke_width:.05},_={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:I7n,layer:\"top\"};return[...e,g,l,u,m,_]},B7n=jAt.extend({}),b7n=t=\u003e{const e=B7n.parse({...t,num_pins:5});return{circuitJson:qAt(e),parameters:e}},S7n=[{name:\"top-left\",dx:-1,dy:1},{name:\"top-right\",dx:1,dy:1},{name:\"bottom-left\",dx:-1,dy:-1},{name:\"bottom-right\",dx:1,dy:-1}],_xe=(t,e)=\u003e({type:\"pcb_smtpad\",points:e,layer:\"top\",shape:\"polygon\",pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(n=\u003en.toString()):[t.toString()]}),Q7n=ZM({}).and(mxe),v7n=t=\u003e{const e=je().optional().parse(t.cornerpads),n=t.cornerpadcutlength===void 0?void 0:ce.parse(t.cornerpadcutlength),o=fV.parse(t.missing??[]);if(o.some(S=\u003etypeof S!=\"number\"))throw new Error(\"DFN missing positions must be pad numbers\");const i=[...new Set(o)];if(i.length!==o.length)throw new Error(\"DFN missing positions must not contain duplicates\");const r={...Q7n.parse(t),cornerpads:e,cornerpadcutlength:n,missing:i},s=r.num_pins;if(i.some(S=\u003eS\u003c1||S\u003es))throw new Error(\"DFN missing position is outside the nominal pad range\");if(e){if(s!==4||i.length\u003e0||r.pillpads)throw new Error(\"DFN corner pads require four nominal pads with none missing\");if(n===void 0||n\u003c=0||n\u003eMath.min(r.pl,r.pw))throw new Error(\"DFN corner pads require a valid cornerpadcutlength\")}const a=new Set(i),A=[],c=Math.min(r.pl,r.pw)/8;let l=0,u=1;for(let S=1;S\u003c=s;S+=1){if(a.has(S))continue;const{x:Q,y:w}=hxe({num_pins:s,pn:S,w:r.w,p:r.p??1.27,pl:r.pl,widthincludeslegs:!0});if(l=Math.max(l,Math.abs(w)+r.pw/2),e){const M=Math.sign(Q),k=Math.sign(w),R=Q-M*r.pl/2,F=w-k*r.pw/2,O=Q+M*r.pl/2,U=w+k*r.pw/2;A.push(_xe(u,[{x:R,y:F+k*n},{x:R,y:U},{x:O,y:U},{x:O,y:F},{x:R+M*n,y:F}]))}else A.push((r.pillpads?XM:Jo)(u,Q,w,r.pl??\"1mm\",r.pw??\"0.6mm\",c));u+=1}r.thermalpad\u0026\u0026A.push(EQ(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const g=Math.min(1,r.p/2),h=r.w+g,d=l*2+g,p=[];for(const S of S7n){const{dx:Q,dy:w}=S;p.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",route:[{x:Q*h/2-Q*r.p,y:w*d/2},{x:Q*h/2,y:w*d/2},{x:Q*h/2,y:w*d/2-w*r.p}],type:\"pcb_silkscreen_path\",stroke_width:.1})}const m=r.p/4,_=-h/2-m/2,f=d/2-r.p/2;p.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:_,y:f},{x:_-m,y:f+m},{x:_-m,y:f-m},{x:_,y:f}],stroke_width:.1});const I=yi(0,d/2+.4,d/12),C=S=\u003eMath.ceil(S/.05)*.05,y=C(r.w/2+.25),x=C(l+.45),E={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:y*2,height:x*2,layer:\"top\"},B=[...A,I,...p,E];return{circuitJson:zAt(B,r),parameters:r}};function XAt({pinlabeltextalignleft:t,pinlabeltextalignright:e,pinlabelorthogonal:n}){let o=\"top\";return n?o=\"left\":o=\"top\",t\u0026\u0026(n?o=\"bottom\":o=\"right\"),e\u0026\u0026(n?o=\"top\":o=\"left\"),o}var tD=({fs:t,pn:e,anchor_x:n,anchor_y:o,textalign:i=\"center\",anchorplacement:r,orthogonal:s=!1,verticallyinverted:a=!1,layer:A=\"top\"})=\u003e{let c=0;s\u0026\u0026a?c=270:a?c=180:s?c=90:c=0;let l=\"center\";if(i!==\"center\"\u0026\u0026(l=i===\"left\"?a?\"center_right\":\"center_left\":a?\"center_left\":\"center_right\",r)){const g={top:{x:0,y:1},bottom:{x:0,y:-1},left:{x:-1,y:0},right:{x:1,y:0}}[r],h=c*Math.PI/180,d={x:Math.cos(h),y:Math.sin(h)},p=g.x*d.x+g.y*d.y;Math.abs(p)\u003e.5\u0026\u0026(l=p\u003e0?\"center_left\":\"center_right\")}return A===\"bottom\"\u0026\u0026(l===\"center_left\"?l=\"center_right\":l===\"center_right\"\u0026\u0026(l=\"center_left\")),{type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:\"silkscreen_text_1\",font:\"tscircuit2024\",font_size:t,pcb_component_id:\"pcb_component_1\",text:`{PIN${e}}`,layer:A,anchor_position:{x:n,y:o},anchor_alignment:l,ccw_rotation:c}},w7n=Ii.extend({fn:Z(),num_pins:_t().optional().default(6),rows:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional().default(1).describe(\"number of rows\"),cols:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional().describe(\"number of nominal columns in a sparse grid\"),p:ce.default(\"0.1in\").describe(\"pitch\"),py:ce.optional().describe(\"vertical row pitch\"),id:ce.default(\"1.0mm\").describe(\"inner diameter\"),od:ce.default(\"1.5mm\").describe(\"outer diameter\"),missing:fV.default([]).describe(\"row-major nominal grid positions to omit\"),male:je().optional().describe(\"for male pin headers\"),female:je().optional().describe(\"for female pin headers\"),smd:je().optional().describe(\"surface mount device\"),surfacemount:je().optional().describe(\"surface mount device (verbose)\"),rightangle:je().optional().describe(\"right angle\"),pw:ce.optional().default(\"1.0mm\").describe(\"pad width for SMD\"),pl:ce.optional().default(\"2.0mm\").describe(\"pad length for SMD\"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nosquareplating:je().optional().default(!1).describe(\"do not use rectangular pad for pin 1\"),nopinlabels:je().optional().default(!1).describe(\"omit silkscreen pin labels\"),doublesidedpinlabel:je().optional().default(!1).describe(\"add silkscreen pins in top and bottom layers\"),bottomsidepinlabel:je().optional().default(!1).describe(\"place the silkscreen reference text on the bottom layer instead of top\"),silkscreenborder:je().optional().default(!1).describe(\"add a rectangular silkscreen border around the pin row\"),silkscreenlabel:Z().transform(t=\u003et.startsWith(\"(\")\u0026\u0026t.endsWith(\")\")?t.slice(1,-1):t).optional().describe(\"replace the reference designator with a custom silkscreen label\")}).transform(t=\u003e{const e=XAt(t);return{...t,pinlabelAnchorSide:e,male:t.male??!t.female,female:t.female??!1,smd:t.smd??t.surfacemount??!1,rightangle:t.rightangle??!1}}).superRefine((t,e)=\u003e{t.male\u0026\u0026t.female\u0026\u0026e.addIssue({code:lo.custom,message:\"'male' and 'female' cannot both be true; it should be male or female.\",path:[\"male\",\"female\"]}),t.cols!==void 0\u0026\u0026(!Number.isInteger(t.cols)||t.cols\u003c1)\u0026\u0026e.addIssue({code:lo.custom,message:\"'cols' must be a positive integer\",path:[\"cols\"]}),t.missing.some(n=\u003etypeof n!=\"number\")\u0026\u0026e.addIssue({code:lo.custom,message:\"'missing' positions must be pad numbers\",path:[\"missing\"]})}),ZAt=t=\u003e{const e=w7n.parse(t),{p:n,py:o,id:i,od:r,rows:s,cols:a,num_pins:A,missing:c,pinlabelAnchorSide:l,pinlabelverticallyinverted:u,pinlabelorthogonal:g,pinlabeltextalignleft:h,pinlabeltextalignright:d,nopinlabels:p,doublesidedpinlabel:m,bottomsidepinlabel:_,silkscreenborder:f,silkscreenlabel:I}=e;let C=\"center\";h?C=\"left\":d\u0026\u0026(C=\"right\");const y=[];let x=null;const E=c,B=new Set(E);if(B.size!==E.length)throw new Error(\"Pinrow missing positions must not contain duplicates\");const S=A+E.length,Q=a??Math.ceil(S/s),w=Q*s,M=a!==void 0||E.length\u003e0;if(M\u0026\u0026w!==S)throw new Error(`Pinrow grid has ${w} positions, but ${S} are required for ${A} pins and ${E.length} missing positions`);if(E.some(he=\u003e!Number.isInteger(he)||he\u003c1||he\u003ew))throw new Error(\"Pinrow missing position is outside the nominal grid\");const k=o??n,R=(s-1)*k,F=R/2,O=-k,U=({xoff:he,yoff:Qe,od:Pe,anchorSide:we,smd:Te,pw:Re,pl:Ee})=\u003e{let ke=0,Ce=0;if(Te){const Le=Pe/5;switch(we){case\"right\":ke=Re/2+Le;break;case\"top\":Ce=Ee/2+Le;break;case\"bottom\":Ce=-(Ee/2+Le);break;case\"left\":ke=-(Re/2+Le);break}}else{const Le=Pe/2+.6;switch(we){case\"right\":ke=Le;break;case\"top\":Ce=Le;break;case\"bottom\":Ce=-Le;break;case\"left\":ke=-Le;break}}return{anchor_x:he+ke,anchor_y:Qe+Ce}},Y=(he,Qe,Pe)=\u003e{he===1\u0026\u0026(x={x:Qe,y:Pe}),e.smd?y.push(Jo(he,Qe,Pe,e.pw,e.pl)):he===1\u0026\u0026!e.nosquareplating?y.push(yy({pn:he,x:Qe,y:Pe,holeDiameter:i,rectPadWidth:r,rectPadHeight:r})):y.push(ks(he,Qe,Pe,i,r));const{anchor_x:we,anchor_y:Te}=U({xoff:Qe,yoff:Pe,od:r,anchorSide:l,smd:e.smd,pw:e.pw,pl:e.pl});p||(_?y.push(tD({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:\"bottom\"})):y.push(tD({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:\"top\"})),m\u0026\u0026y.push(tD({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:\"bottom\"})))},W=new Set;if(M){const he=-((Q-1)/2)*n;let Qe=1;for(let Pe=0;Pe\u003cs;Pe++)for(let we=0;we\u003cQ;we++){const Te=Pe*Q+we+1;if(B.has(Te))continue;const Re=he+we*n,Ee=F+Pe*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Qe++,Re,Ee)}}else if(s===1){const he=-((A-1)/2)*n;for(let Qe=0;Qe\u003cA;Qe++){const Pe=Qe+1,we=he+Qe*n,Te=`${we},0`;if(W.has(Te))throw new Error(`Overlap at ${Te}`);W.add(Te),Y(Pe,we,0)}}else if(s\u003e2\u0026\u0026Q\u003e2){const Qe=-((Q-1)/2)*n;let Pe=1;for(let we=0;we\u003cs\u0026\u0026Pe\u003c=A;we++)for(let Te=0;Te\u003cQ\u0026\u0026Pe\u003c=A;Te++){const Re=Qe+Te*n,Ee=F+we*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Pe++,Re,Ee)}}else{const Qe=-((Q-1)/2)*n;let Pe=1,we=0,Te=s-1,Re=0,Ee=Q-1;for(;Pe\u003c=A\u0026\u0026we\u003c=Te\u0026\u0026Re\u003c=Ee;){for(let ke=we;ke\u003c=Te\u0026\u0026Pe\u003c=A;ke++){const Ce=Qe+Re*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Re++;for(let ke=Re;ke\u003c=Ee\u0026\u0026Pe\u003c=A;ke++){const Ce=Qe+ke*n,Le=F+Te*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}if(Te--,Re\u003c=Ee){for(let ke=Te;ke\u003e=we\u0026\u0026Pe\u003c=A;ke--){const Ce=Qe+Ee*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Ee--}if(we\u003c=Te){for(let ke=Ee;ke\u003e=Re\u0026\u0026Pe\u003c=A;ke--){const Ce=Qe+ke*n,Le=F+we*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}we++}}if(Pe-1\u003cA)throw new Error(`Missing pins: assigned ${Pe-1}, expected ${A}`)}const te=e.smd?e.pw/2:r/2,j=e.smd?e.pl/2:r/2,J=(Q-1)*n,oe=J/2+n/2+1,ie=Math.max(R/2+j+1,n/2+1),ne=f?iA([{x:-oe,y:-ie},{x:oe,y:-ie},{x:oe,y:ie},{x:-oe,y:ie},{x:-oe,y:-ie}]):null,le=(()=\u003e{if(e.fn!==\"headermodule\"||!x)return null;const he=Math.max(.3,Math.min(.6,n/4)),Qe=.15;if(l===\"top\"||l===\"bottom\"){const Ee=Math.sign(x.x)||(l===\"top\"?-1:1),ke=x.x+Ee*(te+Qe),Ce=ke+Ee*he;return iA([{x:ke,y:x.y},{x:Ce,y:x.y-he},{x:Ce,y:x.y+he},{x:ke,y:x.y}],{pcb_component_id:\"pin_marker_1\",pcb_silkscreen_path_id:\"pin_marker_1\"})}const we=Math.sign(x.y)||1,Te=x.y+we*(j+Qe),Re=Te+we*he;return iA([{x:x.x,y:Te},{x:x.x-he,y:Re},{x:x.x+he,y:Re},{x:x.x,y:Te}],{pcb_component_id:\"pin_marker_1\",pcb_silkscreen_path_id:\"pin_marker_1\"})})(),ge=I?{type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:\"silkscreen_text_1\",font:\"tscircuit2024\",font_size:.8,pcb_component_id:\"pcb_component_1\",text:I,layer:\"top\",anchor_position:{x:0,y:0},anchor_alignment:\"center\"}:yi(0,R/2+n,.5),_e=J/2+te,ue=R/2+j,fe=J/2+n/2,pe=R/2+n/2,ye=Math.max(_e+.25,fe+.5),Me=Math.max(ue+.25,pe+.5),ve={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*ye,height:2*Me,layer:\"top\"};return{circuitJson:[...y,...ne?[ne]:[],...le?[le]:[],ge,ve],parameters:e}},P7n=t=\u003eZAt({...t,fn:\"headermodule\"}),M7n=[{x:-1.2,y:.83},{x:-.75,y:.83},{x:-.75,y:.95},{x:.75,y:.95},{x:.75,y:.83},{x:1.2,y:.83},{x:1.2,y:-.83},{x:.75,y:-.83},{x:.75,y:-.95},{x:-.75,y:-.95},{x:-.75,y:-.83},{x:-1.2,y:-.83}],D7n=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"2.1mm\"),h:Z().default(\"2.45mm\"),p:Z().default(\"0.5mm\"),pl:Z().default(\"0.675mm\"),pw:Z().default(\"0.35mm\"),string:Z().optional()}),N7n=t=\u003e{const e=D7n.parse({...t,fn:\"sot563\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=ect(p+1,n,i,r);A.push(Jo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=ect(1,n,i,r),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=yi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:M7n,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},ect=(t,e,n,o)=\u003e{const i=e/2-o/2;return t\u003c=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},R7n=ZM({p:\"1.27mm\",w:\"3.9mm\",legsoutside:!0}),T7n=t=\u003e{const e=R7n.parse({...t,num_pins:8});return{circuitJson:IV(e),parameters:e}},k7n=ZM({p:\"1.27mm\",w:\"7.5mm\",legsoutside:!0}),F7n=t=\u003e{const e=k7n.parse({...t,num_pins:16});return{circuitJson:IV(e),parameters:e}},L7n=Ii.extend({fn:Z(),num_pins:$e(3).default(3),w:Z().default(\"1.2mm\"),h:Z().default(\"1.2mm\"),pw:Z().default(\"0.40mm\"),pl:Z().default(\"0.45mm\"),p:Z().default(\"0.575mm\")}),H7n=t=\u003e{const e=L7n.parse(t),n=G7n(e),o=yi(0,ce.parse(e.h),.2),i=1.8,r=1.8,s={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:[{x:-i/2,y:r/2},{x:i/2,y:r/2},{x:i/2,y:-r/2},{x:-i/2,y:-r/2}],layer:\"top\"};return{circuitJson:[...n,o,s],parameters:e}},O7n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:n,y:0}:e===2?{x:-n,y:-.4}:{x:-n,y:.4}},G7n=t=\u003e{const e=[];Number.parseFloat(t.w),Number.parseFloat(t.h);const n=Number.parseFloat(t.pl),o=Number.parseFloat(t.pw),i=Number.parseFloat(t.p),r=Math.min(n,o)/8;for(let s=0;s\u003c3;s++){const{x:a,y:A}=O7n({num_pins:t.num_pins,pn:s+1,p:i});e.push(Jo(s+1,a,A,n,o,r))}return e},Y7n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"2.36mm\"),h:Z().default(\"1.22mm\"),pl:Z().default(\"0.9mm\"),pw:Z().default(\"1.2mm\"),p:Z().default(\"3.30mm\")}),U7n=t=\u003e{const e=Y7n.parse(t),n=ce.parse(e.h),o=yi(0,n/4+.4,.3),s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.7,height:2.3,layer:\"top\"};return{circuitJson:V7n(e).concat(...Xd(e),o,s),parameters:e}},K7n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},V7n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=K7n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1125))}return e},z7n=Ii.extend({fn:Z(),p:ce.optional().default(\"2.54mm\"),id:ce.optional().default(\"0.7mm\"),od:ce.optional().default(\"1.4mm\")}),J7n=t=\u003e{const e=z7n.parse(t),{p:n,id:o,od:i}=e,r=[ks(1,-n/2,0,o,i),ks(2,n/2,0,o,i)],s={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2+i+o/2,y:0},{x:n/2-i-o/2,y:0}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},a=yi(0,1.5,.5),A=-n/2,c=n/2,l=i/2,u=i/2,g=A-l-.35,h=c+l+.26,d=u+.35,p=g,m=h,_=d,f={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:xy([{minX:g,maxX:h,minY:-_,maxY:_},{minX:p,maxX:m,minY:-d,maxY:d}]),layer:\"top\"};return{circuitJson:[...r,s,a,f],parameters:e}},W7n=(t,e,n,o,i,r=.1)=\u003e{const s=[],a=[],A=Math.max(1,Math.ceil(Math.PI*n/r)),c=Math.PI/A;for(let l=0;l\u003c=A;l++){const u=l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g\u003ct-o\u0026\u0026h\u003e=e-i/2\u0026\u0026h\u003c=e+i/2||s.push({x:g,y:h})}for(let l=0;l\u003c=A;l++){const u=Math.PI+l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g\u003ct-o\u0026\u0026h\u003e=e-i/2\u0026\u0026h\u003c=e+i/2||a.push({x:g,y:h})}return{topArc:s,bottomArc:a}},j7n=Ii.extend({fn:Z(),p:ce.optional().default(\"5mm\"),id:ce.optional().default(\"0.8mm\"),od:ce.optional().default(\"1.6mm\"),ceramic:je().optional(),electrolytic:je().optional(),polarized:je().optional()}),$7n=t=\u003e{const e=j7n.parse(t),{p:n,id:o,od:i}=e;o===.8\u0026\u0026i===1.6\u0026\u0026(e.id=n===5?.8:n*.25,e.od=n===5?1.6:n*.5);const r=[ks(1,-n/2,0,e.id,e.od),ks(2,n/2,0,e.id,e.od)],s=n+.1,{topArc:a,bottomArc:A}=W7n(0,0,s,e.od/2,e.od),c=.02*n,l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:a,stroke_width:c,pcb_silkscreen_path_id:\"\"},u={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:A,stroke_width:c,pcb_silkscreen_path_id:\"\"},g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:0,y:s},{x:0,y:-s}],stroke_width:c,pcb_silkscreen_path_id:\"\"},h=.1*n,d=-(n+h+.04*n),p=s-h-.08*n,m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d-h,y:p},{x:d+h,y:p}],stroke_width:c,pcb_silkscreen_path_id:\"\"},_={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d,y:p-h},{x:d,y:p+h}],stroke_width:c,pcb_silkscreen_path_id:\"\"},f=yi(0,s+.12*n,.1*n),I=[...r,l,u,g,f];(e.electrolytic===!0||e.polarized===!0)\u0026\u0026I.push(m,_);const y=n+.25,x={type:\"pcb_courtyard_circle\",pcb_courtyard_circle_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},radius:y,layer:\"top\"};return I.push(x),{circuitJson:I,parameters:e}},q7n=Ii.extend({fn:$e(\"rj45\"),num_pins:xo([$e(10),$e(14)]).default(10),ledpins:je().default(!1).describe(\"add the four through-hole LED connections as pins 9 through 12\"),firstpinleft:je().default(!1).describe(\"mirror the eight signal pins so pin 1 is on the left\"),firstpintop:je().default(!1).describe(\"mirror the eight signal pins so pin 1 is in the top row\"),p:ce.default(\"1.02mm\").describe(\"horizontal signal-pin pitch\"),py:ce.default(\"1.78mm\").describe(\"signal-row pitch\"),id:ce.default(\"0.9144mm\").describe(\"signal and LED hole diameter\"),od:ce.default(\"1.524mm\").describe(\"signal and LED outer diameter\"),shieldx:ce.default(\"8.13mm\").describe(\"shield-pin x offset from the footprint center\"),shieldy:ce.default(\"0.13mm\").describe(\"signed shield-pin y offset from the signal-row center\"),shieldid:ce.default(\"1.8mm\").describe(\"shield-pin hole diameter\"),shieldod:ce.default(\"2.5mm\").describe(\"shield-pin outer diameter\"),holex:ce.default(\"6.35mm\").describe(\"locator-hole x offset from the footprint center\"),holey:ce.default(\"-3.43mm\").describe(\"signed locator-hole y offset from the signal-row center\"),holed:ce.default(\"3.25mm\").describe(\"locator-hole diameter\"),ledx:ce.default(\"4.57mm\").describe(\"inner LED-pin x offset from the footprint center\"),ledp:ce.default(\"2.29mm\").describe(\"pitch within each LED-pin pair\"),ledy:ce.default(\"5.7mm\").describe(\"signed LED-pin y offset from the signal-row center\"),w:ce.default(\"16.26mm\").describe(\"connector body width\"),h:ce.default(\"15.88mm\").describe(\"connector body height\"),bodyy:ce.default(\"-0.96mm\").describe(\"signed connector body center y offset\")}),X7n=t=\u003e{const e=t.ledpins===!0||t.num_pins===14,n=q7n.parse({...t,ledpins:e,num_pins:e?14:10}),{ledpins:o,firstpinleft:i,firstpintop:r,p:s,py:a,id:A,od:c,shieldx:l,shieldy:u,shieldid:g,shieldod:h,holex:d,holey:p,holed:m,ledx:_,ledp:f,ledy:I,w:C,h:y,bodyy:x}=n,E=Me=\u003eNumber(Me.toFixed(12)),B=Array.from({length:8},(Me,ve)=\u003e{const he=ve+1,Qe=(3.5-ve)*s,Pe=ve%2===0?-a/2:a/2,we=E(i?-Qe:Qe),Te=E(r?-Pe:Pe);return ks(he,we,Te,A,c)}),S=o?[ks(9,E(-_-f),I,A,c),ks(10,-_,I,A,c),ks(11,_,I,A,c),ks(12,E(_+f),I,A,c)]:[],Q=o?14:9,w=o?13:10,M=i!==r,k=M?w:Q,R=M?Q:w,F=[ks(k,-l,u,g,h),ks(R,l,u,g,h)],O=[-d,d].map(Me=\u003e({type:\"pcb_hole\",pcb_hole_id:\"\",pcb_component_id:\"\",hole_shape:\"circle\",hole_diameter:m,x:Me,y:p})),U=-C/2,Y=C/2,W=x-y/2,te=x+y/2,j=h/2+.2,J=[[W,Math.min(te,u-j)],[Math.max(W,u+j),te]].filter(([Me,ve])=\u003eve-Me\u003e.01),oe=[iA([{x:U,y:W},{x:Y,y:W}]),iA([{x:U,y:te},{x:Y,y:te}]),...J.flatMap(([Me,ve])=\u003e[iA([{x:U,y:Me},{x:U,y:ve}]),iA([{x:Y,y:Me},{x:Y,y:ve}])])],ie=Math.min(-l-h/2,-d-m/2,o?-_-f-c/2:0),ne=-ie,le=Math.min(u-h/2,p-m/2,-a/2-c/2,o?I-c/2:Number.POSITIVE_INFINITY),ge=Math.max(u+h/2,p+m/2,a/2+c/2,o?I+c/2:Number.NEGATIVE_INFINITY),_e=Math.min(U,ie)-.25,ue=Math.max(Y,ne)+.25,fe=Math.min(W,le)-.25,pe=Math.max(te,ge)+.25,ye={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(_e+ue)/2,y:(fe+pe)/2},width:ue-_e,height:pe-fe,layer:\"top\"};return{circuitJson:[...O,...B,...S,...F,...oe,yi(0,pe+.55,.5),ye],parameters:n}},Z7n=Ii.extend({fn:$e(\"pushbutton\"),w:ce.default(4.5),h:ce.default(6.5),id:ce.default(1),od:ce.default(1.2)}),e6n=t=\u003e{const e=Z7n.parse(t),n=e.w,o=e.h,i=e.id,r=[ks(1,-n/2,o/2,i,i*1.5),ks(2,-n/2,-o/2,i,i*1.5),ks(3,n/2,-o/2,i,i*1.5),ks(4,n/2,o/2,i,i*1.5)],s=[iA([{x:-n/2,y:-o/2},{x:-n/2,y:o/2}]),iA([{x:n/2,y:-o/2},{x:n/2,y:o/2}]),iA([{x:-n/2,y:0},{x:-n/5,y:0},{x:n/5*1/Math.sqrt(2),y:o/8}]),iA([{x:n/2,y:0},{x:n/5,y:0}])],a=yi(0,o/2+.4,.5),A=i*1.5/2,c=n,l=o,u=c/2+A,g=l/2+A,h=u+.5,d=g+.5,p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*h,height:2*d,layer:\"top\"};return{circuitJson:[...r,...s,a,p],parameters:e}},tct=Ii.extend({fn:Z(),w:ce.default(\"22.58mm\"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse(\"2.54mm\")),pw:ce.default(ce.parse(\"1.6mm\")),pl:ce.default(ce.parse(\"2.4mm\")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse(\"1.61mm\")),silkscreenlabels:je().default(!1),silkscreenlabelmargin:ce.default(ce.parse(\"0.1mm\"))}),t6n=t=\u003e{const e=tct.parse(t);return e.left\u0026\u0026e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},Fne=(t,e,n)=\u003e{let o=[];return n===\"right\"\u0026\u0026(o=[{x:t+1/2,y:e},{x:t-1/2,y:e+.6/2},{x:t-1/2,y:e-.6/2},{x:t+1/2,y:e}]),n===\"left\"\u0026\u0026(o=[{x:t-1/2,y:e},{x:t+1/2,y:e+.6/2},{x:t+1/2,y:e-.6/2},{x:t-1/2,y:e}]),n===\"top\"\u0026\u0026(o=[{x:t,y:e+1/2},{x:t-.6/2,y:e-1/2},{x:t+.6/2,y:e-1/2},{x:t,y:e+1/2}]),n===\"bottom\"\u0026\u0026(o=[{x:t,y:e-1/2},{x:t-.6/2,y:e+1/2},{x:t+.6/2,y:e+1/2},{x:t,y:e-1/2}]),o},n6n=t=\u003e{const e=tct.parse(t),n=e.h??t6n(e),o=[],i=[],r=[];let s=[];const a=1,A=a,c=e.left+e.right+(e.bottom??0)+(e.top??0),u=`pin${c}`.length*.7/2;if(e.right){const p=-((e.right-1)/2)*e.p;for(let m=0;m\u003ce.right;m++){if(m===0\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=Fne(e.w/2-e.pl*1.4,p+m*e.p,\"right\")),o.push(Jo(m+1+e.left+(e.bottom??0),e.w/2-e.pl/2,p+m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1+e.left+(e.bottom??0),f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:e.w/2-e.pl-(u+e.silkscreenlabelmargin),y:p+m*e.p},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"})}e.innerhole\u0026\u0026(i.push(ks(m+1+e.left+(e.bottom??0)+c,e.w/2,p+m*e.p,a,A)),i.push(ks(m+1+e.left+(e.bottom??0)+c*2,e.w/2-e.innerholeedgedistance,p+m*e.p,a,A)))}}if(e.left){const p=(e.left-1)/2*e.p;for(let m=0;m\u003ce.left;m++){if(m===0\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=Fne(-e.w/2+e.pl*1.4,p-m*e.p,\"left\")),o.push(Jo(m+1,-e.w/2+e.pl/2,p-m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1,f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:-e.w/2+e.pl+(u+e.silkscreenlabelmargin),y:p-m*e.p},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"})}e.innerhole\u0026\u0026(i.push(ks(m+1+c,-e.w/2,p-m*e.p,a,A)),i.push(ks(m+1+c*2,-e.w/2+e.innerholeedgedistance,p-m*e.p,a,A)))}}if(e.top){const p=(e.top-1)/2*e.p;for(let m=0;m\u003ce.top;m++){if(m===0\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026!e.right\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=Fne(p-m*e.p,n/2-e.pl*1.4,\"top\")),o.push(Jo(m+1+e.left+e.right+(e.bottom??0),p-m*e.p,n/2-e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left+e.right+(e.bottom??0),f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:p-m*e.p,y:n/2-e.pl-(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\",ccw_rotation:270})}e.innerhole\u0026\u0026(i.push(ks(m+1+e.left+e.right+(e.bottom??0)+c,p-m*e.p,n/2,a,A)),i.push(ks(m+1+e.left+e.right+(e.bottom??0)+c*2,p-m*e.p,n/2-e.innerholeedgedistance,a,A)))}}if(e.bottom){const p=-((e.bottom-1)/2)*e.p;for(let m=0;m\u003ce.bottom;m++){if(m===0\u0026\u0026!e.left\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=Fne(p+m*e.p,-n/2+e.pl*1.4,\"bottom\")),o.push(Jo(m+1+e.left,p+m*e.p,-n/2+e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left,f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:p+m*e.p,y:-n/2+e.pl+(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\",ccw_rotation:90})}e.innerhole\u0026\u0026(i.push(ks(m+1+e.left+c,p+m*e.p,-n/2,a,A)),i.push(ks(m+1+e.left+c*2,p+m*e.p,-n/2+e.innerholeedgedistance,a,A)))}}const g={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_triangle_1\",pcb_component_id:\"2\",route:s,stroke_width:.1,layer:\"top\"},h={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_path_1\",pcb_component_id:\"1\",route:[{x:-e.w/2,y:n/2},{x:e.w/2,y:n/2},{x:e.w/2,y:-n/2},{x:-e.w/2,y:-n/2},{x:-e.w/2,y:n/2}],stroke_width:.1,layer:\"top\"},d=yi(0,n/1.8,n/25);return{circuitJson:[...o,...i,...r,h,...e.silkscreenlabels?[]:[g],d],parameters:e}},nct=Ii.extend({fn:Z(),w:ce.default(\"22.58mm\"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse(\"2.54mm\")),pw:ce.default(ce.parse(\"1.6mm\")),pl:ce.default(ce.parse(\"3.2mm\")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse(\"1.61mm\"))}),o6n=t=\u003e{const e=nct.parse(t);return e.left\u0026\u0026e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},i6n=(t,e,n,o=1,i=.6)=\u003e{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},r6n=t=\u003e{const e=nct.parse(t),n=e.h??o6n(e),o=[],i=[],r=[],s=1,a=1.2,A=e.left+e.right+(e.bottom??0)+(e.top??0);let c=[],l=1;if(e.left){const d=(e.left-1)/2*e.p;for(let p=0;p\u003ce.left;p++)p===0\u0026\u0026(c=i6n(-e.w/2-e.pl/2,d-p*e.p,\"left\")),o.push(Jo(l,-e.w/2+e.pl/2,d-p*e.p,e.pl,e.pw)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:-e.w/2+e.pl/2-4.5,y:d-p*e.p},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(ks(l+A,-e.w/2+e.innerholeedgedistance,d-p*e.p,s,a))}if(e.bottom){const d=(e.bottom-1)/2*e.p;for(let p=e.bottom-1;p\u003e=0;p--)o.push(Jo(l,d-p*e.p,-n/2+e.pl/2,e.pw,e.pl)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:d-p*e.p,y:-n/2+e.pl/2-3.2},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(ks(l+A,d-p*e.p,-n/2+e.innerholeedgedistance,s,a))}if(e.right){const d=-((e.right-1)/2)*e.p;for(let p=0;p\u003ce.right;p++)o.push(Jo(l,e.w/2-e.pl/2,d+p*e.p,e.pl,e.pw)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:e.w/2-e.pl/2+3.7,y:d+p*e.p},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(ks(l+A,e.w/2-e.innerholeedgedistance,d+p*e.p,s,a))}if(e.top){const d=-((e.top-1)/2)*e.p;for(let p=e.top-1;p\u003e=0;p--)o.push(Jo(l,d+p*e.p,n/2-e.pl/2,e.pw,e.pl)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:d+p*e.p,y:n/2-e.pl/2+3.2},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(ks(l+A,d+p*e.p,n/2-e.innerholeedgedistance,s,a))}const u={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"1\",pcb_component_id:\"1\",layer:\"top\",route:c,stroke_width:.1},g={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_path_1\",pcb_component_id:\"1\",route:[{x:-e.w/2-e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:n/2+e.pl/3}],stroke_width:.1,layer:\"top\"},h=yi(0,n/1.8,n/25);return{circuitJson:[...r,...o,...i,g,u,h],parameters:e}},s6n=t=\u003e(t.legsoutside=!0,t.pl||(t.pl=1.5),t.pw||(t.pw=.3),eD(t)),a6n=Ii.extend({fn:Z(),num_pins:_t().int().positive().optional().default(14),grid:K4.optional(),p:ce.default(ce.parse(\"0.5mm\")),w:ce.optional(),h:ce.optional(),pw:ce.default(ce.parse(\"0.28mm\")),pl:ce.default(ce.parse(\"0.7mm\")),pillpads:je().optional().default(!1)}),A6n=t=\u003e{const e=a6n.parse(t),n=e.num_pins/2;if(!Number.isInteger(n))throw new Error(\"LGA footprints require an even number of perimeter pads\");const o=e.grid??{x:Math.ceil(n/2),y:Math.floor(n/2)};if(!Number.isInteger(o.x)||!Number.isInteger(o.y)||o.x\u003c0||o.y\u003c0||o.x+o.y\u003c=0||2*(o.x+o.y)!==e.num_pins)throw new Error(`LGA grid ${o.x}x${o.y} requires ${2*(o.x+o.y)} pads, got ${e.num_pins}`);const i=e.w??(o.y-1)*e.p+2*e.pl,r=e.h??(o.x-1)*e.p+2*e.pl,s=(i-e.pl)/2,a=(r-e.pl)/2,A=[],c=(p,m,_,f,I)=\u003e{A.push(e.pillpads?XM(p,m,_,f,I):Jo(p,m,_,f,I))};let l=1;for(let p=0;p\u003co.x;p+=1)c(l++,-s,((o.x-1)/2-p)*e.p,e.pl,e.pw);for(let p=0;p\u003co.y;p+=1)c(l++,(p-(o.y-1)/2)*e.p,-a,e.pw,e.pl);for(let p=0;p\u003co.x;p+=1)c(l++,s,(p-(o.x-1)/2)*e.p,e.pl,e.pw);for(let p=0;p\u003co.y;p+=1)c(l++,((o.y-1)/2-p)*e.p,a,e.pw,e.pl);const u=Math.max(e.pw,.15),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_marker\",stroke_width:.1,route:[{x:-i/2,y:r/2-u},{x:-i/2,y:r/2},{x:-i/2+u,y:r/2}]},h=.25,d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:[{x:-i/2-h,y:-r/2-h},{x:i/2+h,y:-r/2-h},{x:i/2+h,y:r/2+h},{x:-i/2-h,y:r/2+h},{x:-i/2-h,y:-r/2-h}]};return{circuitJson:[...A,g,yi(0,r/2+.5,.3),d],parameters:{...e,grid:o,w:i,h:r}}},oct=Ii.extend({fn:Z(),w:ce.default(\"10mm\"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(0),bottom:ce.optional().default(0),p:ce.default(ce.parse(\"2.54mm\")),id:ce.optional().default(ce.parse(\"1mm\")),od:ce.optional().default(ce.parse(\"1.5mm\"))}),c6n=t=\u003e{const e=oct.parse(t);return e.left\u0026\u0026e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},Lne=(t,e,n,o=1,i=.6)=\u003e{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},l6n=t=\u003e{const e=oct.parse(t),n=e.h??c6n(e),o=[],i=e.id,r=e.od;let s=[];if(e.right){const l=-((e.right-1)/2)*e.p;for(let u=0;u\u003ce.right;u++)u===0\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026(s=Lne(e.w/2+r*1.4,l+u*e.p,\"right\")),o.push(ks(u+1+e.left+(e.bottom??0),e.w/2,l+u*e.p,i,r))}if(e.left){const l=-((e.left-1)/2)*e.p;for(let u=0;u\u003ce.left;u++)u===e.left-1\u0026\u0026(s=Lne(-e.w/2-r*1.4,l+u*e.p,\"left\")),o.push(ks(u+1,-e.w/2,l+u*e.p,i,r))}if(e.top){const l=-((e.top-1)/2)*e.p;for(let u=0;u\u003ce.top;u++)u===e.top-1\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026!e.right\u0026\u0026(s=Lne(l+u*e.p,n/2+r*1.4,\"top\")),o.push(ks(u+1+e.right+(e.bottom??0)+e.left,l+u*e.p,n/2,i,r))}if(e.bottom){const l=-((e.bottom-1)/2)*e.p;for(let u=0;u\u003ce.bottom;u++)u===0\u0026\u0026!e.left\u0026\u0026(s=Lne(l+u*e.p,-n/2-r*1.4,\"bottom\")),o.push(ks(u+1+e.left,l+u*e.p,-n/2,i,r))}const a={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"1\",pcb_component_id:\"1\",layer:\"top\",route:s,stroke_width:.1},A={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_path_1\",pcb_component_id:\"1\",route:[{x:-e.w/2-r,y:n/2+r},{x:e.w/2+r,y:n/2+r},{x:e.w/2+r,y:-n/2-r},{x:-e.w/2-r,y:-n/2-r},{x:-e.w/2-r,y:n/2+r}],stroke_width:.1,layer:\"top\"},c=yi(0,n/1.7,n/25);return{circuitJson:[...o,A,c,a],parameters:e}},u6n=t=\u003e{const{centerX:e,centerY:n,straightHalfLength:o,radius:i,arcSegmentCount:r=9,orientation:s=\"horizontal\"}=t;if(o\u003c0)throw new Error(\"Capsule straightHalfLength must be non-negative\");if(i\u003c=0)throw new Error(\"Capsule radius must be positive\");if(r\u003c2)throw new Error(\"Capsule arcSegmentCount must be at least 2\");if(s===\"horizontal\"){const u=e-o,g=e+o,h=Array.from({length:r+1},(p,m)=\u003e{const _=Math.PI/2-m*Math.PI/r;return{x:g+Math.cos(_)*i,y:n+Math.sin(_)*i}}),d=Array.from({length:r+1},(p,m)=\u003e{const _=-Math.PI/2+m*Math.PI/r;return{x:u-Math.cos(_)*i,y:n+Math.sin(_)*i}});return[{x:u,y:n+i},{x:g,y:n+i},...h.slice(1,-1),{x:g,y:n-i},{x:u,y:n-i},...d.slice(1,-1)]}const a=n-o,A=n+o,c=Array.from({length:r+1},(u,g)=\u003e{const h=Math.PI-g*Math.PI/r;return{x:e+Math.cos(h)*i,y:A+Math.sin(h)*i}}),l=Array.from({length:r+1},(u,g)=\u003e{const h=g*Math.PI/r;return{x:e+Math.cos(h)*i,y:a-Math.sin(h)*i}});return[{x:e-i,y:a},{x:e-i,y:A},...c.slice(1,-1),{x:e+i,y:A},{x:e+i,y:a},...l.slice(1,-1)]},ict=(t,e,n,o)=\u003eArray.from({length:25},(i,r)=\u003e{const s=r/24*Math.PI-Math.PI/2;return{x:t+(o===\"right\"?1:-1)*Math.cos(s)*n,y:e+Math.sin(s)*n}}),g6n=Ii.extend({fn:Z(),p:ce.optional().default(\"4.88mm\"),id:ce.optional().default(\"0.8mm\"),od:ce.optional().default(\"1.5mm\"),w:ce.optional().default(\"5.6mm\"),h:ce.optional().default(\"3.5mm\")}),d6n=t=\u003e{const e=g6n.parse(t),{p:n,id:o,od:i,w:r,h:s}=e,a=s/2,A=[ks(1,-n/2,0,o,i),ks(2,n/2,0,o,i)],c=ict(-r/2,0,a,\"left\"),l=ict(r/2,0,a,\"right\"),u={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[...c,...c.slice(1).reverse(),{x:-r/2,y:-s/2},{x:r/2,y:-s/2},...l,{x:r/2,y:s/2},{x:-r/2,y:s/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},g=yi(0,n/4,.5),d=n/2+i/2,p=Math.max(s/2+.25,r/2+.03),m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:u6n({centerX:0,centerY:0,straightHalfLength:d,radius:p,arcSegmentCount:9}),layer:\"top\"};return{circuitJson:[...A,u,g,m],parameters:e}};Ii.extend({w:ce,h:ce});var h6n=t=\u003e{const{w:e,h:n}=t,o=KA(e),i=KA(n);return{circuitJson:[Jo(1,0,0,o,i),yi(0,i/2+.5,.2)],parameters:t}},T9=(t,e,n,o,i,r)=\u003e({pcb_plated_hole_id:\"\",type:\"pcb_plated_hole\",shape:\"pill\",x:e,y:n,outer_width:KA(i),outer_height:KA(r),hole_width:KA(o),hole_height:KA(o),pcb_port_id:\"\",layers:[\"top\",\"bottom\"],port_hints:[t.toString()],ccw_rotation:0}),p6n=[{x:-2.5,y:4.75},{x:-2.5,y:-.25},{x:2.5,y:-.25},{x:2.5,y:4.75}],m6n=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default(\"1.27mm\"),id:Z().default(\"0.72mm\"),od:Z().default(\"0.95mm\"),w:Z().default(\"4.5mm\"),h:Z().default(\"4.5mm\"),inline:je().default(!1),string:Z().optional()}),_6n=(t,e,n)=\u003eArray.from({length:25},(o,i)=\u003e{const r=i/24*Math.PI;return{x:t+Math.cos(r)*n,y:e+Math.sin(r)*n}}),f6n=t=\u003e{const e=t.string?.match(/^to92_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=m6n.parse({...t,num_pins:n}),{p:i,id:r,od:s,w:a,h:A,inline:c}=o,l=Number.parseFloat(A)/2,u=Number.parseFloat(i),g=Number.parseFloat(r),h=Number.parseFloat(s),d=h,p=h*(1.5/1.05);let m=[];if(o.num_pins===3)c?m=[yy({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:p}),T9(2,0,l-u,g,d,p),T9(3,u,l-u,g,d,p)]:m=[yy({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:h}),ks(2,0,l,g,h),ks(3,u,l-u,g,h)];else if(o.num_pins===2)m=[yy({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:d,rectPadHeight:p}),T9(2,u,l-u,g,d,p)];else throw new Error(\"Invalid number of pins for TO-92\");const _=Number.parseFloat(a)/2,f=_6n(0,l,_),I={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[...f,{x:-_,y:0},{x:_,y:0},f[0]],stroke_width:.1,pcb_silkscreen_path_id:\"\"},C=yi(0,l+1,.5),y={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:p6n,layer:\"top\"};return{circuitJson:[...m,I,C,y],parameters:o}},I6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"2.15mm\"),h:Z().default(\"0.7mm\"),pl:Z().default(\"0.6mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"1.4mm\")}),C6n=t=\u003e{const e=I6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2.5,height:1.4,layer:\"top\"};return{circuitJson:x6n(e).concat(...Xd(e),o,n,s),parameters:e}},y6n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},x6n=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.075;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=y6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},E6n=ZM({w:\"7.05mm\",p:\"1.27mm\",pw:\"0.65mm\",pl:\"1.975mm\"}),B6n=t=\u003e{const e=E6n.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let h=0;h\u003ce.num_pins;h++){const{x:d,y:p}=hxe({num_pins:e.num_pins,pn:h+1,w:e.w,p:e.p??1.27,pl:e.pl,widthincludeslegs:!0});n.push(Jo(h+1,d,p,e.pl,e.pw,o))}const i=(e.num_pins/2-1)*e.p+e.pw,r=yi(0,i/2+1,i/12),s={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:-e.w/3,y:i/2+.4},{x:e.w/3,y:i/2+.4}],stroke_width:.1},a=(e.num_pins/2-1)*e.p+e.pw,A=e.w/2-1.395,c=e.w/2+.255,l=a/2+.25,u=a/2+.5,g={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-c,maxX:c,minY:-l,maxY:l},{minX:-A,maxX:A,minY:-u,maxY:u}])};return{circuitJson:[...n,r,s,g],parameters:e}},b6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"5.0mm\"),h:Z().default(\"2.30mm\"),pl:Z().default(\"1.25mm\"),pw:Z().default(\"2mm\"),p:Z().default(\"3.75mm\")}),S6n=t=\u003e{const e=b6n.parse(t),n=yi(0,ce.parse(e.h)/2+1,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2+.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2-.5},{x:ce.parse(e.p)/2+.5,y:-ce.parse(e.h)/2-.5}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:5.1,height:2.8,layer:\"top\"};return{circuitJson:v6n(e).concat(...Xd(e),o,n,s),parameters:e}},Q6n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},v6n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=Q6n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},w6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.4mm\"),h:Z().default(\"1.7mm\"),pl:Z().default(\"1.2mm\"),pw:Z().default(\"1.2mm\"),p:Z().default(\"2.8mm\")}),P6n=t=\u003e{const e=w6n.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.5,height:2.2,layer:\"top\"};return{circuitJson:D6n(e).concat(...Xd(e),o,n,s),parameters:e}},M6n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},D6n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=M6n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},N6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.30mm\"),h:Z().default(\"1.80mm\"),pl:Z().default(\"0.60mm\"),pw:Z().default(\"0.45mm\"),p:Z().default(\"2.1mm\")}),R6n=t=\u003e{const e=N6n.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.2,height:1.9,layer:\"top\"};return{circuitJson:k6n(e).concat(...Xd(e),o,n,s),parameters:e}},T6n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},k6n=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.05625;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=T6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},F6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.4mm\"),h:Z().default(\"0.9mm\"),pl:Z().default(\"0.36mm\"),pw:Z().default(\"0.25mm\"),p:Z().default(\"0.85mm\")}),L6n=t=\u003e{const e=F6n.parse(t),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.pl),r=ce.parse(e.pw),s=ce.parse(e.p),a=yi(0,o,.3),A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:s/2+.15,y:o/2},{x:-n/2-.15,y:o/2},{x:-n/2-.15,y:-o/2},{x:s/2+.15,y:-o/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},c=s+i,l=r,u=n/2,g=o/2,h=c/2,d=l/2,p=Math.max(u,h),m=Math.max(g,d),_=Math.min(u,h),f=Math.min(g,d),I=p+.05,C=_-.055,y=m,x=f+.155,E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:xy([{minX:-I,maxX:I,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-y,maxY:y}]),layer:\"top\"};return{circuitJson:O6n(e).concat(...Xd(e),A,a,E),parameters:e}},H6n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},O6n=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.03125;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=H6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},G6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.3mm\"),h:Z().default(\"0.9mm\"),pl:Z().default(\"0.4mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"0.7mm\")}),Y6n=t=\u003e{const e=G6n.parse(t),n=yi(0,ce.parse(e.h)+.1,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2+.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2+.2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:1.6,height:1.2,layer:\"top\"};return{circuitJson:K6n(e).concat(...Xd(e),o,n,s),parameters:e}},U6n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},K6n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=U6n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.025))}return e},V6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.05mm\"),h:Z().default(\"1.4mm\"),pl:Z().default(\"0.5mm\"),pw:Z().default(\"0.5mm\"),pad_spacing:Z().default(\"2.2mm\")}),z6n=t=\u003e{const e=V6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.2,height:1.9,layer:\"top\"};return{circuitJson:W6n(e).concat(...Xd(e),o,n,s),parameters:e}},J6n=t=\u003e{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},W6n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=J6n({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},j6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.4mm\"),h:Z().default(\"2.1mm\"),pl:Z().default(\"1.10mm\"),pw:Z().default(\"1.10mm\"),p:Z().default(\"2.8mm\")}),$6n=t=\u003e{const e=j6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.4,height:2.3,layer:\"top\"};return{circuitJson:X6n(e).concat(...Xd(e),o,n,s),parameters:e}},q6n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},X6n=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=q6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},Z6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.4mm\"),h:Z().default(\"2.1mm\"),pl:Z().default(\"0.91mm\"),pw:Z().default(\"1.22mm\"),p:Z().default(\"3.146mm\")}),e8n=t=\u003e{const e=Z6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.9,height:2.7,layer:\"top\"};return{circuitJson:n8n(e).concat(...Xd(e),o,n,s),parameters:e}},t8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},n8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=t8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},o8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.80mm\"),h:Z().default(\"1.00mm\"),pl:Z().default(\"0.66mm\"),pw:Z().default(\"0.5mm\"),p:Z().default(\"0.8mm\")}),i8n=t=\u003e{const e=o8n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2.3,height:1.5,layer:\"top\"};return{circuitJson:s8n(e).concat(...Xd(e),o,n,s),parameters:e}},r8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},s8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=r8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},a8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"6.2mm\"),h:Z().default(\"3.4mm\"),pl:Z().default(\"1.4mm\"),pw:Z().default(\"2.1mm\"),p:Z().default(\"4.4mm\")}),A8n=t=\u003e{const e=a8n.parse(t),n=yi(0,ce.parse(e.h)/2+.4,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:6.3,height:3,layer:\"top\"};return{circuitJson:l8n(e).concat(...Xd(e),o,n,s),parameters:e}},c8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},l8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=c8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},u8n=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.25,y:2.5},{x:2.25,y:-2.5}],g8n=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.85,y:2.5},{x:2.85,y:-2.5}],d8n=[{x:.9,y:.5},{x:2.6,y:.5},{x:2.6,y:-.5},{x:.9,y:-.5},{x:.4,y:-1},{x:-.4,y:-1},{x:-.9,y:-.5},{x:-2.6,y:-.5},{x:-2.6,y:.5},{x:-.9,y:.5},{x:-.4,y:1},{x:.4,y:1}],h8n=[{x:2,y:-.8665},{x:-1.125,y:-.8665},{x:-1.125,y:-.45},{x:-2.6,y:-.45},{x:-2.6,y:.45},{x:-1.125,y:.45},{x:-1.125,y:.8665},{x:2,y:.8665}],p8n=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(5)]).default(3),w:Z().default(\"4.20mm\"),h:Z().default(\"4.80mm\"),pl:Z().default(\"1.3mm\"),pw:Z().default(\"0.9mm\"),p:Z().default(\"1.5mm\"),string:Z().optional()}),m8n=t=\u003e{const e=Number.parseFloat(t.p),n=Number.parseFloat(t.pw),o=Number.parseFloat(t.w),i=Number.parseFloat(t.pl),r=Math.min(i,n)/8,s=-o/2+.15,a=o/2-1,A=Number.parseFloat(t.h)/2,c=[Jo(1,s,e,i,n,r),_xe(2,h8n),Jo(3,s,-e,i,n,r)],l=yi(0,A+.5,.3),u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-a,y:A},{x:a,y:A},{x:a,y:A/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},g={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-a,y:-A},{x:a,y:-A},{x:a,y:-A/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},h={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:u8n,layer:\"top\"};return[...c,u,g,l,h]},_8n=t=\u003e{const e=Math.min(1.5,.7)/8,n=[Jo(1,-1.85,-1.5,1.5,.7,e),Jo(2,-1.85,1.5,1.5,.7,e),_xe(3,d8n),Jo(4,1.85,-1.5,1.5,.7,e),Jo(5,1.85,1.5,1.5,.7,e)],o=Number.parseFloat(t.w)/2-1,i=Number.parseFloat(t.h)/2,r=yi(0,i+.5,.3),s={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-o,y:i},{x:o,y:i}],type:\"pcb_silkscreen_path\",stroke_width:.1},a={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-o,y:-i},{x:o,y:-i}],type:\"pcb_silkscreen_path\",stroke_width:.1},A={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:g8n,layer:\"top\"};return[...n,s,a,r,A]},f8n=t=\u003e{const e=t.string?.match(/^sot89_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=p8n.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:m8n(o),parameters:o};if(o.num_pins===5)return{circuitJson:_8n(o),parameters:o};throw new Error(\"Invalid number of pins for SOT89\")},I8n=Ii.extend({fn:Z(),p:ce.optional().default(\"5.0mm\"),id:ce.optional().default(\"1.0mm\"),od:ce.optional().default(\"1.9mm\"),w:ce.optional().default(\"13mm\"),h:ce.optional().default(\"7mm\"),num_pins:_t().optional(),string:Z().optional()}),rct=t=\u003e{const e=I8n.parse(t),{id:n,od:o,w:i,h:r,string:s}=e,a=e.num_pins??Number.parseInt(s?.match(/^to220(?:_|-)(\\d+)/i)?.[1]??\"3\"),A=-1,c=i/2,l=r/2,u=2.5,g=i*.4,h=Math.max(u,g/(a-1)),d=Array.from({length:a},(F,O)=\u003e{const U=a%2===0?(O-a/2+.5)*h:(O-Math.floor(a/2))*h;return ks(O+1,U,A,n,o)}),p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-c,y:-l},{x:c,y:-l},{x:c,y:l},{x:-c,y:l},{x:-c,y:-l}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},m=-l+2*r/3,_={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-c,y:m},{x:c,y:m}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},f=[{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-i/6,y:m},{x:-i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:i/6,y:m},{x:i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:\"\"}],I=yi(0,r/2+.6,.5),C=Math.max(...d.map(F=\u003eMath.abs(F.x)))+o/2,y=A+o/2,x=A-o/2,E=Math.max(C+.25,c-o*.59),B=l-o*.63,S=x-(o/2+.01),Q=-E,w=E,M=Math.min(S,x-.25),k=Math.max(B,y+.25),R={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(Q+w)/2,y:(M+k)/2},width:w-Q,height:k-M,layer:\"top\"};return{circuitJson:[...d,p,_,...f,I,R],parameters:{...e,p:h}}},fxe=2.54,C8n=Ii.extend({fn:Z(),id:ce.optional().default(\"1.2mm\"),od:ce.optional().default(\"1.905mm\"),ph:ce.optional().default(\"2mm\"),w:ce.optional().default(\"13mm\"),h:ce.optional().default(\"7mm\"),num_pins:_t().optional(),string:Z().optional()}),y8n=t=\u003e{const e=C8n.parse(t),n=e.num_pins??Number.parseInt(e.string?.match(/^to220f(?:_|-)(\\d+)/i)?.[1]??\"3\"),o=rct({...e,fn:\"to220\",string:e.string?.replace(/^to220f/i,\"to220\"),num_pins:n}),i=-1,r=Array.from({length:n},(a,A)=\u003e{const c=n%2===0?(A-n/2+.5)*fxe:(A-Math.floor(n/2))*fxe;return A===0?yy({pn:1,x:c,y:i,holeDiameter:e.id,rectPadWidth:e.od,rectPadHeight:e.ph}):T9(A+1,c,i,KA(e.id),KA(e.od),KA(e.ph))}),s=o.circuitJson.filter(a=\u003ea.type!==\"pcb_plated_hole\");return{circuitJson:[...r,...s],parameters:{...e,p:fxe,num_pins:n}}},x8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"5.40mm\"),h:Z().default(\"2.30mm\"),pl:Z().default(\"1.30mm\"),pw:Z().default(\"1.70mm\"),p:Z().default(\"3.5mm\")}),E8n=t=\u003e{const e=x8n.parse(t),n=yi(0,ce.parse(e.h)/2+.4,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:5.3,height:2.2,layer:\"top\"};return{circuitJson:b8n(e).concat(...Xd(e),o,n,s),parameters:e}},B8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},b8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=B8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},S8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.90mm\"),h:Z().default(\"1.33mm\"),pl:Z().default(\"0.5mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"0.8mm\")}),Q8n=t=\u003e{const e=S8n.parse(t),n=yi(0,ce.parse(e.h)+.1,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2+.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2+.1,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:1.8,height:1.2,layer:\"top\"};return{circuitJson:w8n(e).concat(...Xd(e),o,n,s),parameters:e}},v8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},w8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=v8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},P8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"7.0mm\"),h:Z().default(\"3.35mm\"),pl:Z().default(\"1.50mm\"),pw:Z().default(\"2.70mm\"),p:Z().default(\"4.8mm\")}),M8n=t=\u003e{const e=P8n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:6.8,height:3.2,layer:\"top\"};return{circuitJson:N8n(e).concat(...Xd(e),o,n,s),parameters:e}},D8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},N8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=D8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},R8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.0mm\"),h:Z().default(\"1.80mm\"),pl:Z().default(\"0.80mm\"),pw:Z().default(\"1.20mm\"),p:Z().default(\"1.6mm\")}),T8n=t=\u003e{const e=R8n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2.9,height:1.7,layer:\"top\"};return{circuitJson:F8n(e).concat(...Xd(e),o,n,s),parameters:e}},k8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},F8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=k8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},L8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"7.10mm\"),h:Z().default(\"3.40mm\"),pl:Z().default(\"2.50mm\"),pw:Z().default(\"1.80mm\"),p:Z().default(\"4.00mm\")}),H8n=t=\u003e{const e=L8n.parse(t),n=yi(0,ce.parse(e.h)/2+.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:7,height:3.5,layer:\"top\"};return{circuitJson:G8n(e).concat(...Xd(e),o,n,s),parameters:e}},O8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},G8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=O8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},Y8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.80mm\"),h:Z().default(\"2.10mm\"),pl:Z().default(\"1.30mm\"),pw:Z().default(\"1.40mm\"),p:Z().default(\"2.9mm\")}),U8n=t=\u003e{const e=Y8n.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.7,height:2.3,layer:\"top\"};return{circuitJson:V8n(e).concat(...Xd(e),o,n,s),parameters:e}},K8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},V8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=K8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},z8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"7.30mm\"),h:Z().default(\"4.40mm\"),pl:Z().default(\"2.50mm\"),pw:Z().default(\"2.30mm\"),p:Z().default(\"4.30mm\")}),J8n=t=\u003e{const e=z8n.parse(t),n=yi(0,ce.parse(e.h)/2+.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:7.3,height:4.5,layer:\"top\"};return{circuitJson:j8n(e).concat(...Xd(e),o,n,s),parameters:e}},W8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},j8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=W8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},$8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"10.70mm\"),h:Z().default(\"6.60mm\"),pl:Z().default(\"2.50mm\"),pw:Z().default(\"3.30mm\"),p:Z().default(\"6.80mm\")}),q8n=t=\u003e{const e=$8n.parse(t),n=yi(0,3,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:-ce.parse(e.h)/2+.8},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2+.8}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:9.8,height:6.7,layer:\"top\"};return{circuitJson:Z8n(e).concat(...Xd(e),o,n,s),parameters:e}},X8n=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Z8n=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=X8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},ebn=Ii.extend({fn:Z(),num_pins:_t().default(4),w:Z().default(\"8.50mm\"),h:Z().default(\"6.90mm\"),pl:Z().default(\"2mm\"),pw:Z().default(\"1.5mm\"),p:Z().default(\"2.30mm\"),tabpl:Z().optional(),tabpw:Z().default(\"3.8mm\"),taboffset:Z().default(\"0mm\"),string:Z().optional()}),tbn=t=\u003e{const e=t.string?.match(/^sot223_(\\d+)/),n=e?Number.parseInt(e[1],10):4;if(n===8){const i=ibn.parse({...t,num_pins:n});return{circuitJson:IV(i),parameters:i}}const o=ebn.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:obn(o),parameters:o};if(o.num_pins===5)return{circuitJson:sbn(o),parameters:o};if(o.num_pins===6)return{circuitJson:Abn(o),parameters:o};throw new Error(\"Invalid number of pins\")},nbn=t=\u003e{const{pn:e,w:n,p:o,taboffset:i}=t;return e===1?{x:-n/2+1.1,y:o}:e===2?{x:-n/2+1.1,y:0}:e===3?{x:-n/2+1.1,y:-o}:{x:n/2-1.1+i,y:0}},obn=t=\u003e{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h),s=Number.parseFloat(t.pl),a=Number.parseFloat(t.p),A=Number.parseFloat(t.pw),c=Number.parseFloat(t.tabpl??t.pl),l=Number.parseFloat(t.tabpw),u=Number.parseFloat(t.taboffset);for(let x=0;x\u003ct.num_pins;x++){const{x:E,y:B}=nbn({num_pins:t.num_pins,pn:x+1,w:i,p:a,taboffset:u}),S=x===3?l:A,Q=x===3?c:s,w=Math.min(Q,S)/8;n=Math.max(n,Math.abs(E)+Q/2),o=Math.max(o,Math.abs(B)+S/2),e.push(Jo(x+1,E,B,Q,S,w))}const g=yi(0,0,.3),h=i/2-2.4,d=r/2,p={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-h,y:d},{x:h,y:d},{x:h,y:d/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},m={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-h,y:-d},{x:h,y:-d},{x:h,y:-d/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},_=i/2,f=r/2,I=Math.max(n+.25,_+.15),C=Math.max(o+.25,f+.15),y={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*I,height:2*C,layer:\"top\"};return[...e,p,m,g,y]},ibn=ZM({p:\"0.90mm\",w:\"2.8mm\",legsoutside:!0}),rbn=t=\u003e{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:e/2+e};if(n===2)return{x:-o/2+1.2,y:e/2};if(n===3)return{x:-o/2+1.2,y:-e/2};if(n===4)return{x:-o/2+1.2,y:-e/2-e};if(n===5)return{x:o/2-1,y:0};throw new Error(\"Invalid pin number\")},sbn=t=\u003e{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h);for(let m=1;m\u003c=t.num_pins;m++){const{x:_,y:f}=rbn({p:1.5,pn:m,w:i});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===5?(I=3.4,C=1.8):(I=1,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Jo(m,_,f,C,I,y))}const s=i/2-2.4,a=r/2,A={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},c={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},l=yi(0,0,.3),u=i/2,g=r/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*h,height:2*d,layer:\"top\"};return[...e,A,c,l,p]},abn=t=\u003e{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:2*e};if(n===2)return{x:-o/2+1.2,y:e};if(n===3)return{x:-o/2+1.2,y:0};if(n===4)return{x:-o/2+1.2,y:-e};if(n===5)return{x:-o/2+1.2,y:-2*e};if(n===6)return{x:o/2-1.175,y:0};throw new Error(\"Invalid pin number\")},Abn=t=\u003e{const e=[];let n=0,o=0;const i=Number.parseFloat(t.h),r=8.7;for(let m=1;m\u003c=t.num_pins;m++){const{x:_,y:f}=abn({p:1.3,pn:m,w:r});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===6?(I=3.4,C=2.15):(I=.6,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Jo(m,_,f,C,I,y))}const s=Number.parseFloat(t.w)/2-2.4,a=i/2,A={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},c={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},l=yi(0,0,.3),u=Number.parseFloat(t.w)/2,g=i/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*h,height:2*d,layer:\"top\"};return[...e,A,c,l,p]},cbn=Ii.extend({fn:Z(),num_pins:_t().default(3),w:Z().default(\"3.40mm\"),h:Z().default(\"3.30mm\"),pl:Z().default(\"1mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"1.2mm\"),string:Z().optional()}),lbn=t=\u003e{const e=t.string?.match(/^sot23w_(\\d+)/),n=e?Number.parseInt(e[1],3):3,o=cbn.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:gbn(o),parameters:o};throw new Error(\"Invalid number of pins\")},ubn=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n,y:.95}:e===2?{x:-n,y:-.95}:{x:n,y:0}},gbn=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let I=0;I\u003ct.num_pins;I++){const{x:C,y}=ubn({num_pins:t.num_pins,pn:I+1,p:s});e.push(Jo(I+1,C,y,i,r,a))}const A=yi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-1,l=o/2,u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-c,y:l},{x:c+.3,y:l},{x:c+.3,y:l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},g={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-c,y:-l},{x:c+.3,y:-l},{x:c+.3,y:-l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},h=s+i/2,d=.95+r/2,p=o/2,m=h+.25,_=Math.max(d+.25,p+.09),f={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*m,height:2*_,layer:\"top\"};return[...e,u,g,A,f]},dbn=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default(\"1.27mm\"),id:Z().default(\"0.72mm\"),od:Z().default(\"0.95mm\"),w:Z().default(\"2.5mm\"),h:Z().default(\"4.2mm\"),string:Z().optional()}),hbn=t=\u003e{const{p:e,id:n,od:o,w:i,h:r}=t,s=Number.parseFloat(r)/2,a=Number.parseFloat(e);return[ks(1,-a,s-a,n,o),ks(2,0,s-a,n,o),ks(3,a,s-a,n,o)]},pbn=t=\u003e{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i)/2,s=Number.parseFloat(e),a=Number.parseFloat(n),A=Number.parseFloat(o),c=A*(1.5/1.05);return[yy({pn:1,x:-s,y:r-s,holeDiameter:a,rectPadWidth:A,rectPadHeight:c}),T9(2,s,r-s,a,A,c)]},mbn=t=\u003e{const e=t.string?.match(/^to92s_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=dbn.parse({...t,num_pins:n});let i=[];if(o.num_pins===3)i=hbn(o);else if(o.num_pins===2)i=pbn(o);else throw new Error(\"Invalid number of pins for TO-92\");const r=Number.parseFloat(o.h)/2,s=Number.parseFloat(o.p),a={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-r,y:r-s},{x:-1.9,y:0},{x:1.9,y:0},{x:r,y:r-s},{x:1.5,y:Number.parseFloat(o.h)/2+.5},{x:-1.5,y:Number.parseFloat(o.h)/2+.5},{x:-r,y:r-s}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},A=yi(0,r+1,.5),c=Number.parseFloat(o.od),l=r-s,u=-s-c/2,g=s+c/2,h=l-c/2,d=l+c/2,p=-r,m=r,_=0,f=r+.5,I=Math.min(u,p)-.25,C=Math.max(g,m)+.25,y=Math.min(h,_)-.25,x=Math.max(d,f)+.25,E={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(I+C)/2,y:(y+x)/2},width:C-I,height:x-y,layer:\"top\"};return{circuitJson:[...i,a,A,E],parameters:o}},_bn=Ii.extend({fn:Z(),p:ce.optional(),id:ce.optional(),pw:ce.optional(),pl:ce.optional(),w:ce.optional(),h:ce.optional(),mpx:ce.optional().describe(\"center-to-center distance between the SMD mounting pads\"),mpy:ce.optional().describe(\"mounting-pad row distance from the signal-pad row\"),mpw:ce.optional().describe(\"SMD mounting pad width\"),mpl:ce.optional().describe(\"SMD mounting pad length\"),mounttop:je().optional().describe(\"place SMD mounting pads above the signal-pad row\"),smd:je().optional().describe(\"Generic surface-mount JST-style connector with one signal row and two mounting pads.\"),sh:je().optional().describe('JST SH (Surface-mount) connector family. SH stands for \"Super High-density\".'),ph:je().optional().describe('JST PH (Through-hole) connector family. PH stands for \"Pin Header\".'),zh:je().optional().describe(\"JST ZH (Through-hole) connector family. 1.5mm pitch wire-to-board.\"),xh:je().optional().describe(\"JST XH (Through-hole) connector family. 2.5mm pitch wire-to-board.\"),string:Z().optional()}),fbn=()=\u003e({minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),bQ=({bounds:t,centerX:e,centerY:n,width:o,height:i})=\u003e{const r=o/2,s=i/2;t.minX=Math.min(t.minX,e-r),t.maxX=Math.max(t.maxX,e+r),t.minY=Math.min(t.minY,n-s),t.maxY=Math.max(t.maxY,n+s)},Ibn={ph:{p:ce.parse(\"2mm\"),id:ce.parse(\"0.75mm\"),pw:ce.parse(\"1.20mm\"),pl:ce.parse(\"1.75mm\"),h:ce.parse(\"5mm\")},sh:{p:ce.parse(\"1mm\"),pw:ce.parse(\"0.6mm\"),pl:ce.parse(\"1.55mm\"),w:ce.parse(\"5.8mm\"),h:ce.parse(\"7.8mm\")},smd:{p:ce.parse(\"2mm\"),id:0,pw:ce.parse(\"1mm\"),pl:ce.parse(\"3mm\"),mpw:ce.parse(\"1.8mm\"),mpl:ce.parse(\"3mm\"),mpy:ce.parse(\"2.5mm\"),w:ce.parse(\"8mm\"),h:ce.parse(\"5mm\")},zh:{p:ce.parse(\"1.5mm\"),id:ce.parse(\"0.73mm\"),pw:ce.parse(\"1.03mm\"),pl:ce.parse(\"1.73mm\"),w:ce.parse(\"3mm\"),h:ce.parse(\"3.5mm\")},xh:{p:ce.parse(\"2.5mm\"),pw:ce.parse(\"1.7mm\")}};function Cbn(t){return t.smd?\"smd\":t.sh?\"sh\":t.ph?\"ph\":t.zh?\"zh\":t.xh?\"xh\":\"ph\"}function ybn({variant:t,numPins:e,p:n,id:o,pw:i,pl:r,mpx:s,mpy:a,mpw:A,mpl:c,mounttop:l}){const u=[],g=fbn();let h=0;if(t===\"smd\"){const d=-((e-1)/2)*n;for(let m=0;m\u003ce;m++){const _=d+m*n;u.push(Jo(m+1,_,0,i,r)),bQ({bounds:g,centerX:_,centerY:0,width:i,height:r})}const p=a===0?0:(l?1:-1)*a;for(const[m,_]of[-s/2,s/2].entries())u.push(Jo(e+m+1,_,p,A,c)),bQ({bounds:g,centerX:_,centerY:p,width:A,height:c});h=Math.max(r/2,c/2)}else if(t===\"ph\"){const d=-((e-1)/2)*n;for(let p=0;p\u003ce;p++){const m=d+p*n;p===0?u.push(yy({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.1249998})):u.push(T9(p+1,m,0,o,i,r)),bQ({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t===\"zh\"){const d=-((e-1)/2)*n;for(let p=0;p\u003ce;p++){const m=d+p*n;p===0?u.push(yy({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12499977})):u.push(T9(p+1,m,0,o,i,r)),bQ({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t===\"xh\"){const d=-((e-1)/2)*n;for(let p=0;p\u003ce;p++){const m=d+p*n;p===0?u.push(yy({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12500015})):u.push(T9(p+1,m,0,o,i,r)),bQ({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else{const d=-((e-1)/2)*n;for(let m=0;m\u003ce;m++){const _=d+m*n;u.push(Jo(m+1,_,-1.325,i,r)),bQ({bounds:g,centerX:_,centerY:-1.325,width:i,height:r}),h=Math.max(h,r/2)}const p=(e-1)/2*n+1.3;u.push(Jo(e+1,-p,1.22,1.2,1.8)),u.push(Jo(e+2,p,1.22,1.2,1.8)),bQ({bounds:g,centerX:-p,centerY:1.22,width:1.2,height:1.8}),bQ({bounds:g,centerX:p,centerY:1.22,width:1.2,height:1.8}),h=Math.max(h,.9)}return{pads:u,padBounds:g,maxPadHalfY:h}}function xbn({variant:t,w:e,h:n,numPins:o,p:i}){const r=s=\u003e({type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:s,stroke_width:.1,pcb_silkscreen_path_id:\"\"});if(t===\"smd\")return[r([{x:-e/2,y:-n/2},{x:e/2,y:-n/2},{x:e/2,y:n/2},{x:-e/2,y:n/2},{x:-e/2,y:-n/2}])];if(t===\"ph\"){const s=n/2+.5,a=s-n;return[r([{x:-e/2,y:s},{x:e/2,y:s},{x:e/2,y:a},{x:-e/2,y:a},{x:-e/2,y:s}])]}else if(t===\"zh\"\u0026\u0026o\u0026\u0026i){const s=(o-1)*i,a=-s/2-1.5,A=s/2+1.5,c=-n/2,l=n/2;return[r([{x:a,y:c},{x:A,y:c},{x:A,y:l},{x:a,y:l},{x:a,y:c}])]}else if(t===\"xh\"\u0026\u0026o\u0026\u0026i){const s=-((o-1)/2)*i,a=Array.from({length:o},(I,C)=\u003es+C*i),A=a[0],c=a[o-1],l=(A+c)/2,u=-2.75,g=-3.51,h=2.46,d=2.75,p=1.5,m=.2,_=(I,C,y,x)=\u003er([{x:I,y:C},{x:y,y:C},{x:y,y:x},{x:I,y:x},{x:I,y:C}]),f=[];return f.push(_(A-2.56,h,c+2.56,g)),f.push(r([{x:A-1.6,y:d},{x:A-2.85,y:d},{x:A-2.85,y:p}])),f.push(r([{x:A-2.55,y:m},{x:A-1.8,y:m},{x:A-1.8,y:u},{x:l,y:u}])),f.push(r([{x:c+2.55,y:m},{x:c+1.8,y:m},{x:c+1.8,y:u},{x:l,y:u}])),f.push(_(A-2.55,2.45,A-.75,1.7)),c-.75\u003eA+.75\u0026\u0026f.push(_(A+.75,2.45,c-.75,1.7)),f.push(_(c+.75,2.45,c+2.55,1.7)),f}else return[]}var Ebn=t=\u003e{const e=_bn.parse(t),n=Cbn(e),o=Ibn[n];let i;const r=t.num_pins;typeof r==\"number\"\u0026\u0026(i=r);const s=typeof t.string==\"string\"?t.string:\"\",a=s.match(/(?:^|_)jst(\\d+)(?:_|$)/),A=s.match(/(?:^|_)zh(\\d+)(?:_|$)/);if(a\u0026\u0026a[1]){const fe=Number.parseInt(a[1],10);Number.isNaN(fe)||(i=fe)}if(A\u0026\u0026A[1]){const fe=Number.parseInt(A[1],10);Number.isNaN(fe)||(i=fe)}if(typeof i!=\"number\")throw new Error(`JST requires an explicit pin count (e.g. jst6_sh or .jst(6))${e.string?`, from string \"${e.string}\"`:\"\"}`);const c=e.p??o.p,l=e.id??(n===\"xh\"?i===2?1:.95:o.id),u=e.pw??o.pw,g=e.pl??(n===\"xh\"?i===2?2:1.95:o.pl),h=(i-1)*c+4,d=n===\"xh\"?(i-1)*c+5.12:n===\"ph\"?h:o.w,p=e.w??d,m=e.h??(n===\"xh\"?5.97:o.h),_=e.mpx??(i-1)*c+3.4,f=e.mpy??o.mpy??0,I=e.mpw??o.mpw??0,C=e.mpl??o.mpl??0,y=e.mounttop??!1,x=ybn({variant:n,numPins:i,p:c,id:l,pw:u,pl:g,mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}),{pads:E,padBounds:B,maxPadHalfY:S}=x,Q=n===\"smd\"?Math.max(p,2*Math.max(Math.abs(B.minX),Math.abs(B.maxX))+.4):p,w=n===\"smd\"?Math.max(m,2*Math.max(Math.abs(B.minY),Math.abs(B.maxY))+.4):m,M=xbn({variant:n,w:Q,h:w,numPins:i,p:c}),k=yi(0,w/2+1,.5),R=M.flatMap(fe=\u003efe.route),F=R.map(fe=\u003efe.x),O=R.map(fe=\u003efe.y),U=F.length\u003e0\u0026\u0026O.length\u003e0,Y=U?Math.min(B.minX,Math.min(...F)):B.minX,W=U?Math.max(B.maxX,Math.max(...F)):B.maxX,te=U?Math.min(B.minY,Math.min(...O)):B.minY,j=U?Math.max(B.maxY,Math.max(...O)):B.maxY,J=.5,oe=.05,ie=S+.085,ne=Y-J,le=W+J,ge=te-ie,_e=j+oe,ue=n===\"ph\"?{type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:-.55},width:(i-1)*c+4.9,height:5.5,layer:\"top\"}:n===\"xh\"?{type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:-.525},width:(i-1)*c+5.9,height:6.75,layer:\"top\"}:{type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(ne+le)/2,y:(ge+_e)/2},width:le-ne,height:_e-ge,layer:\"top\"};return{circuitJson:[...E,...M,k,ue],parameters:{...e,p:c,id:l,pw:u,pl:g,w:p,h:m,num_pins:i,sh:n===\"sh\",ph:n===\"ph\",smd:n===\"smd\",zh:n===\"zh\",xh:n===\"xh\",...n===\"smd\"?{mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}:{}}}},Bbn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.30mm\"),h:Z().default(\"1.70mm\"),pl:Z().default(\"0.80mm\"),pw:Z().default(\"1mm\"),p:Z().default(\"1.90mm\")}),bbn=t=\u003e{const e=Bbn.parse(t),n=yi(0,ce.parse(e.h)/2+.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.2,height:2,layer:\"top\"};return{circuitJson:Qbn(e).concat(...Xd(e),o,n,s),parameters:e}},Sbn=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Qbn=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=Sbn({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},vbn=t=\u003e{switch(t){case 8:return{w:\"3.06mm\",h:\"3.14mm\",p:\"0.65mm\",pl:\"1.6mm\",pw:\"0.5mm\"};case 10:return{w:\"3.10mm\",h:\"3.33mm\",p:\"0.5mm\",pl:\"1.45mm\",pw:\"0.3mm\"};default:return{w:\"3.06mm\",h:\"3.14mm\",p:\"0.65mm\",pl:\"1.6mm\",pw:\"0.5mm\"}}},wbn=Ii.extend({fn:Z(),num_pins:xo([$e(8),$e(10)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:K4.optional(),...zk,string:Z().optional()}),Pbn=t=\u003e{const e=wbn.parse(t),n=vbn(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[],l=e.num_pins/2;for(let S=0;S\u003ce.num_pins;S++){const{x:Q,y:w}=sct(e.num_pins,S+1,o,r),M=S\u003cl?S+1:e.num_pins-(S-l);c.push(Jo(M,Q,w,s,a,A))}e.thermalpad\u0026\u0026c.push(EQ(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const u=o,g=i,h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-u/2,y:g/2},{x:u/2,y:g/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},d={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-u/2,y:-g/2},{x:u/2,y:-g/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},p=sct(e.num_pins,1,u,r),m={x:p.x-.8,y:p.y},_={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:m.x-.4,y:m.y},{x:m.x-.7,y:m.y+.3},{x:m.x-.7,y:m.y-.3},{x:m.x-.4,y:m.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},f=yi(0,g/2+.5,.3),I=(e.num_pins/2-1)*r+a,C=o/2+.25,y=C+1.43,x=I/2+.255,E=i/2+.25,B={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-y,maxX:y,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-E,maxY:E}])};return{circuitJson:[...c,h,d,f,_,B],parameters:e}},sct=(t,e,n,o)=\u003e{const i=t/2,r=(e-1)%i,s=e\u003c=i?-1:1,a=(i-1)/2-r;return{x:s*2.11,y:a*o}},Mbn=t=\u003e{switch(t){case 10:return{w:\"3.10mm\",h:\"3.32mm\",p:\"0.5mm\",pl:\"1.63mm\",pw:\"0.33mm\"};case 12:return{w:\"3mm\",h:\"4mm\",p:\"0.65mm\",pl:\"0.88mm\",pw:\"0.4mm\"};case 16:return{w:\"3.10mm\",h:\"4mm\",p:\"0.5mm\",pl:\"0.88mm\",pw:\"0.3mm\"};default:return{w:\"3.10mm\",h:\"3.32mm\",p:\"0.65mm\",pl:\"1.63mm\",pw:\"0.4mm\"}}},Dbn=Ii.extend({fn:Z(),num_pins:xo([$e(8),$e(10),$e(12),$e(16)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:K4.optional(),...zk,string:Z().optional()}),act=(t,e,n,o,i)=\u003e{const r=t/2,s=(e-1)%r,a=e\u003c=r?-1:1,A=(r-1)/2-s,c=ce.parse(\"0.2mm\");return{x:a*(n/2+i/2-c),y:A*o}},Nbn=t=\u003e{const e=Dbn.parse(t),n=Mbn(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[];for(let B=0;B\u003ce.num_pins;B++){const{x:S,y:Q}=act(e.num_pins,B+1,o,r,s);c.push(Jo(B+1,S,Q,s,a,A))}e.thermalpad\u0026\u0026c.push(EQ(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const l=o,u=i,g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-l/2,y:u/2},{x:l/2,y:u/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-l/2,y:-u/2},{x:l/2,y:-u/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},d=act(e.num_pins,1,l,r,s),p={x:d.x-.8,y:d.y},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:p.x-.4,y:p.y},{x:p.x-.7,y:p.y+.3},{x:p.x-.7,y:p.y-.3},{x:p.x-.4,y:p.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},_=yi(0,u/2+.5,.3),f=(e.num_pins/2-1)*r+a,I=o/2+.25,C=I+1.43,y=f/2+.255,x=i/2+.25,E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return{circuitJson:[...c,g,h,_,m,E],parameters:e}},Rbn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.8mm\"),h:Z().default(\"1.65mm\"),pl:Z().default(\"1.2mm\"),pw:Z().default(\"1.2mm\"),pad_spacing:Z().default(\"2.6mm\")}),Tbn=t=\u003e{const e=Rbn.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.3,height:2.15,layer:\"top\"};return{circuitJson:Fbn(e).concat(...Xd(e),o,n,s),parameters:e}},kbn=t=\u003e{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Fbn=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=kbn({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Lbn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.20mm\"),h:Z().default(\"1.65mm\"),pl:Z().default(\"0.8mm\"),pw:Z().default(\"0.9mm\"),pad_spacing:Z().default(\"2.1mm\")}),Hbn=t=\u003e{const e=Lbn.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.7,height:2.15,layer:\"top\"};return{circuitJson:Gbn(e).concat(...Xd(e),o,n,s),parameters:e}},Obn=t=\u003e{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Gbn=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=Obn({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Ybn=Ii.extend({fn:Z(),num_pins:xo([$e(6),$e(8)]).default(8),w:Z().default(\"3mm\"),h:Z().default(\"3mm\"),p:Z().default(\"0.5mm\"),pl:Z().default(\"0.52mm\"),pw:Z().default(\"0.35mm\"),epw:Z().default(\"1.40mm\"),eph:Z().default(\"1.60mm\"),string:Z().optional(),ep:je().default(!1)}),Ubn=t=\u003e{t.string\u0026\u0026t.string.includes(\"_ep\")\u0026\u0026(t.ep=!0);const e=t.string?.match(/^son_(\\d+)/),n=e?Number.parseInt(e[1],10):t.num_pins||8,o=Ybn.parse({...t,num_pins:n}),i=ce.parse(o.w),r=ce.parse(o.h),s=ce.parse(o.p),a=ce.parse(o.pl),A=ce.parse(o.pw),c=ce.parse(o.epw),l=ce.parse(o.eph),u=Math.min(a,A)/8,g=[];for(let k=0;k\u003co.num_pins;k++){const{x:R,y:F}=Ixe(o.num_pins,k+1,i,s);g.push(Jo(k+1,R,F,a,A,u))}o.ep\u0026\u0026g.push(Jo(o.num_pins+1,0,0,c,l));const h=i,d=r,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-h/2,y:d/2},{x:h/2,y:d/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-h/2,y:-d/2},{x:h/2,y:-d/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},_=Ixe(o.num_pins,1,h,s),f={x:_.x-.4,y:_.y},I={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:f.x-.4,y:f.y},{x:f.x-.7,y:f.y+.3},{x:f.x-.7,y:f.y-.3},{x:f.x-.4,y:f.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},C=yi(0,d/2+.5,.3),y=Math.abs(Ixe(o.num_pins,1,i,s).x),x=(o.num_pins/2-1)*s+A,E=y*2+a,B=i/2+.25,S=E/2+.25,Q=x/2+.25,w=r/2+.25,M={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-B,maxX:B,minY:-w,maxY:w}])};return{circuitJson:[...g,p,m,C,I,M],parameters:o}},Ixe=(t,e,n,o)=\u003e{const i=t/2,r=(e-1)%i,s=e\u003c=i?-1:1,a=(i-1)/2-r;return{x:s*ce.parse(\"1.4mm\"),y:a*o}},Kbn=Ii.extend({fn:Z(),num_pins:_t().optional().default(8),p:lt.describe(\"pitch (distance between center of each pin)\"),w:ce.describe(\"width between vertical rows of pins\"),grid:K4.describe(\"width and height of the border of the footprint\"),ep:K4.default(\"0x0mm\").describe(\"width and height of the central exposed thermal pad\"),epx:ce.default(\"0mm\").describe(\"x offset of the center of the central exposed thermal pad\"),pinw:ce.describe(\"width of the pin pads\"),pinh:ce.describe(\"height of the pin pads\")}),Vbn=t=\u003e{const e=Kbn.parse(t),{num_pins:n,p:o,w:i,grid:r,ep:s,epx:a,pinw:A,pinh:c}=e;if(n%2!==0)throw new Error(\"invalid number of pins\");const l=[],u=Math.min(A,c)/8;for(let B=0;B\u003cn;B++){const{pinX:S,pinY:Q}=zbn({pinCount:n,pinIndex:B,width:i,pitch:o});l.push(Jo(B+1,S,Q,A,c,u))}s.x\u003e0\u0026\u0026s.y\u003e0\u0026\u0026l.push(Jo(e.num_pins+1,a,0,s.x,s.y));const g=Jbn(r),h=yi(0,r.y/2+o,r.y/6),d=(n/2-1)*o+c,p=i+A,m=r.x/2+.25,_=p/2+.25,f=d/2+.25,I=d/2+.45+Math.max(0,.8-o),C=Math.min(r.y/2+.25,I),y=Math.max(0,.37-Math.max(0,_-m-.38)*1.4),x=Math.max(f,C-y),E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-_,maxX:_,minY:-x,maxY:x},{minX:-m,maxX:m,minY:-C,maxY:C}])};return{circuitJson:[...l,...g,h,E],parameters:e}},zbn=t=\u003e{let e=0,n=0;const o=(t.pinCount/2-1)*t.pitch/2,i=t.pinCount/2;return t.pinIndex+1\u003c=i?(e=t.pitch*t.pinIndex-o,n=0-t.width/2):(e=t.pitch*(t.pinCount-t.pinIndex-1)-o,n=t.width/2),{pinX:n,pinY:e}},Jbn=t=\u003e{const n=t.y/30;return[{layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:-t.x/2-.1,y:t.y/2+.1-n},{x:-t.x/2-.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1-n}],stroke_width:t.y/30},{layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:-t.x/2-.1,y:-t.y/2-.1+n},{x:-t.x/2-.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1+n}],stroke_width:t.y/30}]},Wbn=Ii.extend({fn:$e(\"wson\"),num_pins:$e(8).default(8),p:ce.default(\"0.5mm\").describe(\"pin pitch\"),rowspan:ce.default(\"3.015mm\").describe(\"distance between pad rows\"),pl:ce.default(\"0.6mm\").describe(\"pad length across the package edge\"),pw:ce.default(\"0.28mm\").describe(\"pad width along the pin row\"),ep:je().default(!0).describe(\"include the exposed pad\"),epw:ce.default(\"1.7mm\").describe(\"exposed pad width\"),eph:ce.default(\"0.3mm\").describe(\"exposed pad height\"),w:ce.default(\"2mm\").describe(\"package body width\"),h:ce.default(\"3mm\").describe(\"package body height\")}),jbn=t=\u003e{const e=Wbn.parse(t),{p:n,rowspan:o,pl:i,pw:r,ep:s,epw:a,eph:A,w:c,h:l}=e,u=[],g=-3*n/2;for(let f=0;f\u003c4;f+=1){const I=g+f*n;u.push(Jo(f+1,I,-o/2,r,i)),u.push(Jo(8-f,I,o/2,r,i))}s\u0026\u0026u.push(Jo(9,0,0,a,A));const h=[iA([{x:-c/2,y:-l/2},{x:-c/2,y:l/2}]),iA([{x:c/2,y:-l/2},{x:c/2,y:l/2}])],d=yi(0,Math.max(l/2,(o+i)/2)+.6,.5),p=Math.max(3*n+r,s?a:0),m=Math.max(o+i,s?A:0),_={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:Math.max(c,p)+.5,height:Math.max(l,m)+.5,layer:\"top\"};return{circuitJson:[...u,...h,d,_],parameters:e}},$bn=t=\u003e{const{num_pins:e,bridged:n,p:o=2.54,pw:i=1.5,ph:r=1.5}=t,s=ce.parse(o),a=ce.parse(i),A=ce.parse(r),c=Math.min(A/4,.5),l=[];for(let Q=0;Q\u003ce;Q++)l.push(Jo(Q+1,Q*s,0,a,A));let u=[];if(n){const Q=n.split(\"\").map(Number);if(Q.length\u003e1)for(let w=0;w\u003cQ.length-1;w++){const M=Q[w],k=Q[w+1];if(typeof M==\"number\"\u0026\u0026typeof k==\"number\"\u0026\u0026!isNaN(M)\u0026\u0026!isNaN(k)){const R=(M-1)*s,F=(k-1)*s,O=Math.sign(F-R),U=R+O*(a/2),Y=F-O*(a/2);u.push({type:\"pcb_trace\",pcb_trace_id:\"\",route:[{start_pcb_port_id:`{PIN${M}}`,x:U,y:0,width:c,layer:\"top\",route_type:\"wire\"},{end_pcb_port_id:`{PIN${k}}`,x:Y,y:0,width:c,layer:\"top\",route_type:\"wire\"}]})}}}const g=(e-1)*s+a+.7,h=A+1,d=(e-1)*s/2,p=0,m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"outline\",route:[{x:d-g/2,y:p-h/2},{x:d+g/2,y:p-h/2},{x:d+g/2,y:p+h/2},{x:d-g/2,y:p+h/2},{x:d-g/2,y:p-h/2}],stroke_width:.15},f=p+h/2+.6,I=yi(d,f,.4),C=(e-1)*s,y=C/2+a/2,x=A/2,E=y+.5,B=x+.5,S={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:C/2,y:0},width:2*E,height:2*B,layer:\"top\"};return{circuitJson:[...l,...u,m,I,S],parameters:t}},Act={fn:$e(\"sot457\"),num_pins:$e(6).default(6),pillh:Z().default(\"0.45mm\"),pillw:Z().default(\"1.45mm\"),pl:Z(),pw:Z(),p:Z(),wave:je().optional(),reflow:je().optional()},qbn=Ii.extend({...Act,h:Z().default(\"2.5mm\"),w:Z().default(\"2.7mm\"),pl:Z().default(\"0.8mm\"),pw:Z().default(\"0.55mm\"),p:Z().default(\"0.95mm\")}),Xbn=Ii.extend({...Act,h:Z().default(\"3mm\"),w:Z().default(\"4mm\"),pillr:Z().default(\"0.225mm\"),pl:Z().default(\"1.45mm\"),pw:Z().default(\"1.5mm\"),p:Z().default(\"1.475mm\")}).transform(t=\u003e({...t,wave:t.wave??(t.reflow===void 0?!0:!t.reflow),reflow:t.reflow??(t.wave===void 0?!1:!t.wave)})),P8=t=\u003eNumber.parseFloat(t.replace(\"mm\",\"\")),cct=({pitch:t,width:e,pinNumber:n})=\u003e{const r={1:{x:-e/2-.1,y:t},2:{x:-e/2-.1,y:0},3:{x:-e/2-.1,y:-t},4:{x:e/2+.1,y:-t},5:{x:e/2+.1,y:0},6:{x:e/2+.1,y:t}}[n];if(!r)throw new Error(`Invalid pin number: ${n}`);return r},lct=t=\u003e{const e=[],n=P8(t.p),o=P8(t.pl),i=P8(t.pw),r=P8(t.w),s=P8(t.h),a=Math.min(o,i)/8;if(t.wave){const m={1:({padWidth:_,padHeight:f})=\u003eJo(1,-n,n,f,_,a),2:({padWidth:_,padHeight:f})=\u003eJo(2,-n,-n,f,_,a),3:({padWidth:_,padHeight:f})=\u003eXM(3,-n,0,P8(t.pillw),P8(t.pillh)),4:({padWidth:_,padHeight:f})=\u003eXM(4,n,0,P8(t.pillw),P8(t.pillh)),5:({padWidth:_,padHeight:f})=\u003eJo(5,n,n,f,_,a),6:({padWidth:_,padHeight:f})=\u003eJo(6,n,-n,f,_,a)};for(let _=1;_\u003c=t.num_pins;_++){const f=m[_];f\u0026\u0026e.push(f({padWidth:o,padHeight:i}))}}else for(let m=1;m\u003c=t.num_pins;m++){const{x:_,y:f}=cct({pitch:n,width:r,pinNumber:m});e.push(Jo(m,_,f,o,i,a))}const A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-r/3,y:s/2+n/1.3},{x:r/3,y:s/2+n/1.3}],stroke_width:.05},c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-r/3,y:-s/2-n/1.3},{x:r/3,y:-s/2-n/1.3}],stroke_width:.05},l=yi(0,s+.5,.3),u=cct({pitch:n,width:r,pinNumber:1}),g=t.wave?1:.5,h=t.wave?.7:.3;u.x-=t.wave?i:i*1.7;const d={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_indicator\",route:[{x:u.x+g/2,y:u.y},{x:u.x-g/2,y:u.y+h/2},{x:u.x-g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y}],stroke_width:.05};let p;if(t.wave){const m=2*n,_=2*n,f=m/2+i/2,I=_/2+o/2,C=f+.25,y=I+.25;p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*C,height:2*y,layer:\"top\"}}else{const _=r/2+.1+o/2,f=n+i/2,I=r/2,C=s/2,y=_+.25,x=I+.08,E=f+.25,B=Math.max(C+.45,E);p={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:xy([{minX:-y,maxX:y,minY:-E,maxY:E},{minX:-x,maxX:x,minY:-B,maxY:B}]),layer:\"top\"}}return[l,A,c,d,...e,p]},Zbn=t=\u003e{if(t.wave){const n=Xbn.parse({...t,fn:\"sot457\"});return{circuitJson:lct(n),parameters:n}}const e=qbn.parse(t);return{circuitJson:lct(e),parameters:e}},eSn=[{x:-.8,y:.75},{x:.8,y:.75},{x:.8,y:-.75},{x:-.8,y:-.75}],tSn=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"1.1mm\"),h:Z().default(\"1.45mm\"),p:Z().default(\"0.35mm\"),pl:Z().default(\"0.2mm\"),pw:Z().default(\"0.2mm\"),string:Z().optional()}),nSn=t=\u003e{const e=tSn.parse({...t,fn:\"sot963\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=uct(p+1,n,i,r);A.push(Jo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=uct(1,n,i,r),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=yi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:eSn,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},uct=(t,e,n,o)=\u003e{const i=e/2-o/2;return t\u003c=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},oSn=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default(\"5mm\"),id:Z().default(\"1.25mm\"),od:Z().default(\"2.35mm\"),ca:Z().default(\"14mm\").describe(\"Caliper axis (width or diameter of the potentiometer body or adjustment knob)\"),w:Z().default(\"5.35mm\"),h:Z().default(\"4mm\"),string:Z().optional()}),iSn=t=\u003e{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i),s=Number.parseFloat(e);return[ks(1,0,s,n,o),ks(2,r,0,n,o),ks(3,0,-s,n,o)]},rSn=t=\u003e{const e=t.string?.match(/^potentiometer_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=oSn.parse({...t,num_pins:n});let i=[];o.num_pins===3\u0026\u0026(i=iSn(o));const r=Number.parseFloat(o.ca)/2+.15,s=Number.parseFloat(o.w),a=Number.parseFloat(o.od)/2+.35,A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:0,y:r-1.75},{x:0,y:r},{x:s,y:r},{x:s,y:a}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:s,y:-a},{x:s,y:-r},{x:0,y:-r},{x:0,y:-r+1.75}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},l=Number.parseFloat(o.w)/2,u=yi(l,r+1,.5),g=Number.parseFloat(o.od)/2,h=Number.parseFloat(o.h),d=Number.parseFloat(o.ca)/2,p=-(g+.25),m=h+g+.25,_=d+.25,f={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(p+m)/2,y:0},width:m-p,height:2*_,layer:\"top\"};return{circuitJson:[...i,A,c,u,f],parameters:o}},sSn=Ii.extend({fn:Z(),p:ce.optional().default(\"7.5mm\"),id:ce.optional().default(\"1mm\"),od:ce.optional().default(\"2mm\"),d:ce.optional().default(\"10.5mm\")}),aSn=(t,e,n,o,i)=\u003e{const r=[],s=[];for(let a=0;a\u003c=50;a++){const A=a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c\u003ct-o\u0026\u0026l\u003e=e-i/2\u0026\u0026l\u003c=e+i/2||r.push({x:c,y:l})}for(let a=0;a\u003c=50;a++){const A=Math.PI+a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c\u003ct-o\u0026\u0026l\u003e=e-i/2\u0026\u0026l\u003c=e+i/2||s.push({x:c,y:l})}return{topArc:r,bottomArc:s}},ASn=t=\u003e{const e=sSn.parse(t),{p:n,id:o,od:i,d:r}=e,s=[yy({pn:1,x:-n/2,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:i}),ks(2,n/2,0,o,i)],{topArc:a,bottomArc:A}=aSn(0,0,r/2+.1,i/2,i),c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:a,stroke_width:.1,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:A,stroke_width:.1,pcb_silkscreen_path_id:\"\"},u={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:0,y:r/2+.1},{x:0,y:-(r/2+.1)}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},g=-(r/2+.5),h=i/2+1.5,d=.5,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:g-d,y:h},{x:g+d,y:h}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:g,y:h-d},{x:g,y:h+d}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},_=yi(0,r/2+1,.5),f=r/2,I=n/2+i/2,y=Math.max(f,I)+.25,x={type:\"pcb_courtyard_circle\",pcb_courtyard_circle_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},radius:y,layer:\"top\"};return{circuitJson:[...s,c,l,u,p,m,_,x],parameters:e}},cSn=Ii.extend({fn:$e(\"fpc\"),num_pins:S5.number().int().min(2),p:ce.default(\"0.5mm\").describe(\"contact pad pitch\"),pw:ce.default(\"0.3mm\").describe(\"contact pad width\"),pl:ce.default(\"1.25mm\").describe(\"contact pad length\"),staggered:je().default(!1).describe(\"alternate contacts between two rows\"),reverse:je().default(!1).describe(\"place pin 1 on the upper row when staggered\"),py:ce.default(\"2.4mm\").describe(\"staggered row center pitch\"),toppl:ce.optional().describe(\"upper-row contact pad length\"),bottompl:ce.optional().describe(\"lower-row contact pad length\"),mpx:ce.optional().describe(\"mounting pad center pitch\"),mpy:ce.optional().describe(\"mounting pad row distance from the contact-row center\"),mounttop:je().default(!1).describe(\"place the mounting pads above the contact-row center\"),mpw:ce.default(\"2mm\").describe(\"mounting pad width\"),mpl:ce.default(\"2.5mm\").describe(\"mounting pad length\")}),Cxe=(...t)=\u003eJo(...t),lSn=t=\u003e({maxX:Math.max(...t.map(e=\u003ee.x+e.width/2)),maxY:Math.max(...t.map(e=\u003ee.y+e.height/2)),minX:Math.min(...t.map(e=\u003ee.x-e.width/2)),minY:Math.min(...t.map(e=\u003ee.y-e.height/2))}),uSn=t=\u003e{const e=cSn.parse(t),{num_pins:n,p:o,pw:i,pl:r,staggered:s,reverse:a,py:A,toppl:c,bottompl:l,mounttop:u,mpw:g,mpl:h}=e,d=(n-1)*o,p=e.mpx??d+(s?3.5:3.38),m=e.mpy??(s?0:2.575),_=m===0?0:(u?1:-1)*m,f=-d/2,I=Array.from({length:n},(O,U)=\u003e{const Y=s\u0026\u0026U%2===1!==a,W=s?Y?A/2:-A/2:0,te=Y?c??r:l??r;return Cxe(U+1,f+U*o,W,i,te)}),C=[Cxe(n+1,p/2,_,g,h),Cxe(n+2,-p/2,_,g,h)],y=[...I,...C],x=lSn(y),E=Math.min(d/2+i/2,p/2-g/2),B=x.maxY+.2,S=x.minY-.2,Q=I[0],w=Q.x-Q.width/2-.2,M=Q.y,k=[iA([{x:-E,y:B},{x:E,y:B}]),iA([{x:-E,y:S},{x:E,y:S}]),iA([{x:w-.25,y:M-.25},{x:w,y:M},{x:w-.25,y:M+.25}])],R=yi(0,B+.7,.5),F={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(x.minX+x.maxX)/2,y:(x.minY+x.maxY)/2},width:x.maxX-x.minX+.5,height:x.maxY-x.minY+.5,layer:\"top\"};return{circuitJson:[...y,...k,R,F],parameters:{...e,mpx:p,mpy:m,toppl:c??r,bottompl:l??r}}},gSn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"6.5mm\"),h:Z().default(\"3mm\"),pl:Z().default(\"1.75mm\"),pw:Z().default(\"2.40mm\"),p:Z().default(\"4.75mm\")}),dSn=t=\u003e{const e=gSn.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:7,height:3.5,layer:\"top\"};return{circuitJson:pSn(e).concat(...Xd(e),o,n,s),parameters:e}},hSn=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},pSn=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=hSn({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},mSn=[{x:-1.45,y:.98},{x:-.73,y:.98},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.33},{x:1.45,y:.33},{x:1.45,y:-.33},{x:.73,y:-.33},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.98},{x:-1.45,y:-.98},{x:-1.45,y:-.32},{x:-.73,y:-.32},{x:-.73,y:.32},{x:-1.45,y:.32}],_Sn=Ii.extend({fn:Z(),num_pins:_t().default(3),w:Z().default(\"2.45mm\"),h:Z().default(\"2.40mm\"),pl:Z().default(\"0.92mm\"),pw:Z().default(\"0.45mm\"),p:Z().default(\"0.891mm\"),string:Z().optional()}),fSn=t=\u003e{const e=t.string?.match(/^sot323_(\\d+)/),n=e?Number.parseInt(e[1],3):3,o=_Sn.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:CSn(o),parameters:o};throw new Error(\"Invalid number of pins\")},ISn=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n,y:.65}:e===2?{x:-n,y:-.65}:{x:n,y:0}},CSn=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let d=0;d\u003ct.num_pins;d++){const{x:p,y:m}=ISn({num_pins:t.num_pins,pn:d+1,p:s});e.push(Jo(d+1,p,m,i,r,a))}const A=yi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-i,l=o/2,u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-c,y:l+.3},{x:c,y:l+.3},{x:c,y:l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},g={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-c,y:-l-.3},{x:c,y:-l-.3},{x:c,y:-l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},h={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:mSn,layer:\"top\"};return[...e,u,g,A,h]},ySn=Ii.extend({fn:Z(),circle:je().optional(),rect:je().optional(),square:je().optional(),pill:je().optional(),d:ce.optional(),pd:ce.optional(),diameter:ce.optional(),r:ce.optional(),pr:ce.optional(),radius:ce.optional(),w:ce.optional(),pw:ce.optional(),width:ce.optional(),h:ce.optional(),ph:ce.optional(),height:ce.optional(),s:ce.optional(),size:ce.optional(),string:Z().optional()}).transform(t=\u003e{let e=\"rect\";t.circle\u0026\u0026(e=\"circle\"),t.square\u0026\u0026(e=\"square\"),t.rect\u0026\u0026(e=\"rect\"),t.pill\u0026\u0026(e=\"pill\");let n,o,i;return e===\"circle\"?t.r!==void 0?n=KA(t.r):t.pr!==void 0?n=KA(t.pr):t.radius!==void 0?n=KA(t.radius):t.d!==void 0?n=KA(t.d)/2:t.pd!==void 0?n=KA(t.pd)/2:t.diameter!==void 0?n=KA(t.diameter)/2:n=KA(\"1mm\")/2:(t.w!==void 0?o=KA(t.w):t.pw!==void 0?o=KA(t.pw):t.width!==void 0?o=KA(t.width):t.s!==void 0?o=KA(t.s):t.size!==void 0?o=KA(t.size):o=KA(\"1mm\"),t.h!==void 0?i=KA(t.h):t.ph!==void 0?i=KA(t.ph):t.height!==void 0?i=KA(t.height):e===\"square\"||e===\"rect\"?i=o:i=KA(\"1mm\")),{fn:t.fn,shape:e,radius:n,width:o,height:i}}),xSn=t=\u003e{const e=ySn.parse(t),{shape:n,radius:o,width:i,height:r}=e;let s,a;return n===\"circle\"?(s=OAt(1,{x:0,y:0,radius:o}),a=o+.5):n===\"pill\"?(s=XM(1,0,0,i,r),a=Math.max(i,r)/2+.5):(s=Jo(1,0,0,i,r),a=r/2+.5),{circuitJson:[s,yi(0,a,.2)],parameters:e}},ESn=Ii.extend({fn:$e(\"smdpads\"),num_pins:_t().int().positive().default(3),p:ce.default(\"1mm\").describe(\"pad center pitch\"),pw:ce.default(\"1mm\").describe(\"outer pad width\"),ph:ce.default(\"1mm\").describe(\"pad height\"),cyw:ce.optional().describe(\"courtyard width\"),cyh:ce.optional().describe(\"courtyard height\"),centerpadwidth:ce.optional().describe(\"center pad width\")}).superRefine((t,e)=\u003e{t.centerpadwidth!==void 0\u0026\u0026t.num_pins%2===0\u0026\u0026e.addIssue({code:lo.custom,message:\"'centerpadwidth' requires an odd number of SMD pads\",path:[\"centerpadwidth\"]})}),BSn=t=\u003e{const e=ESn.parse(t),{num_pins:n,p:o,pw:i,ph:r,cyw:s,cyh:a,centerpadwidth:A}=e,c=Math.ceil(n/2),l=-((n-1)*o)/2,u=Array.from({length:n},(_,f)=\u003e{const I=f+1,C=A!==void 0\u0026\u0026I===c?A:i;return Jo(I,l+f*o,0,C,r)}),g=(n-1)*o/2+i/2,h=A?A/2:0,d=Math.max(g,h),p=s!==void 0\u0026\u0026a!==void 0?{width:s,height:a}:{width:d*2+.5,height:r+.5},m={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:p.width,height:p.height,layer:\"top\"};return{circuitJson:[...u,yi(0,r/2+.8,.4),m],parameters:e}},bSn=Ii.extend({fn:$e(\"smdpushbutton\"),num_pins:$e(4).default(4),px:ce.default(\"4.2mm\").describe(\"horizontal pad center pitch\"),py:ce.default(\"2.15mm\").describe(\"vertical pad center pitch\"),pw:ce.default(\"1.05mm\").describe(\"pad width\"),ph:ce.default(\"0.7mm\").describe(\"pad height\")}),SSn=t=\u003e{const e=bSn.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Jo(1,-n/2,o/2,i,r),Jo(2,n/2,o/2,i,r),Jo(3,-n/2,-o/2,i,r),Jo(4,n/2,-o/2,i,r)],a=Math.max(n/2-i/2-.15,.2),A=o/2+r/2+.1,c=Math.max(o/2-r/2-.15,.2),l=[iA([{x:-a,y:A},{x:a,y:A}]),iA([{x:-a,y:-A},{x:a,y:-A}]),iA([{x:-n/2,y:-c},{x:-n/2,y:c}]),iA([{x:n/2,y:-c},{x:n/2,y:c}])],u=yi(0,A+.6,.5),g={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:\"top\"};return{circuitJson:[...s,...l,u,g],parameters:e}},QSn=t=\u003e({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),vSn=t=\u003e{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r\u003ct.length;r++){const s=t[r];s.x\u003ce\u0026\u0026(e=s.x),s.y\u003cn\u0026\u0026(n=s.y),s.x\u003eo\u0026\u0026(o=s.x),s.y\u003ei\u0026\u0026(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}},wSn=Ii.extend({fn:$e(\"smdslideswitch\"),num_pins:$e(7).default(7),signalcols:S5.number().int().min(3).default(3),missing:fV.default([]),p:ce.default(\"1mm\").describe(\"signal-pad column pitch\"),pw:ce.default(\"0.7mm\").describe(\"signal-pad width\"),pl:ce.default(\"1.5mm\").describe(\"signal-pad length\"),mounty:ce.default(\"-1.8mm\").describe(\"Y position of the mounting-pad row center\"),mpx:ce.default(\"5.5mm\").describe(\"horizontal center-to-center mounting-pad distance\"),mpy:ce.default(\"2.2mm\").describe(\"vertical center-to-center mounting-pad distance\"),mpw:ce.default(\"1mm\").describe(\"mounting-pad width\"),mpl:ce.default(\"0.8mm\").describe(\"mounting-pad length\"),holex:ce.default(\"1.5mm\").describe(\"alignment-hole X distance from the footprint center\"),holey:ce.optional().describe(\"alignment-hole Y position; defaults to mounty\"),holed:ce.default(\"0.9mm\").describe(\"alignment-hole diameter\"),noholes:je().optional().default(!1)}),PSn=t=\u003e{const e=wSn.parse(t),{num_pins:n,signalcols:o,missing:i,p:r,pw:s,pl:a,mounty:A,mpx:c,mpy:l,mpw:u,mpl:g,holex:h,holed:d,noholes:p}=e,m=e.holey??A,_=i.find(J=\u003etypeof J!=\"number\"||!Number.isInteger(J)||J\u003c1||J\u003eo);if(_!==void 0)throw new Error(`Invalid missing signal column \"${_}\" for signalcols${o}`);const f=new Set(i.filter(J=\u003etypeof J==\"number\")),I=o-f.size;if(I+4!==n)throw new Error(`smdslideswitch${n} needs ${n-4} signal pads, but signalcols${o}_missing(${[...f].join(\",\")}) creates ${I}`);const C=J=\u003eNumber(J.toFixed(12)),y=[],x=-((o-1)*r)/2;let E=1;for(let J=1;J\u003c=o;J++)f.has(J)||(y.push(Jo(E,C(x+(J-1)*r),0,s,a)),E++);const B=A+l/2,S=A-l/2,Q=[{x:C(-c/2),y:C(B)},{x:C(c/2),y:C(B)},{x:C(-c/2),y:C(S)},{x:C(c/2),y:C(S)}];for(const J of Q)y.push(Jo(E,J.x,J.y,u,g)),E++;const w=p?[]:[-h,h].map(J=\u003e({type:\"pcb_hole\",pcb_hole_id:\"\",pcb_component_id:\"\",hole_shape:\"circle\",hole_diameter:d,x:J,y:m})),M=Math.max(c/2-u/2-.2,r),k=-a/2-.2,R=S+g/2+.2,F=[iA([{x:-M,y:k},{x:M,y:k}]),iA([{x:-M,y:R},{x:M,y:R}]),iA([{x:-M,y:R},{x:-M,y:k}]),iA([{x:M,y:R},{x:M,y:k}])],O=x+(o-1)*r,U=vSn([{x:x-s/2,y:-a/2},{x:O+s/2,y:a/2},{x:-c/2-u/2,y:S-g/2},{x:c/2+u/2,y:B+g/2},...p?[]:[{x:-h-d/2,y:m-d/2},{x:h+d/2,y:m+d/2}]]);if(!U)throw new Error(\"Could not determine SMD slide-switch bounds\");const Y=.25,W=QSn(U),te={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:W,width:U.maxX-U.minX+Y*2,height:U.maxY-U.minY+Y*2,layer:\"top\"},j=yi(W.x,U.maxY+.6,.5);return{circuitJson:[...y,...w,...F,j,te],parameters:e}},MSn=Ii.extend({fn:$e(\"smdpinheader\"),num_pins:_t().int().positive().default(6),p:ce.default(\"2.54mm\").describe(\"contact pitch\"),py:ce.default(\"3.31mm\").describe(\"center-to-center distance between alternating pad rows\"),pw:ce.default(\"1mm\").describe(\"pad width\"),ph:ce.default(\"2.51mm\").describe(\"pad height\"),bh:ce.default(\"2.5mm\").describe(\"plastic body height\"),male:$e(!0).default(!0),female:$e(!1).default(!1),smd:$e(!0).default(!0)}),DSn=t=\u003e{const e=MSn.parse(t),{num_pins:n,p:o,py:i,pw:r,ph:s,bh:a}=e,A=-((n-1)*o)/2,c=Array.from({length:n},(y,x)=\u003eJo(x+1,A+x*o,x%2===0?i/2:-i/2,r,s)),l=n*o/2,u=a/2,g=Math.min(.5,a/4),h=(y,x,E=-l)=\u003e{const B=r/2+.2,S=[];let Q=E;for(let w=x;w\u003cn;w+=2){const M=A+w*o,k=M-B;k\u003eQ\u0026\u0026S.push(iA([{x:Q,y},{x:k,y}])),Q=M+B}return Q\u003cl\u0026\u0026S.push(iA([{x:Q,y},{x:l,y}])),S},d=[...h(u,0,-l+g),...h(-u,1),iA([{x:l,y:-u},{x:l,y:u}]),iA([{x:-l,y:-u},{x:-l,y:u-g},{x:-l+g,y:u}])],p=(n-1)*o/2+r/2,m=i/2+s/2,_=Math.max(l,p)+.25,f=Math.max(u,m)+.25,I={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*_,height:2*f,layer:\"top\"},C=yi(0,f+.6,.5);return{circuitJson:[...c,...d,C,I],parameters:e}},NSn=Ii.extend({fn:Z(),d:ce.optional(),hd:ce.optional(),r:ce.optional(),hr:ce.optional(),pd:ce.optional(),pr:ce.optional(),squarepad:je().optional().default(!1)}).transform(t=\u003e{let e;t.d!==void 0?e=KA(t.d):t.hd!==void 0?e=KA(t.hd):t.r!==void 0?e=KA(t.r)*2:t.hr!==void 0?e=KA(t.hr)*2:e=KA(\"1mm\");let n;return t.pd!==void 0?n=KA(t.pd):t.pr!==void 0?n=KA(t.pr)*2:n=e*(1.5/1),{fn:t.fn,d:e,pd:n,squarepad:t.squarepad??!1}}),RSn=t=\u003e{const e=NSn.parse(t),{d:n,pd:o,squarepad:i}=e;return{circuitJson:[i?yy({pn:1,x:0,y:0,holeDiameter:n,rectPadWidth:o,rectPadHeight:o}):ks(1,0,0,n,o),yi(0,o/2+.5,.2)],parameters:e}},TSn=Ii.extend({fn:Z(),num_pins:$e(6).default(6),h:Z().default(\"1.3mm\"),pl:Z().default(\"1.325mm\"),pw:Z().default(\"0.6mm\"),p:Z().default(\"0.95mm\")}),kSn=t=\u003e{const e=TSn.parse(t);return{circuitJson:FSn(e),parameters:e}},gct=t=\u003e{const{p:e,h:n,pn:o}=t;if(o===1)return{x:-n/2-.4875,y:e};if(o===2)return{x:-n/2-.4875,y:0};if(o===3)return{x:-n/2-.4875,y:-e};if(o===4)return{x:n/2+.4875,y:-e};if(o===5)return{x:n/2+.4875,y:0};if(o===6)return{x:n/2+.4875,y:e};throw new Error(\"Invalid pin number\")},FSn=t=\u003e{const e=[],n=Number.parseFloat(t.h),o=Number.parseFloat(t.p),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Math.min(i,r)/8;for(let B=1;B\u003c=t.num_pins;B++){const{x:S,y:Q}=gct({h:n,p:o,pn:B});e.push(Jo(B,S,Q,i,r,s))}const a=t.num_pins/2*o,A=n,c={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-a/3,y:A/2+Number.parseFloat(t.p)/1.3},{x:a/3,y:A/2+o/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},l={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-a/3,y:-A/2-o/1.3},{x:a/3,y:-A/2-o/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},u=yi(0,A+.3,.3),g=gct({h:n,p:o,pn:1});g.x=g.x-r*1.5;const h=.7,d=.3,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_indicator\",route:[{x:g.x+h/2-.2,y:g.y},{x:g.x-h/2,y:g.y+d/2},{x:g.x-h/2,y:g.y-d/2},{x:g.x+h/2-.2,y:g.y}],stroke_width:.05},m=n/2+.4875,_=o*2+r,f=m+i/2,I=n/2+.4,C=f+.25,y=_/2+.25,x=y+.2,E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:xy([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return[...e,u,c,l,p,E]},LSn=Ii.extend({fn:$e(\"sot143\"),num_pins:$e(4).default(4),p:ce.default(\"2.382774mm\"),px:ce.default(\"1.89992mm\"),pw:ce.default(\"0.8382mm\"),ph:ce.default(\"0.8382mm\"),pin1padwidth:ce.default(\"1.1938mm\"),pin1centeroffsetx:ce.default(\"0.199898mm\"),w:ce.default(\"3mm\"),h:ce.default(\"2.9mm\")}),HSn=t=\u003e{const e=LSn.parse(t),{p:n,px:o,pw:i,ph:r,pin1padwidth:s,pin1centeroffsetx:a,w:A,h:c}=e,l=o/2,u=n/2,g=[Jo(1,-l+a,-u,s,r),Jo(2,l,-u,i,r),Jo(3,l,u,i,r),Jo(4,-l,u,i,r)],h=A/2,d=c/2,p=[iA([{x:-h,y:-d/2},{x:-h,y:d/2}]),iA([{x:h,y:d/2},{x:h,y:-d/2}])],m=o+Math.max(s,i),_=n+r,f={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:Math.max(A,m)+.5,height:Math.max(c,_)+.5,layer:\"top\"};return{circuitJson:[...g,...p,yi(0,Math.max(d,_/2)+.8,.4),f],parameters:e}},OSn=[{x:-1.703,y:.98},{x:-.983,y:.98},{x:-.983,y:1.1},{x:.477,y:1.1},{x:.477,y:.98},{x:1.197,y:.98},{x:1.197,y:-.98},{x:.477,y:-.98},{x:.477,y:-1.1},{x:-.983,y:-1.1},{x:-.983,y:-.98},{x:-1.703,y:-.98}],GSn=Ii.extend({fn:Z(),num_pins:_t().default(4),w:Z().default(\"3.2mm\"),h:Z().default(\"2.6mm\"),pl:Z().default(\"1.05mm\"),pw:Z().default(\"0.45mm\"),p:Z().default(\"0.55mm\"),string:Z().optional()}),YSn=t=\u003e{const e=t.string?.match(/^sot343_(\\d+)/),n=e?Number.parseInt(e[1],4):4,o=GSn.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:KSn(o),parameters:o};throw new Error(\"Invalid number of pins\")},USn=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n*1.92,y:-.65}:e===2?{x:-n*1.92,y:.65}:e===3?{x:n,y:.65}:e===4?{x:n,y:-.65}:{x:0,y:0}},KSn=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;let A=1/0,c=-1/0,l=1/0,u=-1/0;for(let y=0;y\u003ct.num_pins;y++){const{x,y:E}=USn({num_pins:t.num_pins,pn:y+1,p:s});e.push(Jo(y+1,x,E,i,r,a)),x\u003cA\u0026\u0026(A=x),x\u003ec\u0026\u0026(c=x),E\u003cl\u0026\u0026(l=E),E\u003eu\u0026\u0026(u=E)}const g=(A+c)/2,h=u-l,d=o*.3,p=h/2+d;let m=n*.8;o\u003c=2.6\u0026\u0026(m/=2);const _=yi(g,p+.5,.3),f={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_top\",route:[{x:g-m/2,y:p},{x:g+m/2,y:p}],type:\"pcb_silkscreen_path\",stroke_width:.1},I={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_bottom\",route:[{x:g-m/2,y:-p},{x:g+m/2,y:-p}],type:\"pcb_silkscreen_path\",stroke_width:.1},C={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:OSn,layer:\"top\"};return[...e,f,I,_,C]},VSn=Ii.extend({fn:Z()}),zSn=t=\u003e{const e=VSn.parse(t),n=[],o=.5-.15,i=1.5,s=.5/2,a=75,A=-37/2;for(let E=0;E\u003ca;E++){const B=E+1;if(B\u003e=24\u0026\u0026B\u003c=31)continue;const S=A-E*s,Q=B%2===0,w=i+(Q?.25:0),k=.5-w/2,R=Jo(B,k,S,w,o);R.layer=Q?\"bottom\":\"top\",n.push(R)}const c=46*.0254,l=137*.0254,u=261*.0254,g={type:\"pcb_cutout\",pcb_cutout_id:\"\",shape:\"rect\",center:{x:-l/2+i/2,y:A-u},width:l,height:c},h={x:-.5,y:A},d={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:h.x-.4,y:h.y},{x:h.x-.7,y:h.y+.3},{x:h.x-.7,y:h.y-.3},{x:h.x-.4,y:h.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"};let p=1/0,m=-1/0,_=1/0,f=-1/0;const I=(E,B,S=0,Q=0)=\u003e{p=Math.min(p,E-S/2),m=Math.max(m,E+S/2),_=Math.min(_,B-Q/2),f=Math.max(f,B+Q/2)};for(const E of n){const B=E;I(B.x,B.y,B.width,B.height)}I(g.center.x,g.center.y,g.width,g.height);for(const E of d.route)I(E.x,E.y);const C=(p+m)/2,y=(_+f)/2,x=E=\u003e{typeof E.x==\"number\"\u0026\u0026(E.x-=C),typeof E.y==\"number\"\u0026\u0026(E.y-=y),E.center\u0026\u0026(E.center.x-=C,E.center.y-=y),Array.isArray(E.route)\u0026\u0026(E.route=E.route.map(B=\u003e({x:B.x-C,y:B.y-y})))};for(const E of n)x(E);return x(g),x(d),{circuitJson:[...n,g,d],parameters:e}},JSn=Ii.extend({fn:Z(),numPins:_t().optional().default(0),rows:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional().default(1).describe(\"number of rows\"),p:ce.default(\"2.54mm\").describe(\"pitch\"),id:ce.default(\"1.0mm\").describe(\"inner diameter\"),od:ce.default(\"1.5mm\").describe(\"outer diameter\"),male:je().optional().describe(\"the module uses male headers\"),nopin:je().optional().default(!1).describe(\"omit pins rendering\"),female:je().optional().describe(\"the module uses female headers\"),smd:je().optional().describe(\"surface mount device\"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nopinlabels:je().optional().default(!1).describe(\"omit silkscreen pin labels\"),doublesidedpinlabel:je().optional().default(!1).describe(\"add silkscreen pins in top and bottom layers\"),bottomsidepinlabel:je().optional().default(!1).describe(\"place the silkscreen reference text on the bottom layer instead of top\"),pinRowSide:Kn([\"left\",\"right\",\"top\",\"bottom\"]).optional().default(\"left\"),pinrowleft:je().optional().default(!1),pinrowright:je().optional().default(!1),pinrowtop:je().optional().default(!1),pinrowbottom:je().optional().default(!1),pinrowleftpins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),pinrowrightpins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),pinrowtoppins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),pinrowbottompins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),width:ce.optional(),height:ce.optional(),pinRowHoleEdgeToEdgeDist:ce.default(\"2mm\"),holes:xo([Z(),dn(Z())]).optional().transform(t=\u003e!t||Array.isArray(t)?t:t.startsWith(\"(\")\u0026\u0026t.endsWith(\")\")?t.slice(1,-1).split(\",\").map(e=\u003ee.trim()):[t]),holeXDist:ce.optional(),holeYDist:ce.optional(),holeInset:ce.default(\"1mm\"),pinrow:xo([Z(),_t()]).optional(),usbposition:Kn([\"left\",\"right\",\"top\",\"bottom\"]).optional().default(\"left\"),usbleft:je().optional().default(!1),usbtop:je().optional().default(!1),usbright:je().optional().default(!1),usbbottom:je().optional().default(!1),usbtype:Kn([\"micro\",\"c\"]).optional(),usbmicro:je().optional().default(!1),usbc:je().optional().default(!1),screen:je().optional().default(!1).describe(\"add silkscreen outline for screen/display area\"),screenwidth:ce.optional(),screenheight:ce.optional(),screencenteroffsetx:ce.optional(),screencenteroffsety:ce.optional()}).transform(t=\u003e{const e=XAt(t);let n=t.pinRowSide;t.pinrowleft\u0026\u0026(n=\"left\"),t.pinrowright\u0026\u0026(n=\"right\"),t.pinrowtop\u0026\u0026(n=\"top\"),t.pinrowbottom\u0026\u0026(n=\"bottom\");let o=t.usbposition;t.usbleft\u0026\u0026(o=\"left\"),t.usbtop\u0026\u0026(o=\"top\"),t.usbright\u0026\u0026(o=\"right\"),t.usbbottom\u0026\u0026(o=\"bottom\");let i=t.usbtype;t.usbmicro\u0026\u0026(i=\"micro\"),t.usbc\u0026\u0026(i=\"c\"),t.pinrow!==void 0\u0026\u0026(t.numPins=Number(t.pinrow));const r={left:t.pinrowleftpins,right:t.pinrowrightpins,top:t.pinrowtoppins,bottom:t.pinrowbottompins},s=Object.values(r).some(C=\u003eC!==void 0\u0026\u0026C\u003e0),a=(r.left??0)\u003e0\u0026\u0026(r.right??0)\u003e0,A=(r.top??0)\u003e0\u0026\u0026(r.bottom??0)\u003e0;s\u0026\u0026((r.left??0)\u003e0?n=\"left\":(r.right??0)\u003e0?n=\"right\":(r.top??0)\u003e0?n=\"top\":(r.bottom??0)\u003e0\u0026\u0026(n=\"bottom\"),t.numPins=(r.left??0)+(r.right??0)+(r.top??0)+(r.bottom??0));const c=Math.ceil(t.numPins/t.rows),l=Math.max(r.left??0,r.right??0),u=Math.max(r.top??0,r.bottom??0);let g,h;if(s){const C=a?t.p:0,y=A?t.p:0;g=(u\u003e0?(u-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+C,h=(l\u003e0?(l-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+y}else n===\"left\"||n===\"right\"?(g=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,h=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist):(h=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,g=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist);t.numPins===0\u0026\u0026(g=10,h=10);const d=t.width??g,p=t.height??h,m=t.screenwidth??d*.95,_=t.screenheight??p*.95,f=t.screencenteroffsetx??0,I=t.screencenteroffsety??0;return{...t,pinlabelAnchorSide:e,pinRowSide:n,usbposition:o,usbtype:i,male:t.male??!t.female,female:t.female??!1,width:d,height:p,screenwidth:m,screenheight:_,screencenteroffsetx:f,screencenteroffsety:I,pinrowleftpins:r.left,pinrowrightpins:r.right,pinrowtoppins:r.top,pinrowbottompins:r.bottom}}).superRefine((t,e)=\u003e{t.male\u0026\u0026t.female\u0026\u0026e.addIssue({code:lo.custom,message:\"'male' and 'female' cannot both be true; it should be male or female.\",path:[\"male\",\"female\"]})}),WSn=t=\u003e{const e=JSn.parse(t),{p:n,id:o,od:i,rows:r,numPins:s,pinlabelAnchorSide:a,pinlabelverticallyinverted:A,pinlabelorthogonal:c,pinlabeltextalignleft:l,pinlabeltextalignright:u,nopinlabels:g,doublesidedpinlabel:h,bottomsidepinlabel:d,pinRowSide:p,width:m,height:_,pinRowHoleEdgeToEdgeDist:f,holes:I,holeXDist:C,holeYDist:y,holeInset:x,pinrowleftpins:E,pinrowrightpins:B,pinrowtoppins:S,pinrowbottompins:Q,usbposition:w,usbtype:M,screen:k,screenwidth:R,screenheight:F,screencenteroffsetx:O,screencenteroffsety:U}=e;let Y=\"center\";l?Y=\"left\":u\u0026\u0026(Y=\"right\");const W=[],te={left:E,right:B,top:S,bottom:Q},j=Object.values(te).some(ie=\u003eie!==void 0\u0026\u0026ie\u003e0),J=(ie,ne,le,ge)=\u003e{if(e.smd?W.push(Jo(ie,ne,le,e.od,e.od)):ie===1?W.push(yy({pn:ie,x:ne,y:le,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(ks(ie,ne,le,o,i)),!g){const _e=ne+(ge===\"left\"?-i:ge===\"right\"?i:0),ue=le+(ge===\"top\"?i:ge===\"bottom\"?-i:0);d||W.push(tD({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"top\"})),(h||d)\u0026\u0026W.push(tD({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"bottom\"}))}};if(j){const ie=n;let ne=1;const le=te.left??0,ge=te.right??0,_e=te.top??0,ue=te.bottom??0,fe=(pe,ye)=\u003e{if(!(ye\u003c=0))if(pe===\"left\"||pe===\"right\"){const Me=pe===\"left\"?-m/2+f:m/2-f,ve=(ye-1)/2*ie;for(let he=0;he\u003cye;he++)J(ne,Me,ve-he*ie,pe),ne++}else{const Me=pe===\"top\"?_/2-f:-_/2+f,ve=-((ye-1)/2)*ie;for(let he=0;he\u003cye;he++)J(ne,ve+he*ie,Me,pe),ne++}};fe(\"left\",le),fe(\"right\",ge),fe(\"top\",_e),fe(\"bottom\",ue)}else{const ie=n;let ne=0,le=0,ge=0,_e=0,ue=0,fe=0;const pe=Math.ceil(s/r);p===\"left\"||p===\"right\"?(ne=p===\"left\"?-m/2+f:m/2-f,le=(pe-1)/2*ie,ge=0,_e=-ie,ue=p===\"left\"?ie:-ie,fe=0):(ne=-(pe-1)/2*ie,le=p===\"top\"?_/2-f:-_/2+f,ge=ie,_e=0,ue=0,fe=p===\"top\"?-ie:ie);let ye=1;for(let Me=0;Me\u003cr\u0026\u0026ye\u003c=s;Me++)for(let ve=0;ve\u003cpe\u0026\u0026ye\u003c=s;ve++){const he=ne+ve*ge+Me*ue,Qe=le+ve*_e+Me*fe;if(e.smd?W.push(Jo(ye,he,Qe,e.od,e.od)):ye===1?W.push(yy({pn:ye,x:he,y:Qe,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(ks(ye,he,Qe,o,i)),!g){const Pe=he+(p===\"left\"?-i:p===\"right\"?i:0),we=Qe+(p===\"top\"?i:p===\"bottom\"?-i:0);d||W.push(tD({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"top\"})),(h||d)\u0026\u0026W.push(tD({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"bottom\"}))}ye++}}if(I)for(const ie of I){let ne=0,le=0;ie===\"topleft\"?(ne=-m/2+x,le=_/2-x):ie===\"topright\"?(ne=m/2-x,le=_/2-x):ie===\"bottomleft\"?(ne=-m/2+x,le=-_/2+x):ie===\"bottomright\"?(ne=m/2-x,le=-_/2+x):ie===\"center\"\u0026\u0026(ne=0,le=0),C!==void 0\u0026\u0026(ne+=C),y!==void 0\u0026\u0026(le+=y),W.push(ks(s+I.indexOf(ie)+1,ne,le,o,i))}if(!e.nosilkscreen){const ie=[{x:-m/2,y:-_/2},{x:m/2,y:-_/2},{x:m/2,y:_/2},{x:-m/2,y:_/2},{x:-m/2,y:-_/2}];W.push(iA(ie,{stroke_width:.1,layer:\"top\"}))}const oe=yi(0,_/2+1,.5);if(W.push(oe),w\u0026\u0026M){let ie,ne;if(M===\"c\")ie=8,ne=3;else if(M===\"micro\")ie=6,ne=2;else return{circuitJson:W,parameters:e};let le;if(w===\"left\")le=[{x:-m/2,y:-ie/2},{x:-m/2+ne,y:-ie/2},{x:-m/2+ne,y:ie/2},{x:-m/2,y:ie/2},{x:-m/2,y:-ie/2}];else if(w===\"right\")le=[{x:m/2-ne,y:-ie/2},{x:m/2,y:-ie/2},{x:m/2,y:ie/2},{x:m/2-ne,y:ie/2},{x:m/2-ne,y:-ie/2}];else if(w===\"top\")le=[{x:-ie/2,y:_/2-ne},{x:ie/2,y:_/2-ne},{x:ie/2,y:_/2},{x:-ie/2,y:_/2},{x:-ie/2,y:_/2-ne}];else if(w===\"bottom\")le=[{x:-ie/2,y:-_/2},{x:ie/2,y:-_/2},{x:ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2}];else return{circuitJson:W,parameters:e};W.push(iA(le,{stroke_width:.1,layer:\"top\"}))}if(k){const ie=R/2,ne=F/2,le=O,ge=U,_e=[{x:-ie+le,y:-ne+ge},{x:ie+le,y:-ne+ge},{x:ie+le,y:ne+ge},{x:-ie+le,y:ne+ge},{x:-ie+le,y:-ne+ge}];W.push(iA(_e,{stroke_width:.05,layer:\"top\"}))}return{circuitJson:W,parameters:e}},jSn=[{x:-1.45,y:2.75},{x:-1.45,y:-1.85},{x:4.05,y:-1.85},{x:4.05,y:2.75}],$Sn=[{x:-1.55,y:2.75},{x:-1.55,y:-1.85},{x:3.95,y:-1.85},{x:3.95,y:2.75}],qSn=Ii.extend({fn:Z(),num_pins:_t().default(3),inline:je().default(!1),p:Z().default(\"1.27mm\"),id:Z().default(\"0.75mm\"),od:Z().default(\"1.3mm\"),w:Z().default(\"4.8mm\"),h:Z().default(\"4.0mm\")}),XSn=t=\u003e{const e=qSn.parse(t),n=Number.parseFloat(e.p),o=Number.parseFloat(e.w),i=Number.parseFloat(e.h),r=e.inline?1.05:Number.parseFloat(e.od),s=e.inline?1.5:r,a=[yy({pn:1,x:0,y:0,holeDiameter:e.id,rectPadWidth:r,rectPadHeight:s}),e.inline?T9(2,n,0,Number.parseFloat(e.id),r,s):ks(2,n,n,e.id,r),e.inline?T9(3,n*2,0,Number.parseFloat(e.id),r,s):ks(3,n*2,0,e.id,r)],A=o/2,c=e.inline?n-.09:n,l=.2,u=l+A-i,g=Array.from({length:32},(m,_)=\u003e{const f=Math.PI*_/31;return{x:c+A*Math.cos(f),y:l+A*Math.sin(f)}}),h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",stroke_width:.12,route:[...g,{x:c-A,y:u},{x:c+A,y:u},g[0]]},d=yi(c,l+A+1,.5),p={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:e.inline?$Sn:jSn,layer:\"top\"};return{circuitJson:[...a,h,d,p],parameters:e}},ZSn=Ii.extend({fn:$e(\"usbcmidmount\"),num_pins:$e(16).default(16),pinstart:S5.number().int().positive().default(1),split:je().default(!1).describe(\"emit all 16 contact lands\"),reverse:je().default(!1).describe(\"number contact lands right-to-left\"),noholes:je().default(!1).describe(\"omit the two locator holes\"),rowy:ce.default(\"2.125mm\").describe(\"contact pad row y position\"),ph:ce.default(\"1.1mm\").describe(\"contact pad height\"),pw:ce.default(\"0.3mm\").describe(\"signal contact pad width\"),powerpw:ce.default(\"0.55mm\").describe(\"merged power pad width\"),powerx:ce.default(\"3.2mm\").describe(\"outer merged power pad x\"),shellx:ce.default(\"4.325mm\").describe(\"shell tab x position\"),topy:ce.default(\"1.575mm\").describe(\"upper shell tab y position\"),bottomy:ce.default(\"2.625mm\").describe(\"lower shell tab negative y magnitude\"),tophw:ce.default(\"0.6mm\").describe(\"upper shell slot width\"),tophh:ce.default(\"1.5mm\").describe(\"upper shell slot height\"),topring:ce.default(\"0.25mm\").describe(\"upper shell annular ring\"),bottomhw:ce.default(\"0.6mm\").describe(\"lower shell slot width\"),bottomhh:ce.default(\"1.2mm\").describe(\"lower shell slot height\"),bottomring:ce.default(\"0.3mm\").describe(\"lower shell annular ring\"),holex:ce.default(\"2.89mm\").describe(\"locator hole x position\"),holey:ce.default(\"1.055mm\").describe(\"locator hole y position\"),holed:ce.default(\"0.7mm\").describe(\"locator hole diameter\"),bodybottom:ce.default(\"5.225mm\").describe(\"connector body negative y extent\")}),Hne=({pin:t,x:e,y:n,holeWidth:o,holeHeight:i,outerWidth:r,outerHeight:s})=\u003e({type:\"pcb_plated_hole\",shape:\"pill\",pcb_plated_hole_id:\"\",pcb_component_id:\"\",pcb_port_id:\"\",x:e,y:n,hole_width:o,hole_height:i,outer_width:r,outer_height:s,ccw_rotation:0,layers:[\"top\",\"bottom\"],port_hints:[t.toString()]}),eQn=t=\u003e{const e=ZSn.parse(t),{pinstart:n,split:o,reverse:i,noholes:r,rowy:s,ph:a,pw:A,powerpw:c,powerx:l,shellx:u,topy:g,bottomy:h,tophw:d,tophh:p,topring:m,bottomhw:_,bottomhh:f,bottomring:I,holex:C,holey:y,holed:x,bodybottom:E}=e,B=r?[]:[-C,C].map(ge=\u003e({type:\"pcb_hole\",pcb_hole_id:\"\",pcb_component_id:\"\",hole_shape:\"circle\",hole_diameter:x,x:ge,y})),S=[Hne({pin:n,x:-u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Hne({pin:n+1,x:u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Hne({pin:n+2,x:-u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I}),Hne({pin:n+3,x:u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I})],Q=Number((l-.8).toFixed(12)),w=[-l,-Q,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,Q,l],k=o?[-3.35,-3.05,-2.55,-2.25,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,2.25,2.55,3.05,3.35]:w,R=i?k.slice().reverse():k,F=o?R.map(()=\u003eA):R.map((ge,_e)=\u003e_e\u003c2||_e\u003e=R.length-2?c:A),O=R.map((ge,_e)=\u003eJo(n+4+_e,ge,s,F[_e],a)),U=Math.min(u-Math.max(d,_)/2-.2,4.5),Y=[iA([{x:-U,y:-h+f/2+I+.2},{x:-U,y:g-p/2-m-.2}]),iA([{x:U,y:-h+f/2+I+.2},{x:U,y:g-p/2-m-.2}]),iA([{x:-U,y:-E},{x:U,y:-E}])],W=Math.max(s+a/2,g+p/2+m),te=Math.min(-E,-h-f/2-I),j=-u-Math.max(d+2*m,_+2*I)/2-.25,J=-j,oe=W+.25,ie=te-.25,ne=yi(0,oe+.75,.5),le={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:(oe+ie)/2},width:J-j,height:oe-ie,layer:\"top\"};return{circuitJson:[...B,...S,...O,...Y,ne,le],parameters:e}};Rne.extend({}).transform(Tne);var tQn=t=\u003e(t.legsoutside=!1,t.pl||(t.pl=1),t.pw||(t.pw=.6),eD(t)),nQn=(t,e)=\u003e{const n=t.filter(o=\u003eo.type===\"pcb_silkscreen_text\");if(n.length===0)return t;for(const o of n)e.norefdes\u0026\u0026(o.text=\"\");return t},oQn=(t,e)=\u003ee.nosilkscreen?t.filter(n=\u003en.type!==\"pcb_silkscreen_path\"\u0026\u0026n.type!==\"pcb_silkscreen_text\"):t,iQn=(t,e)=\u003e{if(!e)return t;const n=t.filter(l=\u003el.type===\"pcb_smtpad\"||l.type===\"pcb_plated_hole\");if(n.length===0)return t;let o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const a=(l,u,g=0,h=0)=\u003e{const d=l-g/2,p=l+g/2,m=u-h/2,_=u+h/2;o=Math.min(o,d),i=Math.max(i,p),r=Math.min(r,m),s=Math.max(s,_)};for(const l of n)if(l.type===\"pcb_smtpad\"){const u=l.shape===\"circle\"?l.radius*2:l.width,g=l.shape===\"circle\"?l.radius*2:l.height;a(l.x,l.y,u,g)}else if(l.type===\"pcb_plated_hole\"){const u=l.outer_diameter??l.hole_diameter;a(l.x,l.y,u,u)}let A=0,c=0;switch(e){case\"center\":A=(o+i)/2,c=(r+s)/2;break;case\"bottomleft\":A=o,c=r;break;case\"bottomcenter\":case\"centerbottom\":A=(o+i)/2,c=r;break;case\"topcenter\":case\"centertop\":A=(o+i)/2,c=s;break;case\"leftcenter\":case\"centerleft\":A=o,c=(r+s)/2;break;case\"rightcenter\":case\"centerright\":A=i,c=(r+s)/2;break;case\"pin1\":{const l=n.find(u=\u003eu.port_hints?.[0]===\"1\")||n[0];A=l.x,c=l.y;break}}if(A===0\u0026\u0026c===0)return t;for(const l of t){if(typeof l.x==\"number\"\u0026\u0026(l.x-=A),typeof l.y==\"number\"\u0026\u0026(l.y-=c),l.center\u0026\u0026typeof l.center.x==\"number\"\u0026\u0026(l.center.x-=A,l.center.y-=c),l.type===\"pcb_silkscreen_path\")for(const u of l.route)u.x-=A,u.y-=c;l.type===\"pcb_silkscreen_text\"\u0026\u0026l.anchor_position\u0026\u0026(l.anchor_position.x-=A,l.anchor_position.y-=c)}return t},rQn=[0,90,180,270],One=(t,e)=\u003e{switch(e){case 90:return{x:-t.y,y:t.x};case 180:return{x:-t.x,y:-t.y};case 270:return{x:t.y,y:-t.x};default:return{...t}}},dct=t=\u003e{if(typeof t.x==\"number\"\u0026\u0026typeof t.y==\"number\")return{x:t.x,y:t.y};if(Array.isArray(t.points)\u0026\u0026t.points.length\u003e0){const e=t.points.map(o=\u003eo.x),n=t.points.map(o=\u003eo.y);return{x:(Math.min(...e)+Math.max(...e))/2,y:(Math.min(...n)+Math.max(...n))/2}}return null},sQn=t=\u003et.port_hints?.some(e=\u003e/^(?:pin)?1$/i.test(String(e))),aQn=(t,e,[n,o])=\u003e{const i=t.map(_=\u003e_.x),r=t.map(_=\u003e_.y),s=Math.min(...i),a=Math.max(...i),A=Math.min(...r),c=Math.max(...r),l=(s+a)/2,u=(A+c)/2,g=a-s,h=c-A,d=Math.max(g,h,1)*1e-6,p=n===\"leftside\"\u0026\u0026Math.abs(e.x-s)\u003c=d||n===\"rightside\"\u0026\u0026Math.abs(e.x-a)\u003c=d||n===\"topside\"\u0026\u0026Math.abs(e.y-c)\u003c=d||n===\"bottomside\"\u0026\u0026Math.abs(e.y-A)\u003c=d,m=o===\"left\"\u0026\u0026(g\u003c=d||e.x\u003cl-d)||o===\"right\"\u0026\u0026(g\u003c=d||e.x\u003el+d)||o===\"top\"\u0026\u0026(h\u003c=d||e.y\u003eu+d)||o===\"bottom\"\u0026\u0026(h\u003c=d||e.y\u003cu-d);return p\u0026\u0026m},yxe=(t,e)=\u003e{if(!t||typeof t!=\"object\"||typeof t.x!=\"number\"||typeof t.y!=\"number\")return;const n=One(t,e);t.x=n.x,t.y=n.y},Gne=t=\u003e(t%360+360)%360,AQn=(t,e)=\u003e{switch(t.shape){case\"rect\":return{...t,shape:\"rotated_rect\",ccw_rotation:Gne(e)};case\"pill\":return{...t,shape:\"rotated_pill\",ccw_rotation:Gne(e)};case\"rotated_rect\":case\"rotated_pill\":return{...t,ccw_rotation:Gne(t.ccw_rotation+e)};default:return t}},cQn=(t,e)=\u003ee===0?t:t.map(n=\u003e{const o=structuredClone(n);if(typeof o.x==\"number\"\u0026\u0026typeof o.y==\"number\"){const i=One(o,e);o.x=i.x,o.y=i.y}yxe(o.center,e),yxe(o.anchor_position,e);for(const i of[\"route\",\"outline\",\"points\"])if(Array.isArray(o[i]))for(const r of o[i])yxe(r,e);return o.type===\"pcb_smtpad\"?AQn(o,e):((o.type===\"pcb_plated_hole\"||o.type===\"pcb_silkscreen_text\"||o.type===\"pcb_fabrication_note_text\")\u0026\u0026(o.ccw_rotation=Gne(Number(o.ccw_rotation??0)+e)),(e===90||e===270)\u0026\u0026(o.type===\"pcb_courtyard_rect\"||o.type===\"pcb_silkscreen_rect\"||o.type===\"pcb_fabrication_note_rect\"||o.type===\"pcb_cutout\"\u0026\u0026o.shape===\"rect\")\u0026\u0026([o.width,o.height]=[o.height,o.width]),o)}),lQn=(t,e)=\u003e{if(!e)return t;const n=t.filter(a=\u003ea.type===\"pcb_smtpad\"||a.type===\"pcb_plated_hole\"),o=n.find(sQn),i=n.map(dct).filter(a=\u003ea!==null),r=o?dct(o):null;if(!o||!r||i.length===0)throw new Error(`pin1location(${e.join(\",\")}) requires a footprint with a pad whose port_hints contain \"1\" or \"pin1\"`);const s=rQn.find(a=\u003e{const A=i.map(l=\u003eOne(l,a)),c=One(r,a);return aQn(A,c,e)});if(s===void 0)throw new Error(`pin1location(${e.join(\",\")}) cannot be reached with a rotation; the requested location may be the mirrored orientation of this footprint`);return cQn(t,s)},hct=(t,e,n)=\u003eMath.min(t,e/2,n/2),uQn=(t,e)=\u003e{if(e===void 0)return t;const n=KA(e);if(!Number.isFinite(n)||n\u003c0)throw new Error(`rounded radius must be a non-negative length, got \"${e}\"`);for(const o of t)o.type===\"pcb_smtpad\"\u0026\u0026(o.shape===\"rect\"||o.shape===\"rotated_rect\")\u0026\u0026(o.corner_radius=hct(n,o.width,o.height)),o.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in o\u0026\u0026\"rect_pad_height\"in o\u0026\u0026(o.rect_border_radius=hct(n,o.rect_pad_width,o.rect_pad_height));return t};function gQn(t){return t!=null}var dQn=t=\u003et.trim().replace(/^pinheader(?=[\\d_]|$)/i,\"pinrow\").replace(/^d2pak(\\d+)(?=_|$)/i,\"d2pak_$1\").replace(/^to-252(?:-(\\d+))?(?=_|$)/i,(e,n)=\u003en?`to252_${n}`:\"to252\").replace(/^to-263(?:-(\\d+))?(?=_|$)/i,(e,n)=\u003en?`to263_${n}`:\"to263\").replace(/^sot-23(?:-(\\d+))?(?=_|$)/i,(e,n)=\u003en?`sot23_${n}`:\"sot23\").replace(/^sot23-(\\d+)(?=_|$)/i,\"sot23_$1\").replace(/^sot-223-(\\d+)(?=_|$)/i,\"sot223_$1\").replace(/^to-220f-(\\d+)(?=_|$)/i,\"to220f_$1\").replace(/^jst_(ph|sh|zh|xh)_(\\d+)(?=_|$)/i,\"jst$2_$1\"),hQn=t=\u003et.replace(/([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+))\\s*(?:um|µm)(?=$|[x,() ])/gi,e=\u003e`${Number(ce.parse(e).toPrecision(12))}mm`),pQn=t=\u003e{let e=Yne();const n=dQn(t),i=n.replace(/^((?:\\d{4}|\\d{5}))(?=$|_|x)/,\"res$1\").replace(/^zh(\\d+)(?:$|_)/,\"jst$1_zh\").split(/_(?!metric)/).map(r=\u003e{const s=r.match(/^(pin1location)(\\(.*\\))$/i);if(s)return{fn:s[1].toLowerCase(),v:s[2]};const a=r.match(/((?:p\\d+[a-zA-Z]+(?=[\\(\\d\\.\\+\\-\\?]))|[a-zA-Z]+)([\\(\\d\\.\\+\\-\\?].*)?/);if(!a)return null;const[,A,c]=a;if(!A)return null;const l=A.toLowerCase();return c?.includes(\"?\")?null:{fn:l,v:c}}).filter(gQn);for(const{fn:r,v:s}of i)e=e[r](s);return e.setString(n),e},mQn=()=\u003eObject.keys(w8),Yne=()=\u003e{const t=new Proxy({},{get:(e,n)=\u003e{if(n===\"soup\"||n===\"circuitJson\"){if(\"fn\"in e\u0026\u0026w8[e.fn])return()=\u003e{const{circuitJson:o}=w8[e.fn](e),i=oQn(o,e),r=nQn(i,e),s=lQn(r,e.pin1location?DAt.parse(e.pin1location):void 0),a=uQn(s,e.rounded);return iQn(a,e.origin)};if(!w8[e.fn])throw new Error(`Invalid footprint function, got \"${e.fn}\"${e.string?`, from string \"${e.string}\"`:\"\"}`);return()=\u003e{throw new Error(`No function found for footprinter, make sure to specify .dip, .lr, .p, etc. Got \"${n}\"`)}}if(n===\"json\"){if(!w8[e.fn])throw new Error(`Invalid footprint function, got \"${e.fn}\"${e.string?`, from string \"${e.string}\"`:\"\"}`);return()=\u003ew8[e.fn](e).parameters}return n===\"getFootprintNames\"?()=\u003eObject.keys(w8):n===\"params\"?()=\u003ee:n===\"setString\"?o=\u003e(e.string=o,t):(...o)=\u003e{const i=o[0],r=typeof i==\"string\"?hQn(i):i;return Object.keys(e).length===0?`${n}${i}`in w8?(e[`${n}${i}`]=!0,e.fn=`${n}${i}`):(e[n]=!0,e.fn=n,n===\"res\"||n===\"cap\"||n===\"led\"||n===\"diode\"?i\u0026\u0026(typeof i==\"string\"\u0026\u0026i.includes(\"_metric\")?e.metric=i.split(\"_metric\")[0]:e.imperial=i):e.num_pins=Number.isNaN(Number.parseFloat(i))?void 0:Number.parseFloat(i)):!i\u0026\u0026[\"w\",\"h\",\"p\"].includes(n)||(e[n]=n===\"pin1location\"\u0026\u0026o.length\u003e1?o:r??!0),t}}});return t};Yne.string=pQn,Yne.getFootprintNames=mQn;var pct=Yne;function xxe([t,e],[n,o],{lineThickness:i=0}={}){return i===0?X1(t,e,n,o):_Qn(t,e,n,o)\u003c=i}function X1(t,e,n,o){const i=Une(t,e,n),r=Une(t,e,o),s=Une(n,o,t),a=Une(n,o,e);return!!(i!==r\u0026\u0026s!==a||i===0\u0026\u0026CV(t,n,e)||r===0\u0026\u0026CV(t,o,e)||s===0\u0026\u0026CV(n,t,o)||a===0\u0026\u0026CV(n,e,o))}function Une(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o\u003e0?1:2}function CV(t,e,n){return e.x\u003c=Math.max(t.x,n.x)\u0026\u0026e.x\u003e=Math.min(t.x,n.x)\u0026\u0026e.y\u003c=Math.max(t.y,n.y)\u0026\u0026e.y\u003e=Math.min(t.y,n.y)}function _Qn(t,e,n,o){if(t.x===e.x\u0026\u0026t.y===e.y)return Zd(t,n,o);if(n.x===o.x\u0026\u0026n.y===o.y)return Zd(n,t,e);if(X1(t,e,n,o))return 0;const i=[Zd(t,n,o),Zd(e,n,o),Zd(n,t,e),Zd(o,t,e)];return Math.min(...i)}function Zd(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return ad(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;i=Math.max(0,Math.min(1,i));const r={x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)};return ad(t,r)}function ad(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function V4(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=o.x-n.x,a=o.y-n.y,A=t.x-n.x,c=t.y-n.y,l=i*a-r*s;if(Math.abs(l)\u003c1e-10)return null;const u=(c*s-A*a)/l,g=(i*c-r*A)/l,h=1e-9;if(u\u003e=-h\u0026\u0026u\u003c=1+h\u0026\u0026g\u003e=-h\u0026\u0026g\u003c=1+h){const d=t.x+u*i,p=t.y+u*r;return{x:d,y:p}}return null}function Exe(t,e,n){const o=A=\u003eA.x\u003e=n.minX\u0026\u0026A.x\u003c=n.maxX\u0026\u0026A.y\u003e=n.minY\u0026\u0026A.y\u003c=n.maxY;if(o(t)||o(e))return!0;const i={x:n.minX,y:n.minY},r={x:n.maxX,y:n.minY},s={x:n.minX,y:n.maxY},a={x:n.maxX,y:n.maxY};return X1(t,e,i,r)||X1(t,e,r,a)||X1(t,e,a,s)||X1(t,e,s,i)}var fQn=t=\u003e{const e=[];for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];e.push([o,i])}return e},IQn=(t,e,n)=\u003e{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)\u003e1e-9)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i\u003c0)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return!(r===0||i\u003er)},nD=(t,e)=\u003e{if(e.length\u003c3)return!1;const n=fQn(e);for(const[i,r]of n)if(IQn(t,i,r))return!0;let o=!1;for(let i=0,r=e.length-1;i\u003ce.length;r=i++){const s=e[i].x,a=e[i].y,A=e[r].x,c=e[r].y;a\u003et.y!=c\u003et.y\u0026\u0026t.x\u003c(A-s)*(t.y-a)/(c-a)+s\u0026\u0026(o=!o)}return o};function yV(t){const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,maxX:t.center.x+e,minY:t.center.y-n,maxY:t.center.y+n}}function mct(t,e){const n=yV(t),o=yV(e),i=Math.max(n.minX-o.maxX,o.minX-n.maxX,0),r=Math.max(n.minY-o.maxY,o.minY-n.maxY,0),s={x:0,y:0},a={x:0,y:0};return i===0\u0026\u0026r===0?{distance:0,pointA:t.center,pointB:e.center}:(s.x=fp(t.center.x,o.minX,o.maxX),s.y=fp(t.center.y,o.minY,o.maxY),a.x=fp(e.center.x,n.minX,n.maxX),a.y=fp(e.center.y,n.minY,n.maxY),{distance:Math.hypot(s.x-a.x,s.y-a.y),pointA:s,pointB:a})}function Kne(t,e){return mct(t,e)}function fp(t,e,n){return Math.max(e,Math.min(n,t))}function CQn(t,e){let n=Number.POSITIVE_INFINITY,o={x:0,y:0},i={x:0,y:0};for(const r of t)for(const s of e){const{distance:a,pointA:A,pointB:c}=mct(r,s);a\u003cn\u0026\u0026(n=a,o=A,i=c)}return{pointA:o,pointB:i,distance:n}}function xV(t,e,n,o){if(t.x===e.x\u0026\u0026t.y===e.y)return Zd(t,n,o);if(n.x===o.x\u0026\u0026n.y===o.y)return Zd(n,t,e);if(X1(t,e,n,o))return 0;const i=[Zd(t,n,o),Zd(e,n,o),Zd(n,t,e),Zd(o,t,e)];return Math.min(...i)}function _ct(t,e,n){const o={x:n.minX,y:n.minY},i={x:n.maxX,y:n.minY},r={x:n.minX,y:n.maxY},s={x:n.maxX,y:n.maxY};if(X1(t,e,o,i)||X1(t,e,i,s)||X1(t,e,s,r)||X1(t,e,r,o)||t.x\u003e=n.minX\u0026\u0026t.x\u003c=n.maxX\u0026\u0026t.y\u003e=n.minY\u0026\u0026t.y\u003c=n.maxY\u0026\u0026e.x\u003e=n.minX\u0026\u0026e.x\u003c=n.maxX\u0026\u0026e.y\u003e=n.minY\u0026\u0026e.y\u003c=n.maxY)return 0;const a=[Zd(o,t,e),Zd(i,t,e),Zd(r,t,e),Zd(s,t,e)];if(t.x\u003e=n.minX\u0026\u0026t.x\u003c=n.maxX\u0026\u0026t.y\u003e=n.minY\u0026\u0026t.y\u003c=n.maxY||e.x\u003e=n.minX\u0026\u0026e.x\u003c=n.maxX\u0026\u0026e.y\u003e=n.minY\u0026\u0026e.y\u003c=n.maxY)return 0;if(t.x\u003cn.minX||t.x\u003en.maxX||t.y\u003cn.minY||t.y\u003en.maxY){const A=fp(t.x,n.minX,n.maxX),c=fp(t.y,n.minY,n.maxY);a.push(ad(t,{x:A,y:c}))}if(e.x\u003cn.minX||e.x\u003en.maxX||e.y\u003cn.minY||e.y\u003en.maxY){const A=fp(e.x,n.minX,n.maxX),c=fp(e.y,n.minY,n.maxY);a.push(ad(e,{x:A,y:c}))}return Math.min(...a)}function yQn(t,e,n){const o=n.width/2,i=n.height/2,r={minX:n.center.x-o,maxX:n.center.x+o,minY:n.center.y-i,maxY:n.center.y+i};return _ct(t,e,r)}function Vne(t,e,n){const o={x:n.x,y:n.y};if(t.x===e.x\u0026\u0026t.y===e.y)return Math.max(0,ad(t,o)-n.radius);const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-t.x,y:o.y-t.y},s=i.x*i.x+i.y*i.y,a=Math.max(0,Math.min(1,(i.x*r.x+i.y*r.y)/s)),A={x:t.x+a*i.x,y:t.y+a*i.y},c=ad(A,o);return Math.max(0,c-n.radius)}function SQ(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r===0)return{x:e.x,y:e.y};let s=((t.x-e.x)*o+(t.y-e.y)*i)/r;return s=Math.max(0,Math.min(1,s)),{x:e.x+s*o,y:e.y+s*i}}var Bxe=(t,e)=\u003e{const n={x:e.x-t.x,y:e.y-t.y},o=Math.sqrt(n.x**2+n.y**2);return{x:n.x/o,y:n.y/o}},Jk=t=\u003e{switch(t){case\"up\":return{x:0,y:1};case\"down\":return{x:0,y:-1};case\"left\":return{x:-1,y:0};case\"right\":return{x:1,y:0}}};function xQn({rows:t,cols:e,xSpacing:n,ySpacing:o,width:i,height:r,offsetX:s=0,offsetY:a=0,yDirection:A=\"cartesian\",centered:c=!0}){const l=n??1,u=o??1,g=i??e*l,h=r??t*u,d=c?-g/2:0,p=c?-h/2:0,m=i?i/e:l,_=r?r/t:u,f=[];for(let I=0;I\u003ct;I++)for(let C=0;C\u003ce;C++){const y=I*e+C,x=s+d+C*m+m/2,E=A===\"cartesian\"?a+p+(t-1-I)*_+_/2:a+p+I*_+_/2;f.push({index:y,center:{x,y:E},topLeft:{x:x-m/2,y:E+_/2},bottomRight:{x:x+m/2,y:E-_/2},row:I,col:C})}return f}function k9(t){return(t%360+360)%360}function EQn(t,e){const n=e.width/2,o=e.height/2,i=e.center.x-n,r=e.center.x+n,s=e.center.y-o,a=e.center.y+o;if(t.x\u003e=i\u0026\u0026t.x\u003c=r\u0026\u0026t.y\u003e=s\u0026\u0026t.y\u003c=a)return 0;const A=fp(t.x,i,r),c=fp(t.y,s,a);return ad(t,{x:A,y:c})}function BQn(t,e){if(t.x\u003e=e.minX\u0026\u0026t.x\u003c=e.maxX\u0026\u0026t.y\u003e=e.minY\u0026\u0026t.y\u003c=e.maxY)return 0;const n=fp(t.x,e.minX,e.maxX),o=fp(t.y,e.minY,e.maxY);return ad(t,{x:n,y:o})}function zne(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function bxe(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}var bQn=(t,e)=\u003e{const n=Math.max(0,Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)),o=Math.max(0,Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY));return n*o},EV=(t,e)=\u003e{const n=t.maxX\u003ce.minX?e.minX-t.maxX:e.maxX\u003ct.minX?t.minX-e.maxX:0,o=t.maxY\u003ce.minY?e.minY-t.maxY:e.maxY\u003ct.minY?t.minY-e.maxY:0;return Math.sqrt(n*n+o*o)},fct=(t,e)=\u003e{const n=Math.max(t.minX,e.minX),o=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return n\u003ei||o\u003er?null:{minX:n,minY:o,maxX:i,maxY:r}},z4=(t,e)=\u003e!(t.maxX\u003ce.minX||e.maxX\u003ct.minX||t.maxY\u003ce.minY||e.maxY\u003ct.minY),Ey=t=\u003e{const{center:e,width:n,height:o}=t,i=n/2,r=o/2;return{minX:e.x-i,maxX:e.x+i,minY:e.y-r,maxY:e.y+r}},oD=t=\u003e({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),Oh=t=\u003e{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r\u003ct.length;r++){const s=t[r];s.x\u003ce\u0026\u0026(e=s.x),s.y\u003cn\u0026\u0026(n=s.y),s.x\u003eo\u0026\u0026(o=s.x),s.y\u003ei\u0026\u0026(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}},Jne={exports:{}},Sxe,Ict;function SQn(){if(Ict)return Sxe;Ict=1;var t=1e3,e=t*60,n=e*60,o=n*24,i=o*7,r=o*365.25;Sxe=function(l,u){u=u||{};var g=typeof l;if(g===\"string\"\u0026\u0026l.length\u003e0)return s(l);if(g===\"number\"\u0026\u0026isFinite(l))return u.long?A(l):a(l);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(l))};function s(l){if(l=String(l),!(l.length\u003e100)){var u=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var g=parseFloat(u[1]),h=(u[2]||\"ms\").toLowerCase();switch(h){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return g*r;case\"weeks\":case\"week\":case\"w\":return g*i;case\"days\":case\"day\":case\"d\":return g*o;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return g*n;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return g*e;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return g*t;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return g;default:return}}}}function a(l){var u=Math.abs(l);return u\u003e=o?Math.round(l/o)+\"d\":u\u003e=n?Math.round(l/n)+\"h\":u\u003e=e?Math.round(l/e)+\"m\":u\u003e=t?Math.round(l/t)+\"s\":l+\"ms\"}function A(l){var u=Math.abs(l);return u\u003e=o?c(l,u,o,\"day\"):u\u003e=n?c(l,u,n,\"hour\"):u\u003e=e?c(l,u,e,\"minute\"):u\u003e=t?c(l,u,t,\"second\"):l+\" ms\"}function c(l,u,g,h){var d=u\u003e=g*1.5;return Math.round(l/g)+\" \"+h+(d?\"s\":\"\")}return Sxe}var Qxe,Cct;function QQn(){if(Cct)return Qxe;Cct=1;function t(e){o.debug=o,o.default=o,o.coerce=c,o.disable=a,o.enable=r,o.enabled=A,o.humanize=SQn(),o.destroy=l,Object.keys(e).forEach(u=\u003e{o[u]=e[u]}),o.names=[],o.skips=[],o.formatters={};function n(u){let g=0;for(let h=0;h\u003cu.length;h++)g=(g\u003c\u003c5)-g+u.charCodeAt(h),g|=0;return o.colors[Math.abs(g)%o.colors.length]}o.selectColor=n;function o(u){let g,h=null,d,p;function m(..._){if(!m.enabled)return;const f=m,I=Number(new Date),C=I-(g||I);f.diff=C,f.prev=g,f.curr=I,g=I,_[0]=o.coerce(_[0]),typeof _[0]!=\"string\"\u0026\u0026_.unshift(\"%O\");let y=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(E,B)=\u003e{if(E===\"%%\")return\"%\";y++;const S=o.formatters[B];if(typeof S==\"function\"){const Q=_[y];E=S.call(f,Q),_.splice(y,1),y--}return E}),o.formatArgs.call(f,_),(f.log||o.log).apply(f,_)}return m.namespace=u,m.useColors=o.useColors(),m.color=o.selectColor(u),m.extend=i,m.destroy=o.destroy,Object.defineProperty(m,\"enabled\",{enumerable:!0,configurable:!1,get:()=\u003eh!==null?h:(d!==o.namespaces\u0026\u0026(d=o.namespaces,p=o.enabled(u)),p),set:_=\u003e{h=_}}),typeof o.init==\"function\"\u0026\u0026o.init(m),m}function i(u,g){const h=o(this.namespace+(typeof g\u003e\"u\"?\":\":g)+u);return h.log=this.log,h}function r(u){o.save(u),o.namespaces=u,o.names=[],o.skips=[];const g=(typeof u==\"string\"?u:\"\").trim().replace(/\\s+/g,\",\").split(\",\").filter(Boolean);for(const h of g)h[0]===\"-\"?o.skips.push(h.slice(1)):o.names.push(h)}function s(u,g){let h=0,d=0,p=-1,m=0;for(;h\u003cu.length;)if(d\u003cg.length\u0026\u0026(g[d]===u[h]||g[d]===\"*\"))g[d]===\"*\"?(p=d,m=h,d++):(h++,d++);else if(p!==-1)d=p+1,m++,h=m;else return!1;for(;d\u003cg.length\u0026\u0026g[d]===\"*\";)d++;return d===g.length}function a(){const u=[...o.names,...o.skips.map(g=\u003e\"-\"+g)].join(\",\");return o.enable(\"\"),u}function A(u){for(const g of o.skips)if(s(u,g))return!1;for(const g of o.names)if(s(u,g))return!0;return!1}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")}return o.enable(o.load()),o}return Qxe=t,Qxe}var yct;function vQn(){return yct||(yct=1,(function(t,e){var n={env:{},version:\"\"};e.formatArgs=i,e.save=r,e.load=s,e.useColors=o,e.storage=a(),e.destroy=(()=\u003e{let c=!1;return()=\u003e{c||(c=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})(),e.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function o(){if(typeof window\u003c\"u\"\u0026\u0026window.process\u0026\u0026(window.process.type===\"renderer\"||window.process.__nwjs))return!0;if(typeof navigator\u003c\"u\"\u0026\u0026navigator.userAgent\u0026\u0026navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let c;return typeof document\u003c\"u\"\u0026\u0026document.documentElement\u0026\u0026document.documentElement.style\u0026\u0026document.documentElement.style.WebkitAppearance||typeof window\u003c\"u\"\u0026\u0026window.console\u0026\u0026(window.console.firebug||window.console.exception\u0026\u0026window.console.table)||typeof navigator\u003c\"u\"\u0026\u0026navigator.userAgent\u0026\u0026(c=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))\u0026\u0026parseInt(c[1],10)\u003e=31||typeof navigator\u003c\"u\"\u0026\u0026navigator.userAgent\u0026\u0026navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function i(c){if(c[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+c[0]+(this.useColors?\"%c \":\" \")+\"+\"+t.exports.humanize(this.diff),!this.useColors)return;const l=\"color: \"+this.color;c.splice(1,0,l,\"color: inherit\");let u=0,g=0;c[0].replace(/%[a-zA-Z%]/g,h=\u003e{h!==\"%%\"\u0026\u0026(u++,h===\"%c\"\u0026\u0026(g=u))}),c.splice(g,0,l)}e.log=console.debug||console.log||(()=\u003e{});function r(c){try{c?e.storage.setItem(\"debug\",c):e.storage.removeItem(\"debug\")}catch{}}function s(){let c;try{c=e.storage.getItem(\"debug\")||e.storage.getItem(\"DEBUG\")}catch{}return!c\u0026\u0026typeof n\u003c\"u\"\u0026\u0026\"env\"in n\u0026\u0026(c=n.env.DEBUG),c}function a(){try{return localStorage}catch{}}t.exports=QQn()(e);const{formatters:A}=t.exports;A.j=function(c){try{return JSON.stringify(c)}catch(l){return\"[UnexpectedJSONParseError]: \"+l.message}}})(Jne,Jne.exports)),Jne.exports}var wQn=vQn();const vc=_y(wQn);function Bn(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function PQn(t,e){return e.map(n=\u003eBn(t,n))}function xct(t){return{a:parseFloat(t.a),b:parseFloat(t.b),c:parseFloat(t.c),d:parseFloat(t.d),e:parseFloat(t.e),f:parseFloat(t.f)}}const MQn=/^matrix\\(\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*\\)$/i;function BV(t){const e=s=\u003e{const a=parseFloat(s);if(Number.isFinite(a))return a;throw new Error(`'${t}' is not a matrix`)},n=t.substring(0,7).toLowerCase(),o=t.substring(t.length-1),r=t.substring(7,t.length-1).split(\",\");if(n===\"matrix(\"\u0026\u0026o===\")\"\u0026\u0026r.length===6)return{a:e(r[0]),b:e(r[1]),c:e(r[2]),d:e(r[3]),e:e(r[4]),f:e(r[5])};throw new Error(`'${t}' is not a matrix`)}function DQn(t){const e=t.match(MQn);if(e===null||e.length\u003c7)throw new Error(`'${t}' is not a matrix`);return{a:parseFloat(e[1]),b:parseFloat(e[2]),c:parseFloat(e[3]),d:parseFloat(e[4]),e:parseFloat(e[5]),f:parseFloat(e[6])}}function QQ(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function bV(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function SV(t){return typeof t\u003e\"u\"}function Wk(t){return typeof t==\"number\"\u0026\u0026!Number.isNaN(t)\u0026\u0026Number.isFinite(t)}function NQn(t){return typeof t==\"object\"\u0026\u0026t!==null\u0026\u0026!Array.isArray(t)}function RQn(t){return NQn(t)\u0026\u0026\"a\"in t\u0026\u0026Wk(t.a)\u0026\u0026\"b\"in t\u0026\u0026Wk(t.b)\u0026\u0026\"c\"in t\u0026\u0026Wk(t.c)\u0026\u0026\"d\"in t\u0026\u0026Wk(t.d)\u0026\u0026\"e\"in t\u0026\u0026Wk(t.e)\u0026\u0026\"f\"in t\u0026\u0026Wk(t.f)}function pA(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function jk(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return jk(r,...i)}}}function Ad(...t){return jk(...t)}const{cos:TQn,sin:kQn,PI:FQn}=Math;function vQ(t,e,n){const o=TQn(t),i=kQn(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return SV(e)||SV(n)?r:jk([pA(e,n),r,pA(-e,-n)])}function F9(t,e=void 0,n=void 0){return vQ(t*FQn/180,e,n)}function dC(t,e=void 0,n=void 0,o=void 0){SV(e)\u0026\u0026(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return SV(n)||SV(o)?i:jk([pA(n,o),i,pA(-n,-o)])}function Ect(t,e){return{a:1,c:t,e:0,b:e,d:1,f:0}}const{tan:Bct}=Math;function bct(t,e){return{a:1,c:Bct(t),e:0,b:Bct(e),d:1,f:0}}function vxe(t,e){return bct(t*Math.PI/180,e*Math.PI/180)}function LQn(t){return iD(t)}function HQn(t){return iD(t)}function iD(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function Sct(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function OQn(t,e){const n=t[0].x!=null?t[0].x:t[0][0],o=t[0].y!=null?t[0].y:t[0][1],i=e[0].x!=null?e[0].x:e[0][0],r=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],A=e[1].x!=null?e[1].x:e[1][0],c=e[1].y!=null?e[1].y:e[1][1],l=t[2].x!=null?t[2].x:t[2][0],u=t[2].y!=null?t[2].y:t[2][1],g=e[2].x!=null?e[2].x:e[2][0],h=e[2].y!=null?e[2].y:e[2][1],d={a:n-l,b:o-u,c:s-l,d:a-u,e:l,f:u},p={a:i-g,b:r-h,c:A-g,d:c-h,e:g,f:h},m=bV(d),_=jk([p,m]);return Sct(_)}function GQn(t){return Array.isArray(t)?t.map(e):e(t);function e(n){switch(n.type){case\"matrix\":if(\"a\"in n\u0026\u0026\"b\"in n\u0026\u0026\"c\"in n\u0026\u0026\"d\"in n\u0026\u0026\"e\"in n\u0026\u0026\"f\"in n)return xct(n);throw new Error(\"MISSING_MANDATORY_PARAM\");case\"translate\":if(!(\"tx\"in n))throw new Error(\"MISSING_MANDATORY_PARAM\");return\"ty\"in n?pA(n.tx,n.ty):pA(n.tx);case\"scale\":if(!(\"sx\"in n))throw new Error(\"MISSING_MANDATORY_PARAM\");return\"sy\"in n?dC(n.sx,n.sy):dC(n.sx);case\"rotate\":if(!(\"angle\"in n))throw new Error(\"MISSING_MANDATORY_PARAM\");return\"cx\"in n\u0026\u0026\"cy\"in n?F9(n.angle,n.cx,n.cy):F9(n.angle);case\"skewX\":if(!(\"angle\"in n))throw new Error(\"MISSING_MANDATORY_PARAM\");return vxe(n.angle,0);case\"skewY\":if(!(\"angle\"in n))throw new Error(\"MISSING_MANDATORY_PARAM\");return vxe(0,n.angle);case\"shear\":if(!(\"shx\"in n\u0026\u0026\"shy\"in n))throw new Error(\"MISSING_MANDATORY_PARAM\");return Ect(n.shx,n.shy);default:throw new Error(\"UNSUPPORTED_DESCRIPTOR\")}}}let Qct=class extends SyntaxError{constructor(e,n,o,i){super(e),this.expected=n,this.found=o,this.location=i,this.name=\"SyntaxError\"}format(e){let n=\"Error: \"+this.message;if(this.location){let o=null;const i=e.find(A=\u003eA.source===this.location.source);i\u0026\u0026(o=i.text.split(/\\r\\n|\\n|\\r/g));const r=this.location.start,s=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(r):r,a=this.location.source+\":\"+s.line+\":\"+s.column;if(o){const A=this.location.end,c=\"\".padEnd(s.line.toString().length,\" \"),l=o[r.line-1],g=(r.line===A.line?A.column:l.length+1)-r.column||1;n+=`\n --\u003e `+a+`\n`+c+` |\n`+s.line+\" | \"+l+`\n`+c+\" | \"+\"\".padEnd(r.column-1,\" \")+\"\".padEnd(g,\"^\")}else n+=`\n at `+a}return n}static buildMessage(e,n){function o(g){return g.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,\"unicode\")?new RegExp(\"[\\\\p{C}\\\\p{Mn}\\\\p{Mc}]\",\"gu\"):null;function r(g){return i?g.replace(i,h=\u003e\"\\\\u{\"+o(h)+\"}\"):g}function s(g){return r(g.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,h=\u003e\"\\\\x0\"+o(h)).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,h=\u003e\"\\\\x\"+o(h)))}function a(g){return r(g.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,h=\u003e\"\\\\x0\"+o(h)).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,h=\u003e\"\\\\x\"+o(h)))}const A={literal(g){return'\"'+s(g.text)+'\"'},class(g){const h=g.parts.map(d=\u003eArray.isArray(d)?a(d[0])+\"-\"+a(d[1]):a(d));return\"[\"+(g.inverted?\"^\":\"\")+h.join(\"\")+\"]\"+(g.unicode?\"u\":\"\")},any(){return\"any character\"},end(){return\"end of input\"},other(g){return g.description}};function c(g){return A[g.type](g)}function l(g){const h=g.map(c);if(h.sort(),h.length\u003e0){let d=1;for(let p=1;p\u003ch.length;p++)h[p-1]!==h[p]\u0026\u0026(h[d]=h[p],d++);h.length=d}switch(h.length){case 1:return h[0];case 2:return h[0]+\" or \"+h[1];default:return h.slice(0,-1).join(\", \")+\", or \"+h[h.length-1]}}function u(g){return g?'\"'+s(g)+'\"':\"end of input\"}return\"Expected \"+l(e)+\" but \"+u(n)+\" found.\"}};function YQn(t,e){e=e!==void 0?e:{};const n={},o=e.grammarSource,i={transformList:Ct};let r=Ct;const s=\"matrix\",a=\"(\",A=\")\",c=\"translate\",l=\"scale\",u=\"rotate\",g=\"skewX\",h=\"skewY\",d=\",\",p=\".\",m=/^[eE]/,_=/^[+\\-]/,f=/^[0-9]/,I=/^[ \\t\\r\\n]/,C=Le(\"matrix\",!1),y=Le(\"(\",!1),x=Le(\")\",!1),E=Le(\"translate\",!1),B=Le(\"scale\",!1),S=Le(\"rotate\",!1),Q=Le(\"skewX\",!1),w=Le(\"skewY\",!1),M=Le(\",\",!1),k=At(\"fractionalConstant\"),R=Le(\".\",!1),F=Ye([\"e\",\"E\"],!1,!1,!1),O=Ye([\"+\",\"-\"],!1,!1,!1),U=Ye([[\"0\",\"9\"]],!1,!1,!1),Y=Ye([\" \",\"\t\",\"\\r\",`\n`],!1,!1,!1);function W(ht){return ht}function te(ht,Kt){return ht.concat(Kt)}function j(ht,Kt,rn,Lt,Ho,Ao){return[{type:\"matrix\",a:ht,b:Kt,c:rn,d:Lt,e:Ho,f:Ao}]}function J(ht,Kt){var rn={type:\"translate\",tx:ht};return Kt\u0026\u0026(rn.ty=Kt),[rn]}function oe(ht,Kt){var rn={type:\"scale\",sx:ht};return Kt\u0026\u0026(rn.sy=Kt),[rn]}function ie(ht,Kt){var rn={type:\"rotate\",angle:ht};return Kt\u0026\u0026(rn.cx=Kt[0],rn.cy=Kt[1]),[rn]}function ne(ht){return[{type:\"skewX\",angle:ht}]}function le(ht){return[{type:\"skewY\",angle:ht}]}function ge(ht){return parseFloat(ht.join(\"\"))}function _e(ht){return parseInt(ht.join(\"\"))}function ue(ht){return ht}function fe(ht,Kt){return[ht,Kt]}function pe(ht){return ht.join(\"\")}function ye(ht,Kt){return[ht,Kt||null].join(\"\")}function Me(ht,Kt){return[ht,Kt].join(\"\")}function ve(ht,Kt){return[ht?ht.join(\"\"):null,\".\",Kt.join(\"\")].join(\"\")}function he(ht){return ht.join(\"\")}function Qe(ht,Kt){return[\"e\",ht,Kt.join(\"\")].join(\"\")}let Pe=e.peg$currPos|0;const we=[{line:1,column:1}];let Te=Pe,Re=e.peg$maxFailExpected||[],Ee=e.peg$silentFails|0,ke;if(e.startRule){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule \"`+e.startRule+'\".');r=i[e.startRule]}function Ce(ht=Pe){const Kt=t.codePointAt(ht);return Kt===void 0?\"\":String.fromCodePoint(Kt)}function Le(ht,Kt){return{type:\"literal\",text:ht,ignoreCase:Kt}}function Ye(ht,Kt,rn,Lt){return{type:\"class\",parts:ht,inverted:Kt,ignoreCase:rn,unicode:Lt}}function tt(){return{type:\"end\"}}function At(ht){return{type:\"other\",description:ht}}function at(ht){let Kt=we[ht],rn;if(Kt)return Kt;if(ht\u003e=we.length)rn=we.length-1;else for(rn=ht;!we[--rn];);for(Kt=we[rn],Kt={line:Kt.line,column:Kt.column};rn\u003cht;)t.charCodeAt(rn)===10?(Kt.line++,Kt.column=1):Kt.column++,rn++;return we[ht]=Kt,Kt}function nt(ht,Kt,rn){const Lt=at(ht),Ho=at(Kt);return{source:o,start:{offset:ht,line:Lt.line,column:Lt.column},end:{offset:Kt,line:Ho.line,column:Ho.column}}}function gt(ht){Pe\u003cTe||(Pe\u003eTe\u0026\u0026(Te=Pe,Re=[]),Re.push(ht))}function bt(ht,Kt,rn){return new Qct(Qct.buildMessage(ht,Kt),ht,Kt,rn)}function Ct(){let ht,Kt,rn,Lt,Ho;for(ht=Pe,Kt=[],rn=An();rn!==n;)Kt.push(rn),rn=An();for(rn=Dt(),rn===n\u0026\u0026(rn=null),Lt=[],Ho=An();Ho!==n;)Lt.push(Ho),Ho=An();return ht=rn,ht}function Dt(){let ht,Kt,rn,Lt;if(ht=Pe,Kt=kt(),Kt!==n){if(rn=[],Lt=xt(),Lt!==n)for(;Lt!==n;)rn.push(Lt),Lt=xt();else rn=n;rn!==n?(Lt=Dt(),Lt!==n?ht=te(Kt,Lt):(Pe=ht,ht=n)):(Pe=ht,ht=n)}else Pe=ht,ht=n;return ht===n\u0026\u0026(ht=kt()),ht}function kt(){let ht;return ht=it(),ht===n\u0026\u0026(ht=Yt(),ht===n\u0026\u0026(ht=pn(),ht===n\u0026\u0026(ht=be(),ht===n\u0026\u0026(ht=et(),ht===n\u0026\u0026(ht=It()))))),ht}function it(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt,Zt,nn,zn,Nn,Co,ei,ro,To,yo;if(ht=Pe,t.substr(Pe,6)===s?(Kt=s,Pe+=6):(Kt=n,Ee===0\u0026\u0026gt(C)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0\u0026\u0026gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n)if(qe=xt(),qe!==n)if(vt=Bt(),vt!==n)if(qt=xt(),qt!==n)if(Zt=Bt(),Zt!==n)if(nn=xt(),nn!==n)if(zn=Bt(),zn!==n)if(Nn=xt(),Nn!==n)if(Co=Bt(),Co!==n)if(ei=xt(),ei!==n)if(ro=Bt(),ro!==n){for(To=[],yo=An();yo!==n;)To.push(yo),yo=An();t.charCodeAt(Pe)===41?(yo=A,Pe++):(yo=n,Ee===0\u0026\u0026gt(x)),yo!==n?ht=j(Ao,vt,Zt,zn,Co,ro):(Pe=ht,ht=n)}else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function Yt(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt;if(ht=Pe,t.substr(Pe,9)===c?(Kt=c,Pe+=9):(Kt=n,Ee===0\u0026\u0026gt(E)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0\u0026\u0026gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=mt(),qe===n\u0026\u0026(qe=null),vt=[],qt=An();qt!==n;)vt.push(qt),qt=An();t.charCodeAt(Pe)===41?(qt=A,Pe++):(qt=n,Ee===0\u0026\u0026gt(x)),qt!==n?ht=J(Ao,qe):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function pn(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt;if(ht=Pe,t.substr(Pe,5)===l?(Kt=l,Pe+=5):(Kt=n,Ee===0\u0026\u0026gt(B)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0\u0026\u0026gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=mt(),qe===n\u0026\u0026(qe=null),vt=[],qt=An();qt!==n;)vt.push(qt),qt=An();t.charCodeAt(Pe)===41?(qt=A,Pe++):(qt=n,Ee===0\u0026\u0026gt(x)),qt!==n?ht=oe(Ao,qe):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function be(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt;if(ht=Pe,t.substr(Pe,6)===u?(Kt=u,Pe+=6):(Kt=n,Ee===0\u0026\u0026gt(S)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0\u0026\u0026gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=st(),qe===n\u0026\u0026(qe=null),vt=[],qt=An();qt!==n;)vt.push(qt),qt=An();t.charCodeAt(Pe)===41?(qt=A,Pe++):(qt=n,Ee===0\u0026\u0026gt(x)),qt!==n?ht=ie(Ao,qe):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function et(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt;if(ht=Pe,t.substr(Pe,5)===g?(Kt=g,Pe+=5):(Kt=n,Ee===0\u0026\u0026gt(Q)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0\u0026\u0026gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=[],vt=An();vt!==n;)qe.push(vt),vt=An();t.charCodeAt(Pe)===41?(vt=A,Pe++):(vt=n,Ee===0\u0026\u0026gt(x)),vt!==n?ht=ne(Ao):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function It(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt;if(ht=Pe,t.substr(Pe,5)===h?(Kt=h,Pe+=5):(Kt=n,Ee===0\u0026\u0026gt(w)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0\u0026\u0026gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=[],vt=An();vt!==n;)qe.push(vt),vt=An();t.charCodeAt(Pe)===41?(vt=A,Pe++):(vt=n,Ee===0\u0026\u0026gt(x)),vt!==n?ht=le(Ao):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function Bt(){let ht,Kt,rn,Lt;return ht=Pe,Kt=Pe,rn=Xt(),rn===n\u0026\u0026(rn=null),Lt=dt(),Lt!==n?(rn=[rn,Lt],Kt=rn):(Pe=Kt,Kt=n),Kt!==n\u0026\u0026(Kt=ge(Kt)),ht=Kt,ht===n\u0026\u0026(ht=Pe,Kt=Pe,rn=Xt(),rn===n\u0026\u0026(rn=null),Lt=Ze(),Lt!==n?(rn=[rn,Lt],Kt=rn):(Pe=Kt,Kt=n),Kt!==n\u0026\u0026(Kt=_e(Kt)),ht=Kt),ht}function mt(){let ht,Kt,rn;return ht=Pe,Kt=xt(),Kt!==n?(rn=Bt(),rn!==n?ht=rn:(Pe=ht,ht=n)):(Pe=ht,ht=n),ht}function st(){let ht,Kt,rn,Lt,Ho;return ht=Pe,Kt=xt(),Kt!==n?(rn=Bt(),rn!==n?(Lt=xt(),Lt!==n?(Ho=Bt(),Ho!==n?ht=fe(rn,Ho):(Pe=ht,ht=n)):(Pe=ht,ht=n)):(Pe=ht,ht=n)):(Pe=ht,ht=n),ht}function xt(){let ht,Kt,rn,Lt,Ho;if(ht=Pe,Kt=[],rn=An(),rn!==n)for(;rn!==n;)Kt.push(rn),rn=An();else Kt=n;if(Kt!==n){for(rn=Xe(),rn===n\u0026\u0026(rn=null),Lt=[],Ho=An();Ho!==n;)Lt.push(Ho),Ho=An();Kt=[Kt,rn,Lt],ht=Kt}else Pe=ht,ht=n;if(ht===n)if(ht=Pe,Kt=Xe(),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();Kt=[Kt,rn],ht=Kt}else Pe=ht,ht=n;return ht}function Xe(){let ht;return t.charCodeAt(Pe)===44?(ht=d,Pe++):(ht=n,Ee===0\u0026\u0026gt(M)),ht}function Ze(){let ht,Kt;return ht=Pe,Kt=Jt(),Kt!==n\u0026\u0026(Kt=pe(Kt)),ht=Kt,ht}function dt(){let ht,Kt,rn;return ht=Pe,Kt=Ut(),Kt!==n?(rn=Wt(),rn===n\u0026\u0026(rn=null),ht=ye(Kt,rn)):(Pe=ht,ht=n),ht===n\u0026\u0026(ht=Pe,Kt=Jt(),Kt!==n?(rn=Wt(),rn!==n?ht=Me(Kt,rn):(Pe=ht,ht=n)):(Pe=ht,ht=n)),ht}function Ut(){let ht,Kt,rn,Lt;return Ee++,ht=Pe,Kt=Jt(),Kt===n\u0026\u0026(Kt=null),t.charCodeAt(Pe)===46?(rn=p,Pe++):(rn=n,Ee===0\u0026\u0026gt(R)),rn!==n?(Lt=Jt(),Lt!==n?ht=ve(Kt,Lt):(Pe=ht,ht=n)):(Pe=ht,ht=n),ht===n\u0026\u0026(ht=Pe,Kt=Jt(),Kt!==n?(t.charCodeAt(Pe)===46?(rn=p,Pe++):(rn=n,Ee===0\u0026\u0026gt(R)),rn!==n?ht=he(Kt):(Pe=ht,ht=n)):(Pe=ht,ht=n)),Ee--,ht===n\u0026\u0026(Kt=n,Ee===0\u0026\u0026gt(k)),ht}function Wt(){let ht,Kt,rn,Lt;return ht=Pe,Kt=t.charAt(Pe),m.test(Kt)?Pe++:(Kt=n,Ee===0\u0026\u0026gt(F)),Kt!==n?(rn=Xt(),rn===n\u0026\u0026(rn=null),Lt=Jt(),Lt!==n?ht=Qe(rn,Lt):(Pe=ht,ht=n)):(Pe=ht,ht=n),ht}function Xt(){let ht;return ht=t.charAt(Pe),_.test(ht)?Pe++:(ht=n,Ee===0\u0026\u0026gt(O)),ht}function Jt(){let ht,Kt;if(ht=[],Kt=yn(),Kt!==n)for(;Kt!==n;)ht.push(Kt),Kt=yn();else ht=n;return ht}function yn(){let ht;return ht=t.charAt(Pe),f.test(ht)?Pe++:(ht=n,Ee===0\u0026\u0026gt(U)),ht}function An(){let ht;return ht=t.charAt(Pe),I.test(ht)?Pe++:(ht=n,Ee===0\u0026\u0026gt(Y)),ht}ke=r();const kn=ke!==n\u0026\u0026Pe===t.length;function $n(){throw ke!==n\u0026\u0026Pe\u003ct.length\u0026\u0026gt(tt()),bt(Re,Te\u003ct.length?Ce(Te):null,Te\u003ct.length?nt(Te,Te+1):nt(Te,Te))}if(e.peg$library)return{peg$result:ke,peg$currPos:Pe,peg$FAILED:n,peg$maxFailExpected:Re,peg$maxFailPos:Te,peg$success:kn,peg$throw:kn?void 0:$n};if(kn)return ke;$n()}function UQn(t){return YQn(t)}function wxe(t,e=!1,n=!1){e?n?t=Ad(t,dC(-1,-1)):t=Ad(t,dC(1,-1)):n\u0026\u0026(t=Ad(t,dC(-1,1)));const o=t.a,i=t.b,r=t.c,s=t.d;let a,A,c;if(o!==0||r!==0){const l=Math.hypot(o,r);a=l,A=(o*s-i*r)/l;const u=Math.acos(o/l);c=r\u003e0?-u:u}else if(i!==0||s!==0){const l=Math.hypot(i,s);a=(o*s-i*r)/l,A=l;const u=Math.acos(i/l);c=Math.PI/2+(s\u003e0?-u:u)}else a=0,A=0,c=0;return n\u0026\u0026(a=-a),e\u0026\u0026(A=-A),{translate:{tx:t.e,ty:t.f},scale:{sx:a,sy:A},rotation:{angle:c}}}function KQn(){return{a:1,c:0,e:0,b:0,d:-1,f:0}}function VQn(){return{a:-1,c:0,e:0,b:0,d:1,f:0}}function zQn(){return{a:-1,c:0,e:0,b:0,d:-1,f:0}}function vct(t,e){const n=e.x-t.x,o=e.y-t.y;return pA(n,o)}function JQn(t,e,n,o){const i=vct(t,n),r=Bn(i,e),s=n,a=o,A=Math.atan2(a.y-s.y,a.x-s.x)-Math.atan2(r.y-s.y,r.x-s.x),c=vQ(A,s.x,s.y),l=Math.sqrt(Math.pow(r.x-s.x,2)+Math.pow(r.y-s.y,2)),g=Math.sqrt(Math.pow(a.x-s.x,2)+Math.pow(a.y-s.y,2))/l,h=dC(g,g,s.x,s.y);return Ad([i,h,c])}const WQn=Object.freeze(Object.defineProperty({__proto__:null,applyToPoint:Bn,applyToPoints:PQn,compose:Ad,decomposeTSR:wxe,flipOrigin:zQn,flipX:KQn,flipY:VQn,fromDefinition:GQn,fromObject:xct,fromOneMovingPoint:vct,fromString:BV,fromStringLegacy:DQn,fromTransformAttribute:UQn,fromTriangles:OQn,fromTwoMovingPoints:JQn,identity:QQ,inverse:bV,isAffineMatrix:RQn,rotate:vQ,rotateDEG:F9,scale:dC,shear:Ect,skew:bct,skewDEG:vxe,smoothMatrix:Sct,toCSS:LQn,toSVG:HQn,toString:iD,transform:jk,translate:pA},Symbol.toStringTag,{value:\"Module\"}));var Pxe=(t,e={})=\u003e{let n=t._internal_store;if(!n){n={counts:{}},t._internal_store=n;for(const i of t){const r=i.type,s=i[`${r}_id`];if(!s)continue;const a=Number.parseInt(s.split(\"_\").pop());Number.isNaN(a)||(n.counts[r]=Math.max(n.counts[r]??0,a))}}return new Proxy({},{get:(i,r)=\u003er===\"toArray\"?()=\u003et:{get:s=\u003et.find(a=\u003ea.type===r\u0026\u0026a[`${r}_id`]===s),getUsing:s=\u003e{const a=Object.keys(s);if(a.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const A=a[0],c=A.replace(\"_id\",\"\"),l=t.find(u=\u003eu.type===c\u0026\u0026u[A]===s[A]);return l?t.find(u=\u003eu.type===r\u0026\u0026u[`${r}_id`]===l[`${r}_id`]):null},getWhere:s=\u003e{const a=Object.keys(s);return t.find(A=\u003eA.type===r\u0026\u0026a.every(c=\u003eA[c]===s[c]))},list:s=\u003e{const a=s?Object.keys(s):[];return t.filter(A=\u003eA.type===r\u0026\u0026a.every(c=\u003eA[c]===s[c]))},insert:s=\u003e{n.counts[r]??=-1,n.counts[r]++;const a=n.counts[r],A={type:r,[`${r}_id`]:`${r}_${a}`,...s};return e.validateInserts\u0026\u0026(R9[r]??U4).parse(A),t.push(A),A},delete:s=\u003e{const a=t.find(A=\u003eA[`${r}_id`]===s);a\u0026\u0026t.splice(t.indexOf(a),1)},update:(s,a)=\u003e{const A=t.find(c=\u003ec.type===r\u0026\u0026c[`${r}_id`]===s);if(A)return Object.assign(A,a),A},select:s=\u003e{if(r===\"source_component\")return t.find(a=\u003ea.type===\"source_component\"\u0026\u0026a.name===s.replace(/\\./g,\"\"));if(r===\"pcb_port\"||r===\"source_port\"||r===\"schematic_port\"){const[a,A]=s.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),c=t.find(u=\u003eu.type===\"source_component\"\u0026\u0026u.name===a);if(!c)return null;const l=t.find(u=\u003eu.type===\"source_port\"\u0026\u0026u.source_component_id===c.source_component_id\u0026\u0026(u.name===A||(u.port_hints??[]).includes(A)));if(!l)return null;if(r===\"source_port\")return l;if(r===\"pcb_port\")return t.find(u=\u003eu.type===\"pcb_port\"\u0026\u0026u.source_port_id===l.source_port_id);if(r===\"schematic_port\")return t.find(u=\u003eu.type===\"schematic_port\"\u0026\u0026u.source_port_id===l.source_port_id)}}}})};Pxe.unparsed=Pxe;var O3=Pxe,rD={exports:{}},jQn=rD.exports,wct;function $Qn(){if(wct)return rD.exports;wct=1;var t={env:{},version:\"\"};return(function(){var e,n,o,i,r,s;typeof performance\u003c\"u\"\u0026\u0026performance!==null\u0026\u0026performance.now?rD.exports=function(){return performance.now()}:typeof t\u003c\"u\"\u0026\u0026t!==null\u0026\u0026t.hrtime?(rD.exports=function(){return(e()-r)/1e6},n=t.hrtime,e=function(){var a;return a=n(),a[0]*1e9+a[1]},i=e(),s=t.uptime()*1e9,r=i-s):Date.now?(rD.exports=function(){return Date.now()-o},o=Date.now()):(rD.exports=function(){return new Date().getTime()-o},o=new Date().getTime())}).call(jQn),rD.exports}$Qn();function qQn([t,e],[n,o],{lineThickness:i=0}={}){return i===0?Pct(t,e,n,o):XQn(t,e,n,o)\u003c=i}function Pct(t,e,n,o){const i=Wne(t,e,n),r=Wne(t,e,o),s=Wne(n,o,t),a=Wne(n,o,e);return!!(i!==r\u0026\u0026s!==a||i===0\u0026\u0026jne(t,n,e)||r===0\u0026\u0026jne(t,o,e)||s===0\u0026\u0026jne(n,t,o)||a===0\u0026\u0026jne(n,e,o))}function Wne(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o\u003e0?1:2}function jne(t,e,n){return e.x\u003c=Math.max(t.x,n.x)\u0026\u0026e.x\u003e=Math.min(t.x,n.x)\u0026\u0026e.y\u003c=Math.max(t.y,n.y)\u0026\u0026e.y\u003e=Math.min(t.y,n.y)}function XQn(t,e,n,o){if(t.x===e.x\u0026\u0026t.y===e.y)return $k(t,n,o);if(n.x===o.x\u0026\u0026n.y===o.y)return $k(n,t,e);if(Pct(t,e,n,o))return 0;const i=[$k(t,n,o),$k(e,n,o),$k(n,t,e),$k(o,t,e)];return Math.min(...i)}function $k(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return Mct(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;i=Math.max(0,Math.min(1,i));const r={x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)};return Mct(t,r)}function Mct(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function $ne(t){const e=new Map;let n=0;function o(i){for(const[,s]of e)if(s.has(i))return s;const r=new Set;return e.set(`connectivity_net${n++}`,r),r}for(const i of t){let r=null;for(const s of i){if(!r)r=o(s);else if(!r.has(s)){const a=o(s);if(a!==r){for(const A of a)r.add(A);e.delete(Array.from(e.entries()).find(([,A])=\u003eA===a)[0])}}r.add(s)}}return Object.fromEntries(Array.from(e.entries()).map(([i,r])=\u003e[i,Array.from(r)]))}var wQ=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s\u0026\u0026o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){this.netMap[i].push(...this.netMap[r]),this.netMap[r]=this.netMap[i];for(const s of this.netMap[i])this.idToNetMap[s]=i}}for(const r of n)this.netMap[i].includes(r)||this.netMap[i].push(r),this.idToNetMap[r]=i}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return i?o===i||i===e||i===e:!1}areAllIdsConnected(e){const n=this.getNetConnectedToId(e[0]);for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}},Mxe=t=\u003e{const e=[];for(const o of t)if(o.type===\"source_trace\")e.push([...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]]);else if(o.type===\"source_component\"\u0026\u0026o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=$ne(e);return new wQ(n)},Vf=t=\u003e{const e=[];for(const o of t)if(o.type===\"source_trace\")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type===\"pcb_port\"){const{pcb_port_id:i,source_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([r,i])}else if(o.type===\"pcb_smtpad\"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_plated_hole\"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_trace\"){const{pcb_trace_id:i,source_trace_id:r}=o,s=Array.isArray(o.route)?o.route.filter(a=\u003ea\u0026\u0026a.route_type===\"wire\"):[];if(r\u0026\u0026i\u0026\u0026e.push([i,r]),Array.isArray(s)){const a=s.find(c=\u003ec\u0026\u0026c.start_pcb_port_id)?.start_pcb_port_id,A=s.find(c=\u003ec\u0026\u0026c.end_pcb_port_id)?.end_pcb_port_id;a\u0026\u0026i\u0026\u0026A\u0026\u0026e.push([a,i,A])}}else if(o.type===\"pcb_via\"){const{pcb_via_id:i,pcb_trace_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"source_component\"\u0026\u0026o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=$ne(e);return new wQ(n)},qne=class{circuitJson;traceIdToElm;portIdToElm;connMap;constructor(t){this.circuitJson=t||[],this.traceIdToElm=new Map,this.portIdToElm=new Map,t?(this._buildTraceMap(),this._buildPortMap(),this.connMap=this._buildTraceConnectivityMap()):this.connMap=new wQ({})}_buildPortMap(){for(const t of this.circuitJson)t.type===\"pcb_port\"\u0026\u0026this.portIdToElm.set(t.pcb_port_id,t)}_buildTraceMap(){for(const t of this.circuitJson)t.type===\"pcb_trace\"\u0026\u0026this.traceIdToElm.set(t.pcb_trace_id,t)}_buildTraceConnectivityMap(){const t=[],e=Array.from(this.traceIdToElm.keys());for(let n=0;n\u003ce.length;n++)for(let o=n+1;o\u003ce.length;o++){const i=this.traceIdToElm.get(e[n]),r=this.traceIdToElm.get(e[o]);this._arePcbTracesConnected(i,r)\u0026\u0026t.push([e[n],e[o]])}for(const n of this.portIdToElm.values())for(const o of this.traceIdToElm.values())for(const i of o.route)i.route_type===\"wire\"\u0026\u0026(i.start_pcb_port_id===n.pcb_port_id?t.push([n.pcb_port_id,o.pcb_trace_id]):i.end_pcb_port_id===n.pcb_port_id\u0026\u0026t.push([o.pcb_trace_id,n.pcb_port_id]));return new wQ($ne(t))}addTrace(t){this.traceIdToElm.set(t.pcb_trace_id,t);const e=[];for(const n of t.route)n.route_type===\"wire\"\u0026\u0026(n.start_pcb_port_id\u0026\u0026e.push([n.start_pcb_port_id,t.pcb_trace_id]),n.end_pcb_port_id\u0026\u0026e.push([n.end_pcb_port_id,t.pcb_trace_id]));this.connMap.addConnections(e)}_arePcbTracesConnected(t,e){for(let n=0;n\u003ct.route.length-1;n++){const o=t.route[n],i=t.route[n+1];if(o.route_type===\"wire\"\u0026\u0026i.route_type===\"wire\")for(let r=0;r\u003ce.route.length-1;r++){const s=e.route[r],a=e.route[r+1];if(s.route_type!==\"wire\"||a.route_type!==\"wire\")continue;if(qQn([o,i],[s,a],{lineThickness:(o.width+s.width)/2}))return!0}}return!1}areTracesConnected(t,e){return this.connMap.areIdsConnected(t,e)}getAllTracesConnectedToTrace(t){const e=this.connMap.getNetConnectedToId(t);return e?this.connMap.getIdsConnectedToNet(e).filter(n=\u003ethis.traceIdToElm.has(n)).map(n=\u003ethis.traceIdToElm.get(n)):[]}getAllTracesConnectedToPort(t){const e=this.connMap.getNetConnectedToId(t);return e?this.connMap.getIdsConnectedToNet(e).filter(n=\u003ethis.traceIdToElm.has(n)).map(n=\u003ethis.traceIdToElm.get(n)):[]}};let ZQn=(t=21)=\u003ecrypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=\u003e(n\u0026=63,n\u003c36?e+=n.toString(36):n\u003c62?e+=(n-26).toString(36).toUpperCase():n\u003e62?e+=\"-\":e+=\"_\",e),\"\");var sD=(t,e)=\u003eMath.abs(t.x-e.x)+Math.abs(t.y-e.y),Dct=(t,e)=\u003e{const n=e.x-t.x,o=e.y-t.y;return Math.abs(n)\u003eMath.abs(o)?{dx:Math.sign(n),dy:0}:{dx:0,dy:Math.sign(o)}},Nct=(t,e,n)=\u003eMath.abs(t.x-e.x)*Math.abs(n.dx)+Math.abs(t.y-e.y)*Math.abs(n.dy),Rct=(t,e=.1)=\u003e`${Math.round(t.x/e)},${Math.round(t.y/e)}`,Tct=(t,e)=\u003eMath.abs(t-e)\u003c1e-4,kct=(t,e,{viaDiameter:n=.5}={})=\u003e{const o=[];for(let i=0;i\u003ct.length-1;i++){const[r,s]=[t[i],t[i+1]],a=i-1\u003e=0?t[i-1]:null,A=Tct(r.y,s.y),c=Tct(r.x,s.x);if(!A\u0026\u0026!c)throw new Error(`getObstaclesFromTrace currently only supports horizontal and vertical traces (not diagonals) Conflicting trace: ${e}, start: (${r.x}, ${r.y}), end: (${s.x}, ${s.y})`);const l={type:\"rect\",layers:[r.layer],center:{x:(r.x+s.x)/2,y:(r.y+s.y)/2},width:A?Math.abs(r.x-s.x):.1,height:c?Math.abs(r.y-s.y):.1,connectedTo:[e]};if(o.push(l),a\u0026\u0026a.layer===r.layer\u0026\u0026r.layer!==s.layer){const u={type:\"rect\",layers:[r.layer,s.layer],center:{x:r.x,y:r.y},connectedTo:[e],width:n,height:n};o.push(u)}}return o},Fct=class{obstacles;GRID_STEP=.1;constructor(t){this.obstacles=t.map(e=\u003e({...e,left:e.center.x-e.width/2,right:e.center.x+e.width/2,top:e.center.y+e.height/2,bottom:e.center.y-e.height/2}))}getObstacleAt(t,e,n){n??=this.GRID_STEP;for(const o of this.obstacles){const i=o.width/2+n,r=o.height/2+n;if(t\u003e=o.center.x-i\u0026\u0026t\u003c=o.center.x+i\u0026\u0026e\u003e=o.center.y-r\u0026\u0026e\u003c=o.center.y+r)return o}return null}isObstacleAt(t,e,n){return this.getObstacleAt(t,e,n)!==null}getDirectionDistancesToNearestObstacle(t,e){const{GRID_STEP:n}=this,o={left:1/0,top:1/0,bottom:1/0,right:1/0};for(const i of this.obstacles)if(i.type===\"rect\"){const r=i.center.x-i.width/2-n,s=i.center.x+i.width/2+n,a=i.center.y+i.height/2+n,A=i.center.y-i.height/2-n;e\u003e=A\u0026\u0026e\u003c=a\u0026\u0026t\u003er\u0026\u0026(o.left=Math.min(o.left,t-s)),e\u003e=A\u0026\u0026e\u003c=a\u0026\u0026t\u003cs\u0026\u0026(o.right=Math.min(o.right,r-t)),t\u003e=r\u0026\u0026t\u003c=s\u0026\u0026e\u003ca\u0026\u0026(o.top=Math.min(o.top,A-e)),t\u003e=r\u0026\u0026t\u003c=s\u0026\u0026e\u003eA\u0026\u0026(o.bottom=Math.min(o.bottom,e-a))}return o}getOrthoDirectionCollisionInfo(t,e,{margin:n=0}={}){const{x:o,y:i}=t,{dx:r,dy:s}=e;let a=1/0,A=null;for(const c of this.obstacles){const l=c.left-n,u=c.right+n,g=c.top+n,h=c.bottom-n;let d=null;r===1\u0026\u0026s===0?i\u003eh\u0026\u0026i\u003cg\u0026\u0026o\u003cc.left\u0026\u0026(d=c.left-o):r===-1\u0026\u0026s===0?i\u003eh\u0026\u0026i\u003cg\u0026\u0026o\u003ec.right\u0026\u0026(d=o-c.right):r===0\u0026\u0026s===1?o\u003el\u0026\u0026o\u003cu\u0026\u0026i\u003cc.bottom\u0026\u0026(d=c.bottom-i):r===0\u0026\u0026s===-1\u0026\u0026o\u003el\u0026\u0026o\u003cu\u0026\u0026i\u003ec.top\u0026\u0026(d=i-c.top),d!==null\u0026\u0026d\u003ca\u0026\u0026(a=d,A=c)}return{dx:r,dy:s,wallDistance:a,obstacle:A}}getObstaclesOverlappingRegion(t){const e=[];for(const n of this.obstacles){const{left:o,right:i,top:r,bottom:s}=n;o\u003c=t.maxX\u0026\u0026i\u003e=t.minX\u0026\u0026r\u003c=t.maxY\u0026\u0026s\u003e=t.minY\u0026\u0026e.push(n)}return e}};function evn(t){if(t.length\u003c4)return t;const e=[{...t[0]}];let n=t[0].layer;for(let o=1;o\u003ct.length;o++){const i={start:t[o-1],end:t[o]},r=t[o].route_type===\"via\"||t[o-1].route_type===\"via\";if(t[o].layer!==n||r){e.push({...t[o]}),n=t[o].layer;continue}let s=!1,a=null,A=-1;for(let l=0;l\u003ce.length-1;l++){const u={start:e[l],end:e[l+1]};if(u.start.layer===i.start.layer\u0026\u0026u.start.layer===i.start.layer){const g=tvn(u,i);if(g){s=!0,a={...g,layer:n},A=l;break}}}s\u0026\u0026a\u0026\u0026(e.splice(A+1),e.push(a));const c=e[e.length-1];(c.x!==t[o].x||c.y!==t[o].y)\u0026\u0026e.push(t[o])}return e}function tvn(t,e){if(t.start.x===t.end.x\u0026\u0026e.start.x===e.end.x||t.start.y===t.end.y\u0026\u0026e.start.y===e.end.y)return null;let n;if(t.start.x===t.end.x){const o=t.start.x,i=e.start.y;n={...t.start,x:o,y:i}}else{const o=e.start.x,i=t.start.y;n={...t.start,x:o,y:i}}return Lct(n,t)\u0026\u0026Lct(n,e)?n:null}function Lct(t,e){return t.x\u003e=Math.min(e.start.x,e.end.x)\u0026\u0026t.x\u003c=Math.max(e.start.x,e.end.x)\u0026\u0026t.y\u003e=Math.min(e.start.y,e.end.y)\u0026\u0026t.y\u003c=Math.max(e.start.y,e.end.y)}function nvn(t){const e=[t[0]];for(let n=1;n\u003ct.length-1;n++){const[o,i,r]=[t[n-1],t[n],t[n+1]];e.push(i),!(i.route_type!==\"wire\"||o.route_type!==\"wire\"||r.route_type!==\"wire\")\u0026\u0026o.layer===i.layer\u0026\u0026i.layer!==r.layer\u0026\u0026e.push({route_type:\"via\",from_layer:i.layer,to_layer:r.layer,x:i.x,y:i.y})}return e.push(t[t.length-1]),e}vc(\"autorouter:shortenPathWithShortcuts\");function ovn(t,e){if(t.length\u003c=2)return t;const n=[t[0]];for(let o=1;o\u003ct.length;o++){const i={start:n[n.length-1],end:t[o]};let r=-1;const s=i.start.x===i.end.x,a=i.start.y===i.end.y;for(let A=o+1;A\u003ct.length;A++){if(A\u003c=r)continue;const c={start:t[A],end:t[A+1]};if(!c.end)continue;const l=c.start.x===c.end.x,u=c.start.y===c.end.y,g=s\u0026\u0026l,h=a\u0026\u0026u;if(h\u0026\u0026g||!(g||h))continue;let p=!1;const m=Math.min(i.start.x,i.end.x),_=Math.max(i.start.x,i.end.x),f=Math.min(c.start.x,c.end.x),I=Math.max(c.start.x,c.end.x),C=Math.min(i.start.y,i.end.y),y=Math.max(i.start.y,i.end.y),x=Math.min(c.start.y,c.end.y),E=Math.max(c.start.y,c.end.y);if(h?p=m\u003c=I\u0026\u0026_\u003e=f:g\u0026\u0026(p=C\u003c=E\u0026\u0026y\u003e=x),!p)continue;const B=[],S=n[n.length-1],Q=t[A+2];if(!Q)continue;h\u0026\u0026f\u003c_\u0026\u0026Q.x===f\u0026\u0026B.push({x:f,y:i.start.y,layer:i.start.layer}),h\u0026\u0026I\u003em\u0026\u0026Q.x===I\u0026\u0026B.push({x:I,y:i.start.y,layer:i.start.layer}),g\u0026\u0026x\u003cy\u0026\u0026Q.y===x\u0026\u0026B.push({x:i.start.x,y:x,layer:i.start.layer}),g\u0026\u0026E\u003eC\u0026\u0026Q.y===E\u0026\u0026B.push({x:i.start.x,y:E,layer:i.start.layer});let w=null;for(const M of B)if(!(e(S,M)||e(Q,M))){w=M;break}if(w){n.push(w),o=A+1,r=A+1;break}}r===-1\u0026\u0026n.push(t[o])}return n[n.length-1]!==t[t.length-1]\u0026\u0026n.push(t[t.length-1]),n}var aD=vc(\"autorouting-dataset:astar\"),Hct=class{openSet=[];closedSet=new Set;debug=!1;debugSolutions;debugMessage=null;debugTraceCount=0;input;obstacles;allObstacles;startNode;goalPoint;GRID_STEP;OBSTACLE_MARGIN;MAX_ITERATIONS;isRemovePathLoopsEnabled;isShortenPathWithShortcutsEnabled;GREEDY_MULTIPLIER=1.1;iterations=-1;constructor(t){this.input=t.input,this.allObstacles=t.input.obstacles,this.startNode=t.startNode,this.goalPoint=t.goalPoint?{l:0,...t.goalPoint}:void 0,this.GRID_STEP=t.GRID_STEP??.1,this.OBSTACLE_MARGIN=t.OBSTACLE_MARGIN??.15,this.MAX_ITERATIONS=t.MAX_ITERATIONS??100,this.debug=t.debug??aD.enabled,this.isRemovePathLoopsEnabled=t.isRemovePathLoopsEnabled??!1,this.isShortenPathWithShortcutsEnabled=t.isShortenPathWithShortcutsEnabled??!1,this.debug\u0026\u0026(aD.enabled=!0),aD.enabled\u0026\u0026(this.debugSolutions={},this.debugMessage=\"\")}getNeighbors(t){return[]}isSameNode(t,e){return sD(t,e)\u003cthis.GRID_STEP}computeG(t,e){return t.g+sD(t,e)}computeH(t){return sD(t,this.goalPoint)}getNodeName(t){return Rct(t,this.GRID_STEP)}solveOneStep(){this.iterations+=1;const{openSet:t,closedSet:e,GRID_STEP:n,goalPoint:o}=this;t.sort((a,A)=\u003ea.f-A.f);const i=t.shift();if(this.computeH(i)\u003c=n*2)return{solved:!0,current:i,newNeighbors:[]};this.closedSet.add(this.getNodeName(i));let s=[];for(const a of this.getNeighbors(i)){if(e.has(this.getNodeName(a)))continue;const A=this.computeG(i,a),c=this.openSet.find(l=\u003ethis.isSameNode(l,a));if(!c||A\u003cc.g){const l=this.computeH(a),u=A+l*this.GREEDY_MULTIPLIER,g={...a,g:A,h:l,f:u,obstacleHit:a.obstacleHit??void 0,manDistFromParent:sD(i,a),nodesInPath:i.nodesInPath+1,parent:i,enterMarginCost:a.enterMarginCost,travelMarginCostFactor:a.travelMarginCostFactor};t.push(g),s.push(g)}}return aD.enabled\u0026\u0026(t.sort((a,A)=\u003ea.f-A.f),this.drawDebugSolution({current:i,newNeighbors:s})),{solved:!1,current:i,newNeighbors:s}}getStartNode(t){return{x:t.pointsToConnect[0].x,y:t.pointsToConnect[0].y,manDistFromParent:0,f:0,g:0,h:0,nodesInPath:0,parent:null}}layerToIndex(t){return 0}indexToLayer(t){return\"top\"}preprocessConnectionBeforeSolving(t){return t}solveConnection(t){if(t.pointsToConnect.length\u003e2)throw new Error(\"GeneralizedAstarAutorouter doesn't currently support 2+ points in a connection\");t=this.preprocessConnectionBeforeSolving(t);const{pointsToConnect:e}=t;for(this.iterations=0,this.closedSet=new Set,this.startNode=this.getStartNode(t),this.goalPoint={...e[e.length-1],l:this.layerToIndex(e[e.length-1].layer)},this.openSet=[this.startNode];this.iterations\u003cthis.MAX_ITERATIONS;){const{solved:n,current:o}=this.solveOneStep();if(n){let i=[],r=o;for(;r;){const s=r.l;i.unshift({x:r.x,y:r.y,layer:s!==void 0?this.indexToLayer(s):e[0].layer}),r=r.parent}return aD.enabled\u0026\u0026(this.debugMessage+=`t${this.debugTraceCount}: ${this.iterations} iterations\n`),this.isRemovePathLoopsEnabled\u0026\u0026(i=evn(i)),this.isShortenPathWithShortcutsEnabled\u0026\u0026(i=ovn(i,(s,a)=\u003e{if(s.x===a.x\u0026\u0026s.y===a.y)return!1;const A=this.obstacles.getOrthoDirectionCollisionInfo({x:s.x,y:s.y,l:this.layerToIndex(s.layer)??0},{dx:Math.sign(a.x-s.x),dy:Math.sign(a.y-s.y),dl:0},{margin:.05}),c=Math.sqrt((s.x-a.x)**2+(s.y-a.y)**2);return A.wallDistance\u003cc})),{solved:!0,route:i,connectionName:t.name}}if(this.openSet.length===0)break}return aD.enabled\u0026\u0026(this.debugMessage+=`t${this.debugTraceCount}: ${this.iterations} iterations (failed)\n`),{solved:!1,connectionName:t.name}}createObstacleList({dominantLayer:t,connection:e,obstaclesFromTraces:n}){return new Fct(this.allObstacles.filter(o=\u003e!o.connectedTo.includes(e.name)).filter(o=\u003eo.layers.includes(t)).concat(n??[]))}postprocessConnectionSolveResult(t,e){return e}solve(){const t=[],e=[];this.debugTraceCount=0;for(const n of this.input.connections){const o=n.pointsToConnect[0].layer??\"top\";this.debugTraceCount+=1,this.obstacles=this.createObstacleList({dominantLayer:o,connection:n,obstaclesFromTraces:e});let i=this.solveConnection(n);i=this.postprocessConnectionSolveResult(n,i),t.push(i),aD.enabled\u0026\u0026this.drawDebugTraceObstacles(e),i.solved\u0026\u0026e.push(...kct(i.route.map(r=\u003e({x:r.x,y:r.y,layer:r.layer??o})),n.name))}return t}solveAndMapToTraces(){return this.solve().flatMap(e=\u003ee.solved?[{type:\"pcb_trace\",pcb_trace_id:`pcb_trace_for_${e.connectionName}`,route:nvn(e.route.map(n=\u003e({route_type:\"wire\",x:n.x,y:n.y,width:this.input.minTraceWidth,layer:n.layer})))}]:[])}getDebugGroup(){const t=`t${this.debugTraceCount}_iter[${this.iterations-1}]`;return this.iterations\u003c30||this.iterations\u003c100\u0026\u0026this.iterations%10===0||this.iterations\u003c1e3\u0026\u0026this.iterations%100===0||!this.debugSolutions?t:null}drawDebugTraceObstacles(t){const{debugTraceCount:e,debugSolutions:n}=this;for(const o in n)o.startsWith(`t${e}_`)\u0026\u0026n[o].push(...t.map((i,r)=\u003e({type:\"pcb_smtpad\",pcb_component_id:\"\",layer:i.layers[0],width:i.width,shape:\"rect\",x:i.center.x,y:i.center.y,pcb_smtpad_id:`trace_obstacle_${r}`,height:i.height})))}drawDebugSolution({current:t,newNeighbors:e}){const n=this.getDebugGroup();if(!n)return;const{openSet:o,debugTraceCount:i,debugSolutions:r}=this;r[n]??=[];const s=r[n];s.push({type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:`debug_note_${t.x}_${t.y}`,font:\"tscircuit2024\",font_size:.25,text:\"X\"+(t.l!==void 0?t.l:\"\"),pcb_component_id:\"\",layer:\"top\",anchor_position:{x:t.x,y:t.y},anchor_alignment:\"center\"});for(let a=0;a\u003co.length;a++){const A=o[a];s.push({type:\"pcb_fabrication_note_path\",pcb_component_id:\"\",pcb_fabrication_note_path_id:`note_path_${A.x}_${A.y}`,layer:\"top\",route:[[0,.05],[.05,0],[0,-.05],[-.05,0],[0,.05]].map(([c,l])=\u003e({x:A.x+c,y:A.y+l})),stroke_width:.01}),s.push({type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:`debug_note_${A.x}_${A.y}`,font:\"tscircuit2024\",font_size:.03,text:a.toString(),pcb_component_id:\"\",layer:\"top\",anchor_position:{x:A.x,y:A.y},anchor_alignment:\"center\"})}if(t.parent){const a=[];let A=t;for(;A;)a.unshift(A),A=A.parent;s.push({type:\"pcb_fabrication_note_path\",pcb_component_id:\"\",pcb_fabrication_note_path_id:`note_path_${t.x}_${t.y}`,layer:\"top\",route:a,stroke_width:.01})}}},ivn=vc(\"autorouting-dataset:infinite-grid-ijump-astar:get-distance-to-overcome-obstacle\");function Dxe({node:t,travelDir:e,wallDir:n,obstacle:o,obstacles:i,obstaclesInRow:r=0,OBSTACLE_MARGIN:s=.15,SHOULD_DETECT_CONJOINED_OBSTACLES:a=!1,MAX_CONJOINED_OBSTACLES:A=20}){let c;if(e.dx===0?e.dy\u003e0?c=o.center.y+o.height/2-t.y:c=t.y-(o.center.y-o.height/2):e.dx\u003e0?c=o.center.x+o.width/2-t.x:c=t.x-(o.center.x-o.width/2),c+=s,a\u0026\u0026r\u003cA){const l=i.getObstacleAt(t.x+e.dx*c+n.dx*(n.wallDistance+.001),t.y+e.dy*c+n.dy*(n.wallDistance+.001));if(l===o)return c;if(l\u0026\u0026l.type===\"rect\"){const u=e.dy===0,g=u?o.height:o.width;if((u?l.height:l.width)\u003eg)return ivn(\"next obstacle on path is bigger, not trying to overcome it\"),c;const d=Dxe({node:{x:t.x+e.dx*c,y:t.y+e.dy*c},travelDir:e,wallDir:n,obstacle:l,obstacles:i,obstaclesInRow:r+1,SHOULD_DETECT_CONJOINED_OBSTACLES:a,MAX_CONJOINED_OBSTACLES:A,OBSTACLE_MARGIN:s});c+=d}}return c}var rvn=class extends Hct{MAX_ITERATIONS=200;getNeighbors(t){const e=this.obstacles,n=this.goalPoint;let o;t.parent?o=Dct(t.parent,t):o=Dct(t,n);const i=[{dx:0,dy:1},{dx:1,dy:0},{dx:0,dy:-1},{dx:-1,dy:0}].filter(s=\u003es.dx===o.dx*-1\u0026\u0026s.dy===o.dy*-1?!1:!(s.dx===o.dx\u0026\u0026s.dy===o.dy\u0026\u0026t.parent?.obstacleHit)).map(s=\u003ee.getOrthoDirectionCollisionInfo(t,s,{margin:this.OBSTACLE_MARGIN})).filter(s=\u003es.wallDistance\u003e=this.OBSTACLE_MARGIN),r=[];for(const s of i){let a=null;t?.obstacleHit\u0026\u0026(a=Dxe({node:t,travelDir:s,wallDir:{...o,wallDistance:this.OBSTACLE_MARGIN},obstacle:t.obstacleHit,obstacles:e,OBSTACLE_MARGIN:this.OBSTACLE_MARGIN,SHOULD_DETECT_CONJOINED_OBSTACLES:!0}));const A=Nct(t,n,s),c=(s.dx===0||Math.sign(n.x-t.x)===s.dx)\u0026\u0026(s.dy===0||Math.sign(n.y-t.y)===s.dy);A\u003cs.wallDistance\u0026\u0026A\u003e0\u0026\u0026c?r.push({...s,travelDistance:A}):a!==null\u0026\u0026a\u003cs.wallDistance?r.push({...s,travelDistance:a}):s.wallDistance!==1/0\u0026\u0026r.push({...s,travelDistance:s.wallDistance-this.OBSTACLE_MARGIN})}return r.filter(s=\u003e!e.isObstacleAt(t.x+s.dx*s.travelDistance,t.y+s.dy*s.travelDistance)).map(s=\u003e({x:t.x+s.dx*s.travelDistance,y:t.y+s.dy*s.travelDistance,obstacleHit:s.obstacle}))}};function svn(t,e=4){const{center:n,width:o,height:i,rotation:r}=t,s=[],a=r*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=(r%360+360)%360;if(i\u003c=o?l\u003e=45\u0026\u0026l\u003c135||l\u003e=225\u0026\u0026l\u003c315:l\u003e=135\u0026\u0026l\u003c225||l\u003e=315||l\u003c45){const g=o/e;for(let h=0;h\u003ce;h++){const d=(h-e/2+.5)*g,p=-d*A,m=-d*c,_=g*1.1,f=Math.abs(i*A)+Math.abs(g*c);s.push({center:{x:n.x+p,y:n.y+m},width:_,height:f})}}else{const g=i/e;for(let h=0;h\u003ce;h++){const d=(h-e/2+.5)*g,p=-d*c,m=d*A,_=Math.abs(o*A)+Math.abs(g*c),f=g*1.1;s.push({center:{x:n.x+p,y:n.y+m},width:_,height:f})}}return s}var Xne=[\"top\",\"inner1\",\"inner2\",\"bottom\"],Oct=(t,e)=\u003e{const n=i=\u003ee?i.concat(i.map(r=\u003ee?.getNetConnectedToId(r)).filter(Boolean)):i,o=[];for(const i of t)if(i.type===\"pcb_smtpad\"){if(i.shape===\"circle\")o.push({type:\"oval\",layers:[i.layer],center:{x:i.x,y:i.y},width:i.radius*2,height:i.radius*2,connectedTo:n([i.pcb_smtpad_id])});else if(i.shape===\"rect\")o.push({type:\"rect\",layers:[i.layer],center:{x:i.x,y:i.y},width:i.width,height:i.height,connectedTo:n([i.pcb_smtpad_id])});else if(i.shape===\"rotated_rect\"){const r={center:{x:i.x,y:i.y},width:i.width,height:i.height,rotation:i.ccw_rotation},s=svn(r);for(const a of s)o.push({type:\"rect\",layers:[i.layer],center:a.center,width:a.width,height:a.height,connectedTo:n([i.pcb_smtpad_id])})}}else if(i.type===\"pcb_keepout\")i.shape===\"circle\"?o.push({type:\"oval\",layers:i.layers,center:{x:i.center.x,y:i.center.y},width:i.radius*2,height:i.radius*2,connectedTo:[]}):i.shape===\"rect\"\u0026\u0026o.push({type:\"rect\",layers:i.layers,center:{x:i.center.x,y:i.center.y},width:i.width,height:i.height,connectedTo:[]});else if(i.type===\"pcb_hole\")i.hole_shape===\"oval\"?o.push({type:\"oval\",center:{x:i.x,y:i.y},width:i.hole_width,height:i.hole_height,connectedTo:[]}):i.hole_shape===\"square\"?o.push({type:\"rect\",layers:Xne,center:{x:i.x,y:i.y},width:i.hole_diameter,height:i.hole_diameter,connectedTo:[]}):(i.hole_shape===\"round\"||i.hole_shape===\"circle\")\u0026\u0026o.push({type:\"rect\",layers:Xne,center:{x:i.x,y:i.y},width:i.hole_diameter,height:i.hole_diameter,connectedTo:[]});else if(i.type===\"pcb_plated_hole\")i.shape===\"circle\"?o.push({type:\"oval\",layers:Xne,center:{x:i.x,y:i.y},width:i.outer_diameter,height:i.outer_diameter,connectedTo:n([i.pcb_plated_hole_id])}):(i.shape===\"oval\"||i.shape===\"pill\")\u0026\u0026o.push({type:\"oval\",layers:Xne,center:{x:i.x,y:i.y},width:i.outer_width,height:i.outer_height,connectedTo:n([i.pcb_plated_hole_id])});else if(i.type===\"pcb_trace\"){const r=kct(i.route.map(s=\u003e({x:s.x,y:s.y,layer:\"layer\"in s?s.layer:s.from_layer})),i.source_trace_id);o.push(...r)}else i.type===\"pcb_via\"\u0026\u0026o.push({type:\"rect\",layers:i.layers,center:{x:i.x,y:i.y},connectedTo:[],width:i.outer_diameter,height:i.outer_diameter});return o};function Gct(t){const{pcbConnMap:e,goalElementId:n}=t;if(!n.startsWith(\"pcb_port_\"))throw new Error(`Currently alternative goal boxes must have a goal id with prefix \"pcb_port_\" (got ${n})`);const o=e.getAllTracesConnectedToPort(n);return Oct(o).map(i=\u003e({...i,connectedTo:[n]}))}var Yct=t=\u003e{let{connection:e,pcbConnMap:n}=t;if(e.pointsToConnect.length!==2)throw new Error(`Connection must have exactly 2 points for alternative goal boxes (got ${e.pointsToConnect.length})`);const[o,i]=e.pointsToConnect;if(!o.pcb_port_id||!i.pcb_port_id)throw new Error(`Connection points must have pcb_port_id for alternative goal box calculation (got ${o.pcb_port_id} and ${i.pcb_port_id})`);const r=Gct({goalElementId:o.pcb_port_id,pcbConnMap:n}).concat([{center:o,width:.01,height:.01,connectedTo:[o.pcb_port_id],layers:[o.layer],type:\"rect\"}]),s=Gct({goalElementId:i.pcb_port_id,pcbConnMap:n}).concat([{center:i,width:.01,height:.01,connectedTo:[i.pcb_port_id],layers:[i.layer],type:\"rect\"}]);if(r.length\u003c=1\u0026\u0026s.length\u003c=1)return{...e,startPoint:o,endPoint:i,goalBoxes:[]};const a=CQn(r,s);let A,c,l;return r.length\u003e=s.length?(A={...i,...a.pointB},c={...o,...a.pointA},l=r):(A={...o,...a.pointA},c={...i,...a.pointB},l=s),{startPoint:A,endPoint:c,goalBoxes:l,name:e.name,pointsToConnect:[A,c]}},avn=(t,e={})=\u003e{const n={minTraceWidth:.1};n.layerCount=e.layerCount??1,n.obstacles=Oct(t,e.connMap),n.connections=[];for(const i of t)if(i.type===\"source_trace\"){if(t.some(a=\u003ea.type===\"pcb_trace\"\u0026\u0026a.source_trace_id===i.source_trace_id))continue;let s={name:i.source_trace_id,pointsToConnect:i.connected_source_port_ids.map(a=\u003e{const A=O3(t).pcb_port.getWhere({source_port_id:a});if(!A)throw new Error(`Could not find pcb_port for source_port_id \"${a}\"`);return{x:A.x,y:A.y,layer:A.layers?.[0]??\"top\",pcb_port_id:A.pcb_port_id}})};if(e.optimizeWithGoalBoxes){const a=new qne(t);s=Yct({connection:s,pcbConnMap:a})}n.connections.push(s),Avn(n.obstacles,s.pointsToConnect,s.name)}const o={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(const i of n.obstacles)o.minX=Math.min(o.minX,i.center.x-i.width/2),o.maxX=Math.max(o.maxX,i.center.x+i.width/2),o.minY=Math.min(o.minY,i.center.y-i.height/2),o.maxY=Math.max(o.maxY,i.center.y+i.height/2);for(const i of n.connections)for(const r of i.pointsToConnect)o.minX=Math.min(o.minX,r.x),o.maxX=Math.max(o.maxX,r.x),o.minY=Math.min(o.minY,r.y),o.maxY=Math.max(o.maxY,r.y);return n.bounds=o,n},Avn=(t,e,n)=\u003e{for(const o of e)for(const i of t)cvn(o,i)\u0026\u0026i.connectedTo.push(n)};function cvn(t,e){const n=e.width/2,o=e.height/2;if(e.type===\"rect\")return t.x\u003e=e.center.x-n\u0026\u0026t.x\u003c=e.center.x+n\u0026\u0026t.y\u003e=e.center.y-o\u0026\u0026t.y\u003c=e.center.y+o;if(e.type===\"oval\"){const i=(t.x-e.center.x)/n,r=(t.y-e.center.y)/o;return i*i+r*r\u003c=1}return!1}function Uct(t,e){const n=e.x\u003et.x?1:e.x\u003ct.x?-1:0,o=e.y\u003et.y?1:e.y\u003ct.y?-1:0,i=e.l\u003et.l?1:e.l\u003ct.l?-1:0;return{dx:n,dy:o,dl:i}}var Nxe={1:[\"top\"],2:[\"top\",\"bottom\"],4:[\"top\",\"inner1\",\"inner2\",\"bottom\"]},lvn=t=\u003eNxe[t];function Kct(t,e){const o=Nxe[t].indexOf(e);if(o===-1)throw new Error(`Invalid layer for getLayerIndex (for layerCount === ${t}): \"${e}\"`);return o}function uvn(t,e){const o=Nxe[t][e];if(!o)throw new Error(`Invalid index for indexToLayer (for layerCount === ${t}): \"${e}\"`);return o}var gvn=class extends Fct{obstacles;GRID_STEP=.1;layerCount;constructor(t,e){super([]),this.layerCount=t;const n=lvn(t);this.obstacles=e.flatMap(o=\u003eo.layers.filter(i=\u003en.includes(i)).map(i=\u003e({...o,left:o.center.x-o.width/2,right:o.center.x+o.width/2,top:o.center.y+o.height/2,bottom:o.center.y-o.height/2,l:Kct(t,i)})))}getObstacleAt(t,e,n,o){o??=this.GRID_STEP;for(const i of this.obstacles){if(i.l!==n)continue;const r=i.width/2+o,s=i.height/2+o;if(t\u003e=i.center.x-r\u0026\u0026t\u003c=i.center.x+r\u0026\u0026e\u003e=i.center.y-s\u0026\u0026e\u003c=i.center.y+s)return i}return null}isObstacleAt(t,e,n,o){return this.getObstacleAt(t,e,n,o)!==null}getDirectionDistancesToNearestObstacle3d(t,e,n){const{GRID_STEP:o}=this,i={left:1/0,top:1/0,bottom:1/0,right:1/0};for(const r of this.obstacles)if(r.l===n\u0026\u0026r.type===\"rect\"){const s=r.center.x-r.width/2-o,a=r.center.x+r.width/2+o,A=r.center.y+r.height/2+o,c=r.center.y-r.height/2-o;e\u003e=c\u0026\u0026e\u003c=A\u0026\u0026t\u003es\u0026\u0026(i.left=Math.min(i.left,t-a)),e\u003e=c\u0026\u0026e\u003c=A\u0026\u0026t\u003ca\u0026\u0026(i.right=Math.min(i.right,s-t)),t\u003e=s\u0026\u0026t\u003c=a\u0026\u0026e\u003cA\u0026\u0026(i.top=Math.min(i.top,c-e)),t\u003e=s\u0026\u0026t\u003c=a\u0026\u0026e\u003ec\u0026\u0026(i.bottom=Math.min(i.bottom,e-A))}return i}getOrthoDirectionCollisionInfo(t,e,{margin:n=0}={}){const{x:o,y:i,l:r}=t,{dx:s,dy:a,dl:A}=e;let c=1/0,l=null;if(A!==0){const u=r+A;return this.isObstacleAt(o,i,u,n)?(c=1,l=this.getObstacleAt(o,i,u,n)):c=1,{dx:s,dy:a,dl:A,wallDistance:c,obstacle:l}}else{for(const u of this.obstacles){if(u.l!==r)continue;const g=u.left-n,h=u.right+n,d=u.top+n,p=u.bottom-n;let m=null;s===1\u0026\u0026a===0?i\u003ep\u0026\u0026i\u003cd\u0026\u0026o\u003cu.left\u0026\u0026(m=u.left-o):s===-1\u0026\u0026a===0?i\u003ep\u0026\u0026i\u003cd\u0026\u0026o\u003eu.right\u0026\u0026(m=o-u.right):s===0\u0026\u0026a===1?o\u003eg\u0026\u0026o\u003ch\u0026\u0026i\u003cu.bottom\u0026\u0026(m=u.bottom-i):s===0\u0026\u0026a===-1\u0026\u0026o\u003eg\u0026\u0026o\u003ch\u0026\u0026i\u003eu.top\u0026\u0026(m=i-u.top),m!==null\u0026\u0026m\u003cc\u0026\u0026(c=m,l=u)}return{dx:s,dy:a,dl:0,wallDistance:c,obstacle:l}}}getObstaclesOverlappingRegion(t){const e=[];for(const n of this.obstacles){if(n.l!==t.l)continue;const{left:o,right:i,top:r,bottom:s}=n;o\u003c=t.maxX\u0026\u0026i\u003e=t.minX\u0026\u0026r\u003e=t.minY\u0026\u0026s\u003c=t.maxY\u0026\u0026e.push(n)}return e}},Vct=class extends Hct{MAX_ITERATIONS=500;VIA_COST=4;VIA_DIAMETER=.5;allowLayerChange=!0;layerCount;obstacles;optimizeWithGoalBoxes;connMap;pcbConnMap;GOAL_RUSH_FACTOR=1.1;defaultGoalViaMargin=.5;marginsWithCosts;get largestMargin(){return this.marginsWithCosts[0].margin}constructor(t){super(t),this.layerCount=t.input.layerCount??2,this.MAX_ITERATIONS=t.MAX_ITERATIONS??this.MAX_ITERATIONS,this.VIA_COST=t.VIA_COST??this.VIA_COST,this.connMap=t.connMap,this.pcbConnMap=t.pcbConnMap??new qne,this.optimizeWithGoalBoxes=t.optimizeWithGoalBoxes??!1,this.obstacles=null,this.marginsWithCosts=t.marginsWithCosts??[{margin:1,enterCost:0,travelCostFactor:1},{margin:this.OBSTACLE_MARGIN,enterCost:10,travelCostFactor:2}]}preprocessConnectionBeforeSolving(t){return this.optimizeWithGoalBoxes?Yct({connection:t,pcbConnMap:this.pcbConnMap}):t}postprocessConnectionSolveResult(t,e){if(!e.solved)return e;if(this.optimizeWithGoalBoxes){const n=e.route.map(o=\u003e({x:o.x,y:o.y,route_type:\"wire\",layer:o.layer,width:this.input.minTraceWidth}));n[0].start_pcb_port_id=t.pointsToConnect[0].pcb_port_id,n[n.length-1].end_pcb_port_id=t.pointsToConnect[1].pcb_port_id,this.pcbConnMap.addTrace({type:\"pcb_trace\",pcb_trace_id:`postprocess_trace_${ZQn(8)}`,route:n})}return e}createObstacleList({dominantLayer:t,connection:e,obstaclesFromTraces:n}){const o=this.connMap?this.connMap.getNetConnectedToId(e.name):e.name;if(!o)throw new Error(`The connection.name \"${e.name}\" wasn't present in the full connectivity map`);return new gvn(this.layerCount,this.allObstacles.filter(i=\u003e!i.connectedTo.includes(o)).concat(n??[]))}computeG(t,e){let n=t.g+sD(t,e)*(t.travelMarginCostFactor??1)+(e.enterMarginCost??0);return(e.l??t.l!==-1??-1)\u0026\u0026(n+=this.VIA_COST),n}computeH(t){const e=Math.abs(t.x-this.goalPoint.x),n=Math.abs(t.y-this.goalPoint.y),o=Math.abs(t.l-this.goalPoint.l);return(e+n)**this.GOAL_RUSH_FACTOR+o*this.VIA_COST}getStartNode(t){return{...super.getStartNode(t),l:this.layerToIndex(t.pointsToConnect[0].layer)}}layerToIndex(t){return Kct(this.layerCount,t)}indexToLayer(t){return uvn(this.layerCount,t)}getNodeName(t){return`${Rct(t,this.GRID_STEP)}-${t.l??0}`}hasSpaceForVia(t,e){return t.every(n=\u003ethis.obstacles.getObstaclesOverlappingRegion({minX:e.x-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,minY:e.y-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,maxX:e.x+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,maxY:e.y+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,l:n}).length===0)}getNeighborsSurroundingGoal(t){this.obstacles;const e=this.goalPoint,n=[],o=[{dx:1,dy:0,dl:0},{dx:-1,dy:0,dl:0},{dx:0,dy:1,dl:0},{dx:0,dy:-1,dl:0}],i=this.VIA_DIAMETER+this.OBSTACLE_MARGIN+this.defaultGoalViaMargin;for(const r of o){const s={x:t.x+r.dx*i,y:t.y+r.dy*i,l:t.l+r.dl,obstacleHit:null};this.hasSpaceForVia([t.l,e.l],s)\u0026\u0026n.push(s)}return n}getNeighbors(t){const e=this.obstacles,n=this.goalPoint,o=sD(t,n);if(o\u003c=this.OBSTACLE_MARGIN)return this.getNeighborsSurroundingGoal(t);let i;t.parent?i=Uct(t.parent,t):i=Uct(t,n);const r=[{dx:0,dy:1,dl:0},{dx:1,dy:0,dl:0},{dx:0,dy:-1,dl:0},{dx:-1,dy:0,dl:0}],s=o\u003ethis.VIA_DIAMETER+this.OBSTACLE_MARGIN,a=sD(t,this.startNode)\u003ethis.VIA_DIAMETER+this.OBSTACLE_MARGIN;this.allowLayerChange\u0026\u0026s\u0026\u0026a\u0026\u0026(t.l\u003cthis.layerCount-1\u0026\u0026r.push({dx:0,dy:0,dl:1}),t.l\u003e0\u0026\u0026r.push({dx:0,dy:0,dl:-1}));const A=r.filter(l=\u003el.dx===i.dx*-1\u0026\u0026l.dy===i.dy*-1\u0026\u0026l.dl===i.dl*-1?!1:!(l.dx===i.dx\u0026\u0026l.dy===i.dy\u0026\u0026l.dl===i.dl\u0026\u0026t.parent?.obstacleHit)).map(l=\u003ee.getOrthoDirectionCollisionInfo(t,l,{margin:this.OBSTACLE_MARGIN})).filter(l=\u003e!(l.wallDistance\u003cthis.OBSTACLE_MARGIN)),c=[];for(const l of A){const u=l.dx===0\u0026\u0026l.dy===0\u0026\u0026l.dl===1,g=l.dx===0\u0026\u0026l.dy===0\u0026\u0026l.dl===-1;if((u||g)\u0026\u0026![t.l,t.l+l.dl].every(_=\u003ee.getObstaclesOverlappingRegion({minX:t.x-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,minY:t.y-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,maxX:t.x+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,maxY:t.y+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,l:_}).length===0))continue;if(u){t.l\u003cthis.layerCount-1\u0026\u0026c.push({...l,travelDistance:0,enterMarginCost:0,travelMarginCostFactor:1});continue}if(g){t.l\u003e0\u0026\u0026c.push({...l,travelDistance:0,enterMarginCost:0,travelMarginCostFactor:1});continue}let h=null;t?.obstacleHit\u0026\u0026(h=Dxe({node:t,travelDir:l,wallDir:{...i,wallDistance:this.OBSTACLE_MARGIN},obstacle:t.obstacleHit,obstacles:e,OBSTACLE_MARGIN:this.OBSTACLE_MARGIN,SHOULD_DETECT_CONJOINED_OBSTACLES:!0}));const d=Nct(t,n,l),p=(l.dx===0||Math.sign(n.x-t.x)===l.dx)\u0026\u0026(l.dy===0||Math.sign(n.y-t.y)===l.dy);if(d\u003cl.wallDistance\u0026\u0026d\u003e0\u0026\u0026p){const m=t.l===n.l;let _=0;!m\u0026\u0026Math.abs(d-o)\u003cthis.GRID_STEP\u0026\u0026(_=this.VIA_DIAMETER+this.OBSTACLE_MARGIN+this.defaultGoalViaMargin),c.push({...l,travelDistance:d-_,enterMarginCost:0,travelMarginCostFactor:1})}else if(h!==null\u0026\u0026h\u003cl.wallDistance){for(const{margin:m,enterCost:_,travelCostFactor:f}of this.marginsWithCosts)h-this.OBSTACLE_MARGIN+m*2\u003cl.wallDistance\u0026\u0026c.push({...l,travelDistance:h-this.OBSTACLE_MARGIN+m,enterMarginCost:_,travelMarginCostFactor:f});if(l.wallDistance===1/0)c.push({...l,travelDistance:d,enterMarginCost:0,travelMarginCostFactor:1});else if(l.wallDistance\u003ethis.largestMargin)for(const{margin:m,enterCost:_,travelCostFactor:f}of this.marginsWithCosts)l.wallDistance\u003ethis.largestMargin+m\u0026\u0026c.push({...l,travelDistance:l.wallDistance-m,enterMarginCost:_,travelMarginCostFactor:f})}else if(l.wallDistance!==1/0)for(const{margin:m,enterCost:_,travelCostFactor:f}of this.marginsWithCosts)l.wallDistance\u003em\u0026\u0026c.push({...l,travelDistance:l.wallDistance-m,enterMarginCost:_,travelMarginCostFactor:f})}return c.map(l=\u003e({x:t.x+l.dx*l.travelDistance,y:t.y+l.dy*l.travelDistance,l:t.l+l.dl,obstacleHit:l.obstacle,travelMarginCostFactor:l.travelMarginCostFactor,enterMarginCost:l.enterMarginCost}))}};function dvn(t){const e=avn(t),n=new rvn({input:e});return{solution:n.solveAndMapToTraces(),debugSolutions:n.debugSolutions,debugMessage:n.debugMessage}}var ee=L3();const Fs=_y(ee),Q5=ax({__proto__:null,default:Fs},[ee]);var hvn=Kn([\"up\",\"down\",\"left\",\"right\"]);Kn([\"top-to-bottom\",\"left-to-right\",\"bottom-to-top\",\"right-to-left\"]);var pvn=Z().regex(/^calc\\(.*\\)$/),Po=lt,Vm=pvn.or(lt),zct=Pt({shape:$e(\"pill\"),width:Po,height:Po}),Jct=Pt({shape:$e(\"rect\"),width:Po,height:Po}),Wct=Pt({shape:$e(\"circle\"),radius:Po});Iy(\"shape\",[zct,Jct,Wct]);var mvn=Pt({name:Z().optional()}),Rxe=t=\u003eZ().refine(e=\u003ee.trim().length\u003e0,{message:`${t} cannot be empty`}),jct=t=\u003ePo.refine(e=\u003eNumber.isFinite(e)\u0026\u0026e\u003e0,{message:`${t} must be a positive finite distance`});Pt({name:Rxe(\"name\"),connectsTo:Rxe(\"connectsTo\"),width:jct(\"width\").optional(),height:jct(\"height\").optional(),cadModel:Rxe(\"cadModel\").optional()}).superRefine((t,e)=\u003e{const n=t.width!==void 0,o=t.height!==void 0;if(n!==o){e.addIssue({code:lo.custom,message:\"width and height must be provided together\",path:n?[\"height\"]:[\"width\"]});return}!n\u0026\u0026t.cadModel===void 0\u0026\u0026e.addIssue({code:lo.custom,message:\"provide either width and height or cadModel\",path:[]})});var _vn=Pt({margin:Po.optional(),widthDimensionOffset:Po.optional(),heightDimensionOffset:Po.optional(),depth:Po.optional()}),Txe=_vn.shape,fvn=Iy(\"shape\",[zct.extend(Txe),Jct.extend(Txe),Wct.extend(Txe)]),Ivn=Pt({name:Z().optional(),boardRef:Z().min(1),width:Po.optional(),height:Po.optional(),depth:Po.optional(),wallThickness:Po.default(\"2mm\"),floorThickness:Po.optional(),lidThickness:Po.optional(),boardClearance:Po.optional(),standoffHeight:Po.optional(),topHeadroom:Po.optional(),lidLipDepth:Po.optional(),disableCutouts:je().optional(),showHiddenEdges:je().optional()}),v5=dn(Z().or(_t())),L9=Pt({x:lt,y:lt,z:lt}),G_=crt(t=\u003et\u0026\u0026typeof t==\"object\"\u0026\u0026\"default\"in t?t.default:t,Z()),Cvn=Pt({x:xo([_t(),Z()]),y:xo([_t(),Z()]),z:xo([_t(),Z()])}),yvn=[\"x+\",\"x-\",\"y+\",\"y-\",\"z+\",\"z-\"],xvn=Kn(yvn),PQ=Pt({rotationOffset:_t().or(Cvn).optional(),positionOffset:L9.optional(),modelOriginPosition:L9.optional(),modelBounds:Pt({min:L9,max:L9}).optional(),size:L9.optional(),modelUnitToMmScale:Po.optional(),modelBoardNormalDirection:xvn.optional(),pcbRotationOffset:_t().optional(),zOffsetFromSurface:Po.optional(),showAsTranslucentModel:je().optional(),stepUrl:G_.optional()}),Evn=PQ.extend({stlUrl:G_}),Bvn=PQ.extend({objUrl:G_,mtlUrl:G_.optional()}),bvn=PQ.extend({gltfUrl:G_}),Svn=PQ.extend({glbUrl:G_}),Qvn=PQ.extend({stepUrl:G_}),vvn=PQ.extend({wrlUrl:G_}),wvn=PQ.extend({jscad:Qc(rd())}),kxe=xo([Art(),Z().min(1),P0(t=\u003et\u0026\u0026typeof t==\"object\"\u0026\u0026\"type\"in t\u0026\u0026\"props\"in t),Evn,Bvn,bvn,Svn,Qvn,vvn,wvn]),Fxe=P0(t=\u003e!0),By=Pt({x:lt,y:lt}),Lxe=By.extend({rotation:oA.optional()}),$ct=Pt({size:By.optional(),thickness:lt.optional()}),Pvn=Pt({font:$ct.optional()}),Zne=Pt({value:Z(),at:Lxe.optional(),layer:Z().optional(),uuid:Z().optional(),hide:je().optional(),effects:Pvn.optional()}),Mvn=Pt({Reference:Zne.optional(),Value:Zne.optional(),Datasheet:Zne.optional(),Description:Zne.optional()}),Dvn=Pt({through_hole:je().optional(),smd:je().optional(),exclude_from_pos_files:je().optional(),exclude_from_bom:je().optional()}),Nvn=Pt({name:Z(),type:Z(),shape:Z().optional(),at:Lxe.optional(),size:By.optional(),drill:lt.optional(),layers:dn(Z()).optional(),removeUnusedLayers:je().optional(),uuid:Z().optional()}),Rvn=Pt({path:Z(),offset:L9.optional(),scale:L9.optional(),rotate:L9.optional()}),Tvn=Pt({footprintName:Z().optional(),version:xo([_t(),Z()]).optional(),generator:Z().optional(),generatorVersion:xo([_t(),Z()]).optional(),layer:Z().optional(),properties:Mvn.optional(),attributes:Dvn.optional(),pads:dn(Nvn).optional(),embeddedFonts:je().optional(),model:Rvn.optional()}),kvn=Pt({hide:je().optional()}),Fvn=Pt({offset:lt.optional(),hide:je().optional()}),Lvn=Pt({font:$ct.optional(),justify:xo([Z(),dn(Z())]).optional(),hide:je().optional()}),AD=Pt({value:Z(),id:xo([_t(),Z()]).optional(),at:Lxe.optional(),effects:Lvn.optional()}),Hvn=Pt({Reference:AD.optional(),Value:AD.optional(),Footprint:AD.optional(),Datasheet:AD.optional(),Description:AD.optional(),ki_keywords:AD.optional(),ki_fp_filters:AD.optional()}),Ovn=Pt({symbolName:Z().optional(),extends:Z().optional(),pinNumbers:kvn.optional(),pinNames:Fvn.optional(),excludeFromSim:je().optional(),inBom:je().optional(),onBoard:je().optional(),properties:Hvn.optional(),embeddedFonts:je().optional()}),Hxe=Pt({silkscreenFontSize:lt.optional(),viaPadDiameter:lt.optional(),viaHoleDiameter:lt.optional(),silkscreenTextPosition:xo([Kn([\"centered\",\"outside\",\"none\"]),Pt({offsetX:_t(),offsetY:_t()})]).optional(),silkscreenTextVisibility:Kn([\"hidden\",\"visible\",\"inherit\"]).optional()}),Gvn=Pt({fontSize:ce.optional(),pcbX:Vm.optional(),pcbY:Vm.optional(),visibility:Kn([\"hidden\",\"visible\",\"inherit\"]).optional()}),qct=Qc(Z(),Gvn),Oxe=Kn([\"i2c_sda\",\"i2c_scl\",\"spi_cs\",\"spi_sck\",\"spi_mosi\",\"spi_miso\",\"uart_tx\",\"uart_rx\"]),Yvn=Pt({isInput:je().optional(),isOutput:je().optional(),isBidirectional:je().optional(),isPassive:je().optional(),canUseTriState:je().optional(),isUsingTriState:je().optional(),canUseOpenCollector:je().optional(),isUsingOpenCollector:je().optional(),canUseOpenEmitter:je().optional(),isUsingOpenEmitter:je().optional(),capabilities:dn(Oxe).optional(),activeCapabilities:dn(Oxe).optional(),activeCapability:Oxe.optional(),providesPower:je().optional(),requiresPower:je().optional(),providesGround:je().optional(),requiresGround:je().optional(),providesVoltage:xo([Z(),_t()]).optional(),requiresVoltage:xo([Z(),_t()]).optional(),doNotConnect:je().optional(),includeInBoardPinout:je().optional(),highlightColor:Z().optional(),mustBeConnected:je().optional(),canUseInternalPullup:je().optional(),isUsingInternalPullup:je().optional(),needsExternalPullup:je().optional(),canUseInternalPulldown:je().optional(),isUsingInternalPulldown:je().optional(),needsExternalPulldown:je().optional(),canUseOpenDrain:je().optional(),isUsingOpenDrain:je().optional(),canUsePushPull:je().optional(),isUsingPushPull:je().optional(),shouldHaveDecouplingCapacitor:je().optional(),recommendedDecouplingCapacitorCapacitance:xo([Z(),_t()]).optional(),isGpio:je().optional()}),Uvn=Pt({defaultPassiveSize:xo([Kn([\"xs\",\"sm\",\"md\"]),lt]).optional(),defaultCapacitorOrientation:Kn([\"vertical\",\"none\"]).optional()}),Kvn=P0(t=\u003e!0),qa=Pt({pcbX:Vm.optional(),pcbY:Vm.optional(),pcbLeftEdgeX:Vm.optional(),pcbRightEdgeX:Vm.optional(),pcbTopEdgeY:Vm.optional(),pcbBottomEdgeY:Vm.optional(),pcbOffsetX:lt.optional(),pcbOffsetY:lt.optional(),pcbRotation:oA.optional(),pcbPositionAnchor:Z().optional(),pcbPositionMode:Kn([\"relative_to_group_anchor\",\"auto\",\"relative_to_board_anchor\",\"relative_to_component_anchor\"]).optional(),shouldBeOnEdgeOfBoard:je().optional(),layer:Pr.optional(),pcbMarginTop:lt.optional(),pcbMarginRight:lt.optional(),pcbMarginBottom:lt.optional(),pcbMarginLeft:lt.optional(),pcbMarginX:lt.optional(),pcbMarginY:lt.optional(),pcbStyle:Hxe.optional(),pcbSx:qct.optional(),pcbRelative:je().optional(),relative:je().optional()}),eoe=Pt({pcbX:Vm.optional(),pcbY:Vm.optional(),pcbLeftEdgeX:Vm.optional(),pcbRightEdgeX:Vm.optional(),pcbTopEdgeY:Vm.optional(),pcbBottomEdgeY:Vm.optional(),pcbOffsetX:lt.optional(),pcbOffsetY:lt.optional(),pcbRotation:oA.optional(),pcbPositionAnchor:Z().optional(),pcbPositionMode:Kn([\"relative_to_group_anchor\",\"auto\",\"relative_to_board_anchor\",\"relative_to_component_anchor\"]).optional(),shouldBeOnEdgeOfBoard:je().optional(),pcbMarginTop:lt.optional(),pcbMarginRight:lt.optional(),pcbMarginBottom:lt.optional(),pcbMarginLeft:lt.optional(),pcbMarginX:lt.optional(),pcbMarginY:lt.optional(),pcbStyle:Hxe.optional(),pcbSx:qct.optional(),schMarginTop:lt.optional(),schMarginRight:lt.optional(),schMarginBottom:lt.optional(),schMarginLeft:lt.optional(),schMarginX:lt.optional(),schMarginY:lt.optional(),schX:lt.optional(),schY:lt.optional(),schRotation:oA.optional(),layer:Pr.optional(),footprint:Fxe.optional(),symbol:Kvn.optional(),schStyle:Uvn.optional(),relative:je().optional(),schRelative:je().optional(),pcbRelative:je().optional()}),Gxe=Pt({supplierPartNumbers:Qc(qM,dn(Z())).optional()}),vg=eoe.merge(Gxe).extend({key:rd().optional(),name:Z(),displayName:Z().optional(),schSectionName:Z().optional().describe('This component will be drawn as part of this section e.g. \"Power\"'),schSheetName:Z().optional().describe('This component will be drawn as part of this sheet e.g. \"Main\"'),datasheetUrl:G_.optional(),cadModel:kxe.optional(),kicadFootprintMetadata:Tvn.optional(),kicadSymbolMetadata:Ovn.optional(),children:rd().optional(),symbolName:Z().optional(),doNotPlace:je().optional(),allowOffBoard:je().optional().describe(\"Allows the PCB component to hang off the board (e.g. for USB ports or displays)\"),obstructsWithinBounds:je().optional().describe(\"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath\"),showAsTranslucentModel:je().optional().describe(\"Whether to show this component's CAD model as translucent in the 3D viewer.\"),pinAttributes:Qc(Z(),Yvn).optional(),mfn:Z().describe(\"Manufacturer Part Number\").optional(),manufacturerPartNumber:Z().optional()}),Vvn=[\"pin1\",\"left\",\"pin2\",\"right\"],Yxe=[\"pin1\",\"left\",\"anode\",\"pos\",\"pin2\",\"right\",\"cathode\",\"neg\"];lt.or(Kn([\"2x\",\"3x\",\"4x\"]));var zvn=By.extend({via:je().optional(),fromLayer:Pr.optional(),toLayer:Pr.optional()}),Jvn=zvn.superRefine((t,e)=\u003e{t.via?t.toLayer||e.addIssue({code:lo.custom,message:\"toLayer is required when via is true\",path:[\"toLayer\"]}):(t.fromLayer||t.toLayer)\u0026\u0026e.addIssue({code:lo.custom,message:\"fromLayer/toLayer are only allowed when via is true\",path:[\"via\"]})}),Uxe=dn(xo([Jvn,Z()])),Wvn=[\"Audio_Module/Reverb_BTDR-1H\",\"Audio_Module/Reverb_BTDR-1V\",\"Battery/BatteryClip_Keystone_54_D16-19mm\",\"Battery/BatteryHolder_Bulgin_BX0034_1xAAA\",\"Battery/BatteryHolder_Bulgin_BX0036_1xC\",\"Battery/BatteryHolder_Bulgin_BX0123_1xCR123\",\"Battery/BatteryHolder_ComfortableElectronic_CH273-2450_1x2450\",\"Battery/BatteryHolder_Eagle_12BH611-GR\",\"Battery/BatteryHolder_Keystone_103_1x20mm\",\"Battery/BatteryHolder_Keystone_1042_1x18650\",\"Battery/BatteryHolder_Keystone_104_1x23mm\",\"Battery/BatteryHolder_Keystone_1057_1x2032\",\"Battery/BatteryHolder_Keystone_1058_1x2032\",\"Battery/BatteryHolder_Keystone_105_1x2430\",\"Battery/BatteryHolder_Keystone_1060_1x2032\",\"Battery/BatteryHolder_Keystone_106_1x20mm\",\"Battery/BatteryHolder_Keystone_107_1x23mm\",\"Battery/BatteryHolder_Keystone_2460_1xAA\",\"Battery/BatteryHolder_Keystone_2462_2xAA\",\"Battery/BatteryHolder_Keystone_2466_1xAAA\",\"Battery/BatteryHolder_Keystone_2468_2xAAA\",\"Battery/BatteryHolder_Keystone_2479_3xAAA\",\"Battery/BatteryHolder_Keystone_2993\",\"Battery/BatteryHolder_Keystone_2998_1x6.8mm\",\"Battery/BatteryHolder_Keystone_3000_1x12mm\",\"Battery/BatteryHolder_Keystone_3001_1x12mm\",\"Battery/BatteryHolder_Keystone_3002_1x2032\",\"Battery/BatteryHolder_Keystone_3008_1x2450\",\"Battery/BatteryHolder_Keystone_3009_1x2450\",\"Battery/BatteryHolder_Keystone_3034_1x20mm\",\"Battery/BatteryHolder_Keystone_500\",\"Battery/BatteryHolder_Keystone_590\",\"Battery/BatteryHolder_LINX_BAT-HLD-012-SMT\",\"Battery/BatteryHolder_MPD_BA9VPC_1xPP3\",\"Battery/BatteryHolder_MPD_BC12AAPC_2xAA\",\"Battery/BatteryHolder_MPD_BC2003_1x2032\",\"Battery/BatteryHolder_MPD_BC2AAPC_2xAA\",\"Battery/BatteryHolder_MPD_BH-18650-PC\",\"Battery/BatteryHolder_MPD_BK-18650-PC2\",\"Battery/BatteryHolder_MYOUNG_BS-07-A1BJ001_CR2032\",\"Battery/BatteryHolder_Multicomp_BC-2001_1x2032\",\"Battery/BatteryHolder_Renata_SMTU2032-LF_1x2032\",\"Battery/BatteryHolder_Seiko_MS621F\",\"Battery/BatteryHolder_TruPower_BH-331P_3xAA\",\"Battery/Battery_CR1225\",\"Battery/Battery_Panasonic_CR1025-VSK_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR1220-VCN_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR1632-V1AN_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR2025-V1AK_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR2032-HFN_Horizontal_CircularHoles\",\"Battery/Battery_Panasonic_CR2032-VS1N_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR2354-VCN_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR2450-VAN_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR2477-VCN_Vertical_CircularHoles\",\"Battery/Battery_Panasonic_CR3032-VCN_Vertical_CircularHoles\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.00u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.00u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.25u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.25u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.50u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.50u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.75u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_1.75u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.00u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.00u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.00u_Vertical_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.00u_Vertical_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.25u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.25u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.75u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_2.75u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_6.25u_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_6.25u_Plate\",\"Button_Switch_Keyboard/SW_Cherry_MX_ISOEnter_PCB\",\"Button_Switch_Keyboard/SW_Cherry_MX_ISOEnter_Plate\",\"Button_Switch_Keyboard/SW_Matias_1.00u\",\"Button_Switch_Keyboard/SW_Matias_1.25u\",\"Button_Switch_Keyboard/SW_Matias_1.50u\",\"Button_Switch_Keyboard/SW_Matias_1.75u\",\"Button_Switch_Keyboard/SW_Matias_2.00u\",\"Button_Switch_Keyboard/SW_Matias_2.25u\",\"Button_Switch_Keyboard/SW_Matias_2.75u\",\"Button_Switch_Keyboard/SW_Matias_6.25u\",\"Button_Switch_Keyboard/SW_Matias_ISOEnter\",\"Button_Switch_SMD/Nidec_Copal_CAS-120A\",\"Button_Switch_SMD/Nidec_Copal_SH-7010A\",\"Button_Switch_SMD/Nidec_Copal_SH-7010B\",\"Button_Switch_SMD/Nidec_Copal_SH-7040B\",\"Button_Switch_SMD/Panasonic_EVQPUJ_EVQPUA\",\"Button_Switch_SMD/Panasonic_EVQPUK_EVQPUB\",\"Button_Switch_SMD/Panasonic_EVQPUL_EVQPUC\",\"Button_Switch_SMD/Panasonic_EVQPUM_EVQPUD\",\"Button_Switch_SMD/SW_DIP_SPSTx01_Slide_6.7x4.1mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx01_Slide_6.7x4.1mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx01_Slide_9.78x4.72mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Copal_CHS-01A_W5.08mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Copal_CHS-01B_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Copal_CVS-01xB_W5.9mm_P1mm\",\"Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Omron_A6S-110x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_6.7x6.64mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_6.7x6.64mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_9.78x7.26mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Copal_CHS-02A_W5.08mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Copal_CHS-02B_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Copal_CVS-02xB_W5.9mm_P1mm\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_KingTek_DSHP02TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_KingTek_DSHP02TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Omron_A6H-2101_W6.15mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Omron_A6S-210x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx03_Slide_6.7x9.18mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx03_Slide_6.7x9.18mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx03_Slide_9.78x9.8mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx03_Slide_Copal_CVS-03xB_W5.9mm_P1mm\",\"Button_Switch_SMD/SW_DIP_SPSTx03_Slide_KingTek_DSHP03TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx03_Slide_KingTek_DSHP03TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx03_Slide_Omron_A6S-310x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_6.7x11.72mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_6.7x11.72mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_9.78x12.34mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Copal_CHS-04A_W5.08mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Copal_CHS-04B_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Copal_CVS-04xB_W5.9mm_P1mm\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_KingTek_DSHP04TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_KingTek_DSHP04TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Omron_A6H-4101_W6.15mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Omron_A6S-410x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx05_Slide_6.7x14.26mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx05_Slide_6.7x14.26mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx05_Slide_9.78x14.88mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx05_Slide_KingTek_DSHP05TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx05_Slide_KingTek_DSHP05TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx05_Slide_Omron_A6S-510x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_6.7x16.8mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_6.7x16.8mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_9.78x17.42mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Copal_CHS-06A_W5.08mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Copal_CHS-06B_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_KingTek_DSHP06TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_KingTek_DSHP06TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Omron_A6H-6101_W6.15mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Omron_A6S-610x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx07_Slide_6.7x19.34mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx07_Slide_6.7x19.34mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx07_Slide_9.78x19.96mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx07_Slide_KingTek_DSHP07TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx07_Slide_KingTek_DSHP07TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx07_Slide_Omron_A6S-710x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_6.7x21.88mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_6.7x21.88mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_9.78x22.5mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Copal_CHS-08A_W5.08mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Copal_CHS-08B_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Copal_CVS-08xB_W5.9mm_P1mm\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_KingTek_DSHP08TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_KingTek_DSHP08TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Omron_A6H-8101_W6.15mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Omron_A6S-810x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx09_Slide_6.7x24.42mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx09_Slide_6.7x24.42mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx09_Slide_9.78x25.04mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx09_Slide_KingTek_DSHP09TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx09_Slide_KingTek_DSHP09TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx09_Slide_Omron_A6S-910x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_6.7x26.96mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_6.7x26.96mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_9.78x27.58mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Copal_CHS-10A_W5.08mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Copal_CHS-10B_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_KingTek_DSHP10TJ_W5.25mm_P1.27mm_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_KingTek_DSHP10TS_W7.62mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Omron_A6H-10101_W6.15mm_P1.27mm\",\"Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Omron_A6S-1010x_W8.9mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx11_Slide_6.7x29.5mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx11_Slide_6.7x29.5mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx11_Slide_9.78x30.12mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DIP_SPSTx12_Slide_6.7x32.04mm_W6.73mm_P2.54mm_LowProfile_JPin\",\"Button_Switch_SMD/SW_DIP_SPSTx12_Slide_6.7x32.04mm_W8.61mm_P2.54mm_LowProfile\",\"Button_Switch_SMD/SW_DIP_SPSTx12_Slide_9.78x32.66mm_W8.61mm_P2.54mm\",\"Button_Switch_SMD/SW_DPDT_CK_JS202011JCQN\",\"Button_Switch_SMD/SW_MEC_5GSH9\",\"Button_Switch_SMD/SW_Push_1P1T-MP_NO_Horizontal_Alps_SKRTLAE010\",\"Button_Switch_SMD/SW_Push_1P1T-SH_NO_CK_KMR2xxG\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_KMR2\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC6xxG\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC6xxJ\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC7xxJ\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC9xxG\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC9xxJ\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx43PSMTR\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx43SMTR\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx73PSMTR\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx73SMTR\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx85PSMTR\",\"Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx85SMTR\",\"Button_Switch_SMD/SW_Push_1P1T_NO_E-Switch_TL3301NxxxxxG\",\"Button_Switch_SMD/SW_Push_1P1T_NO_Vertical_Wuerth_434133025816\",\"Button_Switch_SMD/SW_Push_1P1T_XKB_TS-1187A\",\"Button_Switch_SMD/SW_Push_1TS009xxxx-xxxx-xxxx_6x6x5mm\",\"Button_Switch_SMD/SW_Push_SPST_NO_Alps_SKRK\",\"Button_Switch_SMD/SW_SP3T_PCM13\",\"Button_Switch_SMD/SW_SPDT_CK_JS102011SAQN\",\"Button_Switch_SMD/SW_SPDT_PCM12\",\"Button_Switch_SMD/SW_SPDT_REED_MSDM-DT\",\"Button_Switch_SMD/SW_SPDT_Shouhan_MSK12C02\",\"Button_Switch_SMD/SW_SPST_B3S-1000\",\"Button_Switch_SMD/SW_SPST_B3S-1100\",\"Button_Switch_SMD/SW_SPST_B3SL-1002P\",\"Button_Switch_SMD/SW_SPST_B3SL-1022P\",\"Button_Switch_SMD/SW_SPST_B3U-1000P-B\",\"Button_Switch_SMD/SW_SPST_B3U-1000P\",\"Button_Switch_SMD/SW_SPST_B3U-1100P-B\",\"Button_Switch_SMD/SW_SPST_B3U-1100P\",\"Button_Switch_SMD/SW_SPST_B3U-3000P-B\",\"Button_Switch_SMD/SW_SPST_B3U-3000P\",\"Button_Switch_SMD/SW_SPST_B3U-3100P-B\",\"Button_Switch_SMD/SW_SPST_B3U-3100P\",\"Button_Switch_SMD/SW_SPST_CK_KMS2xxG\",\"Button_Switch_SMD/SW_SPST_CK_KMS2xxGP\",\"Button_Switch_SMD/SW_SPST_CK_KXT3\",\"Button_Switch_SMD/SW_SPST_CK_RS282G05A3\",\"Button_Switch_SMD/SW_SPST_EVPBF\",\"Button_Switch_SMD/SW_SPST_EVQP0\",\"Button_Switch_SMD/SW_SPST_EVQP2_MiddlePushTravel_H2.5mm\",\"Button_Switch_SMD/SW_SPST_EVQP2_ShortPushTravel_H2.1mm\",\"Button_Switch_SMD/SW_SPST_EVQP2_ShortPushTravel_H2.5mm\",\"Button_Switch_SMD/SW_SPST_EVQP7A\",\"Button_Switch_SMD/SW_SPST_EVQP7C\",\"Button_Switch_SMD/SW_SPST_EVQPE1\",\"Button_Switch_SMD/SW_SPST_EVQQ2\",\"Button_Switch_SMD/SW_SPST_FSMSM\",\"Button_Switch_SMD/SW_SPST_GT-TC155X\",\"Button_Switch_SMD/SW_SPST_Omron_B3FS-100xP\",\"Button_Switch_SMD/SW_SPST_Omron_B3FS-101xP\",\"Button_Switch_SMD/SW_SPST_Omron_B3FS-105xP\",\"Button_Switch_SMD/SW_SPST_PTS645Sx43SMTR92\",\"Button_Switch_SMD/SW_SPST_PTS647_Sx38\",\"Button_Switch_SMD/SW_SPST_PTS647_Sx50\",\"Button_Switch_SMD/SW_SPST_PTS647_Sx70\",\"Button_Switch_SMD/SW_SPST_PTS810\",\"Button_Switch_SMD/SW_SPST_Panasonic_EVQPL_3PL_5PL_PT_A08\",\"Button_Switch_SMD/SW_SPST_Panasonic_EVQPL_3PL_5PL_PT_A15\",\"Button_Switch_SMD/SW_SPST_REED_CT05-XXXX-G1\",\"Button_Switch_SMD/SW_SPST_REED_CT05-XXXX-J1\",\"Button_Switch_SMD/SW_SPST_REED_CT10-XXXX-G1\",\"Button_Switch_SMD/SW_SPST_REED_CT10-XXXX-G2\",\"Button_Switch_SMD/SW_SPST_REED_CT10-XXXX-G4\",\"Button_Switch_SMD/SW_SPST_SKQG_WithStem\",\"Button_Switch_SMD/SW_SPST_SKQG_WithoutStem\",\"Button_Switch_SMD/SW_SPST_TL3305A\",\"Button_Switch_SMD/SW_SPST_TL3305B\",\"Button_Switch_SMD/SW_SPST_TL3305C\",\"Button_Switch_SMD/SW_SPST_TL3342\",\"Button_Switch_SMD/SW_SPST_TS-1088-xR020\",\"Button_Switch_SMD/SW_SPST_TS-1088-xR025\",\"Button_Switch_SMD/SW_Tactile_SPST_NO_Straight_CK_PTS636Sx25SMTRLFS\",\"Button_Switch_THT/KSA_Tactile_SPST\",\"Button_Switch_THT/Nidec_Copal_SH-7010C\",\"Button_Switch_THT/Push_E-Switch_KS01Q01\",\"Button_Switch_THT/SW_CK_JS202011AQN_DPDT_Angled\",\"Button_Switch_THT/SW_CK_JS202011CQN_DPDT_Straight\",\"Button_Switch_THT/SW_CW_GPTS203211B\",\"Button_Switch_THT/SW_DIP_SPSTx01_Piano_10.8x4.1mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx01_Slide_6.7x4.1mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx01_Slide_9.78x4.72mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx02_Piano_10.8x6.64mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx02_Piano_CTS_Series194-2MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx02_Slide_6.7x6.64mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx02_Slide_9.78x7.26mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx03_Piano_10.8x9.18mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx03_Piano_CTS_Series194-3MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx03_Slide_6.7x9.18mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx03_Slide_9.78x9.8mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx04_Piano_10.8x11.72mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx04_Piano_CTS_Series194-4MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx04_Slide_6.7x11.72mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx04_Slide_9.78x12.34mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx05_Piano_10.8x14.26mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx05_Piano_CTS_Series194-5MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx05_Slide_6.7x14.26mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx05_Slide_9.78x14.88mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx06_Piano_10.8x16.8mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx06_Piano_CTS_Series194-6MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx06_Slide_6.7x16.8mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx06_Slide_9.78x17.42mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx07_Piano_10.8x19.34mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx07_Piano_CTS_Series194-7MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx07_Slide_6.7x19.34mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx07_Slide_9.78x19.96mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx08_Piano_10.8x21.88mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx08_Piano_CTS_Series194-8MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx08_Slide_6.7x21.88mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx08_Slide_9.78x22.5mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx09_Piano_10.8x24.42mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx09_Piano_CTS_Series194-9MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx09_Slide_6.7x24.42mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx09_Slide_9.78x25.04mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx10_Piano_10.8x26.96mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx10_Piano_CTS_Series194-10MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx10_Slide_6.7x26.96mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx10_Slide_9.78x27.58mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx11_Piano_10.8x29.5mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx11_Piano_CTS_Series194-11MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx11_Slide_6.7x29.5mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx11_Slide_9.78x30.12mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx12_Piano_10.8x32.04mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx12_Piano_CTS_Series194-12MSTN_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_DIP_SPSTx12_Slide_6.7x32.04mm_W7.62mm_P2.54mm_LowProfile\",\"Button_Switch_THT/SW_DIP_SPSTx12_Slide_9.78x32.66mm_W7.62mm_P2.54mm\",\"Button_Switch_THT/SW_E-Switch_EG1224_SPDT_Angled\",\"Button_Switch_THT/SW_E-Switch_EG1271_SPDT\",\"Button_Switch_THT/SW_E-Switch_EG2219_DPDT_Angled\",\"Button_Switch_THT/SW_Lever_1P2T_NKK_GW12LxH\",\"Button_Switch_THT/SW_MEC_5GTH9\",\"Button_Switch_THT/SW_NKK_BB15AH\",\"Button_Switch_THT/SW_NKK_G1xJP\",\"Button_Switch_THT/SW_NKK_GW12LJP\",\"Button_Switch_THT/SW_NKK_NR01\",\"Button_Switch_THT/SW_PUSH-12mm\",\"Button_Switch_THT/SW_PUSH-12mm_Wuerth-430476085716\",\"Button_Switch_THT/SW_PUSH_1P1T_6x3.5mm_H4.3_APEM_MJTP1243\",\"Button_Switch_THT/SW_PUSH_1P1T_6x3.5mm_H5.0_APEM_MJTP1250\",\"Button_Switch_THT/SW_PUSH_6mm\",\"Button_Switch_THT/SW_PUSH_6mm_H13mm\",\"Button_Switch_THT/SW_PUSH_6mm_H4.3mm\",\"Button_Switch_THT/SW_PUSH_6mm_H5mm\",\"Button_Switch_THT/SW_PUSH_6mm_H7.3mm\",\"Button_Switch_THT/SW_PUSH_6mm_H8.5mm\",\"Button_Switch_THT/SW_PUSH_6mm_H8mm\",\"Button_Switch_THT/SW_PUSH_6mm_H9.5mm\",\"Button_Switch_THT/SW_PUSH_E-Switch_FS5700DP_DPDT\",\"Button_Switch_THT/SW_PUSH_LCD_E3_SAxxxx\",\"Button_Switch_THT/SW_PUSH_LCD_E3_SAxxxx_SocketPins\",\"Button_Switch_THT/SW_Push_1P1T_NO_LED_E-Switch_TL1250\",\"Button_Switch_THT/SW_Push_1P2T_Vertical_E-Switch_800UDP8P1A1M6\",\"Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH1xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH2xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH3xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH4xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2OAH5xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH1xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH2xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH3xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH4xxxxxxV2\",\"Button_Switch_THT/SW_Push_2P2T_Vertical_E-Switch_800UDP8P1A1M6\",\"Button_Switch_THT/SW_SPST_Omron_B3F-315x_Angled\",\"Button_Switch_THT/SW_SPST_Omron_B3F-40xx\",\"Button_Switch_THT/SW_SPST_Omron_B3F-50xx\",\"Button_Switch_THT/SW_Slide-03_Wuerth-WS-SLTV_10x2.5x6.4_P2.54mm\",\"Button_Switch_THT/SW_Slide_SP3T_Straight_CK_OS103012MU1QP1\",\"Button_Switch_THT/SW_Slide_SPDT_Angled_CK_OS102011MA1Q\",\"Button_Switch_THT/SW_Slide_SPDT_Straight_CK_OS102011MS2Q\",\"Button_Switch_THT/SW_TH_Tactile_Omron_B3F-100x\",\"Button_Switch_THT/SW_TH_Tactile_Omron_B3F-102x\",\"Button_Switch_THT/SW_TH_Tactile_Omron_B3F-106x\",\"Button_Switch_THT/SW_TH_Tactile_Omron_B3F-107x\",\"Button_Switch_THT/SW_TH_Tactile_Omron_B3F-110x\",\"Button_Switch_THT/SW_TH_Tactile_Omron_B3F-1110\",\"Button_Switch_THT/SW_TH_Tactile_Omron_B3F-112x\",\"Button_Switch_THT/SW_Tactile_SKHH_Angled\",\"Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx31-2LFS\",\"Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx39-2LFS\",\"Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx58-2LFS\",\"Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx83-2LFS\",\"Button_Switch_THT/SW_Tactile_Straight_KSA0Axx1LFTR\",\"Button_Switch_THT/SW_Tactile_Straight_KSL0Axx1LFTR\",\"Button_Switch_THT/SW_XKB_DM1-16UC-1\",\"Button_Switch_THT/SW_XKB_DM1-16UD-1\",\"Button_Switch_THT/SW_XKB_DM1-16UP-1\",\"Buzzer_Beeper/Buzzer_12x9.5RM7.6\",\"Buzzer_Beeper/Buzzer_15x7.5RM7.6\",\"Buzzer_Beeper/Buzzer_CUI_CPT-9019S-SMT\",\"Buzzer_Beeper/Buzzer_D14mm_H7mm_P10mm\",\"Buzzer_Beeper/Buzzer_Mallory_AST1109MLTRQ\",\"Buzzer_Beeper/Buzzer_Mallory_AST1240MLQ\",\"Buzzer_Beeper/Buzzer_Murata_PKLCS1212E\",\"Buzzer_Beeper/Buzzer_Murata_PKMCS0909E\",\"Buzzer_Beeper/Buzzer_TDK_PS1240P02BT_D12.2mm_H6.5mm\",\"Buzzer_Beeper/Indicator_PUI_AI-1440-TWT-24V-2-R\",\"Buzzer_Beeper/MagneticBuzzer_CUI_CMT-8504-100-SMT\",\"Buzzer_Beeper/MagneticBuzzer_CUI_CST-931RP-A\",\"Buzzer_Beeper/MagneticBuzzer_Kingstate_KCG0601\",\"Buzzer_Beeper/MagneticBuzzer_Kobitone_254-EMB73-RO\",\"Buzzer_Beeper/MagneticBuzzer_Kobitone_254-EMB84Q-RO\",\"Buzzer_Beeper/MagneticBuzzer_PUI_AT-0927-TT-6-R\",\"Buzzer_Beeper/MagneticBuzzer_PUI_SMT-1028-T-2-R\",\"Buzzer_Beeper/MagneticBuzzer_ProSignal_ABI-009-RC\",\"Buzzer_Beeper/MagneticBuzzer_ProSignal_ABI-010-RC\",\"Buzzer_Beeper/MagneticBuzzer_ProSignal_ABT-410-RC\",\"Buzzer_Beeper/MagneticBuzzer_ProjectsUnlimited_AI-4228-TWT-R\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_HGP\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_HMB-06_HMB-12\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_HMB\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB-105\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB-108\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB-111\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMX\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_RMX\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_TMB\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_TMX-F\",\"Buzzer_Beeper/MagneticBuzzer_StarMicronics_TMX-H\",\"Buzzer_Beeper/PUIAudio_SMT_0825_S_4_R\",\"Buzzer_Beeper/Speaker_CUI_CMR-1206S-67\",\"Calibration_Scale/Gauge_100mm_Grid_Type1_CopperTop\",\"Calibration_Scale/Gauge_100mm_Type1_CopperTop\",\"Calibration_Scale/Gauge_100mm_Type1_SilkScreenTop\",\"Calibration_Scale/Gauge_100mm_Type2_CopperTop\",\"Calibration_Scale/Gauge_100mm_Type2_SilkScreenTop\",\"Calibration_Scale/Gauge_10mm_Type1_CopperTop\",\"Calibration_Scale/Gauge_10mm_Type1_SilkScreenTop\",\"Calibration_Scale/Gauge_10mm_Type2_CopperTop\",\"Calibration_Scale/Gauge_10mm_Type2_SilkScreenTop\",\"Calibration_Scale/Gauge_10mm_Type3_CopperTop\",\"Calibration_Scale/Gauge_10mm_Type3_SilkScreenTop\",\"Calibration_Scale/Gauge_10mm_Type4_CopperTop\",\"Calibration_Scale/Gauge_10mm_Type4_SilkScreenTop\",\"Calibration_Scale/Gauge_10mm_Type5_CopperTop\",\"Calibration_Scale/Gauge_10mm_Type5_SilkScreenTop\",\"Calibration_Scale/Gauge_50mm_Type1_CopperTop\",\"Calibration_Scale/Gauge_50mm_Type1_SilkScreenTop\",\"Calibration_Scale/Gauge_50mm_Type2_CopperTop\",\"Calibration_Scale/Gauge_50mm_Type2_SilkScreenTop\",\"Capacitor_SMD/CP_Elec_10x10.5\",\"Capacitor_SMD/CP_Elec_10x10\",\"Capacitor_SMD/CP_Elec_10x12.5\",\"Capacitor_SMD/CP_Elec_10x12.6\",\"Capacitor_SMD/CP_Elec_10x14.3\",\"Capacitor_SMD/CP_Elec_10x7.7\",\"Capacitor_SMD/CP_Elec_10x7.9\",\"Capacitor_SMD/CP_Elec_16x17.5\",\"Capacitor_SMD/CP_Elec_16x22\",\"Capacitor_SMD/CP_Elec_18x17.5\",\"Capacitor_SMD/CP_Elec_18x22\",\"Capacitor_SMD/CP_Elec_3x5.3\",\"Capacitor_SMD/CP_Elec_3x5.4\",\"Capacitor_SMD/CP_Elec_4x3.9\",\"Capacitor_SMD/CP_Elec_4x3\",\"Capacitor_SMD/CP_Elec_4x4.5\",\"Capacitor_SMD/CP_Elec_4x5.3\",\"Capacitor_SMD/CP_Elec_4x5.4\",\"Capacitor_SMD/CP_Elec_4x5.7\",\"Capacitor_SMD/CP_Elec_4x5.8\",\"Capacitor_SMD/CP_Elec_5x3.9\",\"Capacitor_SMD/CP_Elec_5x3\",\"Capacitor_SMD/CP_Elec_5x4.4\",\"Capacitor_SMD/CP_Elec_5x4.5\",\"Capacitor_SMD/CP_Elec_5x5.3\",\"Capacitor_SMD/CP_Elec_5x5.4\",\"Capacitor_SMD/CP_Elec_5x5.7\",\"Capacitor_SMD/CP_Elec_5x5.8\",\"Capacitor_SMD/CP_Elec_5x5.9\",\"Capacitor_SMD/CP_Elec_6.3x3.9\",\"Capacitor_SMD/CP_Elec_6.3x3\",\"Capacitor_SMD/CP_Elec_6.3x4.5\",\"Capacitor_SMD/CP_Elec_6.3x4.9\",\"Capacitor_SMD/CP_Elec_6.3x5.2\",\"Capacitor_SMD/CP_Elec_6.3x5.3\",\"Capacitor_SMD/CP_Elec_6.3x5.4\",\"Capacitor_SMD/CP_Elec_6.3x5.4_Nichicon\",\"Capacitor_SMD/CP_Elec_6.3x5.7\",\"Capacitor_SMD/CP_Elec_6.3x5.8\",\"Capacitor_SMD/CP_Elec_6.3x5.9\",\"Capacitor_SMD/CP_Elec_6.3x7.7\",\"Capacitor_SMD/CP_Elec_6.3x9.9\",\"Capacitor_SMD/CP_Elec_8x10.5\",\"Capacitor_SMD/CP_Elec_8x10\",\"Capacitor_SMD/CP_Elec_8x11.9\",\"Capacitor_SMD/CP_Elec_8x5.4\",\"Capacitor_SMD/CP_Elec_8x6.2\",\"Capacitor_SMD/CP_Elec_8x6.5\",\"Capacitor_SMD/CP_Elec_8x6.7\",\"Capacitor_SMD/CP_Elec_8x6.9\",\"Capacitor_SMD/CP_Elec_CAP-XX_DMF3Zxxxxxxxx3D\",\"Capacitor_SMD/C_01005_0402Metric\",\"Capacitor_SMD/C_01005_0402Metric_Pad0.57x0.30mm_HandSolder\",\"Capacitor_SMD/C_0201_0603Metric\",\"Capacitor_SMD/C_0201_0603Metric_Pad0.64x0.40mm_HandSolder\",\"Capacitor_SMD/C_0402_1005Metric\",\"Capacitor_SMD/C_0402_1005Metric_Pad0.74x0.62mm_HandSolder\",\"Capacitor_SMD/C_0504_1310Metric\",\"Capacitor_SMD/C_0504_1310Metric_Pad0.83x1.28mm_HandSolder\",\"Capacitor_SMD/C_0603_1608Metric\",\"Capacitor_SMD/C_0603_1608Metric_Pad1.08x0.95mm_HandSolder\",\"Capacitor_SMD/C_0805_2012Metric\",\"Capacitor_SMD/C_0805_2012Metric_Pad1.18x1.45mm_HandSolder\",\"Capacitor_SMD/C_1206_3216Metric\",\"Capacitor_SMD/C_1206_3216Metric_Pad1.33x1.80mm_HandSolder\",\"Capacitor_SMD/C_1210_3225Metric\",\"Capacitor_SMD/C_1210_3225Metric_Pad1.33x2.70mm_HandSolder\",\"Capacitor_SMD/C_1808_4520Metric\",\"Capacitor_SMD/C_1808_4520Metric_Pad1.72x2.30mm_HandSolder\",\"Capacitor_SMD/C_1812_4532Metric\",\"Capacitor_SMD/C_1812_4532Metric_Pad1.57x3.40mm_HandSolder\",\"Capacitor_SMD/C_1825_4564Metric\",\"Capacitor_SMD/C_1825_4564Metric_Pad1.57x6.80mm_HandSolder\",\"Capacitor_SMD/C_2220_5750Metric\",\"Capacitor_SMD/C_2220_5750Metric_Pad1.97x5.40mm_HandSolder\",\"Capacitor_SMD/C_2225_5664Metric\",\"Capacitor_SMD/C_2225_5664Metric_Pad1.80x6.60mm_HandSolder\",\"Capacitor_SMD/C_3640_9110Metric\",\"Capacitor_SMD/C_3640_9110Metric_Pad2.10x10.45mm_HandSolder\",\"Capacitor_SMD/C_Elec_10x10.2\",\"Capacitor_SMD/C_Elec_3x5.4\",\"Capacitor_SMD/C_Elec_4x5.4\",\"Capacitor_SMD/C_Elec_4x5.8\",\"Capacitor_SMD/C_Elec_5x5.4\",\"Capacitor_SMD/C_Elec_5x5.8\",\"Capacitor_SMD/C_Elec_6.3x5.4\",\"Capacitor_SMD/C_Elec_6.3x5.8\",\"Capacitor_SMD/C_Elec_6.3x7.7\",\"Capacitor_SMD/C_Elec_8x10.2\",\"Capacitor_SMD/C_Elec_8x5.4\",\"Capacitor_SMD/C_Elec_8x6.2\",\"Capacitor_SMD/C_Trimmer_Murata_TZB4-A\",\"Capacitor_SMD/C_Trimmer_Murata_TZB4-B\",\"Capacitor_SMD/C_Trimmer_Murata_TZC3\",\"Capacitor_SMD/C_Trimmer_Murata_TZR1\",\"Capacitor_SMD/C_Trimmer_Murata_TZW4\",\"Capacitor_SMD/C_Trimmer_Murata_TZY2\",\"Capacitor_SMD/C_Trimmer_Sprague-Goodman_SGC3\",\"Capacitor_SMD/C_Trimmer_Voltronics_JN\",\"Capacitor_SMD/C_Trimmer_Voltronics_JQ\",\"Capacitor_SMD/C_Trimmer_Voltronics_JR\",\"Capacitor_SMD/C_Trimmer_Voltronics_JV\",\"Capacitor_SMD/C_Trimmer_Voltronics_JZ\",\"Capacitor_THT/CP_Axial_L10.0mm_D4.5mm_P15.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L10.0mm_D6.0mm_P15.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L11.0mm_D5.0mm_P18.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L11.0mm_D6.0mm_P18.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L11.0mm_D8.0mm_P15.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L18.0mm_D10.0mm_P25.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L18.0mm_D6.5mm_P25.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L18.0mm_D8.0mm_P25.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L20.0mm_D10.0mm_P26.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L20.0mm_D13.0mm_P26.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L21.0mm_D8.0mm_P28.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L25.0mm_D10.0mm_P30.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L26.5mm_D20.0mm_P33.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L29.0mm_D10.0mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L29.0mm_D13.0mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L29.0mm_D16.0mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L29.0mm_D20.0mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L30.0mm_D10.0mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L30.0mm_D12.5mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L30.0mm_D15.0mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L30.0mm_D18.0mm_P35.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L34.5mm_D20.0mm_P41.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L37.0mm_D13.0mm_P43.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L37.0mm_D16.0mm_P43.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L37.0mm_D20.0mm_P43.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L38.0mm_D18.0mm_P44.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L38.0mm_D21.0mm_P44.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L40.0mm_D16.0mm_P48.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L42.0mm_D23.0mm_P45.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L42.0mm_D26.0mm_P45.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L42.0mm_D29.0mm_P45.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L42.0mm_D32.0mm_P45.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L42.0mm_D35.0mm_P45.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L42.5mm_D20.0mm_P49.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L46.0mm_D20.0mm_P52.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L55.0mm_D23.0mm_P60.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L55.0mm_D26.0mm_P60.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L55.0mm_D29.0mm_P60.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L55.0mm_D32.0mm_P60.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L55.0mm_D35.0mm_P60.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L67.0mm_D23.0mm_P75.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L67.0mm_D26.0mm_P75.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L67.0mm_D29.0mm_P75.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L67.0mm_D32.0mm_P75.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L67.0mm_D35.0mm_P75.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L80.0mm_D23.0mm_P85.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L80.0mm_D26.0mm_P85.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L80.0mm_D29.0mm_P85.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L80.0mm_D32.0mm_P85.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L80.0mm_D35.0mm_P85.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L93.0mm_D23.0mm_P100.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L93.0mm_D26.0mm_P100.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L93.0mm_D29.0mm_P100.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L93.0mm_D32.0mm_P100.00mm_Horizontal\",\"Capacitor_THT/CP_Axial_L93.0mm_D35.0mm_P100.00mm_Horizontal\",\"Capacitor_THT/CP_Radial_D10.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_D10.0mm_P2.50mm_P5.00mm\",\"Capacitor_THT/CP_Radial_D10.0mm_P3.50mm\",\"Capacitor_THT/CP_Radial_D10.0mm_P3.80mm\",\"Capacitor_THT/CP_Radial_D10.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_D10.0mm_P5.00mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D10.0mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D12.5mm_P2.50mm\",\"Capacitor_THT/CP_Radial_D12.5mm_P5.00mm\",\"Capacitor_THT/CP_Radial_D12.5mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D13.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_D13.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_D13.0mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D14.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_D14.0mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D16.0mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D17.0mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D18.0mm_P7.50mm\",\"Capacitor_THT/CP_Radial_D22.0mm_P10.00mm_3pin_SnapIn\",\"Capacitor_THT/CP_Radial_D22.0mm_P10.00mm_SnapIn\",\"Capacitor_THT/CP_Radial_D24.0mm_P10.00mm_3pin_SnapIn\",\"Capacitor_THT/CP_Radial_D24.0mm_P10.00mm_SnapIn\",\"Capacitor_THT/CP_Radial_D25.0mm_P10.00mm_3pin_SnapIn\",\"Capacitor_THT/CP_Radial_D25.0mm_P10.00mm_SnapIn\",\"Capacitor_THT/CP_Radial_D26.0mm_P10.00mm_3pin_SnapIn\",\"Capacitor_THT/CP_Radial_D26.0mm_P10.00mm_SnapIn\",\"Capacitor_THT/CP_Radial_D30.0mm_P10.00mm_3pin_SnapIn\",\"Capacitor_THT/CP_Radial_D30.0mm_P10.00mm_SnapIn\",\"Capacitor_THT/CP_Radial_D35.0mm_P10.00mm_3pin_SnapIn\",\"Capacitor_THT/CP_Radial_D35.0mm_P10.00mm_SnapIn\",\"Capacitor_THT/CP_Radial_D4.0mm_P1.50mm\",\"Capacitor_THT/CP_Radial_D4.0mm_P2.00mm\",\"Capacitor_THT/CP_Radial_D40.0mm_P10.00mm_3pin_SnapIn\",\"Capacitor_THT/CP_Radial_D40.0mm_P10.00mm_SnapIn\",\"Capacitor_THT/CP_Radial_D5.0mm_P2.00mm\",\"Capacitor_THT/CP_Radial_D5.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_D6.3mm_P2.50mm\",\"Capacitor_THT/CP_Radial_D7.5mm_P2.50mm\",\"Capacitor_THT/CP_Radial_D8.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_D8.0mm_P3.50mm\",\"Capacitor_THT/CP_Radial_D8.0mm_P3.80mm\",\"Capacitor_THT/CP_Radial_D8.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D10.5mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D10.5mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D4.5mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D4.5mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D5.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D5.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D5.5mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D5.5mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D6.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D6.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D7.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D7.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D8.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D8.0mm_P5.00mm\",\"Capacitor_THT/CP_Radial_Tantal_D9.0mm_P2.50mm\",\"Capacitor_THT/CP_Radial_Tantal_D9.0mm_P5.00mm\",\"Capacitor_THT/C_Axial_L12.0mm_D10.5mm_P15.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D10.5mm_P20.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D6.5mm_P15.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D6.5mm_P20.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D7.5mm_P15.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D7.5mm_P20.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D8.5mm_P15.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D8.5mm_P20.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D9.5mm_P15.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L12.0mm_D9.5mm_P20.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L17.0mm_D6.5mm_P20.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L17.0mm_D6.5mm_P25.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L17.0mm_D7.0mm_P20.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L17.0mm_D7.0mm_P25.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L19.0mm_D7.5mm_P25.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L19.0mm_D8.0mm_P25.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L19.0mm_D9.0mm_P25.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L19.0mm_D9.5mm_P25.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L22.0mm_D10.5mm_P27.50mm_Horizontal\",\"Capacitor_THT/C_Axial_L22.0mm_D9.5mm_P27.50mm_Horizontal\",\"Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P10.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P12.50mm_Horizontal\",\"Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P15.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P7.50mm_Horizontal\",\"Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P10.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P12.50mm_Horizontal\",\"Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P15.00mm_Horizontal\",\"Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P7.50mm_Horizontal\",\"Capacitor_THT/C_Disc_D10.0mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D10.5mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D10.5mm_W5.0mm_P5.00mm\",\"Capacitor_THT/C_Disc_D10.5mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Disc_D11.0mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D11.0mm_W5.0mm_P5.00mm\",\"Capacitor_THT/C_Disc_D11.0mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Disc_D12.0mm_W4.4mm_P7.75mm\",\"Capacitor_THT/C_Disc_D12.5mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D12.5mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Disc_D14.5mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D14.5mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Disc_D16.0mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D16.0mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Disc_D3.0mm_W1.6mm_P2.50mm\",\"Capacitor_THT/C_Disc_D3.0mm_W2.0mm_P2.50mm\",\"Capacitor_THT/C_Disc_D3.4mm_W2.1mm_P2.50mm\",\"Capacitor_THT/C_Disc_D3.8mm_W2.6mm_P2.50mm\",\"Capacitor_THT/C_Disc_D4.3mm_W1.9mm_P5.00mm\",\"Capacitor_THT/C_Disc_D4.7mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D5.0mm_W2.5mm_P2.50mm\",\"Capacitor_THT/C_Disc_D5.0mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D5.1mm_W3.2mm_P5.00mm\",\"Capacitor_THT/C_Disc_D6.0mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D6.0mm_W4.4mm_P5.00mm\",\"Capacitor_THT/C_Disc_D7.0mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D7.5mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D7.5mm_W4.4mm_P5.00mm\",\"Capacitor_THT/C_Disc_D7.5mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D7.5mm_W5.0mm_P5.00mm\",\"Capacitor_THT/C_Disc_D7.5mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Disc_D8.0mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D8.0mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D8.0mm_W5.0mm_P5.00mm\",\"Capacitor_THT/C_Disc_D8.0mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Disc_D9.0mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Disc_D9.0mm_W5.0mm_P10.00mm\",\"Capacitor_THT/C_Disc_D9.0mm_W5.0mm_P5.00mm\",\"Capacitor_THT/C_Disc_D9.0mm_W5.0mm_P7.50mm\",\"Capacitor_THT/C_Radial_D10.0mm_H12.5mm_P5.00mm\",\"Capacitor_THT/C_Radial_D10.0mm_H16.0mm_P5.00mm\",\"Capacitor_THT/C_Radial_D10.0mm_H20.0mm_P5.00mm\",\"Capacitor_THT/C_Radial_D12.5mm_H20.0mm_P5.00mm\",\"Capacitor_THT/C_Radial_D12.5mm_H25.0mm_P5.00mm\",\"Capacitor_THT/C_Radial_D16.0mm_H25.0mm_P7.50mm\",\"Capacitor_THT/C_Radial_D16.0mm_H31.5mm_P7.50mm\",\"Capacitor_THT/C_Radial_D18.0mm_H35.5mm_P7.50mm\",\"Capacitor_THT/C_Radial_D4.0mm_H5.0mm_P1.50mm\",\"Capacitor_THT/C_Radial_D4.0mm_H7.0mm_P1.50mm\",\"Capacitor_THT/C_Radial_D5.0mm_H11.0mm_P2.00mm\",\"Capacitor_THT/C_Radial_D5.0mm_H5.0mm_P2.00mm\",\"Capacitor_THT/C_Radial_D5.0mm_H7.0mm_P2.00mm\",\"Capacitor_THT/C_Radial_D6.3mm_H11.0mm_P2.50mm\",\"Capacitor_THT/C_Radial_D6.3mm_H5.0mm_P2.50mm\",\"Capacitor_THT/C_Radial_D6.3mm_H7.0mm_P2.50mm\",\"Capacitor_THT/C_Radial_D8.0mm_H11.5mm_P3.50mm\",\"Capacitor_THT/C_Radial_D8.0mm_H7.0mm_P3.50mm\",\"Capacitor_THT/C_Rect_L10.0mm_W2.5mm_P7.50mm_MKS4\",\"Capacitor_THT/C_Rect_L10.0mm_W3.0mm_P7.50mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L10.0mm_W3.0mm_P7.50mm_MKS4\",\"Capacitor_THT/C_Rect_L10.0mm_W4.0mm_P7.50mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L10.0mm_W4.0mm_P7.50mm_MKS4\",\"Capacitor_THT/C_Rect_L10.0mm_W5.0mm_P5.00mm_P7.50mm\",\"Capacitor_THT/C_Rect_L10.3mm_W4.5mm_P7.50mm_MKS4\",\"Capacitor_THT/C_Rect_L10.3mm_W5.0mm_P7.50mm_MKS4\",\"Capacitor_THT/C_Rect_L10.3mm_W5.7mm_P7.50mm_MKS4\",\"Capacitor_THT/C_Rect_L10.3mm_W7.2mm_P7.50mm_MKS4\",\"Capacitor_THT/C_Rect_L11.0mm_W2.8mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W3.4mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W3.5mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W4.2mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W4.3mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W5.1mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W5.3mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W6.3mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W6.4mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W7.3mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.0mm_W8.8mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W2.0mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W2.6mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W2.8mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W3.2mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W3.5mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W3.6mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W4.0mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W4.3mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W4.5mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W5.0mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W5.1mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W5.2mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W5.6mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W6.4mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W6.6mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W6.9mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W7.3mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W7.5mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W7.8mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W8.0mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W8.8mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W9.5mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L11.5mm_W9.8mm_P10.00mm_MKT\",\"Capacitor_THT/C_Rect_L13.0mm_W3.0mm_P10.00mm_FKS3_FKP3_MKS4\",\"Capacitor_THT/C_Rect_L13.0mm_W4.0mm_P10.00mm_FKS3_FKP3_MKS4\",\"Capacitor_THT/C_Rect_L13.0mm_W5.0mm_P10.00mm_FKS3_FKP3_MKS4\",\"Capacitor_THT/C_Rect_L13.0mm_W6.0mm_P10.00mm_FKS3_FKP3_MKS4\",\"Capacitor_THT/C_Rect_L13.0mm_W6.5mm_P7.50mm_P10.00mm\",\"Capacitor_THT/C_Rect_L13.0mm_W8.0mm_P10.00mm_FKS3_FKP3_MKS4\",\"Capacitor_THT/C_Rect_L13.5mm_W4.0mm_P10.00mm_FKS3_FKP3_MKS4\",\"Capacitor_THT/C_Rect_L13.5mm_W5.0mm_P10.00mm_FKS3_FKP3_MKS4\",\"Capacitor_THT/C_Rect_L16.5mm_W10.7mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W10.9mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W11.2mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W11.8mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W13.5mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W13.7mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W13.9mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W4.7mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W4.9mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W5.0mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W6.0mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W7.0mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W7.3mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W8.7mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W8.9mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W9.0mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L16.5mm_W9.2mm_P15.00mm_MKT\",\"Capacitor_THT/C_Rect_L18.0mm_W11.0mm_P15.00mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L18.0mm_W5.0mm_P15.00mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L18.0mm_W6.0mm_P15.00mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L18.0mm_W7.0mm_P15.00mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L18.0mm_W8.0mm_P15.00mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L18.0mm_W9.0mm_P15.00mm_FKS3_FKP3\",\"Capacitor_THT/C_Rect_L19.0mm_W11.0mm_P15.00mm_MKS4\",\"Capacitor_THT/C_Rect_L19.0mm_W5.0mm_P15.00mm_MKS4\",\"Capacitor_THT/C_Rect_L19.0mm_W6.0mm_P15.00mm_MKS4\",\"Capacitor_THT/C_Rect_L19.0mm_W7.0mm_P15.00mm_MKS4\",\"Capacitor_THT/C_Rect_L19.0mm_W8.0mm_P15.00mm_MKS4\",\"Capacitor_THT/C_Rect_L19.0mm_W9.0mm_P15.00mm_MKS4\",\"Capacitor_THT/C_Rect_L24.0mm_W10.1mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W10.3mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W10.9mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W12.2mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W12.6mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W12.8mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W7.0mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W8.3mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L24.0mm_W8.6mm_P22.50mm_MKT\",\"Capacitor_THT/C_Rect_L26.5mm_W10.5mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L26.5mm_W11.5mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L26.5mm_W5.0mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L26.5mm_W6.0mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L26.5mm_W7.0mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L26.5mm_W8.5mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L27.0mm_W11.0mm_P22.00mm\",\"Capacitor_THT/C_Rect_L27.0mm_W9.0mm_P22.00mm\",\"Capacitor_THT/C_Rect_L27.0mm_W9.0mm_P23.00mm\",\"Capacitor_THT/C_Rect_L28.0mm_W10.0mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L28.0mm_W12.0mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L28.0mm_W8.0mm_P22.50mm_MKS4\",\"Capacitor_THT/C_Rect_L29.0mm_W11.0mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W11.9mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W12.2mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W13.0mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W13.8mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W14.2mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W16.0mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W7.6mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W7.8mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W7.9mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W9.1mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L29.0mm_W9.6mm_P27.50mm_MKT\",\"Capacitor_THT/C_Rect_L31.5mm_W11.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L31.5mm_W13.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L31.5mm_W15.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L31.5mm_W17.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L31.5mm_W20.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L31.5mm_W9.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L32.0mm_W15.0mm_P27.00mm\",\"Capacitor_THT/C_Rect_L33.0mm_W13.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L33.0mm_W15.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L33.0mm_W20.0mm_P27.50mm_MKS4\",\"Capacitor_THT/C_Rect_L4.0mm_W2.5mm_P2.50mm\",\"Capacitor_THT/C_Rect_L4.6mm_W2.0mm_P2.50mm_MKS02_FKP02\",\"Capacitor_THT/C_Rect_L4.6mm_W3.0mm_P2.50mm_MKS02_FKP02\",\"Capacitor_THT/C_Rect_L4.6mm_W3.8mm_P2.50mm_MKS02_FKP02\",\"Capacitor_THT/C_Rect_L4.6mm_W4.6mm_P2.50mm_MKS02_FKP02\",\"Capacitor_THT/C_Rect_L4.6mm_W5.5mm_P2.50mm_MKS02_FKP02\",\"Capacitor_THT/C_Rect_L41.5mm_W11.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W13.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W15.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W17.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W19.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W20.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W24.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W31.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W35.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W40.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L41.5mm_W9.0mm_P37.50mm_MKS4\",\"Capacitor_THT/C_Rect_L7.0mm_W2.0mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.0mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.0mm_W3.5mm_P2.50mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.0mm_W3.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.0mm_W4.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.0mm_W6.0mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.0mm_W6.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.2mm_W11.0mm_P5.00mm_FKS2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.2mm_W2.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.2mm_W2.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.2mm_W3.0mm_P5.00mm_FKS2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.2mm_W3.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.2mm_W3.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.2mm_W4.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.2mm_W4.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.2mm_W5.0mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.2mm_W5.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.2mm_W6.0mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.2mm_W7.2mm_P5.00mm\",\"Capacitor_THT/C_Rect_L7.2mm_W7.2mm_P5.00mm_FKS2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.2mm_W8.5mm_P5.00mm_FKP2_FKP2_MKS2_MKP2\",\"Capacitor_THT/C_Rect_L7.5mm_W6.5mm_P5.00mm\",\"Capacitor_THT/C_Rect_L9.0mm_W2.5mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W2.6mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W2.7mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W3.2mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W3.3mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W3.4mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W3.6mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W3.8mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W3.9mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W4.0mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W4.2mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W4.9mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W5.1mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W5.7mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W6.4mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W6.7mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W7.7mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W8.5mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W9.5mm_P7.50mm_MKT\",\"Capacitor_THT/C_Rect_L9.0mm_W9.8mm_P7.50mm_MKT\",\"Capacitor_THT/DX_5R5HxxxxU_D11.5mm_P10.00mm\",\"Capacitor_THT/DX_5R5VxxxxU_D11.5mm_P5.00mm\",\"Capacitor_THT/DX_5R5VxxxxU_D19.0mm_P5.00mm\",\"Capacitor_Tantalum_SMD/CP_EIA-1608-08_AVX-J\",\"Capacitor_Tantalum_SMD/CP_EIA-1608-08_AVX-J_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-1608-10_AVX-L\",\"Capacitor_Tantalum_SMD/CP_EIA-1608-10_AVX-L_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-2012-12_Kemet-R\",\"Capacitor_Tantalum_SMD/CP_EIA-2012-12_Kemet-R_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-2012-15_AVX-P\",\"Capacitor_Tantalum_SMD/CP_EIA-2012-15_AVX-P_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-3216-10_Kemet-I\",\"Capacitor_Tantalum_SMD/CP_EIA-3216-10_Kemet-I_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-3216-12_Kemet-S\",\"Capacitor_Tantalum_SMD/CP_EIA-3216-12_Kemet-S_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-3216-18_Kemet-A\",\"Capacitor_Tantalum_SMD/CP_EIA-3216-18_Kemet-A_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-3528-12_Kemet-T\",\"Capacitor_Tantalum_SMD/CP_EIA-3528-12_Kemet-T_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-3528-15_AVX-H\",\"Capacitor_Tantalum_SMD/CP_EIA-3528-15_AVX-H_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-3528-21_Kemet-B\",\"Capacitor_Tantalum_SMD/CP_EIA-3528-21_Kemet-B_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-6032-15_Kemet-U\",\"Capacitor_Tantalum_SMD/CP_EIA-6032-15_Kemet-U_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-6032-20_AVX-F\",\"Capacitor_Tantalum_SMD/CP_EIA-6032-20_AVX-F_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-6032-28_Kemet-C\",\"Capacitor_Tantalum_SMD/CP_EIA-6032-28_Kemet-C_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7132-20_AVX-U\",\"Capacitor_Tantalum_SMD/CP_EIA-7132-20_AVX-U_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7132-28_AVX-C\",\"Capacitor_Tantalum_SMD/CP_EIA-7132-28_AVX-C_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-15_AVX-R\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-15_AVX-R_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-20_AVX-M\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-20_AVX-M_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-28_AVX-M\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-28_AVX-M_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-38_AVX-R\",\"Capacitor_Tantalum_SMD/CP_EIA-7260-38_AVX-R_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-15_Kemet-W\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-15_Kemet-W_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-20_Kemet-V\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-20_Kemet-V_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-30_AVX-N\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-30_AVX-N_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-31_Kemet-D\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-31_Kemet-D_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-40_Kemet-Y\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-40_Kemet-Y_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-43_Kemet-X\",\"Capacitor_Tantalum_SMD/CP_EIA-7343-43_Kemet-X_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7360-38_Kemet-E\",\"Capacitor_Tantalum_SMD/CP_EIA-7360-38_Kemet-E_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7361-38_AVX-V\",\"Capacitor_Tantalum_SMD/CP_EIA-7361-38_AVX-V_HandSolder\",\"Capacitor_Tantalum_SMD/CP_EIA-7361-438_AVX-U\",\"Capacitor_Tantalum_SMD/CP_EIA-7361-438_AVX-U_HandSolder\",\"Connector/BJB_Pico_46.110.1001_Receptacle_Horizontal\",\"Connector/Banana_Cliff_FCR7350B_S16N-PC_Horizontal\",\"Connector/Banana_Cliff_FCR7350G_S16N-PC_Horizontal\",\"Connector/Banana_Cliff_FCR7350L_S16N-PC_Horizontal\",\"Connector/Banana_Cliff_FCR7350N_S16N-PC_Horizontal\",\"Connector/Banana_Cliff_FCR7350R_S16N-PC_Horizontal\",\"Connector/Banana_Cliff_FCR7350Y_S16N-PC_Horizontal\",\"Connector/Banana_Jack_1Pin\",\"Connector/Banana_Jack_2Pin\",\"Connector/Banana_Jack_3Pin\",\"Connector/CUI_PD-30\",\"Connector/CUI_PD-30S\",\"Connector/CUI_PD-30S_CircularHoles\",\"Connector/CalTest_CT3151\",\"Connector/Conn_C14_Receptacle_RightAngle_Schurter_DD21.01xx\",\"Connector/Connector_SFP_and_Cage\",\"Connector/DTF13-12Px\",\"Connector/FanPinHeader_1x03_P2.54mm_Vertical\",\"Connector/FanPinHeader_1x04_P2.54mm_Vertical\",\"Connector/GB042-34S-H10\",\"Connector/IHI_B6A-PCB-45_Vertical\",\"Connector/JWT_A3963_1x02_P3.96mm_Vertical\",\"Connector/Joint-Tech_C5080WR-04P_1x04_P5.08mm_Vertical\",\"Connector/NS-Tech_Grove_1x04_P2mm_Vertical\",\"Connector/OCN_OK-01GM030-04_2x15_P0.4mm_Vertical\",\"Connector/SpringContact_Harwin_S1941-46R\",\"Connector/Tag-Connect_TC2030-IDC-FP_2x03_P1.27mm_Vertical\",\"Connector/Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_Vertical\",\"Connector/Tag-Connect_TC2050-IDC-FP_2x05_P1.27mm_Vertical\",\"Connector/Tag-Connect_TC2050-IDC-NL_2x05_P1.27mm_Vertical\",\"Connector/Tag-Connect_TC2050-IDC-NL_2x05_P1.27mm_Vertical_with_bottom_clip\",\"Connector/Tag-Connect_TC2070-IDC-FP_2x07_P1.27mm_Vertical\",\"Connector_AMASS/AMASS_MR30PW-FB_1x03_P3.50mm_Horizontal\",\"Connector_AMASS/AMASS_MR30PW-M_1x03_P3.50mm_Horizontal\",\"Connector_AMASS/AMASS_XT30PW-F_1x02_P2.50mm_Horizontal\",\"Connector_AMASS/AMASS_XT30PW-M_1x02_P2.50mm_Horizontal\",\"Connector_AMASS/AMASS_XT30U-F_1x02_P5.0mm_Vertical\",\"Connector_AMASS/AMASS_XT30U-M_1x02_P5.0mm_Vertical\",\"Connector_AMASS/AMASS_XT30UPB-F_1x02_P5.0mm_Vertical\",\"Connector_AMASS/AMASS_XT30UPB-M_1x02_P5.0mm_Vertical\",\"Connector_AMASS/AMASS_XT60-F_1x02_P7.20mm_Vertical\",\"Connector_AMASS/AMASS_XT60-M_1x02_P7.20mm_Vertical\",\"Connector_AMASS/AMASS_XT60IPW-M_1x03_P7.20mm_Horizontal\",\"Connector_AMASS/AMASS_XT60PW-F_1x02_P7.20mm_Horizontal\",\"Connector_AMASS/AMASS_XT60PW-M_1x02_P7.20mm_Horizontal\",\"Connector_AMASS/AMASS_XT90PW-M_1x02_P10.90mm_Horizontal\",\"Connector_Amphenol/Amphenol_M8S-03PMMR-SF8001\",\"Connector_Audio/Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ-3524-SMT_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3513N_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3514N_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3515N_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3523N_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3524N_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3525N_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3533NG_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3533NG_Horizontal_CircularHoles\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3535NG_Horizontal\",\"Connector_Audio/Jack_3.5mm_CUI_SJ1-3535NG_Horizontal_CircularHoles\",\"Connector_Audio/Jack_3.5mm_CUI_SJ2-3593D-SMT_Horizontal\",\"Connector_Audio/Jack_3.5mm_KoreanHropartsElec_PJ-320D-4A_Horizontal\",\"Connector_Audio/Jack_3.5mm_Ledino_KB3SPRS_Horizontal\",\"Connector_Audio/Jack_3.5mm_Lumberg_1503_02_Horizontal\",\"Connector_Audio/Jack_3.5mm_Lumberg_1503_03_Horizontal\",\"Connector_Audio/Jack_3.5mm_Lumberg_1503_07_Horizontal\",\"Connector_Audio/Jack_3.5mm_PJ31060-I_Horizontal\",\"Connector_Audio/Jack_3.5mm_PJ311_Horizontal\",\"Connector_Audio/Jack_3.5mm_PJ320D_Horizontal\",\"Connector_Audio/Jack_3.5mm_PJ320E_Horizontal\",\"Connector_Audio/Jack_3.5mm_QingPu_WQP-PJ398SM_Vertical_CircularHoles\",\"Connector_Audio/Jack_3.5mm_Switronic_ST-005-G_horizontal\",\"Connector_Audio/Jack_3.5mm_Technik_TWP-3002_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NJ2FD-V_Vertical\",\"Connector_Audio/Jack_6.35mm_Neutrik_NJ3FD-V_Vertical\",\"Connector_Audio/Jack_6.35mm_Neutrik_NJ5FD-V_Vertical\",\"Connector_Audio/Jack_6.35mm_Neutrik_NJ6FD-V_Vertical\",\"Connector_Audio/Jack_6.35mm_Neutrik_NJ6TB-V_Vertical\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HCD2_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HFD2_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HFD3_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HHD2_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HCD2_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HCD3_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD2-AU_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD2_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD3_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD4_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HHD2_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ3HF-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HF-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HF_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HH-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HH_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF-1-AU_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF-AU_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HH-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HH-AU_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HH_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HM-1-AU_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HM-1-PRE_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HM-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HC_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HF-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HH-1_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HL_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NSJ8HC_Horizontal\",\"Connector_Audio/Jack_6.35mm_Neutrik_NSJ8HL_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-H-0_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-H_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-V-0_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-V_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-H-0_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-H_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-V-0_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-V_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-H-0_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-H-DA_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-H_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-V-0_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-V-DA_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-V_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-H-0_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-H_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-V-0_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-V_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-H-0_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-H_Horizontal\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-V-0_Vertical\",\"Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-V_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAH-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAH1-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAH1-DA_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAH1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAH2-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAH2_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAV-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAV1-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAV1-DA_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAV1_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAV2-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAV2_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH1-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH1-DA_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH2-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH2-DA_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH2_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHL-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHL1-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHL1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHR-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHR1-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHR1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHR2-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAHR2_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV1-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV1-DA_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV1_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV2-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV2-DA_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV2_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH1-B_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH1-DA_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH1-E_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH2-B_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH2-DA_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH2-E_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBH2_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBHL1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV1-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV1-B_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV1-DA_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV1_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV2-B_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV2-DA_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV2-SW_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3FBV2_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAAH-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAAH-1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAAV-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAAV-1_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAFH-PH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAH-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAHL_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAHR_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAMH-PH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAV-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBH-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBH-1_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBH-B_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBH-E_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBHL-B_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBHL_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBHR-B_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBHR_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBV-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBV-1_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBV-B_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBV-E_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBV-SW_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC3MBV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC4FAH-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC4FAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC4FAV-0_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC4FAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC4FBH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC4FBV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC4MAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC4MAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC4MBH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC4MBV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FAH-0_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FAH-DA_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FAV-DA_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FAV-SW_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FBH-B_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FBH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FBV-B_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FBV-SW_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5FBV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MAH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MAV-SW_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MAV_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MBH-B_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MBH_Horizontal\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MBV-B_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MBV-SW_Vertical\",\"Connector_Audio/Jack_XLR_Neutrik_NC5MBV_Vertical\",\"Connector_Audio/Jack_speakON-6.35mm_Neutrik_NLJ2MDXX-H_Horizontal\",\"Connector_Audio/Jack_speakON-6.35mm_Neutrik_NLJ2MDXX-V_Vertical\",\"Connector_Audio/Jack_speakON_Neutrik_NL2MDXX-H-3_Horizontal\",\"Connector_Audio/Jack_speakON_Neutrik_NL2MDXX-V_Vertical\",\"Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-H-2_Horizontal\",\"Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-H-3_Horizontal\",\"Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-V-2_Vertical\",\"Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-V-3_Vertical\",\"Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-V_Vertical\",\"Connector_Audio/Jack_speakON_Neutrik_NL8MDXX-V-3_Vertical\",\"Connector_Audio/Jack_speakON_Neutrik_NL8MDXX-V_Vertical\",\"Connector_Audio/Jack_speakON_Neutrik_NLT4MD-V_Vertical\",\"Connector_Audio/MiniXLR-5_Switchcraft_TRAPC_Horizontal\",\"Connector_Audio/Plug_3.5mm_CUI_SP-3541\",\"Connector_BarrelJack/BarrelJack_CLIFF_FC681465S_SMT_Horizontal\",\"Connector_BarrelJack/BarrelJack_CUI_PJ-036AH-SMT_Horizontal\",\"Connector_BarrelJack/BarrelJack_CUI_PJ-063AH_Horizontal\",\"Connector_BarrelJack/BarrelJack_CUI_PJ-063AH_Horizontal_CircularHoles\",\"Connector_BarrelJack/BarrelJack_CUI_PJ-079BH_Horizontal\",\"Connector_BarrelJack/BarrelJack_CUI_PJ-102AH_Horizontal\",\"Connector_BarrelJack/BarrelJack_GCT_DCJ200-10-A_Horizontal\",\"Connector_BarrelJack/BarrelJack_Horizontal\",\"Connector_BarrelJack/BarrelJack_Kycon_KLDX-0202-xC_Horizontal\",\"Connector_BarrelJack/BarrelJack_SwitchcraftConxall_RAPC10U_Horizontal\",\"Connector_BarrelJack/BarrelJack_Wuerth_694102107102_1.0x3.9mm\",\"Connector_BarrelJack/BarrelJack_Wuerth_694103107102_1.35x3.9mm\",\"Connector_BarrelJack/BarrelJack_Wuerth_694106106102_2.0x5.5mm\",\"Connector_BarrelJack/BarrelJack_Wuerth_694108106102_2.5x5.5mm\",\"Connector_BarrelJack/BarrelJack_Wuerth_6941xx301002\",\"Connector_Card/CF-Card_3M_N7E50-A516xx-30\",\"Connector_Card/CF-Card_3M_N7E50-E516xx-30\",\"Connector_Card/SD-SIM_microSD-microSIM_Molex_104168-1620\",\"Connector_Card/SD_Card_Device_16mm_SlotDepth\",\"Connector_Card/SD_Hirose_DM1AA_SF_PEJ82\",\"Connector_Card/SD_Kyocera_145638009211859+\",\"Connector_Card/SD_Kyocera_145638009511859+\",\"Connector_Card/SD_Kyocera_145638109211859+\",\"Connector_Card/SD_Kyocera_145638109511859+\",\"Connector_Card/SD_TE_2041021\",\"Connector_Card/microSD_HC_Hirose_DM3AT-SF-PEJM5\",\"Connector_Card/microSD_HC_Hirose_DM3BT-DSF-PEJS\",\"Connector_Card/microSD_HC_Hirose_DM3D-SF\",\"Connector_Card/microSD_HC_Molex_104031-0811\",\"Connector_Card/microSD_HC_Molex_47219-2001\",\"Connector_Card/microSD_HC_Wuerth_693072010801\",\"Connector_Card/microSIM_JAE_SF53S006VCBR2000\",\"Connector_Card/nanoSIM_GCT_SIM8060-6-0-14-00\",\"Connector_Card/nanoSIM_GCT_SIM8060-6-1-14-00\",\"Connector_Card/nanoSIM_Hinged_CUI_NSIM-2-C\",\"Connector_Coaxial/BNC_Amphenol_031-5539_Vertical\",\"Connector_Coaxial/BNC_Amphenol_031-6575_Horizontal\",\"Connector_Coaxial/BNC_Amphenol_B6252HB-NPP3G-50_Horizontal\",\"Connector_Coaxial/BNC_PanelMountable_Vertical\",\"Connector_Coaxial/BNC_TEConnectivity_1478035_Horizontal\",\"Connector_Coaxial/BNC_TEConnectivity_1478204_Vertical\",\"Connector_Coaxial/BNC_Win_364A2x95_Horizontal\",\"Connector_Coaxial/CoaxialSwitch_Hirose_MS-156C3_Horizontal\",\"Connector_Coaxial/LEMO-EPG.00.302.NLN\",\"Connector_Coaxial/LEMO-EPL.00.250.NTN\",\"Connector_Coaxial/MMCX_Molex_73415-0961_Horizontal_0.8mm-PCB\",\"Connector_Coaxial/MMCX_Molex_73415-0961_Horizontal_1.0mm-PCB\",\"Connector_Coaxial/MMCX_Molex_73415-0961_Horizontal_1.6mm-PCB\",\"Connector_Coaxial/MMCX_Molex_73415-1471_Vertical\",\"Connector_Coaxial/SMA_Amphenol_132134-10_Vertical\",\"Connector_Coaxial/SMA_Amphenol_132134-11_Vertical\",\"Connector_Coaxial/SMA_Amphenol_132134-14_Vertical\",\"Connector_Coaxial/SMA_Amphenol_132134-16_Vertical\",\"Connector_Coaxial/SMA_Amphenol_132134_Vertical\",\"Connector_Coaxial/SMA_Amphenol_132203-12_Horizontal\",\"Connector_Coaxial/SMA_Amphenol_132289_EdgeMount\",\"Connector_Coaxial/SMA_Amphenol_132291-12_Vertical\",\"Connector_Coaxial/SMA_Amphenol_132291_Vertical\",\"Connector_Coaxial/SMA_Amphenol_901-143_Horizontal\",\"Connector_Coaxial/SMA_Amphenol_901-144_Vertical\",\"Connector_Coaxial/SMA_BAT_Wireless_BWSMA-KWE-Z001\",\"Connector_Coaxial/SMA_Molex_73251-1153_EdgeMount_Horizontal\",\"Connector_Coaxial/SMA_Molex_73251-2120_EdgeMount_Horizontal\",\"Connector_Coaxial/SMA_Molex_73251-2200_Horizontal\",\"Connector_Coaxial/SMA_Samtec_SMA-J-P-H-ST-EM1_EdgeMount\",\"Connector_Coaxial/SMA_Wurth_60312002114503_Vertical\",\"Connector_Coaxial/SMA_Wurth_60312102114405_Vertical\",\"Connector_Coaxial/SMB_Jack_Vertical\",\"Connector_Coaxial/U.FL_Hirose_U.FL-R-SMT-1_Vertical\",\"Connector_Coaxial/U.FL_Molex_MCRF_73412-0110_Vertical\",\"Connector_Coaxial/WR-MMCX_Wuerth_66011102111302_Horizontal\",\"Connector_Coaxial/WR-MMCX_Wuerth_66012102111404_Vertical\",\"Connector_DIN/DIN41612_B2_2x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_B2_2x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_B2_2x8_Female_Vertical_THT\",\"Connector_DIN/DIN41612_B2_2x8_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_B3_2x10_Female_Vertical_THT\",\"Connector_DIN/DIN41612_B3_2x10_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_B3_2x5_Female_Vertical_THT\",\"Connector_DIN/DIN41612_B3_2x5_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_B_1x32_Female_Vertical_THT\",\"Connector_DIN/DIN41612_B_1x32_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_B_2x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_B_2x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_B_2x32_Female_Vertical_THT\",\"Connector_DIN/DIN41612_B_2x32_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C2_2x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C2_2x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C2_3x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C2_3x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C3_2x10_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C3_2x10_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C3_3x10_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C3_3x10_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C_1x32_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C_1x32_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C_2x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C_2x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C_2x32_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C_2x32_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C_3x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C_3x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_C_3x32_Female_Vertical_THT\",\"Connector_DIN/DIN41612_C_3x32_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_D_2x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_D_2x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_D_2x8_Female_Vertical_THT\",\"Connector_DIN/DIN41612_D_2x8_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_E_2x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_E_2x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_E_2x16_RowsAC_Female_Vertical_THT\",\"Connector_DIN/DIN41612_E_2x16_RowsAC_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_E_3x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_E_3x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_F_2x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_F_2x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_F_2x16_RowsZD_Female_Vertical_THT\",\"Connector_DIN/DIN41612_F_2x16_RowsZD_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_F_3x16_Female_Vertical_THT\",\"Connector_DIN/DIN41612_F_3x16_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_M-flat_3x14+6_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M-flat_3x20+4_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M-flat_3x26+2_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M-flat_3x8+8_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M-invers_3x14+6_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_M-invers_3x14+6_Male_Vertical_THT\",\"Connector_DIN/DIN41612_M-invers_3x2+10_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_M-invers_3x2+10_Male_Vertical_THT\",\"Connector_DIN/DIN41612_M-invers_3x20+4_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_M-invers_3x20+4_Male_Vertical_THT\",\"Connector_DIN/DIN41612_M-invers_3x26+2_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_M-invers_3x26+2_Male_Vertical_THT\",\"Connector_DIN/DIN41612_M-invers_3x8+8_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_M-invers_3x8+8_Male_Vertical_THT\",\"Connector_DIN/DIN41612_M_3x14+6_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M_3x14+6_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_M_3x20+4_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M_3x20+4_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_M_3x26+2_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M_3x26+2_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_M_3x8+8_Female_Vertical_THT\",\"Connector_DIN/DIN41612_M_3x8+8_Male_Horizontal_THT\",\"Connector_DIN/DIN41612_Q2_2x16_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_Q2_2x16_Male_Vertical_THT\",\"Connector_DIN/DIN41612_Q3_2x10_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_Q3_2x10_Male_Vertical_THT\",\"Connector_DIN/DIN41612_Q_2x32_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_Q_2x32_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R2_2x16_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R2_2x16_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R2_3x16_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R2_3x16_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R3_2x10_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R3_2x10_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R3_3x10_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R3_3x10_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R_1x32_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R_1x32_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R_2x16_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R_2x16_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R_2x32_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R_2x32_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R_3x16_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R_3x16_Male_Vertical_THT\",\"Connector_DIN/DIN41612_R_3x32_Female_Horizontal_THT\",\"Connector_DIN/DIN41612_R_3x32_Male_Vertical_THT\",\"Connector_Dsub/DSUB-15-HD_Pins_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-15-HD_Pins_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-15-HD_Pins_Vertical_P2.29x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-15-HD_Socket_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-15-HD_Socket_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-15-HD_Socket_Vertical_P2.29x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-15_Pins_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-15_Pins_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-15_Pins_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_Dsub/DSUB-15_Socket_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-15_Socket_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-15_Socket_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_Dsub/DSUB-25_Pins_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-25_Pins_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-25_Pins_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_Dsub/DSUB-25_Socket_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-25_Socket_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-25_Socket_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_Dsub/DSUB-26-HD_Pins_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-26-HD_Pins_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-26-HD_Pins_Vertical_P2.29x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-26-HD_Socket_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-26-HD_Socket_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-26-HD_Socket_Vertical_P2.29x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-37_Pins_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-37_Pins_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-37_Pins_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_Dsub/DSUB-37_Socket_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-37_Socket_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-37_Socket_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_Dsub/DSUB-44-HD_Pins_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-44-HD_Pins_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-44-HD_Pins_Vertical_P2.29x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-44-HD_Socket_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-44-HD_Socket_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-44-HD_Socket_Vertical_P2.29x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-62-HD_Pins_Horizontal_P2.41x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-62-HD_Pins_Horizontal_P2.41x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-62-HD_Pins_Vertical_P2.41x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-62-HD_Socket_Horizontal_P2.41x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-62-HD_Socket_Horizontal_P2.41x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm\",\"Connector_Dsub/DSUB-62-HD_Socket_Vertical_P2.41x1.98mm_MountingHoles\",\"Connector_Dsub/DSUB-9_Pins_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-9_Pins_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-9_Pins_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_Dsub/DSUB-9_Socket_EdgeMount_P2.77mm\",\"Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm\",\"Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm\",\"Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm\",\"Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm\",\"Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm\",\"Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm\",\"Connector_Dsub/DSUB-9_Socket_Vertical_P2.77x2.84mm\",\"Connector_Dsub/DSUB-9_Socket_Vertical_P2.77x2.84mm_MountingHoles\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11004_1x04-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11005_1x05-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11006_1x06-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11007_1x07-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11008_1x08-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11009_1x09-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11010_1x10-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11011_1x11-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11012_1x12-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11013_1x13-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11014_1x14-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11015_1x15-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11016_1x16-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11017_1x17-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11018_1x18-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11019_1x19-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11020_1x20-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11021_1x21-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11022_1x22-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11023_1x23-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11024_1x24-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11025_1x25-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11026_1x26-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11027_1x27-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11028_1x28-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11029_1x29-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11030_1x30-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11031_1x31-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11032_1x32-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11033_1x33-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11034_1x34-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11035_1x35-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11036_1x36-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11037_1x37-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11038_1x38-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11039_1x39-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11040_1x40-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11041_1x41-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11042_1x42-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11043_1x43-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11044_1x44-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11045_1x45-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11046_1x46-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11047_1x47-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11048_1x48-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11049_1x49-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11050_1x50-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11051_1x51-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11052_1x52-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11053_1x53-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11054_1x54-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11055_1x55-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11056_1x56-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11057_1x57-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11058_1x58-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11059_1x59-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11060_1x60-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11004_1x04-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11005_1x05-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11006_1x06-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11007_1x07-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11008_1x08-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11009_1x09-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11010_1x10-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11011_1x11-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11012_1x12-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11013_1x13-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11014_1x14-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11015_1x15-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11016_1x16-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11017_1x17-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11018_1x18-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11019_1x19-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11020_1x20-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11021_1x21-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11022_1x22-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11023_1x23-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11024_1x24-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11025_1x25-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11026_1x26-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11027_1x27-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11028_1x28-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11029_1x29-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11030_1x30-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11031_1x31-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11032_1x32-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11033_1x33-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11034_1x34-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11035_1x35-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11036_1x36-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11037_1x37-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11038_1x38-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11039_1x39-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11040_1x40-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11041_1x41-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11042_1x42-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11043_1x43-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11044_1x44-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11045_1x45-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11046_1x46-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11047_1x47-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11048_1x48-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11049_1x49-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11050_1x50-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11051_1x51-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11052_1x52-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11053_1x53-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11054_1x54-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11055_1x55-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11056_1x56-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11057_1x57-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11058_1x58-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11059_1x59-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Amphenol_F32R-1A7x1-11060_1x60-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-10S-0.5SH_1x10-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-11S-0.5SH_1x11-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-12S-0.5SH_1x12-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-13S-0.5SH_1x13-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-14S-0.5SH_1x14-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-15S-0.5SH_1x15-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-16S-0.5SH_1x16-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-17S-0.5SH_1x17-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-18S-0.5SH_1x18-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-19S-0.5SH_1x19-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-20S-0.5SH_1x20-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-22S-0.5SH_1x22-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-24S-0.5SH_1x24-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-25S-0.5SH_1x25-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-26S-0.5SH_1x26-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-28S-0.5SH_1x28-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-30S-0.5SH_1x30-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-32S-0.5SH_1x32-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-33S-0.5SH_1x33-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-34S-0.5SH_1x34-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-35S-0.5SH_1x35-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-36S-0.5SH_1x36-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-40S-0.5SH_1x40-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-45S-0.5SH_1x45-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-50S-0.5SH_1x50-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-53S-0.5SH_1x53-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-6S-0.5SH_1x06-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH12-8S-0.5SH_1x08-1MP_P0.50mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-13S-0.3SHW_2Rows-13Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-15S-0.3SHW_2Rows-15Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-17S-0.3SHW_2Rows-17Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-19S-0.3SHW_2Rows-19Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-21S-0.3SHW_2Rows-21Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-23S-0.3SHW_2Rows-23Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-25S-0.3SHW_2Rows-25Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-27S-0.3SHW_2Rows-27Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-29S-0.3SHW_2Rows-29Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-31S-0.3SHW_2Rows-31Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-33S-0.3SHW_2Rows-33Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-35S-0.3SHW_2Rows-35Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-37S-0.3SHW_2Rows-37Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-39S-0.3SHW_2Rows-39Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-41S-0.3SHW_2Rows-41Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-45S-0.3SHW_2Rows-45Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-51S-0.3SHW_2Rows-51Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-55S-0.3SHW_2Rows-55Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-57S-0.3SHW_2Rows-57Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-61S-0.3SHW_2Rows-61Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH26-71S-0.3SHW_2Rows-71Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Hirose_FH41-30S-0.5SH_1x30_1MP_1SH_P0.5mm_Horizontal\",\"Connector_FFC-FPC/JAE_FF0825SA1_2Rows-25Pins_P0.40mm_Horizontal\",\"Connector_FFC-FPC/JAE_FF0829SA1_2Rows-29Pins_P0.40mm_Horizontal\",\"Connector_FFC-FPC/JAE_FF0841SA1_2Rows-41Pins_P0.40mm_Horizontal\",\"Connector_FFC-FPC/JAE_FF0851SA1_2Rows-51Pins_P0.40mm_Horizontal\",\"Connector_FFC-FPC/JAE_FF0871SA1_2Rows-71Pins_P0.40mm_Horizontal\",\"Connector_FFC-FPC/JAE_FF0881SA1_2Rows-81Pins_P0.40mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S04FCA-00_1x4-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S05FCA-00_1x5-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S06FCA-00_1x6-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S07FCA-00_1x7-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S08FCA-00_1x8-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S09FCA-00_1x9-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S10FCA-00_1x10-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S11FCA-00_1x11-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S12FCA-00_1x12-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S13FCA-00_1x13-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S14FCA-00_1x14-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S15FCA-00_1x15-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S16FCA-00_1x16-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S17FCA-00_1x17-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S18FCA-00_1x18-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S19FCA-00_1x19-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S20FCA-00_1x20-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S21FCA-00_1x21-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S22FCA-00_1x22-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S23FCA-00_1x23-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S24FCA-00_1x24-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S25FCA-00_1x25-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S26FCA-00_1x26-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S27FCA-00_1x27-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S28FCA-00_1x28-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/JUSHUO_AFA07-S29FCA-00_1x29-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/Jushuo_AFC07-S06FCA-00_1x6-1MP_P0.50_Horizontal\",\"Connector_FFC-FPC/Jushuo_AFC07-S24FCA-00_1x24-1MP_P0.50_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0040_1x04-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0050_1x05-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0060_1x06-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0070_1x07-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0080_1x08-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0090_1x09-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0100_1x10-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0110_1x11-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0120_1x12-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0130_1x13-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0140_1x14-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0150_1x15-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0160_1x16-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0170_1x17-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0180_1x18-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0190_1x19-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0200_1x20-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0210_1x21-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0220_1x22-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0230_1x23-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0240_1x24-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0250_1x25-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0260_1x26-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0270_1x27-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0280_1x28-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0290_1x29-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_200528-0300_1x30-1MP_P1.00mm_Horizontal\",\"Connector_FFC-FPC/Molex_502231-1500_1x15-1SH_P0.5mm_Vertical\",\"Connector_FFC-FPC/Molex_502231-2400_1x24-1SH_P0.5mm_Vertical\",\"Connector_FFC-FPC/Molex_502231-3300_1x33-1SH_P0.5mm_Vertical\",\"Connector_FFC-FPC/Molex_502244-1530_1x15-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Molex_502244-2430_1x24-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Molex_502244-3330_1x33-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-1791_2Rows-17Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-2191_2Rows-21Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-2391_2Rows-23Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-2791_2Rows-27Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-3391_2Rows-33Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-3591_2Rows-35Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-3991_2Rows-39Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-4191_2Rows-41Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_502250-5191_2Rows-51Pins-1MP_P0.60mm_Horizontal\",\"Connector_FFC-FPC/Molex_52559-3652_2x18-1MP_P0.5mm_Vertical\",\"Connector_FFC-FPC/Molex_54132-5033_1x50-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Molex_54548-1071_1x10-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/Omron_XF2M-4015-1A_1x40-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_0-1734839-5_1x05-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_0-1734839-6_1x06-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_0-1734839-7_1x07-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_0-1734839-8_1x08-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_0-1734839-9_1x09-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-0_1x10-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-1_1x11-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-2_1x12-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-3_1x13-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-4_1x14-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-5_1x15-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-6_1x16-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-7_1x17-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-8_1x18-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-1734839-9_1x19-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-0_1x10-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-1_1x11-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-2_1x12-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-3_1x13-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-4_1x14-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-5_1x15-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-6_1x16-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-7_1x17-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-8_1x18-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84952-9_1x19-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-0_1x10-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-1_1x11-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-2_1x12-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-3_1x13-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-4_1x14-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-5_1x15-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-6_1x16-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-7_1x17-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-8_1x18-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84953-9_1x19-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_1-84982-0_2Rows-10Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-1_2Rows-11Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-2_2Rows-12Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-3_2Rows-13Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-4_2Rows-14Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-5_2Rows-15Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-6_2Rows-16Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-7_2Rows-17Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-8_2Rows-18Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_1-84982-9_2Rows-19Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-1734839-0_1x20-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-1_1x21-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-2_1x22-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-3_1x23-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-4_1x24-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-5_1x25-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-6_1x26-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-7_1x27-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-8_1x28-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-1734839-9_1x29-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-0_1x20-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-1_1x21-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-2_1x22-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-3_1x23-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-4_1x24-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-5_1x25-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-6_1x26-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-7_1x27-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-8_1x28-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84952-9_1x29-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-0_1x20-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-1_1x21-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-2_1x22-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-3_1x23-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-4_1x24-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-5_1x25-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-6_1x26-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-7_1x27-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-8_1x28-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84953-9_1x29-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_2-84982-0_2Rows-20Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-1_2Rows-21Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-2_2Rows-22Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-3_2Rows-23Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-4_2Rows-24Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-5_2Rows-25Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-6_2Rows-26Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-7_2Rows-27Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-8_2Rows-28Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_2-84982-9_2Rows-29Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_3-1734839-0_1x30-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-1_1x31-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-2_1x32-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-3_1x33-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-4_1x34-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-5_1x35-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-6_1x36-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-7_1x37-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-8_1x38-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-1734839-9_1x39-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_3-84952-0_1x30-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_3-84953-0_1x30-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_3-84982-0_2Rows-30Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_4-1734839-0_1x40-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-1_1x41-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-2_1x42-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-3_1x43-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-4_1x44-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-5_1x45-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-6_1x46-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-7_1x47-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-8_1x48-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_4-1734839-9_1x49-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_5-1734839-0_1x50-1MP_P0.5mm_Horizontal\",\"Connector_FFC-FPC/TE_84952-4_1x04-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84952-5_1x05-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84952-6_1x06-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84952-7_1x07-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84952-8_1x08-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84952-9_1x09-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84953-4_1x04-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84953-5_1x05-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84953-6_1x06-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84953-7_1x07-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84953-8_1x08-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84953-9_1x09-1MP_P1.0mm_Horizontal\",\"Connector_FFC-FPC/TE_84982-4_2Rows-04Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_84982-5_2Rows-05Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_84982-6_2Rows-06Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_84982-7_2Rows-07Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_84982-8_2Rows-08Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/TE_84982-9_2Rows-09Pins-P1.0mm_Vertical\",\"Connector_FFC-FPC/Wuerth_68611214422_1x12-1MP_P1.0mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110213001xxx_1x02-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110213002xxx_1x02-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110213010xxx_1x02-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110313001xxx_1x03-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110313002xxx_1x03-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110313010xxx_1x03-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110413001xxx_1x04-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110413002xxx_1x04-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110413010xxx_1x04-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110513001xxx_1x05-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110513002xxx_1x05-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110513010xxx_1x05-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110613001xxx_1x06-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110613002xxx_1x06-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110613010xxx_1x06-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110713001xxx_1x07-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110713002xxx_1x07-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110713010xxx_1x07-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110813001xxx_1x08-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110813002xxx_1x08-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110813010xxx_1x08-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110913001xxx_1x09-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14110913002xxx_1x09-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14110913010xxx_1x09-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14111013001xxx_1x10-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14111013002xxx_1x10-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14111013010xxx_1x10-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14111113001xxx_1x11-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14111113002xxx_1x11-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14111113010xxx_1x11-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14111213001xxx_1x12-MP_P2.54mm_Vertical\",\"Connector_Harting/Harting_har-flexicon_14111213002xxx_1x12-MP_P2.54mm_Horizontal\",\"Connector_Harting/Harting_har-flexicon_14111213010xxx_1x12-MP_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_Gecko-G125-FVX0605L0X_2x03_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-FVX1005L0X_2x05_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-FVX1205L0X_2x06_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-FVX1605L0X_2x08_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-FVX2005L0X_2x10_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-FVX2605L0X_2x13_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-FVX3405L0X_2x17_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-FVX5005L0X_2x25_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX0605L0X_2x03_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX0605L1X_2x03_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX1005L0X_2x05_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX1005L1X_2x05_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX1205L0X_2x06_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX1205L1X_2x06_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX1605L0X_2x08_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX1605L1X_2x08_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX2005L0X_2x10_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX2005L1X_2x10_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX2605L0X_2x13_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX2605L1X_2x13_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX3405L0X_2x17_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX3405L1X_2x17_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX5005L0X_2x25_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko-G125-MVX5005L1X_2x25_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS10605M2P_2x03_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS11005M2P_2x05_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS11205M2P_2x06_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS11605M2P_2x08_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS12005M2P_2x10_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS12605M2P_2x13_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS13405M2P_2x17_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_Gecko_G125-MS15005M2P_2x25_P1.25mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_02_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_02_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_03_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_03_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_04_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_04_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_05_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_05_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_06_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_06_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_07_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_07_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_17_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_17_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_22_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_22_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x02_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x02_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x03_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x03_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x04_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x04_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x05_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x05_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x06_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x06_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x07_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x07_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x08_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x08_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x09_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x09_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x10_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x10_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x13_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x13_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x17_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x17_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_LTek-Male_2x22_P2.00mm_Vertical\",\"Connector_Harwin/Harwin_LTek-Male_2x22_P2.00mm_Vertical_StrainRelief\",\"Connector_Harwin/Harwin_M20-7810245_2x02_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7810345_2x03_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7810445_2x04_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7810545_2x05_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7810645_2x06_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7810745_2x07_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7810845_2x08_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7810945_2x09_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7811045_2x10_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7811245_2x12_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7811545_2x15_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-7812045_2x20_P2.54mm_Vertical\",\"Connector_Harwin/Harwin_M20-89003xx_1x03_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89004xx_1x04_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89005xx_1x05_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89006xx_1x06_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89007xx_1x07_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89008xx_1x08_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89009xx_1x09_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89010xx_1x10_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89011xx_1x11_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89012xx_1x12_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89013xx_1x13_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89014xx_1x14_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89015xx_1x15_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89016xx_1x16_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89017xx_1x17_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89018xx_1x18_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89019xx_1x19_P2.54mm_Horizontal\",\"Connector_Harwin/Harwin_M20-89020xx_1x20_P2.54mm_Horizontal\",\"Connector_Hirose/Hirose_BM23FR0.6-16DP-0.35V_2x08_1MP_Vertical\",\"Connector_Hirose/Hirose_BM23FR0.6-16DS-0.35V_2x08_P0.35_1MP_Vertical\",\"Connector_Hirose/Hirose_BM24_BM24-40DP-2-0.35V_2x20_P0.35mm_PowerPin2_Vertical\",\"Connector_Hirose/Hirose_BM24_BM24-40DS-2-0.35V_2x20_P0.35mm_PowerPin2_Vertical\",\"Connector_Hirose/Hirose_DF11-10DP-2DSA_2x05_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-12DP-2DSA_2x06_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-14DP-2DSA_2x07_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-16DP-2DSA_2x08_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-18DP-2DSA_2x09_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-20DP-2DSA_2x10_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-22DP-2DSA_2x11_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-24DP-2DSA_2x12_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-26DP-2DSA_2x13_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-28DP-2DSA_2x14_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-30DP-2DSA_2x15_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-32DP-2DSA_2x16_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-4DP-2DSA_2x02_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-6DP-2DSA_2x03_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF11-8DP-2DSA_2x04_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-10DS-0.5V_2x05_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-14DS-0.5V_2x07_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-20DS-0.5V_2x10_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-30DS-0.5V_2x15_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-32DS-0.5V_2x16_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-36DS-0.5V_2x18_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-40DS-0.5V_2x20_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-50DS-0.5V_2x25_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12C3.0-60DS-0.5V_2x30_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-10DP-0.5V_2x05_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-14DP-0.5V_2x07_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-20DP-0.5V_2x10_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-30DP-0.5V_2x15_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-32DP-0.5V_2x16_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-36DP-0.5V_2x18_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-40DP-0.5V_2x20_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-50DP-0.5V_2x25_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-60DP-0.5V_2x30_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF12_DF12E3.0-80DP-0.5V_2x40_P0.50mm_Vertical\",\"Connector_Hirose/Hirose_DF13-02P-1.25DSA_1x02_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-02P-1.25DS_1x02_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-03P-1.25DSA_1x03_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-03P-1.25DS_1x03_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-04P-1.25DSA_1x04_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-04P-1.25DS_1x04_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-05P-1.25DSA_1x05_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-05P-1.25DS_1x05_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-06P-1.25DSA_1x06_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-06P-1.25DS_1x06_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-07P-1.25DSA_1x07_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-07P-1.25DS_1x07_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-08P-1.25DSA_1x08_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-08P-1.25DS_1x08_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-09P-1.25DSA_1x09_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-09P-1.25DS_1x09_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-10P-1.25DSA_1x10_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-10P-1.25DS_1x10_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-11P-1.25DSA_1x11_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-11P-1.25DS_1x11_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-12P-1.25DSA_1x12_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-12P-1.25DS_1x12_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-13P-1.25DSA_1x13_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-14P-1.25DSA_1x14_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-14P-1.25DS_1x14_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13-15P-1.25DSA_1x15_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13-15P-1.25DS_1x15_P1.25mm_Horizontal\",\"Connector_Hirose/Hirose_DF13C_CL535-0402-2-51_1x02-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0403-5-51_1x03-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0404-8-51_1x04-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0405-0-51_1x05-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0406-3-51_1x06-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0407-6-51_1x07-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0408-9-51_1x08-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0409-1-51_1x09-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0410-4-51_1x10-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0411-3-51_1x11-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0412-6-51_1x12-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0414-1-51_1x14-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF13C_CL535-0415-4-51_1x15-1MP_P1.25mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-02P-2H_1x02-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-02P-2V_1x02-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-03P-2H_1x03-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-03P-2V_1x03-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-04P-2H_1x04-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-04P-2V_1x04-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-05P-2H_1x05-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-05P-2V_1x05-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-06P-2H_1x06-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-06P-2V_1x06-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-07P-2H_1x07-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-07P-2V_1x07-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-08P-2H_1x08-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-08P-2V_1x08-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-09P-2H_1x09-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-09P-2V_1x09-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-10P-2H_1x10-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-10P-2V_1x10-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-11P-2H_1x11-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-11P-2V_1x11-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-12P-2H_1x12-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-12P-2V_1x12-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-13P-2H_1x13-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-13P-2V_1x13-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-14P-2H_1x14-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-14P-2V_1x14-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF3EA-15P-2H_1x15-1MP_P2.00mm_Horizontal\",\"Connector_Hirose/Hirose_DF3EA-15P-2V_1x15-1MP_P2.00mm_Vertical\",\"Connector_Hirose/Hirose_DF52-10S-0.8H_1x10-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-11S-0.8H_1x11-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-12S-0.8H_1x12-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-14S-0.8H_1x14-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-15S-0.8H_1x15-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-2S-0.8H_1x02-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-3S-0.8H_1x03-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-4S-0.8H_1x04-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-5S-0.8H_1x05-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-6S-0.8H_1x06-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-7S-0.8H_1x07-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-8S-0.8H_1x08-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF52-9S-0.8H_1x09-1MP_P0.80mm_Horizontal\",\"Connector_Hirose/Hirose_DF57H-2P-1.2V_1x02_P1.2mm_Socket\",\"Connector_Hirose/Hirose_DF57H-2P-2.4V_1x02_P2.4mm_Socket\",\"Connector_Hirose/Hirose_DF57H-3P-1.2V_1x03_P1.2mm_Socket\",\"Connector_Hirose/Hirose_DF57H-4P-1.2V_1x04_P1.2mm_Socket\",\"Connector_Hirose/Hirose_DF57H-5P-1.2V_1x05_P1.2mm_Socket\",\"Connector_Hirose/Hirose_DF57H-6P-1.2V_1x06_P1.2mm_Socket\",\"Connector_Hirose/Hirose_DF63-5P-3.96DSA_1x05_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63-6P-3.96DSA_1x06_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63M-1P-3.96DSA_1x01_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63M-2P-3.96DSA_1x02_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63M-3P-3.96DSA_1x03_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63M-4P-3.96DSA_1x04_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63R-1P-3.96DSA_1x01_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63R-2P-3.96DSA_1x02_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63R-3P-3.96DSA_1x03_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63R-4P-3.96DSA_1x04_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_DF63R-5P-3.96DSA_1x05_P3.96mm_Vertical\",\"Connector_Hirose/Hirose_FX10A-120P-SV_2x60-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10A-120S-SV_2x60-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10A-144P-SV_2x72-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10A-144S-SV_2x72-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10A-168P-SV_2x84-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10A-168S-SV_2x84-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10A-96P-SV_2x48-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10A-96S-SV_2x48-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-120P-SV_2x60-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-120S-SV_2x60-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-144P-SV_2x72-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-144S-SV_2x72-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-168P-SV_2x84-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-168S-SV_2x84-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-96P-SV_2x48-1MP_P0.5mm\",\"Connector_Hirose/Hirose_FX10B-96S-SV_2x48-1MP_P0.5mm\",\"Connector_Hirose_DF40/Hirose_DF40B(2.0)-12DS-0.4V_2x06-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40B(2.0)-80DS-0.4V_2x40-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40B-10DS-0.4V_2x05-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40B-12DS-0.4V_2x06-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40B-30DS-0.4V_2x15-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40B-50DS-0.4V_2x25-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40B-60DS-0.4V_2x30-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40B-80DS-0.4V_2x40-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-20DS-0.4V_2x10_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-24DS-0.4V_2x12_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-30DS-0.4V_2x15_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-40DS-0.4V_2x20_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-50DS-0.4V_2x25_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-60DS-0.4V_2x30_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-70DS-0.4V_2x35_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C(2.0)-80DS-0.4V_2x40_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-100DP-0.4V_2x50-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-100DS-0.4V_2x50_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-10DP-0.4V_2x05-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-120DP-0.4V_2x60-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-120DS-0.4V_2x60_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-12DP-0.4V_2x06-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-20DP-0.4V_2x10-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-20DS-0.4V_2x10_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-24DP-0.4V_2x12-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-24DS-0.4V_2x12_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-30DP-0.4V_2x15-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-30DS-0.4V_2x15_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-34DP-0.4V_2x17-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-34DS-0.4V_2x17_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-40DP-0.4V_2x20-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-40DS-0.4V_2x20_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-44DP-0.4V_2x22-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-50DP-0.4V_2x25-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-50DS-0.4V_2x25_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-60DP-0.4V_2x30-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-60DS-0.4V_2x30_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-70DP-0.4V_2x35-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-70DS-0.4V_2x35_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-80DP-0.4V_2x40-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-80DS-0.4V_2x40_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-90DP-0.4V_2x45-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40C-90DS-0.4V_2x45_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HB(2.5)-10DS-0.4V_2x05-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HB(4.0)-50DS-0.4V_2x25-1MP_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(2.5)-20DS-0.4V_2x10_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(2.5)-30DS-0.4V_2x15_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(2.5)-40DS-0.4V_2x20_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(2.5)-50DS-0.4V_2x25_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(2.5)-60DS-0.4V_2x30_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-100DS-0.4V_2x50_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-30DS-0.4V_2x15_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-40DS-0.4V_2x20_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-44DS-0.4V_2x22_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-50DS-0.4V_2x25_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-60DS-0.4V_2x30_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-70DS-0.4V_2x35_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-80DS-0.4V_2x40_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.0)-90DS-0.4V_2x45_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.5)-20DS-0.4V_2x10_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.5)-30DS-0.4V_2x15_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.5)-40DS-0.4V_2x20_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.5)-50DS-0.4V_2x25_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.5)-60DS-0.4V_2x30_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(3.5)-80DS-0.4V_2x40_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(4.0)-40DS-0.4V_2x20_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(4.0)-50DS-0.4V_2x25_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(4.0)-60DS-0.4V_2x30_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(4.0)-80DS-0.4V_2x40_P0.4mm\",\"Connector_Hirose_DF40/Hirose_DF40HC(4.0)-90DS-0.4V_2x45_P0.4mm\",\"Connector_Hirose_FX8/Hirose_FX8-100P-SV_2x50_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-100S-SV_2x50_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-120P-SV_2x60_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-120S-SV_2x60_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-140P-SV_2x70_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-140S-SV_2x70_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-60P-SV_2x30_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-60S-SV_2x30_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-80P-SV_2x40_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-80S-SV_2x40_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-90P-SV_2x45_P0.6mm\",\"Connector_Hirose_FX8/Hirose_FX8-90S-SV_2x45_P0.6mm\",\"Connector_IDC/IDC-Header_2x03_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x03_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x03_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x04_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x04_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x04_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x05_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x06_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Horizontal_Lock\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x07_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x08_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x09_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x09_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x09_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x10_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x11_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x11_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x11_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x12_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x13_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x15_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x15_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x15_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x15_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x15_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x15_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x15_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x17_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x17_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x17_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x17_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x17_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x17_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x17_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x20_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x22_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x22_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x22_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x25_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Vertical\",\"Connector_IDC/IDC-Header_2x30_P2.54mm_Vertical_SMD\",\"Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x32_P2.54mm_Horizontal\",\"Connector_IDC/IDC-Header_2x32_P2.54mm_Latch12.0mm_Vertical\",\"Connector_IDC/IDC-Header_2x32_P2.54mm_Latch6.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x32_P2.54mm_Latch9.5mm_Vertical\",\"Connector_IDC/IDC-Header_2x32_P2.54mm_Latch_Horizontal\",\"Connector_IDC/IDC-Header_2x32_P2.54mm_Latch_Vertical\",\"Connector_IDC/IDC-Header_2x32_P2.54mm_Vertical\",\"Connector_JAE/JAE_LY20-10P-DLT1_2x05_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-10P-DT1_2x05_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-12P-DLT1_2x06_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-12P-DT1_2x06_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-14P-DLT1_2x07_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-14P-DT1_2x07_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-16P-DLT1_2x08_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-16P-DT1_2x08_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-18P-DLT1_2x09_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-18P-DT1_2x09_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-20P-DLT1_2x10_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-20P-DT1_2x10_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-22P-DLT1_2x11_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-22P-DT1_2x11_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-24P-DLT1_2x12_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-24P-DT1_2x12_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-26P-DLT1_2x13_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-26P-DT1_2x13_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-28P-DLT1_2x14_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-28P-DT1_2x14_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-30P-DLT1_2x15_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-30P-DT1_2x15_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-32P-DLT1_2x16_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-32P-DT1_2x16_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-34P-DLT1_2x17_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-34P-DT1_2x17_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-36P-DLT1_2x18_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-36P-DT1_2x18_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-38P-DLT1_2x19_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-38P-DT1_2x19_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-40P-DLT1_2x20_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-40P-DT1_2x20_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-42P-DLT1_2x21_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-42P-DT1_2x21_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-44P-DLT1_2x22_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-44P-DT1_2x22_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-4P-DLT1_2x02_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-4P-DT1_2x02_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-6P-DLT1_2x03_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-6P-DT1_2x03_P2.00mm_Vertical\",\"Connector_JAE/JAE_LY20-8P-DLT1_2x04_P2.00mm_Horizontal\",\"Connector_JAE/JAE_LY20-8P-DT1_2x04_P2.00mm_Vertical\",\"Connector_JAE/JAE_MM70-314-310B1\",\"Connector_JAE/JAE_SIM_Card_SF72S006\",\"Connector_JAE_WP7B/JAE_WP7B-P034VA1-R8000_2x17-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P034VA1-R8000_Longpads_2x17-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P040VA1-R8000_2x20-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P040VA1-R8000_Longpads_2x20-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P050VA1-R8000_2x25-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P050VA1-R8000_Longpads_2x25-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P060VA1-R8000_2x30-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P060VA1-R8000_Longpads_2x30-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P070VA1-R8000_2x35-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-P070VA1-R8000_Longpads_2x35-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S034VA1-R8000_2x17-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S034VA1-R8000_Longpads_2x17-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S040VA1-R8000_2x20-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S040VA1-R8000_Longpads_2x20-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S050VA1-R8000_2x25-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S050VA1-R8000_Longpads_2x25-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S060VA1-R8000_2x30-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S060VA1-R8000_Longpads_2x30-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S070VA1-R8000_2x35-1MP_P0.4mm\",\"Connector_JAE_WP7B/JAE_WP7B-S070VA1-R8000_Longpads_2x35-1MP_P0.4mm\",\"Connector_JST/JST_ACH_BM01B-ACHSS-A-GAN-ETF_1x01-1MP_P1.20mm_Vertical\",\"Connector_JST/JST_ACH_BM02B-ACHSS-GAN-ETF_1x02-1MP_P1.20mm_Vertical\",\"Connector_JST/JST_ACH_BM03B-ACHSS-GAN-ETF_1x03-1MP_P1.20mm_Vertical\",\"Connector_JST/JST_ACH_BM04B-ACHSS-A-GAN-ETF_1x04-1MP_P1.20mm_Vertical\",\"Connector_JST/JST_ACH_BM05B-ACHSS-A-GAN-ETF_1x05-1MP_P1.20mm_Vertical\",\"Connector_JST/JST_AUH_BM03B-AUHKS-GA-TB_1x03-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_AUH_BM05B-AUHKS-GA-TB_1x05-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_EH_B10B-EH-A_1x10_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B11B-EH-A_1x11_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B12B-EH-A_1x12_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B13B-EH-A_1x13_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B14B-EH-A_1x14_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B15B-EH-A_1x15_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B2B-EH-A_1x02_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B3B-EH-A_1x03_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B4B-EH-A_1x04_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B5B-EH-A_1x05_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B6B-EH-A_1x06_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B7B-EH-A_1x07_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B8B-EH-A_1x08_P2.50mm_Vertical\",\"Connector_JST/JST_EH_B9B-EH-A_1x09_P2.50mm_Vertical\",\"Connector_JST/JST_EH_S10B-EH_1x10_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S11B-EH_1x11_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S12B-EH_1x12_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S13B-EH_1x13_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S14B-EH_1x14_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S15B-EH_1x15_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S2B-EH_1x02_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S3B-EH_1x03_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S4B-EH_1x04_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S5B-EH_1x05_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S6B-EH_1x06_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S7B-EH_1x07_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S8B-EH_1x08_P2.50mm_Horizontal\",\"Connector_JST/JST_EH_S9B-EH_1x09_P2.50mm_Horizontal\",\"Connector_JST/JST_GH_BM02B-GHS-TBT_1x02-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM03B-GHS-TBT_1x03-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM04B-GHS-TBT_1x04-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM05B-GHS-TBT_1x05-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM06B-GHS-TBT_1x06-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM07B-GHS-TBT_1x07-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM08B-GHS-TBT_1x08-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM09B-GHS-TBT_1x09-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM10B-GHS-TBT_1x10-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM11B-GHS-TBT_1x11-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM12B-GHS-TBT_1x12-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM13B-GHS-TBT_1x13-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM14B-GHS-TBT_1x14-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_BM15B-GHS-TBT_1x15-1MP_P1.25mm_Vertical\",\"Connector_JST/JST_GH_SM02B-GHS-TB_1x02-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM03B-GHS-TB_1x03-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM04B-GHS-TB_1x04-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM05B-GHS-TB_1x05-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM06B-GHS-TB_1x06-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM07B-GHS-TB_1x07-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM08B-GHS-TB_1x08-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM09B-GHS-TB_1x09-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM10B-GHS-TB_1x10-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM11B-GHS-TB_1x11-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM12B-GHS-TB_1x12-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM13B-GHS-TB_1x13-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM14B-GHS-TB_1x14-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_GH_SM15B-GHS-TB_1x15-1MP_P1.25mm_Horizontal\",\"Connector_JST/JST_J2100_B06B-J21DK-GGXR_2x03_P2.50x4.00mm_Vertical\",\"Connector_JST/JST_J2100_B08B-J21DK-GGXR_2x04_P2.50x4.00mm_Vertical\",\"Connector_JST/JST_J2100_B10B-J21DK-GGXR_2x05_P2.50x4.00mm_Vertical\",\"Connector_JST/JST_J2100_B12B-J21DK-GGXR_2x06_P2.50x4.00mm_Vertical\",\"Connector_JST/JST_J2100_B16B-J21DK-GGXR_2x08_P2.50x4.00mm_Vertical\",\"Connector_JST/JST_J2100_B20B-J21DK-GGXR_2x10_P2.50x4.00mm_Vertical\",\"Connector_JST/JST_J2100_S06B-J21DK-GGXR_2x03_P2.50mm_Horizontal\",\"Connector_JST/JST_J2100_S08B-J21DK-GGXR_2x04_P2.50mm_Horizontal\",\"Connector_JST/JST_J2100_S10B-J21DK-GGXR_2x05_P2.50mm_Horizontal\",\"Connector_JST/JST_J2100_S12B-J21DK-GGXR_2x06_P2.50mm_Horizontal\",\"Connector_JST/JST_J2100_S16B-J21DK-GGXR_2x08_P2.50mm_Horizontal\",\"Connector_JST/JST_J2100_S20B-J21DK-GGXR_2x10_P2.50mm_Horizontal\",\"Connector_JST/JST_JWPF_B02B-JWPF-SK-R_1x02_P2.00mm_Vertical\",\"Connector_JST/JST_JWPF_B03B-JWPF-SK-R_1x03_P2.00mm_Vertical\",\"Connector_JST/JST_JWPF_B04B-JWPF-SK-R_1x04_P2.00mm_Vertical\",\"Connector_JST/JST_JWPF_B06B-JWPF-SK-R_2x03_P2.00mm_Vertical\",\"Connector_JST/JST_JWPF_B08B-JWPF-SK-R_2x04_P2.00mm_Vertical\",\"Connector_JST/JST_LEA_SM02B-LEASS-TF_1x02-1MP_P4.20mm_Horizontal\",\"Connector_JST/JST_NV_B02P-NV_1x02_P5.00mm_Vertical\",\"Connector_JST/JST_NV_B03P-NV_1x03_P5.00mm_Vertical\",\"Connector_JST/JST_NV_B04P-NV_1x04_P5.00mm_Vertical\",\"Connector_JST/JST_PHD_B10B-PHDSS_2x05_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B12B-PHDSS_2x06_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B14B-PHDSS_2x07_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B16B-PHDSS_2x08_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B18B-PHDSS_2x09_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B20B-PHDSS_2x10_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B22B-PHDSS_2x11_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B24B-PHDSS_2x12_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B26B-PHDSS_2x13_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B28B-PHDSS_2x14_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B30B-PHDSS_2x15_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B32B-PHDSS_2x16_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B34B-PHDSS_2x17_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_B8B-PHDSS_2x04_P2.00mm_Vertical\",\"Connector_JST/JST_PHD_S10B-PHDSS_2x05_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S12B-PHDSS_2x06_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S14B-PHDSS_2x07_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S16B-PHDSS_2x08_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S18B-PHDSS_2x09_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S20B-PHDSS_2x10_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S22B-PHDSS_2x11_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S24B-PHDSS_2x12_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S26B-PHDSS_2x13_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S28B-PHDSS_2x14_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S30B-PHDSS_2x15_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S32B-PHDSS_2x16_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S34B-PHDSS_2x17_P2.00mm_Horizontal\",\"Connector_JST/JST_PHD_S8B-PHDSS_2x04_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_B10B-PH-K_1x10_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B10B-PH-SM4-TB_1x10-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B11B-PH-K_1x11_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B11B-PH-SM4-TB_1x11-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B12B-PH-K_1x12_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B12B-PH-SM4-TB_1x12-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B13B-PH-K_1x13_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B13B-PH-SM4-TB_1x13-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B14B-PH-K_1x14_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B14B-PH-SM4-TB_1x14-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B15B-PH-K_1x15_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B15B-PH-SM4-TB_1x15-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B16B-PH-K_1x16_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B16B-PH-SM4-TB_1x16-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B2B-PH-K_1x02_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B2B-PH-SM4-TB_1x02-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B3B-PH-K_1x03_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B3B-PH-SM4-TB_1x03-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B4B-PH-K_1x04_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B4B-PH-SM4-TB_1x04-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B5B-PH-K_1x05_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B5B-PH-SM4-TB_1x05-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B6B-PH-K_1x06_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B6B-PH-SM4-TB_1x06-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B7B-PH-K_1x07_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B7B-PH-SM4-TB_1x07-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B8B-PH-K_1x08_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B8B-PH-SM4-TB_1x08-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B9B-PH-K_1x09_P2.00mm_Vertical\",\"Connector_JST/JST_PH_B9B-PH-SM4-TB_1x09-1MP_P2.00mm_Vertical\",\"Connector_JST/JST_PH_S10B-PH-K_1x10_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S10B-PH-SM4-TB_1x10-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S11B-PH-K_1x11_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S11B-PH-SM4-TB_1x11-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S12B-PH-K_1x12_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S12B-PH-SM4-TB_1x12-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S13B-PH-K_1x13_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S13B-PH-SM4-TB_1x13-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S14B-PH-K_1x14_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S14B-PH-SM4-TB_1x14-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S15B-PH-K_1x15_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S15B-PH-SM4-TB_1x15-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S16B-PH-K_1x16_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S2B-PH-SM4-TB_1x02-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S3B-PH-K_1x03_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S3B-PH-SM4-TB_1x03-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S4B-PH-K_1x04_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S4B-PH-SM4-TB_1x04-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S5B-PH-K_1x05_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S5B-PH-SM4-TB_1x05-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S6B-PH-K_1x06_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S6B-PH-SM4-TB_1x06-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S7B-PH-K_1x07_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S7B-PH-SM4-TB_1x07-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S8B-PH-K_1x08_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S8B-PH-SM4-TB_1x08-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S9B-PH-K_1x09_P2.00mm_Horizontal\",\"Connector_JST/JST_PH_S9B-PH-SM4-TB_1x09-1MP_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_B08B-PUDSS_2x04_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B10B-PUDSS_2x05_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B12B-PUDSS_2x06_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B14B-PUDSS_2x07_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B16B-PUDSS_2x08_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B18B-PUDSS_2x09_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B20B-PUDSS_2x10_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B22B-PUDSS_2x11_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B24B-PUDSS_2x12_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B26B-PUDSS_2x13_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B28B-PUDSS_2x14_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B30B-PUDSS_2x15_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B32B-PUDSS_2x16_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B34B-PUDSS_2x17_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B36B-PUDSS_2x18_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B38B-PUDSS_2x19_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_B40B-PUDSS_2x20_P2.00mm_Vertical\",\"Connector_JST/JST_PUD_S08B-PUDSS-1_2x04_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S10B-PUDSS-1_2x05_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S12B-PUDSS-1_2x06_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S14B-PUDSS-1_2x07_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S16B-PUDSS-1_2x08_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S18B-PUDSS-1_2x09_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S20B-PUDSS-1_2x10_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S22B-PUDSS-1_2x11_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S24B-PUDSS-1_2x12_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S26B-PUDSS-1_2x13_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S28B-PUDSS-1_2x14_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S30B-PUDSS-1_2x15_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S32B-PUDSS-1_2x16_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S34B-PUDSS-1_2x17_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S36B-PUDSS-1_2x18_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S38B-PUDSS-1_2x19_P2.00mm_Horizontal\",\"Connector_JST/JST_PUD_S40B-PUDSS-1_2x20_P2.00mm_Horizontal\",\"Connector_JST/JST_SFH_SM02B-SFHRS-TF_1x02-1MP_P4.20mm_Horizontal\",\"Connector_JST/JST_SHD_BM20B-SRDS-A-G-TF_2x10-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_BM20B-SRDS-G-TF_2x10-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_BM30B-SRDS-A-G-TF_2x15-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_BM30B-SRDS-G-TF_2x15-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_BM40B-SRDS-A-G-TF_2x20-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_BM40B-SRDS-G-TF_2x20-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_BM50B-SRDS-A-G-TF_2x25-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_BM50B-SRDS-G-TF_2x25-1MP_P1.0mm_Vertical\",\"Connector_JST/JST_SHD_SM20B-SRDS-G-TF_2x10-1MP_P1.0mm_Horizontal\",\"Connector_JST/JST_SHD_SM30B-SRDS-G-TF_2x15-1MP_P1.0mm_Horizontal\",\"Connector_JST/JST_SHD_SM40B-SRDS-G-TF_2x20-1MP_P1.0mm_Horizontal\",\"Connector_JST/JST_SHD_SM50B-SRDS-G-TF_2x25-1MP_P1.0mm_Horizontal\",\"Connector_JST/JST_SHL_SM02B-SHLS-TF_1x02-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM05B-SHLS-TF_1x05-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM06B-SHLS-TF_1x06-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM07B-SHLS-TF_1x07-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM08B-SHLS-TF_1x08-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM10B-SHLS-TF_1x10-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM11B-SHLS-TF_1x11-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM12B-SHLS-TF_1x12-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM14B-SHLS-TF_1x14-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM16B-SHLS-TF_1x16-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM20B-SHLS-TF_1x20-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM22B-SHLS-TF_1x22-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM26B-SHLS-TF_1x26-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SHL_SM30B-SHLS-TF_1x30-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_BM02B-SRSS-TB_1x02-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM03B-SRSS-TB_1x03-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM04B-SRSS-TB_1x04-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM05B-SRSS-TB_1x05-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM06B-SRSS-TB_1x06-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM07B-SRSS-TB_1x07-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM08B-SRSS-TB_1x08-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM09B-SRSS-TB_1x09-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM10B-SRSS-TB_1x10-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM11B-SRSS-TB_1x11-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM12B-SRSS-TB_1x12-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM13B-SRSS-TB_1x13-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM14B-SRSS-TB_1x14-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_BM15B-SRSS-TB_1x15-1MP_P1.00mm_Vertical\",\"Connector_JST/JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM05B-SRSS-TB_1x05-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM06B-SRSS-TB_1x06-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM07B-SRSS-TB_1x07-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM08B-SRSS-TB_1x08-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM09B-SRSS-TB_1x09-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM10B-SRSS-TB_1x10-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM11B-SRSS-TB_1x11-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM12B-SRSS-TB_1x12-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM13B-SRSS-TB_1x13-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM14B-SRSS-TB_1x14-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM15B-SRSS-TB_1x15-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SH_SM20B-SRSS-TB_1x20-1MP_P1.00mm_Horizontal\",\"Connector_JST/JST_SUR_BM02B-SURS-TF_1x02-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM03B-SURS-TF_1x03-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM04B-SURS-TF_1x04-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM05B-SURS-TF_1x05-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM06B-SURS-TF_1x06-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM08B-SURS-TF_1x08-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM10B-SURS-TF_1x10-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM12B-SURS-TF_1x12-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM14B-SURS-TF_1x14-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM15B-SURS-TF_1x15-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM16B-SURS-TF_1x16-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM17B-SURS-TF_1x17-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_BM20B-SURS-TF_1x20-1MP_P0.80mm_Vertical\",\"Connector_JST/JST_SUR_SM02B-SURS-TF_1x02-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM03B-SURS-TF_1x03-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM04B-SURS-TF_1x04-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM05B-SURS-TF_1x05-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM06B-SURS-TF_1x06-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM08B-SURS-TF_1x08-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM10B-SURS-TF_1x10-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM12B-SURS-TF_1x12-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM14B-SURS-TF_1x14-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM15B-SURS-TF_1x15-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM16B-SURS-TF_1x16-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM17B-SURS-TF_1x17-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM20B-SURS-TF_1x20-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_SUR_SM22B-SURS-TF_1x22-1MP_P0.80mm_Horizontal\",\"Connector_JST/JST_VH_B10P-VH-B_1x10_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B10P-VH-FB-B_1x10_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B10P-VH_1x10_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B10PS-VH_1x10_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B11P-VH-B_1x11_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B2P-VH-B_1x02_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B2P-VH-FB-B_1x02_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B2P-VH_1x02_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B2P3-VH_1x02_P7.92mm_Vertical\",\"Connector_JST/JST_VH_B2PS-VH_1x02_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B3P-VH-B_1x03_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B3P-VH-FB-B_1x03_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B3P-VH_1x03_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B3PS-VH_1x03_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B4P-VH-B_1x04_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B4P-VH-FB-B_1x04_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B4P-VH_1x04_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B4PS-VH_1x04_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B5P-VH-B_1x05_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B5P-VH-FB-B_1x05_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B5P-VH_1x05_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B5PS-VH_1x05_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B6P-VH-B_1x06_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B6P-VH-FB-B_1x06_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B6P-VH_1x06_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B6PS-VH_1x06_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B7P-VH-B_1x07_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B7P-VH-FB-B_1x07_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B7P-VH_1x07_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B7PS-VH_1x07_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B8P-VH-B_1x08_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B8P-VH-FB-B_1x08_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B8P-VH_1x08_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B8PS-VH_1x08_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_B9P-VH-B_1x09_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B9P-VH-FB-B_1x09_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B9P-VH_1x09_P3.96mm_Vertical\",\"Connector_JST/JST_VH_B9PS-VH_1x09_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_S2P-VH_1x02_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_S3P-VH_1x03_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_S4P-VH_1x04_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_S5P-VH_1x05_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_S6P-VH_1x06_P3.96mm_Horizontal\",\"Connector_JST/JST_VH_S7P-VH_1x07_P3.96mm_Horizontal\",\"Connector_JST/JST_XAG_SM05B-XAGKS-BN-TB_1x05-1MP_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_B02B-XASK-1-A_1x02_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B02B-XASK-1_1x02_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B03B-XASK-1-A_1x03_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B03B-XASK-1_1x03_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B04B-XASK-1-A_1x04_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B04B-XASK-1_1x04_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B05B-XASK-1-A_1x05_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B05B-XASK-1_1x05_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B06B-XASK-1-A_1x06_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B06B-XASK-1_1x06_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B07B-XASK-1-A_1x07_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B07B-XASK-1_1x07_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B08B-XASK-1-A_1x08_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B08B-XASK-1_1x08_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B09B-XASK-1-A_1x09_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B09B-XASK-1_1x09_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B10B-XASK-1-A_1x10_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B10B-XASK-1_1x10_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B11B-XASK-1-A_1x11_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B11B-XASK-1_1x11_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B12B-XASK-1-A_1x12_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B12B-XASK-1_1x12_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B13B-XASK-1-A_1x13_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B13B-XASK-1_1x13_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B14B-XASK-1-A_1x14_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B14B-XASK-1_1x14_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B15B-XASK-1-A_1x15_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B15B-XASK-1_1x15_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B18B-XASK-1_1x18_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B20B-XASK-1-A_1x20_P2.50mm_Vertical\",\"Connector_JST/JST_XA_B20B-XASK-1_1x20_P2.50mm_Vertical\",\"Connector_JST/JST_XA_S02B-XASK-1N-BN_1x02_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S02B-XASK-1_1x02_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S03B-XASK-1N-BN_1x03_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S03B-XASK-1_1x03_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S04B-XASK-1N-BN_1x04_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S04B-XASK-1_1x04_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S05B-XASK-1N-BN_1x05_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S05B-XASK-1_1x05_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S06B-XASK-1N-BN_1x06_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S06B-XASK-1_1x06_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S07B-XASK-1N-BN_1x07_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S07B-XASK-1_1x07_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S08B-XASK-1N-BN_1x08_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S08B-XASK-1_1x08_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S09B-XASK-1N-BN_1x09_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S09B-XASK-1_1x09_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S10B-XASK-1N-BN_1x10_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S10B-XASK-1_1x10_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S11B-XASK-1N-BN_1x11_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S11B-XASK-1_1x11_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S12B-XASK-1N-BN_1x12_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S12B-XASK-1_1x12_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S13B-XASK-1N-BN_1x13_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S13B-XASK-1_1x13_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S14B-XASK-1N-BN_1x14_P2.50mm_Horizontal\",\"Connector_JST/JST_XA_S14B-XASK-1_1x14_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_B10B-XH-AM_1x10_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B10B-XH-A_1x10_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B11B-XH-A_1x11_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B12B-XH-AM_1x12_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B12B-XH-A_1x12_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B13B-XH-A_1x13_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B14B-XH-A_1x14_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B15B-XH-A_1x15_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B16B-XH-A_1x16_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B1B-XH-AM_1x01_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B20B-XH-A_1x20_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B2B-XH-AM_1x02_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B3B-XH-AM_1x03_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B4B-XH-AM_1x04_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B5B-XH-AM_1x05_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B5B-XH-A_1x05_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B6B-XH-AM_1x06_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B6B-XH-A_1x06_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B7B-XH-AM_1x07_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B7B-XH-A_1x07_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B8B-XH-AM_1x08_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B8B-XH-A_1x08_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B9B-XH-AM_1x09_P2.50mm_Vertical\",\"Connector_JST/JST_XH_B9B-XH-A_1x09_P2.50mm_Vertical\",\"Connector_JST/JST_XH_S10B-XH-A-1_1x10_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S10B-XH-A_1x10_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S11B-XH-A-1_1x11_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S11B-XH-A_1x11_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S12B-XH-A-1_1x12_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S12B-XH-A_1x12_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S13B-XH-A-1_1x13_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S13B-XH-A_1x13_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S14B-XH-A-1_1x14_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S14B-XH-A_1x14_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S15B-XH-A-1_1x15_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S15B-XH-A_1x15_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S16B-XH-A_1x16_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S2B-XH-A-1_1x02_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S2B-XH-A_1x02_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S3B-XH-A-1_1x03_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S3B-XH-A_1x03_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S3B-XH-SM4-TB_1x03-1MP_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S4B-XH-A-1_1x04_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S4B-XH-A_1x04_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S4B-XH-SM4-TB_1x04-1MP_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S5B-XH-A-1_1x05_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S5B-XH-A_1x05_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S6B-XH-A-1_1x06_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S6B-XH-A_1x06_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S6B-XH-SM4-TB_1x06-1MP_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S7B-XH-A-1_1x07_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S7B-XH-A_1x07_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S8B-XH-A-1_1x08_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S8B-XH-A_1x08_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S9B-XH-A-1_1x09_P2.50mm_Horizontal\",\"Connector_JST/JST_XH_S9B-XH-A_1x09_P2.50mm_Horizontal\",\"Connector_JST/JST_ZE_B02B-ZESK-1D_1x02_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B03B-ZESK-1D_1x03_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B03B-ZESK-D_1x03_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B04B-ZESK-1D_1x04_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B04B-ZESK-D_1x04_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B05B-ZESK-1D_1x05_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B05B-ZESK-D_1x05_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B06B-ZESK-1D_1x06_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B06B-ZESK-D_1x06_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B07B-ZESK-1D_1x07_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B07B-ZESK-D_1x07_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B08B-ZESK-1D_1x08_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B08B-ZESK-D_1x08_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B09B-ZESK-1D_1x09_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B09B-ZESK-D_1x09_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B10B-ZESK-1D_1x10_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B10B-ZESK-D_1x10_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B11B-ZESK-1D_1x11_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B11B-ZESK-D_1x11_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B12B-ZESK-1D_1x12_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B12B-ZESK-D_1x12_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B13B-ZESK-1D_1x13_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B13B-ZESK-D_1x13_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B14B-ZESK-1D_1x14_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B14B-ZESK-D_1x14_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B15B-ZESK-1D_1x15_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B15B-ZESK-D_1x15_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B16B-ZESK-1D_1x16_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_B16B-ZESK-D_1x16_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM02B-ZESS-TBT_1x02-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM03B-ZESS-TBT_1x03-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM04B-ZESS-TBT_1x04-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM05B-ZESS-TBT_1x05-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM06B-ZESS-TBT_1x06-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM07B-ZESS-TBT_1x07-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM08B-ZESS-TBT_1x08-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM09B-ZESS-TBT_1x09-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM10B-ZESS-TBT_1x10-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM11B-ZESS-TBT_1x11-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM12B-ZESS-TBT_1x12-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM13B-ZESS-TBT_1x13-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM14B-ZESS-TBT_1x14-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM15B-ZESS-TBT_1x15-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_BM16B-ZESS-TBT_1x16-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZE_S02B-ZESK-2D_1x02_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S03B-ZESK-2D_1x03_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S04B-ZESK-2D_1x04_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S05B-ZESK-2D_1x05_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S06B-ZESK-2D_1x06_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S07B-ZESK-2D_1x07_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S08B-ZESK-2D_1x08_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S09B-ZESK-2D_1x09_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S10B-ZESK-2D_1x10_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S11B-ZESK-2D_1x11_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S12B-ZESK-2D_1x12_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S13B-ZESK-2D_1x13_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S14B-ZESK-2D_1x14_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S15B-ZESK-2D_1x15_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_S16B-ZESK-2D_1x16_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM02B-ZESS-TB_1x02-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM03B-ZESS-TB_1x03-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM04B-ZESS-TB_1x04-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM05B-ZESS-TB_1x05-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM06B-ZESS-TB_1x06-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM07B-ZESS-TB_1x07-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM08B-ZESS-TB_1x08-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM09B-ZESS-TB_1x09-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM10B-ZESS-TB_1x10-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM11B-ZESS-TB_1x11-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM12B-ZESS-TB_1x12-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM13B-ZESS-TB_1x13-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM14B-ZESS-TB_1x14-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM15B-ZESS-TB_1x15-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZE_SM16B-ZESS-TB_1x16-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_B10B-ZR-SM4-TF_1x10-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B10B-ZR_1x10_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B11B-ZR-SM4-TF_1x11-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B11B-ZR_1x11_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B12B-ZR-SM4-TF_1x12-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B12B-ZR_1x12_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B13B-ZR-SM4-TF_1x13-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B2B-ZR-SM4-TF_1x02-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B2B-ZR_1x02_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B3B-ZR-SM4-TF_1x03-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B3B-ZR_1x03_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B4B-ZR-SM4-TF_1x04-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B4B-ZR_1x04_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B5B-ZR-SM4-TF_1x05-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B5B-ZR_1x05_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B6B-ZR-SM4-TF_1x06-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B6B-ZR_1x06_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B7B-ZR-SM4-TF_1x07-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B7B-ZR_1x07_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B8B-ZR-SM4-TF_1x08-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B8B-ZR_1x08_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B9B-ZR-SM4-TF_1x09-1MP_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_B9B-ZR_1x09_P1.50mm_Vertical\",\"Connector_JST/JST_ZH_S10B-ZR-SM4A-TF_1x10-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S11B-ZR-SM4A-TF_1x11-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S12B-ZR-SM4A-TF_1x12-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S13B-ZR-SM4A-TF_1x13-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S2B-ZR-SM4A-TF_1x02-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S3B-ZR-SM4A-TF_1x03-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S4B-ZR-SM4A-TF_1x04-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S5B-ZR-SM4A-TF_1x05-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S6B-ZR-SM4A-TF_1x06-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S7B-ZR-SM4A-TF_1x07-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S8B-ZR-SM4A-TF_1x08-1MP_P1.50mm_Horizontal\",\"Connector_JST/JST_ZH_S9B-ZR-SM4A-TF_1x09-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502382-0270_1x02-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-0370_1x03-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-0470_1x04-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-0570_1x05-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-0670_1x06-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-0770_1x07-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-0870_1x08-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-0970_1x09-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-1070_1x10-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-1170_1x11-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-1270_1x12-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-1370_1x13-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-1470_1x14-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502382-1570_1x15-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502386-0270_1x02-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-0370_1x03-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-0470_1x04-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-0570_1x05-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-0670_1x06-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-0770_1x07-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-0870_1x08-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-0970_1x09-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-1070_1x10-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-1170_1x11-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-1270_1x12-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-1370_1x13-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-1470_1x14-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502386-1570_1x15-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502443-0270_1x02-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-0370_1x03-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-0470_1x04-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-0570_1x05-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-0670_1x06-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-0770_1x07-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-0870_1x08-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-0970_1x09-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-1270_1x12-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-1370_1x13-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-1470_1x14-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502443-1570_1x15-1MP_P2.00mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_502494-0270_1x02-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-0370_1x03-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-0470_1x04-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-0670_1x06-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-0870_1x08-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-1070_1x10-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-1270_1x12-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-1370_1x13-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-1470_1x14-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502494-1570_1x15-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0270_1x02-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0370_1x03-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0470_1x04-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0570_1x05-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0670_1x06-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0770_1x07-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0870_1x08-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-0970_1x09-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-1070_1x10-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-1170_1x11-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-1270_1x12-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-1370_1x13-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-1470_1x14-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_502585-1570_1x15-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_CLIK-Mate_505405-0270_1x02-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-0370_1x03-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-0470_1x04-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-0570_1x05-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-0670_1x06-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-0770_1x07-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-0870_1x08-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-0970_1x09-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-1070_1x10-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-1170_1x11-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-1270_1x12-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-1370_1x13-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-1470_1x14-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_CLIK-Mate_505405-1570_1x15-1MP_P1.50mm_Vertical\",\"Connector_Molex/Molex_DuraClik_502352-0200_1x02-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-0300_1x03-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-0400_1x04-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-0500_1x05-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-0600_1x06-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-0700_1x07-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-0800_1x08-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-0900_1x09-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-1000_1x10-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-1100_1x11-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-1200_1x12-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-1300_1x13-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-1400_1x14-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_DuraClik_502352-1500_1x15-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-03A_1x03_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-04A_1x04_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-05A_1x05_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-06A_1x06_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-07A_1x07_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-08A_1x08_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-09A_1x09_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-10A_1x10_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-11A_1x11_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-12A_1x12_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-13A_1x13_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-14A_1x14_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-15A_1x15_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-254_AE-6410-16A_1x16_P2.54mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-02A_1x02_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-03A_1x03_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-04A_1x04_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-05A_1x05_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-06A_1x06_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-07A_1x07_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-08A_1x08_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-09A_1x09_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-10A_1x10_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-11A_1x11_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_5273-12A_1x12_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0002_1x02_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0003_1x03_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0004_1x04_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0005_1x05_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0006_1x06_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0007_1x07_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0008_1x08_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0009_1x09_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0010_1x10_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0011_1x11_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0012_1x12_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0013_1x13_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0014_1x14_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0015_1x15_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0016_1x16_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0017_1x17_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41791-0018_1x18_P3.96mm_Vertical\",\"Connector_Molex/Molex_KK-396_A-41792-0002_1x02_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0003_1x03_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0004_1x04_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0005_1x05_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0006_1x06_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0007_1x07_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0008_1x08_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0009_1x09_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0010_1x10_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0011_1x11_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0012_1x12_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0013_1x13_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0014_1x14_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0015_1x15_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0016_1x16_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0017_1x17_P3.96mm_Horizontal\",\"Connector_Molex/Molex_KK-396_A-41792-0018_1x18_P3.96mm_Horizontal\",\"Connector_Molex/Molex_Mega-Fit_76825-0002_2x01_P5.70mm_Horizontal\",\"Connector_Molex/Molex_Mega-Fit_76825-0004_2x02_P5.70mm_Horizontal\",\"Connector_Molex/Molex_Mega-Fit_76825-0006_2x03_P5.70mm_Horizontal\",\"Connector_Molex/Molex_Mega-Fit_76825-0008_2x04_P5.70mm_Horizontal\",\"Connector_Molex/Molex_Mega-Fit_76825-0010_2x05_P5.70mm_Horizontal\",\"Connector_Molex/Molex_Mega-Fit_76825-0012_2x06_P5.70mm_Horizontal\",\"Connector_Molex/Molex_Mega-Fit_76829-0002_2x01_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0004_2x02_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0006_2x03_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0008_2x04_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0010_2x05_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0012_2x06_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0102_2x01_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0104_2x02_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0106_2x03_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0108_2x04_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0110_2x05_P5.70mm_Vertical\",\"Connector_Molex/Molex_Mega-Fit_76829-0112_2x06_P5.70mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0200_2x01_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0210_2x01-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0212_2x01_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0215_2x01_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0218_2x01-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0221_2x01-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0400_2x02_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0410_2x02-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0412_2x02_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0415_2x02_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0418_2x02-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0421_2x02-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0600_2x03_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0610_2x03-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0612_2x03_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0615_2x03_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0618_2x03-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0621_2x03-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0800_2x04_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0810_2x04-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0812_2x04_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0815_2x04_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0818_2x04-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-0821_2x04-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1000_2x05_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1010_2x05-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1012_2x05_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1015_2x05_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1018_2x05-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1021_2x05-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1200_2x06_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1210_2x06-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1212_2x06_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1215_2x06_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1218_2x06-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1221_2x06-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1400_2x07_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1410_2x07-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1412_2x07_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1415_2x07_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1418_2x07-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1421_2x07-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1600_2x08_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1610_2x08-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1612_2x08_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1615_2x08_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1618_2x08-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1621_2x08-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1800_2x09_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1810_2x09-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1812_2x09_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1815_2x09_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1818_2x09-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-1821_2x09-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2000_2x10_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2010_2x10-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2012_2x10_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2015_2x10_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2018_2x10-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2021_2x10-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2200_2x11_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2210_2x11-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2212_2x11_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2215_2x11_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2218_2x11-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2221_2x11-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2400_2x12_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2410_2x12-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2412_2x12_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2415_2x12_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2418_2x12-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43045-2421_2x12-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0200_1x02_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0210_1x02-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0210_1x02-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0212_1x02-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0215_1x02_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0221_1x02_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0224_1x02-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0300_1x03_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0310_1x03-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0310_1x03-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0312_1x03-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0315_1x03_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0321_1x03_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0324_1x03-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0400_1x04_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0410_1x04-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0410_1x04-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0412_1x04-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0415_1x04_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0421_1x04_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0424_1x04-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0500_1x05_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0510_1x05-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0510_1x05-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0512_1x05-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0515_1x05_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0521_1x05_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0524_1x05-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0600_1x06_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0610_1x06-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0610_1x06-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0612_1x06-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0615_1x06_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0621_1x06_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0624_1x06-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0700_1x07_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0710_1x07-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0710_1x07-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0712_1x07-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0715_1x07_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0721_1x07_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0724_1x07-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0800_1x08_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0810_1x08-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0810_1x08-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0812_1x08-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0815_1x08_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0821_1x08_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0824_1x08-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0900_1x09_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0910_1x09-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0910_1x09-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0912_1x09-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0915_1x09_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0921_1x09_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-0924_1x09-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1000_1x10_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1010_1x10-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1010_1x10-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1012_1x10-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1015_1x10_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1021_1x10_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1024_1x10-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1100_1x11_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1110_1x11-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1110_1x11-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1112_1x11-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1115_1x11_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1121_1x11_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1124_1x11-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1200_1x12_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1210_1x12-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1210_1x12-1MP_P3.00mm_Horizontal_PnP\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1212_1x12-1MP_P3.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1215_1x12_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1221_1x12_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Fit_3.0_43650-1224_1x12-1MP_P3.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0270_1x02_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0370_1x03_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0470_1x04_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0570_1x05_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0670_1x06_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0770_1x07_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0870_1x08_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-0970_1x09_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-1070_1x10_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-1170_1x11_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-1270_1x12_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-1370_1x13_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-1470_1x14_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53253-1570_1x15_P2.00mm_Vertical\",\"Connector_Molex/Molex_Micro-Latch_53254-0270_1x02_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-0370_1x03_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-0470_1x04_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-0570_1x05_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-0670_1x06_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-0770_1x07_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-0870_1x08_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-0970_1x09_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-1070_1x10_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-1170_1x11_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-1270_1x12_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-1370_1x13_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-1470_1x14_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Micro-Latch_53254-1570_1x15_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55932-0210_1x02_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0230_1x02_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0310_1x03_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0330_1x03_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0410_1x04_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0430_1x04_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0510_1x05_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0530_1x05_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0610_1x06_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0630_1x06_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0710_1x07_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0730_1x07_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0810_1x08_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0830_1x08_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0910_1x09_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-0930_1x09_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1010_1x10_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1030_1x10_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1110_1x11_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1130_1x11_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1210_1x12_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1230_1x12_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1310_1x13_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1330_1x13_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1410_1x14_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1430_1x14_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1510_1x15_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55932-1530_1x15_P2.00mm_Vertical\",\"Connector_Molex/Molex_MicroClasp_55935-0210_1x02_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0230_1x02_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0310_1x03_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0330_1x03_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0410_1x04_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0430_1x04_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0510_1x05_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0530_1x05_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0610_1x06_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0630_1x06_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0710_1x07_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0730_1x07_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0810_1x08_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0830_1x08_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0910_1x09_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-0930_1x09_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1010_1x10_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1030_1x10_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1110_1x11_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1130_1x11_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1210_1x12_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1230_1x12_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1310_1x13_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1330_1x13_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1410_1x14_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1430_1x14_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1510_1x15_P2.00mm_Horizontal\",\"Connector_Molex/Molex_MicroClasp_55935-1530_1x15_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-02A2_2x01_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-02A_2x01_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-04A2_2x02_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-04A_2x02_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-06A2_2x03_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-06A_2x03_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-08A2_2x04_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-08A_2x04_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-10A2_2x05_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-10A_2x05_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-12A2_2x06_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-12A_2x06_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-14A2_2x07_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-14A_2x07_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-16A2_2x08_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-16A_2x08_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-18A2_2x09_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-18A_2x09_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-20A2_2x10_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-20A_2x10_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-22A2_2x11_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-22A_2x11_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-24A2_2x12_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5566-24A_2x12_P4.20mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-02A1_2x01_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-02A2_2x01_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-04A1_2x02_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-04A2_2x02_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-06A1_2x03_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-06A2_2x03_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-08A1_2x04_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-08A2_2x04_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-10A1_2x05_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-10A2_2x05_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-12A1_2x06_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-12A2_2x06_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-14A1_2x07_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-14A2_2x07_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-16A1_2x08_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-16A2_2x08_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-18A1_2x09_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-18A2_2x09_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-20A1_2x10_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-20A2_2x10_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-22A1_2x11_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-22A2_2x11_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-24A1_2x12_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Jr_5569-24A2_2x12_P4.20mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-22XX_1x02_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-22XX_1x02_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-32XX_1x03_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-32XX_1x03_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-42XX_1x04_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-42XX_1x04_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-52XX_1x05_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-52XX_1x05_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-62XX_1x06_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_42819-62XX_1x06_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-22XX_1x02_P10.00mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-22XX_1x02_P10.00mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-32XX_1x03_P10.00mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-32XX_1x03_P10.00mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-42XX_1x04_P10.00mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-42XX_1x04_P10.00mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-52XX_1x05_P10.00mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-52XX_1x05_P10.00mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-62XX_1x06_P10.00mm_Horizontal\",\"Connector_Molex/Molex_Mini-Fit_Sr_42820-62XX_1x06_P10.00mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx06_2x03_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx06_2x03_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx08_2x04_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx08_2x04_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx10_2x05_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx10_2x05_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx12_2x06_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx12_2x06_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx14_2x07_P10.00mm_Vertical\",\"Connector_Molex/Molex_Mini-Fit_Sr_43915-xx14_2x07_P10.00mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Nano-Fit_105309-xx02_1x02_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105309-xx03_1x03_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105309-xx04_1x04_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105309-xx05_1x05_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105309-xx06_1x06_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105309-xx07_1x07_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105309-xx08_1x08_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105310-xx04_2x02_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105310-xx06_2x03_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105310-xx08_2x04_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105310-xx10_2x05_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105310-xx12_2x06_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105310-xx14_2x07_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105310-xx16_2x08_P2.50mm_Vertical\",\"Connector_Molex/Molex_Nano-Fit_105313-xx02_1x02_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105313-xx03_1x03_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105313-xx04_1x04_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105313-xx05_1x05_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105313-xx06_1x06_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105313-xx07_1x07_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105313-xx08_1x08_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105314-xx04_2x02_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105314-xx06_2x03_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105314-xx08_2x04_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105314-xx10_2x05_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105314-xx12_2x06_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105314-xx14_2x07_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Nano-Fit_105314-xx16_2x08_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0270_1x02-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0370_1x03-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0470_1x04-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0570_1x05-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0670_1x06-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0770_1x07-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0870_1x08-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-0970_1x09-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-1070_1x10-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-1270_1x12-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-1470_1x14-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-1570_1x15-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-1870_1x18-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Panelmate_53780-3070_1x30-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0207_1x02-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0307_1x03-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0407_1x04-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0507_1x05-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0607_1x06-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0707_1x07-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0807_1x08-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-0907_1x09-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-1007_1x10-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-1107_1x11-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-1207_1x12-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-1307_1x13-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-1407_1x14-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_202396-1507_1x15-1MP_P1.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Clasp_501331-0207_1x02-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-0307_1x03-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-0407_1x04-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-0507_1x05-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-0607_1x06-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-0707_1x07-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-0807_1x08-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-0907_1x09-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-1007_1x10-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-1107_1x11-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-1207_1x12-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-1307_1x13-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-1407_1x14-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-Clasp_501331-1507_1x15-1MP_P1.00mm_Vertical\",\"Connector_Molex/Molex_Pico-EZmate_78171-0002_1x02-1MP_P1.20mm_Vertical\",\"Connector_Molex/Molex_Pico-EZmate_78171-0003_1x03-1MP_P1.20mm_Vertical\",\"Connector_Molex/Molex_Pico-EZmate_78171-0004_1x04-1MP_P1.20mm_Vertical\",\"Connector_Molex/Molex_Pico-EZmate_78171-0005_1x05-1MP_P1.20mm_Vertical\",\"Connector_Molex/Molex_Pico-EZmate_Slim_202656-0021_1x02-1MP_P1.20mm_Vertical\",\"Connector_Molex/Molex_Pico-Lock_205338-0002_1x02-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_205338-0004_1x04-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_205338-0006_1x06-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_205338-0008_1x08-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_205338-0010_1x10-1MP_P2.00mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0291_1x02-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0391_1x03-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0491_1x04-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0591_1x05-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0691_1x06-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0791_1x07-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0891_1x08-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-0991_1x09-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-1091_1x10-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-1191_1x11-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-Lock_504050-1291_1x12-1MP_P1.50mm_Horizontal\",\"Connector_Molex/Molex_Pico-SPOX_87437-1443_1x14-P1.5mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0210_1x02_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0310_1x03_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0410_1x04_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0510_1x05_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0610_1x06_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0710_1x07_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0810_1x08_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-0910_1x09_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-1010_1x10_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-1110_1x11_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-1210_1x12_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-1310_1x13_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-1410_1x14_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53047-1510_1x15_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53048-0210_1x02_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-0310_1x03_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-0410_1x04_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-0510_1x05_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-0610_1x06_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-0710_1x07_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-0810_1x08_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-0910_1x09_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-1010_1x10_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-1110_1x11_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-1210_1x12_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-1310_1x13_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-1410_1x14_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53048-1510_1x15_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0271_1x02-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0371_1x03-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0471_1x04-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0571_1x05-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0671_1x06-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0771_1x07-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0871_1x08-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-0971_1x09-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-1071_1x10-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-1171_1x11-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-1271_1x12-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-1371_1x13-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-1471_1x14-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-1571_1x15-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53261-1771_1x17-1MP_P1.25mm_Horizontal\",\"Connector_Molex/Molex_PicoBlade_53398-0271_1x02-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-0371_1x03-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-0471_1x04-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-0571_1x05-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-0671_1x06-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-0771_1x07-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-0871_1x08-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-0971_1x09-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-1071_1x10-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-1171_1x11-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-1271_1x12-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-1371_1x13-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-1471_1x14-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_PicoBlade_53398-1571_1x15-1MP_P1.25mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0004_2x02_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0006_2x03_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0008_2x04_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0010_2x05_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0012_2x06_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0014_2x07_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0016_2x08_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0018_2x09_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0020_2x10_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0022_2x11_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0024_2x12_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90325-0026_2x13_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0004_2x02_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0006_2x03_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0008_2x04_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0010_2x05_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0012_2x06_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0014_2x07_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0016_2x08_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0018_2x09_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0020_2x10_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0022_2x11_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0024_2x12_P1.27mm_Vertical\",\"Connector_Molex/Molex_Picoflex_90814-0026_2x13_P1.27mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0002_1x02_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0003_1x03_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0004_1x04_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0005_1x05_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0006_1x06_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0007_1x07_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0008_1x08_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0009_1x09_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0010_1x10_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0011_1x11_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0012_1x12_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0013_1x13_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0014_1x14_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0015_1x15_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0016_1x16_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0017_1x17_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0018_1x18_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0019_1x19_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0020_1x20_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0021_1x21_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0022_1x22_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0023_1x23_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0024_1x24_P2.54mm_Vertical\",\"Connector_Molex/Molex_SL_171971-0025_1x25_P2.54mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-02A_1x02_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-03A_1x03_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-04A_1x04_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-05A_1x05_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-06A_1x06_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-07A_1x07_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-08A_1x08_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-09A_1x09_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-10A_1x10_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-11A_1x11_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-12A_1x12_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-13A_1x13_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-14A_1x14_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5267-15A_1x15_P2.50mm_Vertical\",\"Connector_Molex/Molex_SPOX_5268-02A_1x02_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-03A_1x03_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-04A_1x04_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-05A_1x05_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-06A_1x06_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-07A_1x07_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-08A_1x08_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-09A_1x09_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-10A_1x10_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-11A_1x11_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-12A_1x12_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-13A_1x13_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-14A_1x14_P2.50mm_Horizontal\",\"Connector_Molex/Molex_SPOX_5268-15A_1x15_P2.50mm_Horizontal\",\"Connector_Molex/Molex_Sabre_43160-0102_1x02_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-0102_1x02_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-0103_1x03_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-0103_1x03_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-0104_1x04_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-0104_1x04_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-0105_1x05_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-0105_1x05_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-0106_1x06_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-0106_1x06_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-1102_1x02_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_43160-1102_1x02_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-1103_1x03_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_43160-1103_1x03_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-1104_1x04_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_43160-1104_1x04_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-1105_1x05_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_43160-1105_1x05_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-1106_1x06_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_43160-1106_1x06_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-2102_1x02_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-2102_1x02_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-2103_1x03_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-2103_1x03_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-2104_1x04_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-2104_1x04_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-2105_1x05_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-2105_1x05_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_43160-2106_1x06_P7.49mm_Vertical\",\"Connector_Molex/Molex_Sabre_43160-2106_1x06_P7.49mm_Vertical_ThermalVias\",\"Connector_Molex/Molex_Sabre_46007-1102_1x02_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_46007-1102_1x02_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_46007-1103_1x03_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_46007-1103_1x03_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_46007-1104_1x04_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_46007-1104_1x04_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_46007-1105_1x05_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_46007-1105_1x05_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_Sabre_46007-1106_1x06_P7.49mm_Horizontal\",\"Connector_Molex/Molex_Sabre_46007-1106_1x06_P7.49mm_Horizontal_ThermalVias\",\"Connector_Molex/Molex_SlimStack_501920-3001_2x15_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_501920-4001_2x20_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_501920-5001_2x25_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-0810_2x04_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-1410_2x07_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-2010_2x10_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-2210_2x11_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-2410_2x12_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-2610_2x13_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-3010_2x15_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-3210_2x16_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-3410_2x17_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-4010_2x20_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-4410_2x22_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-5010_2x25_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-6010_2x30_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-6410_2x32_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502426-8010_2x40_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-0820_2x04_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-1410_2x07_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-2010_2x10_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-2210_2x11_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-2410_2x12_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-2610_2x13_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-3010_2x15_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-3210_2x16_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-3410_2x17_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-4010_2x20_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-4410_2x22_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-5010_2x25_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-6010_2x30_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-6410_2x32_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_502430-8010_2x40_P0.40mm_Vertical\",\"Connector_Molex/Molex_SlimStack_52991-0208_2x10_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_52991-0308_2x15_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_52991-0408_2x20_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_52991-0508_2x25_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_52991-0608_2x30_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_52991-0708_2x35_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_52991-0808_2x40_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_53748-0208_2x10_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_53748-0308_2x15_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_53748-0408_2x20_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_53748-0608_2x30_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_53748-0708_2x35_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_53748-0808_2x40_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0164_2x08_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0204_2x10_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0224_2x11_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0244_2x12_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0304_2x15_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0344_2x17_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0404_2x20_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0504_2x25_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0604_2x30_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_54722-0804_2x40_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0161_2x08_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0201_2x10_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0221_2x11_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0241_2x12_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0301_2x15_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0341_2x17_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0401_2x20_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0501_2x25_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0601_2x30_P0.50mm_Vertical\",\"Connector_Molex/Molex_SlimStack_55560-0801_2x40_P0.50mm_Vertical\",\"Connector_Molex_Milligrid/Molex_8783204xx_2x02_P2.0mm_Header_Vertical\",\"Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical\",\"Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical\",\"Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical\",\"Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical\",\"Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783214xx_2x07_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783214xx_2x07_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783216xx_2x08_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783216xx_2x08_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783218xx_2x09_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783218xx_2x09_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783220xx_2x10_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783220xx_2x10_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783222xx_2x11_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783222xx_2x11_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783224xx_2x12_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783224xx_2x12_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783226xx_2x13_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783226xx_2x13_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783228xx_2x14_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783228xx_2x14_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783230xx_2x15_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783230xx_2x15_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783232xx_2x16_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783232xx_2x16_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783234xx_2x17_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783234xx_2x17_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783236xx_2x18_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783236xx_2x18_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783238xx_2x19_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783238xx_2x19_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783240xx_2x20_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783240xx_2x20_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783242xx_2x21_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783242xx_2x21_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783244xx_2x22_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783244xx_2x22_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783246xx_2x23_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783246xx_2x23_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783248xx_2x24_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783248xx_2x24_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_Molex_Milligrid/Molex_8783250xx_2x25_P2.0mm_Header_Vertical_Polarized\",\"Connector_Molex_Milligrid/Molex_8783250xx_2x25_P2.0mm_Header_Vertical_Polarized_MountingPegs\",\"Connector_PCBEdge/4UCON_10156_2x40_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/BUS_AT\",\"Connector_PCBEdge/BUS_PCI\",\"Connector_PCBEdge/BUS_PCI_Express_Mini\",\"Connector_PCBEdge/BUS_PCI_Express_Mini_Dual\",\"Connector_PCBEdge/BUS_PCI_Express_Mini_Full\",\"Connector_PCBEdge/BUS_PCI_Express_Mini_Half\",\"Connector_PCBEdge/BUS_PCIexpress_x1\",\"Connector_PCBEdge/BUS_PCIexpress_x16\",\"Connector_PCBEdge/BUS_PCIexpress_x4\",\"Connector_PCBEdge/BUS_PCIexpress_x8\",\"Connector_PCBEdge/DEC_double_long\",\"Connector_PCBEdge/DEC_double_short\",\"Connector_PCBEdge/DEC_quad_long\",\"Connector_PCBEdge/DEC_quad_short\",\"Connector_PCBEdge/DEC_single_long\",\"Connector_PCBEdge/DEC_single_short\",\"Connector_PCBEdge/JAE_MM60-EZH039-Bx_BUS_PCI_Express_Holder\",\"Connector_PCBEdge/JAE_MM60-EZH059-Bx_BUS_PCI_Express_Holder\",\"Connector_PCBEdge/M.2_22110-xx-B\",\"Connector_PCBEdge/M.2_22110-xx-M\",\"Connector_PCBEdge/M.2_2230-xx-A\",\"Connector_PCBEdge/M.2_2230-xx-B\",\"Connector_PCBEdge/M.2_2230-xx-E\",\"Connector_PCBEdge/M.2_2230-xx-M\",\"Connector_PCBEdge/M.2_2242-xx-B\",\"Connector_PCBEdge/M.2_2242-xx-M\",\"Connector_PCBEdge/M.2_2260-xx-B\",\"Connector_PCBEdge/M.2_2260-xx-M\",\"Connector_PCBEdge/M.2_2280-xx-B\",\"Connector_PCBEdge/M.2_2280-xx-M\",\"Connector_PCBEdge/M.2_3030-xx-A\",\"Connector_PCBEdge/M.2_3030-xx-E\",\"Connector_PCBEdge/M.2_3042-xx-B\",\"Connector_PCBEdge/SODIMM-200_1.8V_Card_edge\",\"Connector_PCBEdge/SODIMM-200_2.5V_Card_edge\",\"Connector_PCBEdge/SODIMM-260_DDR4_H4.0-5.2_OrientationStd_Socket\",\"Connector_PCBEdge/Samtec_MECF-05-01-L-DV-WT_2x05_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-01-L-DV_2x05_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-01-NP-L-DV-WT_2x05_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-01-NP-L-DV_2x05_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-02-L-DV-WT_2x05_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-02-L-DV_2x05_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-02-NP-L-DV-WT_2x05_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-02-NP-L-DV_2x05_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-05-0_-L-DV_2x05_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-05-0_-NP-L-DV_2x05_P1.27mm_Edge\",\"Connector_PCBEdge/Samtec_MECF-08-01-L-DV-WT_2x08_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-01-L-DV_2x08_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-01-NP-L-DV-WT_2x08_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-01-NP-L-DV_2x08_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-02-L-DV-WT_2x08_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-02-L-DV_2x08_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-02-NP-L-DV-WT_2x08_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-02-NP-L-DV_2x08_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-08-0_-L-DV_2x08_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-08-0_-NP-L-DV_2x08_P1.27mm_Edge\",\"Connector_PCBEdge/Samtec_MECF-20-01-L-DV-WT_2x20_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-01-L-DV_2x20_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-01-NP-L-DV-WT_2x20_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-01-NP-L-DV_2x20_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-02-L-DV-WT_2x20_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-02-L-DV_2x20_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-02-NP-L-DV-WT_2x20_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-02-NP-L-DV_2x20_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-20-0_-L-DV_2x20_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-20-0_-NP-L-DV_2x20_P1.27mm_Edge\",\"Connector_PCBEdge/Samtec_MECF-30-01-L-DV-WT_2x30_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-01-L-DV_2x30_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-01-NP-L-DV-WT_2x30_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-01-NP-L-DV_2x30_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-02-L-DV-WT_2x30_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-02-L-DV_2x30_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-02-NP-L-DV-WT_2x30_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-02-NP-L-DV_2x30_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-30-0_-L-DV_2x30_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-30-0_-NP-L-DV_2x30_P1.27mm_Edge\",\"Connector_PCBEdge/Samtec_MECF-40-01-L-DV-WT_2x40_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-01-L-DV_2x40_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-01-NP-L-DV-WT_2x40_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-01-NP-L-DV_2x40_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-02-L-DV-WT_2x40_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-02-L-DV_2x40_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-02-NP-L-DV-WT_2x40_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-02-NP-L-DV_2x40_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-40-0_-L-DV_2x40_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-40-0_-NP-L-DV_2x40_P1.27mm_Edge\",\"Connector_PCBEdge/Samtec_MECF-50-01-L-DV-WT_2x50_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-01-L-DV_2x50_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-01-NP-L-DV-WT_2x50_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-01-NP-L-DV_2x50_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-02-L-DV-WT_2x50_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-02-L-DV_2x50_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-02-NP-L-DV-WT_2x50_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-02-NP-L-DV_2x50_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-50-0_-L-DV_2x50_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-50-0_-NP-L-DV_2x50_P1.27mm_Edge\",\"Connector_PCBEdge/Samtec_MECF-60-01-L-DV-WT_2x60_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-01-L-DV_2x60_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-01-NP-L-DV-WT_2x60_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-01-NP-L-DV_2x60_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-02-L-DV-WT_2x60_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-02-L-DV_2x60_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-02-NP-L-DV-WT_2x60_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-02-NP-L-DV_2x60_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-60-0_-L-DV_2x60_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-60-0_-NP-L-DV_2x60_P1.27mm_Edge\",\"Connector_PCBEdge/Samtec_MECF-70-01-L-DV-WT_2x70_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-01-L-DV_2x70_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-01-NP-L-DV-WT_2x70_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-01-NP-L-DV_2x70_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-02-L-DV-WT_2x70_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-02-L-DV_2x70_P1.27mm_Polarized_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-02-NP-L-DV-WT_2x70_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-02-NP-L-DV_2x70_P1.27mm_Socket_Horizontal\",\"Connector_PCBEdge/Samtec_MECF-70-0_-L-DV_2x70_P1.27mm_Polarized_Edge\",\"Connector_PCBEdge/Samtec_MECF-70-0_-NP-L-DV_2x70_P1.27mm_Edge\",\"Connector_PCBEdge/molex_EDGELOCK_2-CKT\",\"Connector_PCBEdge/molex_EDGELOCK_4-CKT\",\"Connector_PCBEdge/molex_EDGELOCK_6-CKT\",\"Connector_PCBEdge/molex_EDGELOCK_8-CKT\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_10-G-7,62_1x10_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_10-G_1x10_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_11-G-7,62_1x11_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_11-G_1x11_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_12-G-7,62_1x12_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_12-G_1x12_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_2-G-7,62_1x02_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_2-G_1x02_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_3-G-7,62_1x03_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_3-G_1x03_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_4-G-7,62_1x04_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_4-G_1x04_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_5-G-7,62_1x05_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_5-G_1x05_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_6-G-7,62_1x06_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_6-G_1x06_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_7-G-7,62_1x07_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_7-G_1x07_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_8-G-7,62_1x08_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_8-G_1x08_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_9-G-7,62_1x09_P7.62mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_9-G_1x09_P7.50mm_Horizontal\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_10-G-7,62_1x10_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_10-G_1x10_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_11-G-7,62_1x11_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_11-G_1x11_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_12-G-7,62_1x12_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_12-G_1x12_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_2-G-7,62_1x02_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_2-G_1x02_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_3-G-7,62_1x03_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_3-G_1x03_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_4-G-7,62_1x04_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_4-G_1x04_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_5-G-7,62_1x05_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_5-G_1x05_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_6-G-7,62_1x06_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_6-G_1x06_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_7-G-7,62_1x07_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_7-G_1x07_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_8-G-7,62_1x08_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_8-G_1x08_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_9-G-7,62_1x09_P7.62mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_9-G_1x09_P7.50mm_Vertical\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_10-GF-7,62_1x10_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_10-GF-7,62_1x10_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_11-GF-7,62_1x11_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_11-GF-7,62_1x11_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_12-GF-7,62_1x12_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_12-GF-7,62_1x12_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_2-GF-7,62_1x02_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_2-GF-7,62_1x02_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_3-GF-7,62_1x03_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_3-GF-7,62_1x03_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_4-GF-7,62_1x04_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_4-GF-7,62_1x04_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_5-GF-7,62_1x05_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_5-GF-7,62_1x05_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_6-GF-7,62_1x06_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_6-GF-7,62_1x06_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_7-GF-7,62_1x07_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_7-GF-7,62_1x07_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_8-GF-7,62_1x08_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_8-GF-7,62_1x08_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_9-GF-7,62_1x09_P7.62mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_9-GF-7,62_1x09_P7.62mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_10-GF-7,62_1x10_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_10-GF-7,62_1x10_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_11-GF-7,62_1x11_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_11-GF-7,62_1x11_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_12-GF-7,62_1x12_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_12-GF-7,62_1x12_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_2-GF-7,62_1x02_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_2-GF-7,62_1x02_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_3-GF-7,62_1x03_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_3-GF-7,62_1x03_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_4-GF-7,62_1x04_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_4-GF-7,62_1x04_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_5-GF-7,62_1x05_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_5-GF-7,62_1x05_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_6-GF-7,62_1x06_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_6-GF-7,62_1x06_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_7-GF-7,62_1x07_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_7-GF-7,62_1x07_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_8-GF-7,62_1x08_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_8-GF-7,62_1x08_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_9-GF-7,62_1x09_P7.62mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_9-GF-7,62_1x09_P7.62mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-G-3.5_1x10_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-G-3.81_1x10_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.5_1x10_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.5_1x10_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.81_1x10_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.81_1x10_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-G-3.5_1x11_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-G-3.81_1x11_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.5_1x11_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.5_1x11_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.81_1x11_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.81_1x11_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-G-3.5_1x12_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-G-3.81_1x12_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.5_1x12_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.5_1x12_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.81_1x12_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.81_1x12_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-G-3.5_1x13_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-G-3.81_1x13_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.5_1x13_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.5_1x13_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.81_1x13_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.81_1x13_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-G-3.5_1x14_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-G-3.81_1x14_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.5_1x14_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.5_1x14_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.81_1x14_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.81_1x14_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-G-3.5_1x15_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-G-3.81_1x15_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.5_1x15_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.5_1x15_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.81_1x15_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.81_1x15_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-G-3.5_1x16_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-G-3.81_1x16_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.5_1x16_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.5_1x16_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.81_1x16_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.81_1x16_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-G-3.5_1x02_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-G-3.81_1x02_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.5_1x02_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.5_1x02_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.81_1x02_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.81_1x02_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-G-3.5_1x03_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-G-3.81_1x03_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.5_1x03_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.5_1x03_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.81_1x03_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.81_1x03_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-G-3.5_1x04_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-G-3.81_1x04_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.5_1x04_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.5_1x04_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.81_1x04_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.81_1x04_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-G-3.5_1x05_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-G-3.81_1x05_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.5_1x05_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.5_1x05_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.81_1x05_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.81_1x05_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-G-3.5_1x06_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-G-3.81_1x06_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.5_1x06_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.5_1x06_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.81_1x06_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.81_1x06_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-G-3.5_1x07_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-G-3.81_1x07_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.5_1x07_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.5_1x07_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.81_1x07_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.81_1x07_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-G-3.5_1x08_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-G-3.81_1x08_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.5_1x08_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.5_1x08_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.81_1x08_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.81_1x08_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-G-3.5_1x09_P3.50mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-G-3.81_1x09_P3.81mm_Vertical\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.5_1x09_P3.50mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.5_1x09_P3.50mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.81_1x09_P3.81mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.81_1x09_P3.81mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-G-3.5_1x10_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-G-3.81_1x10_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.5_1x10_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.5_1x10_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.81_1x10_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.81_1x10_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-G-3.5_1x11_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-G-3.81_1x11_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.5_1x11_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.5_1x11_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.81_1x11_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.81_1x11_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-G-3.5_1x12_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-G-3.81_1x12_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.5_1x12_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.5_1x12_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.81_1x12_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.81_1x12_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-G-3.5_1x13_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-G-3.81_1x13_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.5_1x13_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.5_1x13_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.81_1x13_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.81_1x13_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-G-3.5_1x14_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-G-3.81_1x14_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.5_1x14_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.5_1x14_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.81_1x14_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.81_1x14_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-G-3.5_1x15_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-G-3.81_1x15_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.5_1x15_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.5_1x15_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.81_1x15_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.81_1x15_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-G-3.5_1x16_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-G-3.81_1x16_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.5_1x16_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.5_1x16_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.81_1x16_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.81_1x16_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-G-3.5_1x02_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-G-3.81_1x02_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.5_1x02_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.5_1x02_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.81_1x02_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.81_1x02_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-G-3.5_1x03_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-G-3.81_1x03_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.5_1x03_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.5_1x03_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.81_1x03_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.81_1x03_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-G-3.5_1x04_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-G-3.81_1x04_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.5_1x04_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.5_1x04_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.81_1x04_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.81_1x04_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-G-3.5_1x05_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-G-3.81_1x05_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.5_1x05_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.5_1x05_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.81_1x05_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.81_1x05_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-G-3.5_1x06_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-G-3.81_1x06_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.5_1x06_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.5_1x06_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.81_1x06_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.81_1x06_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-G-3.5_1x07_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-G-3.81_1x07_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.5_1x07_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.5_1x07_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.81_1x07_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.81_1x07_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-G-3.5_1x08_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-G-3.81_1x08_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.5_1x08_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.5_1x08_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.81_1x08_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.81_1x08_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-G-3.5_1x09_P3.50mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-G-3.81_1x09_P3.81mm_Horizontal\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.5_1x09_P3.50mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.5_1x09_P3.50mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.81_1x09_P3.81mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.81_1x09_P3.81mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_10-G-5.08_1x10_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_10-GF-5.08_1x10_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_10-GF-5.08_1x10_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_11-G-5.08_1x11_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_11-GF-5.08_1x11_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_11-GF-5.08_1x11_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_12-G-5.08_1x12_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_12-GF-5.08_1x12_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_12-GF-5.08_1x12_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_2-G-5.08_1x02_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_2-GF-5.08_1x02_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_2-GF-5.08_1x02_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_3-G-5.08_1x03_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_3-GF-5.08_1x03_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_3-GF-5.08_1x03_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_4-G-5.08_1x04_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_4-GF-5.08_1x04_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_4-GF-5.08_1x04_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_5-G-5.08_1x05_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_5-GF-5.08_1x05_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_5-GF-5.08_1x05_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_6-G-5.08_1x06_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_6-GF-5.08_1x06_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_6-GF-5.08_1x06_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_7-G-5.08_1x07_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_7-GF-5.08_1x07_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_7-GF-5.08_1x07_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_8-G-5.08_1x08_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_8-GF-5.08_1x08_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_8-GF-5.08_1x08_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_9-G-5.08_1x09_P5.08mm_Vertical\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_9-GF-5.08_1x09_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_9-GF-5.08_1x09_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_10-G-5.08_1x10_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_10-GF-5.08_1x10_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_10-GF-5.08_1x10_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_11-G-5.08_1x11_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_11-GF-5.08_1x11_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_11-GF-5.08_1x11_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_12-G-5.08_1x12_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_12-GF-5.08_1x12_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_12-GF-5.08_1x12_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_2-G-5.08_1x02_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_2-GF-5.08_1x02_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_2-GF-5.08_1x02_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_3-G-5.08_1x03_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_3-GF-5.08_1x03_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_3-GF-5.08_1x03_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_4-G-5.08_1x04_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_4-GF-5.08_1x04_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_4-GF-5.08_1x04_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_5-G-5.08_1x05_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_5-GF-5.08_1x05_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_5-GF-5.08_1x05_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_6-G-5.08_1x06_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_6-GF-5.08_1x06_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_6-GF-5.08_1x06_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_7-G-5.08_1x07_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_7-GF-5.08_1x07_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_7-GF-5.08_1x07_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_8-G-5.08_1x08_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_8-GF-5.08_1x08_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_8-GF-5.08_1x08_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_9-G-5.08_1x09_P5.08mm_Horizontal\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_9-GF-5.08_1x09_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_9-GF-5.08_1x09_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_10-G-5,08_1x10_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_10-G_1x10_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_11-G-5,08_1x11_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_11-G_1x11_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_12-G-5,08_1x12_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_12-G_1x12_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_13-G-5,08_1x13_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_13-G_1x13_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_14-G-5,08_1x14_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_14-G_1x14_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_15-G-5,08_1x15_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_15-G_1x15_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_16-G-5,08_1x16_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_16-G_1x16_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_2-G-5,08_1x02_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_2-G_1x02_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_3-G-5,08_1x03_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_3-G_1x03_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_4-G-5,08_1x04_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_4-G_1x04_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_5-G-5,08_1x05_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_5-G_1x05_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_6-G-5,08_1x06_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_6-G_1x06_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_7-G-5,08_1x07_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_7-G_1x07_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_8-G-5,08_1x08_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_8-G_1x08_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_9-G-5,08_1x09_P5.08mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_9-G_1x09_P5.00mm_Horizontal\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_10-G-5,08_1x10_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_10-G_1x10_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_11-G-5,08_1x11_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_11-G_1x11_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_12-G-5,08_1x12_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_12-G_1x12_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_13-G-5,08_1x13_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_13-G_1x13_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_14-G-5,08_1x14_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_14-G_1x14_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_15-G-5,08_1x15_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_15-G_1x15_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_16-G-5,08_1x16_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_16-G_1x16_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_2-G-5,08_1x02_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_2-G_1x02_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_3-G-5,08_1x03_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_3-G_1x03_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_4-G-5,08_1x04_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_4-G_1x04_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_5-G-5,08_1x05_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_5-G_1x05_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_6-G-5,08_1x06_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_6-G_1x06_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_7-G-5,08_1x07_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_7-G_1x07_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_8-G-5,08_1x08_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_8-G_1x08_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_9-G-5,08_1x09_P5.08mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_9-G_1x09_P5.00mm_Vertical\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF-5,08_1x10_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF-5,08_1x10_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF_1x10_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF_1x10_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF-5,08_1x11_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF-5,08_1x11_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF_1x11_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF_1x11_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF-5,08_1x12_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF-5,08_1x12_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF_1x12_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF_1x12_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF-5,08_1x13_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF-5,08_1x13_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF_1x13_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF_1x13_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF-5,08_1x14_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF-5,08_1x14_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF_1x14_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF_1x14_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF-5,08_1x15_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF-5,08_1x15_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF_1x15_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF_1x15_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF-5,08_1x16_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF-5,08_1x16_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF_1x16_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF_1x16_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF-5,08_1x02_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF-5,08_1x02_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF_1x02_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF_1x02_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF-5,08_1x03_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF-5,08_1x03_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF_1x03_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF_1x03_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF-5,08_1x04_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF-5,08_1x04_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF_1x04_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF_1x04_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF-5,08_1x05_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF-5,08_1x05_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF_1x05_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF_1x05_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF-5,08_1x06_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF-5,08_1x06_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF_1x06_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF_1x06_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF-5,08_1x07_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF-5,08_1x07_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF_1x07_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF_1x07_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF-5,08_1x08_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF-5,08_1x08_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF_1x08_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF_1x08_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF-5,08_1x09_P5.08mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF-5,08_1x09_P5.08mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF_1x09_P5.00mm_Vertical_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF_1x09_P5.00mm_Vertical_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF-5,08_1x10_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF-5,08_1x10_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF_1x10_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF_1x10_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF-5,08_1x11_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF-5,08_1x11_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF_1x11_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF_1x11_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF-5,08_1x12_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF-5,08_1x12_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF_1x12_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF_1x12_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF-5,08_1x13_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF-5,08_1x13_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF_1x13_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF_1x13_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF-5,08_1x14_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF-5,08_1x14_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF_1x14_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF_1x14_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF-5,08_1x15_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF-5,08_1x15_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF_1x15_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF_1x15_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF-5,08_1x16_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF-5,08_1x16_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF_1x16_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF_1x16_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF-5,08_1x02_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF-5,08_1x02_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF_1x02_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF_1x02_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF-5,08_1x03_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF-5,08_1x03_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF_1x03_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF_1x03_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF-5,08_1x04_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF-5,08_1x04_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF_1x04_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF_1x04_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF-5,08_1x05_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF-5,08_1x05_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF_1x05_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF_1x05_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF-5,08_1x06_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF-5,08_1x06_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF_1x06_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF_1x06_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF-5,08_1x07_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF-5,08_1x07_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF_1x07_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF_1x07_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF-5,08_1x08_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF-5,08_1x08_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF_1x08_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF_1x08_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF-5,08_1x09_P5.08mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF-5,08_1x09_P5.08mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF_1x09_P5.00mm_Horizontal_ThreadedFlange\",\"Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF_1x09_P5.00mm_Horizontal_ThreadedFlange_MountHole\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_10-H-3.5_1x10_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_11-H-3.5_1x11_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_12-H-3.5_1x12_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_2-H-3.5_1x02_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_3-H-3.5_1x03_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_4-H-3.5_1x04_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_5-H-3.5_1x05_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_6-H-3.5_1x06_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_7-H-3.5_1x07_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_8-H-3.5_1x08_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_9-H-3.5_1x09_P3.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_1-H-5.0_1x01_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_10-H-5.0-EX_1x10_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_10-H-5.0_1x10_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_10-V-5.0-EX_1x10_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_11-H-5.0-EX_1x11_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_11-H-5.0_1x11_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_11-V-5.0-EX_1x11_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_12-H-5.0-EX_1x12_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_12-H-5.0_1x12_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_12-V-5.0-EX_1x12_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_2-H-5.0-EX_1x02_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_2-H-5.0_1x02_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_2-V-5.0-EX_1x02_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_3-H-5.0-EX_1x03_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_3-H-5.0_1x03_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_3-V-5.0-EX_1x03_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_4-H-5.0-EX_1x04_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_4-H-5.0_1x04_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_4-V-5.0-EX_1x04_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_5-H-5.0-EX_1x05_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_5-H-5.0_1x05_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_5-V-5.0-EX_1x05_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_6-H-5.0-EX_1x06_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_6-H-5.0_1x06_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_6-V-5.0-EX_1x06_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_7-H-5.0-EX_1x07_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_7-H-5.0_1x07_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_7-V-5.0-EX_1x07_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_8-H-5.0-EX_1x08_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_8-H-5.0_1x08_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_8-V-5.0-EX_1x08_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_9-H-5.0-EX_1x09_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_9-H-5.0_1x09_P5.0mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_9-V-5.0-EX_1x09_P5.0mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_1-H-7.5_1x01_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_1-V-7.5_1x01_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_10-H-7.5-ZB_1x10_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_10-V-7.5-ZB_1x10_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_11-H-7.5-ZB_1x11_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_11-V-7.5-ZB_1x11_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_12-H-7.5-ZB_1x12_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_12-V-7.5-ZB_1x12_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_2-H-7.5-ZB_1x02_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_2-V-7.5_1x02_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_3-H-7.5-ZB_1x03_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_3-H-7.5_1x03_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_3-V-7.5-ZB_1x03_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_4-H-7.5-ZB_1x04_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_5-H-7.5-ZB_1x05_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_5-V-7.5-ZB_1x05_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_6-H-7.5-ZB_1x06_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_6-V-7.5-ZB_1x06_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_7-H-7.5-ZB_1x07_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_7-V-7.5-ZB_1x07_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_8-H-7.5-ZB_1x08_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_8-V-7.5-ZB_1x08_P7.5mm_Vertical\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_9-H-7.5-ZB_1x09_P7.5mm_Horizontal\",\"Connector_Phoenix_SPT/PhoenixContact_SPT_5_9-V-7.5-ZB_1x09_P7.5mm_Vertical\",\"Connector_Pin/Pin_D0.7mm_L6.5mm_W1.8mm_FlatFork\",\"Connector_Pin/Pin_D0.9mm_L10.0mm_W2.4mm_FlatFork\",\"Connector_Pin/Pin_D1.0mm_L10.0mm\",\"Connector_Pin/Pin_D1.0mm_L10.0mm_LooseFit\",\"Connector_Pin/Pin_D1.1mm_L10.2mm_W3.5mm_Flat\",\"Connector_Pin/Pin_D1.1mm_L8.5mm_W2.5mm_FlatFork\",\"Connector_Pin/Pin_D1.2mm_L10.2mm_W2.9mm_FlatFork\",\"Connector_Pin/Pin_D1.2mm_L11.3mm_W3.0mm_Flat\",\"Connector_Pin/Pin_D1.3mm_L10.0mm_W3.5mm_Flat\",\"Connector_Pin/Pin_D1.3mm_L11.0mm\",\"Connector_Pin/Pin_D1.3mm_L11.0mm_LooseFit\",\"Connector_Pin/Pin_D1.3mm_L11.3mm_W2.8mm_Flat\",\"Connector_Pin/Pin_D1.4mm_L8.5mm_W2.8mm_FlatFork\",\"Connector_PinHeader_1.00mm/PinHeader_1x01_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x01_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.00mm/PinHeader_2x01_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x01_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x01_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x02_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x02_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x02_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x03_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x03_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x03_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x04_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x04_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x04_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x05_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x05_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x05_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x06_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x06_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x06_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x07_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x07_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x07_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x08_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x08_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x08_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x09_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x09_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x09_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x10_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x10_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x10_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x11_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x11_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x11_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x12_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x12_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x12_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x13_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x13_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x13_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x14_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x14_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x14_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x15_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x15_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x15_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x16_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x16_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x16_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x17_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x17_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x17_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x18_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x18_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x18_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x19_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x19_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x19_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x20_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x20_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x20_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x21_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x21_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x21_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x22_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x22_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x22_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x23_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x23_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x23_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x24_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x24_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x24_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x25_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x25_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x25_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x26_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x26_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x26_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x27_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x27_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x27_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x28_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x28_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x28_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x29_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x29_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x29_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x30_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x30_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x30_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x31_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x31_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x31_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x32_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x32_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x32_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x33_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x33_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x33_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x34_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x34_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x34_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x35_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x35_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x35_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x36_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x36_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x36_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x37_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x37_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x37_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x38_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x38_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x38_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x39_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x39_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x39_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.00mm/PinHeader_2x40_P1.00mm_Horizontal\",\"Connector_PinHeader_1.00mm/PinHeader_2x40_P1.00mm_Vertical\",\"Connector_PinHeader_1.00mm/PinHeader_2x40_P1.00mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_1x01_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x01_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_1.27mm/PinHeader_2x01_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x01_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x01_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x02_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x02_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x02_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x03_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x03_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x03_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x04_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x04_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x04_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x05_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x05_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x05_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x06_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x06_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x06_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x07_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x07_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x07_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x08_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x08_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x08_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x09_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x09_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x09_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x10_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x10_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x10_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x11_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x11_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x11_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x12_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x12_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x12_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x13_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x13_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x13_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x14_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x14_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x14_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x15_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x15_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x15_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x16_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x16_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x16_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x17_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x17_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x17_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x18_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x18_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x18_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x19_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x19_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x19_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x20_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x20_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x20_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x21_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x21_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x21_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x22_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x22_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x22_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x23_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x23_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x23_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x24_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x24_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x24_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x25_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x25_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x25_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x26_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x26_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x26_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x27_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x27_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x27_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x28_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x28_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x28_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x29_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x29_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x29_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x30_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x30_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x30_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x31_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x31_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x31_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x32_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x32_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x32_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x33_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x33_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x33_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x34_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x34_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x34_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x35_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x35_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x35_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x36_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x36_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x36_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x37_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x37_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x37_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x38_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x38_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x38_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x39_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x39_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x39_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_1.27mm/PinHeader_2x40_P1.27mm_Horizontal\",\"Connector_PinHeader_1.27mm/PinHeader_2x40_P1.27mm_Vertical\",\"Connector_PinHeader_1.27mm/PinHeader_2x40_P1.27mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_1x01_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x01_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.00mm/PinHeader_2x01_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x01_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x01_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x02_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x02_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x02_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x03_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x03_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x03_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x04_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x04_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x04_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x05_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x05_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x05_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x06_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x06_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x06_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x07_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x07_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x07_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x08_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x08_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x08_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x09_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x09_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x09_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x10_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x10_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x10_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x11_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x11_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x11_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x12_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x12_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x12_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x13_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x13_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x13_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x14_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x14_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x14_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x15_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x15_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x15_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x16_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x16_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x16_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x17_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x17_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x17_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x18_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x18_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x18_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x19_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x19_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x19_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x20_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x20_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x20_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x21_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x21_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x21_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x22_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x22_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x22_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x23_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x23_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x23_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x24_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x24_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x24_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x25_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x25_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x25_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x26_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x26_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x26_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x27_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x27_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x27_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x28_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x28_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x28_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x29_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x29_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x29_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x30_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x30_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x30_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x31_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x31_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x31_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x32_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x32_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x32_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x33_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x33_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x33_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x34_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x34_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x34_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x35_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x35_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x35_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x36_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x36_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x36_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x37_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x37_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x37_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x38_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x38_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x38_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x39_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x39_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x39_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.00mm/PinHeader_2x40_P2.00mm_Horizontal\",\"Connector_PinHeader_2.00mm/PinHeader_2x40_P2.00mm_Vertical\",\"Connector_PinHeader_2.00mm/PinHeader_2x40_P2.00mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_1x01_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x01_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinHeader_2.54mm/PinHeader_2x01_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x01_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x01_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x02_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x02_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x02_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x03_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x03_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x03_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x04_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x04_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x04_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x05_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x05_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x05_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x06_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x06_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x06_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x07_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x07_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x07_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x08_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x08_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x08_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x09_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x09_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x09_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x10_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x10_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x10_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x11_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x11_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x11_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x12_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x12_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x12_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x13_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x13_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x13_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x14_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x14_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x14_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x15_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x15_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x15_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x16_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x16_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x16_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x17_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x17_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x17_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x18_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x18_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x18_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x19_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x19_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x19_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x20_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x20_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x20_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x21_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x21_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x21_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x22_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x22_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x22_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x23_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x23_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x23_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x24_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x24_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x24_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x25_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x25_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x25_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x26_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x26_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x26_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x27_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x27_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x27_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x28_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x28_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x28_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x29_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x29_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x29_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x30_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x30_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x30_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x31_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x31_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x31_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x32_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x32_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x32_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x33_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x33_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x33_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x34_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x34_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x34_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x35_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x35_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x35_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x36_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x36_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x36_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x37_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x37_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x37_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x38_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x38_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x38_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x39_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x39_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x39_P2.54mm_Vertical_SMD\",\"Connector_PinHeader_2.54mm/PinHeader_2x40_P2.54mm_Horizontal\",\"Connector_PinHeader_2.54mm/PinHeader_2x40_P2.54mm_Vertical\",\"Connector_PinHeader_2.54mm/PinHeader_2x40_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_1x02_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x02_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x02_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x03_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x03_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x03_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x04_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x04_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x04_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x05_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x05_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x05_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x06_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x06_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x06_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x07_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x07_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x07_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x08_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x08_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x08_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x09_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x09_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x09_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x10_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x10_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x10_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x11_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x11_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x11_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x12_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x12_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x12_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x13_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x13_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x13_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x14_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x14_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x14_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x15_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x15_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x15_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x16_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x16_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x16_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x17_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x17_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x17_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x18_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x18_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x18_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x19_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x19_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x19_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x20_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x20_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x20_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x21_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x21_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x21_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x22_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x22_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x22_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x23_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x23_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x23_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x24_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x24_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x24_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x25_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x25_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x25_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x26_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x26_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x26_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x27_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x27_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x27_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x28_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x28_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x28_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x29_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x29_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x29_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x30_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x30_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x30_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x31_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x31_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x31_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x32_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x32_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x32_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x33_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x33_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x33_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x34_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x34_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x34_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x35_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x35_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x35_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x36_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x36_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x36_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x37_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x37_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x37_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x38_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x38_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x38_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x39_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x39_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x39_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_1x40_P1.00mm_Vertical\",\"Connector_PinSocket_1.00mm/PinSocket_1x40_P1.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.00mm/PinSocket_1x40_P1.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.00mm/PinSocket_2x02_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x03_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x04_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x05_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x06_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x07_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x08_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x09_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x10_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x11_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x12_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x13_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x14_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x15_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x16_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x17_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x18_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x19_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x20_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x21_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x22_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x23_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x24_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x25_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x26_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x27_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x28_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x29_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x30_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x31_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x32_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x33_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x34_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x35_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x36_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x37_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x38_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x39_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.00mm/PinSocket_2x40_P1.00mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_1x01_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x02_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x02_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x02_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x03_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x03_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x03_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x04_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x04_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x04_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x05_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x05_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x05_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x06_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x06_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x06_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x07_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x07_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x07_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x08_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x08_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x08_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x09_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x09_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x09_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x10_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x10_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x10_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x11_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x11_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x11_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x12_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x12_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x12_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x13_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x13_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x13_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x14_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x14_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x14_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x15_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x15_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x15_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x16_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x16_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x16_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x17_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x17_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x17_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x18_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x18_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x18_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x19_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x19_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x19_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x20_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x20_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x20_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x21_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x21_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x21_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x22_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x22_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x22_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x23_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x23_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x23_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x24_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x24_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x24_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x25_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x25_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x25_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x26_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x26_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x26_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x27_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x27_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x27_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x28_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x28_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x28_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x29_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x29_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x29_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x30_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x30_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x30_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x31_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x31_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x31_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x32_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x32_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x32_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x33_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x33_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x33_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x34_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x34_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x34_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x35_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x35_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x35_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x36_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x36_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x36_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x37_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x37_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x37_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x38_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x38_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x38_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x39_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x39_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x39_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_1x40_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_1x40_P1.27mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_1.27mm/PinSocket_1x40_P1.27mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_1.27mm/PinSocket_2x01_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x01_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x02_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x02_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x03_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x03_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x03_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x04_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x04_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x04_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x05_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x05_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x05_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x06_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x06_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x06_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x07_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x07_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x07_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x08_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x08_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x08_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x09_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x09_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x09_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x10_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x10_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x10_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x11_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x11_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x11_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x12_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x12_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x12_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x13_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x13_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x13_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x14_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x14_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x14_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x15_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x15_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x15_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x16_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x16_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x16_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x17_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x17_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x17_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x18_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x18_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x18_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x19_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x19_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x19_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x20_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x20_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x20_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x21_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x21_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x21_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x22_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x22_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x22_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x23_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x23_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x23_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x24_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x24_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x24_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x25_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x25_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x25_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x26_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x26_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x26_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x27_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x27_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x27_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x28_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x28_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x28_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x29_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x29_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x29_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x30_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x30_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x30_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x31_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x31_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x31_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x32_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x32_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x32_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x33_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x33_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x33_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x34_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x34_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x34_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x35_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x35_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x35_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x36_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x36_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x36_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x37_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x37_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x37_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x38_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x38_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x38_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x39_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x39_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x39_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x40_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x40_P1.27mm_Vertical\",\"Connector_PinSocket_1.27mm/PinSocket_2x40_P1.27mm_Vertical_SMD\",\"Connector_PinSocket_1.27mm/PinSocket_2x41_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x42_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x43_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x44_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x45_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x46_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x47_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x48_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x49_P1.27mm_Horizontal\",\"Connector_PinSocket_1.27mm/PinSocket_2x50_P1.27mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x01_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x01_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.00mm/PinSocket_2x01_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x01_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x01_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x02_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x02_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x02_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x03_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x03_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x03_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x04_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x04_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x04_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x05_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x05_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x05_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x06_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x06_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x06_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x07_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x07_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x07_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x08_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x08_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x08_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x09_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x09_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x09_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x10_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x10_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x10_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x11_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x11_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x11_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x12_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x12_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x12_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x13_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x13_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x13_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x14_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x14_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x14_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x15_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x15_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x15_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x16_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x16_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x16_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x17_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x17_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x17_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x18_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x18_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x18_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x19_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x19_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x19_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x20_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x20_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x20_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x21_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x21_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x21_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x22_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x22_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x22_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x23_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x23_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x23_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x24_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x24_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x24_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x25_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x25_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x25_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x26_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x26_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x26_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x27_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x27_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x27_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x28_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x28_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x28_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x29_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x29_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x29_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x30_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x30_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x30_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x31_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x31_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x31_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x32_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x32_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x32_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x33_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x33_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x33_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x34_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x34_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x34_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x35_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x35_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x35_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x36_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x36_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x36_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x37_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x37_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x37_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x38_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x38_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x38_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x39_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x39_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x39_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.00mm/PinSocket_2x40_P2.00mm_Horizontal\",\"Connector_PinSocket_2.00mm/PinSocket_2x40_P2.00mm_Vertical\",\"Connector_PinSocket_2.00mm/PinSocket_2x40_P2.00mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_1x01_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x01_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Vertical_SMD_Pin1Left\",\"Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Vertical_SMD_Pin1Right\",\"Connector_PinSocket_2.54mm/PinSocket_2x01_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x01_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x01_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x02_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x02_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x02_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x03_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x03_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x03_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x04_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x04_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x04_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x05_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x05_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x05_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x06_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x06_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x06_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x07_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x07_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x07_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x08_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x08_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x08_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x09_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x09_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x09_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x10_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x10_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x10_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x11_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x11_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x11_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x12_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x12_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x12_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x13_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x13_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x13_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x14_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x14_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x14_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x15_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x15_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x15_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x16_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x16_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x16_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x17_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x17_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x17_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x18_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x18_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x18_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x19_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x19_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x19_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x20_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x20_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x20_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x21_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x21_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x21_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x22_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x22_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x22_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x23_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x23_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x23_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x24_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x24_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x24_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x25_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x25_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x25_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x26_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x26_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x26_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x27_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x27_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x27_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x28_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x28_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x28_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x29_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x29_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x29_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x30_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x30_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x30_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x31_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x31_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x31_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x32_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x32_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x32_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x33_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x33_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x33_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x34_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x34_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x34_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x35_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x35_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x35_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x36_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x36_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x36_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x37_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x37_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x37_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x38_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x38_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x38_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x39_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x39_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x39_P2.54mm_Vertical_SMD\",\"Connector_PinSocket_2.54mm/PinSocket_2x40_P2.54mm_Horizontal\",\"Connector_PinSocket_2.54mm/PinSocket_2x40_P2.54mm_Vertical\",\"Connector_PinSocket_2.54mm/PinSocket_2x40_P2.54mm_Vertical_SMD\",\"Connector_RJ/RJ12_Amphenol_54601-x06_Horizontal\",\"Connector_RJ/RJ14_Connfly_DS1133-S4_Horizontal\",\"Connector_RJ/RJ25_Wayconn_MJEA-660X1_Horizontal\",\"Connector_RJ/RJ45_Abracon_ARJP11A-MA_Horizontal\",\"Connector_RJ/RJ45_Amphenol_54602-x08_Horizontal\",\"Connector_RJ/RJ45_Amphenol_RJHSE5380-08\",\"Connector_RJ/RJ45_Amphenol_RJHSE5380\",\"Connector_RJ/RJ45_Amphenol_RJHSE538X-02\",\"Connector_RJ/RJ45_Amphenol_RJHSE538X-04\",\"Connector_RJ/RJ45_Amphenol_RJHSE538X\",\"Connector_RJ/RJ45_Amphenol_RJMG1BD3B8K1ANR\",\"Connector_RJ/RJ45_BEL_SS74301-00x_Vertical\",\"Connector_RJ/RJ45_Bel_SI-60062-F\",\"Connector_RJ/RJ45_Bel_V895-1001-AW_Vertical\",\"Connector_RJ/RJ45_Cetus_J1B1211CCD_Horizontal\",\"Connector_RJ/RJ45_Connfly_DS1128-09-S8xx-S_Horizontal\",\"Connector_RJ/RJ45_HALO_HFJ11-x2450E-LxxRL_Horizontal\",\"Connector_RJ/RJ45_HALO_HFJ11-x2450ERL_Horizontal\",\"Connector_RJ/RJ45_HALO_HFJ11-x2450HRL_Horizontal\",\"Connector_RJ/RJ45_Hanrun_HR911105A_Horizontal\",\"Connector_RJ/RJ45_Kycon_G7LX-A88S7-BP-xx_Horizontal\",\"Connector_RJ/RJ45_Molex_0855135013_Vertical\",\"Connector_RJ/RJ45_Molex_9346520x_Horizontal\",\"Connector_RJ/RJ45_Ninigi_GE\",\"Connector_RJ/RJ45_OST_PJ012-8P8CX_Vertical\",\"Connector_RJ/RJ45_Plug_Metz_AJP92A8813\",\"Connector_RJ/RJ45_Pulse_JK00177NL_Horizontal\",\"Connector_RJ/RJ45_Pulse_JK0654219NL_Horizontal\",\"Connector_RJ/RJ45_Pulse_JXD6-0001NL_Horizontal\",\"Connector_RJ/RJ45_RCH_RC01937\",\"Connector_RJ/RJ45_UDE_RB1-125B8G1A\",\"Connector_RJ/RJ45_Wuerth_74980111211_Horizontal\",\"Connector_RJ/RJ45_Wuerth_7499010001A_Horizontal\",\"Connector_RJ/RJ45_Wuerth_7499010121A_Horizontal\",\"Connector_RJ/RJ45_Wuerth_7499010211A_Horizontal\",\"Connector_RJ/RJ45_Wuerth_7499111446_Horizontal\",\"Connector_RJ/RJ45_Wuerth_7499151120_Horizontal\",\"Connector_RJ/RJ9_Evercom_5301-440xxx_Horizontal\",\"Connector_SATA_SAS/SAS-mini_TEConnectivity_1888174_Vertical\",\"Connector_SATA_SAS/SATA_Amphenol_10029364-001LF_Horizontal\",\"Connector_Samtec/Samtec_FMC_ASP-134486-01_10x40_P1.27mm_Vertical\",\"Connector_Samtec/Samtec_FMC_ASP-134602-01_10x40_P1.27mm_Vertical\",\"Connector_Samtec/Samtec_FMC_ASP-134604-01_4x40_Vertical\",\"Connector_Samtec/Samtec_LSHM-105-xx.x-x-DV-N_2x05_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-105-xx.x-x-DV-S_2x05-1SH_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-110-xx.x-x-DV-N_2x10_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-110-xx.x-x-DV-S_2x10-1SH_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-120-xx.x-x-DV-N_2x20_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-120-xx.x-x-DV-S_2x20-1SH_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-130-xx.x-x-DV-N_2x30_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-130-xx.x-x-DV-S_2x30-1SH_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-140-xx.x-x-DV-N_2x40_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-140-xx.x-x-DV-S_2x40-1SH_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-150-xx.x-x-DV-N_2x50_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_LSHM-150-xx.x-x-DV-S_2x50-1SH_P0.50mm_Vertical\",\"Connector_Samtec/Samtec_SS4-10-3.00-x-D-K-xR_2x10_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-10-3.50-x-D-K-xR_2x10_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-15-3.00-x-D-K-xR_2x15_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-15-3.50-x-D-K-xR_2x15_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-20-3.00-x-D-K-xR_2x20_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-20-3.50-x-D-K-xR_2x20_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-30-3.00-x-D-K-xR_2x30_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-30-3.50-x-D-K-xR_2x30_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-40-3.00-x-D-K-xR_2x40_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-40-3.50-x-D-K-xR_2x40_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-50-3.00-x-D-K-xR_2x50_P0.4mm_Socket\",\"Connector_Samtec/Samtec_SS4-50-3.50-x-D-K-xR_2x50_P0.4mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-005-XX.X-DV-L_2x05_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-005-XX.X-DV_2x05_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-010-XX.X-DV-L_2x10_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-010-XX.X-DV_2x10_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-011-XX.X-DV-L_2x11_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-011-XX.X-DV_2x11_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-013-XX.X-DV-L_2x13_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-013-XX.X-DV_2x13_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-020-XX.X-DV-L_2x20_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-020-XX.X-DV_2x20_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-025-XX.X-DV-L_2x25_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-025-XX.X-DV_2x25_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-030-XX.X-DV-L_2x30_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-030-XX.X-DV_2x30_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-035-XX.X-DV-L_2x35_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-035-XX.X-DV_2x35_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-040-XX.X-DV-L_2x40_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-040-XX.X-DV_2x40_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-049-XX.X-DV-L_2x49_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-049-XX.X-DV_2x49_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-050-XX.X-DV-L_2x50_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-050-XX.X-DV_2x50_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-060-XX.X-DV-L_2x60_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-060-XX.X-DV_2x60_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-070-XX.X-DV-L_2x70_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-070-XX.X-DV_2x70_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-075-XX.X-DV-L_2x75_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-075-XX.X-DV_2x75_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-100-XX.X-DV-L_2x100_P0.8mm_Socket_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERF8-100-XX.X-DV_2x100_P0.8mm_Socket\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-005-XX.X-DV-L_2x05_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-005-XX.X-DV_2x05_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-010-XX.X-DV-L_2x10_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-010-XX.X-DV_2x10_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-011-XX.X-DV-L_2x11_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-011-XX.X-DV_2x11_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-013-XX.X-DV-L_2x13_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-013-XX.X-DV_2x13_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-020-XX.X-DV-L_2x20_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-020-XX.X-DV_2x20_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-025-XX.X-DV-L_2x25_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-025-XX.X-DV_2x25_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-030-XX.X-DV-L_2x30_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-030-XX.X-DV_2x30_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-035-XX.X-DV-L_2x35_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-035-XX.X-DV_2x35_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-040-XX.X-DV-L_2x40_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-040-XX.X-DV_2x40_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-049-XX.X-DV-L_2x49_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-049-XX.X-DV_2x49_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-050-XX.X-DV-L_2x50_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-050-XX.X-DV_2x50_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-060-XX.X-DV-L_2x60_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-060-XX.X-DV_2x60_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-070-XX.X-DV-L_2x70_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-070-XX.X-DV_2x70_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-075-XX.X-DV-L_2x75_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-075-XX.X-DV_2x75_P0.8mm_Terminal\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-100-XX.X-DV-L_2x100_P0.8mm_Terminal_Latch\",\"Connector_Samtec_EdgeRate/Samtec_ERM8-100-XX.X-DV_2x100_P0.8mm_Terminal\",\"Connector_Samtec_FSI/Samtec_FSI-105-03-X-D-AD_2x05_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-105-03-X-D_2x05_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D-AD_2x05_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D-AD_2x05_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D_2x05_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D_2x05_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-110-03-X-D-AD_2x10_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-110-03-X-D-M-AD_2x10_P1.0mm_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-110-03-X-D-M_2x10_P1.0mm_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-110-03-X-D_2x10_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-AD_2x10_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-AD_2x10_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M-AD_2x10_P1.0mm_Mate_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M-AD_2x10_P1.0mm_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M_2x10_P1.0mm_Mate_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M_2x10_P1.0mm_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D_2x10_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D_2x10_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-115-03-X-D-AD_2x15_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-115-03-X-D_2x15_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D-AD_2x15_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D-AD_2x15_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D_2x15_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D_2x15_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-120-03-X-D-AD_2x20_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-120-03-X-D-M-AD_2x20_P1.0mm_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-120-03-X-D-M_2x20_P1.0mm_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-120-03-X-D_2x20_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-AD_2x20_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-AD_2x20_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M-AD_2x20_P1.0mm_Mate_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M-AD_2x20_P1.0mm_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M_2x20_P1.0mm_Mate_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M_2x20_P1.0mm_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D_2x20_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D_2x20_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-125-03-X-D-AD_2x25_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-125-03-X-D_2x25_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D-AD_2x25_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D-AD_2x25_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D_2x25_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D_2x25_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-130-03-X-D-AD_2x30_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-130-03-X-D-M-AD_2x30_P1.0mm_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-130-03-X-D-M_2x30_P1.0mm_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-130-03-X-D_2x30_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-AD_2x30_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-AD_2x30_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M-AD_2x30_P1.0mm_Mate_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M-AD_2x30_P1.0mm_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M_2x30_P1.0mm_Mate_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M_2x30_P1.0mm_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D_2x30_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D_2x30_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-135-03-X-D-AD_2x35_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-135-03-X-D_2x35_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D-AD_2x35_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D-AD_2x35_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D_2x35_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D_2x35_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-140-03-X-D-AD_2x40_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-140-03-X-D-M-AD_2x40_P1.0mm_Pol20_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-140-03-X-D-M_2x40_P1.0mm_Pol20_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-140-03-X-D_2x40_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-AD_2x40_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-AD_2x40_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M-AD_2x40_P1.0mm_Pol20_Mate_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M-AD_2x40_P1.0mm_Pol20_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M_2x40_P1.0mm_Pol20_Mate_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M_2x40_P1.0mm_Pol20_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D_2x40_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D_2x40_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-145-03-X-D-AD_2x45_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-145-03-X-D_2x45_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D-AD_2x45_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D-AD_2x45_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D_2x45_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D_2x45_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-150-03-X-D-AD_2x50_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-150-03-X-D-M-AD_2x50_P1.0mm_Pol25_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-150-03-X-D-M_2x50_P1.0mm_Pol25_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-150-03-X-D_2x50_P1.0mm_Socket\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-AD_2x50_P1.0mm_Mate_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-AD_2x50_P1.0mm_Socket_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M-AD_2x50_P1.0mm_Pol25_Mate_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M-AD_2x50_P1.0mm_Pol25_Socket_Threaded_AlignmentPin\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M_2x50_P1.0mm_Pol25_Mate_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M_2x50_P1.0mm_Pol25_Socket_Threaded\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D_2x50_P1.0mm_Mate\",\"Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D_2x50_P1.0mm_Socket\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV-BE-LC_2x02_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV-BE_2x02_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV-LC_2x02_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV_2x02_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV-BE-LC_2x03_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV-BE_2x03_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV-LC_2x03_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV_2x03_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-A_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-BE-A_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-BE-LC_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-BE_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-LC_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-A_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-BE-A_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-BE-LC_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-BE_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-LC_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-A_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-BE-A_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-BE-LC_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-BE_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-LC_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-A_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-BE-A_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-BE-LC_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-BE_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-LC_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-A_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-BE-A_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-BE-LC_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-BE_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-LC_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-A_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-BE-A_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-BE-LC_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-BE_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-LC_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-A_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-BE-A_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-BE-LC_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-BE_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-LC_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-A_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-BE-A_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-BE-LC_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-BE_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-LC_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-A_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-BE-A_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-BE-LC_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-BE_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-LC_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-A_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-BE-A_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-BE-LC_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-BE_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-LC_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-A_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-BE-A_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-BE-LC_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-BE_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-LC_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-A_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-BE-A_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-BE-LC_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-BE_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-LC_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-A_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-BE-A_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-BE-LC_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-BE_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-LC_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-A_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-BE-A_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-BE-LC_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-BE_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-LC_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-A_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-BE-A_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-BE-LC_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-BE_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-LC_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-A_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-BE-A_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-BE-LC_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-BE_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-LC_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-A_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-BE-A_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-BE-LC_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-BE_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-LC_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-A_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-BE-A_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-BE-LC_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-BE_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-LC_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-A_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-BE-A_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-BE-LC_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-BE_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-LC_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-A_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-BE-A_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-BE-LC_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-BE_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-LC_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-A_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-BE-A_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-BE-LC_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-BE_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-LC_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-A_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-BE-A_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-BE-LC_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-BE_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-LC_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-A_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-BE-A_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-BE-LC_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-BE_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-LC_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-A_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-BE-A_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-BE-LC_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-BE_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-LC_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-A_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-BE-A_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-BE-LC_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-BE_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-LC_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-A_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-BE-A_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-BE-LC_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-BE_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-LC_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-A_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-BE-A_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-BE-LC_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-BE_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-LC_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-A_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-BE-A_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-BE-LC_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-BE_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-LC_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-A_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-BE-A_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-BE-LC_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-BE_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-LC_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-A_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-BE-A_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-BE-LC_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-BE_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-LC_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-A_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-BE-A_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-BE-LC_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-BE_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-LC_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-A_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-BE-A_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-BE-LC_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-BE_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-LC_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-A_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-BE-A_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-BE-LC_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-BE_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-LC_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-A_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-BE-A_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-BE-LC_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-BE_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-LC_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-A_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-BE-A_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-BE-LC_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-BE_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-LC_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-A_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-BE-A_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-BE-LC_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-BE_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-LC_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-A_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-BE-A_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-BE-LC_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-BE_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-LC_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-A_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-BE-A_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-BE-LC_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-BE_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-LC_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-A_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-BE-A_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-BE-LC_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-BE_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-LC_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-A_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-BE-A_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-BE-LC_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-BE_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-LC_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-A_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-BE-A_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-BE-LC_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-BE_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-LC_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-A_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-BE-A_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-BE-LC_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-BE_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-LC_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-A_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-BE-A_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-BE-LC_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-BE_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-LC_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-A_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-BE-A_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-BE-LC_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-BE_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-LC_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-A_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-BE-A_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-BE-LC_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-BE_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-LC_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-A_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-BE-A_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-BE-LC_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-BE_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-LC_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-A_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-BE-A_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-BE-LC_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-BE_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-LC_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-104-02-xx-DV-PE-LC_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-104-02-xx-DV-PE_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-104-02-xx-DV-TE_2x04_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-105-02-xx-DV-PE-LC_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-105-02-xx-DV-PE_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-105-02-xx-DV-TE_2x05_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-106-02-xx-DV-PE-LC_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-106-02-xx-DV-PE_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-106-02-xx-DV-TE_2x06_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-107-02-xx-DV-PE-LC_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-107-02-xx-DV-PE_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-107-02-xx-DV-TE_2x07_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-108-02-xx-DV-PE-LC_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-108-02-xx-DV-PE_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-108-02-xx-DV-TE_2x08_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-109-02-xx-DV-PE-LC_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-109-02-xx-DV-PE_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-109-02-xx-DV-TE_2x09_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-110-02-xx-DV-PE-LC_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-110-02-xx-DV-PE_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-110-02-xx-DV-TE_2x10_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-111-02-xx-DV-PE-LC_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-111-02-xx-DV-PE_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-111-02-xx-DV-TE_2x11_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-112-02-xx-DV-PE-LC_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-112-02-xx-DV-PE_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-112-02-xx-DV-TE_2x12_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-113-02-xx-DV-PE-LC_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-113-02-xx-DV-PE_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-113-02-xx-DV-TE_2x13_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-114-02-xx-DV-PE-LC_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-114-02-xx-DV-PE_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-114-02-xx-DV-TE_2x14_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-115-02-xx-DV-PE-LC_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-115-02-xx-DV-PE_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-115-02-xx-DV-TE_2x15_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-116-02-xx-DV-PE-LC_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-116-02-xx-DV-PE_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-116-02-xx-DV-TE_2x16_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-117-02-xx-DV-PE-LC_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-117-02-xx-DV-PE_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-117-02-xx-DV-TE_2x17_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-118-02-xx-DV-PE-LC_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-118-02-xx-DV-PE_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-118-02-xx-DV-TE_2x18_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-119-02-xx-DV-PE-LC_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-119-02-xx-DV-PE_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-119-02-xx-DV-TE_2x19_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-120-02-xx-DV-PE-LC_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-120-02-xx-DV-PE_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-120-02-xx-DV-TE_2x20_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-121-02-xx-DV-PE-LC_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-121-02-xx-DV-PE_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-121-02-xx-DV-TE_2x21_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-122-02-xx-DV-PE-LC_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-122-02-xx-DV-PE_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-122-02-xx-DV-TE_2x22_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-123-02-xx-DV-PE-LC_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-123-02-xx-DV-PE_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-123-02-xx-DV-TE_2x23_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-124-02-xx-DV-PE-LC_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-124-02-xx-DV-PE_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-124-02-xx-DV-TE_2x24_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-125-02-xx-DV-PE-LC_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-125-02-xx-DV-PE_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-125-02-xx-DV-TE_2x25_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-126-02-xx-DV-PE-LC_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-126-02-xx-DV-PE_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-126-02-xx-DV-TE_2x26_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-127-02-xx-DV-PE-LC_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-127-02-xx-DV-PE_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-127-02-xx-DV-TE_2x27_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-128-02-xx-DV-PE-LC_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-128-02-xx-DV-PE_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-128-02-xx-DV-TE_2x28_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-129-02-xx-DV-PE-LC_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-129-02-xx-DV-PE_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-129-02-xx-DV-TE_2x29_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-130-02-xx-DV-PE-LC_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-130-02-xx-DV-PE_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-130-02-xx-DV-TE_2x30_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-131-02-xx-DV-PE-LC_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-131-02-xx-DV-PE_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-131-02-xx-DV-TE_2x31_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-132-02-xx-DV-PE-LC_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-132-02-xx-DV-PE_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-132-02-xx-DV-TE_2x32_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-133-02-xx-DV-PE-LC_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-133-02-xx-DV-PE_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-133-02-xx-DV-TE_2x33_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-134-02-xx-DV-PE-LC_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-134-02-xx-DV-PE_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-134-02-xx-DV-TE_2x34_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-135-02-xx-DV-PE-LC_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-135-02-xx-DV-PE_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-135-02-xx-DV-TE_2x35_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-136-02-xx-DV-PE-LC_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-136-02-xx-DV-PE_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-136-02-xx-DV-TE_2x36_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-137-02-xx-DV-PE-LC_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-137-02-xx-DV-PE_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-137-02-xx-DV-TE_2x37_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-138-02-xx-DV-PE-LC_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-138-02-xx-DV-PE_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-138-02-xx-DV-TE_2x38_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-139-02-xx-DV-PE-LC_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-139-02-xx-DV-PE_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-139-02-xx-DV-TE_2x39_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-140-02-xx-DV-PE-LC_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-140-02-xx-DV-PE_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-140-02-xx-DV-TE_2x40_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-141-02-xx-DV-PE-LC_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-141-02-xx-DV-PE_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-141-02-xx-DV-TE_2x41_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-142-02-xx-DV-PE-LC_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-142-02-xx-DV-PE_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-142-02-xx-DV-TE_2x42_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-143-02-xx-DV-PE-LC_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-143-02-xx-DV-PE_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-143-02-xx-DV-TE_2x43_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-144-02-xx-DV-PE-LC_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-144-02-xx-DV-PE_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-144-02-xx-DV-TE_2x44_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-145-02-xx-DV-PE-LC_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-145-02-xx-DV-PE_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-145-02-xx-DV-TE_2x45_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-146-02-xx-DV-PE-LC_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-146-02-xx-DV-PE_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-146-02-xx-DV-TE_2x46_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-147-02-xx-DV-PE-LC_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-147-02-xx-DV-PE_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-147-02-xx-DV-TE_2x47_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-148-02-xx-DV-PE-LC_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-148-02-xx-DV-PE_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-148-02-xx-DV-TE_2x48_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-149-02-xx-DV-PE-LC_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-149-02-xx-DV-PE_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-149-02-xx-DV-TE_2x49_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-150-02-xx-DV-PE-LC_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-150-02-xx-DV-PE_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HLE_THT/Samtec_HLE-150-02-xx-DV-TE_2x50_P2.54mm_Horizontal\",\"Connector_Samtec_HPM_THT/Samtec_HPM-01-01-x-S_Straight_1x01_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-01-05-x-S_Straight_1x01_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-02-01-x-S_Straight_1x02_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-02-05-x-S_Straight_1x02_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-03-01-x-S_Straight_1x03_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-03-05-x-S_Straight_1x03_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-04-01-x-S_Straight_1x04_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-04-05-x-S_Straight_1x04_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-05-01-x-S_Straight_1x05_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-05-05-x-S_Straight_1x05_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-06-01-x-S_Straight_1x06_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-06-05-x-S_Straight_1x06_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-07-01-x-S_Straight_1x07_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-07-05-x-S_Straight_1x07_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-08-01-x-S_Straight_1x08_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-08-05-x-S_Straight_1x08_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-09-01-x-S_Straight_1x09_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-09-05-x-S_Straight_1x09_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-10-01-x-S_Straight_1x10_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-10-05-x-S_Straight_1x10_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-11-01-x-S_Straight_1x11_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-11-05-x-S_Straight_1x11_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-12-01-x-S_Straight_1x12_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-12-05-x-S_Straight_1x12_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-13-01-x-S_Straight_1x13_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-13-05-x-S_Straight_1x13_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-14-01-x-S_Straight_1x14_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-14-05-x-S_Straight_1x14_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-15-01-x-S_Straight_1x15_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-15-05-x-S_Straight_1x15_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-16-01-x-S_Straight_1x16_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-16-05-x-S_Straight_1x16_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-17-01-x-S_Straight_1x17_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-17-05-x-S_Straight_1x17_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-18-01-x-S_Straight_1x18_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-18-05-x-S_Straight_1x18_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-19-01-x-S_Straight_1x19_Pitch5.08mm\",\"Connector_Samtec_HPM_THT/Samtec_HPM-19-05-x-S_Straight_1x19_Pitch5.08mm\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-109-01-X-DV-A-BL_2x09_P0.8mm_Pol04_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-109-01-X-DV-A-WT_2x09_P0.8mm_Pol04_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-109-X-X-DV-BL_2x09_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-109-X-X-DV_2x09_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-109-X-X-DV_2x09_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV-A-BL_2x10_P0.8mm_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV-A-WT_2x10_P0.8mm_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV-A_2x10_P0.8mm_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV_2x10_P0.8mm_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-03-X-DV-A-WT_2x10_P0.8mm_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-03-X-DV-A_2x10_P0.8mm_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-03-X-DV_2x10_P0.8mm_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-X-X-DV-BL_2x10_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-X-X-DV_2x10_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-110-X-X-DV_2x10_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV-A-BL_2x100_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV-A-WT_2x100_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV-A_2x100_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV_2x100_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-03-X-DV-A-WT_2x100_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-03-X-DV-A_2x100_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-03-X-DV_2x100_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-X-X-DV-BL_2x100_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-X-X-DV_2x100_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-1100-X-X-DV_2x100_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV-A-BL_2x13_P0.8mm_Pol06_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV-A-WT_2x13_P0.8mm_Pol06_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV-A_2x13_P0.8mm_Pol06_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV_2x13_P0.8mm_Pol06_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-113-X-X-DV-BL_2x13_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-113-X-X-DV_2x13_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-113-X-X-DV_2x13_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV-A-BL_2x20_P0.8mm_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV-A-WT_2x20_P0.8mm_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV-A_2x20_P0.8mm_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV_2x20_P0.8mm_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-03-X-DV-A-WT_2x20_P0.8mm_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-03-X-DV-A_2x20_P0.8mm_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-03-X-DV_2x20_P0.8mm_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-X-X-DV-BL_2x20_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-X-X-DV_2x20_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-120-X-X-DV_2x20_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV-A-BL_2x25_P0.8mm_Pol06_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV-A-WT_2x25_P0.8mm_Pol06_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV-A_2x25_P0.8mm_Pol06_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV_2x25_P0.8mm_Pol06_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-125-X-X-DV-BL_2x25_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-125-X-X-DV_2x25_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-125-X-X-DV_2x25_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV-A-BL_2x30_P0.8mm_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV-A-WT_2x30_P0.8mm_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV-A_2x30_P0.8mm_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV_2x30_P0.8mm_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-03-X-DV-A-WT_2x30_P0.8mm_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-03-X-DV-A_2x30_P0.8mm_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-03-X-DV_2x30_P0.8mm_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-X-X-DV-BL_2x30_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-X-X-DV_2x30_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-130-X-X-DV_2x30_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV-A-BL_2x37_P0.8mm_Pol21_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV-A-WT_2x37_P0.8mm_Pol21_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV-A_2x37_P0.8mm_Pol21_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV_2x37_P0.8mm_Pol21_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-137-X-X-DV-BL_2x37_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-137-X-X-DV_2x37_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-137-X-X-DV_2x37_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV-A-BL_2x40_P0.8mm_Pol22_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV-A-WT_2x40_P0.8mm_Pol22_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV-A_2x40_P0.8mm_Pol22_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV_2x40_P0.8mm_Pol22_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-03-X-DV-A-WT_2x40_P0.8mm_Pol22_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-03-X-DV-A_2x40_P0.8mm_Pol22_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-03-X-DV_2x40_P0.8mm_Pol22_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-X-X-DV-BL_2x40_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-X-X-DV_2x40_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-140-X-X-DV_2x40_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV-A-BL_2x49_P0.8mm_Pol27_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV-A-WT_2x49_P0.8mm_Pol27_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV-A_2x49_P0.8mm_Pol27_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV_2x49_P0.8mm_Pol27_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-149-X-X-DV-BL_2x49_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-149-X-X-DV_2x49_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-149-X-X-DV_2x49_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV-A-BL_2x50_P0.8mm_Pol27_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV-A-WT_2x50_P0.8mm_Pol27_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV-A_2x50_P0.8mm_Pol27_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV_2x50_P0.8mm_Pol27_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-03-X-DV-A-WT_2x50_P0.8mm_Pol27_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-03-X-DV-A_2x50_P0.8mm_Pol27_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-03-X-DV_2x50_P0.8mm_Pol27_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-X-X-DV-BL_2x50_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-X-X-DV_2x50_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-150-X-X-DV_2x50_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV-A-BL_2x60_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV-A-WT_2x60_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV-A_2x60_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV_2x60_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-03-X-DV-A-WT_2x60_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-03-X-DV-A_2x60_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-03-X-DV_2x60_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-X-X-DV-BL_2x60_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-X-X-DV_2x60_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-160-X-X-DV_2x60_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV-A-BL_2x70_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV-A-WT_2x70_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV-A_2x70_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV_2x70_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-03-X-DV-A-WT_2x70_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-03-X-DV-A_2x70_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-03-X-DV_2x70_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-X-X-DV-BL_2x70_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-X-X-DV_2x70_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-170-X-X-DV_2x70_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV-A-BL_2x80_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV-A-WT_2x80_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV-A_2x80_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV_2x80_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-03-X-DV-A-WT_2x80_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-03-X-DV-A_2x80_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-03-X-DV_2x80_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-X-X-DV-BL_2x80_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-X-X-DV_2x80_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-180-X-X-DV_2x80_P0.8mm_Wing_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV-A-BL_2x90_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV-A-WT_2x90_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV-A_2x90_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV_2x90_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-03-X-DV-A-WT_2x90_P0.8mm_Pol32_Socket_WeldTabs\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-03-X-DV-A_2x90_P0.8mm_Pol32_Socket_AlignmentPins\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-03-X-DV_2x90_P0.8mm_Pol32_Socket\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-X-X-DV-BL_2x90_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-X-X-DV_2x90_P0.8mm_Edge\",\"Connector_Samtec_HSEC8/Samtec_HSEC8-190-X-X-DV_2x90_P0.8mm_Wing_Edge\",\"Connector_Samtec_LTMM/Samtec_LTMM-104-02-X-D-SM-LC_2x04_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-104-02-X-D-SM_2x04_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-105-02-X-D-SM-LC_2x05_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-105-02-X-D-SM_2x05_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-106-02-X-D-SM-LC_2x06_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-106-02-X-D-SM_2x06_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-107-02-X-D-SM-LC_2x07_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-107-02-X-D-SM_2x07_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-108-02-X-D-SM-LC_2x08_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-108-02-X-D-SM_2x08_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-110-02-X-D-SM-LC_2x10_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-110-02-X-D-SM_2x10_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-112-02-X-D-SM-LC_2x12_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-112-02-X-D-SM_2x12_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-113-02-X-D-SM-LC_2x13_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-113-02-X-D-SM_2x13_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-115-02-X-D-SM-LC_2x15_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-115-02-X-D-SM_2x15_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-117-02-X-D-SM-LC_2x17_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-117-02-X-D-SM_2x17_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-120-02-X-D-SM-LC_2x20_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-120-02-X-D-SM_2x20_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-122-02-X-D-SM-LC_2x22_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-122-02-X-D-SM_2x22_P2.0mm_Header_Vertical\",\"Connector_Samtec_LTMM/Samtec_LTMM-125-02-X-D-SM-LC_2x25_P2.0mm_Header_Vertical_LockingClip\",\"Connector_Samtec_LTMM/Samtec_LTMM-125-02-X-D-SM_2x25_P2.0mm_Header_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-02-X-S-RA_1x02-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-02-X-S-V_1x02-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-02-X-SH-L_1x02-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-02-X-SV-L_1x02-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-03-X-S-RA_1x03-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-03-X-S-V_1x03-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-03-X-SH-L_1x03-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-03-X-SV-L_1x03-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-04-X-S-RA_1x04-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-04-X-S-V_1x04-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-04-X-SH-L_1x04-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-04-X-SV-L_1x04-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-05-X-S-RA_1x05-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-05-X-S-V_1x05-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-05-X-SH-L_1x05-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-05-X-SV-L_1x05-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-06-X-S-RA_1x06-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-06-X-S-V_1x06-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-06-X-SH-L_1x06-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-06-X-SV-L_1x06-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-07-X-S-RA_1x07-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-07-X-S-V_1x07-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-07-X-SH-L_1x07-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-07-X-SV-L_1x07-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-08-X-S-RA_1x08-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-08-X-S-V_1x08-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-08-X-SH-L_1x08-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-08-X-SV-L_1x08-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-09-X-S-RA_1x09-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-09-X-S-V_1x09-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-09-X-SH-L_1x09-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-09-X-SV-L_1x09-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-10-X-S-RA_1x10-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-10-X-S-V_1x10-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-10-X-SH-L_1x10-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-10-X-SV-L_1x10-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-11-X-S-RA_1x11-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-11-X-S-V_1x11-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-11-X-SH-L_1x11-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-11-X-SV-L_1x11-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-12-X-S-RA_1x12-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-12-X-S-V_1x12-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-12-X-SH-L_1x12-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-12-X-SV-L_1x12-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-13-X-S-RA_1x13-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-13-X-S-V_1x13-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-13-X-SH-L_1x13-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-13-X-SV-L_1x13-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-14-X-S-RA_1x14-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-14-X-S-V_1x14-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-14-X-SH-L_1x14-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-14-X-SV-L_1x14-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-15-X-S-RA_1x15-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-15-X-S-V_1x15-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-15-X-SH-L_1x15-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-15-X-SV-L_1x15-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-16-X-S-RA_1x16-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-16-X-S-V_1x16-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-16-X-SH-L_1x16-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-16-X-SV-L_1x16-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-17-X-S-RA_1x17-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-17-X-S-V_1x17-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-17-X-SH-L_1x17-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-17-X-SV-L_1x17-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-18-X-S-RA_1x18-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-18-X-S-V_1x18-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-18-X-SH-L_1x18-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-18-X-SV-L_1x18-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-19-X-S-RA_1x19-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-19-X-S-V_1x19-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-19-X-SH-L_1x19-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-19-X-SV-L_1x19-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-20-X-S-RA_1x20-1MP_P1.0mm_Terminal_Horizontal\",\"Connector_Samtec_MicroMate/Samtec_T1M-20-X-S-V_1x20-1MP_P1.0mm_Terminal_Vertical\",\"Connector_Samtec_MicroMate/Samtec_T1M-20-X-SH-L_1x20-1MP_P1.0mm_Terminal_Horizontal_Latch\",\"Connector_Samtec_MicroMate/Samtec_T1M-20-X-SV-L_1x20-1MP_P1.0mm_Terminal_Vertical_Latch\",\"Connector_Samtec_MicroPower/Samtec_UMPS-02-XX.X-X-V-S-W_1x02-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-02-XX.X-X-V-S_1x02_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-03-XX.X-X-V-S-W_1x03-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-03-XX.X-X-V-S_1x03_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-04-XX.X-X-V-S-W_1x04-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-04-XX.X-X-V-S_1x04_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-05-XX.X-X-V-S-W_1x05-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-05-XX.X-X-V-S_1x05_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-06-XX.X-X-V-S-W_1x06-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-06-XX.X-X-V-S_1x06_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-07-XX.X-X-V-S-W_1x07-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-07-XX.X-X-V-S_1x07_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-08-XX.X-X-V-S-W_1x08-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-08-XX.X-X-V-S_1x08_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-09-XX.X-X-V-S-W_1x09-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-09-XX.X-X-V-S_1x09_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPS-10-XX.X-X-V-S-W_1x10-1MP_P2.0mm_Socket_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPS-10-XX.X-X-V-S_1x10_P2.0mm_Socket\",\"Connector_Samtec_MicroPower/Samtec_UMPT-02-XX.X-X-V-S-W_1x02-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-02-XX.X-X-V-S_1x02_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-03-XX.X-X-V-S-W_1x03-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-03-XX.X-X-V-S_1x03_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-04-XX.X-X-V-S-W_1x04-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-04-XX.X-X-V-S_1x04_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-05-XX.X-X-V-S-W_1x05-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-05-XX.X-X-V-S_1x05_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-06-XX.X-X-V-S-W_1x06-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-06-XX.X-X-V-S_1x06_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-07-XX.X-X-V-S-W_1x07-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-07-XX.X-X-V-S_1x07_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-08-XX.X-X-V-S-W_1x08-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-08-XX.X-X-V-S_1x08_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-09-XX.X-X-V-S-W_1x09-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-09-XX.X-X-V-S_1x09_P2.0mm_Terminal\",\"Connector_Samtec_MicroPower/Samtec_UMPT-10-XX.X-X-V-S-W_1x10-1MP_P2.0mm_Terminal_WeldTab\",\"Connector_Samtec_MicroPower/Samtec_UMPT-10-XX.X-X-V-S_1x10_P2.0mm_Terminal\",\"Connector_Stocko/Stocko_MKS_1651-6-0-202_1x2_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1652-6-0-202_1x2_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1653-6-0-303_1x3_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1654-6-0-404_1x4_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1655-6-0-505_1x5_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1656-6-0-606_1x6_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1657-6-0-707_1x7_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1658-6-0-808_1x8_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1659-6-0-909_1x9_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1660-6-0-1010_1x10_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1661-6-0-1111_1x11_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1662-6-0-1212_1x12_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1663-6-0-1313_1x13_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1664-6-0-1414_1x14_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1665-6-0-1515_1x15_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1666-6-0-1616_1x16_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1667-6-0-1717_1x17_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1668-6-0-1818_1x18_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1669-6-0-1919_1x19_P2.50mm_Vertical\",\"Connector_Stocko/Stocko_MKS_1670-6-0-2020_1x20_P2.50mm_Vertical\",\"Connector_TE-Connectivity/TE_1-826576-3_1x13_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_1-826576-5_1x15_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_1-826576-6_1x16_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_1-826576-7_1x17_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_1-826576-8_1x18_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_2-826576-0_1x20_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_2834006-1_1x01_P4.0mm_Horizontal\",\"Connector_TE-Connectivity/TE_2834006-2_1x02_P4.0mm_Horizontal\",\"Connector_TE-Connectivity/TE_2834006-3_1x03_P4.0mm_Horizontal\",\"Connector_TE-Connectivity/TE_2834006-4_1x04_P4.0mm_Horizontal\",\"Connector_TE-Connectivity/TE_2834006-5_1x05_P4.0mm_Horizontal\",\"Connector_TE-Connectivity/TE_3-826576-6_1x36_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_440054-2_1x02_P2.00mm_Vertical\",\"Connector_TE-Connectivity/TE_440055-2_1x02_P2.00mm_Horizontal\",\"Connector_TE-Connectivity/TE_5767171-1_2x19_P0.635mm_Vertical\",\"Connector_TE-Connectivity/TE_826576-2_1x02_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_826576-3_1x03_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_826576-5_1x05_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_826576-6_1x06_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_826576-7_1x07_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_826576-8_1x08_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_826576-9_1x09_P3.96mm_Vertical\",\"Connector_TE-Connectivity/TE_AMPSEAL_1-776087-x_3Rows_23_P0.4mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770182-x_3x03_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770186-x_3x04_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770190-x_3x05_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770621-x_2x06_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770858-x_2x05_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770866-x_1x02_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770870-x_1x03_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770874-x_2x02_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770875-x_2x03_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770966-x_1x02_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770967-x_1x03_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770968-x_2x02_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770969-x_2x03_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770970-x_2x04_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770971-x_2x05_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770972-x_2x06_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770973-x_2x07_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-770974-x_2x08_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794067-x_2x07_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794068-x_2x08_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794069-x_2x09_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794070-x_2x10_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794071-x_2x11_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794072-x_2x12_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794073-x_2x04_P4.14mm_Vertical\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794105-x_2x09_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794106-x_2x10_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794107-x_2x11_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794108-x_2x12_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_1-794374-x_1x01_P4.14mm_Horizontal\",\"Connector_TE-Connectivity/TE_MATE-N-LOK_350211-1_1x04_P5.08mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-0_2x05_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-2_2x06_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-4_2x07_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-6_2x08_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-8_2x09_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_2-215079-0_2x10_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_215079-4_2x02_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_215079-6_2x03_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_Micro-MaTch_215079-8_2x04_P1.27mm_Vertical\",\"Connector_TE-Connectivity/TE_T4041037031-000_M8_03_Socket_Straight\",\"Connector_TE-Connectivity/TE_T4041037041-000_M8_04_Socket_Straight\",\"Connector_USB/USB3_A_Molex_48393-001\",\"Connector_USB/USB3_A_Molex_48406-0001_Horizontal_Stacked\",\"Connector_USB/USB3_A_Plug_Wuerth_692112030100_Horizontal\",\"Connector_USB/USB3_A_Receptacle_Wuerth_692122030100\",\"Connector_USB/USB3_Micro-B_Connfly_DS1104-01\",\"Connector_USB/USB_A_CNCTech_1001-011-01101_Horizontal\",\"Connector_USB/USB_A_CUI_UJ2-ADH-TH_Horizontal_Stacked\",\"Connector_USB/USB_A_Connfly_DS1095\",\"Connector_USB/USB_A_Connfly_DS1098_Horizontal\",\"Connector_USB/USB_A_Kycon_KUSBX-AS1N-B_Horizontal\",\"Connector_USB/USB_A_Molex_105057_Vertical\",\"Connector_USB/USB_A_Molex_48037-2200_Horizontal\",\"Connector_USB/USB_A_Molex_67643_Horizontal\",\"Connector_USB/USB_A_Receptacle_GCT_USB1046\",\"Connector_USB/USB_A_Receptacle_XKB_U231-091N-4BLRA00-S\",\"Connector_USB/USB_A_Stewart_SS-52100-001_Horizontal\",\"Connector_USB/USB_A_TE_292303-7_Horizontal\",\"Connector_USB/USB_A_Wuerth_614004134726_Horizontal\",\"Connector_USB/USB_A_Wuerth_61400826021_Horizontal_Stacked\",\"Connector_USB/USB_B_Amphenol_MUSB-D511_Vertical_Rugged\",\"Connector_USB/USB_B_Lumberg_2411_02_Horizontal\",\"Connector_USB/USB_B_OST_USB-B1HSxx_Horizontal\",\"Connector_USB/USB_B_TE_5787834_Vertical\",\"Connector_USB/USB_C_Plug_JAE_DX07P024AJ1\",\"Connector_USB/USB_C_Plug_Molex_105444\",\"Connector_USB/USB_C_Plug_ShenzhenJingTuoJin_918-118A2021Y40002_Vertical\",\"Connector_USB/USB_C_Receptacle_Amphenol_12401548E4-2A\",\"Connector_USB/USB_C_Receptacle_Amphenol_12401548E4-2A_CircularHoles\",\"Connector_USB/USB_C_Receptacle_Amphenol_12401610E4-2A\",\"Connector_USB/USB_C_Receptacle_Amphenol_12401610E4-2A_CircularHoles\",\"Connector_USB/USB_C_Receptacle_Amphenol_12401948E412A\",\"Connector_USB/USB_C_Receptacle_Amphenol_124019772112A\",\"Connector_USB/USB_C_Receptacle_CNCTech_C-ARA1-AK51X\",\"Connector_USB/USB_C_Receptacle_G-Switch_GT-USB-7010ASV\",\"Connector_USB/USB_C_Receptacle_G-Switch_GT-USB-7025\",\"Connector_USB/USB_C_Receptacle_G-Switch_GT-USB-7051x\",\"Connector_USB/USB_C_Receptacle_GCT_USB4085\",\"Connector_USB/USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal\",\"Connector_USB/USB_C_Receptacle_GCT_USB4110\",\"Connector_USB/USB_C_Receptacle_GCT_USB4115-03-C\",\"Connector_USB/USB_C_Receptacle_GCT_USB4125-xx-x-0190_6P_TopMnt_Horizontal\",\"Connector_USB/USB_C_Receptacle_GCT_USB4125-xx-x_6P_TopMnt_Horizontal\",\"Connector_USB/USB_C_Receptacle_GCT_USB4135-GF-A_6P_TopMnt_Horizontal\",\"Connector_USB/USB_C_Receptacle_HCTL_HC-TYPE-C-16P-01A\",\"Connector_USB/USB_C_Receptacle_HRO_TYPE-C-31-M-12\",\"Connector_USB/USB_C_Receptacle_HRO_TYPE-C-31-M-17\",\"Connector_USB/USB_C_Receptacle_JAE_DX07S016JA1R1500\",\"Connector_USB/USB_C_Receptacle_JAE_DX07S024WJ1R350\",\"Connector_USB/USB_C_Receptacle_JAE_DX07S024WJ3R400\",\"Connector_USB/USB_C_Receptacle_Molex_105450-0101\",\"Connector_USB/USB_C_Receptacle_Palconn_UTC16-G\",\"Connector_USB/USB_C_Receptacle_XKB_U262-16XN-4BVC11\",\"Connector_USB/USB_Micro-AB_Molex_47590-0001\",\"Connector_USB/USB_Micro-B_Amphenol_10103594-0001LF_Horizontal\",\"Connector_USB/USB_Micro-B_Amphenol_10104110_Horizontal\",\"Connector_USB/USB_Micro-B_Amphenol_10118193-0001LF_Horizontal\",\"Connector_USB/USB_Micro-B_Amphenol_10118193-0002LF_Horizontal\",\"Connector_USB/USB_Micro-B_Amphenol_10118194-0001LF_Horizontal\",\"Connector_USB/USB_Micro-B_Amphenol_10118194_Horizontal\",\"Connector_USB/USB_Micro-B_GCT_USB3076-30-A\",\"Connector_USB/USB_Micro-B_Molex-105017-0001\",\"Connector_USB/USB_Micro-B_Molex-105133-0001\",\"Connector_USB/USB_Micro-B_Molex-105133-0031\",\"Connector_USB/USB_Micro-B_Molex_47346-0001\",\"Connector_USB/USB_Micro-B_Technik_TWP-4002D-H3\",\"Connector_USB/USB_Micro-B_Wuerth_614105150721_Vertical\",\"Connector_USB/USB_Micro-B_Wuerth_614105150721_Vertical_CircularHoles\",\"Connector_USB/USB_Micro-B_Wuerth_629105150521\",\"Connector_USB/USB_Micro-B_Wuerth_629105150521_CircularHoles\",\"Connector_USB/USB_Micro-B_XKB_U254-051T-4BH83-F1S\",\"Connector_USB/USB_Mini-B_AdamTech_MUSB-B5-S-VT-TSMT-1_SMD_Vertical\",\"Connector_USB/USB_Mini-B_Lumberg_2486_01_Horizontal\",\"Connector_USB/USB_Mini-B_Tensility_54-00023_Vertical\",\"Connector_USB/USB_Mini-B_Tensility_54-00023_Vertical_CircularHoles\",\"Connector_USB/USB_Mini-B_Wuerth_65100516121_Horizontal\",\"Connector_Video/DVI-D_Molex_74320-4004_Horizontal\",\"Connector_Video/DVI-I_Molex_74320-1004_Horizontal\",\"Connector_Video/HDMI_A_Amphenol_10029449-x01xLF_Horizontal\",\"Connector_Video/HDMI_A_Contact_Technology_19APL2_Horizontal\",\"Connector_Video/HDMI_A_Kycon_KDMIX-SL1-NS-WS-B15_VerticalRightAngle\",\"Connector_Video/HDMI_A_Molex_208658-1001_Horizontal\",\"Connector_Video/HDMI_Micro-D_Molex_46765-0xxx\",\"Connector_Video/HDMI_Micro-D_Molex_46765-1xxx\",\"Connector_Video/HDMI_Micro-D_Molex_46765-2xxx\",\"Connector_Wago/Wago_734-132_1x02_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-133_1x03_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-134_1x04_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-135_1x05_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-136_1x06_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-137_1x07_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-138_1x08_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-139_1x09_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-140_1x10_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-141_1x11_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-142_1x12_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-143_1x13_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-144_1x14_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-146_1x16_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-148_1x18_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-150_1x20_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-154_1x24_P3.50mm_Vertical\",\"Connector_Wago/Wago_734-162_1x02_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-163_1x03_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-164_1x04_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-165_1x05_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-166_1x06_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-167_1x07_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-168_1x08_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-169_1x09_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-170_1x10_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-171_1x11_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-172_1x12_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-173_1x13_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-174_1x14_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-176_1x16_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-178_1x18_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-180_1x20_P3.50mm_Horizontal\",\"Connector_Wago/Wago_734-184_1x24_P3.50mm_Horizontal\",\"Connector_Wire/SolderWire-0.127sqmm_1x01_D0.48mm_OD1mm\",\"Connector_Wire/SolderWire-0.127sqmm_1x01_D0.48mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.127sqmm_1x01_D0.48mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.127sqmm_1x02_P3.7mm_D0.48mm_OD1mm\",\"Connector_Wire/SolderWire-0.127sqmm_1x02_P3.7mm_D0.48mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.127sqmm_1x02_P3.7mm_D0.48mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.127sqmm_1x03_P3.7mm_D0.48mm_OD1mm\",\"Connector_Wire/SolderWire-0.127sqmm_1x03_P3.7mm_D0.48mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.127sqmm_1x03_P3.7mm_D0.48mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.127sqmm_1x04_P3.7mm_D0.48mm_OD1mm\",\"Connector_Wire/SolderWire-0.127sqmm_1x04_P3.7mm_D0.48mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.127sqmm_1x04_P3.7mm_D0.48mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.127sqmm_1x05_P3.7mm_D0.48mm_OD1mm\",\"Connector_Wire/SolderWire-0.127sqmm_1x05_P3.7mm_D0.48mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.127sqmm_1x05_P3.7mm_D0.48mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.127sqmm_1x06_P3.7mm_D0.48mm_OD1mm\",\"Connector_Wire/SolderWire-0.127sqmm_1x06_P3.7mm_D0.48mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.127sqmm_1x06_P3.7mm_D0.48mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.15sqmm_1x01_D0.5mm_OD1.5mm\",\"Connector_Wire/SolderWire-0.15sqmm_1x01_D0.5mm_OD1.5mm_Relief\",\"Connector_Wire/SolderWire-0.15sqmm_1x01_D0.5mm_OD1.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.15sqmm_1x02_P4mm_D0.5mm_OD1.5mm\",\"Connector_Wire/SolderWire-0.15sqmm_1x02_P4mm_D0.5mm_OD1.5mm_Relief\",\"Connector_Wire/SolderWire-0.15sqmm_1x02_P4mm_D0.5mm_OD1.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.15sqmm_1x03_P4mm_D0.5mm_OD1.5mm\",\"Connector_Wire/SolderWire-0.15sqmm_1x03_P4mm_D0.5mm_OD1.5mm_Relief\",\"Connector_Wire/SolderWire-0.15sqmm_1x03_P4mm_D0.5mm_OD1.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.15sqmm_1x04_P4mm_D0.5mm_OD1.5mm\",\"Connector_Wire/SolderWire-0.15sqmm_1x04_P4mm_D0.5mm_OD1.5mm_Relief\",\"Connector_Wire/SolderWire-0.15sqmm_1x04_P4mm_D0.5mm_OD1.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.15sqmm_1x05_P4mm_D0.5mm_OD1.5mm\",\"Connector_Wire/SolderWire-0.15sqmm_1x05_P4mm_D0.5mm_OD1.5mm_Relief\",\"Connector_Wire/SolderWire-0.15sqmm_1x05_P4mm_D0.5mm_OD1.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.15sqmm_1x06_P4mm_D0.5mm_OD1.5mm\",\"Connector_Wire/SolderWire-0.15sqmm_1x06_P4mm_D0.5mm_OD1.5mm_Relief\",\"Connector_Wire/SolderWire-0.15sqmm_1x06_P4mm_D0.5mm_OD1.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.1sqmm_1x01_D0.4mm_OD1mm\",\"Connector_Wire/SolderWire-0.1sqmm_1x01_D0.4mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.1sqmm_1x01_D0.4mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.1sqmm_1x02_P3.6mm_D0.4mm_OD1mm\",\"Connector_Wire/SolderWire-0.1sqmm_1x02_P3.6mm_D0.4mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.1sqmm_1x02_P3.6mm_D0.4mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.1sqmm_1x03_P3.6mm_D0.4mm_OD1mm\",\"Connector_Wire/SolderWire-0.1sqmm_1x03_P3.6mm_D0.4mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.1sqmm_1x03_P3.6mm_D0.4mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.1sqmm_1x04_P3.6mm_D0.4mm_OD1mm\",\"Connector_Wire/SolderWire-0.1sqmm_1x04_P3.6mm_D0.4mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.1sqmm_1x04_P3.6mm_D0.4mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.1sqmm_1x05_P3.6mm_D0.4mm_OD1mm\",\"Connector_Wire/SolderWire-0.1sqmm_1x05_P3.6mm_D0.4mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.1sqmm_1x05_P3.6mm_D0.4mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.1sqmm_1x06_P3.6mm_D0.4mm_OD1mm\",\"Connector_Wire/SolderWire-0.1sqmm_1x06_P3.6mm_D0.4mm_OD1mm_Relief\",\"Connector_Wire/SolderWire-0.1sqmm_1x06_P3.6mm_D0.4mm_OD1mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD1.7mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD1.7mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD1.7mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD2mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD2mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD2mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x02_P4.2mm_D0.65mm_OD1.7mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x02_P4.2mm_D0.65mm_OD1.7mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x02_P4.2mm_D0.65mm_OD1.7mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x02_P4.5mm_D0.65mm_OD2mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x02_P4.5mm_D0.65mm_OD2mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x02_P4.5mm_D0.65mm_OD2mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x03_P4.2mm_D0.65mm_OD1.7mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x03_P4.2mm_D0.65mm_OD1.7mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x03_P4.2mm_D0.65mm_OD1.7mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x03_P4.5mm_D0.65mm_OD2mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x03_P4.5mm_D0.65mm_OD2mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x03_P4.5mm_D0.65mm_OD2mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x04_P4.2mm_D0.65mm_OD1.7mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x04_P4.2mm_D0.65mm_OD1.7mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x04_P4.2mm_D0.65mm_OD1.7mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x04_P4.5mm_D0.65mm_OD2mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x04_P4.5mm_D0.65mm_OD2mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x04_P4.5mm_D0.65mm_OD2mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x05_P4.2mm_D0.65mm_OD1.7mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x05_P4.2mm_D0.65mm_OD1.7mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x05_P4.2mm_D0.65mm_OD1.7mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x05_P4.5mm_D0.65mm_OD2mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x05_P4.5mm_D0.65mm_OD2mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x05_P4.5mm_D0.65mm_OD2mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x06_P4.2mm_D0.65mm_OD1.7mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x06_P4.2mm_D0.65mm_OD1.7mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x06_P4.2mm_D0.65mm_OD1.7mm_Relief2x\",\"Connector_Wire/SolderWire-0.25sqmm_1x06_P4.5mm_D0.65mm_OD2mm\",\"Connector_Wire/SolderWire-0.25sqmm_1x06_P4.5mm_D0.65mm_OD2mm_Relief\",\"Connector_Wire/SolderWire-0.25sqmm_1x06_P4.5mm_D0.65mm_OD2mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.1mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.1mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.1mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x02_P4.8mm_D0.9mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x02_P4.8mm_D0.9mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x02_P4.8mm_D0.9mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x03_P4.6mm_D0.9mm_OD2.1mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x03_P4.6mm_D0.9mm_OD2.1mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x03_P4.6mm_D0.9mm_OD2.1mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x03_P4.8mm_D0.9mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x03_P4.8mm_D0.9mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x03_P4.8mm_D0.9mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x04_P4.6mm_D0.9mm_OD2.1mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x04_P4.6mm_D0.9mm_OD2.1mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x04_P4.6mm_D0.9mm_OD2.1mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x05_P4.6mm_D0.9mm_OD2.1mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x05_P4.6mm_D0.9mm_OD2.1mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x05_P4.6mm_D0.9mm_OD2.1mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x05_P4.8mm_D0.9mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x05_P4.8mm_D0.9mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x05_P4.8mm_D0.9mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x06_P4.6mm_D0.9mm_OD2.1mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x06_P4.6mm_D0.9mm_OD2.1mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x06_P4.6mm_D0.9mm_OD2.1mm_Relief2x\",\"Connector_Wire/SolderWire-0.5sqmm_1x06_P4.8mm_D0.9mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.5sqmm_1x06_P4.8mm_D0.9mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.5sqmm_1x06_P4.8mm_D0.9mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD3.5mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD3.5mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD3.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x02_P4.8mm_D1.25mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x02_P4.8mm_D1.25mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x02_P4.8mm_D1.25mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x02_P7mm_D1.25mm_OD3.5mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x02_P7mm_D1.25mm_OD3.5mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x02_P7mm_D1.25mm_OD3.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x03_P4.8mm_D1.25mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x03_P4.8mm_D1.25mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x03_P4.8mm_D1.25mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x03_P7mm_D1.25mm_OD3.5mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x03_P7mm_D1.25mm_OD3.5mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x03_P7mm_D1.25mm_OD3.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x04_P4.8mm_D1.25mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x04_P4.8mm_D1.25mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x04_P4.8mm_D1.25mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x04_P7mm_D1.25mm_OD3.5mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x04_P7mm_D1.25mm_OD3.5mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x04_P7mm_D1.25mm_OD3.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x05_P4.8mm_D1.25mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x05_P4.8mm_D1.25mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x05_P4.8mm_D1.25mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x05_P7mm_D1.25mm_OD3.5mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x05_P7mm_D1.25mm_OD3.5mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x05_P7mm_D1.25mm_OD3.5mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x06_P4.8mm_D1.25mm_OD2.3mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x06_P4.8mm_D1.25mm_OD2.3mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x06_P4.8mm_D1.25mm_OD2.3mm_Relief2x\",\"Connector_Wire/SolderWire-0.75sqmm_1x06_P7mm_D1.25mm_OD3.5mm\",\"Connector_Wire/SolderWire-0.75sqmm_1x06_P7mm_D1.25mm_OD3.5mm_Relief\",\"Connector_Wire/SolderWire-0.75sqmm_1x06_P7mm_D1.25mm_OD3.5mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3.9mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x02_P6mm_D1.7mm_OD3mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x02_P6mm_D1.7mm_OD3mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x02_P6mm_D1.7mm_OD3mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x02_P7.8mm_D1.7mm_OD3.9mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x02_P7.8mm_D1.7mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x02_P7.8mm_D1.7mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x03_P6mm_D1.7mm_OD3mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x03_P6mm_D1.7mm_OD3mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x03_P6mm_D1.7mm_OD3mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x03_P7.8mm_D1.7mm_OD3.9mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x03_P7.8mm_D1.7mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x03_P7.8mm_D1.7mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x04_P7.8mm_D1.7mm_OD3.9mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x04_P7.8mm_D1.7mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x04_P7.8mm_D1.7mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x05_P6mm_D1.7mm_OD3mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x05_P6mm_D1.7mm_OD3mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x05_P6mm_D1.7mm_OD3mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x05_P7.8mm_D1.7mm_OD3.9mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x05_P7.8mm_D1.7mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x05_P7.8mm_D1.7mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x06_P6mm_D1.7mm_OD3mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x06_P6mm_D1.7mm_OD3mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x06_P6mm_D1.7mm_OD3mm_Relief2x\",\"Connector_Wire/SolderWire-1.5sqmm_1x06_P7.8mm_D1.7mm_OD3.9mm\",\"Connector_Wire/SolderWire-1.5sqmm_1x06_P7.8mm_D1.7mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1.5sqmm_1x06_P7.8mm_D1.7mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD2.7mm\",\"Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD2.7mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD2.7mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD3.9mm\",\"Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x02_P5.4mm_D1.4mm_OD2.7mm\",\"Connector_Wire/SolderWire-1sqmm_1x02_P5.4mm_D1.4mm_OD2.7mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x02_P5.4mm_D1.4mm_OD2.7mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x02_P7.8mm_D1.4mm_OD3.9mm\",\"Connector_Wire/SolderWire-1sqmm_1x02_P7.8mm_D1.4mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x02_P7.8mm_D1.4mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x03_P5.4mm_D1.4mm_OD2.7mm\",\"Connector_Wire/SolderWire-1sqmm_1x03_P5.4mm_D1.4mm_OD2.7mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x03_P5.4mm_D1.4mm_OD2.7mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x03_P7.8mm_D1.4mm_OD3.9mm\",\"Connector_Wire/SolderWire-1sqmm_1x03_P7.8mm_D1.4mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x03_P7.8mm_D1.4mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x04_P5.4mm_D1.4mm_OD2.7mm\",\"Connector_Wire/SolderWire-1sqmm_1x04_P5.4mm_D1.4mm_OD2.7mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x04_P5.4mm_D1.4mm_OD2.7mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x04_P7.8mm_D1.4mm_OD3.9mm\",\"Connector_Wire/SolderWire-1sqmm_1x04_P7.8mm_D1.4mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x04_P7.8mm_D1.4mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x05_P5.4mm_D1.4mm_OD2.7mm\",\"Connector_Wire/SolderWire-1sqmm_1x05_P5.4mm_D1.4mm_OD2.7mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x05_P5.4mm_D1.4mm_OD2.7mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x05_P7.8mm_D1.4mm_OD3.9mm\",\"Connector_Wire/SolderWire-1sqmm_1x05_P7.8mm_D1.4mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x05_P7.8mm_D1.4mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x06_P5.4mm_D1.4mm_OD2.7mm\",\"Connector_Wire/SolderWire-1sqmm_1x06_P5.4mm_D1.4mm_OD2.7mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x06_P5.4mm_D1.4mm_OD2.7mm_Relief2x\",\"Connector_Wire/SolderWire-1sqmm_1x06_P7.8mm_D1.4mm_OD3.9mm\",\"Connector_Wire/SolderWire-1sqmm_1x06_P7.8mm_D1.4mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-1sqmm_1x06_P7.8mm_D1.4mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD3.6mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD3.6mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD3.6mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD4.4mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD4.4mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD4.4mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x02_P7.2mm_D2.4mm_OD3.6mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x02_P7.2mm_D2.4mm_OD3.6mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x02_P7.2mm_D2.4mm_OD3.6mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x02_P8.8mm_D2.4mm_OD4.4mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x02_P8.8mm_D2.4mm_OD4.4mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x02_P8.8mm_D2.4mm_OD4.4mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x03_P7.2mm_D2.4mm_OD3.6mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x03_P7.2mm_D2.4mm_OD3.6mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x03_P7.2mm_D2.4mm_OD3.6mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x03_P8.8mm_D2.4mm_OD4.4mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x03_P8.8mm_D2.4mm_OD4.4mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x03_P8.8mm_D2.4mm_OD4.4mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x04_P7.2mm_D2.4mm_OD3.6mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x04_P7.2mm_D2.4mm_OD3.6mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x04_P7.2mm_D2.4mm_OD3.6mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x04_P8.8mm_D2.4mm_OD4.4mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x04_P8.8mm_D2.4mm_OD4.4mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x04_P8.8mm_D2.4mm_OD4.4mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x05_P7.2mm_D2.4mm_OD3.6mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x05_P7.2mm_D2.4mm_OD3.6mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x05_P7.2mm_D2.4mm_OD3.6mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x05_P8.8mm_D2.4mm_OD4.4mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x05_P8.8mm_D2.4mm_OD4.4mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x05_P8.8mm_D2.4mm_OD4.4mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x06_P7.2mm_D2.4mm_OD3.6mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x06_P7.2mm_D2.4mm_OD3.6mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x06_P7.2mm_D2.4mm_OD3.6mm_Relief2x\",\"Connector_Wire/SolderWire-2.5sqmm_1x06_P8.8mm_D2.4mm_OD4.4mm\",\"Connector_Wire/SolderWire-2.5sqmm_1x06_P8.8mm_D2.4mm_OD4.4mm_Relief\",\"Connector_Wire/SolderWire-2.5sqmm_1x06_P8.8mm_D2.4mm_OD4.4mm_Relief2x\",\"Connector_Wire/SolderWire-2sqmm_1x01_D2mm_OD3.9mm\",\"Connector_Wire/SolderWire-2sqmm_1x01_D2mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-2sqmm_1x01_D2mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-2sqmm_1x02_P7.8mm_D2mm_OD3.9mm\",\"Connector_Wire/SolderWire-2sqmm_1x02_P7.8mm_D2mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-2sqmm_1x02_P7.8mm_D2mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-2sqmm_1x03_P7.8mm_D2mm_OD3.9mm\",\"Connector_Wire/SolderWire-2sqmm_1x03_P7.8mm_D2mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-2sqmm_1x03_P7.8mm_D2mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-2sqmm_1x04_P7.8mm_D2mm_OD3.9mm\",\"Connector_Wire/SolderWire-2sqmm_1x04_P7.8mm_D2mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-2sqmm_1x04_P7.8mm_D2mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-2sqmm_1x05_P7.8mm_D2mm_OD3.9mm\",\"Connector_Wire/SolderWire-2sqmm_1x05_P7.8mm_D2mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-2sqmm_1x05_P7.8mm_D2mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-2sqmm_1x06_P7.8mm_D2mm_OD3.9mm\",\"Connector_Wire/SolderWire-2sqmm_1x06_P7.8mm_D2mm_OD3.9mm_Relief\",\"Connector_Wire/SolderWire-2sqmm_1x06_P7.8mm_D2mm_OD3.9mm_Relief2x\",\"Connector_Wire/SolderWire-4sqmm_1x01_D3mm_OD6mm\",\"Connector_Wire/SolderWire-4sqmm_1x01_D3mm_OD6mm_Relief\",\"Connector_Wire/SolderWire-4sqmm_1x01_D3mm_OD6mm_Relief2x\",\"Connector_Wire/SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mm\",\"Connector_Wire/SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mm_Relief\",\"Connector_Wire/SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mm_Relief2x\",\"Connector_Wire/SolderWire-4sqmm_1x03_P12mm_D3mm_OD6mm\",\"Connector_Wire/SolderWire-4sqmm_1x03_P12mm_D3mm_OD6mm_Relief\",\"Connector_Wire/SolderWire-4sqmm_1x03_P12mm_D3mm_OD6mm_Relief2x\",\"Connector_Wire/SolderWire-4sqmm_1x04_P12mm_D3mm_OD6mm\",\"Connector_Wire/SolderWire-4sqmm_1x04_P12mm_D3mm_OD6mm_Relief\",\"Connector_Wire/SolderWire-4sqmm_1x04_P12mm_D3mm_OD6mm_Relief2x\",\"Connector_Wire/SolderWire-4sqmm_1x05_P12mm_D3mm_OD6mm\",\"Connector_Wire/SolderWire-4sqmm_1x05_P12mm_D3mm_OD6mm_Relief\",\"Connector_Wire/SolderWire-4sqmm_1x05_P12mm_D3mm_OD6mm_Relief2x\",\"Connector_Wire/SolderWire-4sqmm_1x06_P12mm_D3mm_OD6mm\",\"Connector_Wire/SolderWire-4sqmm_1x06_P12mm_D3mm_OD6mm_Relief\",\"Connector_Wire/SolderWire-4sqmm_1x06_P12mm_D3mm_OD6mm_Relief2x\",\"Connector_Wire/SolderWire-6sqmm_1x01_D3.5mm_OD7mm\",\"Connector_Wire/SolderWire-6sqmm_1x01_D3.5mm_OD7mm_Relief\",\"Connector_Wire/SolderWire-6sqmm_1x01_D3.5mm_OD7mm_Relief2x\",\"Connector_Wire/SolderWire-6sqmm_1x02_P14mm_D3.5mm_OD7mm\",\"Connector_Wire/SolderWire-6sqmm_1x02_P14mm_D3.5mm_OD7mm_Relief\",\"Connector_Wire/SolderWire-6sqmm_1x02_P14mm_D3.5mm_OD7mm_Relief2x\",\"Connector_Wire/SolderWire-6sqmm_1x03_P14mm_D3.5mm_OD7mm\",\"Connector_Wire/SolderWire-6sqmm_1x03_P14mm_D3.5mm_OD7mm_Relief\",\"Connector_Wire/SolderWire-6sqmm_1x03_P14mm_D3.5mm_OD7mm_Relief2x\",\"Connector_Wire/SolderWire-6sqmm_1x04_P14mm_D3.5mm_OD7mm\",\"Connector_Wire/SolderWire-6sqmm_1x04_P14mm_D3.5mm_OD7mm_Relief\",\"Connector_Wire/SolderWire-6sqmm_1x04_P14mm_D3.5mm_OD7mm_Relief2x\",\"Connector_Wire/SolderWire-6sqmm_1x05_P14mm_D3.5mm_OD7mm\",\"Connector_Wire/SolderWire-6sqmm_1x05_P14mm_D3.5mm_OD7mm_Relief\",\"Connector_Wire/SolderWire-6sqmm_1x05_P14mm_D3.5mm_OD7mm_Relief2x\",\"Connector_Wire/SolderWire-6sqmm_1x06_P14mm_D3.5mm_OD7mm\",\"Connector_Wire/SolderWire-6sqmm_1x06_P14mm_D3.5mm_OD7mm_Relief\",\"Connector_Wire/SolderWire-6sqmm_1x06_P14mm_D3.5mm_OD7mm_Relief2x\",\"Connector_Wire/SolderWirePad_1x01_SMD_1.5x3mm\",\"Connector_Wire/SolderWirePad_1x01_SMD_1x2mm\",\"Connector_Wire/SolderWirePad_1x01_SMD_2x4mm\",\"Connector_Wire/SolderWirePad_1x01_SMD_3x6mm\",\"Connector_Wire/SolderWirePad_1x01_SMD_4x8mm\",\"Connector_Wire/SolderWirePad_1x01_SMD_5x10mm\",\"Connector_Wuerth/Wuerth_WR-PHD_610004243021_SMD_2x02_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610006243021_SMD_2x03_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610008243021_SMD_2x04_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610010243021_SMD_2x05_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610012243021_SMD_2x06_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610016243021_SMD_2x08_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610018243021_SMD_2x09_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610020243021_SMD_2x10_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610022243021_SMD_2x11_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610024243021_SMD_2x12_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610026243021_SMD_2x13_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610032243021_SMD_2x16_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_610034243021_SMD_2x17_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613004216921_Large_2x02_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61300425721_Standard_2x02_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613006216921_Large_2x03_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61300625721_Standard_2x03_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613008216921_Large_2x04_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61300825721_Standard_2x04_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613010216921_Large_2x05_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61301025721_Standard_2x05_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613012216921_Large_2x06_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61301225721_Standard_2x06_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613016216921_Large_2x08_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61301625721_Standard_2x08_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613018216921_Large_2x09_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613020216921_Large_2x10_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61302025721_Standard_2x10_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613022216921_Large_2x11_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613024216921_Large_2x12_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61302425721_Standard_2x12_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613026216921_Large_2x13_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61302625721_Standard_2x13_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613032216921_Large_2x16_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61303225721_Standard_2x16_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_613034216921_Large_2x17_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-PHD_61303425721_Standard_2x17_P2.54mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800211622_1x02_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800311622_1x03_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800411622_1x04_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800511622_1x05_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800611622_1x06_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800711622_1x07_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800811622_1x08_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64800911622_1x09_P1.50mm_Vertical\",\"Connector_Wuerth/Wuerth_WR-WTB_64801011622_1x10_P1.50mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-10PLT_1x10-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-2PLT_1x02-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-3PLT_1x03-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-4PLT_1x04-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-5PLT_1x05-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-6PLT_1x06-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-7PLT_1x07-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-8PLT_1x08-1MP_P3.96mm_Vertical\",\"Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-9PLT_1x09-1MP_P3.96mm_Vertical\",\"Converter_ACDC/Converter_ACDC_CUI_PBO-3-Sxx_THT_Vertical\",\"Converter_ACDC/Converter_ACDC_Hahn_HS-400xx_THT\",\"Converter_ACDC/Converter_ACDC_Hi-Link_HLK-10Mxx\",\"Converter_ACDC/Converter_ACDC_Hi-Link_HLK-12MxxA\",\"Converter_ACDC/Converter_ACDC_Hi-Link_HLK-20Mxx\",\"Converter_ACDC/Converter_ACDC_Hi-Link_HLK-2Mxx\",\"Converter_ACDC/Converter_ACDC_Hi-Link_HLK-30Mxx\",\"Converter_ACDC/Converter_ACDC_Hi-Link_HLK-5Mxx\",\"Converter_ACDC/Converter_ACDC_Hi-Link_HLK-PMxx\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-02-xx_SMD\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-02-xx_THT\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-03-xx_SMD\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-03-xx_THT\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-05-xx_THT\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-10-xx_THT\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-20-xx_THT\",\"Converter_ACDC/Converter_ACDC_MeanWell_IRM-60-xx_THT\",\"Converter_ACDC/Converter_ACDC_MeanWell_MFM-10-xx_THT\",\"Converter_ACDC/Converter_ACDC_MeanWell_MFM-15-xx_THT\",\"Converter_ACDC/Converter_ACDC_Murata_BAC05SxxDC_THT\",\"Converter_ACDC/Converter_ACDC_RECOM_RAC01-xxSGB_THT\",\"Converter_ACDC/Converter_ACDC_RECOM_RAC04-xxSGx_THT\",\"Converter_ACDC/Converter_ACDC_RECOM_RAC05-xxSK_THT\",\"Converter_ACDC/Converter_ACDC_Recom_RAC20-xxDK_THT\",\"Converter_ACDC/Converter_ACDC_Recom_RAC20-xxSK_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMF_051xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMF_101xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMF_201xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMF_301xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMG_071xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMG_151xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMLM-04_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMLM-05_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMLM-10-20_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMPW10_1xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMPW25_1xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TMPW5-1xx_THT\",\"Converter_ACDC/Converter_ACDC_TRACO_TPP-15-1xx-D_THT\",\"Converter_ACDC/Converter_ACDC_Vigortronix_VTX-214-010-1xx_THT\",\"Converter_ACDC/Converter_ACDC_Vigortronix_VTX-214-010-2xx_THT\",\"Converter_ACDC/Converter_ACDC_Vigortronix_VTX-214-015-1xx_THT\",\"Converter_ACDC/Converter_ACDC_ZETTLER_ZPI03Sxx00WC_THT\",\"Converter_DCDC/Converter_DCDC_Artesyn_ATA_SMD\",\"Converter_DCDC/Converter_DCDC_Bothhand_CFUDxxxx_THT\",\"Converter_DCDC/Converter_DCDC_Bothhand_CFUSxxxxEH_THT\",\"Converter_DCDC/Converter_DCDC_Bothhand_CFUSxxxx_THT\",\"Converter_DCDC/Converter_DCDC_Cincon_EC5BExx_Dual_THT\",\"Converter_DCDC/Converter_DCDC_Cincon_EC5BExx_Single_THT\",\"Converter_DCDC/Converter_DCDC_Cincon_EC6Cxx_Dual-Triple_THT\",\"Converter_DCDC/Converter_DCDC_Cincon_EC6Cxx_Single_THT\",\"Converter_DCDC/Converter_DCDC_Cyntec_MUN12AD01-SH\",\"Converter_DCDC/Converter_DCDC_Cyntec_MUN12AD03-SH\",\"Converter_DCDC/Converter_DCDC_Hamamatsu_C11204-1_THT\",\"Converter_DCDC/Converter_DCDC_MeanWell_NID30_THT\",\"Converter_DCDC/Converter_DCDC_MeanWell_NID60_THT\",\"Converter_DCDC/Converter_DCDC_MeanWell_NSD10_THT\",\"Converter_DCDC/Converter_DCDC_Murata_CRE1xxxxxx3C_THT\",\"Converter_DCDC/Converter_DCDC_Murata_CRE1xxxxxxDC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_CRE1xxxxxxSC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_MEE1SxxxxSC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_MEE3SxxxxSC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_MGJ2DxxxxxxSC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_MGJ3\",\"Converter_DCDC/Converter_DCDC_Murata_MYRxP\",\"Converter_DCDC/Converter_DCDC_Murata_NCS1SxxxxSC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_NMAxxxxDC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_NMAxxxxSC_THT\",\"Converter_DCDC/Converter_DCDC_Murata_NXExSxxxxMC_SMD\",\"Converter_DCDC/Converter_DCDC_Murata_OKI-78SR_Horizontal\",\"Converter_DCDC/Converter_DCDC_Murata_OKI-78SR_Vertical\",\"Converter_DCDC/Converter_DCDC_RECOM_R-78B-2.0_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_R-78E-0.5_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_R-78HB-0.5L_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_R-78HB-0.5_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_R-78S-0.1_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_R5xxxDA_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_R5xxxPA_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_RCD-24_THT\",\"Converter_DCDC/Converter_DCDC_RECOM_RPA60-xxxxSFW\",\"Converter_DCDC/Converter_DCDC_RECOM_RPMx.x-x.0\",\"Converter_DCDC/Converter_DCDC_Silvertel_Ag54xx\",\"Converter_DCDC/Converter_DCDC_Silvertel_Ag5810\",\"Converter_DCDC/Converter_DCDC_Silvertel_Ag99xxLP_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TBA1-xxxxE_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TBA1-xxxxE_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TBA1-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TBA2-xxxx_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TBA2-xxxx_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TDN_5-xxxxWISM_SMD\",\"Converter_DCDC/Converter_DCDC_TRACO_TDN_5-xxxxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TDU1-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEA1-xxxxE_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEA1-xxxxHI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEA1-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEC2-12xxWI_24xxWI_48xxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEC3-24xxUI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEL12-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN10-110xxWIRH_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN10-xxxx_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN10-xxxx_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN10-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN20-110xxWIRH_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN20-xxxx-N4_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN20-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN30-xxxxUIR_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEN40-110xxWIRH_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TEP150-721xUIR_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TES1-051x_121x_241x_Single_SMD\",\"Converter_DCDC/Converter_DCDC_TRACO_TES1-052x_122x_242x_Dual_SMD\",\"Converter_DCDC/Converter_DCDC_TRACO_THB10-xxxx_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_THB10-xxxx_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_THD_15-xxxxWIN_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_THL30-xxxxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_THL40-xxxxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_THN10-xxxxUIR_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_THN30-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_THR40-72xxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMA-05xxD_12xxD_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMA-05xxS_12xxS_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMA-15xxD_24xxD_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMA-15xxS_24xxS_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TME_03xxS_05xxS_12xxS_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TME_24xxS_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMR-1-xxxx_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMR-1-xxxx_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMR-1SM_SMD\",\"Converter_DCDC/Converter_DCDC_TRACO_TMR10-24xxWIR_48xxWIR_72xxWIR_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMR2-xxxxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMR4-xxxxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMU3-05xx_12xx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMU3-24xx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMV-051xD_121xD_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMV-051xS_121xS_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMV-241xD_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TMV-241xS_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TOS06-05SIL_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TOS06-12SIL_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TRA3-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TRI1-xxxxSM_SMD\",\"Converter_DCDC/Converter_DCDC_TRACO_TRI1-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TRI10_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TRI10_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TRN3-xx1x_Single_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TRN3-xx2x_Dual_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR-1_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR0.5-24xxSM_241xxSM_SMD\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR0.5-24xx_TSR0.5-24xxx_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR0.6-48xxWI_TSR0.6-48xxxWI_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR1-xxxxE_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR1.5-24xxE_24120E_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR2-24xxN_TSR2-24xxxN_THT\",\"Converter_DCDC/Converter_DCDC_TRACO_TSR2-xxxx_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IA48xxD_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IA48xxS_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IAxxxxD_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IAxxxxS_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxDH_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxD_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxSH_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxS_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-ISU02_SMD\",\"Converter_DCDC/Converter_DCDC_XP_POWER-ITQxxxxS-H_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-ITXxxxxSA_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER-ITxxxxxS_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER_JTDxxxxxxx_THT\",\"Converter_DCDC/Converter_DCDC_XP_POWER_JTExxxxDxx_THT\",\"Converter_DCDC/Converter_DCDC_muRata_MEJ1DxxxxSC_THT\",\"Converter_DCDC/Converter_DCDC_muRata_MEJ1SxxxxSC_THT\",\"Crystal/Crystal_AT310_D3.0mm_L10.0mm_Horizontal\",\"Crystal/Crystal_AT310_D3.0mm_L10.0mm_Horizontal_1EP_style1\",\"Crystal/Crystal_AT310_D3.0mm_L10.0mm_Horizontal_1EP_style2\",\"Crystal/Crystal_AT310_D3.0mm_L10.0mm_Vertical\",\"Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Horizontal\",\"Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Horizontal_1EP_style1\",\"Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Horizontal_1EP_style2\",\"Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Vertical\",\"Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Horizontal\",\"Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Horizontal_1EP_style1\",\"Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Horizontal_1EP_style2\",\"Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Vertical\",\"Crystal/Crystal_DS10_D1.0mm_L4.3mm_Horizontal\",\"Crystal/Crystal_DS10_D1.0mm_L4.3mm_Horizontal_1EP_style1\",\"Crystal/Crystal_DS10_D1.0mm_L4.3mm_Horizontal_1EP_style2\",\"Crystal/Crystal_DS10_D1.0mm_L4.3mm_Vertical\",\"Crystal/Crystal_DS15_D1.5mm_L5.0mm_Horizontal\",\"Crystal/Crystal_DS15_D1.5mm_L5.0mm_Horizontal_1EP_style1\",\"Crystal/Crystal_DS15_D1.5mm_L5.0mm_Horizontal_1EP_style2\",\"Crystal/Crystal_DS15_D1.5mm_L5.0mm_Vertical\",\"Crystal/Crystal_DS26_D2.0mm_L6.0mm_Horizontal\",\"Crystal/Crystal_DS26_D2.0mm_L6.0mm_Horizontal_1EP_style1\",\"Crystal/Crystal_DS26_D2.0mm_L6.0mm_Horizontal_1EP_style2\",\"Crystal/Crystal_DS26_D2.0mm_L6.0mm_Vertical\",\"Crystal/Crystal_HC18-U_Horizontal\",\"Crystal/Crystal_HC18-U_Horizontal_1EP_style1\",\"Crystal/Crystal_HC18-U_Horizontal_1EP_style2\",\"Crystal/Crystal_HC18-U_Vertical\",\"Crystal/Crystal_HC33-U_Horizontal\",\"Crystal/Crystal_HC33-U_Horizontal_1EP_style1\",\"Crystal/Crystal_HC33-U_Horizontal_1EP_style2\",\"Crystal/Crystal_HC33-U_Vertical\",\"Crystal/Crystal_HC35-U\",\"Crystal/Crystal_HC49-4H_Vertical\",\"Crystal/Crystal_HC49-U-3Pin_Vertical\",\"Crystal/Crystal_HC49-U_Horizontal\",\"Crystal/Crystal_HC49-U_Horizontal_1EP_style1\",\"Crystal/Crystal_HC49-U_Horizontal_1EP_style2\",\"Crystal/Crystal_HC49-U_Vertical\",\"Crystal/Crystal_HC50_Horizontal\",\"Crystal/Crystal_HC50_Horizontal_1EP_style1\",\"Crystal/Crystal_HC50_Horizontal_1EP_style2\",\"Crystal/Crystal_HC50_Vertical\",\"Crystal/Crystal_HC51-U_Vertical\",\"Crystal/Crystal_HC51_Horizontal\",\"Crystal/Crystal_HC51_Horizontal_1EP_style1\",\"Crystal/Crystal_HC51_Horizontal_1EP_style2\",\"Crystal/Crystal_HC52-6mm_Horizontal\",\"Crystal/Crystal_HC52-6mm_Horizontal_1EP_style1\",\"Crystal/Crystal_HC52-6mm_Horizontal_1EP_style2\",\"Crystal/Crystal_HC52-6mm_Vertical\",\"Crystal/Crystal_HC52-8mm_Horizontal\",\"Crystal/Crystal_HC52-8mm_Horizontal_1EP_style1\",\"Crystal/Crystal_HC52-8mm_Horizontal_1EP_style2\",\"Crystal/Crystal_HC52-8mm_Vertical\",\"Crystal/Crystal_HC52-U-3Pin_Vertical\",\"Crystal/Crystal_HC52-U_Horizontal\",\"Crystal/Crystal_HC52-U_Horizontal_1EP_style1\",\"Crystal/Crystal_HC52-U_Horizontal_1EP_style2\",\"Crystal/Crystal_HC52-U_Vertical\",\"Crystal/Crystal_Round_D1.0mm_Vertical\",\"Crystal/Crystal_Round_D1.5mm_Vertical\",\"Crystal/Crystal_Round_D2.0mm_Vertical\",\"Crystal/Crystal_Round_D3.0mm_Vertical\",\"Crystal/Crystal_SMD_0603-2Pin_6.0x3.5mm\",\"Crystal/Crystal_SMD_0603-2Pin_6.0x3.5mm_HandSoldering\",\"Crystal/Crystal_SMD_0603-4Pin_6.0x3.5mm\",\"Crystal/Crystal_SMD_0603-4Pin_6.0x3.5mm_HandSoldering\",\"Crystal/Crystal_SMD_1210-4Pin_1.2x1.0mm\",\"Crystal/Crystal_SMD_1210-4Pin_1.2x1.0mm_RotB\",\"Crystal/Crystal_SMD_2012-2Pin_2.0x1.2mm\",\"Crystal/Crystal_SMD_2012-2Pin_2.0x1.2mm_HandSoldering\",\"Crystal/Crystal_SMD_2016-4Pin_2.0x1.6mm\",\"Crystal/Crystal_SMD_2520-4Pin_2.5x2.0mm\",\"Crystal/Crystal_SMD_3215-2Pin_3.2x1.5mm\",\"Crystal/Crystal_SMD_3225-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSoldering\",\"Crystal/Crystal_SMD_5032-2Pin_5.0x3.2mm\",\"Crystal/Crystal_SMD_5032-2Pin_5.0x3.2mm_HandSoldering\",\"Crystal/Crystal_SMD_5032-4Pin_5.0x3.2mm\",\"Crystal/Crystal_SMD_7050-2Pin_7.0x5.0mm\",\"Crystal/Crystal_SMD_7050-2Pin_7.0x5.0mm_HandSoldering\",\"Crystal/Crystal_SMD_7050-4Pin_7.0x5.0mm\",\"Crystal/Crystal_SMD_Abracon_ABM10-4Pin_2.5x2.0mm\",\"Crystal/Crystal_SMD_Abracon_ABM3-2Pin_5.0x3.2mm\",\"Crystal/Crystal_SMD_Abracon_ABM3-2Pin_5.0x3.2mm_HandSoldering\",\"Crystal/Crystal_SMD_Abracon_ABM3B-4Pin_5.0x3.2mm\",\"Crystal/Crystal_SMD_Abracon_ABM3C-4Pin_5.0x3.2mm\",\"Crystal/Crystal_SMD_Abracon_ABM7-2Pin_6.0x3.5mm\",\"Crystal/Crystal_SMD_Abracon_ABM8AIG-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_Abracon_ABM8G-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_Abracon_ABS25-4Pin_8.0x3.8mm\",\"Crystal/Crystal_SMD_Citizen_CS325S-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_ECS_CSM3X-2Pin_7.6x4.1mm\",\"Crystal/Crystal_SMD_EuroQuartz_EQ161-2Pin_3.2x1.5mm\",\"Crystal/Crystal_SMD_EuroQuartz_EQ161-2Pin_3.2x1.5mm_HandSoldering\",\"Crystal/Crystal_SMD_EuroQuartz_MJ-4Pin_5.0x3.2mm\",\"Crystal/Crystal_SMD_EuroQuartz_MJ-4Pin_5.0x3.2mm_HandSoldering\",\"Crystal/Crystal_SMD_EuroQuartz_MQ-4Pin_7.0x5.0mm\",\"Crystal/Crystal_SMD_EuroQuartz_MQ-4Pin_7.0x5.0mm_HandSoldering\",\"Crystal/Crystal_SMD_EuroQuartz_MQ2-2Pin_7.0x5.0mm\",\"Crystal/Crystal_SMD_EuroQuartz_MQ2-2Pin_7.0x5.0mm_HandSoldering\",\"Crystal/Crystal_SMD_EuroQuartz_MT-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_EuroQuartz_MT-4Pin_3.2x2.5mm_HandSoldering\",\"Crystal/Crystal_SMD_EuroQuartz_X22-4Pin_2.5x2.0mm\",\"Crystal/Crystal_SMD_EuroQuartz_X22-4Pin_2.5x2.0mm_HandSoldering\",\"Crystal/Crystal_SMD_FOX_FE-2Pin_7.5x5.0mm\",\"Crystal/Crystal_SMD_FOX_FE-2Pin_7.5x5.0mm_HandSoldering\",\"Crystal/Crystal_SMD_FOX_FQ7050-2Pin_7.0x5.0mm\",\"Crystal/Crystal_SMD_FOX_FQ7050-2Pin_7.0x5.0mm_HandSoldering\",\"Crystal/Crystal_SMD_FOX_FQ7050-4Pin_7.0x5.0mm\",\"Crystal/Crystal_SMD_FrontierElectronics_FM206\",\"Crystal/Crystal_SMD_G8-2Pin_3.2x1.5mm\",\"Crystal/Crystal_SMD_G8-2Pin_3.2x1.5mm_HandSoldering\",\"Crystal/Crystal_SMD_HC49-SD\",\"Crystal/Crystal_SMD_HC49-SD_HandSoldering\",\"Crystal/Crystal_SMD_MicroCrystal_CC1V-T1A-2Pin_8.0x3.7mm\",\"Crystal/Crystal_SMD_MicroCrystal_CC1V-T1A-2Pin_8.0x3.7mm_HandSoldering\",\"Crystal/Crystal_SMD_MicroCrystal_CC4V-T1A-2Pin_5.0x1.9mm\",\"Crystal/Crystal_SMD_MicroCrystal_CC4V-T1A-2Pin_5.0x1.9mm_HandSoldering\",\"Crystal/Crystal_SMD_MicroCrystal_CC5V-T1A-2Pin_4.1x1.5mm\",\"Crystal/Crystal_SMD_MicroCrystal_CC5V-T1A-2Pin_4.1x1.5mm_HandSoldering\",\"Crystal/Crystal_SMD_MicroCrystal_CC7V-T1A-2Pin_3.2x1.5mm\",\"Crystal/Crystal_SMD_MicroCrystal_CC7V-T1A-2Pin_3.2x1.5mm_HandSoldering\",\"Crystal/Crystal_SMD_MicroCrystal_CC8V-T1A-2Pin_2.0x1.2mm\",\"Crystal/Crystal_SMD_MicroCrystal_CC8V-T1A-2Pin_2.0x1.2mm_HandSoldering\",\"Crystal/Crystal_SMD_MicroCrystal_CM9V-T1A-2Pin_1.6x1.0mm\",\"Crystal/Crystal_SMD_MicroCrystal_CM9V-T1A-2Pin_1.6x1.0mm_HandSoldering\",\"Crystal/Crystal_SMD_MicroCrystal_MS1V-T1K\",\"Crystal/Crystal_SMD_MicroCrystal_MS3V-T1R\",\"Crystal/Crystal_SMD_Qantek_QC5CB-2Pin_5x3.2mm\",\"Crystal/Crystal_SMD_SeikoEpson_FA128-4Pin_2.0x1.6mm\",\"Crystal/Crystal_SMD_SeikoEpson_FA238-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_SeikoEpson_FA238-4Pin_3.2x2.5mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_FA238V-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_SeikoEpson_FA238V-4Pin_3.2x2.5mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MA406-4Pin_11.7x4.0mm\",\"Crystal/Crystal_SMD_SeikoEpson_MA406-4Pin_11.7x4.0mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MA505-2Pin_12.7x5.1mm\",\"Crystal/Crystal_SMD_SeikoEpson_MA505-2Pin_12.7x5.1mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MA506-4Pin_12.7x5.1mm\",\"Crystal/Crystal_SMD_SeikoEpson_MA506-4Pin_12.7x5.1mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MC146-4Pin_6.7x1.5mm\",\"Crystal/Crystal_SMD_SeikoEpson_MC146-4Pin_6.7x1.5mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MC156-4Pin_7.1x2.5mm\",\"Crystal/Crystal_SMD_SeikoEpson_MC156-4Pin_7.1x2.5mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MC306-4Pin_8.0x3.2mm\",\"Crystal/Crystal_SMD_SeikoEpson_MC306-4Pin_8.0x3.2mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MC405-2Pin_9.6x4.1mm\",\"Crystal/Crystal_SMD_SeikoEpson_MC405-2Pin_9.6x4.1mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_MC406-4Pin_9.6x4.1mm\",\"Crystal/Crystal_SMD_SeikoEpson_MC406-4Pin_9.6x4.1mm_HandSoldering\",\"Crystal/Crystal_SMD_SeikoEpson_TSX3225-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_SeikoEpson_TSX3225-4Pin_3.2x2.5mm_HandSoldering\",\"Crystal/Crystal_SMD_TXC_7A-2Pin_5x3.2mm\",\"Crystal/Crystal_SMD_TXC_7M-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_TXC_7M-4Pin_3.2x2.5mm_HandSoldering\",\"Crystal/Crystal_SMD_TXC_9HT11-2Pin_2.0x1.2mm\",\"Crystal/Crystal_SMD_TXC_9HT11-2Pin_2.0x1.2mm_HandSoldering\",\"Crystal/Crystal_SMD_TXC_AX_8045-2Pin_8.0x4.5mm\",\"Crystal/Crystal_SMD_WE_12SMX-4Pin_7.0x5.0mm\",\"Crystal/Crystal_SMD_WE_CFPX-104-4Pin_5.0x3.2mm\",\"Crystal/Crystal_SMD_WE_CFPX-180-4Pin_3.2x2.5mm\",\"Crystal/Crystal_SMD_WE_CFPX-218-4Pin_2.5x2.0mm\",\"Crystal/Crystal_SMD_WE_IQXC-240-4Pin_1.2x1.0mm\",\"Crystal/Crystal_SMD_WE_IQXC-26-4Pin_1.6x1.2mm\",\"Crystal/Crystal_SMD_WE_IQXC-42-4Pin_2.0x1.6mm\",\"Crystal/Resonator-2Pin_W10.0mm_H5.0mm\",\"Crystal/Resonator-2Pin_W6.0mm_H3.0mm\",\"Crystal/Resonator-2Pin_W7.0mm_H2.5mm\",\"Crystal/Resonator-2Pin_W8.0mm_H3.5mm\",\"Crystal/Resonator-3Pin_W10.0mm_H5.0mm\",\"Crystal/Resonator-3Pin_W6.0mm_H3.0mm\",\"Crystal/Resonator-3Pin_W7.0mm_H2.5mm\",\"Crystal/Resonator-3Pin_W8.0mm_H3.5mm\",\"Crystal/Resonator_Murata_CSTLSxxxG-3Pin_W8.0mm_H3.0mm\",\"Crystal/Resonator_Murata_CSTLSxxxX-3Pin_W5.5mm_H3.0mm\",\"Crystal/Resonator_Murata_DSN6-3Pin_W7.0mm_H2.5mm\",\"Crystal/Resonator_Murata_DSS6-3Pin_W7.0mm_H2.5mm\",\"Crystal/Resonator_SMD-3Pin_7.2x3.0mm\",\"Crystal/Resonator_SMD-3Pin_7.2x3.0mm_HandSoldering\",\"Crystal/Resonator_SMD_Murata_CDSCB-2Pin_4.5x2.0mm\",\"Crystal/Resonator_SMD_Murata_CDSCB-2Pin_4.5x2.0mm_HandSoldering\",\"Crystal/Resonator_SMD_Murata_CSTCR_4.5x2x1.15mm\",\"Crystal/Resonator_SMD_Murata_CSTxExxV-3Pin_3.0x1.1mm\",\"Crystal/Resonator_SMD_Murata_CSTxExxV-3Pin_3.0x1.1mm_HandSoldering\",\"Crystal/Resonator_SMD_Murata_SFECV-3Pin_6.9x2.9mm\",\"Crystal/Resonator_SMD_Murata_SFECV-3Pin_6.9x2.9mm_HandSoldering\",\"Crystal/Resonator_SMD_Murata_SFSKA-3Pin_7.9x3.8mm\",\"Crystal/Resonator_SMD_Murata_SFSKA-3Pin_7.9x3.8mm_HandSoldering\",\"Crystal/Resonator_SMD_Murata_TPSKA-3Pin_7.9x3.8mm\",\"Crystal/Resonator_SMD_Murata_TPSKA-3Pin_7.9x3.8mm_HandSoldering\",\"Diode_SMD/D_01005_0402Metric\",\"Diode_SMD/D_01005_0402Metric_Pad0.57x0.30mm_HandSolder\",\"Diode_SMD/D_0201_0603Metric\",\"Diode_SMD/D_0201_0603Metric_Pad0.64x0.40mm_HandSolder\",\"Diode_SMD/D_0402_1005Metric\",\"Diode_SMD/D_0402_1005Metric_Pad0.77x0.64mm_HandSolder\",\"Diode_SMD/D_0603_1608Metric\",\"Diode_SMD/D_0603_1608Metric_Pad1.05x0.95mm_HandSolder\",\"Diode_SMD/D_0805_2012Metric\",\"Diode_SMD/D_0805_2012Metric_Pad1.15x1.40mm_HandSolder\",\"Diode_SMD/D_1206_3216Metric\",\"Diode_SMD/D_1206_3216Metric_Pad1.42x1.75mm_HandSolder\",\"Diode_SMD/D_1210_3225Metric\",\"Diode_SMD/D_1210_3225Metric_Pad1.42x2.65mm_HandSolder\",\"Diode_SMD/D_1812_4532Metric\",\"Diode_SMD/D_1812_4532Metric_Pad1.30x3.40mm_HandSolder\",\"Diode_SMD/D_2010_5025Metric\",\"Diode_SMD/D_2010_5025Metric_Pad1.52x2.65mm_HandSolder\",\"Diode_SMD/D_2114_3652Metric\",\"Diode_SMD/D_2114_3652Metric_Pad1.85x3.75mm_HandSolder\",\"Diode_SMD/D_2512_6332Metric\",\"Diode_SMD/D_2512_6332Metric_Pad1.52x3.35mm_HandSolder\",\"Diode_SMD/D_3220_8050Metric\",\"Diode_SMD/D_3220_8050Metric_Pad2.65x5.15mm_HandSolder\",\"Diode_SMD/D_MELF-RM10_Universal_Handsoldering\",\"Diode_SMD/D_MELF\",\"Diode_SMD/D_MELF_Handsoldering\",\"Diode_SMD/D_MicroMELF\",\"Diode_SMD/D_MicroMELF_Handsoldering\",\"Diode_SMD/D_MicroSMP_LargeAnode\",\"Diode_SMD/D_MicroSMP_LargeCathode\",\"Diode_SMD/D_MiniMELF\",\"Diode_SMD/D_MiniMELF_Handsoldering\",\"Diode_SMD/D_PowerDI-123\",\"Diode_SMD/D_PowerDI-5\",\"Diode_SMD/D_Powermite2_LargeAnode\",\"Diode_SMD/D_Powermite2_LargeCathode\",\"Diode_SMD/D_Powermite3\",\"Diode_SMD/D_Powermite_LargeAnode\",\"Diode_SMD/D_Powermite_LargeCathode\",\"Diode_SMD/D_QFN_3.3x3.3mm_P0.65mm\",\"Diode_SMD/D_SC-80\",\"Diode_SMD/D_SC-80_HandSoldering\",\"Diode_SMD/D_SMA-SMB_Universal_Handsoldering\",\"Diode_SMD/D_SMA\",\"Diode_SMD/D_SMA_Handsoldering\",\"Diode_SMD/D_SMB-SMC_Universal_Handsoldering\",\"Diode_SMD/D_SMB\",\"Diode_SMD/D_SMB_Handsoldering\",\"Diode_SMD/D_SMB_Modified\",\"Diode_SMD/D_SMC-RM10_Universal_Handsoldering\",\"Diode_SMD/D_SMC\",\"Diode_SMD/D_SMC_Handsoldering\",\"Diode_SMD/D_SMF\",\"Diode_SMD/D_SMP_DO-220AA\",\"Diode_SMD/D_SOD-110\",\"Diode_SMD/D_SOD-123\",\"Diode_SMD/D_SOD-123F\",\"Diode_SMD/D_SOD-128\",\"Diode_SMD/D_SOD-323\",\"Diode_SMD/D_SOD-323F\",\"Diode_SMD/D_SOD-323_HandSoldering\",\"Diode_SMD/D_SOD-523\",\"Diode_SMD/D_SOD-882\",\"Diode_SMD/D_SOD-882D\",\"Diode_SMD/D_SOD-923\",\"Diode_SMD/D_TUMD2\",\"Diode_SMD/Diode_Bridge_Bourns_CD-DF4xxS\",\"Diode_SMD/Diode_Bridge_Diotec_ABS\",\"Diode_SMD/Diode_Bridge_Diotec_MicroDil_3.0x3.0x1.8mm\",\"Diode_SMD/Diode_Bridge_Diotec_SO-DIL-Slim\",\"Diode_SMD/Diode_Bridge_OnSemi_SDIP-4L\",\"Diode_SMD/Diode_Bridge_Vishay_DFS\",\"Diode_SMD/Diode_Bridge_Vishay_DFSFlat\",\"Diode_SMD/Diode_Bridge_Vishay_MBLS\",\"Diode_SMD/Infineon_SG-WLL-2-3_0.58x0.28_P0.36mm\",\"Diode_SMD/Littelfuse_PolyZen-LS\",\"Diode_SMD/Nexperia_CFP3_SOD-123W\",\"Diode_SMD/Nexperia_DSN0603-2_0.6x0.3mm_P0.4mm\",\"Diode_SMD/Nexperia_DSN1608-2_1.6x0.8mm\",\"Diode_SMD/ST_D_SMC\",\"Diode_SMD/ST_QFN-2L_1.6x1.0mm\",\"Diode_SMD/Vishay_SMPA\",\"Diode_THT/D_5KPW_P12.70mm_Horizontal\",\"Diode_THT/D_5KPW_P7.62mm_Vertical_AnodeUp\",\"Diode_THT/D_5KPW_P7.62mm_Vertical_CathodeUp\",\"Diode_THT/D_5KP_P10.16mm_Horizontal\",\"Diode_THT/D_5KP_P12.70mm_Horizontal\",\"Diode_THT/D_5KP_P7.62mm_Vertical_AnodeUp\",\"Diode_THT/D_5KP_P7.62mm_Vertical_CathodeUp\",\"Diode_THT/D_5W_P10.16mm_Horizontal\",\"Diode_THT/D_5W_P12.70mm_Horizontal\",\"Diode_THT/D_5W_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_5W_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_A-405_P10.16mm_Horizontal\",\"Diode_THT/D_A-405_P12.70mm_Horizontal\",\"Diode_THT/D_A-405_P2.54mm_Vertical_AnodeUp\",\"Diode_THT/D_A-405_P2.54mm_Vertical_CathodeUp\",\"Diode_THT/D_A-405_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_A-405_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_A-405_P7.62mm_Horizontal\",\"Diode_THT/D_DO-15_P10.16mm_Horizontal\",\"Diode_THT/D_DO-15_P12.70mm_Horizontal\",\"Diode_THT/D_DO-15_P15.24mm_Horizontal\",\"Diode_THT/D_DO-15_P2.54mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-15_P2.54mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-15_P3.81mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-15_P3.81mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-15_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-15_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-201AD_P12.70mm_Horizontal\",\"Diode_THT/D_DO-201AD_P15.24mm_Horizontal\",\"Diode_THT/D_DO-201AD_P3.81mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-201AD_P3.81mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-201AD_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-201AD_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-201AE_P12.70mm_Horizontal\",\"Diode_THT/D_DO-201AE_P15.24mm_Horizontal\",\"Diode_THT/D_DO-201AE_P3.81mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-201AE_P3.81mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-201AE_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-201AE_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-201_P12.70mm_Horizontal\",\"Diode_THT/D_DO-201_P15.24mm_Horizontal\",\"Diode_THT/D_DO-201_P3.81mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-201_P3.81mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-201_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-201_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-247_Horizontal_TabDown\",\"Diode_THT/D_DO-247_Horizontal_TabUp\",\"Diode_THT/D_DO-247_Vertical\",\"Diode_THT/D_DO-27_P12.70mm_Horizontal\",\"Diode_THT/D_DO-27_P15.24mm_Horizontal\",\"Diode_THT/D_DO-27_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-27_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-34_SOD68_P10.16mm_Horizontal\",\"Diode_THT/D_DO-34_SOD68_P12.70mm_Horizontal\",\"Diode_THT/D_DO-34_SOD68_P2.54mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-34_SOD68_P2.54mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-34_SOD68_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-34_SOD68_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-34_SOD68_P7.62mm_Horizontal\",\"Diode_THT/D_DO-35_SOD27_P10.16mm_Horizontal\",\"Diode_THT/D_DO-35_SOD27_P12.70mm_Horizontal\",\"Diode_THT/D_DO-35_SOD27_P2.54mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-35_SOD27_P2.54mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-35_SOD27_P3.81mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-35_SOD27_P3.81mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-35_SOD27_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-35_SOD27_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-35_SOD27_P7.62mm_Horizontal\",\"Diode_THT/D_DO-41_SOD81_P10.16mm_Horizontal\",\"Diode_THT/D_DO-41_SOD81_P12.70mm_Horizontal\",\"Diode_THT/D_DO-41_SOD81_P2.54mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-41_SOD81_P2.54mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-41_SOD81_P3.81mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-41_SOD81_P3.81mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-41_SOD81_P5.08mm_Vertical_AnodeUp\",\"Diode_THT/D_DO-41_SOD81_P5.08mm_Vertical_CathodeUp\",\"Diode_THT/D_DO-41_SOD81_P7.62mm_Horizontal\",\"Diode_THT/D_P600_R-6_P12.70mm_Horizontal\",\"Diode_THT/D_P600_R-6_P20.00mm_Horizontal\",\"Diode_THT/D_P600_R-6_P7.62mm_Vertical_AnodeUp\",\"Diode_THT/D_P600_R-6_P7.62mm_Vertical_CathodeUp\",\"Diode_THT/D_T-1_P10.16mm_Horizontal\",\"Diode_THT/D_T-1_P12.70mm_Horizontal\",\"Diode_THT/D_T-1_P2.54mm_Vertical_AnodeUp\",\"Diode_THT/D_T-1_P2.54mm_Vertical_CathodeUp\",\"Diode_THT/D_T-1_P5.08mm_Horizontal\",\"Diode_THT/Diode_Bridge_15.1x15.1x6.3mm_P10.9mm\",\"Diode_THT/Diode_Bridge_15.2x15.2x6.3mm_P10.9mm\",\"Diode_THT/Diode_Bridge_15.7x15.7x6.3mm_P10.8mm\",\"Diode_THT/Diode_Bridge_16.7x16.7x6.3mm_P10.8mm\",\"Diode_THT/Diode_Bridge_19.0x19.0x6.8mm_P12.7mm\",\"Diode_THT/Diode_Bridge_19.0x3.5x10.0mm_P5.0mm\",\"Diode_THT/Diode_Bridge_28.6x28.6x7.3mm_P18.0mm_P11.6mm\",\"Diode_THT/Diode_Bridge_32.0x5.6x17.0mm_P10.0mm_P7.5mm\",\"Diode_THT/Diode_Bridge_Comchip_SCVB-L\",\"Diode_THT/Diode_Bridge_DIGITRON_KBPC_T\",\"Diode_THT/Diode_Bridge_DIP-4_W5.08mm_P2.54mm\",\"Diode_THT/Diode_Bridge_DIP-4_W7.62mm_P5.08mm\",\"Diode_THT/Diode_Bridge_GeneSiC_KBPC_T\",\"Diode_THT/Diode_Bridge_GeneSiC_KBPC_W\",\"Diode_THT/Diode_Bridge_IXYS_GUFP\",\"Diode_THT/Diode_Bridge_Round_D8.9mm\",\"Diode_THT/Diode_Bridge_Round_D9.0mm\",\"Diode_THT/Diode_Bridge_Round_D9.8mm\",\"Diode_THT/Diode_Bridge_Vishay_GBL\",\"Diode_THT/Diode_Bridge_Vishay_GBU\",\"Diode_THT/Diode_Bridge_Vishay_KBL\",\"Diode_THT/Diode_Bridge_Vishay_KBPC1\",\"Diode_THT/Diode_Bridge_Vishay_KBPC6\",\"Diode_THT/Diode_Bridge_Vishay_KBPM\",\"Diode_THT/Diode_Bridge_Vishay_KBU\",\"Display/AG12864E\",\"Display/Adafruit_SSD1306\",\"Display/Adafruit_SSD1306_No_Mounting_Holes\",\"Display/CR2013-MI2120\",\"Display/DL1416\",\"Display/EA-eDIP128B-XXX\",\"Display/EA_DOGL128-6\",\"Display/EA_DOGM128-6\",\"Display/EA_DOGS104X-A\",\"Display/EA_DOGXL160-7\",\"Display/EA_DOGXL160-7_Backlight\",\"Display/EA_T123X-I2C\",\"Display/EA_eDIP160-XXX\",\"Display/EA_eDIP240-XXX\",\"Display/EA_eDIP320X-XXX\",\"Display/EA_eDIPTFT32-XXX\",\"Display/EA_eDIPTFT43-ATC\",\"Display/EA_eDIPTFT43-XXX\",\"Display/EA_eDIPTFT57-XXX\",\"Display/EA_eDIPTFT70-ATC\",\"Display/EA_eDIPTFT70-XXX\",\"Display/ER-OLED0.42-1W_Folded\",\"Display/ERM19264\",\"Display/ER_OLEDM0.91_1x-I2C\",\"Display/HDSM-441B_HDSM-443B\",\"Display/HDSM-541B_HDSM-543B\",\"Display/HDSP-4830\",\"Display/HDSP-4832\",\"Display/HDSP-4836\",\"Display/HDSP-4840\",\"Display/HDSP-4850\",\"Display/HDSP-48xx\",\"Display/HLCP-J100\",\"Display/HY1602E\",\"Display/LCD-016N002L\",\"Display/LM16255\",\"Display/NHD-0420H1Z\",\"Display/NHD-C0220BiZ-FSRGB\",\"Display/NHD-C0220BiZ\",\"Display/NHD-C12832A1Z-FSRGB\",\"Display/Noritake_CU20025-Ux1J\",\"Display/OLED-128O064D\",\"Display/RC1602A\",\"Display/WC1602A\",\"Display_7Segment/7SEGMENT-LED__HDSM531_HDSM533_SMD\",\"Display_7Segment/7SegmentLED_LTS6760_LTS6780\",\"Display_7Segment/AD-121F2\",\"Display_7Segment/AFF_2x7SEG-DIGIT_10mm\",\"Display_7Segment/CA56-12CGKWA\",\"Display_7Segment/CA56-12EWA\",\"Display_7Segment/CA56-12SEKWA\",\"Display_7Segment/CA56-12SRWA\",\"Display_7Segment/CA56-12SURKWA\",\"Display_7Segment/CA56-12SYKWA\",\"Display_7Segment/CC56-12GWA\",\"Display_7Segment/CC56-12YWA\",\"Display_7Segment/D1X8K\",\"Display_7Segment/DA04-11CGKWA\",\"Display_7Segment/DA04-11SEKWA\",\"Display_7Segment/DA04-11SURKWA\",\"Display_7Segment/DA04-11SYKWA\",\"Display_7Segment/DA56-11CGKWA\",\"Display_7Segment/DA56-11SEKWA\",\"Display_7Segment/DA56-11SURKWA\",\"Display_7Segment/DA56-11SYKWA\",\"Display_7Segment/DE113-XX-XX\",\"Display_7Segment/DE114-RS-20\",\"Display_7Segment/DE119-XX-XX\",\"Display_7Segment/DE122-XX-XX\",\"Display_7Segment/DE152-XX-XX\",\"Display_7Segment/DE170-XX-XX\",\"Display_7Segment/ELD_426XXXX\",\"Display_7Segment/HDSP-7401\",\"Display_7Segment/HDSP-7507\",\"Display_7Segment/HDSP-7801\",\"Display_7Segment/HDSP-7807\",\"Display_7Segment/HDSP-A151\",\"Display_7Segment/HDSP-A401\",\"Display_7Segment/KCSC02-105\",\"Display_7Segment/KCSC02-106\",\"Display_7Segment/KCSC02-107\",\"Display_7Segment/KCSC02-123\",\"Display_7Segment/KCSC02-136\",\"Display_7Segment/LTC-4627Jx\",\"Display_7Segment/MAN3410A\",\"Display_7Segment/MAN3420A\",\"Display_7Segment/MAN3610A\",\"Display_7Segment/MAN3620A\",\"Display_7Segment/MAN3630A\",\"Display_7Segment/MAN3810A\",\"Display_7Segment/MAN3820A\",\"Display_7Segment/MAN71A\",\"Display_7Segment/MAN72A\",\"Display_7Segment/MAN73A\",\"Display_7Segment/SA15-11xxx\",\"Display_7Segment/SBC18-11SURKCGKWA\",\"Display_7Segment/Sx39-1xxxxx\",\"Ferrite_THT/LairdTech_28C0236-0JW-10\",\"Fiducial/Fiducial_0.5mm_Mask1.5mm\",\"Fiducial/Fiducial_0.5mm_Mask1mm\",\"Fiducial/Fiducial_0.5mm_Mask2mm\",\"Fiducial/Fiducial_0.75mm_Mask1.5mm\",\"Fiducial/Fiducial_0.75mm_Mask2.25mm\",\"Fiducial/Fiducial_1.5mm_Mask3mm\",\"Fiducial/Fiducial_1.5mm_Mask4.5mm\",\"Fiducial/Fiducial_1mm_Mask2mm\",\"Fiducial/Fiducial_1mm_Mask3mm\",\"Fiducial/Fiducial_Cross_1.5mm_Mask2mm\",\"Filter/Filter_1109-5_1.1x0.9mm\",\"Filter/Filter_1411-5_1.4x1.1mm\",\"Filter/Filter_Bourns_SRF0905_6.0x9.2mm\",\"Filter/Filter_FILTERCON_1FPxx\",\"Filter/Filter_KEMET_PZB300_24.0x12.5mm_P10.0mm\",\"Filter/Filter_Mini-Circuits_FV1206-1\",\"Filter/Filter_Mini-Circuits_FV1206-4\",\"Filter/Filter_Mini-Circuits_FV1206-5\",\"Filter/Filter_Mini-Circuits_FV1206-6\",\"Filter/Filter_Mini-Circuits_FV1206-7\",\"Filter/Filter_Mini-Circuits_FV1206\",\"Filter/Filter_Murata_BNX025\",\"Filter/Filter_Murata_BNX025_ThermalVias\",\"Filter/Filter_Murata_SFECF-6\",\"Filter/Filter_Murata_SFECF-6_HandSoldering\",\"Filter/Filter_SAW-6_3.8x3.8mm\",\"Filter/Filter_SAW-8_3.8x3.8mm\",\"Filter/Filter_SAW_Epcos_DCC6C_3x3mm\",\"Filter/Filter_Schaffner_FN405\",\"Filter/Filter_Schaffner_FN406\",\"Fuse/FuseHolder_Blade_ATO_Littelfuse_FLR_178.6165\",\"Fuse/Fuse_0402_1005Metric\",\"Fuse/Fuse_0402_1005Metric_Pad0.77x0.64mm_HandSolder\",\"Fuse/Fuse_0603_1608Metric\",\"Fuse/Fuse_0603_1608Metric_Pad1.05x0.95mm_HandSolder\",\"Fuse/Fuse_0805_2012Metric\",\"Fuse/Fuse_0805_2012Metric_Pad1.15x1.40mm_HandSolder\",\"Fuse/Fuse_1206_3216Metric\",\"Fuse/Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder\",\"Fuse/Fuse_1210_3225Metric\",\"Fuse/Fuse_1210_3225Metric_Pad1.42x2.65mm_HandSolder\",\"Fuse/Fuse_1812_4532Metric\",\"Fuse/Fuse_1812_4532Metric_Pad1.30x3.40mm_HandSolder\",\"Fuse/Fuse_2010_5025Metric\",\"Fuse/Fuse_2010_5025Metric_Pad1.52x2.65mm_HandSolder\",\"Fuse/Fuse_2512_6332Metric\",\"Fuse/Fuse_2512_6332Metric_Pad1.52x3.35mm_HandSolder\",\"Fuse/Fuse_2920_7451Metric\",\"Fuse/Fuse_2920_7451Metric_Pad2.10x5.45mm_HandSolder\",\"Fuse/Fuse_BelFuse_0ZRE0005FF_L8.3mm_W3.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0008FF_L8.3mm_W3.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0012FF_L8.3mm_W3.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0016FF_L9.9mm_W3.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0025FF_L9.6mm_W3.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0033FF_L11.4mm_W3.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0040FF_L11.5mm_W3.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0055FF_L14.0mm_W4.1mm\",\"Fuse/Fuse_BelFuse_0ZRE0075FF_L11.5mm_W4.8mm\",\"Fuse/Fuse_BelFuse_0ZRE0100FF_L18.7mm_W5.1mm\",\"Fuse/Fuse_BelFuse_0ZRE0125FF_L21.2mm_W5.3mm\",\"Fuse/Fuse_BelFuse_0ZRE0150FF_L23.4mm_W5.3mm\",\"Fuse/Fuse_BelFuse_0ZRE0200FF_L24.9mm_W6.1mm\",\"Fuse/Fuse_Blade_ATO_directSolder\",\"Fuse/Fuse_Blade_Mini_directSolder\",\"Fuse/Fuse_Bourns_MF-RG1000\",\"Fuse/Fuse_Bourns_MF-RG1100\",\"Fuse/Fuse_Bourns_MF-RG300\",\"Fuse/Fuse_Bourns_MF-RG400\",\"Fuse/Fuse_Bourns_MF-RG500\",\"Fuse/Fuse_Bourns_MF-RG600\",\"Fuse/Fuse_Bourns_MF-RG650\",\"Fuse/Fuse_Bourns_MF-RG700\",\"Fuse/Fuse_Bourns_MF-RG800\",\"Fuse/Fuse_Bourns_MF-RG900\",\"Fuse/Fuse_Bourns_MF-RHT050\",\"Fuse/Fuse_Bourns_MF-RHT070\",\"Fuse/Fuse_Bourns_MF-RHT100\",\"Fuse/Fuse_Bourns_MF-RHT1000\",\"Fuse/Fuse_Bourns_MF-RHT1100\",\"Fuse/Fuse_Bourns_MF-RHT1300\",\"Fuse/Fuse_Bourns_MF-RHT200\",\"Fuse/Fuse_Bourns_MF-RHT300\",\"Fuse/Fuse_Bourns_MF-RHT400\",\"Fuse/Fuse_Bourns_MF-RHT500\",\"Fuse/Fuse_Bourns_MF-RHT550\",\"Fuse/Fuse_Bourns_MF-RHT600\",\"Fuse/Fuse_Bourns_MF-RHT650\",\"Fuse/Fuse_Bourns_MF-RHT700\",\"Fuse/Fuse_Bourns_MF-RHT750\",\"Fuse/Fuse_Bourns_MF-RHT800\",\"Fuse/Fuse_Bourns_MF-RHT900\",\"Fuse/Fuse_Bourns_MF-SM_7.98x5.44mm\",\"Fuse/Fuse_Bourns_MF-SM_9.5x6.71mm\",\"Fuse/Fuse_Bourns_TBU-CA\",\"Fuse/Fuse_Littelfuse-LVR100\",\"Fuse/Fuse_Littelfuse-LVR125\",\"Fuse/Fuse_Littelfuse-LVR200\",\"Fuse/Fuse_Littelfuse-NANO2-451_453\",\"Fuse/Fuse_Littelfuse-NANO2-462\",\"Fuse/Fuse_Littelfuse-NANO2-885\",\"Fuse/Fuse_Littelfuse_372_D8.50mm\",\"Fuse/Fuse_Littelfuse_395Series\",\"Fuse/Fuse_Schurter_UMT250\",\"Fuse/Fuse_Schurter_UMZ250\",\"Fuse/Fuse_SunFuse-6HP\",\"Fuse/Fuseholder_Blade_ATO_Littelfuse_Pudenz_2_Pin\",\"Fuse/Fuseholder_Blade_Mini_Keystone_3568\",\"Fuse/Fuseholder_Clip-5x20mm_Bel_FC-203-22_Lateral_P17.80x5.00mm_D1.17mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Eaton_1A5601-01_Inline_P20.80x6.76mm_D1.70mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Keystone_3512P_Inline_P23.62x7.27mm_D1.02x2.41x1.02x1.57mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Keystone_3512_Inline_P23.62x7.27mm_D1.02x1.57mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Keystone_3517_Inline_P23.11x6.76mm_D1.70mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Keystone_3518P_Inline_P23.11x6.76mm_D2.44x1.70mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Littelfuse_100_Inline_P20.50x4.60mm_D1.30mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Littelfuse_111_Inline_P20.00x5.00mm_D1.05mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Littelfuse_111_Lateral_P18.80x5.00mm_D1.17mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Littelfuse_445-030_Inline_P20.50x5.20mm_D1.30mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Littelfuse_519_Inline_P20.60x5.00mm_D1.00mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Littelfuse_520_Inline_P20.50x5.80mm_D1.30mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Littelfuse_521_Lateral_P17.00x5.00mm_D1.30mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Schurter_CQM_Inline_P20.60x5.00mm_D1.00mm_Horizontal\",\"Fuse/Fuseholder_Clip-5x20mm_Schurter_OG_Lateral_P15.00x5.00mm_D1.3mm_Horizontal\",\"Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_102071_Inline_P34.70x7.60mm_D2.00mm_Horizontal\",\"Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_102_122_Inline_P34.21x7.62mm_D1.98mm_Horizontal\",\"Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_102_Inline_P34.21x7.62mm_D2.54mm_Horizontal\",\"Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_122_Inline_P34.21x7.62mm_D2.54mm_Horizontal\",\"Fuse/Fuseholder_Cylinder-5x20mm_Bulgin_FX0456_Vertical_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_Bulgin_FX0457_Horizontal_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_EATON_H15-V-1_Vertical_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_EATON_HBV_Vertical_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_EATON_HBW_Vertical_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_Schurter_0031_8201_Horizontal_Open\",\"Fuse/Fuseholder_Cylinder-5x20mm_Schurter_FAB_0031-355x_Horizontal_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_Schurter_FPG4_Vertical_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_Schurter_FUP_0031.2510_Horizontal_Closed\",\"Fuse/Fuseholder_Cylinder-5x20mm_Schurter_OGN-SMD_Horizontal_Open\",\"Fuse/Fuseholder_Cylinder-5x20mm_Stelvio-Kontek_PTF78_Horizontal_Open\",\"Fuse/Fuseholder_Cylinder-5x20mm_Wuerth_696103101002-SMD_Horizontal_Open\",\"Fuse/Fuseholder_Cylinder-6.3x32mm_Schurter_0031-8002_Horizontal_Open\",\"Fuse/Fuseholder_Cylinder-6.3x32mm_Schurter_FUP_0031.2520_Horizontal_Closed\",\"Fuse/Fuseholder_Keystone_3555-2\",\"Fuse/Fuseholder_Littelfuse_100_series_5x20mm\",\"Fuse/Fuseholder_Littelfuse_100_series_5x25mm\",\"Fuse/Fuseholder_Littelfuse_100_series_5x30mm\",\"Fuse/Fuseholder_Littelfuse_445_030_series_5x20mm\",\"Fuse/Fuseholder_Littelfuse_445_030_series_5x25mm\",\"Fuse/Fuseholder_Littelfuse_445_030_series_5x30mm\",\"Fuse/Fuseholder_Littelfuse_Nano2_154x\",\"Fuse/Fuseholder_Littelfuse_Nano2_157x\",\"Fuse/Fuseholder_TR5_Littelfuse_No560_No460\",\"Fuse/GDT_Bourns_2038\",\"Fuse/GDT_Yageo_3RxxxxL-6\",\"Fuse/GDT_Yageo_3RxxxxM-6\",\"Heatsink/Heatsink_125x35x50mm_3xFixationM3\",\"Heatsink/Heatsink_35x26mm_1xFixation3mm_Fischer-SK486-35\",\"Heatsink/Heatsink_38x38mm_SpringFixation\",\"Heatsink/Heatsink_62x40mm_2xFixation3mm\",\"Heatsink/Heatsink_AAVID_573300D00010G_TO-263\",\"Heatsink/Heatsink_AAVID_576802B03900G\",\"Heatsink/Heatsink_AAVID_590302B03600G\",\"Heatsink/Heatsink_AAVID_Extruded_531002B00000G_34.9x12.7mm_H25.4mm\",\"Heatsink/Heatsink_AAVID_Extruded_531002B02100G_34.9x12.7mm_H25.4mm\",\"Heatsink/Heatsink_AAVID_Extruded_531002B02500G_34.9x12.7mm_H25.4mm\",\"Heatsink/Heatsink_AAVID_Extruded_531102B00000G_34.9x12.7mm_H38.1mm\",\"Heatsink/Heatsink_AAVID_Extruded_531102B02100G_34.9x12.7mm_H38.1mm\",\"Heatsink/Heatsink_AAVID_Extruded_531102B02500G_34.9x12.7mm_H38.1mm\",\"Heatsink/Heatsink_AAVID_Extruded_531102V02500G_34.9x12.7mm_H38.1mm\",\"Heatsink/Heatsink_AAVID_Extruded_531202B00000G_34.9x12.7mm_H50.8mm\",\"Heatsink/Heatsink_AAVID_Extruded_531202B02100G_34.9x12.7mm_H50.8mm\",\"Heatsink/Heatsink_AAVID_Extruded_531202B02500G_34.9x12.7mm_H50.8mm\",\"Heatsink/Heatsink_AAVID_Extruded_531302B02500G_34.9x12.7mm_H63.5mm\",\"Heatsink/Heatsink_AAVID_TV5G_TO220_Horizontal\",\"Heatsink/Heatsink_Fischer_FK224xx2201_25x8.3mm\",\"Heatsink/Heatsink_Fischer_FK24413D2PAK_26x13mm\",\"Heatsink/Heatsink_Fischer_FK24413DPAK_23x13mm\",\"Heatsink/Heatsink_Fischer_SK104-STC-STIC_35x13mm_2xDrill2.5mm\",\"Heatsink/Heatsink_Fischer_SK104-STCB_35x13mm__2xDrill3.5mm_ScrewM3\",\"Heatsink/Heatsink_Fischer_SK129-STS_42x25mm_2xDrill2.5mm\",\"Heatsink/Heatsink_SheetType_50x7mm_2Fixations\",\"Heatsink/Heatsink_Stonecold_HS-130_30x12mm_2xFixation2.5mm\",\"Heatsink/Heatsink_Stonecold_HS-132_32x14mm_2xFixation1.5mm\",\"Heatsink/Heatsink_Stonecold_HS-S01_13.21x6.35mm\",\"Heatsink/Heatsink_Stonecold_HS-S02_13.21x9.53mm\",\"Heatsink/Heatsink_Stonecold_HS-S03_13.21x12.7mm\",\"Inductor_SMD/L_01005_0402Metric\",\"Inductor_SMD/L_01005_0402Metric_Pad0.57x0.30mm_HandSolder\",\"Inductor_SMD/L_0201_0603Metric\",\"Inductor_SMD/L_0201_0603Metric_Pad0.64x0.40mm_HandSolder\",\"Inductor_SMD/L_0402_1005Metric\",\"Inductor_SMD/L_0402_1005Metric_Pad0.77x0.64mm_HandSolder\",\"Inductor_SMD/L_0603_1608Metric\",\"Inductor_SMD/L_0603_1608Metric_Pad1.05x0.95mm_HandSolder\",\"Inductor_SMD/L_0805_2012Metric\",\"Inductor_SMD/L_0805_2012Metric_Pad1.05x1.20mm_HandSolder\",\"Inductor_SMD/L_10.4x10.4_H4.8\",\"Inductor_SMD/L_1008_2520Metric\",\"Inductor_SMD/L_1008_2520Metric_Pad1.43x2.20mm_HandSolder\",\"Inductor_SMD/L_1206_3216Metric\",\"Inductor_SMD/L_1206_3216Metric_Pad1.22x1.90mm_HandSolder\",\"Inductor_SMD/L_1210_3225Metric\",\"Inductor_SMD/L_1210_3225Metric_Pad1.42x2.65mm_HandSolder\",\"Inductor_SMD/L_12x12mm_H4.5mm\",\"Inductor_SMD/L_12x12mm_H6mm\",\"Inductor_SMD/L_12x12mm_H8mm\",\"Inductor_SMD/L_1806_4516Metric\",\"Inductor_SMD/L_1806_4516Metric_Pad1.45x1.90mm_HandSolder\",\"Inductor_SMD/L_1812_4532Metric\",\"Inductor_SMD/L_1812_4532Metric_Pad1.30x3.40mm_HandSolder\",\"Inductor_SMD/L_2010_5025Metric\",\"Inductor_SMD/L_2010_5025Metric_Pad1.52x2.65mm_HandSolder\",\"Inductor_SMD/L_2512_6332Metric\",\"Inductor_SMD/L_2512_6332Metric_Pad1.52x3.35mm_HandSolder\",\"Inductor_SMD/L_6.3x6.3_H3\",\"Inductor_SMD/L_7.3x7.3_H3.5\",\"Inductor_SMD/L_7.3x7.3_H4.5\",\"Inductor_SMD/L_APV_ANR252010\",\"Inductor_SMD/L_APV_ANR252012\",\"Inductor_SMD/L_APV_ANR3010\",\"Inductor_SMD/L_APV_ANR3012\",\"Inductor_SMD/L_APV_ANR3015\",\"Inductor_SMD/L_APV_ANR4010\",\"Inductor_SMD/L_APV_ANR4012\",\"Inductor_SMD/L_APV_ANR4018\",\"Inductor_SMD/L_APV_ANR4020\",\"Inductor_SMD/L_APV_ANR4026\",\"Inductor_SMD/L_APV_ANR4030\",\"Inductor_SMD/L_APV_ANR5012\",\"Inductor_SMD/L_APV_ANR5020\",\"Inductor_SMD/L_APV_ANR5040\",\"Inductor_SMD/L_APV_ANR5045\",\"Inductor_SMD/L_APV_ANR6020\",\"Inductor_SMD/L_APV_ANR6028\",\"Inductor_SMD/L_APV_ANR6045\",\"Inductor_SMD/L_APV_ANR8040\",\"Inductor_SMD/L_APV_ANR8065\",\"Inductor_SMD/L_APV_APH0412\",\"Inductor_SMD/L_APV_APH0420\",\"Inductor_SMD/L_APV_APH0518\",\"Inductor_SMD/L_APV_APH0530\",\"Inductor_SMD/L_APV_APH0615\",\"Inductor_SMD/L_APV_APH0618\",\"Inductor_SMD/L_APV_APH0620\",\"Inductor_SMD/L_APV_APH0624\",\"Inductor_SMD/L_APV_APH0630\",\"Inductor_SMD/L_APV_APH0640\",\"Inductor_SMD/L_APV_APH0650\",\"Inductor_SMD/L_APV_APH0840\",\"Inductor_SMD/L_APV_APH0850\",\"Inductor_SMD/L_APV_APH1030\",\"Inductor_SMD/L_APV_APH1040\",\"Inductor_SMD/L_APV_APH1050\",\"Inductor_SMD/L_APV_APH1240\",\"Inductor_SMD/L_APV_APH1250\",\"Inductor_SMD/L_APV_APH1260\",\"Inductor_SMD/L_APV_APH1265\",\"Inductor_SMD/L_APV_APH1770\",\"Inductor_SMD/L_APV_APH2213\",\"Inductor_SMD/L_AVX_LMLP07A7\",\"Inductor_SMD/L_Abracon_ASPI-0425\",\"Inductor_SMD/L_Abracon_ASPI-0630LR\",\"Inductor_SMD/L_Abracon_ASPI-3012S\",\"Inductor_SMD/L_Abracon_ASPI-4030S\",\"Inductor_SMD/L_Abracon_ASPIAIG-F4020\",\"Inductor_SMD/L_Bourns-SRN1060\",\"Inductor_SMD/L_Bourns-SRN4018\",\"Inductor_SMD/L_Bourns-SRN6028\",\"Inductor_SMD/L_Bourns-SRN8040_8x8.15mm\",\"Inductor_SMD/L_Bourns-SRR1005\",\"Inductor_SMD/L_Bourns-SRU1028_10.0x10.0mm\",\"Inductor_SMD/L_Bourns-SRU8028_8.0x8.0mm\",\"Inductor_SMD/L_Bourns-SRU8043\",\"Inductor_SMD/L_Bourns_SDR0604\",\"Inductor_SMD/L_Bourns_SDR1806\",\"Inductor_SMD/L_Bourns_SRF1260\",\"Inductor_SMD/L_Bourns_SRN6045TA\",\"Inductor_SMD/L_Bourns_SRN8040TA\",\"Inductor_SMD/L_Bourns_SRP1038C_10.0x10.0mm\",\"Inductor_SMD/L_Bourns_SRP1050WA\",\"Inductor_SMD/L_Bourns_SRP1245A\",\"Inductor_SMD/L_Bourns_SRP1770TA_16.9x16.9mm\",\"Inductor_SMD/L_Bourns_SRP2313AA\",\"Inductor_SMD/L_Bourns_SRP5030T\",\"Inductor_SMD/L_Bourns_SRP6060FA\",\"Inductor_SMD/L_Bourns_SRP7028A_7.3x6.6mm\",\"Inductor_SMD/L_Bourns_SRR1208_12.7x12.7mm\",\"Inductor_SMD/L_Bourns_SRR1210A\",\"Inductor_SMD/L_Bourns_SRR1260\",\"Inductor_SMD/L_Bourns_SRU5016_5.2x5.2mm\",\"Inductor_SMD/L_Cenker_CKCS201610\",\"Inductor_SMD/L_Cenker_CKCS252010\",\"Inductor_SMD/L_Cenker_CKCS252012\",\"Inductor_SMD/L_Cenker_CKCS3012\",\"Inductor_SMD/L_Cenker_CKCS3015\",\"Inductor_SMD/L_Cenker_CKCS4018\",\"Inductor_SMD/L_Cenker_CKCS4020\",\"Inductor_SMD/L_Cenker_CKCS4030\",\"Inductor_SMD/L_Cenker_CKCS5020\",\"Inductor_SMD/L_Cenker_CKCS5040\",\"Inductor_SMD/L_Cenker_CKCS6020\",\"Inductor_SMD/L_Cenker_CKCS6028\",\"Inductor_SMD/L_Cenker_CKCS6045\",\"Inductor_SMD/L_Cenker_CKCS8040\",\"Inductor_SMD/L_Cenker_CKCS8060\",\"Inductor_SMD/L_Cenker_CKCS8080\",\"Inductor_SMD/L_Changjiang_FNR252010S\",\"Inductor_SMD/L_Changjiang_FNR252012S\",\"Inductor_SMD/L_Changjiang_FNR3010S\",\"Inductor_SMD/L_Changjiang_FNR3012S\",\"Inductor_SMD/L_Changjiang_FNR3015S\",\"Inductor_SMD/L_Changjiang_FNR3021S\",\"Inductor_SMD/L_Changjiang_FNR4010S\",\"Inductor_SMD/L_Changjiang_FNR4012S\",\"Inductor_SMD/L_Changjiang_FNR4015S\",\"Inductor_SMD/L_Changjiang_FNR4018S\",\"Inductor_SMD/L_Changjiang_FNR4020S\",\"Inductor_SMD/L_Changjiang_FNR4026S\",\"Inductor_SMD/L_Changjiang_FNR4030S\",\"Inductor_SMD/L_Changjiang_FNR5012S\",\"Inductor_SMD/L_Changjiang_FNR5015S\",\"Inductor_SMD/L_Changjiang_FNR5020S\",\"Inductor_SMD/L_Changjiang_FNR5030S\",\"Inductor_SMD/L_Changjiang_FNR5040S\",\"Inductor_SMD/L_Changjiang_FNR5045S\",\"Inductor_SMD/L_Changjiang_FNR6020S\",\"Inductor_SMD/L_Changjiang_FNR6028S\",\"Inductor_SMD/L_Changjiang_FNR6040S\",\"Inductor_SMD/L_Changjiang_FNR6045S\",\"Inductor_SMD/L_Changjiang_FNR8040S\",\"Inductor_SMD/L_Changjiang_FNR8050S\",\"Inductor_SMD/L_Changjiang_FNR8065S\",\"Inductor_SMD/L_Changjiang_FTC100765D\",\"Inductor_SMD/L_Changjiang_FTC121065S\",\"Inductor_SMD/L_Changjiang_FTC141207S\",\"Inductor_SMD/L_Changjiang_FTC141208S\",\"Inductor_SMD/L_Changjiang_FTC141265S\",\"Inductor_SMD/L_Changjiang_FTC160808S\",\"Inductor_SMD/L_Changjiang_FTC160865S\",\"Inductor_SMD/L_Changjiang_FTC201208S\",\"Inductor_SMD/L_Changjiang_FTC201210S\",\"Inductor_SMD/L_Changjiang_FTC201212S\",\"Inductor_SMD/L_Changjiang_FTC201265S\",\"Inductor_SMD/L_Changjiang_FTC201607S\",\"Inductor_SMD/L_Changjiang_FTC201608S\",\"Inductor_SMD/L_Changjiang_FTC201610D\",\"Inductor_SMD/L_Changjiang_FTC201610S\",\"Inductor_SMD/L_Changjiang_FTC201612S\",\"Inductor_SMD/L_Changjiang_FTC201655S\",\"Inductor_SMD/L_Changjiang_FTC201665S\",\"Inductor_SMD/L_Changjiang_FTC252008S\",\"Inductor_SMD/L_Changjiang_FTC252010S\",\"Inductor_SMD/L_Changjiang_FTC252012S\",\"Inductor_SMD/L_Changjiang_FTC252075S\",\"Inductor_SMD/L_Changjiang_FTC303010D\",\"Inductor_SMD/L_Changjiang_FTC303012D\",\"Inductor_SMD/L_Changjiang_FTC303015D\",\"Inductor_SMD/L_Changjiang_FTC303018D\",\"Inductor_SMD/L_Changjiang_FTC303020D\",\"Inductor_SMD/L_Changjiang_FTC322510S\",\"Inductor_SMD/L_Changjiang_FTC322512S\",\"Inductor_SMD/L_Changjiang_FTC322520S\",\"Inductor_SMD/L_Changjiang_FTC404010S\",\"Inductor_SMD/L_Changjiang_FTC404012S\",\"Inductor_SMD/L_Changjiang_FTC404020S\",\"Inductor_SMD/L_Changjiang_FTC404030S\",\"Inductor_SMD/L_Changjiang_FXL0412\",\"Inductor_SMD/L_Changjiang_FXL0420\",\"Inductor_SMD/L_Changjiang_FXL0518\",\"Inductor_SMD/L_Changjiang_FXL0530\",\"Inductor_SMD/L_Changjiang_FXL0615\",\"Inductor_SMD/L_Changjiang_FXL0618\",\"Inductor_SMD/L_Changjiang_FXL0624\",\"Inductor_SMD/L_Changjiang_FXL0630\",\"Inductor_SMD/L_Changjiang_FXL0640\",\"Inductor_SMD/L_Changjiang_FXL0650\",\"Inductor_SMD/L_Changjiang_FXL0840\",\"Inductor_SMD/L_Changjiang_FXL1030\",\"Inductor_SMD/L_Changjiang_FXL1040\",\"Inductor_SMD/L_Changjiang_FXL1050\",\"Inductor_SMD/L_Changjiang_FXL1340\",\"Inductor_SMD/L_Changjiang_FXL1350\",\"Inductor_SMD/L_Changjiang_FXL1360\",\"Inductor_SMD/L_Changjiang_FXL1365\",\"Inductor_SMD/L_Changjiang_FXL1770\",\"Inductor_SMD/L_Changjiang_FXL2213\",\"Inductor_SMD/L_Chilisin_BMRA00040415\",\"Inductor_SMD/L_Chilisin_BMRA00040420\",\"Inductor_SMD/L_Chilisin_BMRA00050520\",\"Inductor_SMD/L_Chilisin_BMRA00050530\",\"Inductor_SMD/L_Chilisin_BMRB00050512\",\"Inductor_SMD/L_Chilisin_BMRB00050518-B\",\"Inductor_SMD/L_Chilisin_BMRB00050518\",\"Inductor_SMD/L_Chilisin_BMRB00060612\",\"Inductor_SMD/L_Chilisin_BMRB00060618\",\"Inductor_SMD/L_Chilisin_BMRB00060624\",\"Inductor_SMD/L_Chilisin_BMRB00060650\",\"Inductor_SMD/L_Chilisin_BMRF00101040\",\"Inductor_SMD/L_Chilisin_BMRF00131350\",\"Inductor_SMD/L_Chilisin_BMRF00131360\",\"Inductor_SMD/L_Chilisin_BMRF00171770\",\"Inductor_SMD/L_Chilisin_BMRG00101030\",\"Inductor_SMD/L_Chilisin_BMRG00131360\",\"Inductor_SMD/L_Chilisin_BMRx00040412\",\"Inductor_SMD/L_Chilisin_BMRx00050512-B\",\"Inductor_SMD/L_Chilisin_BMRx00050515\",\"Inductor_SMD/L_Chilisin_BMRx00060615\",\"Inductor_SMD/L_Chilisin_BMRx00060630\",\"Inductor_SMD/L_Chilisin_BWVS00322515\",\"Inductor_SMD/L_Chilisin_BWVS00404012\",\"Inductor_SMD/L_Chilisin_BWVS00404018\",\"Inductor_SMD/L_Chilisin_BWVS00404026\",\"Inductor_SMD/L_Chilisin_BWVS00505020\",\"Inductor_SMD/L_Chilisin_BWVS00505030\",\"Inductor_SMD/L_Chilisin_BWVS00505040\",\"Inductor_SMD/L_Chilisin_BWVS00606020\",\"Inductor_SMD/L_Chilisin_BWVS00606028\",\"Inductor_SMD/L_Chilisin_BWVS00606045\",\"Inductor_SMD/L_Chilisin_BWVS00808040\",\"Inductor_SMD/L_Coilcraft_0403HQ_1008Metric\",\"Inductor_SMD/L_Coilcraft_0604HQ_1610Metric\",\"Inductor_SMD/L_Coilcraft_0805HQ_2012Metric\",\"Inductor_SMD/L_Coilcraft_1008HQ_2520Metric\",\"Inductor_SMD/L_Coilcraft_1008HQ_2520Metric_LowProfile\",\"Inductor_SMD/L_Coilcraft_1515SQ-47N\",\"Inductor_SMD/L_Coilcraft_1515SQ-68N\",\"Inductor_SMD/L_Coilcraft_1515SQ-82N\",\"Inductor_SMD/L_Coilcraft_2222SQ-111\",\"Inductor_SMD/L_Coilcraft_2222SQ-131\",\"Inductor_SMD/L_Coilcraft_2222SQ-161\",\"Inductor_SMD/L_Coilcraft_2222SQ-181\",\"Inductor_SMD/L_Coilcraft_2222SQ-221\",\"Inductor_SMD/L_Coilcraft_2222SQ-271\",\"Inductor_SMD/L_Coilcraft_2222SQ-301\",\"Inductor_SMD/L_Coilcraft_2222SQ-90N\",\"Inductor_SMD/L_Coilcraft_2929SQ-331\",\"Inductor_SMD/L_Coilcraft_2929SQ-361\",\"Inductor_SMD/L_Coilcraft_2929SQ-391\",\"Inductor_SMD/L_Coilcraft_2929SQ-431\",\"Inductor_SMD/L_Coilcraft_2929SQ-501\",\"Inductor_SMD/L_Coilcraft_LPS3010\",\"Inductor_SMD/L_Coilcraft_LPS3314\",\"Inductor_SMD/L_Coilcraft_LPS4018\",\"Inductor_SMD/L_Coilcraft_LPS4414\",\"Inductor_SMD/L_Coilcraft_LPS5030\",\"Inductor_SMD/L_Coilcraft_MOS6020-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1038-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1038T-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1048-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1048T-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1210-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1210H-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1246-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1246H-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1246T-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1260-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1260H-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1260T-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1278-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1278H-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1278T-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1514V-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1583-XXX\",\"Inductor_SMD/L_Coilcraft_MSS1812T-XXX\",\"Inductor_SMD/L_Coilcraft_MSS7348-XXX\",\"Inductor_SMD/L_Coilcraft_XAL1010-XXX\",\"Inductor_SMD/L_Coilcraft_XAL1030-XXX\",\"Inductor_SMD/L_Coilcraft_XAL1060-XXX\",\"Inductor_SMD/L_Coilcraft_XAL1350-XXX\",\"Inductor_SMD/L_Coilcraft_XAL1510-103\",\"Inductor_SMD/L_Coilcraft_XAL1510-153\",\"Inductor_SMD/L_Coilcraft_XAL1510-223\",\"Inductor_SMD/L_Coilcraft_XAL1510-333\",\"Inductor_SMD/L_Coilcraft_XAL1510-472\",\"Inductor_SMD/L_Coilcraft_XAL1510-682\",\"Inductor_SMD/L_Coilcraft_XAL1510-822\",\"Inductor_SMD/L_Coilcraft_XAL1513-153\",\"Inductor_SMD/L_Coilcraft_XAL1580-102\",\"Inductor_SMD/L_Coilcraft_XAL1580-132\",\"Inductor_SMD/L_Coilcraft_XAL1580-182\",\"Inductor_SMD/L_Coilcraft_XAL1580-202\",\"Inductor_SMD/L_Coilcraft_XAL1580-302\",\"Inductor_SMD/L_Coilcraft_XAL1580-401\",\"Inductor_SMD/L_Coilcraft_XAL1580-452\",\"Inductor_SMD/L_Coilcraft_XAL1580-532\",\"Inductor_SMD/L_Coilcraft_XAL1580-612\",\"Inductor_SMD/L_Coilcraft_XAL1580-741\",\"Inductor_SMD/L_Coilcraft_XAL4020-XXX\",\"Inductor_SMD/L_Coilcraft_XAL4030-XXX\",\"Inductor_SMD/L_Coilcraft_XAL4040-XXX\",\"Inductor_SMD/L_Coilcraft_XAL5020-XXX\",\"Inductor_SMD/L_Coilcraft_XAL5030-XXX\",\"Inductor_SMD/L_Coilcraft_XAL5050-XXX\",\"Inductor_SMD/L_Coilcraft_XAL6020-XXX\",\"Inductor_SMD/L_Coilcraft_XAL6030-XXX\",\"Inductor_SMD/L_Coilcraft_XAL6060-XXX\",\"Inductor_SMD/L_Coilcraft_XAL7020-102\",\"Inductor_SMD/L_Coilcraft_XAL7020-122\",\"Inductor_SMD/L_Coilcraft_XAL7020-151\",\"Inductor_SMD/L_Coilcraft_XAL7020-152\",\"Inductor_SMD/L_Coilcraft_XAL7020-222\",\"Inductor_SMD/L_Coilcraft_XAL7020-271\",\"Inductor_SMD/L_Coilcraft_XAL7020-331\",\"Inductor_SMD/L_Coilcraft_XAL7020-471\",\"Inductor_SMD/L_Coilcraft_XAL7020-681\",\"Inductor_SMD/L_Coilcraft_XAL7030-102\",\"Inductor_SMD/L_Coilcraft_XAL7030-103\",\"Inductor_SMD/L_Coilcraft_XAL7030-152\",\"Inductor_SMD/L_Coilcraft_XAL7030-161\",\"Inductor_SMD/L_Coilcraft_XAL7030-222\",\"Inductor_SMD/L_Coilcraft_XAL7030-272\",\"Inductor_SMD/L_Coilcraft_XAL7030-301\",\"Inductor_SMD/L_Coilcraft_XAL7030-332\",\"Inductor_SMD/L_Coilcraft_XAL7030-472\",\"Inductor_SMD/L_Coilcraft_XAL7030-562\",\"Inductor_SMD/L_Coilcraft_XAL7030-601\",\"Inductor_SMD/L_Coilcraft_XAL7030-682\",\"Inductor_SMD/L_Coilcraft_XAL7030-822\",\"Inductor_SMD/L_Coilcraft_XAL7050-XXX\",\"Inductor_SMD/L_Coilcraft_XAL7070-XXX\",\"Inductor_SMD/L_Coilcraft_XAL8050-223\",\"Inductor_SMD/L_Coilcraft_XAL8080-XXX\",\"Inductor_SMD/L_Coilcraft_XFL2010\",\"Inductor_SMD/L_Coilcraft_XxL4020\",\"Inductor_SMD/L_Coilcraft_XxL4030\",\"Inductor_SMD/L_Coilcraft_XxL4040\",\"Inductor_SMD/L_CommonModeChoke_Bourns_SRF1260\",\"Inductor_SMD/L_CommonModeChoke_Coilank_ACM1210\",\"Inductor_SMD/L_CommonModeChoke_Coilank_ACM1608\",\"Inductor_SMD/L_CommonModeChoke_Coilank_ACM2012\",\"Inductor_SMD/L_CommonModeChoke_Coilank_ACM2520\",\"Inductor_SMD/L_CommonModeChoke_Coilank_ACM3216\",\"Inductor_SMD/L_CommonModeChoke_Coilank_ACM3225\",\"Inductor_SMD/L_CommonModeChoke_Coilank_ACM4532\",\"Inductor_SMD/L_CommonModeChoke_Coilcraft_0603USB\",\"Inductor_SMD/L_CommonModeChoke_Coilcraft_0805USB\",\"Inductor_SMD/L_CommonModeChoke_Coilcraft_1812CAN\",\"Inductor_SMD/L_CommonModeChoke_Murata_DLW5BTMxxxSQ2x_5x5mm\",\"Inductor_SMD/L_CommonModeChoke_TDK_ACM2520-2P\",\"Inductor_SMD/L_CommonModeChoke_TDK_ACM2520-3P\",\"Inductor_SMD/L_CommonModeChoke_TDK_ACM7060\",\"Inductor_SMD/L_CommonModeChoke_Wuerth_WE-SL5-HC\",\"Inductor_SMD/L_CommonModeChoke_Wuerth_WE-SL5\",\"Inductor_SMD/L_CommonModeChoke_XR_XRGM0905C\",\"Inductor_SMD/L_CommonMode_Bourns_DR331\",\"Inductor_SMD/L_CommonMode_Delevan_4222\",\"Inductor_SMD/L_CommonMode_Wuerth_WE-SL2\",\"Inductor_SMD/L_CommonMode_Wurth_WE-CNSW-1206\",\"Inductor_SMD/L_Eaton_MCL2012V1\",\"Inductor_SMD/L_Fastron_PISN\",\"Inductor_SMD/L_Fastron_PISN_Handsoldering\",\"Inductor_SMD/L_Fastron_PISR\",\"Inductor_SMD/L_Fastron_PISR_Handsoldering\",\"Inductor_SMD/L_Ferrocore_DLG-0302\",\"Inductor_SMD/L_Ferrocore_DLG-0403\",\"Inductor_SMD/L_Ferrocore_DLG-0504\",\"Inductor_SMD/L_Ferrocore_DLG-0703\",\"Inductor_SMD/L_Ferrocore_DLG-0705\",\"Inductor_SMD/L_Ferrocore_DLG-1004\",\"Inductor_SMD/L_Ferrocore_DLG-1005\",\"Inductor_SMD/L_KOHERelec_MDA5030\",\"Inductor_SMD/L_KOHERelec_MDA7030\",\"Inductor_SMD/L_Murata_DEM3512C\",\"Inductor_SMD/L_Murata_DEM3518C\",\"Inductor_SMD/L_Murata_DFE201610P\",\"Inductor_SMD/L_Murata_LQH2MCNxxxx02_2.0x1.6mm\",\"Inductor_SMD/L_Murata_LQH55DN_5.7x5.0mm\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_1turn_HDM0131A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_2turn_HAM0231A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_2turn_HDM0231A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_3turn_HAM0331A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_3turn_HDM0331A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_4turn_HAM0431A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_4turn_HDM0431A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_5turn_HAM0531A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_5turn_HDM0531A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_6-10turn_HAM0631A-HAM1031A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_6-10turn_HDM0431A-HDM1031A\",\"Inductor_SMD/L_Neosid_Air-Coil_SML_6turn_HAM0631A\",\"Inductor_SMD/L_Neosid_MicroCoil_Ms36-L\",\"Inductor_SMD/L_Neosid_Ms42\",\"Inductor_SMD/L_Neosid_Ms50\",\"Inductor_SMD/L_Neosid_Ms50T\",\"Inductor_SMD/L_Neosid_Ms85\",\"Inductor_SMD/L_Neosid_Ms85T\",\"Inductor_SMD/L_Neosid_Ms95\",\"Inductor_SMD/L_Neosid_Ms95T\",\"Inductor_SMD/L_Neosid_Ms95a\",\"Inductor_SMD/L_Neosid_SM-NE127\",\"Inductor_SMD/L_Neosid_SM-NE127_HandSoldering\",\"Inductor_SMD/L_Neosid_SM-NE150\",\"Inductor_SMD/L_Neosid_SM-NE95H\",\"Inductor_SMD/L_Neosid_SM-PIC0512H\",\"Inductor_SMD/L_Neosid_SM-PIC0602H\",\"Inductor_SMD/L_Neosid_SM-PIC0612H\",\"Inductor_SMD/L_Neosid_SM-PIC1004H\",\"Inductor_SMD/L_Neosid_SMS-ME3010\",\"Inductor_SMD/L_Neosid_SMS-ME3015\",\"Inductor_SMD/L_Neosid_SMs42\",\"Inductor_SMD/L_Neosid_SMs50\",\"Inductor_SMD/L_Neosid_SMs85\",\"Inductor_SMD/L_Neosid_SMs95_SMs95p\",\"Inductor_SMD/L_Panasonic_PCC-M0530M\",\"Inductor_SMD/L_Panasonic_PCC-M0540M\",\"Inductor_SMD/L_Panasonic_PCC-M0630M\",\"Inductor_SMD/L_Panasonic_PCC-M0645M\",\"Inductor_SMD/L_Panasonic_PCC-M0750M\",\"Inductor_SMD/L_Panasonic_PCC-M0754M\",\"Inductor_SMD/L_Panasonic_PCC-M0850M\",\"Inductor_SMD/L_Panasonic_PCC-M0854M\",\"Inductor_SMD/L_Panasonic_PCC-M1040ML\",\"Inductor_SMD/L_Panasonic_PCC-M1050M\",\"Inductor_SMD/L_Panasonic_PCC-M1050ML\",\"Inductor_SMD/L_Panasonic_PCC-M1054M\",\"Inductor_SMD/L_Panasonic_PCC-M1060ML\",\"Inductor_SMD/L_Pulse_P059x\",\"Inductor_SMD/L_Pulse_PA4320\",\"Inductor_SMD/L_Pulse_PA4332\",\"Inductor_SMD/L_Pulse_PA4334\",\"Inductor_SMD/L_Pulse_PA4340\",\"Inductor_SMD/L_Pulse_PA4341\",\"Inductor_SMD/L_Pulse_PA4344\",\"Inductor_SMD/L_Pulse_PA4349\",\"Inductor_SMD/L_Pulse_PA5402\",\"Inductor_SMD/L_SOREDE_SNR.1050_10x10x5mm\",\"Inductor_SMD/L_SXN_SMDRI124\",\"Inductor_SMD/L_SXN_SMDRI125\",\"Inductor_SMD/L_SXN_SMDRI127\",\"Inductor_SMD/L_SXN_SMDRI62\",\"Inductor_SMD/L_SXN_SMDRI64\",\"Inductor_SMD/L_SXN_SMDRI73\",\"Inductor_SMD/L_SXN_SMDRI74\",\"Inductor_SMD/L_SXN_SMMS1770\",\"Inductor_SMD/L_Sagami_CER1242B\",\"Inductor_SMD/L_Sagami_CER1257B\",\"Inductor_SMD/L_Sagami_CER1277B\",\"Inductor_SMD/L_Sagami_CWR1242C\",\"Inductor_SMD/L_Sagami_CWR1257C\",\"Inductor_SMD/L_Sagami_CWR1277C\",\"Inductor_SMD/L_SigTra_SC3316F\",\"Inductor_SMD/L_Sumida_CDMC6D28_7.25x6.5mm\",\"Inductor_SMD/L_Sumida_CR75\",\"Inductor_SMD/L_Sunlord_MWSA0402S\",\"Inductor_SMD/L_Sunlord_MWSA0412S\",\"Inductor_SMD/L_Sunlord_MWSA0503S\",\"Inductor_SMD/L_Sunlord_MWSA0518S\",\"Inductor_SMD/L_Sunlord_MWSA0602S\",\"Inductor_SMD/L_Sunlord_MWSA0603S\",\"Inductor_SMD/L_Sunlord_MWSA0604S\",\"Inductor_SMD/L_Sunlord_MWSA0605S\",\"Inductor_SMD/L_Sunlord_MWSA0615S\",\"Inductor_SMD/L_Sunlord_MWSA0618S\",\"Inductor_SMD/L_Sunlord_MWSA0624S\",\"Inductor_SMD/L_Sunlord_MWSA0804S\",\"Inductor_SMD/L_Sunlord_MWSA1003S\",\"Inductor_SMD/L_Sunlord_MWSA1004S\",\"Inductor_SMD/L_Sunlord_MWSA1005S\",\"Inductor_SMD/L_Sunlord_MWSA1204S-100\",\"Inductor_SMD/L_Sunlord_MWSA1204S-150\",\"Inductor_SMD/L_Sunlord_MWSA1204S-1R0\",\"Inductor_SMD/L_Sunlord_MWSA1204S-1R5\",\"Inductor_SMD/L_Sunlord_MWSA1204S-220\",\"Inductor_SMD/L_Sunlord_MWSA1204S-2R2\",\"Inductor_SMD/L_Sunlord_MWSA1204S-3R3\",\"Inductor_SMD/L_Sunlord_MWSA1204S-4R7\",\"Inductor_SMD/L_Sunlord_MWSA1204S-6R8\",\"Inductor_SMD/L_Sunlord_MWSA1204S-R22\",\"Inductor_SMD/L_Sunlord_MWSA1204S-R47\",\"Inductor_SMD/L_Sunlord_MWSA1204S-R68\",\"Inductor_SMD/L_Sunlord_MWSA1204S-R82\",\"Inductor_SMD/L_Sunlord_MWSA1205S-100\",\"Inductor_SMD/L_Sunlord_MWSA1205S-150\",\"Inductor_SMD/L_Sunlord_MWSA1205S-1R0\",\"Inductor_SMD/L_Sunlord_MWSA1205S-1R5\",\"Inductor_SMD/L_Sunlord_MWSA1205S-220\",\"Inductor_SMD/L_Sunlord_MWSA1205S-2R2\",\"Inductor_SMD/L_Sunlord_MWSA1205S-330\",\"Inductor_SMD/L_Sunlord_MWSA1205S-3R3\",\"Inductor_SMD/L_Sunlord_MWSA1205S-470\",\"Inductor_SMD/L_Sunlord_MWSA1205S-4R7\",\"Inductor_SMD/L_Sunlord_MWSA1205S-6R8\",\"Inductor_SMD/L_Sunlord_MWSA1205S-R22\",\"Inductor_SMD/L_Sunlord_MWSA1205S-R36\",\"Inductor_SMD/L_Sunlord_MWSA1205S-R50\",\"Inductor_SMD/L_Sunlord_MWSA1205S-R68\",\"Inductor_SMD/L_Sunlord_MWSA1205S-R82\",\"Inductor_SMD/L_Sunlord_MWSA1206S-100\",\"Inductor_SMD/L_Sunlord_MWSA1206S-101\",\"Inductor_SMD/L_Sunlord_MWSA1206S-120\",\"Inductor_SMD/L_Sunlord_MWSA1206S-121\",\"Inductor_SMD/L_Sunlord_MWSA1206S-150\",\"Inductor_SMD/L_Sunlord_MWSA1206S-151\",\"Inductor_SMD/L_Sunlord_MWSA1206S-180\",\"Inductor_SMD/L_Sunlord_MWSA1206S-1R5\",\"Inductor_SMD/L_Sunlord_MWSA1206S-220\",\"Inductor_SMD/L_Sunlord_MWSA1206S-270\",\"Inductor_SMD/L_Sunlord_MWSA1206S-2R2\",\"Inductor_SMD/L_Sunlord_MWSA1206S-330\",\"Inductor_SMD/L_Sunlord_MWSA1206S-3R3\",\"Inductor_SMD/L_Sunlord_MWSA1206S-470\",\"Inductor_SMD/L_Sunlord_MWSA1206S-4R7\",\"Inductor_SMD/L_Sunlord_MWSA1206S-5R6\",\"Inductor_SMD/L_Sunlord_MWSA1206S-680\",\"Inductor_SMD/L_Sunlord_MWSA1206S-6R8\",\"Inductor_SMD/L_Sunlord_MWSA1206S-8R2\",\"Inductor_SMD/L_Sunlord_MWSA1206S-R68\",\"Inductor_SMD/L_Sunlord_MWSA1265S\",\"Inductor_SMD/L_Sunlord_MWSA1707S\",\"Inductor_SMD/L_Sunlord_MWSA2213S\",\"Inductor_SMD/L_Sunlord_SWPA252010S\",\"Inductor_SMD/L_Sunlord_SWPA252012S\",\"Inductor_SMD/L_Sunlord_SWPA3010S\",\"Inductor_SMD/L_Sunlord_SWPA3012S\",\"Inductor_SMD/L_Sunlord_SWPA3015S\",\"Inductor_SMD/L_Sunlord_SWPA4010S\",\"Inductor_SMD/L_Sunlord_SWPA4012S\",\"Inductor_SMD/L_Sunlord_SWPA4018S\",\"Inductor_SMD/L_Sunlord_SWPA4020S\",\"Inductor_SMD/L_Sunlord_SWPA4026S\",\"Inductor_SMD/L_Sunlord_SWPA4030S\",\"Inductor_SMD/L_Sunlord_SWPA5012S\",\"Inductor_SMD/L_Sunlord_SWPA5020S\",\"Inductor_SMD/L_Sunlord_SWPA5040S\",\"Inductor_SMD/L_Sunlord_SWPA6020S\",\"Inductor_SMD/L_Sunlord_SWPA6028S\",\"Inductor_SMD/L_Sunlord_SWPA6040S\",\"Inductor_SMD/L_Sunlord_SWPA6045S\",\"Inductor_SMD/L_Sunlord_SWPA8040S\",\"Inductor_SMD/L_Sunlord_SWRB1204S\",\"Inductor_SMD/L_Sunlord_SWRB1205S\",\"Inductor_SMD/L_Sunlord_SWRB1207S\",\"Inductor_SMD/L_TDK_MLZ1608\",\"Inductor_SMD/L_TDK_MLZ2012_h0.85mm\",\"Inductor_SMD/L_TDK_MLZ2012_h1.25mm\",\"Inductor_SMD/L_TDK_NLV25_2.5x2.0mm\",\"Inductor_SMD/L_TDK_NLV32_3.2x2.5mm\",\"Inductor_SMD/L_TDK_SLF10145\",\"Inductor_SMD/L_TDK_SLF10165\",\"Inductor_SMD/L_TDK_SLF12555\",\"Inductor_SMD/L_TDK_SLF12565\",\"Inductor_SMD/L_TDK_SLF12575\",\"Inductor_SMD/L_TDK_SLF6025\",\"Inductor_SMD/L_TDK_SLF6028\",\"Inductor_SMD/L_TDK_SLF6045\",\"Inductor_SMD/L_TDK_SLF7032\",\"Inductor_SMD/L_TDK_SLF7045\",\"Inductor_SMD/L_TDK_SLF7055\",\"Inductor_SMD/L_TDK_VLF10040\",\"Inductor_SMD/L_TDK_VLP8040\",\"Inductor_SMD/L_TDK_VLS6045EX_VLS6045AF\",\"Inductor_SMD/L_TaiTech_TMPC1265_13.5x12.5mm\",\"Inductor_SMD/L_Taiyo-Yuden_BK_Array_1206_3216Metric\",\"Inductor_SMD/L_Taiyo-Yuden_MD-1616\",\"Inductor_SMD/L_Taiyo-Yuden_MD-2020\",\"Inductor_SMD/L_Taiyo-Yuden_MD-3030\",\"Inductor_SMD/L_Taiyo-Yuden_MD-4040\",\"Inductor_SMD/L_Taiyo-Yuden_MD-5050\",\"Inductor_SMD/L_Taiyo-Yuden_NR-10050_9.8x10.0mm\",\"Inductor_SMD/L_Taiyo-Yuden_NR-10050_9.8x10.0mm_HandSoldering\",\"Inductor_SMD/L_Taiyo-Yuden_NR-20xx\",\"Inductor_SMD/L_Taiyo-Yuden_NR-20xx_HandSoldering\",\"Inductor_SMD/L_Taiyo-Yuden_NR-24xx\",\"Inductor_SMD/L_Taiyo-Yuden_NR-24xx_HandSoldering\",\"Inductor_SMD/L_Taiyo-Yuden_NR-30xx\",\"Inductor_SMD/L_Taiyo-Yuden_NR-30xx_HandSoldering\",\"Inductor_SMD/L_Taiyo-Yuden_NR-40xx\",\"Inductor_SMD/L_Taiyo-Yuden_NR-40xx_HandSoldering\",\"Inductor_SMD/L_Taiyo-Yuden_NR-50xx\",\"Inductor_SMD/L_Taiyo-Yuden_NR-50xx_HandSoldering\",\"Inductor_SMD/L_Taiyo-Yuden_NR-60xx\",\"Inductor_SMD/L_Taiyo-Yuden_NR-60xx_HandSoldering\",\"Inductor_SMD/L_Taiyo-Yuden_NR-80xx\",\"Inductor_SMD/L_Taiyo-Yuden_NR-80xx_HandSoldering\",\"Inductor_SMD/L_TechFuse_SL0420\",\"Inductor_SMD/L_TechFuse_SL0520\",\"Inductor_SMD/L_TechFuse_SL0530\",\"Inductor_SMD/L_TechFuse_SL0620\",\"Inductor_SMD/L_TechFuse_SL0624\",\"Inductor_SMD/L_TechFuse_SL0630\",\"Inductor_SMD/L_TechFuse_SL0650\",\"Inductor_SMD/L_TechFuse_SL1040\",\"Inductor_SMD/L_TechFuse_SL1050\",\"Inductor_SMD/L_TechFuse_SL1250\",\"Inductor_SMD/L_TechFuse_SL1265\",\"Inductor_SMD/L_TracoPower_TCK-047_5.2x5.8mm\",\"Inductor_SMD/L_TracoPower_TCK-141\",\"Inductor_SMD/L_Vishay_IFSC-1515AH_4x4x1.8mm\",\"Inductor_SMD/L_Vishay_IHLP-1212\",\"Inductor_SMD/L_Vishay_IHLP-1616\",\"Inductor_SMD/L_Vishay_IHLP-2020\",\"Inductor_SMD/L_Vishay_IHLP-2525\",\"Inductor_SMD/L_Vishay_IHLP-3232\",\"Inductor_SMD/L_Vishay_IHLP-4040\",\"Inductor_SMD/L_Vishay_IHLP-5050\",\"Inductor_SMD/L_Vishay_IHLP-6767\",\"Inductor_SMD/L_Vishay_IHSM-3825\",\"Inductor_SMD/L_Vishay_IHSM-4825\",\"Inductor_SMD/L_Vishay_IHSM-5832\",\"Inductor_SMD/L_Vishay_IHSM-7832\",\"Inductor_SMD/L_Walsin_WLFM201209x\",\"Inductor_SMD/L_Walsin_WLFM201609x\",\"Inductor_SMD/L_Walsin_WLFM252009x\",\"Inductor_SMD/L_Wuerth_HCF-2013\",\"Inductor_SMD/L_Wuerth_HCF-2815\",\"Inductor_SMD/L_Wuerth_HCF-2818\",\"Inductor_SMD/L_Wuerth_HCI-1030\",\"Inductor_SMD/L_Wuerth_HCI-1040\",\"Inductor_SMD/L_Wuerth_HCI-1050\",\"Inductor_SMD/L_Wuerth_HCI-1335\",\"Inductor_SMD/L_Wuerth_HCI-1350\",\"Inductor_SMD/L_Wuerth_HCI-1365\",\"Inductor_SMD/L_Wuerth_HCI-1890\",\"Inductor_SMD/L_Wuerth_HCI-2212\",\"Inductor_SMD/L_Wuerth_HCI-5040\",\"Inductor_SMD/L_Wuerth_HCI-7030\",\"Inductor_SMD/L_Wuerth_HCI-7040\",\"Inductor_SMD/L_Wuerth_HCI-7050\",\"Inductor_SMD/L_Wuerth_HCM-1050\",\"Inductor_SMD/L_Wuerth_HCM-1052\",\"Inductor_SMD/L_Wuerth_HCM-1070\",\"Inductor_SMD/L_Wuerth_HCM-1078\",\"Inductor_SMD/L_Wuerth_HCM-1190\",\"Inductor_SMD/L_Wuerth_HCM-1240\",\"Inductor_SMD/L_Wuerth_HCM-1350\",\"Inductor_SMD/L_Wuerth_HCM-1390\",\"Inductor_SMD/L_Wuerth_HCM-7050\",\"Inductor_SMD/L_Wuerth_HCM-7070\",\"Inductor_SMD/L_Wuerth_LQFS-3818\",\"Inductor_SMD/L_Wuerth_LQFS-4818\",\"Inductor_SMD/L_Wuerth_LQFS-4828\",\"Inductor_SMD/L_Wuerth_MAPI-1610\",\"Inductor_SMD/L_Wuerth_MAPI-2010\",\"Inductor_SMD/L_Wuerth_MAPI-2506\",\"Inductor_SMD/L_Wuerth_MAPI-2508\",\"Inductor_SMD/L_Wuerth_MAPI-2510\",\"Inductor_SMD/L_Wuerth_MAPI-2512\",\"Inductor_SMD/L_Wuerth_MAPI-3010\",\"Inductor_SMD/L_Wuerth_MAPI-3012\",\"Inductor_SMD/L_Wuerth_MAPI-3015\",\"Inductor_SMD/L_Wuerth_MAPI-3020\",\"Inductor_SMD/L_Wuerth_MAPI-4020\",\"Inductor_SMD/L_Wuerth_MAPI-4030\",\"Inductor_SMD/L_Wuerth_MAPI-5020\",\"Inductor_SMD/L_Wuerth_MAPI-5030\",\"Inductor_SMD/L_Wuerth_PMCI-160808\",\"Inductor_SMD/L_Wuerth_PMCI-201210\",\"Inductor_SMD/L_Wuerth_PMCI-201610\",\"Inductor_SMD/L_Wuerth_PMCI-252010\",\"Inductor_SMD/L_Wuerth_PMCI-252012\",\"Inductor_SMD/L_Wuerth_PMCI-322510\",\"Inductor_SMD/L_Wuerth_PMCI-322512\",\"Inductor_SMD/L_Wuerth_PMCI-322515\",\"Inductor_SMD/L_Wuerth_PMFI-201610\",\"Inductor_SMD/L_Wuerth_PMFI-201610_PMCI-compatible\",\"Inductor_SMD/L_Wuerth_PMFI-252012\",\"Inductor_SMD/L_Wuerth_PMFI-252012_PMCI-compatible\",\"Inductor_SMD/L_Wuerth_PMFI-322512\",\"Inductor_SMD/L_Wuerth_PMFI-322512_PMCI-compatible\",\"Inductor_SMD/L_Wuerth_PMFI-353220\",\"Inductor_SMD/L_Wuerth_WE-DD-Typ-L-Typ-XL-Typ-XXL\",\"Inductor_SMD/L_Wuerth_WE-DD-Typ-M-Typ-S\",\"Inductor_SMD/L_Wuerth_WE-GF-1210\",\"Inductor_SMD/L_Wuerth_WE-PD-Typ-7345\",\"Inductor_SMD/L_Wuerth_WE-PD-Typ-LS\",\"Inductor_SMD/L_Wuerth_WE-PD-Typ-LS_Handsoldering\",\"Inductor_SMD/L_Wuerth_WE-PD-Typ-M-Typ-S\",\"Inductor_SMD/L_Wuerth_WE-PD-Typ-M-Typ-S_Handsoldering\",\"Inductor_SMD/L_Wuerth_WE-PD2-Typ-L\",\"Inductor_SMD/L_Wuerth_WE-PD2-Typ-MS\",\"Inductor_SMD/L_Wuerth_WE-PD2-Typ-XL\",\"Inductor_SMD/L_Wuerth_WE-PD4-Typ-X\",\"Inductor_SMD/L_Wuerth_WE-PDF\",\"Inductor_SMD/L_Wuerth_WE-PDF_Handsoldering\",\"Inductor_SMD/L_Wuerth_WE-TPC-3816\",\"Inductor_SMD/L_Wuerth_XHMI-6060\",\"Inductor_SMD/L_Wuerth_XHMI-8080\",\"Inductor_SMD/L_Wurth_WE-CAIR-5910\",\"Inductor_SMD_Wurth/L_Wurth_WE-LQSH-2010\",\"Inductor_SMD_Wurth/L_Wurth_WE-LQSH-2512\",\"Inductor_SMD_Wurth/L_Wurth_WE-LQSH-3012\",\"Inductor_SMD_Wurth/L_Wurth_WE-LQSH-4020\",\"Inductor_THT/Choke_EPCOS_B82722A\",\"Inductor_THT/Choke_Schaffner_RN102-04-14.0x14.0mm\",\"Inductor_THT/Choke_Schaffner_RN112-04-17.7x17.1mm\",\"Inductor_THT/Choke_Schaffner_RN114-04-22.5x21.5mm\",\"Inductor_THT/Choke_Schaffner_RN116-04-22.5x21.5mm\",\"Inductor_THT/Choke_Schaffner_RN122-04-28.0x27.0mm\",\"Inductor_THT/Choke_Schaffner_RN142-04-33.1x32.5mm\",\"Inductor_THT/Choke_Schaffner_RN143-04-33.1x32.5mm\",\"Inductor_THT/Choke_Schaffner_RN152-04-43.0x41.8mm\",\"Inductor_THT/Choke_Schaffner_RN202-04-8.8x18.2mm\",\"Inductor_THT/Choke_Schaffner_RN204-04-9.0x14.0mm\",\"Inductor_THT/Choke_Schaffner_RN212-04-12.5x18.0mm\",\"Inductor_THT/Choke_Schaffner_RN214-04-15.5x23.0mm\",\"Inductor_THT/Choke_Schaffner_RN216-04-15.5x23.0mm\",\"Inductor_THT/Choke_Schaffner_RN218-04-12.5x18.0mm\",\"Inductor_THT/Choke_Schaffner_RN222-04-18.0x31.0mm\",\"Inductor_THT/Choke_Schaffner_RN232-04-18.0x31.0mm\",\"Inductor_THT/Choke_Schaffner_RN242-04-18.0x31.0mm\",\"Inductor_THT/L_Axial_L11.0mm_D4.5mm_P15.24mm_Horizontal_Fastron_MECC\",\"Inductor_THT/L_Axial_L11.0mm_D4.5mm_P5.08mm_Vertical_Fastron_MECC\",\"Inductor_THT/L_Axial_L11.0mm_D4.5mm_P7.62mm_Vertical_Fastron_MECC\",\"Inductor_THT/L_Axial_L12.0mm_D5.0mm_P15.24mm_Horizontal_Fastron_MISC\",\"Inductor_THT/L_Axial_L12.0mm_D5.0mm_P5.08mm_Vertical_Fastron_MISC\",\"Inductor_THT/L_Axial_L12.0mm_D5.0mm_P7.62mm_Vertical_Fastron_MISC\",\"Inductor_THT/L_Axial_L12.8mm_D5.8mm_P20.32mm_Horizontal_Fastron_HBCC\",\"Inductor_THT/L_Axial_L12.8mm_D5.8mm_P25.40mm_Horizontal_Fastron_HBCC\",\"Inductor_THT/L_Axial_L12.8mm_D5.8mm_P5.08mm_Vertical_Fastron_HBCC\",\"Inductor_THT/L_Axial_L12.8mm_D5.8mm_P7.62mm_Vertical_Fastron_HBCC\",\"Inductor_THT/L_Axial_L13.0mm_D4.5mm_P15.24mm_Horizontal_Fastron_HCCC\",\"Inductor_THT/L_Axial_L13.0mm_D4.5mm_P5.08mm_Vertical_Fastron_HCCC\",\"Inductor_THT/L_Axial_L13.0mm_D4.5mm_P7.62mm_Vertical_Fastron_HCCC\",\"Inductor_THT/L_Axial_L14.0mm_D4.5mm_P15.24mm_Horizontal_Fastron_LACC\",\"Inductor_THT/L_Axial_L14.0mm_D4.5mm_P5.08mm_Vertical_Fastron_LACC\",\"Inductor_THT/L_Axial_L14.0mm_D4.5mm_P7.62mm_Vertical_Fastron_LACC\",\"Inductor_THT/L_Axial_L14.5mm_D5.8mm_P20.32mm_Horizontal_Fastron_HBCC\",\"Inductor_THT/L_Axial_L14.5mm_D5.8mm_P25.40mm_Horizontal_Fastron_HBCC\",\"Inductor_THT/L_Axial_L14.5mm_D5.8mm_P5.08mm_Vertical_Fastron_HBCC\",\"Inductor_THT/L_Axial_L14.5mm_D5.8mm_P7.62mm_Vertical_Fastron_HBCC\",\"Inductor_THT/L_Axial_L16.0mm_D6.3mm_P20.32mm_Horizontal_Fastron_VHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D6.3mm_P25.40mm_Horizontal_Fastron_VHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D6.3mm_P5.08mm_Vertical_Fastron_VHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D6.3mm_P7.62mm_Vertical_Fastron_VHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D7.5mm_P20.32mm_Horizontal_Fastron_XHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D7.5mm_P25.40mm_Horizontal_Fastron_XHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D7.5mm_P5.08mm_Vertical_Fastron_XHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D7.5mm_P7.62mm_Vertical_Fastron_XHBCC\",\"Inductor_THT/L_Axial_L16.0mm_D9.5mm_P20.32mm_Horizontal_Vishay_IM-10-37\",\"Inductor_THT/L_Axial_L16.0mm_D9.5mm_P5.08mm_Vertical_Vishay_IM-10-37\",\"Inductor_THT/L_Axial_L17.5mm_D12.0mm_P20.32mm_Horizontal_Vishay_IM-10-46\",\"Inductor_THT/L_Axial_L17.5mm_D12.0mm_P7.62mm_Vertical_Vishay_IM-10-46\",\"Inductor_THT/L_Axial_L20.0mm_D8.0mm_P25.40mm_Horizontal\",\"Inductor_THT/L_Axial_L20.0mm_D8.0mm_P5.08mm_Vertical\",\"Inductor_THT/L_Axial_L20.0mm_D8.0mm_P7.62mm_Vertical\",\"Inductor_THT/L_Axial_L20.3mm_D12.1mm_P28.50mm_Horizontal_Vishay_IHA-101\",\"Inductor_THT/L_Axial_L20.3mm_D12.1mm_P7.62mm_Vertical_Vishay_IHA-101\",\"Inductor_THT/L_Axial_L20.3mm_D12.7mm_P25.40mm_Horizontal_Vishay_IHA-201\",\"Inductor_THT/L_Axial_L20.3mm_D12.7mm_P7.62mm_Vertical_Vishay_IHA-201\",\"Inductor_THT/L_Axial_L23.4mm_D12.7mm_P32.00mm_Horizontal_Vishay_IHA-203\",\"Inductor_THT/L_Axial_L23.4mm_D12.7mm_P7.62mm_Vertical_Vishay_IHA-203\",\"Inductor_THT/L_Axial_L24.0mm_D7.1mm_P30.48mm_Horizontal_Vishay_IM-10-28\",\"Inductor_THT/L_Axial_L24.0mm_D7.1mm_P5.08mm_Vertical_Vishay_IM-10-28\",\"Inductor_THT/L_Axial_L24.0mm_D7.5mm_P27.94mm_Horizontal_Fastron_MESC\",\"Inductor_THT/L_Axial_L24.0mm_D7.5mm_P5.08mm_Vertical_Fastron_MESC\",\"Inductor_THT/L_Axial_L24.0mm_D7.5mm_P7.62mm_Vertical_Fastron_MESC\",\"Inductor_THT/L_Axial_L26.0mm_D10.0mm_P30.48mm_Horizontal_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D10.0mm_P5.08mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D10.0mm_P7.62mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D11.0mm_P30.48mm_Horizontal_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D11.0mm_P5.08mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D11.0mm_P7.62mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D9.0mm_P30.48mm_Horizontal_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D9.0mm_P5.08mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L26.0mm_D9.0mm_P7.62mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L26.7mm_D12.1mm_P35.00mm_Horizontal_Vishay_IHA-103\",\"Inductor_THT/L_Axial_L26.7mm_D12.1mm_P7.62mm_Vertical_Vishay_IHA-103\",\"Inductor_THT/L_Axial_L26.7mm_D14.0mm_P35.00mm_Horizontal_Vishay_IHA-104\",\"Inductor_THT/L_Axial_L26.7mm_D14.0mm_P7.62mm_Vertical_Vishay_IHA-104\",\"Inductor_THT/L_Axial_L29.9mm_D14.0mm_P38.00mm_Horizontal_Vishay_IHA-105\",\"Inductor_THT/L_Axial_L29.9mm_D14.0mm_P7.62mm_Vertical_Vishay_IHA-105\",\"Inductor_THT/L_Axial_L30.0mm_D8.0mm_P35.56mm_Horizontal_Fastron_77A\",\"Inductor_THT/L_Axial_L30.0mm_D8.0mm_P5.08mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L30.0mm_D8.0mm_P7.62mm_Vertical_Fastron_77A\",\"Inductor_THT/L_Axial_L5.0mm_D3.6mm_P10.00mm_Horizontal_Murata_BL01RN1A2A2\",\"Inductor_THT/L_Axial_L5.3mm_D2.2mm_P10.16mm_Horizontal_Vishay_IM-1\",\"Inductor_THT/L_Axial_L5.3mm_D2.2mm_P2.54mm_Vertical_Vishay_IM-1\",\"Inductor_THT/L_Axial_L5.3mm_D2.2mm_P7.62mm_Horizontal_Vishay_IM-1\",\"Inductor_THT/L_Axial_L6.6mm_D2.7mm_P10.16mm_Horizontal_Vishay_IM-2\",\"Inductor_THT/L_Axial_L6.6mm_D2.7mm_P2.54mm_Vertical_Vishay_IM-2\",\"Inductor_THT/L_Axial_L7.0mm_D3.3mm_P10.16mm_Horizontal_Fastron_MICC\",\"Inductor_THT/L_Axial_L7.0mm_D3.3mm_P12.70mm_Horizontal_Fastron_MICC\",\"Inductor_THT/L_Axial_L7.0mm_D3.3mm_P2.54mm_Vertical_Fastron_MICC\",\"Inductor_THT/L_Axial_L7.0mm_D3.3mm_P5.08mm_Vertical_Fastron_MICC\",\"Inductor_THT/L_Axial_L9.5mm_D4.0mm_P12.70mm_Horizontal_Fastron_SMCC\",\"Inductor_THT/L_Axial_L9.5mm_D4.0mm_P15.24mm_Horizontal_Fastron_SMCC\",\"Inductor_THT/L_Axial_L9.5mm_D4.0mm_P2.54mm_Vertical_Fastron_SMCC\",\"Inductor_THT/L_Axial_L9.5mm_D4.0mm_P5.08mm_Vertical_Fastron_SMCC\",\"Inductor_THT/L_CommonMode_PulseElectronics_PH9455x105NL_1\",\"Inductor_THT/L_CommonMode_PulseElectronics_PH9455x155NL_1\",\"Inductor_THT/L_CommonMode_PulseElectronics_PH9455x205NL_1\",\"Inductor_THT/L_CommonMode_PulseElectronics_PH9455x405NL_1\",\"Inductor_THT/L_CommonMode_PulseElectronics_PH9455x705NL_1\",\"Inductor_THT/L_CommonMode_PulseElectronics_PH9455xxx6NL_2\",\"Inductor_THT/L_CommonMode_TDK_B82746S4143A040\",\"Inductor_THT/L_CommonMode_TDK_B82746S6702A040\",\"Inductor_THT/L_CommonMode_TDK_B82747E6163A040\",\"Inductor_THT/L_CommonMode_TDK_B82747E6203A040\",\"Inductor_THT/L_CommonMode_TDK_B82747E6253A040\",\"Inductor_THT/L_CommonMode_TDK_B82747E6353A040\",\"Inductor_THT/L_CommonMode_TDK_B82767S4123N030\",\"Inductor_THT/L_CommonMode_TDK_B82767S4193N030\",\"Inductor_THT/L_CommonMode_TDK_B82767S4263N030\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L13.0mm_W7.5mm_Px6.00mm_Py5.00mm_PRODTech_PDMCAT1065\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L19.3mm_W10.8mm_Px6.35mm_Py15.24mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L21.0mm_W10.0mm_Px5.08mm_Py12.70mm_Murata_5100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-102ML\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-103ML\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-202ML\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-203ML\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-502ML\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L24.0mm_W16.3mm_Px10.16mm_Py20.32mm_Murata_5200\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L30.5mm_W15.2mm_Px10.16mm_Py20.32mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L34.3mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L36.8mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L38.1mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L39.4mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L41.9mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_Toroid_Vertical_L43.2mm_W22.9mm_Px17.78mm_Py30.48mm_Bourns_8100\",\"Inductor_THT/L_CommonMode_VAC_T60405-S6123-X140\",\"Inductor_THT/L_CommonMode_VAC_T60405-S6123-X240\",\"Inductor_THT/L_CommonMode_VAC_T60405-S6123-X402\",\"Inductor_THT/L_CommonMode_Wuerth_WE-CMB-L\",\"Inductor_THT/L_CommonMode_Wuerth_WE-CMB-M\",\"Inductor_THT/L_CommonMode_Wuerth_WE-CMB-S\",\"Inductor_THT/L_CommonMode_Wuerth_WE-CMB-XL\",\"Inductor_THT/L_CommonMode_Wuerth_WE-CMB-XS\",\"Inductor_THT/L_CommonMode_Wuerth_WE-CMB-XXL\",\"Inductor_THT/L_Mount_Lodestone_VTM120\",\"Inductor_THT/L_Mount_Lodestone_VTM160\",\"Inductor_THT/L_Mount_Lodestone_VTM254\",\"Inductor_THT/L_Mount_Lodestone_VTM280\",\"Inductor_THT/L_Mount_Lodestone_VTM950-6\",\"Inductor_THT/L_Radial_D10.0mm_P5.00mm_Fastron_07M\",\"Inductor_THT/L_Radial_D10.0mm_P5.00mm_Fastron_07P\",\"Inductor_THT/L_Radial_D10.0mm_P5.00mm_Neosid_SD12_style3\",\"Inductor_THT/L_Radial_D10.0mm_P5.00mm_Neosid_SD12k_style3\",\"Inductor_THT/L_Radial_D10.5mm_P4.00x5.00mm_Murata_1200RS\",\"Inductor_THT/L_Radial_D10.5mm_P5.00mm_Abacron_AISR-01\",\"Inductor_THT/L_Radial_D12.0mm_P10.00mm_Neosid_SD12_style1\",\"Inductor_THT/L_Radial_D12.0mm_P10.00mm_Neosid_SD12k_style1\",\"Inductor_THT/L_Radial_D12.0mm_P5.00mm_Fastron_11P\",\"Inductor_THT/L_Radial_D12.0mm_P5.00mm_Neosid_SD12_style2\",\"Inductor_THT/L_Radial_D12.0mm_P5.00mm_Neosid_SD12k_style2\",\"Inductor_THT/L_Radial_D12.0mm_P6.00mm_Murata_1900R\",\"Inductor_THT/L_Radial_D12.5mm_P7.00mm_Fastron_09HCP\",\"Inductor_THT/L_Radial_D12.5mm_P9.00mm_Fastron_09HCP\",\"Inductor_THT/L_Radial_D13.5mm_P7.00mm_Fastron_09HCP\",\"Inductor_THT/L_Radial_D14.2mm_P10.00mm_Neosid_SD14\",\"Inductor_THT/L_Radial_D16.0mm_P10.00mm_Panasonic_15E-L\",\"Inductor_THT/L_Radial_D16.8mm_P11.43mm_Vishay_IHB-1\",\"Inductor_THT/L_Radial_D16.8mm_P12.07mm_Vishay_IHB-1\",\"Inductor_THT/L_Radial_D16.8mm_P12.70mm_Vishay_IHB-1\",\"Inductor_THT/L_Radial_D18.0mm_P10.00mm\",\"Inductor_THT/L_Radial_D21.0mm_P14.61mm_Vishay_IHB-2\",\"Inductor_THT/L_Radial_D21.0mm_P15.00mm_Vishay_IHB-2\",\"Inductor_THT/L_Radial_D21.0mm_P15.24mm_Vishay_IHB-2\",\"Inductor_THT/L_Radial_D21.0mm_P15.75mm_Vishay_IHB-2\",\"Inductor_THT/L_Radial_D21.0mm_P19.00mm\",\"Inductor_THT/L_Radial_D24.0mm_P24.00mm\",\"Inductor_THT/L_Radial_D24.4mm_P22.90mm_Murata_1400series\",\"Inductor_THT/L_Radial_D24.4mm_P23.10mm_Murata_1400series\",\"Inductor_THT/L_Radial_D24.4mm_P23.40mm_Murata_1400series\",\"Inductor_THT/L_Radial_D24.4mm_P23.70mm_Murata_1400series\",\"Inductor_THT/L_Radial_D24.4mm_P23.90mm_Murata_1400series\",\"Inductor_THT/L_Radial_D27.9mm_P18.29mm_Vishay_IHB-3\",\"Inductor_THT/L_Radial_D27.9mm_P19.05mm_Vishay_IHB-3\",\"Inductor_THT/L_Radial_D27.9mm_P20.07mm_Vishay_IHB-3\",\"Inductor_THT/L_Radial_D28.0mm_P29.20mm\",\"Inductor_THT/L_Radial_D29.8mm_P28.30mm_Murata_1400series\",\"Inductor_THT/L_Radial_D29.8mm_P28.50mm_Murata_1400series\",\"Inductor_THT/L_Radial_D29.8mm_P28.80mm_Murata_1400series\",\"Inductor_THT/L_Radial_D29.8mm_P29.00mm_Murata_1400series\",\"Inductor_THT/L_Radial_D29.8mm_P29.30mm_Murata_1400series\",\"Inductor_THT/L_Radial_D40.6mm_P26.16mm_Vishay_IHB-5\",\"Inductor_THT/L_Radial_D40.6mm_P27.18mm_Vishay_IHB-4\",\"Inductor_THT/L_Radial_D40.6mm_P27.94mm_Vishay_IHB-4\",\"Inductor_THT/L_Radial_D40.6mm_P27.94mm_Vishay_IHB-5\",\"Inductor_THT/L_Radial_D40.6mm_P28.70mm_Vishay_IHB-5\",\"Inductor_THT/L_Radial_D50.8mm_P33.27mm_Vishay_IHB-6\",\"Inductor_THT/L_Radial_D50.8mm_P34.29mm_Vishay_IHB-6\",\"Inductor_THT/L_Radial_D50.8mm_P35.81mm_Vishay_IHB-6\",\"Inductor_THT/L_Radial_D50.8mm_P36.32mm_Vishay_IHB-6\",\"Inductor_THT/L_Radial_D50.8mm_P38.86mm_Vishay_IHB-6\",\"Inductor_THT/L_Radial_D6.0mm_P4.00mm\",\"Inductor_THT/L_Radial_D7.0mm_P3.00mm\",\"Inductor_THT/L_Radial_D7.2mm_P3.00mm_Murata_1700\",\"Inductor_THT/L_Radial_D7.5mm_P3.50mm_Fastron_07P\",\"Inductor_THT/L_Radial_D7.5mm_P5.00mm_Fastron_07P\",\"Inductor_THT/L_Radial_D7.8mm_P5.00mm_Fastron_07HCP\",\"Inductor_THT/L_Radial_D8.7mm_P5.00mm_Fastron_07HCP\",\"Inductor_THT/L_Radial_D9.5mm_P5.00mm_Fastron_07HVP\",\"Inductor_THT/L_Radial_L10.2mm_W10.2mm_Px7.62mm_Py7.62mm_Pulse_LP-30\",\"Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.3mm\",\"Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.5mm\",\"Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.7mm\",\"Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.8mm\",\"Inductor_THT/L_Radial_L12.6mm_W12.6mm_Px9.52mm_Py9.52mm_Pulse_LP-37\",\"Inductor_THT/L_Radial_L16.1mm_W16.1mm_Px7.62mm_Py12.70mm_Pulse_LP-44\",\"Inductor_THT/L_Radial_L7.5mm_W4.6mm_P5.00mm_Neosid_SD75\",\"Inductor_THT/L_Radial_L8.0mm_W8.0mm_P5.00mm_Neosid_NE-CPB-07E\",\"Inductor_THT/L_Radial_L8.0mm_W8.0mm_P5.00mm_Neosid_SD8\",\"Inductor_THT/L_Radial_L9.1mm_W9.1mm_Px6.35mm_Py6.35mm_Pulse_LP-25\",\"Inductor_THT/L_SELF1408\",\"Inductor_THT/L_SELF1418\",\"Inductor_THT/L_Toroid_Horizontal_D11.2mm_P17.00mm_Diameter12-5mm_Amidon-T44\",\"Inductor_THT/L_Toroid_Horizontal_D12.7mm_P20.00mm_Diameter14-5mm_Amidon-T50\",\"Inductor_THT/L_Toroid_Horizontal_D16.8mm_P14.70mm_Vishay_TJ3\",\"Inductor_THT/L_Toroid_Horizontal_D16.8mm_P14.70mm_Vishay_TJ3_BigPads\",\"Inductor_THT/L_Toroid_Horizontal_D17.3mm_P15.24mm_Bourns_2000\",\"Inductor_THT/L_Toroid_Horizontal_D21.8mm_P19.10mm_Bourns_2100\",\"Inductor_THT/L_Toroid_Horizontal_D21.8mm_P19.60mm_Bourns_2100\",\"Inductor_THT/L_Toroid_Horizontal_D22.4mm_P19.80mm_Vishay_TJ4\",\"Inductor_THT/L_Toroid_Horizontal_D24.1mm_P21.80mm_Bourns_2200\",\"Inductor_THT/L_Toroid_Horizontal_D24.1mm_P23.10mm_Bourns_2200\",\"Inductor_THT/L_Toroid_Horizontal_D25.4mm_P22.90mm_Vishay_TJ5\",\"Inductor_THT/L_Toroid_Horizontal_D25.4mm_P22.90mm_Vishay_TJ5_BigPads\",\"Inductor_THT/L_Toroid_Horizontal_D26.0mm_P5.08mm\",\"Inductor_THT/L_Toroid_Horizontal_D28.0mm_P25.10mm_Bourns_2200\",\"Inductor_THT/L_Toroid_Horizontal_D28.0mm_P26.67mm_Bourns_2200\",\"Inductor_THT/L_Toroid_Horizontal_D3.2mm_P6.40mm_Diameter3-5mm_Amidon-T12\",\"Inductor_THT/L_Toroid_Horizontal_D32.5mm_P28.90mm_Bourns_2300\",\"Inductor_THT/L_Toroid_Horizontal_D32.5mm_P30.00mm_Bourns_2300\",\"Inductor_THT/L_Toroid_Horizontal_D35.1mm_P31.00mm_Vishay_TJ6\",\"Inductor_THT/L_Toroid_Horizontal_D4.1mm_P8.00mm_Diameter4-5mm_Amidon-T16\",\"Inductor_THT/L_Toroid_Horizontal_D40.0mm_P48.26mm\",\"Inductor_THT/L_Toroid_Horizontal_D41.9mm_P37.60mm_Vishay_TJ7\",\"Inductor_THT/L_Toroid_Horizontal_D49.3mm_P44.60mm_Vishay_TJ8\",\"Inductor_THT/L_Toroid_Horizontal_D5.1mm_P9.00mm_Diameter6-5mm_Amidon-T20\",\"Inductor_THT/L_Toroid_Horizontal_D6.5mm_P10.00mm_Diameter7-5mm_Amidon-T25\",\"Inductor_THT/L_Toroid_Horizontal_D69.1mm_P63.20mm_Vishay_TJ9\",\"Inductor_THT/L_Toroid_Horizontal_D7.8mm_P13.00mm_Diameter9-5mm_Amidon-T30\",\"Inductor_THT/L_Toroid_Horizontal_D9.5mm_P15.00mm_Diameter10-5mm_Amidon-T37\",\"Inductor_THT/L_Toroid_Vertical_L10.0mm_W5.0mm_P5.08mm\",\"Inductor_THT/L_Toroid_Vertical_L13.0mm_W6.5mm_P5.60mm\",\"Inductor_THT/L_Toroid_Vertical_L14.0mm_W5.6mm_P5.30mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L14.0mm_W6.3mm_P4.57mm_Pulse_A\",\"Inductor_THT/L_Toroid_Vertical_L14.7mm_W8.6mm_P5.58mm_Pulse_KM-1\",\"Inductor_THT/L_Toroid_Vertical_L16.0mm_W8.0mm_P7.62mm\",\"Inductor_THT/L_Toroid_Vertical_L16.3mm_W7.1mm_P7.11mm_Pulse_H\",\"Inductor_THT/L_Toroid_Vertical_L16.4mm_W7.6mm_P6.60mm_Vishay_TJ3\",\"Inductor_THT/L_Toroid_Vertical_L16.5mm_W11.4mm_P7.62mm_Pulse_KM-2\",\"Inductor_THT/L_Toroid_Vertical_L16.8mm_W9.2mm_P7.10mm_Vishay_TJ3\",\"Inductor_THT/L_Toroid_Vertical_L16.8mm_W9.2mm_P7.10mm_Vishay_TJ3_BigPads\",\"Inductor_THT/L_Toroid_Vertical_L17.8mm_W8.1mm_P7.62mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L17.8mm_W9.7mm_P7.11mm_Pulse_B\",\"Inductor_THT/L_Toroid_Vertical_L19.1mm_W8.1mm_P7.10mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L21.6mm_W11.4mm_P7.62mm_Pulse_KM-3\",\"Inductor_THT/L_Toroid_Vertical_L21.6mm_W8.4mm_P8.38mm_Pulse_G\",\"Inductor_THT/L_Toroid_Vertical_L21.6mm_W9.1mm_P8.40mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L21.6mm_W9.5mm_P7.11mm_Pulse_C\",\"Inductor_THT/L_Toroid_Vertical_L22.4mm_W10.2mm_P7.90mm_Vishay_TJ4\",\"Inductor_THT/L_Toroid_Vertical_L24.6mm_W15.5mm_P11.44mm_Pulse_KM-4\",\"Inductor_THT/L_Toroid_Vertical_L25.4mm_W14.7mm_P12.20mm_Vishay_TJ5\",\"Inductor_THT/L_Toroid_Vertical_L25.4mm_W14.7mm_P12.20mm_Vishay_TJ5_BigPads\",\"Inductor_THT/L_Toroid_Vertical_L26.7mm_W14.0mm_P10.16mm_Pulse_D\",\"Inductor_THT/L_Toroid_Vertical_L28.6mm_W14.3mm_P11.43mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L31.8mm_W15.9mm_P13.50mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L33.0mm_W17.8mm_P12.70mm_Pulse_KM-5\",\"Inductor_THT/L_Toroid_Vertical_L35.1mm_W21.1mm_P18.50mm_Vishay_TJ6\",\"Inductor_THT/L_Toroid_Vertical_L35.6mm_W17.8mm_P12.70mm_Pulse_E\",\"Inductor_THT/L_Toroid_Vertical_L41.9mm_W17.8mm_P12.70mm_Pulse_F\",\"Inductor_THT/L_Toroid_Vertical_L41.9mm_W19.1mm_P15.80mm_Vishay_TJ7\",\"Inductor_THT/L_Toroid_Vertical_L46.0mm_W19.1mm_P21.80mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L48.8mm_W25.4mm_P20.80mm_Vishay_TJ8\",\"Inductor_THT/L_Toroid_Vertical_L54.0mm_W23.8mm_P20.10mm_Bourns_5700\",\"Inductor_THT/L_Toroid_Vertical_L67.6mm_W36.1mm_P31.80mm_Vishay_TJ9\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-2012_LeadDiameter1.2mm\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-2012_LeadDiameter1.5mm\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-2504\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-3521\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-3533_LeadDiameter1.8mm\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-3533_LeadDiameter2.0mm\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter0.8mm\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter1.3mm\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter1.5mm\",\"Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter2.0mm\",\"Jumper/Jumper_Harwin_S1621_P10.9mm\",\"Jumper/SolderJumper-2_P1.3mm_Bridged2Bar_Pad1.0x1.5mm\",\"Jumper/SolderJumper-2_P1.3mm_Bridged2Bar_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-2_P1.3mm_Bridged_Pad1.0x1.5mm\",\"Jumper/SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mm\",\"Jumper/SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged123_Pad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged123_Pad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Bridged123_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged123_RoundedPad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Bridged12_Pad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged12_Pad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_Pad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_Pad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_RoundedPad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_Pad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_Pad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_RoundedPad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Open_Pad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Open_Pad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm\",\"Jumper/SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm_NumberLabels\",\"Jumper/SolderJumper-3_P2.0mm_Open_TrianglePad1.0x1.5mm\",\"Jumper/SolderJumper-3_P2.0mm_Open_TrianglePad1.0x1.5mm_NumberLabels\",\"LED_SMD/LED-APA102-2020\",\"LED_SMD/LED-L1T2_LUMILEDS\",\"LED_SMD/LED_01005_0402Metric\",\"LED_SMD/LED_01005_0402Metric_Pad0.57x0.30mm_HandSolder\",\"LED_SMD/LED_0201_0603Metric\",\"LED_SMD/LED_0201_0603Metric_Pad0.64x0.40mm_HandSolder\",\"LED_SMD/LED_0402_1005Metric\",\"LED_SMD/LED_0402_1005Metric_Pad0.77x0.64mm_HandSolder\",\"LED_SMD/LED_0603_1608Metric\",\"LED_SMD/LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder\",\"LED_SMD/LED_0805_2012Metric\",\"LED_SMD/LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder\",\"LED_SMD/LED_1206_3216Metric\",\"LED_SMD/LED_1206_3216Metric_Pad1.42x1.75mm_HandSolder\",\"LED_SMD/LED_1206_3216Metric_ReverseMount_Hole1.8x2.4mm\",\"LED_SMD/LED_1210_3225Metric\",\"LED_SMD/LED_1210_3225Metric_Pad1.42x2.65mm_HandSolder\",\"LED_SMD/LED_1812_4532Metric\",\"LED_SMD/LED_1812_4532Metric_Pad1.30x3.40mm_HandSolder\",\"LED_SMD/LED_1W_3W_R8\",\"LED_SMD/LED_2010_5025Metric\",\"LED_SMD/LED_2010_5025Metric_Pad1.52x2.65mm_HandSolder\",\"LED_SMD/LED_2512_6332Metric\",\"LED_SMD/LED_2512_6332Metric_Pad1.52x3.35mm_HandSolder\",\"LED_SMD/LED_ASMB-KTF0-0A306\",\"LED_SMD/LED_Avago_PLCC4_3.2x2.8mm_CW\",\"LED_SMD/LED_Avago_PLCC6_3x2.8mm\",\"LED_SMD/LED_CSP_Samsung_LH181B_2.36x2.36mm\",\"LED_SMD/LED_Cree-PLCC4_2x2mm_CW\",\"LED_SMD/LED_Cree-PLCC4_3.2x2.8mm_CCW\",\"LED_SMD/LED_Cree-PLCC4_5x5mm_CW\",\"LED_SMD/LED_Cree-PLCC6_4.7x1.5mm\",\"LED_SMD/LED_Cree-XB\",\"LED_SMD/LED_Cree-XH\",\"LED_SMD/LED_Cree-XHP35\",\"LED_SMD/LED_Cree-XHP50_12V_HighDensity\",\"LED_SMD/LED_Cree-XHP50_12V_HighIntensity\",\"LED_SMD/LED_Cree-XHP50_3V_HighDensity\",\"LED_SMD/LED_Cree-XHP50_3V_HighIntensity\",\"LED_SMD/LED_Cree-XHP50_6V_HighDensity\",\"LED_SMD/LED_Cree-XHP50_6V_HighIntensity\",\"LED_SMD/LED_Cree-XHP70_12V\",\"LED_SMD/LED_Cree-XHP70_6V\",\"LED_SMD/LED_Cree-XP-G\",\"LED_SMD/LED_Cree-XP\",\"LED_SMD/LED_Cree-XQ\",\"LED_SMD/LED_Cree-XQ_HandSoldering\",\"LED_SMD/LED_Dialight_591\",\"LED_SMD/LED_Everlight-SMD3528_3.5x2.8mm_67-21ST\",\"LED_SMD/LED_Foshan-NTD3528_3.5x2.8mm\",\"LED_SMD/LED_Inolux_IN-P55TATRGB_PLCC6_5.0x5.5mm_P1.8mm\",\"LED_SMD/LED_Inolux_IN-PI554FCH_PLCC4_5.0x5.0mm_P3.2mm\",\"LED_SMD/LED_Kingbright_AAA3528ESGCT\",\"LED_SMD/LED_Kingbright_APA1606_1.6x0.6mm_Horizontal\",\"LED_SMD/LED_Kingbright_APDA3020VBCD\",\"LED_SMD/LED_Kingbright_APFA3010_3x1.5mm_Horizontal\",\"LED_SMD/LED_Kingbright_APHBM2012_2x1.25mm\",\"LED_SMD/LED_Kingbright_KPA-3010_3x2x1mm\",\"LED_SMD/LED_Kingbright_KPBD-3224\",\"LED_SMD/LED_LiteOn_LTST-C19HE1WT\",\"LED_SMD/LED_LiteOn_LTST-C235KGKRKT\",\"LED_SMD/LED_LiteOn_LTST-C295K_1.6x0.8mm\",\"LED_SMD/LED_LiteOn_LTST-E563C_PLCC4_5.0x5.0mm_P3.2mm\",\"LED_SMD/LED_LiteOn_LTST-E563C_PLCC4_5.0x5.0mm_P3.2mm_HandSoldering\",\"LED_SMD/LED_LiteOn_LTST-S326\",\"LED_SMD/LED_Lumex_SML-LX0303SIUPGUSB\",\"LED_SMD/LED_Lumex_SML-LX0404SIUPGUSB\",\"LED_SMD/LED_Luminus_MP-3030-1100_3.0x3.0mm\",\"LED_SMD/LED_OPSCO_SK6812_PLCC4_5.0x5.0mm_P3.1mm\",\"LED_SMD/LED_Osram_Lx_P47F_D2mm_ReverseMount\",\"LED_SMD/LED_PLCC-2_3.4x3.0mm_AK\",\"LED_SMD/LED_PLCC-2_3.4x3.0mm_KA\",\"LED_SMD/LED_PLCC-2_3x2mm_AK\",\"LED_SMD/LED_PLCC-2_3x2mm_KA\",\"LED_SMD/LED_PLCC_2835\",\"LED_SMD/LED_PLCC_2835_Handsoldering\",\"LED_SMD/LED_RGB_1210\",\"LED_SMD/LED_RGB_5050-6\",\"LED_SMD/LED_RGB_Cree-PLCC-6_6x5mm_P2.1mm\",\"LED_SMD/LED_RGB_Everlight_EASV3015RGBA0_Horizontal\",\"LED_SMD/LED_RGB_Getian_GT-P6PRGB4303\",\"LED_SMD/LED_RGB_Lumex_SML-LXT0805SIUGUBW\",\"LED_SMD/LED_RGB_PLCC-6\",\"LED_SMD/LED_RGB_Wuerth-PLCC4_3.2x2.8mm_150141M173100\",\"LED_SMD/LED_RGB_Wuerth_150080M153000\",\"LED_SMD/LED_ROHM_SMLVN6\",\"LED_SMD/LED_SK6805_PLCC4_2.4x2.7mm_P1.3mm\",\"LED_SMD/LED_SK6812MINI-E_3.2x2.8mm_P1.5mm_ReverseMount\",\"LED_SMD/LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mm\",\"LED_SMD/LED_SK6812_EC15_1.5x1.5mm\",\"LED_SMD/LED_SK6812_PLCC4_5.0x5.0mm_P3.2mm\",\"LED_SMD/LED_WS2812B-2020_PLCC4_2.0x2.0mm\",\"LED_SMD/LED_WS2812B-Mini_PLCC4_3.5x3.5mm\",\"LED_SMD/LED_WS2812B_PLCC4_5.0x5.0mm_P3.2mm\",\"LED_SMD/LED_WS2812_PLCC6_5.0x5.0mm_P1.6mm\",\"LED_SMD/LED_Wurth_150044M155260\",\"LED_SMD/LED_Yuji_5730\",\"LED_SMD/LED_miniPLCC_2315\",\"LED_SMD/LED_miniPLCC_2315_Handsoldering\",\"LED_THT/LED_BL-FL7680RGB\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z1.6mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z4.9mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z8.2mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O3.81mm_Z1.6mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O3.81mm_Z4.9mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O3.81mm_Z8.2mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O6.35mm_Z1.6mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O6.35mm_Z4.9mm\",\"LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O6.35mm_Z8.2mm\",\"LED_THT/LED_D1.8mm_W3.3mm_H2.4mm\",\"LED_THT/LED_D10.0mm-3\",\"LED_THT/LED_D10.0mm\",\"LED_THT/LED_D2.0mm_W4.0mm_H2.8mm_FlatTop\",\"LED_THT/LED_D2.0mm_W4.8mm_H2.5mm_FlatTop\",\"LED_THT/LED_D20.0mm\",\"LED_THT/LED_D3.0mm-3\",\"LED_THT/LED_D3.0mm\",\"LED_THT/LED_D3.0mm_Clear\",\"LED_THT/LED_D3.0mm_FlatTop\",\"LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z10.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm_Clear\",\"LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm_IRBlack\",\"LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm_IRGrey\",\"LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z6.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O3.81mm_Z10.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O3.81mm_Z2.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O3.81mm_Z6.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O6.35mm_Z10.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O6.35mm_Z2.0mm\",\"LED_THT/LED_D3.0mm_Horizontal_O6.35mm_Z6.0mm\",\"LED_THT/LED_D3.0mm_IRBlack\",\"LED_THT/LED_D3.0mm_IRGrey\",\"LED_THT/LED_D4.0mm\",\"LED_THT/LED_D5.0mm-3\",\"LED_THT/LED_D5.0mm-3_Horizontal_O3.81mm_Z3.0mm\",\"LED_THT/LED_D5.0mm-4_RGB\",\"LED_THT/LED_D5.0mm-4_RGB_Staggered_Pins\",\"LED_THT/LED_D5.0mm-4_RGB_Wide_Pins\",\"LED_THT/LED_D5.0mm\",\"LED_THT/LED_D5.0mm_Clear\",\"LED_THT/LED_D5.0mm_FlatTop\",\"LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z15.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_Clear\",\"LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_IRBlack\",\"LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_IRGrey\",\"LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z9.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O3.81mm_Z15.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O3.81mm_Z3.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O3.81mm_Z9.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O6.35mm_Z15.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O6.35mm_Z3.0mm\",\"LED_THT/LED_D5.0mm_Horizontal_O6.35mm_Z9.0mm\",\"LED_THT/LED_D5.0mm_IRBlack\",\"LED_THT/LED_D5.0mm_IRGrey\",\"LED_THT/LED_D8.0mm-3\",\"LED_THT/LED_D8.0mm\",\"LED_THT/LED_Oval_W5.2mm_H3.8mm\",\"LED_THT/LED_Rectangular_W3.0mm_H2.0mm\",\"LED_THT/LED_Rectangular_W3.9mm_H1.8mm\",\"LED_THT/LED_Rectangular_W3.9mm_H1.9mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm-3Pins\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O1.27mm_Z1.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O1.27mm_Z3.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O1.27mm_Z5.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O3.81mm_Z1.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O3.81mm_Z3.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O3.81mm_Z5.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O6.35mm_Z1.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O6.35mm_Z3.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O6.35mm_Z5.0mm\",\"LED_THT/LED_Rectangular_W5.0mm_H5.0mm\",\"LED_THT/LED_Rectangular_W7.62mm_H4.55mm_P5.08mm_R3\",\"LED_THT/LED_SideEmitter_Rectangular_W4.5mm_H1.6mm\",\"LED_THT/LED_VCCLite_5381H1_6.35x6.35mm\",\"LED_THT/LED_VCCLite_5381H3_6.35x6.35mm\",\"LED_THT/LED_VCCLite_5381H5_6.35x6.35mm\",\"LED_THT/LED_VCCLite_5381H7_6.35x6.35mm\",\"Module/A20_OLINUXINO_LIME2\",\"Module/Adafruit_Feather\",\"Module/Adafruit_Feather_32u4_FONA\",\"Module/Adafruit_Feather_32u4_FONA_WithMountingHoles\",\"Module/Adafruit_Feather_32u4_RFM\",\"Module/Adafruit_Feather_32u4_RFM_WithMountingHoles\",\"Module/Adafruit_Feather_M0_RFM\",\"Module/Adafruit_Feather_M0_RFM_WithMountingHoles\",\"Module/Adafruit_Feather_M0_Wifi\",\"Module/Adafruit_Feather_M0_Wifi_WithMountingHoles\",\"Module/Adafruit_Feather_WICED\",\"Module/Adafruit_Feather_WICED_WithMountingHoles\",\"Module/Adafruit_Feather_WithMountingHoles\",\"Module/Adafruit_HUZZAH_ESP8266_breakout\",\"Module/Adafruit_HUZZAH_ESP8266_breakout_WithMountingHoles\",\"Module/Arduino_Nano\",\"Module/Arduino_Nano_WithMountingHoles\",\"Module/Arduino_UNO_R2\",\"Module/Arduino_UNO_R2_WithMountingHoles\",\"Module/Arduino_UNO_R3\",\"Module/Arduino_UNO_R3_WithMountingHoles\",\"Module/BeagleBoard_PocketBeagle\",\"Module/Carambola2\",\"Module/Electrosmith_Daisy_Seed\",\"Module/Flipper_Zero_Angled\",\"Module/Flipper_Zero_Straight\",\"Module/Google_Coral_SMT_TPU_Module\",\"Module/Maple_Mini\",\"Module/Olimex_MOD-WIFI-ESP8266-DEV\",\"Module/Onion_Omega2+\",\"Module/Onion_Omega2S\",\"Module/Pololu_Breakout-16_15.2x20.3mm\",\"Module/RaspberryPi_Pico_Common_SMD\",\"Module/RaspberryPi_Pico_Common_THT\",\"Module/RaspberryPi_Pico_Common_Unspecified\",\"Module/RaspberryPi_Pico_SMD\",\"Module/RaspberryPi_Pico_SMD_HandSolder\",\"Module/RaspberryPi_Pico_W_SMD\",\"Module/RaspberryPi_Pico_W_SMD_HandSolder\",\"Module/Raspberry_Pi_Zero_Socketed_THT_FaceDown_MountingHoles\",\"Module/ST_Morpho_Connector_144_STLink\",\"Module/ST_Morpho_Connector_144_STLink_MountingHoles\",\"Module/Sipeed-M1\",\"Module/Sipeed-M1W\",\"Module/Texas_EUK_R-PDSS-T7_THT\",\"Module/Texas_EUS_R-PDSS-T5_THT\",\"Module/Texas_EUW_R-PDSS-T7_THT\",\"Motors/Vybronics_VZ30C1T8219732L\",\"MountingEquipment/DINRailAdapter_3xM3_PhoenixContact_1201578\",\"MountingHole/MountingHole_2.1mm\",\"MountingHole/MountingHole_2.2mm_M2\",\"MountingHole/MountingHole_2.2mm_M2_DIN965\",\"MountingHole/MountingHole_2.2mm_M2_DIN965_Pad\",\"MountingHole/MountingHole_2.2mm_M2_DIN965_Pad_TopBottom\",\"MountingHole/MountingHole_2.2mm_M2_DIN965_Pad_TopOnly\",\"MountingHole/MountingHole_2.2mm_M2_ISO14580\",\"MountingHole/MountingHole_2.2mm_M2_ISO14580_Pad\",\"MountingHole/MountingHole_2.2mm_M2_ISO14580_Pad_TopBottom\",\"MountingHole/MountingHole_2.2mm_M2_ISO14580_Pad_TopOnly\",\"MountingHole/MountingHole_2.2mm_M2_ISO7380\",\"MountingHole/MountingHole_2.2mm_M2_ISO7380_Pad\",\"MountingHole/MountingHole_2.2mm_M2_ISO7380_Pad_TopBottom\",\"MountingHole/MountingHole_2.2mm_M2_ISO7380_Pad_TopOnly\",\"MountingHole/MountingHole_2.2mm_M2_Pad\",\"MountingHole/MountingHole_2.2mm_M2_Pad_TopBottom\",\"MountingHole/MountingHole_2.2mm_M2_Pad_TopOnly\",\"MountingHole/MountingHole_2.2mm_M2_Pad_Via\",\"MountingHole/MountingHole_2.5mm\",\"MountingHole/MountingHole_2.5mm_Pad\",\"MountingHole/MountingHole_2.5mm_Pad_TopBottom\",\"MountingHole/MountingHole_2.5mm_Pad_TopOnly\",\"MountingHole/MountingHole_2.5mm_Pad_Via\",\"MountingHole/MountingHole_2.7mm\",\"MountingHole/MountingHole_2.7mm_M2.5\",\"MountingHole/MountingHole_2.7mm_M2.5_DIN965\",\"MountingHole/MountingHole_2.7mm_M2.5_DIN965_Pad\",\"MountingHole/MountingHole_2.7mm_M2.5_DIN965_Pad_TopBottom\",\"MountingHole/MountingHole_2.7mm_M2.5_DIN965_Pad_TopOnly\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO14580\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO14580_Pad\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO14580_Pad_TopBottom\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO14580_Pad_TopOnly\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO7380\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO7380_Pad\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO7380_Pad_TopBottom\",\"MountingHole/MountingHole_2.7mm_M2.5_ISO7380_Pad_TopOnly\",\"MountingHole/MountingHole_2.7mm_M2.5_Pad\",\"MountingHole/MountingHole_2.7mm_M2.5_Pad_TopBottom\",\"MountingHole/MountingHole_2.7mm_M2.5_Pad_TopOnly\",\"MountingHole/MountingHole_2.7mm_M2.5_Pad_Via\",\"MountingHole/MountingHole_2.7mm_Pad\",\"MountingHole/MountingHole_2.7mm_Pad_TopBottom\",\"MountingHole/MountingHole_2.7mm_Pad_TopOnly\",\"MountingHole/MountingHole_2.7mm_Pad_Via\",\"MountingHole/MountingHole_2mm\",\"MountingHole/MountingHole_3.2mm_M3\",\"MountingHole/MountingHole_3.2mm_M3_DIN965\",\"MountingHole/MountingHole_3.2mm_M3_DIN965_Pad\",\"MountingHole/MountingHole_3.2mm_M3_DIN965_Pad_TopBottom\",\"MountingHole/MountingHole_3.2mm_M3_DIN965_Pad_TopOnly\",\"MountingHole/MountingHole_3.2mm_M3_ISO14580\",\"MountingHole/MountingHole_3.2mm_M3_ISO14580_Pad\",\"MountingHole/MountingHole_3.2mm_M3_ISO14580_Pad_TopBottom\",\"MountingHole/MountingHole_3.2mm_M3_ISO14580_Pad_TopOnly\",\"MountingHole/MountingHole_3.2mm_M3_ISO7380\",\"MountingHole/MountingHole_3.2mm_M3_ISO7380_Pad\",\"MountingHole/MountingHole_3.2mm_M3_ISO7380_Pad_TopBottom\",\"MountingHole/MountingHole_3.2mm_M3_ISO7380_Pad_TopOnly\",\"MountingHole/MountingHole_3.2mm_M3_Pad\",\"MountingHole/MountingHole_3.2mm_M3_Pad_TopBottom\",\"MountingHole/MountingHole_3.2mm_M3_Pad_TopOnly\",\"MountingHole/MountingHole_3.2mm_M3_Pad_Via\",\"MountingHole/MountingHole_3.5mm\",\"MountingHole/MountingHole_3.5mm_Pad\",\"MountingHole/MountingHole_3.5mm_Pad_TopBottom\",\"MountingHole/MountingHole_3.5mm_Pad_TopOnly\",\"MountingHole/MountingHole_3.5mm_Pad_Via\",\"MountingHole/MountingHole_3.7mm\",\"MountingHole/MountingHole_3.7mm_Pad\",\"MountingHole/MountingHole_3.7mm_Pad_TopBottom\",\"MountingHole/MountingHole_3.7mm_Pad_TopOnly\",\"MountingHole/MountingHole_3.7mm_Pad_Via\",\"MountingHole/MountingHole_3mm\",\"MountingHole/MountingHole_3mm_Pad\",\"MountingHole/MountingHole_3mm_Pad_TopBottom\",\"MountingHole/MountingHole_3mm_Pad_TopOnly\",\"MountingHole/MountingHole_3mm_Pad_Via\",\"MountingHole/MountingHole_4.3mm_M4\",\"MountingHole/MountingHole_4.3mm_M4_DIN965\",\"MountingHole/MountingHole_4.3mm_M4_DIN965_Pad\",\"MountingHole/MountingHole_4.3mm_M4_DIN965_Pad_TopBottom\",\"MountingHole/MountingHole_4.3mm_M4_DIN965_Pad_TopOnly\",\"MountingHole/MountingHole_4.3mm_M4_ISO14580\",\"MountingHole/MountingHole_4.3mm_M4_ISO14580_Pad\",\"MountingHole/MountingHole_4.3mm_M4_ISO14580_Pad_TopBottom\",\"MountingHole/MountingHole_4.3mm_M4_ISO14580_Pad_TopOnly\",\"MountingHole/MountingHole_4.3mm_M4_ISO7380\",\"MountingHole/MountingHole_4.3mm_M4_ISO7380_Pad\",\"MountingHole/MountingHole_4.3mm_M4_ISO7380_Pad_TopBottom\",\"MountingHole/MountingHole_4.3mm_M4_ISO7380_Pad_TopOnly\",\"MountingHole/MountingHole_4.3mm_M4_Pad\",\"MountingHole/MountingHole_4.3mm_M4_Pad_TopBottom\",\"MountingHole/MountingHole_4.3mm_M4_Pad_TopOnly\",\"MountingHole/MountingHole_4.3mm_M4_Pad_Via\",\"MountingHole/MountingHole_4.3x6.2mm_M4_Pad\",\"MountingHole/MountingHole_4.3x6.2mm_M4_Pad_Via\",\"MountingHole/MountingHole_4.5mm\",\"MountingHole/MountingHole_4.5mm_Pad\",\"MountingHole/MountingHole_4.5mm_Pad_TopBottom\",\"MountingHole/MountingHole_4.5mm_Pad_TopOnly\",\"MountingHole/MountingHole_4.5mm_Pad_Via\",\"MountingHole/MountingHole_4mm\",\"MountingHole/MountingHole_4mm_Pad\",\"MountingHole/MountingHole_4mm_Pad_TopBottom\",\"MountingHole/MountingHole_4mm_Pad_TopOnly\",\"MountingHole/MountingHole_4mm_Pad_Via\",\"MountingHole/MountingHole_5.3mm_M5\",\"MountingHole/MountingHole_5.3mm_M5_DIN965\",\"MountingHole/MountingHole_5.3mm_M5_DIN965_Pad\",\"MountingHole/MountingHole_5.3mm_M5_DIN965_Pad_TopBottom\",\"MountingHole/MountingHole_5.3mm_M5_DIN965_Pad_TopOnly\",\"MountingHole/MountingHole_5.3mm_M5_ISO14580\",\"MountingHole/MountingHole_5.3mm_M5_ISO14580_Pad\",\"MountingHole/MountingHole_5.3mm_M5_ISO14580_Pad_TopBottom\",\"MountingHole/MountingHole_5.3mm_M5_ISO14580_Pad_TopOnly\",\"MountingHole/MountingHole_5.3mm_M5_ISO7380\",\"MountingHole/MountingHole_5.3mm_M5_ISO7380_Pad\",\"MountingHole/MountingHole_5.3mm_M5_ISO7380_Pad_TopBottom\",\"MountingHole/MountingHole_5.3mm_M5_ISO7380_Pad_TopOnly\",\"MountingHole/MountingHole_5.3mm_M5_Pad\",\"MountingHole/MountingHole_5.3mm_M5_Pad_TopBottom\",\"MountingHole/MountingHole_5.3mm_M5_Pad_TopOnly\",\"MountingHole/MountingHole_5.3mm_M5_Pad_Via\",\"MountingHole/MountingHole_5.5mm\",\"MountingHole/MountingHole_5.5mm_Pad\",\"MountingHole/MountingHole_5.5mm_Pad_TopBottom\",\"MountingHole/MountingHole_5.5mm_Pad_TopOnly\",\"MountingHole/MountingHole_5.5mm_Pad_Via\",\"MountingHole/MountingHole_5mm\",\"MountingHole/MountingHole_5mm_Pad\",\"MountingHole/MountingHole_5mm_Pad_TopBottom\",\"MountingHole/MountingHole_5mm_Pad_TopOnly\",\"MountingHole/MountingHole_5mm_Pad_Via\",\"MountingHole/MountingHole_6.4mm_M6\",\"MountingHole/MountingHole_6.4mm_M6_DIN965\",\"MountingHole/MountingHole_6.4mm_M6_DIN965_Pad\",\"MountingHole/MountingHole_6.4mm_M6_DIN965_Pad_TopBottom\",\"MountingHole/MountingHole_6.4mm_M6_DIN965_Pad_TopOnly\",\"MountingHole/MountingHole_6.4mm_M6_ISO14580\",\"MountingHole/MountingHole_6.4mm_M6_ISO14580_Pad\",\"MountingHole/MountingHole_6.4mm_M6_ISO14580_Pad_TopBottom\",\"MountingHole/MountingHole_6.4mm_M6_ISO14580_Pad_TopOnly\",\"MountingHole/MountingHole_6.4mm_M6_ISO7380\",\"MountingHole/MountingHole_6.4mm_M6_ISO7380_Pad\",\"MountingHole/MountingHole_6.4mm_M6_ISO7380_Pad_TopBottom\",\"MountingHole/MountingHole_6.4mm_M6_ISO7380_Pad_TopOnly\",\"MountingHole/MountingHole_6.4mm_M6_Pad\",\"MountingHole/MountingHole_6.4mm_M6_Pad_TopBottom\",\"MountingHole/MountingHole_6.4mm_M6_Pad_TopOnly\",\"MountingHole/MountingHole_6.4mm_M6_Pad_Via\",\"MountingHole/MountingHole_6.5mm\",\"MountingHole/MountingHole_6.5mm_Pad\",\"MountingHole/MountingHole_6.5mm_Pad_TopBottom\",\"MountingHole/MountingHole_6.5mm_Pad_TopOnly\",\"MountingHole/MountingHole_6.5mm_Pad_Via\",\"MountingHole/MountingHole_6mm\",\"MountingHole/MountingHole_6mm_Pad\",\"MountingHole/MountingHole_6mm_Pad_TopBottom\",\"MountingHole/MountingHole_6mm_Pad_TopOnly\",\"MountingHole/MountingHole_6mm_Pad_Via\",\"MountingHole/MountingHole_8.4mm_M8\",\"MountingHole/MountingHole_8.4mm_M8_Pad\",\"MountingHole/MountingHole_8.4mm_M8_Pad_TopBottom\",\"MountingHole/MountingHole_8.4mm_M8_Pad_TopOnly\",\"MountingHole/MountingHole_8.4mm_M8_Pad_Via\",\"MountingHole/ToolingHole_1.152mm\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H10mm_9771100360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H11mm_9771110360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H12mm_9771120360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H13mm_9771130360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H14mm_9771140360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H15mm_9771150360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H5mm_9771050360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H6mm_9771060360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H7mm_9771070360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H8mm_9771080360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H9mm_9771090360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H0.5mm_9774005633\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H1.5mm_9774015633\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H1mm_9774010633\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2.5mm_9774025633\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2.5mm_ThreadDepth1.5mm_97730256332\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2.5mm_ThreadDepth1.5mm_NoNPTH_97730256330\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2mm_9774020633\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3.5mm_ThreadDepth2mm_97730356332\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3.5mm_ThreadDepth2mm_97730356334\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3.5mm_ThreadDepth2mm_NoNPTH_97730356330\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3mm_9774030633\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3mm_ThreadDepth1.8mm_97730306332\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3mm_ThreadDepth1.8mm_NoNPTH_97730306330\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4.5mm_ThreadDepth2mm_97730456332\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4.5mm_ThreadDepth2mm_97730456334\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4.5mm_ThreadDepth2mm_NoNPTH_97730456330\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4mm_ThreadDepth2mm_97730406332\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4mm_ThreadDepth2mm_97730406334\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4mm_ThreadDepth2mm_NoNPTH_97730406330\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H5mm_ThreadDepth2mm_97730506332\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H5mm_ThreadDepth2mm_97730506334\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H5mm_ThreadDepth2mm_NoNPTH_97730506330\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H6mm_ThreadDepth2mm_97730606332\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H6mm_ThreadDepth2mm_97730606334\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H6mm_ThreadDepth2mm_NoNPTH_97730606330\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H0.5mm_9774005151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H1.5mm_9774015151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H10mm_9774100151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H1mm_9774010151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H2.5mm_9774025151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H2.7mm_9774027151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H2mm_9774020151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H3.5mm_9774035151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H3mm_9774030151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H4.5mm_9774045151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H4mm_9774040151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H5.5mm_9774055151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H5mm_9774050151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H6.5mm_9774065151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H6mm_9774060151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H7.5mm_9774075151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H7mm_9774070151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H8.5mm_9774085151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H8mm_9774080151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H9.5mm_9774095151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H9mm_9774090151\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H0.5mm_9774005243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H1.5mm_9774015243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H1mm_9774010243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H2.5mm_9774025243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H2mm_9774020243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H3.5mm_9774035243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H3mm_9774030243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H4.5mm_9774045243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H4mm_9774040243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H5mm_9774050243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H6mm_9774060243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H7mm_9774070243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H8mm_9774080243\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H0.5mm_9774005360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H1.5mm_9774015360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H10mm_9774100360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H11mm_9774110360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H12mm_9774120360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H13mm_9774130360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H14mm_9774140360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H15mm_9774150360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H16mm_9774160360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H1mm_9774010360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H2.5mm_9774025360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H2mm_9774020360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H3mm_9774030360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H4mm_9774040360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H5mm_9774050360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H6mm_9774060360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H7mm_9774070360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H8mm_9774080360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H9mm_9774090360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H10mm_9774100482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H1mm_9774010482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H2mm_9774020482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H3mm_9774030482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H4mm_9774040482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H5mm_9774050482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H6mm_9774060482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H7mm_9774070482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H8mm_9774080482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H9mm_9774090482\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H10.6mm_ReverseMount_9775106960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H11.6mm_ReverseMount_9775116960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H2.6mm_ReverseMount_9775026960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H3.1mm_ReverseMount_9775031960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H3.6mm_ReverseMount_9775036960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H4.1mm_ReverseMount_9775041960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H4.6mm_ReverseMount_9775046960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H5.1mm_ReverseMount_9775051960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H5.6mm_ReverseMount_9775056960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H6.6mm_ReverseMount_9775066960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H7.6mm_ReverseMount_9775076960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H8.6mm_ReverseMount_9775086960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H9.6mm_ReverseMount_9775096960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H10.6mm_ReverseMount_9775106360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H11.6mm_ReverseMount_9775116360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H2.6mm_ReverseMount_9775026360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H3.1mm_ReverseMount_9775031360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H3.6mm_ReverseMount_9775036360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H4.1mm_ReverseMount_9775041360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H4.6mm_ReverseMount_9775046360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H5.1mm_ReverseMount_9775051360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H5.6mm_ReverseMount_9775056360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H6.6mm_ReverseMount_9775066360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H7.6mm_ReverseMount_9775076360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H8.6mm_ReverseMount_9775086360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H9.6mm_ReverseMount_9775096360\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H10mm_SnapRivet_9776100960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H2.5mm_SnapRivet_9776025960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H2mm_SnapRivet_9776020960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H3mm_SnapRivet_9776030960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H4mm_SnapRivet_9776040960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H5mm_SnapRivet_9776050960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H6mm_SnapRivet_9776060960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H7mm_SnapRivet_9776070960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H8mm_SnapRivet_9776080960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H9mm_SnapRivet_9776090960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H1.5mm_9774015943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H1mm_9774010943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H2.5mm_9774025943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H2mm_9774020943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H3.5mm_9774035943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H3mm_9774030943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H4.5mm_9774045943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H4mm_9774040943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H5mm_9774050943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H6mm_9774060943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H7mm_9774070943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H8mm_9774080943\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H1.5mm_9774015951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H10mm_9774100951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H1mm_9774010951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H2.5mm_9774025951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H2mm_9774020951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H3mm_9774030951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H4mm_9774040951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H5.5mm_9774055951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H5mm_9774050951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H6.5mm_9774065951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H6mm_9774060951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H7mm_9774070951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H8mm_9774080951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H9mm_9774090951\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H1.5mm_9774015960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H10mm_9774100960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H11mm_9774110960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H12mm_9774120960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H13mm_9774130960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H14mm_9774140960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H15mm_9774150960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H16mm_9774160960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H1mm_9774010960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H2.5mm_9774025960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H2mm_9774020960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H3mm_9774030960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H4mm_9774040960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H5mm_9774050960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H6mm_9774060960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H7mm_9774070960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H8mm_9774080960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H9mm_9774090960\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H10mm_9774100982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H1mm_9774010982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H2mm_9774020982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H3mm_9774030982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H4mm_9774040982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H5mm_9774050982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H6mm_9774060982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H7mm_9774070982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H8mm_9774080982\",\"Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H9mm_9774090982\",\"Mounting_Wuerth/Mounting_Wuerth_WP-SMRA-D3.3mm_L7mm_7466300_Horizontal\",\"Mounting_Wuerth/Mounting_Wuerth_WP-SMRA-M3_L7mm_7466303_Horizontal\",\"NetTie/NetTie-2_SMD_Pad0.5mm\",\"NetTie/NetTie-2_SMD_Pad2.0mm\",\"NetTie/NetTie-2_THT_Pad0.3mm\",\"NetTie/NetTie-2_THT_Pad1.0mm\",\"NetTie/NetTie-3_SMD_Pad0.5mm\",\"NetTie/NetTie-3_SMD_Pad2.0mm\",\"NetTie/NetTie-3_THT_Pad0.3mm\",\"NetTie/NetTie-3_THT_Pad1.0mm\",\"NetTie/NetTie-4_SMD_Pad0.5mm\",\"NetTie/NetTie-4_SMD_Pad2.0mm\",\"NetTie/NetTie-4_THT_Pad0.3mm\",\"NetTie/NetTie-4_THT_Pad1.0mm\",\"OptoDevice/ADNS-9800\",\"OptoDevice/AGILENT_HFBR-152x\",\"OptoDevice/AGILENT_HFBR-252x\",\"OptoDevice/AMS_TSL2550_SMD\",\"OptoDevice/AMS_TSL25911FN\",\"OptoDevice/Broadcom_AFBR-16xxZ_Horizontal\",\"OptoDevice/Broadcom_AFBR-16xxZ_Tilted\",\"OptoDevice/Broadcom_AFBR-16xxZ_Vertical\",\"OptoDevice/Broadcom_APDS-9160-003\",\"OptoDevice/Broadcom_APDS-9301\",\"OptoDevice/Broadcom_DFN-6_2x2mm_P0.65mm\",\"OptoDevice/Broadcom_LGA-8_2x2mm_P0.53mm\",\"OptoDevice/Broadcom_LGA-8_2x2mm_P0.5mm\",\"OptoDevice/Everlight_IRM-H6xxT\",\"OptoDevice/Everlight_ITR1201SR10AR\",\"OptoDevice/Everlight_ITR8307\",\"OptoDevice/Everlight_ITR8307F43\",\"OptoDevice/Everlight_ITR8307_Reverse\",\"OptoDevice/Everlight_ITR9608-F\",\"OptoDevice/Finder_34.81\",\"OptoDevice/Hamamatsu_C12880\",\"OptoDevice/Hamamatsu_S13360-30CS\",\"OptoDevice/Hamamatsu_S14160-6050HS\",\"OptoDevice/Kingbright_KPS-3227\",\"OptoDevice/Kingbright_KPS-5130\",\"OptoDevice/Kingbright_KRC011_Horizontal\",\"OptoDevice/Kingbright_KRC011_Vertical\",\"OptoDevice/Kodenshi_LG206D\",\"OptoDevice/Kodenshi_LG206L\",\"OptoDevice/Kodenshi_SG105\",\"OptoDevice/Kodenshi_SG105F\",\"OptoDevice/Kodenshi_SG105_Reverse\",\"OptoDevice/LaserDiode_TO18-D5.6-3\",\"OptoDevice/LaserDiode_TO3.3-D3.3-3\",\"OptoDevice/LaserDiode_TO38ICut-3\",\"OptoDevice/LaserDiode_TO5-D9-3\",\"OptoDevice/LaserDiode_TO56-3\",\"OptoDevice/Lightpipe_Bivar_RLP1-400-650\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-100-F\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-100-R\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-150-F\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-150-R\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-200-R\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-250-F\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-250-R\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-300-F\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-300-R\",\"OptoDevice/Lightpipe_Bivar_SLP3-150-450-R\",\"OptoDevice/Lightpipe_Dialight_515-1064F\",\"OptoDevice/Lightpipe_LPF-C012303S\",\"OptoDevice/Lightpipe_LPF-C013301S\",\"OptoDevice/Lightpipe_Mentor_1275.x00x\",\"OptoDevice/Lightpipe_Mentor_1276.1004\",\"OptoDevice/Lightpipe_Mentor_1276.2004\",\"OptoDevice/Lite-On_LTR-303ALS-01\",\"OptoDevice/Luna_NSL-32\",\"OptoDevice/Maxim_OLGA-14_3.3x5.6mm_P0.8mm\",\"OptoDevice/ONSemi_QSE15x\",\"OptoDevice/OnSemi_CASE100AQ\",\"OptoDevice/OnSemi_CASE100CY\",\"OptoDevice/Osram_BP104-SMD\",\"OptoDevice/Osram_BPW34S-SMD\",\"OptoDevice/Osram_BPW82\",\"OptoDevice/Osram_DIL2_4.3x4.65mm_P5.08mm\",\"OptoDevice/Osram_LPT80A\",\"OptoDevice/Osram_SFH205\",\"OptoDevice/Osram_SFH2201\",\"OptoDevice/Osram_SFH225\",\"OptoDevice/Osram_SFH2430\",\"OptoDevice/Osram_SFH2440\",\"OptoDevice/Osram_SFH3710\",\"OptoDevice/Osram_SFH9x0x\",\"OptoDevice/Osram_SMD-SmartDIL\",\"OptoDevice/Panasonic_APV-AQY_SSOP-4_4.45x2.65mm_P1.27mm\",\"OptoDevice/PerkinElmer_VTL5C\",\"OptoDevice/PerkinElmer_VTL5Cx2\",\"OptoDevice/R_LDR_10x8.5mm_P7.6mm_Vertical\",\"OptoDevice/R_LDR_11x9.4mm_P8.2mm_Vertical\",\"OptoDevice/R_LDR_12x10.8mm_P9.0mm_Vertical\",\"OptoDevice/R_LDR_4.9x4.2mm_P2.54mm_Vertical\",\"OptoDevice/R_LDR_5.0x4.1mm_P3mm_Vertical\",\"OptoDevice/R_LDR_5.1x4.3mm_P3.4mm_Vertical\",\"OptoDevice/R_LDR_5.2x5.2mm_P3.5mm_Horizontal\",\"OptoDevice/R_LDR_7x6mm_P5.1mm_Vertical\",\"OptoDevice/R_LDR_D13.8mm_P9.0mm_Vertical\",\"OptoDevice/R_LDR_D20mm_P17.5mm_Vertical\",\"OptoDevice/R_LDR_D6.4mm_P3.4mm_Vertical\",\"OptoDevice/Renesas_DFN-6_1.5x1.6mm_P0.5mm\",\"OptoDevice/Rohm_RPR-0720\",\"OptoDevice/ST_VL53L0X\",\"OptoDevice/Sharp_GP2S700HCP\",\"OptoDevice/Sharp_GP2Y0A41SK0F\",\"OptoDevice/Sharp_IS471F\",\"OptoDevice/Sharp_IS485\",\"OptoDevice/Siemens_SFH900\",\"OptoDevice/Toshiba_TORX170_TORX173_TORX193_TORX194\",\"OptoDevice/Toshiba_TOTX170_TOTX173_TOTX193_TOTX194\",\"OptoDevice/Vishay_CAST-3Pin\",\"OptoDevice/Vishay_CNY70\",\"OptoDevice/Vishay_MINICAST-3Pin\",\"OptoDevice/Vishay_MINIMOLD-3Pin\",\"OptoDevice/Vishay_MOLD-3Pin\",\"OptoDevice/Vishay_TCRT5000\",\"Oscillator/Oscillator_DIP-14\",\"Oscillator/Oscillator_DIP-14_LargePads\",\"Oscillator/Oscillator_DIP-8\",\"Oscillator/Oscillator_DIP-8_LargePads\",\"Oscillator/Oscillator_OCXO_Morion_MV267\",\"Oscillator/Oscillator_OCXO_Morion_MV317\",\"Oscillator/Oscillator_SMD_Abracon_ABLNO\",\"Oscillator/Oscillator_SMD_Abracon_ASCO-4Pin_1.6x1.2mm\",\"Oscillator/Oscillator_SMD_Abracon_ASDMB-4Pin_2.5x2.0mm\",\"Oscillator/Oscillator_SMD_Abracon_ASE-4Pin_3.2x2.5mm\",\"Oscillator/Oscillator_SMD_Abracon_ASE-4Pin_3.2x2.5mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Abracon_ASV-4Pin_7.0x5.1mm\",\"Oscillator/Oscillator_SMD_Abracon_ASV-4Pin_7.0x5.1mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Diodes_FN-4Pin_7.0x5.0mm\",\"Oscillator/Oscillator_SMD_ECS_2520MV-xxx-xx-4Pin_2.5x2.0mm\",\"Oscillator/Oscillator_SMD_EuroQuartz_XO32-4Pin_3.2x2.5mm\",\"Oscillator/Oscillator_SMD_EuroQuartz_XO32-4Pin_3.2x2.5mm_RotB\",\"Oscillator/Oscillator_SMD_EuroQuartz_XO32-4Pin_3.2x2.5mm_RotB_HandSoldering\",\"Oscillator/Oscillator_SMD_EuroQuartz_XO53-4Pin_5.0x3.2mm\",\"Oscillator/Oscillator_SMD_EuroQuartz_XO53-4Pin_5.0x3.2mm_HandSoldering\",\"Oscillator/Oscillator_SMD_EuroQuartz_XO91-4Pin_7.0x5.0mm\",\"Oscillator/Oscillator_SMD_EuroQuartz_XO91-4Pin_7.0x5.0mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS1-6Pin_14.8x9.1mm\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS11-4Pin_7.0x5.0mm\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS11-4Pin_7.0x5.0mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS15-4Pin_5.0x3.2mm\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS15-4Pin_5.0x3.2mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS2-4Pin_7.3x5.1mm\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS2-4Pin_7.3x5.1mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS3-4Pin_9.1x7.2mm\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS3-4Pin_9.1x7.2mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS7-4Pin_19.9x12.9mm\",\"Oscillator/Oscillator_SMD_Fordahl_DFAS7-4Pin_19.9x12.9mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Fox_FT5H_5.0x3.2mm\",\"Oscillator/Oscillator_SMD_IDT_JS6-6_5.0x3.2mm_P1.27mm\",\"Oscillator/Oscillator_SMD_IDT_JU6-6_7.0x5.0mm_P2.54mm\",\"Oscillator/Oscillator_SMD_IQD_IQXO70-4Pin_7.5x5.0mm\",\"Oscillator/Oscillator_SMD_IQD_IQXO70-4Pin_7.5x5.0mm_HandSoldering\",\"Oscillator/Oscillator_SMD_Kyocera_2520-6Pin_2.5x2.0mm\",\"Oscillator/Oscillator_SMD_Kyocera_KC2520Z-4Pin_2.5x2.0mm\",\"Oscillator/Oscillator_SMD_OCXO_ConnorWinfield_OH300\",\"Oscillator/Oscillator_SMD_SI570_SI571_HandSoldering\",\"Oscillator/Oscillator_SMD_SI570_SI571_Standard\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG210-4Pin_2.5x2.0mm\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG210-4Pin_2.5x2.0mm_HandSoldering\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG3030CM\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002CA-4Pin_7.0x5.0mm\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002CA-4Pin_7.0x5.0mm_HandSoldering\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002CE-4Pin_3.2x2.5mm\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002CE-4Pin_3.2x2.5mm_HandSoldering\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002JA-4Pin_14.0x8.7mm\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002JA-4Pin_14.0x8.7mm_HandSoldering\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002JC-4Pin_10.5x5.0mm\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002JC-4Pin_10.5x5.0mm_HandSoldering\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002LB-4Pin_5.0x3.2mm\",\"Oscillator/Oscillator_SMD_SeikoEpson_SG8002LB-4Pin_5.0x3.2mm_HandSoldering\",\"Oscillator/Oscillator_SMD_SeikoEpson_TG2520SMN-xxx-xxxxxx-4Pin_2.5x2.0mm\",\"Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_2.0x1.6mm\",\"Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_2.5x2.0mm\",\"Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_3.2x2.5mm\",\"Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_5.0x3.2mm\",\"Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_7.0x5.0mm\",\"Oscillator/Oscillator_SMD_SiTime_PQFD-6L_3.2x2.5mm\",\"Oscillator/Oscillator_SMD_SiTime_SiT9121-6Pin_3.2x2.5mm\",\"Oscillator/Oscillator_SMD_Silicon_Labs_LGA-6_2.5x3.2mm_P1.25mm\",\"Oscillator/Oscillator_SMD_TCXO_G158\",\"Oscillator/Oscillator_SMD_TXC_7C-4Pin_5.0x3.2mm\",\"Oscillator/Oscillator_SMD_TXC_7C-4Pin_5.0x3.2mm_HandSoldering\",\"Oscillator/Oscillator_SeikoEpson_SG-8002DB\",\"Oscillator/Oscillator_SeikoEpson_SG-8002DC\",\"Package_BGA/Alliance_TFBGA-36_6x8mm_Layout6x8_P0.75mm\",\"Package_BGA/Alliance_TFBGA-54_8x8mm_Layout9x9_P0.8mm\",\"Package_BGA/Analog_BGA-165_11.9x16mm_Layout11x15_P1.0mm\",\"Package_BGA/Analog_BGA-209_9.5x16mm_Layout11x19_P0.8mm\",\"Package_BGA/Analog_BGA-28_4x6.25mm_Layout4x7_P0.8mm\",\"Package_BGA/Analog_BGA-49_6.25x6.25mm_Layout7x7_P0.8mm\",\"Package_BGA/Analog_BGA-77_9x15mm_Layout7x11_P1.27mm\",\"Package_BGA/BGA-100_11.0x11.0mm_Layout10x10_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD\",\"Package_BGA/BGA-100_12x18mm_Layout10x17_P1mm\",\"Package_BGA/BGA-100_14x18mm_Layout10x17_P1mm\",\"Package_BGA/BGA-100_6.0x6.0mm_Layout11x11_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD\",\"Package_BGA/BGA-1023_33.0x33.0mm_Layout32x32_P1.0mm\",\"Package_BGA/BGA-1156_35.0x35.0mm_Layout34x34_P1.0mm\",\"Package_BGA/BGA-121_9.0x9.0mm_Layout11x11_P0.8mm_Ball0.4mm_Pad0.35mm_NSMD\",\"Package_BGA/BGA-1295_37.5x37.5mm_Layout36x36_P1.0mm\",\"Package_BGA/BGA-132_12x18mm_Layout11x17_P1.0mm\",\"Package_BGA/BGA-132_12x18mm_Layout11x17_P1mm\",\"Package_BGA/BGA-144_13.0x13.0mm_Layout12x12_P1.0mm\",\"Package_BGA/BGA-144_7.0x7.0mm_Layout13x13_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD\",\"Package_BGA/BGA-152_14x18mm_Layout13x17_P0.5mm\",\"Package_BGA/BGA-152_14x18mm_Layout13x17_P1mm\",\"Package_BGA/BGA-153_8.0x8.0mm_Layout15x15_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD\",\"Package_BGA/BGA-169_11.0x11.0mm_Layout13x13_P0.8mm_Ball0.5mm_Pad0.4mm_NSMD\",\"Package_BGA/BGA-16_1.92x1.92mm_Layout4x4_P0.5mm\",\"Package_BGA/BGA-196_15x15mm_Layout14x14_P1.0mm\",\"Package_BGA/BGA-200_10x14.5mm_Layout12x22_P0.8x0.65mm\",\"Package_BGA/BGA-24_6x8mm_Layout5x5_P1.0mm\",\"Package_BGA/BGA-24_8x8mm_Layout5x5_P1.0mm\",\"Package_BGA/BGA-256_11.0x11.0mm_Layout20x20_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD\",\"Package_BGA/BGA-256_14.0x14.0mm_Layout16x16_P0.8mm_Ball0.45mm_Pad0.32mm_NSMD\",\"Package_BGA/BGA-256_17.0x17.0mm_Layout16x16_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD\",\"Package_BGA/BGA-25_6.35x6.35mm_Layout5x5_P1.27mm\",\"Package_BGA/BGA-324_15.0x15.0mm_Layout18x18_P0.8mm_Ball0.5mm_Pad0.4mm_NSMD\",\"Package_BGA/BGA-324_15x15mm_Layout18x18_P0.8mm\",\"Package_BGA/BGA-324_19.0x19.0mm_Layout18x18_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD\",\"Package_BGA/BGA-352_35.0x35.0mm_Layout26x26_P1.27mm\",\"Package_BGA/BGA-36_3.396x3.466mm_Layout6x6_P0.4mm_Ball0.25mm_Pad0.2mm_NSMD\",\"Package_BGA/BGA-400_21.0x21.0mm_Layout20x20_P1.0mm\",\"Package_BGA/BGA-484_23.0x23.0mm_Layout22x22_P1.0mm\",\"Package_BGA/BGA-48_8.0x9.0mm_Layout6x8_P0.8mm\",\"Package_BGA/BGA-529_19x19mm_Layout23x23_P0.8mm\",\"Package_BGA/BGA-624_21x21mm_Layout25x25_P0.8mm\",\"Package_BGA/BGA-625_21.0x21.0mm_Layout25x25_P0.8mm\",\"Package_BGA/BGA-63_9x11mm_Layout10x12_P0.8mm\",\"Package_BGA/BGA-64_9.0x9.0mm_Layout10x10_P0.8mm\",\"Package_BGA/BGA-672_27.0x27.0mm_Layout26x26_P1.0mm_Ball0.6mm_Pad0.5mm_NSMD\",\"Package_BGA/BGA-676_27.0x27.0mm_Layout26x26_P1.0mm_Ball0.6mm_Pad0.5mm_NSMD\",\"Package_BGA/BGA-68_5.0x5.0mm_Layout9x9_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD\",\"Package_BGA/BGA-81_4.496x4.377mm_Layout9x9_P0.4mm_Ball0.25mm_Pad0.2mm_NSMD\",\"Package_BGA/BGA-90_8.0x13.0mm_Layout2x3x15_P0.8mm\",\"Package_BGA/BGA-96_9.0x13.0mm_Layout2x3x16_P0.8mm\",\"Package_BGA/BGA-9_1.6x1.6mm_Layout3x3_P0.5mm\",\"Package_BGA/EPC_BGA-4_0.9x0.9mm_Layout2x2_P0.45mm\",\"Package_BGA/FB-BGA-484_23.0x23.0mm_Layout22x22_P1.0mm\",\"Package_BGA/FBGA-78_7.5x10.5mm_Layout9x13_P0.8mm\",\"Package_BGA/FBGA-78_7.5x10.6mm_Layout9x13_P0.8mm\",\"Package_BGA/FBGA-78_7.5x11mm_Layout2x3x13_P0.8mm\",\"Package_BGA/FBGA-78_8x10.5mm_Layout9x13_P0.8mm\",\"Package_BGA/FBGA-78_9x10.5mm_Layout9x13_P0.8mm\",\"Package_BGA/FBGA-78_9x10.6mm_Layout9x13_P0.8mm\",\"Package_BGA/FBGA-96_7.5x13.5mm_Layout9x16_P0.8mm\",\"Package_BGA/FBGA-96_7.5x13mm_Layout9x16_P0.8mm\",\"Package_BGA/FBGA-96_8x13mm_Layout9x16_P0.8mm\",\"Package_BGA/FBGA-96_8x14mm_Layout9x16_P0.8mm\",\"Package_BGA/FBGA-96_9x13mm_Layout9x16_P0.8mm\",\"Package_BGA/FBGA-96_9x14mm_Layout9x16_P0.8mm\",\"Package_BGA/FCPBGA-780_23x23mm_Layout28x28_P0.8mm\",\"Package_BGA/Fujitsu_WLP-15_2.28x3.092mm_Layout3x5_P0.4mm\",\"Package_BGA/Infineon_LFBGA-292_17x17mm_Layout20x20_P0.8mm\",\"Package_BGA/Infineon_TFBGA-48_6x10mm_Layout6x8_P0.75mm\",\"Package_BGA/LFBGA-100_10x10mm_Layout10x10_P0.8mm\",\"Package_BGA/LFBGA-144_10x10mm_Layout12x12_P0.8mm\",\"Package_BGA/LFBGA-153_11.5x13mm_Layout14x14_P0.5mm\",\"Package_BGA/LFBGA-169_12x16mm_Layout14x28_P0.5mm\",\"Package_BGA/LFBGA-169_12x18mm_Layout14x28_P0.5mm\",\"Package_BGA/LFBGA-169_14x18mm_Layout14x28_P0.5mm\",\"Package_BGA/LFBGA-289_14x14mm_Layout17x17_P0.8mm\",\"Package_BGA/LFBGA-400_16x16mm_Layout20x20_P0.8mm\",\"Package_BGA/LFBGA-484_18x18mm_Layout22x22_P0.8mm\",\"Package_BGA/Lattice_caBGA-381_17x17mm_Layout20x20_P0.8mm\",\"Package_BGA/Lattice_caBGA-381_17x17mm_Layout20x20_P0.8mm_SMD\",\"Package_BGA/Lattice_caBGA-756_27x27mm_Layout32x32_P0.8mm\",\"Package_BGA/Lattice_iCE40_csBGA-132_8x8mm_Layout14x14_P0.5mm\",\"Package_BGA/Linear_BGA-133_15.0x15.0mm_Layout12x12_P1.27mm\",\"Package_BGA/MAPBGA-272_9x9mm_Layout17x17_P0.5mm\",\"Package_BGA/MAPBGA-289_14x14mm_Layout17x17_P0.8mm\",\"Package_BGA/Maxim_WLP-12\",\"Package_BGA/Maxim_WLP-12_2.008x1.608mm_Layout4x3_P0.4mm\",\"Package_BGA/Maxim_WLP-9_1.595x1.415_Layout3x3_P0.4mm_Ball0.27mm_Pad0.25mm_NSMD\",\"Package_BGA/Microchip_FCG1152_BGA-1152_35x35mm_Layout34x34_P1.0mm\",\"Package_BGA/Microchip_FCSG325_BGA-325_11x11mm_Layout21x21_P0.5mm\",\"Package_BGA/Microchip_FCSG536_BGA-536_16x16mm_Layout30x30_P0.5mm\",\"Package_BGA/Microchip_FCVG484_BGA-484_19x19mm_Layout22x22_P0.8mm\",\"Package_BGA/Microchip_FCVG784_BGA-784_23x23mm_Layout28x28_P0.8mm\",\"Package_BGA/Microchip_TFBGA-196_11x11mm_Layout14x14_P0.75mm_SMD\",\"Package_BGA/Micron_FBGA-78_7.5x10.6mm_Layout9x13_P0.8mm\",\"Package_BGA/Micron_FBGA-78_8x10.5mm_Layout9x13_P0.8mm\",\"Package_BGA/Micron_FBGA-78_9x10.5mm_Layout9x13_P0.8mm\",\"Package_BGA/Micron_FBGA-96_7.5x13.5mm_Layout9x16_P0.8mm\",\"Package_BGA/Micron_FBGA-96_8x14mm_Layout9x16_P0.8mm\",\"Package_BGA/Micron_FBGA-96_9x14mm_Layout9x16_P0.8mm\",\"Package_BGA/NXP_SOT1982-1_VFBGA-98_7x7mm_Layout13x13_P0.5mm\",\"Package_BGA/NXP_SOT2162-1_VFBGA-59_4x4mm_Layout9x9_P0.4mm\",\"Package_BGA/NXP_TFBGA-50_5x5mm_Layout9x9_P0.5mm\",\"Package_BGA/NXP_VFBGA-42_2.6x3mm_Layout6x7_P0.4mm\",\"Package_BGA/ST_LFBGA-354_16x16mm_Layout19x19_P0.8mm\",\"Package_BGA/ST_LFBGA-448_18x18mm_Layout22x22_P0.8mm\",\"Package_BGA/ST_TFBGA-169_7x7mm_Layout13x13_P0.5mm\",\"Package_BGA/ST_TFBGA-225_13x13mm_Layout15x15_P0.8mm\",\"Package_BGA/ST_TFBGA-257_10x10mm_Layout19x19_P0.5mmP0.65mm\",\"Package_BGA/ST_TFBGA-320_11x11mm_Layout21x21_P0.5mm\",\"Package_BGA/ST_TFBGA-361_12x12mm_Layout23x23_P0.5mmP0.65mm\",\"Package_BGA/ST_TFBGA-436_18x18mm_Layout22x22_P0.8mm\",\"Package_BGA/ST_UFBGA-121_6x6mm_Layout11x11_P0.5mm\",\"Package_BGA/ST_UFBGA-129_7x7mm_Layout13x13_P0.5mm\",\"Package_BGA/ST_UFBGA-59_5x5mm_Layout8x8_P0.5mm\",\"Package_BGA/ST_UFBGA-73_5x5mm_Layout9x9_P0.5mm\",\"Package_BGA/ST_UFBGA-81_5x5mm_Layout9x9_P0.5mm\",\"Package_BGA/ST_VFBGA-361_10x10mm_Layout19x19_P0.5mm\",\"Package_BGA/ST_VFBGA-424_14x14mm_Layout27x27_P0.5mmP0.5x0.5mm_Stagger\",\"Package_BGA/ST_uTFBGA-36_3.6x3.6mm_Layout6x6_P0.5mm\",\"Package_BGA/TFBGA-100_5.5x5.5mm_Layout10x10_P0.5mm\",\"Package_BGA/TFBGA-100_8x8mm_Layout10x10_P0.8mm\",\"Package_BGA/TFBGA-100_9.0x9.0mm_Layout10x10_P0.8mm\",\"Package_BGA/TFBGA-121_10x10mm_Layout11x11_P0.8mm\",\"Package_BGA/TFBGA-169_9x9mm_Layout13x13_P0.65mm\",\"Package_BGA/TFBGA-216_13x13mm_Layout15x15_P0.8mm\",\"Package_BGA/TFBGA-225_10x10mm_Layout15x15_P0.65mm\",\"Package_BGA/TFBGA-256_13x13mm_Layout16x16_P0.8mm\",\"Package_BGA/TFBGA-265_14x14mm_Layout17x17_P0.8mm\",\"Package_BGA/TFBGA-289_9x9mm_Layout17x17_P0.5mm\",\"Package_BGA/TFBGA-324_12x12mm_Layout18x18_P0.65mm\",\"Package_BGA/TFBGA-361_13x13mm_Layout19x19_P0.65mm\",\"Package_BGA/TFBGA-48_6x10mm_Layout6x8_P0.75mm\",\"Package_BGA/TFBGA-49_3x3mm_Layout7x7_P0.4mm\",\"Package_BGA/TFBGA-576_16x16mm_Layout24x24_P0.65mm\",\"Package_BGA/TFBGA-644_19x19mm_Layout28x28_P0.65mm\",\"Package_BGA/TFBGA-64_5x5mm_Layout8x8_P0.5mm\",\"Package_BGA/TFBGA-81_5x5mm_Layout9x9_P0.5mm\",\"Package_BGA/Texas_BGA-289_15x15mm_Layout17x17_P0.8mm\",\"Package_BGA/Texas_DSBGA-10_1.36x1.86mm_Layout3x4_P0.5mm\",\"Package_BGA/Texas_DSBGA-12_1.36x1.86mm_Layout3x4_P0.5mm\",\"Package_BGA/Texas_DSBGA-12_2.11x1.61mm_Layout4x3_P0.5mm\",\"Package_BGA/Texas_DSBGA-16_2.39x2.39mm_Layout4x4_P0.5mm\",\"Package_BGA/Texas_DSBGA-28_1.9x3mm_Layout4x7_P0.4mm\",\"Package_BGA/Texas_DSBGA-49_3.33x3.488mm_Layout7x7_P0.4mm\",\"Package_BGA/Texas_DSBGA-5_0.822x1.116mm_Layout2x1x2_P0.4mm\",\"Package_BGA/Texas_DSBGA-5_0.8875x1.3875mm_Layout2x3_P0.5mm\",\"Package_BGA/Texas_DSBGA-5_1.5855x1.6365mm_Layout3x2_P0.5mm\",\"Package_BGA/Texas_DSBGA-64_3.415x3.535mm_Layout8x8_P0.4mm\",\"Package_BGA/Texas_DSBGA-6_0.704x1.054mm_Layout2x3_P0.35mm\",\"Package_BGA/Texas_DSBGA-6_0.757x1.01mm_Layout2x3_P0.35mm\",\"Package_BGA/Texas_DSBGA-6_0.76x1.16mm_Layout2x3_P0.4mm\",\"Package_BGA/Texas_DSBGA-6_0.855x1.255mm_Layout2x3_P0.4mm_LevelB\",\"Package_BGA/Texas_DSBGA-6_0.855x1.255mm_Layout2x3_P0.4mm_LevelC\",\"Package_BGA/Texas_DSBGA-6_0.95x1.488mm_Layout2x3_P0.4mm\",\"Package_BGA/Texas_DSBGA-6_0.9x1.4mm_Layout2x3_P0.5mm\",\"Package_BGA/Texas_DSBGA-8_0.705x1.468mm_Layout2x4_P0.4mm\",\"Package_BGA/Texas_DSBGA-8_0.9x1.9mm_Layout2x4_P0.5mm\",\"Package_BGA/Texas_DSBGA-8_1.43x1.41mm_Layout3x3_P0.5mm\",\"Package_BGA/Texas_DSBGA-8_1.5195x1.5195mm_Layout3x3_P0.5mm\",\"Package_BGA/Texas_DSBGA-9_1.4715x1.4715mm_Layout3x3_P0.5mm\",\"Package_BGA/Texas_DSBGA-9_1.62x1.58mm_Layout3x3_P0.5mm\",\"Package_BGA/Texas_MicroStar_Junior_BGA-113_7x7mm_Layout12x12_P0.5mm\",\"Package_BGA/Texas_MicroStar_Junior_BGA-12_2.0x2.5mm_Layout4x3_P0.5mm\",\"Package_BGA/Texas_MicroStar_Junior_BGA-80_5.0x5.0mm_Layout9x9_P0.5mm\",\"Package_BGA/Texas_PicoStar_BGA-4_0.758x0.758mm_Layout2x2_P0.4mm\",\"Package_BGA/Texas_YFP0020_DSBGA-20_1.588x1.988mm_Layout4x5_P0.4mm\",\"Package_BGA/UCBGA-36_2.5x2.5mm_Layout6x6_P0.4mm\",\"Package_BGA/UCBGA-49_3x3mm_Layout7x7_P0.4mm\",\"Package_BGA/UCBGA-81_4x4mm_Layout9x9_P0.4mm\",\"Package_BGA/UFBGA-100_7x7mm_Layout12x12_P0.5mm\",\"Package_BGA/UFBGA-132_7x7mm_Layout12x12_P0.5mm\",\"Package_BGA/UFBGA-132_7x7mm_P0.5mm\",\"Package_BGA/UFBGA-144_10x10mm_Layout12x12_P0.8mm\",\"Package_BGA/UFBGA-144_7x7mm_Layout12x12_P0.5mm\",\"Package_BGA/UFBGA-15_3.0x3.0mm_Layout4x4_P0.65mm\",\"Package_BGA/UFBGA-169_7x7mm_Layout13x13_P0.5mm\",\"Package_BGA/UFBGA-201_10x10mm_Layout15x15_P0.65mm\",\"Package_BGA/UFBGA-32_4.0x4.0mm_Layout6x6_P0.5mm\",\"Package_BGA/UFBGA-64_5x5mm_Layout8x8_P0.5mm\",\"Package_BGA/VFBGA-100_7.0x7.0mm_Layout10x10_P0.65mm\",\"Package_BGA/VFBGA-49_5.0x5.0mm_Layout7x7_P0.65mm\",\"Package_BGA/VFBGA-86_6x6mm_Layout10x10_P0.55mm\",\"Package_BGA/WLP-4_0.728x0.728mm_Layout2x2_P0.35mm\",\"Package_BGA/WLP-4_0.83x0.83mm_P0.4mm\",\"Package_BGA/WLP-4_0.86x0.86mm_P0.4mm\",\"Package_BGA/WLP-9_1.468x1.448mm_Layout3x3_P0.4mm\",\"Package_BGA/XBGA-121_10x10mm_Layout11x11_P0.8mm\",\"Package_BGA/XFBGA-121_8x8mm_Layout11x11_P0.65mm\",\"Package_BGA/XFBGA-36_3.5x3.5mm_Layout6x6_P0.5mm\",\"Package_BGA/XFBGA-64_5.0x5.0mm_Layout8x8_P0.5mm\",\"Package_BGA/Xilinx_CLG225\",\"Package_BGA/Xilinx_CLG400\",\"Package_BGA/Xilinx_CLG484_CLG485\",\"Package_BGA/Xilinx_CPG236\",\"Package_BGA/Xilinx_CPG238\",\"Package_BGA/Xilinx_CPGA196\",\"Package_BGA/Xilinx_CSG324\",\"Package_BGA/Xilinx_CSG325\",\"Package_BGA/Xilinx_CSGA225\",\"Package_BGA/Xilinx_CSGA324\",\"Package_BGA/Xilinx_FBG484\",\"Package_BGA/Xilinx_FBG676\",\"Package_BGA/Xilinx_FBG900\",\"Package_BGA/Xilinx_FFG1156\",\"Package_BGA/Xilinx_FFG1157_FFG1158\",\"Package_BGA/Xilinx_FFG1761\",\"Package_BGA/Xilinx_FFG1926_FFG1927_FFG1928_FFG1930\",\"Package_BGA/Xilinx_FFG676\",\"Package_BGA/Xilinx_FFG900_FFG901\",\"Package_BGA/Xilinx_FFV1761\",\"Package_BGA/Xilinx_FGG484\",\"Package_BGA/Xilinx_FGG676\",\"Package_BGA/Xilinx_FGGA484\",\"Package_BGA/Xilinx_FGGA676\",\"Package_BGA/Xilinx_FHG1761\",\"Package_BGA/Xilinx_FLG1925_FLG1926_FLG1928_FLG1930\",\"Package_BGA/Xilinx_FTG256\",\"Package_BGA/Xilinx_FTGB196\",\"Package_BGA/Xilinx_RB484\",\"Package_BGA/Xilinx_RB676\",\"Package_BGA/Xilinx_RF1156\",\"Package_BGA/Xilinx_RF1157_RF1158\",\"Package_BGA/Xilinx_RF1761\",\"Package_BGA/Xilinx_RF1930\",\"Package_BGA/Xilinx_RF676\",\"Package_BGA/Xilinx_RF900\",\"Package_BGA/Xilinx_RFG676\",\"Package_BGA/Xilinx_RS484\",\"Package_BGA/Xilinx_SBG484\",\"Package_BGA/Xilinx_SBG485\",\"Package_BGA/csBGA-64_5x5mm_Layout8x8_P0.5mm\",\"Package_BGA/ucBGA-64_4x4mm_Layout8x8_P0.4mm\",\"Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm\",\"Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias\",\"Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.35x2.35mm\",\"Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.35x2.35mm_ThermalVias\",\"Package_CSP/Analog_LFCSP-8-1EP_3x3mm_P0.5mm_EP1.53x1.85mm\",\"Package_CSP/Analog_LFCSP-UQ-10_1.3x1.6mm_P0.4mm\",\"Package_CSP/Anpec_WLCSP-20_1.76x2.03mm_Layout4x5_P0.4mm\",\"Package_CSP/Dialog_WLCSP-34_4.54x1.66mm_Layout17x4_P0.25x0.34mm\",\"Package_CSP/DiodesInc_GEA20_WLCSP-20_1.7x2.1mm_Layout4x5_P0.4mm\",\"Package_CSP/Efinix_WLCSP-64_3.5353x3.3753mm_Layout8x8_P0.4mm\",\"Package_CSP/Efinix_WLCSP-80_4.4567x3.5569mm_Layout10x8_P0.4mm\",\"Package_CSP/LFCSP-10_2x2mm_P0.5mm\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.3x1.3mm\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.3x1.3mm_ThermalVias\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.5x1.5mm\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm_ThermalVias\",\"Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.854x1.854mm\",\"Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm\",\"Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.4x2.4mm\",\"Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.4x2.4mm_ThermalVias\",\"Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm\",\"Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm_ThermalVias\",\"Package_CSP/LFCSP-16_3x3mm_P0.5mm\",\"Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm\",\"Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias\",\"Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm\",\"Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias\",\"Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP0.5x0.5mm\",\"Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.3x2.3mm\",\"Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.3x2.3mm_ThermalVias\",\"Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm\",\"Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias\",\"Package_CSP/LFCSP-28-1EP_5x5mm_P0.5mm_EP3.14x3.14mm\",\"Package_CSP/LFCSP-28-1EP_5x5mm_P0.5mm_EP3.14x3.14mm_ThermalVias\",\"Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm\",\"Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias\",\"Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.25x3.25mm\",\"Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm\",\"Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm_ThermalVias\",\"Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm\",\"Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm_ThermalVias\",\"Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP3.9x3.9mm\",\"Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP3.9x3.9mm_ThermalVias\",\"Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.65x4.65mm\",\"Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.65x4.65mm_ThermalVias\",\"Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm\",\"Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm_ThermalVias\",\"Package_CSP/LFCSP-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm\",\"Package_CSP/LFCSP-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm_ThermalVias\",\"Package_CSP/LFCSP-56-1EP_8x8mm_P0.5mm_EP6.6x6.6mm\",\"Package_CSP/LFCSP-56-1EP_8x8mm_P0.5mm_EP6.6x6.6mm_ThermalVias\",\"Package_CSP/LFCSP-6-1EP_2x2mm_P0.65mm_EP1x1.6mm\",\"Package_CSP/LFCSP-64-1EP_9x9mm_P0.5mm_EP5.21x5.21mm\",\"Package_CSP/LFCSP-64-1EP_9x9mm_P0.5mm_EP5.21x5.21mm_ThermalVias\",\"Package_CSP/LFCSP-72-1EP_10x10mm_P0.5mm_EP5.3x5.3mm\",\"Package_CSP/LFCSP-72-1EP_10x10mm_P0.5mm_EP5.3x5.3mm_ThermalVias\",\"Package_CSP/LFCSP-72-1EP_10x10mm_P0.5mm_EP6.15x6.15mm\",\"Package_CSP/LFCSP-8-1EP_3x2mm_P0.5mm_EP1.6x1.65mm\",\"Package_CSP/LFCSP-8-1EP_3x3mm_P0.5mm_EP1.45x1.74mm\",\"Package_CSP/LFCSP-8-1EP_3x3mm_P0.5mm_EP1.6x2.34mm\",\"Package_CSP/LFCSP-8-1EP_3x3mm_P0.5mm_EP1.6x2.34mm_ThermalVias\",\"Package_CSP/LFCSP-8_2x2mm_P0.5mm\",\"Package_CSP/LFCSP-VQ-24-1EP_4x4mm_P0.5mm_EP2.642x2.642mm\",\"Package_CSP/LFCSP-VQ-48-1EP_7x7mm_P0.5mm\",\"Package_CSP/LFCSP-WD-10-1EP_3x3mm_P0.5mm_EP1.64x2.38mm\",\"Package_CSP/LFCSP-WD-10-1EP_3x3mm_P0.5mm_EP1.64x2.38mm_ThermalVias\",\"Package_CSP/LFCSP-WD-8-1EP_3x3mm_P0.65mm_EP1.6x2.44mm\",\"Package_CSP/LFCSP-WD-8-1EP_3x3mm_P0.65mm_EP1.6x2.44mm_ThermalVias\",\"Package_CSP/Macronix_WLCSP-12_2.02x2.09mm_Layout4x4_P0.5mm\",\"Package_CSP/Maxim_WLCSP-35_2.998x2.168mm_Layout7x5_P0.4mm\",\"Package_CSP/NXP_SOT1444-5_WLCSP-49_3.44x3.44mm_Layout7x7_P0.4mm\",\"Package_CSP/NXP_SOT1450-2_WLCSP-100_5.07x5.07mm_Layout10x10_P0.5mm\",\"Package_CSP/Nexperia_WLCSP-15_2.37x1.17mm_Layout6x3_P0.4mmP0.8mm\",\"Package_CSP/OnSemi_ODCSP36_BGA-36_6.13x6.13mm_Layout6x6_P1.0mm\",\"Package_CSP/OnSemi_ODCSP36_BGA-36_6.13x6.13mm_Layout6x6_P1.0mm_ManualAssembly\",\"Package_CSP/OnSemi_ODCSP8_BGA-8_3.16x3.16mm_Layout3x3_P1.26mm\",\"Package_CSP/OnSemi_ODCSP8_BGA-8_3.16x3.16mm_Layout3x3_P1.26mm_ManualAssembly\",\"Package_CSP/ST_WLCSP-100_4.437x4.456mm_Layout10x10_P0.4mm\",\"Package_CSP/ST_WLCSP-100_4.4x4.38mm_Layout10x10_P0.4mm_Offcenter\",\"Package_CSP/ST_WLCSP-100_Die422\",\"Package_CSP/ST_WLCSP-100_Die446\",\"Package_CSP/ST_WLCSP-100_Die452\",\"Package_CSP/ST_WLCSP-100_Die461\",\"Package_CSP/ST_WLCSP-101_3.86x3.79mm_Layout11x19_P0.35mm_Stagger\",\"Package_CSP/ST_WLCSP-104_Die437\",\"Package_CSP/ST_WLCSP-115_3.73x4.15mm_Layout11x21_P0.35mm_Stagger\",\"Package_CSP/ST_WLCSP-115_4.63x4.15mm_Layout21x11_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-12_1.7x1.42mm_Layout4x6_P0.35mm_Stagger\",\"Package_CSP/ST_WLCSP-132_4.57x4.37mm_Layout12x11_P0.35mm\",\"Package_CSP/ST_WLCSP-143_Die419\",\"Package_CSP/ST_WLCSP-143_Die449\",\"Package_CSP/ST_WLCSP-144_Die470\",\"Package_CSP/ST_WLCSP-150_5.38x5.47mm_Layout13x23_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-156_4.96x4.64mm_Layout13x12_P0.35mm\",\"Package_CSP/ST_WLCSP-168_Die434\",\"Package_CSP/ST_WLCSP-180_Die451\",\"Package_CSP/ST_WLCSP-18_1.86x2.14mm_Layout7x5_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-19_1.643x2.492mm_Layout4x11_P0.35mm_Stagger\",\"Package_CSP/ST_WLCSP-208_5.38x5.47mm_Layout26x16_P0.35mm_Stagger\",\"Package_CSP/ST_WLCSP-208_5.8x5.6mm_Layout26x16_P0.35mm_Stagger\",\"Package_CSP/ST_WLCSP-20_1.94x2.4mm_Layout4x5_P0.4mm\",\"Package_CSP/ST_WLCSP-25_2.33x2.24mm_Layout5x5_P0.4mm\",\"Package_CSP/ST_WLCSP-25_2.3x2.48mm_Layout5x5_P0.4mm\",\"Package_CSP/ST_WLCSP-25_Die425\",\"Package_CSP/ST_WLCSP-25_Die444\",\"Package_CSP/ST_WLCSP-25_Die457\",\"Package_CSP/ST_WLCSP-27_2.34x2.55mm_Layout9x6_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-36_2.58x3.07mm_Layout6x6_P0.4mm\",\"Package_CSP/ST_WLCSP-36_2.652x2.592mm_Layout7x12_P0.4mm_Stagger_Offcenter\",\"Package_CSP/ST_WLCSP-36_2.83x2.99mm_Layout7x13_P0.4mm_Stagger_Offcenter\",\"Package_CSP/ST_WLCSP-36_Die417\",\"Package_CSP/ST_WLCSP-36_Die440\",\"Package_CSP/ST_WLCSP-36_Die445\",\"Package_CSP/ST_WLCSP-36_Die458\",\"Package_CSP/ST_WLCSP-39_2.76x2.78mm_Layout11x7_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-41_2.98x2.76mm_Layout13x7_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-42_2.93x2.82mm_Layout12x7_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-49_3.14x3.14mm_Layout7x7_P0.4mm_Offcenter\",\"Package_CSP/ST_WLCSP-49_3.15x3.13mm_Layout7x7_P0.4mm\",\"Package_CSP/ST_WLCSP-49_3.3x3.38mm_Layout7x7_P0.4mm_Offcenter\",\"Package_CSP/ST_WLCSP-49_Die423\",\"Package_CSP/ST_WLCSP-49_Die431\",\"Package_CSP/ST_WLCSP-49_Die433\",\"Package_CSP/ST_WLCSP-49_Die435\",\"Package_CSP/ST_WLCSP-49_Die438\",\"Package_CSP/ST_WLCSP-49_Die439\",\"Package_CSP/ST_WLCSP-49_Die447\",\"Package_CSP/ST_WLCSP-49_Die448\",\"Package_CSP/ST_WLCSP-52_3.09x3.15mm_Layout13x8_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-56_3.38x3.38mm_Layout14x8_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-63_Die427\",\"Package_CSP/ST_WLCSP-64_3.56x3.52mm_Layout8x8_P0.4mm\",\"Package_CSP/ST_WLCSP-64_Die414\",\"Package_CSP/ST_WLCSP-64_Die427\",\"Package_CSP/ST_WLCSP-64_Die435\",\"Package_CSP/ST_WLCSP-64_Die436\",\"Package_CSP/ST_WLCSP-64_Die441\",\"Package_CSP/ST_WLCSP-64_Die442\",\"Package_CSP/ST_WLCSP-64_Die462\",\"Package_CSP/ST_WLCSP-66_Die411\",\"Package_CSP/ST_WLCSP-66_Die432\",\"Package_CSP/ST_WLCSP-72_3.38x3.38mm_Layout16x9_P0.35mm_Stagger\",\"Package_CSP/ST_WLCSP-72_Die415\",\"Package_CSP/ST_WLCSP-80_3.5x3.27mm_Layout10x16_P0.35mm_Stagger_Offcenter\",\"Package_CSP/ST_WLCSP-81_4.02x4.27mm_Layout9x9_P0.4mm\",\"Package_CSP/ST_WLCSP-81_4.36x4.07mm_Layout9x9_P0.4mm\",\"Package_CSP/ST_WLCSP-81_Die415\",\"Package_CSP/ST_WLCSP-81_Die421\",\"Package_CSP/ST_WLCSP-81_Die463\",\"Package_CSP/ST_WLCSP-90_4.2x3.95mm_Layout18x10_P0.4mm_Stagger\",\"Package_CSP/ST_WLCSP-90_Die413\",\"Package_CSP/ST_WLCSP-99_4.42x3.77mm_Layout11x9_P0.35mm\",\"Package_CSP/WLCSP-12_1.403x1.555mm_Layout6x4_P0.4mm_Stagger\",\"Package_CSP/WLCSP-12_1.56x1.56mm_P0.4mm\",\"Package_CSP/WLCSP-16_1.409x1.409mm_Layout4x4_P0.35mm\",\"Package_CSP/WLCSP-16_2.225x2.17mm_Layout4x4_P0.5mm\",\"Package_CSP/WLCSP-16_4x4_B2.17x2.32mm_P0.5mm\",\"Package_CSP/WLCSP-20_1.934x2.434mm_Layout4x5_P0.4mm\",\"Package_CSP/WLCSP-20_1.994x1.609mm_Layout5x4_P0.4mm\",\"Package_CSP/WLCSP-20_1.994x1.94mm_Layout4x5_P0.4mm\",\"Package_CSP/WLCSP-36_2.374x2.459mm_Layout6x6_P0.35mm\",\"Package_CSP/WLCSP-36_2.82x2.67mm_Layout6x6_P0.4mm\",\"Package_CSP/WLCSP-4_0.64x0.64mm_Layout2x2_P0.35mm\",\"Package_CSP/WLCSP-4_0.89x0.89mm_Layout2x2_P0.5mm\",\"Package_CSP/WLCSP-56_3.170x3.444mm_Layout7x8_P0.4mm\",\"Package_CSP/WLCSP-6_1.46x1.1mm_Layout3x2_P0.4mm\",\"Package_CSP/WLCSP-6_1.4x1.0mm_P0.4mm\",\"Package_CSP/WLCSP-81_4.41x3.76mm_P0.4mm\",\"Package_CSP/WLCSP-8_1.551x2.284mm_Layout2x4_P0.5mm\",\"Package_CSP/WLCSP-8_1.58x1.63x0.35mm_Layout3x5_P0.35x0.4mm_Ball0.25mm_Pad0.25mm_NSMD\",\"Package_CSP/WLCSP-9_1.21x1.22mm_Layout3x3_P0.4mm\",\"Package_CSP/Xilinx_CSG48_7.0x7.0mm_Layout7x7_P0.8mm\",\"Package_CSP/pSemi_CSP-16_1.64x2.04mm_P0.4mm\",\"Package_CSP/pSemi_CSP-16_1.64x2.04mm_P0.4mm_Pad0.18mm\",\"Package_DFN_QFN/AMS_QFN-4-1EP_2x2mm_P0.95mm_EP0.7x1.6mm\",\"Package_DFN_QFN/AO_AOZ666xDI_DFN-8-1EP_3x3mm_P0.65mm_EP1.25x2.7mm\",\"Package_DFN_QFN/AO_DFN-8-1EP_5.55x5.2mm_P1.27mm_EP4.12x4.6mm\",\"Package_DFN_QFN/Analog_QFN-28-36-2EP_5x6mm_P0.5mm\",\"Package_DFN_QFN/ArtInChip_QFN-100-1EP_12x12mm_P0.4mm_EP7.4x7.4mm\",\"Package_DFN_QFN/ArtInChip_QFN-100-1EP_12x12mm_P0.4mm_EP7.4x7.4mm_ThermalVias\",\"Package_DFN_QFN/ArtInChip_QFN-68-1EP_7x7mm_P0.35mm_EP5.49x5.49mm\",\"Package_DFN_QFN/ArtInChip_QFN-68-1EP_7x7mm_P0.35mm_EP5.49x5.49mm_ThermalVias\",\"Package_DFN_QFN/ArtInChip_QFN-88-1EP_10x10mm_P0.4mm_EP6.74x6.74mm\",\"Package_DFN_QFN/ArtInChip_QFN-88-1EP_10x10mm_P0.4mm_EP6.74x6.74mm_ThermalVias\",\"Package_DFN_QFN/CDFN-4_2.5x3.2mm_P2.1mm\",\"Package_DFN_QFN/CDFN-4_2x2.5mm_P1.65mm\",\"Package_DFN_QFN/CDFN-4_3.2x5mm_P2.54mm\",\"Package_DFN_QFN/Cypress_QFN-56-1EP_8x8mm_P0.5mm_EP6.22x6.22mm_ThermalVias\",\"Package_DFN_QFN/DFN-10-1EP_2.6x2.6mm_P0.5mm_EP1.3x2.2mm\",\"Package_DFN_QFN/DFN-10-1EP_2.6x2.6mm_P0.5mm_EP1.3x2.2mm_ThermalVias\",\"Package_DFN_QFN/DFN-10-1EP_2x3mm_P0.5mm_EP0.64x2.4mm\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.55x2.48mm\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.58x2.35mm\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.58x2.35mm_ThermalVias\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.646x3.1mm\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.646x3.1mm_ThermalVias\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.65x2.38mm\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.65x2.38mm_ThermalVias\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.75x2.7mm\",\"Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.7x2.5mm\",\"Package_DFN_QFN/DFN-10_2x2mm_P0.4mm\",\"Package_DFN_QFN/DFN-12-1EP_2x3mm_P0.45mm_EP0.64x2.4mm\",\"Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.45mm_EP1.65x2.38mm\",\"Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.45mm_EP1.65x2.38mm_ThermalVias\",\"Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.5mm_EP1.6x2.5mm\",\"Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.5mm_EP1.6x2.5mm_ThermalVias\",\"Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.5mm_EP2.05x2.86mm\",\"Package_DFN_QFN/DFN-12-1EP_3x4mm_P0.5mm_EP1.7x3.3mm\",\"Package_DFN_QFN/DFN-12-1EP_4x4mm_P0.5mm_EP2.66x3.38mm\",\"Package_DFN_QFN/DFN-12-1EP_4x4mm_P0.65mm_EP2.64x3.54mm\",\"Package_DFN_QFN/DFN-14-1EP_3x3mm_P0.4mm_EP1.78x2.35mm\",\"Package_DFN_QFN/DFN-14-1EP_3x4.5mm_P0.65mm_EP1.65x4.25mm\",\"Package_DFN_QFN/DFN-14-1EP_3x4.5mm_P0.65mm_EP1.65x4.25mm_ThermalVias\",\"Package_DFN_QFN/DFN-14-1EP_3x4mm_P0.5mm_EP1.7x3.3mm\",\"Package_DFN_QFN/DFN-14_1.35x3.5mm_P0.5mm\",\"Package_DFN_QFN/DFN-16-1EP_3x4mm_P0.45mm_EP1.7x3.3mm\",\"Package_DFN_QFN/DFN-16-1EP_3x5mm_P0.5mm_EP1.66x4.4mm\",\"Package_DFN_QFN/DFN-16-1EP_4x5mm_P0.5mm_EP2.44x4.34mm\",\"Package_DFN_QFN/DFN-16-1EP_5x5mm_P0.5mm_EP3.46x4mm\",\"Package_DFN_QFN/DFN-18-1EP_3x5mm_P0.5mm_EP1.66x4.4mm\",\"Package_DFN_QFN/DFN-18-1EP_4x5mm_P0.5mm_EP2.44x4.34mm\",\"Package_DFN_QFN/DFN-20-1EP_5x6mm_P0.5mm_EP3.24x4.24mm\",\"Package_DFN_QFN/DFN-22-1EP_5x6mm_P0.5mm_EP3.14x4.3mm\",\"Package_DFN_QFN/DFN-24-1EP_4x7mm_P0.5mm_EP2.64x6.44mm\",\"Package_DFN_QFN/DFN-32-1EP_4x7mm_P0.4mm_EP2.64x6.44mm\",\"Package_DFN_QFN/DFN-44-1EP_5x8.9mm_P0.4mm_EP3.7x8.4mm\",\"Package_DFN_QFN/DFN-4_5x7mm_P5.08mm\",\"Package_DFN_QFN/DFN-6-1EP_1.2x1.2mm_P0.4mm_EP0.3x0.94mm_PullBack\",\"Package_DFN_QFN/DFN-6-1EP_2x1.6mm_P0.5mm_EP1.15x1.3mm\",\"Package_DFN_QFN/DFN-6-1EP_2x1.8mm_P0.5mm_EP1.2x1.6mm\",\"Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.5mm_EP0.61x1.42mm\",\"Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.5mm_EP0.6x1.37mm\",\"Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.5mm_EP0.7x1.6mm\",\"Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.65mm_EP1.01x1.7mm\",\"Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.65mm_EP1x1.6mm\",\"Package_DFN_QFN/DFN-6-1EP_3x2mm_P0.5mm_EP1.65x1.35mm\",\"Package_DFN_QFN/DFN-6-1EP_3x3mm_P0.95mm_EP1.7x2.6mm\",\"Package_DFN_QFN/DFN-6-1EP_3x3mm_P1mm_EP1.5x2.4mm\",\"Package_DFN_QFN/DFN-6_1.3x1.2mm_P0.4mm\",\"Package_DFN_QFN/DFN-6_1.6x1.3mm_P0.4mm\",\"Package_DFN_QFN/DFN-8-1EP_1.5x1.5mm_P0.4mm_EP0.7x1.2mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.45mm_EP0.64x1.37mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.6x1.2mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.86x1.55mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.8x1.6mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.3mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.5mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.7mm\",\"Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP1.05x1.75mm\",\"Package_DFN_QFN/DFN-8-1EP_2x3mm_P0.5mm_EP0.61x2.2mm\",\"Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.45mm_EP1.66x1.36mm\",\"Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.36x1.46mm\",\"Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.3x1.5mm\",\"Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.75x1.45mm\",\"Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.7x1.4mm\",\"Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.7x1.6mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.65x2.38mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.65x2.38mm_ThermalVias\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.66x2.38mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.7x2.4mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.2x2.15mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.2x2.15mm_ThermalVias\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.55x2.4mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.5x2.25mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.6x2.56mm\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.6x2.56mm_ThermalVias\",\"Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.7x2.05mm\",\"Package_DFN_QFN/DFN-8-1EP_4x4mm_P0.8mm_EP2.39x2.21mm\",\"Package_DFN_QFN/DFN-8-1EP_4x4mm_P0.8mm_EP2.3x3.24mm\",\"Package_DFN_QFN/DFN-8-1EP_4x4mm_P0.8mm_EP2.5x3.6mm\",\"Package_DFN_QFN/DFN-8-1EP_6x5mm_P1.27mm_EP2x2mm\",\"Package_DFN_QFN/DFN-8-1EP_6x5mm_P1.27mm_EP4x4mm\",\"Package_DFN_QFN/DFN-8_2x2mm_P0.5mm\",\"Package_DFN_QFN/DFN-S-8-1EP_6x5mm_P1.27mm\",\"Package_DFN_QFN/DHVQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm\",\"Package_DFN_QFN/DHVQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm_ThermalVias\",\"Package_DFN_QFN/DHVQFN-16-1EP_2.5x3.5mm_P0.5mm_EP1x2mm\",\"Package_DFN_QFN/DHVQFN-20-1EP_2.5x4.5mm_P0.5mm_EP1x3mm\",\"Package_DFN_QFN/DHWQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm\",\"Package_DFN_QFN/DHWQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm_ThermalVias\",\"Package_DFN_QFN/Diodes_DFN1006-3\",\"Package_DFN_QFN/Diodes_UDFN-10_1x2.5mm_P0.5mm\",\"Package_DFN_QFN/Diodes_UDFN2020-6_Type-F\",\"Package_DFN_QFN/Diodes_UDFN3810-9_TYPE_B\",\"Package_DFN_QFN/Diodes_ZL32_TQFN-32-1EP_3x6mm_P0.4mm_EP1.25x3.5mm\",\"Package_DFN_QFN/EPC_QFN-13-3EP_3.5x5mm_P0.5mm\",\"Package_DFN_QFN/HVQFN-16-1EP_3x3mm_P0.5mm_EP1.5x1.5mm\",\"Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm\",\"Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm\",\"Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias\",\"Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/HVQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm\",\"Package_DFN_QFN/HVQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/HVQFN-36-1EP_6x6mm_P0.5mm_EP3.9x3.9mm\",\"Package_DFN_QFN/HVQFN-36-1EP_6x6mm_P0.5mm_EP3.9x3.9mm_ThermalVias\",\"Package_DFN_QFN/HVQFN-40-1EP_6x6mm_P0.5mm_EP4.1x4.1mm\",\"Package_DFN_QFN/HVQFN-40-1EP_6x6mm_P0.5mm_EP4.1x4.1mm_ThermalVias\",\"Package_DFN_QFN/HXQFN-16-1EP_3x3mm_P0.5mm_EP1.85x1.85mm\",\"Package_DFN_QFN/HXQFN-16-1EP_3x3mm_P0.5mm_EP1.85x1.85mm_ThermalVias\",\"Package_DFN_QFN/IDT_QFN-12-1EP_2x2mm_P0.5mm_EP1.1x1.1mm\",\"Package_DFN_QFN/IDT_QFN-12-1EP_2x2mm_P0.5mm_EP1.1x1.1mm_ThermalVias\",\"Package_DFN_QFN/Infineon_MLPQ-16-14-1EP_4x4mm_P0.5mm\",\"Package_DFN_QFN/Infineon_MLPQ-40-32-1EP_7x7mm_P0.5mm\",\"Package_DFN_QFN/Infineon_MLPQ-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm\",\"Package_DFN_QFN/Infineon_MLPQ-48-1EP_7x7mm_P0.5mm_EP5.55x5.55mm\",\"Package_DFN_QFN/Infineon_PQFN-22-15-4EP_6x5mm_P0.65mm\",\"Package_DFN_QFN/Infineon_PQFN-44-31-5EP_7x7mm_P0.5mm\",\"Package_DFN_QFN/LQFN-10-1EP_2x2mm_P0.5mm_EP0.7x0.7mm\",\"Package_DFN_QFN/LQFN-12-1EP_2x2mm_P0.5mm_EP0.7x0.7mm\",\"Package_DFN_QFN/LQFN-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm\",\"Package_DFN_QFN/Linear_DE14MA\",\"Package_DFN_QFN/Linear_UGK52_QFN-46-52\",\"Package_DFN_QFN/MLF-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/MLF-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/MLF-6-1EP_1.6x1.6mm_P0.5mm_EP0.5x1.26mm\",\"Package_DFN_QFN/MLF-8-1EP_3x3mm_P0.65mm_EP1.55x2.3mm\",\"Package_DFN_QFN/MLF-8-1EP_3x3mm_P0.65mm_EP1.55x2.3mm_ThermalVias\",\"Package_DFN_QFN/MLPQ-16-1EP_4x4mm_P0.65mm_EP2.8x2.8mm\",\"Package_DFN_QFN/MPS_QFN-12_2x2mm_P0.4mm\",\"Package_DFN_QFN/MPS_QFN-16_3x3mm_P0.5mm\",\"Package_DFN_QFN/Maxim_FC2QFN-14_2.5x2.5mm_P0.5mm\",\"Package_DFN_QFN/Maxim_TDFN-10-1EP_3x3mm_P0.5mm_EP1.58x2.35mm\",\"Package_DFN_QFN/Maxim_TDFN-12-1EP_3x3mm_P0.5mm_EP1.7x2.5mm\",\"Package_DFN_QFN/Maxim_TDFN-12-1EP_3x3mm_P0.5mm_EP1.7x2.5mm_ThermalVias\",\"Package_DFN_QFN/Maxim_TDFN-6-1EP_3x3mm_P0.95mm_EP1.5x2.3mm\",\"Package_DFN_QFN/Maxim_WSON-8-1EP_3x2mm_P0.5mm_EP1.75x1.63mm\",\"Package_DFN_QFN/Micrel_MLF-8-1EP_2x2mm_P0.5mm_EP0.6x1.2mm\",\"Package_DFN_QFN/Micrel_MLF-8-1EP_2x2mm_P0.5mm_EP0.6x1.2mm_ThermalVias\",\"Package_DFN_QFN/Micrel_MLF-8-1EP_2x2mm_P0.5mm_EP0.8x1.3mm_ThermalVias\",\"Package_DFN_QFN/Microchip_8E-16\",\"Package_DFN_QFN/Microchip_DRQFN-44-1EP_5x5mm_P0.7mm_EP2.65x2.65mm\",\"Package_DFN_QFN/Microchip_DRQFN-44-1EP_5x5mm_P0.7mm_EP2.65x2.65mm_ThermalVias\",\"Package_DFN_QFN/Microchip_DRQFN-64-1EP_7x7mm_P0.65mm_EP4.1x4.1mm\",\"Package_DFN_QFN/Microchip_DRQFN-64-1EP_7x7mm_P0.65mm_EP4.1x4.1mm_ThermalVias\",\"Package_DFN_QFN/Microsemi_QFN-40-32-2EP_6x8mm_P0.5mm\",\"Package_DFN_QFN/Mini-Circuits_DL805\",\"Package_DFN_QFN/Mini-Circuits_FG873-4_3x3mm\",\"Package_DFN_QFN/NXP_LQFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_16xMask0.45x0.45\",\"Package_DFN_QFN/NXP_LQFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_16xMask0.45x0.45_ThermalVias\",\"Package_DFN_QFN/NXP_VQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm\",\"Package_DFN_QFN/Nordic_AQFN-73-1EP_7x7mm_P0.5mm\",\"Package_DFN_QFN/Nordic_AQFN-94-1EP_7x7mm_P0.4mm\",\"Package_DFN_QFN/OnSemi_DFN-14-1EP_4x4mm_P0.5mm_EP2.7x3.4mm\",\"Package_DFN_QFN/OnSemi_DFN-8_2x2mm_P0.5mm\",\"Package_DFN_QFN/OnSemi_SIP-38-6EP-9x7mm_P0.65mm_EP1.2x1.2mm\",\"Package_DFN_QFN/OnSemi_UDFN-16-1EP_1.35x3.3mm_P0.4mm_EP0.4x2.8mm\",\"Package_DFN_QFN/OnSemi_UDFN-8_1.2x1.8mm_P0.4mm\",\"Package_DFN_QFN/OnSemi_VCT-28_3.5x3.5mm_P0.4mm\",\"Package_DFN_QFN/OnSemi_XDFN-10_1.35x2.2mm_P0.4mm\",\"Package_DFN_QFN/OnSemi_XDFN4-1EP_1.0x1.0mm_EP0.52x0.52mm\",\"Package_DFN_QFN/PQFN-8-EP_6x5mm_P1.27mm_Generic\",\"Package_DFN_QFN/Panasonic_HQFN-16-1EP_4x4mm_P0.65mm_EP2.9x2.9mm\",\"Package_DFN_QFN/Panasonic_HSON-8_8x8mm_P2.00mm\",\"Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.51mm_EP1.45x1.45mm\",\"Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.45x1.45mm\",\"Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.45x1.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.65x1.65mm\",\"Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.65x1.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.6x1.6mm\",\"Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_1.8x2.6mm_P0.4mm_EP0.7x1.5mm\",\"Package_DFN_QFN/QFN-16-1EP_1.8x2.6mm_P0.4mm_EP0.7x1.5mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.675x1.675mm\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.9x1.9mm\",\"Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.9x1.9mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.5mm_EP2.45x2.45mm\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.15x2.15mm\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.15x2.15mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_PullBack\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_PullBack_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-16-1EP_5x5mm_P0.8mm_EP2.7x2.7mm\",\"Package_DFN_QFN/QFN-16-1EP_5x5mm_P0.8mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_3.5x3.5mm_P0.5mm_EP2x2mm\",\"Package_DFN_QFN/QFN-20-1EP_3.5x3.5mm_P0.5mm_EP2x2mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.45mm_EP1.6x1.6mm\",\"Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.45mm_EP1.6x1.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mm\",\"Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_3x4mm_P0.5mm_EP1.65x2.65mm\",\"Package_DFN_QFN/QFN-20-1EP_3x4mm_P0.5mm_EP1.65x2.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm\",\"Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_4x5mm_P0.5mm_EP2.65x3.65mm\",\"Package_DFN_QFN/QFN-20-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-20-1EP_5x5mm_P0.65mm_EP3.35x3.35mm\",\"Package_DFN_QFN/QFN-20-1EP_5x5mm_P0.65mm_EP3.35x3.35mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_3x3mm_P0.4mm_EP1.75x1.6mm\",\"Package_DFN_QFN/QFN-24-1EP_3x3mm_P0.4mm_EP1.75x1.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_3x4mm_P0.4mm_EP1.65x2.65mm\",\"Package_DFN_QFN/QFN-24-1EP_3x4mm_P0.4mm_EP1.65x2.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.15x2.15mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.15x2.15mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.65x2.65mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.65x2.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.75x2.75mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.75x2.75mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.6mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm\",\"Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm\",\"Package_DFN_QFN/QFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.25x3.25mm\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.25x3.25mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.2x3.2mm\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.2x3.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.4x3.4mm\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.4x3.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.6x3.6mm\",\"Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.6x3.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_3x6mm_P0.5mm_EP1.7x4.75mm\",\"Package_DFN_QFN/QFN-28-1EP_3x6mm_P0.5mm_EP1.7x4.75mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm\",\"Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.45mm_EP2.6x2.6mm\",\"Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.3x2.3mm\",\"Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.3x2.3mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.4x2.4mm\",\"Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.4x2.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_4x5mm_P0.5mm_EP2.65x3.65mm\",\"Package_DFN_QFN/QFN-28-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.1x3.1mm\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mm\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.75x3.75mm\",\"Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.75x3.75mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_5x6mm_P0.5mm_EP3.65x4.65mm\",\"Package_DFN_QFN/QFN-28-1EP_5x6mm_P0.5mm_EP3.65x4.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.25x4.25mm\",\"Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.25x4.25mm_ThermalVias\",\"Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.8x4.8mm\",\"Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.8x4.8mm_ThermalVias\",\"Package_DFN_QFN/QFN-28_4x4mm_P0.5mm\",\"Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.65x2.65mm\",\"Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.65x2.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.9x2.9mm\",\"Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.9x2.9mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.3x3.3mm\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.3x3.3mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.65x3.65mm\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.65x3.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.7x3.7mm\",\"Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.7x3.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.65x4.65mm\",\"Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.65x4.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.7x4.7mm\",\"Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.7x4.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP5.4x5.4mm\",\"Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP5.4x5.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.1mm\",\"Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.6mm\",\"Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP3.7x3.7mm\",\"Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP3.7x3.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP4.1x4.1mm\",\"Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP4.1x4.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-38-1EP_4x6mm_P0.4mm_EP2.65x4.65mm\",\"Package_DFN_QFN/QFN-38-1EP_4x6mm_P0.4mm_EP2.65x4.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm\",\"Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm\",\"Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm_ThermalVias\",\"Package_DFN_QFN/QFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm\",\"Package_DFN_QFN/QFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-42-1EP_5x6mm_P0.4mm_EP3.7x4.7mm\",\"Package_DFN_QFN/QFN-42-1EP_5x6mm_P0.4mm_EP3.7x4.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.15x5.15mm\",\"Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias\",\"Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.2x5.2mm\",\"Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.2x5.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-44-1EP_8x8mm_P0.65mm_EP6.45x6.45mm\",\"Package_DFN_QFN/QFN-44-1EP_8x8mm_P0.65mm_EP6.45x6.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-44-1EP_9x9mm_P0.65mm_EP7.5x7.5mm\",\"Package_DFN_QFN/QFN-44-1EP_9x9mm_P0.65mm_EP7.5x7.5mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_5x5mm_P0.35mm_EP3.7x3.7mm\",\"Package_DFN_QFN/QFN-48-1EP_5x5mm_P0.35mm_EP3.7x3.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.3x4.3mm\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.3x4.3mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.4x4.4mm\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.4x4.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.66x4.66mm\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.66x4.66mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.6x4.6mm\",\"Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.6x4.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.3x5.3mm\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.3x5.3mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.45x5.45mm\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.45x5.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mm\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.7x5.7mm\",\"Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.7x5.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-48-1EP_8x8mm_P0.5mm_EP6.2x6.2mm\",\"Package_DFN_QFN/QFN-48-1EP_8x8mm_P0.5mm_EP6.2x6.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-52-1EP_7x8mm_P0.5mm_EP5.41x6.45mm\",\"Package_DFN_QFN/QFN-52-1EP_7x8mm_P0.5mm_EP5.41x6.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm\",\"Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP4x4mm\",\"Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP4x4mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP5.6x5.6mm\",\"Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP5.6x5.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.3x4.3mm\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.3x4.3mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.5x5.2mm\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.5x5.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.5x5.2mm_ThermalVias_TopTented\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.6x5.6mm\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.6x5.6mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.9x5.9mm\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.9x5.9mm_ThermalVias\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP6.1x6.1mm\",\"Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP6.1x6.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-60-1EP_7x7mm_P0.4mm_EP3.4x3.4mm\",\"Package_DFN_QFN/QFN-60-1EP_7x7mm_P0.4mm_EP3.4x3.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_8x8mm_P0.4mm_EP6.5x6.5mm\",\"Package_DFN_QFN/QFN-64-1EP_8x8mm_P0.4mm_EP6.5x6.5mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.4x3.4mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.4x3.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.8x3.8mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.8x3.8mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.1x4.1mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.1x4.1mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.35x4.35mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.35x4.35mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.7x4.7mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.7x4.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.2x5.2mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.2x5.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.45x5.45mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.45x5.45mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.7x5.7mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.7x5.7mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP6x6mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP6x6mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.25x7.25mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.35x7.35mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.3x7.3mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.3x7.3mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.5x7.5mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.5x7.5mm_ThermalVias\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.65x7.65mm\",\"Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.65x7.65mm_ThermalVias\",\"Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP5.2x5.2mm\",\"Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP5.2x5.2mm_ThermalVias\",\"Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP6.4x6.4mm\",\"Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP6.4x6.4mm_ThermalVias\",\"Package_DFN_QFN/QFN-72-1EP_10x10mm_P0.5mm_EP6x6mm\",\"Package_DFN_QFN/QFN-72-1EP_10x10mm_P0.5mm_EP6x6mm_ThermalVias\",\"Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP3.8x3.8mm\",\"Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP3.8x3.8mm_ThermalVias\",\"Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP5.81x6.31mm\",\"Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP5.81x6.31mm_ThermalVias\",\"Package_DFN_QFN/QFN-8-1EP_6x5mm_P1.27mm_EP3.4x4.2mm\",\"Package_DFN_QFN/QFN-80-1EP_10x10mm_P0.4mm_EP3.4x3.4mm\",\"Package_DFN_QFN/QFN-80-1EP_10x10mm_P0.4mm_EP3.4x3.4mm_ThermalVias\",\"Package_DFN_QFN/Qorvo_DFN-8-1EP_2x2mm_P0.5mm\",\"Package_DFN_QFN/Qorvo_TQFN66-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm\",\"Package_DFN_QFN/Qorvo_TQFN66-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm_ThermalVias\",\"Package_DFN_QFN/ROHM_DFN0604-3\",\"Package_DFN_QFN/Renesas_UQFN-16_2x2mm_P0.4mm\",\"Package_DFN_QFN/Renesas_UQFN-20_2x3mm_P0.4mm_LayoutBorder4x6y\",\"Package_DFN_QFN/ST_DFN-10-1EP_3x3mm_P0.5mm_EP0.62x0.98mm\",\"Package_DFN_QFN/ST_DFN-10-1EP_3x3mm_P0.5mm_EP0.62x0.98mm_ThermalVias\",\"Package_DFN_QFN/ST_UFDFPN-12-1EP_3x3mm_P0.5mm_EP1.4x2.55mm\",\"Package_DFN_QFN/ST_UFQFPN-20_3x3mm_P0.5mm\",\"Package_DFN_QFN/ST_UQFN-6L_1.5x1.7mm_P0.5mm\",\"Package_DFN_QFN/SiliconLabs_QFN-20-1EP_3x3mm_P0.5mm_EP1.8x1.8mm\",\"Package_DFN_QFN/SiliconLabs_QFN-20-1EP_3x3mm_P0.5mm_EP1.8x1.8mm_ThermalVias\",\"Package_DFN_QFN/TDFN-10-1EP_2x3mm_P0.5mm_EP0.9x2mm\",\"Package_DFN_QFN/TDFN-10-1EP_2x3mm_P0.5mm_EP0.9x2mm_ThermalVias\",\"Package_DFN_QFN/TDFN-12-1EP_3x3mm_P0.4mm_EP1.7x2.45mm\",\"Package_DFN_QFN/TDFN-12-1EP_3x3mm_P0.4mm_EP1.7x2.45mm_ThermalVias\",\"Package_DFN_QFN/TDFN-12_2x3mm_P0.5mm\",\"Package_DFN_QFN/TDFN-14-1EP_3x3mm_P0.4mm_EP1.78x2.35mm\",\"Package_DFN_QFN/TDFN-14-1EP_3x3mm_P0.4mm_EP1.78x2.35mm_ThermalVias\",\"Package_DFN_QFN/TDFN-6-1EP_1.2x1.2mm_P0.4mm_EP0.3x0.94mm\",\"Package_DFN_QFN/TDFN-6-1EP_2.5x2.5mm_P0.65mm_EP1.3x2mm\",\"Package_DFN_QFN/TDFN-6-1EP_2.5x2.5mm_P0.65mm_EP1.3x2mm_ThermalVias\",\"Package_DFN_QFN/TDFN-8-1EP_2x2mm_P0.5mm_EP0.8x1.2mm\",\"Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.3x1.4mm\",\"Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.4x1.4mm\",\"Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.80x1.65mm\",\"Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.80x1.65mm_ThermalVias\",\"Package_DFN_QFN/TDFN-8_1.4x1.6mm_P0.4mm\",\"Package_DFN_QFN/TQFN-16-1EP_3x3mm_P0.5mm_EP1.23x1.23mm\",\"Package_DFN_QFN/TQFN-16-1EP_3x3mm_P0.5mm_EP1.23x1.23mm_ThermalVias\",\"Package_DFN_QFN/TQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm\",\"Package_DFN_QFN/TQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm\",\"Package_DFN_QFN/TQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP2.29x2.29mm\",\"Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP2.29x2.29mm_ThermalVias\",\"Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP3.1x3.1mm\",\"Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP3.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm\",\"Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.9x2.9mm\",\"Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.9x2.9mm_ThermalVias\",\"Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.1x3.1mm\",\"Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.25x3.25mm\",\"Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.25x3.25mm_ThermalVias\",\"Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm\",\"Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_PullBack\",\"Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_PullBack_ThermalVias\",\"Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm\",\"Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm_ThermalVias\",\"Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm\",\"Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm\",\"Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.4x3.4mm\",\"Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.4x3.4mm_ThermalVias\",\"Package_DFN_QFN/TQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm\",\"Package_DFN_QFN/TQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm_ThermalVias\",\"Package_DFN_QFN/TQFN-44-1EP_7x7mm_P0.5mm_EP4.7x4.7mm\",\"Package_DFN_QFN/TQFN-44-1EP_7x7mm_P0.5mm_EP4.7x4.7mm_ThermalVias\",\"Package_DFN_QFN/TQFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm\",\"Package_DFN_QFN/TQFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm_ThermalVias\",\"Package_DFN_QFN/Texas_B3QFN-14-1EP_5x5.5mm_P0.65mm\",\"Package_DFN_QFN/Texas_B3QFN-14-1EP_5x5.5mm_P0.65mm_ThermalVia\",\"Package_DFN_QFN/Texas_DLH0010A_WSON-10-1EP_2.2x2mm_P0.4mm_EP0.9x1.5mm\",\"Package_DFN_QFN/Texas_DLH0010A_WSON-10-1EP_2.2x2mm_P0.4mm_EP0.9x1.5mm_ThermalVias\",\"Package_DFN_QFN/Texas_DRB0008A\",\"Package_DFN_QFN/Texas_DSQ0010A_WSON-10-1EP_2x2mm_P0.4mm_EP0.9x1.5mm\",\"Package_DFN_QFN/Texas_DSQ0010A_WSON-10-1EP_2x2mm_P0.4mm_EP0.9x1.5mm_ThermalVias\",\"Package_DFN_QFN/Texas_MOF0009A\",\"Package_DFN_QFN/Texas_PicoStar_DFN-3_0.69x0.60mm\",\"Package_DFN_QFN/Texas_QFN-41_10x16mm\",\"Package_DFN_QFN/Texas_R-PUQFN-N10\",\"Package_DFN_QFN/Texas_R-PUQFN-N12\",\"Package_DFN_QFN/Texas_RDX0007A_QFN-FCMOD-7-3.3x4mm-P0.5mm_4EP\",\"Package_DFN_QFN/Texas_REE0036A_WQFN-36-1EP_4x5mm_P0.4mm_EP2.7x3.7mm\",\"Package_DFN_QFN/Texas_REE0036A_WQFN-36-1EP_4x5mm_P0.4mm_EP2.7x3.7mm_ThermalVias\",\"Package_DFN_QFN/Texas_REF0038A_WQFN-38-2EP_6x4mm_P0.4\",\"Package_DFN_QFN/Texas_RGC0064B_VQFN-64-1EP_9x9mm_P0.5mm_EP4.25x4.25mm\",\"Package_DFN_QFN/Texas_RGC0064B_VQFN-64-1EP_9x9mm_P0.5mm_EP4.25x4.25mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGE0024C_VQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm\",\"Package_DFN_QFN/Texas_RGE0024C_VQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGE0024H_VQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/Texas_RGE0024H_VQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGP0020D_VQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/Texas_RGP0020D_VQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGP0020H_VQFN-20-1EP_4x4mm_P0.5mm_EP2.4x2.4mm\",\"Package_DFN_QFN/Texas_RGP0020H_VQFN-20-1EP_4x4mm_P0.5mm_EP2.4x2.4mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGV0016A_VQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm\",\"Package_DFN_QFN/Texas_RGV0016A_VQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGW0020A_VQFN-20-1EP_5x5mm_P0.65mm_EP3.15x3.15mm\",\"Package_DFN_QFN/Texas_RGW0020A_VQFN-20-1EP_5x5mm_P0.65mm_EP3.15x3.15mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGY_R-PVQFN-N16_EP2.05x2.55mm\",\"Package_DFN_QFN/Texas_RGY_R-PVQFN-N16_EP2.05x2.55mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGY_R-PVQFN-N20_EP2.05x3.05mm\",\"Package_DFN_QFN/Texas_RGY_R-PVQFN-N20_EP2.05x3.05mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGY_R-PVQFN-N24_EP2.05x3.1mm\",\"Package_DFN_QFN/Texas_RGY_R-PVQFN-N24_EP2.05x3.1mm_ThermalVias\",\"Package_DFN_QFN/Texas_RGZ0048A_VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm\",\"Package_DFN_QFN/Texas_RGZ0048A_VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHA0040B_VQFN-40-1EP_6x6mm_P0.5mm_EP4.15x4.15mm\",\"Package_DFN_QFN/Texas_RHA0040B_VQFN-40-1EP_6x6mm_P0.5mm_EP4.15x4.15mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHA0040D_VQFN-40-1EP_6x6mm_P0.5mm_EP2.9x2.9mm\",\"Package_DFN_QFN/Texas_RHA0040D_VQFN-40-1EP_6x6mm_P0.5mm_EP2.9x2.9mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHA0040E_VQFN-40-1EP_6x6mm_P0.5mm_EP3.52x2.62mm\",\"Package_DFN_QFN/Texas_RHA0040E_VQFN-40-1EP_6x6mm_P0.5mm_EP3.52x2.62mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHA_VQFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm\",\"Package_DFN_QFN/Texas_RHA_VQFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHB0032E_VQFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm\",\"Package_DFN_QFN/Texas_RHB0032E_VQFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHB0032M_VQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm\",\"Package_DFN_QFN/Texas_RHB0032M_VQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHF0024A_VQFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm\",\"Package_DFN_QFN/Texas_RHF0024A_VQFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias\",\"Package_DFN_QFN/Texas_RHH0036C_VQFN-36-1EP_6x6mm_P0.5mm_EP4.4x4.4mm\",\"Package_DFN_QFN/Texas_RHH0036C_VQFN-36-1EP_6x6mm_P0.5mm_EP4.4x4.4mm_ThermalVias\",\"Package_DFN_QFN/Texas_RJE0020A_VQFN-20-1EP_3x3mm_P0.45mm_EP0.675x0.76mm\",\"Package_DFN_QFN/Texas_RJE0020A_VQFN-20-1EP_3x3mm_P0.45mm_EP0.675x0.76mm_ThermalVias\",\"Package_DFN_QFN/Texas_RMG0012A_WQFN-12_1.8x1.8mm_P0.4mm\",\"Package_DFN_QFN/Texas_RMQ0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm\",\"Package_DFN_QFN/Texas_RMQ0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm_ThermalVias\",\"Package_DFN_QFN/Texas_RNH0030A_WQFN-30-1EP_2.5x4.5mm_P0.4mm_EP1.2x3.2mm\",\"Package_DFN_QFN/Texas_RNH0030A_WQFN-30-1EP_2.5x4.5mm_P0.4mm_EP1.2x3.2mm_ThermalVias\",\"Package_DFN_QFN/Texas_RNN0018A\",\"Package_DFN_QFN/Texas_RNP0030B_WQFN-30-1EP_4x6mm_P0.5mm_EP1.8x4.5mm\",\"Package_DFN_QFN/Texas_RNP0030B_WQFN-30-1EP_4x6mm_P0.5mm_EP1.8x4.5mm_ThermalVias\",\"Package_DFN_QFN/Texas_RNQ0040A_WQFN-40-1EP_6x4mm_P0.4mm_EP4.7x2.7mm\",\"Package_DFN_QFN/Texas_RNQ0040A_WQFN-40-1EP_6x4mm_P0.4mm_EP4.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/Texas_RNX0012C_VQFN-14-11-1EP_2x3mm_P0.5mm_EP0.25x1.825mm\",\"Package_DFN_QFN/Texas_RPU0010A_VQFN-HR-10_2x2mm_P0.5mm\",\"Package_DFN_QFN/Texas_RQM0029A_VQFN-29_4x4mm_P0.4mm\",\"Package_DFN_QFN/Texas_RRW0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm\",\"Package_DFN_QFN/Texas_RRW0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm_ThermalVias\",\"Package_DFN_QFN/Texas_RSA_VQFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm\",\"Package_DFN_QFN/Texas_RSA_VQFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/Texas_RSN_WQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm\",\"Package_DFN_QFN/Texas_RSN_WQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm_ThermalVias\",\"Package_DFN_QFN/Texas_RSW0010A_UQFN-10_1.4x1.8mm_P0.4mm\",\"Package_DFN_QFN/Texas_RTE0016D_WQFN-16-1EP_3x3mm_P0.5mm_EP0.8x0.8mm\",\"Package_DFN_QFN/Texas_RTE0016D_WQFN-16-1EP_3x3mm_P0.5mm_EP0.8x0.8mm_ThermalVias\",\"Package_DFN_QFN/Texas_RTE_WQFN-16-1EP_3x3mm_P0.5mm_EP1.2x0.8mm\",\"Package_DFN_QFN/Texas_RTE_WQFN-16-1EP_3x3mm_P0.5mm_EP1.2x0.8mm_ThermalVias\",\"Package_DFN_QFN/Texas_RTW_WQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/Texas_RTW_WQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/Texas_RTY_WQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm\",\"Package_DFN_QFN/Texas_RTY_WQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/Texas_RUK0020B_WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm\",\"Package_DFN_QFN/Texas_RUK0020B_WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias\",\"Package_DFN_QFN/Texas_RUM0016A_WQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm\",\"Package_DFN_QFN/Texas_RUM0016A_WQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/Texas_RUM0016E_WQFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm\",\"Package_DFN_QFN/Texas_RUM0016E_WQFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm_ThermalVias\",\"Package_DFN_QFN/Texas_RUN0010A_WQFN-10_2x2mm_P0.5mm\",\"Package_DFN_QFN/Texas_RVA_VQFN-16-1EP_3.5x3.5mm_P0.5mm_EP2.14x2.14mm\",\"Package_DFN_QFN/Texas_RVA_VQFN-16-1EP_3.5x3.5mm_P0.5mm_EP2.14x2.14mm_ThermalVias\",\"Package_DFN_QFN/Texas_RVC0020A_WQFN-20-1EP_3x4mm_P0.5mm_EP1.6x2.6mm\",\"Package_DFN_QFN/Texas_RVC0020A_WQFN-20-1EP_3x4mm_P0.5mm_EP1.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/Texas_RVE0028A_VQFN-28-1EP_3.5x4.5mm_P0.4mm_EP2.1x3.1mm\",\"Package_DFN_QFN/Texas_RVE0028A_VQFN-28-1EP_3.5x4.5mm_P0.4mm_EP2.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/Texas_RWH0032A\",\"Package_DFN_QFN/Texas_RWH0032A_ThermalVias\",\"Package_DFN_QFN/Texas_RWU0007A_VQFN-7_2x2mm_P0.5mm\",\"Package_DFN_QFN/Texas_S-PDSO-N10_EP1.2x2mm\",\"Package_DFN_QFN/Texas_S-PDSO-N10_EP1.2x2mm_ThermalVias\",\"Package_DFN_QFN/Texas_S-PVQFN-N14\",\"Package_DFN_QFN/Texas_S-PVQFN-N14_ThermalVias\",\"Package_DFN_QFN/Texas_S-PWQFN-N100_EP5.5x5.5mm\",\"Package_DFN_QFN/Texas_S-PWQFN-N100_EP5.5x5.5mm_ThermalVias\",\"Package_DFN_QFN/Texas_S-PWQFN-N20\",\"Package_DFN_QFN/Texas_S-PX2QFN-14\",\"Package_DFN_QFN/Texas_UQFN-10_1.5x2mm_P0.5mm\",\"Package_DFN_QFN/Texas_UQFN-8_1.5x1.5mm_P0.5mm\",\"Package_DFN_QFN/Texas_VQFN-HR-12_2x2.5mm_P0.5mm\",\"Package_DFN_QFN/Texas_VQFN-HR-12_2x2.5mm_P0.5mm_ThermalVias\",\"Package_DFN_QFN/Texas_VQFN-HR-20_3x2.5mm_P0.5mm_RQQ0011A\",\"Package_DFN_QFN/Texas_VQFN-RHL-20\",\"Package_DFN_QFN/Texas_VQFN-RHL-20_ThermalVias\",\"Package_DFN_QFN/Texas_VQFN-RNR0011A-11\",\"Package_DFN_QFN/Texas_WQFN-MR-100_3x3-DapStencil\",\"Package_DFN_QFN/Texas_WQFN-MR-100_ThermalVias_3x3-DapStencil\",\"Package_DFN_QFN/Texas_X2QFN-12_1.6x1.6mm_P0.4mm\",\"Package_DFN_QFN/Texas_X2QFN-RUE-12_1.4x2mm_P0.4mm\",\"Package_DFN_QFN/UDC-QFN-20-4EP_3x4mm_P0.5mm_EP0.41x0.25mm\",\"Package_DFN_QFN/UDFN-10_1.35x2.6mm_P0.5mm\",\"Package_DFN_QFN/UDFN-4-1EP_1x1mm_P0.65mm_EP0.48x0.48mm\",\"Package_DFN_QFN/UDFN-9_1.0x3.8mm_P0.5mm\",\"Package_DFN_QFN/UFQFPN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm\",\"Package_DFN_QFN/UFQFPN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm_ThermalVias\",\"Package_DFN_QFN/UQFN-10_1.3x1.8mm_P0.4mm\",\"Package_DFN_QFN/UQFN-10_1.4x1.8mm_P0.4mm\",\"Package_DFN_QFN/UQFN-10_1.6x2.1mm_P0.5mm\",\"Package_DFN_QFN/UQFN-12-1EP_2x2mm_P0.4mm_EP1.1x1.1mm\",\"Package_DFN_QFN/UQFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm\",\"Package_DFN_QFN/UQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm\",\"Package_DFN_QFN/UQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/UQFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm\",\"Package_DFN_QFN/UQFN-16_1.8x2.6mm_P0.4mm\",\"Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm\",\"Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias\",\"Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.85x1.85mm\",\"Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.85x1.85mm_ThermalVias\",\"Package_DFN_QFN/UQFN-20-1EP_4x4mm_P0.5mm_EP2.8x2.8mm\",\"Package_DFN_QFN/UQFN-20-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_ThermalVias\",\"Package_DFN_QFN/UQFN-20_3x3mm_P0.4mm\",\"Package_DFN_QFN/UQFN-28-1EP_4x4mm_P0.4mm_EP2.35x2.35mm\",\"Package_DFN_QFN/UQFN-28-1EP_4x4mm_P0.4mm_EP2.35x2.35mm_ThermalVias\",\"Package_DFN_QFN/UQFN-32_5x5mm_P0.5mm\",\"Package_DFN_QFN/UQFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm\",\"Package_DFN_QFN/UQFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm_ThermalVias\",\"Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.45x4.45mm\",\"Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.45x4.45mm_ThermalVias\",\"Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.62x4.62mm\",\"Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.62x4.62mm_ThermalVias\",\"Package_DFN_QFN/VDFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.7mm\",\"Package_DFN_QFN/VQFN-100-1EP_12x12mm_P0.4mm_EP8x8mm\",\"Package_DFN_QFN/VQFN-100-1EP_12x12mm_P0.4mm_EP8x8mm_ThermalVias\",\"Package_DFN_QFN/VQFN-12-1EP_4x4mm_P0.8mm_EP2.1x2.1mm\",\"Package_DFN_QFN/VQFN-12-1EP_4x4mm_P0.8mm_EP2.1x2.1mm_ThermalVias\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.1x1.1mm\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.1x1.1mm_ThermalVias\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm_ThermalVias\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm_ThermalVias\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.8x1.8mm\",\"Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.8x1.8mm_ThermalVias\",\"Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.45mm_EP1.55x1.55mm\",\"Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.45mm_EP1.55x1.55mm_ThermalVias\",\"Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm\",\"Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias\",\"Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm\",\"Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias\",\"Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm\",\"Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias\",\"Package_DFN_QFN/VQFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm\",\"Package_DFN_QFN/VQFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm_ThermalVias\",\"Package_DFN_QFN/VQFN-28-1EP_4x5mm_P0.5mm_EP2.55x3.55mm\",\"Package_DFN_QFN/VQFN-28-1EP_4x5mm_P0.5mm_EP2.55x3.55mm_ThermalVias\",\"Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm\",\"Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm_ThermalVias\",\"Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.7x3.7mm\",\"Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.7x3.7mm_ThermalVias\",\"Package_DFN_QFN/VQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm\",\"Package_DFN_QFN/VQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm_ThermalVias\",\"Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.15x3.15mm\",\"Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.15x3.15mm_ThermalVias\",\"Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm\",\"Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias\",\"Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm\",\"Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm_ThermalVias\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.3x3.3mm\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.3x3.3mm_ThermalVias\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm_ThermalVias\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm_ThermalVias\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.7x3.7mm\",\"Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.7x3.7mm_ThermalVias\",\"Package_DFN_QFN/VQFN-40-1EP_6x6mm_P0.5mm_EP3.5x3.5mm\",\"Package_DFN_QFN/VQFN-40-1EP_6x6mm_P0.5mm_EP3.5x3.5mm_ThermalVias\",\"Package_DFN_QFN/VQFN-46-1EP_5x6mm_P0.4mm_EP2.8x3.8mm\",\"Package_DFN_QFN/VQFN-46-1EP_5x6mm_P0.4mm_EP2.8x3.8mm_ThermalVias\",\"Package_DFN_QFN/VQFN-48-1EP_6x6mm_P0.4mm_EP4.1x4.1mm\",\"Package_DFN_QFN/VQFN-48-1EP_6x6mm_P0.4mm_EP4.1x4.1mm_ThermalVias\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm_ThermalVias\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.2x4.2mm\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.2x4.2mm_ThermalVias\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm\",\"Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias\",\"Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.1x4.96mm\",\"Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.1x4.96mm_ThermalVias\",\"Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.5x5.06mm\",\"Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.5x5.06mm_ThermalVias\",\"Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm\",\"Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm_ThermalVias\",\"Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm\",\"Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm_ThermalVias\",\"Package_DFN_QFN/VQFN-68-1EP_8x8mm_P0.4mm_EP4.3x4.3mm\",\"Package_DFN_QFN/Vishay_PowerPAK_MLP44-24L\",\"Package_DFN_QFN/Vishay_PowerPAK_MLP44-24L_ThermalVias\",\"Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L\",\"Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L_R\",\"Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L_R_ThermalVias\",\"Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L_ThermalVias\",\"Package_DFN_QFN/W-PDFN-8-1EP_6x5mm_P1.27mm_EP3x3mm\",\"Package_DFN_QFN/WCH_QFN-16-1EP_3x3mm_P0.5mm_EP1.8x1.8mm\",\"Package_DFN_QFN/WDFN-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm\",\"Package_DFN_QFN/WDFN-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm_ThermalVias\",\"Package_DFN_QFN/WDFN-12-1EP_3x3mm_P0.45mm_EP1.7x2.5mm\",\"Package_DFN_QFN/WDFN-6-2EP_4.0x2.6mm_P0.65mm\",\"Package_DFN_QFN/WDFN-8-1EP_2x2.2mm_P0.5mm_EP0.80x0.54\",\"Package_DFN_QFN/WDFN-8-1EP_2x2mm_P0.5mm_EP0.8x1.2mm\",\"Package_DFN_QFN/WDFN-8-1EP_3x2mm_P0.5mm_EP1.3x1.4mm\",\"Package_DFN_QFN/WDFN-8-1EP_4x3mm_P0.65mm_EP2.4x1.8mm\",\"Package_DFN_QFN/WDFN-8-1EP_4x3mm_P0.65mm_EP2.4x1.8mm_ThermalVias\",\"Package_DFN_QFN/WDFN-8-1EP_6x5mm_P1.27mm_EP3.4x4mm\",\"Package_DFN_QFN/WDFN-8-1EP_8x6mm_P1.27mm_EP6x4.8mm\",\"Package_DFN_QFN/WDFN-8-1EP_8x6mm_P1.27mm_EP6x4.8mm_ThermalVias\",\"Package_DFN_QFN/WDFN-8_2x2mm_P0.5mm\",\"Package_DFN_QFN/WFDFPN-8-1EP_3x2mm_P0.5mm_EP1.25x1.35mm\",\"Package_DFN_QFN/WQFN-14-1EP_2.5x2.5mm_P0.5mm_EP1.45x1.45mm\",\"Package_DFN_QFN/WQFN-14-1EP_2.5x2.5mm_P0.5mm_EP1.45x1.45mm_ThermalVias\",\"Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm\",\"Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm_ThermalVias\",\"Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm\",\"Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias\",\"Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm\",\"Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm_ThermalVias\",\"Package_DFN_QFN/WQFN-16-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/WQFN-16-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/WQFN-20-1EP_2.5x4.5mm_P0.5mm_EP1x2.9mm\",\"Package_DFN_QFN/WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm\",\"Package_DFN_QFN/WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias\",\"Package_DFN_QFN/WQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm\",\"Package_DFN_QFN/WQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm\",\"Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias\",\"Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm\",\"Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias\",\"Package_DFN_QFN/WQFN-28-1EP_4x4mm_P0.4mm_EP2.7x2.7mm\",\"Package_DFN_QFN/WQFN-28-1EP_4x4mm_P0.4mm_EP2.7x2.7mm_ThermalVias\",\"Package_DFN_QFN/WQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm\",\"Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP2.7x4.7mm\",\"Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP2.7x4.7mm_ThermalVias\",\"Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.15x5.15mm\",\"Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.15x5.15mm_ThermalVias\",\"Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.65x5.65mm\",\"Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.65x5.65mm_ThermalVias\",\"Package_DFN_QFN/WQFN-42-1EP_3.5x9mm_P0.5mm_EP2.05x7.55mm\",\"Package_DFN_QFN/WQFN-42-1EP_3.5x9mm_P0.5mm_EP2.05x7.55mm_ThermalVias\",\"Package_DIP/CERDIP-14_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-14_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-14_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-14_W7.62mm_SideBrazed_Socket\",\"Package_DIP/CERDIP-16_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-16_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-16_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-16_W7.62mm_SideBrazed_Socket\",\"Package_DIP/CERDIP-18_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-18_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-18_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-18_W7.62mm_SideBrazed_Socket\",\"Package_DIP/CERDIP-20_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-20_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-20_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-20_W7.62mm_SideBrazed_Socket\",\"Package_DIP/CERDIP-22_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-22_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-22_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-22_W7.62mm_SideBrazed_Socket\",\"Package_DIP/CERDIP-24_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-24_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-24_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-24_W7.62mm_SideBrazed_Socket\",\"Package_DIP/CERDIP-28_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-28_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-28_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-28_W7.62mm_SideBrazed_Socket\",\"Package_DIP/CERDIP-8_W7.62mm_SideBrazed\",\"Package_DIP/CERDIP-8_W7.62mm_SideBrazed_LongPads\",\"Package_DIP/CERDIP-8_W7.62mm_SideBrazed_LongPads_Socket\",\"Package_DIP/CERDIP-8_W7.62mm_SideBrazed_Socket\",\"Package_DIP/DIP-10_W10.16mm\",\"Package_DIP/DIP-10_W10.16mm_LongPads\",\"Package_DIP/DIP-10_W7.62mm\",\"Package_DIP/DIP-10_W7.62mm_LongPads\",\"Package_DIP/DIP-10_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-10_W7.62mm_Socket\",\"Package_DIP/DIP-10_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-10_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-12_W10.16mm\",\"Package_DIP/DIP-12_W10.16mm_LongPads\",\"Package_DIP/DIP-12_W7.62mm\",\"Package_DIP/DIP-12_W7.62mm_LongPads\",\"Package_DIP/DIP-12_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-12_W7.62mm_Socket\",\"Package_DIP/DIP-12_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-12_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-14_W10.16mm\",\"Package_DIP/DIP-14_W10.16mm_LongPads\",\"Package_DIP/DIP-14_W7.62mm\",\"Package_DIP/DIP-14_W7.62mm_LongPads\",\"Package_DIP/DIP-14_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-14_W7.62mm_Socket\",\"Package_DIP/DIP-14_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-14_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-16_W10.16mm\",\"Package_DIP/DIP-16_W10.16mm_LongPads\",\"Package_DIP/DIP-16_W7.62mm\",\"Package_DIP/DIP-16_W7.62mm_LongPads\",\"Package_DIP/DIP-16_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-16_W7.62mm_Socket\",\"Package_DIP/DIP-16_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-16_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-18_W7.62mm\",\"Package_DIP/DIP-18_W7.62mm_LongPads\",\"Package_DIP/DIP-18_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-18_W7.62mm_Socket\",\"Package_DIP/DIP-18_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-18_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-20_W7.62mm\",\"Package_DIP/DIP-20_W7.62mm_LongPads\",\"Package_DIP/DIP-20_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-20_W7.62mm_Socket\",\"Package_DIP/DIP-20_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-20_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-22_W10.16mm\",\"Package_DIP/DIP-22_W10.16mm_LongPads\",\"Package_DIP/DIP-22_W10.16mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-22_W10.16mm_Socket\",\"Package_DIP/DIP-22_W10.16mm_Socket_LongPads\",\"Package_DIP/DIP-22_W11.43mm_SMDSocket_LongPads\",\"Package_DIP/DIP-22_W7.62mm\",\"Package_DIP/DIP-22_W7.62mm_LongPads\",\"Package_DIP/DIP-22_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-22_W7.62mm_Socket\",\"Package_DIP/DIP-22_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-22_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm\",\"Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_LongPads\",\"Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_Socket\",\"Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-24_W10.16mm\",\"Package_DIP/DIP-24_W10.16mm_LongPads\",\"Package_DIP/DIP-24_W10.16mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-24_W10.16mm_Socket\",\"Package_DIP/DIP-24_W10.16mm_Socket_LongPads\",\"Package_DIP/DIP-24_W11.43mm_SMDSocket_LongPads\",\"Package_DIP/DIP-24_W15.24mm\",\"Package_DIP/DIP-24_W15.24mm_LongPads\",\"Package_DIP/DIP-24_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-24_W15.24mm_Socket\",\"Package_DIP/DIP-24_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-24_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-24_W7.62mm\",\"Package_DIP/DIP-24_W7.62mm_LongPads\",\"Package_DIP/DIP-24_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-24_W7.62mm_Socket\",\"Package_DIP/DIP-24_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-24_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-26_W15.24mm\",\"Package_DIP/DIP-26_W15.24mm_LongPads\",\"Package_DIP/DIP-26_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-26_W15.24mm_Socket\",\"Package_DIP/DIP-26_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-26_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-28_W15.24mm\",\"Package_DIP/DIP-28_W15.24mm_LongPads\",\"Package_DIP/DIP-28_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-28_W15.24mm_Socket\",\"Package_DIP/DIP-28_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-28_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-28_W7.62mm\",\"Package_DIP/DIP-28_W7.62mm_LongPads\",\"Package_DIP/DIP-28_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-28_W7.62mm_Socket\",\"Package_DIP/DIP-28_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-28_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-32_W15.24mm\",\"Package_DIP/DIP-32_W15.24mm_LongPads\",\"Package_DIP/DIP-32_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-32_W15.24mm_Socket\",\"Package_DIP/DIP-32_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-32_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-32_W7.62mm\",\"Package_DIP/DIP-40_W15.24mm\",\"Package_DIP/DIP-40_W15.24mm_LongPads\",\"Package_DIP/DIP-40_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-40_W15.24mm_Socket\",\"Package_DIP/DIP-40_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-40_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-40_W25.4mm\",\"Package_DIP/DIP-40_W25.4mm_LongPads\",\"Package_DIP/DIP-40_W25.4mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-40_W25.4mm_Socket\",\"Package_DIP/DIP-40_W25.4mm_Socket_LongPads\",\"Package_DIP/DIP-40_W26.67mm_SMDSocket_LongPads\",\"Package_DIP/DIP-42_W15.24mm\",\"Package_DIP/DIP-42_W15.24mm_LongPads\",\"Package_DIP/DIP-42_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-42_W15.24mm_Socket\",\"Package_DIP/DIP-42_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-42_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-48_W15.24mm\",\"Package_DIP/DIP-48_W15.24mm_LongPads\",\"Package_DIP/DIP-48_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-48_W15.24mm_Socket\",\"Package_DIP/DIP-48_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-48_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-4_W10.16mm\",\"Package_DIP/DIP-4_W10.16mm_LongPads\",\"Package_DIP/DIP-4_W7.62mm\",\"Package_DIP/DIP-4_W7.62mm_LongPads\",\"Package_DIP/DIP-4_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-4_W7.62mm_Socket\",\"Package_DIP/DIP-4_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-4_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-5-6_W10.16mm\",\"Package_DIP/DIP-5-6_W10.16mm_LongPads\",\"Package_DIP/DIP-5-6_W7.62mm\",\"Package_DIP/DIP-5-6_W7.62mm_LongPads\",\"Package_DIP/DIP-5-6_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-5-6_W7.62mm_Socket\",\"Package_DIP/DIP-5-6_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-5-6_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-64_W15.24mm\",\"Package_DIP/DIP-64_W15.24mm_LongPads\",\"Package_DIP/DIP-64_W15.24mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-64_W15.24mm_Socket\",\"Package_DIP/DIP-64_W15.24mm_Socket_LongPads\",\"Package_DIP/DIP-64_W16.51mm_SMDSocket_LongPads\",\"Package_DIP/DIP-64_W22.86mm\",\"Package_DIP/DIP-64_W22.86mm_LongPads\",\"Package_DIP/DIP-64_W22.86mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-64_W22.86mm_Socket\",\"Package_DIP/DIP-64_W22.86mm_Socket_LongPads\",\"Package_DIP/DIP-64_W24.13mm_SMDSocket_LongPads\",\"Package_DIP/DIP-64_W25.4mm\",\"Package_DIP/DIP-64_W25.4mm_LongPads\",\"Package_DIP/DIP-64_W25.4mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-64_W25.4mm_Socket\",\"Package_DIP/DIP-64_W25.4mm_Socket_LongPads\",\"Package_DIP/DIP-64_W26.67mm_SMDSocket_LongPads\",\"Package_DIP/DIP-6_W10.16mm\",\"Package_DIP/DIP-6_W10.16mm_LongPads\",\"Package_DIP/DIP-6_W7.62mm\",\"Package_DIP/DIP-6_W7.62mm_LongPads\",\"Package_DIP/DIP-6_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-6_W7.62mm_Socket\",\"Package_DIP/DIP-6_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-6_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/DIP-8-16_W7.62mm\",\"Package_DIP/DIP-8-16_W7.62mm_Socket\",\"Package_DIP/DIP-8-16_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-8-N6_W7.62mm\",\"Package_DIP/DIP-8-N7_W7.62mm\",\"Package_DIP/DIP-8_W10.16mm\",\"Package_DIP/DIP-8_W10.16mm_LongPads\",\"Package_DIP/DIP-8_W7.62mm\",\"Package_DIP/DIP-8_W7.62mm_LongPads\",\"Package_DIP/DIP-8_W7.62mm_SMDSocket_SmallPads\",\"Package_DIP/DIP-8_W7.62mm_Socket\",\"Package_DIP/DIP-8_W7.62mm_Socket_LongPads\",\"Package_DIP/DIP-8_W8.89mm_SMDSocket_LongPads\",\"Package_DIP/Fairchild_LSOP-8\",\"Package_DIP/IXYS_Flatpak-8_6.3x9.7mm_P2.54mm\",\"Package_DIP/IXYS_SMD-8_6.3x9.7mm_P2.54mm\",\"Package_DIP/PowerIntegrations_PDIP-8B\",\"Package_DIP/PowerIntegrations_PDIP-8C\",\"Package_DIP/PowerIntegrations_SDIP-10C\",\"Package_DIP/PowerIntegrations_SMD-8\",\"Package_DIP/PowerIntegrations_SMD-8B\",\"Package_DIP/PowerIntegrations_SMD-8C\",\"Package_DIP/PowerIntegrations_eDIP-12B\",\"Package_DIP/SMDIP-10_W11.48mm\",\"Package_DIP/SMDIP-10_W7.62mm\",\"Package_DIP/SMDIP-10_W9.53mm\",\"Package_DIP/SMDIP-10_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-12_W11.48mm\",\"Package_DIP/SMDIP-12_W7.62mm\",\"Package_DIP/SMDIP-12_W9.53mm\",\"Package_DIP/SMDIP-12_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-14_W11.48mm\",\"Package_DIP/SMDIP-14_W7.62mm\",\"Package_DIP/SMDIP-14_W9.53mm\",\"Package_DIP/SMDIP-14_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-16_W11.48mm\",\"Package_DIP/SMDIP-16_W7.62mm\",\"Package_DIP/SMDIP-16_W9.53mm\",\"Package_DIP/SMDIP-16_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-18_W11.48mm\",\"Package_DIP/SMDIP-18_W7.62mm\",\"Package_DIP/SMDIP-18_W9.53mm\",\"Package_DIP/SMDIP-18_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-20_W11.48mm\",\"Package_DIP/SMDIP-20_W7.62mm\",\"Package_DIP/SMDIP-20_W9.53mm\",\"Package_DIP/SMDIP-20_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-22_W11.48mm\",\"Package_DIP/SMDIP-22_W7.62mm\",\"Package_DIP/SMDIP-22_W9.53mm\",\"Package_DIP/SMDIP-22_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-24_W11.48mm\",\"Package_DIP/SMDIP-24_W15.24mm\",\"Package_DIP/SMDIP-24_W7.62mm\",\"Package_DIP/SMDIP-24_W9.53mm\",\"Package_DIP/SMDIP-28_W15.24mm\",\"Package_DIP/SMDIP-32_W11.48mm\",\"Package_DIP/SMDIP-32_W15.24mm\",\"Package_DIP/SMDIP-32_W7.62mm\",\"Package_DIP/SMDIP-32_W9.53mm\",\"Package_DIP/SMDIP-40_W15.24mm\",\"Package_DIP/SMDIP-40_W25.24mm\",\"Package_DIP/SMDIP-42_W15.24mm\",\"Package_DIP/SMDIP-48_W15.24mm\",\"Package_DIP/SMDIP-4_W11.48mm\",\"Package_DIP/SMDIP-4_W7.62mm\",\"Package_DIP/SMDIP-4_W9.53mm\",\"Package_DIP/SMDIP-4_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-64_W15.24mm\",\"Package_DIP/SMDIP-6_W11.48mm\",\"Package_DIP/SMDIP-6_W7.62mm\",\"Package_DIP/SMDIP-6_W9.53mm\",\"Package_DIP/SMDIP-6_W9.53mm_Clearance8mm\",\"Package_DIP/SMDIP-8_W11.48mm\",\"Package_DIP/SMDIP-8_W7.62mm\",\"Package_DIP/SMDIP-8_W9.53mm\",\"Package_DIP/SMDIP-8_W9.53mm_Clearance8mm\",\"Package_DIP/Toshiba_11-7A9\",\"Package_DIP/Vishay_HVM-DIP-3_W7.62mm\",\"Package_DirectFET/DirectFET_L4\",\"Package_DirectFET/DirectFET_L6\",\"Package_DirectFET/DirectFET_L8\",\"Package_DirectFET/DirectFET_LA\",\"Package_DirectFET/DirectFET_M2\",\"Package_DirectFET/DirectFET_M4\",\"Package_DirectFET/DirectFET_MA\",\"Package_DirectFET/DirectFET_MB\",\"Package_DirectFET/DirectFET_MC\",\"Package_DirectFET/DirectFET_MD\",\"Package_DirectFET/DirectFET_ME\",\"Package_DirectFET/DirectFET_MF\",\"Package_DirectFET/DirectFET_MN\",\"Package_DirectFET/DirectFET_MP\",\"Package_DirectFET/DirectFET_MQ\",\"Package_DirectFET/DirectFET_MT\",\"Package_DirectFET/DirectFET_MU\",\"Package_DirectFET/DirectFET_MX\",\"Package_DirectFET/DirectFET_MZ\",\"Package_DirectFET/DirectFET_S1\",\"Package_DirectFET/DirectFET_S2\",\"Package_DirectFET/DirectFET_S3C\",\"Package_DirectFET/DirectFET_SA\",\"Package_DirectFET/DirectFET_SB\",\"Package_DirectFET/DirectFET_SC\",\"Package_DirectFET/DirectFET_SH\",\"Package_DirectFET/DirectFET_SJ\",\"Package_DirectFET/DirectFET_SQ\",\"Package_DirectFET/DirectFET_ST\",\"Package_LCC/Analog_LCC-8_5x5mm_P1.27mm\",\"Package_LCC/MO047AD_PLCC-52_19.1x19.1mm_P1.27mm\",\"Package_LCC/PLCC-20\",\"Package_LCC/PLCC-20_9.0x9.0mm_P1.27mm\",\"Package_LCC/PLCC-20_SMD-Socket\",\"Package_LCC/PLCC-20_THT-Socket\",\"Package_LCC/PLCC-28\",\"Package_LCC/PLCC-28_SMD-Socket\",\"Package_LCC/PLCC-28_THT-Socket\",\"Package_LCC/PLCC-32_11.4x14.0mm_P1.27mm\",\"Package_LCC/PLCC-32_THT-Socket\",\"Package_LCC/PLCC-44\",\"Package_LCC/PLCC-44_16.6x16.6mm_P1.27mm\",\"Package_LCC/PLCC-44_SMD-Socket\",\"Package_LCC/PLCC-44_THT-Socket\",\"Package_LCC/PLCC-52\",\"Package_LCC/PLCC-52_SMD-Socket\",\"Package_LCC/PLCC-52_THT-Socket\",\"Package_LCC/PLCC-68\",\"Package_LCC/PLCC-68_24.2x24.2mm_P1.27mm\",\"Package_LCC/PLCC-68_SMD-Socket\",\"Package_LCC/PLCC-68_THT-Socket\",\"Package_LCC/PLCC-84\",\"Package_LCC/PLCC-84_29.3x29.3mm_P1.27mm\",\"Package_LCC/PLCC-84_SMD-Socket\",\"Package_LCC/PLCC-84_THT-Socket\",\"Package_LGA/AMS_LGA-10-1EP_2.7x4mm_P0.6mm\",\"Package_LGA/AMS_LGA-20_4.7x4.5mm_P0.65mm\",\"Package_LGA/AMS_OLGA-8_2x3.1mm_P0.8mm\",\"Package_LGA/Bosch_LGA-14_3x2.5mm_P0.5mm\",\"Package_LGA/Bosch_LGA-16_4.5x3mm_P0.5mm_LayoutBorder7x1y_ClockwisePinNumbering\",\"Package_LGA/Bosch_LGA-8_2.5x2.5mm_P0.65mm_ClockwisePinNumbering\",\"Package_LGA/Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumbering\",\"Package_LGA/Bosch_LGA-8_3x3mm_P0.8mm_ClockwisePinNumbering\",\"Package_LGA/Infineon_PG-TSNP-6-10_0.7x1.1mm_0.7x1.1mm_P0.4mm\",\"Package_LGA/Kionix_LGA-12_2x2mm_P0.5mm_LayoutBorder2x4y\",\"Package_LGA/LGA-12_2x2mm_P0.5mm\",\"Package_LGA/LGA-14_2x2mm_P0.35mm_LayoutBorder3x4y\",\"Package_LGA/LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4y\",\"Package_LGA/LGA-14_3x5mm_P0.8mm_LayoutBorder1x6y\",\"Package_LGA/LGA-16_3x3mm_P0.5mm\",\"Package_LGA/LGA-16_3x3mm_P0.5mm_LayoutBorder3x5y\",\"Package_LGA/LGA-16_4x4mm_P0.65mm_LayoutBorder4x4y\",\"Package_LGA/LGA-24L_3x3.5mm_P0.43mm\",\"Package_LGA/LGA-28_5.2x3.8mm_P0.5mm\",\"Package_LGA/LGA-8_3x5mm_P1.25mm\",\"Package_LGA/LGA-8_8x6.2mm_P1.27mm\",\"Package_LGA/LGA-8_8x6mm_P1.27mm\",\"Package_LGA/Linear_LGA-133_15.0x15.0mm_Layout12x12_P1.27mm\",\"Package_LGA/MPS_LGA-18-10EP_12x12mm_P3.3mm\",\"Package_LGA/NXP_LGA-8_3x5mm_P1.25mm_H1.1mm\",\"Package_LGA/NXP_LGA-8_3x5mm_P1.25mm_H1.2mm\",\"Package_LGA/NXP_USON-8_1x1.35mm_P0.35mm\",\"Package_LGA/Nordic_nRF9151-LAxx_LGA-80-33EP_12.1x11.1mm_P0.5mm\",\"Package_LGA/Nordic_nRF9160-SIxx_LGA-102-59EP_16.0x10.5mm_P0.5mm\",\"Package_LGA/Rohm_MLGA010V020A_LGA-10_2x2mm_P0.45mm_LayoutBorder2x3y\",\"Package_LGA/ST_CCLGA-7L_2.8x2.8mm_P1.15mm_H1.95mm\",\"Package_LGA/ST_HLGA-10_2.5x2.5mm_P0.6mm_LayoutBorder3x2y\",\"Package_LGA/ST_HLGA-10_2x2mm_P0.5mm_LayoutBorder3x2y\",\"Package_LGA/Texas_SIL0008C_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm\",\"Package_LGA/Texas_SIL0008C_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm_ThermalVias\",\"Package_LGA/Texas_SIL0008D_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm\",\"Package_LGA/Texas_SIL0008D_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm_ThermalVias\",\"Package_LGA/Texas_SIL0010A_MicroSiP-10-1EP_3.8x3mm_P0.6mm_EP0.7x2.9mm\",\"Package_LGA/Texas_SIL0010A_MicroSiP-10-1EP_3.8x3mm_P0.6mm_EP0.7x2.9mm_ThermalVias\",\"Package_LGA/VLGA-4_2x2.5mm_P1.65mm\",\"Package_LGA/ublox_LGA-53_4.5x4.5mm_Layout9x9_P0.5mm\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP4x4mm\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP4x4mm_ThermalVias\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP5x5mm\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP5x5mm_ThermalVias\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP6.61x5.615mm\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP6.61x5.615mm_ThermalVias\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP7.2x6.35mm\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP7.2x6.35mm_ThermalVias\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP8.93x8.7mm\",\"Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP8.93x8.7mm_ThermalVias\",\"Package_QFP/Hitachi_FP80B_PQFP-80_14x20mm_P0.8mm\",\"Package_QFP/LQFP-100-1EP_14x14mm_P0.5mm_EP6.9x6.9mm\",\"Package_QFP/LQFP-100-1EP_14x14mm_P0.5mm_EP6.9x6.9mm_ThermalVias\",\"Package_QFP/LQFP-100_14x14mm_P0.5mm\",\"Package_QFP/LQFP-128_14x14mm_P0.4mm\",\"Package_QFP/LQFP-128_14x20mm_P0.5mm\",\"Package_QFP/LQFP-144-1EP_20x20mm_P0.5mm_EP6.5x6.5mm\",\"Package_QFP/LQFP-144-1EP_20x20mm_P0.5mm_EP6.5x6.5mm_ThermalVias\",\"Package_QFP/LQFP-144_20x20mm_P0.5mm\",\"Package_QFP/LQFP-160_24x24mm_P0.5mm\",\"Package_QFP/LQFP-176-1EP_24x24mm_P0.5mm_EP6.6x6.6mm\",\"Package_QFP/LQFP-176-1EP_24x24mm_P0.5mm_EP6.6x6.6mm_ThermalVias\",\"Package_QFP/LQFP-176_20x20mm_P0.4mm\",\"Package_QFP/LQFP-176_24x24mm_P0.5mm\",\"Package_QFP/LQFP-208_28x28mm_P0.5mm\",\"Package_QFP/LQFP-216_24x24mm_P0.4mm\",\"Package_QFP/LQFP-32_5x5mm_P0.5mm\",\"Package_QFP/LQFP-32_7x7mm_P0.8mm\",\"Package_QFP/LQFP-36_7x7mm_P0.65mm\",\"Package_QFP/LQFP-44_10x10mm_P0.8mm\",\"Package_QFP/LQFP-48-1EP_7x7mm_P0.5mm_EP3.6x3.6mm\",\"Package_QFP/LQFP-48-1EP_7x7mm_P0.5mm_EP3.6x3.6mm_ThermalVias\",\"Package_QFP/LQFP-48_7x7mm_P0.5mm\",\"Package_QFP/LQFP-52-1EP_10x10mm_P0.65mm_EP4.8x4.8mm\",\"Package_QFP/LQFP-52-1EP_10x10mm_P0.65mm_EP4.8x4.8mm_ThermalVias\",\"Package_QFP/LQFP-52_10x10mm_P0.65mm\",\"Package_QFP/LQFP-52_14x14mm_P1mm\",\"Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP5x5mm\",\"Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP5x5mm_ThermalVias\",\"Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP6.5x6.5mm\",\"Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP6.5x6.5mm_ThermalVias\",\"Package_QFP/LQFP-64_10x10mm_P0.5mm\",\"Package_QFP/LQFP-64_14x14mm_P0.8mm\",\"Package_QFP/LQFP-64_7x7mm_P0.4mm\",\"Package_QFP/LQFP-80_10x10mm_P0.4mm\",\"Package_QFP/LQFP-80_12x12mm_P0.5mm\",\"Package_QFP/LQFP-80_14x14mm_P0.65mm\",\"Package_QFP/MO112AC1_PQFP-52_10x10mm_P0.65mm\",\"Package_QFP/Microchip_PQFP-44_10x10mm_P0.8mm\",\"Package_QFP/PQFP-100_14x20mm_P0.65mm\",\"Package_QFP/PQFP-112_20x20mm_P0.65mm\",\"Package_QFP/PQFP-128_28x28mm_P0.8mm\",\"Package_QFP/PQFP-132_24x24mm_P0.635mm\",\"Package_QFP/PQFP-132_24x24mm_P0.635mm_i386\",\"Package_QFP/PQFP-144_28x28mm_P0.65mm\",\"Package_QFP/PQFP-160_28x28mm_P0.65mm\",\"Package_QFP/PQFP-168_28x28mm_P0.65mm\",\"Package_QFP/PQFP-208_28x28mm_P0.5mm\",\"Package_QFP/PQFP-240_32.1x32.1mm_P0.5mm\",\"Package_QFP/PQFP-256_28x28mm_P0.4mm\",\"Package_QFP/PQFP-44_10x10mm_P0.8mm\",\"Package_QFP/PQFP-64_14x14mm_P0.8mm\",\"Package_QFP/PQFP-80_14x14mm_P0.65mm\",\"Package_QFP/PQFP-80_14x20mm_P0.8mm\",\"Package_QFP/TQFP-100-1EP_14x14mm_P0.5mm_EP5x5mm\",\"Package_QFP/TQFP-100-1EP_14x14mm_P0.5mm_EP5x5mm_ThermalVias\",\"Package_QFP/TQFP-100_12x12mm_P0.4mm\",\"Package_QFP/TQFP-100_14x14mm_P0.5mm\",\"Package_QFP/TQFP-120_14x14mm_P0.4mm\",\"Package_QFP/TQFP-128_14x14mm_P0.4mm\",\"Package_QFP/TQFP-144_16x16mm_P0.4mm\",\"Package_QFP/TQFP-144_20x20mm_P0.5mm\",\"Package_QFP/TQFP-176_20x20mm_P0.4mm\",\"Package_QFP/TQFP-176_24x24mm_P0.5mm\",\"Package_QFP/TQFP-32_5x5mm_P0.5mm\",\"Package_QFP/TQFP-32_7x7mm_P0.8mm\",\"Package_QFP/TQFP-44-1EP_10x10mm_P0.8mm_EP4.5x4.5mm\",\"Package_QFP/TQFP-44-1EP_10x10mm_P0.8mm_EP4.5x4.5mm_ThermalVias\",\"Package_QFP/TQFP-44_10x10mm_P0.8mm\",\"Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm\",\"Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_ThermalVias\",\"Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP4.11x4.11mm\",\"Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP5x5mm\",\"Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP5x5mm_ThermalVias\",\"Package_QFP/TQFP-48_7x7mm_P0.5mm\",\"Package_QFP/TQFP-52-1EP_10x10mm_P0.65mm_EP6.5x6.5mm\",\"Package_QFP/TQFP-52-1EP_10x10mm_P0.65mm_EP6.5x6.5mm_ThermalVias\",\"Package_QFP/TQFP-64-1EP_10x10mm_P0.5mm_EP5.305x5.305mm\",\"Package_QFP/TQFP-64-1EP_10x10mm_P0.5mm_EP5.305x5.305mm_ThermalVias\",\"Package_QFP/TQFP-64_10x10mm_P0.5mm\",\"Package_QFP/TQFP-64_14x14mm_P0.8mm\",\"Package_QFP/TQFP-64_7x7mm_P0.4mm\",\"Package_QFP/TQFP-80-1EP_14x14mm_P0.65mm_EP9.5x9.5mm\",\"Package_QFP/TQFP-80-1EP_14x14mm_P0.65mm_EP9.5x9.5mm_ThermalVias\",\"Package_QFP/TQFP-80_12x12mm_P0.5mm\",\"Package_QFP/TQFP-80_14x14mm_P0.65mm\",\"Package_QFP/Texas_PHP0048E_HTQFP-48-1EP_7x7mm_P0.5mm_EP6.5x6.5mm_Mask3.62x3.62mm\",\"Package_QFP/Texas_PHP0048E_HTQFP-48-1EP_7x7mm_P0.5mm_EP6.5x6.5mm_Mask3.62x3.62mm_ThermalVias\",\"Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask4.44x4.44mm\",\"Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask4.44x4.44mm_ThermalVias\",\"Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask5x5mm\",\"Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask5x5mm_ThermalVias\",\"Package_SIP/PowerIntegrations_eSIP-7C\",\"Package_SIP/PowerIntegrations_eSIP-7F\",\"Package_SIP/SIP-8_19x3mm_P2.54mm\",\"Package_SIP/SIP-9_21.54x3mm_P2.54mm\",\"Package_SIP/SIP-9_22.3x3mm_P2.54mm\",\"Package_SIP/SIP3_11.6x8.5mm\",\"Package_SIP/SIP4_Sharp-SSR_P7.62mm_Angled\",\"Package_SIP/SIP4_Sharp-SSR_P7.62mm_Angled_NoHole\",\"Package_SIP/SIP4_Sharp-SSR_P7.62mm_Straight\",\"Package_SIP/SIP9_Housing\",\"Package_SIP/SIP9_Housing_BigPads\",\"Package_SIP/SLA704XM\",\"Package_SIP/STK672-040-E\",\"Package_SIP/STK672-080-E\",\"Package_SIP/Sanyo_STK4xx-15_59.2x8.0mm_P2.54mm\",\"Package_SIP/Sanyo_STK4xx-15_78.0x8.0mm_P2.54mm\",\"Package_SO/Analog_MSOP-12-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm\",\"Package_SO/Analog_MSOP-12-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm_ThermalVias\",\"Package_SO/Analog_MSOP-12-16_3x4.039mm_P0.5mm\",\"Package_SO/Diodes_PSOP-8\",\"Package_SO/Diodes_SO-8EP\",\"Package_SO/ETSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3x4.2mm\",\"Package_SO/HSOP-20-1EP_11.0x15.9mm_P1.27mm_SlugDown\",\"Package_SO/HSOP-20-1EP_11.0x15.9mm_P1.27mm_SlugDown_ThermalVias\",\"Package_SO/HSOP-20-1EP_11.0x15.9mm_P1.27mm_SlugUp\",\"Package_SO/HSOP-32-1EP_7.5x11mm_P0.65mm_EP4.7x4.7mm\",\"Package_SO/HSOP-36-1EP_11.0x15.9mm_P0.65mm_SlugDown\",\"Package_SO/HSOP-36-1EP_11.0x15.9mm_P0.65mm_SlugDown_ThermalVias\",\"Package_SO/HSOP-36-1EP_11.0x15.9mm_P0.65mm_SlugUp\",\"Package_SO/HSOP-54-1EP_7.5x17.9mm_P0.65mm_EP4.6x4.6mm\",\"Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.3x2.3mm\",\"Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.3x2.3mm_ThermalVias\",\"Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.1mm\",\"Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.1mm_ThermalVias\",\"Package_SO/HTSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.4x3.2mm\",\"Package_SO/HTSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.4x3.2mm_ThermalVias\",\"Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm\",\"Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.46x2.31mm\",\"Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.46x2.31mm_ThermalVias\",\"Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.66x2.46mm\",\"Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.66x2.46mm_ThermalVias\",\"Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3x3mm_ThermalVias\",\"Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3x3mm\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.74x3.86mm\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.85x4mm\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.4x3.7mm\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.75x3.43mm\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.75x3.43mm_ThermalVias\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.96x2.96mm\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.96x2.96mm_ThermalVias\",\"Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_ThermalVias\",\"Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.2x5mm\",\"Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.44x3.42mm\",\"Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.44x3.42mm_ThermalVias\",\"Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x2.98mm\",\"Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x2.98mm_ThermalVias\",\"Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x4.68mm\",\"Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x4.68mm_ThermalVias\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.75x6.2mm\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.75x6.2mm_ThermalVias\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm_ThermalVias\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm_Mask2.4x6.17mm\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm_Mask2.4x6.17mm_ThermalVias\",\"Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm_ThermalVias\",\"Package_SO/HTSSOP-32-1EP_6.1x11mm_P0.65mm_EP5.2x11mm_Mask4.11x4.36mm\",\"Package_SO/HTSSOP-32-1EP_6.1x11mm_P0.65mm_EP5.2x11mm_Mask4.11x4.36mm_ThermalVias\",\"Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP1.5x3.3mm\",\"Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP1.5x3.3mm_ThermalVias\",\"Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm\",\"Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm_ThermalVias\",\"Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP3.05x6.65mm\",\"Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP3.05x6.65mm_ThermalVias\",\"Package_SO/HTSSOP-38-1EP_6.1x12.5mm_P0.65mm_EP5.2x12.5mm_Mask3.39x6.35mm\",\"Package_SO/HTSSOP-38-1EP_6.1x12.5mm_P0.65mm_EP5.2x12.5mm_Mask3.39x6.35mm_ThermalVias\",\"Package_SO/HTSSOP-44-1EP_6.1x14mm_P0.635mm_EP5.2x14mm_Mask4.31x8.26mm\",\"Package_SO/HTSSOP-44-1EP_6.1x14mm_P0.635mm_EP5.2x14mm_Mask4.31x8.26mm_ThermalVias\",\"Package_SO/HTSSOP-44_6.1x14mm_P0.635mm_TopEP4.14x7.01mm\",\"Package_SO/HTSSOP-56-1EP_6.1x14mm_P0.5mm_EP3.61x6.35mm\",\"Package_SO/HVSSOP-10-1EP_3x3mm_P0.5mm_EP1.83x1.89mm\",\"Package_SO/HVSSOP-10-1EP_3x3mm_P0.5mm_EP1.83x1.89mm_ThermalVias\",\"Package_SO/HVSSOP-8-1EP_3x3mm_P0.65mm_EP1.57x1.89mm\",\"Package_SO/HVSSOP-8-1EP_3x3mm_P0.65mm_EP1.57x1.89mm_ThermalVias\",\"Package_SO/Infineon_PG-DSO-12-11\",\"Package_SO/Infineon_PG-DSO-12-11_ThermalVias\",\"Package_SO/Infineon_PG-DSO-12-9\",\"Package_SO/Infineon_PG-DSO-12-9_ThermalVias\",\"Package_SO/Infineon_PG-DSO-20-30\",\"Package_SO/Infineon_PG-DSO-20-30_ThermalVias\",\"Package_SO/Infineon_PG-DSO-20-32\",\"Package_SO/Infineon_PG-DSO-20-85\",\"Package_SO/Infineon_PG-DSO-20-85_ThermalVias\",\"Package_SO/Infineon_PG-DSO-20-87\",\"Package_SO/Infineon_PG-DSO-20-U03_7.5x12.8mm\",\"Package_SO/Infineon_PG-DSO-8-24_4x5mm\",\"Package_SO/Infineon_PG-DSO-8-27_3.9x4.9mm_EP2.65x3mm\",\"Package_SO/Infineon_PG-DSO-8-27_3.9x4.9mm_EP2.65x3mm_ThermalVias\",\"Package_SO/Infineon_PG-DSO-8-43\",\"Package_SO/Infineon_PG-DSO-8-59_7.5x6.3mm\",\"Package_SO/Infineon_PG-TSDSO-14-22\",\"Package_SO/Infineon_SOIC-20W_7.6x12.8mm_P1.27mm\",\"Package_SO/JEITA_SOIC-16_3.9x9.9mm_P1.27mm\",\"Package_SO/JEITA_SOIC-8_3.9x4.9mm_P1.27mm\",\"Package_SO/Linear_HTSSOP-31-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm\",\"Package_SO/Linear_HTSSOP-31-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm_ThermalVias\",\"Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.68x1.88mm\",\"Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.68x1.88mm_ThermalVias\",\"Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.73x1.98mm\",\"Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.73x1.98mm_ThermalVias\",\"Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP2.2x3.1mm_Mask1.83x1.89mm\",\"Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP2.2x3.1mm_Mask1.83x1.89mm_ThermalVias\",\"Package_SO/MSOP-10_3x3mm_P0.5mm\",\"Package_SO/MSOP-12-1EP_3x4.039mm_P0.65mm_EP1.651x2.845mm\",\"Package_SO/MSOP-12-1EP_3x4.039mm_P0.65mm_EP1.651x2.845mm_ThermalVias\",\"Package_SO/MSOP-12_3x4.039mm_P0.65mm\",\"Package_SO/MSOP-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm\",\"Package_SO/MSOP-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm_ThermalVias\",\"Package_SO/MSOP-16_3x4.039mm_P0.5mm\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.5x1.8mm\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.5x1.8mm_ThermalVias\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.68x1.88mm\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.68x1.88mm_ThermalVias\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.73x1.85mm\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.73x1.85mm_ThermalVias\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.95x2.15mm\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.95x2.15mm_ThermalVias\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP2.5x3mm_Mask1.73x2.36mm\",\"Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP2.5x3mm_Mask1.73x2.36mm_ThermalVias\",\"Package_SO/MSOP-8_3x3mm_P0.65mm\",\"Package_SO/NXP_HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.2x3.4mm\",\"Package_SO/NXP_HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.2x3.4mm_ThermalVias\",\"Package_SO/ONSemi_SO-8FL_488AA\",\"Package_SO/OnSemi_751EP_SOIC-4_3.9x4.725mm_P2.54mm\",\"Package_SO/OnSemi_Micro8\",\"Package_SO/PSOP-44_16.9x27.17mm_P1.27mm\",\"Package_SO/PowerIntegrations_SO-8\",\"Package_SO/PowerIntegrations_SO-8B\",\"Package_SO/PowerIntegrations_SO-8C\",\"Package_SO/PowerIntegrations_eSOP-12B\",\"Package_SO/PowerPAK_SO-8L_Single\",\"Package_SO/PowerPAK_SO-8_Dual\",\"Package_SO/PowerPAK_SO-8_Single\",\"Package_SO/PowerSSO-16-1EP_3.9x4.9mm_P0.5mm_EP2.5x3.61mm\",\"Package_SO/PowerSSO-16-1EP_3.9x4.9mm_P0.5mm_EP2.5x3.61mm_ThermalVias\",\"Package_SO/QSOP-16_3.9x4.9mm_P0.635mm\",\"Package_SO/QSOP-20_3.9x8.7mm_P0.635mm\",\"Package_SO/QSOP-24_3.9x8.7mm_P0.635mm\",\"Package_SO/QSOP-28_3.9x9.9mm_P0.635mm\",\"Package_SO/Renesas_SOP-32_11.4x20.75mm_P1.27mm\",\"Package_SO/SO-14_3.9x8.65mm_P1.27mm\",\"Package_SO/SO-14_5.3x10.2mm_P1.27mm\",\"Package_SO/SO-16_3.9x9.9mm_P1.27mm\",\"Package_SO/SO-16_5.3x10.2mm_P1.27mm\",\"Package_SO/SO-20-1EP_7.52x12.825mm_P1.27mm_EP6.045x12.09mm_Mask3.56x4.47mm\",\"Package_SO/SO-20-1EP_7.52x12.825mm_P1.27mm_EP6.045x12.09mm_Mask3.56x4.47mm_ThermalVias\",\"Package_SO/SO-20_12.8x7.5mm_P1.27mm\",\"Package_SO/SO-20_5.3x12.6mm_P1.27mm\",\"Package_SO/SO-24_5.3x15mm_P1.27mm\",\"Package_SO/SO-4_4.4x2.3mm_P1.27mm\",\"Package_SO/SO-4_4.4x3.6mm_P2.54mm\",\"Package_SO/SO-4_4.4x3.9mm_P2.54mm\",\"Package_SO/SO-4_4.4x4.3mm_P2.54mm\",\"Package_SO/SO-4_7.6x3.6mm_P2.54mm\",\"Package_SO/SO-5-6_4.55x3.7mm_P1.27mm\",\"Package_SO/SO-6L_10x3.84mm_P1.27mm\",\"Package_SO/SO-6_4.4x3.6mm_P1.27mm\",\"Package_SO/SO-8_3.9x4.9mm_P1.27mm\",\"Package_SO/SOIC-10_3.9x4.9mm_P1mm\",\"Package_SO/SOIC-14-16_3.9x9.9mm_P1.27mm\",\"Package_SO/SOIC-14W_7.5x9mm_P1.27mm\",\"Package_SO/SOIC-14_3.9x8.7mm_P1.27mm\",\"Package_SO/SOIC-16W-12_7.5x10.3mm_P1.27mm\",\"Package_SO/SOIC-16W_5.3x10.2mm_P1.27mm\",\"Package_SO/SOIC-16W_7.5x10.3mm_P1.27mm\",\"Package_SO/SOIC-16W_7.5x12.8mm_P1.27mm\",\"Package_SO/SOIC-16_3.9x9.9mm_P1.27mm\",\"Package_SO/SOIC-16_4.55x10.3mm_P1.27mm\",\"Package_SO/SOIC-18W_7.5x11.6mm_P1.27mm\",\"Package_SO/SOIC-20W_7.5x12.8mm_P1.27mm\",\"Package_SO/SOIC-20W_7.5x15.4mm_P1.27mm\",\"Package_SO/SOIC-24W_7.5x15.4mm_P1.27mm\",\"Package_SO/SOIC-28W_7.5x17.9mm_P1.27mm\",\"Package_SO/SOIC-28W_7.5x18.7mm_P1.27mm\",\"Package_SO/SOIC-32_7.518x20.777mm_P1.27mm\",\"Package_SO/SOIC-4_4.55x2.6mm_P1.27mm\",\"Package_SO/SOIC-4_4.55x3.7mm_P2.54mm\",\"Package_SO/SOIC-5-6_4.4x3.6mm_P1.27mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mm_ThermalVias\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalVias\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.81mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.81mm_ThermalVias\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.514x3.2mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.514x3.2mm_ThermalVias\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.62x3.51mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.62x3.51mm_ThermalVias\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.71x3.7mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.71x3.7mm_ThermalVias\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.34x2.34mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.34x2.34mm_ThermalVias\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.71x3.4mm\",\"Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.71x3.4mm_ThermalVias\",\"Package_SO/SOIC-8-N7_3.9x4.9mm_P1.27mm\",\"Package_SO/SOIC-8_3.81x9.347mm_P2.54mm\",\"Package_SO/SOIC-8_3.9x4.9mm_P1.27mm\",\"Package_SO/SOIC-8_5.3x5.3mm_P1.27mm\",\"Package_SO/SOIC-8_5.3x6.2mm_P1.27mm\",\"Package_SO/SOIC-8_7.5x5.85mm_P1.27mm\",\"Package_SO/SOJ-24_7.62x15.875mm_P1.27mm\",\"Package_SO/SOJ-28_10.16x18.415mm_P1.27mm\",\"Package_SO/SOJ-28_7.62x18.415mm_P1.27mm\",\"Package_SO/SOJ-32_10.16x20.955mm_P1.27mm\",\"Package_SO/SOJ-32_7.62x20.955mm_P1.27mm\",\"Package_SO/SOJ-36_10.16x23.495mm_P1.27mm\",\"Package_SO/SOJ-44_10.16x28.575mm_P1.27mm\",\"Package_SO/SOP-16_4.4x10.4mm_P1.27mm\",\"Package_SO/SOP-16_4.55x10.3mm_P1.27mm\",\"Package_SO/SOP-18_7.495x11.515mm_P1.27mm\",\"Package_SO/SOP-18_7x12.5mm_P1.27mm\",\"Package_SO/SOP-20_7.5x12.8mm_P1.27mm\",\"Package_SO/SOP-24_7.5x15.4mm_P1.27mm\",\"Package_SO/SOP-28_8.4x18.16mm_P1.27mm\",\"Package_SO/SOP-32_11.305x20.495mm_P1.27mm\",\"Package_SO/SOP-44_12.6x28.5mm_P1.27mm\",\"Package_SO/SOP-44_13.3x28.2mm_P1.27mm\",\"Package_SO/SOP-4_3.8x4.1mm_P2.54mm\",\"Package_SO/SOP-4_4.4x2.6mm_P1.27mm\",\"Package_SO/SOP-4_7.5x4.1mm_P2.54mm\",\"Package_SO/SOP-8-1EP_4.57x4.57mm_P1.27mm_EP4.57x4.45mm\",\"Package_SO/SOP-8-1EP_4.57x4.57mm_P1.27mm_EP4.57x4.45mm_ThermalVias\",\"Package_SO/SOP-8_3.76x4.96mm_P1.27mm\",\"Package_SO/SOP-8_6.605x9.655mm_P2.54mm\",\"Package_SO/SOP-8_6.62x9.15mm_P2.54mm\",\"Package_SO/SSO-4_6.7x5.1mm_P2.54mm_Clearance8mm\",\"Package_SO/SSO-6_6.8x4.6mm_P1.27mm_Clearance7mm\",\"Package_SO/SSO-6_6.8x4.6mm_P1.27mm_Clearance8mm\",\"Package_SO/SSO-7-8_6.4x9.78mm_P2.54mm\",\"Package_SO/SSO-8-7_6.4x9.7mm_P2.54mm\",\"Package_SO/SSO-8_13.6x6.3mm_P1.27mm_Clearance14.2mm\",\"Package_SO/SSO-8_6.7x9.8mm_P2.54mm_Clearance8mm\",\"Package_SO/SSO-8_6.8x5.9mm_P1.27mm_Clearance7mm\",\"Package_SO/SSO-8_6.8x5.9mm_P1.27mm_Clearance8mm\",\"Package_SO/SSO-8_9.6x6.3mm_P1.27mm_Clearance10.5mm\",\"Package_SO/SSOP-10-1EP_3.9x4.9mm_P1mm_EP2.1x3.3mm\",\"Package_SO/SSOP-10-1EP_3.9x4.9mm_P1mm_EP2.1x3.3mm_ThermalVias\",\"Package_SO/SSOP-10_3.9x4.9mm_P1.00mm\",\"Package_SO/SSOP-14_5.3x6.2mm_P0.65mm\",\"Package_SO/SSOP-16_3.9x4.9mm_P0.635mm\",\"Package_SO/SSOP-16_4.4x5.2mm_P0.65mm\",\"Package_SO/SSOP-16_5.3x6.2mm_P0.65mm\",\"Package_SO/SSOP-18_4.4x6.5mm_P0.65mm\",\"Package_SO/SSOP-20_3.9x8.7mm_P0.635mm\",\"Package_SO/SSOP-20_4.4x6.5mm_P0.65mm\",\"Package_SO/SSOP-20_5.3x7.2mm_P0.65mm\",\"Package_SO/SSOP-24_3.9x8.7mm_P0.635mm\",\"Package_SO/SSOP-24_5.3x8.2mm_P0.65mm\",\"Package_SO/SSOP-28_3.9x9.9mm_P0.635mm\",\"Package_SO/SSOP-28_5.3x10.2mm_P0.65mm\",\"Package_SO/SSOP-40_8.8x17.5mm_P0.8mm\",\"Package_SO/SSOP-44_5.3x12.8mm_P0.5mm\",\"Package_SO/SSOP-48_5.3x12.8mm_P0.5mm\",\"Package_SO/SSOP-48_7.5x15.9mm_P0.635mm\",\"Package_SO/SSOP-4_4.4x2.6mm_P1.27mm\",\"Package_SO/SSOP-56_7.5x18.5mm_P0.635mm\",\"Package_SO/SSOP-8_2.95x2.8mm_P0.65mm\",\"Package_SO/SSOP-8_3.95x5.21x3.27mm_P1.27mm\",\"Package_SO/SSOP-8_3.9x5.05mm_P1.27mm\",\"Package_SO/SSOP-8_5.3x3mm_P0.65mm\",\"Package_SO/STC_SOP-16_3.9x9.9mm_P1.27mm\",\"Package_SO/ST_MultiPowerSO-30\",\"Package_SO/ST_PowerSSO-24_SlugDown\",\"Package_SO/ST_PowerSSO-24_SlugDown_ThermalVias\",\"Package_SO/ST_PowerSSO-24_SlugUp\",\"Package_SO/ST_PowerSSO-36_SlugDown\",\"Package_SO/ST_PowerSSO-36_SlugDown_ThermalVias\",\"Package_SO/ST_PowerSSO-36_SlugUp\",\"Package_SO/TI_SO-PowerPAD-8\",\"Package_SO/TI_SO-PowerPAD-8_ThermalVias\",\"Package_SO/TSOP-5_1.65x3.05mm_P0.95mm\",\"Package_SO/TSOP-6_1.65x3.05mm_P0.95mm\",\"Package_SO/TSOP-I-24_12.4x6mm_P0.5mm\",\"Package_SO/TSOP-I-24_14.4x6mm_P0.5mm\",\"Package_SO/TSOP-I-24_16.4x6mm_P0.5mm\",\"Package_SO/TSOP-I-24_18.4x6mm_P0.5mm\",\"Package_SO/TSOP-I-28_11.8x8mm_P0.55mm\",\"Package_SO/TSOP-I-32_11.8x8mm_P0.5mm\",\"Package_SO/TSOP-I-32_12.4x8mm_P0.5mm\",\"Package_SO/TSOP-I-32_14.4x8mm_P0.5mm\",\"Package_SO/TSOP-I-32_16.4x8mm_P0.5mm\",\"Package_SO/TSOP-I-32_18.4x8mm_P0.5mm\",\"Package_SO/TSOP-I-32_18.4x8mm_P0.5mm_Reverse\",\"Package_SO/TSOP-I-40_12.4x10mm_P0.5mm\",\"Package_SO/TSOP-I-40_14.4x10mm_P0.5mm\",\"Package_SO/TSOP-I-40_16.4x10mm_P0.5mm\",\"Package_SO/TSOP-I-40_18.4x10mm_P0.5mm\",\"Package_SO/TSOP-I-48_12.4x12mm_P0.5mm\",\"Package_SO/TSOP-I-48_14.4x12mm_P0.5mm\",\"Package_SO/TSOP-I-48_16.4x12mm_P0.5mm\",\"Package_SO/TSOP-I-48_18.4x12mm_P0.5mm\",\"Package_SO/TSOP-I-56_14.4x14mm_P0.5mm\",\"Package_SO/TSOP-I-56_16.4x14mm_P0.5mm\",\"Package_SO/TSOP-I-56_18.4x14mm_P0.5mm\",\"Package_SO/TSOP-II-32_21.0x10.2mm_P1.27mm\",\"Package_SO/TSOP-II-40-44_10.16x18.37mm_P0.8mm\",\"Package_SO/TSOP-II-44_10.16x18.41mm_P0.8mm\",\"Package_SO/TSOP-II-54_22.2x10.16mm_P0.8mm\",\"Package_SO/TSSOP-100_6.1x20.8mm_P0.4mm\",\"Package_SO/TSSOP-10_3x3mm_P0.5mm\",\"Package_SO/TSSOP-14-1EP_4.4x5mm_P0.65mm\",\"Package_SO/TSSOP-14_4.4x3.6mm_P0.4mm\",\"Package_SO/TSSOP-14_4.4x5mm_P0.65mm\",\"Package_SO/TSSOP-16-1EP_4.4x5mm_P0.65mm\",\"Package_SO/TSSOP-16-1EP_4.4x5mm_P0.65mm_EP3x3mm\",\"Package_SO/TSSOP-16-1EP_4.4x5mm_P0.65mm_EP3x3mm_ThermalVias\",\"Package_SO/TSSOP-16_4.4x3.6mm_P0.4mm\",\"Package_SO/TSSOP-16_4.4x5mm_P0.65mm\",\"Package_SO/TSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.15x3.35mm\",\"Package_SO/TSSOP-20_4.4x5mm_P0.4mm\",\"Package_SO/TSSOP-20_4.4x5mm_P0.5mm\",\"Package_SO/TSSOP-20_4.4x6.5mm_P0.65mm\",\"Package_SO/TSSOP-24_4.4x5mm_P0.4mm\",\"Package_SO/TSSOP-24_4.4x6.5mm_P0.5mm\",\"Package_SO/TSSOP-24_4.4x7.8mm_P0.65mm\",\"Package_SO/TSSOP-24_6.1x7.8mm_P0.65mm\",\"Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.74x4.75mm\",\"Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.74x4.75mm_ThermalVias\",\"Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x6.7mm\",\"Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.05x7.56mm\",\"Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.05x7.56mm_ThermalVias\",\"Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask3.1x4.05mm\",\"Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask3.1x4.05mm_ThermalVias\",\"Package_SO/TSSOP-28_4.4x7.8mm_P0.5mm\",\"Package_SO/TSSOP-28_4.4x9.7mm_P0.65mm\",\"Package_SO/TSSOP-28_6.1x7.8mm_P0.5mm\",\"Package_SO/TSSOP-28_6.1x9.7mm_P0.65mm\",\"Package_SO/TSSOP-28_8x9.7mm_P0.65mm\",\"Package_SO/TSSOP-30_4.4x7.8mm_P0.5mm\",\"Package_SO/TSSOP-30_6.1x9.7mm_P0.65mm\",\"Package_SO/TSSOP-32_4.4x6.5mm_P0.4mm\",\"Package_SO/TSSOP-32_6.1x11mm_P0.65mm\",\"Package_SO/TSSOP-32_8x11mm_P0.65mm\",\"Package_SO/TSSOP-36_4.4x7.8mm_P0.4mm\",\"Package_SO/TSSOP-36_4.4x9.7mm_P0.5mm\",\"Package_SO/TSSOP-36_6.1x12.5mm_P0.65mm\",\"Package_SO/TSSOP-36_6.1x7.8mm_P0.4mm\",\"Package_SO/TSSOP-36_6.1x9.7mm_P0.5mm\",\"Package_SO/TSSOP-36_8x12.5mm_P0.65mm\",\"Package_SO/TSSOP-36_8x9.7mm_P0.5mm\",\"Package_SO/TSSOP-38_4.4x9.7mm_P0.5mm\",\"Package_SO/TSSOP-38_6.1x12.5mm_P0.65mm\",\"Package_SO/TSSOP-40_6.1x11mm_P0.5mm\",\"Package_SO/TSSOP-40_6.1x14mm_P0.65mm\",\"Package_SO/TSSOP-40_8x11mm_P0.5mm\",\"Package_SO/TSSOP-40_8x14mm_P0.65mm\",\"Package_SO/TSSOP-44_4.4x11.2mm_P0.5mm\",\"Package_SO/TSSOP-44_4.4x11mm_P0.5mm\",\"Package_SO/TSSOP-44_6.1x11mm_P0.5mm\",\"Package_SO/TSSOP-48_4.4x9.7mm_P0.4mm\",\"Package_SO/TSSOP-48_6.1x12.5mm_P0.5mm\",\"Package_SO/TSSOP-48_6.1x9.7mm_P0.4mm\",\"Package_SO/TSSOP-48_8x12.5mm_P0.5mm\",\"Package_SO/TSSOP-48_8x9.7mm_P0.4mm\",\"Package_SO/TSSOP-4_4.4x5mm_P4mm\",\"Package_SO/TSSOP-50_4.4x12.5mm_P0.5mm\",\"Package_SO/TSSOP-52_6.1x11mm_P0.4mm\",\"Package_SO/TSSOP-52_8x11mm_P0.4mm\",\"Package_SO/TSSOP-56_4.4x11.3mm_P0.4mm\",\"Package_SO/TSSOP-56_6.1x12.5mm_P0.4mm\",\"Package_SO/TSSOP-56_6.1x14mm_P0.5mm\",\"Package_SO/TSSOP-56_8x12.5mm_P0.4mm\",\"Package_SO/TSSOP-56_8x14mm_P0.5mm\",\"Package_SO/TSSOP-60_8x12.5mm_P0.4mm\",\"Package_SO/TSSOP-64_6.1x14mm_P0.4mm\",\"Package_SO/TSSOP-64_6.1x17mm_P0.5mm\",\"Package_SO/TSSOP-64_8x14mm_P0.4mm\",\"Package_SO/TSSOP-68_8x14mm_P0.4mm\",\"Package_SO/TSSOP-80_6.1x17mm_P0.4mm\",\"Package_SO/TSSOP-8_3x3mm_P0.65mm\",\"Package_SO/TSSOP-8_4.4x3mm_P0.65mm\",\"Package_SO/Texas_DAD0032A_HTSSOP-32_6.1x11mm_P0.65mm_TopEP3.71x3.81mm\",\"Package_SO/Texas_DGN0008B_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x3mm_Mask1.88x1.98mm\",\"Package_SO/Texas_DGN0008B_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x3mm_Mask1.88x1.98mm_ThermalVias\",\"Package_SO/Texas_DGN0008D_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.57x1.89mm\",\"Package_SO/Texas_DGN0008D_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.57x1.89mm_ThermalVias\",\"Package_SO/Texas_DGN0008G_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.846x2.15mm\",\"Package_SO/Texas_DGN0008G_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.846x2.15mm_ThermalVias\",\"Package_SO/Texas_DGS0020A_TSSOP-20_3x5.1mm_P0.5mm\",\"Package_SO/Texas_DKD0036A_HSSOP-36_11x15.9mm_P0.65mm_TopEP5.85x12.65mm\",\"Package_SO/Texas_DYY0016A_TSOT-23-16_2x4.2mm_P0.5mm\",\"Package_SO/Texas_HSOP-8-1EP_3.9x4.9mm_P1.27mm\",\"Package_SO/Texas_HSOP-8-1EP_3.9x4.9mm_P1.27mm_ThermalVias\",\"Package_SO/Texas_HTSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.4x3.1mm_ThermalVias\",\"Package_SO/Texas_HTSSOP-14-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3.155x3.255mm\",\"Package_SO/Texas_HTSSOP-14-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3.155x3.255mm_ThermalVias\",\"Package_SO/Texas_PW0020A_TSSOP-20_4.4x6.5mm_P0.65mm\",\"Package_SO/Texas_PWP0020A\",\"Package_SO/Texas_PWP0028V_TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask2.94x5.62mm\",\"Package_SO/Texas_PWP0028V_TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask2.94x5.62mm_ThermalVias\",\"Package_SO/Texas_R-PDSO-G8_EP2.95x4.9mm_Mask2.4x3.1mm\",\"Package_SO/Texas_R-PDSO-G8_EP2.95x4.9mm_Mask2.4x3.1mm_ThermalVias\",\"Package_SO/Texas_S-PDSO-G8_3x3mm_P0.65mm\",\"Package_SO/Toshiba_SOIC-4-6_4.4x3.6mm_P1.27mm\",\"Package_SO/Toshiba_SOIC-5-6_4.4x3.6mm_P1.27mm\",\"Package_SO/VSO-40_7.6x15.4mm_P0.762mm\",\"Package_SO/VSO-56_11.1x21.5mm_P0.75mm\",\"Package_SO/VSSOP-8_2.3x2mm_P0.5mm\",\"Package_SO/VSSOP-8_3x3mm_P0.65mm\",\"Package_SO/Vishay_PowerPAK_1212-8_Dual\",\"Package_SO/Vishay_PowerPAK_1212-8_Single\",\"Package_SO/Zetex_SM8\",\"Package_SON/Diodes_PowerDI3333-8\",\"Package_SON/Diodes_PowerDI3333-8_UXC_3.3x3.3mm_P0.65mm\",\"Package_SON/EPSON_CE-USON-10_USON-10_3.2x2.5mm_P0.7mm\",\"Package_SON/Fairchild_DualPower33-6_3x3mm\",\"Package_SON/Fairchild_MicroPak-6_1.0x1.45mm_P0.5mm\",\"Package_SON/Fairchild_MicroPak2-6_1.0x1.0mm_P0.35mm\",\"Package_SON/HUSON-3-1EP_2x2mm_P1.3mm_EP1.1x1.6mm\",\"Package_SON/HVSON-8-1EP_3x3mm_P0.65mm_EP1.6x2.4mm\",\"Package_SON/HVSON-8-1EP_4x4mm_P0.8mm_EP2.2x3.1mm\",\"Package_SON/Infineon_PG-LSON-8-1\",\"Package_SON/Infineon_PG-TDSON-8_6.15x5.15mm\",\"Package_SON/Infineon_PG-TISON-8-2\",\"Package_SON/Infineon_PG-TISON-8-3\",\"Package_SON/Infineon_PG-TISON-8-4\",\"Package_SON/Infineon_PG-TISON-8-5\",\"Package_SON/MPS_USON-6_1.2x1.6mm_P0.5mm\",\"Package_SON/MPS_VSON-6_1x1.5mm_P0.5mm\",\"Package_SON/MicroCrystal_C7_SON-8_1.5x3.2mm_P0.9mm\",\"Package_SON/Microchip_USON-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm\",\"Package_SON/Microchip_USON-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm_ThermalVias\",\"Package_SON/NXP_XSON-16\",\"Package_SON/Nexperia_HUSON-12_USON-12-1EP_1.35x2.5mm_P0.4mm_EP0.4x2mm\",\"Package_SON/Nexperia_HUSON-16_USON-16-1EP_1.35x3.3mm_P0.4mm_EP0.4x2.8mm\",\"Package_SON/Nexperia_HUSON-8_USON-8-1EP_1.35x1.7mm_P0.4mm_EP0.4x1.2mm\",\"Package_SON/ROHM_VML0806\",\"Package_SON/RTC_SMD_MicroCrystal_C3_2.5x3.7mm\",\"Package_SON/SON-8-1EP_3x2mm_P0.5mm_EP1.4x1.6mm\",\"Package_SON/ST_PowerFLAT-6L_5x6mm_P1.27mm\",\"Package_SON/ST_PowerFLAT_HV-5_8x8mm\",\"Package_SON/ST_PowerFLAT_HV-8_5x6mm\",\"Package_SON/Texas_DPY0002A_0.6x1mm_P0.65mm\",\"Package_SON/Texas_DQK\",\"Package_SON/Texas_DQX002A\",\"Package_SON/Texas_DRC0010J\",\"Package_SON/Texas_DRC0010J_ThermalVias\",\"Package_SON/Texas_DRX_WSON-10_2.5x2.5mm_P0.5mm\",\"Package_SON/Texas_DSC0010J\",\"Package_SON/Texas_DSC0010J_ThermalVias\",\"Package_SON/Texas_DSG0008A_WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm\",\"Package_SON/Texas_DSG0008A_WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm_ThermalVias\",\"Package_SON/Texas_PWSON-N6\",\"Package_SON/Texas_R-PUSON-N14\",\"Package_SON/Texas_R-PUSON-N8_USON-8-1EP_1.6x2.1mm_P0.5mm_EP0.4x1.7mm\",\"Package_SON/Texas_R-PWSON-N12_EP0.4x2mm\",\"Package_SON/Texas_S-PDSO-N12\",\"Package_SON/Texas_S-PVSON-N10\",\"Package_SON/Texas_S-PVSON-N10_ThermalVias\",\"Package_SON/Texas_S-PVSON-N8\",\"Package_SON/Texas_S-PVSON-N8_ThermalVias\",\"Package_SON/Texas_S-PWSON-N10\",\"Package_SON/Texas_S-PWSON-N10_ThermalVias\",\"Package_SON/Texas_S-PWSON-N8_EP1.2x2mm\",\"Package_SON/Texas_S-PWSON-N8_EP1.2x2mm_ThermalVias\",\"Package_SON/Texas_USON-6_1x1.45mm_P0.5mm_SMD\",\"Package_SON/Texas_VSON-HR-8_1.5x2mm_P0.5mm\",\"Package_SON/Texas_X2SON-4-1EP_1.1x1.4mm_P0.5mm_EP0.8x0.6mm\",\"Package_SON/Texas_X2SON-4-1EP_1.1x1.4mm_P0.5mm_EP0.8x0.6mm_ThermalVias\",\"Package_SON/Texas_X2SON-4_1x1mm_P0.65mm\",\"Package_SON/Texas_X2SON-5_0.8x0.8mm_P0.48mm\",\"Package_SON/Texas_X2SON-5_0.8x0.8mm_P0.48mm_RoutingVia\",\"Package_SON/USON-10_2.5x1.0mm_P0.5mm\",\"Package_SON/USON-20_2x4mm_P0.4mm\",\"Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.2x2mm\",\"Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.2x2mm_ThermalVias\",\"Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.65x2.4mm\",\"Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.65x2.4mm_ThermalVias\",\"Package_SON/VSON-14-1EP_3x4.45mm_P0.65mm_EP1.6x4.2mm\",\"Package_SON/VSON-14-1EP_3x4.45mm_P0.65mm_EP1.6x4.2mm_ThermalVias\",\"Package_SON/VSON-8-1EP_3x3mm_P0.65mm_EP1.65x2.4mm\",\"Package_SON/VSON-8-1EP_3x3mm_P0.65mm_EP1.65x2.4mm_ThermalVias\",\"Package_SON/VSON-8-1EP_3x3mm_P0.65mm_EP1.6x2.4mm\",\"Package_SON/VSON-8_1.5x2mm_P0.5mm\",\"Package_SON/VSON-8_3.3x3.3mm_P0.65mm_NexFET\",\"Package_SON/VSONP-8-1EP_5x6_P1.27mm\",\"Package_SON/WSON-10-1EP_2.5x2.5mm_P0.5mm_EP1.2x2mm\",\"Package_SON/WSON-10-1EP_2.5x2.5mm_P0.5mm_EP1.2x2mm_ThermalVias\",\"Package_SON/WSON-10-1EP_2x3mm_P0.5mm_EP0.84x2.4mm\",\"Package_SON/WSON-10-1EP_2x3mm_P0.5mm_EP0.84x2.4mm_ThermalVias\",\"Package_SON/WSON-10-1EP_4x3mm_P0.5mm_EP2.2x2mm\",\"Package_SON/WSON-10-1EP_4x4mm_P0.8mm_EP2.6x3mm\",\"Package_SON/WSON-10-1EP_4x4mm_P0.8mm_EP2.6x3mm_ThermalVias\",\"Package_SON/WSON-12-1EP_3x2mm_P0.5mm_EP1x2.65\",\"Package_SON/WSON-12-1EP_3x2mm_P0.5mm_EP1x2.65_ThermalVias\",\"Package_SON/WSON-12-1EP_3x3mm_P0.5mm_EP1.5x2.5mm\",\"Package_SON/WSON-12-1EP_3x3mm_P0.5mm_EP1.5x2.5mm_ThermalVias\",\"Package_SON/WSON-12-1EP_4x4mm_P0.5mm_EP2.6x3mm\",\"Package_SON/WSON-12-1EP_4x4mm_P0.5mm_EP2.6x3mm_ThermalVias\",\"Package_SON/WSON-14-1EP_4.0x4.0mm_P0.5mm_EP2.6x2.6mm\",\"Package_SON/WSON-16_3.3x1.35_P0.4mm\",\"Package_SON/WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mm\",\"Package_SON/WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mm_ThermalVias\",\"Package_SON/WSON-6-1EP_3x3mm_P0.95mm\",\"Package_SON/WSON-6_1.5x1.5mm_P0.5mm\",\"Package_SON/WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm\",\"Package_SON/WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm_ThermalVias\",\"Package_SON/WSON-8-1EP_3x2.5mm_P0.5mm_EP1.2x1.5mm_PullBack\",\"Package_SON/WSON-8-1EP_3x2.5mm_P0.5mm_EP1.2x1.5mm_PullBack_ThermalVias\",\"Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.2x2mm\",\"Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.2x2mm_ThermalVias\",\"Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.45x2.4mm\",\"Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.45x2.4mm_ThermalVias\",\"Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.6x2.0mm\",\"Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP1.98x3mm\",\"Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP1.98x3mm_ThermalVias\",\"Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.2x3mm\",\"Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.2x3mm_ThermalVias\",\"Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.6x3mm\",\"Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.6x3mm_ThermalVias\",\"Package_SON/WSON-8-1EP_6x5mm_P1.27mm_EP3.4x4.3mm\",\"Package_SON/WSON-8-1EP_6x5mm_P1.27mm_EP3.4x4mm\",\"Package_SON/WSON-8-1EP_8x6mm_P1.27mm_EP3.4x4.3mm\",\"Package_SON/Winbond_USON-8-1EP_3x2mm_P0.5mm_EP0.2x1.6mm\",\"Package_SON/Winbond_USON-8-2EP_3x4mm_P0.8mm_EP0.2x0.8mm\",\"Package_SON/X2SON-8_1.4x1mm_P0.35mm\",\"Package_SO_J-Lead/TSOC-6_3.76x3.94mm_P1.27mm\",\"Package_TO_SOT_SMD/ATPAK-2\",\"Package_TO_SOT_SMD/Analog_KS-4\",\"Package_TO_SOT_SMD/Diodes_SOT-553\",\"Package_TO_SOT_SMD/HVSOF5\",\"Package_TO_SOT_SMD/HVSOF6\",\"Package_TO_SOT_SMD/Infineon_PG-HDSOP-10-1\",\"Package_TO_SOT_SMD/Infineon_PG-HSOF-8-1\",\"Package_TO_SOT_SMD/Infineon_PG-HSOF-8-1_ThermalVias\",\"Package_TO_SOT_SMD/Infineon_PG-HSOF-8-2\",\"Package_TO_SOT_SMD/Infineon_PG-HSOF-8-2_ThermalVias\",\"Package_TO_SOT_SMD/Infineon_PG-HSOF-8-2_ThermalVias2\",\"Package_TO_SOT_SMD/Infineon_PG-HSOF-8-3\",\"Package_TO_SOT_SMD/Infineon_PG-HSOF-8-3_ThermalVias\",\"Package_TO_SOT_SMD/Infineon_PG-TO-220-7Lead_TabPin8\",\"Package_TO_SOT_SMD/Infineon_PG-TSFP-3-1\",\"Package_TO_SOT_SMD/LFPAK33\",\"Package_TO_SOT_SMD/LFPAK56\",\"Package_TO_SOT_SMD/LFPAK88\",\"Package_TO_SOT_SMD/Nexperia_CFP15_SOT-1289\",\"Package_TO_SOT_SMD/OnSemi_ECH8\",\"Package_TO_SOT_SMD/PQFN_8x8\",\"Package_TO_SOT_SMD/PowerMacro_M234_NoHole\",\"Package_TO_SOT_SMD/PowerMacro_M234_WithHole\",\"Package_TO_SOT_SMD/ROHM_SOT-457_ClockwisePinNumbering\",\"Package_TO_SOT_SMD/Rohm_HRP7\",\"Package_TO_SOT_SMD/SC-59\",\"Package_TO_SOT_SMD/SC-59_Handsoldering\",\"Package_TO_SOT_SMD/SC-70-8\",\"Package_TO_SOT_SMD/SC-74-6_1.55x2.9mm_P0.95mm\",\"Package_TO_SOT_SMD/SC-74A-5_1.55x2.9mm_P0.95mm\",\"Package_TO_SOT_SMD/SC-82AA\",\"Package_TO_SOT_SMD/SC-82AA_Handsoldering\",\"Package_TO_SOT_SMD/SC-82AB\",\"Package_TO_SOT_SMD/SC-82AB_Handsoldering\",\"Package_TO_SOT_SMD/SOT-1123\",\"Package_TO_SOT_SMD/SOT-1333-1\",\"Package_TO_SOT_SMD/SOT-1334-1\",\"Package_TO_SOT_SMD/SOT-143\",\"Package_TO_SOT_SMD/SOT-143R\",\"Package_TO_SOT_SMD/SOT-143R_Handsoldering\",\"Package_TO_SOT_SMD/SOT-143_Handsoldering\",\"Package_TO_SOT_SMD/SOT-223-3_TabPin2\",\"Package_TO_SOT_SMD/SOT-223-5\",\"Package_TO_SOT_SMD/SOT-223-6\",\"Package_TO_SOT_SMD/SOT-223-6_TabPin3\",\"Package_TO_SOT_SMD/SOT-223-8\",\"Package_TO_SOT_SMD/SOT-223\",\"Package_TO_SOT_SMD/SOT-23-3\",\"Package_TO_SOT_SMD/SOT-23-5\",\"Package_TO_SOT_SMD/SOT-23-5_HandSoldering\",\"Package_TO_SOT_SMD/SOT-23-6\",\"Package_TO_SOT_SMD/SOT-23-6_Handsoldering\",\"Package_TO_SOT_SMD/SOT-23-8\",\"Package_TO_SOT_SMD/SOT-23-8_Handsoldering\",\"Package_TO_SOT_SMD/SOT-23\",\"Package_TO_SOT_SMD/SOT-23W\",\"Package_TO_SOT_SMD/SOT-23W_Handsoldering\",\"Package_TO_SOT_SMD/SOT-23_Handsoldering\",\"Package_TO_SOT_SMD/SOT-323_SC-70\",\"Package_TO_SOT_SMD/SOT-343_SC-70-4\",\"Package_TO_SOT_SMD/SOT-353_SC-70-5\",\"Package_TO_SOT_SMD/SOT-363_SC-70-6\",\"Package_TO_SOT_SMD/SOT-383F\",\"Package_TO_SOT_SMD/SOT-383FL\",\"Package_TO_SOT_SMD/SOT-416\",\"Package_TO_SOT_SMD/SOT-457T\",\"Package_TO_SOT_SMD/SOT-523\",\"Package_TO_SOT_SMD/SOT-543\",\"Package_TO_SOT_SMD/SOT-553\",\"Package_TO_SOT_SMD/SOT-563\",\"Package_TO_SOT_SMD/SOT-583-8\",\"Package_TO_SOT_SMD/SOT-665\",\"Package_TO_SOT_SMD/SOT-666\",\"Package_TO_SOT_SMD/SOT-723\",\"Package_TO_SOT_SMD/SOT-883\",\"Package_TO_SOT_SMD/SOT-886\",\"Package_TO_SOT_SMD/SOT-89-3\",\"Package_TO_SOT_SMD/SOT-89-3_Handsoldering\",\"Package_TO_SOT_SMD/SOT-89-5\",\"Package_TO_SOT_SMD/SOT-89-5_Handsoldering\",\"Package_TO_SOT_SMD/SOT-963\",\"Package_TO_SOT_SMD/SuperSOT-3\",\"Package_TO_SOT_SMD/SuperSOT-6\",\"Package_TO_SOT_SMD/SuperSOT-8\",\"Package_TO_SOT_SMD/TDSON-8-1\",\"Package_TO_SOT_SMD/TO-252-2\",\"Package_TO_SOT_SMD/TO-252-2_TabPin1\",\"Package_TO_SOT_SMD/TO-252-3_TabPin2\",\"Package_TO_SOT_SMD/TO-252-3_TabPin4\",\"Package_TO_SOT_SMD/TO-252-4\",\"Package_TO_SOT_SMD/TO-252-5_TabPin3\",\"Package_TO_SOT_SMD/TO-252-5_TabPin6\",\"Package_TO_SOT_SMD/TO-263-2\",\"Package_TO_SOT_SMD/TO-263-2_TabPin1\",\"Package_TO_SOT_SMD/TO-263-3_TabPin2\",\"Package_TO_SOT_SMD/TO-263-3_TabPin4\",\"Package_TO_SOT_SMD/TO-263-4\",\"Package_TO_SOT_SMD/TO-263-5_TabPin3\",\"Package_TO_SOT_SMD/TO-263-5_TabPin6\",\"Package_TO_SOT_SMD/TO-263-6\",\"Package_TO_SOT_SMD/TO-263-7_TabPin4\",\"Package_TO_SOT_SMD/TO-263-7_TabPin8\",\"Package_TO_SOT_SMD/TO-263-9_TabPin10\",\"Package_TO_SOT_SMD/TO-263-9_TabPin5\",\"Package_TO_SOT_SMD/TO-268-2\",\"Package_TO_SOT_SMD/TO-269AA\",\"Package_TO_SOT_SMD/TO-277A\",\"Package_TO_SOT_SMD/TO-277B\",\"Package_TO_SOT_SMD/TO-50-3_LongPad-NoHole_Housing\",\"Package_TO_SOT_SMD/TO-50-3_LongPad-WithHole_Housing\",\"Package_TO_SOT_SMD/TO-50-3_ShortPad-NoHole_Housing\",\"Package_TO_SOT_SMD/TO-50-3_ShortPad-WithHole_Housing\",\"Package_TO_SOT_SMD/TO-50-4_LongPad-NoHole_Housing\",\"Package_TO_SOT_SMD/TO-50-4_LongPad-WithHole_Housing\",\"Package_TO_SOT_SMD/TO-50-4_ShortPad-NoHole_Housing\",\"Package_TO_SOT_SMD/TO-50-4_ShortPad-WithHole_Housing\",\"Package_TO_SOT_SMD/TSOT-23-5\",\"Package_TO_SOT_SMD/TSOT-23-5_HandSoldering\",\"Package_TO_SOT_SMD/TSOT-23-6\",\"Package_TO_SOT_SMD/TSOT-23-6_HandSoldering\",\"Package_TO_SOT_SMD/TSOT-23-8\",\"Package_TO_SOT_SMD/TSOT-23-8_HandSoldering\",\"Package_TO_SOT_SMD/TSOT-23\",\"Package_TO_SOT_SMD/TSOT-23_HandSoldering\",\"Package_TO_SOT_SMD/Texas_DDF0008A_SOT-8_1.6x2.9mm_P0.65mm\",\"Package_TO_SOT_SMD/Texas_DRT-3\",\"Package_TO_SOT_SMD/Texas_NDQ\",\"Package_TO_SOT_SMD/Texas_NDW-7_TabPin4\",\"Package_TO_SOT_SMD/Texas_NDW-7_TabPin8\",\"Package_TO_SOT_SMD/Texas_NDY0011A\",\"Package_TO_SOT_SMD/Texas_R-PDSO-G5_DCK-5\",\"Package_TO_SOT_SMD/Texas_R-PDSO-G6\",\"Package_TO_SOT_SMD/Texas_R-PDSO-N5_DRL-5\",\"Package_TO_SOT_SMD/Texas_R-PDSO-N6_DRL-6\",\"Package_TO_SOT_SMD/VSOF5\",\"Package_TO_SOT_SMD/Vishay_PowerPAK_SC70-6L_Dual\",\"Package_TO_SOT_SMD/Vishay_PowerPAK_SC70-6L_Single\",\"Package_TO_SOT_THT/Analog_TO-46-4_ThermalShield\",\"Package_TO_SOT_THT/Fairchild_TO-220F-6L\",\"Package_TO_SOT_THT/Heraeus_TO-92-2\",\"Package_TO_SOT_THT/NEC_Molded_7x4x9mm\",\"Package_TO_SOT_THT/PowerIntegrations_TO-220-7C\",\"Package_TO_SOT_THT/SIPAK-1EP_Horizontal_TabDown\",\"Package_TO_SOT_THT/SIPAK_Vertical\",\"Package_TO_SOT_THT/SOD-70_P2.54mm\",\"Package_TO_SOT_THT/SOD-70_P5.08mm\",\"Package_TO_SOT_THT/SOT-227\",\"Package_TO_SOT_THT/TO-100-10\",\"Package_TO_SOT_THT/TO-100-10_Window\",\"Package_TO_SOT_THT/TO-11-2\",\"Package_TO_SOT_THT/TO-11-2_Window\",\"Package_TO_SOT_THT/TO-11-3\",\"Package_TO_SOT_THT/TO-11-3_Window\",\"Package_TO_SOT_THT/TO-12-4\",\"Package_TO_SOT_THT/TO-12-4_Window\",\"Package_TO_SOT_THT/TO-126-2_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-126-2_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-126-2_Vertical\",\"Package_TO_SOT_THT/TO-126-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-126-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-126-3_Vertical\",\"Package_TO_SOT_THT/TO-17-4\",\"Package_TO_SOT_THT/TO-17-4_Window\",\"Package_TO_SOT_THT/TO-18-2\",\"Package_TO_SOT_THT/TO-18-2_Lens\",\"Package_TO_SOT_THT/TO-18-2_Window\",\"Package_TO_SOT_THT/TO-18-3\",\"Package_TO_SOT_THT/TO-18-3_Lens\",\"Package_TO_SOT_THT/TO-18-3_Window\",\"Package_TO_SOT_THT/TO-18-4\",\"Package_TO_SOT_THT/TO-18-4_Lens\",\"Package_TO_SOT_THT/TO-18-4_Window\",\"Package_TO_SOT_THT/TO-218-2_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-218-2_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-218-2_Vertical\",\"Package_TO_SOT_THT/TO-218-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-218-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-218-3_Vertical\",\"Package_TO_SOT_THT/TO-220-11_P3.4x2.54mm_StaggerEven_Lead5.84mm_TabDown\",\"Package_TO_SOT_THT/TO-220-11_P3.4x2.54mm_StaggerOdd_Lead5.84mm_TabDown\",\"Package_TO_SOT_THT/TO-220-11_P3.4x5.08mm_StaggerEven_Lead4.58mm_Vertical\",\"Package_TO_SOT_THT/TO-220-11_P3.4x5.08mm_StaggerOdd_Lead4.58mm_Vertical\",\"Package_TO_SOT_THT/TO-220-11_P3.4x5.08mm_StaggerOdd_Lead8.45mm_TabDown\",\"Package_TO_SOT_THT/TO-220-15_P2.54x2.54mm_StaggerEven_Lead5.84mm_TabDown\",\"Package_TO_SOT_THT/TO-220-15_P2.54x2.54mm_StaggerOdd_Lead5.84mm_TabDown\",\"Package_TO_SOT_THT/TO-220-15_P2.54x5.08mm_StaggerEven_Lead4.58mm_Vertical\",\"Package_TO_SOT_THT/TO-220-15_P2.54x5.08mm_StaggerOdd_Lead4.58mm_Vertical\",\"Package_TO_SOT_THT/TO-220-2_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220-2_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220-2_Vertical\",\"Package_TO_SOT_THT/TO-220-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220-3_Vertical\",\"Package_TO_SOT_THT/TO-220-4_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220-4_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220-4_P5.08x3.7mm_StaggerEven_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-4_P5.08x3.7mm_StaggerOdd_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-4_P5.08x3.8mm_StaggerEven_Lead5.85mm_TabDown\",\"Package_TO_SOT_THT/TO-220-4_P5.08x3.8mm_StaggerOdd_Lead5.85mm_TabDown\",\"Package_TO_SOT_THT/TO-220-4_Vertical\",\"Package_TO_SOT_THT/TO-220-5_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220-5_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220-5_P3.4x3.7mm_StaggerEven_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-5_P3.4x3.7mm_StaggerOdd_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-5_P3.4x3.8mm_StaggerEven_Lead7.13mm_TabDown\",\"Package_TO_SOT_THT/TO-220-5_P3.4x3.8mm_StaggerOdd_Lead7.13mm_TabDown\",\"Package_TO_SOT_THT/TO-220-5_Vertical\",\"Package_TO_SOT_THT/TO-220-7_P2.54x3.7mm_StaggerEven_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-7_P2.54x3.7mm_StaggerOdd_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-7_P2.54x3.8mm_StaggerEven_Lead5.85mm_TabDown\",\"Package_TO_SOT_THT/TO-220-7_P2.54x3.8mm_StaggerOdd_Lead5.85mm_TabDown\",\"Package_TO_SOT_THT/TO-220-7_P2.54x5.08mm_StaggerOdd_Lead3.08mm_Vertical\",\"Package_TO_SOT_THT/TO-220-7_P2.54x5.1mm_StaggerOdd_Lead8.025mm_TabDown\",\"Package_TO_SOT_THT/TO-220-8_Vertical\",\"Package_TO_SOT_THT/TO-220-9_P1.93x5.08mm_StaggerOdd_Lead3.378mm_Vertical\",\"Package_TO_SOT_THT/TO-220-9_P1.94x3.7mm_StaggerEven_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-9_P1.94x3.7mm_StaggerOdd_Lead3.8mm_Vertical\",\"Package_TO_SOT_THT/TO-220-9_P1.94x3.8mm_StaggerEven_Lead5.85mm_TabDown\",\"Package_TO_SOT_THT/TO-220-9_P1.94x3.8mm_StaggerOdd_Lead5.85mm_TabDown\",\"Package_TO_SOT_THT/TO-220F-11_P3.4x5.08mm_StaggerEven_Lead5.08mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-11_P3.4x5.08mm_StaggerOdd_Lead5.08mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-15_P2.54x5.08mm_StaggerEven_Lead5.08mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-15_P2.54x5.08mm_StaggerOdd_Lead5.08mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-2_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220F-2_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220F-2_Vertical\",\"Package_TO_SOT_THT/TO-220F-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220F-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220F-3_Vertical\",\"Package_TO_SOT_THT/TO-220F-4_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220F-4_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220F-4_P5.08x2.05mm_StaggerEven_Lead1.85mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-4_P5.08x2.05mm_StaggerOdd_Lead1.85mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-4_P5.08x3.7mm_StaggerEven_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-4_P5.08x3.7mm_StaggerOdd_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-4_Vertical\",\"Package_TO_SOT_THT/TO-220F-5_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-220F-5_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-220F-5_P3.4x2.06mm_StaggerEven_Lead1.86mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-5_P3.4x2.06mm_StaggerOdd_Lead1.86mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-5_P3.4x3.7mm_StaggerEven_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-5_P3.4x3.7mm_StaggerOdd_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-5_Vertical\",\"Package_TO_SOT_THT/TO-220F-7_P2.54x3.7mm_StaggerEven_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-7_P2.54x3.7mm_StaggerOdd_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-9_P1.8x3.7mm_StaggerEven_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-220F-9_P1.8x3.7mm_StaggerOdd_Lead3.5mm_Vertical\",\"Package_TO_SOT_THT/TO-247-2_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-247-2_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-247-2_Vertical\",\"Package_TO_SOT_THT/TO-247-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-247-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-247-3_Vertical\",\"Package_TO_SOT_THT/TO-247-4_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-247-4_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-247-4_Vertical\",\"Package_TO_SOT_THT/TO-247-5_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-247-5_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-247-5_Vertical\",\"Package_TO_SOT_THT/TO-251-2-1EP_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-251-2_Vertical\",\"Package_TO_SOT_THT/TO-251-3-1EP_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-251-3_Vertical\",\"Package_TO_SOT_THT/TO-262-3-1EP_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-262-3_Vertical\",\"Package_TO_SOT_THT/TO-262-5-1EP_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-262-5_Vertical\",\"Package_TO_SOT_THT/TO-264-2_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-264-2_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-264-2_Vertical\",\"Package_TO_SOT_THT/TO-264-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-264-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-264-3_Vertical\",\"Package_TO_SOT_THT/TO-264-5_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-264-5_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-264-5_Vertical\",\"Package_TO_SOT_THT/TO-3\",\"Package_TO_SOT_THT/TO-33-4\",\"Package_TO_SOT_THT/TO-33-4_Window\",\"Package_TO_SOT_THT/TO-38-2\",\"Package_TO_SOT_THT/TO-38-2_Window\",\"Package_TO_SOT_THT/TO-38-3\",\"Package_TO_SOT_THT/TO-38-3_Window\",\"Package_TO_SOT_THT/TO-39-10\",\"Package_TO_SOT_THT/TO-39-10_Window\",\"Package_TO_SOT_THT/TO-39-2\",\"Package_TO_SOT_THT/TO-39-2_Window\",\"Package_TO_SOT_THT/TO-39-3\",\"Package_TO_SOT_THT/TO-39-3_Window\",\"Package_TO_SOT_THT/TO-39-4\",\"Package_TO_SOT_THT/TO-39-4_Window\",\"Package_TO_SOT_THT/TO-39-6\",\"Package_TO_SOT_THT/TO-39-6_Window\",\"Package_TO_SOT_THT/TO-39-8\",\"Package_TO_SOT_THT/TO-39-8_Window\",\"Package_TO_SOT_THT/TO-3P-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-3P-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-3P-3_Vertical\",\"Package_TO_SOT_THT/TO-3PB-3_Horizontal_TabDown\",\"Package_TO_SOT_THT/TO-3PB-3_Horizontal_TabUp\",\"Package_TO_SOT_THT/TO-3PB-3_Vertical\",\"Package_TO_SOT_THT/TO-46-2\",\"Package_TO_SOT_THT/TO-46-2_Pin2Center\",\"Package_TO_SOT_THT/TO-46-2_Pin2Center_Window\",\"Package_TO_SOT_THT/TO-46-2_Window\",\"Package_TO_SOT_THT/TO-46-3\",\"Package_TO_SOT_THT/TO-46-3_Pin2Center\",\"Package_TO_SOT_THT/TO-46-3_Pin2Center_Window\",\"Package_TO_SOT_THT/TO-46-3_Window\",\"Package_TO_SOT_THT/TO-46-4\",\"Package_TO_SOT_THT/TO-46-4_Window\",\"Package_TO_SOT_THT/TO-5-10\",\"Package_TO_SOT_THT/TO-5-10_Window\",\"Package_TO_SOT_THT/TO-5-2\",\"Package_TO_SOT_THT/TO-5-2_Window\",\"Package_TO_SOT_THT/TO-5-3\",\"Package_TO_SOT_THT/TO-5-3_Window\",\"Package_TO_SOT_THT/TO-5-4\",\"Package_TO_SOT_THT/TO-5-4_Window\",\"Package_TO_SOT_THT/TO-5-6\",\"Package_TO_SOT_THT/TO-5-6_Window\",\"Package_TO_SOT_THT/TO-5-8\",\"Package_TO_SOT_THT/TO-5-8_PD5.08\",\"Package_TO_SOT_THT/TO-5-8_PD5.08_Window\",\"Package_TO_SOT_THT/TO-5-8_Window\",\"Package_TO_SOT_THT/TO-52-2\",\"Package_TO_SOT_THT/TO-52-2_Window\",\"Package_TO_SOT_THT/TO-52-3\",\"Package_TO_SOT_THT/TO-52-3_Window\",\"Package_TO_SOT_THT/TO-72-4\",\"Package_TO_SOT_THT/TO-72-4_Window\",\"Package_TO_SOT_THT/TO-75-6\",\"Package_TO_SOT_THT/TO-75-6_Window\",\"Package_TO_SOT_THT/TO-78-10\",\"Package_TO_SOT_THT/TO-78-10_Window\",\"Package_TO_SOT_THT/TO-78-6\",\"Package_TO_SOT_THT/TO-78-6_Window\",\"Package_TO_SOT_THT/TO-78-8\",\"Package_TO_SOT_THT/TO-78-8_Window\",\"Package_TO_SOT_THT/TO-8-2\",\"Package_TO_SOT_THT/TO-8-2_Window\",\"Package_TO_SOT_THT/TO-8-3\",\"Package_TO_SOT_THT/TO-8-3_Window\",\"Package_TO_SOT_THT/TO-92-2\",\"Package_TO_SOT_THT/TO-92-2_Horizontal1\",\"Package_TO_SOT_THT/TO-92-2_Horizontal2\",\"Package_TO_SOT_THT/TO-92-2_W4.0mm_Horizontal_FlatSideDown\",\"Package_TO_SOT_THT/TO-92-2_W4.0mm_Horizontal_FlatSideUp\",\"Package_TO_SOT_THT/TO-92-2_Wide\",\"Package_TO_SOT_THT/TO-92\",\"Package_TO_SOT_THT/TO-92Flat\",\"Package_TO_SOT_THT/TO-92L\",\"Package_TO_SOT_THT/TO-92L_HandSolder\",\"Package_TO_SOT_THT/TO-92L_Inline\",\"Package_TO_SOT_THT/TO-92L_Inline_Wide\",\"Package_TO_SOT_THT/TO-92L_Wide\",\"Package_TO_SOT_THT/TO-92Mini-2\",\"Package_TO_SOT_THT/TO-92S\",\"Package_TO_SOT_THT/TO-92_HandSolder\",\"Package_TO_SOT_THT/TO-92_Horizontal1\",\"Package_TO_SOT_THT/TO-92_Horizontal2\",\"Package_TO_SOT_THT/TO-92_Inline\",\"Package_TO_SOT_THT/TO-92_Inline_Horizontal1\",\"Package_TO_SOT_THT/TO-92_Inline_Horizontal2\",\"Package_TO_SOT_THT/TO-92_Inline_W4.0mm_Horizontal_FlatSideDown\",\"Package_TO_SOT_THT/TO-92_Inline_W4.0mm_Horizontal_FlatSideUp\",\"Package_TO_SOT_THT/TO-92_Inline_Wide\",\"Package_TO_SOT_THT/TO-92_W4.0mm_StaggerEven_Horizontal_FlatSideDown\",\"Package_TO_SOT_THT/TO-92_W4.0mm_StaggerEven_Horizontal_FlatSideUp\",\"Package_TO_SOT_THT/TO-92_Wide\",\"Package_TO_SOT_THT/TO-99-6\",\"Package_TO_SOT_THT/TO-99-6_Window\",\"Package_TO_SOT_THT/TO-99-8\",\"Package_TO_SOT_THT/TO-99-8_Window\",\"Panelization/BreakLine_11h_D0.5mm_P0.85mm\",\"Panelization/BreakLine_1h_D0.5mm_P0.85mm\",\"Panelization/BreakLine_2h_D0.5mm_P0.85mm\",\"Panelization/BreakLine_2h_D0.5mm_P1.7mm\",\"Panelization/BreakLine_3h_D0.5mm_P0.85mm\",\"Panelization/BreakLine_3h_D0.5mm_P1.7mm\",\"Panelization/BreakLine_5h_D0.5mm_P0.85mm\",\"Panelization/BreakLine_7h_D0.5mm_P0.85mm\",\"Panelization/BreakLine_9h_D0.5mm_P0.85mm\",\"Panelization/MouseBite-Part_2.0x2.0mm_0h\",\"Panelization/MouseBite-Part_2.0x2.0mm_inset_D0.5mm_P0.85mm_4h_Trace\",\"Panelization/MouseBite-Part_2.0x2.0mm_inset_D0.5mm_P0.85mm_5h\",\"Panelization/MouseBite-Part_2.0x2.0mm_outset_D0.5mm_P0.85mm_2h_Trace\",\"Panelization/MouseBite-Part_2.0x2.0mm_outset_D0.5mm_P0.85mm_3h\",\"Panelization/MouseBite-Part_2.0x4.5mm_0h\",\"Panelization/MouseBite-Part_2.0x4.5mm_inset_D0.5mm_P0.85mm_5h_Trace\",\"Panelization/MouseBite-Part_2.0x4.5mm_inset_D0.5mm_P0.85mm_7h\",\"Panelization/MouseBite-Part_2.0x4.5mm_outset_D0.5mm_P0.85mm_5h_Trace\",\"Panelization/MouseBite-Part_2.0x4.5mm_outset_D0.5mm_P0.85mm_7h\",\"Panelization/MouseBite-Slot-Jumper_01005\",\"Panelization/MouseBite-Slot-Jumper_0201\",\"Panelization/MouseBite-Slot_2.0x2.0mm_inset_D0.5mm_P0.85mm_4h_Trace\",\"Panelization/MouseBite-Slot_2.0x2.0mm_inset_D0.5mm_P0.85mm_5h\",\"Panelization/MouseBite-Slot_2.0x2.0mm_outset_D0.5mm_P0.85mm_2h_Trace\",\"Panelization/MouseBite-Slot_2.0x2.0mm_outset_D0.5mm_P0.85mm_3h\",\"Panelization/MouseBite-Slot_2.0x4.5mm_inset_D0.5mm_P0.85mm_5h_Trace\",\"Panelization/MouseBite-Slot_2.0x4.5mm_inset_D0.5mm_P0.85mm_7h\",\"Panelization/MouseBite-Slot_2.0x4.5mm_outset_D0.5mm_P0.85mm_5h_Trace\",\"Panelization/MouseBite-Slot_2.0x4.5mm_outset_D0.5mm_P0.85mm_7h\",\"Panelization/MouseBite-Slot_2.54x2.54mm_on-edge_D0.5mm_P0.85mm_4h_Trace\",\"Panelization/MouseBite-Slot_2.54x5.08mm_on-edge_D0.5mm_P0.85mm_5h_Trace\",\"Potentiometer_SMD/Potentiometer_ACP_CA14-VSMD_Vertical\",\"Potentiometer_SMD/Potentiometer_ACP_CA14-VSMD_Vertical_Hole\",\"Potentiometer_SMD/Potentiometer_ACP_CA6-VSMD_Vertical\",\"Potentiometer_SMD/Potentiometer_ACP_CA6-VSMD_Vertical_Hole\",\"Potentiometer_SMD/Potentiometer_ACP_CA9-VSMD_Vertical\",\"Potentiometer_SMD/Potentiometer_ACP_CA9-VSMD_Vertical_Hole\",\"Potentiometer_SMD/Potentiometer_Bourns_3214G_Horizontal\",\"Potentiometer_SMD/Potentiometer_Bourns_3214J_Horizontal\",\"Potentiometer_SMD/Potentiometer_Bourns_3214W_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_3214X_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_3224G_Horizontal\",\"Potentiometer_SMD/Potentiometer_Bourns_3224J_Horizontal\",\"Potentiometer_SMD/Potentiometer_Bourns_3224W_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_3224X_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_3269P_Horizontal\",\"Potentiometer_SMD/Potentiometer_Bourns_3269W_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_3269X_Horizontal\",\"Potentiometer_SMD/Potentiometer_Bourns_3314G_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_3314J_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_3314R-1_Vertical_Hole\",\"Potentiometer_SMD/Potentiometer_Bourns_3314R-GM5_Vertical_Hole\",\"Potentiometer_SMD/Potentiometer_Bourns_3314S_Horizontal\",\"Potentiometer_SMD/Potentiometer_Bourns_PRS11S_Vertical\",\"Potentiometer_SMD/Potentiometer_Bourns_TC33X_Vertical\",\"Potentiometer_SMD/Potentiometer_Vishay_TS53YJ_Vertical\",\"Potentiometer_SMD/Potentiometer_Vishay_TS53YL_Vertical\",\"Potentiometer_THT/Potentiometer_ACP_CA14-H2,5_Horizontal\",\"Potentiometer_THT/Potentiometer_ACP_CA14-H4_Horizontal\",\"Potentiometer_THT/Potentiometer_ACP_CA14-H5_Horizontal\",\"Potentiometer_THT/Potentiometer_ACP_CA14V-15_Vertical\",\"Potentiometer_THT/Potentiometer_ACP_CA14V-15_Vertical_Hole\",\"Potentiometer_THT/Potentiometer_ACP_CA6-H2,5_Horizontal\",\"Potentiometer_THT/Potentiometer_ACP_CA9-H2,5_Horizontal\",\"Potentiometer_THT/Potentiometer_ACP_CA9-H3,8_Horizontal\",\"Potentiometer_THT/Potentiometer_ACP_CA9-H5_Horizontal\",\"Potentiometer_THT/Potentiometer_ACP_CA9-V10_Vertical\",\"Potentiometer_THT/Potentiometer_ACP_CA9-V10_Vertical_Hole\",\"Potentiometer_THT/Potentiometer_Alpha_RD901F-40-00D_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Alpha_RD901F-40-00D_Single_Vertical_CircularHoles\",\"Potentiometer_THT/Potentiometer_Alpha_RD902F-40-00D_Dual_Vertical\",\"Potentiometer_THT/Potentiometer_Alpha_RD902F-40-00D_Dual_Vertical_CircularHoles\",\"Potentiometer_THT/Potentiometer_Alps_RK097_Dual_Horizontal\",\"Potentiometer_THT/Potentiometer_Alps_RK097_Dual_Horizontal_Switch\",\"Potentiometer_THT/Potentiometer_Alps_RK097_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Alps_RK097_Single_Horizontal_Switch\",\"Potentiometer_THT/Potentiometer_Alps_RK09K_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Alps_RK09K_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Alps_RK09L_Double_Horizontal\",\"Potentiometer_THT/Potentiometer_Alps_RK09L_Double_Vertical\",\"Potentiometer_THT/Potentiometer_Alps_RK09L_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Alps_RK09L_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Alps_RK09Y11_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Alps_RK163_Dual_Horizontal\",\"Potentiometer_THT/Potentiometer_Alps_RK163_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_20P_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3005_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3006P_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3006W_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3006Y_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3009P_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3009Y_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3266P_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3266W_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3266X_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3266Y_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3266Z_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3296P_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3296W_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3296X_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3296Y_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3296Z_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3299P_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3299W_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3299X_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3299Y_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3299Z_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3339H_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3339P_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3339P_Vertical_HandSoldering\",\"Potentiometer_THT/Potentiometer_Bourns_3339S_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3339W_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3386C_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3386F_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3386H_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3386P_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_3386W_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_3386X_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_PTA1543_Single_Slide\",\"Potentiometer_THT/Potentiometer_Bourns_PTA2043_Single_Slide\",\"Potentiometer_THT/Potentiometer_Bourns_PTA3043_Single_Slide\",\"Potentiometer_THT/Potentiometer_Bourns_PTA4543_Single_Slide\",\"Potentiometer_THT/Potentiometer_Bourns_PTA6043_Single_Slide\",\"Potentiometer_THT/Potentiometer_Bourns_PTV09A-1_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Bourns_PTV09A-2_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Bourns_PTV112-4_Dual_Vertical\",\"Potentiometer_THT/Potentiometer_Omeg_PC16BU_Horizontal\",\"Potentiometer_THT/Potentiometer_Omeg_PC16BU_Vertical\",\"Potentiometer_THT/Potentiometer_Piher_PC-16_Dual_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PC-16_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PC-16_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Piher_PC-16_Triple_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-10-H01_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-10-H05_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-10-V05_Vertical\",\"Potentiometer_THT/Potentiometer_Piher_PT-10-V10_Vertical\",\"Potentiometer_THT/Potentiometer_Piher_PT-10-V10_Vertical_Hole\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-H01_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-H05_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-H06_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-H25_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-V02_Vertical\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-V02_Vertical_Hole\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-V15_Vertical\",\"Potentiometer_THT/Potentiometer_Piher_PT-15-V15_Vertical_Hole\",\"Potentiometer_THT/Potentiometer_Piher_PT-6-H_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_PT-6-V_Vertical\",\"Potentiometer_THT/Potentiometer_Piher_PT-6-V_Vertical_Hole\",\"Potentiometer_THT/Potentiometer_Piher_T-16H_Double_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_T-16H_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Piher_T-16L_Single_Vertical_Hole\",\"Potentiometer_THT/Potentiometer_Runtron_RM-063_Horizontal\",\"Potentiometer_THT/Potentiometer_Runtron_RM-065_Vertical\",\"Potentiometer_THT/Potentiometer_TT_P0915N\",\"Potentiometer_THT/Potentiometer_Vishay_148-149_Dual_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_148-149_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_148-149_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Vishay_148E-149E_Dual_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_148E-149E_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_248BH-249BH_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_248GJ-249GJ_Single_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_248GJ-249GJ_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Vishay_43_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_T7-YA_Single_Vertical\",\"Potentiometer_THT/Potentiometer_Vishay_T73XW_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_T73XX_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_T73YP_Vertical\",\"Potentiometer_THT/Potentiometer_Vishay_T93XA_Horizontal\",\"Potentiometer_THT/Potentiometer_Vishay_T93YA_Vertical\",\"RF/Skyworks_SKY13575_639LF\",\"RF/Skyworks_SKY65404-31\",\"RF_Antenna/AVX_M620720\",\"RF_Antenna/Abracon_APAES868R8060C16-T\",\"RF_Antenna/Abracon_PRO-OB-440\",\"RF_Antenna/Abracon_PRO-OB-471\",\"RF_Antenna/Antenova_SR4G013_GPS\",\"RF_Antenna/Astrocast_AST50127-00\",\"RF_Antenna/Coilcraft_MA5532-AE_RFID\",\"RF_Antenna/Johanson_2450AT18x100\",\"RF_Antenna/Johanson_2450AT18x100_2400-2500Mhz\",\"RF_Antenna/Johanson_2450AT43F0100\",\"RF_Antenna/Johanson_2450AT43F0100_2400-2500Mhz\",\"RF_Antenna/Molex_47948-0001_2.4Ghz\",\"RF_Antenna/NiceRF_SW868-TH13_868Mhz\",\"RF_Antenna/Pulse_W3000\",\"RF_Antenna/Pulse_W3011\",\"RF_Antenna/Texas_SWRA117D_2.4GHz_Left\",\"RF_Antenna/Texas_SWRA117D_2.4GHz_Right\",\"RF_Antenna/Texas_SWRA416_868MHz_915MHz\",\"RF_Converter/Anaren_0805_2012Metric-6\",\"RF_Converter/Balun_Johanson_0896BM15A0001\",\"RF_Converter/Balun_Johanson_0900FM15K0039\",\"RF_Converter/Balun_Johanson_0900PC15J0013\",\"RF_Converter/Balun_Johanson_1.6x0.8mm\",\"RF_Converter/Balun_Johanson_5400BL15B050E\",\"RF_Converter/RF_Attenuator_Susumu_PAT1220\",\"RF_GPS/Linx_RXM-GPS\",\"RF_GPS/OriginGPS_ORG1510\",\"RF_GPS/Quectel_L70-R\",\"RF_GPS/Quectel_L76\",\"RF_GPS/Quectel_L80-R\",\"RF_GPS/Quectel_L96\",\"RF_GPS/SIM28ML\",\"RF_GPS/Sierra_XA11X0\",\"RF_GPS/Sierra_XM11X0\",\"RF_GPS/ublox_LEA\",\"RF_GPS/ublox_MAX\",\"RF_GPS/ublox_NEO\",\"RF_GPS/ublox_SAM-M8Q\",\"RF_GPS/ublox_SAM-M8Q_HandSolder\",\"RF_GPS/ublox_ZED\",\"RF_GPS/ublox_ZOE_M8\",\"RF_GSM/Quectel_BC66\",\"RF_GSM/Quectel_BC95\",\"RF_GSM/Quectel_BG95\",\"RF_GSM/Quectel_BG96\",\"RF_GSM/Quectel_M95\",\"RF_GSM/SIMCom_SIM800C\",\"RF_GSM/SIMCom_SIM900\",\"RF_GSM/Telit_SE150A4\",\"RF_GSM/Telit_xL865\",\"RF_GSM/ublox_LENA-R8_LGA-100\",\"RF_GSM/ublox_SARA_LGA-96\",\"RF_Mini-Circuits/Mini-Circuits_BK377\",\"RF_Mini-Circuits/Mini-Circuits_BK377_LandPatternPL-005\",\"RF_Mini-Circuits/Mini-Circuits_CD541_H2.08mm\",\"RF_Mini-Circuits/Mini-Circuits_CD542_H2.84mm\",\"RF_Mini-Circuits/Mini-Circuits_CD542_LandPatternPL-052\",\"RF_Mini-Circuits/Mini-Circuits_CD542_LandPatternPL-094\",\"RF_Mini-Circuits/Mini-Circuits_CD636_H4.11mm\",\"RF_Mini-Circuits/Mini-Circuits_CD636_LandPatternPL-035\",\"RF_Mini-Circuits/Mini-Circuits_CD637_H5.23mm\",\"RF_Mini-Circuits/Mini-Circuits_CK605\",\"RF_Mini-Circuits/Mini-Circuits_CK605_LandPatternPL-012\",\"RF_Mini-Circuits/Mini-Circuits_DB1627\",\"RF_Mini-Circuits/Mini-Circuits_GP1212\",\"RF_Mini-Circuits/Mini-Circuits_GP1212_LandPatternPL-176\",\"RF_Mini-Circuits/Mini-Circuits_GP731\",\"RF_Mini-Circuits/Mini-Circuits_GP731_LandPatternPL-176\",\"RF_Mini-Circuits/Mini-Circuits_HF1139\",\"RF_Mini-Circuits/Mini-Circuits_HF1139_LandPatternPL-230\",\"RF_Mini-Circuits/Mini-Circuits_HQ1157\",\"RF_Mini-Circuits/Mini-Circuits_HZ1198\",\"RF_Mini-Circuits/Mini-Circuits_HZ1198_LandPatternPL-247\",\"RF_Mini-Circuits/Mini-Circuits_MMM168\",\"RF_Mini-Circuits/Mini-Circuits_MMM168_LandPatternPL-225\",\"RF_Mini-Circuits/Mini-Circuits_QQQ130_ClockwisePinNumbering\",\"RF_Mini-Circuits/Mini-Circuits_QQQ130_LandPattern_PL-236_ClockwisePinNumbering\",\"RF_Mini-Circuits/Mini-Circuits_TT1224_ClockwisePinNumbering\",\"RF_Mini-Circuits/Mini-Circuits_TT1224_LandPatternPL-258_ClockwisePinNumbering\",\"RF_Mini-Circuits/Mini-Circuits_TTT167\",\"RF_Mini-Circuits/Mini-Circuits_TTT167_LandPatternPL-079\",\"RF_Mini-Circuits/Mini-Circuits_YY161\",\"RF_Mini-Circuits/Mini-Circuits_YY161_LandPatternPL-049\",\"RF_Module/Ai-Thinker-Ra-01-LoRa\",\"RF_Module/Astrocast_AST50147-00\",\"RF_Module/Atmel_ATSAMR21G18-MR210UA_NoRFPads\",\"RF_Module/BLE112-A\",\"RF_Module/BM78SPPS5xC2\",\"RF_Module/CMWX1ZZABZ\",\"RF_Module/CYBLE-21Pin-10x10mm\",\"RF_Module/DWM1000\",\"RF_Module/DecaWave_DWM1001\",\"RF_Module/Digi_XBee_SMT\",\"RF_Module/E18-MS1-PCB\",\"RF_Module/E73-2G4M04S\",\"RF_Module/ESP-01\",\"RF_Module/ESP-07\",\"RF_Module/ESP-12E\",\"RF_Module/ESP-WROOM-02\",\"RF_Module/ESP32-C3-DevKitM-1\",\"RF_Module/ESP32-C3-WROOM-02\",\"RF_Module/ESP32-C3-WROOM-02U\",\"RF_Module/ESP32-C6-MINI-1\",\"RF_Module/ESP32-S2-MINI-1\",\"RF_Module/ESP32-S2-MINI-1U\",\"RF_Module/ESP32-S2-WROVER\",\"RF_Module/ESP32-S3-WROOM-1\",\"RF_Module/ESP32-S3-WROOM-1U\",\"RF_Module/ESP32-S3-WROOM-2\",\"RF_Module/ESP32-WROOM-32\",\"RF_Module/ESP32-WROOM-32D\",\"RF_Module/ESP32-WROOM-32E\",\"RF_Module/ESP32-WROOM-32U\",\"RF_Module/ESP32-WROOM-32UE\",\"RF_Module/Garmin_M8-35_9.8x14.0mm_Layout6x6_P1.5mm\",\"RF_Module/HOPERF_RFM69HW\",\"RF_Module/HOPERF_RFM9XW_SMD\",\"RF_Module/HOPERF_RFM9XW_THT\",\"RF_Module/Heltec_HT-CT62\",\"RF_Module/IQRF_TRx2DA_KON-SIM-01\",\"RF_Module/IQRF_TRx2D_KON-SIM-01\",\"RF_Module/Jadak_Thingmagic_M6e-Nano\",\"RF_Module/Laird_BL652\",\"RF_Module/Laird_BL653\",\"RF_Module/MCU_Seeed_ESP32C3\",\"RF_Module/MOD-nRF8001\",\"RF_Module/Microchip_BM83\",\"RF_Module/Microchip_RN4871\",\"RF_Module/Modtronix_inAir9\",\"RF_Module/MonoWireless_TWE-L-WX\",\"RF_Module/NINA-B111\",\"RF_Module/Particle_P1\",\"RF_Module/RAK3172\",\"RF_Module/RAK4200\",\"RF_Module/RAK811\",\"RF_Module/RFDigital_RFD77101\",\"RF_Module/RMC20452T\",\"RF_Module/RN2483\",\"RF_Module/RN42\",\"RF_Module/RN42N\",\"RF_Module/Raytac_MDBT42Q\",\"RF_Module/Raytac_MDBT50Q\",\"RF_Module/ST-SiP-LGA-86-11x7.3mm\",\"RF_Module/ST_SPBTLE\",\"RF_Module/TD1205\",\"RF_Module/TD1208\",\"RF_Module/Taiyo-Yuden_EYSGJNZWY\",\"RF_Module/WEMOS_C3_mini\",\"RF_Module/WEMOS_D1_mini_light\",\"RF_Module/ZETA-433-SO_SMD\",\"RF_Module/ZETA-433-SO_THT\",\"RF_Module/nRF24L01_Breakout\",\"RF_Shielding/Laird_Technologies_97-2002_25.40x25.40mm\",\"RF_Shielding/Laird_Technologies_97-2003_12.70x13.37mm\",\"RF_Shielding/Laird_Technologies_BMI-S-101_13.66x12.70mm\",\"RF_Shielding/Laird_Technologies_BMI-S-102_16.50x16.50mm\",\"RF_Shielding/Laird_Technologies_BMI-S-103_26.21x26.21mm\",\"RF_Shielding/Laird_Technologies_BMI-S-104_32.00x32.00mm\",\"RF_Shielding/Laird_Technologies_BMI-S-105_38.10x25.40mm\",\"RF_Shielding/Laird_Technologies_BMI-S-106_36.83x33.68mm\",\"RF_Shielding/Laird_Technologies_BMI-S-107_44.37x44.37mm\",\"RF_Shielding/Laird_Technologies_BMI-S-201-F_13.66x12.70mm\",\"RF_Shielding/Laird_Technologies_BMI-S-202-F_16.50x16.50mm\",\"RF_Shielding/Laird_Technologies_BMI-S-203-F_26.21x26.21mm\",\"RF_Shielding/Laird_Technologies_BMI-S-204-F_32.00x32.00mm\",\"RF_Shielding/Laird_Technologies_BMI-S-205-F_38.10x25.40mm\",\"RF_Shielding/Laird_Technologies_BMI-S-206-F_36.83x33.68mm\",\"RF_Shielding/Laird_Technologies_BMI-S-207-F_44.37x44.37mm\",\"RF_Shielding/Laird_Technologies_BMI-S-208-F_39.60x39.60mm\",\"RF_Shielding/Laird_Technologies_BMI-S-209-F_29.36x18.50mm\",\"RF_Shielding/Laird_Technologies_BMI-S-210-F_44.00x30.50mm\",\"RF_Shielding/Laird_Technologies_BMI-S-230-F_50.8x38.1mm\",\"RF_Shielding/Wuerth_36103205_20x20mm\",\"RF_Shielding/Wuerth_36103255_25x25mm\",\"RF_Shielding/Wuerth_36103305_30x30mm\",\"RF_Shielding/Wuerth_36103505_50x50mm\",\"RF_Shielding/Wuerth_36103605_60x60mm\",\"RF_Shielding/Wuerth_36503205_20x20mm\",\"RF_Shielding/Wuerth_36503255_25x25mm\",\"RF_Shielding/Wuerth_36503305_30x30mm\",\"RF_Shielding/Wuerth_36503505_50x50mm\",\"RF_Shielding/Wuerth_36503605_60x60mm\",\"RF_WiFi/USR-C322\",\"Relay_SMD/Relay_2P2T_10x6mm_TE_IMxxG\",\"Relay_SMD/Relay_DPDT_AXICOM_IMSeries_JLeg\",\"Relay_SMD/Relay_DPDT_FRT5_SMD\",\"Relay_SMD/Relay_DPDT_Kemet_EE2_NU\",\"Relay_SMD/Relay_DPDT_Kemet_EE2_NUH\",\"Relay_SMD/Relay_DPDT_Kemet_EE2_NUH_DoubleCoil\",\"Relay_SMD/Relay_DPDT_Kemet_EE2_NUX_DoubleCoil\",\"Relay_SMD/Relay_DPDT_Kemet_EE2_NUX_NKX\",\"Relay_SMD/Relay_DPDT_Kemet_EE2_NU_DoubleCoil\",\"Relay_SMD/Relay_DPDT_Omron_G6H-2F\",\"Relay_SMD/Relay_DPDT_Omron_G6K-2F-Y\",\"Relay_SMD/Relay_DPDT_Omron_G6K-2F\",\"Relay_SMD/Relay_DPDT_Omron_G6K-2G-Y\",\"Relay_SMD/Relay_DPDT_Omron_G6K-2G\",\"Relay_SMD/Relay_DPDT_Omron_G6S-2F\",\"Relay_SMD/Relay_DPDT_Omron_G6S-2G\",\"Relay_SMD/Relay_DPDT_Omron_G6SK-2F\",\"Relay_SMD/Relay_DPDT_Omron_G6SK-2G\",\"Relay_SMD/Relay_Fujitsu_FTR-B3S\",\"Relay_SMD/Relay_SPDT_AXICOM_HF3Series_50ohms_Pitch1.27mm\",\"Relay_SMD/Relay_SPDT_AXICOM_HF3Series_75ohms_Pitch1.27mm\",\"Relay_THT/Relay_1-Form-A_Schrack-RYII_RM5mm\",\"Relay_THT/Relay_1-Form-B_Schrack-RYII_RM5mm\",\"Relay_THT/Relay_1-Form-C_Schrack-RYII_RM3.2mm\",\"Relay_THT/Relay_3PST_COTO_3650\",\"Relay_THT/Relay_3PST_COTO_3660\",\"Relay_THT/Relay_DPDT_AXICOM_IMSeries_Pitch3.2mm\",\"Relay_THT/Relay_DPDT_AXICOM_IMSeries_Pitch5.08mm\",\"Relay_THT/Relay_DPDT_FRT5\",\"Relay_THT/Relay_DPDT_Finder_30.22\",\"Relay_THT/Relay_DPDT_Finder_40.52\",\"Relay_THT/Relay_DPDT_Finder_40.62\",\"Relay_THT/Relay_DPDT_Fujitsu_FTR-F1C\",\"Relay_THT/Relay_DPDT_Hongfa_HF115F-2Z-x4\",\"Relay_THT/Relay_DPDT_Kemet_EC2_NJ\",\"Relay_THT/Relay_DPDT_Kemet_EC2_NJ_DoubleCoil\",\"Relay_THT/Relay_DPDT_Kemet_EC2_NU\",\"Relay_THT/Relay_DPDT_Kemet_EC2_NU_DoubleCoil\",\"Relay_THT/Relay_DPDT_Omron_G2RL-2\",\"Relay_THT/Relay_DPDT_Omron_G5V-2\",\"Relay_THT/Relay_DPDT_Omron_G6A\",\"Relay_THT/Relay_DPDT_Omron_G6AK\",\"Relay_THT/Relay_DPDT_Omron_G6H-2\",\"Relay_THT/Relay_DPDT_Omron_G6K-2P-Y\",\"Relay_THT/Relay_DPDT_Omron_G6K-2P\",\"Relay_THT/Relay_DPDT_Omron_G6S-2\",\"Relay_THT/Relay_DPDT_Omron_G6SK-2\",\"Relay_THT/Relay_DPDT_Panasonic_JW2\",\"Relay_THT/Relay_DPDT_Schrack-RT2-FormC-Dual-Coil_RM5mm\",\"Relay_THT/Relay_DPDT_Schrack-RT2-FormC_RM5mm\",\"Relay_THT/Relay_DPST_COTO_3602\",\"Relay_THT/Relay_DPST_Fujitsu_FTR-F1A\",\"Relay_THT/Relay_DPST_Omron_G2RL-2A\",\"Relay_THT/Relay_DPST_Schrack-RT2-FormA_RM5mm\",\"Relay_THT/Relay_NCR_HHG1D-1\",\"Relay_THT/Relay_SPDT_CUI_SR5\",\"Relay_THT/Relay_SPDT_Finder_32.21-x000\",\"Relay_THT/Relay_SPDT_Finder_34.51_Horizontal\",\"Relay_THT/Relay_SPDT_Finder_34.51_Vertical\",\"Relay_THT/Relay_SPDT_Finder_36.11\",\"Relay_THT/Relay_SPDT_Finder_40.11\",\"Relay_THT/Relay_SPDT_Finder_40.31\",\"Relay_THT/Relay_SPDT_Finder_40.41\",\"Relay_THT/Relay_SPDT_Finder_40.51\",\"Relay_THT/Relay_SPDT_Finder_40.61\",\"Relay_THT/Relay_SPDT_Fujitsu_FTR-LYCA005x_FormC_Vertical\",\"Relay_THT/Relay_SPDT_HJR-4102\",\"Relay_THT/Relay_SPDT_Hongfa_HF3F-L-xx-1ZL1T\",\"Relay_THT/Relay_SPDT_Hongfa_HF3F-L-xx-1ZL2T-R\",\"Relay_THT/Relay_SPDT_Hongfa_HF3F-L-xx-1ZL2T\",\"Relay_THT/Relay_SPDT_Hongfa_JQC-3FF_0XX-1Z\",\"Relay_THT/Relay_SPDT_HsinDa_Y14\",\"Relay_THT/Relay_SPDT_Omron-G5LE-1\",\"Relay_THT/Relay_SPDT_Omron-G5Q-1\",\"Relay_THT/Relay_SPDT_Omron_G2RL-1-E\",\"Relay_THT/Relay_SPDT_Omron_G2RL-1\",\"Relay_THT/Relay_SPDT_Omron_G5V-1\",\"Relay_THT/Relay_SPDT_Omron_G6E\",\"Relay_THT/Relay_SPDT_Omron_G6EK\",\"Relay_THT/Relay_SPDT_Panasonic_DR-L\",\"Relay_THT/Relay_SPDT_Panasonic_DR-L2\",\"Relay_THT/Relay_SPDT_Panasonic_DR\",\"Relay_THT/Relay_SPDT_Panasonic_JW1_FormC\",\"Relay_THT/Relay_SPDT_PotterBrumfield_T9AP5D52_12V30A\",\"Relay_THT/Relay_SPDT_RAYEX-L90\",\"Relay_THT/Relay_SPDT_RAYEX-L90S\",\"Relay_THT/Relay_SPDT_SANYOU_SRD_Series_Form_C\",\"Relay_THT/Relay_SPDT_Schrack-RP-II-1-16A-FormC_RM5mm\",\"Relay_THT/Relay_SPDT_Schrack-RP-II-1-FormC_RM3.5mm\",\"Relay_THT/Relay_SPDT_Schrack-RP-II-1-FormC_RM5mm\",\"Relay_THT/Relay_SPDT_Schrack-RT1-16A-FormC_RM5mm\",\"Relay_THT/Relay_SPDT_Schrack-RT1-FormC_RM3.5mm\",\"Relay_THT/Relay_SPDT_Schrack-RT1-FormC_RM5mm\",\"Relay_THT/Relay_SPDT_StandexMeder_SIL_Form1C\",\"Relay_THT/Relay_SPST-NO_Fujitsu_FTR-LYAA005x_FormA_Vertical\",\"Relay_THT/Relay_SPST_Finder_32.21-x300\",\"Relay_THT/Relay_SPST_Hongfa_HF3F-L-xx-1HL1T\",\"Relay_THT/Relay_SPST_Hongfa_HF3F-L-xx-1HL2T-R\",\"Relay_THT/Relay_SPST_Hongfa_HF3F-L-xx-1HL2T\",\"Relay_THT/Relay_SPST_Hongfa_JQC-3FF_0XX-1H\",\"Relay_THT/Relay_SPST_Omron-G5Q-1A\",\"Relay_THT/Relay_SPST_Omron_G2RL-1A-E\",\"Relay_THT/Relay_SPST_Omron_G2RL-1A\",\"Relay_THT/Relay_SPST_Omron_G5NB\",\"Relay_THT/Relay_SPST_Omron_G5PZ\",\"Relay_THT/Relay_SPST_Panasonic_ADW11\",\"Relay_THT/Relay_SPST_Panasonic_ALFG_FormA\",\"Relay_THT/Relay_SPST_Panasonic_ALFG_FormA_CircularHoles\",\"Relay_THT/Relay_SPST_Panasonic_JW1_FormA\",\"Relay_THT/Relay_SPST_PotterBrumfield_T9AP1D52_12V30A\",\"Relay_THT/Relay_SPST_RAYEX-L90A\",\"Relay_THT/Relay_SPST_RAYEX-L90AS\",\"Relay_THT/Relay_SPST_RAYEX-L90B\",\"Relay_THT/Relay_SPST_RAYEX-L90BS\",\"Relay_THT/Relay_SPST_SANYOU_SRD_Series_Form_A\",\"Relay_THT/Relay_SPST_SANYOU_SRD_Series_Form_B\",\"Relay_THT/Relay_SPST_Schrack-RP-II-1-16A-FormA_RM5mm\",\"Relay_THT/Relay_SPST_Schrack-RP-II-1-FormA_RM3.5mm\",\"Relay_THT/Relay_SPST_Schrack-RP-II-1-FormA_RM5mm\",\"Relay_THT/Relay_SPST_Schrack-RP3SL-1coil_RM5mm\",\"Relay_THT/Relay_SPST_Schrack-RP3SL_RM5mm\",\"Relay_THT/Relay_SPST_Schrack-RT1-16A-FormA_RM5mm\",\"Relay_THT/Relay_SPST_Schrack-RT1-FormA_RM3.5mm\",\"Relay_THT/Relay_SPST_Schrack-RT1-FormA_RM5mm\",\"Relay_THT/Relay_SPST_StandexMeder_MS_Form1AB\",\"Relay_THT/Relay_SPST_StandexMeder_SIL_Form1A\",\"Relay_THT/Relay_SPST_StandexMeder_SIL_Form1B\",\"Relay_THT/Relay_SPST_TE_PCH-1xxx2M\",\"Relay_THT/Relay_SPST_TE_PCN-1xxD3MHZ\",\"Relay_THT/Relay_SPST_Zettler-AZSR131\",\"Relay_THT/Relay_Socket_3PDT_Omron_PLE11-0\",\"Relay_THT/Relay_Socket_4PDT_Omron_PY14-02\",\"Relay_THT/Relay_Socket_DPDT_Finder_96.12\",\"Relay_THT/Relay_Socket_DPDT_Omron_PLE08-0\",\"Relay_THT/Relay_StandexMeder_DIP_HighProfile\",\"Relay_THT/Relay_StandexMeder_DIP_LowProfile\",\"Relay_THT/Relay_StandexMeder_UMS\",\"Relay_THT/Relay_Tyco_V23072_Sealed\",\"Resistor_SMD/R_01005_0402Metric\",\"Resistor_SMD/R_01005_0402Metric_Pad0.57x0.30mm_HandSolder\",\"Resistor_SMD/R_0201_0603Metric\",\"Resistor_SMD/R_0201_0603Metric_Pad0.64x0.40mm_HandSolder\",\"Resistor_SMD/R_0402_1005Metric\",\"Resistor_SMD/R_0402_1005Metric_Pad0.72x0.64mm_HandSolder\",\"Resistor_SMD/R_0508_1220Metric\",\"Resistor_SMD/R_0508_1220Metric_Pad1.12x2.15mm_HandSolder\",\"Resistor_SMD/R_0603_1608Metric\",\"Resistor_SMD/R_0603_1608Metric_Pad0.98x0.95mm_HandSolder\",\"Resistor_SMD/R_0612_1632Metric\",\"Resistor_SMD/R_0612_1632Metric_Pad1.18x3.40mm_HandSolder\",\"Resistor_SMD/R_0805_2012Metric\",\"Resistor_SMD/R_0805_2012Metric_Pad1.20x1.40mm_HandSolder\",\"Resistor_SMD/R_0815_2038Metric\",\"Resistor_SMD/R_0815_2038Metric_Pad1.20x4.05mm_HandSolder\",\"Resistor_SMD/R_1020_2550Metric\",\"Resistor_SMD/R_1020_2550Metric_Pad1.33x5.20mm_HandSolder\",\"Resistor_SMD/R_1206_3216Metric\",\"Resistor_SMD/R_1206_3216Metric_Pad1.30x1.75mm_HandSolder\",\"Resistor_SMD/R_1210_3225Metric\",\"Resistor_SMD/R_1210_3225Metric_Pad1.30x2.65mm_HandSolder\",\"Resistor_SMD/R_1218_3246Metric\",\"Resistor_SMD/R_1218_3246Metric_Pad1.22x4.75mm_HandSolder\",\"Resistor_SMD/R_1225_3264Metric\",\"Resistor_SMD/R_1225_3264Metric_Pad1.47x6.45mm_HandSolder\",\"Resistor_SMD/R_1812_4532Metric\",\"Resistor_SMD/R_1812_4532Metric_Pad1.30x3.40mm_HandSolder\",\"Resistor_SMD/R_2010_5025Metric\",\"Resistor_SMD/R_2010_5025Metric_Pad1.40x2.65mm_HandSolder\",\"Resistor_SMD/R_2512_6332Metric\",\"Resistor_SMD/R_2512_6332Metric_Pad1.40x3.35mm_HandSolder\",\"Resistor_SMD/R_2816_7142Metric\",\"Resistor_SMD/R_2816_7142Metric_Pad3.20x4.45mm_HandSolder\",\"Resistor_SMD/R_4020_10251Metric\",\"Resistor_SMD/R_4020_10251Metric_Pad1.65x5.30mm_HandSolder\",\"Resistor_SMD/R_Array_Concave_2x0603\",\"Resistor_SMD/R_Array_Concave_4x0402\",\"Resistor_SMD/R_Array_Concave_4x0603\",\"Resistor_SMD/R_Array_Convex_2x0402\",\"Resistor_SMD/R_Array_Convex_2x0603\",\"Resistor_SMD/R_Array_Convex_2x0606\",\"Resistor_SMD/R_Array_Convex_2x1206\",\"Resistor_SMD/R_Array_Convex_4x0402\",\"Resistor_SMD/R_Array_Convex_4x0603\",\"Resistor_SMD/R_Array_Convex_4x0612\",\"Resistor_SMD/R_Array_Convex_4x1206\",\"Resistor_SMD/R_Array_Convex_5x0603\",\"Resistor_SMD/R_Array_Convex_5x1206\",\"Resistor_SMD/R_Array_Convex_8x0602\",\"Resistor_SMD/R_Cat16-2\",\"Resistor_SMD/R_Cat16-4\",\"Resistor_SMD/R_Cat16-8\",\"Resistor_SMD/R_MELF_MMB-0207\",\"Resistor_SMD/R_MicroMELF_MMU-0102\",\"Resistor_SMD/R_MiniMELF_MMA-0204\",\"Resistor_SMD/R_Shunt_Isabellenhuette_BVR4026\",\"Resistor_SMD/R_Shunt_Ohmite_LVK12\",\"Resistor_SMD/R_Shunt_Ohmite_LVK20\",\"Resistor_SMD/R_Shunt_Ohmite_LVK24\",\"Resistor_SMD/R_Shunt_Ohmite_LVK25\",\"Resistor_SMD/R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm\",\"Resistor_SMD/R_Shunt_Vishay_WSK2512_6332Metric_T2.21mm\",\"Resistor_SMD/R_Shunt_Vishay_WSK2512_6332Metric_T2.66mm\",\"Resistor_SMD/R_Shunt_Vishay_WSKW0612\",\"Resistor_SMD/R_Shunt_Vishay_WSR2_WSR3\",\"Resistor_SMD/R_Shunt_Vishay_WSR2_WSR3_KelvinConnection\",\"Resistor_THT/R_Array_SIP10\",\"Resistor_THT/R_Array_SIP11\",\"Resistor_THT/R_Array_SIP12\",\"Resistor_THT/R_Array_SIP13\",\"Resistor_THT/R_Array_SIP14\",\"Resistor_THT/R_Array_SIP4\",\"Resistor_THT/R_Array_SIP5\",\"Resistor_THT/R_Array_SIP6\",\"Resistor_THT/R_Array_SIP7\",\"Resistor_THT/R_Array_SIP8\",\"Resistor_THT/R_Array_SIP9\",\"Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P1.90mm_Vertical\",\"Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical\",\"Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P15.24mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_Vertical\",\"Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P15.24mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_Vertical\",\"Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P20.32mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P12.70mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P15.24mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P20.32mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P15.24mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P20.32mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P20.32mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P30.48mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P15.24mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P20.32mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P20.32mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P30.48mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P22.86mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P30.48mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_DIN0922_L20.0mm_D9.0mm_P25.40mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0922_L20.0mm_D9.0mm_P30.48mm_Horizontal\",\"Resistor_THT/R_Axial_DIN0922_L20.0mm_D9.0mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P22.40mm\",\"Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P25.40mm\",\"Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P30.48mm\",\"Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P5.08mm_Vertical\",\"Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_Power_L25.0mm_W6.4mm_P27.94mm\",\"Resistor_THT/R_Axial_Power_L25.0mm_W6.4mm_P30.48mm\",\"Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P10.16mm_Vertical\",\"Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P27.94mm\",\"Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P30.48mm\",\"Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_Power_L38.0mm_W6.4mm_P40.64mm\",\"Resistor_THT/R_Axial_Power_L38.0mm_W6.4mm_P45.72mm\",\"Resistor_THT/R_Axial_Power_L38.0mm_W9.0mm_P40.64mm\",\"Resistor_THT/R_Axial_Power_L38.0mm_W9.0mm_P45.72mm\",\"Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P10.16mm_Vertical\",\"Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P55.88mm\",\"Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P60.96mm\",\"Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P7.62mm_Vertical\",\"Resistor_THT/R_Axial_Power_L50.0mm_W9.0mm_P55.88mm\",\"Resistor_THT/R_Axial_Power_L50.0mm_W9.0mm_P60.96mm\",\"Resistor_THT/R_Axial_Power_L60.0mm_W14.0mm_P10.16mm_Vertical\",\"Resistor_THT/R_Axial_Power_L60.0mm_W14.0mm_P66.04mm\",\"Resistor_THT/R_Axial_Power_L60.0mm_W14.0mm_P71.12mm\",\"Resistor_THT/R_Axial_Power_L75.0mm_W9.0mm_P81.28mm\",\"Resistor_THT/R_Axial_Power_L75.0mm_W9.0mm_P86.36mm\",\"Resistor_THT/R_Axial_Shunt_L22.2mm_W8.0mm_PS14.30mm_P25.40mm\",\"Resistor_THT/R_Axial_Shunt_L22.2mm_W9.5mm_PS14.30mm_P25.40mm\",\"Resistor_THT/R_Axial_Shunt_L35.3mm_W9.5mm_PS25.40mm_P38.10mm\",\"Resistor_THT/R_Axial_Shunt_L47.6mm_W12.7mm_PS34.93mm_P50.80mm\",\"Resistor_THT/R_Axial_Shunt_L47.6mm_W9.5mm_PS34.93mm_P50.80mm\",\"Resistor_THT/R_Bare_Metal_Element_L12.4mm_W4.8mm_P11.40mm\",\"Resistor_THT/R_Bare_Metal_Element_L16.3mm_W4.8mm_P15.30mm\",\"Resistor_THT/R_Bare_Metal_Element_L21.3mm_W4.8mm_P20.30mm\",\"Resistor_THT/R_Box_L13.0mm_W4.0mm_P9.00mm\",\"Resistor_THT/R_Box_L14.0mm_W5.0mm_P9.00mm\",\"Resistor_THT/R_Box_L26.0mm_W5.0mm_P20.00mm\",\"Resistor_THT/R_Box_L8.4mm_W2.5mm_P5.08mm\",\"Resistor_THT/R_Radial_Power_L11.0mm_W7.0mm_P5.00mm\",\"Resistor_THT/R_Radial_Power_L12.0mm_W8.0mm_P5.00mm\",\"Resistor_THT/R_Radial_Power_L13.0mm_W9.0mm_P5.00mm\",\"Resistor_THT/R_Radial_Power_L16.1mm_W9.0mm_P7.37mm\",\"Resistor_THT/R_Radial_Power_L7.0mm_W8.0mm_Px2.40mm_Py2.30mm\",\"Resistor_THT/R_Radial_Power_L9.0mm_W10.0mm_Px2.70mm_Py2.30mm\",\"Rotary_Encoder/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm\",\"Rotary_Encoder/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_CircularMountingHoles\",\"Rotary_Encoder/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_MountingHoles\",\"Rotary_Encoder/RotaryEncoder_Alps_EC11E_Vertical_H20mm\",\"Rotary_Encoder/RotaryEncoder_Alps_EC11E_Vertical_H20mm_CircularMountingHoles\",\"Rotary_Encoder/RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mm\",\"Rotary_Encoder/RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mm_CircularMountingHoles\",\"Rotary_Encoder/RotaryEncoder_Alps_EC12E_Vertical_H20mm\",\"Rotary_Encoder/RotaryEncoder_Alps_EC12E_Vertical_H20mm_CircularMountingHoles\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC09-2xxxF-Nxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC09-2xxxF-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC12R-2x17F-Nxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC12R-2x17F-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x16F-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x18F-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x21F-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x25S-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x26F-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x31F-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEC12R-3x17F-Nxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEC12R-3x17F-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEL12D-4x25S-Sxxxx\",\"Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEL12D-4xxxF-Sxxxx\",\"Sensor/ASAIR_AM2302_P2.54mm_Lead2.75mm_TabDown\",\"Sensor/ASAIR_AM2302_P2.54mm_Vertical\",\"Sensor/Aosong_DHT11_5.5x12.0_P2.54mm\",\"Sensor/Avago_APDS-9960\",\"Sensor/LuminOX_LOX-O2\",\"Sensor/MQ-6\",\"Sensor/Rohm_RPR-0521RS\",\"Sensor/SHT1x\",\"Sensor/SPEC_110-xxx_SMD-10Pin_20x20mm_P4.0mm\",\"Sensor/Senseair_S8_Down\",\"Sensor/Senseair_S8_Up\",\"Sensor/Sensirion_SCD4x-1EP_10.1x10.1mm_P1.25mm_EP4.8x4.8mm\",\"Sensor/Sensortech_MiCS_5x7mm_P1.25mm\",\"Sensor/TGS-5141\",\"Sensor/Winson_GM-402B_5x5mm_P1.27mm\",\"Sensor_Audio/CUI_CMC-4013-SMT\",\"Sensor_Audio/Infineon_PG-LLGA-5-1\",\"Sensor_Audio/Infineon_PG-LLGA-5-2\",\"Sensor_Audio/InvenSense_ICS-43434-6_3.5x2.65mm\",\"Sensor_Audio/Knowles_LGA-5_3.5x2.65mm\",\"Sensor_Audio/Knowles_LGA-6_4.72x3.76mm\",\"Sensor_Audio/Knowles_SPH0645LM4H-6_3.5x2.65mm\",\"Sensor_Audio/POM-2244P-C3310-2-R\",\"Sensor_Audio/ST_HLGA-6_3.76x4.72mm_P1.65mm\",\"Sensor_Current/AKM_CQ_7\",\"Sensor_Current/AKM_CQ_7S\",\"Sensor_Current/AKM_CQ_VSOP-24_5.6x7.9mm_P0.65mm\",\"Sensor_Current/AKM_CZ_SSOP-10_6.5x8.1mm_P0.95mm\",\"Sensor_Current/Allegro_CB_PFF\",\"Sensor_Current/Allegro_CB_PSF\",\"Sensor_Current/Allegro_CB_PSS\",\"Sensor_Current/Allegro_PSOF-7_4.8x6.4mm_P1.60mm\",\"Sensor_Current/Allegro_QFN-12-10-1EP_3x3mm_P0.5mm\",\"Sensor_Current/Allegro_QSOP-24_3.9x8.7mm_P0.635mm\",\"Sensor_Current/Allegro_SIP-4\",\"Sensor_Current/Diodes_SIP-3_4.1x1.5mm_P1.27mm\",\"Sensor_Current/Diodes_SIP-3_4.1x1.5mm_P2.65mm\",\"Sensor_Current/Honeywell_CSLW\",\"Sensor_Current/LEM_CKSR\",\"Sensor_Current/LEM_HO40-NP\",\"Sensor_Current/LEM_HO8-NP\",\"Sensor_Current/LEM_HO8-NSM\",\"Sensor_Current/LEM_HTFS\",\"Sensor_Current/LEM_HX02-P\",\"Sensor_Current/LEM_HX03-P-SP2\",\"Sensor_Current/LEM_HX04-P\",\"Sensor_Current/LEM_HX05-NP\",\"Sensor_Current/LEM_HX05-P-SP2\",\"Sensor_Current/LEM_HX06-P\",\"Sensor_Current/LEM_HX10-NP\",\"Sensor_Current/LEM_HX10-P-SP2\",\"Sensor_Current/LEM_HX15-NP\",\"Sensor_Current/LEM_HX15-P-SP2\",\"Sensor_Current/LEM_HX20-P-SP2\",\"Sensor_Current/LEM_HX25-P-SP2\",\"Sensor_Current/LEM_HX50-P-SP2\",\"Sensor_Current/LEM_LA25-NP\",\"Sensor_Current/LEM_LA25-P\",\"Sensor_Current/LEM_LTSR-NP\",\"Sensor_Distance/AMS_OLGA12\",\"Sensor_Distance/ST_VL53L1x\",\"Sensor_Humidity/Sensirion_DFN-4-1EP_2x2mm_P1mm_EP0.7x1.6mm\",\"Sensor_Humidity/Sensirion_DFN-4_1.5x1.5mm_P0.8mm_SHT4x_NoCentralPad\",\"Sensor_Humidity/Sensirion_DFN-8-1EP_2.5x2.5mm_P0.5mm_EP1.1x1.7mm\",\"Sensor_Humidity/Texas_S-PWSON-N6-HDC2080\",\"Sensor_Motion/Analog_LGA-16_3.25x3mm_P0.5mm_LayoutBorder3x5y\",\"Sensor_Motion/InvenSense_QFN-24_3x3mm_P0.4mm\",\"Sensor_Motion/InvenSense_QFN-24_3x3mm_P0.4mm_NoMask\",\"Sensor_Motion/InvenSense_QFN-24_4x4mm_P0.5mm\",\"Sensor_Motion/InvenSense_QFN-24_4x4mm_P0.5mm_NoMask\",\"Sensor_Pressure/CFSensor_XGZP6859D_7x7mm\",\"Sensor_Pressure/CFSensor_XGZP6897x\",\"Sensor_Pressure/CFSensor_XGZP6899x\",\"Sensor_Pressure/Freescale_98ARH99066A\",\"Sensor_Pressure/Freescale_98ARH99089A\",\"Sensor_Pressure/Honeywell_40PCxxxG1A\",\"Sensor_Pressure/Honeywell_ABPDAN\",\"Sensor_Pressure/TE_MS5525DSO-DBxxxyS\",\"Sensor_Pressure/TE_MS5837-xxBA\",\"Sensor_Voltage/LEM_LV25-P\",\"Socket/3M_Textool_240-1288-00-0602J_2x20_P2.54mm\",\"Socket/DIP_Socket-14_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_214-3339-00-0602J\",\"Socket/DIP_Socket-16_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_216-3340-00-0602J\",\"Socket/DIP_Socket-18_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_218-3341-00-0602J\",\"Socket/DIP_Socket-20_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_220-3342-00-0602J\",\"Socket/DIP_Socket-22_W6.9mm_W7.62mm_W10.16mm_W12.7mm_W13.5mm_3M_222-3343-00-0602J\",\"Socket/DIP_Socket-24_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_224-1275-00-0602J\",\"Socket/DIP_Socket-24_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_224-5248-00-0602J\",\"Socket/DIP_Socket-28_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_228-1277-00-0602J\",\"Socket/DIP_Socket-28_W6.9mm_W7.62mm_W10.16mm_W12.7mm_W13.5mm_3M_228-4817-00-0602J\",\"Socket/DIP_Socket-32_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_232-1285-00-0602J\",\"Socket/DIP_Socket-40_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_240-1280-00-0602J\",\"Socket/DIP_Socket-40_W22.1mm_W22.86mm_W25.4mm_W27.94mm_W28.7mm_3M_240-3639-00-0602J\",\"Socket/DIP_Socket-42_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_242-1281-00-0602J\",\"Socket/Wells_648-0482211SA01\",\"Symbol/CE-Logo_11.2x8mm_SilkScreen\",\"Symbol/CE-Logo_16.8x12mm_SilkScreen\",\"Symbol/CE-Logo_28x20mm_SilkScreen\",\"Symbol/CE-Logo_42x30mm_SilkScreen\",\"Symbol/CE-Logo_56.1x40mm_SilkScreen\",\"Symbol/CE-Logo_8.5x6mm_SilkScreen\",\"Symbol/ESD-Logo_13.2x12mm_SilkScreen\",\"Symbol/ESD-Logo_22x20mm_SilkScreen\",\"Symbol/ESD-Logo_33x30mm_SilkScreen\",\"Symbol/ESD-Logo_44.1x40mm_SilkScreen\",\"Symbol/ESD-Logo_6.6x6mm_SilkScreen\",\"Symbol/ESD-Logo_8.9x8mm_SilkScreen\",\"Symbol/EasterEgg_EWG1308-2013_ClassA\",\"Symbol/FCC-Logo_14.6x12mm_SilkScreen\",\"Symbol/FCC-Logo_24.2x20mm_SilkScreen\",\"Symbol/FCC-Logo_36.3x30mm_SilkScreen\",\"Symbol/FCC-Logo_48.3x40mm_SilkScreen\",\"Symbol/FCC-Logo_7.3x6mm_SilkScreen\",\"Symbol/FCC-Logo_9.6x8mm_SilkScreen\",\"Symbol/KiCad-Logo2_12mm_Copper\",\"Symbol/KiCad-Logo2_12mm_SilkScreen\",\"Symbol/KiCad-Logo2_20mm_Copper\",\"Symbol/KiCad-Logo2_20mm_SilkScreen\",\"Symbol/KiCad-Logo2_30mm_Copper\",\"Symbol/KiCad-Logo2_30mm_SilkScreen\",\"Symbol/KiCad-Logo2_40mm_Copper\",\"Symbol/KiCad-Logo2_40mm_SilkScreen\",\"Symbol/KiCad-Logo2_5mm_Copper\",\"Symbol/KiCad-Logo2_5mm_SilkScreen\",\"Symbol/KiCad-Logo2_6mm_Copper\",\"Symbol/KiCad-Logo2_6mm_SilkScreen\",\"Symbol/KiCad-Logo2_8mm_Copper\",\"Symbol/KiCad-Logo2_8mm_SilkScreen\",\"Symbol/KiCad-Logo_12mm_Copper\",\"Symbol/KiCad-Logo_12mm_SilkScreen\",\"Symbol/KiCad-Logo_20mm_Copper\",\"Symbol/KiCad-Logo_20mm_SilkScreen\",\"Symbol/KiCad-Logo_30mm_Copper\",\"Symbol/KiCad-Logo_30mm_SilkScreen\",\"Symbol/KiCad-Logo_40mm_Copper\",\"Symbol/KiCad-Logo_40mm_SilkScreen\",\"Symbol/KiCad-Logo_5mm_Copper\",\"Symbol/KiCad-Logo_5mm_SilkScreen\",\"Symbol/KiCad-Logo_6mm_Copper\",\"Symbol/KiCad-Logo_6mm_SilkScreen\",\"Symbol/KiCad-Logo_8mm_Copper\",\"Symbol/KiCad-Logo_8mm_SilkScreen\",\"Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_Named\",\"Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored\",\"Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored\",\"Symbol/LayerMarker_12_16.5x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_12_16.5x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_12_16.5x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_14_19.1x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_14_19.1x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_14_19.1x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_16_21.6x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_16_21.6x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_16_21.6x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_18_24.1x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_18_24.1x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_18_24.1x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_20_26.7x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_20_26.7x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_20_26.7x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_22_29.2x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_22_29.2x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_22_29.2x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_24_31.8x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_24_31.8x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_24_31.8x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_26_34.3x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_26_34.3x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_26_34.3x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_28_36.8x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_28_36.8x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_28_36.8x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm\",\"Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm_BottomMirrored\",\"Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm_Named\",\"Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored\",\"Symbol/LayerMarker_30_39.4x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_30_39.4x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_30_39.4x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_32_41.9x2.54mm_TextH1mm_P1.27mm_AlNum\",\"Symbol/LayerMarker_32_41.9x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored\",\"Symbol/LayerMarker_32_41.9x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored\",\"Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm\",\"Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_BottomMirrored\",\"Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_LowerMirrored\",\"Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_Named\",\"Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored\",\"Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored\",\"Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm\",\"Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_BottomMirrored\",\"Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_LowerMirrored\",\"Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_Named\",\"Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored\",\"Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored\",\"Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm\",\"Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_BottomMirrored\",\"Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_LowerMirrored\",\"Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_Named\",\"Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored\",\"Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored\",\"Symbol/OSHW-Logo2_14.6x12mm_Copper\",\"Symbol/OSHW-Logo2_14.6x12mm_SilkScreen\",\"Symbol/OSHW-Logo2_24.3x20mm_Copper\",\"Symbol/OSHW-Logo2_24.3x20mm_SilkScreen\",\"Symbol/OSHW-Logo2_36.5x30mm_Copper\",\"Symbol/OSHW-Logo2_36.5x30mm_SilkScreen\",\"Symbol/OSHW-Logo2_48.7x40mm_Copper\",\"Symbol/OSHW-Logo2_48.7x40mm_SilkScreen\",\"Symbol/OSHW-Logo2_7.3x6mm_Copper\",\"Symbol/OSHW-Logo2_7.3x6mm_SilkScreen\",\"Symbol/OSHW-Logo2_9.8x8mm_Copper\",\"Symbol/OSHW-Logo2_9.8x8mm_SilkScreen\",\"Symbol/OSHW-Logo_11.4x12mm_Copper\",\"Symbol/OSHW-Logo_11.4x12mm_SilkScreen\",\"Symbol/OSHW-Logo_19x20mm_Copper\",\"Symbol/OSHW-Logo_19x20mm_SilkScreen\",\"Symbol/OSHW-Logo_28.5x30mm_Copper\",\"Symbol/OSHW-Logo_28.5x30mm_SilkScreen\",\"Symbol/OSHW-Logo_38.1x40mm_Copper\",\"Symbol/OSHW-Logo_38.1x40mm_SilkScreen\",\"Symbol/OSHW-Logo_5.7x6mm_Copper\",\"Symbol/OSHW-Logo_5.7x6mm_SilkScreen\",\"Symbol/OSHW-Logo_7.5x8mm_Copper\",\"Symbol/OSHW-Logo_7.5x8mm_SilkScreen\",\"Symbol/OSHW-Symbol_13.4x12mm_Copper\",\"Symbol/OSHW-Symbol_13.4x12mm_SilkScreen\",\"Symbol/OSHW-Symbol_22.3x20mm_Copper\",\"Symbol/OSHW-Symbol_22.3x20mm_SilkScreen\",\"Symbol/OSHW-Symbol_33.5x30mm_Copper\",\"Symbol/OSHW-Symbol_33.5x30mm_SilkScreen\",\"Symbol/OSHW-Symbol_44.5x40mm_Copper\",\"Symbol/OSHW-Symbol_44.5x40mm_SilkScreen\",\"Symbol/OSHW-Symbol_6.7x6mm_Copper\",\"Symbol/OSHW-Symbol_6.7x6mm_SilkScreen\",\"Symbol/OSHW-Symbol_8.9x8mm_Copper\",\"Symbol/OSHW-Symbol_8.9x8mm_SilkScreen\",\"Symbol/Polarity_Center_Negative_12mm_SilkScreen\",\"Symbol/Polarity_Center_Negative_20mm_SilkScreen\",\"Symbol/Polarity_Center_Negative_30mm_SilkScreen\",\"Symbol/Polarity_Center_Negative_40mm_SilkScreen\",\"Symbol/Polarity_Center_Negative_6mm_SilkScreen\",\"Symbol/Polarity_Center_Negative_8mm_SilkScreen\",\"Symbol/Polarity_Center_Positive_12mm_SilkScreen\",\"Symbol/Polarity_Center_Positive_20mm_SilkScreen\",\"Symbol/Polarity_Center_Positive_30mm_SilkScreen\",\"Symbol/Polarity_Center_Positive_40mm_SilkScreen\",\"Symbol/Polarity_Center_Positive_6mm_SilkScreen\",\"Symbol/Polarity_Center_Positive_8mm_SilkScreen\",\"Symbol/RoHS-Logo_12mm_SilkScreen\",\"Symbol/RoHS-Logo_20mm_SilkScreen\",\"Symbol/RoHS-Logo_30mm_SilkScreen\",\"Symbol/RoHS-Logo_40mm_SilkScreen\",\"Symbol/RoHS-Logo_6mm_SilkScreen\",\"Symbol/RoHS-Logo_8mm_SilkScreen\",\"Symbol/Screw_Generic_2.0x3.0mm_SilkScreen\",\"Symbol/Smolhaj_Scale_0.1\",\"Symbol/Symbol_Attention_Triangle_17x15mm_Copper\",\"Symbol/Symbol_Attention_Triangle_8x7mm_Copper\",\"Symbol/Symbol_Barrel_Polarity\",\"Symbol/Symbol_CC-Attribution_CopperTop_Big\",\"Symbol/Symbol_CC-Attribution_CopperTop_Small\",\"Symbol/Symbol_CC-Noncommercial_CopperTop_Big\",\"Symbol/Symbol_CC-Noncommercial_CopperTop_Small\",\"Symbol/Symbol_CC-PublicDomain_CopperTop_Big\",\"Symbol/Symbol_CC-PublicDomain_CopperTop_Small\",\"Symbol/Symbol_CC-PublicDomain_SilkScreenTop_Big\",\"Symbol/Symbol_CC-ShareAlike_CopperTop_Big\",\"Symbol/Symbol_CC-ShareAlike_CopperTop_Small\",\"Symbol/Symbol_CreativeCommonsPublicDomain_CopperTop_Small\",\"Symbol/Symbol_CreativeCommonsPublicDomain_SilkScreenTop_Small\",\"Symbol/Symbol_CreativeCommons_CopperTop_Type1_Big\",\"Symbol/Symbol_CreativeCommons_CopperTop_Type2_Big\",\"Symbol/Symbol_CreativeCommons_CopperTop_Type2_Small\",\"Symbol/Symbol_CreativeCommons_SilkScreenTop_Type2_Big\",\"Symbol/Symbol_Danger_18x16mm_Copper\",\"Symbol/Symbol_Danger_8x8mm_Copper\",\"Symbol/Symbol_ESD-Logo-Text_CopperTop\",\"Symbol/Symbol_ESD-Logo_CopperTop\",\"Symbol/Symbol_GNU-GPL_CopperTop_Big\",\"Symbol/Symbol_GNU-GPL_CopperTop_Small\",\"Symbol/Symbol_GNU-Logo_CopperTop\",\"Symbol/Symbol_GNU-Logo_SilkscreenTop\",\"Symbol/Symbol_HighVoltage_NoTriangle_2x5mm_Copper\",\"Symbol/Symbol_HighVoltage_NoTriangle_6x15mm_Copper\",\"Symbol/Symbol_HighVoltage_Triangle_17x15mm_Copper\",\"Symbol/Symbol_HighVoltage_Triangle_6x6mm_Copper\",\"Symbol/Symbol_HighVoltage_Triangle_8x7mm_Copper\",\"Symbol/UKCA-Logo_12x12mm_SilkScreen\",\"Symbol/UKCA-Logo_20x20mm_SilkScreen\",\"Symbol/UKCA-Logo_30x30mm_SilkScreen\",\"Symbol/UKCA-Logo_40x40mm_SilkScreen\",\"Symbol/UKCA-Logo_6x6mm_SilkScreen\",\"Symbol/UKCA-Logo_8x8mm_SilkScreen\",\"Symbol/WEEE-Logo_14x20mm_SilkScreen\",\"Symbol/WEEE-Logo_21x30mm_SilkScreen\",\"Symbol/WEEE-Logo_28.1x40mm_SilkScreen\",\"Symbol/WEEE-Logo_4.2x6mm_SilkScreen\",\"Symbol/WEEE-Logo_5.6x8mm_SilkScreen\",\"Symbol/WEEE-Logo_8.4x12mm_SilkScreen\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-03P_1x03_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-04P_1x04_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-05P_1x05_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-06P_1x06_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-07P_1x07_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-08P_1x08_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-09P_1x09_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-10P_1x10_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-11P_1x11_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-12P_1x12_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-13P_1x13_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-14P_1x14_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-15P_1x15_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-16P_1x16_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-17P_1x17_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-18P_1x18_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-19P_1x19_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-20P_1x20_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-21P_1x21_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-22P_1x22_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-23P_1x23_P5.00mm\",\"TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-24P_1x24_P5.00mm\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-10P_1x10_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-11P_1x11_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-12P_1x12_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-13P_1x13_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-14P_1x14_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-15P_1x15_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-16P_1x16_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-17P_1x17_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-18P_1x18_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-19P_1x19_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-20P_1x20_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-21P_1x21_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-22P_1x22_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-23P_1x23_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-3P_1x03_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-4P_1x04_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-5P_1x05_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-6P_1x06_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-7P_1x07_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-8P_1x08_P2.54mm_Horizontal\",\"TerminalBlock/TerminalBlock_Xinya_XY308-2.54-9P_1x09_P2.54mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x02_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x02_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x03_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x03_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x04_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x04_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x05_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x05_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x06_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x06_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x07_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x07_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x08_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x08_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x09_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x09_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x10_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x10_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x11_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x11_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x12_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x12_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x13_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x13_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x14_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x14_P3.50mm_Vertical\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x15_P3.50mm_Horizontal\",\"TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x15_P3.50mm_Vertical\",\"TerminalBlock_Altech/Altech_AK100_1x02_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x03_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x04_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x05_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x06_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x07_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x08_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x09_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x10_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x11_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x12_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x13_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x14_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x15_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x16_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x17_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x18_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x19_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x20_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x21_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x22_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x23_P5.00mm\",\"TerminalBlock_Altech/Altech_AK100_1x24_P5.00mm\",\"TerminalBlock_Altech/Altech_AK300_1x02_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x03_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x04_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x05_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x06_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x07_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x08_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x09_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x10_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x11_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x12_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x13_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x14_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x15_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x16_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x17_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x18_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x19_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x20_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x21_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x22_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x23_P5.00mm_45-Degree\",\"TerminalBlock_Altech/Altech_AK300_1x24_P5.00mm_45-Degree\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-02_1x02_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-03_1x03_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-04_1x04_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-05_1x05_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-06_1x06_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-07_1x07_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-08_1x08_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-09_1x09_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-10_1x10_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-11_1x11_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-12_1x12_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-13_1x13_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-14_1x14_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-15_1x15_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-16_1x16_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-17_1x17_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-18_1x18_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-19_1x19_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-20_1x20_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-21_1x21_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-22_1x22_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-23_1x23_P5.08mm_Horizontal\",\"TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-24_1x24_P5.08mm_Horizontal\",\"TerminalBlock_Degson/Degson_DG246-3.81-03P\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-01P_1x01_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-02P_1x02_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-03P_1x03_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-04P_1x04_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-05P_1x05_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-06P_1x06_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-07P_1x07_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-08P_1x08_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-09P_1x09_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-10P_1x10_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-11P_1x11_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-12P_1x12_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-14P_1x14_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-15P_1x15_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-16P_1x16_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-18P_1x18_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-19P_1x19_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-20P_1x20_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-24P_1x24_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-44P_1x44_P3.50mm_45Degree\",\"TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-45P_1x45_P3.50mm_45Degree\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-02_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-03_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-04_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-05_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-06_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-07_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-08_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-09_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-10_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-11_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-12_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-13_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-14_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-15_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-16_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-17_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-18_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-19_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-20_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-21_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-22_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-23_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-24_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-25_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-26_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-27_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-28_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-29_P10.00mm\",\"TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-30_P10.00mm\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360271_1x01_Horizontal_ScrewM3.0_Boxed\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360272_1x01_Horizontal_ScrewM2.6\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360273_1x01_Horizontal_ScrewM2.6_WireProtection\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360291_1x01_Horizontal_ScrewM3.0_Boxed\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360322_1x01_Horizontal_ScrewM3.0_WireProtection\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360381_1x01_Horizontal_ScrewM3.0\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360410_1x01_Horizontal_ScrewM3.0\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360425_1x01_Horizontal_ScrewM4.0_Boxed\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05502HBLC_1x02_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05503HBLC_1x03_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05504HBLC_1x04_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05505HBLC_1x05_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05506HBLC_1x06_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type055_RT01502HDWU_1x02_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type055_RT01503HDWU_1x03_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type055_RT01504HDWU_1x04_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06302HBWC_1x02_P3.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06303HBWC_1x03_P3.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06304HBWC_1x04_P3.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06305HBWC_1x05_P3.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06306HBWC_1x06_P3.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01902HDWC_1x02_P10.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01903HDWC_1x03_P10.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01904HDWC_1x04_P10.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01905HDWC_1x05_P10.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type073_RT02602HBLU_1x02_P5.08mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type073_RT02603HBLU_1x03_P5.08mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03402HBLC_1x02_P3.81mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03403HBLC_1x03_P3.81mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03404HBLC_1x04_P3.81mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03405HBLC_1x05_P3.81mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03406HBLC_1x06_P3.81mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03502HBLU_1x02_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03503HBLU_1x03_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03504HBLU_1x04_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03505HBLU_1x05_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03506HBLU_1x06_P5.00mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01602HBWC_1x02_P5.08mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01603HBWC_1x03_P5.08mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01604HBWC_1x04_P5.08mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01605HBWC_1x05_P5.08mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01606HBWC_1x06_P5.08mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13702HBWC_1x02_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13703HBWC_1x03_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13704HBWC_1x04_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13705HBWC_1x05_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13706HBWC_1x06_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02702HBLC_1x02_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02703HBLC_1x03_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02704HBLC_1x04_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02705HBLC_1x05_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02706HBLC_1x06_P7.50mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04502UBLC_1x02_P5.00mm_45Degree\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04503UBLC_1x03_P5.00mm_45Degree\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04504UBLC_1x04_P5.00mm_45Degree\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04505UBLC_1x05_P5.00mm_45Degree\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04506UBLC_1x06_P5.00mm_45Degree\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type701_RT11L02HGLU_1x02_P6.35mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type701_RT11L03HGLU_1x03_P6.35mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type703_RT10N02HGLU_1x02_P9.52mm_Horizontal\",\"TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type703_RT10N03HGLU_1x03_P9.52mm_Horizontal\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x02_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x03_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x04_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x05_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x06_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x07_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x08_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x09_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x10_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x11_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x12_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x02_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x03_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x04_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x05_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x06_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x07_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x08_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x09_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x10_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x11_P9.5mm\",\"TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x12_P9.5mm\",\"TerminalBlock_Philmore/TerminalBlock_Philmore_TB132_1x02_P5.00mm_Horizontal\",\"TerminalBlock_Philmore/TerminalBlock_Philmore_TB133_1x03_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-10-5.08_1x10_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-10_1x10_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-11-5.08_1x11_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-11_1x11_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-12-5.08_1x12_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-12_1x12_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-13-5.08_1x13_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-13_1x13_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-14-5.08_1x14_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-14_1x14_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-15-5.08_1x15_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-15_1x15_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-16-5.08_1x16_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-16_1x16_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-3_1x03_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-4_1x04_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-5-5.08_1x05_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-5_1x05_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-6-5.08_1x06_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-6_1x06_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-7-5.08_1x07_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-7_1x07_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-8-5.08_1x08_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-8_1x08_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-9-5.08_1x09_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-9_1x09_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-10-3.81_1x10_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-11-3.81_1x11_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-12-3.81_1x12_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-13-3.81_1x13_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-2-3.81_1x02_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-3-3.81_1x03_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-4-3.81_1x04_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-5-3.81_1x05_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-6-3.81_1x06_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-7-3.81_1x07_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-8-3.81_1x08_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-9-3.81_1x09_P3.81mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-10-5.08_1x10_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-11-5.08_1x11_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-12-5.08_1x12_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-13-5.08_1x13_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-14-5.08_1x14_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-15-5.08_1x15_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-16-5.08_1x16_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-3-5.08_1x03_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-4-5.08_1x04_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-5-5.08_1x05_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-6-5.08_1x06_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-7-5.08_1x07_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-8-5.08_1x08_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-9-5.08_1x09_P5.08mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-10-2.54_1x10_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-11-2.54_1x11_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-12-2.54_1x12_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-2-2.54_1x02_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-3-2.54_1x03_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-4-2.54_1x04_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-5-2.54_1x05_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-6-2.54_1x06_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-7-2.54_1x07_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-8-2.54_1x08_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-9-2.54_1x09_P2.54mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-10-3.5-H_1x10_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-10-5.0-H_1x10_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-11-3.5-H_1x11_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-11-5.0-H_1x11_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-12-3.5-H_1x12_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-12-5.0-H_1x12_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-13-3.5-H_1x13_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-13-5.0-H_1x13_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-14-3.5-H_1x14_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-14-5.0-H_1x14_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-15-3.5-H_1x15_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-15-5.0-H_1x15_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-16-3.5-H_1x16_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-16-5.0-H_1x16_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-2-5.0-H_1x02_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-3-3.5-H_1x03_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-3-5.0-H_1x03_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-4-3.5-H_1x04_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-4-5.0-H_1x04_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-5-3.5-H_1x05_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-5-5.0-H_1x05_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-6-3.5-H_1x06_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-6-5.0-H_1x06_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-7-3.5-H_1x07_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-7-5.0-H_1x07_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-8-3.5-H_1x08_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-8-5.0-H_1x08_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-9-3.5-H_1x09_P3.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-9-5.0-H_1x09_P5.00mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-2,5-V-SMD_1x02-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-2.5-H-THR_1x02_P2.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-2.5-V-THR_1x02_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-HV-2.5-SMD_1x02-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-2,5-V-SMD_1x03-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-2.5-H-THR_1x03_P2.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-2.5-V-THR_1x03_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-HV-2.5-SMD_1x03-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-2,5-V-SMD_1x04-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-2.5-H-THR_1x04_P2.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-2.5-V-THR_1x04_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-HV-2.5-SMD_1x04-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-2,5-V-SMD_1x05-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-2.5-H-THR_1x05_P2.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-2.5-V-THR_1x05_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-HV-2.5-SMD_1x05-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-2,5-V-SMD_1x06-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-2.5-H-THR_1x06_P2.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-2.5-V-THR_1x06_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-HV-2.5-SMD_1x06-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-2,5-V-SMD_1x07-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-2.5-H-THR_1x07_P2.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-2.5-V-THR_1x07_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-HV-2.5-SMD_1x07-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-2,5-V-SMD_1x08-1MP_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-2.5-H-THR_1x08_P2.50mm_Horizontal\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-2.5-V-THR_1x08_P2.50mm_Vertical\",\"TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-HV-2.5-SMD_1x08-1MP_P2.50mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00001_1x02_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00002_1x03_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00003_1x04_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00004_1x05_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00005_1x06_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00006_1x07_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00007_1x08_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00008_1x09_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00009_1x10_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00010_1x11_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00011_1x12_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00012_1x02_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00013_1x03_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00014_1x04_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00015_1x05_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00016_1x06_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00017_1x07_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00018_1x08_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00019_1x09_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00020_1x10_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00021_1x11_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00022_1x12_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00023_1x02_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00024_1x03_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00025_1x04_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00026_1x05_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00027_1x06_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00028_1x07_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00029_1x08_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00030_1x09_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00031_1x10_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00032_1x11_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00033_1x12_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00045_1x02_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00046_1x03_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00047_1x04_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00048_1x05_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00049_1x06_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00050_1x07_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00051_1x08_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00052_1x09_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00053_1x10_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00054_1x11_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00055_1x12_P5.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00056_1x02_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00057_1x03_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00058_1x04_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00059_1x05_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00060_1x06_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00061_1x07_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00062_1x08_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00063_1x09_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00064_1x10_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00065_1x11_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00066_1x12_P5.00mm_45Degree\",\"TerminalBlock_RND/TerminalBlock_RND_205-00067_1x02_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00068_1x03_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00069_1x04_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00070_1x05_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00071_1x06_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00072_1x07_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00073_1x08_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00074_1x09_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00075_1x10_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00076_1x11_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00077_1x12_P7.50mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00078_1x02_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00079_1x03_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00080_1x04_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00081_1x05_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00082_1x06_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00083_1x07_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00084_1x08_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00085_1x09_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00086_1x10_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00087_1x11_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00088_1x12_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00232_1x02_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00233_1x03_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00234_1x04_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00235_1x05_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00236_1x06_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00237_1x07_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00238_1x08_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00239_1x09_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00240_1x10_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00241_1x02_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00241_1x11_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00242_1x03_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00242_1x12_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00243_1x04_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00244_1x05_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00245_1x06_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00246_1x07_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00247_1x08_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00248_1x09_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00249_1x10_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00250_1x11_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00251_1x12_P10.16mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00276_1x02_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00277_1x03_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00278_1x04_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00279_1x05_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00280_1x06_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00281_1x07_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00282_1x08_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00283_1x09_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00284_1x10_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00285_1x11_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00286_1x12_P5.00mm_Vertical\",\"TerminalBlock_RND/TerminalBlock_RND_205-00287_1x02_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00288_1x03_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00289_1x04_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00290_1x05_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00291_1x06_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00292_1x07_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00293_1x08_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00294_1x09_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00295_1x10_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00296_1x11_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00297_1x12_P5.08mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00298_1x02_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00299_1x03_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00300_1x04_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00301_1x05_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00302_1x06_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00303_1x07_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00304_1x08_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00305_1x09_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00306_1x10_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00307_1x11_P10.00mm_Horizontal\",\"TerminalBlock_RND/TerminalBlock_RND_205-00308_1x12_P10.00mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_1-282834-0_1x10_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_1-282834-1_1x11_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_1-282834-2_1x12_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-2_1x02_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-3_1x03_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-4_1x04_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-5_1x05_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-6_1x06_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-7_1x07_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-8_1x08_P2.54mm_Horizontal\",\"TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-9_1x09_P2.54mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-502_2x02_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-503_2x03_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-504_2x04_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-505_2x05_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-506_2x06_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-507_2x07_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-508_2x08_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-509_2x09_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-510_2x10_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_233-512_2x12_P2.54mm\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-101_1x01_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-102_1x02_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-103_1x03_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-104_1x04_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-105_1x05_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-106_1x06_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-107_1x07_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-108_1x08_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-109_1x09_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-110_1x10_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-111_1x11_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-112_1x12_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-113_1x13_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-114_1x14_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-115_1x15_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-116_1x16_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-124_1x24_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-136_1x36_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-148_1x48_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-201_1x01_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-202_1x02_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-203_1x03_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-204_1x04_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-205_1x05_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-206_1x06_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-207_1x07_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-208_1x08_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-209_1x09_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-210_1x10_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-211_1x11_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-212_1x12_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-213_1x13_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-214_1x14_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-215_1x15_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-216_1x16_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-224_1x24_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-301_1x01_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-302_1x02_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-303_1x03_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-304_1x04_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-305_1x05_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-306_1x06_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-307_1x07_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-308_1x08_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-309_1x09_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-310_1x10_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-311_1x11_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-312_1x12_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-313_1x13_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-314_1x14_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-315_1x15_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-316_1x16_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-324_1x24_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-401_1x01_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-402_1x02_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-403_1x03_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-404_1x04_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-405_1x05_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-406_1x06_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-407_1x07_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-408_1x08_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-409_1x09_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-410_1x10_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-411_1x11_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-412_1x12_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-413_1x13_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-414_1x14_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-415_1x15_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-416_1x16_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-424_1x24_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-436_1x36_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-448_1x48_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-501_1x01_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-502_1x02_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-503_1x03_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-504_1x04_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-505_1x05_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-506_1x06_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-507_1x07_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-508_1x08_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-509_1x09_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-510_1x10_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-511_1x11_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-512_1x12_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-513_1x13_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-514_1x14_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-515_1x15_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-516_1x16_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-524_1x24_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-601_1x01_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-602_1x02_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-603_1x03_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-604_1x04_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-605_1x05_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-606_1x06_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-607_1x07_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-608_1x08_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-609_1x09_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-610_1x10_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-611_1x11_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-612_1x12_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-613_1x13_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-614_1x14_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-615_1x15_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-616_1x16_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_236-624_1x24_P10.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1102_1x02_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1103_1x03_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1104_1x04_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1105_1x05_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1106_1x06_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1108_1x08_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1109_1x09_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1110_1x10_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1111_1x11_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1112_1x12_P3.50mm_Horizontal\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3102_1x02_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3103_1x03_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3104_1x04_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3105_1x05_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3106_1x06_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3107_1x07_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3108_1x08_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3109_1x09_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3110_1x10_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3111_1x11_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3112_1x12_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3114_1x14_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3124_1x24_P3.50mm_Vertical\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-101_1x01_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-102_1x02_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-103_1x03_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-104_1x04_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-105_1x05_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-106_1x06_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-107_1x07_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-108_1x08_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-109_1x09_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-110_1x10_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-111_1x11_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-112_1x12_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-113_1x13_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-114_1x14_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-115_1x15_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-116_1x16_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-124_1x24_P5.00mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-301_1x01_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-302_1x02_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-303_1x03_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-304_1x04_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-305_1x05_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-306_1x06_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-307_1x07_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-308_1x08_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-309_1x09_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-310_1x10_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-311_1x11_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-312_1x12_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-316_1x16_P7.50mm_45Degree\",\"TerminalBlock_WAGO/TerminalBlock_WAGO_804-324_1x24_P7.50mm_45Degree\",\"TerminalBlock_Wuerth/Wuerth_691311400102_P7.62mm\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650073_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650074_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650094_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650173_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650174_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650194_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650195_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74655095_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651173_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651174_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651175_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651194_THR\",\"TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651195_THR\",\"TestPoint/TestPoint_2Pads_Pitch2.54mm_Drill0.8mm\",\"TestPoint/TestPoint_2Pads_Pitch5.08mm_Drill1.3mm\",\"TestPoint/TestPoint_Bridge_Pitch2.0mm_Drill0.7mm\",\"TestPoint/TestPoint_Bridge_Pitch2.54mm_Drill0.7mm\",\"TestPoint/TestPoint_Bridge_Pitch2.54mm_Drill1.0mm\",\"TestPoint/TestPoint_Bridge_Pitch2.54mm_Drill1.3mm\",\"TestPoint/TestPoint_Bridge_Pitch3.81mm_Drill1.3mm\",\"TestPoint/TestPoint_Bridge_Pitch5.08mm_Drill0.7mm\",\"TestPoint/TestPoint_Bridge_Pitch5.08mm_Drill1.3mm\",\"TestPoint/TestPoint_Bridge_Pitch6.35mm_Drill1.3mm\",\"TestPoint/TestPoint_Bridge_Pitch7.62mm_Drill1.3mm\",\"TestPoint/TestPoint_Keystone_5000-5004_Miniature\",\"TestPoint/TestPoint_Keystone_5005-5009_Compact\",\"TestPoint/TestPoint_Keystone_5010-5014_Multipurpose\",\"TestPoint/TestPoint_Keystone_5015_Micro_Mini\",\"TestPoint/TestPoint_Keystone_5019_Miniature\",\"TestPoint/TestPoint_Loop_D1.80mm_Drill1.0mm_Beaded\",\"TestPoint/TestPoint_Loop_D2.50mm_Drill1.0mm\",\"TestPoint/TestPoint_Loop_D2.50mm_Drill1.0mm_LowProfile\",\"TestPoint/TestPoint_Loop_D2.50mm_Drill1.85mm\",\"TestPoint/TestPoint_Loop_D2.54mm_Drill1.5mm_Beaded\",\"TestPoint/TestPoint_Loop_D2.60mm_Drill0.9mm_Beaded\",\"TestPoint/TestPoint_Loop_D2.60mm_Drill1.4mm_Beaded\",\"TestPoint/TestPoint_Loop_D2.60mm_Drill1.6mm_Beaded\",\"TestPoint/TestPoint_Loop_D3.50mm_Drill0.9mm_Beaded\",\"TestPoint/TestPoint_Loop_D3.50mm_Drill1.4mm_Beaded\",\"TestPoint/TestPoint_Loop_D3.80mm_Drill2.0mm\",\"TestPoint/TestPoint_Loop_D3.80mm_Drill2.5mm\",\"TestPoint/TestPoint_Loop_D3.80mm_Drill2.8mm\",\"TestPoint/TestPoint_Pad_1.0x1.0mm\",\"TestPoint/TestPoint_Pad_1.5x1.5mm\",\"TestPoint/TestPoint_Pad_2.0x2.0mm\",\"TestPoint/TestPoint_Pad_2.5x2.5mm\",\"TestPoint/TestPoint_Pad_3.0x3.0mm\",\"TestPoint/TestPoint_Pad_4.0x4.0mm\",\"TestPoint/TestPoint_Pad_D1.0mm\",\"TestPoint/TestPoint_Pad_D1.5mm\",\"TestPoint/TestPoint_Pad_D2.0mm\",\"TestPoint/TestPoint_Pad_D2.5mm\",\"TestPoint/TestPoint_Pad_D3.0mm\",\"TestPoint/TestPoint_Pad_D4.0mm\",\"TestPoint/TestPoint_Plated_Hole_D2.0mm\",\"TestPoint/TestPoint_Plated_Hole_D3.0mm\",\"TestPoint/TestPoint_Plated_Hole_D4.0mm\",\"TestPoint/TestPoint_Plated_Hole_D5.0mm\",\"TestPoint/TestPoint_THTPad_1.0x1.0mm_Drill0.5mm\",\"TestPoint/TestPoint_THTPad_1.5x1.5mm_Drill0.7mm\",\"TestPoint/TestPoint_THTPad_2.0x2.0mm_Drill1.0mm\",\"TestPoint/TestPoint_THTPad_2.5x2.5mm_Drill1.2mm\",\"TestPoint/TestPoint_THTPad_3.0x3.0mm_Drill1.5mm\",\"TestPoint/TestPoint_THTPad_4.0x4.0mm_Drill2.0mm\",\"TestPoint/TestPoint_THTPad_D1.0mm_Drill0.5mm\",\"TestPoint/TestPoint_THTPad_D1.5mm_Drill0.7mm\",\"TestPoint/TestPoint_THTPad_D2.0mm_Drill1.0mm\",\"TestPoint/TestPoint_THTPad_D2.5mm_Drill1.2mm\",\"TestPoint/TestPoint_THTPad_D3.0mm_Drill1.5mm\",\"TestPoint/TestPoint_THTPad_D4.0mm_Drill2.0mm\",\"Transformer_SMD/Pulse_P0926NL\",\"Transformer_SMD/Pulse_PA1323NL\",\"Transformer_SMD/Pulse_PA2001NL\",\"Transformer_SMD/Pulse_PA2002NL-PA2008NL-PA2009NL\",\"Transformer_SMD/Pulse_PA2004NL\",\"Transformer_SMD/Pulse_PA2005NL\",\"Transformer_SMD/Pulse_PA2006NL\",\"Transformer_SMD/Pulse_PA2007NL\",\"Transformer_SMD/Pulse_PA2777NL\",\"Transformer_SMD/Pulse_PA3493NL\",\"Transformer_SMD/Transformer_Coilcraft_CST1\",\"Transformer_SMD/Transformer_Coilcraft_CST2\",\"Transformer_SMD/Transformer_Coilcraft_CST2010\",\"Transformer_SMD/Transformer_CurrentSense_8.4x7.2mm\",\"Transformer_SMD/Transformer_ED8_4-Lead_10.5x8mm_P5mm\",\"Transformer_SMD/Transformer_Ethernet_Bel_S558-5999-T7-F\",\"Transformer_SMD/Transformer_Ethernet_Bourns_PT61017PEL\",\"Transformer_SMD/Transformer_Ethernet_Bourns_PT61020EL\",\"Transformer_SMD/Transformer_Ethernet_Bourns_SM13126PEL\",\"Transformer_SMD/Transformer_Ethernet_CNDtek_H1102N\",\"Transformer_SMD/Transformer_Ethernet_HALO_TG111-MSC13\",\"Transformer_SMD/Transformer_Ethernet_Halo_N2_SO-16_7.11x12.7mm\",\"Transformer_SMD/Transformer_Ethernet_Halo_N5_SO-16_7.11x12.7mm\",\"Transformer_SMD/Transformer_Ethernet_Halo_N6_SO-16_7.11x14.73mm\",\"Transformer_SMD/Transformer_Ethernet_Wuerth_749013011A\",\"Transformer_SMD/Transformer_Ethernet_YDS_30F-51NL_SO-24_7.1x15.1mm\",\"Transformer_SMD/Transformer_MACOM_SM-22\",\"Transformer_SMD/Transformer_MiniCircuits_AT224-1A\",\"Transformer_SMD/Transformer_Murata_78250JC\",\"Transformer_SMD/Transformer_NF_ETAL_P2781\",\"Transformer_SMD/Transformer_NF_ETAL_P2781_HandSoldering\",\"Transformer_SMD/Transformer_NF_ETAL_P3000\",\"Transformer_SMD/Transformer_NF_ETAL_P3000_HandSoldering\",\"Transformer_SMD/Transformer_NF_ETAL_P3181\",\"Transformer_SMD/Transformer_NF_ETAL_P3181_HandSoldering\",\"Transformer_SMD/Transformer_NF_ETAL_P3188\",\"Transformer_SMD/Transformer_NF_ETAL_P3188_HandSoldering\",\"Transformer_SMD/Transformer_NF_ETAL_P3191\",\"Transformer_SMD/Transformer_NF_ETAL_P3191_HandSoldering\",\"Transformer_SMD/Transformer_Pulse_H1100NL\",\"Transformer_SMD/Transformer_Wuerth_750315371\",\"Transformer_SMD/Transformer_Wurth_WE-AGDT-EP7\",\"Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D10.5mm_Amidon-T37\",\"Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D12.5mm_Amidon-T44\",\"Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D14.0mm_Amidon-T50\",\"Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D9.0mm_Amidon-T30\",\"Transformer_THT/Autotransformer_ZS1052-AC\",\"Transformer_THT/Transformer_37x44\",\"Transformer_THT/Transformer_Breve_TEZ-22x24\",\"Transformer_THT/Transformer_Breve_TEZ-28x33\",\"Transformer_THT/Transformer_Breve_TEZ-35x42\",\"Transformer_THT/Transformer_Breve_TEZ-38x45\",\"Transformer_THT/Transformer_Breve_TEZ-44x52\",\"Transformer_THT/Transformer_Breve_TEZ-47x57\",\"Transformer_THT/Transformer_CHK_EI30-2VA_1xSec\",\"Transformer_THT/Transformer_CHK_EI30-2VA_2xSec\",\"Transformer_THT/Transformer_CHK_EI30-2VA_Neutral\",\"Transformer_THT/Transformer_CHK_EI38-3VA_1xSec\",\"Transformer_THT/Transformer_CHK_EI38-3VA_2xSec\",\"Transformer_THT/Transformer_CHK_EI38-3VA_Neutral\",\"Transformer_THT/Transformer_CHK_EI42-5VA_1xSec\",\"Transformer_THT/Transformer_CHK_EI42-5VA_2xSec\",\"Transformer_THT/Transformer_CHK_EI42-5VA_Neutral\",\"Transformer_THT/Transformer_CHK_EI48-10VA_1xSec\",\"Transformer_THT/Transformer_CHK_EI48-10VA_2xSec\",\"Transformer_THT/Transformer_CHK_EI48-10VA_Neutral\",\"Transformer_THT/Transformer_CHK_EI48-8VA_1xSec\",\"Transformer_THT/Transformer_CHK_EI48-8VA_2xSec\",\"Transformer_THT/Transformer_CHK_EI48-8VA_Neutral\",\"Transformer_THT/Transformer_CHK_EI54-12VA_1xSec\",\"Transformer_THT/Transformer_CHK_EI54-12VA_2xSec\",\"Transformer_THT/Transformer_CHK_EI54-12VA_Neutral\",\"Transformer_THT/Transformer_CHK_EI54-16VA_1xSec\",\"Transformer_THT/Transformer_CHK_EI54-16VA_2xSec\",\"Transformer_THT/Transformer_CHK_EI54-16VA_Neutral\",\"Transformer_THT/Transformer_CHK_UI30-4VA_Flat\",\"Transformer_THT/Transformer_CHK_UI39-10VA_Flat\",\"Transformer_THT/Transformer_Coilcraft_Q4434-B_Rhombus-T1311\",\"Transformer_THT/Transformer_EPCOS_B66359A1013T_Horizontal\",\"Transformer_THT/Transformer_EPCOS_B66359J1014T_Vertical\",\"Transformer_THT/Transformer_Microphone_Lundahl_LL1538\",\"Transformer_THT/Transformer_Microphone_Lundahl_LL1587\",\"Transformer_THT/Transformer_Myrra_74040_Horizontal\",\"Transformer_THT/Transformer_Myrra_EF20_7408x\",\"Transformer_THT/Transformer_Myrra_EI30-5_44000_Horizontal\",\"Transformer_THT/Transformer_NF_ETAL_1-1_P1200\",\"Transformer_THT/Transformer_NF_ETAL_P1165\",\"Transformer_THT/Transformer_NF_ETAL_P3324\",\"Transformer_THT/Transformer_NF_ETAL_P3356\",\"Transformer_THT/Transformer_Toroid_Horizontal_D10.5mm_Amidon-T37\",\"Transformer_THT/Transformer_Toroid_Horizontal_D12.5mm_Amidon-T44\",\"Transformer_THT/Transformer_Toroid_Horizontal_D14.0mm_Amidon-T50\",\"Transformer_THT/Transformer_Toroid_Horizontal_D18.0mm\",\"Transformer_THT/Transformer_Toroid_Horizontal_D9.0mm_Amidon-T30\",\"Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D10.5mm_Amidon-T37\",\"Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D12.5mm_Amidon-T44\",\"Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D14.0mm_Amidon-T50\",\"Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D9.0mm_Amidon-T30\",\"Transformer_THT/Transformer_Triad_VPP16-310\",\"Transformer_THT/Transformer_Wuerth_750343373\",\"Transformer_THT/Transformer_Wuerth_760871131\",\"Transformer_THT/Transformer_Zeming_ZMCT103C\",\"Transformer_THT/Transformer_Zeming_ZMPT101K\",\"Transistor_Power/GaN_Systems_GaNPX-3_5x6.6mm_Drain2.93x0.6mm\",\"Transistor_Power/GaN_Systems_GaNPX-3_5x6.6mm_Drain3.76x0.6mm\",\"Transistor_Power/GaN_Systems_GaNPX-4_7x8.4mm\",\"Transistor_Power_Module/Infineon_AG-ECONO2\",\"Transistor_Power_Module/Infineon_AG-ECONO3\",\"Transistor_Power_Module/Infineon_AG-ECONO3B\",\"Transistor_Power_Module/Infineon_EasyPACK-1B\",\"Transistor_Power_Module/Infineon_EasyPACK-1B_PressFIT\",\"Transistor_Power_Module/Infineon_EasyPIM-1B\",\"Transistor_Power_Module/Infineon_EasyPIM-2B\",\"Transistor_Power_Module/Littelfuse_Package_H_XBN2MM\",\"Transistor_Power_Module/Littelfuse_Package_H_XN2MM\",\"Transistor_Power_Module/Littelfuse_Package_W_XBN2MM\",\"Transistor_Power_Module/Littelfuse_Package_W_XN2MM\",\"Transistor_Power_Module/ST_ACEPACK-2-CIB\",\"Transistor_Power_Module/ST_ACEPACK-2-CIB_PressFIT\",\"Transistor_Power_Module/ST_SDIP-25L\",\"Valve/Valve_ECC-83-1\",\"Valve/Valve_ECC-83-2\",\"Valve/Valve_EURO\",\"Valve/Valve_Glimm\",\"Valve/Valve_Mini_G\",\"Valve/Valve_Mini_P\",\"Valve/Valve_Mini_Pentode_Linear\",\"Valve/Valve_Noval_G\",\"Valve/Valve_Noval_P\",\"Valve/Valve_Octal\",\"Varistor/RV_Disc_D12mm_W3.9mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4.2mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4.3mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4.4mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4.5mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4.6mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4.7mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4.8mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W4mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W5.1mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W5.4mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W5.8mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W5mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W6.1mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W6.2mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W6.3mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W6.7mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W7.1mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W7.5mm_P7.5mm\",\"Varistor/RV_Disc_D12mm_W7.9mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W11mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W3.9mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.2mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.3mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.4mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.5mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.6mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.7mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.8mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4.9mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W4mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W5.2mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W5.4mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W5.9mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W5mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W6.1mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W6.3mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W6.4mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W6.8mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W7.2mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W7.5mm_P7.5mm\",\"Varistor/RV_Disc_D15.5mm_W8mm_P7.5mm\",\"Varistor/RV_Disc_D16.5mm_W6.7mm_P7.5mm\",\"Varistor/RV_Disc_D21.5mm_W11.4mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W4.3mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W4.4mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W4.5mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W4.6mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W4.7mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W4.8mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W4.9mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W5.1mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W5.3mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W5.4mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W5.6mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W5.8mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W5mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W6.1mm_P7.5mm\",\"Varistor/RV_Disc_D21.5mm_W6.3mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W6.5mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W6.7mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W6.8mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W7.1mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W7.5mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W7.9mm_P10mm\",\"Varistor/RV_Disc_D21.5mm_W8.4mm_P10mm\",\"Varistor/RV_Disc_D7mm_W3.4mm_P5mm\",\"Varistor/RV_Disc_D7mm_W3.5mm_P5mm\",\"Varistor/RV_Disc_D7mm_W3.6mm_P5mm\",\"Varistor/RV_Disc_D7mm_W3.7mm_P5mm\",\"Varistor/RV_Disc_D7mm_W3.8mm_P5mm\",\"Varistor/RV_Disc_D7mm_W3.9mm_P5mm\",\"Varistor/RV_Disc_D7mm_W4.2mm_P5mm\",\"Varistor/RV_Disc_D7mm_W4.3mm_P5mm\",\"Varistor/RV_Disc_D7mm_W4.5mm_P5mm\",\"Varistor/RV_Disc_D7mm_W4.8mm_P5mm\",\"Varistor/RV_Disc_D7mm_W4.9mm_P5mm\",\"Varistor/RV_Disc_D7mm_W4mm_P5mm\",\"Varistor/RV_Disc_D7mm_W5.1mm_P5mm\",\"Varistor/RV_Disc_D7mm_W5.4mm_P5mm\",\"Varistor/RV_Disc_D7mm_W5.5mm_P5mm\",\"Varistor/RV_Disc_D7mm_W5.7mm_P5mm\",\"Varistor/RV_Disc_D9mm_W3.3mm_P5mm\",\"Varistor/RV_Disc_D9mm_W3.4mm_P5mm\",\"Varistor/RV_Disc_D9mm_W3.5mm_P5mm\",\"Varistor/RV_Disc_D9mm_W3.6mm_P5mm\",\"Varistor/RV_Disc_D9mm_W3.7mm_P5mm\",\"Varistor/RV_Disc_D9mm_W3.8mm_P5mm\",\"Varistor/RV_Disc_D9mm_W3.9mm_P5mm\",\"Varistor/RV_Disc_D9mm_W4.1mm_P5mm\",\"Varistor/RV_Disc_D9mm_W4.2mm_P5mm\",\"Varistor/RV_Disc_D9mm_W4.4mm_P5mm\",\"Varistor/RV_Disc_D9mm_W4.5mm_P5mm\",\"Varistor/RV_Disc_D9mm_W4.8mm_P5mm\",\"Varistor/RV_Disc_D9mm_W4mm_P5mm\",\"Varistor/RV_Disc_D9mm_W5.2mm_P5mm\",\"Varistor/RV_Disc_D9mm_W5.4mm_P5mm\",\"Varistor/RV_Disc_D9mm_W5.5mm_P5mm\",\"Varistor/RV_Disc_D9mm_W5.7mm_P5mm\",\"Varistor/RV_Disc_D9mm_W6.1mm_P5mm\",\"Varistor/RV_Rect_V25S440P_L26.5mm_W8.2mm_P12.7mm\",\"Varistor/Varistor_Panasonic_VF\"];Object.fromEntries(Wvn.map(t=\u003e[t,`kicad:${t}`]));var MQ=Kn([\"vertical\",\"horizontal\",\"pos_top\",\"pos_bottom\",\"pos_left\",\"pos_right\",\"neg_top\",\"neg_bottom\",\"neg_left\",\"neg_right\"]).describe(\"horizontal means pins go 1-\u003e2 rightward and vertical means pins go 1-\u003e2 downward (generally, positive on top)\"),jvn=Pt({pins:dn(xo([_t(),Z()])),direction:xo([$e(\"top-to-bottom\"),$e(\"left-to-right\"),$e(\"bottom-to-top\"),$e(\"right-to-left\")])}),$vn=dn(xo([_t(),Z()])),toe=t=\u003exo([jvn,$vn]).transform(e=\u003eArray.isArray(e)?{pins:e,direction:t}:e),noe=Pt({leftSize:_t().optional().describe(\"@deprecated, use leftPinCount\"),topSize:_t().optional().describe(\"@deprecated, use topPinCount\"),rightSize:_t().optional().describe(\"@deprecated, use rightPinCount\"),bottomSize:_t().optional().describe(\"@deprecated, use bottomPinCount\"),leftPinCount:_t().optional(),rightPinCount:_t().optional(),topPinCount:_t().optional(),bottomPinCount:_t().optional(),leftSide:toe(\"top-to-bottom\").optional(),rightSide:toe(\"top-to-bottom\").optional(),topSide:toe(\"left-to-right\").optional(),bottomSide:toe(\"left-to-right\").optional()}),ooe=noe,QV=Qc(Pt({marginLeft:lt.optional(),marginRight:lt.optional(),marginTop:lt.optional(),marginBottom:lt.optional(),leftMargin:lt.optional(),rightMargin:lt.optional(),topMargin:lt.optional(),bottomMargin:lt.optional()})),zm=Z().regex(/^[A-Za-z0-9_]+$/),Xct=lt.or(Kn([\"xs\",\"sm\",\"default\",\"md\"])).describe(\"distance between pin1 and pin2 of the schematic symbol\"),qvn=Kn([\"input\",\"output\",\"bidirectional\",\"tri_state\",\"passive\",\"free\",\"unspecified\",\"power_in\",\"power_out\",\"open_collector\",\"open_emitter\",\"no_connect\"]),Xvn=Kn([\"line\",\"inverted\",\"clock\",\"inverted_clock\",\"input_low\",\"clock_low\",\"output_low\",\"falling_edge_clock\",\"nonlogic\"]),Zvn=Pt({electricalType:qvn.optional(),graphicStyle:Xvn.optional(),pinLength:Po.optional(),nameTextSize:Po.optional(),numberTextSize:Po.optional()}),ewn=P0(t=\u003etypeof t==\"function\"),H9=Kn([\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"]),vV=Pt({edit_event_id:Z(),in_progress:je().optional(),created_at:_t()}),twn=vV.extend({pcb_edit_event_type:$e(\"edit_component_location\").describe(\"deprecated\"),edit_event_type:$e(\"edit_pcb_component_location\"),pcb_component_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})}),nwn=vV.extend({pcb_edit_event_type:$e(\"edit_trace_hint\").describe(\"deprecated\"),edit_event_type:$e(\"edit_pcb_trace_hint\").optional(),pcb_port_id:Z(),pcb_trace_hint_id:Z().optional(),route:dn(Pt({x:_t(),y:_t(),via:je().optional()}))}),own=vV.extend({edit_event_type:$e(\"edit_schematic_component_location\"),schematic_component_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})});vV.extend({edit_event_type:$e(\"edit_pcb_group_location\"),pcb_group_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})}),vV.extend({edit_event_type:$e(\"edit_schematic_group_location\"),schematic_group_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})}),xo([twn,nwn,own]);var iwn=Pt({selector:Z(),relative_to:Z().optional().default(\"group_center\").describe(\"Can be a selector or 'group_center'\"),center:ki}),rwn=Pt({pcb_port_selector:Z(),offsets:dn(N9)}),swn=Pt({selector:Z(),relative_to:Z().optional().default(\"group_center\").describe(\"Can be a selector or 'group_center'\"),center:ki}),awn=Pt({pcb_placements:dn(iwn).optional(),manual_trace_hints:dn(rwn).optional(),schematic_placements:dn(swn).optional()}),cD=Z().or(dn(Z()).readonly()).or(dn(Z())),G3=t=\u003eQc(Kn(t),cD),wV=Pt({layoutMode:Kn([\"grid\",\"flex\",\"match-adapt\",\"relative\",\"none\"]).optional(),position:Kn([\"absolute\",\"relative\"]).optional(),grid:je().optional(),gridCols:_t().or(Z()).optional(),gridRows:_t().or(Z()).optional(),gridTemplateRows:Z().optional(),gridTemplateColumns:Z().optional(),gridTemplate:Z().optional(),gridGap:_t().or(Z()).optional(),gridRowGap:_t().or(Z()).optional(),gridColumnGap:_t().or(Z()).optional(),flex:je().or(Z()).optional(),flexDirection:Kn([\"row\",\"column\"]).optional(),alignItems:Kn([\"start\",\"center\",\"end\",\"stretch\"]).optional(),justifyContent:Kn([\"start\",\"center\",\"end\",\"stretch\",\"space-between\",\"space-around\",\"space-evenly\"]).optional(),flexRow:je().optional(),flexColumn:je().optional(),gap:_t().or(Z()).optional(),pack:je().optional().describe(\"Pack the contents of this group using a packing strategy\"),packOrderStrategy:Kn([\"largest_to_smallest\",\"first_to_last\",\"highest_to_lowest_pin_count\"]).optional(),packPlacementStrategy:Kn([\"shortest_connection_along_outline\"]).optional(),padding:ce.optional(),paddingLeft:ce.optional(),paddingRight:ce.optional(),paddingTop:ce.optional(),paddingBottom:ce.optional(),paddingX:ce.optional(),paddingY:ce.optional(),width:ce.optional(),height:ce.optional(),matchAdapt:je().optional(),matchAdaptTemplate:rd().optional()}),Zct=Pt({strokeWidth:ce.optional(),dashed:je().optional(),solid:je().optional()}),Awn=P0(t=\u003etypeof t==\"string\"),elt=Pt({minTraceWidth:ce.optional(),minViaHoleEdgeToViaHoleEdgeClearance:ce.optional(),minViaEdgeToPadEdgeClearance:ce.optional(),minPlatedHoleDrillEdgeToDrillEdgeClearance:ce.optional(),minTraceToPadEdgeClearance:ce.optional(),minPadEdgeToPadEdgeClearance:ce.optional(),minBoardEdgeClearance:ce.optional(),minViaHoleDiameter:ce.optional(),minViaPadDiameter:ce.optional()}),cwn=Pt({serverUrl:G_.optional(),inputFormat:Kn([\"simplified\",\"circuit-json\"]).optional(),serverMode:Kn([\"job\",\"solve-endpoint\"]).optional(),serverCacheEnabled:je().optional(),cache:P0(t=\u003e!0).optional(),traceClearance:ce.optional(),availableJumperTypes:dn(Kn([\"1206x4\",\"0603\"])).optional(),allowViaInPad:je().optional().describe(\"Allows the autorouter to place vias inside connected pads. Omitted or false keeps via-in-pad routing disabled.\"),groupMode:Kn([\"sequential_trace\",\"subcircuit\",\"sequential-trace\"]).optional(),algorithmFn:P0(t=\u003etypeof t==\"function\"||t===void 0).optional(),implicitBreakoutPointSolverFn:P0(t=\u003etypeof t==\"function\"||t===void 0).optional(),preset:Kn([\"sequential_trace\",\"subcircuit\",\"default\",\"auto\",\"auto_local\",\"auto_cloud\",\"auto_jumper\",\"tscircuit_beta\",\"krt\",\"freerouting\",\"simplify\",\"laser_prefab\",\"single_layer_fanout\",\"fanout\",\"auto-jumper\",\"sequential-trace\",\"auto-local\",\"auto-cloud\"]).optional(),local:je().optional()}),lwn=xo([$e(\"sequential_trace\"),$e(\"subcircuit\"),$e(\"default\"),$e(\"auto\"),$e(\"auto_local\"),$e(\"auto_cloud\"),$e(\"auto_jumper\"),$e(\"tscircuit_beta\"),$e(\"krt\"),$e(\"freerouting\"),$e(\"simplify\"),$e(\"laser_prefab\"),$e(\"single_layer_fanout\"),$e(\"fanout\"),$e(\"auto-jumper\"),$e(\"sequential-trace\"),$e(\"auto-local\"),$e(\"auto-cloud\")]),uwn=Z(),ioe=xo([cwn,lwn,uwn]),gwn=Kn([\"1x\",\"2x\",\"5x\",\"10x\",\"100x\"]),dwn=Kn([\"beta_pipeline1\",\"beta_pipeline3\",\"beta_pipeline4\",\"beta_pipeline5\",\"beta_pipeline7\",\"beta_pipeline9\",\"latest\"]),hwn=P0(t=\u003etypeof t==\"string\").transform(t=\u003e{const e=dwn.safeParse(t);return e.success?e.data:(console.warn(`Unknown autorouterVersion \"${t}\", falling back to \"latest\".`),\"latest\")}),Kxe=eoe.extend({name:Z().optional(),children:rd().optional(),schTitle:Z().optional(),schSheetName:Z().optional().describe('This group will be drawn as part of this sheet e.g. \"Main\"'),key:rd().optional(),showAsSchematicBox:je().optional(),connections:Qc(Z(),cD.optional()).optional(),schPinArrangement:ooe.optional(),schPinSpacing:ce.optional(),schPinStyle:QV.optional(),...wV.shape,grid:wV.shape.grid.describe(\"@deprecated use pcbGrid\"),flex:wV.shape.flex.describe(\"@deprecated use pcbFlex\"),pcbGrid:je().optional(),pcbGridCols:_t().or(Z()).optional(),pcbGridRows:_t().or(Z()).optional(),pcbGridTemplateRows:Z().optional(),pcbGridTemplateColumns:Z().optional(),pcbGridTemplate:Z().optional(),pcbGridGap:_t().or(Z()).optional(),pcbGridRowGap:_t().or(Z()).optional(),pcbGridColumnGap:_t().or(Z()).optional(),pcbFlex:je().or(Z()).optional(),pcbFlexGap:_t().or(Z()).optional(),pcbFlexDirection:Kn([\"row\",\"column\"]).optional(),pcbAlignItems:Kn([\"start\",\"center\",\"end\",\"stretch\"]).optional(),pcbJustifyContent:Kn([\"start\",\"center\",\"end\",\"stretch\",\"space-between\",\"space-around\",\"space-evenly\"]).optional(),pcbFlexRow:je().optional(),pcbFlexColumn:je().optional(),pcbGap:_t().or(Z()).optional(),pcbPack:je().optional(),pcbPackGap:_t().or(Z()).optional(),schGrid:je().optional(),schGridCols:_t().or(Z()).optional(),schGridRows:_t().or(Z()).optional(),schGridTemplateRows:Z().optional(),schGridTemplateColumns:Z().optional(),schGridTemplate:Z().optional(),schGridGap:_t().or(Z()).optional(),schGridRowGap:_t().or(Z()).optional(),schGridColumnGap:_t().or(Z()).optional(),schFlex:je().or(Z()).optional(),schFlexGap:_t().or(Z()).optional(),schFlexDirection:Kn([\"row\",\"column\"]).optional(),schAlignItems:Kn([\"start\",\"center\",\"end\",\"stretch\"]).optional(),schJustifyContent:Kn([\"start\",\"center\",\"end\",\"stretch\",\"space-between\",\"space-around\",\"space-evenly\"]).optional(),schFlexRow:je().optional(),schFlexColumn:je().optional(),schGap:_t().or(Z()).optional(),schPack:je().optional(),schMatchAdapt:je().optional(),pcbWidth:ce.optional(),pcbHeight:ce.optional(),minTraceWidth:ce.optional(),nominalTraceWidth:ce.optional(),schWidth:ce.optional(),schHeight:ce.optional(),pcbLayout:wV.optional(),schLayout:wV.optional(),cellBorder:Zct.nullable().optional(),border:Zct.nullable().optional(),schPadding:ce.optional(),schPaddingLeft:ce.optional(),schPaddingRight:ce.optional(),schPaddingTop:ce.optional(),schPaddingBottom:ce.optional(),pcbPadding:ce.optional(),pcbPaddingLeft:ce.optional(),pcbPaddingRight:ce.optional(),pcbPaddingTop:ce.optional(),pcbPaddingBottom:ce.optional(),pcbAnchorAlignment:Awn.optional()}),tlt=P0(t=\u003e\"findPart\"in t),roe=Kxe.extend({manualEdits:awn.optional(),schAutoLayoutEnabled:je().optional(),schTraceAutoLabelEnabled:je().optional(),schMaxTraceDistance:lt.optional(),routingDisabled:je().optional(),placementDrcChecksDisabled:je().optional(),bomDisabled:je().optional(),defaultTraceWidth:ce.optional(),...elt.shape,nominalTraceWidth:ce.optional(),partsEngine:tlt.optional(),_subcircuitCachingEnabled:je().optional(),pcbRouteCache:P0(t=\u003e!0).optional(),autorouter:ioe.optional(),autorouterEffortLevel:gwn.optional(),autorouterVersion:hwn.optional(),square:je().optional(),emptyArea:Z().optional(),filledArea:Z().optional(),width:lt.optional(),height:lt.optional(),outline:dn(By).optional(),outlineOffsetX:lt.optional(),outlineOffsetY:lt.optional(),circuitJson:dn(rd()).optional(),exposedNets:dn(Z()).optional(),exposeNets:je().optional()}),pwn=roe.extend({subcircuit:$e(!0)}),mwn=Iy(\"subcircuit\",[Kxe.extend({subcircuit:$e(!1).optional()}),pwn]),qk=P0(t=\u003etypeof t==\"string\"),_wn=Pt({...By.shape,isCastellatedHole:je().optional(),holeDiameter:Po.optional(),padDiameter:Po.optional(),connectsTo:Z().or(dn(Z())).optional()}).superRefine((t,e)=\u003e{if(t.isCastellatedHole){t.holeDiameter===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"holeDiameter\"],message:\"holeDiameter is required for a castellated hole\"}),t.padDiameter===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"padDiameter\"],message:\"padDiameter is required for a castellated hole\"});return}(t.holeDiameter!==void 0||t.padDiameter!==void 0||t.connectsTo!==void 0)\u0026\u0026e.addIssue({code:lo.custom,path:[\"isCastellatedHole\"],message:\"isCastellatedHole must be true when castellated hole props are provided\"})}),nlt=roe.omit({connections:!0}).extend({fabricatorPreset:Kn([\"jlcpcb_economy\",\"jlcpcb_standard\",\"jlcpcb_economy_20260912\",\"jlcpcb_standard_20260912\"]).optional().describe(\"Fabricator preset, preserved as supplied. Omitted leaves the preset unset.\"),material:Kn([\"fr4\",\"fr1\",\"flex\"]).default(\"fr4\"),layers:xo([$e(1),$e(2),$e(4),$e(6),$e(8),$e(10)]).default(2),allowBlindAndBuriedVias:je().default(!1).describe(\"Whether the autorouter may generate blind and buried vias. Defaults to false, which restricts newly generated vias to the full board stack.\"),defaultViaTenting:xo([je(),Kn([\"both_sides\",\"top_and_bottom_tented\",\"top_tented\",\"bottom_tented\",\"exposed\"])]).transform(t=\u003et===!0||t===\"both_sides\"?\"top_and_bottom_tented\":t===!1?\"exposed\":t).optional(),borderRadius:Po.optional(),thickness:Po.optional(),boardAnchorPosition:By.optional(),anchorAlignment:H9.optional(),boardAnchorAlignment:H9.optional().describe(\"Prefer using anchorAlignment when possible\"),outline:dn(_wn).optional(),title:Z().optional(),solderMaskColor:qk.optional(),topSolderMaskColor:qk.optional(),bottomSolderMaskColor:qk.optional(),silkscreenColor:qk.optional(),topSilkscreenColor:qk.optional(),bottomSilkscreenColor:qk.optional(),doubleSidedAssembly:je().optional().default(!1),isViaInPadAllowed:je().optional().describe(\"Allows intentional via-in-pad designs to pass DRC. Omitted or false keeps via-in-pad disallowed.\"),automaticPoursEnabled:je().default(!1).describe(\"Whether implicit copper pours should be generated automatically. Defaults to false.\"),enableViaStitching:je().default(!1).describe(\"Whether to stitch copper pours on the same net across layers with vias. Defaults to false.\"),viaStitchPitch:Po.pipe(_t().positive().finite()).optional().describe(\"Positive center-to-center stitching via spacing in millimeters or a unit string, parsed to millimeters. Omitted uses the solver default. Does not enable stitching by itself.\"),schematicDisabled:je().optional()}),olt=Kxe.omit({width:!0,height:!0,layoutMode:!0,children:!0}).extend({width:Po.optional(),height:Po.optional(),children:rd().optional(),anchorAlignment:H9.optional(),noSolderMask:je().optional(),panelizationMethod:Kn([\"tab-routing\",\"outline_routing\",\"none\"]).optional(),boardGap:Po.optional(),layoutMode:Kn([\"grid\",\"pack\",\"none\"]).optional(),row:_t().optional(),col:_t().optional(),cellWidth:Po.optional(),cellHeight:Po.optional(),tabWidth:Po.optional(),tabLength:Po.optional(),mouseBites:je().optional(),edgePadding:Po.optional(),edgePaddingLeft:Po.optional(),edgePaddingRight:Po.optional(),edgePaddingTop:Po.optional(),edgePaddingBottom:Po.optional(),_subcircuitCachingEnabled:je().optional()}),fwn=olt,soe=Po.refine(Number.isFinite,\"Coordinate must be finite\"),Vxe=Po.refine(t=\u003eNumber.isFinite(t)\u0026\u0026t\u003e0,\"Distance must be positive and finite\"),Iwn=Iy(\"route_type\",[Pt({route_type:$e(\"wire\"),x:soe,y:soe,width:Vxe,layer:Pr}),Pt({route_type:$e(\"via\"),x:soe,y:soe,from_layer:Pr,to_layer:Pr,via_diameter:Vxe.optional(),via_hole_diameter:Vxe.optional()})]),ilt=Pt({connection:Z().min(1),route:dn(Iwn).min(2).superRefine((t,e)=\u003e{const n=t[0];let o=n?.route_type===\"via\"?n.from_layer:n?.layer;for(const i of t)(i.route_type===\"wire\"?i.layer:i.from_layer)!==o\u0026\u0026e.addIssue({code:\"custom\",message:\"A fanout trace path must use vias for layer changes\"}),i.route_type===\"via\"\u0026\u0026(o=i.to_layer)})}),PV=Po.refine(t=\u003et\u003e=0,{message:\"Fanout boundary padding cannot be negative\"}),Cwn=xo([PV,Pt({top:PV.optional(),right:PV.optional(),bottom:PV.optional(),left:PV.optional()})]),rlt=[\"topside_left\",\"topside_center\",\"topside_right\",\"rightside_top\",\"rightside_center\",\"rightside_bottom\",\"bottomside_right\",\"bottomside_center\",\"bottomside_left\",\"leftside_bottom\",\"leftside_center\",\"leftside_top\",\"center\"],slt=Kn(rlt),ywn=xo([H9,slt,Pt({direction:xo([H9,slt])})]),alt=Pt({busFanoutDirections:Qc(ywn).optional(),fanoutBoundaryPadding:Cwn.optional(),fanoutRoutingLayers:dn(Pr).min(1).optional(),fanoutPourNetMap:Qc(Pr,xo([Z(),dn(Z()).min(1)])).optional()}),xwn=Po.refine(t=\u003et\u003e=0,{message:\"Fanout margin cannot be negative\"}),Ewn=roe.extend({autorouter:ioe.default(\"fanout\"),pcbTracePaths:dn(ilt).optional(),padding:Po.optional(),paddingLeft:Po.optional(),paddingRight:Po.optional(),paddingTop:Po.optional(),paddingBottom:Po.optional(),fanoutMargin:xwn.optional(),...alt.shape}),Bwn=Z().or(dn(Z()).readonly()).or(dn(Z())),Alt=dn(zm).readonly().or(dn(zm)),bwn=P0().pipe(Qc(Z(),Bwn)),Swn=P0(t=\u003e!!t\u0026\u0026typeof t==\"object\"\u0026\u0026\"type\"in t\u0026\u0026\"props\"in t),Qwn=P0(t=\u003eee.isValidElement(t)\u0026\u0026t.type===\"internalcircuit\"),zxe=Qc(zm,zm.or(dn(zm).readonly()).or(dn(zm))),vwn=Pt({manufacturerPartNumber:Z().optional(),supplierPartNumber:Qc(qM,dn(Z())).optional()}),Y3=vg.extend({manufacturerPartNumber:Z().optional(),pinLabels:zxe.optional(),showPinAliases:je().optional(),pcbPinLabels:Qc(Z(),Z()).optional(),internallyConnectedPins:dn(dn(xo([Z(),_t()]))).optional(),externallyConnectedPins:dn(dn(Z())).optional(),schPinArrangement:noe.optional(),schPortArrangement:noe.optional(),pinCompatibleVariants:dn(vwn).optional(),schPinStyle:QV.optional(),schPinSpacing:lt.optional(),schWidth:lt.optional(),schHeight:lt.optional(),noSchematicRepresentation:je().optional(),schShowInternalCircuit:je().optional().default(!1),noConnect:Alt.optional(),connections:bwn.optional(),spiceModel:Swn.optional(),internalCircuit:Qwn.optional()}),wwn=Y3,clt=vg.extend({manufacturerPartNumber:Z().optional(),pinLabels:Qc(_t().or(zm),zm.or(dn(zm))).optional(),schPinStyle:QV.optional(),schPinSpacing:lt.optional(),schWidth:lt.optional(),schHeight:lt.optional(),schDirection:Kn([\"left\",\"right\"]).optional(),schPinArrangement:ooe.optional(),schPortArrangement:noe.optional(),pcbPinLabels:Qc(Z(),Z()).optional(),pinCount:xo([$e(2),$e(3)]).optional(),internallyConnectedPins:dn(dn(xo([Z(),_t()]))).optional(),connections:P0().pipe(Qc(Z(),cD)).optional()}),Pwn=clt.extend({bridgedPins:dn(dn(Z())).optional(),bridged:je().optional()}),Mwn=Kn([\"usb_c\",\"m2\",\"jst_sh\",\"jst_gh\",\"jst_zh\",\"jst_ph\",\"jst_xh\",\"jst_vh\"]),Dwn=Y3.extend({standard:Mwn.optional(),pinCount:_t().int().positive().optional()}),Nwn=vg.extend({standard:Kn([\"TSC0001_36P_XALT_2025_11\",\"0805\",\"0603\",\"1206\"]).optional(),pinLabels:Qc(_t().or(zm),zm.or(dn(zm))).optional(),internallyConnectedPins:dn(dn(xo([Z(),_t()]))).optional()}),Rwn=vg.extend({currentRating:xo([_t(),Z()]),voltageRating:xo([_t(),Z()]).optional(),schShowRatings:je().optional(),schOrientation:MQ.optional(),connections:Qc(Z(),xo([Z(),dn(Z()).readonly(),dn(Z())])).optional()}),Twn=\"0.04in\",kwn=\"0.1in\",Fwn=t=\u003e{if(!t||typeof t!=\"object\")return t;const e={...t};return e.shape!==void 0?e:e.padOutline!==void 0?(e.shape=\"hole_with_polygon_pad\",e):e.rectPadWidth!==void 0||e.rectPadHeight!==void 0?e.holeDiameter!==void 0?(e.shape=\"circular_hole_with_rect_pad\",e):(e.shape=\"pill_hole_with_rect_pad\",e):e.outerDiameter!==void 0||e.holeDiameter!==void 0||e.padDiameter!==void 0?(e.shape=\"circle\",e):e.outerWidth!==void 0||e.outerHeight!==void 0?(e.shape=e.rectPad===!0?\"pill\":\"oval\",e):(e.shape=\"circle\",e.holeDiameter=Twn,e.outerDiameter=kwn,e)},aoe=P0().transform(t=\u003e{if(t!==void 0)return lt.parse(t)}),Lwn=Iy(\"shape\",[qa.omit({pcbRotation:!0,layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e(\"circle\"),holeDiameter:lt,outerDiameter:lt,padDiameter:lt.optional().describe(\"Diameter of the copper pad\"),portHints:v5.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e(\"oval\"),outerWidth:lt,outerHeight:lt,holeWidth:aoe,holeHeight:aoe,innerWidth:lt.optional().describe(\"DEPRECATED use holeWidth\"),innerHeight:lt.optional().describe(\"DEPRECATED use holeHeight\"),portHints:v5.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e(\"pill\"),rectPad:je().optional(),outerWidth:lt,outerHeight:lt,holeWidth:aoe,holeHeight:aoe,innerWidth:lt.optional().describe(\"DEPRECATED use holeWidth\"),innerHeight:lt.optional().describe(\"DEPRECATED use holeHeight\"),portHints:v5.optional(),holeOffsetX:lt.optional(),holeOffsetY:lt.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e(\"circular_hole_with_rect_pad\"),holeDiameter:lt,rectPadWidth:lt,rectPadHeight:lt,rectBorderRadius:lt.optional(),holeShape:$e(\"circle\").optional(),padShape:$e(\"rect\").optional(),portHints:v5.optional(),holeOffsetX:lt.optional(),holeOffsetY:lt.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e(\"pill_hole_with_rect_pad\"),holeShape:$e(\"pill\").optional(),padShape:$e(\"rect\").optional(),holeWidth:lt,holeHeight:lt,rectPadWidth:lt,rectPadHeight:lt,rectBorderRadius:lt.optional(),portHints:v5.optional(),holeOffsetX:lt.optional(),holeOffsetY:lt.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({pcbRotation:!0,layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e(\"hole_with_polygon_pad\"),holeShape:Kn([\"circle\",\"oval\",\"pill\",\"rotated_pill\"]),holeDiameter:lt.optional(),holeWidth:lt.optional(),holeHeight:lt.optional(),padOutline:dn(By),holeOffsetX:lt,holeOffsetY:lt,portHints:v5.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()})]).transform(t=\u003e(\"innerWidth\"in t\u0026\u0026t.innerWidth!==void 0\u0026\u0026(t.holeWidth??=t.innerWidth),\"innerHeight\"in t\u0026\u0026t.innerHeight!==void 0\u0026\u0026(t.holeHeight??=t.innerHeight),t)),Hwn=crt(Fwn,Lwn),Own=[\"pin1\",\"pin2\",\"pos\",\"neg\"],Gwn=new Set([\"01005\",\"0201\",\"0402\",\"0504\",\"0603\",\"0805\",\"1206\",\"1210\",\"1812\",\"2010\",\"2512\"]),Ywn=t=\u003etypeof t!=\"string\"||!Gwn.has(t)?t:`res${t}`,Uwn=Fxe.optional().transform(Ywn),Kwn=vg.extend({footprint:Uwn,resistance:S8,tolerance:xo([Z(),_t()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,\"Tolerance must be non-negative\").max(1,\"Tolerance cannot be greater than 100%\")).optional(),pullupFor:Z().optional(),pullupTo:Z().optional(),pulldownFor:Z().optional(),pulldownTo:Z().optional(),schOrientation:MQ.optional(),schSize:Xct.optional(),connections:G3(Own).optional()}),Vwn=[\"pin1\",\"pin2\",\"pin3\"],zwn=vg.extend({maxResistance:S8,pinVariant:Kn([\"two_pin\",\"three_pin\"]).optional(),connections:G3(Vwn).optional()}),Jwn=[\"pin1\",\"left\",\"pin2\",\"right\",\"pin3\",\"pin4\"],Wwn=vg.extend({frequency:Cy,loadCapacitance:$M,maxTraceLength:lt.optional(),manufacturerPartNumber:Z().optional(),mpn:Z().optional(),pinVariant:Kn([\"two_pin\",\"four_pin\"]).optional(),schOrientation:MQ.optional(),connections:G3(Jwn).optional()}),jwn=vg.extend({frequency:Cy,loadCapacitance:$M,pinVariant:Kn([\"no_ground\",\"ground_pin\",\"two_ground_pins\"]).optional()});nlt.extend({leftPinCount:_t().optional(),rightPinCount:_t().optional(),topPinCount:_t().optional(),bottomPinCount:_t().optional(),leftPins:dn(Z()).optional(),rightPins:dn(Z()).optional(),topPins:dn(Z()).optional(),bottomPins:dn(Z()).optional(),pinPitch:lt.optional(),innerHoles:je().optional()});var $wn=[\"pin1\",\"pin2\",\"pos\",\"neg\",\"anode\",\"cathode\"],qwn=vg.extend({capacitance:$M,maxVoltageRating:O_.optional(),schShowRatings:je().optional().default(!1),polarized:je().optional().default(!1),decouplingFor:Z().optional(),decouplingTo:Z().optional(),bypassFor:Z().optional(),bypassTo:Z().optional(),maxDecouplingTraceLength:lt.optional(),schOrientation:MQ.optional(),schSize:Xct.optional(),connections:G3($wn).optional()}),Xwn=Pt({name:Z(),connectsTo:Z().or(dn(Z())).optional(),routingPhaseIndex:_t().nullable().optional(),highlightColor:Z().optional(),isPowerNet:je().optional(),isGroundNet:je().optional(),nominalTraceWidth:lt.optional()}),llt=vg.extend({soldermaskPullback:Po.optional(),padDiameter:Po});Pt({name:Z().optional(),pcbOnly:je().optional(),schOnly:je().optional()});var Zwn=Pt({pcb:$e(!0).optional(),xDist:Po,left:Z(),right:Z(),edgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional()}),ePn=Pt({pcb:$e(!0).optional(),yDist:Po,top:Z(),bottom:Z(),edgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional()}),tPn=Pt({pcb:$e(!0).optional(),sameY:$e(!0).optional(),for:dn(Z())}),nPn=Pt({pcb:$e(!0).optional(),sameX:$e(!0).optional(),for:dn(Z())}),oPn=xo([Zwn,ePn,tPn,nPn]),iPn=qa.omit({layer:!0,pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"rect\"),width:Po,height:Po}),rPn=qa.omit({layer:!0,pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"circle\"),radius:Po}),sPn=qa.omit({layer:!0,pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"polygon\"),points:dn(By)}),aPn=Iy(\"shape\",[iPn,rPn,sPn]),APn=Pt({name:Z().optional(),checkFn:ewn}),cPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"rect\"),width:Po,height:Po,rectBorderRadius:Po.optional(),cornerRadius:Po.optional(),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderMaskMarginLeft:Po.optional(),solderMaskMarginRight:Po.optional(),solderMaskMarginTop:Po.optional(),solderMaskMarginBottom:Po.optional(),solderPasteMargin:Po.optional()}),lPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"rotated_rect\"),width:Po,height:Po,ccwRotation:_t(),cornerRadius:Po.optional(),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderMaskMarginLeft:Po.optional(),solderMaskMarginRight:Po.optional(),solderMaskMarginTop:Po.optional(),solderMaskMarginBottom:Po.optional(),solderPasteMargin:Po.optional()}),uPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"circle\"),radius:Po,portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),gPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"pill\"),width:Po,height:Po,radius:Po,portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),dPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"rotated_pill\"),width:Po,height:Po,radius:Po,ccwRotation:_t(),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),hPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e(\"polygon\"),points:dn(By),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),pPn=Iy(\"shape\",[uPn,cPn,lPn,gPn,dPn,hPn]),mPn=qa.omit({pcbRotation:!0}).extend({shape:$e(\"rect\"),width:Po,height:Po}),_Pn=qa.omit({pcbRotation:!0}).extend({shape:$e(\"circle\"),radius:Po});xo([_Pn,mPn]);var fPn=qa.extend({name:Z().optional(),shape:$e(\"circle\").optional(),diameter:Po.optional(),radius:Po.optional(),solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}).transform(t=\u003e({...t,diameter:t.diameter??2*t.radius,radius:t.radius??t.diameter/2})),IPn=qa.extend({name:Z().optional(),shape:$e(\"pill\"),width:Po,height:Po,solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}),CPn=qa.extend({name:Z().optional(),shape:$e(\"oval\"),width:Po,height:Po,solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}),yPn=qa.extend({name:Z().optional(),shape:$e(\"rect\"),width:Po,height:Po,solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}),xPn=xo([fPn,IPn,CPn,yPn]),EPn=[\"2.4ghz_quarter_wave_monopole\",\"2.4ghz_meandered_monopole\",\"2.4ghz_inverted_f\",\"2.4ghz_meandered_inverted_f\",\"2.4ghz_folded_dipole\"],BPn=Kn(EPn),bPn=[\"2.4ghz\",\"5ghz\",\"6ghz\",\"dual_band_2.4ghz_5ghz\",\"tri_band_2.4ghz_5ghz_6ghz\"],SPn=Kn(bPn),QPn=vg.extend({antennaShape:BPn.optional(),frequencyBand:SPn.optional(),pcbPath:Uxe.optional()}),MV=xo([Z(),P0(t=\u003etypeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"getPortSelector\"in t\u0026\u0026typeof t.getPortSelector==\"function\")]),Jxe=Pt({key:Z().optional(),name:Z().optional(),displayName:Z().optional(),thickness:lt.optional(),width:lt.optional().describe(\"Alias for trace thickness\"),schematicRouteHints:dn(By).optional(),pcbRouteHints:dn(N9).optional(),pcbPathRelativeTo:Z().optional(),pcbPath:Uxe.optional(),pcbPaths:dn(Uxe).optional(),routingPhaseIndex:_t().nullable().optional(),pcbStraightLine:je().optional().describe(\"Draw a straight pcb trace between the connected points\"),schDisplayLabel:Z().optional(),schStroke:Z().optional(),highlightColor:Z().optional(),maxLength:lt.optional(),maxViaCount:_t().int().nonnegative().optional().describe(\"Maximum number of vias allowed in the PCB trace route\"),connectsTo:Z().or(dn(Z())).optional()}),vPn=xo([Jxe.extend({path:dn(MV)}),Jxe.extend({from:MV,to:MV}),Jxe.extend({start:MV,end:MV})]),wPn=Pt({name:Z().optional(),connections:dn(Z()).min(1),routingPhaseIndex:_t().nullable().optional(),maxLengthSkew:lt.pipe(_t().min(0).finite()).optional(),targetImpedance:S8.pipe(_t().positive().finite()).optional(),pcbTraceWidth:lt.pipe(_t().positive().finite()).optional(),pcbAllowedLayers:dn(Pr).min(1).optional(),preferredLayer:Pr.optional(),preferredLayers:dn(Pr).min(1).optional()}),PPn=Pt({name:Z().optional(),positiveConnection:Z(),negativeConnection:Z(),maxLengthSkew:lt.pipe(_t().min(0).finite()).optional(),targetDifferentialImpedance:S8.pipe(_t().positive().finite()).optional(),pcbTraceGap:lt.pipe(_t().positive().finite()).optional(),maxUncoupledLength:lt.pipe(_t().min(0).finite()).optional()}),ult=Kn([\"from_left\",\"from_right\",\"from_top\",\"from_bottom\",\"from_above\",\"from_below\",\"from_x_neg\",\"from_x_pos\",\"from_y_pos\",\"from_y_neg\",\"from_z_pos\",\"from_z_neg\",\"from_front\",\"from_back\"]),MPn=Pt({children:rd().optional(),name:Z().optional(),originalLayer:Pr.default(\"top\").optional(),circuitJson:dn(rd()).optional(),src:Fxe.describe(\"Can be a footprint or kicad string\").optional(),insertionDirection:ult.optional().describe(\"Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation.\"),cutoutApertureDirection:ult.optional().describe(\"Direction the part's enclosure opening faces, in its unrotated orientation. Distinct from insertionDirection: a side-actuated switch is installed from above and actuated from the side. Falls back to insertionDirection when absent.\")}),DPn=Pt({originalFacingDirection:Kn([\"up\",\"down\",\"left\",\"right\"]).default(\"right\").optional(),width:Po.optional(),height:Po.optional(),name:Z().optional()}),NPn=_t().or(Z().endsWith(\"mAh\")).transform(t=\u003e{if(typeof t==\"string\"){const e=t.replace(\"mAh\",\"\"),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error(\"Invalid capacity\");return n}return t}).describe(\"Battery capacity in mAh\"),RPn=Yxe,TPn=vg.extend({capacity:NPn.optional(),voltage:O_.optional(),standard:Kn([\"AA\",\"AAA\",\"9V\",\"CR2032\",\"18650\",\"C\"]).optional(),schOrientation:MQ.optional(),connections:G3(RPn).optional()}),kPn=roe.extend({manufacturerPartNumber:Y3.shape.manufacturerPartNumber,pinLabels:Y3.shape.pinLabels,showPinAliases:Y3.shape.showPinAliases,pcbPinLabels:Y3.shape.pcbPinLabels,schPortArrangement:Y3.shape.schPortArrangement,pinCompatibleVariants:Y3.shape.pinCompatibleVariants,noSchematicRepresentation:Y3.shape.noSchematicRepresentation,internallyConnectedPins:Y3.shape.internallyConnectedPins,externallyConnectedPins:Y3.shape.externallyConnectedPins,boardToBoardDistance:Po.optional(),mountOrientation:Kn([\"faceDown\",\"faceUp\"]).optional()}),FPn=Kn([\"vertical\",\"horizontal\"]).describe(\"vertical means pins go 1-\u003e2 downward and horizontal means pins go 1-\u003e2 rightward\"),LPn=vg.extend({pinCount:_t(),pitch:lt.optional(),schFacingDirection:Kn([\"up\",\"down\",\"left\",\"right\"]).optional(),gender:Kn([\"male\",\"female\",\"unpopulated\"]).optional().default(\"male\"),showSilkscreenPinLabels:je().optional(),pcbPinLabels:Qc(Z(),Z()).optional(),doubleRow:je().optional(),rightAngle:je().optional(),pcbOrientation:FPn.optional(),holeDiameter:lt.optional(),platedDiameter:lt.optional(),pinLabels:Qc(Z(),zm).or(dn(zm)).optional(),connections:P0().pipe(Qc(Z(),cD)).optional(),facingDirection:Kn([\"left\",\"right\"]).optional(),schPinArrangement:ooe.optional(),schPinStyle:QV.optional(),schPinSpacing:lt.optional(),schWidth:lt.optional(),schHeight:lt.optional(),connectsFromAbove:je().optional(),connectsFromBelow:je().optional()}).superRefine((t,e)=\u003e{t.connectsFromAbove\u0026\u0026t.connectsFromBelow\u0026\u0026e.addIssue({code:lo.custom,message:\"connectsFromAbove and connectsFromBelow are opposites; set at most one\"})}).transform(t=\u003e{const e=t.layer??(t.connectsFromBelow?\"bottom\":t.connectsFromAbove?\"top\":void 0);return e===void 0?t:{...t,layer:e}});Pt({net:Z().optional(),connection:Z().optional(),schX:Po.optional(),schY:Po.optional(),schRotation:oA.optional(),anchorSide:Kn([\"left\",\"top\",\"right\",\"bottom\"]).optional()});var HPn=Pt({net:Z().optional(),connection:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),inline:je().optional(),schX:Po.optional(),schY:Po.optional(),schRotation:oA.optional(),anchorSide:Kn([\"left\",\"top\",\"right\",\"bottom\"]).optional()}),OPn=Y3.extend({}),glt=P0(t=\u003etypeof t==\"string\"),dlt=Pt({method:Kn([\"trap\",\"gear\"]).optional(),reltol:xo([_t(),Z()]).optional(),abstol:xo([_t(),Z()]).optional(),vntol:xo([_t(),Z()]).optional()}),Aoe={name:Z().optional(),spiceEngine:glt.optional(),spiceOptions:dlt.optional(),graphIndependentAxes:je().optional(),children:P0().optional()},GPn=Pt({name:Z().optional(),simulationType:$e(\"spice_transient_analysis\").default(\"spice_transient_analysis\"),duration:Ml.optional(),startTime:Ml.optional(),timePerStep:Ml.optional(),spiceEngine:glt.optional(),spiceOptions:dlt.optional(),graphIndependentAxes:je().optional()}),hlt=Ml.refine(t=\u003et\u003e0,\"Time must be positive\"),YPn=Pt({...Aoe,duration:hlt.default(\"10ms\"),startTime:Ml.default(\"0ms\"),timePerStep:hlt.default(\"0.01ms\")}).superRefine((t,e)=\u003e{(t.startTime\u003c0||t.startTime\u003et.duration)\u0026\u0026e.addIssue({code:lo.custom,path:[\"startTime\"],message:\"startTime must be between zero and duration\"})}),UPn=Pt({...Aoe}),Wxe=xo([O_,H3]),KPn=Pt({...Aoe,sweepSource:Z().min(1),sweepStart:Wxe,sweepStop:Wxe,sweepStep:Wxe.refine(t=\u003et!==0,\"sweepStep must be nonzero\")}).superRefine((t,e)=\u003e{Math.sign(t.sweepStop-t.sweepStart)!==Math.sign(t.sweepStep)\u0026\u0026e.addIssue({code:lo.custom,path:[\"sweepStep\"],message:\"sweepStep must move from sweepStart toward sweepStop\"})}),VPn=Pt({...Aoe,sweepType:Kn([\"linear\",\"decade\",\"octave\"]),startFrequency:Cy.refine(t=\u003et\u003e0,\"startFrequency must be positive\"),stopFrequency:Cy.refine(t=\u003et\u003e0,\"stopFrequency must be positive\"),samplesPerInterval:_t().int().positive().optional(),sampleCount:_t().int().positive().optional()}).superRefine((t,e)=\u003e{if(t.stopFrequency\u003c=t.startFrequency\u0026\u0026e.addIssue({code:lo.custom,path:[\"stopFrequency\"],message:\"stopFrequency must be greater than startFrequency\"}),t.sweepType===\"linear\"){t.sampleCount===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"sampleCount\"],message:\"sampleCount is required for a linear AC sweep\"}),t.samplesPerInterval!==void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"samplesPerInterval\"],message:\"samplesPerInterval is only valid for decade or octave sweeps\"});return}t.samplesPerInterval===void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"samplesPerInterval\"],message:\"samplesPerInterval is required for decade or octave sweeps\"}),t.sampleCount!==void 0\u0026\u0026e.addIssue({code:lo.custom,path:[\"sampleCount\"],message:\"sampleCount is only valid for a linear sweep\"})}),zPn=S8.pipe(_t()),JPn=$M.pipe(_t()),WPn=Ine.pipe(_t()),jPn=O_.pipe(_t()),$Pn=H3.pipe(_t()),DV=t=\u003e({name:Z().optional(),values:dn(t).min(1).optional(),start:t.optional(),stop:t.optional(),step:t.optional()}),qPn=Pt({...DV(zPn),parameterType:$e(\"resistance\"),resistorRef:Z().min(1)}).strict(),XPn=Pt({...DV(JPn),parameterType:$e(\"capacitance\"),capacitorRef:Z().min(1)}).strict(),ZPn=Pt({...DV(WPn),parameterType:$e(\"inductance\"),inductorRef:Z().min(1)}).strict(),eMn=Pt({...DV(jPn),parameterType:$e(\"voltage\"),net:Z().min(1)}).strict(),tMn=Pt({...DV($Pn),parameterType:$e(\"current\"),currentSourceRef:Z().min(1)}).strict(),nMn=(t,e)=\u003e{const n=t.values!==void 0,o=[t.start,t.stop,t.step].filter(r=\u003er!==void 0).length,i=o\u003e0;if(n===i){e.addIssue({code:lo.custom,message:\"Provide either values or start/stop/step\"});return}if(o!==0\u0026\u0026o!==3){e.addIssue({code:lo.custom,message:\"start, stop, and step must be provided together\"});return}t.step===0\u0026\u0026e.addIssue({code:lo.custom,path:[\"step\"],message:\"step must be nonzero\"}),t.start!==void 0\u0026\u0026t.stop!==void 0\u0026\u0026t.step!==void 0\u0026\u0026Math.sign(t.stop-t.start)!==Math.sign(t.step)\u0026\u0026e.addIssue({code:lo.custom,path:[\"step\"],message:\"step must move from start toward stop\"})},oMn=Iy(\"parameterType\",[qPn,XPn,ZPn,eMn,tMn]).superRefine(nMn),iMn=Pt({key:rd().optional(),name:Z().optional(),autorouter:ioe.optional(),phaseIndex:_t().optional(),pcbTracePaths:dn(ilt).optional(),...elt.shape,region:Pt({shape:$e(\"rect\").optional(),minX:_t(),maxX:_t(),minY:_t(),maxY:_t()}).optional(),connection:Z().optional(),connections:dn(Z()).optional(),reroute:je().optional(),...alt.shape}).superRefine((t,e)=\u003e{const n=t.autorouter===\"simplify\"||typeof t.autorouter==\"object\"\u0026\u0026t.autorouter?.preset===\"simplify\";n\u0026\u0026t.reroute!==!0\u0026\u0026console.warn('The \"simplify\" autorouter preset should only be used with reroute=true'),t.reroute!==void 0\u0026\u0026!(n\u0026\u0026t.reroute===!0)\u0026\u0026t.region===void 0\u0026\u0026t.connection===void 0\u0026\u0026t.connections===void 0\u0026\u0026e.addIssue({code:lo.custom,message:\"region, connection, or connections is required when reroute is provided\",path:[\"region\"]})}),rMn=Pt({source:Z(),spicePinMapping:Qc(Z(),Z()).optional()}),sMn=[\"pin1\",\"pin2\",\"pin3\",\"emitter\",\"collector\",\"base\",\"gate\",\"source\",\"drain\"],aMn=vg.extend({type:Kn([\"npn\",\"pnp\",\"bjt\",\"jfet\",\"mosfet\",\"igbt\"]),connections:G3(sMn).optional()}),AMn=[\"pin1\",\"drain\",\"pin2\",\"source\",\"pin3\",\"gate\"],cMn=vg.extend({channelType:Kn([\"n\",\"p\"]),mosfetMode:Kn([\"enhancement\",\"depletion\"]),symbolDrainSide:Kn([\"left\",\"right\",\"top\",\"bottom\"]).optional(),symbolSourceSide:Kn([\"left\",\"right\",\"top\",\"bottom\"]).optional(),symbolGateSide:Kn([\"left\",\"right\",\"top\",\"bottom\"]).optional(),connections:G3(AMn).optional()}),lMn=[\"inverting_input\",\"non_inverting_input\",\"output\",\"positive_supply\",\"negative_supply\"],uMn=vg.extend({connections:G3(lMn).optional()}),gMn=Vvn,dMn=vg.extend({inductance:Ine,maxCurrentRating:xo([Z(),_t()]).optional(),schOrientation:MQ.optional(),connections:G3(gMn).optional()});Pt({children:P0().optional()});var hMn=Yxe,pMn=Kn([\"anode\",\"cathode\",\"pin1\",\"pin2\",\"pos\",\"neg\"]),mMn=Z().or(dn(Z()).readonly()).or(dn(Z())),_Mn=Qc(pMn,mMn),plt=Qc(Kn(hMn),zm.or(dn(zm).readonly()).or(dn(zm))),fMn=Kn([\"standard\",\"schottky\",\"zener\",\"avalanche\",\"photo\",\"tvs\"]),IMn=vg.extend({connections:_Mn.optional(),variant:fMn.optional().default(\"standard\"),standard:je().optional(),schottky:je().optional(),zener:je().optional(),avalanche:je().optional(),photo:je().optional(),tvs:je().optional(),schOrientation:MQ.optional(),pinLabels:plt.optional()}).superRefine((t,e)=\u003e{if([t.standard,t.schottky,t.zener,t.avalanche,t.photo,t.tvs].filter(Boolean).length\u003e1)return e.addIssue({code:lo.custom,message:\"Exactly one diode variant must be enabled\",path:[]}),Zs}).transform(t=\u003e{const e={...t,standard:!1,schottky:!1,zener:!1,avalanche:!1,photo:!1,tvs:!1};if(t.standard)e.standard=!0;else if(t.schottky)e.schottky=!0;else if(t.zener)e.zener=!0;else if(t.photo)e.photo=!0;else if(t.tvs)e.tvs=!0;else switch(t.variant){case\"standard\":e.standard=!0;break;case\"schottky\":e.schottky=!0;break;case\"zener\":e.zener=!0;break;case\"avalanche\":e.avalanche=!0;break;case\"photo\":e.photo=!0;break;case\"tvs\":e.tvs=!0;break;default:e.standard=!0}return e}),CMn=Qc(Kn([\"1\",\"2\"]),zm.or(dn(zm).readonly()).or(dn(zm))).transform(t=\u003e({...t[1]===void 0?{}:{pin1:t[1]},...t[2]===void 0?{}:{pin2:t[2]}})),yMn=vg.extend({color:Z().optional(),wavelength:Z().optional(),schDisplayValue:Z().optional(),schOrientation:MQ.optional(),pinLabels:plt.or(CMn).optional(),connections:G3(Yxe).optional(),laser:je().optional()}),xMn=vg.extend({type:Kn([\"spst\",\"spdt\",\"dpst\",\"dpdt\"]).optional(),isNormallyClosed:je().optional().default(!1),spst:je().optional(),spdt:je().optional(),dpst:je().optional(),dpdt:je().optional(),pinLabels:zxe.optional(),noConnect:Alt.optional(),simSwitchFrequency:Cy.optional(),simCloseAt:Ml.optional(),simOpenAt:Ml.optional(),simStartClosed:je().optional(),simStartOpen:je().optional(),connections:P0().pipe(Qc(Z(),cD)).optional()}).transform(t=\u003e{const e={...t};switch(e.dpdt?e.type=\"dpdt\":e.spst?e.type=\"spst\":e.spdt?e.type=\"spdt\":e.dpst\u0026\u0026(e.type=\"dpst\"),e.type){case\"spdt\":e.spdt=!0;break;case\"spst\":e.spst=!0;break;case\"dpst\":e.dpst=!0;break;case\"dpdt\":e.dpdt=!0;break}return e}),EMn=qa.extend({text:Z(),anchorAlignment:Kn([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),font:Kn([\"tscircuit2024\"]).optional(),fontSize:ce.optional(),color:Z().optional()}),BMn=qa.omit({pcbRotation:!0}).extend({width:lt,height:lt,strokeWidth:lt.optional(),isFilled:je().optional(),hasStroke:je().optional(),isStrokeDashed:je().optional(),color:Z().optional(),cornerRadius:lt.optional()}),bMn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({route:dn(N9),strokeWidth:ce.optional(),color:Z().optional()}),mlt=xo([Z(),By]),SMn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({from:mlt,to:mlt,text:Z().optional(),offset:lt.optional(),font:Kn([\"tscircuit2024\"]).optional(),fontSize:ce.optional(),color:Z().optional(),arrowSize:lt.optional(),units:Kn([\"in\",\"mm\"]).optional(),outerEdgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional(),innerEdgeToEdge:$e(!0).optional()});Pt({layer:Z().optional(),thickness:lt.optional(),route:dn(N9)});var _lt=eoe.extend({name:Z().optional(),fromLayer:Pr.optional(),toLayer:Pr.optional(),holeDiameter:lt.optional(),outerDiameter:lt.optional(),layers:dn(Pr).optional(),connectsTo:Z().or(dn(Z())).optional(),netIsAssignable:je().optional(),tented:xo([je(),Kn([\"both_sides\",\"top_and_bottom_tented\",\"top_tented\",\"bottom_tented\",\"exposed\"])]).transform(t=\u003et===!0||t===\"both_sides\"?\"top_and_bottom_tented\":t===!1?\"exposed\":t).optional()}),QMn=Pt({pin1:cD}).strict(),vMn=vg.extend({connections:QMn.optional(),footprintVariant:Kn([\"pad\",\"through_hole\"]).optional(),padShape:Kn([\"rect\",\"circle\"]).optional().default(\"circle\"),padDiameter:lt.optional(),holeDiameter:lt.optional(),width:lt.optional(),height:lt.optional()}).refine(t=\u003et.footprintVariant!==\"through_hole\"||t.holeDiameter!==void 0,{message:\"holeDiameter is required for through_hole testpoints\"}),wMn=qa.omit({pcbRotation:!0,layer:!0}).extend({connection:Z()}),PMn=xo([qa.omit({pcbRotation:!0}).extend({shape:$e(\"circle\"),radius:lt,layers:dn(Pr).optional(),excludeRefs:dn(Z()).optional().describe('Component selectors excluded from the keepout, such as \".ANT1\"')}),qa.extend({shape:$e(\"rect\"),width:lt,height:lt,layers:dn(Pr).optional(),excludeRefs:dn(Z()).optional().describe('Component selectors excluded from the keepout, such as \".ANT1\"')})]),MMn=qa.extend({width:lt,height:lt,strokeWidth:lt.optional(),isFilled:je().optional(),hasStroke:je().optional(),isStrokeDashed:je().optional(),color:Z().optional()}),DMn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({outline:dn(By),strokeWidth:ce.optional(),isClosed:je().optional(),isStrokeDashed:je().optional(),color:Z().optional()}),NMn=qa.omit({pcbRotation:!0}).extend({radius:lt});qa.omit({pcbRotation:!0}).extend({width:lt,height:lt,radius:lt});var RMn=Pt({name:Z().optional(),layer:Pr,connectsTo:Z(),unbroken:je().optional().describe(\"Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads.\"),padMargin:Po.optional(),traceMargin:Po.optional(),clearance:Po.optional(),boardEdgeMargin:Po.optional(),cutoutMargin:Po.optional(),useThermalReliefs:je().optional(),outline:dn(By).optional(),coveredWithSolderMask:je().optional().default(!0)}),TMn=Pt({originalLayer:Pr.default(\"top\").optional(),children:rd().optional()}),kMn=Pt({pcbX:Vm.optional(),pcbY:Vm.optional(),pcbLeftEdgeX:Vm.optional(),pcbRightEdgeX:Vm.optional(),pcbTopEdgeY:Vm.optional(),pcbBottomEdgeY:Vm.optional(),pcbOffsetX:Po.optional(),pcbOffsetY:Po.optional(),pcbZ:Po.optional()}),FMn=PQ.extend({modelUrl:G_,stepUrl:G_.optional()}),LMn=FMn.merge(kMn),HMn=xo([Art(),G_,LMn]),OMn=vg.extend({voltage:O_}),GMn=[\"pin1\",\"pin2\",\"pos\",\"neg\"],YMn=xo([Z(),_t()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),UMn=vg.extend({voltage:O_.optional(),frequency:Cy.optional(),peakToPeakVoltage:O_.optional(),waveShape:Kn([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]).optional(),phase:oA.optional(),dutyCycle:YMn.optional(),pulseDelay:Ml.optional(),riseTime:Ml.optional(),fallTime:Ml.optional(),pulseWidth:Ml.optional(),period:Ml.optional(),acMagnitude:O_.optional(),acPhase:oA.optional(),connections:G3(GMn).optional()}),KMn=[\"pin1\",\"pin2\",\"pos\",\"neg\"],VMn=xo([Z(),_t()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),zMn=vg.extend({current:H3.optional(),frequency:Cy.optional(),peakToPeakCurrent:H3.optional(),waveShape:Kn([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]).optional(),phase:oA.optional(),dutyCycle:VMn.optional(),acMagnitude:H3.optional(),acPhase:oA.optional(),connections:G3(KMn).optional()}),JMn=vg.omit({name:!0}).extend({name:Z().optional(),connectsTo:Z(),referenceTo:Z().optional(),color:Z().optional(),graphDisplayName:Z().optional(),graphCenter:_t().optional(),graphVerticalOffset:_t().or(Z()).optional(),graphVoltagePerDiv:_t().or(Z()).optional()}),WMn=[\"pin1\",\"pin2\",\"pos\",\"neg\"],jMn=t=\u003et.pos!==void 0\u0026\u0026t.neg!==void 0||t.pin1!==void 0\u0026\u0026t.pin2!==void 0,$Mn=vg.extend({connections:G3(WMn).refine(jMn,\"Ammeter connections must include either pos/neg or pin1/pin2\"),color:Z().optional(),graphDisplayName:Z().optional(),graphCenter:_t().optional(),graphVerticalOffset:_t().or(Z()).optional(),graphCurrentPerDiv:_t().or(Z()).optional()}),qMn=Pt({center:ki,radius:lt,startAngleDegrees:oA,endAngleDegrees:oA,direction:Kn([\"clockwise\",\"counterclockwise\"]).default(\"counterclockwise\"),strokeWidth:lt.optional(),color:Z().optional(),isDashed:je().optional().default(!1)});Pt({children:rd().optional()});var XMn=Pt({name:Z().optional(),chipRef:Z().optional(),pinLabels:zxe.optional(),schPinArrangement:ooe.optional(),schPinStyle:QV.optional(),schX:lt.optional(),schY:lt.optional(),schSectionName:Z().optional(),schSheetName:Z().optional(),width:lt.optional(),height:lt.optional(),overlay:dn(Z()).optional(),padding:lt.optional(),paddingLeft:lt.optional(),paddingRight:lt.optional(),paddingTop:lt.optional(),paddingBottom:lt.optional(),title:Z().optional(),titleAlignment:H9.default(\"top_left\"),titleColor:Z().optional(),titleFontSize:lt.optional(),titleInside:je().default(!1),strokeStyle:Kn([\"solid\",\"dashed\"]).default(\"solid\")}).refine(t=\u003et.width!==void 0\u0026\u0026t.height!==void 0||Array.isArray(t.overlay)\u0026\u0026t.overlay.length\u003e0,{message:\"Must provide either both `width` and `height`, or a non-empty `overlay` array.\"}).refine(t=\u003e!(t.width!==void 0\u0026\u0026t.height!==void 0\u0026\u0026Array.isArray(t.overlay)\u0026\u0026t.overlay.length\u003e0),{message:\"Cannot provide both `width`/`height` and `overlay` at the same time.\"}),ZMn=P0().pipe(Qc(Z(),cD)).refine(t=\u003eObject.keys(t).length\u003e0,{message:\"connections must map at least one schematic symbol port\"}),eDn=Pt({name:Z().min(1),displayName:Z().optional(),chipRef:Z().min(1).optional(),symbolName:Z().min(1),connections:ZMn.optional(),schX:Po.optional(),schY:Po.optional(),schRotation:oA.optional(),schSectionName:Z().optional(),schSheetName:Z().optional()}),tDn=Pt({center:ki,radius:lt,strokeWidth:lt.optional(),color:Z().optional(),isFilled:je().optional().default(!1),fillColor:Z().optional(),isDashed:je().optional().default(!1)}),nDn=Pt({schX:lt.optional(),schY:lt.optional(),width:lt,height:lt,rotation:oA.default(0),strokeWidth:lt.optional(),color:Z().optional(),isFilled:je().optional().default(!1),fillColor:Z().optional(),isDashed:je().optional().default(!1)}),oDn=Pt({x1:lt,y1:lt,x2:lt,y2:lt,strokeWidth:lt.optional(),color:Z().optional(),isDashed:je().optional().default(!1),dashLength:lt.optional(),dashGap:lt.optional()}),iDn=Kn([\"center\",\"left\",\"right\",\"top\",\"bottom\"]),rDn=Pt({schX:lt.optional(),schY:lt.optional(),text:Z(),fontSize:_t().default(1),anchor:xo([iDn.describe(\"legacy\"),H9]).default(\"center\"),color:Z().default(\"#000000\"),schRotation:oA.default(0)}),sDn=Pt({points:dn(ki).optional(),svgPath:Z().optional(),strokeWidth:lt.optional(),strokeColor:Z().optional(),dashLength:lt.optional(),dashGap:lt.optional(),isFilled:je().optional().default(!1),fillColor:Z().optional()}),aDn=Pt({schX:lt.optional(),schY:lt.optional(),children:rd().optional(),cellPadding:lt.optional(),borderWidth:lt.optional(),anchor:H9.optional(),fontSize:lt.optional()}),ADn=Pt({children:rd().optional(),height:lt.optional()}),cDn=Pt({children:Z().optional(),horizontalAlign:Kn([\"left\",\"center\",\"right\"]).optional(),verticalAlign:Kn([\"top\",\"middle\",\"bottom\"]).optional(),fontSize:lt.optional(),rowSpan:_t().optional(),colSpan:_t().optional(),width:lt.optional(),text:Z().optional()}),lDn=Pt({displayName:Z().optional(),name:Z(),sectionTitleFontSize:lt.optional()}),uDn=Pt({name:Z().optional(),displayName:Z().optional(),sheetIndex:_t().optional(),sheetSize:Kn([\"A4\",\"ANSI_B\"]).default(\"A4\"),sheetWidth:lt.pipe(_t().positive()).optional(),sheetHeight:lt.pipe(_t().positive()).optional(),children:rd().optional()}),gDn=G_.refine(t=\u003et.trim().length\u003e0,{message:\"imageUrl cannot be empty\"}),flt=t=\u003ePo.refine(e=\u003eNumber.isFinite(e)\u0026\u0026e\u003e0,{message:`${t} must be a positive finite distance`}),dDn=Pt({imageUrl:gDn.optional(),svgContent:Z().refine(t=\u003et.trim().length\u003e0,{message:\"svgContent cannot be empty\"}).optional(),width:flt(\"width\").optional(),height:flt(\"height\").optional()}).superRefine(({imageUrl:t,svgContent:e},n)=\u003e{t===void 0\u0026\u0026e===void 0\u0026\u0026n.addIssue({code:lo.custom,message:\"At least one of imageUrl or svgContent is required\"})}),hDn=qa.extend({text:Z(),anchorAlignment:H9.default(\"center\"),font:Kn([\"tscircuit2024\"]).optional(),fontSize:ce.optional(),layers:dn(Pr).optional(),knockout:je().optional(),mirrored:je().optional()}),pDn=qa.extend({text:Z(),anchorAlignment:H9.default(\"center\"),font:Kn([\"tscircuit2024\"]).optional(),fontSize:ce.optional(),isKnockout:je().optional(),knockoutPadding:ce.optional(),knockoutPaddingLeft:ce.optional(),knockoutPaddingRight:ce.optional(),knockoutPaddingTop:ce.optional(),knockoutPaddingBottom:ce.optional(),layers:dn(Pr).optional()}),mDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({route:dn(N9),strokeWidth:ce.optional()}),_Dn=qa.omit({pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({strokeWidth:lt,x1:lt,y1:lt,x2:lt,y2:lt}),fDn=qa.omit({pcbRotation:!0}).extend({filled:je().default(!0).optional(),stroke:Kn([\"dashed\",\"solid\",\"none\"]).optional(),strokeWidth:lt.optional(),width:lt,height:lt,cornerRadius:lt.optional()}),IDn=qa.omit({pcbRotation:!0}).extend({isFilled:je().optional(),isOutline:je().optional(),strokeWidth:lt.optional(),radius:lt}),CDn=qa.omit({layer:!0,pcbStyle:!0,pcbSx:!0}).extend({imageUrl:G_,width:Po,height:Po,layer:Km.optional()}),Ilt=Pt({x:lt,y:lt,via:je().optional(),toLayer:Pr.optional()}),yDn=Pt({for:Z().optional().describe(\"Selector for the port you're targeting, not required if you're inside a trace\"),order:_t().optional(),offset:N9.or(Ilt).optional(),offsets:dn(N9).or(dn(Ilt)).optional(),traceWidth:_t().optional()}),xDn=eoe.extend({name:Z().optional(),pinNumber:_t().optional(),schStemLength:_t().optional(),schPinLabelFontSize:Kn([\"default\",\"sm\"]).or(lt.refine(t=\u003eNumber.isFinite(t)\u0026\u0026t\u003e0,{message:\"Schematic pin-label font size must be positive and finite\"})).optional(),aliases:dn(Z()).optional(),layer:Z().optional(),layers:dn(Z()).optional(),schX:_t().optional(),schY:_t().optional(),direction:hvn.optional(),connectsTo:Z().or(dn(Z())).optional(),kicadPinMetadata:Zvn.optional(),hasInversionCircle:je().optional()}),EDn=qa.extend({text:Z(),anchorAlignment:Kn([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),font:Kn([\"tscircuit2024\"]).optional(),fontSize:ce.optional(),color:Z().optional()}),BDn=qa.omit({pcbRotation:!0}).extend({width:lt,height:lt,strokeWidth:lt.optional(),isFilled:je().optional(),hasStroke:je().optional(),isStrokeDashed:je().optional(),color:Z().optional(),cornerRadius:lt.optional()}),bDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({route:dn(N9),strokeWidth:ce.optional(),color:Z().optional()}),SDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({x1:lt,y1:lt,x2:lt,y2:lt,strokeWidth:lt.optional(),color:Z().optional(),isDashed:je().optional()}),Clt=xo([Z(),By]),QDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({from:Clt,to:Clt,text:Z().optional(),offset:lt.optional(),font:Kn([\"tscircuit2024\"]).optional(),fontSize:ce.optional(),color:Z().optional(),arrowSize:lt.optional(),units:Kn([\"in\",\"mm\"]).optional(),outerEdgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional(),innerEdgeToEdge:$e(!0).optional()}),ylt=dn(rd()).describe(\"Circuit JSON\"),jxe=Pt({footprintCircuitJson:dn(rd()),cadModel:kxe.optional()}),xlt=IQ().args(Z()).returns(CQ(jxe)).or(IQ().args(Z(),Pt({resolvedPcbStyle:Hxe.optional()}).optional()).returns(CQ(jxe))).describe(\"A function that takes a path and returns Circuit JSON\"),vDn=Pt({loadFromUrl:IQ().args(Z()).returns(CQ(jxe)).describe(\"A function that takes a footprint file URL and returns Circuit JSON\")}),wDn=Pt({engineVersionString:Z().optional(),simulationResultCircuitJson:ylt}),PDn=Pt({simulate:IQ().args(Z()).returns(CQ(wDn)).describe(\"A function that takes a SPICE string and returns a simulation result\")}),MDn=P0(t=\u003etypeof t==\"string\"),Elt=Pt({run:IQ().args().returns(CQ(c2e())).describe(\"Run the autorouter\"),getOutputSimpleRouteJson:IQ().args().returns(CQ(rd())).describe(\"Get the resulting SimpleRouteJson\")}),DDn=Pt({createAutorouter:IQ().args(rd(),rd().optional()).returns(xo([Elt,CQ(Elt)])).describe(\"Create an autorouter instance\")}),NDn=P0(t=\u003etypeof t==\"function\").describe(\"A fetch-like function to use for platform requests\"),RDn=P0(t=\u003etypeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"getItem\"in t\u0026\u0026typeof t.getItem==\"function\"\u0026\u0026\"setItem\"in t\u0026\u0026typeof t.setItem==\"function\"),TDn=P0(t=\u003etypeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"runDrcChecks\"in t\u0026\u0026typeof t.runDrcChecks==\"function\"),kDn=Pt({partsEngine:tlt.optional(),fabricatorEngine:TDn.optional(),autorouter:ioe.optional(),autorouterMap:Qc(Z(),DDn).optional(),allowLegacyAutorouters:je().optional(),registryApiUrl:G_.optional(),cloudAutorouterUrl:G_.optional(),projectName:Z().optional(),projectBaseUrl:G_.optional(),version:Z().optional(),url:G_.optional(),printBoardInformationToSilkscreen:je().optional(),includeBoardFiles:dn(Z()).describe('The board files to automatically build with \"tsci build\", defaults to [\"**/*.circuit.tsx\"]. Can be an array of files or globs').optional(),snapshotsDir:Z().describe('The directory where snapshots are stored for \"tsci snapshot\", defaults to \"tests/__snapshots__\"').optional(),defaultSpiceEngine:MDn.optional(),unitPreference:Kn([\"mm\",\"in\",\"mil\"]).optional(),localCacheEngine:RDn.optional(),useCloudAutorouter:je().optional(),enablePartOrientationAnalysis:je().optional(),pcbPackSolverTimeoutMs:_t().finite().positive().optional(),pcbDisabled:je().optional(),routingDisabled:je().optional(),schematicDisabled:je().optional(),partsEngineDisabled:je().optional(),analogSimulationDisabled:je().optional(),drcChecksDisabled:je().optional(),netlistDrcChecksDisabled:je().optional(),routingDrcChecksDisabled:je().optional(),placementDrcChecksDisabled:je().optional(),pinSpecificationDrcChecksDisabled:je().optional(),spiceEngineMap:Qc(Z(),PDn).optional(),footprintLibraryMap:Qc(Z(),xo([xlt,Qc(Z(),xo([ylt,xlt]))])).optional(),footprintFileParserMap:Qc(Z(),vDn).optional(),resolveProjectStaticFileImportUrl:IQ().args(Z()).returns(CQ(Z())).describe(\"A function that returns a string URL for static files for the project\").optional(),platformFetch:NDn.optional()}),FDn=kDn,LDn=FDn.pick({projectName:!0,projectBaseUrl:!0,version:!0,url:!0,printBoardInformationToSilkscreen:!0,includeBoardFiles:!0,snapshotsDir:!0,defaultSpiceEngine:!0,pcbDisabled:!0,schematicDisabled:!0,analogSimulationDisabled:!0}),Y_;(function(t){t.Root=\"root\",t.Text=\"text\",t.Directive=\"directive\",t.Comment=\"comment\",t.Script=\"script\",t.Style=\"style\",t.Tag=\"tag\",t.CDATA=\"cdata\",t.Doctype=\"doctype\"})(Y_||(Y_={}));function HDn(t){return t.type===Y_.Tag||t.type===Y_.Script||t.type===Y_.Style}const ODn=Y_.Root,GDn=Y_.Text,YDn=Y_.Directive,UDn=Y_.Comment,KDn=Y_.Script,VDn=Y_.Style,zDn=Y_.Tag,JDn=Y_.CDATA,WDn=Y_.Doctype;function w5(t){return HDn(t)}function $xe(t){return t.type===Y_.CDATA}function Xk(t){return t.type===Y_.Text}function Blt(t){return t.type===Y_.Comment}function jDn(t){return t.type===Y_.Root}function J4(t){return Object.prototype.hasOwnProperty.call(t,\"children\")}const blt=/[\"\u0026'\u003c\u003e$\\x80-\\uFFFF]/g,$Dn=new Map([[34,\"\u0026quot;\"],[38,\"\u0026amp;\"],[39,\"\u0026apos;\"],[60,\"\u0026lt;\"],[62,\"\u0026gt;\"]]),qDn=String.prototype.codePointAt!=null?(t,e)=\u003et.codePointAt(e):(t,e)=\u003e(t.charCodeAt(e)\u002664512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function Slt(t){let e=\"\",n=0,o;for(;(o=blt.exec(t))!==null;){const i=o.index,r=t.charCodeAt(i),s=$Dn.get(r);s!==void 0?(e+=t.substring(n,i)+s,n=i+1):(e+=`${t.substring(n,i)}\u0026#x${qDn(t,i).toString(16)};`,n=blt.lastIndex+=+((r\u002664512)===55296))}return e+t.substr(n)}function Qlt(t,e){return function(o){let i,r=0,s=\"\";for(;i=t.exec(o);)r!==i.index\u0026\u0026(s+=o.substring(r,i.index)),s+=e.get(i[0].charCodeAt(0)),r=i.index+1;return s+o.substring(r)}}const XDn=Qlt(/[\"\u0026\\u00A0]/g,new Map([[34,\"\u0026quot;\"],[38,\"\u0026amp;\"],[160,\"\u0026nbsp;\"]])),ZDn=Qlt(/[\u0026\u003c\u003e\\u00A0]/g,new Map([[38,\"\u0026amp;\"],[60,\"\u0026lt;\"],[62,\"\u0026gt;\"],[160,\"\u0026nbsp;\"]])),eNn=new Map([\"altGlyph\",\"altGlyphDef\",\"altGlyphItem\",\"animateColor\",\"animateMotion\",\"animateTransform\",\"clipPath\",\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feDropShadow\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\",\"foreignObject\",\"glyphRef\",\"linearGradient\",\"radialGradient\",\"textPath\"].map(t=\u003e[t.toLowerCase(),t])),tNn=new Map([\"definitionURL\",\"attributeName\",\"attributeType\",\"baseFrequency\",\"baseProfile\",\"calcMode\",\"clipPathUnits\",\"diffuseConstant\",\"edgeMode\",\"filterUnits\",\"glyphRef\",\"gradientTransform\",\"gradientUnits\",\"kernelMatrix\",\"kernelUnitLength\",\"keyPoints\",\"keySplines\",\"keyTimes\",\"lengthAdjust\",\"limitingConeAngle\",\"markerHeight\",\"markerUnits\",\"markerWidth\",\"maskContentUnits\",\"maskUnits\",\"numOctaves\",\"pathLength\",\"patternContentUnits\",\"patternTransform\",\"patternUnits\",\"pointsAtX\",\"pointsAtY\",\"pointsAtZ\",\"preserveAlpha\",\"preserveAspectRatio\",\"primitiveUnits\",\"refX\",\"refY\",\"repeatCount\",\"repeatDur\",\"requiredExtensions\",\"requiredFeatures\",\"specularConstant\",\"specularExponent\",\"spreadMethod\",\"startOffset\",\"stdDeviation\",\"stitchTiles\",\"surfaceScale\",\"systemLanguage\",\"tableValues\",\"targetX\",\"targetY\",\"textLength\",\"viewBox\",\"viewTarget\",\"xChannelSelector\",\"yChannelSelector\",\"zoomAndPan\"].map(t=\u003e[t.toLowerCase(),t])),nNn=new Set([\"style\",\"script\",\"xmp\",\"iframe\",\"noembed\",\"noframes\",\"plaintext\",\"noscript\"]);function oNn(t){return t.replace(/\"/g,\"\u0026quot;\")}function iNn(t,e){var n;if(!t)return;const o=((n=e.encodeEntities)!==null\u0026\u0026n!==void 0?n:e.decodeEntities)===!1?oNn:e.xmlMode||e.encodeEntities!==\"utf8\"?Slt:XDn;return Object.keys(t).map(i=\u003e{var r,s;const a=(r=t[i])!==null\u0026\u0026r!==void 0?r:\"\";return e.xmlMode===\"foreign\"\u0026\u0026(i=(s=tNn.get(i))!==null\u0026\u0026s!==void 0?s:i),!e.emptyAttrs\u0026\u0026!e.xmlMode\u0026\u0026a===\"\"?i:`${i}=\"${o(a)}\"`}).join(\" \")}const vlt=new Set([\"area\",\"base\",\"basefont\",\"br\",\"col\",\"command\",\"embed\",\"frame\",\"hr\",\"img\",\"input\",\"isindex\",\"keygen\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]);function qxe(t,e={}){const n=\"length\"in t?t:[t];let o=\"\";for(let i=0;i\u003cn.length;i++)o+=rNn(n[i],e);return o}function rNn(t,e){switch(t.type){case ODn:return qxe(t.children,e);case WDn:case YDn:return cNn(t);case UDn:return gNn(t);case JDn:return uNn(t);case KDn:case VDn:case zDn:return ANn(t,e);case GDn:return lNn(t,e)}}const sNn=new Set([\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\",\"annotation-xml\",\"foreignObject\",\"desc\",\"title\"]),aNn=new Set([\"svg\",\"math\"]);function ANn(t,e){var n;e.xmlMode===\"foreign\"\u0026\u0026(t.name=(n=eNn.get(t.name))!==null\u0026\u0026n!==void 0?n:t.name,t.parent\u0026\u0026sNn.has(t.parent.name)\u0026\u0026(e={...e,xmlMode:!1})),!e.xmlMode\u0026\u0026aNn.has(t.name)\u0026\u0026(e={...e,xmlMode:\"foreign\"});let o=`\u003c${t.name}`;const i=iNn(t.attribs,e);return i\u0026\u0026(o+=` ${i}`),t.children.length===0\u0026\u0026(e.xmlMode?e.selfClosingTags!==!1:e.selfClosingTags\u0026\u0026vlt.has(t.name))?(e.xmlMode||(o+=\" \"),o+=\"/\u003e\"):(o+=\"\u003e\",t.children.length\u003e0\u0026\u0026(o+=qxe(t.children,e)),(e.xmlMode||!vlt.has(t.name))\u0026\u0026(o+=`\u003c/${t.name}\u003e`)),o}function cNn(t){return`\u003c${t.data}\u003e`}function lNn(t,e){var n;let o=t.data||\"\";return((n=e.encodeEntities)!==null\u0026\u0026n!==void 0?n:e.decodeEntities)!==!1\u0026\u0026!(!e.xmlMode\u0026\u0026t.parent\u0026\u0026nNn.has(t.parent.name))\u0026\u0026(o=e.xmlMode||e.encodeEntities!==\"utf8\"?Slt(o):ZDn(o)),o}function uNn(t){return`\u003c![CDATA[${t.children[0].data}]]\u003e`}function gNn(t){return`\u003c!--${t.data}--\u003e`}function wlt(t,e){return qxe(t,e)}function dNn(t,e){return J4(t)?t.children.map(n=\u003ewlt(n,e)).join(\"\"):\"\"}function coe(t){return Array.isArray(t)?t.map(coe).join(\"\"):w5(t)?t.name===\"br\"?`\n`:coe(t.children):$xe(t)?coe(t.children):Xk(t)?t.data:\"\"}function loe(t){return Array.isArray(t)?t.map(loe).join(\"\"):J4(t)\u0026\u0026!Blt(t)?loe(t.children):Xk(t)?t.data:\"\"}function Xxe(t){return Array.isArray(t)?t.map(Xxe).join(\"\"):J4(t)\u0026\u0026(t.type===Y_.Tag||$xe(t))?Xxe(t.children):Xk(t)?t.data:\"\"}function Plt(t){return J4(t)?t.children:[]}function Mlt(t){return t.parent||null}function hNn(t){const e=Mlt(t);if(e!=null)return Plt(e);const n=[t];let{prev:o,next:i}=t;for(;o!=null;)n.unshift(o),{prev:o}=o;for(;i!=null;)n.push(i),{next:i}=i;return n}function pNn(t,e){var n;return(n=t.attribs)===null||n===void 0?void 0:n[e]}function mNn(t,e){return t.attribs!=null\u0026\u0026Object.prototype.hasOwnProperty.call(t.attribs,e)\u0026\u0026t.attribs[e]!=null}function _Nn(t){return t.name}function fNn(t){let{next:e}=t;for(;e!==null\u0026\u0026!w5(e);)({next:e}=e);return e}function INn(t){let{prev:e}=t;for(;e!==null\u0026\u0026!w5(e);)({prev:e}=e);return e}function NV(t){if(t.prev\u0026\u0026(t.prev.next=t.next),t.next\u0026\u0026(t.next.prev=t.prev),t.parent){const e=t.parent.children,n=e.lastIndexOf(t);n\u003e=0\u0026\u0026e.splice(n,1)}t.next=null,t.prev=null,t.parent=null}function CNn(t,e){const n=e.prev=t.prev;n\u0026\u0026(n.next=e);const o=e.next=t.next;o\u0026\u0026(o.prev=e);const i=e.parent=t.parent;if(i){const r=i.children;r[r.lastIndexOf(t)]=e,t.parent=null}}function yNn(t,e){if(NV(e),e.next=null,e.parent=t,t.children.push(e)\u003e1){const n=t.children[t.children.length-2];n.next=e,e.prev=n}else e.prev=null}function xNn(t,e){NV(e);const{parent:n}=t,o=t.next;if(e.next=o,e.prev=t,t.next=e,e.parent=n,o){if(o.prev=e,n){const i=n.children;i.splice(i.lastIndexOf(o),0,e)}}else n\u0026\u0026n.children.push(e)}function ENn(t,e){if(NV(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){const n=t.children[1];n.prev=e,e.next=n}else e.next=null}function BNn(t,e){NV(e);const{parent:n}=t;if(n){const o=n.children;o.splice(o.indexOf(t),0,e)}t.prev\u0026\u0026(t.prev.next=e),e.parent=n,e.prev=t.prev,e.next=t,t.prev=e}function RV(t,e,n=!0,o=1/0){return Dlt(t,Array.isArray(e)?e:[e],n,o)}function Dlt(t,e,n,o){const i=[],r=[Array.isArray(e)?e:[e]],s=[0];for(;;){if(s[0]\u003e=r[0].length){if(s.length===1)return i;r.shift(),s.shift();continue}const a=r[0][s[0]++];if(t(a)\u0026\u0026(i.push(a),--o\u003c=0))return i;n\u0026\u0026J4(a)\u0026\u0026a.children.length\u003e0\u0026\u0026(s.unshift(0),r.unshift(a.children))}}function bNn(t,e){return e.find(t)}function Zxe(t,e,n=!0){const o=Array.isArray(e)?e:[e];for(let i=0;i\u003co.length;i++){const r=o[i];if(w5(r)\u0026\u0026t(r))return r;if(n\u0026\u0026J4(r)\u0026\u0026r.children.length\u003e0){const s=Zxe(t,r.children,!0);if(s)return s}}return null}function Nlt(t,e){return(Array.isArray(e)?e:[e]).some(n=\u003ew5(n)\u0026\u0026t(n)||J4(n)\u0026\u0026Nlt(t,n.children))}function SNn(t,e){const n=[],o=[Array.isArray(e)?e:[e]],i=[0];for(;;){if(i[0]\u003e=o[0].length){if(o.length===1)return n;o.shift(),i.shift();continue}const r=o[0][i[0]++];w5(r)\u0026\u0026t(r)\u0026\u0026n.push(r),J4(r)\u0026\u0026r.children.length\u003e0\u0026\u0026(i.unshift(0),o.unshift(r.children))}}const uoe={tag_name(t){return typeof t==\"function\"?e=\u003ew5(e)\u0026\u0026t(e.name):t===\"*\"?w5:e=\u003ew5(e)\u0026\u0026e.name===t},tag_type(t){return typeof t==\"function\"?e=\u003et(e.type):e=\u003ee.type===t},tag_contains(t){return typeof t==\"function\"?e=\u003eXk(e)\u0026\u0026t(e.data):e=\u003eXk(e)\u0026\u0026e.data===t}};function e3e(t,e){return typeof e==\"function\"?n=\u003ew5(n)\u0026\u0026e(n.attribs[t]):n=\u003ew5(n)\u0026\u0026n.attribs[t]===e}function QNn(t,e){return n=\u003et(n)||e(n)}function Rlt(t){const e=Object.keys(t).map(n=\u003e{const o=t[n];return Object.prototype.hasOwnProperty.call(uoe,n)?uoe[n](o):e3e(n,o)});return e.length===0?null:e.reduce(QNn)}function vNn(t,e){const n=Rlt(t);return n?n(e):!0}function wNn(t,e,n,o=1/0){const i=Rlt(t);return i?RV(i,e,n,o):[]}function PNn(t,e,n=!0){return Array.isArray(e)||(e=[e]),Zxe(e3e(\"id\",t),e,n)}function Zk(t,e,n=!0,o=1/0){return RV(uoe.tag_name(t),e,n,o)}function MNn(t,e,n=!0,o=1/0){return RV(e3e(\"class\",t),e,n,o)}function DNn(t,e,n=!0,o=1/0){return RV(uoe.tag_type(t),e,n,o)}function NNn(t){let e=t.length;for(;--e\u003e=0;){const n=t[e];if(e\u003e0\u0026\u0026t.lastIndexOf(n,e-1)\u003e=0){t.splice(e,1);continue}for(let o=n.parent;o;o=o.parent)if(t.includes(o)){t.splice(e,1);break}}return t}var P5;(function(t){t[t.DISCONNECTED=1]=\"DISCONNECTED\",t[t.PRECEDING=2]=\"PRECEDING\",t[t.FOLLOWING=4]=\"FOLLOWING\",t[t.CONTAINS=8]=\"CONTAINS\",t[t.CONTAINED_BY=16]=\"CONTAINED_BY\"})(P5||(P5={}));function Tlt(t,e){const n=[],o=[];if(t===e)return 0;let i=J4(t)?t:t.parent;for(;i;)n.unshift(i),i=i.parent;for(i=J4(e)?e:e.parent;i;)o.unshift(i),i=i.parent;const r=Math.min(n.length,o.length);let s=0;for(;s\u003cr\u0026\u0026n[s]===o[s];)s++;if(s===0)return P5.DISCONNECTED;const a=n[s-1],A=a.children,c=n[s],l=o[s];return A.indexOf(c)\u003eA.indexOf(l)?a===e?P5.FOLLOWING|P5.CONTAINED_BY:P5.FOLLOWING:a===t?P5.PRECEDING|P5.CONTAINS:P5.PRECEDING}function RNn(t){return t=t.filter((e,n,o)=\u003e!o.includes(e,n+1)),t.sort((e,n)=\u003e{const o=Tlt(e,n);return o\u0026P5.PRECEDING?-1:o\u0026P5.FOLLOWING?1:0}),t}function TNn(t){const e=goe(ONn,t);return e?e.name===\"feed\"?kNn(e):FNn(e):null}function kNn(t){var e;const n=t.children,o={type:\"atom\",items:Zk(\"entry\",n).map(s=\u003e{var a;const{children:A}=s,c={media:klt(A)};cx(c,\"id\",\"id\",A),cx(c,\"title\",\"title\",A);const l=(a=goe(\"link\",A))===null||a===void 0?void 0:a.attribs.href;l\u0026\u0026(c.link=l);const u=DQ(\"summary\",A)||DQ(\"content\",A);u\u0026\u0026(c.description=u);const g=DQ(\"updated\",A);return g\u0026\u0026(c.pubDate=new Date(g)),c})};cx(o,\"id\",\"id\",n),cx(o,\"title\",\"title\",n);const i=(e=goe(\"link\",n))===null||e===void 0?void 0:e.attribs.href;i\u0026\u0026(o.link=i),cx(o,\"description\",\"subtitle\",n);const r=DQ(\"updated\",n);return r\u0026\u0026(o.updated=new Date(r)),cx(o,\"author\",\"email\",n,!0),o}function FNn(t){var e,n;const o=(n=(e=goe(\"channel\",t.children))===null||e===void 0?void 0:e.children)!==null\u0026\u0026n!==void 0?n:[],i={type:t.name.substr(0,3),id:\"\",items:Zk(\"item\",t.children).map(s=\u003e{const{children:a}=s,A={media:klt(a)};cx(A,\"id\",\"guid\",a),cx(A,\"title\",\"title\",a),cx(A,\"link\",\"link\",a),cx(A,\"description\",\"description\",a);const c=DQ(\"pubDate\",a)||DQ(\"dc:date\",a);return c\u0026\u0026(A.pubDate=new Date(c)),A})};cx(i,\"title\",\"title\",o),cx(i,\"link\",\"link\",o),cx(i,\"description\",\"description\",o);const r=DQ(\"lastBuildDate\",o);return r\u0026\u0026(i.updated=new Date(r)),cx(i,\"author\",\"managingEditor\",o,!0),i}const LNn=[\"url\",\"type\",\"lang\"],HNn=[\"fileSize\",\"bitrate\",\"framerate\",\"samplingrate\",\"channels\",\"duration\",\"height\",\"width\"];function klt(t){return Zk(\"media:content\",t).map(e=\u003e{const{attribs:n}=e,o={medium:n.medium,isDefault:!!n.isDefault};for(const i of LNn)n[i]\u0026\u0026(o[i]=n[i]);for(const i of HNn)n[i]\u0026\u0026(o[i]=parseInt(n[i],10));return n.expression\u0026\u0026(o.expression=n.expression),o})}function goe(t,e){return Zk(t,e,!0,1)[0]}function DQ(t,e,n=!1){return loe(Zk(t,e,n,1)).trim()}function cx(t,e,n,o,i=!1){const r=DQ(n,o,i);r\u0026\u0026(t[e]=r)}function ONn(t){return t===\"rss\"||t===\"feed\"||t===\"rdf:RDF\"}const Flt=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return P5},append:xNn,appendChild:yNn,compareDocumentPosition:Tlt,existsOne:Nlt,filter:RV,find:Dlt,findAll:SNn,findOne:Zxe,findOneChild:bNn,getAttributeValue:pNn,getChildren:Plt,getElementById:PNn,getElements:wNn,getElementsByClassName:MNn,getElementsByTagName:Zk,getElementsByTagType:DNn,getFeed:TNn,getInnerHTML:dNn,getName:_Nn,getOuterHTML:wlt,getParent:Mlt,getSiblings:hNn,getText:coe,hasAttrib:mNn,hasChildren:J4,innerText:Xxe,isCDATA:$xe,isComment:Blt,isDocument:jDn,isTag:w5,isText:Xk,nextElementSibling:fNn,prepend:BNn,prependChild:ENn,prevElementSibling:INn,removeElement:NV,removeSubsets:NNn,replaceElement:CNn,testElement:vNn,textContent:loe,uniqueSort:RNn},Symbol.toStringTag,{value:\"Module\"}));var t3e,Llt;function GNn(){return Llt||(Llt=1,t3e={trueFunc:function(){return!0},falseFunc:function(){return!1}}),t3e}var YNn=GNn();const VA=_y(YNn);var ba;(function(t){t.Attribute=\"attribute\",t.Pseudo=\"pseudo\",t.PseudoElement=\"pseudo-element\",t.Tag=\"tag\",t.Universal=\"universal\",t.Adjacent=\"adjacent\",t.Child=\"child\",t.Descendant=\"descendant\",t.Parent=\"parent\",t.Sibling=\"sibling\",t.ColumnCombinator=\"column-combinator\"})(ba||(ba={}));var U_;(function(t){t.Any=\"any\",t.Element=\"element\",t.End=\"end\",t.Equals=\"equals\",t.Exists=\"exists\",t.Hyphen=\"hyphen\",t.Not=\"not\",t.Start=\"start\"})(U_||(U_={}));const Hlt=/^[^\\\\#]?(?:\\\\(?:[\\da-f]{1,6}\\s?|.)|[\\w\\-\\u00b0-\\uFFFF])+/,UNn=/\\\\([\\da-f]{1,6}\\s?|(\\s)|.)/gi,KNn=new Map([[126,U_.Element],[94,U_.Start],[36,U_.End],[42,U_.Any],[33,U_.Not],[124,U_.Hyphen]]),VNn=new Set([\"has\",\"not\",\"matches\",\"is\",\"where\",\"host\",\"host-context\"]);function zNn(t){switch(t.type){case ba.Adjacent:case ba.Child:case ba.Descendant:case ba.Parent:case ba.Sibling:case ba.ColumnCombinator:return!0;default:return!1}}const JNn=new Set([\"contains\",\"icontains\"]);function WNn(t,e,n){const o=parseInt(e,16)-65536;return o!==o||n?e:o\u003c0?String.fromCharCode(o+65536):String.fromCharCode(o\u003e\u003e10|55296,o\u00261023|56320)}function TV(t){return t.replace(UNn,WNn)}function n3e(t){return t===39||t===34}function Olt(t){return t===32||t===9||t===10||t===12||t===13}function Glt(t){const e=[],n=Ylt(e,`${t}`,0);if(n\u003ct.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function Ylt(t,e,n){let o=[];function i(g){const h=e.slice(n+g).match(Hlt);if(!h)throw new Error(`Expected name, found ${e.slice(n)}`);const[d]=h;return n+=g+d.length,TV(d)}function r(g){for(n+=g;n\u003ce.length\u0026\u0026Olt(e.charCodeAt(n));)n++}function s(){n+=1;const g=n;let h=1;for(;h\u003e0\u0026\u0026n\u003ce.length;n++)e.charCodeAt(n)===40\u0026\u0026!a(n)?h++:e.charCodeAt(n)===41\u0026\u0026!a(n)\u0026\u0026h--;if(h)throw new Error(\"Parenthesis not matched\");return TV(e.slice(g,n-1))}function a(g){let h=0;for(;e.charCodeAt(--g)===92;)h++;return(h\u00261)===1}function A(){if(o.length\u003e0\u0026\u0026zNn(o[o.length-1]))throw new Error(\"Did not expect successive traversals.\")}function c(g){if(o.length\u003e0\u0026\u0026o[o.length-1].type===ba.Descendant){o[o.length-1].type=g;return}A(),o.push({type:g})}function l(g,h){o.push({type:ba.Attribute,name:g,action:h,value:i(1),namespace:null,ignoreCase:\"quirks\"})}function u(){if(o.length\u0026\u0026o[o.length-1].type===ba.Descendant\u0026\u0026o.pop(),o.length===0)throw new Error(\"Empty sub-selector\");t.push(o)}if(r(0),e.length===n)return n;e:for(;n\u003ce.length;){const g=e.charCodeAt(n);switch(g){case 32:case 9:case 10:case 12:case 13:{(o.length===0||o[0].type!==ba.Descendant)\u0026\u0026(A(),o.push({type:ba.Descendant})),r(1);break}case 62:{c(ba.Child),r(1);break}case 60:{c(ba.Parent),r(1);break}case 126:{c(ba.Sibling),r(1);break}case 43:{c(ba.Adjacent),r(1);break}case 46:{l(\"class\",U_.Element);break}case 35:{l(\"id\",U_.Equals);break}case 91:{r(1);let h,d=null;e.charCodeAt(n)===124?h=i(1):e.startsWith(\"*|\",n)?(d=\"*\",h=i(2)):(h=i(0),e.charCodeAt(n)===124\u0026\u0026e.charCodeAt(n+1)!==61\u0026\u0026(d=h,h=i(1))),r(0);let p=U_.Exists;const m=KNn.get(e.charCodeAt(n));if(m){if(p=m,e.charCodeAt(n+1)!==61)throw new Error(\"Expected `=`\");r(2)}else e.charCodeAt(n)===61\u0026\u0026(p=U_.Equals,r(1));let _=\"\",f=null;if(p!==\"exists\"){if(n3e(e.charCodeAt(n))){const y=e.charCodeAt(n);let x=n+1;for(;x\u003ce.length\u0026\u0026(e.charCodeAt(x)!==y||a(x));)x+=1;if(e.charCodeAt(x)!==y)throw new Error(\"Attribute value didn't end\");_=TV(e.slice(n+1,x)),n=x+1}else{const y=n;for(;n\u003ce.length\u0026\u0026(!Olt(e.charCodeAt(n))\u0026\u0026e.charCodeAt(n)!==93||a(n));)n+=1;_=TV(e.slice(y,n))}r(0);const C=e.charCodeAt(n)|32;C===115?(f=!1,r(1)):C===105\u0026\u0026(f=!0,r(1))}if(e.charCodeAt(n)!==93)throw new Error(\"Attribute selector didn't terminate\");n+=1;const I={type:ba.Attribute,name:h,action:p,value:_,namespace:d,ignoreCase:f};o.push(I);break}case 58:{if(e.charCodeAt(n+1)===58){o.push({type:ba.PseudoElement,name:i(2).toLowerCase(),data:e.charCodeAt(n)===40?s():null});continue}const h=i(1).toLowerCase();let d=null;if(e.charCodeAt(n)===40)if(VNn.has(h)){if(n3e(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${h} cannot be quoted`);if(d=[],n=Ylt(d,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${h} (${e})`);n+=1}else{if(d=s(),JNn.has(h)){const p=d.charCodeAt(0);p===d.charCodeAt(d.length-1)\u0026\u0026n3e(p)\u0026\u0026(d=d.slice(1,-1))}d=TV(d)}o.push({type:ba.Pseudo,name:h,data:d});break}case 44:{u(),o=[],r(1);break}default:{if(e.startsWith(\"/*\",n)){const p=e.indexOf(\"*/\",n+2);if(p\u003c0)throw new Error(\"Comment was not terminated\");n=p+2,o.length===0\u0026\u0026r(0);break}let h=null,d;if(g===42)n+=1,d=\"*\";else if(g===124){if(d=\"\",e.charCodeAt(n+1)===124){c(ba.ColumnCombinator),r(2);break}}else if(Hlt.test(e.slice(n)))d=i(0);else break e;e.charCodeAt(n)===124\u0026\u0026e.charCodeAt(n+1)!==124\u0026\u0026(h=d,e.charCodeAt(n+1)===42?(d=\"*\",n+=2):d=i(1)),o.push(d===\"*\"?{type:ba.Universal,namespace:h}:{type:ba.Tag,name:d,namespace:h})}}}return u(),n}const Ult=new Map([[ba.Universal,50],[ba.Tag,30],[ba.Attribute,1],[ba.Pseudo,0]]);function o3e(t){return!Ult.has(t.type)}const jNn=new Map([[U_.Exists,10],[U_.Equals,8],[U_.Not,7],[U_.Start,6],[U_.End,6],[U_.Any,5]]);function $Nn(t){const e=t.map(Klt);for(let n=1;n\u003ct.length;n++){const o=e[n];if(!(o\u003c0))for(let i=n-1;i\u003e=0\u0026\u0026o\u003ce[i];i--){const r=t[i+1];t[i+1]=t[i],t[i]=r,e[i+1]=e[i],e[i]=o}}}function Klt(t){var e,n;let o=(e=Ult.get(t.type))!==null\u0026\u0026e!==void 0?e:-1;return t.type===ba.Attribute?(o=(n=jNn.get(t.action))!==null\u0026\u0026n!==void 0?n:4,t.action===U_.Equals\u0026\u0026t.name===\"id\"\u0026\u0026(o=9),t.ignoreCase\u0026\u0026(o\u003e\u003e=1)):t.type===ba.Pseudo\u0026\u0026(t.data?t.name===\"has\"||t.name===\"contains\"?o=0:Array.isArray(t.data)?(o=Math.min(...t.data.map(i=\u003eMath.min(...i.map(Klt)))),o\u003c0\u0026\u0026(o=0)):o=2:o=3),o}const qNn=/[-[\\]{}()*+?.,\\\\^$|#\\s]/g;function Vlt(t){return t.replace(qNn,\"\\\\$\u0026\")}const XNn=new Set([\"accept\",\"accept-charset\",\"align\",\"alink\",\"axis\",\"bgcolor\",\"charset\",\"checked\",\"clear\",\"codetype\",\"color\",\"compact\",\"declare\",\"defer\",\"dir\",\"direction\",\"disabled\",\"enctype\",\"face\",\"frame\",\"hreflang\",\"http-equiv\",\"lang\",\"language\",\"link\",\"media\",\"method\",\"multiple\",\"nohref\",\"noresize\",\"noshade\",\"nowrap\",\"readonly\",\"rel\",\"rev\",\"rules\",\"scope\",\"scrolling\",\"selected\",\"shape\",\"target\",\"text\",\"type\",\"valign\",\"valuetype\",\"vlink\"]);function lD(t,e){return typeof t.ignoreCase==\"boolean\"?t.ignoreCase:t.ignoreCase===\"quirks\"?!!e.quirksMode:!e.xmlMode\u0026\u0026XNn.has(t.name)}const ZNn={equals(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;return lD(e,n)?(r=r.toLowerCase(),s=\u003e{const a=o.getAttributeValue(s,i);return a!=null\u0026\u0026a.length===r.length\u0026\u0026a.toLowerCase()===r\u0026\u0026t(s)}):s=\u003eo.getAttributeValue(s,i)===r\u0026\u0026t(s)},hyphen(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;const s=r.length;return lD(e,n)?(r=r.toLowerCase(),function(A){const c=o.getAttributeValue(A,i);return c!=null\u0026\u0026(c.length===s||c.charAt(s)===\"-\")\u0026\u0026c.substr(0,s).toLowerCase()===r\u0026\u0026t(A)}):function(A){const c=o.getAttributeValue(A,i);return c!=null\u0026\u0026(c.length===s||c.charAt(s)===\"-\")\u0026\u0026c.substr(0,s)===r\u0026\u0026t(A)}},element(t,e,n){const{adapter:o}=n,{name:i,value:r}=e;if(/\\s/.test(r))return VA.falseFunc;const s=new RegExp(`(?:^|\\\\s)${Vlt(r)}(?:$|\\\\s)`,lD(e,n)?\"i\":\"\");return function(A){const c=o.getAttributeValue(A,i);return c!=null\u0026\u0026c.length\u003e=r.length\u0026\u0026s.test(c)\u0026\u0026t(A)}},exists(t,{name:e},{adapter:n}){return o=\u003en.hasAttrib(o,e)\u0026\u0026t(o)},start(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;const s=r.length;return s===0?VA.falseFunc:lD(e,n)?(r=r.toLowerCase(),a=\u003e{const A=o.getAttributeValue(a,i);return A!=null\u0026\u0026A.length\u003e=s\u0026\u0026A.substr(0,s).toLowerCase()===r\u0026\u0026t(a)}):a=\u003e{var A;return!!(!((A=o.getAttributeValue(a,i))===null||A===void 0)\u0026\u0026A.startsWith(r))\u0026\u0026t(a)}},end(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;const s=-r.length;return s===0?VA.falseFunc:lD(e,n)?(r=r.toLowerCase(),a=\u003e{var A;return((A=o.getAttributeValue(a,i))===null||A===void 0?void 0:A.substr(s).toLowerCase())===r\u0026\u0026t(a)}):a=\u003e{var A;return!!(!((A=o.getAttributeValue(a,i))===null||A===void 0)\u0026\u0026A.endsWith(r))\u0026\u0026t(a)}},any(t,e,n){const{adapter:o}=n,{name:i,value:r}=e;if(r===\"\")return VA.falseFunc;if(lD(e,n)){const s=new RegExp(Vlt(r),\"i\");return function(A){const c=o.getAttributeValue(A,i);return c!=null\u0026\u0026c.length\u003e=r.length\u0026\u0026s.test(c)\u0026\u0026t(A)}}return s=\u003e{var a;return!!(!((a=o.getAttributeValue(s,i))===null||a===void 0)\u0026\u0026a.includes(r))\u0026\u0026t(s)}},not(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;return r===\"\"?s=\u003e!!o.getAttributeValue(s,i)\u0026\u0026t(s):lD(e,n)?(r=r.toLowerCase(),s=\u003e{const a=o.getAttributeValue(s,i);return(a==null||a.length!==r.length||a.toLowerCase()!==r)\u0026\u0026t(s)}):s=\u003eo.getAttributeValue(s,i)!==r\u0026\u0026t(s)}},eRn=new Set([9,10,12,13,32]),zlt=48,tRn=57;function nRn(t){if(t=t.trim().toLowerCase(),t===\"even\")return[2,0];if(t===\"odd\")return[2,1];let e=0,n=0,o=r(),i=s();if(e\u003ct.length\u0026\u0026t.charAt(e)===\"n\"\u0026\u0026(e++,n=o*(i??1),a(),e\u003ct.length?(o=r(),a(),i=s()):o=i=0),i===null||e\u003ct.length)throw new Error(`n-th rule couldn't be parsed ('${t}')`);return[n,o*i];function r(){return t.charAt(e)===\"-\"?(e++,-1):(t.charAt(e)===\"+\"\u0026\u0026e++,1)}function s(){const A=e;let c=0;for(;e\u003ct.length\u0026\u0026t.charCodeAt(e)\u003e=zlt\u0026\u0026t.charCodeAt(e)\u003c=tRn;)c=c*10+(t.charCodeAt(e)-zlt),e++;return e===A?null:c}function a(){for(;e\u003ct.length\u0026\u0026eRn.has(t.charCodeAt(e));)e++}}function oRn(t){const e=t[0],n=t[1]-1;if(n\u003c0\u0026\u0026e\u003c=0)return VA.falseFunc;if(e===-1)return r=\u003er\u003c=n;if(e===0)return r=\u003er===n;if(e===1)return n\u003c0?VA.trueFunc:r=\u003er\u003e=n;const o=Math.abs(e),i=(n%o+o)%o;return e\u003e1?r=\u003er\u003e=n\u0026\u0026r%o===i:r=\u003er\u003c=n\u0026\u0026r%o===i}function doe(t){return oRn(nRn(t))}function hoe(t,e){return n=\u003e{const o=e.getParent(n);return o!=null\u0026\u0026e.isTag(o)\u0026\u0026t(n)}}const i3e={contains(t,e,{adapter:n}){return function(i){return t(i)\u0026\u0026n.getText(i).includes(e)}},icontains(t,e,{adapter:n}){const o=e.toLowerCase();return function(r){return t(r)\u0026\u0026n.getText(r).toLowerCase().includes(o)}},\"nth-child\"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=0;c\u003ca.length\u0026\u0026!o(s,a[c]);c++)n.isTag(a[c])\u0026\u0026A++;return i(A)\u0026\u0026t(s)}},\"nth-last-child\"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=a.length-1;c\u003e=0\u0026\u0026!o(s,a[c]);c--)n.isTag(a[c])\u0026\u0026A++;return i(A)\u0026\u0026t(s)}},\"nth-of-type\"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=0;c\u003ca.length;c++){const l=a[c];if(o(s,l))break;n.isTag(l)\u0026\u0026n.getName(l)===n.getName(s)\u0026\u0026A++}return i(A)\u0026\u0026t(s)}},\"nth-last-of-type\"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=a.length-1;c\u003e=0;c--){const l=a[c];if(o(s,l))break;n.isTag(l)\u0026\u0026n.getName(l)===n.getName(s)\u0026\u0026A++}return i(A)\u0026\u0026t(s)}},root(t,e,{adapter:n}){return o=\u003e{const i=n.getParent(o);return(i==null||!n.isTag(i))\u0026\u0026t(o)}},scope(t,e,n,o){const{equals:i}=n;return!o||o.length===0?i3e.root(t,e,n):o.length===1?r=\u003ei(o[0],r)\u0026\u0026t(r):r=\u003eo.includes(r)\u0026\u0026t(r)},hover:r3e(\"isHovered\"),visited:r3e(\"isVisited\"),active:r3e(\"isActive\")};function r3e(t){return function(n,o,{adapter:i}){const r=i[t];return typeof r!=\"function\"?VA.falseFunc:function(a){return r(a)\u0026\u0026n(a)}}}const Jlt={empty(t,{adapter:e}){return!e.getChildren(t).some(n=\u003ee.isTag(n)||e.getText(n)!==\"\")},\"first-child\"(t,{adapter:e,equals:n}){if(e.prevElementSibling)return e.prevElementSibling(t)==null;const o=e.getSiblings(t).find(i=\u003ee.isTag(i));return o!=null\u0026\u0026n(t,o)},\"last-child\"(t,{adapter:e,equals:n}){const o=e.getSiblings(t);for(let i=o.length-1;i\u003e=0;i--){if(n(t,o[i]))return!0;if(e.isTag(o[i]))break}return!1},\"first-of-type\"(t,{adapter:e,equals:n}){const o=e.getSiblings(t),i=e.getName(t);for(let r=0;r\u003co.length;r++){const s=o[r];if(n(t,s))return!0;if(e.isTag(s)\u0026\u0026e.getName(s)===i)break}return!1},\"last-of-type\"(t,{adapter:e,equals:n}){const o=e.getSiblings(t),i=e.getName(t);for(let r=o.length-1;r\u003e=0;r--){const s=o[r];if(n(t,s))return!0;if(e.isTag(s)\u0026\u0026e.getName(s)===i)break}return!1},\"only-of-type\"(t,{adapter:e,equals:n}){const o=e.getName(t);return e.getSiblings(t).every(i=\u003en(t,i)||!e.isTag(i)||e.getName(i)!==o)},\"only-child\"(t,{adapter:e,equals:n}){return e.getSiblings(t).every(o=\u003en(t,o)||!e.isTag(o))}};function Wlt(t,e,n,o){if(n===null){if(t.length\u003eo)throw new Error(`Pseudo-class :${e} requires an argument`)}else if(t.length===o)throw new Error(`Pseudo-class :${e} doesn't have any arguments`)}const iRn={\"any-link\":\":is(a, area, link)[href]\",link:\":any-link:not(:visited)\",disabled:`:is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] \u003e option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )`,enabled:\":not(:disabled)\",checked:\":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)\",required:\":is(input, select, textarea)[required]\",optional:\":is(input, select, textarea):not([required])\",selected:\"option:is([selected], select:not([multiple]):not(:has(\u003e option[selected])) \u003e :first-of-type)\",checkbox:\"[type=checkbox]\",file:\"[type=file]\",password:\"[type=password]\",radio:\"[type=radio]\",reset:\"[type=reset]\",image:\"[type=image]\",submit:\"[type=submit]\",parent:\":not(:empty)\",header:\":is(h1, h2, h3, h4, h5, h6)\",button:\":is(button, input[type=button])\",input:\":is(input, textarea, select, button)\",text:\"input:is(:not([type!='']), [type=text])\"},jlt={};function rRn(t,e){return t===VA.falseFunc?VA.falseFunc:n=\u003ee.isTag(n)\u0026\u0026t(n)}function $lt(t,e){const n=e.getSiblings(t);if(n.length\u003c=1)return[];const o=n.indexOf(t);return o\u003c0||o===n.length-1?[]:n.slice(o+1).filter(e.isTag)}function s3e(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}const a3e=(t,e,n,o,i)=\u003e{const r=i(e,s3e(n),o);return r===VA.trueFunc?t:r===VA.falseFunc?VA.falseFunc:s=\u003er(s)\u0026\u0026t(s)},A3e={is:a3e,matches:a3e,where:a3e,not(t,e,n,o,i){const r=i(e,s3e(n),o);return r===VA.falseFunc?t:r===VA.trueFunc?VA.falseFunc:s=\u003e!r(s)\u0026\u0026t(s)},has(t,e,n,o,i){const{adapter:r}=n,s=s3e(n);s.relativeSelector=!0;const a=e.some(l=\u003el.some(o3e))?[jlt]:void 0,A=i(e,s,a);if(A===VA.falseFunc)return VA.falseFunc;const c=rRn(A,r);if(a\u0026\u0026A!==VA.trueFunc){const{shouldTestNextSiblings:l=!1}=A;return u=\u003e{if(!t(u))return!1;a[0]=u;const g=r.getChildren(u),h=l?[...g,...$lt(u,r)]:g;return r.existsOne(c,h)}}return l=\u003et(l)\u0026\u0026r.existsOne(c,r.getChildren(l))}};function sRn(t,e,n,o,i){var r;const{name:s,data:a}=e;if(Array.isArray(a)){if(!(s in A3e))throw new Error(`Unknown pseudo-class :${s}(${a})`);return A3e[s](t,a,n,o,i)}const A=(r=n.pseudos)===null||r===void 0?void 0:r[s],c=typeof A==\"string\"?A:iRn[s];if(typeof c==\"string\"){if(a!=null)throw new Error(`Pseudo ${s} doesn't have any arguments`);const l=Glt(c);return A3e.is(t,l,n,o,i)}if(typeof A==\"function\")return Wlt(A,s,a,1),l=\u003eA(l,a)\u0026\u0026t(l);if(s in i3e)return i3e[s](t,a,n,o);if(s in Jlt){const l=Jlt[s];return Wlt(l,s,a,2),u=\u003el(u,n,a)\u0026\u0026t(u)}throw new Error(`Unknown pseudo-class :${s}`)}function c3e(t,e){const n=e.getParent(t);return n\u0026\u0026e.isTag(n)?n:null}function aRn(t,e,n,o,i){const{adapter:r,equals:s}=n;switch(e.type){case ba.PseudoElement:throw new Error(\"Pseudo-elements are not supported by css-select\");case ba.ColumnCombinator:throw new Error(\"Column combinators are not yet supported by css-select\");case ba.Attribute:{if(e.namespace!=null)throw new Error(\"Namespaced attributes are not yet supported by css-select\");return(!n.xmlMode||n.lowerCaseAttributeNames)\u0026\u0026(e.name=e.name.toLowerCase()),ZNn[e.action](t,e,n)}case ba.Pseudo:return sRn(t,e,n,o,i);case ba.Tag:{if(e.namespace!=null)throw new Error(\"Namespaced tag names are not yet supported by css-select\");let{name:a}=e;return(!n.xmlMode||n.lowerCaseTags)\u0026\u0026(a=a.toLowerCase()),function(c){return r.getName(c)===a\u0026\u0026t(c)}}case ba.Descendant:{if(n.cacheResults===!1||typeof WeakSet\u003e\"u\")return function(c){let l=c;for(;l=c3e(l,r);)if(t(l))return!0;return!1};const a=new WeakSet;return function(c){let l=c;for(;l=c3e(l,r);)if(!a.has(l)){if(r.isTag(l)\u0026\u0026t(l))return!0;a.add(l)}return!1}}case\"_flexibleDescendant\":return function(A){let c=A;do if(t(c))return!0;while(c=c3e(c,r));return!1};case ba.Parent:return function(A){return r.getChildren(A).some(c=\u003er.isTag(c)\u0026\u0026t(c))};case ba.Child:return function(A){const c=r.getParent(A);return c!=null\u0026\u0026r.isTag(c)\u0026\u0026t(c)};case ba.Sibling:return function(A){const c=r.getSiblings(A);for(let l=0;l\u003cc.length;l++){const u=c[l];if(s(A,u))break;if(r.isTag(u)\u0026\u0026t(u))return!0}return!1};case ba.Adjacent:return r.prevElementSibling?function(A){const c=r.prevElementSibling(A);return c!=null\u0026\u0026t(c)}:function(A){const c=r.getSiblings(A);let l;for(let u=0;u\u003cc.length;u++){const g=c[u];if(s(A,g))break;r.isTag(g)\u0026\u0026(l=g)}return!!l\u0026\u0026t(l)};case ba.Universal:{if(e.namespace!=null\u0026\u0026e.namespace!==\"*\")throw new Error(\"Namespaced universal selectors are not yet supported by css-select\");return t}}}function ARn(t,e,n){const o=typeof t==\"string\"?Glt(t):t;return Xlt(o,e,n)}function qlt(t){return t.type===ba.Pseudo\u0026\u0026(t.name===\"scope\"||Array.isArray(t.data)\u0026\u0026t.data.some(e=\u003ee.some(qlt)))}const cRn={type:ba.Descendant},lRn={type:\"_flexibleDescendant\"},uRn={type:ba.Pseudo,name:\"scope\",data:null};function gRn(t,{adapter:e},n){const o=!!n?.every(i=\u003e{const r=e.isTag(i)\u0026\u0026e.getParent(i);return i===jlt||r\u0026\u0026e.isTag(r)});for(const i of t){if(!(i.length\u003e0\u0026\u0026o3e(i[0])\u0026\u0026i[0].type!==ba.Descendant))if(o\u0026\u0026!i.some(qlt))i.unshift(cRn);else continue;i.unshift(uRn)}}function Xlt(t,e,n){var o;t.forEach($Nn),n=(o=e.context)!==null\u0026\u0026o!==void 0?o:n;const i=Array.isArray(n),r=n\u0026\u0026(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)gRn(t,e,r);else if(t.some(A=\u003eA.length\u003e0\u0026\u0026o3e(A[0])))throw new Error(\"Relative selectors are not allowed when the `relativeSelector` option is disabled\");let s=!1;const a=t.map(A=\u003e{if(A.length\u003e=2){const[c,l]=A;c.type!==ba.Pseudo||c.name!==\"scope\"||(i\u0026\u0026l.type===ba.Descendant?A[1]=lRn:(l.type===ba.Adjacent||l.type===ba.Sibling)\u0026\u0026(s=!0))}return dRn(A,e,r)}).reduce(hRn,VA.falseFunc);return a.shouldTestNextSiblings=s,a}function dRn(t,e,n){var o;return t.reduce((i,r)=\u003ei===VA.falseFunc?VA.falseFunc:aRn(i,r,e,n,Xlt),(o=e.rootFunc)!==null\u0026\u0026o!==void 0?o:VA.trueFunc)}function hRn(t,e){return e===VA.falseFunc||t===VA.trueFunc?t:t===VA.falseFunc||e===VA.trueFunc?e:function(o){return t(o)||e(o)}}const Zlt=(t,e)=\u003et===e,pRn={adapter:Flt,equals:Zlt};function mRn(t){var e,n,o,i;const r=t??pRn;return(e=r.adapter)!==null\u0026\u0026e!==void 0||(r.adapter=Flt),(n=r.equals)!==null\u0026\u0026n!==void 0||(r.equals=(i=(o=r.adapter)===null||o===void 0?void 0:o.equals)!==null\u0026\u0026i!==void 0?i:Zlt),r}function e0t(t){return function(n,o,i){const r=mRn(i);typeof n!=\"function\"\u0026\u0026(n=ARn(n,r,o));const s=_Rn(o,r.adapter,n.shouldTestNextSiblings);return t(n,s,r)}}function _Rn(t,e,n=!1){return n\u0026\u0026(t=fRn(t,e)),Array.isArray(t)?e.removeSubsets(t):e.getChildren(t)}function fRn(t,e){const n=Array.isArray(t)?t.slice(0):[t],o=n.length;for(let i=0;i\u003co;i++){const r=$lt(n[i],e);n.push(...r)}return n}const t0t=e0t((t,e,n)=\u003et===VA.falseFunc||!e||e.length===0?[]:n.adapter.findAll(t,e)),poe=e0t((t,e,n)=\u003et===VA.falseFunc||!e||e.length===0?null:n.adapter.findOne(t,e));function ts(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function IRn(t,e){return e.map(n=\u003ets(t,n))}function hC(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function CRn(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function kV(t){return typeof t\u003e\"u\"}function M0(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function moe(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return moe(r,...i)}}}function D0(...t){return moe(...t)}const{cos:yRn,sin:xRn,PI:ERn}=Math;function W4(t,e,n){const o=yRn(t),i=xRn(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return kV(e)||kV(n)?r:moe([M0(e,n),r,M0(-e,-n)])}function l3e(t,e=void 0,n=void 0){return W4(t*ERn/180,e,n)}function FV(t,e=void 0,n=void 0,o=void 0){kV(e)\u0026\u0026(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return kV(n)||kV(o)?i:moe([M0(n,o),i,M0(-n,-o)])}function BRn(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function _oe(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(i,_oe.prototype),i.expected=e,i.found=n,i.location=o,i.name=\"SyntaxError\",i}BRn(_oe,Error);function u3e(t,e,n){return n=n||\" \",t.length\u003ee?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}_oe.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var n=null,o;for(o=0;o\u003ct.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\\r\\n|\\n|\\r/g);break}var i=this.location.start,r=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(i):i,s=this.location.source+\":\"+r.line+\":\"+r.column;if(n){var a=this.location.end,A=u3e(\"\",r.line.toString().length,\" \"),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`\n --\u003e `+s+`\n`+A+` |\n`+r.line+\" | \"+c+`\n`+A+\" | \"+u3e(\"\",i.column-1,\" \")+u3e(\"\",u,\"^\")}else e+=`\n at `+s}return e},_oe.buildMessage=function(t,e){var n={literal:function(c){return'\"'+i(c.text)+'\"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+\"-\"+r(u[1]):r(u)});return\"[\"+(c.inverted?\"^\":\"\")+l.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function r(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length\u003e0){for(u=1,g=1;u\u003cl.length;u++)l[u-1]!==l[u]\u0026\u0026(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+\" or \"+l[1];default:return l.slice(0,-1).join(\", \")+\", or \"+l[l.length-1]}}function A(c){return c?'\"'+i(c)+'\"':\"end of input\"}return\"Expected \"+a(t)+\" but \"+A(e)+\" found.\"};function O9(t,e=!1,n=!1){e?n?t=D0(t,FV(-1,-1)):t=D0(t,FV(1,-1)):n\u0026\u0026(t=D0(t,FV(-1,1)));const o=t.a,i=t.b,r=t.c,s=t.d;let a,A,c;if(o!==0||r!==0){const l=Math.hypot(o,r);a=l,A=(o*s-i*r)/l;const u=Math.acos(o/l);c=r\u003e0?-u:u}else if(i!==0||s!==0){const l=Math.hypot(i,s);a=(o*s-i*r)/l,A=l;const u=Math.acos(i/l);c=Math.PI/2+(s\u003e0?-u:u)}else a=0,A=0,c=0;return n\u0026\u0026(a=-a),e\u0026\u0026(A=-A),{translate:{tx:t.e,ty:t.f},scale:{sx:a,sy:A},rotation:{angle:c}}}function g3e(){return{a:-1,c:0,e:0,b:0,d:1,f:0}}function U3(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function n0t(t){return typeof t\u003e\"u\"}function o0t(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function foe(...t){t=Array.isArray(t[0])?t[0]:t;let e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[n,o,...i]=t,r=e(n,o);return foe(r,...i)}}}var{cos:bRn,sin:SRn}=Math;function QRn(t,e,n){let o=bRn(t),i=SRn(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return n0t(e)||n0t(n)?r:foe([o0t(e,n),r,o0t(-e,-n)])}function vRn(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Ioe(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(i,Ioe.prototype),i.expected=e,i.found=n,i.location=o,i.name=\"SyntaxError\",i}vRn(Ioe,Error);function d3e(t,e,n){return n=n||\" \",t.length\u003ee?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Ioe.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var n=null,o;for(o=0;o\u003ct.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\\r\\n|\\n|\\r/g);break}var i=this.location.start,r=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(i):i,s=this.location.source+\":\"+r.line+\":\"+r.column;if(n){var a=this.location.end,A=d3e(\"\",r.line.toString().length,\" \"),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`\n --\u003e `+s+`\n`+A+` |\n`+r.line+\" | \"+c+`\n`+A+\" | \"+d3e(\"\",i.column-1,\" \")+d3e(\"\",u,\"^\")}else e+=`\n at `+s}return e},Ioe.buildMessage=function(t,e){var n={literal:function(c){return'\"'+i(c.text)+'\"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+\"-\"+r(u[1]):r(u)});return\"[\"+(c.inverted?\"^\":\"\")+l.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function r(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length\u003e0){for(u=1,g=1;u\u003cl.length;u++)l[u-1]!==l[u]\u0026\u0026(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+\" or \"+l[1];default:return l.slice(0,-1).join(\", \")+\", or \"+l[l.length-1]}}function A(c){return c?'\"'+i(c)+'\"':\"end of input\"}return\"Expected \"+a(t)+\" but \"+A(e)+\" found.\"};function h3e(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,i=-1/0,r=s=\u003e{e=Math.min(e,s.x),n=Math.max(n,s.x),o=Math.min(o,s.y),i=Math.max(i,s.y)};return t.forEach(s=\u003e{switch(s.type){case\"path\":s.points.forEach(r);break;case\"text\":r({x:s.x,y:s.y});break;case\"circle\":{let{x:a,y:A,radius:c}=s;r({x:a-c,y:A-c}),r({x:a+c,y:A+c});break}case\"box\":{let{x:a,y:A,width:c,height:l}=s,u=c/2,g=l/2;r({x:a-u,y:A-g}),r({x:a+u,y:A+g});break}}}),{minX:e,maxX:n,minY:o,maxY:i}}var wRn=(t,e=\"right\")=\u003e{switch(e){case\"down\":switch(t){case\"middle_top\":return\"middle_right\";case\"middle_bottom\":return\"middle_left\";case\"middle_left\":return\"middle_bottom\";case\"middle_right\":return\"middle_top\"}break;case\"up\":switch(t){case\"middle_top\":return\"middle_left\";case\"middle_bottom\":return\"middle_right\";case\"middle_left\":return\"middle_top\";case\"middle_right\":return\"middle_bottom\"}break;case\"left\":switch(t){case\"middle_top\":return\"middle_bottom\";case\"middle_bottom\":return\"middle_top\";case\"middle_left\":return\"middle_right\";case\"middle_right\":return\"middle_left\"}break;case\"right\":return t}return t},eF=(t,e)=\u003e{let{primitives:n,center:o,ports:i,size:r}=t,s=foe({a:1,b:0,c:0,d:-1,e:0,f:2*o.y}),a=n.map(c=\u003e{switch(c={...c},c.type){case\"path\":return{...c,points:c.points.map(h=\u003eU3(s,h))};case\"text\":let l=U3(s,{x:c.x,y:c.y}),u={top_left:\"bottom_left\",top_right:\"bottom_right\",bottom_left:\"top_left\",bottom_right:\"top_right\",center:\"center\",middle_top:\"middle_bottom\",middle_bottom:\"middle_top\",middle_left:\"middle_left\",middle_right:\"middle_right\"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case\"circle\":case\"box\":let g=U3(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=\u003e({...c,...U3(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},tF=(t,e)=\u003e{let{primitives:n,center:o,ports:i,size:r}=t,s=foe({a:-1,b:0,c:0,d:1,e:0,f:2*o.x}),a=n.map(c=\u003e{switch(c={...c},c.type){case\"path\":return{...c,points:c.points.map(h=\u003eU3(s,h))};case\"text\":let l=U3(s,{x:c.x,y:c.y}),u={top_left:\"top_right\",top_right:\"top_left\",bottom_left:\"bottom_right\",bottom_right:\"bottom_left\",center:\"center\",middle_top:\"middle_top\",middle_bottom:\"middle_bottom\",middle_left:\"middle_right\",middle_right:\"middle_left\"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case\"circle\":case\"box\":let g=U3(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=\u003e({...c,...U3(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},LV=(t,e)=\u003e{let{newOrientation:n,overrides:o}=e,i={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},r=QRn(n?i[n]:Math.PI/2,t.center.x,t.center.y),{primitives:s,center:a,size:A,ports:c}=t,l=s.map(h=\u003e{switch(h={...h},h.type){case\"path\":return{...h,points:h.points.map(_=\u003eU3(r,_))};case\"text\":let d=U3(r,{x:h.x,y:h.y});return h.anchor=wRn(h.anchor,n??\"right\"),{...h,x:d.x,y:d.y};case\"circle\":let p=U3(r,{x:h.x,y:h.y});return{...h,x:p.x,y:p.y};case\"box\":let m=U3(r,{x:h.x,y:h.y});return{...h,x:m.x,y:m.y,width:h.height,height:h.width}}}),u=c.map(h=\u003e({...h,...U3(r,h)})),g=h3e(l);return{primitives:l,center:a,ports:u,size:{width:g.maxX-g.minX,height:g.maxY-g.minY},...o}},ii=(t,e=\"down\",n={})=\u003eLV(t,{newOrientation:e,overrides:n}),PRn=class{symbol;constructor(e){this.symbol=JSON.parse(JSON.stringify(e)),this.symbol.size=this.computeSize()}changeTextAnchor(e,n,o){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(i=\u003ei.type===\"text\"\u0026\u0026i.text===e?{...i,anchor:n,...o?{x:i.x+o.x,y:i.y+o.y}:{}}:i)},this}labelPort(e,n){return this.symbol={...this.symbol,ports:this.symbol.ports.map(o=\u003eo.labels.includes(e)?{...o,labels:n}:o)},this}rotateRightFacingSymbol(e){return this.symbol=LV(this.symbol,{newOrientation:e}),this}computeSize(){let e=h3e(this.symbol.primitives);return{width:e.maxX-e.minX,height:e.maxY-e.minY}}build(){return{...this.symbol,size:this.computeSize()}}},Vn=t=\u003e{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],n=t.ports??Object.entries(t.refblocks).flatMap(([i,r])=\u003e[{...r,labels:[i]}]),o=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return n.length===2\u0026\u0026(o={x:(n[0].x+n[1].x)/2,y:(n[0].y+n[1].y)/2}),new PRn({...t,primitives:e,ports:n,center:o})},nF={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:\"primary\",fill:!1},path17:{type:\"path\",points:[{x:0,y:-.13},{x:.07,y:-.11}],color:\"primary\",fill:!1},path18:{type:\"path\",points:[{x:.07,y:-.11},{x:.14,y:-.13}],color:\"primary\",fill:!1},path19:{type:\"path\",points:[{x:-.15,y:-.13},{x:-.07,y:-.11}],color:\"primary\",fill:!1},path20:{type:\"path\",points:[{x:-.07,y:-.11},{x:0,y:-.13}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:MRn,bounds:Coe,refblocks:i0t,circles:DRn}=nF,NRn=Vn({primitives:[...Object.values(MRn),...Object.values(DRn),{type:\"text\",text:\"{REF}\",x:-.15,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3894553499999995}],ports:[{...i0t.left1,labels:[\"1\"]},{...i0t.right1,labels:[\"2\"]}],size:{width:Coe.width,height:Coe.height},center:{x:Coe.centerX,y:Coe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:RRn,bounds:yoe,refblocks:r0t,circles:TRn}=nF,kRn=Vn({primitives:[...Object.values(RRn),...Object.values(TRn),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{...r0t.left1,labels:[\"1\"]},{...r0t.right1,labels:[\"2\"]}],size:{width:yoe.width,height:yoe.height},center:{x:yoe.centerX,y:yoe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:FRn,bounds:xoe,refblocks:s0t,circles:LRn}=nF,HRn=Vn({primitives:[...Object.values(FRn),...Object.values(LRn),{type:\"text\",text:\"{REF}\",x:-0,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.4094553499999995}],ports:[{...s0t.left1,labels:[\"1\"]},{...s0t.right1,labels:[\"2\"]}],size:{width:xoe.width,height:xoe.height},center:{x:xoe.centerX,y:xoe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:ORn,bounds:Eoe,refblocks:a0t,circles:GRn}=nF,YRn=Vn({primitives:[...Object.values(ORn),...Object.values(GRn),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{...a0t.left1,labels:[\"1\"]},{...a0t.right1,labels:[\"2\"]}],size:{width:Eoe.width,height:Eoe.height},center:{x:Eoe.centerX,y:Eoe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:URn,bounds:Boe,refblocks:A0t,circles:KRn}=nF,VRn=Vn({primitives:[...Object.values(URn),...Object.values(KRn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...A0t.left1,labels:[\"1\"]},{...A0t.right1,labels:[\"2\"]}],size:{width:Boe.width,height:Boe.height},center:{x:Boe.centerX,y:Boe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:zRn,bounds:boe,refblocks:c0t,circles:JRn}=nF,WRn=Vn({primitives:[...Object.values(zRn),...Object.values(JRn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...c0t.left1,labels:[\"1\"]},{...c0t.right1,labels:[\"2\"]}],size:{width:boe.width,height:boe.height},center:{x:boe.centerX,y:boe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),oF={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.14,y:.18},{x:.08,y:.2}],color:\"primary\",fill:!1},\"path43-8-3\":{type:\"path\",points:[{x:.21,y:-.11},{x:.15,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:jRn,texts:Fdr,bounds:Soe,refblocks:l0t,circles:$Rn}=oF,qRn=Vn({primitives:[...Object.values(jRn),...Object.values($Rn),{type:\"text\",text:\"{REF}\",x:-.15,y:.3294553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3294553499999995}],ports:[{...l0t.left1,labels:[\"1\"]},{...l0t.right1,labels:[\"2\"]}],size:{width:Soe.width,height:Soe.height},center:{x:Soe.centerX,y:Soe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),XRn=Vn(oF).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:ZRn,texts:Ldr,bounds:Qoe,refblocks:u0t,circles:eTn}=oF,tTn=Vn({primitives:[...Object.values(ZRn),...Object.values(eTn),{type:\"text\",text:\"{REF}\",x:-0,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.3294553499999995}],ports:[{...u0t.left1,labels:[\"1\"]},{...u0t.right1,labels:[\"2\"]}],size:{width:Qoe.width,height:Qoe.height},center:{x:Qoe.centerX,y:Qoe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),nTn=Vn(oF).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:oTn,texts:Hdr,bounds:voe,refblocks:g0t,circles:iTn}=oF,rTn=Vn({primitives:[...Object.values(oTn),...Object.values(iTn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2294553499999995}],ports:[{...g0t.left1,labels:[\"1\"]},{...g0t.right1,labels:[\"2\"]}],size:{width:voe.width,height:voe.height},center:{x:voe.centerX,y:voe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:sTn,texts:Odr,bounds:woe,refblocks:d0t,circles:aTn}=oF,ATn=Vn({primitives:[...Object.values(sTn),...Object.values(aTn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2294553499999995}],ports:[{...d0t.left1,labels:[\"1\"]},{...d0t.right1,labels:[\"2\"]}],size:{width:woe.width,height:woe.height},center:{x:woe.centerX,y:woe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),p3e={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:.14,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.18,y:.18},{x:.11,y:.18}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.18,y:-.09},{x:.11,y:-.09}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:cTn,bounds:Poe,refblocks:h0t,circles:lTn}=p3e,uTn=Vn({primitives:[...Object.values(cTn),...Object.values(lTn),{type:\"text\",text:\"{REF}\",x:-.16,y:.2294553499999995},{type:\"text\",text:\"{VAL}\",x:.16,y:.2294553499999995}],ports:[{...h0t.left1,labels:[\"1\"]},{...h0t.right1,labels:[\"2\"]}],size:{width:Poe.width,height:Poe.height},center:{x:Poe.centerX,y:Poe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:gTn,bounds:Moe,refblocks:p0t,circles:dTn}=p3e,m0t=Vn({primitives:[...Object.values(gTn),...Object.values(dTn),{type:\"text\",text:\"{REF}\",x:-1118e-7,y:-.18},{type:\"text\",text:\"{VAL}\",x:1118e-7,y:.2738453}],ports:[{...p0t.left1,labels:[\"1\"]},{...p0t.right1,labels:[\"2\"]}],size:{width:Moe.width,height:Moe.height},center:{x:Moe.centerX,y:Moe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\"]).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:hTn,bounds:Doe,refblocks:_0t,circles:pTn}=p3e,mTn=Vn({primitives:[...Object.values(hTn),...Object.values(pTn),{type:\"text\",text:\"{REF}\",x:-.0050250999999996715,y:.27384529999999985,anchor:\"middle_left\"},{type:\"text\",text:\"{VAL}\",x:-.00011179999999999524,y:-.27384530000000007,anchor:\"middle_left\"}],ports:[{..._0t.left1,labels:[\"1\"]},{..._0t.right1,labels:[\"2\"]}],size:{width:Doe.width,height:Doe.height},center:{x:Doe.centerX,y:Doe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"right1\",[\"2\"]).labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),m3e=ii(m0t,\"down\"),_3e=m3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),f3e=m3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");_3e.anchor=\"middle_left\",f3e.anchor=\"middle_left\",_3e.x=.25,_3e.y+=.21,f3e.y-=.21,f3e.x=.25;var _Tn=m3e,HV={paths:{path43:{type:\"path\",points:[{x:-.06,y:.19},{x:-.06,y:-.12}],color:\"primary\",fill:!1},\"path43-6\":{type:\"path\",points:[{x:.02,y:.13},{x:.02,y:-.06}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.06,y:.03},{x:-.45,y:.03}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.03},{x:.03,y:.03}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.03,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.28}},refblocks:{left1:{x:-.45,y:.03},right1:{x:.45,y:.03}},bounds:{width:.95,height:.29,centerX:0,centerY:.06},circles:{}},{paths:fTn,bounds:f0t,refblocks:I0t,circles:ITn}=HV,CTn=Vn({primitives:[...Object.values(fTn),...Object.values(ITn),{type:\"text\",text:\"{REF}\",x:-.2,y:.31},{type:\"text\",text:\"{VAL}\",x:.2,y:.31}],ports:[{...I0t.left1,labels:[\"1\"]},{...I0t.right1,labels:[\"2\"]}],center:{x:f0t.centerX,y:f0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_left\").build(),yTn={...CTn,size:{width:.95,height:.9}};function Nl(t){let e=t.size;if(!e){let n=h3e(t.primitives);e={width:n.maxX-n.minX,height:n.maxY-n.minY}}return{...t,size:e}}var{paths:xTn,texts:C0t,bounds:Noe,refblocks:y0t,circles:ETn}=HV,x0t=Nl({primitives:[...Object.values(xTn),...Object.values(ETn),{...C0t.top1,anchor:\"middle_bottom\"},{...C0t.bottom1,anchor:\"middle_top\"}],ports:[{...y0t.left1,labels:[\"1\"]},{...y0t.right1,labels:[\"2\"]}],size:{width:Noe.width,height:Noe.height},center:{x:Noe.centerX,y:Noe.centerY}}),{paths:BTn,bounds:E0t,refblocks:B0t,circles:bTn}=HV,STn=Vn({primitives:[...Object.values(BTn),...Object.values(bTn),{type:\"text\",text:\"{REF}\",x:0,y:-.22},{type:\"text\",text:\"{VAL}\",x:0,y:.28}],ports:[{...B0t.left1,labels:[\"1\"]},{...B0t.right1,labels:[\"2\"]}],center:{x:E0t.centerX,y:E0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),QTn={...STn,size:{width:.95,height:.65}},{paths:vTn,bounds:b0t,refblocks:S0t,circles:wTn}=HV,PTn=Vn({primitives:[...Object.values(vTn),...Object.values(wTn),{type:\"text\",text:\"{REF}\",x:0,y:.28},{type:\"text\",text:\"{VAL}\",x:0,y:-.22}],ports:[{...S0t.left1,labels:[\"1\"]},{...S0t.right1,labels:[\"2\"]}],center:{x:b0t.centerX,y:b0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),MTn={...PTn,size:{width:.95,height:.65}},{paths:DTn,bounds:Q0t,refblocks:v0t,circles:NTn}=HV,RTn=Vn({primitives:[...Object.values(DTn),...Object.values(NTn),{type:\"text\",text:\"{REF}\",x:.2,y:-.25},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.25}],ports:[{...v0t.left1,labels:[\"1\"]},{...v0t.right1,labels:[\"2\"]}],center:{x:Q0t.centerX,y:Q0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_left\").build(),TTn={...RTn,size:{width:.95,height:.9}},kTn=LV(x0t,{newOrientation:\"up\"}),Roe={paths:{path1:{type:\"path\",points:[{x:-.3,y:0},{x:-.19998,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path2:{type:\"path\",points:[{x:.19998,y:0},{x:.3,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path3:{type:\"path\",points:[{x:-.19998,y:.07998},{x:.19998,y:.07998},{x:.19998,y:-.07998},{x:-.19998,y:-.07998},{x:-.19998,y:.07998}],color:\"primary\",fill:!1,strokeWidth:.012}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:FTn,bounds:w0t,refblocks:P0t,circles:LTn}=Roe,HTn=Vn({primitives:[...Object.values(FTn),...Object.values(LTn),{type:\"text\",text:\"{REF}\",x:-.16,y:.16},{type:\"text\",text:\"{VAL}\",x:.16,y:.16}],ports:[{...P0t.left1,labels:[\"1\"]},{...P0t.right1,labels:[\"2\"]}],center:{x:w0t.centerX,y:w0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),OTn={...HTn,size:{width:.9,height:.6}},{paths:GTn,bounds:M0t,refblocks:D0t,circles:YTn}=Roe,UTn=Vn({primitives:[...Object.values(GTn),...Object.values(YTn),{type:\"text\",text:\"{REF}\",x:0,y:-.16},{type:\"text\",text:\"{VAL}\",x:0,y:.16}],ports:[{...D0t.left1,labels:[\"1\"]},{...D0t.right1,labels:[\"2\"]}],center:{x:M0t.centerX,y:M0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),KTn={...UTn,size:{width:.6,height:.65}},{paths:VTn,bounds:N0t,refblocks:R0t,circles:zTn}=Roe,JTn=Vn({primitives:[...Object.values(VTn),...Object.values(zTn),{type:\"text\",text:\"{REF}\",x:0,y:.16},{type:\"text\",text:\"{VAL}\",x:0,y:-.16}],ports:[{...R0t.left1,labels:[\"1\"]},{...R0t.right1,labels:[\"2\"]}],center:{x:N0t.centerX,y:N0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),WTn={...JTn,size:{width:.6,height:.65}},Toe={paths:{path2:{type:\"path\",points:[{x:.15,y:-.01},{x:.55,y:-.01}],color:\"primary\",fill:!0},\"path2-5\":{type:\"path\",points:[{x:-.15,y:.06},{x:.14,y:.06}],color:\"primary\",fill:!0},\"path2-5-1\":{type:\"path\",points:[{x:.14,y:.06},{x:.14,y:-.08}],color:\"primary\",fill:!0},\"path2-5-1-6\":{type:\"path\",points:[{x:-.16,y:.06},{x:-.16,y:-.08}],color:\"primary\",fill:!0},\"path2-5-4\":{type:\"path\",points:[{x:-.15,y:-.08},{x:.14,y:-.08}],color:\"primary\",fill:!0},\"path2-9\":{type:\"path\",points:[{x:-.55,y:-.01},{x:-.17,y:-.01}],color:\"primary\",fill:!0}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{width:1.16,height:.35,centerX:0,centerY:0},circles:{}},{paths:jTn,bounds:koe,refblocks:T0t,circles:$Tn}=Toe,qTn=Vn({primitives:[...Object.values(jTn),...Object.values($Tn),{type:\"text\",text:\"{REF}\",x:-.2,y:.1404553499999995},{type:\"text\",text:\"{VAL}\",x:.2,y:.1494553499999995}],ports:[{...T0t.left1,labels:[\"1\"]},{...T0t.right1,labels:[\"2\"]}],size:{width:koe.width,height:koe.height},center:{x:koe.centerX,y:koe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:XTn,bounds:Foe,refblocks:k0t,circles:ZTn}=Toe,ekn=Vn({primitives:[...Object.values(XTn),...Object.values(ZTn),{type:\"text\",text:\"{REF}\",x:0,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.1704553499999995}],ports:[{...k0t.left1,labels:[\"1\"]},{...k0t.right1,labels:[\"2\"]}],size:{width:Foe.width,height:Foe.height},center:{x:Foe.centerX,y:Foe.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:tkn,bounds:Loe,refblocks:F0t,circles:nkn}=Toe,okn=Vn({primitives:[...Object.values(tkn),...Object.values(nkn),{type:\"text\",text:\"{REF}\",x:0,y:.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.1704553499999995}],ports:[{...F0t.left1,labels:[\"1\"]},{...F0t.right1,labels:[\"2\"]}],size:{width:Loe.width,height:Loe.height},center:{x:Loe.centerX,y:Loe.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:ikn,bounds:Hoe,refblocks:L0t,circles:rkn}=Toe,skn=Vn({primitives:[...Object.values(ikn),...Object.values(rkn),{type:\"text\",text:\"{REF}\",x:.2,y:-.1404553499999995},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.1494553499999995}],ports:[{...L0t.left1,labels:[\"1\"]},{...L0t.right1,labels:[\"2\"]}],size:{width:Hoe.width,height:Hoe.height},center:{x:Hoe.centerX,y:Hoe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:akn,bounds:H0t,refblocks:O0t,circles:Akn}=Roe,ckn=Vn({primitives:[...Object.values(akn),...Object.values(Akn),{type:\"text\",text:\"{REF}\",x:.16,y:-.16},{type:\"text\",text:\"{VAL}\",x:-.16,y:-.16}],ports:[{...O0t.left1,labels:[\"1\"]},{...O0t.right1,labels:[\"2\"]}],center:{x:H0t.centerX,y:H0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),lkn={...ckn,size:{width:.9,height:.6}},I3e={paths:{\"horizontal-bar\":{type:\"path\",points:[{x:-.4,y:0},{x:.4,y:0}],color:\"primary\",fill:!1},\"middle-dash-1\":{type:\"path\",points:[{x:0,y:.2},{x:0,y:.07}],color:\"primary\",fill:!1},\"middle-dash-2\":{type:\"path\",points:[{x:0,y:.01},{x:0,y:-.12}],color:\"primary\",fill:!1},\"middle-dash-3\":{type:\"path\",points:[{x:0,y:-.18},{x:0,y:-.31}],color:\"primary\",fill:!1},\"left-vertical\":{type:\"path\",points:[{x:-.25,y:0},{x:-.25,y:-.2}],color:\"primary\",fill:!1},\"right-vertical\":{type:\"path\",points:[{x:.25,y:0},{x:.25,y:-.2}],color:\"primary\",fill:!1},\"left-ground\":{type:\"path\",points:[{x:-.3,y:-.2},{x:-.25,y:-.3},{x:-.2,y:-.2},{x:-.3,y:-.2}],color:\"primary\",fill:!1},\"right-ground\":{type:\"path\",points:[{x:.2,y:-.2},{x:.25,y:-.3},{x:.3,y:-.2},{x:.2,y:-.2}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.4,y:0},right1:{x:.4,y:0}},bounds:{centerX:0,centerY:-.02},circles:{}},{paths:ukn,bounds:G0t,refblocks:Y0t,circles:gkn}=I3e,dkn=Vn({primitives:[...Object.values(ukn),...Object.values(gkn),{type:\"text\",text:\"{REF}\",x:0,y:.2594553499999995}],ports:[{...Y0t.left1,labels:[\"1\"]},{...Y0t.right1,labels:[\"2\"]}],center:{x:G0t.centerX,y:G0t.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:hkn,bounds:U0t,refblocks:K0t,circles:pkn}=I3e,V0t=Vn({primitives:[...Object.values(hkn),...Object.values(pkn),{type:\"text\",text:\"{REF}\",x:0,y:.2594553499999995}],ports:[{...K0t.left1,labels:[\"1\"]},{...K0t.right1,labels:[\"2\"]}],center:{x:U0t.centerX,y:U0t.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),mkn=tF(V0t),{paths:_kn,bounds:z0t,refblocks:J0t,circles:fkn}=I3e,Ikn=Vn({primitives:[...Object.values(_kn),...Object.values(fkn),{type:\"text\",text:\"{REF}\",x:0,y:.2594553499999995}],ports:[{...J0t.left1,labels:[\"1\"]},{...J0t.right1,labels:[\"2\"]}],center:{x:z0t.centerX,y:z0t.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),Ooe={paths:{path27:{type:\"path\",points:[{x:.3,y:0},{x:.06,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path28:{type:\"path\",points:[{x:-.06,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path29:{type:\"path\",points:[{x:.06,y:.16002},{x:.06,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012},path30:{type:\"path\",points:[{x:-.06,y:.16002},{x:-.06,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.24,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.24,anchor:\"middle_top\"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.24,maxY:.24,width:.6,height:.48,centerX:0,centerY:0},circles:{}},{paths:Ckn,texts:Gdr,bounds:Goe,refblocks:W0t,circles:ykn}=Ooe,xkn=Vn({primitives:[...Object.values(Ckn),...Object.values(ykn),{type:\"text\",text:\"{REF}\",x:-.2,y:.115},{type:\"text\",text:\"{VAL}\",x:.2,y:.115}],ports:[{...W0t.left1,labels:[\"1\"]},{...W0t.right1,labels:[\"2\"]}],size:{width:Goe.width,height:Goe.height},center:{x:Goe.centerX,y:Goe.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),Ekn={...xkn,size:{width:.9,height:.6}},Bkn=Vn(Ooe).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),bkn={...Bkn,size:{width:.6,height:.65}},Yoe={paths:{path27:{type:\"path\",points:[{x:.3,y:0},{x:657e-6,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path28:{type:\"path\",points:[{x:-.038683,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path30:{type:\"path\",points:[{x:-.074255,y:.16002},{x:-.074255,y:.16002},{x:-.069544,y:.149352},{x:-.065126,y:.138684},{x:-.061005,y:.128016},{x:-.057182,y:.117348},{x:-.053663,y:.10668},{x:-.05045,y:.096012},{x:-.047547,y:.085344},{x:-.044957,y:.074676},{x:-.042684,y:.064008},{x:-.040732,y:.05334},{x:-.039103,y:.042672},{x:-.037801,y:.032004},{x:-.03683,y:.021336},{x:-.036193,y:.010668},{x:-.035893,y:0},{x:-.036193,y:-.010668},{x:-.03683,y:-.021336},{x:-.037801,y:-.032004},{x:-.039103,y:-.042672},{x:-.040732,y:-.05334},{x:-.042684,y:-.064008},{x:-.044957,y:-.074676},{x:-.047547,y:-.085344},{x:-.05045,y:-.096012},{x:-.053663,y:-.10668},{x:-.057182,y:-.117348},{x:-.061005,y:-.128016},{x:-.065126,y:-.138684},{x:-.069544,y:-.149352},{x:-.074255,y:-.16002},{x:-.074255,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012},\"path30-7\":{type:\"path\",points:[{x:-385e-6,y:.16002},{x:-385e-6,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012},\"path30-9-2\":{type:\"path\",points:[{x:.156026,y:.2},{x:.085846,y:.2}],color:\"primary\",fill:!1,strokeWidth:.012},\"path30-9-2-9\":{type:\"path\",points:[{x:.120936,y:.16491},{x:.120936,y:.23509}],color:\"primary\",fill:!1,strokeWidth:.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.42,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.42,anchor:\"middle_top\"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.55,maxY:.55,width:.6,height:1.1,centerX:0,centerY:0},circles:{\"viewbox-padding-min\":{type:\"circle\",x:-.3,y:-.55,radius:0,fill:!1,color:\"transparent\"},\"viewbox-padding-max\":{type:\"circle\",x:.3,y:.55,radius:0,fill:!1,color:\"transparent\"}}},Skn=Vn(Yoe).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.7,y:.3}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-.12,y:-.3}).build(),Qkn=Vn(Yoe).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),vkn=Vn(Yoe).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.78}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.78}).build(),wkn=Vn(Yoe).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:-.12,y:.3}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.72,y:-.3}).build(),Pkn=Vn(Ooe).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Mkn={...Pkn,size:{width:.6,height:.65}},{paths:Dkn,texts:Ydr,bounds:Uoe,refblocks:j0t,circles:Nkn}=Ooe,Rkn=Vn({primitives:[...Object.values(Dkn),...Object.values(Nkn),{type:\"text\",text:\"{REF}\",x:.2,y:-.095},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.095}],ports:[{...j0t.left1,labels:[\"1\"]},{...j0t.right1,labels:[\"2\"]}],size:{width:Uoe.width,height:Uoe.height},center:{x:Uoe.centerX,y:Uoe.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),Tkn={...Rkn,size:{width:.9,height:.6}},iF={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.03},{x:.54,y:.03}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.29,y:.29},{x:.29,y:-.23}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.02,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:-.37}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.37,maxY:.37,width:1.14,height:.74,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:kkn,texts:Udr,bounds:Koe,refblocks:$0t,circles:Fkn}=iF,Lkn=Vn({primitives:[...Object.values(kkn),...Object.values(Fkn),{type:\"text\",text:\"{REF}\",x:-.15,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3894553499999995}],ports:[{...$0t.left1,labels:[\"1\"]},{...$0t.right1,labels:[\"2\"]}],size:{width:Koe.width,height:Koe.height},center:{x:Koe.centerX,y:Koe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Hkn=Vn(iF).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Okn,texts:Kdr,bounds:Voe,refblocks:q0t,circles:Gkn}=iF,Ykn=Vn({primitives:[...Object.values(Okn),...Object.values(Gkn),{type:\"text\",text:\"{REF}\",x:-0,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.3894553499999995}],ports:[{...q0t.left1,labels:[\"1\"]},{...q0t.right1,labels:[\"2\"]}],size:{width:Voe.width,height:Voe.height},center:{x:Voe.centerX,y:Voe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Ukn=Vn(iF).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Kkn,texts:Vdr,bounds:zoe,refblocks:X0t,circles:Vkn}=iF,zkn=Vn({primitives:[...Object.values(Kkn),...Object.values(Vkn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...X0t.left1,labels:[\"1\"]},{...X0t.right1,labels:[\"2\"]}],size:{width:zoe.width,height:zoe.height},center:{x:zoe.centerX,y:zoe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Jkn,texts:zdr,bounds:Joe,refblocks:Z0t,circles:Wkn}=iF,jkn=Vn({primitives:[...Object.values(Jkn),...Object.values(Wkn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...Z0t.left1,labels:[\"1\"]},{...Z0t.right1,labels:[\"2\"]}],size:{width:Joe.width,height:Joe.height},center:{x:Joe.centerX,y:Joe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Woe={paths:{path27:{type:\"path\",points:[{x:.54,y:-.01},{x:.13,y:-.01}],color:\"primary\",fill:!1},path29:{type:\"path\",points:[{x:.13,y:.25},{x:.13,y:-.27}],color:\"primary\",fill:!1},\"path29-2\":{type:\"path\",points:[{x:.07,y:.25},{x:.07,y:-.28}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-.14,y:.25},{x:-.14,y:-.27}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-.08,y:.26},{x:-.08,y:-.27}],color:\"primary\",fill:!1},\"path29-2-7\":{type:\"path\",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:\"primary\",fill:!1},\"path29-2-7-6\":{type:\"path\",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-.21,y:.32},{x:.2,y:.32}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:.71},{x:0,y:.33},{x:0,y:.32}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:-.21,y:.32},{x:-.21,y:.25}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.2,y:.32},{x:.2,y:.25}],color:\"primary\",fill:!1},\"path43-9\":{type:\"path\",points:[{x:.19,y:-.35},{x:-.22,y:-.35}],color:\"primary\",fill:!1},\"path44-0-5\":{type:\"path\",points:[{x:-.02,y:-.71},{x:-.02,y:-.36},{x:-.02,y:-.35}],color:\"primary\",fill:!1},\"path43-8-1\":{type:\"path\",points:[{x:.19,y:-.35},{x:.19,y:-.28}],color:\"primary\",fill:!1},\"path43-8-8-9\":{type:\"path\",points:[{x:-.22,y:-.35},{x:-.22,y:-.28}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-.14,y:-.01},{x:-.54,y:-.01}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"{REF}\",x:.53,y:.28},right1:{type:\"text\",text:\"{VAL}\",x:.54,y:-.28}},refblocks:{top1:{x:0,y:.71},bottom1:{x:-.02,y:-.71},left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.74,maxY:.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:$kn,texts:Jdr,bounds:joe,refblocks:$oe,circles:qkn}=Woe,Xkn=Vn({primitives:[...Object.values($kn),...Object.values(qkn),{type:\"text\",text:\"{REF}\",x:-.4,y:.4094554499999995},{type:\"text\",text:\"{VAL}\",x:.4,y:.4094553499999995}],ports:[{...$oe.left1,labels:[\"1\"]},{...$oe.right1,labels:[\"3\"]},{...$oe.bottom1,labels:[\"2\"]},{...$oe.top1,labels:[\"4\"]}],size:{width:joe.width,height:joe.height},center:{x:joe.centerX,y:joe.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),Zkn=Vn(Woe).labelPort(\"top1\",[\"2\",\"gnd1\"]).labelPort(\"bottom1\",[\"4\",\"gnd2\"]).labelPort(\"left1\",[\"3\"]).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),eFn=Vn(Woe).labelPort(\"top1\",[\"4\",\"gnd1\"]).labelPort(\"bottom1\",[\"2\",\"gnd2\"]).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),{paths:tFn,texts:Wdr,bounds:qoe,refblocks:Xoe,circles:nFn}=Woe,oFn=Vn({primitives:[...Object.values(tFn),...Object.values(nFn),{type:\"text\",text:\"{VAL}\",x:-.4,y:-.4094554499999995},{type:\"text\",text:\"{REF}\",x:.4,y:-.4094553499999995}],ports:[{...Xoe.left1,labels:[\"1\"]},{...Xoe.right1,labels:[\"3\"]},{...Xoe.bottom1,labels:[\"2\"]},{...Xoe.top1,labels:[\"4\"]}],size:{width:qoe.width,height:qoe.height},center:{x:qoe.centerX,y:qoe.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),Zoe={paths:{path27:{type:\"path\",points:[{x:.55,y:-.01},{x:.13,y:-.01}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-.14,y:-.01},{x:-.55,y:-.01}],color:\"primary\",fill:!1},path29:{type:\"path\",points:[{x:.13,y:-.28},{x:.13,y:.25}],color:\"primary\",fill:!1},\"path29-2\":{type:\"path\",points:[{x:.07,y:-.28},{x:.07,y:.25}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-.14,y:-.28},{x:-.14,y:.25}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-.08,y:-.28},{x:-.08,y:.25}],color:\"primary\",fill:!1},\"path29-2-7\":{type:\"path\",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:\"primary\",fill:!1},\"path29-2-7-6\":{type:\"path\",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{VAL}\",x:-.01,y:-.42},bottom1:{type:\"text\",text:\"{REF}\",x:0,y:.43}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{minX:-.58,maxX:.58,minY:-.52,maxY:.43,width:1.16,height:1,centerX:0,centerY:-.04},circles:{}},{paths:iFn,texts:jdr,bounds:eie,refblocks:eut,circles:rFn}=Zoe,sFn=Vn({primitives:[...Object.values(iFn),...Object.values(rFn),{type:\"text\",text:\"{REF}\",x:-.3,y:.3094553499999995},{type:\"text\",text:\"{VAL}\",x:.3,y:.3094553499999995}],ports:[{...eut.left1,labels:[\"1\"]},{...eut.right1,labels:[\"2\"]}],size:{width:eie.width,height:eie.height},center:{x:eie.centerX,y:eie.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),aFn=Vn(Zoe).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),AFn=Vn(Zoe).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:cFn,texts:$dr,bounds:tie,refblocks:tut,circles:lFn}=Zoe,uFn=Vn({primitives:[...Object.values(cFn),...Object.values(lFn),{type:\"text\",text:\"{REF}\",x:.3,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.3094553499999995}],ports:[{...tut.left1,labels:[\"1\"]},{...tut.right1,labels:[\"2\"]}],size:{width:tie.width,height:tie.height},center:{x:tie.centerX,y:tie.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),OV=.6,C3e=.3,gFn=[{type:\"path\",points:[{x:-OV,y:0},{x:-C3e,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:C3e,y:0},{x:OV,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:C3e,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],dFn=Vn({primitives:[...gFn,{type:\"text\",text:\"{REF}\",x:-.2,y:.35},{type:\"text\",text:\"{VAL}\",x:.2,y:.35}],ports:[{x:-OV,y:0,labels:[\"1\"]},{x:OV,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:OV*2,height:.9}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),GV=.6,y3e=.3,hFn=[{type:\"path\",points:[{x:-GV,y:0},{x:-y3e,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:y3e,y:0},{x:GV,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:y3e,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],pFn=Vn({primitives:[...hFn,{type:\"text\",text:\"{REF}\",x:0,y:-.4},{type:\"text\",text:\"{VAL}\",x:0,y:.4}],ports:[{x:-GV,y:0,labels:[\"1\"]},{x:GV,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:GV*2,height:.9}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),YV=.6,x3e=.3,mFn=[{type:\"path\",points:[{x:-YV,y:0},{x:-x3e,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:x3e,y:0},{x:YV,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:x3e,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],_Fn=Vn({primitives:[...mFn,{type:\"text\",text:\"{REF}\",x:0,y:.4},{type:\"text\",text:\"{VAL}\",x:0,y:-.4}],ports:[{x:-YV,y:0,labels:[\"1\"]},{x:YV,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:YV*2,height:.9}}).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),UV=.6,E3e=.3,fFn=[{type:\"path\",points:[{x:-UV,y:0},{x:-E3e,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:E3e,y:0},{x:UV,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:E3e,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],IFn=Vn({primitives:[...fFn,{type:\"text\",text:\"{REF}\",x:.2,y:-.35},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.35}],ports:[{x:-UV,y:0,labels:[\"1\"]},{x:UV,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:UV*2,height:.9}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),rF={paths:{path11:{type:\"path\",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:\"primary\",fill:!1},\"arrow-2\":{type:\"path\",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:\"primary\",fill:!0},path1:{type:\"path\",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:\"primary\",fill:!1},\"arrow-1\":{type:\"path\",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:\"primary\",fill:!0},path9:{type:\"path\",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:1.88,y:-1.94},right1:{type:\"text\",text:\"{REF}\",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:.77,height:.86,centerX:1.96,centerY:-1.55},circles:{\"path1-0\":{type:\"circle\",x:2.05,y:-1.54,radius:.3,color:\"primary\",fill:!1}}},CFn=Vn(rF).rotateRightFacingSymbol(\"down\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.8,y:-.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0,y:.15}).build(),yFn=Vn(rF).rotateRightFacingSymbol(\"right\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_right\").changeTextAnchor(\"{REF}\",\"middle_right\").build(),xFn=Vn(rF).rotateRightFacingSymbol(\"left\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-.8}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0,y:.8}).build(),EFn=Vn(rF).rotateRightFacingSymbol(\"right\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_right\").changeTextAnchor(\"{REF}\",\"middle_right\").build(),BFn=Vn(rF).rotateRightFacingSymbol(\"up\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.8,y:.15}).build(),bFn=Vn(rF).rotateRightFacingSymbol(\"up\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.8,y:.15}).build(),SFn={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:nut,bounds:nie,refblocks:out,circles:QFn}=SFn,KV=Nl({primitives:[nut.path11,nut.path12,{type:\"path\",points:[{x:-.12,y:.14},{x:.12,y:.14}],color:\"primary\",fill:!1},...Object.values(QFn),{type:\"text\",text:\"{REF}\",x:0,y:.3594553499999995,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-.35,anchor:\"middle_top\"},{type:\"path\",points:[{x:-.095,y:-.16},{x:0,y:.09}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0,y:.09},{x:.095,y:-.16}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.048,y:-.045},{x:.048,y:-.045}],color:\"primary\",fill:!1}],ports:[{...out.left1,labels:[\"1\"]},{...out.right1,labels:[\"2\"]}],size:{width:nie.width,height:nie.height},center:{x:nie.centerX,y:nie.centerY}}),B3e=structuredClone(KV);B3e.primitives=B3e.primitives.map(t=\u003et.type!==\"text\"?t:t.text===\"{REF}\"?{...t,x:-.16,y:.3594553499999995,anchor:\"middle_bottom\"}:t.text===\"{VAL}\"?{...t,x:.16,y:.35,anchor:\"middle_bottom\"}:t);var iut=LV(B3e,{newOrientation:\"down\"}),vFn=tF(KV),wFn=KV,b3e=structuredClone(KV);b3e.primitives=b3e.primitives.map(t=\u003et.type!==\"text\"?t:t.text===\"{REF}\"?{...t,x:.16,y:-.3594553499999995,anchor:\"middle_top\"}:t.text===\"{VAL}\"?{...t,x:-.16,y:-.35,anchor:\"middle_top\"}:t);var PFn=LV(b3e,{newOrientation:\"up\"}),sF={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:-.12,y:-.14},{x:.12,y:-.14}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:MFn,bounds:oie,refblocks:rut,circles:DFn}=sF,NFn=Vn({primitives:[...Object.values(MFn),...Object.values(DFn),{type:\"text\",text:\"{REF}\",x:-.15,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3894553499999995}],ports:[{...rut.left1,labels:[\"1\"]},{...rut.right1,labels:[\"2\"]}],size:{width:oie.width,height:oie.height},center:{x:oie.centerX,y:oie.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:RFn,bounds:iie,refblocks:sut,circles:TFn}=sF,kFn=Vn({primitives:[...Object.values(RFn),...Object.values(TFn),{type:\"text\",text:\"{REF}\",x:-0,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.3294553499999995}],ports:[{...sut.left1,labels:[\"1\"]},{...sut.right1,labels:[\"2\"]}],size:{width:iie.width,height:iie.height},center:{x:iie.centerX,y:iie.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:FFn,bounds:rie,refblocks:aut,circles:LFn}=sF,HFn=Vn({primitives:[...Object.values(FFn),...Object.values(LFn),{type:\"text\",text:\"{REF}\",x:-0,y:-.3294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.4294553499999995}],ports:[{...aut.left1,labels:[\"1\"]},{...aut.right1,labels:[\"2\"]}],size:{width:rie.width,height:rie.height},center:{x:rie.centerX,y:rie.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:OFn,bounds:sie,refblocks:Aut,circles:GFn}=sF,YFn=Vn({primitives:[...Object.values(OFn),...Object.values(GFn),{type:\"text\",text:\"{REF}\",x:-0,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.3294553499999995}],ports:[{...Aut.left1,labels:[\"1\"]},{...Aut.right1,labels:[\"2\"]}],size:{width:sie.width,height:sie.height},center:{x:sie.centerX,y:sie.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:UFn,bounds:aie,refblocks:cut,circles:KFn}=sF,VFn=Vn({primitives:[...Object.values(UFn),...Object.values(KFn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...cut.left1,labels:[\"1\"]},{...cut.right1,labels:[\"2\"]}],size:{width:aie.width,height:aie.height},center:{x:aie.centerX,y:aie.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:zFn,bounds:Aie,refblocks:lut,circles:JFn}=sF,WFn=Vn({primitives:[...Object.values(zFn),...Object.values(JFn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...lut.left1,labels:[\"1\"]},{...lut.right1,labels:[\"2\"]}],size:{width:Aie.width,height:Aie.height},center:{x:Aie.centerX,y:Aie.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),aF={paths:{path11:{type:\"path\",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.1,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:\"primary\",fill:!0},\"path11-0-9-0\":{type:\"path\",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.03,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.42}},refblocks:{left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.05,radius:.29,color:\"primary\",fill:!1}}},jFn=Vn(aF).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:-.03,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.8,y:-.2}).build(),$Fn=Vn(aF).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.1}).changeTextAnchor(\"{VAL}\",\"middle_top\").build(),qFn=Vn(aF).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.8}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.9}).build(),XFn=Vn(aF).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.1}).changeTextAnchor(\"{VAL}\",\"middle_top\").build(),ZFn=Vn(aF).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.7,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-.13,y:-.2}).build(),eLn=Vn(aF).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.7,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-.13,y:-.2}).build(),cie={paths:{triangle:{type:\"path\",points:[{x:-.06,y:-.09},{x:-.06,y:.09},{x:.06,y:0},{x:-.06,y:-.09}],color:\"primary\",fill:!1},stem:{type:\"path\",points:[{x:-.11,y:0},{x:-.06,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.11,y:0}},bounds:{centerX:0,centerY:0}},{paths:tLn,bounds:uut,refblocks:nLn}=cie,oLn=Vn({primitives:[...Object.values(tLn),{type:\"text\",text:\"{REF}\",x:-.13,y:-0}],ports:[{...nLn.left1,labels:[\"1\"]}],center:{x:uut.centerX,y:uut.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),{paths:iLn,bounds:gut,refblocks:rLn}=cie,sLn=Vn({primitives:[...Object.values(iLn),{type:\"text\",text:\"{REF}\",x:-.13,y:0}],ports:[{...rLn.left1,labels:[\"1\"]}],center:{x:gut.centerX,y:gut.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:aLn,bounds:dut,refblocks:ALn}=cie,cLn=Vn({primitives:[...Object.values(aLn),{type:\"text\",text:\"{REF}\",x:-.13,y:-0}],ports:[{...ALn.left1,labels:[\"1\"]}],center:{x:dut.centerX,y:dut.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:lLn,bounds:hut,refblocks:uLn}=cie,gLn=Vn({primitives:[...Object.values(lLn),{type:\"text\",text:\"{REF}\",x:-.13,y:0}],ports:[{...uLn.left1,labels:[\"1\"]}],center:{x:hut.centerX,y:hut.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),dLn={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},lie=Vn(dLn).labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),hLn=ii(lie,\"down\"),pLn=ii(lie,\"left\"),mLn=ii(lie,\"up\"),_Ln={paths:{path1:{type:\"path\",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:\"primary\",fill:!1},\"path-1-2\":{type:\"path\",points:[{x:-.07,y:.22},{x:.11,y:.16}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:.13},{x:.37,y:.13}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.36},{x:.37,y:.36}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:\"primary\",fill:!1},\"path4-5\":{type:\"path\",points:[{x:-.07,y:-.19},{x:.1,y:-.24}],color:\"primary\",fill:!1},path5:{type:\"path\",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:\"primary\",fill:!1},\"path1-4-join\":{type:\"path\",points:[{x:0,y:-.2},{x:0,y:.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.56},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.42}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{\"circle-2\":{type:\"circle\",x:.08,y:.13,radius:.02,color:\"primary\",fill:!1},\"circle-5\":{type:\"circle\",x:.08,y:-.27,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:.08,y:.37,radius:.02,color:\"primary\",fill:!1},\"circle-6\":{type:\"circle\",x:.08,y:-.04,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.22,radius:.02,color:\"primary\",fill:!1},\"circle-4\":{type:\"circle\",x:-.1,y:-.18,radius:.02,color:\"primary\",fill:!1}}},uie=Vn(_Ln).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right3\",[\"6\"]).labelPort(\"left2\",[\"4\"]).labelPort(\"right5\",[\"5\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),S3e=ii(uie,\"down\"),Q3e=S3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),v3e=S3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Q3e.anchor=\"middle_bottom\",v3e.anchor=\"middle_top\",Q3e.x=0,Q3e.y+=.537,v3e.y-=.5375,v3e.x=0;var fLn=S3e,w3e=ii(uie,\"left\"),P3e=w3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),M3e=w3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");P3e.anchor=\"middle_bottom\",M3e.anchor=\"middle_top\",P3e.x=0,P3e.y+=1,M3e.y-=1,M3e.x=0;var ILn=w3e,D3e=ii(uie,\"up\"),N3e=D3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),R3e=D3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");N3e.anchor=\"middle_bottom\",R3e.anchor=\"middle_top\",N3e.x=0,N3e.y+=.537,R3e.y-=.5375,R3e.x=0;var CLn=D3e,yLn={paths:{path1:{type:\"path\",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-.07,y:.23},{x:.11,y:.33}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:.13},{x:.37,y:.13}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.36},{x:.37,y:.36}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:\"primary\",fill:!1},\"path4-6\":{type:\"path\",points:[{x:-.07,y:-.18},{x:.11,y:-.07}],color:\"primary\",fill:!1},path5:{type:\"path\",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:\"primary\",fill:!1},\"path1-4-join\":{type:\"path\",points:[{x:0,y:-.12},{x:0,y:.27}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.61},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.52}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{\"circle-2\":{type:\"circle\",x:.08,y:.13,radius:.02,color:\"primary\",fill:!1},\"circle-5\":{type:\"circle\",x:.08,y:-.27,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:.08,y:.37,radius:.02,color:\"primary\",fill:!1},\"circle-6\":{type:\"circle\",x:.08,y:-.04,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.22,radius:.02,color:\"primary\",fill:!1},\"circle-4\":{type:\"circle\",x:-.1,y:-.18,radius:.02,color:\"primary\",fill:!1}}},gie=Vn(yLn).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right3\",[\"6\"]).labelPort(\"left2\",[\"4\"]).labelPort(\"right5\",[\"5\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),T3e=ii(gie,\"down\"),k3e=T3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),F3e=T3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");k3e.anchor=\"middle_bottom\",F3e.anchor=\"middle_top\",k3e.x=0,k3e.y+=.565,F3e.y-=.555,F3e.x=0;var xLn=T3e,L3e=ii(gie,\"left\"),H3e=L3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),O3e=L3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");H3e.anchor=\"middle_bottom\",O3e.anchor=\"middle_top\",H3e.x=0,H3e.y+=1.09,O3e.y-=1.09,O3e.x=0;var ELn=L3e,G3e=ii(gie,\"up\"),Y3e=G3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),U3e=G3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Y3e.anchor=\"middle_bottom\",U3e.anchor=\"middle_top\",Y3e.x=0,Y3e.y+=.565,U3e.y-=.555,U3e.x=0;var BLn=G3e,bLn={paths:{path11:{type:\"path\",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:.07},{x:.11,y:.11}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.13,y:.06},{x:.38,y:.06}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:-.09,y:-.17},{x:.11,y:-.12}],color:\"primary\",fill:!1},\"path12-0\":{type:\"path\",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.31},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.31}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{\"circle-4\":{type:\"circle\",x:.1,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.1,y:-.17,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:-.11,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.11,y:-.17,radius:.02,color:\"primary\",fill:!1}}},die=Vn(bLn).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"4\"]).labelPort(\"left3\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),K3e=ii(die,\"down\"),V3e=K3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),z3e=K3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");V3e.anchor=\"middle_bottom\",z3e.anchor=\"middle_top\",V3e.x=.4,V3e.y+=.265,z3e.y-=.265,z3e.x=.4;var SLn=K3e,J3e=ii(die,\"left\"),W3e=J3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),j3e=J3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");W3e.anchor=\"middle_bottom\",j3e.anchor=\"middle_top\",W3e.x=0,W3e.y+=.67,j3e.y-=.67,j3e.x=0;var QLn=J3e,$3e=ii(die,\"up\"),q3e=$3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),X3e=$3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");q3e.anchor=\"middle_bottom\",X3e.anchor=\"middle_top\",q3e.x=.46,q3e.y+=.265,X3e.y-=.265,X3e.x=.46;var vLn=$3e,wLn={paths:{path11:{type:\"path\",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:.07},{x:.1,y:.2}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.13,y:.06},{x:.38,y:.06}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:-.09,y:-.16},{x:.1,y:-.03}],color:\"primary\",fill:!1},\"path12-0\":{type:\"path\",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.42}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{\"circle-4\":{type:\"circle\",x:.1,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.1,y:-.17,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:-.11,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.11,y:-.17,radius:.02,color:\"primary\",fill:!1}}},hie=Vn(wLn).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"4\"]).labelPort(\"left3\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Z3e=ii(hie,\"down\"),eEe=Z3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),tEe=Z3e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");eEe.anchor=\"middle_bottom\",tEe.anchor=\"middle_top\",eEe.x=.4,eEe.y+=.295,tEe.y-=.295,tEe.x=.42;var PLn=Z3e,nEe=ii(hie,\"left\"),oEe=nEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),iEe=nEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");oEe.anchor=\"middle_bottom\",iEe.anchor=\"middle_top\",oEe.x=0,oEe.y+=.795,iEe.y-=.795,iEe.x=0;var MLn=nEe,rEe=ii(hie,\"up\"),sEe=rEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),aEe=rEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");sEe.anchor=\"middle_bottom\",aEe.anchor=\"middle_top\",sEe.x=.46,sEe.y+=.315,aEe.y-=.315,aEe.x=.46;var DLn=rEe,put={paths:{path5:{type:\"path\",points:[{x:-.44,y:0},{x:-.16,y:0}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.17,y:0},{x:.44,y:.01}],color:\"primary\",fill:!1},path9:{type:\"path\",points:[{x:-.25,y:-.16},{x:.02,y:.3},{x:.25,y:.17},{x:-.02,y:-.29},{x:-.25,y:-.16}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.37}},refblocks:{left1:{x:-.44,y:0},right1:{x:.44,y:.01}},bounds:{minX:-.57,maxX:.57,minY:-.25,maxY:.25,width:1.13,height:.5,centerX:0,centerY:0},circles:{}},{paths:NLn,texts:qdr,bounds:pie,refblocks:mut,circles:RLn}=put,_ut=Vn({primitives:[...Object.values(NLn),...Object.values(RLn),{type:\"text\",text:\"{REF}\",x:.18,y:-.3204553499999995},{type:\"text\",text:\"{VAL}\",x:-.25,y:-.3294553499999995}],ports:[{...mut.left1,labels:[\"1\"]},{...mut.right1,labels:[\"2\"]}],size:{width:pie.width,height:pie.height},center:{x:pie.centerX,y:pie.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),AEe=eF(_ut),cEe=AEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),lEe=AEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");cEe.anchor=\"middle_left\",lEe.anchor=\"middle_left\",cEe.y+=.4,cEe.x=.32,lEe.y-=.45,lEe.x=.32;var TLn=AEe,fut=Vn(put).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),kLn=tF(fut),AF={paths:{path11:{type:\"path\",points:[{x:-.56,y:.04},{x:-.22,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.14,y:.05},{x:.48,y:.05}],color:\"primary\",fill:!1},\"path12-6\":{type:\"path\",points:[{x:.14,y:-.15},{x:.14,y:.25}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.22,y:.25},{x:-.21,y:-.15},{x:.14,y:.05},{x:-.22,y:.25}],color:\"primary\",fill:!0}},refblocks:{left1:{x:-.56,y:.04},right1:{x:.48,y:.05}},bounds:{width:1.18,height:.76,centerX:0,centerY:0},circles:{}},{paths:FLn,bounds:mie,refblocks:Iut,circles:LLn}=AF,HLn=Vn({primitives:[...Object.values(FLn),...Object.values(LLn),{type:\"text\",text:\"{REF}\",x:-.15,y:.3294553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3294553499999995}],ports:[{...Iut.left1,labels:[\"1\"]},{...Iut.right1,labels:[\"2\"]}],size:{width:mie.width,height:mie.height},center:{x:mie.centerX,y:mie.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:OLn,bounds:_ie,refblocks:Cut,circles:GLn}=AF,YLn=Vn({primitives:[...Object.values(OLn),...Object.values(GLn),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{...Cut.left1,labels:[\"1\"]},{...Cut.right1,labels:[\"2\"]}],size:{width:_ie.width,height:_ie.height},center:{x:_ie.centerX,y:_ie.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:ULn,bounds:fie,refblocks:yut,circles:KLn}=AF,VLn=Vn({primitives:[...Object.values(ULn),...Object.values(KLn),{type:\"text\",text:\"{REF}\",x:-0,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.4094553499999995}],ports:[{...yut.left1,labels:[\"1\"]},{...yut.right1,labels:[\"2\"]}],size:{width:fie.width,height:fie.height},center:{x:fie.centerX,y:fie.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:zLn,bounds:Iie,refblocks:xut,circles:JLn}=AF,WLn=Vn({primitives:[...Object.values(zLn),...Object.values(JLn),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{...xut.left1,labels:[\"1\"]},{...xut.right1,labels:[\"2\"]}],size:{width:Iie.width,height:Iie.height},center:{x:Iie.centerX,y:Iie.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:jLn,bounds:Cie,refblocks:Eut,circles:$Ln}=AF,qLn=Vn({primitives:[...Object.values(jLn),...Object.values($Ln),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...Eut.left1,labels:[\"1\"]},{...Eut.right1,labels:[\"2\"]}],size:{width:Cie.width,height:Cie.height},center:{x:Cie.centerX,y:Cie.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:XLn,bounds:yie,refblocks:But,circles:ZLn}=AF,eHn=Vn({primitives:[...Object.values(XLn),...Object.values(ZLn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...But.left1,labels:[\"1\"]},{...But.right1,labels:[\"2\"]}],size:{width:yie.width,height:yie.height},center:{x:yie.centerX,y:yie.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),tHn={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"Hz\",x:0,y:-.04}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:nHn,texts:oHn,bounds:xie,refblocks:but,circles:iHn}=tHn,uEe=Nl({primitives:[...Object.values(nHn),...Object.values(iHn),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...oHn.left1,x:0,y:.01,anchor:\"center\",fontSize:.2}],ports:[{...but.left1,labels:[\"1\"]},{...but.right1,labels:[\"2\"]}],size:{width:xie.width,height:xie.height},center:{x:xie.centerX,y:xie.centerY}}),{5:rHn,...sHn}=uEe.primitives;function aHn(t){return typeof t==\"object\"}var Sut=ii({...uEe,primitives:Object.values(sHn).filter(aHn)}),AHn={...Sut,primitives:[...Sut.primitives,rHn]},cHn={paths:{path10:{type:\"path\",points:[{x:-.53,y:.04},{x:.53,y:.04}],color:\"primary\",fill:!1},path14:{type:\"path\",points:[{x:0,y:.17},{x:.27,y:.17},{x:.27,y:-.1},{x:-.26,y:-.1},{x:-.26,y:.17},{x:0,y:.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.24}},refblocks:{left1:{x:-.53,y:.04},right1:{x:.53,y:.04}},bounds:{width:1.13,height:.47,centerX:0,centerY:0}},{paths:lHn,texts:uHn,bounds:Eie,refblocks:Qut}=cHn,vut=Nl({primitives:[...Object.values(lHn),{...uHn.top1,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-.2,anchor:\"middle_top\"}],ports:[{...Qut.left1,labels:[\"1\"]},{...Qut.right1,labels:[\"2\"]}],size:{width:Eie.width,height:Eie.height},center:{x:Eie.centerX,y:Eie.centerY}}),gHn=ii(vut),cF={paths:{path1:{type:\"path\",points:[{x:-.29,y:.01},{x:.04,y:0}],color:\"primary\",fill:!0},path2:{type:\"path\",points:[{x:.04,y:-.22},{x:.04,y:.22}],color:\"primary\",fill:!0},path3:{type:\"path\",points:[{x:.12,y:-.17},{x:.12,y:.17}],color:\"primary\",fill:!0},path4:{type:\"path\",points:[{x:.19,y:-.06},{x:.19,y:.06}],color:\"primary\",fill:!0}},texts:{right1:{type:\"text\",text:\"{REF}\",x:.31,y:-.02}},refblocks:{left1:{x:-.29,y:.01}},bounds:{minX:-.31,maxX:.31,minY:-.22,maxY:.22,width:.62,height:.45,centerX:0,centerY:0},circles:{}},dHn=Vn(cF).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),hHn=Vn(cF).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),pHn=Vn(cF).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),mHn=Vn(cF).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),_Hn=Vn(cF).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),fHn=Vn(cF).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),gEe={paths:{path11:{type:\"path\",points:[{x:-.52,y:.03},{x:-.18,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.19,y:.04},{x:.52,y:.04}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.31,y:.2},{x:-.31,y:-.11},{x:-.01,y:.04},{x:-.3,y:.2}],color:\"primary\",fill:!0},\"path11-0-9-5\":{type:\"path\",points:[{x:.33,y:.2},{x:.33,y:-.1},{x:.04,y:.04},{x:.33,y:.2}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.04,y:.32},bottom1:{type:\"text\",text:\"{VAL}\",x:.04,y:-.32}},refblocks:{left1:{x:-.52,y:.03},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.32,maxY:.32,width:1.09,height:.63,centerX:0,centerY:0},circles:{}},{paths:Xdr,texts:Zdr,bounds:ehr,refblocks:thr,circles:nhr}=gEe,IHn=Vn(gEe).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),CHn=Vn(gEe).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{VAL}\",\"middle_right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),yHn={paths:{path45:{type:\"path\",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:\"primary\",fill:!1},\"path1-8\":{type:\"path\",points:[{x:.13,y:0},{x:.3,y:0}],color:\"primary\",fill:!1},path46:{type:\"path\",points:[{x:-.13,y:.13},{x:.14,y:0}],color:\"primary\",fill:!1},path47:{type:\"path\",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:\"primary\",fill:!1},path48:{type:\"path\",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:\"primary\",fill:!1},path49:{type:\"path\",points:[{x:-.13,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path25:{type:\"path\",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:\"primary\",fill:!0},path78:{type:\"path\",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:\"primary\",fill:!1},box:{type:\"path\",points:[{x:-.3,y:-.4},{x:.3,y:-.4},{x:.3,y:.4},{x:-.3,y:.4},{x:-.3,y:-.4},{x:-.3,y:.4}],color:\"primary\",fill:!1},\"path48-1\":{type:\"path\",points:[{x:-.3,y:.13},{x:-.54,y:.13}],color:\"primary\",fill:!1},\"path48-2\":{type:\"path\",points:[{x:-.3,y:-.13},{x:-.54,y:-.13}],color:\"primary\",fill:!1},\"path48-3\":{type:\"path\",points:[{x:.3,y:-.13},{x:.54,y:-.13}],color:\"primary\",fill:!1},\"path48-4\":{type:\"path\",points:[{x:.3,y:.13},{x:.54,y:.13}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.43},right1:{type:\"text\",text:\"{REF}\",x:0,y:.43}},refblocks:{left1:{x:-.54,y:.13},left2:{x:-.54,y:-.13},right1:{x:.54,y:-.13},right2:{x:.54,y:.13}},bounds:{minX:-.56,maxX:.56,minY:-.32,maxY:.32,width:1.13,height:.65,centerX:0,centerY:0},circles:{}},Bie=Vn(yHn).labelPort(\"left1\",[\"1\",\"DIN\"]).labelPort(\"left2\",[\"2\",\"POWER\"]).labelPort(\"right1\",[\"3\",\"GND\"]).labelPort(\"right2\",[\"4\",\"DOUT\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),xHn=ii(Bie,\"down\"),EHn=tF(Bie),dEe=ii(Bie,\"up\"),hEe=dEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),pEe=dEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");hEe.anchor=\"middle_left\",pEe.anchor=\"middle_left\",hEe.y+=.21,hEe.x=.44,pEe.y-=.21,pEe.x=.44;var BHn=dEe,bHn={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:-.01,y:0}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:.01,y:-.12},{x:.01,y:.14}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.28,y:-.25},{x:.28,y:-.56}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.28,y:.56},{x:.28,y:.27}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.17,y:-.22},{x:.28,y:-.23},{x:.23,y:-.14}],color:\"primary\",fill:!0},path17:{type:\"path\",points:[{x:.08,y:-.09},{x:.23,y:-.2}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.11},{x:.28,y:.26}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.02,y:-.42}},refblocks:{top1:{x:.28,y:.56},bottom1:{x:.28,y:-.56},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.14,y:.01,radius:.29,color:\"primary\",fill:!1}}},wut=Vn(bHn).changeTextAnchor(\"{VAL}\",\"middle_right\").labelPort(\"left1\",[\"3\"]).labelPort(\"top1\",[\"2\"]).labelPort(\"bottom1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),mEe=ii(wut),_Ee=mEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Put=mEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");_Ee.anchor=\"middle_left\",Put.anchor=\"middle_right\",_Ee.x=.45,_Ee.y+=.065,Put.y+=.065;var SHn=mEe,QHn={paths:{\"path12-1-8-6-9\":{type:\"path\",points:[{x:.02,y:-.02},{x:.02,y:-.1}],color:\"primary\",fill:!1},\"path12-1-5-6\":{type:\"path\",points:[{x:-.47,y:-.19},{x:-.17,y:-.19}],color:\"primary\",fill:!1},\"path12-1-5-6-8\":{type:\"path\",points:[{x:.02,y:.17},{x:.02,y:.11}],color:\"primary\",fill:!1},\"path12-1-8-0\":{type:\"path\",points:[{x:-.15,y:-.03},{x:.2,y:-.19}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.2,y:-.19},{x:.47,y:-.19}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4\":{type:\"path\",points:[{x:.02,y:.12},{x:.02,y:.02}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-3\":{type:\"path\",points:[{x:.08,y:.11},{x:.08,y:.05}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-3-1\":{type:\"path\",points:[{x:-.04,y:.11},{x:-.04,y:.05}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-4\":{type:\"path\",points:[{x:.08,y:.11},{x:-.04,y:.11}],color:\"primary\",fill:!1},\"path14-5\":{type:\"path\",points:[{x:-.01,y:.28},{x:.01,y:.25},{x:.04,y:.23},{x:.06,y:.2}],color:\"primary\",fill:!0},\"path14-5-3\":{type:\"path\",points:[{x:-.01,y:.2},{x:.01,y:.23},{x:.04,y:.25},{x:.06,y:.28}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.38},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.38}},refblocks:{left1:{x:-.47,y:-.19},right1:{x:.47,y:-.19}},bounds:{minX:-.5,maxX:.5,minY:-.38,maxY:.38,width:1,height:.76,centerX:0,centerY:0},circles:{path9:{type:\"circle\",x:.02,y:.24,radius:.06,color:\"primary\",fill:!1}}},Mut=Vn(QHn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Dut=ii(Mut),Nut=Dut.primitives.filter(t=\u003et.type===\"text\"),fEe=Nut.find(t=\u003et.text===\"{VAL}\");fEe.x=-.35,fEe.y=0,fEe.anchor=\"middle_right\";var IEe=Nut.find(t=\u003et.text===\"{REF}\");IEe.y=0,IEe.x=.35,IEe.anchor=\"middle_left\";var vHn=Dut,bie={paths:{path8698:{type:\"path\",points:[{x:-.19796749999999919,y:-.023826854587889912},{x:-.2004570399999992,y:-.018993393814014044},{x:-.2029465799999992,y:-.014174384106555204},{x:-.20543611999999922,y:-.009384187436300498},{x:-.20792565999999923,y:-.004636988132081332},{x:-.21041519999999925,y:5329457033053167e-20},{x:-.21290473999999926,y:.004673092344940184},{x:-.21539427999999927,y:.009209271428771242},{x:-.21788381999999928,y:.013649213595881985},{x:-.2203733599999993,y:.01798089395292432},{x:-.2228628999999993,y:.022192955076609913},{x:-.22535243999999932,y:.02627477703600152},{x:-.22784197999999933,y:.030216542867918667},{x:-.23033151999999935,y:.03400929910178016},{x:-.23282105999999936,y:.03764501096072756},{x:-.23531059999999937,y:.04111661189869628},{x:-.23780013999999938,y:.04441804716802203},{x:-.2402896799999994,y:.04754431114897349},{x:-.2427792199999994,y:.05049147821106258},{x:-.24526875999999942,y:.053256726915861724},{x:-.24775829999999943,y:.05583835741211009},{x:-.25024783999999944,y:.05823580191586174},{x:-.25273737999999946,y:.060449628211062575},{x:-.25522691999999947,y:.0624815361489735},{x:-.2577164599999995,y:.06433434716802203},{x:-.2602059999999995,y:.06601198689869628},{x:-.2626955399999995,y:.06751946096072757},{x:-.2651850799999995,y:.06886282410178016},{x:-.26767461999999953,y:.07004914286791866},{x:-.27016415999999954,y:.0710864520360015},{x:-.27265369999999955,y:.07198370507660991},{x:-.27514323999999957,y:.07275071895292433},{x:-.2776327799999996,y:.07339811359588198},{x:-.2801223199999996,y:.07393724642877124},{x:-.2826118599999996,y:.07438014234494018},{x:-.2851013999999996,y:.07473941957033053},{x:-.28759093999999963,y:.07502821186791866},{x:-.29008047999999964,y:.07526008756369952},{x:-.29257001999999965,y:.07544896589344477},{x:-.29505955999999967,y:.07560903118598594},{x:-.2975490999999997,y:.07575464541211008},{x:-.30003863749999965,y:.07560903118598594},{x:-.3025281749999997,y:.07544896589344477},{x:-.30501771249999965,y:.07526008756369951},{x:-.3075072499999996,y:.07502821186791866},{x:-.30999678749999965,y:.07473941957033052},{x:-.3124863249999996,y:.07438014234494018},{x:-.3149758624999996,y:.07393724642877124},{x:-.31746539999999956,y:.07339811359588198},{x:-.3199549374999996,y:.07275071895292431},{x:-.32244447499999956,y:.07198370507660991},{x:-.32493401249999954,y:.0710864520360015},{x:-.32742354999999956,y:.07004914286791866},{x:-.32991308749999954,y:.06886282410178016},{x:-.3324026249999995,y:.06751946096072756},{x:-.33489216249999954,y:.06601198689869628},{x:-.3373816999999995,y:.06433434716802203},{x:-.3398712374999995,y:.06248153614897349},{x:-.3423607749999995,y:.06044962821106258},{x:-.3448503124999994,y:.05823580191586174},{x:-.34733984999999945,y:.05583835741211009},{x:-.3498293874999995,y:.053256726915861724},{x:-.35231892499999945,y:.050491478211062576},{x:-.3548084624999994,y:.0475443111489735},{x:-.3572979999999994,y:.04441804716802203},{x:-.35978753749999937,y:.04111661189869628},{x:-.3622770749999994,y:.03764501096072756},{x:-.36476661249999937,y:.03400929910178016},{x:-.36725614999999934,y:.030216542867918673},{x:-.36974568749999936,y:.02627477703600152},{x:-.37223522499999934,y:.022192955076609917},{x:-.3747247624999993,y:.017980893952924324},{x:-.37721429999999934,y:.013649213595881985},{x:-.3797038374999993,y:.00920927142877125},{x:-.3821933749999993,y:.004673092344940191},{x:-.3846829124999993,y:5329457033053514e-20},{x:-.3871724499999993,y:-.004636988132081328},{x:-.38966198749999925,y:-.009384187436300498},{x:-.3921515249999992,y:-.014174384106555197},{x:-.39464106249999925,y:-.01899339381401404},{x:-.3971305999999992,y:-.023826854587889912}],color:\"primary\",fill:!1},path8700:{type:\"path\",points:[{x:.0011955000000007932,y:-.02382615458789039},{x:-.00129403749999919,y:-.01899269131401453},{x:-.0037835749999991734,y:-.014173679106555696},{x:-.006273112499999156,y:-.009383479936300985},{x:-.00876264999999914,y:-.004636278132081827},{x:-.011252187499999122,y:5400707033003174e-20},{x:-.013741724999999105,y:.004673807344939681},{x:-.016231262499999087,y:.009209988928770731},{x:-.018720799999999073,y:.013649933595881476},{x:-.021210337499999055,y:.017981616452923805},{x:-.023699874999999038,y:.022193680076609393},{x:-.026189412499999024,y:.026275504536001},{x:-.028678949999999002,y:.030217272867918137},{x:-.03116848749999899,y:.034010031601779636},{x:-.03365802499999897,y:.03764574596072702},{x:-.03614756249999895,y:.04111734939869574},{x:-.03863709999999894,y:.04441878716802149},{x:-.04112663749999892,y:.04754505364897295},{x:-.043616174999998904,y:.05049222321106203},{x:-.04610571249999888,y:.05325747441586117},{x:-.04859524999999887,y:.055839107412109526},{x:-.051084787499998854,y:.05823655441586117},{x:-.05357432499999884,y:.06045038321106201},{x:-.05606386249999881,y:.06248229364897292},{x:-.0585533999999988,y:.06433510716802145},{x:-.061042937499998784,y:.0660127493986957},{x:-.06353247499999877,y:.06752022596072697},{x:-.06602201249999876,y:.06886359160177957},{x:-.06851154999999873,y:.07004991286791806},{x:-.07100108749999871,y:.07108722453600091},{x:-.0734906249999987,y:.0719844800766093},{x:-.07598016249999869,y:.07275149645292371},{x:-.07846969999999867,y:.07339889359588138},{x:-.08095923749999864,y:.07393802892877062},{x:-.08344877499999863,y:.07438092734493956},{x:-.08593831249999861,y:.07474020707032991},{x:-.0884278499999986,y:.07502900186791804},{x:-.09091738749999859,y:.07526088006369888},{x:-.09340692499999856,y:.07544976089344414},{x:-.09589646249999854,y:.0756098286859853},{x:-.09838599999999853,y:.07575544541210943},{x:-.10087553999999854,y:.0756098286859853},{x:-.10336507999999855,y:.07544976089344414},{x:-.10585461999999857,y:.07526088006369887},{x:-.10834415999999858,y:.07502900186791804},{x:-.11083369999999859,y:.0747402070703299},{x:-.1133232399999986,y:.07438092734493956},{x:-.11581277999999862,y:.07393802892877062},{x:-.11830231999999863,y:.07339889359588138},{x:-.12079185999999864,y:.07275149645292371},{x:-.12328139999999865,y:.0719844800766093},{x:-.12577093999999867,y:.07108722453600091},{x:-.12826047999999868,y:.07004991286791806},{x:-.1307500199999987,y:.06886359160177957},{x:-.1332395599999987,y:.06752022596072697},{x:-.13572909999999871,y:.0660127493986957},{x:-.13821863999999873,y:.06433510716802145},{x:-.14070817999999874,y:.06248229364897291},{x:-.14319771999999875,y:.06045038321106202},{x:-.14568725999999876,y:.05823655441586117},{x:-.14817679999999878,y:.055839107412109526},{x:-.1506663399999988,y:.05325747441586117},{x:-.1531558799999988,y:.05049222321106202},{x:-.1556454199999988,y:.047545053648972956},{x:-.15813495999999883,y:.04441878716802149},{x:-.16062449999999884,y:.04111734939869574},{x:-.16311403999999885,y:.03764574596072702},{x:-.16560357999999886,y:.034010031601779636},{x:-.16809311999999887,y:.03021727286791814},{x:-.1705826599999989,y:.026275504536001},{x:-.1730721999999989,y:.022193680076609396},{x:-.1755617399999989,y:.017981616452923805},{x:-.17805127999999892,y:.013649933595881474},{x:-.18054081999999894,y:.00920998892877074},{x:-.18303035999999895,y:.0046738073449396865},{x:-.18551989999999896,y:5400707033003521e-20},{x:-.18800943999999897,y:-.004636278132081827},{x:-.19049897999999899,y:-.009383479936300985},{x:-.192988519999999,y:-.01417367910655569},{x:-.19547805999999898,y:-.018992691314014522},{x:-.19796759999999902,y:-.02382615458789039}],color:\"primary\",fill:!1},path8702:{type:\"path\",points:[{x:.2003586000000006,y:-.02382615458789039},{x:.19786906000000057,y:-.01899269131401453},{x:.19537952000000058,y:-.014173679106555696},{x:.19288998000000057,y:-.009383479936300985},{x:.1904004400000006,y:-.004636278132081827},{x:.18791090000000055,y:5400707033003174e-20},{x:.1854213600000005,y:.004673807344939681},{x:.18293182000000052,y:.009209988928770731},{x:.1804422800000005,y:.013649933595881476},{x:.17795274000000053,y:.017981616452923805},{x:.17546320000000049,y:.022193680076609393},{x:.17297366000000047,y:.026275504536001},{x:.17048412000000046,y:.030217272867918137},{x:.16799458000000045,y:.034010031601779636},{x:.16550504000000044,y:.03764574596072702},{x:.16301550000000042,y:.04111734939869574},{x:.1605259600000004,y:.04441878716802149},{x:.1580364200000004,y:.04754505364897295},{x:.1555468800000004,y:.05049222321106203},{x:.15305734000000037,y:.05325747441586117},{x:.15056780000000036,y:.055839107412109526},{x:.14807826000000035,y:.05823655441586117},{x:.14558872000000034,y:.06045038321106201},{x:.14309918000000033,y:.06248229364897292},{x:.1406096400000003,y:.06433510716802145},{x:.1381201000000003,y:.0660127493986957},{x:.1356305600000003,y:.06752022596072697},{x:.13314102000000028,y:.06886359160177957},{x:.13065148000000026,y:.07004991286791806},{x:.12816194000000025,y:.07108722453600091},{x:.12567240000000024,y:.0719844800766093},{x:.12318286000000023,y:.07275149645292371},{x:.12069332000000021,y:.07339889359588138},{x:.1182037800000002,y:.07393802892877062},{x:.11571424000000019,y:.07438092734493956},{x:.11322470000000018,y:.07474020707032991},{x:.11073516000000017,y:.07502900186791804},{x:.10824562000000015,y:.07526088006369888},{x:.10575608000000014,y:.07544976089344414},{x:.10326654000000013,y:.0756098286859853},{x:.10077700000000012,y:.07575544541210943},{x:.09828746250000013,y:.0756098286859853},{x:.09579792500000014,y:.07544976089344414},{x:.09330838750000017,y:.07526088006369887},{x:.09081885000000019,y:.07502900186791804},{x:.0883293125000002,y:.0747402070703299},{x:.08583977500000022,y:.07438092734493956},{x:.08335023750000023,y:.07393802892877062},{x:.08086070000000026,y:.07339889359588138},{x:.07837116250000027,y:.07275149645292371},{x:.07588162500000029,y:.0719844800766093},{x:.0733920875000003,y:.07108722453600091},{x:.07090255000000031,y:.07004991286791806},{x:.06841301250000034,y:.06886359160177957},{x:.06592347500000036,y:.06752022596072697},{x:.06343393750000037,y:.0660127493986957},{x:.060944400000000384,y:.06433510716802145},{x:.0584548625000004,y:.06248229364897291},{x:.05596532500000043,y:.06045038321106202},{x:.05347578750000044,y:.05823655441586117},{x:.050986250000000455,y:.055839107412109526},{x:.04849671250000047,y:.05325747441586117},{x:.04600717500000048,y:.05049222321106202},{x:.04351763750000051,y:.047545053648972956},{x:.041028100000000525,y:.04441878716802149},{x:.03853856250000054,y:.04111734939869574},{x:.036049025000000554,y:.03764574596072702},{x:.03355948750000057,y:.034010031601779636},{x:.031069950000000596,y:.03021727286791814},{x:.02858041250000061,y:.026275504536001},{x:.026090875000000624,y:.022193680076609396},{x:.023601337500000638,y:.017981616452923805},{x:.021111800000000652,y:.013649933595881474},{x:.01862226250000068,y:.00920998892877074},{x:.016132725000000694,y:.0046738073449396865},{x:.013643187500000709,y:5400707033003521e-20},{x:.011153650000000723,y:-.004636278132081827},{x:.008664112500000737,y:-.009383479936300985},{x:.006174575000000764,y:-.01417367910655569},{x:.0036850375000007786,y:-.018992691314014522},{x:.0011955000000007932,y:-.02382615458789039}],color:\"primary\",fill:!1},path8704:{type:\"path\",points:[{x:.3995216000000006,y:-.02382615458789039},{x:.39703206250000056,y:-.01899269131401453},{x:.3945425250000006,y:-.014173679106555696},{x:.3920529875000006,y:-.009383479936300985},{x:.38956345000000064,y:-.004636278132081827},{x:.38707391250000067,y:5400707033003174e-20},{x:.3845843750000007,y:.004673807344939681},{x:.38209483750000073,y:.009209988928770731},{x:.37960530000000076,y:.013649933595881476},{x:.3771157625000008,y:.017981616452923805},{x:.37462622500000076,y:.022193680076609393},{x:.37213668750000073,y:.026275504536001},{x:.36964715000000076,y:.030217272867918137},{x:.3671576125000008,y:.034010031601779636},{x:.3646680750000008,y:.03764574596072702},{x:.36217853750000084,y:.04111734939869574},{x:.3596890000000008,y:.04441878716802149},{x:.3571994625000009,y:.04754505364897295},{x:.35470992500000087,y:.05049222321106203},{x:.35222038750000095,y:.05325747441586117},{x:.3497308500000009,y:.055839107412109526},{x:.3472413125000009,y:.05823655441586117},{x:.344751775000001,y:.06045038321106201},{x:.34226223750000095,y:.06248229364897292},{x:.33977270000000104,y:.06433510716802145},{x:.337283162500001,y:.0660127493986957},{x:.334793625000001,y:.06752022596072697},{x:.33230408750000107,y:.06886359160177957},{x:.3298145500000011,y:.07004991286791806},{x:.32732501250000107,y:.07108722453600091},{x:.3248354750000011,y:.0719844800766093},{x:.3223459375000011,y:.07275149645292371},{x:.3198564000000011,y:.07339889359588138},{x:.3173668625000012,y:.07393802892877062},{x:.31487732500000115,y:.07438092734493956},{x:.3123877875000012,y:.07474020707032991},{x:.3098982500000012,y:.07502900186791804},{x:.30740871250000124,y:.07526088006369888},{x:.30491917500000126,y:.07544976089344414},{x:.30242963750000124,y:.0756098286859853},{x:.29994010000000126,y:.07575544541210943},{x:.29745056000000125,y:.0756098286859853},{x:.29496102000000124,y:.07544976089344414},{x:.2924714800000012,y:.07526088006369887},{x:.2899819400000012,y:.07502900186791804},{x:.2874924000000012,y:.0747402070703299},{x:.2850028600000012,y:.07438092734493956},{x:.2825133200000012,y:.07393802892877062},{x:.28002378000000117,y:.07339889359588138},{x:.27753424000000115,y:.07275149645292371},{x:.27504470000000114,y:.0719844800766093},{x:.27255516000000113,y:.07108722453600091},{x:.2700656200000011,y:.07004991286791806},{x:.2675760800000011,y:.06886359160177957},{x:.2650865400000011,y:.06752022596072697},{x:.2625970000000011,y:.0660127493986957},{x:.26010746000000107,y:.06433510716802145},{x:.25761792000000105,y:.06248229364897291},{x:.25512838000000104,y:.06045038321106202},{x:.25263884000000103,y:.05823655441586117},{x:.250149300000001,y:.055839107412109526},{x:.247659760000001,y:.05325747441586117},{x:.245170220000001,y:.05049222321106202},{x:.24268068000000098,y:.047545053648972956},{x:.24019114000000097,y:.04441878716802149},{x:.23770160000000096,y:.04111734939869574},{x:.23521206000000094,y:.03764574596072702},{x:.23272252000000093,y:.034010031601779636},{x:.23023298000000092,y:.03021727286791814},{x:.2277434400000009,y:.026275504536001},{x:.2252539000000009,y:.022193680076609396},{x:.22276436000000088,y:.017981616452923805},{x:.22027482000000087,y:.013649933595881474},{x:.21778528000000086,y:.00920998892877074},{x:.21529574000000085,y:.0046738073449396865},{x:.21280620000000083,y:5400707033003521e-20},{x:.21031666000000082,y:-.004636278132081827},{x:.2078271200000008,y:-.009383479936300985},{x:.2053375800000008,y:-.01417367910655569},{x:.20284804000000078,y:-.018992691314014522},{x:.20035850000000077,y:-.02382615458789039}],color:\"primary\",fill:!1},path8706:{type:\"path\",points:[{x:-.40026109999999937,y:-.022544054587890106},{x:-.5272914999999991,y:-.022544054587890106}],color:\"primary\",fill:!1},\"path8706-5\":{type:\"path\",points:[{x:.5282280000000006,y:-.027111054587890093},{x:.4011975999999997,y:-.027111054587890093}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.0020145999999989783,y:.22997364541210996},bottom1:{type:\"text\",text:\"{VAL}\",x:-.002185205294839676,y:-.22997364541210996}},refblocks:{left1:{x:-.5279125,y:-.021272154587890446},right1:{x:.5279125,y:-.026521254587889898}},bounds:{minX:-.556070941,maxX:.556070941,minY:-.22997364541210996,maxY:.22997364541210996,width:1.112141882,height:.4599472908242199,centerX:0,centerY:0},circles:{}},wHn=Vn(bie).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\",{x:-.5,y:0}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.5,y:0}).build(),PHn=Vn(bie).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.5}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.5}).build(),MHn=Vn(bie).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),DHn=Vn(bie).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Rut={paths:{path11:{type:\"path\",points:[{x:-.54,y:-.06},{x:-.15,y:-.06}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.13,y:-.05},{x:-.13,y:-.18}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.13,y:.08},{x:.13,y:-.05}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.13,y:-.18},{x:-.13,y:.08}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.13,y:.08},{x:.13,y:-.18}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.14,y:-.05},{x:.54,y:-.06}],color:\"primary\",fill:!1},\"path25-0-9-8\":{type:\"path\",points:[{x:-.03,y:.39},{x:-.05,y:.47},{x:-.08,y:.39}],color:\"primary\",fill:!0},\"path78-6-5-5\":{type:\"path\",points:[{x:-.05,y:.27},{x:-.05,y:.29},{x:-.05,y:.41},{x:-.05,y:.42}],color:\"primary\",fill:!1},\"path25-0-9-8-2\":{type:\"path\",points:[{x:.07,y:.39},{x:.04,y:.47},{x:.02,y:.39}],color:\"primary\",fill:!0},\"path78-6-5-5-7\":{type:\"path\",points:[{x:.04,y:.27},{x:.04,y:.29},{x:.04,y:.41},{x:.04,y:.42}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:.03,y:.06},{x:.03,y:-.16}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.38,y:.38},bottom1:{type:\"text\",text:\"{VAL}\",x:.38,y:-.47}},refblocks:{left1:{x:-.54,y:-.06},right1:{x:.54,y:-.06}},bounds:{minX:-.57,maxX:.57,minY:-.47,maxY:.47,width:1.14,height:.93,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:-.05,radius:.29,color:\"primary\",fill:!1}}};Rut.bounds.width+=.2;var Sie=Vn(Rut).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),CEe=ii(Sie,\"down\"),yEe=CEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),xEe=CEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");yEe.anchor=\"middle_left\",xEe.anchor=\"middle_left\",yEe.y+=.9,yEe.x=.3,xEe.y-=.1,xEe.x=.3;var NHn=CEe,EEe=ii(Sie,\"left\"),BEe=EEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),bEe=EEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");BEe.anchor=\"middle_left\",bEe.anchor=\"middle_left\",BEe.y+=.71,BEe.x=.44,bEe.y-=.71,bEe.x=.44;var RHn=EEe,SEe=ii(Sie,\"up\"),QEe=SEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),vEe=SEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");QEe.anchor=\"middle_left\",vEe.anchor=\"middle_left\",QEe.y+=.1,QEe.x=.3,vEe.y-=.71,vEe.x=.3;var THn=SEe,kHn={paths:{path45:{type:\"path\",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:\"primary\",fill:!1},\"path1-8\":{type:\"path\",points:[{x:.13,y:0},{x:.54,y:0}],color:\"primary\",fill:!1},path46:{type:\"path\",points:[{x:-.13,y:.13},{x:.14,y:0}],color:\"primary\",fill:!1},path47:{type:\"path\",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:\"primary\",fill:!1},path48:{type:\"path\",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:\"primary\",fill:!1},path49:{type:\"path\",points:[{x:-.13,y:0},{x:-.54,y:0}],color:\"primary\",fill:!1},path25:{type:\"path\",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:\"primary\",fill:!0},path78:{type:\"path\",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.21},right1:{type:\"text\",text:\"{REF}\",x:0,y:.41}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.13,height:.65,centerX:0,centerY:0},circles:{}},{paths:FHn,texts:Tut,bounds:Qie,refblocks:kut,circles:LHn}=kHn,wEe=Nl({primitives:[...Object.values(FHn),...Object.values(LHn),{...Tut.bottom1,anchor:\"middle_top\"},{...Tut.right1,anchor:\"middle_bottom\"}],ports:[{...kut.left1,labels:[\"1\"]},{...kut.right1,labels:[\"2\"]}],size:{width:Qie.width,height:Qie.height},center:{x:Qie.centerX,y:Qie.centerY}}),PEe=ii(wEe,\"up\"),MEe=PEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),DEe=PEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");MEe.anchor=\"middle_left\",DEe.anchor=\"middle_left\",MEe.y+=.21,MEe.x=.21,DEe.y-=.21,DEe.x=.21;var Fut=PEe,NEe=eF(Fut),REe=NEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),TEe=NEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");REe.anchor=\"middle_left\",TEe.anchor=\"middle_left\",REe.y+=.4,REe.x=.2,TEe.y-=.41,TEe.x=.2;var HHn=NEe,OHn=tF(wEe),GHn={paths:{path11:{type:\"path\",points:[{x:-.52,y:-.01},{x:-.18,y:-.01}],color:\"primary\",fill:!1},\"path11-2\":{type:\"path\",points:[{x:-.17,y:-.11},{x:-.17,y:.08}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-.17,y:-.12},{x:.16,y:-.12}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:-.17,y:.08},{x:.16,y:.08}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.17,y:-.01},{x:.52,y:-.01}],color:\"primary\",fill:!1},\"path11-2-1\":{type:\"path\",points:[{x:.16,y:-.12},{x:.16,y:.08}],color:\"primary\",fill:!1},\"path25-0-9\":{type:\"path\",points:[{x:-.4,y:-.21},{x:-.33,y:-.18},{x:-.34,y:-.27}],color:\"primary\",fill:!0},\"path78-6-5\":{type:\"path\",points:[{x:-.45,y:-.34},{x:-.44,y:-.32},{x:-.35,y:-.22},{x:-.35,y:-.22}],color:\"primary\",fill:!1},\"path25-0-9-0\":{type:\"path\",points:[{x:-.3,y:-.34},{x:-.22,y:-.31},{x:-.24,y:-.4}],color:\"primary\",fill:!0},\"path78-6-5-9\":{type:\"path\",points:[{x:-.35,y:-.46},{x:-.34,y:-.45},{x:-.25,y:-.35},{x:-.25,y:-.35}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.17,y:-.41},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:.46}},refblocks:{left1:{x:-.52,y:-.01},right1:{x:.52,y:-.01}},bounds:{width:1.1,height:.62,centerX:0,centerY:-.02},circles:{path1:{type:\"circle\",x:0,y:-.02,radius:.28,color:\"primary\",fill:!1}}},{paths:YHn,texts:Lut,bounds:vie,refblocks:Hut,circles:UHn}=GHn,Out=Nl({primitives:[...Object.values(YHn),...Object.values(UHn),{...Lut.top1,anchor:\"middle_left\",x:0},{...Lut.bottom1,anchor:\"middle_left\",x:0}],ports:[{...Hut.left1,labels:[\"1\"]},{...Hut.right1,labels:[\"2\"]}],size:{width:vie.width,height:vie.height},center:{x:vie.centerX,y:vie.centerY}}),Gut=ii(Out),Yut=Gut.primitives.filter(t=\u003et.type===\"text\"),kEe=Yut.find(t=\u003et.text===\"{VAL}\");kEe.x=-.35,kEe.y=0,kEe.anchor=\"middle_right\";var FEe=Yut.find(t=\u003et.text===\"{REF}\");FEe.y=0,FEe.x=.35,FEe.anchor=\"middle_left\";var KHn=Gut,VHn={paths:{path208:{type:\"path\",points:[{x:.38,y:.13},{x:.52,y:-.13}],color:\"primary\",fill:!1},path209:{type:\"path\",points:[{x:.25,y:-.13},{x:.38,y:.13}],color:\"primary\",fill:!1},path210:{type:\"path\",points:[{x:.52,y:-.13},{x:.25,y:-.13}],color:\"primary\",fill:!1},path211:{type:\"path\",points:[{x:.25,y:.13},{x:.52,y:.13}],color:\"primary\",fill:!1},path212:{type:\"path\",points:[{x:.12,y:-.4},{x:.38,y:-.4}],color:\"primary\",fill:!1},path213:{type:\"path\",points:[{x:.38,y:.4},{x:.12,y:.4}],color:\"primary\",fill:!1},path214:{type:\"path\",points:[{x:.12,y:.54},{x:.12,y:.18}],color:\"primary\",fill:!1},path215:{type:\"path\",points:[{x:.12,y:-.54},{x:.12,y:0}],color:\"primary\",fill:!1},path216:{type:\"path\",points:[{x:.38,y:-.4},{x:.38,y:.4}],color:\"primary\",fill:!1},path217:{type:\"path\",points:[{x:-.14,y:.26},{x:-.14,y:-.27}],color:\"primary\",fill:!1},path218:{type:\"path\",points:[{x:-.22,y:-.27},{x:-.22,y:.26}],color:\"primary\",fill:!1},path219:{type:\"path\",points:[{x:-.54,y:-.27},{x:-.22,y:-.27}],color:\"primary\",fill:!1},path220:{type:\"path\",points:[{x:-.14,y:-.19},{x:.12,y:-.19}],color:\"primary\",fill:!1},path221:{type:\"path\",points:[{x:-.14,y:.18},{x:.12,y:.18}],color:\"primary\",fill:!1},path222:{type:\"path\",points:[{x:-.07,y:0},{x:.12,y:0}],color:\"primary\",fill:!1}},texts:{right1:{type:\"text\",text:\"{VAL}\",x:.57,y:.02},right2:{type:\"text\",text:\"{REF}\",x:.57,y:.21}},refblocks:{top1:{x:.12,y:.54},bottom1:{x:.12,y:-.54},left1:{x:-.54,y:-.27}},bounds:{centerX:0,centerY:0}};function VV(t,e){return{width:Math.max(...e.map(n=\u003eMath.abs(n.x-t.x)))*2,height:Math.max(...e.map(n=\u003eMath.abs(n.y-t.y)))*2}}var{paths:zHn,texts:Uut,bounds:Kut,refblocks:lF}=VHn,Vut={x:Kut.centerX+.2,y:Kut.centerY},zut=Nl({primitives:[...Object.values(zHn),{...Uut.right1,anchor:\"middle_left\"},{...Uut.right2,anchor:\"middle_left\"}],ports:[{...lF.top1,labels:[\"1\"]},{...lF.bottom1,labels:[\"2\"]},{...lF.left1,labels:[\"3\"]}],size:VV(Vut,[lF.top1,lF.bottom1,lF.left1]),center:Vut}),LEe=ii(zut),Jut=LEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),HEe=LEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Jut.anchor=\"middle_top\",HEe.anchor=\"middle_top\",Jut.x=HEe.x,HEe.y+=.15;var JHn=LEe,WHn={paths:{\"path12-1-8-6-9\":{type:\"path\",points:[{x:.01,y:.07},{x:.01,y:-.01}],color:\"primary\",fill:!1},\"path12-1-5-6\":{type:\"path\",points:[{x:-.47,y:-.09},{x:-.17,y:-.09}],color:\"primary\",fill:!1},\"path12-1-8-0\":{type:\"path\",points:[{x:-.16,y:-.01},{x:.17,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.2,y:-.09},{x:.47,y:-.09}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:-.1,y:.06},{x:-.1,y:.06},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.09,y:.09},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.11},{x:-.09,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.05,y:.14},{x:-.05,y:.15},{x:-.05,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.01,y:.16},{x:-.01,y:.16},{x:0,y:.16},{x:0,y:.16},{x:0,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.05,y:.15},{x:.05,y:.15},{x:.05,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.08,y:.14},{x:.08,y:.13},{x:.08,y:.13},{x:.08,y:.13},{x:.09,y:.13},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.1,y:.11},{x:.1,y:.11},{x:.1,y:.1},{x:.1,y:.1},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.06},{x:.11,y:.06},{x:.1,y:.06},{x:.1,y:.06},{x:.09,y:.06},{x:.09,y:.06},{x:.08,y:.06},{x:.07,y:.06},{x:.07,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.04,y:.06},{x:.03,y:.06},{x:.03,y:.06},{x:.02,y:.06},{x:.01,y:.06},{x:.01,y:.06},{x:0,y:.06},{x:-.01,y:.06},{x:-.01,y:.06},{x:-.02,y:.06},{x:-.03,y:.06},{x:-.03,y:.06},{x:-.04,y:.06},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.07,y:.06},{x:-.07,y:.06},{x:-.08,y:.06},{x:-.09,y:.06},{x:-.09,y:.06}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:-.16,y:-.27}},refblocks:{left1:{x:-.47,y:-.09},right1:{x:.47,y:-.09}},bounds:{width:1,height:.53,centerX:0,centerY:0},circles:{}},{paths:jHn,texts:Wut,bounds:wie,refblocks:jut,circles:$Hn}=WHn,$ut=Nl({primitives:[...Object.values(jHn),...Object.values($Hn),{...Wut.top1,anchor:\"middle_bottom\",x:0},{...Wut.bottom1,anchor:\"middle_top\",x:0}],ports:[{...jut.left1,labels:[\"1\"]},{...jut.right1,labels:[\"2\"]}],size:{width:wie.width,height:wie.height},center:{x:wie.centerX+.006,y:wie.centerY+.06}}),OEe=ii($ut),zV=OEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Pie=OEe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");zV.anchor=\"middle_left\",Pie.anchor=\"middle_right\",zV.x=zV.x-.03,zV.y=zV.y,Pie.x=Pie.x,Pie.y=0;var qHn=OEe,Jl=({horizontalSymbol:t,verticalSymbol:e,gateSide:n,drainSide:o})=\u003e{let i=n===\"left\"||n===\"right\",r=o===\"left\"||o===\"right\";if(i===r)throw new Error(`Invalid MOSFET orientation: gate ${n}, drain ${o}. Gate and drain must be perpendicular.`);let s=i?t:e;return(n===\"right\"||r\u0026\u0026o===\"left\")\u0026\u0026(s=tF(s)),(n===\"bottom\"||!r\u0026\u0026o===\"bottom\")\u0026\u0026(s=eF(s)),s},XHn={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:ZHn,texts:qut,bounds:Xut,refblocks:uF,circles:eOn}=XHn,Zut={x:Xut.centerX,y:Xut.centerY},G9=Nl({primitives:[...Object.values(ZHn),...Object.values(eOn),{...qut.top1,anchor:\"middle_right\",x:0},{...qut.bottom1,anchor:\"middle_right\",x:0}],ports:[{...uF.top1,labels:[\"1\",\"drain\"]},{...uF.bottom1,labels:[\"2\",\"source\"]},{...uF.left1,labels:[\"3\",\"gate\"]}],size:VV(Zut,[uF.top1,uF.bottom1,uF.left1]),center:Zut}),egt=ii(G9),tgt=egt.primitives.filter(t=\u003et.type===\"text\"),GEe=tgt.find(t=\u003et.text===\"{VAL}\");GEe.x=-.35,GEe.y=0,GEe.anchor=\"middle_right\";var YEe=tgt.find(t=\u003et.text===\"{REF}\");YEe.y=0,YEe.x=.35,YEe.anchor=\"middle_left\";var M8=egt,tOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"bottom\",drainSide:\"left\"}),nOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"bottom\",drainSide:\"right\"}),oOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"left\",drainSide:\"bottom\"}),iOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"left\",drainSide:\"top\"}),rOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"right\",drainSide:\"bottom\"}),sOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"right\",drainSide:\"top\"}),aOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"top\",drainSide:\"left\"}),AOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:\"top\",drainSide:\"right\"}),cOn={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-8-3-7\":{type:\"path\",points:[{x:.09,y:.15},{x:.09,y:.07}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},\"path2-8-3\":{type:\"path\",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:\"primary\",fill:!1},\"path2-8-3-2\":{type:\"path\",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:lOn,texts:ngt,bounds:ogt,refblocks:gF,circles:uOn}=cOn,igt={x:ogt.centerX,y:ogt.centerY},Y9=Nl({primitives:[...Object.values(lOn),...Object.values(uOn),{...ngt.top1,anchor:\"middle_right\",x:0},{...ngt.bottom1,anchor:\"middle_right\",x:0}],ports:[{...gF.top1,labels:[\"1\",\"drain\"]},{...gF.bottom1,labels:[\"2\",\"source\"]},{...gF.left1,labels:[\"3\",\"gate\"]}],size:VV(igt,[gF.top1,gF.bottom1,gF.left1]),center:igt}),rgt=ii(Y9),sgt=rgt.primitives.filter(t=\u003et.type===\"text\"),UEe=sgt.find(t=\u003et.text===\"{VAL}\");UEe.x=-.35,UEe.y=0,UEe.anchor=\"middle_right\";var KEe=sgt.find(t=\u003et.text===\"{REF}\");KEe.y=0,KEe.x=.35,KEe.anchor=\"middle_left\";var D8=rgt,gOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"bottom\",drainSide:\"left\"}),dOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"bottom\",drainSide:\"right\"}),hOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"left\",drainSide:\"bottom\"}),pOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"left\",drainSide:\"top\"}),mOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"right\",drainSide:\"bottom\"}),_On=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"right\",drainSide:\"top\"}),fOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"top\",drainSide:\"left\"}),IOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:\"top\",drainSide:\"right\"}),COn={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.28,y:.55},{x:.28,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.11},{x:.29,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:-.08,y:.06},{x:-.08,y:-.07},{x:.01,y:0},{x:-.08,y:.06}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.15,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:yOn,texts:agt,bounds:Mie,refblocks:VEe,circles:xOn}=COn,Agt=Nl({primitives:[...Object.values(yOn),...Object.values(xOn),{...agt.top1,anchor:\"middle_right\",x:0},{...agt.bottom1,anchor:\"middle_right\",x:0}],ports:[{...VEe.top1,labels:[\"1\",\"drain\"]},{...VEe.bottom1,labels:[\"2\",\"source\"]},{...VEe.left1,labels:[\"3\",\"gate\"]}],size:{width:Mie.width,height:Mie.height},center:{x:Mie.centerX,y:Mie.centerY}}),cgt=ii(Agt),lgt=cgt.primitives.filter(t=\u003et.type===\"text\"),zEe=lgt.find(t=\u003et.text===\"{VAL}\");zEe.x=-.35,zEe.y=0,zEe.anchor=\"middle_right\";var JEe=lgt.find(t=\u003et.text===\"{REF}\");JEe.y=0,JEe.x=.35,JEe.anchor=\"middle_left\";var EOn=cgt,BOn={paths:{diag1:{type:\"path\",points:[{x:-.1,y:-.1},{x:.1,y:.1}],color:\"primary\",fill:!1},diag2:{type:\"path\",points:[{x:-.1,y:.1},{x:.1,y:-.1}],color:\"primary\",fill:!1},stem:{type:\"path\",points:[{x:-.2,y:0},{x:0,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.2,y:0}},bounds:{centerX:0,centerY:0}},{paths:bOn,bounds:ugt,refblocks:SOn}=BOn,Die=Vn({primitives:[...Object.values(bOn)],ports:[{...SOn.left1,labels:[\"1\"]}],center:{x:ugt.centerX,y:ugt.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).build(),QOn=ii(Die,\"down\"),vOn=ii(Die,\"left\"),wOn=ii(Die,\"up\"),dF={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:.28,y:.24},{x:.08,y:.11}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:.25},{x:.29,y:.55}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.19,y:-.1},{x:.12,y:-.2},{x:.22,y:-.2},{x:.19,y:-.1}],color:\"primary\",fill:!0}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{\"path1-0\":{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:POn,bounds:Nie,refblocks:WEe,circles:MOn}=dF,DOn=Vn({primitives:[...Object.values(POn),...Object.values(MOn),{type:\"text\",text:\"{REF}\",x:-.3,y:.5094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.5094553499999995}],ports:[{...WEe.top1,labels:[\"1\",\"collector\"]},{...WEe.bottom1,labels:[\"3\",\"emitter\"]},{...WEe.left1,labels:[\"2\",\"base\"]}],size:{width:Nie.width,height:Nie.height},center:{x:Nie.centerX,y:Nie.centerY}}).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_right\").build(),{paths:NOn,bounds:Rie,refblocks:jEe,circles:ROn}=dF,TOn=Vn({primitives:[...Object.values(NOn),...Object.values(ROn),{type:\"text\",text:\"{REF}\",x:.55,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.4094553499999995}],ports:[{...jEe.top1,labels:[\"1\",\"collector\"]},{...jEe.bottom1,labels:[\"3\",\"emitter\"]},{...jEe.left1,labels:[\"2\",\"base\"]}],size:{width:Rie.width,height:Rie.height},center:{x:Rie.centerX,y:Rie.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:kOn,bounds:Tie,refblocks:$Ee,circles:FOn}=dF,LOn=Vn({primitives:[...Object.values(kOn),...Object.values(FOn),{type:\"text\",text:\"{REF}\",x:-.5,y:.3094553499999995},{type:\"text\",text:\"{VAL}\",x:.55,y:.3094553499999995}],ports:[{...$Ee.top1,labels:[\"1\",\"collector\"]},{...$Ee.bottom1,labels:[\"3\",\"emitter\"]},{...$Ee.left1,labels:[\"2\",\"base\"]}],size:{width:Tie.width,height:Tie.height},center:{x:Tie.centerX,y:Tie.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:HOn,bounds:kie,refblocks:qEe,circles:OOn}=dF,GOn=Vn({primitives:[...Object.values(HOn),...Object.values(OOn),{type:\"text\",text:\"{REF}\",x:.55,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.4094553499999995}],ports:[{...qEe.top1,labels:[\"1\",\"collector\"]},{...qEe.bottom1,labels:[\"3\",\"emitter\"]},{...qEe.left1,labels:[\"2\",\"base\"]}],size:{width:kie.width,height:kie.height},center:{x:kie.centerX,y:kie.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:YOn,bounds:Fie,refblocks:XEe,circles:UOn}=dF,KOn=Vn({primitives:[...Object.values(YOn),...Object.values(UOn),{type:\"text\",text:\"{REF}\",x:-.3,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:.4094553499999995}],ports:[{...XEe.top1,labels:[\"1\",\"collector\"]},{...XEe.bottom1,labels:[\"3\",\"emitter\"]},{...XEe.left1,labels:[\"2\",\"base\"]}],size:{width:Fie.width,height:Fie.height},center:{x:Fie.centerX,y:Fie.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:VOn,bounds:Lie,refblocks:ZEe,circles:zOn}=dF,JOn=Vn({primitives:[...Object.values(VOn),...Object.values(zOn),{type:\"text\",text:\"{REF}\",x:-.3,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:.4094553499999995}],ports:[{...ZEe.top1,labels:[\"1\",\"collector\"]},{...ZEe.bottom1,labels:[\"3\",\"emitter\"]},{...ZEe.left1,labels:[\"2\",\"base\"]}],size:{width:Lie.width,height:Lie.height},center:{x:Lie.centerX,y:Lie.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),WOn={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.43,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"rect1577-3\":{type:\"path\",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.3}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},Hie=Vn(WOn).labelPort(\"left1\",[\"1\",\"inp1\"]).labelPort(\"left2\",[\"2\",\"inp2\"]).labelPort(\"right1\",[\"3\",\"out\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),jOn=ii(Hie,\"down\"),$On=eF(ii(Hie,\"left\")),qOn=ii(Hie,\"up\"),XOn={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.43,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path44-1\":{type:\"path\",points:[{x:-.1,y:.44},{x:-.1,y:.18}],color:\"primary\",fill:!1},\"path44-2\":{type:\"path\",points:[{x:-.09,y:-.34},{x:-.09,y:-.09}],color:\"primary\",fill:!1},\"rect1577-3\":{type:\"path\",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.25,y:.32},bottom1:{type:\"text\",text:\"{VAL}\",x:.25,y:-.24}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04},top2:{x:-.1,y:.44},bottom1:{x:-.09,y:-.34}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},Oie=Vn(XOn).labelPort(\"left1\",[\"1\",\"inp1\"]).labelPort(\"left2\",[\"2\",\"inp2\"]).labelPort(\"right1\",[\"4\",\"out\"]).labelPort(\"top2\",[\"5\",\"V+\"]).labelPort(\"bottom1\",[\"3\",\"V-\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),ZOn=ii(Oie,\"down\"),eGn=eF(ii(Oie,\"left\")),tGn=ii(Oie,\"up\"),nGn={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:oGn,texts:ggt,bounds:dgt,refblocks:hF,circles:iGn}=nGn,hgt={x:dgt.centerX,y:dgt.centerY},U9=Nl({primitives:[...Object.values(oGn),...Object.values(iGn),{...ggt.top1,anchor:\"middle_right\",x:0},{...ggt.bottom1,anchor:\"middle_right\",x:0}],ports:[{...hF.top1,labels:[\"1\",\"drain\"]},{...hF.bottom1,labels:[\"2\",\"source\"]},{...hF.left1,labels:[\"3\",\"gate\"]}],size:VV(hgt,[hF.top1,hF.bottom1,hF.left1]),center:hgt}),pgt=ii(U9),mgt=pgt.primitives.filter(t=\u003et.type===\"text\"),e5e=mgt.find(t=\u003et.text===\"{VAL}\");e5e.x=-.35,e5e.y=0,e5e.anchor=\"middle_right\";var t5e=mgt.find(t=\u003et.text===\"{REF}\");t5e.y=0,t5e.x=.35,t5e.anchor=\"middle_left\";var N8=pgt,rGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"bottom\",drainSide:\"left\"}),sGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"bottom\",drainSide:\"right\"}),aGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"left\",drainSide:\"bottom\"}),AGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"left\",drainSide:\"top\"}),cGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"right\",drainSide:\"bottom\"}),lGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"right\",drainSide:\"top\"}),uGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"top\",drainSide:\"left\"}),gGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:\"top\",drainSide:\"right\"}),dGn={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-8-3-7\":{type:\"path\",points:[{x:.09,y:.15},{x:.09,y:.07}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},\"path2-8-3\":{type:\"path\",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:\"primary\",fill:!1},\"path2-8-3-2\":{type:\"path\",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:hGn,texts:_gt,bounds:fgt,refblocks:pF,circles:pGn}=dGn,Igt={x:fgt.centerX,y:fgt.centerY},K9=Nl({primitives:[...Object.values(hGn),...Object.values(pGn),{..._gt.top1,anchor:\"middle_right\",x:0},{..._gt.bottom1,anchor:\"middle_right\",x:0}],ports:[{...pF.top1,labels:[\"1\",\"drain\"]},{...pF.bottom1,labels:[\"2\",\"source\"]},{...pF.left1,labels:[\"3\",\"gate\"]}],size:VV(Igt,[pF.top1,pF.bottom1,pF.left1]),center:Igt}),Cgt=ii(K9),ygt=Cgt.primitives.filter(t=\u003et.type===\"text\"),n5e=ygt.find(t=\u003et.text===\"{VAL}\");n5e.x=-.35,n5e.y=0,n5e.anchor=\"middle_right\";var o5e=ygt.find(t=\u003et.text===\"{REF}\");o5e.y=0,o5e.x=.35,o5e.anchor=\"middle_left\";var R8=Cgt,mGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"bottom\",drainSide:\"left\"}),_Gn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"bottom\",drainSide:\"right\"}),fGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"left\",drainSide:\"bottom\"}),IGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"left\",drainSide:\"top\"}),CGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"right\",drainSide:\"bottom\"}),yGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"right\",drainSide:\"top\"}),xGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"top\",drainSide:\"left\"}),EGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:\"top\",drainSide:\"right\"}),BGn={paths:{path11:{type:\"path\",points:[{x:-.54,y:-.01},{x:-.15,y:-.02}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.13,y:0},{x:-.13,y:-.13}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.13,y:.13},{x:.13,y:0}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.13,y:-.13},{x:-.13,y:.13}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.13,y:.13},{x:.13,y:-.13}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.14,y:0},{x:.54,y:-.01}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:.2,y:.38},{x:.16,y:.28},{x:.26,y:.3}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:.33,y:.43},{x:.32,y:.42},{x:.21,y:.31},{x:.21,y:.31}],color:\"primary\",fill:!1},\"path25-0-9\":{type:\"path\",points:[{x:.35,y:.35},{x:.31,y:.26},{x:.41,y:.27}],color:\"primary\",fill:!0},\"path78-6-5\":{type:\"path\",points:[{x:.48,y:.4},{x:.47,y:.39},{x:.35,y:.29},{x:.35,y:.29}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.1,y:.35},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.43}},refblocks:{left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.43,maxY:.43,width:1.14,height:.85,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:-.01,radius:.29,color:\"primary\",fill:!1}}},xgt=Vn(BGn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Egt=ii(xgt),bGn=Egt.primitives.filter(t=\u003et.type===\"text\"),Bgt=bGn.find(t=\u003et.text===\"{REF}\");Bgt.y=0,Bgt.anchor=\"middle_left\";var SGn=Egt,QGn={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.28,y:.55},{x:.28,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.11},{x:.29,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.01,y:-.07},{x:.01,y:.06},{x:-.08,y:0},{x:.01,y:-.07}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.15,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:vGn,texts:bgt,bounds:Gie,refblocks:i5e,circles:wGn}=QGn,Sgt=Nl({primitives:[...Object.values(vGn),...Object.values(wGn),{...bgt.top1,anchor:\"middle_right\",x:0},{...bgt.bottom1,anchor:\"middle_right\"}],ports:[{...i5e.top1,labels:[\"1\",\"drain\"]},{...i5e.bottom1,labels:[\"2\",\"source\"]},{...i5e.left1,labels:[\"3\",\"gate\"]}],size:{width:Gie.width,height:Gie.height},center:{x:Gie.centerX,y:Gie.centerY}}),Qgt=ii(Sgt),vgt=Qgt.primitives.filter(t=\u003et.type===\"text\"),r5e=vgt.find(t=\u003et.text===\"{VAL}\");r5e.x=-.35,r5e.y=0,r5e.anchor=\"middle_right\";var s5e=vgt.find(t=\u003et.text===\"{REF}\");s5e.y=0,s5e.x=.35,s5e.anchor=\"middle_left\";var PGn=Qgt,uD={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:.28,y:.24},{x:.08,y:.11}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:.25},{x:.29,y:.55}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.15,y:-.23},{x:.22,y:-.12},{x:.12,y:-.12},{x:.15,y:-.23}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.08,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{\"path1-0\":{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:MGn,texts:ohr,bounds:Yie,refblocks:a5e,circles:DGn}=uD,NGn=Vn({primitives:[...Object.values(MGn),...Object.values(DGn),{type:\"text\",text:\"{REF}\",x:-.1,y:.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:-.3094553499999995}],ports:[{...a5e.top1,labels:[\"1\",\"collector\"]},{...a5e.bottom1,labels:[\"3\",\"emitter\"]},{...a5e.left1,labels:[\"2\",\"base\"]}],size:{width:Yie.width,height:Yie.height},center:{x:Yie.centerX,y:Yie.centerY}}).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_right\").build(),{paths:ihr,texts:rhr,bounds:shr,refblocks:ahr,circles:Ahr}=uD,RGn=Vn(uD).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{VAL}\",\"middle_left\").labelPort(\"left1\",[\"2\",\"base\"]).labelPort(\"top1\",[\"1\",\"collector\"]).labelPort(\"bottom1\",[\"3\",\"emitter\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:TGn,texts:chr,bounds:Uie,refblocks:A5e,circles:kGn}=uD,FGn=Vn({primitives:[...Object.values(TGn),...Object.values(kGn),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...A5e.top1,labels:[\"1\",\"collector\"]},{...A5e.bottom1,labels:[\"3\",\"emitter\"]},{...A5e.left1,labels:[\"2\",\"base\"]}],size:{width:Uie.width,height:Uie.height},center:{x:Uie.centerX,y:Uie.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_bottom\").build(),{paths:LGn,texts:lhr,bounds:Kie,refblocks:c5e,circles:HGn}=uD,OGn=Vn({primitives:[...Object.values(LGn),...Object.values(HGn),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...c5e.top1,labels:[\"1\",\"collector\"]},{...c5e.bottom1,labels:[\"3\",\"emitter\"]},{...c5e.left1,labels:[\"2\",\"base\"]}],size:{width:Kie.width,height:Kie.height},center:{x:Kie.centerX,y:Kie.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_top\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:GGn,texts:uhr,bounds:Vie,refblocks:l5e,circles:YGn}=uD,UGn=Vn({primitives:[...Object.values(GGn),...Object.values(YGn),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...l5e.top1,labels:[\"1\",\"collector\"]},{...l5e.bottom1,labels:[\"3\",\"emitter\"]},{...l5e.left1,labels:[\"2\",\"base\"]}],size:{width:Vie.width,height:Vie.height},center:{x:Vie.centerX,y:Vie.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:KGn,texts:ghr,bounds:zie,refblocks:u5e,circles:VGn}=uD,zGn=Vn({primitives:[...Object.values(KGn),...Object.values(VGn),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...u5e.top1,labels:[\"1\",\"collector\"]},{...u5e.bottom1,labels:[\"3\",\"emitter\"]},{...u5e.left1,labels:[\"2\",\"base\"]}],size:{width:zie.width,height:zie.height},center:{x:zie.centerX,y:zie.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),JGn={paths:{path40:{type:\"path\",points:[{x:-.19,y:.33},{x:-.26,y:.14}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.38,y:.26},{x:-.19,y:.33}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.26,y:.14},{x:-.38,y:.26}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-.26,y:.39},{x:-.13,y:.26}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:.2},{x:-.52,y:0}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:.52},{x:-.19,y:.33}],color:\"primary\",fill:!1},\"path40-4\":{type:\"path\",points:[{x:-.19,y:-.32},{x:-.38,y:-.26}],color:\"primary\",fill:!1},\"path41-1\":{type:\"path\",points:[{x:-.26,y:-.13},{x:-.19,y:-.32}],color:\"primary\",fill:!1},\"path42-7\":{type:\"path\",points:[{x:-.38,y:-.26},{x:-.26,y:-.13}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:-.13,y:-.26},{x:-.26,y:-.39}],color:\"primary\",fill:!1},\"path44-8\":{type:\"path\",points:[{x:-.32,y:-.19},{x:-.51,y:-.01}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:-.01,y:-.5},{x:-.19,y:-.32}],color:\"primary\",fill:!1},\"path40-4-0\":{type:\"path\",points:[{x:.32,y:.19},{x:.13,y:.26}],color:\"primary\",fill:!1},\"path41-1-2\":{type:\"path\",points:[{x:.26,y:.38},{x:.32,y:.19}],color:\"primary\",fill:!1},\"path42-7-1\":{type:\"path\",points:[{x:.13,y:.26},{x:.26,y:.38}],color:\"primary\",fill:!1},\"path43-1-8\":{type:\"path\",points:[{x:.39,y:.26},{x:.26,y:.13}],color:\"primary\",fill:!1},\"path44-8-7\":{type:\"path\",points:[{x:.2,y:.32},{x:.01,y:.51}],color:\"primary\",fill:!1},\"path44-0-7-1\":{type:\"path\",points:[{x:.52,y:0},{x:.32,y:.19}],color:\"primary\",fill:!1},\"path40-4-8\":{type:\"path\",points:[{x:.32,y:-.19},{x:.26,y:-.38}],color:\"primary\",fill:!1},\"path41-1-4\":{type:\"path\",points:[{x:.13,y:-.26},{x:.32,y:-.19}],color:\"primary\",fill:!1},\"path42-7-0\":{type:\"path\",points:[{x:.26,y:-.38},{x:.13,y:-.26}],color:\"primary\",fill:!1},\"path43-1-0\":{type:\"path\",points:[{x:.26,y:-.13},{x:.39,y:-.26}],color:\"primary\",fill:!1},\"path44-8-9\":{type:\"path\",points:[{x:.19,y:-.32},{x:0,y:-.52}],color:\"primary\",fill:!1},\"path44-0-7-3\":{type:\"path\",points:[{x:.5,y:-.01},{x:.32,y:-.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.29,y:.46},bottom1:{type:\"text\",text:\"{VAL}\",x:-.29,y:-.5}},refblocks:{left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.09,centerX:0,centerY:0}},{paths:WGn,texts:wgt,bounds:Jie,refblocks:Pgt}=JGn,Mgt=Nl({primitives:[...Object.values(WGn),{...wgt.bottom1,y:.35,anchor:\"middle_top\"},{...wgt.top1,anchor:\"middle_left\"}],ports:[{...Pgt.left1,labels:[\"1\"]},{...Pgt.right1,labels:[\"2\"]}],size:{width:Jie.width+.05,height:Jie.height},center:{x:Jie.centerX,y:Jie.centerY}}),jGn=ii(Mgt),$Gn=jGn,qGn={paths:{path18:{type:\"path\",points:[{x:-.53,y:0},{x:-.27,y:0}],color:\"primary\",fill:!1},path19:{type:\"path\",points:[{x:.26,y:0},{x:.53,y:0}],color:\"primary\",fill:!1},path20:{type:\"path\",points:[{x:0,y:.13},{x:.26,y:.13},{x:.26,y:-.13},{x:-.27,y:-.13},{x:-.27,y:.13},{x:0,y:.13}],color:\"primary\",fill:!1},path24:{type:\"path\",points:[{x:.29,y:-.29},{x:.26,y:-.16},{x:.16,y:-.26},{x:.29,y:-.29}],color:\"primary\",fill:!0},path26:{type:\"path\",points:[{x:-.3,y:.29},{x:.2,y:-.2}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.06,y:.2},bottom1:{type:\"text\",text:\"{VAL}\",x:-.1,y:-.28}},refblocks:{left1:{x:-.53,y:0},right1:{x:.53,y:0}},bounds:{width:1.13,height:.58,centerX:0,centerY:0}},{paths:XGn,texts:Dgt,bounds:Wie,refblocks:Ngt}=qGn,jie=Nl({primitives:[...Object.values(XGn),{...Dgt.bottom1,x:0,y:-.35,anchor:\"middle_top\"},{...Dgt.top1,x:0,y:.35,anchor:\"middle_bottom\"}],ports:[{...Ngt.left1,labels:[\"1\"]},{...Ngt.right1,labels:[\"2\"]}],size:{width:Wie.width+.05,height:Wie.height},center:{x:Wie.centerX,y:Wie.centerY}}),g5e=ii(jie,\"down\"),d5e=g5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),h5e=g5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");d5e.anchor=\"middle_left\",h5e.anchor=\"middle_left\",d5e.y+=.31,d5e.x=.34,h5e.y-=.31,h5e.x=.34;var ZGn=g5e,p5e=ii(jie,\"left\"),m5e=p5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),_5e=p5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");m5e.anchor=\"middle_bottom\",_5e.anchor=\"middle_top\",m5e.y+=.73,m5e.x=0,_5e.y-=.7,_5e.x=0;var eYn=p5e,f5e=ii(jie,\"up\"),I5e=f5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),C5e=f5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");I5e.anchor=\"middle_left\",C5e.anchor=\"middle_left\",I5e.y+=.21,I5e.x=.34,C5e.y-=.21,C5e.x=.34;var tYn=f5e,$ie={paths:{path1:{type:\"path\",points:[{x:-.42,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},\"path1-2-1\":{type:\"path\",points:[{x:-.3,y:0},{x:-.25,y:.1},{x:-.15,y:-.1},{x:-.05,y:.1},{x:.05,y:-.1},{x:.15,y:.1},{x:.25,y:-.1},{x:.3,y:0}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.3,y:0},{x:.42,y:0}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:0,y:-.17},{x:0,y:-.4}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0,y:-.12},{x:.05,y:-.2},{x:-.05,y:-.2},{x:0,y:-.12}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.3,y:.25},bottom1:{type:\"text\",text:\"{VAL}\",x:.3,y:-.25}},refblocks:{left:{x:-.42,y:0},right:{x:.42,y:0},bottom:{x:0,y:-.4}},bounds:{minX:-.42,maxX:.42,minY:-.2,maxY:.2,width:.84,height:.4,centerX:0,centerY:0},circles:{}},{paths:nYn,texts:dhr,bounds:qie,refblocks:y5e,circles:oYn}=$ie,iYn=Vn({primitives:[...Object.values(nYn),...Object.values(oYn),{type:\"text\",text:\"{REF}\",x:-.15,y:.2394553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.2394553499999995}],ports:[{...y5e.left,labels:[\"1\"]},{...y5e.right,labels:[\"3\"]},{...y5e.bottom,labels:[\"2\"]}],size:{width:qie.width,height:qie.height},center:{x:qie.centerX,y:qie.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:rYn,texts:hhr,bounds:Xie,refblocks:x5e,circles:sYn}=$ie,aYn=Vn({primitives:[...Object.values(rYn),...Object.values(sYn),{type:\"text\",text:\"{REF}\",x:-.3,y:-.3894553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:.3194553499999995}],ports:[{...x5e.left,labels:[\"1\"]},{...x5e.right,labels:[\"3\"]},{...x5e.bottom,labels:[\"2\"]}],size:{width:Xie.width,height:Xie.height},center:{x:Xie.centerX,y:Xie.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),AYn=Vn($ie).labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"3\"]).labelPort(\"bottom\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:cYn,texts:phr,bounds:Zie,refblocks:E5e,circles:lYn}=$ie,uYn=Vn({primitives:[...Object.values(cYn),...Object.values(lYn),{type:\"text\",text:\"{REF}\",x:.3,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.2894553499999995}],ports:[{...E5e.left,labels:[\"1\"]},{...E5e.right,labels:[\"3\"]},{...E5e.bottom,labels:[\"2\"]}],size:{width:Zie.width,height:Zie.height},center:{x:Zie.centerX,y:Zie.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),gYn={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.03},{x:.54,y:.03}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:dYn,bounds:ere,refblocks:Rgt,circles:hYn}=gYn,Tgt=Nl({primitives:[...Object.values(dYn),...Object.values(hYn),{type:\"text\",text:\"{REF}\",x:0,y:.43330070000000065,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-.43330070000000065,anchor:\"middle_top\"},{type:\"text\",text:\"COS φ\",x:0,y:.014279000000000375,anchor:\"center\"}],ports:[{...Rgt.left1,labels:[\"1\"]},{...Rgt.right1,labels:[\"2\"]}],size:{width:ere.width,height:ere.height},center:{x:ere.centerX,y:ere.centerY}}),kgt=ii(Tgt),B5e=kgt.primitives.filter(t=\u003et.type===\"text\"),b5e=B5e.find(t=\u003et.text===\"{REF}\"),S5e=B5e.find(t=\u003et.text===\"{VAL}\"),Q5e=B5e.find(t=\u003et.text===\"COS φ\");b5e.x=.35,b5e.y=.4279000000000375,b5e.anchor=\"middle_left\",S5e.anchor=\"middle_left\",S5e.x=.35,S5e.y=-.4279000000000375,Q5e.x=0,Q5e.y=.014279000000000375,Q5e.anchor=\"center\";var pYn=kgt,mYn={paths:{\"path12-1-8-6-9-9\":{type:\"path\",points:[{x:.01,y:.03},{x:.01,y:-.09}],color:\"primary\",fill:!1},\"path12-1-5-6-4\":{type:\"path\",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:\"primary\",fill:!1},\"path12-1-8-0-0\":{type:\"path\",points:[{x:-.16,y:-.09},{x:.18,y:-.09}],color:\"primary\",fill:!1},\"path12-1-0-1\":{type:\"path\",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.22},bottom1:{type:\"text\",text:\"{VAL}\",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:-.14,y:-.05,radius:.02,color:\"primary\",fill:!1},circle:{type:\"circle\",x:.17,y:-.05,radius:.02,color:\"primary\",fill:!1}}},{paths:_Yn,texts:Fgt,bounds:Lgt,refblocks:Hgt,circles:fYn}=mYn,Ogt=Nl({primitives:[...Object.values(_Yn),...Object.values(fYn),{...Fgt.top1,anchor:\"middle_left\"},{...Fgt.bottom1,anchor:\"middle_left\"}],ports:[{...Hgt.left1,labels:[\"1\"]},{...Hgt.right1,labels:[\"2\"]}],center:{x:Lgt.centerX,y:Lgt.centerY}}),IYn=ii(Ogt,\"up\"),Ggt={paths:{\"path12-1-8-6-9-9\":{type:\"path\",points:[{x:-.05,y:.09},{x:-.05,y:.04}],color:\"primary\",fill:!1},\"path12-1-8-7-9-9\":{type:\"path\",points:[{x:-.05,y:.09},{x:.07,y:.09}],color:\"primary\",fill:!1},\"path12-1-8-6-9-10\":{type:\"path\",points:[{x:.07,y:.09},{x:.07,y:.04}],color:\"primary\",fill:!1},\"path12-1-5-6-4\":{type:\"path\",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:\"primary\",fill:!1},\"path12-1-8-0-0\":{type:\"path\",points:[{x:-.16,y:.04},{x:.18,y:.04}],color:\"primary\",fill:!1},\"path12-1-0-1\":{type:\"path\",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.29},bottom1:{type:\"text\",text:\"{VAL}\",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:-.14,y:-.05,radius:.02,color:\"primary\",fill:!1},circle:{type:\"circle\",x:.17,y:-.05,radius:.02,color:\"primary\",fill:!1}}},{paths:CYn,texts:Ygt,bounds:Ugt,refblocks:Kgt,circles:yYn}=Ggt,JV=Nl({primitives:[...Object.values(CYn),...Object.values(yYn),{...Ygt.top1,x:0,y:.3594553499999995,anchor:\"middle_bottom\"},{...Ygt.bottom1,x:0,y:-.3594553499999995,anchor:\"middle_top\"}],ports:[{...Kgt.left1,labels:[\"1\"]},{...Kgt.right1,labels:[\"2\"]}],center:{x:Ugt.centerX,y:Ugt.centerY}}),v5e=ii(JV,\"down\"),w5e=v5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),P5e=v5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");w5e.anchor=\"middle_bottom\",P5e.anchor=\"middle_top\",w5e.y=.4,w5e.x=.35,P5e.y=-.4,P5e.x=.35;var xYn=v5e,{paths:EYn,texts:Vgt,bounds:zgt,refblocks:Jgt,circles:BYn}=Ggt,bYn=Nl({primitives:[...Object.values(EYn),...Object.values(BYn),{...Vgt.top1,x:0,y:.3594553499999995,anchor:\"middle_bottom\"},{...Vgt.bottom1,x:0,y:-.3594553499999995,anchor:\"middle_top\"}],ports:[{...Jgt.left1,labels:[\"1\"]},{...Jgt.right1,labels:[\"2\"]}],center:{x:zgt.centerX,y:zgt.centerY}}),M5e=ii(JV,\"left\"),D5e=M5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),N5e=M5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");D5e.anchor=\"middle_bottom\",N5e.anchor=\"middle_top\",D5e.y=.4,D5e.x=0,N5e.y=-.4,N5e.x=0;var SYn=M5e,R5e=ii(JV,\"up\"),T5e=R5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),k5e=R5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");T5e.anchor=\"middle_left\",k5e.anchor=\"middle_left\",T5e.y+=.4,T5e.x=.34,k5e.y-=.41,k5e.x=.34;var QYn=R5e,F5e=ii(JV,\"up\"),L5e=F5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),H5e=F5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");L5e.anchor=\"middle_left\",H5e.anchor=\"middle_left\",L5e.y+=.4,L5e.x=.34,H5e.y-=.41,H5e.x=.34;var vYn=F5e,tre={paths:{path12_rotated:{type:\"path\",points:[{x:-.09,y:.12},{x:-.09,y:-.12}],color:\"primary\",fill:!1},path2_rotated:{type:\"path\",points:[{x:-.09,y:0},{x:.09,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:.09,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:wYn,bounds:Wgt,refblocks:PYn,circles:MYn}=tre,DYn=Vn({primitives:[...Object.values(wYn),...Object.values(MYn),{type:\"text\",text:\"{REF}\",x:-.14,y:-0}],ports:[{...PYn.left1,labels:[\"1\"]}],center:{x:Wgt.centerX,y:Wgt.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),{paths:NYn,bounds:jgt,refblocks:RYn,circles:TYn}=tre,kYn=Vn({primitives:[...Object.values(NYn),...Object.values(TYn),{type:\"text\",text:\"{REF}\",x:-.13,y:0}],ports:[{...RYn.left1,labels:[\"1\"]}],center:{x:jgt.centerX,y:jgt.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:FYn,bounds:$gt,refblocks:LYn,circles:HYn}=tre,OYn=Vn({primitives:[...Object.values(FYn),...Object.values(HYn),{type:\"text\",text:\"{REF}\",x:-.14,y:-0}],ports:[{...LYn.left1,labels:[\"1\"]}],center:{x:$gt.centerX,y:$gt.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:GYn,bounds:qgt,refblocks:YYn}=tre,UYn=Vn({primitives:[...Object.values(GYn),{type:\"text\",text:\"{REF}\",x:-.14,y:0}],ports:[{...YYn.left1,labels:[\"1\"]}],center:{x:qgt.centerX,y:qgt.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),KYn={paths:{path40:{type:\"path\",points:[{x:-.19,y:-.33},{x:-.26,y:-.14}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.38,y:-.26},{x:-.19,y:-.33}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.26,y:-.14},{x:-.38,y:-.26}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-.26,y:-.39},{x:-.13,y:-.26}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:-.2},{x:-.52,y:0}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:-.52},{x:-.19,y:-.33}],color:\"primary\",fill:!1},\"path40-4\":{type:\"path\",points:[{x:-.19,y:.32},{x:-.38,y:.26}],color:\"primary\",fill:!1},\"path41-1\":{type:\"path\",points:[{x:-.26,y:.13},{x:-.19,y:.32}],color:\"primary\",fill:!1},\"path42-7\":{type:\"path\",points:[{x:-.38,y:.26},{x:-.26,y:.13}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:-.13,y:.26},{x:-.26,y:.39}],color:\"primary\",fill:!1},\"path44-8\":{type:\"path\",points:[{x:-.32,y:.19},{x:-.51,y:.01}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:-.01,y:.5},{x:-.19,y:.32}],color:\"primary\",fill:!1},\"path40-4-0\":{type:\"path\",points:[{x:.32,y:-.19},{x:.13,y:-.26}],color:\"primary\",fill:!1},\"path41-1-2\":{type:\"path\",points:[{x:.26,y:-.38},{x:.32,y:-.19}],color:\"primary\",fill:!1},\"path42-7-1\":{type:\"path\",points:[{x:.13,y:-.26},{x:.26,y:-.38}],color:\"primary\",fill:!1},\"path43-1-8\":{type:\"path\",points:[{x:.39,y:-.26},{x:.26,y:-.13}],color:\"primary\",fill:!1},\"path44-8-7\":{type:\"path\",points:[{x:.2,y:-.32},{x:.01,y:-.51}],color:\"primary\",fill:!1},\"path44-0-7-1\":{type:\"path\",points:[{x:.52,y:0},{x:.32,y:-.19}],color:\"primary\",fill:!1},\"path40-4-8\":{type:\"path\",points:[{x:.32,y:.19},{x:.26,y:.38}],color:\"primary\",fill:!1},\"path41-1-4\":{type:\"path\",points:[{x:.13,y:.26},{x:.32,y:.19}],color:\"primary\",fill:!1},\"path42-7-0\":{type:\"path\",points:[{x:.26,y:.38},{x:.13,y:.26}],color:\"primary\",fill:!1},\"path43-1-0\":{type:\"path\",points:[{x:.26,y:.13},{x:.39,y:.26}],color:\"primary\",fill:!1},\"path44-8-9\":{type:\"path\",points:[{x:.19,y:.32},{x:0,y:.52}],color:\"primary\",fill:!1},\"path44-0-7-3\":{type:\"path\",points:[{x:.5,y:.01},{x:.32,y:.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.29,y:-.46},bottom1:{type:\"text\",text:\"{VAL}\",x:-.29,y:.5}},refblocks:{top1:{x:0,y:-.52},bottom1:{x:0,y:.52},left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:VYn,texts:Xgt,bounds:nre,refblocks:ore,circles:zYn}=KYn,Zgt=Nl({primitives:[...Object.values(VYn),...Object.values(zYn),{...Xgt.top1,anchor:\"middle_right\"},{...Xgt.bottom1,anchor:\"middle_right\"}],ports:[{...ore.top1,labels:[\"1\"]},{...ore.bottom1,labels:[\"2\"]},{...ore.left1,labels:[\"3\"]},{...ore.right1,labels:[\"4\"]}],size:{width:nre.width,height:nre.height},center:{x:nre.centerX,y:nre.centerY}}),O5e=ii(Zgt),JYn=O5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),WYn=O5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");JYn.anchor=\"middle_left\",WYn.anchor=\"middle_right\";var jYn=O5e,ire={paths:{path27:{type:\"path\",points:[{x:.47,y:.04},{x:.21,y:.04}],color:\"primary\",fill:!1},\"path27-0\":{type:\"path\",points:[{x:-.21,y:.04},{x:-.47,y:.04}],color:\"primary\",fill:!1},\"path27-8-2-4\":{type:\"path\",points:[{x:.21,y:.04},{x:.19,y:-.05}],color:\"primary\",fill:!1},\"path27-8-2-4-29\":{type:\"path\",points:[{x:-.19,y:.14},{x:-.21,y:.04}],color:\"primary\",fill:!1},\"path27-8-2-4-5\":{type:\"path\",points:[{x:.19,y:-.05},{x:.13,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1\":{type:\"path\",points:[{x:.08,y:-.05},{x:.13,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9\":{type:\"path\",points:[{x:.08,y:-.05},{x:.03,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2\":{type:\"path\",points:[{x:-.03,y:-.05},{x:.03,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1\":{type:\"path\",points:[{x:-.03,y:-.05},{x:-.08,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1-2\":{type:\"path\",points:[{x:-.13,y:-.05},{x:-.08,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1-2-2\":{type:\"path\",points:[{x:-.13,y:-.05},{x:-.19,y:.14}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.47,y:.04},right1:{x:.47,y:.04}},bounds:{width:.99,height:.84,centerX:0,centerY:0},circles:{}},{paths:$Yn,bounds:rre,refblocks:edt,circles:qYn}=ire,XYn=Vn({primitives:[...Object.values($Yn),...Object.values(qYn),{type:\"text\",text:\"{REF}\",x:-.2,y:.2194553499999995},{type:\"text\",text:\"{VAL}\",x:.2,y:.2194553499999995}],ports:[{...edt.left1,labels:[\"1\"]},{...edt.right1,labels:[\"2\"]}],size:{width:rre.width,height:rre.height},center:{x:rre.centerX,y:rre.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:ZYn,bounds:sre,refblocks:tdt,circles:eUn}=ire,tUn=Vn({primitives:[...Object.values(ZYn),...Object.values(eUn),{type:\"text\",text:\"{REF}\",x:0,y:-.1704553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.2294553499999995}],ports:[{...tdt.left1,labels:[\"1\"]},{...tdt.right1,labels:[\"2\"]}],size:{width:sre.width,height:sre.height},center:{x:sre.centerX,y:sre.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:nUn,bounds:are,refblocks:ndt,circles:oUn}=ire,iUn=Vn({primitives:[...Object.values(nUn),...Object.values(oUn),{type:\"text\",text:\"{REF}\",x:0,y:.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.1704553499999995}],ports:[{...ndt.left1,labels:[\"1\"]},{...ndt.right1,labels:[\"2\"]}],size:{width:are.width,height:are.height},center:{x:are.centerX,y:are.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:rUn,bounds:Are,refblocks:odt,circles:sUn}=ire,aUn=Vn({primitives:[...Object.values(rUn),...Object.values(sUn),{type:\"text\",text:\"{REF}\",x:.2,y:-.1404553499999995},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.1494553499999995}],ports:[{...odt.left1,labels:[\"1\"]},{...odt.right1,labels:[\"2\"]}],size:{width:Are.width,height:Are.height},center:{x:Are.centerX,y:Are.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),idt={paths:{path27:{type:\"path\",points:[{x:.76,y:-.28},{x:.31,y:-.28}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-.3,y:-.02},{x:-.77,y:-.02}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-.3,y:.35},{x:-.3,y:-.28}],color:\"primary\",fill:!1},\"path27-3\":{type:\"path\",points:[{x:.77,y:.35},{x:.32,y:.35}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-.07,y:-.28},{x:-.3,y:-.28}],color:\"primary\",fill:!1},\"path29-5-7\":{type:\"path\",points:[{x:.33,y:-.28},{x:.11,y:-.28}],color:\"primary\",fill:!1},\"path29-5-7-6\":{type:\"path\",points:[{x:-.06,y:-.17},{x:-.06,y:-.39}],color:\"primary\",fill:!1},\"path29-5-7-6-6\":{type:\"path\",points:[{x:.09,y:-.17},{x:.09,y:-.39}],color:\"primary\",fill:!1},\"path29-5-9\":{type:\"path\",points:[{x:-.07,y:.35},{x:-.3,y:.35}],color:\"primary\",fill:!1},\"path29-5-7-2\":{type:\"path\",points:[{x:.33,y:.35},{x:.11,y:.35}],color:\"primary\",fill:!1},\"path29-5-7-6-0\":{type:\"path\",points:[{x:-.06,y:.46},{x:-.06,y:.24}],color:\"primary\",fill:!1},\"path29-5-7-6-6-2\":{type:\"path\",points:[{x:.09,y:.46},{x:.09,y:.24}],color:\"primary\",fill:!1},\"path29-5-92\":{type:\"path\",points:[{x:.33,y:.13},{x:.33,y:.35}],color:\"primary\",fill:!1},\"path29-5-7-28\":{type:\"path\",points:[{x:.33,y:-.28},{x:.33,y:-.05}],color:\"primary\",fill:!1},\"path29-5-7-6-9\":{type:\"path\",points:[{x:.44,y:.11},{x:.22,y:.11}],color:\"primary\",fill:!1},\"path29-5-7-6-6-7\":{type:\"path\",points:[{x:.44,y:-.04},{x:.22,y:-.04}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2\":{type:\"path\",points:[{x:.44,y:.07},{x:.22,y:.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-4\":{type:\"path\",points:[{x:.44,y:0},{x:.44,y:.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-4-6\":{type:\"path\",points:[{x:.22,y:0},{x:.22,y:.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-9\":{type:\"path\",points:[{x:.44,y:0},{x:.22,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.02,y:.53},bottom1:{type:\"text\",text:\"{VAL}\",x:.01,y:-.54}},refblocks:{left1:{x:-.77,y:-.02},right1:{x:.76,y:-.28},right2:{x:.77,y:.35}},bounds:{width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:AUn,texts:rdt,bounds:cre,refblocks:G5e,circles:cUn}=idt,lre=Nl({primitives:[...Object.values(AUn),...Object.values(cUn),{...rdt.top1,anchor:\"middle_bottom\"},{...rdt.bottom1,anchor:\"middle_top\"}],ports:[{...G5e.left1,labels:[\"1\"]},{...G5e.right1,labels:[\"2\"]},{...G5e.right2,labels:[\"3\"]}],size:{width:cre.width,height:cre.height},center:{x:cre.centerX,y:cre.centerY}}),Y5e=ii(lre,\"down\"),U5e=Y5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),K5e=Y5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");U5e.anchor=\"middle_bottom\",K5e.anchor=\"middle_top\",U5e.y+=.3,U5e.x+=.101,K5e.y-=.49999,K5e.x+=1.19999;var lUn=Y5e,{paths:uUn,bounds:ure,refblocks:V5e,circles:gUn}=idt,sdt=Nl({primitives:[...Object.values(uUn),...Object.values(gUn),{type:\"text\",text:\"{REF}\",x:.01596175000000022,y:-.5308501500000009,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:.013116750000000454,y:.5408501499999989,anchor:\"middle_bottom\"}],ports:[{...V5e.left1,labels:[\"1\"]},{...V5e.right1,labels:[\"2\"]},{...V5e.right2,labels:[\"3\"]}],size:{width:ure.width,height:ure.height},center:{x:ure.centerX,y:ure.centerY}}),z5e=ii(lre,\"left\"),J5e=z5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),W5e=z5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");J5e.anchor=\"middle_bottom\",W5e.anchor=\"middle_top\",J5e.y+=.99,J5e.x-=0,W5e.y-=1.10999,W5e.x=0;var dUn=z5e,j5e=ii(lre,\"up\"),$5e=j5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),q5e=j5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");$5e.anchor=\"middle_bottom\",q5e.anchor=\"middle_top\",$5e.y+=.499,$5e.x=.62,q5e.y-=.29999,q5e.x+=.1;var hUn=j5e,pUn=ii(sdt),mUn={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-7\":{type:\"path\",points:[{x:.21,y:.18},{x:.14,y:.18}],color:\"primary\",fill:!1},\"path43-7-9\":{type:\"path\",points:[{x:.21,y:.13},{x:.21,y:.18}],color:\"primary\",fill:!1},\"path43-7-2\":{type:\"path\",points:[{x:.08,y:-.09},{x:.14,y:-.09}],color:\"primary\",fill:!1},\"path43-7-9-3\":{type:\"path\",points:[{x:.08,y:-.04},{x:.08,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},gre=Vn(mUn).labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{VAL}\",\"middle_top\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),X5e=ii(gre,\"down\"),Z5e=X5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),e4e=X5e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Z5e.anchor=\"middle_left\",e4e.anchor=\"middle_left\",Z5e.y+=.3,Z5e.x=.3,e4e.y-=.3,e4e.x=.3;var _Un=X5e,t4e=ii(gre,\"left\"),n4e=t4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),o4e=t4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");n4e.anchor=\"middle_bottom\",o4e.anchor=\"middle_top\",n4e.y+=.5,n4e.x=0,o4e.y-=.55,o4e.x=0;var fUn=t4e,i4e=ii(gre,\"up\"),r4e=i4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),s4e=i4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");r4e.anchor=\"middle_left\",s4e.anchor=\"middle_left\",r4e.y+=.3,r4e.x=.3,s4e.y-=.3,s4e.x=.3;var IUn=i4e,adt={paths:{path11:{type:\"path\",points:[{x:-.52,y:.04},{x:-.18,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.19,y:.05},{x:.52,y:.05}],color:\"primary\",fill:!1},\"path12-6\":{type:\"path\",points:[{x:.18,y:-.15},{x:.18,y:.25}],color:\"primary\",fill:!1},\"path12-2\":{type:\"path\",points:[{x:.19,y:0},{x:.35,y:-.14}],color:\"primary\",fill:!1},\"path12-2-9\":{type:\"path\",points:[{x:.35,y:-.14},{x:.34,y:-.35}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.17,y:.27},{x:-.17,y:-.15},{x:.18,y:.05},{x:-.17,y:.27}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.22,y:.38},bottom1:{type:\"text\",text:\"{VAL}\",x:.11,y:-.38}},refblocks:{bottom1:{x:.34,y:-.35},left1:{x:-.52,y:.04},right1:{x:.52,y:.05}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.38,width:1.09,height:.77,centerX:0,centerY:0},circles:{}},{paths:mhr,texts:_hr,bounds:fhr,refblocks:Ihr,circles:Chr}=adt,Adt=Vn(adt).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"bottom1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),cdt=ii(Adt),CUn=cdt.primitives.filter(t=\u003et.type===\"text\"),ldt=CUn.find(t=\u003et.text===\"{REF}\");ldt.y=0,ldt.anchor=\"middle_left\";var yUn=cdt,udt={paths:{path44:{type:\"path\",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:.07,y:-.025},{x:-.07,y:-.025}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.4458008,y:-.025023700000000426},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},xUn=Vn(udt).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),a4e=Vn(udt).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),gdt=ii(a4e,\"left\"),A4e=gdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");A4e.anchor=\"middle_bottom\",A4e.y+=.4,A4e.x=0;var EUn=gdt,ddt=ii(a4e,\"up\"),c4e=ddt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");c4e.anchor=\"middle_left\",c4e.y+=0,c4e.x=.2;var BUn=ddt,hdt={paths:{path44:{type:\"path\",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.44,y:-.02},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},bUn=Vn(hdt).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),l4e=Vn(hdt).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),pdt=ii(l4e,\"left\"),u4e=pdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");u4e.anchor=\"middle_bottom\",u4e.y+=.4,u4e.x=0;var SUn=pdt,mdt=ii(l4e,\"up\"),g4e=mdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");g4e.anchor=\"middle_left\",g4e.y+=.05,g4e.x=.2;var QUn=mdt,_dt={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1},path1:{type:\"path\",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},vUn=Vn(_dt).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),d4e=Vn(_dt).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),fdt=ii(d4e,\"left\"),h4e=fdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");h4e.anchor=\"middle_left\",h4e.y+=.5,h4e.x=.2;var wUn=fdt,Idt=ii(d4e,\"up\"),p4e=Idt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");p4e.anchor=\"middle_left\",p4e.y+=.3,p4e.x=.2;var PUn=Idt,Cdt={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1},path1:{type:\"path\",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:.125,y:.1},{x:.045,y:.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},MUn=Vn(Cdt).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),m4e=Vn(Cdt).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),ydt=ii(m4e,\"left\"),_4e=ydt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");_4e.anchor=\"middle_left\",_4e.y+=.5,_4e.x=.2;var DUn=ydt,xdt=ii(m4e,\"up\"),f4e=xdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");f4e.anchor=\"middle_left\",f4e.y+=.4,f4e.x=.2;var NUn=xdt,Edt={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:.125,y:.1},{x:.045,y:.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},RUn=Vn(Edt).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),I4e=Vn(Edt).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Bdt=ii(I4e,\"left\"),C4e=Bdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");C4e.anchor=\"middle_left\",C4e.y+=.6,C4e.x=.3;var TUn=Bdt,bdt=ii(I4e,\"up\"),y4e=bdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");y4e.anchor=\"middle_left\",y4e.y+=.4,y4e.x=.2;var kUn=bdt,Sdt={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},FUn=Vn(Sdt).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),x4e=Vn(Sdt).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Qdt=ii(x4e,\"left\"),E4e=Qdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");E4e.anchor=\"middle_left\",E4e.y+=.5,E4e.x=.3;var LUn=Qdt,vdt=ii(x4e,\"up\"),B4e=vdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");B4e.anchor=\"middle_left\",B4e.y+=.3,B4e.x=.2;var HUn=vdt,OUn={paths:{path1:{type:\"path\",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-.07,y:.03},{x:.11,y:-.03}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.17},{x:.37,y:.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.37}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right2:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{\"circle-3\":{type:\"circle\",x:.08,y:-.07,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.03,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.08,y:.17,radius:.02,color:\"primary\",fill:!1}}},dre=Vn(OUn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),b4e=ii(dre,\"down\"),S4e=b4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Q4e=b4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");S4e.anchor=\"middle_bottom\",Q4e.anchor=\"middle_top\",S4e.x=.44,S4e.y+=.28,Q4e.y-=.28,Q4e.x=.44;var GUn=b4e,v4e=ii(dre,\"left\"),w4e=v4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),P4e=v4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");w4e.anchor=\"middle_bottom\",P4e.anchor=\"middle_top\",w4e.x=0,w4e.y+=.625,P4e.y-=.695,P4e.x=0;var YUn=v4e,M4e=ii(dre,\"up\"),D4e=M4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),N4e=M4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");D4e.anchor=\"middle_bottom\",N4e.anchor=\"middle_top\",D4e.x=.4,D4e.y+=.28,N4e.y-=.28,N4e.x=.4;var UUn=M4e,KUn={paths:{path1:{type:\"path\",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-.07,y:.03},{x:.11,y:.14}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.17},{x:.37,y:.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.4},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.4}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right3:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{\"circle-3\":{type:\"circle\",x:.08,y:-.07,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.03,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.08,y:.17,radius:.02,color:\"primary\",fill:!1}}},hre=Vn(KUn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right3\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),R4e=ii(hre,\"down\"),T4e=R4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),k4e=R4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");T4e.anchor=\"middle_bottom\",k4e.anchor=\"middle_top\",T4e.x=.44,T4e.y+=.28,k4e.y-=.28,k4e.x=.44;var VUn=R4e,F4e=ii(hre,\"left\"),L4e=F4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),H4e=F4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");L4e.anchor=\"middle_bottom\",H4e.anchor=\"middle_top\",L4e.x=0,L4e.y+=.625,H4e.y-=.695,H4e.x=0;var zUn=F4e,O4e=ii(hre,\"up\"),G4e=O4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Y4e=O4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");G4e.anchor=\"middle_bottom\",Y4e.anchor=\"middle_top\",G4e.x=.4,G4e.y+=.28,Y4e.y-=.28,Y4e.x=.4;var JUn=O4e,pre={paths:{path11:{type:\"path\",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.07,y:0},{x:.11,y:.05}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.12,y:-.01},{x:.38,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.31},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.28}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:.1,y:0,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:0,radius:.02,color:\"primary\",fill:!1}}};delete pre.refblocks.left1,delete pre.refblocks.right1,pre.bounds.width+=.2;var mre=Vn(pre).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left2\",[\"1\"]).labelPort(\"right2\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),U4e=ii(mre,\"down\"),K4e=U4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),V4e=U4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");K4e.anchor=\"middle_bottom\",V4e.anchor=\"middle_top\",K4e.x=.3,K4e.y+=.265,V4e.y-=.265,V4e.x=.3;var WUn=U4e,z4e=ii(mre,\"left\"),J4e=z4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),W4e=z4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");J4e.anchor=\"middle_bottom\",W4e.anchor=\"middle_top\",J4e.x=0,J4e.y+=.57,W4e.y-=.57,W4e.x=0;var jUn=z4e,j4e=ii(mre,\"up\"),$4e=j4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),q4e=j4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");$4e.anchor=\"middle_bottom\",q4e.anchor=\"middle_top\",$4e.x=.3,$4e.y+=.265,q4e.y-=.265,q4e.x=.3;var $Un=j4e,_re={paths:{path11:{type:\"path\",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.07,y:.01},{x:.1,y:.14}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.12,y:-.01},{x:.38,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.25},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.25}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:.1,y:0,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:0,radius:.02,color:\"primary\",fill:!1}}};delete _re.refblocks.left1,delete _re.refblocks.right1,_re.bounds.width+=.2;var fre=Vn(_re).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left2\",[\"1\"]).labelPort(\"right2\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),X4e=ii(fre,\"down\"),Z4e=X4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),eBe=X4e.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Z4e.anchor=\"middle_bottom\",eBe.anchor=\"middle_top\",Z4e.x=.3,Z4e.y+=.265,eBe.y-=.265,eBe.x=.3;var qUn=X4e,tBe=ii(fre,\"left\"),nBe=tBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),oBe=tBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");nBe.anchor=\"middle_bottom\",oBe.anchor=\"middle_top\",nBe.x=0,nBe.y+=.57,oBe.y-=.57,oBe.x=0;var XUn=tBe,iBe=ii(fre,\"up\"),rBe=iBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),sBe=iBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");rBe.anchor=\"middle_bottom\",sBe.anchor=\"middle_top\",rBe.x=.3,rBe.y+=.265,sBe.y-=.265,sBe.x=.3;var ZUn=iBe,Ire={paths:{path44:{type:\"path\",points:[{x:-.16845120000000047,y:.02621170000000017},{x:-.4458008,y:.02709619999999968}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.4458008,y:.026971799999999657},{x:.1677968999999997,y:.027926399999999685}],color:\"primary\",fill:!1},\"path8704-1\":{type:\"path\",points:[{x:-.0040837000000002455,y:-.13467459999999964},{x:-.0040837000000002455,y:-.13467459999999964},{x:-.017668143940740948,y:-.1311205263185182},{x:-.03043520885925943,y:-.12727072121481456},{x:-.04240966440000013,y:-.1231399985999998},{x:-.05361628020740751,y:-.11874317238518502},{x:-.064079825925926,y:-.11409505648148131},{x:-.07382507120000005,y:-.10921046479999987},{x:-.0828767856740741,y:-.10410421125185171},{x:-.0912597389925926,y:-.09879110974814802},{x:-.09899870079999995,y:-.0932859741999998},{x:-.10611844074074069,y:-.08760361851851838},{x:-.11264372845925916,y:-.0817588566148146},{x:-.11859933359999993,y:-.07576650239999982},{x:-.12401002580740728,y:-.06964136978518495},{x:-.12890057472592584,y:-.06339827268148127},{x:-.13329574999999985,y:-.05705202499999972},{x:-.13722032127407394,y:-.05061744065185156},{x:-.14069905819259243,y:-.04410933354814783},{x:-.14375673039999987,y:-.03754251759999966},{x:-.14641810754074058,y:-.030931806718518143},{x:-.1487079592592591,y:-.0242920148148144},{x:-.15065105519999983,y:-.017637955799999563},{x:-.15227216500740723,y:-.01098444358518472},{x:-.15359605832592574,y:-.004346292081480994},{x:-.1546475047999998,y:.00226168480000051},{x:-.15545127407407386,y:.008824673148148676},{x:-.1560321357925924,y:.015327859051852397},{x:-.1564148595999998,y:.02175642860000056},{x:-.1566242151407405,y:.028095567881482052},{x:-.15668497205925902,y:.03433046298518576},{x:-.15662189999999976,y:.04044630000000058},{x:-.15662189999999976,y:.0404463000000006},{x:-.15662189999999976,y:.0404463000000006},{x:-.15622857394444417,y:.04717166472222282},{x:-.1553217675555553,y:.05388046444444503},{x:-.15392183849999977,y:.060558907500000585},{x:-.1520491444444442,y:.0671932022222228},{x:-.1497240430555553,y:.07376955694444502},{x:-.14696689199999974,y:.08027418000000058},{x:-.14379804894444415,y:.0866932797222228},{x:-.1402378715555553,y:.09301306444444506},{x:-.13630671749999965,y:.09921974250000057},{x:-.13202494444444415,y:.10529952222222282},{x:-.12741291005555522,y:.11123861194444501},{x:-.1224909719999997,y:.1170232200000006},{x:-.11727948794444407,y:.12263955472222278},{x:-.11179881555555524,y:.12807382444444504},{x:-.10606931249999965,y:.13331223750000057},{x:-.1001113364444441,y:.13834100222222284},{x:-.09394524505555521,y:.14314632694444504},{x:-.08759139599999967,y:.14771442000000062},{x:-.08107014694444413,y:.15203148972222283},{x:-.07440185555555523,y:.15608374444444503},{x:-.0676068794999997,y:.15985739250000058},{x:-.06070557644444415,y:.16333864222222283},{x:-.05371830405555529,y:.16651370194444504},{x:-.04666541999999976,y:.1693687800000006},{x:-.03956728194444424,y:.1718900847222228},{x:-.03244424755555539,y:.17406382444444501},{x:-.025316674499999876,y:.17587620750000055},{x:-.01820492044444437,y:.17731344222222278},{x:-.01112934305555553,y:.178361736944445},{x:-.004110300000000034,y:.17900730000000054},{x:-.004110300000000011,y:.17900730000000054}],color:\"primary\",fill:!1},\"path8704-1-9\":{type:\"path\",points:[{x:.004158700000000071,y:-.1355885000000001},{x:.004158700000000071,y:-.1355885000000001},{x:.017743143940740766,y:-.1320344263185187},{x:.03051020885925925,y:-.12818462121481505},{x:.042484664399999955,y:-.12405389860000024},{x:.053691280207407335,y:-.11965707238518546},{x:.0641548259259258,y:-.11500895648148178},{x:.07390007119999986,y:-.1101243648000003},{x:.0829517856740739,y:-.10501811125185218},{x:.0913347389925924,y:-.09970500974814848},{x:.09907370079999973,y:-.09419987420000027},{x:.10619344074074046,y:-.08851751851851883},{x:.11271872845925893,y:-.08267275661481507},{x:.11867433359999968,y:-.07668040240000029},{x:.12408502580740703,y:-.0705552697851854},{x:.12897557472592555,y:-.06431217268148172},{x:.13337074999999957,y:-.05796592500000018},{x:.13729532127407365,y:-.05153134065185202},{x:.14077405819259214,y:-.045023233548148286},{x:.14383173039999952,y:-.038456417600000126},{x:.14649310754074024,y:-.03184570671851861},{x:.14878295925925875,y:-.02520591481481487},{x:.1507260551999995,y:-.01855185580000003},{x:.15234716500740686,y:-.011898343585185192},{x:.15367105832592537,y:-.005260192081481464},{x:.15472250479999944,y:.001347784800000043},{x:.1555262740740735,y:.007910773148148207},{x:.156107135792592,y:.01441395905185193},{x:.1564898595999994,y:.020842528600000094},{x:.15669921514074014,y:.02718166788148159},{x:.15675997205925862,y:.03341656298518529},{x:.15669689999999936,y:.03953240000000011},{x:.15669689999999936,y:.039532400000000134},{x:.15669689999999936,y:.039532400000000134},{x:.1563035739444438,y:.04625776472222235},{x:.15539676755555493,y:.05296656444444457},{x:.15399683849999934,y:.05964500750000013},{x:.1521241444444438,y:.06627930222222234},{x:.14979904305555491,y:.07285565694444456},{x:.14704189199999937,y:.07936028000000013},{x:.1438730489444438,y:.08577937972222234},{x:.1403128715555549,y:.09209916444444458},{x:.13638171749999925,y:.0983058425000001},{x:.13209994444444376,y:.10438562222222235},{x:.12748791005555482,y:.11032471194444453},{x:.12256597199999929,y:.11610932000000013},{x:.1173544879444437,y:.1217256547222223},{x:.11187381555555485,y:.12715992444444457},{x:.10614431249999925,y:.1323983375000001},{x:.10018633644444369,y:.13742710222222235},{x:.09402024505555481,y:.14223242694444457},{x:.08766639599999927,y:.14680052000000016},{x:.08114514694444372,y:.15111758972222236},{x:.07447685555555483,y:.15516984444444457},{x:.06768187949999929,y:.15894349250000012},{x:.06078057644444377,y:.16242474222222236},{x:.053793304055554894,y:.16559980194444457},{x:.046740419999999366,y:.16845488000000014},{x:.039642281944443844,y:.17097618472222234},{x:.03251924755555499,y:.17314992444444455},{x:.02539167449999948,y:.17496230750000008},{x:.018279920444443973,y:.17639954222222232},{x:.011204343055555134,y:.17744783694444452},{x:.004185299999999637,y:.17809340000000007},{x:.004185299999999614,y:.17809340000000007}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-.08039130000000005,y:.0179576999999993},{x:-.08039130000000005,y:.09650599999999931}],color:\"primary\",fill:!0},\"path4-5\":{type:\"path\",points:[{x:.01494479999999987,y:-.055216500000000224},{x:.01494479999999987,y:.09691909999999937}],color:\"primary\",fill:!0},\"path4-5-8\":{type:\"path\",points:[{x:.06871169999999927,y:-.056870000000000864},{x:.06871169999999927,y:.018784499999999538}],color:\"primary\",fill:!0},\"path4-1\":{type:\"path\",points:[{x:-.08179359999999969,y:.09650570000000003},{x:.015771699999999722,y:.09650570000000003}],color:\"primary\",fill:!0},\"path4-1-6\":{type:\"path\",points:[{x:.0117995999999998,y:-.05594970000000088},{x:.06843709999999925,y:-.05594970000000088}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-.17162450000000073,y:.11125030000000025},{x:-.2688274000000015,y:.11125030000000025},{x:-.2688274000000015,y:.11469129999999961},{x:-.17162450000000073,y:.11469129999999961}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-.2184661999999995,y:.16159429999999997},{x:-.2184661999999995,y:.06439139999999943},{x:-.22190719999999908,y:.06439139999999943},{x:-.22190719999999908,y:.16159429999999997}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.0024445000000006267,y:.23933980000000044},bottom1:{type:\"text\",text:\"{VAL}\",x:.00341719999999901,y:-.23933980000000066}},refblocks:{left1:{x:-.4458008,y:.02709619999999968},right1:{x:.4458008,y:.026971799999999657}},bounds:{minX:-.473959241,maxX:.473959241,minY:-.23933980000000066,maxY:.23933980000000044,width:.947918482,height:.4786796000000011,centerX:0,centerY:-11102230246251565e-32},circles:{}},eKn=Vn(Ire).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.02,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.5,y:-.2}).build(),tKn=Vn(Ire).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.45}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.55}).build(),nKn=Vn(Ire).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),oKn=Vn(Ire).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.02,y:-.2}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.5,y:.2}).build(),wdt={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-5\":{type:\"path\",points:[{x:.19,y:-.09},{x:.15,y:-.09}],color:\"primary\",fill:!1},\"path43-5-2\":{type:\"path\",points:[{x:.19,y:-.14},{x:.19,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:yhr,texts:xhr,bounds:Ehr,refblocks:Bhr,circles:bhr}=wdt,Pdt=Vn(wdt).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),iKn=ii(Pdt),rKn={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"RPM\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:sKn,texts:aKn,bounds:Cre,refblocks:Mdt,circles:AKn}=rKn,aBe=Nl({primitives:[...Object.values(sKn),...Object.values(AKn),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...aKn.left1,y:.01,anchor:\"center\",fontSize:.2}],ports:[{...Mdt.left1,labels:[\"1\"]},{...Mdt.right1,labels:[\"2\"]}],size:{width:Cre.width,height:Cre.height},center:{x:Cre.centerX,y:Cre.centerY}}),{5:cKn,...lKn}=aBe.primitives;function uKn(t){return typeof t==\"object\"}var Ddt=ii({...aBe,primitives:Object.values(lKn).filter(uKn)}),gKn={...Ddt,primitives:[...Ddt.primitives,cKn]},yre=Nl({primitives:[{type:\"path\",points:[{x:-.2,y:0},{x:0,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:Array.from({length:32},(t,e)=\u003e{let n=Math.PI/2-e*Math.PI/31,o=.1;return{x:.1-o*Math.cos(n),y:o*Math.sin(n)}}),color:\"primary\",fill:!1},{type:\"text\",text:\"{REF}\",x:.125,y:0,anchor:\"middle_left\"}],ports:[{x:-.2,y:0,labels:[\"1\"]}],center:{x:0,y:0}}),Ndt=ii(yre,\"down\"),Rdt=Ndt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Rdt\u0026\u0026(Rdt.anchor=\"middle_top\");var dKn=Ndt,hKn=ii(yre,\"left\"),Tdt=ii(yre,\"up\"),kdt=Tdt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");kdt\u0026\u0026(kdt.anchor=\"middle_bottom\");var pKn=Tdt,mKn={paths:{path40:{type:\"path\",points:[{x:.44,y:.04},{x:.19,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:.19,y:.18},{x:.44,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:.19,y:-.09},{x:.19,y:.18}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:.19,y:.04},{x:-.11,y:.04}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-.43,y:.22},{x:-.11,y:.04}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{right1:{x:-.43,y:.22}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},ABe=Vn(mKn).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),cBe=ii(ABe,\"up\"),lBe=cBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),uBe=cBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");lBe.anchor=\"middle_bottom\",uBe.anchor=\"middle_top\",lBe.x=.4,lBe.y+=.2,uBe.y-=.3,uBe.x=.4;var Fdt=cBe,gBe=eF(Fdt),dBe=gBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),hBe=gBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");dBe.anchor=\"middle_bottom\",hBe.anchor=\"middle_top\",dBe.x=.35,dBe.y+=.4,hBe.y-=.4,hBe.x=.35;var _Kn=gBe,pBe=ii(ABe,\"left\"),mBe=pBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),_Be=pBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");mBe.anchor=\"middle_bottom\",_Be.anchor=\"middle_top\",mBe.x=0,mBe.y+=.5,_Be.y-=.6,_Be.x=0;var fKn=pBe,Ldt={paths:{path11:{type:\"path\",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.1,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:\"primary\",fill:!0},\"path11-0-9-0\":{type:\"path\",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:\"primary\",fill:!0},\"path12-2\":{type:\"path\",points:[{x:.09,y:-.06},{x:.27,y:-.17}],color:\"primary\",fill:!1},\"path12-2-9\":{type:\"path\",points:[{x:.27,y:-.18},{x:.27,y:-.31}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.42}},refblocks:{bottom1:{x:.27,y:-.31},left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.05,radius:.29,color:\"primary\",fill:!1}}},{paths:Shr,texts:Qhr,bounds:vhr,refblocks:whr,circles:Phr}=Ldt,Hdt=Vn(Ldt).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"bottom1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Odt=ii(Hdt),Gdt=Odt.primitives.filter(t=\u003et.type===\"text\"),IKn=Gdt.find(t=\u003et.text===\"{REF}\"),CKn=Gdt.find(t=\u003et.text===\"{VAL}\");IKn.y=0,CKn.y=0;var yKn=Odt,xKn={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.14,y:.18},{x:.08,y:.18}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.14,y:-.09},{x:.08,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:EKn,texts:Ydt,bounds:xre,refblocks:Udt,circles:BKn}=xKn,Kdt=Nl({primitives:[...Object.values(EKn),...Object.values(BKn),{...Ydt.top1,anchor:\"middle_bottom\"},{...Ydt.bottom1,anchor:\"middle_top\"}],ports:[{...Udt.left1,labels:[\"1\"]},{...Udt.right1,labels:[\"2\"]}],size:{width:xre.width,height:xre.height},center:{x:xre.centerX,y:xre.centerY}}),fBe=ii(Kdt),bKn=fBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),SKn=fBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");bKn.anchor=\"middle_left\",SKn.anchor=\"middle_right\";var QKn=fBe,vKn={paths:{path11:{type:\"path\",points:[{x:-.34,y:.22},{x:-.02,y:.01}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.23,y:.13},{x:.23,y:.4}],color:\"primary\",fill:!1},\"path12-2\":{type:\"path\",points:[{x:.23,y:-.08},{x:.23,y:-.35}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.01,y:-.18},{x:-.01,y:.23}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:.23,y:.12},{x:-.01,y:.12}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.11,y:.13},{x:-.17,y:.04},{x:-.06,y:.03},{x:-.11,y:.13}],color:\"primary\",fill:!0},\"path11-0-3-8\":{type:\"path\",points:[{x:.23,y:-.08},{x:-.01,y:-.08}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.2,y:.39},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.42}},refblocks:{top1:{x:.23,y:.4},bottom1:{x:.23,y:-.35},left1:{x:-.34,y:.22}},bounds:{width:.74,height:.85,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.08,y:.01,radius:.29,color:\"primary\",fill:!1}}},{paths:wKn,texts:Vdt,bounds:Ere,refblocks:IBe,circles:PKn}=vKn,zdt=Nl({primitives:[...Object.values(wKn),...Object.values(PKn),{...Vdt.top1,anchor:\"middle_left\"},{...Vdt.bottom1,anchor:\"middle_right\"}],ports:[{...IBe.top1,labels:[\"1\"]},{...IBe.bottom1,labels:[\"2\"]},{...IBe.left1,labels:[\"3\"]}],size:{width:Ere.width,height:Ere.height},center:{x:Ere.centerX,y:Ere.centerY}}),Jdt=ii(zdt),Wdt=Jdt.primitives.filter(t=\u003et.type===\"text\"),MKn=Wdt.find(t=\u003et.text===\"{REF}\");MKn.y=.1;var jdt=Wdt.find(t=\u003et.text===\"{VAL}\");jdt.y=.1,jdt.x=-.4;var DKn=Jdt,NKn={paths:{capsule_outer:{type:\"path\",points:[{x:-.44,y:.34},{x:-.45,y:.39},{x:-.46,y:.42},{x:-.49,y:.44},{x:-.52,y:.46},{x:-.56,y:.46},{x:-.6,y:.46},{x:-.63,y:.44},{x:-.65,y:.42},{x:-.67,y:.39},{x:-.68,y:.34},{x:-.68,y:-.34},{x:-.67,y:-.39},{x:-.65,y:-.42},{x:-.63,y:-.44},{x:-.6,y:-.45},{x:-.56,y:-.46},{x:-.52,y:-.45},{x:-.49,y:-.44},{x:-.46,y:-.42},{x:-.45,y:-.39},{x:-.44,y:-.34},{x:-.44,y:.34}],color:\"primary\",fill:!1},capsule_inner:{type:\"path\",points:[{x:-.51,y:.28},{x:-.52,y:.32},{x:-.53,y:.34},{x:-.56,y:.35},{x:-.57,y:.35},{x:-.58,y:.34},{x:-.6,y:.32},{x:-.61,y:.28},{x:-.61,y:-.28},{x:-.6,y:-.32},{x:-.58,y:-.34},{x:-.57,y:-.35},{x:-.56,y:-.35},{x:-.53,y:-.34},{x:-.52,y:-.32},{x:-.51,y:-.28},{x:-.51,y:.28}],color:\"primary\",fill:!0},usb_vertical:{type:\"path\",points:[{x:.1,y:-.4},{x:.1,y:.4}],color:\"primary\",fill:!1},usb_left_branch:{type:\"path\",points:[{x:.1,y:-.1},{x:-.03,y:.05},{x:-.03,y:.15}],color:\"primary\",fill:!1},usb_right_branch:{type:\"path\",points:[{x:.1,y:0},{x:.25,y:.15},{x:.25,y:.25}],color:\"primary\",fill:!1},usb_arrow:{type:\"path\",points:[{x:.05,y:.4},{x:.1,y:.5},{x:.15,y:.4},{x:.05,y:.4}],color:\"primary\",fill:!0},usb_square:{type:\"path\",points:[{x:.2,y:.25},{x:.3,y:.25},{x:.3,y:.35},{x:.2,y:.35},{x:.2,y:.25}],color:\"primary\",fill:!0}},circles:{usb_base:{type:\"circle\",x:.1,y:-.4,radius:.07,color:\"primary\",fill:!0},usb_tip_circle:{type:\"circle\",x:-.03,y:.15,radius:.04,color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.25,y:.7}},refblocks:{},bounds:{minX:-.75,maxX:.35,minY:-.6,maxY:.75,width:1.1,height:1.35,centerX:-.2,centerY:.08}},RKn=Vn(NKn).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),TKn={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.18,y:-.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:.43},left1:{type:\"text\",text:\"Var\",x:-.19,y:.07}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:kKn,texts:CBe,bounds:Bre,refblocks:$dt,circles:FKn}=TKn,qdt=Nl({primitives:[...Object.values(kKn),...Object.values(FKn),{...CBe.top1,x:0,y:-.3594553499999995,anchor:\"middle_top\"},{...CBe.bottom1,x:0,y:.35,anchor:\"middle_bottom\"},{...CBe.left1,x:-.02,y:.01,fontSize:.2,anchor:\"center\"}],ports:[{...$dt.left1,labels:[\"1\"]},{...$dt.right1,labels:[\"2\"]}],size:{width:Bre.width,height:Bre.height},center:{x:Bre.centerX,y:Bre.centerY}}),LKn=ii(qdt),HKn={paths:{path40:{type:\"path\",points:[{x:.08,y:.04},{x:-.18,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.18,y:.18},{x:.08,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.18,y:-.09},{x:-.18,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.09,y:.17},{x:.1,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.2,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.21,y:.04}],color:\"primary\",fill:!1},\"path43-6\":{type:\"path\",points:[{x:.19,y:.17},{x:.19,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:OKn,texts:Xdt,bounds:bre,refblocks:Zdt,circles:GKn}=HKn,eht=Nl({primitives:[...Object.values(OKn),...Object.values(GKn),{...Xdt.top1,anchor:\"middle_bottom\"},{...Xdt.bottom1,anchor:\"middle_top\"}],ports:[{...Zdt.left1,labels:[\"1\"]},{...Zdt.right1,labels:[\"2\"]}],size:{width:bre.width,height:bre.height},center:{x:bre.centerX,y:bre.centerY}}),yBe=ii(eht),YKn=yBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),UKn=yBe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");YKn.anchor=\"middle_left\",UKn.anchor=\"middle_right\";var KKn=yBe,VKn={paths:{path5:{type:\"path\",points:[{x:-.54,y:0},{x:-.26,y:0}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.27,y:0},{x:.54,y:.01}],color:\"primary\",fill:!1},path7:{type:\"path\",points:[{x:.27,y:-.23},{x:-.26,y:.24}],color:\"primary\",fill:!1},path8:{type:\"path\",points:[{x:.38,y:-.23},{x:.27,y:-.23}],color:\"primary\",fill:!1},path9:{type:\"path\",points:[{x:0,y:.14},{x:.27,y:.14},{x:.27,y:-.13},{x:-.26,y:-.13},{x:-.26,y:.14},{x:0,y:.14}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.06,y:.25},bottom1:{type:\"text\",text:\"{VAL}\",x:.01,y:-.25}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:.01}},bounds:{width:1.13,height:.5,centerX:0,centerY:0}},{paths:zKn,texts:tht,bounds:Sre,refblocks:nht}=VKn,oht=Nl({primitives:[...Object.values(zKn),{...tht.top1,anchor:\"middle_left\"},{...tht.bottom1,anchor:\"middle_right\"}],ports:[{...nht.left1,labels:[\"1\",\"-\"]},{...nht.right1,labels:[\"2\",\"+\"]}],size:{width:Sre.width,height:Sre.height},center:{x:Sre.centerX,y:Sre.centerY}}),JKn=ii(oht),WKn={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"Var\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:jKn,texts:$Kn,bounds:Qre,refblocks:iht,circles:qKn}=WKn,xBe=Nl({primitives:[...Object.values(jKn),...Object.values(qKn),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...$Kn.left1,anchor:\"center\",y:.02,fontSize:.2}],ports:[{...iht.left1,labels:[\"1\"]},{...iht.right1,labels:[\"2\"]}],size:{width:Qre.width,height:Qre.height},center:{x:Qre.centerX,y:Qre.centerY}}),{5:XKn,...ZKn}=xBe.primitives;function eVn(t){return typeof t==\"object\"}var rht=ii({...xBe,primitives:Object.values(ZKn).filter(eVn)}),tVn={...rht,primitives:[...rht.primitives,XKn]},vre={paths:{\"path28-2\":{type:\"path\",points:[{x:.19,y:0},{x:0,y:.09}],color:\"primary\",fill:!1},\"path28-2-6\":{type:\"path\",points:[{x:.19,y:0},{x:0,y:-.09}],color:\"primary\",fill:!1},\"path29-3\":{type:\"path\",points:[{x:.19,y:0},{x:-.23,y:0}],color:\"primary\",fill:!1}},texts:{right1:{type:\"text\",text:\"{REF}\",x:.25,y:0}},refblocks:{left1:{x:-.23,y:0}},bounds:{minX:-.25,maxX:.25,minY:-.09,maxY:.09,width:.5,height:.19,centerX:0,centerY:0},circles:{}};function wre(t,e){let{width:n,height:o}=t.size,i=1,r=1;e.width!==void 0\u0026\u0026e.height!==void 0?(i=e.width/n,r=e.height/o):e.width!==void 0?i=r=e.width/n:e.height!==void 0\u0026\u0026(i=r=e.height/o);let s=t.primitives.map(a=\u003e{switch(a.type){case\"path\":return{...a,points:a.points.map(A=\u003e({x:A.x*i,y:A.y*r}))};case\"text\":return{...a,x:a.x*i,y:a.y*r,fontSize:a.fontSize?a.fontSize*i:void 0};case\"circle\":return{...a,x:a.x*i,y:a.y*r,radius:a.radius*i};case\"box\":return{...a,x:a.x*i,y:a.y*r,width:a.width*i,height:a.height*r};default:return a}});return{...t,primitives:s,center:{x:t.center.x*i,y:t.center.y*r},ports:t.ports.map(a=\u003e({...a,x:a.x*i,y:a.y*r})),size:{width:n*i,height:o*r}}}var nVn=Vn(vre).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),oVn=wre(nVn,{width:.24,height:.23}),iVn=Vn(vre).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),rVn=wre(iVn,{width:.23,height:.24}),sVn=Vn(vre).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),aVn=wre(sVn,{width:.23,height:.24}),AVn=Vn(vre).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),cVn=wre(AVn,{width:.24,height:.23}),EBe={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.03},{x:.54,y:.03}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.02,y:.4},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:-.4}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.4,maxY:.4,width:1.14,height:.8,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:Mhr,texts:Dhr,bounds:Nhr,circles:Rhr,refblocks:Thr}=EBe,lVn=Vn(EBe).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:uVn,texts:khr,bounds:sht,circles:gVn,refblocks:aht}=EBe,dVn=Vn({primitives:[...Object.values(uVn),...Object.values(gVn),{type:\"text\",text:\"{REF}\",x:-.2,y:.35},{type:\"text\",text:\"{VAL}\",x:.2,y:.35}],ports:[{...aht.left1,labels:[\"left1\"]},{...aht.right1,labels:[\"right1\"]}],center:{x:sht.centerX,y:sht.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),hVn=dVn,pVn={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"Wh\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:mVn,texts:_Vn,bounds:Pre,refblocks:Aht,circles:fVn}=pVn,BBe=Nl({primitives:[...Object.values(mVn),...Object.values(fVn),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{..._Vn.left1,anchor:\"center\",y:.01,fontSize:.2}],ports:[{...Aht.left1,labels:[\"1\"]},{...Aht.right1,labels:[\"2\"]}],size:{width:Pre.width,height:Pre.height},center:{x:Pre.centerX,y:Pre.centerY}}),{5:IVn,...CVn}=BBe.primitives;function yVn(t){return typeof t==\"object\"}var cht=ii({...BBe,primitives:Object.values(CVn).filter(yVn)}),xVn={...cht,primitives:[...cht.primitives,IVn]},EVn={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"W\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:BVn,texts:bVn,bounds:Mre,refblocks:lht,circles:SVn}=EVn,bBe=Nl({primitives:[...Object.values(BVn),...Object.values(SVn),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...bVn.left1,anchor:\"center\",y:.01,fontSize:.3}],ports:[{...lht.left1,labels:[\"1\"]},{...lht.right1,labels:[\"2\"]}],size:{width:Mre.width,height:Mre.height},center:{x:Mre.centerX,y:Mre.centerY}}),{5:QVn,...vVn}=bBe.primitives;function wVn(t){return typeof t==\"object\"}var uht=ii({...bBe,primitives:Object.values(vVn).filter(wVn)}),PVn={...uht,primitives:[...uht.primitives,QVn]},ght={paths:{path40:{type:\"path\",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.14458890000000002,y:.17632800000000026},{x:.21069330000000042,y:.17632800000000026}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.14458890000000002,y:-.0882553999999991},{x:.07848449999999962,y:-.0882553999999991}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:\"text\",text:\"{VAL}\",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.27384529999999985,maxY:.27384530000000007,width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},MVn=Vn(ght).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:DVn,bounds:Dre,refblocks:dht,circles:NVn}=ght,RVn=Vn({primitives:[...Object.values(DVn),...Object.values(NVn),{type:\"text\",text:\"{REF}\",x:.15,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2294553499999995}],ports:[{...dht.left1,labels:[\"1\"]},{...dht.right1,labels:[\"2\"]}],size:{width:Dre.width,height:Dre.height},center:{x:Dre.centerX,y:Dre.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Su={ac_voltmeter_down:NRn,ac_voltmeter_horz:kRn,ac_voltmeter_left:HRn,ac_voltmeter_right:YRn,ac_voltmeter_up:VRn,ac_voltmeter_vert:WRn,avalanche_diode_down:qRn,avalanche_diode_horz:XRn,avalanche_diode_left:tTn,avalanche_diode_right:nTn,avalanche_diode_up:rTn,avalanche_diode_vert:ATn,backward_diode_down:uTn,backward_diode_left:m0t,backward_diode_right:mTn,backward_diode_up:_Tn,battery_down:yTn,battery_horz:x0t,battery_left:QTn,battery_right:MTn,battery_up:TTn,battery_vert:kTn,boxresistor_down:OTn,boxresistor_left:KTn,boxresistor_right:WTn,boxresistor_small_down:qTn,boxresistor_small_left:ekn,boxresistor_small_right:okn,boxresistor_small_up:skn,boxresistor_up:lkn,bridged_ground_down:dkn,bridged_ground_left:mkn,bridged_ground_right:V0t,bridged_ground_up:Ikn,capacitor_down:Ekn,capacitor_left:bkn,capacitor_polarized_down:Skn,capacitor_polarized_left:Qkn,capacitor_polarized_right:vkn,capacitor_polarized_up:wkn,capacitor_right:Mkn,capacitor_up:Tkn,constant_current_diode_down:Lkn,constant_current_diode_horz:Hkn,constant_current_diode_left:Ykn,constant_current_diode_right:Ukn,constant_current_diode_up:zkn,constant_current_diode_vert:jkn,crystal_4pin_down:Xkn,crystal_4pin_left:Zkn,crystal_4pin_right:eFn,crystal_4pin_up:oFn,crystal_down:sFn,crystal_left:aFn,crystal_right:AFn,crystal_up:uFn,current_source_down:dFn,current_source_left:pFn,current_source_right:_Fn,current_source_up:IFn,darlington_pair_transistor_down:CFn,darlington_pair_transistor_horz:yFn,darlington_pair_transistor_left:xFn,darlington_pair_transistor_right:EFn,darlington_pair_transistor_up:BFn,darlington_pair_transistor_vert:bFn,dc_ammeter_down:iut,dc_ammeter_horz:KV,dc_ammeter_left:vFn,dc_ammeter_right:wFn,dc_ammeter_up:PFn,dc_ammeter_vert:iut,dc_voltmeter_down:NFn,dc_voltmeter_horz:kFn,dc_voltmeter_left:HFn,dc_voltmeter_right:YFn,dc_voltmeter_up:VFn,dc_voltmeter_vert:WFn,diac_down:jFn,diac_horz:$Fn,diac_left:qFn,diac_right:XFn,diac_up:ZFn,diac_vert:eLn,digital_ground_down:oLn,digital_ground_left:sLn,digital_ground_right:cLn,digital_ground_up:gLn,diode_down:hLn,diode_left:pLn,diode_right:lie,diode_up:mLn,dpdt_normally_closed_switch_down:fLn,dpdt_normally_closed_switch_left:ILn,dpdt_normally_closed_switch_right:uie,dpdt_normally_closed_switch_up:CLn,dpdt_switch_down:xLn,dpdt_switch_left:ELn,dpdt_switch_right:gie,dpdt_switch_up:BLn,dpst_normally_closed_switch_down:SLn,dpst_normally_closed_switch_left:QLn,dpst_normally_closed_switch_right:die,dpst_normally_closed_switch_up:vLn,dpst_switch_down:PLn,dpst_switch_left:MLn,dpst_switch_right:hie,dpst_switch_up:DLn,ferrite_bead_down:TLn,ferrite_bead_left:kLn,ferrite_bead_right:fut,ferrite_bead_up:_ut,filled_diode_down:HLn,filled_diode_horz:YLn,filled_diode_left:VLn,filled_diode_right:WLn,filled_diode_up:qLn,filled_diode_vert:eHn,frequency_meter_horz:uEe,frequency_meter_vert:AHn,fuse_horz:vut,fuse_vert:gHn,ground_down:dHn,ground_horz:hHn,ground_left:pHn,ground_right:mHn,ground_up:_Hn,ground_vert:fHn,gunn_diode_horz:IHn,gunn_diode_vert:CHn,icled_down:xHn,icled_left:EHn,icled_right:Bie,icled_up:BHn,igbt_transistor_horz:wut,igbt_transistor_vert:SHn,illuminated_push_button_normally_open_horz:Mut,illuminated_push_button_normally_open_vert:vHn,inductor_down:wHn,inductor_left:PHn,inductor_right:MHn,inductor_up:DHn,laser_diode_down:NHn,laser_diode_left:RHn,laser_diode_right:Sie,laser_diode_up:THn,led_down:HHn,led_left:OHn,led_right:wEe,led_up:Fut,light_dependent_resistor_horz:Out,light_dependent_resistor_vert:KHn,mosfet_depletion_normally_on_horz:zut,mosfet_depletion_normally_on_vert:JHn,mushroom_head_normally_open_momentary_horz:$ut,mushroom_head_normally_open_momentary_vert:qHn,n_channel_d_mosfet_transistor_gate_bottom_drain_left:tOn,n_channel_d_mosfet_transistor_gate_bottom_drain_right:nOn,n_channel_d_mosfet_transistor_gate_left_drain_bottom:oOn,n_channel_d_mosfet_transistor_gate_left_drain_top:iOn,n_channel_d_mosfet_transistor_gate_right_drain_bottom:rOn,n_channel_d_mosfet_transistor_gate_right_drain_top:sOn,n_channel_d_mosfet_transistor_gate_top_drain_left:aOn,n_channel_d_mosfet_transistor_gate_top_drain_right:AOn,n_channel_d_mosfet_transistor_horz:G9,n_channel_d_mosfet_transistor_vert:M8,n_channel_e_mosfet_transistor_gate_bottom_drain_left:gOn,n_channel_e_mosfet_transistor_gate_bottom_drain_right:dOn,n_channel_e_mosfet_transistor_gate_left_drain_bottom:hOn,n_channel_e_mosfet_transistor_gate_left_drain_top:pOn,n_channel_e_mosfet_transistor_gate_right_drain_bottom:mOn,n_channel_e_mosfet_transistor_gate_right_drain_top:_On,n_channel_e_mosfet_transistor_gate_top_drain_left:fOn,n_channel_e_mosfet_transistor_gate_top_drain_right:IOn,n_channel_e_mosfet_transistor_horz:Y9,n_channel_e_mosfet_transistor_vert:D8,njfet_transistor_horz:Agt,njfet_transistor_vert:EOn,not_connected_down:QOn,not_connected_left:vOn,not_connected_right:Die,not_connected_up:wOn,npn_bipolar_transistor_down:DOn,npn_bipolar_transistor_horz:TOn,npn_bipolar_transistor_left:LOn,npn_bipolar_transistor_right:GOn,npn_bipolar_transistor_up:KOn,npn_bipolar_transistor_vert:JOn,opamp_no_power_down:jOn,opamp_no_power_left:$On,opamp_no_power_right:Hie,opamp_no_power_up:qOn,opamp_with_power_down:ZOn,opamp_with_power_left:eGn,opamp_with_power_right:Oie,opamp_with_power_up:tGn,p_channel_d_mosfet_transistor_gate_bottom_drain_left:rGn,p_channel_d_mosfet_transistor_gate_bottom_drain_right:sGn,p_channel_d_mosfet_transistor_gate_left_drain_bottom:aGn,p_channel_d_mosfet_transistor_gate_left_drain_top:AGn,p_channel_d_mosfet_transistor_gate_right_drain_bottom:cGn,p_channel_d_mosfet_transistor_gate_right_drain_top:lGn,p_channel_d_mosfet_transistor_gate_top_drain_left:uGn,p_channel_d_mosfet_transistor_gate_top_drain_right:gGn,p_channel_d_mosfet_transistor_horz:U9,p_channel_d_mosfet_transistor_vert:N8,p_channel_e_mosfet_transistor_gate_bottom_drain_left:mGn,p_channel_e_mosfet_transistor_gate_bottom_drain_right:_Gn,p_channel_e_mosfet_transistor_gate_left_drain_bottom:fGn,p_channel_e_mosfet_transistor_gate_left_drain_top:IGn,p_channel_e_mosfet_transistor_gate_right_drain_bottom:CGn,p_channel_e_mosfet_transistor_gate_right_drain_top:yGn,p_channel_e_mosfet_transistor_gate_top_drain_left:xGn,p_channel_e_mosfet_transistor_gate_top_drain_right:EGn,p_channel_e_mosfet_transistor_horz:K9,p_channel_e_mosfet_transistor_vert:R8,photodiode_horz:xgt,photodiode_vert:SGn,pjfet_transistor_horz:Sgt,pjfet_transistor_vert:PGn,pnp_bipolar_transistor_down:NGn,pnp_bipolar_transistor_horz:RGn,pnp_bipolar_transistor_left:FGn,pnp_bipolar_transistor_right:OGn,pnp_bipolar_transistor_up:UGn,pnp_bipolar_transistor_vert:zGn,potentiometer_horz:Mgt,potentiometer_vert:$Gn,potentiometer2_down:ZGn,potentiometer2_left:eYn,potentiometer2_right:jie,potentiometer2_up:tYn,potentiometer3_down:iYn,potentiometer3_left:aYn,potentiometer3_right:AYn,potentiometer3_up:uYn,power_factor_meter_horz:Tgt,power_factor_meter_vert:pYn,push_button_normally_closed_momentary_horz:Ogt,push_button_normally_closed_momentary_vert:IYn,push_button_normally_open_momentary_down:xYn,push_button_normally_open_momentary_horz:bYn,push_button_normally_open_momentary_left:SYn,push_button_normally_open_momentary_right:JV,push_button_normally_open_momentary_up:QYn,push_button_normally_open_momentary_vert:vYn,rail_down:DYn,rail_left:kYn,rail_right:OYn,rail_up:UYn,rectifier_diode_horz:Zgt,rectifier_diode_vert:jYn,resistor_down:XYn,resistor_left:tUn,resistor_right:iUn,resistor_up:aUn,resonator_down:lUn,resonator_horz:sdt,resonator_left:dUn,resonator_right:lre,resonator_up:hUn,resonator_vert:pUn,schottky_diode_down:_Un,schottky_diode_left:fUn,schottky_diode_right:gre,schottky_diode_up:IUn,silicon_controlled_rectifier_horz:Adt,silicon_controlled_rectifier_vert:yUn,solderjumper2_bridged12_down:xUn,solderjumper2_bridged12_left:EUn,solderjumper2_bridged12_right:a4e,solderjumper2_bridged12_up:BUn,solderjumper2_down:bUn,solderjumper2_left:SUn,solderjumper2_right:l4e,solderjumper2_up:QUn,solderjumper3_bridged12_down:vUn,solderjumper3_bridged12_left:wUn,solderjumper3_bridged12_right:d4e,solderjumper3_bridged12_up:PUn,solderjumper3_bridged123_down:MUn,solderjumper3_bridged123_left:DUn,solderjumper3_bridged123_right:m4e,solderjumper3_bridged123_up:NUn,solderjumper3_bridged23_down:RUn,solderjumper3_bridged23_left:TUn,solderjumper3_bridged23_right:I4e,solderjumper3_bridged23_up:kUn,solderjumper3_down:FUn,solderjumper3_left:LUn,solderjumper3_right:x4e,solderjumper3_up:HUn,spdt_normally_closed_switch_down:GUn,spdt_normally_closed_switch_left:YUn,spdt_normally_closed_switch_right:dre,spdt_normally_closed_switch_up:UUn,spdt_switch_down:VUn,spdt_switch_left:zUn,spdt_switch_right:hre,spdt_switch_up:JUn,spst_normally_closed_switch_down:WUn,spst_normally_closed_switch_left:jUn,spst_normally_closed_switch_right:mre,spst_normally_closed_switch_up:$Un,spst_switch_down:qUn,spst_switch_left:XUn,spst_switch_right:fre,spst_switch_up:ZUn,square_wave_down:eKn,square_wave_left:tKn,square_wave_right:nKn,square_wave_up:oKn,step_recovery_diode_horz:Pdt,step_recovery_diode_vert:iKn,tachometer_horz:aBe,tachometer_vert:gKn,testpoint_down:dKn,testpoint_left:hKn,testpoint_right:yre,testpoint_up:pKn,tilted_ground_down:_Kn,tilted_ground_left:fKn,tilted_ground_right:ABe,tilted_ground_up:Fdt,triac_horz:Hdt,triac_vert:yKn,tunnel_diode_horz:Kdt,tunnel_diode_vert:QKn,unijunction_transistor_horz:zdt,unijunction_transistor_vert:DKn,usbc:RKn,var_meter_horz:qdt,var_meter_vert:LKn,varactor_diode_horz:eht,varactor_diode_vert:KKn,varistor_horz:oht,varistor_vert:JKn,varmeter_horz:xBe,varmeter_vert:tVn,vcc_down:oVn,vcc_left:rVn,vcc_right:aVn,vcc_up:cVn,volt_meter_horz:lVn,volt_meter_vert:hVn,watt_hour_meter_horz:BBe,watt_hour_meter_vert:xVn,wattmeter_horz:bBe,wattmeter_vert:PVn,zener_diode_horz:MVn,zener_diode_vert:RVn};Object.fromEntries(Object.keys(Su).map(t=\u003e[t,t]));const hht=!0,TVn=!1,mF={CCW:-1,CW:1,NOT_ORIENTABLE:0},kVn=2*Math.PI,Nre=1,pht=0,V9=2,FVn=3,LVn=4,HVn=1,OVn=2,SBe=0,WV=1,_F=2;var Rre=Object.freeze({__proto__:null,BOUNDARY:V9,CCW:hht,CONTAINS:FVn,CW:TVn,END_VERTEX:_F,INSIDE:Nre,INTERLACE:LVn,NOT_VERTEX:SBe,ORIENTATION:mF,OUTSIDE:pht,OVERLAP_OPPOSITE:OVn,OVERLAP_SAME:HVn,PIx2:kVn,START_VERTEX:WV});let z9=1e-6;function mht(t){z9=t}function _ht(){return z9}const GVn=3;function QBe(t){return t\u003cz9\u0026\u0026t\u003e-z9}function gD(t,e){return t-e\u003cz9\u0026\u0026t-e\u003e-z9}function fht(t,e){return t-e\u003ez9}function YVn(t,e){return t-e\u003e-z9}function Iht(t,e){return t-e\u003c-z9}function UVn(t,e){return t-e\u003cz9}var KVn=Object.freeze({__proto__:null,DECIMALS:GVn,EQ:gD,EQ_0:QBe,GE:YVn,GT:fht,LE:UVn,LT:Iht,getTolerance:_ht,setTolerance:mht});let Ge={Utils:KVn,Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in Rre)Ge[t]=Rre[t];Object.defineProperty(Ge,\"DP_TOL\",{get:function(){return _ht()},set:function(t){mht(t)}});let cd=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError(\"Illegal Parameters\")}static get ZERO_DIVISION(){return new Error(\"Zero division\")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error(\"Unresolved boundary conflict in boolean operation\")}static get INFINITE_LOOP(){return new Error(\"Infinite loop\")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error(\"Cannot complete boolean operation\")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error(\"Abstract method cannot be invoked\")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error(\"Operation is not supported\")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error(\"Unsupported shape type\")}};Ge.Errors=cd;let vBe=class{constructor(e,n){this.first=e,this.last=n||this.first}[Symbol.iterator](){let e;return{next:()=\u003e(e=e?e.next:this.first,{value:e,done:e===void 0})}}get size(){let e=0;for(let n of this)e++;return e}toArray(e=void 0,n=void 0){let o=[],i=e||this.first,r=n||this.last,s=i;if(s===void 0)return o;do o.push(s),s=s.next;while(s!==r.next);return o}append(e){return this.isEmpty()?this.first=e:(e.prev=this.last,this.last.next=e),this.last=e,this.last.next=void 0,this.first.prev=void 0,this}insert(e,n){if(this.isEmpty())this.first=e,this.last=e;else if(n==null)e.next=this.first,this.first.prev=e,this.first=e;else{let o=n.next;n.next=e,o\u0026\u0026(o.prev=e),e.prev=n,e.next=o,this.last===n\u0026\u0026(this.last=e)}return this.last.next=void 0,this.first.prev=void 0,this}remove(e){return e===this.first\u0026\u0026e===this.last?(this.first=void 0,this.last=void 0):(e.prev\u0026\u0026(e.prev.next=e.next),e.next\u0026\u0026(e.next.prev=e.prev),e===this.first\u0026\u0026(this.first=e.next),e===this.last\u0026\u0026(this.last=e.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(e){let n=e,o=e;do{if(n!=e\u0026\u0026n===o)throw cd.INFINITE_LOOP;n=n.next,o=o.next.next}while(n!=e)}};const Cht={stroke:\"black\"};let VVn=class{constructor(e=Cht){for(const n in e)this[n]=e[n];this.stroke=e.stroke??Cht.stroke}toAttributesString(){return Object.keys(this).reduce((e,n)=\u003ee+(this[n]!==void 0?this.toAttrString(n,this[n]):\"\"),\"\")}toAttrString(e,n){const o=e===\"className\"?\"class\":this.convertCamelToKebabCase(e);return n===null?`${o} `:`${o}=\"${n.toString()}\" `}convertCamelToKebabCase(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join(\"-\").toLowerCase()}};function dD(t){return new VVn(t).toAttributesString()}function fF(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ge.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ge.Point(g,h))}return n}function hD(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ge.Utils.EQ(i,e.r))n.push(o);else if(Ge.Utils.LT(i,e.r)){let r=Math.sqrt(e.r*e.r-i*i),s,a;s=t.norm.rotate90CCW().multiply(r),a=o.translate(s),n.push(a),s=t.norm.rotate90CW().multiply(r),a=o.translate(s),n.push(a)}return n}function IF(t,e){let n=[];for(let o of e.toSegments()){let i=jV(o,t);for(let r of i)Mht(r,n)||n.push(r)}return n}function Tre(t,e){let n=[];if(IF(t,e.box).length===0)return n;let o=new Ge.Circle(e.pc,e.r),i=hD(t,o);for(let r of i)r.on(e)\u0026\u0026n.push(r);return n}function jV(t,e){let n=[];if(t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026!t.isZeroLength()\u0026\u0026n.push(t.pe),n.length\u003e0||t.isZeroLength()||t.ps.leftTo(e)\u0026\u0026t.pe.leftTo(e)||!t.ps.leftTo(e)\u0026\u0026!t.pe.leftTo(e))return n;let o=new Ge.Line(t.ps,t.pe);return fF(o,e)}function kre(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)\u0026\u0026n.push(e.ps),n;let o=new Ge.Line(t.ps,t.pe),i=new Ge.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026n.push(t.pe),e.ps.on(t)\u0026\u0026!e.ps.equalTo(t.ps)\u0026\u0026!e.ps.equalTo(t.pe)\u0026\u0026n.push(e.ps),e.pe.on(t)\u0026\u0026!e.pe.equalTo(t.ps)\u0026\u0026!e.pe.equalTo(t.pe)\u0026\u0026n.push(e.pe);else if(o.parallelTo(i)){const r=new Ge.Vector(t.ps,t.pe),s=new Ge.Vector(e.ps,e.pe),a=new Ge.Vector(t.ps,e.ps),A=r.cross(s);if(!Ge.Utils.EQ_0(A)){const c=a.cross(s)/A,l=a.cross(r)/A;Ge.Utils.GE(c,0)\u0026\u0026Ge.Utils.LE(c,1)\u0026\u0026Ge.Utils.GE(l,0)\u0026\u0026Ge.Utils.LE(l,1)\u0026\u0026n.push(yht(t.ps.translate(r.multiply(c)),t,e))}}else{let r=fF(o,i);r.length\u003e0\u0026\u0026xht(r[0],t)\u0026\u0026xht(r[0],e)\u0026\u0026n.push(yht(r[0],t,e))}return n}function yht(t,e,n){for(const o of[e.ps,e.pe,n.ps,n.pe])if(t.equalTo(o))return o;return t}function xht(t,e){const n=e.box;return Ge.Utils.LE(t.x,n.xmax)\u0026\u0026Ge.Utils.GE(t.x,n.xmin)\u0026\u0026Ge.Utils.LE(t.y,n.ymax)\u0026\u0026Ge.Utils.GE(t.y,n.ymin)}function Fre(t,e){let n=[];if(t.isZeroLength()){let[r,s]=t.ps.distanceTo(e.pc);return Ge.Utils.EQ(r,e.r)\u0026\u0026n.push(t.ps),n}let o=new Ge.Line(t.ps,t.pe),i=hD(o,e);for(let r of i)r.on(t)\u0026\u0026n.push(r);return n}function CF(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;let o=new Ge.Line(t.ps,t.pe),i=new Ge.Circle(e.pc,e.r),r=hD(o,i);for(let s of r)s.on(t)\u0026\u0026s.on(e)\u0026\u0026n.push(s);return n}function zVn(t,e){let n=[];for(let o of e.toSegments()){let i=kre(o,t);for(let r of i)n.push(r)}return n}function Eht(t,e){let n=[],o=new Ge.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ge.Utils.EQ_0(i)||Ge.Utils.EQ_0(r))return n;if(Ge.Utils.EQ_0(o.x)\u0026\u0026Ge.Utils.EQ_0(o.y)\u0026\u0026Ge.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s=t.pc.distanceTo(e.pc)[0];if(Ge.Utils.GT(s,i+r)||Ge.Utils.LT(s,Math.abs(i-r)))return n;o.x/=s,o.y/=s;let a;if(Ge.Utils.EQ(s,i+r)||Ge.Utils.EQ(s,Math.abs(i-r)))return a=t.pc.translate(i*o.x,i*o.y),n.push(a),n;let A=i*i/(2*s)-r*r/(2*s)+s/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return a=c.translate(o.rotate90CCW().multiply(l)),n.push(a),a=c.translate(o.rotate90CW().multiply(l)),n.push(a),n}function JVn(t,e){let n=[];for(let o of e.toSegments()){let i=Fre(o,t);for(let r of i)n.push(r)}return n}function Bht(t,e){let n=[];if(t.pc.equalTo(e.pc)\u0026\u0026Ge.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)\u0026\u0026n.push(s),s=t.end,s.on(e)\u0026\u0026n.push(s),s=e.start,s.on(t)\u0026\u0026n.push(s),s=e.end,s.on(t)\u0026\u0026n.push(s),n}let o=new Ge.Circle(t.pc,t.r),i=new Ge.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)\u0026\u0026s.on(e)\u0026\u0026n.push(s);return n}function wBe(t,e){let n=[];if(e.pc.equalTo(t.pc)\u0026\u0026Ge.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=e,i=new Ge.Circle(t.pc,t.r),r=Eht(o,i);for(let s of r)s.on(t)\u0026\u0026n.push(s);return n}function WVn(t,e){let n=[];for(let o of e.toSegments()){let i=CF(o,t);for(let r of i)n.push(r)}return n}function bht(t,e){return t.isSegment?kre(t.shape,e):CF(e,t.shape)}function Sht(t,e){return t.isSegment?CF(t.shape,e):Bht(t.shape,e)}function Qht(t,e){return t.isSegment?jV(t.shape,e):Tre(e,t.shape)}function jVn(t,e){return t.isSegment?DBe(e,t.shape):NBe(e,t.shape)}function $Vn(t,e){return t.isSegment?Fre(t.shape,e):wBe(t.shape,e)}function PBe(t,e){let n=[];for(let o of e.edges)for(let i of bht(o,t))n.push(i);return n}function MBe(t,e){let n=[];for(let o of e.edges)for(let i of Sht(o,t))n.push(i);return n}function $V(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of Qht(o,t))Mht(i,n)||n.push(i);return t.sortPoints(n)}function vht(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of $Vn(o,t))n.push(i);return n}function wht(t,e){return t.isSegment?bht(e,t.shape):t.isArc?Sht(e,t.shape):t.isLine?Qht(e,t.shape):t.isRay?jVn(e,t.shape):[]}function Pht(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...wht(t,i)];return n}function qVn(t,e){let n=[];if(e.isEmpty()||t.size===0)return n;for(let o of t)n=[...n,...Pht(o,e)];return n}function XVn(t,e){let n=[];if(t.isEmpty()||e.isEmpty()||t.box.not_intersect(e.box))return n;for(let o of t.edges)n=[...n,...Pht(o,e)];return n}function ZVn(t,e){return t instanceof Ge.Line?$V(t,e):t instanceof Ge.Segment?PBe(t,e):t instanceof Ge.Arc?MBe(t,e):[]}function Mht(t,e){return e.some(n=\u003en.equalTo(t))}function NQ(t){return new Ge.Line(t.start,t.norm)}function DBe(t,e){return jV(e,NQ(t)).filter(n=\u003et.contains(n))}function NBe(t,e){return Tre(NQ(t),e).filter(n=\u003et.contains(n))}function Dht(t,e){return hD(NQ(t),e).filter(n=\u003et.contains(n))}function ezn(t,e){return IF(NQ(t),e).filter(n=\u003et.contains(n))}function Nht(t,e){return fF(NQ(t),e).filter(n=\u003et.contains(n))}function tzn(t,e){return fF(NQ(t),NQ(e)).filter(n=\u003et.contains(n)).filter(n=\u003ee.contains(n))}function Rht(t,e){return $V(NQ(t),e).filter(n=\u003et.contains(n))}function Tht(t,e){if(t.intersect\u0026\u0026t.intersect instanceof Function)return t.intersect(e);throw cd.UNSUPPORTED_SHAPE_TYPE}function yF(t,e){let n=[];for(let o of e)n=[...n,...Tht(t,o.shape)];return n}function nzn(t,e){let n=[];for(let o of t)for(let i of e)n=[...n,...Tht(o.shape,i.shape)];return n}let pD=class Ute extends vBe{constructor(...e){if(super(),this.isInfinite=!1,e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length\u003e0){const n=e[0],o=n.length,i=A=\u003eA instanceof Ge.Segment||A instanceof Ge.Arc||A instanceof Ge.Ray||A instanceof Ge.Line,r=A=\u003eA instanceof Ge.Segment||A instanceof Ge.Arc||A instanceof Ge.Ray,s=A=\u003eA instanceof Ge.Segment||A instanceof Ge.Arc;if(o===1\u0026\u0026i(n[0])||o\u003e1\u0026\u0026r(n[0])\u0026\u0026r(n[o-1])\u0026\u0026n.slice(1,o-1).every(s)){this.isInfinite=n.some(A=\u003eA instanceof Ge.Ray||A instanceof Ge.Line);for(let A of n){let c=new Ge.Edge(A);this.append(c)}this.setArcLength()}else throw Ge.Errors.ILLEGAL_PARAMETERS}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=\u003ee.merge(n.box),new Ge.Box)}get vertices(){let e=this.edges.map(n=\u003en.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new Ute(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e\u003ethis.length||e\u003c0||this.isInfinite)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ge.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Ge.Point){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Line){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Circle){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Segment){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Arc){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Box){const[n,o]=Ge.Distance.shape2multiline(new Ge.Polygon(e),this);return[n,o.reverse()]}if(e instanceof Ge.Multiline)return Ge.Distance.multiline2multiline(this,e);throw Ge.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ge.Multiline?nzn(this,e):yF(e,this)}contains(e){if(e instanceof Ge.Point)return this.edges.some(n=\u003en.shape.contains(e));throw Ge.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new Ute(this.edges.map(n=\u003en.shape.translate(e)))}rotate(e=0,n=new Ge.Point){return new Ute(this.edges.map(o=\u003eo.shape.rotate(e,n)))}transform(e=new Ge.Matrix){return new Ute(this.edges.map(n=\u003en.shape.transform(e)))}toShapes(){return this.edges.map(e=\u003ee.shape.clone())}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svgPoints(){return this.vertices.map(e=\u003e`${e.x},${e.y}`).join(\" \")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`\n\u003cpath ${dD({fill:\"none\",...e})} d=\"`;n+=`\nM${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`\" \u003e\n\u003c/path\u003e`,n}};Ge.Multiline=pD;const ozn=(...t)=\u003enew Ge.Multiline(...t);Ge.multiline=ozn;function xF(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;i[0]===null?r=0:i[1]===null?r=t.shape.length:r=i[0].length;let s=SBe;gD(r,0)\u0026\u0026(s|=WV),gD(r,t.shape.length)\u0026\u0026(s|=_F);let a;r===1/0?a=i[0].coord(e):a=s\u0026_F\u0026\u0026t.next\u0026\u0026t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:a,edge_before:t,edge_after:void 0,face:t.face,is_vertex:s})}function qV(t){t.int_points1_sorted=RQ(t.int_points1),t.int_points2_sorted=RQ(t.int_points2)}function RQ(t){let e=new Map,n=0;for(let i of t)e.has(i.face)||(e.set(i.face,n),n++);for(let i of t)i.faceId=e.get(i.face);return t.slice().sort(izn)}function izn(t,e){return t.faceId\u003ce.faceId?-1:t.faceId\u003ee.faceId?1:t.arc_length\u003ce.arc_length?-1:t.arc_length\u003ee.arc_length?1:0}function RBe(t){if(t.int_points1.length\u003c2)return;let e=!1,n,o,i,r;for(let s=0;s\u003ct.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){n=t.int_points1_sorted[s],o=t.int_points2[n.id];for(let a=s+1;a\u003ct.int_points1_sorted.length\u0026\u0026(i=t.int_points1_sorted[a],!!gD(i.arc_length,n.arc_length));a++)i.id!==-1\u0026\u0026(r=t.int_points2[i.id],r.id!==-1\u0026\u0026i.edge_before===n.edge_before\u0026\u0026i.edge_after===n.edge_after\u0026\u0026r.edge_before===o.edge_before\u0026\u0026r.edge_after===o.edge_after\u0026\u0026(i.id=-1,r.id=-1,e=!0))}o=t.int_points2_sorted[0],n=t.int_points1[o.id];for(let s=1;s\u003ct.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(o.id===-1||!gD(a.arc_length,o.arc_length)){o=a,n=t.int_points1[o.id];continue}let A=t.int_points1[a.id];A.edge_before===n.edge_before\u0026\u0026A.edge_after===n.edge_after\u0026\u0026a.edge_before===o.edge_before\u0026\u0026a.edge_after===o.edge_after\u0026\u0026(A.id=-1,a.id=-1,e=!0)}e\u0026\u0026(t.int_points1=t.int_points1.filter(s=\u003es.id\u003e=0),t.int_points2=t.int_points2.filter(s=\u003es.id\u003e=0),t.int_points1.forEach((s,a)=\u003es.id=a),t.int_points2.forEach((s,a)=\u003es.id=a))}function TBe(t){for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after\u0026\u0026(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvEnd=V9),e.edge_after\u0026\u0026(e.edge_after.bvStart=V9)}function kBe(t,e){for(let n of t)n.edge_before\u0026\u0026n.edge_before.setInclusion(e),n.edge_after\u0026\u0026n.edge_after.setInclusion(e)}function rzn(t){let e,n,o,i=t.int_points1.length;for(let r=0;r\u003ci;r++){let s=t.int_points1_sorted[r];s.face!==e\u0026\u0026(n=r,e=s.face);let a=r,A=EF(t.int_points1_sorted,r,e),c;a+A\u003ci\u0026\u0026t.int_points1_sorted[a+A].face===e?c=a+A:c=n;let l=EF(t.int_points1_sorted,c,e);o=null;for(let _=c;_\u003cc+l;_++){let f=t.int_points1_sorted[_];if(f.face===e\u0026\u0026t.int_points2[f.id].face===t.int_points2[s.id].face){o=f;break}}if(o===null)continue;let u=s.edge_after,g=o.edge_before;if(!(u.bv===V9\u0026\u0026g.bv===V9)||u!==g)continue;let h=t.int_points2[s.id],d=t.int_points2[o.id],p=h.edge_after,m=d.edge_before;p.bv===V9\u0026\u0026m.bv===V9\u0026\u0026p===m||(h=t.int_points2[o.id],d=t.int_points2[s.id],p=h.edge_after,m=d.edge_before),p.bv===V9\u0026\u0026m.bv===V9\u0026\u0026p===m\u0026\u0026u.setOverlap(p)}}function EF(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s\u003ct.length\u0026\u0026!(o.face!==n||(i=t[s],!(i.pt.equalTo(o.pt)\u0026\u0026i.edge_before===o.edge_before\u0026\u0026i.edge_after===o.edge_after)));s++)r++;return r}function BF(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=SBe,o.shape.start\u0026\u0026o.shape.start.equalTo(n.pt)\u0026\u0026(n.is_vertex|=WV),o.shape.end\u0026\u0026o.shape.end.equalTo(n.pt)\u0026\u0026(n.is_vertex|=_F),n.is_vertex\u0026WV){n.edge_before=o.prev,o.prev\u0026\u0026(n.is_vertex=_F);continue}if(n.is_vertex\u0026_F)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof pD\u0026\u0026n.is_vertex\u0026WV\u0026\u0026(n.edge_after=t.first)}}function kht(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}const{INSIDE:J9,OUTSIDE:W9,BOUNDARY:zf,OVERLAP_SAME:szn,OVERLAP_OPPOSITE:azn}=Rre,{NOT_VERTEX:Fhr,START_VERTEX:Fht,END_VERTEX:Lht}=Rre,Lre=1,XV=2,mD=3;function Azn(t,e){let[n]=ZV(t,e,Lre,!0);return n}function FBe(t,e){let o=e.clone().reverse(),[i]=ZV(t,o,mD,!0);return i}function Hht(t,e){let[n]=ZV(t,e,XV,!0);return n}function Oht(t,e){let[n,o]=ZV(t,e,XV,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=\u003ea.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=\u003ea.shape)];return[i,r]}function LBe(t,e){let[n]=ZV(t,e,mD,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=\u003er.shape)];return o}function Ght(t,e){let n=t.clone(),o=e.clone(),i=Yht(n,o);qV(i),BF(n,i.int_points1_sorted),BF(o,i.int_points2_sorted),RBe(i),qV(i);let r=i.int_points1_sorted.map(a=\u003ea.pt),s=i.int_points2_sorted.map(a=\u003ea.pt);return[r,s]}function czn(t,e,n,o){let i=Uht(t,n.int_points1),r=Uht(e,n.int_points2);for(Kht(i,e),Kht(r,t),TBe(n.int_points1),TBe(n.int_points2),kBe(n.int_points1,e),kBe(n.int_points2,t);uzn(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););rzn(n),HBe(t,o,n.int_points1_sorted,!0),HBe(e,o,n.int_points2_sorted,!1),Vht(t,i,o,!0),Vht(e,r,o,!1)}function lzn(t,e,n,o){gzn(t,e,o,n.int_points2),dzn(t,e,n),OBe(t,n.int_points1),OBe(e,n.int_points2),GBe(t,n.int_points1,n.int_points2),GBe(t,n.int_points2,n.int_points1),zht(t),zht(e)}function ZV(t,e,n,o){let i=t.clone(),r=e.clone(),s=Yht(i,r);return qV(s),BF(i,s.int_points1_sorted),BF(r,s.int_points2_sorted),RBe(s),qV(s),czn(i,r,s,n),o\u0026\u0026lzn(i,r,s,n),[i,r]}function Yht(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)xF(o,a,n.int_points1),xF(r,a,n.int_points2)}}return n}function Uht(t,e){let n=[];for(let o of t.faces)e.find(i=\u003ei.face===o)||n.push(o);return n}function Kht(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function uzn(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u\u003cc;u++){let g=o[u];g.face!==s\u0026\u0026(a=u,s=g.face);let h=u,d=EF(o,u,s),p;h+d\u003cc\u0026\u0026o[h+d].face===s?p=h+d:p=a;let m=EF(o,p,s);A=null;for(let I=p;I\u003cp+m;I++){let C=o[I];if(C.face===s\u0026\u0026i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv===zf\u0026\u0026f.bv!=zf){_.bv=f.bv;continue}if(_.bv!=zf\u0026\u0026f.bv===zf){f.bv=_.bv;continue}if(_.bv===zf\u0026\u0026f.bv===zf\u0026\u0026_!=f||_.bv===J9\u0026\u0026f.bv===W9||_.bv===W9\u0026\u0026f.bv===J9){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===zf\u0026\u0026f.bv===zf\u0026\u0026_!=f){let I=_.next,C;for(;I!=f;){if(I.bv!=zf){if(C===void 0)C=I.bv;else if(I.bv!=C)throw cd.UNRESOLVED_BOUNDARY_CONFLICT}I=I.next}C!=null\u0026\u0026(_.bv=C,f.bv=C);continue}if(_.bv===J9\u0026\u0026f.bv===W9||_.bv===W9\u0026\u0026f.bv===J9){let I=_;for(;I!=f;){if(I.bvStart===_.bv\u0026\u0026I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C\u003c10*Ge.DP_TOL){xF(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex\u0026Fht)x.edge_after=I,x.edge_before=I.prev,I.bvStart=zf,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex\u0026Lht)x.edge_after=I.next,I.bvEnd=zf,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=zf,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);xF(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex\u0026Fht)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex\u0026Lht)B.edge_after=E.next;else{let S=i.find(w=\u003ew.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S\u0026\u0026(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=zf,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=zf,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}qV(r),l=!0;break}}I=I.next}if(l)break;throw cd.UNRESOLVED_BOUNDARY_CONFLICT}}return l}function HBe(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A\u003cn.length;A++){if(s=n[A],s.face!==i\u0026\u0026(r=A,i=s.face),i.isEmpty())continue;let c=A,l=EF(n,A,i),u;c+l\u003cn.length\u0026\u0026n[c+l].face===s.face?u=c+l:u=r,a=n[u];let g=u,h=EF(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===J9\u0026\u0026p.bv===J9\u0026\u0026e===Lre||d.bv===W9\u0026\u0026p.bv===W9\u0026\u0026e===XV||(d.bv===W9||p.bv===W9)\u0026\u0026e===mD\u0026\u0026!o||(d.bv===J9||p.bv===J9)\u0026\u0026e===mD\u0026\u0026o||d.bv===zf\u0026\u0026p.bv===zf\u0026\u0026d.overlap\u0026szn\u0026\u0026o||d.bv===zf\u0026\u0026p.bv===zf\u0026\u0026d.overlap\u0026azn){t.removeChain(i,d,p);for(let m=c;m\u003cc+l;m++)n[m].edge_after=void 0;for(let m=g;m\u003cg+h;m++)n[m].edge_before=void 0}A+=l-1}}function gzn(t,e,n,o){for(let i of e.faces){for(let r of i)t.edges.add(r);o.find(r=\u003er.face===i)===void 0\u0026\u0026t.addFace(i.first,i.last)}}function dzn(t,e,n){if(n.int_points1.length!==0)for(let o=0;o\u003cn.int_points1.length;o++){let i=n.int_points1[o],r=n.int_points2[o];if(i.edge_before!==void 0\u0026\u0026i.edge_after===void 0\u0026\u0026r.edge_before===void 0\u0026\u0026r.edge_after!==void 0\u0026\u0026(i.edge_before.next=r.edge_after,r.edge_after.prev=i.edge_before,i.edge_after=r.edge_after,r.edge_before=i.edge_before),r.edge_before!==void 0\u0026\u0026r.edge_after===void 0\u0026\u0026i.edge_before===void 0\u0026\u0026i.edge_after!==void 0\u0026\u0026(r.edge_before.next=i.edge_after,i.edge_after.prev=r.edge_before,r.edge_after=i.edge_after,i.edge_before=r.edge_before),i.edge_before!==void 0\u0026\u0026i.edge_after===void 0)for(let s of n.int_points1_sorted)s!==i\u0026\u0026s.edge_before===void 0\u0026\u0026s.edge_after!==void 0\u0026\u0026s.pt.equalTo(i.pt)\u0026\u0026(i.edge_before.next=s.edge_after,s.edge_after.prev=i.edge_before,i.edge_after=s.edge_after,s.edge_before=i.edge_before);if(r.edge_before!==void 0\u0026\u0026r.edge_after===void 0)for(let s of n.int_points2_sorted)s!==r\u0026\u0026s.edge_before===void 0\u0026\u0026s.edge_after!==void 0\u0026\u0026s.pt.equalTo(r.pt)\u0026\u0026(r.edge_before.next=s.edge_after,s.edge_after.prev=r.edge_before,r.edge_after=s.edge_after,s.edge_before=r.edge_before)}}function OBe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before\u0026\u0026(n.edge_before.face=void 0),n.edge_after\u0026\u0026(n.edge_after.face=void 0)}function GBe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{vBe.testInfiniteLoop(i)}catch{throw cd.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s);for(let a of n)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s)}}function Vht(t,e,n,o){for(let i of e){let r=i.first.bv;(n===Lre\u0026\u0026r===J9||n===mD\u0026\u0026r===J9\u0026\u0026o||n===mD\u0026\u0026r===W9\u0026\u0026!o||n===XV\u0026\u0026r===W9)\u0026\u0026t.deleteFace(i)}}function zht(t){const e=[];for(const n of t.edges)(!n.face||!t.faces.has(n.face))\u0026\u0026e.push(n);for(const n of e)t.edges.delete(n)}var YBe=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:XV,BOOLEAN_SUBTRACT:mD,BOOLEAN_UNION:Lre,calculateIntersections:Ght,innerClip:Oht,intersect:Hht,outerClip:LBe,removeNotRelevantChains:HBe,removeOldFaces:OBe,restoreFaces:GBe,subtract:FBe,unify:Azn});const hzn=RegExp(\"T.F..FFF.|T.F...F..\"),pzn=RegExp(\"T........|.T.......|...T.....|....T....\"),mzn=RegExp(\"FT.......|F..T.....|F...T....\"),_zn=RegExp(\"T.F..F...\"),fzn=RegExp(\"T.F..F...|.TF..F...|..FT.F...|..F.TF...\");let bF=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(e){this.m[0]=e}get I2B(){return this.m[1]}set I2B(e){this.m[1]=e}get I2E(){return this.m[2]}set I2E(e){this.m[2]=e}get B2I(){return this.m[3]}set B2I(e){this.m[3]=e}get B2B(){return this.m[4]}set B2B(e){this.m[4]=e}get B2E(){return this.m[5]}set B2E(e){this.m[5]=e}get E2I(){return this.m[6]}set E2I(e){this.m[6]=e}get E2B(){return this.m[7]}set E2B(e){this.m[7]=e}get E2E(){return this.m[8]}set E2E(e){this.m[8]=e}toString(){return this.m.map(e=\u003ee instanceof Array\u0026\u0026e.length\u003e0?\"T\":e instanceof Array\u0026\u0026e.length===0?\"F\":\"*\").join(\"\")}equal(){return hzn.test(this.toString())}intersect(){return pzn.test(this.toString())}touch(){return mzn.test(this.toString())}inside(){return _zn.test(this.toString())}covered(){return fzn.test(this.toString())}};function ez(t,e){let n,o=new Ge.Ray(e),i=new Ge.Line(o.pt,o.norm);const r=new Ge.Box(o.box.xmin-Ge.DP_TOL,o.box.ymin-Ge.DP_TOL,o.box.xmax+Ge.DP_TOL,o.box.ymax+Ge.DP_TOL);if(t.box.not_intersect(r))return Ge.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ge.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ge.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ge.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=\u003eIht(l.pt.x,u.pt.x)?-1:fht(l.pt.x,u.pt.x)?1:l.face_index\u003cu.face_index?-1:l.face_index\u003eu.face_index?1:l.edge.arc_length\u003cu.edge.arc_length?-1:l.edge.arc_length\u003eu.edge.arc_length?1:0);let c=0;for(let l=0;l\u003cA.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;QBe(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;QBe(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.edge.shape instanceof Ge.Segment)c++;else{let g=u.edge.shape.box;gD(u.pt.y,g.ymin)||gD(u.pt.y,g.ymax)||c++}}return n=c%2===1?Nre:pht,n}function Izn(t,e){return SF(t,e).equal()}function Jht(t,e){return SF(t,e).intersect()}function Czn(t,e){return SF(t,e).touch()}function yzn(t,e){return!Jht(t,e)}function Wht(t,e){return SF(t,e).inside()}function jht(t,e){return SF(t,e).covered()}function xzn(t,e){return Wht(e,t)}function $ht(t,e){return jht(e,t)}function SF(t,e){if(t instanceof Ge.Line\u0026\u0026e instanceof Ge.Line)return Ezn(t,e);if(t instanceof Ge.Line\u0026\u0026e instanceof Ge.Circle)return Bzn(t,e);if(t instanceof Ge.Line\u0026\u0026e instanceof Ge.Box)return bzn(t,e);if(t instanceof Ge.Line\u0026\u0026e instanceof Ge.Polygon)return Szn(t,e);if((t instanceof Ge.Segment||t instanceof Ge.Arc)\u0026\u0026e instanceof Ge.Polygon)return qht(t,e);if((t instanceof Ge.Segment||t instanceof Ge.Arc)\u0026\u0026(e instanceof Ge.Circle||e instanceof Ge.Box))return qht(t,new Ge.Polygon(e));if(t instanceof Ge.Polygon\u0026\u0026e instanceof Ge.Polygon)return Hre(t,e);if((t instanceof Ge.Circle||t instanceof Ge.Box)\u0026\u0026(e instanceof Ge.Circle||e instanceof Ge.Box))return Hre(new Ge.Polygon(t),new Ge.Polygon(e));if((t instanceof Ge.Circle||t instanceof Ge.Box)\u0026\u0026e instanceof Ge.Polygon)return Hre(new Ge.Polygon(t),e);if(t instanceof Ge.Polygon\u0026\u0026(e instanceof Ge.Circle||e instanceof Ge.Box))return Hre(t,new Ge.Polygon(e))}function Ezn(t,e){let n=new bF,o=fF(t,e);return o.length===0?t.contains(e.pt)\u0026\u0026e.contains(t.pt)?(n.I2I=[t],n.I2E=[],n.E2I=[]):(n.I2I=[],n.I2E=[t],n.E2I=[e]):(n.I2I=o,n.I2E=t.split(o),n.E2I=e.split(o)),n}function Bzn(t,e){let n=new bF,o=hD(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new pD([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ge.Polygon([e.toArc()]).cutWithLine(t)}return n}function bzn(t,e){let n=new bF,o=IF(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new pD([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();e.toSegments().some(a=\u003ea.contains(o[0])\u0026\u0026a.contains(o[1]))?(n.I2I=[],n.I2B=[s[1]],n.I2E=[s[0],s[2]],n.E2I=[e]):(n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ge.Polygon(e.toSegments()).cutWithLine(t))}return n}function Szn(t,e){let n=new bF,o=$V(t,e),i=new pD([t]),r=o.length\u003e0?o.slice():t.sortPoints(o);return i.split(r),[...i].forEach(s=\u003es.setInclusion(e)),n.I2I=[...i].filter(s=\u003es.bv===Ge.INSIDE).map(s=\u003es.shape),n.I2B=[...i].slice(1).map(s=\u003es.bv===Ge.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=\u003es.bv===Ge.OUTSIDE).map(s=\u003es.shape),n.E2I=e.cutWithLine(t),n}function qht(t,e){let n=new bF,o=ZVn(t,e),i=o.length\u003e0?o.slice():t.sortPoints(o),r=new pD([t]);r.split(i),[...r].forEach(s=\u003es.setInclusion(e)),n.I2I=[...r].filter(s=\u003es.bv===Ge.INSIDE).map(s=\u003es.shape),n.I2B=[...r].slice(1).map(s=\u003es.bv===Ge.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=\u003es.bv===Ge.OUTSIDE).map(s=\u003es.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(ez(e,s)){case Ge.INSIDE:n.B2I.push(s);break;case Ge.BOUNDARY:n.B2B.push(s);break;case Ge.OUTSIDE:n.B2E.push(s);break}return n}function Hre(t,e){let n=new bF,[o,i]=Ght(t,e),r=Hht(t,e),s=FBe(t,e),a=FBe(e,t),[A,c]=Oht(t,e),l=LBe(t,e),u=LBe(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var Qzn=Object.freeze({__proto__:null,contain:xzn,cover:$ht,covered:jht,disjoint:yzn,equal:Izn,inside:Wht,intersect:Jht,relate:SF,touch:Czn});let QF=class Rk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new Rk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new Rk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new Rk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length==1\u0026\u0026!isNaN(e[0].x)\u0026\u0026!isNaN(e[0].y))n=e[0].x,o=e[0].y;else if(e.length===2\u0026\u0026typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\")n=e[0],o=e[1];else throw cd.ILLEGAL_PARAMETERS;return this.multiply(new Rk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new Rk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new Rk(e,0,0,n,0,0))}equalTo(e){return!(!Ge.Utils.EQ(this.tx,e.tx)||!Ge.Utils.EQ(this.ty,e.ty)||!Ge.Utils.EQ(this.a,e.a)||!Ge.Utils.EQ(this.b,e.b)||!Ge.Utils.EQ(this.c,e.c)||!Ge.Utils.EQ(this.d,e.d))}};Ge.Matrix=QF;const vzn=(...t)=\u003enew Ge.Matrix(...t);Ge.matrix=vzn;let wzn=class{constructor(e,n){this.low=e,this.high=n}get max(){return this.clone()}less_than(e){return this.low\u003ce.low||this.low===e.low\u0026\u0026this.high\u003ce.high}equal_to(e){return this.low===e.low\u0026\u0026this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high\u003ce.low||e.high\u003cthis.low}merge(e){const n=this.low===void 0?e.low:this.low\u003ce.low?this.low:e.low,o=this.high===void 0?e.high:this.high\u003ee.high?this.high:e.high,i=this.clone();return i.low=n,i.high=o,i}output(){return[this.low,this.high]}comparable_less_than(e,n){return e\u003cn}},Pzn=class WEn extends wzn{clone(){return new WEn(this.low,this.high)}};const Z1=1,eu=0;let TQ=class{constructor(e,n,o=null,i=null,r=null,s=eu){if(this.left=o,this.right=i,this.parent=r,this.color=s,this.item={key:void 0,values:[]},n!==void 0\u0026\u0026this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,A]=e;if(!Number.isNaN(a)\u0026\u0026!Number.isNaN(A)){let c=a,l=A;c\u003el\u0026\u0026([c,l]=[l,c]),this.item.key=new Pzn(c,l)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0\u0026\u0026this.item.values.length===0\u0026\u0026this.left===null\u0026\u0026this.right===null\u0026\u0026this.color===eu}requireKey(){if(!this.item.key)throw new Error(\"Node key is undefined (nil/sentinel). Operation is not applicable.\");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n\u0026\u0026o\u0026\u0026n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right\u0026\u0026this.right.max\u0026\u0026(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left\u0026\u0026this.left.max\u0026\u0026(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(n,i.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(i.high,n)}},UBe=class jEn{constructor(){this.root=null,this.nil_node=new TQ}get size(){let e=0;return this.tree_walk(this.root,n=\u003ee+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=\u003ee.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=\u003e{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new TQ(e));if(o)return o.item.values.push(n),o;const i=new TQ(e,n,this.nil_node,this.nil_node,null,Z1);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new TQ(e));return o?arguments.length\u003c2||n===e?!0:o.item.values.some(i=\u003ei\u0026\u0026i.equal_to?i.equal_to(n):i===n):!1}remove(e,n=e){const o=this.tree_search(this.root,new TQ(e));if(!o)return;if(arguments.length\u003c2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=\u003er\u0026\u0026r.equal_to?r.equal_to(n):r===n);if(i\u003e=0)return o.item.values.splice(i,1),o.item.values.length===0\u0026\u0026this.tree_delete(o),o}search(e,n=(o,i)=\u003eo===i?i.output():o){const o=new TQ(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new TQ(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new jEn;return this.tree_walk(this.root,o=\u003e{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=\u003eo===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new TQ(e)):this.root\u0026\u0026(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,e.less_than(n)?n=n.left:n=n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root\u0026\u0026n.parent.color===Z1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===Z1?(n.parent.color=eu,o.color=eu,n.parent.parent.color=Z1,n=n.parent.parent):(n===n.parent.right\u0026\u0026(n=n.parent,this.rotate_left(n)),n.parent.color=eu,n.parent.parent.color=Z1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===Z1?(n.parent.color=eu,o.color=eu,n.parent.parent.color=Z1,n=n.parent.parent):(n===n.parent.left\u0026\u0026(n=n.parent,this.rotate_right(n)),n.parent.color=eu,n.parent.parent.color=Z1,this.rotate_left(n.parent.parent)));this.root.color=eu}tree_delete(e){let n,o;e.left===this.nil_node||e.right===this.nil_node?n=e:n=this.tree_successor(e),n.left!==this.nil_node?o=n.left:o=n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e\u0026\u0026(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===eu\u0026\u0026this.delete_fixup(o)}delete_fixup(e){let n=e,o;for(;n!==this.root\u0026\u0026n.parent!=null\u0026\u0026n.color===eu;)n===n.parent.left?(o=n.parent.right,o.color===Z1\u0026\u0026(o.color=eu,n.parent.color=Z1,this.rotate_left(n.parent),o=n.parent.right),o.left.color===eu\u0026\u0026o.right.color===eu?(o.color=Z1,n=n.parent):(o.right.color===eu\u0026\u0026(o.color=Z1,o.left.color=eu,this.rotate_right(o),o=n.parent.right),o.color=n.parent.color,n.parent.color=eu,o.right.color=eu,this.rotate_left(n.parent),n=this.root)):(o=n.parent.left,o.color===Z1\u0026\u0026(o.color=eu,n.parent.color=Z1,this.rotate_right(n.parent),o=n.parent.left),o.left.color===eu\u0026\u0026o.right.color===eu?(o.color=Z1,n=n.parent):(o.left.color===eu\u0026\u0026(o.color=Z1,o.right.color=eu,this.rotate_left(o),o=n.parent.left),o.color=n.parent.color,n.parent.color=eu,o.left.color=eu,this.rotate_right(n.parent),n=this.root));n.color=eu}tree_search(e,n){if(!(e==null||e===this.nil_node))return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i\u0026\u0026i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:((!o||i.less_than(o))\u0026\u0026(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left!==this.nil_node\u0026\u0026!e.not_intersect_left_subtree(n)\u0026\u0026this.tree_search_interval(e.left,n,o),e.intersect(n)\u0026\u0026o.push(e),e.right!==this.nil_node\u0026\u0026!e.not_intersect_right_subtree(n)\u0026\u0026this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left!==this.nil_node\u0026\u0026!e.not_intersect_left_subtree(n)\u0026\u0026(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),!o\u0026\u0026e.right!==this.nil_node\u0026\u0026!e.not_intersect_right_subtree(n)\u0026\u0026(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null\u0026\u0026n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null\u0026\u0026n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null\u0026\u0026i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node\u0026\u0026(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node\u0026\u0026(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}tree_walk(e,n){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===Z1\u0026\u0026(n.left.color===eu\u0026\u0026n.right.color===eu||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===eu\u0026\u0026n++,e.left!==this.nil_node?o=this.testBlackHeightProperty(e.left):o=1,e.right!==this.nil_node?i=this.testBlackHeightProperty(e.right):i=1,o!==i)throw new Error(\"Red-black height property violated\");return n+=o,n}},Mzn=class extends Set{constructor(e){super(e),this.index=new UBe,this.forEach(n=\u003ethis.index.insert(n))}add(e){let n=this.size;const{key:o,value:i}=e,r=o||e.box,s=i||e;return super.add(s),this.size\u003en\u0026\u0026this.index.insert(r,s),this}delete(e){const{key:n,value:o}=e,i=n||e.box,r=o||e;let s=super.delete(r);return s\u0026\u0026this.index.remove(i,r),s}clear(){super.clear(),this.index=new UBe}search(e){return this.index.search(e)}hit(e){let n=new Ge.Box(e.x-1,e.y-1,e.x+1,e.y+1);return this.index.search(n).filter(i=\u003ee.on(i))}svg(){return[...this].reduce((n,o)=\u003en+o.svg(),\"\")}};Ge.PlanarSet=Mzn;let kQ=class{get name(){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...e){return this.transform(new QF().translate(...e))}rotate(e,n=new Ge.Point){return this.transform(new QF().rotate(e,n.x,n.y))}scale(e,n){return this.transform(new QF().scale(e,n))}transform(...e){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(e={}){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}},Gc=class $En extends kQ{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===2){let n=e[0];if(typeof n[0]==\"number\"\u0026\u0026typeof n[1]==\"number\"){this.x=n[0],this.y=n[1];return}}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"point\"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===2\u0026\u0026typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\"){this.x=e[0],this.y=e[1];return}throw cd.ILLEGAL_PARAMETERS}}get box(){return new Ge.Box(this.x,this.y,this.x,this.y)}clone(){return new Ge.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ge.Utils.EQ(this.x,e.x)\u0026\u0026Ge.Utils.EQ(this.y,e.y)}lessThan(e){return!!(Ge.Utils.LT(this.y,e.y)||Ge.Utils.EQ(this.y,e.y)\u0026\u0026Ge.Utils.LT(this.x,e.x))}transform(e){return new Ge.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ge.Vector(this,e.pt);if(Ge.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ge.Vector(e.pt,this);return Ge.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof $En){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ge.Segment(this,e)]}if(e instanceof Ge.Line)return Ge.Distance.point2line(this,e);if(e instanceof Ge.Circle)return Ge.Distance.point2circle(this,e);if(e instanceof Ge.Segment)return Ge.Distance.point2segment(this,e);if(e instanceof Ge.Arc)return Ge.Distance.point2arc(this,e);if(e instanceof Ge.Box)return Ge.Distance.point2polygon(this,new Ge.Polygon(e));if(e instanceof Ge.Polygon)return Ge.Distance.point2polygon(this,e);if(e instanceof Ge.PlanarSet)return Ge.Distance.shape2planarSet(this,e);if(e instanceof Ge.Multiline)return Ge.Distance.shape2multiline(this,e)}on(e){if(e instanceof Ge.Point)return this.equalTo(e);if(e.contains\u0026\u0026e.contains instanceof Function)return e.contains(this);throw Ge.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return\"point\"}svg(e={}){const n=e.r??3;return`\n\u003ccircle cx=\"${this.x}\" cy=\"${this.y}\" r=\"${n}\"\n ${dD({fill:\"red\",...e})} /\u003e`}};Ge.Point=Gc;const by=(...t)=\u003enew Ge.Point(...t);Ge.point=by;let Dzn=class extends kQ{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===2){let n=e[0];if(typeof n[0]==\"number\"\u0026\u0026typeof n[1]==\"number\"){this.x=n[0],this.y=n[1];return}}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"vector\"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"segment\"){let{start:n,end:o}=e[0];this.x=o.x-n.x,this.y=o.y-n.y;return}if(e.length===2){let n=e[0],o=e[1];if(typeof n==\"number\"\u0026\u0026typeof o==\"number\"){this.x=n,this.y=o;return}if(n instanceof Ge.Point\u0026\u0026o instanceof Ge.Point){this.x=o.x-n.x,this.y=o.y-n.y;return}}throw cd.ILLEGAL_PARAMETERS}}clone(){return new Ge.Vector(this.x,this.y)}get slope(){let e=Math.atan2(this.y,this.x);return e\u003c0\u0026\u0026(e=2*Math.PI+e),e}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ge.Utils.EQ_0(this.length)}equalTo(e){return Ge.Utils.EQ(this.x,e.x)\u0026\u0026Ge.Utils.EQ(this.y,e.y)}multiply(e){return new Ge.Vector(e*this.x,e*this.y)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}normalize(){if(this.isZeroLength())throw cd.ZERO_DIVISION;return new Ge.Vector(this.x/this.length,this.y/this.length)}rotate(e,n=new Ge.Point){if(n.x===0\u0026\u0026n.y===0)return this.transform(new QF().rotate(e));throw cd.OPERATION_IS_NOT_SUPPORTED}transform(e){return new Ge.Vector(e.transform([this.x,this.y]))}rotate90CCW(){return new Ge.Vector(-this.y,this.x)}rotate90CW(){return new Ge.Vector(this.y,-this.x)}invert(){return new Ge.Vector(-this.x,-this.y)}add(e){return new Ge.Vector(this.x+e.x,this.y+e.y)}subtract(e){return new Ge.Vector(this.x-e.x,this.y-e.y)}angleTo(e){let n=this.normalize(),o=e.normalize(),i=Math.atan2(n.cross(o),n.dot(o));return i\u003c0\u0026\u0026(i+=2*Math.PI),i}projectionOn(e){let n=e.normalize(),o=this.dot(n);return n.multiply(o)}get name(){return\"vector\"}};Ge.Vector=Dzn;const vF=(...t)=\u003enew Ge.Vector(...t);Ge.vector=vF;let _D=class git extends kQ{constructor(...e){if(super(),this.ps=new Ge.Point,this.pe=new Ge.Point,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===4){let n=e[0];this.ps=new Ge.Point(n[0],n[1]),this.pe=new Ge.Point(n[2],n[3]);return}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"segment\"){let{ps:n,pe:o}=e[0];this.ps=new Ge.Point(n.x,n.y),this.pe=new Ge.Point(o.x,o.y);return}if(e.length===1\u0026\u0026e[0]instanceof Ge.Point){this.ps=e[0].clone();return}if(e.length===2\u0026\u0026e[0]instanceof Ge.Point\u0026\u0026e[1]instanceof Ge.Point){this.ps=e[0].clone(),this.pe=e[1].clone();return}if(e.length===4){this.ps=new Ge.Point(e[0],e[1]),this.pe=new Ge.Point(e[2],e[3]);return}throw cd.ILLEGAL_PARAMETERS}}clone(){return new Ge.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ge.Vector(this.start,this.end).slope}get box(){return new Ge.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)\u0026\u0026this.pe.equalTo(e.pe)}contains(e){return Ge.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return jV(this,e);if(e instanceof Ge.Ray)return DBe(e,this);if(e instanceof Ge.Segment)return kre(this,e);if(e instanceof Ge.Circle)return Fre(this,e);if(e instanceof Ge.Box)return zVn(this,e);if(e instanceof Ge.Arc)return CF(this,e);if(e instanceof Ge.Polygon)return PBe(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ge.Line){let[n,o]=Ge.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ge.PlanarSet){let[n,o]=Ge.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ge.Multiline)return Ge.Distance.shape2multiline(this,e)}tangentInStart(){return new Ge.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ge.Vector(this.end,this.start).normalize()}reverse(){return new git(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ge.Segment(this.start,e),new Ge.Segment(e,this.end)]}middle(){return new Ge.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e\u003ethis.length||e\u003c0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ge.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ge.Distance.point2segment(e,this);return n}definiteIntegral(e=0){let n=this.end.x-this.start.x,o=this.start.y-e,i=this.end.y-e;return n*(o+i)/2}transform(e=new Ge.Matrix){return new git(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ge.Line(this.start,this.end).sortPoints(e)}get name(){return\"segment\"}svg(e={}){return`\n\u003cline x1=\"${this.start.x}\" y1=\"${this.start.y}\" x2=\"${this.end.x}\" y2=\"${this.end.y}\" ${dD(e)} /\u003e`}};Ge.Segment=_D;const KBe=(...t)=\u003enew Ge.Segment(...t);Ge.segment=KBe;let{vector:tz}=Ge,Nzn=class qEn extends kQ{constructor(...e){if(super(),this.pt=new Ge.Point,this.norm=new Ge.Vector(0,1),e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"line\"){let{pt:n,norm:o}=e[0];this.pt=new Ge.Point(n),this.norm=new Ge.Vector(o);return}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ge.Point\u0026\u0026o instanceof Ge.Point){this.pt=n,this.norm=qEn.points2norm(n,o),this.norm.dot(tz(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert();return}if(n instanceof Ge.Point\u0026\u0026o instanceof Ge.Vector){if(Ge.Utils.EQ_0(o.x)\u0026\u0026Ge.Utils.EQ_0(o.y))throw cd.ILLEGAL_PARAMETERS;this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),this.norm.dot(tz(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert();return}if(n instanceof Ge.Vector\u0026\u0026o instanceof Ge.Point){if(Ge.Utils.EQ_0(n.x)\u0026\u0026Ge.Utils.EQ_0(n.y))throw cd.ILLEGAL_PARAMETERS;this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),this.norm.dot(tz(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert();return}}throw cd.ILLEGAL_PARAMETERS}}clone(){return new Ge.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ge.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ge.Vector(this.norm.y,-this.norm.x).slope}get standard(){let e=this.norm.x,n=this.norm.y,o=this.norm.dot(tz(this.pt.x,this.pt.y));return[e,n,o]}parallelTo(e){return Ge.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)\u0026\u0026this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ge.Vector(this.pt,e);return Ge.Utils.EQ_0(this.norm.dot(n))}coord(e){return tz(e.x,e.y).cross(this.norm)}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return fF(this,e);if(e instanceof Ge.Ray)return Nht(e,this);if(e instanceof Ge.Circle)return hD(this,e);if(e instanceof Ge.Box)return IF(this,e);if(e instanceof Ge.Segment)return jV(e,this);if(e instanceof Ge.Arc)return Tre(this,e);if(e instanceof Ge.Polygon)return $V(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ge.Point)return[new Ge.Ray(e,this.norm),new Ge.Ray(e,this.norm)];{let n=new Ge.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ge.Point){return new Ge.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ge.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=\u003ethis.coord(n)\u003cthis.coord(o)?-1:this.coord(n)\u003ethis.coord(o)?1:0)}get name(){return\"line\"}svg(e,n={}){let o=IF(this,e);if(o.length===0)return\"\";let i=o[0],r=o.length===2?o[1]:o.find(a=\u003e!a.equalTo(i));return r===void 0\u0026\u0026(r=i),new Ge.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw cd.ILLEGAL_PARAMETERS;return new Ge.Vector(e,n).normalize().rotate90CCW()}};Ge.Line=Nzn;const Rzn=(...t)=\u003enew Ge.Line(...t);Ge.line=Rzn;let fD=class extends kQ{constructor(...e){if(super(),this.pc=new Ge.Point,this.r=1,e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"circle\"){let{pc:n,r:o}=e[0];this.pc=new Ge.Point(n),this.r=o}else{let[n,o]=[...e];n\u0026\u0026n instanceof Ge.Point\u0026\u0026(this.pc=n.clone()),o!==void 0\u0026\u0026(this.r=o)}}clone(){return new Ge.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ge.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(e){if(e instanceof Ge.Point)return Ge.Utils.LE(e.distanceTo(this.center)[0],this.r);if(e instanceof Ge.Segment)return Ge.Utils.LE(e.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ge.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ge.Arc)return this.intersect(e).length===0\u0026\u0026Ge.Utils.LE(e.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ge.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ge.Circle)return this.intersect(e).length===0\u0026\u0026Ge.Utils.LE(e.r,this.r)\u0026\u0026Ge.Utils.LE(e.center.distanceTo(this.center)[0],this.r)}toArc(e=!0){return new Ge.Arc(this.center,this.r,Math.PI,-Math.PI,e)}scale(e,n){if(e!==n||!(this.pc.x===0\u0026\u0026this.pc.y===0))throw cd.OPERATION_IS_NOT_SUPPORTED;return new Ge.Circle(this.pc,this.r*e)}transform(e=new Ge.Matrix){return new Ge.Circle(this.pc.transform(e),this.r)}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return hD(e,this);if(e instanceof Ge.Ray)return Dht(e,this);if(e instanceof Ge.Segment)return Fre(e,this);if(e instanceof Ge.Circle)return Eht(e,this);if(e instanceof Ge.Box)return JVn(this,e);if(e instanceof Ge.Arc)return wBe(e,this);if(e instanceof Ge.Polygon)return vht(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.circle2circle(this,e);return[n,o]}if(e instanceof Ge.Line){let[n,o]=Ge.Distance.circle2line(this,e);return[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.arc2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ge.PlanarSet){let[n,o]=Ge.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ge.Multiline){let[n,o]=Ge.Distance.shape2multiline(this,e);return[n,o]}}get name(){return\"circle\"}svg(e={}){return`\n\u003ccircle cx=\"${this.pc.x}\" cy=\"${this.pc.y}\" r=\"${this.r}\"\n ${dD({fill:\"none\",...e})} /\u003e`}};Ge.Circle=fD;const Tzn=(...t)=\u003enew Ge.Circle(...t);Ge.circle=Tzn;let T8=class extends kQ{constructor(...e){if(super(),this.pc=new Ge.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,e.length!==0)if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"arc\"){let{pc:n,r:o,startAngle:i,endAngle:r,counterClockwise:s}=e[0];this.pc=new Ge.Point(n.x,n.y),this.r=o,this.startAngle=i,this.endAngle=r,this.counterClockwise=s}else{let[n,o,i,r,s]=[...e];n\u0026\u0026n instanceof Ge.Point\u0026\u0026(this.pc=n.clone()),o!==void 0\u0026\u0026(this.r=o),i!==void 0\u0026\u0026(this.startAngle=i),r!==void 0\u0026\u0026(this.endAngle=r),s!==void 0\u0026\u0026(this.counterClockwise=s)}}clone(){return new Ge.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let e=this.startAngle,n=this.endAngle;if(Ge.Utils.EQ(Math.abs(e-n),Ge.PIx2))return Ge.PIx2;Math.abs(e)\u003eGe.PIx2\u0026\u0026(e-=Math.trunc(e/Ge.PIx2)*Ge.PIx2),e\u003c0\u0026\u0026(e+=Ge.PIx2),Math.abs(n)\u003eGe.PIx2\u0026\u0026(n-=Math.trunc(n/Ge.PIx2)*Ge.PIx2),n\u003c0\u0026\u0026(n+=Ge.PIx2);let o=this.counterClockwise?n-e:e-n;return o\u003c0\u0026\u0026(o+=Ge.PIx2),o}get start(){return new Ge.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ge.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let n=this.breakToFunctional().reduce((o,i)=\u003eo.merge(i.start.box),new Ge.Box);return n=n.merge(this.end.box),n}contains(e){if(!Ge.Utils.EQ(this.pc.distanceTo(e)[0],this.r))return!1;if(e.equalTo(this.start))return!0;let n=new Ge.Vector(this.pc,e).slope,o=new Ge.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise);return Ge.Utils.LE(o.length,this.length)}split(e){if(this.start.equalTo(e))return[null,this.clone()];if(this.end.equalTo(e))return[this.clone(),null];let n=new Ge.Vector(this.pc,e).slope;return[new Ge.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise),new Ge.Arc(this.pc,this.r,n,this.endAngle,this.counterClockwise)]}middle(){let e=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ge.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise).end}pointAtLength(e){if(e\u003ethis.length||e\u003c0)return null;if(e===0)return this.start;if(e===this.length)return this.end;let n=e/this.length,o=this.counterClockwise?this.startAngle+this.sweep*n:this.startAngle-this.sweep*n;return new Ge.Arc(this.pc,this.r,this.startAngle,o,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return Tre(e,this);if(e instanceof Ge.Ray)return NBe(e,this);if(e instanceof Ge.Circle)return wBe(this,e);if(e instanceof Ge.Segment)return CF(e,this);if(e instanceof Ge.Box)return WVn(this,e);if(e instanceof Ge.Arc)return Bht(this,e);if(e instanceof Ge.Polygon)return MBe(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2arc(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.arc2circle(this,e);return[n,o]}if(e instanceof Ge.Line){let[n,o]=Ge.Distance.arc2line(this,e);return[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2arc(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.arc2arc(this,e);return[n,o]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ge.PlanarSet){let[n,o]=Ge.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ge.Multiline)return Ge.Distance.shape2multiline(this,e)}breakToFunctional(){let e=[],n=[0,Math.PI/2,Math.PI,3*Math.PI/2],o=this.startAngle,i=this.endAngle;Ge.Utils.EQ(Math.abs(o-i),Ge.PIx2)\u0026\u0026(i=o),Math.abs(o)\u003eGe.PIx2\u0026\u0026(o-=Math.trunc(o/Ge.PIx2)*Ge.PIx2),o\u003c0\u0026\u0026(o+=Ge.PIx2),Math.abs(i)\u003eGe.PIx2\u0026\u0026(i-=Math.trunc(i/Ge.PIx2)*Ge.PIx2),i\u003c0\u0026\u0026(i+=Ge.PIx2);let r=o,s,a,A;this.counterClockwise?(a=Math.ceil(o/(Math.PI/2))%4,A=1):(a=Math.floor(o/(Math.PI/2))%4,A=-1);for(let c=0,l=a;c\u003c4;c++,l=(l+A+4)%4){if(s=n[l],s===r)continue;let u=this.counterClockwise?s-o:o-s;if(u\u003c0\u0026\u0026(u+=Ge.PIx2),u\u003ethis.sweep)break;e.push(new Ge.Arc(this.pc,this.r,r,s,this.counterClockwise)),r=s}return e.length===0?(e.push(this),e):(s=i,r!==s\u0026\u0026e.push(new Ge.Arc(this.pc,this.r,r,s,this.counterClockwise)),e)}tangentInStart(){let e=new Ge.Vector(this.pc,this.start),n=this.counterClockwise?Math.PI/2:-Math.PI/2;return e.rotate(n).normalize()}tangentInEnd(){let e=new Ge.Vector(this.pc,this.end),n=this.counterClockwise?-Math.PI/2:Math.PI/2;return e.rotate(n).normalize()}reverse(){return new Ge.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(e=new Ge.Matrix){let n=this.start.transform(e),o=this.end.transform(e),i=this.pc.transform(e),r=this.counterClockwise;return e.a*e.d\u003c0\u0026\u0026(r=!r),Ge.Arc.arcSE(i,n,o,r)}static arcSE(e,n,o,i){let{vector:r}=Ge,s=r(e,n).slope,a=r(e,o).slope;Ge.Utils.EQ(s,a)\u0026\u0026(a+=2*Math.PI,i=!0);let A=r(e,n).length;return new Ge.Arc(e,A,s,a,i)}definiteIntegral(e=0){return this.breakToFunctional().reduce((i,r)=\u003ei+r.circularSegmentDefiniteIntegral(e),0)}circularSegmentDefiniteIntegral(e){let o=new Ge.Segment(this.start,this.end).definiteIntegral(e),i=Ge.Utils.EQ(this.sweep,Ge.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?o-i:o+i}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(e){let{vector:n}=Ge;return e.slice().sort((o,i)=\u003e{let r=n(this.pc,o).slope,s=n(this.pc,i).slope;return r\u003cs?-1:r\u003es?1:0})}get name(){return\"arc\"}svg(e={}){let n=this.sweep\u003c=Math.PI?\"0\":\"1\",o=this.counterClockwise?\"1\":\"0\";return Ge.Utils.EQ(this.sweep,2*Math.PI)?new Ge.Circle(this.pc,this.r).svg(e):`\n\u003cpath d=\"M${this.start.x},${this.start.y}\n A${this.r},${this.r} 0 ${n},${o} ${this.end.x},${this.end.y}\"\n ${dD({fill:\"none\",...e})} /\u003e`}};Ge.Arc=T8;const kzn=(...t)=\u003enew Ge.Arc(...t);Ge.arc=kzn;let VBe=class Kte extends kQ{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new Kte(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ge.Point(this.xmin,this.ymin)}get high(){return new Ge.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ge.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax\u003ce.xmin||this.xmin\u003ee.xmax||this.ymax\u003ce.ymin||this.ymin\u003ee.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new Kte(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!(this.low.lessThan(e.low)||this.low.equalTo(e.low)\u0026\u0026this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)\u0026\u0026this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e\u003c=0?this.clone():new Kte(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ge.Point(this.xmin,this.ymin),new Ge.Point(this.xmax,this.ymin),new Ge.Point(this.xmax,this.ymax),new Ge.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ge.Segment(e[0],e[1]),new Ge.Segment(e[1],e[2]),new Ge.Segment(e[2],e[3]),new Ge.Segment(e[3],e[0])]}rotate(e,n=new Ge.Point){throw cd.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ge.Matrix){return this.toPoints().map(o=\u003eo.transform(e)).reduce((o,i)=\u003eo.merge(i.box),new Kte)}contains(e){if(e instanceof Ge.Point)return e.x\u003e=this.xmin\u0026\u0026e.x\u003c=this.xmax\u0026\u0026e.y\u003e=this.ymin\u0026\u0026e.y\u003c=this.ymax;if(e instanceof Ge.Segment)return e.vertices.every(n=\u003ethis.contains(n));if(e instanceof Ge.Box)return e.toSegments().every(n=\u003ethis.contains(n));if(e instanceof Ge.Circle)return this.contains(e.box);if(e instanceof Ge.Arc)return e.vertices.every(n=\u003ethis.contains(n))\u0026\u0026this.toSegments().every(n=\u003eCF(n,e).length===0);if(e instanceof Ge.Line||e instanceof Ge.Ray)return!1;if(e instanceof Ge.Multiline)return e.toShapes().every(n=\u003ethis.contains(n));if(e instanceof Ge.Polygon)return this.contains(e.box)}distanceTo(e){const n=this.toSegments().map(i=\u003ei.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=\u003e{i[0]\u003co[0]\u0026\u0026(o=i)}),o}get name(){return\"box\"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`\n\u003crect x=\"${this.xmin}\" y=\"${this.ymin}\" width=\"${n}\" height=\"${o}\"\n ${dD({fill:\"none\",...e})} /\u003e`}};Ge.Box=VBe;const Fzn=(...t)=\u003enew Ge.Box(...t);Ge.box=Fzn;let Lzn=class{constructor(e){this.shape=e,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ge.Segment}get isArc(){return this.shape instanceof Ge.Arc}get isLine(){return this.shape instanceof Ge.Line}get isRay(){return this.shape instanceof Ge.Ray}middle(){return this.shape.middle()}pointAtLength(e){return this.shape.pointAtLength(e)}contains(e){return this.shape.contains(e)}setInclusion(e){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ge.Line||this.shape instanceof Ge.Ray)return this.bv=Ge.OUTSIDE,this.bv;if(this.bvStart===void 0\u0026\u0026(this.bvStart=ez(e,this.start)),this.bvEnd===void 0\u0026\u0026(this.bvEnd=ez(e,this.end)),this.bvStart===Ge.OUTSIDE||this.bvEnd==Ge.OUTSIDE)this.bv=Ge.OUTSIDE;else if(this.bvStart===Ge.INSIDE||this.bvEnd==Ge.INSIDE)this.bv=Ge.INSIDE;else{let n=ez(e,this.middle());this.bv=n}return this.bv}setOverlap(e){let n,o=this.shape,i=e.shape;o instanceof Ge.Segment\u0026\u0026i instanceof Ge.Segment?o.start.equalTo(i.start)\u0026\u0026o.end.equalTo(i.end)?n=Ge.OVERLAP_SAME:o.start.equalTo(i.end)\u0026\u0026o.end.equalTo(i.start)\u0026\u0026(n=Ge.OVERLAP_OPPOSITE):(o instanceof Ge.Arc\u0026\u0026i instanceof Ge.Arc||o instanceof Ge.Segment\u0026\u0026i instanceof Ge.Arc||o instanceof Ge.Arc\u0026\u0026i instanceof Ge.Segment)\u0026\u0026(o.start.equalTo(i.start)\u0026\u0026o.end.equalTo(i.end)\u0026\u0026o.middle().equalTo(i.middle())?n=Ge.OVERLAP_SAME:o.start.equalTo(i.end)\u0026\u0026o.end.equalTo(i.start)\u0026\u0026o.middle().equalTo(i.middle())\u0026\u0026(n=Ge.OVERLAP_OPPOSITE)),this.overlap===void 0\u0026\u0026(this.overlap=n),e.overlap===void 0\u0026\u0026(e.overlap=n)}svg(){if(this.shape instanceof Ge.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ge.Arc){let e=this.shape,n,o=e.counterClockwise?\"1\":\"0\";if(Ge.Utils.EQ(e.sweep,2*Math.PI)){let i=e.counterClockwise?1:-1,r=new Ge.Arc(e.pc,e.r,e.startAngle,e.startAngle+i*Math.PI,e.counterClockwise),s=new Ge.Arc(e.pc,e.r,e.startAngle+i*Math.PI,e.endAngle,e.counterClockwise);return n=\"0\",` A${r.r},${r.r} 0 ${n},${o} ${r.end.x},${r.end.y}\n A${s.r},${s.r} 0 ${n},${o} ${s.end.x},${s.end.y}`}else return n=e.sweep\u003c=Math.PI?\"0\":\"1\",` A${e.r},${e.r} 0 ${n},${o} ${e.end.x},${e.end.y}`}}toJSON(){return this.shape.toJSON()}};Ge.Edge=Lzn;let Hzn=class extends vBe{constructor(e,n){super(e,n),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let e;return{next:()=\u003e{let n=e||this.first,o=this.first?e?e===this.first:!1:!0;return e=n?n.next:void 0,{value:n,done:o}}}}append(e){return super.append(e),this.setCircularLinks(),this}insert(e,n){return super.insert(e,n),this.setCircularLinks(),this}remove(e){return super.remove(e),this}},Ozn=class Vte extends Hzn{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=\u003ei instanceof Ge.Point)){let i=Vte.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=\u003ei instanceof Array\u0026\u0026i.length===2)){let i=o.map(s=\u003enew Ge.Point(s[0],s[1])),r=Vte.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=\u003ei instanceof Ge.Segment||i instanceof Ge.Arc))this.shapes2face(e.edges,o);else if(o.every(i=\u003ei.name===\"segment\"||i.name===\"arc\")){let i=[];for(let r of o){let s;r.name===\"segment\"?s=new Ge.Segment(r):s=new Ge.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof Vte){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ge.Circle)this.shapes2face(e.edges,[n[0].toArc(hht)]);else if(n[0]instanceof Ge.Box){let o=n[0];this.shapes2face(e.edges,[new Ge.Segment(new Ge.Point(o.xmin,o.ymin),new Ge.Point(o.xmax,o.ymin)),new Ge.Segment(new Ge.Point(o.xmax,o.ymin),new Ge.Point(o.xmax,o.ymax)),new Ge.Segment(new Ge.Point(o.xmax,o.ymax),new Ge.Point(o.xmin,o.ymax)),new Ge.Segment(new Ge.Point(o.xmin,o.ymax),new Ge.Point(o.xmin,o.ymin))])}}n.length===2\u0026\u0026n[0]instanceof Ge.Edge\u0026\u0026n[1]instanceof Ge.Edge\u0026\u0026(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=\u003ee.shape.start.clone())}get shapes(){return this.edges.map(e=\u003ee.shape.clone())}get box(){if(this._box===void 0){let e=new Ge.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e\u003ethis.perimeter||e\u003c0)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o\u003ce.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ge.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ge.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0\u0026\u0026(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ge.Utils.EQ_0(e)?this._orientation=mF.NOT_ORIENTABLE:Ge.Utils.LT(e,0)?this._orientation=mF.CCW:this._orientation=mF.CW}return this._orientation}isSimple(e){return Vte.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ge.Segment\u0026\u0026a.shape instanceof Ge.Segment\u0026\u0026(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if(!(c.equalTo(r.start)\u0026\u0026c.equalTo(a.end)\u0026\u0026a===r.prev)\u0026\u0026!(c.equalTo(r.end)\u0026\u0026c.equalTo(a.start)\u0026\u0026a===r.next)\u0026\u0026(i.push(c),o))break;if(i.length\u003e0\u0026\u0026o)break}if(i.length\u003e0\u0026\u0026o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)\u0026\u0026(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ge.Polygon(this.shapes)}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=\" z\",e}};Ge.Face=Ozn;let Gzn=class XEn extends kQ{constructor(...e){if(super(),this.pt=new Ge.Point,this.norm=new Ge.Vector(0,1),e.length!==0\u0026\u0026(e.length\u003e=1\u0026\u0026e[0]instanceof Ge.Point\u0026\u0026(this.pt=e[0].clone()),e.length!==1)){if(e.length===2\u0026\u0026e[1]instanceof Ge.Vector){this.norm=e[1].clone();return}throw cd.ILLEGAL_PARAMETERS}}clone(){return new XEn(this.pt,this.norm)}get slope(){return new Ge.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ge.Box(e\u003eMath.PI/2\u0026\u0026e\u003c3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e\u003e=0\u0026\u0026e\u003c=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e\u003e=Math.PI/2\u0026\u0026e\u003c=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e\u003e=Math.PI\u0026\u0026e\u003c=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ge.Vector(this.pt,e);return Ge.Utils.EQ_0(this.norm.dot(n))\u0026\u0026Ge.Utils.GE(n.cross(this.norm),0)}coord(e){return vF(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ge.Segment(this.pt,e),new Ge.Ray(e,this.norm)]:[]}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Segment)return DBe(this,e);if(e instanceof Ge.Arc)return NBe(this,e);if(e instanceof Ge.Line)return Nht(this,e);if(e instanceof Ge.Ray)return tzn(this,e);if(e instanceof Ge.Circle)return Dht(this,e);if(e instanceof Ge.Box)return ezn(this,e);if(e instanceof Ge.Polygon)return Rht(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}rotate(e,n=new Ge.Point){return new Ge.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ge.Ray(this.pt.transform(e),this.norm.clone())}get name(){return\"ray\"}svg(e,n={}){let o=new Ge.Line(this.pt,this.norm),i=IF(o,e);return i=i.filter(s=\u003ethis.contains(s)),i.length===0||i.length===2?\"\":new Ge.Segment(this.pt,i[0]).svg(n)}};Ge.Ray=Gzn;const Yzn=(...t)=\u003enew Ge.Ray(...t);Ge.ray=Yzn;let Ip=class GM{constructor(){this.faces=new Ge.PlanarSet,this.edges=new Ge.PlanarSet;let e=[...arguments];if(e.length===1\u0026\u0026(e[0]instanceof Array\u0026\u0026e[0].length\u003e0||e[0]instanceof Ge.Circle||e[0]instanceof Ge.Box)){let n=e[0];if(e[0]instanceof Array\u0026\u0026e[0].every(o=\u003eo instanceof Array))if(n.every(o=\u003eo instanceof Array\u0026\u0026o.length===2\u0026\u0026typeof o[0]==\"number\"\u0026\u0026typeof o[1]==\"number\"))this.faces.add(new Ge.Face(this,n));else for(let o of n)if(o instanceof Array\u0026\u0026o[0]instanceof Array\u0026\u0026o[0].every(i=\u003ei instanceof Array\u0026\u0026i.length===2\u0026\u0026typeof i[0]==\"number\"\u0026\u0026typeof i[1]==\"number\"))for(let i of o)this.faces.add(new Ge.Face(this,i));else this.faces.add(new Ge.Face(this,o));else this.faces.add(new Ge.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=\u003ee.merge(n.box),new Ge.Box)}get vertices(){return[...this.faces].flatMap(e=\u003ee.vertices)}clone(){let e=new GM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new GM;return e.forEach(o=\u003e[...o.faces].forEach(i=\u003en.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=\u003en+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ge.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next===n){this.deleteFace(e);return}for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ge.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e\u0026\u0026(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const o=this.splitToIslands().flatMap(i=\u003ei._cutSingleIsland(e)).filter(i=\u003ei.isValid()\u0026\u0026i.isEmpty()===!1);return this.createFromArray(o)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=wht(a,A);for(let l of c)xF(a,l,i.int_points1),xF(A,l,i.int_points2)}if(i.int_points1.length===0)return n;i.int_points1_sorted=RQ(i.int_points1),i.int_points2_sorted=RQ(i.int_points2),BF(o,i.int_points1_sorted),BF(n,i.int_points2_sorted),RBe(i),i.int_points1_sorted=RQ(i.int_points1),i.int_points2_sorted=RQ(i.int_points2),TBe(i.int_points1),kBe(i.int_points1,n);for(let a of i.int_points1_sorted)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.bv===a.edge_after.bv\u0026\u0026(i.int_points2[a.id]=-1,a.id=-1);if(i.int_points1=i.int_points1.filter(a=\u003ea.id\u003e=0),i.int_points2=i.int_points2.filter(a=\u003ea.id\u003e=0),i.int_points1.forEach((a,A)=\u003e{a.id=A}),i.int_points2.forEach((a,A)=\u003e{a.id=A}),i.int_points1.length===0)return n;i.int_points1_sorted=RQ(i.int_points1),i.int_points2_sorted=RQ(i.int_points2);let r,s;for(let a=1;a\u003ci.int_points1_sorted.length;a++)if(s=i.int_points1_sorted[a],r=i.int_points1_sorted[a-1],s.edge_before\u0026\u0026s.edge_before.bv===Nre){let A=r.edge_after,c=s.edge_before,l=o.getChain(A,c);kht(i.int_points2[r.id],i.int_points2[s.id],l),l.forEach(u=\u003en.edges.add(u)),l=l.reverse().map(u=\u003enew Ge.Edge(u.shape.reverse()));for(let u=0;u\u003cl.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];kht(i.int_points2[s.id],i.int_points2[r.id],l),l.forEach(u=\u003en.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new pD([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=\u003er.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=\u003e[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=\u003es.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size\u003c=1)return this.clone();const e=this.splitToIslands(),n=new GM;return e.forEach(o=\u003e{o.faces.forEach(i=\u003en.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?mF.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=\u003e{this.isOuter(n)\u0026\u0026e++}),e\u003e1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ge.Point){let n=ez(this,e);return n===Nre||n===V9}else return $ht(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle||e instanceof Ge.Line||e instanceof Ge.Segment||e instanceof Ge.Arc){let[n,o]=Ge.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Box)return this.distanceTo(new Ge.Polygon(e));if(e instanceof Ge.Polygon){let n=[Number.POSITIVE_INFINITY,new Ge.Segment],o,i;for(let r of this.edges){let s=n[0];[o,i]=Ge.Distance.shape2planarSet(r.shape,e.edges,s),Ge.Utils.LT(o,s)\u0026\u0026(n=[o,i])}return n}}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return $V(e,this);if(e instanceof Ge.Ray)return Rht(e,this);if(e instanceof Ge.Circle)return vht(e,this);if(e instanceof Ge.Segment)return PBe(e,this);if(e instanceof Ge.Arc)return MBe(e,this);if(e instanceof Ge.Polygon)return XVn(e,this);if(e instanceof Ge.Multiline)return qVn(e,this)}translate(e){let n=new GM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.translate(e)));return n}rotate(e=0,n=new Ge.Point){let o=new GM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.rotate(e,n)));return o}scale(e,n){let o=new GM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.scale(e,n)));return o}transform(e=new Ge.Matrix){let n=new GM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.transform(e)));return n}toJSON(){return[...this.faces].map(e=\u003ee.toJSON())}toArray(){return[...this.faces].map(e=\u003ee.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=\u003ee+n.svg(),\"\")}svg(e={}){let n=`\n\u003cpath ${dD({fillRule:\"evenodd\",fill:\"lightcyan\",...e})} d=\"`;for(let o of this.faces)n+=`\n${o.svg()}`;return n+=`\" \u003e\n\u003c/path\u003e`,n}};Ge.Polygon=Ip;const Uzn=(...t)=\u003enew Ge.Polygon(...t);Ge.polygon=Uzn;const{Circle:zBe,Line:Xht,Point:Zht,Vector:Ore,Utils:JBe}=Ge;let Kzn=class Uye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new Ore(e.pc,n),i=e.r*e.r,r=o.dot(o);return JBe.EQ_0(r)?new Zht(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(JBe.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new Ore(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new Xht(s,r)}else{let i=new Ore(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new zBe(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(JBe.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new Ore(e.pc,i.end);return s=s.multiply(r/o),new zBe(e.pc.translate(s),r)}}inverse(e){if(e instanceof Zht)return Uye.inversePoint(this.circle,e);if(e instanceof zBe)return Uye.inverseCircle(this.circle,e);if(e instanceof Xht)return Uye.inverseLine(this.circle,e)}};Ge.Inversion=Kzn;const Vzn=t=\u003enew Ge.Inversion(t);Ge.inversion=Vzn;let zzn=class Rr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ge.Vector(e,o).length,new Ge.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ge.Utils.EQ_0(o))return[n.r,new Ge.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ge.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ge.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return Rr.point2point(e,n.start);let o=new Ge.Vector(n.start,n.end),i=new Ge.Vector(n.start,e),r=new Ge.Vector(n.end,e),s=o.dot(i),a=-o.dot(r),A,c;if(Ge.Utils.GE(s,0)\u0026\u0026Ge.Utils.GE(a,0)){let l=n.tangentInStart();return A=Math.abs(l.cross(i)),c=n.start.translate(l.multiply(l.dot(i))),[A,new Ge.Segment(e,c)]}else return s\u003c0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o=new Ge.Circle(n.pc,n.r),i=[],r,s;return[r,s]=Rr.point2circle(e,o),s.end.on(n)\u0026\u0026i.push(Rr.point2circle(e,o)),i.push(Rr.point2point(e,n.start)),i.push(Rr.point2point(e,n.end)),Rr.sort(i),i[0]}static point2edge(e,n){return n.shape instanceof Ge.Segment?Rr.point2segment(e,n.shape):Rr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let i=[];return i.push(Rr.point2line(e.start,n)),i.push(Rr.point2line(e.end,n)),Rr.sort(i),i[0]}static segment2segment(e,n){let o=kre(e,n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let i=[],r,s;return[r,s]=Rr.point2segment(n.start,e),i.push([r,s.reverse()]),[r,s]=Rr.point2segment(n.end,e),i.push([r,s.reverse()]),i.push(Rr.point2segment(e.start,n)),i.push(Rr.point2segment(e.end,n)),Rr.sort(i),i[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Line(e.ps,e.pe),[r,s]=Rr.point2line(n.center,i);if(Ge.Utils.GE(r,n.r)\u0026\u0026s.end.on(e))return Rr.point2circle(s.end,n);{let[a,A]=Rr.point2circle(e.start,n),[c,l]=Rr.point2circle(e.end,n);return Ge.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Line(e.ps,e.pe),r=new Ge.Circle(n.pc,n.r),[s,a]=Rr.point2line(r.center,i);if(Ge.Utils.GE(s,r.r)\u0026\u0026a.end.on(e)){let[u,g]=Rr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A=[];A.push(Rr.point2arc(e.start,n)),A.push(Rr.point2arc(e.end,n));let c,l;return[c,l]=Rr.point2segment(n.start,e),A.push([c,l.reverse()]),[c,l]=Rr.point2segment(n.end,e),A.push([c,l.reverse()]),Rr.sort(A),A[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return Rr.point2point(i.start,r.start)}else{let i=new Ge.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(Rr.point2point(r[0],s[0])),a.push(Rr.point2point(r[0],s[1])),a.push(Rr.point2point(r[1],s[0])),a.push(Rr.point2point(r[1],s[1])),Rr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let[i,r]=Rr.point2line(e.center,n),[s,a]=Rr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Circle(e.center,e.r),[r,s]=Rr.point2line(i.center,n);if(Ge.Utils.GE(r,i.r)){let[a,A]=Rr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}else{let a=[];return a.push(Rr.point2line(e.start,n)),a.push(Rr.point2line(e.end,n)),Rr.sort(a),a[0]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Circle(e.center,e.r),[r,s]=Rr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(Rr.point2circle(e.start,n)),a.push(Rr.point2circle(e.end,n)),Rr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Circle(e.center,e.r),r=new Ge.Circle(n.center,n.r),[s,a]=Rr.circle2circle(i,r);if(a.start.on(e)\u0026\u0026a.end.on(n))return[s,a];{let A=[],c,l;return[c,l]=Rr.point2arc(e.start,n),l.end.on(n)\u0026\u0026A.push([c,l]),[c,l]=Rr.point2arc(e.end,n),l.end.on(n)\u0026\u0026A.push([c,l]),[c,l]=Rr.point2arc(n.start,e),l.end.on(e)\u0026\u0026A.push([c,l.reverse()]),[c,l]=Rr.point2arc(n.end,e),l.end.on(e)\u0026\u0026A.push([c,l.reverse()]),[c,l]=Rr.point2point(e.start,n.start),A.push([c,l]),[c,l]=Rr.point2point(e.start,n.end),A.push([c,l]),[c,l]=Rr.point2point(e.end,n.start),A.push([c,l]),[c,l]=Rr.point2point(e.end,n.end),A.push([c,l]),Rr.sort(A),A[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n.edges){let[r,s]=Rr.point2edge(e,i);Ge.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ge.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ge.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin,c=a*a+A*A;return[r,c]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let l of n){[r,s]=Rr.box2box_minmax(e.box,l.item.key);for(let u of l.item.values)u instanceof Ge.Edge?i.insert([r,s],u.shape):i.insert([r,s],u);Ge.Utils.LT(s,o)\u0026\u0026(o=s)}if(n.length===0)return o;let a=n.map(l=\u003el.left.isNil()?void 0:l.left).filter(l=\u003el!==void 0),A=n.map(l=\u003el.right.isNil()?void 0:l.right).filter(l=\u003el!==void 0),c=[...a,...A].filter(l=\u003e{let[u,g]=Rr.box2box_minmax(e.box,l.max);return Ge.Utils.LE(u,o)});return o=Rr.minmax_tree_process_level(e,c,o,i),o}static minmax_tree(e,n,o){let i=new UBe,r=[n.index.root],s=o\u003cNumber.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=Rr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null\u0026\u0026!n.isNil()){if([i,r]=Rr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ge.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=Rr.distanceToArray(e,n.item.values);return Ge.Utils.LT(s,i[0])\u0026\u0026(i=[s,a]),[i,r]=Rr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ge.Segment],r=!1;if(n instanceof Ge.PlanarSet){let s=Rr.minmax_tree(e,n,o);[i,r]=Rr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=\u003eGe.Utils.LT(n[0],o[0])?-1:Ge.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ge.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n){let[r,s]=Rr.distance(e,i.shape);Ge.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of e)for(let r of n){let[s,a]=Rr.distance(i.shape,r.shape);Ge.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}};Ge.Distance=zzn;const{Multiline:Jzn,Point:ept,Segment:Wzn,Polygon:tpt}=Ge;function WBe(t){return new ept(t.split(\" \").map(Number))}function npt(t){return t.split(\", \").map(WBe)}function jBe(t){const e=npt(t);let n=[];for(let o=0;o\u003ce.length-1;o++)n.push(new Wzn(e[o],e[o+1]));return new Jzn(n)}function jzn(t){return t.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\").map(jBe)}function opt(t){const e=t.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\"),n=new tpt;let o;return e.forEach((i,r)=\u003e{let s=i.split(\", \").map(A=\u003enew ept(A.split(\" \").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o\u0026\u0026a.reverse()}),n}function $zn(t){const n=t.split(/\\)\\), \\(\\(/).map(r=\u003e\"((\"+r+\"))\").map(opt),o=new tpt;return n.reduce((r,s)=\u003e[...r,...s?.faces],[]).forEach(r=\u003eo.addFace([...r?.shapes])),o}function qzn(t){if(t.startsWith(\"POLYGON\")){const e=t.replace(/^POLYGON /,\"\");return opt(e)}else{const e=t.replace(/^MULTIPOLYGON \\(\\(\\((.*)\\)\\)\\)$/,\"$1\");return $zn(e)}}function Xzn(t){return t.split(`\n`).map(n=\u003en.match(/\\(([^)]+)\\)/)[1]).map(WBe)}function Zzn(t){return t.split(`\n`).map(n=\u003en.match(/\\(([^)]+)\\)/)[1]).map(jBe).reduce((n,o)=\u003e[...n,...o],[])}function ipt(t){if(t.startsWith(\"POINT\")){const e=t.replace(/^POINT \\(/,\"\").replace(/\\)$/,\"\");return WBe(e)}else if(t.startsWith(\"MULTIPOINT\")){const e=t.replace(/^MULTIPOINT \\(/,\"\").replace(/\\)$/,\"\");return npt(e)}else if(t.startsWith(\"LINESTRING\")){const e=t.replace(/^LINESTRING \\(/,\"\").replace(/\\)$/,\"\");return jBe(e)}else if(t.startsWith(\"MULTILINESTRING\")){const e=t.replace(/^MULTILINESTRING /,\"\");return jzn(e)}else{if(t.startsWith(\"POLYGON\")||t.startsWith(\"MULTIPOLYGON\"))return qzn(t);if(t.startsWith(\"GEOMETRYCOLLECTION\")){const e=/(?\u003ctype\u003ePOINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \\((?:[^\\(\\)]|\\([^\\)]*\\))*\\)/g,n=t.match(e);return n[0].startsWith(\"GEOMETRYCOLLECTION\")\u0026\u0026(n[0]=n[0].replace(\"GEOMETRYCOLLECTION (\",\"\")),n.map(ipt).map(i=\u003ei instanceof Array?i:[i]).reduce((i,r)=\u003e[...i,...r],[])}else{if(rpt(t))return Xzn(t);if(spt(t))return Zzn(t)}}return[]}function rpt(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"POINT\"))}function spt(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"LINESTRING\"))}function eJn(t){return t.startsWith(\"POINT\")||rpt(t)||t.startsWith(\"LINESTRING\")||spt(t)||t.startsWith(\"MULTILINESTRING\")||t.startsWith(\"POLYGON\")||t.startsWith(\"MULTIPOINT\")||t.startsWith(\"MULTIPOLYGON\")||t.startsWith(\"GEOMETRYCOLLECTION\")}Ge.isWktString=eJn,Ge.parseWKT=ipt,Ge.BooleanOperations=YBe,Ge.Relations=Qzn;const tJn={version:\"0.0.874\"},nJn=(t,e,n)=\u003e{const o=[{x:t.x,y:t.y}],i=(t.x+e.x)/2,r=(t.y+e.y)/2,s={x:e.x,y:e.y};switch(e.facingDirection){case\"x+\":s.x+=n;break;case\"x-\":s.x-=n;break;case\"y+\":s.y+=n;break;case\"y-\":s.y-=n;break}const a=t.facingDirection??\"none\",A=e.facingDirection??\"none\",c=g=\u003e{const h=o[o.length-1];(h.x!==g.x||h.y!==g.y)\u0026\u0026o.push(g)},l=Math.abs(t.y-e.y)\u003c=Math.max(1e-6,n*.1),u=Math.abs(t.x-e.x)\u003c=Math.max(1e-6,n*.1);if(a===\"none\"\u0026\u0026A===\"none\")c({x:i,y:t.y}),c({x:i,y:e.y});else if(a===\"x+\"\u0026\u0026A===\"y+\")t.x\u003ee.x\u0026\u0026t.y\u003ce.y?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:e.y+n}),c({x:e.x,y:e.y+n})):!u\u0026\u0026!l\u0026\u0026t.x\u003ce.x\u0026\u0026t.y\u003ee.y?c({x:e.x,y:t.y}):u?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:e.y+n}),c({x:e.x,y:e.y+n})):t.x\u003ce.x?(c({x:i,y:t.y}),c({x:i,y:s.y}),c({x:e.x,y:s.y})):t.y\u003c=e.y+n?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y+n}),c({x:e.x,y:t.y+n}),c({x:e.x,y:e.y})):(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:(t.y+e.y)/2}),c({x:e.x,y:(t.y+e.y)/2}));else if(a===\"x+\"\u0026\u0026A===\"x+\"\u0026\u0026!l){const g=Math.max(t.x+n,s.x);c({x:g,y:t.y}),c({x:g,y:e.y})}else if(a===\"x+\"\u0026\u0026A===\"x+\"\u0026\u0026l)c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y+n}),c({x:e.x+n,y:t.y+n}),c({x:e.x+n,y:e.y});else if(a===\"x+\"\u0026\u0026A===\"y-\")if(u\u0026\u0026t.y\u003c=e.y)c({x:t.x+n,y:t.y}),c({x:t.x+n,y:r}),c({x:e.x,y:r});else if(u\u0026\u0026t.y\u003ee.y)c({x:t.x+n,y:t.y}),c({x:t.x+n,y:e.y-n}),c({x:e.x,y:e.y-n});else if(t.x\u003ce.x\u0026\u0026t.y\u003ce.y)c({x:e.x,y:t.y});else if(t.x\u003ee.x\u0026\u0026t.y\u003ce.y){const g=t.x+n;c({x:g,y:t.y}),c({x:g,y:r}),c({x:e.x,y:r})}else if(t.x\u003ee.x\u0026\u0026t.y\u003ee.y){const g=t.x+n;c({x:g,y:t.y}),c({x:g,y:s.y}),c({x:e.x,y:s.y})}else t.y===e.y?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y-n}),c({x:e.x,y:t.y-n})):(c({x:i,y:t.y}),c({x:i,y:s.y}),c({x:e.x,y:s.y}));else if(a===\"x+\"\u0026\u0026A===\"x-\"\u0026\u0026t.x+n\u003e=e.x-n\u0026\u0026!l){const g=t.x+n;c({x:g,y:t.y}),c({x:g,y:r}),c({x:s.x,y:r}),c({x:s.x,y:s.y})}else a===\"x+\"\u0026\u0026A===\"x-\"\u0026\u0026l\u0026\u0026e.x\u003et.x||(a===\"x+\"\u0026\u0026A===\"x-\"\u0026\u0026l?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y+n}),c({x:e.x-n,y:t.y+n}),c({x:e.x-n,y:t.y})):(a===\"x+\"\u0026\u0026c({x:t.x+n,y:t.y}),c({x:i,y:o[o.length-1].y}),c({x:i,y:s.y}),c({x:s.x,y:s.y})));return c({x:e.x,y:e.y}),o},wF=(t,e,n={})=\u003e{let o=t,i=e,r=!1;(o.x\u003ei.x||o.x===i.x\u0026\u0026o.y\u003ei.y)\u0026\u0026(r=!0,[o,i]=[i,o]);const s=o.facingDirection===\"x-\",a=o.facingDirection===\"y-\",A=f=\u003e{const I=s?o.x-(f.x-o.x):f.x,C=a?o.y-(f.y-o.y):f.y;let y=f.facingDirection;return s\u0026\u0026(y===\"x+\"?y=\"x-\":y===\"x-\"\u0026\u0026(y=\"x+\")),a\u0026\u0026(y===\"y+\"?y=\"y-\":y===\"y-\"\u0026\u0026(y=\"y+\")),{x:I,y:C,facingDirection:y}},c=(f,I)=\u003e{const C=f.x-I.x,y=f.y-I.y,x=I.x+y,E=I.y-C;let B=f.facingDirection;switch(B){case\"x+\":B=\"y-\";break;case\"y-\":B=\"x-\";break;case\"x-\":B=\"y+\";break;case\"y+\":B=\"x+\";break}return{x,y:E,facingDirection:B}},l=(f,I)=\u003e{const C=f.x-I.x,y=f.y-I.y;return{x:I.x-y,y:I.y+C}},u=s||a?A(o):o,g=s||a?A(i):i;let h=u,d=g,p=!1;u.facingDirection===\"y+\"\u0026\u0026(p=!0,h={...u,facingDirection:\"x+\"},d=c(g,u));const m=n?.overshoot??.1*Math.max(Math.abs(h.x-d.x),Math.abs(h.y-d.y));let _=nJn(h,d,m);return p\u0026\u0026(_=_.map(f=\u003el(f,h))),(s||a)\u0026\u0026(_=_.map(({x:f,y:I})=\u003e({x:s?o.x-(f-o.x):f,y:a?o.y-(I-o.y):I}))),r?_.reverse():_};var Gre={exports:{}},$Be={exports:{}},apt;function oJn(){return apt||(apt=1,(function(t){var e={env:{},version:\"\"};t.exports=function(n){function o(G,V,Ae,Be){return new E2(G,V,Ae,Be)}function i(){}function r(G){var V=\"https://react.dev/errors/\"+G;if(1\u003carguments.length){V+=\"?args[]=\"+encodeURIComponent(arguments[1]);for(var Ae=2;Ae\u003carguments.length;Ae++)V+=\"\u0026args[]=\"+encodeURIComponent(arguments[Ae])}return\"Minified React error #\"+G+\"; visit \"+V+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}function s(G){var V=G,Ae=G;if(G.alternate)for(;V.return;)V=V.return;else{G=V;do V=G,(V.flags\u00264098)!==0\u0026\u0026(Ae=V.return),G=V.return;while(G)}return V.tag===3?Ae:null}function a(G){if(s(G)!==G)throw Error(r(188))}function A(G){var V=G.alternate;if(!V){if(V=s(G),V===null)throw Error(r(188));return V!==G?null:G}for(var Ae=G,Be=V;;){var Oe=Ae.return;if(Oe===null)break;var Je=Oe.alternate;if(Je===null){if(Be=Oe.return,Be!==null){Ae=Be;continue}break}if(Oe.child===Je.child){for(Je=Oe.child;Je;){if(Je===Ae)return a(Oe),G;if(Je===Be)return a(Oe),V;Je=Je.sibling}throw Error(r(188))}if(Ae.return!==Be.return)Ae=Oe,Be=Je;else{for(var Tt=!1,ln=Oe.child;ln;){if(ln===Ae){Tt=!0,Ae=Oe,Be=Je;break}if(ln===Be){Tt=!0,Be=Oe,Ae=Je;break}ln=ln.sibling}if(!Tt){for(ln=Je.child;ln;){if(ln===Ae){Tt=!0,Ae=Je,Be=Oe;break}if(ln===Be){Tt=!0,Be=Je,Ae=Oe;break}ln=ln.sibling}if(!Tt)throw Error(r(189))}}if(Ae.alternate!==Be)throw Error(r(190))}if(Ae.tag!==3)throw Error(r(188));return Ae.stateNode.current===Ae?G:V}function c(G){var V=G.tag;if(V===5||V===26||V===27||V===6)return G;for(G=G.child;G!==null;){if(V=c(G),V!==null)return V;G=G.sibling}return null}function l(G){var V=G.tag;if(V===5||V===26||V===27||V===6)return G;for(G=G.child;G!==null;){if(G.tag!==4\u0026\u0026(V=l(G),V!==null))return V;G=G.sibling}return null}function u(G){return G===null||typeof G!=\"object\"?null:(G=Hp\u0026\u0026G[Hp]||G[\"@@iterator\"],typeof G==\"function\"?G:null)}function g(G){if(G==null)return null;if(typeof G==\"function\")return G.$typeof===VC?null:G.displayName||G.name||null;if(typeof G==\"string\")return G;switch(G){case FI:return\"Fragment\";case S2:return\"Profiler\";case UC:return\"StrictMode\";case u3:return\"Suspense\";case Q2:return\"SuspenseList\";case b1:return\"Activity\"}if(typeof G==\"object\")switch(G.$typeof){case B1:return\"Portal\";case y_:return(G.displayName||\"Context\")+\".Provider\";case l3:return(G._context.displayName||\"Context\")+\".Consumer\";case ap:var V=G.render;return G=G.displayName,G||(G=V.displayName||V.name||\"\",G=G!==\"\"?\"ForwardRef(\"+G+\")\":\"ForwardRef\"),G;case Gd:return V=G.displayName||null,V!==null?V:g(G.type)||\"Memo\";case Yd:V=G._payload,G=G._init;try{return g(G(V))}catch{}}return null}function h(G){return{current:G}}function d(G){0\u003eMm||(G.current=A0[Mm],A0[Mm]=null,Mm--)}function p(G,V){Mm++,A0[Mm]=G.current,G.current=V}function m(G){return G\u003e\u003e\u003e=0,G===0?32:31-(O2(G)/G2|0)|0}function _(G){var V=G\u002642;if(V!==0)return V;switch(G\u0026-G){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return G\u00264194048;case 4194304:case 8388608:case 16777216:case 33554432:return G\u002662914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return G}}function f(G,V,Ae){var Be=G.pendingLanes;if(Be===0)return 0;var Oe=0,Je=G.suspendedLanes,Tt=G.pingedLanes;G=G.warmLanes;var ln=Be\u0026134217727;return ln!==0?(Be=ln\u0026~Je,Be!==0?Oe=_(Be):(Tt\u0026=ln,Tt!==0?Oe=_(Tt):Ae||(Ae=ln\u0026~G,Ae!==0\u0026\u0026(Oe=_(Ae))))):(ln=Be\u0026~Je,ln!==0?Oe=_(ln):Tt!==0?Oe=_(Tt):Ae||(Ae=Be\u0026~G,Ae!==0\u0026\u0026(Oe=_(Ae)))),Oe===0?0:V!==0\u0026\u0026V!==Oe\u0026\u0026(V\u0026Je)===0\u0026\u0026(Je=Oe\u0026-Oe,Ae=V\u0026-V,Je\u003e=Ae||Je===32\u0026\u0026(Ae\u00264194048)!==0)?V:Oe}function I(G,V){return(G.pendingLanes\u0026~(G.suspendedLanes\u0026~G.pingedLanes)\u0026V)===0}function C(G,V){switch(G){case 1:case 2:case 4:case 8:case 64:return V+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return V+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function y(){var G=RA;return RA\u003c\u003c=1,(RA\u00264194048)===0\u0026\u0026(RA=256),G}function x(){var G=jg;return jg\u003c\u003c=1,(jg\u002662914560)===0\u0026\u0026(jg=4194304),G}function E(G){for(var V=[],Ae=0;31\u003eAe;Ae++)V.push(G);return V}function B(G,V){G.pendingLanes|=V,V!==268435456\u0026\u0026(G.suspendedLanes=0,G.pingedLanes=0,G.warmLanes=0)}function S(G,V,Ae,Be,Oe,Je){var Tt=G.pendingLanes;G.pendingLanes=Ae,G.suspendedLanes=0,G.pingedLanes=0,G.warmLanes=0,G.expiredLanes\u0026=Ae,G.entangledLanes\u0026=Ae,G.errorRecoveryDisabledLanes\u0026=Ae,G.shellSuspendCounter=0;var ln=G.entanglements,wn=G.expirationTimes,$o=G.hiddenUpdates;for(Ae=Tt\u0026~Ae;0\u003cAe;){var Ai=31-_g(Ae),Qi=1\u003c\u003cAi;ln[Ai]=0,wn[Ai]=-1;var Ni=$o[Ai];if(Ni!==null)for($o[Ai]=null,Ai=0;Ai\u003cNi.length;Ai++){var Xs=Ni[Ai];Xs!==null\u0026\u0026(Xs.lane\u0026=-536870913)}Ae\u0026=~Qi}Be!==0\u0026\u0026Q(G,Be,0),Je!==0\u0026\u0026Oe===0\u0026\u0026G.tag!==0\u0026\u0026(G.suspendedLanes|=Je\u0026~(Tt\u0026~V))}function Q(G,V,Ae){G.pendingLanes|=V,G.suspendedLanes\u0026=~V;var Be=31-_g(V);G.entangledLanes|=V,G.entanglements[Be]=G.entanglements[Be]|1073741824|Ae\u00264194090}function w(G,V){var Ae=G.entangledLanes|=V;for(G=G.entanglements;Ae;){var Be=31-_g(Ae),Oe=1\u003c\u003cBe;Oe\u0026V|G[Be]\u0026V\u0026\u0026(G[Be]|=V),Ae\u0026=~Oe}}function M(G){switch(G){case 2:G=1;break;case 8:G=4;break;case 32:G=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:G=128;break;case 268435456:G=134217728;break;default:G=0}return G}function k(G){return G\u0026=-G,2\u003cG?8\u003cG?(G\u0026134217727)!==0?32:268435456:8:2}function R(G){if(typeof fg==\"function\"\u0026\u0026Y2(G),Ig\u0026\u0026typeof Ig.setStrictMode==\"function\")try{Ig.setStrictMode(_u,G)}catch{}}function F(G){if(s5===void 0)try{throw Error()}catch(Ae){var V=Ae.stack.trim().match(/\\n( *(at )?)/);s5=V\u0026\u0026V[1]||\"\",f3=-1\u003cAe.stack.indexOf(`\n at`)?\" (\u003canonymous\u003e)\":-1\u003cAe.stack.indexOf(\"@\")?\"@unknown:0:0\":\"\"}return`\n`+s5+G+f3}function O(G,V){if(!G||ZC)return\"\";ZC=!0;var Ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var Be={DetermineComponentFrameRoot:function(){try{if(V){var Qi=function(){throw Error()};if(Object.defineProperty(Qi.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"\u0026\u0026Reflect.construct){try{Reflect.construct(Qi,[])}catch(Xs){var Ni=Xs}Reflect.construct(G,[],Qi)}else{try{Qi.call()}catch(Xs){Ni=Xs}G.call(Qi.prototype)}}else{try{throw Error()}catch(Xs){Ni=Xs}(Qi=G())\u0026\u0026typeof Qi.catch==\"function\"\u0026\u0026Qi.catch(function(){})}}catch(Xs){if(Xs\u0026\u0026Ni\u0026\u0026typeof Xs.stack==\"string\")return[Xs.stack,Ni.stack]}return[null,null]}};Be.DetermineComponentFrameRoot.displayName=\"DetermineComponentFrameRoot\";var Oe=Object.getOwnPropertyDescriptor(Be.DetermineComponentFrameRoot,\"name\");Oe\u0026\u0026Oe.configurable\u0026\u0026Object.defineProperty(Be.DetermineComponentFrameRoot,\"name\",{value:\"DetermineComponentFrameRoot\"});var Je=Be.DetermineComponentFrameRoot(),Tt=Je[0],ln=Je[1];if(Tt\u0026\u0026ln){var wn=Tt.split(`\n`),$o=ln.split(`\n`);for(Oe=Be=0;Be\u003cwn.length\u0026\u0026!wn[Be].includes(\"DetermineComponentFrameRoot\");)Be++;for(;Oe\u003c$o.length\u0026\u0026!$o[Oe].includes(\"DetermineComponentFrameRoot\");)Oe++;if(Be===wn.length||Oe===$o.length)for(Be=wn.length-1,Oe=$o.length-1;1\u003c=Be\u0026\u00260\u003c=Oe\u0026\u0026wn[Be]!==$o[Oe];)Oe--;for(;1\u003c=Be\u0026\u00260\u003c=Oe;Be--,Oe--)if(wn[Be]!==$o[Oe]){if(Be!==1||Oe!==1)do if(Be--,Oe--,0\u003eOe||wn[Be]!==$o[Oe]){var Ai=`\n`+wn[Be].replace(\" at new \",\" at \");return G.displayName\u0026\u0026Ai.includes(\"\u003canonymous\u003e\")\u0026\u0026(Ai=Ai.replace(\"\u003canonymous\u003e\",G.displayName)),Ai}while(1\u003c=Be\u0026\u00260\u003c=Oe);break}}}finally{ZC=!1,Error.prepareStackTrace=Ae}return(Ae=G?G.displayName||G.name:\"\")?F(Ae):\"\"}function U(G){switch(G.tag){case 26:case 27:case 5:return F(G.type);case 16:return F(\"Lazy\");case 13:return F(\"Suspense\");case 19:return F(\"SuspenseList\");case 0:case 15:return O(G.type,!1);case 11:return O(G.type.render,!1);case 1:return O(G.type,!0);case 31:return F(\"Activity\");default:return\"\"}}function Y(G){try{var V=\"\";do V+=U(G),G=G.return;while(G);return V}catch(Ae){return`\nError generating stack: `+Ae.message+`\n`+Ae.stack}}function W(G,V){if(typeof G==\"object\"\u0026\u0026G!==null){var Ae=I3.get(G);return Ae!==void 0?Ae:(V={value:G,source:V,stack:Y(V)},I3.set(G,V),V)}return{value:G,source:V,stack:Y(V)}}function te(G,V){Pf[UI++]=KI,Pf[UI++]=C3,C3=G,KI=V}function j(G,V,Ae){E0[jc++]=Ou,E0[jc++]=B0,E0[jc++]=cl,cl=G;var Be=Ou;G=B0;var Oe=32-_g(Be)-1;Be\u0026=~(1\u003c\u003cOe),Ae+=1;var Je=32-_g(V)+Oe;if(30\u003cJe){var Tt=Oe-Oe%5;Je=(Be\u0026(1\u003c\u003cTt)-1).toString(32),Be\u003e\u003e=Tt,Oe-=Tt,Ou=1\u003c\u003c32-_g(V)+Oe|Ae\u003c\u003cOe|Be,B0=Je+G}else Ou=1\u003c\u003cJe|Ae\u003c\u003cOe|Be,B0=G}function J(G){G.return!==null\u0026\u0026(te(G,1),j(G,1,0))}function oe(G){for(;G===C3;)C3=Pf[--UI],Pf[UI]=null,KI=Pf[--UI],Pf[UI]=null;for(;G===cl;)cl=E0[--jc],E0[jc]=null,B0=E0[--jc],E0[jc]=null,Ou=E0[--jc],E0[jc]=null}function ie(G,V){p(za,V),p(Vd,G),p(bl,null),G=x0(V),d(bl),p(bl,G)}function ne(){d(bl),d(Vd),d(za)}function le(G){G.memoizedState!==null\u0026\u0026p($g,G);var V=bl.current,Ae=zg(V,G.type);V!==Ae\u0026\u0026(p(Vd,G),p(bl,Ae))}function ge(G){Vd.current===G\u0026\u0026(d(bl),d(Vd)),$g.current===G\u0026\u0026(d($g),Ud?b_._currentValue=sl:b_._currentValue2=sl)}function _e(G){var V=Error(r(418,\"\"));throw ve(W(V,G)),lp}function ue(G,V){if(!Eh)throw Error(r(175));Hu(G.stateNode,G.type,G.memoizedProps,V,G)||_e(G)}function fe(G){for(Xa=G.return;Xa;)switch(Xa.tag){case 5:case 13:Si=!1;return;case 27:case 3:Si=!0;return;default:Xa=Xa.return}}function pe(G){if(!Eh||G!==Xa)return!1;if(!Vs)return fe(G),Vs=!0,!1;var V=G.tag;if(ai?V!==3\u0026\u0026V!==27\u0026\u0026(V!==5||mu(G.type)\u0026\u0026!Lu(G.type,G.memoizedProps))\u0026\u0026Za\u0026\u0026_e(G):V!==3\u0026\u0026(V!==5||mu(G.type)\u0026\u0026!Lu(G.type,G.memoizedProps))\u0026\u0026Za\u0026\u0026_e(G),fe(G),V===13){if(!Eh)throw Error(r(316));if(G=G.memoizedState,G=G!==null?G.dehydrated:null,!G)throw Error(r(317));Za=zr(G)}else Za=ai\u0026\u0026V===27?n5(G.type,Za):Xa?g9(G.stateNode):null;return!0}function ye(){Eh\u0026\u0026(Za=Xa=null,Vs=!1)}function Me(){var G=fu;return G!==null\u0026\u0026(Vl===null?Vl=G:Vl.push.apply(Vl,G),fu=null),G}function ve(G){fu===null?fu=[G]:fu.push(G)}function he(G,V){return G===V\u0026\u0026(G!==0||1/G===1/V)||G!==G\u0026\u0026V!==V}function Qe(G,V,Ae){Ud?(p($c,V._currentValue),V._currentValue=Ae):(p($c,V._currentValue2),V._currentValue2=Ae)}function Pe(G){var V=$c.current;Ud?G._currentValue=V:G._currentValue2=V,d($c)}function we(G,V,Ae){for(;G!==null;){var Be=G.alternate;if((G.childLanes\u0026V)!==V?(G.childLanes|=V,Be!==null\u0026\u0026(Be.childLanes|=V)):Be!==null\u0026\u0026(Be.childLanes\u0026V)!==V\u0026\u0026(Be.childLanes|=V),G===Ae)break;G=G.return}}function Te(G,V,Ae,Be){var Oe=G.child;for(Oe!==null\u0026\u0026(Oe.return=G);Oe!==null;){var Je=Oe.dependencies;if(Je!==null){var Tt=Oe.child;Je=Je.firstContext;e:for(;Je!==null;){var ln=Je;Je=Oe;for(var wn=0;wn\u003cV.length;wn++)if(ln.context===V[wn]){Je.lanes|=Ae,ln=Je.alternate,ln!==null\u0026\u0026(ln.lanes|=Ae),we(Je.return,Ae,G),Be||(Tt=null);break e}Je=ln.next}}else if(Oe.tag===18){if(Tt=Oe.return,Tt===null)throw Error(r(341));Tt.lanes|=Ae,Je=Tt.alternate,Je!==null\u0026\u0026(Je.lanes|=Ae),we(Tt,Ae,G),Tt=null}else Tt=Oe.child;if(Tt!==null)Tt.return=Oe;else for(Tt=Oe;Tt!==null;){if(Tt===G){Tt=null;break}if(Oe=Tt.sibling,Oe!==null){Oe.return=Tt.return,Tt=Oe;break}Tt=Tt.return}Oe=Tt}}function Re(G,V,Ae,Be){G=null;for(var Oe=V,Je=!1;Oe!==null;){if(!Je){if((Oe.flags\u0026524288)!==0)Je=!0;else if((Oe.flags\u0026262144)!==0)break}if(Oe.tag===10){var Tt=Oe.alternate;if(Tt===null)throw Error(r(387));if(Tt=Tt.memoizedProps,Tt!==null){var ln=Oe.type;c0(Oe.pendingProps.value,Tt.value)||(G!==null?G.push(ln):G=[ln])}}else if(Oe===$g.current){if(Tt=Oe.alternate,Tt===null)throw Error(r(387));Tt.memoizedState.memoizedState!==Oe.memoizedState.memoizedState\u0026\u0026(G!==null?G.push(b_):G=[b_])}Oe=Oe.return}G!==null\u0026\u0026Te(V,G,Ae,Be),V.flags|=262144}function Ee(G){for(G=G.firstContext;G!==null;){var V=G.context;if(!c0(Ud?V._currentValue:V._currentValue2,G.memoizedValue))return!0;G=G.next}return!1}function ke(G){Qh=G,Kl=null,G=G.dependencies,G!==null\u0026\u0026(G.firstContext=null)}function Ce(G){return Ye(Qh,G)}function Le(G,V){return Qh===null\u0026\u0026ke(G),Ye(G,V)}function Ye(G,V){var Ae=Ud?V._currentValue:V._currentValue2;if(V={context:V,memoizedValue:Ae,next:null},Kl===null){if(G===null)throw Error(r(308));Kl=V,G.dependencies={lanes:0,firstContext:V},G.flags|=524288}else Kl=Kl.next=V;return Ae}function tt(){return{controller:new VI,data:new Map,refCount:0}}function At(G){G.refCount--,G.refCount===0\u0026\u0026p9(zI,function(){G.controller.abort()})}function at(G){G!==Mf\u0026\u0026G.next===null\u0026\u0026(Mf===null?b0=Mf=G:Mf=Mf.next=G),Cg=!0,a5||(a5=!0,it())}function nt(G,V){if(!Dm\u0026\u0026Cg){Dm=!0;do for(var Ae=!1,Be=b0;Be!==null;){if(G!==0){var Oe=Be.pendingLanes;if(Oe===0)var Je=0;else{var Tt=Be.suspendedLanes,ln=Be.pingedLanes;Je=(1\u003c\u003c31-_g(42|G)+1)-1,Je\u0026=Oe\u0026~(Tt\u0026~ln),Je=Je\u0026201326741?Je\u0026201326741|1:Je?Je|2:0}Je!==0\u0026\u0026(Ae=!0,kt(Be,Je))}else Je=Zr,Je=f(Be,Be===gA?Je:0,Be.cancelPendingCommit!==null||Be.timeoutHandle!==xh),(Je\u00263)===0||I(Be,Je)||(Ae=!0,kt(Be,Je));Be=Be.next}while(Ae);Dm=!1}}function gt(){bt()}function bt(){Cg=a5=!1;var G=0;JI!==0\u0026\u0026(g3()\u0026\u0026(G=JI),JI=0);for(var V=cs(),Ae=null,Be=b0;Be!==null;){var Oe=Be.next,Je=Ct(Be,V);Je===0?(Be.next=null,Ae===null?b0=Oe:Ae.next=Oe,Oe===null\u0026\u0026(Mf=Ae)):(Ae=Be,(G!==0||(Je\u00263)!==0)\u0026\u0026(Cg=!0)),Be=Oe}nt(G)}function Ct(G,V){for(var Ae=G.suspendedLanes,Be=G.pingedLanes,Oe=G.expirationTimes,Je=G.pendingLanes\u0026-62914561;0\u003cJe;){var Tt=31-_g(Je),ln=1\u003c\u003cTt,wn=Oe[Tt];wn===-1?((ln\u0026Ae)===0||(ln\u0026Be)!==0)\u0026\u0026(Oe[Tt]=C(ln,V)):wn\u003c=V\u0026\u0026(G.expiredLanes|=ln),Je\u0026=~ln}if(V=gA,Ae=Zr,Ae=f(G,G===V?Ae:0,G.cancelPendingCommit!==null||G.timeoutHandle!==xh),Be=G.callbackNode,Ae===0||G===V\u0026\u0026(os===2||os===9)||G.cancelPendingCommit!==null)return Be!==null\u0026\u0026Be!==null\u0026\u0026Kd(Be),G.callbackNode=null,G.callbackPriority=0;if((Ae\u00263)===0||I(G,Ae)){if(V=Ae\u0026-Ae,V===G.callbackPriority)return V;switch(Be!==null\u0026\u0026Kd(Be),k(Ae)){case 2:case 8:Ae=c8;break;case 32:Ae=wf;break;case 268435456:Ae=XC;break;default:Ae=wf}return Be=Dt.bind(null,G),Ae=qC(Ae,Be),G.callbackPriority=V,G.callbackNode=Ae,V}return Be!==null\u0026\u0026Be!==null\u0026\u0026Kd(Be),G.callbackPriority=2,G.callbackNode=null,2}function Dt(G,V){if(us!==0\u0026\u0026us!==5)return G.callbackNode=null,G.callbackPriority=0,null;var Ae=G.callbackNode;if(sp()\u0026\u0026G.callbackNode!==Ae)return null;var Be=Zr;return Be=f(G,G===gA?Be:0,G.cancelPendingCommit!==null||G.timeoutHandle!==xh),Be===0?null:(wI(G,Be,V),Ct(G,cs()),G.callbackNode!=null\u0026\u0026G.callbackNode===Ae?Dt.bind(null,G):null)}function kt(G,V){if(sp())return null;wI(G,V,!0)}function it(){JE?d3(function(){(ls\u00266)!==0?qC(Jn,gt):bt()}):qC(Jn,gt)}function Yt(){return JI===0\u0026\u0026(JI=y()),JI}function pn(G,V){if(ey===null){var Ae=ey=[];Nm=0,ll=Yt(),WI={status:\"pending\",value:void 0,then:function(Be){Ae.push(Be)}}}return Nm++,V.then(be,be),V}function be(){if(--Nm===0\u0026\u0026ey!==null){WI!==null\u0026\u0026(WI.status=\"fulfilled\");var G=ey;ey=null,ll=0,WI=null;for(var V=0;V\u003cG.length;V++)(0,G[V])()}}function et(G,V){var Ae=[],Be={status:\"pending\",value:null,reason:null,then:function(Oe){Ae.push(Oe)}};return G.then(function(){Be.status=\"fulfilled\",Be.value=V;for(var Oe=0;Oe\u003cAe.length;Oe++)(0,Ae[Oe])(V)},function(Oe){for(Be.status=\"rejected\",Be.reason=Oe,Oe=0;Oe\u003cAe.length;Oe++)(0,Ae[Oe])(void 0)}),Be}function It(){var G=Yi.current;return G!==null?G:gA.pooledCache}function Bt(G,V){V===null?p(Yi,Yi.current):p(Yi,V.pool)}function mt(){var G=It();return G===null?null:{parent:Ud?rc._currentValue:rc._currentValue2,pool:G}}function st(G,V){if(c0(G,V))return!0;if(typeof G!=\"object\"||G===null||typeof V!=\"object\"||V===null)return!1;var Ae=Object.keys(G),Be=Object.keys(V);if(Ae.length!==Be.length)return!1;for(Be=0;Be\u003cAe.length;Be++){var Oe=Ae[Be];if(!c5.call(V,Oe)||!c0(G[Oe],V[Oe]))return!1}return!0}function xt(G){return G=G.status,G===\"fulfilled\"||G===\"rejected\"}function Xe(){}function Ze(G,V,Ae){switch(Ae=G[Ae],Ae===void 0?G.push(V):Ae!==V\u0026\u0026(V.then(Xe,Xe),V=Ae),V.status){case\"fulfilled\":return V.value;case\"rejected\":throw G=V.reason,Ut(G),G;default:if(typeof V.status==\"string\")V.then(Xe,Xe);else{if(G=gA,G!==null\u0026\u0026100\u003cG.shellSuspendCounter)throw Error(r(482));G=V,G.status=\"pending\",G.then(function(Be){if(V.status===\"pending\"){var Oe=V;Oe.status=\"fulfilled\",Oe.value=Be}},function(Be){if(V.status===\"pending\"){var Oe=V;Oe.status=\"rejected\",Oe.reason=Be}})}switch(V.status){case\"fulfilled\":return V.value;case\"rejected\":throw G=V.reason,Ut(G),G}throw yg=V,Df}}function dt(){if(yg===null)throw Error(r(459));var G=yg;return yg=null,G}function Ut(G){if(G===Df||G===ul)throw Error(r(483))}function Wt(){for(var G=D1,V=l5=D1=0;V\u003cG;){var Ae=ss[V];ss[V++]=null;var Be=ss[V];ss[V++]=null;var Oe=ss[V];ss[V++]=null;var Je=ss[V];if(ss[V++]=null,Be!==null\u0026\u0026Oe!==null){var Tt=Be.pending;Tt===null?Oe.next=Oe:(Oe.next=Tt.next,Tt.next=Oe),Be.pending=Oe}Je!==0\u0026\u0026An(Ae,Oe,Je)}}function Xt(G,V,Ae,Be){ss[D1++]=G,ss[D1++]=V,ss[D1++]=Ae,ss[D1++]=Be,l5|=Be,G.lanes|=Be,G=G.alternate,G!==null\u0026\u0026(G.lanes|=Be)}function Jt(G,V,Ae,Be){return Xt(G,V,Ae,Be),kn(G)}function yn(G,V){return Xt(G,null,null,V),kn(G)}function An(G,V,Ae){G.lanes|=Ae;var Be=G.alternate;Be!==null\u0026\u0026(Be.lanes|=Ae);for(var Oe=!1,Je=G.return;Je!==null;)Je.childLanes|=Ae,Be=Je.alternate,Be!==null\u0026\u0026(Be.childLanes|=Ae),Je.tag===22\u0026\u0026(G=Je.stateNode,G===null||G._visibility\u00261||(Oe=!0)),G=Je,Je=Je.return;return G.tag===3?(Je=G.stateNode,Oe\u0026\u0026V!==null\u0026\u0026(Oe=31-_g(Ae),G=Je.hiddenUpdates,Be=G[Oe],Be===null?G[Oe]=[V]:Be.push(V),V.lane=Ae|536870912),Je):null}function kn(G){if(50\u003cup)throw up=0,Ku=null,Error(r(185));for(var V=G.return;V!==null;)G=V,V=G.return;return G.tag===3?G.stateNode:null}function $n(G){G.updateQueue={baseState:G.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ht(G,V){G=G.updateQueue,V.updateQueue===G\u0026\u0026(V.updateQueue={baseState:G.baseState,firstBaseUpdate:G.firstBaseUpdate,lastBaseUpdate:G.lastBaseUpdate,shared:G.shared,callbacks:null})}function Kt(G){return{lane:G,tag:0,payload:null,callback:null,next:null}}function rn(G,V,Ae){var Be=G.updateQueue;if(Be===null)return null;if(Be=Be.shared,(ls\u00262)!==0){var Oe=Be.pending;return Oe===null?V.next=V:(V.next=Oe.next,Oe.next=V),Be.pending=V,V=kn(G),An(G,null,Ae),V}return Xt(G,Be,V,Ae),kn(G)}function Lt(G,V,Ae){if(V=V.updateQueue,V!==null\u0026\u0026(V=V.shared,(Ae\u00264194048)!==0)){var Be=V.lanes;Be\u0026=G.pendingLanes,Ae|=Be,V.lanes=Ae,w(G,Ae)}}function Ho(G,V){var Ae=G.updateQueue,Be=G.alternate;if(Be!==null\u0026\u0026(Be=Be.updateQueue,Ae===Be)){var Oe=null,Je=null;if(Ae=Ae.firstBaseUpdate,Ae!==null){do{var Tt={lane:Ae.lane,tag:Ae.tag,payload:Ae.payload,callback:null,next:null};Je===null?Oe=Je=Tt:Je=Je.next=Tt,Ae=Ae.next}while(Ae!==null);Je===null?Oe=Je=V:Je=Je.next=V}else Oe=Je=V;Ae={baseState:Be.baseState,firstBaseUpdate:Oe,lastBaseUpdate:Je,shared:Be.shared,callbacks:Be.callbacks},G.updateQueue=Ae;return}G=Ae.lastBaseUpdate,G===null?Ae.firstBaseUpdate=V:G.next=V,Ae.lastBaseUpdate=V}function Ao(){if(zd){var G=WI;if(G!==null)throw G}}function qe(G,V,Ae,Be){zd=!1;var Oe=G.updateQueue;Yp=!1;var Je=Oe.firstBaseUpdate,Tt=Oe.lastBaseUpdate,ln=Oe.shared.pending;if(ln!==null){Oe.shared.pending=null;var wn=ln,$o=wn.next;wn.next=null,Tt===null?Je=$o:Tt.next=$o,Tt=wn;var Ai=G.alternate;Ai!==null\u0026\u0026(Ai=Ai.updateQueue,ln=Ai.lastBaseUpdate,ln!==Tt\u0026\u0026(ln===null?Ai.firstBaseUpdate=$o:ln.next=$o,Ai.lastBaseUpdate=wn))}if(Je!==null){var Qi=Oe.baseState;Tt=0,Ai=$o=wn=null,ln=Je;do{var Ni=ln.lane\u0026-536870913,Xs=Ni!==ln.lane;if(Xs?(Zr\u0026Ni)===Ni:(Be\u0026Ni)===Ni){Ni!==0\u0026\u0026Ni===ll\u0026\u0026(zd=!0),Ai!==null\u0026\u0026(Ai=Ai.next={lane:0,tag:ln.tag,payload:ln.payload,callback:null,next:null});e:{var jp=G,L1=ln;Ni=V;var Eg=Ae;switch(L1.tag){case 1:if(jp=L1.payload,typeof jp==\"function\"){Qi=jp.call(Eg,Qi,Ni);break e}Qi=jp;break e;case 3:jp.flags=jp.flags\u0026-65537|128;case 0:if(jp=L1.payload,Ni=typeof jp==\"function\"?jp.call(Eg,Qi,Ni):jp,Ni==null)break e;Qi=E1({},Qi,Ni);break e;case 2:Yp=!0}}Ni=ln.callback,Ni!==null\u0026\u0026(G.flags|=64,Xs\u0026\u0026(G.flags|=8192),Xs=Oe.callbacks,Xs===null?Oe.callbacks=[Ni]:Xs.push(Ni))}else Xs={lane:Ni,tag:ln.tag,payload:ln.payload,callback:ln.callback,next:null},Ai===null?($o=Ai=Xs,wn=Qi):Ai=Ai.next=Xs,Tt|=Ni;if(ln=ln.next,ln===null){if(ln=Oe.shared.pending,ln===null)break;Xs=ln,ln=Xs.next,Xs.next=null,Oe.lastBaseUpdate=Xs,Oe.shared.pending=null}}while(!0);Ai===null\u0026\u0026(wn=Qi),Oe.baseState=wn,Oe.firstBaseUpdate=$o,Oe.lastBaseUpdate=Ai,Je===null\u0026\u0026(Oe.shared.lanes=0),Sl|=Tt,G.lanes=Tt,G.memoizedState=Qi}}function vt(G,V){if(typeof G!=\"function\")throw Error(r(191,G));G.call(V)}function qt(G,V){var Ae=G.callbacks;if(Ae!==null)for(G.callbacks=null,G=0;G\u003cAe.length;G++)vt(Ae[G],V)}function Zt(G,V){G=dl,p(Nf,G),p(Gu,V),dl=G|V.baseLanes}function nn(){p(Nf,dl),p(Gu,Gu.current)}function zn(){dl=Nf.current,d(Gu),d(Nf)}function Nn(){throw Error(r(321))}function Co(G,V){if(V===null)return!1;for(var Ae=0;Ae\u003cV.length\u0026\u0026Ae\u003cG.length;Ae++)if(!c0(G[Ae],V[Ae]))return!1;return!0}function ei(G,V,Ae,Be,Oe,Je){return Fc=Je,_a=V,V.memoizedState=null,V.updateQueue=null,V.lanes=0,Xr.H=G===null||G.memoizedState===null?S0:u5,w_=!1,Je=Ae(Be,Oe),w_=!1,j0\u0026\u0026(Je=To(V,Ae,Be,Oe)),ro(G),Je}function ro(G){Xr.H=Kp;var V=fa!==null\u0026\u0026fa.next!==null;if(Fc=0,zs=fa=_a=null,Rm=!1,N1=0,Up=null,V)throw Error(r(300));G===null||Ps||(G=G.dependencies,G!==null\u0026\u0026Ee(G)\u0026\u0026(Ps=!0))}function To(G,V,Ae,Be){_a=G;var Oe=0;do{if(j0\u0026\u0026(Up=null),N1=0,j0=!1,25\u003c=Oe)throw Error(r(301));if(Oe+=1,zs=fa=null,G.updateQueue!=null){var Je=G.updateQueue;Je.lastEffect=null,Je.events=null,Je.stores=null,Je.memoCache!=null\u0026\u0026(Je.memoCache.index=0)}Xr.H=jI,Je=V(Ae,Be)}while(j0);return Je}function yo(){var G=Xr.H,V=G.useState()[0];return V=typeof V.then==\"function\"?mi(V):V,G=G.useState()[0],(fa!==null?fa.memoizedState:null)!==G\u0026\u0026(_a.flags|=1024),V}function Ro(){var G=$0!==0;return $0=0,G}function On(G,V,Ae){V.updateQueue=G.updateQueue,V.flags\u0026=-2053,G.lanes\u0026=~Ae}function uo(G){if(Rm){for(G=G.memoizedState;G!==null;){var V=G.queue;V!==null\u0026\u0026(V.pending=null),G=G.next}Rm=!1}Fc=0,zs=fa=_a=null,j0=!1,N1=$0=0,Up=null}function Oo(){var G={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zs===null?_a.memoizedState=zs=G:zs=zs.next=G,zs}function ko(){if(fa===null){var G=_a.alternate;G=G!==null?G.memoizedState:null}else G=fa.next;var V=zs===null?_a.memoizedState:zs.next;if(V!==null)zs=V,fa=G;else{if(G===null)throw _a.alternate===null?Error(r(467)):Error(r(310));fa=G,G={memoizedState:fa.memoizedState,baseState:fa.baseState,baseQueue:fa.baseQueue,queue:fa.queue,next:null},zs===null?_a.memoizedState=zs=G:zs=zs.next=G}return zs}function Ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mi(G){var V=N1;return N1+=1,Up===null\u0026\u0026(Up=[]),G=Ze(Up,G,V),V=_a,(zs===null?V.memoizedState:zs.next)===null\u0026\u0026(V=V.alternate,Xr.H=V===null||V.memoizedState===null?S0:u5),G}function Fo(G){if(G!==null\u0026\u0026typeof G==\"object\"){if(typeof G.then==\"function\")return mi(G);if(G.$typeof===y_)return Ce(G)}throw Error(r(438,String(G)))}function Nr(G){var V=null,Ae=_a.updateQueue;if(Ae!==null\u0026\u0026(V=Ae.memoCache),V==null){var Be=_a.alternate;Be!==null\u0026\u0026(Be=Be.updateQueue,Be!==null\u0026\u0026(Be=Be.memoCache,Be!=null\u0026\u0026(V={data:Be.data.map(function(Oe){return Oe.slice()}),index:0})))}if(V==null\u0026\u0026(V={data:[],index:0}),Ae===null\u0026\u0026(Ae=Ko(),_a.updateQueue=Ae),Ae.memoCache=V,Ae=V.data[V.index],Ae===void 0)for(Ae=V.data[V.index]=Array(G),Be=0;Be\u003cG;Be++)Ae[Be]=v4;return V.index++,Ae}function Rs(G,V){return typeof V==\"function\"?V(G):V}function ur(G){var V=ko();return zi(V,fa,G)}function zi(G,V,Ae){var Be=G.queue;if(Be===null)throw Error(r(311));Be.lastRenderedReducer=Ae;var Oe=G.baseQueue,Je=Be.pending;if(Je!==null){if(Oe!==null){var Tt=Oe.next;Oe.next=Je.next,Je.next=Tt}V.baseQueue=Oe=Je,Be.pending=null}if(Je=G.baseState,Oe===null)G.memoizedState=Je;else{V=Oe.next;var ln=Tt=null,wn=null,$o=V,Ai=!1;do{var Qi=$o.lane\u0026-536870913;if(Qi!==$o.lane?(Zr\u0026Qi)===Qi:(Fc\u0026Qi)===Qi){var Ni=$o.revertLane;if(Ni===0)wn!==null\u0026\u0026(wn=wn.next={lane:0,revertLane:0,action:$o.action,hasEagerState:$o.hasEagerState,eagerState:$o.eagerState,next:null}),Qi===ll\u0026\u0026(Ai=!0);else if((Fc\u0026Ni)===Ni){$o=$o.next,Ni===ll\u0026\u0026(Ai=!0);continue}else Qi={lane:0,revertLane:$o.revertLane,action:$o.action,hasEagerState:$o.hasEagerState,eagerState:$o.eagerState,next:null},wn===null?(ln=wn=Qi,Tt=Je):wn=wn.next=Qi,_a.lanes|=Ni,Sl|=Ni;Qi=$o.action,w_\u0026\u0026Ae(Je,Qi),Je=$o.hasEagerState?$o.eagerState:Ae(Je,Qi)}else Ni={lane:Qi,revertLane:$o.revertLane,action:$o.action,hasEagerState:$o.hasEagerState,eagerState:$o.eagerState,next:null},wn===null?(ln=wn=Ni,Tt=Je):wn=wn.next=Ni,_a.lanes|=Qi,Sl|=Qi;$o=$o.next}while($o!==null\u0026\u0026$o!==V);if(wn===null?Tt=Je:wn.next=ln,!c0(Je,G.memoizedState)\u0026\u0026(Ps=!0,Ai\u0026\u0026(Ae=WI,Ae!==null)))throw Ae;G.memoizedState=Je,G.baseState=Tt,G.baseQueue=wn,Be.lastRenderedState=Je}return Oe===null\u0026\u0026(Be.lanes=0),[G.memoizedState,Be.dispatch]}function bi(G){var V=ko(),Ae=V.queue;if(Ae===null)throw Error(r(311));Ae.lastRenderedReducer=G;var Be=Ae.dispatch,Oe=Ae.pending,Je=V.memoizedState;if(Oe!==null){Ae.pending=null;var Tt=Oe=Oe.next;do Je=G(Je,Tt.action),Tt=Tt.next;while(Tt!==Oe);c0(Je,V.memoizedState)||(Ps=!0),V.memoizedState=Je,V.baseQueue===null\u0026\u0026(V.baseState=Je),Ae.lastRenderedState=Je}return[Je,Be]}function Ar(G,V,Ae){var Be=_a,Oe=ko(),Je=Vs;if(Je){if(Ae===void 0)throw Error(r(407));Ae=Ae()}else Ae=V();var Tt=!c0((fa||Oe).memoizedState,Ae);Tt\u0026\u0026(Oe.memoizedState=Ae,Ps=!0),Oe=Oe.queue;var ln=Et.bind(null,Be,Oe,G);if(hs(2048,8,ln,[G]),Oe.getSnapshot!==V||Tt||zs!==null\u0026\u0026zs.memoizedState.tag\u00261){if(Be.flags|=2048,wi(9,Br(),ds.bind(null,Be,Oe,Ae,V),null),gA===null)throw Error(r(349));Je||(Fc\u0026124)!==0||ws(Be,V,Ae)}return Ae}function ws(G,V,Ae){G.flags|=16384,G={getSnapshot:V,value:Ae},V=_a.updateQueue,V===null?(V=Ko(),_a.updateQueue=V,V.stores=[G]):(Ae=V.stores,Ae===null?V.stores=[G]:Ae.push(G))}function ds(G,V,Ae,Be){V.value=Ae,V.getSnapshot=Be,Gt(V)\u0026\u0026Rt(G)}function Et(G,V,Ae){return Ae(function(){Gt(V)\u0026\u0026Rt(G)})}function Gt(G){var V=G.getSnapshot;G=G.value;try{var Ae=V();return!c0(G,Ae)}catch{return!0}}function Rt(G){var V=yn(G,2);V!==null\u0026\u0026ug(V,G,2)}function Ht(G){var V=Oo();if(typeof G==\"function\"){var Ae=G;if(G=Ae(),w_){R(!0);try{Ae()}finally{R(!1)}}}return V.memoizedState=V.baseState=G,V.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:G},V}function Qt(G,V,Ae,Be){return G.baseState=Ae,zi(G,fa,typeof Be==\"function\"?Be:Rs)}function Nt(G,V,Ae,Be,Oe){if(C0(G))throw Error(r(485));if(G=V.action,G!==null){var Je={payload:Oe,action:G,next:null,isTransition:!0,status:\"pending\",value:null,reason:null,listeners:[],then:function(Tt){Je.listeners.push(Tt)}};Xr.T!==null?Ae(!0):Je.isTransition=!1,Be(Je),Ae=V.pending,Ae===null?(Je.next=V.pending=Je,_n(V,Je)):(Je.next=Ae.next,V.pending=Ae.next=Je)}}function _n(G,V){var Ae=V.action,Be=V.payload,Oe=G.state;if(V.isTransition){var Je=Xr.T,Tt={};Xr.T=Tt;try{var ln=Ae(Oe,Be),wn=Xr.S;wn!==null\u0026\u0026wn(Tt,ln),qn(G,V,ln)}catch($o){Rn(G,V,$o)}finally{Xr.T=Je}}else try{Je=Ae(Oe,Be),qn(G,V,Je)}catch($o){Rn(G,V,$o)}}function qn(G,V,Ae){Ae!==null\u0026\u0026typeof Ae==\"object\"\u0026\u0026typeof Ae.then==\"function\"?Ae.then(function(Be){En(G,V,Be)},function(Be){return Rn(G,V,Be)}):En(G,V,Ae)}function En(G,V,Ae){V.status=\"fulfilled\",V.value=Ae,Hn(V),G.state=Ae,V=G.pending,V!==null\u0026\u0026(Ae=V.next,Ae===V?G.pending=null:(Ae=Ae.next,V.next=Ae,_n(G,Ae)))}function Rn(G,V,Ae){var Be=G.pending;if(G.pending=null,Be!==null){Be=Be.next;do V.status=\"rejected\",V.reason=Ae,Hn(V),V=V.next;while(V!==Be)}G.action=null}function Hn(G){G=G.listeners;for(var V=0;V\u003cG.length;V++)(0,G[V])()}function Lo(G,V){return V}function Io(G,V){if(Vs){var Ae=gA.formState;if(Ae!==null){e:{var Be=_a;if(Vs){if(Za){var Oe=u9(Za,Si);if(Oe){Za=g9(Oe),Be=t5(Oe);break e}}_e(Be)}Be=!1}Be\u0026\u0026(V=Ae[0])}}Ae=Oo(),Ae.memoizedState=Ae.baseState=V,Be={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:V},Ae.queue=Be,Ae=mm.bind(null,_a,Be),Be.dispatch=Ae,Be=Ht(!1);var Je=Ag.bind(null,_a,!1,Be.queue);return Be=Oo(),Oe={state:V,dispatch:null,action:G,pending:null},Be.queue=Oe,Ae=Nt.bind(null,_a,Oe,Je,Ae),Oe.dispatch=Ae,Be.memoizedState=G,[V,Ae,!1]}function gi(G){var V=ko();return jo(V,fa,G)}function jo(G,V,Ae){if(V=zi(G,V,Lo)[0],G=ur(Rs)[0],typeof V==\"object\"\u0026\u0026V!==null\u0026\u0026typeof V.then==\"function\")try{var Be=mi(V)}catch(Tt){throw Tt===Df?ul:Tt}else Be=V;V=ko();var Oe=V.queue,Je=Oe.dispatch;return Ae!==V.memoizedState\u0026\u0026(_a.flags|=2048,wi(9,Br(),oi.bind(null,Oe,Ae),null)),[Be,Je,G]}function oi(G,V){G.action=V}function Ji(G){var V=ko(),Ae=fa;if(Ae!==null)return jo(V,Ae,G);ko(),V=V.memoizedState,Ae=ko();var Be=Ae.queue.dispatch;return Ae.memoizedState=G,[V,Be,!1]}function wi(G,V,Ae,Be){return G={tag:G,create:Ae,deps:Be,inst:V,next:null},V=_a.updateQueue,V===null\u0026\u0026(V=Ko(),_a.updateQueue=V),Ae=V.lastEffect,Ae===null?V.lastEffect=G.next=G:(Be=Ae.next,Ae.next=G,G.next=Be,V.lastEffect=G),G}function Br(){return{destroy:void 0,resource:void 0}}function gr(){return ko().memoizedState}function oa(G,V,Ae,Be){var Oe=Oo();Be=Be===void 0?null:Be,_a.flags|=G,Oe.memoizedState=wi(1|V,Br(),Ae,Be)}function hs(G,V,Ae,Be){var Oe=ko();Be=Be===void 0?null:Be;var Je=Oe.memoizedState.inst;fa!==null\u0026\u0026Be!==null\u0026\u0026Co(Be,fa.memoizedState.deps)?Oe.memoizedState=wi(V,Je,Ae,Be):(_a.flags|=G,Oe.memoizedState=wi(1|V,Je,Ae,Be))}function Li(G,V){oa(8390656,8,G,V)}function ys(G,V){hs(2048,8,G,V)}function dr(G,V){return hs(4,2,G,V)}function cA(G,V){return hs(4,4,G,V)}function vA(G,V){if(typeof V==\"function\"){G=G();var Ae=V(G);return function(){typeof Ae==\"function\"?Ae():V(null)}}if(V!=null)return G=G(),V.current=G,function(){V.current=null}}function Yl(G,V,Ae){Ae=Ae!=null?Ae.concat([G]):null,hs(4,4,vA.bind(null,V,G),Ae)}function H0(){}function ph(G,V){var Ae=ko();V=V===void 0?null:V;var Be=Ae.memoizedState;return V!==null\u0026\u0026Co(V,Be[1])?Be[0]:(Ae.memoizedState=[G,V],G)}function Xh(G,V){var Ae=ko();V=V===void 0?null:V;var Be=Ae.memoizedState;if(V!==null\u0026\u0026Co(V,Be[1]))return Be[0];if(Be=G(),w_){R(!0);try{G()}finally{R(!1)}}return Ae.memoizedState=[Be,V],Be}function Bl(G,V,Ae){return Ae===void 0||(Fc\u00261073741824)!==0?G.memoizedState=V:(G.memoizedState=Ae,G=Cf(),_a.lanes|=G,Sl|=G,Ae)}function fc(G,V,Ae,Be){return c0(Ae,V)?Ae:Gu.current!==null?(G=Bl(G,Ae,Be),c0(G,V)||(Ps=!0),G):(Fc\u002642)===0?(Ps=!0,G.memoizedState=Ae):(G=Cf(),_a.lanes|=G,Sl|=G,V)}function Nd(G,V,Ae,Be,Oe){var Je=Sm();J0(Je!==0\u0026\u00268\u003eJe?Je:8);var Tt=Xr.T,ln={};Xr.T=ln,Ag(G,!1,V,Ae);try{var wn=Oe(),$o=Xr.S;if($o!==null\u0026\u0026$o(ln,wn),wn!==null\u0026\u0026typeof wn==\"object\"\u0026\u0026typeof wn.then==\"function\"){var Ai=et(wn,Be);gu(G,V,Ai,i0(G))}else gu(G,V,Be,i0(G))}catch(Qi){gu(G,V,{then:function(){},status:\"rejected\",reason:Qi},i0())}finally{J0(Je),Xr.T=Tt}}function il(G){var V=G.memoizedState;if(V!==null)return V;V={memoizedState:sl,baseState:sl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:sl},next:null};var Ae={};return V.next={memoizedState:Ae,baseState:Ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:Ae},next:null},G.memoizedState=V,G=G.alternate,G!==null\u0026\u0026(G.memoizedState=V),V}function Ul(){return Ce(b_)}function m_(){return ko().memoizedState}function ag(){return ko().memoizedState}function Rd(G){for(var V=G.return;V!==null;){switch(V.tag){case 24:case 3:var Ae=i0();G=Kt(Ae);var Be=rn(V,G,Ae);Be!==null\u0026\u0026(ug(Be,V,Ae),Lt(Be,V,Ae)),V={cache:tt()},G.payload=V;return}V=V.return}}function mh(G,V,Ae){var Be=i0();Ae={lane:Be,revertLane:0,action:Ae,hasEagerState:!1,eagerState:null,next:null},C0(G)?FC(V,Ae):(Ae=Jt(G,V,Ae,Be),Ae!==null\u0026\u0026(ug(Ae,G,Be),O0(Ae,V,Be)))}function mm(G,V,Ae){var Be=i0();gu(G,V,Ae,Be)}function gu(G,V,Ae,Be){var Oe={lane:Be,revertLane:0,action:Ae,hasEagerState:!1,eagerState:null,next:null};if(C0(G))FC(V,Oe);else{var Je=G.alternate;if(G.lanes===0\u0026\u0026(Je===null||Je.lanes===0)\u0026\u0026(Je=V.lastRenderedReducer,Je!==null))try{var Tt=V.lastRenderedState,ln=Je(Tt,Ae);if(Oe.hasEagerState=!0,Oe.eagerState=ln,c0(ln,Tt))return Xt(G,V,Oe,0),gA===null\u0026\u0026Wt(),!1}catch{}if(Ae=Jt(G,V,Oe,Be),Ae!==null)return ug(Ae,G,Be),O0(Ae,V,Be),!0}return!1}function Ag(G,V,Ae,Be){if(Be={lane:2,revertLane:Yt(),action:Be,hasEagerState:!1,eagerState:null,next:null},C0(G)){if(V)throw Error(r(479))}else V=Jt(G,Ae,Be,2),V!==null\u0026\u0026ug(V,G,2)}function C0(G){var V=G.alternate;return G===_a||V!==null\u0026\u0026V===_a}function FC(G,V){j0=Rm=!0;var Ae=G.pending;Ae===null?V.next=V:(V.next=Ae.next,Ae.next=V),G.pending=V}function O0(G,V,Ae){if((Ae\u00264194048)!==0){var Be=V.lanes;Be\u0026=G.pendingLanes,Ae|=Be,V.lanes=Ae,w(G,Ae)}}function __(G){var V=R1;return R1+=1,vh===null\u0026\u0026(vh=[]),Ze(vh,G,V)}function Qp(G,V){V=V.props.ref,G.ref=V!==void 0?V:null}function _1(G,V){throw V.$typeof===kI?Error(r(525)):(G=Object.prototype.toString.call(V),Error(r(31,G===\"[object Object]\"?\"object with keys {\"+Object.keys(V).join(\", \")+\"}\":G)))}function tr(G){var V=G._init;return V(G._payload)}function Vo(G){function V(Yn,Qn){if(G){var to=Yn.deletions;to===null?(Yn.deletions=[Qn],Yn.flags|=16):to.push(Qn)}}function Ae(Yn,Qn){if(!G)return null;for(;Qn!==null;)V(Yn,Qn),Qn=Qn.sibling;return null}function Be(Yn){for(var Qn=new Map;Yn!==null;)Yn.key!==null?Qn.set(Yn.key,Yn):Qn.set(Yn.index,Yn),Yn=Yn.sibling;return Qn}function Oe(Yn,Qn){return Yn=Fp(Yn,Qn),Yn.index=0,Yn.sibling=null,Yn}function Je(Yn,Qn,to){return Yn.index=to,G?(to=Yn.alternate,to!==null?(to=to.index,to\u003cQn?(Yn.flags|=67108866,Qn):to):(Yn.flags|=67108866,Qn)):(Yn.flags|=1048576,Qn)}function Tt(Yn){return G\u0026\u0026Yn.alternate===null\u0026\u0026(Yn.flags|=67108866),Yn}function ln(Yn,Qn,to,zo){return Qn===null||Qn.tag!==6?(Qn=C_(to,Yn.mode,zo),Qn.return=Yn,Qn):(Qn=Oe(Qn,to),Qn.return=Yn,Qn)}function wn(Yn,Qn,to,zo){var Bi=to.type;return Bi===FI?Ai(Yn,Qn,to.props.children,zo,to.key):Qn!==null\u0026\u0026(Qn.elementType===Bi||typeof Bi==\"object\"\u0026\u0026Bi!==null\u0026\u0026Bi.$typeof===Yd\u0026\u0026tr(Bi)===Qn.type)?(Qn=Oe(Qn,to.props),Qp(Qn,to),Qn.return=Yn,Qn):(Qn=RI(to.type,to.key,to.props,null,Yn.mode,zo),Qp(Qn,to),Qn.return=Yn,Qn)}function $o(Yn,Qn,to,zo){return Qn===null||Qn.tag!==4||Qn.stateNode.containerInfo!==to.containerInfo||Qn.stateNode.implementation!==to.implementation?(Qn=yh(to,Yn.mode,zo),Qn.return=Yn,Qn):(Qn=Oe(Qn,to.children||[]),Qn.return=Yn,Qn)}function Ai(Yn,Qn,to,zo,Bi){return Qn===null||Qn.tag!==7?(Qn=Ch(to,Yn.mode,zo,Bi),Qn.return=Yn,Qn):(Qn=Oe(Qn,to),Qn.return=Yn,Qn)}function Qi(Yn,Qn,to){if(typeof Qn==\"string\"\u0026\u0026Qn!==\"\"||typeof Qn==\"number\"||typeof Qn==\"bigint\")return Qn=C_(\"\"+Qn,Yn.mode,to),Qn.return=Yn,Qn;if(typeof Qn==\"object\"\u0026\u0026Qn!==null){switch(Qn.$typeof){case Od:return to=RI(Qn.type,Qn.key,Qn.props,null,Yn.mode,to),Qp(to,Qn),to.return=Yn,to;case B1:return Qn=yh(Qn,Yn.mode,to),Qn.return=Yn,Qn;case Yd:var zo=Qn._init;return Qn=zo(Qn._payload),Qi(Yn,Qn,to)}if(Bm(Qn)||u(Qn))return Qn=Ch(Qn,Yn.mode,to,null),Qn.return=Yn,Qn;if(typeof Qn.then==\"function\")return Qi(Yn,__(Qn),to);if(Qn.$typeof===y_)return Qi(Yn,Le(Yn,Qn),to);_1(Yn,Qn)}return null}function Ni(Yn,Qn,to,zo){var Bi=Qn!==null?Qn.key:null;if(typeof to==\"string\"\u0026\u0026to!==\"\"||typeof to==\"number\"||typeof to==\"bigint\")return Bi!==null?null:ln(Yn,Qn,\"\"+to,zo);if(typeof to==\"object\"\u0026\u0026to!==null){switch(to.$typeof){case Od:return to.key===Bi?wn(Yn,Qn,to,zo):null;case B1:return to.key===Bi?$o(Yn,Qn,to,zo):null;case Yd:return Bi=to._init,to=Bi(to._payload),Ni(Yn,Qn,to,zo)}if(Bm(to)||u(to))return Bi!==null?null:Ai(Yn,Qn,to,zo,null);if(typeof to.then==\"function\")return Ni(Yn,Qn,__(to),zo);if(to.$typeof===y_)return Ni(Yn,Qn,Le(Yn,to),zo);_1(Yn,to)}return null}function Xs(Yn,Qn,to,zo,Bi){if(typeof zo==\"string\"\u0026\u0026zo!==\"\"||typeof zo==\"number\"||typeof zo==\"bigint\")return Yn=Yn.get(to)||null,ln(Qn,Yn,\"\"+zo,Bi);if(typeof zo==\"object\"\u0026\u0026zo!==null){switch(zo.$typeof){case Od:return Yn=Yn.get(zo.key===null?to:zo.key)||null,wn(Qn,Yn,zo,Bi);case B1:return Yn=Yn.get(zo.key===null?to:zo.key)||null,$o(Qn,Yn,zo,Bi);case Yd:var eA=zo._init;return zo=eA(zo._payload),Xs(Yn,Qn,to,zo,Bi)}if(Bm(zo)||u(zo))return Yn=Yn.get(to)||null,Ai(Qn,Yn,zo,Bi,null);if(typeof zo.then==\"function\")return Xs(Yn,Qn,to,__(zo),Bi);if(zo.$typeof===y_)return Xs(Yn,Qn,to,Le(Qn,zo),Bi);_1(Qn,zo)}return null}function jp(Yn,Qn,to,zo){for(var Bi=null,eA=null,Or=Qn,Js=Qn=0,Qs=null;Or!==null\u0026\u0026Js\u003cto.length;Js++){Or.index\u003eJs?(Qs=Or,Or=null):Qs=Or.sibling;var Wa=Ni(Yn,Or,to[Js],zo);if(Wa===null){Or===null\u0026\u0026(Or=Qs);break}G\u0026\u0026Or\u0026\u0026Wa.alternate===null\u0026\u0026V(Yn,Or),Qn=Je(Wa,Qn,Js),eA===null?Bi=Wa:eA.sibling=Wa,eA=Wa,Or=Qs}if(Js===to.length)return Ae(Yn,Or),Vs\u0026\u0026te(Yn,Js),Bi;if(Or===null){for(;Js\u003cto.length;Js++)Or=Qi(Yn,to[Js],zo),Or!==null\u0026\u0026(Qn=Je(Or,Qn,Js),eA===null?Bi=Or:eA.sibling=Or,eA=Or);return Vs\u0026\u0026te(Yn,Js),Bi}for(Or=Be(Or);Js\u003cto.length;Js++)Qs=Xs(Or,Yn,Js,to[Js],zo),Qs!==null\u0026\u0026(G\u0026\u0026Qs.alternate!==null\u0026\u0026Or.delete(Qs.key===null?Js:Qs.key),Qn=Je(Qs,Qn,Js),eA===null?Bi=Qs:eA.sibling=Qs,eA=Qs);return G\u0026\u0026Or.forEach(function(Bg){return V(Yn,Bg)}),Vs\u0026\u0026te(Yn,Js),Bi}function L1(Yn,Qn,to,zo){if(to==null)throw Error(r(151));for(var Bi=null,eA=null,Or=Qn,Js=Qn=0,Qs=null,Wa=to.next();Or!==null\u0026\u0026!Wa.done;Js++,Wa=to.next()){Or.index\u003eJs?(Qs=Or,Or=null):Qs=Or.sibling;var Bg=Ni(Yn,Or,Wa.value,zo);if(Bg===null){Or===null\u0026\u0026(Or=Qs);break}G\u0026\u0026Or\u0026\u0026Bg.alternate===null\u0026\u0026V(Yn,Or),Qn=Je(Bg,Qn,Js),eA===null?Bi=Bg:eA.sibling=Bg,eA=Bg,Or=Qs}if(Wa.done)return Ae(Yn,Or),Vs\u0026\u0026te(Yn,Js),Bi;if(Or===null){for(;!Wa.done;Js++,Wa=to.next())Wa=Qi(Yn,Wa.value,zo),Wa!==null\u0026\u0026(Qn=Je(Wa,Qn,Js),eA===null?Bi=Wa:eA.sibling=Wa,eA=Wa);return Vs\u0026\u0026te(Yn,Js),Bi}for(Or=Be(Or);!Wa.done;Js++,Wa=to.next())Wa=Xs(Or,Yn,Js,Wa.value,zo),Wa!==null\u0026\u0026(G\u0026\u0026Wa.alternate!==null\u0026\u0026Or.delete(Wa.key===null?Js:Wa.key),Qn=Je(Wa,Qn,Js),eA===null?Bi=Wa:eA.sibling=Wa,eA=Wa);return G\u0026\u0026Or.forEach(function(d5){return V(Yn,d5)}),Vs\u0026\u0026te(Yn,Js),Bi}function Eg(Yn,Qn,to,zo){if(typeof to==\"object\"\u0026\u0026to!==null\u0026\u0026to.type===FI\u0026\u0026to.key===null\u0026\u0026(to=to.props.children),typeof to==\"object\"\u0026\u0026to!==null){switch(to.$typeof){case Od:e:{for(var Bi=to.key;Qn!==null;){if(Qn.key===Bi){if(Bi=to.type,Bi===FI){if(Qn.tag===7){Ae(Yn,Qn.sibling),zo=Oe(Qn,to.props.children),zo.return=Yn,Yn=zo;break e}}else if(Qn.elementType===Bi||typeof Bi==\"object\"\u0026\u0026Bi!==null\u0026\u0026Bi.$typeof===Yd\u0026\u0026tr(Bi)===Qn.type){Ae(Yn,Qn.sibling),zo=Oe(Qn,to.props),Qp(zo,to),zo.return=Yn,Yn=zo;break e}Ae(Yn,Qn);break}else V(Yn,Qn);Qn=Qn.sibling}to.type===FI?(zo=Ch(to.props.children,Yn.mode,zo,to.key),zo.return=Yn,Yn=zo):(zo=RI(to.type,to.key,to.props,null,Yn.mode,zo),Qp(zo,to),zo.return=Yn,Yn=zo)}return Tt(Yn);case B1:e:{for(Bi=to.key;Qn!==null;){if(Qn.key===Bi)if(Qn.tag===4\u0026\u0026Qn.stateNode.containerInfo===to.containerInfo\u0026\u0026Qn.stateNode.implementation===to.implementation){Ae(Yn,Qn.sibling),zo=Oe(Qn,to.children||[]),zo.return=Yn,Yn=zo;break e}else{Ae(Yn,Qn);break}else V(Yn,Qn);Qn=Qn.sibling}zo=yh(to,Yn.mode,zo),zo.return=Yn,Yn=zo}return Tt(Yn);case Yd:return Bi=to._init,to=Bi(to._payload),Eg(Yn,Qn,to,zo)}if(Bm(to))return jp(Yn,Qn,to,zo);if(u(to)){if(Bi=u(to),typeof Bi!=\"function\")throw Error(r(150));return to=Bi.call(to),L1(Yn,Qn,to,zo)}if(typeof to.then==\"function\")return Eg(Yn,Qn,__(to),zo);if(to.$typeof===y_)return Eg(Yn,Qn,Le(Yn,to),zo);_1(Yn,to)}return typeof to==\"string\"\u0026\u0026to!==\"\"||typeof to==\"number\"||typeof to==\"bigint\"?(to=\"\"+to,Qn!==null\u0026\u0026Qn.tag===6?(Ae(Yn,Qn.sibling),zo=Oe(Qn,to),zo.return=Yn,Yn=zo):(Ae(Yn,Qn),zo=C_(to,Yn.mode,zo),zo.return=Yn,Yn=zo),Tt(Yn)):Ae(Yn,Qn)}return function(Yn,Qn,to,zo){try{R1=0;var Bi=Eg(Yn,Qn,to,zo);return vh=null,Bi}catch(Or){if(Or===Df||Or===ul)throw Or;var eA=o(29,Or,null,Yn.mode);return eA.lanes=zo,eA.return=Yn,eA}}}function wA(G){var V=G.alternate;p(xs,xs.current\u00261),p(Vp,G),Rf===null\u0026\u0026(V===null||Gu.current!==null||V.memoizedState!==null)\u0026\u0026(Rf=G)}function Td(G){if(G.tag===22){if(p(xs,xs.current),p(Vp,G),Rf===null){var V=G.alternate;V!==null\u0026\u0026V.memoizedState!==null\u0026\u0026(Rf=G)}}else da()}function da(){p(xs,xs.current),p(Vp,Vp.current)}function Zh(G){d(Vp),Rf===G\u0026\u0026(Rf=null),d(xs)}function mf(G){for(var V=G;V!==null;){if(V.tag===13){var Ae=V.memoizedState;if(Ae!==null\u0026\u0026(Ae=Ae.dehydrated,Ae===null||Sf(Ae)||OI(Ae)))return V}else if(V.tag===19\u0026\u0026V.memoizedProps.revealOrder!==void 0){if((V.flags\u0026128)!==0)return V}else if(V.child!==null){V.child.return=V,V=V.child;continue}if(V===G)break;for(;V.sibling===null;){if(V.return===null||V.return===G)return null;V=V.return}V.sibling.return=V.return,V=V.sibling}return null}function LC(G,V,Ae,Be){V=G.memoizedState,Ae=Ae(Be,V),Ae=Ae==null?V:E1({},V,Ae),G.memoizedState=Ae,G.lanes===0\u0026\u0026(G.updateQueue.baseState=Ae)}function _f(G,V,Ae,Be,Oe,Je,Tt){return G=G.stateNode,typeof G.shouldComponentUpdate==\"function\"?G.shouldComponentUpdate(Be,Je,Tt):V.prototype\u0026\u0026V.prototype.isPureReactComponent?!st(Ae,Be)||!st(Oe,Je):!0}function _m(G,V,Ae,Be){G=V.state,typeof V.componentWillReceiveProps==\"function\"\u0026\u0026V.componentWillReceiveProps(Ae,Be),typeof V.UNSAFE_componentWillReceiveProps==\"function\"\u0026\u0026V.UNSAFE_componentWillReceiveProps(Ae,Be),V.state!==G\u0026\u0026Lc.enqueueReplaceState(V,V.state,null)}function du(G,V){var Ae=V;if(\"ref\"in V){Ae={};for(var Be in V)Be!==\"ref\"\u0026\u0026(Ae[Be]=V[Be])}if(G=G.defaultProps){Ae===V\u0026\u0026(Ae=E1({},Ae));for(var Oe in G)Ae[Oe]===void 0\u0026\u0026(Ae[Oe]=G[Oe])}return Ae}function cg(G,V){try{var Ae=G.onUncaughtError;Ae(V.value,{componentStack:V.stack})}catch(Be){setTimeout(function(){throw Be})}}function Ug(G,V,Ae){try{var Be=G.onCaughtError;Be(Ae.value,{componentStack:Ae.stack,errorBoundary:V.tag===1?V.stateNode:null})}catch(Oe){setTimeout(function(){throw Oe})}}function Vc(G,V,Ae){return Ae=Kt(Ae),Ae.tag=3,Ae.payload={element:null},Ae.callback=function(){cg(G,V)},Ae}function ha(G){return G=Kt(G),G.tag=3,G}function BI(G,V,Ae,Be){var Oe=Ae.type.getDerivedStateFromError;if(typeof Oe==\"function\"){var Je=Be.value;G.payload=function(){return Oe(Je)},G.callback=function(){Ug(V,Ae,Be)}}var Tt=Ae.stateNode;Tt!==null\u0026\u0026typeof Tt.componentDidCatch==\"function\"\u0026\u0026(G.callback=function(){Ug(V,Ae,Be),typeof Oe!=\"function\"\u0026\u0026(Wp===null?Wp=new Set([this]):Wp.add(this));var ln=Be.stack;this.componentDidCatch(Be.value,{componentStack:ln!==null?ln:\"\"})})}function G0(G,V,Ae,Be,Oe){if(Ae.flags|=32768,Be!==null\u0026\u0026typeof Be==\"object\"\u0026\u0026typeof Be.then==\"function\"){if(V=Ae.alternate,V!==null\u0026\u0026Re(V,Ae,Oe,!0),Ae=Vp.current,Ae!==null){switch(Ae.tag){case 13:return Rf===null?IA():Ae.alternate===null\u0026\u0026hl===0\u0026\u0026(hl=3),Ae.flags\u0026=-257,Ae.flags|=65536,Ae.lanes=Oe,Be===Iu?Ae.flags|=16384:(V=Ae.updateQueue,V===null?Ae.updateQueue=new Set([Be]):V.add(Be),DI(G,Be,Oe)),!1;case 22:return Ae.flags|=65536,Be===Iu?Ae.flags|=16384:(V=Ae.updateQueue,V===null?(V={transitions:null,markerInstances:null,retryQueue:new Set([Be])},Ae.updateQueue=V):(Ae=V.retryQueue,Ae===null?V.retryQueue=new Set([Be]):Ae.add(Be)),DI(G,Be,Oe)),!1}throw Error(r(435,Ae.tag))}return DI(G,Be,Oe),IA(),!1}if(Vs)return V=Vp.current,V!==null?((V.flags\u002665536)===0\u0026\u0026(V.flags|=256),V.flags|=65536,V.lanes=Oe,Be!==lp\u0026\u0026(G=Error(r(422),{cause:Be}),ve(W(G,Ae)))):(Be!==lp\u0026\u0026(V=Error(r(423),{cause:Be}),ve(W(V,Ae))),G=G.current.alternate,G.flags|=65536,Oe\u0026=-Oe,G.lanes|=Oe,Be=W(Be,Ae),Oe=Vc(G.stateNode,Be,Oe),Ho(G,Oe),hl!==4\u0026\u0026(hl=2)),!1;var Je=Error(r(520),{cause:Be});if(Je=W(Je,Ae),P_===null?P_=[Je]:P_.push(Je),hl!==4\u0026\u0026(hl=2),V===null)return!0;Be=W(Be,Ae),Ae=V;do{switch(Ae.tag){case 3:return Ae.flags|=65536,G=Oe\u0026-Oe,Ae.lanes|=G,G=Vc(Ae.stateNode,Be,G),Ho(Ae,G),!1;case 1:if(V=Ae.type,Je=Ae.stateNode,(Ae.flags\u0026128)===0\u0026\u0026(typeof V.getDerivedStateFromError==\"function\"||Je!==null\u0026\u0026typeof Je.componentDidCatch==\"function\"\u0026\u0026(Wp===null||!Wp.has(Je))))return Ae.flags|=65536,Oe\u0026=-Oe,Ae.lanes|=Oe,Oe=ha(Oe),BI(Oe,G,Ae,Be),Ho(Ae,Oe),!1}Ae=Ae.return}while(Ae!==null);return!1}function PA(G,V,Ae,Be){V.child=G===null?N4(V,null,Ae,Be):Cu(V,G.child,Ae,Be)}function _h(G,V,Ae,Be,Oe){Ae=Ae.render;var Je=V.ref;if(\"ref\"in Be){var Tt={};for(var ln in Be)ln!==\"ref\"\u0026\u0026(Tt[ln]=Be[ln])}else Tt=Be;return ke(V),Be=ei(G,V,Ae,Tt,Je,Oe),ln=Ro(),G!==null\u0026\u0026!Ps?(On(G,V,Oe),qr(G,V,Oe)):(Vs\u0026\u0026ln\u0026\u0026J(V),V.flags|=1,PA(G,V,Be,Oe),V.child)}function n0(G,V,Ae,Be,Oe){if(G===null){var Je=Ae.type;return typeof Je==\"function\"\u0026\u0026!NI(Je)\u0026\u0026Je.defaultProps===void 0\u0026\u0026Ae.compare===null?(V.tag=15,V.type=Je,HC(G,V,Je,Be,Oe)):(G=RI(Ae.type,null,Be,V,V.mode,Oe),G.ref=V.ref,G.return=V,V.child=G)}if(Je=G.child,!ps(G,Oe)){var Tt=Je.memoizedProps;if(Ae=Ae.compare,Ae=Ae!==null?Ae:st,Ae(Tt,Be)\u0026\u0026G.ref===V.ref)return qr(G,V,Oe)}return V.flags|=1,G=Fp(Je,Be),G.ref=V.ref,G.return=V,V.child=G}function HC(G,V,Ae,Be,Oe){if(G!==null){var Je=G.memoizedProps;if(st(Je,Be)\u0026\u0026G.ref===V.ref)if(Ps=!1,V.pendingProps=Be=Je,ps(G,Oe))(G.flags\u0026131072)!==0\u0026\u0026(Ps=!0);else return V.lanes=G.lanes,qr(G,V,Oe)}return ku(G,V,Ae,Be,Oe)}function f1(G,V,Ae){var Be=V.pendingProps,Oe=Be.children,Je=G!==null?G.memoizedState:null;if(Be.mode===\"hidden\"){if((V.flags\u0026128)!==0){if(Be=Je!==null?Je.baseLanes|Ae:Ae,G!==null){for(Oe=V.child=G.child,Je=0;Oe!==null;)Je=Je|Oe.lanes|Oe.childLanes,Oe=Oe.sibling;V.childLanes=Je\u0026~Be}else V.childLanes=0,V.child=null;return fm(G,V,Be,Ae)}if((Ae\u0026536870912)!==0)V.memoizedState={baseLanes:0,cachePool:null},G!==null\u0026\u0026Bt(V,Je!==null?Je.cachePool:null),Je!==null?Zt(V,Je):nn(),Td(V);else return V.lanes=V.childLanes=536870912,fm(G,V,Je!==null?Je.baseLanes|Ae:Ae,Ae)}else Je!==null?(Bt(V,Je.cachePool),Zt(V,Je),da(),V.memoizedState=null):(G!==null\u0026\u0026Bt(V,null),nn(),da());return PA(G,V,Oe,Ae),V.child}function fm(G,V,Ae,Be){var Oe=It();return Oe=Oe===null?null:{parent:Ud?rc._currentValue:rc._currentValue2,pool:Oe},V.memoizedState={baseLanes:Ae,cachePool:Oe},G!==null\u0026\u0026Bt(V,null),nn(),Td(V),G!==null\u0026\u0026Re(G,V,Be,!0),null}function vp(G,V){var Ae=V.ref;if(Ae===null)G!==null\u0026\u0026G.ref!==null\u0026\u0026(V.flags|=4194816);else{if(typeof Ae!=\"function\"\u0026\u0026typeof Ae!=\"object\")throw Error(r(284));(G===null||G.ref!==Ae)\u0026\u0026(V.flags|=4194816)}}function ku(G,V,Ae,Be,Oe){return ke(V),Ae=ei(G,V,Ae,Be,void 0,Oe),Be=Ro(),G!==null\u0026\u0026!Ps?(On(G,V,Oe),qr(G,V,Oe)):(Vs\u0026\u0026Be\u0026\u0026J(V),V.flags|=1,PA(G,V,Ae,Oe),V.child)}function ot(G,V,Ae,Be,Oe,Je){return ke(V),V.updateQueue=null,Ae=To(V,Be,Ae,Oe),ro(G),Be=Ro(),G!==null\u0026\u0026!Ps?(On(G,V,Je),qr(G,V,Je)):(Vs\u0026\u0026Be\u0026\u0026J(V),V.flags|=1,PA(G,V,Ae,Je),V.child)}function rt(G,V,Ae,Be,Oe){if(ke(V),V.stateNode===null){var Je=mg,Tt=Ae.contextType;typeof Tt==\"object\"\u0026\u0026Tt!==null\u0026\u0026(Je=Ce(Tt)),Je=new Ae(Be,Je),V.memoizedState=Je.state!==null\u0026\u0026Je.state!==void 0?Je.state:null,Je.updater=Lc,V.stateNode=Je,Je._reactInternals=V,Je=V.stateNode,Je.props=Be,Je.state=V.memoizedState,Je.refs={},$n(V),Tt=Ae.contextType,Je.context=typeof Tt==\"object\"\u0026\u0026Tt!==null?Ce(Tt):mg,Je.state=V.memoizedState,Tt=Ae.getDerivedStateFromProps,typeof Tt==\"function\"\u0026\u0026(LC(V,Ae,Tt,Be),Je.state=V.memoizedState),typeof Ae.getDerivedStateFromProps==\"function\"||typeof Je.getSnapshotBeforeUpdate==\"function\"||typeof Je.UNSAFE_componentWillMount!=\"function\"\u0026\u0026typeof Je.componentWillMount!=\"function\"||(Tt=Je.state,typeof Je.componentWillMount==\"function\"\u0026\u0026Je.componentWillMount(),typeof Je.UNSAFE_componentWillMount==\"function\"\u0026\u0026Je.UNSAFE_componentWillMount(),Tt!==Je.state\u0026\u0026Lc.enqueueReplaceState(Je,Je.state,null),qe(V,Be,Je,Oe),Ao(),Je.state=V.memoizedState),typeof Je.componentDidMount==\"function\"\u0026\u0026(V.flags|=4194308),Be=!0}else if(G===null){Je=V.stateNode;var ln=V.memoizedProps,wn=du(Ae,ln);Je.props=wn;var $o=Je.context,Ai=Ae.contextType;Tt=mg,typeof Ai==\"object\"\u0026\u0026Ai!==null\u0026\u0026(Tt=Ce(Ai));var Qi=Ae.getDerivedStateFromProps;Ai=typeof Qi==\"function\"||typeof Je.getSnapshotBeforeUpdate==\"function\",ln=V.pendingProps!==ln,Ai||typeof Je.UNSAFE_componentWillReceiveProps!=\"function\"\u0026\u0026typeof Je.componentWillReceiveProps!=\"function\"||(ln||$o!==Tt)\u0026\u0026_m(V,Je,Be,Tt),Yp=!1;var Ni=V.memoizedState;Je.state=Ni,qe(V,Be,Je,Oe),Ao(),$o=V.memoizedState,ln||Ni!==$o||Yp?(typeof Qi==\"function\"\u0026\u0026(LC(V,Ae,Qi,Be),$o=V.memoizedState),(wn=Yp||_f(V,Ae,wn,Be,Ni,$o,Tt))?(Ai||typeof Je.UNSAFE_componentWillMount!=\"function\"\u0026\u0026typeof Je.componentWillMount!=\"function\"||(typeof Je.componentWillMount==\"function\"\u0026\u0026Je.componentWillMount(),typeof Je.UNSAFE_componentWillMount==\"function\"\u0026\u0026Je.UNSAFE_componentWillMount()),typeof Je.componentDidMount==\"function\"\u0026\u0026(V.flags|=4194308)):(typeof Je.componentDidMount==\"function\"\u0026\u0026(V.flags|=4194308),V.memoizedProps=Be,V.memoizedState=$o),Je.props=Be,Je.state=$o,Je.context=Tt,Be=wn):(typeof Je.componentDidMount==\"function\"\u0026\u0026(V.flags|=4194308),Be=!1)}else{Je=V.stateNode,ht(G,V),Tt=V.memoizedProps,Ai=du(Ae,Tt),Je.props=Ai,Qi=V.pendingProps,Ni=Je.context,$o=Ae.contextType,wn=mg,typeof $o==\"object\"\u0026\u0026$o!==null\u0026\u0026(wn=Ce($o)),ln=Ae.getDerivedStateFromProps,($o=typeof ln==\"function\"||typeof Je.getSnapshotBeforeUpdate==\"function\")||typeof Je.UNSAFE_componentWillReceiveProps!=\"function\"\u0026\u0026typeof Je.componentWillReceiveProps!=\"function\"||(Tt!==Qi||Ni!==wn)\u0026\u0026_m(V,Je,Be,wn),Yp=!1,Ni=V.memoizedState,Je.state=Ni,qe(V,Be,Je,Oe),Ao();var Xs=V.memoizedState;Tt!==Qi||Ni!==Xs||Yp||G!==null\u0026\u0026G.dependencies!==null\u0026\u0026Ee(G.dependencies)?(typeof ln==\"function\"\u0026\u0026(LC(V,Ae,ln,Be),Xs=V.memoizedState),(Ai=Yp||_f(V,Ae,Ai,Be,Ni,Xs,wn)||G!==null\u0026\u0026G.dependencies!==null\u0026\u0026Ee(G.dependencies))?($o||typeof Je.UNSAFE_componentWillUpdate!=\"function\"\u0026\u0026typeof Je.componentWillUpdate!=\"function\"||(typeof Je.componentWillUpdate==\"function\"\u0026\u0026Je.componentWillUpdate(Be,Xs,wn),typeof Je.UNSAFE_componentWillUpdate==\"function\"\u0026\u0026Je.UNSAFE_componentWillUpdate(Be,Xs,wn)),typeof Je.componentDidUpdate==\"function\"\u0026\u0026(V.flags|=4),typeof Je.getSnapshotBeforeUpdate==\"function\"\u0026\u0026(V.flags|=1024)):(typeof Je.componentDidUpdate!=\"function\"||Tt===G.memoizedProps\u0026\u0026Ni===G.memoizedState||(V.flags|=4),typeof Je.getSnapshotBeforeUpdate!=\"function\"||Tt===G.memoizedProps\u0026\u0026Ni===G.memoizedState||(V.flags|=1024),V.memoizedProps=Be,V.memoizedState=Xs),Je.props=Be,Je.state=Xs,Je.context=wn,Be=Ai):(typeof Je.componentDidUpdate!=\"function\"||Tt===G.memoizedProps\u0026\u0026Ni===G.memoizedState||(V.flags|=4),typeof Je.getSnapshotBeforeUpdate!=\"function\"||Tt===G.memoizedProps\u0026\u0026Ni===G.memoizedState||(V.flags|=1024),Be=!1)}return Je=Be,vp(G,V),Be=(V.flags\u0026128)!==0,Je||Be?(Je=V.stateNode,Ae=Be\u0026\u0026typeof Ae.getDerivedStateFromError!=\"function\"?null:Je.render(),V.flags|=1,G!==null\u0026\u0026Be?(V.child=Cu(V,G.child,null,Oe),V.child=Cu(V,null,Ae,Oe)):PA(G,V,Ae,Oe),V.memoizedState=Je.state,G=V.child):G=qr(G,V,Oe),G}function Ot(G,V,Ae,Be){return ye(),V.flags|=256,PA(G,V,Ae,Be),V.child}function an(G){return{baseLanes:G,cachePool:mt()}}function Dn(G,V,Ae){return G=G!==null?G.childLanes\u0026~Ae:0,V\u0026\u0026(G|=pl),G}function Xn(G,V,Ae){var Be=V.pendingProps,Oe=!1,Je=(V.flags\u0026128)!==0,Tt;if((Tt=Je)||(Tt=G!==null\u0026\u0026G.memoizedState===null?!1:(xs.current\u00262)!==0),Tt\u0026\u0026(Oe=!0,V.flags\u0026=-129),Tt=(V.flags\u002632)!==0,V.flags\u0026=-33,G===null){if(Vs){if(Oe?wA(V):da(),Vs){var ln=Za,wn;(wn=ln)\u0026\u0026(ln=GI(ln,Si),ln!==null?(V.memoizedState={dehydrated:ln,treeContext:cl!==null?{id:Ou,overflow:B0}:null,retryLane:536870912,hydrationErrors:null},wn=o(18,null,null,0),wn.stateNode=ln,wn.return=V,V.child=wn,Xa=V,Za=null,wn=!0):wn=!1),wn||_e(V)}if(ln=V.memoizedState,ln!==null\u0026\u0026(ln=ln.dehydrated,ln!==null))return OI(ln)?V.lanes=32:V.lanes=536870912,null;Zh(V)}return ln=Be.children,Be=Be.fallback,Oe?(da(),Oe=V.mode,ln=vo({mode:\"hidden\",children:ln},Oe),Be=Ch(Be,Oe,Ae,null),ln.return=V,Be.return=V,ln.sibling=Be,V.child=ln,Oe=V.child,Oe.memoizedState=an(Ae),Oe.childLanes=Dn(G,Tt,Ae),V.memoizedState=wh,Be):(wA(V),oo(V,ln))}if(wn=G.memoizedState,wn!==null\u0026\u0026(ln=wn.dehydrated,ln!==null)){if(Je)V.flags\u0026256?(wA(V),V.flags\u0026=-257,V=Xo(G,V,Ae)):V.memoizedState!==null?(da(),V.child=G.child,V.flags|=128,V=null):(da(),Oe=Be.fallback,ln=V.mode,Be=vo({mode:\"visible\",children:Be.children},ln),Oe=Ch(Oe,ln,Ae,null),Oe.flags|=2,Be.return=V,Oe.return=V,Be.sibling=Oe,V.child=Be,Cu(V,G.child,null,Ae),Be=V.child,Be.memoizedState=an(Ae),Be.childLanes=Dn(G,Tt,Ae),V.memoizedState=wh,V=Oe);else if(wA(V),OI(ln))Tt=Q1(ln).digest,Be=Error(r(419)),Be.stack=\"\",Be.digest=Tt,ve({value:Be,source:null,stack:null}),V=Xo(G,V,Ae);else if(Ps||Re(G,V,Ae,!1),Tt=(Ae\u0026G.childLanes)!==0,Ps||Tt){if(Tt=gA,Tt!==null\u0026\u0026(Be=Ae\u0026-Ae,Be=(Be\u002642)!==0?1:M(Be),Be=(Be\u0026(Tt.suspendedLanes|Ae))!==0?0:Be,Be!==0\u0026\u0026Be!==wn.retryLane))throw wn.retryLane=Be,yn(G,Be),ug(Tt,G,Be),Ja;Sf(ln)||IA(),V=Xo(G,V,Ae)}else Sf(ln)?(V.flags|=192,V.child=G.child,V=null):(G=wn.treeContext,Eh\u0026\u0026(Za=Q_(ln),Xa=V,Vs=!0,fu=null,Si=!1,G!==null\u0026\u0026(E0[jc++]=Ou,E0[jc++]=B0,E0[jc++]=cl,Ou=G.id,B0=G.overflow,cl=V)),V=oo(V,Be.children),V.flags|=4096);return V}return Oe?(da(),Oe=Be.fallback,ln=V.mode,wn=G.child,Je=wn.sibling,Be=Fp(wn,{mode:\"hidden\",children:Be.children}),Be.subtreeFlags=wn.subtreeFlags\u002665011712,Je!==null?Oe=Fp(Je,Oe):(Oe=Ch(Oe,ln,Ae,null),Oe.flags|=2),Oe.return=V,Be.return=V,Be.sibling=Oe,V.child=Be,Be=Oe,Oe=V.child,ln=G.child.memoizedState,ln===null?ln=an(Ae):(wn=ln.cachePool,wn!==null?(Je=Ud?rc._currentValue:rc._currentValue2,wn=wn.parent!==Je?{parent:Je,pool:Je}:wn):wn=mt(),ln={baseLanes:ln.baseLanes|Ae,cachePool:wn}),Oe.memoizedState=ln,Oe.childLanes=Dn(G,Tt,Ae),V.memoizedState=wh,Be):(wA(V),Ae=G.child,G=Ae.sibling,Ae=Fp(Ae,{mode:\"visible\",children:Be.children}),Ae.return=V,Ae.sibling=null,G!==null\u0026\u0026(Tt=V.deletions,Tt===null?(V.deletions=[G],V.flags|=16):Tt.push(G)),V.child=Ae,V.memoizedState=null,Ae)}function oo(G,V){return V=vo({mode:\"visible\",children:V},G.mode),V.return=G,G.child=V}function vo(G,V){return G=o(22,G,null,V),G.lanes=0,G.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},G}function Xo(G,V,Ae){return Cu(V,G.child,null,Ae),G=oo(V,V.pendingProps.children),G.flags|=2,V.memoizedState=null,G}function Ti(G,V,Ae){G.lanes|=V;var Be=G.alternate;Be!==null\u0026\u0026(Be.lanes|=V),we(G.return,V,Ae)}function ir(G,V,Ae,Be,Oe){var Je=G.memoizedState;Je===null?G.memoizedState={isBackwards:V,rendering:null,renderingStartTime:0,last:Be,tail:Ae,tailMode:Oe}:(Je.isBackwards=V,Je.rendering=null,Je.renderingStartTime=0,Je.last=Be,Je.tail=Ae,Je.tailMode=Oe)}function Gs(G,V,Ae){var Be=V.pendingProps,Oe=Be.revealOrder,Je=Be.tail;if(PA(G,V,Be.children,Ae),Be=xs.current,(Be\u00262)!==0)Be=Be\u00261|2,V.flags|=128;else{if(G!==null\u0026\u0026(G.flags\u0026128)!==0)e:for(G=V.child;G!==null;){if(G.tag===13)G.memoizedState!==null\u0026\u0026Ti(G,Ae,V);else if(G.tag===19)Ti(G,Ae,V);else if(G.child!==null){G.child.return=G,G=G.child;continue}if(G===V)break e;for(;G.sibling===null;){if(G.return===null||G.return===V)break e;G=G.return}G.sibling.return=G.return,G=G.sibling}Be\u0026=1}switch(p(xs,Be),Oe){case\"forwards\":for(Ae=V.child,Oe=null;Ae!==null;)G=Ae.alternate,G!==null\u0026\u0026mf(G)===null\u0026\u0026(Oe=Ae),Ae=Ae.sibling;Ae=Oe,Ae===null?(Oe=V.child,V.child=null):(Oe=Ae.sibling,Ae.sibling=null),ir(V,!1,Oe,Ae,Je);break;case\"backwards\":for(Ae=null,Oe=V.child,V.child=null;Oe!==null;){if(G=Oe.alternate,G!==null\u0026\u0026mf(G)===null){V.child=Oe;break}G=Oe.sibling,Oe.sibling=Ae,Ae=Oe,Oe=G}ir(V,!0,Ae,null,Je);break;case\"together\":ir(V,!1,null,null,void 0);break;default:V.memoizedState=null}return V.child}function qr(G,V,Ae){if(G!==null\u0026\u0026(V.dependencies=G.dependencies),Sl|=V.lanes,(Ae\u0026V.childLanes)===0)if(G!==null){if(Re(G,V,Ae,!1),(Ae\u0026V.childLanes)===0)return null}else return null;if(G!==null\u0026\u0026V.child!==G.child)throw Error(r(153));if(V.child!==null){for(G=V.child,Ae=Fp(G,G.pendingProps),V.child=Ae,Ae.return=V;G.sibling!==null;)G=G.sibling,Ae=Ae.sibling=Fp(G,G.pendingProps),Ae.return=V;Ae.sibling=null}return V.child}function ps(G,V){return(G.lanes\u0026V)!==0?!0:(G=G.dependencies,!!(G!==null\u0026\u0026Ee(G)))}function Ic(G,V,Ae){switch(V.tag){case 3:ie(V,V.stateNode.containerInfo),Qe(V,rc,G.memoizedState.cache),ye();break;case 27:case 5:le(V);break;case 4:ie(V,V.stateNode.containerInfo);break;case 10:Qe(V,V.type,V.memoizedProps.value);break;case 13:var Be=V.memoizedState;if(Be!==null)return Be.dehydrated!==null?(wA(V),V.flags|=128,null):(Ae\u0026V.child.childLanes)!==0?Xn(G,V,Ae):(wA(V),G=qr(G,V,Ae),G!==null?G.sibling:null);wA(V);break;case 19:var Oe=(G.flags\u0026128)!==0;if(Be=(Ae\u0026V.childLanes)!==0,Be||(Re(G,V,Ae,!1),Be=(Ae\u0026V.childLanes)!==0),Oe){if(Be)return Gs(G,V,Ae);V.flags|=128}if(Oe=V.memoizedState,Oe!==null\u0026\u0026(Oe.rendering=null,Oe.tail=null,Oe.lastEffect=null),p(xs,xs.current),Be)break;return null;case 22:case 23:return V.lanes=0,f1(G,V,Ae);case 24:Qe(V,rc,G.memoizedState.cache)}return qr(G,V,Ae)}function lc(G,V,Ae){if(G!==null)if(G.memoizedProps!==V.pendingProps)Ps=!0;else{if(!ps(G,Ae)\u0026\u0026(V.flags\u0026128)===0)return Ps=!1,Ic(G,V,Ae);Ps=(G.flags\u0026131072)!==0}else Ps=!1,Vs\u0026\u0026(V.flags\u00261048576)!==0\u0026\u0026j(V,KI,V.index);switch(V.lanes=0,V.tag){case 16:e:{G=V.pendingProps;var Be=V.elementType,Oe=Be._init;if(Be=Oe(Be._payload),V.type=Be,typeof Be==\"function\")NI(Be)?(G=du(Be,G),V.tag=1,V=rt(null,V,Be,G,Ae)):(V.tag=0,V=ku(null,V,Be,G,Ae));else{if(Be!=null){if(Oe=Be.$typeof,Oe===ap){V.tag=11,V=_h(null,V,Be,G,Ae);break e}else if(Oe===Gd){V.tag=14,V=n0(null,V,Be,G,Ae);break e}}throw V=g(Be)||Be,Error(r(306,V,\"\"))}}return V;case 0:return ku(G,V,V.type,V.pendingProps,Ae);case 1:return Be=V.type,Oe=du(Be,V.pendingProps),rt(G,V,Be,Oe,Ae);case 3:e:{if(ie(V,V.stateNode.containerInfo),G===null)throw Error(r(387));var Je=V.pendingProps;Oe=V.memoizedState,Be=Oe.element,ht(G,V),qe(V,Je,null,Ae);var Tt=V.memoizedState;if(Je=Tt.cache,Qe(V,rc,Je),Je!==Oe.cache\u0026\u0026Te(V,[rc],Ae,!0),Ao(),Je=Tt.element,Eh\u0026\u0026Oe.isDehydrated)if(Oe={element:Je,isDehydrated:!1,cache:Tt.cache},V.updateQueue.baseState=Oe,V.memoizedState=Oe,V.flags\u0026256){V=Ot(G,V,Je,Ae);break e}else if(Je!==Be){Be=W(Error(r(424)),V),ve(Be),V=Ot(G,V,Je,Ae);break e}else for(Eh\u0026\u0026(Za=Qf(V.stateNode.containerInfo),Xa=V,Vs=!0,fu=null,Si=!0),Ae=N4(V,null,Je,Ae),V.child=Ae;Ae;)Ae.flags=Ae.flags\u0026-3|4096,Ae=Ae.sibling;else{if(ye(),Je===Be){V=qr(G,V,Ae);break e}PA(G,V,Je,Ae)}V=V.child}return V;case 26:if(bh)return vp(G,V),G===null?(Ae=Jc(V.type,null,V.pendingProps,null))?V.memoizedState=Ae:Vs||(V.stateNode=Sh(V.type,V.pendingProps,za.current,V)):V.memoizedState=Jc(V.type,G.memoizedProps,V.pendingProps,G.memoizedState),null;case 27:if(ai)return le(V),G===null\u0026\u0026ai\u0026\u0026Vs\u0026\u0026(Be=V.stateNode=v_(V.type,V.pendingProps,za.current,bl.current,!1),Xa=V,Si=!0,Za=d9(V.type,Be,Za)),PA(G,V,V.pendingProps.children,Ae),vp(G,V),G===null\u0026\u0026(V.flags|=4194304),V.child;case 5:return G===null\u0026\u0026Vs\u0026\u0026(vf(V.type,V.pendingProps,bl.current),(Oe=Be=Za)\u0026\u0026(Be=$C(Be,V.type,V.pendingProps,Si),Be!==null?(V.stateNode=Be,Xa=V,Za=o5(Be),Si=!1,Oe=!0):Oe=!1),Oe||_e(V)),le(V),Oe=V.type,Je=V.pendingProps,Tt=G!==null?G.memoizedProps:null,Be=Je.children,Lu(Oe,Je)?Be=null:Tt!==null\u0026\u0026Lu(Oe,Tt)\u0026\u0026(V.flags|=32),V.memoizedState!==null\u0026\u0026(Oe=ei(G,V,yo,null,null,Ae),Ud?b_._currentValue=Oe:b_._currentValue2=Oe),vp(G,V),PA(G,V,Be,Ae),V.child;case 6:return G===null\u0026\u0026Vs\u0026\u0026(YI(V.pendingProps,bl.current),(G=Ae=Za)\u0026\u0026(Ae=L2(Ae,V.pendingProps,Si),Ae!==null?(V.stateNode=Ae,Xa=V,Za=null,G=!0):G=!1),G||_e(V)),null;case 13:return Xn(G,V,Ae);case 4:return ie(V,V.stateNode.containerInfo),Be=V.pendingProps,G===null?V.child=Cu(V,null,Be,Ae):PA(G,V,Be,Ae),V.child;case 11:return _h(G,V,V.type,V.pendingProps,Ae);case 7:return PA(G,V,V.pendingProps,Ae),V.child;case 8:return PA(G,V,V.pendingProps.children,Ae),V.child;case 12:return PA(G,V,V.pendingProps.children,Ae),V.child;case 10:return Be=V.pendingProps,Qe(V,V.type,Be.value),PA(G,V,Be.children,Ae),V.child;case 9:return Oe=V.type._context,Be=V.pendingProps.children,ke(V),Oe=Ce(Oe),Be=Be(Oe),V.flags|=1,PA(G,V,Be,Ae),V.child;case 14:return n0(G,V,V.type,V.pendingProps,Ae);case 15:return HC(G,V,V.type,V.pendingProps,Ae);case 19:return Gs(G,V,Ae);case 31:return Be=V.pendingProps,Ae=V.mode,Be={mode:Be.mode,children:Be.children},G===null?(Ae=vo(Be,Ae),Ae.ref=V.ref,V.child=Ae,Ae.return=V,V=Ae):(Ae=Fp(G.child,Be),Ae.ref=V.ref,V.child=Ae,Ae.return=V,V=Ae),V;case 22:return f1(G,V,Ae);case 24:return ke(V),Be=Ce(rc),G===null?(Oe=It(),Oe===null\u0026\u0026(Oe=gA,Je=tt(),Oe.pooledCache=Je,Je.refCount++,Je!==null\u0026\u0026(Oe.pooledCacheLanes|=Ae),Oe=Je),V.memoizedState={parent:Be,cache:Oe},$n(V),Qe(V,rc,Oe)):((G.lanes\u0026Ae)!==0\u0026\u0026(ht(G,V),qe(V,null,null,Ae),Ao()),Oe=G.memoizedState,Je=V.memoizedState,Oe.parent!==Be?(Oe={parent:Be,cache:Be},V.memoizedState=Oe,V.lanes===0\u0026\u0026(V.memoizedState=V.updateQueue.baseState=Oe),Qe(V,rc,Be)):(Be=Je.cache,Qe(V,rc,Be),Be!==Oe.cache\u0026\u0026Te(V,[rc],Ae,!0))),PA(G,V,V.pendingProps.children,Ae),V.child;case 29:throw V.pendingProps}throw Error(r(156,V.tag))}function ka(G){G.flags|=4}function gn(G,V){if(G!==null\u0026\u0026G.child===V.child)return!1;if((V.flags\u002616)!==0)return!0;for(G=V.child;G!==null;){if((G.flags\u002613878)!==0||(G.subtreeFlags\u002613878)!==0)return!0;G=G.sibling}return!1}function bn(G,V,Ae,Be){if(Ks)for(Ae=V.child;Ae!==null;){if(Ae.tag===5||Ae.tag===6)Va(G,Ae.stateNode);else if(!(Ae.tag===4||ai\u0026\u0026Ae.tag===27)\u0026\u0026Ae.child!==null){Ae.child.return=Ae,Ae=Ae.child;continue}if(Ae===V)break;for(;Ae.sibling===null;){if(Ae.return===null||Ae.return===V)return;Ae=Ae.return}Ae.sibling.return=Ae.return,Ae=Ae.sibling}else if(E_)for(var Oe=V.child;Oe!==null;){if(Oe.tag===5){var Je=Oe.stateNode;Ae\u0026\u0026Be\u0026\u0026(Je=ZE(Je,Oe.type,Oe.memoizedProps)),Va(G,Je)}else if(Oe.tag===6)Je=Oe.stateNode,Ae\u0026\u0026Be\u0026\u0026(Je=NA(Je,Oe.memoizedProps)),Va(G,Je);else if(Oe.tag!==4){if(Oe.tag===22\u0026\u0026Oe.memoizedState!==null)Je=Oe.child,Je!==null\u0026\u0026(Je.return=Oe),bn(G,Oe,!0,!0);else if(Oe.child!==null){Oe.child.return=Oe,Oe=Oe.child;continue}}if(Oe===V)break;for(;Oe.sibling===null;){if(Oe.return===null||Oe.return===V)return;Oe=Oe.return}Oe.sibling.return=Oe.return,Oe=Oe.sibling}}function go(G,V,Ae,Be){var Oe=!1;if(E_)for(var Je=V.child;Je!==null;){if(Je.tag===5){var Tt=Je.stateNode;Ae\u0026\u0026Be\u0026\u0026(Tt=ZE(Tt,Je.type,Je.memoizedProps)),M4(G,Tt)}else if(Je.tag===6)Tt=Je.stateNode,Ae\u0026\u0026Be\u0026\u0026(Tt=NA(Tt,Je.memoizedProps)),M4(G,Tt);else if(Je.tag!==4){if(Je.tag===22\u0026\u0026Je.memoizedState!==null)Oe=Je.child,Oe!==null\u0026\u0026(Oe.return=Je),go(G,Je,!0,!0),Oe=!0;else if(Je.child!==null){Je.child.return=Je,Je=Je.child;continue}}if(Je===V)break;for(;Je.sibling===null;){if(Je.return===null||Je.return===V)return Oe;Je=Je.return}Je.sibling.return=Je.return,Je=Je.sibling}return Oe}function Go(G,V){if(E_\u0026\u0026gn(G,V)){G=V.stateNode;var Ae=G.containerInfo,Be=S_();go(Be,V,!1,!1),G.pendingChildren=Be,ka(V),jC(Ae,Be)}}function hr(G,V,Ae,Be){if(Ks)G.memoizedProps!==Be\u0026\u0026ka(V);else if(E_){var Oe=G.stateNode,Je=G.memoizedProps;if((G=gn(G,V))||Je!==Be){var Tt=bl.current;Je=kc(Oe,Ae,Je,Be,!G,null),Je===Oe?V.stateNode=Oe:(LI(Je,Ae,Be,Tt)\u0026\u0026ka(V),V.stateNode=Je,G?bn(Je,V,!1,!1):ka(V))}else V.stateNode=Oe}}function ia(G,V,Ae){if(r0(V,Ae)){if(G.flags|=16777216,!P2(V,Ae))if(PI())G.flags|=8192;else throw yg=Iu,M1}else G.flags\u0026=-16777217}function lA(G,V){if(w1(V)){if(G.flags|=16777216,!a0(V))if(PI())G.flags|=8192;else throw yg=Iu,M1}else G.flags\u0026=-16777217}function MA(G,V){V!==null\u0026\u0026(G.flags|=4),G.flags\u002616384\u0026\u0026(V=G.tag!==22?x():536870912,G.lanes|=V,Jp|=V)}function Fa(G,V){if(!Vs)switch(G.tailMode){case\"hidden\":V=G.tail;for(var Ae=null;V!==null;)V.alternate!==null\u0026\u0026(Ae=V),V=V.sibling;Ae===null?G.tail=null:Ae.sibling=null;break;case\"collapsed\":Ae=G.tail;for(var Be=null;Ae!==null;)Ae.alternate!==null\u0026\u0026(Be=Ae),Ae=Ae.sibling;Be===null?V||G.tail===null?G.tail=null:G.tail.sibling=null:Be.sibling=null}}function La(G){var V=G.alternate!==null\u0026\u0026G.alternate.child===G.child,Ae=0,Be=0;if(V)for(var Oe=G.child;Oe!==null;)Ae|=Oe.lanes|Oe.childLanes,Be|=Oe.subtreeFlags\u002665011712,Be|=Oe.flags\u002665011712,Oe.return=G,Oe=Oe.sibling;else for(Oe=G.child;Oe!==null;)Ae|=Oe.lanes|Oe.childLanes,Be|=Oe.subtreeFlags,Be|=Oe.flags,Oe.return=G,Oe=Oe.sibling;return G.subtreeFlags|=Be,G.childLanes=Ae,V}function Y0(G,V,Ae){var Be=V.pendingProps;switch(oe(V),V.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return La(V),null;case 1:return La(V),null;case 3:return Ae=V.stateNode,Be=null,G!==null\u0026\u0026(Be=G.memoizedState.cache),V.memoizedState.cache!==Be\u0026\u0026(V.flags|=2048),Pe(rc),ne(),Ae.pendingContext\u0026\u0026(Ae.context=Ae.pendingContext,Ae.pendingContext=null),(G===null||G.child===null)\u0026\u0026(pe(V)?ka(V):G===null||G.memoizedState.isDehydrated\u0026\u0026(V.flags\u0026256)===0||(V.flags|=1024,Me())),Go(G,V),La(V),null;case 26:if(bh){Ae=V.type;var Oe=V.memoizedState;return G===null?(ka(V),Oe!==null?(La(V),lA(V,Oe)):(La(V),ia(V,Ae,Be))):Oe?Oe!==G.memoizedState?(ka(V),La(V),lA(V,Oe)):(La(V),V.flags\u0026=-16777217):(Ks?G.memoizedProps!==Be\u0026\u0026ka(V):hr(G,V,Ae,Be),La(V),ia(V,Ae,Be)),null}case 27:if(ai){if(ge(V),Ae=za.current,Oe=V.type,G!==null\u0026\u0026V.stateNode!=null)Ks?G.memoizedProps!==Be\u0026\u0026ka(V):hr(G,V,Oe,Be);else{if(!Be){if(V.stateNode===null)throw Error(r(166));return La(V),null}G=bl.current,pe(V)?ue(V,G):(G=v_(Oe,Be,Ae,G,!0),V.stateNode=G,ka(V))}return La(V),null}case 5:if(ge(V),Ae=V.type,G!==null\u0026\u0026V.stateNode!=null)hr(G,V,Ae,Be);else{if(!Be){if(V.stateNode===null)throw Error(r(166));return La(V),null}G=bl.current,pe(V)?ue(V,G):(Oe=ic(Ae,Be,za.current,G,V),bn(Oe,V,!1,!1),V.stateNode=Oe,LI(Oe,Ae,Be,G)\u0026\u0026ka(V))}return La(V),ia(V,V.type,V.pendingProps),null;case 6:if(G\u0026\u0026V.stateNode!=null)Ae=G.memoizedProps,Ks?Ae!==Be\u0026\u0026ka(V):E_\u0026\u0026(Ae!==Be?(V.stateNode=Jg(Be,za.current,bl.current,V),ka(V)):V.stateNode=G.stateNode);else{if(typeof Be!=\"string\"\u0026\u0026V.stateNode===null)throw Error(r(166));if(G=za.current,Ae=bl.current,pe(V)){if(!Eh)throw Error(r(176));if(G=V.stateNode,Ae=V.memoizedProps,Be=null,Oe=Xa,Oe!==null)switch(Oe.tag){case 27:case 5:Be=Oe.memoizedProps}wm(G,Ae,V,Be)||_e(V)}else V.stateNode=Jg(Be,G,Ae,V)}return La(V),null;case 13:if(Be=V.memoizedState,G===null||G.memoizedState!==null\u0026\u0026G.memoizedState.dehydrated!==null){if(Oe=pe(V),Be!==null\u0026\u0026Be.dehydrated!==null){if(G===null){if(!Oe)throw Error(r(318));if(!Eh)throw Error(r(344));if(Oe=V.memoizedState,Oe=Oe!==null?Oe.dehydrated:null,!Oe)throw Error(r(317));i5(Oe,V)}else ye(),(V.flags\u0026128)===0\u0026\u0026(V.memoizedState=null),V.flags|=4;La(V),Oe=!1}else Oe=Me(),G!==null\u0026\u0026G.memoizedState!==null\u0026\u0026(G.memoizedState.hydrationErrors=Oe),Oe=!0;if(!Oe)return V.flags\u0026256?(Zh(V),V):(Zh(V),null)}if(Zh(V),(V.flags\u0026128)!==0)return V.lanes=Ae,V;if(Ae=Be!==null,G=G!==null\u0026\u0026G.memoizedState!==null,Ae){Be=V.child,Oe=null,Be.alternate!==null\u0026\u0026Be.alternate.memoizedState!==null\u0026\u0026Be.alternate.memoizedState.cachePool!==null\u0026\u0026(Oe=Be.alternate.memoizedState.cachePool.pool);var Je=null;Be.memoizedState!==null\u0026\u0026Be.memoizedState.cachePool!==null\u0026\u0026(Je=Be.memoizedState.cachePool.pool),Je!==Oe\u0026\u0026(Be.flags|=2048)}return Ae!==G\u0026\u0026Ae\u0026\u0026(V.child.flags|=8192),MA(V,V.updateQueue),La(V),null;case 4:return ne(),Go(G,V),G===null\u0026\u0026w4(V.stateNode.containerInfo),La(V),null;case 10:return Pe(V.type),La(V),null;case 19:if(d(xs),Oe=V.memoizedState,Oe===null)return La(V),null;if(Be=(V.flags\u0026128)!==0,Je=Oe.rendering,Je===null)if(Be)Fa(Oe,!1);else{if(hl!==0||G!==null\u0026\u0026(G.flags\u0026128)!==0)for(G=V.child;G!==null;){if(Je=mf(G),Je!==null){for(V.flags|=128,Fa(Oe,!1),G=Je.updateQueue,V.updateQueue=G,MA(V,G),V.subtreeFlags=0,G=Ae,Ae=V.child;Ae!==null;)qs(Ae,G),Ae=Ae.sibling;return p(xs,xs.current\u00261|2),V.child}G=G.sibling}Oe.tail!==null\u0026\u0026cs()\u003ex3\u0026\u0026(V.flags|=128,Be=!0,Fa(Oe,!1),V.lanes=4194304)}else{if(!Be)if(G=mf(Je),G!==null){if(V.flags|=128,Be=!0,G=G.updateQueue,V.updateQueue=G,MA(V,G),Fa(Oe,!0),Oe.tail===null\u0026\u0026Oe.tailMode===\"hidden\"\u0026\u0026!Je.alternate\u0026\u0026!Vs)return La(V),null}else 2*cs()-Oe.renderingStartTime\u003ex3\u0026\u0026Ae!==536870912\u0026\u0026(V.flags|=128,Be=!0,Fa(Oe,!1),V.lanes=4194304);Oe.isBackwards?(Je.sibling=V.child,V.child=Je):(G=Oe.last,G!==null?G.sibling=Je:V.child=Je,Oe.last=Je)}return Oe.tail!==null?(V=Oe.tail,Oe.rendering=V,Oe.tail=V.sibling,Oe.renderingStartTime=cs(),V.sibling=null,G=xs.current,p(xs,Be?G\u00261|2:G\u00261),V):(La(V),null);case 22:case 23:return Zh(V),zn(),Be=V.memoizedState!==null,G!==null?G.memoizedState!==null!==Be\u0026\u0026(V.flags|=8192):Be\u0026\u0026(V.flags|=8192),Be?(Ae\u0026536870912)!==0\u0026\u0026(V.flags\u0026128)===0\u0026\u0026(La(V),V.subtreeFlags\u00266\u0026\u0026(V.flags|=8192)):La(V),Ae=V.updateQueue,Ae!==null\u0026\u0026MA(V,Ae.retryQueue),Ae=null,G!==null\u0026\u0026G.memoizedState!==null\u0026\u0026G.memoizedState.cachePool!==null\u0026\u0026(Ae=G.memoizedState.cachePool.pool),Be=null,V.memoizedState!==null\u0026\u0026V.memoizedState.cachePool!==null\u0026\u0026(Be=V.memoizedState.cachePool.pool),Be!==Ae\u0026\u0026(V.flags|=2048),G!==null\u0026\u0026d(Yi),null;case 24:return Ae=null,G!==null\u0026\u0026(Ae=G.memoizedState.cache),V.memoizedState.cache!==Ae\u0026\u0026(V.flags|=2048),Pe(rc),La(V),null;case 25:return null;case 30:return null}throw Error(r(156,V.tag))}function Hr(G,V){switch(oe(V),V.tag){case 1:return G=V.flags,G\u002665536?(V.flags=G\u0026-65537|128,V):null;case 3:return Pe(rc),ne(),G=V.flags,(G\u002665536)!==0\u0026\u0026(G\u0026128)===0?(V.flags=G\u0026-65537|128,V):null;case 26:case 27:case 5:return ge(V),null;case 13:if(Zh(V),G=V.memoizedState,G!==null\u0026\u0026G.dehydrated!==null){if(V.alternate===null)throw Error(r(340));ye()}return G=V.flags,G\u002665536?(V.flags=G\u0026-65537|128,V):null;case 19:return d(xs),null;case 4:return ne(),null;case 10:return Pe(V.type),null;case 22:case 23:return Zh(V),zn(),G!==null\u0026\u0026d(Yi),G=V.flags,G\u002665536?(V.flags=G\u0026-65537|128,V):null;case 24:return Pe(rc),null;case 25:return null;default:return null}}function fh(G,V){switch(oe(V),V.tag){case 3:Pe(rc),ne();break;case 26:case 27:case 5:ge(V);break;case 4:ne();break;case 13:Zh(V);break;case 19:d(xs);break;case 10:Pe(V.type);break;case 22:case 23:Zh(V),zn(),G!==null\u0026\u0026d(Yi);break;case 24:Pe(rc)}}function Ih(G,V){try{var Ae=V.updateQueue,Be=Ae!==null?Ae.lastEffect:null;if(Be!==null){var Oe=Be.next;Ae=Oe;do{if((Ae.tag\u0026G)===G){Be=void 0;var Je=Ae.create,Tt=Ae.inst;Be=Je(),Tt.destroy=Be}Ae=Ae.next}while(Ae!==Oe)}}catch(ln){$s(V,V.return,ln)}}function DA(G,V,Ae){try{var Be=V.updateQueue,Oe=Be!==null?Be.lastEffect:null;if(Oe!==null){var Je=Oe.next;Be=Je;do{if((Be.tag\u0026G)===G){var Tt=Be.inst,ln=Tt.destroy;if(ln!==void 0){Tt.destroy=void 0,Oe=V;var wn=Ae,$o=ln;try{$o()}catch(Ai){$s(Oe,wn,Ai)}}}Be=Be.next}while(Be!==Je)}}catch(Ai){$s(V,V.return,Ai)}}function OC(G){var V=G.updateQueue;if(V!==null){var Ae=G.stateNode;try{qt(V,Ae)}catch(Be){$s(G,G.return,Be)}}}function bI(G,V,Ae){Ae.props=du(G.type,G.memoizedProps),Ae.state=G.memoizedState;try{Ae.componentWillUnmount()}catch(Be){$s(G,V,Be)}}function hu(G,V){try{var Ae=G.ref;if(Ae!==null){switch(G.tag){case 26:case 27:case 5:var Be=CA(G.stateNode);break;case 30:Be=G.stateNode;break;default:Be=G.stateNode}typeof Ae==\"function\"?G.refCleanup=Ae(Be):Ae.current=Be}}catch(Oe){$s(G,V,Oe)}}function lg(G,V){var Ae=G.ref,Be=G.refCleanup;if(Ae!==null)if(typeof Be==\"function\")try{Be()}catch(Oe){$s(G,V,Oe)}finally{G.refCleanup=null,G=G.alternate,G!=null\u0026\u0026(G.refCleanup=null)}else if(typeof Ae==\"function\")try{Ae(null)}catch(Oe){$s(G,V,Oe)}else Ae.current=null}function wp(G){var V=G.type,Ae=G.memoizedProps,Be=G.stateNode;try{p3(Be,V,Ae,G)}catch(Oe){$s(G,G.return,Oe)}}function kd(G,V,Ae){try{l9(G.stateNode,G.type,Ae,V,G)}catch(Be){$s(G,G.return,Be)}}function ff(G){return G.tag===5||G.tag===3||(bh?G.tag===26:!1)||(ai?G.tag===27\u0026\u0026Gp(G.type):!1)||G.tag===4}function I1(G){e:for(;;){for(;G.sibling===null;){if(G.return===null||ff(G.return))return null;G=G.return}for(G.sibling.return=G.return,G=G.sibling;G.tag!==5\u0026\u0026G.tag!==6\u0026\u0026G.tag!==18;){if(ai\u0026\u0026G.tag===27\u0026\u0026Gp(G.type)||G.flags\u00262||G.child===null||G.tag===4)continue e;G.child.return=G,G=G.child}if(!(G.flags\u00262))return G.stateNode}}function p2(G,V,Ae){var Be=G.tag;if(Be===5||Be===6)G=G.stateNode,V?P4(Ae,G,V):R2(Ae,G);else if(Be!==4\u0026\u0026(ai\u0026\u0026Be===27\u0026\u0026Gp(G.type)\u0026\u0026(Ae=G.stateNode,V=null),G=G.child,G!==null))for(p2(G,V,Ae),G=G.sibling;G!==null;)p2(G,V,Ae),G=G.sibling}function Pp(G,V,Ae){var Be=G.tag;if(Be===5||Be===6)G=G.stateNode,V?qE(Ae,G,V):$E(Ae,G);else if(Be!==4\u0026\u0026(ai\u0026\u0026Be===27\u0026\u0026Gp(G.type)\u0026\u0026(Ae=G.stateNode),G=G.child,G!==null))for(Pp(G,V,Ae),G=G.sibling;G!==null;)Pp(G,V,Ae),G=G.sibling}function SI(G,V,Ae){G=G.containerInfo;try{vm(G,Ae)}catch(Be){$s(V,V.return,Be)}}function Mp(G){var V=G.stateNode,Ae=G.memoizedProps;try{Al(G.type,Ae,V,G)}catch(Be){$s(G,G.return,Be)}}function f_(G,V){for(bm(G.containerInfo),Pa=V;Pa!==null;)if(G=Pa,V=G.child,(G.subtreeFlags\u00261024)!==0\u0026\u0026V!==null)V.return=G,Pa=V;else for(;Pa!==null;){G=Pa;var Ae=G.alternate;switch(V=G.flags,G.tag){case 0:break;case 11:case 15:break;case 1:if((V\u00261024)!==0\u0026\u0026Ae!==null){V=void 0;var Be=G,Oe=Ae.memoizedProps;Ae=Ae.memoizedState;var Je=Be.stateNode;try{var Tt=du(Be.type,Oe,Be.elementType===Be.type);V=Je.getSnapshotBeforeUpdate(Tt,Ae),Je.__reactInternalSnapshotBeforeUpdate=V}catch(ln){$s(Be,Be.return,ln)}}break;case 3:(V\u00261024)!==0\u0026\u0026Ks\u0026\u0026HI(G.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((V\u00261024)!==0)throw Error(r(163))}if(V=G.sibling,V!==null){V.return=G.return,Pa=V;break}Pa=G.return}}function U0(G,V,Ae){var Be=Ae.flags;switch(Ae.tag){case 0:case 11:case 15:Im(G,Ae),Be\u00264\u0026\u0026Ih(5,Ae);break;case 1:if(Im(G,Ae),Be\u00264)if(G=Ae.stateNode,V===null)try{G.componentDidMount()}catch(Tt){$s(Ae,Ae.return,Tt)}else{var Oe=du(Ae.type,V.memoizedProps);V=V.memoizedState;try{G.componentDidUpdate(Oe,V,G.__reactInternalSnapshotBeforeUpdate)}catch(Tt){$s(Ae,Ae.return,Tt)}}Be\u002664\u0026\u0026OC(Ae),Be\u0026512\u0026\u0026hu(Ae,Ae.return);break;case 3:if(Im(G,Ae),Be\u002664\u0026\u0026(G=Ae.updateQueue,G!==null)){if(V=null,Ae.child!==null)switch(Ae.child.tag){case 27:case 5:V=CA(Ae.child.stateNode);break;case 1:V=Ae.child.stateNode}try{qt(G,V)}catch(Tt){$s(Ae,Ae.return,Tt)}}break;case 27:ai\u0026\u0026V===null\u0026\u0026Be\u00264\u0026\u0026Mp(Ae);case 26:case 5:Im(G,Ae),V===null\u0026\u0026Be\u00264\u0026\u0026wp(Ae),Be\u0026512\u0026\u0026hu(Ae,Ae.return);break;case 12:Im(G,Ae);break;case 13:Im(G,Ae),Be\u00264\u0026\u0026A3(G,Ae),Be\u002664\u0026\u0026(G=Ae.memoizedState,G!==null\u0026\u0026(G=G.dehydrated,G!==null\u0026\u0026(Ae=dg.bind(null,Ae),e5(G,Ae))));break;case 22:if(Be=Ae.memoizedState!==null||qg,!Be){V=V!==null\u0026\u0026V.memoizedState!==null||gl,Oe=qg;var Je=gl;qg=Be,(gl=V)\u0026\u0026!Je?K0(G,Ae,(Ae.subtreeFlags\u00268772)!==0):Im(G,Ae),qg=Oe,gl=Je}break;case 30:break;default:Im(G,Ae)}}function S4(G){var V=G.alternate;V!==null\u0026\u0026(G.alternate=null,S4(V)),G.child=null,G.deletions=null,G.sibling=null,G.tag===5\u0026\u0026(V=G.stateNode,V!==null\u0026\u0026Wg(V)),G.stateNode=null,G.return=null,G.dependencies=null,G.memoizedProps=null,G.memoizedState=null,G.pendingProps=null,G.stateNode=null,G.updateQueue=null}function ep(G,V,Ae){for(Ae=Ae.child;Ae!==null;)If(G,V,Ae),Ae=Ae.sibling}function If(G,V,Ae){if(Ig\u0026\u0026typeof Ig.onCommitFiberUnmount==\"function\")try{Ig.onCommitFiberUnmount(_u,Ae)}catch{}switch(Ae.tag){case 26:if(bh){gl||lg(Ae,V),ep(G,V,Ae),Ae.memoizedState?Gi(Ae.memoizedState):Ae.stateNode\u0026\u0026Op(Ae.stateNode);break}case 27:if(ai){gl||lg(Ae,V);var Be=qc,Oe=Yu;Gp(Ae.type)\u0026\u0026(qc=Ae.stateNode,Yu=!1),ep(G,V,Ae),P1(Ae.stateNode),qc=Be,Yu=Oe;break}case 5:gl||lg(Ae,V);case 6:if(Ks){if(Be=qc,Oe=Yu,qc=null,ep(G,V,Ae),qc=Be,Yu=Oe,qc!==null)if(Yu)try{XE(qc,Ae.stateNode)}catch(Je){$s(Ae,V,Je)}else try{bf(qc,Ae.stateNode)}catch(Je){$s(Ae,V,Je)}}else ep(G,V,Ae);break;case 18:Ks\u0026\u0026qc!==null\u0026\u0026(Yu?H2(qc,Ae.stateNode):Bh(qc,Ae.stateNode));break;case 4:Ks?(Be=qc,Oe=Yu,qc=Ae.stateNode.containerInfo,Yu=!0,ep(G,V,Ae),qc=Be,Yu=Oe):(E_\u0026\u0026SI(Ae.stateNode,Ae,S_()),ep(G,V,Ae));break;case 0:case 11:case 14:case 15:gl||DA(2,Ae,V),gl||DA(4,Ae,V),ep(G,V,Ae);break;case 1:gl||(lg(Ae,V),Be=Ae.stateNode,typeof Be.componentWillUnmount==\"function\"\u0026\u0026bI(Ae,V,Be)),ep(G,V,Ae);break;case 21:ep(G,V,Ae);break;case 22:gl=(Be=gl)||Ae.memoizedState!==null,ep(G,V,Ae),gl=Be;break;default:ep(G,V,Ae)}}function A3(G,V){if(Eh\u0026\u0026V.memoizedState===null\u0026\u0026(G=V.alternate,G!==null\u0026\u0026(G=G.memoizedState,G!==null\u0026\u0026(G=G.dehydrated,G!==null))))try{D4(G)}catch(Ae){$s(V,V.return,Ae)}}function m2(G){switch(G.tag){case 13:case 19:var V=G.stateNode;return V===null\u0026\u0026(V=G.stateNode=new Tf),V;case 22:return G=G.stateNode,V=G._retryCache,V===null\u0026\u0026(V=G._retryCache=new Tf),V;default:throw Error(r(435,G.tag))}}function KE(G,V){var Ae=m2(G);V.forEach(function(Be){var Oe=x2.bind(null,G,Be);Ae.has(Be)||(Ae.add(Be),Be.then(Oe,Oe))})}function Fd(G,V){var Ae=V.deletions;if(Ae!==null)for(var Be=0;Be\u003cAe.length;Be++){var Oe=Ae[Be],Je=G,Tt=V;if(Ks){var ln=Tt;e:for(;ln!==null;){switch(ln.tag){case 27:if(ai){if(Gp(ln.type)){qc=ln.stateNode,Yu=!1;break e}break}case 5:qc=ln.stateNode,Yu=!1;break e;case 3:case 4:qc=ln.stateNode.containerInfo,Yu=!0;break e}ln=ln.return}if(qc===null)throw Error(r(160));If(Je,Tt,Oe),qc=null,Yu=!1}else If(Je,Tt,Oe);Je=Oe.alternate,Je!==null\u0026\u0026(Je.return=null),Oe.return=null}if(V.subtreeFlags\u002613878)for(V=V.child;V!==null;)_2(V,G),V=V.sibling}function _2(G,V){var Ae=G.alternate,Be=G.flags;switch(G.tag){case 0:case 11:case 14:case 15:Fd(V,G),o0(G),Be\u00264\u0026\u0026(DA(3,G,G.return),Ih(3,G),DA(5,G,G.return));break;case 1:Fd(V,G),o0(G),Be\u0026512\u0026\u0026(gl||Ae===null||lg(Ae,Ae.return)),Be\u002664\u0026\u0026qg\u0026\u0026(G=G.updateQueue,G!==null\u0026\u0026(Be=G.callbacks,Be!==null\u0026\u0026(Ae=G.shared.hiddenCallbacks,G.shared.hiddenCallbacks=Ae===null?Be:Ae.concat(Be))));break;case 26:if(bh){var Oe=xc;if(Fd(V,G),o0(G),Be\u0026512\u0026\u0026(gl||Ae===null||lg(Ae,Ae.return)),Be\u00264){Be=Ae!==null?Ae.memoizedState:null;var Je=G.memoizedState;Ae===null?Je===null?G.stateNode===null?G.stateNode=pg(Oe,G.type,G.memoizedProps,G):Pm(Oe,G.type,G.stateNode):G.stateNode=r5(Oe,Je,G.memoizedProps):Be!==Je?(Be===null?Ae.stateNode!==null\u0026\u0026Op(Ae.stateNode):Gi(Be),Je===null?Pm(Oe,G.type,G.stateNode):r5(Oe,Je,G.memoizedProps)):Je===null\u0026\u0026G.stateNode!==null\u0026\u0026kd(G,G.memoizedProps,Ae.memoizedProps)}break}case 27:if(ai){Fd(V,G),o0(G),Be\u0026512\u0026\u0026(gl||Ae===null||lg(Ae,Ae.return)),Ae!==null\u0026\u0026Be\u00264\u0026\u0026kd(G,G.memoizedProps,Ae.memoizedProps);break}case 5:if(Fd(V,G),o0(G),Be\u0026512\u0026\u0026(gl||Ae===null||lg(Ae,Ae.return)),Ks){if(G.flags\u002632){Oe=G.stateNode;try{T2(Oe)}catch(Ai){$s(G,G.return,Ai)}}Be\u00264\u0026\u0026G.stateNode!=null\u0026\u0026(Oe=G.memoizedProps,kd(G,Oe,Ae!==null?Ae.memoizedProps:Oe)),Be\u00261024\u0026\u0026(y3=!0)}break;case 6:if(Fd(V,G),o0(G),Be\u00264\u0026\u0026Ks){if(G.stateNode===null)throw Error(r(162));Be=G.memoizedProps,Ae=Ae!==null?Ae.memoizedProps:Be,Oe=G.stateNode;try{h3(Oe,Ae,Be)}catch(Ai){$s(G,G.return,Ai)}}break;case 3:if(bh?(Ys(),Oe=xc,xc=cp(V.containerInfo),Fd(V,G),xc=Oe):Fd(V,G),o0(G),Be\u00264){if(Ks\u0026\u0026Eh\u0026\u0026Ae!==null\u0026\u0026Ae.memoizedState.isDehydrated)try{v1(V.containerInfo)}catch(Ai){$s(G,G.return,Ai)}if(E_){Be=V.containerInfo,Ae=V.pendingChildren;try{vm(Be,Ae)}catch(Ai){$s(G,G.return,Ai)}}}y3\u0026\u0026(y3=!1,tp(G));break;case 4:bh?(Ae=xc,xc=cp(G.stateNode.containerInfo),Fd(V,G),o0(G),xc=Ae):(Fd(V,G),o0(G)),Be\u00264\u0026\u0026E_\u0026\u0026SI(G.stateNode,G,G.stateNode.pendingChildren);break;case 12:Fd(V,G),o0(G);break;case 13:Fd(V,G),o0(G),G.child.flags\u00268192\u0026\u0026G.memoizedState!==null!=(Ae!==null\u0026\u0026Ae.memoizedState!==null)\u0026\u0026(ny=cs()),Be\u00264\u0026\u0026(Be=G.updateQueue,Be!==null\u0026\u0026(G.updateQueue=null,KE(G,Be)));break;case 22:Oe=G.memoizedState!==null;var Tt=Ae!==null\u0026\u0026Ae.memoizedState!==null,ln=qg,wn=gl;if(qg=ln||Oe,gl=wn||Tt,Fd(V,G),gl=wn,qg=ln,o0(G),Be\u00268192\u0026\u0026(V=G.stateNode,V._visibility=Oe?V._visibility\u0026-2:V._visibility|1,Oe\u0026\u0026(Ae===null||Tt||qg||gl||pu(G)),Ks)){e:if(Ae=null,Ks)for(V=G;;){if(V.tag===5||bh\u0026\u0026V.tag===26){if(Ae===null){Tt=Ae=V;try{Je=Tt.stateNode,Oe?k2(Je):F2(Tt.stateNode,Tt.memoizedProps)}catch(Ai){$s(Tt,Tt.return,Ai)}}}else if(V.tag===6){if(Ae===null){Tt=V;try{var $o=Tt.stateNode;Oe?Ap($o):m3($o,Tt.memoizedProps)}catch(Ai){$s(Tt,Tt.return,Ai)}}}else if((V.tag!==22\u0026\u0026V.tag!==23||V.memoizedState===null||V===G)\u0026\u0026V.child!==null){V.child.return=V,V=V.child;continue}if(V===G)break e;for(;V.sibling===null;){if(V.return===null||V.return===G)break e;Ae===V\u0026\u0026(Ae=null),V=V.return}Ae===V\u0026\u0026(Ae=null),V.sibling.return=V.return,V=V.sibling}}Be\u00264\u0026\u0026(Be=G.updateQueue,Be!==null\u0026\u0026(Ae=Be.retryQueue,Ae!==null\u0026\u0026(Be.retryQueue=null,KE(G,Ae))));break;case 19:Fd(V,G),o0(G),Be\u00264\u0026\u0026(Be=G.updateQueue,Be!==null\u0026\u0026(G.updateQueue=null,KE(G,Be)));break;case 30:break;case 21:break;default:Fd(V,G),o0(G)}}function o0(G){var V=G.flags;if(V\u00262){try{if(Ks){for(var Ae,Be=G.return;Be!==null;){if(ff(Be)){Ae=Be;break}Be=Be.return}if(Ae==null)throw Error(r(160));switch(Ae.tag){case 27:if(ai){var Oe=Ae.stateNode,Je=I1(G);Pp(G,Je,Oe);break}case 5:var Tt=Ae.stateNode;Ae.flags\u002632\u0026\u0026(T2(Tt),Ae.flags\u0026=-33);var ln=I1(G);Pp(G,ln,Tt);break;case 3:case 4:var wn=Ae.stateNode.containerInfo,$o=I1(G);p2(G,$o,wn);break;default:throw Error(r(161))}}}catch(Ai){$s(G,G.return,Ai)}G.flags\u0026=-3}V\u00264096\u0026\u0026(G.flags\u0026=-4097)}function tp(G){if(G.subtreeFlags\u00261024)for(G=G.child;G!==null;){var V=G;tp(V),V.tag===5\u0026\u0026V.flags\u00261024\u0026\u0026s0(V.stateNode),G=G.sibling}}function Im(G,V){if(V.subtreeFlags\u00268772)for(V=V.child;V!==null;)U0(G,V.alternate,V),V=V.sibling}function pu(G){for(G=G.child;G!==null;){var V=G;switch(V.tag){case 0:case 11:case 14:case 15:DA(4,V,V.return),pu(V);break;case 1:lg(V,V.return);var Ae=V.stateNode;typeof Ae.componentWillUnmount==\"function\"\u0026\u0026bI(V,V.return,Ae),pu(V);break;case 27:ai\u0026\u0026P1(V.stateNode);case 26:case 5:lg(V,V.return),pu(V);break;case 22:V.memoizedState===null\u0026\u0026pu(V);break;case 30:pu(V);break;default:pu(V)}G=G.sibling}}function K0(G,V,Ae){for(Ae=Ae\u0026\u0026(V.subtreeFlags\u00268772)!==0,V=V.child;V!==null;){var Be=V.alternate,Oe=G,Je=V,Tt=Je.flags;switch(Je.tag){case 0:case 11:case 15:K0(Oe,Je,Ae),Ih(4,Je);break;case 1:if(K0(Oe,Je,Ae),Be=Je,Oe=Be.stateNode,typeof Oe.componentDidMount==\"function\")try{Oe.componentDidMount()}catch($o){$s(Be,Be.return,$o)}if(Be=Je,Oe=Be.updateQueue,Oe!==null){var ln=Be.stateNode;try{var wn=Oe.shared.hiddenCallbacks;if(wn!==null)for(Oe.shared.hiddenCallbacks=null,Oe=0;Oe\u003cwn.length;Oe++)vt(wn[Oe],ln)}catch($o){$s(Be,Be.return,$o)}}Ae\u0026\u0026Tt\u002664\u0026\u0026OC(Je),hu(Je,Je.return);break;case 27:ai\u0026\u0026Mp(Je);case 26:case 5:K0(Oe,Je,Ae),Ae\u0026\u0026Be===null\u0026\u0026Tt\u00264\u0026\u0026wp(Je),hu(Je,Je.return);break;case 12:K0(Oe,Je,Ae);break;case 13:K0(Oe,Je,Ae),Ae\u0026\u0026Tt\u00264\u0026\u0026A3(Oe,Je);break;case 22:Je.memoizedState===null\u0026\u0026K0(Oe,Je,Ae),hu(Je,Je.return);break;case 30:break;default:K0(Oe,Je,Ae)}V=V.sibling}}function zc(G,V){var Ae=null;G!==null\u0026\u0026G.memoizedState!==null\u0026\u0026G.memoizedState.cachePool!==null\u0026\u0026(Ae=G.memoizedState.cachePool.pool),G=null,V.memoizedState!==null\u0026\u0026V.memoizedState.cachePool!==null\u0026\u0026(G=V.memoizedState.cachePool.pool),G!==Ae\u0026\u0026(G!=null\u0026\u0026G.refCount++,Ae!=null\u0026\u0026At(Ae))}function np(G,V){G=null,V.alternate!==null\u0026\u0026(G=V.alternate.memoizedState.cache),V=V.memoizedState.cache,V!==G\u0026\u0026(V.refCount++,G!=null\u0026\u0026At(G))}function y0(G,V,Ae,Be){if(V.subtreeFlags\u002610256)for(V=V.child;V!==null;)Cm(G,V,Ae,Be),V=V.sibling}function Cm(G,V,Ae,Be){var Oe=V.flags;switch(V.tag){case 0:case 11:case 15:y0(G,V,Ae,Be),Oe\u00262048\u0026\u0026Ih(9,V);break;case 1:y0(G,V,Ae,Be);break;case 3:y0(G,V,Ae,Be),Oe\u00262048\u0026\u0026(G=null,V.alternate!==null\u0026\u0026(G=V.alternate.memoizedState.cache),V=V.memoizedState.cache,V!==G\u0026\u0026(V.refCount++,G!=null\u0026\u0026At(G)));break;case 12:if(Oe\u00262048){y0(G,V,Ae,Be),G=V.stateNode;try{var Je=V.memoizedProps,Tt=Je.id,ln=Je.onPostCommit;typeof ln==\"function\"\u0026\u0026ln(Tt,V.alternate===null?\"mount\":\"update\",G.passiveEffectDuration,-0)}catch(wn){$s(V,V.return,wn)}}else y0(G,V,Ae,Be);break;case 13:y0(G,V,Ae,Be);break;case 23:break;case 22:Je=V.stateNode,Tt=V.alternate,V.memoizedState!==null?Je._visibility\u00262?y0(G,V,Ae,Be):Kg(G,V):Je._visibility\u00262?y0(G,V,Ae,Be):(Je._visibility|=2,Dp(G,V,Ae,Be,(V.subtreeFlags\u002610256)!==0)),Oe\u00262048\u0026\u0026zc(Tt,V);break;case 24:y0(G,V,Ae,Be),Oe\u00262048\u0026\u0026np(V.alternate,V);break;default:y0(G,V,Ae,Be)}}function Dp(G,V,Ae,Be,Oe){for(Oe=Oe\u0026\u0026(V.subtreeFlags\u002610256)!==0,V=V.child;V!==null;){var Je=G,Tt=V,ln=Ae,wn=Be,$o=Tt.flags;switch(Tt.tag){case 0:case 11:case 15:Dp(Je,Tt,ln,wn,Oe),Ih(8,Tt);break;case 23:break;case 22:var Ai=Tt.stateNode;Tt.memoizedState!==null?Ai._visibility\u00262?Dp(Je,Tt,ln,wn,Oe):Kg(Je,Tt):(Ai._visibility|=2,Dp(Je,Tt,ln,wn,Oe)),Oe\u0026\u0026$o\u00262048\u0026\u0026zc(Tt.alternate,Tt);break;case 24:Dp(Je,Tt,ln,wn,Oe),Oe\u0026\u0026$o\u00262048\u0026\u0026np(Tt.alternate,Tt);break;default:Dp(Je,Tt,ln,wn,Oe)}V=V.sibling}}function Kg(G,V){if(V.subtreeFlags\u002610256)for(V=V.child;V!==null;){var Ae=G,Be=V,Oe=Be.flags;switch(Be.tag){case 22:Kg(Ae,Be),Oe\u00262048\u0026\u0026zc(Be.alternate,Be);break;case 24:Kg(Ae,Be),Oe\u00262048\u0026\u0026np(Be.alternate,Be);break;default:Kg(Ae,Be)}V=V.sibling}}function Ld(G){if(G.subtreeFlags\u0026xg)for(G=G.child;G!==null;)f2(G),G=G.sibling}function f2(G){switch(G.tag){case 26:Ld(G),G.flags\u0026xg\u0026\u0026(G.memoizedState!==null?al(xc,G.memoizedState,G.memoizedProps):W0(G.type,G.memoizedProps));break;case 5:Ld(G),G.flags\u0026xg\u0026\u0026W0(G.type,G.memoizedProps);break;case 3:case 4:if(bh){var V=xc;xc=cp(G.stateNode.containerInfo),Ld(G),xc=V}else Ld(G);break;case 22:G.memoizedState===null\u0026\u0026(V=G.alternate,V!==null\u0026\u0026V.memoizedState!==null?(V=xg,xg=16777216,Ld(G),xg=V):Ld(G));break;default:Ld(G)}}function Np(G){var V=G.alternate;if(V!==null\u0026\u0026(G=V.child,G!==null)){V.child=null;do V=G.sibling,G.sibling=null,G=V;while(G!==null)}}function QI(G){var V=G.deletions;if((G.flags\u002616)!==0){if(V!==null)for(var Ae=0;Ae\u003cV.length;Ae++){var Be=V[Ae];Pa=Be,op(Be,G)}Np(G)}if(G.subtreeFlags\u002610256)for(G=G.child;G!==null;)V0(G),G=G.sibling}function V0(G){switch(G.tag){case 0:case 11:case 15:QI(G),G.flags\u00262048\u0026\u0026DA(9,G,G.return);break;case 3:QI(G);break;case 12:QI(G);break;case 22:var V=G.stateNode;G.memoizedState!==null\u0026\u0026V._visibility\u00262\u0026\u0026(G.return===null||G.return.tag!==13)?(V._visibility\u0026=-3,Vg(G)):QI(G);break;default:QI(G)}}function Vg(G){var V=G.deletions;if((G.flags\u002616)!==0){if(V!==null)for(var Ae=0;Ae\u003cV.length;Ae++){var Be=V[Ae];Pa=Be,op(Be,G)}Np(G)}for(G=G.child;G!==null;){switch(V=G,V.tag){case 0:case 11:case 15:DA(8,V,V.return),Vg(V);break;case 22:Ae=V.stateNode,Ae._visibility\u00262\u0026\u0026(Ae._visibility\u0026=-3,Vg(V));break;default:Vg(V)}G=G.sibling}}function op(G,V){for(;Pa!==null;){var Ae=Pa;switch(Ae.tag){case 0:case 11:case 15:DA(8,Ae,V);break;case 23:case 22:if(Ae.memoizedState!==null\u0026\u0026Ae.memoizedState.cachePool!==null){var Be=Ae.memoizedState.cachePool.pool;Be!=null\u0026\u0026Be.refCount++}break;case 24:At(Ae.memoizedState.cache)}if(Be=Ae.child,Be!==null)Be.return=Ae,Pa=Be;else e:for(Ae=G;Pa!==null;){Be=Pa;var Oe=Be.sibling,Je=Be.return;if(S4(Be),Be===Ae){Pa=null;break e}if(Oe!==null){Oe.return=Je,Pa=Oe;break e}Pa=Je}}}function bs(G){var V=B_(G);if(V!=null){if(typeof V.memoizedProps[\"data-testname\"]!=\"string\")throw Error(r(364));return V}if(G=Bf(G),G===null)throw Error(r(362));return G.stateNode.current}function Zo(G,V){var Ae=G.tag;switch(V.$typeof){case T1:if(G.type===V.value)return!0;break;case Xg:e:{for(V=V.value,G=[G,0],Ae=0;Ae\u003cG.length;){var Be=G[Ae++],Oe=Be.tag,Je=G[Ae++],Tt=V[Je];if(Oe!==5\u0026\u0026Oe!==26\u0026\u0026Oe!==27||!Qm(Be)){for(;Tt!=null\u0026\u0026Zo(Be,Tt);)Je++,Tt=V[Je];if(Je===V.length){V=!0;break e}else for(Be=Be.child;Be!==null;)G.push(Be,Je),Be=Be.sibling}}V=!1}return V;case U2:if((Ae===5||Ae===26||Ae===27)\u0026\u0026N2(G.stateNode,V.value))return!0;break;case ty:if((Ae===5||Ae===6||Ae===26||Ae===27)\u0026\u0026(G=WC(G),G!==null\u0026\u00260\u003c=G.indexOf(V.value)))return!0;break;case K2:if((Ae===5||Ae===26||Ae===27)\u0026\u0026(G=G.memoizedProps[\"data-testname\"],typeof G==\"string\"\u0026\u0026G.toLowerCase()===V.value.toLowerCase()))return!0;break;default:throw Error(r(365))}return!1}function ip(G){switch(G.$typeof){case T1:return\"\u003c\"+(g(G.value)||\"Unknown\")+\"\u003e\";case Xg:return\":has(\"+(ip(G)||\"\")+\")\";case U2:return'[role=\"'+G.value+'\"]';case ty:return'\"'+G.value+'\"';case K2:return'[data-testname=\"'+G.value+'\"]';default:throw Error(r(365))}}function vI(G,V){var Ae=[];G=[G,0];for(var Be=0;Be\u003cG.length;){var Oe=G[Be++],Je=Oe.tag,Tt=G[Be++],ln=V[Tt];if(Je!==5\u0026\u0026Je!==26\u0026\u0026Je!==27||!Qm(Oe)){for(;ln!=null\u0026\u0026Zo(Oe,ln);)Tt++,ln=V[Tt];if(Tt===V.length)Ae.push(Oe);else for(Oe=Oe.child;Oe!==null;)G.push(Oe,Tt),Oe=Oe.sibling}}return Ae}function nc(G,V){if(!JC)throw Error(r(363));G=bs(G),G=vI(G,V),V=[],G=Array.from(G);for(var Ae=0;Ae\u003cG.length;){var Be=G[Ae++],Oe=Be.tag;if(Oe===5||Oe===26||Oe===27)Qm(Be)||V.push(Be.stateNode);else for(Be=Be.child;Be!==null;)G.push(Be),Be=Be.sibling}return V}function i0(){if((ls\u00262)!==0\u0026\u0026Zr!==0)return Zr\u0026-Zr;if(Xr.T!==null){var G=ll;return G!==0?G:Yt()}return w2()}function Cf(){pl===0\u0026\u0026(pl=(Zr\u0026536870912)===0||Vs?y():536870912);var G=Vp.current;return G!==null\u0026\u0026(G.flags|=32),pl}function ug(G,V,Ae){(G===gA\u0026\u0026(os===2||os===9)||G.cancelPendingCommit!==null)\u0026\u0026(pa(G,0),oc(G,Zr,pl,!1)),B(G,Ae),((ls\u00262)===0||G!==gA)\u0026\u0026(G===gA\u0026\u0026((ls\u00262)===0\u0026\u0026(Uu|=Ae),hl===4\u0026\u0026oc(G,Zr,pl,!1)),at(G))}function wI(G,V,Ae){if((ls\u00266)!==0)throw Error(r(327));var Be=!Ae\u0026\u0026(V\u0026124)===0\u0026\u0026(V\u0026G.expiredLanes)===0||I(G,V),Oe=Be?kp(G,V):uA(G,V,!0),Je=Be;do{if(Oe===0){Ph\u0026\u0026!Be\u0026\u0026oc(G,V,0,!1);break}else{if(Ae=G.current.alternate,Je\u0026\u0026!Rp(Ae)){Oe=uA(G,V,!1),Je=!1;continue}if(Oe===2){if(Je=V,G.errorRecoveryDisabledLanes\u0026Je)var Tt=0;else Tt=G.pendingLanes\u0026-536870913,Tt=Tt!==0?Tt:Tt\u0026536870912?536870912:0;if(Tt!==0){V=Tt;e:{var ln=G;Oe=P_;var wn=Eh\u0026\u0026ln.current.memoizedState.isDehydrated;if(wn\u0026\u0026(pa(ln,Tt).flags|=256),Tt=uA(ln,Tt,!1),Tt!==2){if(XI\u0026\u0026!wn){ln.errorRecoveryDisabledLanes|=Je,Uu|=Je,Oe=4;break e}Je=Vl,Vl=Oe,Je!==null\u0026\u0026(Vl===null?Vl=Je:Vl.push.apply(Vl,Je))}Oe=Tt}if(Je=!1,Oe!==2)continue}}if(Oe===1){pa(G,0),oc(G,V,0,!0);break}e:{switch(Be=G,Je=Oe,Je){case 0:case 1:throw Error(r(345));case 4:if((V\u00264194048)!==V)break;case 6:oc(Be,V,pl,!k1);break e;case 2:Vl=null;break;case 3:case 5:break;default:throw Error(r(329))}if((V\u002662914560)===V\u0026\u0026(Oe=ny+300-cs(),10\u003cOe)){if(oc(Be,V,pl,!k1),f(Be,0,!0)!==0)break e;Be.timeoutHandle=x_(rp.bind(null,Be,Ae,Vl,F1,Mh,V,pl,Uu,Jp,k1,Je,2,-0,0),Oe);break e}rp(Be,Ae,Vl,F1,Mh,V,pl,Uu,Jp,k1,Je,0,-0,0)}}break}while(!0);at(G)}function rp(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o,Ai,Qi,Ni,Xs){if(G.timeoutHandle=xh,Qi=V.subtreeFlags,(Qi\u00268192||(Qi\u002616785408)===16785408)\u0026\u0026(zC(),f2(V),Qi=M2(),Qi!==null)){G.cancelPendingCommit=Qi(VE.bind(null,G,V,Je,Ae,Be,Oe,Tt,ln,wn,Ai,1,Ni,Xs)),oc(G,Je,Tt,!$o);return}VE(G,V,Je,Ae,Be,Oe,Tt,ln,wn)}function Rp(G){for(var V=G;;){var Ae=V.tag;if((Ae===0||Ae===11||Ae===15)\u0026\u0026V.flags\u002616384\u0026\u0026(Ae=V.updateQueue,Ae!==null\u0026\u0026(Ae=Ae.stores,Ae!==null)))for(var Be=0;Be\u003cAe.length;Be++){var Oe=Ae[Be],Je=Oe.getSnapshot;Oe=Oe.value;try{if(!c0(Je(),Oe))return!1}catch{return!1}}if(Ae=V.child,V.subtreeFlags\u002616384\u0026\u0026Ae!==null)Ae.return=V,V=Ae;else{if(V===G)break;for(;V.sibling===null;){if(V.return===null||V.return===G)return!0;V=V.return}V.sibling.return=V.return,V=V.sibling}}return!0}function oc(G,V,Ae,Be){V\u0026=~zp,V\u0026=~Uu,G.suspendedLanes|=V,G.pingedLanes\u0026=~V,Be\u0026\u0026(G.warmLanes|=V),Be=G.expirationTimes;for(var Oe=V;0\u003cOe;){var Je=31-_g(Oe),Tt=1\u003c\u003cJe;Be[Je]=-1,Oe\u0026=~Tt}Ae!==0\u0026\u0026Q(G,Ae,V)}function gg(){return(ls\u00266)===0?(nt(0),!1):!0}function Cc(){if(Us!==null){if(os===0)var G=Us.return;else G=Us,Kl=Qh=null,uo(G),vh=null,R1=0,G=Us;for(;G!==null;)fh(G.alternate,G),G=G.return;Us=null}}function pa(G,V){var Ae=G.timeoutHandle;Ae!==xh\u0026\u0026(G.timeoutHandle=xh,hg(Ae)),Ae=G.cancelPendingCommit,Ae!==null\u0026\u0026(G.cancelPendingCommit=null,Ae()),Cc(),gA=G,Us=Ae=Fp(G.current,null),Zr=V,os=0,l0=null,k1=!1,Ph=I(G,V),XI=!1,Jp=pl=zp=Uu=Sl=hl=0,Vl=P_=null,Mh=!1,(V\u00268)!==0\u0026\u0026(V|=V\u002632);var Be=G.entangledLanes;if(Be!==0)for(G=G.entanglements,Be\u0026=V;0\u003cBe;){var Oe=31-_g(Be),Je=1\u003c\u003cOe;V|=G[Oe],Be\u0026=~Je}return dl=V,Wt(),Ae}function c3(G,V){_a=null,Xr.H=Kp,V===Df||V===ul?(V=dt(),os=3):V===M1?(V=dt(),os=4):os=V===Ja?8:V!==null\u0026\u0026typeof V==\"object\"\u0026\u0026typeof V.then==\"function\"?6:1,l0=V,Us===null\u0026\u0026(hl=1,cg(G,W(V,G.current)))}function PI(){var G=Vp.current;return G===null?!0:(Zr\u00264194048)===Zr?Rf===null:(Zr\u002662914560)===Zr||(Zr\u0026536870912)!==0?G===Rf:!1}function Tp(){var G=Xr.H;return Xr.H=Kp,G===null?Kp:G}function rl(){var G=Xr.A;return Xr.A=$I,G}function IA(){hl=4,k1||(Zr\u00264194048)!==Zr\u0026\u0026Vp.current!==null||(Ph=!0),(Sl\u0026134217727)===0\u0026\u0026(Uu\u0026134217727)===0||gA===null||oc(gA,Zr,pl,!1)}function uA(G,V,Ae){var Be=ls;ls|=2;var Oe=Tp(),Je=rl();(gA!==G||Zr!==V)\u0026\u0026(F1=null,pa(G,V)),V=!1;var Tt=hl;e:do try{if(os!==0\u0026\u0026Us!==null){var ln=Us,wn=l0;switch(os){case 8:Cc(),Tt=6;break e;case 3:case 2:case 9:case 6:Vp.current===null\u0026\u0026(V=!0);var $o=os;if(os=0,l0=null,y1(G,ln,wn,$o),Ae\u0026\u0026Ph){Tt=0;break e}break;default:$o=os,os=0,l0=null,y1(G,ln,wn,$o)}}ym(),Tt=hl;break}catch(Ai){c3(G,Ai)}while(!0);return V\u0026\u0026G.shellSuspendCounter++,Kl=Qh=null,ls=Be,Xr.H=Oe,Xr.A=Je,Us===null\u0026\u0026(gA=null,Zr=0,Wt()),Tt}function ym(){for(;Us!==null;)xm(Us)}function kp(G,V){var Ae=ls;ls|=2;var Be=Tp(),Oe=rl();gA!==G||Zr!==V?(F1=null,x3=cs()+500,pa(G,V)):Ph=I(G,V);e:do try{if(os!==0\u0026\u0026Us!==null){V=Us;var Je=l0;t:switch(os){case 1:os=0,l0=null,y1(G,V,Je,1);break;case 2:case 9:if(xt(Je)){os=0,l0=null,I2(V);break}V=function(){os!==2\u0026\u0026os!==9||gA!==G||(os=7),at(G)},Je.then(V,V);break e;case 3:os=7;break e;case 4:os=5;break e;case 7:xt(Je)?(os=0,l0=null,I2(V)):(os=0,l0=null,y1(G,V,Je,7));break;case 5:var Tt=null;switch(Us.tag){case 26:Tt=Us.memoizedState;case 5:case 27:var ln=Us,wn=ln.type,$o=ln.pendingProps;if(Tt?a0(Tt):P2(wn,$o)){os=0,l0=null;var Ai=ln.sibling;if(Ai!==null)Us=Ai;else{var Qi=ln.return;Qi!==null?(Us=Qi,I_(Qi)):Us=null}break t}}os=0,l0=null,y1(G,V,Je,5);break;case 6:os=0,l0=null,y1(G,V,Je,6);break;case 8:Cc(),hl=6;break e;default:throw Error(r(462))}}C1();break}catch(Ni){c3(G,Ni)}while(!0);return Kl=Qh=null,Xr.H=Be,Xr.A=Oe,ls=Ae,Us!==null?0:(gA=null,Zr=0,Wt(),hl)}function C1(){for(;Us!==null\u0026\u0026!h9();)xm(Us)}function xm(G){var V=lc(G.alternate,G,dl);G.memoizedProps=G.pendingProps,V===null?I_(G):Us=V}function I2(G){var V=G,Ae=V.alternate;switch(V.tag){case 15:case 0:V=ot(Ae,V,V.pendingProps,V.type,void 0,Zr);break;case 11:V=ot(Ae,V,V.pendingProps,V.type.render,V.ref,Zr);break;case 5:uo(V);default:fh(Ae,V),V=Us=qs(V,dl),V=lc(Ae,V,dl)}G.memoizedProps=G.pendingProps,V===null?I_(G):Us=V}function y1(G,V,Ae,Be){Kl=Qh=null,uo(V),vh=null,R1=0;var Oe=V.return;try{if(G0(G,Oe,V,Ae,Zr)){hl=1,cg(G,W(Ae,G.current)),Us=null;return}}catch(Je){if(Oe!==null)throw Us=Oe,Je;hl=1,cg(G,W(Ae,G.current)),Us=null;return}V.flags\u002632768?(Vs||Be===1?G=!0:Ph||(Zr\u0026536870912)!==0?G=!1:(k1=G=!0,(Be===2||Be===9||Be===3||Be===6)\u0026\u0026(Be=Vp.current,Be!==null\u0026\u0026Be.tag===13\u0026\u0026(Be.flags|=16384))),MI(V,G)):I_(V)}function I_(G){var V=G;do{if((V.flags\u002632768)!==0){MI(V,k1);return}G=V.return;var Ae=Y0(V.alternate,V,dl);if(Ae!==null){Us=Ae;return}if(V=V.sibling,V!==null){Us=V;return}Us=V=G}while(V!==null);hl===0\u0026\u0026(hl=5)}function MI(G,V){do{var Ae=Hr(G.alternate,G);if(Ae!==null){Ae.flags\u0026=32767,Us=Ae;return}if(Ae=G.return,Ae!==null\u0026\u0026(Ae.flags|=32768,Ae.subtreeFlags=0,Ae.deletions=null),!V\u0026\u0026(G=G.sibling,G!==null)){Us=G;return}Us=G=Ae}while(G!==null);hl=6,Us=null}function VE(G,V,Ae,Be,Oe,Je,Tt,ln,wn){G.cancelPendingCommit=null;do sp();while(us!==0);if((ls\u00266)!==0)throw Error(r(327));if(V!==null){if(V===G.current)throw Error(r(177));if(Je=V.lanes|V.childLanes,Je|=l5,S(G,Ae,Je,Tt,ln,wn),G===gA\u0026\u0026(Us=gA=null,Zr=0),yu=V,Jd=G,Dh=Ae,V2=Je,g5=Oe,oy=Be,(V.subtreeFlags\u002610256)!==0||(V.flags\u002610256)!==0?(G.callbackNode=null,G.callbackPriority=0,zE(wf,function(){return xf(),null})):(G.callbackNode=null,G.callbackPriority=0),Be=(V.flags\u002613878)!==0,(V.subtreeFlags\u002613878)!==0||Be){Be=Xr.T,Xr.T=null,Oe=Sm(),J0(2),Tt=ls,ls|=4;try{f_(G,V,Ae)}finally{ls=Tt,J0(Oe),Xr.T=Be}}us=1,GC(),YC(),yf()}}function GC(){if(us===1){us=0;var G=Jd,V=yu,Ae=(V.flags\u002613878)!==0;if((V.subtreeFlags\u002613878)!==0||Ae){Ae=Xr.T,Xr.T=null;var Be=Sm();J0(2);var Oe=ls;ls|=4;try{_2(V,G),Ss(G.containerInfo)}finally{ls=Oe,J0(Be),Xr.T=Ae}}G.current=V,us=2}}function YC(){if(us===2){us=0;var G=Jd,V=yu,Ae=(V.flags\u00268772)!==0;if((V.subtreeFlags\u00268772)!==0||Ae){Ae=Xr.T,Xr.T=null;var Be=Sm();J0(2);var Oe=ls;ls|=4;try{U0(G,V.alternate,V)}finally{ls=Oe,J0(Be),Xr.T=Ae}}us=3}}function yf(){if(us===4||us===3){us=0,yc();var G=Jd,V=yu,Ae=Dh,Be=oy;(V.subtreeFlags\u002610256)!==0||(V.flags\u002610256)!==0?us=5:(us=0,yu=Jd=null,Fu(G,G.pendingLanes));var Oe=G.pendingLanes;if(Oe===0\u0026\u0026(Wp=null),k(Ae),V=V.stateNode,Ig\u0026\u0026typeof Ig.onCommitFiberRoot==\"function\")try{Ig.onCommitFiberRoot(_u,V,void 0,(V.current.flags\u0026128)===128)}catch{}if(Be!==null){V=Xr.T,Oe=Sm(),J0(2),Xr.T=null;try{for(var Je=G.onRecoverableError,Tt=0;Tt\u003cBe.length;Tt++){var ln=Be[Tt];Je(ln.value,{componentStack:ln.stack})}}finally{Xr.T=V,J0(Oe)}}(Dh\u00263)!==0\u0026\u0026sp(),at(G),Oe=G.pendingLanes,(Ae\u00264194090)!==0\u0026\u0026(Oe\u002642)!==0?G===Ku?up++:(up=0,Ku=G):up=0,nt(0)}}function Fu(G,V){(G.pooledCacheLanes\u0026=V)===0\u0026\u0026(V=G.pooledCache,V!=null\u0026\u0026(G.pooledCache=null,At(V)))}function sp(G){return GC(),YC(),yf(),xf()}function xf(){if(us!==5)return!1;var G=Jd,V=V2;V2=0;var Ae=k(Dh),Be=32\u003eAe?32:Ae;Ae=Xr.T;var Oe=Sm();try{J0(Be),Xr.T=null,Be=g5,g5=null;var Je=Jd,Tt=Dh;if(us=0,yu=Jd=null,Dh=0,(ls\u00266)!==0)throw Error(r(331));var ln=ls;if(ls|=4,V0(Je.current),Cm(Je,Je.current,Tt,Be),ls=ln,nt(0,!1),Ig\u0026\u0026typeof Ig.onPostCommitFiberRoot==\"function\")try{Ig.onPostCommitFiberRoot(_u,Je)}catch{}return!0}finally{J0(Oe),Xr.T=Ae,Fu(G,V)}}function C2(G,V,Ae){V=W(Ae,V),V=Vc(G.stateNode,V,2),G=rn(G,V,2),G!==null\u0026\u0026(B(G,2),at(G))}function $s(G,V,Ae){if(G.tag===3)C2(G,G,Ae);else for(;V!==null;){if(V.tag===3){C2(V,G,Ae);break}else if(V.tag===1){var Be=V.stateNode;if(typeof V.type.getDerivedStateFromError==\"function\"||typeof Be.componentDidCatch==\"function\"\u0026\u0026(Wp===null||!Wp.has(Be))){G=W(Ae,G),Ae=ha(2),Be=rn(V,Ae,2),Be!==null\u0026\u0026(BI(Ae,Be,V,G),B(Be,2),at(Be));break}}V=V.return}}function DI(G,V,Ae){var Be=G.pingCache;if(Be===null){Be=G.pingCache=new qI;var Oe=new Set;Be.set(V,Oe)}else Oe=Be.get(V),Oe===void 0\u0026\u0026(Oe=new Set,Be.set(V,Oe));Oe.has(Ae)||(XI=!0,Oe.add(Ae),G=y2.bind(null,G,V,Ae),V.then(G,G))}function y2(G,V,Ae){var Be=G.pingCache;Be!==null\u0026\u0026Be.delete(V),G.pingedLanes|=G.suspendedLanes\u0026Ae,G.warmLanes\u0026=~Ae,gA===G\u0026\u0026(Zr\u0026Ae)===Ae\u0026\u0026(hl===4||hl===3\u0026\u0026(Zr\u002662914560)===Zr\u0026\u0026300\u003ecs()-ny?(ls\u00262)===0\u0026\u0026pa(G,0):zp|=Ae,Jp===Zr\u0026\u0026(Jp=0)),at(G)}function x1(G,V){V===0\u0026\u0026(V=x()),G=yn(G,V),G!==null\u0026\u0026(B(G,V),at(G))}function dg(G){var V=G.memoizedState,Ae=0;V!==null\u0026\u0026(Ae=V.retryLane),x1(G,Ae)}function x2(G,V){var Ae=0;switch(G.tag){case 13:var Be=G.stateNode,Oe=G.memoizedState;Oe!==null\u0026\u0026(Ae=Oe.retryLane);break;case 19:Be=G.stateNode;break;case 22:Be=G.stateNode._retryCache;break;default:throw Error(r(314))}Be!==null\u0026\u0026Be.delete(V),x1(G,Ae)}function zE(G,V){return qC(G,V)}function E2(G,V,Ae,Be){this.tag=G,this.key=Ae,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=V,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Be,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function NI(G){return G=G.prototype,!(!G||!G.isReactComponent)}function Fp(G,V){var Ae=G.alternate;return Ae===null?(Ae=o(G.tag,V,G.key,G.mode),Ae.elementType=G.elementType,Ae.type=G.type,Ae.stateNode=G.stateNode,Ae.alternate=G,G.alternate=Ae):(Ae.pendingProps=V,Ae.type=G.type,Ae.flags=0,Ae.subtreeFlags=0,Ae.deletions=null),Ae.flags=G.flags\u002665011712,Ae.childLanes=G.childLanes,Ae.lanes=G.lanes,Ae.child=G.child,Ae.memoizedProps=G.memoizedProps,Ae.memoizedState=G.memoizedState,Ae.updateQueue=G.updateQueue,V=G.dependencies,Ae.dependencies=V===null?null:{lanes:V.lanes,firstContext:V.firstContext},Ae.sibling=G.sibling,Ae.index=G.index,Ae.ref=G.ref,Ae.refCleanup=G.refCleanup,Ae}function qs(G,V){G.flags\u0026=65011714;var Ae=G.alternate;return Ae===null?(G.childLanes=0,G.lanes=V,G.child=null,G.subtreeFlags=0,G.memoizedProps=null,G.memoizedState=null,G.updateQueue=null,G.dependencies=null,G.stateNode=null):(G.childLanes=Ae.childLanes,G.lanes=Ae.lanes,G.child=Ae.child,G.subtreeFlags=0,G.deletions=null,G.memoizedProps=Ae.memoizedProps,G.memoizedState=Ae.memoizedState,G.updateQueue=Ae.updateQueue,G.type=Ae.type,V=Ae.dependencies,G.dependencies=V===null?null:{lanes:V.lanes,firstContext:V.firstContext}),G}function RI(G,V,Ae,Be,Oe,Je){var Tt=0;if(Be=G,typeof G==\"function\")NI(G)\u0026\u0026(Tt=1);else if(typeof G==\"string\")Tt=bh\u0026\u0026ai?_3(G,Ae,bl.current)?26:Wc(G)?27:5:bh?_3(G,Ae,bl.current)?26:5:ai\u0026\u0026Wc(G)?27:5;else e:switch(G){case b1:return G=o(31,Ae,V,Oe),G.elementType=b1,G.lanes=Je,G;case FI:return Ch(Ae.children,Oe,Je,V);case UC:Tt=8,Oe|=24;break;case S2:return G=o(12,Ae,V,Oe|2),G.elementType=S2,G.lanes=Je,G;case u3:return G=o(13,Ae,V,Oe),G.elementType=u3,G.lanes=Je,G;case Q2:return G=o(19,Ae,V,Oe),G.elementType=Q2,G.lanes=Je,G;default:if(typeof G==\"object\"\u0026\u0026G!==null)switch(G.$typeof){case KC:case y_:Tt=10;break e;case l3:Tt=9;break e;case ap:Tt=11;break e;case Gd:Tt=14;break e;case Yd:Tt=16,Be=null;break e}Tt=29,Ae=Error(r(130,G===null?\"null\":typeof G,\"\")),Be=null}return V=o(Tt,Ae,V,Oe),V.elementType=G,V.type=Be,V.lanes=Je,V}function Ch(G,V,Ae,Be){return G=o(7,G,Be,V),G.lanes=Ae,G}function C_(G,V,Ae){return G=o(6,G,null,V),G.lanes=Ae,G}function yh(G,V,Ae){return V=o(4,G.children!==null?G.children:[],G.key,V),V.lanes=Ae,V.stateNode={containerInfo:G.containerInfo,pendingChildren:null,implementation:G.implementation},V}function Em(G,V,Ae,Be,Oe,Je,Tt,ln){this.tag=1,this.containerInfo=G,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=xh,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=E(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E(0),this.hiddenUpdates=E(null),this.identifierPrefix=Be,this.onUncaughtError=Oe,this.onCaughtError=Je,this.onRecoverableError=Tt,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ln,this.incompleteTransitions=new Map}function z0(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o,Ai,Qi){return G=new Em(G,V,Ae,Tt,ln,wn,$o,Qi),V=1,Je===!0\u0026\u0026(V|=24),Je=o(3,null,null,V),G.current=Je,Je.stateNode=G,V=tt(),V.refCount++,G.pooledCache=V,V.refCount++,Je.memoizedState={element:Be,isDehydrated:Ae,cache:V},$n(Je),G}function TI(G){return G?(G=mg,G):mg}function Ef(G){var V=G._reactInternals;if(V===void 0)throw typeof G.render==\"function\"?Error(r(188)):(G=Object.keys(G).join(\",\"),Error(r(268,G)));return G=A(V),G=G!==null?c(G):null,G===null?null:CA(G.stateNode)}function Q4(G,V,Ae,Be,Oe,Je){Oe=TI(Oe),Be.context===null?Be.context=Oe:Be.pendingContext=Oe,Be=Kt(V),Be.payload={element:Ae},Je=Je===void 0?null:Je,Je!==null\u0026\u0026(Be.callback=Je),Ae=rn(G,Be,V),Ae!==null\u0026\u0026(ug(Ae,G,V),Lt(Ae,G,V))}function B2(G,V){if(G=G.memoizedState,G!==null\u0026\u0026G.dehydrated!==null){var Ae=G.retryLane;G.retryLane=Ae!==0\u0026\u0026Ae\u003cV?Ae:V}}function Lp(G,V){B2(G,V),(G=G.alternate)\u0026\u0026B2(G,V)}var ma={},b2=L3(),Hd=ane(),E1=Object.assign,kI=Symbol.for(\"react.element\"),Od=Symbol.for(\"react.transitional.element\"),B1=Symbol.for(\"react.portal\"),FI=Symbol.for(\"react.fragment\"),UC=Symbol.for(\"react.strict_mode\"),S2=Symbol.for(\"react.profiler\"),KC=Symbol.for(\"react.provider\"),l3=Symbol.for(\"react.consumer\"),y_=Symbol.for(\"react.context\"),ap=Symbol.for(\"react.forward_ref\"),u3=Symbol.for(\"react.suspense\"),Q2=Symbol.for(\"react.suspense_list\"),Gd=Symbol.for(\"react.memo\"),Yd=Symbol.for(\"react.lazy\"),b1=Symbol.for(\"react.activity\"),v4=Symbol.for(\"react.memo_cache_sentinel\"),Hp=Symbol.iterator,VC=Symbol.for(\"react.client.reference\"),Bm=Array.isArray,Xr=b2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,v2=n.rendererVersion,Ts=n.rendererPackageName,S1=n.extraDevToolsConfig,CA=n.getPublicInstance,x0=n.getRootHostContext,zg=n.getChildHostContext,bm=n.prepareForCommit,Ss=n.resetAfterCommit,ic=n.createInstance;n.cloneMutableInstance;var Va=n.appendInitialChild,LI=n.finalizeInitialChildren,Lu=n.shouldSetTextContent,Jg=n.createTextInstance;n.cloneMutableTextInstance;var x_=n.scheduleTimeout,hg=n.cancelTimeout,xh=n.noTimeout,Ud=n.isPrimaryRenderer;n.warnsIfNotActing;var Ks=n.supportsMutation,E_=n.supportsPersistence,Eh=n.supportsHydration,B_=n.getInstanceFromNode;n.beforeActiveInstanceBlur;var w4=n.preparePortalMount;n.prepareScopeUpdate,n.getInstanceFromScope;var J0=n.setCurrentUpdatePriority,Sm=n.getCurrentUpdatePriority,w2=n.resolveUpdatePriority;n.trackSchedulerEvent,n.resolveEventType,n.resolveEventTimeStamp;var g3=n.shouldAttemptEagerTransition,Wg=n.detachDeletedInstance;n.requestPostPaintCallback;var r0=n.maySuspendCommit,P2=n.preloadInstance,zC=n.startSuspendingCommit,W0=n.suspendInstance;n.suspendOnActiveViewTransition;var M2=n.waitForCommitToBeReady,sl=n.NotPendingTransition,b_=n.HostTransitionContext,s0=n.resetFormInstance;n.bindToConsole;var JE=n.supportsMicrotasks,d3=n.scheduleMicrotask,JC=n.supportsTestSelectors,Bf=n.findFiberRoot,D2=n.getBoundingRect,WC=n.getTextContent,Qm=n.isHiddenSubtree,N2=n.matchAccessibilityRole,WE=n.setFocusIfFocusable,jE=n.setupIntersectionObserver,$E=n.appendChild,R2=n.appendChildToContainer,h3=n.commitTextUpdate,p3=n.commitMount,l9=n.commitUpdate,qE=n.insertBefore,P4=n.insertInContainerBefore,bf=n.removeChild,XE=n.removeChildFromContainer,T2=n.resetTextContent,k2=n.hideInstance,Ap=n.hideTextInstance,F2=n.unhideInstance,m3=n.unhideTextInstance;n.cancelViewTransitionName,n.cancelRootViewTransitionName,n.restoreRootViewTransitionName,n.cloneRootViewTransitionContainer,n.removeRootViewTransitionClone,n.measureClonedInstance,n.hasInstanceChanged,n.hasInstanceAffectedParent,n.startViewTransition,n.startGestureTransition,n.stopGestureTransition,n.getCurrentGestureOffset,n.subscribeToGestureDirection,n.createViewTransitionInstance;var HI=n.clearContainer;n.createFragmentInstance,n.updateFragmentInstanceFiber,n.commitNewChildToFragmentInstance,n.deleteChildFromFragmentInstance;var kc=n.cloneInstance,S_=n.createContainerChildSet,M4=n.appendChildToContainerChildSet,jC=n.finalizeContainerChildren,vm=n.replaceContainerChildren,ZE=n.cloneHiddenInstance,NA=n.cloneHiddenTextInstance,Sf=n.isSuspenseInstancePending,OI=n.isSuspenseInstanceFallback,Q1=n.getSuspenseInstanceFallbackErrorDetails,e5=n.registerSuspenseInstanceRetry,u9=n.canHydrateFormStateMarker,t5=n.isFormStateMarkerMatching,g9=n.getNextHydratableSibling,n5=n.getNextHydratableSiblingAfterSingleton,o5=n.getFirstHydratableChild,Qf=n.getFirstHydratableChildWithinContainer,Q_=n.getFirstHydratableChildWithinSuspenseInstance,d9=n.getFirstHydratableChildWithinSingleton,$C=n.canHydrateInstance,L2=n.canHydrateTextInstance,GI=n.canHydrateSuspenseInstance,Hu=n.hydrateInstance,wm=n.hydrateTextInstance,i5=n.hydrateSuspenseInstance,zr=n.getNextHydratableInstanceAfterSuspenseInstance,v1=n.commitHydratedContainer,D4=n.commitHydratedSuspenseInstance,Bh=n.clearSuspenseBoundary,H2=n.clearSuspenseBoundaryFromContainer,mu=n.shouldDeleteUnhydratedTailInstances;n.diffHydratedPropsForDevWarnings,n.diffHydratedTextForDevWarnings,n.describeHydratableInstanceForDevWarnings;var vf=n.validateHydratableInstance,YI=n.validateHydratableTextInstance,bh=n.supportsResources,_3=n.isHostHoistableType,cp=n.getHoistableRoot,Jc=n.getResource,r5=n.acquireResource,Gi=n.releaseResource,pg=n.hydrateHoistable,Pm=n.mountHoistable,Op=n.unmountHoistable,Sh=n.createHoistableInstance,Ys=n.prepareToCommitHoistables,w1=n.mayResourceSuspendCommit,a0=n.preloadResource,al=n.suspendResource,ai=n.supportsSingletons,v_=n.resolveSingletonInstance,Al=n.acquireSingletonInstance,P1=n.releaseSingletonInstance,Wc=n.isHostSingletonType,Gp=n.isSingletonScope,A0=[],Mm=-1,mg={},_g=Math.clz32?Math.clz32:m,O2=Math.log,G2=Math.LN2,RA=256,jg=4194304,qC=Hd.unstable_scheduleCallback,Kd=Hd.unstable_cancelCallback,h9=Hd.unstable_shouldYield,yc=Hd.unstable_requestPaint,cs=Hd.unstable_now,Jn=Hd.unstable_ImmediatePriority,c8=Hd.unstable_UserBlockingPriority,wf=Hd.unstable_NormalPriority,XC=Hd.unstable_IdlePriority,fg=Hd.log,Y2=Hd.unstable_setDisableYieldValue,_u=null,Ig=null,s5,f3,ZC=!1,I3=new WeakMap,Pf=[],UI=0,C3=null,KI=0,E0=[],jc=0,cl=null,Ou=1,B0=\"\",bl=h(null),Vd=h(null),za=h(null),$g=h(null),Xa=null,Za=null,Vs=!1,fu=null,Si=!1,lp=Error(r(519)),c0=typeof Object.is==\"function\"?Object.is:he,$c=h(null),Qh=null,Kl=null,VI=typeof AbortController\u003c\"u\"?AbortController:function(){var G=[],V=this.signal={aborted:!1,addEventListener:function(Ae,Be){G.push(Be)}};this.abort=function(){V.aborted=!0,G.forEach(function(Ae){return Ae()})}},p9=Hd.unstable_scheduleCallback,zI=Hd.unstable_NormalPriority,rc={$typeof:y_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},b0=null,Mf=null,a5=!1,Cg=!1,Dm=!1,JI=0,ey=null,Nm=0,ll=0,WI=null,A5=Xr.S;Xr.S=function(G,V){typeof V==\"object\"\u0026\u0026V!==null\u0026\u0026typeof V.then==\"function\"\u0026\u0026pn(G,V),A5!==null\u0026\u0026A5(G,V)};var Yi=h(null),c5=Object.prototype.hasOwnProperty,Df=Error(r(460)),M1=Error(r(474)),ul=Error(r(542)),Iu={then:function(){}},yg=null,ss=[],D1=0,l5=0,Yp=!1,zd=!1,Gu=h(null),Nf=h(0),Fc=0,_a=null,fa=null,zs=null,Rm=!1,j0=!1,w_=!1,$0=0,N1=0,Up=null,GA=0,Kp={readContext:Ce,use:Fo,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useLayoutEffect:Nn,useInsertionEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useSyncExternalStore:Nn,useId:Nn,useHostTransitionStatus:Nn,useFormState:Nn,useActionState:Nn,useOptimistic:Nn,useMemoCache:Nn,useCacheRefresh:Nn},S0={readContext:Ce,use:Fo,useCallback:function(G,V){return Oo().memoizedState=[G,V===void 0?null:V],G},useContext:Ce,useEffect:Li,useImperativeHandle:function(G,V,Ae){Ae=Ae!=null?Ae.concat([G]):null,oa(4194308,4,vA.bind(null,V,G),Ae)},useLayoutEffect:function(G,V){return oa(4194308,4,G,V)},useInsertionEffect:function(G,V){oa(4,2,G,V)},useMemo:function(G,V){var Ae=Oo();V=V===void 0?null:V;var Be=G();if(w_){R(!0);try{G()}finally{R(!1)}}return Ae.memoizedState=[Be,V],Be},useReducer:function(G,V,Ae){var Be=Oo();if(Ae!==void 0){var Oe=Ae(V);if(w_){R(!0);try{Ae(V)}finally{R(!1)}}}else Oe=V;return Be.memoizedState=Be.baseState=Oe,G={pending:null,lanes:0,dispatch:null,lastRenderedReducer:G,lastRenderedState:Oe},Be.queue=G,G=G.dispatch=mh.bind(null,_a,G),[Be.memoizedState,G]},useRef:function(G){var V=Oo();return G={current:G},V.memoizedState=G},useState:function(G){G=Ht(G);var V=G.queue,Ae=mm.bind(null,_a,V);return V.dispatch=Ae,[G.memoizedState,Ae]},useDebugValue:H0,useDeferredValue:function(G,V){var Ae=Oo();return Bl(Ae,G,V)},useTransition:function(){var G=Ht(!1);return G=Nd.bind(null,_a,G.queue,!0,!1),Oo().memoizedState=G,[!1,G]},useSyncExternalStore:function(G,V,Ae){var Be=_a,Oe=Oo();if(Vs){if(Ae===void 0)throw Error(r(407));Ae=Ae()}else{if(Ae=V(),gA===null)throw Error(r(349));(Zr\u0026124)!==0||ws(Be,V,Ae)}Oe.memoizedState=Ae;var Je={value:Ae,getSnapshot:V};return Oe.queue=Je,Li(Et.bind(null,Be,Je,G),[G]),Be.flags|=2048,wi(9,Br(),ds.bind(null,Be,Je,Ae,V),null),Ae},useId:function(){var G=Oo(),V=gA.identifierPrefix;if(Vs){var Ae=B0,Be=Ou;Ae=(Be\u0026~(1\u003c\u003c32-_g(Be)-1)).toString(32)+Ae,V=\"«\"+V+\"R\"+Ae,Ae=$0++,0\u003cAe\u0026\u0026(V+=\"H\"+Ae.toString(32)),V+=\"»\"}else Ae=GA++,V=\"«\"+V+\"r\"+Ae.toString(32)+\"»\";return G.memoizedState=V},useHostTransitionStatus:Ul,useFormState:Io,useActionState:Io,useOptimistic:function(G){var V=Oo();V.memoizedState=V.baseState=G;var Ae={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return V.queue=Ae,V=Ag.bind(null,_a,!0,Ae),Ae.dispatch=V,[G,V]},useMemoCache:Nr,useCacheRefresh:function(){return Oo().memoizedState=Rd.bind(null,_a)}},u5={readContext:Ce,use:Fo,useCallback:ph,useContext:Ce,useEffect:ys,useImperativeHandle:Yl,useInsertionEffect:dr,useLayoutEffect:cA,useMemo:Xh,useReducer:ur,useRef:gr,useState:function(){return ur(Rs)},useDebugValue:H0,useDeferredValue:function(G,V){var Ae=ko();return fc(Ae,fa.memoizedState,G,V)},useTransition:function(){var G=ur(Rs)[0],V=ko().memoizedState;return[typeof G==\"boolean\"?G:mi(G),V]},useSyncExternalStore:Ar,useId:m_,useHostTransitionStatus:Ul,useFormState:gi,useActionState:gi,useOptimistic:function(G,V){var Ae=ko();return Qt(Ae,fa,G,V)},useMemoCache:Nr,useCacheRefresh:ag},jI={readContext:Ce,use:Fo,useCallback:ph,useContext:Ce,useEffect:ys,useImperativeHandle:Yl,useInsertionEffect:dr,useLayoutEffect:cA,useMemo:Xh,useReducer:bi,useRef:gr,useState:function(){return bi(Rs)},useDebugValue:H0,useDeferredValue:function(G,V){var Ae=ko();return fa===null?Bl(Ae,G,V):fc(Ae,fa.memoizedState,G,V)},useTransition:function(){var G=bi(Rs)[0],V=ko().memoizedState;return[typeof G==\"boolean\"?G:mi(G),V]},useSyncExternalStore:Ar,useId:m_,useHostTransitionStatus:Ul,useFormState:Ji,useActionState:Ji,useOptimistic:function(G,V){var Ae=ko();return fa!==null?Qt(Ae,fa,G,V):(Ae.baseState=G,[G,Ae.queue.dispatch])},useMemoCache:Nr,useCacheRefresh:ag},vh=null,R1=0,Cu=Vo(!0),N4=Vo(!1),Vp=h(null),Rf=null,xs=h(0),Lc={enqueueSetState:function(G,V,Ae){G=G._reactInternals;var Be=i0(),Oe=Kt(Be);Oe.payload=V,Ae!=null\u0026\u0026(Oe.callback=Ae),V=rn(G,Oe,Be),V!==null\u0026\u0026(ug(V,G,Be),Lt(V,G,Be))},enqueueReplaceState:function(G,V,Ae){G=G._reactInternals;var Be=i0(),Oe=Kt(Be);Oe.tag=1,Oe.payload=V,Ae!=null\u0026\u0026(Oe.callback=Ae),V=rn(G,Oe,Be),V!==null\u0026\u0026(ug(V,G,Be),Lt(V,G,Be))},enqueueForceUpdate:function(G,V){G=G._reactInternals;var Ae=i0(),Be=Kt(Ae);Be.tag=2,V!=null\u0026\u0026(Be.callback=V),V=rn(G,Be,Ae),V!==null\u0026\u0026(ug(V,G,Ae),Lt(V,G,Ae))}},Ha=typeof reportError==\"function\"?reportError:function(G){if(typeof window==\"object\"\u0026\u0026typeof window.ErrorEvent==\"function\"){var V=new window.ErrorEvent(\"error\",{bubbles:!0,cancelable:!0,message:typeof G==\"object\"\u0026\u0026G!==null\u0026\u0026typeof G.message==\"string\"?String(G.message):String(G),error:G});if(!window.dispatchEvent(V))return}else if(typeof e==\"object\"\u0026\u0026typeof e.emit==\"function\"){e.emit(\"uncaughtException\",G);return}console.error(G)},Ja=Error(r(461)),Ps=!1,wh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},qg=!1,gl=!1,y3=!1,Tf=typeof WeakSet==\"function\"?WeakSet:Set,Pa=null,qc=null,Yu=!1,xc=null,xg=8192,$I={getCacheForType:function(G){var V=Ce(rc),Ae=V.data.get(G);return Ae===void 0\u0026\u0026(Ae=G(),V.data.set(G,Ae)),Ae}},T1=0,Xg=1,U2=2,K2=3,ty=4;if(typeof Symbol==\"function\"\u0026\u0026Symbol.for){var kf=Symbol.for;T1=kf(\"selector.component\"),Xg=kf(\"selector.has_pseudo_class\"),U2=kf(\"selector.role\"),K2=kf(\"selector.test_id\"),ty=kf(\"selector.text\")}var qI=typeof WeakMap==\"function\"?WeakMap:Map,ls=0,gA=null,Us=null,Zr=0,os=0,l0=null,k1=!1,Ph=!1,XI=!1,dl=0,hl=0,Sl=0,Uu=0,zp=0,pl=0,Jp=0,P_=null,Vl=null,Mh=!1,ny=0,x3=1/0,F1=null,Wp=null,us=0,Jd=null,yu=null,Dh=0,V2=0,g5=null,oy=null,up=0,Ku=null;return ma.attemptContinuousHydration=function(G){if(G.tag===13){var V=yn(G,67108864);V!==null\u0026\u0026ug(V,G,67108864),Lp(G,67108864)}},ma.attemptHydrationAtCurrentPriority=function(G){if(G.tag===13){var V=i0();V=M(V);var Ae=yn(G,V);Ae!==null\u0026\u0026ug(Ae,G,V),Lp(G,V)}},ma.attemptSynchronousHydration=function(G){switch(G.tag){case 3:if(G=G.stateNode,G.current.memoizedState.isDehydrated){var V=_(G.pendingLanes);if(V!==0){for(G.pendingLanes|=2,G.entangledLanes|=2;V;){var Ae=1\u003c\u003c31-_g(V);G.entanglements[1]|=Ae,V\u0026=~Ae}at(G),(ls\u00266)===0\u0026\u0026(x3=cs()+500,nt(0))}}break;case 13:V=yn(G,2),V!==null\u0026\u0026ug(V,G,2),gg(),Lp(G,2)}},ma.batchedUpdates=function(G,V){return G(V)},ma.createComponentSelector=function(G){return{$typeof:T1,value:G}},ma.createContainer=function(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o){return z0(G,V,!1,null,Ae,Be,Je,Tt,ln,wn,$o,null)},ma.createHasPseudoClassSelector=function(G){return{$typeof:Xg,value:G}},ma.createHydrationContainer=function(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o,Ai,Qi,Ni){return G=z0(Ae,Be,!0,G,Oe,Je,ln,wn,$o,Ai,Qi,Ni),G.context=TI(null),Ae=G.current,Be=i0(),Be=M(Be),Oe=Kt(Be),Oe.callback=V??null,rn(Ae,Oe,Be),V=Be,G.current.lanes=V,B(G,V),at(G),G},ma.createPortal=function(G,V,Ae){var Be=3\u003carguments.length\u0026\u0026arguments[3]!==void 0?arguments[3]:null;return{$typeof:B1,key:Be==null?null:\"\"+Be,children:G,containerInfo:V,implementation:Ae}},ma.createRoleSelector=function(G){return{$typeof:U2,value:G}},ma.createTestNameSelector=function(G){return{$typeof:K2,value:G}},ma.createTextSelector=function(G){return{$typeof:ty,value:G}},ma.defaultOnCaughtError=function(G){console.error(G)},ma.defaultOnRecoverableError=function(G){Ha(G)},ma.defaultOnUncaughtError=function(G){Ha(G)},ma.deferredUpdates=function(G){var V=Xr.T,Ae=Sm();try{return J0(32),Xr.T=null,G()}finally{J0(Ae),Xr.T=V}},ma.discreteUpdates=function(G,V,Ae,Be,Oe){var Je=Xr.T,Tt=Sm();try{return J0(2),Xr.T=null,G(V,Ae,Be,Oe)}finally{J0(Tt),Xr.T=Je,ls===0\u0026\u0026(x3=cs()+500)}},ma.findAllNodes=nc,ma.findBoundingRects=function(G,V){if(!JC)throw Error(r(363));V=nc(G,V),G=[];for(var Ae=0;Ae\u003cV.length;Ae++)G.push(D2(V[Ae]));for(V=G.length-1;0\u003cV;V--){Ae=G[V];for(var Be=Ae.x,Oe=Be+Ae.width,Je=Ae.y,Tt=Je+Ae.height,ln=V-1;0\u003c=ln;ln--)if(V!==ln){var wn=G[ln],$o=wn.x,Ai=$o+wn.width,Qi=wn.y,Ni=Qi+wn.height;if(Be\u003e=$o\u0026\u0026Je\u003e=Qi\u0026\u0026Oe\u003c=Ai\u0026\u0026Tt\u003c=Ni){G.splice(V,1);break}else if(Be!==$o||Ae.width!==wn.width||Ni\u003cJe||Qi\u003eTt){if(!(Je!==Qi||Ae.height!==wn.height||Ai\u003cBe||$o\u003eOe)){$o\u003eBe\u0026\u0026(wn.width+=$o-Be,wn.x=Be),Ai\u003cOe\u0026\u0026(wn.width=Oe-$o),G.splice(V,1);break}}else{Qi\u003eJe\u0026\u0026(wn.height+=Qi-Je,wn.y=Je),Ni\u003cTt\u0026\u0026(wn.height=Tt-Qi),G.splice(V,1);break}}}return G},ma.findHostInstance=Ef,ma.findHostInstanceWithNoPortals=function(G){return G=A(G),G=G!==null?l(G):null,G===null?null:CA(G.stateNode)},ma.findHostInstanceWithWarning=function(G){return Ef(G)},ma.flushPassiveEffects=sp,ma.flushSyncFromReconciler=function(G){var V=ls;ls|=1;var Ae=Xr.T,Be=Sm();try{if(J0(2),Xr.T=null,G)return G()}finally{J0(Be),Xr.T=Ae,ls=V,(ls\u00266)===0\u0026\u0026nt(0)}},ma.flushSyncWork=gg,ma.focusWithin=function(G,V){if(!JC)throw Error(r(363));for(G=bs(G),V=vI(G,V),V=Array.from(V),G=0;G\u003cV.length;){var Ae=V[G++],Be=Ae.tag;if(!Qm(Ae)){if((Be===5||Be===26||Be===27)\u0026\u0026WE(Ae.stateNode))return!0;for(Ae=Ae.child;Ae!==null;)V.push(Ae),Ae=Ae.sibling}}return!1},ma.getFindAllNodesFailureDescription=function(G,V){if(!JC)throw Error(r(363));var Ae=0,Be=[];G=[bs(G),0];for(var Oe=0;Oe\u003cG.length;){var Je=G[Oe++],Tt=Je.tag,ln=G[Oe++],wn=V[ln];if((Tt!==5\u0026\u0026Tt!==26\u0026\u0026Tt!==27||!Qm(Je))\u0026\u0026(Zo(Je,wn)\u0026\u0026(Be.push(ip(wn)),ln++,ln\u003eAe\u0026\u0026(Ae=ln)),ln\u003cV.length))for(Je=Je.child;Je!==null;)G.push(Je,ln),Je=Je.sibling}if(Ae\u003cV.length){for(G=[];Ae\u003cV.length;Ae++)G.push(ip(V[Ae]));return`findAllNodes was able to match part of the selector:\n `+(Be.join(\" \u003e \")+`\n\nNo matching component was found for:\n `)+G.join(\" \u003e \")}return null},ma.getPublicRootInstance=function(G){if(G=G.current,!G.child)return null;switch(G.child.tag){case 27:case 5:return CA(G.child.stateNode);default:return G.child.stateNode}},ma.injectIntoDevTools=function(){var G={bundleType:0,version:v2,rendererPackageName:Ts,currentDispatcherRef:Xr,reconcilerVersion:\"19.1.0\"};if(S1!==null\u0026\u0026(G.rendererConfig=S1),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__\u003e\"u\")G=!1;else{var V=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(V.isDisabled||!V.supportsFiber)G=!0;else{try{_u=V.inject(G),Ig=V}catch{}G=!!V.checkDCE}}return G},ma.isAlreadyRendering=function(){return(ls\u00266)!==0},ma.observeVisibleRects=function(G,V,Ae,Be){if(!JC)throw Error(r(363));G=nc(G,V);var Oe=jE(G,Ae,Be).disconnect;return{disconnect:function(){Oe()}}},ma.shouldError=function(){return null},ma.shouldSuspend=function(){return!1},ma.startHostTransition=function(G,V,Ae,Be){if(G.tag!==5)throw Error(r(476));var Oe=il(G).queue;Nd(G,Oe,V,sl,Ae===null?i:function(){var Je=il(G).next.queue;return gu(G,Je,{},i0()),Ae(Be)})},ma.updateContainer=function(G,V,Ae,Be){var Oe=V.current,Je=i0();return Q4(Oe,Je,G,V,Ae,Be),Je},ma.updateContainerSync=function(G,V,Ae,Be){return Q4(V.current,2,G,V,Ae,Be),2},ma},t.exports.default=t.exports,Object.defineProperty(t.exports,\"__esModule\",{value:!0})})($Be)),$Be.exports}var qBe={exports:{}},Apt;function iJn(){return Apt||(Apt=1,(function(t){var e={env:{},version:\"\"};e.env.NODE_ENV!==\"production\"\u0026\u0026(t.exports=function(n){function o(P,T){for(P=P.memoizedState;P!==null\u0026\u00260\u003cT;)P=P.next,T--;return P}function i(P,T,q,de){if(q\u003e=T.length)return de;var Se=T[q],Ne=cs(P)?P.slice():al({},P);return Ne[Se]=i(P[Se],T,q+1,de),Ne}function r(P,T,q){if(T.length!==q.length)console.warn(\"copyWithRename() expects paths of the same length\");else{for(var de=0;de\u003cq.length-1;de++)if(T[de]!==q[de]){console.warn(\"copyWithRename() expects paths to be the same except for the deepest key\");return}return s(P,T,q,0)}}function s(P,T,q,de){var Se=T[de],Ne=cs(P)?P.slice():al({},P);return de+1===T.length?(Ne[q[de]]=Ne[Se],cs(Ne)?Ne.splice(Se,1):delete Ne[Se]):Ne[Se]=s(P[Se],T,q,de+1),Ne}function a(P,T,q){var de=T[q],Se=cs(P)?P.slice():al({},P);return q+1===T.length?(cs(Se)?Se.splice(de,1):delete Se[de],Se):(Se[de]=a(P[de],T,q+1),Se)}function A(){return!1}function c(){return null}function l(P,T,q,de){return new i5(P,T,q,de)}function u(P,T){P.context===zp\u0026\u0026(r5(T,P,null,null),D2())}function g(P,T){if(bg!==null){var q=T.staleFamilies;T=T.updatedFamilies,jC(),wm(P.current,T,q),D2()}}function h(P){bg=P}function d(){}function p(){console.error(\"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks\")}function m(){console.error(\"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\")}function _(){}function f(P){var T=[];return P.forEach(function(q){T.push(q)}),T.sort().join(\", \")}function I(P){var T=P,q=P;if(P.alternate)for(;T.return;)T=T.return;else{P=T;do T=P,(T.flags\u00264098)!==0\u0026\u0026(q=T.return),P=T.return;while(P)}return T.tag===3?q:null}function C(P){if(I(P)!==P)throw Error(\"Unable to find node on an unmounted component.\")}function y(P){var T=P.alternate;if(!T){if(T=I(P),T===null)throw Error(\"Unable to find node on an unmounted component.\");return T!==P?null:P}for(var q=P,de=T;;){var Se=q.return;if(Se===null)break;var Ne=Se.alternate;if(Ne===null){if(de=Se.return,de!==null){q=de;continue}break}if(Se.child===Ne.child){for(Ne=Se.child;Ne;){if(Ne===q)return C(Se),P;if(Ne===de)return C(Se),T;Ne=Ne.sibling}throw Error(\"Unable to find node on an unmounted component.\")}if(q.return!==de.return)q=Se,de=Ne;else{for(var ut=!1,Ft=Se.child;Ft;){if(Ft===q){ut=!0,q=Se,de=Ne;break}if(Ft===de){ut=!0,de=Se,q=Ne;break}Ft=Ft.sibling}if(!ut){for(Ft=Ne.child;Ft;){if(Ft===q){ut=!0,q=Ne,de=Se;break}if(Ft===de){ut=!0,de=Ne,q=Se;break}Ft=Ft.sibling}if(!ut)throw Error(\"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\")}}if(q.alternate!==de)throw Error(\"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\")}if(q.tag!==3)throw Error(\"Unable to find node on an unmounted component.\");return q.stateNode.current===q?P:T}function x(P){return P=y(P),P!==null?E(P):null}function E(P){var T=P.tag;if(T===5||T===26||T===27||T===6)return P;for(P=P.child;P!==null;){if(T=E(P),T!==null)return T;P=P.sibling}return null}function B(P){var T=P.tag;if(T===5||T===26||T===27||T===6)return P;for(P=P.child;P!==null;){if(P.tag!==4\u0026\u0026(T=B(P),T!==null))return T;P=P.sibling}return null}function S(P){return P===null||typeof P!=\"object\"?null:(P=h9\u0026\u0026P[h9]||P[\"@@iterator\"],typeof P==\"function\"?P:null)}function Q(P){if(P==null)return null;if(typeof P==\"function\")return P.$typeof===yc?null:P.displayName||P.name||null;if(typeof P==\"string\")return P;switch(P){case P1:return\"Fragment\";case Gp:return\"Profiler\";case Wc:return\"StrictMode\";case O2:return\"Suspense\";case G2:return\"SuspenseList\";case qC:return\"Activity\"}if(typeof P==\"object\")switch(typeof P.tag==\"number\"\u0026\u0026console.error(\"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"),P.$typeof){case Al:return\"Portal\";case mg:return(P.displayName||\"Context\")+\".Provider\";case Mm:return(P._context.displayName||\"Context\")+\".Consumer\";case _g:var T=P.render;return P=P.displayName,P||(P=T.displayName||T.name||\"\",P=P!==\"\"?\"ForwardRef(\"+P+\")\":\"ForwardRef\"),P;case RA:return T=P.displayName||null,T!==null?T:Q(P.type)||\"Memo\";case jg:T=P._payload,P=P._init;try{return Q(P(T))}catch{}}return null}function w(P){var T=P.type;switch(P.tag){case 31:return\"Activity\";case 24:return\"Cache\";case 9:return(T._context.displayName||\"Context\")+\".Consumer\";case 10:return(T.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return P=T.render,P=P.displayName||P.name||\"\",T.displayName||(P!==\"\"?\"ForwardRef(\"+P+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 26:case 27:case 5:return T;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Q(T);case 8:return T===Wc?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 14:case 15:if(typeof T==\"function\")return T.displayName||T.name||null;if(typeof T==\"string\")return T;break;case 29:if(T=P._debugInfo,T!=null){for(var q=T.length-1;0\u003c=q;q--)if(typeof T[q].name==\"string\")return T[q].name}if(P.return!==null)return w(P.return)}return null}function M(P){return{current:P}}function k(P,T){0\u003eUu?console.error(\"Unexpected pop.\"):(T!==Sl[Uu]\u0026\u0026console.error(\"Unexpected Fiber popped.\"),P.current=hl[Uu],hl[Uu]=null,Sl[Uu]=null,Uu--)}function R(P,T,q){Uu++,hl[Uu]=P.current,Sl[Uu]=q,P.current=T}function F(P){return P\u003e\u003e\u003e=0,P===0?32:31-(Jp(P)/P_|0)|0}function O(P){if(P\u00261)return\"SyncHydrationLane\";if(P\u00262)return\"Sync\";if(P\u00264)return\"InputContinuousHydration\";if(P\u00268)return\"InputContinuous\";if(P\u002616)return\"DefaultHydration\";if(P\u002632)return\"Default\";if(P\u0026128)return\"TransitionHydration\";if(P\u00264194048)return\"Transition\";if(P\u002662914560)return\"Retry\";if(P\u002667108864)return\"SelectiveHydration\";if(P\u0026134217728)return\"IdleHydration\";if(P\u0026268435456)return\"Idle\";if(P\u0026536870912)return\"Offscreen\";if(P\u00261073741824)return\"Deferred\"}function U(P){var T=P\u002642;if(T!==0)return T;switch(P\u0026-P){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return P\u00264194048;case 4194304:case 8388608:case 16777216:case 33554432:return P\u002662914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error(\"Should have found matching lanes. This is a bug in React.\"),P}}function Y(P,T,q){var de=P.pendingLanes;if(de===0)return 0;var Se=0,Ne=P.suspendedLanes,ut=P.pingedLanes;P=P.warmLanes;var Ft=de\u0026134217727;return Ft!==0?(de=Ft\u0026~Ne,de!==0?Se=U(de):(ut\u0026=Ft,ut!==0?Se=U(ut):q||(q=Ft\u0026~P,q!==0\u0026\u0026(Se=U(q))))):(Ft=de\u0026~Ne,Ft!==0?Se=U(Ft):ut!==0?Se=U(ut):q||(q=de\u0026~P,q!==0\u0026\u0026(Se=U(q)))),Se===0?0:T!==0\u0026\u0026T!==Se\u0026\u0026(T\u0026Ne)===0\u0026\u0026(Ne=Se\u0026-Se,q=T\u0026-T,Ne\u003e=q||Ne===32\u0026\u0026(q\u00264194048)!==0)?T:Se}function W(P,T){return(P.pendingLanes\u0026~(P.suspendedLanes\u0026~P.pingedLanes)\u0026T)===0}function te(P,T){switch(P){case 1:case 2:case 4:case 8:case 64:return T+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return T+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error(\"Should have found matching lanes. This is a bug in React.\"),-1}}function j(){var P=Vl;return Vl\u003c\u003c=1,(Vl\u00264194048)===0\u0026\u0026(Vl=256),P}function J(){var P=Mh;return Mh\u003c\u003c=1,(Mh\u002662914560)===0\u0026\u0026(Mh=4194304),P}function oe(P){for(var T=[],q=0;31\u003eq;q++)T.push(P);return T}function ie(P,T){P.pendingLanes|=T,T!==268435456\u0026\u0026(P.suspendedLanes=0,P.pingedLanes=0,P.warmLanes=0)}function ne(P,T,q,de,Se,Ne){var ut=P.pendingLanes;P.pendingLanes=q,P.suspendedLanes=0,P.pingedLanes=0,P.warmLanes=0,P.expiredLanes\u0026=q,P.entangledLanes\u0026=q,P.errorRecoveryDisabledLanes\u0026=q,P.shellSuspendCounter=0;var Ft=P.entanglements,Tn=P.expirationTimes,_o=P.hiddenUpdates;for(q=ut\u0026~q;0\u003cq;){var di=31-pl(q),li=1\u003c\u003cdi;Ft[di]=0,Tn[di]=-1;var vi=_o[di];if(vi!==null)for(_o[di]=null,di=0;di\u003cvi.length;di++){var Ws=vi[di];Ws!==null\u0026\u0026(Ws.lane\u0026=-536870913)}q\u0026=~li}de!==0\u0026\u0026le(P,de,0),Ne!==0\u0026\u0026Se===0\u0026\u0026P.tag!==0\u0026\u0026(P.suspendedLanes|=Ne\u0026~(ut\u0026~T))}function le(P,T,q){P.pendingLanes|=T,P.suspendedLanes\u0026=~T;var de=31-pl(T);P.entangledLanes|=T,P.entanglements[de]=P.entanglements[de]|1073741824|q\u00264194090}function ge(P,T){var q=P.entangledLanes|=T;for(P=P.entanglements;q;){var de=31-pl(q),Se=1\u003c\u003cde;Se\u0026T|P[de]\u0026T\u0026\u0026(P[de]|=T),q\u0026=~Se}}function _e(P){switch(P){case 2:P=1;break;case 8:P=4;break;case 32:P=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:P=128;break;case 268435456:P=134217728;break;default:P=0}return P}function ue(P,T,q){if(Ae)for(P=P.pendingUpdatersLaneMap;0\u003cq;){var de=31-pl(q),Se=1\u003c\u003cde;P[de].add(T),q\u0026=~Se}}function fe(P,T){if(Ae)for(var q=P.pendingUpdatersLaneMap,de=P.memoizedUpdaters;0\u003cT;){var Se=31-pl(T);P=1\u003c\u003cSe,Se=q[Se],0\u003cSe.size\u0026\u0026(Se.forEach(function(Ne){var ut=Ne.alternate;ut!==null\u0026\u0026de.has(ut)||de.add(Ne)}),Se.clear()),T\u0026=~P}}function pe(P){return P\u0026=-P,2\u003cP?8\u003cP?(P\u0026134217727)!==0?32:268435456:8:2}function ye(P){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__\u003e\"u\")return!1;var T=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(T.isDisabled)return!0;if(!T.supportsFiber)return console.error(\"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools\"),!0;try{up=T.inject(P),Ku=T}catch(q){console.error(\"React instrumentation encountered an error: %s.\",q)}return!!T.checkDCE}function Me(P){if(typeof g5==\"function\"\u0026\u0026oy(P),Ku\u0026\u0026typeof Ku.setStrictMode==\"function\")try{Ku.setStrictMode(up,P)}catch(T){V||(V=!0,console.error(\"React instrumentation encountered an error: %s\",T))}}function ve(P){G=P}function he(){G!==null\u0026\u0026typeof G.markCommitStopped==\"function\"\u0026\u0026G.markCommitStopped()}function Qe(P){G!==null\u0026\u0026typeof G.markComponentRenderStarted==\"function\"\u0026\u0026G.markComponentRenderStarted(P)}function Pe(){G!==null\u0026\u0026typeof G.markComponentRenderStopped==\"function\"\u0026\u0026G.markComponentRenderStopped()}function we(P){G!==null\u0026\u0026typeof G.markRenderStarted==\"function\"\u0026\u0026G.markRenderStarted(P)}function Te(){G!==null\u0026\u0026typeof G.markRenderStopped==\"function\"\u0026\u0026G.markRenderStopped()}function Re(P,T){G!==null\u0026\u0026typeof G.markStateUpdateScheduled==\"function\"\u0026\u0026G.markStateUpdateScheduled(P,T)}function Ee(){}function ke(){if(Be===0){Oe=console.log,Je=console.info,Tt=console.warn,ln=console.error,wn=console.group,$o=console.groupCollapsed,Ai=console.groupEnd;var P={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}Be++}function Ce(){if(Be--,Be===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:al({},P,{value:Oe}),info:al({},P,{value:Je}),warn:al({},P,{value:Tt}),error:al({},P,{value:ln}),group:al({},P,{value:wn}),groupCollapsed:al({},P,{value:$o}),groupEnd:al({},P,{value:Ai})})}0\u003eBe\u0026\u0026console.error(\"disabledDepth fell below zero. This is a bug in React. Please file an issue.\")}function Le(P){if(Qi===void 0)try{throw Error()}catch(q){var T=q.stack.trim().match(/\\n( *(at )?)/);Qi=T\u0026\u0026T[1]||\"\",Ni=-1\u003cq.stack.indexOf(`\n at`)?\" (\u003canonymous\u003e)\":-1\u003cq.stack.indexOf(\"@\")?\"@unknown:0:0\":\"\"}return`\n`+Qi+P+Ni}function Ye(P,T){if(!P||Xs)return\"\";var q=jp.get(P);if(q!==void 0)return q;Xs=!0,q=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var de=null;de=Jn.H,Jn.H=null,ke();try{var Se={DetermineComponentFrameRoot:function(){try{if(T){var vi=function(){throw Error()};if(Object.defineProperty(vi.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"\u0026\u0026Reflect.construct){try{Reflect.construct(vi,[])}catch(ya){var Ws=ya}Reflect.construct(P,[],vi)}else{try{vi.call()}catch(ya){Ws=ya}P.call(vi.prototype)}}else{try{throw Error()}catch(ya){Ws=ya}(vi=P())\u0026\u0026typeof vi.catch==\"function\"\u0026\u0026vi.catch(function(){})}}catch(ya){if(ya\u0026\u0026Ws\u0026\u0026typeof ya.stack==\"string\")return[ya.stack,Ws.stack]}return[null,null]}};Se.DetermineComponentFrameRoot.displayName=\"DetermineComponentFrameRoot\";var Ne=Object.getOwnPropertyDescriptor(Se.DetermineComponentFrameRoot,\"name\");Ne\u0026\u0026Ne.configurable\u0026\u0026Object.defineProperty(Se.DetermineComponentFrameRoot,\"name\",{value:\"DetermineComponentFrameRoot\"});var ut=Se.DetermineComponentFrameRoot(),Ft=ut[0],Tn=ut[1];if(Ft\u0026\u0026Tn){var _o=Ft.split(`\n`),di=Tn.split(`\n`);for(ut=Ne=0;Ne\u003c_o.length\u0026\u0026!_o[Ne].includes(\"DetermineComponentFrameRoot\");)Ne++;for(;ut\u003cdi.length\u0026\u0026!di[ut].includes(\"DetermineComponentFrameRoot\");)ut++;if(Ne===_o.length||ut===di.length)for(Ne=_o.length-1,ut=di.length-1;1\u003c=Ne\u0026\u00260\u003c=ut\u0026\u0026_o[Ne]!==di[ut];)ut--;for(;1\u003c=Ne\u0026\u00260\u003c=ut;Ne--,ut--)if(_o[Ne]!==di[ut]){if(Ne!==1||ut!==1)do if(Ne--,ut--,0\u003eut||_o[Ne]!==di[ut]){var li=`\n`+_o[Ne].replace(\" at new \",\" at \");return P.displayName\u0026\u0026li.includes(\"\u003canonymous\u003e\")\u0026\u0026(li=li.replace(\"\u003canonymous\u003e\",P.displayName)),typeof P==\"function\"\u0026\u0026jp.set(P,li),li}while(1\u003c=Ne\u0026\u00260\u003c=ut);break}}}finally{Xs=!1,Jn.H=de,Ce(),Error.prepareStackTrace=q}return _o=(_o=P?P.displayName||P.name:\"\")?Le(_o):\"\",typeof P==\"function\"\u0026\u0026jp.set(P,_o),_o}function tt(P){var T=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,P=P.stack,Error.prepareStackTrace=T,P.startsWith(`Error: react-stack-top-frame\n`)\u0026\u0026(P=P.slice(29)),T=P.indexOf(`\n`),T!==-1\u0026\u0026(P=P.slice(T+1)),T=P.indexOf(\"react-stack-bottom-frame\"),T!==-1\u0026\u0026(T=P.lastIndexOf(`\n`,T)),T!==-1)P=P.slice(0,T);else return\"\";return P}function At(P){switch(P.tag){case 26:case 27:case 5:return Le(P.type);case 16:return Le(\"Lazy\");case 13:return Le(\"Suspense\");case 19:return Le(\"SuspenseList\");case 0:case 15:return Ye(P.type,!1);case 11:return Ye(P.type.render,!1);case 1:return Ye(P.type,!0);case 31:return Le(\"Activity\");default:return\"\"}}function at(P){try{var T=\"\";do{T+=At(P);var q=P._debugInfo;if(q)for(var de=q.length-1;0\u003c=de;de--){var Se=q[de];if(typeof Se.name==\"string\"){var Ne=T,ut=Se.env,Ft=Le(Se.name+(ut?\" [\"+ut+\"]\":\"\"));T=Ne+Ft}}P=P.return}while(P);return T}catch(Tn){return`\nError generating stack: `+Tn.message+`\n`+Tn.stack}}function nt(P){return(P=P?P.displayName||P.name:\"\")?Le(P):\"\"}function gt(P,T){if(typeof P==\"object\"\u0026\u0026P!==null){var q=L1.get(P);return q!==void 0?q:(T={value:P,source:T,stack:at(T)},L1.set(P,T),T)}return{value:P,source:T,stack:at(T)}}function bt(P,T){it(),Eg[Yn++]=to,Eg[Yn++]=Qn,Qn=P,to=T}function Ct(P,T,q){it(),zo[Bi++]=Or,zo[Bi++]=Js,zo[Bi++]=eA,eA=P;var de=Or;P=Js;var Se=32-pl(de)-1;de\u0026=~(1\u003c\u003cSe),q+=1;var Ne=32-pl(T)+Se;if(30\u003cNe){var ut=Se-Se%5;Ne=(de\u0026(1\u003c\u003cut)-1).toString(32),de\u003e\u003e=ut,Se-=ut,Or=1\u003c\u003c32-pl(T)+Se|q\u003c\u003cSe|de,Js=Ne+P}else Or=1\u003c\u003cNe|q\u003c\u003cSe|de,Js=P}function Dt(P){it(),P.return!==null\u0026\u0026(bt(P,1),Ct(P,1,0))}function kt(P){for(;P===Qn;)Qn=Eg[--Yn],Eg[Yn]=null,to=Eg[--Yn],Eg[Yn]=null;for(;P===eA;)eA=zo[--Bi],zo[Bi]=null,Js=zo[--Bi],zo[Bi]=null,Or=zo[--Bi],zo[Bi]=null}function it(){ja||console.error(\"Expected to be hydrating. This is a bug in React. Please file an issue.\")}function Yt(P){return P===null\u0026\u0026console.error(\"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.\"),P}function pn(P,T){R(Bg,T,P),R(Wa,P,P),R(Qs,null,P),T=Y2(T),k(Qs,P),R(Qs,T,P)}function be(P){k(Qs,P),k(Wa,P),k(Bg,P)}function et(){return Yt(Qs.current)}function It(P){P.memoizedState!==null\u0026\u0026R(d5,P,P);var T=Yt(Qs.current),q=_u(T,P.type);T!==q\u0026\u0026(R(Wa,P,P),R(Qs,q,P))}function Bt(P){Wa.current===P\u0026\u0026(k(Qs,P),k(Wa,P)),d5.current===P\u0026\u0026(k(d5,P),jc?Kl._currentValue=Qh:Kl._currentValue2=Qh)}function mt(P,T){return P.serverProps===void 0\u0026\u0026P.serverTail.length===0\u0026\u0026P.children.length===1\u0026\u00263\u003cP.distanceFromLeaf\u0026\u0026P.distanceFromLeaf\u003e15-T?mt(P.children[0],T):P}function st(P){return\" \"+\" \".repeat(P)}function xt(P){return\"+ \"+\" \".repeat(P)}function Xe(P){return\"- \"+\" \".repeat(P)}function Ze(P){switch(P.tag){case 26:case 27:case 5:return P.type;case 16:return\"Lazy\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 0:case 15:return P=P.type,P.displayName||P.name||null;case 11:return P=P.type.render,P.displayName||P.name||null;case 1:return P=P.type,P.displayName||P.name||null;default:return null}}function dt(P,T){return E3.test(P)?(P=JSON.stringify(P),P.length\u003eT-2?8\u003eT?'{\"...\"}':\"{\"+P.slice(0,T-7)+'...\"}':\"{\"+P+\"}\"):P.length\u003eT?5\u003eT?'{\"...\"}':P.slice(0,T-3)+\"...\":P}function Ut(P,T,q){var de=120-2*q;if(T===null)return xt(q)+dt(P,de)+`\n`;if(typeof T==\"string\"){for(var Se=0;Se\u003cT.length\u0026\u0026Se\u003cP.length\u0026\u0026T.charCodeAt(Se)===P.charCodeAt(Se);Se++);return Se\u003ede-8\u0026\u002610\u003cSe\u0026\u0026(P=\"...\"+P.slice(Se-8),T=\"...\"+T.slice(Se-8)),xt(q)+dt(P,de)+`\n`+Xe(q)+dt(T,de)+`\n`}return st(q)+dt(P,de)+`\n`}function Wt(P){return Object.prototype.toString.call(P).replace(/^\\[object (.*)\\]$/,function(T,q){return q})}function Xt(P,T){switch(typeof P){case\"string\":return P=JSON.stringify(P),P.length\u003eT?5\u003eT?'\"...\"':P.slice(0,T-4)+'...\"':P;case\"object\":if(P===null)return\"null\";if(cs(P))return\"[...]\";if(P.$typeof===v_)return(T=Q(P.type))?\"\u003c\"+T+\"\u003e\":\"\u003c...\u003e\";var q=Wt(P);if(q===\"Object\"){q=\"\",T-=2;for(var de in P)if(P.hasOwnProperty(de)){var Se=JSON.stringify(de);if(Se!=='\"'+de+'\"'\u0026\u0026(de=Se),T-=de.length-2,Se=Xt(P[de],15\u003eT?T:15),T-=Se.length,0\u003eT){q+=q===\"\"?\"...\":\", ...\";break}q+=(q===\"\"?\"\":\",\")+de+\":\"+Se}return\"{\"+q+\"}\"}return q;case\"function\":return(T=P.displayName||P.name)?\"function \"+T:\"function\";default:return String(P)}}function Jt(P,T){return typeof P!=\"string\"||E3.test(P)?\"{\"+Xt(P,T-2)+\"}\":P.length\u003eT-2?5\u003eT?'\"...\"':'\"'+P.slice(0,T-5)+'...\"':'\"'+P+'\"'}function yn(P,T,q){var de=120-q.length-P.length,Se=[],Ne;for(Ne in T)if(T.hasOwnProperty(Ne)\u0026\u0026Ne!==\"children\"){var ut=Jt(T[Ne],120-q.length-Ne.length-1);de-=Ne.length+ut.length+2,Se.push(Ne+\"=\"+ut)}return Se.length===0?q+\"\u003c\"+P+`\u003e\n`:0\u003cde?q+\"\u003c\"+P+\" \"+Se.join(\" \")+`\u003e\n`:q+\"\u003c\"+P+`\n`+q+\" \"+Se.join(`\n`+q+\" \")+`\n`+q+`\u003e\n`}function An(P,T,q){var de=\"\",Se=al({},T),Ne;for(Ne in P)if(P.hasOwnProperty(Ne)){delete Se[Ne];var ut=120-2*q-Ne.length-2,Ft=Xt(P[Ne],ut);T.hasOwnProperty(Ne)?(ut=Xt(T[Ne],ut),de+=xt(q)+Ne+\": \"+Ft+`\n`,de+=Xe(q)+Ne+\": \"+ut+`\n`):de+=xt(q)+Ne+\": \"+Ft+`\n`}for(var Tn in Se)Se.hasOwnProperty(Tn)\u0026\u0026(P=Xt(Se[Tn],120-2*q-Tn.length-2),de+=Xe(q)+Tn+\": \"+P+`\n`);return de}function kn(P,T,q,de){var Se=\"\",Ne=new Map;for(_o in q)q.hasOwnProperty(_o)\u0026\u0026Ne.set(_o.toLowerCase(),_o);if(Ne.size===1\u0026\u0026Ne.has(\"children\"))Se+=yn(P,T,st(de));else{for(var ut in T)if(T.hasOwnProperty(ut)\u0026\u0026ut!==\"children\"){var Ft=120-2*(de+1)-ut.length-1,Tn=Ne.get(ut.toLowerCase());if(Tn!==void 0){Ne.delete(ut.toLowerCase());var _o=T[ut];Tn=q[Tn];var di=Jt(_o,Ft);Ft=Jt(Tn,Ft),typeof _o==\"object\"\u0026\u0026_o!==null\u0026\u0026typeof Tn==\"object\"\u0026\u0026Tn!==null\u0026\u0026Wt(_o)===\"Object\"\u0026\u0026Wt(Tn)===\"Object\"\u0026\u0026(2\u003cObject.keys(_o).length||2\u003cObject.keys(Tn).length||-1\u003cdi.indexOf(\"...\")||-1\u003cFt.indexOf(\"...\"))?Se+=st(de+1)+ut+`={{\n`+An(_o,Tn,de+2)+st(de+1)+`}}\n`:(Se+=xt(de+1)+ut+\"=\"+di+`\n`,Se+=Xe(de+1)+ut+\"=\"+Ft+`\n`)}else Se+=st(de+1)+ut+\"=\"+Jt(T[ut],Ft)+`\n`}Ne.forEach(function(li){if(li!==\"children\"){var vi=120-2*(de+1)-li.length-1;Se+=Xe(de+1)+li+\"=\"+Jt(q[li],vi)+`\n`}}),Se=Se===\"\"?st(de)+\"\u003c\"+P+`\u003e\n`:st(de)+\"\u003c\"+P+`\n`+Se+st(de)+`\u003e\n`}return P=q.children,T=T.children,typeof P==\"string\"||typeof P==\"number\"||typeof P==\"bigint\"?(Ne=\"\",(typeof T==\"string\"||typeof T==\"number\"||typeof T==\"bigint\")\u0026\u0026(Ne=\"\"+T),Se+=Ut(Ne,\"\"+P,de+1)):(typeof T==\"string\"||typeof T==\"number\"||typeof T==\"bigint\")\u0026\u0026(Se=P==null?Se+Ut(\"\"+T,null,de+1):Se+Ut(\"\"+T,void 0,de+1)),Se}function $n(P,T){var q=Ze(P);if(q===null){for(q=\"\",P=P.child;P;)q+=$n(P,T),P=P.sibling;return q}return st(T)+\"\u003c\"+q+`\u003e\n`}function ht(P,T){var q=mt(P,T);if(q!==P\u0026\u0026(P.children.length!==1||P.children[0]!==q))return st(T)+`...\n`+ht(q,T+1);q=\"\";var de=P.fiber._debugInfo;if(de)for(var Se=0;Se\u003cde.length;Se++){var Ne=de[Se].name;typeof Ne==\"string\"\u0026\u0026(q+=st(T)+\"\u003c\"+Ne+`\u003e\n`,T++)}if(de=\"\",Se=P.fiber.pendingProps,P.fiber.tag===6)de=Ut(Se,P.serverProps,T),T++;else if(Ne=Ze(P.fiber),Ne!==null)if(P.serverProps===void 0){de=T;var ut=120-2*de-Ne.length-2,Ft=\"\";for(_o in Se)if(Se.hasOwnProperty(_o)\u0026\u0026_o!==\"children\"){var Tn=Jt(Se[_o],15);if(ut-=_o.length+Tn.length+2,0\u003eut){Ft+=\" ...\";break}Ft+=\" \"+_o+\"=\"+Tn}de=st(de)+\"\u003c\"+Ne+Ft+`\u003e\n`,T++}else P.serverProps===null?(de=yn(Ne,Se,xt(T)),T++):typeof P.serverProps==\"string\"?console.error(\"Should not have matched a non HostText fiber to a Text node. This is a bug in React.\"):(de=kn(Ne,Se,P.serverProps,T),T++);var _o=\"\";for(Se=P.fiber.child,Ne=0;Se\u0026\u0026Ne\u003cP.children.length;)ut=P.children[Ne],ut.fiber===Se?(_o+=ht(ut,T),Ne++):_o+=$n(Se,T),Se=Se.sibling;for(Se\u0026\u00260\u003cP.children.length\u0026\u0026(_o+=st(T)+`...\n`),Se=P.serverTail,P.serverProps===null\u0026\u0026T--,P=0;P\u003cSe.length;P++)Ne=Se[P],_o=typeof Ne==\"string\"?_o+(Xe(T)+dt(Ne,120-2*T)+`\n`):_o+yn(Ne.type,Ne.props,Xe(T));return q+de+_o}function Kt(P){try{return`\n\n`+ht(P,0)}catch{return\"\"}}function rn(){if(H1===null)return\"\";var P=H1;try{var T=\"\";switch(P.tag===6\u0026\u0026(P=P.return),P.tag){case 26:case 27:case 5:T+=Le(P.type);break;case 13:T+=Le(\"Suspense\");break;case 19:T+=Le(\"SuspenseList\");break;case 31:T+=Le(\"Activity\");break;case 30:case 0:case 15:case 1:P._debugOwner||T!==\"\"||(T+=nt(P.type));break;case 11:P._debugOwner||T!==\"\"||(T+=nt(P.type.render))}for(;P;)if(typeof P.tag==\"number\"){var q=P;P=q._debugOwner;var de=q._debugStack;P\u0026\u0026de\u0026\u0026(typeof de!=\"string\"\u0026\u0026(q._debugStack=de=tt(de)),de!==\"\"\u0026\u0026(T+=`\n`+de))}else if(P.debugStack!=null){var Se=P.debugStack;(P=P.owner)\u0026\u0026Se\u0026\u0026(T+=`\n`+tt(Se))}else break;var Ne=T}catch(ut){Ne=`\nError generating stack: `+ut.message+`\n`+ut.stack}return Ne}function Lt(P,T,q,de,Se,Ne,ut){var Ft=H1;Ho(P);try{return P!==null\u0026\u0026P._debugTask?P._debugTask.run(T.bind(null,q,de,Se,Ne,ut)):T(q,de,Se,Ne,ut)}finally{Ho(Ft)}throw Error(\"runWithFiberInDEV should never be called in production. This is a bug in React.\")}function Ho(P){Jn.getCurrentStack=P===null?null:rn,M_=!1,H1=P}function Ao(P,T){if(P.return===null){if(ms===null)ms={fiber:P,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:T};else{if(ms.fiber!==P)throw Error(\"Saw multiple hydration diff roots in a pass. This is a bug in React.\");ms.distanceFromLeaf\u003eT\u0026\u0026(ms.distanceFromLeaf=T)}return ms}var q=Ao(P.return,T+1).children;return 0\u003cq.length\u0026\u0026q[q.length-1].fiber===P?(q=q[q.length-1],q.distanceFromLeaf\u003eT\u0026\u0026(q.distanceFromLeaf=T),q):(T={fiber:P,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:T},q.push(T),T)}function qe(P,T){z2||(P=Ao(P,0),P.serverProps=null,T!==null\u0026\u0026(T=Pa(T),P.serverTail.push(T)))}function vt(P){var T=\"\",q=ms;throw q!==null\u0026\u0026(ms=null,T=Kt(q)),ei(gt(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch \\`if (typeof window !== 'undefined')\\`.\n- Variable input such as \\`Date.now()\\` or \\`Math.random()\\` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch`+T),P)),ZI}function qt(P,T){if(!B0)throw Error(\"Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.\");Rf(P.stateNode,P.type,P.memoizedProps,T,P)||vt(P)}function Zt(P){for(gp=P.return;gp;)switch(gp.tag){case 5:case 13:Wd=!1;return;case 27:case 3:Wd=!0;return;default:gp=gp.return}}function nn(P){if(!B0||P!==gp)return!1;if(!ja)return Zt(P),ja=!0,!1;var T=P.tag;if(os?T!==3\u0026\u0026T!==27\u0026\u0026(T!==5||gl(P.type)\u0026\u0026!Pf(P.type,P.memoizedProps))\u0026\u0026Ma\u0026\u0026(zn(P),vt(P)):T!==3\u0026\u0026(T!==5||gl(P.type)\u0026\u0026!Pf(P.type,P.memoizedProps))\u0026\u0026Ma\u0026\u0026(zn(P),vt(P)),Zt(P),T===13){if(!B0)throw Error(\"Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.\");if(P=P.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(\"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\");Ma=Ha(P)}else Ma=os\u0026\u0026T===27?S0(P.type,Ma):gp?Kp(P.stateNode):null;return!0}function zn(P){for(var T=Ma;T;){var q=Ao(P,0),de=Pa(T);q.serverTail.push(de),T=de.type===\"Suspense\"?Ha(T):Kp(T)}}function Nn(){B0\u0026\u0026(Ma=gp=null,z2=ja=!1)}function Co(){var P=Ff;return P!==null\u0026\u0026(J1===null?J1=P:J1.push.apply(J1,P),Ff=null),P}function ei(P){Ff===null?Ff=[P]:Ff.push(P)}function ro(){var P=ms;if(P!==null){ms=null;for(var T=Kt(P);0\u003cP.children.length;)P=P.children[0];Lt(P.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch \\`if (typeof window !== 'undefined')\\`.\n- Variable input such as \\`Date.now()\\` or \\`Math.random()\\` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s`,\"https://react.dev/link/hydration-mismatch\",T)})}}function To(P,T){return P===T\u0026\u0026(P!==0||1/P===1/T)||P!==P\u0026\u0026T!==T}function yo(){eC=dp=null,J2=!1}function Ro(P,T,q){jc?(R(Lf,T._currentValue,P),T._currentValue=q,R(B3,T._currentRenderer,P),T._currentRenderer!==void 0\u0026\u0026T._currentRenderer!==null\u0026\u0026T._currentRenderer!==b3\u0026\u0026console.error(\"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"),T._currentRenderer=b3):(R(Lf,T._currentValue2,P),T._currentValue2=q,R(iy,T._currentRenderer2,P),T._currentRenderer2!==void 0\u0026\u0026T._currentRenderer2!==null\u0026\u0026T._currentRenderer2!==b3\u0026\u0026console.error(\"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"),T._currentRenderer2=b3)}function On(P,T){var q=Lf.current;jc?(P._currentValue=q,q=B3.current,k(B3,T),P._currentRenderer=q):(P._currentValue2=q,q=iy.current,k(iy,T),P._currentRenderer2=q),k(Lf,T)}function uo(P,T,q){for(;P!==null;){var de=P.alternate;if((P.childLanes\u0026T)!==T?(P.childLanes|=T,de!==null\u0026\u0026(de.childLanes|=T)):de!==null\u0026\u0026(de.childLanes\u0026T)!==T\u0026\u0026(de.childLanes|=T),P===q)break;P=P.return}P!==q\u0026\u0026console.error(\"Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.\")}function Oo(P,T,q,de){var Se=P.child;for(Se!==null\u0026\u0026(Se.return=P);Se!==null;){var Ne=Se.dependencies;if(Ne!==null){var ut=Se.child;Ne=Ne.firstContext;e:for(;Ne!==null;){var Ft=Ne;Ne=Se;for(var Tn=0;Tn\u003cT.length;Tn++)if(Ft.context===T[Tn]){Ne.lanes|=q,Ft=Ne.alternate,Ft!==null\u0026\u0026(Ft.lanes|=q),uo(Ne.return,q,P),de||(ut=null);break e}Ne=Ft.next}}else if(Se.tag===18){if(ut=Se.return,ut===null)throw Error(\"We just came from a parent so we must have had a parent. This is a bug in React.\");ut.lanes|=q,Ne=ut.alternate,Ne!==null\u0026\u0026(Ne.lanes|=q),uo(ut,q,P),ut=null}else ut=Se.child;if(ut!==null)ut.return=Se;else for(ut=Se;ut!==null;){if(ut===P){ut=null;break}if(Se=ut.sibling,Se!==null){Se.return=ut.return,ut=Se;break}ut=ut.return}Se=ut}}function ko(P,T,q,de){P=null;for(var Se=T,Ne=!1;Se!==null;){if(!Ne){if((Se.flags\u0026524288)!==0)Ne=!0;else if((Se.flags\u0026262144)!==0)break}if(Se.tag===10){var ut=Se.alternate;if(ut===null)throw Error(\"Should have a current fiber. This is a bug in React.\");if(ut=ut.memoizedProps,ut!==null){var Ft=Se.type;Nh(Se.pendingProps.value,ut.value)||(P!==null?P.push(Ft):P=[Ft])}}else if(Se===d5.current){if(ut=Se.alternate,ut===null)throw Error(\"Should have a current fiber. This is a bug in React.\");ut.memoizedState.memoizedState!==Se.memoizedState.memoizedState\u0026\u0026(P!==null?P.push(Kl):P=[Kl])}Se=Se.return}P!==null\u0026\u0026Oo(T,P,q,de),T.flags|=262144}function Ko(P){for(P=P.firstContext;P!==null;){var T=P.context;if(!Nh(jc?T._currentValue:T._currentValue2,P.memoizedValue))return!0;P=P.next}return!1}function mi(P){dp=P,eC=null,P=P.dependencies,P!==null\u0026\u0026(P.firstContext=null)}function Fo(P){return J2\u0026\u0026console.error(\"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"),Rs(dp,P)}function Nr(P,T){return dp===null\u0026\u0026mi(P),Rs(P,T)}function Rs(P,T){var q=jc?T._currentValue:T._currentValue2;if(T={context:T,memoizedValue:q,next:null},eC===null){if(P===null)throw Error(\"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\");eC=T,P.dependencies={lanes:0,firstContext:T,_debugThenableState:null},P.flags|=524288}else eC=eC.next=T;return q}function ur(){return{controller:new JS,data:new Map,refCount:0}}function zi(P){P.controller.signal.aborted\u0026\u0026console.warn(\"A cache instance was retained after it was already freed. This likely indicates a bug in React.\"),P.refCount++}function bi(P){P.refCount--,0\u003eP.refCount\u0026\u0026console.warn(\"A cache instance was released after it was already freed. This likely indicates a bug in React.\"),P.refCount===0\u0026\u0026l8(ra,function(){P.controller.abort()})}function Ar(){var P=tC;return tC=0,P}function ws(P){var T=tC;return tC=P,T}function ds(P){var T=tC;return tC+=P,T}function Et(P){Rh=_s(),0\u003eP.actualStartTime\u0026\u0026(P.actualStartTime=Rh)}function Gt(P){if(0\u003c=Rh){var T=_s()-Rh;P.actualDuration+=T,P.selfBaseDuration=T,Rh=-1}}function Rt(P){if(0\u003c=Rh){var T=_s()-Rh;P.actualDuration+=T,Rh=-1}}function Ht(){if(0\u003c=Rh){var P=_s()-Rh;Rh=-1,tC+=P}}function Qt(){Rh=_s()}function Nt(P){for(var T=P.child;T;)P.actualDuration+=T.actualDuration,T=T.sibling}function _n(P){P!==$p\u0026\u0026P.next===null\u0026\u0026($p===null?ry=$p=P:$p=$p.next=P),S3=!0,Jn.actQueue!==null?G1||(G1=!0,jo()):W2||(W2=!0,jo())}function qn(P,T){if(!R4\u0026\u0026S3){R4=!0;do for(var q=!1,de=ry;de!==null;){if(P!==0){var Se=de.pendingLanes;if(Se===0)var Ne=0;else{var ut=de.suspendedLanes,Ft=de.pingedLanes;Ne=(1\u003c\u003c31-pl(42|P)+1)-1,Ne\u0026=Se\u0026~(ut\u0026~Ft),Ne=Ne\u0026201326741?Ne\u0026201326741|1:Ne?Ne|2:0}Ne!==0\u0026\u0026(q=!0,Io(de,Ne))}else Ne=YA,Ne=Y(de,de===wl?Ne:0,de.cancelPendingCommit!==null||de.timeoutHandle!==E0),(Ne\u00263)===0||W(de,Ne)||(q=!0,Io(de,Ne));de=de.next}while(q);R4=!1}}function En(){Rn()}function Rn(){S3=G1=W2=!1;var P=0;sy!==0\u0026\u0026(Za()\u0026\u0026(P=sy),sy=0);for(var T=us(),q=null,de=ry;de!==null;){var Se=de.next,Ne=Hn(de,T);Ne===0?(de.next=null,q===null?ry=Se:q.next=Se,Se===null\u0026\u0026($p=q)):(q=de,(P!==0||(Ne\u00263)!==0)\u0026\u0026(S3=!0)),de=Se}qn(P)}function Hn(P,T){for(var q=P.suspendedLanes,de=P.pingedLanes,Se=P.expirationTimes,Ne=P.pendingLanes\u0026-62914561;0\u003cNe;){var ut=31-pl(Ne),Ft=1\u003c\u003cut,Tn=Se[ut];Tn===-1?((Ft\u0026q)===0||(Ft\u0026de)!==0)\u0026\u0026(Se[ut]=te(Ft,T)):Tn\u003c=T\u0026\u0026(P.expiredLanes|=Ft),Ne\u0026=~Ft}if(T=wl,q=YA,q=Y(P,P===T?q:0,P.cancelPendingCommit!==null||P.timeoutHandle!==E0),de=P.callbackNode,q===0||P===T\u0026\u0026(ml===p8||ml===C9)||P.cancelPendingCommit!==null)return de!==null\u0026\u0026gi(de),P.callbackNode=null,P.callbackPriority=0;if((q\u00263)===0||W(P,q)){if(T=q\u0026-q,T!==P.callbackPriority||Jn.actQueue!==null\u0026\u0026de!==g8)gi(de);else return T;switch(pe(q)){case 2:case 8:q=yu;break;case 32:q=Dh;break;case 268435456:q=V2;break;default:q=Dh}return de=Lo.bind(null,P),Jn.actQueue!==null?(Jn.actQueue.push(de),q=g8):q=ny(q,de),P.callbackPriority=T,P.callbackNode=q,T}return de!==null\u0026\u0026gi(de),P.callbackPriority=2,P.callbackNode=null,2}function Lo(P,T){if(O1=Tm=!1,qd!==cC\u0026\u0026qd!==py)return P.callbackNode=null,P.callbackPriority=0,null;var q=P.callbackNode;if(jC()\u0026\u0026P.callbackNode!==q)return null;var de=YA;return de=Y(P,P===wl?de:0,P.cancelPendingCommit!==null||P.timeoutHandle!==E0),de===0?null:(JE(P,de,T),Hn(P,us()),P.callbackNode!=null\u0026\u0026P.callbackNode===q?Lo.bind(null,P):null)}function Io(P,T){if(jC())return null;Tm=O1,O1=!1,JE(P,T,!0)}function gi(P){P!==g8\u0026\u0026P!==null\u0026\u0026x3(P)}function jo(){Jn.actQueue!==null\u0026\u0026Jn.actQueue.push(function(){return Rn(),null}),zI?rc(function(){(sc\u0026(V1|z1))!==Zp?ny(Jd,En):Rn()}):ny(Jd,En)}function oi(){return sy===0\u0026\u0026(sy=j()),sy}function Ji(P,T){if(D_===null){var q=D_=[];ay=0,Ay=oi(),Y1={status:\"pending\",value:void 0,then:function(de){q.push(de)}}}return ay++,T.then(wi,wi),T}function wi(){if(--ay===0\u0026\u0026D_!==null){Y1!==null\u0026\u0026(Y1.status=\"fulfilled\");var P=D_;D_=null,Ay=0,Y1=null;for(var T=0;T\u003cP.length;T++)(0,P[T])()}}function Br(P,T){var q=[],de={status:\"pending\",value:null,reason:null,then:function(Se){q.push(Se)}};return P.then(function(){de.status=\"fulfilled\",de.value=T;for(var Se=0;Se\u003cq.length;Se++)(0,q[Se])(T)},function(Se){for(de.status=\"rejected\",de.reason=Se,Se=0;Se\u003cq.length;Se++)(0,q[Se])(void 0)}),de}function gr(){var P=m5.current;return P!==null?P:wl.pooledCache}function oa(P,T){T===null?R(m5,m5.current,P):R(m5,T.pool,P)}function hs(){var P=gr();return P===null?null:{parent:jc?Wn._currentValue:Wn._currentValue2,pool:P}}function Li(P,T){if(Nh(P,T))return!0;if(typeof P!=\"object\"||P===null||typeof T!=\"object\"||T===null)return!1;var q=Object.keys(P),de=Object.keys(T);if(q.length!==de.length)return!1;for(de=0;de\u003cq.length;de++){var Se=q[de];if(!m9.call(T,Se)||!Nh(P[Se],T[Se]))return!1}return!0}function ys(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function dr(P){return P=P.status,P===\"fulfilled\"||P===\"rejected\"}function cA(){}function vA(P,T,q){Jn.actQueue!==null\u0026\u0026(Jn.didUsePromise=!0);var de=P.thenables;switch(q=de[q],q===void 0?de.push(T):q!==T\u0026\u0026(P.didWarnAboutUncachedPromise||(P.didWarnAboutUncachedPromise=!0,console.error(\"A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.\")),T.then(cA,cA),T=q),T.status){case\"fulfilled\":return T.value;case\"rejected\":throw P=T.reason,H0(P),P;default:if(typeof T.status==\"string\")T.then(cA,cA);else{if(P=wl,P!==null\u0026\u0026100\u003cP.shellSuspendCounter)throw Error(\"An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\");P=T,P.status=\"pending\",P.then(function(Se){if(T.status===\"pending\"){var Ne=T;Ne.status=\"fulfilled\",Ne.value=Se}},function(Se){if(T.status===\"pending\"){var Ne=T;Ne.status=\"rejected\",Ne.reason=Se}})}switch(T.status){case\"fulfilled\":return T.value;case\"rejected\":throw P=T.reason,H0(P),P}throw N_=T,w3=!0,v3}}function Yl(){if(N_===null)throw Error(\"Expected a suspended thenable. This is a bug in React. Please file an issue.\");var P=N_;return N_=null,w3=!1,P}function H0(P){if(P===v3||P===ed)throw Error(\"Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\")}function ph(){for(var P=oC,T=P3=oC=0;T\u003cP;){var q=Hf[T];Hf[T++]=null;var de=Hf[T];Hf[T++]=null;var Se=Hf[T];Hf[T++]=null;var Ne=Hf[T];if(Hf[T++]=null,de!==null\u0026\u0026Se!==null){var ut=de.pending;ut===null?Se.next=Se:(Se.next=ut.next,ut.next=Se),de.pending=Se}Ne!==0\u0026\u0026Nd(q,Se,Ne)}}function Xh(P,T,q,de){Hf[oC++]=P,Hf[oC++]=T,Hf[oC++]=q,Hf[oC++]=de,P3|=de,P.lanes|=de,P=P.alternate,P!==null\u0026\u0026(P.lanes|=de)}function Bl(P,T,q,de){return Xh(P,T,q,de),il(P)}function fc(P,T){return Xh(P,null,null,T),il(P)}function Nd(P,T,q){P.lanes|=q;var de=P.alternate;de!==null\u0026\u0026(de.lanes|=q);for(var Se=!1,Ne=P.return;Ne!==null;)Ne.childLanes|=q,de=Ne.alternate,de!==null\u0026\u0026(de.childLanes|=q),Ne.tag===22\u0026\u0026(P=Ne.stateNode,P===null||P._visibility\u00261||(Se=!0)),P=Ne,Ne=Ne.return;return P.tag===3?(Ne=P.stateNode,Se\u0026\u0026T!==null\u0026\u0026(Se=31-pl(q),P=Ne.hiddenUpdates,de=P[Se],de===null?P[Se]=[T]:de.push(T),T.lane=q|536870912),Ne):null}function il(P){if(eQ\u003efte)throw tQ=eQ=0,Ik=kK=null,Error(\"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\");tQ\u003exM\u0026\u0026(tQ=0,Ik=null,console.error(\"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.\")),P.alternate===null\u0026\u0026(P.flags\u00264098)!==0\u0026\u0026o5(P);for(var T=P,q=T.return;q!==null;)T.alternate===null\u0026\u0026(T.flags\u00264098)!==0\u0026\u0026o5(P),T=q,q=T.return;return T.tag===3?T.stateNode:null}function Ul(P){P.updateQueue={baseState:P.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function m_(P,T){P=P.updateQueue,T.updateQueue===P\u0026\u0026(T.updateQueue={baseState:P.baseState,firstBaseUpdate:P.firstBaseUpdate,lastBaseUpdate:P.lastBaseUpdate,shared:P.shared,callbacks:null})}function ag(P){return{lane:P,tag:j2,payload:null,callback:null,next:null}}function Rd(P,T,q){var de=P.updateQueue;if(de===null)return null;if(de=de.shared,k4===de\u0026\u0026!_9){var Se=w(P);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s`,Se),_9=!0}return(sc\u0026V1)!==Zp?(Se=de.pending,Se===null?T.next=T:(T.next=Se.next,Se.next=T),de.pending=T,T=il(P),Nd(P,null,q),T):(Xh(P,de,T,q),il(P))}function mh(P,T,q){if(T=T.updateQueue,T!==null\u0026\u0026(T=T.shared,(q\u00264194048)!==0)){var de=T.lanes;de\u0026=P.pendingLanes,q|=de,T.lanes=q,ge(P,q)}}function mm(P,T){var q=P.updateQueue,de=P.alternate;if(de!==null\u0026\u0026(de=de.updateQueue,q===de)){var Se=null,Ne=null;if(q=q.firstBaseUpdate,q!==null){do{var ut={lane:q.lane,tag:q.tag,payload:q.payload,callback:null,next:null};Ne===null?Se=Ne=ut:Ne=Ne.next=ut,q=q.next}while(q!==null);Ne===null?Se=Ne=T:Ne=Ne.next=T}else Se=Ne=T;q={baseState:de.baseState,firstBaseUpdate:Se,lastBaseUpdate:Ne,shared:de.shared,callbacks:de.callbacks},P.updateQueue=q;return}P=q.lastBaseUpdate,P===null?q.firstBaseUpdate=T:P.next=T,q.lastBaseUpdate=T}function gu(){if(F4){var P=Y1;if(P!==null)throw P}}function Ag(P,T,q,de){F4=!1;var Se=P.updateQueue;q2=!1,k4=Se.shared;var Ne=Se.firstBaseUpdate,ut=Se.lastBaseUpdate,Ft=Se.shared.pending;if(Ft!==null){Se.shared.pending=null;var Tn=Ft,_o=Tn.next;Tn.next=null,ut===null?Ne=_o:ut.next=_o,ut=Tn;var di=P.alternate;di!==null\u0026\u0026(di=di.updateQueue,Ft=di.lastBaseUpdate,Ft!==ut\u0026\u0026(Ft===null?di.firstBaseUpdate=_o:Ft.next=_o,di.lastBaseUpdate=Tn))}if(Ne!==null){var li=Se.baseState;ut=0,di=_o=Tn=null,Ft=Ne;do{var vi=Ft.lane\u0026-536870913,Ws=vi!==Ft.lane;if(Ws?(YA\u0026vi)===vi:(de\u0026vi)===vi){vi!==0\u0026\u0026vi===Ay\u0026\u0026(F4=!0),di!==null\u0026\u0026(di=di.next={lane:0,tag:Ft.tag,payload:Ft.payload,callback:null,next:null});e:{vi=P;var ya=Ft,od=T,iQ=q;switch(ya.tag){case WS:if(ya=ya.payload,typeof ya==\"function\"){J2=!0;var T3=ya.call(iQ,li,od);if(vi.mode\u00268){Me(!0);try{ya.call(iQ,li,od)}finally{Me(!1)}}J2=!1,li=T3;break e}li=ya;break e;case $2:vi.flags=vi.flags\u0026-65537|128;case j2:if(T3=ya.payload,typeof T3==\"function\"){if(J2=!0,ya=T3.call(iQ,li,od),vi.mode\u00268){Me(!0);try{T3.call(iQ,li,od)}finally{Me(!1)}}J2=!1}else ya=T3;if(ya==null)break e;li=al({},li,ya);break e;case Of:q2=!0}}vi=Ft.callback,vi!==null\u0026\u0026(P.flags|=64,Ws\u0026\u0026(P.flags|=8192),Ws=Se.callbacks,Ws===null?Se.callbacks=[vi]:Ws.push(vi))}else Ws={lane:vi,tag:Ft.tag,payload:Ft.payload,callback:Ft.callback,next:null},di===null?(_o=di=Ws,Tn=li):di=di.next=Ws,ut|=vi;if(Ft=Ft.next,Ft===null){if(Ft=Se.shared.pending,Ft===null)break;Ws=Ft,Ft=Ws.next,Ws.next=null,Se.lastBaseUpdate=Ws,Se.shared.pending=null}}while(!0);di===null\u0026\u0026(Tn=li),Se.baseState=Tn,Se.firstBaseUpdate=_o,Se.lastBaseUpdate=di,Ne===null\u0026\u0026(Se.shared.lanes=0),ox|=ut,P.lanes=ut,P.memoizedState=li}k4=null}function C0(P,T){if(typeof P!=\"function\")throw Error(\"Invalid argument passed as callback. Expected a function. Instead received: \"+P);P.call(T)}function FC(P,T){var q=P.shared.hiddenCallbacks;if(q!==null)for(P.shared.hiddenCallbacks=null,P=0;P\u003cq.length;P++)C0(q[P],T)}function O0(P,T){var q=P.callbacks;if(q!==null)for(P.callbacks=null,P=0;P\u003cq.length;P++)C0(q[P],T)}function __(P,T){var q=Yf;R(X2,q,P),R(Gf,T,P),Yf=q|T.baseLanes}function Qp(P){R(X2,Yf,P),R(Gf,Gf.current,P)}function _1(P){Yf=X2.current,k(Gf,P),k(X2,P)}function tr(){var P=co;re===null?re=[P]:re.push(P)}function Vo(){var P=co;if(re!==null\u0026\u0026(X++,re[X]!==P)){var T=w(fs);if(!d8.has(T)\u0026\u0026(d8.add(T),re!==null)){for(var q=\"\",de=0;de\u003c=X;de++){var Se=re[de],Ne=de===X?P:Se;for(Se=de+1+\". \"+Se;30\u003eSe.length;)Se+=\" \";Se+=Ne+`\n`,q+=Se}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n`,T,q)}}}function wA(P){P==null||cs(P)||console.error(\"%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.\",co,typeof P)}function Td(){var P=w(fs);jS.has(P)||(jS.add(P),console.error(\"ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.\",P))}function da(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Zh(P,T){if(me)return!1;if(T===null)return console.error(\"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.\",co),!1;P.length!==T.length\u0026\u0026console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s`,co,\"[\"+T.join(\", \")+\"]\",\"[\"+P.join(\", \")+\"]\");for(var q=0;q\u003cT.length\u0026\u0026q\u003cP.length;q++)if(!Nh(P[q],T[q]))return!1;return!0}function mf(P,T,q,de,Se,Ne){tx=Ne,fs=T,re=P!==null?P._debugHookTypes:null,X=-1,me=P!==null\u0026\u0026P.type!==T.type,(Object.prototype.toString.call(q)===\"[object AsyncFunction]\"||Object.prototype.toString.call(q)===\"[object AsyncGeneratorFunction]\")\u0026\u0026(Ne=w(fs),ex.has(Ne)||(ex.add(Ne),console.error(\"%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.\",Ne===null?\"An unknown Component\":\"\u003c\"+Ne+\"\u003e\"))),T.memoizedState=null,T.updateQueue=null,T.lanes=0,Jn.H=P!==null\u0026\u0026P.memoizedState!==null?wt:re!==null?ft:We,nd=Ne=(T.mode\u00268)!==yA;var ut=ci(q,de,Se);if(nd=!1,Th\u0026\u0026(ut=_f(T,q,de,Se)),Ne){Me(!0);try{ut=_f(T,q,de,Se)}finally{Me(!1)}}return LC(P,T),ut}function LC(P,T){T._debugHookTypes=re,T.dependencies===null?R_!==null\u0026\u0026(T.dependencies={lanes:0,firstContext:null,_debugThenableState:R_}):T.dependencies._debugThenableState=R_,Jn.H=He;var q=Ec!==null\u0026\u0026Ec.next!==null;if(tx=0,re=co=u0=Ec=fs=null,X=-1,P!==null\u0026\u0026(P.flags\u002665011712)!==(T.flags\u002665011712)\u0026\u0026console.error(\"Internal React error: Expected static flag was missing. Please notify the React team.\"),iC=!1,Fm=0,R_=null,q)throw Error(\"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\");P===null||xu||(P=P.dependencies,P!==null\u0026\u0026Ko(P)\u0026\u0026(xu=!0)),w3?(w3=!1,P=!0):P=!1,P\u0026\u0026(T=w(T)||\"Unknown\",f9.has(T)||ex.has(T)||(f9.add(T),console.error(\"`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.\")))}function _f(P,T,q,de){fs=P;var Se=0;do{if(Th\u0026\u0026(R_=null),Fm=0,Th=!1,Se\u003e=f5)throw Error(\"Too many re-renders. React limits the number of renders to prevent an infinite loop.\");if(Se+=1,me=!1,u0=Ec=null,P.updateQueue!=null){var Ne=P.updateQueue;Ne.lastEffect=null,Ne.events=null,Ne.stores=null,Ne.memoCache!=null\u0026\u0026(Ne.memoCache.index=0)}X=-1,Jn.H=zt,Ne=ci(T,q,de)}while(Th);return Ne}function _m(){var P=Jn.H,T=P.useState()[0];return T=typeof T.then==\"function\"?G0(T):T,P=P.useState()[0],(Ec!==null?Ec.memoizedState:null)!==P\u0026\u0026(fs.flags|=1024),T}function du(){var P=_5!==0;return _5=0,P}function cg(P,T,q){T.updateQueue=P.updateQueue,T.flags=(T.mode\u002616)!==yA?T.flags\u0026-402655237:T.flags\u0026-2053,P.lanes\u0026=~q}function Ug(P){if(iC){for(P=P.memoizedState;P!==null;){var T=P.queue;T!==null\u0026\u0026(T.pending=null),P=P.next}iC=!1}tx=0,re=u0=Ec=fs=null,X=-1,co=null,Th=!1,Fm=_5=0,R_=null}function Vc(){var P={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return u0===null?fs.memoizedState=u0=P:u0=u0.next=P,u0}function ha(){if(Ec===null){var P=fs.alternate;P=P!==null?P.memoizedState:null}else P=Ec.next;var T=u0===null?fs.memoizedState:u0.next;if(T!==null)u0=T,Ec=P;else{if(P===null)throw fs.alternate===null?Error(\"Update hook called on initial render. This is likely a bug in React. Please file an issue.\"):Error(\"Rendered more hooks than during the previous render.\");Ec=P,P={memoizedState:Ec.memoizedState,baseState:Ec.baseState,baseQueue:Ec.baseQueue,queue:Ec.queue,next:null},u0===null?fs.memoizedState=u0=P:u0=u0.next=P}return u0}function BI(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function G0(P){var T=Fm;return Fm+=1,R_===null\u0026\u0026(R_=ys()),P=vA(R_,P,T),T=fs,(u0===null?T.memoizedState:u0.next)===null\u0026\u0026(T=T.alternate,Jn.H=T!==null\u0026\u0026T.memoizedState!==null?wt:We),P}function PA(P){if(P!==null\u0026\u0026typeof P==\"object\"){if(typeof P.then==\"function\")return G0(P);if(P.$typeof===mg)return Fo(P)}throw Error(\"An unsupported type was passed to use(): \"+String(P))}function _h(P){var T=null,q=fs.updateQueue;if(q!==null\u0026\u0026(T=q.memoCache),T==null){var de=fs.alternate;de!==null\u0026\u0026(de=de.updateQueue,de!==null\u0026\u0026(de=de.memoCache,de!=null\u0026\u0026(T={data:de.data.map(function(Se){return Se.slice()}),index:0})))}if(T==null\u0026\u0026(T={data:[],index:0}),q===null\u0026\u0026(q=BI(),fs.updateQueue=q),q.memoCache=T,q=T.data[T.index],q===void 0||me)for(q=T.data[T.index]=Array(P),de=0;de\u003cP;de++)q[de]=Kd;else q.length!==P\u0026\u0026console.error(\"Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.\",q.length,P);return T.index++,q}function n0(P,T){return typeof T==\"function\"?T(P):T}function HC(P,T,q){var de=Vc();if(q!==void 0){var Se=q(T);if(nd){Me(!0);try{q(T)}finally{Me(!1)}}}else Se=T;return de.memoizedState=de.baseState=Se,P={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P,lastRenderedState:Se},de.queue=P,P=P.dispatch=Fd.bind(null,fs,P),[de.memoizedState,P]}function f1(P){var T=ha();return fm(T,Ec,P)}function fm(P,T,q){var de=P.queue;if(de===null)throw Error(\"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)\");de.lastRenderedReducer=q;var Se=P.baseQueue,Ne=de.pending;if(Ne!==null){if(Se!==null){var ut=Se.next;Se.next=Ne.next,Ne.next=ut}T.baseQueue!==Se\u0026\u0026console.error(\"Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.\"),T.baseQueue=Se=Ne,de.pending=null}if(Ne=P.baseState,Se===null)P.memoizedState=Ne;else{T=Se.next;var Ft=ut=null,Tn=null,_o=T,di=!1;do{var li=_o.lane\u0026-536870913;if(li!==_o.lane?(YA\u0026li)===li:(tx\u0026li)===li){var vi=_o.revertLane;if(vi===0)Tn!==null\u0026\u0026(Tn=Tn.next={lane:0,revertLane:0,action:_o.action,hasEagerState:_o.hasEagerState,eagerState:_o.eagerState,next:null}),li===Ay\u0026\u0026(di=!0);else if((tx\u0026vi)===vi){_o=_o.next,vi===Ay\u0026\u0026(di=!0);continue}else li={lane:0,revertLane:_o.revertLane,action:_o.action,hasEagerState:_o.hasEagerState,eagerState:_o.eagerState,next:null},Tn===null?(Ft=Tn=li,ut=Ne):Tn=Tn.next=li,fs.lanes|=vi,ox|=vi;li=_o.action,nd\u0026\u0026q(Ne,li),Ne=_o.hasEagerState?_o.eagerState:q(Ne,li)}else vi={lane:li,revertLane:_o.revertLane,action:_o.action,hasEagerState:_o.hasEagerState,eagerState:_o.eagerState,next:null},Tn===null?(Ft=Tn=vi,ut=Ne):Tn=Tn.next=vi,fs.lanes|=li,ox|=li;_o=_o.next}while(_o!==null\u0026\u0026_o!==T);if(Tn===null?ut=Ne:Tn.next=Ft,!Nh(Ne,P.memoizedState)\u0026\u0026(xu=!0,di\u0026\u0026(q=Y1,q!==null)))throw q;P.memoizedState=Ne,P.baseState=ut,P.baseQueue=Tn,de.lastRenderedState=Ne}return Se===null\u0026\u0026(de.lanes=0),[P.memoizedState,de.dispatch]}function vp(P){var T=ha(),q=T.queue;if(q===null)throw Error(\"Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)\");q.lastRenderedReducer=P;var de=q.dispatch,Se=q.pending,Ne=T.memoizedState;if(Se!==null){q.pending=null;var ut=Se=Se.next;do Ne=P(Ne,ut.action),ut=ut.next;while(ut!==Se);Nh(Ne,T.memoizedState)||(xu=!0),T.memoizedState=Ne,T.baseQueue===null\u0026\u0026(T.baseState=Ne),q.lastRenderedState=Ne}return[Ne,de]}function ku(P,T,q){var de=fs,Se=Vc();if(ja){if(q===void 0)throw Error(\"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\");var Ne=q();Z2||Ne===q()||(console.error(\"The result of getServerSnapshot should be cached to avoid an infinite loop\"),Z2=!0)}else{if(Ne=T(),Z2||(q=T(),Nh(Ne,q)||(console.error(\"The result of getSnapshot should be cached to avoid an infinite loop\"),Z2=!0)),wl===null)throw Error(\"Expected a work-in-progress root. This is a bug in React. Please file an issue.\");(YA\u0026124)!==0||rt(de,T,Ne)}return Se.memoizedState=Ne,q={value:Ne,getSnapshot:T},Se.queue=q,fh(an.bind(null,de,q,P),[P]),de.flags|=2048,MA(zl|zu,Fa(),Ot.bind(null,de,q,Ne,T),null),Ne}function ot(P,T,q){var de=fs,Se=ha(),Ne=ja;if(Ne){if(q===void 0)throw Error(\"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\");q=q()}else if(q=T(),!Z2){var ut=T();Nh(q,ut)||(console.error(\"The result of getSnapshot should be cached to avoid an infinite loop\"),Z2=!0)}(ut=!Nh((Ec||Se).memoizedState,q))\u0026\u0026(Se.memoizedState=q,xu=!0),Se=Se.queue;var Ft=an.bind(null,de,Se,P);if(Hr(2048,zu,Ft,[P]),Se.getSnapshot!==T||ut||u0!==null\u0026\u0026u0.memoizedState.tag\u0026zl){if(de.flags|=2048,MA(zl|zu,Fa(),Ot.bind(null,de,Se,q,T),null),wl===null)throw Error(\"Expected a work-in-progress root. This is a bug in React. Please file an issue.\");Ne||(tx\u0026124)!==0||rt(de,T,q)}return q}function rt(P,T,q){P.flags|=16384,P={getSnapshot:T,value:q},T=fs.updateQueue,T===null?(T=BI(),fs.updateQueue=T,T.stores=[P]):(q=T.stores,q===null?T.stores=[P]:q.push(P))}function Ot(P,T,q,de){T.value=q,T.getSnapshot=de,Dn(T)\u0026\u0026Xn(P)}function an(P,T,q){return q(function(){Dn(T)\u0026\u0026Xn(P)})}function Dn(P){var T=P.getSnapshot;P=P.value;try{var q=T();return!Nh(P,q)}catch{return!0}}function Xn(P){var T=fc(P,2);T!==null\u0026\u0026s0(T,P,2)}function oo(P){var T=Vc();if(typeof P==\"function\"){var q=P;if(P=q(),nd){Me(!0);try{q()}finally{Me(!1)}}}return T.memoizedState=T.baseState=P,T.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n0,lastRenderedState:P},T}function vo(P){P=oo(P);var T=P.queue,q=_2.bind(null,fs,T);return T.dispatch=q,[P.memoizedState,q]}function Xo(P){var T=Vc();T.memoizedState=T.baseState=P;var q={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return T.queue=q,T=tp.bind(null,fs,!0,q),q.dispatch=T,[P,T]}function Ti(P,T){var q=ha();return ir(q,Ec,P,T)}function ir(P,T,q,de){return P.baseState=q,fm(P,Ec,typeof de==\"function\"?de:n0)}function Gs(P,T){var q=ha();return Ec!==null?ir(q,Ec,P,T):(q.baseState=P,[P,q.queue.dispatch])}function qr(P,T,q,de,Se){if(Im(P))throw Error(\"Cannot update form state while rendering.\");if(P=T.action,P!==null){var Ne={payload:Se,action:P,next:null,isTransition:!0,status:\"pending\",value:null,reason:null,listeners:[],then:function(ut){Ne.listeners.push(ut)}};Jn.T!==null?q(!0):Ne.isTransition=!1,de(Ne),q=T.pending,q===null?(Ne.next=T.pending=Ne,ps(T,Ne)):(Ne.next=q.next,T.pending=q.next=Ne)}}function ps(P,T){var q=T.action,de=T.payload,Se=P.state;if(T.isTransition){var Ne=Jn.T,ut={};Jn.T=ut,Jn.T._updatedFibers=new Set;try{var Ft=q(Se,de),Tn=Jn.S;Tn!==null\u0026\u0026Tn(ut,Ft),Ic(P,T,Ft)}catch(_o){ka(P,T,_o)}finally{Jn.T=Ne,Ne===null\u0026\u0026ut._updatedFibers\u0026\u0026(P=ut._updatedFibers.size,ut._updatedFibers.clear(),10\u003cP\u0026\u0026console.warn(\"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"))}}else try{ut=q(Se,de),Ic(P,T,ut)}catch(_o){ka(P,T,_o)}}function Ic(P,T,q){q!==null\u0026\u0026typeof q==\"object\"\u0026\u0026typeof q.then==\"function\"?(q.then(function(de){lc(P,T,de)},function(de){return ka(P,T,de)}),T.isTransition||console.error(\"An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.\")):lc(P,T,q)}function lc(P,T,q){T.status=\"fulfilled\",T.value=q,gn(T),P.state=q,T=P.pending,T!==null\u0026\u0026(q=T.next,q===T?P.pending=null:(q=q.next,T.next=q,ps(P,q)))}function ka(P,T,q){var de=P.pending;if(P.pending=null,de!==null){de=de.next;do T.status=\"rejected\",T.reason=q,gn(T),T=T.next;while(T!==de)}P.action=null}function gn(P){P=P.listeners;for(var T=0;T\u003cP.length;T++)(0,P[T])()}function bn(P,T){return T}function go(P,T){if(ja){var q=wl.formState;if(q!==null){e:{var de=fs;if(ja){if(Ma){var Se=Up(Ma,Wd);if(Se){Ma=Kp(Se),de=GA(Se);break e}}vt(de)}de=!1}de\u0026\u0026(T=q[0])}}q=Vc(),q.memoizedState=q.baseState=T,de={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bn,lastRenderedState:T},q.queue=de,q=_2.bind(null,fs,de),de.dispatch=q,de=oo(!1);var Ne=tp.bind(null,fs,!1,de.queue);return de=Vc(),Se={state:T,dispatch:null,action:P,pending:null},de.queue=Se,q=qr.bind(null,fs,Se,Ne,q),Se.dispatch=q,de.memoizedState=P,[T,q,!1]}function Go(P){var T=ha();return hr(T,Ec,P)}function hr(P,T,q){if(T=fm(P,T,bn)[0],P=f1(n0)[0],typeof T==\"object\"\u0026\u0026T!==null\u0026\u0026typeof T.then==\"function\")try{var de=G0(T)}catch(ut){throw ut===v3?ed:ut}else de=T;T=ha();var Se=T.queue,Ne=Se.dispatch;return q!==T.memoizedState\u0026\u0026(fs.flags|=2048,MA(zl|zu,Fa(),ia.bind(null,Se,q),null)),[de,Ne,P]}function ia(P,T){P.action=T}function lA(P){var T=ha(),q=Ec;if(q!==null)return hr(T,q,P);ha(),T=T.memoizedState,q=ha();var de=q.queue.dispatch;return q.memoizedState=P,[T,de,!1]}function MA(P,T,q,de){return P={tag:P,create:q,deps:de,inst:T,next:null},T=fs.updateQueue,T===null\u0026\u0026(T=BI(),fs.updateQueue=T),q=T.lastEffect,q===null?T.lastEffect=P.next=P:(de=q.next,q.next=P,P.next=de,T.lastEffect=P),P}function Fa(){return{destroy:void 0,resource:void 0}}function La(P){var T=Vc();return P={current:P},T.memoizedState=P}function Y0(P,T,q,de){var Se=Vc();de=de===void 0?null:de,fs.flags|=P,Se.memoizedState=MA(zl|T,Fa(),q,de)}function Hr(P,T,q,de){var Se=ha();de=de===void 0?null:de;var Ne=Se.memoizedState.inst;Ec!==null\u0026\u0026de!==null\u0026\u0026Zh(de,Ec.memoizedState.deps)?Se.memoizedState=MA(T,Ne,q,de):(fs.flags|=P,Se.memoizedState=MA(zl|T,Ne,q,de))}function fh(P,T){(fs.mode\u002616)!==yA\u0026\u0026(fs.mode\u002664)===yA?Y0(276826112,zu,P,T):Y0(8390656,zu,P,T)}function Ih(P,T){var q=4194308;return(fs.mode\u002616)!==yA\u0026\u0026(q|=134217728),Y0(q,X0,P,T)}function DA(P,T){if(typeof T==\"function\"){P=P();var q=T(P);return function(){typeof q==\"function\"?q():T(null)}}if(T!=null)return T.hasOwnProperty(\"current\")||console.error(\"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.\",\"an object with keys {\"+Object.keys(T).join(\", \")+\"}\"),P=P(),T.current=P,function(){T.current=null}}function OC(P,T,q){typeof T!=\"function\"\u0026\u0026console.error(\"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.\",T!==null?typeof T:\"null\"),q=q!=null?q.concat([P]):null;var de=4194308;(fs.mode\u002616)!==yA\u0026\u0026(de|=134217728),Y0(de,X0,DA.bind(null,T,P),q)}function bI(P,T,q){typeof T!=\"function\"\u0026\u0026console.error(\"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.\",T!==null?typeof T:\"null\"),q=q!=null?q.concat([P]):null,Hr(4,X0,DA.bind(null,T,P),q)}function hu(P,T){return Vc().memoizedState=[P,T===void 0?null:T],P}function lg(P,T){var q=ha();T=T===void 0?null:T;var de=q.memoizedState;return T!==null\u0026\u0026Zh(T,de[1])?de[0]:(q.memoizedState=[P,T],P)}function wp(P,T){var q=Vc();T=T===void 0?null:T;var de=P();if(nd){Me(!0);try{P()}finally{Me(!1)}}return q.memoizedState=[de,T],de}function kd(P,T){var q=ha();T=T===void 0?null:T;var de=q.memoizedState;if(T!==null\u0026\u0026Zh(T,de[1]))return de[0];if(de=P(),nd){Me(!0);try{P()}finally{Me(!1)}}return q.memoizedState=[de,T],de}function ff(P,T){var q=Vc();return Pp(q,P,T)}function I1(P,T){var q=ha();return SI(q,Ec.memoizedState,P,T)}function p2(P,T){var q=ha();return Ec===null?Pp(q,P,T):SI(q,Ec.memoizedState,P,T)}function Pp(P,T,q){return q===void 0||(tx\u00261073741824)!==0?P.memoizedState=T:(P.memoizedState=q,P=b_(),fs.lanes|=P,ox|=P,q)}function SI(P,T,q,de){return Nh(q,T)?q:Gf.current!==null?(P=Pp(P,q,de),Nh(P,T)||(xu=!0),P):(tx\u002642)===0?(xu=!0,P.memoizedState=q):(P=b_(),fs.lanes|=P,ox|=P,T)}function Mp(P,T,q,de,Se){var Ne=$g();za(Ne!==0\u0026\u00268\u003eNe?Ne:8);var ut=Jn.T,Ft={};Jn.T=Ft,tp(P,!1,T,q),Ft._updatedFibers=new Set;try{var Tn=Se(),_o=Jn.S;if(_o!==null\u0026\u0026_o(Ft,Tn),Tn!==null\u0026\u0026typeof Tn==\"object\"\u0026\u0026typeof Tn.then==\"function\"){var di=Br(Tn,de);o0(P,T,di,sl(P))}else o0(P,T,de,sl(P))}catch(li){o0(P,T,{then:function(){},status:\"rejected\",reason:li},sl(P))}finally{za(Ne),Jn.T=ut,ut===null\u0026\u0026Ft._updatedFibers\u0026\u0026(P=Ft._updatedFibers.size,Ft._updatedFibers.clear(),10\u003cP\u0026\u0026console.warn(\"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"))}}function f_(P){var T=P.memoizedState;if(T!==null)return T;T={memoizedState:Qh,baseState:Qh,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:n0,lastRenderedState:Qh},next:null};var q={};return T.next={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:n0,lastRenderedState:q},next:null},P.memoizedState=T,P=P.alternate,P!==null\u0026\u0026(P.memoizedState=T),T}function U0(){var P=oo(!1);return P=Mp.bind(null,fs,P.queue,!0,!1),Vc().memoizedState=P,[!1,P]}function S4(){var P=f1(n0)[0],T=ha().memoizedState;return[typeof P==\"boolean\"?P:G0(P),T]}function ep(){var P=vp(n0)[0],T=ha().memoizedState;return[typeof P==\"boolean\"?P:G0(P),T]}function If(){return Fo(Kl)}function A3(){var P=Vc(),T=wl.identifierPrefix;if(ja){var q=Js,de=Or;q=(de\u0026~(1\u003c\u003c32-pl(de)-1)).toString(32)+q,T=\"«\"+T+\"R\"+q,q=_5++,0\u003cq\u0026\u0026(T+=\"H\"+q.toString(32)),T+=\"»\"}else q=pp++,T=\"«\"+T+\"r\"+q.toString(32)+\"»\";return P.memoizedState=T}function m2(){return Vc().memoizedState=KE.bind(null,fs)}function KE(P,T){for(var q=P.return;q!==null;){switch(q.tag){case 24:case 3:var de=sl(q);P=ag(de);var Se=Rd(q,P,de);Se!==null\u0026\u0026(s0(Se,q,de),mh(Se,q,de)),q=ur(),T!=null\u0026\u0026Se!==null\u0026\u0026console.error(\"The seed argument is not enabled outside experimental channels.\"),P.payload={cache:q};return}q=q.return}}function Fd(P,T,q){var de=arguments;typeof de[3]==\"function\"\u0026\u0026console.error(\"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().\"),de=sl(P);var Se={lane:de,revertLane:0,action:q,hasEagerState:!1,eagerState:null,next:null};Im(P)?pu(T,Se):(Se=Bl(P,T,Se,de),Se!==null\u0026\u0026(s0(Se,P,de),K0(Se,T,de))),Re(P,de)}function _2(P,T,q){var de=arguments;typeof de[3]==\"function\"\u0026\u0026console.error(\"State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().\"),de=sl(P),o0(P,T,q,de),Re(P,de)}function o0(P,T,q,de){var Se={lane:de,revertLane:0,action:q,hasEagerState:!1,eagerState:null,next:null};if(Im(P))pu(T,Se);else{var Ne=P.alternate;if(P.lanes===0\u0026\u0026(Ne===null||Ne.lanes===0)\u0026\u0026(Ne=T.lastRenderedReducer,Ne!==null)){var ut=Jn.H;Jn.H=In;try{var Ft=T.lastRenderedState,Tn=Ne(Ft,q);if(Se.hasEagerState=!0,Se.eagerState=Tn,Nh(Tn,Ft))return Xh(P,T,Se,0),wl===null\u0026\u0026ph(),!1}catch{}finally{Jn.H=ut}}if(q=Bl(P,T,Se,de),q!==null)return s0(q,P,de),K0(q,T,de),!0}return!1}function tp(P,T,q,de){if(Jn.T===null\u0026\u0026Ay===0\u0026\u0026console.error(\"An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition.\"),de={lane:2,revertLane:oi(),action:de,hasEagerState:!1,eagerState:null,next:null},Im(P)){if(T)throw Error(\"Cannot update optimistic state while rendering.\");console.error(\"Cannot call startTransition while rendering.\")}else T=Bl(P,q,de,2),T!==null\u0026\u0026s0(T,P,2);Re(P,2)}function Im(P){var T=P.alternate;return P===fs||T!==null\u0026\u0026T===fs}function pu(P,T){Th=iC=!0;var q=P.pending;q===null?T.next=T:(T.next=q.next,q.next=T),P.pending=T}function K0(P,T,q){if((q\u00264194048)!==0){var de=T.lanes;de\u0026=P.pendingLanes,q|=de,T.lanes=q,ge(P,q)}}function zc(P){var T=vr;return P!=null\u0026\u0026(vr=T===null?P:T.concat(P)),T}function np(P,T,q){for(var de=Object.keys(P.props),Se=0;Se\u003cde.length;Se++){var Ne=de[Se];if(Ne!==\"children\"\u0026\u0026Ne!==\"key\"){T===null\u0026\u0026(T=H2(P,q.mode,0),T._debugInfo=vr,T.return=q),Lt(T,function(ut){console.error(\"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.\",ut)},Ne);break}}}function y0(P){var T=dy;return dy+=1,rC===null\u0026\u0026(rC=ys()),vA(rC,P,T)}function Cm(P,T){T=T.props.ref,P.ref=T!==void 0?T:null}function Dp(P,T){throw T.$typeof===ai?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the \"react\" package is used.\n- A library pre-bundled an old copy of \"react\" or \"react/jsx-runtime\".\n- A compiler tries to \"inline\" JSX instead of using the runtime.`):(P=Object.prototype.toString.call(T),Error(\"Objects are not valid as a React child (found: \"+(P===\"[object Object]\"?\"object with keys {\"+Object.keys(T).join(\", \")+\"}\":P)+\"). If you meant to render a collection of children, use an array instead.\"))}function Kg(P,T){var q=w(P)||\"Component\";z[q]||(z[q]=!0,T=T.displayName||T.name||\"Component\",P.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of \u003c%s /\u003e from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)`,T,T,T):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of \u003c%s /\u003e from render. Or maybe you meant to call this function rather than return it.\n \u003c%s\u003e{%s}\u003c/%s\u003e`,T,T,q,T,q))}function Ld(P,T){var q=w(P)||\"Component\";se[q]||(se[q]=!0,T=String(T),P.tag===3?console.error(`Symbols are not valid as a React child.\n root.render(%s)`,T):console.error(`Symbols are not valid as a React child.\n \u003c%s\u003e%s\u003c/%s\u003e`,q,T,q))}function f2(P){function T(fn,mn){if(P){var vn=fn.deletions;vn===null?(fn.deletions=[mn],fn.flags|=16):vn.push(mn)}}function q(fn,mn){if(!P)return null;for(;mn!==null;)T(fn,mn),mn=mn.sibling;return null}function de(fn){for(var mn=new Map;fn!==null;)fn.key!==null?mn.set(fn.key,fn):mn.set(fn.index,fn),fn=fn.sibling;return mn}function Se(fn,mn){return fn=v1(fn,mn),fn.index=0,fn.sibling=null,fn}function Ne(fn,mn,vn){return fn.index=vn,P?(vn=fn.alternate,vn!==null?(vn=vn.index,vn\u003cmn?(fn.flags|=67108866,mn):vn):(fn.flags|=67108866,mn)):(fn.flags|=1048576,mn)}function ut(fn){return P\u0026\u0026fn.alternate===null\u0026\u0026(fn.flags|=67108866),fn}function Ft(fn,mn,vn,Do){return mn===null||mn.tag!==6?(mn=vf(vn,fn.mode,Do),mn.return=fn,mn._debugOwner=fn,mn._debugTask=fn._debugTask,mn._debugInfo=vr,mn):(mn=Se(mn,vn),mn.return=fn,mn._debugInfo=vr,mn)}function Tn(fn,mn,vn,Do){var cr=vn.type;return cr===P1?(mn=di(fn,mn,vn.props.children,Do,vn.key),np(vn,mn,fn),mn):mn!==null\u0026\u0026(mn.elementType===cr||GI(mn,vn)||typeof cr==\"object\"\u0026\u0026cr!==null\u0026\u0026cr.$typeof===jg\u0026\u0026gy(cr)===mn.type)?(mn=Se(mn,vn.props),Cm(mn,vn),mn.return=fn,mn._debugOwner=vn._owner,mn._debugInfo=vr,mn):(mn=H2(vn,fn.mode,Do),Cm(mn,vn),mn.return=fn,mn._debugInfo=vr,mn)}function _o(fn,mn,vn,Do){return mn===null||mn.tag!==4||mn.stateNode.containerInfo!==vn.containerInfo||mn.stateNode.implementation!==vn.implementation?(mn=YI(vn,fn.mode,Do),mn.return=fn,mn._debugInfo=vr,mn):(mn=Se(mn,vn.children||[]),mn.return=fn,mn._debugInfo=vr,mn)}function di(fn,mn,vn,Do,cr){return mn===null||mn.tag!==7?(mn=mu(vn,fn.mode,Do,cr),mn.return=fn,mn._debugOwner=fn,mn._debugTask=fn._debugTask,mn._debugInfo=vr,mn):(mn=Se(mn,vn),mn.return=fn,mn._debugInfo=vr,mn)}function li(fn,mn,vn){if(typeof mn==\"string\"\u0026\u0026mn!==\"\"||typeof mn==\"number\"||typeof mn==\"bigint\")return mn=vf(\"\"+mn,fn.mode,vn),mn.return=fn,mn._debugOwner=fn,mn._debugTask=fn._debugTask,mn._debugInfo=vr,mn;if(typeof mn==\"object\"\u0026\u0026mn!==null){switch(mn.$typeof){case v_:return vn=H2(mn,fn.mode,vn),Cm(vn,mn),vn.return=fn,fn=zc(mn._debugInfo),vn._debugInfo=vr,vr=fn,vn;case Al:return mn=YI(mn,fn.mode,vn),mn.return=fn,mn._debugInfo=vr,mn;case jg:var Do=zc(mn._debugInfo);return mn=gy(mn),fn=li(fn,mn,vn),vr=Do,fn}if(cs(mn)||S(mn))return vn=mu(mn,fn.mode,vn,null),vn.return=fn,vn._debugOwner=fn,vn._debugTask=fn._debugTask,fn=zc(mn._debugInfo),vn._debugInfo=vr,vr=fn,vn;if(typeof mn.then==\"function\")return Do=zc(mn._debugInfo),fn=li(fn,y0(mn),vn),vr=Do,fn;if(mn.$typeof===mg)return li(fn,Nr(fn,mn),vn);Dp(fn,mn)}return typeof mn==\"function\"\u0026\u0026Kg(fn,mn),typeof mn==\"symbol\"\u0026\u0026Ld(fn,mn),null}function vi(fn,mn,vn,Do){var cr=mn!==null?mn.key:null;if(typeof vn==\"string\"\u0026\u0026vn!==\"\"||typeof vn==\"number\"||typeof vn==\"bigint\")return cr!==null?null:Ft(fn,mn,\"\"+vn,Do);if(typeof vn==\"object\"\u0026\u0026vn!==null){switch(vn.$typeof){case v_:return vn.key===cr?(cr=zc(vn._debugInfo),fn=Tn(fn,mn,vn,Do),vr=cr,fn):null;case Al:return vn.key===cr?_o(fn,mn,vn,Do):null;case jg:return cr=zc(vn._debugInfo),vn=gy(vn),fn=vi(fn,mn,vn,Do),vr=cr,fn}if(cs(vn)||S(vn))return cr!==null?null:(cr=zc(vn._debugInfo),fn=di(fn,mn,vn,Do,null),vr=cr,fn);if(typeof vn.then==\"function\")return cr=zc(vn._debugInfo),fn=vi(fn,mn,y0(vn),Do),vr=cr,fn;if(vn.$typeof===mg)return vi(fn,mn,Nr(fn,vn),Do);Dp(fn,vn)}return typeof vn==\"function\"\u0026\u0026Kg(fn,vn),typeof vn==\"symbol\"\u0026\u0026Ld(fn,vn),null}function Ws(fn,mn,vn,Do,cr){if(typeof Do==\"string\"\u0026\u0026Do!==\"\"||typeof Do==\"number\"||typeof Do==\"bigint\")return fn=fn.get(vn)||null,Ft(mn,fn,\"\"+Do,cr);if(typeof Do==\"object\"\u0026\u0026Do!==null){switch(Do.$typeof){case v_:return vn=fn.get(Do.key===null?vn:Do.key)||null,fn=zc(Do._debugInfo),mn=Tn(mn,vn,Do,cr),vr=fn,mn;case Al:return fn=fn.get(Do.key===null?vn:Do.key)||null,_o(mn,fn,Do,cr);case jg:var gc=zc(Do._debugInfo);return Do=gy(Do),mn=Ws(fn,mn,vn,Do,cr),vr=gc,mn}if(cs(Do)||S(Do))return vn=fn.get(vn)||null,fn=zc(Do._debugInfo),mn=di(mn,vn,Do,cr,null),vr=fn,mn;if(typeof Do.then==\"function\")return gc=zc(Do._debugInfo),mn=Ws(fn,mn,vn,y0(Do),cr),vr=gc,mn;if(Do.$typeof===mg)return Ws(fn,mn,vn,Nr(mn,Do),cr);Dp(mn,Do)}return typeof Do==\"function\"\u0026\u0026Kg(mn,Do),typeof Do==\"symbol\"\u0026\u0026Ld(mn,Do),null}function ya(fn,mn,vn,Do){if(typeof vn!=\"object\"||vn===null)return Do;switch(vn.$typeof){case v_:case Al:d(fn,mn,vn);var cr=vn.key;if(typeof cr!=\"string\")break;if(Do===null){Do=new Set,Do.add(cr);break}if(!Do.has(cr)){Do.add(cr);break}Lt(mn,function(){console.error(\"Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.\",cr)});break;case jg:vn=gy(vn),ya(fn,mn,vn,Do)}return Do}function od(fn,mn,vn,Do){for(var cr=null,gc=null,Ms=null,xa=mn,sa=mn=0,Eu=null;xa!==null\u0026\u0026sa\u003cvn.length;sa++){xa.index\u003esa?(Eu=xa,xa=null):Eu=xa.sibling;var Hh=vi(fn,xa,vn[sa],Do);if(Hh===null){xa===null\u0026\u0026(xa=Eu);break}cr=ya(fn,Hh,vn[sa],cr),P\u0026\u0026xa\u0026\u0026Hh.alternate===null\u0026\u0026T(fn,xa),mn=Ne(Hh,mn,sa),Ms===null?gc=Hh:Ms.sibling=Hh,Ms=Hh,xa=Eu}if(sa===vn.length)return q(fn,xa),ja\u0026\u0026bt(fn,sa),gc;if(xa===null){for(;sa\u003cvn.length;sa++)xa=li(fn,vn[sa],Do),xa!==null\u0026\u0026(cr=ya(fn,xa,vn[sa],cr),mn=Ne(xa,mn,sa),Ms===null?gc=xa:Ms.sibling=xa,Ms=xa);return ja\u0026\u0026bt(fn,sa),gc}for(xa=de(xa);sa\u003cvn.length;sa++)Eu=Ws(xa,fn,sa,vn[sa],Do),Eu!==null\u0026\u0026(cr=ya(fn,Eu,vn[sa],cr),P\u0026\u0026Eu.alternate!==null\u0026\u0026xa.delete(Eu.key===null?sa:Eu.key),mn=Ne(Eu,mn,sa),Ms===null?gc=Eu:Ms.sibling=Eu,Ms=Eu);return P\u0026\u0026xa.forEach(function(y5){return T(fn,y5)}),ja\u0026\u0026bt(fn,sa),gc}function iQ(fn,mn,vn,Do){if(vn==null)throw Error(\"An iterable object provided no iterator.\");for(var cr=null,gc=null,Ms=mn,xa=mn=0,sa=null,Eu=null,Hh=vn.next();Ms!==null\u0026\u0026!Hh.done;xa++,Hh=vn.next()){Ms.index\u003exa?(sa=Ms,Ms=null):sa=Ms.sibling;var y5=vi(fn,Ms,Hh.value,Do);if(y5===null){Ms===null\u0026\u0026(Ms=sa);break}Eu=ya(fn,y5,Hh.value,Eu),P\u0026\u0026Ms\u0026\u0026y5.alternate===null\u0026\u0026T(fn,Ms),mn=Ne(y5,mn,xa),gc===null?cr=y5:gc.sibling=y5,gc=y5,Ms=sa}if(Hh.done)return q(fn,Ms),ja\u0026\u0026bt(fn,xa),cr;if(Ms===null){for(;!Hh.done;xa++,Hh=vn.next())Ms=li(fn,Hh.value,Do),Ms!==null\u0026\u0026(Eu=ya(fn,Ms,Hh.value,Eu),mn=Ne(Ms,mn,xa),gc===null?cr=Ms:gc.sibling=Ms,gc=Ms);return ja\u0026\u0026bt(fn,xa),cr}for(Ms=de(Ms);!Hh.done;xa++,Hh=vn.next())sa=Ws(Ms,fn,xa,Hh.value,Do),sa!==null\u0026\u0026(Eu=ya(fn,sa,Hh.value,Eu),P\u0026\u0026sa.alternate!==null\u0026\u0026Ms.delete(sa.key===null?xa:sa.key),mn=Ne(sa,mn,xa),gc===null?cr=sa:gc.sibling=sa,gc=sa);return P\u0026\u0026Ms.forEach(function(_ye){return T(fn,_ye)}),ja\u0026\u0026bt(fn,xa),cr}function T3(fn,mn,vn,Do){if(typeof vn==\"object\"\u0026\u0026vn!==null\u0026\u0026vn.type===P1\u0026\u0026vn.key===null\u0026\u0026(np(vn,null,fn),vn=vn.props.children),typeof vn==\"object\"\u0026\u0026vn!==null){switch(vn.$typeof){case v_:var cr=zc(vn._debugInfo);e:{for(var gc=vn.key;mn!==null;){if(mn.key===gc){if(gc=vn.type,gc===P1){if(mn.tag===7){q(fn,mn.sibling),Do=Se(mn,vn.props.children),Do.return=fn,Do._debugOwner=vn._owner,Do._debugInfo=vr,np(vn,Do,fn),fn=Do;break e}}else if(mn.elementType===gc||GI(mn,vn)||typeof gc==\"object\"\u0026\u0026gc!==null\u0026\u0026gc.$typeof===jg\u0026\u0026gy(gc)===mn.type){q(fn,mn.sibling),Do=Se(mn,vn.props),Cm(Do,vn),Do.return=fn,Do._debugOwner=vn._owner,Do._debugInfo=vr,fn=Do;break e}q(fn,mn);break}else T(fn,mn);mn=mn.sibling}vn.type===P1?(Do=mu(vn.props.children,fn.mode,Do,vn.key),Do.return=fn,Do._debugOwner=fn,Do._debugTask=fn._debugTask,Do._debugInfo=vr,np(vn,Do,fn),fn=Do):(Do=H2(vn,fn.mode,Do),Cm(Do,vn),Do.return=fn,Do._debugInfo=vr,fn=Do)}return fn=ut(fn),vr=cr,fn;case Al:e:{for(cr=vn,vn=cr.key;mn!==null;){if(mn.key===vn)if(mn.tag===4\u0026\u0026mn.stateNode.containerInfo===cr.containerInfo\u0026\u0026mn.stateNode.implementation===cr.implementation){q(fn,mn.sibling),Do=Se(mn,cr.children||[]),Do.return=fn,fn=Do;break e}else{q(fn,mn);break}else T(fn,mn);mn=mn.sibling}Do=YI(cr,fn.mode,Do),Do.return=fn,fn=Do}return ut(fn);case jg:return cr=zc(vn._debugInfo),vn=gy(vn),fn=T3(fn,mn,vn,Do),vr=cr,fn}if(cs(vn))return cr=zc(vn._debugInfo),fn=od(fn,mn,vn,Do),vr=cr,fn;if(S(vn)){if(cr=zc(vn._debugInfo),gc=S(vn),typeof gc!=\"function\")throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");var Ms=gc.call(vn);return Ms===vn?(fn.tag!==0||Object.prototype.toString.call(fn.type)!==\"[object GeneratorFunction]\"||Object.prototype.toString.call(Ms)!==\"[object Generator]\")\u0026\u0026(D||console.error(\"Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items.\"),D=!0):vn.entries!==gc||sC||(console.error(\"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"),sC=!0),fn=iQ(fn,mn,Ms,Do),vr=cr,fn}if(typeof vn.then==\"function\")return cr=zc(vn._debugInfo),fn=T3(fn,mn,y0(vn),Do),vr=cr,fn;if(vn.$typeof===mg)return T3(fn,mn,Nr(fn,vn),Do);Dp(fn,vn)}return typeof vn==\"string\"\u0026\u0026vn!==\"\"||typeof vn==\"number\"||typeof vn==\"bigint\"?(cr=\"\"+vn,mn!==null\u0026\u0026mn.tag===6?(q(fn,mn.sibling),Do=Se(mn,cr),Do.return=fn,fn=Do):(q(fn,mn),Do=vf(cr,fn.mode,Do),Do.return=fn,Do._debugOwner=fn,Do._debugTask=fn._debugTask,Do._debugInfo=vr,fn=Do),ut(fn)):(typeof vn==\"function\"\u0026\u0026Kg(fn,vn),typeof vn==\"symbol\"\u0026\u0026Ld(fn,vn),q(fn,mn))}return function(fn,mn,vn,Do){var cr=vr;vr=null;try{dy=0;var gc=T3(fn,mn,vn,Do);return rC=null,gc}catch(Eu){if(Eu===v3||Eu===ed)throw Eu;var Ms=l(29,Eu,null,fn.mode);Ms.lanes=Do,Ms.return=fn;var xa=Ms._debugInfo=vr;if(Ms._debugOwner=fn._debugOwner,Ms._debugTask=fn._debugTask,xa!=null){for(var sa=xa.length-1;0\u003c=sa;sa--)if(typeof xa[sa].stack==\"string\"){Ms._debugOwner=xa[sa],Ms._debugTask=xa[sa].debugTask;break}}return Ms}finally{vr=cr}}}function Np(P){var T=P.alternate;R(Zn,Zn.current\u0026on,P),R(pt,P,P),St===null\u0026\u0026(T===null||Gf.current!==null||T.memoizedState!==null)\u0026\u0026(St=P)}function QI(P){if(P.tag===22){if(R(Zn,Zn.current,P),R(pt,P,P),St===null){var T=P.alternate;T!==null\u0026\u0026T.memoizedState!==null\u0026\u0026(St=P)}}else V0(P)}function V0(P){R(Zn,Zn.current,P),R(pt,pt.current,P)}function Vg(P){k(pt,P),St===P\u0026\u0026(St=null),k(Zn,P)}function op(P){for(var T=P;T!==null;){if(T.tag===13){var q=T.memoizedState;if(q!==null\u0026\u0026(q=q.dehydrated,q===null||j0(q)||w_(q)))return T}else if(T.tag===19\u0026\u0026T.memoizedProps.revealOrder!==void 0){if((T.flags\u0026128)!==0)return T}else if(T.child!==null){T.child.return=T,T=T.child;continue}if(T===P)break;for(;T.sibling===null;){if(T.return===null||T.return===P)return null;T=T.return}T.sibling.return=T.return,T=T.sibling}return null}function bs(P){if(P!==null\u0026\u0026typeof P!=\"function\"){var T=String(P);mr.has(T)||(mr.add(T),console.error(\"Expected the last optional `callback` argument to be a function. Instead received: %s.\",P))}}function Zo(P,T,q,de){var Se=P.memoizedState,Ne=q(de,Se);if(P.mode\u00268){Me(!0);try{Ne=q(de,Se)}finally{Me(!1)}}Ne===void 0\u0026\u0026(T=Q(T)||\"Component\",Mn.has(T)||(Mn.add(T),console.error(\"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.\",T))),Se=Ne==null?Se:al({},Se,Ne),P.memoizedState=Se,P.lanes===0\u0026\u0026(P.updateQueue.baseState=Se)}function ip(P,T,q,de,Se,Ne,ut){var Ft=P.stateNode;if(typeof Ft.shouldComponentUpdate==\"function\"){if(q=Ft.shouldComponentUpdate(de,Ne,ut),P.mode\u00268){Me(!0);try{q=Ft.shouldComponentUpdate(de,Ne,ut)}finally{Me(!1)}}return q===void 0\u0026\u0026console.error(\"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.\",Q(T)||\"Component\"),q}return T.prototype\u0026\u0026T.prototype.isPureReactComponent?!Li(q,de)||!Li(Se,Ne):!0}function vI(P,T,q,de){var Se=T.state;typeof T.componentWillReceiveProps==\"function\"\u0026\u0026T.componentWillReceiveProps(q,de),typeof T.UNSAFE_componentWillReceiveProps==\"function\"\u0026\u0026T.UNSAFE_componentWillReceiveProps(q,de),T.state!==Se\u0026\u0026(P=w(P)||\"Component\",Gn.has(P)||(Gn.add(P),console.error(\"%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",P)),nA.enqueueReplaceState(T,T.state,null))}function nc(P,T){var q=T;if(\"ref\"in T){q={};for(var de in T)de!==\"ref\"\u0026\u0026(q[de]=T[de])}if(P=P.defaultProps){q===T\u0026\u0026(q=al({},q));for(var Se in P)q[Se]===void 0\u0026\u0026(q[Se]=P[Se])}return q}function i0(P,T){try{gs=T.source?w(T.source):null,kh=null;var q=T.value;if(Jn.actQueue!==null)Jn.thrownErrors.push(q);else{var de=P.onUncaughtError;de(q,{componentStack:T.stack})}}catch(Se){setTimeout(function(){throw Se})}}function Cf(P,T,q){try{gs=q.source?w(q.source):null,kh=w(T);var de=P.onCaughtError;de(q.value,{componentStack:q.stack,errorBoundary:T.tag===1?T.stateNode:null})}catch(Se){setTimeout(function(){throw Se})}}function ug(P,T,q){return q=ag(q),q.tag=$2,q.payload={element:null},q.callback=function(){Lt(T.source,i0,P,T)},q}function wI(P){return P=ag(P),P.tag=$2,P}function rp(P,T,q,de){var Se=q.type.getDerivedStateFromError;if(typeof Se==\"function\"){var Ne=de.value;P.payload=function(){return Se(Ne)},P.callback=function(){Hu(q),Lt(de.source,Cf,T,q,de)}}var ut=q.stateNode;ut!==null\u0026\u0026typeof ut.componentDidCatch==\"function\"\u0026\u0026(P.callback=function(){Hu(q),Lt(de.source,Cf,T,q,de),typeof Se!=\"function\"\u0026\u0026(Om===null?Om=new Set([this]):Om.add(this)),Gr(this,de),typeof Se==\"function\"||(q.lanes\u00262)===0\u0026\u0026console.error(\"%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.\",w(q)||\"Unknown\")})}function Rp(P,T,q,de,Se){if(q.flags|=32768,Ae\u0026\u0026Qf(P,Se),de!==null\u0026\u0026typeof de==\"object\"\u0026\u0026typeof de.then==\"function\"){if(T=q.alternate,T!==null\u0026\u0026ko(T,q,Se,!0),ja\u0026\u0026(z2=!0),q=pt.current,q!==null){switch(q.tag){case 13:return St===null?R2():q.alternate===null\u0026\u0026_l===nx\u0026\u0026(_l=hte),q.flags\u0026=-257,q.flags|=65536,q.lanes=Se,de===hp?q.flags|=16384:(T=q.updateQueue,T===null?q.updateQueue=new Set([de]):T.add(de),Sf(P,de,Se)),!1;case 22:return q.flags|=65536,de===hp?q.flags|=16384:(T=q.updateQueue,T===null?(T={transitions:null,markerInstances:null,retryQueue:new Set([de])},q.updateQueue=T):(q=T.retryQueue,q===null?T.retryQueue=new Set([de]):q.add(de)),Sf(P,de,Se)),!1}throw Error(\"Unexpected Suspense handler tag (\"+q.tag+\"). This is a bug in React.\")}return Sf(P,de,Se),R2(),!1}if(ja)return z2=!0,T=pt.current,T!==null?((T.flags\u002665536)===0\u0026\u0026(T.flags|=256),T.flags|=65536,T.lanes=Se,de!==ZI\u0026\u0026ei(gt(Error(\"There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.\",{cause:de}),q))):(de!==ZI\u0026\u0026ei(gt(Error(\"There was an error while hydrating but React was able to recover by instead client rendering the entire root.\",{cause:de}),q)),P=P.current.alternate,P.flags|=65536,Se\u0026=-Se,P.lanes|=Se,de=gt(de,q),Se=ug(P.stateNode,de,Se),mm(P,Se),_l!==M3\u0026\u0026(_l=em)),!1;var Ne=gt(Error(\"There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.\",{cause:de}),q);if(AC===null?AC=[Ne]:AC.push(Ne),_l!==M3\u0026\u0026(_l=em),T===null)return!0;de=gt(de,q),q=T;do{switch(q.tag){case 3:return q.flags|=65536,P=Se\u0026-Se,q.lanes|=P,P=ug(q.stateNode,de,P),mm(q,P),!1;case 1:if(T=q.type,Ne=q.stateNode,(q.flags\u0026128)===0\u0026\u0026(typeof T.getDerivedStateFromError==\"function\"||Ne!==null\u0026\u0026typeof Ne.componentDidCatch==\"function\"\u0026\u0026(Om===null||!Om.has(Ne))))return q.flags|=65536,Se\u0026=-Se,q.lanes|=Se,Se=wI(Se),rp(Se,P,q,de),mm(q,Se),!1}q=q.return}while(q!==null);return!1}function oc(P,T,q,de){T.child=P===null?Fe(T,null,q,de):xe(T,P.child,q,de)}function gg(P,T,q,de,Se){q=q.render;var Ne=T.ref;if(\"ref\"in de){var ut={};for(var Ft in de)Ft!==\"ref\"\u0026\u0026(ut[Ft]=de[Ft])}else ut=de;return mi(T),Qe(T),de=mf(P,T,q,ut,Ne,Se),Ft=du(),Pe(),P!==null\u0026\u0026!xu?(cg(P,T,Se),Fu(P,T,Se)):(ja\u0026\u0026Ft\u0026\u0026Dt(T),T.flags|=1,oc(P,T,de,Se),T.child)}function Cc(P,T,q,de,Se){if(P===null){var Ne=q.type;return typeof Ne==\"function\"\u0026\u0026!zr(Ne)\u0026\u0026Ne.defaultProps===void 0\u0026\u0026q.compare===null?(q=$C(Ne),T.tag=15,T.type=q,kp(T,Ne),pa(P,T,q,de,Se)):(P=Bh(q.type,null,de,T,T.mode,Se),P.ref=T.ref,P.return=T,T.child=P)}if(Ne=P.child,!sp(P,Se)){var ut=Ne.memoizedProps;if(q=q.compare,q=q!==null?q:Li,q(ut,de)\u0026\u0026P.ref===T.ref)return Fu(P,T,Se)}return T.flags|=1,P=v1(Ne,de),P.ref=T.ref,P.return=T,T.child=P}function pa(P,T,q,de,Se){if(P!==null){var Ne=P.memoizedProps;if(Li(Ne,de)\u0026\u0026P.ref===T.ref\u0026\u0026T.type===P.type)if(xu=!1,T.pendingProps=de=Ne,sp(P,Se))(P.flags\u0026131072)!==0\u0026\u0026(xu=!0);else return T.lanes=P.lanes,Fu(P,T,Se)}return rl(P,T,q,de,Se)}function c3(P,T,q){var de=T.pendingProps,Se=de.children,Ne=P!==null?P.memoizedState:null;if(de.mode===\"hidden\"){if((T.flags\u0026128)!==0){if(de=Ne!==null?Ne.baseLanes|q:q,P!==null){for(Se=T.child=P.child,Ne=0;Se!==null;)Ne=Ne|Se.lanes|Se.childLanes,Se=Se.sibling;T.childLanes=Ne\u0026~de}else T.childLanes=0,T.child=null;return PI(P,T,de,q)}if((q\u0026536870912)!==0)T.memoizedState={baseLanes:0,cachePool:null},P!==null\u0026\u0026oa(T,Ne!==null?Ne.cachePool:null),Ne!==null?__(T,Ne):Qp(T),QI(T);else return T.lanes=T.childLanes=536870912,PI(P,T,Ne!==null?Ne.baseLanes|q:q,q)}else Ne!==null?(oa(T,Ne.cachePool),__(T,Ne),V0(T),T.memoizedState=null):(P!==null\u0026\u0026oa(T,null),Qp(T),V0(T));return oc(P,T,Se,q),T.child}function PI(P,T,q,de){var Se=gr();return Se=Se===null?null:{parent:jc?Wn._currentValue:Wn._currentValue2,pool:Se},T.memoizedState={baseLanes:q,cachePool:Se},P!==null\u0026\u0026oa(T,null),Qp(T),QI(T),P!==null\u0026\u0026ko(P,T,de,!0),null}function Tp(P,T){var q=T.ref;if(q===null)P!==null\u0026\u0026P.ref!==null\u0026\u0026(T.flags|=4194816);else{if(typeof q!=\"function\"\u0026\u0026typeof q!=\"object\")throw Error(\"Expected ref to be a function, an object returned by React.createRef(), or undefined/null.\");(P===null||P.ref!==q)\u0026\u0026(T.flags|=4194816)}}function rl(P,T,q,de,Se){if(q.prototype\u0026\u0026typeof q.prototype.render==\"function\"){var Ne=Q(q)||\"Unknown\";MK[Ne]||(console.error(\"The \u003c%s /\u003e component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.\",Ne,Ne),MK[Ne]=!0)}return T.mode\u00268\u0026\u0026nC.recordLegacyContextWarning(T,null),P===null\u0026\u0026(kp(T,T.type),q.contextTypes\u0026\u0026(Ne=Q(q)||\"Unknown\",Aye[Ne]||(Aye[Ne]=!0,console.error(\"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)\",Ne)))),mi(T),Qe(T),q=mf(P,T,q,de,void 0,Se),de=du(),Pe(),P!==null\u0026\u0026!xu?(cg(P,T,Se),Fu(P,T,Se)):(ja\u0026\u0026de\u0026\u0026Dt(T),T.flags|=1,oc(P,T,q,Se),T.child)}function IA(P,T,q,de,Se,Ne){return mi(T),Qe(T),X=-1,me=P!==null\u0026\u0026P.type!==T.type,T.updateQueue=null,q=_f(T,de,q,Se),LC(P,T),de=du(),Pe(),P!==null\u0026\u0026!xu?(cg(P,T,Ne),Fu(P,T,Ne)):(ja\u0026\u0026de\u0026\u0026Dt(T),T.flags|=1,oc(P,T,q,Ne),T.child)}function uA(P,T,q,de,Se){switch(c(T)){case!1:var Ne=T.stateNode,ut=new T.type(T.memoizedProps,Ne.context).state;Ne.updater.enqueueSetState(Ne,ut,null);break;case!0:T.flags|=128,T.flags|=65536,Ne=Error(\"Simulated error coming from DevTools\");var Ft=Se\u0026-Se;if(T.lanes|=Ft,ut=wl,ut===null)throw Error(\"Expected a work-in-progress root. This is a bug in React. Please file an issue.\");Ft=wI(Ft),rp(Ft,ut,T,gt(Ne,T)),mm(T,Ft)}if(mi(T),T.stateNode===null){if(ut=zp,Ne=q.contextType,\"contextType\"in q\u0026\u0026Ne!==null\u0026\u0026(Ne===void 0||Ne.$typeof!==mg)\u0026\u0026!Mo.has(q)\u0026\u0026(Mo.add(q),Ft=Ne===void 0?\" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.\":typeof Ne!=\"object\"?\" However, it is set to a \"+typeof Ne+\".\":Ne.$typeof===Mm?\" Did you accidentally pass the Context.Consumer instead?\":\" However, it is set to an object with keys {\"+Object.keys(Ne).join(\", \")+\"}.\",console.error(\"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s\",Q(q)||\"Component\",Ft)),typeof Ne==\"object\"\u0026\u0026Ne!==null\u0026\u0026(ut=Fo(Ne)),Ne=new q(de,ut),T.mode\u00268){Me(!0);try{Ne=new q(de,ut)}finally{Me(!1)}}if(ut=T.memoizedState=Ne.state!==null\u0026\u0026Ne.state!==void 0?Ne.state:null,Ne.updater=nA,T.stateNode=Ne,Ne._reactInternals=T,Ne._reactInternalInstance=Qo,typeof q.getDerivedStateFromProps==\"function\"\u0026\u0026ut===null\u0026\u0026(ut=Q(q)||\"Component\",jn.has(ut)||(jn.add(ut),console.error(\"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.\",ut,Ne.state===null?\"null\":\"undefined\",ut))),typeof q.getDerivedStateFromProps==\"function\"||typeof Ne.getSnapshotBeforeUpdate==\"function\"){var Tn=Ft=ut=null;if(typeof Ne.componentWillMount==\"function\"\u0026\u0026Ne.componentWillMount.__suppressDeprecationWarning!==!0?ut=\"componentWillMount\":typeof Ne.UNSAFE_componentWillMount==\"function\"\u0026\u0026(ut=\"UNSAFE_componentWillMount\"),typeof Ne.componentWillReceiveProps==\"function\"\u0026\u0026Ne.componentWillReceiveProps.__suppressDeprecationWarning!==!0?Ft=\"componentWillReceiveProps\":typeof Ne.UNSAFE_componentWillReceiveProps==\"function\"\u0026\u0026(Ft=\"UNSAFE_componentWillReceiveProps\"),typeof Ne.componentWillUpdate==\"function\"\u0026\u0026Ne.componentWillUpdate.__suppressDeprecationWarning!==!0?Tn=\"componentWillUpdate\":typeof Ne.UNSAFE_componentWillUpdate==\"function\"\u0026\u0026(Tn=\"UNSAFE_componentWillUpdate\"),ut!==null||Ft!==null||Tn!==null){Ne=Q(q)||\"Component\";var _o=typeof q.getDerivedStateFromProps==\"function\"?\"getDerivedStateFromProps()\":\"getSnapshotBeforeUpdate()\";br.has(Ne)||(br.add(Ne),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles`,Ne,_o,ut!==null?`\n `+ut:\"\",Ft!==null?`\n `+Ft:\"\",Tn!==null?`\n `+Tn:\"\"))}}Ne=T.stateNode,ut=Q(q)||\"Component\",Ne.render||(q.prototype\u0026\u0026typeof q.prototype.render==\"function\"?console.error(\"No `render` method found on the %s instance: did you accidentally return an object from the constructor?\",ut):console.error(\"No `render` method found on the %s instance: you may have forgotten to define `render`.\",ut)),!Ne.getInitialState||Ne.getInitialState.isReactClassApproved||Ne.state||console.error(\"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?\",ut),Ne.getDefaultProps\u0026\u0026!Ne.getDefaultProps.isReactClassApproved\u0026\u0026console.error(\"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.\",ut),Ne.contextType\u0026\u0026console.error(\"contextType was defined as an instance property on %s. Use a static property to define contextType instead.\",ut),q.childContextTypes\u0026\u0026!Un.has(q)\u0026\u0026(Un.add(q),console.error(\"%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)\",ut)),q.contextTypes\u0026\u0026!Cn.has(q)\u0026\u0026(Cn.add(q),console.error(\"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)\",ut)),typeof Ne.componentShouldUpdate==\"function\"\u0026\u0026console.error(\"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.\",ut),q.prototype\u0026\u0026q.prototype.isPureReactComponent\u0026\u0026typeof Ne.shouldComponentUpdate\u003c\"u\"\u0026\u0026console.error(\"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.\",Q(q)||\"A pure component\"),typeof Ne.componentDidUnmount==\"function\"\u0026\u0026console.error(\"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?\",ut),typeof Ne.componentDidReceiveProps==\"function\"\u0026\u0026console.error(\"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().\",ut),typeof Ne.componentWillRecieveProps==\"function\"\u0026\u0026console.error(\"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?\",ut),typeof Ne.UNSAFE_componentWillRecieveProps==\"function\"\u0026\u0026console.error(\"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?\",ut),Ft=Ne.props!==de,Ne.props!==void 0\u0026\u0026Ft\u0026\u0026console.error(\"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.\",ut),Ne.defaultProps\u0026\u0026console.error(\"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.\",ut,ut),typeof Ne.getSnapshotBeforeUpdate!=\"function\"||typeof Ne.componentDidUpdate==\"function\"||wr.has(q)||(wr.add(q),console.error(\"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.\",Q(q))),typeof Ne.getDerivedStateFromProps==\"function\"\u0026\u0026console.error(\"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",ut),typeof Ne.getDerivedStateFromError==\"function\"\u0026\u0026console.error(\"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",ut),typeof q.getSnapshotBeforeUpdate==\"function\"\u0026\u0026console.error(\"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.\",ut),(Ft=Ne.state)\u0026\u0026(typeof Ft!=\"object\"||cs(Ft))\u0026\u0026console.error(\"%s.state: must be set to an object or null\",ut),typeof Ne.getChildContext==\"function\"\u0026\u0026typeof q.childContextTypes!=\"object\"\u0026\u0026console.error(\"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().\",ut),Ne=T.stateNode,Ne.props=de,Ne.state=T.memoizedState,Ne.refs={},Ul(T),ut=q.contextType,Ne.context=typeof ut==\"object\"\u0026\u0026ut!==null?Fo(ut):zp,Ne.state===de\u0026\u0026(ut=Q(q)||\"Component\",tA.has(ut)||(tA.add(ut),console.error(\"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.\",ut))),T.mode\u00268\u0026\u0026nC.recordLegacyContextWarning(T,Ne),nC.recordUnsafeLifecycleWarnings(T,Ne),Ne.state=T.memoizedState,ut=q.getDerivedStateFromProps,typeof ut==\"function\"\u0026\u0026(Zo(T,q,ut,de),Ne.state=T.memoizedState),typeof q.getDerivedStateFromProps==\"function\"||typeof Ne.getSnapshotBeforeUpdate==\"function\"||typeof Ne.UNSAFE_componentWillMount!=\"function\"\u0026\u0026typeof Ne.componentWillMount!=\"function\"||(ut=Ne.state,typeof Ne.componentWillMount==\"function\"\u0026\u0026Ne.componentWillMount(),typeof Ne.UNSAFE_componentWillMount==\"function\"\u0026\u0026Ne.UNSAFE_componentWillMount(),ut!==Ne.state\u0026\u0026(console.error(\"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",w(T)||\"Component\"),nA.enqueueReplaceState(Ne,Ne.state,null)),Ag(T,de,Ne,Se),gu(),Ne.state=T.memoizedState),typeof Ne.componentDidMount==\"function\"\u0026\u0026(T.flags|=4194308),(T.mode\u002616)!==yA\u0026\u0026(T.flags|=134217728),Ne=!0}else if(P===null){Ne=T.stateNode;var di=T.memoizedProps;Ft=nc(q,di),Ne.props=Ft;var li=Ne.context;Tn=q.contextType,ut=zp,typeof Tn==\"object\"\u0026\u0026Tn!==null\u0026\u0026(ut=Fo(Tn)),_o=q.getDerivedStateFromProps,Tn=typeof _o==\"function\"||typeof Ne.getSnapshotBeforeUpdate==\"function\",di=T.pendingProps!==di,Tn||typeof Ne.UNSAFE_componentWillReceiveProps!=\"function\"\u0026\u0026typeof Ne.componentWillReceiveProps!=\"function\"||(di||li!==ut)\u0026\u0026vI(T,Ne,de,ut),q2=!1;var vi=T.memoizedState;Ne.state=vi,Ag(T,de,Ne,Se),gu(),li=T.memoizedState,di||vi!==li||q2?(typeof _o==\"function\"\u0026\u0026(Zo(T,q,_o,de),li=T.memoizedState),(Ft=q2||ip(T,q,Ft,de,vi,li,ut))?(Tn||typeof Ne.UNSAFE_componentWillMount!=\"function\"\u0026\u0026typeof Ne.componentWillMount!=\"function\"||(typeof Ne.componentWillMount==\"function\"\u0026\u0026Ne.componentWillMount(),typeof Ne.UNSAFE_componentWillMount==\"function\"\u0026\u0026Ne.UNSAFE_componentWillMount()),typeof Ne.componentDidMount==\"function\"\u0026\u0026(T.flags|=4194308),(T.mode\u002616)!==yA\u0026\u0026(T.flags|=134217728)):(typeof Ne.componentDidMount==\"function\"\u0026\u0026(T.flags|=4194308),(T.mode\u002616)!==yA\u0026\u0026(T.flags|=134217728),T.memoizedProps=de,T.memoizedState=li),Ne.props=de,Ne.state=li,Ne.context=ut,Ne=Ft):(typeof Ne.componentDidMount==\"function\"\u0026\u0026(T.flags|=4194308),(T.mode\u002616)!==yA\u0026\u0026(T.flags|=134217728),Ne=!1)}else{Ne=T.stateNode,m_(P,T),ut=T.memoizedProps,Tn=nc(q,ut),Ne.props=Tn,_o=T.pendingProps,vi=Ne.context,li=q.contextType,Ft=zp,typeof li==\"object\"\u0026\u0026li!==null\u0026\u0026(Ft=Fo(li)),di=q.getDerivedStateFromProps,(li=typeof di==\"function\"||typeof Ne.getSnapshotBeforeUpdate==\"function\")||typeof Ne.UNSAFE_componentWillReceiveProps!=\"function\"\u0026\u0026typeof Ne.componentWillReceiveProps!=\"function\"||(ut!==_o||vi!==Ft)\u0026\u0026vI(T,Ne,de,Ft),q2=!1,vi=T.memoizedState,Ne.state=vi,Ag(T,de,Ne,Se),gu();var Ws=T.memoizedState;ut!==_o||vi!==Ws||q2||P!==null\u0026\u0026P.dependencies!==null\u0026\u0026Ko(P.dependencies)?(typeof di==\"function\"\u0026\u0026(Zo(T,q,di,de),Ws=T.memoizedState),(Tn=q2||ip(T,q,Tn,de,vi,Ws,Ft)||P!==null\u0026\u0026P.dependencies!==null\u0026\u0026Ko(P.dependencies))?(li||typeof Ne.UNSAFE_componentWillUpdate!=\"function\"\u0026\u0026typeof Ne.componentWillUpdate!=\"function\"||(typeof Ne.componentWillUpdate==\"function\"\u0026\u0026Ne.componentWillUpdate(de,Ws,Ft),typeof Ne.UNSAFE_componentWillUpdate==\"function\"\u0026\u0026Ne.UNSAFE_componentWillUpdate(de,Ws,Ft)),typeof Ne.componentDidUpdate==\"function\"\u0026\u0026(T.flags|=4),typeof Ne.getSnapshotBeforeUpdate==\"function\"\u0026\u0026(T.flags|=1024)):(typeof Ne.componentDidUpdate!=\"function\"||ut===P.memoizedProps\u0026\u0026vi===P.memoizedState||(T.flags|=4),typeof Ne.getSnapshotBeforeUpdate!=\"function\"||ut===P.memoizedProps\u0026\u0026vi===P.memoizedState||(T.flags|=1024),T.memoizedProps=de,T.memoizedState=Ws),Ne.props=de,Ne.state=Ws,Ne.context=Ft,Ne=Tn):(typeof Ne.componentDidUpdate!=\"function\"||ut===P.memoizedProps\u0026\u0026vi===P.memoizedState||(T.flags|=4),typeof Ne.getSnapshotBeforeUpdate!=\"function\"||ut===P.memoizedProps\u0026\u0026vi===P.memoizedState||(T.flags|=1024),Ne=!1)}if(Ft=Ne,Tp(P,T),ut=(T.flags\u0026128)!==0,Ft||ut){if(Ft=T.stateNode,Ho(T),ut\u0026\u0026typeof q.getDerivedStateFromError!=\"function\")q=null,Rh=-1;else{if(Qe(T),q=pr(Ft),T.mode\u00268){Me(!0);try{pr(Ft)}finally{Me(!1)}}Pe()}T.flags|=1,P!==null\u0026\u0026ut?(T.child=xe(T,P.child,null,Se),T.child=xe(T,null,q,Se)):oc(P,T,q,Se),T.memoizedState=Ft.state,P=T.child}else P=Fu(P,T,Se);return Se=T.stateNode,Ne\u0026\u0026Se.props!==de\u0026\u0026($S||console.error(\"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.\",w(T)||\"a component\"),$S=!0),P}function ym(P,T,q,de){return Nn(),T.flags|=256,oc(P,T,q,de),T.child}function kp(P,T){T\u0026\u0026T.childContextTypes\u0026\u0026console.error(`childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...`,T.displayName||T.name||\"Component\"),typeof T.getDerivedStateFromProps==\"function\"\u0026\u0026(P=Q(T)||\"Unknown\",cye[P]||(console.error(\"%s: Function components do not support getDerivedStateFromProps.\",P),cye[P]=!0)),typeof T.contextType==\"object\"\u0026\u0026T.contextType!==null\u0026\u0026(T=Q(T)||\"Unknown\",aye[T]||(console.error(\"%s: Function components do not support contextType.\",T),aye[T]=!0))}function C1(P){return{baseLanes:P,cachePool:hs()}}function xm(P,T,q){return P=P!==null?P.childLanes\u0026~q:0,T\u0026\u0026(P|=Q0),P}function I2(P,T,q){var de=T.pendingProps;A(T)\u0026\u0026(T.flags|=128);var Se=!1,Ne=(T.flags\u0026128)!==0,ut;if((ut=Ne)||(ut=P!==null\u0026\u0026P.memoizedState===null?!1:(Zn.current\u0026Pn)!==0),ut\u0026\u0026(Se=!0,T.flags\u0026=-129),ut=(T.flags\u002632)!==0,T.flags\u0026=-33,P===null){if(ja){if(Se?Np(T):V0(T),ja){var Ft=Ma,Tn;(Tn=!Ft)||(Tn=Vp(Ft,Wd),Tn!==null?(it(),T.memoizedState={dehydrated:Tn,treeContext:eA!==null?{id:Or,overflow:Js}:null,retryLane:536870912,hydrationErrors:null},Ne=l(18,null,null,yA),Ne.stateNode=Tn,Ne.return=T,T.child=Ne,gp=T,Ma=null,Tn=!0):Tn=!1,Tn=!Tn),Tn\u0026\u0026(qe(T,Ft),vt(T))}if(Ft=T.memoizedState,Ft!==null\u0026\u0026(Ft=Ft.dehydrated,Ft!==null))return w_(Ft)?T.lanes=32:T.lanes=536870912,null;Vg(T)}return Ft=de.children,de=de.fallback,Se?(V0(T),Se=T.mode,Ft=I_({mode:\"hidden\",children:Ft},Se),de=mu(de,Se,q,null),Ft.return=T,de.return=T,Ft.sibling=de,T.child=Ft,Se=T.child,Se.memoizedState=C1(q),Se.childLanes=xm(P,ut,q),T.memoizedState=dte,de):(Np(T),y1(T,Ft))}if(Tn=P.memoizedState,Tn!==null\u0026\u0026(Ft=Tn.dehydrated,Ft!==null)){if(Ne)T.flags\u0026256?(Np(T),T.flags\u0026=-257,T=MI(P,T,q)):T.memoizedState!==null?(V0(T),T.child=P.child,T.flags|=128,T=null):(V0(T),Se=de.fallback,Ft=T.mode,de=I_({mode:\"visible\",children:de.children},Ft),Se=mu(Se,Ft,q,null),Se.flags|=2,de.return=T,Se.return=T,de.sibling=Se,T.child=de,xe(T,P.child,null,q),de=T.child,de.memoizedState=C1(q),de.childLanes=xm(P,ut,q),T.memoizedState=dte,T=Se);else if(Np(T),ja\u0026\u0026console.error(\"We should not be hydrating here. This is a bug in React. Please file a bug.\"),w_(Ft))Ft=$0(Ft),ut=Ft.digest,Se=Ft.message,de=Ft.stack,Ft=Ft.componentStack,Se=Error(Se||\"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.\"),Se.stack=de||\"\",Se.digest=ut,ut=Ft===void 0?null:Ft,de={value:Se,source:null,stack:ut},typeof ut==\"string\"\u0026\u0026L1.set(Se,de),ei(de),T=MI(P,T,q);else if(xu||ko(P,T,q,!1),ut=(q\u0026P.childLanes)!==0,xu||ut){if(ut=wl,ut!==null\u0026\u0026(de=q\u0026-q,de=(de\u002642)!==0?1:_e(de),de=(de\u0026(ut.suspendedLanes|q))!==0?0:de,de!==0\u0026\u0026de!==Tn.retryLane))throw Tn.retryLane=de,fc(P,de),s0(ut,P,de),uc;j0(Ft)||R2(),T=MI(P,T,q)}else j0(Ft)?(T.flags|=192,T.child=P.child,T=null):(P=Tn.treeContext,B0\u0026\u0026(Ma=vh(Ft),gp=T,ja=!0,Ff=null,z2=!1,ms=null,Wd=!1,P!==null\u0026\u0026(it(),zo[Bi++]=Or,zo[Bi++]=Js,zo[Bi++]=eA,Or=P.id,Js=P.overflow,eA=T)),T=y1(T,de.children),T.flags|=4096);return T}return Se?(V0(T),Se=de.fallback,Ft=T.mode,Tn=P.child,Ne=Tn.sibling,de=v1(Tn,{mode:\"hidden\",children:de.children}),de.subtreeFlags=Tn.subtreeFlags\u002665011712,Ne!==null?Se=v1(Ne,Se):(Se=mu(Se,Ft,q,null),Se.flags|=2),Se.return=T,de.return=T,de.sibling=Se,T.child=de,de=Se,Se=T.child,Ft=P.child.memoizedState,Ft===null?Ft=C1(q):(Tn=Ft.cachePool,Tn!==null?(Ne=jc?Wn._currentValue:Wn._currentValue2,Tn=Tn.parent!==Ne?{parent:Ne,pool:Ne}:Tn):Tn=hs(),Ft={baseLanes:Ft.baseLanes|q,cachePool:Tn}),Se.memoizedState=Ft,Se.childLanes=xm(P,ut,q),T.memoizedState=dte,de):(Np(T),q=P.child,P=q.sibling,q=v1(q,{mode:\"visible\",children:de.children}),q.return=T,q.sibling=null,P!==null\u0026\u0026(ut=T.deletions,ut===null?(T.deletions=[P],T.flags|=16):ut.push(P)),T.child=q,T.memoizedState=null,q)}function y1(P,T){return T=I_({mode:\"visible\",children:T},P.mode),T.return=P,P.child=T}function I_(P,T){return P=l(22,P,null,T),P.lanes=0,P.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},P}function MI(P,T,q){return xe(T,P.child,null,q),P=y1(T,T.pendingProps.children),P.flags|=2,T.memoizedState=null,P}function VE(P,T,q){P.lanes|=T;var de=P.alternate;de!==null\u0026\u0026(de.lanes|=T),uo(P.return,T,q)}function GC(P,T){var q=cs(P);return P=!q\u0026\u0026typeof S(P)==\"function\",q||P?(q=q?\"array\":\"iterable\",console.error(\"A nested %s was passed to row #%s in \u003cSuspenseList /\u003e. Wrap it in an additional SuspenseList to configure its revealOrder: \u003cSuspenseList revealOrder=...\u003e ... \u003cSuspenseList revealOrder=...\u003e{%s}\u003c/SuspenseList\u003e ... \u003c/SuspenseList\u003e\",q,T,q),!1):!0}function YC(P,T,q,de,Se){var Ne=P.memoizedState;Ne===null?P.memoizedState={isBackwards:T,rendering:null,renderingStartTime:0,last:de,tail:q,tailMode:Se}:(Ne.isBackwards=T,Ne.rendering=null,Ne.renderingStartTime=0,Ne.last=de,Ne.tail=q,Ne.tailMode=Se)}function yf(P,T,q){var de=T.pendingProps,Se=de.revealOrder,Ne=de.tail;if(de=de.children,Se!==void 0\u0026\u0026Se!==\"forwards\"\u0026\u0026Se!==\"backwards\"\u0026\u0026Se!==\"together\"\u0026\u0026!lye[Se])if(lye[Se]=!0,typeof Se==\"string\")switch(Se.toLowerCase()){case\"together\":case\"forwards\":case\"backwards\":console.error('\"%s\" is not a valid value for revealOrder on \u003cSuspenseList /\u003e. Use lowercase \"%s\" instead.',Se,Se.toLowerCase());break;case\"forward\":case\"backward\":console.error('\"%s\" is not a valid value for revealOrder on \u003cSuspenseList /\u003e. React uses the -s suffix in the spelling. Use \"%ss\" instead.',Se,Se.toLowerCase());break;default:console.error('\"%s\" is not a supported revealOrder on \u003cSuspenseList /\u003e. Did you mean \"together\", \"forwards\" or \"backwards\"?',Se)}else console.error('%s is not a supported value for revealOrder on \u003cSuspenseList /\u003e. Did you mean \"together\", \"forwards\" or \"backwards\"?',Se);Ne===void 0||gte[Ne]||(Ne!==\"collapsed\"\u0026\u0026Ne!==\"hidden\"?(gte[Ne]=!0,console.error('\"%s\" is not a supported value for tail on \u003cSuspenseList /\u003e. Did you mean \"collapsed\" or \"hidden\"?',Ne)):Se!==\"forwards\"\u0026\u0026Se!==\"backwards\"\u0026\u0026(gte[Ne]=!0,console.error('\u003cSuspenseList tail=\"%s\" /\u003e is only valid if revealOrder is \"forwards\" or \"backwards\". Did you mean to specify revealOrder=\"forwards\"?',Ne)));e:if((Se===\"forwards\"||Se===\"backwards\")\u0026\u0026de!==void 0\u0026\u0026de!==null\u0026\u0026de!==!1)if(cs(de)){for(var ut=0;ut\u003cde.length;ut++)if(!GC(de[ut],ut))break e}else if(ut=S(de),typeof ut==\"function\"){if(ut=ut.call(de))for(var Ft=ut.next(),Tn=0;!Ft.done;Ft=ut.next()){if(!GC(Ft.value,Tn))break e;Tn++}}else console.error('A single row was passed to a \u003cSuspenseList revealOrder=\"%s\" /\u003e. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Se);if(oc(P,T,de,q),de=Zn.current,(de\u0026Pn)!==0)de=de\u0026on|Pn,T.flags|=128;else{if(P!==null\u0026\u0026(P.flags\u0026128)!==0)e:for(P=T.child;P!==null;){if(P.tag===13)P.memoizedState!==null\u0026\u0026VE(P,q,T);else if(P.tag===19)VE(P,q,T);else if(P.child!==null){P.child.return=P,P=P.child;continue}if(P===T)break e;for(;P.sibling===null;){if(P.return===null||P.return===T)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}de\u0026=on}switch(R(Zn,de,T),Se){case\"forwards\":for(q=T.child,Se=null;q!==null;)P=q.alternate,P!==null\u0026\u0026op(P)===null\u0026\u0026(Se=q),q=q.sibling;q=Se,q===null?(Se=T.child,T.child=null):(Se=q.sibling,q.sibling=null),YC(T,!1,Se,q,Ne);break;case\"backwards\":for(q=null,Se=T.child,T.child=null;Se!==null;){if(P=Se.alternate,P!==null\u0026\u0026op(P)===null){T.child=Se;break}P=Se.sibling,Se.sibling=q,q=Se,Se=P}YC(T,!0,q,null,Ne);break;case\"together\":YC(T,!1,null,null,void 0);break;default:T.memoizedState=null}return T.child}function Fu(P,T,q){if(P!==null\u0026\u0026(T.dependencies=P.dependencies),Rh=-1,ox|=T.lanes,(q\u0026T.childLanes)===0)if(P!==null){if(ko(P,T,q,!1),(q\u0026T.childLanes)===0)return null}else return null;if(P!==null\u0026\u0026T.child!==P.child)throw Error(\"Resuming work not yet implemented.\");if(T.child!==null){for(P=T.child,q=v1(P,P.pendingProps),T.child=q,q.return=T;P.sibling!==null;)P=P.sibling,q=q.sibling=v1(P,P.pendingProps),q.return=T;q.sibling=null}return T.child}function sp(P,T){return(P.lanes\u0026T)!==0?!0:(P=P.dependencies,!!(P!==null\u0026\u0026Ko(P)))}function xf(P,T,q){switch(T.tag){case 3:pn(T,T.stateNode.containerInfo),Ro(T,Wn,P.memoizedState.cache),Nn();break;case 27:case 5:It(T);break;case 4:pn(T,T.stateNode.containerInfo);break;case 10:Ro(T,T.type,T.memoizedProps.value);break;case 12:(q\u0026T.childLanes)!==0\u0026\u0026(T.flags|=4),T.flags|=2048;var de=T.stateNode;de.effectDuration=-0,de.passiveEffectDuration=-0;break;case 13:if(de=T.memoizedState,de!==null)return de.dehydrated!==null?(Np(T),T.flags|=128,null):(q\u0026T.child.childLanes)!==0?I2(P,T,q):(Np(T),P=Fu(P,T,q),P!==null?P.sibling:null);Np(T);break;case 19:var Se=(P.flags\u0026128)!==0;if(de=(q\u0026T.childLanes)!==0,de||(ko(P,T,q,!1),de=(q\u0026T.childLanes)!==0),Se){if(de)return yf(P,T,q);T.flags|=128}if(Se=T.memoizedState,Se!==null\u0026\u0026(Se.rendering=null,Se.tail=null,Se.lastEffect=null),R(Zn,Zn.current,T),de)break;return null;case 22:case 23:return T.lanes=0,c3(P,T,q);case 24:Ro(T,Wn,P.memoizedState.cache)}return Fu(P,T,q)}function C2(P,T,q){if(T._debugNeedsRemount\u0026\u0026P!==null){q=Bh(T.type,T.key,T.pendingProps,T._debugOwner||null,T.mode,T.lanes),q._debugStack=T._debugStack,q._debugTask=T._debugTask;var de=T.return;if(de===null)throw Error(\"Cannot swap the root fiber.\");if(P.alternate=null,T.alternate=null,q.index=T.index,q.sibling=T.sibling,q.return=T.return,q.ref=T.ref,q._debugInfo=T._debugInfo,T===de.child)de.child=q;else{var Se=de.child;if(Se===null)throw Error(\"Expected parent to have a child.\");for(;Se.sibling!==T;)if(Se=Se.sibling,Se===null)throw Error(\"Expected to find the previous sibling.\");Se.sibling=q}return T=de.deletions,T===null?(de.deletions=[P],de.flags|=16):T.push(P),q.flags|=2,q}if(P!==null)if(P.memoizedProps!==T.pendingProps||T.type!==P.type)xu=!0;else{if(!sp(P,q)\u0026\u0026(T.flags\u0026128)===0)return xu=!1,xf(P,T,q);xu=(P.flags\u0026131072)!==0}else xu=!1,(de=ja)\u0026\u0026(it(),de=(T.flags\u00261048576)!==0),de\u0026\u0026(de=T.index,it(),Ct(T,to,de));switch(T.lanes=0,T.tag){case 16:e:if(de=T.pendingProps,P=gy(T.elementType),T.type=P,typeof P==\"function\")zr(P)?(de=nc(P,de),T.tag=1,T.type=P=$C(P),T=uA(null,T,P,de,q)):(T.tag=0,kp(T,P),T.type=P=$C(P),T=rl(null,T,P,de,q));else{if(P!=null){if(Se=P.$typeof,Se===_g){T.tag=11,T.type=P=L2(P),T=gg(null,T,P,de,q);break e}else if(Se===RA){T.tag=14,T=Cc(null,T,P,de,q);break e}}throw T=\"\",P!==null\u0026\u0026typeof P==\"object\"\u0026\u0026P.$typeof===jg\u0026\u0026(T=\" Did you wrap a component in React.lazy() more than once?\"),P=Q(P)||P,Error(\"Element type is invalid. Received a promise that resolves to: \"+P+\". Lazy element type must resolve to a class or function.\"+T)}return T;case 0:return rl(P,T,T.type,T.pendingProps,q);case 1:return de=T.type,Se=nc(de,T.pendingProps),uA(P,T,de,Se,q);case 3:e:{if(pn(T,T.stateNode.containerInfo),P===null)throw Error(\"Should have a current fiber. This is a bug in React.\");var Ne=T.pendingProps;Se=T.memoizedState,de=Se.element,m_(P,T),Ag(T,Ne,null,q);var ut=T.memoizedState;if(Ne=ut.cache,Ro(T,Wn,Ne),Ne!==Se.cache\u0026\u0026Oo(T,[Wn],q,!0),gu(),Ne=ut.element,B0\u0026\u0026Se.isDehydrated)if(Se={element:Ne,isDehydrated:!1,cache:ut.cache},T.updateQueue.baseState=Se,T.memoizedState=Se,T.flags\u0026256){T=ym(P,T,Ne,q);break e}else if(Ne!==de){de=gt(Error(\"This root received an early update, before anything was able hydrate. Switched the entire root to client rendering.\"),T),ei(de),T=ym(P,T,Ne,q);break e}else for(B0\u0026\u0026(Ma=jI(T.stateNode.containerInfo),gp=T,ja=!0,Ff=null,z2=!1,ms=null,Wd=!0),P=Fe(T,null,Ne,q),T.child=P;P;)P.flags=P.flags\u0026-3|4096,P=P.sibling;else{if(Nn(),Ne===de){T=Fu(P,T,q);break e}oc(P,T,Ne,q)}T=T.child}return T;case 26:if(xc)return Tp(P,T),P===null?(P=T1(T.type,null,T.pendingProps,null))?T.memoizedState=P:ja||(T.stateNode=qI(T.type,T.pendingProps,Yt(Bg.current),T)):T.memoizedState=T1(T.type,P.memoizedProps,T.pendingProps,P.memoizedState),null;case 27:if(os)return It(T),P===null\u0026\u0026os\u0026\u0026ja\u0026\u0026(Se=Yt(Bg.current),de=et(),Se=T.stateNode=l0(T.type,T.pendingProps,Se,de,!1),z2||(de=y3(Se,T.type,T.pendingProps,de),de!==null\u0026\u0026(Ao(T,0).serverProps=de)),gp=T,Wd=!0,Ma=R1(T.type,Se,Ma)),oc(P,T,T.pendingProps.children,q),Tp(P,T),P===null\u0026\u0026(T.flags|=4194304),T.child;case 5:return P===null\u0026\u0026ja\u0026\u0026(Ne=et(),de=qc(T.type,T.pendingProps,Ne),Se=Ma,(ut=!Se)||(ut=Cu(Se,T.type,T.pendingProps,Wd),ut!==null?(T.stateNode=ut,z2||(Ne=y3(ut,T.type,T.pendingProps,Ne),Ne!==null\u0026\u0026(Ao(T,0).serverProps=Ne)),gp=T,Ma=u5(ut),Wd=!1,Ne=!0):Ne=!1,ut=!Ne),ut\u0026\u0026(de\u0026\u0026qe(T,Se),vt(T))),It(T),Se=T.type,Ne=T.pendingProps,ut=P!==null?P.memoizedProps:null,de=Ne.children,Pf(Se,Ne)?de=null:ut!==null\u0026\u0026Pf(Se,ut)\u0026\u0026(T.flags|=32),T.memoizedState!==null\u0026\u0026(Se=mf(P,T,_m,null,null,q),jc?Kl._currentValue=Se:Kl._currentValue2=Se),Tp(P,T),oc(P,T,de,q),T.child;case 6:return P===null\u0026\u0026ja\u0026\u0026(P=T.pendingProps,q=et(),P=Yu(P,q),q=Ma,(de=!q)||(de=N4(q,T.pendingProps,Wd),de!==null?(T.stateNode=de,gp=T,Ma=null,de=!0):de=!1,de=!de),de\u0026\u0026(P\u0026\u0026qe(T,q),vt(T))),null;case 13:return I2(P,T,q);case 4:return pn(T,T.stateNode.containerInfo),de=T.pendingProps,P===null?T.child=xe(T,null,de,q):oc(P,T,de,q),T.child;case 11:return gg(P,T,T.type,T.pendingProps,q);case 7:return oc(P,T,T.pendingProps,q),T.child;case 8:return oc(P,T,T.pendingProps.children,q),T.child;case 12:return T.flags|=4,T.flags|=2048,de=T.stateNode,de.effectDuration=-0,de.passiveEffectDuration=-0,oc(P,T,T.pendingProps.children,q),T.child;case 10:return de=T.type,Se=T.pendingProps,Ne=Se.value,\"value\"in Se||uye||(uye=!0,console.error(\"The `value` prop is required for the `\u003cContext.Provider\u003e`. Did you misspell it or forget to pass it?\")),Ro(T,de,Ne),oc(P,T,Se.children,q),T.child;case 9:return Se=T.type._context,de=T.pendingProps.children,typeof de!=\"function\"\u0026\u0026console.error(\"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.\"),mi(T),Se=Fo(Se),Qe(T),de=ci(de,Se,void 0),Pe(),T.flags|=1,oc(P,T,de,q),T.child;case 14:return Cc(P,T,T.type,T.pendingProps,q);case 15:return pa(P,T,T.type,T.pendingProps,q);case 19:return yf(P,T,q);case 31:return de=T.pendingProps,q=T.mode,de={mode:de.mode,children:de.children},P===null?(P=I_(de,q),P.ref=T.ref,T.child=P,P.return=T,T=P):(P=v1(P.child,de),P.ref=T.ref,T.child=P,P.return=T,T=P),T;case 22:return c3(P,T,q);case 24:return mi(T),de=Fo(Wn),P===null?(Se=gr(),Se===null\u0026\u0026(Se=wl,Ne=ur(),Se.pooledCache=Ne,zi(Ne),Ne!==null\u0026\u0026(Se.pooledCacheLanes|=q),Se=Ne),T.memoizedState={parent:de,cache:Se},Ul(T),Ro(T,Wn,Se)):((P.lanes\u0026q)!==0\u0026\u0026(m_(P,T),Ag(T,null,null,q),gu()),Se=P.memoizedState,Ne=T.memoizedState,Se.parent!==de?(Se={parent:de,cache:de},T.memoizedState=Se,T.lanes===0\u0026\u0026(T.memoizedState=T.updateQueue.baseState=Se),Ro(T,Wn,de)):(de=Ne.cache,Ro(T,Wn,de),de!==Se.cache\u0026\u0026Oo(T,[Wn],q,!0))),oc(P,T,T.pendingProps.children,q),T.child;case 29:throw T.pendingProps}throw Error(\"Unknown unit of work tag (\"+T.tag+\"). This error is likely caused by a bug in React. Please file an issue.\")}function $s(P){P.flags|=4}function DI(P,T){if(P!==null\u0026\u0026P.child===T.child)return!1;if((T.flags\u002616)!==0)return!0;for(P=T.child;P!==null;){if((P.flags\u002613878)!==0||(P.subtreeFlags\u002613878)!==0)return!0;P=P.sibling}return!1}function y2(P,T,q,de){if(cl)for(q=T.child;q!==null;){if(q.tag===5||q.tag===6)ZC(P,q.stateNode);else if(!(q.tag===4||os\u0026\u0026q.tag===27)\u0026\u0026q.child!==null){q.child.return=q,q=q.child;continue}if(q===T)break;for(;q.sibling===null;){if(q.return===null||q.return===T)return;q=q.return}q.sibling.return=q.return,q=q.sibling}else if(Ou)for(var Se=T.child;Se!==null;){if(Se.tag===5){var Ne=Se.stateNode;q\u0026\u0026de\u0026\u0026(Ne=zs(Ne,Se.type,Se.memoizedProps)),ZC(P,Ne)}else if(Se.tag===6)Ne=Se.stateNode,q\u0026\u0026de\u0026\u0026(Ne=Rm(Ne,Se.memoizedProps)),ZC(P,Ne);else if(Se.tag!==4){if(Se.tag===22\u0026\u0026Se.memoizedState!==null)Ne=Se.child,Ne!==null\u0026\u0026(Ne.return=Se),y2(P,Se,!0,!0);else if(Se.child!==null){Se.child.return=Se,Se=Se.child;continue}}if(Se===T)break;for(;Se.sibling===null;){if(Se.return===null||Se.return===T)return;Se=Se.return}Se.sibling.return=Se.return,Se=Se.sibling}}function x1(P,T,q,de){var Se=!1;if(Ou)for(var Ne=T.child;Ne!==null;){if(Ne.tag===5){var ut=Ne.stateNode;q\u0026\u0026de\u0026\u0026(ut=zs(ut,Ne.type,Ne.memoizedProps)),Fc(P,ut)}else if(Ne.tag===6)ut=Ne.stateNode,q\u0026\u0026de\u0026\u0026(ut=Rm(ut,Ne.memoizedProps)),Fc(P,ut);else if(Ne.tag!==4){if(Ne.tag===22\u0026\u0026Ne.memoizedState!==null)Se=Ne.child,Se!==null\u0026\u0026(Se.return=Ne),x1(P,Ne,!0,!0),Se=!0;else if(Ne.child!==null){Ne.child.return=Ne,Ne=Ne.child;continue}}if(Ne===T)break;for(;Ne.sibling===null;){if(Ne.return===null||Ne.return===T)return Se;Ne=Ne.return}Ne.sibling.return=Ne.return,Ne=Ne.sibling}return Se}function dg(P,T){if(Ou\u0026\u0026DI(P,T)){P=T.stateNode;var q=P.containerInfo,de=Nf();x1(de,T,!1,!1),P.pendingChildren=de,$s(T),_a(q,de)}}function x2(P,T,q,de){if(cl)P.memoizedProps!==de\u0026\u0026$s(T);else if(Ou){var Se=P.stateNode,Ne=P.memoizedProps;if((P=DI(P,T))||Ne!==de){var ut=et();Ne=Gu(Se,q,Ne,de,!P,null),Ne===Se?T.stateNode=Se:(I3(Ne,q,de,ut)\u0026\u0026$s(T),T.stateNode=Ne,P?y2(Ne,T,!1,!1):$s(T))}else T.stateNode=Se}}function zE(P,T,q){if(fu(T,q)){if(P.flags|=16777216,!Si(T,q))if(WE())P.flags|=8192;else throw N_=hp,T4}else P.flags\u0026=-16777217}function E2(P,T){if(gA(T)){if(P.flags|=16777216,!Us(T))if(WE())P.flags|=8192;else throw N_=hp,T4}else P.flags\u0026=-16777217}function NI(P,T){T!==null\u0026\u0026(P.flags|=4),P.flags\u002616384\u0026\u0026(T=P.tag!==22?J():536870912,P.lanes|=T,Fh|=T)}function Fp(P,T){if(!ja)switch(P.tailMode){case\"hidden\":T=P.tail;for(var q=null;T!==null;)T.alternate!==null\u0026\u0026(q=T),T=T.sibling;q===null?P.tail=null:q.sibling=null;break;case\"collapsed\":q=P.tail;for(var de=null;q!==null;)q.alternate!==null\u0026\u0026(de=q),q=q.sibling;de===null?T||P.tail===null?P.tail=null:P.tail.sibling=null:de.sibling=null}}function qs(P){var T=P.alternate!==null\u0026\u0026P.alternate.child===P.child,q=0,de=0;if(T)if((P.mode\u00262)!==yA){for(var Se=P.selfBaseDuration,Ne=P.child;Ne!==null;)q|=Ne.lanes|Ne.childLanes,de|=Ne.subtreeFlags\u002665011712,de|=Ne.flags\u002665011712,Se+=Ne.treeBaseDuration,Ne=Ne.sibling;P.treeBaseDuration=Se}else for(Se=P.child;Se!==null;)q|=Se.lanes|Se.childLanes,de|=Se.subtreeFlags\u002665011712,de|=Se.flags\u002665011712,Se.return=P,Se=Se.sibling;else if((P.mode\u00262)!==yA){Se=P.actualDuration,Ne=P.selfBaseDuration;for(var ut=P.child;ut!==null;)q|=ut.lanes|ut.childLanes,de|=ut.subtreeFlags,de|=ut.flags,Se+=ut.actualDuration,Ne+=ut.treeBaseDuration,ut=ut.sibling;P.actualDuration=Se,P.treeBaseDuration=Ne}else for(Se=P.child;Se!==null;)q|=Se.lanes|Se.childLanes,de|=Se.subtreeFlags,de|=Se.flags,Se.return=P,Se=Se.sibling;return P.subtreeFlags|=de,P.childLanes=q,T}function RI(P,T,q){var de=T.pendingProps;switch(kt(T),T.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(T),null;case 1:return qs(T),null;case 3:return q=T.stateNode,de=null,P!==null\u0026\u0026(de=P.memoizedState.cache),T.memoizedState.cache!==de\u0026\u0026(T.flags|=2048),On(Wn,T),be(T),q.pendingContext\u0026\u0026(q.context=q.pendingContext,q.pendingContext=null),(P===null||P.child===null)\u0026\u0026(nn(T)?(ro(),$s(T)):P===null||P.memoizedState.isDehydrated\u0026\u0026(T.flags\u0026256)===0||(T.flags|=1024,Co())),dg(P,T),qs(T),null;case 26:if(xc){q=T.type;var Se=T.memoizedState;return P===null?($s(T),Se!==null?(qs(T),E2(T,Se)):(qs(T),zE(T,q,de))):Se?Se!==P.memoizedState?($s(T),qs(T),E2(T,Se)):(qs(T),T.flags\u0026=-16777217):(cl?P.memoizedProps!==de\u0026\u0026$s(T):x2(P,T,q,de),qs(T),zE(T,q,de)),null}case 27:if(os){if(Bt(T),q=Yt(Bg.current),Se=T.type,P!==null\u0026\u0026T.stateNode!=null)cl?P.memoizedProps!==de\u0026\u0026$s(T):x2(P,T,Se,de);else{if(!de){if(T.stateNode===null)throw Error(\"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\");return qs(T),null}P=et(),nn(T)?qt(T,P):(P=l0(Se,de,q,P,!0),T.stateNode=P,$s(T))}return qs(T),null}case 5:if(Bt(T),q=T.type,P!==null\u0026\u0026T.stateNode!=null)x2(P,T,q,de);else{if(!de){if(T.stateNode===null)throw Error(\"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\");return qs(T),null}P=et(),nn(T)?qt(T,P):(Se=Yt(Bg.current),Se=f3(q,de,Se,P,T),y2(Se,T,!1,!1),T.stateNode=Se,I3(Se,q,de,P)\u0026\u0026$s(T))}return qs(T),zE(T,T.type,T.pendingProps),null;case 6:if(P\u0026\u0026T.stateNode!=null)q=P.memoizedProps,cl?q!==de\u0026\u0026$s(T):Ou\u0026\u0026(q!==de?(P=Yt(Bg.current),q=et(),T.stateNode=UI(de,P,q,T),$s(T)):T.stateNode=P.stateNode);else{if(typeof de!=\"string\"\u0026\u0026T.stateNode===null)throw Error(\"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\");if(P=Yt(Bg.current),q=et(),nn(T)){if(!B0)throw Error(\"Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.\");P=T.stateNode,q=T.memoizedProps,Se=!z2,de=null;var Ne=gp;if(Ne!==null)switch(Ne.tag){case 3:Se\u0026\u0026(Se=Tf(P,q,de),Se!==null\u0026\u0026(Ao(T,0).serverProps=Se));break;case 27:case 5:de=Ne.memoizedProps,Se\u0026\u0026(Se=Tf(P,q,de),Se!==null\u0026\u0026(Ao(T,0).serverProps=Se))}xs(P,q,T,de)||vt(T)}else T.stateNode=UI(de,P,q,T)}return qs(T),null;case 13:if(de=T.memoizedState,P===null||P.memoizedState!==null\u0026\u0026P.memoizedState.dehydrated!==null){if(Se=nn(T),de!==null\u0026\u0026de.dehydrated!==null){if(P===null){if(!Se)throw Error(\"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.\");if(!B0)throw Error(\"Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.\");if(Se=T.memoizedState,Se=Se!==null?Se.dehydrated:null,!Se)throw Error(\"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\");Lc(Se,T),qs(T),(T.mode\u00262)!==yA\u0026\u0026de!==null\u0026\u0026(Se=T.child,Se!==null\u0026\u0026(T.treeBaseDuration-=Se.treeBaseDuration))}else ro(),Nn(),(T.flags\u0026128)===0\u0026\u0026(T.memoizedState=null),T.flags|=4,qs(T),(T.mode\u00262)!==yA\u0026\u0026de!==null\u0026\u0026(Se=T.child,Se!==null\u0026\u0026(T.treeBaseDuration-=Se.treeBaseDuration));Se=!1}else Se=Co(),P!==null\u0026\u0026P.memoizedState!==null\u0026\u0026(P.memoizedState.hydrationErrors=Se),Se=!0;if(!Se)return T.flags\u0026256?(Vg(T),T):(Vg(T),null)}return Vg(T),(T.flags\u0026128)!==0?(T.lanes=q,(T.mode\u00262)!==yA\u0026\u0026Nt(T),T):(q=de!==null,P=P!==null\u0026\u0026P.memoizedState!==null,q\u0026\u0026(de=T.child,Se=null,de.alternate!==null\u0026\u0026de.alternate.memoizedState!==null\u0026\u0026de.alternate.memoizedState.cachePool!==null\u0026\u0026(Se=de.alternate.memoizedState.cachePool.pool),Ne=null,de.memoizedState!==null\u0026\u0026de.memoizedState.cachePool!==null\u0026\u0026(Ne=de.memoizedState.cachePool.pool),Ne!==Se\u0026\u0026(de.flags|=2048)),q!==P\u0026\u0026q\u0026\u0026(T.child.flags|=8192),NI(T,T.updateQueue),qs(T),(T.mode\u00262)!==yA\u0026\u0026q\u0026\u0026(P=T.child,P!==null\u0026\u0026(T.treeBaseDuration-=P.treeBaseDuration)),null);case 4:return be(T),dg(P,T),P===null\u0026\u0026Vd(T.stateNode.containerInfo),qs(T),null;case 10:return On(T.type,T),qs(T),null;case 19:if(k(Zn,T),Se=T.memoizedState,Se===null)return qs(T),null;if(de=(T.flags\u0026128)!==0,Ne=Se.rendering,Ne===null)if(de)Fp(Se,!1);else{if(_l!==nx||P!==null\u0026\u0026(P.flags\u0026128)!==0)for(P=T.child;P!==null;){if(Ne=op(P),Ne!==null){for(T.flags|=128,Fp(Se,!1),P=Ne.updateQueue,T.updateQueue=P,NI(T,P),T.subtreeFlags=0,P=q,q=T.child;q!==null;)D4(q,P),q=q.sibling;return R(Zn,Zn.current\u0026on|Pn,T),T.child}P=P.sibling}Se.tail!==null\u0026\u0026us()\u003eL4\u0026\u0026(T.flags|=128,de=!0,Fp(Se,!1),T.lanes=4194304)}else{if(!de)if(P=op(Ne),P!==null){if(T.flags|=128,de=!0,P=P.updateQueue,T.updateQueue=P,NI(T,P),Fp(Se,!0),Se.tail===null\u0026\u0026Se.tailMode===\"hidden\"\u0026\u0026!Ne.alternate\u0026\u0026!ja)return qs(T),null}else 2*us()-Se.renderingStartTime\u003eL4\u0026\u0026q!==536870912\u0026\u0026(T.flags|=128,de=!0,Fp(Se,!1),T.lanes=4194304);Se.isBackwards?(Ne.sibling=T.child,T.child=Ne):(P=Se.last,P!==null?P.sibling=Ne:T.child=Ne,Se.last=Ne)}return Se.tail!==null?(P=Se.tail,Se.rendering=P,Se.tail=P.sibling,Se.renderingStartTime=us(),P.sibling=null,q=Zn.current,q=de?q\u0026on|Pn:q\u0026on,R(Zn,q,T),P):(qs(T),null);case 22:case 23:return Vg(T),_1(T),de=T.memoizedState!==null,P!==null?P.memoizedState!==null!==de\u0026\u0026(T.flags|=8192):de\u0026\u0026(T.flags|=8192),de?(q\u0026536870912)!==0\u0026\u0026(T.flags\u0026128)===0\u0026\u0026(qs(T),T.subtreeFlags\u00266\u0026\u0026(T.flags|=8192)):qs(T),q=T.updateQueue,q!==null\u0026\u0026NI(T,q.retryQueue),q=null,P!==null\u0026\u0026P.memoizedState!==null\u0026\u0026P.memoizedState.cachePool!==null\u0026\u0026(q=P.memoizedState.cachePool.pool),de=null,T.memoizedState!==null\u0026\u0026T.memoizedState.cachePool!==null\u0026\u0026(de=T.memoizedState.cachePool.pool),de!==q\u0026\u0026(T.flags|=2048),P!==null\u0026\u0026k(m5,T),null;case 24:return q=null,P!==null\u0026\u0026(q=P.memoizedState.cache),T.memoizedState.cache!==q\u0026\u0026(T.flags|=2048),On(Wn,T),qs(T),null;case 25:return null;case 30:return null}throw Error(\"Unknown unit of work tag (\"+T.tag+\"). This error is likely caused by a bug in React. Please file an issue.\")}function Ch(P,T){switch(kt(T),T.tag){case 1:return P=T.flags,P\u002665536?(T.flags=P\u0026-65537|128,(T.mode\u00262)!==yA\u0026\u0026Nt(T),T):null;case 3:return On(Wn,T),be(T),P=T.flags,(P\u002665536)!==0\u0026\u0026(P\u0026128)===0?(T.flags=P\u0026-65537|128,T):null;case 26:case 27:case 5:return Bt(T),null;case 13:if(Vg(T),P=T.memoizedState,P!==null\u0026\u0026P.dehydrated!==null){if(T.alternate===null)throw Error(\"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.\");Nn()}return P=T.flags,P\u002665536?(T.flags=P\u0026-65537|128,(T.mode\u00262)!==yA\u0026\u0026Nt(T),T):null;case 19:return k(Zn,T),null;case 4:return be(T),null;case 10:return On(T.type,T),null;case 22:case 23:return Vg(T),_1(T),P!==null\u0026\u0026k(m5,T),P=T.flags,P\u002665536?(T.flags=P\u0026-65537|128,(T.mode\u00262)!==yA\u0026\u0026Nt(T),T):null;case 24:return On(Wn,T),null;case 25:return null;default:return null}}function C_(P,T){switch(kt(T),T.tag){case 3:On(Wn,T),be(T);break;case 26:case 27:case 5:Bt(T);break;case 4:be(T);break;case 13:Vg(T);break;case 19:k(Zn,T);break;case 10:On(T.type,T);break;case 22:case 23:Vg(T),_1(T),P!==null\u0026\u0026k(m5,T);break;case 24:On(Wn,T)}}function yh(P){return(P.mode\u00262)!==yA}function Em(P,T){yh(P)?(Qt(),TI(T,P),Ht()):TI(T,P)}function z0(P,T,q){yh(P)?(Qt(),Ef(q,P,T),Ht()):Ef(q,P,T)}function TI(P,T){try{var q=T.updateQueue,de=q!==null?q.lastEffect:null;if(de!==null){var Se=de.next;q=Se;do{if((q.tag\u0026P)===P\u0026\u0026((P\u0026zu)!==td?G!==null\u0026\u0026typeof G.markComponentPassiveEffectMountStarted==\"function\"\u0026\u0026G.markComponentPassiveEffectMountStarted(T):(P\u0026X0)!==td\u0026\u0026G!==null\u0026\u0026typeof G.markComponentLayoutEffectMountStarted==\"function\"\u0026\u0026G.markComponentLayoutEffectMountStarted(T),de=void 0,(P\u0026vl)!==td\u0026\u0026(EM=!0),de=Lt(T,ly,q),(P\u0026vl)!==td\u0026\u0026(EM=!1),(P\u0026zu)!==td?G!==null\u0026\u0026typeof G.markComponentPassiveEffectMountStopped==\"function\"\u0026\u0026G.markComponentPassiveEffectMountStopped():(P\u0026X0)!==td\u0026\u0026G!==null\u0026\u0026typeof G.markComponentLayoutEffectMountStopped==\"function\"\u0026\u0026G.markComponentLayoutEffectMountStopped(),de!==void 0\u0026\u0026typeof de!=\"function\")){var Ne=void 0;Ne=(q.tag\u0026X0)!==0?\"useLayoutEffect\":(q.tag\u0026vl)!==0?\"useInsertionEffect\":\"useEffect\";var ut=void 0;ut=de===null?\" You returned null. If your effect does not require clean up, return undefined (or nothing).\":typeof de.then==\"function\"?`\n\nIt looks like you wrote `+Ne+`(async () =\u003e ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n`+Ne+`(() =\u003e {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:\" You returned: \"+de,Lt(T,function(Ft,Tn){console.error(\"%s must not return anything besides a function, which is used for clean-up.%s\",Ft,Tn)},Ne,ut)}q=q.next}while(q!==Se)}}catch(Ft){NA(T,T.return,Ft)}}function Ef(P,T,q){try{var de=T.updateQueue,Se=de!==null?de.lastEffect:null;if(Se!==null){var Ne=Se.next;de=Ne;do{if((de.tag\u0026P)===P){var ut=de.inst,Ft=ut.destroy;Ft!==void 0\u0026\u0026(ut.destroy=void 0,(P\u0026zu)!==td?G!==null\u0026\u0026typeof G.markComponentPassiveEffectUnmountStarted==\"function\"\u0026\u0026G.markComponentPassiveEffectUnmountStarted(T):(P\u0026X0)!==td\u0026\u0026G!==null\u0026\u0026typeof G.markComponentLayoutEffectUnmountStarted==\"function\"\u0026\u0026G.markComponentLayoutEffectUnmountStarted(T),(P\u0026vl)!==td\u0026\u0026(EM=!0),Se=T,Lt(Se,uy,Se,q,Ft),(P\u0026vl)!==td\u0026\u0026(EM=!1),(P\u0026zu)!==td?G!==null\u0026\u0026typeof G.markComponentPassiveEffectUnmountStopped==\"function\"\u0026\u0026G.markComponentPassiveEffectUnmountStopped():(P\u0026X0)!==td\u0026\u0026G!==null\u0026\u0026typeof G.markComponentLayoutEffectUnmountStopped==\"function\"\u0026\u0026G.markComponentLayoutEffectUnmountStopped())}de=de.next}while(de!==Ne)}}catch(Tn){NA(T,T.return,Tn)}}function Q4(P,T){yh(P)?(Qt(),TI(T,P),Ht()):TI(T,P)}function B2(P,T,q){yh(P)?(Qt(),Ef(q,P,T),Ht()):Ef(q,P,T)}function Lp(P){var T=P.updateQueue;if(T!==null){var q=P.stateNode;P.type.defaultProps||\"ref\"in P.memoizedProps||$S||(q.props!==P.memoizedProps\u0026\u0026console.error(\"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",w(P)||\"instance\"),q.state!==P.memoizedState\u0026\u0026console.error(\"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",w(P)||\"instance\"));try{Lt(P,O0,T,q)}catch(de){NA(P,P.return,de)}}}function ma(P,T,q){return P.getSnapshotBeforeUpdate(T,q)}function b2(P,T){var q=T.memoizedProps,de=T.memoizedState;T=P.stateNode,P.type.defaultProps||\"ref\"in P.memoizedProps||$S||(T.props!==P.memoizedProps\u0026\u0026console.error(\"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",w(P)||\"instance\"),T.state!==P.memoizedState\u0026\u0026console.error(\"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",w(P)||\"instance\"));try{var Se=nc(P.type,q,P.elementType===P.type),Ne=Lt(P,ma,T,Se,de);q=gye,Ne!==void 0||q.has(P.type)||(q.add(P.type),Lt(P,function(){console.error(\"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.\",w(P))})),T.__reactInternalSnapshotBeforeUpdate=Ne}catch(ut){NA(P,P.return,ut)}}function Hd(P,T,q){q.props=nc(P.type,P.memoizedProps),q.state=P.memoizedState,yh(P)?(Qt(),Lt(P,qp,P,T,q),Ht()):Lt(P,qp,P,T,q)}function E1(P){var T=P.ref;if(T!==null){switch(P.tag){case 26:case 27:case 5:var q=fg(P.stateNode);break;case 30:q=P.stateNode;break;default:q=P.stateNode}if(typeof T==\"function\")if(yh(P))try{Qt(),P.refCleanup=T(q)}finally{Ht()}else P.refCleanup=T(q);else typeof T==\"string\"?console.error(\"String refs are no longer supported.\"):T.hasOwnProperty(\"current\")||console.error(\"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().\",w(P)),T.current=q}}function kI(P,T){try{Lt(P,E1,P)}catch(q){NA(P,T,q)}}function Od(P,T){var q=P.ref,de=P.refCleanup;if(q!==null)if(typeof de==\"function\")try{if(yh(P))try{Qt(),Lt(P,de)}finally{Ht(P)}else Lt(P,de)}catch(Se){NA(P,T,Se)}finally{P.refCleanup=null,P=P.alternate,P!=null\u0026\u0026(P.refCleanup=null)}else if(typeof q==\"function\")try{if(yh(P))try{Qt(),Lt(P,q,null)}finally{Ht(P)}else Lt(P,q,null)}catch(Se){NA(P,T,Se)}else q.current=null}function B1(P,T,q,de){var Se=P.memoizedProps,Ne=Se.id,ut=Se.onCommit;Se=Se.onRender,T=T===null?\"mount\":\"update\",Tm\u0026\u0026(T=\"nested-update\"),typeof Se==\"function\"\u0026\u0026Se(Ne,T,P.actualDuration,P.treeBaseDuration,P.actualStartTime,q),typeof ut==\"function\"\u0026\u0026ut(P.memoizedProps.id,T,de,q)}function FI(P,T,q,de){var Se=P.memoizedProps;P=Se.id,Se=Se.onPostCommit,T=T===null?\"mount\":\"update\",Tm\u0026\u0026(T=\"nested-update\"),typeof Se==\"function\"\u0026\u0026Se(P,T,de,q)}function UC(P){var T=P.type,q=P.memoizedProps,de=P.stateNode;try{Lt(P,Yi,de,T,q,P)}catch(Se){NA(P,P.return,Se)}}function S2(P,T,q){try{Lt(P,c5,P.stateNode,P.type,q,T,P)}catch(de){NA(P,P.return,de)}}function KC(P){return P.tag===5||P.tag===3||(xc?P.tag===26:!1)||(os?P.tag===27\u0026\u0026dl(P.type):!1)||P.tag===4}function l3(P){e:for(;;){for(;P.sibling===null;){if(P.return===null||KC(P.return))return null;P=P.return}for(P.sibling.return=P.return,P=P.sibling;P.tag!==5\u0026\u0026P.tag!==6\u0026\u0026P.tag!==18;){if(os\u0026\u0026P.tag===27\u0026\u0026dl(P.type)||P.flags\u00262||P.child===null||P.tag===4)continue e;P.child.return=P,P=P.child}if(!(P.flags\u00262))return P.stateNode}}function y_(P,T,q){var de=P.tag;if(de===5||de===6)P=P.stateNode,T?M1(q,P,T):WI(q,P);else if(de!==4\u0026\u0026(os\u0026\u0026de===27\u0026\u0026dl(P.type)\u0026\u0026(q=P.stateNode,T=null),P=P.child,P!==null))for(y_(P,T,q),P=P.sibling;P!==null;)y_(P,T,q),P=P.sibling}function ap(P,T,q){var de=P.tag;if(de===5||de===6)P=P.stateNode,T?Df(q,P,T):ll(q,P);else if(de!==4\u0026\u0026(os\u0026\u0026de===27\u0026\u0026dl(P.type)\u0026\u0026(q=P.stateNode),P=P.child,P!==null))for(ap(P,T,q),P=P.sibling;P!==null;)ap(P,T,q),P=P.sibling}function u3(P){if(cl){for(var T,q=P.return;q!==null;){if(KC(q)){T=q;break}q=q.return}if(T==null)throw Error(\"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\");switch(T.tag){case 27:if(os){T=T.stateNode,q=l3(P),ap(P,q,T);break}case 5:q=T.stateNode,T.flags\u002632\u0026\u0026(yg(q),T.flags\u0026=-33),T=l3(P),ap(P,T,q);break;case 3:case 4:T=T.stateNode.containerInfo,q=l3(P),y_(P,q,T);break;default:throw Error(\"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\")}}}function Q2(P,T,q){P=P.containerInfo;try{Lt(T,fa,P,q)}catch(de){NA(T,T.return,de)}}function Gd(P){var T=P.stateNode,q=P.memoizedProps;try{Lt(P,k1,P.type,q,T,P)}catch(de){NA(P,P.return,de)}}function Yd(P,T){for(Ig(P.containerInfo),k_=T;k_!==null;)if(P=k_,T=P.child,(P.subtreeFlags\u00261024)!==0\u0026\u0026T!==null)T.return=P,k_=T;else for(;k_!==null;){T=P=k_;var q=T.alternate,de=T.flags;switch(T.tag){case 0:break;case 11:case 15:break;case 1:(de\u00261024)!==0\u0026\u0026q!==null\u0026\u0026b2(T,q);break;case 3:(de\u00261024)!==0\u0026\u0026cl\u0026\u0026zd(T.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((de\u00261024)!==0)throw Error(\"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\")}if(T=P.sibling,T!==null){T.return=P.return,k_=T;break}k_=P.return}}function b1(P,T,q){var de=q.flags;switch(q.tag){case 0:case 11:case 15:zg(P,q),de\u00264\u0026\u0026Em(q,X0|zl);break;case 1:if(zg(P,q),de\u00264)if(P=q.stateNode,T===null)q.type.defaultProps||\"ref\"in q.memoizedProps||$S||(P.props!==q.memoizedProps\u0026\u0026console.error(\"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",w(q)||\"instance\"),P.state!==q.memoizedState\u0026\u0026console.error(\"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",w(q)||\"instance\")),yh(q)?(Qt(),Lt(q,Ca,q,P),Ht()):Lt(q,Ca,q,P);else{var Se=nc(q.type,T.memoizedProps);T=T.memoizedState,q.type.defaultProps||\"ref\"in q.memoizedProps||$S||(P.props!==q.memoizedProps\u0026\u0026console.error(\"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.\",w(q)||\"instance\"),P.state!==q.memoizedState\u0026\u0026console.error(\"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.\",w(q)||\"instance\")),yh(q)?(Qt(),Lt(q,Wi,q,P,Se,T,P.__reactInternalSnapshotBeforeUpdate),Ht()):Lt(q,Wi,q,P,Se,T,P.__reactInternalSnapshotBeforeUpdate)}de\u002664\u0026\u0026Lp(q),de\u0026512\u0026\u0026kI(q,q.return);break;case 3:if(T=Ar(),zg(P,q),de\u002664\u0026\u0026(de=q.updateQueue,de!==null)){if(Se=null,q.child!==null)switch(q.child.tag){case 27:case 5:Se=fg(q.child.stateNode);break;case 1:Se=q.child.stateNode}try{Lt(q,O0,de,Se)}catch(ut){NA(q,q.return,ut)}}P.effectDuration+=ws(T);break;case 27:os\u0026\u0026T===null\u0026\u0026de\u00264\u0026\u0026Gd(q);case 26:case 5:zg(P,q),T===null\u0026\u0026de\u00264\u0026\u0026UC(q),de\u0026512\u0026\u0026kI(q,q.return);break;case 12:if(de\u00264){de=Ar(),zg(P,q),P=q.stateNode,P.effectDuration+=ds(de);try{Lt(q,B1,q,T,u8,P.effectDuration)}catch(ut){NA(q,q.return,ut)}}else zg(P,q);break;case 13:zg(P,q),de\u00264\u0026\u0026Bm(P,q),de\u002664\u0026\u0026(P=q.memoizedState,P!==null\u0026\u0026(P=P.dehydrated,P!==null\u0026\u0026(q=e5.bind(null,q),N1(P,q))));break;case 22:if(de=q.memoizedState!==null||I9,!de){T=T!==null\u0026\u0026T.memoizedState!==null||mp,Se=I9;var Ne=mp;I9=de,(mp=T)\u0026\u0026!Ne?Va(P,q,(q.subtreeFlags\u00268772)!==0):zg(P,q),I9=Se,mp=Ne}break;case 30:break;default:zg(P,q)}}function v4(P){var T=P.alternate;T!==null\u0026\u0026(P.alternate=null,v4(T)),P.child=null,P.deletions=null,P.sibling=null,P.tag===5\u0026\u0026(T=P.stateNode,T!==null\u0026\u0026Vs(T)),P.stateNode=null,P._debugOwner=null,P.return=null,P.dependencies=null,P.memoizedProps=null,P.memoizedState=null,P.pendingProps=null,P.stateNode=null,P.updateQueue=null}function Hp(P,T,q){for(q=q.child;q!==null;)VC(P,T,q),q=q.sibling}function VC(P,T,q){if(Ku\u0026\u0026typeof Ku.onCommitFiberUnmount==\"function\")try{Ku.onCommitFiberUnmount(up,q)}catch(Ne){V||(V=!0,console.error(\"React instrumentation encountered an error: %s\",Ne))}switch(q.tag){case 26:if(xc){mp||Od(q,T),Hp(P,T,q),q.memoizedState?U2(q.memoizedState):q.stateNode\u0026\u0026kf(q.stateNode);break}case 27:if(os){mp||Od(q,T);var de=Xp,Se=hy;dl(q.type)\u0026\u0026(Xp=q.stateNode,hy=!1),Hp(P,T,q),Lt(q,Ph,q.stateNode),Xp=de,hy=Se;break}case 5:mp||Od(q,T);case 6:if(cl){if(de=Xp,Se=hy,Xp=null,Hp(P,T,q),Xp=de,hy=Se,Xp!==null)if(hy)try{Lt(q,Iu,Xp,q.stateNode)}catch(Ne){NA(q,T,Ne)}else try{Lt(q,ul,Xp,q.stateNode)}catch(Ne){NA(q,T,Ne)}}else Hp(P,T,q);break;case 18:cl\u0026\u0026Xp!==null\u0026\u0026(hy?qg(Xp,q.stateNode):wh(Xp,q.stateNode));break;case 4:cl?(de=Xp,Se=hy,Xp=q.stateNode.containerInfo,hy=!0,Hp(P,T,q),Xp=de,hy=Se):(Ou\u0026\u0026Q2(q.stateNode,q,Nf()),Hp(P,T,q));break;case 0:case 11:case 14:case 15:mp||Ef(vl,q,T),mp||z0(q,T,X0),Hp(P,T,q);break;case 1:mp||(Od(q,T),de=q.stateNode,typeof de.componentWillUnmount==\"function\"\u0026\u0026Hd(q,T,de)),Hp(P,T,q);break;case 21:Hp(P,T,q);break;case 22:mp=(de=mp)||q.memoizedState!==null,Hp(P,T,q),mp=de;break;default:Hp(P,T,q)}}function Bm(P,T){if(B0\u0026\u0026T.memoizedState===null\u0026\u0026(P=T.alternate,P!==null\u0026\u0026(P=P.memoizedState,P!==null\u0026\u0026(P=P.dehydrated,P!==null))))try{Lt(T,Ps,P)}catch(q){NA(T,T.return,q)}}function Xr(P){switch(P.tag){case 13:case 19:var T=P.stateNode;return T===null\u0026\u0026(T=P.stateNode=new dye),T;case 22:return P=P.stateNode,T=P._retryCache,T===null\u0026\u0026(T=P._retryCache=new dye),T;default:throw Error(\"Unexpected Suspense handler tag (\"+P.tag+\"). This is a bug in React.\")}}function v2(P,T){var q=Xr(P);T.forEach(function(de){var Se=u9.bind(null,P,de);if(!q.has(de)){if(q.add(de),Ae)if(lM!==null\u0026\u0026uM!==null)Qf(uM,lM);else throw Error(\"Expected finished root and lanes to be set. This is a bug in React.\");de.then(Se,Se)}})}function Ts(P,T){var q=T.deletions;if(q!==null)for(var de=0;de\u003cq.length;de++){var Se=P,Ne=T,ut=q[de];if(cl){var Ft=Ne;e:for(;Ft!==null;){switch(Ft.tag){case 27:if(os){if(dl(Ft.type)){Xp=Ft.stateNode,hy=!1;break e}break}case 5:Xp=Ft.stateNode,hy=!1;break e;case 3:case 4:Xp=Ft.stateNode.containerInfo,hy=!0;break e}Ft=Ft.return}if(Xp===null)throw Error(\"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\");VC(Se,Ne,ut),Xp=null,hy=!1}else VC(Se,Ne,ut);Se=ut,Ne=Se.alternate,Ne!==null\u0026\u0026(Ne.return=null),Se.return=null}if(T.subtreeFlags\u002613878)for(T=T.child;T!==null;)S1(T,P),T=T.sibling}function S1(P,T){var q=P.alternate,de=P.flags;switch(P.tag){case 0:case 11:case 14:case 15:Ts(T,P),CA(P),de\u00264\u0026\u0026(Ef(vl|zl,P,P.return),TI(vl|zl,P),z0(P,P.return,X0|zl));break;case 1:Ts(T,P),CA(P),de\u0026512\u0026\u0026(mp||q===null||Od(q,q.return)),de\u002664\u0026\u0026I9\u0026\u0026(P=P.updateQueue,P!==null\u0026\u0026(de=P.callbacks,de!==null\u0026\u0026(q=P.shared.hiddenCallbacks,P.shared.hiddenCallbacks=q===null?de:q.concat(de))));break;case 26:if(xc){var Se=I5;Ts(T,P),CA(P),de\u0026512\u0026\u0026(mp||q===null||Od(q,q.return)),de\u00264\u0026\u0026(de=q!==null?q.memoizedState:null,T=P.memoizedState,q===null?T===null?P.stateNode===null?P.stateNode=K2(Se,P.type,P.memoizedProps,P):ty(Se,P.type,P.stateNode):P.stateNode=Xg(Se,T,P.memoizedProps):de!==T?(de===null?q.stateNode!==null\u0026\u0026kf(q.stateNode):U2(de),T===null?ty(Se,P.type,P.stateNode):Xg(Se,T,P.memoizedProps)):T===null\u0026\u0026P.stateNode!==null\u0026\u0026S2(P,P.memoizedProps,q.memoizedProps));break}case 27:if(os){Ts(T,P),CA(P),de\u0026512\u0026\u0026(mp||q===null||Od(q,q.return)),q!==null\u0026\u0026de\u00264\u0026\u0026S2(P,P.memoizedProps,q.memoizedProps);break}case 5:if(Ts(T,P),CA(P),de\u0026512\u0026\u0026(mp||q===null||Od(q,q.return)),cl){if(P.flags\u002632){T=P.stateNode;try{Lt(P,yg,T)}catch(di){NA(P,P.return,di)}}de\u00264\u0026\u0026P.stateNode!=null\u0026\u0026(T=P.memoizedProps,S2(P,T,q!==null?q.memoizedProps:T)),de\u00261024\u0026\u0026(DK=!0,P.type!==\"form\"\u0026\u0026console.error(\"Unexpected host component type. Expected a form. This is a bug in React.\"))}break;case 6:if(Ts(T,P),CA(P),de\u00264\u0026\u0026cl){if(P.stateNode===null)throw Error(\"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\");de=P.memoizedProps,q=q!==null?q.memoizedProps:de,T=P.stateNode;try{Lt(P,A5,T,q,de)}catch(di){NA(P,P.return,di)}}break;case 3:if(Se=Ar(),xc){ls();var Ne=I5;I5=$I(T.containerInfo),Ts(T,P),I5=Ne}else Ts(T,P);if(CA(P),de\u00264){if(cl\u0026\u0026B0\u0026\u0026q!==null\u0026\u0026q.memoizedState.isDehydrated)try{Lt(P,Ja,T.containerInfo)}catch(di){NA(P,P.return,di)}if(Ou){de=T.containerInfo,q=T.pendingChildren;try{Lt(P,fa,de,q)}catch(di){NA(P,P.return,di)}}}DK\u0026\u0026(DK=!1,x0(P)),T.effectDuration+=ws(Se);break;case 4:xc?(q=I5,I5=$I(P.stateNode.containerInfo),Ts(T,P),CA(P),I5=q):(Ts(T,P),CA(P)),de\u00264\u0026\u0026Ou\u0026\u0026Q2(P.stateNode,P,P.stateNode.pendingChildren);break;case 12:de=Ar(),Ts(T,P),CA(P),P.stateNode.effectDuration+=ds(de);break;case 13:Ts(T,P),CA(P),P.child.flags\u00268192\u0026\u0026P.memoizedState!==null!=(q!==null\u0026\u0026q.memoizedState!==null)\u0026\u0026(RK=us()),de\u00264\u0026\u0026(de=P.updateQueue,de!==null\u0026\u0026(P.updateQueue=null,v2(P,de)));break;case 22:Se=P.memoizedState!==null;var ut=q!==null\u0026\u0026q.memoizedState!==null,Ft=I9,Tn=mp;if(I9=Ft||Se,mp=Tn||ut,Ts(T,P),mp=Tn,I9=Ft,CA(P),de\u00268192\u0026\u0026(T=P.stateNode,T._visibility=Se?T._visibility\u0026-2:T._visibility|1,Se\u0026\u0026(q===null||ut||I9||mp||Ss(P)),cl)){e:if(q=null,cl)for(T=P;;){if(T.tag===5||xc\u0026\u0026T.tag===26){if(q===null){ut=q=T;try{Ne=ut.stateNode,Se?Lt(ut,ss,Ne):Lt(ut,l5,ut.stateNode,ut.memoizedProps)}catch(di){NA(ut,ut.return,di)}}}else if(T.tag===6){if(q===null){ut=T;try{var _o=ut.stateNode;Se?Lt(ut,D1,_o):Lt(ut,Yp,_o,ut.memoizedProps)}catch(di){NA(ut,ut.return,di)}}}else if((T.tag!==22\u0026\u0026T.tag!==23||T.memoizedState===null||T===P)\u0026\u0026T.child!==null){T.child.return=T,T=T.child;continue}if(T===P)break e;for(;T.sibling===null;){if(T.return===null||T.return===P)break e;q===T\u0026\u0026(q=null),T=T.return}q===T\u0026\u0026(q=null),T.sibling.return=T.return,T=T.sibling}}de\u00264\u0026\u0026(de=P.updateQueue,de!==null\u0026\u0026(q=de.retryQueue,q!==null\u0026\u0026(de.retryQueue=null,v2(P,q))));break;case 19:Ts(T,P),CA(P),de\u00264\u0026\u0026(de=P.updateQueue,de!==null\u0026\u0026(P.updateQueue=null,v2(P,de)));break;case 30:break;case 21:break;default:Ts(T,P),CA(P)}}function CA(P){var T=P.flags;if(T\u00262){try{Lt(P,u3,P)}catch(q){NA(P,P.return,q)}P.flags\u0026=-3}T\u00264096\u0026\u0026(P.flags\u0026=-4097)}function x0(P){if(P.subtreeFlags\u00261024)for(P=P.child;P!==null;){var T=P;x0(T),T.tag===5\u0026\u0026T.flags\u00261024\u0026\u0026VI(T.stateNode),P=P.sibling}}function zg(P,T){if(T.subtreeFlags\u00268772)for(T=T.child;T!==null;)b1(P,T.alternate,T),T=T.sibling}function bm(P){switch(P.tag){case 0:case 11:case 14:case 15:z0(P,P.return,X0),Ss(P);break;case 1:Od(P,P.return);var T=P.stateNode;typeof T.componentWillUnmount==\"function\"\u0026\u0026Hd(P,P.return,T),Ss(P);break;case 27:os\u0026\u0026Lt(P,Ph,P.stateNode);case 26:case 5:Od(P,P.return),Ss(P);break;case 22:P.memoizedState===null\u0026\u0026Ss(P);break;case 30:Ss(P);break;default:Ss(P)}}function Ss(P){for(P=P.child;P!==null;)bm(P),P=P.sibling}function ic(P,T,q,de){var Se=q.flags;switch(q.tag){case 0:case 11:case 15:Va(P,q,de),Em(q,X0);break;case 1:if(Va(P,q,de),T=q.stateNode,typeof T.componentDidMount==\"function\"\u0026\u0026Lt(q,Ca,q,T),T=q.updateQueue,T!==null){P=q.stateNode;try{Lt(q,FC,T,P)}catch(Ne){NA(q,q.return,Ne)}}de\u0026\u0026Se\u002664\u0026\u0026Lp(q),kI(q,q.return);break;case 27:os\u0026\u0026Gd(q);case 26:case 5:Va(P,q,de),de\u0026\u0026T===null\u0026\u0026Se\u00264\u0026\u0026UC(q),kI(q,q.return);break;case 12:if(de\u0026\u0026Se\u00264){Se=Ar(),Va(P,q,de),de=q.stateNode,de.effectDuration+=ds(Se);try{Lt(q,B1,q,T,u8,de.effectDuration)}catch(Ne){NA(q,q.return,Ne)}}else Va(P,q,de);break;case 13:Va(P,q,de),de\u0026\u0026Se\u00264\u0026\u0026Bm(P,q);break;case 22:q.memoizedState===null\u0026\u0026Va(P,q,de),kI(q,q.return);break;case 30:break;default:Va(P,q,de)}}function Va(P,T,q){for(q=q\u0026\u0026(T.subtreeFlags\u00268772)!==0,T=T.child;T!==null;)ic(P,T.alternate,T,q),T=T.sibling}function LI(P,T){var q=null;P!==null\u0026\u0026P.memoizedState!==null\u0026\u0026P.memoizedState.cachePool!==null\u0026\u0026(q=P.memoizedState.cachePool.pool),P=null,T.memoizedState!==null\u0026\u0026T.memoizedState.cachePool!==null\u0026\u0026(P=T.memoizedState.cachePool.pool),P!==q\u0026\u0026(P!=null\u0026\u0026zi(P),q!=null\u0026\u0026bi(q))}function Lu(P,T){P=null,T.alternate!==null\u0026\u0026(P=T.alternate.memoizedState.cache),T=T.memoizedState.cache,T!==P\u0026\u0026(zi(T),P!=null\u0026\u0026bi(P))}function Jg(P,T,q,de){if(T.subtreeFlags\u002610256)for(T=T.child;T!==null;)x_(P,T,q,de),T=T.sibling}function x_(P,T,q,de){var Se=T.flags;switch(T.tag){case 0:case 11:case 15:Jg(P,T,q,de),Se\u00262048\u0026\u0026Q4(T,zu|zl);break;case 1:Jg(P,T,q,de);break;case 3:var Ne=Ar();Jg(P,T,q,de),Se\u00262048\u0026\u0026(q=null,T.alternate!==null\u0026\u0026(q=T.alternate.memoizedState.cache),T=T.memoizedState.cache,T!==q\u0026\u0026(zi(T),q!=null\u0026\u0026bi(q))),P.passiveEffectDuration+=ws(Ne);break;case 12:if(Se\u00262048){Se=Ar(),Jg(P,T,q,de),P=T.stateNode,P.passiveEffectDuration+=ds(Se);try{Lt(T,FI,T,T.alternate,u8,P.passiveEffectDuration)}catch(Ft){NA(T,T.return,Ft)}}else Jg(P,T,q,de);break;case 13:Jg(P,T,q,de);break;case 23:break;case 22:Ne=T.stateNode;var ut=T.alternate;T.memoizedState!==null?Ne._visibility\u00262?Jg(P,T,q,de):Ud(P,T):Ne._visibility\u00262?Jg(P,T,q,de):(Ne._visibility|=2,hg(P,T,q,de,(T.subtreeFlags\u002610256)!==0)),Se\u00262048\u0026\u0026LI(ut,T);break;case 24:Jg(P,T,q,de),Se\u00262048\u0026\u0026Lu(T.alternate,T);break;default:Jg(P,T,q,de)}}function hg(P,T,q,de,Se){for(Se=Se\u0026\u0026(T.subtreeFlags\u002610256)!==0,T=T.child;T!==null;)xh(P,T,q,de,Se),T=T.sibling}function xh(P,T,q,de,Se){var Ne=T.flags;switch(T.tag){case 0:case 11:case 15:hg(P,T,q,de,Se),Q4(T,zu);break;case 23:break;case 22:var ut=T.stateNode;T.memoizedState!==null?ut._visibility\u00262?hg(P,T,q,de,Se):Ud(P,T):(ut._visibility|=2,hg(P,T,q,de,Se)),Se\u0026\u0026Ne\u00262048\u0026\u0026LI(T.alternate,T);break;case 24:hg(P,T,q,de,Se),Se\u0026\u0026Ne\u00262048\u0026\u0026Lu(T.alternate,T);break;default:hg(P,T,q,de,Se)}}function Ud(P,T){if(T.subtreeFlags\u002610256)for(T=T.child;T!==null;){var q=P,de=T,Se=de.flags;switch(de.tag){case 22:Ud(q,de),Se\u00262048\u0026\u0026LI(de.alternate,de);break;case 24:Ud(q,de),Se\u00262048\u0026\u0026Lu(de.alternate,de);break;default:Ud(q,de)}T=T.sibling}}function Ks(P){if(P.subtreeFlags\u0026gM)for(P=P.child;P!==null;)E_(P),P=P.sibling}function E_(P){switch(P.tag){case 26:Ks(P),P.flags\u0026gM\u0026\u0026(P.memoizedState!==null?Zr(I5,P.memoizedState,P.memoizedProps):c0(P.type,P.memoizedProps));break;case 5:Ks(P),P.flags\u0026gM\u0026\u0026c0(P.type,P.memoizedProps);break;case 3:case 4:if(xc){var T=I5;I5=$I(P.stateNode.containerInfo),Ks(P),I5=T}else Ks(P);break;case 22:P.memoizedState===null\u0026\u0026(T=P.alternate,T!==null\u0026\u0026T.memoizedState!==null?(T=gM,gM=16777216,Ks(P),gM=T):Ks(P));break;default:Ks(P)}}function Eh(P){var T=P.alternate;if(T!==null\u0026\u0026(P=T.child,P!==null)){T.child=null;do T=P.sibling,P.sibling=null,P=T;while(P!==null)}}function B_(P){var T=P.deletions;if((P.flags\u002616)!==0){if(T!==null)for(var q=0;q\u003cT.length;q++){var de=T[q];k_=de,w2(de,P)}Eh(P)}if(P.subtreeFlags\u002610256)for(P=P.child;P!==null;)w4(P),P=P.sibling}function w4(P){switch(P.tag){case 0:case 11:case 15:B_(P),P.flags\u00262048\u0026\u0026B2(P,P.return,zu|zl);break;case 3:var T=Ar();B_(P),P.stateNode.passiveEffectDuration+=ws(T);break;case 12:T=Ar(),B_(P),P.stateNode.passiveEffectDuration+=ds(T);break;case 22:T=P.stateNode,P.memoizedState!==null\u0026\u0026T._visibility\u00262\u0026\u0026(P.return===null||P.return.tag!==13)?(T._visibility\u0026=-3,J0(P)):B_(P);break;default:B_(P)}}function J0(P){var T=P.deletions;if((P.flags\u002616)!==0){if(T!==null)for(var q=0;q\u003cT.length;q++){var de=T[q];k_=de,w2(de,P)}Eh(P)}for(P=P.child;P!==null;)Sm(P),P=P.sibling}function Sm(P){switch(P.tag){case 0:case 11:case 15:B2(P,P.return,zu),J0(P);break;case 22:var T=P.stateNode;T._visibility\u00262\u0026\u0026(T._visibility\u0026=-3,J0(P));break;default:J0(P)}}function w2(P,T){for(;k_!==null;){var q=k_,de=q;switch(de.tag){case 0:case 11:case 15:B2(de,T,zu);break;case 23:case 22:de.memoizedState!==null\u0026\u0026de.memoizedState.cachePool!==null\u0026\u0026(de=de.memoizedState.cachePool.pool,de!=null\u0026\u0026zi(de));break;case 24:bi(de.memoizedState.cache)}if(de=q.child,de!==null)de.return=q,k_=de;else e:for(q=P;k_!==null;){de=k_;var Se=de.sibling,Ne=de.return;if(v4(de),de===q){k_=null;break e}if(Se!==null){Se.return=Ne,k_=Se;break e}k_=Ne}}}function g3(P){var T=bl(P);if(T!=null){if(typeof T.memoizedProps[\"data-testname\"]!=\"string\")throw Error(\"Invalid host root specified. Should be either a React container or a node with a testname attribute.\");return T}if(P=Mf(P),P===null)throw Error(\"Could not find React container within specified host subtree.\");return P.stateNode.current}function Wg(P,T){var q=P.tag;switch(T.$typeof){case gk:if(P.type===T.value)return!0;break;case dM:e:{for(T=T.value,P=[P,0],q=0;q\u003cP.length;){var de=P[q++],Se=de.tag,Ne=P[q++],ut=T[Ne];if(Se!==5\u0026\u0026Se!==26\u0026\u0026Se!==27||!Dm(de)){for(;ut!=null\u0026\u0026Wg(de,ut);)Ne++,ut=T[Ne];if(Ne===T.length){T=!0;break e}else for(de=de.child;de!==null;)P.push(de,Ne),de=de.sibling}}T=!1}return T;case h8:if((q===5||q===26||q===27)\u0026\u0026JI(P.stateNode,T.value))return!0;break;case dk:if((q===5||q===6||q===26||q===27)\u0026\u0026(P=Cg(P),P!==null\u0026\u00260\u003c=P.indexOf(T.value)))return!0;break;case NK:if((q===5||q===26||q===27)\u0026\u0026(P=P.memoizedProps[\"data-testname\"],typeof P==\"string\"\u0026\u0026P.toLowerCase()===T.value.toLowerCase()))return!0;break;default:throw Error(\"Invalid selector type specified.\")}return!1}function r0(P){switch(P.$typeof){case gk:return\"\u003c\"+(Q(P.value)||\"Unknown\")+\"\u003e\";case dM:return\":has(\"+(r0(P)||\"\")+\")\";case h8:return'[role=\"'+P.value+'\"]';case dk:return'\"'+P.value+'\"';case NK:return'[data-testname=\"'+P.value+'\"]';default:throw Error(\"Invalid selector type specified.\")}}function P2(P,T){var q=[];P=[P,0];for(var de=0;de\u003cP.length;){var Se=P[de++],Ne=Se.tag,ut=P[de++],Ft=T[ut];if(Ne!==5\u0026\u0026Ne!==26\u0026\u0026Ne!==27||!Dm(Se)){for(;Ft!=null\u0026\u0026Wg(Se,Ft);)ut++,Ft=T[ut];if(ut===T.length)q.push(Se);else for(Se=Se.child;Se!==null;)P.push(Se,ut),Se=Se.sibling}}return q}function zC(P,T){if(!b0)throw Error(\"Test selector API is not supported by this renderer.\");P=g3(P),P=P2(P,T),T=[],P=Array.from(P);for(var q=0;q\u003cP.length;){var de=P[q++],Se=de.tag;if(Se===5||Se===26||Se===27)Dm(de)||T.push(de.stateNode);else for(de=de.child;de!==null;)P.push(de),de=de.sibling}return T}function W0(){b0\u0026\u0026hk.forEach(function(P){return P()})}function M2(){var P=typeof IS_REACT_ACT_ENVIRONMENT\u003c\"u\"?IS_REACT_ACT_ENVIRONMENT:void 0;return P||Jn.actQueue===null||console.error(\"The current testing environment is not configured to support act(...)\"),P}function sl(P){if((sc\u0026V1)!==Zp\u0026\u0026YA!==0)return YA\u0026-YA;var T=Jn.T;return T!==null?(T._updatedFibers||(T._updatedFibers=new Set),T._updatedFibers.add(P),P=Ay,P!==0?P:oi()):Xa()}function b_(){Q0===0\u0026\u0026(Q0=(YA\u0026536870912)===0||ja?j():536870912);var P=pt.current;return P!==null\u0026\u0026(P.flags|=32),Q0}function s0(P,T,q){if(EM\u0026\u0026console.error(\"useInsertionEffect must not schedule updates.\"),yM\u0026\u0026(B9=!0),(P===wl\u0026\u0026(ml===p8||ml===C9)||P.cancelPendingCommit!==null)\u0026\u0026(Qm(P,0),Bf(P,YA,Q0,!1)),ie(P,q),(sc\u0026V1)!==0\u0026\u0026P===wl){if(M_)switch(T.tag){case 0:case 11:case 15:P=xA\u0026\u0026w(xA)||\"Unknown\",Ite.has(P)||(Ite.add(P),T=w(T)||\"Unknown\",console.error(\"Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render\",T,P,P));break;case 1:nQ||(console.error(\"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.\"),nQ=!0)}}else Ae\u0026\u0026ue(P,T,q),d9(T),P===wl\u0026\u0026((sc\u0026V1)===Zp\u0026\u0026(fl|=q),_l===M3\u0026\u0026Bf(P,YA,Q0,!1)),_n(P)}function JE(P,T,q){if((sc\u0026(V1|z1))!==Zp)throw Error(\"Should not already be working.\");var de=!q\u0026\u0026(T\u0026124)===0\u0026\u0026(T\u0026P.expiredLanes)===0||W(P,T),Se=de?l9(P,T):h3(P,T,!0),Ne=de;do{if(Se===nx){C5\u0026\u0026!de\u0026\u0026Bf(P,T,0,!1);break}else{if(q=P.current.alternate,Ne\u0026\u0026!JC(q)){Se=h3(P,T,!1),Ne=!1;continue}if(Se===em){if(Ne=T,P.errorRecoveryDisabledLanes\u0026Ne)var ut=0;else ut=P.pendingLanes\u0026-536870913,ut=ut!==0?ut:ut\u0026536870912?536870912:0;if(ut!==0){T=ut;e:{Se=P;var Ft=ut;ut=AC;var Tn=B0\u0026\u0026Se.current.memoizedState.isDehydrated;if(Tn\u0026\u0026(Qm(Se,Ft).flags|=256),Ft=h3(Se,Ft,!1),Ft!==em){if(_k\u0026\u0026!Tn){Se.errorRecoveryDisabledLanes|=Ne,fl|=Ne,Se=M3;break e}Se=J1,J1=ut,Se!==null\u0026\u0026(J1===null?J1=Se:J1.push.apply(J1,Se))}Se=Ft}if(Ne=!1,Se!==em)continue}}if(Se===pM){Qm(P,0),Bf(P,T,0,!0);break}e:{switch(de=P,Se){case nx:case pM:throw Error(\"Root did not complete. This is a bug in React.\");case M3:if((T\u00264194048)!==T)break;case mM:Bf(de,T,Q0,!Hm);break e;case em:J1=null;break;case hte:case _M:break;default:throw Error(\"Unknown root exit status.\")}if(Jn.actQueue!==null)F2(de,q,T,J1,m8,fk,Q0,fl,Fh);else{if((T\u002662914560)===T\u0026\u0026(Ne=RK+XS-us(),10\u003cNe)){if(Bf(de,T,Q0,!Hm),Y(de,0,!0)!==0)break e;de.timeoutHandle=C3(d3.bind(null,de,q,J1,m8,fk,T,Q0,fl,Fh,Hm,Se,y9,-0,0),Ne);break e}d3(de,q,J1,m8,fk,T,Q0,fl,Fh,Hm,Se,D3,-0,0)}}}break}while(!0);_n(P)}function d3(P,T,q,de,Se,Ne,ut,Ft,Tn,_o,di,li,vi,Ws){if(P.timeoutHandle=E0,li=T.subtreeFlags,(li\u00268192||(li\u002616785408)===16785408)\u0026\u0026(lp(),E_(T),li=$c(),li!==null)){P.cancelPendingCommit=li(F2.bind(null,P,T,Ne,q,de,Se,ut,Ft,Tn,di,ZS,vi,Ws)),Bf(P,Ne,ut,!_o);return}F2(P,T,Ne,q,de,Se,ut,Ft,Tn)}function JC(P){for(var T=P;;){var q=T.tag;if((q===0||q===11||q===15)\u0026\u0026T.flags\u002616384\u0026\u0026(q=T.updateQueue,q!==null\u0026\u0026(q=q.stores,q!==null)))for(var de=0;de\u003cq.length;de++){var Se=q[de],Ne=Se.getSnapshot;Se=Se.value;try{if(!Nh(Ne(),Se))return!1}catch{return!1}}if(q=T.child,T.subtreeFlags\u002616384\u0026\u0026q!==null)q.return=T,T=q;else{if(T===P)break;for(;T.sibling===null;){if(T.return===null||T.return===P)return!0;T=T.return}T.sibling.return=T.return,T=T.sibling}}return!0}function Bf(P,T,q,de){T\u0026=~mte,T\u0026=~fl,P.suspendedLanes|=T,P.pingedLanes\u0026=~T,de\u0026\u0026(P.warmLanes|=T),de=P.expirationTimes;for(var Se=T;0\u003cSe;){var Ne=31-pl(Se),ut=1\u003c\u003cNe;de[Ne]=-1,Se\u0026=~ut}q!==0\u0026\u0026le(P,q,T)}function D2(){return(sc\u0026(V1|z1))===Zp?(qn(0),!1):!0}function WC(){if(xA!==null){if(ml===aC)var P=xA.return;else P=xA,yo(),Ug(P),rC=null,dy=0,P=xA;for(;P!==null;)C_(P.alternate,P),P=P.return;xA=null}}function Qm(P,T){var q=P.timeoutHandle;q!==E0\u0026\u0026(P.timeoutHandle=E0,KI(q)),q=P.cancelPendingCommit,q!==null\u0026\u0026(P.cancelPendingCommit=null,q()),WC(),wl=P,xA=q=v1(P.current,null),YA=T,ml=aC,_p=null,Hm=!1,C5=W(P,T),_k=!1,_l=nx,Fh=Q0=mte=fl=ox=0,J1=AC=null,fk=!1,(T\u00268)!==0\u0026\u0026(T|=T\u002632);var de=P.entangledLanes;if(de!==0)for(P=P.entanglements,de\u0026=T;0\u003cde;){var Se=31-pl(de),Ne=1\u003c\u003cSe;T|=P[Se],de\u0026=~Ne}return Yf=T,ph(),T=p5(),1e3\u003cT-Ia\u0026\u0026(Jn.recentlyCreatedOwnerStacks=0,Ia=T),nC.discardPendingWarnings(),q}function N2(P,T){fs=null,Jn.H=He,Jn.getCurrentStack=null,M_=!1,H1=null,T===v3||T===ed?(T=Yl(),ml=pk):T===T4?(T=Yl(),ml=pye):ml=T===uc?mk:T!==null\u0026\u0026typeof T==\"object\"\u0026\u0026typeof T.then==\"function\"?qS:fM,_p=T;var q=xA;if(q===null)_l=pM,i0(P,gt(T,P.current));else switch(q.mode\u00262\u0026\u0026Gt(q),Pe(),ml){case fM:G!==null\u0026\u0026typeof G.markComponentErrored==\"function\"\u0026\u0026G.markComponentErrored(q,T,YA);break;case p8:case C9:case pk:case qS:case IM:G!==null\u0026\u0026typeof G.markComponentSuspended==\"function\"\u0026\u0026G.markComponentSuspended(q,T,YA)}}function WE(){var P=pt.current;return P===null?!0:(YA\u00264194048)===YA?St===null:(YA\u002662914560)===YA||(YA\u0026536870912)!==0?P===St:!1}function jE(){var P=Jn.H;return Jn.H=He,P===null?He:P}function $E(){var P=Jn.A;return Jn.A=wot,P}function R2(){_l=M3,Hm||(YA\u00264194048)!==YA\u0026\u0026pt.current!==null||(C5=!0),(ox\u0026134217727)===0\u0026\u0026(fl\u0026134217727)===0||wl===null||Bf(wl,YA,Q0,!1)}function h3(P,T,q){var de=sc;sc|=V1;var Se=jE(),Ne=$E();if(wl!==P||YA!==T){if(Ae){var ut=P.memoizedUpdaters;0\u003cut.size\u0026\u0026(Qf(P,YA),ut.clear()),fe(P,T)}m8=null,Qm(P,T)}we(T),T=!1,ut=_l;e:do try{if(ml!==aC\u0026\u0026xA!==null){var Ft=xA,Tn=_p;switch(ml){case mk:WC(),ut=mM;break e;case pk:case p8:case C9:case qS:pt.current===null\u0026\u0026(T=!0);var _o=ml;if(ml=aC,_p=null,T2(P,Ft,Tn,_o),q\u0026\u0026C5){ut=nx;break e}break;default:_o=ml,ml=aC,_p=null,T2(P,Ft,Tn,_o)}}p3(),ut=_l;break}catch(di){N2(P,di)}while(!0);return T\u0026\u0026P.shellSuspendCounter++,yo(),sc=de,Jn.H=Se,Jn.A=Ne,Te(),xA===null\u0026\u0026(wl=null,YA=0,ph()),ut}function p3(){for(;xA!==null;)P4(xA)}function l9(P,T){var q=sc;sc|=V1;var de=jE(),Se=$E();if(wl!==P||YA!==T){if(Ae){var Ne=P.memoizedUpdaters;0\u003cNe.size\u0026\u0026(Qf(P,YA),Ne.clear()),fe(P,T)}m8=null,L4=us()+CM,Qm(P,T)}else C5=W(P,T);we(T);e:do try{if(ml!==aC\u0026\u0026xA!==null)t:switch(T=xA,Ne=_p,ml){case fM:ml=aC,_p=null,T2(P,T,Ne,fM);break;case p8:case C9:if(dr(Ne)){ml=aC,_p=null,bf(T);break}T=function(){ml!==p8\u0026\u0026ml!==C9||wl!==P||(ml=IM),_n(P)},Ne.then(T,T);break e;case pk:ml=IM;break e;case pye:ml=pte;break e;case IM:dr(Ne)?(ml=aC,_p=null,bf(T)):(ml=aC,_p=null,T2(P,T,Ne,IM));break;case pte:var ut=null;switch(xA.tag){case 26:ut=xA.memoizedState;case 5:case 27:var Ft=xA,Tn=Ft.type,_o=Ft.pendingProps;if(ut?Us(ut):Si(Tn,_o)){ml=aC,_p=null;var di=Ft.sibling;if(di!==null)xA=di;else{var li=Ft.return;li!==null?(xA=li,k2(li)):xA=null}break t}break;default:console.error(\"Unexpected type of fiber triggered a suspensey commit. This is a bug in React.\")}ml=aC,_p=null,T2(P,T,Ne,pte);break;case qS:ml=aC,_p=null,T2(P,T,Ne,qS);break;case mk:WC(),_l=mM;break e;default:throw Error(\"Unexpected SuspendedReason. This is a bug in React.\")}Jn.actQueue!==null?p3():qE();break}catch(vi){N2(P,vi)}while(!0);return yo(),Jn.H=de,Jn.A=Se,sc=q,xA!==null?(G!==null\u0026\u0026typeof G.markRenderYielded==\"function\"\u0026\u0026G.markRenderYielded(),nx):(Te(),wl=null,YA=0,ph(),_l)}function qE(){for(;xA!==null\u0026\u0026!F1();)P4(xA)}function P4(P){var T=P.alternate;(P.mode\u00262)!==yA?(Et(P),T=Lt(P,C2,T,P,Yf),Gt(P)):T=Lt(P,C2,T,P,Yf),P.memoizedProps=P.pendingProps,T===null?k2(P):xA=T}function bf(P){var T=Lt(P,XE,P);P.memoizedProps=P.pendingProps,T===null?k2(P):xA=T}function XE(P){var T=P.alternate,q=(P.mode\u00262)!==yA;switch(q\u0026\u0026Et(P),P.tag){case 15:case 0:T=IA(T,P,P.pendingProps,P.type,void 0,YA);break;case 11:T=IA(T,P,P.pendingProps,P.type.render,P.ref,YA);break;case 5:Ug(P);default:C_(T,P),P=xA=D4(P,Yf),T=C2(T,P,Yf)}return q\u0026\u0026Gt(P),T}function T2(P,T,q,de){yo(),Ug(T),rC=null,dy=0;var Se=T.return;try{if(Rp(P,Se,T,q,YA)){_l=pM,i0(P,gt(q,P.current)),xA=null;return}}catch(Ne){if(Se!==null)throw xA=Se,Ne;_l=pM,i0(P,gt(q,P.current)),xA=null;return}T.flags\u002632768?(ja||de===fM?P=!0:C5||(YA\u0026536870912)!==0?P=!1:(Hm=P=!0,(de===p8||de===C9||de===pk||de===qS)\u0026\u0026(de=pt.current,de!==null\u0026\u0026de.tag===13\u0026\u0026(de.flags|=16384))),Ap(T,P)):k2(T)}function k2(P){var T=P;do{if((T.flags\u002632768)!==0){Ap(T,Hm);return}var q=T.alternate;if(P=T.return,Et(T),q=Lt(T,RI,q,T,Yf),(T.mode\u00262)!==yA\u0026\u0026Rt(T),q!==null){xA=q;return}if(T=T.sibling,T!==null){xA=T;return}xA=T=P}while(T!==null);_l===nx\u0026\u0026(_l=_M)}function Ap(P,T){do{var q=Ch(P.alternate,P);if(q!==null){q.flags\u0026=32767,xA=q;return}if((P.mode\u00262)!==yA){Rt(P),q=P.actualDuration;for(var de=P.child;de!==null;)q+=de.actualDuration,de=de.sibling;P.actualDuration=q}if(q=P.return,q!==null\u0026\u0026(q.flags|=32768,q.subtreeFlags=0,q.deletions=null),!T\u0026\u0026(P=P.sibling,P!==null)){xA=P;return}xA=P=q}while(P!==null);_l=mM,xA=null}function F2(P,T,q,de,Se,Ne,ut,Ft,Tn){P.cancelPendingCommit=null;do jC();while(qd!==cC);if(nC.flushLegacyContextWarning(),nC.flushPendingUnsafeLifecycleWarnings(),(sc\u0026(V1|z1))!==Zp)throw Error(\"Should not already be working.\");if(G!==null\u0026\u0026typeof G.markCommitStarted==\"function\"\u0026\u0026G.markCommitStarted(q),T===null)he();else{if(q===0\u0026\u0026console.error(\"finishedLanes should not be empty during a commit. This is a bug in React.\"),T===P.current)throw Error(\"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\");if(Ne=T.lanes|T.childLanes,Ne|=P3,ne(P,q,Ne,ut,Ft,Tn),P===wl\u0026\u0026(xA=wl=null,YA=0),_8=T,Uf=P,E9=q,_te=Ne,TK=Se,mye=de,(T.subtreeFlags\u002610256)!==0||(T.flags\u002610256)!==0?(P.callbackNode=null,P.callbackPriority=0,Q_(Dh,function(){return vm(),null})):(P.callbackNode=null,P.callbackPriority=0),u8=_s(),de=(T.flags\u002613878)!==0,(T.subtreeFlags\u002613878)!==0||de){de=Jn.T,Jn.T=null,Se=$g(),za(2),ut=sc,sc|=z1;try{Yd(P,T,q)}finally{sc=ut,za(Se),Jn.T=de}}qd=W1,m3(),HI(),kc()}}function m3(){if(qd===W1){qd=cC;var P=Uf,T=_8,q=E9,de=(T.flags\u002613878)!==0;if((T.subtreeFlags\u002613878)!==0||de){de=Jn.T,Jn.T=null;var Se=$g();za(2);var Ne=sc;sc|=z1;try{lM=q,uM=P,S1(T,P),uM=lM=null,s5(P.containerInfo)}finally{sc=Ne,za(Se),Jn.T=de}}P.current=T,qd=$d}}function HI(){if(qd===$d){qd=cC;var P=Uf,T=_8,q=E9,de=(T.flags\u00268772)!==0;if((T.subtreeFlags\u00268772)!==0||de){de=Jn.T,Jn.T=null;var Se=$g();za(2);var Ne=sc;sc|=z1;try{G!==null\u0026\u0026typeof G.markLayoutEffectsStarted==\"function\"\u0026\u0026G.markLayoutEffectsStarted(q),lM=q,uM=P,b1(P,T.alternate,T),uM=lM=null,G!==null\u0026\u0026typeof G.markLayoutEffectsStopped==\"function\"\u0026\u0026G.markLayoutEffectsStopped()}finally{sc=Ne,za(Se),Jn.T=de}}qd=Hc}}function kc(){if(qd===x9||qd===Hc){qd=cC,Wp();var P=Uf,T=_8,q=E9,de=mye,Se=(T.subtreeFlags\u002610256)!==0||(T.flags\u002610256)!==0;Se?qd=py:(qd=cC,_8=Uf=null,M4(P,P.pendingLanes),tQ=0,Ik=null);var Ne=P.pendingLanes;if(Ne===0\u0026\u0026(Om=null),Se||n5(P),Se=pe(q),T=T.stateNode,Ku\u0026\u0026typeof Ku.onCommitFiberRoot==\"function\")try{var ut=(T.current.flags\u0026128)===128;switch(Se){case 2:var Ft=Jd;break;case 8:Ft=yu;break;case 32:Ft=Dh;break;case 268435456:Ft=V2;break;default:Ft=Dh}Ku.onCommitFiberRoot(up,T,Ft,ut)}catch(li){V||(V=!0,console.error(\"React instrumentation encountered an error: %s\",li))}if(Ae\u0026\u0026P.memoizedUpdaters.clear(),W0(),de!==null){ut=Jn.T,Ft=$g(),za(2),Jn.T=null;try{var Tn=P.onRecoverableError;for(T=0;T\u003cde.length;T++){var _o=de[T],di=S_(_o.stack);Lt(_o.source,Tn,_o.value,di)}}finally{Jn.T=ut,za(Ft)}}(E9\u00263)!==0\u0026\u0026jC(),_n(P),Ne=P.pendingLanes,(q\u00264194090)!==0\u0026\u0026(Ne\u002642)!==0?(O1=!0,P===kK?eQ++:(eQ=0,kK=P)):eQ=0,qn(0),he()}}function S_(P){return P={componentStack:P},Object.defineProperty(P,\"digest\",{get:function(){console.error('You are accessing \"digest\" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),P}function M4(P,T){(P.pooledCacheLanes\u0026=T)===0\u0026\u0026(T=P.pooledCache,T!=null\u0026\u0026(P.pooledCache=null,bi(T)))}function jC(P){return m3(),HI(),kc(),vm()}function vm(){if(qd!==py)return!1;var P=Uf,T=_te;_te=0;var q=pe(E9),de=32\u003eq?32:q;q=Jn.T;var Se=$g();try{za(de),Jn.T=null,de=TK,TK=null;var Ne=Uf,ut=E9;if(qd=cC,_8=Uf=null,E9=0,(sc\u0026(V1|z1))!==Zp)throw Error(\"Cannot flush passive effects while already rendering.\");yM=!0,B9=!1,G!==null\u0026\u0026typeof G.markPassiveEffectsStarted==\"function\"\u0026\u0026G.markPassiveEffectsStarted(ut);var Ft=sc;if(sc|=z1,w4(Ne.current),x_(Ne,Ne.current,ut,de),G!==null\u0026\u0026typeof G.markPassiveEffectsStopped==\"function\"\u0026\u0026G.markPassiveEffectsStopped(),n5(Ne),sc=Ft,qn(0,!1),B9?Ne===Ik?tQ++:(tQ=0,Ik=Ne):tQ=0,B9=yM=!1,Ku\u0026\u0026typeof Ku.onPostCommitFiberRoot==\"function\")try{Ku.onPostCommitFiberRoot(up,Ne)}catch(_o){V||(V=!0,console.error(\"React instrumentation encountered an error: %s\",_o))}var Tn=Ne.current.stateNode;return Tn.effectDuration=0,Tn.passiveEffectDuration=0,!0}finally{za(Se),Jn.T=q,M4(P,T)}}function ZE(P,T,q){T=gt(q,T),T=ug(P.stateNode,T,2),P=Rd(P,T,2),P!==null\u0026\u0026(ie(P,2),_n(P))}function NA(P,T,q){if(EM=!1,P.tag===3)ZE(P,P,q);else{for(;T!==null;){if(T.tag===3){ZE(T,P,q);return}if(T.tag===1){var de=T.stateNode;if(typeof T.type.getDerivedStateFromError==\"function\"||typeof de.componentDidCatch==\"function\"\u0026\u0026(Om===null||!Om.has(de))){P=gt(q,P),q=wI(2),de=Rd(T,q,2),de!==null\u0026\u0026(rp(q,de,T,P),ie(de,2),_n(de));return}}T=T.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s`,q)}}function Sf(P,T,q){var de=P.pingCache;if(de===null){de=P.pingCache=new hye;var Se=new Set;de.set(T,Se)}else Se=de.get(T),Se===void 0\u0026\u0026(Se=new Set,de.set(T,Se));Se.has(q)||(_k=!0,Se.add(q),de=OI.bind(null,P,T,q),Ae\u0026\u0026Qf(P,q),T.then(de,de))}function OI(P,T,q){var de=P.pingCache;de!==null\u0026\u0026de.delete(T),P.pingedLanes|=P.suspendedLanes\u0026q,P.warmLanes\u0026=~q,M2()\u0026\u0026Jn.actQueue===null\u0026\u0026console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() =\u003e {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),wl===P\u0026\u0026(YA\u0026q)===q\u0026\u0026(_l===M3||_l===hte\u0026\u0026(YA\u002662914560)===YA\u0026\u0026us()-RK\u003cXS?(sc\u0026V1)===Zp\u0026\u0026Qm(P,0):mte|=q,Fh===YA\u0026\u0026(Fh=0)),_n(P)}function Q1(P,T){T===0\u0026\u0026(T=J()),P=fc(P,T),P!==null\u0026\u0026(ie(P,T),_n(P))}function e5(P){var T=P.memoizedState,q=0;T!==null\u0026\u0026(q=T.retryLane),Q1(P,q)}function u9(P,T){var q=0;switch(P.tag){case 13:var de=P.stateNode,Se=P.memoizedState;Se!==null\u0026\u0026(q=Se.retryLane);break;case 19:de=P.stateNode;break;case 22:de=P.stateNode._retryCache;break;default:throw Error(\"Pinged unknown suspense boundary type. This is probably a bug in React.\")}de!==null\u0026\u0026de.delete(T),Q1(P,q)}function t5(P,T,q){if((T.subtreeFlags\u002667117056)!==0)for(T=T.child;T!==null;){var de=P,Se=T,Ne=Se.type===Wc;Ne=q||Ne,Se.tag!==22?Se.flags\u002667108864?Ne\u0026\u0026Lt(Se,g9,de,Se,(Se.mode\u002664)===yA):t5(de,Se,Ne):Se.memoizedState===null\u0026\u0026(Ne\u0026\u0026Se.flags\u00268192?Lt(Se,g9,de,Se):Se.subtreeFlags\u002667108864\u0026\u0026Lt(Se,t5,de,Se,Ne)),T=T.sibling}}function g9(P,T){var q=2\u003carguments.length\u0026\u0026arguments[2]!==void 0?arguments[2]:!0;Me(!0);try{bm(T),q\u0026\u0026Sm(T),ic(P,T.alternate,T,!1),q\u0026\u0026xh(P,T,0,null,!1,0)}finally{Me(!1)}}function n5(P){var T=!0;P.current.mode\u002624||(T=!1),t5(P,P.current,T)}function o5(P){if((sc\u0026V1)===Zp){var T=P.tag;if(T===3||T===1||T===0||T===11||T===14||T===15){if(T=w(P)||\"ReactComponent\",Lh!==null){if(Lh.has(T))return;Lh.add(T)}else Lh=new Set([T]);Lt(P,function(){console.error(\"Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.\")})}}}function Qf(P,T){Ae\u0026\u0026P.memoizedUpdaters.forEach(function(q){ue(P,q,T)})}function Q_(P,T){var q=Jn.actQueue;return q!==null?(q.push(T),FK):ny(P,T)}function d9(P){M2()\u0026\u0026Jn.actQueue===null\u0026\u0026Lt(P,function(){console.error(`An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() =\u003e {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,w(P))})}function $C(P){if(bg===null)return P;var T=bg(P);return T===void 0?P:T.current}function L2(P){if(bg===null)return P;var T=bg(P);return T===void 0?P!=null\u0026\u0026typeof P.render==\"function\"\u0026\u0026(T=$C(P.render),P.render!==T)?(T={$typeof:_g,render:T},P.displayName!==void 0\u0026\u0026(T.displayName=P.displayName),T):P:T.current}function GI(P,T){if(bg===null)return!1;var q=P.elementType;T=T.type;var de=!1,Se=typeof T==\"object\"\u0026\u0026T!==null?T.$typeof:null;switch(P.tag){case 1:typeof T==\"function\"\u0026\u0026(de=!0);break;case 0:(typeof T==\"function\"||Se===jg)\u0026\u0026(de=!0);break;case 11:(Se===_g||Se===jg)\u0026\u0026(de=!0);break;case 14:case 15:(Se===RA||Se===jg)\u0026\u0026(de=!0);break;default:return!1}return!!(de\u0026\u0026(P=bg(q),P!==void 0\u0026\u0026P===bg(T)))}function Hu(P){bg!==null\u0026\u0026typeof WeakSet==\"function\"\u0026\u0026(N3===null\u0026\u0026(N3=new WeakSet),N3.add(P))}function wm(P,T,q){var de=P.alternate,Se=P.child,Ne=P.sibling,ut=P.tag,Ft=P.type,Tn=null;switch(ut){case 0:case 15:case 1:Tn=Ft;break;case 11:Tn=Ft.render}if(bg===null)throw Error(\"Expected resolveFamily to be set during hot reload.\");var _o=!1;Ft=!1,Tn!==null\u0026\u0026(Tn=bg(Tn),Tn!==void 0\u0026\u0026(q.has(Tn)?Ft=!0:T.has(Tn)\u0026\u0026(ut===1?Ft=!0:_o=!0))),N3!==null\u0026\u0026(N3.has(P)||de!==null\u0026\u0026N3.has(de))\u0026\u0026(Ft=!0),Ft\u0026\u0026(P._debugNeedsRemount=!0),(Ft||_o)\u0026\u0026(de=fc(P,2),de!==null\u0026\u0026s0(de,P,2)),Se===null||Ft||wm(Se,T,q),Ne!==null\u0026\u0026wm(Ne,T,q)}function i5(P,T,q,de){this.tag=P,this.key=q,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=T,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=de,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,Ck||typeof Object.preventExtensions!=\"function\"||Object.preventExtensions(this)}function zr(P){return P=P.prototype,!(!P||!P.isReactComponent)}function v1(P,T){var q=P.alternate;switch(q===null?(q=l(P.tag,T,P.key,P.mode),q.elementType=P.elementType,q.type=P.type,q.stateNode=P.stateNode,q._debugOwner=P._debugOwner,q._debugStack=P._debugStack,q._debugTask=P._debugTask,q._debugHookTypes=P._debugHookTypes,q.alternate=P,P.alternate=q):(q.pendingProps=T,q.type=P.type,q.flags=0,q.subtreeFlags=0,q.deletions=null,q.actualDuration=-0,q.actualStartTime=-1.1),q.flags=P.flags\u002665011712,q.childLanes=P.childLanes,q.lanes=P.lanes,q.child=P.child,q.memoizedProps=P.memoizedProps,q.memoizedState=P.memoizedState,q.updateQueue=P.updateQueue,T=P.dependencies,q.dependencies=T===null?null:{lanes:T.lanes,firstContext:T.firstContext,_debugThenableState:T._debugThenableState},q.sibling=P.sibling,q.index=P.index,q.ref=P.ref,q.refCleanup=P.refCleanup,q.selfBaseDuration=P.selfBaseDuration,q.treeBaseDuration=P.treeBaseDuration,q._debugInfo=P._debugInfo,q._debugNeedsRemount=P._debugNeedsRemount,q.tag){case 0:case 15:q.type=$C(P.type);break;case 1:q.type=$C(P.type);break;case 11:q.type=L2(P.type)}return q}function D4(P,T){P.flags\u0026=65011714;var q=P.alternate;return q===null?(P.childLanes=0,P.lanes=T,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null,P.selfBaseDuration=0,P.treeBaseDuration=0):(P.childLanes=q.childLanes,P.lanes=q.lanes,P.child=q.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=q.memoizedProps,P.memoizedState=q.memoizedState,P.updateQueue=q.updateQueue,P.type=q.type,T=q.dependencies,P.dependencies=T===null?null:{lanes:T.lanes,firstContext:T.firstContext,_debugThenableState:T._debugThenableState},P.selfBaseDuration=q.selfBaseDuration,P.treeBaseDuration=q.treeBaseDuration),P}function Bh(P,T,q,de,Se,Ne){var ut=0,Ft=P;if(typeof P==\"function\")zr(P)\u0026\u0026(ut=1),Ft=$C(Ft);else if(typeof P==\"string\")xc\u0026\u0026os?(ut=et(),ut=xg(P,q,ut)?26:XI(P)?27:5):xc?(ut=et(),ut=xg(P,q,ut)?26:5):ut=os\u0026\u0026XI(P)?27:5;else e:switch(P){case qC:return T=l(31,q,T,Se),T.elementType=qC,T.lanes=Ne,T;case P1:return mu(q.children,Se,Ne,T);case Wc:ut=8,Se|=24;break;case Gp:return P=q,de=Se,typeof P.id!=\"string\"\u0026\u0026console.error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.',typeof P.id),T=l(12,P,T,de|2),T.elementType=Gp,T.lanes=Ne,T.stateNode={effectDuration:0,passiveEffectDuration:0},T;case O2:return T=l(13,q,T,Se),T.elementType=O2,T.lanes=Ne,T;case G2:return T=l(19,q,T,Se),T.elementType=G2,T.lanes=Ne,T;default:if(typeof P==\"object\"\u0026\u0026P!==null)switch(P.$typeof){case A0:case mg:ut=10;break e;case Mm:ut=9;break e;case _g:ut=11,Ft=L2(Ft);break e;case RA:ut=14;break e;case jg:ut=16,Ft=null;break e}Ft=\"\",(P===void 0||typeof P==\"object\"\u0026\u0026P!==null\u0026\u0026Object.keys(P).length===0)\u0026\u0026(Ft+=\" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\"),P===null?q=\"null\":cs(P)?q=\"array\":P!==void 0\u0026\u0026P.$typeof===v_?(q=\"\u003c\"+(Q(P.type)||\"Unknown\")+\" /\u003e\",Ft=\" Did you accidentally export a JSX literal instead of a component?\"):q=typeof P,ut=de?typeof de.tag==\"number\"?w(de):typeof de.name==\"string\"?de.name:null:null,ut\u0026\u0026(Ft+=`\n\nCheck the render method of \\``+ut+\"`.\"),ut=29,q=Error(\"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \"+(q+\".\"+Ft)),Ft=null}return T=l(ut,q,T,Se),T.elementType=P,T.type=Ft,T.lanes=Ne,T._debugOwner=de,T}function H2(P,T,q){return T=Bh(P.type,P.key,P.props,P._owner,T,q),T._debugOwner=P._owner,T._debugStack=P._debugStack,T._debugTask=P._debugTask,T}function mu(P,T,q,de){return P=l(7,P,de,T),P.lanes=q,P}function vf(P,T,q){return P=l(6,P,null,T),P.lanes=q,P}function YI(P,T,q){return T=l(4,P.children!==null?P.children:[],P.key,T),T.lanes=q,T.stateNode={containerInfo:P.containerInfo,pendingChildren:null,implementation:P.implementation},T}function bh(P,T,q,de,Se,Ne,ut,Ft){for(this.tag=1,this.containerInfo=P,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=E0,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oe(0),this.hiddenUpdates=oe(null),this.identifierPrefix=de,this.onUncaughtError=Se,this.onCaughtError=Ne,this.onRecoverableError=ut,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ft,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,P=this.pendingUpdatersLaneMap=[],T=0;31\u003eT;T++)P.push(new Set);this._debugRootType=q?\"hydrateRoot()\":\"createRoot()\"}function _3(P,T,q,de,Se,Ne,ut,Ft,Tn,_o,di,li){return P=new bh(P,T,q,ut,Ft,Tn,_o,li),T=1,Ne===!0\u0026\u0026(T|=24),Ae\u0026\u0026(T|=2),Ne=l(3,null,null,T),P.current=Ne,Ne.stateNode=P,T=ur(),zi(T),P.pooledCache=T,zi(T),Ne.memoizedState={element:de,isDehydrated:q,cache:T},Ul(Ne),P}function cp(P){return\"\"+P}function Jc(P){return P?(P=zp,P):zp}function r5(P,T,q,de){return Gi(T.current,2,P,T,q,de),2}function Gi(P,T,q,de,Se,Ne){if(Ku\u0026\u0026typeof Ku.onScheduleFiberRoot==\"function\")try{Ku.onScheduleFiberRoot(up,de,q)}catch(ut){V||(V=!0,console.error(\"React instrumentation encountered an error: %s\",ut))}G!==null\u0026\u0026typeof G.markRenderScheduled==\"function\"\u0026\u0026G.markRenderScheduled(T),Se=Jc(Se),de.context===null?de.context=Se:de.pendingContext=Se,M_\u0026\u0026H1!==null\u0026\u0026!BM\u0026\u0026(BM=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.`,w(H1)||\"Unknown\")),de=ag(T),de.payload={element:q},Ne=Ne===void 0?null:Ne,Ne!==null\u0026\u0026(typeof Ne!=\"function\"\u0026\u0026console.error(\"Expected the last optional `callback` argument to be a function. Instead received: %s.\",Ne),de.callback=Ne),q=Rd(P,de,T),q!==null\u0026\u0026(s0(q,P,T),mh(q,P,T))}function pg(P,T){if(P=P.memoizedState,P!==null\u0026\u0026P.dehydrated!==null){var q=P.retryLane;P.retryLane=q!==0\u0026\u0026q\u003cT?q:T}}function Pm(P,T){pg(P,T),(P=P.alternate)\u0026\u0026pg(P,T)}function Op(){return H1}function Sh(){for(var P=new Map,T=1,q=0;31\u003eq;q++){var de=O(T);P.set(T,de),T*=2}return P}var Ys={},w1=L3(),a0=ane(),al=Object.assign,ai=Symbol.for(\"react.element\"),v_=Symbol.for(\"react.transitional.element\"),Al=Symbol.for(\"react.portal\"),P1=Symbol.for(\"react.fragment\"),Wc=Symbol.for(\"react.strict_mode\"),Gp=Symbol.for(\"react.profiler\"),A0=Symbol.for(\"react.provider\"),Mm=Symbol.for(\"react.consumer\"),mg=Symbol.for(\"react.context\"),_g=Symbol.for(\"react.forward_ref\"),O2=Symbol.for(\"react.suspense\"),G2=Symbol.for(\"react.suspense_list\"),RA=Symbol.for(\"react.memo\"),jg=Symbol.for(\"react.lazy\"),qC=Symbol.for(\"react.activity\"),Kd=Symbol.for(\"react.memo_cache_sentinel\"),h9=Symbol.iterator,yc=Symbol.for(\"react.client.reference\"),cs=Array.isArray,Jn=w1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,c8=n.rendererVersion,wf=n.rendererPackageName,XC=n.extraDevToolsConfig,fg=n.getPublicInstance,Y2=n.getRootHostContext,_u=n.getChildHostContext,Ig=n.prepareForCommit,s5=n.resetAfterCommit,f3=n.createInstance;n.cloneMutableInstance;var ZC=n.appendInitialChild,I3=n.finalizeInitialChildren,Pf=n.shouldSetTextContent,UI=n.createTextInstance;n.cloneMutableTextInstance;var C3=n.scheduleTimeout,KI=n.cancelTimeout,E0=n.noTimeout,jc=n.isPrimaryRenderer;n.warnsIfNotActing;var cl=n.supportsMutation,Ou=n.supportsPersistence,B0=n.supportsHydration,bl=n.getInstanceFromNode;n.beforeActiveInstanceBlur;var Vd=n.preparePortalMount;n.prepareScopeUpdate,n.getInstanceFromScope;var za=n.setCurrentUpdatePriority,$g=n.getCurrentUpdatePriority,Xa=n.resolveUpdatePriority;n.trackSchedulerEvent,n.resolveEventType,n.resolveEventTimeStamp;var Za=n.shouldAttemptEagerTransition,Vs=n.detachDeletedInstance;n.requestPostPaintCallback;var fu=n.maySuspendCommit,Si=n.preloadInstance,lp=n.startSuspendingCommit,c0=n.suspendInstance;n.suspendOnActiveViewTransition;var $c=n.waitForCommitToBeReady,Qh=n.NotPendingTransition,Kl=n.HostTransitionContext,VI=n.resetFormInstance,p9=n.bindToConsole,zI=n.supportsMicrotasks,rc=n.scheduleMicrotask,b0=n.supportsTestSelectors,Mf=n.findFiberRoot,a5=n.getBoundingRect,Cg=n.getTextContent,Dm=n.isHiddenSubtree,JI=n.matchAccessibilityRole,ey=n.setFocusIfFocusable,Nm=n.setupIntersectionObserver,ll=n.appendChild,WI=n.appendChildToContainer,A5=n.commitTextUpdate,Yi=n.commitMount,c5=n.commitUpdate,Df=n.insertBefore,M1=n.insertInContainerBefore,ul=n.removeChild,Iu=n.removeChildFromContainer,yg=n.resetTextContent,ss=n.hideInstance,D1=n.hideTextInstance,l5=n.unhideInstance,Yp=n.unhideTextInstance;n.cancelViewTransitionName,n.cancelRootViewTransitionName,n.restoreRootViewTransitionName,n.cloneRootViewTransitionContainer,n.removeRootViewTransitionClone,n.measureClonedInstance,n.hasInstanceChanged,n.hasInstanceAffectedParent,n.startViewTransition,n.startGestureTransition,n.stopGestureTransition,n.getCurrentGestureOffset,n.subscribeToGestureDirection,n.createViewTransitionInstance;var zd=n.clearContainer;n.createFragmentInstance,n.updateFragmentInstanceFiber,n.commitNewChildToFragmentInstance,n.deleteChildFromFragmentInstance;var Gu=n.cloneInstance,Nf=n.createContainerChildSet,Fc=n.appendChildToContainerChildSet,_a=n.finalizeContainerChildren,fa=n.replaceContainerChildren,zs=n.cloneHiddenInstance,Rm=n.cloneHiddenTextInstance,j0=n.isSuspenseInstancePending,w_=n.isSuspenseInstanceFallback,$0=n.getSuspenseInstanceFallbackErrorDetails,N1=n.registerSuspenseInstanceRetry,Up=n.canHydrateFormStateMarker,GA=n.isFormStateMarkerMatching,Kp=n.getNextHydratableSibling,S0=n.getNextHydratableSiblingAfterSingleton,u5=n.getFirstHydratableChild,jI=n.getFirstHydratableChildWithinContainer,vh=n.getFirstHydratableChildWithinSuspenseInstance,R1=n.getFirstHydratableChildWithinSingleton,Cu=n.canHydrateInstance,N4=n.canHydrateTextInstance,Vp=n.canHydrateSuspenseInstance,Rf=n.hydrateInstance,xs=n.hydrateTextInstance,Lc=n.hydrateSuspenseInstance,Ha=n.getNextHydratableInstanceAfterSuspenseInstance,Ja=n.commitHydratedContainer,Ps=n.commitHydratedSuspenseInstance,wh=n.clearSuspenseBoundary,qg=n.clearSuspenseBoundaryFromContainer,gl=n.shouldDeleteUnhydratedTailInstances,y3=n.diffHydratedPropsForDevWarnings,Tf=n.diffHydratedTextForDevWarnings,Pa=n.describeHydratableInstanceForDevWarnings,qc=n.validateHydratableInstance,Yu=n.validateHydratableTextInstance,xc=n.supportsResources,xg=n.isHostHoistableType,$I=n.getHoistableRoot,T1=n.getResource,Xg=n.acquireResource,U2=n.releaseResource,K2=n.hydrateHoistable,ty=n.mountHoistable,kf=n.unmountHoistable,qI=n.createHoistableInstance,ls=n.prepareToCommitHoistables,gA=n.mayResourceSuspendCommit,Us=n.preloadResource,Zr=n.suspendResource,os=n.supportsSingletons,l0=n.resolveSingletonInstance,k1=n.acquireSingletonInstance,Ph=n.releaseSingletonInstance,XI=n.isHostSingletonType,dl=n.isSingletonScope,hl=[],Sl=[],Uu=-1,zp={};Object.freeze(zp);var pl=Math.clz32?Math.clz32:F,Jp=Math.log,P_=Math.LN2,Vl=256,Mh=4194304,ny=a0.unstable_scheduleCallback,x3=a0.unstable_cancelCallback,F1=a0.unstable_shouldYield,Wp=a0.unstable_requestPaint,us=a0.unstable_now,Jd=a0.unstable_ImmediatePriority,yu=a0.unstable_UserBlockingPriority,Dh=a0.unstable_NormalPriority,V2=a0.unstable_IdlePriority,g5=a0.log,oy=a0.unstable_setDisableYieldValue,up=null,Ku=null,G=null,V=!1,Ae=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__\u003c\"u\",Be=0,Oe,Je,Tt,ln,wn,$o,Ai;Ee.__reactDisabledLog=!0;var Qi,Ni,Xs=!1,jp=new(typeof WeakMap==\"function\"?WeakMap:Map),L1=new WeakMap,Eg=[],Yn=0,Qn=null,to=0,zo=[],Bi=0,eA=null,Or=1,Js=\"\",Qs=M(null),Wa=M(null),Bg=M(null),d5=M(null),E3=/[\"'\u0026\u003c\u003e\\n\\t]|^\\s|\\s$/,H1=null,M_=!1,gp=null,Ma=null,ja=!1,z2=!1,ms=null,Ff=null,Wd=!1,ZI=Error(\"Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.\"),Ia=0;if(typeof performance==\"object\"\u0026\u0026typeof performance.now==\"function\")var h5=performance,p5=function(){return h5.now()};else{var zS=Date;p5=function(){return zS.now()}}var Nh=typeof Object.is==\"function\"?Object.is:To,yA=0,Lf=M(null),B3=M(null),iy=M(null),b3={},dp=null,eC=null,J2=!1,JS=typeof AbortController\u003c\"u\"?AbortController:function(){var P=[],T=this.signal={aborted:!1,addEventListener:function(q,de){P.push(de)}};this.abort=function(){T.aborted=!0,P.forEach(function(q){return q()})}},l8=a0.unstable_scheduleCallback,ra=a0.unstable_NormalPriority,Wn={$typeof:mg,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},_s=a0.unstable_now,u8=-0,Rh=-1.1,tC=-0,Tm=!1,O1=!1,ry=null,$p=null,W2=!1,G1=!1,S3=!1,R4=!1,sy=0,g8={},D_=null,ay=0,Ay=0,Y1=null,Q3=Jn.S;Jn.S=function(P,T){typeof T==\"object\"\u0026\u0026T!==null\u0026\u0026typeof T.then==\"function\"\u0026\u0026Ji(P,T),Q3!==null\u0026\u0026Q3(P,T)};var m5=M(null),m9=Object.prototype.hasOwnProperty,nC={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},km=[],jd=[],Vu=[],Pi=[],Zg=[],Ql=[],q0=new Set;nC.recordUnsafeLifecycleWarnings=function(P,T){q0.has(P.type)||(typeof T.componentWillMount==\"function\"\u0026\u0026T.componentWillMount.__suppressDeprecationWarning!==!0\u0026\u0026km.push(P),P.mode\u00268\u0026\u0026typeof T.UNSAFE_componentWillMount==\"function\"\u0026\u0026jd.push(P),typeof T.componentWillReceiveProps==\"function\"\u0026\u0026T.componentWillReceiveProps.__suppressDeprecationWarning!==!0\u0026\u0026Vu.push(P),P.mode\u00268\u0026\u0026typeof T.UNSAFE_componentWillReceiveProps==\"function\"\u0026\u0026Pi.push(P),typeof T.componentWillUpdate==\"function\"\u0026\u0026T.componentWillUpdate.__suppressDeprecationWarning!==!0\u0026\u0026Zg.push(P),P.mode\u00268\u0026\u0026typeof T.UNSAFE_componentWillUpdate==\"function\"\u0026\u0026Ql.push(P))},nC.flushPendingUnsafeLifecycleWarnings=function(){var P=new Set;0\u003ckm.length\u0026\u0026(km.forEach(function(Ft){P.add(w(Ft)||\"Component\"),q0.add(Ft.type)}),km=[]);var T=new Set;0\u003cjd.length\u0026\u0026(jd.forEach(function(Ft){T.add(w(Ft)||\"Component\"),q0.add(Ft.type)}),jd=[]);var q=new Set;0\u003cVu.length\u0026\u0026(Vu.forEach(function(Ft){q.add(w(Ft)||\"Component\"),q0.add(Ft.type)}),Vu=[]);var de=new Set;0\u003cPi.length\u0026\u0026(Pi.forEach(function(Ft){de.add(w(Ft)||\"Component\"),q0.add(Ft.type)}),Pi=[]);var Se=new Set;0\u003cZg.length\u0026\u0026(Zg.forEach(function(Ft){Se.add(w(Ft)||\"Component\"),q0.add(Ft.type)}),Zg=[]);var Ne=new Set;if(0\u003cQl.length\u0026\u0026(Ql.forEach(function(Ft){Ne.add(w(Ft)||\"Component\"),q0.add(Ft.type)}),Ql=[]),0\u003cT.size){var ut=f(T);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s`,ut)}0\u003cde.size\u0026\u0026(ut=f(de),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s`,ut)),0\u003cNe.size\u0026\u0026(ut=f(Ne),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s`,ut)),0\u003cP.size\u0026\u0026(ut=f(P),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \\`npx react-codemod rename-unsafe-lifecycles\\` in your project source folder.\n\nPlease update the following components: %s`,ut)),0\u003cq.size\u0026\u0026(ut=f(q),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \\`npx react-codemod rename-unsafe-lifecycles\\` in your project source folder.\n\nPlease update the following components: %s`,ut)),0\u003cSe.size\u0026\u0026(ut=f(Se),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \\`npx react-codemod rename-unsafe-lifecycles\\` in your project source folder.\n\nPlease update the following components: %s`,ut))};var cy=new Map,U1=new Set;nC.recordLegacyContextWarning=function(P,T){for(var q=null,de=P;de!==null;)de.mode\u00268\u0026\u0026(q=de),de=de.return;q===null?console.error(\"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.\"):!U1.has(P.type)\u0026\u0026(de=cy.get(q),P.type.contextTypes!=null||P.type.childContextTypes!=null||T!==null\u0026\u0026typeof T.getChildContext==\"function\")\u0026\u0026(de===void 0\u0026\u0026(de=[],cy.set(q,de)),de.push(P))},nC.flushLegacyContextWarning=function(){cy.forEach(function(P){if(P.length!==0){var T=P[0],q=new Set;P.forEach(function(Se){q.add(w(Se)||\"Component\"),U1.add(Se.type)});var de=f(q);Lt(T,function(){console.error(`Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context`,de)})}})},nC.discardPendingWarnings=function(){km=[],jd=[],Vu=[],Pi=[],Zg=[],Ql=[],cy=new Map};var v3=Error(\"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"),T4=Error(\"Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.\"),ed=Error(\"Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary.\"),hp={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a \"noop\" thenable. This is a bug in React. Please file an issue.')}},N_=null,w3=!1,td=0,zl=1,vl=2,X0=4,zu=8,Hf=[],oC=0,P3=0,j2=0,WS=1,Of=2,$2=3,q2=!1,_9=!1,k4=null,F4=!1,Gf=M(null),X2=M(0),Z2,d8=new Set,f9=new Set,ex=new Set,jS=new Set,tx=0,fs=null,Ec=null,u0=null,iC=!1,Th=!1,nd=!1,_5=0,Fm=0,R_=null,pp=0,f5=25,co=null,re=null,X=-1,me=!1,He={readContext:Fo,use:PA,useCallback:da,useContext:da,useEffect:da,useImperativeHandle:da,useLayoutEffect:da,useInsertionEffect:da,useMemo:da,useReducer:da,useRef:da,useState:da,useDebugValue:da,useDeferredValue:da,useTransition:da,useSyncExternalStore:da,useId:da,useHostTransitionStatus:da,useFormState:da,useActionState:da,useOptimistic:da,useMemoCache:da,useCacheRefresh:da},We=null,ft=null,wt=null,zt=null,en=null,In=null,po=null;We={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co=\"useCallback\",tr(),wA(T),hu(P,T)},useContext:function(P){return co=\"useContext\",tr(),Fo(P)},useEffect:function(P,T){return co=\"useEffect\",tr(),wA(T),fh(P,T)},useImperativeHandle:function(P,T,q){return co=\"useImperativeHandle\",tr(),wA(q),OC(P,T,q)},useInsertionEffect:function(P,T){co=\"useInsertionEffect\",tr(),wA(T),Y0(4,vl,P,T)},useLayoutEffect:function(P,T){return co=\"useLayoutEffect\",tr(),wA(T),Ih(P,T)},useMemo:function(P,T){co=\"useMemo\",tr(),wA(T);var q=Jn.H;Jn.H=en;try{return wp(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co=\"useReducer\",tr();var de=Jn.H;Jn.H=en;try{return HC(P,T,q)}finally{Jn.H=de}},useRef:function(P){return co=\"useRef\",tr(),La(P)},useState:function(P){co=\"useState\",tr();var T=Jn.H;Jn.H=en;try{return vo(P)}finally{Jn.H=T}},useDebugValue:function(){co=\"useDebugValue\",tr()},useDeferredValue:function(P,T){return co=\"useDeferredValue\",tr(),ff(P,T)},useTransition:function(){return co=\"useTransition\",tr(),U0()},useSyncExternalStore:function(P,T,q){return co=\"useSyncExternalStore\",tr(),ku(P,T,q)},useId:function(){return co=\"useId\",tr(),A3()},useFormState:function(P,T){return co=\"useFormState\",tr(),Td(),go(P,T)},useActionState:function(P,T){return co=\"useActionState\",tr(),go(P,T)},useOptimistic:function(P){return co=\"useOptimistic\",tr(),Xo(P)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co=\"useCacheRefresh\",tr(),m2()}},ft={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co=\"useCallback\",Vo(),hu(P,T)},useContext:function(P){return co=\"useContext\",Vo(),Fo(P)},useEffect:function(P,T){return co=\"useEffect\",Vo(),fh(P,T)},useImperativeHandle:function(P,T,q){return co=\"useImperativeHandle\",Vo(),OC(P,T,q)},useInsertionEffect:function(P,T){co=\"useInsertionEffect\",Vo(),Y0(4,vl,P,T)},useLayoutEffect:function(P,T){return co=\"useLayoutEffect\",Vo(),Ih(P,T)},useMemo:function(P,T){co=\"useMemo\",Vo();var q=Jn.H;Jn.H=en;try{return wp(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co=\"useReducer\",Vo();var de=Jn.H;Jn.H=en;try{return HC(P,T,q)}finally{Jn.H=de}},useRef:function(P){return co=\"useRef\",Vo(),La(P)},useState:function(P){co=\"useState\",Vo();var T=Jn.H;Jn.H=en;try{return vo(P)}finally{Jn.H=T}},useDebugValue:function(){co=\"useDebugValue\",Vo()},useDeferredValue:function(P,T){return co=\"useDeferredValue\",Vo(),ff(P,T)},useTransition:function(){return co=\"useTransition\",Vo(),U0()},useSyncExternalStore:function(P,T,q){return co=\"useSyncExternalStore\",Vo(),ku(P,T,q)},useId:function(){return co=\"useId\",Vo(),A3()},useActionState:function(P,T){return co=\"useActionState\",Vo(),go(P,T)},useFormState:function(P,T){return co=\"useFormState\",Vo(),Td(),go(P,T)},useOptimistic:function(P){return co=\"useOptimistic\",Vo(),Xo(P)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co=\"useCacheRefresh\",Vo(),m2()}},wt={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co=\"useCallback\",Vo(),lg(P,T)},useContext:function(P){return co=\"useContext\",Vo(),Fo(P)},useEffect:function(P,T){co=\"useEffect\",Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co=\"useImperativeHandle\",Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co=\"useInsertionEffect\",Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co=\"useLayoutEffect\",Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co=\"useMemo\",Vo();var q=Jn.H;Jn.H=In;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co=\"useReducer\",Vo();var de=Jn.H;Jn.H=In;try{return f1(P,T,q)}finally{Jn.H=de}},useRef:function(){return co=\"useRef\",Vo(),ha().memoizedState},useState:function(){co=\"useState\",Vo();var P=Jn.H;Jn.H=In;try{return f1(n0)}finally{Jn.H=P}},useDebugValue:function(){co=\"useDebugValue\",Vo()},useDeferredValue:function(P,T){return co=\"useDeferredValue\",Vo(),I1(P,T)},useTransition:function(){return co=\"useTransition\",Vo(),S4()},useSyncExternalStore:function(P,T,q){return co=\"useSyncExternalStore\",Vo(),ot(P,T,q)},useId:function(){return co=\"useId\",Vo(),ha().memoizedState},useFormState:function(P){return co=\"useFormState\",Vo(),Td(),Go(P)},useActionState:function(P){return co=\"useActionState\",Vo(),Go(P)},useOptimistic:function(P,T){return co=\"useOptimistic\",Vo(),Ti(P,T)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co=\"useCacheRefresh\",Vo(),ha().memoizedState}},zt={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co=\"useCallback\",Vo(),lg(P,T)},useContext:function(P){return co=\"useContext\",Vo(),Fo(P)},useEffect:function(P,T){co=\"useEffect\",Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co=\"useImperativeHandle\",Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co=\"useInsertionEffect\",Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co=\"useLayoutEffect\",Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co=\"useMemo\",Vo();var q=Jn.H;Jn.H=po;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co=\"useReducer\",Vo();var de=Jn.H;Jn.H=po;try{return vp(P,T,q)}finally{Jn.H=de}},useRef:function(){return co=\"useRef\",Vo(),ha().memoizedState},useState:function(){co=\"useState\",Vo();var P=Jn.H;Jn.H=po;try{return vp(n0)}finally{Jn.H=P}},useDebugValue:function(){co=\"useDebugValue\",Vo()},useDeferredValue:function(P,T){return co=\"useDeferredValue\",Vo(),p2(P,T)},useTransition:function(){return co=\"useTransition\",Vo(),ep()},useSyncExternalStore:function(P,T,q){return co=\"useSyncExternalStore\",Vo(),ot(P,T,q)},useId:function(){return co=\"useId\",Vo(),ha().memoizedState},useFormState:function(P){return co=\"useFormState\",Vo(),Td(),lA(P)},useActionState:function(P){return co=\"useActionState\",Vo(),lA(P)},useOptimistic:function(P,T){return co=\"useOptimistic\",Vo(),Gs(P,T)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co=\"useCacheRefresh\",Vo(),ha().memoizedState}},en={readContext:function(P){return m(),Fo(P)},use:function(P){return p(),PA(P)},useCallback:function(P,T){return co=\"useCallback\",p(),tr(),hu(P,T)},useContext:function(P){return co=\"useContext\",p(),tr(),Fo(P)},useEffect:function(P,T){return co=\"useEffect\",p(),tr(),fh(P,T)},useImperativeHandle:function(P,T,q){return co=\"useImperativeHandle\",p(),tr(),OC(P,T,q)},useInsertionEffect:function(P,T){co=\"useInsertionEffect\",p(),tr(),Y0(4,vl,P,T)},useLayoutEffect:function(P,T){return co=\"useLayoutEffect\",p(),tr(),Ih(P,T)},useMemo:function(P,T){co=\"useMemo\",p(),tr();var q=Jn.H;Jn.H=en;try{return wp(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co=\"useReducer\",p(),tr();var de=Jn.H;Jn.H=en;try{return HC(P,T,q)}finally{Jn.H=de}},useRef:function(P){return co=\"useRef\",p(),tr(),La(P)},useState:function(P){co=\"useState\",p(),tr();var T=Jn.H;Jn.H=en;try{return vo(P)}finally{Jn.H=T}},useDebugValue:function(){co=\"useDebugValue\",p(),tr()},useDeferredValue:function(P,T){return co=\"useDeferredValue\",p(),tr(),ff(P,T)},useTransition:function(){return co=\"useTransition\",p(),tr(),U0()},useSyncExternalStore:function(P,T,q){return co=\"useSyncExternalStore\",p(),tr(),ku(P,T,q)},useId:function(){return co=\"useId\",p(),tr(),A3()},useFormState:function(P,T){return co=\"useFormState\",p(),tr(),go(P,T)},useActionState:function(P,T){return co=\"useActionState\",p(),tr(),go(P,T)},useOptimistic:function(P){return co=\"useOptimistic\",p(),tr(),Xo(P)},useMemoCache:function(P){return p(),_h(P)},useHostTransitionStatus:If,useCacheRefresh:function(){return co=\"useCacheRefresh\",tr(),m2()}},In={readContext:function(P){return m(),Fo(P)},use:function(P){return p(),PA(P)},useCallback:function(P,T){return co=\"useCallback\",p(),Vo(),lg(P,T)},useContext:function(P){return co=\"useContext\",p(),Vo(),Fo(P)},useEffect:function(P,T){co=\"useEffect\",p(),Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co=\"useImperativeHandle\",p(),Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co=\"useInsertionEffect\",p(),Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co=\"useLayoutEffect\",p(),Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co=\"useMemo\",p(),Vo();var q=Jn.H;Jn.H=In;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co=\"useReducer\",p(),Vo();var de=Jn.H;Jn.H=In;try{return f1(P,T,q)}finally{Jn.H=de}},useRef:function(){return co=\"useRef\",p(),Vo(),ha().memoizedState},useState:function(){co=\"useState\",p(),Vo();var P=Jn.H;Jn.H=In;try{return f1(n0)}finally{Jn.H=P}},useDebugValue:function(){co=\"useDebugValue\",p(),Vo()},useDeferredValue:function(P,T){return co=\"useDeferredValue\",p(),Vo(),I1(P,T)},useTransition:function(){return co=\"useTransition\",p(),Vo(),S4()},useSyncExternalStore:function(P,T,q){return co=\"useSyncExternalStore\",p(),Vo(),ot(P,T,q)},useId:function(){return co=\"useId\",p(),Vo(),ha().memoizedState},useFormState:function(P){return co=\"useFormState\",p(),Vo(),Go(P)},useActionState:function(P){return co=\"useActionState\",p(),Vo(),Go(P)},useOptimistic:function(P,T){return co=\"useOptimistic\",p(),Vo(),Ti(P,T)},useMemoCache:function(P){return p(),_h(P)},useHostTransitionStatus:If,useCacheRefresh:function(){return co=\"useCacheRefresh\",Vo(),ha().memoizedState}},po={readContext:function(P){return m(),Fo(P)},use:function(P){return p(),PA(P)},useCallback:function(P,T){return co=\"useCallback\",p(),Vo(),lg(P,T)},useContext:function(P){return co=\"useContext\",p(),Vo(),Fo(P)},useEffect:function(P,T){co=\"useEffect\",p(),Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co=\"useImperativeHandle\",p(),Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co=\"useInsertionEffect\",p(),Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co=\"useLayoutEffect\",p(),Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co=\"useMemo\",p(),Vo();var q=Jn.H;Jn.H=In;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co=\"useReducer\",p(),Vo();var de=Jn.H;Jn.H=In;try{return vp(P,T,q)}finally{Jn.H=de}},useRef:function(){return co=\"useRef\",p(),Vo(),ha().memoizedState},useState:function(){co=\"useState\",p(),Vo();var P=Jn.H;Jn.H=In;try{return vp(n0)}finally{Jn.H=P}},useDebugValue:function(){co=\"useDebugValue\",p(),Vo()},useDeferredValue:function(P,T){return co=\"useDeferredValue\",p(),Vo(),p2(P,T)},useTransition:function(){return co=\"useTransition\",p(),Vo(),ep()},useSyncExternalStore:function(P,T,q){return co=\"useSyncExternalStore\",p(),Vo(),ot(P,T,q)},useId:function(){return co=\"useId\",p(),Vo(),ha().memoizedState},useFormState:function(P){return co=\"useFormState\",p(),Vo(),lA(P)},useActionState:function(P){return co=\"useActionState\",p(),Vo(),lA(P)},useOptimistic:function(P,T){return co=\"useOptimistic\",p(),Vo(),Gs(P,T)},useMemoCache:function(P){return p(),_h(P)},useHostTransitionStatus:If,useCacheRefresh:function(){return co=\"useCacheRefresh\",Vo(),ha().memoizedState}};var wo={\"react-stack-bottom-frame\":function(P,T,q){var de=M_;M_=!0;try{return P(T,q)}finally{M_=de}}},ci=wo[\"react-stack-bottom-frame\"].bind(wo),Hi={\"react-stack-bottom-frame\":function(P){var T=M_;M_=!0;try{return P.render()}finally{M_=T}}},pr=Hi[\"react-stack-bottom-frame\"].bind(Hi),Wr={\"react-stack-bottom-frame\":function(P,T){try{T.componentDidMount()}catch(q){NA(P,P.return,q)}}},Ca=Wr[\"react-stack-bottom-frame\"].bind(Wr),rr={\"react-stack-bottom-frame\":function(P,T,q,de,Se){try{T.componentDidUpdate(q,de,Se)}catch(Ne){NA(P,P.return,Ne)}}},Wi=rr[\"react-stack-bottom-frame\"].bind(rr),Mi={\"react-stack-bottom-frame\":function(P,T){var q=T.stack;P.componentDidCatch(T.value,{componentStack:q!==null?q:\"\"})}},Gr=Mi[\"react-stack-bottom-frame\"].bind(Mi),Bc={\"react-stack-bottom-frame\":function(P,T,q){try{q.componentWillUnmount()}catch(de){NA(P,T,de)}}},qp=Bc[\"react-stack-bottom-frame\"].bind(Bc),T_={\"react-stack-bottom-frame\":function(P){P.resourceKind!=null\u0026\u0026console.error(\"Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s\",P.resourceKind);var T=P.create;return P=P.inst,T=T(),P.destroy=T}},ly=T_[\"react-stack-bottom-frame\"].bind(T_),K1={\"react-stack-bottom-frame\":function(P,T,q){try{q()}catch(de){NA(P,T,de)}}},uy=K1[\"react-stack-bottom-frame\"].bind(K1),Lm={\"react-stack-bottom-frame\":function(P){var T=P._init;return T(P._payload)}},gy=Lm[\"react-stack-bottom-frame\"].bind(Lm),rC=null,dy=0,vr=null,sC,D=sC=!1,H={},z={},se={};d=function(P,T,q){if(q!==null\u0026\u0026typeof q==\"object\"\u0026\u0026q._store\u0026\u0026(!q._store.validated\u0026\u0026q.key==null||q._store.validated===2)){if(typeof q._store!=\"object\")throw Error(\"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\");q._store.validated=1;var de=w(P),Se=de||\"null\";if(!H[Se]){H[Se]=!0,q=q._owner,P=P._debugOwner;var Ne=\"\";P\u0026\u0026typeof P.tag==\"number\"\u0026\u0026(Se=w(P))\u0026\u0026(Ne=`\n\nCheck the render method of \\``+Se+\"`.\"),Ne||de\u0026\u0026(Ne=`\n\nCheck the top-level render call using \u003c`+de+\"\u003e.\");var ut=\"\";q!=null\u0026\u0026P!==q\u0026\u0026(de=null,typeof q.tag==\"number\"?de=w(q):typeof q.name==\"string\"\u0026\u0026(de=q.name),de\u0026\u0026(ut=\" It was passed a child from \"+de+\".\")),Lt(T,function(){console.error('Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',Ne,ut)})}}};var xe=f2(!0),Fe=f2(!1),pt=M(null),St=null,on=1,Pn=2,Zn=M(0),Qo={},Gn=new Set,jn=new Set,wr=new Set,br=new Set,tA=new Set,Mn=new Set,Cn=new Set,Un=new Set,Mo=new Set,mr=new Set;Object.freeze(Qo);var nA={enqueueSetState:function(P,T,q){P=P._reactInternals;var de=sl(P),Se=ag(de);Se.payload=T,q!=null\u0026\u0026(bs(q),Se.callback=q),T=Rd(P,Se,de),T!==null\u0026\u0026(s0(T,P,de),mh(T,P,de)),Re(P,de)},enqueueReplaceState:function(P,T,q){P=P._reactInternals;var de=sl(P),Se=ag(de);Se.tag=WS,Se.payload=T,q!=null\u0026\u0026(bs(q),Se.callback=q),T=Rd(P,Se,de),T!==null\u0026\u0026(s0(T,P,de),mh(T,P,de)),Re(P,de)},enqueueForceUpdate:function(P,T){P=P._reactInternals;var q=sl(P),de=ag(q);de.tag=Of,T!=null\u0026\u0026(bs(T),de.callback=T),T=Rd(P,de,q),T!==null\u0026\u0026(s0(T,P,q),mh(T,P,q)),G!==null\u0026\u0026typeof G.markForceUpdateScheduled==\"function\"\u0026\u0026G.markForceUpdateScheduled(P,q)}},es=typeof reportError==\"function\"?reportError:function(P){if(typeof window==\"object\"\u0026\u0026typeof window.ErrorEvent==\"function\"){var T=new window.ErrorEvent(\"error\",{bubbles:!0,cancelable:!0,message:typeof P==\"object\"\u0026\u0026P!==null\u0026\u0026typeof P.message==\"string\"?String(P.message):String(P),error:P});if(!window.dispatchEvent(T))return}else if(typeof e==\"object\"\u0026\u0026typeof e.emit==\"function\"){e.emit(\"uncaughtException\",P);return}console.error(P)},gs=null,kh=null,uc=Error(\"This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue.\"),xu=!1,MK={},aye={},Aye={},cye={},$S=!1,lye={},gte={},dte={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},uye=!1,gye=null;gye=new Set;var I9=!1,mp=!1,DK=!1,dye=typeof WeakSet==\"function\"?WeakSet:Set,k_=null,lM=null,uM=null,Xp=null,hy=!1,I5=null,gM=8192,wot={getCacheForType:function(P){var T=Fo(Wn),q=T.data.get(P);return q===void 0\u0026\u0026(q=P(),T.data.set(P,q)),q},getOwner:function(){return H1}},gk=0,dM=1,h8=2,NK=3,dk=4;if(typeof Symbol==\"function\"\u0026\u0026Symbol.for){var hM=Symbol.for;gk=hM(\"selector.component\"),dM=hM(\"selector.has_pseudo_class\"),h8=hM(\"selector.role\"),NK=hM(\"selector.test_id\"),dk=hM(\"selector.text\")}var hk=[],hye=typeof WeakMap==\"function\"?WeakMap:Map,Zp=0,V1=2,z1=4,nx=0,pM=1,em=2,hte=3,M3=4,mM=6,_M=5,sc=Zp,wl=null,xA=null,YA=0,aC=0,fM=1,p8=2,pk=3,pye=4,pte=5,qS=6,IM=7,mk=8,C9=9,ml=aC,_p=null,Hm=!1,C5=!1,_k=!1,Yf=0,_l=nx,ox=0,fl=0,mte=0,Q0=0,Fh=0,AC=null,J1=null,fk=!1,RK=0,XS=300,L4=1/0,CM=500,m8=null,Om=null,D3=0,ZS=1,y9=2,cC=0,W1=1,$d=2,Hc=3,x9=4,py=5,qd=0,Uf=null,_8=null,E9=0,_te=0,TK=null,mye=null,fte=50,eQ=0,kK=null,yM=!1,B9=!1,xM=50,tQ=0,Ik=null,EM=!1,Lh=null,nQ=!1,Ite=new Set,FK={},bg=null,N3=null,Ck=!1;try{var yk=Object.preventExtensions({})}catch{Ck=!0}var BM=!1,LK={},f8=null,oQ=null,Cte=null,I8=null,R3=null,bM=null,SM=null,QM=null,vM=null;return f8=function(P,T,q,de){T=o(P,T),T!==null\u0026\u0026(q=i(T.memoizedState,q,0,de),T.memoizedState=q,T.baseState=q,P.memoizedProps=al({},P.memoizedProps),q=fc(P,2),q!==null\u0026\u0026s0(q,P,2))},oQ=function(P,T,q){T=o(P,T),T!==null\u0026\u0026(q=a(T.memoizedState,q,0),T.memoizedState=q,T.baseState=q,P.memoizedProps=al({},P.memoizedProps),q=fc(P,2),q!==null\u0026\u0026s0(q,P,2))},Cte=function(P,T,q,de){T=o(P,T),T!==null\u0026\u0026(q=r(T.memoizedState,q,de),T.memoizedState=q,T.baseState=q,P.memoizedProps=al({},P.memoizedProps),q=fc(P,2),q!==null\u0026\u0026s0(q,P,2))},I8=function(P,T,q){P.pendingProps=i(P.memoizedProps,T,0,q),P.alternate\u0026\u0026(P.alternate.pendingProps=P.pendingProps),T=fc(P,2),T!==null\u0026\u0026s0(T,P,2)},R3=function(P,T){P.pendingProps=a(P.memoizedProps,T,0),P.alternate\u0026\u0026(P.alternate.pendingProps=P.pendingProps),T=fc(P,2),T!==null\u0026\u0026s0(T,P,2)},bM=function(P,T,q){P.pendingProps=r(P.memoizedProps,T,q),P.alternate\u0026\u0026(P.alternate.pendingProps=P.pendingProps),T=fc(P,2),T!==null\u0026\u0026s0(T,P,2)},SM=function(P){var T=fc(P,2);T!==null\u0026\u0026s0(T,P,2)},QM=function(P){c=P},vM=function(P){A=P},Ys.attemptContinuousHydration=function(P){if(P.tag===13){var T=fc(P,67108864);T!==null\u0026\u0026s0(T,P,67108864),Pm(P,67108864)}},Ys.attemptHydrationAtCurrentPriority=function(P){if(P.tag===13){var T=sl(P);T=_e(T);var q=fc(P,T);q!==null\u0026\u0026s0(q,P,T),Pm(P,T)}},Ys.attemptSynchronousHydration=function(P){switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var T=U(P.pendingLanes);if(T!==0){for(P.pendingLanes|=2,P.entangledLanes|=2;T;){var q=1\u003c\u003c31-pl(T);P.entanglements[1]|=q,T\u0026=~q}_n(P),(sc\u0026(V1|z1))===Zp\u0026\u0026(L4=us()+CM,qn(0))}}break;case 13:T=fc(P,2),T!==null\u0026\u0026s0(T,P,2),D2(),Pm(P,2)}},Ys.batchedUpdates=function(P,T){return P(T)},Ys.createComponentSelector=function(P){return{$typeof:gk,value:P}},Ys.createContainer=function(P,T,q,de,Se,Ne,ut,Ft,Tn,_o){return _3(P,T,!1,null,q,de,Ne,ut,Ft,Tn,_o,null)},Ys.createHasPseudoClassSelector=function(P){return{$typeof:dM,value:P}},Ys.createHydrationContainer=function(P,T,q,de,Se,Ne,ut,Ft,Tn,_o,di,li,vi){return P=_3(q,de,!0,P,Se,Ne,Ft,Tn,_o,di,li,vi),P.context=Jc(null),q=P.current,de=sl(q),de=_e(de),Se=ag(de),Se.callback=T??null,Rd(q,Se,de),T=de,P.current.lanes=T,ie(P,T),_n(P),P},Ys.createPortal=function(P,T,q){var de=3\u003carguments.length\u0026\u0026arguments[3]!==void 0?arguments[3]:null;try{cp(de);var Se=!1}catch{Se=!0}return Se\u0026\u0026(console.error(\"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",typeof Symbol==\"function\"\u0026\u0026Symbol.toStringTag\u0026\u0026de[Symbol.toStringTag]||de.constructor.name||\"Object\"),cp(de)),{$typeof:Al,key:de==null?null:\"\"+de,children:P,containerInfo:T,implementation:q}},Ys.createRoleSelector=function(P){return{$typeof:h8,value:P}},Ys.createTestNameSelector=function(P){return{$typeof:NK,value:P}},Ys.createTextSelector=function(P){return{$typeof:dk,value:P}},Ys.defaultOnCaughtError=function(P){var T=gs?\"The above error occurred in the \u003c\"+gs+\"\u003e component.\":\"The above error occurred in one of your React components.\",q=\"React will try to recreate this component tree from scratch using the error boundary you provided, \"+((kh||\"Anonymous\")+\".\");typeof P==\"object\"\u0026\u0026P!==null\u0026\u0026typeof P.environmentName==\"string\"?p9(\"error\",[`%o\n\n%s\n\n%s\n`,P,T,q],P.environmentName)():console.error(`%o\n\n%s\n\n%s\n`,P,T,q)},Ys.defaultOnRecoverableError=function(P){es(P)},Ys.defaultOnUncaughtError=function(P){es(P),console.warn(`%s\n\n%s\n`,gs?\"An error occurred in the \u003c\"+gs+\"\u003e component.\":\"An error occurred in one of your React components.\",`Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},Ys.deferredUpdates=function(P){var T=Jn.T,q=$g();try{return za(32),Jn.T=null,P()}finally{za(q),Jn.T=T}},Ys.discreteUpdates=function(P,T,q,de,Se){var Ne=Jn.T,ut=$g();try{return za(2),Jn.T=null,P(T,q,de,Se)}finally{za(ut),Jn.T=Ne,sc===Zp\u0026\u0026(L4=us()+CM)}},Ys.findAllNodes=zC,Ys.findBoundingRects=function(P,T){if(!b0)throw Error(\"Test selector API is not supported by this renderer.\");T=zC(P,T),P=[];for(var q=0;q\u003cT.length;q++)P.push(a5(T[q]));for(T=P.length-1;0\u003cT;T--){q=P[T];for(var de=q.x,Se=de+q.width,Ne=q.y,ut=Ne+q.height,Ft=T-1;0\u003c=Ft;Ft--)if(T!==Ft){var Tn=P[Ft],_o=Tn.x,di=_o+Tn.width,li=Tn.y,vi=li+Tn.height;if(de\u003e=_o\u0026\u0026Ne\u003e=li\u0026\u0026Se\u003c=di\u0026\u0026ut\u003c=vi){P.splice(T,1);break}else if(de!==_o||q.width!==Tn.width||vi\u003cNe||li\u003eut){if(!(Ne!==li||q.height!==Tn.height||di\u003cde||_o\u003eSe)){_o\u003ede\u0026\u0026(Tn.width+=_o-de,Tn.x=de),di\u003cSe\u0026\u0026(Tn.width=Se-_o),P.splice(T,1);break}}else{li\u003eNe\u0026\u0026(Tn.height+=li-Ne,Tn.y=Ne),vi\u003cut\u0026\u0026(Tn.height=ut-li),P.splice(T,1);break}}}return P},Ys.findHostInstance=function(P){var T=P._reactInternals;if(T===void 0)throw typeof P.render==\"function\"?Error(\"Unable to find node on an unmounted component.\"):(P=Object.keys(P).join(\",\"),Error(\"Argument appears to not be a ReactComponent. Keys: \"+P));return P=x(T),P===null?null:fg(P.stateNode)},Ys.findHostInstanceWithNoPortals=function(P){return P=y(P),P=P!==null?B(P):null,P===null?null:fg(P.stateNode)},Ys.findHostInstanceWithWarning=function(P,T){var q=P._reactInternals;if(q===void 0)throw typeof P.render==\"function\"?Error(\"Unable to find node on an unmounted component.\"):(P=Object.keys(P).join(\",\"),Error(\"Argument appears to not be a ReactComponent. Keys: \"+P));if(P=x(q),P===null)return null;if(P.mode\u00268){var de=w(q)||\"Component\";LK[de]||(LK[de]=!0,Lt(P,function(){q.mode\u00268?console.error(\"%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node\",T,T,de):console.error(\"%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node\",T,T,de)}))}return fg(P.stateNode)},Ys.flushPassiveEffects=jC,Ys.flushSyncFromReconciler=function(P){var T=sc;sc|=1;var q=Jn.T,de=$g();try{if(za(2),Jn.T=null,P)return P()}finally{za(de),Jn.T=q,sc=T,(sc\u0026(V1|z1))===Zp\u0026\u0026qn(0)}},Ys.flushSyncWork=D2,Ys.focusWithin=function(P,T){if(!b0)throw Error(\"Test selector API is not supported by this renderer.\");for(P=g3(P),T=P2(P,T),T=Array.from(T),P=0;P\u003cT.length;){var q=T[P++],de=q.tag;if(!Dm(q)){if((de===5||de===26||de===27)\u0026\u0026ey(q.stateNode))return!0;for(q=q.child;q!==null;)T.push(q),q=q.sibling}}return!1},Ys.getFindAllNodesFailureDescription=function(P,T){if(!b0)throw Error(\"Test selector API is not supported by this renderer.\");var q=0,de=[];P=[g3(P),0];for(var Se=0;Se\u003cP.length;){var Ne=P[Se++],ut=Ne.tag,Ft=P[Se++],Tn=T[Ft];if((ut!==5\u0026\u0026ut!==26\u0026\u0026ut!==27||!Dm(Ne))\u0026\u0026(Wg(Ne,Tn)\u0026\u0026(de.push(r0(Tn)),Ft++,Ft\u003eq\u0026\u0026(q=Ft)),Ft\u003cT.length))for(Ne=Ne.child;Ne!==null;)P.push(Ne,Ft),Ne=Ne.sibling}if(q\u003cT.length){for(P=[];q\u003cT.length;q++)P.push(r0(T[q]));return`findAllNodes was able to match part of the selector:\n `+(de.join(\" \u003e \")+`\n\nNo matching component was found for:\n `)+P.join(\" \u003e \")}return null},Ys.getPublicRootInstance=function(P){if(P=P.current,!P.child)return null;switch(P.child.tag){case 27:case 5:return fg(P.child.stateNode);default:return P.child.stateNode}},Ys.injectIntoDevTools=function(){var P={bundleType:1,version:c8,rendererPackageName:wf,currentDispatcherRef:Jn,reconcilerVersion:\"19.1.0\"};return XC!==null\u0026\u0026(P.rendererConfig=XC),P.overrideHookState=f8,P.overrideHookStateDeletePath=oQ,P.overrideHookStateRenamePath=Cte,P.overrideProps=I8,P.overridePropsDeletePath=R3,P.overridePropsRenamePath=bM,P.scheduleUpdate=SM,P.setErrorHandler=QM,P.setSuspenseHandler=vM,P.scheduleRefresh=g,P.scheduleRoot=u,P.setRefreshHandler=h,P.getCurrentFiber=Op,P.getLaneLabelMap=Sh,P.injectProfilingHooks=ve,ye(P)},Ys.isAlreadyRendering=function(){return(sc\u0026(V1|z1))!==Zp},Ys.observeVisibleRects=function(P,T,q,de){function Se(){var _o=zC(P,T);Ne.forEach(function(di){0\u003e_o.indexOf(di)\u0026\u0026Tn(di)}),_o.forEach(function(di){0\u003eNe.indexOf(di)\u0026\u0026Ft(di)})}if(!b0)throw Error(\"Test selector API is not supported by this renderer.\");var Ne=zC(P,T);q=Nm(Ne,q,de);var ut=q.disconnect,Ft=q.observe,Tn=q.unobserve;return hk.push(Se),{disconnect:function(){var _o=hk.indexOf(Se);0\u003c=_o\u0026\u0026hk.splice(_o,1),ut()}}},Ys.shouldError=function(P){return c(P)},Ys.shouldSuspend=function(P){return A(P)},Ys.startHostTransition=function(P,T,q,de){if(P.tag!==5)throw Error(\"Expected the form instance to be a HostComponent. This is a bug in React.\");var Se=f_(P).queue;Mp(P,Se,T,Qh,q===null?_:function(){Jn.T===null\u0026\u0026console.error(\"requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.\");var Ne=f_(P).next.queue;return o0(P,Ne,{},sl(P)),q(de)})},Ys.updateContainer=function(P,T,q,de){var Se=T.current,Ne=sl(Se);return Gi(Se,Ne,P,T,q,de),Ne},Ys.updateContainerSync=r5,Ys},t.exports.default=t.exports,Object.defineProperty(t.exports,\"__esModule\",{value:!0}))})(qBe)),qBe.exports}var cpt;function rJn(){if(cpt)return Gre.exports;cpt=1;var t={env:{}};return t.env.NODE_ENV===\"production\"?Gre.exports=oJn():Gre.exports=iJn(),Gre.exports}var sJn=rJn();const aJn=_y(sJn);var Yre={exports:{}},k8={};var lpt;function AJn(){return lpt||(lpt=1,k8.ConcurrentRoot=1,k8.ContinuousEventPriority=8,k8.DefaultEventPriority=32,k8.DiscreteEventPriority=2,k8.IdleEventPriority=268435456,k8.LegacyRoot=0,k8.NoEventPriority=0),k8}var F8={},upt;function cJn(){if(upt)return F8;upt=1;var t={env:{}};return t.env.NODE_ENV!==\"production\"\u0026\u0026(F8.ConcurrentRoot=1,F8.ContinuousEventPriority=8,F8.DefaultEventPriority=32,F8.DiscreteEventPriority=2,F8.IdleEventPriority=268435456,F8.LegacyRoot=0,F8.NoEventPriority=0),F8}var gpt;function lJn(){if(gpt)return Yre.exports;gpt=1;var t={env:{}};return t.env.NODE_ENV===\"production\"?Yre.exports=AJn():Yre.exports=cJn(),Yre.exports}var XBe=lJn();const uJn=Object.keys({a:1,b:0,c:0,d:1,e:0,f:0,m11:1,m12:0,m13:0,m14:0,m21:0,m22:1,m23:0,m24:0,m31:0,m32:0,m33:1,m34:0,m41:0,m42:0,m43:0,m44:1,is2D:!0,isIdentity:!0}),dpt=t=\u003e(t instanceof Float64Array||t instanceof Float32Array||Array.isArray(t)\u0026\u0026t.every(e=\u003etypeof e==\"number\"))\u0026\u0026[6,16].some(e=\u003et.length===e),hpt=t=\u003etypeof DOMMatrix\u003c\"u\"\u0026\u0026t instanceof DOMMatrix||t instanceof Sy||typeof t==\"object\"\u0026\u0026uJn.every(e=\u003et\u0026\u0026e in t),Ure=(t,e)=\u003e{if(!dpt(t))throw TypeError(`CSSMatrix: \"${Array.from(t).join(\",\")}\" must be an array with 6/16 numbers.`);if(t.length===16){const[A,c,l,u,g,h,d,p,m,_,f,I,C,y,x,E]=t;return nz(e??new Sy,A,c,l,u,g,h,d,p,m,_,f,I,C,y,x,E)}const[n,o,i,r,s,a]=t;return nz(e??new Sy,n,o,0,0,i,r,0,0,0,0,1,0,s,a,0,1)},nz=(t,e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m)=\u003e(t.m11=e,t.a=e,t.m21=r,t.c=r,t.m31=c,t.m41=h,t.e=h,t.m12=n,t.b=n,t.m22=s,t.d=s,t.m32=l,t.m42=d,t.f=d,t.m13=o,t.m23=a,t.m33=u,t.m43=p,t.m14=i,t.m24=A,t.m34=g,t.m44=m,t),ZBe=(t,e,n,o,i,r,s,a,A,c,l,u,g,h,d,p)=\u003enz(new Sy,t,e,n,o,i,r,s,a,A,c,l,u,g,h,d,p),Kre=(t,e)=\u003e{if(hpt(t))return nz(e??new Sy,t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44);throw TypeError(`CSSMatrix: \"${JSON.stringify(t)}\" is not a DOMMatrix / CSSMatrix / JSON compatible object.`)},e9e=t=\u003e{if(typeof t!=\"string\")throw TypeError(`CSSMatrix: \"${JSON.stringify(t)}\" is not a string.`);const e=String(t).replace(/\\s/g,\"\"),n=new Sy,o=`CSSMatrix: invalid transform string \"${t}\"`,i=/([\\w-]+)\\(([^)]*)\\)/g;let r=0,s;for(;s=i.exec(e);){const a=s[1],A=s[2];if(r+=s[0].length,!A)throw TypeError(o);const c=A.split(\",\").map(m=\u003em.includes(\"rad\")?parseFloat(m)*(180/Math.PI):parseFloat(m)),[l,u,g,h]=c,d=[l,u,g],p=[l,u,g,h];if(a===\"perspective\"\u0026\u0026l\u0026\u0026[u,g].every(m=\u003em===void 0))n.m34=-1/l;else if(a.includes(\"matrix\")\u0026\u0026[6,16].includes(c.length)\u0026\u0026c.every(m=\u003e!Number.isNaN(+m))){const m=c.map(_=\u003eMath.abs(_)\u003c1e-6?0:_);n.multiplySelf(Ure(m))}else if(a===\"translate3d\"\u0026\u0026d.every(m=\u003e!Number.isNaN(+m)))n.translateSelf(l,u,g);else if(a===\"translate\"\u0026\u0026l\u0026\u0026g===void 0)n.translateSelf(l,u||0,0);else if(a===\"rotate3d\"\u0026\u0026p.every(m=\u003e!Number.isNaN(+m))\u0026\u0026h)n.rotateAxisAngleSelf(l,u,g,h);else if(a===\"rotate\"\u0026\u0026l\u0026\u0026[u,g].every(m=\u003em===void 0))n.rotateSelf(0,0,l);else if(a===\"scale3d\"\u0026\u0026d.every(m=\u003e!Number.isNaN(+m))\u0026\u0026d.some(m=\u003em!==1))n.scaleSelf(l,u,g);else if(a===\"scale\"\u0026\u0026!Number.isNaN(l)\u0026\u0026(l!==1||u!==1)\u0026\u0026g===void 0){const m=Number.isNaN(+u)?l:u;n.scaleSelf(l,m,1)}else if(a===\"skew\"\u0026\u0026(l||!Number.isNaN(l)\u0026\u0026u)\u0026\u0026g===void 0)n.skewSelf(l,u||0);else if([\"translate\",\"rotate\",\"scale\",\"skew\"].some(m=\u003ea.includes(m))\u0026\u0026/[XYZ]/.test(a)\u0026\u0026l\u0026\u0026[u,g].every(m=\u003em===void 0))if(a===\"skewX\"||a===\"skewY\")n[a===\"skewX\"?\"skewXSelf\":\"skewYSelf\"](l);else{const m=a.replace(/[XYZ]/,\"\"),_=a.replace(m,\"\"),f=[\"X\",\"Y\",\"Z\"].indexOf(_),I=m===\"scale\"?1:0,C=m+\"Self\",y=[f===0?l:I,f===1?l:I,f===2?l:I];n[C](...y)}else throw TypeError(o)}if(r!==e.length)throw TypeError(o);return n},gJn=(t,e)=\u003ee?[t.a,t.b,t.c,t.d,t.e,t.f]:[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44],dJn=(t,e,n)=\u003e{const o=new Sy;return o.m41=t,o.e=t,o.m42=e,o.f=e,o.m43=n,o},t9e=(t,e,n)=\u003e{const o=new Sy,i=Math.PI/180,r=t*i,s=e*i,a=n*i,A=Math.cos(r),c=-Math.sin(r),l=Math.cos(s),u=-Math.sin(s),g=Math.cos(a),h=-Math.sin(a),d=l*g,p=-l*h;o.m11=d,o.a=d,o.m12=p,o.b=p,o.m13=u;const m=c*u*g+A*h;o.m21=m,o.c=m;const _=A*g-c*u*h;return o.m22=_,o.d=_,o.m23=-c*l,o.m31=c*h-A*u*g,o.m32=c*g+A*u*h,o.m33=A*l,o},n9e=(t=0,e=0,n=0,o=0)=\u003e{const i=new Sy,r=Math.sqrt(t*t+e*e+n*n);if(r===0)return i;const s=t/r,a=e/r,A=n/r,c=o*(Math.PI/360),l=Math.sin(c),u=Math.cos(c),g=l*l,h=s*s,d=a*a,p=A*A,m=1-2*(d+p)*g;i.m11=m,i.a=m;const _=2*(s*a*g+A*l*u);i.m12=_,i.b=_,i.m13=2*(s*A*g-a*l*u);const f=2*(a*s*g-A*l*u);i.m21=f,i.c=f;const I=1-2*(p+h)*g;return i.m22=I,i.d=I,i.m23=2*(a*A*g+s*l*u),i.m31=2*(A*s*g+a*l*u),i.m32=2*(A*a*g-s*l*u),i.m33=1-2*(h+d)*g,i},hJn=(t,e,n)=\u003e{const o=new Sy;return o.m11=t,o.a=t,o.m22=e,o.d=e,o.m33=n,o},o9e=(t,e)=\u003e{const n=new Sy;if(t){const o=t*Math.PI/180,i=Math.tan(o);n.m21=i,n.c=i}if(e){const o=e*Math.PI/180,i=Math.tan(o);n.m12=i,n.b=i}return n},pJn=t=\u003eo9e(t,0),mJn=t=\u003eo9e(0,t),ppt=(t,e,n)=\u003e{const o=e.m11*t.m11+e.m12*t.m21+e.m13*t.m31+e.m14*t.m41,i=e.m11*t.m12+e.m12*t.m22+e.m13*t.m32+e.m14*t.m42,r=e.m11*t.m13+e.m12*t.m23+e.m13*t.m33+e.m14*t.m43,s=e.m11*t.m14+e.m12*t.m24+e.m13*t.m34+e.m14*t.m44,a=e.m21*t.m11+e.m22*t.m21+e.m23*t.m31+e.m24*t.m41,A=e.m21*t.m12+e.m22*t.m22+e.m23*t.m32+e.m24*t.m42,c=e.m21*t.m13+e.m22*t.m23+e.m23*t.m33+e.m24*t.m43,l=e.m21*t.m14+e.m22*t.m24+e.m23*t.m34+e.m24*t.m44,u=e.m31*t.m11+e.m32*t.m21+e.m33*t.m31+e.m34*t.m41,g=e.m31*t.m12+e.m32*t.m22+e.m33*t.m32+e.m34*t.m42,h=e.m31*t.m13+e.m32*t.m23+e.m33*t.m33+e.m34*t.m43,d=e.m31*t.m14+e.m32*t.m24+e.m33*t.m34+e.m34*t.m44,p=e.m41*t.m11+e.m42*t.m21+e.m43*t.m31+e.m44*t.m41,m=e.m41*t.m12+e.m42*t.m22+e.m43*t.m32+e.m44*t.m42,_=e.m41*t.m13+e.m42*t.m23+e.m43*t.m33+e.m44*t.m43,f=e.m41*t.m14+e.m42*t.m24+e.m43*t.m34+e.m44*t.m44;return n.m11=o,n.a=o,n.m21=a,n.c=a,n.m31=u,n.m41=p,n.e=p,n.m12=i,n.b=i,n.m22=A,n.d=A,n.m32=g,n.m42=m,n.f=m,n.m13=r,n.m23=c,n.m33=h,n.m43=_,n.m14=s,n.m24=l,n.m34=d,n.m44=f,n},mpt=(t,e)=\u003eppt(t,e,new Sy);var Sy=class{static Translate=dJn;static Rotate=t9e;static RotateAxisAngle=n9e;static Scale=hJn;static SkewX=pJn;static SkewY=mJn;static Skew=o9e;static Multiply=mpt;static fromArray=Ure;static fromMatrix=Kre;static fromString=e9e;static toArray=gJn;static isCompatibleArray=dpt;static isCompatibleObject=hpt;constructor(t){if(t){if(typeof t==\"string\"\u0026\u0026t.length\u0026\u0026t!==\"none\")return e9e(t);if(Array.isArray(t)||t instanceof Float64Array||t instanceof Float32Array)return Ure(t);if(typeof t==\"object\")return Kre(t)}return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this.m11=1,this.m12=0,this.m13=0,this.m14=0,this.m21=0,this.m22=1,this.m23=0,this.m24=0,this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m41=0,this.m42=0,this.m43=0,this.m44=1,this}get isIdentity(){return this.m11===1\u0026\u0026this.m12===0\u0026\u0026this.m13===0\u0026\u0026this.m14===0\u0026\u0026this.m21===0\u0026\u0026this.m22===1\u0026\u0026this.m23===0\u0026\u0026this.m24===0\u0026\u0026this.m31===0\u0026\u0026this.m32===0\u0026\u0026this.m33===1\u0026\u0026this.m34===0\u0026\u0026this.m41===0\u0026\u0026this.m42===0\u0026\u0026this.m43===0\u0026\u0026this.m44===1}get is2D(){return this.m31===0\u0026\u0026this.m32===0\u0026\u0026this.m33===1\u0026\u0026this.m34===0\u0026\u0026this.m43===0\u0026\u0026this.m44===1}setMatrixValue(t){if(typeof t==\"string\"\u0026\u0026t.length\u0026\u0026t!==\"none\"){const e=e9e(t);return nz(this,e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44)}return Array.isArray(t)||t instanceof Float64Array||t instanceof Float32Array?Ure(t,this):typeof t==\"object\"?Kre(t,this):this}toFloat32Array(t){return t?new Float32Array([this.a,this.b,this.c,this.d,this.e,this.f]):new Float32Array([this.m11,this.m12,this.m13,this.m14,this.m21,this.m22,this.m23,this.m24,this.m31,this.m32,this.m33,this.m34,this.m41,this.m42,this.m43,this.m44])}toFloat64Array(t){return t?new Float64Array([this.a,this.b,this.c,this.d,this.e,this.f]):new Float64Array([this.m11,this.m12,this.m13,this.m14,this.m21,this.m22,this.m23,this.m24,this.m31,this.m32,this.m33,this.m34,this.m41,this.m42,this.m43,this.m44])}toString(){const{is2D:t}=this,e=this.toFloat64Array(t).join(\", \");return`${t?\"matrix\":\"matrix3d\"}(${e})`}toJSON(){const{is2D:t,isIdentity:e}=this;return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,m11:this.m11,m12:this.m12,m13:this.m13,m14:this.m14,m21:this.m21,m22:this.m22,m23:this.m23,m24:this.m24,m31:this.m31,m32:this.m32,m33:this.m33,m34:this.m34,m41:this.m41,m42:this.m42,m43:this.m43,m44:this.m44,is2D:t,isIdentity:e}}multiply(t){return mpt(this,t)}translate(t,e,n){const o=e??0,i=n??0,{m11:r,m12:s,m13:a,m14:A,m21:c,m22:l,m23:u,m24:g,m31:h,m32:d,m33:p,m34:m,m41:_,m42:f,m43:I,m44:C}=this,y=t*r+o*c+i*h+_,x=t*s+o*l+i*d+f,E=t*a+o*u+i*p+I,B=t*A+o*g+i*m+C;return ZBe(r,s,a,A,c,l,u,g,h,d,p,m,y,x,E,B)}scale(t,e,n){const o=e??t,i=n??1,{m41:r,m42:s,m43:a,m44:A}=this;return ZBe(this.m11*t,this.m12*t,this.m13*t,this.m14*t,this.m21*o,this.m22*o,this.m23*o,this.m24*o,this.m31*i,this.m32*i,this.m33*i,this.m34*i,r,s,a,A)}rotate(t,e,n){let o=t,i=e||0,r=n||0;return typeof t==\"number\"\u0026\u0026typeof e\u003e\"u\"\u0026\u0026typeof n\u003e\"u\"\u0026\u0026(r=o,o=0,i=0),this.multiply(t9e(o,i,r))}rotateAxisAngle(t=0,e=0,n=0,o=0){if([t,e,n,o].some(i=\u003e!Number.isFinite(i)))throw new TypeError(\"CSSMatrix: expecting 4 values\");return Math.sqrt(t*t+e*e+n*n)===0?Kre(this):this.multiply(n9e(t,e,n,o))}skewX(t){return this.skew(t,0)}skewY(t){return this.skew(0,t)}skew(t,e){const n=t?Math.tan(t*Math.PI/180):0,o=e?Math.tan(e*Math.PI/180):0,{m11:i,m12:r,m13:s,m14:a,m21:A,m22:c,m23:l,m24:u}=this;return ZBe(i+o*A,r+o*c,s+o*l,a+o*u,n*i+A,n*r+c,n*s+l,n*a+u,this.m31,this.m32,this.m33,this.m34,this.m41,this.m42,this.m43,this.m44)}multiplySelf(t){return ppt(this,t,this),this}translateSelf(t,e,n){const o=e??0,i=n??0,{m11:r,m12:s,m13:a,m14:A,m21:c,m22:l,m23:u,m24:g,m31:h,m32:d,m33:p,m34:m,m41:_,m42:f,m43:I,m44:C}=this,y=t*r+o*c+i*h+_,x=t*s+o*l+i*d+f,E=t*a+o*u+i*p+I,B=t*A+o*g+i*m+C;return this.m41=y,this.e=y,this.m42=x,this.f=x,this.m43=E,this.m44=B,this}scaleSelf(t,e,n){const o=e??t,i=n??1;return this.m11*=t,this.a*=t,this.m12*=t,this.b*=t,this.m13*=t,this.m14*=t,this.m21*=o,this.c*=o,this.m22*=o,this.d*=o,this.m23*=o,this.m24*=o,this.m31*=i,this.m32*=i,this.m33*=i,this.m34*=i,this}rotateSelf(t,e,n){let o=t,i=e||0,r=n||0;return typeof t==\"number\"\u0026\u0026typeof e\u003e\"u\"\u0026\u0026typeof n\u003e\"u\"\u0026\u0026(r=o,o=0,i=0),this.multiplySelf(t9e(o,i,r))}rotateAxisAngleSelf(t=0,e=0,n=0,o=0){if([t,e,n,o].some(i=\u003e!Number.isFinite(i)))throw new TypeError(\"CSSMatrix: expecting 4 values\");return Math.sqrt(t*t+e*e+n*n)===0?this:this.multiplySelf(n9e(t,e,n,o))}skewXSelf(t){return this.skewSelf(t,0)}skewYSelf(t){return this.skewSelf(0,t)}skewSelf(t,e){const n=t?Math.tan(t*Math.PI/180):0,o=e?Math.tan(e*Math.PI/180):0,{m11:i,m12:r,m13:s,m14:a,m21:A,m22:c,m23:l,m24:u}=this,g=i+o*A,h=r+o*c,d=s+o*l,p=a+o*u,m=n*i+A,_=n*r+c,f=n*s+l,I=n*a+u;return this.m11=g,this.a=g,this.m12=h,this.b=h,this.m13=d,this.m14=p,this.m21=m,this.c=m,this.m22=_,this.d=_,this.m23=f,this.m24=I,this}transformPoint(t){const e=this.m11*t.x+this.m21*t.y+this.m31*t.z+this.m41*t.w,n=this.m12*t.x+this.m22*t.y+this.m32*t.z+this.m42*t.w,o=this.m13*t.x+this.m23*t.y+this.m33*t.z+this.m43*t.w,i=this.m14*t.x+this.m24*t.y+this.m34*t.z+this.m44*t.w;return typeof DOMPoint\u003c\"u\"\u0026\u0026t instanceof DOMPoint?new DOMPoint(e,n,o,i):{x:e,y:n,z:o,w:i}}};var _Jn=\"2.3.3\";const j9=([t,e],[n,o],i)=\u003e[t+(n-t)*i,e+(o-e)*i],Vre=(t,e)=\u003eMath.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])),PF=(t,e,n,o)=\u003eVre([t,e],[n,o]),zre=(t,e,n,o,i)=\u003e{let r={x:t,y:e};if(typeof i==\"number\"){const s=Vre([t,e],[n,o]);if(i\u003c=0)r={x:t,y:e};else if(i\u003e=s)r={x:n,y:o};else{const[a,A]=j9([t,e],[n,o],i/s);r={x:a,y:A}}}return r},i9e=(t,e,n,o)=\u003e{const{min:i,max:r}=Math;return[i(t,n),i(e,o),r(t,n),r(e,o)]},fJn={getLineBBox:i9e,getLineLength:PF,getPointAtLineLength:zre},oz=[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],r9e=[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],Jre=t=\u003e{const e=[];for(let n=t,o=n.length,i=o-1;o\u003e1;o-=1,i-=1){const r=[];for(let s=0;s\u003ci;s+=1)r.push({x:i*(n[s+1].x-n[s].x),y:i*(n[s+1].y-n[s].y),t:0});e.push(r),n=r}return e},Wre=(t,e)=\u003e{if(e===0)return t[0].t=0,t[0];const n=t.length-1;if(e===1)return t[n].t=1,t[n];const o=1-e;let i=t;if(n===0)return t[0].t=e,t[0];if(n===1)return{x:o*i[0].x+e*i[1].x,y:o*i[0].y+e*i[1].y,t:e};const r=o*o,s=e*e;let a=0,A=0,c=0,l=0;return n===2?(i=[i[0],i[1],i[2],{x:0,y:0}],a=r,A=o*e*2,c=s):n===3\u0026\u0026(a=r*o,A=r*e*3,c=o*s*3,l=e*s),{x:a*i[0].x+A*i[1].x+c*i[2].x+l*i[3].x,y:a*i[0].y+A*i[1].y+c*i[2].y+l*i[3].y,t:e}},_pt=(t,e)=\u003e{const n=t(e),o=n.x*n.x+n.y*n.y;return Math.sqrt(o)},fpt=t=\u003ejre(t,1),jre=(t,e)=\u003e{const n=e/2,o=oz.length;let i=0;for(let r=0,s;r\u003co;r++)s=n*oz[r]+n,i+=r9e[r]*_pt(t,s);return n*i},$re=t=\u003e{const e=[];for(let n=0,o=t.length,i=2;n\u003co;n+=i)e.push({x:t[n],y:t[n+1]});return e},IJn=(t,e)=\u003e{const n=Jre($re(t));return jre(o=\u003eWre(n[0],o),e)},s9e=(t,e)=\u003e{const n=Jre($re(t)),o=s=\u003eWre(n[0],s);let i=0,r=1;for(let s=0;s\u003c25;s+=1){const a=(i+r)/2;jre(o,a)\u003ce?i=a:r=a}return(i+r)/2},iz=t=\u003e{const e=$re(t),n=Jre(e);return fpt(o=\u003eWre(n[0],o))},CJn=1e-8,qre=([t,e,n])=\u003e{const o=Math.min(t,n),i=Math.max(t,n);if(e\u003e=t?n\u003e=e:n\u003c=e)return[o,i];const r=(t*n-e*e)/(t-2*e+n);return r\u003co?[r,i]:[o,r]},a9e=([t,e,n,o])=\u003e{const i=t-3*e+3*n-o;if(Math.abs(i)\u003c1e-8)return t===o\u0026\u0026t===e?[t,o]:qre([t,-.5*t+1.5*e,t-3*e+3*n]);const r=-t*n+t*o-e*n-e*o+e*e+n*n;if(r\u003c=0)return[Math.min(t,o),Math.max(t,o)];const s=Math.sqrt(r);let a=Math.min(t,o),A=Math.max(t,o);const c=t-2*e+n;for(let l=(c+s)/i,u=1;u\u003c=2;l=(c-s)/i,u++)if(l\u003e0\u0026\u0026l\u003c1){const g=t*(1-l)*(1-l)*(1-l)+e*3*(1-l)*(1-l)*l+n*3*(1-l)*l*l+o*l*l*l;g\u003ca\u0026\u0026(a=g),g\u003eA\u0026\u0026(A=g)}return[a,A]},yJn={bezierLength:fpt,bezierLengthAtT:jre,calculateBezier:_pt,CBEZIER_MINMAX_EPSILON:CJn,computeBezier:Wre,Cvalues:r9e,deriveBezier:Jre,getBezierLength:iz,getBezierLengthAtT:IJn,getBezierPoints:$re,getTAtBezierLength:s9e,minmaxC:a9e,minmaxQ:qre,Tvalues:oz},Xre=(t,e,n)=\u003e{const o=n\u003c0?-1:1,i=Math.abs(n),r=Math.PI/2;let s=0,a=i,A=0;for(;a\u003e0;){const c=Math.min(r,a),l=c/2;let u=0;for(let g=0,h=oz.length;g\u003ch;g+=1){const d=A+l*oz[g]+l;u+=r9e[g]*Math.sqrt((t*Math.sin(d))**2+(e*Math.cos(d))**2)}s+=l*u,A+=c,a-=c}return o*s},Zre=(t,e,n,o)=\u003eXre(t,e,o)-Xre(t,e,n),xJn=(t,e,n)=\u003eMath.abs(Xre(t,e,n)),ID=(t,e,n,o,i,r)=\u003e{const{sin:s,cos:a}=Math,A=a(i),c=s(i),l=n*a(r),u=o*s(r);return[t+A*l-c*u,e+c*l+A*u]},A9e=(t,e)=\u003e{const{x:n,y:o}=t,{x:i,y:r}=e,s=n*i+o*r,a=Math.sqrt((n**2+o**2)*(i**2+r**2));return(n*r-o*i\u003c0?-1:1)*Math.acos(s/a)},ese=(t,e,n,o,i,r,s,a,A)=\u003e{const{abs:c,sin:l,cos:u,sqrt:g,PI:h}=Math;let d=c(n),p=c(o);const m=(i%360+360)%360*(h/180);if(t===a\u0026\u0026e===A)return{rx:d,ry:p,startAngle:0,endAngle:0,center:{x:a,y:A}};if(d===0||p===0)return{rx:d,ry:p,startAngle:0,endAngle:0,center:{x:(a+t)/2,y:(A+e)/2}};const _=(t-a)/2,f=(e-A)/2,I={x:u(m)*_+l(m)*f,y:-l(m)*_+u(m)*f},C=I.x**2/d**2+I.y**2/p**2;C\u003e1\u0026\u0026(d*=g(C),p*=g(C));let y=(d**2*p**2-d**2*I.y**2-p**2*I.x**2)/(d**2*I.y**2+p**2*I.x**2);y=y\u003c0?0:y;const x=(r!==s?1:-1)*g(y),E={x:x*(d*I.y/p),y:x*(-(p*I.x)/d)},B={x:u(m)*E.x-l(m)*E.y+(t+a)/2,y:l(m)*E.x+u(m)*E.y+(e+A)/2},S={x:(I.x-E.x)/d,y:(I.y-E.y)/p},Q=A9e({x:1,y:0},S),w={x:(-I.x-E.x)/d,y:(-I.y-E.y)/p};let M=A9e(S,w);return!s\u0026\u0026M\u003e0?M-=2*h:s\u0026\u0026M\u003c0\u0026\u0026(M+=2*h),M%=2*h,{center:B,startAngle:Q,endAngle:Q+M,rx:d,ry:p}},c9e=(t,e,n,o,i,r,s,a,A)=\u003e{const{rx:c,ry:l,startAngle:u,endAngle:g}=ese(t,e,n,o,i,r,s,a,A);return Math.abs(Zre(c,l,u,g))},Ipt=(t,e,n,o,i,r,s,a,A,c)=\u003e{let l={x:t,y:e};const{center:u,rx:g,ry:h,startAngle:d,endAngle:p}=ese(t,e,n,o,i,r,s,a,A);if(typeof c==\"number\"){const m=p-d,_=Math.abs(Zre(g,h,d,p));if(c\u003c=0)l={x:t,y:e};else if(c\u003e=_)l={x:a,y:A};else{if(t===a\u0026\u0026e===A)return{x:a,y:A};if(g===0||h===0)return zre(t,e,a,A,c);const{PI:f,cos:I,sin:C}=Math,y=(i%360+360)%360*(f/180);let x=0,E=1;for(let w=0;w\u003c25;w+=1){const M=(x+E)/2;Math.abs(Zre(g,h,d,d+m*M))\u003cc?x=M:E=M}const B=d+m*((x+E)/2),S=g*I(B),Q=h*C(B);l={x:I(y)*S-C(y)*Q+u.x,y:C(y)*S+I(y)*Q+u.y}}}return l},Cpt=(t,e,n,o,i,r,s,a,A)=\u003e{const{center:c,rx:l,ry:u,startAngle:g,endAngle:h}=ese(t,e,n,o,i,r,s,a,A),d=h-g,{min:p,max:m,tan:_,atan2:f,PI:I}=Math,{x:C,y}=c,x=i*I/180,E=_(x),B=f(-u*E,l),S=B,Q=B+I,w=f(u,l*E),M=w+I,k=[a],R=[A];let F=p(t,a),O=m(t,a),U=p(e,A),Y=m(e,A);const W=h-d*1e-5,te=ID(C,y,l,u,x,W),j=h-d*.99999,J=ID(C,y,l,u,x,j);if(te[0]\u003eO||J[0]\u003eO){const oe=ID(C,y,l,u,x,S);k.push(oe[0]),R.push(oe[1])}if(te[0]\u003cF||J[0]\u003cF){const oe=ID(C,y,l,u,x,Q);k.push(oe[0]),R.push(oe[1])}if(te[1]\u003cU||J[1]\u003cU){const oe=ID(C,y,l,u,x,M);k.push(oe[0]),R.push(oe[1])}if(te[1]\u003eY||J[1]\u003eY){const oe=ID(C,y,l,u,x,w);k.push(oe[0]),R.push(oe[1])}return F=p.apply([],k),U=p.apply([],R),O=m.apply([],k),Y=m.apply([],R),[F,U,O,Y]},EJn={angleBetween:A9e,arcLength:xJn,arcLengthAtAngle:Xre,arcLengthBetween:Zre,arcPoint:ID,getArcBBox:Cpt,getArcLength:c9e,getArcProps:ese,getPointAtArcLength:Ipt},ypt=([t,e,n,o,i,r,s,a],A)=\u003e{const c=1-A;return{x:c**3*t+3*c**2*A*n+3*c*A**2*i+A**3*s,y:c**3*e+3*c**2*A*o+3*c*A**2*r+A**3*a}},CD=(t,e,n,o,i,r,s,a)=\u003eiz([t,e,n,o,i,r,s,a]),tse=(t,e,n,o,i,r,s,a,A)=\u003e{const c=typeof A==\"number\";let l={x:t,y:e};if(c){const u=[t,e,n,o,i,r,s,a],g=iz(u);if(!(A\u003c=0))if(A\u003e=g)l={x:s,y:a};else{const h=s9e(u,A);l=ypt(u,h)}}return l},rz=(t,e,n,o,i,r,s,a)=\u003e{const A=a9e([t,n,i,s]),c=a9e([e,o,r,a]);return[A[0],c[0],A[1],c[1]]},BJn={getCubicBBox:rz,getCubicLength:CD,getPointAtCubicLength:tse,getPointAtCubicSegmentLength:ypt},xpt=([t,e,n,o,i,r],s)=\u003e{const a=1-s;return{x:a**2*t+2*a*s*n+s**2*i,y:a**2*e+2*a*s*o+s**2*r}},nse=(t,e,n,o,i,r)=\u003eiz([t,e,n,o,i,r]),Ept=(t,e,n,o,i,r,s)=\u003e{const a=typeof s==\"number\";let A={x:t,y:e};if(a){const c=[t,e,n,o,i,r],l=iz(c);if(!(s\u003c=0))if(s\u003e=l)A={x:i,y:r};else{const u=s9e(c,s);A=xpt(c,u)}}return A},l9e=(t,e,n,o,i,r)=\u003e{const s=qre([t,n,i]),a=qre([e,o,r]);return[s[0],a[0],s[1],a[1]]},bJn={getPointAtQuadLength:Ept,getPointAtQuadSegmentLength:xpt,getQuadBBox:l9e,getQuadLength:nse},MF=t=\u003e{const e=t.length;let n=-1,o,i=t[e-1],r=0;for(;++n\u003ce;)o=i,i=t[n],r+=o[1]*i[0]-o[0]*i[1];return r/2},SJn={polygonArea:MF,polygonLength:t=\u003et.reduce((e,n,o)=\u003eo?e+Vre(t[o-1],n):0,0),polygonCentroid:t=\u003e{if(t.length===0)return[0,0];let e=0,n=0;for(const[i,r]of t)e+=i,n+=r;const o=t.length;return[e/o,n/o]}},sz=(t,e,n)=\u003e{const{sin:o,cos:i}=Math;return{x:t*i(n)-e*o(n),y:t*o(n)+e*i(n)}},Qu=(t,e)=\u003e{const n=e\u003e=1?10**e:1;return e\u003e0?Math.round(t*n)/n:Math.round(t)},FQ={origin:[0,0,0],round:4},DF={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},u9e=t=\u003e{let e=t.pathValue[t.segmentStart],n=e.toLowerCase();const{data:o}=t;let i=0;for(;o.length-i\u003e=DF[n];){if(n===\"m\"\u0026\u0026o.length-i\u003e2){const r=new Array(3);r[0]=e,r[1]=o[i],r[2]=o[i+1],t.segments.push(r),i+=2,n=\"l\",e=e===\"m\"?\"l\":\"L\"}else{const r=DF[n],s=new Array(r+1);s[0]=e;for(let a=0;a\u003cr;a+=1)s[a+1]=o[i+a];t.segments.push(s),i+=r}if(!DF[n])break}},K_=\"SVGPathCommanderError\",Bpt=t=\u003e{const{index:e,pathValue:n}=t,o=n.charCodeAt(e);if(o===48){t.param=0,t.index+=1;return}if(o===49){t.param=1,t.index+=1;return}t.err=`${K_}: invalid Arc flag \"${n[e]}\", expecting 0 or 1 at index ${e}`},LQ=t=\u003et\u003e=48\u0026\u0026t\u003c=57,HQ=\"Invalid path value\",bpt=t=\u003e{const{max:e,pathValue:n,index:o}=t;let i=o,r=!1,s=!1,a=!1,A=!1,c;if(i\u003e=e){t.err=`${K_}: ${HQ} at index ${i}, \"pathValue\" is missing param`;return}if(c=n.charCodeAt(i),(c===43||c===45)\u0026\u0026(i+=1,c=n.charCodeAt(i)),!LQ(c)\u0026\u0026c!==46){t.err=`${K_}: ${HQ} at index ${i}, \"${n[i]}\" is not a number`;return}if(c!==46){if(r=c===48,i+=1,c=n.charCodeAt(i),r\u0026\u0026i\u003ce\u0026\u0026c\u0026\u0026LQ(c)){t.err=`${K_}: ${HQ} at index ${o}, \"${n[o]}\" illegal number`;return}for(;i\u003ce\u0026\u0026LQ(n.charCodeAt(i));)i+=1,s=!0;c=n.charCodeAt(i)}if(c===46){for(A=!0,i+=1;LQ(n.charCodeAt(i));)i+=1,a=!0;c=n.charCodeAt(i)}if(c===101||c===69){if(A\u0026\u0026!s\u0026\u0026!a){t.err=`${K_}: ${HQ} at index ${i}, \"${n[i]}\" invalid float exponent`;return}if(i+=1,c=n.charCodeAt(i),(c===43||c===45)\u0026\u0026(i+=1),i\u003ce\u0026\u0026LQ(n.charCodeAt(i)))for(;i\u003ce\u0026\u0026LQ(n.charCodeAt(i));)i+=1;else{t.err=`${K_}: ${HQ} at index ${i}, \"${n[i]}\" invalid integer exponent`;return}}t.index=i,t.param=QJn(n,o,i)},QJn=(t,e,n)=\u003e{let o=e,i=1,r=0,s=0,a=0,A=!1,c=1,l=0;const u=t.charCodeAt(o);for(u===43?o+=1:u===45\u0026\u0026(i=-1,o+=1);o\u003cn;o+=1){const h=t.charCodeAt(o);if(h===46)A=!0;else if(h===101||h===69){o+=1;const d=t.charCodeAt(o);for(d===43?o+=1:d===45\u0026\u0026(c=-1,o+=1);o\u003cn;o+=1)l=l*10+(t.charCodeAt(o)-48)}else{const d=h-48;(d!==0||r!==0)\u0026\u0026(a+=1),r=r*10+d,A\u0026\u0026(s+=1)}}if(a\u003e15||a===0)return+t.slice(e,n);const g=c*l-s;return g\u003e22||g\u003c-22?+t.slice(e,n):g\u003e=0?i*r*10**g:i*r/10**-g},Spt=t=\u003e[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279,10,13,8232,8233,32,9,11,12,160].includes(t),NF=t=\u003e{const{pathValue:e,max:n}=t;for(;t.index\u003cn\u0026\u0026Spt(e.charCodeAt(t.index));)t.index+=1},Qpt=t=\u003e{switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}},vpt=t=\u003eLQ(t)||t===43||t===45||t===46,wpt=t=\u003e(t|32)===97,Ppt=t=\u003e{switch(t|32){case 109:case 77:return!0;default:return!1}},g9e=t=\u003e{const{max:e,pathValue:n,index:o,segments:i}=t,r=n.charCodeAt(o),s=DF[n[o].toLowerCase()];if(t.segmentStart=o,!Qpt(r)){t.err=`${K_}: ${HQ} \"${n[o]}\" is not a path command at index ${o}`;return}const a=i[i.length-1];if(!Ppt(r)\u0026\u0026a?.[0]?.toLocaleLowerCase()===\"z\"){t.err=`${K_}: ${HQ} \"${n[o]}\" is not a MoveTo path command at index ${o}`;return}if(t.index+=1,NF(t),t.data=[],!s){u9e(t);return}for(;;){for(let A=s;A\u003e0;A-=1){if(wpt(r)\u0026\u0026(A===3||A===4)?Bpt(t):bpt(t),t.err.length)return;t.data.push(t.param),NF(t),t.index\u003ce\u0026\u0026n.charCodeAt(t.index)===44\u0026\u0026(t.index+=1,NF(t))}if(t.index\u003e=t.max||!vpt(n.charCodeAt(t.index)))break}u9e(t)};var d9e=class{constructor(t){this.segments=[],this.pathValue=t,this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=\"\"}};const lx=t=\u003e{if(typeof t!=\"string\")return t.slice(0);const e=new d9e(t);for(NF(e);e.index\u003ce.max\u0026\u0026!e.err.length;)g9e(e);if(!e.err.length)e.segments.length\u0026\u0026(e.segments[0][0]=\"M\");else throw TypeError(e.err);return e.segments},az=(t,e,n,o)=\u003e{const[i]=t,r=i.toUpperCase();if(e===0||r===i)return t;if(r===\"A\")return[r,t[1],t[2],t[3],t[4],t[5],t[6]+n,t[7]+o];if(r===\"V\")return[r,t[1]+o];if(r===\"H\")return[r,t[1]+n];if(r===\"L\")return[r,t[1]+n,t[2]+o];if(r===\"C\")return[r,t[1]+n,t[2]+o,t[3]+n,t[4]+o,t[5]+n,t[6]+o];{const s=[],a=t.length;for(let A=1;A\u003ca;A+=1)s.push(t[A]+(A%2?n:o));return[r].concat(s)}},Qy=(t,e)=\u003e{let n=0,o=0,i=0,r=0,s=0;for(;s\u003ct.length;){const a=t[s],[A]=a,c=A.charCodeAt(0),l=c\u003e=97,u=l?String.fromCharCode(c-32):A,g=e(a,s,n,o);if(g===!1)break;if(u===\"Z\")n=i,o=r;else if(u===\"H\")n=a[1]+(l?n:0);else if(u===\"V\")o=a[1]+(l?o:0);else{const h=a.length;n=a[h-2]+(l?n:0),o=a[h-1]+(l?o:0),u===\"M\"\u0026\u0026(i=n,r=o)}g\u0026\u0026(t[s]=g),s+=1}return t},ose=t=\u003e{const e=lx(t);return Qy(e,az)},h9e=(t,e,n,o)=\u003e{const[i]=t,r=i.toLowerCase();if(e===0||i===r)return t;if(r===\"a\")return[r,t[1],t[2],t[3],t[4],t[5],t[6]-n,t[7]-o];if(r===\"v\")return[r,t[1]-o];if(r===\"h\")return[r,t[1]-n];if(r===\"l\")return[r,t[1]-n,t[2]-o];{const s=[],a=t.length;for(let A=1;A\u003ca;A+=1)s.push(t[A]-(A%2?n:o));return[r].concat(s)}},Mpt=t=\u003e{const e=lx(t);return Qy(e,h9e)},Az=(t,e,n,o,i,r,s,a,A,c)=\u003e{let l=t,u=e,g=n,h=o,d=a,p=A;const m=Math.PI*120/180,_=Math.PI/180*(+i||0);let f=[],I,C,y,x,E;if(c)[C,y,x,E]=c;else{I=sz(l,u,-_),l=I.x,u=I.y,I=sz(d,p,-_),d=I.x,p=I.y;const j=(l-d)/2,J=(u-p)/2;let oe=j*j/(g*g)+J*J/(h*h);oe\u003e1\u0026\u0026(oe=Math.sqrt(oe),g*=oe,h*=oe);const ie=g*g,ne=h*h,le=(r===s?-1:1)*Math.sqrt(Math.abs((ie*ne-ie*J*J-ne*j*j)/(ie*J*J+ne*j*j)));x=le*g*J/h+(l+d)/2,E=le*-h*j/g+(u+p)/2,C=Math.asin(((u-E)/h*10**9\u003e\u003e0)/10**9),y=Math.asin(((p-E)/h*10**9\u003e\u003e0)/10**9),C=l\u003cx?Math.PI-C:C,y=d\u003cx?Math.PI-y:y,C\u003c0\u0026\u0026(C=Math.PI*2+C),y\u003c0\u0026\u0026(y=Math.PI*2+y),s\u0026\u0026C\u003ey\u0026\u0026(C-=Math.PI*2),!s\u0026\u0026y\u003eC\u0026\u0026(y-=Math.PI*2)}let B=y-C;if(Math.abs(B)\u003em){const j=y,J=d,oe=p;y=C+m*(s\u0026\u0026y\u003eC?1:-1),d=x+g*Math.cos(y),p=E+h*Math.sin(y),f=Az(d,p,g,h,i,0,s,J,oe,[y,j,x,E])}B=y-C;const S=Math.cos(C),Q=Math.sin(C),w=Math.cos(y),M=Math.sin(y),k=Math.tan(B/4),R=4/3*g*k,F=4/3*h*k,O=[l,u],U=[l+R*Q,u-F*S],Y=[d+R*M,p-F*w],W=[d,p];if(U[0]=2*O[0]-U[0],U[1]=2*O[1]-U[1],c)return[U[0],U[1],Y[0],Y[1],W[0],W[1]].concat(f);f=[U[0],U[1],Y[0],Y[1],W[0],W[1]].concat(f);const te=[];for(let j=0,J=f.length;j\u003cJ;j+=1)te[j]=j%2?sz(f[j-1],f[j],_).y:sz(f[j],f[j+1],_).x;return te},Dpt=(t,e,n,o,i,r)=\u003e{const s=.3333333333333333,a=2/3;return[s*t+a*n,s*e+a*o,s*i+a*n,s*r+a*o,i,r]},p9e=(t,e,n,o)=\u003e{const i=j9([t,e],[n,o],.3333333333333333),r=j9([t,e],[n,o],2/3);return[i[0],i[1],r[0],r[1],n,o]},Npt=(t,e)=\u003e{const n=t[0],o=t.slice(1).map(Number),[i,r]=o,{x1:s,y1:a}=e;return\"TQ\".includes(n)||(e.qx=null,e.qy=null),n===\"M\"?(e.mx=i,e.my=r,e.x=i,e.y=r,t):n===\"A\"?[\"C\"].concat(Az(s,a,o[0],o[1],o[2],o[3],o[4],o[5],o[6])):n===\"Q\"?(e.qx=i,e.qy=r,[\"C\"].concat(Dpt(s,a,o[0],o[1],o[2],o[3]))):n===\"L\"?[\"C\"].concat(p9e(s,a,i,r)):n===\"Z\"?[\"C\"].concat(p9e(s,a,e.mx,e.my)):t},ise=(t,e)=\u003e{const[n]=t,o=n.toUpperCase(),i=n!==o,{x1:r,y1:s,x2:a,y2:A,x:c,y:l}=e,u=t.slice(1);let g=u.map((h,d)=\u003eh+(i?d%2?l:c:0));if(\"TQ\".includes(o)||(e.qx=null,e.qy=null),o===\"A\")return g=u.slice(0,-2).concat(u[5]+(i?c:0),u[6]+(i?l:0)),[\"A\"].concat(g);if(o===\"H\")return[\"L\",t[1]+(i?c:0),s];if(o===\"V\")return[\"L\",r,t[1]+(i?l:0)];if(o===\"L\")return[\"L\",t[1]+(i?c:0),t[2]+(i?l:0)];if(o===\"M\")return[\"M\",t[1]+(i?c:0),t[2]+(i?l:0)];if(o===\"C\")return[\"C\"].concat(g);if(o===\"S\"){const h=r*2-a,d=s*2-A;return e.x1=h,e.y1=d,[\"C\",h,d].concat(g)}else if(o===\"T\"){const h=e.qx!=null?r*2-e.qx:r,d=e.qy!=null?s*2-e.qy:s;return e.qx=h,e.qy=d,[\"Q\",h,d].concat(g)}else if(o===\"Q\"){const[h,d]=g;return e.qx=h,e.qy=d,[\"Q\"].concat(g)}else if(o===\"Z\")return[\"Z\"];return t},rse={mx:0,my:0,x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},OQ=t=\u003e{const e={...rse},n=lx(t);return Qy(n,(o,i,r,s)=\u003e{e.x=r,e.y=s;const a=ise(o,e);a[0]===\"M\"\u0026\u0026(e.mx=a[1],e.my=a[2]);let A=Npt(a,e);A[0]===\"C\"\u0026\u0026A.length\u003e7\u0026\u0026(n.splice(i+1,0,[\"C\"].concat(A.slice(7))),A=A.slice(0,7));const c=A.length;return e.x1=+A[c-2],e.y1=+A[c-1],e.x2=+A[c-4]||e.x1,e.y2=+A[c-3]||e.y1,A})},m9e=(t,e)=\u003e{const n=t.length;let{round:o}=FQ,i=t[0],r=\"\";o=e===\"off\"||typeof e==\"number\"\u0026\u0026e\u003e=0?e:typeof o==\"number\"\u0026\u0026o\u003e=0?o:\"off\";const s=o===\"off\"?0:10**o;for(let a=0;a\u003cn;a+=1){i=t[a];const A=i[0],c=i.length;if(r+=A,o===\"off\")for(let l=1;l\u003cc;l+=1)r+=i[l],l!==c-1\u0026\u0026(r+=\" \");else for(let l=1;l\u003cc;l+=1)r+=Math.round(i[l]*s)/s,l!==c-1\u0026\u0026(r+=\" \")}return r},_9e=t=\u003e{if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};const e=lx(t);let n=\"M\",o=0,i=0;const{max:r,min:s}=Math;let a=1/0,A=1/0,c=-1/0,l=-1/0,u=0,g=0,h=0,d=0,p=0,m=0,_=0,f=0,I=null,C=null;Qy(e,(E,B,S,Q)=\u003e{[n]=E;const w=n.charCodeAt(0),M=w\u003e=97,k=M?String.fromCharCode(w-32):n,R=M?az(E,B,S,Q):E,F=k===\"V\"?[\"L\",S,R[1]]:k===\"H\"?[\"L\",R[1],Q]:R;if([n]=F,k!==\"T\"\u0026\u0026k!==\"Q\"\u0026\u0026(I=null,C=null),n===\"M\")[,o,i]=F,u=o,g=i,h=o,d=i;else if(n===\"L\")[u,g,h,d]=i9e(S,Q,F[1],F[2]);else if(n===\"A\")[u,g,h,d]=Cpt(S,Q,F[1],F[2],F[3],F[4],F[5],F[6],F[7]);else if(n===\"S\"){const O=p*2-_,U=m*2-f;[u,g,h,d]=rz(S,Q,O,U,F[1],F[2],F[3],F[4])}else n===\"C\"?[u,g,h,d]=rz(S,Q,F[1],F[2],F[3],F[4],F[5],F[6]):n===\"T\"?(I=I===null?S:p*2-I,C=C===null?Q:m*2-C,[u,g,h,d]=l9e(S,Q,I,C,F[1],F[2])):n===\"Q\"?(I=F[1],C=F[2],[u,g,h,d]=l9e(S,Q,F[1],F[2],F[3],F[4])):n===\"Z\"\u0026\u0026([u,g,h,d]=i9e(S,Q,o,i));if(a=s(u,a),A=s(g,A),c=r(h,c),l=r(d,l),n===\"Z\")p=o,m=i;else{const O=F.length;p=F[O-2],m=F[O-1]}n===\"C\"?(_=F[3],f=F[4]):n===\"S\"?(_=F[1],f=F[2]):(_=p,f=m)});const y=c-a,x=l-A;return{width:y,height:x,x:a,y:A,x2:c,y2:l,cx:a+y/2,cy:A+x/2,cz:Math.max(y,x)+Math.min(y,x)/2}},L8=t=\u003e{const e=lx(t);let n=0,o=0,i=0,r=0,s=null,a=null,A=\"M\",c=0,l=0,u=0;return Qy(e,(g,h,d,p)=\u003e{[A]=g;const m=A.toUpperCase(),_=m!==A?az(g,h,d,p):g.slice(0),f=m===\"V\"?[\"L\",d,_[1]]:m===\"H\"?[\"L\",_[1],p]:_;if([A]=f,\"TQ\".includes(m)||(s=null,a=null),A===\"M\")[,c,l]=f;else if(A===\"L\")u+=PF(d,p,f[1],f[2]);else if(A===\"A\")u+=c9e(d,p,f[1],f[2],f[3],f[4],f[5],f[6],f[7]);else if(A===\"S\"){const I=n*2-i,C=o*2-r;u+=CD(d,p,I,C,f[1],f[2],f[3],f[4])}else A===\"C\"?u+=CD(d,p,f[1],f[2],f[3],f[4],f[5],f[6]):A===\"T\"?(s=s===null?d:n*2-s,a=a===null?p:o*2-a,u+=nse(d,p,s,a,f[1],f[2])):A===\"Q\"?(s=f[1],a=f[2],u+=nse(d,p,f[1],f[2],f[3],f[4])):A===\"Z\"\u0026\u0026(u+=PF(d,p,c,l));[n,o]=A===\"Z\"?[c,l]:f.slice(-2),[i,r]=A===\"C\"?[f[3],f[4]]:A===\"S\"?[f[1],f[2]]:[n,o]}),u},f9e=1e-5,j4=t=\u003e{const e=lx(t),n={...rse};return Qy(e,(o,i,r,s)=\u003e{n.x=r,n.y=s;const a=ise(o,n),A=a.length;return n.x1=+a[A-2],n.y1=+a[A-1],n.x2=+a[A-4]||n.x1,n.y2=+a[A-3]||n.y1,a})},cz=(t,e)=\u003e{const n=j4(t);let o=!1,i=[],[r,s]=n[0].slice(1);const a=typeof e==\"number\";let A={x:r,y:s},c=0,l=A,u=0;return!a||e\u003c1e-5?A:(Qy(n,(g,h,d,p)=\u003e{const m=g[0];if(o=m===\"M\",i=o?i:[d,p].concat(g.slice(1)),o?([,r,s]=g,A={x:r,y:s},c=0):m===\"L\"?(A=zre(i[0],i[1],i[2],i[3],e-u),c=PF(i[0],i[1],i[2],i[3])):m===\"A\"?(A=Ipt(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],e-u),c=c9e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8])):m===\"C\"?(A=tse(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],e-u),c=CD(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7])):m===\"Q\"?(A=Ept(i[0],i[1],i[2],i[3],i[4],i[5],e-u),c=nse(i[0],i[1],i[2],i[3],i[4],i[5])):m===\"Z\"\u0026\u0026(i=[d,p,r,s],A=zre(i[0],i[1],i[2],i[3],e-u),c=PF(i[0],i[1],i[2],i[3])),u\u003ce)l=A;else return!1;u+=c}),l)},I9e=(t,e)=\u003e{const n=lx(t);let o=n.slice(0),i=L8(o),r=o.length-1,s=0,a=0,A=n[0];if(r\u003c=0||!e||!Number.isFinite(e))return{segment:A,index:0,length:a,lengthAtSegment:s};if(e\u003e=i)return o=n.slice(0,-1),s=L8(o),a=i-s,A=n[r],{segment:A,index:r,length:a,lengthAtSegment:s};const c=[];for(;r\u003e0;)A=o[r],o=o.slice(0,-1),s=L8(o),a=i-s,i=s,c.push({segment:A,index:r,length:a,lengthAtSegment:s}),r-=1;return c.find(({lengthAtSegment:l})=\u003el\u003c=e)},sse=(t,e)=\u003e{const n=lx(t),o=j4(n),i=L8(o),r=I=\u003e{const C=I.x-e.x,y=I.y-e.y;return C*C+y*y};let s=8,a,A={x:0,y:0},c=0,l=0,u=1/0;for(let I=0;I\u003c=i;I+=s)a=cz(o,I),c=r(a),c\u003cu\u0026\u0026(A=a,l=I,u=c);s/=2;let g,h,d=0,p=0,m=0,_=0;for(;s\u003e1e-6\u0026\u0026(d=l-s,g=cz(o,d),m=r(g),p=l+s,h=cz(o,p),_=r(h),d\u003e=0\u0026\u0026m\u003cu?(A=g,l=d,u=m):p\u003c=i\u0026\u0026_\u003cu?(A=h,l=p,u=_):s/=2,!(s\u003c1e-5)););const f=I9e(n,l);return{closest:A,distance:Math.sqrt(u),segment:f}},vJn=(t,e)=\u003esse(t,e).closest,wJn=(t,e,n,o,i,r,s,a)=\u003e3*((a-e)*(n+i)-(s-t)*(o+r)+o*(t-i)-n*(e-r)+a*(i+t/3)-s*(r+e/3))/20,Rpt=t=\u003e{let e=0,n=0,o=0;return OQ(t).map(i=\u003ei[0]===\"M\"?([,e,n]=i,0):(o=wJn(e,n,i[1],i[2],i[3],i[4],i[5],i[6]),[e,n]=i.slice(-2),o)).reduce((i,r)=\u003ei+r,0)},PJn=t=\u003eRpt(OQ(t))\u003e=0,MJn=(t,e)=\u003eI9e(t,e).segment,DJn=(t,e)=\u003esse(t,e).segment,lz=t=\u003eArray.isArray(t)\u0026\u0026t.every(e=\u003e{const n=e[0].toLowerCase();return DF[n]===e.length-1\u0026\u0026\"achlmqstvz\".includes(n)\u0026\u0026e.slice(1).every(Number.isFinite)})\u0026\u0026t.length\u003e0,Tpt=t=\u003elz(t)\u0026\u0026t.every(([e])=\u003ee===e.toUpperCase()),ase=t=\u003eTpt(t)\u0026\u0026t.every(([e])=\u003e\"ACLMQZ\".includes(e)),uz=t=\u003ease(t)\u0026\u0026t.every(([e])=\u003e\"MLVHZ\".includes(e)),NJn=t=\u003ease(t)\u0026\u0026t.every(([e])=\u003e\"MC\".includes(e)),RJn=(t,e)=\u003e{const{distance:n}=sse(t,e);return Math.abs(n)\u003cf9e},TJn=t=\u003elz(t)\u0026\u0026t.slice(1).every(([e])=\u003ee===e.toLowerCase()),kpt=t=\u003e{if(typeof t!=\"string\"||!t.length)return!1;const e=new d9e(t);for(NF(e);e.index\u003ce.max\u0026\u0026!e.err.length;)g9e(e);return!e.err.length\u0026\u0026\"mM\".includes(e.segments[0][0])};function RF(t){const e=[];let[n,o]=[0,0];return Qy(t,i=\u003e{const r=i[0];if(r===\"M\")[n,o]=[i[1],i[2]],e.push([n,o]);else if(r===\"L\")e.push([i[1],i[2]]);else if(r===\"C\")e.push([i[5],i[6]]);else if(r===\"A\")e.push([i[6],i[7]]);else if(r===\"Z\")e.push([n,o]);else throw new TypeError(`${K_}: path command \"${r}\" is not supported`)}),e}const gz={line:[\"x1\",\"y1\",\"x2\",\"y2\"],circle:[\"cx\",\"cy\",\"r\"],ellipse:[\"cx\",\"cy\",\"rx\",\"ry\"],rect:[\"width\",\"height\",\"x\",\"y\",\"rx\",\"ry\"],polygon:[\"points\"],polyline:[\"points\"],glyph:[\"d\"]},Fpt=t=\u003et!=null\u0026\u0026typeof t==\"object\"\u0026\u0026t.nodeType===1,kJn=t=\u003e{let{x1:e,y1:n,x2:o,y2:i}=t;return[e,n,o,i]=[e,n,o,i].map(r=\u003e+r),[[\"M\",e,n],[\"L\",o,i]]},FJn=t=\u003e{const e=[],n=(t.points||\"\").trim().split(/[\\s|,]/).map(i=\u003e+i);let o=0;for(;o\u003cn.length;)e.push([o?\"L\":\"M\",n[o],n[o+1]]),o+=2;return t.type===\"polygon\"?[...e,[\"z\"]]:e},LJn=t=\u003e{let{cx:e,cy:n,r:o}=t;return[e,n,o]=[e,n,o].map(i=\u003e+i),[[\"M\",e-o,n],[\"a\",o,o,0,1,0,2*o,0],[\"a\",o,o,0,1,0,-2*o,0]]},HJn=t=\u003e{let{cx:e,cy:n}=t,o=t.rx||0,i=t.ry||o;return[e,n,o,i]=[e,n,o,i].map(r=\u003e+r),[[\"M\",e-o,n],[\"a\",o,i,0,1,0,2*o,0],[\"a\",o,i,0,1,0,-2*o,0]]},OJn=t=\u003e{const e=+t.x||0,n=+t.y||0,o=+t.width,i=+t.height;let r=+(t.rx||0),s=+(t.ry||r);return r||s?(r*2\u003eo\u0026\u0026(r-=(r*2-o)/2),s*2\u003ei\u0026\u0026(s-=(s*2-i)/2),[[\"M\",e+r,n],[\"h\",o-r*2],[\"s\",r,0,r,s],[\"v\",i-s*2],[\"s\",0,s,-r,s],[\"h\",-o+r*2],[\"s\",-r,0,-r,-s],[\"v\",-i+s*2],[\"s\",0,-s,r,-s]]):[[\"M\",e,n],[\"h\",o],[\"v\",i],[\"H\",e],[\"Z\"]]},Lpt=t=\u003e{const e=Object.keys(gz),n=Fpt(t),o=n?t.tagName:null;if(o\u0026\u0026[...e,\"path\"].every(A=\u003eo!==A))throw TypeError(`${K_}: \"${o}\" is not SVGElement`);const i=n?o:t.type,r=gz[i],s={type:i};n?r.forEach(A=\u003e{s[A]=t.getAttribute(A)}):Object.assign(s,t);let a=[];return i===\"circle\"?a=LJn(s):i===\"ellipse\"?a=HJn(s):[\"polyline\",\"polygon\"].includes(i)?a=FJn(s):i===\"rect\"?a=OJn(s):i===\"line\"?a=kJn(s):[\"glyph\",\"path\"].includes(i)\u0026\u0026(a=lx(n?t.getAttribute(\"d\")||\"\":t.d||\"\")),lz(a)\u0026\u0026a.length?a:!1},GJn=(t,e,n)=\u003e{const o=n||document,i=Object.keys(gz),r=Fpt(t),s=r?t.tagName:null;if(s===\"path\")throw TypeError(`${K_}: \"${s}\" is already SVGPathElement`);if(s\u0026\u0026i.every(d=\u003es!==d))throw TypeError(`${K_}: \"${s}\" is not SVGElement`);const a=o.createElementNS(\"http://www.w3.org/2000/svg\",\"path\"),A=r?s:t.type,c=gz[A],l={type:A},u=FQ.round,g=Lpt(t),h=g\u0026\u0026g.length?m9e(g,u):\"\";if(r){c.forEach(d=\u003e{l[d]=t.getAttribute(d)});for(let d=0;d\u003ct.attributes.length;d++){const p=t.attributes[d];p\u0026\u0026!c.includes(p.name)\u0026\u0026a.setAttribute(p.name,p.value)}}else Object.assign(l,t),Object.keys(l).forEach(d=\u003e{!c.includes(d)\u0026\u0026d!==\"type\"\u0026\u0026a.setAttribute(d.replace(/[A-Z]/g,p=\u003e`-${p.toLowerCase()}`),l[d])});return kpt(h)?(a.setAttribute(\"d\",h),e\u0026\u0026r\u0026\u0026(t.before(a,t),t.remove()),a):!1},C9e=t=\u003e{if(typeof t==\"string\"){const e=t.match(/[Mm]/g);return e?e.length\u003e1:!1}if(lz(t)){let e=0;for(const n of t)if(n[0].toUpperCase()===\"M\"\u0026\u0026(e++,e\u003e1))return!0;return!1}throw new TypeError(K_+\": expected string or PathArray\")};function TF(t){return ase(t)\u0026\u0026t.every(([e])=\u003e\"MLVH\".includes(e))}const y9e=t=\u003et[t.length-1][0].toUpperCase()===\"Z\",Hpt=(t,e,n,o)=\u003e{const[i]=t,{round:r}=FQ,s=r,a=e.slice(1),{x1:A,y1:c,x2:l,y2:u,x:g,y:h}=n,[d,p]=a.slice(-2),m=t;if(\"TQ\".includes(i)||(n.qx=null,n.qy=null),i===\"L\"){if(Qu(g,s)===Qu(d,s))return[\"V\",p];if(Qu(h,s)===Qu(p,s))return[\"H\",d]}else if(i===\"C\"){const[_,f]=a;if(n.x1=_,n.y1=f,\"CS\".includes(o)\u0026\u0026(Qu(_,s)===Qu(A*2-l,s)\u0026\u0026Qu(f,s)===Qu(c*2-u,s)||Qu(A,s)===Qu(l*2-g,s)\u0026\u0026Qu(c,s)===Qu(u*2-h,s)))return[\"S\",a[2],a[3],a[4],a[5]]}else if(i===\"Q\"){const[_,f]=a;if(n.qx=_,n.qy=f,\"QT\".includes(o)\u0026\u0026Qu(_,s)===Qu(A*2-l,s)\u0026\u0026Qu(f,s)===Qu(c*2-u,s))return[\"T\",a[2],a[3]]}return m},Ase=(t,e)=\u003e{const n=t.slice(1).map(o=\u003eQu(o,e));return[t[0]].concat(n)},Opt=(t,e)=\u003e{const n=ose(t),o=typeof e==\"number\"\u0026\u0026e\u003e=0?e:2,i={...rse},r=[];let s=\"M\",a=\"Z\";return Qy(n,(A,c,l,u)=\u003e{i.x=l,i.y=u;const g=ise(A,i);let h=A;if(s=A[0],r[c]=s,c){a=r[c-1];const p=Hpt(A,g,i,a),m=Ase(p,o),_=m.join(\"\"),f=h9e(p,c,l,u),I=Ase(f,o),C=I.join(\"\");h=_.length\u003cC.length?m:I}const d=g.length;return i.x1=+g[d-2],i.y1=+g[d-1],i.x2=+g[d-4]||i.x1,i.y2=+g[d-3]||i.y1,h})},yD=t=\u003e{const e=ose(t),n=j4(e),o=e.length,i=e[o-1][0]===\"Z\",r=Qy(e,(s,a)=\u003e{const A=n[a],c=a\u0026\u0026e[a-1],l=c\u0026\u0026c[0],u=e[a+1],g=u\u0026\u0026u[0],h=s[0],[d,p]=n[a?a-1:o-1].slice(-2);let m=s;switch(h){case\"M\":m=i?[\"Z\"]:[h,d,p];break;case\"A\":m=[h,s[1],s[2],s[3],s[4],s[5]===1?0:1,d,p];break;case\"C\":u\u0026\u0026g===\"S\"?m=[\"S\",s[1],s[2],d,p]:m=[h,s[3],s[4],s[1],s[2],d,p];break;case\"S\":l\u0026\u0026\"CS\".includes(l)\u0026\u0026(!u||g!==\"S\")?m=[\"C\",A[3],A[4],A[1],A[2],d,p]:m=[h,A[1],A[2],d,p];break;case\"Q\":u\u0026\u0026g===\"T\"?m=[\"T\",d,p]:m=[h,s[1],s[2],d,p];break;case\"T\":l\u0026\u0026\"QT\".includes(l)\u0026\u0026(!u||g!==\"T\")?m=[\"Q\",A[1],A[2],d,p]:m=[h,d,p];break;case\"Z\":m=[\"M\",d,p];break;case\"H\":m=[h,d];break;case\"V\":m=[h,p];break;default:m=[h].concat(s.slice(1,-2),d,p)}return m});return i?r.reverse():[r[0]].concat(r.slice(1).reverse())},cse=t=\u003e{const e=[],n=lx(t);let o=[],i=-1,r=0,s=0,a=0,A=0;return Qy(n,(c,l,u,g)=\u003e{const h=c[0],d=h.toUpperCase(),p=h===h.toLowerCase(),m=c.slice(1);d===\"M\"?(i+=1,[r,s]=m,r+=p?u:0,s+=p?g:0,a=r,A=s,o=[p?[d,a,A]:c]):(d===\"Z\"?(r=a,s=A):d===\"H\"?([,r]=c,r+=p?u:0):d===\"V\"?([,s]=c,s+=p?g:0):([r,s]=c.slice(-2),r+=p?u:0,s+=p?g:0),o.push(c)),e[i]=o}),e},Gpt=t=\u003e{let e=new Sy;const{origin:n}=t,[o,i]=n,{translate:r}=t,{rotate:s}=t,{skew:a}=t,{scale:A}=t;return Array.isArray(r)\u0026\u0026r.length\u003e=2\u0026\u0026r.every(c=\u003e!Number.isNaN(+c))\u0026\u0026r.some(c=\u003ec!==0)?e=e.translate(...r):typeof r==\"number\"\u0026\u0026!Number.isNaN(r)\u0026\u0026(e=e.translate(r)),(s||a||A)\u0026\u0026(e=e.translate(o,i),Array.isArray(s)\u0026\u0026s.length\u003e=2\u0026\u0026s.every(c=\u003e!Number.isNaN(+c))\u0026\u0026s.some(c=\u003ec!==0)?e=e.rotate(...s):typeof s==\"number\"\u0026\u0026!Number.isNaN(s)\u0026\u0026(e=e.rotate(s)),Array.isArray(a)\u0026\u0026a.length===2\u0026\u0026a.every(c=\u003e!Number.isNaN(+c))\u0026\u0026a.some(c=\u003ec!==0)?(e=a[0]?e.skewX(a[0]):e,e=a[1]?e.skewY(a[1]):e):typeof a==\"number\"\u0026\u0026!Number.isNaN(a)\u0026\u0026(e=e.skewX(a)),Array.isArray(A)\u0026\u0026A.length\u003e=2\u0026\u0026A.every(c=\u003e!Number.isNaN(+c))\u0026\u0026A.some(c=\u003ec!==1)?e=e.scale(...A):typeof A==\"number\"\u0026\u0026!Number.isNaN(A)\u0026\u0026(e=e.scale(A)),e=e.translate(-o,-i)),e},YJn=(t,e)=\u003e{if(t.is2D)return[t.a*e[0]+t.c*e[1]+t.e*e[3],t.b*e[0]+t.d*e[1]+t.f*e[3],0,1];let n=Sy.Translate(e[0],e[1],e[2]);return[,,,n.m44]=e,n=t.multiply(n),[n.m41,n.m42,n.m43,n.m44]},x9e=(t,e,n)=\u003e{const[o,i,r]=n,[s,a,A]=YJn(t,[e[0],e[1],0,1]),c=s-o,l=a-i,u=A-r;return[c*(Math.abs(r)/Math.abs(u)||1)+o,l*(Math.abs(r)/Math.abs(u)||1)+i]},UJn=(t,e,n,o,i,r,s,a,A)=\u003e{const c=[];let l=0,u=0,g=0,h=0,d=0,p=0,m=0,_=0;for(let f=0,I=t.length;f\u003cI;f+=1){const C=t[f],y=C[0],x=y.charCodeAt(0),E=x\u003e=97,B=E?String.fromCharCode(x-32):y,S=f===0\u0026\u0026E?y:B;if(B===\"Z\"){c.push([\"Z\"]),d=m,p=_;continue}if(B===\"V\"){const Q=C[1]+(E?p:0);g=e*d+o*Q+r-a+a,h=n*d+i*Q+s-A+A,l!==g\u0026\u0026u!==h?c.push([\"L\",g,h]):u===h?c.push([\"H\",g]):l===g?c.push([\"V\",h]):c.push([\"L\",d,Q]),p=Q,l=g,u=h;continue}if(B===\"H\"){const Q=C[1]+(E?d:0);g=e*Q+o*p+r-a+a,h=n*Q+i*p+s-A+A,l!==g\u0026\u0026u!==h?c.push([\"L\",g,h]):u===h?c.push([\"H\",g]):l===g?c.push([\"V\",h]):c.push([\"L\",Q,p]),d=Q,l=g,u=h;continue}if(B===\"A\"){const Q=C[6]+(E?d:0),w=C[7]+(E?p:0),M=Az(d,p,C[1],C[2],C[3],C[4],C[5],Q,w),k=M.length;let R=0;if(k\u003e0)do{const F=[\"C\"],O=R+6;for(let U=R;U\u003cO;U+=2)g=e*M[U]+o*M[U+1]+r-a+a,h=n*M[U]+i*M[U+1]+s-A+A,F.push(g,h);c.push(F),R=O}while(R\u003ck);else c.push([\"C\"]);k\u003e0?(d=M[k-2],p=M[k-1]):(d=Q,p=w),l=g,u=h;continue}if(B===\"L\"){const Q=C[1]+(E?d:0),w=C[2]+(E?p:0);g=e*Q+o*w+r-a+a,h=n*Q+i*w+s-A+A,l!==g\u0026\u0026u!==h?c.push([\"L\",g,h]):u===h?c.push([\"H\",g]):l===g?c.push([\"V\",h]):c.push([\"L\",Q,w]),d=Q,p=w,l=g,u=h;continue}{const Q=[S],w=C.length;for(let M=1;M\u003cw;M+=2){const k=C[M]+(E?d:0),R=C[M+1]+(E?p:0);g=e*k+o*R+r-a+a,h=n*k+i*R+s-A+A,Q.push(g,h)}c.push(Q),d=C[w-2]+(E?d:0),p=C[w-1]+(E?p:0),B===\"M\"\u0026\u0026(m=d,_=p),l=g,u=h}}return c},Ypt=(t,e)=\u003e{const n=lx(t),o=e\u0026\u0026Object.keys(e);if(!e||o\u0026\u0026!o.length)return n.slice(0);e.origin||Object.assign(e,{origin:FQ.origin});const i=e.origin,r=Gpt(e);if(r.isIdentity)return n.slice(0);if(r.is2D)return UJn(n,r.a,r.b,r.c,r.d,r.e,r.f,i[0],i[1]);let s=0,a=0,A=0,c=0,l=0,u=0;return Qy(n,(g,h,d,p)=\u003e{const[m]=g,_=m.toUpperCase(),f=_!==m?az(g,h,d,p):g.slice(0);let I=_===\"A\"?[\"C\"].concat(Az(d,p,f[1],f[2],f[3],f[4],f[5],f[6],f[7])):_===\"V\"?[\"L\",d,f[1]]:_===\"H\"?[\"L\",f[1],p]:f;if(I[0]===\"C\"\u0026\u0026I.length\u003e7){const C=I.slice(0,7);n.splice(h+1,0,[\"C\"].concat(I.slice(7))),I=C}if(I[0]===\"L\")[A,c]=x9e(r,[I[1],I[2]],i),s!==A\u0026\u0026a!==c?I=[\"L\",A,c]:a===c?I=[\"H\",A]:s===A\u0026\u0026(I=[\"V\",c]);else for(l=1,u=I.length;l\u003cu;l+=2)[A,c]=x9e(r,[+I[l],+I[l+1]],i),I[l]=A,I[l+1]=c;return s=A,a=c,I})},KJn=t=\u003e{const e=t.slice(1).map((n,o,i)=\u003eo?i[o-1].slice(-2).concat(n.slice(1)):t[0].slice(1).concat(n.slice(1))).map(n=\u003en.map((o,i)=\u003en[n.length-i-2*(1-i%2)])).reverse();return[[\"M\"].concat(e[0].slice(0,2))].concat(e.map(n=\u003e[\"C\"].concat(n.slice(2))))},E9e=(t,e)=\u003e{let{round:n}=FQ;return n=e===\"off\"||typeof e==\"number\"\u0026\u0026e\u003e=0?e:typeof n==\"number\"\u0026\u0026n\u003e=0?n:\"off\",n===\"off\"?t.slice(0):Qy(t,o=\u003eAse(o,n))},B9e=t=\u003e{const e=lx(t);if(y9e(e)){const n=j4(e),o=e.length,i=o-2,[r,s]=n[0].slice(1),[a,A]=n[i].slice(-2);r===a\u0026\u0026s===A\u0026\u0026e.splice(o-1,1)}};function Upt(t,e,n,o,i,r,s,a,A){const[c,l]=j9([t,e],[n,o],A),[u,g]=j9([n,o],[i,r],A),[h,d]=j9([i,r],[s,a],A),[p,m]=j9([c,l],[u,g],A),[_,f]=j9([u,g],[h,d],A),[I,C]=j9([p,m],[_,f],A);return[[t,e,c,l,p,m,I,C],[I,C,_,f,h,d,s,a]]}const Kpt=t=\u003e{const e=j4(t);if(!uz(e)\u0026\u0026!TF(e))throw TypeError(`${K_}: pathValue is not a polyline/polygon`);if(!y9e(e))return e;const n=[e[0]],[o,i]=e[0].slice(1);for(let r=1;r\u003ce.length;r++){const s=e[r];s[0].toUpperCase()===\"Z\"?n.push([\"L\",o,i]):n.push(s)}return n};function VJn(t,e,n,o,i){if(i\u003c=1)return[[t,e,n,o]];const r=[],s=n-t,a=o-e;let A=t,c=e,l=0;for(;l\u003ci;){const u=1/(i-l),g=t+u*s,h=e+u*a;r.push([A,c,g,h]),A=g,c=h,l++}return r}function Vpt(t,e){if(e\u003c=1)throw new TypeError(`${K_}: target must be \u003e= 2`);const n=L8(t);if(n===0)return Array(t.length).fill(1);const o=n/e,i=TF(t),r=[1],s=[0];Qy(t,(c,l,u,g)=\u003e{if(l\u003e0){const[h,d]=c.slice(-2),p=i?PF(u,g,h,d):CD(u,g,c[1],c[2],c[3],c[4],c[5],c[6]);s.push(p),r.push(1)}});let a=1;for(let c=1;c\u003cs.length;c++){const l=s[c],u=l\u003eo?Math.round(l/o):1;r[c]=u,a+=u}let A=e-a;if(A!==0){const c=[];for(let u=1;u\u003cs.length;u++)s[u]\u003e0\u0026\u0026c.push([u,s[u]]);const l=c.length;if(A\u003c0){c.sort((u,g)=\u003eu[1]-g[1]);for(let u=0;u\u003cl;u++){const g=c[u][0];if(r[g]\u003e1\u0026\u0026c[u][1]\u003e0\u0026\u0026(r[g]--,A++),A===0)break;u===l-1\u0026\u0026(u=0)}}else if(A\u003e0){c.sort((u,g)=\u003eg[1]-u[1]);for(let u=0;u\u003cl;u++){const g=c[u][0];if(c[u][1]\u003e0\u0026\u0026(r[g]++,A--),A===0)break;u===l-1\u0026\u0026(u=0)}}}return r}function zpt(t,e){if(t.length\u003c2||e\u003c=1)return t;const n=Vpt(t,e),o=[t[0]],i=t.length;let r=t[0][1],s=t[0][2];for(let a=1;a\u003ci;a++){const[A,c]=t[a].slice(1),l=n[a];if(l\u003e=1){const u=VJn(r,s,A,c,l);for(const g of u)o.push([\"L\",g[2],g[3]])}r=A,s=c}return o.length!==e\u0026\u0026console.warn(`${K_}: requested ${e} segments, got ${o.length}. Adjusted on last segment.`),o}function zJn(t,e,n,o,i,r,s,a,A){if(A\u003c=1)return[[t,e,n,o,i,r,s,a]];const c=[];let l=t,u=e,g=n,h=o,d=i,p=r,m=s,_=a,f=0;for(;f\u003cA;){const I=1/(A-f),[C,y]=Upt(l,u,g,h,d,p,m,_,I);c.push(C),[l,u,g,h,d,p,m,_]=y,f++}return c}function Jpt(t,e){if(t.length\u003c2||e\u003c=1)return t;const n=Vpt(t,e),o=[t[0]],i=t.length;let r=t[0][1],s=t[0][2];for(let a=1;a\u003ci;a++){const A=t[a],[c,l]=A.slice(-2),u=n[a];if(u\u003e=1){const g=zJn(r,s,A[1],A[2],A[3],A[4],A[5],A[6],u);for(const h of g)o.push([\"C\",h[2],h[3],h[4],h[5],h[6],h[7]])}r=c,s=l}return o.length!==e\u0026\u0026console.warn(`${K_}: requested ${e} segments, got ${o.length}.`),o}function JJn(t){const e=t.length,n=e-1;let o;const i=[];for(let r=0;r\u003ce;r++){o=[];for(let s=0;s\u003ce;s++){let a=r+s,A;if(s===0||t[a]\u0026\u0026t[a][0]===\"M\"){A=t[a],o.push([\"M\",...A.slice(-2)]);continue}a\u003e=e\u0026\u0026(a-=n),o.push(t[a])}i.push(o)}return i}function WJn(t,e,n){const o=n||JJn(t);if(t.length!==e.length)throw new TypeError(K_+\": paths must have the same number of segments after equalization\");let i=0,r=1/0;for(let s=0;s\u003co.length;s++){const a=o[s],A=a.length;let c=0;for(let l=0;l\u003cA;l++){const u=a[l],g=e[l],h=u.slice(-2),d=g.slice(-2),p=h[0]-d[0],m=h[1]-d[1];c+=p*p+m*m}c\u003cr\u0026\u0026(r=c,i=s)}return o[i]}const jJn={mode:\"auto\",sampleSize:10,roundValues:4,reverse:!0,close:!1,target:void 0},b9e=(t,e,n={})=\u003e{const{close:o,mode:i,reverse:r,roundValues:s,target:a}=Object.assign(jJn,n);let A=j4(t),c=j4(e);B9e(A),B9e(c);let l=(uz(A)||TF(A))\u0026\u0026(uz(c)||TF(c));l\u0026\u0026i===\"auto\"?(A=Kpt(A),c=Kpt(c)):(l=!1,A=OQ(A),c=OQ(c));const u=MF(RF(A)),g=MF(RF(c));r!==!1\u0026\u0026Math.sign(u)!==Math.sign(g)\u0026\u0026(c=yD(c));const h=A.length,d=c.length,p=Math.max(h,d);let m=p;if(typeof a!=\"number\"){const I=(L8(A)+L8(c))/2,C=I/Math.max(h,d),y=Math.max(p,Math.round(I/Math.max(C,1)));m=Math.min(y,Math.max(h,d)*3)}else a\u003e=p?m=a:console.warn('equalizeSegments \"target\" option: '+a+\", expected \u003e= \"+p);let _=A,f=c;return l?(_=zpt(A,m),f=zpt(c,m)):(_=Jpt(A,m),f=Jpt(c,m)),f=WJn(f,_),typeof s==\"number\"\u0026\u0026s!==4\u0026\u0026(_=E9e(_,s),f=E9e(f,s)),o\u0026\u0026(_.push([\"Z\"]),f.push([\"Z\"])),[_,f]},$4=(t,[e,n])=\u003e{const[o,i,r,s]=t;return e\u003e=o\u0026\u0026e\u003c=r\u0026\u0026n\u003e=i\u0026\u0026n\u003c=s},S9e=(t,e)=\u003e{const[n,o,i,r]=t,[s,a,A,c]=e;return $4(e,[n,o])||$4(e,[i,o])||$4(e,[n,r])||$4(e,[i,r])||$4(t,[s,a])||$4(t,[A,a])||$4(t,[s,c])||$4(t,[A,c])||(n\u003cA\u0026\u0026n\u003es||s\u003ci\u0026\u0026s\u003en)\u0026\u0026(o\u003cc\u0026\u0026o\u003ea||a\u003cr\u0026\u0026a\u003eo)},Wpt=([t,e])=\u003e[[\"M\",t,e],[\"L\",t+.001,e],[\"L\",t+.001,e+.001],[\"L\",t,e+.001],[\"L\",t,e],[\"Z\"]];function $Jn(t,e){const n=t.bbox,o=[];for(let r=0;r\u003ce.length;r++){const{bbox:s,size:a}=e[r],A=n.cx-s.cx,c=n.cy-s.cy,l=Math.sqrt(A*A+c*c),u=Math.abs(t.size-a)/Math.max(t.size,a,1e-6),g=$4([n.x,n.y,n.x2,n.y2],[s.cx,s.cy])||$4([s.x,s.y,s.x2,s.y2],[n.cx,n.cy]),h=S9e([n.x,n.y,n.x2,n.y2],[s.x,s.y,s.x2,s.y2]);o.push({index:r,hasOverlap:g,boxIntersect:h,sizeDifference:u,centeredDistance:l})}const i=o.filter(r=\u003er.hasOverlap\u0026\u0026r.boxIntersect);if(i.length\u003e0){let r=i[0];for(let s=1;s\u003ci.length;s++)i[s].centeredDistance\u003cr.centeredDistance\u0026\u0026(r=i[s]);return e.splice(r.index,1)[0]}return null}function jpt(t,e){const n=[];for(t.sort((o,i)=\u003ei.size-o.size),e.sort((o,i)=\u003ei.size-o.size);t.length\u003e0;){const o=t.shift(),i=$Jn(o,e);if(i)n.push([o.path,i.path]);else{const r=[o.bbox.cx,o.bbox.cy];n.push([o.path,Wpt(r)])}}for(;e.length\u003e0;){const o=e.shift(),i=[o.bbox.cx,o.bbox.cy];n.push([Wpt(i),o.path])}return n}const $pt=t=\u003e{const e=[],n=[];for(const o of t){const i=MF(RF(o)),r=_9e(o),s={isPoly:uz(o)||TF(o),size:r.width*r.height,path:o,signedArea:i,area:Math.abs(i),bbox:r};i\u003e0?e.push(s):n.push(s)}return{outers:e,inners:n}},qJn={mode:\"auto\",roundValues:4,close:!1,sampleSize:10},XJn=(t,e,n={})=\u003e{const o=Object.assign(qJn,n),i=j4(t),r=j4(e),s=C9e(i),a=C9e(r);if(!s\u0026\u0026!a)return b9e(i,r,o);const A=MF(RF(i)),c=MF(RF(r));let l=i,u=r;Math.sign(A)\u003c0\u0026\u0026(l=yD(l)),Math.sign(c)\u003c0\u0026\u0026(u=yD(u));const g=cse(l),h=cse(u),{outers:d,inners:p}=$pt(g),{outers:m,inners:_}=$pt(h),f=jpt(d,m),I=jpt(p,_),C=[];for(const[y,x]of[...f,...I]){const[E,B]=b9e(y,x,{...o,reverse:!1});C.push([E,B])}return[C.map(y=\u003ey[0]).flat(),C.map(y=\u003ey[1]).flat()]},ZJn=(t,e,n,o,i,r,s,a)=\u003e{if(Math.max(t,n)\u003cMath.min(i,s)||Math.min(t,n)\u003eMath.max(i,s)||Math.max(e,o)\u003cMath.min(r,a)||Math.min(e,o)\u003eMath.max(r,a))return;const A=(t*o-e*n)*(i-s)-(t-n)*(i*a-r*s),c=(t*o-e*n)*(r-a)-(e-o)*(i*a-r*s),l=(t-n)*(r-a)-(e-o)*(i-s);if(!l)return;const u=A/l,g=c/l,h=Qu(u,2),d=Qu(g,2);if(!(h\u003cQu(Math.min(t,n),2)||h\u003eQu(Math.max(t,n),2)||h\u003cQu(Math.min(i,s),2)||h\u003eQu(Math.max(i,s),2)||d\u003cQu(Math.min(e,o),2)||d\u003eQu(Math.max(e,o),2)||d\u003cQu(Math.min(r,a),2)||d\u003eQu(Math.max(r,a),2)))return{x:u,y:g}},eWn=(t,e,n)=\u003e{const o=rz(...t),i=rz(...e),{justCount:r,epsilon:s}=Object.assign({justCount:!0,epsilon:f9e},n);if(!S9e(o,i))return r?0:[];const a=CD(...t),A=CD(...e),c=Math.max(a/5\u003e\u003e0,1),l=Math.max(A/5\u003e\u003e0,1),u=[],g=[],h={};let d=r?0:[];for(let p=0;p\u003cc+1;p++){const m=tse(...t,p/c*a);u.push({x:m.x,y:m.y,t:p/c})}for(let p=0;p\u003cl+1;p++){const m=tse(...e,p/l*A);g.push({x:m.x,y:m.y,t:p/l})}for(let p=0;p\u003cc;p++)for(let m=0;m\u003cl;m++){const _=1+s,f=u[p],I=u[p+1],C=g[m],y=g[m+1],x=Math.abs(I.x-f.x)\u003c.001?\"y\":\"x\",E=Math.abs(y.x-C.x)\u003c.001?\"y\":\"x\",B=ZJn(f.x,f.y,I.x,I.y,C.x,C.y,y.x,y.y);if(B){if(h[B.x.toFixed(4)]==B.y.toFixed(4))continue;h[B.x.toFixed(4)]=B.y.toFixed(4);const S=f.t+Math.abs((B[x]-f[x])/(I[x]-f[x]))*(I.t-f.t),Q=C.t+Math.abs((B[E]-C[E])/(y[E]-C[E]))*(y.t-C.t);S\u003e=0\u0026\u0026S\u003c=_\u0026\u0026Q\u003e=0\u0026\u0026Q\u003c=_\u0026\u0026(r?d++:d.push({x:B.x,y:B.y,t1:Math.min(S,1),t2:Math.min(Q,1)}))}}return d},tWn=(t,e,n=!0)=\u003e{const o=OQ(t),i=OQ(e);let r=0,s=0,a=0,A=0,c=0,l=0,u=0,g=0,h=[r,s,r,s,c,l,c,l],d=[a,A,a,A,u,g,u,g],p=0;const m=[],_=o.length,f=i.length;for(let I=0;I\u003c_;I++){const C=o[I];if(C[0]==\"M\")r=C[1],s=C[2],c=r,l=s;else{C[0]==\"C\"?(h=[r,s,C[1],C[2],C[3],C[4],C[5],C[6]],r=h[6],s=h[7]):(h=[r,s,r,s,c,l,c,l],r=c,s=l);for(let y=0;y\u003cf;y++){const x=i[y];x[0]==\"M\"?(a=x[1],A=x[2],u=a,g=A):x[0]==\"C\"\u0026\u0026(d=[a,A,x[1],x[2],x[3],x[4],x[5],x[6]],a=d[6],A=d[7]);const E=eWn(h,d,{justCount:n});n?p+=E:m.push(...E)}}}return n?p:m};var nWn=class{constructor(t,e){const n=e||{},o=typeof t\u003e\"u\";if(o||!t.length)throw TypeError(`${K_}: \"pathValue\" is ${o?\"undefined\":\"empty\"}`);this.segments=lx(t);const{round:i,origin:r}=n;let s;Number.isInteger(i)||i===\"off\"?s=i:s=FQ.round;let a=FQ.origin;if(Array.isArray(r)\u0026\u0026r.length\u003e=2){const[A,c,l]=r.map(Number);a=[Number.isNaN(A)?0:A,Number.isNaN(c)?0:c,Number.isNaN(l)?0:l]}return this.round=s,this.origin=a,this}get bbox(){return _9e(this.segments)}get length(){return L8(this.segments)}getBBox(){return this.bbox}getTotalLength(){return this.length}getPointAtLength(t){return cz(this.segments,t)}toAbsolute(){const{segments:t}=this;return this.segments=ose(t),this}toRelative(){const{segments:t}=this;return this.segments=Mpt(t),this}toCurve(){const{segments:t}=this;return this.segments=OQ(t),this}reverse(t){const{segments:e}=this,n=cse(e),o=n.length\u003e1?n:!1,i=o?o.map((s,a)=\u003et?a?yD(s):s.slice(0):yD(s)):e.slice(0);let r=[];return o?r=i.flat(1):r=t?e:yD(e),this.segments=r.slice(0),this}normalize(){const{segments:t}=this;return this.segments=j4(t),this}optimize(){const{segments:t}=this,e=this.round===\"off\"?2:this.round;return this.segments=Opt(t,e),this}transform(t){if(!t||typeof t!=\"object\"||typeof t==\"object\"\u0026\u0026![\"translate\",\"rotate\",\"skew\",\"scale\"].some(a=\u003ea in t))return this;const{segments:e,origin:[n,o,i]}=this,r={};for(const[a,A]of Object.entries(t))a===\"skew\"\u0026\u0026Array.isArray(A)||(a===\"rotate\"||a===\"translate\"||a===\"origin\"||a===\"scale\")\u0026\u0026Array.isArray(A)?r[a]=A.map(Number):a!==\"origin\"\u0026\u0026typeof Number(A)==\"number\"\u0026\u0026(r[a]=Number(A));const{origin:s}=r;if(Array.isArray(s)\u0026\u0026s.length\u003e=2){const[a,A,c]=s.map(Number);r.origin=[Number.isNaN(a)?n:a,Number.isNaN(A)?o:A,c||i]}else r.origin=[n,o,i];return this.segments=Ypt(e,r),this}flipX(){const{cx:t,cy:e}=this.bbox;return this.transform({rotate:[0,180,0],origin:[t,e,0]}),this}flipY(){const{cx:t,cy:e}=this.bbox;return this.transform({rotate:[180,0,0],origin:[t,e,0]}),this}toString(){return m9e(this.segments,this.round)}dispose(){Object.keys(this).forEach(t=\u003edelete this[t])}static options=FQ;static CSSMatrix=Sy;static arcTools=EJn;static bezierTools=yJn;static cubicTools=BJn;static lineTools=fJn;static polygonTools=SJn;static quadTools=bJn;static pathToAbsolute=ose;static pathToRelative=Mpt;static pathToCurve=OQ;static pathToString=m9e;static distanceSquareRoot=Vre;static midPoint=j9;static rotateVector=sz;static roundTo=Qu;static parsePathString=lx;static finalizeSegment=u9e;static invalidPathValue=HQ;static isArcCommand=wpt;static isDigit=LQ;static isDigitStart=vpt;static isMoveCommand=Ppt;static isPathCommand=Qpt;static isSpace=Spt;static paramsCount=DF;static paramsParser=rse;static PathParser=d9e;static scanFlag=Bpt;static scanParam=bpt;static scanSegment=g9e;static skipSpaces=NF;static distanceEpsilon=f9e;static fixPath=B9e;static getClosestPoint=vJn;static getDrawDirection=PJn;static getPathArea=Rpt;static getPathBBox=_9e;static getPointAtLength=cz;static getPropertiesAtLength=I9e;static getPropertiesAtPoint=sse;static getSegmentAtLength=MJn;static getSegmentOfPoint=DJn;static getTotalLength=L8;static isAbsoluteArray=Tpt;static isCurveArray=NJn;static isPolygonArray=uz;static isNormalizedArray=ase;static isPathArray=lz;static isPointInStroke=RJn;static isRelativeArray=TJn;static isValidPath=kpt;static samplePolygon=RF;static shapeParams=gz;static shapeToPath=GJn;static shapeToPathArray=Lpt;static absolutizeSegment=az;static arcToCubic=Az;static getSVGMatrix=Gpt;static iterate=Qy;static lineToCubic=p9e;static normalizePath=j4;static normalizeSegment=ise;static optimizePath=Opt;static projection2d=x9e;static quadToCubic=Dpt;static relativizeSegment=h9e;static reverseCurve=KJn;static reversePath=yD;static roundPath=E9e;static roundSegment=Ase;static segmentToCubic=Npt;static shortenSegment=Hpt;static splitPath=cse;static equalizePaths=XJn;static equalizeSegments=b9e;static splitCubicSegment=Upt;static transformPath=Ypt;static isPointInsideBBox=$4;static pathsIntersection=tWn;static boundingBoxIntersect=S9e;static isMultiPath=C9e;static isClosedPath=y9e;static isPolylineArray=TF;static version=_Jn},lse=nWn;function kF(){return new Q9e}class Q9e{index={};array=[];size(){return this.array.length}empty(){return this.array.length===0}itemAt(e){return this.array[e]}contains(e){return this.index[e.id()]!==void 0}find(e){const n=this.index[e.id()];return n===void 0?void 0:this.array[n]}setDefault(e,n){const o=this.index[e.id()];if(o===void 0){const i=new use(e,n());return this.index[e.id()]=this.array.length,this.array.push(i),i}else return this.array[o]}insert(e,n){const o=new use(e,n),i=this.index[e.id()];return i===void 0?(this.index[e.id()]=this.array.length,this.array.push(o)):this.array[i]=o,o}erase(e){const n=this.index[e.id()];if(n===void 0)return;this.index[e.id()]=void 0;const o=this.array[n],i=this.array.pop();return o!==i\u0026\u0026(this.array[n]=i,this.index[i.first.id()]=n),o}copy(){const e=new Q9e;for(let n=0;n\u003cthis.array.length;n++){const o=this.array[n].copy();e.array[n]=o,e.index[o.first.id()]=n}return e}}class use{first;second;constructor(e,n){this.first=e,this.second=n}copy(){return new use(this.first,this.second)}}class gse{constructor(e=\"\"){this._name=e}id(){return this._id}name(){return this._name}setName(e){this._name=e}context(){return this._context}setContext(e){this._context=e}value(){return this._value}setValue(e){this._value=e}plus(e){return new Gh(this,e)}minus(e){return new Gh(this,typeof e==\"number\"?-e:[-1,e])}multiply(e){return new Gh([e,this])}divide(e){return new Gh([1/e,this])}toJSON(){return{name:this._name,value:this._value}}toString(){return this._context+\"[\"+this._name+\":\"+this._value+\"]\"}_name;_value=0;_context=null;_id=oWn++}let oWn=0;class Gh{constructor(){let e=iWn(arguments);this._terms=e.terms,this._constant=e.constant}terms(){return this._terms}constant(){return this._constant}value(){let e=this._constant;for(let n=0,o=this._terms.size();n\u003co;n++){let i=this._terms.itemAt(n);e+=i.first.value()*i.second}return e}plus(e){return new Gh(this,e)}minus(e){return new Gh(this,typeof e==\"number\"?-e:[-1,e])}multiply(e){return new Gh([e,this])}divide(e){return new Gh([1/e,this])}isConstant(){return this._terms.size()==0}toString(){let e=this._terms.array.map(function(n){return n.second+\"*\"+n.first.toString()}).join(\" + \");return!this.isConstant()\u0026\u0026this._constant!==0\u0026\u0026(e+=\" + \"),e+=this._constant,e}_terms;_constant}function iWn(t){let e=0,n=()=\u003e0,o=kF();for(let i=0,r=t.length;i\u003cr;++i){let s=t[i];if(typeof s==\"number\")e+=s;else if(s instanceof gse)o.setDefault(s,n).second+=1;else if(s instanceof Gh){e+=s.constant();let a=s.terms();for(let A=0,c=a.size();A\u003cc;A++){let l=a.itemAt(A);o.setDefault(l.first,n).second+=l.second}}else if(s instanceof Array){if(s.length!==2)throw new Error(\"array must have length 2\");let a=s[0],A=s[1];if(typeof a!=\"number\")throw new Error(\"array item 0 must be a number\");if(A instanceof gse)o.setDefault(A,n).second+=a;else if(A instanceof Gh){e+=A.constant()*a;let c=A.terms();for(let l=0,u=c.size();l\u003cu;l++){let g=c.itemAt(l);o.setDefault(g.first,n).second+=g.second*a}}else throw new Error(\"array item 1 must be a variable or expression\")}else throw new Error(\"invalid Expression argument: \"+s)}return{terms:o,constant:e}}class wg{static create(e,n,o,i=1){let r=0;return r+=Math.max(0,Math.min(1e3,e*i))*1e6,r+=Math.max(0,Math.min(1e3,n*i))*1e3,r+=Math.max(0,Math.min(1e3,o*i)),r}static required=wg.create(1e3,1e3,1e3);static strong=wg.create(1,0,0);static medium=wg.create(0,1,0);static weak=wg.create(0,0,1);static clip(e){return Math.max(0,Math.min(wg.required,e))}}var V_;(function(t){t[t.Le=0]=\"Le\",t[t.Ge=1]=\"Ge\",t[t.Eq=2]=\"Eq\"})(V_||(V_={}));class ux{constructor(e,n,o,i=wg.required){this._operator=n,this._strength=wg.clip(i),o===void 0\u0026\u0026e instanceof Gh?this._expression=e:this._expression=e.minus(o)}id(){return this._id}expression(){return this._expression}op(){return this._operator}strength(){return this._strength}toString(){return this._expression.toString()+\" \"+[\"\u003c=\",\"\u003e=\",\"=\"][this._operator]+\" 0 (\"+this._strength.toString()+\")\"}_expression;_operator;_strength;_id=rWn++}let rWn=0;class qpt{maxIterations=1e3;constructor(){}createConstraint(e,n,o,i=wg.required){let r=new ux(e,n,o,i);return this.addConstraint(r),r}addConstraint(e){if(this._cnMap.find(e)!==void 0)throw new Error(\"duplicate constraint\");let o=this._createRow(e),i=o.row,r=o.tag,s=this._chooseSubject(i,r);if(s.type()===Rl.Invalid\u0026\u0026i.allDummies())if(dse(i.constant()))s=r.marker;else throw new Error(\"unsatisfiable constraint\");if(s.type()===Rl.Invalid){if(!this._addWithArtificialVariable(i))throw new Error(\"unsatisfiable constraint\")}else i.solveFor(s),this._substitute(s,i),this._rowMap.insert(s,i);this._cnMap.insert(e,r),this._optimize(this._objective)}removeConstraint(e){let n=this._cnMap.erase(e);if(n===void 0)throw new Error(\"unknown constraint\");this._removeConstraintEffects(e,n.second);let o=n.second.marker,i=this._rowMap.erase(o);if(i===void 0){let r=this._getMarkerLeavingSymbol(o);if(r.type()===Rl.Invalid)throw new Error(\"failed to find leaving row\");i=this._rowMap.erase(r),i.second.solveForEx(r,o),this._substitute(o,i.second)}this._optimize(this._objective)}hasConstraint(e){return this._cnMap.contains(e)}getConstraints(){return this._cnMap.array.map(({first:e})=\u003ee)}addEditVariable(e,n){if(this._editMap.find(e)!==void 0)throw new Error(\"duplicate edit variable\");if(n=wg.clip(n),n===wg.required)throw new Error(\"bad required strength\");let i=new Gh(e),r=new ux(i,V_.Eq,void 0,n);this.addConstraint(r);let a={tag:this._cnMap.find(r).second,constraint:r,constant:0};this._editMap.insert(e,a)}removeEditVariable(e){let n=this._editMap.erase(e);if(n===void 0)throw new Error(\"unknown edit variable\");this.removeConstraint(n.second.constraint)}hasEditVariable(e){return this._editMap.contains(e)}suggestValue(e,n){let o=this._editMap.find(e);if(o===void 0)throw new Error(\"unknown edit variable\");let i=this._rowMap,r=o.second,s=n-r.constant;r.constant=n;let a=r.tag.marker,A=i.find(a);if(A!==void 0){A.second.add(-s)\u003c0\u0026\u0026this._infeasibleRows.push(a),this._dualOptimize();return}let c=r.tag.other;if(A=i.find(c),A!==void 0){A.second.add(s)\u003c0\u0026\u0026this._infeasibleRows.push(c),this._dualOptimize();return}for(let l=0,u=i.size();l\u003cu;++l){let g=i.itemAt(l),h=g.second,d=h.coefficientFor(a);d!==0\u0026\u0026h.add(s*d)\u003c0\u0026\u0026g.first.type()!==Rl.External\u0026\u0026this._infeasibleRows.push(g.first)}this._dualOptimize()}updateVariables(){let e=this._varMap,n=this._rowMap;for(let o=0,i=e.size();o\u003ci;++o){let r=e.itemAt(o),s=n.find(r.second);s!==void 0?r.first.setValue(s.second.constant()):r.first.setValue(0)}}_getVarSymbol(e){let n=()=\u003ethis._makeSymbol(Rl.External);return this._varMap.setDefault(e,n).second}_createRow(e){let n=e.expression(),o=new hse(n.constant()),i=n.terms();for(let A=0,c=i.size();A\u003cc;++A){let l=i.itemAt(A);if(!dse(l.second)){let u=this._getVarSymbol(l.first),g=this._rowMap.find(u);g!==void 0?o.insertRow(g.second,l.second):o.insertSymbol(u,l.second)}}let r=this._objective,s=e.strength(),a={marker:GQ,other:GQ};switch(e.op()){case V_.Le:case V_.Ge:{let A=e.op()===V_.Le?1:-1,c=this._makeSymbol(Rl.Slack);if(a.marker=c,o.insertSymbol(c,A),s\u003cwg.required){let l=this._makeSymbol(Rl.Error);a.other=l,o.insertSymbol(l,-A),r.insertSymbol(l,s)}break}case V_.Eq:{if(s\u003cwg.required){let A=this._makeSymbol(Rl.Error),c=this._makeSymbol(Rl.Error);a.marker=A,a.other=c,o.insertSymbol(A,-1),o.insertSymbol(c,1),r.insertSymbol(A,s),r.insertSymbol(c,s)}else{let A=this._makeSymbol(Rl.Dummy);a.marker=A,o.insertSymbol(A)}break}}return o.constant()\u003c0\u0026\u0026o.reverseSign(),{row:o,tag:a}}_chooseSubject(e,n){let o=e.cells();for(let r=0,s=o.size();r\u003cs;++r){let a=o.itemAt(r);if(a.first.type()===Rl.External)return a.first}let i=n.marker.type();return(i===Rl.Slack||i===Rl.Error)\u0026\u0026e.coefficientFor(n.marker)\u003c0?n.marker:(i=n.other.type(),(i===Rl.Slack||i===Rl.Error)\u0026\u0026e.coefficientFor(n.other)\u003c0?n.other:GQ)}_addWithArtificialVariable(e){let n=this._makeSymbol(Rl.Slack);this._rowMap.insert(n,e.copy()),this._artificial=e.copy(),this._optimize(this._artificial);let o=dse(this._artificial.constant());this._artificial=null;let i=this._rowMap.erase(n);if(i!==void 0){let s=i.second;if(s.isConstant())return o;let a=this._anyPivotableSymbol(s);if(a.type()===Rl.Invalid)return!1;s.solveForEx(n,a),this._substitute(a,s),this._rowMap.insert(a,s)}let r=this._rowMap;for(let s=0,a=r.size();s\u003ca;++s)r.itemAt(s).second.removeSymbol(n);return this._objective.removeSymbol(n),o}_substitute(e,n){let o=this._rowMap;for(let i=0,r=o.size();i\u003cr;++i){let s=o.itemAt(i);s.second.substitute(e,n),s.second.constant()\u003c0\u0026\u0026s.first.type()!==Rl.External\u0026\u0026this._infeasibleRows.push(s.first)}this._objective.substitute(e,n),this._artificial\u0026\u0026this._artificial.substitute(e,n)}_optimize(e){let n=0;for(;n\u003cthis.maxIterations;){let o=this._getEnteringSymbol(e);if(o.type()===Rl.Invalid)return;let i=this._getLeavingSymbol(o);if(i.type()===Rl.Invalid)throw new Error(\"the objective is unbounded\");let r=this._rowMap.erase(i).second;r.solveForEx(i,o),this._substitute(o,r),this._rowMap.insert(o,r),n++}throw new Error(\"solver iterations exceeded\")}_dualOptimize(){let e=this._rowMap,n=this._infeasibleRows;for(;n.length!==0;){let o=n.pop(),i=e.find(o);if(i!==void 0\u0026\u0026i.second.constant()\u003c0){let r=this._getDualEnteringSymbol(i.second);if(r.type()===Rl.Invalid)throw new Error(\"dual optimize failed\");let s=i.second;e.erase(o),s.solveForEx(o,r),this._substitute(r,s),e.insert(r,s)}}}_getEnteringSymbol(e){let n=e.cells();for(let o=0,i=n.size();o\u003ci;++o){let r=n.itemAt(o),s=r.first;if(r.second\u003c0\u0026\u0026s.type()!==Rl.Dummy)return s}return GQ}_getDualEnteringSymbol(e){let n=Number.MAX_VALUE,o=GQ,i=e.cells();for(let r=0,s=i.size();r\u003cs;++r){let a=i.itemAt(r),A=a.first,c=a.second;if(c\u003e0\u0026\u0026A.type()!==Rl.Dummy){let u=this._objective.coefficientFor(A)/c;u\u003cn\u0026\u0026(n=u,o=A)}}return o}_getLeavingSymbol(e){let n=Number.MAX_VALUE,o=GQ,i=this._rowMap;for(let r=0,s=i.size();r\u003cs;++r){let a=i.itemAt(r),A=a.first;if(A.type()!==Rl.External){let c=a.second,l=c.coefficientFor(e);if(l\u003c0){let u=-c.constant()/l;u\u003cn\u0026\u0026(n=u,o=A)}}}return o}_getMarkerLeavingSymbol(e){let n=Number.MAX_VALUE,o=n,i=n,r=GQ,s=r,a=r,A=r,c=this._rowMap;for(let l=0,u=c.size();l\u003cu;++l){let g=c.itemAt(l),h=g.second,d=h.coefficientFor(e);if(d===0)continue;let p=g.first;if(p.type()===Rl.External)A=p;else if(d\u003c0){let m=-h.constant()/d;m\u003co\u0026\u0026(o=m,s=p)}else{let m=h.constant()/d;m\u003ci\u0026\u0026(i=m,a=p)}}return s!==r?s:a!==r?a:A}_removeConstraintEffects(e,n){n.marker.type()===Rl.Error\u0026\u0026this._removeMarkerEffects(n.marker,e.strength()),n.other.type()===Rl.Error\u0026\u0026this._removeMarkerEffects(n.other,e.strength())}_removeMarkerEffects(e,n){let o=this._rowMap.find(e);o!==void 0?this._objective.insertRow(o.second,-n):this._objective.insertSymbol(e,-n)}_anyPivotableSymbol(e){let n=e.cells();for(let o=0,i=n.size();o\u003ci;++o){let r=n.itemAt(o),s=r.first.type();if(s===Rl.Slack||s===Rl.Error)return r.first}return GQ}_makeSymbol(e){return new Xpt(e,this._idTick++)}_cnMap=sWn();_rowMap=aWn();_varMap=AWn();_editMap=cWn();_infeasibleRows=[];_objective=new hse;_artificial=null;_idTick=0}function dse(t){let e=1e-8;return t\u003c0?-t\u003ce:t\u003ce}function sWn(){return kF()}function aWn(){return kF()}function AWn(){return kF()}function cWn(){return kF()}var Rl;(function(t){t[t.Invalid=0]=\"Invalid\",t[t.External=1]=\"External\",t[t.Slack=2]=\"Slack\",t[t.Error=3]=\"Error\",t[t.Dummy=4]=\"Dummy\"})(Rl||(Rl={}));let Xpt=class{constructor(e,n){this._id=n,this._type=e}id(){return this._id}type(){return this._type}_id;_type},GQ=new Xpt(Rl.Invalid,-1);class hse{constructor(e=0){this._constant=e}cells(){return this._cellMap}constant(){return this._constant}isConstant(){return this._cellMap.empty()}allDummies(){let e=this._cellMap;for(let n=0,o=e.size();n\u003co;++n)if(e.itemAt(n).first.type()!==Rl.Dummy)return!1;return!0}copy(){let e=new hse(this._constant);return e._cellMap=this._cellMap.copy(),e}add(e){return this._constant+=e}insertSymbol(e,n=1){let o=this._cellMap.setDefault(e,()=\u003e0);dse(o.second+=n)\u0026\u0026this._cellMap.erase(e)}insertRow(e,n=1){this._constant+=e._constant*n;let o=e._cellMap;for(let i=0,r=o.size();i\u003cr;++i){let s=o.itemAt(i);this.insertSymbol(s.first,s.second*n)}}removeSymbol(e){this._cellMap.erase(e)}reverseSign(){this._constant=-this._constant;let e=this._cellMap;for(let n=0,o=e.size();n\u003co;++n){let i=e.itemAt(n);i.second=-i.second}}solveFor(e){let n=this._cellMap,i=-1/n.erase(e).second;this._constant*=i;for(let r=0,s=n.size();r\u003cs;++r)n.itemAt(r).second*=i}solveForEx(e,n){this.insertSymbol(e,-1),this.solveFor(n)}coefficientFor(e){let n=this._cellMap.find(e);return n!==void 0?n.second:0}substitute(e,n){let o=this._cellMap.erase(e);o!==void 0\u0026\u0026this.insertRow(n,o.second)}_cellMap=kF();_constant}function Zpt(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}function dz(t,e){if(!e.subcircuit_id\u0026\u0026!e.source_group_id)return[...t];let n=e;if(e.subcircuit_id){const a=new Set([e.subcircuit_id]),A=new Map,c=new Map;for(const u of t)if(u.type===\"source_group\"){const g=u.source_group_id,h=u.subcircuit_id;h\u0026\u0026c.set(g,h);const d=u.parent_source_group_id;d\u0026\u0026(A.has(d)||A.set(d,[]),A.get(d).push(g))}let l;for(const[u,g]of c)if(g===e.subcircuit_id){l=u;break}if(l){const u=g=\u003e{const h=A.get(g)||[];for(const d of h){const p=c.get(d);p\u0026\u0026a.add(p),u(d)}};u(l),n={...e,subcircuit_ids:Array.from(a)}}}const o=new Map;for(const a of t){const A=`${a.type}_id`,c=a[A];typeof c==\"string\"\u0026\u0026o.set(c,a)}const i=new Map;for(const a of t){const A=Object.entries(a);for(const[c,l]of A)if(c!==\"parent_source_group_id\"){if(c.endsWith(\"_id\")\u0026\u0026typeof l==\"string\"){const u=o.get(l);Zpt(i,a,u)}else if(c.endsWith(\"_ids\")\u0026\u0026Array.isArray(l)){for(const u of l)if(typeof u==\"string\"){const g=o.get(u);Zpt(i,a,g)}}}}const r=[],s=new Set;for(const a of t){let A=!1;(n.subcircuit_id\u0026\u0026\"subcircuit_id\"in a\u0026\u0026a.subcircuit_id===n.subcircuit_id||n.subcircuit_ids\u0026\u0026\"subcircuit_id\"in a\u0026\u0026a.subcircuit_id\u0026\u0026n.subcircuit_ids.includes(a.subcircuit_id)||n.source_group_id\u0026\u0026\"source_group_id\"in a\u0026\u0026a.source_group_id===n.source_group_id||n.source_group_id\u0026\u0026\"member_source_group_ids\"in a\u0026\u0026Array.isArray(a.member_source_group_ids)\u0026\u0026a.member_source_group_ids.includes(n.source_group_id))\u0026\u0026(A=!0),A\u0026\u0026(r.push(a),s.add(a))}for(;r.length\u003e0;){const a=r.shift(),A=i.get(a);if(A)for(const c of A)s.has(c)||(s.add(c),r.push(c))}return t.filter(a=\u003es.has(a))}var vy=((t,e={})=\u003e{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split(\"_\").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=\u003e{if(s===\"toArray\")return()=\u003e(n.editCount=o.editCount,n);if(s===\"editCount\")return o.editCount;if(s===\"subtree\")return A=\u003evy(dz(n,A),e);if(s===\"insert\")return A=\u003e{const c=A.type;if(!c)throw new Error(\"insert requires an element with a type\");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts\u0026\u0026(R9[c]??U4).parse(u),n.push(u),o.editCount++,u};if(s===\"insertAll\")return A=\u003eA.map(c=\u003ei.insert(c));const a=s;return{get:A=\u003en.find(c=\u003ec.type===a\u0026\u0026c[`${a}_id`]===A),getUsing:A=\u003e{const c=Object.keys(A);if(c.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const l=c[0],u=l.replace(\"_id\",\"\"),g=n.find(h=\u003eh.type===u\u0026\u0026h[l]===A[l]);return g?n.find(h=\u003eh.type===a\u0026\u0026h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=\u003e{const c=Object.keys(A);return n.find(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},list:A=\u003e{const c=A?Object.keys(A):[];return n.filter(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},insert:A=\u003e{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts\u0026\u0026(R9[a]??U4).parse(l),n.push(l),o.editCount++,l},delete:A=\u003e{const c=n.find(l=\u003el[`${a}_id`]===A);c\u0026\u0026(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=\u003e{const l=n.find(u=\u003eu.type===a\u0026\u0026u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=\u003e{if(a===\"source_component\")return n.find(c=\u003ec.type===\"source_component\"\u0026\u0026c.name===A.replace(/\\./g,\"\"));if(a===\"pcb_port\"||a===\"source_port\"||a===\"schematic_port\"){const[c,l]=A.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),u=n.find(h=\u003eh.type===\"source_component\"\u0026\u0026h.name===c);if(!u)return null;const g=n.find(h=\u003eh.type===\"source_port\"\u0026\u0026h.source_component_id===u.source_component_id\u0026\u0026(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a===\"source_port\")return g;if(a===\"pcb_port\")return n.find(h=\u003eh.type===\"pcb_port\"\u0026\u0026h.source_port_id===g.source_port_id);if(a===\"schematic_port\")return n.find(h=\u003eh.type===\"schematic_port\"\u0026\u0026h.source_port_id===g.source_port_id)}}}}});return i});vy.unparsed=vy;var Mr=vy,Xc=vy;function v9e(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var w9e=((t,e={})=\u003e{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const s of t){const a=s.type,A=s[`${a}_id`];if(!A)continue;const c=Number.parseInt(A.split(\"_\").pop()||\"\");Number.isNaN(c)||(n.counts[a]=Math.max(n.counts[a]??0,c))}const i=e.indexConfig||{},r=n.indexes;if(i.byId\u0026\u0026(r.byId=new Map),i.byType\u0026\u0026(r.byType=new Map),i.byRelation\u0026\u0026(r.byRelation=new Map),i.bySubcircuit\u0026\u0026(r.bySubcircuit=new Map),i.byCustomField\u0026\u0026i.byCustomField.length\u003e0){r.byCustomField=new Map;for(const s of i.byCustomField)r.byCustomField.set(s,new Map)}for(const s of t){if(i.byId){const a=v9e(s);r.byId.set(a,s)}if(i.byType){const a=r.byType.get(s.type)||[];a.push(s),r.byType.set(s.type,a)}if(i.byRelation){const a=Object.entries(s);for(const[A,c]of a)if(A.endsWith(\"_id\")\u0026\u0026A!==`${s.type}_id`\u0026\u0026typeof c==\"string\"){const l=r.byRelation.get(A)||new Map,u=l.get(c)||[];u.push(s),l.set(c,u),r.byRelation.set(A,l)}}if(i.bySubcircuit\u0026\u0026\"subcircuit_id\"in s){const a=s.subcircuit_id;if(a\u0026\u0026typeof a==\"string\"){const A=r.bySubcircuit.get(a)||[];A.push(s),r.bySubcircuit.set(a,A)}}if(i.byCustomField\u0026\u0026r.byCustomField){for(const a of i.byCustomField)if(a in s){const A=s[a];if(A!==void 0\u0026\u0026(typeof A==\"string\"||typeof A==\"number\")){const c=String(A),l=r.byCustomField.get(a),u=l.get(c)||[];u.push(s),l.set(c,u)}}}}t._internal_store_indexed=n}const o=new Proxy({},{get:(i,r)=\u003e{if(r===\"toArray\")return()=\u003e(t.editCount=n.editCount,t);if(r===\"editCount\")return n.editCount;if(r===\"insert\")return a=\u003e{const{type:A,...c}=a;if(!A)throw new Error(\"insert requires an element with a type\");return delete c[`${A}_id`],o[A].insert(c)};if(r===\"insertAll\")return a=\u003ea.map(A=\u003eo.insert(A));if(r===\"subtree\")return a=\u003ew9e(dz(t,a),e);const s=r;return{get:a=\u003e{const A=e.indexConfig||{};return A.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${s}:${a}`)||null:A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(l=\u003el[`${s}_id`]===a)||null:t.find(c=\u003ec.type===s\u0026\u0026c[`${s}_id`]===a)||null},getUsing:a=\u003e{const A=e.indexConfig||{},c=Object.keys(a);if(c.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const l=c[0],u=l.replace(\"_id\",\"\");if(A.byRelation\u0026\u0026n.indexes.byRelation){const h=n.indexes.byRelation.get(l);if(h){const p=(h.get(a[l])||[]).find(_=\u003e_.type===u);if(!p)return null;const m=p[`${s}_id`];return A.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${s}:${m}`)||null:A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(f=\u003ef[`${s}_id`]===m)||null:t.find(_=\u003e_.type===s\u0026\u0026_[`${s}_id`]===m)||null}}const g=t.find(h=\u003eh.type===u\u0026\u0026h[l]===a[l]);return g\u0026\u0026t.find(h=\u003eh.type===s\u0026\u0026h[`${s}_id`]===g[`${s}_id`])||null},getWhere:a=\u003e{const A=e.indexConfig||{},c=Object.keys(a);if(c.length===1\u0026\u0026A.byCustomField\u0026\u0026n.indexes.byCustomField){const l=c[0],u=n.indexes.byCustomField.get(l);if(u){const g=String(a[l]);return(u.get(g)||[]).find(d=\u003ed.type===s)||null}}if(\"subcircuit_id\"in a\u0026\u0026A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const l=a.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).find(g=\u003eg.type===s\u0026\u0026c.every(h=\u003eg[h]===a[h]))||null}return A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(u=\u003ec.every(g=\u003eu[g]===a[g]))||null:t.find(l=\u003el.type===s\u0026\u0026c.every(u=\u003el[u]===a[u]))||null},list:a=\u003e{const A=e.indexConfig||{},c=a?Object.keys(a):[];if(c.length===0\u0026\u0026A.byType\u0026\u0026n.indexes.byType)return(n.indexes.byType.get(s)||[]).slice();if(c.length===1\u0026\u0026c[0]===\"subcircuit_id\"\u0026\u0026A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const u=a.subcircuit_id;return(n.indexes.bySubcircuit.get(u)||[]).filter(h=\u003eh.type===s)}let l;return A.byType\u0026\u0026n.indexes.byType?l=n.indexes.byType.get(s)||[]:l=t.filter(u=\u003eu.type===s),c.length\u003e0?l.filter(u=\u003ec.every(g=\u003eu[g]===a[g])):l.slice()},insert:a=\u003e{n.counts[s]??=-1,n.counts[s]++;const A=n.counts[s],c={type:s,[`${s}_id`]:`${s}_${A}`,...a};e.validateInserts\u0026\u0026(R9[s]??U4).parse(c),t.push(c),n.editCount++;const l=e.indexConfig||{};if(l.byId\u0026\u0026n.indexes.byId){const u=v9e(c);n.indexes.byId.set(u,c)}if(l.byType\u0026\u0026n.indexes.byType){const u=n.indexes.byType.get(s)||[];u.push(c),n.indexes.byType.set(s,u)}if(l.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(c);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${c.type}_id`\u0026\u0026typeof h==\"string\"){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.push(c),d.set(h,p),n.indexes.byRelation.set(g,d)}}if(l.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c){const u=c.subcircuit_id;if(u\u0026\u0026typeof u==\"string\"){const g=n.indexes.bySubcircuit.get(u)||[];g.push(c),n.indexes.bySubcircuit.set(u,g)}}if(l.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of l.byCustomField)if(u in c){const g=c[u];if(g!==void 0\u0026\u0026(typeof g==\"string\"||typeof g==\"number\")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.push(c),d.set(h,p)}}}return c},delete:a=\u003e{const A=e.indexConfig||{};let c;if(A.byId\u0026\u0026n.indexes.byId?c=n.indexes.byId.get(`${s}:${a}`):A.byType\u0026\u0026n.indexes.byType?c=(n.indexes.byType.get(s)||[]).find(g=\u003eg[`${s}_id`]===a):c=t.find(u=\u003eu[`${s}_id`]===a),!c)return;const l=t.indexOf(c);if(l\u003e=0\u0026\u0026(t.splice(l,1),n.editCount++),A.byId\u0026\u0026n.indexes.byId){const u=v9e(c);n.indexes.byId.delete(u)}if(A.byType\u0026\u0026n.indexes.byType){const g=(n.indexes.byType.get(s)||[]).filter(h=\u003eh[`${s}_id`]!==a);n.indexes.byType.set(s,g)}if(A.byRelation\u0026\u0026n.indexes.byRelation)for(const[u,g]of n.indexes.byRelation.entries())for(const[h,d]of g.entries()){const p=d.filter(m=\u003em!==c);p.length===0?g.delete(h):g.set(h,p)}if(A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c){const u=c.subcircuit_id;if(u){const h=(n.indexes.bySubcircuit.get(u)||[]).filter(d=\u003ed!==c);h.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,h)}}if(A.byCustomField\u0026\u0026n.indexes.byCustomField)for(const u of n.indexes.byCustomField.values())for(const[g,h]of u.entries()){const d=h.filter(p=\u003ep!==c);d.length===0?u.delete(g):u.set(g,d)}},update:(a,A)=\u003e{const c=e.indexConfig||{};let l;if(c.byId\u0026\u0026n.indexes.byId?l=n.indexes.byId.get(`${s}:${a}`):c.byType\u0026\u0026n.indexes.byType?l=(n.indexes.byType.get(s)||[]).find(g=\u003eg[`${s}_id`]===a):l=t.find(u=\u003eu.type===s\u0026\u0026u[`${s}_id`]===a),!l)return null;if(c.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${l.type}_id`\u0026\u0026typeof h==\"string\"\u0026\u0026g in A\u0026\u0026A[g]!==h){const d=n.indexes.byRelation.get(g);if(d){const m=(d.get(h)||[]).filter(_=\u003e_!==l);m.length===0?d.delete(h):d.set(h,m)}}}if(c.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in l\u0026\u0026\"subcircuit_id\"in A){const u=l.subcircuit_id,g=A.subcircuit_id;if(u!==g){const d=(n.indexes.bySubcircuit.get(u)||[]).filter(p=\u003ep!==l);d.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,d)}}if(c.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l\u0026\u0026u in A\u0026\u0026l[u]!==A[u]){const g=n.indexes.byCustomField.get(u);if(g){const h=String(l[u]),p=(g.get(h)||[]).filter(m=\u003em!==l);p.length===0?g.delete(h):g.set(h,p)}}}if(Object.assign(l,A),n.editCount++,c.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${l.type}_id`\u0026\u0026typeof h==\"string\"\u0026\u0026g in A){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p),n.indexes.byRelation.set(g,d))}}if(c.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in l\u0026\u0026\"subcircuit_id\"in A){const u=l.subcircuit_id;if(u\u0026\u0026typeof u==\"string\"){const g=n.indexes.bySubcircuit.get(u)||[];g.includes(l)||(g.push(l),n.indexes.bySubcircuit.set(u,g))}}if(c.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l\u0026\u0026u in A){const g=l[u];if(g!==void 0\u0026\u0026(typeof g==\"string\"||typeof g==\"number\")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p))}}}return l},select:a=\u003e{if(s===\"source_component\")return t.find(A=\u003eA.type===\"source_component\"\u0026\u0026A.name===a.replace(/\\./g,\"\"))||null;if(s===\"pcb_port\"||s===\"source_port\"||s===\"schematic_port\"){const[A,c]=a.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),l=t.find(g=\u003eg.type===\"source_component\"\u0026\u0026g.name===A);if(!l)return null;const u=t.find(g=\u003eg.type===\"source_port\"\u0026\u0026g.source_component_id===l.source_component_id\u0026\u0026(g.name===c||(g.port_hints??[]).includes(c)));if(!u)return null;if(s===\"source_port\")return u;if(s===\"pcb_port\")return t.find(g=\u003eg.type===\"pcb_port\"\u0026\u0026g.source_port_id===u.source_port_id)||null;if(s===\"schematic_port\")return t.find(g=\u003eg.type===\"schematic_port\"\u0026\u0026g.source_port_id===u.source_port_id)||null}return null}}}});return o});w9e.unparsed=w9e;var lWn=t=\u003e{if(t===\"up\")return\"right\";if(t===\"right\")return\"down\";if(t===\"down\")return\"left\";if(t===\"left\")return\"up\";throw new Error(`Invalid direction: ${t}`)},uWn=t=\u003e{if(t===\"up\")return\"left\";if(t===\"left\")return\"down\";if(t===\"down\")return\"right\";if(t===\"right\")return\"up\";throw new Error(`Invalid direction: ${t}`)},gWn=(t,e)=\u003e{for(;e\u003e0;)t=lWn(t),e--;for(;e\u003c0;)t=uWn(t),e++;return t},dWn=t=\u003e{if(t===\"top\"||t===\"up\")return\"bottom\";if(t===\"bottom\"||t===\"down\")return\"top\";if(t===\"left\")return\"right\";if(t===\"right\")return\"left\";throw new Error(`Invalid sideOrDir: ${t}`)},emt=t=\u003eMath.round(t/(Math.PI/2)),hWn=t=\u003e{switch(t){case\"from_left\":return{x:-1,y:0};case\"from_right\":return{x:1,y:0};case\"from_top\":return{x:0,y:1};case\"from_bottom\":return{x:0,y:-1}}},pWn=({x:t,y:e})=\u003et\u003e0?\"from_right\":t\u003c0?\"from_left\":e\u003e0?\"from_top\":\"from_bottom\",mWn=(t,e)=\u003e{if(!t)return t;if(t===\"from_above\"||t===\"from_below\")return e.isFlipped?t===\"from_above\"?\"from_below\":\"from_above\":t;let{x:n,y:o}=hWn(t),i=Math.round(e.rotationDegrees/90);for(;i\u003e0;)[n,o]=[-o,n],i--;for(;i\u003c0;)[n,o]=[o,-n],i++;return e.isFlipped\u0026\u0026(o=-o),pWn({x:n,y:o})},_Wn=(t,e)=\u003e{if(t.type===\"schematic_component\")t.center=Bn(e,t.center);else if(t.type===\"schematic_port\")t.center=Bn(e,t.center),t.facing_direction\u0026\u0026(t.facing_direction=gWn(t.facing_direction,-(Math.atan2(e.b,e.a)/Math.PI)*2));else if(t.type===\"schematic_text\")t.position=Bn(e,t.position);else if(t.type===\"schematic_trace\"){const n=t;n.route=(n.route??[]).map(o=\u003e{const i=Bn(e,o);return o.x=i.x,o.y=i.y,o}),Array.isArray(n.junctions)\u0026\u0026(n.junctions=n.junctions.map(o=\u003e{const i=Bn(e,o);return o.x=i.x,o.y=i.y,o})),Array.isArray(n.edges)\u0026\u0026(n.edges=n.edges.map(o=\u003e(o.from=Bn(e,o.from),o.to=Bn(e,o.to),o)))}else if(t.type===\"schematic_box\"){const{x:n,y:o}=Bn(e,{x:t.x,y:t.y});t.x=n,t.y=o}else if(t.type===\"schematic_line\"){const{x:n,y:o}=Bn(e,{x:t.x1,y:t.y1}),{x:i,y:r}=Bn(e,{x:t.x2,y:t.y2});t.x1=n,t.y1=o,t.x2=i,t.y2=r}return t},tmt=(t,e)=\u003et.map(n=\u003e_Wn(n,e)),fWn=(t,e)=\u003e{const n=wxe(e),o=Math.abs(emt(n.rotation.angle))%2===1,i=n.rotation.angle/Math.PI*180,r=n.scale.sy\u003c0;if(t.type===\"pcb_plated_hole\"||t.type===\"pcb_hole\"||t.type===\"pcb_via\"||t.type===\"pcb_smtpad\"||t.type===\"pcb_solder_paste\"||t.type===\"pcb_port\"){const{x:s,y:a}=Bn(e,{x:Number(t.x),y:Number(t.y)});t.x=s,t.y=a,t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"polygon\"\u0026\u0026Array.isArray(t.points)\u0026\u0026(t.points=t.points.map(A=\u003e{const c=Bn(e,{x:A.x,y:A.y});return{x:c.x,y:c.y}}))}else if(t.type===\"pcb_keepout\"||t.type===\"pcb_board\")t.center=Bn(e,t.center);else if(t.type===\"pcb_silkscreen_text\"||t.type===\"pcb_fabrication_note_text\"||t.type===\"pcb_note_text\")t.anchor_position=Bn(e,t.anchor_position);else if(t.type===\"pcb_copper_text\")t.anchor_position\u0026\u0026(t.anchor_position=Bn(e,t.anchor_position));else if(t.type===\"pcb_courtyard_rect\")t.center=Bn(e,t.center),t.ccw_rotation=((t.ccw_rotation??0)+i)%360;else if(t.type===\"pcb_silkscreen_circle\"||t.type===\"pcb_silkscreen_rect\"||t.type===\"pcb_silkscreen_pill\"||t.type===\"pcb_silkscreen_oval\"||t.type===\"pcb_note_rect\"||t.type===\"pcb_courtyard_circle\")t.center=Bn(e,t.center);else if(t.type===\"pcb_component\")t.center=Bn(e,t.center),t.rotation=t.rotation+i,t.rotation=t.rotation%360,t.cable_insertion_center\u0026\u0026(t.cable_insertion_center=Bn(e,t.cable_insertion_center)),t.insertion_direction=mWn(t.insertion_direction,{rotationDegrees:i,isFlipped:r}),o\u0026\u0026([t.width,t.height]=[t.height,t.width]);else if(t.type===\"pcb_courtyard_outline\")t.outline=t.outline.map(s=\u003e{const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_courtyard_polygon\")t.points=t.points.map(s=\u003e{const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_trace\")t.route=t.route.map(s=\u003e{if(!(\"x\"in s))return s.start=Bn(e,s.start),s.end=Bn(e,s.end),s;const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_silkscreen_path\"||t.type===\"pcb_trace_hint\"||t.type===\"pcb_fabrication_note_path\"||t.type===\"pcb_note_path\")t.route=t.route.map(s=\u003e{const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_silkscreen_line\"||t.type===\"pcb_note_line\"){const s={x:t.x1,y:t.y1},a={x:t.x2,y:t.y2},A=Bn(e,s),c=Bn(e,a);t.x1=A.x,t.y1=A.y,t.x2=c.x,t.y2=c.y}else if(t.type===\"cad_component\"){const s=Bn(e,{x:t.position.x,y:t.position.y});t.position.x=s.x,t.position.y=s.y}return t},FF=(t,e)=\u003e{const n=wxe(e),o=emt(n.rotation.angle),i=Math.abs(o)%2===1;let r=t.map(s=\u003efWn(s,e));return i\u0026\u0026(r=r.map(s=\u003e((s.type===\"pcb_smtpad\"||s.type===\"pcb_solder_paste\")\u0026\u0026(s.shape===\"rect\"||s.shape===\"pill\")\u0026\u0026([s.width,s.height]=[s.height,s.width]),s))),r},hz=t=\u003e{const e=t.type;return t[`${e}_id`]},IWn=(t,e)=\u003et.find(n=\u003ehz(n)===e)??null,pse=(t,e)=\u003e{const n=vy(t).pcb_port.get(e);if(!n)return`pcb_port[#${e}]`;const o=n.pcb_component_id?vy(t).pcb_component.get(n.pcb_component_id):void 0;if(!o)return`pcb_port[#${e}]`;const i=vy(t).source_component.get(o.source_component_id);if(!i)return`pcb_port[#${e}]`;const r=vy(t).source_port.get(n.source_port_id);if(!r)return`pcb_port[#${e}]`;let s;return r?.port_hints\u0026\u0026r.port_hints.length\u003e0||r.port_hints\u0026\u0026r.port_hints.length\u003e0?s=r.port_hints[0]:s=e,`pcb_port[.${i.name} \u003e .${s}]`};function CWn(t,e){const n=vy(t).pcb_smtpad.get(e);return!n||!n.pcb_port_id?`smtpad[${e}]`:pse(t,n.pcb_port_id)}function P9e(t,e){const n=vy(t).pcb_trace.get(e);if(!n)return`trace[${e}]`;const o=n.route.flatMap(s=\u003e[s.start_pcb_port_id,s.end_pcb_port_id]).filter(Boolean);if(o.length===0)return`trace[${e}]`;function i(s){const a=vy(t).pcb_port.get(s);if(!a)return null;const A=a.pcb_component_id?vy(t).pcb_component.get(a.pcb_component_id):void 0;if(!A)return null;const c=vy(t).source_component.get(A.source_component_id);if(!c)return null;const l=vy(t).source_port.get(a.source_port_id),u=l?.port_hints?l.port_hints[1]:\"\";return{componentName:c.name,portHint:u}}return`trace[${o.map(s=\u003e{const a=i(s);return a?`.${a.componentName} \u003e port.${a.portHint}`:`port[${s}]`}).join(\", \")}]`}var eI=(t,e)=\u003e{if(typeof e==\"string\"){const n=IWn(t,e);return eI(t,n)}switch(e.type){case\"pcb_port\":return pse(t,e.pcb_port_id);case\"pcb_smtpad\":return CWn(t,e.pcb_smtpad_id);case\"pcb_trace\":return P9e(t,e.pcb_trace_id);case\"source_component\":return`source_component[${e.name}]`;default:return`${e.type}[#${hz(e)}]`}},M9e=(t,e)=\u003e({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),pz=(t,e,n)=\u003e{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},nmt=(t,e,n,o,i)=\u003e{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=\u003e({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=\u003eu.x)),minY:Math.min(...l.map(u=\u003eu.y)),maxX:Math.max(...l.map(u=\u003eu.x)),maxY:Math.max(...l.map(u=\u003eu.y))}},yWn=(t,e,n,o,i)=\u003e{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=Math.hypot(r*A,s*c),u=Math.hypot(r*c,s*A);return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},xWn=(t,e,n,o,i)=\u003e{const r=Math.min(n,o)/2,s=Math.max(n,o)/2-r,a=i*Math.PI/180,A=n\u003e=o?{x:s,y:0}:{x:0,y:s},c={x:A.x*Math.cos(a)-A.y*Math.sin(a),y:A.x*Math.sin(a)+A.y*Math.cos(a)},l=Math.abs(c.x)+r,u=Math.abs(c.y)+r;return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},mse=t=\u003et.length===0?null:{minX:Math.min(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxX:Math.max(...t.map(e=\u003ee.x)),maxY:Math.max(...t.map(e=\u003ee.y))},D9e=t=\u003eArray.isArray(t)?t.flatMap(e=\u003e!e||typeof e!=\"object\"?[]:\"x\"in e\u0026\u0026\"y\"in e\u0026\u0026typeof e.x==\"number\"\u0026\u0026typeof e.y==\"number\"?[{x:e.x,y:e.y}]:\"start\"in e\u0026\u0026\"end\"in e?[e.start,e.end].filter(o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"x\"in o\u0026\u0026\"y\"in o\u0026\u0026typeof o.x==\"number\"\u0026\u0026typeof o.y==\"number\")):[]):[],EWn=t=\u003e{if(!t.type.startsWith(\"pcb_\"))return null;if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"polygon\"\u0026\u0026Array.isArray(t.points))return mse(t.points);if(t.type===\"pcb_hole\"\u0026\u0026t.hole_shape===\"circle\")return pz(t.x,t.y,t.hole_diameter);if(t.type===\"pcb_plated_hole\"){let u;if(\"outer_diameter\"in t\u0026\u0026typeof t.outer_diameter==\"number\"?u=pz(t.x,t.y,t.outer_diameter):\"hole_diameter\"in t\u0026\u0026typeof t.hole_diameter==\"number\"\u0026\u0026(u=pz(t.x,t.y,t.hole_diameter)),(t.shape===\"oval\"||t.shape===\"pill\")\u0026\u0026typeof t.outer_width==\"number\"\u0026\u0026typeof t.outer_height==\"number\"\u0026\u0026(u=(t.shape===\"pill\"?xWn:yWn)(t.x,t.y,t.outer_width,t.outer_height,t.ccw_rotation??0)),\"rect_pad_width\"in t\u0026\u0026typeof t.rect_pad_width==\"number\"\u0026\u0026\"rect_pad_height\"in t\u0026\u0026typeof t.rect_pad_height==\"number\"){const g=nmt(t.x,t.y,t.rect_pad_width,t.rect_pad_height,\"rect_ccw_rotation\"in t?t.rect_ccw_rotation??0:0);u=u?M9e(u,g):g}if(\"hole_diameter\"in t\u0026\u0026typeof t.hole_diameter==\"number\"){const g=pz(t.x+(\"hole_offset_x\"in t?t.hole_offset_x??0:0),t.y+(\"hole_offset_y\"in t?t.hole_offset_y??0:0),t.hole_diameter);u=u?M9e(u,g):g}if(u)return u}const e=t,n=mse(D9e(e.route));if(n)return n;const o=mse(D9e(e.outline));if(o)return o;const i=mse(D9e(e.points));if(i)return i;let r,s,a,A;\"x\"in t\u0026\u0026\"y\"in t\u0026\u0026(r=Number(t.x),s=Number(t.y)),\"outer_diameter\"in t\u0026\u0026(a=Number(t.outer_diameter),A=Number(t.outer_diameter)),\"width\"in t\u0026\u0026(a=Number(t.width)),\"height\"in t\u0026\u0026(A=Number(t.height)),\"center\"in t\u0026\u0026t.center\u0026\u0026typeof t.center==\"object\"\u0026\u0026\"x\"in t.center\u0026\u0026\"y\"in t.center\u0026\u0026(r=Number(t.center.x),s=Number(t.center.y));let c=0;if(\"rotation\"in t\u0026\u0026typeof t.rotation==\"number\"\u0026\u0026(c=t.rotation),\"ccw_rotation\"in t\u0026\u0026typeof t.ccw_rotation==\"number\"\u0026\u0026(c=t.ccw_rotation),r!==void 0\u0026\u0026s!==void 0)return a!==void 0\u0026\u0026A!==void 0?c?nmt(r,s,a,A,c):{minX:r-a/2,minY:s-A/2,maxX:r+a/2,maxY:s+A/2}:\"radius\"in t\u0026\u0026typeof t.radius==\"number\"?pz(r,s,t.radius*2):{minX:r,minY:s,maxX:r,maxY:s};const l=[e.anchor_position,e.position].filter(u=\u003e!!(u\u0026\u0026typeof u==\"object\"\u0026\u0026\"x\"in u\u0026\u0026\"y\"in u\u0026\u0026typeof u.x==\"number\"\u0026\u0026typeof u.y==\"number\")).at(0);return l?{minX:l.x,minY:l.y,maxX:l.x,maxY:l.y}:null},H8=t=\u003e{let e={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};for(const n of t){const o=EWn(n);o\u0026\u0026(e=M9e(e,o))}return e},BWn=t=\u003e{if(t.width\u0026\u0026t.height\u0026\u0026t.center){const a=t.width/2,A=t.height/2;return{minX:t.center.x-a,minY:t.center.y-A,maxX:t.center.x+a,maxY:t.center.y+A,width:t.width,height:t.height,center:{x:t.center.x,y:t.center.y}}}if(!t.outline||t.outline.length===0)throw new Error(\"Unable to compute board bounds. pcb_board must include width/height/center or a non-empty outline.\");let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const a of t.outline)e=Math.min(e,a.x),n=Math.min(n,a.y),o=Math.max(o,a.x),i=Math.max(i,a.y);const r=o-e,s=i-n;return{minX:e,minY:n,maxX:o,maxY:i,width:r,height:s,center:{x:e+r/2,y:n+s/2}}};function omt(t){const e=new Map,n=new Map,o=new Map;for(const A of t)switch(A.type){case\"pcb_board\":o.set(A.pcb_board_id,A);break;case\"source_group\":{const c=A.parent_subcircuit_id??A.parent_source_group_id;n.set(A.source_group_id,A.subcircuit_id??c),A.is_subcircuit\u0026\u0026A.subcircuit_id\u0026\u0026n.set(A.subcircuit_id,c);break}case\"pcb_group\":n.set(A.pcb_group_id,A.subcircuit_id??A.source_group_id);break;case\"pcb_component\":n.set(A.pcb_component_id,A.subcircuit_id??A.pcb_group_id);break;case\"pcb_trace\":n.set(A.pcb_trace_id,A.subcircuit_id??A.pcb_group_id??A.pcb_component_id);break;case\"pcb_via\":n.set(A.pcb_via_id,A.subcircuit_id??A.pcb_group_id??A.pcb_trace_id);break}const i=[...o.values()];for(const A of i)e.set(A.pcb_board_id,A),A.subcircuit_id\u0026\u0026e.set(A.subcircuit_id,A);const r=i.length===1?i[0]:void 0,s=new Set;function a(A){if(e.has(A))return e.get(A);if(!n.has(A)||s.has(A))return;s.add(A);const c=n.get(A);let l=r;return c\u0026\u0026(l=a(c)),s.delete(A),e.set(A,l),l}for(const A of n.keys())a(A);return e}var bWn=.1,imt=.18,$9=.2,xD=({minX:t,minY:e,maxX:n,maxY:o})=\u003e{const i=n-t,r=o-e;return{minX:t,minY:e,maxX:n,maxY:o,width:i,height:r,center:{x:t+i/2,y:e+r/2}}},SWn=t=\u003e{const e=.12*(imt/.18),n=.12*(imt/.18);return t.length*e+n},QWn=t=\u003e{const e=SWn(t.text),n=t.anchor_position;if(!n){const o=t.anchor_side===\"top\"||t.anchor_side===\"bottom\",i=o?$9:e,r=o?e:$9;return xD({minX:t.center.x-i/2,minY:t.center.y-r/2,maxX:t.center.x+i/2,maxY:t.center.y+r/2})}switch(t.anchor_side){case\"left\":return xD({minX:n.x,minY:n.y-$9/2,maxX:n.x+e,maxY:n.y+$9/2});case\"right\":return xD({minX:n.x-e,minY:n.y-$9/2,maxX:n.x,maxY:n.y+$9/2});case\"top\":return xD({minX:n.x-$9/2,minY:n.y-e,maxX:n.x+$9/2,maxY:n.y});case\"bottom\":return xD({minX:n.x-$9/2,minY:n.y,maxX:n.x+$9/2,maxY:n.y+e})}},vWn=t=\u003e{if(t.type===\"schematic_component\")return xD({minX:t.center.x-t.size.width/2,minY:t.center.y-t.size.height/2,maxX:t.center.x+t.size.width/2,maxY:t.center.y+t.size.height/2});if(t.type===\"schematic_net_label\")return QWn(t);const e=[...t.edges.flatMap(o=\u003e[o.from,o.to]),...t.junctions];if(e.length===0)return null;const n=bWn/2;return xD({minX:Math.min(...e.map(o=\u003eo.x))-n,minY:Math.min(...e.map(o=\u003eo.y))-n,maxX:Math.max(...e.map(o=\u003eo.x))+n,maxY:Math.max(...e.map(o=\u003eo.y))+n})};function wWn(t){let e=0;if(t.length==0)return e;for(var n=0;n\u003ct.length;n++){var o=t.charCodeAt(n);e=(e\u003c\u003c5)-e+o,e=e\u0026e}return Math.abs(e)}var rmt=[[\"#69d2e7\",\"#a7dbd8\",\"#e0e4cc\",\"#f38630\",\"#fa6900\"],[\"#fe4365\",\"#fc9d9a\",\"#f9cdad\",\"#c8c8a9\",\"#83af9b\"],[\"#ecd078\",\"#d95b43\",\"#c02942\",\"#542437\",\"#53777a\"],[\"#556270\",\"#4ecdc4\",\"#c7f464\",\"#ff6b6b\",\"#c44d58\"],[\"#774f38\",\"#e08e79\",\"#f1d4af\",\"#ece5ce\",\"#c5e0dc\"],[\"#e8ddcb\",\"#cdb380\",\"#036564\",\"#033649\",\"#031634\"],[\"#490a3d\",\"#bd1550\",\"#e97f02\",\"#f8ca00\",\"#8a9b0f\"],[\"#594f4f\",\"#547980\",\"#45ada8\",\"#9de0ad\",\"#e5fcc2\"],[\"#00a0b0\",\"#6a4a3c\",\"#cc333f\",\"#eb6841\",\"#edc951\"],[\"#e94e77\",\"#d68189\",\"#c6a49a\",\"#c6e5d9\",\"#f4ead5\"],[\"#3fb8af\",\"#7fc7af\",\"#dad8a7\",\"#ff9e9d\",\"#ff3d7f\"],[\"#d9ceb2\",\"#948c75\",\"#d5ded9\",\"#7a6a53\",\"#99b2b7\"],[\"#ffffff\",\"#cbe86b\",\"#f2e9e1\",\"#1c140d\",\"#cbe86b\"],[\"#efffcd\",\"#dce9be\",\"#555152\",\"#2e2633\",\"#99173c\"],[\"#343838\",\"#005f6b\",\"#008c9e\",\"#00b4cc\",\"#00dffc\"],[\"#413e4a\",\"#73626e\",\"#b38184\",\"#f0b49e\",\"#f7e4be\"],[\"#ff4e50\",\"#fc913a\",\"#f9d423\",\"#ede574\",\"#e1f5c4\"],[\"#99b898\",\"#fecea8\",\"#ff847c\",\"#e84a5f\",\"#2a363b\"],[\"#655643\",\"#80bca3\",\"#f6f7bd\",\"#e6ac27\",\"#bf4d28\"],[\"#00a8c6\",\"#40c0cb\",\"#f9f2e7\",\"#aee239\",\"#8fbe00\"],[\"#351330\",\"#424254\",\"#64908a\",\"#e8caa4\",\"#cc2a41\"],[\"#554236\",\"#f77825\",\"#d3ce3d\",\"#f1efa5\",\"#60b99a\"],[\"#5d4157\",\"#838689\",\"#a8caba\",\"#cad7b2\",\"#ebe3aa\"],[\"#8c2318\",\"#5e8c6a\",\"#88a65e\",\"#bfb35a\",\"#f2c45a\"],[\"#fad089\",\"#ff9c5b\",\"#f5634a\",\"#ed303c\",\"#3b8183\"],[\"#ff4242\",\"#f4fad2\",\"#d4ee5e\",\"#e1edb9\",\"#f0f2eb\"],[\"#f8b195\",\"#f67280\",\"#c06c84\",\"#6c5b7b\",\"#355c7d\"],[\"#d1e751\",\"#ffffff\",\"#000000\",\"#4dbce9\",\"#26ade4\"],[\"#1b676b\",\"#519548\",\"#88c425\",\"#bef202\",\"#eafde6\"],[\"#5e412f\",\"#fcebb6\",\"#78c0a8\",\"#f07818\",\"#f0a830\"],[\"#bcbdac\",\"#cfbe27\",\"#f27435\",\"#f02475\",\"#3b2d38\"],[\"#452632\",\"#91204d\",\"#e4844a\",\"#e8bf56\",\"#e2f7ce\"],[\"#eee6ab\",\"#c5bc8e\",\"#696758\",\"#45484b\",\"#36393b\"],[\"#f0d8a8\",\"#3d1c00\",\"#86b8b1\",\"#f2d694\",\"#fa2a00\"],[\"#2a044a\",\"#0b2e59\",\"#0d6759\",\"#7ab317\",\"#a0c55f\"],[\"#f04155\",\"#ff823a\",\"#f2f26f\",\"#fff7bd\",\"#95cfb7\"],[\"#b9d7d9\",\"#668284\",\"#2a2829\",\"#493736\",\"#7b3b3b\"],[\"#bbbb88\",\"#ccc68d\",\"#eedd99\",\"#eec290\",\"#eeaa88\"],[\"#b3cc57\",\"#ecf081\",\"#ffbe40\",\"#ef746f\",\"#ab3e5b\"],[\"#a3a948\",\"#edb92e\",\"#f85931\",\"#ce1836\",\"#009989\"],[\"#300030\",\"#480048\",\"#601848\",\"#c04848\",\"#f07241\"],[\"#67917a\",\"#170409\",\"#b8af03\",\"#ccbf82\",\"#e33258\"],[\"#aab3ab\",\"#c4cbb7\",\"#ebefc9\",\"#eee0b7\",\"#e8caaf\"],[\"#e8d5b7\",\"#0e2430\",\"#fc3a51\",\"#f5b349\",\"#e8d5b9\"],[\"#ab526b\",\"#bca297\",\"#c5ceae\",\"#f0e2a4\",\"#f4ebc3\"],[\"#607848\",\"#789048\",\"#c0d860\",\"#f0f0d8\",\"#604848\"],[\"#b6d8c0\",\"#c8d9bf\",\"#dadabd\",\"#ecdbbc\",\"#fedcba\"],[\"#a8e6ce\",\"#dcedc2\",\"#ffd3b5\",\"#ffaaa6\",\"#ff8c94\"],[\"#3e4147\",\"#fffedf\",\"#dfba69\",\"#5a2e2e\",\"#2a2c31\"],[\"#fc354c\",\"#29221f\",\"#13747d\",\"#0abfbc\",\"#fcf7c5\"],[\"#cc0c39\",\"#e6781e\",\"#c8cf02\",\"#f8fcc1\",\"#1693a7\"],[\"#1c2130\",\"#028f76\",\"#b3e099\",\"#ffeaad\",\"#d14334\"],[\"#a7c5bd\",\"#e5ddcb\",\"#eb7b59\",\"#cf4647\",\"#524656\"],[\"#dad6ca\",\"#1bb0ce\",\"#4f8699\",\"#6a5e72\",\"#563444\"],[\"#5c323e\",\"#a82743\",\"#e15e32\",\"#c0d23e\",\"#e5f04c\"],[\"#edebe6\",\"#d6e1c7\",\"#94c7b6\",\"#403b33\",\"#d3643b\"],[\"#fdf1cc\",\"#c6d6b8\",\"#987f69\",\"#e3ad40\",\"#fcd036\"],[\"#230f2b\",\"#f21d41\",\"#ebebbc\",\"#bce3c5\",\"#82b3ae\"],[\"#b9d3b0\",\"#81bda4\",\"#b28774\",\"#f88f79\",\"#f6aa93\"],[\"#3a111c\",\"#574951\",\"#83988e\",\"#bcdea5\",\"#e6f9bc\"],[\"#5e3929\",\"#cd8c52\",\"#b7d1a3\",\"#dee8be\",\"#fcf7d3\"],[\"#1c0113\",\"#6b0103\",\"#a30006\",\"#c21a01\",\"#f03c02\"],[\"#000000\",\"#9f111b\",\"#b11623\",\"#292c37\",\"#cccccc\"],[\"#382f32\",\"#ffeaf2\",\"#fcd9e5\",\"#fbc5d8\",\"#f1396d\"],[\"#e3dfba\",\"#c8d6bf\",\"#93ccc6\",\"#6cbdb5\",\"#1a1f1e\"],[\"#f6f6f6\",\"#e8e8e8\",\"#333333\",\"#990100\",\"#b90504\"],[\"#1b325f\",\"#9cc4e4\",\"#e9f2f9\",\"#3a89c9\",\"#f26c4f\"],[\"#a1dbb2\",\"#fee5ad\",\"#faca66\",\"#f7a541\",\"#f45d4c\"],[\"#c1b398\",\"#605951\",\"#fbeec2\",\"#61a6ab\",\"#accec0\"],[\"#5e9fa3\",\"#dcd1b4\",\"#fab87f\",\"#f87e7b\",\"#b05574\"],[\"#951f2b\",\"#f5f4d7\",\"#e0dfb1\",\"#a5a36c\",\"#535233\"],[\"#8dccad\",\"#988864\",\"#fea6a2\",\"#f9d6ac\",\"#ffe9af\"],[\"#2d2d29\",\"#215a6d\",\"#3ca2a2\",\"#92c7a3\",\"#dfece6\"],[\"#413d3d\",\"#040004\",\"#c8ff00\",\"#fa023c\",\"#4b000f\"],[\"#eff3cd\",\"#b2d5ba\",\"#61ada0\",\"#248f8d\",\"#605063\"],[\"#ffefd3\",\"#fffee4\",\"#d0ecea\",\"#9fd6d2\",\"#8b7a5e\"],[\"#cfffdd\",\"#b4dec1\",\"#5c5863\",\"#a85163\",\"#ff1f4c\"],[\"#9dc9ac\",\"#fffec7\",\"#f56218\",\"#ff9d2e\",\"#919167\"],[\"#4e395d\",\"#827085\",\"#8ebe94\",\"#ccfc8e\",\"#dc5b3e\"],[\"#a8a7a7\",\"#cc527a\",\"#e8175d\",\"#474747\",\"#363636\"],[\"#f8edd1\",\"#d88a8a\",\"#474843\",\"#9d9d93\",\"#c5cfc6\"],[\"#046d8b\",\"#309292\",\"#2fb8ac\",\"#93a42a\",\"#ecbe13\"],[\"#f38a8a\",\"#55443d\",\"#a0cab5\",\"#cde9ca\",\"#f1edd0\"],[\"#a70267\",\"#f10c49\",\"#fb6b41\",\"#f6d86b\",\"#339194\"],[\"#ff003c\",\"#ff8a00\",\"#fabe28\",\"#88c100\",\"#00c176\"],[\"#ffedbf\",\"#f7803c\",\"#f54828\",\"#2e0d23\",\"#f8e4c1\"],[\"#4e4d4a\",\"#353432\",\"#94ba65\",\"#2790b0\",\"#2b4e72\"],[\"#0ca5b0\",\"#4e3f30\",\"#fefeeb\",\"#f8f4e4\",\"#a5b3aa\"],[\"#4d3b3b\",\"#de6262\",\"#ffb88c\",\"#ffd0b3\",\"#f5e0d3\"],[\"#fffbb7\",\"#a6f6af\",\"#66b6ab\",\"#5b7c8d\",\"#4f2958\"],[\"#edf6ee\",\"#d1c089\",\"#b3204d\",\"#412e28\",\"#151101\"],[\"#9d7e79\",\"#ccac95\",\"#9a947c\",\"#748b83\",\"#5b756c\"],[\"#fcfef5\",\"#e9ffe1\",\"#cdcfb7\",\"#d6e6c3\",\"#fafbe3\"],[\"#9cddc8\",\"#bfd8ad\",\"#ddd9ab\",\"#f7af63\",\"#633d2e\"],[\"#30261c\",\"#403831\",\"#36544f\",\"#1f5f61\",\"#0b8185\"],[\"#aaff00\",\"#ffaa00\",\"#ff00aa\",\"#aa00ff\",\"#00aaff\"],[\"#d1313d\",\"#e5625c\",\"#f9bf76\",\"#8eb2c5\",\"#615375\"],[\"#ffe181\",\"#eee9e5\",\"#fad3b2\",\"#ffba7f\",\"#ff9c97\"],[\"#73c8a9\",\"#dee1b6\",\"#e1b866\",\"#bd5532\",\"#373b44\"],[\"#805841\",\"#dcf7f3\",\"#fffcdd\",\"#ffd8d8\",\"#f5a2a2\"]],PWn=t=\u003e{let{x:e,y:n,width:o,height:i}={...t,...t.size,...t.center,...t.position};if(t.x1!==void 0\u0026\u0026t.x2!==void 0\u0026\u0026t.y1!==void 0\u0026\u0026t.y2!==void 0\u0026\u0026(e=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2,o=Math.abs(t.x1-t.x2),i=Math.abs(t.y1-t.y2)),t.points\u0026\u0026Array.isArray(t.points)\u0026\u0026t.points.length\u003e0){const a=t.points.map(h=\u003eh.x),A=t.points.map(h=\u003eh.y),c=Math.min(...a),l=Math.max(...a),u=Math.min(...A),g=Math.max(...A);e=(c+l)/2,n=(u+g)/2,o=l-c,i=g-u}const r=t.text||t.name||t.source?.text||t.source?.name||\"?\",s=t;return e===void 0||n===void 0?null:(o===void 0\u0026\u0026(\"radius\"in t?(o=t.radius*2,i=t.radius*2):\"outer_diameter\"in t?(o=t.outer_diameter,i=t.outer_diameter):\"rect_pad_width\"in t\u0026\u0026\"rect_pad_height\"in t?(o=t.rect_pad_width,i=t.rect_pad_height,\"hole_diameter\"in t\u0026\u0026(o=Math.max(o,t.hole_diameter),i=Math.max(i,t.hole_diameter))):\"hole_diameter\"in t\u0026\u0026(o=t.hole_diameter,i=t.hole_diameter)),(o===void 0||i===void 0)\u0026\u0026(o=.1,i=.1),{x:e,y:n,width:o,height:i,title:r,content:s,bg_color:rmt[wWn(t.type||r)%rmt.length]?.[4]??\"#f00\"})},MWn=t=\u003e!!t,N9e=t=\u003e{const e=t.filter(c=\u003ec.type.startsWith(\"pcb_\")||c.type.startsWith(\"schematic_\")).concat(t.filter(c=\u003ec.type===\"pcb_trace\"||c.type===\"schematic_trace\").flatMap(c=\u003ec.route)).map(c=\u003ePWn(c)).filter(MWn);if(e.length===0)return{center:{x:0,y:0},width:0,height:0};let n=e[0].x-e[0].width/2,o=e[0].x+e[0].width/2,i=e[0].y-e[0].height/2,r=e[0].y+e[0].height/2;for(const c of e.slice(1))n=Math.min(n,c.x-c.width/2),o=Math.max(o,c.x+c.width/2),i=Math.min(i,c.y-c.height/2),r=Math.max(r,c.y+c.height/2);const s=o-n,a=r-i;return{center:{x:n+s/2,y:i+a/2},width:s,height:a}},Yh=t=\u003et[`${t.type}_id`],smt=(t,e,n)=\u003e{const o=t.find(l=\u003el.type===\"pcb_component\"\u0026\u0026l.pcb_component_id===e);if(!o)return;const i=\"center\"in o?o.center:{x:o.x,y:o.y},r=n.x-i.x,s=n.y-i.y,a=t.filter(l=\u003el.type===\"pcb_port\"\u0026\u0026l.pcb_component_id===e).map(l=\u003el.pcb_port_id),A=t.filter(l=\u003e{if(l===o)return!0;const u=l;return!!(u.pcb_component_id===e||Array.isArray(u.pcb_component_ids)\u0026\u0026u.pcb_component_ids.includes(e)||u.pcb_port_id\u0026\u0026a.includes(u.pcb_port_id)||Array.isArray(u.pcb_port_ids)\u0026\u0026u.pcb_port_ids.some(g=\u003ea.includes(g))||u.start_pcb_port_id\u0026\u0026a.includes(u.start_pcb_port_id)||u.end_pcb_port_id\u0026\u0026a.includes(u.end_pcb_port_id)||Array.isArray(u.route)\u0026\u0026u.route.some(g=\u003eg.start_pcb_port_id\u0026\u0026a.includes(g.start_pcb_port_id)||g.end_pcb_port_id\u0026\u0026a.includes(g.end_pcb_port_id)))}),c=pA(r,s);FF(A,c)},amt=(t,e)=\u003e{const n=[],o=t.filter(i=\u003ei.type===\"source_group\"\u0026\u0026i.parent_source_group_id===e).map(i=\u003ei.source_group_id);n.push(...o);for(const i of o)n.push(...amt(t,i));return n},Amt=(t,e,n)=\u003e{const o=[e,...amt(t,e)],i=new Set;for(const g of o)dz(t,{source_group_id:g}).forEach(d=\u003ei.add(d));const r=Array.from(i).filter(g=\u003eg.type===\"pcb_port\").map(g=\u003eg.pcb_port_id);t.filter(g=\u003e{if(g.type!==\"pcb_trace\"||i.has(g))return!1;const h=g;return!!(h.start_pcb_port_id\u0026\u0026r.includes(h.start_pcb_port_id)||h.end_pcb_port_id\u0026\u0026r.includes(h.end_pcb_port_id)||Array.isArray(h.route)\u0026\u0026h.route.some(d=\u003ed.start_pcb_port_id\u0026\u0026r.includes(d.start_pcb_port_id)||d.end_pcb_port_id\u0026\u0026r.includes(d.end_pcb_port_id)))}).forEach(g=\u003ei.add(g));const a=Array.from(i).filter(g=\u003eg.type.startsWith(\"pcb_\"));if(a.length===0)return;const{center:A}=N9e(a),c=n.x-A.x,l=n.y-A.y,u=pA(c,l);FF(a,u)},DWn=(t,e,n)=\u003e{const o=t.find(l=\u003el.type===\"schematic_component\"\u0026\u0026l.schematic_component_id===e);if(!o)return;const i=\"center\"in o?o.center:{x:o.x,y:o.y},r=n.x-i.x,s=n.y-i.y,a=t.filter(l=\u003el.type===\"schematic_port\"\u0026\u0026l.schematic_component_id===e).map(l=\u003el.schematic_port_id),A=t.filter(l=\u003e{if(l===o)return!0;const u=l;return!!(u.schematic_component_id===e||Array.isArray(u.schematic_component_ids)\u0026\u0026u.schematic_component_ids.includes(e)||u.schematic_port_id\u0026\u0026a.includes(u.schematic_port_id)||Array.isArray(u.schematic_port_ids)\u0026\u0026u.schematic_port_ids.some(g=\u003ea.includes(g))||u.start_schematic_port_id\u0026\u0026a.includes(u.start_schematic_port_id)||u.end_schematic_port_id\u0026\u0026a.includes(u.end_schematic_port_id)||Array.isArray(u.route)\u0026\u0026u.route.some(g=\u003eg.start_schematic_port_id\u0026\u0026a.includes(g.start_schematic_port_id)||g.end_schematic_port_id\u0026\u0026a.includes(g.end_schematic_port_id)))}),c=pA(r,s);tmt(A,c)},cmt=(t,e)=\u003e{const n=[],o=t.filter(i=\u003ei.type===\"source_group\"\u0026\u0026i.parent_source_group_id===e).map(i=\u003ei.source_group_id);n.push(...o);for(const i of o)n.push(...cmt(t,i));return n},NWn=(t,e,n)=\u003e{const o=[e,...cmt(t,e)],i=new Set;for(const g of o)dz(t,{source_group_id:g}).forEach(d=\u003ei.add(d));const r=Array.from(i).filter(g=\u003eg.type===\"schematic_port\").map(g=\u003eg.schematic_port_id);t.filter(g=\u003e{if(g.type!==\"schematic_trace\"||i.has(g))return!1;const h=g;return!!(h.start_schematic_port_id\u0026\u0026r.includes(h.start_schematic_port_id)||h.end_schematic_port_id\u0026\u0026r.includes(h.end_schematic_port_id)||Array.isArray(h.route)\u0026\u0026h.route.some(d=\u003ed.start_schematic_port_id\u0026\u0026r.includes(d.start_schematic_port_id)||d.end_schematic_port_id\u0026\u0026r.includes(d.end_schematic_port_id)))}).forEach(g=\u003ei.add(g));const a=Array.from(i).filter(g=\u003eg.type.startsWith(\"schematic_\"));if(a.length===0)return;const{center:A}=N9e(a),c=n.x-A.x,l=n.y-A.y,u=pA(c,l);tmt(a,u)},mz=(t,e)=\u003e{const n=new Map,o=new Set;for(const c of t)c.type===\"source_group\"\u0026\u0026o.add(c.source_group_id);const i=[];for(const c of t)if(c.type===\"source_group\"\u0026\u0026c.parent_source_group_id){const l=c.parent_source_group_id,u=c.source_group_id;if(!o.has(l))i.push(u),n.has(u)||n.set(u,[]);else{const g=n.get(l)??[];g.push(u),n.set(l,g),n.has(u)||n.set(u,[])}}for(const c of t)c.type===\"source_group\"\u0026\u0026!n.has(c.source_group_id)\u0026\u0026n.set(c.source_group_id,[]);const r=new Map,s=()=\u003e{for(const[c,l]of n)if(!r.has(c)\u0026\u0026l.every(u=\u003er.has(u)))return c;return null};let a=null;for(;;){const c=s();if(!c)break;const u={nodeType:\"group\",sourceGroup:t.find(g=\u003eg.type===\"source_group\"\u0026\u0026g.source_group_id===c),otherChildElements:[],childNodes:[...n.get(c)?.map(g=\u003er.get(g))??[],...t.filter(g=\u003eg.type===\"source_component\"\u0026\u0026g.source_group_id===c).map(g=\u003e({nodeType:\"component\",sourceComponent:g,childNodes:[],otherChildElements:[...t.filter(h=\u003eh.type===\"pcb_component\"\u0026\u0026h.source_component_id===g.source_component_id)]}))]};r.set(c,u),a=c}if(!a)return console.warn(\"No groups were processed, returning tree without sourceGroup\"),{nodeType:\"group\",childNodes:[],otherChildElements:t};let A=null;return e\u0026\u0026e.source_group_id!==void 0?A=e.source_group_id:i.length\u003e0?A=i[0]:A=a,A?r.get(A):(console.warn(\"No valid root group found, returning tree without sourceGroup\"),{nodeType:\"group\",childNodes:[],otherChildElements:t})};function lmt(t,e={}){if(t.length===0)return{width:0,height:0};const n=e.direction??\"row\",o=e.columnGap??0,i=e.rowGap??0;if(n===\"row\"||n===\"row-reverse\"){const a=t.reduce((c,l)=\u003ec+l.width,0)+o*Math.max(0,t.length-1),A=t.reduce((c,l)=\u003eMath.max(c,l.height),0);return{width:a,height:A}}else{const a=t.reduce((c,l)=\u003ec+l.height,0)+i*Math.max(0,t.length-1);return{width:t.reduce((c,l)=\u003eMath.max(c,l.width),0),height:a}}}function umt(t){if(t.type===\"pcb_smtpad\")return[`${t.layer}_copper`];if(t.type===\"pcb_trace\"){if(!t.route||!Array.isArray(t.route))return[];const e=new Set;for(const n of t.route)\"layer\"in n\u0026\u0026n.layer\u0026\u0026e.add(`${n.layer}_copper`);return Array.from(e)}return t.type===\"pcb_copper_pour\"?[`${t.layer}_copper`]:t.type===\"pcb_copper_text\"?[`${t.layer}_copper`]:t.type===\"pcb_silkscreen_text\"||t.type===\"pcb_silkscreen_rect\"||t.type===\"pcb_silkscreen_circle\"||t.type===\"pcb_silkscreen_line\"||t.type===\"pcb_silkscreen_path\"?[`${t.layer}_silkscreen`]:t.type===\"pcb_fabrication_note_text\"||t.type===\"pcb_fabrication_note_rect\"||t.type===\"pcb_fabrication_note_path\"?[`${t.layer}_fabrication_note`]:t.type===\"pcb_courtyard_circle\"||t.type===\"pcb_courtyard_polygon\"||t.type===\"pcb_courtyard_rect\"||t.type===\"pcb_courtyard_outline\"?[`${t.layer}_courtyard`]:t.type===\"pcb_note_rect\"||t.type===\"pcb_note_path\"||t.type===\"pcb_note_text\"||t.type===\"pcb_note_line\"||t.type===\"pcb_note_dimension\"?[`${t.layer}_user_note`]:[]}var gx=1e-9,RWn=(t,e,n)=\u003eMath.max(e,Math.min(n,t)),TWn=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),_z=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r\u003c=gx)return TWn(t,e);const s=RWn(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return Math.hypot(t.x-(e.x+s*o),t.y-(e.y+s*i))},fz=(t,e,n)=\u003e(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),Iz=(t,e,n)=\u003eMath.abs(fz(e,n,t))\u003egx?!1:t.x\u003e=Math.min(e.x,n.x)-gx\u0026\u0026t.x\u003c=Math.max(e.x,n.x)+gx\u0026\u0026t.y\u003e=Math.min(e.y,n.y)-gx\u0026\u0026t.y\u003c=Math.max(e.y,n.y)+gx,kWn=(t,e,n,o)=\u003e{const i=fz(t,e,n),r=fz(t,e,o),s=fz(n,o,t),a=fz(n,o,e);return(i\u003egx\u0026\u0026r\u003c-gx||i\u003c-gx\u0026\u0026r\u003egx)\u0026\u0026(s\u003egx\u0026\u0026a\u003c-gx||s\u003c-gx\u0026\u0026a\u003egx)?!0:Iz(n,t,e)||Iz(o,t,e)||Iz(t,n,o)||Iz(e,n,o)},LF=t=\u003e{const e=[];if(t.points.length\u003c2)return e;for(let n=0;n\u003ct.points.length;n+=1){const o=t.points[n],i=t.points[(n+1)%t.points.length];!o||!i||e.push([o,i])}return e},R9e=(t,e)=\u003e{for(const[o,i]of LF(e))if(Iz(t,o,i))return!0;let n=!1;for(let o=0,i=e.points.length-1;o\u003ce.points.length;i=o++){const r=e.points[o],s=e.points[i];if(!r||!s)continue;r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},FWn=(t,e)=\u003eMath.max(0,Math.hypot(t.x-e.x,t.y-e.y)-t.radius-e.radius),LWn=(t,e)=\u003e{if(t.points.length\u003c3||e.points.length\u003c3)return Number.POSITIVE_INFINITY;for(const[r,s]of LF(t))for(const[a,A]of LF(e))if(kWn(r,s,a,A))return 0;const n=t.points[0],o=e.points[0];if(n\u0026\u0026R9e(n,e)||o\u0026\u0026R9e(o,t))return 0;let i=Number.POSITIVE_INFINITY;for(const[r,s]of LF(t))for(const[a,A]of LF(e))i=Math.min(i,_z(r,a,A),_z(s,a,A),_z(a,r,s),_z(A,r,s));return i},gmt=(t,e)=\u003e{if(e.points.length\u003c3)return Number.POSITIVE_INFINITY;if(R9e({x:t.x,y:t.y},e))return 0;let n=Number.POSITIVE_INFINITY;for(const[o,i]of LF(e))n=Math.min(n,_z({x:t.x,y:t.y},o,i));return Math.max(0,n-t.radius)},T9e={leftside_top:{side:\"leftside\",alignment:\"top\"},leftside_bottom:{side:\"leftside\",alignment:\"bottom\"},rightside_top:{side:\"rightside\",alignment:\"top\"},rightside_bottom:{side:\"rightside\",alignment:\"bottom\"},topside_left:{side:\"topside\",alignment:\"left\"},topside_right:{side:\"topside\",alignment:\"right\"},bottomside_left:{side:\"bottomside\",alignment:\"left\"},bottomside_right:{side:\"bottomside\",alignment:\"right\"}},HWn=Object.keys(T9e),OWn=t=\u003e{if(typeof t.x==\"number\"\u0026\u0026typeof t.y==\"number\")return{x:t.x,y:t.y};if(t.points\u0026\u0026t.points.length\u003e0){const e=t.points.map(o=\u003eo.x),n=t.points.map(o=\u003eo.y);return{x:(Math.min(...e)+Math.max(...e))/2,y:(Math.min(...n)+Math.max(...n))/2}}return null},GWn=t=\u003e{for(const e of t.port_hints??[]){const n=String(e).trim().match(/^(?:pin)?(\\d+)$/i);if(n)return Number.parseInt(n[1],10)}return null},YWn=(t,e,n)=\u003e{const o=t.map(f=\u003ef.x),i=t.map(f=\u003ef.y),r=Math.min(...o),s=Math.max(...o),a=Math.min(...i),A=Math.max(...i),c=(r+s)/2,l=(a+A)/2,u=s-r,g=A-a,h=Math.max(u,g,1)*1e-6,{side:d,alignment:p}=T9e[n],m=d===\"leftside\"\u0026\u0026Math.abs(e.x-r)\u003c=h||d===\"rightside\"\u0026\u0026Math.abs(e.x-s)\u003c=h||d===\"topside\"\u0026\u0026Math.abs(e.y-A)\u003c=h||d===\"bottomside\"\u0026\u0026Math.abs(e.y-a)\u003c=h,_=p===\"left\"\u0026\u0026(u\u003c=h||e.x\u003cc-h)||p===\"right\"\u0026\u0026(u\u003c=h||e.x\u003ec+h)||p===\"top\"\u0026\u0026(g\u003c=h||e.y\u003el+h)||p===\"bottom\"\u0026\u0026(g\u003c=h||e.y\u003cl-h);return m\u0026\u0026_},dmt=t=\u003e{const n=t.filter(g=\u003eg.type===\"pcb_smtpad\"||g.type===\"pcb_plated_hole\").map(g=\u003e({center:OWn(g),pinNumber:GWn(g)})),o=n.find(g=\u003eg.pinNumber===1)?.center,i=n.map(g=\u003eg.center).filter(g=\u003eg!==null);if(!o||i.length===0)return null;const r=HWn.filter(g=\u003eYWn(i,o,g));if(r.length===1)return r[0];if(r.length===0)return null;let s;for(const g of n)!g.center||g.pinNumber===null||g.pinNumber\u003c=1||(!s||g.pinNumber\u003cs.pinNumber)\u0026\u0026(s={center:g.center,pinNumber:g.pinNumber});if(!s)return null;const a=i.map(g=\u003eg.x),A=i.map(g=\u003eg.y),l=Math.max(Math.max(...a)-Math.min(...a),Math.max(...A)-Math.min(...A),1)*1e-6;if(n.length===2\u0026\u0026s.pinNumber===2){const g=s.center.x-o.x,h=s.center.y-o.y;if(Math.abs(h)\u003c=l\u0026\u0026Math.abs(g)\u003el)return g\u003e0?\"topside_left\":\"bottomside_right\";if(Math.abs(g)\u003c=l\u0026\u0026Math.abs(h)\u003el)return h\u003e0?\"leftside_bottom\":\"rightside_top\"}const u=r.filter(g=\u003e{const{side:h}=T9e[g];return h===\"leftside\"||h===\"rightside\"?Math.abs(s.center.x-o.x)\u003c=l:Math.abs(s.center.y-o.y)\u003c=l});return u.length===1?u[0]:null},hmt=(t,e)=\u003e{const n=e*Math.PI/180;return{x:t.x*Math.cos(n)-t.y*Math.sin(n),y:t.x*Math.sin(n)+t.y*Math.cos(n)}},k9e=({x:t,y:e,width:n,height:o,ccwRotation:i})=\u003e{const r=n/2,s=o/2;return[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(a=\u003e{const A=hmt(a,i);return{x:t+A.x,y:e+A.y}})},O8=t=\u003e{const e=t.type===\"pcb_plated_hole\"?t.outer_width:t.width,n=t.type===\"pcb_plated_hole\"?t.outer_height:t.height,o=t.type===\"pcb_plated_hole\"?Math.min(e,n)/2:t.radius,i=t.type===\"pcb_plated_hole\"||t.shape===\"rotated_pill\"?t.ccw_rotation:0,r=Math.max(Math.max(e,n)/2-o,0),s=e\u003e=n?{x:r,y:0}:{x:0,y:r},a=hmt(s,i);return{start:{x:t.x-a.x,y:t.y-a.y},end:{x:t.x+a.x,y:t.y+a.y},radius:o}},Cz=t=\u003e{if(t.type===\"pcb_smtpad\"){if(t.shape===\"polygon\")return t.points;if(t.shape===\"rotated_rect\")return k9e({x:t.x,y:t.y,width:t.width,height:t.height,ccwRotation:t.ccw_rotation})}if(t.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in t\u0026\u0026\"rect_pad_height\"in t)return k9e({x:t.x,y:t.y,width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:\"rect_ccw_rotation\"in t\u0026\u0026typeof t.rect_ccw_rotation==\"number\"?t.rect_ccw_rotation:0});throw new Error(`Expected polygonal pad geometry, got ${t.type} with shape \"${t.shape}\"`)},pmt=t=\u003et.map((e,n)=\u003e[e,t[(n+1)%t.length]]),F9e=(t,e,n,o)=\u003e{const i=V4(t,e,n,o);if(i)return{distance:0,pointOnA:i,pointOnB:i,center:i};const r=[{pointOnA:t,pointOnB:SQ(t,n,o)},{pointOnA:e,pointOnB:SQ(e,n,o)},{pointOnA:SQ(n,t,e),pointOnB:n},{pointOnA:SQ(o,t,e),pointOnB:o}];let s=r[0],a=bxe(s.pointOnA,s.pointOnB);for(const A of r.slice(1)){const c=bxe(A.pointOnA,A.pointOnB);c\u003ca\u0026\u0026(s=A,a=c)}return{distance:xV(t,e,n,o),pointOnA:s.pointOnA,pointOnB:s.pointOnB,center:{x:(s.pointOnA.x+s.pointOnB.x)/2,y:(s.pointOnA.y+s.pointOnB.y)/2}}},L9e=(t,e,n)=\u003e{if(n.length\u003c3)return{distance:Number.POSITIVE_INFINITY,center:t,tracePoint:t,obstaclePoint:t};const o=pmt(n).map(([r,s])=\u003eV4(t,e,r,s)).filter(r=\u003er!==null);if(o.length\u003e0){const r=e.x-t.x,s=e.y-t.y,a=r*r+s*s;return o.sort((A,c)=\u003e{const l=((A.x-t.x)*r+(A.y-t.y)*s)/a,u=((c.x-t.x)*r+(c.y-t.y)*s)/a;return l-u}),{distance:0,center:o[0],tracePoint:o[0],obstaclePoint:o[0]}}if(nD(t,n)||nD(e,n)){const r={x:(t.x+e.x)/2,y:(t.y+e.y)/2};return{distance:0,center:r,tracePoint:r,obstaclePoint:r}}let i=F9e(t,e,n[0],n[1]);for(const[r,s]of pmt(n).slice(1)){const a=F9e(t,e,r,s);a.distance\u003ci.distance\u0026\u0026(i=a)}return{distance:i.distance,center:i.center,tracePoint:i.pointOnA,obstaclePoint:i.pointOnB}},UWn=(t,e)=\u003e{const n=O8(e),o=F9e({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},n.start,n.end);return{distance:o.distance,center:o.center,radius:n.radius,tracePoint:o.pointOnA,obstaclePoint:o.pointOnB}};function mmt(t,e){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}var H9e=1e-9,q9=1e-9;function KWn(t,e){const n=(t.y-e.start.y)*(e.end.x-e.start.x)-(t.x-e.start.x)*(e.end.y-e.start.y);if(Math.abs(n)\u003eH9e)return!1;const o=(t.x-e.start.x)*(e.end.x-e.start.x)+(t.y-e.start.y)*(e.end.y-e.start.y);if(o\u003c-H9e)return!1;const i=(e.end.x-e.start.x)**2+(e.end.y-e.start.y)**2;return o\u003c=i+H9e}function O9e(t,e){let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o],s=e[i];if(KWn(t,{start:r,end:s}))return!0;r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n}function G9e(t,e){if(e.type===\"pcb_smtpad\"){if(e.shape===\"circle\")return mmt(t,e)\u003c=e.radius+q9;if(e.shape===\"rect\"){const n=e.width/2,o=e.height/2;return Math.abs(t.x-e.x)\u003c=n+q9\u0026\u0026Math.abs(t.y-e.y)\u003c=o+q9}if(e.shape===\"rotated_rect\")return O9e(t,Cz(e));if(e.shape===\"pill\"||e.shape===\"rotated_pill\"){if(e.shape===\"rotated_pill\"){const A=O8(e);return Zd(t,A.start,A.end)\u003c=A.radius+q9}const n=e.width/2,o=e.height/2,i=e.radius;if(Math.abs(t.x-e.x)\u003c=n-i+q9\u0026\u0026Math.abs(t.y-e.y)\u003c=o+q9)return!0;const r=Math.max(Math.abs(t.x-e.x)-(n-i),0),s=Math.max(Math.abs(t.y-e.y)-(o-i),0),a=i+q9;return r*r+s*s\u003c=a*a}if(e.shape===\"polygon\")return O9e(t,e.points)}if(e.type===\"pcb_plated_hole\"){if(e.shape===\"circle\")return mmt(t,e)\u003c=e.outer_diameter/2+q9;if(\"rect_pad_width\"in e\u0026\u0026\"rect_pad_height\"in e)return O9e(t,Cz(e));if(e.shape===\"oval\"||e.shape===\"pill\")return Math.abs(t.x-e.x)\u003c=e.outer_width/2+q9\u0026\u0026Math.abs(t.y-e.y)\u003c=e.outer_height/2+q9}return!1}function _mt(t,e,n,o){return Math.sqrt((n-t)**2+(o-e)**2)}var fmt=t=\u003e{const e=t.filter(r=\u003er.type===\"pcb_port\"),n=t.filter(r=\u003er.type===\"pcb_smtpad\"),o=t.filter(r=\u003er.type===\"pcb_trace\");function i(r,s={}){const a=s.traceWidth||0,A=e.find(c=\u003e_mt(c.x,c.y,r.x,r.y)\u003c.01);if(A)return A.pcb_port_id;if(s.isFirstOrLastPoint){const c=n.find(l=\u003e{if(l.shape===\"rect\")return Math.abs(r.x-l.x)\u003cl.width/2+a/2\u0026\u0026Math.abs(r.y-l.y)\u003cl.height/2+a/2;if(l.shape===\"circle\")return _mt(r.x,r.y,l.x,l.y)\u003cl.radius;if(l.shape===\"pill\"||l.shape===\"rotated_pill\")return G9e(r,l)});if(c)return c.pcb_port_id??null}return null}for(const r of o)for(let s=0;s\u003cr.route.length;s++){const a=r.route[s],A=s===0||s===r.route.length-1;if(a.route_type===\"wire\"){if(!a.start_pcb_port_id\u0026\u0026s===0){const c=i(a,{isFirstOrLastPoint:A,traceWidth:a.width});c\u0026\u0026(a.start_pcb_port_id=c)}if(!a.end_pcb_port_id\u0026\u0026s===r.route.length-1){const c=i(a,{isFirstOrLastPoint:A,traceWidth:a.width});c\u0026\u0026(a.end_pcb_port_id=c)}}}},Imt=/\\b(?:pcb|source|schematic|subcircuit)_[a-z0-9_]+\\b/i,_se=(t,e,n)=\u003e!t||t===e||Imt.test(t)?n:t,Cmt=(t,e)=\u003e{for(const n of t){const o=_se(n,e,\"\");if(o)return o}return\"\"},HF=(t,e)=\u003e_se(eI(t,e),e,\"component\"),fse=(t,e)=\u003e{const n=t.find(o=\u003eo.type===\"pcb_port\"\u0026\u0026o.pcb_port_id===e);if(n?.type===\"pcb_port\"){const o=t.find(a=\u003ea.type===\"source_port\"\u0026\u0026a.source_port_id===n.source_port_id),i=o?.type===\"source_port\"?t.find(a=\u003ea.type===\"source_component\"\u0026\u0026a.source_component_id===o.source_component_id):null,r=Cmt([i?.type===\"source_component\"?i.name:null],i?.type===\"source_component\"?i.source_component_id:\"\"),s=Cmt([o?.type===\"source_port\"?o.name:null,o?.type===\"source_port\"?o.pin_number?.toString():null,o?.type===\"source_port\"?o.port_hints?.[0]:null],o?.type===\"source_port\"?o.source_port_id:\"\");if(r\u0026\u0026s)return`${r}.${s}`;if(s)return s}return _se(pse(t,e)??eI(t,e),e,\"port\")},VWn=(t,e)=\u003e_se(eI(t,e),e,\"element\"),zWn=t=\u003eImt.test(t);function JWn(t,e,n){const o=e.type===\"pcb_smtpad\"?\"SMD pad\":\"through-hole pad\",i=e.pcb_port_id?fse(t,e.pcb_port_id):null,r=H8([e]),s=(r.minX+r.maxX)/2,a=(r.minY+r.maxY)/2,A=`(${s.toFixed(2)}mm, ${a.toFixed(2)}mm)`;return i?`${o} ${i} at ${A}`:`${o} #${n+1} at ${A}`}function WWn(t){fmt(t);const e=t.filter(c=\u003ec.type===\"source_trace\"),n=t.filter(c=\u003ec.type===\"pcb_port\"),o=t.filter(c=\u003ec.type===\"source_net\"),i=[],r=Vf(t),s=new qne(t),a=new Map;for(const c of n)a.set(c.source_port_id,c);const A=new Map(o.map(c=\u003e[c.source_net_id,c.name]));for(const c of e){const l=c.connected_source_port_ids;if(l.length===1\u0026\u0026c.connected_source_net_ids.length\u003e0){const m=a.get(l[0]);if(!m)continue;if(s.getAllTracesConnectedToPort(m.pcb_port_id).length===0){const f=c.connected_source_net_ids.map(C=\u003eA.get(C)).filter(C=\u003e!!C),I=f.length\u003e0?`net [${f.join(\", \")}]`:\"its connected net\";i.push({type:\"pcb_port_not_connected_error\",message:`Port [${fse(t,m.pcb_port_id)}] is not connected to ${I} by a PCB trace.`,error_type:\"pcb_port_not_connected_error\",pcb_port_ids:[m.pcb_port_id],pcb_component_ids:m.pcb_component_id?[m.pcb_component_id]:[],pcb_port_not_connected_error_id:`pcb_port_not_connected_error_trace_${c.source_trace_id}`})}continue}if(l.length\u003c2)continue;const u=[];for(const m of l){const _=a.get(m);_\u0026\u0026u.push(_)}if(u.length\u003c2)continue;const g=u[0],h=r.getNetConnectedToId(g.pcb_port_id);r.getIdsConnectedToNet(h).filter(m=\u003et.some(_=\u003e_.type===\"pcb_trace\"\u0026\u0026(\"pcb_trace_id\"in _\u0026\u0026_.pcb_trace_id===m||\"route_id\"in _\u0026\u0026_.route_id===m))).length===0\u0026\u0026new Set(u.map(_=\u003e_.pcb_component_id)).size\u003e1\u0026\u0026i.push({type:\"pcb_port_not_connected_error\",message:`Ports [${u.map(_=\u003efse(t,_.pcb_port_id)).join(\", \")}] are not connected together through the same net.`,error_type:\"pcb_port_not_connected_error\",pcb_port_ids:u.map(_=\u003e_.pcb_port_id),pcb_component_ids:u.map(_=\u003e_.pcb_component_id).filter(_=\u003e_!==void 0),pcb_port_not_connected_error_id:`pcb_port_not_connected_error_trace_${c.source_trace_id}`})}return i}var G8={min_trace_width:.1,min_via_hole_edge_to_via_hole_edge_clearance:.1,min_trace_to_pad_edge_clearance:.1,min_pad_edge_to_pad_edge_clearance:.1,min_board_edge_clearance:.2},jWn=.1,ymt=G8.min_trace_width,q4=.005,X9=t=\u003et.find(e=\u003ee.type===\"pcb_board\"),Y8=(t,e)=\u003et?.[e],Z9=t=\u003et.type===\"pcb_keepout\"?t.shape===\"outline\"?{minX:Math.min(...t.outline.map(e=\u003ee.x)),minY:Math.min(...t.outline.map(e=\u003ee.y)),maxX:Math.max(...t.outline.map(e=\u003ee.x)),maxY:Math.max(...t.outline.map(e=\u003ee.y))}:t.shape===\"circle\"?{minX:t.center.x-t.radius,minY:t.center.y-t.radius,maxX:t.center.x+t.radius,maxY:t.center.y+t.radius}:{minX:t.center.x-t.width/2,minY:t.center.y-t.height/2,maxX:t.center.x+t.width/2,maxY:t.center.y+t.height/2}:H8([t]),Y9e=t=\u003e{if(t.type===\"pcb_keepout\"\u0026\u0026t.shape!==\"outline\")return t.center;const e=Z9(t);return zne({x:e.minX,y:e.minY},{x:e.maxX,y:e.maxY})},$Wn=t=\u003e{if(t.type===\"pcb_keepout\"\u0026\u0026t.shape===\"circle\")return t.radius;const e=Z9(t);return Math.min(e.maxX-e.minX,e.maxY-e.minY)/2},ED=t=\u003et.type===\"pcb_via\"||t.shape===\"circle\",BD=t=\u003et.type===\"pcb_smtpad\"\u0026\u0026(t.shape===\"pill\"||t.shape===\"rotated_pill\")||t.type===\"pcb_plated_hole\"\u0026\u0026(t.shape===\"oval\"||t.shape===\"pill\"),bD=t=\u003e{const e=Y9e(t);return{kind:\"circle\",x:e.x,y:e.y,radius:$Wn(t)}},SD=t=\u003e{if(t.type===\"pcb_keepout\"){if(t.shape===\"outline\")return{kind:\"polygon\",points:t.outline};if(t.shape!==\"rect\")throw new Error(`Expected rectangular keepout, got ${t.shape}`);return{kind:\"polygon\",points:[{x:t.center.x-t.width/2,y:t.center.y-t.height/2},{x:t.center.x+t.width/2,y:t.center.y-t.height/2},{x:t.center.x+t.width/2,y:t.center.y+t.height/2},{x:t.center.x-t.width/2,y:t.center.y+t.height/2}]}}if(t.type===\"pcb_smtpad\"\u0026\u0026(t.shape===\"polygon\"||t.shape===\"rotated_rect\"))return{kind:\"polygon\",points:Cz(t)};if(t.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in t\u0026\u0026\"rect_pad_height\"in t)return{kind:\"polygon\",points:Cz(t)};const e=Z9(t);return{kind:\"polygon\",points:[{x:e.minX,y:e.minY},{x:e.maxX,y:e.minY},{x:e.maxX,y:e.maxY},{x:e.minX,y:e.maxY}]}},YQ=(t,e)=\u003e{if(BD(t)\u0026\u0026BD(e)){const n=O8(t),o=O8(e);return xV(n.start,n.end,o.start,o.end)-n.radius-o.radius}if(BD(t)\u0026\u0026ED(e)){const n=O8(t);return Vne(n.start,n.end,bD(e))-n.radius}if(ED(t)\u0026\u0026BD(e)){const n=O8(e);return Vne(n.start,n.end,bD(t))-n.radius}if(BD(t)){const n=O8(t);return L9e(n.start,n.end,SD(e).points).distance-n.radius}if(BD(e)){const n=O8(e);return L9e(n.start,n.end,SD(t).points).distance-n.radius}return ED(t)\u0026\u0026ED(e)?FWn(bD(t),bD(e)):ED(t)?gmt(bD(t),SD(e)):ED(e)?gmt(bD(e),SD(t)):LWn(SD(t),SD(e))},OF=t=\u003e[...Xc(t).pcb_smtpad.list(),...Xc(t).pcb_plated_hole.list()],xmt=t=\u003eXc(t).pcb_trace.list().flatMap(n=\u003e{const o=[];for(let i=0;i\u003cn.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.route_type===\"wire\"\u0026\u0026s.route_type===\"wire\"\u0026\u0026r.layer===s.layer\u0026\u0026o.push({type:\"pcb_trace_segment\",pcb_trace_id:n.pcb_trace_id,_pcbTrace:n,thickness:\"width\"in r?r.width:\"width\"in s?s.width:ymt,layer:r.layer,x1:r.x,y1:r.y,x2:s.x,y2:s.y})}return o}),U9e=({tracePoint:t,obstaclePoint:e,traceRadius:n,obstacleRadius:o})=\u003e{const i=e.x-t.x,r=e.y-t.y,s=Math.hypot(i,r);if(s===0)return zne(t,e);const a=i/s,A=r/s;if(s\u003c=n+o){const u=Math.max(-n,s-o),g=Math.min(n,s+o),h=(u+g)/2;return{x:t.x+a*h,y:t.y+A*h}}const c={x:t.x+a*n,y:t.y+A*n},l={x:e.x-a*o,y:e.y-A*o};return zne(c,l)},Ise=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=t.thickness/2;if(e.type===\"pcb_via\"||ED(e)){const s=e.type===\"pcb_via\"?{x:e.x,y:e.y,radius:e.outer_diameter/2}:bD(e),a=SQ(s,n,o);return{gap:Vne(n,o,s)-i,center:U9e({tracePoint:a,obstaclePoint:s,traceRadius:i,obstacleRadius:s.radius})}}if(BD(e)){const s=UWn(t,e);return{gap:s.distance-i-s.radius,center:U9e({tracePoint:s.tracePoint,obstaclePoint:s.obstaclePoint,traceRadius:i,obstacleRadius:s.radius})}}const r=L9e(n,o,SD(e).points);return{gap:r.distance-i,center:U9e({tracePoint:r.tracePoint,obstaclePoint:r.obstaclePoint,traceRadius:i,obstacleRadius:0})}},Cse=t=\u003et\u003c=0,qWn=(t,e)=\u003eIse({x1:t.x,y1:t.y,x2:t.x,y2:t.y,thickness:t.outer_diameter},e).center,yz=class{buckets;objectsById;getBounds;getId;CELL_SIZE=.4;constructor({objects:t,getBounds:e,getId:n,CELL_SIZE:o}){this.buckets=new Map,this.objectsById=new Map,this.getBounds=e,this.getId=n??(()=\u003ethis._getNextId()),this.CELL_SIZE=o??this.CELL_SIZE;for(const i of t)this.addObject(i)}_idCounter=0;_getNextId(){return`${this._idCounter++}`}addObject(t){const e=this.getBounds(t),n=this.getId(t),o={...t,spatialIndexId:n};this.objectsById.set(n,o);const i=Math.floor(e.minX/this.CELL_SIZE),r=Math.floor(e.minY/this.CELL_SIZE),s=Math.floor(e.maxX/this.CELL_SIZE),a=Math.floor(e.maxY/this.CELL_SIZE);for(let A=i;A\u003c=s;A++)for(let c=r;c\u003c=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l);u?u.push(o):this.buckets.set(l,[o])}}removeObject(t){const e=this.objectsById.get(t);if(!e)return!1;this.objectsById.delete(t);const n=this.getBounds(e),o=Math.floor(n.minX/this.CELL_SIZE),i=Math.floor(n.minY/this.CELL_SIZE),r=Math.floor(n.maxX/this.CELL_SIZE),s=Math.floor(n.maxY/this.CELL_SIZE);for(let a=o;a\u003c=r;a++)for(let A=i;A\u003c=s;A++){const c=`${a}x${A}`,l=this.buckets.get(c);if(l){const u=l.findIndex(g=\u003eg.spatialIndexId===t);u!==-1\u0026\u0026(l.splice(u,1),l.length===0\u0026\u0026this.buckets.delete(c))}}return!0}getBucketKey(t,e){return`${Math.floor(t/this.CELL_SIZE)}x${Math.floor(e/this.CELL_SIZE)}`}getObjectsInBounds(t,e=0){const n=[],o=new Set,i=Math.floor((t.minX-e)/this.CELL_SIZE),r=Math.floor((t.minY-e)/this.CELL_SIZE),s=Math.floor((t.maxX+e)/this.CELL_SIZE),a=Math.floor((t.maxY+e)/this.CELL_SIZE);for(let A=i;A\u003c=s;A++)for(let c=r;c\u003c=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l)||[];for(const g of u){const h=g.spatialIndexId;o.has(h)||(o.add(h),n.push(g))}}return n}};function dx(t){return t.type===\"pcb_trace_segment\"?[t.layer]:t.type===\"pcb_smtpad\"?[t.layer]:t.type===\"pcb_plated_hole\"?Array.isArray(t.layers)?t.layers:[...Kk]:t.type===\"pcb_hole\"?[...Kk]:t.type===\"pcb_via\"?Array.isArray(t.layers)?t.layers:[...Kk]:t.type===\"pcb_keepout\"?Array.isArray(t.layers)?t.layers:[]:[]}var Emt=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=e.minX,r=e.minY,s=e.maxX,a=e.maxY;if(n.x===o.x\u0026\u0026n.y===o.y){const B=Math.max(i,Math.min(s,n.x)),S=Math.max(r,Math.min(a,n.y));return B===n.x\u0026\u0026S===n.y?{x:n.x,y:n.y}:{x:B,y:S}}const A=o.x-n.x,c=o.y-n.y,l=A!==0?(i-n.x)/A:Number.NEGATIVE_INFINITY,u=A!==0?(s-n.x)/A:Number.POSITIVE_INFINITY,g=c!==0?(r-n.y)/c:Number.NEGATIVE_INFINITY,h=c!==0?(a-n.y)/c:Number.POSITIVE_INFINITY,d=Math.max(Math.min(l,u),Math.min(g,h)),p=Math.min(Math.max(l,u),Math.max(g,h));if(d\u003c=p\u0026\u0026p\u003e=0\u0026\u0026d\u003c=1){const B=Math.max(0,Math.min(1,d));return{x:n.x+B*A,y:n.y+B*c}}const m={x:Math.max(i,Math.min(s,n.x)),y:Math.max(r,Math.min(a,n.y))},_={x:Math.max(i,Math.min(s,o.x)),y:Math.max(r,Math.min(a,o.y))},f=(m.x-n.x)**2+(m.y-n.y)**2,I=(_.x-o.x)**2+(_.y-o.y)**2,C=[{start:{x:i,y:r},end:{x:s,y:r}},{start:{x:s,y:r},end:{x:s,y:a}},{start:{x:s,y:a},end:{x:i,y:a}},{start:{x:i,y:a},end:{x:i,y:r}}];let y=Math.min(f,I),x=f\u003c=I?m:_;const E=(B,S,Q)=\u003eMath.max(S,Math.min(Q,B));for(const B of C){const S={x:o.x-n.x,y:o.y-n.y},Q={x:B.end.x-B.start.x,y:B.end.y-B.start.y},w={x:n.x-B.start.x,y:n.y-B.start.y},M=S.x*S.x+S.y*S.y,k=S.x*Q.x+S.y*Q.y,R=S.x*w.x+S.y*w.y,F=Q.x*Q.x+Q.y*Q.y,O=Q.x*w.x+Q.y*w.y,U=M*F-k*k;if(Math.abs(U)\u003c1e-10)continue;let Y=(k*O-F*R)/U,W=(M*O-k*R)/U;Y=E(Y,0,1),W=E(W,0,1);const te={x:n.x+Y*S.x,y:n.y+Y*S.y},j={x:B.start.x+W*Q.x,y:B.start.y+W*Q.y},J=te.x-j.x,oe=te.y-j.y,ie=J*J+oe*oe;ie\u003cy\u0026\u0026(y=ie,x={x:(te.x+j.x)/2,y:(te.y+j.y)/2})}return x},XWn=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i={x:e.x1,y:e.y1},r={x:e.x2,y:e.y2},s={x:o.x-n.x,y:o.y-n.y},a={x:r.x-i.x,y:r.y-i.y},A=s.x*s.x+s.y*s.y,c=a.x*a.x+a.y*a.y;if(A===0||c===0){if(A===0\u0026\u0026c===0)return{x:(n.x+i.x)/2,y:(n.y+i.y)/2};if(A===0){const B=e7(((n.x-i.x)*a.x+(n.y-i.y)*a.y)/c,0,1),S={x:i.x+B*a.x,y:i.y+B*a.y};return{x:(n.x+S.x)/2,y:(n.y+S.y)/2}}const x=e7(((i.x-n.x)*s.x+(i.y-n.y)*s.y)/A,0,1),E={x:n.x+x*s.x,y:n.y+x*s.y};return{x:(E.x+i.x)/2,y:(E.y+i.y)/2}}const l={x:n.x-i.x,y:n.y-i.y},u=s.x*s.x+s.y*s.y,g=s.x*a.x+s.y*a.y,h=s.x*l.x+s.y*l.y,d=a.x*a.x+a.y*a.y,p=a.x*l.x+a.y*l.y,m=u*d-g*g;if(m\u003c1e-10)return ZWn(n,o,i,r,s,a,A,c);let _=(g*p-d*h)/m,f=(u*p-g*h)/m;_=e7(_,0,1),f=e7(f,0,1),f=(_*g+p)/d,f=e7(f,0,1),_=(f*g-h)/u,_=e7(_,0,1);const I={x:n.x+_*s.x,y:n.y+_*s.y},C={x:i.x+f*a.x,y:i.y+f*a.y};return{x:(I.x+C.x)/2,y:(I.y+C.y)/2}},ZWn=(t,e,n,o,i,r,s,a)=\u003e{let A=((n.x-t.x)*i.x+(n.y-t.y)*i.y)/s;A=e7(A,0,1);const c={x:t.x+A*i.x,y:t.y+A*i.y};let l=((o.x-t.x)*i.x+(o.y-t.y)*i.y)/s;l=e7(l,0,1);const u={x:t.x+l*i.x,y:t.y+l*i.y};let g=((t.x-n.x)*r.x+(t.y-n.y)*r.y)/a;g=e7(g,0,1);const h={x:n.x+g*r.x,y:n.y+g*r.y};let d=((e.x-n.x)*r.x+(e.y-n.y)*r.y)/a;d=e7(d,0,1);const p={x:n.x+d*r.x,y:n.y+d*r.y},_=[{pointA:c,pointB:n,distance:Math.sqrt((c.x-n.x)**2+(c.y-n.y)**2)},{pointA:u,pointB:o,distance:Math.sqrt((u.x-o.x)**2+(u.y-o.y)**2)},{pointA:t,pointB:h,distance:Math.sqrt((t.x-h.x)**2+(t.y-h.y)**2)},{pointA:e,pointB:p,distance:Math.sqrt((e.x-p.x)**2+(e.y-p.y)**2)}].reduce((f,I)=\u003eI.distance\u003cf.distance?I:f);return{x:(_.pointA.x+_.pointB.x)/2,y:(_.pointA.y+_.pointB.y)/2}},e7=(t,e,n)=\u003eMath.max(e,Math.min(n,t)),GF=t=\u003e{if(t.type===\"pcb_trace_segment\")return{minX:Math.min(t.x1,t.x2),minY:Math.min(t.y1,t.y2),maxX:Math.max(t.x1,t.x2),maxY:Math.max(t.y1,t.y2)};if(t.type===\"pcb_smtpad\"||t.type===\"pcb_plated_hole\"){if(t.type===\"pcb_smtpad\"\u0026\u0026(t.shape===\"rotated_rect\"||t.shape===\"polygon\")||t.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in t\u0026\u0026\"rect_pad_height\"in t){const n=Cz(t);return{minX:Math.min(...n.map(o=\u003eo.x)),minY:Math.min(...n.map(o=\u003eo.y)),maxX:Math.max(...n.map(o=\u003eo.x)),maxY:Math.max(...n.map(o=\u003eo.y))}}if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"rotated_pill\"){const n=O8(t);return{minX:Math.min(n.start.x,n.end.x)-n.radius,minY:Math.min(n.start.y,n.end.y)-n.radius,maxX:Math.max(n.start.x,n.end.x)+n.radius,maxY:Math.max(n.start.y,n.end.y)+n.radius}}}return H8([t])};function K9e(t){return t.route_type!==\"wire\"?[]:[t.start_pcb_port_id,t.end_pcb_port_id].filter(e=\u003e!!e)}function ejn(t){const e=new Set;for(const n of t.route)for(const o of K9e(n))e.add(o);return Array.from(e)}function yse(t){const e=new Set;for(const n of t)for(const o of ejn(n))e.add(o);return Array.from(e)}var tjn=t=\u003e{if(t.type===\"pcb_via\"||t.type===\"pcb_plated_hole\"\u0026\u0026t.shape===\"circle\")return t.outer_diameter/2;if(t.type===\"pcb_hole\"\u0026\u0026t.hole_shape===\"circle\")return t.hole_diameter/2;if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"circle\")return t.radius;throw new Error(`Could not determine radius of element: ${JSON.stringify(t)}`)},njn=t=\u003et.type===\"pcb_port\"?t.pcb_port_id:t.type===\"pcb_smtpad\"?t.pcb_smtpad_id:t.pcb_plated_hole_id;function ojn(t,{connMap:e,minClearance:n}={}){const o=[];fmt(t),e??=Vf(t);const i=X9(t);n??=Y8(i,\"min_trace_to_pad_edge_clearance\")??jWn;const s=Xc(t).pcb_trace.list().flatMap(C=\u003e{const y=[];for(let x=0;x\u003cC.route.length-1;x++){const E=C.route[x],B=C.route[x+1];E.route_type===\"wire\"\u0026\u0026B.route_type===\"wire\"\u0026\u0026E.layer===B.layer\u0026\u0026y.push({type:\"pcb_trace_segment\",pcb_trace_id:C.pcb_trace_id,_pcbTrace:C,thickness:\"width\"in E?E.width:\"width\"in B?B.width:ymt,layer:E.layer,x1:E.x,y1:E.y,x2:B.x,y2:B.y})}return y}),a=Xc(t).pcb_smtpad.list(),A=Xc(t).pcb_plated_hole.list(),c=Xc(t).pcb_port.list(),l=Xc(t).pcb_hole.list(),u=Xc(t).pcb_via.list(),g=Xc(t).pcb_keepout.list(),h=[...c,...a,...A],d=new Map;for(const C of g){const y=new Set(C.excluded_pcb_component_ids??[]);y.size!==0\u0026\u0026d.set(C.pcb_keepout_id,h.filter(x=\u003ex.pcb_component_id\u0026\u0026y.has(x.pcb_component_id)).map(njn))}const p=[...s,...a,...A,...l,...u,...g],m=new yz({objects:p,getBounds:GF}),_=C=\u003eeI(t,C),f=(C,y,x)=\u003eCse(x)?`PCB trace ${C} overlaps with ${y} (accidental contact)`:`PCB trace ${C} is too close to ${y} (gap: ${x.toFixed(3)}mm)`,I=new Set;for(const C of s){const y=n,x=GF(C),E=m.getObjectsInBounds(x,y+C.thickness/2);if(!(C.x1===C.x2\u0026\u0026C.y1===C.y2))for(const B of E){if(!dx(B).includes(C.layer)||B.type===\"pcb_keepout\"\u0026\u0026(d.get(B.pcb_keepout_id)??[]).some(M=\u003ee.areIdsConnected(C.pcb_trace_id,M)))continue;if(B.type===\"pcb_trace_segment\"){const M=B;if(C.layer!==M.layer||e.areIdsConnected(C.pcb_trace_id,M.pcb_trace_id))continue;const k=xV({x:C.x1,y:C.y1},{x:C.x2,y:C.y2},{x:M.x1,y:M.y1},{x:M.x2,y:M.y2})-C.thickness/2-M.thickness/2;if(k\u003en-q4)continue;const R=`overlap_${C.pcb_trace_id}_${M.pcb_trace_id}`,F=`overlap_${M.pcb_trace_id}_${C.pcb_trace_id}`;if(I.has(R)||I.has(F))continue;I.add(R),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:f(_(C.pcb_trace_id),_(M.pcb_trace_id),k),pcb_trace_id:C.pcb_trace_id,source_trace_id:\"\",pcb_trace_error_id:R,pcb_component_ids:[],center:XWn(C,M),pcb_port_ids:yse([C._pcbTrace,M._pcbTrace])});continue}const S=Yh(B);if(e.areIdsConnected(C.pcb_trace_id,\"pcb_trace_id\"in B?B.pcb_trace_id:S))continue;if(B.type===\"pcb_smtpad\"||B.type===\"pcb_plated_hole\"||B.type===\"pcb_via\"){const{gap:M,center:k}=Ise(C,B);if(!Cse(M))continue;const R=`overlap_${C.pcb_trace_id}_${S}`;if(I.has(R))continue;I.add(R),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:f(_(C.pcb_trace_id),`${B.type} \"${_(S)}\"`,M),pcb_trace_id:C.pcb_trace_id,center:k,source_trace_id:\"\",pcb_trace_error_id:R,pcb_component_ids:[\"pcb_component_id\"in B?B.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...yse([C._pcbTrace]),\"pcb_port_id\"in B?B.pcb_port_id:void 0].filter(Boolean)});continue}if(B.type===\"pcb_hole\"){const M=tjn(B),R=Vne({x:C.x1,y:C.y1},{x:C.x2,y:C.y2},{x:B.x,y:B.y,radius:M})-C.thickness/2;if(R\u003en-q4)continue;const F=`overlap_${C.pcb_trace_id}_${S}`;if(I.has(F))continue;I.add(F),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:f(_(C.pcb_trace_id),`${B.type} \"${_(Yh(B))}\"`,R),pcb_trace_id:C.pcb_trace_id,center:Emt(C,GF(B)),source_trace_id:\"\",pcb_trace_error_id:F,pcb_component_ids:[\"pcb_component_id\"in B?B.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...yse([C._pcbTrace]),\"pcb_port_id\"in B?B.pcb_port_id:void 0].filter(Boolean)})}const w=_ct({x:C.x1,y:C.y1},{x:C.x2,y:C.y2},GF(B))-C.thickness/2;if(w+q4\u003cy){const M=`overlap_${C.pcb_trace_id}_${S}`;if(I.has(M))continue;I.add(M),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:f(_(C.pcb_trace_id),`${B.type} \"${_(Yh(B))}\"`,w),pcb_trace_id:C.pcb_trace_id,source_trace_id:\"\",pcb_trace_error_id:M,pcb_component_ids:[\"pcb_component_id\"in B?B.pcb_component_id:void 0].filter(Boolean),center:Emt(C,GF(B)),pcb_port_ids:[...yse([C._pcbTrace]),\"pcb_port_id\"in B?B.pcb_port_id:void 0].filter(Boolean)})}}}return o}var xse=t=\u003et,hx=1e-9,YF=t=\u003et.length\u003c3?null:new Ip(t.map(({x:e,y:n})=\u003enew Gc(e,n))),ijn=t=\u003e{const e=t.filter((i,r)=\u003e{const s=t[r-1];return!s||Math.abs(s.x-i.x)\u003ehx||Math.abs(s.y-i.y)\u003ehx});if(e.length\u003e1\u0026\u0026Math.abs(e[0].x-e.at(-1).x)\u003c=hx\u0026\u0026Math.abs(e[0].y-e.at(-1).y)\u003c=hx\u0026\u0026e.pop(),e.length\u003c3)return null;const n=[];for(let i=0;i\u003ce.length;i++){const r=e[i],s=e[(i+1)%e.length],a=new Gc(r.x,r.y),A=new Gc(s.x,s.y),c=r.bulge??0;if(Math.abs(c)\u003c=hx){n.push(new _D(a,A));continue}const l=a.distanceTo(A)[0];if(l\u003c=hx)continue;const u={x:(r.x+s.x)/2,y:(r.y+s.y)/2},g={x:-(s.y-r.y)/l,y:(s.x-r.x)/l},h=l*(1-c*c)/(4*c),d=new Gc(u.x+g.x*h,u.y+g.y*h),p=l*(1+c*c)/(4*Math.abs(c));n.push(new T8(d,p,Math.atan2(r.y-d.y,r.x-d.x),Math.atan2(s.y-d.y,s.x-d.x),c\u003e0))}if(n.length\u003c3)return null;const o=new Ip;return o.addFace(n),o},rjn=t=\u003e{if(t.outline\u0026\u0026t.outline.length\u003e=3)return YF(t.outline);if(!t.center||typeof t.width!=\"number\"||typeof t.height!=\"number\")return null;const e=t.width/2,n=t.height/2;return YF([{x:t.center.x-e,y:t.center.y-n},{x:t.center.x+e,y:t.center.y-n},{x:t.center.x+e,y:t.center.y+n},{x:t.center.x-e,y:t.center.y+n}])},Ese=({x:t,y:e,width:n,height:o,ccwRotationDegrees:i=0})=\u003e{const r=n/2,s=o/2,a=F9(i,t,e);return YF([{x:t-r,y:e-s},{x:t+r,y:e-s},{x:t+r,y:e+s},{x:t-r,y:e+s}].map(A=\u003eBn(a,A)))},V9e=({x:t,y:e,width:n,height:o,cornerRadius:i,ccwRotationDegrees:r=0})=\u003e{const s=Math.max(0,Math.min(i,n/2,o/2));if(s\u003c=hx){const d=Ese({x:t,y:e,width:n,height:o,ccwRotationDegrees:r});return d?{kind:\"shapes\",shapes:[d]}:null}const a=[],A=n-2*s,c=o-2*s;if(A\u003ehx){const d=Ese({x:t,y:e,width:A,height:o,ccwRotationDegrees:r});d\u0026\u0026a.push(d)}if(c\u003ehx){const d=Ese({x:t,y:e,width:n,height:c,ccwRotationDegrees:r});d\u0026\u0026a.push(d)}const l=A/2,u=c/2,g=F9(r,t,e),h=[{x:t-l,y:e-u},{x:t+l,y:e-u},{x:t+l,y:e+u},{x:t-l,y:e+u}].map(d=\u003eBn(g,d)).filter((d,p,m)=\u003em.findIndex(_=\u003eMath.abs(_.x-d.x)\u003c=hx\u0026\u0026Math.abs(_.y-d.y)\u003c=hx)===p);return a.push(...h.map(d=\u003enew fD(new Gc(d.x,d.y),s))),a.length\u003e0?{kind:\"shapes\",shapes:a}:null},z9e=({x:t,y:e,width:n,height:o,radius:i,ccwRotationDegrees:r=0})=\u003e{const s=Math.max(Math.max(n,o)/2-i,0),a=n\u003e=o?{x:s,y:0}:{x:0,y:s},A=Bn(F9(r),a);return s\u003c=hx?{kind:\"shapes\",shapes:[new fD(new Gc(t,e),i)]}:{kind:\"pill\",centerLine:new _D(new Gc(t-A.x,e-A.y),new Gc(t+A.x,e+A.y)),radius:i}},sjn=t=\u003e{switch(t.shape){case\"circle\":return{kind:\"shapes\",shapes:[new fD(new Gc(t.x,t.y),t.radius)]};case\"rect\":return V9e({x:t.x,y:t.y,width:t.width,height:t.height,cornerRadius:t.rect_border_radius??t.corner_radius??0});case\"rotated_rect\":return V9e({x:t.x,y:t.y,width:t.width,height:t.height,cornerRadius:t.rect_border_radius??t.corner_radius??0,ccwRotationDegrees:t.ccw_rotation});case\"pill\":return z9e({x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius});case\"rotated_pill\":return z9e({x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius,ccwRotationDegrees:t.ccw_rotation});case\"polygon\":{const e=YF(t.points);return e?{kind:\"shapes\",shapes:[e]}:null}}},ajn=(t,e)=\u003e{switch(t.shape){case\"circle\":return{kind:\"shapes\",shapes:[new fD(new Gc(t.x,t.y),t.outer_diameter/2)]};case\"oval\":case\"pill\":return z9e({x:t.x,y:t.y,width:t.outer_width,height:t.outer_height,radius:Math.min(t.outer_width/2,t.outer_height/2),ccwRotationDegrees:t.ccw_rotation});case\"circular_hole_with_rect_pad\":case\"pill_hole_with_rect_pad\":case\"rotated_pill_hole_with_rect_pad\":return V9e({x:t.x,y:t.y,width:t.rect_pad_width,height:t.rect_pad_height,cornerRadius:t.rect_border_radius??0,ccwRotationDegrees:\"rect_ccw_rotation\"in t?t.rect_ccw_rotation??0:0});case\"hole_with_polygon_pad\":{const n=t.ccw_rotation??e,o=F9(n),i=YF(t.pad_outline.map(r=\u003e{const s=Bn(o,r);return{x:t.x+s.x,y:t.y+s.y}}));return i?{kind:\"shapes\",shapes:[i]}:null}}},Ajn=(t,e)=\u003e{if(t.type===\"pcb_via\")return{kind:\"shapes\",shapes:[new fD(new Gc(t.x,t.y),t.outer_diameter/2)]};if(t.type===\"pcb_smtpad\")return sjn(t);if(t.type===\"pcb_plated_hole\")return ajn(t,t.pcb_component_id?e.get(xse(t.pcb_component_id))??0:0);let n;switch(t.shape){case\"rect\":n=Ese({x:t.center.x,y:t.center.y,width:t.width,height:t.height,ccwRotationDegrees:t.rotation??0});break;case\"polygon\":n=YF(t.points);break;case\"brep\":n=ijn(t.brep_shape.outer_ring.vertices);break}return n?{kind:\"shapes\",shapes:[n]}:null},cjn=t=\u003et.type===\"pcb_via\"?t.pcb_via_id:t.type===\"pcb_smtpad\"?t.pcb_smtpad_id:t.type===\"pcb_plated_hole\"?t.pcb_plated_hole_id:t.pcb_copper_pour_id,ljn=t=\u003et.type===\"pcb_via\"?\"Via\":t.type===\"pcb_smtpad\"?\"SMT pad\":t.type===\"pcb_plated_hole\"?\"Plated hole\":\"Copper pour\",ujn=(t,e)=\u003e{if(e.kind===\"shapes\"){const r=e.shapes.every(s=\u003et.contains(s));return{isInside:r,clearance:r?Math.min(...e.shapes.map(s=\u003et.distanceTo(s)[0])):0}}const o=t.distanceTo(e.centerLine)[0]-e.radius,i=t.contains(e.centerLine)\u0026\u0026o\u003e=-hx;return{isInside:i,clearance:i?Math.max(0,o):0}};function gjn(t){const e=X9(t);if(!e)return[];const n=rjn(e);if(!n)return[];const o=Y8(e,\"min_board_edge_clearance\")??G8.min_board_edge_clearance;if(o===void 0)return[];const i=new Set(t.filter(A=\u003eA.type===\"pcb_component\").filter(A=\u003eA.is_allowed_to_be_off_board).map(A=\u003exse(A.pcb_component_id))),r=t.filter(A=\u003eA.type===\"pcb_via\"||A.type===\"pcb_smtpad\"||A.type===\"pcb_plated_hole\"||A.type===\"pcb_copper_pour\"),s=new Map(t.filter(A=\u003eA.type===\"pcb_component\").map(A=\u003e[xse(A.pcb_component_id),A.rotation])),a=[];for(const A of r){if((A.type===\"pcb_smtpad\"||A.type===\"pcb_plated_hole\")\u0026\u0026A.pcb_component_id\u0026\u0026i.has(xse(A.pcb_component_id)))continue;const c=Ajn(A,s);if(!c)continue;const{isInside:l,clearance:u}=ujn(n,c);if(l\u0026\u0026u+hx\u003e=o)continue;const g=cjn(A),h=ljn(A);a.push({type:\"pcb_placement_error\",pcb_placement_error_id:`copper_too_close_to_board_edge_${g}`,error_type:\"pcb_placement_error\",message:`${h} ${g} violates copper-to-board-edge clearance (measured ${u.toFixed(3)}mm, required ${o.toFixed(3)}mm)`})}return a}function Bmt(t){return t.area()\u003e=0}function bmt({center:t,size:e,rotationDeg:n=0}){const o=t.x,i=t.y,r=e.width/2,s=e.height/2,a=[new Gc(o-r,i-s),new Gc(o+r,i-s),new Gc(o+r,i+s),new Gc(o-r,i+s)];let A=new Ip(a);if(n){const c=F9(n,o,i),l=a.map(u=\u003e{const g=Bn(c,{x:u.x,y:u.y});return new Gc(g.x,g.y)});A=new Ip(l)}return Bmt(A)||A.reverse(),A}function djn({board:t}){if(t.outline\u0026\u0026t.outline.length\u003e0){const e=t.outline.map(o=\u003enew Gc(o.x,o.y)),n=new Ip(e);return Bmt(n)||n.reverse(),n}return t.center\u0026\u0026typeof t.width==\"number\"\u0026\u0026typeof t.height==\"number\"?bmt({center:t.center,size:{width:t.width,height:t.height},rotationDeg:0}):null}function hjn({circuitJson:t,component:e}){if(e.source_component_id){const n=t.find(o=\u003eo.type===\"source_component\"\u0026\u0026o.source_component_id===e.source_component_id);if(n\u0026\u0026\"name\"in n\u0026\u0026n.name)return n.name}return HF(t,e.pcb_component_id)}function pjn(t,e,n,o,i,r){const s=new Gc(n.x,n.y);if(!e.contains(s)){const p=e.distanceTo(s);return Array.isArray(p)?p[0]:Number(p)||0}const a=o/2,A=i/2,c=[{x:n.x-a,y:n.y-A},{x:n.x+a,y:n.y-A},{x:n.x+a,y:n.y+A},{x:n.x-a,y:n.y+A}],l=[];for(let p=0;p\u003c4;p++){const m=(p+1)%4;l.push({x:(c[p].x+c[m].x)/2,y:(c[p].y+c[m].y)/2})}const u=F9(r,n.x,n.y),g=p=\u003e{const m=Bn(u,p);return new Gc(m.x,m.y)},h=c.concat(l).map(g);let d=0;for(const p of h)if(!e.contains(p)){const m=e.distanceTo(p),_=Array.isArray(m)?m[0]:Number(m)||0;_\u003ed\u0026\u0026(d=_)}if(d\u003e0)return d;try{const p=YBe.intersect(t,e);let m=0;p?Array.isArray(p)?m=p.reduce((f,I)=\u003ef+(typeof I.area==\"function\"?I.area():0),0):typeof p.area==\"function\"?m=p.area():m=0:m=0;const _=t.area();if(m\u003e0\u0026\u0026m\u003c_){const f=1-m/_,I=Math.abs(o),C=Math.abs(i);return Math.min(I,C)*f}else return .1}catch{return .1}}function mjn({componentPoly:t,boardPoly:e}){const n=e.box,o=t.box;let i=0,r=0;if(o.xmin\u003cn.xmin?i=n.xmin-o.xmin:o.xmax\u003en.xmax\u0026\u0026(i=n.xmax-o.xmax),o.ymin\u003cn.ymin?r=n.ymin-o.ymin:o.ymax\u003en.ymax\u0026\u0026(r=n.ymax-o.ymax),i===0\u0026\u0026r===0)return null;const s=i\u003e=0?\"right\":\"left\",a=r\u003e=0?\"up\":\"down\",A=Math.abs(Math.round(i*100)/100),c=Math.abs(Math.round(r*100)/100);return A\u003e0\u0026\u0026c\u003e0?`Try moving it ${A}mm ${s} and ${c}mm ${a} to fit within the board edge.`:A\u003e0?`Try moving it ${A}mm ${s} to fit within the board edge.`:`Try moving it ${c}mm ${a} to fit within the board edge.`}function _jn(t){const e=t.find(r=\u003er.type===\"pcb_board\");if(!e)return[];const n=djn({board:e});if(!n)return[];const o=t.filter(r=\u003er.type===\"pcb_component\");if(o.length===0)return[];const i=[];for(const r of o){if(r.is_allowed_to_be_off_board||!r.center||typeof r.width!=\"number\"||typeof r.height!=\"number\"||r.width\u003c=0||r.height\u003c=0)continue;const s=bmt({center:r.center,size:{width:r.width,height:r.height},rotationDeg:0});if(s.area()===0||n.contains(s))continue;const A=pjn(s,n,r.center,r.width,r.height,0),c=hjn({circuitJson:t,component:r}),l=Math.round(A*100)/100,u=mjn({componentPoly:s,boardPoly:n});i.push({type:\"pcb_component_outside_board_error\",error_type:\"pcb_component_outside_board_error\",pcb_component_outside_board_error_id:`pcb_component_outside_board_${r.pcb_component_id}`,message:`Component ${c} extends outside board boundaries by ${l}mm.${u?` ${u}`:\"\"}`,pcb_component_id:r.pcb_component_id,pcb_board_id:e.pcb_board_id,component_center:r.center,component_bounds:{min_x:s.box.xmin,max_x:s.box.xmax,min_y:s.box.ymin,max_y:s.box.ymax},subcircuit_id:r.subcircuit_id,source_component_id:r.source_component_id})}return i}var Smt=32;function Qmt({center:t,width:e,height:n,rotation:o=0}){const i=e/2,r=n/2,s=[{x:t.x-i,y:t.y-r},{x:t.x+i,y:t.y-r},{x:t.x+i,y:t.y+r},{x:t.x-i,y:t.y+r}],a=F9(o,t.x,t.y);return new Ip(s.map(A=\u003e{const c=o?Bn(a,A):A;return new Gc(c.x,c.y)}))}function fjn({center:t,radius:e}){return new Ip(Array.from({length:Smt},(n,o)=\u003e{const i=2*Math.PI*o/Smt;return new Gc(t.x+Math.cos(i)*e,t.y+Math.sin(i)*e)}))}function Ijn(t){return t.shape===\"rect\"?Qmt({center:t.center,width:t.width,height:t.height,rotation:t.rotation??0}):t.shape===\"circle\"?fjn({center:t.center,radius:t.radius}):t.shape===\"polygon\"?new Ip(t.points.map(e=\u003enew Gc(e.x,e.y))):null}function vmt(t){return{minX:t.box.xmin,minY:t.box.ymin,maxX:t.box.xmax,maxY:t.box.ymax}}function Cjn(t,e){if(!z4(vmt(t),vmt(e)))return!1;if(t.contains(e)||e.contains(t))return!0;try{const n=YBe.intersect(t,e);return Array.isArray(n)?n.some(o=\u003eo.area()\u003e0):n.area()\u003e0}catch{return!1}}function yjn(t){const e=t.filter(r=\u003er.type===\"pcb_cutout\"),n=t.filter(r=\u003er.type===\"pcb_component\");if(e.length===0||n.length===0)return[];const o=e.map(r=\u003e({cutout:r,polygon:Ijn(r)})).filter(r=\u003er.polygon!==null\u0026\u0026r.polygon.area()\u003e0),i=[];for(const r of n){if(!r.center||r.width\u003c=0||r.height\u003c=0)continue;const s=Qmt({center:r.center,width:r.width,height:r.height});for(const{cutout:a,polygon:A}of o){if(a.pcb_component_id===r.pcb_component_id||!Cjn(s,A))continue;const c=HF(t,r.pcb_component_id),l=a.pcb_cutout_id;i.push({type:\"pcb_placement_error\",pcb_placement_error_id:`component_over_cutout_${r.pcb_component_id}_${l}`,error_type:\"pcb_placement_error\",message:`Component ${c} overlaps with pcb_cutout [${l}]`,subcircuit_id:r.subcircuit_id})}}return i}var xjn=t=\u003e\"pcb_component_id\"in t\u0026\u0026t.pcb_component_id?t.pcb_component_id:Yh(t),Ejn=(t,e)=\u003e{if(\"pcb_component_id\"in e\u0026\u0026e.pcb_component_id){const n=t.find(r=\u003er.type===\"pcb_component\"\u0026\u0026r.pcb_component_id===e.pcb_component_id),o=n?.type===\"pcb_component\"?t.find(r=\u003er.type===\"source_component\"\u0026\u0026r.source_component_id===n.source_component_id):void 0;return`component ${o?.type===\"source_component\"\u0026\u0026o.name?o.name:HF(t,e.pcb_component_id)}`}return e.type===\"pcb_via\"?`via ${e.pcb_via_id}`:`${e.type} ${Yh(e)}`};function Bjn(t){const e=Xc(t).pcb_keepout.list();if(e.length===0)return[];const n=[...OF(t),...Xc(t).pcb_via.list()],o=new Map;for(const i of e){const r=new Set(i.excluded_pcb_component_ids??[]);for(const s of n){const a=\"pcb_component_id\"in s?s.pcb_component_id:void 0;if(a\u0026\u0026r.has(a)||!dx(s).some(u=\u003ei.layers.includes(u))||YQ(s,i)\u003eq4)continue;const l=`copper_over_keepout_${xjn(s)}_${i.pcb_keepout_id}`;o.has(l)||o.set(l,{type:\"pcb_placement_error\",pcb_placement_error_id:l,error_type:\"pcb_placement_error\",message:`Copper for ${Ejn(t,s)} overlaps ${i.description?`PCB keepout \"${i.description}\"`:\"a PCB keepout\"}`,subcircuit_id:s.subcircuit_id??i.subcircuit_id})}}return[...o.values()]}function xz(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function wmt(t,e){return xz(t,e)\u003c=q4}function bjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=\u003ea.type===\"pcb_via\");if(o.length\u003c2)return[];const i=X9(t);n??=Y8(i,\"min_via_hole_edge_to_via_hole_edge_clearance\")??G8.min_via_hole_edge_to_via_hole_edge_clearance,e??=Vf(t);const r=[],s=new Set;for(let a=0;a\u003co.length;a++)for(let A=a+1;A\u003co.length;A++){const c=o[a],l=o[A];if(wmt(c,l)||!e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=xz(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+q4\u003e=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join(\"_\");s.has(g)||(s.add(g),r.push({type:\"pcb_via_clearance_error\",pcb_error_id:`same_net_vias_close_${g}`,message:`Vias ${eI(t,c.pcb_via_id)} and ${eI(t,l.pcb_via_id)} are too close together (gap: ${u.toFixed(3)}mm)`,error_type:\"pcb_via_clearance_error\",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function Sjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=\u003ea.type===\"pcb_via\");if(o.length\u003c2)return[];const i=X9(t);n??=Y8(i,\"min_via_hole_edge_to_via_hole_edge_clearance\")??G8.min_via_hole_edge_to_via_hole_edge_clearance,e??=Vf(t);const r=[],s=new Set;for(let a=0;a\u003co.length;a++)for(let A=a+1;A\u003co.length;A++){const c=o[a],l=o[A];if(wmt(c,l)||e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=xz(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+q4\u003e=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join(\"_\");s.has(g)||(s.add(g),r.push({type:\"pcb_via_clearance_error\",pcb_error_id:`different_net_vias_close_${g}`,message:`Vias ${eI(t,c.pcb_via_id)} and ${eI(t,l.pcb_via_id)} from different nets are too close together (gap: ${u.toFixed(3)}mm)`,error_type:\"pcb_via_clearance_error\",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function Qjn(t){const e=[],n=t.filter(a=\u003ea.type===\"source_trace\"),o=t.filter(a=\u003ea.type===\"pcb_trace\"),i=t.filter(a=\u003ea.type===\"pcb_port\"),r=new Map(i.map(a=\u003e[a.source_port_id,a])),s=Vf(t);for(const a of n){if(!a.connected_source_port_ids?.length||(a.connected_source_net_ids?.length??0)\u003e0||a.connected_source_port_ids.length\u003c2)continue;if(!o.some(c=\u003es.areIdsConnected(a.source_trace_id,c.pcb_trace_id))){const c=a.connected_source_port_ids.map(u=\u003er.get(u)).filter(u=\u003eu!==void 0),l=Array.from(new Set(c.map(u=\u003eu.pcb_component_id).filter(u=\u003eu!==void 0)));e.push({type:\"pcb_trace_missing_error\",pcb_trace_missing_error_id:`pcb_trace_missing_${a.source_trace_id}`,error_type:\"pcb_trace_missing_error\",message:`Trace [${a.display_name\u0026\u0026!zWn(a.display_name)?a.display_name:\"trace\"}] is not connected (it has no PCB trace)`,source_trace_id:a.source_trace_id,pcb_component_ids:l,pcb_port_ids:c.map(u=\u003eu.pcb_port_id)})}}return e}var Ez=1e-9;function vjn(t,e){const n=new Map,o=OF(t),i=t.filter(u=\u003eu.type===\"pcb_trace\"),r=t.filter(u=\u003eu.type===\"pcb_via\"),a=t.find(u=\u003eu.type===\"pcb_board\")?.num_layers,c=[\"top\",...Kk.filter(u=\u003eu.startsWith(\"inner\")).slice(0,a===void 0?void 0:Math.max(0,a-2)),...a===1?[]:[\"bottom\"]],l=(u,g,h)=\u003e{if(![h.x,h.y].every(Number.isFinite))return;const d=e.getNetConnectedToId(u);if(!d)return;const p=o.some(I=\u003e{if(e.getNetConnectedToId(Yh(I))!==d||!dx(I).some(y=\u003eg.includes(y)))return!1;if(h.radius===void 0)return G9e(h,I);const C={type:\"pcb_via\",pcb_via_id:u,x:h.x,y:h.y,outer_diameter:h.radius*2,hole_diameter:0,layers:g};return YQ(C,I)\u003c=Ez}),m=new Set;for(const I of i)if(!(I.route_thickness_mode===\"interpolated\"||e.getNetConnectedToId(I.pcb_trace_id)!==d))for(let C=1;C\u003cI.route.length;C++){const y=I.route[C-1],x=I.route[C];if(y.route_type!==\"wire\"||x.route_type!==\"wire\"||y.layer!==x.layer||!g.includes(y.layer)||!Number.isFinite(y.width)||y.width\u003c=0||Math.hypot(y.x-x.x,y.y-x.y)\u003c=Ez)continue;const E=h.radius===void 0?0:h.radius+y.width/2;if(Zd(h,y,x)\u003c=E+Ez){m.add(I.pcb_trace_id);break}}const _={...h,touchesPad:p,touchingTraceIds:m},f=n.get(d)??new Map;for(const I of g){const C=f.get(I)??[];C.push(_),f.set(I,C)}n.set(d,f)};for(const u of r)!Number.isFinite(u.outer_diameter)||u.outer_diameter\u003c=0||l(u.pcb_via_id,dx(u),{x:u.x,y:u.y,ownerTraceId:u.pcb_trace_id,radius:u.outer_diameter/2});for(const u of t)if(u.type===\"pcb_trace\")for(const g of u.route){if(g.route_type!==\"via\"||r.some(m=\u003eMath.hypot(m.x-g.x,m.y-g.y)\u003c=Ez\u0026\u0026(m.pcb_trace_id===u.pcb_trace_id||!m.pcb_trace_id\u0026\u0026e.areIdsConnected(m.pcb_via_id,u.pcb_trace_id))))continue;const h=c.indexOf(g.from_layer),d=c.indexOf(g.to_layer);if(h\u003c0||d\u003c0)continue;const p=g.outer_diameter;p!==void 0\u0026\u0026(!Number.isFinite(p)||p\u003c=0)||l(u.pcb_trace_id,c.slice(Math.min(h,d),Math.max(h,d)+1),{x:g.x,y:g.y,ownerTraceId:u.pcb_trace_id,radius:p===void 0?void 0:p/2})}return n}function Pmt({point:t,width:e,ownerTrace:n,index:o,connectivity:i}){if(t.route_type!==\"wire\"||!Number.isFinite(e)||e\u003c=0)return!1;const r=i.getNetConnectedToId(n.pcb_trace_id);return r?(o.get(r)?.get(t.layer)??[]).some(s=\u003e{if(s.ownerTraceId===n.pcb_trace_id||!s.touchesPad\u0026\u0026![...s.touchingTraceIds].some(A=\u003eA!==n.pcb_trace_id))return!1;const a=s.radius===void 0?0:s.radius+e/2;return Math.hypot(t.x-s.x,t.y-s.y)\u003c=a+Ez}):!1}var Mmt=1e-9,Dmt=1e-9;function UF(t,e){return t.route_type===\"wire\"\u0026\u0026dx(e).includes(t.layer)\u0026\u0026G9e(t,e)}function wjn(t,e){const n=new Map;for(const o of t){if(o.route_thickness_mode===\"interpolated\")continue;const i=e.getNetConnectedToId(o.pcb_trace_id);if(i)for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];if(s.route_type!==\"wire\"||a.route_type!==\"wire\"||s.layer!==a.layer||Math.hypot(s.x-a.x,s.y-a.y)\u003c=Dmt)continue;const A=n.get(i)??new Map,c=A.get(s.layer)??[];c.push({trace:o,start:s,end:a}),A.set(s.layer,c),n.set(i,A)}}return n}function Nmt(t,e){if(t.route_thickness_mode===\"interpolated\")return;let n=e===\"start\"?0:t.route.length-2;const o=e===\"start\"?1:-1;for(;n\u003e=0\u0026\u0026n\u003ct.route.length-1;){const i=t.route[n],r=t.route[n+1];if(i?.route_type!==\"wire\"||r?.route_type!==\"wire\"||i.layer!==r.layer)return;if(Math.hypot(i.x-r.x,i.y-r.y)\u003eDmt)return i.width;n+=o}}function Rmt({point:t,endpointTraceCopperWidth:e,ownerTrace:n,traceWireSegmentsByNetAndLayer:o,fullConnectivityMap:i}){if(t.route_type!==\"wire\")return!1;const r=i.getNetConnectedToId(n.pcb_trace_id);if(!r)return!1;const s=o.get(r)?.get(t.layer)??[];for(const a of s){if(a.trace.pcb_trace_id===n.pcb_trace_id)continue;const A=e/2+a.start.width/2+Mmt;if(Zd(t,a.start,a.end)\u003c=A)return!0}return!1}function Tmt(t){return t.route_type===\"through_pad\"?{x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2}:{x:t.x,y:t.y}}function kmt(t,e,n,o){return e.some(i=\u003e!i.pcb_port_id||i.pcb_port_id===n?!1:o.get(i.pcb_port_id)?.some(s=\u003eUF(t,s))??!1)}function Pjn({firstPoint:t,lastPoint:e,port:n,expectedPorts:o,padMap:i}){let r;const s=t.route_type===\"wire\"?t:void 0,a=e.route_type===\"wire\"?e:void 0,A=K9e(t).includes(n.pcb_port_id),c=K9e(e).includes(n.pcb_port_id);A\u0026\u0026s?r=s:c\u0026\u0026a||kmt(t,o,n.pcb_port_id,i)\u0026\u0026a?r=a:kmt(e,o,n.pcb_port_id,i)\u0026\u0026s?r=s:s\u0026\u0026a?r=xz(s,n)\u003c=xz(a,n)?s:a:s?r=s:a\u0026\u0026(r=a);const l=Tmt(t),u=Tmt(e);return r?{x:r.x,y:r.y}:{x:(l.x+u.x)/2,y:(l.y+u.y)/2}}function Mjn(t){const e=[],n=t.filter(C=\u003eC.type===\"pcb_port\"),o=t.filter(C=\u003eC.type===\"pcb_trace\"),i=t.filter(C=\u003eC.type===\"source_trace\"),r=t.filter(C=\u003eC.type===\"pcb_smtpad\"),s=t.filter(C=\u003eC.type===\"pcb_plated_hole\"),a=new Map,A=new qne(t);let c,l;const u=()=\u003e(c??=Vf(t),c),g=()=\u003e(l??=wjn(o,u()),l);let h;const d=()=\u003e(h??=vjn(t,u()),h),p=new Set;for(const C of r)C.pcb_port_id\u0026\u0026a.set(C.pcb_port_id,[...a.get(C.pcb_port_id)??[],C]);for(const C of s)C.pcb_port_id\u0026\u0026a.set(C.pcb_port_id,[...a.get(C.pcb_port_id)??[],C]);const m=new Map,_=new Map;for(const C of o){const y=new Set,x=C.route[0],E=C.route.at(-1);for(const B of[x,E])if(B)for(const[S,Q]of a)Q.some(w=\u003eUF(B,w))\u0026\u0026y.add(S);m.set(C.pcb_trace_id,y);for(const B of y){const S=_.get(B)??new Set;S.add(C.pcb_trace_id),_.set(B,S)}}const f=new Map,I=C=\u003e{const y=f.get(C.pcb_trace_id);if(y)return y;const x=new Set,E=[C.pcb_trace_id];for(;E.length\u003e0;){const S=E.pop();if(!x.has(S)){x.add(S);for(const Q of A.getAllTracesConnectedToTrace(S))x.has(Q.pcb_trace_id)||E.push(Q.pcb_trace_id);for(const Q of m.get(S)??[])for(const w of _.get(Q)??[])x.has(w)||E.push(w)}}const B=o.filter(S=\u003ex.has(S.pcb_trace_id));for(const S of B)f.set(S.pcb_trace_id,B);return B};for(const C of o){if(C.route.length===0)continue;const y=C.route[0],x=C.route[C.route.length-1],E=i.find(Q=\u003eQ.source_trace_id===C.source_trace_id),B=E?n.filter(Q=\u003eE.connected_source_port_ids?.includes(Q.source_port_id)):[];for(let Q=1;Q\u003cC.route.length-1;Q++){const w=C.route[Q-1],M=C.route[Q],k=C.route[Q+1];if(M.route_type===\"via\"){const R=w.route_type===\"wire\",F=k.route_type===\"wire\";if(R\u0026\u0026F){const O=Math.abs(w.x-M.x)\u003c.01\u0026\u0026Math.abs(w.y-M.y)\u003c.01,U=Math.abs(k.x-M.x)\u003c.01\u0026\u0026Math.abs(k.y-M.y)\u003c.01;if(!O||!U){const Y=P9e(t,C.pcb_trace_id);e.push({type:\"pcb_trace_error\",message:`Via in trace [${Y}] is misaligned at position {x: ${M.x}, y: ${M.y}}.`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`misaligned_via_${C.pcb_trace_id}_${Q}`,pcb_component_ids:[],pcb_port_ids:[]})}}}}const S=P9e(t,C.pcb_trace_id);if(E\u0026\u0026B.length\u003e0){if(p.has(E.source_trace_id))continue;p.add(E.source_trace_id)}for(const Q of B){if(!Q.pcb_port_id)continue;const w=a.get(Q.pcb_port_id);if(!w?.length||I(C).some(F=\u003em.get(F.pcb_trace_id)?.has(Q.pcb_port_id)))continue;const k=w.some(F=\u003eUF(y,F)),R=w.some(F=\u003eUF(x,F));if(!k\u0026\u0026!R){const F=pse(t,Q.pcb_port_id).replace(\"pcb_port\",\"\"),O=w[0].type.replace(/pcb_/,\"\"),U=Pjn({firstPoint:y,lastPoint:x,port:Q,expectedPorts:B,padMap:a});e.push({type:\"pcb_trace_error\",message:`Trace [${S}] is missing a connection to ${O}${F}`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`missing_connection_${C.pcb_trace_id}_${Q.pcb_port_id}`,center:U,pcb_component_ids:[],pcb_port_ids:[Q.pcb_port_id]})}}if(B.length===0){let Q=!1,w=!1;for(const W of a.values())W.some(te=\u003eUF(y,te))\u0026\u0026(Q=!0),W.some(te=\u003eUF(x,te))\u0026\u0026(w=!0);const M=Q?void 0:Nmt(C,\"start\"),k=w?void 0:Nmt(C,\"end\"),R=M!==void 0\u0026\u0026Rmt({point:y,endpointTraceCopperWidth:M,ownerTrace:C,traceWireSegmentsByNetAndLayer:g(),fullConnectivityMap:u()}),F=k!==void 0\u0026\u0026Rmt({point:x,endpointTraceCopperWidth:k,ownerTrace:C,traceWireSegmentsByNetAndLayer:g(),fullConnectivityMap:u()}),O=Q||R||M!==void 0\u0026\u0026Pmt({point:y,width:M,ownerTrace:C,index:d(),connectivity:u()}),U=w||F||k!==void 0\u0026\u0026Pmt({point:x,width:k,ownerTrace:C,index:d(),connectivity:u()}),Y=y.route_type===\"wire\"\u0026\u0026x.route_type===\"wire\"\u0026\u0026y.layer===x.layer\u0026\u0026Math.hypot(y.x-x.x,y.y-x.y)\u003c=Mmt;!O\u0026\u0026y.route_type===\"wire\"\u0026\u0026e.push({type:\"pcb_trace_error\",message:`Trace [${S}] has disconnected endpoint at (${y.x.toFixed(2)}, ${y.y.toFixed(2)})`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${C.pcb_trace_id}_start`,center:{x:y.x,y:y.y},pcb_component_ids:[],pcb_port_ids:[]}),!U\u0026\u0026x.route_type===\"wire\"\u0026\u0026!(Y\u0026\u0026!O)\u0026\u0026e.push({type:\"pcb_trace_error\",message:`Trace [${S}] has disconnected endpoint at (${x.x.toFixed(2)}, ${x.y.toFixed(2)})`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${C.pcb_trace_id}_end`,center:{x:x.x,y:x.y},pcb_component_ids:[],pcb_port_ids:[]})}}return e}function Djn(t){if(t.outline\u0026\u0026t.outline.length\u003e0)return t.outline.map(e=\u003e({x:e.x,y:e.y}));if(t.center\u0026\u0026typeof t.width==\"number\"\u0026\u0026typeof t.height==\"number\"){const e=t.center.x,n=t.center.y,o=t.width/2,i=t.height/2;return[{x:e-o,y:n-i},{x:e+o,y:n-i},{x:e+o,y:n+i},{x:e-o,y:n+i}]}return null}function Njn(t,e={}){const n=[],o=X9(t);if(!o)return n;const i=e.margin??Y8(o,\"min_board_edge_clearance\")??G8.min_board_edge_clearance,r=Djn(o);if(!r)return n;const s=Xc(t).pcb_trace.list();for(const a of s)if(!(a.route.length\u003c2))for(let A=0;A\u003ca.route.length-1;A++){const c=a.route[A],l=a.route[A+1];if(c.route_type!==\"wire\"||l.route_type!==\"wire\")continue;const u=\"width\"in c?c.width:\"width\"in l?l.width:.1,g={x:c.x,y:c.y},h={x:l.x,y:l.y};let d=Number.POSITIVE_INFINITY;for(let m=0;m\u003cr.length;m++){const _=r[m],f=r[(m+1)%r.length],I=xV(g,h,_,f);I\u003cd\u0026\u0026(d=I)}const p=u/2+i;if(d\u003cp){const m={type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",pcb_trace_error_id:`trace_too_close_to_board_${a.pcb_trace_id}_segment_${A}`,message:`Trace too close to board edge (${d.toFixed(3)}mm \u003c ${p.toFixed(3)}mm required, margin: ${i}mm)`,pcb_trace_id:a.pcb_trace_id,source_trace_id:a.source_trace_id||\"\",center:{x:(g.x+h.x)/2,y:(g.y+h.y)/2},pcb_component_ids:[],pcb_port_ids:[]};n.push(m)}}return n}var J9e=t=\u003et.type===\"pcb_courtyard_circle\"||t.type===\"pcb_courtyard_outline\"||t.type===\"pcb_courtyard_polygon\"||t.type===\"pcb_courtyard_rect\",Rjn=t=\u003e{switch(t.type){case\"pcb_courtyard_circle\":return t.pcb_courtyard_circle_id;case\"pcb_courtyard_outline\":return t.pcb_courtyard_outline_id;case\"pcb_courtyard_polygon\":return t.pcb_courtyard_polygon_id;case\"pcb_courtyard_rect\":return t.pcb_courtyard_rect_id}},Fmt=t=\u003e{const e={type:\"pcb_keepout\",pcb_keepout_id:Rjn(t),layers:[t.layer]};if(t.type===\"pcb_courtyard_circle\")return{...e,shape:\"circle\",center:t.center,radius:t.radius};const n=t.type===\"pcb_courtyard_rect\"?k9e({x:t.center.x,y:t.center.y,width:t.width,height:t.height,ccwRotation:t.ccw_rotation??0}):t.type===\"pcb_courtyard_polygon\"?t.points:t.outline;return{...e,shape:\"outline\",outline:n,stroke_width:0}};function Lmt(t){return J9e(t)?[t.layer]:dx(t)}function Tjn(t,e){return t.length===0||e.length===0?!0:t.some(n=\u003ee.includes(n))}function kjn(t,e){const n=Lmt(t),o=Lmt(e);if(!Tjn(n,o))return!1;if(t.type===\"pcb_smtpad\"\u0026\u0026e.type===\"pcb_smtpad\")return YQ(t,e)\u003c=0;if(t.type===\"pcb_plated_hole\"\u0026\u0026J9e(e))return YQ(t,Fmt(e))\u003c=0;if(J9e(t)\u0026\u0026e.type===\"pcb_plated_hole\")return YQ(e,Fmt(t))\u003c=0;const i=H8([t]),r=H8([e]);return z4(i,r)}var W9e=t=\u003et.type===\"pcb_courtyard_circle\"||t.type===\"pcb_courtyard_outline\"||t.type===\"pcb_courtyard_polygon\"||t.type===\"pcb_courtyard_rect\",Hmt=t=\u003et.type===\"pcb_hole\"||t.type===\"pcb_plated_hole\",Omt=(t,e)=\u003e{if(\"pcb_port_id\"in e\u0026\u0026e.pcb_port_id)return fse(t,e.pcb_port_id);const n=Yh(e),o=VWn(t,n);return o===\"element\"?`[${n}]`:o};function Fjn(t){const e=[],n=Vf(t),o=Xc(t).pcb_smtpad.list(),i=Xc(t).pcb_plated_hole.list(),r=Xc(t).pcb_hole.list(),s=t.filter(W9e),a=new Map;for(const c of o){const l=c.pcb_component_id||`standalone_pad_${Yh(c)}`;a.has(l)||a.set(l,{component_id:l,elements:[]}),a.get(l).elements.push(c)}for(const c of i){const l=c.pcb_component_id||`standalone_plated_hole_${Yh(c)}`;a.has(l)||a.set(l,{component_id:l,elements:[]}),a.get(l).elements.push(c)}for(const c of r){const l=c.pcb_component_id||`standalone_hole_${Yh(c)}`;a.has(l)||a.set(l,{component_id:l,elements:[c]})}for(const c of s){const l=c.pcb_component_id;a.has(l)||a.set(l,{component_id:l,elements:[]}),a.get(l).elements.push(c)}for(const[c,l]of a)l.elements.length\u003e0\u0026\u0026(l.bounds=H8(l.elements));const A=Array.from(a.values());for(let c=0;c\u003cA.length;c++)for(let l=c+1;l\u003cA.length;l++){const u=A[c],g=A[l];if(!(!u.bounds||!g.bounds)\u0026\u0026z4(u.bounds,g.bounds))for(const h of u.elements)for(const d of g.elements){const p=Yh(h),m=Yh(d);if(!((W9e(h)||W9e(d))\u0026\u0026!Hmt(h)\u0026\u0026!Hmt(d))\u0026\u0026!(h.type===\"pcb_smtpad\"\u0026\u0026d.type===\"pcb_smtpad\"\u0026\u0026n.areIdsConnected(p,m))\u0026\u0026kjn(h,d)){const _=Omt(t,h),f=Omt(t,d),I={type:\"pcb_footprint_overlap_error\",pcb_error_id:`pcb_footprint_overlap_${p}_${m}`,error_type:\"pcb_footprint_overlap_error\",message:`${h.type} ${_} overlaps with ${d.type} ${f}`,pcb_component_ids:[h.pcb_component_id,d.pcb_component_id].filter(C=\u003e!!C)};(h.type===\"pcb_smtpad\"||d.type===\"pcb_smtpad\")\u0026\u0026(I.pcb_smtpad_ids=[],h.type===\"pcb_smtpad\"\u0026\u0026I.pcb_smtpad_ids.push(p),d.type===\"pcb_smtpad\"\u0026\u0026I.pcb_smtpad_ids.push(m)),(h.type===\"pcb_plated_hole\"||d.type===\"pcb_plated_hole\")\u0026\u0026(I.pcb_plated_hole_ids=[],h.type===\"pcb_plated_hole\"\u0026\u0026I.pcb_plated_hole_ids.push(p),d.type===\"pcb_plated_hole\"\u0026\u0026I.pcb_plated_hole_ids.push(m)),(h.type===\"pcb_hole\"||d.type===\"pcb_hole\")\u0026\u0026(I.pcb_hole_ids=[],h.type===\"pcb_hole\"\u0026\u0026I.pcb_hole_ids.push(p),d.type===\"pcb_hole\"\u0026\u0026I.pcb_hole_ids.push(m)),e.push(I)}}}return e}var Ljn=new Set([\"pcb_courtyard_circle\",\"pcb_courtyard_outline\",\"pcb_courtyard_polygon\",\"pcb_courtyard_pill\",\"pcb_courtyard_rect\"]);function Hjn(t){const e=new Set(t.filter(o=\u003eo.type===\"source_manually_placed_via\").map(o=\u003eo.source_manually_placed_via_id)),n=new Set(t.filter(o=\u003eLjn.has(o.type)).flatMap(o=\u003e\"pcb_component_id\"in o\u0026\u0026o.pcb_component_id?[o.pcb_component_id]:[]));return t.filter(o=\u003eo.type===\"pcb_component\").filter(o=\u003e!n.has(o.pcb_component_id)\u0026\u0026(!o.source_component_id||!e.has(o.source_component_id))).map(o=\u003e{const i=o.source_component_id?t.find(s=\u003es.type===\"source_component\"\u0026\u0026s.source_component_id===o.source_component_id):void 0,r=i?.type===\"source_component\"?i.name:HF(t,o.pcb_component_id);return{type:\"pcb_component_missing_courtyard_warning\",pcb_component_missing_courtyard_warning_id:`pcb_component_missing_courtyard_warning_${o.pcb_component_id}`,warning_type:\"pcb_component_missing_courtyard_warning\",message:`${r} has no courtyard`,pcb_component_id:o.pcb_component_id,source_component_id:o.source_component_id,subcircuit_id:o.subcircuit_id}})}var Ojn=1.6,Gmt=t=\u003et.route_type===\"through_pad\"?t.start:{x:t.x,y:t.y},Gjn=t=\u003e{if(t.trace_length!==void 0)return t.trace_length;let e=0;for(let n=0;n\u003ct.route.length;n++){const o=t.route[n];if(!o)continue;if(o.route_type===\"via\"){e+=Ojn;continue}const i=t.route[n+1];if(!i)continue;const r=Gmt(o),s=Gmt(i);e+=Math.hypot(s.x-r.x,s.y-r.y)}return e},Yjn=t=\u003e{const e=new Set;for(const n of t.route)n.route_type===\"wire\"\u0026\u0026(n.start_pcb_port_id\u0026\u0026e.add(n.start_pcb_port_id),n.end_pcb_port_id\u0026\u0026e.add(n.end_pcb_port_id));return e},Ujn=t=\u003e{const e=t.filter(c=\u003ec.type===\"source_trace\"),n=t.filter(c=\u003ec.type===\"pcb_trace\"),o=t.filter(c=\u003ec.type===\"pcb_port\"),i=new Map(e.map(c=\u003e[c.source_trace_id,c])),r=new Map;for(const c of o){if(!c.source_port_id)continue;const l=r.get(c.source_port_id)??new Set;l.add(c.pcb_port_id),r.set(c.source_port_id,l)}const s=new Map;for(const c of n){if(!c.source_trace_id)continue;const l=s.get(c.source_trace_id)??[];l.push(c),s.set(c.source_trace_id,l)}const a=new Map;for(const c of e){if(c.connected_source_port_ids.length!==2)continue;const l=c.connected_source_port_ids.map(g=\u003er.get(g));if(l.some(g=\u003e!g?.size))continue;const u=new Set((s.get(c.source_trace_id)??[]).filter(g=\u003e{const h=Yjn(g);return l.every(d=\u003e[...d].some(p=\u003eh.has(p)))}).map(g=\u003eg.pcb_trace_id));u.size\u003e0\u0026\u0026a.set(c.source_trace_id,u)}const A=[];for(const c of n){if(!c.source_trace_id)continue;const l=i.get(c.source_trace_id);if(!l)continue;const u=l.max_length;if(typeof u!=\"number\")continue;const g=a.get(l.source_trace_id);if(g\u0026\u0026!g.has(c.pcb_trace_id))continue;const h=Gjn(c);h\u003c=u||A.push({type:\"pcb_trace_too_long_warning\",pcb_trace_too_long_warning_id:`pcb_trace_too_long_warning_${c.pcb_trace_id}`,warning_type:\"pcb_trace_too_long_warning\",message:`PCB trace is ${h.toFixed(2)}mm long, exceeding the ${u}mm maximum`,pcb_trace_id:c.pcb_trace_id,source_trace_id:l.source_trace_id,source_net_id:l.connected_source_net_ids[0],actual_trace_length:h,maximum_trace_length:u,subcircuit_id:c.subcircuit_id??l.subcircuit_id})}return A},Kjn=t=\u003e{const e=t.filter(r=\u003er.type===\"source_trace\"),n=t.filter(r=\u003er.type===\"pcb_trace\"),o=t.filter(r=\u003er.type===\"pcb_port\"),i=[];for(const r of e){const s=r.max_via_count;if(typeof s!=\"number\")continue;const a=n.filter(l=\u003el.source_trace_id===r.source_trace_id);if(a.length===0)continue;const A=a.reduce((l,u)=\u003el+u.route.filter(g=\u003eg.route_type===\"via\").length,0);if(A\u003c=s)continue;const c=o.filter(l=\u003el.source_port_id!==void 0\u0026\u0026r.connected_source_port_ids.includes(l.source_port_id));i.push({type:\"pcb_trace_error\",pcb_trace_error_id:`max_via_count_exceeded_${r.source_trace_id}`,error_type:\"pcb_trace_error\",message:`PCB trace uses ${A} vias, exceeding the ${s} maximum`,pcb_trace_id:a[0].pcb_trace_id,source_trace_id:r.source_trace_id,pcb_component_ids:[...new Set(c.map(l=\u003el.pcb_component_id).filter(l=\u003el!==void 0))],pcb_port_ids:c.map(l=\u003el.pcb_port_id),subcircuit_id:a[0].subcircuit_id??r.subcircuit_id})}return i};function Vjn(t,{connMap:e,minClearance:n}={}){const o=OF(t);if(o.length\u003c2)return[];const i=X9(t);n??=Y8(i,\"min_pad_edge_to_pad_edge_clearance\")??G8.min_pad_edge_to_pad_edge_clearance,e??=Vf(t);const r=new yz({objects:o,getBounds:Z9,getId:a=\u003eYh(a)}),s=new Map;for(const a of o){const A=Yh(a),c=r.getObjectsInBounds(Z9(a),n);for(const l of c){const u=Yh(l);if(A===u||!dx(a).some(_=\u003edx(l).includes(_))||e.areIdsConnected(A,u))continue;const g=[A,u].sort().join(\"_\"),h=YQ(a,l);if(h+q4\u003e=n)continue;const d=Y9e(a),p=Y9e(l),m={type:\"pcb_pad_pad_clearance_error\",pcb_pad_pad_clearance_error_id:`pad_pad_clearance_${g}`,error_type:\"pcb_pad_pad_clearance_error\",message:`Pads ${eI(t,A)} and ${eI(t,u)} are too close (clearance: ${hQ(h)}, minimum: ${hQ(n)})`,pcb_pad_ids:[A,u],minimum_clearance:n,actual_clearance:h,center:{x:(d.x+p.x)/2,y:(d.y+p.y)/2}};s.has(g)||s.set(g,m)}}return Array.from(s.values())}function zjn(t,{connMap:e,minClearance:n}={}){const o=OF(t),i=xmt(t);if(o.length===0||i.length===0)return[];const r=X9(t);n??=Y8(r,\"min_trace_to_pad_edge_clearance\")??G8.min_trace_to_pad_edge_clearance,e??=Vf(t);const s=new yz({objects:o,getBounds:Z9,getId:c=\u003eYh(c)}),a=new Map,A=new Set;for(const c of i){const l=s.getObjectsInBounds(GF(c),n+c.thickness/2);for(const u of l){const g=Yh(u);if(!dx(u).includes(c.layer)||e.areIdsConnected(c.pcb_trace_id,g))continue;const h=`${g}_${c.pcb_trace_id}`,{gap:d,center:p}=Ise(c,u);if(Cse(d)){a.delete(h),A.add(h);continue}if(A.has(h)||d+q4\u003e=n)continue;const m={type:\"pcb_pad_trace_clearance_error\",pcb_pad_trace_clearance_error_id:`pad_trace_clearance_${h}`,error_type:\"pcb_pad_trace_clearance_error\",message:`Pad ${eI(t,g)} and trace ${eI(t,c.pcb_trace_id)} are too close (clearance: ${hQ(d)}, minimum: ${hQ(n)})`,pcb_pad_id:g,pcb_trace_id:c.pcb_trace_id,minimum_clearance:n,actual_clearance:d,center:p},_=a.get(h);(!_||d\u003c_.gap)\u0026\u0026a.set(h,{error:m,gap:d})}}return Array.from(a.values()).map(({error:c})=\u003ec)}function Jjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(A=\u003eA.type===\"pcb_via\"),i=xmt(t);if(o.length===0||i.length===0)return[];const r=X9(t);n??=Y8(r,\"min_trace_to_pad_edge_clearance\")??G8.min_trace_to_pad_edge_clearance,e??=Vf(t);const s=new Map,a=new Set;for(const A of o)for(const c of i){if(!dx(A).includes(c.layer)||e.areIdsConnected(c.pcb_trace_id,A.pcb_via_id))continue;const l=`${A.pcb_via_id}_${c.pcb_trace_id}`,{gap:u,center:g}=Ise(c,A);if(Cse(u)){s.delete(l),a.add(l);continue}if(a.has(l)||u+q4\u003e=n)continue;const h={type:\"pcb_via_trace_clearance_error\",pcb_via_trace_clearance_error_id:`via_trace_clearance_${l}`,error_type:\"pcb_via_trace_clearance_error\",message:`Via ${eI(t,A.pcb_via_id)} and trace ${eI(t,c.pcb_trace_id)} are too close (clearance: ${hQ(u)}, minimum: ${hQ(n)})`,pcb_via_id:A.pcb_via_id,pcb_trace_id:c.pcb_trace_id,minimum_clearance:n,actual_clearance:u,center:g},d=s.get(l);(!d||u\u003cd.gap)\u0026\u0026s.set(l,{error:h,gap:u})}return Array.from(s.values()).map(({error:A})=\u003eA)}function Wjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(c=\u003ec.type===\"pcb_via\"),i=OF(t);if(o.length===0||i.length===0)return[];const r=X9(t),s=n??Y8(r,\"min_pad_edge_to_pad_edge_clearance\")??G8.min_pad_edge_to_pad_edge_clearance;e??=Vf(t);const a=new yz({objects:i,getBounds:Z9,getId:Yh}),A=[];for(const c of o){const l=a.getObjectsInBounds(Z9(c),s);for(const u of l){const g=Yh(u);if(!dx(c).some(d=\u003edx(u).includes(d))||e.areIdsConnected(c.pcb_via_id,g))continue;const h=YQ(c,u);h+q4\u003e=s||A.push({type:\"pcb_pad_pad_clearance_error\",pcb_pad_pad_clearance_error_id:`via_pad_clearance_${c.pcb_via_id}_${g}`,error_type:\"pcb_pad_pad_clearance_error\",message:`Via ${eI(t,c.pcb_via_id)} and pad ${eI(t,g)} are too close (clearance: ${hQ(h)}, minimum: ${hQ(s)})`,pcb_pad_ids:[c.pcb_via_id,g],minimum_clearance:s,actual_clearance:h,center:qWn(c,u)})}}return A}function jjn(t){const e=X9(t);if(e\u0026\u0026\"is_via_in_pad_allowed\"in e\u0026\u0026e.is_via_in_pad_allowed===!0)return[];const n=t.filter(A=\u003eA.type===\"pcb_via\"),o=OF(t);if(n.length===0||o.length===0)return[];const i=Vf(t),r=new Map(o.map((A,c)=\u003e[Yh(A),c])),s=new yz({objects:o,getBounds:Z9,getId:Yh}),a=[];for(const A of n){const c=s.getObjectsInBounds(Z9(A));for(const l of c){const u=Yh(l),g=dx(A),h=dx(l);if(!g.some(m=\u003eh.includes(m))||i.areIdsConnected(A.pcb_via_id,u)||YQ(A,l)\u003e0)continue;const d=r.get(u)??0,p=JWn(t,l,d);a.push({type:\"pcb_placement_error\",pcb_placement_error_id:`via_in_pad_${A.pcb_via_id}_${u}`,error_type:\"pcb_placement_error\",message:`Via copper at (${A.x.toFixed(2)}mm, ${A.y.toFixed(2)}mm) overlaps ${p}`,subcircuit_id:A.subcircuit_id??l.subcircuit_id})}}return a}var Ymt=t=\u003e{const e=new Set;for(const n of t)n.type===\"pcb_pad_trace_clearance_error\"\u0026\u0026typeof n.pcb_trace_id==\"string\"\u0026\u0026typeof n.pcb_pad_id==\"string\"\u0026\u0026e.add(`overlap_${n.pcb_trace_id}_${n.pcb_pad_id}`),n.type===\"pcb_via_trace_clearance_error\"\u0026\u0026typeof n.pcb_trace_id==\"string\"\u0026\u0026typeof n.pcb_via_id==\"string\"\u0026\u0026e.add(`overlap_${n.pcb_trace_id}_${n.pcb_via_id}`);return t.filter(n=\u003e{const o=n;return!(o.type===\"pcb_trace_error\"\u0026\u0026typeof o.pcb_trace_error_id==\"string\"\u0026\u0026e.has(o.pcb_trace_error_id))})};function $jn(t){const e=[],n=t.filter(a=\u003e\"source_component_id\"in a\u0026\u0026(a.type===\"source_component\"||a.type.startsWith(\"source_simple_\"))),o=t.filter(a=\u003ea.type===\"source_port\"),i=t.filter(a=\u003ea.type===\"source_trace\"),r=new Set;for(const a of i)for(const A of a.connected_source_port_ids??[])r.add(A);const s=new Map;for(const a of n)\"internally_connected_source_port_ids\"in a\u0026\u0026a.internally_connected_source_port_ids\u0026\u0026s.set(a.source_component_id,a.internally_connected_source_port_ids);for(const a of s.values())for(const A of a)if(A.some(c=\u003er.has(c)))for(const c of A)r.add(c);for(const a of o)if(a.must_be_connected===!0\u0026\u0026!r.has(a.source_port_id)){const c=n.find(l=\u003el.source_component_id===a.source_component_id)?.name??\"Unknown\";e.push({type:\"source_pin_must_be_connected_error\",source_pin_must_be_connected_error_id:`source_pin_must_be_connected_error_${a.source_port_id}`,error_type:\"source_pin_must_be_connected_error\",message:`Port ${a.name} on ${c} must be connected but is floating`,source_component_id:a.source_component_id??\"\",source_port_id:a.source_port_id,subcircuit_id:a.subcircuit_id})}return e}function qjn(t){const e=t.filter(r=\u003er.type===\"source_component\"\u0026\u0026(r.ftype===\"simple_push_button\"||r.ftype===\"simple_switch\")),n=t.filter(r=\u003er.type===\"source_port\"),o=t.filter(r=\u003er.type===\"schematic_port\"),i=[];for(const r of e){const s=o.flatMap(c=\u003e{const l=n.find(u=\u003eu.source_port_id===c.source_port_id\u0026\u0026u.source_component_id===r.source_component_id);return l?[l]:[]});if(s.length!==2)continue;const a=s[0].subcircuit_connectivity_map_key,A=s[1].subcircuit_connectivity_map_key;a\u0026\u0026a===A\u0026\u0026i.push(dV.parse({type:\"source_component_misconfigured_error\",message:`Switch ${r.name} has both schematic contacts connected to the same net. Check internallyConnectedPins and the footprint pin mapping.`,source_component_ids:[r.source_component_id],source_port_ids:s.map(c=\u003ec.source_port_id),is_fatal:!0}))}return i}var Xjn=[\"must_be_connected\",\"provides_power\",\"requires_power\",\"provides_ground\",\"requires_ground\",\"provides_voltage\",\"requires_voltage\",\"do_not_connect\",\"include_in_board_pinout\",\"can_use_internal_pullup\",\"is_using_internal_pullup\",\"needs_external_pullup\",\"can_use_internal_pulldown\",\"is_using_internal_pulldown\",\"needs_external_pulldown\",\"can_use_open_drain\",\"is_using_open_drain\",\"can_use_push_pull\",\"is_using_push_pull\",\"should_have_decoupling_capacitor\",\"recommended_decoupling_capacitor_capacitance\",\"is_configured_for_i2c_sda\",\"is_configured_for_i2c_scl\",\"is_configured_for_spi_mosi\",\"is_configured_for_spi_miso\",\"is_configured_for_spi_sck\",\"is_configured_for_spi_cs\",\"is_configured_for_uart_tx\",\"is_configured_for_uart_rx\",\"supports_i2c_sda\",\"supports_i2c_scl\",\"supports_spi_mosi\",\"supports_spi_miso\",\"supports_spi_sck\",\"supports_spi_cs\",\"supports_uart_tx\",\"supports_uart_rx\"];function Zjn(t){return Xjn.some(e=\u003et[e]!==void 0)}function e$n(t){const e=[],n=Xc(t),o=n.source_component.list(),i=n.source_port.list(),r=new Map;for(const s of i){if(!s.source_component_id)continue;const a=r.get(s.source_component_id)??[];a.push(s),r.set(s.source_component_id,a)}for(const s of o){if(s.ftype!==\"simple_chip\")continue;const a=r.get(s.source_component_id)??[];a.length===0||a.some(c=\u003eZjn(c))||e.push({type:\"source_component_pins_underspecified_warning\",source_component_pins_underspecified_warning_id:`source_component_pins_underspecified_warning_${s.source_component_id}`,warning_type:\"source_component_pins_underspecified_warning\",message:`All pins on ${s.name} are underspecified (no pinAttributes set)`,source_component_id:s.source_component_id,source_port_ids:a.map(c=\u003ec.source_port_id),subcircuit_id:a[0]?.subcircuit_id})}return e}var Umt=(t,e)=\u003et.ftype===\"simple_chip\"\u0026\u0026e.filter(n=\u003en.do_not_connect!==!0).length\u003e=2;function t$n(t){const e=[],n=Xc(t),o=n.source_component.list(),i=n.source_port.list(),r=new Map;for(const s of i){if(!s.source_component_id)continue;const a=r.get(s.source_component_id)??[];a.push(s),r.set(s.source_component_id,a)}for(const s of o){const a=r.get(s.source_component_id)??[];!Umt(s,a)||a.some(c=\u003ec.requires_power===!0)||e.push({type:\"source_no_power_pin_defined_warning\",source_no_power_pin_defined_warning_id:`source_no_power_pin_defined_warning_${s.source_component_id}`,warning_type:\"source_no_power_pin_defined_warning\",message:`${s.name} has no pin with requires_power=true`,source_component_id:s.source_component_id,source_port_ids:a.map(c=\u003ec.source_port_id),subcircuit_id:a[0]?.subcircuit_id})}return e}function n$n(t){const e=[],n=Xc(t),o=n.source_component.list(),i=n.source_port.list(),r=new Map;for(const s of i){if(!s.source_component_id)continue;const a=r.get(s.source_component_id)??[];a.push(s),r.set(s.source_component_id,a)}for(const s of o){const a=r.get(s.source_component_id)??[];!Umt(s,a)||a.some(c=\u003ec.requires_ground===!0)||e.push({type:\"source_no_ground_pin_defined_warning\",source_no_ground_pin_defined_warning_id:`source_no_ground_pin_defined_warning_${s.source_component_id}`,warning_type:\"source_no_ground_pin_defined_warning\",message:`${s.name} has no pin with requires_ground=true`,source_component_id:s.source_component_id,source_port_ids:a.map(c=\u003ec.source_port_id),subcircuit_id:a[0]?.subcircuit_id})}return e}var o$n=.2,Kmt=3,i$n=1e-9;function r$n(t){const e=t.filter(a=\u003ea.type===\"schematic_component\"),n=t.filter(a=\u003ea.type===\"schematic_port\"),o=t.filter(a=\u003ea.type===\"source_component\"),i=new Map(o.map(a=\u003e[a.source_component_id,a])),r=new Map;for(const a of n){if(!a.schematic_component_id)continue;const A=r.get(a.schematic_component_id)??[];A.push(a),r.set(a.schematic_component_id,A)}const s=[];for(const a of e){if(!a.is_box_with_pins||a.size.height\u003c=0)continue;const A=(r.get(a.schematic_component_id)??[]).filter(I=\u003eI.side_of_component===\"left\"||I.side_of_component===\"right\");if(A.length\u003c2)continue;const c=A.map(I=\u003eI.center.y),l=Math.max(...c),u=Math.min(...c),g=a.center.y+a.size.height/2,h=a.center.y-a.size.height/2,p=(a.pin_spacing??o$n)*Kmt,m={top:g-l,bottom:u-h},f=(a.source_component_id?i.get(a.source_component_id):void 0)?.name??a.schematic_component_id;for(const I of[\"top\",\"bottom\"]){const C=m[I];if(C\u003c=p+i$n||C\u003c=0)continue;const y=I===\"top\"?\"above\":\"below\",x=`excessive_${I}_padding`;s.push({type:\"schematic_component_styling_warning\",schematic_component_styling_warning_id:`schematic_component_styling_warning_${a.schematic_component_id}_${x}`,warning_type:\"schematic_component_styling_warning\",message:`${f} has excessive empty space ${y} its pins (${C.toFixed(2)}mm, more than ${Kmt} pin spacings)`,schematic_component_id:a.schematic_component_id,styling_issue_type:x,schematic_port_ids:A.map(E=\u003eE.schematic_port_id),source_component_id:a.source_component_id,schematic_sheet_id:a.schematic_sheet_id,subcircuit_id:a.subcircuit_id})}}return s}var s$n=t=\u003e/^unnamed_[a-z0-9_-]+\\d+$/i.test(t),a$n=(t,e)=\u003e{const{center:n,size:o}=e,i=1e-9;return t.position.x\u003e=n.x-o.width/2-i\u0026\u0026t.position.x\u003c=n.x+o.width/2+i\u0026\u0026t.position.y\u003e=n.y-o.height/2-i\u0026\u0026t.position.y\u003c=n.y+o.height/2+i};function A$n(t){const e=t.filter(A=\u003eA.type===\"schematic_component\"),n=t.filter(A=\u003eA.type===\"source_component\"),o=t.filter(A=\u003eA.type===\"schematic_text\"),i=new Map(n.map(A=\u003e[A.source_component_id,A])),r=new Map,s=[];for(const A of o){if(!A.schematic_component_id){A.schematic_symbol_id\u0026\u0026s.push(A);continue}const c=r.get(A.schematic_component_id)??new Set;c.add(A.text.trim()),r.set(A.schematic_component_id,c)}const a=[];for(const A of e){if(!A.source_component_id)continue;const c=i.get(A.source_component_id);if(!c)continue;const l=new Set([c.name,c.display_name].map(p=\u003ep?.trim()).filter(p=\u003e!!p)),u=[...l].find(p=\u003e!s$n(p)),g=r.get(A.schematic_component_id),h=[...l].some(p=\u003eg?.has(p))||s.some(p=\u003el.has(p.text.trim())\u0026\u0026a$n(p,A));if(u\u0026\u0026h)continue;const d=u??\"Schematic component\";a.push({type:\"schematic_component_styling_warning\",schematic_component_styling_warning_id:`schematic_component_styling_warning_${A.schematic_component_id}_missing_reference_designator_text`,warning_type:\"schematic_component_styling_warning\",message:`${d} is missing schematic reference designator text. For a custom symbol, add name=\"{REFDES}\" inside the symbol.`,schematic_component_id:A.schematic_component_id,styling_issue_type:\"missing_reference_designator_text\",source_component_id:A.source_component_id,schematic_sheet_id:A.schematic_sheet_id,subcircuit_id:A.subcircuit_id})}return a}var KF=1e-9,c$n=t=\u003et.display_pin_label??`pin ${t.pin_number}`;function l$n(t){const e=t.filter(a=\u003ea.type===\"schematic_component\"),n=t.filter(a=\u003ea.type===\"schematic_port\"),o=t.filter(a=\u003ea.type===\"source_component\"),i=new Map(o.map(a=\u003e[a.source_component_id,a])),r=new Map;for(const a of n){if(!a.schematic_component_id)continue;const A=r.get(a.schematic_component_id)??[];A.push(a),r.set(a.schematic_component_id,A)}const s=[];for(const a of e){if(a.is_box_with_pins===!1||a.size.width\u003c=0||a.size.height\u003c=0)continue;const A=a.center.x-a.size.width/2,c=a.center.x+a.size.width/2,l=a.center.y-a.size.height/2,u=a.center.y+a.size.height/2,h=(r.get(a.schematic_component_id)??[]).filter(C=\u003eC.side_of_component===\"left\"||C.side_of_component===\"right\"?C.center.y\u003cl-KF||C.center.y\u003eu+KF:C.side_of_component===\"top\"||C.side_of_component===\"bottom\"?C.center.x\u003cA-KF||C.center.x\u003ec+KF:!1).sort((C,y)=\u003e{const x=C.side_of_component===\"left\"||C.side_of_component===\"right\",E=y.side_of_component===\"left\"||y.side_of_component===\"right\";return x\u0026\u0026E?y.center.y-C.center.y:!x\u0026\u0026!E?C.center.x-y.center.x:x?-1:1});if(h.length===0)continue;const d=Math.max(a.size.height,...h.filter(C=\u003eC.side_of_component===\"left\"||C.side_of_component===\"right\").map(C=\u003e2*Math.abs(C.center.y-a.center.y))),p=Math.max(a.size.width,...h.filter(C=\u003eC.side_of_component===\"top\"||C.side_of_component===\"bottom\").map(C=\u003e2*Math.abs(C.center.x-a.center.x))),m=[];d\u003ea.size.height+KF\u0026\u0026m.push(`increase schHeight to at least ${d.toFixed(2)}mm`),p\u003ea.size.width+KF\u0026\u0026m.push(`increase schWidth to at least ${p.toFixed(2)}mm`);const f=(a.source_component_id?i.get(a.source_component_id):void 0)?.name??a.schematic_component_id,I=h.map(c$n).join(\", \");s.push({type:\"schematic_component_styling_warning\",schematic_component_styling_warning_id:`schematic_component_styling_warning_${a.schematic_component_id}_ports_outside_body`,warning_type:\"schematic_component_styling_warning\",message:`${f} has schematic pins outside its body (${I}); ${m.join(\" and \")}`,schematic_component_id:a.schematic_component_id,styling_issue_type:\"ports_outside_body\",schematic_port_ids:h.map(C=\u003eC.schematic_port_id),source_component_id:a.source_component_id,schematic_sheet_id:a.schematic_sheet_id,subcircuit_id:a.subcircuit_id})}return s}function Bse(t,e){const n=new Map,o=new Map;for(const c of t){const l=Yh(c);o.set(l,c),\"pcb_component_id\"in c\u0026\u0026c.pcb_component_id\u0026\u0026n.set(l,c.pcb_component_id)}const i=e.flatMap(c=\u003ec.type===\"pcb_footprint_overlap_error\"?c.related_errors??[c]:[c]),r=new Map,s=new Map;for(const c of i){let l;if(c.type===\"pcb_footprint_overlap_error\"){if(c.pcb_keepout_ids?.length)continue;const h=c,d=[...c.pcb_smtpad_ids??[],...c.pcb_plated_hole_ids??[],...c.pcb_hole_ids??[]];if(d.some(p=\u003e!n.has(p)))continue;l=h.pcb_component_ids??d.map(p=\u003en.get(p))}else if(c.type===\"pcb_pad_pad_clearance_error\"){if(c.pcb_pad_ids.some(h=\u003e!n.has(h)))continue;l=c.pcb_pad_ids.map(h=\u003en.get(h))}else if(c.type===\"pcb_courtyard_overlap_error\")l=c.pcb_component_ids;else continue;if(l=[...new Set(l)].sort(),l.length!==2)continue;const u=JSON.stringify(l);s.set(c,u);const g=r.get(u)??[];g.push(c),r.set(u,g)}const a=new Map;for(const[c,l]of r){const u=l.filter(f=\u003ef.type===\"pcb_footprint_overlap_error\");if(l.length\u003c2||u.length===0)continue;const g=JSON.parse(c),h=g.map(f=\u003e{const I=o.get(f),C=I?.type===\"pcb_component\"?o.get(I.source_component_id):void 0;return C?.type===\"source_component\"?C.name:f}),p=[[u.length,\"footprint overlap\"],[l.filter(f=\u003ef.type===\"pcb_pad_pad_clearance_error\").length,\"pad clearance violation\"],[l.filter(f=\u003ef.type===\"pcb_courtyard_overlap_error\").length,\"courtyard conflict\"]].filter(([f])=\u003ef\u003e0).map(([f,I])=\u003e`${f} ${I}${f===1?\"\":\"s\"}`),m={type:\"pcb_footprint_overlap_error\",error_type:\"pcb_footprint_overlap_error\",pcb_error_id:`pcb_component_overlap_${g.join(\"_\")}`,pcb_component_ids:g,message:`${h.join(\" overlaps \")}: ${p.join(\", \")}. Move the components apart.`,related_errors:l};l.some(f=\u003ef.is_fatal)\u0026\u0026(m.is_fatal=!0);const _=new Set;for(const f of l)if(f.type===\"pcb_footprint_overlap_error\")for(const I of[...f.pcb_smtpad_ids??[],...f.pcb_plated_hole_ids??[],...f.pcb_hole_ids??[]])_.add(I);else if(f.type===\"pcb_pad_pad_clearance_error\")for(const I of f.pcb_pad_ids)_.add(I);for(const[f,I]of[[\"pcb_smtpad_ids\",\"pcb_smtpad\"],[\"pcb_plated_hole_ids\",\"pcb_plated_hole\"],[\"pcb_hole_ids\",\"pcb_hole\"]]){const C=[..._].filter(y=\u003eo.get(y)?.type===I).sort();C.length\u0026\u0026(m[f]=C)}a.set(c,m)}const A=new Set;return i.flatMap(c=\u003e{const l=s.get(c),u=l===void 0?void 0:a.get(l);return!u||l===void 0?[c]:A.has(l)?[]:(A.add(l),[u])})}function u$n(t){const e=new Map,n=s=\u003e{let a=s;for(;e.has(a)\u0026\u0026e.get(a)!==a;)a=e.get(a);for(;e.has(s)\u0026\u0026e.get(s)!==a;){const A=e.get(s);e.set(s,a),s=A}return a},o=s=\u003e{if(s.length\u003c2)return;const a=n(s[0]);for(const A of s.slice(1))e.set(n(A),a)},i=new Map;for(const s of t){if(s.type===\"source_net\"\u0026\u0026s.name.trim()){const a=i.get(s.name)??[];a.push(s),i.set(s.name,a)}if(s.type===\"source_trace\"\u0026\u0026o([...s.connected_source_net_ids.map(a=\u003e`net:${a}`),...s.connected_source_port_ids.map(a=\u003e`port:${a}`)]),s.type===\"source_component_internal_connection\"\u0026\u0026o(s.source_port_ids.map(a=\u003e`port:${a}`)),s.type===\"source_component\")for(const a of s.internally_connected_source_port_ids??[])o(a.map(A=\u003e`port:${A}`))}const r=[];for(const[s,a]of i){const A=new Set(a.map(l=\u003en(`net:${l.source_net_id}`)));if(A.size\u003c2)continue;const c=a.map(l=\u003el.source_net_id).sort();r.push({type:\"source_confusing_net_name_warning\",source_confusing_net_name_warning_id:`source_confusing_net_name_warning_${c[0]}`,warning_type:\"source_confusing_net_name_warning\",message:`Nets named \"${s}\" are not all connected (${A.size} separate electrical networks). Connect them or use distinct names to avoid confusion.`,source_net_ids:c,net_name:s,...a.every(l=\u003el.subcircuit_id===a[0].subcircuit_id)?{subcircuit_id:a[0].subcircuit_id}:{}})}return r}function g$n(t){switch(t.insertion_direction){case\"from_left\":return\"x-\";case\"from_right\":return\"x+\";case\"from_top\":return\"y+\";case\"from_bottom\":return\"y-\";case\"from_above\":case\"from_below\":return null;default:return null}}function d$n(t){if(t.insertion_direction)return g$n(t);if(!t.center||!t.cable_insertion_center)return null;const e=t.cable_insertion_center.x-t.center.x,n=t.cable_insertion_center.y-t.center.y;return Math.abs(e)\u003c1e-6\u0026\u0026Math.abs(n)\u003c1e-6?null:Math.abs(e)\u003e=Math.abs(n)?e\u003e=0?\"x+\":\"x-\":n\u003e=0?\"y+\":\"y-\"}function h$n(t,e){if(!t.center)return null;const n=[{direction:\"x-\",distance:t.center.x-e.minX},{direction:\"x+\",distance:e.maxX-t.center.x},{direction:\"y-\",distance:t.center.y-e.minY},{direction:\"y+\",distance:e.maxY-t.center.y}];return n.sort((o,i)=\u003eo.distance-i.distance),n[0]?.direction??null}function Vmt(t){const e=t.find(r=\u003er.type===\"pcb_board\");if(!e)return[];const n=(()=\u003e{try{return BWn(e)}catch{return null}})();if(!n)return[];const o=[],i=t.filter(r=\u003er.type===\"pcb_component\");for(const r of i){const s=d$n(r),a=h$n(r,n);if(!s||!a||s===a)continue;const A=HF(t,r.pcb_component_id);o.push({type:\"pcb_connector_not_in_accessible_orientation_warning\",warning_type:\"pcb_connector_not_in_accessible_orientation_warning\",pcb_connector_not_in_accessible_orientation_warning_id:`pcb_connector_not_in_accessible_orientation_warning_${r.pcb_component_id}`,message:`${A} is facing ${s} but should face ${a} so the connector is accessible from the board edge`,pcb_component_id:r.pcb_component_id,source_component_id:r.source_component_id,pcb_board_id:e.pcb_board_id,facing_direction:s,recommended_facing_direction:a,subcircuit_id:r.subcircuit_id})}return o}function zmt(t){if(t.type===\"pcb_courtyard_rect\"){const e=t.width/2,n=t.height/2,o=[{x:-e,y:-n},{x:+e,y:-n},{x:+e,y:+n},{x:-e,y:+n}],i=(t.ccw_rotation??0)*Math.PI/180,r=Math.cos(i),s=Math.sin(i);return o.map(({x:a,y:A})=\u003e({x:t.center.x+a*r-A*s,y:t.center.y+a*s+A*r}))}return t.type===\"pcb_courtyard_circle\"?Array.from({length:32},(n,o)=\u003e{const i=2*Math.PI*o/32;return{x:t.center.x+t.radius*Math.cos(i),y:t.center.y+t.radius*Math.sin(i)}}):t.outline}function Jmt(t,e){const n=t.find(i=\u003ei.type===\"pcb_component\"\u0026\u0026i.pcb_component_id===e);if(n?.type!==\"pcb_component\")return e;const o=t.find(i=\u003ei.type===\"source_component\"\u0026\u0026i.source_component_id===n.source_component_id);return o?.type===\"source_component\"\u0026\u0026o.name?o.name:e}function p$n(t,e){if(t.some(n=\u003enD(n,e))||e.some(n=\u003enD(n,t)))return!0;for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];for(let r=0;r\u003ce.length;r++){const s=e[r],a=e[(r+1)%e.length];if(X1(o,i,s,a))return!0}}return!1}function m$n(t){const e=t.filter(r=\u003er.type===\"pcb_courtyard_rect\"||r.type===\"pcb_courtyard_circle\"||r.type===\"pcb_courtyard_outline\"),n=new Map;for(const r of e){const s=r.pcb_component_id;n.has(s)||n.set(s,[]),n.get(s).push(r)}const o=Array.from(n.keys()),i=[];for(let r=0;r\u003co.length;r++)for(let s=r+1;s\u003co.length;s++){const a=o[r],A=o[s];let c=!1;e:for(const l of n.get(a))for(const u of n.get(A)){if(\"layer\"in l\u0026\u0026\"layer\"in u\u0026\u0026l.layer!==u.layer)continue;const g=zmt(l),h=zmt(u);if(p$n(g,h)){c=!0;break e}}c\u0026\u0026i.push({type:\"pcb_courtyard_overlap_error\",pcb_error_id:`pcb_courtyard_overlap_${a}_${A}`,error_type:\"pcb_courtyard_overlap_error\",message:`Courtyard of ${Jmt(t,a)} overlaps with courtyard of ${Jmt(t,A)}`,pcb_component_ids:[a,A]})}return i}var _$n=t=\u003et.type===\"pcb_courtyard_circle\"||t.type===\"pcb_courtyard_outline\"||t.type===\"pcb_courtyard_polygon\"||t.type===\"pcb_courtyard_rect\",f$n=(t,e)=\u003e{if(e.type===\"pcb_courtyard_circle\"){const o=t.x-e.center.x,i=t.y-e.center.y;return o*o+i*i\u003c=e.radius*e.radius}if(e.type===\"pcb_courtyard_rect\"){const o=-1*(e.ccw_rotation??0)*Math.PI/180,i=t.x-e.center.x,r=t.y-e.center.y,s=i*Math.cos(o)-r*Math.sin(o),a=i*Math.sin(o)+r*Math.cos(o);return Math.abs(s)\u003c=e.width/2\u0026\u0026Math.abs(a)\u003c=e.height/2}const n=e.type===\"pcb_courtyard_polygon\"?e.points:e.outline;return nD(t,n)},I$n=(t,e)=\u003e{const n=t.find(i=\u003ei.type===\"pcb_component\"\u0026\u0026i.pcb_component_id===e),o=t.find(i=\u003ei.type===\"source_component\"\u0026\u0026i.source_component_id===n?.source_component_id);return(o\u0026\u0026\"name\"in o?o.name:void 0)??HF(t,e)};function C$n(t){const e=t.filter(A=\u003eA.type===\"source_component\"\u0026\u0026A.ftype===\"simple_test_point\"),n=new Set(e.map(A=\u003eA.source_component_id)),o=new Map(e.map(A=\u003e[A.source_component_id,A.name])),i=t.filter(A=\u003eA.type===\"pcb_component\"\u0026\u0026n.has(A.source_component_id)),r=t.filter(_$n),s=[],a=new Set;for(const A of i)for(const c of r){if(c.pcb_component_id===A.pcb_component_id||c.layer!==A.layer||!f$n(A.center,c))continue;const l=`${A.pcb_component_id}:${c.pcb_component_id}`;if(a.has(l))continue;a.add(l);const u=o.get(A.source_component_id)??\"Test point\",g=I$n(t,c.pcb_component_id);s.push({type:\"pcb_placement_error\",pcb_placement_error_id:`testpoint_in_courtyard_${A.pcb_component_id}_${c.pcb_component_id}`,error_type:\"pcb_placement_error\",message:`Test point ${u} is not accessible because it is inside the courtyard of ${g}`,subcircuit_id:A.subcircuit_id})}return s}async function Wmt(t,{consolidateOverlaps:e=!0}={}){const n=[...gjn(t),...jjn(t),..._jn(t),...yjn(t),...Bjn(t),...Fjn(t),...Hjn(t),...Vjn(t),...m$n(t),...Vmt(t),...C$n(t)];return e?Bse(t,n):n}async function y$n(t){return[...$jn(t),...u$n(t),...qjn(t)]}async function x$n(t){return[...r$n(t),...A$n(t),...l$n(t)]}async function E$n(t){return[...e$n(t),...t$n(t),...n$n(t)]}async function jmt(t){return[...WWn(t),...Qjn(t),...Ujn(t),...Kjn(t),...ojn(t),...zjn(t),...Jjn(t),...Wjn(t),...bjn(t),...Sjn(t),...Mjn(t),...Njn(t)]}var $mt=()=\u003e({minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),QD=(t,e,n)=\u003e{t.minX=Math.min(t.minX,e),t.maxX=Math.max(t.maxX,e),t.minY=Math.min(t.minY,n),t.maxY=Math.max(t.maxY,n)},vD=(t,e,n,o,i)=\u003e{QD(t,e-o/2,n-i/2),QD(t,e+o/2,n+i/2)},qmt=t=\u003eNumber.isFinite(t.minX)\u0026\u0026Number.isFinite(t.maxX)\u0026\u0026Number.isFinite(t.minY)\u0026\u0026Number.isFinite(t.maxY),B$n=t=\u003et.find(e=\u003ee.type===\"pcb_component\"),b$n=(t,e)=\u003ee?t.filter(n=\u003e\"pcb_component_id\"in n\u0026\u0026n.pcb_component_id===e):[],S$n=t=\u003e{switch(t){case\"from_left\":case\"from_x_neg\":return\"left\";case\"from_right\":case\"from_x_pos\":return\"right\";case\"from_top\":case\"from_y_pos\":case\"from_front\":return\"top\";case\"from_bottom\":case\"from_y_neg\":case\"from_back\":return\"bottom\";case\"from_above\":case\"from_z_pos\":return\"above\";case\"from_below\":case\"from_z_neg\":return\"below\";default:return}},Q$n=t=\u003e{if(\"insertion_direction\"in t)return typeof t.insertion_direction==\"string\"?t.insertion_direction:void 0},v$n=(t,e)=\u003e{const n=$mt();for(const o of t){if(o.type===\"pcb_smtpad\"){if(\"points\"in o)for(const i of o.points)QD(n,i.x,i.y);else\"x\"in o\u0026\u0026\"y\"in o\u0026\u0026\"width\"in o\u0026\u0026\"height\"in o?vD(n,o.x,o.y,o.width,o.height):\"x\"in o\u0026\u0026\"y\"in o\u0026\u0026\"radius\"in o\u0026\u0026vD(n,o.x,o.y,o.radius*2,o.radius*2);continue}if(o.type===\"pcb_plated_hole\"){\"outer_width\"in o\u0026\u0026\"outer_height\"in o?vD(n,o.x,o.y,o.outer_width,o.outer_height):\"outer_diameter\"in o\u0026\u0026vD(n,o.x,o.y,o.outer_diameter,o.outer_diameter);continue}if(o.type===\"pcb_hole\"){\"hole_diameter\"in o?vD(n,o.x,o.y,o.hole_diameter,o.hole_diameter):\"hole_width\"in o\u0026\u0026\"hole_height\"in o\u0026\u0026vD(n,o.x,o.y,o.hole_width,o.hole_height);continue}if(o.type===\"pcb_silkscreen_path\"){for(const i of o.route)QD(n,i.x,i.y);continue}o.type===\"pcb_component\"\u0026\u0026vD(n,o.center.x,o.center.y,o.width,o.height)}return qmt(n)?n:e},w$n=(t,e)=\u003e{const n=$mt();for(const o of t){if(o.type===\"pcb_smtpad\"\u0026\u0026(\"x\"in o\u0026\u0026\"y\"in o\u0026\u0026QD(n,o.x,o.y),\"points\"in o))for(const i of o.points)QD(n,i.x,i.y);o.type===\"pcb_plated_hole\"\u0026\u0026o.pcb_port_id\u0026\u0026QD(n,o.x,o.y)}return qmt(n)?n:e},P$n=t=\u003e{const e=B$n(t);if(!e)return{x:0,y:0,side:\"bottom\"};const n={minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2},o=b$n(t,e.pcb_component_id),i=v$n(o,n),r=w$n(o,n),s={left:r.minX-i.minX,right:i.maxX-r.maxX,top:i.maxY-r.maxY,bottom:r.minY-i.minY},a=Object.entries(s).sort((d,p)=\u003ep[1]-d[1])[0]?.[0]??\"bottom\",A=S$n(Q$n(e))??a,c=i.maxX-i.minX,l=i.maxY-i.minY,u=Math.max(.4,Math.min(c,l)*.08),g=(i.minX+i.maxX)/2,h=(i.minY+i.maxY)/2;return A===\"above\"||A===\"below\"?{x:g,y:h,side:A,pcbComponentId:e.pcb_component_id}:A===\"top\"?{x:g,y:i.maxY+u,side:A,pcbComponentId:e.pcb_component_id}:A===\"left\"?{x:i.minX-u,y:h,side:A,pcbComponentId:e.pcb_component_id}:A===\"right\"?{x:i.maxX+u,y:h,side:A,pcbComponentId:e.pcb_component_id}:{x:g,y:i.minY-u,side:\"bottom\",pcbComponentId:e.pcb_component_id}};function U8(t){throw new Error('Could not dynamically require \"'+t+'\". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var j9e={exports:{}},Xmt;function M$n(){return Xmt||(Xmt=1,(function(t,e){(function(n){t.exports=n()})(function(){return(function n(o,i,r){function s(c,l){if(!i[c]){if(!o[c]){var u=typeof U8==\"function\"\u0026\u0026U8;if(!l\u0026\u0026u)return u(c,!0);if(a)return a(c,!0);throw new Error(\"Cannot find module '\"+c+\"'\")}l=i[c]={exports:{}},o[c][0].call(l.exports,function(g){var h=o[c][1][g];return s(h||g)},l,l.exports,n,o,i,r)}return i[c].exports}for(var a=typeof U8==\"function\"\u0026\u0026U8,A=0;A\u003cr.length;A++)s(r[A]);return s})({1:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d=n(\"crypto\");function p(x,E){E=f(x,E);var B;return(B=E.algorithm!==\"passthrough\"?d.createHash(E.algorithm):new y).write===void 0\u0026\u0026(B.write=B.update,B.end=B.update),C(E,B).dispatch(x),B.update||B.end(\"\"),B.digest?B.digest(E.encoding===\"buffer\"?void 0:E.encoding):(x=B.read(),E.encoding!==\"buffer\"?x.toString(E.encoding):x)}(i=o.exports=p).sha1=function(x){return p(x)},i.keys=function(x){return p(x,{excludeValues:!0,algorithm:\"sha1\",encoding:\"hex\"})},i.MD5=function(x){return p(x,{algorithm:\"md5\",encoding:\"hex\"})},i.keysMD5=function(x){return p(x,{algorithm:\"md5\",encoding:\"hex\",excludeValues:!0})};var m=d.getHashes?d.getHashes().slice():[\"sha1\",\"md5\"],_=(m.push(\"passthrough\"),[\"buffer\",\"hex\",\"binary\",\"base64\"]);function f(x,E){var B={};if(B.algorithm=(E=E||{}).algorithm||\"sha1\",B.encoding=E.encoding||\"hex\",B.excludeValues=!!E.excludeValues,B.algorithm=B.algorithm.toLowerCase(),B.encoding=B.encoding.toLowerCase(),B.ignoreUnknown=E.ignoreUnknown===!0,B.respectType=E.respectType!==!1,B.respectFunctionNames=E.respectFunctionNames!==!1,B.respectFunctionProperties=E.respectFunctionProperties!==!1,B.unorderedArrays=E.unorderedArrays===!0,B.unorderedSets=E.unorderedSets!==!1,B.unorderedObjects=E.unorderedObjects!==!1,B.replacer=E.replacer||void 0,B.excludeKeys=E.excludeKeys||void 0,x===void 0)throw new Error(\"Object argument required.\");for(var S=0;S\u003cm.length;++S)m[S].toLowerCase()===B.algorithm.toLowerCase()\u0026\u0026(B.algorithm=m[S]);if(m.indexOf(B.algorithm)===-1)throw new Error('Algorithm \"'+B.algorithm+'\" not supported. supported values: '+m.join(\", \"));if(_.indexOf(B.encoding)===-1\u0026\u0026B.algorithm!==\"passthrough\")throw new Error('Encoding \"'+B.encoding+'\" not supported. supported values: '+_.join(\", \"));return B}function I(x){if(typeof x==\"function\")return/^function\\s+\\w*\\s*\\(\\s*\\)\\s*{\\s+\\[native code\\]\\s+}$/i.exec(Function.prototype.toString.call(x))!=null}function C(x,E,B){B=B||[];function S(Q){return E.update?E.update(Q,\"utf8\"):E.write(Q,\"utf8\")}return{dispatch:function(Q){return this[\"_\"+((Q=x.replacer?x.replacer(Q):Q)===null?\"null\":typeof Q)](Q)},_object:function(Q){var w,M=Object.prototype.toString.call(Q),k=/\\[object (.*)\\]/i.exec(M);if(k=(k=k?k[1]:\"unknown:[\"+M+\"]\").toLowerCase(),0\u003c=(M=B.indexOf(Q)))return this.dispatch(\"[CIRCULAR:\"+M+\"]\");if(B.push(Q),a!==void 0\u0026\u0026a.isBuffer\u0026\u0026a.isBuffer(Q))return S(\"buffer:\"),S(Q);if(k===\"object\"||k===\"function\"||k===\"asyncfunction\")return M=Object.keys(Q),x.unorderedObjects\u0026\u0026(M=M.sort()),x.respectType===!1||I(Q)||M.splice(0,0,\"prototype\",\"__proto__\",\"constructor\"),x.excludeKeys\u0026\u0026(M=M.filter(function(R){return!x.excludeKeys(R)})),S(\"object:\"+M.length+\":\"),w=this,M.forEach(function(R){w.dispatch(R),S(\":\"),x.excludeValues||w.dispatch(Q[R]),S(\",\")});if(!this[\"_\"+k]){if(x.ignoreUnknown)return S(\"[\"+k+\"]\");throw new Error('Unknown object type \"'+k+'\"')}this[\"_\"+k](Q)},_array:function(Q,R){R=R!==void 0?R:x.unorderedArrays!==!1;var M=this;if(S(\"array:\"+Q.length+\":\"),!R||Q.length\u003c=1)return Q.forEach(function(F){return M.dispatch(F)});var k=[],R=Q.map(function(F){var O=new y,U=B.slice();return C(x,O,U).dispatch(F),k=k.concat(U.slice(B.length)),O.read().toString()});return B=B.concat(k),R.sort(),this._array(R,!1)},_date:function(Q){return S(\"date:\"+Q.toJSON())},_symbol:function(Q){return S(\"symbol:\"+Q.toString())},_error:function(Q){return S(\"error:\"+Q.toString())},_boolean:function(Q){return S(\"bool:\"+Q.toString())},_string:function(Q){S(\"string:\"+Q.length+\":\"),S(Q.toString())},_function:function(Q){S(\"fn:\"),I(Q)?this.dispatch(\"[native]\"):this.dispatch(Q.toString()),x.respectFunctionNames!==!1\u0026\u0026this.dispatch(\"function-name:\"+String(Q.name)),x.respectFunctionProperties\u0026\u0026this._object(Q)},_number:function(Q){return S(\"number:\"+Q.toString())},_xml:function(Q){return S(\"xml:\"+Q.toString())},_null:function(){return S(\"Null\")},_undefined:function(){return S(\"Undefined\")},_regexp:function(Q){return S(\"regex:\"+Q.toString())},_uint8array:function(Q){return S(\"uint8array:\"),this.dispatch(Array.prototype.slice.call(Q))},_uint8clampedarray:function(Q){return S(\"uint8clampedarray:\"),this.dispatch(Array.prototype.slice.call(Q))},_int8array:function(Q){return S(\"int8array:\"),this.dispatch(Array.prototype.slice.call(Q))},_uint16array:function(Q){return S(\"uint16array:\"),this.dispatch(Array.prototype.slice.call(Q))},_int16array:function(Q){return S(\"int16array:\"),this.dispatch(Array.prototype.slice.call(Q))},_uint32array:function(Q){return S(\"uint32array:\"),this.dispatch(Array.prototype.slice.call(Q))},_int32array:function(Q){return S(\"int32array:\"),this.dispatch(Array.prototype.slice.call(Q))},_float32array:function(Q){return S(\"float32array:\"),this.dispatch(Array.prototype.slice.call(Q))},_float64array:function(Q){return S(\"float64array:\"),this.dispatch(Array.prototype.slice.call(Q))},_arraybuffer:function(Q){return S(\"arraybuffer:\"),this.dispatch(new Uint8Array(Q))},_url:function(Q){return S(\"url:\"+Q.toString())},_map:function(Q){return S(\"map:\"),Q=Array.from(Q),this._array(Q,x.unorderedSets!==!1)},_set:function(Q){return S(\"set:\"),Q=Array.from(Q),this._array(Q,x.unorderedSets!==!1)},_file:function(Q){return S(\"file:\"),this.dispatch([Q.name,Q.size,Q.type,Q.lastModfied])},_blob:function(){if(x.ignoreUnknown)return S(\"[blob]\");throw Error(`Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse \"options.replacer\" or \"options.ignoreUnknown\"\n`)},_domwindow:function(){return S(\"domwindow\")},_bigint:function(Q){return S(\"bigint:\"+Q.toString())},_process:function(){return S(\"process\")},_timer:function(){return S(\"timer\")},_pipe:function(){return S(\"pipe\")},_tcp:function(){return S(\"tcp\")},_udp:function(){return S(\"udp\")},_tty:function(){return S(\"tty\")},_statwatcher:function(){return S(\"statwatcher\")},_securecontext:function(){return S(\"securecontext\")},_connection:function(){return S(\"connection\")},_zlib:function(){return S(\"zlib\")},_context:function(){return S(\"context\")},_nodescript:function(){return S(\"nodescript\")},_httpparser:function(){return S(\"httpparser\")},_dataview:function(){return S(\"dataview\")},_signal:function(){return S(\"signal\")},_fsevent:function(){return S(\"fsevent\")},_tlswrap:function(){return S(\"tlswrap\")}}}function y(){return{buf:\"\",write:function(x){this.buf+=x},end:function(x){this.buf+=x},read:function(){return this.buf}}}i.writeToStream=function(x,E,B){return B===void 0\u0026\u0026(B=E,E={}),C(E=f(x,E),B).dispatch(x)}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/fake_9a5aa49d.js\",\"/\")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){(function(d){var p=typeof Uint8Array\u003c\"u\"?Uint8Array:Array,m=43,_=47,f=48,I=97,C=65,y=45,x=95;function E(B){return B=B.charCodeAt(0),B===m||B===y?62:B===_||B===x?63:B\u003cf?-1:B\u003cf+10?B-f+26+26:B\u003cC+26?B-C:B\u003cI+26?B-I+26:void 0}d.toByteArray=function(B){var S,Q;if(0\u003cB.length%4)throw new Error(\"Invalid string. Length must be a multiple of 4\");var w=B.length,w=B.charAt(w-2)===\"=\"?2:B.charAt(w-1)===\"=\"?1:0,M=new p(3*B.length/4-w),k=0\u003cw?B.length-4:B.length,R=0;function F(O){M[R++]=O}for(S=0;S\u003ck;S+=4,0)F((16711680\u0026(Q=E(B.charAt(S))\u003c\u003c18|E(B.charAt(S+1))\u003c\u003c12|E(B.charAt(S+2))\u003c\u003c6|E(B.charAt(S+3))))\u003e\u003e16),F((65280\u0026Q)\u003e\u003e8),F(255\u0026Q);return w==2?F(255\u0026(Q=E(B.charAt(S))\u003c\u003c2|E(B.charAt(S+1))\u003e\u003e4)):w==1\u0026\u0026(F((Q=E(B.charAt(S))\u003c\u003c10|E(B.charAt(S+1))\u003c\u003c4|E(B.charAt(S+2))\u003e\u003e2)\u003e\u003e8\u0026255),F(255\u0026Q)),M},d.fromByteArray=function(B){var S,Q,w,M,k=B.length%3,R=\"\";function F(O){return\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\".charAt(O)}for(S=0,w=B.length-k;S\u003cw;S+=3)Q=(B[S]\u003c\u003c16)+(B[S+1]\u003c\u003c8)+B[S+2],R+=F((M=Q)\u003e\u003e18\u002663)+F(M\u003e\u003e12\u002663)+F(M\u003e\u003e6\u002663)+F(63\u0026M);switch(k){case 1:R=(R+=F((Q=B[B.length-1])\u003e\u003e2))+F(Q\u003c\u003c4\u002663)+\"==\";break;case 2:R=(R=(R+=F((Q=(B[B.length-2]\u003c\u003c8)+B[B.length-1])\u003e\u003e10))+F(Q\u003e\u003e4\u002663))+F(Q\u003c\u003c2\u002663)+\"=\"}return R}})(i===void 0?this.base64js={}:i)}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js\",\"/node_modules/gulp-browserify/node_modules/base64-js/lib\")},{buffer:3,lYpoI2:11}],3:[function(n,o,i){(function(r,s,m,A,c,l,u,g,h){var d=n(\"base64-js\"),p=n(\"ieee754\");function m(ue,fe,pe){if(!(this instanceof m))return new m(ue,fe,pe);var ye,Me,ve,he,Qe=typeof ue;if(fe===\"base64\"\u0026\u0026Qe==\"string\")for(ue=(he=ue).trim?he.trim():he.replace(/^\\s+|\\s+$/g,\"\");ue.length%4!=0;)ue+=\"=\";if(Qe==\"number\")ye=Y(ue);else if(Qe==\"string\")ye=m.byteLength(ue,fe);else{if(Qe!=\"object\")throw new Error(\"First argument needs to be a number, array or string.\");ye=Y(ue.length)}if(m._useTypedArrays?Me=m._augment(new Uint8Array(ye)):((Me=this).length=ye,Me._isBuffer=!0),m._useTypedArrays\u0026\u0026typeof ue.byteLength==\"number\")Me._set(ue);else if(W(he=ue)||m.isBuffer(he)||he\u0026\u0026typeof he==\"object\"\u0026\u0026typeof he.length==\"number\")for(ve=0;ve\u003cye;ve++)m.isBuffer(ue)?Me[ve]=ue.readUInt8(ve):Me[ve]=ue[ve];else if(Qe==\"string\")Me.write(ue,0,fe);else if(Qe==\"number\"\u0026\u0026!m._useTypedArrays\u0026\u0026!pe)for(ve=0;ve\u003cye;ve++)Me[ve]=0;return Me}function _(ue,fe,pe,ye){return m._charsWritten=oe((function(Me){for(var ve=[],he=0;he\u003cMe.length;he++)ve.push(255\u0026Me.charCodeAt(he));return ve})(fe),ue,pe,ye)}function f(ue,fe,pe,ye){return m._charsWritten=oe((function(Me){for(var ve,he,Qe=[],Pe=0;Pe\u003cMe.length;Pe++)he=Me.charCodeAt(Pe),ve=he\u003e\u003e8,he=he%256,Qe.push(he),Qe.push(ve);return Qe})(fe),ue,pe,ye)}function I(ue,fe,pe){var ye=\"\";pe=Math.min(ue.length,pe);for(var Me=fe;Me\u003cpe;Me++)ye+=String.fromCharCode(ue[Me]);return ye}function C(ue,fe,pe,ve){ve||(_e(typeof pe==\"boolean\",\"missing or invalid endian\"),_e(fe!=null,\"missing offset\"),_e(fe+1\u003cue.length,\"Trying to read beyond buffer length\"));var Me,ve=ue.length;if(!(ve\u003c=fe))return pe?(Me=ue[fe],fe+1\u003cve\u0026\u0026(Me|=ue[fe+1]\u003c\u003c8)):(Me=ue[fe]\u003c\u003c8,fe+1\u003cve\u0026\u0026(Me|=ue[fe+1])),Me}function y(ue,fe,pe,ve){ve||(_e(typeof pe==\"boolean\",\"missing or invalid endian\"),_e(fe!=null,\"missing offset\"),_e(fe+3\u003cue.length,\"Trying to read beyond buffer length\"));var Me,ve=ue.length;if(!(ve\u003c=fe))return pe?(fe+2\u003cve\u0026\u0026(Me=ue[fe+2]\u003c\u003c16),fe+1\u003cve\u0026\u0026(Me|=ue[fe+1]\u003c\u003c8),Me|=ue[fe],fe+3\u003cve\u0026\u0026(Me+=ue[fe+3]\u003c\u003c24\u003e\u003e\u003e0)):(fe+1\u003cve\u0026\u0026(Me=ue[fe+1]\u003c\u003c16),fe+2\u003cve\u0026\u0026(Me|=ue[fe+2]\u003c\u003c8),fe+3\u003cve\u0026\u0026(Me|=ue[fe+3]),Me+=ue[fe]\u003c\u003c24\u003e\u003e\u003e0),Me}function x(ue,fe,pe,ye){if(ye||(_e(typeof pe==\"boolean\",\"missing or invalid endian\"),_e(fe!=null,\"missing offset\"),_e(fe+1\u003cue.length,\"Trying to read beyond buffer length\")),!(ue.length\u003c=fe))return ye=C(ue,fe,pe,!0),32768\u0026ye?-1*(65535-ye+1):ye}function E(ue,fe,pe,ye){if(ye||(_e(typeof pe==\"boolean\",\"missing or invalid endian\"),_e(fe!=null,\"missing offset\"),_e(fe+3\u003cue.length,\"Trying to read beyond buffer length\")),!(ue.length\u003c=fe))return ye=y(ue,fe,pe,!0),2147483648\u0026ye?-1*(4294967295-ye+1):ye}function B(ue,fe,pe,ye){return ye||(_e(typeof pe==\"boolean\",\"missing or invalid endian\"),_e(fe+3\u003cue.length,\"Trying to read beyond buffer length\")),p.read(ue,fe,pe,23,4)}function S(ue,fe,pe,ye){return ye||(_e(typeof pe==\"boolean\",\"missing or invalid endian\"),_e(fe+7\u003cue.length,\"Trying to read beyond buffer length\")),p.read(ue,fe,pe,52,8)}function Q(ue,fe,pe,ye,Me){if(Me||(_e(fe!=null,\"missing value\"),_e(typeof ye==\"boolean\",\"missing or invalid endian\"),_e(pe!=null,\"missing offset\"),_e(pe+1\u003cue.length,\"trying to write beyond buffer length\"),ne(fe,65535)),Me=ue.length,!(Me\u003c=pe))for(var ve=0,he=Math.min(Me-pe,2);ve\u003che;ve++)ue[pe+ve]=(fe\u0026255\u003c\u003c8*(ye?ve:1-ve))\u003e\u003e\u003e8*(ye?ve:1-ve)}function w(ue,fe,pe,ye,Me){if(Me||(_e(fe!=null,\"missing value\"),_e(typeof ye==\"boolean\",\"missing or invalid endian\"),_e(pe!=null,\"missing offset\"),_e(pe+3\u003cue.length,\"trying to write beyond buffer length\"),ne(fe,4294967295)),Me=ue.length,!(Me\u003c=pe))for(var ve=0,he=Math.min(Me-pe,4);ve\u003che;ve++)ue[pe+ve]=fe\u003e\u003e\u003e8*(ye?ve:3-ve)\u0026255}function M(ue,fe,pe,ye,Me){Me||(_e(fe!=null,\"missing value\"),_e(typeof ye==\"boolean\",\"missing or invalid endian\"),_e(pe!=null,\"missing offset\"),_e(pe+1\u003cue.length,\"Trying to write beyond buffer length\"),le(fe,32767,-32768)),ue.length\u003c=pe||Q(ue,0\u003c=fe?fe:65535+fe+1,pe,ye,Me)}function k(ue,fe,pe,ye,Me){Me||(_e(fe!=null,\"missing value\"),_e(typeof ye==\"boolean\",\"missing or invalid endian\"),_e(pe!=null,\"missing offset\"),_e(pe+3\u003cue.length,\"Trying to write beyond buffer length\"),le(fe,2147483647,-2147483648)),ue.length\u003c=pe||w(ue,0\u003c=fe?fe:4294967295+fe+1,pe,ye,Me)}function R(ue,fe,pe,ye,Me){Me||(_e(fe!=null,\"missing value\"),_e(typeof ye==\"boolean\",\"missing or invalid endian\"),_e(pe!=null,\"missing offset\"),_e(pe+3\u003cue.length,\"Trying to write beyond buffer length\"),ge(fe,34028234663852886e22,-34028234663852886e22)),ue.length\u003c=pe||p.write(ue,fe,pe,ye,23,4)}function F(ue,fe,pe,ye,Me){Me||(_e(fe!=null,\"missing value\"),_e(typeof ye==\"boolean\",\"missing or invalid endian\"),_e(pe!=null,\"missing offset\"),_e(pe+7\u003cue.length,\"Trying to write beyond buffer length\"),ge(fe,17976931348623157e292,-17976931348623157e292)),ue.length\u003c=pe||p.write(ue,fe,pe,ye,52,8)}i.Buffer=m,i.SlowBuffer=m,i.INSPECT_MAX_BYTES=50,m.poolSize=8192,m._useTypedArrays=(function(){try{var ue=new ArrayBuffer(0),fe=new Uint8Array(ue);return fe.foo=function(){return 42},fe.foo()===42\u0026\u0026typeof fe.subarray==\"function\"}catch{return!1}})(),m.isEncoding=function(ue){switch(String(ue).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"raw\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},m.isBuffer=function(ue){return!(ue==null||!ue._isBuffer)},m.byteLength=function(ue,fe){var pe;switch(ue+=\"\",fe||\"utf8\"){case\"hex\":pe=ue.length/2;break;case\"utf8\":case\"utf-8\":pe=j(ue).length;break;case\"ascii\":case\"binary\":case\"raw\":pe=ue.length;break;case\"base64\":pe=J(ue).length;break;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":pe=2*ue.length;break;default:throw new Error(\"Unknown encoding\")}return pe},m.concat=function(ue,fe){if(_e(W(ue),`Usage: Buffer.concat(list, [totalLength])\nlist should be an Array.`),ue.length===0)return new m(0);if(ue.length===1)return ue[0];if(typeof fe!=\"number\")for(Me=fe=0;Me\u003cue.length;Me++)fe+=ue[Me].length;for(var pe=new m(fe),ye=0,Me=0;Me\u003cue.length;Me++){var ve=ue[Me];ve.copy(pe,ye),ye+=ve.length}return pe},m.prototype.write=function(ue,fe,pe,ye){isFinite(fe)?isFinite(pe)||(ye=pe,pe=void 0):(Pe=ye,ye=fe,fe=pe,pe=Pe),fe=Number(fe)||0;var Me,ve,he,Qe,Pe=this.length-fe;switch((!pe||Pe\u003c(pe=Number(pe)))\u0026\u0026(pe=Pe),ye=String(ye||\"utf8\").toLowerCase()){case\"hex\":Me=(function(we,Te,Re,Ee){Re=Number(Re)||0;var ke=we.length-Re;(!Ee||ke\u003c(Ee=Number(Ee)))\u0026\u0026(Ee=ke),_e((ke=Te.length)%2==0,\"Invalid hex string\"),ke/2\u003cEe\u0026\u0026(Ee=ke/2);for(var Ce=0;Ce\u003cEe;Ce++){var Le=parseInt(Te.substr(2*Ce,2),16);_e(!isNaN(Le),\"Invalid hex string\"),we[Re+Ce]=Le}return m._charsWritten=2*Ce,Ce})(this,ue,fe,pe);break;case\"utf8\":case\"utf-8\":ve=this,he=fe,Qe=pe,Me=m._charsWritten=oe(j(ue),ve,he,Qe);break;case\"ascii\":case\"binary\":Me=_(this,ue,fe,pe);break;case\"base64\":ve=this,he=fe,Qe=pe,Me=m._charsWritten=oe(J(ue),ve,he,Qe);break;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":Me=f(this,ue,fe,pe);break;default:throw new Error(\"Unknown encoding\")}return Me},m.prototype.toString=function(ue,fe,pe){var ye,Me,ve,he,Qe=this;if(ue=String(ue||\"utf8\").toLowerCase(),fe=Number(fe)||0,(pe=pe!==void 0?Number(pe):Qe.length)===fe)return\"\";switch(ue){case\"hex\":ye=(function(Pe,we,Te){var Re=Pe.length;(!we||we\u003c0)\u0026\u0026(we=0),(!Te||Te\u003c0||Re\u003cTe)\u0026\u0026(Te=Re);for(var Ee=\"\",ke=we;ke\u003cTe;ke++)Ee+=te(Pe[ke]);return Ee})(Qe,fe,pe);break;case\"utf8\":case\"utf-8\":ye=(function(Pe,we,Te){var Re=\"\",Ee=\"\";Te=Math.min(Pe.length,Te);for(var ke=we;ke\u003cTe;ke++)Pe[ke]\u003c=127?(Re+=ie(Ee)+String.fromCharCode(Pe[ke]),Ee=\"\"):Ee+=\"%\"+Pe[ke].toString(16);return Re+ie(Ee)})(Qe,fe,pe);break;case\"ascii\":case\"binary\":ye=I(Qe,fe,pe);break;case\"base64\":Me=Qe,he=pe,ye=(ve=fe)===0\u0026\u0026he===Me.length?d.fromByteArray(Me):d.fromByteArray(Me.slice(ve,he));break;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":ye=(function(Pe,we,Te){for(var Re=Pe.slice(we,Te),Ee=\"\",ke=0;ke\u003cRe.length;ke+=2)Ee+=String.fromCharCode(Re[ke]+256*Re[ke+1]);return Ee})(Qe,fe,pe);break;default:throw new Error(\"Unknown encoding\")}return ye},m.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}},m.prototype.copy=function(ue,fe,pe,ye){if(fe=fe||0,(ye=ye||ye===0?ye:this.length)!==(pe=pe||0)\u0026\u0026ue.length!==0\u0026\u0026this.length!==0){_e(pe\u003c=ye,\"sourceEnd \u003c sourceStart\"),_e(0\u003c=fe\u0026\u0026fe\u003cue.length,\"targetStart out of bounds\"),_e(0\u003c=pe\u0026\u0026pe\u003cthis.length,\"sourceStart out of bounds\"),_e(0\u003c=ye\u0026\u0026ye\u003c=this.length,\"sourceEnd out of bounds\"),ye\u003ethis.length\u0026\u0026(ye=this.length);var Me=(ye=ue.length-fe\u003cye-pe?ue.length-fe+pe:ye)-pe;if(Me\u003c100||!m._useTypedArrays)for(var ve=0;ve\u003cMe;ve++)ue[ve+fe]=this[ve+pe];else ue._set(this.subarray(pe,pe+Me),fe)}},m.prototype.slice=function(ue,fe){var pe=this.length;if(ue=U(ue,pe,0),fe=U(fe,pe,pe),m._useTypedArrays)return m._augment(this.subarray(ue,fe));for(var ye=fe-ue,Me=new m(ye,void 0,!0),ve=0;ve\u003cye;ve++)Me[ve]=this[ve+ue];return Me},m.prototype.get=function(ue){return console.log(\".get() is deprecated. Access using array indexes instead.\"),this.readUInt8(ue)},m.prototype.set=function(ue,fe){return console.log(\".set() is deprecated. Access using array indexes instead.\"),this.writeUInt8(ue,fe)},m.prototype.readUInt8=function(ue,fe){if(fe||(_e(ue!=null,\"missing offset\"),_e(ue\u003cthis.length,\"Trying to read beyond buffer length\")),!(ue\u003e=this.length))return this[ue]},m.prototype.readUInt16LE=function(ue,fe){return C(this,ue,!0,fe)},m.prototype.readUInt16BE=function(ue,fe){return C(this,ue,!1,fe)},m.prototype.readUInt32LE=function(ue,fe){return y(this,ue,!0,fe)},m.prototype.readUInt32BE=function(ue,fe){return y(this,ue,!1,fe)},m.prototype.readInt8=function(ue,fe){if(fe||(_e(ue!=null,\"missing offset\"),_e(ue\u003cthis.length,\"Trying to read beyond buffer length\")),!(ue\u003e=this.length))return 128\u0026this[ue]?-1*(255-this[ue]+1):this[ue]},m.prototype.readInt16LE=function(ue,fe){return x(this,ue,!0,fe)},m.prototype.readInt16BE=function(ue,fe){return x(this,ue,!1,fe)},m.prototype.readInt32LE=function(ue,fe){return E(this,ue,!0,fe)},m.prototype.readInt32BE=function(ue,fe){return E(this,ue,!1,fe)},m.prototype.readFloatLE=function(ue,fe){return B(this,ue,!0,fe)},m.prototype.readFloatBE=function(ue,fe){return B(this,ue,!1,fe)},m.prototype.readDoubleLE=function(ue,fe){return S(this,ue,!0,fe)},m.prototype.readDoubleBE=function(ue,fe){return S(this,ue,!1,fe)},m.prototype.writeUInt8=function(ue,fe,pe){pe||(_e(ue!=null,\"missing value\"),_e(fe!=null,\"missing offset\"),_e(fe\u003cthis.length,\"trying to write beyond buffer length\"),ne(ue,255)),fe\u003e=this.length||(this[fe]=ue)},m.prototype.writeUInt16LE=function(ue,fe,pe){Q(this,ue,fe,!0,pe)},m.prototype.writeUInt16BE=function(ue,fe,pe){Q(this,ue,fe,!1,pe)},m.prototype.writeUInt32LE=function(ue,fe,pe){w(this,ue,fe,!0,pe)},m.prototype.writeUInt32BE=function(ue,fe,pe){w(this,ue,fe,!1,pe)},m.prototype.writeInt8=function(ue,fe,pe){pe||(_e(ue!=null,\"missing value\"),_e(fe!=null,\"missing offset\"),_e(fe\u003cthis.length,\"Trying to write beyond buffer length\"),le(ue,127,-128)),fe\u003e=this.length||(0\u003c=ue?this.writeUInt8(ue,fe,pe):this.writeUInt8(255+ue+1,fe,pe))},m.prototype.writeInt16LE=function(ue,fe,pe){M(this,ue,fe,!0,pe)},m.prototype.writeInt16BE=function(ue,fe,pe){M(this,ue,fe,!1,pe)},m.prototype.writeInt32LE=function(ue,fe,pe){k(this,ue,fe,!0,pe)},m.prototype.writeInt32BE=function(ue,fe,pe){k(this,ue,fe,!1,pe)},m.prototype.writeFloatLE=function(ue,fe,pe){R(this,ue,fe,!0,pe)},m.prototype.writeFloatBE=function(ue,fe,pe){R(this,ue,fe,!1,pe)},m.prototype.writeDoubleLE=function(ue,fe,pe){F(this,ue,fe,!0,pe)},m.prototype.writeDoubleBE=function(ue,fe,pe){F(this,ue,fe,!1,pe)},m.prototype.fill=function(ue,fe,pe){if(fe=fe||0,pe=pe||this.length,_e(typeof(ue=typeof(ue=ue||0)==\"string\"?ue.charCodeAt(0):ue)==\"number\"\u0026\u0026!isNaN(ue),\"value is not a number\"),_e(fe\u003c=pe,\"end \u003c start\"),pe!==fe\u0026\u0026this.length!==0){_e(0\u003c=fe\u0026\u0026fe\u003cthis.length,\"start out of bounds\"),_e(0\u003c=pe\u0026\u0026pe\u003c=this.length,\"end out of bounds\");for(var ye=fe;ye\u003cpe;ye++)this[ye]=ue}},m.prototype.inspect=function(){for(var ue=[],fe=this.length,pe=0;pe\u003cfe;pe++)if(ue[pe]=te(this[pe]),pe===i.INSPECT_MAX_BYTES){ue[pe+1]=\"...\";break}return\"\u003cBuffer \"+ue.join(\" \")+\"\u003e\"},m.prototype.toArrayBuffer=function(){if(typeof Uint8Array\u003e\"u\")throw new Error(\"Buffer.toArrayBuffer not supported in this browser\");if(m._useTypedArrays)return new m(this).buffer;for(var ue=new Uint8Array(this.length),fe=0,pe=ue.length;fe\u003cpe;fe+=1)ue[fe]=this[fe];return ue.buffer};var O=m.prototype;function U(ue,fe,pe){return typeof ue!=\"number\"?pe:fe\u003c=(ue=~~ue)?fe:0\u003c=ue||0\u003c=(ue+=fe)?ue:0}function Y(ue){return(ue=~~Math.ceil(+ue))\u003c0?0:ue}function W(ue){return(Array.isArray||function(fe){return Object.prototype.toString.call(fe)===\"[object Array]\"})(ue)}function te(ue){return ue\u003c16?\"0\"+ue.toString(16):ue.toString(16)}function j(ue){for(var fe=[],pe=0;pe\u003cue.length;pe++){var ye=ue.charCodeAt(pe);if(ye\u003c=127)fe.push(ue.charCodeAt(pe));else for(var Me=pe,ve=(55296\u003c=ye\u0026\u0026ye\u003c=57343\u0026\u0026pe++,encodeURIComponent(ue.slice(Me,pe+1)).substr(1).split(\"%\")),he=0;he\u003cve.length;he++)fe.push(parseInt(ve[he],16))}return fe}function J(ue){return d.toByteArray(ue)}function oe(ue,fe,pe,ye){for(var Me=0;Me\u003cye\u0026\u0026!(Me+pe\u003e=fe.length||Me\u003e=ue.length);Me++)fe[Me+pe]=ue[Me];return Me}function ie(ue){try{return decodeURIComponent(ue)}catch{return\"�\"}}function ne(ue,fe){_e(typeof ue==\"number\",\"cannot write a non-number as a number\"),_e(0\u003c=ue,\"specified a negative value for writing an unsigned value\"),_e(ue\u003c=fe,\"value is larger than maximum value for type\"),_e(Math.floor(ue)===ue,\"value has a fractional component\")}function le(ue,fe,pe){_e(typeof ue==\"number\",\"cannot write a non-number as a number\"),_e(ue\u003c=fe,\"value larger than maximum allowed value\"),_e(pe\u003c=ue,\"value smaller than minimum allowed value\"),_e(Math.floor(ue)===ue,\"value has a fractional component\")}function ge(ue,fe,pe){_e(typeof ue==\"number\",\"cannot write a non-number as a number\"),_e(ue\u003c=fe,\"value larger than maximum allowed value\"),_e(pe\u003c=ue,\"value smaller than minimum allowed value\")}function _e(ue,fe){if(!ue)throw new Error(fe||\"Failed assertion\")}m._augment=function(ue){return ue._isBuffer=!0,ue._get=ue.get,ue._set=ue.set,ue.get=O.get,ue.set=O.set,ue.write=O.write,ue.toString=O.toString,ue.toLocaleString=O.toString,ue.toJSON=O.toJSON,ue.copy=O.copy,ue.slice=O.slice,ue.readUInt8=O.readUInt8,ue.readUInt16LE=O.readUInt16LE,ue.readUInt16BE=O.readUInt16BE,ue.readUInt32LE=O.readUInt32LE,ue.readUInt32BE=O.readUInt32BE,ue.readInt8=O.readInt8,ue.readInt16LE=O.readInt16LE,ue.readInt16BE=O.readInt16BE,ue.readInt32LE=O.readInt32LE,ue.readInt32BE=O.readInt32BE,ue.readFloatLE=O.readFloatLE,ue.readFloatBE=O.readFloatBE,ue.readDoubleLE=O.readDoubleLE,ue.readDoubleBE=O.readDoubleBE,ue.writeUInt8=O.writeUInt8,ue.writeUInt16LE=O.writeUInt16LE,ue.writeUInt16BE=O.writeUInt16BE,ue.writeUInt32LE=O.writeUInt32LE,ue.writeUInt32BE=O.writeUInt32BE,ue.writeInt8=O.writeInt8,ue.writeInt16LE=O.writeInt16LE,ue.writeInt16BE=O.writeInt16BE,ue.writeInt32LE=O.writeInt32LE,ue.writeInt32BE=O.writeInt32BE,ue.writeFloatLE=O.writeFloatLE,ue.writeFloatBE=O.writeFloatBE,ue.writeDoubleLE=O.writeDoubleLE,ue.writeDoubleBE=O.writeDoubleBE,ue.fill=O.fill,ue.inspect=O.inspect,ue.toArrayBuffer=O.toArrayBuffer,ue}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/buffer/index.js\",\"/node_modules/gulp-browserify/node_modules/buffer\")},{\"base64-js\":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,o,i){(function(r,s,d,A,c,l,u,g,h){var d=n(\"buffer\").Buffer,p=4,m=new d(p);m.fill(0),o.exports={hash:function(_,f,I,C){for(var y=f((function(Q,w){Q.length%p!=0\u0026\u0026(M=Q.length+(p-Q.length%p),Q=d.concat([Q,m],M));for(var M,k=[],R=w?Q.readInt32BE:Q.readInt32LE,F=0;F\u003cQ.length;F+=p)k.push(R.call(Q,F));return k})(_=d.isBuffer(_)?_:new d(_),C),8*_.length),f=C,x=new d(I),E=f?x.writeInt32BE:x.writeInt32LE,B=0;B\u003cy.length;B++)E.call(x,y[B],4*B,!0);return x}}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js\",\"/node_modules/gulp-browserify/node_modules/crypto-browserify\")},{buffer:3,lYpoI2:11}],5:[function(n,o,i){(function(r,s,d,A,c,l,u,g,h){var d=n(\"buffer\").Buffer,p=n(\"./sha\"),m=n(\"./sha256\"),_=n(\"./rng\"),f={sha1:p,sha256:m,md5:n(\"./md5\")},I=64,C=new d(I);function y(Q,w){var M=f[Q=Q||\"sha1\"],k=[];return M||x(\"algorithm:\",Q,\"is not yet supported\"),{update:function(R){return d.isBuffer(R)||(R=new d(R)),k.push(R),R.length,this},digest:function(R){var F=d.concat(k),F=w?(function(O,U,Y){d.isBuffer(U)||(U=new d(U)),d.isBuffer(Y)||(Y=new d(Y)),U.length\u003eI?U=O(U):U.length\u003cI\u0026\u0026(U=d.concat([U,C],I));for(var W=new d(I),te=new d(I),j=0;j\u003cI;j++)W[j]=54^U[j],te[j]=92^U[j];return Y=O(d.concat([W,Y])),O(d.concat([te,Y]))})(M,w,F):M(F);return k=null,R?F.toString(R):F}}}function x(){var Q=[].slice.call(arguments).join(\" \");throw new Error([Q,\"we accept pull requests\",\"http://github.com/dominictarr/crypto-browserify\"].join(`\n`))}C.fill(0),i.createHash=function(Q){return y(Q)},i.createHmac=y,i.randomBytes=function(Q,w){if(!w||!w.call)return new d(_(Q));try{w.call(this,void 0,new d(_(Q)))}catch(M){w(M)}};var E,B=[\"createCredentials\",\"createCipher\",\"createCipheriv\",\"createDecipher\",\"createDecipheriv\",\"createSign\",\"createVerify\",\"createDiffieHellman\",\"pbkdf2\"],S=function(Q){i[Q]=function(){x(\"sorry,\",Q,\"is not implemented yet\")}};for(E in B)S(B[E])}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js\",\"/node_modules/gulp-browserify/node_modules/crypto-browserify\")},{\"./md5\":6,\"./rng\":7,\"./sha\":8,\"./sha256\":9,buffer:3,lYpoI2:11}],6:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d=n(\"./helpers\");function p(x,E){x[E\u003e\u003e5]|=128\u003c\u003cE%32,x[14+(E+64\u003e\u003e\u003e9\u003c\u003c4)]=E;for(var B=1732584193,S=-271733879,Q=-1732584194,w=271733878,M=0;M\u003cx.length;M+=16){var k=B,R=S,F=Q,O=w,B=_(B,S,Q,w,x[M+0],7,-680876936),w=_(w,B,S,Q,x[M+1],12,-389564586),Q=_(Q,w,B,S,x[M+2],17,606105819),S=_(S,Q,w,B,x[M+3],22,-1044525330);B=_(B,S,Q,w,x[M+4],7,-176418897),w=_(w,B,S,Q,x[M+5],12,1200080426),Q=_(Q,w,B,S,x[M+6],17,-1473231341),S=_(S,Q,w,B,x[M+7],22,-45705983),B=_(B,S,Q,w,x[M+8],7,1770035416),w=_(w,B,S,Q,x[M+9],12,-1958414417),Q=_(Q,w,B,S,x[M+10],17,-42063),S=_(S,Q,w,B,x[M+11],22,-1990404162),B=_(B,S,Q,w,x[M+12],7,1804603682),w=_(w,B,S,Q,x[M+13],12,-40341101),Q=_(Q,w,B,S,x[M+14],17,-1502002290),B=f(B,S=_(S,Q,w,B,x[M+15],22,1236535329),Q,w,x[M+1],5,-165796510),w=f(w,B,S,Q,x[M+6],9,-1069501632),Q=f(Q,w,B,S,x[M+11],14,643717713),S=f(S,Q,w,B,x[M+0],20,-373897302),B=f(B,S,Q,w,x[M+5],5,-701558691),w=f(w,B,S,Q,x[M+10],9,38016083),Q=f(Q,w,B,S,x[M+15],14,-660478335),S=f(S,Q,w,B,x[M+4],20,-405537848),B=f(B,S,Q,w,x[M+9],5,568446438),w=f(w,B,S,Q,x[M+14],9,-1019803690),Q=f(Q,w,B,S,x[M+3],14,-187363961),S=f(S,Q,w,B,x[M+8],20,1163531501),B=f(B,S,Q,w,x[M+13],5,-1444681467),w=f(w,B,S,Q,x[M+2],9,-51403784),Q=f(Q,w,B,S,x[M+7],14,1735328473),B=I(B,S=f(S,Q,w,B,x[M+12],20,-1926607734),Q,w,x[M+5],4,-378558),w=I(w,B,S,Q,x[M+8],11,-2022574463),Q=I(Q,w,B,S,x[M+11],16,1839030562),S=I(S,Q,w,B,x[M+14],23,-35309556),B=I(B,S,Q,w,x[M+1],4,-1530992060),w=I(w,B,S,Q,x[M+4],11,1272893353),Q=I(Q,w,B,S,x[M+7],16,-155497632),S=I(S,Q,w,B,x[M+10],23,-1094730640),B=I(B,S,Q,w,x[M+13],4,681279174),w=I(w,B,S,Q,x[M+0],11,-358537222),Q=I(Q,w,B,S,x[M+3],16,-722521979),S=I(S,Q,w,B,x[M+6],23,76029189),B=I(B,S,Q,w,x[M+9],4,-640364487),w=I(w,B,S,Q,x[M+12],11,-421815835),Q=I(Q,w,B,S,x[M+15],16,530742520),B=C(B,S=I(S,Q,w,B,x[M+2],23,-995338651),Q,w,x[M+0],6,-198630844),w=C(w,B,S,Q,x[M+7],10,1126891415),Q=C(Q,w,B,S,x[M+14],15,-1416354905),S=C(S,Q,w,B,x[M+5],21,-57434055),B=C(B,S,Q,w,x[M+12],6,1700485571),w=C(w,B,S,Q,x[M+3],10,-1894986606),Q=C(Q,w,B,S,x[M+10],15,-1051523),S=C(S,Q,w,B,x[M+1],21,-2054922799),B=C(B,S,Q,w,x[M+8],6,1873313359),w=C(w,B,S,Q,x[M+15],10,-30611744),Q=C(Q,w,B,S,x[M+6],15,-1560198380),S=C(S,Q,w,B,x[M+13],21,1309151649),B=C(B,S,Q,w,x[M+4],6,-145523070),w=C(w,B,S,Q,x[M+11],10,-1120210379),Q=C(Q,w,B,S,x[M+2],15,718787259),S=C(S,Q,w,B,x[M+9],21,-343485551),B=y(B,k),S=y(S,R),Q=y(Q,F),w=y(w,O)}return Array(B,S,Q,w)}function m(x,E,B,S,Q,w){return y((E=y(y(E,x),y(S,w)))\u003c\u003cQ|E\u003e\u003e\u003e32-Q,B)}function _(x,E,B,S,Q,w,M){return m(E\u0026B|~E\u0026S,x,E,Q,w,M)}function f(x,E,B,S,Q,w,M){return m(E\u0026S|B\u0026~S,x,E,Q,w,M)}function I(x,E,B,S,Q,w,M){return m(E^B^S,x,E,Q,w,M)}function C(x,E,B,S,Q,w,M){return m(B^(E|~S),x,E,Q,w,M)}function y(x,E){var B=(65535\u0026x)+(65535\u0026E);return(x\u003e\u003e16)+(E\u003e\u003e16)+(B\u003e\u003e16)\u003c\u003c16|65535\u0026B}o.exports=function(x){return d.hash(x,p,16)}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js\",\"/node_modules/gulp-browserify/node_modules/crypto-browserify\")},{\"./helpers\":4,buffer:3,lYpoI2:11}],7:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){o.exports=function(d){for(var p,m=new Array(d),_=0;_\u003cd;_++)(3\u0026_)==0\u0026\u0026(p=4294967296*Math.random()),m[_]=p\u003e\u003e\u003e((3\u0026_)\u003c\u003c3)\u0026255;return m}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js\",\"/node_modules/gulp-browserify/node_modules/crypto-browserify\")},{buffer:3,lYpoI2:11}],8:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d=n(\"./helpers\");function p(f,I){f[I\u003e\u003e5]|=128\u003c\u003c24-I%32,f[15+(I+64\u003e\u003e9\u003c\u003c4)]=I;for(var C,y,x,E=Array(80),B=1732584193,S=-271733879,Q=-1732584194,w=271733878,M=-1009589776,k=0;k\u003cf.length;k+=16){for(var R=B,F=S,O=Q,U=w,Y=M,W=0;W\u003c80;W++){E[W]=W\u003c16?f[k+W]:_(E[W-3]^E[W-8]^E[W-14]^E[W-16],1);var te=m(m(_(B,5),(te=S,y=Q,x=w,(C=W)\u003c20?te\u0026y|~te\u0026x:!(C\u003c40)\u0026\u0026C\u003c60?te\u0026y|te\u0026x|y\u0026x:te^y^x)),m(m(M,E[W]),(C=W)\u003c20?1518500249:C\u003c40?1859775393:C\u003c60?-1894007588:-899497514)),M=w,w=Q,Q=_(S,30),S=B,B=te}B=m(B,R),S=m(S,F),Q=m(Q,O),w=m(w,U),M=m(M,Y)}return Array(B,S,Q,w,M)}function m(f,I){var C=(65535\u0026f)+(65535\u0026I);return(f\u003e\u003e16)+(I\u003e\u003e16)+(C\u003e\u003e16)\u003c\u003c16|65535\u0026C}function _(f,I){return f\u003c\u003cI|f\u003e\u003e\u003e32-I}o.exports=function(f){return d.hash(f,p,20,!0)}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js\",\"/node_modules/gulp-browserify/node_modules/crypto-browserify\")},{\"./helpers\":4,buffer:3,lYpoI2:11}],9:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){function d(I,C){var y=(65535\u0026I)+(65535\u0026C);return(I\u003e\u003e16)+(C\u003e\u003e16)+(y\u003e\u003e16)\u003c\u003c16|65535\u0026y}function p(I,C){var y,x=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),B=new Array(64);I[C\u003e\u003e5]|=128\u003c\u003c24-C%32,I[15+(C+64\u003e\u003e9\u003c\u003c4)]=C;for(var S,Q,w=0;w\u003cI.length;w+=16){for(var M=E[0],k=E[1],R=E[2],F=E[3],O=E[4],U=E[5],Y=E[6],W=E[7],te=0;te\u003c64;te++)B[te]=te\u003c16?I[te+w]:d(d(d((Q=B[te-2],_(Q,17)^_(Q,19)^f(Q,10)),B[te-7]),(Q=B[te-15],_(Q,7)^_(Q,18)^f(Q,3))),B[te-16]),y=d(d(d(d(W,_(Q=O,6)^_(Q,11)^_(Q,25)),O\u0026U^~O\u0026Y),x[te]),B[te]),S=d(_(S=M,2)^_(S,13)^_(S,22),M\u0026k^M\u0026R^k\u0026R),W=Y,Y=U,U=O,O=d(F,y),F=R,R=k,k=M,M=d(y,S);E[0]=d(M,E[0]),E[1]=d(k,E[1]),E[2]=d(R,E[2]),E[3]=d(F,E[3]),E[4]=d(O,E[4]),E[5]=d(U,E[5]),E[6]=d(Y,E[6]),E[7]=d(W,E[7])}return E}var m=n(\"./helpers\"),_=function(I,C){return I\u003e\u003e\u003eC|I\u003c\u003c32-C},f=function(I,C){return I\u003e\u003e\u003eC};o.exports=function(I){return m.hash(I,p,32,!0)}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js\",\"/node_modules/gulp-browserify/node_modules/crypto-browserify\")},{\"./helpers\":4,buffer:3,lYpoI2:11}],10:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){i.read=function(d,p,m,_,w){var I,C,y=8*w-_-1,x=(1\u003c\u003cy)-1,E=x\u003e\u003e1,B=-7,S=m?w-1:0,Q=m?-1:1,w=d[p+S];for(S+=Q,I=w\u0026(1\u003c\u003c-B)-1,w\u003e\u003e=-B,B+=y;0\u003cB;I=256*I+d[p+S],S+=Q,B-=8);for(C=I\u0026(1\u003c\u003c-B)-1,I\u003e\u003e=-B,B+=_;0\u003cB;C=256*C+d[p+S],S+=Q,B-=8);if(I===0)I=1-E;else{if(I===x)return C?NaN:1/0*(w?-1:1);C+=Math.pow(2,_),I-=E}return(w?-1:1)*C*Math.pow(2,I-_)},i.write=function(d,p,m,_,f,M){var C,y,x=8*M-f-1,E=(1\u003c\u003cx)-1,B=E\u003e\u003e1,S=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,Q=_?0:M-1,w=_?1:-1,M=p\u003c0||p===0\u0026\u00261/p\u003c0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(y=isNaN(p)?1:0,C=E):(C=Math.floor(Math.log(p)/Math.LN2),p*(_=Math.pow(2,-C))\u003c1\u0026\u0026(C--,_*=2),2\u003c=(p+=1\u003c=C+B?S/_:S*Math.pow(2,1-B))*_\u0026\u0026(C++,_/=2),E\u003c=C+B?(y=0,C=E):1\u003c=C+B?(y=(p*_-1)*Math.pow(2,f),C+=B):(y=p*Math.pow(2,B-1)*Math.pow(2,f),C=0));8\u003c=f;d[m+Q]=255\u0026y,Q+=w,y/=256,f-=8);for(C=C\u003c\u003cf|y,x+=f;0\u003cx;d[m+Q]=255\u0026C,Q+=w,C/=256,x-=8);d[m+Q-w]|=128*M}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/ieee754/index.js\",\"/node_modules/gulp-browserify/node_modules/ieee754\")},{buffer:3,lYpoI2:11}],11:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d,p,m;function _(){}(r=o.exports={}).nextTick=(p=typeof window\u003c\"u\"\u0026\u0026window.setImmediate,m=typeof window\u003c\"u\"\u0026\u0026window.postMessage\u0026\u0026window.addEventListener,p?function(f){return window.setImmediate(f)}:m?(d=[],window.addEventListener(\"message\",function(f){var I=f.source;I!==window\u0026\u0026I!==null||f.data!==\"process-tick\"||(f.stopPropagation(),0\u003cd.length\u0026\u0026d.shift()())},!0),function(f){d.push(f),window.postMessage(\"process-tick\",\"*\")}):function(f){setTimeout(f,0)}),r.title=\"browser\",r.browser=!0,r.env={},r.argv=[],r.on=_,r.addListener=_,r.once=_,r.off=_,r.removeListener=_,r.removeAllListeners=_,r.emit=_,r.binding=function(f){throw new Error(\"process.binding is not supported\")},r.cwd=function(){return\"/\"},r.chdir=function(f){throw new Error(\"process.chdir is not supported\")}}).call(this,n(\"lYpoI2\"),typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{},n(\"buffer\").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],\"/node_modules/gulp-browserify/node_modules/process/browser.js\",\"/node_modules/gulp-browserify/node_modules/process\")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(j9e)),j9e.exports}var D$n=M$n();const $9e=_y(D$n);var N$n={env:{}},R$n=Object.create,q9e=Object.defineProperty,T$n=Object.getOwnPropertyDescriptor,Zmt=Object.getOwnPropertyNames,k$n=Object.getPrototypeOf,F$n=Object.prototype.hasOwnProperty,nm=(t,e)=\u003efunction(){return e||(0,t[Zmt(t)[0]])((e={exports:{}}).exports,e),e.exports},e_t=(t,e)=\u003e{for(var n in e)q9e(t,n,{get:e[n],enumerable:!0})},X9e=(t,e,n)=\u003e(n=t!=null?R$n(k$n(t)):{},((o,i,r,s)=\u003e{if(i\u0026\u0026typeof i==\"object\"||typeof i==\"function\")for(let a of Zmt(i))F$n.call(o,a)||a===r||q9e(o,a,{get:()=\u003ei[a],enumerable:!(s=T$n(i,a))||s.enumerable});return o})(!e\u0026\u0026t\u0026\u0026t.__esModule?n:q9e(n,\"default\",{value:t,enumerable:!0}),t)),L$n=nm({\"node_modules/is-buffer/index.js\"(t,e){function n(o){return!!o.constructor\u0026\u0026typeof o.constructor.isBuffer==\"function\"\u0026\u0026o.constructor.isBuffer(o)}e.exports=function(o){return o!=null\u0026\u0026(n(o)||(function(i){return typeof i.readFloatLE==\"function\"\u0026\u0026typeof i.slice==\"function\"\u0026\u0026n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),H$n=nm({\"node_modules/kind-of/index.js\"(t,e){var n=L$n(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return\"undefined\";if(i===null)return\"null\";if(i===!0||i===!1||i instanceof Boolean)return\"boolean\";if(typeof i==\"string\"||i instanceof String)return\"string\";if(typeof i==\"number\"||i instanceof Number)return\"number\";if(typeof i==\"function\"||i instanceof Function)return\"function\";if(Array.isArray!==void 0\u0026\u0026Array.isArray(i))return\"array\";if(i instanceof RegExp)return\"regexp\";if(i instanceof Date)return\"date\";var r=o.call(i);return r===\"[object RegExp]\"?\"regexp\":r===\"[object Date]\"?\"date\":r===\"[object Arguments]\"?\"arguments\":r===\"[object Error]\"?\"error\":n(i)?\"buffer\":r===\"[object Set]\"?\"set\":r===\"[object WeakSet]\"?\"weakset\":r===\"[object Map]\"?\"map\":r===\"[object WeakMap]\"?\"weakmap\":r===\"[object Symbol]\"?\"symbol\":r===\"[object Int8Array]\"?\"int8array\":r===\"[object Uint8Array]\"?\"uint8array\":r===\"[object Uint8ClampedArray]\"?\"uint8clampedarray\":r===\"[object Int16Array]\"?\"int16array\":r===\"[object Uint16Array]\"?\"uint16array\":r===\"[object Int32Array]\"?\"int32array\":r===\"[object Uint32Array]\"?\"uint32array\":r===\"[object Float32Array]\"?\"float32array\":r===\"[object Float64Array]\"?\"float64array\":\"object\"}}}),O$n=nm({\"node_modules/rename-keys/index.js\"(t,e){(function(){function n(o,i){if(typeof i!=\"function\")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)\u0026\u0026(r[i(s,o[s])||s]=o[s]);return r}e!==void 0\u0026\u0026e.exports?e.exports=n:typeof define==\"function\"\u0026\u0026define.amd?define([],function(){return n}):window.rename=n})()}}),G$n=nm({\"node_modules/deep-rename-keys/index.js\"(t,e){var n=H$n(),o=O$n();e.exports=function i(r,s){var a=n(r);if(a!==\"object\"\u0026\u0026a!==\"array\")throw new Error(\"expected an object\");var A=[];for(var c in a===\"object\"\u0026\u0026(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)===\"object\"||n(l)===\"array\"?A[c]=i(l,s):A[c]=l}return A}}}),Y$n=nm({\"node_modules/xml-reader/node_modules/eventemitter3/index.js\"(t,e){var n=Object.prototype.hasOwnProperty,o=\"~\";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create\u0026\u0026(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)\u0026\u0026c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u\u003cg;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once\u0026\u0026this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p\u003c_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p\u003cI;p++)switch(m[p].once\u0026\u0026this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f\u003c_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l\u0026\u0026!g.once||c\u0026\u0026g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h\u003cp;h++)(g[h].fn!==A||l\u0026\u0026!g[h].once||c\u0026\u0026g[h].context!==c)\u0026\u0026d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]\u0026\u0026(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0\u0026\u0026(e.exports=s)}}),U$n=nm({\"node_modules/xml-lexer/node_modules/eventemitter3/index.js\"(t,e){var n=Object.prototype.hasOwnProperty,o=\"~\";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create\u0026\u0026(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)\u0026\u0026c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u\u003cg;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once\u0026\u0026this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p\u003c_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p\u003cI;p++)switch(m[p].once\u0026\u0026this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f\u003c_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l\u0026\u0026!g.once||c\u0026\u0026g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h\u003cp;h++)(g[h].fn!==A||l\u0026\u0026!g[h].once||c\u0026\u0026g[h].context!==c)\u0026\u0026d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]\u0026\u0026(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0\u0026\u0026(e.exports=s)}}),K$n=nm({\"node_modules/xml-lexer/dist/lexer.js\"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=U$n(),i=function(){},r={data:\"state-data\",cdata:\"state-cdata\",tagBegin:\"state-tag-begin\",tagName:\"state-tag-name\",tagEnd:\"state-tag-end\",attributeNameStart:\"state-attribute-name-start\",attributeName:\"state-attribute-name\",attributeNameEnd:\"state-attribute-name-end\",attributeValueBegin:\"state-attribute-value-begin\",attributeValue:\"state-attribute-value\"},s={lt:\"action-lt\",gt:\"action-gt\",space:\"action-space\",equal:\"action-equal\",quote:\"action-quote\",slash:\"action-slash\",char:\"action-char\",error:\"action-error\"},a={text:\"text\",openTag:\"open-tag\",closeTag:\"close-tag\",attributeName:\"attribute-name\",attributeValue:\"attribute-value\"},A={\" \":s.space,\"\t\":s.space,\"\\n\":s.space,\"\\r\":s.space,\"\u003c\":s.lt,\"\u003e\":s.gt,'\"':s.quote,\"'\":s.quote,\"=\":s.equal,\"/\":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x=\"\",E=\"\",B=\"\",S=\"\",Q=\"\",w=\"\",M=function(R,F){if(E[0]!==\"?\"\u0026\u0026E[0]!==\"!\"){var O={type:R,value:F};c.debug\u0026\u0026console.log(\"emit:\",O),C.emit(\"data\",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()\u0026\u0026M(a.text,x),E=\"\",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)===\"]]\u003e\"\u0026\u0026(M(a.text,x.slice(0,-3)),x=\"\",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E=\"\",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x=\"\",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)===\"![CDATA[\"\u0026\u0026(y=r.cdata,x=\"\",E=\"\")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x=\"\",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x=\"\",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(p,s.slash,function(){Q=!0,S=\"\",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(m,s.char,function(R){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S=\"\",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=\"\"),x=\"\",y=r.data}),n(_,s.char,function(R){w=\"\",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x=\"\",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug\u0026\u0026console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O\u003cF;O++)k(R[O])},C}}}}),V$n=nm({\"node_modules/xml-reader/dist/reader.js\"(t,e){var n=Y$n(),o=K$n(),i=o.Type,r={element:\"element\",text:\"text\"},s=function(A){return Object.assign({name:\"\",type:r.element,value:\"\",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:\"done\",tagPrefix:\"tag:\",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream\u0026\u0026_===l\u0026\u0026(l.children=[],u.parent=null),A.emitTopLevelOnly\u0026\u0026_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit(\"tag\",u.name,u)),u===l\u0026\u0026(c.removeAllListeners(\"data\"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u\u0026\u0026u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]=\"\";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on(\"data\",d),l=s(),u=null,g=\"\",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:\":\"});var l=a(c),u=void 0;return l.on(\"done\",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}}),bse=nm({\"node_modules/binary-search-bounds/search-bounds.js\"(t,e){function n(A,c,l,u,g){for(var h=g+1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003e=0?(h=d,g=d-1):u=d+1}return h}function o(A,c,l,u,g){for(var h=g+1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003e0?(h=d,g=d-1):u=d+1}return h}function i(A,c,l,u,g){for(var h=u-1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003c0?(h=d,u=d+1):g=d-1}return h}function r(A,c,l,u,g){for(var h=u-1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003c=0?(h=d,u=d+1):g=d-1}return h}function s(A,c,l,u,g){for(;u\u003c=g;){var h=u+g\u003e\u003e\u003e1,d=A[h],p=l!==void 0?l(d,c):d-c;if(p===0)return h;p\u003c=0?u=h+1:g=h-1}return-1}function a(A,c,l,u,g,h){return typeof l==\"function\"?h(A,c,l,u===void 0?0:0|u,g===void 0?A.length-1:0|g):h(A,c,void 0,l===void 0?0:0|l,u===void 0?A.length-1:0|u)}e.exports={ge:function(A,c,l,u,g){return a(A,c,l,u,g,n)},gt:function(A,c,l,u,g){return a(A,c,l,u,g,o)},lt:function(A,c,l,u,g){return a(A,c,l,u,g,i)},le:function(A,c,l,u,g){return a(A,c,l,u,g,r)},eq:function(A,c,l,u,g){return a(A,c,l,u,g,s)}}}}),Z9e=nm({\"node_modules/two-product/two-product.js\"(t,e){e.exports=function(o,i,r){var s=o*i,a=n*o,A=a-(a-o),c=o-A,l=n*i,u=l-(l-i),g=i-u,h=c*g-(s-A*u-c*u-A*g);return r?(r[0]=h,r[1]=s,r):[h,s]};var n=+(Math.pow(2,27)+1)}}),t_t=nm({\"node_modules/robust-sum/robust-sum.js\"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1\u0026\u0026r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=o[u],m=g(p);d\u003cm?(a=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(a=p,(u+=1)\u003cr\u0026\u0026(m=g(p=o[u]))),l\u003ci\u0026\u0026d\u003cm||u\u003e=r?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l\u003ci\u0026\u0026u\u003cr;)d\u003cm?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=o[u]))),(y=(a=x)-(C=(I=s+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l\u003ci;)(y=(a=x)-(C=(I=(s=h)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)\u003ci\u0026\u0026(h=n[l]);for(;u\u003cr;)(y=(a=x)-(C=(I=(s=p)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)\u003cr\u0026\u0026(p=o[u]);return x\u0026\u0026(A[c++]=x),E\u0026\u0026(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),z$n=nm({\"node_modules/two-sum/two-sum.js\"(t,e){e.exports=function(n,o,i){var r=n+o,s=r-n,a=o-s,A=n-(r-s);return i?(i[0]=A+a,i[1]=r,i):[A+a,r]}}}),n_t=nm({\"node_modules/robust-scale/robust-scale.js\"(t,e){var n=Z9e(),o=z$n();e.exports=function(i,r){var s=i.length;if(s===1){var a=n(i[0],r);return a[0]?a:[a[1]]}var A=new Array(2*s),c=[.1,.1],l=[.1,.1],u=0;n(i[0],r,c),c[0]\u0026\u0026(A[u++]=c[0]);for(var g=1;g\u003cs;++g){n(i[g],r,l);var h=c[1];o(h,l[0],c),c[0]\u0026\u0026(A[u++]=c[0]);var d=l[1],p=c[1],m=d+p,_=p-(m-d);c[1]=m,_\u0026\u0026(A[u++]=_)}return c[1]\u0026\u0026(A[u++]=c[1]),u===0\u0026\u0026(A[u++]=0),A.length=u,A}}}),o_t=nm({\"node_modules/robust-subtract/robust-diff.js\"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1\u0026\u0026r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],-o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=-o[u],m=g(p);d\u003cm?(a=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(a=p,(u+=1)\u003cr\u0026\u0026(m=g(p=-o[u]))),l\u003ci\u0026\u0026d\u003cm||u\u003e=r?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=-o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l\u003ci\u0026\u0026u\u003cr;)d\u003cm?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=-o[u]))),(y=(a=x)-(C=(I=s+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l\u003ci;)(y=(a=x)-(C=(I=(s=h)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)\u003ci\u0026\u0026(h=n[l]);for(;u\u003cr;)(y=(a=x)-(C=(I=(s=p)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)\u003cr\u0026\u0026(p=-o[u]);return x\u0026\u0026(A[c++]=x),E\u0026\u0026(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),J$n=nm({\"node_modules/robust-orientation/orientation.js\"(t,e){var n=Z9e(),o=t_t(),i=n_t(),r=o_t();function s(p,m,_,f){return function(I,C,y){var x=p(p(m(C[1],y[0]),m(-y[1],C[0])),p(m(I[1],C[0]),m(-C[1],I[0]))),E=p(m(I[1],y[0]),m(-y[1],I[0])),B=f(x,E);return B[B.length-1]}}function a(p,m,_,f){return function(I,C,y,x){var E=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2])))),B=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2])))),S=f(E,B);return S[S.length-1]}}function A(p,m,_,f){return function(I,C,y,x,E){var B=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),C[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),-y[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),x[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),-E[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-C[3])))),p(p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),x[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),-E[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),I[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-C[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-x[3]))))),S=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-y[3])),p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),x[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-E[3]))),p(p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),I[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),-C[3])),p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-E[3])))),Q=f(B,S);return Q[Q.length-1]}}function c(p){return(p===3?s:p===4?a:A)(o,n,i,r)}var l=c(3),u=c(4),g=[function(){return 0},function(){return 0},function(p,m){return m[0]-p[0]},function(p,m,_){var f,I=(p[1]-_[1])*(m[0]-_[0]),C=(p[0]-_[0])*(m[1]-_[1]),y=I-C;if(I\u003e0){if(C\u003c=0)return y;f=I+C}else{if(!(I\u003c0)||C\u003e=0)return y;f=-(I+C)}var x=33306690738754716e-32*f;return y\u003e=x||y\u003c=-x?y:l(p,m,_)},function(p,m,_,f){var I=p[0]-f[0],C=m[0]-f[0],y=_[0]-f[0],x=p[1]-f[1],E=m[1]-f[1],B=_[1]-f[1],S=p[2]-f[2],Q=m[2]-f[2],w=_[2]-f[2],M=C*B,k=y*E,R=y*x,F=I*B,O=I*E,U=C*x,Y=S*(M-k)+Q*(R-F)+w*(O-U),W=7771561172376103e-31*((Math.abs(M)+Math.abs(k))*Math.abs(S)+(Math.abs(R)+Math.abs(F))*Math.abs(Q)+(Math.abs(O)+Math.abs(U))*Math.abs(w));return Y\u003eW||-Y\u003eW?Y:u(p,m,_,f)}];function h(p){var m=g[p.length];return m||(m=g[p.length]=c(p.length)),m.apply(void 0,p)}function d(p,m,_,f,I,C,y){return function(x,E,B,S,Q){switch(arguments.length){case 0:case 1:return 0;case 2:return f(x,E);case 3:return I(x,E,B);case 4:return C(x,E,B,S);case 5:return y(x,E,B,S,Q)}for(var w=new Array(arguments.length),M=0;M\u003carguments.length;++M)w[M]=arguments[M];return p(w)}}(function(){for(;g.length\u003c=5;)g.push(c(g.length));e.exports=d.apply(void 0,[h].concat(g));for(var p=0;p\u003c=5;++p)e.exports[p]=g[p]})()}}),W$n=nm({\"node_modules/cdt2d/lib/monotone.js\"(t,e){var n=bse(),o=J$n()[3];function i(g,h,d,p,m){this.a=g,this.b=h,this.idx=d,this.lowerIds=p,this.upperIds=m}function r(g,h,d,p){this.a=g,this.b=h,this.type=d,this.idx=p}function s(g,h){var d=g.a[0]-h.a[0]||g.a[1]-h.a[1]||g.type-h.type;return d||(g.type!==0\u0026\u0026(d=o(g.a,g.b,h.b))?d:g.idx-h.idx)}function a(g,h){return o(g.a,g.b,h)}function A(g,h,d,p,m){for(var _=n.lt(h,p,a),f=n.gt(h,p,a),I=_;I\u003cf;++I){for(var C=h[I],y=C.lowerIds,x=y.length;x\u003e1\u0026\u0026o(d[y[x-2]],d[y[x-1]],p)\u003e0;)g.push([y[x-1],y[x-2],m]),x-=1;y.length=x,y.push(m);var E=C.upperIds;for(x=E.length;x\u003e1\u0026\u0026o(d[E[x-2]],d[E[x-1]],p)\u003c0;)g.push([E[x-2],E[x-1],m]),x-=1;E.length=x,E.push(m)}}function c(g,h){var d;return(d=g.a[0]\u003ch.a[0]?o(g.a,g.b,h.a):o(h.b,h.a,g.a))?d:(d=h.b[0]\u003cg.b[0]?o(g.a,g.b,h.b):o(h.b,h.a,g.b))||g.idx-h.idx}function l(g,h,d){var p=n.le(g,d,c),m=g[p],_=m.upperIds,f=_[_.length-1];m.upperIds=[f],g.splice(p+1,0,new i(d.a,d.b,d.idx,[f],_))}function u(g,h,d){var p=d.a;d.a=d.b,d.b=p;var m=n.eq(g,d,c),_=g[m];g[m-1].upperIds=_.upperIds,g.splice(m,1)}e.exports=function(g,h){for(var d=g.length,p=h.length,m=[],_=0;_\u003cd;++_)m.push(new r(g[_],null,0,_));for(_=0;_\u003cp;++_){var f=h[_],I=g[f[0]],C=g[f[1]];I[0]\u003cC[0]?m.push(new r(I,C,2,_),new r(C,I,1,_)):I[0]\u003eC[0]\u0026\u0026m.push(new r(C,I,2,_),new r(I,C,1,_))}m.sort(s);for(var y=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),x=[new i([y,1],[y,0],-1,[],[])],E=[],B=(_=0,m.length);_\u003cB;++_){var S=m[_],Q=S.type;Q===0?A(E,x,g,S.a,S.idx):Q===2?l(x,g,S):u(x,g,S)}return E}}}),j$n=nm({\"node_modules/cdt2d/lib/triangulation.js\"(t,e){var n=bse();function o(s,a){this.stars=s,this.edges=a}e.exports=function(s,a){for(var A=new Array(s),c=0;c\u003cs;++c)A[c]=[];return new o(A,a)};var i=o.prototype;function r(s,a,A){for(var c=1,l=s.length;c\u003cl;c+=2)if(s[c-1]===a\u0026\u0026s[c]===A)return s[c-1]=s[l-2],s[c]=s[l-1],void(s.length=l-2)}i.isConstraint=(function(){var s=[0,0];function a(A,c){return A[0]-c[0]||A[1]-c[1]}return function(A,c){return s[0]=Math.min(A,c),s[1]=Math.max(A,c),n.eq(this.edges,s,a)\u003e=0}})(),i.removeTriangle=function(s,a,A){var c=this.stars;r(c[s],a,A),r(c[a],A,s),r(c[A],s,a)},i.addTriangle=function(s,a,A){var c=this.stars;c[s].push(a,A),c[a].push(A,s),c[A].push(s,a)},i.opposite=function(s,a){for(var A=this.stars[a],c=1,l=A.length;c\u003cl;c+=2)if(A[c]===s)return A[c-1];return-1},i.flip=function(s,a){var A=this.opposite(s,a),c=this.opposite(a,s);this.removeTriangle(s,a,A),this.removeTriangle(a,s,c),this.addTriangle(s,c,A),this.addTriangle(a,A,c)},i.edges=function(){for(var s=this.stars,a=[],A=0,c=s.length;A\u003cc;++A)for(var l=s[A],u=0,g=l.length;u\u003cg;u+=2)a.push([l[u],l[u+1]]);return a},i.cells=function(){for(var s=this.stars,a=[],A=0,c=s.length;A\u003cc;++A)for(var l=s[A],u=0,g=l.length;u\u003cg;u+=2){var h=l[u],d=l[u+1];A\u003cMath.min(h,d)\u0026\u0026a.push([A,h,d])}return a}}}),$n=nm({\"node_modules/robust-in-sphere/in-sphere.js\"(t,e){var n=Z9e(),o=t_t(),i=o_t(),r=n_t();function s(d){return(d===3?a:d===4?A:d===5?c:l)(o,i,n,r)}function a(d,p,m,_){return function(f,I,C){var y=m(f[0],f[0]),x=_(y,I[0]),E=_(y,C[0]),B=m(I[0],I[0]),S=_(B,f[0]),Q=_(B,C[0]),w=m(C[0],C[0]),M=_(w,f[0]),k=_(w,I[0]),R=d(p(k,Q),p(S,x)),F=p(M,E),O=p(R,F);return O[O.length-1]}}function A(d,p,m,_){return function(f,I,C,y){var x=d(m(f[0],f[0]),m(f[1],f[1])),E=_(x,I[0]),B=_(x,C[0]),S=_(x,y[0]),Q=d(m(I[0],I[0]),m(I[1],I[1])),w=_(Q,f[0]),M=_(Q,C[0]),k=_(Q,y[0]),R=d(m(C[0],C[0]),m(C[1],C[1])),F=_(R,f[0]),O=_(R,I[0]),U=_(R,y[0]),Y=d(m(y[0],y[0]),m(y[1],y[1])),W=_(Y,f[0]),te=_(Y,I[0]),j=_(Y,C[0]),J=d(d(_(p(j,U),I[1]),d(_(p(te,k),-C[1]),_(p(O,M),y[1]))),d(_(p(te,k),f[1]),d(_(p(W,S),-I[1]),_(p(w,E),y[1])))),oe=d(d(_(p(j,U),f[1]),d(_(p(W,S),-C[1]),_(p(F,B),y[1]))),d(_(p(O,M),f[1]),d(_(p(F,B),-I[1]),_(p(w,E),C[1])))),ie=p(J,oe);return ie[ie.length-1]}}function c(d,p,m,_){return function(f,I,C,y,x){var E=d(m(f[0],f[0]),d(m(f[1],f[1]),m(f[2],f[2]))),B=_(E,I[0]),S=_(E,C[0]),Q=_(E,y[0]),w=_(E,x[0]),M=d(m(I[0],I[0]),d(m(I[1],I[1]),m(I[2],I[2]))),k=_(M,f[0]),R=_(M,C[0]),F=_(M,y[0]),O=_(M,x[0]),U=d(m(C[0],C[0]),d(m(C[1],C[1]),m(C[2],C[2]))),Y=_(U,f[0]),W=_(U,I[0]),te=_(U,y[0]),j=_(U,x[0]),J=d(m(y[0],y[0]),d(m(y[1],y[1]),m(y[2],y[2]))),oe=_(J,f[0]),ie=_(J,I[0]),ne=_(J,C[0]),le=_(J,x[0]),ge=d(m(x[0],x[0]),d(m(x[1],x[1]),m(x[2],x[2]))),_e=_(ge,f[0]),ue=_(ge,I[0]),fe=_(ge,C[0]),pe=_(ge,y[0]),ye=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),I[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),-C[2]),_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),y[2]))),d(_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),-x[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-I[2])))),d(d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),y[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),-x[2]),_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),f[2]))),d(_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-I[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-y[2]))))),Me=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-C[2])),d(_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),y[2]),_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-x[2]))),d(d(_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),f[2]),_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),-I[2])),d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-x[2])))),ve=p(ye,Me);return ve[ve.length-1]}}function l(d,p,m,_){return function(f,I,C,y,x,E){var B=d(d(m(f[0],f[0]),m(f[1],f[1])),d(m(f[2],f[2]),m(f[3],f[3]))),S=_(B,I[0]),Q=_(B,C[0]),w=_(B,y[0]),M=_(B,x[0]),k=_(B,E[0]),R=d(d(m(I[0],I[0]),m(I[1],I[1])),d(m(I[2],I[2]),m(I[3],I[3]))),F=_(R,f[0]),O=_(R,C[0]),U=_(R,y[0]),Y=_(R,x[0]),W=_(R,E[0]),te=d(d(m(C[0],C[0]),m(C[1],C[1])),d(m(C[2],C[2]),m(C[3],C[3]))),j=_(te,f[0]),J=_(te,I[0]),oe=_(te,y[0]),ie=_(te,x[0]),ne=_(te,E[0]),le=d(d(m(y[0],y[0]),m(y[1],y[1])),d(m(y[2],y[2]),m(y[3],y[3]))),ge=_(le,f[0]),_e=_(le,I[0]),ue=_(le,C[0]),fe=_(le,x[0]),pe=_(le,E[0]),ye=d(d(m(x[0],x[0]),m(x[1],x[1])),d(m(x[2],x[2]),m(x[3],x[3]))),Me=_(ye,f[0]),ve=_(ye,I[0]),he=_(ye,C[0]),Qe=_(ye,y[0]),Pe=_(ye,E[0]),we=d(d(m(E[0],E[0]),m(E[1],E[1])),d(m(E[2],E[2]),m(E[3],E[3]))),Te=_(we,f[0]),Re=_(we,I[0]),Ee=_(we,C[0]),ke=_(we,y[0]),Ce=_(we,x[0]),Le=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),I[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),y[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),f[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-I[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),C[3])),d(_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),E[3]))))),Ye=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),f[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),C[3]),_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),f[3]))),d(d(_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),-I[3]),_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),C[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),x[3]))))),tt=p(Le,Ye);return tt[tt.length-1]}}var u=[function(){return 0},function(){return 0},function(){return 0}];function g(d){var p=u[d.length];return p||(p=u[d.length]=s(d.length)),p.apply(void 0,d)}function h(d,p,m,_,f,I,C,y){return function(x,E,B,S,Q,w){switch(arguments.length){case 0:case 1:return 0;case 2:return _(x,E);case 3:return f(x,E,B);case 4:return I(x,E,B,S);case 5:return C(x,E,B,S,Q);case 6:return y(x,E,B,S,Q,w)}for(var M=new Array(arguments.length),k=0;k\u003carguments.length;++k)M[k]=arguments[k];return d(M)}}(function(){for(;u.length\u003c=6;)u.push(s(u.length));e.exports=h.apply(void 0,[g].concat(u));for(var d=0;d\u003c=6;++d)e.exports[d]=u[d]})()}}),q$n=nm({\"node_modules/cdt2d/lib/delaunay.js\"(t,e){var n=$n()[4];bse();function o(i,r,s,a,A,c){var l=r.opposite(a,A);if(!(l\u003c0)){if(A\u003ca){var u=a;a=A,A=u,u=c,c=l,l=u}r.isConstraint(a,A)||n(i[a],i[A],i[c],i[l])\u003c0\u0026\u0026s.push(a,A)}}e.exports=function(i,r){for(var s=[],a=i.length,A=r.stars,c=0;c\u003ca;++c)for(var l=A[c],u=1;u\u003cl.length;u+=2)if(!((p=l[u])\u003cc)\u0026\u0026!r.isConstraint(c,p)){for(var g=l[u-1],h=-1,d=1;d\u003cl.length;d+=2)if(l[d-1]===p){h=l[d];break}h\u003c0||n(i[c],i[p],i[g],i[h])\u003c0\u0026\u0026s.push(c,p)}for(;s.length\u003e0;){for(var p=s.pop(),m=(g=-1,h=-1,l=A[c=s.pop()],1);m\u003cl.length;m+=2){var _=l[m-1],f=l[m];_===p?h=f:f===p\u0026\u0026(g=_)}g\u003c0||h\u003c0||n(i[c],i[p],i[g],i[h])\u003e=0||(r.flip(c,p),o(i,r,s,g,c,h),o(i,r,s,c,h,g),o(i,r,s,h,p,g),o(i,r,s,p,g,h))}}}}),X$n=nm({\"node_modules/cdt2d/lib/filter.js\"(t,e){var n=bse();function o(r,s,a,A,c,l,u){this.cells=r,this.neighbor=s,this.flags=A,this.constraint=a,this.active=c,this.next=l,this.boundary=u}function i(r,s){return r[0]-s[0]||r[1]-s[1]||r[2]-s[2]}e.exports=function(r,s,a){var A=(function(y,x){for(var E=y.cells(),B=E.length,S=0;S\u003cB;++S){var Q=(te=E[S])[0],w=te[1],M=te[2];w\u003cM?w\u003cQ\u0026\u0026(te[0]=w,te[1]=M,te[2]=Q):M\u003cQ\u0026\u0026(te[0]=M,te[1]=Q,te[2]=w)}E.sort(i);var k=new Array(B);for(S=0;S\u003ck.length;++S)k[S]=0;var R=[],F=[],O=new Array(3*B),U=new Array(3*B),Y=null;x\u0026\u0026(Y=[]);var W=new o(E,O,U,k,R,F,Y);for(S=0;S\u003cB;++S)for(var te=E[S],j=0;j\u003c3;++j){Q=te[j],w=te[(j+1)%3];var J=O[3*S+j]=W.locate(w,Q,y.opposite(w,Q)),oe=U[3*S+j]=y.isConstraint(Q,w);J\u003c0\u0026\u0026(oe?F.push(S):(R.push(S),k[S]=1),x\u0026\u0026Y.push([w,Q,-1]))}return W})(r,a);if(s===0)return a?A.cells.concat(A.boundary):A.cells;for(var c=1,l=A.active,u=A.next,g=A.flags,h=A.cells,d=A.constraint,p=A.neighbor;l.length\u003e0||u.length\u003e0;){for(;l.length\u003e0;){var m=l.pop();if(g[m]!==-c){g[m]=c,h[m];for(var _=0;_\u003c3;++_){var f=p[3*m+_];f\u003e=0\u0026\u0026g[f]===0\u0026\u0026(d[3*m+_]?u.push(f):(l.push(f),g[f]=c))}}}var I=u;u=l,l=I,u.length=0,c=-c}var C=(function(y,x,E){for(var B=0,S=0;S\u003cy.length;++S)x[S]===E\u0026\u0026(y[B++]=y[S]);return y.length=B,y})(h,g,s);return a?C.concat(A.boundary):C},o.prototype.locate=(function(){var r=[0,0,0];return function(s,a,A){var c=s,l=a,u=A;return a\u003cA?a\u003cs\u0026\u0026(c=a,l=A,u=s):A\u003cs\u0026\u0026(c=A,l=s,u=a),c\u003c0?-1:(r[0]=c,r[1]=l,r[2]=u,n.eq(this.cells,r,i))}})()}}),Z$n=nm({\"node_modules/cdt2d/cdt2d.js\"(t,e){var n=W$n(),o=j$n(),i=q$n(),r=X$n();function s(c){return[Math.min(c[0],c[1]),Math.max(c[0],c[1])]}function a(c,l){return c[0]-l[0]||c[1]-l[1]}function A(c,l,u){return l in c?c[l]:u}e.exports=function(c,l,u){Array.isArray(l)?(u=u||{},l=l||[]):(u=l||{},l=[]);var g=!!A(u,\"delaunay\",!0),h=!!A(u,\"interior\",!0),d=!!A(u,\"exterior\",!0),p=!!A(u,\"infinity\",!1);if(!h\u0026\u0026!d||c.length===0)return[];var m=n(c,l);if(g||h!==d||p){for(var _=o(c.length,(function(C){return C.map(s).sort(a)})(l)),f=0;f\u003cm.length;++f){var I=m[f];_.addTriangle(I[0],I[1],I[2])}return g\u0026\u0026i(c,_),d?h?p?r(_,0,p):_.cells():r(_,1,p):r(_,-1)}return m}}});function i_t(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function r_t(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}X9e(G$n()),X9e(V$n()),new TextEncoder,(()=\u003e{const t=new Uint8Array(4);new Uint32Array(t.buffer)[0]=1,t[0]})();var eqn=new Uint16Array([255]),tqn=(new Uint8Array(eqn.buffer)[0],new Uint16Array([255]));new Uint8Array(tqn.buffer)[0],new TextDecoder(\"latin1\");function px(){return px=Object.assign?Object.assign.bind():function(t){for(var e=1;e\u003carguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)\u0026\u0026(t[o]=n[o])}return t},px.apply(null,arguments)}function Sse(t,e){return(Sse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n})(t,e)}function s_t(t){return(s_t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function a_t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a_t=function(){return!!t})()}function e7e(t){var e=typeof Map==\"function\"?new Map:void 0;return e7e=function(n){if(n===null||!(function(i){try{return Function.toString.call(i).indexOf(\"[native code]\")!==-1}catch{return typeof i==\"function\"}})(n))return n;if(typeof n!=\"function\")throw new TypeError(\"Super expression must either be null or a function\");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,o)}function o(){return(function(i,r,s){if(a_t())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var A=new(i.bind.apply(i,a));return s\u0026\u0026Sse(A,s.prototype),A})(n,arguments,s_t(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Sse(o,n)},e7e(t)}var nqn={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n`,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n`,3:`Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n`,4:`Couldn't generate valid rgb string from %s, it returned %s.\n\n`,5:`Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n`,6:`Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n`,7:`Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n`,8:`Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n`,9:`Please provide a number of steps to the modularScale helper.\n\n`,10:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n`,11:`Invalid value passed as base to modularScale, expected number or em string but got \"%s\"\n\n`,12:`Expected a string ending in \"px\" or a number passed as the first argument to %s(), got \"%s\" instead.\n\n`,13:`Expected a string ending in \"px\" or a number passed as the second argument to %s(), got \"%s\" instead.\n\n`,14:`Passed invalid pixel value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n`,15:`Passed invalid base value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n`,16:`You must provide a template to this method.\n\n`,17:`You passed an unsupported selector state to this method.\n\n`,18:`minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n`,19:`fromSize and toSize must be provided as stringified numbers with the same units.\n\n`,20:`expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n`,21:\"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",22:\"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",23:`fontFace expects a name of a font-family.\n\n`,24:`fontFace expects either the path to the font file(s) or a name of a local copy.\n\n`,25:`fontFace expects localFonts to be an array.\n\n`,26:`fontFace expects fileFormats to be an array.\n\n`,27:`radialGradient requries at least 2 color-stops to properly render.\n\n`,28:`Please supply a filename to retinaImage() as the first argument.\n\n`,29:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n`,30:\"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",31:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n`,32:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n`,33:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n`,34:`borderRadius expects a radius value as a string or number as the second argument.\n\n`,35:`borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n`,36:`Property must be a string value.\n\n`,37:`Syntax Error at %s.\n\n`,38:`Formula contains a function that needs parentheses at %s.\n\n`,39:`Formula is missing closing parenthesis at %s.\n\n`,40:`Formula has too many closing parentheses at %s.\n\n`,41:`All values in a formula must have the same unit or be unitless.\n\n`,42:`Please provide a number of steps to the modularScale helper.\n\n`,43:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n`,44:`Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n`,45:`Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n`,46:`Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n`,47:`minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n`,48:`fromSize and toSize must be provided as stringified numbers with the same units.\n\n`,49:`Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n`,50:`Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n`,51:`Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n`,52:`fontFace expects either the path to the font file(s) or a name of a local copy.\n\n`,53:`fontFace expects localFonts to be an array.\n\n`,54:`fontFace expects fileFormats to be an array.\n\n`,55:`fontFace expects a name of a font-family.\n\n`,56:`linearGradient requries at least 2 color-stops to properly render.\n\n`,57:`radialGradient requries at least 2 color-stops to properly render.\n\n`,58:`Please supply a filename to retinaImage() as the first argument.\n\n`,59:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n`,60:\"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",61:`Property must be a string value.\n\n`,62:`borderRadius expects a radius value as a string or number as the second argument.\n\n`,63:`borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n`,64:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n`,65:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n`,66:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n`,67:`You must provide a template to this method.\n\n`,68:`You passed an unsupported selector state to this method.\n\n`,69:`Expected a string ending in \"px\" or a number passed as the first argument to %s(), got %s instead.\n\n`,70:`Expected a string ending in \"px\" or a number passed as the second argument to %s(), got %s instead.\n\n`,71:`Passed invalid pixel value %s to %s(), please pass a value like \"12px\" or 12.\n\n`,72:`Passed invalid base value %s to %s(), please pass a value like \"12px\" or 12.\n\n`,73:`Please provide a valid CSS variable.\n\n`,74:`CSS variable not found and no default was provided.\n\n`,75:`important requires a valid style object, got a %s instead.\n\n`,76:`fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n`,77:`remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n`,78:`base must be set in \"px\" or \"%\" but you set it in \"%s\".\n`};function oqn(){for(var t=arguments.length,e=new Array(t),n=0;n\u003ct;n++)e[n]=arguments[n];var o,i=e[0],r=[];for(o=1;o\u003ce.length;o+=1)r.push(e[o]);return r.forEach(function(s){i=i.replace(/%[a-z]/,s)}),i}var t7=(function(t){var e,n;function o(i){var r;if(N$n.env.NODE_ENV===\"production\")r=t.call(this,\"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\"+i+\" for more information.\")||this;else{for(var s=arguments.length,a=new Array(s\u003e1?s-1:0),A=1;A\u003cs;A++)a[A-1]=arguments[A];r=t.call(this,oqn.apply(void 0,[nqn[i]].concat(a)))||this}return(function(c){if(c===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return c})(r)}return n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,Sse(e,n),o})(e7e(Error));function t7e(t){return Math.round(255*t)}function iqn(t,e,n){return t7e(t)+\",\"+t7e(e)+\",\"+t7e(n)}function Qse(t,e,n,o){if(o===void 0\u0026\u0026(o=iqn),e===0)return o(n,n,n);var i=(t%360+360)%360/60,r=(1-Math.abs(2*n-1))*e,s=r*(1-Math.abs(i%2-1)),a=0,A=0,c=0;i\u003e=0\u0026\u0026i\u003c1?(a=r,A=s):i\u003e=1\u0026\u0026i\u003c2?(a=s,A=r):i\u003e=2\u0026\u0026i\u003c3?(A=r,c=s):i\u003e=3\u0026\u0026i\u003c4?(A=s,c=r):i\u003e=4\u0026\u0026i\u003c5?(a=s,c=r):i\u003e=5\u0026\u0026i\u003c6\u0026\u0026(a=r,c=s);var l=n-r/2;return o(a+l,A+l,c+l)}var A_t={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"00ffff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"0000ff\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"00ffff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkgrey:\"a9a9a9\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"ff00ff\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",grey:\"808080\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgreen:\"90ee90\",lightgrey:\"d3d3d3\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"639\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"},rqn=/^#[a-fA-F0-9]{6}$/,sqn=/^#[a-fA-F0-9]{8}$/,aqn=/^#[a-fA-F0-9]{3}$/,Aqn=/^#[a-fA-F0-9]{4}$/,n7e=/^rgb\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*\\)$/i,cqn=/^rgb(?:a)?\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i,lqn=/^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i,uqn=/^hsl(?:a)?\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;function wD(t){if(typeof t!=\"string\")throw new t7(3);var e=(function(g){if(typeof g!=\"string\")return g;var h=g.toLowerCase();return A_t[h]?\"#\"+A_t[h]:g})(t);if(e.match(rqn))return{red:parseInt(\"\"+e[1]+e[2],16),green:parseInt(\"\"+e[3]+e[4],16),blue:parseInt(\"\"+e[5]+e[6],16)};if(e.match(sqn)){var n=parseFloat((parseInt(\"\"+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(\"\"+e[1]+e[2],16),green:parseInt(\"\"+e[3]+e[4],16),blue:parseInt(\"\"+e[5]+e[6],16),alpha:n}}if(e.match(aqn))return{red:parseInt(\"\"+e[1]+e[1],16),green:parseInt(\"\"+e[2]+e[2],16),blue:parseInt(\"\"+e[3]+e[3],16)};if(e.match(Aqn)){var o=parseFloat((parseInt(\"\"+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(\"\"+e[1]+e[1],16),green:parseInt(\"\"+e[2]+e[2],16),blue:parseInt(\"\"+e[3]+e[3],16),alpha:o}}var i=n7e.exec(e);if(i)return{red:parseInt(\"\"+i[1],10),green:parseInt(\"\"+i[2],10),blue:parseInt(\"\"+i[3],10)};var r=cqn.exec(e.substring(0,50));if(r)return{red:parseInt(\"\"+r[1],10),green:parseInt(\"\"+r[2],10),blue:parseInt(\"\"+r[3],10),alpha:parseFloat(\"\"+r[4])\u003e1?parseFloat(\"\"+r[4])/100:parseFloat(\"\"+r[4])};var s=lqn.exec(e);if(s){var a=\"rgb(\"+Qse(parseInt(\"\"+s[1],10),parseInt(\"\"+s[2],10)/100,parseInt(\"\"+s[3],10)/100)+\")\",A=n7e.exec(a);if(!A)throw new t7(4,e,a);return{red:parseInt(\"\"+A[1],10),green:parseInt(\"\"+A[2],10),blue:parseInt(\"\"+A[3],10)}}var c=uqn.exec(e.substring(0,50));if(c){var l=\"rgb(\"+Qse(parseInt(\"\"+c[1],10),parseInt(\"\"+c[2],10)/100,parseInt(\"\"+c[3],10)/100)+\")\",u=n7e.exec(l);if(!u)throw new t7(4,e,l);return{red:parseInt(\"\"+u[1],10),green:parseInt(\"\"+u[2],10),blue:parseInt(\"\"+u[3],10),alpha:parseFloat(\"\"+c[4])\u003e1?parseFloat(\"\"+c[4])/100:parseFloat(\"\"+c[4])}}throw new t7(5)}function UQ(t){return(function(e){var n,o=e.red/255,i=e.green/255,r=e.blue/255,s=Math.max(o,i,r),a=Math.min(o,i,r),A=(s+a)/2;if(s===a)return e.alpha!==void 0?{hue:0,saturation:0,lightness:A,alpha:e.alpha}:{hue:0,saturation:0,lightness:A};var c=s-a,l=A\u003e.5?c/(2-s-a):c/(s+a);switch(s){case o:n=(i-r)/c+(i\u003cr?6:0);break;case i:n=(r-o)/c+2;break;default:n=(o-i)/c+4}return n*=60,e.alpha!==void 0?{hue:n,saturation:l,lightness:A,alpha:e.alpha}:{hue:n,saturation:l,lightness:A}})(wD(t))}var o7e=function(t){return t.length===7\u0026\u0026t[1]===t[2]\u0026\u0026t[3]===t[4]\u0026\u0026t[5]===t[6]?\"#\"+t[1]+t[3]+t[5]:t};function PD(t){var e=t.toString(16);return e.length===1?\"0\"+e:e}function i7e(t){return PD(Math.round(255*t))}function gqn(t,e,n){return o7e(\"#\"+i7e(t)+i7e(e)+i7e(n))}function c_t(t,e,n){return Qse(t,e,n,gqn)}function r7e(t,e,n){if(typeof t==\"number\"\u0026\u0026typeof e==\"number\"\u0026\u0026typeof n==\"number\")return o7e(\"#\"+PD(t)+PD(e)+PD(n));if(typeof t==\"object\"\u0026\u0026e===void 0\u0026\u0026n===void 0)return o7e(\"#\"+PD(t.red)+PD(t.green)+PD(t.blue));throw new t7(6)}function vse(t,e,n,o){if(typeof t==\"string\"\u0026\u0026typeof e==\"number\"){var i=wD(t);return\"rgba(\"+i.red+\",\"+i.green+\",\"+i.blue+\",\"+e+\")\"}if(typeof t==\"number\"\u0026\u0026typeof e==\"number\"\u0026\u0026typeof n==\"number\"\u0026\u0026typeof o==\"number\")return o\u003e=1?r7e(t,e,n):\"rgba(\"+t+\",\"+e+\",\"+n+\",\"+o+\")\";if(typeof t==\"object\"\u0026\u0026e===void 0\u0026\u0026n===void 0\u0026\u0026o===void 0)return t.alpha\u003e=1?r7e(t.red,t.green,t.blue):\"rgba(\"+t.red+\",\"+t.green+\",\"+t.blue+\",\"+t.alpha+\")\";throw new t7(7)}function KQ(t){if(typeof t!=\"object\")throw new t7(8);if((function(e){return typeof e.red==\"number\"\u0026\u0026typeof e.green==\"number\"\u0026\u0026typeof e.blue==\"number\"\u0026\u0026typeof e.alpha==\"number\"})(t))return vse(t);if((function(e){return typeof e.red==\"number\"\u0026\u0026typeof e.green==\"number\"\u0026\u0026typeof e.blue==\"number\"\u0026\u0026(typeof e.alpha!=\"number\"||e.alpha===void 0)})(t))return r7e(t);if((function(e){return typeof e.hue==\"number\"\u0026\u0026typeof e.saturation==\"number\"\u0026\u0026typeof e.lightness==\"number\"\u0026\u0026typeof e.alpha==\"number\"})(t))return(function(e,n,o,i){if(typeof e==\"object\"\u0026\u0026n===void 0\u0026\u0026o===void 0\u0026\u0026i===void 0)return e.alpha\u003e=1?c_t(e.hue,e.saturation,e.lightness):\"rgba(\"+Qse(e.hue,e.saturation,e.lightness)+\",\"+e.alpha+\")\";throw new t7(2)})(t);if((function(e){return typeof e.hue==\"number\"\u0026\u0026typeof e.saturation==\"number\"\u0026\u0026typeof e.lightness==\"number\"\u0026\u0026(typeof e.alpha!=\"number\"||e.alpha===void 0)})(t))return(function(e,n,o){if(typeof e==\"object\"\u0026\u0026n===void 0\u0026\u0026o===void 0)return c_t(e.hue,e.saturation,e.lightness);throw new t7(1)})(t);throw new t7(8)}function l_t(t,e,n){return function(){var o=n.concat(Array.prototype.slice.call(arguments));return o.length\u003e=e?t.apply(this,o):l_t(t,e,o)}}function K3(t){return l_t(t,t.length,[])}K3(function(t,e){if(e===\"transparent\")return e;var n=UQ(e);return KQ(px({},n,{hue:n.hue+parseFloat(t)}))});function VF(t,e,n){return Math.max(t,Math.min(e,n))}K3(function(t,e){if(e===\"transparent\")return e;var n=UQ(e);return KQ(px({},n,{lightness:VF(0,1,n.lightness-parseFloat(t))}))}),K3(function(t,e){if(e===\"transparent\")return e;var n=UQ(e);return KQ(px({},n,{saturation:VF(0,1,n.saturation-parseFloat(t))}))}),K3(function(t,e){if(e===\"transparent\")return e;var n=UQ(e);return KQ(px({},n,{lightness:VF(0,1,n.lightness+parseFloat(t))}))});var u_t=K3(function(t,e,n){if(e===\"transparent\")return n;if(n===\"transparent\")return e;if(t===0)return n;var o=wD(e),i=px({},o,{alpha:typeof o.alpha==\"number\"?o.alpha:1}),r=wD(n),s=px({},r,{alpha:typeof r.alpha==\"number\"?r.alpha:1}),a=i.alpha-s.alpha,A=2*parseFloat(t)-1,c=((A*a===-1?A:A+a)/(1+A*a)+1)/2,l=1-c;return vse({red:Math.floor(i.red*c+s.red*l),green:Math.floor(i.green*c+s.green*l),blue:Math.floor(i.blue*c+s.blue*l),alpha:i.alpha*parseFloat(t)+s.alpha*(1-parseFloat(t))})});K3(function(t,e){if(e===\"transparent\")return e;var n=wD(e);return vse(px({},n,{alpha:VF(0,1,(100*(typeof n.alpha==\"number\"?n.alpha:1)+100*parseFloat(t))/100)}))}),K3(function(t,e){if(e===\"transparent\")return e;var n=UQ(e);return KQ(px({},n,{saturation:VF(0,1,n.saturation+parseFloat(t))}))}),K3(function(t,e){return e===\"transparent\"?e:KQ(px({},UQ(e),{hue:parseFloat(t)}))}),K3(function(t,e){return e===\"transparent\"?e:KQ(px({},UQ(e),{lightness:parseFloat(t)}))}),K3(function(t,e){return e===\"transparent\"?e:KQ(px({},UQ(e),{saturation:parseFloat(t)}))}),K3(function(t,e){return e===\"transparent\"?e:u_t(parseFloat(t),\"rgb(0, 0, 0)\",e)}),K3(function(t,e){return e===\"transparent\"?e:u_t(parseFloat(t),\"rgb(255, 255, 255)\",e)});var Bz=K3(function(t,e){if(e===\"transparent\")return e;var n=wD(e);return vse(px({},n,{alpha:VF(0,1,+(100*(typeof n.alpha==\"number\"?n.alpha:1)-100*parseFloat(t)).toFixed(2)/100)}))}),g_t={0:\"M0.301025 0.257813 L0.206593 0.283385 L0.122042 0.361307 L0.075923 0.474441 L0.064942 0.642221 L0.091296 0.78289 L0.159376 0.899463 L0.257104 0.961214 L0.344948 0.961214 L0.442678 0.899463 L0.510757 0.78289 L0.537111 0.642221 L0.526131 0.474441 L0.480012 0.361307 L0.39546 0.283385 L0.301025 0.257813\",1:\"M0.220426 0.40845 L0.381626 0.270996 L0.381626 0.948966\",2:\"M0.110409 0.39212 L0.125621 0.342293 L0.170571 0.295823 L0.244237 0.26431 L0.291518 0.257813 L0.373319 0.263799 L0.434683 0.290705 L0.468239 0.331966 L0.480292 0.379913 L0.479492 0.411806 L0.465088 0.465192 L0.402571 0.568988 L0.245134 0.766438 L0.07959 0.948045 L0.522462 0.948045\",3:\"M0.081606 0.345073 L0.119154 0.315633 L0.178996 0.284091 L0.255265 0.257813 L0.349133 0.263062 L0.43127 0.289348 L0.48994 0.336662 L0.525141 0.394491 L0.513407 0.457577 L0.466472 0.504892 L0.384334 0.541692 L0.290464 0.56272 L0.20833 0.573235 L0.290464 0.583749 L0.384334 0.610035 L0.466472 0.652092 L0.519274 0.709922 L0.531007 0.773007 L0.50754 0.841351 L0.454738 0.899179 L0.3726 0.946494 L0.310412 0.961214 L0.209503 0.959111 L0.127367 0.946494 L0.071046 0.929671\",4:\"M0.418494 0.270996 L0.048828 0.724199 L0.553224 0.724199 M0.414181 0.578167 L0.414181 0.94897\",5:\"M0.074951 0.270996 L0.074951 0.614701 L0.267655 0.5695 L0.405247 0.586502 L0.460002 0.617189 L0.498028 0.660731 L0.527101 0.779401 L0.513352 0.841049 L0.477274 0.889568 L0.406378 0.93463 L0.324445 0.958337 L0.247399 0.962139 L0.182516 0.949767 L0.130068 0.925508 L0.074951 0.875607 M0.074951 0.270996 L0.527101 0.270996\",6:\"M0.428549 0.257813 L0.341433 0.285053 L0.26073 0.312099 L0.192188 0.360182 L0.138902 0.410969 L0.098219 0.500422 L0.070249 0.584267 L0.067264 0.670716 L0.065164 0.756863 L0.087163 0.820973 L0.108168 0.861042 L0.157916 0.913131 L0.210981 0.948192 L0.29279 0.961214 L0.384548 0.956206 L0.456409 0.924151 L0.507262 0.881077 L0.5349 0.821975 L0.537111 0.771889 L0.521634 0.718798 L0.498418 0.67372 L0.463042 0.636657 L0.414398 0.613617 L0.34696 0.598591 L0.28284 0.595587 L0.215403 0.605604 L0.145756 0.641665 L0.109274 0.678729 L0.064942 0.724006\",7:\"M0.071534 0.270996 L0.530519 0.270996 L0.495935 0.291702 L0.477752 0.305407 L0.435186 0.346112 L0.412067 0.374136 L0.388565 0.40796 L0.365315 0.448098 L0.342943 0.495062 L0.322081 0.549366 L0.303364 0.611524 L0.287416 0.68205 L0.270077 0.80465 L0.26253 0.94897\",8:\"M0.286761 0.257813 L0.210684 0.27162 L0.1414 0.305622 L0.092494 0.382125 L0.111513 0.450128 L0.16857 0.502193 L0.228345 0.539382 L0.377781 0.594635 L0.470161 0.645637 L0.52586 0.706203 L0.538087 0.792269 L0.506841 0.87621 L0.438915 0.927212 L0.339743 0.961214 L0.263666 0.959089 L0.174004 0.929337 L0.102003 0.881523 L0.063965 0.811395 L0.066682 0.741266 L0.102003 0.671139 L0.180797 0.608448 L0.259591 0.580822 L0.358762 0.548945 L0.456576 0.49688 L0.486463 0.446941 L0.487822 0.362999 L0.453859 0.302434 L0.384574 0.265245 L0.286761 0.257813\",9:\"M0.511026 0.437812 L0.491026 0.347812 L0.451026 0.297812 L0.391026 0.267812 L0.311026 0.257813 L0.231026 0.267812 L0.161026 0.297812 L0.111026 0.347812 L0.091026 0.417812 L0.111026 0.487812 L0.161026 0.537812 L0.231026 0.567812 L0.311026 0.577812 L0.391026 0.557812 L0.451026 0.517812 L0.491026 0.477812 L0.511026 0.437812 M0.510026 0.438812 L0.434026 0.636812 L0.381026 0.777812 L0.337026 0.879812 L0.301026 0.957812\",\"!\":\"M0.301026 0.270996 L0.301026 0.749566 M0.251466 0.94897 L0.350587 0.94897\",'\"':\"M0.16504 0.270996 L0.16504 0.523022 M0.437013 0.270996 L0.437013 0.523022\",\"#\":\"M0.20958 0.282227 L0.146515 0.949754 M0.461844 0.282227 L0.398779 0.949754 M0.032999 0.526969 L0.600587 0.452796 M0.001465 0.82366 L0.569055 0.749486\",$:\"M0.307121 0.240234 L0.307121 1.083502 M0.490031 0.415915 L0.404676 0.328075 L0.23396 0.310507 L0.136407 0.398347 L0.099828 0.521324 L0.124213 0.591596 L0.197379 0.644299 L0.429061 0.697003 L0.502224 0.749708 L0.526613 0.837547 L0.477836 0.960526 L0.355897 1.013228 L0.197379 0.99566 L0.112021 0.942957 L0.07544 0.837547\",\"'\":\"M0.301026 0.270996 L0.301026 0.523022\",\"(\":\"M0.413087 0.241211 L0.372337 0.28347 L0.331589 0.334184 L0.290838 0.393349 L0.25009 0.460965 L0.219528 0.528584 L0.199153 0.5962 L0.188966 0.655364 L0.199153 0.714529 L0.219528 0.782146 L0.25009 0.849764 L0.290838 0.91738 L0.331589 0.976544 L0.372337 1.027258 L0.413087 1.069491\",\")\":\"M0.188966 0.241211 L0.229716 0.28347 L0.270466 0.334184 L0.311213 0.393349 L0.351964 0.460965 L0.382526 0.528584 L0.4029 0.5962 L0.413087 0.655364 L0.4029 0.714529 L0.382526 0.782146 L0.351964 0.849764 L0.311213 0.91738 L0.270466 0.976544 L0.229716 1.027258 L0.188966 1.069491\",\"*\":\"M0.301026 0.458702 L0.301026 0.681942 M0.301026 0.458702 L0.520997 0.536834 M0.301026 0.458702 L0.439954 0.257813 M0.301026 0.458702 L0.162098 0.257813 M0.301026 0.458702 L0.081055 0.536834\",\"+\":\"M0.042969 0.66845 L0.559083 0.66845 M0.301023 0.428223 L0.301023 0.908661\",\",\":\"M0.38672 0.852051 L0.215333 1.030661 L0.301025 1.119971\",\"-\":\"M0.173829 0.686035 L0.428224 0.686035\",\".\":\"M0.362549 0.851074 L0.239503 0.851074\",\"/\":\"M0.062501 1.035249 L0.539551 0.270996\",\"\u003c\":\"M0.559083 0.441895 L0.042969 0.66939 L0.042969 0.66939 L0.559083 0.896902\",\"=\":\"M0.042969 0.545898 L0.559083 0.545898 M0.042969 0.80837 L0.559083 0.80837\",\"\u003e\":\"M0.042969 0.441895 L0.559083 0.66939 L0.559083 0.66939 L0.042969 0.896902\",A:\"M0.018067 0.94897 L0.290179 0.270996 L0.583986 0.94897 M0.155303 0.684521 L0.433548 0.684521\",B:\"M0.063965 0.94897 L0.063965 0.278953 L0.209356 0.270996 L0.342486 0.294394 L0.432179 0.37292 L0.418224 0.48773 L0.312686 0.549166 L0.084728 0.575531 L0.306377 0.589434 L0.468877 0.647456 L0.538087 0.736658 L0.5324 0.85202 L0.501247 0.902983 L0.42355 0.944398 L0.063965 0.94897\",C:\"M0.529054 0.419847 L0.498425 0.345196 L0.442238 0.292341 L0.33583 0.257813 L0.257199 0.268357 L0.187906 0.303748 L0.120243 0.385432 L0.072998 0.599844 L0.110073 0.815385 L0.165381 0.902183 L0.222883 0.942801 L0.334904 0.961214 L0.43253 0.937679 L0.504816 0.868999 L0.529054 0.772065\",D:\"M0.064454 0.94897 L0.071838 0.285078 L0.171217 0.270996 L0.247348 0.272633 L0.37101 0.306078 L0.462461 0.378304 L0.514748 0.475555 L0.535591 0.576392 L0.537599 0.652313 L0.528065 0.717381 L0.508562 0.772419 L0.445948 0.855695 L0.362356 0.90871 L0.225203 0.945862 L0.064454 0.94897\",E:\"M0.080078 0.270996 L0.080078 0.94897 M0.080078 0.270996 L0.521974 0.270996 M0.080078 0.609981 L0.389405 0.609981 M0.080078 0.94897 L0.521974 0.94897\",F:\"M0.086426 0.270996 L0.086426 0.94897 M0.091304 0.275607 L0.515626 0.275607 M0.091304 0.607677 L0.447344 0.607677\",G:\"M0.498034 0.284943 L0.374621 0.257813 L0.244219 0.268648 L0.160577 0.311997 L0.094556 0.398116 L0.056397 0.58404 L0.076752 0.785532 L0.120865 0.858197 L0.188947 0.916734 L0.271008 0.953591 L0.357069 0.961214 L0.43715 0.932047 L0.501262 0.858539 L0.545656 0.648611 L0.329595 0.648131\",H:\"M0.066895 0.270996 L0.066895 0.94897 M0.066895 0.595658 L0.530009 0.595658 M0.535157 0.270996 L0.535157 0.94897\",I:\"M0.301026 0.270996 L0.301026 0.94897\",J:\"M0.506839 0.270996 L0.507814 0.782193 L0.498468 0.846168 L0.480733 0.880789 L0.455864 0.90832 L0.426095 0.929408 L0.360746 0.954812 L0.302508 0.962139 L0.223573 0.953638 L0.16538 0.930312 L0.137072 0.907715 L0.116428 0.880312 L0.102822 0.848819 L0.095633 0.813947 L0.094239 0.776413\",K:\"M0.035401 0.270996 L0.035401 0.94897 M0.502258 0.316194 L0.035401 0.687823 M0.212484 0.582361 L0.566652 0.933903\",L:\"M0.07544 0.270996 L0.07544 0.94897 L0.526613 0.94897\",M:\"M0.042481 0.94897 L0.042481 0.270996 L0.301027 0.712492 L0.559571 0.270996 L0.559571 0.94897\",N:\"M0.067871 0.94897 L0.067871 0.270996 L0.534181 0.94897 L0.525031 0.270996\",O:\"M0.287293 0.961214 L0.19843 0.933567 L0.1172 0.849451 L0.057129 0.563945 L0.114348 0.350255 L0.18455 0.289392 L0.306101 0.257813 L0.42054 0.29572 L0.487543 0.365003 L0.544923 0.625294 L0.516366 0.789624 L0.465476 0.884596 L0.375084 0.949287 L0.287293 0.961214\",P:\"M0.070557 0.94897 L0.070557 0.28379 L0.20704 0.270996 L0.329134 0.278993 L0.408525 0.300514 L0.444022 0.317908 L0.500637 0.368929 L0.525796 0.423728 L0.531496 0.50384 L0.508934 0.554205 L0.473724 0.582043 L0.417577 0.604365 L0.336375 0.620372 L0.226014 0.629268 L0.082368 0.630258\",Q:\"M0.282435 1.050813 L0.195447 1.019646 L0.115933 0.924817 L0.057129 0.602943 L0.113139 0.362034 L0.18186 0.293418 L0.300844 0.257813 L0.412868 0.300553 L0.478457 0.37866 L0.534625 0.672103 L0.506671 0.857367 L0.456855 0.964437 L0.368371 1.037368 L0.282435 1.050813 M0.341225 0.815559 L0.544923 1.070653\",R:\"M0.034912 0.944112 L0.034912 0.288556 L0.227127 0.270996 L0.362038 0.276867 L0.443423 0.294907 L0.477644 0.309614 L0.505809 0.328757 L0.526616 0.352817 L0.544963 0.418061 L0.543241 0.475921 L0.524463 0.517817 L0.49076 0.546518 L0.444265 0.564799 L0.355195 0.578739 L0.047653 0.589627 M0.303054 0.617306 L0.56714 0.94897\",S:\"M0.483037 0.364333 L0.407613 0.267477 L0.22883 0.257813 L0.128623 0.327565 L0.087712 0.455539 L0.104656 0.518727 L0.168054 0.573307 L0.41928 0.617318 L0.503796 0.669342 L0.535157 0.759324 L0.493846 0.900055 L0.367668 0.961214 L0.205436 0.956661 L0.116711 0.907038 L0.066895 0.790334\",T:\"M0.022949 0.270996 L0.579103 0.270996 M0.309284 0.270996 L0.309284 0.94897\",U:\"M0.072022 0.270996 L0.07308 0.648875 L0.080372 0.75167 L0.099024 0.827813 L0.134786 0.885729 L0.181571 0.924023 L0.251464 0.95168 L0.339655 0.962139 L0.401553 0.951668 L0.45232 0.924086 L0.482701 0.891771 L0.495745 0.870529 L0.515699 0.81637 L0.525014 0.744626 L0.530031 0.272017\",V:\"M0.027832 0.270996 L0.320083 0.94897 L0.57422 0.270996\",W:\"M0 0.270996 L0.079799 0.940377 L0.285198 0.472884 L0.505255 0.94897 L0.602052 0.270996\",X:\"M0.009034 0.270996 L0.586805 0.94897 M0.593019 0.270996 L0.015246 0.94897\",Y:\"M0.018067 0.270996 L0.293132 0.574135 M0.583986 0.271959 L0.294954 0.57606 L0.305277 0.94897\",Z:\"M0.053711 0.270996 L0.548341 0.270996 L0.053711 0.94897 L0.548341 0.94897\",\"[\":\"M0.404542 0.240234 L0.197511 0.240234 L0.197511 1.069424 L0.404542 1.069424\",\"\\\\\":\"M0.062501 0.270996 L0.539551 1.035249\",\"]\":\"M0.19751 0.240234 L0.404542 0.240234 L0.404542 1.069424 L0.19751 1.069424\",\"^\":\"M0.035156 0.523931 L0.301024 0.270996 L0.566896 0.523931\",_:\"M0 1.160601 L0.602052 1.160601\",a:\"M0.527101 0.439941 L0.527101 0.973965 M0.527101 0.553824 L0.451366 0.477535 L0.376759 0.439941 L0.263722 0.439941 L0.187989 0.477535 L0.112255 0.553824 L0.074951 0.66881 L0.074951 0.745099 L0.112255 0.85898 L0.187989 0.93527 L0.263722 0.973965 L0.376759 0.973965 L0.451366 0.93527 L0.527101 0.85898\",b:\"M0.07666 0.240234 L0.07666 0.959985 M0.07666 0.582737 L0.151822 0.514237 L0.225865 0.480483 L0.338045 0.480483 L0.413211 0.514237 L0.488374 0.582737 L0.525392 0.685983 L0.525392 0.754485 L0.488374 0.856739 L0.413211 0.92524 L0.338045 0.959985 L0.225865 0.959985 L0.151822 0.92524 L0.07666 0.856739\",c:\"M0.512452 0.553823 L0.441624 0.477535 L0.371854 0.439941 L0.26614 0.439941 L0.195312 0.477535 L0.124486 0.553823 L0.0896 0.668808 L0.0896 0.745099 L0.124486 0.858979 L0.195312 0.93527 L0.26614 0.973965 L0.371854 0.973965 L0.441624 0.93527 L0.512452 0.858979\",d:\"M0.525392 0.240234 L0.525392 0.959985 M0.525392 0.582737 L0.450232 0.514237 L0.376189 0.480483 L0.264006 0.480483 L0.188844 0.514237 L0.11368 0.582737 L0.076661 0.685983 L0.076661 0.754485 L0.11368 0.856739 L0.188844 0.92524 L0.264006 0.959985 L0.376189 0.959985 L0.450232 0.92524 L0.525392 0.856739\",e:\"M0.059571 0.668808 L0.542482 0.668808 M0.542482 0.592521 L0.502641 0.516231 L0.461594 0.477535 L0.381914 0.439941 L0.261186 0.439941 L0.180299 0.477535 L0.099412 0.553823 L0.059571 0.668808 L0.059571 0.745099 L0.099412 0.858979 L0.180299 0.93527 L0.261186 0.973965 L0.381914 0.973965 L0.461594 0.93527 L0.542482 0.858979\",f:\"M0.512941 0.240234 L0.406984 0.240234 L0.301026 0.274346 L0.248047 0.374731 L0.248047 0.946817 M0.089112 0.476088 L0.459965 0.476088\",g:\"M0.525392 0.439941 L0.525392 0.989395 L0.488373 1.091918 L0.45023 1.126757 L0.376189 1.160601 L0.264004 1.160601 L0.188844 1.126757 L0.113681 1.058075 L0.076661 0.954555 M0.525392 0.542467 L0.45023 0.473786 L0.376189 0.439941 L0.264004 0.439941 L0.188844 0.473786 L0.113681 0.542467 L0.076661 0.645988 L0.076661 0.714669 L0.113681 0.817193 L0.188844 0.885875 L0.264004 0.920713 L0.376189 0.920713 L0.45023 0.885875 L0.525392 0.817193\",h:\"M0.092041 0.240234 L0.092041 0.946817 M0.092041 0.61058 L0.205937 0.509225 L0.282214 0.476086 L0.396109 0.476086 L0.47187 0.509225 L0.510011 0.61058 L0.510011 0.946817\",i:\"M0.261026 0.240234 L0.341026 0.240234 M0.300978 0.476089 L0.300978 0.946817\",j:\"M0.3853 0.240234 L0.447023 0.240234 M0.416159 0.465708 L0.416159 1.011689 L0.383887 1.108586 L0.252832 1.140264 L0.15503 1.108586\",k:\"M0.065186 0.240234 L0.065186 0.946817 M0.493824 0.476086 L0.065186 0.812323 M0.236758 0.677829 L0.536867 0.946817\",l:\"M0.301026 0.234863 L0.301026 0.946441\",m:\"M0.050538 0.439941 L0.050538 0.960796 M0.050538 0.588758 L0.114405 0.476607 L0.157178 0.439941 L0.236864 0.439941 L0.279637 0.476607 L0.32241 0.588758 L0.32241 0.960796 M0.32241 0.588758 L0.386281 0.476607 L0.428467 0.439941 L0.50874 0.439941 L0.551515 0.476607 L0.551515 0.960796\",n:\"M0.092041 0.439941 L0.092041 0.960796 M0.092041 0.588758 L0.205936 0.476607 L0.282216 0.439941 L0.396113 0.439941 L0.471871 0.476607 L0.510011 0.588758 L0.510011 0.960796\",o:\"M0.247175 0.439941 L0.175178 0.477535 L0.103186 0.553823 L0.066895 0.668808 L0.066895 0.745099 L0.103186 0.858979 L0.175178 0.93527 L0.247175 0.973965 L0.354874 0.973965 L0.426872 0.93527 L0.498866 0.858979 L0.535157 0.745099 L0.535157 0.668808 L0.498866 0.553823 L0.426872 0.477535 L0.354874 0.439941 L0.247175 0.439941\",p:\"M0.076904 0.439941 L0.076904 1.154244 M0.076904 0.541563 L0.151986 0.473487 L0.225944 0.439941 L0.338005 0.439941 L0.413087 0.473487 L0.488166 0.541563 L0.525148 0.644169 L0.525148 0.712246 L0.488166 0.813866 L0.413087 0.881942 L0.338005 0.916471 L0.225944 0.916471 L0.151986 0.881942 L0.076904 0.813866\",q:\"M0.525148 0.441895 L0.525148 1.156195 M0.525148 0.5435 L0.450067 0.47544 L0.376106 0.441895 L0.264042 0.441895 L0.188966 0.47544 L0.113885 0.5435 L0.076905 0.646108 L0.076905 0.714187 L0.113885 0.815809 L0.188966 0.883886 L0.264042 0.918418 L0.376106 0.918418 L0.450067 0.883886 L0.525148 0.815809\",r:\"M0.107422 0.439941 L0.107422 0.960796 M0.107422 0.663164 L0.155824 0.551014 L0.252626 0.476607 L0.349428 0.439941 L0.49463 0.439941\",s:\"M0.475556 0.477535 L0.400757 0.439941 L0.276092 0.439941 L0.176361 0.477535 L0.101563 0.553823 L0.101563 0.630112 L0.176361 0.668808 L0.301024 0.668808 L0.425688 0.745099 L0.50049 0.821387 L0.50049 0.897677 L0.425688 0.93527 L0.325956 0.973965 L0.201295 0.973965 L0.126496 0.93527 L0.101563 0.858979\",t:\"M0.246032 0.297852 L0.246032 0.826549 L0.301023 0.919323 L0.411011 0.950848 L0.520997 0.950848 M0.081055 0.515799 L0.466004 0.515799\",u:\"M0.092041 0.454102 L0.092041 0.826134 L0.13018 0.937211 L0.205936 0.974954 L0.319832 0.974954 L0.396113 0.937211 L0.510011 0.826134 M0.510011 0.454102 L0.510011 0.974954\",v:\"M0.048828 0.453125 L0.301026 0.961719 M0.553224 0.453125 L0.301026 0.961719\",w:\"M0 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.451539 0.961719 M0.602052 0.453125 L0.451539 0.961719\",x:\"M0.03711 0.453125 L0.564943 0.961719 M0.564943 0.453125 L0.03711 0.961719\",y:\"M0.084618 0.453125 L0.320232 0.921476 M0.55713 0.453125 L0.320232 0.921476 L0.242119 1.055289 L0.163369 1.122196 L0.084618 1.155166 L0.044922 1.155166\",z:\"M0.505373 0.452148 L0.09668 0.961651 M0.09668 0.452148 L0.505373 0.452148 M0.09668 0.961651 L0.505373 0.961651\"},d_t={};for(const t in g_t){d_t[t]=[];const e=g_t[t].split(\"M\").slice(1).map(n=\u003en.split(\"L\").map(o=\u003eo.trim().split(\" \").map(parseFloat)));for(const n of e)for(let o=0;o\u003cn.length-1;o++)d_t[t].push({x1:n[o][0],y1:1-n[o][1],x2:n[o+1][0],y2:1-n[o+1][1]})}var MD=(t,e)=\u003e({...t,rects:[...t.rects??[],...e.rects??[]],points:[...t.points??[],...e.points??[]],lines:[...t.lines??[],...e.lines??[]],infiniteLines:[...t.infiniteLines??[],...e.infiniteLines??[]],polygons:[...t.polygons??[],...e.polygons??[]],circles:[...t.circles??[],...e.circles??[]],arrows:[...t.arrows??[],...e.arrows??[]],texts:[...t.texts??[],...e.texts??[]]});function s7e(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;if(t.arrows)for(const n of t.arrows)n.step=e;return t}var zA=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function eh(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var n7=class extends zA{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null\u0026\u0026(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()\u0026\u0026(this.step(),!this.failed\u0026\u0026!this.solved););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??\"none\"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex\u003ethis.pipelineDef.findIndex(A=\u003eA.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n\u0026\u0026(s7e(n,0),e=1);let o=null;this.solved\u0026\u0026(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=\u003e{const a=this[r.solverName],A=a?.visualize();return A?(s7e(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved\u0026\u0026o\u0026\u0026(s7e(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=\u003er.points||[]),rects:i.flatMap(r=\u003er.rects||[]),lines:i.flatMap(r=\u003er.lines||[]),circles:i.flatMap(r=\u003er.circles||[]),texts:i.flatMap(r=\u003er.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},dqn=class{constructor(e=1/0,n=Float64Array,o=Uint32Array){const i=e!==1/0;this.ids=i?new o(e):[],this.values=i?new n(e):[],this.capacity=e,this.length=0}clear(){this.length=0}push(e,n){if(this.length===this.capacity)throw new RangeError(\"Queue is at capacity.\");let o=this.length++;for(;o\u003e0;){const i=o-1\u003e\u003e1,r=this.values[i];if(n\u003e=r)break;this.ids[o]=this.ids[i],this.values[o]=r,o=i}this.ids[o]=e,this.values[o]=n}pop(){if(this.length===0)return;const e=this.ids,n=this.values,o=e[0],i=--this.length;if(i\u003e0){const r=e[i],s=n[i];let a=0;const A=i\u003e\u003e1;for(;a\u003cA;){const c=1+(a\u003c\u003c1),l=c+1,u=c+(+(l\u003ci)\u0026+(n[l]\u003cn[c]));if(n[u]\u003e=s)break;e[a]=e[u],n[a]=n[u],a=u}e[a]=r,n[a]=s}return o}peek(){return this.length\u003e0?this.ids[0]:void 0}peekValue(){return this.length\u003e0?this.values[0]:void 0}shrink(){Array.isArray(this.ids)\u0026\u0026(this.ids.length=this.length),Array.isArray(this.values)\u0026\u0026(this.values.length=this.length)}},h_t=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],X4=class ZEn{static from(e,n=0){if(n%8!=0)throw new Error(\"byteOffset must be 8-byte aligned.\");if(!e||e.byteLength===void 0||\"buffer\"in e)throw new Error(\"Data must be an instance of ArrayBuffer or SharedArrayBuffer.\");const[o,i]=new Uint8Array(e,n+0,2);if(o!==251)throw new Error(\"Data does not appear to be in a Flatbush format.\");const r=i\u003e\u003e4;if(r!==3)throw new Error(`Got v${r} data when expected v3.`);const s=h_t[15\u0026i];if(!s)throw new Error(\"Unrecognized array type.\");const[a]=new Uint16Array(e,n+2,1),[A]=new Uint32Array(e,n+4,1);return new ZEn(A,a,s,void 0,e,n)}constructor(e,n=16,o=Float64Array,i=ArrayBuffer,r,s=0){if(e===void 0)throw new Error(\"Missing required argument: numItems.\");if(isNaN(e)||e\u003c=0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.byteOffset=s;let a=e,A=a;this._levelBounds=[4*a];do a=Math.ceil(a/this.nodeSize),A+=a,this._levelBounds.push(4*A);while(a!==1);this.ArrayType=o,this.IndexArrayType=A\u003c16384?Uint16Array:Uint32Array;const c=h_t.indexOf(o),l=4*A*o.BYTES_PER_ELEMENT;if(c\u003c0)throw new Error(`Unexpected typed array class: ${o}.`);const u=o,g=this.IndexArrayType;if(r)this.data=r,this._boxes=new u(r,s+8,4*A),this._indices=new g(r,s+8+l,A),this._pos=4*A,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const h=this.data=new i(8+l+A*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new u(h,8,4*A),this._indices=new g(h,8+l,A),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(h,0,2).set([251,48+c]),new Uint16Array(h,2,1)[0]=n,new Uint32Array(h,4,1)[0]=e}this._queue=new dqn}add(e,n,o=e,i=n){const r=this._pos,s=r\u003e\u003e2,a=this._boxes;return this._indices[s]=s,a[r]=e,a[r+1]=n,a[r+2]=o,a[r+3]=i,this._pos=r+4,e\u003cthis.minX\u0026\u0026(this.minX=e),n\u003cthis.minY\u0026\u0026(this.minY=n),o\u003ethis.maxX\u0026\u0026(this.maxX=o),i\u003ethis.maxY\u0026\u0026(this.maxY=i),s}finish(){if(this._pos\u003e\u003e2!==this.numItems)throw new Error(`Added ${this._pos\u003e\u003e2} items when expected ${this.numItems}.`);const e=this._boxes;if(this.numItems\u003c=this.nodeSize)return e[this._pos++]=this.minX,e[this._pos++]=this.minY,e[this._pos++]=this.maxX,void(e[this._pos++]=this.maxY);const{numItems:n,minX:o,minY:i,nodeSize:r,_indices:s,_levelBounds:a}=this,A=this.maxX-o||1,c=this.maxY-i||1,l=new Int32Array(n),u=65535/A,g=65535/c;for(let d=0,p=0;d\u003cn;d++){const m=e[p++],_=e[p++],f=u*((m+e[p++])/2-o)|0,I=g*((_+e[p++])/2-i)|0;l[d]=mqn(f,I)}(function(d,p,m,_,f,I){const C=[_,f];for(;C.length;){const y=C.pop()||0,x=C.pop()||0;if(y-x\u003c=I\u0026\u0026Math.floor(x/I)\u003e=Math.floor(y/I))continue;const E=d[x],B=d[x+y\u003e\u003e1],S=d[y],Q=E\u003eB!=E\u003eS?E:B\u003cE!=B\u003cS?B:S;let w=x-1,M=y+1;for(;;){do w++;while(d[w]\u003cQ);do M--;while(d[M]\u003eQ);if(w\u003e=M)break;pqn(d,p,m,w,M)}C.push(x,M,M+1,y)}})(l,e,s,0,n-1,r);let h=4*n;for(let d=0,p=0;d\u003ca.length-1;d++){const m=a[d];for(;p\u003cm;){const _=p;let f=e[p++],I=e[p++],C=e[p++],y=e[p++];for(let x=1;x\u003cr\u0026\u0026p\u003cm;x++)f=Math.min(f,e[p++]),I=Math.min(I,e[p++]),C=Math.max(C,e[p++]),y=Math.max(y,e[p++]);s[h\u003e\u003e2]=_,e[h++]=f,e[h++]=I,e[h++]=C,e[h++]=y}}this._pos=h}search(e,n,o,i,r){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");const{_boxes:s,_levelBounds:a,_indices:A,nodeSize:c}=this,l=4*this.numItems;let u=s.length-4,g=a.length-1;const h=[],d=[];let p=!1;for(;u!==void 0;){const m=Math.min(u+4*c,a[g]),_=u\u003e=l;if(p)this._collectContained(u,m,g,l,d,r);else for(let f=u;f\u003cm;f+=4){const I=s[f];if(o\u003cI)continue;const C=s[f+1];if(i\u003cC)continue;const y=s[f+2];if(e\u003ey)continue;const x=s[f+3];if(n\u003ex)continue;const E=0|A[f\u003e\u003e2];if(_){const B=+(e\u003c=I\u0026\u0026n\u003c=C\u0026\u0026o\u003e=y\u0026\u0026i\u003e=x);h.push(E|B,g-1)}else(r===void 0||r(E,I,C,y,x))\u0026\u0026d.push(E)}g=h.pop(),u=h.pop(),u!==void 0\u0026\u0026(p=!(1\u0026~u),u\u0026=-2)}return d}_collectContained(e,n,o,i,r,s){const a=this._boxes,A=this._indices;let c=e;for(let u=o;u\u003e0;u--)c=A[c\u003e\u003e2];const l=Math.min(c+(n-e)*this.nodeSize**o,i);if(s===void 0)for(;c\u003cl;c+=4)r.push(0|A[c\u003e\u003e2]);else for(;c\u003cl;c+=4){const u=0|A[c\u003e\u003e2];s(u,a[c],a[c+1],a[c+2],a[c+3])\u0026\u0026r.push(u)}}neighbors(e,n,o=1/0,i=1/0,r){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");const{_boxes:s,_levelBounds:a,_indices:A,_queue:c,nodeSize:l}=this,u=4*this.numItems,g=4*l,h=[],d=o===1;let p=i*i;for(c.push(s.length-4\u003c\u003c1,0);c.length;){const m=c.ids[0];if(1\u0026m){if(c.pop(),h.push(m\u003e\u003e1),h.length===o)break;continue}c.pop();const _=m\u003e\u003e1,f=_\u003cu,I=Math.min(_+g,hqn(_,a));for(let C=_;C\u003cI;C+=4){const y=s[C],x=s[C+1],E=s[C+2],B=s[C+3],S=Math.max(Math.max(y-e,e-E),0),Q=Math.max(Math.max(x-n,n-B),0),w=S*S+Q*Q;if(w\u003ep)continue;const M=0|A[C\u003e\u003e2];f?(r===void 0||r(M))\u0026\u0026(c.push(M\u003c\u003c1|1,w),d\u0026\u0026w\u003cp\u0026\u0026(p=w)):c.push(M\u003c\u003c1,w)}}return c.clear(),h}};function hqn(t,e){let n=0,o=e.length-1;for(;n\u003co;){const i=n+o\u003e\u003e1;e[i]\u003et?o=i:n=i+1}return e[n]}function pqn(t,e,n,o,i){const r=t[o];t[o]=t[i],t[i]=r;const s=4*o,a=4*i,A=e[s],c=e[s+1],l=e[s+2],u=e[s+3];e[s]=e[a],e[s+1]=e[a+1],e[s+2]=e[a+2],e[s+3]=e[a+3],e[a]=A,e[a+1]=c,e[a+2]=l,e[a+3]=u;const g=n[o];n[o]=n[i],n[i]=g}function mqn(t,e){let n=t^e,o=65535^n,i=65535^(t|e),r=t\u0026(65535^e),s=n|o\u003e\u003e1,a=n\u003e\u003e1^n,A=i^i\u003e\u003e1^o\u0026r\u003e\u003e1,c=r^n\u0026i\u003e\u003e1^r\u003e\u003e1;return n=s\u0026s\u003e\u003e2^a\u0026a\u003e\u003e2,o=s\u0026a\u003e\u003e2^a\u0026(s^a)\u003e\u003e2,i=A^s\u0026A\u003e\u003e2^a\u0026c\u003e\u003e2,r=c^a\u0026A\u003e\u003e2^(s^a)\u0026c\u003e\u003e2,s=n\u0026n\u003e\u003e4^o\u0026o\u003e\u003e4,a=n\u0026o\u003e\u003e4^o\u0026(n^o)\u003e\u003e4,A=i^n\u0026i\u003e\u003e4^o\u0026r\u003e\u003e4,c=r^o\u0026i\u003e\u003e4^(n^o)\u0026r\u003e\u003e4,i=A^s\u0026A\u003e\u003e8^a\u0026c\u003e\u003e8,r=c^a\u0026A\u003e\u003e8^(s^a)\u0026c\u003e\u003e8,i^=i\u003e\u003e1,r^=r\u003e\u003e1,n=t^e,o=r|65535^(n|i),n=16711935\u0026(n|n\u003c\u003c8),n=252645135\u0026(n|n\u003c\u003c4),n=858993459\u0026(n|n\u003c\u003c2),n=1431655765\u0026(n|n\u003c\u003c1),o=16711935\u0026(o|o\u003c\u003c8),o=252645135\u0026(o|o\u003c\u003c4),o=858993459\u0026(o|o\u003c\u003c2),o=1431655765\u0026(o|o\u003c\u003c1),((o\u003c\u003c1|n)\u003e\u003e\u003e0)-2147483648}var Z4=1e-4,bz=[{facingDirection:\"x-\",dx:-1,dy:0,startX:-.5,startY:.5,endX:-.5,endY:-.5},{facingDirection:\"x+\",dx:1,dy:0,startX:.5,startY:.5,endX:.5,endY:-.5},{facingDirection:\"y-\",dx:0,dy:-1,startX:-.5,startY:-.5,endX:.5,endY:-.5},{facingDirection:\"y+\",dx:0,dy:1,startX:.5,startY:.5,endX:-.5,endY:.5}],_qn={\"x-\":bz.find(t=\u003et.facingDirection===\"x-\"),\"x+\":bz.find(t=\u003et.facingDirection===\"x+\"),\"y-\":bz.find(t=\u003et.facingDirection===\"y-\"),\"y+\":bz.find(t=\u003et.facingDirection===\"y+\")},fqn={\"x-\":{x:-1,y:0},\"x+\":{x:1,y:0},\"y-\":{x:0,y:-1},\"y+\":{x:0,y:1}},a7e=(t,e)=\u003e{const{dir:n,amt:o}=e,i=fqn[n];return t.map(r=\u003e({x:r.x+i.x*o,y:r.y+i.y*o}))},Sz=1e-4;function p_t(t){const e=[];for(const n of t)for(const o of bz){let i={x:n.center.x+n.width*o.startX,y:n.center.y+n.height*o.startY},r={x:n.center.x+n.width*o.endX,y:n.center.y+n.height*o.endY};i.x\u003er.x\u0026\u0026([i,r]=[r,i]),Math.abs(i.x-r.x)\u003cSz\u0026\u0026i.y\u003er.y\u0026\u0026([i,r]=[r,i]);for(const s of n.availableZ)e.push({parent:n,start:i,end:r,facingDirection:o.facingDirection,z:s})}return e}var Iqn=class extends zA{constructor(e){super(),this.input=e;const n=this.input.targetMeshNodes??this.input.allMeshNodes,o=new Set(n.map(r=\u003er.capacityMeshNodeId)),i=this.input.allMeshNodes.filter(r=\u003e!o.has(r.capacityMeshNodeId));this.unprocessedEdges=p_t(n),this.allEdges=[...this.unprocessedEdges,...p_t(i)],this.edgeSpatialIndex=new X4(this.allEdges.length);for(const r of this.allEdges)this.edgeSpatialIndex.add(r.start.x,r.start.y,r.end.x,r.end.y);this.edgeSpatialIndex.finish()}input;allEdges;unprocessedEdges=[];segmentsWithAdjacentEmptySpace=[];edgeSpatialIndex;lastCandidateEdge=null;lastOverlappingEdges=null;lastUncoveredSegments=null;_step(){if(this.unprocessedEdges.length===0)return this.solved=!0,this.lastCandidateEdge=null,this.lastOverlappingEdges=null,void(this.lastUncoveredSegments=null);const e=this.unprocessedEdges.shift();this.lastCandidateEdge=e;const n=this.edgeSpatialIndex.search(e.start.x-Sz,e.start.y-Sz,e.end.x+Sz,e.end.y+Sz).map(i=\u003ethis.allEdges[i]).filter(i=\u003ei.z===e.z);this.lastOverlappingEdges=n;const o=(function(i,r){const s=Math.abs(i.start.y-i.end.y)\u003cZ4,a=Math.abs(i.start.x-i.end.x)\u003cZ4;if(!s\u0026\u0026!a)return[];const A=s?\"x\":\"y\",c=s?\"y\":\"x\",l=i.start[c],u=i.start[A],g=i.end[A],h=Math.min(u,g),d=Math.max(u,g),p=C=\u003eMath.max(h,Math.min(d,C)),m=[];for(const C of r){if(C===i)continue;const y=Math.abs(C.start.y-C.end.y)\u003cZ4,x=Math.abs(C.start.x-C.end.x)\u003cZ4;if(A===\"x\"\u0026\u0026!y||A===\"y\"\u0026\u0026!x||Math.abs(C.start[c]-l)\u003eZ4)continue;const E=Math.min(C.start[A],C.end[A]),B=Math.max(C.start[A],C.end[A]),S=p(E),Q=p(B);Q-S\u003eZ4\u0026\u0026m.push({s:S,e:Q})}if(m.length===0)return[{...i,start:{...i.start},end:{...i.end}}];m.sort((C,y)=\u003eC.s-y.s);const _=[];for(const C of m){const y=_[_.length-1];!y||C.s\u003ey.e+Z4?_.push({...C}):y.e=Math.max(y.e,C.e)}const f=[];let I=h;for(const C of _)if(C.s\u003eI+Z4\u0026\u0026f.push({s:I,e:C.s}),I=Math.max(I,C.e),I\u003e=d-Z4)break;return d\u003eI+Z4\u0026\u0026f.push({s:I,e:d}),f.length===0?[]:f.filter(C=\u003eC.e-C.s\u003eZ4).map(C=\u003e{const y=A===\"x\"?{x:C.s,y:l}:{x:l,y:C.s},x=A===\"x\"?{x:C.e,y:l}:{x:l,y:C.e};return{parent:i.parent,facingDirection:i.facingDirection,start:y,end:x,z:i.z}})})(e,n);this.lastUncoveredSegments=o,this.segmentsWithAdjacentEmptySpace.push(...o)}getOutput(){return{segmentsWithAdjacentEmptySpace:this.segmentsWithAdjacentEmptySpace}}visualize(){const e={title:\"FindSegmentsWithAdjacentEmptySpace\",coordinateSystem:\"cartesian\",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]};for(const n of this.input.allMeshNodes)e.rects.push({center:n.center,width:n.width,height:n.height,stroke:\"rgba(0, 0, 0, 0.1)\"});for(const n of this.unprocessedEdges)e.lines.push({points:a7e([n.start,n.end],{dir:n.facingDirection,amt:-.1}),strokeColor:\"rgba(0, 0, 255, 0.5)\",strokeDash:\"5 5\"});for(const n of this.segmentsWithAdjacentEmptySpace)e.lines.push({points:[n.start,n.end],strokeColor:\"rgba(0,255,0, 0.5)\"});if(this.lastCandidateEdge\u0026\u0026e.lines.push({points:[this.lastCandidateEdge.start,this.lastCandidateEdge.end],strokeColor:\"blue\"}),this.lastOverlappingEdges)for(const n of this.lastOverlappingEdges)e.lines.push({points:a7e([n.start,n.end],{dir:n.facingDirection,amt:.05}),strokeColor:\"red\",strokeDash:\"2 2\"});if(this.lastUncoveredSegments)for(const n of this.lastUncoveredSegments)e.lines.push({points:a7e([n.start,n.end],{dir:n.facingDirection,amt:-.05}),strokeColor:\"green\",strokeDash:\"2 2\"});return e}};function m_t(t,e,n=0,o=t.length-1,i=Cqn){for(;o\u003en;){if(o-n\u003e600){const A=o-n+1,c=e-n+1,l=Math.log(A),u=.5*Math.exp(2*l/3),g=.5*Math.sqrt(l*u*(A-u)/A)*(c-A/2\u003c0?-1:1);m_t(t,e,Math.max(n,Math.floor(e-c*u/A+g)),Math.min(o,Math.floor(e+(A-c)*u/A+g)),i)}const r=t[e];let s=n,a=o;for(Qz(t,n,e),i(t[o],r)\u003e0\u0026\u0026Qz(t,n,o);s\u003ca;){for(Qz(t,s,a),s++,a--;i(t[s],r)\u003c0;)s++;for(;i(t[a],r)\u003e0;)a--}i(t[n],r)===0?Qz(t,n,a):(a++,Qz(t,a,o)),a\u003c=e\u0026\u0026(n=a+1),e\u003c=a\u0026\u0026(o=a-1)}}function Qz(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function Cqn(t,e){return t\u003ce?-1:t\u003ee?1:0}var vz=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const o=[];if(!Pse(e,n))return o;const i=this.toBBox,r=[];for(;n;){for(let s=0;s\u003cn.children.length;s++){const a=n.children[s],A=n.leaf?i(a):a;Pse(e,A)\u0026\u0026(n.leaf?o.push(a):c7e(e,A)?this._all(a,o):r.push(a))}n=r.pop()}return o}collides(e){let n=this.data;if(!Pse(e,n))return!1;const o=[];for(;n;){for(let i=0;i\u003cn.children.length;i++){const r=n.children[i],s=n.leaf?this.toBBox(r):r;if(Pse(e,s)){if(n.leaf||c7e(e,s))return!0;o.push(r)}}n=o.pop()}return!1}load(e){if(!e||!e.length)return this;if(e.length\u003cthis._minEntries){for(let o=0;o\u003ce.length;o++)this.insert(e[o]);return this}let n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height\u003cn.height){const o=this.data;this.data=n,n=o}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this}insert(e){return e\u0026\u0026this._insert(e,this.data.height-1),this}clear(){return this.data=JF([]),this}remove(e,n){if(!e)return this;let o=this.data;const i=this.toBBox(e),r=[],s=[];let a,A,c;for(;o||r.length;){if(o||(o=r.pop(),A=r[r.length-1],a=s.pop(),c=!0),o.leaf){const l=yqn(e,o.children,n);if(l!==-1)return o.children.splice(l,1),r.push(o),this._condense(r),this}c||o.leaf||!c7e(o,i)?A?(a++,o=A.children[a],c=!1):o=null:(r.push(o),s.push(a),a=0,A=o,o=o.children[0])}return this}toBBox(e){return e}compareMinX(e,n){return e.minX-n.minX}compareMinY(e,n){return e.minY-n.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,n){const o=[];for(;e;)e.leaf?n.push(...e.children):o.push(...e.children),e=o.pop();return n}_build(e,n,o,i){const r=o-n+1;let s,a=this._maxEntries;if(r\u003c=a)return s=JF(e.slice(n,o+1)),zF(s,this.toBBox),s;i||(i=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,i-1))),s=JF([]),s.leaf=!1,s.height=i;const A=Math.ceil(r/a),c=A*Math.ceil(Math.sqrt(a));__t(e,n,o,c,this.compareMinX);for(let l=n;l\u003c=o;l+=c){const u=Math.min(l+c-1,o);__t(e,l,u,A,this.compareMinY);for(let g=l;g\u003c=u;g+=A){const h=Math.min(g+A-1,u);s.children.push(this._build(e,g,h,i-1))}}return zF(s,this.toBBox),s}_chooseSubtree(e,n,o,i){for(;i.push(n),!n.leaf\u0026\u0026i.length-1!==o;){let r,s=1/0,a=1/0;for(let A=0;A\u003cn.children.length;A++){const c=n.children[A],l=A7e(c),u=Bqn(e,c)-l;u\u003ca?(a=u,s=l\u003cs?l:s,r=c):u===a\u0026\u0026l\u003cs\u0026\u0026(s=l,r=c)}n=r||n.children[0]}return n}_insert(e,n,o){const i=o?e:this.toBBox(e),r=[],s=this._chooseSubtree(i,this.data,n,r);for(s.children.push(e),Pz(s,i);n\u003e=0\u0026\u0026r[n].children.length\u003ethis._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(i,r,n)}_split(e,n){const o=e[n],i=o.children.length,r=this._minEntries;this._chooseSplitAxis(o,r,i);const s=this._chooseSplitIndex(o,r,i),a=JF(o.children.splice(s,o.children.length-s));a.height=o.height,a.leaf=o.leaf,zF(o,this.toBBox),zF(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(o,a)}_splitRoot(e,n){this.data=JF([e,n]),this.data.height=e.height+1,this.data.leaf=!1,zF(this.data,this.toBBox)}_chooseSplitIndex(e,n,o){let i,r=1/0,s=1/0;for(let a=n;a\u003c=o-n;a++){const A=wz(e,0,a,this.toBBox),c=wz(e,a,o,this.toBBox),l=bqn(A,c),u=A7e(A)+A7e(c);l\u003cr?(r=l,i=a,s=u\u003cs?u:s):l===r\u0026\u0026u\u003cs\u0026\u0026(s=u,i=a)}return i||o-n}_chooseSplitAxis(e,n,o){const i=e.leaf?this.compareMinX:xqn,r=e.leaf?this.compareMinY:Eqn;this._allDistMargin(e,n,o,i)\u003cthis._allDistMargin(e,n,o,r)\u0026\u0026e.children.sort(i)}_allDistMargin(e,n,o,i){e.children.sort(i);const r=this.toBBox,s=wz(e,0,n,r),a=wz(e,o-n,o,r);let A=wse(s)+wse(a);for(let c=n;c\u003co-n;c++){const l=e.children[c];Pz(s,e.leaf?r(l):l),A+=wse(s)}for(let c=o-n-1;c\u003e=n;c--){const l=e.children[c];Pz(a,e.leaf?r(l):l),A+=wse(a)}return A}_adjustParentBBoxes(e,n,o){for(let i=o;i\u003e=0;i--)Pz(n[i],e)}_condense(e){for(let n,o=e.length-1;o\u003e=0;o--)e[o].children.length===0?o\u003e0?(n=e[o-1].children,n.splice(n.indexOf(e[o]),1)):this.clear():zF(e[o],this.toBBox)}};function yqn(t,e,n){if(!n)return e.indexOf(t);for(let o=0;o\u003ce.length;o++)if(n(t,e[o]))return o;return-1}function zF(t,e){wz(t,0,t.children.length,e,t)}function wz(t,e,n,o,i){i||(i=JF(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r=e;r\u003cn;r++){const s=t.children[r];Pz(i,t.leaf?o(s):s)}return i}function Pz(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function xqn(t,e){return t.minX-e.minX}function Eqn(t,e){return t.minY-e.minY}function A7e(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function wse(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Bqn(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function bqn(t,e){const n=Math.max(t.minX,e.minX),o=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-o)}function c7e(t,e){return t.minX\u003c=e.minX\u0026\u0026t.minY\u003c=e.minY\u0026\u0026e.maxX\u003c=t.maxX\u0026\u0026e.maxY\u003c=t.maxY}function Pse(t,e){return e.minX\u003c=t.maxX\u0026\u0026e.minY\u003c=t.maxY\u0026\u0026e.maxX\u003e=t.minX\u0026\u0026e.maxY\u003e=t.minY}function JF(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function __t(t,e,n,o,i){const r=[e,n];for(;r.length;){if((n=r.pop())-(e=r.pop())\u003c=o)continue;const s=e+Math.ceil((n-e)/o/2)*o;m_t(t,s,e,n,i),r.push(e,s,s,n)}}var f_t=t=\u003e({minX:Math.min(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxX:Math.max(...t.map(e=\u003ee.x)),maxY:Math.max(...t.map(e=\u003ee.y))});function Uh(t,e,n,o){const i=Mse(t,e,n),r=Mse(t,e,o),s=Mse(n,o,t),a=Mse(n,o,e);return i!==r\u0026\u0026s!==a||!(i!==0||!Dse(t,n,e))||!(r!==0||!Dse(t,o,e))||!(s!==0||!Dse(n,t,o))||!(a!==0||!Dse(n,e,o))}function Mse(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o\u003e0?1:2}function Dse(t,e,n){return e.x\u003c=Math.max(t.x,n.x)\u0026\u0026e.x\u003e=Math.min(t.x,n.x)\u0026\u0026e.y\u003c=Math.max(t.y,n.y)\u0026\u0026e.y\u003e=Math.min(t.y,n.y)}function wc(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return no(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;return i=Math.max(0,Math.min(1,i)),no(t,{x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)})}function no(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function DD(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=o.x-n.x,a=o.y-n.y,A=t.x-n.x,c=t.y-n.y,l=i*a-r*s;if(Math.abs(l)\u003c1e-10)return null;const u=(c*s-A*a)/l,g=(i*c-r*A)/l,h=1e-9;return u\u003e=-1e-9\u0026\u0026u\u003c=1+h\u0026\u0026g\u003e=-1e-9\u0026\u0026g\u003c=1+h?{x:t.x+u*i,y:t.y+u*r}:null}var I_t=t=\u003e{if(\"minX\"in t)return t;const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,minY:t.center.y-n,maxX:t.center.x+e,maxY:t.center.y+n}},l7e=t=\u003e[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}],C_t=t=\u003e{const e=[];for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];e.push([o,i])}return e},Sqn=(t,e,n)=\u003e{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)\u003e1e-9)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i\u003c0)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return r!==0\u0026\u0026!(i\u003er)},y_t=(t,e)=\u003et.x\u003e=e.minX\u0026\u0026t.x\u003c=e.maxX\u0026\u0026t.y\u003e=e.minY\u0026\u0026t.y\u003c=e.maxY,Mz=(t,e)=\u003e{if(e.length\u003c3)return!1;const n=C_t(e);for(const[i,r]of n)if(Sqn(t,i,r))return!0;let o=!1;for(let i=0,r=e.length-1;i\u003ce.length;r=i++){const s=e[i].x,a=e[i].y,A=e[r].x,c=e[r].y;a\u003et.y!=c\u003et.y\u0026\u0026t.x\u003c(A-s)*(t.y-a)/(c-a)+s\u0026\u0026(o=!o)}return o},x_t=(t,e)=\u003e{const n=l7e(t),o=[[n[0],n[1]],[n[1],n[2]],[n[2],n[3]],[n[3],n[0]]],i=C_t(e);for(const[r,s]of i)for(const[a,A]of o)if(Uh(r,s,a,A))return!0;return!1},Nse=(t,e)=\u003e((n,o)=\u003e!(o.length\u003c3)\u0026\u0026(!!o.some(i=\u003ey_t(i,n))||!!l7e(n).some(i=\u003eMz(i,o))||x_t(n,o)))(I_t(t),e),E_t=(t,e)=\u003e((n,o)=\u003e!(o.length\u003c3)\u0026\u0026!!l7e(n).every(i=\u003eMz(i,o))\u0026\u0026!x_t(n,o))(I_t(t),e);function Is(t){const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,maxX:t.center.x+e,minY:t.center.y-n,maxY:t.center.y+n}}function V3(t,e,n){return Math.max(e,Math.min(n,t))}function M5(t,e,n,o){if(t.x===e.x\u0026\u0026t.y===e.y)return wc(t,n,o);if(n.x===o.x\u0026\u0026n.y===o.y)return wc(n,t,e);if(Uh(t,e,n,o))return 0;const i=[wc(t,n,o),wc(e,n,o),wc(n,t,e),wc(o,t,e)];return Math.min(...i)}function Dz(t,e,n){const o={x:n.minX,y:n.minY},i={x:n.maxX,y:n.minY},r={x:n.minX,y:n.maxY},s={x:n.maxX,y:n.maxY};if(Uh(t,e,o,i)||Uh(t,e,i,s)||Uh(t,e,s,r)||Uh(t,e,r,o)||t.x\u003e=n.minX\u0026\u0026t.x\u003c=n.maxX\u0026\u0026t.y\u003e=n.minY\u0026\u0026t.y\u003c=n.maxY\u0026\u0026e.x\u003e=n.minX\u0026\u0026e.x\u003c=n.maxX\u0026\u0026e.y\u003e=n.minY\u0026\u0026e.y\u003c=n.maxY)return 0;const a=[wc(o,t,e),wc(i,t,e),wc(r,t,e),wc(s,t,e)];if(t.x\u003e=n.minX\u0026\u0026t.x\u003c=n.maxX\u0026\u0026t.y\u003e=n.minY\u0026\u0026t.y\u003c=n.maxY||e.x\u003e=n.minX\u0026\u0026e.x\u003c=n.maxX\u0026\u0026e.y\u003e=n.minY\u0026\u0026e.y\u003c=n.maxY)return 0;if(t.x\u003cn.minX||t.x\u003en.maxX||t.y\u003cn.minY||t.y\u003en.maxY){const A=V3(t.x,n.minX,n.maxX),c=V3(t.y,n.minY,n.maxY);a.push(no(t,{x:A,y:c}))}if(e.x\u003cn.minX||e.x\u003en.maxX||e.y\u003cn.minY||e.y\u003en.maxY){const A=V3(e.x,n.minX,n.maxX),c=V3(e.y,n.minY,n.maxY);a.push(no(e,{x:A,y:c}))}return Math.min(...a)}function K8(t,e,n){const o=n.width/2,i=n.height/2;return Dz(t,e,{minX:n.center.x-o,maxX:n.center.x+o,minY:n.center.y-i,maxY:n.center.y+i})}function Nz(t,e,n){const o={x:n.x,y:n.y};if(t.x===e.x\u0026\u0026t.y===e.y)return Math.max(0,no(t,o)-n.radius);const i=e.x-t.x,r=e.y-t.y,s=o.x-t.x,a=o.y-t.y,A=i*i+r*r,c=Math.max(0,Math.min(1,(i*s+r*a)/A)),l=no({x:t.x+c*i,y:t.y+c*r},o);return Math.max(0,l-n.radius)}function z_(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r===0)return{x:e.x,y:e.y};let s=((t.x-e.x)*o+(t.y-e.y)*i)/r;return s=Math.max(0,Math.min(1,s)),{x:e.x+s*o,y:e.y+s*i}}var u7e=(t,e)=\u003e{const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n**2+o**2);return{x:n/i,y:o/i}};function o7(t,e){const n=e.width/2,o=e.height/2,i=e.center.x-n,r=e.center.x+n,s=e.center.y-o,a=e.center.y+o;return t.x\u003e=i\u0026\u0026t.x\u003c=r\u0026\u0026t.y\u003e=s\u0026\u0026t.y\u003c=a?0:no(t,{x:V3(t.x,i,r),y:V3(t.y,s,a)})}function V8(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function B_t(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}var WF=(t,e)=\u003e!(t.maxX\u003ce.minX||e.maxX\u003ct.minX||t.maxY\u003ce.minY||e.maxY\u003ct.minY),Pg=t=\u003e{const{center:e,width:n,height:o}=t,i=n/2,r=o/2;return{minX:e.x-i,maxX:e.x+i,minY:e.y-r,maxY:e.y+r}},i7=1e-4,Qqn=class extends zA{constructor(e){super(),this.input=e,this.unprocessedSegments=[...this.input.segmentsWithAdjacentEmptySpace],this.rectSpatialIndex=new vz,this.rectSpatialIndex.load(this.input.boardVoid?.boardVoidRects.map((n,o)=\u003e({capacityMeshNodeId:`void-rect-${o}`,center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,availableZ:Array.from({length:this.input.boardVoid?.layerCount||0},(i,r)=\u003er),layer:\"void\",minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height}))||[]),this.rectSpatialIndex.load(this.input.inputMeshNodes.map(n=\u003e({...n,minX:n.center.x-n.width/2,minY:n.center.y-n.height/2,maxX:n.center.x+n.width/2,maxY:n.center.y+n.height/2})))}input;unprocessedSegments=[];expandedSegments=[];lastSegment=null;lastSearchBounds=null;lastCollidingNodes=null;lastSearchCorner1=null;lastSearchCorner2=null;lastExpandedSegment=null;rectSpatialIndex;_step(){if(this.unprocessedSegments.length===0)return void(this.solved=!0);const e=this.unprocessedSegments.shift();this.lastSegment=e;const{dx:n,dy:o}=_qn[e.facingDirection],i=e.end.x-e.start.x,r=e.end.y-e.start.y,s=Math.sqrt(i**2+r**2),a=i/s,A=r/s;let c=null,l=1;const u={x:e.start.x+n*i7+a*i7*10,y:e.start.y+o*i7+A*i7*10},g={x:e.end.x+n*i7-a*i7*10,y:e.end.y+o*i7-A*i7*10};for(this.lastSearchCorner1=u,this.lastSearchCorner2=g;(!c||c.length===0)\u0026\u0026l\u003c1e3;){const C=f_t([u,g,{x:u.x+n*l,y:u.y+o*l},{x:g.x+n*l,y:g.y+o*l}]);this.lastSearchBounds=C,c=this.rectSpatialIndex.search(C).filter(y=\u003ey.availableZ.includes(e.z)).filter(y=\u003ey.capacityMeshNodeId!==e.parent.capacityMeshNodeId),l*=4}if(!c||c.length===0)return;this.lastCollidingNodes=c;let h=1/0;for(const C of c){const y=K8(e.start,e.end,C);y\u003ch\u0026\u0026(h=y)}const d=h,p=f_t([e.start,e.end,{x:e.start.x+n*d,y:e.start.y+o*d},{x:e.end.x+n*d,y:e.end.y+o*d}]),m={x:(p.minX+p.maxX)/2,y:(p.minY+p.maxY)/2},_=p.maxX-p.minX,f=p.maxY-p.minY,I={segment:e,newNode:{capacityMeshNodeId:`new-${e.parent.capacityMeshNodeId}-${this.expandedSegments.length}`,center:m,width:_,height:f,availableZ:[e.z],layer:e.parent.layer}};this.lastExpandedSegment=I,_\u003ci7||f\u003ci7||(this.expandedSegments.push(I),this.rectSpatialIndex.insert({...I.newNode,...p}))}getOutput(){return{expandedSegments:this.expandedSegments}}visualize(){const e={title:\"ExpandEdgesToEmptySpace\",coordinateSystem:\"cartesian\",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]};for(const n of this.input.inputMeshNodes)e.rects.push({center:n.center,width:n.width,height:n.height,stroke:\"rgba(0, 0, 0, 0.1)\",layer:`z${n.availableZ.join(\",\")}`,label:[`node ${n.capacityMeshNodeId}`,`z:${n.availableZ.join(\",\")}`].join(`\n`)});for(const{newNode:n}of this.expandedSegments)e.rects.push({center:n.center,width:n.width,height:n.height,fill:\"green\",label:`expandedSegment (z=${n.availableZ.join(\",\")})`,layer:`z${n.availableZ.join(\",\")}`});if(this.lastSegment\u0026\u0026e.lines.push({points:[this.lastSegment.start,this.lastSegment.end],strokeColor:\"rgba(0, 0, 255, 0.5)\"}),this.lastSearchBounds\u0026\u0026e.rects.push({center:{x:(this.lastSearchBounds.minX+this.lastSearchBounds.maxX)/2,y:(this.lastSearchBounds.minY+this.lastSearchBounds.maxY)/2},width:this.lastSearchBounds.maxX-this.lastSearchBounds.minX,height:this.lastSearchBounds.maxY-this.lastSearchBounds.minY,fill:\"rgba(0, 0, 255, 0.25)\"}),this.lastSearchCorner1\u0026\u0026this.lastSearchCorner2\u0026\u0026(e.points.push({x:this.lastSearchCorner1.x,y:this.lastSearchCorner1.y,color:\"rgba(0, 0, 255, 0.5)\",label:[\"searchCorner1\",`z=${this.lastSegment?.z}`].join(`\n`)}),e.points.push({x:this.lastSearchCorner2.x,y:this.lastSearchCorner2.y,color:\"rgba(0, 0, 255, 0.5)\",label:[\"searchCorner2\",`z=${this.lastSegment?.z}`].join(`\n`)})),this.lastExpandedSegment\u0026\u0026e.rects.push({center:this.lastExpandedSegment.newNode.center,width:this.lastExpandedSegment.newNode.width,height:this.lastExpandedSegment.newNode.height,fill:\"purple\",label:`expandedSegment (z=${this.lastExpandedSegment.segment.z})`}),this.lastCollidingNodes)for(const n of this.lastCollidingNodes)e.rects.push({center:n.center,width:n.width,height:n.height,fill:\"rgba(255, 0, 0, 0.5)\"});return e}},vqn=class extends n7{findSegmentsWithAdjacentEmptySpaceSolver;expandEdgesToEmptySpaceSolver;outputNodes=[];passExpandedCounts=[];currentPassNodes=[];currentTargetNodes=[];currentPassIndex=0;expandedNodeIds=new Set;maxGapFillPasses=1;pipelineDef=[eh(\"findSegmentsWithAdjacentEmptySpaceSolver\",Iqn,e=\u003e[{allMeshNodes:e.currentPassNodes,targetMeshNodes:e.currentTargetNodes}],{onSolved:()=\u003e{}}),eh(\"expandEdgesToEmptySpaceSolver\",Qqn,e=\u003e[{inputMeshNodes:e.currentPassNodes,segmentsWithAdjacentEmptySpace:e.findSegmentsWithAdjacentEmptySpaceSolver.getOutput().segmentsWithAdjacentEmptySpace,boardVoid:e.inputProblem.boardVoid}],{onSolved:e=\u003e{e.completePass()}})];_setup(){this.outputNodes=[...this.inputProblem.meshNodes],this.currentPassNodes=[...this.inputProblem.meshNodes],this.currentTargetNodes=[...this.inputProblem.meshNodes],this.passExpandedCounts=[],this.currentPassIndex=0,this.expandedNodeIds.clear();const e=this.inputProblem.maxGapFillPasses;this.maxGapFillPasses=Number.isFinite(e)?Math.max(1,Math.floor(e)):1}completePass(){const e=(this.expandEdgesToEmptySpaceSolver?.getOutput().expandedSegments??[]).map(n=\u003en.newNode);for(const n of e)this.expandedNodeIds.add(n.capacityMeshNodeId);this.passExpandedCounts.push(e.length),this.currentPassNodes=[...this.currentPassNodes,...e],this.currentTargetNodes=e,this.outputNodes=this.currentPassNodes,e.length===0||this.currentPassIndex+1\u003e=this.maxGapFillPasses||(this.currentPassIndex+=1,this.currentPipelineStageIndex=-1)}getOutput(){return{outputNodes:this.outputNodes.length?this.outputNodes:this.inputProblem.meshNodes}}initialVisualize(){const e={title:\"GapFillSolverPipeline - Initial\",coordinateSystem:\"cartesian\",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]};for(const n of this.inputProblem.meshNodes)e.rects.push({center:n.center,width:n.width,height:n.height,stroke:\"rgba(0, 0, 0, 0.3)\",fill:\"rgba(100, 100, 100, 0.1)\",layer:`z${n.availableZ.join(\",\")}`,label:[`node ${n.capacityMeshNodeId}`,`z:${n.availableZ.join(\",\")}`].join(`\n`)});return e}finalVisualize(){const e={title:\"GapFillSolverPipeline - Final\",coordinateSystem:\"cartesian\",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]},{outputNodes:n}=this.getOutput();for(const o of n){const i=this.expandedNodeIds.has(o.capacityMeshNodeId);e.rects.push({center:o.center,width:o.width,height:o.height,stroke:i?\"rgba(0, 128, 0, 0.8)\":\"rgba(0, 0, 0, 0.3)\",fill:i?\"rgba(0, 200, 0, 0.3)\":\"rgba(100, 100, 100, 0.1)\",layer:`z${o.availableZ.join(\",\")}`,label:[`${i?\"[expanded] \":\"\"}node ${o.capacityMeshNodeId}`,`z:${o.availableZ.join(\",\")}`].join(`\n`)})}return e}};function b_t(t){const e=t.toLowerCase();if(e===\"top\")return-1e6;if(e===\"bottom\")return 1e6;const n=/^inner(\\d+)$/i.exec(e);return n?parseInt(n[1],10)||0:100+e.charCodeAt(0)}function g7e(t){const e=(function(c){return Array.from(new Set(c)).sort((l,u)=\u003e{const g=b_t(l),h=b_t(u);return g!==h?g-h:l.localeCompare(u)})})((t.obstacles??[]).flatMap(c=\u003ec.layers??[])),n=Math.max(1,t.layerCount||e.length||1),o=Array.from({length:n},(c,l)=\u003el===0?\"top\":l===n-1?\"bottom\":`inner${l}`),i=[],r=new Set,s=c=\u003e{const l=c.toLowerCase();r.has(l)||(r.add(l),i.push(c))};o.forEach(s),e.forEach(s);const a=i.slice(0,n),A=new Map;return a.forEach((c,l)=\u003eA.set(c.toLowerCase(),l)),i.slice(a.length).forEach(c=\u003e{const l=c.toLowerCase();A.set(l,(u=\u003e{if(a.length\u003c=1||u===\"top\")return 0;if(u===\"bottom\")return a.length-1;const g=/^inner(\\d+)$/i.exec(u);if(g){if(a.length\u003c=2)return a.length-1;const h=parseInt(g[1],10),d=a.length-2;return Math.min(d,Math.max(1,Number.isFinite(h)?h:1))}return 0})(l))}),{layerNames:a,zIndexByName:A}}function d7e(t,e){if(t.zLayers?.length)return Array.from(new Set(t.zLayers)).sort((o,i)=\u003eo-i);const n=(t.layers??[]).map(o=\u003ee.get(o.toLowerCase())).filter(o=\u003etypeof o==\"number\");return Array.from(new Set(n)).sort((o,i)=\u003eo-i)}function h7e(t){const e=t.width,n=t.height;return typeof e!=\"number\"||typeof n!=\"number\"?null:{x:t.center.x-e/2,y:t.center.y-n/2,width:e,height:n}}var Rse=t=\u003e{const e=[{fill:\"#dbeafe\",stroke:\"#3b82f6\"},{fill:\"#fef3c7\",stroke:\"#f59e0b\"},{fill:\"#d1fae5\",stroke:\"#10b981\"},{fill:\"#e9d5ff\",stroke:\"#a855f7\"},{fill:\"#fed7aa\",stroke:\"#f97316\"},{fill:\"#fecaca\",stroke:\"#ef4444\"}];return e[Math.min(...t)%e.length]},Fi=1e-9,S_t=(t,e)=\u003et\u003ee+Fi,Q_t=(t,e)=\u003et\u003ee-Fi,v_t=(t,e)=\u003et\u003ce-Fi,w_t=(t,e)=\u003et\u003ce+Fi;function Rz(t,e){return!(t.x+t.width\u003c=e.x+Fi||e.x+e.width\u003c=t.x+Fi||t.y+t.height\u003c=e.y+Fi||e.y+e.height\u003c=t.y+Fi)}function Tse(t,e){const n=e.x,o=e.x+e.width,i=e.y,r=e.y+e.height;if(t.x\u003e=n\u0026\u0026t.x\u003c=o\u0026\u0026t.y\u003e=i\u0026\u0026t.y\u003c=r)return Math.min(t.x-n,o-t.x,t.y-i,r-t.y);const s=t.x\u003cn?n-t.x:t.x\u003eo?t.x-o:0,a=t.y\u003ci?i-t.y:t.y\u003er?t.y-r:0;return s===0?a:a===0?s:Math.hypot(s,a)}function P_t(t,e){const n=Math.max(t[0],e[0]),o=Math.min(t[1],e[1]);return o\u003en+Fi?[n,o]:null}function M_t(t,e){if(!Rz(t,e))return[t];const n=P_t([t.x,t.x+t.width],[e.x,e.x+e.width]),o=P_t([t.y,t.y+t.height],[e.y,e.y+e.height]);if(!n||!o)return[t];const[i,r]=n,[s,a]=o,A=[];i\u003et.x+Fi\u0026\u0026A.push({x:t.x,y:t.y,width:i-t.x,height:t.height}),t.x+t.width\u003er+Fi\u0026\u0026A.push({x:r,y:t.y,width:t.x+t.width-r,height:t.height});const c=Math.max(0,r-i);return c\u003eFi\u0026\u0026s\u003et.y+Fi\u0026\u0026A.push({x:i,y:t.y,width:c,height:s-t.y}),c\u003eFi\u0026\u0026t.y+t.height\u003ea+Fi\u0026\u0026A.push({x:i,y:a,width:c,height:t.y+t.height-a}),A.filter(l=\u003el.width\u003eFi\u0026\u0026l.height\u003eFi)}var p7e=(t,e)=\u003e!e||e\u003c=0?t:{x:t.x-e,y:t.y-e,width:t.width+2*e,height:t.height+2*e},jF=t=\u003e({x:t.center.x-t.width/2,y:t.center.y-t.height/2,width:t.width,height:t.height}),D_t=t=\u003et.width*t.height,m7e=t=\u003e({...t,center:{...t.center},availableZ:[...t.availableZ]}),wqn=(t,e,n)=\u003e({...t,capacityMeshNodeId:n,center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,availableZ:[...t.availableZ],layer:`z${t.availableZ.join(\",\")}`}),_7e=t=\u003e!t._containsObstacle\u0026\u0026!t._containsTarget,N_t=(t,e)=\u003et.availableZ.length===1\u0026\u0026t.availableZ[0]===e,Pqn=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=Fi\u0026\u0026Math.abs(t.y-e.y)\u003c=Fi\u0026\u0026Math.abs(t.width-e.width)\u003c=Fi\u0026\u0026Math.abs(t.height-e.height)\u003c=Fi,R_t=(t,e)=\u003e{let n=[t];for(const o of e){if(n.length===0)return n;const i=[];for(const r of n)i.push(...M_t(r,o));n=i}return n},T_t=(t,e)=\u003eR_t(t,e).length===0,Mqn=class extends zA{constructor(e){super(),this.input=e}input;outputNodes=[];promotedNodeIds=new Set;residualNodeIds=new Set;_setup(){this.outputNodes=this.input.meshNodes.map(m7e),this.promotedNodeIds.clear(),this.residualNodeIds.clear()}_step(){this.outputNodes=this.processOuterLayerContainmentMerges(),this.solved=!0}processOuterLayerContainmentMerges(){const e=this.input.simpleRouteJson,n=Math.max(1,e.layerCount||1);if(n\u003c3)return this.input.meshNodes.map(m7e);const o=n-1,i=Math.max(e.minViaDiameter??0,e.minTraceWidth||0),r=this.input.meshNodes.map(m7e),s=this.buildObstaclesByLayer(n),a=r.filter(p=\u003e_7e(p)\u0026\u0026(N_t(p,0)||N_t(p,o))),A=r.filter(p=\u003e!a.includes(p)),c=new Map;c.set(0,r.filter(p=\u003e_7e(p)\u0026\u0026p.availableZ.includes(0)).map(jF)),c.set(o,r.filter(p=\u003e_7e(p)\u0026\u0026p.availableZ.includes(o)).map(jF));const l=[],u=[],g=a.filter(p=\u003ep.width+Fi\u003e=i\u0026\u0026p.height+Fi\u003e=i).sort((p,m)=\u003eD_t(jF(m))-D_t(jF(p)));for(const p of g){const m=p.availableZ[0],_=m===0?o:0,f=jF(p),I=c.get(_)??[];this.isTransitCompatibleAcrossIntermediateLayers({rect:f,fromZ:m,toZ:_,obstaclesByLayer:s})\u0026\u0026T_t(f,I)\u0026\u0026(l.push({...p,availableZ:[0,o],layer:`z0,${o}`}),u.push(f),this.promotedNodeIds.add(p.capacityMeshNodeId))}let h=0;const d=[];for(const p of a){if(this.promotedNodeIds.has(p.capacityMeshNodeId))continue;const m=jF(p),_=R_t(m,u);if(_.length===1\u0026\u0026Pqn(_[0],m))d.push(p);else for(const f of _){const I=wqn(p,f,`${p.capacityMeshNodeId}-outer-merge-${h++}`);d.push(I),this.residualNodeIds.add(I.capacityMeshNodeId)}}return[...A,...l,...d]}buildObstaclesByLayer(e){const n=Array.from({length:e},()=\u003e[]);for(const o of this.input.simpleRouteJson.obstacles??[]){const i=h7e(o);if(!i)continue;const r=p7e(i,this.input.obstacleClearance??0),s=d7e(o,this.input.zIndexByName);for(const a of s)a\u003c0||a\u003e=e||n[a].push({obstacle:o,rect:r})}return n}isTransitCompatibleAcrossIntermediateLayers(e){const{rect:n,fromZ:o,toZ:i,obstaclesByLayer:r}=e,s=Math.min(o,i),a=Math.max(o,i);if(a-s\u003c2)return!1;for(let A=s+1;A\u003ca;A++){const c=(r[A]??[]).filter(u=\u003eRz(u.rect,n));if(c.length===0||c.some(u=\u003e!u.obstacle.isCopperPour))return!1;const l=c.filter(u=\u003eu.obstacle.isCopperPour).map(u=\u003eu.rect);if(!T_t(n,l))return!1}return!0}getOutput(){return{outputNodes:this.outputNodes}}visualize(){return{title:\"OuterLayerContainmentMergeSolver\",coordinateSystem:\"cartesian\",rects:this.outputNodes.map(e=\u003e{const n=Rse(e.availableZ),o=this.promotedNodeIds.has(e.capacityMeshNodeId),i=this.residualNodeIds.has(e.capacityMeshNodeId);return{center:e.center,width:e.width,height:e.height,stroke:o?\"rgba(22, 163, 74, 0.95)\":i?\"rgba(37, 99, 235, 0.95)\":n.stroke,fill:e._containsObstacle?\"rgba(239, 68, 68, 0.35)\":o?\"rgba(34, 197, 94, 0.28)\":i?\"rgba(59, 130, 246, 0.18)\":n.fill,layer:`z${e.availableZ.join(\",\")}`,label:[`node ${e.capacityMeshNodeId}`,`z:${e.availableZ.join(\",\")}`].join(`\n`)}}),points:[],lines:[],texts:[]}}},kse=1e-9,Dqn=t=\u003eMath.abs(t.rect.x+t.rect.width/2-t.startX)\u003ckse\u0026\u0026Math.abs(t.rect.y+t.rect.height/2-t.startY)\u003ckse\u0026\u0026Math.abs(t.rect.width-t.initialW)\u003ckse\u0026\u0026Math.abs(t.rect.height-t.initialH)\u003ckse,Nqn=({rect:t,bounds:e})=\u003e({x:t.x,y:t.y,width:e.x+e.width-t.x,height:t.height}),Rqn=({rect:t,bounds:e})=\u003e({x:t.x,y:t.y,width:t.width,height:e.y+e.height-t.y}),Tqn=({rect:t,bounds:e})=\u003e({x:e.x,y:t.y,width:t.x-e.x,height:t.height}),kqn=({rect:t,bounds:e})=\u003e({x:t.x,y:e.y,width:t.width,height:t.y-e.y}),Fse=(t,e=1e-6)=\u003eMath.round(t/e)*e,Fqn=t=\u003e({x:Fse(t.x),y:Fse(t.y),width:Fse(t.width),height:Fse(t.height)});function Lqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.x+n.width-e.x;for(const a of o)if(e.y+e.height\u003ea.y+Fi\u0026\u0026a.y+a.height\u003ee.y+Fi){if(Q_t(a.x,e.x+e.width))r=Math.min(r,a.x-e.x);else if(a.x+a.width\u003ee.x+e.width-Fi\u0026\u0026a.x\u003ce.x+e.width+Fi)return 0}let s=Math.max(0,r-e.width);if(s\u003c=0)return 0;if(i!=null){const a=e.width,A=e.height;a\u003e=A\u0026\u0026(s=Math.min(s,i*A-a))}return Math.max(0,s)}function Hqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.y+n.height-e.y;for(const a of o)if(e.x+e.width\u003ea.x+Fi\u0026\u0026a.x+a.width\u003ee.x+Fi){if(Q_t(a.y,e.y+e.height))r=Math.min(r,a.y-e.y);else if(a.y+a.height\u003ee.y+e.height-Fi\u0026\u0026a.y\u003ce.y+e.height+Fi)return 0}let s=Math.max(0,r-e.height);if(s\u003c=0)return 0;if(i!=null){const a=e.width,A=e.height;A\u003e=a\u0026\u0026(s=Math.min(s,i*a-A))}return Math.max(0,s)}function Oqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.x;for(const a of o)if(e.y+e.height\u003ea.y+Fi\u0026\u0026a.y+a.height\u003ee.y+Fi){if(w_t(a.x+a.width,e.x))r=Math.max(r,a.x+a.width);else if(a.x\u003ce.x+Fi\u0026\u0026a.x+a.width\u003ee.x-Fi)return 0}let s=Math.max(0,e.x-r);if(s\u003c=0)return 0;if(i!=null){const a=e.width,A=e.height;a\u003e=A\u0026\u0026(s=Math.min(s,i*A-a))}return Math.max(0,s)}function Gqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.y;for(const a of o)if(e.x+e.width\u003ea.x+Fi\u0026\u0026a.x+a.width\u003ee.x+Fi){if(w_t(a.y+a.height,e.y))r=Math.max(r,a.y+a.height);else if(a.y\u003ce.y+Fi\u0026\u0026a.y+a.height\u003ee.y-Fi)return 0}let s=Math.max(0,e.y-r);if(s\u003c=0)return 0;if(i!=null){const a=e.width,A=e.height;A\u003e=a\u0026\u0026(s=Math.min(s,i*a-A))}return Math.max(0,s)}var k_t=t=\u003e{const{rect:e,seen:n,blockers:o}=t;n.has(e)||(n.add(e),o.push(e))};function F_t(t){const{startX:e,startY:n,gridSize:o,bounds:i,obsticalIndexByLayer:r,placedIndexByLayer:s,initialCellRatio:a,maxAspectRatio:A,minReq:c}=t,l=Math.max(1e-9,o*a),u=Math.max(l,c.width),g=Math.max(l,c.height),h=[],d=new Set,p=s.length,m=C=\u003e{const y=(x=\u003e{const{bounds:E,rect:B}=x,S=Math.max(E.x,B.x),Q=Math.max(E.y,B.y),w=Math.min(E.x+E.width,B.x+B.width),M=Math.min(E.y+E.height,B.y+B.height);return w\u003c=S+Fi||M\u003c=Q+Fi?null:{minX:S,minY:Q,maxX:w,maxY:M}})({bounds:i,rect:C});if(y)for(const x of t.zLayers){const E=r[x];if(E)for(const S of E.search(y))k_t({rect:S,seen:d,blockers:h});const B=s[x];if(B)for(const S of B.search(y))S.zLayers.length\u003e=p\u0026\u0026(Dqn({rect:S,startX:e,startY:n,initialW:u,initialH:g})||k_t({rect:S,seen:d,blockers:h}))}},_=[{ox:0,oy:0},{ox:-u,oy:0},{ox:0,oy:-g},{ox:-u,oy:-g},{ox:-u/2,oy:-g/2}];let f=null,I=0;e:for(const C of _){let y={x:e+C.ox,y:n+C.oy,width:u,height:g};if(m(y),v_t(y.x,i.x)||v_t(y.y,i.y)||S_t(y.x+y.width,i.x+i.width)||S_t(y.y+y.height,i.y+i.height))continue;for(const Q of h)if(Rz(y,Q))continue e;const x=1e-6,E=1e3;let B=!0,S=0;for(;B\u0026\u0026S\u003cE;){S++,B=!1;const Q={bounds:i,blockers:h,maxAspect:A};m(Nqn({rect:y,bounds:i}));const w=Lqn({...Q,r:y});w\u003ex\u0026\u0026(y={...y,width:y.width+w},m(y),B=!0),m(Rqn({rect:y,bounds:i}));const M=Hqn({...Q,r:y});M\u003ex\u0026\u0026(y={...y,height:y.height+M},m(y),B=!0),m(Tqn({rect:y,bounds:i}));const k=Oqn({...Q,r:y});k\u003ex\u0026\u0026(y={x:y.x-k,y:y.y,width:y.width+k,height:y.height},m(y),B=!0),m(kqn({rect:y,bounds:i}));const R=Gqn({...Q,r:y});R\u003ex\u0026\u0026(y={x:y.x,y:y.y-R,width:y.width,height:y.height+R},m(y),B=!0)}if(y.width+Fi\u003e=c.width\u0026\u0026y.height+Fi\u003e=c.height){const Q=y.width*y.height;Q\u003eI\u0026\u0026(f=Fqn(y),I=Q)}}return f}function Yqn(t){const e=Math.max(t.width,t.height);return[e/8,e/16,e/32]}function f7e(t){const e={minX:t.point.x,minY:t.point.y,maxX:t.point.x,maxY:t.point.y};for(let n=0;n\u003ct.layerCount;n++){const o=t.obstacleIndexByLayer[n],i=!!o\u0026\u0026o.collides(e),r=t.placedIndexByLayer[n],s=!!r\u0026\u0026r.collides(e);if(!i\u0026\u0026!s)return!1}return!0}function I7e(t){const{x:e,y:n,z:o,layerCount:i,minSpan:r,maxSpan:s,obstacleIndexByLayer:a,additionalBlockersByLayer:A}=t,c=h=\u003e{const d={minX:e,minY:n,maxX:e,maxY:n},p=a[h];return p\u0026\u0026p.collides(d)?!1:!(A?.[h]??[]).some(m=\u003e{return(f={x:e,y:n}).x\u003e=(_=m).x-Fi\u0026\u0026f.x\u003c=_.x+_.width+Fi\u0026\u0026f.y\u003e=_.y-Fi\u0026\u0026f.y\u003c=_.y+_.height+Fi;var _,f})};let l=o,u=o;for(;l-1\u003e=0\u0026\u0026c(l-1);)l--;for(;u+1\u003ci\u0026\u0026c(u+1);)u++;if(typeof s==\"number\"){const h=((d,p,m)=\u003eMath.max(p,Math.min(m,d)))(s,1,i);for(;u-l+1\u003eh;)o-l\u003eu-o?l++:u--}const g=[];for(let h=l;h\u003c=u;h++)g.push(h);return g.length\u003e=r?g:[]}var Uqn=(t,e=1e-6)=\u003eMath.round(t/e)*e,eB=(t,e=1e-6)=\u003eMath.round(t/e)*e,Kqn=t=\u003e\"minX\"in t?{x:t.minX,y:t.minY,width:t.maxX-t.minX,height:t.maxY-t.minY}:t;function VQ(t){const{lineStart:e,lineEnd:n,coveringIntervals:o,minSegmentLength:i}=t,r=eB(e),s=eB(n),a=o.map(g=\u003e{const h=eB(g.start),d=eB(g.end);return{start:Math.min(h,d),end:Math.max(h,d)}}).filter(g=\u003eg.end\u003eg.start+Fi);if(a.length===0)return[{start:r,end:s,center:(r+s)/2}];const A=[...a].sort((g,h)=\u003eg.start-h.start),c=[];let l={...A[0]};for(let g=1;g\u003cA.length;g++){const h=A[g];h.start\u003c=l.end+Fi?l.end=Math.max(l.end,h.end):(c.push(l),l={...h})}c.push(l);const u=[];if(c[0].start\u003er+Fi){const g=r,h=c[0].start;h-g\u003e=i\u0026\u0026u.push({start:g,end:h,center:(g+h)/2})}for(let g=0;g\u003cc.length-1;g++){const h=c[g].end,d=c[g+1].start;d-h\u003e=i\u0026\u0026u.push({start:h,end:d,center:(h+d)/2})}if(c[c.length-1].end\u003cs-Fi){const g=c[c.length-1].end,h=s;h-g\u003e=i\u0026\u0026u.push({start:g,end:h,center:(g+h)/2})}return u}function Vqn(t){const{bounds:e,minSize:n,layerCount:o,obstacleIndexByLayer:i,placedIndexByLayer:r,hardPlacedByLayer:s}=t,a=[],A=Math.max(.15*n,3*Fi),c=new Set,l=Array.from({length:o},(g,h)=\u003e[...i[h]?.all()??[],...s[h]??[]].map(Kqn));function u(g){const h=eB(g.x),d=eB(g.y),{z:p}=g,m=h,_=d;if(m\u003ce.x+Fi||_\u003ce.y+Fi||m\u003ee.x+e.width-Fi||_\u003ee.y+e.height-Fi||(function(E){return f7e({layerCount:o,obstacleIndexByLayer:i,placedIndexByLayer:r,point:E})})({x:m,y:_}))return;const f=l[p]??[];let I=Tse({x:m,y:_},e);for(const E of f)I=Math.min(I,Tse({x:m,y:_},E));const C=eB(I),y=(E=\u003e`${E.z}|${E.x.toFixed(6)}|${E.y.toFixed(6)}`)({x:m,y:_,z:p});if(c.has(y))return;c.add(y);const x=I7e({x:m,y:_,z:p,layerCount:o,minSpan:1,maxSpan:void 0,obstacleIndexByLayer:i,additionalBlockersByLayer:s});a.push({x:m,y:_,z:p,distance:C,zSpanLen:x.length,isEdgeSeed:!0})}for(let g=0;g\u003co;g++){const h=(l[g]??[]).map(w=\u003e({x:eB(w.x),y:eB(w.y),width:eB(w.width),height:eB(w.height)})),d=[{x:e.x+A,y:e.y+A},{x:e.x+e.width-A,y:e.y+A},{x:e.x+A,y:e.y+e.height-A},{x:e.x+e.width-A,y:e.y+e.height-A}];for(const w of d)u({x:w.x,y:w.y,z:g});const p=e.y+A,m=h.filter(w=\u003ew.y\u003c=p\u0026\u0026w.y+w.height\u003e=p).map(w=\u003e({start:Math.max(e.x,w.x),end:Math.min(e.x+e.width,w.x+w.width)})),_=VQ({lineStart:e.x+A,lineEnd:e.x+e.width-A,coveringIntervals:m,minSegmentLength:.5*n});for(const w of _){const M=w.end-w.start;M\u003e=n\u0026\u0026(u({x:w.center,y:p,z:g}),M\u003e1.5*n\u0026\u0026(u({x:w.start+.4*n,y:p,z:g}),u({x:w.end-.4*n,y:p,z:g})))}const f=e.y+e.height-A,I=h.filter(w=\u003ew.y\u003c=f\u0026\u0026w.y+w.height\u003e=f).map(w=\u003e({start:Math.max(e.x,w.x),end:Math.min(e.x+e.width,w.x+w.width)})),C=VQ({lineStart:e.x+A,lineEnd:e.x+e.width-A,coveringIntervals:I,minSegmentLength:.5*n});for(const w of C){const M=w.end-w.start;M\u003e=n\u0026\u0026(u({x:w.center,y:f,z:g}),M\u003e1.5*n\u0026\u0026(u({x:w.start+.4*n,y:f,z:g}),u({x:w.end-.4*n,y:f,z:g})))}const y=e.x+A,x=h.filter(w=\u003ew.x\u003c=y\u0026\u0026w.x+w.width\u003e=y).map(w=\u003e({start:Math.max(e.y,w.y),end:Math.min(e.y+e.height,w.y+w.height)})),E=VQ({lineStart:e.y+A,lineEnd:e.y+e.height-A,coveringIntervals:x,minSegmentLength:.5*n});for(const w of E){const M=w.end-w.start;M\u003e=n\u0026\u0026(u({x:y,y:w.center,z:g}),M\u003e1.5*n\u0026\u0026(u({x:y,y:w.start+.4*n,z:g}),u({x:y,y:w.end-.4*n,z:g})))}const B=e.x+e.width-A,S=h.filter(w=\u003ew.x\u003c=B\u0026\u0026w.x+w.width\u003e=B).map(w=\u003e({start:Math.max(e.y,w.y),end:Math.min(e.y+e.height,w.y+w.height)})),Q=VQ({lineStart:e.y+A,lineEnd:e.y+e.height-A,coveringIntervals:S,minSegmentLength:.5*n});for(const w of Q){const M=w.end-w.start;M\u003e=n\u0026\u0026(u({x:B,y:w.center,z:g}),M\u003e1.5*n\u0026\u0026(u({x:B,y:w.start+.4*n,z:g}),u({x:B,y:w.end-.4*n,z:g})))}for(const w of h){const M=w.x-A;if(M\u003ee.x+Fi\u0026\u0026M\u003ce.x+e.width-Fi){const O=h.filter(Y=\u003eY!==w\u0026\u0026Y.x\u003c=M\u0026\u0026Y.x+Y.width\u003e=M).map(Y=\u003e({start:Math.max(w.y,Y.y),end:Math.min(w.y+w.height,Y.y+Y.height)})),U=VQ({lineStart:w.y,lineEnd:w.y+w.height,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:M,y:Y.center,z:g})}const k=w.x+w.width+A;if(k\u003ee.x+Fi\u0026\u0026k\u003ce.x+e.width-Fi){const O=h.filter(Y=\u003eY!==w\u0026\u0026Y.x\u003c=k\u0026\u0026Y.x+Y.width\u003e=k).map(Y=\u003e({start:Math.max(w.y,Y.y),end:Math.min(w.y+w.height,Y.y+Y.height)})),U=VQ({lineStart:w.y,lineEnd:w.y+w.height,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:k,y:Y.center,z:g})}const R=w.y-A;if(R\u003ee.y+Fi\u0026\u0026R\u003ce.y+e.height-Fi){const O=h.filter(Y=\u003eY!==w\u0026\u0026Y.y\u003c=R\u0026\u0026Y.y+Y.height\u003e=R).map(Y=\u003e({start:Math.max(w.x,Y.x),end:Math.min(w.x+w.width,Y.x+Y.width)})),U=VQ({lineStart:w.x,lineEnd:w.x+w.width,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:Y.center,y:R,z:g})}const F=w.y+w.height+A;if(F\u003ee.y+Fi\u0026\u0026F\u003ce.y+e.height-Fi){const O=h.filter(Y=\u003eY!==w\u0026\u0026Y.y\u003c=F\u0026\u0026Y.y+Y.height\u003e=F).map(Y=\u003e({start:Math.max(w.x,Y.x),end:Math.min(w.x+w.width,Y.x+Y.width)})),U=VQ({lineStart:w.x,lineEnd:w.x+w.width,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:Y.center,y:F,z:g})}}}return a.sort((g,h)=\u003eh.zSpanLen-g.zSpanLen||h.distance-g.distance||g.z-h.z||g.x-h.x||g.y-h.y),a}function zqn(t){const e=Array.from({length:t.layerCount},()=\u003e[]);for(const n of t.placed)if(n.zLayers.length\u003e=t.layerCount)for(const o of n.zLayers)e[o].push(n.rect);return e}var $F=(t,e)=\u003e({...t,minX:t.x,minY:t.y,maxX:t.x+t.width,maxY:t.y+t.height,zLayers:e.zLayers});function L_t(t,e){const n=t.placed[e],{rect:o,zLayers:i}=n,r=t.layerCount,s=[],a=[];for(let c=0;c\u003ct.placed.length;c++){if(c===e)continue;const l=t.placed[c];if(l.zLayers.length\u003e=r)continue;const u=l.zLayers.filter(m=\u003ei.includes(m));if(u.length===0||!Rz(l.rect,o))continue;const g=M_t(l.rect,o);s.push(c);const h=l.zLayers.filter(m=\u003e!i.includes(m));h.length\u003e0\u0026\u0026a.push({rect:l.rect,zLayers:h});const d=Math.min(t.options.minSingle.width,t.options.minMulti.width),p=Math.min(t.options.minSingle.height,t.options.minMulti.height);for(const m of g)m.width+Fi\u003e=d\u0026\u0026m.height+Fi\u003e=p\u0026\u0026a.push({rect:m,zLayers:u.slice()})}const A=(c,l)=\u003ec.minX===l.minX\u0026\u0026c.minY===l.minY\u0026\u0026c.maxX===l.maxX\u0026\u0026c.maxY===l.maxY;s.sort((c,l)=\u003el-c).forEach(c=\u003e{const l=t.placed.splice(c,1)[0];if(t.placedIndexByLayer)for(const u of l.zLayers){const g=t.placedIndexByLayer[u];g\u0026\u0026g.remove($F(l.rect,{zLayers:l.zLayers}),A)}});for(const c of a){t.placed.push(c);for(const l of c.zLayers)if(t.placedIndexByLayer){const u=t.placedIndexByLayer[l];u\u0026\u0026u.insert($F(c.rect,{zLayers:c.zLayers.slice()}))}}}var Jqn=class extends zA{constructor(e){super(),this.input=e}input;srj;layerNames;layerCount;bounds;options;boardVoidRects;gridIndex;candidates;placed;placedIndexByLayer;hardPlacedByLayer;expansionIndex;edgeAnalysisDone;totalSeedsThisGrid;consumedSeedsThisGrid;_setup(){const e=this.input.simpleRouteJson,n=this.input.gridOptions??{},o=this.input.layerNames\u0026\u0026this.input.zIndexByName,{layerNames:i}=o?{layerNames:this.input.layerNames,zIndexByName:this.input.zIndexByName}:g7e({obstacles:e.obstacles,layerCount:e.layerCount}),r=Math.max(1,i.length,e.layerCount||1),s={x:e.bounds.minX,y:e.bounds.minY,width:e.bounds.maxX-e.bounds.minX,height:e.bounds.maxY-e.bounds.minY},a=Math.max(.01,e.minTraceWidth||.15),A={gridSizes:[],initialCellRatio:.2,maxAspectRatio:3,minSingle:{width:2*a,height:2*a},minMulti:{width:4*a,height:4*a,minLayers:Math.min(2,Math.max(1,e.layerCount||1))},preferMultiLayer:!0,maxMultiLayerSpan:void 0,...n,gridSizes:n.gridSizes??Yqn(s)};this.srj=e,this.layerNames=i,this.layerCount=r,this.bounds=s,this.options=A,this.boardVoidRects=this.input.boardVoidRects,this.gridIndex=0,this.candidates=[],this.placed=[],this.placedIndexByLayer=Array.from({length:r},()=\u003enew vz),this.hardPlacedByLayer=Array.from({length:r},()=\u003e[]),this.expansionIndex=0,this.edgeAnalysisDone=!1,this.totalSeedsThisGrid=0,this.consumedSeedsThisGrid=0,this.stats={gridIndex:this.gridIndex}}_step(){this._stepGrid(),this.stats.gridIndex=this.gridIndex,this.stats.placed=this.placed.length}_stepGrid(){const{gridSizes:e,initialCellRatio:n,maxAspectRatio:o,minSingle:i,minMulti:r,preferMultiLayer:s,maxMultiLayerSpan:a}=this.options,A=e[this.gridIndex];if(this.candidates.length===0\u0026\u0026this.consumedSeedsThisGrid===0\u0026\u0026(this.candidates=(function(h){const{bounds:d,gridSize:p,layerCount:m,obstacleIndexByLayer:_,placedIndexByLayer:f,hardPlacedByLayer:I}=h,C=new Map,y=Array.from({length:m},(E,B)=\u003e[..._[B]?.all()??[],...I[B]??[]]);for(let E=d.x;E\u003cd.x+d.width;E+=p)for(let B=d.y;B\u003cd.y+d.height;B+=p){if(Math.abs(E-d.x)\u003cFi||Math.abs(B-d.y)\u003cFi||E\u003ed.x+d.width-p-Fi||B\u003ed.y+d.height-p-Fi||f7e({layerCount:m,obstacleIndexByLayer:_,placedIndexByLayer:f,point:{x:E,y:B}}))continue;let S=[],Q=0;for(let Y=0;Y\u003cm;Y++){const W=I7e({x:E,y:B,z:Y,layerCount:m,minSpan:1,maxSpan:void 0,obstacleIndexByLayer:_,additionalBlockersByLayer:I});W.length\u003eS.length\u0026\u0026(S=W,Q=Y)}const w=S.length?S[Math.floor(S.length/2)]:Q,M=y[w]??[];let k=Tse({x:E,y:B},d);for(const Y of M)k=Math.min(k,Tse({x:E,y:B},Y));const R=Uqn(k),F=`${E.toFixed(6)}|${B.toFixed(6)}`,O={x:E,y:B,z:w,distance:R,zSpanLen:S.length},U=C.get(F);(!U||O.zSpanLen\u003e(U.zSpanLen??0)||O.zSpanLen===U.zSpanLen\u0026\u0026O.distance\u003eU.distance)\u0026\u0026C.set(F,O)}const x=Array.from(C.values());return x.sort((E,B)=\u003eB.zSpanLen-E.zSpanLen||B.distance-E.distance||E.z-B.z||E.x-B.x||E.y-B.y),x})({bounds:this.bounds,gridSize:A,layerCount:this.layerCount,hardPlacedByLayer:this.hardPlacedByLayer,obstacleIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer}),this.totalSeedsThisGrid=this.candidates.length,this.consumedSeedsThisGrid=0),this.consumedSeedsThisGrid\u003e=this.candidates.length){if(this.gridIndex+1\u003ce.length)return this.gridIndex+=1,this.candidates=[],this.totalSeedsThisGrid=0,void(this.consumedSeedsThisGrid=0);if(!this.edgeAnalysisDone){const h=Math.min(i.width,i.height);return this.candidates=Vqn({bounds:this.bounds,minSize:h,layerCount:this.layerCount,obstacleIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,hardPlacedByLayer:this.hardPlacedByLayer}),this.edgeAnalysisDone=!0,this.totalSeedsThisGrid=this.candidates.length,void(this.consumedSeedsThisGrid=0)}return this.candidates=[],this.solved=!0,void(this.expansionIndex=0)}const c=this.candidates[this.consumedSeedsThisGrid++];if(f7e({layerCount:this.layerCount,obstacleIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,point:{x:c.x,y:c.y}}))return;const l=I7e({x:c.x,y:c.y,z:c.z,layerCount:this.layerCount,minSpan:r.minLayers,maxSpan:a,obstacleIndexByLayer:this.input.obstacleIndexByLayer,additionalBlockersByLayer:this.hardPlacedByLayer}),u=[];l.length\u003e=r.minLayers\u0026\u0026u.push({kind:\"multi\",layers:l,minReq:{width:r.width,height:r.height}}),u.push({kind:\"single\",layers:[c.z],minReq:{width:i.width,height:i.height}});const g=s?u:u.reverse();for(const h of g){const d=F_t({startX:c.x,startY:c.y,gridSize:A,bounds:this.bounds,obsticalIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,initialCellRatio:n,maxAspectRatio:o,minReq:h.minReq,zLayers:h.layers});if(!d)continue;const p={rect:d,zLayers:[...h.layers]},m=this.placed.push(p)-1;for(const _ of h.layers){const f=this.placedIndexByLayer[_];f\u0026\u0026f.insert($F(d,{zLayers:p.zLayers}))}return L_t({layerCount:this.layerCount,placed:this.placed,options:this.options,placedIndexByLayer:this.placedIndexByLayer},m),void(this.hardPlacedByLayer=zqn({layerCount:this.layerCount,placed:this.placed}))}}computeProgress(){if(this.solved)return 1;const e=this.options.gridSizes.length,n=this.gridIndex/(e+1),o=Math.max(1,this.totalSeedsThisGrid),i=o?this.consumedSeedsThisGrid/o:1;return Math.min(.999,n+i*(1/(e+1)))}getOutput(){return{layerNames:this.layerNames,layerCount:this.layerCount,bounds:this.bounds,options:this.options,boardVoidRects:this.boardVoidRects,gridIndex:this.gridIndex,candidates:this.candidates,placed:this.placed,expansionIndex:this.expansionIndex,edgeAnalysisDone:this.edgeAnalysisDone,totalSeedsThisGrid:this.totalSeedsThisGrid,consumedSeedsThisGrid:this.consumedSeedsThisGrid,obstacles:this.srj.obstacles,obstacleClearance:this.input.obstacleClearance}}visualize(){const e=[],n=[],o=[],i=this.srj??this.input.simpleRouteJson,r=i.bounds.minX,s=i.bounds.maxX,a=i.bounds.minY,A=i.bounds.maxY;i.outline\u0026\u0026i.outline.length\u003e1?o.push({points:[...i.outline,i.outline[0]],strokeColor:\"#111827\",strokeWidth:.01,label:\"outline\"}):e.push({center:{x:(r+s)/2,y:(a+A)/2},width:s-r,height:A-a,fill:\"none\",stroke:\"#111827\",label:\"board\"});for(const c of i.obstacles??[])c.type!==\"rect\"\u0026\u0026c.type!==\"oval\"||e.push({center:{x:c.center.x,y:c.center.y},width:c.width,height:c.height,fill:\"#fee2e2\",stroke:\"#ef4444\",layer:\"obstacle\",label:\"obstacle\"});if(this.boardVoidRects){let c=null;if(i.outline\u0026\u0026i.outline.length\u003e0){const l=i.outline.map(d=\u003ed.x),u=i.outline.map(d=\u003ed.y),g=Math.min(...l),h=Math.min(...u);c={x:g,y:h,width:Math.max(...l)-g,height:Math.max(...u)-h}}for(const l of this.boardVoidRects)c\u0026\u0026!Rz(l,c)||e.push({center:{x:l.x+l.width/2,y:l.y+l.height/2},width:l.width,height:l.height,fill:\"rgba(0, 0, 0, 0.5)\",stroke:\"none\",label:\"void\"})}if(this.candidates?.length)for(const c of this.candidates)n.push({x:c.x,y:c.y,label:`z:${c.z}`});if(this.placed?.length)for(const c of this.placed){const l=Rse(c.zLayers);e.push({center:{x:c.rect.x+c.rect.width/2,y:c.rect.y+c.rect.height/2},width:c.rect.width,height:c.rect.height,fill:l.fill,stroke:l.stroke,layer:`z${c.zLayers.join(\",\")}`,label:`free\nz:${c.zLayers.join(\",\")}`})}return{title:\"RectDiff Grid\",coordinateSystem:\"cartesian\",rects:e,points:n,lines:o}}},Wqn=(t,e)=\u003et.minX===e.minX\u0026\u0026t.minY===e.minY\u0026\u0026t.maxX===e.maxX\u0026\u0026t.maxY===e.maxY,jqn=class extends zA{constructor(e){super(),this.input=e}input;placedIndexByLayer=[];_meshNodes=[];_setup(){this.stats={gridIndex:this.input.gridIndex},this.placedIndexByLayer=Array.from({length:this.input.layerCount},()=\u003enew vz);for(const e of this.input.placed)for(const n of e.zLayers){const o=this.placedIndexByLayer[n];o\u0026\u0026o.insert($F(e.rect,{zLayers:e.zLayers}))}}_step(){this.solved||(this._stepExpansion(),this.stats.gridIndex=this.input.gridIndex,this.stats.placed=this.input.placed.length,this.input.expansionIndex\u003e=this.input.placed.length\u0026\u0026this.finalizeIfNeeded())}_stepExpansion(){if(this.input.expansionIndex\u003e=this.input.placed.length)return;const e=this.input.expansionIndex,n=this.input.placed[e],o=this.input.options.gridSizes[this.input.options.gridSizes.length-1],i=n.rect,r=F_t({startX:n.rect.x+n.rect.width/2,startY:n.rect.y+n.rect.height/2,gridSize:o,bounds:this.input.bounds,obsticalIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,initialCellRatio:0,maxAspectRatio:null,minReq:{width:n.rect.width,height:n.rect.height},zLayers:n.zLayers});if(r){this.input.placed[e]={rect:r,zLayers:n.zLayers};for(const s of n.zLayers){const a=this.placedIndexByLayer[s];a\u0026\u0026(a.remove($F(i,{zLayers:n.zLayers}),Wqn),a.insert($F(r,{zLayers:n.zLayers})))}L_t({layerCount:this.input.layerCount,placed:this.input.placed,options:this.input.options,placedIndexByLayer:this.placedIndexByLayer},e)}this.input.expansionIndex+=1}finalizeIfNeeded(){if(this.solved)return;const e=(function(n){const o=n.placed.map(i=\u003e({minX:i.rect.x,minY:i.rect.y,maxX:i.rect.x+i.rect.width,maxY:i.rect.y+i.rect.height,zLayers:[...i.zLayers].sort((r,s)=\u003er-s)}));for(const i of n.obstacles??[]){const r=h7e(i);if(!r)continue;const s=n.obstacleClearance?{x:r.x-n.obstacleClearance,y:r.y-n.obstacleClearance,width:r.width+2*n.obstacleClearance,height:r.height+2*n.obstacleClearance}:r,a=i.zLayers?.length\u0026\u0026i.zLayers.length\u003e0?i.zLayers:d7e(i,n.zIndexByName);o.push({minX:s.x,minY:s.y,maxX:s.x+s.width,maxY:s.y+s.height,zLayers:[...new Set(a)].sort((A,c)=\u003eA-c),isObstacle:!0,connectedTo:[...i.connectedTo]})}return o})({placed:this.input.placed,obstacles:this.input.obstacles,zIndexByName:this.input.zIndexByName,boardVoidRects:this.input.boardVoidRects,obstacleClearance:this.input.obstacleClearance});this._meshNodes=(function(n){let o=0;const i=[];for(const r of n){const s=Math.max(0,r.maxX-r.minX),a=Math.max(0,r.maxY-r.minY);s\u003c=0||a\u003c=0||r.zLayers.length===0||i.push({capacityMeshNodeId:\"cmn_\"+o++,center:{x:(r.minX+r.maxX)/2,y:(r.minY+r.maxY)/2},width:s,height:a,layer:\"top\",availableZ:r.zLayers.slice(),_containsObstacle:r.isObstacle,_containsTarget:r.isObstacle,...r.connectedTo?.length?{_connectedTo:[...r.connectedTo]}:{}})}return i})(e),this.solved=!0}computeProgress(){if(this.solved)return 1;const e=this.input.options.gridSizes.length,n=e/(e+1),o=Math.max(1,this.input.placed.length),i=o?this.input.expansionIndex/o:1;return Math.min(.999,n+i*(1/(e+1)))}getOutput(){return this.solved?{meshNodes:this._meshNodes}:{meshNodes:this.input.placed.map((e,n)=\u003e({capacityMeshNodeId:`expand-preview-${n}`,center:{x:e.rect.x+e.rect.width/2,y:e.rect.y+e.rect.height/2},width:e.rect.width,height:e.rect.height,availableZ:e.zLayers.slice(),layer:`z${e.zLayers.join(\",\")}`}))}}visualize(){const e=[];for(const n of this.input.placed??[])e.push({center:{x:n.rect.x+n.rect.width/2,y:n.rect.y+n.rect.height/2},width:n.rect.width,height:n.rect.height,stroke:\"rgba(37, 99, 235, 0.9)\",fill:\"rgba(191, 219, 254, 0.5)\",layer:`z${n.zLayers.join(\",\")}`,label:`expanded\nz:${n.zLayers.join(\",\")}`});return{title:\"RectDiff Expansion\",coordinateSystem:\"cartesian\",rects:e,points:[],lines:[]}}},$qn=class extends n7{rectDiffSeedingSolver;rectDiffExpansionSolver;obstacleIndexByLayer;layerNames;zIndexByName;constructor(e){super(e);const{obstacleIndexByLayer:n,layerNames:o,zIndexByName:i}=(r=\u003e{const{srj:s,boardVoidRects:a,obstacleClearance:A}=r,{layerNames:c,zIndexByName:l}=g7e({obstacles:s.obstacles,layerCount:s.layerCount}),u=Math.max(1,c.length,s.layerCount||1),g=(s.bounds.minX,s.bounds.minY,s.bounds.maxX,s.bounds.minX,s.bounds.maxY,s.bounds.minY,Array.from({length:u},()=\u003enew vz)),h=(d,p)=\u003e{const m={...d,minX:d.x,minY:d.y,maxX:d.x+d.width,maxY:d.y+d.height,zLayers:[p]};g[p]?.insert(m)};if(s.outline\u0026\u0026s.outline.length\u003e2)for(const d of a??[])for(let p=0;p\u003cu;p++)h(d,p);for(const d of s.obstacles??[]){const p=h7e(d);if(!p)continue;const m=p7e(p,A??0),_=d7e(d,l),f=_.filter(I=\u003eI\u003c0||I\u003e=u);if(f.length)throw new Error(`RectDiff: obstacle uses z-layer indices ${f.join(\",\")} outside 0-${u-1}`);d.zLayers\u0026\u0026d.zLayers.length!==0||!_.length||(d.zLayers=_);for(const I of _)h(m,I)}return{obstacleIndexByLayer:g,layerNames:c,zIndexByName:l}})({srj:{bounds:e.bounds,obstacles:e.obstacles,connections:e.connections,outline:e.outline?.outline,layerCount:e.layerCount,minTraceWidth:e.minTraceWidth},boardVoidRects:e.boardVoidRects,obstacleClearance:e.obstacleClearance});this.obstacleIndexByLayer=n,this.layerNames=e.layerNames??o,this.zIndexByName=e.zIndexByName??i}pipelineDef=[eh(\"rectDiffSeedingSolver\",Jqn,e=\u003e[{simpleRouteJson:{bounds:e.inputProblem.bounds,obstacles:e.inputProblem.obstacles,connections:e.inputProblem.connections,outline:e.inputProblem.outline?.outline,layerCount:e.inputProblem.layerCount,minTraceWidth:e.inputProblem.minTraceWidth},gridOptions:e.inputProblem.gridOptions,obstacleIndexByLayer:e.obstacleIndexByLayer,boardVoidRects:e.inputProblem.boardVoidRects,layerNames:e.layerNames,zIndexByName:e.zIndexByName,obstacleClearance:e.inputProblem.obstacleClearance}]),eh(\"rectDiffExpansionSolver\",jqn,e=\u003e{const n=e.rectDiffSeedingSolver?.getOutput();if(!n)throw new Error(\"RectDiffSeedingSolver did not produce output\");return[{layerNames:n.layerNames??[],boardVoidRects:e.inputProblem.boardVoidRects??[],layerCount:e.inputProblem.layerCount,bounds:n.bounds,candidates:n.candidates,consumedSeedsThisGrid:n.placed.length,totalSeedsThisGrid:n.candidates.length,placed:n.placed,edgeAnalysisDone:n.edgeAnalysisDone,gridIndex:n.gridIndex,expansionIndex:n.expansionIndex,obstacleIndexByLayer:e.obstacleIndexByLayer,options:n.options,zIndexByName:e.zIndexByName,layerNamesCanonical:e.layerNames,obstacles:e.inputProblem.obstacles,obstacleClearance:e.inputProblem.obstacleClearance}]})];getConstructorParams(){return[this.inputProblem]}getOutput(){return this.rectDiffExpansionSolver?this.rectDiffExpansionSolver.getOutput():this.rectDiffSeedingSolver?{meshNodes:this.rectDiffSeedingSolver.getOutput().placed.map((e,n)=\u003e({capacityMeshNodeId:`grid-${n}`,center:{x:e.rect.x+e.rect.width/2,y:e.rect.y+e.rect.height/2},width:e.rect.width,height:e.rect.height,availableZ:e.zLayers,layer:`z${e.zLayers.join(\",\")}`}))}:{meshNodes:[]}}visualize(){return this.rectDiffExpansionSolver?this.rectDiffExpansionSolver.visualize():this.rectDiffSeedingSolver?this.rectDiffSeedingSolver.visualize():{title:\"RectDiff Grid Pipeline\",coordinateSystem:\"cartesian\",rects:[],points:[],lines:[]}}},H_t=t=\u003e{const{srj:e,clearance:n}=t,o=n??0;if(o\u003c=0)return{title:\"Obstacle Clearance\",coordinateSystem:\"cartesian\",rects:[]};const i=[];for(const r of e.obstacles??[]){if(r.type!==\"rect\"\u0026\u0026r.type!==\"oval\")continue;const s={x:r.center.x-r.width/2-o,y:r.center.y-r.height/2-o,width:r.width+2*o,height:r.height+2*o};i.push({center:{x:s.x+s.width/2,y:s.y+s.height/2},width:s.width,height:s.height,stroke:\"rgba(202, 138, 4, 0.9)\",fill:\"rgba(234, 179, 8, 0.15)\",layer:\"obstacle-clearance\",label:`clearance\nz:${(r.zLayers??[]).join(\",\")||\"all\"}`})}return{title:\"Obstacle Clearance\",coordinateSystem:\"cartesian\",rects:i}};function qqn(t,e,n={}){if(!e||e.length\u003c3)return[];const o=e.length\u003e120,i=o?(function(h,d){const p=f=\u003eMath.round(f/d)*d,m=new Set,_=[];for(const f of h){const I=p(f.x),C=p(f.y),y=`${I},${C}`;m.has(y)||(m.add(y),_.push({x:I,y:C}))}return _})(e,Math.max(t.width,t.height)/120):e,r=new Set([t.x,t.x+t.width]),s=new Set([t.y,t.y+t.height]);for(const h of i)r.add(h.x),s.add(h.y);(function({polygon:h,xs:d,ys:p,minGridSize:m}){const _=[];let f=0;for(let C=0;C\u003ch.length;C++){const y=h[C],x=h[(C+1)%h.length],E=Math.abs(x.x-y.x),B=Math.abs(x.y-y.y);if(E\u003c=Fi||B\u003c=Fi)continue;const S=Math.max(E,B);_.push({start:y,end:x,span:S}),f+=S}if(_.length===0)return;const I=Math.max(m,f/256);for(const{start:C,end:y,span:x}of _){const E=Math.max(1,Math.ceil(x/I));for(let B=1;B\u003cE;B++){const S=B/E;d.add(C.x+(y.x-C.x)*S),p.add(C.y+(y.y-C.y)*S)}}})({polygon:i,xs:r,ys:s,minGridSize:Math.max(Fi,n.minGridSize??Math.max(t.width,t.height)/256)});const a=Array.from(r).sort((h,d)=\u003eh-d),A=Array.from(s).sort((h,d)=\u003eh-d),c=[];for(let h=0;h\u003ca.length-1;h++)for(let d=0;d\u003cA.length-1;d++){const p=a[h],m=a[h+1],_=A[d],f=A[d+1],I=(p+m)/2,C=(_+f)/2;I\u003e=t.x\u0026\u0026I\u003c=t.x+t.width\u0026\u0026C\u003e=t.y\u0026\u0026C\u003c=t.y+t.height\u0026\u0026((o?[{x:I,y:C}]:[{x:I,y:C},{x:p,y:_},{x:m,y:_},{x:p,y:f},{x:m,y:f}]).every(y=\u003eMz(y,e))||c.push({x:p,y:_,width:m-p,height:f-_}))}const l=[];c.sort((h,d)=\u003eMath.abs(h.y-d.y)\u003eFi?h.y-d.y:h.x-d.x);let u=null;for(const h of c){if(!u){u=h;continue}const d=Math.abs(u.y-h.y)\u003cFi,p=Math.abs(u.height-h.height)\u003cFi,m=Math.abs(u.x+u.width-h.x)\u003cFi;d\u0026\u0026p\u0026\u0026m?u.width+=h.width:(l.push(u),u=h)}u\u0026\u0026l.push(u),l.sort((h,d)=\u003eMath.abs(h.x-d.x)\u003eFi?h.x-d.x:h.y-d.y);const g=[];u=null;for(const h of l){if(!u){u=h;continue}const d=Math.abs(u.x-h.x)\u003cFi,p=Math.abs(u.width-h.width)\u003cFi,m=Math.abs(u.y+u.height-h.y)\u003cFi;d\u0026\u0026p\u0026\u0026m?u.height+=h.height:(g.push(u),u=h)}return u\u0026\u0026g.push(u),g}var qF=class extends n7{rectDiffGridSolverPipeline;gapFillSolver;outerLayerContainmentMergeSolver;boardVoidRects;zIndexByName;layerNames;pipelineDef=[eh(\"rectDiffGridSolverPipeline\",$qn,e=\u003e[{bounds:e.inputProblem.simpleRouteJson.bounds,obstacles:e.inputProblem.simpleRouteJson.obstacles,connections:e.inputProblem.simpleRouteJson.connections,outline:e.inputProblem.simpleRouteJson.outline?{outline:e.inputProblem.simpleRouteJson.outline}:void 0,layerCount:e.inputProblem.simpleRouteJson.layerCount,gridOptions:e.inputProblem.gridOptions,boardVoidRects:e.boardVoidRects,layerNames:e.layerNames,zIndexByName:e.zIndexByName,minTraceWidth:e.inputProblem.simpleRouteJson.minTraceWidth,obstacleClearance:e.inputProblem.obstacleClearance}]),eh(\"gapFillSolver\",vqn,e=\u003e[{meshNodes:e.rectDiffGridSolverPipeline?.getOutput().meshNodes??[],boardVoid:{boardVoidRects:e.boardVoidRects||[],layerCount:e.inputProblem.simpleRouteJson.layerCount||0},maxGapFillPasses:e.inputProblem.maxGapFillPasses}]),eh(\"outerLayerContainmentMergeSolver\",Mqn,e=\u003e[{meshNodes:e.gapFillSolver?.getOutput().outputNodes??e.rectDiffGridSolverPipeline?.getOutput().meshNodes??[],simpleRouteJson:e.inputProblem.simpleRouteJson,zIndexByName:e.zIndexByName??new Map,obstacleClearance:e.inputProblem.obstacleClearance}])];_setup(){const{zIndexByName:e,layerNames:n}=g7e({obstacles:this.inputProblem.simpleRouteJson.obstacles,layerCount:this.inputProblem.simpleRouteJson.layerCount});if(this.zIndexByName=e,this.layerNames=n,this.inputProblem.simpleRouteJson.outline){const o=Math.max(0,this.inputProblem.simpleRouteJson.minBoardEdgeClearance??0);this.boardVoidRects=qqn({x:this.inputProblem.simpleRouteJson.bounds.minX-o,y:this.inputProblem.simpleRouteJson.bounds.minY-o,width:this.inputProblem.simpleRouteJson.bounds.maxX-this.inputProblem.simpleRouteJson.bounds.minX+2*o,height:this.inputProblem.simpleRouteJson.bounds.maxY-this.inputProblem.simpleRouteJson.bounds.minY+2*o},this.inputProblem.simpleRouteJson.outline??[],{minGridSize:this.inputProblem.simpleRouteJson.minTraceWidth}).map(i=\u003ep7e(i,o))}}getConstructorParams(){return[this.inputProblem]}getOutput(){const e=this.outerLayerContainmentMergeSolver?.getOutput();if(e)return{meshNodes:e.outputNodes};const n=this.gapFillSolver?.getOutput();return n?{meshNodes:n.outputNodes}:this.rectDiffGridSolverPipeline?this.rectDiffGridSolverPipeline.getOutput():{meshNodes:[]}}initialVisualize(){const e=(function(i,r=\"RectDiff\"){const s=[],a=[],A=i.bounds.minX,c=i.bounds.maxX,l=i.bounds.minY,u=i.bounds.maxY;i.outline\u0026\u0026i.outline.length\u003e1?a.push({points:[...i.outline,i.outline[0]],strokeColor:\"#111827\",strokeWidth:.01,label:\"outline\"}):s.push({center:{x:(A+c)/2,y:(l+u)/2},width:c-A,height:u-l,fill:\"none\",stroke:\"#111827\",label:\"board\"});for(const g of i.obstacles??[])if(g.type===\"rect\"||g.type===\"oval\"){const h=(g.zLayers??[]).join(\",\")||\"all\";s.push({center:{x:g.center.x,y:g.center.y},width:g.width,height:g.height,fill:\"#fee2e2\",stroke:\"#ef4444\",layer:\"obstacle\",label:`obstacle\nz:${h}`})}return{title:r,coordinateSystem:\"cartesian\",rects:s,points:[],lines:a}})(this.inputProblem.simpleRouteJson,\"RectDiffPipeline - Initial\"),n=H_t({srj:this.inputProblem.simpleRouteJson,clearance:this.inputProblem.obstacleClearance}),o={rects:(this.rectDiffGridSolverPipeline?.getOutput().meshNodes??[]).map(i=\u003e({center:i.center,width:i.width,height:i.height,stroke:\"rgba(0, 0, 0, 0.3)\",fill:\"rgba(100, 100, 100, 0.1)\",layer:`z${i.availableZ.join(\",\")}`,label:[`node ${i.capacityMeshNodeId}`,`z:${i.availableZ.join(\",\")}`].join(`\n`)}))};return MD(MD(e,n),o)}finalVisualize(){return(({srj:e,meshNodes:n,obstacleClearance:o})=\u003e{const i=(({srj:a})=\u003e({title:\"SimpleRoute Outline\",coordinateSystem:\"cartesian\",lines:a.outline\u0026\u0026a.outline.length\u003e1?[{points:[...a.outline,a.outline[0]],strokeColor:\"#111827\",strokeWidth:.1,label:\"outline\"}]:[{points:[{x:a.bounds.minX,y:a.bounds.minY},{x:a.bounds.maxX,y:a.bounds.minY},{x:a.bounds.maxX,y:a.bounds.maxY},{x:a.bounds.minX,y:a.bounds.maxY},{x:a.bounds.minX,y:a.bounds.minY}],strokeColor:\"#111827\",strokeWidth:.1,label:\"bounds\"}]}))({srj:e}),r=H_t({srj:e,clearance:o}),s=n.map(a=\u003e({center:a.center,width:a.width,height:a.height,stroke:Rse(a.availableZ).stroke,fill:a._containsObstacle?\"#fca5a5\":Rse(a.availableZ).fill,layer:`z${a.availableZ.join(\",\")}`,label:`node ${a.capacityMeshNodeId}\nz:${a.availableZ.join(\",\")}`}));return MD(MD({title:\"RectDiffPipeline - Final\",coordinateSystem:\"cartesian\",rects:s,lines:[],points:[],texts:[]},i),r)})({srj:this.inputProblem.simpleRouteJson,meshNodes:this.getOutput().meshNodes,obstacleClearance:this.inputProblem.obstacleClearance})}},Xqn=class{cacheHitsByPrefix={};cacheMissesByPrefix={};isSyncCache=!0;cacheHits=0;cacheMisses=0;cache=new Map;getCachedSolutionSync(e){const n=this.cache.get(e);if(n!==void 0){this.cacheHits++;const o=e.split(\":\")[0];return this.cacheHitsByPrefix[o]=(this.cacheHitsByPrefix[o]||0)+1,structuredClone(n)}{this.cacheMisses++;const o=e.split(\":\")[0];return void(this.cacheMissesByPrefix[o]=(this.cacheMissesByPrefix[o]||0)+1)}}async getCachedSolution(e){return this.getCachedSolutionSync(e)}setCachedSolutionSync(e,n){this.cache.set(e,structuredClone(n))}async setCachedSolution(e,n){this.setCachedSolutionSync(e,n)}clearCache(){this.cache.clear(),this.cacheHits=0,this.cacheMisses=0,this.cacheHitsByPrefix={},this.cacheMissesByPrefix={}}getAllCacheKeys(){return Array.from(this.cache.keys())}},C7e=\"tscircuit_autorouter_cache_\",Zqn=class{isSyncCache=!0;cacheHits=0;cacheMisses=0;cacheHitsByPrefix={};cacheMissesByPrefix={};constructor(){}getKey(e){return`${C7e}${e}`}getCachedSolutionSync(e){if(typeof localStorage\u003e\"u\")return;const n=this.getKey(e);try{const o=localStorage.getItem(n);if(o!==null){const i=JSON.parse(o);this.cacheHits++;const r=e.split(\":\")[0];return this.cacheHitsByPrefix[r]=(this.cacheHitsByPrefix[r]||0)+1,i}{this.cacheMisses++;const i=e.split(\":\")[0];return void(this.cacheMissesByPrefix[i]=(this.cacheMissesByPrefix[i]||0)+1)}}catch(o){console.error(`Error getting cached solution sync for ${n}:`,o),this.cacheMisses++;const i=e.split(\":\")[0];return void(this.cacheMissesByPrefix[i]=(this.cacheMissesByPrefix[i]||0)+1)}}async getCachedSolution(e){return this.getCachedSolutionSync(e)}setCachedSolutionSync(e,n){if(typeof localStorage\u003e\"u\")return;const o=this.getKey(e);try{const i=JSON.stringify(n);localStorage.setItem(o,i)}catch(i){console.error(`Error setting cached solution sync for ${o}:`,i),i instanceof DOMException\u0026\u0026(i.name===\"QuotaExceededError\"||i.name===\"NS_ERROR_DOM_QUOTA_REACHED\")\u0026\u0026console.warn(`LocalStorage quota exceeded. Failed to cache solution for ${o}. Consider clearing the cache.`)}}async setCachedSolution(e,n){this.setCachedSolutionSync(e,n)}clearCache(){if(typeof localStorage\u003c\"u\")try{const e=[];for(let n=0;n\u003clocalStorage.length;n++){const o=localStorage.key(n);o?.startsWith(C7e)\u0026\u0026e.push(o)}e.forEach(n=\u003elocalStorage.removeItem(n)),console.log(`Cleared ${e.length} items from LocalStorage cache.`)}catch(e){console.error(\"Error clearing LocalStorage cache:\",e)}finally{this.cacheHits=0,this.cacheMisses=0,this.cacheHitsByPrefix={},this.cacheMissesByPrefix={}}}getAllCacheKeys(){const e=[];for(let n=0;n\u003c1e4;n++){const o=localStorage.key(n);if(!o)break;o.includes(C7e)\u0026\u0026e.push(o)}return e}};function eXn(){return globalThis.TSCIRCUIT_AUTOROUTER_LOCAL_STORAGE_CACHE||Lse(),globalThis.TSCIRCUIT_AUTOROUTER_LOCAL_STORAGE_CACHE}function tB(){return globalThis.TSCIRCUIT_AUTOROUTER_IN_MEMORY_CACHE||Lse(),globalThis.TSCIRCUIT_AUTOROUTER_IN_MEMORY_CACHE}function Lse(){globalThis.TSCIRCUIT_AUTOROUTER_LOCAL_STORAGE_CACHE??=new Zqn,globalThis.TSCIRCUIT_AUTOROUTER_IN_MEMORY_CACHE??=new Xqn}function Tz(t){const e={minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2};for(const n of t.portPoints)n.x\u003ce.minX\u0026\u0026(e.minX=n.x),n.x\u003ee.maxX\u0026\u0026(e.maxX=n.x),n.y\u003ce.minY\u0026\u0026(e.minY=n.y),n.y\u003ee.maxY\u0026\u0026(e.maxY=n.y);return e}var O_t=(t,e)=\u003et\u003c=e?[t,e]:[e,t],y7e=t=\u003e`${t[0]}|${t[1]}`,tXn=({portPointId:t,currentNodeId:e,inputNodes:n})=\u003e{let o;if(t)for(const s of n){const a=s.portPoints.find(A=\u003eA.portPointId===t);if(a?.connectionNodeIds){o=a.connectionNodeIds;break}}if(!o||o.length!==2)return[e,e];const[i,r]=o;return i\u0026\u0026r?O_t(i,r):[e,e]},x7e=1e-6,zQ=(t,e)=\u003eMath.abs(t-e)\u003c=x7e,nXn=({nodeAId:t,nodeBId:e,nodeBounds:n})=\u003e{if(t===e)return null;const o=n.get(t),i=n.get(e);if(!o||!i)return null;const r=O_t(t,e),s=y7e(r);if(zQ(o.maxX,i.minX)||zQ(i.maxX,o.minX)){const a=Math.max(o.minY,i.minY),A=Math.min(o.maxY,i.maxY),c=A-a;if(c\u003ex7e){const l=zQ(o.maxX,i.minX)?o.maxX:o.minX;return{ownerNodeIds:r,ownerPairKey:s,orientation:\"vertical\",x1:l,y1:a,x2:l,y2:A,center:{x:l,y:(a+A)/2},length:c,nodeSideByOwnerId:zQ(o.maxX,i.minX)?{[t]:\"right\",[e]:\"left\"}:{[t]:\"left\",[e]:\"right\"}}}}if(zQ(o.maxY,i.minY)||zQ(i.maxY,o.minY)){const a=Math.max(o.minX,i.minX),A=Math.min(o.maxX,i.maxX),c=A-a;if(c\u003ex7e){const l=zQ(o.maxY,i.minY)?o.maxY:o.minY;return{ownerNodeIds:r,ownerPairKey:s,orientation:\"horizontal\",x1:a,y1:l,x2:A,y2:l,center:{x:(a+A)/2,y:l},length:c,nodeSideByOwnerId:zQ(o.maxY,i.minY)?{[t]:\"top\",[e]:\"bottom\"}:{[t]:\"bottom\",[e]:\"top\"}}}}return null},oXn=({portPoint:t,ownerNodeIds:e,inputNodes:n})=\u003e{for(const o of e){const i=n.find(s=\u003es.capacityMeshNodeId===o);if(i?._containsTarget||i?.portPoints.find(s=\u003es.portPointId===t.portPointId)?.connectionNodeIds?.some(s=\u003en.find(a=\u003ea.capacityMeshNodeId===s)?._containsTarget))return!0}return!1},XF=1e-6,kz=class extends zA{constructor(e){super(),this.input=e;for(const o of e.nodeWithPortPoints)this.mapOfNodeIdToBounds.set(o.capacityMeshNodeId,Tz(o));const n=new Map;for(const o of e.nodeWithPortPoints)for(const i of o.portPoints){if(!i.portPointId)continue;const r=tXn({portPointId:i.portPointId,currentNodeId:o.capacityMeshNodeId,inputNodes:e.inputNodesWithPortPoints}),s=y7e(r),a=this.mapOfOwnerPairToPortPoints.get(s)??[];a.some(A=\u003eA.portPointId\u0026\u0026A.portPointId===i.portPointId)||a.push({...i,ownerNodeIds:r,ownerPairKey:s}),this.mapOfOwnerPairToPortPoints.set(s,a),n.set(s,r)}this.mapOfOwnerPairToSharedEdge=(({ownerPairs:o,nodeBounds:i})=\u003e{const r=new Map;for(const s of o){const[a,A]=s;if(a===A)continue;const c=nXn({nodeAId:a,nodeBId:A,nodeBounds:i});c\u0026\u0026r.set(y7e(s),c)}return r})({ownerPairs:Array.from(n.values()),nodeBounds:this.mapOfNodeIdToBounds}),this.ownerPairsToProcess=Array.from(this.mapOfOwnerPairToSharedEdge.keys()),this.ownerPairsToProcess.sort((o,i)=\u003e{const r=this.mapOfOwnerPairToSharedEdge.get(o),s=this.mapOfOwnerPairToSharedEdge.get(i);return r.center.x-s.center.x||r.center.y-s.center.y})}input;getSolverName(){return\"UniformPortDistributionSolver\"}mapOfNodeIdToBounds=new Map;mapOfOwnerPairToPortPoints=new Map;mapOfOwnerPairToSharedEdge=new Map;ownerPairsToProcess=[];currentOwnerPairBeingProcessed=null;redistributedNodes=[];step(){if(this.ownerPairsToProcess.length===0)return this.rebuildNodes(),void(this.solved=!0);this.currentOwnerPairBeingProcessed=this.ownerPairsToProcess.shift();const e=this.currentOwnerPairBeingProcessed,n=this.mapOfOwnerPairToSharedEdge.get(e);if(!n||(({sharedEdge:s,obstacles:a})=\u003e{for(const A of a){const c=A.center.x-A.width/2,l=A.center.x+A.width/2,u=A.center.y-A.height/2,g=A.center.y+A.height/2;if(s.orientation!==\"vertical\"){if(Math.abs(s.y1-u)\u003cXF||Math.abs(s.y1-g)\u003cXF){const h=Math.max(s.x1,c);if(Math.min(s.x2,l)-h\u003eXF)return!0}}else if(Math.abs(s.x1-c)\u003cXF||Math.abs(s.x1-l)\u003cXF){const h=Math.max(s.y1,u);if(Math.min(s.y2,g)-h\u003eXF)return!0}}return!1})({sharedEdge:n,obstacles:this.input.obstacles}))return;const o=this.mapOfOwnerPairToPortPoints.get(e)??[],i=[];for(const s of o)oXn({portPoint:s,ownerNodeIds:s.ownerNodeIds,inputNodes:this.input.inputNodesWithPortPoints})||i.push(s);const r=(({sharedEdge:s,portPoints:a})=\u003e{if(a.length===0)return[];const A=new Map;for(const u of a){const g=u.z??0,h=A.get(g)??[];h.push(u),A.set(g,h)}const c=[],l=Array.from(A.keys()).sort((u,g)=\u003eu-g);for(const u of l){const g=A.get(u),h=g.length;g.sort((d,p)=\u003es.orientation===\"horizontal\"?d.x-p.x:d.y-p.y);for(let d=0;d\u003ch;d++){const p=(2*d+1)/(2*h),m=s.orientation===\"horizontal\"?s.x1+s.length*p:s.x1,_=s.orientation===\"horizontal\"?s.y1:s.y1+s.length*p;c.push({...g[d],x:m,y:_})}}return c})({sharedEdge:n,portPoints:i});this.mapOfOwnerPairToPortPoints.set(e,r)}rebuildNodes(){const e=new Map;for(const o of this.mapOfOwnerPairToPortPoints.values())for(const i of o)i.portPointId\u0026\u0026e.set(i.portPointId,{x:i.x,y:i.y});const n=o=\u003e{if(o.portPointId\u0026\u0026e.has(o.portPointId)){const i=e.get(o.portPointId);return{...o,x:i.x,y:i.y}}return o};this.redistributedNodes=this.input.nodeWithPortPoints.map(o=\u003e({...o,portPoints:o.portPoints.map(n),portPointsInPairs:o.portPointsInPairs?.map(([i,r])=\u003e[n(i),n(r)])}))}getOutput=()=\u003ethis.redistributedNodes;visualize(){return(({obstacles:e,nodeWithPortPoints:n,mapOfOwnerPairToPortPoints:o,mapOfOwnerPairToSharedEdge:i,ownerPairsToProcess:r,currentOwnerPairBeingProcessed:s,mapOfNodeIdToBounds:a})=\u003e{const A=e.filter(p=\u003e!p.isCopperPour).map(p=\u003e({...p,fill:\"#ec000070\"})),c=[],l=[],u=new Map,g=new Map,h=new Map,d=p=\u003ep.portPointId?u.get(p.portPointId)??{x:p.x,y:p.y}:{x:p.x,y:p.y};for(const p of n)for(const m of p.portPoints)m.portPointId\u0026\u0026(u.set(m.portPointId,{x:m.x,y:m.y}),g.set(m.portPointId,m.z??0));for(const p of o.values())for(const m of p)m.portPointId\u0026\u0026(u.set(m.portPointId,{x:m.x,y:m.y}),g.set(m.portPointId,m.z??0),h.set(m.portPointId,`${m.ownerNodeIds[0]}\u0026${m.ownerNodeIds[1]}`));n.forEach(p=\u003e{const m=a.get(p.capacityMeshNodeId);if(m){const _=(m.minX+m.maxX)/2,f=(m.minY+m.maxY)/2,I=m.maxX-m.minX,C=m.maxY-m.minY;A.push({center:{x:_,y:f},width:I,height:C,fill:\"#00000030\",label:`${p.capacityMeshNodeId}`})}p.portPoints.forEach(_=\u003e{if(!_.portPointId)return;const f=u.get(_.portPointId),I=g.get(_.portPointId)??0,C=h.get(_.portPointId)??`${p.capacityMeshNodeId}\u0026${p.capacityMeshNodeId}`;c.push({x:f.x,y:f.y,label:`z:${I}\no:${C}`}),p.portPointsInPairs?.length||p.portPoints.forEach(y=\u003e{if(y.portPointId\u0026\u0026_!==y\u0026\u0026_.connectionName===y.connectionName){const x=u.get(y.portPointId);l.push({points:[f,x],strokeColor:\"#fff822c9\"})}})}),p.portPointsInPairs?.forEach(([_,f])=\u003e{l.push({points:[d(_),d(f)],strokeColor:\"#fff822c9\"})})});for(const p of r){const m=i.get(p);m\u0026\u0026l.push({points:[{x:m.x1,y:m.y1},{x:m.x2,y:m.y2}],strokeColor:\"orange\",strokeWidth:.01})}if(s){const p=i.get(s);p\u0026\u0026(l.push({points:[{x:p.x1,y:p.y1},{x:p.x2,y:p.y2}],strokeColor:\"red\",strokeWidth:.03}),c.push({x:p.center.x,y:p.center.y,label:p.ownerPairKey}))}for(const p of i.values())l.push({points:[{x:p.x1,y:p.y1},{x:p.x2,y:p.y2}],strokeColor:\"#33b5ff80\",strokeWidth:.006});return{rects:A,lines:l,points:c}})({obstacles:this.input.obstacles,nodeWithPortPoints:this.input.nodeWithPortPoints,mapOfOwnerPairToPortPoints:this.mapOfOwnerPairToPortPoints,mapOfOwnerPairToSharedEdge:this.mapOfOwnerPairToSharedEdge,ownerPairsToProcess:this.ownerPairsToProcess,currentOwnerPairBeingProcessed:this.currentOwnerPairBeingProcessed,mapOfNodeIdToBounds:this.mapOfNodeIdToBounds})}},Hse=(t,e,n)=\u003et.connectedTo.some(o=\u003eo===e.connectionName||o===e.rootConnectionName||(n?.areIdsConnected(e.connectionName,o)??!1)||e.rootConnectionName!==void 0\u0026\u0026(n?.areIdsConnected(e.rootConnectionName,o)??!1));function E7e(t){return\"layers\"in t\u0026\u0026Array.isArray(t.layers)}function ND(t){return\"layer\"in t\u0026\u0026typeof t.layer==\"string\"}function tI(t){return E7e(t)?t.layers[0]:t.layer}function RD(t){return E7e(t)?t.layers:[t.layer]}var Kh=(t,e)=\u003e{if(t===1\u0026\u0026e===1)return\"inner1\";if(t\u003c0||t\u003e=e)throw new Error(`Invalid z \"${t}\" for layer count: ${e}`);return t===0?\"top\":t===e-1?\"bottom\":`inner${t}`},iXn=(t,e)=\u003e!!t\u0026\u0026!!e\u0026\u0026Math.abs(t.x-e.x)\u003c=1e-12\u0026\u0026Math.abs(t.y-e.y)\u003c=1e-12,Ose=(t,e)=\u003eo7(t,e)\u003c=1e-6,rXn=(t,e,n,o)=\u003ee.toNextSegmentType===\"through_obstacle\"||(o.connectedMultilayerObstacles?o.connectedMultilayerObstacles.some(i=\u003eOse(e,i)\u0026\u0026Ose(n,i)):o.obstacles?.some(i=\u003e(r=\u003e(r.__zLayers?.length??r.layers?.length??0)\u003e1)(i)\u0026\u0026Ose(e,i)\u0026\u0026Ose(n,i)\u0026\u0026Hse(i,t,o.connMap))??!1),G_t=({endpoint:t,endpointLayer:e,connectionPoints:n,tolerance:o})=\u003e{let i;for(const r of n){if(!ND(r)||!r.terminalVia||r.layer!==e)continue;const s=no(r,t);s\u003eo||(!i||s\u003ci.distance)\u0026\u0026(i={point:r,distance:s})}return i?.point},nB=(t,e,n={})=\u003e{const o=[];if(t.route.length===0)return o;let i=[],r=t.route[0].z;for(let a=0;a\u003ct.route.length;a++){const A=t.route[a];if(A.z!==r){const c=i[i.length-1],l=Kh(r,e);for(const g of i)o.push({route_type:\"wire\",x:g.x,y:g.y,width:g.traceThickness??t.traceThickness,layer:l});const u=Kh(A.z,e);c\u0026\u0026rXn(t,c,A,n)?o.push({route_type:\"through_obstacle\",start:{x:c.x,y:c.y},end:{x:A.x,y:A.y},from_layer:l,to_layer:u,width:c.traceThickness??t.traceThickness,...c.toNextSegmentCircuitJsonMetadata?{circuitJsonMetadata:c.toNextSegmentCircuitJsonMetadata}:{}}):t.vias.some(g=\u003eMath.abs(g.x-A.x)\u003c.001\u0026\u0026Math.abs(g.y-A.y)\u003c.001)\u0026\u0026o.push({route_type:\"via\",x:A.x,y:A.y,from_layer:l,to_layer:u,via_diameter:t.viaDiameter,...n.defaultViaHoleDiameter!==void 0?{via_hole_diameter:n.defaultViaHoleDiameter}:{}}),i=[A],r=A.z}else iXn(i[i.length-1],A)||i.push(A)}const s=Kh(r,e);for(const a of i)o.push({route_type:\"wire\",x:a.x,y:a.y,width:a.traceThickness??t.traceThickness,layer:s});if(t.jumpers\u0026\u0026t.jumpers.length\u003e0){const a=Kh(t.route[0]?.z??0,e);for(const A of t.jumpers)o.push({route_type:\"jumper\",start:A.start,end:A.end,footprint:A.footprint,layer:a})}return(({route:a,hdRoute:A,layerCount:c,connectionPoints:l=[],tolerance:u=.25,defaultViaHoleDiameter:g})=\u003e{if(a.length===0||A.route.length===0||!l.length||!l.some(w=\u003eND(w)\u0026\u0026w.terminalVia))return a;const h=a.filter(w=\u003ew.route_type!==\"jumper\"),d=a.filter(w=\u003ew.route_type===\"jumper\");if(h.length===0)return a;const p=A.route[0],m=A.route[A.route.length-1],_=Kh(p.z,c),f=Kh(m.z,c),I=G_t({endpoint:p,endpointLayer:_,connectionPoints:l,tolerance:u}),C=G_t({endpoint:m,endpointLayer:f,connectionPoints:l,tolerance:u}),y=[],x=[],E=h[0],B=h[h.length-1],S=p.traceThickness??A.traceThickness,Q=m.traceThickness??A.traceThickness;return I?.terminalVia\u0026\u0026(y.push({route_type:\"via\",x:I.x,y:I.y,from_layer:I.layer,to_layer:I.terminalVia.toLayer,via_diameter:I.terminalVia.viaDiameter??A.viaDiameter,...g!==void 0?{via_hole_diameter:g}:{}}),E?.route_type===\"wire\"\u0026\u0026E.layer===I.layer\u0026\u0026no(E,I)\u003c=.001||y.push({route_type:\"wire\",x:I.x,y:I.y,width:S,layer:I.layer})),C?.terminalVia\u0026\u0026(B?.route_type===\"wire\"\u0026\u0026B.layer===C.layer\u0026\u0026no(B,C)\u003c=.001||x.push({route_type:\"wire\",x:C.x,y:C.y,width:Q,layer:C.layer}),x.push({route_type:\"via\",x:C.x,y:C.y,from_layer:C.layer,to_layer:C.terminalVia.toLayer,via_diameter:C.terminalVia.viaDiameter??A.viaDiameter,...g!==void 0?{via_hole_diameter:g}:{}})),[...y,...h,...x,...d]})({route:o,hdRoute:t,layerCount:e,connectionPoints:n.connectionPoints,tolerance:n.terminalViaAttachTolerance,defaultViaHoleDiameter:n.defaultViaHoleDiameter})},Y_t=[\"blue\",\"orange\",\"purple\",\"cyan\",\"magenta\",\"yellowgreen\",\"darkgoldenrod\",\"deeppink\"],Jf=(t,e)=\u003e{const n={};for(let o=0;o\u003ct.connections.length;o++){const i=t.connections[o],r=e?.getNetConnectedToId(i.name);r\u0026\u0026!n[r]\u0026\u0026(n[r]=`hsl(${300*o/t.connections.length}, 100%, 50%)`),n[i.name]=(r?n[r]:null)??`hsl(${340*o/t.connections.length}, 100%, 50%)`}return n},Es=(t,e)=\u003e{try{return Bz(e,t)}catch(n){return console.error(n),t}},Fz=(t,e=1)=\u003e{if(!t)return\"rgba(0, 0, 0, 0.5)\";const n=300*t.split(\"\").reduce((o,i)=\u003eo+i.charCodeAt(0),0)/t.length%360;return e\u003c1?`hsla(${n}, 100%, 50%, ${e})`:`hsl(${n}, 100%, 50%)`},U_t=t=\u003e{const e=new Set;return t.filter(n=\u003e!e.has(n)\u0026\u0026(e.add(n),!0))},Lz=(t,e,n)=\u003e{if(!e)return;const o=t.get(e);o?o.includes(n)||o.push(n):t.set(e,[n])},z8=t=\u003e{const e=new Map;for(const n of t.connections){const o=n.__rootConnectionNames??[n.name];for(const i of o){Lz(e,n.name,i),Lz(e,i,i),Lz(e,n.__netConnectionName,i);for(const r of n.pointsToConnect)Lz(e,r.pointId,i),Lz(e,r.pcb_port_id,i)}}return n=\u003e((o,i=[])=\u003e{const r=U_t(i).join(\", \");return o.layers.map(s=\u003er?`${s}\n${r}`:s).join(`\n`)})(n,((o,i)=\u003eU_t([...o.connectedTo.flatMap(r=\u003ei.get(r)??[]),...(o.offBoardConnectsTo??[]).flatMap(r=\u003ei.get(r)??[])]))(n,e))},Kr=(t,e)=\u003et===\"top\"?0:t===\"bottom\"?e-1:parseInt(t.slice(5));function Hz(t,e){return[...new Set(t)].filter(n=\u003eNumber.isInteger(n)\u0026\u0026n\u003e=0\u0026\u0026n\u003ce).sort((n,o)=\u003en-o)}function Oz(t,e){return Hz(t.map(n=\u003eKr(n,e)),e)}var Gz=(t,e)=\u003e`z${Oz(t,e).join(\",\")}`,J8=(t,e)=\u003eGz(RD(t),e),K_t=(t,e)=\u003et.__zLayers\u0026\u0026t.__zLayers.length\u003e0?Hz(t.__zLayers,e):Oz(t.layers,e),r7=(t,e)=\u003e`z${K_t(t,e).join(\",\")}`,V_t=(...t)=\u003et.find(e=\u003etypeof e==\"number\"\u0026\u0026Number.isFinite(e)),om=t=\u003e{const e=V_t(t.min_via_hole_diameter,t.minViaHoleDiameter),n=V_t(t.min_via_pad_diameter,t.minViaPadDiameter,t.minViaDiameter),o=Math.max(n??t.minViaDiameter??.3,e??0);return{padDiameter:o,holeDiameter:e??.5*o}},W8={\"0603\":{length:1.65,width:.95,padLength:.8,padWidth:.95},1206:{length:3.2,width:1.6,padLength:.6,padWidth:1.6},\"1206x4_pair\":{length:2.7,width:.5,padLength:.8,padWidth:.5}},z_t={top:\"red\",bottom:\"blue\",inner1:\"green\",inner2:\"yellow\",inner3:\"orange\",inner4:\"purple\",inner5:\"cyan\",inner6:\"magenta\",inner7:\"lime\",inner8:\"brown\"};function J_t(t){if(Object.hasOwn(z_t,t))return z_t[t];const e=/^inner([1-9]\\d*)$/.exec(t);if(e)return`hsl(${137*Number(e[1])%360}, 70%, 45%)`;throw new Error(`No visualization color for layer \"${t}\"`)}var mx=(t,e={})=\u003e{const n=[],o=[],i=[],r=[],s=Jf(t),a=e.traceColorMode??\"layer\",A=t.layerCount,c=om(t),l=z8(t);if(t.connections)for(const u of t.connections)for(const g of u.pointsToConnect){const h=RD(g),d=u.__rootConnectionNames??[u.name];i.push({x:g.x,y:g.y,color:s[u.name],layer:J8(g,A),label:[u.name,d.join(\", \"),h.join(\",\")].join(`\n`)})}if(t.traces)for(const u of t.traces){let g=t.minTraceWidth;const h=u.route.filter(m=\u003em.route_type===\"jumper\"),d=(m,_)=\u003e{for(const I of h){const C=Math.abs(m.x-I.start.x)\u003c.01\u0026\u0026Math.abs(m.y-I.start.y)\u003c.01\u0026\u0026Math.abs(_.x-I.end.x)\u003c.01\u0026\u0026Math.abs(_.y-I.end.y)\u003c.01,y=Math.abs(m.x-I.end.x)\u003c.01\u0026\u0026Math.abs(m.y-I.end.y)\u003c.01\u0026\u0026Math.abs(_.x-I.start.x)\u003c.01\u0026\u0026Math.abs(_.y-I.start.y)\u003c.01;if(C||y)return!0}return!1};for(const m of u.route)if(m.route_type===\"via\"){const _=Kr(m.from_layer,A),f=Kr(m.to_layer,A),I=(m.via_diameter??c.padDiameter)/2,C=Array.from({length:Math.abs(f-_)+1},(y,x)=\u003eMath.min(_,f)+x);o.push({center:{x:m.x,y:m.y},radius:I,fill:a===\"net\"?s[u.connection_name]:\"blue\",stroke:\"none\",layer:`z${C.join(\",\")}`})}else if(m.route_type===\"through_obstacle\"){const _=s[u.connection_name]??\"purple\";n.push({points:[m.start,m.end],strokeColor:Es(_,.35),strokeWidth:m.width,strokeDash:[.1,.1],layer:Gz([m.from_layer,m.to_layer],A),label:`${u.connection_name} through_obstacle`})}let p;for(let m=0;m\u003cu.route.length-1;m++){const _=u.route[m],f=u.route[m+1];if(_.route_type===\"jumper\"){p=void 0;const I=s[u.connection_name]??\"rgba(255, 165, 0, 0.8)\",C=_.footprint,y=W8[C===\"1206x4_pair\"?\"1206x4_pair\":\"0603\"]??W8[\"0603\"],x=_.end.x-_.start.x,E=_.end.y-_.start.y,B=Math.abs(x)\u003eMath.abs(E),S=B?y.padLength:y.padWidth,Q=B?y.padWidth:y.padLength;r.push({center:_.start,width:S,height:Q,fill:Es(I,.5),stroke:\"rgba(0, 0, 0, 0.5)\",layer:Gz([_.layer],A)}),r.push({center:_.end,width:S,height:Q,fill:Es(I,.5),stroke:\"rgba(0, 0, 0, 0.5)\",layer:Gz([_.layer],A)}),n.push({points:[_.start,_.end],strokeColor:\"rgba(100, 100, 100, 0.8)\",strokeWidth:.3*y.padWidth,layer:Gz([_.layer],A)})}else if(_.route_type===\"wire\"\u0026\u0026f.route_type===\"wire\"\u0026\u0026f.layer===_.layer){if(d({x:_.x,y:_.y},{x:f.x,y:f.y})){p=void 0;continue}g=_.width;const I=_.layer===\"top\",C=a===\"net\"?s[u.connection_name]:J_t(_.layer),y=`z${Kr(_.layer,A)}`;if(p\u0026\u0026p.layer===y\u0026\u0026p.strokeWidth===g){p.points.push({x:f.x,y:f.y});continue}p={points:[{x:_.x,y:_.y},{x:f.x,y:f.y}],layer:y,strokeWidth:g,strokeColor:I?C:Es(C,.5),...a===\"net\"?{label:u.connection_name}:{},...I?{}:{strokeDash:[.2,.2]}},n.push(p)}else p=void 0}}for(const u of t.obstacles){if(u.isCopperPour)continue;const g=K_t(u,A);if(g.length===0)throw new Error(`Cannot visualize obstacle \"${u.obstacleId??\"unknown\"}\" without a valid layer: layers=${u.layers.join(\",\")}, __zLayers=${u.__zLayers?.join(\",\")??\"unset\"}, layerCount=${A}`);const h=J_t((g.length===1?Kh(g[0],A):null)===\"bottom\"?\"bottom\":\"top\"),d=.5**g.length;r.push({center:u.center,width:u.width,height:u.height,ccwRotationDegrees:u.ccwRotationDegrees,fill:Es(h,d),layer:r7(u,A),label:l(u)})}if(t.jumpers)for(const u of t.jumpers)for(const g of u.pads)r.push({center:g.center,width:g.width,height:g.height,ccwRotationDegrees:g.ccwRotationDegrees,fill:\"rgba(255, 165, 0, 0.3)\",stroke:\"rgba(255, 165, 0, 0.8)\",layer:r7(g,A)});return{rects:r,circles:o,lines:n,points:i}};function sXn([t,e],[n,o],{lineThickness:i=0}={}){return i===0?W_t(t,e,n,o):(function(s,a,A,c){if(s.x===a.x\u0026\u0026s.y===a.y)return ZF(s,A,c);if(A.x===c.x\u0026\u0026A.y===c.y)return ZF(A,s,a);if(W_t(s,a,A,c))return 0;const l=[ZF(s,A,c),ZF(a,A,c),ZF(A,s,a),ZF(c,s,a)];return Math.min(...l)})(t,e,n,o)\u003c=i}function W_t(t,e,n,o){const i=Gse(t,e,n),r=Gse(t,e,o),s=Gse(n,o,t),a=Gse(n,o,e);return i!==r\u0026\u0026s!==a||!(i!==0||!Yse(t,n,e))||!(r!==0||!Yse(t,o,e))||!(s!==0||!Yse(n,t,o))||!(a!==0||!Yse(n,e,o))}function Gse(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o\u003e0?1:2}function Yse(t,e,n){return e.x\u003c=Math.max(t.x,n.x)\u0026\u0026e.x\u003e=Math.min(t.x,n.x)\u0026\u0026e.y\u003c=Math.max(t.y,n.y)\u0026\u0026e.y\u003e=Math.min(t.y,n.y)}function ZF(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return j_t(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;return i=Math.max(0,Math.min(1,i)),j_t(t,{x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)})}function j_t(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function $_t(t){const e=new Map;let n=0;function o(i){for(const[,s]of e)if(s.has(i))return s;const r=new Set;return e.set(\"connectivity_net\"+n++,r),r}for(const i of t){let r=null;for(const s of i){if(r){if(!r.has(s)){const a=o(s);if(a!==r){for(const A of a)r.add(A);e.delete(Array.from(e.entries()).find(([,A])=\u003eA===a)[0])}}}else r=o(s);r.add(s)}}return Object.fromEntries(Array.from(e.entries()).map(([i,r])=\u003e[i,Array.from(r)]))}var TD=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s\u0026\u0026o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){this.netMap[i].push(...this.netMap[r]),this.netMap[r]=this.netMap[i];for(const s of this.netMap[i])this.idToNetMap[s]=i}}for(const r of n)this.netMap[i].includes(r)||this.netMap[i].push(r),this.idToNetMap[r]=i}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return!!i\u0026\u0026(o===i||i===e||i===e)}areAllIdsConnected(e){const n=this.getNetConnectedToId(e[0]);for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}},eL=t=\u003e{const e=[];for(const o of t)if(o.type===\"source_trace\")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type===\"pcb_port\"){const{pcb_port_id:i,source_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([r,i])}else if(o.type===\"pcb_smtpad\"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_plated_hole\"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_trace\"){const{pcb_trace_id:i,source_trace_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}const n=$_t(e);return new TD(n)},aXn=class{circuitJson;traceIdToElm;portIdToElm;connMap;constructor(e){this.circuitJson=e||[],this.traceIdToElm=new Map,this.portIdToElm=new Map,e?(this._buildTraceMap(),this._buildPortMap(),this.connMap=this._buildTraceConnectivityMap()):this.connMap=new TD({})}_buildPortMap(){for(const e of this.circuitJson)e.type===\"pcb_port\"\u0026\u0026this.portIdToElm.set(e.pcb_port_id,e)}_buildTraceMap(){for(const e of this.circuitJson)e.type===\"pcb_trace\"\u0026\u0026this.traceIdToElm.set(e.pcb_trace_id,e)}_buildTraceConnectivityMap(){const e=[],n=Array.from(this.traceIdToElm.keys());for(let o=0;o\u003cn.length;o++)for(let i=o+1;i\u003cn.length;i++){const r=this.traceIdToElm.get(n[o]),s=this.traceIdToElm.get(n[i]);this._arePcbTracesConnected(r,s)\u0026\u0026e.push([n[o],n[i]])}for(const o of this.portIdToElm.values())for(const i of this.traceIdToElm.values())for(const r of i.route)r.route_type===\"wire\"\u0026\u0026(r.start_pcb_port_id===o.pcb_port_id?e.push([o.pcb_port_id,i.pcb_trace_id]):r.end_pcb_port_id===o.pcb_port_id\u0026\u0026e.push([i.pcb_trace_id,o.pcb_port_id]));return new TD($_t(e))}addTrace(e){this.traceIdToElm.set(e.pcb_trace_id,e);const n=[];for(const o of e.route)o.route_type===\"wire\"\u0026\u0026(o.start_pcb_port_id\u0026\u0026n.push([o.start_pcb_port_id,e.pcb_trace_id]),o.end_pcb_port_id\u0026\u0026n.push([o.end_pcb_port_id,e.pcb_trace_id]));this.connMap.addConnections(n)}_arePcbTracesConnected(e,n){for(let o=0;o\u003ce.route.length-1;o++){const i=e.route[o],r=e.route[o+1];if(i.route_type===\"wire\"\u0026\u0026r.route_type===\"wire\")for(let s=0;s\u003cn.route.length-1;s++){const a=n.route[s],A=n.route[s+1];if(a.route_type===\"wire\"\u0026\u0026A.route_type===\"wire\"\u0026\u0026sXn([i,r],[a,A],{lineThickness:(i.width+a.width)/2}))return!0}}return!1}areTracesConnected(e,n){return this.connMap.areIdsConnected(e,n)}getAllTracesConnectedToTrace(e){const n=this.connMap.getNetConnectedToId(e);return n?this.connMap.getIdsConnectedToNet(n).filter(o=\u003ethis.traceIdToElm.has(o)).map(o=\u003ethis.traceIdToElm.get(o)):[]}getAllTracesConnectedToPort(e){const n=this.connMap.getNetConnectedToId(e);return n?this.connMap.getIdsConnectedToNet(n).filter(o=\u003ethis.traceIdToElm.has(o)).map(o=\u003ethis.traceIdToElm.get(o)):[]}},q_t=t=\u003e`${Math.round(100*t.x)},${Math.round(100*t.y)}`,Jm=t=\u003e{const e=new TD({});for(const n of t.connections){for(const o of n.__rootConnectionNames??[])e.addConnections([[n.name,o]]);n.__netConnectionName\u0026\u0026e.addConnections([[n.name,n.__netConnectionName]]);for(const o of n.pointsToConnect)e.addConnections([[n.name,`${q_t(o)}:${\"layers\"in o?o.layers.map(i=\u003eKr(i,t.layerCount)).sort().join(\"-\"):Kr(o.layer,t.layerCount)}`]]),\"pcb_port_id\"in o\u0026\u0026o.pcb_port_id\u0026\u0026e.addConnections([[n.name,o.pcb_port_id]]),o.pointId\u0026\u0026e.addConnections([[n.name,o.pointId]])}for(const n of t.obstacles){const o=n.offBoardConnectsTo??[],i=Array.from(new Set([n.obstacleId,...n.connectedTo,...o,`${q_t(n.center)}:${n.layers.map(r=\u003eKr(r,t.layerCount)).sort().join(\"-\")}`].filter(Boolean)));i.length\u003e0\u0026\u0026e.addConnections([i])}for(const n of t.traces??[]){const o=Array.from(new Set([n.pcb_trace_id,n.connection_name,...n.connectsTo??[]].filter(Boolean)));o.length\u003e0\u0026\u0026e.addConnections([o])}return e},JQ=t=\u003e{const e=new TD({});for(const n of t.connections){const o=n.externallyConnectedPointIds??[];e.addConnections(o)}for(const n of t.traces??[]){const o=n.connectsTo??[];o.length!==0\u0026\u0026e.addConnections([[n.pcb_trace_id,...o]])}return e},yr=class{MAX_ITERATIONS=1e3;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};pendingEffects;cacheHit;cacheKey;cacheToSolveSpaceTransform;getSolverName(){return this.constructor.name}step(){if(!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,console.error(this.error),this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations (MAX_ITERATIONS=${this.MAX_ITERATIONS})`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function tL(t){const e=new Map;for(const n of t)for(const o of n.nodeIds)e.set(o,[...e.get(o)??[],n]);return e}var kD=class extends yr{getSolverName(){return\"AvailableSegmentPointSolver\"}nodes;edges;traceWidth;obstacleMargin;minPortSpacing;nodeMap;nodeEdgeMap;sharedEdgeSegments=[];edgeSegmentMap=new Map;portPointMap=new Map;colorMap;shouldReturnCrampedPortPoints;constructor({nodes:e,edges:n,traceWidth:o,obstacleMargin:i,colorMap:r,shouldReturnCrampedPortPoints:s}){super(),this.nodes=e,this.edges=n,this.traceWidth=o,this.obstacleMargin=i??.15,this.shouldReturnCrampedPortPoints=s,this.minPortSpacing=this.traceWidth+this.obstacleMargin,this.colorMap=r??{},this.nodeMap=new Map(e.map(a=\u003e[a.capacityMeshNodeId,a])),this.nodeEdgeMap=tL(n),this.MAX_ITERATIONS=1}_step(){this.computeAllSharedEdgeSegments(),this.solved=!0}computeAllSharedEdgeSegments(){for(const e of this.edges){const[n,o]=e.nodeIds,i=this.nodeMap.get(n),r=this.nodeMap.get(o);if(!i||!r)continue;const s=this.computeSharedEdgeSegment(e,i,r);if(s){this.sharedEdgeSegments.push(s),this.edgeSegmentMap.set(e.capacityMeshEdgeId,s);for(const a of s.portPoints)this.portPointMap.set(a.segmentPortPointId,a)}}}computeSharedEdgeSegment(e,n,o){const i=this.findOverlappingSegment(n,o);if(!i)return null;const r=n.availableZ.filter(f=\u003eo.availableZ.includes(f));if(r.length===0)return null;const s=Math.sqrt((i.end.x-i.start.x)**2+(i.end.y-i.start.y)**2),a=!!(n._isNarrowQfpPadGap||o._isNarrowQfpPadGap),A=3*this.minPortSpacing/4,c=Math.max(0,s-2*A);if(c\u003c=0\u0026\u0026!n._containsTarget\u0026\u0026!o._containsTarget){if(!this.shouldReturnCrampedPortPoints)return null;const f=[];for(const I of r)f.push({segmentPortPointId:`${e.capacityMeshEdgeId}_pp0_z${I}_cramped`,x:(i.start.x+i.end.x)/2,y:(i.start.y+i.end.y)/2,availableZ:[I],nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],edgeId:e.capacityMeshEdgeId,connectionName:null,distToCentermostPortOnZ:0,cramped:!0});return{edgeId:e.capacityMeshEdgeId,nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],start:i.start,end:i.end,availableZ:r,portPoints:f}}let l=Math.max(1,Math.floor(c/this.minPortSpacing)+1);if(n._offBoardConnectionId||o._offBoardConnectionId){if(n._offBoardConnectionId\u0026\u0026!o._offBoardConnectionId){if(this.shouldSkipOffBoardPortPoint(n,o))return null}else if(o._offBoardConnectionId\u0026\u0026!n._offBoardConnectionId\u0026\u0026this.shouldSkipOffBoardPortPoint(o,n))return null;l=1}const u=[],g=i.end.x-i.start.x,h=i.end.y-i.start.y,d=(i.start.x+i.end.x)/2,p=(i.start.y+i.end.y)/2;l\u003e5\u0026\u0026(l=5+Math.floor(l/4));const m=[];for(let f=0;f\u003cl;f++){let I;I=s===0||l===1?.5:(A+c*f/(l-1))/s;const C=i.start.x+g*I,y=i.start.y+h*I,x=Math.sqrt((C-d)**2+(y-p)**2);m.push({x:C,y,distToCenter:x})}const _=m.reduce((f,I)=\u003eI.distToCenter\u003cf.distToCenter?I:f);for(let f=0;f\u003cl;f++){const{x:I,y:C}=m[f],y=Math.sqrt((I-_.x)**2+(C-_.y)**2);for(const x of r){const E={segmentPortPointId:`${e.capacityMeshEdgeId}_pp${f}_z${x}`,x:I,y:C,availableZ:[x],nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],edgeId:e.capacityMeshEdgeId,connectionName:null,distToCentermostPortOnZ:y,cramped:a};u.push(E)}}return{edgeId:e.capacityMeshEdgeId,nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],start:i.start,end:i.end,availableZ:r,portPoints:u}}shouldSkipOffBoardPortPoint(e,n){const o=this.nodeEdgeMap.get(n.capacityMeshNodeId)??[];for(const i of o){const r=i.nodeIds[0]===n.capacityMeshNodeId?i.nodeIds[1]:i.nodeIds[0];if(r===e.capacityMeshNodeId)continue;const s=this.nodeMap.get(r);if(s?._offBoardConnectionId!==e._offBoardConnectionId||this.nodes.filter(A=\u003eA._offBoardConnectionId===e._offBoardConnectionId).length!==2)continue;const a={x:(e.center.x+s.center.x)/2,y:(e.center.y+s.center.y)/2};if(a.x\u003e=n.center.x-n.width/2\u0026\u0026a.x\u003c=n.center.x+n.width/2\u0026\u0026a.y\u003e=n.center.y-n.height/2\u0026\u0026a.y\u003c=n.center.y+n.height/2)return!0}return!1}findOverlappingSegment(e,n){const o={start:Math.max(e.center.x-e.width/2,n.center.x-n.width/2),end:Math.min(e.center.x+e.width/2,n.center.x+n.width/2)},i={start:Math.max(e.center.y-e.height/2,n.center.y-n.height/2),end:Math.min(e.center.y+e.height/2,n.center.y+n.height/2)},r=o.end-o.start,s=i.end-i.start;if(r\u003c-1e-4||s\u003c-1e-4)return null;if(r\u003cs){const a=(o.start+o.end)/2;return{start:{x:a,y:i.start},end:{x:a,y:i.end}}}{const a=(i.start+i.end)/2;return{start:{x:o.start,y:a},end:{x:o.end,y:a}}}}getAvailablePortPointsBetweenNodes(e,n){const o=this.edges.find(r=\u003er.nodeIds[0]===e\u0026\u0026r.nodeIds[1]===n||r.nodeIds[0]===n\u0026\u0026r.nodeIds[1]===e);if(!o)return[];const i=this.edgeSegmentMap.get(o.capacityMeshEdgeId);return i?i.portPoints.filter(r=\u003er.connectionName===null):[]}getPortPointsForEdge(e,n){const o=this.edges.find(r=\u003er.nodeIds[0]===e\u0026\u0026r.nodeIds[1]===n||r.nodeIds[0]===n\u0026\u0026r.nodeIds[1]===e);return o?this.edgeSegmentMap.get(o.capacityMeshEdgeId)?.portPoints??[]:[]}assignPortPoint(e,n,o){const i=this.portPointMap.get(e);return!!i\u0026\u0026i.connectionName===null\u0026\u0026(i.connectionName=n,i.rootConnectionName=o,!0)}releasePortPoint(e){const n=this.portPointMap.get(e);return!!n\u0026\u0026(n.connectionName=null,n.rootConnectionName=void 0,!0)}getAvailablePortCountForEdge(e,n){return this.getAvailablePortPointsBetweenNodes(e,n).length}getOutput(){return this.sharedEdgeSegments}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const n of this.sharedEdgeSegments){e.lines.push({points:[n.start,n.end],strokeColor:\"rgba(100, 100, 100, 0.5)\"});for(const o of n.portPoints){const i=o.connectionName?this.colorMap[o.connectionName]??\"blue\":\"rgba(0, 200, 0, 0.7)\";o.cramped?e.rects.push({center:{x:o.x,y:o.y},width:.1,height:.1,fill:i,layer:`z${o.availableZ.join(\",\")}`,label:`cramped ${o.segmentPortPointId}`}):e.circles.push({center:{x:o.x,y:o.y},radius:this.traceWidth/2,fill:i,layer:`z${o.availableZ.join(\",\")}`,label:[o.segmentPortPointId,o.connectionName,o.availableZ.join(\",\"),`cd: ${o.distToCentermostPortOnZ}`,`connects: ${o.nodeIds.join(\",\")}`].filter(Boolean).join(`\n`)})}}return e}};function Use(t,e){const n=t.center.x-t.width/2,o=t.center.x+t.width/2,i=t.center.y-t.height/2,r=t.center.y+t.height/2,s=e.center.x-e.width/2,a=e.center.x+e.width/2,A=e.center.y-e.height/2,c=e.center.y+e.height/2,l=.001,u=(Math.abs(o-s)\u003cl||Math.abs(n-a)\u003cl)\u0026\u0026Math.min(r,c)-Math.max(i,A)\u003e=l,g=(Math.abs(r-A)\u003cl||Math.abs(i-c)\u003cl)\u0026\u0026Math.min(o,a)-Math.max(n,s)\u003e=l;return u||g}var AXn=class extends yr{constructor(e){super(),this.nodes=e,this.edges=[]}nodes;getSolverName(){return\"CapacityMeshEdgeSolver\"}edges;nodeMap;getNextCapacityMeshEdgeId(){return`ce${this.edges.length}`}_step(){this.edges=[];for(let e=0;e\u003cthis.nodes.length;e++)for(let n=e+1;n\u003cthis.nodes.length;n++)!(this.nodes[e]._strawNode\u0026\u0026this.nodes[n]._strawNode\u0026\u0026this.nodes[e]._strawParentCapacityMeshNodeId===this.nodes[n]._strawParentCapacityMeshNodeId)\u0026\u0026Use(this.nodes[e],this.nodes[n])\u0026\u0026this.doNodesHaveSharedLayer(this.nodes[e],this.nodes[n])\u0026\u0026this.edges.push({capacityMeshEdgeId:this.getNextCapacityMeshEdgeId(),nodeIds:[this.nodes[e].capacityMeshNodeId,this.nodes[n].capacityMeshNodeId]});this.handleTargetNodes(),this.solved=!0}handleTargetNodes(){const e=this.nodes.filter(o=\u003eo._containsTarget),n=new Map(this.nodes.map(o=\u003e[o.capacityMeshNodeId,o]));for(let o=0;o\u003ce.length;o++)for(let i=o+1;i\u003ce.length;i++){const r=e[o],s=e[i];this.doNodesHaveSharedLayer(r,s)\u0026\u0026this.doNodesTouchOrOverlap(r,s)\u0026\u0026(this.hasEdgeBetween(r,s)||this.edges.push({capacityMeshEdgeId:this.getNextCapacityMeshEdgeId(),nodeIds:[r.capacityMeshNodeId,s.capacityMeshNodeId]}))}for(const o of e)if(!(!o._containsObstacle||!o._targetConnectionName)\u0026\u0026!this.edges.some(i=\u003e{if(!i.nodeIds.includes(o.capacityMeshNodeId))return!1;const r=i.nodeIds[0]===o.capacityMeshNodeId?i.nodeIds[1]:i.nodeIds[0],s=n.get(r);return!!s\u0026\u0026!s._containsObstacle\u0026\u0026!s._containsTarget\u0026\u0026this.doNodesHaveSharedLayer(o,s)}))throw new Error(`Target obstacle region \"${o.capacityMeshNodeId}\" for connection \"${o._targetConnectionName}\" has no bordering routing edge`)}doNodesHaveSharedLayer(e,n){return e.availableZ.some(o=\u003en.availableZ.includes(o))}hasEdgeBetween(e,n){return this.edges.some(o=\u003eo.nodeIds.includes(e.capacityMeshNodeId)\u0026\u0026o.nodeIds.includes(n.capacityMeshNodeId))}doNodesTouchOrOverlap(e,n){const i=e.center.x-e.width/2,r=e.center.x+e.width/2,s=e.center.y-e.height/2,a=e.center.y+e.height/2,A=n.center.x-n.width/2,c=n.center.x+n.width/2,l=n.center.y-n.height/2,u=n.center.y+n.height/2;return i\u003c=c+.001\u0026\u0026r+.001\u003e=A\u0026\u0026s\u003c=u+.001\u0026\u0026a+.001\u003e=l}visualize(){const e=new Map;for(const o of this.edges)for(const i of o.nodeIds)e.set(i,1+(e.get(i)??0));const n={lines:[],points:[],rects:this.nodes.map(o=\u003e{const i=Math.min(...o.availableZ);return{width:Math.max(o.width-2,.8*o.width),height:Math.max(o.height-2,.8*o.height),center:{x:o.center.x+i*o.width*.05,y:o.center.y-i*o.width*.05},fill:o._containsObstacle?\"rgba(255,0,0,0.1)\":{\"0,1\":\"rgba(0,0,0,0.1)\",0:\"rgba(0,200,200, 0.1)\",1:\"rgba(0,0,200, 0.1)\"}[o.availableZ.join(\",\")]??\"rgba(0,200,200,0.1)\",label:[o.capacityMeshNodeId,`availableZ: ${o.availableZ.join(\",\")}`,`target? ${o._containsTarget??!1}`,`obs? ${o._containsObstacle??!1}`,`conn: ${e.get(o.capacityMeshNodeId)??0}`].join(`\n`),layer:`z${o.availableZ.join(\",\")}`}}),circles:[]};if(!this.nodeMap){this.nodeMap=new Map;for(const o of this.nodes)this.nodeMap.set(o.capacityMeshNodeId,o)}for(const o of this.edges){const i=this.nodeMap.get(o.nodeIds[0]),r=this.nodeMap.get(o.nodeIds[1]);if(i?.center\u0026\u0026r?.center){const s=Math.min(...i.availableZ),a=Math.min(...r.availableZ),A={x:i.center.x+s*i.width*.05,y:i.center.y-s*i.width*.05},c={x:r.center.x+a*r.width*.05,y:r.center.y-a*r.width*.05},l=Array.from(new Set([...i.availableZ,...r.availableZ])).sort();n.lines.push({layer:`z${l.join(\",\")}`,points:[A,c],strokeDash:i.availableZ.join(\",\")===r.availableZ.join(\",\")?void 0:\"10 5\"})}}return n}},B7e=class{constructor(e){this.nodes=e,this.buckets=new Map;for(const n of e){const o=n.center.x-n.width/2,i=n.center.y-n.height/2,r=n.center.x+n.width/2,s=n.center.y+n.height/2,a=Math.floor(o/this.CELL_SIZE),A=Math.floor(r/this.CELL_SIZE),c=Math.floor(i/this.CELL_SIZE),l=Math.floor(s/this.CELL_SIZE);for(let u=a;u\u003c=A;u++)for(let g=c;g\u003c=l;g++){const h=`${u}x${g}`,d=this.buckets.get(h);d?d.push(n):this.buckets.set(h,[n])}}}nodes;buckets;CELL_SIZE=.4;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getNodesInArea(e,n,o,i){const r=[],s=new Set,a=e-o/2,A=n-i/2,c=e+o/2,l=n+i/2,u=Math.floor(a/this.CELL_SIZE),g=Math.floor(c/this.CELL_SIZE),h=Math.floor(A/this.CELL_SIZE),d=Math.floor(l/this.CELL_SIZE);for(let p=u;p\u003c=g;p++)for(let m=h;m\u003c=d;m++){const _=`${p}x${m}`,f=this.buckets.get(_)||[];for(const I of f)s.has(I.capacityMeshNodeId)||(s.add(I.capacityMeshNodeId),r.push(I))}return r}},WQ=class extends AXn{constructor(e){super(e),this.nodes=e,this.MAX_ITERATIONS=1e7,this.nodeTree=new B7e(this.nodes),this.currentNodeIndex=0,this.edgeSet=new Set}nodes;getSolverName(){return\"CapacityMeshEdgeSolver2_NodeTreeOptimization\"}nodeTree;currentNodeIndex;edgeSet;_step(){if(this.currentNodeIndex\u003e=this.nodes.length)return this.handleTargetNodes(),void(this.solved=!0);const e=this.nodes[this.currentNodeIndex],n=this.nodeTree.getNodesInArea(e.center.x,e.center.y,2*e.width,2*e.height);for(const o of n){if(!Use(e,o))continue;const i=e._strawNode\u0026\u0026o._strawNode\u0026\u0026e._strawParentCapacityMeshNodeId===o._strawParentCapacityMeshNodeId;e.capacityMeshNodeId===o.capacityMeshNodeId||i||!this.doNodesHaveSharedLayer(e,o)||this.edgeSet.has(`${e.capacityMeshNodeId}-${o.capacityMeshNodeId}`)||(this.edgeSet.add(`${e.capacityMeshNodeId}-${o.capacityMeshNodeId}`),this.edgeSet.add(`${o.capacityMeshNodeId}-${e.capacityMeshNodeId}`),this.edges.push({capacityMeshEdgeId:this.getNextCapacityMeshEdgeId(),nodeIds:[e.capacityMeshNodeId,o.capacityMeshNodeId]}))}this.currentNodeIndex++}},Il=(...t)=\u003e{const e={points:[],lines:[],circles:[],rects:[],polygons:[],infiniteLines:[],arrows:[],texts:[]};return t.forEach((n,o)=\u003e{n\u0026\u0026(n.lines\u0026\u0026(e.lines=[...e.lines||[],...n.lines.map(i=\u003e({...i,step:o}))]),n.points\u0026\u0026(e.points=[...e.points||[],...n.points.map(i=\u003e({...i,step:o}))]),n.circles\u0026\u0026(e.circles=[...e.circles||[],...n.circles.map(i=\u003e({...i,step:o}))]),n.rects\u0026\u0026(e.rects=[...e.rects||[],...n.rects.map(i=\u003e({...i,step:o}))]),n.polygons\u0026\u0026(e.polygons=[...e.polygons||[],...n.polygons.map(i=\u003e({...i,step:o}))]),n.infiniteLines\u0026\u0026(e.infiniteLines=[...e.infiniteLines||[],...n.infiniteLines.map(i=\u003e({...i,step:o}))]),n.arrows\u0026\u0026(e.arrows=[...e.arrows||[],...n.arrows.map(i=\u003e({...i,step:o}))]),n.texts\u0026\u0026(e.texts=[...e.texts||[],...n.texts.map(i=\u003e({...i,step:o}))]))}),e};function Kse(t,e,n){const o=[];let i=null;for(let r=0;r\u003ct.length;r++){const s=t[r];i?i.z===s.z?i.points.push({x:s.x,y:s.y}):(o.push(i),i={points:[{x:s.x,y:s.y}],z:s.z,connectionName:e,color:n}):i={points:[{x:s.x,y:s.y}],z:s.z,connectionName:e,color:n},r===t.length-1\u0026\u0026i\u0026\u0026o.push(i)}return o}function s7(t,e){return{x:t.a*e.x+t.b*e.y+t.c,y:t.d*e.x+t.e*e.y+t.f}}var b7e=(t,e,n)=\u003e{const[o,i]=t;if(o===i)return;const r=((s,a)=\u003e{const A=s.portPointId??`${s.connectionName}:${s.x}:${s.y}:${s.z}`,c=a.portPointId??`${a.connectionName}:${a.x}:${a.y}:${a.z}`;return A\u003cc?`${A}|${c}`:`${c}|${A}`})(o,i);e.has(r)||(e.add(r),n.push(t))},X_t=(t,e,n)=\u003e{for(let o=0;o\u003ct.length-1;o++)b7e([t[o],t[o+1]],e,n)},Z_t=t=\u003e{const e=[],n=new Set,o=(s=\u003e{const a=new Map;for(const A of s)A.portPointId\u0026\u0026a.set(A.portPointId,A);return a})(t);for(const s of t){if(s.prevPortPointId){const a=o.get(s.prevPortPointId);a\u0026\u0026a.connectionName===s.connectionName\u0026\u0026b7e([a,s],n,e)}if(s.nextPortPointId){const a=o.get(s.nextPortPointId);a\u0026\u0026a.connectionName===s.connectionName\u0026\u0026b7e([s,a],n,e)}}if(e.length===0)return X_t(t,n,e),e;const i=(s=\u003e{const a=new Set;for(const[A,c]of s)A.portPointId\u0026\u0026a.add(A.portPointId),c.portPointId\u0026\u0026a.add(c.portPointId);return a})(e),r=t.filter(s=\u003e!s.portPointId||!i.has(s.portPointId));return X_t(r,n,e),e};function Vse(t,e,n){return Math.max(e,Math.min(n,t))}function eft(t){const e=t.planeSize*t.layers,n=t.connectionCount,o=Math.sqrt(n),i=Math.max(1,t.maxIterations),r=Vse(Math.round(e*(8+1.2*o)),15e4,12e6),s=Vse(Math.round(r*t.effort),15e4,12e6),a=Vse(Math.round(.2*i),15e4,2e6);return{maxIterationsIters:Math.max(1,Math.min(i,Math.max(a,s))),baseSearchBudgetIters:Vse(Math.round(e*(10+.8*o)*t.effort),5e4,4e6)}}function tft(t,e){for(let n=t;n;n=n.prev)if(n.id===e)return!0;return!1}var cXn=class{f=[];seq=[];id=[];n=0;push(e,n,o){let i=this.n++;for(this.f[i]=e,this.seq[i]=n,this.id[i]=o;i\u003e0;){const r=i-1\u003e\u003e1;if(this.less(r,i))break;this.swap(i,r),i=r}}pop(){const e=this.id[0];return this.n--,this.n\u003e0\u0026\u0026(this.f[0]=this.f[this.n],this.seq[0]=this.seq[this.n],this.id[0]=this.id[this.n],this.siftDown(0)),e}get size(){return this.n}clear(){this.n=0}siftDown(e){for(;;){const n=2*e+1,o=n+1;if(n\u003e=this.n)return;let i=n;if(o\u003cthis.n\u0026\u0026!this.less(n,o)\u0026\u0026(i=o),this.less(e,i))return;this.swap(e,i),e=i}}less(e,n){const o=this.f[e],i=this.f[n];return o!==i?o\u003ci:this.seq[e]\u003cthis.seq[n]}swap(e,n){const o=this.f[e];this.f[e]=this.f[n],this.f[n]=o;const i=this.seq[e];this.seq[e]=this.seq[n],this.seq[n]=i;const r=this.id[e];this.id[e]=this.id[n],this.id[n]=r}},lXn=[-1,-1,-1,0,0,1,1,1],uXn=[-1,0,1,-1,1,-1,0,1],S7e=class extends zA{getSolverName(){return\"HighDensitySolverA01\"}nodeWithPortPoints;cellSizeMm;viaDiameter;MAX_RIPS;maxCellCount;traceThickness;traceMargin;viaMinDistFromBorder;showPenaltyMap;showUsedCellMap;effort;stepMultiplier;hyperParameters;initialPenaltyFn;rows;cols;layers;gridOrigin;gridToBoundsTransform;availableZ;zToLayer;layerToZ;connNameToId;connIdToName;connIdToRootNet;overlapFriendlyRootNets;planeSize;usedCellsFlat;portOwnerFlat;usedDiagFlat;penalty2d;visitedStamp;sharedCrossRootPortCells;stamp=0;viaOffsetsDr;viaOffsetsDc;viaOffsetsLen;minViaRow;maxViaRow;minViaCol;maxViaCol;usedIndicesByConn;usedDiagIndicesByConn;unsolvedSegs;solvedRoutes;activeConnSeg=null;activeConnId=-1;crossLayerSearch=!1;nodePool;heap;seqCounter=0;_viaOccs=[];ripCount;totalRipEvents=0;searchIterations=0;consecutiveSkips=0;penaltyCap;baseSearchBudgetIters;_moveCost=0;_moveRipped=null;get unsolvedConnections(){return this.unsolvedSegs}get solvedConnectionsMap(){return this.solvedRoutes}get activeConnection(){if(!this.activeConnSeg)return null;const e=this.activeConnSeg;return{connectionName:this.connIdToName[e.connId]??\"\",start:{row:e.startRow,col:e.startCol,z:e.startZ,x:0,y:0},end:{row:e.endRow,col:e.endCol,z:e.endZ,x:0,y:0}}}get openSet(){return{length:this.heap?.size??0}}get gridStats(){return{cells:this.planeSize||0,layers:this.layers||0,states:(this.planeSize||0)*(this.layers||0)}}constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.cellSizeMm=e.cellSizeMm,this.viaDiameter=e.viaDiameter,this.maxCellCount=e.maxCellCount,this.traceThickness=e.traceThickness??.1,this.traceMargin=e.traceMargin??.15,this.viaMinDistFromBorder=e.viaMinDistFromBorder??.15,this.showPenaltyMap=e.showPenaltyMap??!1,this.showUsedCellMap=e.showUsedCellMap??!1,this.effort=e.effort??1,this.stepMultiplier=Math.max(1,Math.floor(e.stepMultiplier??1)),this.hyperParameters={shuffleSeed:0,ripCost:10,ripTracePenalty:.5,ripViaPenalty:.75,viaBaseCost:.1,greedyMultiplier:1.5,...e.hyperParameters},this.MAX_ITERATIONS=1e8,this.MAX_RIPS=200,this.initialPenaltyFn=e.initialPenaltyFn}getConstructorParams(){return[{nodeWithPortPoints:this.nodeWithPortPoints,cellSizeMm:this.cellSizeMm,viaDiameter:this.viaDiameter,maxCellCount:this.maxCellCount,stepMultiplier:this.stepMultiplier,traceThickness:this.traceThickness,traceMargin:this.traceMargin,viaMinDistFromBorder:this.viaMinDistFromBorder,showPenaltyMap:this.showPenaltyMap,showUsedCellMap:this.showUsedCellMap,effort:this.effort,hyperParameters:this.hyperParameters,initialPenaltyFn:this.initialPenaltyFn}]}_setup(){const{nodeWithPortPoints:e,cellSizeMm:n}=this,{width:o,height:i,center:r}=e;this.availableZ=e.availableZ??[...new Set(e.portPoints.map(d=\u003ed.z))].sort((d,p)=\u003ed-p),this.rows=Math.floor(i/n),this.cols=Math.floor(o/n),this.layers=this.availableZ.length,this.planeSize=this.rows*this.cols;const s=this.layers*this.planeSize;if(this.maxCellCount!==void 0\u0026\u0026s\u003ethis.maxCellCount)return this.error=`Cell count ${s} exceeds maxCellCount ${this.maxCellCount}`,void(this.failed=!0);const a=this.layers*Math.max(0,this.rows-1)*Math.max(0,this.cols-1)*2;this.zToLayer=new Map,this.layerToZ=new Map;for(let d=0;d\u003cthis.availableZ.length;d++){const p=this.availableZ[d];this.zToLayer.set(p,d),this.layerToZ.set(d,p)}if(this.gridOrigin={x:r.x-o/2,y:r.y-i/2},this.gridToBoundsTransform=(function(d){const{originX:p,originY:m,rows:_,cols:f,cellSizeMm:I,width:C,height:y}=d;let x,E,B,S;return f\u003e1?(x=C/((f-1)*I),E=p*(1-x)-.5*I*x):(x=1,E=p+C/2-(p+.5*I)),_\u003e1?(B=y/((_-1)*I),S=m*(1-B)-.5*I*B):(B=1,S=m+y/2-(m+.5*I)),{a:x,b:0,c:E,d:0,e:B,f:S}})({originX:this.gridOrigin.x,originY:this.gridOrigin.y,rows:this.rows,cols:this.cols,cellSizeMm:n,width:o,height:i}),this.connNameToId=new Map,this.connIdToName=[],this.connIdToRootNet=[],this.overlapFriendlyRootNets=new Set,this.penalty2d=new Float64Array(this.planeSize),this.initialPenaltyFn)for(let d=0;d\u003cthis.rows;d++){const p=d*this.cols;for(let m=0;m\u003cthis.cols;m++){const _=this.gridOrigin.x+(m+.5)*n,f=this.gridOrigin.y+(d+.5)*n,I=(m+.5)/this.cols,C=(d+.5)/this.rows;this.penalty2d[p+m]=this.initialPenaltyFn({x:_,y:f,px:I,py:C,row:d,col:m})}}this.usedCellsFlat=new Int32Array(s).fill(-1),this.portOwnerFlat=new Int32Array(s).fill(-1),this.usedDiagFlat=new Int32Array(a).fill(-1),this.visitedStamp=new Uint32Array(s),this.stamp=0;const A=Math.ceil(this.viaDiameter/2/n),c=A*A,l=[],u=[];for(let d=-A;d\u003c=A;d++)for(let p=-A;p\u003c=A;p++)d*d+p*p\u003c=c\u0026\u0026(l.push(d),u.push(p));if(this.viaOffsetsLen=l.length,this.viaOffsetsDr=new Int32Array(l),this.viaOffsetsDc=new Int32Array(u),this.viaMinDistFromBorder\u003e0){const d=Math.ceil(this.viaMinDistFromBorder/n);this.minViaRow=d,this.maxViaRow=this.rows-1-d,this.minViaCol=d,this.maxViaCol=this.cols-1-d}else this.minViaRow=0,this.maxViaRow=this.rows-1,this.minViaCol=0,this.maxViaCol=this.cols-1;this.unsolvedSegs=this.buildConnectionSegs(),this.sharedCrossRootPortCells=new Set;const g=new Map;for(const d of this.nodeWithPortPoints.portPoints){const p=this.connNameToId.get(d.connectionName);if(p===void 0)continue;const m=this.pointToCell(d),_=(m.z*this.rows+m.row)*this.cols+m.col,f=this.connIdToRootNet[p],I=g.get(_);I===void 0?g.set(_,f):I!==f\u0026\u0026this.sharedCrossRootPortCells.add(_);const C=this.portOwnerFlat[_];this.portOwnerFlat[_]=C===-1||C===p?p:-2}this.solvedRoutes=new Map,this.usedIndicesByConn=[],this.usedDiagIndicesByConn=[],this.ripCount=[],this.consecutiveSkips=0,this.penaltyCap=.5*this.hyperParameters.ripCost,this.shuffleConnections();const h=eft({planeSize:this.planeSize,layers:this.layers,connectionCount:this.unsolvedSegs.length,effort:this.effort,maxIterations:this.MAX_ITERATIONS});this.baseSearchBudgetIters=h.baseSearchBudgetIters,this.MAX_ITERATIONS=h.maxIterationsIters,this.activeConnSeg=null,this.activeConnId=-1,this.nodePool=[],this.heap=new cXn,this.seqCounter=0}_step(){for(let e=0;e\u003cthis.stepMultiplier;e++){if(this.solved||this.failed)return;this.stepOnce()}}stepOnce(){if(!this.activeConnSeg){if(this.unsolvedSegs.length===0)return void(this.solved=!0);const C=this.unsolvedSegs.shift();this.activeConnSeg=C,this.activeConnId=C.connId,this.crossLayerSearch=C.startZ!==C.endZ,this.nodePool=[],this.heap.clear(),this.seqCounter=0,this.searchIterations=0,this.nextStamp();const y=this.computeH(C.startZ,C.startRow,C.startCol,C.endZ,C.endRow,C.endCol)*this.hyperParameters.greedyMultiplier;return this.nodePool.push({z:C.startZ,row:C.startRow,col:C.startCol,g:0,f:y,parentIdx:-1,ripped:null}),void this.heap.push(y,this.seqCounter++,0)}this.searchIterations++;const e=this.ripCount[this.activeConnId]??0,n=Math.round(this.baseSearchBudgetIters*(1+.25*Math.min(e,10)));if(this.searchIterations\u003en){const C=this.penalty2d;for(let y=0;y\u003cC.length;y++)C[y]=.9*C[y];return this.unsolvedSegs.push(this.activeConnSeg),this.activeConnSeg=null,this.activeConnId=-1,this.heap.clear(),this.nodePool=[],this.consecutiveSkips++,void(this.consecutiveSkips\u003e=3*this.unsolvedSegs.length\u0026\u0026(this.error=`Convergence failure: ${this.unsolvedSegs.length} connections stuck`,this.failed=!0))}if(this.heap.size===0)return this.error=`No path found for ${this.connIdToName[this.activeConnId]}`,void(this.failed=!0);const o=this.heap.pop(),i=this.nodePool[o],{z:r,row:s,col:a,g:A,ripped:c}=i,l=(r*this.rows+s)*this.cols+a;if(this.visitedStamp[l]===this.stamp)return;this.visitedStamp[l]=this.stamp;const u=this.activeConnSeg;if(r===u.endZ\u0026\u0026s===u.endRow\u0026\u0026a===u.endCol)return this.finalizeRoute(o),this.activeConnSeg=null,void(this.activeConnId=-1);const g=u.endZ,h=u.endRow,d=u.endCol,p=this.activeConnId,m=this.rows,_=this.cols,f=(this.cellSizeMm,this.visitedStamp),I=this.stamp;for(let C=0;C\u003c8;C++){const y=s+lXn[C],x=a+uXn[C];if(y\u003c0||y\u003e=m||x\u003c0||x\u003e=_||f[(r*m+y)*_+x]===I||(this.computeMoveCostAndRips(p,r,s,a,r,y,x,c),this._moveCost\u003c0))continue;const E=A+this._moveCost,B=E+this.computeH(r,y,x,g,h,d)*this.hyperParameters.greedyMultiplier,S=this.nodePool.length;this.nodePool.push({z:r,row:y,col:x,g:E,f:B,parentIdx:o,ripped:this._moveRipped}),this.heap.push(B,this.seqCounter++,S)}if(s\u003e=this.minViaRow\u0026\u0026s\u003c=this.maxViaRow\u0026\u0026a\u003e=this.minViaCol\u0026\u0026a\u003c=this.maxViaCol)for(let C=0;C\u003cthis.layers;C++){if(C===r||f[(C*m+s)*_+a]===I||(this.computeMoveCostAndRips(p,r,s,a,C,s,a,c),this._moveCost\u003c0))continue;const y=A+this._moveCost,x=y+this.computeH(C,s,a,g,h,d)*this.hyperParameters.greedyMultiplier,E=this.nodePool.length;this.nodePool.push({z:C,row:s,col:a,g:y,f:x,parentIdx:o,ripped:this._moveRipped}),this.heap.push(x,this.seqCounter++,E)}}computeMoveCostAndRips(e,n,o,i,r,s,a,A){let c=0,l=A;const u=this.cols;if(n!==r){c+=this.hyperParameters.viaBaseCost,c+=Math.min(this.penalty2d[s*u+a],this.penaltyCap);const g=(r*this.rows+s)*u+a,h=this.portOwnerFlat[g],d=this.connIdToRootNet[h]===this.connIdToRootNet[e]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]),p=this.activeConnSeg,m=!!p\u0026\u0026r===p.endZ\u0026\u0026s===p.endRow\u0026\u0026a===p.endCol;if(h\u003e=0\u0026\u0026h!==e\u0026\u0026!d\u0026\u0026!m)return this._moveCost=-1,void(this._moveRipped=l);this.fillViaOccupants(s,a,e);const _=this._viaOccs;for(let f=0;f\u003c_.length;f++){const I=_[f];tft(l,I)||(c+=this.hyperParameters.ripCost,l={id:I,prev:l}),c+=this.hyperParameters.ripViaPenalty}}else{const g=o\u003es?o-s:s-o,h=i\u003ea?i-a:a-i;c+=(g+h\u003e1?Math.SQRT2:1)*this.cellSizeMm,c+=Math.min(this.penalty2d[s*u+a],this.penaltyCap);const d=(r*this.rows+s)*u+a,p=this.portOwnerFlat[d],m=this.connIdToRootNet[p]===this.connIdToRootNet[e]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]),_=this.activeConnSeg,f=!!_\u0026\u0026r===_.endZ\u0026\u0026s===_.endRow\u0026\u0026a===_.endCol;if(p\u003e=0\u0026\u0026p!==e\u0026\u0026!m\u0026\u0026!f)return this._moveCost=-1,void(this._moveRipped=l);const I=this.usedCellsFlat[d],C=this.connIdToRootNet[I]===this.connIdToRootNet[e]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]);if(I===-1||I===e||C||(tft(l,I)||(c+=this.hyperParameters.ripCost,l={id:I,prev:l}),c+=this.hyperParameters.ripTracePenalty),g===1\u0026\u0026h===1){const y=o\u003cs?o:s,x=i\u003ca?i:a,E=1^(o\u003cs\u0026\u0026i\u003ca||o\u003es\u0026\u0026i\u003ea?0:1),B=this.cols-1,S=2*((r*(this.rows-1)+y)*B+x),Q=this.usedDiagFlat[S+E],w=this.connIdToRootNet[Q]===this.connIdToRootNet[e]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]);if(Q!==-1\u0026\u0026Q!==e\u0026\u0026!w)return this._moveCost=-1,void(this._moveRipped=l)}}this._moveCost=c,this._moveRipped=l}fillViaOccupants(e,n,o){const i=this._viaOccs;i.length=0;const r=this.rows,s=this.cols,a=this.viaOffsetsDr,A=this.viaOffsetsDc,c=this.viaOffsetsLen,l=this.usedCellsFlat;for(let u=0;u\u003cthis.layers;u++){const g=u*this.planeSize;for(let h=0;h\u003cc;h++){const d=e+a[h],p=n+A[h];if(d\u003c0||p\u003c0||d\u003e=r||p\u003e=s)continue;const m=l[g+d*s+p];if(m===-1||m===o||this.connIdToRootNet[m]===this.connIdToRootNet[o]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[o]))continue;let _=!1;for(let f=0;f\u003ci.length;f++)if(i[f]===m){_=!0;break}_||i.push(m)}}}shouldSkipFixedPortHalo(e,n){const o=this.portOwnerFlat[e];return o===n?!1:o===-2?!0:o\u003c0?!1:!(this.connIdToRootNet[o]===this.connIdToRootNet[n]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[n]))}nextStamp(){this.stamp=this.stamp+1\u003e\u003e\u003e0,this.stamp===0\u0026\u0026(this.visitedStamp.fill(0),this.stamp=1)}computeH(e,n,o,i,r,s){const a=Math.abs(n-r)+Math.abs(o-s);if(e===i)return a*this.cellSizeMm;if(!this.crossLayerSearch)return a*this.cellSizeMm+this.hyperParameters.viaBaseCost;const A=Math.max(this.minViaRow,Math.min(this.maxViaRow,n)),c=Math.max(this.minViaCol,Math.min(this.maxViaCol,o)),l=Math.max(this.minViaRow,Math.min(this.maxViaRow,r)),u=Math.max(this.minViaCol,Math.min(this.maxViaCol,s)),g=Math.abs(n-A)+Math.abs(o-c)+Math.abs(A-r)+Math.abs(c-s),h=Math.abs(n-l)+Math.abs(o-u)+Math.abs(l-r)+Math.abs(u-s);return Math.max(Math.min(g,h),a)*this.cellSizeMm+this.hyperParameters.viaBaseCost}internConn(e,n){const o=this.connNameToId.get(e);if(o!==void 0)return o;const i=this.connIdToName.length;var r;return this.connIdToName.push(e),this.connIdToRootNet.push((r=e,n??r.replace(/_mst\\d+$/,\"\"))),this.connNameToId.set(e,i),i}buildConnectionSegs(){const e=new Map;for(const i of this.nodeWithPortPoints.portPoints){const r=i.connectionName;e.has(r)||e.set(r,{points:[],rootConnectionName:i.rootConnectionName}),e.get(r).points.push(i)}const n=[],o=new Set;for(const[i,r]of e){const s=r.points,a=Z_t(s);if(a.length===0)continue;const A=this.internConn(i,r.rootConnectionName);for(const[c,l]of a){const u=this.pointToCell(c),g=this.pointToCell(l),h=`${u.z}:${u.row}:${u.col}`,d=`${g.z}:${g.row}:${g.col}`,p=h\u003cd?`${h}|${d}`:`${d}|${h}`,m=r.rootConnectionName??i,_=`${m}|${p}`;o.has(_)?this.overlapFriendlyRootNets.add(m):(o.add(_),n.push({connId:A,startZ:u.z,startRow:u.row,startCol:u.col,startPoint:c,endZ:g.z,endRow:g.row,endCol:g.col,endPoint:l}))}}return n}pointToCell(e){const n=Math.max(0,Math.min(this.cols-1,Math.round((e.x-this.gridOrigin.x)/this.cellSizeMm-.5))),o=Math.max(0,Math.min(this.rows-1,Math.round((e.y-this.gridOrigin.y)/this.cellSizeMm-.5)));return{z:this.zToLayer.get(e.z)??0,row:o,col:n}}shuffleConnections(){const e=this.unsolvedSegs;let n=this.hyperParameters.shuffleSeed;const o=()=\u003e(n=1664525*n+1013904223\u00264294967295,(n\u003e\u003e\u003e0)/4294967295);for(let i=e.length-1;i\u003e0;i--){const r=Math.floor(o()*(i+1)),s=e[i];e[i]=e[r],e[r]=s}}finalizeRoute(e){this.consecutiveSkips=Math.max(0,this.consecutiveSkips-1);const n=[];let o=e;for(;o\u003e=0;){const E=this.nodePool[o];n.push({z:E.z,row:E.row,col:E.col}),o=E.parentIdx}for(n.reverse();n.length\u003e1;){const E=n[0],B=(E.z*this.rows+E.row)*this.cols+E.col;if(!this.sharedCrossRootPortCells.has(B))break;n.shift()}for(;n.length\u003e1;){const E=n[n.length-1],B=(E.z*this.rows+E.row)*this.cols+E.col;if(!this.sharedCrossRootPortCells.has(B))break;n.pop()}const i=[];for(let E=1;E\u003cn.length;E++)n[E].z!==n[E-1].z\u0026\u0026i.push({row:n[E].row,col:n[E].col});const r=n[0],s=n[n.length-1],a=this.activeConnId,A=[];for(let E=this.nodePool[e].ripped;E;E=E.prev)A.push(E.id);for(let E=0;E\u003cA.length;E++)if(this.ripTrace(A[E]),this.failed)return;const c=Math.ceil(this.traceMargin/this.cellSizeMm),l=[],u=this.rows,g=this.cols,h=this.usedCellsFlat;for(let E=0;E\u003cn.length;E++){const B=n[E];for(let S=-c;S\u003c=c;S++)for(let Q=-c;Q\u003c=c;Q++){const w=B.row+S,M=B.col+Q;if(w\u003c0||w\u003e=u||M\u003c0||M\u003e=g)continue;const k=(B.z*u+w)*g+M;if((w!==B.row||M!==B.col)\u0026\u0026this.shouldSkipFixedPortHalo(k,a))continue;const R=h[k],F=this.connIdToRootNet[R]===this.connIdToRootNet[a]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[a]);(R===-1||R===a||F)\u0026\u0026(h[k]=a,l.push(k))}}const d=[],p=this.viaOffsetsDr,m=this.viaOffsetsDc,_=this.viaOffsetsLen;for(let E=0;E\u003ci.length;E++){const B=i[E];for(let S=0;S\u003cthis.layers;S++){const Q=S*this.planeSize;for(let w=0;w\u003c_;w++){const M=B.row+p[w],k=B.col+m[w];if(M\u003c0||M\u003e=u||k\u003c0||k\u003e=g)continue;const R=Q+M*g+k;if((M!==B.row||k!==B.col)\u0026\u0026this.shouldSkipFixedPortHalo(R,a))continue;const F=h[R],O=this.connIdToRootNet[F]===this.connIdToRootNet[a]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[a]);if(F!==-1\u0026\u0026F!==a\u0026\u0026!O){let U=!1;for(let Y=0;Y\u003cd.length;Y++)if(d[Y]===F){U=!0;break}U||d.push(F)}h[R]=a,l.push(R)}}}const f=[],I=this.cols-1;for(let E=1;E\u003cn.length;E++){const B=n[E-1],S=n[E];if(B.z!==S.z)continue;const Q=B.row\u003eS.row?B.row-S.row:S.row-B.row,w=B.col\u003eS.col?B.col-S.col:S.col-B.col;if(Q!==1||w!==1)continue;const M=B.row\u003cS.row?B.row:S.row,k=B.col\u003cS.col?B.col:S.col,R=B.row\u003cS.row\u0026\u0026B.col\u003cS.col||B.row\u003eS.row\u0026\u0026B.col\u003eS.col?0:1,F=1^R,O=2*((B.z*(this.rows-1)+M)*I+k),U=O+F,Y=this.usedDiagFlat[U],W=this.connIdToRootNet[Y]===this.connIdToRootNet[a]\u0026\u0026this.overlapFriendlyRootNets.has(this.connIdToRootNet[a]);if(Y!==-1\u0026\u0026Y!==a\u0026\u0026!W)continue;const te=O+R;this.usedDiagFlat[te]=a,f.push(te)}for(;this.usedIndicesByConn.length\u003c=a;)this.usedIndicesByConn.push([]);const C=this.usedIndicesByConn[a]??[];for(C.push(...l),this.usedIndicesByConn[a]=C;this.usedDiagIndicesByConn.length\u003c=a;)this.usedDiagIndicesByConn.push([]);const y=this.usedDiagIndicesByConn[a]??[];y.push(...f),this.usedDiagIndicesByConn[a]=y;const x=this.solvedRoutes.get(a)??[];x.push({connId:a,startZ:r.z,startRow:r.row,startCol:r.col,startPoint:this.activeConnSeg.startPoint,endZ:s.z,endRow:s.row,endCol:s.col,endPoint:this.activeConnSeg.endPoint,cells:n,viaCells:i}),this.solvedRoutes.set(a,x);for(let E=0;E\u003cd.length;E++)if(this.ripTrace(d[E]),this.failed)return;if(A.length\u003e0||d.length\u003e0){const E=this.penalty2d,B=this.penaltyCap;if(this.totalRipEvents\u003e50)for(let S=0;S\u003cE.length;S++)E[S]=.99*E[S];else for(let S=0;S\u003cE.length;S++)E[S]\u003eB\u0026\u0026(E[S]=.5*E[S])}}ripTrace(e){for(;this.ripCount.length\u003c=e;)this.ripCount.push(0);if(this.ripCount[e]++,this.totalRipEvents++,this.totalRipEvents\u003e=this.MAX_RIPS)return this.error=`Convergence failure: exceeded MAX_RIPS ${this.MAX_RIPS}`,void(this.failed=!0);const n=this.solvedRoutes.get(e)??[];if(n.length\u003e0){const r=this.cols;for(const s of n){for(let a=0;a\u003cs.cells.length;a++){const A=s.cells[a],c=A.row*r+A.col;this.penalty2d[c]=this.penalty2d[c]+this.hyperParameters.ripTracePenalty}for(let a=0;a\u003cs.viaCells.length;a++){const A=s.viaCells[a],c=A.row*r+A.col;this.penalty2d[c]=this.penalty2d[c]+this.hyperParameters.ripViaPenalty}}}const o=this.usedIndicesByConn[e];if(o){const r=this.usedCellsFlat;for(let s=0;s\u003co.length;s++){const a=o[s];r[a]===e\u0026\u0026(r[a]=-1)}this.usedIndicesByConn[e]=[]}const i=this.usedDiagIndicesByConn[e];if(i){const r=this.usedDiagFlat;for(let s=0;s\u003ci.length;s++){const a=i[s];r[a]===e\u0026\u0026(r[a]=-1)}this.usedDiagIndicesByConn[e]=[]}if(n.length\u003e0){this.solvedRoutes.delete(e);for(const r of n)this.unsolvedSegs.push({connId:e,startZ:r.startZ,startRow:r.startRow,startCol:r.startCol,startPoint:r.startPoint,endZ:r.endZ,endRow:r.endRow,endCol:r.endCol,endPoint:r.endPoint})}}visualize(){const e=[\"red\",\"blue\",\"orange\",\"green\"],n=[],o=[],i=[],r=[],{width:s,height:a,center:A}=this.nodeWithPortPoints;r.push({center:{x:A.x,y:A.y},width:s,height:a,stroke:\"gray\"});const c=this.gridToBoundsTransform;if(this.showPenaltyMap\u0026\u0026this.penalty2d){let g=0;for(let h=0;h\u003cthis.penalty2d.length;h++)this.penalty2d[h]\u003eg\u0026\u0026(g=this.penalty2d[h]);if(g\u003e0)for(let h=0;h\u003cthis.rows;h++)for(let d=0;d\u003cthis.cols;d++){const p=this.penalty2d[h*this.cols+d];if(p\u003c=0)continue;const m=Math.min(.6,p/g*.6),_=s7(c,{x:this.gridOrigin.x+(d+.5)*this.cellSizeMm,y:this.gridOrigin.y+(h+.5)*this.cellSizeMm});r.push({center:_,width:this.cellSizeMm*c.a,height:this.cellSizeMm*c.e,fill:`rgba(255,165,0,${m.toFixed(3)})`})}}if(this.showUsedCellMap\u0026\u0026this.usedCellsFlat)for(let g=0;g\u003cthis.layers;g++)for(let h=0;h\u003cthis.rows;h++)for(let d=0;d\u003cthis.cols;d++){if(this.usedCellsFlat[(g*this.rows+h)*this.cols+d]===-1)continue;const p=s7(c,{x:this.gridOrigin.x+(d+.5)*this.cellSizeMm,y:this.gridOrigin.y+(h+.5)*this.cellSizeMm});r.push({center:p,width:this.cellSizeMm*c.a,height:this.cellSizeMm*c.e,fill:\"rgba(0,0,255,0.5)\"})}for(const g of this.nodeWithPortPoints.portPoints)n.push({x:g.x,y:g.y,color:e[g.z]??\"gray\",label:g.connectionName});const l=[\"rgba(255,0,0,0.75)\",\"rgba(0,0,255,0.75)\",\"rgba(255,165,0,0.75)\",\"rgba(0,128,0,0.75)\"],u=this.getOutput();for(const g of u){if(g.route.length\u003c2)continue;let h=0;for(let d=1;d\u003cg.route.length;d++){const p=g.route[d-1];g.route[d].z!==p.z\u0026\u0026(d-h\u003e=2\u0026\u0026o.push({points:g.route.slice(h,d).map(m=\u003e({x:m.x,y:m.y})),strokeColor:l[p.z]??\"rgba(128,128,128,0.75)\",strokeWidth:this.traceThickness}),h=d)}if(g.route.length-h\u003e=2){const d=g.route[h].z;o.push({points:g.route.slice(h).map(p=\u003e({x:p.x,y:p.y})),strokeColor:l[d]??\"rgba(128,128,128,0.75)\",strokeWidth:this.traceThickness})}}for(const g of u)for(const h of g.vias)i.push({center:{x:h.x,y:h.y},radius:this.viaDiameter/2,fill:\"rgba(0,0,0,0.3)\",stroke:\"black\"});if(this.activeConnSeg\u0026\u0026this.visitedStamp){const g=this.stamp;for(let h=0;h\u003cthis.layers;h++)for(let d=0;d\u003cthis.rows;d++)for(let p=0;p\u003cthis.cols;p++){if(this.visitedStamp[(h*this.rows+d)*this.cols+p]!==g)continue;const m=s7(c,{x:this.gridOrigin.x+(p+.5)*this.cellSizeMm,y:this.gridOrigin.y+(d+.5)*this.cellSizeMm});n.push({x:m.x,y:m.y,color:\"rgba(0,0,255,0.2)\"})}}return{points:n,lines:o,circles:i,rects:r,coordinateSystem:\"cartesian\",title:`HighDensityA01 [${this.solvedRoutes?.size??0} solved, ${this.unsolvedSegs?.length??0} remaining]`}}getOutput(){const e=this.gridToBoundsTransform,n=[];for(const[o,i]of this.solvedRoutes??[]){const r=this.connIdToName[o];for(const s of i){const a=s.cells.map(A=\u003e{const c=this.gridOrigin.x+(A.col+.5)*this.cellSizeMm,l=this.gridOrigin.y+(A.row+.5)*this.cellSizeMm,u=s7(e,{x:c,y:l});return{x:u.x,y:u.y,z:this.layerToZ.get(A.z)??A.z}});a.length\u003e0\u0026\u0026(a[0]={...s.startPoint},a.length\u003e1\u0026\u0026(a[a.length-1]={...s.endPoint})),n.push({connectionName:r,rootConnectionName:this.connIdToRootNet[o],regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:a,vias:s.viaCells.map(A=\u003e{const c=this.gridOrigin.x+(A.col+.5)*this.cellSizeMm,l=this.gridOrigin.y+(A.row+.5)*this.cellSizeMm;return s7(e,{x:c,y:l})})})}}return n}},Q7e=[\"left\",\"top\",\"right\",\"bottom\",\"middle\"],gXn=class{f=new Float64Array(1024);seq=new Uint32Array(1024);id=new Int32Array(1024);n=0;push(e,n,o){this.ensureCapacity(this.n+1);let i=this.n++;for(this.f[i]=e,this.seq[i]=n,this.id[i]=o;i\u003e0;){const r=i-1\u003e\u003e1;if(this.less(r,i))break;this.swap(i,r),i=r}}pop(){const e=this.id[0];return this.n--,this.n\u003e0\u0026\u0026(this.f[0]=this.f[this.n],this.seq[0]=this.seq[this.n],this.id[0]=this.id[this.n],this.siftDown(0)),e}get size(){return this.n}clear(){this.n=0}ensureCapacity(e){if(e\u003c=this.f.length)return;let n=this.f.length;for(;n\u003ce;)n*=2;const o=new Float64Array(n);o.set(this.f),this.f=o;const i=new Uint32Array(n);i.set(this.seq),this.seq=i;const r=new Int32Array(n);r.set(this.id),this.id=r}siftDown(e){for(;;){const n=2*e+1,o=n+1;if(n\u003e=this.n)return;let i=n;if(o\u003cthis.n\u0026\u0026!this.less(n,o)\u0026\u0026(i=o),this.less(e,i))return;this.swap(e,i),e=i}}less(e,n){const o=this.f[e],i=this.f[n];return o!==i?o\u003ci:this.seq[e]\u003cthis.seq[n]}swap(e,n){const o=this.f[e];this.f[e]=this.f[n],this.f[n]=o;const i=this.seq[e];this.seq[e]=this.seq[n],this.seq[n]=i;const r=this.id[e];this.id[e]=this.id[n],this.id[n]=r}},dXn=class{z=new Int32Array(1024);cellId=new Int32Array(1024);g=new Float64Array(1024);parent=new Int32Array(1024);ripHead=new Int32Array(1024).fill(-1);ripCount=new Int32Array(1024);length=0;clear(){this.length=0}push(e,n,o,i,r,s){this.ensureCapacity(this.length+1);const a=this.length++;return this.z[a]=e,this.cellId[a]=n,this.g[a]=o,this.parent[a]=i,this.ripHead[a]=r,this.ripCount[a]=s,a}ensureCapacity(e){if(e\u003c=this.z.length)return;let n=this.z.length;for(;n\u003ce;)n*=2;const o=new Int32Array(n);o.set(this.z),this.z=o;const i=new Int32Array(n);i.set(this.cellId),this.cellId=i;const r=new Float64Array(n);r.set(this.g),this.g=r;const s=new Int32Array(n);s.set(this.parent),this.parent=s;const a=new Int32Array(n);a.fill(-1),a.set(this.ripHead.subarray(0,this.length)),this.ripHead=a;const A=new Int32Array(n);A.set(this.ripCount.subarray(0,this.length)),this.ripCount=A}},hXn=class{connId=new Int32Array(1024);prev=new Int32Array(1024).fill(-1);length=0;clear(){this.length=0}append(e,n){this.ensureCapacity(this.length+1);const o=this.length++;return this.connId[o]=n,this.prev[o]=e,o}contains(e,n){for(let o=e;o\u003e=0;o=this.prev[o])if(this.connId[o]===n)return!0;return!1}collect(e,n){n.length=0;for(let o=e;o\u003e=0;o=this.prev[o])n.push(this.connId[o])}ensureCapacity(e){if(e\u003c=this.connId.length)return;let n=this.connId.length;for(;n\u003ce;)n*=2;const o=new Int32Array(n);o.set(this.connId),this.connId=o;const i=new Int32Array(n);i.fill(-1),i.set(this.prev.subarray(0,this.length)),this.prev=i}};function a7(t,e,n){return Math.max(e,Math.min(n,t))}function zse(t,e){for(let n=0;n\u003ct.length;n++)if(t[n]===e)return;t.push(e)}function nft(t,e){for(let n=0;n\u003ct.length;n++)if(t[n].cellId===e.cellId)return;t.push(e)}function v7e(t,e,n,o,i,r,s){const a=t-a7(t,o,r),A=e-a7(e,i,s);return a*a+A*A\u003c=n*n}var w7e=class extends zA{getSolverName(){return\"HighDensitySolverA03\"}nodeWithPortPoints;highResolutionCellSize;highResolutionCellThickness;lowResolutionCellSize;viaDiameter;MAX_RIPS;maxCellCount;traceThickness;traceMargin;viaMinDistFromBorder;showPenaltyMap;showUsedCellMap;effort;stepMultiplier;hyperParameters;initialPenaltyFn;boundsMinX;boundsMaxX;boundsMinY;boundsMaxY;gridToBoundsTransform;availableZ;zToLayer;layerToZ;layers;fineRows;fineCols;lowScale;bandRows;bandCols;regions;planeSize;cellCenterX;cellCenterY;cellMinX;cellMinY;cellMaxX;cellMaxY;cellWidth;cellHeight;cellRegion;cellRow;cellCol;viaAllowed;neighborOffset;neighborIds;neighborCosts;usedCellsFlat;sharedCellsFlat;portOwnerFlat;penalty2d;ripStateBuckets;visitedStamp;bestGStamp;bestGValue;visitedFlatStamp;sharedCrossRootPortFlat;stamp=0;connNameToId;connIdToName;connIdToRootNet;overlapFriendlyRootNets;usedIndicesByConn;unsolvedSegs;solvedRoutes;activeConnSeg=null;activeConnId=-1;nodePool;heap;ripChain;seqCounter=0;_viaOccs=[];_cellOccs=[];_rippedIds=[];ripCount;totalRipEvents=0;searchIterations=0;consecutiveSkips=0;penaltyCap;baseSearchBudgetIters;_moveCost=0;_moveRippedHead=-1;_moveRipCount=0;traceKeepoutRadius;viaKeepoutRadius;get unsolvedConnections(){return this.unsolvedSegs}get solvedConnectionsMap(){const e=new Map;for(let n=0;n\u003cthis.solvedRoutes.length;n++){const o=this.getSolvedRoutesForConn(n);o.length\u003e0\u0026\u0026e.set(n,o)}return e}get activeConnection(){if(!this.activeConnSeg)return null;const e=this.activeConnSeg.startCellId,n=this.activeConnSeg.endCellId;return{connectionName:this.connIdToName[this.activeConnSeg.connId]??\"\",start:{cellId:e,region:Q7e[this.cellRegion[e]],row:this.cellRow[e],col:this.cellCol[e],x:this.cellCenterX[e],y:this.cellCenterY[e],z:this.activeConnSeg.startZ},end:{cellId:n,region:Q7e[this.cellRegion[n]],row:this.cellRow[n],col:this.cellCol[n],x:this.cellCenterX[n],y:this.cellCenterY[n],z:this.activeConnSeg.endZ}}}get openSet(){return{length:this.heap?.size??0}}get gridStats(){return{cells:this.planeSize||0,layers:this.layers||0,states:(this.planeSize||0)*(this.layers||0),ripStateBuckets:this.ripStateBuckets||0,neighborEdges:this.neighborIds?.length??0,regionCounts:this.regions?Object.fromEntries(this.regions.map(e=\u003e[e.name,e.rows*e.cols])):{}}}constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.highResolutionCellSize=e.highResolutionCellSize??.1,this.highResolutionCellThickness=Math.max(1,Math.floor(e.highResolutionCellThickness??8)),this.lowResolutionCellSize=e.lowResolutionCellSize??.4,this.viaDiameter=e.viaDiameter,this.maxCellCount=e.maxCellCount,this.traceThickness=e.traceThickness??.1,this.traceMargin=e.traceMargin??.15,this.viaMinDistFromBorder=e.viaMinDistFromBorder??.15,this.showPenaltyMap=e.showPenaltyMap??!1,this.showUsedCellMap=e.showUsedCellMap??!1,this.effort=e.effort??1,this.stepMultiplier=Math.max(1,Math.floor(e.stepMultiplier??1)),this.hyperParameters={shuffleSeed:0,ripCost:8,ripTracePenalty:.5,ripViaPenalty:.75,viaBaseCost:.1,greedyMultiplier:1.5,...e.hyperParameters},this.MAX_ITERATIONS=1e8,this.MAX_RIPS=200,this.initialPenaltyFn=e.initialPenaltyFn}getConstructorParams(){return[{nodeWithPortPoints:this.nodeWithPortPoints,highResolutionCellSize:this.highResolutionCellSize,highResolutionCellThickness:this.highResolutionCellThickness,lowResolutionCellSize:this.lowResolutionCellSize,viaDiameter:this.viaDiameter,maxCellCount:this.maxCellCount,stepMultiplier:this.stepMultiplier,traceThickness:this.traceThickness,traceMargin:this.traceMargin,viaMinDistFromBorder:this.viaMinDistFromBorder,showPenaltyMap:this.showPenaltyMap,showUsedCellMap:this.showUsedCellMap,effort:this.effort,hyperParameters:this.hyperParameters,initialPenaltyFn:this.initialPenaltyFn}]}_setup(){const{nodeWithPortPoints:e}=this,{width:n,height:o,center:i}=e,r=this.lowResolutionCellSize/this.highResolutionCellSize,s=Math.round(r);if(!Number.isFinite(r)||r\u003c=0||Math.abs(r-s)\u003e1e-9)return this.error=\"lowResolutionCellSize must be a positive integer multiple of highResolutionCellSize\",void(this.failed=!0);this.lowScale=Math.max(1,s),this.availableZ=e.availableZ??[...new Set(e.portPoints.map(h=\u003eh.z))].sort((h,d)=\u003eh-d),this.layers=this.availableZ.length,this.zToLayer=new Map,this.layerToZ=new Map;for(let h=0;h\u003cthis.availableZ.length;h++){const d=this.availableZ[h];this.zToLayer.set(d,h),this.layerToZ.set(h,d)}this.boundsMinX=i.x-n/2,this.boundsMaxX=i.x+n/2,this.boundsMinY=i.y-o/2,this.boundsMaxY=i.y+o/2,this.traceKeepoutRadius=this.traceMargin+this.traceThickness/2,this.viaKeepoutRadius=this.viaDiameter/2+this.traceKeepoutRadius,this.buildFiveRegionGrid(n,o),this.gridToBoundsTransform=this.computeGridToBoundsTransform();const a=this.layers*this.planeSize;if(this.maxCellCount!==void 0\u0026\u0026a\u003ethis.maxCellCount)return this.error=`Cell count ${a} exceeds maxCellCount ${this.maxCellCount}`,void(this.failed=!0);this.connNameToId=new Map,this.connIdToName=[],this.connIdToRootNet=[],this.overlapFriendlyRootNets=new Set,this.unsolvedSegs=this.buildConnectionSegs(),this.penalty2d=new Float64Array(this.planeSize);const A=n\u003e0?1/n:0,c=o\u003e0?1/o:0;for(let h=0;h\u003cthis.planeSize;h++){let d=0;this.initialPenaltyFn\u0026\u0026(d+=this.initialPenaltyFn({x:this.cellCenterX[h],y:this.cellCenterY[h],px:(this.cellCenterX[h]-this.boundsMinX)*A,py:(this.cellCenterY[h]-this.boundsMinY)*c,cellId:h,region:Q7e[this.cellRegion[h]],row:this.cellRow[h],col:this.cellCol[h]})),this.penalty2d[h]=d}this.usedCellsFlat=new Int32Array(a).fill(-1),this.sharedCellsFlat=Array.from({length:a},()=\u003e{}),this.portOwnerFlat=new Int32Array(a).fill(-1),this.sharedCrossRootPortFlat=new Uint8Array(a),this.ripStateBuckets=1;const l=a;this.visitedStamp=new Uint32Array(l),this.bestGStamp=new Uint32Array(l),this.bestGValue=new Float64Array(l),this.visitedFlatStamp=new Uint32Array(a),this.stamp=0;const u=new Map;for(const h of this.nodeWithPortPoints.portPoints){const d=this.connNameToId.get(h.connectionName);if(d===void 0)continue;const p=this.pointToCell(h),m=p.z*this.planeSize+p.cellId,_=this.connIdToRootNet[d],f=u.get(m);f===void 0?u.set(m,_):f!==_\u0026\u0026(this.sharedCrossRootPortFlat[m]=1);const I=this.portOwnerFlat[m];this.portOwnerFlat[m]=I===-1||I===d?d:-2}this.solvedRoutes=[],this.usedIndicesByConn=[],this.ripCount=[],this.consecutiveSkips=0,this.penaltyCap=.5*this.hyperParameters.ripCost,this.shuffleConnections();const g=eft({planeSize:this.planeSize,layers:this.layers,connectionCount:this.unsolvedSegs.length,effort:this.effort,maxIterations:this.MAX_ITERATIONS});this.baseSearchBudgetIters=g.baseSearchBudgetIters,this.MAX_ITERATIONS=g.maxIterationsIters,this.activeConnSeg=null,this.activeConnId=-1,this.nodePool=new dXn,this.heap=new gXn,this.ripChain=new hXn,this.seqCounter=0}_step(){for(let e=0;e\u003cthis.stepMultiplier;e++){if(this.solved||this.failed)return;this.stepOnce()}}buildFiveRegionGrid(e,n){this.fineCols=Math.max(1,Math.ceil(e/this.highResolutionCellSize)),this.fineRows=Math.max(1,Math.ceil(n/this.highResolutionCellSize)),this.bandCols=Math.min(this.highResolutionCellThickness,Math.floor(this.fineCols/2)),this.bandRows=Math.min(this.highResolutionCellThickness,Math.floor(this.fineRows/2));const o=Math.max(0,this.fineCols-2*this.bandCols),i=Math.max(0,this.fineRows-2*this.bandRows),r=o,s=o;this.regions=[{id:0,name:\"left\",fineOriginRow:0,fineOriginCol:0,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:1,name:\"top\",fineOriginRow:0,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:r,cellScale:1,rows:this.bandRows,cols:r,offset:0},{id:2,name:\"right\",fineOriginRow:0,fineOriginCol:this.fineCols-this.bandCols,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:3,name:\"bottom\",fineOriginRow:this.fineRows-this.bandRows,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:s,cellScale:1,rows:this.bandRows,cols:s,offset:0},{id:4,name:\"middle\",fineOriginRow:this.bandRows,fineOriginCol:this.bandCols,fineRows:i,fineCols:o,cellScale:this.lowScale,rows:i\u003e0?Math.ceil(i/this.lowScale):0,cols:o\u003e0?Math.ceil(o/this.lowScale):0,offset:0}];let a=0;for(let y=0;y\u003cthis.regions.length;y++)this.regions[y].offset=a,a+=this.regions[y].rows*this.regions[y].cols;this.planeSize=a,this.cellCenterX=new Float64Array(this.planeSize),this.cellCenterY=new Float64Array(this.planeSize),this.cellMinX=new Float64Array(this.planeSize),this.cellMinY=new Float64Array(this.planeSize),this.cellMaxX=new Float64Array(this.planeSize),this.cellMaxY=new Float64Array(this.planeSize),this.cellWidth=new Float64Array(this.planeSize),this.cellHeight=new Float64Array(this.planeSize),this.cellRegion=new Uint8Array(this.planeSize),this.cellRow=new Int32Array(this.planeSize),this.cellCol=new Int32Array(this.planeSize),this.viaAllowed=new Uint8Array(this.planeSize);for(let y=0;y\u003cthis.regions.length;y++){const x=this.regions[y];for(let E=0;E\u003cx.rows;E++){const B=x.fineOriginRow+E*x.cellScale,S=Math.min(x.fineOriginRow+x.fineRows,B+x.cellScale),Q=this.boundsMinY+B*this.highResolutionCellSize,w=Math.min(this.boundsMaxY,this.boundsMinY+S*this.highResolutionCellSize);for(let M=0;M\u003cx.cols;M++){const k=x.fineOriginCol+M*x.cellScale,R=Math.min(x.fineOriginCol+x.fineCols,k+x.cellScale),F=this.boundsMinX+k*this.highResolutionCellSize,O=Math.min(this.boundsMaxX,this.boundsMinX+R*this.highResolutionCellSize),U=this.cellIdFor(x.id,E,M);this.cellCenterX[U]=(F+O)/2,this.cellCenterY[U]=(Q+w)/2,this.cellMinX[U]=F,this.cellMinY[U]=Q,this.cellMaxX[U]=O,this.cellMaxY[U]=w,this.cellWidth[U]=O-F,this.cellHeight[U]=w-Q,this.cellRegion[U]=x.id,this.cellRow[U]=E,this.cellCol[U]=M;const Y=Math.min(this.cellCenterX[U]-this.boundsMinX,this.boundsMaxX-this.cellCenterX[U],this.cellCenterY[U]-this.boundsMinY,this.boundsMaxY-this.cellCenterY[U]);this.viaAllowed[U]=Y\u003e=this.viaMinDistFromBorder?1:0}}}const A=Array.from({length:this.planeSize},()=\u003e[]),c=(y,x)=\u003e{if(y===x||y\u003c0||x\u003c0)return;const E=this.cellCenterX[y]-this.cellCenterX[x],B=this.cellCenterY[y]-this.cellCenterY[x],S=Math.hypot(E,B);nft(A[y],{cellId:x,cost:S}),nft(A[x],{cellId:y,cost:S})};for(let y=0;y\u003cthis.regions.length;y++){const x=this.regions[y];for(let E=0;E\u003cx.rows;E++)for(let B=0;B\u003cx.cols;B++){const S=this.cellIdFor(x.id,E,B);E+1\u003cx.rows\u0026\u0026c(S,this.cellIdFor(x.id,E+1,B)),B+1\u003cx.cols\u0026\u0026c(S,this.cellIdFor(x.id,E,B+1))}}const l=this.regions[0],u=this.regions[1],g=this.regions[2],h=this.regions[3],d=this.regions[4],p=l.rows\u003e0\u0026\u0026l.cols\u003e0,m=u.rows\u003e0\u0026\u0026u.cols\u003e0,_=g.rows\u003e0\u0026\u0026g.cols\u003e0,f=h.rows\u003e0\u0026\u0026h.cols\u003e0,I=d.rows\u003e0\u0026\u0026d.cols\u003e0;if(p\u0026\u0026m)for(let y=0;y\u003cthis.bandRows;y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(1,y,0));if(m\u0026\u0026_)for(let y=0;y\u003cthis.bandRows;y++)c(this.cellIdFor(1,y,u.cols-1),this.cellIdFor(2,y,0));if(p\u0026\u0026f)for(let y=this.fineRows-this.bandRows;y\u003cthis.fineRows;y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(3,y-(this.fineRows-this.bandRows),0));if(f\u0026\u0026_)for(let y=this.fineRows-this.bandRows;y\u003cthis.fineRows;y++)c(this.cellIdFor(3,y-(this.fineRows-this.bandRows),h.cols-1),this.cellIdFor(2,y,0));if(p\u0026\u0026I)for(let y=this.bandRows;y\u003cthis.fineRows-this.bandRows;y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(4,Math.floor((y-this.bandRows)/this.lowScale),0));if(_\u0026\u0026I)for(let y=this.bandRows;y\u003cthis.fineRows-this.bandRows;y++)c(this.cellIdFor(4,Math.floor((y-this.bandRows)/this.lowScale),d.cols-1),this.cellIdFor(2,y,0));if(m\u0026\u0026I)for(let y=this.bandCols;y\u003cthis.fineCols-this.bandCols;y++)c(this.cellIdFor(1,u.rows-1,y-this.bandCols),this.cellIdFor(4,0,Math.floor((y-this.bandCols)/this.lowScale)));if(f\u0026\u0026I)for(let y=this.bandCols;y\u003cthis.fineCols-this.bandCols;y++)c(this.cellIdFor(4,d.rows-1,Math.floor((y-this.bandCols)/this.lowScale)),this.cellIdFor(3,0,y-this.bandCols));if(!I\u0026\u0026!m\u0026\u0026!f\u0026\u0026p\u0026\u0026_)for(let y=0;y\u003cMath.min(l.rows,g.rows);y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(2,y,0));if(!I\u0026\u0026!p\u0026\u0026!_\u0026\u0026m\u0026\u0026f)for(let y=0;y\u003cMath.min(u.cols,h.cols);y++)c(this.cellIdFor(1,u.rows-1,y),this.cellIdFor(3,0,y));const C=this.flattenNeighborLists(A);this.neighborOffset=C.offset,this.neighborIds=C.ids,this.neighborCosts=C.costs}cellIdFor(e,n,o){const i=this.regions[e];return i.offset+n*i.cols+o}stepOnce(){if(!this.activeConnSeg){if(this.unsolvedSegs.length===0)return void(this.solved=!0);const I=this.unsolvedSegs.shift();this.activeConnSeg=I,this.activeConnId=I.connId,this.nodePool.clear(),this.ripChain.clear(),this.heap.clear(),this.seqCounter=0,this.searchIterations=0,this.nextStamp();const C=this.computeH(I.startZ,I.startCellId,I.endZ,I.endCellId)*this.hyperParameters.greedyMultiplier,y=this.nodePool.push(I.startZ,I.startCellId,0,-1,-1,0),x=I.startZ*this.planeSize+I.startCellId,E=this.getSearchStateIdx(x,0);return this.bestGStamp[E]=this.stamp,this.bestGValue[E]=0,void this.heap.push(C,this.seqCounter++,y)}this.searchIterations++;const e=this.ripCount[this.activeConnId]??0,n=Math.round(this.baseSearchBudgetIters*(1+.25*Math.min(e,10)));if(this.searchIterations\u003en){const I=this.penalty2d;for(let C=0;C\u003cI.length;C++)I[C]=.9*I[C];return this.unsolvedSegs.push(this.activeConnSeg),this.activeConnSeg=null,this.activeConnId=-1,this.heap.clear(),this.nodePool.clear(),this.consecutiveSkips++,void(this.consecutiveSkips\u003e=Math.max(3,3*this.unsolvedSegs.length)\u0026\u0026(this.error=`Convergence failure: ${this.unsolvedSegs.length} connections stuck`,this.failed=!0))}if(this.heap.size===0)return this.error=`No path found for ${this.connIdToName[this.activeConnId]}`,void(this.failed=!0);const o=this.heap.pop(),i=this.nodePool.z[o],r=this.nodePool.cellId[o],s=this.nodePool.g[o],a=this.nodePool.ripHead[o],A=this.nodePool.ripCount[o],c=i*this.planeSize+r,l=this.getSearchStateIdx(c,A);if(this.visitedStamp[l]===this.stamp)return;this.visitedStamp[l]=this.stamp,this.visitedFlatStamp[c]=this.stamp;const u=this.activeConnSeg;if(i===u.endZ\u0026\u0026r===u.endCellId)return this.finalizeRoute(o),this.activeConnSeg=null,void(this.activeConnId=-1);const g=this.visitedStamp,h=this.stamp,d=this.activeConnId,p=u.endZ,m=u.endCellId,_=this.neighborOffset[r],f=this.neighborOffset[r+1];for(let I=_;I\u003cf;I++){const C=this.neighborIds[I],y=i*this.planeSize+C;if(this.computeMoveCostAndRips(d,i,C,!1,a,A,this.neighborCosts[I]),this._moveCost\u003c0)continue;const x=this.getSearchStateIdx(y,this._moveRipCount);if(g[x]===h)continue;const E=s+this._moveCost;if(this.bestGStamp[x]===h\u0026\u0026E\u003e=this.bestGValue[x])continue;this.bestGStamp[x]=h,this.bestGValue[x]=E;const B=E+this.computeH(i,C,p,m)*this.hyperParameters.greedyMultiplier,S=this.nodePool.push(i,C,E,o,this._moveRippedHead,this._moveRipCount);this.heap.push(B,this.seqCounter++,S)}if(this.viaAllowed[r])for(let I=0;I\u003cthis.layers;I++){if(I===i)continue;const C=I*this.planeSize+r;if(this.computeMoveCostAndRips(d,I,r,!0,a,A,0),this._moveCost\u003c0)continue;const y=this.getSearchStateIdx(C,this._moveRipCount);if(g[y]===h)continue;const x=s+this._moveCost;if(this.bestGStamp[y]===h\u0026\u0026x\u003e=this.bestGValue[y])continue;this.bestGStamp[y]=h,this.bestGValue[y]=x;const E=x+this.computeH(I,r,p,m)*this.hyperParameters.greedyMultiplier,B=this.nodePool.push(I,r,x,o,this._moveRippedHead,this._moveRipCount);this.heap.push(E,this.seqCounter++,B)}}computeMoveCostAndRips(e,n,o,i,r,s,a){let A=0,c=r,l=s;const u=n*this.planeSize+o;if(i){A+=this.hyperParameters.viaBaseCost,A+=Math.min(this.penalty2d[o],this.penaltyCap);const g=this.portOwnerFlat[u],h=this.allowSharedUse(e,g),d=this.activeConnSeg,p=!!d\u0026\u0026n===d.endZ\u0026\u0026o===d.endCellId;if(g\u003e=0\u0026\u0026g!==e\u0026\u0026!h\u0026\u0026!p)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillViaOccupants(o,e);const m=this._viaOccs;for(let _=0;_\u003cm.length;_++){const f=m[_];this.ripChain.contains(c,f)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,f),l++),A+=this.hyperParameters.ripViaPenalty}}else{A+=a,A+=Math.min(this.penalty2d[o],this.penaltyCap);const g=this.portOwnerFlat[u],h=this.allowSharedUse(e,g),d=this.activeConnSeg,p=!!d\u0026\u0026n===d.endZ\u0026\u0026o===d.endCellId;if(g\u003e=0\u0026\u0026g!==e\u0026\u0026!h\u0026\u0026!p)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillTraceOccupants(u,e,this._cellOccs);for(let m=0;m\u003cthis._cellOccs.length;m++){const _=this._cellOccs[m];this.ripChain.contains(c,_)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,_),l++),A+=this.hyperParameters.ripTracePenalty}}this._moveCost=A,this._moveRippedHead=c,this._moveRipCount=l}fillViaOccupants(e,n){const o=this._viaOccs;o.length=0;const i=this.cellCenterX[e],r=this.cellCenterY[e];this.forEachCellNearCircle(i,r,this.viaKeepoutRadius,s=\u003e{if(v7e(i,r,this.viaKeepoutRadius,this.cellMinX[s],this.cellMinY[s],this.cellMaxX[s],this.cellMaxY[s]))for(let a=0;a\u003cthis.layers;a++)this.pushFlatOccupants(a*this.planeSize+s,n,o)})}fillTraceOccupants(e,n,o){o.length=0,this.pushFlatOccupants(e,n,o)}pushFlatOccupants(e,n,o){const i=this.usedCellsFlat[e];i===-1||i===n||this.allowSharedUse(n,i)||zse(o,i);const r=this.sharedCellsFlat[e];if(r)for(let s=0;s\u003cr.length;s++){const a=r[s];a!==n\u0026\u0026(this.allowSharedUse(n,a)||zse(o,a))}}addSharedOccupant(e,n){if(this.usedCellsFlat[e]===n)return;let o=this.sharedCellsFlat[e];o||(o=[],this.sharedCellsFlat[e]=o),zse(o,n)}replaceOccupants(e,n){this.usedCellsFlat[e]=n,this.sharedCellsFlat[e]=void 0}removeOccupant(e,n){const o=this.sharedCellsFlat[e];if(this.usedCellsFlat[e]===n)return void(o\u0026\u0026o.length\u003e0?(this.usedCellsFlat[e]=o.pop(),o.length===0\u0026\u0026(this.sharedCellsFlat[e]=void 0)):this.usedCellsFlat[e]=-1);if(!o)return;const i=o.indexOf(n);i!==-1\u0026\u0026(o.splice(i,1),o.length===0\u0026\u0026(this.sharedCellsFlat[e]=void 0))}allowSharedUse(e,n){return n\u003c0?!1:this.connIdToRootNet[n]===this.connIdToRootNet[e]}shouldSkipFixedPortHalo(e,n){const o=this.portOwnerFlat[e];return o!==n\u0026\u0026(o===-2||!(o\u003c0)\u0026\u0026!this.allowSharedUse(n,o))}nextStamp(){this.stamp=this.stamp+1\u003e\u003e\u003e0,this.stamp===0\u0026\u0026(this.visitedStamp.fill(0),this.bestGStamp.fill(0),this.visitedFlatStamp.fill(0),this.stamp=1)}getSearchStateIdx(e,n){return e}computeH(e,n,o,i){const r=Math.hypot(this.cellCenterX[n]-this.cellCenterX[i],this.cellCenterY[n]-this.cellCenterY[i]);return e===o?r:r+this.hyperParameters.viaBaseCost}internConn(e,n){const o=this.connNameToId.get(e);if(o!==void 0)return o;const i=this.connIdToName.length;var r;return this.connIdToName.push(e),this.connIdToRootNet.push((r=e,n??r.replace(/_mst\\d+$/,\"\"))),this.connNameToId.set(e,i),i}buildConnectionSegs(){const e=new Map;for(const i of this.nodeWithPortPoints.portPoints){const r=i.connectionName;e.has(r)||e.set(r,{points:[],rootConnectionName:i.rootConnectionName}),e.get(r).points.push(i)}const n=[],o=new Set;for(const[i,r]of e){const s=r.points,a=Z_t(s);if(a.length===0)continue;const A=this.internConn(i,r.rootConnectionName);for(const[c,l]of a){const u=this.pointToCell(c),g=this.pointToCell(l),h=`${u.z}:${u.cellId}`,d=`${g.z}:${g.cellId}`,p=h\u003cd?`${h}|${d}`:`${d}|${h}`,m=r.rootConnectionName??i,_=`${m}|${p}`;o.has(_)?this.overlapFriendlyRootNets.add(m):(o.add(_),n.push({connId:A,startZ:u.z,startCellId:u.cellId,startPoint:c,endZ:g.z,endCellId:g.cellId,endPoint:l}))}}return n}pointToCell(e){const n=a7(Math.floor((e.x-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),o=a7(Math.floor((e.y-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);let i=4;n\u003cthis.bandCols?i=0:n\u003e=this.fineCols-this.bandCols?i=2:o\u003cthis.bandRows?i=1:o\u003e=this.fineRows-this.bandRows\u0026\u0026(i=3);const r=this.regions[i],s=o-r.fineOriginRow,a=n-r.fineOriginCol,A=a7(Math.floor(s/r.cellScale),0,Math.max(0,r.rows-1)),c=a7(Math.floor(a/r.cellScale),0,Math.max(0,r.cols-1));return{z:this.zToLayer.get(e.z)??0,cellId:this.cellIdFor(i,A,c)}}shuffleConnections(){const e=this.unsolvedSegs;let n=this.hyperParameters.shuffleSeed\u003e\u003e\u003e0;const o=()=\u003e(n=Math.imul(n,1664525)+1013904223\u003e\u003e\u003e0,n/4294967295);for(let i=e.length-1;i\u003e0;i--){const r=Math.floor(o()*(i+1)),s=e[i];e[i]=e[r],e[r]=s}}finalizeRoute(e){this.consecutiveSkips=Math.max(0,this.consecutiveSkips-1);const n=[];let o=e;for(;o\u003e=0;){const l=this.nodePool.z[o],u=this.nodePool.cellId[o];n.push(l*this.planeSize+u),o=this.nodePool.parent[o]}for(n.reverse();n.length\u003e1\u0026\u0026this.sharedCrossRootPortFlat[n[0]];)n.shift();for(;n.length\u003e1\u0026\u0026this.sharedCrossRootPortFlat[n[n.length-1]];)n.pop();const i=this.extractViaCellIds(n),r=this.activeConnId;this.ripChain.collect(this.nodePool.ripHead[e],this._rippedIds);for(let l=0;l\u003cthis._rippedIds.length;l++)if(this.ripTrace(this._rippedIds[l]),this.failed)return;const s=[];for(let l=0;l\u003cn.length;l++){const u=n[l],g=Math.floor(u/this.planeSize),h=u-g*this.planeSize;this.markTraceFootprint(r,g,h,s)}const a=[];for(let l=0;l\u003ci.length;l++)this.markViaFootprint(r,i[l],s,a);for(;this.usedIndicesByConn.length\u003c=r;)this.usedIndicesByConn.push(void 0);const A=this.usedIndicesByConn[r]??[];for(A.push(...s),this.usedIndicesByConn[r]=A;this.solvedRoutes.length\u003c=r;)this.solvedRoutes.push(void 0);const c=this.solvedRoutes[r]??[];c.push({connId:r,states:Int32Array.from(n),viaCellIds:Int32Array.from(i),startPoint:this.activeConnSeg.startPoint,endPoint:this.activeConnSeg.endPoint}),this.solvedRoutes[r]=c;for(let l=0;l\u003ca.length;l++)if(this.ripTrace(a[l]),this.failed)return;if(this._rippedIds.length\u003e0||a.length\u003e0){const l=this.penalty2d,u=this.penaltyCap;if(this.totalRipEvents\u003e50)for(let g=0;g\u003cl.length;g++)l[g]=.99*l[g];else for(let g=0;g\u003cl.length;g++)l[g]\u003eu\u0026\u0026(l[g]=.5*l[g])}}extractViaCellIds(e){const n=[];for(let o=1;o\u003ce.length;o++){const i=e[o-1],r=e[o],s=Math.floor(i/this.planeSize),a=Math.floor(r/this.planeSize);s!==a\u0026\u0026n.push(r-a*this.planeSize)}return n}markTraceFootprint(e,n,o,i){const r=this.cellCenterX[o],s=this.cellCenterY[o];this.forEachCellNearCircle(r,s,this.traceKeepoutRadius,a=\u003e{if(!v7e(r,s,this.traceKeepoutRadius,this.cellMinX[a],this.cellMinY[a],this.cellMaxX[a],this.cellMaxY[a]))return;const A=n*this.planeSize+a;if(a!==o\u0026\u0026this.shouldSkipFixedPortHalo(A,e))return;const c=this.usedCellsFlat[A],l=this.allowSharedUse(e,c);(c===-1||c===e||l)\u0026\u0026(c!==-1\u0026\u0026c!==e?this.addSharedOccupant(A,e):this.usedCellsFlat[A]=e,i.push(A))})}markViaFootprint(e,n,o,i){const r=this.cellCenterX[n],s=this.cellCenterY[n];this.forEachCellNearCircle(r,s,this.viaKeepoutRadius,a=\u003e{if(v7e(r,s,this.viaKeepoutRadius,this.cellMinX[a],this.cellMinY[a],this.cellMaxX[a],this.cellMaxY[a]))for(let A=0;A\u003cthis.layers;A++){const c=A*this.planeSize+a;if(a!==n\u0026\u0026this.shouldSkipFixedPortHalo(c,e))continue;if(this.fillTraceOccupants(c,e,this._cellOccs),this._cellOccs.length\u003e0){for(let u=0;u\u003cthis._cellOccs.length;u++)zse(i,this._cellOccs[u]);this.replaceOccupants(c,e),o.push(c);continue}const l=this.usedCellsFlat[c];l!==-1\u0026\u0026l!==e?this.addSharedOccupant(c,e):this.usedCellsFlat[c]=e,o.push(c)}})}forEachCellNearCircle(e,n,o,i){const r=a7(Math.floor((e-o-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),s=a7(Math.floor((e+o-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),a=a7(Math.floor((n-o-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1),A=a7(Math.floor((n+o-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);for(let c=0;c\u003cthis.regions.length;c++){const l=this.regions[c];if(l.rows===0||l.cols===0)continue;const u=Math.max(a,l.fineOriginRow),g=Math.min(A,l.fineOriginRow+l.fineRows-1),h=Math.max(r,l.fineOriginCol),d=Math.min(s,l.fineOriginCol+l.fineCols-1);if(u\u003eg||h\u003ed)continue;const p=Math.floor((u-l.fineOriginRow)/l.cellScale),m=Math.floor((g-l.fineOriginRow)/l.cellScale),_=Math.floor((h-l.fineOriginCol)/l.cellScale),f=Math.floor((d-l.fineOriginCol)/l.cellScale);for(let I=p;I\u003c=m;I++)for(let C=_;C\u003c=f;C++)i(this.cellIdFor(l.id,I,C))}}ripTrace(e){for(;this.ripCount.length\u003c=e;)this.ripCount.push(0);if(this.ripCount[e]++,this.totalRipEvents++,this.totalRipEvents\u003e=this.MAX_RIPS)return this.error=`Convergence failure: exceeded MAX_RIPS ${this.MAX_RIPS}`,void(this.failed=!0);const n=this.getSolvedRoutesForConn(e);if(n.length\u003e0)for(const i of n){for(let r=0;r\u003ci.states.length;r++){const s=i.states[r]%this.planeSize;this.penalty2d[s]=this.penalty2d[s]+this.hyperParameters.ripTracePenalty}for(let r=0;r\u003ci.viaCellIds.length;r++){const s=i.viaCellIds[r];this.penalty2d[s]=this.penalty2d[s]+this.hyperParameters.ripViaPenalty}}const o=this.usedIndicesByConn[e];if(o){for(let i=0;i\u003co.length;i++)this.removeOccupant(o[i],e);this.usedIndicesByConn[e]=void 0}if(n.length\u003e0){this.solvedRoutes[e]=void 0;for(const i of n){const r=i.states[0],s=i.states[i.states.length-1],a=Math.floor(r/this.planeSize),A=Math.floor(s/this.planeSize);this.unsolvedSegs.push({connId:e,startZ:a,startCellId:r-a*this.planeSize,startPoint:i.startPoint,endZ:A,endCellId:s-A*this.planeSize,endPoint:i.endPoint})}}}flattenNeighborLists(e){const n=new Int32Array(e.length+1);let o=0;for(let a=0;a\u003ce.length;a++)n[a]=o,o+=e[a].length;n[e.length]=o;const i=new Int32Array(o),r=new Float32Array(o);let s=0;for(let a=0;a\u003ce.length;a++){const A=e[a];for(let c=0;c\u003cA.length;c++){const l=A[c];i[s]=l.cellId,r[s]=l.cost,s++}}return{offset:n,ids:i,costs:r}}visualize(){const e=[\"red\",\"blue\",\"orange\",\"green\"],n=this.gridToBoundsTransform,o=[],i=[],r=[],s=[];if(s.push({center:{x:this.nodeWithPortPoints.center.x,y:this.nodeWithPortPoints.center.y},width:this.nodeWithPortPoints.width,height:this.nodeWithPortPoints.height,stroke:\"gray\"}),this.showPenaltyMap\u0026\u0026this.penalty2d){let c=0;for(let l=0;l\u003cthis.penalty2d.length;l++)this.penalty2d[l]\u003ec\u0026\u0026(c=this.penalty2d[l]);if(c\u003e0)for(let l=0;l\u003cthis.planeSize;l++){const u=this.penalty2d[l];if(u\u003c=0)continue;const g=s7(n,{x:this.cellCenterX[l],y:this.cellCenterY[l]}),h=Math.min(.6,u/c*.6);s.push({center:g,width:this.cellWidth[l]*n.a,height:this.cellHeight[l]*n.e,fill:`rgba(255,165,0,${h.toFixed(3)})`})}}if(this.showUsedCellMap\u0026\u0026this.usedCellsFlat)for(let c=0;c\u003cthis.layers;c++){const l=c*this.planeSize;for(let u=0;u\u003cthis.planeSize;u++){if(this.usedCellsFlat[l+u]===-1)continue;const g=s7(n,{x:this.cellCenterX[u],y:this.cellCenterY[u]});s.push({center:g,width:this.cellWidth[u]*n.a,height:this.cellHeight[u]*n.e,fill:\"rgba(0,0,255,0.5)\"})}}for(const c of this.nodeWithPortPoints.portPoints)o.push({x:c.x,y:c.y,color:e[c.z]??\"gray\",label:c.connectionName});const a=[\"rgba(255,0,0,0.75)\",\"rgba(0,0,255,0.75)\",\"rgba(255,165,0,0.75)\",\"rgba(0,128,0,0.75)\"],A=this.getOutput();for(const c of A){if(c.route.length\u003c2)continue;let l=0;for(let u=1;u\u003cc.route.length;u++){const g=c.route[u-1];c.route[u].z!==g.z\u0026\u0026(u-l\u003e=2\u0026\u0026i.push({points:c.route.slice(l,u).map(h=\u003e({x:h.x,y:h.y})),strokeColor:a[g.z]??\"rgba(128,128,128,0.75)\",strokeWidth:this.traceThickness}),l=u)}if(c.route.length-l\u003e=2){const u=c.route[l].z;i.push({points:c.route.slice(l).map(g=\u003e({x:g.x,y:g.y})),strokeColor:a[u]??\"rgba(128,128,128,0.75)\",strokeWidth:this.traceThickness})}}for(const c of A)for(const l of c.vias)r.push({center:{x:l.x,y:l.y},radius:this.viaDiameter/2,fill:\"rgba(0,0,0,0.3)\",stroke:\"black\"});if(this.activeConnSeg\u0026\u0026this.visitedFlatStamp){const c=this.stamp;for(let l=0;l\u003cthis.layers;l++){const u=l*this.planeSize;for(let g=0;g\u003cthis.planeSize;g++){if(this.visitedFlatStamp[u+g]!==c)continue;const h=s7(n,{x:this.cellCenterX[g],y:this.cellCenterY[g]});o.push({x:h.x,y:h.y,color:\"rgba(0,0,255,0.2)\"})}}}return{points:o,lines:i,circles:r,rects:s,coordinateSystem:\"cartesian\",title:`HighDensityA03 [${this.getSolvedRouteCount()} solved, ${this.unsolvedSegs?.length??0} remaining]`}}getOutput(){const e=this.gridToBoundsTransform,n=[];for(let o=0;o\u003cthis.solvedRoutes.length;o++){const i=this.getSolvedRoutesForConn(o);if(i.length===0)continue;const r=this.connIdToName[o];for(const s of i){const a=Array.from(s.states,A=\u003e{const c=Math.floor(A/this.planeSize),l=A-c*this.planeSize,u=s7(e,{x:this.cellCenterX[l],y:this.cellCenterY[l]});return{x:u.x,y:u.y,z:this.layerToZ.get(c)??c}});a.length\u003e0\u0026\u0026(a[0]={...s.startPoint},a.length\u003e1\u0026\u0026(a[a.length-1]={...s.endPoint})),n.push({connectionName:r,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:a,vias:Array.from(s.viaCellIds,A=\u003es7(e,{x:this.cellCenterX[A],y:this.cellCenterY[A]}))})}}return n}getSolvedRoutesForConn(e){const n=this.solvedRoutes[e];return n?Array.isArray(n)?n:[n]:[]}getSolvedRouteCount(){let e=0;for(let n=0;n\u003cthis.solvedRoutes.length;n++)e+=this.getSolvedRoutesForConn(n).length;return e}computeGridToBoundsTransform(){let e=1/0,n=-1/0,o=1/0,i=-1/0;for(let u=0;u\u003cthis.planeSize;u++){const g=this.cellCenterX[u],h=this.cellCenterY[u];g\u003ce\u0026\u0026(e=g),g\u003en\u0026\u0026(n=g),h\u003co\u0026\u0026(o=h),h\u003ei\u0026\u0026(i=h)}const r=n-e,s=i-o,a=this.boundsMaxX-this.boundsMinX,A=this.boundsMaxY-this.boundsMinY,c=r\u003e0?a/r:1,l=s\u003e0?A/s:1;return{a:c,b:0,c:r\u003e0?this.boundsMinX-c*e:(this.boundsMinX+this.boundsMaxX)/2-e,d:0,e:l,f:s\u003e0?this.boundsMinY-l*o:(this.boundsMinY+this.boundsMaxY)/2-o}}},P7e=t=\u003e({minX:Math.min(t[0].x,t[1].x),maxX:Math.max(t[0].x,t[1].x),minY:Math.min(t[0].y,t[1].y),maxY:Math.max(t[0].y,t[1].y)});function Jse(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function nL(t,e,n){const o=Jse(e,n);if(o===0)return Jse(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;return i=Math.max(0,Math.min(1,i)),Jse(t,{x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)})}function pXn(t,e,n,o){if(Uh(t,e,n,o))return 0;const i={x:t.x,y:t.y},r={x:e.x,y:e.y},s={x:n.x,y:n.y},a={x:o.x,y:o.y};return Math.min(nL(i,s,a),nL(r,s,a),nL(s,i,r),nL(a,i,r))}var oB=class{segmentBuckets;viaBuckets;CELL_SIZE;maximumCopperRadius=0;constructor(e,n=1){this.segmentBuckets=new Map,this.viaBuckets=new Map,this.CELL_SIZE=n;for(const o of e)if(o\u0026\u0026o.connectionName){if(this.maximumCopperRadius=Math.max(this.maximumCopperRadius,o.traceThickness/2,o.viaDiameter/2),o.route\u0026\u0026o.route.length\u003e=2)for(let i=0;i\u003co.route.length-1;i++){const r=o.route[i],s=o.route[i+1];if(r.x===s.x\u0026\u0026r.y===s.y||r.insideJumperPad\u0026\u0026s.insideJumperPad)continue;const a=[r,s],A=P7e(a),c={segmentId:`${o.connectionName}-seg-${i}`,segment:a,parentRoute:o},l=Math.floor(A.minX/this.CELL_SIZE),u=Math.floor((A.maxX+1e-9)/this.CELL_SIZE),g=Math.floor(A.minY/this.CELL_SIZE),h=Math.floor((A.maxY+1e-9)/this.CELL_SIZE);for(let d=l;d\u003c=u;d++)for(let p=g;p\u003c=h;p++){const m=`${d}x${p}`;let _=this.segmentBuckets.get(m);_||(_=[],this.segmentBuckets.set(m,_)),_.push(c)}}if(o.vias\u0026\u0026o.vias.length\u003e0)for(let i=0;i\u003co.vias.length;i++){const r=o.vias[i];if(r==null)continue;const s={viaId:`${o.connectionName}-via-${i}`,x:r.x,y:r.y,parentRoute:o},a=`${Math.floor(r.x/this.CELL_SIZE)}x${Math.floor(r.y/this.CELL_SIZE)}`;let A=this.viaBuckets.get(a);A||(A=[],this.viaBuckets.set(a,A)),A.push(s)}}else console.warn(\"Skipping route with missing data:\",o)}getConflictingRoutesForSegment(e,n,o){const i=P7e([e,n]),r=o+this.maximumCopperRadius,s=i.minX-r,a=i.minY-r,A=i.maxX+r,c=i.maxY+r,l=Math.floor(s/this.CELL_SIZE),u=Math.floor((A+1e-9)/this.CELL_SIZE),g=Math.floor(a/this.CELL_SIZE),h=Math.floor((c+1e-9)/this.CELL_SIZE),d=new Map,p=new Set,m=new Set,_={x:e.x,y:e.y},f={x:n.x,y:n.y};for(let C=l;C\u003c=u;C++)for(let y=g;y\u003c=h;y++){const x=`${C}x${y}`,E=this.segmentBuckets.get(x);if(E)for(const S of E){if(p.has(S.segmentId))continue;p.add(S.segmentId);const Q=S.parentRoute,[w,M]=S.segment;if(e.z!==n.z||w.z!==M.z||w.z!==e.z)continue;const k=o+Q.traceThickness/2,R=k*k,F=pXn(e,n,w,M);if(F\u003cR){const O=Q.connectionName,U=d.get(O);(!U||F\u003cU.minDistSq)\u0026\u0026d.set(O,{route:Q,minDistSq:F})}}const B=this.viaBuckets.get(x);if(B)for(const S of B){if(m.has(S.viaId))continue;m.add(S.viaId);const Q=S.parentRoute,w={x:S.x,y:S.y},M=o+Q.viaDiameter/2,k=M*M,R=nL(w,_,f);if(R\u003ck){const F=Q.connectionName,O=d.get(F);(!O||R\u003cO.minDistSq)\u0026\u0026d.set(F,{route:Q,minDistSq:R})}}}const I=[];for(const C of d.values())I.push({conflictingRoute:C.route,distance:Math.sqrt(C.minDistSq)});return I}removeRoute(e){for(const[n,o]of this.segmentBuckets){const i=o.filter(r=\u003er.parentRoute.connectionName!==e);i.length===0?this.segmentBuckets.delete(n):i.length!==o.length\u0026\u0026this.segmentBuckets.set(n,i)}for(const[n,o]of this.viaBuckets){const i=o.filter(r=\u003er.parentRoute.connectionName!==e);i.length===0?this.viaBuckets.delete(n):i.length!==o.length\u0026\u0026this.viaBuckets.set(n,i)}}addRoute(e){if(!e||!e.connectionName)return void console.warn(\"Skipping route with missing data:\",e);if(this.maximumCopperRadius=Math.max(this.maximumCopperRadius,e.traceThickness/2,e.viaDiameter/2),e.route\u0026\u0026e.route.length\u003e=2)for(let n=0;n\u003ce.route.length-1;n++){const o=e.route[n],i=e.route[n+1];if(o.x===i.x\u0026\u0026o.y===i.y||o.insideJumperPad\u0026\u0026i.insideJumperPad)continue;const r=[o,i],s=P7e(r),a={segmentId:`${e.connectionName}-seg-${n}`,segment:r,parentRoute:e},A=Math.floor(s.minX/this.CELL_SIZE),c=Math.floor((s.maxX+1e-9)/this.CELL_SIZE),l=Math.floor(s.minY/this.CELL_SIZE),u=Math.floor((s.maxY+1e-9)/this.CELL_SIZE);for(let g=A;g\u003c=c;g++)for(let h=l;h\u003c=u;h++){const d=`${g}x${h}`;let p=this.segmentBuckets.get(d);p||(p=[],this.segmentBuckets.set(d,p)),p.push(a)}}if(e.vias\u0026\u0026e.vias.length\u003e0)for(let n=0;n\u003ce.vias.length;n++){const o=e.vias[n];if(o==null)continue;const i={viaId:`${e.connectionName}-via-${n}`,x:o.x,y:o.y,parentRoute:e},r=`${Math.floor(o.x/this.CELL_SIZE)}x${Math.floor(o.y/this.CELL_SIZE)}`;let s=this.viaBuckets.get(r);s||(s=[],this.viaBuckets.set(r,s)),s.push(i)}}getConflictingRoutesNearPoint(e,n){const o=n+this.maximumCopperRadius,i=e.x-o,r=e.y-o,s=e.x+o,a=e.y+o,A=Math.floor(i/this.CELL_SIZE),c=Math.floor((s+1e-9)/this.CELL_SIZE),l=Math.floor(r/this.CELL_SIZE),u=Math.floor((a+1e-9)/this.CELL_SIZE),g=new Map,h=new Set,d=new Set;for(let m=A;m\u003c=c;m++)for(let _=l;_\u003c=u;_++){const f=`${m}x${_}`,I=this.segmentBuckets.get(f);if(I)for(const y of I){if(h.has(y.segmentId))continue;h.add(y.segmentId);const x=y.segment[0],E=y.segment[1];if(x.z!==E.z||x.z!==e.z)continue;const B=y.parentRoute,S={x:y.segment[0].x,y:y.segment[0].y},Q={x:y.segment[1].x,y:y.segment[1].y},w=n+B.traceThickness/2,M=w*w,k=nL(e,S,Q);if(k\u003cM){const R=B.connectionName,F=g.get(R);(!F||k\u003cF.minDistSq)\u0026\u0026g.set(R,{route:B,minDistSq:k})}}const C=this.viaBuckets.get(f);if(C)for(const y of C){if(d.has(y.viaId))continue;d.add(y.viaId);const x=y.parentRoute,E={x:y.x,y:y.y},B=n+x.viaDiameter/2,S=B*B,Q=Jse(e,E);if(Q\u003cS){const w=x.connectionName,M=g.get(w);(!M||Q\u003cM.minDistSq)\u0026\u0026g.set(w,{route:x,minDistSq:Q})}}}const p=[];for(const m of g.values())p.push({conflictingRoute:m.route,distance:Math.sqrt(m.minDistSq)});return p}};function M7e(t){let e=t;for(let i=0;i\u003c10;i++)e=16807*e%2147483647;let n=e;e=(69069*t+1)%2147483647;for(let i=0;i\u003c10;i++)e=48271*e%2147483647;let o=e;return()=\u003e{let i=n;n=o,i^=i\u003c\u003c23,i^=i\u003e\u003e\u003e17,i^=o,i^=o\u003e\u003e\u003e26,o=i;const r=(n+o)/4294967296;return r-Math.floor(r)}}var mXn={1:[[0]],2:[[0,1],[1,0]],3:[[0,1,2],[2,0,1],[1,0,2],[0,2,1],[1,2,0],[2,1,0]],4:[[0,1,2,3],[2,0,1,3],[1,3,2,0],[3,0,1,2],[0,2,1,3],[2,1,3,0],[3,0,2,1],[1,2,0,3],[3,1,0,2],[0,3,2,1],[2,3,0,1],[2,3,1,0],[1,2,3,0],[3,1,2,0],[0,1,3,2],[0,2,3,1],[0,3,1,2],[1,0,2,3],[1,0,3,2],[1,3,0,2],[2,0,3,1],[2,1,0,3],[3,2,0,1],[3,2,1,0]]};function D5(t,e){if(e===0||t.length===0)return t;if(t.length\u003c=4){const i=mXn[t.length];return i[e%i.length].map(r=\u003et[r])}const n=M7e(e),o=t.slice();for(let i=0;i\u003co.length;i++){const r=Math.floor(n()*o.length),s=Math.floor(n()*(i+1));[o[r],o[s]]=[o[s],o[r]]}return o}var _Xn=t=\u003e{let e=1/0;const n=t.portPoints;for(let o=0;o\u003cn.length;o++)for(let i=o+1;i\u003cn.length;i++){const r=n[o],s=n[i];if(r.z!==s.z||r.rootConnectionName\u0026\u0026r.rootConnectionName===s.rootConnectionName)continue;const a=Math.sqrt((r.x-s.x)**2+(r.y-s.y)**2);e=Math.min(e,a)}return e===1/0?0:e},fXn=class{heap=[];constructor(e){this.heap=[];for(const n of e)this.enqueue(n)}dequeue(){if(this.heap.length===0)return null;const e=this.heap[0];return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.heapifyDown(),e}peek(){return this.heap.length===0?null:this.heap[0]}enqueue(e){this.heap.push(e),this.heapifyUp()}heapifyUp(){let e=this.heap.length-1;const n=this.heap[e];for(;e\u003e0;){const o=Math.floor((e-1)/2),i=this.heap[o];if(i.f\u003c=n.f)break;this.heap[e]=i,e=o}this.heap[e]=n}heapifyDown(){let e=0;const n=this.heap.length,o=this.heap[e];if(o){for(;;){const i=2*e+1;if(i\u003e=n)break;const r=i+1;let s=i;if(r\u003cn\u0026\u0026this.heap[r].f\u003cthis.heap[i].f\u0026\u0026(s=r),o.f\u003cthis.heap[s].f)break;this.heap[e]=this.heap[s],e=s}this.heap[e]=o}}getTopN(e){return[...this.heap].sort((n,o)=\u003en.f-o.f).slice(0,e)}},oL=(t,e,n=[])=\u003e[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`\n`),IXn=class extends yr{getSolverName(){return\"SingleHighDensityRouteSolver\"}obstacleRoutes;bounds;boundsSize;boundsCenter;A;B;straightLineDistance;viaDiameter;traceThickness;obstacleMargin;layerCount;availableZ;minCellSize=.05;cellStep=.05;GREEDY_MULTIPLER=1.1;numRoutes;VIA_PENALTY_FACTOR=.3;CELL_SIZE_FACTOR;NEARBY_SEGMENT_CLEARANCE;exploredNodes;viasInPathByNode=new WeakMap;gridMinXIndex;gridMinYIndex;gridWidth;gridHeight;candidates;connectionName;rootConnectionName;regionId;solvedPath=null;futureConnections;hyperParameters;connMap;obstacleSegments=[];obstacleSegmentIndex=null;obstacleSegmentsByLayer=new Map;obstacleSegmentIndexByLayer=new Map;obstacleVias=[];obstacleViaIndex=null;debug_exploredNodesOrdered;debug_nodesTooCloseToObstacle;debug_nodePathToParentIntersectsObstacle;debugEnabled;initialNodeGridOffset;constructor(e){super(),this.bounds=e.bounds,this.connMap=e.connMap,this.hyperParameters=e.hyperParameters??{},this.CELL_SIZE_FACTOR=this.hyperParameters.CELL_SIZE_FACTOR??1,this.boundsSize={width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY},this.boundsCenter={x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},this.connectionName=e.connectionName,this.rootConnectionName=e.rootConnectionName,this.regionId=e.regionId,this.obstacleRoutes=e.obstacleRoutes,this.A=e.A,this.B=e.B,this.viaDiameter=e.viaDiameter??.3,this.traceThickness=e.traceThickness??.15,this.obstacleMargin=e.obstacleMargin??.15,this.layerCount=e.layerCount??2,this.availableZ=e.availableZ\u0026\u0026e.availableZ.length\u003e0?[...new Set(e.availableZ)].sort((g,h)=\u003eg-h):Array.from({length:this.layerCount},(g,h)=\u003eh),this.exploredNodes=new Set,this.straightLineDistance=no(this.A,this.B),this.futureConnections=e.futureConnections??[],this.NEARBY_SEGMENT_CLEARANCE=e.nearbySegmentClearance??.15,this.debugEnabled=e.captureSearchDebug??!0,this.MAX_ITERATIONS=1e4,this.debug_exploredNodesOrdered=[],this.debug_nodesTooCloseToObstacle=new Set,this.debug_nodePathToParentIntersectsObstacle=new Set,this.numRoutes=this.obstacleRoutes.length+this.futureConnections.length,this.buildObstacleIndexes();const n=Math.ceil(5*(this.numRoutes+1));let o=this.boundsSize.width/this.cellStep,i=this.boundsSize.height/this.cellStep;for(;o*i\u003en**2\u0026\u0026!(2*this.cellStep\u003ee.minDistBetweenEnteringPoints);)this.cellStep*=2,o=this.boundsSize.width/this.cellStep,i=this.boundsSize.height/this.cellStep;this.cellStep*=this.CELL_SIZE_FACTOR,this.gridMinXIndex=Math.round(this.bounds.minX/this.cellStep)-1,this.gridMinYIndex=Math.round(this.bounds.minY/this.cellStep)-1;const r=Math.round(this.bounds.maxX/this.cellStep)+1,s=Math.round(this.bounds.maxY/this.cellStep)+1;this.gridWidth=r-this.gridMinXIndex+1,this.gridHeight=s-this.gridMinYIndex+1;const a=Math.abs(this.A.x-this.bounds.minX)\u003c.001\u0026\u0026Math.abs(this.B.x-this.bounds.minX)\u003c.001||Math.abs(this.A.x-this.bounds.maxX)\u003c.001\u0026\u0026Math.abs(this.B.x-this.bounds.maxX)\u003c.001||Math.abs(this.A.y-this.bounds.minY)\u003c.001\u0026\u0026Math.abs(this.B.y-this.bounds.minY)\u003c.001||Math.abs(this.A.y-this.bounds.maxY)\u003c.001\u0026\u0026Math.abs(this.B.y-this.bounds.maxY)\u003c.001;this.futureConnections\u0026\u0026this.futureConnections.length===0\u0026\u0026this.obstacleRoutes.length===0\u0026\u0026!a\u0026\u0026this.handleSimpleCases();const A={x:Math.round(e.A.x/(this.cellStep/2))*(this.cellStep/2),y:Math.round(e.A.y/(this.cellStep/2))*(this.cellStep/2)};this.initialNodeGridOffset={x:A.x-Math.round(e.A.x/this.cellStep)*this.cellStep,y:A.y-Math.round(e.A.y/this.cellStep)*this.cellStep};const c={...e.A,z:e.A.z??0,g:0,h:0,f:0,parent:null},l={...e.A,...A,z:e.A.z??0,g:0,h:0,f:0,parent:c},u=(Math.abs(l.x-e.A.x)\u003e1e-9||Math.abs(l.y-e.A.y)\u003e1e-9)\u0026\u0026(this.isNodeTooCloseToObstacle(l)||this.isNodeTooCloseToEdge(l,!1)||this.doesPathToParentIntersectObstacle(l));this.candidates=new fXn([u?c:l])}handleSimpleCases(){this.solved=!0;const{A:e,B:n}=this,o=e.z===n.z?[e,n]:[e,{...this.boundsCenter,z:this.A.z},{...this.boundsCenter,z:n.z},n];this.solvedPath={connectionName:this.connectionName,rootConnectionName:this.rootConnectionName,regionId:this.regionId,route:o,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:this.A.z===this.B.z?[]:[this.boundsCenter]}}get viaPenaltyDistance(){return this.cellStep+this.straightLineDistance*this.VIA_PENALTY_FACTOR}isNodeTooCloseToObstacle(e,n,o,i){if(n??=this.obstacleMargin,o\u0026\u0026e.parent){const c=this.getViasInNodePath(e.parent);for(const l of c)if(no(e,l)\u003cthis.viaDiameter/2+n)return!0}const r=this.traceThickness+n,s=i?.segments??(o?this.obstacleSegments:this.obstacleSegmentsByLayer.get(e.z)),a=i?.segmentIds??(o?this.obstacleSegmentIndex:this.obstacleSegmentIndexByLayer.get(e.z))?.search(e.x-r,e.y-r,e.x+r,e.y+r)??[];if(s)for(const c of a){const l=s[c];if(l\u0026\u0026!l.connectedToCurrentConnection\u0026\u0026(o||l.z===e.z)\u0026\u0026(!i||!(e.x+r\u003cl.minX||e.y+r\u003cl.minY||e.x-r\u003el.maxX||e.y-r\u003el.maxY))\u0026\u0026wc(e,l.A,l.B)\u003cr)return!0}const A=this.viaDiameter/2+this.traceThickness/2+n;if(this.obstacleViaIndex){const c=this.obstacleViaIndex.search(e.x-A,e.y-A,e.x+A,e.y+A);for(const l of c){const u=this.obstacleVias[l];if(u\u0026\u0026no(e,u)\u003cA)return!0}}return!1}isNodeTooCloseToEdge(e,n){const o=n?this.viaDiameter/2+this.obstacleMargin/2:this.obstacleMargin/2,i=e.x\u003cthis.bounds.minX+o||e.x\u003ethis.bounds.maxX-o||e.y\u003cthis.bounds.minY+o||e.y\u003ethis.bounds.maxY-o;return!(i\u0026\u0026!n\u0026\u0026(no(e,this.B)\u003c2*o||no(e,this.A)\u003c2*o))\u0026\u0026i}doesPathToParentIntersectObstacle(e,n){const o=e.parent;if(!o)return!1;const i=n?.segments??this.obstacleSegmentsByLayer.get(e.z);if(!i)return!1;const r=e.z===o.z\u0026\u0026this.obstacleSegments.length\u003e0?this.NEARBY_SEGMENT_CLEARANCE:0,s=Math.min(e.x,o.x),a=Math.max(e.x,o.x),A=Math.min(e.y,o.y),c=Math.max(e.y,o.y),l=n?.segmentIds??this.obstacleSegmentIndexByLayer.get(e.z)?.search(s-r,A-r,a+r,c+r)??[];for(const u of l){const g=i[u];if(g\u0026\u0026!g.connectedToCurrentConnection\u0026\u0026!(g.z!==e.z||n\u0026\u0026(a+r\u003cg.minX||c+r\u003cg.minY||s-r\u003eg.maxX||A-r\u003eg.maxY))\u0026\u0026(Uh(e,o,g.A,g.B)||r\u003e0\u0026\u0026yXn(e,o,g.A,g.B)\u003cr))return!0}return!1}getPlanarObstacleQuery(e){const n=e.parent;if(!n)return;const o=this.obstacleSegmentIndexByLayer.get(e.z),i=this.obstacleSegmentsByLayer.get(e.z);if(!o||!i)return;const r=this.traceThickness+this.obstacleMargin,s=e.z===n.z\u0026\u0026this.obstacleSegments.length\u003e0?this.NEARBY_SEGMENT_CLEARANCE:0;return{segments:i,segmentIds:o.search(Math.min(e.x-r,n.x-s),Math.min(e.y-r,n.y-s),Math.max(e.x+r,n.x+s),Math.max(e.y+r,n.y+s))}}buildObstacleIndexes(){if(this.obstacleRoutes.length===0)return this.obstacleSegmentIndex=null,this.obstacleSegmentsByLayer.clear(),this.obstacleSegmentIndexByLayer.clear(),void(this.obstacleViaIndex=null);const e=[],n=[];for(const o of this.obstacleRoutes){const i=this.connMap?.areIdsConnected?.(this.connectionName,o.connectionName)??!1;for(const r of CXn(o))e.push({...r,minX:Math.min(r.A.x,r.B.x),minY:Math.min(r.A.y,r.B.y),maxX:Math.max(r.A.x,r.B.x),maxY:Math.max(r.A.y,r.B.y),connectedToCurrentConnection:i});for(const r of o.vias)n.push(r)}if(this.obstacleSegments=e,this.obstacleVias=n,this.obstacleSegmentsByLayer.clear(),this.obstacleSegmentIndexByLayer.clear(),e.length\u003e0){const o=new X4(e.length);for(const i of e)o.add(i.minX,i.minY,i.maxX,i.maxY);o.finish(),this.obstacleSegmentIndex=o;for(const i of e){if(i.connectedToCurrentConnection)continue;const r=this.obstacleSegmentsByLayer.get(i.z);r?r.push(i):this.obstacleSegmentsByLayer.set(i.z,[i])}for(const[i,r]of this.obstacleSegmentsByLayer){const s=new X4(r.length);for(const a of r)s.add(a.minX,a.minY,a.maxX,a.maxY);s.finish(),this.obstacleSegmentIndexByLayer.set(i,s)}}else this.obstacleSegmentIndex=null;if(n.length\u003e0){const o=new X4(n.length);for(const i of n)o.add(i.x,i.y,i.x,i.y);o.finish(),this.obstacleViaIndex=o}else this.obstacleViaIndex=null}computeH(e){return no(e,this.B)+(e.z!==this.B.z?this.viaPenaltyDistance:0)}computeG(e){return(e.parent?.g??0)+(e.z===e.parent?.z?0:this.viaPenaltyDistance)+no(e,e.parent)}computeF(e,n){return e+n*this.GREEDY_MULTIPLER}setNodeCosts(e){e.g=this.computeG(e),e.h=this.computeH(e),e.f=this.computeF(e.g,e.h)}getNodeKey(e){const n=Math.round(e.x/this.cellStep)-this.gridMinXIndex,o=Math.round(e.y/this.cellStep)-this.gridMinYIndex;return(e.z*this.gridHeight+o)*this.gridWidth+n}getNeighbors(e){const n=[],{maxX:o,minX:i,maxY:r,minY:s}=this.bounds;for(let a=-1;a\u003c=1;a++)for(let A=-1;A\u003c=1;A++){if(a===0\u0026\u0026A===0)continue;const c={x:oft(e.x+a*this.cellStep,i,o),y:oft(e.y+A*this.cellStep,s,r),z:e.z,g:e.g,h:e.h,f:e.f,parent:e},l=this.getNodeKey(c);if(this.exploredNodes.has(l))continue;const u=this.getPlanarObstacleQuery(c);this.isNodeTooCloseToObstacle(c,void 0,!1,u)?(this.debugEnabled\u0026\u0026this.debug_nodesTooCloseToObstacle.add(l),this.exploredNodes.add(l)):this.isNodeTooCloseToEdge(c,!1)?this.exploredNodes.add(l):this.doesPathToParentIntersectObstacle(c,u)?(this.debugEnabled\u0026\u0026this.debug_nodePathToParentIntersectsObstacle.add(l),this.exploredNodes.add(l)):(this.setNodeCosts(c),n.push(c))}for(const a of this.availableZ){if(a===e.z)continue;const A={x:e.x,y:e.y,z:a,g:e.g,h:e.h,f:e.f,parent:e};this.exploredNodes.has(this.getNodeKey(A))||this.isNodeTooCloseToObstacle(A,this.viaDiameter/2+this.obstacleMargin/2,!0)||this.isNodeTooCloseToEdge(A,!0)||(this.setNodeCosts(A),n.push(A))}return n}getNodePath(e){const n=[];for(;e;)n.push(e),e=e.parent;return n}getViasInNodePath(e){const n=this.viasInPathByNode.get(e);if(n)return n;const o=e.parent,i=o?this.getViasInNodePath(o):[],r=o\u0026\u0026e.z!==o.z?[{x:e.x,y:e.y},...i]:i;return this.viasInPathByNode.set(e,r),r}setSolvedPath(e){const n=this.getNodePath(e);n.reverse();const o=[];for(let i=0;i\u003cn.length-1;i++)n[i].z!==n[i+1].z\u0026\u0026o.push({x:n[i].x,y:n[i].y});this.solvedPath={connectionName:this.connectionName,rootConnectionName:this.rootConnectionName,regionId:this.regionId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:n.map(i=\u003e({x:i.x,y:i.y,z:i.z})).concat([this.B]),vias:o}}computeProgress(e,n,o){if(n===void 0||o===void 0)return Number.NaN;o||(n+=this.viaPenaltyDistance);const i=1-n/this.straightLineDistance;return Math.max(this.progress||0,2/Math.PI*Math.atan(.112*i/(1-i)))}_step(){let e=this.candidates.dequeue(),n=e?this.getNodeKey(e):void 0;for(;e\u0026\u0026n\u0026\u0026this.exploredNodes.has(n);)e=this.candidates.dequeue(),n=e?this.getNodeKey(e):void 0;if(!e||!n)return this.failed=!0,void(this.error=\"Ran out of candidate nodes to explore\");this.exploredNodes.add(n),this.debugEnabled\u0026\u0026this.debug_exploredNodesOrdered.push({key:n,x:Math.round(e.x/this.cellStep)*this.cellStep+this.initialNodeGridOffset.x,y:Math.round(e.y/this.cellStep)*this.cellStep+this.initialNodeGridOffset.y,z:e.z});const o=no(e,this.B);this.progress=this.computeProgress(e,o,e.z===this.B.z),o\u003c=this.cellStep*Math.SQRT2\u0026\u0026e.z===this.B.z\u0026\u0026!this.doesPathToParentIntersectObstacle({...e,parent:e,x:this.B.x,y:this.B.y})\u0026\u0026(this.solved=!0,this.setSolvedPath(e));const i=this.getNeighbors(e);for(const r of i)this.candidates.enqueue(r)}visualize(){const e={lines:[],points:[],rects:[],circles:[]};e.points.push({x:this.A.x,y:this.A.y,label:oL(this.connectionName,this.rootConnectionName,[\"Input A\",`z: ${this.A.z}`]),color:\"orange\"}),e.points.push({x:this.B.x,y:this.B.y,label:oL(this.connectionName,this.rootConnectionName,[\"Input B\",`z: ${this.B.z}`]),color:\"orange\"}),e.lines.push({points:[this.A,this.B],strokeColor:\"rgba(255, 0, 0, 0.5)\",label:oL(this.connectionName,this.rootConnectionName,[\"Direct Input Connection\"])});for(let n=0;n\u003cthis.obstacleRoutes.length;n++){const o=this.obstacleRoutes[n];for(let i=0;i\u003co.route.length-1;i++){const r=o.route[i].z;e.lines.push({points:[o.route[i],o.route[i+1]],strokeColor:r===0?\"rgba(255, 0, 0, 0.75)\":\"rgba(255, 128, 0, 0.25)\",strokeWidth:o.traceThickness,label:oL(o.connectionName,o.rootConnectionName,[\"Obstacle Route\"]),layer:`obstacle${n.toString()}`})}}for(let n=0;n\u003cthis.debug_exploredNodesOrdered.length;n++){const{key:o,x:i,y:r,z:s}=this.debug_exploredNodesOrdered[n];this.debug_nodesTooCloseToObstacle.has(o)||this.debug_nodePathToParentIntersectsObstacle.has(o)||e.rects.push({center:{x:i+s*this.cellStep/20,y:r+s*this.cellStep/20},fill:s===0?`rgba(255,0,255,${.3-n/this.debug_exploredNodesOrdered.length*.2})`:`rgba(0,0,255,${.3-n/this.debug_exploredNodesOrdered.length*.2})`,width:.9*this.cellStep,height:.9*this.cellStep,label:`Explored (z=${s})`})}if(this.candidates.peek()){const n=this.candidates.peek();e.rects.push({center:{x:n.x+n.z*this.cellStep/20,y:n.y+n.z*this.cellStep/20},fill:\"rgba(0, 255, 0, 0.8)\",width:.9*this.cellStep,height:.9*this.cellStep,label:`Next (z=${n.z})`})}for(const n of this.obstacleRoutes)for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:this.viaDiameter/2,fill:\"rgba(255, 0, 0, 0.5)\",label:\"Via\"});if(this.solvedPath){e.lines.push({points:this.solvedPath.route,strokeColor:\"green\",label:oL(this.solvedPath.connectionName,this.solvedPath.rootConnectionName,[\"Solved Route\"])});for(const n of this.solvedPath.vias)e.circles.push({center:n,radius:this.viaDiameter/2,fill:\"green\",label:oL(this.solvedPath.connectionName,this.solvedPath.rootConnectionName,[\"Via\"])})}return e}};function CXn(t){const e=[];for(let n=0;n\u003ct.route.length-1;n++)t.route[n].z===t.route[n+1].z\u0026\u0026e.push({z:t.route[n].z,A:t.route[n],B:t.route[n+1]});return e}function oft(t,e,n){return Math.max(e,Math.min(t,n))}function yXn(t,e,n,o){return Math.min(wc(t,n,o),wc(e,n,o),wc(n,t,e),wc(o,t,e))}var ift=class extends IXn{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR=2;FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR=1;FUTURE_CONNECTION_PROXIMITY_VD=10;MISALIGNED_DIST_PENALTY_FACTOR=5;VIA_PENALTY_FACTOR_2=1;FLIP_TRACE_ALIGNMENT_DIRECTION=!1;FUTURE_CONNECTION_VIA_TRACE_CLEARANCE=.1;futureConnectionPoints;futureConnectionSegmentsCache=null;constructor(e){super({...e,nearbySegmentClearance:e.nearbySegmentClearance??(e.traceThickness??.15)/2+(e.obstacleMargin??.15)});for(const i in e.hyperParameters)this[i]=e.hyperParameters[i];const n=this.boundsSize.width/this.viaDiameter,o=Math.max(1,this.numRoutes);this.VIA_PENALTY_FACTOR=n/o*.3*this.VIA_PENALTY_FACTOR_2,this.futureConnectionPoints=this.futureConnections.flatMap(i=\u003ei.points)}getClosestFutureConnectionPoint(e){let n=1/0,o=null;for(const i of this.futureConnectionPoints){const r=no(e,i)+(e.z!==i.z?this.viaPenaltyDistance:0);r\u003cn\u0026\u0026(n=r,o=i)}return o}getFutureConnectionSegments(){if(this.futureConnectionSegmentsCache)return this.futureConnectionSegmentsCache;const e=[];for(const n of this.futureConnections){if(n.connectionName===this.connectionName||(this.connMap?.areIdsConnected?.(this.connectionName,n.connectionName)??!1))continue;const[o,...i]=n.points;if(o)for(const r of i)Math.abs(o.x-r.x)\u003c1e-9\u0026\u0026Math.abs(o.y-r.y)\u003c1e-9||e.push({connectionName:n.connectionName,start:o,end:r})}return this.futureConnectionSegmentsCache=e,e}isViaTooCloseToFutureConnectionTrace(e){const n=this.viaDiameter/2+this.traceThickness/2+this.FUTURE_CONNECTION_VIA_TRACE_CLEARANCE;for(const o of this.getFutureConnectionSegments())if(wc(e,o.start,o.end)\u003cn)return!0;return!1}isNodeTooCloseToObstacle(e,n,o,i){return!!super.isNodeTooCloseToObstacle(e,n,o,i)||!(!o||!this.isViaTooCloseToFutureConnectionTrace(e))}diminishCloseToGoal(e){const n=no(e,this.B);return 1-Math.exp(-n/this.straightLineDistance*5)}getFutureConnectionPenalty(e,n){let o=0;const i=this.getClosestFutureConnectionPoint(e),r=no(e,this.B);if(i){const s=no(e,i);if(r\u003c=s)return 0;const a=s/(this.viaDiameter*this.FUTURE_CONNECTION_PROXIMITY_VD);o=(n?this.straightLineDistance*this.FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:this.straightLineDistance*this.FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR)*Math.exp(5*-a)}return o}computeH(e){const n=no(e,this.B)**1.6;return this.straightLineDistance,n+(e.z!==this.B.z?this.viaPenaltyDistance:0)+this.getFutureConnectionPenalty(e,e.z!==e.parent?.z)}computeG(e){const n=Math.abs(e.x-e.parent.x),o=Math.abs(e.y-e.parent.y),i=Math.sqrt(n**2+o**2),r=e.z%2==0,s=this.FLIP_TRACE_ALIGNMENT_DIRECTION?r?n:o:r?o:n;return(e.parent?.g??0)+(e.z===e.parent?.z?0:this.viaPenaltyDistance)+i+s*this.MISALIGNED_DIST_PENALTY_FACTOR+this.getFutureConnectionPenalty(e,e.z!==e.parent?.z)}setNodeCosts(e){const n=Math.abs(e.x-e.parent.x),o=Math.abs(e.y-e.parent.y),i=Math.sqrt(n**2+o**2),r=e.z%2==0,s=this.FLIP_TRACE_ALIGNMENT_DIRECTION?r?n:o:r?o:n,a=(e.parent?.g??0)+(e.z===e.parent?.z?0:this.viaPenaltyDistance)+i+s*this.MISALIGNED_DIST_PENALTY_FACTOR,A=no(e,this.B)**1.6+(e.z!==this.B.z?this.viaPenaltyDistance:0),c=this.getFutureConnectionPenalty(e,e.z!==e.parent?.z);e.g=a+c,e.h=A+c,e.f=this.computeF(e.g,e.h)}},D7e=(t,e,n=[])=\u003e[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`\n`),xXn=t=\u003e`${t.x.toFixed(6)},${t.y.toFixed(6)},${t.z}`,N7e=t=\u003e{const e=new Set,n=[];for(const o of t){const i=xXn(o);e.has(i)||(e.add(i),n.push(o))}return n},Wse=class extends yr{getSolverName(){return\"IntraNodeRouteSolver\"}nodeWithPortPoints;colorMap;unsolvedConnections;originalConnectionPointsByName;rootConnectionNameByConnectionName;totalConnections;solvedRoutes;failedSubSolvers;hyperParameters;minDistBetweenEnteringPoints;viaDiameter;traceWidth;obstacleMargin;captureSearchDebug;rerouteAttemptsByConnection;POSTROUTE_VIA_TRACE_CLEARANCE=.1;MAX_POSTROUTE_REPAIR_ATTEMPTS=2;activeSubSolver=null;connMap;get failedSolvers(){return this.failedSubSolvers}get activeSolver(){return this.activeSubSolver}constructor(e){const{nodeWithPortPoints:n,colorMap:o}=e;super(),this.nodeWithPortPoints=n,this.colorMap=o??{},this.solvedRoutes=[],this.hyperParameters=e.hyperParameters??{},this.failedSubSolvers=[],this.connMap=e.connMap,this.viaDiameter=e.viaDiameter??.3,this.traceWidth=e.traceWidth??.15,this.obstacleMargin=e.obstacleMargin??.15,this.captureSearchDebug=e.captureSearchDebug??!0;const i=new Map;this.rootConnectionNameByConnectionName=new Map;for(const{connectionName:r,rootConnectionName:s,x:a,y:A,z:c}of n.portPoints)s\u0026\u0026this.rootConnectionNameByConnectionName.set(r,s),i.set(r,[...i.get(r)??[],{x:a,y:A,z:c??0}]);this.originalConnectionPointsByName=new Map(Array.from(i.entries()).map(([r,s])=\u003e[r,N7e(s)])),this.unsolvedConnections=Array.from(i.entries().map(([r,s])=\u003e({connectionName:r,rootConnectionName:this.rootConnectionNameByConnectionName.get(r),points:N7e(s)}))),this.rerouteAttemptsByConnection=new Map,this.hyperParameters.SHUFFLE_SEED\u0026\u0026(this.unsolvedConnections=D5(this.unsolvedConnections,this.hyperParameters.SHUFFLE_SEED??0),this.unsolvedConnections=this.unsolvedConnections.map(({points:r,...s},a)=\u003e({...s,points:D5(r,7117*a+(this.hyperParameters.SHUFFLE_SEED??0))}))),this.totalConnections=this.unsolvedConnections.length,this.MAX_ITERATIONS=1e3*this.totalConnections**1.5,this.minDistBetweenEnteringPoints=_Xn(this.nodeWithPortPoints)}computeProgress(){return(this.solvedRoutes.length+(this.activeSubSolver?.progress||0))/this.totalConnections}getSingleRouteSolverOpts(e){const{connectionName:n,rootConnectionName:o,points:i}=e;return{connectionName:n,rootConnectionName:o,regionId:this.nodeWithPortPoints.capacityMeshNodeId,minDistBetweenEnteringPoints:this.minDistBetweenEnteringPoints,bounds:Tz(this.nodeWithPortPoints),A:{x:i[0].x,y:i[0].y,z:i[0].z},B:{x:i[i.length-1].x,y:i[i.length-1].y,z:i[i.length-1].z},obstacleRoutes:this.connMap?this.solvedRoutes.filter(r=\u003e!this.connMap.areIdsConnected(r.connectionName,n)):this.solvedRoutes,futureConnections:this.unsolvedConnections,layerCount:this.nodeWithPortPoints.portPoints.reduce((r,s)=\u003eMath.max(r,(s.z??0)+1),2),availableZ:this.nodeWithPortPoints.availableZ\u0026\u0026this.nodeWithPortPoints.availableZ.length\u003e0?this.nodeWithPortPoints.availableZ:[...new Set(this.nodeWithPortPoints.portPoints.map(r=\u003er.z??0))].sort((r,s)=\u003er-s),hyperParameters:this.hyperParameters,connMap:this.connMap,viaDiameter:this.viaDiameter,traceThickness:this.traceWidth,obstacleMargin:this.obstacleMargin,captureSearchDebug:this.captureSearchDebug}}trySolveSamePointLayerChange(e){const n=this.getSingleRouteSolverOpts(e),o=new ift(n),{A:i,B:r}=n,s={x:i.x,y:i.y};if(!EXn(o,s,i))return!1;const a=[{x:i.x,y:i.y,z:i.z},{...s,z:i.z},{...s,z:r.z},{x:r.x,y:r.y,z:r.z}].filter((A,c,l)=\u003ec===0||Math.abs(A.x-l[c-1].x)\u003e1e-6||Math.abs(A.y-l[c-1].y)\u003e1e-6||A.z!==l[c-1].z);return this.solvedRoutes.push({connectionName:e.connectionName,rootConnectionName:e.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:a,vias:[{x:s.x,y:s.y}]}),!0}queueExtraBranchesForMultiPointConnection(e){const[n,...o]=N7e(e.points);if(!n||o.length\u003c=1)return!1;for(const i of o)this.unsolvedConnections.push({connectionName:e.connectionName,rootConnectionName:e.rootConnectionName,points:[n,i]});return!0}getAvailableZLayers(){return this.nodeWithPortPoints.availableZ\u0026\u0026this.nodeWithPortPoints.availableZ.length\u003e0?[...new Set(this.nodeWithPortPoints.availableZ)].sort((e,n)=\u003ee-n):[...new Set(this.nodeWithPortPoints.portPoints.map(e=\u003ee.z??0))].sort((e,n)=\u003ee-n)}getFirstSolvedViaTraceConflict(){if(this.solvedRoutes.length\u003c2)return null;const e=new oB(this.solvedRoutes),n=this.getAvailableZLayers();for(const o of this.solvedRoutes){const i=o.viaDiameter/2+this.POSTROUTE_VIA_TRACE_CLEARANCE;for(const r of o.vias)for(const s of n){const a=e.getConflictingRoutesNearPoint({x:r.x,y:r.y,z:s},i).filter(({conflictingRoute:A})=\u003eA.connectionName!==o.connectionName\u0026\u0026!this.connMap?.areIdsConnected(o.connectionName,A.connectionName));if(a.length\u003e0)return{route:o,via:r,conflictingRoute:a[0].conflictingRoute}}}return null}queueConnectionForPostrouteRepair(e){const n=this.originalConnectionPointsByName.get(e);return!(!n||n.length\u003c2)\u0026\u0026(this.solvedRoutes=this.solvedRoutes.filter(o=\u003eo.connectionName!==e),this.unsolvedConnections.push({connectionName:e,rootConnectionName:this.rootConnectionNameByConnectionName.get(e),points:n.map(o=\u003e({...o}))}),this.rerouteAttemptsByConnection.set(e,(this.rerouteAttemptsByConnection.get(e)??0)+1),!0)}_step(){if(this.activeSubSolver)return this.activeSubSolver.step(),this.progress=this.computeProgress(),void(this.activeSubSolver.solved?(this.solvedRoutes.push(this.activeSubSolver.solvedPath),this.activeSubSolver=null):this.activeSubSolver.failed\u0026\u0026(this.failedSubSolvers.push(this.activeSubSolver),this.activeSubSolver=null,this.error=this.failedSubSolvers.map(n=\u003en.error).join(`\n`),this.failed=!0));const e=this.unsolvedConnections.pop();if(this.progress=this.computeProgress(),!e){const n=this.getFirstSolvedViaTraceConflict();if(n){if((this.rerouteAttemptsByConnection.get(n.route.connectionName)??0)\u003e=this.MAX_POSTROUTE_REPAIR_ATTEMPTS)return this.error=[\"Post-route via/trace clearance repair exceeded retry budget\",`route: ${n.route.connectionName}`,`conflicts with: ${n.conflictingRoute.connectionName}`,`via: (${n.via.x.toFixed(3)}, ${n.via.y.toFixed(3)})`].join(`\n`),void(this.failed=!0);if(this.queueConnectionForPostrouteRepair(n.route.connectionName))return void(this.progress=this.computeProgress())}return void(this.solved=this.failedSubSolvers.length===0)}if(e.points.length!==1\u0026\u0026!(e.points.length\u003e2\u0026\u0026this.queueExtraBranchesForMultiPointConnection(e))){if(e.points.length===2){const[n,o]=e.points,i=Math.abs(n.x-o.x)\u003c1e-6,r=Math.abs(n.y-o.y)\u003c1e-6;if(i\u0026\u0026r\u0026\u0026n.z===o.z||i\u0026\u0026r\u0026\u0026n.z!==o.z\u0026\u0026this.trySolveSamePointLayerChange(e))return}this.activeSubSolver=new ift(this.getSingleRouteSolverOpts(e))}}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const a of this.nodeWithPortPoints.portPoints)e.points.push({x:a.x,y:a.y,label:D7e(a.connectionName,a.rootConnectionName,[`layer: ${a.z}`]),color:this.colorMap[a.connectionName]??\"blue\"});for(let a=0;a\u003cthis.solvedRoutes.length;a++){const A=this.solvedRoutes[a];if(A.route.length\u003e0){const c=this.colorMap[A.connectionName]??\"blue\",l=A.rootConnectionName??this.rootConnectionNameByConnectionName.get(A.connectionName);for(let u=0;u\u003cA.route.length-1;u++){const g=A.route[u],h=A.route[u+1];e.lines.push({points:[g,h],label:D7e(A.connectionName,l,[`layer: ${g.z}`]),strokeColor:g.z===0?Es(c,.2):Es(c,.8),layer:`route-layer-${g.z}`,step:a,strokeWidth:A.traceThickness})}for(const u of A.vias)e.circles.push({center:{x:u.x,y:u.y},radius:A.viaDiameter/2,fill:Es(c,.5),layer:\"via\",step:a,label:D7e(A.connectionName,l,[\"via\"])})}}const n=Tz(this.nodeWithPortPoints),{minX:o,minY:i,maxX:r,maxY:s}=n;return e.lines.push({points:[{x:o,y:i},{x:r,y:i},{x:r,y:s},{x:o,y:s},{x:o,y:i}],strokeColor:\"rgba(255, 0, 0, 0.25)\",strokeDash:\"4 4\",layer:\"border\"}),e}},EXn=(t,e,n,o)=\u003e{const i={x:e.x,y:e.y,z:n.z,parent:{x:n.x,y:n.y,z:n.z,g:0,h:0,f:0,parent:null},g:0,h:0,f:0};return!t.isNodeTooCloseToObstacle(i,t.viaDiameter/2+t.obstacleMargin/2,!0)\u0026\u0026!t.isNodeTooCloseToEdge(i,!0)},N5=t=\u003eMath.round(200*t)/200,R7e=t=\u003etypeof structuredClone==\"function\"?structuredClone(t):JSON.parse(JSON.stringify(t));Lse();var T7e=class extends Wse{getSolverName(){return\"CachedIntraNodeRouteSolver\"}cacheProvider;cacheHit=!1;hasAttemptedToUseCache=!1;initialUnsolvedConnections;constructor(e){super(e),this.cacheProvider=e.cacheProvider===void 0?tB():e.cacheProvider,this.initialUnsolvedConnections=R7e(this.unsolvedConnections),(this.solved||this.failed)\u0026\u0026this.cacheProvider\u0026\u0026!this.cacheHit\u0026\u0026this.saveToCacheSync()}_step(){if(!this.hasAttemptedToUseCache\u0026\u0026this.cacheProvider\u0026\u0026this.attemptToUseCacheSync())return;const e=this.solved,n=this.failed;super._step(),!this.cacheProvider||this.cacheHit||!this.solved\u0026\u0026!this.failed||e||n||this.saveToCacheSync()}computeCacheKeyAndTransform(){const e=this.nodeWithPortPoints.center,n=this.initialUnsolvedConnections.map(({connectionName:c,rootConnectionName:l,points:u})=\u003e({connectionName:c,rootConnectionName:l,points:u.map(g=\u003e({connectionName:c,x:N5(g.x-e.x),y:N5(g.y-e.y),z:g.z??0}))})),o=[...this.nodeWithPortPoints.portPoints].sort((c,l)=\u003ec.connectionName!==l.connectionName?c.connectionName.localeCompare(l.connectionName):(c.portPointId??\"\")!==(l.portPointId??\"\")?(c.portPointId??\"\").localeCompare(l.portPointId??\"\"):c.x!==l.x?c.x-l.x:c.y!==l.y?c.y-l.y:(c.z??0)-(l.z??0)).map(c=\u003e({connectionName:c.connectionName,rootConnectionName:c.rootConnectionName,portPointId:c.portPointId,prevPortPointId:c.prevPortPointId,nextPortPointId:c.nextPortPointId,x:N5(c.x-e.x),y:N5(c.y-e.y),z:c.z??0})),i=Object.fromEntries(Object.entries(this.hyperParameters??{}).filter(([,c])=\u003ec!==void 0).sort(([c],[l])=\u003ec.localeCompare(l))),r=this.connMap?this.initialUnsolvedConnections.map(({connectionName:c})=\u003e({connectionName:c,connectedIds:[...new Set(this.connMap.getIdsConnectedToNet(c)??[])].sort()})):void 0,s={cacheSchemaVersion:4,node:{width:N5(this.nodeWithPortPoints.width),height:N5(this.nodeWithPortPoints.height),center:{x:N5(this.nodeWithPortPoints.center.x),y:N5(this.nodeWithPortPoints.center.y)},availableZ:this.nodeWithPortPoints.availableZ?[...this.nodeWithPortPoints.availableZ].sort():void 0,portPoints:o},normalizedConnections:n,normalizedHyperParameters:i,minDistBetweenEnteringPoints:N5(this.minDistBetweenEnteringPoints),traceWidth:N5(this.traceWidth),viaDiameter:N5(this.viaDiameter),obstacleMargin:N5(this.obstacleMargin),normalizedConnMap:r},a=`intranode-solver:${$9e(s,{respectType:!1,unorderedObjects:!1})}`,A={};return this.cacheKey=a,this.cacheToSolveSpaceTransform=A,{cacheKey:a,cacheToSolveSpaceTransform:A}}applyCachedSolution(e){e.success?(this.solvedRoutes=R7e(e.solvedRoutes),this.solved=!0,this.failed=!1):(this.solvedRoutes=[],this.failedSubSolvers=[],this.solved=!1,this.failed=!0,this.error=e.error??this.error),this.unsolvedConnections=[],this.activeSubSolver=null,this.cacheHit=!0,this.progress=1}attemptToUseCacheSync(){if(this.hasAttemptedToUseCache=!0,!this.cacheProvider?.isSyncCache)return!1;if(!this.cacheKey)try{this.computeCacheKeyAndTransform()}catch(e){return console.error(\"Error computing cache key:\",e),!1}if(!this.cacheKey)return console.error(\"Failed to compute cache key.\"),!1;try{const e=this.cacheProvider.getCachedSolutionSync(this.cacheKey);if(e!=null)return this.applyCachedSolution(e),!0}catch(e){console.error(\"Error attempting to use cache:\",e)}return!1}saveToCacheSync(){if(!this.cacheProvider?.isSyncCache)return;if(!this.cacheKey)try{this.computeCacheKeyAndTransform()}catch(n){return void console.error(\"Error computing cache key during save:\",n)}if(!this.cacheKey)return void console.error(\"Failed to compute cache key before saving.\");const e=this.failed?{success:!1,error:this.error??void 0}:{success:!0,solvedRoutes:R7e(this.solvedRoutes)};try{this.cacheProvider.setCachedSolutionSync(this.cacheKey,e)}catch(n){console.error(\"Error saving solution to cache:\",n)}}},rft=(t,e)=\u003e{const n={};return t.portPoints.forEach((o,i)=\u003e{n[o.connectionName]=`hsl(${360*i/t.portPoints.length}, 100%, 50%)`}),n},BXn=class extends yr{getSolverName(){return\"ViaPossibilitiesSolver2\"}bounds;maxViaCount;portPairMap;colorMap;nodeWidth;availableZ;hyperParameters;VIA_INTERSECTION_BUFFER_DISTANCE=.05;PLACEHOLDER_WALL_BUFFER_DISTANCE=.1;NEW_HEAD_WALL_BUFFER_DISTANCE=.05;viaDiameter;unprocessedConnections;completedPaths=new Map;placeholderPaths=new Map;currentHead;currentConnectionName;currentPath;currentViaCount;constructor({nodeWithPortPoints:e,colorMap:n,hyperParameters:o,viaDiameter:i}){super(),this.MAX_ITERATIONS=1e5,this.colorMap=n??rft(e),this.maxViaCount=5,this.bounds=Tz(e),this.nodeWidth=this.bounds.maxX-this.bounds.minX,this.portPairMap=(s=\u003e{const a=new Map;return s.portPoints.forEach(A=\u003e{a.has(A.connectionName)?a.get(A.connectionName).end=A:a.set(A.connectionName,{start:A,end:null,connectionName:A.connectionName})}),a})(e),this.stats.solutionsFound=0,this.availableZ=e.availableZ??[0,1],this.hyperParameters=o??{SHUFFLE_SEED:0},this.viaDiameter=i??.3,this.unprocessedConnections=Array.from(this.portPairMap.keys()).sort(),o?.SHUFFLE_SEED\u0026\u0026(this.unprocessedConnections=D5(this.unprocessedConnections,o.SHUFFLE_SEED));for(const[s,{start:a,end:A}]of this.portPairMap.entries())if(a.z===A.z){const c=Math.abs(a.x-A.x)\u003c1e-9,l=Math.abs(a.y-A.y)\u003c1e-9;c||l?this.placeholderPaths.set(s,[a,this._padByPlaceholderWallBuffer(a),this._padByPlaceholderWallBuffer(A),A]):this.placeholderPaths.set(s,[a,A])}else{const c=(a.x+A.x)/2,l=(a.y+A.y)/2,u=this._padByPlaceholderWallBuffer({x:c,y:l,z:a.z}),g=this._padByPlaceholderWallBuffer({x:c,y:l,z:A.z});this.placeholderPaths.set(s,[a,this._padByPlaceholderWallBuffer(a),u,g,this._padByPlaceholderWallBuffer(A),A])}this.currentConnectionName=this.unprocessedConnections.pop();const r=this.portPairMap.get(this.currentConnectionName).start;this.currentHead=this._padByNewHeadWallBuffer(r),this.currentPath=[r,this.currentHead],this.currentViaCount=0,this.placeholderPaths.delete(this.currentConnectionName)}_padByNewHeadWallBuffer(e){return{x:V3(e.x,this.bounds.minX+this.NEW_HEAD_WALL_BUFFER_DISTANCE,this.bounds.maxX-this.NEW_HEAD_WALL_BUFFER_DISTANCE),y:V3(e.y,this.bounds.minY+this.NEW_HEAD_WALL_BUFFER_DISTANCE,this.bounds.maxY-this.NEW_HEAD_WALL_BUFFER_DISTANCE),z:e.z}}_padByPlaceholderWallBuffer(e){return{x:V3(e.x,this.bounds.minX+this.PLACEHOLDER_WALL_BUFFER_DISTANCE,this.bounds.maxX-this.PLACEHOLDER_WALL_BUFFER_DISTANCE),y:V3(e.y,this.bounds.minY+this.PLACEHOLDER_WALL_BUFFER_DISTANCE,this.bounds.maxY-this.PLACEHOLDER_WALL_BUFFER_DISTANCE),z:e.z}}_step(){if(this.solved)return;const e=this.portPairMap.get(this.currentConnectionName).end,n=[this.currentHead,e];let o=null,i=null;const r=a=\u003e{for(const A of a.values())for(let c=0;c\u003cA.length-1;c++){const l=[A[c],A[c+1]];if(l[0].x===l[1].x\u0026\u0026l[0].y===l[1].y||l[0].z!==this.currentHead.z)continue;const u=DD(n[0],n[1],l[0],l[1]);if(u){const g=no(this.currentHead,u);if(g\u003c1e-6)continue;(!o||g\u003co.dist)\u0026\u0026(o={point:u,dist:g},i=l[0].z)}}};r(this.completedPaths),r(this.placeholderPaths);const s=this.currentHead.z!==e.z;if((o||s)\u0026\u0026(this.currentViaCount++,this.currentViaCount\u003e=this.maxViaCount))return this.failed=!0,void(this.error=`Exceeded max via count of ${this.maxViaCount}`);if(o){let a;const A=o.dist;if(A\u003c=this.VIA_INTERSECTION_BUFFER_DISTANCE+1e-6)a=V8(this.currentHead,o.point);else{const g=o.point,h=g.x-this.currentHead.x,d=g.y-this.currentHead.y,p=(A-this.VIA_INTERSECTION_BUFFER_DISTANCE)/A;a={x:this.currentHead.x+h*p,y:this.currentHead.y+d*p}}const c=this.availableZ.find(g=\u003eg!==i);if(c===void 0)return this.error=\"Could not determine next Z level for via placement!\",void(this.failed=!0);const l={...a,z:this.currentHead.z},u={...a,z:c};this.currentPath.push(l,u),this.currentHead=u}else if(s){let a;const A=no(this.currentHead,e);if(A\u003cthis.VIA_INTERSECTION_BUFFER_DISTANCE)a=V8(this.currentHead,e);else{const g=e.x-this.currentHead.x,h=e.y-this.currentHead.y,d=(A-this.VIA_INTERSECTION_BUFFER_DISTANCE)/A;a={x:this.currentHead.x+g*d,y:this.currentHead.y+h*d}}const c=e.z,l={...a,z:this.currentHead.z},u={...a,z:c};this.currentPath.push(l,u),this.currentHead=u}else if(this.currentPath.push(e),this.completedPaths.set(this.currentConnectionName,this.currentPath),this.unprocessedConnections.length===0)this.solved=!0,this.stats.solutionsFound=1;else{this.currentConnectionName=this.unprocessedConnections.pop();const{start:a}=this.portPairMap.get(this.currentConnectionName);this.currentHead=this._padByNewHeadWallBuffer(a),this.currentPath=[a,this.currentHead],this.currentViaCount=0,this.placeholderPaths.delete(this.currentConnectionName)}}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:\"Via Possibilities Solver State\",coordinateSystem:\"cartesian\"},n=this.colorMap;e.lines.push({points:[{x:this.bounds.minX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.minY}],strokeColor:\"gray\",strokeWidth:.01});for(const[i,{start:r,end:s}]of this.portPairMap.entries()){const a=this.colorMap[i]??\"black\";e.points.push({x:r.x,y:r.y,color:a,label:`Port: ${i} Start (z${r.z})`}),e.points.push({x:s.x,y:s.y,color:a,label:`Port: ${i} End (z${s.z})`})}const o=(i,r)=\u003e{for(const[s,a]of i.entries()){const A=n[s]??\"black\";for(let c=0;c\u003ca.length-1;c++){const l=a[c],u=a[c+1];l.x===u.x\u0026\u0026l.y===u.y\u0026\u0026l.z!==u.z?e.circles.push({center:{x:l.x,y:l.y},radius:this.viaDiameter/2,fill:Es(A,.5),label:`${r}: ${s} Via (z${l.z}-\u003ez${u.z})`}):e.lines.push({points:[l,u],strokeColor:Es(A,.5),strokeDash:l.z===0?void 0:[.1,.1],strokeWidth:.1,label:`${r}: ${s} (z${l.z})`})}}};if(o(this.placeholderPaths,\"Placeholder\"),o(this.completedPaths,\"Completed\"),this.currentPath\u0026\u0026this.currentPath.length\u003e0){const i=n[this.currentConnectionName]??\"orange\";for(let r=0;r\u003cthis.currentPath.length-1;r++){const s=this.currentPath[r],a=this.currentPath[r+1];s.x===a.x\u0026\u0026s.y===a.y\u0026\u0026s.z!==a.z?e.circles.push({center:{x:s.x,y:s.y},radius:this.viaDiameter/2,fill:Es(i,.5),label:`Current: ${this.currentConnectionName} Via (z${s.z}-\u003ez${a.z})`}):e.lines.push({points:[s,a],strokeColor:Es(i,.5),strokeWidth:.15,strokeDash:\"2,2\",label:`Current: ${this.currentConnectionName} (z${s.z})`})}e.points.push({x:this.currentHead.x,y:this.currentHead.y,color:\"green\",label:`Current Head: ${this.currentConnectionName} (z${this.currentHead.z})`})}return e}},jse=t=\u003eMath.round(1e4*t),sft=t=\u003e{let e=0,n=[];const o=[];for(const r of t.portPoints){if(n.some(a=\u003ea.connectionName===r.connectionName)||o.some(a=\u003ea.connectionName===r.connectionName))continue;const s={connectionName:r.connectionName,z:r.z,points:[{x:jse(r.x),y:jse(r.y),z:r.z}]};for(const a of t.portPoints)r.connectionName===a.connectionName\u0026\u0026(r.x===a.x\u0026\u0026r.y===a.y||s.points.push({x:jse(a.x),y:jse(a.y),z:a.z}));s.points.some(a=\u003ea.z!==s.z)?o.push(s):n.push(s)}n=n.filter(r=\u003er.points.length\u003e1);for(let r=0;r\u003cn.length;r++)for(let s=r+1;s\u003cn.length;s++){const a=n[r],A=n[s];a.z===A.z\u0026\u0026Uh(a.points[0],a.points[1],A.points[0],A.points[1])\u0026\u0026e++}let i=0;for(let r=0;r\u003co.length;r++)for(let s=r+1;s\u003co.length;s++){const a=o[r],A=o[s];Uh(a.points[0],a.points[1],A.points[0],A.points[1])\u0026\u0026i++}return{numSameLayerCrossings:e,numEntryExitLayerChanges:o.length,numTransitionPairCrossings:i}},bXn=t=\u003e{const{start:e,end:n,segmentsPerPolyline:o,viaPositions:i,viaCount:r,availableZ:s}=t,a=(function(h,d){const p=new Array(h).fill(0);if(d===0)return p;if(d===h)return p.fill(1);if(d\u003c=h/2){const m=Math.floor(h/d),_=Math.floor((h-(m*(d-1)+1))/2);for(let f=0;f\u003cd;f++)p[_+f*m]=1}else{const m=h-d,_=Math.floor(h/m),f=Math.floor((h-(_*(m-1)+1))/2);p.fill(1);for(let I=0;I\u003cm;I++)p[f+I*_]=0}return p})(o,r),A=a.map(()=\u003enull);let c=0,l=e.z1;const u=s.indexOf(e.z1);for(let h=0;h\u003ca.length;h++)if(a[h]===1){const d=s[(u+c+1)%s.length];A[h]={...i[c],z1:l,z2:d},l=d,c++}let g=e;for(let h=0;h\u003cA.length;h++){if(A[h]){g=A[h];continue}let d=n,p=A.length;for(let I=h+1;I\u003cA.length;I++)if(A[I]){d=A[I],p=I;break}const m=p-h,_=d.x-g.x,f=d.y-g.y;for(let I=1/(m+1),C=0;h+C!==p;I+=1/(m+1),C++)A[h+C]={x:g.x+_*I,y:g.y+f*I,z1:g.z2,z2:g.z2}}return A},iL=1e-9;function $se(t,e){return Math.abs(t-e)\u003ciL}function k7e(t){return`${Math.round(t.x/iL)}:${Math.round(t.y/iL)}`}function F7e(t,e,n,o){return t*o-e*n}function SXn(t,e,n,o){const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-n.x,y:o.y-n.y},s=F7e(i.x,i.y,r.x,r.y),a={x:n.x-t.x,y:n.y-t.y};if($se(s,0))return null;const A=F7e(a.x,a.y,r.x,r.y)/s,c=F7e(a.x,a.y,i.x,i.y)/s;return A\u003e=-1e-9\u0026\u0026A\u003c=1+iL\u0026\u0026c\u003e=-1e-9\u0026\u0026c\u003c=1+iL?{x:t.x+A*i.x,y:t.y+A*i.y}:null}function aft(t,e,n){return $se(Math.hypot(t.x-e.x,t.y-e.y)+Math.hypot(t.x-n.x,t.y-n.y),Math.hypot(e.x-n.x,e.y-n.y))}function QXn(t,e){const n=[],o=new Map;for(const d of t){const p=[d.start,...d.mPoints,d.end];for(let _=0;_\u003cp.length-1;_++){const f=p[_],I=p[_+1],C=f.z2;if(n.push({start:{x:f.x,y:f.y},end:{x:I.x,y:I.y},connectionName:d.connectionName,layer:C}),f.z1!==f.z2){const y=k7e(f);o.has(y)||o.set(y,{point:f,connectionName:d.connectionName})}}const m=p[p.length-1];if(m.z1!==m.z2){const _=k7e(m);o.has(_)||o.set(_,{point:m,connectionName:d.connectionName})}}const i=[{start:{x:e.minX,y:e.minY},end:{x:e.maxX,y:e.minY},connectionName:null,layer:0},{start:{x:e.maxX,y:e.minY},end:{x:e.maxX,y:e.maxY},connectionName:null,layer:0},{start:{x:e.maxX,y:e.maxY},end:{x:e.minX,y:e.maxY},connectionName:null,layer:0},{start:{x:e.minX,y:e.maxY},end:{x:e.minX,y:e.minY},connectionName:null,layer:0}];n.push(...i);const r=new Map;let s=0;function a(d,p){const m=k7e(d);let _=r.get(m);if(!_){const f=o.has(m);_={id:s++,x:d.x,y:d.y,isVia:f,connectionNames:new Set,outgoingEdges:[]},r.set(m,_),f\u0026\u0026o.get(m)\u0026\u0026_.connectionNames.add(o.get(m).connectionName)}return p\u0026\u0026_.connectionNames.add(p),_}for(const d of n)a(d.start,d.connectionName),a(d.end,d.connectionName);const A=new Map;for(const d of n)A.set(d,[]);for(let d=0;d\u003cn.length;d++)for(let p=d+1;p\u003cn.length;p++){if(n[d].layer!==n[p].layer)continue;const m=SXn(n[d].start,n[d].end,n[p].start,n[p].end);m\u0026\u0026(a(m),aft(m,n[d].start,n[d].end)\u0026\u0026A.get(n[d]).push(m),aft(m,n[p].start,n[p].end)\u0026\u0026A.get(n[p]).push(m))}const c=[];let l=0;for(const d of n){const p=[d.start,...A.get(d),d.end];p.sort((_,f)=\u003e{const I=d.end.x-d.start.x,C=d.end.y-d.start.y;return Math.abs(I)\u003eMath.abs(C)?(_.x-d.start.x)/I-(f.x-d.start.x)/I:Math.abs(C)\u003ciL?0:(_.y-d.start.y)/C-(f.y-d.start.y)/C});const m=[];if(p.length\u003e0){m.push(p[0]);for(let _=1;_\u003cp.length;_++)$se(p[_].x,p[_-1].x)\u0026\u0026$se(p[_].y,p[_-1].y)||m.push(p[_])}for(let _=0;_\u003cm.length-1;_++){const f=m[_],I=m[_+1],C=a(f,d.connectionName),y=a(I,d.connectionName);if(C===y)continue;const x={id:l++,origin:C,twin:null,next:null,face:null,connectionName:d.connectionName,layer:d.layer,visited:!1},E={id:l++,origin:y,twin:x,next:null,face:null,connectionName:d.connectionName,layer:d.layer,visited:!1};x.twin=E,c.push(x,E),C.outgoingEdges.push(x),y.outgoingEdges.push(E)}}for(const d of r.values()){d.outgoingEdges.sort((m,_)=\u003e{const f=m.twin.origin,I=_.twin.origin;return Math.atan2(f.y-d.y,f.x-d.x)-Math.atan2(I.y-d.y,I.x-d.x)});const p=d.outgoingEdges.length;for(let m=0;m\u003cp;m++){const _=d.outgoingEdges[m],f=d.outgoingEdges[(m-1+p)%p];_.twin\u0026\u0026(_.twin.next=f)}}let u=0,g=null,h=-1/0;for(const d of c){if(d.visited)continue;const p={id:u++,outerComponent:d,innerComponents:[],isOuterFace:!1};let m=d;const _=[],f=[],I=new Set;let C=0;do{if(!m||m.visited){console.warn(\"Face traversal encountered visited edge or null, breaking loop.\",p.id),_.length=0;break}m.visited=!0,m.face=p,_.push(m),f.push(m.origin),m.connectionName!==null\u0026\u0026I.add(m.connectionName);const y=m.origin,x=m.twin.origin;C+=y.x*x.y-x.x*y.y,m=m.next}while(m!==d\u0026\u0026m!==null);if(m===d){if(C=.5*Math.abs(C),C\u003eh\u0026\u0026(h=C,g\u0026\u0026(g.isOuterFace=!1),g=p,p.isOuterFace=!0),!p.isOuterFace\u0026\u0026_.length\u003e0\u0026\u0026[...I].filter(y=\u003ey!==null).length\u003e1){let y=!1;for(const x of f)if(x.isVia){y=!0;break}if(!y)return!0}}else console.warn(`Face ${p.id} did not close properly.`),u--}return!1}var Aft=t=\u003e{if(t.length===0)return[[]];const e=[];for(let n=0;n\u003ct.length;n++){const o=t[n],i=[...t.slice(0,n),...t.slice(n+1)],r=Aft(i);for(const s of r)e.push([o,...s])}return e},L7e=1e-9;function qse(t,e,n=1e-9){return Math.abs(t-e)\u003cn}function H7e(t,e,n,o){return t*o-e*n}function vXn(t,e,n,o){const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-n.x,y:o.y-n.y},s=H7e(i.x,i.y,r.x,r.y);if(qse(s,0))return null;const a={x:n.x-t.x,y:n.y-t.y},A=H7e(a.x,a.y,r.x,r.y)/s,c=H7e(a.x,a.y,i.x,i.y)/s;return A\u003c-1e-9||A\u003e1+L7e||c\u003c-1e-9||c\u003e1+L7e?null:{x:t.x+A*i.x,y:t.y+A*i.y}}function wXn(t){let e=0;for(let n=0,o=t.length;n\u003co;++n){const i=(n+1)%o;e+=t[n].x*t[i].y-t[i].x*t[n].y}return .5*e}function PXn(t){let e=0,n=0,o=0;for(let i=0,r=t.length;i\u003cr;++i){const s=(i+1)%r,a=t[i].x*t[s].y-t[s].x*t[i].y;e+=a,n+=(t[i].x+t[s].x)*a,o+=(t[i].y+t[s].y)*a}return e*=.5,qse(e,0)?null:(n/=6*e,o/=6*e,{x:n,y:o})}var MXn=class{x;y;out;connectionNames;constructor(e,n){this.x=e,this.y=n,this.out=[],this.connectionNames=new Set}},cft=class{orig;dest;twin;next;visited;constructor(e,n){this.orig=e,this.dest=n,this.twin=null,this.next=null,this.visited=!1}};function DXn(t,e){const n=[...e,{start:{x:t.minX,y:t.minY},end:{x:t.maxX,y:t.minY}},{start:{x:t.maxX,y:t.minY},end:{x:t.maxX,y:t.maxY}},{start:{x:t.maxX,y:t.maxY},end:{x:t.minX,y:t.maxY}},{start:{x:t.minX,y:t.maxY},end:{x:t.minX,y:t.minY}}],o=n.map(()=\u003e[]);for(let u=0;u\u003cn.length;++u){const g=n[u];o[u].push(g.start,g.end)}for(let u=0;u\u003cn.length;++u)for(let g=u+1;g\u003cn.length;++g){const h=vXn(n[u].start,n[u].end,n[g].start,n[g].end);h\u0026\u0026(o[u].push(h),o[g].push(h))}const i=new Map,r=[];function s(u){const g=(function(h,d=1e-9){return`${Math.round(h.x/d)}:${Math.round(h.y/d)}`})(u);if(!i.has(g)){const h=r.length;return i.set(g,h),r.push(new MXn(u.x,u.y)),h}return i.get(g)}const a=[];for(let u=0;u\u003cn.length;++u){const g=n[u],h=o[u].slice();h.sort((d,p)=\u003e{const m=g.end.x-g.start.x,_=g.end.y-g.start.y;return(qse(Math.abs(m),0)?(d.y-g.start.y)/_:(d.x-g.start.x)/m)-(qse(Math.abs(m),0)?(p.y-g.start.y)/_:(p.x-g.start.x)/m)});for(let d=0;d\u003ch.length-1;++d){const p=h[d],m=h[d+1],_=s(p),f=s(m);_!==f\u0026\u0026(a.push([_,f]),g.connectionName\u0026\u0026(r[_].connectionNames.add(g.connectionName),r[f].connectionNames.add(g.connectionName)))}}const A=[];for(const[u,g]of a){const h=new cft(u,g),d=new cft(g,u);h.twin=A.length+1,d.twin=A.length;const p=A.length;A.push(h,d),r[u].out.push(p),r[g].out.push(p+1)}for(let u=0;u\u003cr.length;++u){const g=r[u];g.out.sort((d,p)=\u003e{const m=A[d],_=A[p],f=r[m.dest],I=r[_.dest];return Math.atan2(f.y-g.y,f.x-g.x)-Math.atan2(I.y-g.y,I.x-g.x)});const h=g.out.length;for(let d=0;d\u003ch;++d){const p=g.out[d],m=g.out[(d-1+h)%h],_=A[p];_.twin!==null\u0026\u0026(A[_.twin].next=m)}}const c=[],l=[];for(let u=0;u\u003cA.length;++u){if(A[u].visited)continue;let g=u;const h=[];do{if(g===null)break;const d=A[g];d.visited=!0,h.push(r[d.orig]),g=d.next}while(g!==null\u0026\u0026g!==u\u0026\u0026!A[g].visited);if(!(h.length\u003c3)\u0026\u0026wXn(h)\u003eL7e){const d=PXn(h);d\u0026\u0026(c.push(d),l.push({vertices:h.map(p=\u003e({x:p.x,y:p.y,connectionNames:p.connectionNames.size\u003e0?p.connectionNames:void 0})),centroid:d}))}}return{centroids:c,faces:l,allVertices:r}}function NXn(t,e){if(t\u003ee)throw new Error(\"oneCount cannot be greater than length\");if(t\u003c0||e\u003c0)throw new Error(\"oneCount and length must be non-negative\");const n=[];return(function o(i,r,s){s!==e?(i[s]=0,o(i,r,s+1),r\u003e0\u0026\u0026(i[s]=1,o(i,r-1,s+1))):r===0\u0026\u0026n.push([...i])})(Array(e).fill(0),t,0),n}var RXn=class extends yr{getSolverName(){return\"MultiHeadPolyLineIntraNodeSolver\"}nodeWithPortPoints;colorMap;hyperParameters;connMap;candidates;bounds;solvedRoutes=[];unsolvedConnections=[];SEGMENTS_PER_POLYLINE;cellSize;MAX_CANDIDATES=5e4;viaDiameter=.3;obstacleMargin=.1;traceWidth=.15;availableZ=[];uniqueConnections=0;BOUNDARY_PADDING;lastCandidate=null;maxViaCount;minViaCount;phase=\"setup\";progress=0;constructor(e){super(),this.MAX_ITERATIONS=1e4,this.nodeWithPortPoints=e.nodeWithPortPoints,this.colorMap=e.colorMap??rft(e.nodeWithPortPoints),this.hyperParameters=e.hyperParameters??{},this.SEGMENTS_PER_POLYLINE=e.hyperParameters?.SEGMENTS_PER_POLYLINE??3,this.BOUNDARY_PADDING=e.hyperParameters?.BOUNDARY_PADDING??.05,this.connMap=e.connMap,this.viaDiameter=e.viaDiameter??this.viaDiameter,this.cellSize=this.nodeWithPortPoints.width/1024,this.candidates=[],this.availableZ=this.nodeWithPortPoints.availableZ??[0,1],this.bounds={minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2};const n=this.nodeWithPortPoints.width*this.nodeWithPortPoints.height,o=(this.viaDiameter+2*this.obstacleMargin+this.traceWidth/2)**2,i=new Set(this.nodeWithPortPoints.portPoints.map(a=\u003ea.connectionName)).size;this.uniqueConnections=i;const{numSameLayerCrossings:r,numEntryExitLayerChanges:s}=sft(this.nodeWithPortPoints);if(this.minViaCount=2*r+s,this.maxViaCount=Math.min(Math.floor(n/o),Math.ceil(1.5*i)),this.minViaCount\u003ethis.SEGMENTS_PER_POLYLINE*(i/2))return this.failed=!0,void(this.error=`Not possible to solve problem with given SEGMENTS_PER_POLYLINE (${this.SEGMENTS_PER_POLYLINE}), atleast ${this.minViaCount} vias are required`);this.maxViaCount\u003ethis.SEGMENTS_PER_POLYLINE\u0026\u0026(this.maxViaCount=this.SEGMENTS_PER_POLYLINE),this.maxViaCount\u003cthis.minViaCount\u0026\u0026(this.maxViaCount=this.minViaCount)}computeMinGapBtwPolyLines(e){const n=[],o=[],i=[];for(let r=0;r\u003ce.length;r++){const s=e[r],a=[s.start,...s.mPoints,s.end],A=new Map(this.availableZ.map(c=\u003e[c,[]]));for(let c=0;c\u003ca.length-1;c++){const l=[a[c],a[c+1]],u=l[0].z2;A.has(u)||A.set(u,[]),A.get(u).push(l)}o.push(A),i.push(a.filter(c=\u003ec.z1!==c.z2))}for(let r=0;r\u003ce.length;r++){const s=o[r],a=i[r];for(let A=r+1;A\u003ce.length;A++){if(this.connMap?.areIdsConnected(e[r].connectionName,e[A].connectionName))continue;const c=o[A],l=i[A];let u=1;for(const g of this.availableZ){const h=s.get(g)??[],d=c.get(g)??[];for(const p of h)for(const m of d)u=Math.min(u,M5(p[0],p[1],m[0],m[1])-this.traceWidth);for(const p of a)for(const m of d)u=Math.min(u,wc(p,m[0],m[1])-this.traceWidth/2-this.viaDiameter/2);for(const p of l)for(const m of h)u=Math.min(u,wc(p,m[0],m[1])-this.traceWidth/2-this.viaDiameter/2);for(const p of a)for(const m of l)u=Math.min(u,no(p,m)-this.viaDiameter)}n.push(u)}}return n}insertCandidate(e){let n=0,o=this.candidates.length-1;for(;n\u003c=o;){const i=Math.floor((n+o)/2);this.candidates[i].f\u003ce.f?n=i+1:o=i-1}this.candidates.splice(n,0,e)}setupInitialPolyLines(){const e=new Map;this.nodeWithPortPoints.portPoints.forEach(s=\u003e{e.has(s.connectionName)?e.get(s.connectionName).end={...s,z1:s.z??0,z2:s.z??0}:e.set(s.connectionName,{start:{...s,z1:s.z??0,z2:s.z??0},end:null})});for(const[s,a]of e.entries())a.end===null\u0026\u0026e.delete(s);if(e.size===0)return this.failed=!0,void(this.error=\"No port pairs found, can't solve\");const n=Array.from(e.entries()),o=((s,a,A,c)=\u003e{const l=[];for(const[,g]of s){const h=g.start.z1!==g.end.z1,d=[];for(let p=0;p\u003c=a;p++){const m=p%2!=0;h\u0026\u0026m?d.push(p):h||m||d.push(p)}l.push(d)}if(l.length===0)return[[]];let u=(g=\u003e{if(!g||g.length===0)return[[]];let h=[[]];for(const d of g){const p=[];for(const m of h)for(const _ of d)p.push([...m,_]);h=p}return h})(l).filter(g=\u003e{for(let h=0;h\u003cg.length;h++)if(g.reduce((d,p)=\u003ed+p,0)\u003cc)return!1;return!0});return u=u.filter(g=\u003e{for(let h=0;h\u003cs.length;h++){const[,d]=s[h];if(d.start.z1!==d.start.z2\u0026\u0026g[h]===0)return!1}return!0}),u=u.filter(g=\u003e{for(let h=0;h\u003cs.length;h++){const[,d]=s[h];if(s[h][1].start.z1===s[h][1].start.z2)for(let p=h+1;p\u003cs.length;p++){if(s[p][1].start.z1!==s[p][1].start.z2)continue;const[,m]=s[p];if(d.start.z1===d.end.z1\u0026\u0026m.start.z1===m.end.z1\u0026\u0026d.start.z1===m.start.z1\u0026\u0026Uh(d.start,d.end,m.start,m.end)\u0026\u0026g[h]+g[p]\u003c2)return!1}}return!0}),u=u.filter(g=\u003e!(g.reduce((h,d)=\u003eh+d,0)\u003eA)),u})(n,this.SEGMENTS_PER_POLYLINE,this.maxViaCount,this.minViaCount),i=(s=\u003e{const{bounds:a,portPairsEntries:A,viaCountVariants:c}=s,{centroids:l}=DXn(a,A.map(([g,h])=\u003eh)),u=[];for(const g of c){const h=g.reduce((m,_)=\u003em+_,0);let d=l;if(l.length\u003ch){d=[];const m=Math.ceil(Math.sqrt(h)),_=m;for(let f=0;f\u003cm;f++)for(let I=0;I\u003c_;I++)d.push({x:a.minX+(I+1)/(_+1)*(a.maxX-a.minX),y:a.minY+(f+1)/(m+1)*(a.maxY-a.minY)})}const p=NXn(h,d.length);for(const m of p){const _=[];for(let f=0;f\u003cm.length;f++)m[f]===1\u0026\u0026_.push(d[f]);u.push({viaPositions:_,viaCountVariant:g})}}return u})({portPairsEntries:n,viaCountVariants:o,bounds:this.bounds}),r=[];for(const{viaCountVariant:s,viaPositions:a}of i){const A=Aft(a);for(const c of A)r.push({viaCountVariant:s,viaPositions:c})}for(const{viaPositions:s,viaCountVariant:a}of r){const A=[];let c=0;for(let h=0;h\u003cn.length;h++){const[d,p]=n[h],m=a[h],_=s.slice(c,c+m),f=bXn({start:p.start,end:p.end,segmentsPerPolyline:this.SEGMENTS_PER_POLYLINE,viaPositions:_,viaCount:m,availableZ:this.availableZ});c+=m,A.push({connectionName:d,start:p.start,end:p.end,mPoints:f})}if(QXn(A,this.bounds))continue;const l=this.computeMinGapBtwPolyLines(A),u=this.computeH({minGaps:l,forces:[]}),g={polyLines:A,g:0,h:u,f:u,viaCount:a.reduce((h,d)=\u003eh+d,0),minGaps:l};if(this.checkIfSolved(g))return void(this.candidates=[g]);if(this.candidates.push(g),this.candidates.length\u003ethis.MAX_CANDIDATES)return}this.candidates.sort((s,a)=\u003es.f-a.f)}computeG(e,n){return n.g+5e-6+5e-6*n.viaCount*100}computeH(e){let n=0;for(const o of e.forces??[])for(const i of o)for(const r of i.values())n+=r.fx*r.fx+r.fy*r.fy;return n}getNeighbors(e){const{polyLines:n}=e,o=n.length,i=.02,r=.008,s=1e-6,a=Array.from({length:o},(d,p)=\u003eArray.from({length:n[p].mPoints.length},()=\u003enew Map)),A=(d,p,m,_,f)=\u003e{if(p\u003e0\u0026\u0026p\u003cn[d].mPoints.length+1){const I=p-1,C=a[d][I],y=C.get(m)||{fx:0,fy:0};C.set(m,{fx:y.fx+_,fy:y.fy+f})}};for(let d=0;d\u003co;d++)for(let p=d+1;p\u003co;p++){const m=n[d],_=n[p],f=[m.start,...m.mPoints,m.end],I=[_.start,..._.mPoints,_.end],C=[],y=[];for(let B=0;B\u003cf.length-1;B++)C.push({p1:f[B],p2:f[B+1],layer:f[B].z2,p1Idx:B,p2Idx:B+1});f.forEach((B,S)=\u003e{B.z1!==B.z2\u0026\u0026y.push({point:B,layers:[B.z1,B.z2],index:S})});const x=[],E=[];for(let B=0;B\u003cI.length-1;B++)x.push({p1:I[B],p2:I[B+1],layer:I[B].z2,p1Idx:B,p2Idx:B+1});I.forEach((B,S)=\u003e{B.z1!==B.z2\u0026\u0026E.push({point:B,layers:[B.z1,B.z2],index:S})});for(const B of C)for(const S of x)if(B.layer===S.layer){if(M5(B.p1,B.p2,S.p1,S.p2)\u003cs)continue;const Q={x:(B.p1.x+B.p2.x)/2,y:(B.p1.y+B.p2.y)/2},w={x:(S.p1.x+S.p2.x)/2,y:(S.p1.y+S.p2.y)/2},M=Q.x-w.x,k=Q.y-w.y;if(M*M+k*k\u003es){const F=`seg:${p}:${S.p1Idx}:${S.p2Idx}`,O=`seg:${d}:${B.p1Idx}:${B.p2Idx}`,U=(Y,W,te,j,J,oe,ie)=\u003e{const ne=z_(Y,te.p1,te.p2),le=Y.x-ne.x,ge=Y.y-ne.y,_e=le*le+ge*ge;if(_e\u003c=s)return;const ue=Math.sqrt(_e),fe=.02*Math.exp(-6*ue),pe=le/ue*fe,ye=ge/ue*fe;A(j,W,oe,pe,ye),A(J,te.p1Idx,ie,-pe/2,-ye/2),A(J,te.p2Idx,ie,-pe/2,-ye/2)};U(B.p1,B.p1Idx,S,d,p,F,O),U(B.p2,B.p2Idx,S,d,p,F,O),U(S.p1,S.p1Idx,B,p,d,O,F),U(S.p2,S.p2Idx,B,p,d,O,F)}}for(const B of y)for(const S of x)if(B.layers.includes(S.layer)){const Q=z_(B.point,S.p1,S.p2),w=B.point.x-Q.x,M=B.point.y-Q.y,k=w*w+M*M;if(k\u003es){const R=Math.sqrt(k);let F=2,O=R;R\u003cthis.viaDiameter/2?(F*=4,O=Math.max(s,R)):O=Math.max(s,R-this.viaDiameter/2);const U=F*i*Math.exp(-6*O),Y=w/R*U,W=M/R*U,te=`seg:${p}:${S.p1Idx}:${S.p2Idx}`;A(d,B.index,te,Y,W);const j=`via:${d}:${B.index}`;A(p,S.p1Idx,j,-Y/2,-W/2),A(p,S.p2Idx,j,-Y/2,-W/2)}}for(const B of E)for(const S of C)if(B.layers.includes(S.layer)){const Q=z_(B.point,S.p1,S.p2),w=B.point.x-Q.x,M=B.point.y-Q.y,k=w*w+M*M;if(k\u003es){const R=Math.sqrt(k);let F=2,O=R;R\u003cthis.viaDiameter/2?(F*=4,O=Math.max(s,R)):O=Math.max(s,R-this.viaDiameter/2);const U=F*i*Math.exp(-6*O),Y=w/R*U,W=M/R*U,te=`seg:${d}:${S.p1Idx}:${S.p2Idx}`;A(p,B.index,te,Y,W);const j=`via:${p}:${B.index}`;A(d,S.p1Idx,j,-Y/2,-W/2),A(d,S.p2Idx,j,-Y/2,-W/2)}}for(const B of y)for(const S of E)if(B.layers.filter(Q=\u003eS.layers.includes(Q)).length\u003e0){const Q=B.point.x-S.point.x,w=B.point.y-S.point.y,M=Q*Q+w*w;if(M\u003es){const k=Math.sqrt(M);let R=2,F=k;k\u003cthis.viaDiameter?(R*=4,F=Math.max(s,k)):F=Math.max(s,k-this.viaDiameter);const O=R*i*Math.exp(-6*F),U=Q/k*O,Y=w/k*O,W=`via:${p}:${S.index}`,te=`via:${d}:${B.index}`;A(d,B.index,W,U,Y),A(p,S.index,te,-U,-Y)}}}for(let d=0;d\u003co;d++){const p=n[d],m=[p.start,...p.mPoints,p.end],_=[];if(m.forEach((f,I)=\u003e{f.z1!==f.z2\u0026\u0026_.push({point:f,layers:[f.z1,f.z2],index:I})}),!(_.length\u003c2))for(let f=0;f\u003c_.length;f++)for(let I=f+1;I\u003c_.length;I++){const C=_[f],y=_[I],x=C.point.x-y.point.x,E=C.point.y-y.point.y,B=x*x+E*E;if(B\u003es){const S=Math.sqrt(B);let Q=2,w=S;S\u003cthis.viaDiameter?(Q*=4,w=Math.max(s,S)):w=Math.max(s,S-this.viaDiameter);const M=Q*i*Math.exp(-6*w),k=x/S*M,R=E/S*M,F=`via:${d}:${y.index}`,O=`via:${d}:${C.index}`;A(d,C.index,F,k,R),A(d,y.index,O,-k,-R)}}}const c=n.map(d=\u003e({...d,mPoints:d.mPoints.map(p=\u003e({...p}))}));let l=!1;for(let d=0;d\u003co;d++)for(let p=0;p\u003cc[d].mPoints.length;p++){const m=c[d].mPoints[p],_=a[d][p],f={fx:0,fy:0};for(const x of _.values())f.fx+=x.fx,f.fy+=x.fy;const I=m.z1!==m.z2;let C=m.x+f.fx,y=m.y+f.fy;if(I){const x=this.viaDiameter/2;let E=0,B=0;const S=this.viaDiameter/2+this.BOUNDARY_PADDING,Q=this.bounds.minX+S,w=this.bounds.maxX-S,M=this.bounds.minY+S,k=this.bounds.maxY-S,R=Q+x-m.x,F=m.x-(w-x),O=M+x-m.y,U=m.y-(k-x);R\u003e0?E=r*(Math.exp(R/(2*this.obstacleMargin))-1):F\u003e0\u0026\u0026(E=-.008*(Math.exp(F/(2*this.obstacleMargin))-1)),O\u003e0?B=r*(Math.exp(O/(2*this.obstacleMargin))-1):U\u003e0\u0026\u0026(B=-.008*(Math.exp(U/(2*this.obstacleMargin))-1)),f.fx+=E,f.fy+=B,C=m.x+f.fx,y=m.y+f.fy}else{const x=this.traceWidth/2+this.BOUNDARY_PADDING;C=Math.max(this.bounds.minX+x,Math.min(this.bounds.maxX-x,C)),y=Math.max(this.bounds.minY+x,Math.min(this.bounds.maxY-x,y))}Math.abs(f.fx)\u003cs\u0026\u0026Math.abs(f.fy)\u003cs||(Math.abs(m.x-C)\u003es||Math.abs(m.y-y)\u003es)\u0026\u0026(m.x=C,m.y=y,l=!0)}if(!l)return[];const u=this.computeMinGapBtwPolyLines(c),g=this.computeG(c,e),h=this.computeH({minGaps:u,forces:a});return[{polyLines:c,g,h,f:Math.round(5*g)/5+h,minGaps:u,forces:a,viaCount:e.viaCount}]}checkIfSolved(e){const n=e.minGaps.every(i=\u003ei\u003e=this.obstacleMargin),o=e.polyLines.every(i=\u003ei.mPoints.every(r=\u003e{const s=(r.z1!==r.z2?this.viaDiameter/2:this.traceWidth/2)+this.BOUNDARY_PADDING;return((a,A,c=0)=\u003ea.x\u003e=A.minX+c\u0026\u0026a.x\u003c=A.maxX-c\u0026\u0026a.y\u003e=A.minY+c\u0026\u0026a.y\u003c=A.maxY-c)(r,this.bounds,s)}));return n\u0026\u0026o}tryFinalAcceptance(){const e=this.hyperParameters?.MINIMUM_FINAL_ACCEPTANCE_GAP??void 0;if(!(e===void 0||this.lastCandidate===null||this.lastCandidate.minGaps.length===0))return Math.min(...this.lastCandidate.minGaps)\u003e=e?(this.solved=!0,void this._setSolvedRoutes()):void 0}_step(){if(this.phase===\"setup\")return this.setupInitialPolyLines(),void(this.phase=\"solving\");const e=this.candidates.shift();if(!e)return this.tryFinalAcceptance(),this.solved?void 0:(this.failed=!0,void(this.error=\"No candidates left\"));if(this.lastCandidate=e,this.checkIfSolved(e))return this.solved=!0,void this._setSolvedRoutes();if(!e)return void(this.failed=!0);const n=this.getNeighbors(e);for(const o of n)this.insertCandidate(o)}visualize(){const e={points:[],lines:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"MultiHeadPolyLineIntraNodeSolver Visualization\"};e.lines.push({points:[{x:this.bounds.minX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.minY}],strokeColor:\"gray\"});const n=this.lastCandidate??this.candidates[0];if(n?.hasClosedSameLayerFace){const o=.1*(this.bounds.maxX-this.bounds.minX),i=.1*(this.bounds.maxY-this.bounds.minY);e.rects.push({center:{x:this.bounds.maxX+.6*o,y:this.bounds.maxY+.6*i},width:o,height:i,fill:\"red\",label:\"HAS CLOSED FACE\"})}for(const o of this.nodeWithPortPoints.portPoints)e.points.push({x:o.x,y:o.y,label:`${o.connectionName} (Port z=${o.z??0})`,color:this.colorMap[o.connectionName]??\"blue\"});return n\u0026\u0026n.polyLines.forEach((o,i)=\u003e{const r=this.colorMap[o.connectionName]??\"purple\",s=[o.start,...o.mPoints,o.end];for(let a=0;a\u003cs.length-1;a++){const A=s[a],c=s[a+1],l=A.z2,u=l===0,g=u?r:Es(r,.5);e.lines.push({points:[A,c],strokeColor:g,strokeWidth:this.traceWidth,strokeDash:u?void 0:[.15,.15],label:`${o.connectionName} segment (z=${l})`})}s.forEach((a,A)=\u003e{const c=a.z1!==a.z2,l=a.z1,u=A\u003e0\u0026\u0026A\u003cs.length-1;let g=\"\",h=\"\";if(u){const d=A-1,p=n.forces?.[i]?.[d];if(p\u0026\u0026p.size\u003e0){const m={fx:0,fy:0};p.forEach((_,f)=\u003e{if(m.fx+=_.fx,m.fy+=_.fy,Math.abs(_.fx)\u003e1e-6||Math.abs(_.fy)\u003e1e-6){const I=f.split(\":\"),C=I[0],y=parseInt(I[1],10),x=n.polyLines[y],E=this.colorMap[x.connectionName]??\"gray\",B=20,S={x:a.x+_.fx*B,y:a.y+_.fy*B};let Q=x.connectionName;C===\"via\"?Q+=` Via ${parseInt(I[2],10)}`:C===\"seg\"\u0026\u0026(Q+=` Seg ${parseInt(I[2],10)}-${parseInt(I[3],10)}`),e.lines.push({points:[a,S],strokeColor:E,strokeWidth:.02,strokeDash:\"2,2\",label:`Force by ${Q} on ${o.connectionName} mPoint ${d}`})}}),(Math.abs(m.fx)\u003e1e-6||Math.abs(m.fy)\u003e1e-6)\u0026\u0026(h=`\nNet Force: (${m.fx.toFixed(3)}, ${m.fy.toFixed(3)})`)}}if(c)g=`Via (${o.connectionName} z=${a.z1} -\u003e z=${a.z2})${h}`,e.circles.push({center:a,radius:this.viaDiameter/2,fill:Es(r,.5),label:g});else if(u){const d=l===0?r:Es(r,.5);g=`mPoint (${o.connectionName} z=${l})${h}`,e.circles.push({center:a,radius:this.cellSize/8,fill:d,label:g})}})}),e}_setSolvedRoutes(){if(!this.solved||!this.lastCandidate)return[];const e=[];for(const n of this.lastCandidate.polyLines){const o=[],i=[],r=[n.start,...n.mPoints,n.end];for(let s=0;s\u003cr.length;s++){const a=r[s];o.push({x:a.x,y:a.y,z:a.z1}),a.z1!==a.z2\u0026\u0026(i.push({x:a.x,y:a.y}),o.push({x:a.x,y:a.y,z:a.z2}))}e.push({connectionName:n.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:o,vias:i})}this.solvedRoutes=e}},TXn=class extends RXn{getSolverName(){return\"MultiHeadPolyLineIntraNodeSolver2\"}computeG(e,n){return n.g+5e-6+5e-6*n.viaCount*100}computeH(e){const{minGaps:n}=e;let o=0;for(const i of n)i\u003c0\u0026\u0026(o+=this.obstacleMargin),i\u003cthis.obstacleMargin\u0026\u0026(o+=this.obstacleMargin-i);return .011*o}_step(){if(this.phase===\"setup\")return this.setupInitialPolyLines(),void(this.phase=\"solving\");const e=this.candidates.shift();if(!e)return this.tryFinalAcceptance(),this.solved?void 0:void(this.failed=!0);if(this.lastCandidate=e,this.checkIfSolved(e))return this.solved=!0,void this._setSolvedRoutes();let n=!1,o=0;const i=e.magForceApplied===void 0?1:10;for(let r=0;r\u003ci;r++){const s=this.applyForcesToPolyLines(e.polyLines);if(o+=s.magForceApplied,n=s.lastStepMoved,!s.lastStepMoved)break}if(e.magForceApplied=o,e.minGaps=this.computeMinGapBtwPolyLines(e.polyLines),this.checkIfSolved(e))return this.solved=!0,void this._setSolvedRoutes();e.g=this.computeG(e.polyLines,e),e.h=this.computeH(e),e.f=e.g+e.h,n\u0026\u0026this.insertCandidate(e)}applyForcesToPolyLines(e){let n=0;const o=e.length,i=.02,r=.008,s=1e-6,a=Array.from({length:o},(u,g)=\u003eArray.from({length:e[g].mPoints.length},()=\u003e({fx:0,fy:0}))),A=(u,g,h,d)=\u003e{if(g\u003e0\u0026\u0026g\u003ce[u].mPoints.length+1){const p=g-1;a[u][p].fx+=h,a[u][p].fy+=d}},c=(u,g,h,d,p)=\u003e{const m=z_(u,h.p1,h.p2),_=u.x-m.x,f=u.y-m.y,I=_*_+f*f;if(I\u003c=s)return;const C=Math.sqrt(I),y=.02*Math.exp(-6*C),x=_/C*y,E=f/C*y;A(d,g,x,E),A(p,h.p1Idx,-x/2,-E/2),A(p,h.p2Idx,-x/2,-E/2)};for(let u=0;u\u003co;u++)for(let g=u+1;g\u003co;g++){const h=e[u],d=e[g],p=[h.start,...h.mPoints,h.end],m=[d.start,...d.mPoints,d.end],_=[],f=[];for(let y=0;y\u003cp.length-1;y++)_.push({p1:p[y],p2:p[y+1],layer:p[y].z2,p1Idx:y,p2Idx:y+1});p.forEach((y,x)=\u003e{y.z1!==y.z2\u0026\u0026f.push({point:y,layers:[y.z1,y.z2],index:x})});const I=[],C=[];for(let y=0;y\u003cm.length-1;y++)I.push({p1:m[y],p2:m[y+1],layer:m[y].z2,p1Idx:y,p2Idx:y+1});m.forEach((y,x)=\u003e{y.z1!==y.z2\u0026\u0026C.push({point:y,layers:[y.z1,y.z2],index:x})});for(const y of _)for(const x of I)y.layer===x.layer\u0026\u0026(M5(y.p1,y.p2,x.p1,x.p2),c(y.p1,y.p1Idx,x,u,g),c(y.p2,y.p2Idx,x,u,g),c(x.p1,x.p1Idx,y,g,u),c(x.p2,x.p2Idx,y,g,u));for(const y of f)for(const x of I)if(y.layers.includes(x.layer)){const E=z_(y.point,x.p1,x.p2),B=y.point.x-E.x,S=y.point.y-E.y,Q=B*B+S*S;if(Q\u003es){const w=Math.sqrt(Q);let M=2,k=w;w\u003cthis.viaDiameter/2?(M*=4,k=Math.max(s,w)):k=Math.max(s,w-this.viaDiameter/2);const R=M*i*Math.exp(-6*k),F=B/w*R,O=S/w*R;A(u,y.index,F,O),A(g,x.p1Idx,-F/2,-O/2),A(g,x.p2Idx,-F/2,-O/2)}}for(const y of C)for(const x of _)if(y.layers.includes(x.layer)){const E=z_(y.point,x.p1,x.p2),B=y.point.x-E.x,S=y.point.y-E.y,Q=B*B+S*S;if(Q\u003es){const w=Math.sqrt(Q);let M=2,k=w;w\u003cthis.viaDiameter/2?(M*=4,k=Math.max(s,w)):k=Math.max(s,w-this.viaDiameter/2);const R=M*i*Math.exp(-6*k),F=B/w*R,O=S/w*R;A(g,y.index,F,O),A(u,x.p1Idx,-F/2,-O/2),A(u,x.p2Idx,-F/2,-O/2)}}for(const y of f)for(const x of C)if(y.layers.filter(E=\u003ex.layers.includes(E)).length\u003e0){const E=y.point.x-x.point.x,B=y.point.y-x.point.y,S=E*E+B*B;if(S\u003es){const Q=Math.sqrt(S);let w=2,M=Q;Q\u003cthis.viaDiameter?(w*=4,M=Math.max(s,Q)):M=Math.max(s,Q-this.viaDiameter);const k=w*i*Math.exp(-6*M),R=E/Q*k,F=B/Q*k;A(u,y.index,R,F),A(g,x.index,-R,-F)}}}for(let u=0;u\u003co;u++){const g=e[u],h=[g.start,...g.mPoints,g.end],d=[];if(h.forEach((p,m)=\u003e{p.z1!==p.z2\u0026\u0026d.push({point:p,layers:[p.z1,p.z2],index:m})}),!(d.length\u003c2))for(let p=0;p\u003cd.length;p++)for(let m=p+1;m\u003cd.length;m++){const _=d[p],f=d[m],I=_.point.x-f.point.x,C=_.point.y-f.point.y,y=I*I+C*C;if(y\u003es){const x=Math.sqrt(y);let E=2,B=x;x\u003cthis.viaDiameter?(E*=4,B=Math.max(s,x)):B=Math.max(s,x-this.viaDiameter);const S=E*i*Math.exp(-6*B),Q=I/x*S,w=C/x*S;A(u,_.index,Q,w),A(u,f.index,-Q,-w)}}}let l=!1;for(let u=0;u\u003co;u++)for(let g=0;g\u003ce[u].mPoints.length;g++){const h=e[u].mPoints[g],d=a[u][g],p=h.z1!==h.z2;let m=d.fx,_=d.fy,f=h.x+m,I=h.y+_;if(p){const C=this.viaDiameter/2;let y=0,x=0;const E=this.viaDiameter/2+this.BOUNDARY_PADDING,B=this.bounds.minX+E,S=this.bounds.maxX-E,Q=this.bounds.minY+E,w=this.bounds.maxY-E,M=B+C-h.x,k=h.x-(S-C),R=Q+C-h.y,F=h.y-(w-C);M\u003e0?y=r*(Math.exp(M/(2*this.obstacleMargin))-1):k\u003e0\u0026\u0026(y=-.008*(Math.exp(k/(2*this.obstacleMargin))-1)),R\u003e0?x=r*(Math.exp(R/(2*this.obstacleMargin))-1):F\u003e0\u0026\u0026(x=-.008*(Math.exp(F/(2*this.obstacleMargin))-1)),m+=y,_+=x,f=h.x+m,I=h.y+_}else{const C=this.traceWidth/2+this.BOUNDARY_PADDING;f=Math.max(this.bounds.minX+C,Math.min(this.bounds.maxX-C,f)),I=Math.max(this.bounds.minY+C,Math.min(this.bounds.maxY-C,I))}Math.abs(m)\u003cs\u0026\u0026Math.abs(_)\u003cs||(n+=Math.sqrt(m*m+_*_),(Math.abs(h.x-f)\u003es||Math.abs(h.y-I)\u003es)\u0026\u0026(h.x=f,h.y=I,l=!0))}return{lastStepMoved:l,magForceApplied:n}}},kXn=t=\u003et.flatMap(e=\u003e`${e.connectionName}-${e.mPoints.map(n=\u003e`${n.x.toFixed(2)},${n.y.toFixed(2)},${n.z1},${n.z2}`)}`).sort().join(\"|\"),FXn=class extends TXn{getSolverName(){return\"MultiHeadPolyLineIntraNodeSolver3\"}constructor(e){super(e),this.MAX_ITERATIONS=1e3}createInitialCandidateFromSeed(e){const n=new BXn({nodeWithPortPoints:this.nodeWithPortPoints,colorMap:this.colorMap,hyperParameters:{SHUFFLE_SEED:e},viaDiameter:this.viaDiameter});if(n.solve(),n.failed||!n.solved)return this.failed=!0,this.error=`ViaPossibilitiesSolver2 failed with: ${n.error}`,null;const o=[];let i=0;for(const[A,c]of n.completedPaths.entries()){if(c.length\u003c2){console.warn(`Skipping connection \"${A}\" due to insufficient points (${c.length}) in ViaPossibilitiesSolver2 path.`);continue}const l=c[0],u=c[c.length-1],g=c.slice(1,-1),h=[];let d=0,p=l.z;for(let f=0;f\u003cg.length;f++){const I=g[f],C=f+1\u003cg.length?g[f+1]:u,y=p,x=f+1\u003cg.length\u0026\u0026I.x===C.x\u0026\u0026I.y===C.y\u0026\u0026I.z!==C.z?C.z:I.z;h.push({x:I.x,y:I.y,z1:y,z2:x}),y!==x?(d++,f++,p=x):p=I.z}i+=d;const m=this.SEGMENTS_PER_POLYLINE;let _=h.length+1;for(;_\u003cm;){let f=-1,I=-1,C=null,y=null;const x=[{...l,z1:l.z,z2:l.z,connectionName:A},...h,{...u,z1:u.z,z2:u.z,connectionName:A}];for(let w=0;w\u003cx.length-1;w++){const M=x[w],k=x[w+1];if(M.x===k.x\u0026\u0026M.y===k.y)continue;const R=no(M,k);R\u003ef\u0026\u0026(f=R,I=w,C=M,y=k)}if(I===-1||!C||!y){console.warn(`Could not find longest segment for ${A} while trying to reach ${m} segments.`);break}const E=(C.x+y.x)/2,B=(C.y+y.y)/2,S=C.z2,Q={x:E,y:B,z1:S,z2:S};h.splice(I,0,Q),_++}o.push({connectionName:A,start:{...l,z1:l.z,z2:l.z},end:{...u,z1:u.z,z2:u.z},mPoints:h})}if(o.length===0)return this.failed=!0,this.error=\"No valid polylines generated from ViaPossibilitiesSolver2.\",console.error(this.error),null;const r=this.computeMinGapBtwPolyLines(o),s=this.computeH({minGaps:r,forces:[]}),a={polyLines:o,g:0,h:s,f:0+s,viaCount:i,minGaps:r};return a.g=this.computeG(o,a),a.f=a.g+a.h,a}setupInitialPolyLines(){this.candidates=[];const e=Math.min(2e3,(function(o){if(!Number.isInteger(o)||o\u003c0)throw new RangeError(\"n must be a non-negative integer\");let i=1;for(let r=2;r\u003c=o;r++)i*=r;return i})(this.uniqueConnections)),n=new Set;for(let o=0;o\u003ce;o++){const i=this.createInitialCandidateFromSeed(o);if(!i)continue;const r=kXn(i.polyLines);n.has(r)||(n.add(r),this.candidates.push(i))}this.candidates.sort((o,i)=\u003eo.f-i.f)}},lft=t=\u003et.portPointId??`${t.connectionName}:${t.x}:${t.y}:${t.z}`,O7e=(t,e)=\u003e{const[n,o]=t;if(n===o)return!1;const i=(r=\u003e{const[s,a]=r,A=lft(s),c=lft(a);return A\u003cc?`${A}|${c}`:`${c}|${A}`})(t);return!e.seenPairKeys.has(i)\u0026\u0026(e.seenPairKeys.add(i),e.pairs.push(t),!0)},uft=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++)O7e([t[n],t[n+1]],e)},Yz=t=\u003e{const e=[],n=new Set,o=new Map(t.filter(a=\u003etypeof a.portPointId==\"string\").map(a=\u003e[a.portPointId,a])),i={pairs:e,seenPairKeys:n};for(const a of t){if(a.prevPortPointId){const A=o.get(a.prevPortPointId);A\u0026\u0026A.connectionName===a.connectionName\u0026\u0026O7e([A,a],i)}if(a.nextPortPointId){const A=o.get(a.nextPortPointId);A\u0026\u0026A.connectionName===a.connectionName\u0026\u0026O7e([a,A],i)}}if(e.length===0)return uft(t,i),e;const r=new Set(e.flatMap(([a,A])=\u003e[a.portPointId,A.portPointId]).filter(Boolean)),s=t.filter(a=\u003e!a.portPointId||!r.has(a.portPointId));return uft(s,i),e},A7=1e-6,gft=.02,Uz=t=\u003e`${t.x.toFixed(6)},${t.y.toFixed(6)}`,FD=(t,e)=\u003eMath.abs(t.x-e.x)\u003cA7\u0026\u0026Math.abs(t.y-e.y)\u003cA7,dft=t=\u003e({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2}),LXn=(t,e)=\u003et.x\u003e=e.minX-A7\u0026\u0026t.x\u003c=e.maxX+A7\u0026\u0026t.y\u003e=e.minY-A7\u0026\u0026t.y\u003c=e.maxY+A7,HXn=(t,e,n)=\u003e{for(const o of n)if(!FD(o,t)\u0026\u0026!FD(o,e)\u0026\u0026wc(o,t,e)\u003c1e-4)return!0;return!1},OXn=(t,e,n)=\u003e{for(const o of n)if(!(FD(t,o.A)||FD(t,o.B)||FD(e,o.A)||FD(e,o.B))\u0026\u0026Uh(t,e,o.A,o.B))return!0;return!1},GXn=(t,e)=\u003e{const n=[];for(const o of t){const i=o.rootConnectionName??o.connectionName;if(i!==e)for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];s.z===a.z\u0026\u0026n.push({A:{x:s.x,y:s.y},B:{x:a.x,y:a.y},rootConnectionName:i})}}return n},YXn=(t,e)=\u003et.portPoints.filter(n=\u003e(n.rootConnectionName??n.connectionName)!==e).map(n=\u003e({x:n.x,y:n.y}));function*hft(t,e=t.length){if(e\u003c=1)yield t.slice();else for(let n=0;n\u003ce;n++)[t[n],t[e-1]]=[t[e-1],t[n]],yield*hft(t,e-1),[t[n],t[e-1]]=[t[e-1],t[n]]}var UXn=({A:t,B:e,bounds:n,obstacleSegments:o,foreignPorts:i})=\u003e{const r=[{x:t.x,y:t.y},{x:e.x,y:e.y},{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},{x:n.minX,y:n.minY},{x:n.maxX,y:n.minY},{x:n.maxX,y:n.maxY},{x:n.minX,y:n.maxY}],s=[...o.flatMap(m=\u003e[m.A,m.B]),...i,{x:t.x,y:t.y},{x:e.x,y:e.y}];for(const m of s)for(const _ of[-.02,0,gft])for(const f of[-.02,0,gft]){const I={x:m.x+_,y:m.y+f};LXn(I,n)\u0026\u0026r.push(I)}const a=(m=\u003e{const _=new Set,f=[];for(const I of m){const C=Uz(I);_.has(C)||(_.add(C),f.push(I))}return f})(r),A=Uz(t),c=Uz(e),l=new Map(a.map(m=\u003e[Uz(m),m])),u=new Map,g=new Map,h=new Set;for(const m of a){const _=Uz(m);u.set(_,_===A?0:1/0),g.set(_,null),h.add(_)}for(;h.size\u003e0;){let m=null,_=1/0;for(const I of h){const C=u.get(I)??1/0;(C\u003c_-A7||Math.abs(C-_)\u003c=A7\u0026\u0026(m===null||I\u003cm))\u0026\u0026(_=C,m=I)}if(!m||_===1/0||(h.delete(m),m===c))break;const f=l.get(m);for(const I of h){const C=l.get(I);if(FD(f,C)||OXn(f,C,o)||HXn(f,C,i))continue;const y=_+no(f,C),x=u.get(I)??1/0,E=g.get(I);(y\u003cx-A7||Math.abs(y-x)\u003c=A7\u0026\u0026(E==null||m\u003cE))\u0026\u0026(u.set(I,y),g.set(I,m))}}if((u.get(c)??1/0)===1/0)return null;const d=[];let p=c;for(;p;)d.push(l.get(p)),p=g.get(p)??null;return d.reverse(),d.map(m=\u003e({x:m.x,y:m.y,z:t.z}))},pft=class extends yr{getSolverName(){return\"SingleLayerNoDifferentRootIntersectionsIntraNodeSolver\"}nodeWithPortPoints;traceWidth;viaDiameter;solvedRoutes=[];constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.traceWidth=e.traceWidth??.15,this.viaDiameter=e.viaDiameter??.3,this.MAX_ITERATIONS=1}static isApplicable(e){if((r=\u003er.availableZ?.length?[...new Set(r.availableZ)].sort((s,a)=\u003es-a):[...new Set(r.portPoints.map(s=\u003es.z??0))].sort((s,a)=\u003es-a))(e).length!==1||e.portPoints.length\u003e12)return!1;const o=dft(e);if(e.portPoints.some(r=\u003e((s,a)=\u003eMath.abs(s.y-a.minY)\u003c.001?\"top\":Math.abs(s.x-a.maxX)\u003c.001?\"right\":Math.abs(s.y-a.maxY)\u003c.001?\"bottom\":Math.abs(s.x-a.minX)\u003c.001?\"left\":null)(r,o)===null))return!1;const i=new Map;for(const r of e.portPoints)i.set(r.connectionName,(i.get(r.connectionName)??0)+1);return[...i.values()].some(r=\u003er\u003e2)}buildTaskGroups(){const e=new Map;for(const n of this.nodeWithPortPoints.portPoints){const o=e.get(n.connectionName)??[];o.push(n),e.set(n.connectionName,o)}return e}trySolveNode(){const e=dft(this.nodeWithPortPoints),n=this.buildTaskGroups(),o=Array.from(n.entries()).flatMap(([r,s])=\u003eYz(s).map(([a,A])=\u003e({connectionName:r,rootConnectionName:a.rootConnectionName??A.rootConnectionName??r,A:a,B:A}))),i=o.length\u003c=6?hft(o.slice()):[o];for(const r of i){const s=[];let a=!1;for(const A of r){const c=GXn(s,A.rootConnectionName),l=YXn(this.nodeWithPortPoints,A.rootConnectionName),u=UXn({A:A.A,B:A.B,bounds:e,obstacleSegments:c,foreignPorts:l});if(!u||u.length\u003c2){a=!0;break}s.push({connectionName:A.connectionName,rootConnectionName:A.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:u,vias:[]})}if(!a)return s}return null}_step(){const e=this.trySolveNode();if(!e)return this.failed=!0,void(this.error=\"Failed to find a single-layer route set without different-root intersections\");this.solvedRoutes=e,this.stats={routeCount:e.length,distinctRoots:new Set(e.map(n=\u003en.rootConnectionName??n.connectionName)).size},this.solved=!0}visualize(){return{lines:this.solvedRoutes.map(e=\u003e({points:e.route,strokeColor:\"cyan\",strokeWidth:e.traceThickness,label:`${e.connectionName}\nroot: ${e.rootConnectionName??e.connectionName}`})),points:this.nodeWithPortPoints.portPoints.map(e=\u003e({x:e.x,y:e.y,color:\"blue\",label:`${e.connectionName}\nroot: ${e.rootConnectionName??e.connectionName}`})),rects:[],circles:[]}}},mft=t=\u003et.min\u003c=t.max?V3(t.value,t.min,t.max):t.value,KXn=class extends yr{getSolverName(){return\"SingleTransitionIntraNodeSolver\"}nodeWithPortPoints;routes;viaDiameter;traceThickness;obstacleMargin;solvedRoutes=[];bounds;constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.viaDiameter=e?.viaDiameter??.3,this.traceThickness=e?.traceThickness??.15,this.obstacleMargin=e?.obstacleMargin??.1,this.routes=this.extractRoutesFromNode(),this.bounds=this.calculateBounds(),this.routes.length!==1)return this.failed=!0,void(this.error=`Expected 1 route, but got ${this.routes.length}`);const n=this.routes[0];if(n.A.z===void 0||n.B.z===void 0)return this.failed=!0,void(this.error=\"Route points should have predefined z values\");if(n.A.z===n.B.z)return this.failed=!0,void(this.error=\"Only one route provided, but it has no transition\");const o=this.viaDiameter/2+this.obstacleMargin,i={x:mft({value:(n.A.x+n.B.x)/2,min:this.bounds.minX+o,max:this.bounds.maxX-o}),y:mft({value:(n.A.y+n.B.y)/2,min:this.bounds.minY+o,max:this.bounds.maxY-o})};this.solvedRoutes.push(this.createTransitionRoute({start:n.A,end:n.B,via:i,connectionName:n.connectionName})),this.solved=!0}extractRoutesFromNode(){const e=[],n=this.nodeWithPortPoints.portPoints,o=new Map;for(const i of n){const{connectionName:r}=i;o.has(r)||o.set(r,[]),o.get(r).push(i)}for(const[i,r]of o.entries())for(const[s,a]of Yz(r))e.push({A:{...s},B:{...a},connectionName:i});return e}calculateBounds(){return{minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2}}createTransitionRoute(e){const{start:n,end:o,via:i,connectionName:r}=e,s=[{x:n.x,y:n.y,z:n.z},{x:i.x,y:i.y,z:n.z},{x:i.x,y:i.y,z:o.z},{x:o.x,y:o.y,z:o.z}];return{connectionName:r,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:s,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[i]}}_step(){this.solved=!0}visualize(){const e={lines:[],points:[],rects:[],circles:[]};if(e.rects.push({center:{x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY,stroke:\"rgba(0, 0, 0, 0.5)\",fill:\"rgba(240, 240, 240, 0.1)\",label:\"PCB Bounds\"}),this.routes.length\u003e0)for(const n of this.routes)e.points.push({x:n.A.x,y:n.A.y,label:`${n.connectionName} start (z=${n.A.z})`,color:\"orange\"}),e.points.push({x:n.B.x,y:n.B.y,label:`${n.connectionName} end (z=${n.B.z})`,color:\"orange\"}),e.lines.push({points:[n.A,n.B],strokeColor:\"rgba(255, 0, 0, 0.5)\",label:`${n.connectionName} direct`});for(let n=0;n\u003cthis.solvedRoutes.length;n++){const o=this.solvedRoutes[n],i=\"rgba(0, 255, 0, 0.75)\";for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];e.lines.push({points:[s,a],strokeColor:i,strokeDash:s.z!==o.route[0].z?[.2,.2]:void 0,strokeWidth:o.traceThickness,label:`${o.connectionName} z=${s.z}`})}for(const r of o.vias)e.circles.push({center:r,radius:this.viaDiameter/2,fill:\"rgba(0, 0, 255, 0.8)\",stroke:\"black\",label:\"Solved Via\"}),e.circles.push({center:r,radius:this.viaDiameter/2+this.obstacleMargin,fill:\"rgba(0, 0, 255, 0.3)\",stroke:\"black\",label:\"Via Margin\"})}return e}},c7=(t,e=2)=\u003e{const n=Array.from({length:e},(o,i)=\u003ei);return t.map(o=\u003e{const i=Hz(o.__zLayers??(o.layers?Oz(o.layers,e):void 0)??n,e);return{...o,__zLayers:i.length\u003e0?i:n}})},_ft=1e-6,fft=t=\u003e{const{point:e,obstacle:n}=t,o=n.width/2+_ft,i=n.height/2+_ft;return Math.abs(e.x-n.center.x)\u003c=o\u0026\u0026Math.abs(e.y-n.center.y)\u003c=i},VXn=class e5n extends yr{getSolverName(){return\"SingleTransitionThroughObstacleIntraNodeSolver\"}nodeWithPortPoints;routes;obstacles;viaDiameter;traceThickness;connMap;solvedRoutes=[];constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.obstacles=c7(e.obstacles??[],e.layerCount??2),this.connMap=e.connMap,this.viaDiameter=e.viaDiameter??.3,this.traceThickness=e.traceThickness??.15,this.routes=this.extractRoutesFromNode(),this.routes.length===0)return this.failed=!0,void(this.error=\"Expected at least 1 route\");if(this.routes.some(o=\u003eo.A.z===void 0||o.B.z===void 0))return this.failed=!0,void(this.error=\"Route points should have predefined z values\");if(!this.routes.some(o=\u003eo.A.z!==o.B.z))return this.failed=!0,void(this.error=\"No route transitions through an obstacle\");const n=this.routes.map(o=\u003ethis.getContainingThroughObstacle(o));if(n.some(o=\u003e!o))return this.failed=!0,void(this.error=\"No same-net multilayer obstacle contains every route\");this.solvedRoutes.push(...this.routes.map((o,i)=\u003e({connectionName:o.connectionName,rootConnectionName:o.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:o.A.x,y:o.A.y,z:o.A.z,...o.A.z!==o.B.z?{toNextSegmentType:\"through_obstacle\",...n[i].circuitJsonMetadata?{toNextSegmentCircuitJsonMetadata:n[i].circuitJsonMetadata}:{}}:{}},{x:o.B.x,y:o.B.y,z:o.B.z}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]}))),this.solved=!0}static isApplicable(e){return new e5n(e).solved}extractRoutesFromNode(){const e=[],n=new Map;for(const o of this.nodeWithPortPoints.portPoints){const{connectionName:i}=o;n.has(i)||n.set(i,[]),n.get(i).push(o)}for(const[o,i]of n.entries())for(const[r,s]of Yz(i))e.push({A:{...r},B:{...s},connectionName:o,rootConnectionName:r.rootConnectionName??s.rootConnectionName});return e}getContainingThroughObstacle(e){const n=e.A.z,o=e.B.z;return n===void 0||o===void 0?null:this.obstacles.find(i=\u003e{return!(i.__zLayers.length\u003c2)\u0026\u0026!(!i.__zLayers.includes(n)||!i.__zLayers.includes(o))\u0026\u0026!!(r={obstacle:i,connectionName:e.connectionName,connMap:this.connMap}).obstacle.connectedTo.some(s=\u003es===r.connectionName||(r.connMap?.areIdsConnected(r.connectionName,s)??!1))\u0026\u0026fft({point:e.A,obstacle:i})\u0026\u0026fft({point:e.B,obstacle:i});var r})??null}_step(){this.solved=!0}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const n of this.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:\"rgba(128, 0, 128, 0.2)\",stroke:\"rgba(128, 0, 128, 0.6)\",label:`through obstacle candidate\nz: ${n.__zLayers.join(\",\")}`});for(const n of this.solvedRoutes){e.lines.push({points:n.route,strokeColor:\"rgba(0, 180, 0, 0.8)\",strokeDash:\"4, 3\",strokeWidth:n.traceThickness,label:`${n.connectionName} through_obstacle`});for(const o of n.route)e.points.push({x:o.x,y:o.y,color:\"green\",label:`${n.connectionName}\nz: ${o.z}`})}return e}},R5=1e-6,Ift=({value:t,min:e,max:n})=\u003et\u003e=e\u0026\u0026t\u003c=n,Xse=({value:t,target:e,epsilon:n})=\u003eMath.abs(t-e)\u003c=n,Cft=({point:t,bounds:e,epsilon:n=1e-6})=\u003e{if(![t.x,t.y,e.minX,e.maxX,e.minY,e.maxY].every(u=\u003e(({value:g})=\u003eNumber.isFinite(g))({value:u}))||t.x\u003ce.minX-n||t.x\u003ee.maxX+n||t.y\u003ce.minY-n||t.y\u003ee.maxY+n)return\"outside\";const o=Xse({value:t.x,target:e.minX,epsilon:n}),i=Xse({value:t.x,target:e.maxX,epsilon:n}),r=Xse({value:t.y,target:e.minY,epsilon:n}),s=Xse({value:t.y,target:e.maxY,epsilon:n}),a=o||i,A=r||s;if(a\u0026\u0026A)return\"on-boundary\";const c=Ift({value:t.y,min:e.minY,max:e.maxY}),l=Ift({value:t.x,min:e.minX,max:e.maxX});return a\u0026\u0026c||A\u0026\u0026l?\"on-boundary\":\"inside\"};function zXn(t,e,n,o,i){const r={x:(t.x+e.x+n.x)/3,y:(t.y+e.y+n.y)/3},s=(f,I)=\u003eMath.sqrt((I.x-f.x)**2+(I.y-f.y)**2),a=f=\u003e{const I=s(f,t),C=s(f,e),y=s(f,n),x=f.x\u003e=i.minX\u0026\u0026f.x\u003c=i.maxX\u0026\u0026f.y\u003e=i.minY\u0026\u0026f.y\u003c=i.maxY;return I\u003e=o\u0026\u0026C\u003e=o\u0026\u0026y\u003e=o\u0026\u0026x};if(a(r))return r;const A=(f,I,C)=\u003e{const y=f.x-I.x,x=f.y-I.y,E=Math.sqrt(y*y+x*x);return E\u003c1e-10?{x:I.x+C,y:I.y}:{x:I.x+y/E*C,y:I.y+x/E*C}},c=(f,I,C)=\u003e{const y=I.x-f.x,x=I.y-f.y,E=Math.sqrt(y*y+x*x);if(E\u003e2*C-1e-10||E\u003c1e-10)return[];const B=E*E/(2*E),S=Math.sqrt(Math.max(0,C*C-B*B)),Q=f.x+y*B/E,w=f.y+x*B/E,M={x:Q+S*x/E,y:w-S*y/E},k={x:Q-S*x/E,y:w+S*y/E},R=[],F=1e-6;return Math.abs(s(M,f)-C)\u003cF\u0026\u0026Math.abs(s(M,I)-C)\u003cF\u0026\u0026R.push(M),Math.abs(s(k,f)-C)\u003cF\u0026\u0026Math.abs(s(k,I)-C)\u003cF\u0026\u0026R.push(k),R},l=[A(r,t,o),A(r,e,o),A(r,n,o),...c(t,e,o),...c(e,n,o),...c(n,t,o)],u=l.filter(a);if(u.length\u003e0){const f=u.filter(I=\u003e!(C=\u003eMath.abs(C.x-i.minX)\u003c1e-6||Math.abs(C.x-i.maxX)\u003c1e-6||Math.abs(C.y-i.minY)\u003c1e-6||Math.abs(C.y-i.maxY)\u003c1e-6)(I));if(f.length\u003e0)return f.sort((I,C)=\u003es(I,r)-s(C,r)),f[0]}let g=null,h=1/0;for(let f=i.minX+1;f\u003ci.maxX;f+=5)for(let I=i.minY+1;I\u003ci.maxY;I+=5){const C={x:f,y:I};if(a(C)){const y=s(C,r);y\u003ch\u0026\u0026(h=y,g=C)}}if(g!==null)return g;const d=[];for(let f=0;f\u003c=100;f++){const I=f/100;d.push({x:i.minX+I*(i.maxX-i.minX),y:i.minY}),d.push({x:i.maxX,y:i.minY+I*(i.maxY-i.minY)}),d.push({x:i.maxX-I*(i.maxX-i.minX),y:i.maxY}),d.push({x:i.minX,y:i.maxY-I*(i.maxY-i.minY)})}const p=d.filter(a);if(p.length\u003e0)return p.sort((f,I)=\u003es(f,r)-s(I,r)),p[0];let m=1/0,_={x:i.minX,y:i.minY};for(const f of[...l,...d])if(f.x\u003e=i.minX\u0026\u0026f.x\u003c=i.maxX\u0026\u0026f.y\u003e=i.minY\u0026\u0026f.y\u003c=i.maxY){const I=Math.max(0,o-s(f,t))+Math.max(0,o-s(f,e))+Math.max(0,o-s(f,n));I\u003cm\u0026\u0026(m=I,_=f)}return _}function LD(t,e,n){const o=yft(e,t,n.center,n.radius),i=yft(t,e,n.center,n.radius),r=jQ(o,e),s=jQ(t,i),a=1e-6;let A;if(r\u003ea\u0026\u0026s\u003ea){A={x:(o.x+i.x)/2,y:(o.y+i.y)/2};const c=jQ(o,A),l=jQ(i,A);if(Math.abs(c-l)\u003e.5*Math.min(c,l)){const g=jQ(t,o),h=jQ(e,i),d=g+h;if(d\u003ea){const p=h/d,m=g/d;A={x:o.x*p+i.x*m,y:o.y*p+i.y*m}}}const u=jQ(A,n.center);if(u\u003c1.05*n.radius){const g={x:(A.x-n.center.x)/u,y:(A.y-n.center.y)/u};A={x:n.center.x+g.x*n.radius*1.2,y:n.center.y+g.y*n.radius*1.2}}}else{const c={x:(t.x+e.x)/2,y:(t.y+e.y)/2},l=jQ(c,n.center);if(l\u003c1.1*n.radius){const u={x:(c.x-n.center.x)/l,y:(c.y-n.center.y)/l};A={x:n.center.x+u.x*n.radius*1.2,y:n.center.y+u.y*n.radius*1.2}}else A=c}return{B:o,D:i,E:A}}function yft(t,e,n,o){const i=[n.x-t.x,n.y-t.y],r=Math.sqrt(i[0]*i[0]+i[1]*i[1]);if(r\u003c=o){if(r\u003c1e-8){const m=[e.x-t.x,e.y-t.y],_=Math.sqrt(m[0]*m[0]+m[1]*m[1]);return _\u003c1e-8?{x:n.x+o,y:n.y}:{x:n.x+m[0]/_*o,y:n.y+m[1]/_*o}}const p=[i[0]/r,i[1]/r];return{x:n.x-p[0]*o,y:n.y-p[1]*o}}const s=[e.x-t.x,e.y-t.y],a=Math.sqrt(r*r-o*o),A=[i[0]/r,i[1]/r],c=[-A[1],A[0]],l=[A[1],-A[0]],u=s[0]*c[0]+s[1]*c[1]\u003es[0]*l[0]+s[1]*l[1]?c:l,g=o/r,h=a/r,d=[A[0]*h+u[0]*g,A[1]*h+u[1]*g];return{x:t.x+a*d[0],y:t.y+a*d[1]}}function jQ(t,e){const n=e.x-t.x,o=e.y-t.y;return Math.sqrt(n*n+o*o)}var pC=1e-9;function xft(t,e,n,o=\"cw\"){const i=Kz(t,n),r=Kz(e,n);return Math.abs(r-i)\u003cpC?{left:0,top:0,right:0,bottom:0}:(function(s,a,A,c){const l=A.maxX-A.minX,u=A.maxY-A.minY;if(l\u003cpC\u0026\u0026u\u003cpC)return{left:0,top:0,right:0,bottom:0};const g=2*(l+u);if(g\u003cpC)return{left:0,top:0,right:0,bottom:0};const h=l/g*(2*Math.PI),d=(l+u)/g*(2*Math.PI),p=(l+l+u)/g*(2*Math.PI),m=2*Math.PI,_=[{name:\"top\",start:0,end:h,length:l},{name:\"right\",start:h,end:d,length:u},{name:\"bottom\",start:d,end:p,length:l},{name:\"left\",start:p,end:m,length:u}],f={left:0,top:0,right:0,bottom:0},I=(C,y,x,E,B)=\u003e{const S=y\u003e2*Math.PI-pC?2*Math.PI:y;if(S\u003c=C+pC)return 0;if(B){const Q=Math.max(C,x),w=Math.min(S,2*Math.PI),M=Math.max(0,w-Q),k=Math.max(C,0),R=Math.min(S,E);return M+Math.max(0,R-k)}{const Q=Math.max(C,x),w=Math.min(S,E);return Math.max(0,w-Q)}};for(const C of _){const y=C.end-C.start;if(y\u003cpC||C.length\u003cpC)continue;let x=0;if(c===\"cw\"){const E=s\u003ea+pC;x=I(C.start,C.end,s,a,E)}else{const E=a\u003es+pC;x=I(C.start,C.end,a,s,E)}if(x\u003epC){const E=x/y;f[C.name]+=Math.max(0,Number.isFinite(E)?E:0)}}for(const C in f)f[C]=Math.max(0,Math.min(1,f[C]));return f})(i,r,n,o)}function Kz(t,e){const n=e.maxX-e.minX,o=e.maxY-e.minY;if(n\u003cpC\u0026\u0026o\u003cpC)return 0;const i=2*(n+o);if(i\u003cpC)return 0;let r=0;if(Math.abs(t.y-e.maxY)\u003c=R5\u0026\u0026t.x\u003e=e.minX-R5\u0026\u0026t.x\u003c=e.maxX+R5)r=Math.max(0,Math.min(n,t.x-e.minX));else if(Math.abs(t.x-e.maxX)\u003c=R5\u0026\u0026t.y\u003e=e.minY-R5\u0026\u0026t.y\u003c=e.maxY+R5)r=n+Math.max(0,Math.min(o,e.maxY-t.y));else if(Math.abs(t.y-e.minY)\u003c=R5\u0026\u0026t.x\u003e=e.minX-R5\u0026\u0026t.x\u003c=e.maxX+R5)r=n+o+Math.max(0,Math.min(n,e.maxX-t.x));else{if(!(Math.abs(t.x-e.minX)\u003c=R5\u0026\u0026t.y\u003e=e.minY-R5\u0026\u0026t.y\u003c=e.maxY+R5))throw new Error(`Point (${t.x}, ${t.y}) does not lie on the boundary defined by ${JSON.stringify(e)}`);r=n+o+n+Math.max(0,Math.min(o,t.y-e.minY))}return r=Math.max(0,Math.min(i,r)),i\u003epC?r/i*(2*Math.PI):0}function JXn(t,e,n,o){return(function({angleA:i,angleB:r,angleC:s}){const a=Math.cos(i),A=Math.sin(i),c=Math.cos(r),l=Math.sin(r),u=Math.cos(s);return(c-a)*(Math.sin(s)-A)-(l-A)*(u-a)\u003c0?\"ccw\":\"cw\"})({angleA:Kz(t,o),angleB:Kz(e,o),angleC:Kz(n,o)})}var WXn=class extends yr{getSolverName(){return\"SingleTransitionCrossingRouteSolver\"}nodeWithPortPoints;routes;viaDiameter;traceThickness;obstacleMargin;layerCount=2;debugViaPositions;solvedRoutes=[];bounds;constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.viaDiameter=e?.viaDiameter??.3,this.traceThickness=e?.traceThickness??.15,this.obstacleMargin=e?.obstacleMargin??.1,this.layerCount=e?.layerCount??2,this.debugViaPositions=[],this.routes=this.extractRoutesFromNode(),this.bounds=this.calculateBounds(),this.routes.length!==2)return this.failed=!0,void(this.error=`Expected 2 routes, but got ${this.routes.length}`);const n=this.routes.flatMap(a=\u003e[a.A,a.B]).map(a=\u003ethis.getPortPointBoundsPosition(a));if(n.includes(\"outside\"))return this.failed=!0,void(this.error=\"Invalid route input: SingleTransitionCrossingRouteSolver received port point(s) outside node bounds\");if(n.includes(\"inside\"))return void(this.failed=!0);this.routes=this.routes.map(a=\u003e({...a,A:this.snapPortPointToBounds(a.A),B:this.snapPortPointToBounds(a.B)}));const[o,i]=this.routes,r=o.A.z!==o.B.z,s=i.A.z!==i.B.z;return r\u0026\u0026s||!r\u0026\u0026!s?(this.failed=!0,void(this.error=\"Exactly one route must have a layer transition\")):void 0}extractRoutesFromNode(){const e=[],n=this.nodeWithPortPoints.portPoints,o=new Map;for(const i of n){const{connectionName:r}=i;o.has(r)||o.set(r,[]),o.get(r)?.push(i)}for(const[i,r]of o.entries())r.length===2\u0026\u0026e.push({A:{...r[0],z:r[0].z??0},B:{...r[1],z:r[1].z??0},connectionName:i});return e}calculateBounds(){return{minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2}}getPortPointBoundsPosition(e){return Cft({point:e,bounds:this.bounds})}snapPortPointToBounds(e){const n=V3(e.x,this.bounds.minX,this.bounds.maxX),o=V3(e.y,this.bounds.minY,this.bounds.maxY);return[{distance:Math.abs(e.y-this.bounds.maxY),point:{...e,x:n,y:this.bounds.maxY}},{distance:Math.abs(e.x-this.bounds.maxX),point:{...e,x:this.bounds.maxX,y:o}},{distance:Math.abs(e.y-this.bounds.minY),point:{...e,x:n,y:this.bounds.minY}},{distance:Math.abs(e.x-this.bounds.minX),point:{...e,x:this.bounds.minX,y:o}}].reduce((i,r)=\u003er.distance\u003ci.distance?r:i).point}doRoutesCross(e,n){return Uh(e.A,e.B,n.A,n.B)}calculateViaPosition(e,n){const o=n.A.z,i=e.A.z!==o?e.A:e.B,r=2*this.obstacleMargin+this.viaDiameter/2+this.traceThickness,s=this.obstacleMargin+this.viaDiameter/2,a=n.A,A=i,c=n.B,l=JXn(a,A,c,this.bounds),u=(function(h,d,p,m,_){const f=xft(h,d,m,_),I=xft(d,p,m,_),C={left:Math.min(1,f.left+I.left),top:Math.min(1,f.top+I.top),right:Math.min(1,f.right+I.right),bottom:Math.min(1,f.bottom+I.bottom)};for(const y in C)Math.abs(C[y])\u003cpC\u0026\u0026(C[y]=0);return C})(a,A,c,this.bounds,l),g={minX:this.bounds.minX+(u.left\u003e.5?r:s),minY:this.bounds.minY+(u.bottom\u003e.5?r:s),maxX:this.bounds.maxX-(u.right\u003e.5?r:s),maxY:this.bounds.maxY-(u.top\u003e.5?r:s)};return g.maxY\u003cg.minY\u0026\u0026(g.minY=(g.minY+g.maxY)/2,g.maxY=g.minY),g.maxX\u003cg.minX\u0026\u0026(g.minX=(g.minX+g.maxX)/2,g.maxX=g.minX),zXn(a,A,c,r,g)}createTransitionRoute(e,n,o,i){const r=[{x:e.x,y:e.y,z:e.z??0},{x:o.x,y:o.y,z:e.z??0},{x:o.x,y:o.y,z:n.z??0},{x:n.x,y:n.y,z:n.z??0}];return{connectionName:i,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:r,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[o]}}createFlatRoute(e,n,o,i,r,s){i.z,e.z;const a=this.viaDiameter/2+this.traceThickness/2+this.obstacleMargin,A=((_,f,I,C)=\u003e{const y=I.x-_.x,x=I.y-_.y;return((E,B)=\u003e({x:(E.x+B.x)/2,y:(E.y+B.y)/2}))({x:_.x+y*f,y:_.y+x*f},{x:I.x-y*C,y:I.y-x*C})})(o,this.viaDiameter,i.z!==e.z?i:r,this.traceThickness),c={center:{x:o.x,y:o.y},radius:a},l=LD(e,A,c).E,u=LD(A,n,c).E,g=LD(e,l,c).E,h=LD(l,A,c).E,d=LD(A,u,c).E,p=LD(u,n,c).E,m=LD(h,d,c).E;return{connectionName:s,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:e.x,y:e.y,z:e.z??0},{x:g.x,y:g.y,z:e.z??0},{x:l.x,y:l.y,z:e.z??0},{x:h.x,y:h.y,z:e.z??0},{x:m.x,y:m.y,z:e.z??0},{x:d.x,y:d.y,z:e.z??0},{x:u.x,y:u.y,z:e.z??0},{x:p.x,y:p.y,z:e.z??0},{x:n.x,y:n.y,z:n.z??0}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]}}trySolve(){const[e,n]=this.routes,o=e.A.z!==e.B.z,i=o?e:n,r=o?n:e,s=this.calculateViaPosition(i,r);if(!s)return!1;this.debugViaPositions.push({via:s});const a=this.createTransitionRoute(i.A,i.B,s,i.connectionName),A=this.createFlatRoute(r.A,r.B,s,i.A,i.B,r.connectionName);return this.solvedRoutes.push(a,A),!0}_step(){if(!this.doRoutesCross(this.routes[0],this.routes[1]))return this.failed=!0,void(this.error=\"Can only solve routes that have a single transition crossing\");this.trySolve()?this.solved=!0:(this.failed=!0,this.error=\"Failed to find a valid via position and route path\")}visualize(){const e={lines:[],points:[],rects:[],circles:[]};e.rects.push({center:{x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY,stroke:\"rgba(0, 0, 0, 0.5)\",fill:\"rgba(240, 240, 240, 0.1)\",label:\"PCB Bounds\"});for(const n of this.routes)e.points.push({x:n.A.x,y:n.A.y,label:`${n.connectionName} start (z=${n.A.z})`,color:\"orange\"}),e.points.push({x:n.B.x,y:n.B.y,label:`${n.connectionName} end (z=${n.B.z})`,color:\"orange\"}),e.lines.push({points:[n.A,n.B],strokeColor:\"rgba(255, 0, 0, 0.5)\",label:`${n.connectionName} direct`});for(let n=0;n\u003cthis.debugViaPositions.length;n++){const{via:o}=this.debugViaPositions[n];e.circles.push({center:o,radius:this.viaDiameter/2,fill:\"rgba(255, 165, 0, 0.7)\",stroke:\"rgba(0, 0, 0, 0.5)\",label:`Computed Via (attempt ${n+1})`});const i=this.viaDiameter/2+this.obstacleMargin;e.circles.push({center:o,radius:i,stroke:\"rgba(255, 165, 0, 0.7)\",fill:\"rgba(0, 0, 0, 0)\",label:\"Safety Margin\"})}for(let n=0;n\u003cthis.solvedRoutes.length;n++){const o=this.solvedRoutes[n],i=n%2==0?\"rgba(0, 255, 0, 0.75)\":\"rgba(255, 0, 255, 0.75)\";for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];e.lines.push({points:[s,a],strokeColor:i,strokeDash:s.z!==o.route[0].z?[.2,.2]:void 0,strokeWidth:o.traceThickness,label:`${o.connectionName} z=${s.z}`})}for(const r of o.vias)e.circles.push({center:r,radius:this.viaDiameter/2,fill:\"rgba(0, 0, 255, 0.8)\",stroke:\"black\",label:\"Solved Via\"}),e.circles.push({center:r,radius:this.viaDiameter/2+this.obstacleMargin,fill:\"rgba(0, 0, 255, 0.3)\",stroke:\"black\",label:\"Via Margin\"})}return e}getSolvedRoutes(){return this.solvedRoutes}};function jXn({A:t,B:e,C:n,D:o,E:i,F:r,radius:s,margin:a,subdivisions:A=0}){const c=(E,B)=\u003e({x:(E.x+B.x)/2,y:(E.y+B.y)/2}),l=(E,B,S)=\u003e{const Q=B.x-E.x,w=B.y-E.y,M=Math.sqrt(Q*Q+w*w),k=Q/M,R=w/M,F=-R,O=k;return{midpoint:{x:(E.x+B.x)/2,y:(E.y+B.y)/2},A_Opp:{x:E.x-k*S,y:E.y-R*S},A_Right:{x:E.x+F*S,y:E.y+O*S},A_Left:{x:E.x-F*S,y:E.y-O*S},B_Opp:{x:B.x+k*S,y:B.y+R*S},B_Right:{x:B.x+F*S,y:B.y+O*S},B_Left:{x:B.x-F*S,y:B.y-O*S}}},u=(E,B)=\u003e{const S=no(E,B.start),Q=no(E,B.end),w=no(B.start,B.end);return Math.abs(S+Q-w)\u003c1e-4},g=(E,B)=\u003e{const{start:S,end:Q}=E,{start:w,end:M}=B;if(u(S,B)||u(Q,B)||u(w,E)||u(M,E))return!0;const k=Q.x-S.x,R=Q.y-S.y,F=M.x-w.x,O=M.y-w.y,U=k*O-R*F;if(Math.abs(U)\u003c1e-4)return!1;const Y=w.x-S.x,W=w.y-S.y,te=(Y*O-W*F)/U,j=(Y*R-W*k)/U;return te\u003e0\u0026\u0026te\u003c1\u0026\u0026j\u003e0\u0026\u0026j\u003c1},h=(E,B)=\u003e{const S=[];for(let w=0;w\u003cE.length-1;w++)S.push({start:E[w],end:E[w+1]});const Q=[];for(let w=0;w\u003cB.length-1;w++)Q.push({start:B[w],end:B[w+1]});for(const w of S)for(const M of Q)if(g(w,M))return!0;return!1},d=E=\u003e{let B=0;for(let S=1;S\u003cE.length;S++){const Q=E[S].x-E[S-1].x,w=E[S].y-E[S-1].y;B+=Math.sqrt(Q*Q+w*w)}return B},p=(E,B)=\u003e{const{start:S,end:Q}=E,w=Q.x-S.x,M=Q.y-S.y,k=w*w+M*M;if(k===0)return{...S,t:0};const R=Math.max(0,Math.min(1,((B.x-S.x)*w+(B.y-S.y)*M)/k));return{x:S.x+R*w,y:S.y+R*M,t:R}},m=(E,B,S)=\u003e{const Q=p(E,B);if(no(Q,B)\u003e=S)return Q;const w=Q.x-B.x,M=Q.y-B.y,k=Math.sqrt(w*w+M*M);if(k===0){const R=E.end.x-E.start.x,F=E.end.y-E.start.y,O=Math.sqrt(R*R+F*F);return{x:B.x+S*R/O,y:B.y+S*F/O,t:Q.t,isSpecial:!0,specialType:B===t?\"A\":\"B\"}}return{x:B.x+S*w/k,y:B.y+S*M/k,t:Q.t,isSpecial:!0,specialType:B===t?\"A\":\"B\"}},_=l(t,e,s),f=l(t,e,s+a),I=(E,B,S,Q,w)=\u003e{const M=E.points;if(M.length\u003c2)return M;const k=S+Q,R=[M[0]];for(let F=0;F\u003cM.length-1;F++){const O={start:M[F],end:M[F+1]};if(wc(B,O.start,O.end)\u003ck){const U=p(O,B),Y=U.x-B.x,W=U.y-B.y,te=Math.sqrt(Y*Y+W*W);let j=null;if(te\u003e1e-6)j={x:B.x+k*Y/te,y:B.y+k*W/te};else{const J=O.end.x-O.start.x,oe=O.end.y-O.start.y,ie=Math.sqrt(J*J+oe*oe);ie\u003e1e-6\u0026\u0026(j={x:B.x+k*J/ie,y:B.y+k*oe/ie})}j\u0026\u0026no(O.start,j)\u003es/10\u0026\u0026R.push(j)}no(R[R.length-1],O.end)\u003es/10\u0026\u0026R.push(O.end)}if(R.length\u003e1){const F=[R[0]];for(let O=1;O\u003cR.length;O++)no(F[F.length-1],R[O])\u003es/10\u0026\u0026F.push(R[O]);return F}return R},C=(()=\u003e{const E=[[n,_.B_Left,_.B_Opp,_.B_Right,c(_.midpoint,c(_.B_Right,_.A_Right)),c(_.midpoint,c(_.A_Left,_.B_Left)),_.A_Left,_.A_Opp,_.A_Right,o],[n,_.B_Right,_.B_Opp,_.B_Left,c(_.midpoint,c(_.A_Left,_.B_Left)),c(_.midpoint,c(_.A_Right,_.B_Right)),_.A_Right,_.A_Opp,_.A_Left,o],[o,_.B_Left,_.B_Opp,_.B_Right,c(_.midpoint,c(_.A_Right,_.B_Right)),c(_.midpoint,c(_.A_Left,_.B_Left)),_.A_Left,_.A_Opp,_.A_Right,n],[o,_.B_Right,_.B_Opp,_.B_Left,c(_.midpoint,c(_.A_Left,_.B_Left)),c(_.midpoint,c(_.A_Right,_.B_Right)),_.A_Right,_.A_Opp,_.A_Left,n]],B=[];for(let W=0;W\u003cE.length;W++){const te=E[W],j={start:te[0],end:te[1]},J={start:te[te.length-2],end:te[te.length-1]},oe={start:te[3],end:te[4]};g(j,J)||g(j,oe)||g(J,oe)||B.push({index:W+1,path:te,length:d(te)})}if(B.length===0)return{index:0,path:[]};const S=B.sort((W,te)=\u003eW.length-te.length)[0],Q=[...S.path],w=Q[0],M=no(w,Q[2]),k=no(w,Q[3]),R=M\u003ck?2:3;(M\u003cno(w,Q[1])||k\u003cno(w,Q[1]))\u0026\u0026Q.splice(1,R-1);const F=Q[Q.length-1],O=no(F,Q[Q.length-3]),U=no(F,Q[Q.length-4]),Y=O\u003cU?Q.length-3:Q.length-4;return(O\u003cno(F,Q[Q.length-2])||U\u003cno(F,Q[Q.length-2]))\u0026\u0026Q.splice(Y+1,Q.length-Y-2),{index:S.index,path:Q,startsAt:Q[0]===n?\"C\":\"D\",goesTo:Q[Q.length-1]===n?\"C\":\"D\"}})(),y=A\u003e0?((E,B)=\u003e{if(E.length\u003c2)return E;const S=[E[0]];for(let Q=0;Q\u003cE.length-1;Q++){const w={start:E[Q],end:E[Q+1]},M={x:(w.start.x+w.end.x)/2,y:(w.start.y+w.end.y)/2},k=no(M,t),R=no(M,e);if((k\u003c=s||R\u003c=s)\u0026\u0026Math.abs(k-R)\u003e1e-4){const F=p(w,t),O=p(w,e),U=no(F,t),Y=no(O,e)\u003cs,W=U\u003cs?m(w,t,s):null,te=Y?m(w,e,s):null;let j=[];if(no(w.start,w.end)\u003es/2\u0026\u0026B\u003e0)for(let J=1;J\u003c=B;J++){const oe=J/(B+1),ie={x:w.start.x+oe*(w.end.x-w.start.x),y:w.start.y+oe*(w.end.y-w.start.y),t:oe,isSpecial:!1},ne=no(ie,t),le=no(ie,e);ne\u003cs||le\u003cs||W\u0026\u0026Math.abs(ie.t-W.t)\u003c.1||te\u0026\u0026Math.abs(ie.t-te.t)\u003c.1||j.push(ie)}if(W\u0026\u0026j.push(W),te\u0026\u0026j.push(te),j.sort((J,oe)=\u003eJ.t-oe.t),j.length\u003e1){const J=[j[0]];for(let oe=1;oe\u003cj.length;oe++){const ie=J[J.length-1],ne=j[oe];no(ie,ne)\u003es/10\u0026\u0026J.push(ne)}j=J}j.forEach(J=\u003eS.push(J))}S.push(E[Q+1])}if(S.length\u003e1){const Q=[S[0]];for(let w=1;w\u003cS.length;w++){const M=Q[Q.length-1],k=S[w];no(M,k)\u003es/10\u0026\u0026Q.push(k)}return Q}return S})(C.path,A):C.path;let x=(()=\u003e{if(C.path.length===0)return null;const E=(()=\u003e{const M=c(_.A_Right,_.B_Right),k=c(_.B_Left,_.A_Left);return[{startsAt:\"E\",goesTo:\"B\",points:[i,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,t]},{startsAt:\"F\",goesTo:\"B\",points:[r,e]},{startsAt:\"F\",goesTo:\"A\",points:[r,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,M,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,M,t]},{startsAt:\"F\",goesTo:\"B\",points:[r,M,e]},{startsAt:\"F\",goesTo:\"A\",points:[r,M,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,k,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,k,t]},{startsAt:\"F\",goesTo:\"B\",points:[r,k,e]},{startsAt:\"F\",goesTo:\"A\",points:[r,k,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,f.A_Right,M,e]},{startsAt:\"F\",goesTo:\"B\",points:[r,f.B_Right,M,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,f.B_Left,k,t]},{startsAt:\"F\",goesTo:\"A\",points:[r,f.A_Left,k,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,f.A_Left,k,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,f.B_Right,M,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,f.A_Opp,f.A_Right,M,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,f.B_Opp,f.B_Left,k,t]},{startsAt:\"F\",goesTo:\"B\",points:[r,f.A_Opp,f.A_Left,k,e]},{startsAt:\"F\",goesTo:\"A\",points:[r,f.B_Opp,f.B_Right,M,t]},{startsAt:\"F\",goesTo:\"A\",points:[r,f.B_Opp,f.B_Left,k,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,f.A_Opp,f.A_Left,k,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,f.B_Opp,f.B_Right,M,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,f.A_Left,f.A_Opp,f.A_Right,M,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,f.B_Right,f.B_Opp,f.B_Left,k,t]},{startsAt:\"F\",goesTo:\"B\",points:[r,f.A_Right,f.A_Opp,f.A_Left,k,e]},{startsAt:\"F\",goesTo:\"A\",points:[r,f.B_Left,f.B_Opp,f.B_Right,M,t]},{startsAt:\"F\",goesTo:\"A\",points:[r,f.B_Right,f.B_Opp,f.B_Left,k,t]},{startsAt:\"E\",goesTo:\"B\",points:[i,f.A_Right,f.A_Opp,f.A_Left,k,e]},{startsAt:\"E\",goesTo:\"A\",points:[i,f.B_Left,f.B_Opp,f.B_Right,M,t]}].map((R,F)=\u003e({...R,index:F}))})(),B=E.filter(M=\u003eM.startsAt===\"E\"),S=E.filter(M=\u003eM.startsAt===\"F\"),Q=[],w=[];for(const M of B)if(!h(M.points,C.path)){Q.push(M);break}for(const M of S)if(!h(M.points,C.path)){w.push(M);break}return Q.length===0||w.length===0?null:{line1:Q[0],line2:w[0]}})();if(x){const E=x.line1.goesTo===\"A\"?e:t,B=x.line2.goesTo===\"A\"?e:t,S=I(x.line1,E,s,a),Q=I(x.line2,B,s,a);x={line1:{...x.line1,points:S},line2:{...x.line2,points:Q}}}return{jPair:x,optimalPath:{startsAt:C.startsAt,goesTo:C.goesTo,points:y}}}var $Xn=class extends yr{getSolverName(){return\"TwoCrossingRoutesHighDensitySolver\"}nodeWithPortPoints;routes;viaDiameter;traceThickness;obstacleMargin;layerCount=2;debugViaPositions;escapeLayer=1;solvedRoutes=[];bounds;constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.viaDiameter=e?.viaDiameter??.3,this.traceThickness=e?.traceThickness??.15,this.obstacleMargin=e?.obstacleMargin??.1,this.layerCount=e?.layerCount??2,this.debugViaPositions=[],this.routes=this.extractRoutesFromNode(),this.bounds=this.calculateBounds(),this.routes.length!==2)return this.failed=!0,void(this.error=`Expected 2 routes, but got ${this.routes.length}`);const[n,o]=this.routes;if(n.startPort.z!==n.endPort.z)return this.failed=!0,void(this.error=\"Route A must start and end on the same layer\");if(o.startPort.z!==o.endPort.z)return this.failed=!0,void(this.error=\"Route B must start and end on the same layer\");if(n.startPort.z!==o.startPort.z)return this.failed=!0,void(this.error=\"Both routes must be on the same layer\");n.startPort.z===0?this.escapeLayer=1:this.escapeLayer=0}extractRoutesFromNode(){const e=[],n=this.nodeWithPortPoints.portPoints,o=new Map;for(const i of n){const{connectionName:r}=i;o.has(r)||o.set(r,[]),o.get(r)?.push(i)}for(const[i,r]of o.entries())r.length===2\u0026\u0026e.push({startPort:{...r[0],z:r[0].z??0},endPort:{...r[1],z:r[1].z??0},connectionName:i});return e}calculateBounds(){return{minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2}}doRoutesCross(e,n){return Uh(e.startPort,e.endPort,n.startPort,n.endPort)}calculateViaPositions(e,n){const o=this.bounds.maxX-this.bounds.minX,i=this.bounds.maxY-this.bounds.minY,r=this.bounds.minX,s=this.bounds.minY,a={width:o-2*this.obstacleMargin-this.viaDiameter,height:i-2*this.obstacleMargin-this.viaDiameter,x:r+this.obstacleMargin+this.viaDiameter/2,y:s+this.obstacleMargin+this.viaDiameter/2},A=this.viaDiameter+this.obstacleMargin,c=n.startPort,l=n.endPort,u=[{x:a.x,y:a.y},{x:a.x+a.width,y:a.y},{x:a.x+a.width,y:a.y+a.height},{x:a.x,y:a.y+a.height}],g=(C,y)=\u003eno(C,y),h=[];u.forEach((C,y)=\u003e{g(C,c)\u003e=A\u0026\u0026g(C,l)\u003e=A\u0026\u0026h.push({...C,type:\"corner\",index:y})});const d=[{p1:u[0],p2:u[1]},{p1:u[1],p2:u[2]},{p1:u[2],p2:u[3]},{p1:u[3],p2:u[0]}];if([c,l].forEach((C,y)=\u003e{d.forEach((x,E)=\u003e{((B,S)=\u003e{const Q=B.x,w=B.y,M=B.r,k=S.p1.x,R=S.p1.y,F=S.p2.x,O=S.p2.y;if(Math.abs(F-k)\u003c.001){const ge=k,_e=M*M-(ge-Q)**2;if(_e\u003c0)return[];if(Math.abs(_e)\u003c.001){const ye=w;return ye\u003e=Math.min(R,O)\u0026\u0026ye\u003c=Math.max(R,O)?[{x:ge,y:ye}]:[]}const ue=w+Math.sqrt(_e),fe=w-Math.sqrt(_e),pe=[];return ue\u003e=Math.min(R,O)\u0026\u0026ue\u003c=Math.max(R,O)\u0026\u0026pe.push({x:ge,y:ue}),fe\u003e=Math.min(R,O)\u0026\u0026fe\u003c=Math.max(R,O)\u0026\u0026pe.push({x:ge,y:fe}),pe}const U=(O-R)/(F-k),Y=R-U*k,W=1+U*U,te=2*(U*Y-U*w-Q),j=te*te-4*W*(Q*Q+(Y-w)*(Y-w)-M*M);if(j\u003c0)return[];if(Math.abs(j)\u003c.001){const ge=-te/(2*W),_e=U*ge+Y;return ge\u003e=Math.min(k,F)\u0026\u0026ge\u003c=Math.max(k,F)\u0026\u0026_e\u003e=Math.min(R,O)\u0026\u0026_e\u003c=Math.max(R,O)?[{x:ge,y:_e}]:[]}const J=(-te+Math.sqrt(j))/(2*W),oe=(-te-Math.sqrt(j))/(2*W),ie=U*J+Y,ne=U*oe+Y,le=[];return J\u003e=Math.min(k,F)\u0026\u0026J\u003c=Math.max(k,F)\u0026\u0026ie\u003e=Math.min(R,O)\u0026\u0026ie\u003c=Math.max(R,O)\u0026\u0026le.push({x:J,y:ie}),oe\u003e=Math.min(k,F)\u0026\u0026oe\u003c=Math.max(k,F)\u0026\u0026ne\u003e=Math.min(R,O)\u0026\u0026ne\u003c=Math.max(R,O)\u0026\u0026le.push({x:oe,y:ne}),le})({...C,r:A},x).forEach(B=\u003e{g(B,y===0?l:c)\u003e=A\u0026\u0026h.push({...B,type:\"intersection\",circle:y,edge:E})})})}),h.length\u003c2){const C=.8*A;if(u.forEach((y,x)=\u003e{g(y,c)\u003e=C\u0026\u0026g(y,l)\u003e=C\u0026\u0026!h.some(E=\u003eE.x===y.x\u0026\u0026E.y===y.y)\u0026\u0026h.push({...y,type:\"relaxed_corner\",index:x})}),h.length\u003c2){const y=[...u].sort((x,E)=\u003e{const B=Math.min(g(x,c),g(x,l));return Math.min(g(E,c),g(E,l))-B});for(const x of y)if(!h.some(E=\u003eE.x===x.x\u0026\u0026E.y===x.y)\u0026\u0026(h.push({...x,type:\"forced_corner\"}),h.length\u003e=2))break}}if(h.length\u003c2)return null;let p=0,m=[h[0],h[h.length\u003e1?1:0]];for(let C=0;C\u003ch.length;C++)for(let y=C+1;y\u003ch.length;y++){const x=g(h[C],h[y]);x\u003ep\u0026\u0026(p=x,m=[h[C],h[y]])}let _={x:m[0].x,y:m[0].y},f={x:m[1].x,y:m[1].y};const I=no(_,e.startPort);return no(f,e.startPort)\u003cI\u0026\u0026([_,f]=[f,_]),{via1:_,via2:f}}trySolveAOverB(e,n,o=!1){const i=o?this.calculateViaPositions(e,n):this.calculateViaPositions(n,e);if(!i)return!1;this.debugViaPositions.push(i);const{via1:r,via2:s}=this.pushViasFromEndpoints(this.moveViasAsCloseAsPossible(i));this.debugViaPositions.push({via1:r,via2:s});const{jPair:a,optimalPath:A}=jXn({A:r,B:s,C:e.startPort,D:e.endPort,E:n.startPort,F:n.endPort,radius:this.viaDiameter/2+this.obstacleMargin+this.traceThickness/2*1.5,margin:2*this.obstacleMargin+this.traceThickness/2*1.5,subdivisions:1});if(!a)return!1;const c={connectionName:e.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:A.points.map(u=\u003e({x:u.x,y:u.y,z:e.startPort.z??0})),traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]};a.line2.points.reverse();const l={connectionName:n.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[...a.line1.points.map(u=\u003e({x:u.x,y:u.y,z:n.startPort.z??0})),{...a.line1.points[a.line1.points.length-1],z:this.escapeLayer},{...a.line2.points[0],z:this.escapeLayer},...a.line2.points.map(u=\u003e({x:u.x,y:u.y,z:n.startPort.z??0}))],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[r,s]};return this.solvedRoutes.push(c,l),!0}pushViasFromEndpoints(e){const n={...e.via1},o={...e.via2},i=[this.routes[0].startPort,this.routes[0].endPort,this.routes[1].startPort,this.routes[1].endPort],r=this.getMinDistanceBetweenViaCenters(),s=this.viaDiameter/2+2*this.traceThickness+2*this.obstacleMargin;for(let A=0;A\u003c10;A++){let c=!1,l=!1;const u=.9**A;for(const h of i){const d=no(n,h);if(d\u003cs){const m=(s-d)*u,_=n.x-h.x,f=n.y-h.y,I=Math.sqrt(_*_+f*f);I\u003e1e-6\u0026\u0026(n.x+=_/I*m,n.y+=f/I*m,c=!0)}const p=no(o,h);if(p\u003cs){const m=(s-p)*u,_=o.x-h.x,f=o.y-h.y,I=Math.sqrt(_*_+f*f);I\u003e1e-6\u0026\u0026(o.x+=_/I*m,o.y+=f/I*m,l=!0)}}const g=no(n,o);if(g\u003cr){const h=(r-g)/2,d=o.x-n.x,p=o.y-n.y,m=Math.sqrt(d*d+p*p);m\u003e1e-6?(n.x-=d/m*h,n.y-=p/m*h,o.x+=d/m*h,o.y+=p/m*h,c=!0,l=!0):(n.x-=h,o.x+=h,c=!0,l=!0)}if(!c\u0026\u0026!l)break}const a=no(n,o);if(a\u003cr){const A=(r-a)/2,c=o.x-n.x,l=o.y-n.y,u=Math.sqrt(c*c+l*l);u\u003e1e-6?(n.x-=c/u*A,n.y-=l/u*A,o.x+=c/u*A,o.y+=l/u*A):(n.x-=A,o.x+=A)}return{via1:n,via2:o}}getMinDistanceBetweenViaCenters(){return this.viaDiameter+this.traceThickness+2*this.obstacleMargin}moveViasAsCloseAsPossible(e){const{via1:n,via2:o}=e,i=this.getMinDistanceBetweenViaCenters(),r=no(n,o);if(r\u003c=i)return e;const s=o.x-n.x,a=o.y-n.y,A=Math.sqrt(s*s+a*a),c=s/A,l=a/A,u=(n.x,o.x,n.y,o.y,(r-i)/2);return{via1:{x:n.x+c*u,y:n.y+l*u},via2:{x:o.x-c*u,y:o.y-l*u}}}handleRoutesDontCross(){const[e,n]=this.routes,o={connectionName:e.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:e.startPort.x,y:e.startPort.y,z:e.startPort.z??0},{x:e.endPort.x,y:e.endPort.y,z:e.endPort.z??0}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]},i={connectionName:n.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:n.startPort.x,y:n.startPort.y,z:n.startPort.z??0},{x:n.endPort.x,y:n.endPort.y,z:n.endPort.z??0}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]};this.solvedRoutes.push(o,i),this.solved=!0}_step(){if(this.routes.length!==2)return void(this.failed=!0);const[e,n]=this.routes;this.doRoutesCross(e,n)?this.trySolveAOverB(e,n)||this.trySolveAOverB(n,e)||this.trySolveAOverB(e,n,!0)||this.trySolveAOverB(n,e,!0)?this.solved=!0:(this.failed=!0,this.error=\"All crossover strategies failed\"):this.handleRoutesDontCross()}visualize(){const e={lines:[],points:[],rects:[],circles:[]};e.rects.push({center:{x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY,stroke:\"rgba(0, 0, 0, 0.5)\",fill:\"rgba(240, 240, 240, 0.1)\"});for(const[n,o]of[[\"Route A\",this.routes[0]],[\"Route B\",this.routes[1]]])e.points.push({x:o.startPort.x,y:o.startPort.y,label:`${n}\n${o.connectionName} start`,color:\"orange\"}),e.points.push({x:o.endPort.x,y:o.endPort.y,label:`${n}\n${o.connectionName} end`,color:\"orange\"}),e.lines.push({points:[o.startPort,o.endPort],strokeColor:\"rgba(255, 0, 0, 0.5)\",label:`${n}\n${o.connectionName} direct`});for(let n=0;n\u003cthis.debugViaPositions.length;n++){const{via1:o,via2:i}=this.debugViaPositions[n],r=[\"rgba(255, 165, 0, 0.3)\",\"rgba(128, 0, 128, 0.3)\"],s=r[n%r.length];e.circles.push({center:o,radius:this.viaDiameter/2,fill:s,stroke:\"rgba(0, 0, 0, 0.3)\",label:`Computed Via A (attempt ${n+1})`}),e.circles.push({center:i,radius:this.viaDiameter/2,fill:s,stroke:\"rgba(0, 0, 0, 0.3)\",label:`Computed Via B (attempt ${n+1})`});const a=this.viaDiameter/2+this.obstacleMargin;e.circles.push({center:o,radius:a,stroke:s,fill:\"rgba(0, 0, 0, 0)\",label:`Debug Via 1 Safety Margin (attempt ${n+1})`}),e.circles.push({center:i,radius:a,stroke:s,fill:\"rgba(0, 0, 0, 0)\",label:`Debug Via 2 Safety Margin (attempt ${n+1})`}),e.lines.push({points:[this.routes[n%2].startPort,o,i,this.routes[n%2].endPort],strokeColor:`${s.substring(0,s.lastIndexOf(\",\"))}, 0.3)`,strokeDash:[5,5],label:`Potential Route (attempt ${n+1})`})}for(let n=0;n\u003cthis.solvedRoutes.length;n++){const o=this.solvedRoutes[n],i=n%2==0?\"rgba(0, 255, 0, 0.75)\":\"rgba(255, 0, 255, 0.75)\";for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];e.lines.push({points:[s,a],strokeColor:i,strokeDash:s.z===1?[.2,.2]:void 0,strokeWidth:o.traceThickness,label:`${o.connectionName} z=${s.z}`}),s._label\u0026\u0026e.points.push({x:s.x,y:s.y,label:s._label})}for(const r of o.vias)e.circles.push({center:r,radius:this.viaDiameter/2,fill:\"rgba(0, 0, 255, 0.8)\",stroke:\"black\",label:\"Solved Via\"}),e.circles.push({center:r,radius:this.viaDiameter/2+this.obstacleMargin,fill:\"rgba(0, 0, 255, 0.3)\",stroke:\"black\",label:\"Solved Via Margin\"})}return e}getSolvedRoutes(){return this.solvedRoutes}},Zse=class extends yr{getSolverName(){return\"HyperParameterSupervisorSolver\"}GREEDY_MULTIPLIER=1.2;MIN_SUBSTEPS=1;supervisedSolvers;winningSolver;getHyperParameterDefs(){throw new Error(\"Not implemented\")}getCombinationDefs(){return null}getHyperParameterCombinations(e){e||(e=this.getHyperParameterDefs());const n=[];if(e.length===0)return[{}];const[o,...i]=e,r=this.getHyperParameterCombinations(i);return o.possibleValues.forEach(s=\u003e{r.forEach(a=\u003e{n.push({...a,...s})})}),n}initializeSolvers(){const e=this.getHyperParameterDefs(),n=this.getCombinationDefs()??[e.map(o=\u003eo.name)];this.supervisedSolvers=[];for(const o of n){const i=this.getHyperParameterCombinations(e.filter(r=\u003eo.includes(r.name)));for(const r of i){const s=this.generateSolver(r),a=this.computeG(s);this.supervisedSolvers.push({hyperParameters:r,solver:s,h:0,g:a,f:a})}}}generateSolver(e){throw new Error(\"Not implemented\")}computeG(e){return e.iterations/e.MAX_ITERATIONS}computeH(e){return 1-(e.progress||0)}computeF(e,n){return e+n*this.GREEDY_MULTIPLIER}getSupervisedSolverWithBestFitness(){let e=1/0,n=null;for(const o of this.supervisedSolvers??[]){if(o.solver.solved)return o;if(o.solver.failed)continue;const i=o.f;i\u003ce\u0026\u0026(e=i,n=o)}return n}getFailureMessage(){return`All solvers failed in hyper solver. Example failures: ${this.supervisedSolvers?.sort((e,n)=\u003en.f-e.f)?.slice(0,5).map(e=\u003ee.solver.error).join(\", \")}`}_step(){this.supervisedSolvers||this.initializeSolvers();const e=this.getSupervisedSolverWithBestFitness();if(!e)return this.failed=!0,void(this.error=this.getFailureMessage());for(let n=0;n\u003cthis.MIN_SUBSTEPS;n++)e.solver.step();this.activeSubSolver=e.solver,e.g=this.computeG(e.solver),e.h=this.computeH(e.solver),e.f=this.computeF(e.g,e.h),e.solver.solved\u0026\u0026(this.solved=!0,this.winningSolver=e.solver,this.onSolve?.(e))}onSolve(e){}visualize(){const e=this.getSupervisedSolverWithBestFitness();let n={lines:[],circles:[],points:[],rects:[]};return e\u0026\u0026(n=e.solver.visualize()),n}},z3=t=\u003e`${t.x.toFixed(6)},${t.y.toFixed(6)},${t.z}`,qXn=t=\u003e[t.route[0],t.route[t.route.length-1]],eae=(t,e,n)=\u003e{const o=new Map,i=(a,A)=\u003e{o.has(a)||o.set(a,new Set),o.has(A)||o.set(A,new Set),o.get(a).add(A),o.get(A).add(a)};for(const a of t)if(a.connectionName===e\u0026\u0026a.route.length!==0){if(a.route.length===1){const A=z3(a.route[0]);o.has(A)||o.set(A,new Set);continue}for(let A=0;A\u003ca.route.length-1;A++)i(z3(a.route[A]),z3(a.route[A+1]))}const r=new Set([n]),s=[n];for(;s.length\u003e0;){const a=s.pop();for(const A of o.get(a)??[])r.has(A)||(r.add(A),s.push(A))}return r},G7e=Array.from({length:6},(t,e)=\u003ee),Vz=class extends Zse{getSolverName(){return\"PortfolioSingleIntraNodeSolver\"}constructorParams;solvedRoutes=[];nodeWithPortPoints;connMap;effort;adaptiveSearchExpanded=!1;getSolvedSegmentCount(e){const n=e.solvedConnectionsMap;if(!(n instanceof Map))return null;let o=0;for(const i of n.values())Array.isArray(i)\u0026\u0026(o+=i.length);return o}getNodeSegmentCount(){return Math.max(1,this.nodeWithPortPoints.portPointsInPairs?.length??new Set(this.nodeWithPortPoints.portPoints.map(e=\u003ee.connectionName)).size)}getCandidateProgress(e){const n=this.getSolvedSegmentCount(e);return n!==null?Math.min(1,n/this.getNodeSegmentCount()):Math.max(0,Math.min(1,e.progress||0))}getTotalCandidateWork(){return(this.supervisedSolvers??[]).reduce((e,{solver:n})=\u003ee+n.iterations,0)}getDynamicExpansionWorkBudget(){return Math.max(1,...(this.supervisedSolvers??[]).map(({solver:e})=\u003ee.MAX_ITERATIONS))}constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.connMap=e.connMap,this.constructorParams=e,this.effort=e.effort??1,this.MAX_ITERATIONS=2e7*this.effort,this.GREEDY_MULTIPLIER=5,this.MIN_SUBSTEPS=100}getCombinationDefs(){return[[\"throughObstacle\"],[\"singleLayerNoDifferentRootIntersections\"],[\"multiHeadPolyLine\"],[\"majorCombinations\",\"orderings6\",\"cellSizeFactor\"],[\"noVias\"],[\"orderings50\"],[\"flipTraceAlignmentDirection\",\"orderings6\"],[\"closedFormSingleTrace\"],[\"highDensityA01\"],[\"highDensityA03\"]]}getHyperParameterDefs(){return[{name:\"singleLayerNoDifferentRootIntersections\",possibleValues:[{SINGLE_LAYER_NO_DIFFERENT_ROOT_INTERSECTIONS:!0}]},{name:\"majorCombinations\",possibleValues:[{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR:2,FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:1,FUTURE_CONNECTION_PROXIMITY_VD:10,MISALIGNED_DIST_PENALTY_FACTOR:5},{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR:1,FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:.5,FUTURE_CONNECTION_PROXIMITY_VD:5,MISALIGNED_DIST_PENALTY_FACTOR:2},{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR:10,FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:1,FUTURE_CONNECTION_PROXIMITY_VD:5,MISALIGNED_DIST_PENALTY_FACTOR:10,VIA_PENALTY_FACTOR_2:1}]},{name:\"orderings6\",possibleValues:G7e.map(e=\u003e({SHUFFLE_SEED:e}))},{name:\"cellSizeFactor\",possibleValues:[{CELL_SIZE_FACTOR:.5},{CELL_SIZE_FACTOR:1}]},{name:\"flipTraceAlignmentDirection\",possibleValues:[{FLIP_TRACE_ALIGNMENT_DIRECTION:!0}]},{name:\"noVias\",possibleValues:[{CELL_SIZE_FACTOR:2,VIA_PENALTY_FACTOR_2:10}]},{name:\"orderings50\",possibleValues:Array.from({length:20},(e,n)=\u003e({SHUFFLE_SEED:100+n}))},{name:\"throughObstacle\",possibleValues:[{THROUGH_OBSTACLE:!0}]},{name:\"closedFormSingleTrace\",possibleValues:[{CLOSED_FORM_SINGLE_TRANSITION:!0}]},{name:\"multiHeadPolyLine\",possibleValues:[{MULTI_HEAD_POLYLINE_SOLVER:!0,SEGMENTS_PER_POLYLINE:6,BOUNDARY_PADDING:.05},{MULTI_HEAD_POLYLINE_SOLVER:!0,SEGMENTS_PER_POLYLINE:6,BOUNDARY_PADDING:-.05,ITERATION_PENALTY:1e4,MINIMUM_FINAL_ACCEPTANCE_GAP:.001}]},{name:\"highDensityA01\",possibleValues:[{HIGH_DENSITY_A01:!0,SHUFFLE_SEED:G7e[0]}]},{name:\"highDensityA03\",possibleValues:[{HIGH_DENSITY_A03:!0}]}]}initializeCandidateBudget(e){const n=e.setup;typeof n==\"function\"\u0026\u0026n.call(e)}refreshDynamicIterationLimit(){const e=(this.supervisedSolvers??[]).reduce((n,{solver:o})=\u003e{if(o.solved||o.failed)return n;const i=Math.max(0,o.MAX_ITERATIONS-o.iterations+1);return n+Math.ceil(i/this.MIN_SUBSTEPS)},0);this.MAX_ITERATIONS=Math.max(this.iterations+1,this.iterations+e),this.stats.dynamicSupervisorIterationLimit=this.MAX_ITERATIONS}initializeSolvers(){super.initializeSolvers();for(const{solver:e}of this.supervisedSolvers??[])this.initializeCandidateBudget(e);this.stats.dynamicExpansionWorkBudget=this.getDynamicExpansionWorkBudget(),this.refreshDynamicIterationLimit()}addSupervisedCandidate(e){const n=this.generateSolver(e);this.initializeCandidateBudget(n);const o=this.computeG(n);this.supervisedSolvers.push({hyperParameters:e,solver:n,h:0,g:o,f:o})}expandAdaptiveSearch(){if(!this.adaptiveSearchExpanded){this.adaptiveSearchExpanded=!0;for(const e of G7e.slice(1))this.addSupervisedCandidate({HIGH_DENSITY_A01:!0,SHUFFLE_SEED:e});this.refreshDynamicIterationLimit(),this.stats.adaptiveSearchExpanded=!0,this.stats.adaptiveSearchExpandedAtIteration=this.iterations,this.stats.candidateWorkAtExpansion=this.getTotalCandidateWork(),this.stats.bestProgressAtExpansion=Math.max(0,...(this.supervisedSolvers??[]).map(({solver:e})=\u003ethis.getCandidateProgress(e)))}}shouldExpandPortfolio(){if(this.adaptiveSearchExpanded)return!1;const e=this.getDynamicExpansionWorkBudget();return this.stats.dynamicExpansionWorkBudget=e,this.getTotalCandidateWork()\u003e=e}_step(){this.supervisedSolvers||this.initializeSolvers(),this.adaptiveSearchExpanded||this.getSupervisedSolverWithBestFitness()||this.expandAdaptiveSearch(),super._step(),this.solved||this.failed||!this.shouldExpandPortfolio()||this.expandAdaptiveSearch()}computeG(e){return e instanceof S7e||e instanceof w7e?e.iterations/1e6:e?.hyperParameters?.MULTI_HEAD_POLYLINE_SOLVER?1e3+((e.hyperParameters?.ITERATION_PENALTY??0)+e.iterations)/1e4+1e4*(e.hyperParameters.SEGMENTS_PER_POLYLINE-3):e.iterations/1e4}computeH(e){return this.adaptiveSearchExpanded?1-this.getCandidateProgress(e):1-(e.progress||0)}generateSolver(e){if(e.SINGLE_LAYER_NO_DIFFERENT_ROOT_INTERSECTIONS){if(!pft.isApplicable(this.nodeWithPortPoints)){const n=new Wse({nodeWithPortPoints:this.nodeWithPortPoints,connMap:this.connMap,traceWidth:this.constructorParams.traceWidth,viaDiameter:this.constructorParams.viaDiameter,obstacleMargin:this.constructorParams.obstacleMargin});return n.failed=!0,n.error=\"Single-layer no-different-root-intersection solver not applicable\",n}return new pft({nodeWithPortPoints:this.nodeWithPortPoints,traceWidth:this.constructorParams.traceWidth,viaDiameter:this.constructorParams.viaDiameter})}return e.HIGH_DENSITY_A01?new S7e({nodeWithPortPoints:this.nodeWithPortPoints,cellSizeMm:.1,viaDiameter:this.constructorParams.viaDiameter??.3,viaMinDistFromBorder:(this.constructorParams.viaDiameter??.3)/2,traceMargin:.1,traceThickness:this.constructorParams.traceWidth??.15,effort:this.effort,hyperParameters:{shuffleSeed:e.SHUFFLE_SEED??0}}):e.HIGH_DENSITY_A03?new w7e({nodeWithPortPoints:this.nodeWithPortPoints,highResolutionCellSize:.1,highResolutionCellThickness:8,lowResolutionCellSize:.4,viaDiameter:this.constructorParams.viaDiameter??.3,viaMinDistFromBorder:(this.constructorParams.viaDiameter??.3)/2,traceMargin:.1,traceThickness:.1,effort:this.effort,hyperParameters:e}):e.CLOSED_FORM_TWO_TRACE_SAME_LAYER?new $Xn({nodeWithPortPoints:this.nodeWithPortPoints,viaDiameter:this.constructorParams.viaDiameter}):e.CLOSED_FORM_TWO_TRACE_TRANSITION_CROSSING?new WXn({nodeWithPortPoints:this.nodeWithPortPoints,viaDiameter:this.constructorParams.viaDiameter}):e.CLOSED_FORM_SINGLE_TRANSITION?new KXn({nodeWithPortPoints:this.nodeWithPortPoints,viaDiameter:this.constructorParams.viaDiameter}):e.THROUGH_OBSTACLE?new VXn({nodeWithPortPoints:this.nodeWithPortPoints,obstacles:this.constructorParams.obstacles,connMap:this.connMap,layerCount:this.constructorParams.layerCount,viaDiameter:this.constructorParams.viaDiameter,traceThickness:this.constructorParams.traceWidth}):e.MULTI_HEAD_POLYLINE_SOLVER?new FXn({nodeWithPortPoints:this.nodeWithPortPoints,connMap:this.connMap,hyperParameters:e,viaDiameter:this.constructorParams.viaDiameter}):new T7e({...this.constructorParams,hyperParameters:e})}onSolve(e){let n;n=e.solver instanceof S7e||e.solver instanceof w7e?e.solver.getOutput():e.solver.solvedRoutes;const o=n.map(i=\u003e{const r=this.nodeWithPortPoints.portPoints.find(s=\u003es.connectionName===i.connectionName);return r?.rootConnectionName?{...i,rootConnectionName:r.rootConnectionName}:i});this.solvedRoutes=((i,r)=\u003e{const s=[...i],a=new Map;for(const A of r.portPoints){const c=a.get(A.connectionName)??[];c.push(A),a.set(A.connectionName,c)}for(const[A,c]of a){if(c.length\u003c=1)continue;const l=c[0]?.rootConnectionName??A,u=new Set(c.map(z3));let g=eae(s,A,z3(c[0]));for(const h of c.slice(1)){const d=z3(h);if(g.has(d))continue;const p=s.find(m=\u003e{if((m.rootConnectionName??m.connectionName)!==l||m.connectionName===A)return!1;const[_,f]=qXn(m);if(!_||!f)return!1;const I=z3(_),C=z3(f);return g.has(I)\u0026\u0026C===d||g.has(C)\u0026\u0026I===d||u.has(I)\u0026\u0026u.has(C)\u0026\u0026(I===d||C===d)});p\u0026\u0026(s.push({...p,connectionName:A,rootConnectionName:l,route:p.route.map(m=\u003e({...m,connectionName:A,rootConnectionName:l})),vias:p.vias.map(m=\u003e({...m})),jumpers:p.jumpers?.map(m=\u003e({...m,start:{...m.start},end:{...m.end}}))}),g=eae(s,A,z3(c[0])))}}return s})(o,this.nodeWithPortPoints)}};function Eft(t,e,n,o,i){const r=n-e,s=i-o,a=1e-6;if(Math.abs(t.y-i)\u003ca)return t.x-e;if(Math.abs(t.x-n)\u003ca)return r+(i-t.y);if(Math.abs(t.y-o)\u003ca)return r+s+(n-t.x);if(Math.abs(t.x-e)\u003ca)return 2*r+s+(t.y-o);const A=Math.abs(t.y-i),c=Math.abs(t.x-n),l=Math.abs(t.y-o),u=Math.abs(t.x-e),g=Math.min(A,c,l,u);return g===A?Math.max(0,Math.min(r,t.x-e)):g===c?r+Math.max(0,Math.min(s,i-t.y)):g===l?r+s+Math.max(0,Math.min(r,n-t.x)):2*r+s+Math.max(0,Math.min(s,t.y-o))}function tae(t,e,n=1e-6){return Math.abs(t-e)\u003cn}function Bft(t){if(t.length\u003c2)return 0;const e=t.map(([o,i])=\u003eo\u003ci?[o,i]:[i,o]);let n=0;for(let o=0;o\u003ce.length;o++){const[i,r]=e[o];for(let s=o+1;s\u003ce.length;s++){const[a,A]=e[s];tae(i,a)||tae(i,A)||tae(r,a)||tae(r,A)||(i\u003ca\u0026\u0026a\u003cr\u0026\u0026r\u003cA||a\u003ci\u0026\u0026i\u003cA\u0026\u0026A\u003cr)\u0026\u0026n++}}return n}var Wm=t=\u003e{const e=t.center.x-t.width/2,n=t.center.x+t.width/2,o=t.center.y-t.height/2,i=t.center.y+t.height/2,r=new Map;for(const l of t.portPoints){const u=r.get(l.connectionName)??[];u.some(g=\u003eg.x===l.x\u0026\u0026g.y===l.y\u0026\u0026g.z===l.z)||u.push({x:l.x,y:l.y,z:l.z}),r.set(l.connectionName,u)}const s=new Map,a=[];let A=0;for(const[l,u]of r){if(u.length\u003c2)continue;const g=u[0],h=u[1],d=Eft(g,e,n,o,i),p=Eft(h,e,n,o,i);if(g.z===h.z){const m=g.z,_=s.get(m)??[];_.push([d,p]),s.set(m,_)}else A++,a.push([d,p])}let c=0;for(const[l,u]of s)c+=Bft(u);return{numSameLayerCrossings:c,numEntryExitLayerChanges:A,numTransitionPairCrossings:Bft(a)}},bft=t=\u003et.availableZ?.length?[...new Set(t.availableZ)].sort((e,n)=\u003ee-n):[...new Set(t.portPoints.map(e=\u003ee.z??0))].sort((e,n)=\u003ee-n),Sft=t=\u003ebft(t).length===1\u0026\u0026Wm(t).numSameLayerCrossings\u003e0,Qft=(t,e,n)=\u003e{const o=new Map,[i]=bft(t);for(const r of t.portPoints)o.set(r.connectionName,[...o.get(r.connectionName)??[],r]);return Array.from(o.entries()).flatMap(([r,s])=\u003e{if(s.length\u003c2)return[];const a=s[0],A=s[s.length-1];return[{connectionName:r,rootConnectionName:a.rootConnectionName,regionId:t.capacityMeshNodeId,traceThickness:e,viaDiameter:n,route:[{x:a.x,y:a.y,z:i??a.z??0},{x:A.x,y:A.y,z:i??A.z??0}],vias:[]}]})},XXn=Qft,zz=(t,e,n)=\u003e({...t,x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),Y7e=(t,e,n)=\u003ezz(t,e,n),nae=[\"#dc2626\",\"#2563eb\",\"#16a34a\",\"#ca8a04\",\"#9333ea\",\"#0891b2\"],vft=(t,e,n=[])=\u003e[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`\n`),U7e=class extends yr{getSolverName(){return\"GrowShrinkHighDensityIntraNodeSolver\"}constructorParams;nodeWithPortPoints;solvedRoutes=[];failedSolvers=[];activeSubSolver=null;winningSolver;scaleFactor=1;growthAttempts=0;maxGrowthAttempts;constructor(e){if(super(),this.constructorParams=e,this.nodeWithPortPoints=e.nodeWithPortPoints,this.maxGrowthAttempts=e.maxGrowthAttempts??3,this.MAX_ITERATIONS=2e7*(e.effort??1)*(this.maxGrowthAttempts+1),Sft(this.nodeWithPortPoints)){if(!e.fallbackToInvalidGeometryOnFailure)return this.failed=!0,this.progress=1,void(this.error=\"GrowShrinkHighDensityIntraNodeSolver cannot route an impossible single-layer crossing\");this.solvedRoutes=XXn(this.nodeWithPortPoints,e.traceWidth??.15,e.viaDiameter??.3),this.solved=!0,this.progress=1,this.stats={invalidGeometryFallback:!0,reason:\"single-layer node has same-layer crossings\"}}}getConstructorParams(){return this.constructorParams}createActiveSubSolver(){const{growShrinkSolutionValidator:e,...n}=this.constructorParams;var o,i;this.activeSubSolver=new Vz({...n,nodeWithPortPoints:(o=this.nodeWithPortPoints,i=this.scaleFactor,{...o,width:o.width*i,height:o.height*i,portPoints:o.portPoints.map(r=\u003eY7e(r,o.center,i)),portPointsInPairs:o.portPointsInPairs?.map(([r,s])=\u003e[Y7e(r,o.center,i),Y7e(s,o.center,i)])})}),this.constructorParams.maxInnerIterationsPerGrowthAttempt\u0026\u0026(this.activeSubSolver.MAX_ITERATIONS=this.constructorParams.maxInnerIterationsPerGrowthAttempt)}acceptSolution(e){const n=this.scaleFactor===1?e.solvedRoutes:e.solvedRoutes.map(o=\u003e((i,r,s)=\u003e({...i,route:i.route.map(a=\u003ezz(a,r,s)),vias:i.vias.map(a=\u003ezz(a,r,s)),jumpers:i.jumpers?.map(a=\u003e({...a,start:zz(a.start,r,s),end:zz(a.end,r,s)}))}))(o,this.nodeWithPortPoints.center,1/this.scaleFactor));return this.constructorParams.growShrinkSolutionValidator\u0026\u0026!this.constructorParams.growShrinkSolutionValidator(n)?(e.solved=!1,e.failed=!0,e.error=\"High-density scale solution rejected by validator\",!1):(this.winningSolver=e,this.solvedRoutes=n,this.solved=!0,this.failed=!1,!0)}computeProgress(){return Math.min(.99,(this.growthAttempts+(this.activeSubSolver?.progress??0))/(this.maxGrowthAttempts+1))}_step(){if(this.activeSubSolver||this.createActiveSubSolver(),this.activeSubSolver.step(),this.activeSubSolver.solved\u0026\u0026this.acceptSolution(this.activeSubSolver))this.activeSubSolver=null;else if(this.activeSubSolver.failed){if(this.failedSolvers.push(this.activeSubSolver),this.error=this.activeSubSolver.error,this.activeSubSolver=null,this.growthAttempts\u003e=this.maxGrowthAttempts)return this.constructorParams.fallbackToInvalidGeometryOnFailure?(this.solvedRoutes=Qft(this.nodeWithPortPoints,this.constructorParams.traceWidth??.15,this.constructorParams.viaDiameter??.3),this.solved=!0,this.failed=!1,this.progress=1,this.stats={...this.stats,invalidGeometryFallback:!0,reason:\"growth attempts exhausted\",lastError:this.error},void(this.error=null)):(this.failed=!0,void(this.error=`GrowShrinkHighDensityIntraNodeSolver failed after resizing to ${this.scaleFactor}x. Last error: ${this.error}`));this.growthAttempts++,this.scaleFactor*=2}}visualize(){const e=this.activeSubSolver?.visualize()??this.winningSolver?.visualize();return e||(this.solvedRoutes.length\u003e0?{title:this.stats.invalidGeometryFallback?\"Invalid same-layer crossing geometry\":\"Grow/shrink high density routes\",lines:this.solvedRoutes.flatMap((n,o)=\u003en.route.slice(0,-1).map((i,r)=\u003e({points:[i,n.route[r+1]],strokeColor:nae[o%nae.length],strokeWidth:n.traceThickness,layer:`z${i.z}`,label:vft(n.connectionName,n.rootConnectionName,[`z${i.z}`,this.stats.invalidGeometryFallback?\"invalid fallback route\":void 0].filter(Boolean))}))),points:this.nodeWithPortPoints.portPoints.map(n=\u003e({x:n.x,y:n.y,color:nae[Math.max(0,this.solvedRoutes.findIndex(o=\u003eo.connectionName===n.connectionName))%nae.length],label:vft(n.connectionName,n.rootConnectionName,[`z${n.z}`])})),rects:[{center:this.nodeWithPortPoints.center,width:this.nodeWithPortPoints.width,height:this.nodeWithPortPoints.height,fill:this.stats.invalidGeometryFallback?\"rgba(245, 158, 11, 0.12)\":\"rgba(14, 165, 233, 0.08)\",stroke:this.stats.invalidGeometryFallback?\"rgba(217, 119, 6, 0.8)\":\"rgba(14, 165, 233, 0.55)\",label:[this.nodeWithPortPoints.capacityMeshNodeId,this.stats.reason].filter(Boolean).join(`\n`)}],circles:[]}:e??{lines:[],points:[],rects:[],circles:[]})}},wft=(t,e,n=[])=\u003e[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`\n`),HD=class extends yr{getSolverName(){return\"HighDensitySolver\"}unsolvedNodePortPoints;routes;colorMap;defaultViaDiameter=.3;defaultTraceThickness=.15;viaDiameter;traceWidth;obstacleMargin;effort;obstacles;layerCount;useGrowShrinkHighDensityIntraNodeSolver;preserveTerminalPcbPortIds;growShrinkMaxInnerIterationsPerGrowthAttempt;growShrinkFallbackToInvalidGeometryOnFailure;growShrinkSolutionValidator;captureSearchDebug;failedSolvers;activeSubSolver=null;connMap;nodePfById;nodeSolveMetadataById;constructor({nodePortPoints:e,colorMap:n,connMap:o,viaDiameter:i,traceWidth:r,obstacleMargin:s,effort:a,nodePfById:A,obstacles:c,layerCount:l,useGrowShrinkHighDensityIntraNodeSolver:u,preserveTerminalPcbPortIds:g,growShrinkMaxInnerIterationsPerGrowthAttempt:h,growShrinkFallbackToInvalidGeometryOnFailure:d,growShrinkSolutionValidator:p,captureSearchDebug:m}){super(),this.unsolvedNodePortPoints=e,this.colorMap=n??{},this.connMap=o,this.routes=[],this.failedSolvers=[],this.effort=a??1,this.viaDiameter=i??this.defaultViaDiameter,this.traceWidth=r??this.defaultTraceThickness,this.obstacleMargin=s??.15,this.obstacles=c??[],this.layerCount=l??2,this.useGrowShrinkHighDensityIntraNodeSolver=u??!1,this.preserveTerminalPcbPortIds=g??!1,this.growShrinkMaxInnerIterationsPerGrowthAttempt=h,this.growShrinkFallbackToInvalidGeometryOnFailure=d??!1,this.growShrinkSolutionValidator=p,this.captureSearchDebug=m??!0,this.MAX_ITERATIONS=1e7*this.effort*(this.useGrowShrinkHighDensityIntraNodeSolver?4:1),this.nodePfById=A instanceof Map?new Map(A):new Map(Object.entries(A??{})),this.nodeSolveMetadataById=new Map,this.stats={solverNodeCount:{},difficultNodePfs:{},highDensityResizeCount:0}}getSolvedNodeSolverType(e){return e instanceof U7e\u0026\u0026e.winningSolver?this.getSolvedNodeSolverType(e.winningSolver):e instanceof Vz\u0026\u0026e.winningSolver?this.getConcreteSolverTypeName(e.winningSolver):this.getConcreteSolverTypeName(e)}recordNodeSolveMetadata(e,n){const o=e.nodeWithPortPoints,i=this.nodePfById.get(o.capacityMeshNodeId)??null;this.nodeSolveMetadataById.set(o.capacityMeshNodeId,{node:o,status:n,solverType:this.getSolvedNodeSolverType(e),iterations:e.iterations,routeCount:e.solvedRoutes.length,nodePf:i,error:e.error??void 0})}createNodeMarkerLabel(e,n){return[\"hd_node_marker\",`node: ${e}`,`status: ${n.status}`,`solver: ${n.solverType}`,`iterations: ${n.iterations}`,`routes: ${n.routeCount}`,`nodePf: ${n.nodePf??\"n/a\"}`,`portPoints: ${n.node.portPoints.length}`,...n.error?[`error: ${n.error}`]:[]].join(`\n`)}getConcreteSolverTypeName(e){if(e instanceof T7e){const n=this.getIntraNodeStrategyName(e.hyperParameters);return e.cacheHit?`${n} [cached]`:n}return e instanceof Wse?this.getIntraNodeStrategyName(e.hyperParameters):e.getSolverName()}getIntraNodeStrategyName(e){return e?.MULTI_HEAD_POLYLINE_SOLVER?\"MultiHeadPolyLineIntraNodeSolver3\":e?.SINGLE_LAYER_NO_DIFFERENT_ROOT_INTERSECTIONS?\"SingleLayerNoDifferentRootIntersectionsIntraNodeSolver\":e?.CLOSED_FORM_SINGLE_TRANSITION?\"SingleTransitionIntraNodeSolver\":e?.CLOSED_FORM_TWO_TRACE_SAME_LAYER?\"TwoCrossingRoutesHighDensitySolver\":e?.CLOSED_FORM_TWO_TRACE_TRANSITION_CROSSING?\"SingleTransitionCrossingRouteSolver\":e?.HIGH_DENSITY_A01?\"HighDensitySolverA01\":e?.HIGH_DENSITY_A03?\"HighDensitySolverA03\":\"SingleHighDensityRouteSolver6_VertHorzLayer_FutureCost\"}recordSolvedNodeStats(e,n){const o=this.getSolvedNodeSolverType(e),i=this.stats.solverNodeCount,r=this.stats.difficultNodePfs;i[o]=(i[o]??0)+1;const s=this.nodePfById.get(n.capacityMeshNodeId)??null;s!==null\u0026\u0026s\u003e.05\u0026\u0026(r[o]||(r[o]=[]),r[o].push(s))}recordResizeStats(e){e instanceof U7e\u0026\u0026(this.stats.highDensityResizeCount=(this.stats.highDensityResizeCount??0)+e.growthAttempts)}getSolvedRoutesWithTerminalPcbPortIds(e){const n=e.nodeWithPortPoints.portPoints.filter(i=\u003ei.pcb_port_id!==void 0);if(n.length===0)return e.solvedRoutes;const o=(i,r)=\u003e{const s=n.filter(A=\u003eA.connectionName===i.connectionName\u0026\u0026A.x===r.x\u0026\u0026A.y===r.y\u0026\u0026A.z===r.z);if(s.length\u003e1)throw new Error(`HighDensitySolver found multiple PCB terminals at an endpoint of \"${i.connectionName}\"`);const a=s[0];if(a?.pcb_port_id)return a.pcb_port_id};return e.solvedRoutes.map(i=\u003e({...i,startPcbPortId:i.route[0]?o(i,i.route[0]):void 0,endPcbPortId:i.route.length\u003e1?o(i,i.route[i.route.length-1]):void 0}))}_step(){if(this.updateCacheStats(),this.activeSubSolver)return this.activeSubSolver.step(),this.activeSubSolver.solved?(this.routes.push(...this.preserveTerminalPcbPortIds?this.getSolvedRoutesWithTerminalPcbPortIds(this.activeSubSolver):this.activeSubSolver.solvedRoutes),this.recordNodeSolveMetadata(this.activeSubSolver,\"solved\"),this.recordSolvedNodeStats(this.activeSubSolver,this.activeSubSolver.nodeWithPortPoints),this.recordResizeStats(this.activeSubSolver),this.activeSubSolver=null):this.activeSubSolver.failed\u0026\u0026(this.recordNodeSolveMetadata(this.activeSubSolver,\"failed\"),this.recordResizeStats(this.activeSubSolver),this.failedSolvers.push(this.activeSubSolver),this.activeSubSolver=null),void this.updateCacheStats();if(this.unsolvedNodePortPoints.length===0)return this.failedSolvers.length\u003e0?(this.solved=!1,this.failed=!0,this.error=`Failed to solve ${this.failedSolvers.length} nodes, ${this.failedSolvers.slice(0,5).map(n=\u003en.nodeWithPortPoints.capacityMeshNodeId)}. err0: ${this.failedSolvers[0].error}.`,void this.updateCacheStats()):(this.solved=!0,void this.updateCacheStats());const e={nodeWithPortPoints:this.unsolvedNodePortPoints.pop(),colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:this.effort,obstacles:this.obstacles,layerCount:this.layerCount,maxInnerIterationsPerGrowthAttempt:this.growShrinkMaxInnerIterationsPerGrowthAttempt,fallbackToInvalidGeometryOnFailure:this.growShrinkFallbackToInvalidGeometryOnFailure,growShrinkSolutionValidator:this.growShrinkSolutionValidator,captureSearchDebug:this.captureSearchDebug};this.activeSubSolver=this.useGrowShrinkHighDensityIntraNodeSolver?new U7e(e):new Vz(e),this.updateCacheStats()}updateCacheStats(){const e=tB();this.stats.intraNodeCacheHits=e.cacheHits,this.stats.intraNodeCacheMisses=e.cacheMisses}visualize(){let e={lines:[],points:[],rects:[],circles:[]};for(const n of this.routes){const o=Kse(n.route,n.connectionName,this.colorMap[n.connectionName]);for(const i of o)e.lines.push({points:i.points,label:wft(n.connectionName,n.rootConnectionName),strokeColor:i.z===0?i.color:Es(i.color,.5),layer:`z${i.z}`,strokeWidth:n.traceThickness,strokeDash:i.z!==0?[.1,.3]:void 0});for(const i of n.vias)e.circles.push({center:i,layer:\"z0,1\",radius:n.viaDiameter/2,fill:this.colorMap[n.connectionName],label:wft(n.connectionName,n.rootConnectionName,[\"via\"])})}if(this.solved||this.failed)for(const[n,o]of this.nodeSolveMetadataById){const i=o.node.center.x-o.node.width/2,r=o.node.center.x+o.node.width/2,s=o.node.center.y-o.node.height/2,a=o.node.center.y+o.node.height/2,A=this.createNodeMarkerLabel(n,o),c=o.status===\"solved\"?\"blue\":\"red\";if(e.lines.push({points:[{x:i,y:s},{x:r,y:s}],layer:\"hd_node_boundaries\",strokeColor:c,strokeDash:\"6, 4\",strokeWidth:.03,label:A},{points:[{x:r,y:s},{x:r,y:a}],layer:\"hd_node_boundaries\",strokeColor:c,strokeDash:\"6, 4\",strokeWidth:.03,label:A},{points:[{x:r,y:a},{x:i,y:a}],layer:\"hd_node_boundaries\",strokeColor:c,strokeDash:\"6, 4\",strokeWidth:.03,label:A},{points:[{x:i,y:a},{x:i,y:s}],layer:\"hd_node_boundaries\",strokeColor:c,strokeDash:\"6, 4\",strokeWidth:.03,label:A}),o.status===\"solved\")e.points.push({x:o.node.center.x,y:o.node.center.y,color:c,layer:\"hd_node_markers\",label:A});else{e.lines.push({points:[{x:0,y:0},{x:o.node.center.x,y:o.node.center.y}],layer:\"hd_failed_node_guides\",strokeColor:\"red\",strokeDash:\"8, 6\",strokeWidth:.05,label:A});const l=Math.max(.1*o.node.width,.12),u=Math.max(.1*o.node.height,.12);e.rects.push({center:o.node.center,layer:\"hd_node_markers\",width:l,height:u,fill:\"red\",label:A})}}return this.activeSubSolver\u0026\u0026(e=Il(e,this.activeSubSolver.visualize())),e}};function Pft(t,e){const n=[],o=e.filter(r=\u003er._containsTarget),i=new Map;for(const r of t.connections){const s=[];for(const a of r.pointsToConnect){let A=e[0],c=Number.MAX_VALUE;for(const l of o){const u=Math.sqrt((l.center.x-a.x)**2+(l.center.y-a.y)**2);u\u003cc\u0026\u0026(c=u,A=l)}s.push(A)}if(s.length\u003c2)throw new Error(`Not enough nodes for connection \"${r.name}\", only ${s.length} found`);i.set(r.name,s.map(a=\u003ea.capacityMeshNodeId)),n.push({connection:r,nodeIds:[s[0].capacityMeshNodeId,s[s.length-1].capacityMeshNodeId],straightLineDistance:no(s[0].center,s[s.length-1].center)})}return{unshuffledConnectionsWithResults:n,connectionNameToGoalNodeIds:i}}function Mft(t,e){const n=new Map(e.map(u=\u003e[u.capacityMeshNodeId,u])),o=e.map(u=\u003e(u.width+u.height)/2).filter(u=\u003eNumber.isFinite(u)\u0026\u0026u\u003e0),i=o.length\u003e0?o.reduce((u,g)=\u003eu+g,0)/o.length:1,r=e.filter(u=\u003eu._offBoardConnectionId),s=new Map,a=new Map,A=new Map;for(const u of e)a.set(u.capacityMeshNodeId,[]),A.set(u.capacityMeshNodeId,[]);for(const u of e)for(const g of u.portPoints){s.set(g.portPointId,g);for(const h of g.connectionNodeIds){const d=a.get(h);d\u0026\u0026!d.some(p=\u003ep.portPointId===g.portPointId)\u0026\u0026d.push(g)}}const{unshuffledConnectionsWithResults:c,connectionNameToGoalNodeIds:l}=Pft(t,e);return{nodeMap:n,avgNodePitch:i,offBoardNodes:r,portPointMap:s,nodePortPointsMap:a,nodeAssignedPortPoints:A,unshuffledConnectionsWithResults:c,connectionNameToGoalNodeIds:l}}var l7=(t,e=1,n={})=\u003e{const o=n.viaDiameter??.3,i=\"width\"in t?t.width:t,r=n.obstacleMargin??.2,s=\"height\"in t\u0026\u0026typeof t.height==\"number\"?t.height:i;if(!Number.isFinite(i)||!Number.isFinite(s)||i\u003c=0||s\u003c=0)return 0;const a=Math.min(i,s)/(o+r),A=(Math.sqrt(i*s)*Math.min(1.2,Math.max(.85,a**.05))/(o/2+r)/2)**1.1*e;return Number.isFinite(A)?t.availableZ?.length===1\u0026\u0026A\u003e1?1:A:0},$Q=(t,e=.5,n=16)=\u003e{let o=0,i=t;for(;o\u003cn\u0026\u0026!(l7({width:i})\u003c=e);)i/=2,o++;return Math.max(1,o)},wy=(t,e,n,o)=\u003e{if(t?._containsTarget)return 0;if((t.availableZ?.length??2)===1\u0026\u0026(e\u003e0||n\u003e0||o\u003e0))return 1;const i=((.82*e+.41*n+.2*o)/2)**1.1;if(!Number.isFinite(i))return 1;const r=l7(t);if(!Number.isFinite(r)||r\u003c=0)return i\u003e0?1:0;const s=i/r;if(Number.isNaN(s))throw new Error(\"calculateNodeProbabilityOfFailure returned NaN\");return Number.isFinite(s)?s:i\u003e0?1:0};function Dft(t,e,n){let o=0;const i=.99999;for(const r of t){const s=e.get(r.capacityMeshNodeId);if(!s||s._containsTarget)continue;const a=Wm(r),A=Math.min(wy(s,a.numSameLayerCrossings,a.numEntryExitLayerChanges,a.numTransitionPairCrossings),i);o+=Math.log(1-A)}return o}function Nft(t,e){if(e._containsTarget)return 0;const n=Wm(t);return wy(e,n.numSameLayerCrossings,n.numEntryExitLayerChanges,n.numTransitionPairCrossings)}function Rft(t,e,n,o,i){const r=n-e,s=i-o,a=1e-6;if(Math.abs(t.y-i)\u003ca)return t.x-e;if(Math.abs(t.x-n)\u003ca)return r+(i-t.y);if(Math.abs(t.y-o)\u003ca)return r+s+(n-t.x);if(Math.abs(t.x-e)\u003ca)return 2*r+s+(t.y-o);const A=Math.abs(t.y-i),c=Math.abs(t.x-n),l=Math.abs(t.y-o),u=Math.abs(t.x-e),g=Math.min(A,c,l,u);return g===A?Math.max(0,Math.min(r,t.x-e)):g===c?r+Math.max(0,Math.min(s,i-t.y)):g===l?r+s+Math.max(0,Math.min(r,n-t.x)):2*r+s+Math.max(0,Math.min(s,t.y-o))}var ZXn=1.6*3.2,Jz=(t,e)=\u003e{const n=Math.ceil(e/2),o=Math.min(t.width,t.height),i=Math.max(t.width,t.height),r=(Math.floor(o/1.6)+.1)*(Math.floor(i/3.2)+.1)/ZXn;return Math.min(1,n/r)};function K7e(t,e,n,o){const i=e.x-n/2,r=e.x+n/2,s=e.y-o/2,a=e.y+o/2,A=Math.abs(t.y-a),c=Math.abs(t.x-r),l=Math.abs(t.y-s),u=Math.abs(t.x-i),g=Math.min(A,c,l,u);return g\u003e.001?\"interior\":g===A?\"top\":g===c?\"right\":g===l?\"bottom\":\"left\"}function Tft(t,e,n,o,i){const r=K7e(t,n,o,i),s=K7e(e,n,o,i);return r!==\"interior\"\u0026\u0026r===s}function kft(t,e,n,o,i){const r=K7e(t,n,o,i);let s;if(r===\"top\"||r===\"bottom\"){const c=o;s=Math.abs(e.x-t.x)/c}else{const c=i;s=Math.abs(e.y-t.y)/c}s=Math.min(1,Math.max(0,s));const a=(t.x+e.x)/2,A=(t.y+e.y)/2;return{x:a+(n.x-a)*s,y:A+(n.y-A)*s}}function oae(t){return\"computeNodePf\"in t\u0026\u0026typeof t.computeNodePf==\"function\"}function V7e(t){const e={lines:[],points:[],rects:[],circles:[]};for(const o of t.inputNodes){let i=0,r=0,s={numSameLayerCrossings:0,numEntryExitLayerChanges:0,numTransitionPairCrossings:0},a=0;if(oae(t)){i=t.computeNodePf(o),r=t.nodeMemoryPfMap.get(o.capacityMeshNodeId)??0;const u=t.buildNodeWithPortPointsForCrossing(o);s=Wm(u);const g=new Set,h=t.nodeAssignedPortPoints.get(o.capacityMeshNodeId)??[];for(const d of h)d.connectionName\u0026\u0026g.add(d.connectionName);a=g.size}else{i=t.nodePfMap.get(o.capacityMeshNodeId)??0;const u=t.nodeAssignedPortPoints.get(o.capacityMeshNodeId)??[],g={capacityMeshNodeId:o.capacityMeshNodeId,center:o.center,width:o.width,height:o.height,portPoints:u,availableZ:o.availableZ};s=Wm(g);const h=new Set;for(const d of u)d.connectionName\u0026\u0026h.add(d.connectionName);a=h.size}const A=Math.min(255,Math.floor(512*i)),c=Math.max(0,255-Math.floor(512*i));let l=`rgba(${A}, ${c}, ${c}, ${i\u003c.001?\"0.1\":\"0.3\"})`;o._containsObstacle\u0026\u0026(l=\"rgba(255, 0, 0, 0.3)\"),o._offBoardConnectedCapacityMeshNodeIds?.length\u0026\u0026(l=\"rgba(255, 165, 0, 0.3)\"),e.rects.push({center:o.center,width:o.width-.2,height:o.height-.2,layer:`z${o.availableZ.join(\",\")}`,fill:l,label:`${o.capacityMeshNodeId}\npf: ${i.toFixed(3)}, memPf: ${r.toFixed(3)}\nC#: ${a}\nxSame: ${s.numSameLayerCrossings}, xLC: ${s.numEntryExitLayerChanges}, xTransition: ${s.numTransitionPairCrossings}\nobCmid: ${o._offBoardConnectedCapacityMeshNodeIds?.join(\",\")}\nobs: ${o._containsObstacle?\"yes\":\"no\"}`})}if(oae(t))for(const[o,i]of t.portPointMap){const r=t.assignedPortPoints.get(o),s=r?t.colorMap[r.connectionName]??\"blue\":\"rgba(150, 150, 150, 0.5)\";e.circles.push({center:{x:i.x,y:i.y},radius:.05,fill:s,layer:`z${i.z}`,label:[o,`conn: ${r?.connectionName}`,`cd: ${i.distToCentermostPortOnZ}`,`connects: ${i.connectionNodeIds.join(\",\")}`,`rootConn: ${r?.rootConnectionName}`].filter(Boolean).join(`\n`)})}const n=oae(t)?t.connectionsWithResults:t.connectionResults;for(const o of n){if(!o.path)continue;const i=o.connection,r=t.colorMap[i.name]??\"blue\",s=[];for(const a of o.path)s.push({x:a.point.x,y:a.point.y,z:a.z,nodeId:a.currentNodeId});for(let a=0;a\u003cs.length-1;a++){const A=s[a],c=s[a+1],l=A.z===c.z,u=A.z;let g;g=l?u===0?void 0:\"10 5\":\"3 3 10\";const h=A.nodeId?t.nodeMap.get(A.nodeId):null;if(h\u0026\u0026Tft(A,c,h.center,h.width,h.height)){const d=kft(A,c,h.center,h.width,h.height);e.lines.push({points:[{x:A.x,y:A.y},{x:d.x,y:d.y}],strokeColor:r,strokeDash:g}),e.lines.push({points:[{x:d.x,y:d.y},{x:c.x,y:c.y}],strokeColor:r,strokeDash:g})}else e.lines.push({points:[{x:A.x,y:A.y},{x:c.x,y:c.y}],strokeColor:r,strokeDash:g})}}if(oae(t)\u0026\u0026!t.solved\u0026\u0026t.candidates\u0026\u0026t.candidates.length\u003e0){const o=t.currentConnection,i=o?t.colorMap[o.connection.name]??\"blue\":\"blue\";if(o){const[s,a]=o.nodeIds,A=t.nodeMap.get(s),c=t.nodeMap.get(a),l=o.connection.pointsToConnect[0],u=o.connection.pointsToConnect[o.connection.pointsToConnect.length-1];if(A\u0026\u0026c){const g=l?{x:l.x,y:l.y}:A.center,h=u?{x:u.x,y:u.y}:c.center;e.lines.push({points:[g,h],strokeColor:Es(i,.5),strokeDash:\"5 5\"}),e.points.push({x:g.x,y:g.y,color:i,label:[`Start: ${o.connection.name}`,`${o.connection.__rootConnectionNames?.[0]}`].join(`\n`)}),e.points.push({x:h.x,y:h.y,color:i,label:[`End: ${o.connection.name}`,`${o.connection.__rootConnectionNames?.[0]}`].join(`\n`)}),e.circles.push({center:h,radius:.08,stroke:i,label:`Goal: ${o.connection.name}`})}}const r=[...t.candidates].sort((s,a)=\u003es.f-a.f).slice(0,1);for(const s of r){const a=[];let A=s;for(;A;)a.unshift({x:A.point.x,y:A.point.y,z:A.z,lastMoveWasOffBoard:A.lastMoveWasOffBoard,nodeId:A.currentNodeId}),A=A.prevCandidate;for(let c=0;c\u003ca.length-1;c++){const l=a[c],u=a[c+1],g=l.z===u.z,h=l.z;let d;d=u.lastMoveWasOffBoard?\"2 2\":g?h===0?void 0:\"10 5\":\"3 3 10\";const p=l.nodeId?t.nodeMap.get(l.nodeId):null,m=.02*l.z;if(p\u0026\u0026Tft(l,u,p.center,p.width,p.height)){const _=kft(l,u,p.center,p.width,p.height);e.lines.push({points:[{x:l.x+m,y:l.y+m},{x:_.x+m,y:_.y+m}],strokeColor:Es(i,.25),strokeDash:d}),e.lines.push({points:[{x:_.x+m,y:_.y+m},{x:u.x+m,y:u.y+m}],strokeColor:Es(i,.25),strokeDash:d})}else e.lines.push({points:[{x:l.x+m,y:l.y+m},{x:u.x+m,y:u.y+m}],strokeColor:Es(i,.25),strokeDash:d})}if(a.length\u003e=1){const c=a[a.length-1];let l=0,u=0,g=0,h=0,d=0,p=0;const m=t.nodeMap.get(s.prevCandidate?.currentNodeId);if(m\u0026\u0026s.prevCandidate\u0026\u0026s.portPoint\u0026\u0026o){const S=o.connection.name,Q={x:s.prevCandidate.point.x,y:s.prevCandidate.point.y,z:s.prevCandidate.z,connectionName:S},w={x:s.portPoint.x,y:s.portPoint.y,z:s.portPoint.z,connectionName:S},M=t.buildNodeWithPortPointsForCrossing(m,[Q,w]),k=sft(M);g=k.numSameLayerCrossings,h=k.numTransitionPairCrossings,d=k.numEntryExitLayerChanges;const R=t.capacityMeshNodeMap.get(m.capacityMeshNodeId);R\u0026\u0026(u=t.JUMPER_PF_FN_ENABLED\u0026\u0026m.availableZ.length===1?Jz(R,g):wy(R,g,d,h),l=u**2*t.NODE_PF_FACTOR),p=s.prevCandidate.g\u003e0?s.g-s.prevCandidate.g:s.g}if(!o)continue;const[_,f]=o.nodeIds,I=t.nodeMap.get(f),C=I?Math.sqrt((c.x-I.center.x)**2+(c.y-I.center.y)**2):0,y=t.avgNodePitch\u003e0?C/t.avgNodePitch:0,x=y*t.BASE_CANDIDATE_COST,E=t.nodeMemoryPfMap.get(s.currentNodeId)??0,B=-Math.log(1-E)*t.MEMORY_PF_FACTOR;e.circles.push({center:c,radius:.03,fill:Es(i,.25),layer:`z${s.z}`,label:[`f: ${s.f.toFixed(2)}`,`g: ${s.g.toFixed(2)} (nodeDelta: ${p.toFixed(2)})`,`h: ${s.h.toFixed(2)}`,` dist: ${C.toFixed(2)}`,` estHops: ${y.toFixed(1)}`,` estStepCost: ${x.toFixed(2)}`,` memRiskCost: ${B.toFixed(2)}`,`z: ${s.z}`,`node: ${s.currentNodeId}`,`Cost(Pf): ${l.toFixed(3)}`,`Pf: ${u.toFixed(3)}`,`xSame: ${g}, xTrans: ${h}, xLC: ${d}`,`routeOffBoard=${t.currentConnectionShouldRouteOffBoard}`,`offBoardTouched=${s.hasTouchedOffBoardNode??!1}`,`lastMoveWasOffBoard=${s.lastMoveWasOffBoard??!1}`].join(`\n`)})}}}return e}function Fft(t,e,n){let o=0;const i=.99999;for(const r of t){const s=e.get(r.capacityMeshNodeId);if(!s||s._containsTarget)continue;const a=Wm(r),A=Math.min(Jz(s,a.numSameLayerCrossings),i);o+=Math.log(1-A)}return o}var eZn=class extends yr{constructor(e){super(),this.input=e;const{simpleRouteJson:n,capacityMeshNodes:o,inputNodes:i,colorMap:r,nodeMemoryPfMap:s,hyperParameters:a,precomputedInitialParams:A,fixedRoutes:c}=e;if(this.input=structuredClone(e),this.MAX_ITERATIONS=1e8,this.simpleRouteJson=n,this.inputNodes=i,this.colorMap=r??{},this.capacityMeshNodeMap=new Map(o.map(l=\u003e[l.capacityMeshNodeId,l])),this.nodeMemoryPfMap=s??new Map,this.hyperParameters=a??{},A){this.nodeMap=A.nodeMap,this.avgNodePitch=A.avgNodePitch,this.offBoardNodes=A.offBoardNodes,this.portPointMap=A.portPointMap,this.nodePortPointsMap=A.nodePortPointsMap,this.connectionNameToGoalNodeIds=A.connectionNameToGoalNodeIds;const{nodeAssignedPortPoints:l}=(function(u){const g=new Map;for(const[h,d]of u.nodeAssignedPortPoints)g.set(h,[...d]);return{nodeAssignedPortPoints:g}})(A);this.nodeAssignedPortPoints=l,this.connectionsWithResults=D5(structuredClone(A.unshuffledConnectionsWithResults),this.hyperParameters.SHUFFLE_SEED??0)}else{this.nodeMap=new Map(i.map(h=\u003e[h.capacityMeshNodeId,h]));const l=i.map(h=\u003e(h.width+h.height)/2).filter(h=\u003eNumber.isFinite(h)\u0026\u0026h\u003e0);this.avgNodePitch=l.length\u003e0?l.reduce((h,d)=\u003eh+d,0)/l.length:1,this.offBoardNodes=i.filter(h=\u003eh._offBoardConnectionId),this.portPointMap=new Map,this.nodePortPointsMap=new Map;for(const h of i)this.nodePortPointsMap.set(h.capacityMeshNodeId,[]),this.nodeAssignedPortPoints.set(h.capacityMeshNodeId,[]);for(const h of i)for(const d of h.portPoints){this.portPointMap.set(d.portPointId,d);for(const p of d.connectionNodeIds){const m=this.nodePortPointsMap.get(p);m\u0026\u0026!m.some(_=\u003e_.portPointId===d.portPointId)\u0026\u0026m.push(d)}}const{connectionsWithResults:u,connectionNameToGoalNodeIds:g}=this.getConnectionsWithNodes();this.connectionsWithResults=u,this.connectionNameToGoalNodeIds=g}if(c\u0026\u0026c.length\u003e0){for(const l of c)if(this.connectionsWithResults.push(l),l.portPoints)for(const u of l.portPoints)u.portPointId\u0026\u0026this.assignedPortPoints.set(u.portPointId,{connectionName:u.connectionName,rootConnectionName:u.rootConnectionName})}for(const l of this.connectionsWithResults)l.path?this.processedConnectionQueue.push(l):this.unprocessedConnectionQueue.push(l);this.totalConnectionCount=this.connectionsWithResults.length}input;getSolverName(){return\"PortPointPathingSolver\"}hyperParameters;simpleRouteJson;inputNodes;nodeMap;nodePortPointsMap;portPointMap;connectionsWithResults=[];failedConnection=null;assignedPortPoints=new Map;nodeAssignedPortPoints=new Map;PORT_POINT_REUSE_FACTOR=1e3;BASE_COST_FOR_NOT_GOING_OFF_BOARD=100;get NODE_PF_FACTOR(){return this.hyperParameters.NODE_PF_FACTOR??50}get RANDOM_WALK_DISTANCE(){return this.hyperParameters.RANDOM_WALK_DISTANCE??0}get MEMORY_PF_FACTOR(){return this.hyperParameters.MEMORY_PF_FACTOR??0}get CENTER_OFFSET_FOCUS_SHIFT(){return this.hyperParameters.CENTER_OFFSET_FOCUS_SHIFT??0}get RANDOM_COST_MAGNITUDE(){return this.hyperParameters.RANDOM_COST_MAGNITUDE??0}get BASE_CANDIDATE_COST(){return this.hyperParameters.BASE_CANDIDATE_COST??0}get NODE_PF_MAX_PENALTY(){return this.hyperParameters.NODE_PF_MAX_PENALTY??1e4}get FORCE_CENTER_FIRST(){return this.hyperParameters.FORCE_CENTER_FIRST??!0}get FORCE_OFF_BOARD_FREQUENCY(){return this.offBoardNodes.length===0?0:this.hyperParameters.FORCE_OFF_BOARD_FREQUENCY??0}get FORCE_OFF_BOARD_SEED(){return this.hyperParameters.FORCE_OFF_BOARD_SEED??0}get NODE_MAX_PF(){return Math.min(.99999,1-Math.exp(-this.NODE_PF_MAX_PENALTY))}get CENTER_OFFSET_DIST_PENALTY_FACTOR(){return this.hyperParameters.CENTER_OFFSET_DIST_PENALTY_FACTOR??0}get STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR(){return this.hyperParameters.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR??0}colorMap;get GREEDY_MULTIPLIER(){return this.hyperParameters.GREEDY_MULTIPLIER??1.3}MAX_CANDIDATES_IN_MEMORY=5e3;get MAX_ITERATIONS_PER_PATH(){return this.hyperParameters.MAX_ITERATIONS_PER_PATH??1e4}ITERATIONS_PER_MM_FOR_PATH=30;BASE_ITERATIONS_PER_PATH=1e4;get RIPPING_ENABLED(){return this.hyperParameters.RIPPING_ENABLED??!1}get RIPPING_PF_THRESHOLD(){const e=this.hyperParameters.START_RIPPING_PF_THRESHOLD,n=this.hyperParameters.END_RIPPING_PF_THRESHOLD;if(e!==void 0\u0026\u0026n!==void 0){const o=this.MAX_RIPS;return e+(o\u003e0?this.totalRipCount/o:0)*(n-e)}return this.hyperParameters.RIPPING_PF_THRESHOLD??.3}get MAX_RIPS(){return this.hyperParameters.MAX_RIPS??100}get RANDOM_RIP_FRACTION(){return this.hyperParameters.RANDOM_RIP_FRACTION??0}get JUMPER_PF_FN_ENABLED(){return this.hyperParameters.JUMPER_PF_FN_ENABLED??!1}jumpersPerMmSquared=.1;testedRipConnections=new Map;totalRipCount=0;get MIN_ALLOWED_BOARD_SCORE(){return this.hyperParameters.MIN_ALLOWED_BOARD_SCORE??-1e4}nodeMemoryPfMap;unprocessedConnectionQueue=[];processedConnectionQueue=[];currentConnection=null;totalConnectionCount=0;currentPathIterations=0;candidates;visitedPortPoints;connectionNameToGoalNodeIds;capacityMeshNodeMap;avgNodePitch;currentConnectionShouldRouteOffBoard=!1;activeCandidateStraightLineDistance;offBoardNodes=[];baseNodeCostCache=new Map;getConstructorParams(){return this.input}clearCostCaches(){this.baseNodeCostCache.clear()}clampPf(e){return Number.isFinite(e)?Math.min(Math.max(e,0),.999999):.999999}pfToFailureCost(e){const n=this.clampPf(e);return n\u003e=this.NODE_MAX_PF?this.NODE_PF_MAX_PENALTY:-Math.log(1-n)}getBaseNodeFailureCost(e){const n=this.baseNodeCostCache.get(e);if(n!=null)return n;const o=this.nodeMap.get(e);if(!o)return 0;const i=this.computeNodePf(o),r=this.pfToFailureCost(i);return this.baseNodeCostCache.set(e,r),r}computeBoardScore(){const e=this.getNodesWithPortPoints();return this.JUMPER_PF_FN_ENABLED?Fft(e,this.capacityMeshNodeMap):Dft(e,this.capacityMeshNodeMap)}getMaxIterationsForCurrentPath(){const e=this.activeCandidateStraightLineDistance??0;return Math.min(this.BASE_ITERATIONS_PER_PATH+this.ITERATIONS_PER_MM_FOR_PATH*e,this.MAX_ITERATIONS_PER_PATH)}getNodeDeltaFailureCostForSegment(e,n,o){const i=this.nodeMap.get(e);if(!i)return 0;const r=this.getBaseNodeFailureCost(e),s=this.computeNodePf(i,[n,o]),a=this.pfToFailureCost(s),A=Math.max(0,a-r);return s\u003e=this.NODE_MAX_PF?this.NODE_PF_MAX_PENALTY:A*this.NODE_PF_FACTOR}getConnectionsWithNodes(){const{unshuffledConnectionsWithResults:e,connectionNameToGoalNodeIds:n}=Pft(this.simpleRouteJson,this.inputNodes);return{connectionsWithResults:D5(e,this.hyperParameters.SHUFFLE_SEED??0),connectionNameToGoalNodeIds:n}}buildNodeWithPortPointsForCrossing(e,n){const o=this.nodeAssignedPortPoints.get(e.capacityMeshNodeId)??[],i=n?[...o,...n]:o;return{capacityMeshNodeId:e.capacityMeshNodeId,center:e.center,width:e.width,height:e.height,portPoints:i,availableZ:e.availableZ}}computeNodePf(e,n){if(e._containsTarget)return 0;const o=this.buildNodeWithPortPointsForCrossing(e,n),i=Wm(o);return this.JUMPER_PF_FN_ENABLED\u0026\u0026e.availableZ.length===1?Jz(this.capacityMeshNodeMap.get(e.capacityMeshNodeId),i.numSameLayerCrossings):wy(this.capacityMeshNodeMap.get(e.capacityMeshNodeId),i.numSameLayerCrossings,i.numEntryExitLayerChanges,i.numTransitionPairCrossings)}getPortPointReusePenalty(e,n){const o=this.assignedPortPoints.get(e);return o?n===o.rootConnectionName?0:this.PORT_POINT_REUSE_FACTOR:0}getOtherNodeId(e,n){const[o,i]=e.connectionNodeIds;return o===n?i:i===n?o:null}computeG(e,n,o,i,r){const s=e.currentNodeId,a=e.point,A={x:a.x,y:a.y,z:e.z,connectionName:i,rootConnectionName:r},c={x:n.x,y:n.y,z:n.z,connectionName:i,rootConnectionName:r},l=this.getNodeDeltaFailureCostForSegment(s,A,c);return e.g+l}computeGToEndTarget(e,n,o,i){const r=e.currentNodeId,s={x:e.point.x,y:e.point.y,z:e.z,connectionName:o,rootConnectionName:i},a={x:n.x,y:n.y,z:e.z,connectionName:o,rootConnectionName:i},A=this.getNodeDeltaFailureCostForSegment(r,s,a);return e.g+A}computeDistanceToNearestOffBoardNode(e){if(this.offBoardNodes.length===0)return 1/0;let n=1/0;for(const o of this.offBoardNodes){const i=no(e,o.center);i\u003cn\u0026\u0026(n=i)}return n}computeH(e,n,o,i,r,s){if(this.RANDOM_WALK_DISTANCE\u003e0\u0026\u0026r\u003cthis.RANDOM_WALK_DISTANCE)return 0;if(this.currentConnectionShouldRouteOffBoard\u0026\u0026!s)return this.BASE_COST_FOR_NOT_GOING_OFF_BOARD+this.computeDistanceToNearestOffBoardNode(e);const a=this.nodeMap.get(o);if(!a)return 0;const A=no(e,a.center),c=this.avgNodePitch\u003e0?A/this.avgNodePitch:0,l=this.clampPf(this.nodeMemoryPfMap.get(n)??0),u=this.pfToFailureCost(l)*this.MEMORY_PF_FACTOR,g=c*this.BASE_CANDIDATE_COST,h=this.CENTER_OFFSET_DIST_PENALTY_FACTOR*e.distToCentermostPortOnZ**2;let d=0;if(this.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR\u003e0\u0026\u0026this.currentConnection){const p=wc(e,this.currentConnection.connection.pointsToConnect[0],this.currentConnection.connection.pointsToConnect[1]);d=this.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR*p}return A+g+u+h+d}getVisitedPortPointKey(e,n){return this.currentConnectionShouldRouteOffBoard\u0026\u0026n?`${e}:touched_off_board`:e}getAvailableExitPortPoints(e,n){const o=this.currentConnection?.connection.__rootConnectionNames?.[0],i=this.nodePortPointsMap.get(e)??[],r=[];for(const s of i){const a=this.getVisitedPortPointKey(s.portPointId,n);if(this.visitedPortPoints?.has(a))continue;const A=this.assignedPortPoints.get(s.portPointId);A\u0026\u0026A?.rootConnectionName!==o||r.push(s)}return r}getAvailableExitPortPointsWithOmissions(e,n,o){const i=this.nodePortPointsMap.get(e)??[],r=this.currentConnection?.connection.__rootConnectionNames?.[0],s=new Map;for(const A of i){const c=this.getVisitedPortPointKey(A.portPointId,o);if(this.visitedPortPoints?.has(c))continue;const l=this.getOtherNodeId(A,e);if(!l)continue;this.nodeMap.get(l);const u=`${l}|${A.z}`,g=s.get(u)??[];g.push(A),s.set(u,g)}const a=[];for(const[,A]of s){A.sort((p,m)=\u003ep.distToCentermostPortOnZ-m.distToCentermostPortOnZ);const c=A[0];if(!c)continue;const l=this.assignedPortPoints.get(c.portPointId),u=l\u0026\u0026l.rootConnectionName===r;if(!l||u){a.push(c);continue}const g=[...A].sort((p,m)=\u003ep.x!==m.x?p.x-m.x:p.y-m.y),h=[];let d=[];for(const p of g){const m=this.assignedPortPoints.get(p.portPointId);!m||m.rootConnectionName===r?d.push(p):d.length\u003e0\u0026\u0026(h.push(d),d=[])}d.length\u003e0\u0026\u0026h.push(d);for(const p of h){const m=Math.floor(p.length/2);a.push(p[m])}}return a}getAvailableExitPortPointsForOffboardConnection(e,n){const o=this.nodeMap.get(e);if(!o)return[];const i=this.currentConnection?.connection.__rootConnectionNames?.[0],r=[];for(const s of o?._offBoardConnectedCapacityMeshNodeIds??[]){if(s===e||!this.nodeMap.get(s))continue;const a=this.nodePortPointsMap.get(s)??[];for(const A of a){const c=this.getVisitedPortPointKey(A.portPointId,n);if(this.visitedPortPoints?.has(c))continue;const l=this.assignedPortPoints.get(A.portPointId);l\u0026\u0026l.rootConnectionName!==i||r.push({...A,throughNodeId:s})}}return r}canTravelThroughObstacle(e,n,o){return this.connectionNameToGoalNodeIds.get(n)?.includes(e.capacityMeshNodeId)||!!e._offBoardConnectionId}isAtEndGoal(e,n){return e===n}getBacktrackedPath(e){const n=[];let o=e;for(;o;){if(o.lastMoveWasOffBoard\u0026\u0026o.throughNodeId){const i=this.nodeMap.get(o.throughNodeId),r=o.prevCandidate?this.nodeMap.get(o.prevCandidate.currentNodeId):null;n.push(o),i\u0026\u0026n.push({prevCandidate:null,portPoint:null,currentNodeId:o.throughNodeId,point:i.center,z:o.z,f:0,g:0,h:0,distanceTraveled:0}),r\u0026\u0026r._offBoardConnectionId\u0026\u0026n.push({prevCandidate:null,portPoint:null,currentNodeId:o.prevCandidate.currentNodeId,point:r.center,z:o.z,f:0,g:0,h:0,distanceTraveled:0})}else n.push(o);o=o.prevCandidate}return n.reverse()}assignPortPointsForPath(e,n,o){const i=[];for(let A=0;A\u003ce.length;A++){const c=e[A];if(!c.portPoint){const g=A===0,h=A===e.length-1;if(!g\u0026\u0026!h){const d={x:c.point.x,y:c.point.y,z:c.z,connectionName:n,rootConnectionName:o};i.push(d);const p=this.nodeAssignedPortPoints.get(c.currentNodeId)??[];p.push(d),this.nodeAssignedPortPoints.set(c.currentNodeId,p)}continue}const l=c.portPoint;this.assignedPortPoints.set(l.portPointId,{connectionName:n,rootConnectionName:o});const u={portPointId:l.portPointId,x:l.x,y:l.y,z:l.z,connectionName:n,rootConnectionName:o,prevPortPointId:l.prevPortPointId,nextPortPointId:l.nextPortPointId};i.push(u);for(const g of l.connectionNodeIds){const h=this.nodeAssignedPortPoints.get(g)??[];h.push(u),this.nodeAssignedPortPoints.set(g,h)}}const r=i.map(A=\u003eA.portPointId).filter(A=\u003e!!A);let s=0;for(const A of i)A.portPointId\u0026\u0026(A.prevPortPointId=r[s-1],A.nextPortPointId=r[s+1],s+=1);const a=Array.from(new Set(e.map(A=\u003eA.currentNodeId)));for(const A of a){const c=this.nodeMap.get(A);if(c\u0026\u0026c._offBoardConnectionId)for(const l of c?._offBoardConnectedCapacityMeshNodeIds??[]){const u=this.nodePortPointsMap.get(l)??[];for(const g of u)this.assignedPortPoints.set(g.portPointId,{connectionName:n,rootConnectionName:o})}}return i}addTargetPointsToNodes(e,n){const o=e[0],i=e[e.length-1],r=n.pointsToConnect[0],s=n.pointsToConnect[n.pointsToConnect.length-1];if(o\u0026\u0026r){const a=this.nodeAssignedPortPoints.get(o.currentNodeId)??[];a.push({x:r.x,y:r.y,z:o.z,connectionName:n.name,rootConnectionName:n.__rootConnectionNames?.[0]}),this.nodeAssignedPortPoints.set(o.currentNodeId,a)}if(i\u0026\u0026s){const a=this.nodeAssignedPortPoints.get(i.currentNodeId)??[];a.push({x:s.x,y:s.y,z:i.z,connectionName:n.name,rootConnectionName:n.__rootConnectionNames?.[0]}),this.nodeAssignedPortPoints.set(i.currentNodeId,a)}}isPortPointInPathChain(e,n){let o=e;for(;o;){if(o.portPoint?.portPointId===n)return!0;o=o.prevCandidate}return!1}isNodeInPathChain(e,n){let o=e;for(;o;){if(o.currentNodeId===n)return!0;o=o.prevCandidate}return!1}_step(){if(this.currentConnection||(this.currentConnection=this.unprocessedConnectionQueue.shift()??null),!this.currentConnection){const h=this.computeBoardScore();return this.stats={boardScore:h,totalRipCount:this.totalRipCount},h\u003cthis.MIN_ALLOWED_BOARD_SCORE?(this.failedConnection=null,this.failed=!0,void(this.error=`Board score ${h.toFixed(2)} is less than MIN_ALLOWED_BOARD_SCORE ${this.MIN_ALLOWED_BOARD_SCORE.toFixed(2)}`)):void(this.solved=!0)}const e=this.currentConnection;this.activeCandidateStraightLineDistance=e.straightLineDistance,this.currentPathIterations++;const n=this.getMaxIterationsForCurrentPath();if(this.currentPathIterations\u003en)return this.failedConnection=e,this.processedConnectionQueue.push(e),this.currentConnection=null,this.candidates=null,this.visitedPortPoints=null,this.currentPathIterations=0,this.failed=!0,void(this.error=`Exceeded max iterations for path (${n}) on connection ${e.connection.name}`);const[o,i]=e.nodeIds,r=this.nodeMap.get(o),s=this.nodeMap.get(i);if(!r||!s)return this.processedConnectionQueue.push(e),this.currentConnection=null,void(this.currentPathIterations=0);const a=e.connection.name,A=e.connection.__rootConnectionNames?.[0],c=e.connection.pointsToConnect[0];if(!this.candidates){if(this.clearCostCaches(),this.FORCE_OFF_BOARD_FREQUENCY\u003e0){const h=M7e(17*(this.hyperParameters.SHUFFLE_SEED??0)+this.FORCE_OFF_BOARD_SEED+this.processedConnectionQueue.length);this.currentConnectionShouldRouteOffBoard=h()\u003cthis.FORCE_OFF_BOARD_FREQUENCY}else this.currentConnectionShouldRouteOffBoard=!1;this.candidates=[],this.visitedPortPoints=new Set;for(const h of r.availableZ){const d=c?{x:c.x,y:c.y}:r.center,p={portPointId:`start:${o}:${h}`,x:d.x,y:d.y,z:h,connectionNodeIds:[o,o],distToCentermostPortOnZ:0},m=this.computeH(p,o,i,h,0,!1),_=0+m*this.GREEDY_MULTIPLIER;this.candidates.push({prevCandidate:null,portPoint:null,currentNodeId:o,point:d,z:h,f:_,g:0,h:m,distanceTraveled:0,hasTouchedOffBoardNode:!1})}}this.candidates.sort((h,d)=\u003eh.f-d.f);let l,u=this.candidates.shift();for(;u?.portPoint\u0026\u0026this.visitedPortPoints;){const h=this.getVisitedPortPointKey(u.portPoint.portPointId,u.hasTouchedOffBoardNode);if(!this.visitedPortPoints.has(h))break;u=this.candidates.shift()}if(this.candidates.length\u003ethis.MAX_CANDIDATES_IN_MEMORY\u0026\u0026this.candidates.splice(this.MAX_CANDIDATES_IN_MEMORY,this.candidates.length-this.MAX_CANDIDATES_IN_MEMORY),!u)return this.error=`Ran out of candidates on connection ${a}`,this.failedConnection=e,this.processedConnectionQueue.push(e),this.currentConnection=null,this.candidates=null,this.visitedPortPoints=null,this.currentPathIterations=0,void(this.failed=!0);if(u.portPoint\u0026\u0026this.visitedPortPoints){const h=this.getVisitedPortPointKey(u.portPoint.portPointId,u.hasTouchedOffBoardNode);this.visitedPortPoints.add(h)}if(this.isAtEndGoal(u.currentNodeId,i)){const h=e.connection.pointsToConnect[e.connection.pointsToConnect.length-1],d=h?{x:h.x,y:h.y}:s.center,p=this.computeGToEndTarget(u,d,a,A),m={prevCandidate:u,portPoint:null,currentNodeId:i,point:d,z:u.z,g:p,h:0,f:p,distanceTraveled:u.distanceTraveled+no(u.point,d)},_=this.getBacktrackedPath(m);return e.path=_,e.portPoints=this.assignPortPointsForPath(_,a,A),this.addTargetPointsToNodes(_,e.connection),this.clearCostCaches(),this.RIPPING_ENABLED\u0026\u0026this.processRippingForPath(_,a),this.processedConnectionQueue.push(e),this.currentConnection=null,this.progress=this.processedConnectionQueue.length/this.totalConnectionCount,this.candidates=null,this.visitedPortPoints=null,void(this.currentPathIterations=0)}const g=this.nodeMap.get(u.currentNodeId);l=g?._offBoardConnectionId?this.getAvailableExitPortPointsForOffboardConnection(u.currentNodeId,u.hasTouchedOffBoardNode):this.FORCE_CENTER_FIRST?this.getAvailableExitPortPointsWithOmissions(u.currentNodeId,i,u.hasTouchedOffBoardNode):this.getAvailableExitPortPoints(u.currentNodeId,u.hasTouchedOffBoardNode);for(const h of l){if(this.isPortPointInPathChain(u,h.portPointId)||this.visitedPortPoints?.has(h.portPointId))continue;const d=this.getOtherNodeId(h,h.throughNodeId??u.currentNodeId);if(!d||this.isNodeInPathChain(u,d))continue;const p=\"throughNodeId\"in h?h.throughNodeId:void 0,m=p?this.nodeMap.get(p):null,_=this.nodeMap.get(d);if(!_||_._containsObstacle\u0026\u0026!this.canTravelThroughObstacle(_,a,A))continue;const f=this.computeG(u,h,d,a,A);if(!this.RIPPING_ENABLED\u0026\u0026f\u003e-this.MIN_ALLOWED_BOARD_SCORE)continue;const I=u.distanceTraveled+no(u.point,h),C=u.hasTouchedOffBoardNode||!!_._offBoardConnectionId,y=this.computeH(h,d,i,h.z,I,C),x=f+y*this.GREEDY_MULTIPLIER,E=!!g?._offBoardConnectionId\u0026\u0026!!m?._offBoardConnectionId;this.candidates.push({prevCandidate:u,portPoint:h,currentNodeId:d,point:{x:h.x,y:h.y},z:h.z,f:x,g:f,h:y,distanceTraveled:I,lastMoveWasOffBoard:E,throughNodeId:E?p:void 0,hasTouchedOffBoardNode:C||!!_._offBoardConnectionId||!!g?._offBoardConnectionId})}}getNodesWithPortPoints(){const e=[];for(const n of this.inputNodes){const o=this.nodeAssignedPortPoints.get(n.capacityMeshNodeId)??[];o.length\u003e0\u0026\u0026e.push({capacityMeshNodeId:n.capacityMeshNodeId,center:n.center,width:n.width,height:n.height,portPoints:o,availableZ:n.availableZ})}return e}getConnectionsInNode(e,n){const o=[],i=new Set;for(const r of this.connectionsWithResults)if(r.path\u0026\u0026r.connection.name!==n\u0026\u0026!i.has(r.connection.name)){for(const s of r.path)if(s.currentNodeId===e){o.push(r),i.add(r.connection.name);break}}return o}computeNodePfWithoutConnection(e,n){if(e._containsTarget)return{pf:0,totalCrossings:0};const o=(this.nodeAssignedPortPoints.get(e.capacityMeshNodeId)??[]).filter(a=\u003ea.connectionName!==n),i={capacityMeshNodeId:e.capacityMeshNodeId,center:e.center,width:e.width,height:e.height,portPoints:o,availableZ:e.availableZ},r=Wm(i),s=r.numSameLayerCrossings+r.numEntryExitLayerChanges+r.numTransitionPairCrossings;return{pf:wy(this.capacityMeshNodeMap.get(e.capacityMeshNodeId),r.numSameLayerCrossings,r.numEntryExitLayerChanges,r.numTransitionPairCrossings),totalCrossings:s}}computeNodeCrossings(e){if(e._containsTarget)return 0;const n=this.buildNodeWithPortPointsForCrossing(e),o=Wm(n);return o.numSameLayerCrossings+o.numEntryExitLayerChanges+o.numTransitionPairCrossings}ripConnection(e){const n=e.connection.name;for(const[o,i]of this.assignedPortPoints.entries())i.connectionName===n\u0026\u0026this.assignedPortPoints.delete(o);for(const[o,i]of this.nodeAssignedPortPoints.entries()){const r=i.filter(s=\u003es.connectionName!==n);this.nodeAssignedPortPoints.set(o,r)}e.path=void 0,e.portPoints=void 0}requeueConnection(e){this.totalRipCount++;const n=this.processedConnectionQueue.indexOf(e);if(n!==-1)return this.processedConnectionQueue.splice(n,1),this.unprocessedConnectionQueue.push(e),!0;const o=this.unprocessedConnectionQueue.indexOf(e);return o!==-1\u0026\u0026(this.unprocessedConnectionQueue.splice(o,1),this.unprocessedConnectionQueue.unshift(e)),!0}processRippingForPath(e,n){const o=Array.from(new Set(e.map(r=\u003er.currentNodeId)));let i=!1;for(const r of o){if(this.totalRipCount\u003ethis.MAX_RIPS)break;const s=this.nodeMap.get(r);if(!s)continue;let a=this.computeNodePf(s);if(a\u003c=this.RIPPING_PF_THRESHOLD)continue;this.testedRipConnections.has(r)||this.testedRipConnections.set(r,new Set);const A=this.testedRipConnections.get(r),c=D5(this.getConnectionsInNode(r,n),(this.hyperParameters.SHUFFLE_SEED??0)+this.processedConnectionQueue.length);for(const l of c){if(a\u003c=this.RIPPING_PF_THRESHOLD)break;const u=l.connection.name;A.add(u);const{pf:g}=this.computeNodePfWithoutConnection(s,u);if(this.ripConnection(l),!this.requeueConnection(l))return;a=g,i=!0,this.clearCostCaches()}}i\u0026\u0026this.RANDOM_RIP_FRACTION\u003e0\u0026\u0026this.processRandomRipping(n)}processRandomRipping(e){const n=this.processedConnectionQueue.filter(r=\u003er.path!==void 0\u0026\u0026r.connection.name!==e);if(n.length===0)return;const o=Math.max(1,Math.floor(this.RANDOM_RIP_FRACTION*n.length)),i=D5(n,(this.hyperParameters.SHUFFLE_SEED??0)+this.totalRipCount+this.processedConnectionQueue.length);for(let r=0;r\u003co\u0026\u0026r\u003ci.length\u0026\u0026!(this.totalRipCount\u003ethis.MAX_RIPS);r++){const s=i[r];if(this.ripConnection(s),!this.requeueConnection(s))return;this.clearCostCaches()}}visualize(){let e={};if(this.failed){const n=this.failedConnection?.connection.pointsToConnect[0],o=this.failedConnection?.connection.pointsToConnect[1];n\u0026\u0026o\u0026\u0026(e={lines:[{points:[n,o],label:`Failed Connection ${this.failedConnection?.connection.name}`,strokeWidth:1,strokeColor:\"red\",strokeDash:[2,2]}]})}return MD(V7e(this),e)}},z7e=class extends Zse{getSolverName(){return\"HyperPortPointPathingSolver\"}params;precomputedInitialParams;constructor(e){super(),this.params=e,this.MAX_ITERATIONS=1e8,this.GREEDY_MULTIPLIER=1.2,this.MIN_SUBSTEPS=50,this.precomputedInitialParams=e.precomputedInitialParams??Mft(e.simpleRouteJson,e.inputNodes)}getHyperParameterDefs(){const e=this.params.numShuffleSeeds??50;return[{name:\"SHUFFLE_SEED\",possibleValues:Array.from({length:e},(n,o)=\u003e({SHUFFLE_SEED:o+1700*(this.params.hyperParameters?.SHUFFLE_SEED??0)}))}]}getCombinationDefs(){return[[\"SHUFFLE_SEED\"]]}generateSolver(e){return new eZn({simpleRouteJson:this.params.simpleRouteJson,capacityMeshNodes:this.params.capacityMeshNodes,inputNodes:this.params.inputNodes,colorMap:this.params.colorMap,nodeMemoryPfMap:this.params.nodeMemoryPfMap,hyperParameters:{...this.params.hyperParameters,...e,MIN_ALLOWED_BOARD_SCORE:this.params.minAllowedBoardScore??e.MIN_ALLOWED_BOARD_SCORE??this.params.hyperParameters?.MIN_ALLOWED_BOARD_SCORE},precomputedInitialParams:this.precomputedInitialParams,fixedRoutes:this.params.fixedRoutes})}computeG(e){return-e.computeBoardScore()}computeH(e){const n=e.progress||0;return n\u003c.1?0:-(e.computeBoardScore()/n)*(1-n)}getNodesWithPortPoints(){if(this.winningSolver)return this.winningSolver.getNodesWithPortPoints();const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.getNodesWithPortPoints():[]}get connectionsWithResults(){if(this.winningSolver)return this.winningSolver.connectionsWithResults;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.connectionsWithResults:[]}get inputNodes(){if(this.winningSolver)return this.winningSolver.inputNodes;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.inputNodes:this.params.inputNodes}get nodeMap(){if(this.winningSolver)return this.winningSolver.nodeMap;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.nodeMap:new Map(this.params.inputNodes.map(n=\u003e[n.capacityMeshNodeId,n]))}get assignedPortPoints(){if(this.winningSolver)return this.winningSolver.assignedPortPoints;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.assignedPortPoints:new Map}get nodeAssignedPortPoints(){if(this.winningSolver)return this.winningSolver.nodeAssignedPortPoints;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.nodeAssignedPortPoints:new Map}computeNodePf(e){if(this.winningSolver)return this.winningSolver.computeNodePf(e);const n=this.getSupervisedSolverWithBestFitness();return n?n.solver.computeNodePf(e):null}computeBoardScore(){if(this.winningSolver)return this.winningSolver.computeBoardScore();const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.computeBoardScore():0}onSolve(e){this.stats={...e.solver.stats,winningHyperParameters:this.winningSolver?.hyperParameters}}visualize(){return this.winningSolver?this.winningSolver.visualize():super.visualize()}};function Lft(t){let e=t;return()=\u003e{e+=1831565813;let n=e;return n=Math.imul(n^n\u003e\u003e\u003e15,1|n),n^=n+Math.imul(n^n\u003e\u003e\u003e7,61|n),((n^n\u003e\u003e\u003e14)\u003e\u003e\u003e0)/4294967296}}var tZn=[{SHUFFLE_SEED:100,NODE_PF_FACTOR:100,NODE_PF_MAX_PENALTY:100,MEMORY_PF_FACTOR:0,EXPANSION_DEGREES:10,FORCE_CENTER_FIRST:!0,FORCE_OFF_BOARD_FREQUENCY:0,CENTER_OFFSET_DIST_PENALTY_FACTOR:0}],nZn=class extends yr{getSolverName(){return\"MultiSectionPortPointOptimizer\"}simpleRouteJson;inputNodes;capacityMeshNodes;capacityMeshEdges;colorMap;nodeMap;capacityMeshNodeMap;connectionResults;assignedPortPoints;nodeAssignedPortPoints;sections=[];activeSubSolver=null;currentSection=null;sectionScoreBeforeOptimization=0;currentSectionCenterNodeId=null;currentScheduleIndex=0;nodePfMap=new Map;attemptsToFixNode=new Map;sectionAttempts=0;MAX_ATTEMPTS_PER_NODE=100;MAX_SECTION_ATTEMPTS=15;ACCEPTABLE_PF=.05;FRACTION_TO_REPLACE=.2;JUMPER_PF_FN_ENABLED=!1;SHUFFLE_SEEDS_PER_SECTION=null;ALWAYS_RIP_INTERSECTIONS=!0;effort=1;HYPERPARAMETER_SCHEDULE=tZn;constructor(e){super(),this.MAX_ITERATIONS=1e6,this.simpleRouteJson=e.simpleRouteJson,this.inputNodes=e.inputNodes,this.capacityMeshNodes=e.capacityMeshNodes,this.capacityMeshEdges=e.capacityMeshEdges,this.colorMap=e.colorMap??{},this.effort=e.effort??1,e.FRACTION_TO_REPLACE!==void 0\u0026\u0026(this.FRACTION_TO_REPLACE=e.FRACTION_TO_REPLACE),e.ALWAYS_RIP_INTERSECTIONS!==void 0\u0026\u0026(this.ALWAYS_RIP_INTERSECTIONS=e.ALWAYS_RIP_INTERSECTIONS),e.MAX_ATTEMPTS_PER_NODE!==void 0\u0026\u0026(this.MAX_ATTEMPTS_PER_NODE=e.MAX_ATTEMPTS_PER_NODE),e.MAX_SECTION_ATTEMPTS!==void 0\u0026\u0026(this.MAX_SECTION_ATTEMPTS=e.MAX_SECTION_ATTEMPTS),e.HYPERPARAMETER_SCHEDULE!==void 0\u0026\u0026(this.HYPERPARAMETER_SCHEDULE=e.HYPERPARAMETER_SCHEDULE),this.JUMPER_PF_FN_ENABLED=e.JUMPER_PF_FN_ENABLED??this.JUMPER_PF_FN_ENABLED,this.SHUFFLE_SEEDS_PER_SECTION=e.SHUFFLE_SEEDS_PER_SECTION,this.nodeMap=new Map(e.inputNodes.map(o=\u003e[o.capacityMeshNodeId,o])),this.capacityMeshNodeMap=new Map(e.capacityMeshNodes.map(o=\u003e[o.capacityMeshNodeId,o])),this.connectionResults=[...e.initialConnectionResults],this.assignedPortPoints=new Map(e.initialAssignedPortPoints),this.nodeAssignedPortPoints=new Map(e.initialNodeAssignedPortPoints),this.nodePfMap=this.computeInitialPfMap();const n=this.computeBoardScore();this.stats.successfulOptimizations=0,this.stats.failedOptimizations=0,this.stats.nodesExamined=0,this.stats.sectionAttempts=0,this.stats.sectionScores={},this.stats.initialBoardScore=n,this.stats.currentBoardScore=n,this.stats.errors=0}computeInitialPfMap(){const e=new Map;for(const n of this.capacityMeshNodes){const o=this.nodeAssignedPortPoints.get(n.capacityMeshNodeId)??[];if(o.length===0)continue;const i={capacityMeshNodeId:n.capacityMeshNodeId,center:n.center,width:n.width,height:n.height,portPoints:o,availableZ:n.availableZ},r=this.JUMPER_PF_FN_ENABLED\u0026\u0026n.availableZ.length===1?Jz(n,Wm(i).numSameLayerCrossings):Nft(i,n);e.set(n.capacityMeshNodeId,r)}return e}computeBoardScore(){const e=this.getNodesWithPortPoints();return this.computeScoreForNodes(e)}computeScoreForNodes(e){return this.JUMPER_PF_FN_ENABLED?Fft(e,this.capacityMeshNodeMap):Dft(e,this.capacityMeshNodeMap)}recomputePfForNodes(e){for(const n of e){const o=this.capacityMeshNodeMap.get(n);if(!o)continue;const i=this.nodeAssignedPortPoints.get(n)??[];if(i.length===0){this.nodePfMap.set(n,0);continue}const r={center:o.center,width:o.width,height:o.height,portPoints:i,availableZ:o.availableZ},s=this.JUMPER_PF_FN_ENABLED\u0026\u0026o.availableZ.length===1?Jz(o,Wm(r).numSameLayerCrossings):Nft(r,o);this.nodePfMap.set(n,s)}}getCreatePortPointSectionInput(){return{inputNodes:this.inputNodes,capacityMeshNodes:this.capacityMeshNodes,capacityMeshEdges:this.capacityMeshEdges,nodeMap:this.nodeMap,connectionResults:this.connectionResults}}createSection(e){return(function(n,o){const{inputNodes:i,capacityMeshNodes:r,capacityMeshEdges:s,connectionResults:a}=n,{centerOfSectionCapacityNodeId:A,expansionDegrees:c}=o,l=new Map;for(const C of s){const[y,x]=C.nodeIds;l.has(y)||l.set(y,new Set),l.has(x)||l.set(x,new Set),l.get(y).add(x),l.get(x).add(y)}const u=new Set,g=new Set,h=[];for(h.push({nodeId:A,depth:0}),g.add(A);h.length\u003e0;){const{nodeId:C,depth:y}=h.shift();if(u.add(C),y\u003cc){const x=l.get(C)??new Set;for(const E of x)g.has(E)||(g.add(E),h.push({nodeId:E,depth:y+1}))}}const d=i.filter(C=\u003eu.has(C.capacityMeshNodeId)),p=r.filter(C=\u003eu.has(C.capacityMeshNodeId)),m=[],_=[];for(const C of s){const[y,x]=C.nodeIds,E=u.has(y),B=u.has(x);E\u0026\u0026B?m.push(C):(E||B)\u0026\u0026_.push(C)}const f=d.map(C=\u003e{const y=C.portPoints.filter(x=\u003e{const[E,B]=x.connectionNodeIds,S=u.has(E),Q=u.has(B);return S||Q});return{...C,portPoints:y}}),I=(function(C,y){const x=[];for(const E of C){if(!E.path||E.path.length===0)continue;const B=E.connection.name,S=E.connection.__rootConnectionNames?.[0],Q=[];for(let Y=0;Y\u003cE.path.length;Y++){const W=E.path[Y];y.has(W.currentNodeId)\u0026\u0026Q.push(Y)}if(Q.length===0)continue;const w=Q[0],M=Q[Q.length-1];let k=w,R=M;if(w\u003e0){const Y=E.path[0].currentNodeId;(E.nodeIds[0]===Y||E.nodeIds[1]===Y)\u0026\u0026(k=0)}if(M\u003cE.path.length-1){const Y=E.path.length-1,W=E.path[Y].currentNodeId;(E.nodeIds[0]===W||E.nodeIds[1]===W)\u0026\u0026(R=Y)}const F=E.path.slice(k,R+1),O=k\u003e0,U=R\u003cE.path.length-1;x.push({connectionName:B,rootConnectionName:S,points:F.map(Y=\u003e({x:Y.point.x,y:Y.point.y,z:Y.z,nodeId:Y.currentNodeId,portPointId:Y.portPoint?.portPointId})),originalStartIndex:k,originalEndIndex:R,hasEntryFromOutside:O,hasExitToOutside:U})}return x})(a??[],u);return{centerNodeId:A,expansionDegrees:c,nodeIds:u,inputNodes:f,capacityMeshNodes:p,internalEdges:m,boundaryEdges:_,sectionPaths:I}})(this.getCreatePortPointSectionInput(),e)}getSectionNodesWithPortPoints(e){const n=[];for(const o of e.nodeIds){const i=this.nodeMap.get(o),r=this.capacityMeshNodeMap.get(o);if(!i||!r)continue;const s=this.nodeAssignedPortPoints.get(o)??[];s.length\u003e0\u0026\u0026n.push({capacityMeshNodeId:o,center:i.center,width:i.width,height:i.height,portPoints:s,availableZ:i.availableZ})}return n}getNodesWithPortPoints(){const e=[];for(const n of this.inputNodes){const o=this.nodeAssignedPortPoints.get(n.capacityMeshNodeId)??[];o.length\u003e0\u0026\u0026e.push({capacityMeshNodeId:n.capacityMeshNodeId,center:n.center,width:n.width,height:n.height,portPoints:o,availableZ:n.availableZ})}return e}findHighestPfNode(){let e=null,n=0;for(const[o,i]of this.nodePfMap.entries())i*(1-(this.attemptsToFixNode.get(o)??0)/this.MAX_ATTEMPTS_PER_NODE)**2\u003en\u0026\u0026(n=i,e=o);return!e||n\u003cthis.ACCEPTABLE_PF?null:e}currentSectionCutPathInfo=new Map;currentSectionKeptPortPoints=new Map;currentSectionFixedRoutes=[];determineConnectionsToRip(e,n){const o=31337*this.sectionAttempts,i=Lft(o);if(this.FRACTION_TO_REPLACE\u003e=1)return new Set(n);const r=(function(A,c){const l=Lft(c),u=[...A];for(let g=u.length-1;g\u003e0;g--){const h=Math.floor(l()*(g+1));[u[g],u[h]]=[u[h],u[g]]}return u})(n,o),s=Math.max(1,Math.ceil(r.length*this.FRACTION_TO_REPLACE)),a=new Set(r.slice(0,s));if(this.ALWAYS_RIP_INTERSECTIONS){const A=(function(c){const{section:l,nodePfMap:u,capacityMeshNodeMap:g,nodeAssignedPortPoints:h,acceptablePf:d}=c,p=[];for(const m of l.nodeIds){if((u.get(m)??0)\u003c=d)continue;const _=g.get(m);if(!_)continue;const f=h.get(m)??[];if(f.length\u003c2)continue;const I=_.center.x-_.width/2,C=_.center.x+_.width/2,y=_.center.y-_.height/2,x=_.center.y+_.height/2,E=new Map;for(const Q of f){const w=E.get(Q.connectionName)??[];w.some(M=\u003eM.x===Q.x\u0026\u0026M.y===Q.y\u0026\u0026M.z===Q.z)||w.push({x:Q.x,y:Q.y,z:Q.z}),E.set(Q.connectionName,w)}const B=new Map;for(const[Q,w]of E){if(w.length\u003c2)continue;const M=w[0],k=w[1];if(M.z!==k.z)continue;const R=Rft(M,I,C,y,x),F=Rft(k,I,C,y,x),O=M.z,U=B.get(O)??[];U.push({connectionName:Q,t1:R,t2:F}),B.set(O,U)}const S=1e-6;for(const[,Q]of B){const w=Q.map(M=\u003e({connectionName:M.connectionName,a:Math.min(M.t1,M.t2),b:Math.max(M.t1,M.t2)}));for(let M=0;M\u003cw.length;M++){const{connectionName:k,a:R,b:F}=w[M];for(let O=M+1;O\u003cw.length;O++){const{connectionName:U,a:Y,b:W}=w[O];Math.abs(R-Y)\u003cS||Math.abs(R-W)\u003cS||Math.abs(F-Y)\u003cS||Math.abs(F-W)\u003cS||(R\u003cY\u0026\u0026Y\u003cF\u0026\u0026F\u003cW||Y\u003cR\u0026\u0026R\u003cW\u0026\u0026W\u003cF)\u0026\u0026p.push([k,U])}}}}return p})({section:e,nodePfMap:this.nodePfMap,capacityMeshNodeMap:this.capacityMeshNodeMap,nodeAssignedPortPoints:this.nodeAssignedPortPoints,acceptablePf:this.ACCEPTABLE_PF});for(const[c,l]of A){if(a.has(c)||a.has(l))continue;const u=n.includes(c),g=n.includes(l);if(u\u0026\u0026g){const h=i()\u003c.5;a.add(h?c:l)}else u?a.add(c):g\u0026\u0026a.add(l)}}return this.stats.lastRipCount=a.size,a}createSectionSimpleRouteJson(e){const n=[];this.currentSectionCutPathInfo.clear(),this.currentSectionKeptPortPoints.clear(),this.currentSectionFixedRoutes=[];const o=[],i=[];for(const A of this.connectionResults){if(!A.path||A.path.length===0)continue;const[c,l]=A.nodeIds,u=e.nodeIds.has(c),g=e.nodeIds.has(l);u\u0026\u0026g\u0026\u0026(i.push(A),o.push(A.connection.name))}const r=[];for(const A of e.sectionPaths){if(!A.hasEntryFromOutside\u0026\u0026!A.hasExitToOutside||A.points.length\u003c2)continue;const c=this.connectionResults.find(l=\u003el.connection.name===A.connectionName);c\u0026\u0026(r.push({sectionPath:A,originalResult:c}),o.includes(A.connectionName)||o.push(A.connectionName))}const s=this.determineConnectionsToRip(e,o);for(const A of i)s.has(A.connection.name)\u0026\u0026n.push(A.connection);for(const{sectionPath:A,originalResult:c}of r){if(!s.has(A.connectionName))continue;const l=`__cut__${A.connectionName}__${A.originalStartIndex}`;this.colorMap[l]=this.colorMap[A.connectionName];const u=A.points[0],g=A.points[A.points.length-1],h={name:l,__rootConnectionNames:[A.rootConnectionName??A.connectionName],pointsToConnect:[{x:u.x,y:u.y,layers:[`layer${u.z+1}`]},{x:g.x,y:g.y,layers:[`layer${g.z+1}`]}]};n.push(h),this.currentSectionCutPathInfo.set(l,{sectionPath:A,originalConnectionResult:c})}const a=new Set(o.filter(A=\u003e!s.has(A)));if(a.size\u003e0){for(const A of e.nodeIds){const c=(this.nodeAssignedPortPoints.get(A)??[]).filter(l=\u003ea.has(l.connectionName));c.length\u003e0\u0026\u0026this.currentSectionKeptPortPoints.set(A,c)}for(const A of i)a.has(A.connection.name)\u0026\u0026this.currentSectionFixedRoutes.push(A);for(const{sectionPath:A,originalResult:c}of r)if(a.has(A.connectionName)){const l={connection:{name:A.connectionName,__rootConnectionNames:A.rootConnectionName?[A.rootConnectionName]:void 0,pointsToConnect:c.connection.pointsToConnect},path:A.points.map(u=\u003e({prevCandidate:null,portPoint:null,currentNodeId:u.nodeId,point:{x:u.x,y:u.y},z:u.z,f:0,g:0,h:0,distanceTraveled:0})),portPoints:A.points.map(u=\u003e({portPointId:u.portPointId,x:u.x,y:u.y,z:u.z,connectionName:A.connectionName,rootConnectionName:A.rootConnectionName})),nodeIds:c.nodeIds,straightLineDistance:c.straightLineDistance};this.currentSectionFixedRoutes.push(l)}}return{...this.simpleRouteJson,connections:n}}prepareSectionInputNodesForCutPaths(e){const n=new Set;for(const[,o]of this.currentSectionCutPathInfo.entries()){const{sectionPath:i}=o;if(i.points.length===0)continue;const r=i.points[0].nodeId;n.add(r);const s=i.points[i.points.length-1].nodeId;n.add(s)}return e.inputNodes.map(o=\u003en.has(o.capacityMeshNodeId)?{...o,_containsTarget:!0}:o)}getHyperParametersForScheduleIndex(e,n){const o=this.HYPERPARAMETER_SCHEDULE[e];return{...o,SHUFFLE_SEED:(o.SHUFFLE_SEED??0)+17*n}}createSectionSolver(e){const n=this.createSectionSimpleRouteJson(e),o=this.prepareSectionInputNodesForCutPaths(e),i=Mft(n,o);for(const[r,s]of this.currentSectionKeptPortPoints){const a=i.nodeAssignedPortPoints.get(r)??[];i.nodeAssignedPortPoints.set(r,[...a,...s])}return new z7e({simpleRouteJson:n,inputNodes:o,capacityMeshNodes:e.capacityMeshNodes,colorMap:this.colorMap,nodeMemoryPfMap:this.nodePfMap,numShuffleSeeds:this.SHUFFLE_SEEDS_PER_SECTION??2*n.connections.length*this.effort,hyperParameters:{...this.getHyperParametersForScheduleIndex(this.currentScheduleIndex,this.sectionAttempts)},precomputedInitialParams:i,fixedRoutes:this.currentSectionFixedRoutes})}reattachSection(e,n,o,i){const r=[],s=[];for(const A of n)A.connection.name.startsWith(\"__cut__\")?s.push(A):r.push(A);const a=new Set(r.map(A=\u003eA.connection.name));this.connectionResults=this.connectionResults.filter(A=\u003e!a.has(A.connection.name)),this.connectionResults.push(...r);for(const[A,c]of this.nodeAssignedPortPoints.entries()){if(!e.nodeIds.has(A))continue;const l=c.filter(u=\u003e!a.has(u.connectionName));this.nodeAssignedPortPoints.set(A,l)}for(const[A,c]of this.assignedPortPoints.entries())a.has(c.connectionName)\u0026\u0026this.assignedPortPoints.delete(A);for(const A of s){const c=this.currentSectionCutPathInfo.get(A.connection.name);if(!c||!A.path)continue;const{sectionPath:l,originalConnectionResult:u}=c,g=u.path;if(!g)continue;const h=l.connectionName;for(const[f,I]of this.nodeAssignedPortPoints.entries()){const C=I.filter(y=\u003ey.connectionName!==h||!e.nodeIds.has(f));this.nodeAssignedPortPoints.set(f,C)}const d=g.slice(0,l.originalStartIndex),p=g.slice(l.originalEndIndex+1),m=[];let _=d.length\u003e0?d[d.length-1]:null;for(const f of A.path){const I={...f,prevCandidate:_};m.push(I),_=I}if(p.length\u003e0\u0026\u0026m.length\u003e0\u0026\u0026(p[0]={...p[0],prevCandidate:m[m.length-1]}),u.path=[...d,...m,...p],A.portPoints)for(const f of A.portPoints){const I={...f,connectionName:h,rootConnectionName:l.rootConnectionName??h};for(const C of e.inputNodes)for(const y of C.portPoints)if(Math.abs(y.x-f.x)\u003c.001\u0026\u0026Math.abs(y.y-f.y)\u003c.001\u0026\u0026y.z===f.z){for(const x of y.connectionNodeIds){const E=this.nodeAssignedPortPoints.get(x)??[];E.push(I),this.nodeAssignedPortPoints.set(x,E)}break}}}for(const[A,c]of o.entries())c.connectionName.startsWith(\"__cut__\")||this.assignedPortPoints.set(A,c);for(const[A,c]of i.entries()){const l=c.filter(u=\u003e!u.connectionName.startsWith(\"__cut__\"));if(l.length\u003e0){const u=this.nodeAssignedPortPoints.get(A)??[];this.nodeAssignedPortPoints.set(A,[...u,...l])}}}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved||this.activeSubSolver.failed){if(this.activeSubSolver.failed){if(this.currentScheduleIndex++,this.activeSubSolver.error\u0026\u0026this.stats.errors++,this.currentScheduleIndex\u003cthis.HYPERPARAMETER_SCHEDULE.length\u0026\u0026this.currentSectionCenterNodeId){const l=this.HYPERPARAMETER_SCHEDULE[this.currentScheduleIndex];this.currentSection=this.createSection({centerOfSectionCapacityNodeId:this.currentSectionCenterNodeId,expansionDegrees:l.EXPANSION_DEGREES}),this.activeSubSolver=this.createSectionSolver(this.currentSection)}else this.stats.failedOptimizations++,this.activeSubSolver=null,this.currentSection=null,this.currentSectionCenterNodeId=null,this.currentScheduleIndex=0;return}const i=this.activeSubSolver.getNodesWithPortPoints().map(l=\u003e({...l,portPoints:l.portPoints.map(u=\u003e{if(u.connectionName.startsWith(\"__cut__\")){const g=u.connectionName.slice(7),h=g.lastIndexOf(\"__\"),d=h\u003e=0?g.slice(0,h):g;return{...u,connectionName:d}}return u})})),r=new Set;for(const l of i)for(const u of l.portPoints)r.add(u.connectionName);const s=this.getSectionNodesWithPortPoints(this.currentSection).map(l=\u003e({...l,portPoints:l.portPoints.filter(u=\u003er.has(u.connectionName))})).filter(l=\u003el.portPoints.length\u003e0),a=this.computeScoreForNodes(s),A=this.computeScoreForNodes(i),c=`attempt${this.sectionAttempts}`;if(this.stats.lastSectionScore=A,A\u003ea){const l=this.stats.currentBoardScore;this.stats.lastBoardScore=l;const u=[...this.connectionResults],g=new Map(this.assignedPortPoints),h=new Map(Array.from(this.nodeAssignedPortPoints.entries()).map(([p,m])=\u003e[p,[...m]]));this.reattachSection(this.currentSection,this.activeSubSolver.connectionsWithResults,this.activeSubSolver.assignedPortPoints,this.activeSubSolver.nodeAssignedPortPoints),this.recomputePfForNodes(this.currentSection.nodeIds);const d=this.computeBoardScore();this.stats.sectionScores[c]=d,d\u003el?(this.stats.successfulOptimizations++,this.stats.currentBoardScore=d):(this.connectionResults=u,this.assignedPortPoints=g,this.nodeAssignedPortPoints=h,this.recomputePfForNodes(this.currentSection.nodeIds),this.stats.failedOptimizations++),this.activeSubSolver=null,this.currentSection=null,this.currentSectionCenterNodeId=null,this.currentScheduleIndex=0}else if(this.currentScheduleIndex++,this.currentScheduleIndex\u003cthis.HYPERPARAMETER_SCHEDULE.length\u0026\u0026this.currentSectionCenterNodeId){const l=this.HYPERPARAMETER_SCHEDULE[this.currentScheduleIndex];this.currentSection=this.createSection({centerOfSectionCapacityNodeId:this.currentSectionCenterNodeId,expansionDegrees:l.EXPANSION_DEGREES}),this.activeSubSolver=this.createSectionSolver(this.currentSection)}else this.stats.failedOptimizations++,this.activeSubSolver=null,this.currentSection=null,this.currentSectionCenterNodeId=null,this.currentScheduleIndex=0}return}if(this.sectionAttempts\u003e=this.MAX_SECTION_ATTEMPTS)return void(this.solved=!0);const e=this.findHighestPfNode();if(!e)return void(this.solved=!0);this.sectionAttempts++,this.stats.sectionAttempts=this.sectionAttempts,this.stats.nodesExamined++,this.attemptsToFixNode.set(e,(this.attemptsToFixNode.get(e)??0)+1),this.currentSectionCenterNodeId=e,this.currentScheduleIndex=0;const n=this.HYPERPARAMETER_SCHEDULE[this.currentScheduleIndex];this.currentSection=this.createSection({centerOfSectionCapacityNodeId:e,expansionDegrees:n.EXPANSION_DEGREES});const o=this.getSectionNodesWithPortPoints(this.currentSection);if(this.sectionScoreBeforeOptimization=this.computeScoreForNodes(o),this.createSectionSimpleRouteJson(this.currentSection).connections.length===0)return this.currentSection=null,void(this.currentSectionCenterNodeId=null);this.activeSubSolver=this.createSectionSolver(this.currentSection)}computeProgress(){return this.sectionAttempts/this.MAX_SECTION_ATTEMPTS}visualize(){return this.solved?V7e(this):this.activeSubSolver?this.activeSubSolver.visualize():this.currentSection?(function(e,n){const o={lines:[],points:[],rects:[],circles:[]};for(const i of e.inputNodes){const r=i.capacityMeshNodeId===e.centerNodeId,s=r?\"rgba(0, 200, 0, 0.3)\":\"rgba(200, 200, 200, 0.3)\";o.rects.push({center:i.center,width:.9*i.width,height:.9*i.height,layer:`z${i.availableZ.join(\",\")}`,fill:s,label:`${i.capacityMeshNodeId}${r?\" (CENTER)\":\"\"}`})}for(const i of e.inputNodes)for(const r of i.portPoints)o.circles.push({center:{x:r.x,y:r.y},radius:.05,fill:\"rgba(150, 150, 150, 0.5)\",layer:`z${r.z}`,label:[r.portPointId,`cd: ${r.distToCentermostPortOnZ}`,`connects: ${r.connectionNodeIds.join(\",\")}`].filter(Boolean).join(`\n`)});for(const i of e.sectionPaths){const r=n?.[i.connectionName]??\"blue\";for(let s=0;s\u003ci.points.length-1;s++){const a=i.points[s],A=i.points[s+1],c=a.z===A.z,l=a.z;let u;u=c?l===0?\"5 5\":\"10 5\":\"3 3 10\",o.lines.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:r,strokeDash:u})}}return o})(this.currentSection,this.colorMap):V7e(this)}},Hft=class{parent={};constructor(e){for(const n of e)this.parent[n]=n}find(e){return this.parent[e]===e?e:this.parent[e]=this.find(this.parent[e])}union(e,n){const o=this.find(e),i=this.find(n);o!==i\u0026\u0026(this.parent[i]=o)}getGroup(e){const n=this.find(e),o=[];for(const i in this.parent)this.find(i)===n\u0026\u0026o.push(i);return o}},oZn=class{point;left=null;right=null;constructor(e){this.point=e}},iZn=class{root=null;constructor(e){e.length\u003e0\u0026\u0026(this.root=this.buildTree(e,0))}buildTree(e,n){const o=n%2==0?\"x\":\"y\";e.sort((s,a)=\u003es[o]-a[o]);const i=Math.floor(e.length/2),r=new oZn(e[i]);return i\u003e0\u0026\u0026(r.left=this.buildTree(e.slice(0,i),n+1)),i\u003ce.length-1\u0026\u0026(r.right=this.buildTree(e.slice(i+1),n+1)),r}findNearestNeighbor(e){if(!this.root)throw new Error(\"Tree is empty\");const n=this.root.point,o=this.distance(e,n);return this.nearestNeighborSearch(this.root,e,0,n,o),n}nearestNeighborSearch(e,n,o,i,r){if(!e)return i;const s=o%2?\"x\":\"y\",a=this.distance(n,e.point);a\u003cr\u0026\u0026(i=e.point,r=a);const A=n[s]-e.point[s],c=A\u003c=0?e.left:e.right,l=A\u003c=0?e.right:e.left;return i=this.nearestNeighborSearch(c,n,o+1,i,r),r=this.distance(n,i),Math.abs(A)\u003cr\u0026\u0026(i=this.nearestNeighborSearch(l,n,o+1,i,r)),i}findKNearestNeighbors(e,n){if(!this.root)return[];const o=[];return this.kNearestNeighborSearch(this.root,e,0,o,n),o.sort((i,r)=\u003ei.distance-r.distance).slice(0,n).map(i=\u003ei.point)}kNearestNeighborSearch(e,n,o,i,r){if(!e)return;const s=o%2?\"x\":\"y\",a=this.distance(n,e.point);i.push({point:e.point,distance:a});const A=n[s]-e.point[s],c=A\u003c=0?e.left:e.right,l=A\u003c=0?e.right:e.left;this.kNearestNeighborSearch(c,n,o+1,i,r);let u=1/0;i.length\u003e=r\u0026\u0026(i.sort((g,h)=\u003eg.distance-h.distance),u=i[r-1]?.distance||1/0),(Math.abs(A)\u003cu||i.length\u003cr)\u0026\u0026this.kNearestNeighborSearch(l,n,o+1,i,r)}distance(e,n){return Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2)}},rZn=class{parent=new Map;rank=new Map;constructor(e){for(const n of e){const o=this.pointToKey(n);this.parent.set(o,o),this.rank.set(o,0)}}pointToKey(e){return`${e.x},${e.y}`}find(e){const n=this.pointToKey(e);if(!this.parent.has(n))throw new Error(`Point ${n} not found in DisjointSet`);let o=n;for(;o!==this.parent.get(o);)o=this.parent.get(o);let i=n;for(;i!==o;){const r=this.parent.get(i);this.parent.set(i,o),i=r}return o}union(e,n){const o=this.find(e),i=this.find(n);if(o===i)return!1;const r=this.rank.get(o)||0,s=this.rank.get(i)||0;return r\u003cs?this.parent.set(o,i):r\u003es?this.parent.set(i,o):(this.parent.set(i,o),this.rank.set(o,r+1)),!0}};function Oft(t,e={}){if(t.length\u003c=1)return[];const n=[...t],o=new iZn(n),i=[],r=Math.min(10,t.length-1);for(const A of n){const c=o.findKNearestNeighbors(A,r+1);for(const l of c){if(A.x===l.x\u0026\u0026A.y===l.y)continue;const u=Math.sqrt((A.x-l.x)**2+(A.y-l.y)**2);i.push({from:A,to:l,weight:u})}}e.extraEdges\u0026\u0026i.push(...e.extraEdges),i.sort((A,c)=\u003eA.weight-c.weight);const s=new rZn(n),a=[];for(const A of i)if(s.union(A.from,A.to)\u0026\u0026(a.push(A),a.length===n.length-1))break;return a}var sZn=(t,e)=\u003e{const n=new Map;for(const i of t.pointsToConnect){if(!i.pointId)continue;const r=e.getNetConnectedToId(i.pointId);if(!r)continue;const s=n.get(r)??[];s.push(i),n.set(r,s)}const o=[];for(const i of n.values()){const r=i[0];if(r)for(const s of i.slice(1))o.push({from:r,to:s,weight:0})}return o},Gft=(t,e)=\u003e({zeroWeightEdges:sZn(t,e),arePointsConnected:(n,o)=\u003e!!(n.pointId\u0026\u0026o.pointId\u0026\u0026((i,r,s)=\u003e{const a=i.getNetConnectedToId(r);return!!a\u0026\u0026a===i.getNetConnectedToId(s)})(e,n.pointId,o.pointId))});function iae(t){if(t.pointId)return t.pointId;let e=\"\";return ND(t)?e=t.layer:E7e(t)\u0026\u0026t.layers\u0026\u0026(e=t.layers.sort().join(\"-\")),`${t.x.toFixed(4)},${t.y.toFixed(4)},${e}`}function Yft(t){if(t.length===0)return[];const e=t.map((s,a)=\u003e`conn_${a}`),n=new Hft(e),o=new Map;t.forEach((s,a)=\u003e{const A=`conn_${a}`;s.pointsToConnect.forEach(c=\u003e{const l=iae(c);o.has(l)||o.set(l,[]),o.get(l).push(A)})});for(const s of o.values())if(s.length\u003e1){const a=s[0];for(let A=1;A\u003cs.length;A++)n.union(a,s[A])}const i=new Map;t.forEach((s,a)=\u003e{const A=`conn_${a}`,c=n.find(A);i.has(c)||i.set(c,[]),i.get(c).push(s)});const r=[];for(const s of i.values()){if(s.length===1){r.push(s[0]);continue}const a=new Map,A=new Set;let c=!1;const l=[],u=new Set;let g;s.forEach(d=\u003e{d.pointsToConnect.forEach(m=\u003ea.set(iae(m),m));const p=d.__rootConnectionNames;if(p\u0026\u0026p.length\u003e0)for(const m of p)A.add(m);else A.add(d.name);d.isOffBoard\u0026\u0026(c=!0),d.externallyConnectedPointIds\u0026\u0026l.push(...d.externallyConnectedPointIds),d.__netConnectionName\u0026\u0026u.add(d.__netConnectionName),g===void 0\u0026\u0026d.nominalTraceWidth!==void 0\u0026\u0026(g=d.nominalTraceWidth)});const h={name:s.map(d=\u003ed.name).join(\"__\"),pointsToConnect:Array.from(a.values()),isOffBoard:c,externallyConnectedPointIds:l.length\u003e0?l:void 0,__netConnectionName:u.size\u003e0?Array.from(u).join(\"__\"):void 0,__rootConnectionNames:Array.from(A),nominalTraceWidth:g};r.push(h)}return r}var J7e=class extends yr{constructor(e,n={},o){super(),this.ogSrj=e,this.colorMap=n;const i=new Map;for(const s of e.buses??[])if(s.traceWidth!==void 0)for(const a of s.connectionNames)i.set(a,Math.max(i.get(a)??0,s.traceWidth));const r=e.connections.map(s=\u003e{const a=i.get(s.name);return a===void 0?s:{...s,nominalTraceWidth:Math.max(s.nominalTraceWidth??0,a)}});this.unprocessedConnections=Yft(r),this.newConnections=[],this.initiallyConnectedMap=o}ogSrj;colorMap;getSolverName(){return\"NetToPointPairsSolver\"}unprocessedConnections;newConnections;initiallyConnectedMap;_step(){if(this.unprocessedConnections.length===0)return void(this.solved=!0);const e=this.unprocessedConnections.pop(),{zeroWeightEdges:n,arePointsConnected:o}=Gft(e,this.initiallyConnectedMap);if(e.pointsToConnect.length===2){const[s,a]=e.pointsToConnect;return s\u0026\u0026a\u0026\u0026o(s,a)?void 0:void this.newConnections.push({...e,__rootConnectionNames:e.__rootConnectionNames??[e.name]})}const i=Oft(e.pointsToConnect,{extraEdges:n});let r=0;for(const s of i)o(s.from,s.to)||this.newConnections.push({...e,pointsToConnect:[s.from,s.to],name:`${e.name}_mst${r++}`,__rootConnectionNames:e.__rootConnectionNames??[e.name],__netConnectionName:e.__netConnectionName})}getNewSimpleRouteJson(){return{...structuredClone(this.ogSrj),connections:structuredClone(this.newConnections)}}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Net To Point Pairs Visualization\"};return this.unprocessedConnections.forEach(n=\u003e{n.pointsToConnect.forEach(s=\u003e{e.points.push({x:s.x,y:s.y,color:\"red\",label:s.pcb_port_id??s.pointId})});const o=n.pointsToConnect.length**2,i=M7e(0),r=new Set;for(let s=0;s\u003cMath.max(o,2*n.pointsToConnect.length);s++){const a=Math.floor(i()*n.pointsToConnect.length),A=Math.floor(i()*n.pointsToConnect.length);r.has(`${a}-${A}`)||(r.add(`${a}-${A}`),e.lines.push({points:[n.pointsToConnect[a],n.pointsToConnect[A]],strokeColor:\"rgba(255,0,0,0.25)\",label:n.name}))}}),this.newConnections.forEach(n=\u003e{const o=this.colorMap?.[n.name]||\"blue\";n.pointsToConnect.forEach(i=\u003e{e.points.push({x:i.x,y:i.y,color:o,label:i.pcb_port_id??i.pointId})});for(let i=0;i\u003cn.pointsToConnect.length-1;i++)for(let r=i+1;r\u003cn.pointsToConnect.length;r++)e.lines.push({points:[n.pointsToConnect[i],n.pointsToConnect[r]],strokeColor:o,label:n.name})}),e}},rL=class extends J7e{constructor(e,n={},o){const i=e.connections.flatMap(c=\u003ec.pointsToConnect),r=new Map;for(const c of i)c.pointId\u0026\u0026r.set(c.pointId,c);const s=i.map(c=\u003ec.pointId).filter(c=\u003e!!c),a=new Hft(s),A=[];for(const c of e.connections)c.isOffBoard?c.pointsToConnect.length\u003e=2\u0026\u0026c.pointsToConnect[0].pointId\u0026\u0026c.pointsToConnect[1].pointId\u0026\u0026a.union(c.pointsToConnect[0].pointId,c.pointsToConnect[1].pointId):A.push(c);super({...e,connections:A},n,o),this.ogSrj=e,this.colorMap=n,this.connectionPointDsu=a,this.connectionPointMap=r,this.ogSrj=e}ogSrj;colorMap;getSolverName(){return\"NetToPointPairsSolver2_OffBoardConnection\"}connectionPointDsu;connectionPointMap;_findBestConnectionPointsFromDisjointSets(e,n){if(!e.pointId||!n.pointId)return{pointsToConnect:[e,n]};const o=this.connectionPointDsu.getGroup(e.pointId).map(A=\u003ethis.connectionPointMap.get(A)),i=this.connectionPointDsu.getGroup(n.pointId).map(A=\u003ethis.connectionPointMap.get(A));let r=e,s=n,a=1/0;for(const A of o)for(const c of i){const l=Math.sqrt(Math.pow(A.x-c.x,2)+Math.pow(A.y-c.y,2));l\u003ca\u0026\u0026(a=l,r=A,s=c)}return{pointsToConnect:[r,s]}}_step(){if(this.unprocessedConnections.length===0)return void(this.solved=!0);const e=this.unprocessedConnections.pop(),{zeroWeightEdges:n,arePointsConnected:o}=Gft(e,this.initiallyConnectedMap);if(e.pointsToConnect.length===2){const[s,a]=e.pointsToConnect;if(s\u0026\u0026a\u0026\u0026o(s,a))return;const A=this._findBestConnectionPointsFromDisjointSets(e.pointsToConnect[0],e.pointsToConnect[1]);return void this.newConnections.push({...e,pointsToConnect:A.pointsToConnect,__rootConnectionNames:e.__rootConnectionNames??[e.name]})}const i=Oft(e.pointsToConnect,{extraEdges:n});let r=0;for(const s of i){if(o(s.from,s.to))continue;const a=this._findBestConnectionPointsFromDisjointSets(s.from,s.to);this.newConnections.push({...e,pointsToConnect:a.pointsToConnect,name:`${e.name}_mst${r++}`,__rootConnectionNames:e.__rootConnectionNames??[e.name],__netConnectionName:e.__netConnectionName})}}},W7e=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s\u0026\u0026o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){const s=this.netMap[i],a=this.netMap[r];if(s\u0026\u0026a){s.push(...a),this.netMap[r]=s;for(const A of s)this.idToNetMap[A]=i}}}for(const r of n){const s=this.netMap[i];s\u0026\u0026!s.includes(r)\u0026\u0026s.push(r),this.idToNetMap[r]=i}}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return!!i\u0026\u0026(o===i||i===e||i===e)}areAllIdsConnected(e){if(e.length===0)return!0;const n=this.getNetConnectedToId(e[0]);if(!n)return!1;for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}};function aZn(t,e={}){const n=[],o=[],i=e.color??\"gray\",r=e.label,s=W8[t.footprint]??W8[\"0603\"],a=t.end.x-t.start.x,A=t.end.y-t.start.y,c=Math.abs(a)\u003eMath.abs(A),l=c?s.padLength:s.padWidth,u=c?s.padWidth:s.padLength;return n.push({center:t.start,width:l,height:u,fill:Es(i,.5),stroke:\"rgba(0, 0, 0, 0.5)\",layer:\"jumper\",label:r?`${r} (start)`:void 0}),n.push({center:t.end,width:l,height:u,fill:Es(i,.5),stroke:\"rgba(0, 0, 0, 0.5)\",layer:\"jumper\",label:r?`${r} (end)`:void 0}),o.push({points:[t.start,t.end],strokeColor:\"rgba(100, 100, 100, 0.8)\",strokeWidth:.3*s.padWidth,layer:\"jumper-body\"}),{rects:n,lines:o}}function _x(t,e={}){const n={rects:[],lines:[]};for(const o of t){const{rects:i,lines:r}=aZn(o,e);n.rects.push(...i),n.lines.push(...r)}return n}var rae=1e5,Wz=.001,Uft=class extends yr{getSolverName(){return\"SingleHighDensityRouteStitchSolver\"}mergedHdRoute;remainingHdRoutes;start;end;colorMap;constructor(e){if(super(),this.remainingHdRoutes=[...e.hdRoutes],this.colorMap=e.colorMap??{},e.hdRoutes.length===0){this.start=e.start,this.end=e.end;const A=[{x:e.start.x,y:e.start.y,z:e.start.z}],c=[];return e.start.z!==e.end.z\u0026\u0026(A.push({x:e.start.x,y:e.start.y,z:e.end.z}),c.push({x:e.start.x,y:e.start.y})),A.push({x:e.end.x,y:e.end.y,z:e.end.z}),this.mergedHdRoute={connectionName:e.connectionName,rootConnectionName:e.hdRoutes[0]?.rootConnectionName,route:A,vias:c,jumpers:[],viaDiameter:e.defaultViaDiameter??.3,traceThickness:e.defaultTraceThickness??.15},void(this.solved=!0)}let n=1/0,o=e.hdRoutes[0],i=\"start-to-end\";for(const A of e.hdRoutes){const c=A.route[0],l=A.route[A.route.length-1],u=no(e.start,c),g=no(e.start,l),h=no(e.end,c),d=no(e.end,l),p=Math.min(u,g,h,d);p\u003cn\u0026\u0026(n=p,o=A,i=Math.min(h,d)\u003cMath.min(u,g)?\"end-to-start\":\"start-to-end\")}i===\"start-to-end\"?(this.start=e.start,this.end=e.end):(this.start=e.end,this.end=e.start);const r=o.route[0],s=o.route[o.route.length-1],a=no(this.start,r)\u003c=no(this.start,s)?r:s;this.mergedHdRoute={connectionName:e.connectionName,rootConnectionName:o.rootConnectionName,route:[{x:this.start.x,y:this.start.y,z:a.z}],vias:[],jumpers:[],viaDiameter:o.viaDiameter,traceThickness:o.traceThickness}}getDisjointedRoute(){for(const e of this.remainingHdRoutes)if([e.route[0],e.route[e.route.length-1]].some(n=\u003e!this.remainingHdRoutes.some(o=\u003eo===e?!1:[o.route[0],o.route[o.route.length-1]].some(i=\u003ei.z===n.z\u0026\u0026no(n,i)\u003c.001))))return{firstRoute:e};return{firstRoute:this.remainingHdRoutes[0]}}_step(){if(this.remainingHdRoutes.length===0){const a=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1];return this.mergedHdRoute.route.push({x:this.end.x,y:this.end.y,z:a.z}),void(this.solved=!0)}const e=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1];let n=-1,o=\"first\",i=1/0;for(let a=0;a\u003cthis.remainingHdRoutes.length;a++){const A=this.remainingHdRoutes[a],c=A.route[0],l=A.route[A.route.length-1],u=no(e,c),g=no(e,l);let h=1/0;h=e.z===c.z?u\u003cWz?u:rae+u:u\u003cWz?1e3+u:rae+u,h\u003ci\u0026\u0026(i=h,n=a,o=\"first\");let d=1/0;d=e.z===l.z?g\u003cWz?g:rae+g:g\u003cWz?1e3+g:rae+g,d\u003ci\u0026\u0026(i=d,n=a,o=\"last\")}if(n===-1)return void(this.remainingHdRoutes=[]);const r=this.remainingHdRoutes[n];let s;this.remainingHdRoutes.splice(n,1),s=o===\"first\"?r.route:[...r.route].reverse(),no(e,s[0])\u003cWz\u0026\u0026e.z===s[0].z?this.mergedHdRoute.route.push(...s.slice(1)):this.mergedHdRoute.route.push(...s),this.mergedHdRoute.vias.push(...r.vias),r.jumpers\u0026\u0026this.mergedHdRoute.jumpers.push(...r.jumpers)}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:\"Single High Density Route Stitch Solver\"};if(e.points?.push({x:this.start.x,y:this.start.y,color:\"green\",label:\"Start\"},{x:this.end.x,y:this.end.y,color:\"red\",label:\"End\"}),this.mergedHdRoute\u0026\u0026this.mergedHdRoute.route.length\u003e1){e.lines?.push({points:this.mergedHdRoute.route.map(n=\u003e({x:n.x,y:n.y})),strokeColor:\"green\"});for(const n of this.mergedHdRoute.route)e.points?.push({x:n.x,y:n.y,color:\"green\"});for(const n of this.mergedHdRoute.vias)e.circles?.push({center:{x:n.x,y:n.y},radius:this.mergedHdRoute.viaDiameter/2,fill:\"green\"});if(this.mergedHdRoute.jumpers\u0026\u0026this.mergedHdRoute.jumpers.length\u003e0){const n=_x(this.mergedHdRoute.jumpers,{color:\"green\",label:this.mergedHdRoute.connectionName});e.rects.push(...n.rects??[]),e.lines.push(...n.lines??[])}}for(const[n,o]of this.remainingHdRoutes.entries()){const i=this.colorMap[o.connectionName]??\"gray\";e.lines?.push({points:o.route.map(r=\u003e({x:r.x,y:r.y})),strokeColor:i});for(let r=0;r\u003co.route.length;r++){const s=o.route[r];e.points?.push({x:s.x+(n%2-.5)/500+(r%8-4)/1e3,y:s.y+(n%2-.5)/500+(r%8-4)/1e3,color:i,label:`Route ${o.connectionName} ${s===o.route[0]?\"First\":s===o.route[o.route.length-1]?\"Last\":\"\"}`})}for(const r of o.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:o.viaDiameter/2,fill:i});if(o.jumpers\u0026\u0026o.jumpers.length\u003e0){const r=_x(o.jumpers,{color:i,label:o.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}return e}},sL=t=\u003e`${Math.round(100*t.x)},${Math.round(100*t.y)},${Math.round(100*t.z)}`,AZn=t=\u003e({startHash:sL(t.route[0]),endHash:sL(t.route[t.route.length-1])}),j7e=class extends yr{getSolverName(){return\"MultipleHighDensityRouteStitchSolver\"}unsolvedRoutes;activeSolver=null;mergedHdRoutes=[];colorMap={};defaultTraceThickness;defaultViaDiameter;getClosestEndpointHash(e,n){let o=null,i=1/0;for(const r of e){const s=[r.route[0],r.route[r.route.length-1]];for(const a of s){const A=no(n,a);A\u003ci\u0026\u0026(i=A,o=sL(a))}}return o}selectRoutesAlongEndpointPath(e,n,o){if(e.length\u003c=2)return e;const i=this.getClosestEndpointHash(e,n),r=this.getClosestEndpointHash(e,o);if(!i||!r||i===r)return e;const s=new Map;for(let g=0;g\u003ce.length;g++){const{startHash:h,endHash:d}=AZn(e[g]),p=s.get(h)??[];p.push({nextHash:d,routeIndex:g}),s.set(h,p);const m=s.get(d)??[];m.push({nextHash:h,routeIndex:g}),s.set(d,m)}const a=[i],A=new Set([i]),c=new Map;for(;a.length\u003e0;){const g=a.shift();if(g===r)break;for(const h of s.get(g)??[])A.has(h.nextHash)||(A.add(h.nextHash),c.set(h.nextHash,{prevHash:g,routeIndex:h.routeIndex}),a.push(h.nextHash))}if(!A.has(r))return e;const l=new Set;let u=r;for(;u!==i;){const g=c.get(u);if(!g)return e;l.add(g.routeIndex),u=g.prevHash}return l.size===0?e:e.filter((g,h)=\u003el.has(h))}constructor(e){super(),this.colorMap=e.colorMap??{};const n=e.hdRoutes[0];this.defaultTraceThickness=n?.traceThickness??.15,this.defaultViaDiameter=n?.viaDiameter??e.defaultViaDiameter??.3;const o=new W7e({}),i=[],r=new Map;for(let A=0;A\u003ce.hdRoutes.length;A++){const c=e.hdRoutes[A],l=c.route[0],u=c.route[c.route.length-1];i.push([`route_island_${A}`,`${c.connectionName}:${sL(l)}`,`${c.connectionName}:${sL(u)}`])}o.addConnections(i);for(const A of i)for(const c of A.slice(1))r.set(c,(r.get(c)??0)+1);this.unsolvedRoutes=[];const s=Array.from(new Set(Object.values(o.idToNetMap)));for(const A of s){const c=o.getIdsConnectedToNet(A),l=e.hdRoutes.filter((_,f)=\u003ec.includes(`route_island_${f}`));if(l.length===0)continue;const u=e.connections.find(_=\u003e_.name===l[0].connectionName),g=l.flatMap(_=\u003e[_.route[0],_.route[_.route.length-1]]),h=[];for(const _ of g){const f=`${l[0].connectionName}:${sL(_)}`;r.get(f)===1\u0026\u0026h.push(_)}if(h.length===0){console.log(\"no possible endpoints, can't stitch\");continue}let d,p;h.length!==2?(d={...u.pointsToConnect[0],z:Kr(tI(u.pointsToConnect[0]),e.layerCount)},p={...u.pointsToConnect[1],z:Kr(tI(u.pointsToConnect[1]),e.layerCount)}):(d=h[0],p=h[1],no(d,u.pointsToConnect[1])\u003cno(p,u.pointsToConnect[0])\u0026\u0026([d,p]=[p,d]));const m=this.selectRoutesAlongEndpointPath(l,d,p);this.unsolvedRoutes.push({connectionName:l[0].connectionName,hdRoutes:m,start:d,end:p})}const a=new Map;for(const A of this.unsolvedRoutes){const c=a.get(A.connectionName);c?c.push(A):a.set(A.connectionName,[A])}this.unsolvedRoutes=Array.from(a.entries()).flatMap(([A,c])=\u003e{if(!c.some(d=\u003ed.hdRoutes.some(p=\u003ep.route.length\u003c2)))return c;const l=e.connections.find(d=\u003ed.name===A);if(!l)return c;const u={...l.pointsToConnect[0],z:Kr(tI(l.pointsToConnect[0]),e.layerCount)},g={...l.pointsToConnect[1],z:Kr(tI(l.pointsToConnect[1]),e.layerCount)},h=c.flatMap(d=\u003ed.hdRoutes);return[{connectionName:A,hdRoutes:this.selectRoutesAlongEndpointPath(h,u,g),start:u,end:g}]}),this.MAX_ITERATIONS=1e5}_step(){if(this.activeSolver)return this.activeSolver.step(),void(this.activeSolver.solved?(this.activeSolver instanceof Uft\u0026\u0026this.mergedHdRoutes.push(this.activeSolver.mergedHdRoute),this.activeSolver=null):this.activeSolver.failed\u0026\u0026(this.failed=!0,this.error=this.activeSolver.error));const e=this.unsolvedRoutes.pop();e?this.activeSolver=new Uft({connectionName:e.connectionName,hdRoutes:e.hdRoutes,start:e.start,end:e.end,colorMap:this.colorMap,defaultTraceThickness:this.defaultTraceThickness,defaultViaDiameter:this.defaultViaDiameter}):this.solved=!0}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:\"Multiple High Density Route Stitch Solver\"};if(this.activeSolver){const n=this.activeSolver.visualize();n.points?.length\u0026\u0026e.points?.push(...n.points),n.lines?.length\u0026\u0026e.lines?.push(...n.lines),n.circles?.length\u0026\u0026e.circles?.push(...n.circles),n.rects?.length\u0026\u0026(e.rects||(e.rects=[]),e.rects.push(...n.rects))}for(const[n,o]of this.mergedHdRoutes.entries()){const i=this.colorMap[o.connectionName]??`hsl(120, 100%, ${40+10*n%40}%)`;for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1],A=s.z!==0?Es(i,.5):i;e.lines?.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:A,strokeWidth:o.traceThickness})}for(const r of o.route){const s=r.z!==0?Es(i,.5):i;e.points?.push({x:r.x,y:r.y,color:s})}for(const r of o.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:o.viaDiameter/2,fill:i});if(o.jumpers\u0026\u0026o.jumpers.length\u003e0){const r=_x(o.jumpers,{color:i,label:o.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}for(const n of this.unsolvedRoutes){const o=this.colorMap[n.connectionName]??\"gray\";e.points?.push({x:n.start.x,y:n.start.y,color:o,label:`${n.connectionName} Start (z=${n.start.z})`},{x:n.end.x,y:n.end.y,color:o,label:`${n.connectionName} End (z=${n.end.z})`}),e.lines?.push({points:[{x:n.start.x,y:n.start.y},{x:n.end.x,y:n.end.y}],strokeColor:o,strokeDash:\"2 2\"});for(const i of n.hdRoutes){i.route.length\u003e1\u0026\u0026e.lines?.push({points:i.route.map(r=\u003e({x:r.x,y:r.y})),strokeColor:Es(o,.5),strokeDash:\"10 5\"});for(const r of i.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:i.viaDiameter/2,fill:o});if(i.jumpers\u0026\u0026i.jumpers.length\u003e0){const r=_x(i.jumpers,{color:o,label:i.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}}return e}},jz=class{tree;constructor(e=9){this.tree=new vz(e)}insert(e,n,o,i,r){this.tree.insert({minX:n,minY:o,maxX:i,maxY:r,data:e})}bulkLoad(e){const n=e.map(({item:o,minX:i,minY:r,maxX:s,maxY:a})=\u003e({minX:i,minY:r,maxX:s,maxY:a,data:o}));this.tree.load(n)}search(e,n,o,i){return this.tree.search({minX:e,minY:n,maxX:o,maxY:i}).map(r=\u003er.data)}clear(){this.tree.clear()}},Kft=class{index;items=[];currentIndex=0;capacity;constructor(e){this.capacity=Math.max(1,e),this.index=new X4(this.capacity)}insert(e,n,o,i,r){if(this.currentIndex\u003e=this.index.numItems)throw new Error(\"Exceeded initial capacity\");this.items[this.currentIndex]=e,this.index.add(n,o,i,r),this.currentIndex++}finish(){this.index.finish()}search(e,n,o,i){return this.index.search(e,n,o,i).map(r=\u003ethis.items[r]||null).filter(Boolean)}clear(){this.items=[],this.currentIndex=0,this.index=new X4(this.capacity)}},OD=class{idx;storage=[];constructor(e=\"native\",n=[]){e===\"flatbush\"?n.length===0?(this.idx=new jz,e=\"rbush\"):this.idx=new Kft(n.length):this.idx=e===\"rbush\"?new jz:new class{shi=new cZn(n);insert(o){}search(o,i,r,s){const a=(o+r)/2,A=(i+s)/2,c=r-o,l=s-i;return this.shi.getNodesInArea(a,A,c,l)}clear(){}},n.forEach(o=\u003ethis.insert(o)),e===\"flatbush\"\u0026\u0026n.length\u003e0\u0026\u0026this.idx.finish?.()}insert(e){this.storage.push(e),this.idx.insert(e,e.center.x-e.width/2,e.center.y-e.height/2,e.center.x+e.width/2,e.center.y+e.height/2)}search(e){return this.idx.search(e.minX,e.minY,e.maxX,e.maxY)}searchArea(e,n,o,i){return this.search({minX:e-o/2,minY:n-i/2,maxX:e+o/2,maxY:n+i/2})}},cZn=class{constructor(e){this.obstacles=e,this.buckets=new Map;for(let n=0;n\u003ce.length;n++){const o=e[n],i=o.center.x-o.width/2,r=o.center.y-o.height/2,s=o.center.x+o.width/2,a=o.center.y+o.height/2;for(let A=i;A\u003c=s;A+=this.CELL_SIZE)for(let c=r;c\u003c=a;c+=this.CELL_SIZE){const l=this.getBucketKey(A,c),u=this.buckets.get(l);u?u.push([o,n]):this.buckets.set(l,[[o,n]])}}}obstacles;buckets;CELL_SIZE=.4;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getNodesInArea(e,n,o,i){const r=[],s=new Set,a=n-i/2,A=e+o/2,c=n+i/2;for(let l=e-o/2;l\u003c=A;l+=this.CELL_SIZE)for(let u=a;u\u003c=c;u+=this.CELL_SIZE){const g=this.getBucketKey(l,u),h=this.buckets.get(g)||[];for(const d of h)s.has(d[1])||(s.add(d[1]),r.push(d[0]))}return r}},Vft=(t,e)=\u003e{const n=[],o=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y),r=e.x\u003et.x?1:-1,s=e.y\u003et.y?1:-1,a={x:e.x-r*Math.abs(e.y-t.y),y:t.y};(a.x-t.x)*r\u003e=0\u0026\u0026(a.x-e.x)*r\u003c=0\u0026\u0026n.push([t,a,e]);const A={x:t.x,y:e.y-s*Math.abs(e.x-t.x)};(A.y-t.y)*s\u003e=0\u0026\u0026(A.y-e.y)*s\u003c=0\u0026\u0026n.push([t,A,e]);const c=Math.min(o,i),l={x:t.x+r*c,y:t.y+s*c};return(l.x-t.x)*r\u003e=0\u0026\u0026(l.x-e.x)*r\u003c=0\u0026\u0026(l.y-t.y)*s\u003e=0\u0026\u0026(l.y-e.y)*s\u003c=0\u0026\u0026n.push([t,l,e]),n};function qQ(t,e,n,o){if(Uh(t,e,n,o))return 0;const i=sae(t,n,o),r=sae(e,n,o),s=sae(n,t,e),a=sae(o,t,e);return Math.min(i,r,s,a)}function sae(t,e,n){const o={x:n.x-e.x,y:n.y-e.y},i=zft({x:t.x-e.x,y:t.y-e.y},o);if(i\u003c=0)return $7e(t,e);const r=zft(o,o);if(r\u003c=i)return $7e(t,n);const s=i/r;return $7e(t,{x:e.x+s*o.x,y:e.y+s*o.y})}function zft(t,e){return t.x*e.x+t.y*e.y}function $7e(t,e){const n=e.x-t.x,o=e.y-t.y;return Math.sqrt(n*n+o*o)}var aae=1e-6,q7e=(t,e,n)=\u003ewc(t,e,n)\u003c=aae,Aae=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=aae\u0026\u0026Math.abs(t.y-e.y)\u003c=aae,X7e=(t,e)=\u003e{if(!e||e.length\u003c3)return!1;for(let o=0;o\u003ce.length;o++){const i=e[o],r=e[(o+1)%e.length];if(q7e(t,i,r))return!0}let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o],s=e[i];r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},$z=({start:t,end:e,polygon:n,margin:o=.2})=\u003e{if(!n||n.length\u003c3)return!1;const i=X7e(t,n),r=X7e(e,n);if(!i||!r)return!0;for(let s=0;s\u003cn.length;s++){const a=n[s],A=n[(s+1)%n.length],c=q7e(t,a,A),l=q7e(e,a,A);if(c\u0026\u0026l)continue;if(!Uh(t,e,a,A)){if(!c\u0026\u0026!l\u0026\u0026qQ(t,e,a,A)\u003co-aae)return!0;continue}const u=DD(t,e,a,A);if((!u||!(c\u0026\u0026Aae(u,t)||l\u0026\u0026Aae(u,e)))\u0026\u0026(!u||!Aae(u,t)\u0026\u0026!Aae(u,e)))return!0}return!1},qz=t=\u003e{const e=[],n=t.route;if(n.length===0)return[];let o={startIndex:0,endIndex:-1,z:n[0].z,points:[n[0]]};for(let i=1;i\u003cn.length;i++)n[i].z===o.z?o.points.push(n[i]):(o.endIndex=i-1,e.push(o),o={startIndex:i,endIndex:-1,z:n[i].z,points:[n[i]]});return o.endIndex=n.length-1,e.push(o),e},Jft=({endpointX:t,endpointY:e,targetZ:n,endpointPcbPortId:o,terminalLayerIndicesByPcbPortId:i,obstacleSHI:r,route:s,connMap:a})=\u003e{const A=o?i?.get(o):void 0;if(A\u0026\u0026!A.has(n))return!1;const c=[s.connectionName,s.rootConnectionName].filter(u=\u003eu!==void 0),l=r.searchArea(t,e,2,2).filter(u=\u003e{if(!c.some(m=\u003eu.connectedTo.some(_=\u003e_===m||a.areIdsConnected(m,_))))return!1;const g=u.width/2+.05,h=u.height/2+.05,d=Math.abs(t-u.center.x)\u003c=g,p=Math.abs(e-u.center.y)\u003c=h;return d\u0026\u0026p});return l.length\u003e0\u0026\u0026l.some(u=\u003eu.__zLayers?.includes(n))},GD=({currentSection:t,targetZ:e,route:n,hdRouteSHI:o,obstacleSHI:i,connMap:r,defaultTraceThickness:s,obstacleMargin:a,traceMargin:A,shouldCheckStaticGeometryForSegment:c})=\u003e{const l=n.traceThickness??s,u=A??0,g=[n.connectionName,n.rootConnectionName].filter(h=\u003eh!==void 0);for(let h=0;h\u003ct.points.length-1;h++){const d={...t.points[h],z:e},p={...t.points[h+1],z:e},m=o.getConflictingRoutesForSegment(d,p,l/2+u);for(const{conflictingRoute:C,distance:y}of m){const x=[C.connectionName,C.rootConnectionName].filter(B=\u003eB!==void 0);if(g.some(B=\u003ex.some(S=\u003eS===B||r.areIdsConnected(S,B))))continue;const E=C.traceThickness??s;if(y\u003cl/2+(u\u003e0?Math.max(E/2,C.viaDiameter/2):E/2)+u)return!1}if(c?.(d,p)===!1)continue;const _={centerX:(d.x+p.x)/2,centerY:(d.y+p.y)/2,width:Math.abs(d.x-p.x),height:Math.abs(d.y-p.y)},f=l/2+a,I=i.searchArea(_.centerX,_.centerY,_.width+2*f,_.height+2*f);for(const C of I)if(!g.some(y=\u003eC.connectedTo.some(x=\u003ex===y||r.areIdsConnected(x,y)))\u0026\u0026!(C.__zLayers?.includes(e)\u0026\u0026(Math.abs(d.x-C.center.x)\u003c.01\u0026\u0026Math.abs(d.y-C.center.y)\u003c.01||Math.abs(p.x-C.center.x)\u003c.01\u0026\u0026Math.abs(p.y-C.center.y)\u003c.01))\u0026\u0026K8(d,p,C)\u003cf)return!1}return!0},lZn=class extends yr{getSolverName(){return\"SingleRouteUselessViaRemovalSolver\"}obstacleSHI;hdRouteSHI;unsimplifiedRoute;connMap;outline;terminalLayerIndicesByPcbPortId;routeSections;currentSectionIndex;TRACE_THICKNESS=.15;OBSTACLE_MARGIN=.1;GEOMETRY_SHORTCUT_TRACE_MARGIN=.1;GEOMETRY_SHORTCUT_OBSTACLE_MARGIN=.15;MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH=4;ENABLE_GEOMETRY_SHORTCUTS=!0;ENABLE_OBSTACLE_DETOUR_SHORTCUTS=!1;PRESERVE_ROUTE_ENDPOINTS=!1;geometryShortcutsApplied=0;multilayerSectionsCollapsed=0;obstacleDetourCandidatesValidated=0;constructor(e){super(),this.currentSectionIndex=0,this.obstacleSHI=e.obstacleSHI,this.hdRouteSHI=e.hdRouteSHI,this.unsimplifiedRoute=e.unsimplifiedRoute,this.connMap=e.connMap,this.outline=e.outline,this.terminalLayerIndicesByPcbPortId=e.terminalLayerIndicesByPcbPortId,this.GEOMETRY_SHORTCUT_TRACE_MARGIN=e.geometryShortcutTraceMargin??this.GEOMETRY_SHORTCUT_TRACE_MARGIN,this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN=e.geometryShortcutObstacleMargin??this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,this.ENABLE_GEOMETRY_SHORTCUTS=e.enableGeometryShortcuts??!0,this.ENABLE_OBSTACLE_DETOUR_SHORTCUTS=e.enableObstacleDetourShortcuts??!1,this.PRESERVE_ROUTE_ENDPOINTS=e.preserveRouteEndpoints??!1,this.routeSections=qz(this.unsimplifiedRoute)}getPathLength(e){let n=0;for(let o=1;o\u003ce.length;o++)n+=Math.hypot(e[o].x-e[o-1].x,e[o].y-e[o-1].y);return n}normalizeShortcutPath(e,n,o){const i=e.filter((r,s)=\u003e{const a=e[s-1];return!a||r.x!==a.x||r.y!==a.y});return i.map((r,s)=\u003es===0?{...n}:s===i.length-1?{...o}:{x:r.x,y:r.y,z:n.z})}shortcutCrossesOutline(e){if(!this.outline||this.outline.length\u003c3)return!1;for(let n=1;n\u003ce.length;n++)if($z({start:e[n-1],end:e[n],polygon:this.outline}))return!0;return!1}getObstacleDetourPaths(e,n,o,i){const r=(this.unsimplifiedRoute.traceThickness??this.TRACE_THICKNESS)/2+this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN+1e-6,s=this.MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH/2+r,a=Math.min(e.x,n.x)-s,A=Math.max(e.x,n.x)+s,c=Math.min(e.y,n.y)-s,l=Math.max(e.y,n.y)+s,u=this.obstacleSHI.search({minX:a,minY:c,maxX:A,maxY:l}).filter(_=\u003e_.__zLayers?.includes(o));if(u.length===0)return[];const g=new Set,h=new Set;for(const _ of u)g.add(_.center.x-_.width/2-r),g.add(_.center.x+_.width/2+r),h.add(_.center.y-_.height/2-r),h.add(_.center.y+_.height/2+r);const d=[],p=new Set,m=_=\u003e{let f=0;for(let E=1;E\u003c_.length;E++)f+=Math.hypot(_[E].x-_[E-1].x,_[E].y-_[E-1].y);if(f\u003ei)return;const I=this.normalizeShortcutPath(_,e,n);let C=0,y=-1;for(let E=0;E\u003cI.length-1;E++){const B=I[E+1].x-I[E].x,S=I[E+1].y-I[E].y,Q=B*B+S*S;Q\u003ey\u0026\u0026(C=E,y=Q)}const x=I.map(E=\u003e`${E.x}:${E.y}`).join(\"|\");p.has(x)||(p.add(x),d.push({path:I,length:f,longestSegmentIndex:C}))};for(const _ of h)m([e,{x:e.x,y:_},{x:n.x,y:_},n]);for(const _ of g)m([e,{x:_,y:e.y},{x:_,y:n.y},n]);return d}getDirectGeometryShortcut(e,n,o){let i=null;for(let r=0;r\u003ce.points.length;r++){const s=e.points[r];for(let a=0;a\u003co.points.length;a++){const A=o.points[a],c=[...e.points.slice(r),...n.points,...o.points.slice(0,a+1)];if(!c.some(l=\u003el.insideJumperPad||l.toNextSegmentType))for(const l of Vft(s,A)){const u=this.normalizeShortcutPath(l,s,A),g=this.getPathLength(c)-this.getPathLength(u);if(g\u003c-1e-6||this.shortcutCrossesOutline(u))continue;const h={startIndex:e.startIndex+r,endIndex:o.startIndex+a,z:e.z,points:u};GD({currentSection:h,targetZ:e.z,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,traceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN})\u0026\u0026(!i||g\u003ei.savedLength)\u0026\u0026(i={path:u,previousPointIndex:r,nextPointIndex:a,savedLength:g})}}}return i}getObstacleDetourShortcut(e,n,o){const i=e.points.length-1,r=[];for(let l=0;l\u003c=i;l++)r.push([l,0]);for(let l=1;l\u003co.points.length;l++)r.push([i,l]);const s=[];for(const[l,u]of r){const g=e.points[l],h=o.points[u],d=[...e.points.slice(l),...n.points,...o.points.slice(0,u+1)];if(d.some(m=\u003em.insideJumperPad||m.toNextSegmentType))continue;const p=this.getPathLength(d);for(const{path:m,length:_,longestSegmentIndex:f}of this.getObstacleDetourPaths(g,h,e.z,p+this.MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH+1e-6)){const I=p-_;I\u003c-this.MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH-1e-6||s.push({path:m,previousPointIndex:l,nextPointIndex:u,savedLength:I,validationFirstSegmentIndex:f})}}s.sort((l,u)=\u003eu.savedLength-l.savedLength);let a=0;const A=s.length\u003e=256,c=(({targetZ:l,route:u,hdRouteSHI:g,obstacleSHI:h,connMap:d,defaultTraceThickness:p,obstacleMargin:m,traceMargin:_,useNumericSegmentKeys:f})=\u003e{const I=u.traceThickness??p,C=I/2+_,y=I/2+m,x=u.connectionName,E=u.rootConnectionName,B=new Map,S=new WeakMap,Q=new WeakMap,w=f?new Map:void 0;let M=0;const k=O=\u003e{let U=w.get(O.x);U||(U=new Map,w.set(O.x,U));let Y=U.get(O.y);return Y===void 0\u0026\u0026(Y=M++,U.set(O.y,Y)),Y},R=(O,U)=\u003e{if(f){const Y=k(O),W=k(U),te=Math.max(Y,W);return te*(te+1)/2+Math.min(Y,W)}return O.x\u003cU.x||O.x===U.x\u0026\u0026O.y\u003c=U.y?`${O.x}:${O.y}|${U.x}:${U.y}`:`${U.x}:${U.y}|${O.x}:${O.y}`},F=O=\u003eO===x||d.areIdsConnected(O,x)||E!==void 0\u0026\u0026(O===E||d.areIdsConnected(O,E));return(O,U)=\u003e{const Y=O.length-1;for(let W=0;W\u003cY;W++){const te=W-1,j=U===0?W:W===0?U:te\u003e=U?te+1:te,J=O[j],oe=O[j+1],ie=R(J,oe),ne=B.get(ie);if(ne!==void 0){if(!ne)return!1;continue}const le=J.z===l?J:{...J,z:l},ge=oe.z===l?oe:{...oe,z:l},_e={centerX:(le.x+ge.x)/2,centerY:(le.y+ge.y)/2,width:Math.abs(le.x-ge.x),height:Math.abs(le.y-ge.y)},ue=h.searchArea(_e.centerX,_e.centerY,_e.width+2*y,_e.height+2*y);for(const pe of ue){let ye=S.get(pe);if(ye===void 0\u0026\u0026(ye=pe.connectedTo.some(F),S.set(pe,ye)),!ye\u0026\u0026(!pe.__zLayers?.includes(l)||!(Math.abs(le.x-pe.center.x)\u003c.01\u0026\u0026Math.abs(le.y-pe.center.y)\u003c.01||Math.abs(ge.x-pe.center.x)\u003c.01\u0026\u0026Math.abs(ge.y-pe.center.y)\u003c.01))\u0026\u0026K8(le,ge,pe)\u003cy)return B.set(ie,!1),!1}const fe=g.getConflictingRoutesForSegment(le,ge,C);for(const{conflictingRoute:pe,distance:ye}of fe){let Me=Q.get(pe);if(Me===void 0\u0026\u0026(Me=F(pe.connectionName)||pe.rootConnectionName!==void 0\u0026\u0026F(pe.rootConnectionName),Q.set(pe,Me)),Me)continue;const ve=pe.traceThickness??p,he=Math.max(ve/2,pe.viaDiameter/2);if(ye\u003cI/2+he+_)return B.set(ie,!1),!1}B.set(ie,!0)}return!0}})({targetZ:e.z,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,traceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN,useNumericSegmentKeys:A});for(const l of s){a++;const{path:u}=l;if(c(u,l.validationFirstSegmentIndex??0)\u0026\u0026!this.shortcutCrossesOutline(u))return this.obstacleDetourCandidatesValidated+=a,this.stats.obstacleDetourCandidatesValidated=this.obstacleDetourCandidatesValidated,l}return this.obstacleDetourCandidatesValidated+=a,this.stats.obstacleDetourCandidatesValidated=this.obstacleDetourCandidatesValidated,null}findGeometryShortcut(e,n,o){if(this.unsimplifiedRoute.jumpers?.length)return null;if(this.ENABLE_GEOMETRY_SHORTCUTS){const i=this.getDirectGeometryShortcut(e,n,o);if(i)return i}return this.ENABLE_OBSTACLE_DETOUR_SHORTCUTS?this.getObstacleDetourShortcut(e,n,o):null}applyGeometryShortcut(e){const n=this.routeSections[this.currentSectionIndex-1],o=this.routeSections[this.currentSectionIndex+1],i=[...n.points.slice(0,e.previousPointIndex),...e.path,...o.points.slice(e.nextPointIndex+1)].filter((r,s,a)=\u003e{const A=a[s-1];return!A||r.x!==A.x||r.y!==A.y||r.z!==A.z});this.routeSections.splice(this.currentSectionIndex-1,3,{startIndex:n.startIndex,endIndex:o.endIndex,z:n.z,points:i}),this.geometryShortcutsApplied++,this.stats.geometryShortcutsApplied=this.geometryShortcutsApplied,this.stats.viasRemovedByGeometryShortcuts=2*this.geometryShortcutsApplied,this.currentSectionIndex=Math.max(0,this.currentSectionIndex-1)}findMultilayerSectionCollapse(e,n,o){if(e.z===o.z||this.unsimplifiedRoute.jumpers?.length)return null;const i=e.points[e.points.length-1];if(i?.insideJumperPad||i?.toNextSegmentType||n.points.some(s=\u003es.insideJumperPad||s.toNextSegmentType))return null;const r=[{targetZ:e.z,mergeWith:\"previous\"},{targetZ:o.z,mergeWith:\"next\"}];for(const s of r)if(s.targetZ!==n.z\u0026\u0026GD({currentSection:n,targetZ:s.targetZ,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,traceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN}))return s;return null}applyMultilayerSectionCollapse(e){const n=this.routeSections[this.currentSectionIndex-1],o=this.routeSections[this.currentSectionIndex],i=this.routeSections[this.currentSectionIndex+1],r=o.points.map(a=\u003e({...a,z:e.targetZ})),s=a=\u003ea.filter((A,c)=\u003e{const l=a[c-1];return!l||A.x!==l.x||A.y!==l.y||A.z!==l.z});e.mergeWith===\"previous\"?this.routeSections.splice(this.currentSectionIndex-1,2,{startIndex:n.startIndex,endIndex:o.endIndex,z:e.targetZ,points:s([...n.points,...r])}):this.routeSections.splice(this.currentSectionIndex,2,{startIndex:o.startIndex,endIndex:i.endIndex,z:e.targetZ,points:s([...r,...i.points])}),this.multilayerSectionsCollapsed++,this.stats.multilayerSectionsCollapsed=this.multilayerSectionsCollapsed,this.stats.viasRemovedByMultilayerSectionCollapses=this.multilayerSectionsCollapsed,this.currentSectionIndex=Math.max(0,this.currentSectionIndex-1)}_step(){if(this.currentSectionIndex\u003e=this.routeSections.length)return void(this.solved=!0);if(this.currentSectionIndex===0\u0026\u0026this.routeSections.length\u003e1){const s=this.routeSections[0],a=this.routeSections[1];if(!this.PRESERVE_ROUTE_ENDPOINTS\u0026\u0026s.z!==a.z){const A=a.z,c=s.points[0];if(Jft({endpointX:c.x,endpointY:c.y,targetZ:A,endpointPcbPortId:this.unsimplifiedRoute.startPcbPortId,terminalLayerIndicesByPcbPortId:this.terminalLayerIndicesByPcbPortId,obstacleSHI:this.obstacleSHI,route:this.unsimplifiedRoute,connMap:this.connMap})\u0026\u0026GD({currentSection:s,targetZ:A,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.OBSTACLE_MARGIN}))return s.z=A,s.points=s.points.map(l=\u003e({...l,z:A})),void(this.currentSectionIndex=2)}return void this.currentSectionIndex++}if(this.currentSectionIndex===this.routeSections.length-1){if(!this.PRESERVE_ROUTE_ENDPOINTS\u0026\u0026this.routeSections.length\u003e=2){const s=this.routeSections[this.routeSections.length-1],a=this.routeSections[this.routeSections.length-2];if(s.z!==a.z){const A=a.z,c=s.points[s.points.length-1];Jft({endpointX:c.x,endpointY:c.y,targetZ:A,endpointPcbPortId:this.unsimplifiedRoute.endPcbPortId,terminalLayerIndicesByPcbPortId:this.terminalLayerIndicesByPcbPortId,obstacleSHI:this.obstacleSHI,route:this.unsimplifiedRoute,connMap:this.connMap})\u0026\u0026GD({currentSection:s,targetZ:A,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.OBSTACLE_MARGIN})\u0026\u0026(s.z=A,s.points=s.points.map(l=\u003e({...l,z:A})))}}return void(this.solved=!0)}const e=this.routeSections[this.currentSectionIndex-1],n=this.routeSections[this.currentSectionIndex],o=this.routeSections[this.currentSectionIndex+1];if(e.z!==o.z){const s=this.findMultilayerSectionCollapse(e,n,o);return s?void this.applyMultilayerSectionCollapse(s):void this.currentSectionIndex++}const i=e.z;if(GD({currentSection:n,targetZ:i,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.OBSTACLE_MARGIN}))return n.z=i,n.points=n.points.map(s=\u003e({...s,z:i})),void(this.currentSectionIndex+=2);const r=this.findGeometryShortcut(e,n,o);r?this.applyGeometryShortcut(r):this.currentSectionIndex++}getConstructorParams(){return{obstacleSHI:this.obstacleSHI,hdRouteSHI:this.hdRouteSHI,unsimplifiedRoute:this.unsimplifiedRoute,connMap:this.connMap,outline:this.outline,geometryShortcutTraceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN,geometryShortcutObstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,enableGeometryShortcuts:this.ENABLE_GEOMETRY_SHORTCUTS,enableObstacleDetourShortcuts:this.ENABLE_OBSTACLE_DETOUR_SHORTCUTS,preserveRouteEndpoints:this.PRESERVE_ROUTE_ENDPOINTS,terminalLayerIndicesByPcbPortId:this.terminalLayerIndicesByPcbPortId}}getOptimizedHdRoute(){const e=this.routeSections.flatMap(o=\u003eo.points),n=[];for(let o=0;o\u003ce.length-1;o++)e[o].z!==e[o+1].z\u0026\u0026n.push({x:e[o].x,y:e[o].y});return{connectionName:this.unsimplifiedRoute.connectionName,rootConnectionName:this.unsimplifiedRoute.rootConnectionName,startPcbPortId:this.unsimplifiedRoute.startPcbPortId,endPcbPortId:this.unsimplifiedRoute.endPcbPortId,route:e,traceThickness:this.unsimplifiedRoute.traceThickness,vias:n,viaDiameter:this.unsimplifiedRoute.viaDiameter,jumpers:this.unsimplifiedRoute.jumpers}}visualize(){const e={circles:[],lines:[],points:[],rects:[],coordinateSystem:\"cartesian\",title:\"Single Route Useless Via Removal Solver\"};for(let n=0;n\u003cthis.routeSections.length;n++){const o=this.routeSections[n];e.lines.push({points:o.points,strokeWidth:this.TRACE_THICKNESS,strokeColor:n===this.currentSectionIndex?\"orange\":o.z===0?\"red\":\"blue\"})}return e}},uZn=class extends yr{constructor(e){super(),this.input=e,this.input={...e,obstacles:c7(e.obstacles,e.layerCount)},this.MAX_ITERATIONS=1e6,this.unsimplifiedHdRoutes=e.unsimplifiedHdRoutes,this.optimizedHdRoutes=[],this.unprocessedRoutes=[...e.unsimplifiedHdRoutes],this.obstacleSHI=new OD(\"flatbush\",this.input.obstacles),this.hdRouteSHI=new oB([...this.unsimplifiedHdRoutes,...e.otherHdRoutes??[]])}input;getSolverName(){return\"UselessViaRemovalSolver\"}unsimplifiedHdRoutes;optimizedHdRoutes;unprocessedRoutes;activeSubSolver=null;obstacleSHI=null;hdRouteSHI=null;_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const n=this.activeSubSolver.getOptimizedHdRoute();this.hdRouteSHI.removeRoute(n.connectionName),this.hdRouteSHI.addRoute(n),this.optimizedHdRoutes.push(n),this.activeSubSolver=null}else(this.activeSubSolver.failed||this.activeSubSolver.error)\u0026\u0026(this.error=this.activeSubSolver.error,this.failed=!0);return}const e=this.unprocessedRoutes.shift();e?this.activeSubSolver=new lZn({hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,unsimplifiedRoute:e,connMap:this.input.connMap,outline:this.input.outline,geometryShortcutTraceMargin:this.input.geometryShortcutTraceMargin,geometryShortcutObstacleMargin:this.input.geometryShortcutObstacleMargin,enableGeometryShortcuts:this.input.enableGeometryShortcuts,enableObstacleDetourShortcuts:this.input.enableObstacleDetourShortcuts,preserveRouteEndpoints:this.input.preserveRouteEndpoints,terminalLayerIndicesByPcbPortId:this.input.terminalLayerIndicesByPcbPortId}):this.solved=!0}getOptimizedHdRoutes(){return this.optimizedHdRoutes}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Useless Via Removal Solver\"};for(const n of this.input.obstacles){let o=\"rgba(128, 128, 128, 0.2)\";const i=n.__zLayers?.includes(0),r=n.__zLayers?.includes(1);i\u0026\u0026r?o=\"rgba(128, 0, 128, 0.2)\":i?o=\"rgba(255, 0, 0, 0.2)\":r\u0026\u0026(o=\"rgba(0, 0, 255, 0.2)\"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(\", \")})`})}for(const n of this.optimizedHdRoutes){if(n.route.length===0)continue;const o=this.input.colorMap[n.connectionName]||\"#888888\";for(let i=0;i\u003cn.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.z===s.z\u0026\u0026e.lines.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:r.z===0?\"red\":\"blue\",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${r.z})`})}for(const i of n.vias)e.circles.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,fill:\"rgba(255, 0, 255, 0.5)\",label:`${n.connectionName} via`});if(n.jumpers\u0026\u0026n.jumpers.length\u003e0){const i=_x(n.jumpers,{color:o,label:n.connectionName});e.rects.push(...i.rects??[]),e.lines.push(...i.lines??[])}}return this.activeSubSolver\u0026\u0026e.lines.push(...this.activeSubSolver.visualize().lines??[]),e}},gZn=class extends yr{getSolverName(){return\"SingleSimplifiedPathSolver\"}newRoute;newVias;headIndex=0;tailIndex=0;inputRoute;otherHdRoutes;obstacles;connMap;colorMap;outline;minBoardEdgeClearance;constructor(e){super(),this.inputRoute=e.inputRoute,this.otherHdRoutes=e.otherHdRoutes,this.obstacles=e.obstacles,this.connMap=e.connMap,this.colorMap=e.colorMap,this.outline=e.outline,this.minBoardEdgeClearance=e.minBoardEdgeClearance??.2,this.newRoute=[this.inputRoute.route[0]],this.newVias=[]}getConstructorParams(){return{inputRoute:this.inputRoute,otherHdRoutes:this.otherHdRoutes,obstacles:this.obstacles,connMap:this.connMap.netMap,colorMap:this.colorMap,outline:this.outline,minBoardEdgeClearance:this.minBoardEdgeClearance}}get simplifiedRoute(){return{connectionName:this.inputRoute.connectionName,rootConnectionName:this.inputRoute.rootConnectionName,startPcbPortId:this.inputRoute.startPcbPortId,endPcbPortId:this.inputRoute.endPcbPortId,traceThickness:this.inputRoute.traceThickness,viaDiameter:this.inputRoute.viaDiameter,route:this.newRoute,vias:this.newVias,jumpers:this.inputRoute.jumpers}}isValidPath(e){throw new Error(\"Not implemented\")}_step(){throw new Error(\"Not implemented\")}getVisualsForNewRouteAndObstacles(){const e={lines:[],points:[],circles:[],rects:[],coordinateSystem:\"cartesian\",title:\"Simplified Path Solver\"};for(let n=0;n\u003cthis.inputRoute.route.length-1;n++)e.lines.push({points:[{x:this.inputRoute.route[n].x,y:this.inputRoute.route[n].y},{x:this.inputRoute.route[n+1].x,y:this.inputRoute.route[n+1].y}],strokeColor:\"rgba(255, 0, 0, 0.8)\",strokeDash:this.inputRoute.route[n].z===1?\"5, 5\":void 0,layer:`z${this.inputRoute.route[n].z.toString()}`});for(let n=0;n\u003cthis.newRoute.length;n++)n\u003cthis.newRoute.length-1\u0026\u0026e.lines.push({points:[{x:this.newRoute[n].x,y:this.newRoute[n].y},{x:this.newRoute[n+1].x,y:this.newRoute[n+1].y}],strokeWidth:.15,strokeColor:\"rgba(0, 255, 0, 0.8)\",strokeDash:this.newRoute[n].z===1?[.4,.4]:void 0,layer:`z${this.newRoute[n].z.toString()}`}),e.points.push({x:this.newRoute[n].x,y:this.newRoute[n].y,color:\"rgba(0, 255, 0, 0.8)\",label:`z: ${this.newRoute[n].z}`,layer:`z${this.newRoute[n].z.toString()}`});for(const n of this.newVias)e.circles.push({center:n,radius:this.inputRoute.viaDiameter/2,fill:\"rgba(0, 0, 255, 0.5)\"});for(const n of this.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:n.layers?.includes(\"top\")?\"rgba(255, 0, 0, 0.3)\":n.layers?.includes(\"bottom\")?\"rgba(0, 0, 255, 0.3)\":\"rgba(128, 128, 128, 0.3)\"});for(const n of this.otherHdRoutes)for(let o=0;o\u003cn.route.length-1;o++)e.lines.push({points:[{x:n.route[o].x,y:n.route[o].y},{x:n.route[o+1].x,y:n.route[o+1].y}],strokeWidth:.15,strokeColor:n.route[o].z===0?\"rgba(255, 0, 255, 0.5)\":n.route[o].z===1?\"rgba(128, 0, 128, 0.5)\":\"rgba(0, 0, 255, 0.5)\",layer:`z${n.route[o].z.toString()}`});if(\"filteredObstaclePathSegments\"in this){const n=this.filteredObstaclePathSegments;for(const[o,i]of n)e.lines.push({points:[o,i]})}return e}},dZn=t=\u003e({minX:Math.min(t[0].x,t[1].x),maxX:Math.max(t[0].x,t[1].x),minY:Math.min(t[0].y,t[1].y),maxY:Math.max(t[0].y,t[1].y)}),Wft=class{constructor(e,n=.4){this.segments=e,this.buckets=new Map,this.SEGMENT_MARGIN=n;const o=new Map;for(const i of e){const r=this.getSegmentKey(i);if(o.has(r))continue;o.set(r,i);const s=dZn(i),a=Math.floor(s.minX/this.CELL_SIZE),A=Math.floor(s.maxX/this.CELL_SIZE),c=Math.floor(s.minY/this.CELL_SIZE),l=Math.floor(s.maxY/this.CELL_SIZE);for(let u=a;u\u003c=A;u++)for(let g=c;g\u003c=l;g++){const h=`${u}x${g}`,d=this.buckets.get(h),p=[i[0],i[1],r];d?d.push(p):this.buckets.set(h,[p])}}}segments;buckets;CELL_SIZE=.4;SEGMENT_MARGIN;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getSegmentKey(e){return`${e[0].x}-${e[0].y}-${e[0].z}-${e[1].x}-${e[1].y}-${e[1].z}`}getSegmentsThatCouldIntersect(e,n){const o=[],i=new Set,r=Math.min(e.x,n.x)-this.SEGMENT_MARGIN,s=Math.min(e.y,n.y)-this.SEGMENT_MARGIN,a=Math.max(e.x,n.x)+this.SEGMENT_MARGIN,A=Math.max(e.y,n.y)+this.SEGMENT_MARGIN,c=Math.floor(r/this.CELL_SIZE),l=Math.floor(a/this.CELL_SIZE),u=Math.floor(s/this.CELL_SIZE),g=Math.floor(A/this.CELL_SIZE);for(let h=c;h\u003c=l;h++)for(let d=u;d\u003c=g;d++){const p=`${h}x${d}`,m=this.buckets.get(p);if(m)for(const _ of m){const f=_[2];i.has(f)||(i.add(f),o.push(_))}}return o}},hZn=class extends gZn{pathSegments=[];totalPathLength=0;headDistanceAlongPath=0;tailDistanceAlongPath=0;minStepSize=.25;lastValidPath=null;lastValidPathHeadDistance=0;STEP_SIZE_REDUCTION_FACTOR=.25;maxStepSize=4;currentStepSize=this.maxStepSize;lastHeadMoveDistance=0;cachedValidPathSegments;filteredObstacles=[];filteredObstaclePathSegments=[];traceThicknessByObstacleSegmentId=new Map;filteredVias=[];filteredJumperPads=[];jumperPadPointIndices=new Set;segmentTree;OBSTACLE_MARGIN=.1;TRACE_THICKNESS=.15;useTraceWidthAwareClearance=!1;clearanceTraceThickness=this.TRACE_THICKNESS;TAIL_JUMP_RATIO=.8;isSameNetRoute(e){const n=[this.inputRoute.connectionName,this.inputRoute.rootConnectionName].filter(i=\u003ei!==void 0),o=[e.connectionName,e.rootConnectionName].filter(i=\u003ei!==void 0);return n.some(i=\u003eo.some(r=\u003ei===r||this.connMap.areIdsConnected(i,r)))}constructor(e){if(super(e),this.cachedValidPathSegments=new Set,this.useTraceWidthAwareClearance=e.useTraceWidthAwareClearance??!1,this.clearanceTraceThickness=this.useTraceWidthAwareClearance?this.inputRoute.traceThickness:this.TRACE_THICKNESS,this.inputRoute.route.length\u003c=1)return this.newRoute=[...this.inputRoute.route],void(this.solved=!0);const n=this.inputRoute.route.reduce((a,A)=\u003e(a.minX=Math.min(a.minX,A.x),a.maxX=Math.max(a.maxX,A.x),a.minY=Math.min(a.minY,A.y),a.maxY=Math.max(a.maxY,A.y),a),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0}),o=this.useTraceWidthAwareClearance?Math.max(0,...this.otherHdRoutes.flatMap(a=\u003e[a.traceThickness,...a.route.map(A=\u003eA.traceThickness??a.traceThickness)])):this.TRACE_THICKNESS,i=this.useTraceWidthAwareClearance?this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2+o/2:this.OBSTACLE_MARGIN+this.TRACE_THICKNESS,r={center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY};this.filteredObstacles=this.obstacles.filter(a=\u003e!a.connectedTo.some(A=\u003ethis.connMap.areIdsConnected(this.inputRoute.connectionName,A))).filter(a=\u003ea.connectedTo.some(A=\u003ethis.connMap.areIdsConnected(this.inputRoute.connectionName,A))?!1:(function(A,c){const l=Is(A),u=Is(c),g=Math.max(l.minX-u.maxX,u.minX-l.maxX,0),h=Math.max(l.minY-u.maxY,u.minY-l.maxY,0);return Math.hypot(g,h)})(r,a)\u003cthis.OBSTACLE_MARGIN+this.clearanceTraceThickness/2),this.filteredObstaclePathSegments=this.otherHdRoutes.flatMap(a=\u003e{if(this.isSameNetRoute(a))return[];const A=a.route,c=[];for(let l=0;l\u003cA.length-1;l++){const u=A[l],g=A[l+1];if(Dz(u,g,n)\u003c=i){c.push([u,g]);const h=`${u.x}-${u.y}-${u.z}-${g.x}-${g.y}-${g.z}`;if(this.useTraceWidthAwareClearance){const d=Math.max(u.traceThickness??a.traceThickness,g.traceThickness??a.traceThickness);this.traceThicknessByObstacleSegmentId.set(h,Math.max(this.traceThicknessByObstacleSegmentId.get(h)??0,d))}}}return c}),this.segmentTree=this.useTraceWidthAwareClearance?new Wft(this.filteredObstaclePathSegments,i):new Wft(this.filteredObstaclePathSegments),this.filteredVias=this.otherHdRoutes.flatMap(a=\u003e{if(this.isSameNetRoute(a))return[];const A=a.vias,c=[];for(const l of A){const u=this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2+a.viaDiameter/2,g=l.x-u,h=l.x+u,d=l.y-u,p=l.y+u;g\u003c=n.maxX\u0026\u0026h\u003e=n.minX\u0026\u0026d\u003c=n.maxY\u0026\u0026p\u003e=n.minY\u0026\u0026c.push({...l,diameter:a.viaDiameter})}return c});const s=(a,A)=\u003e{const c=[];for(const l of a){const u=W8[l.footprint]??W8[\"0603\"],g=l.end.x-l.start.x,h=l.end.y-l.start.y,d=Math.abs(g)\u003eMath.abs(h),p=d?u.padLength:u.padWidth,m=d?u.padWidth:u.padLength,_=this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2;l.start.x-p/2-_\u003c=n.maxX\u0026\u0026l.start.x+p/2+_\u003e=n.minX\u0026\u0026l.start.y-m/2-_\u003c=n.maxY\u0026\u0026l.start.y+m/2+_\u003e=n.minY\u0026\u0026c.push({center:l.start,width:p,height:m,connectionName:A}),l.end.x-p/2-_\u003c=n.maxX\u0026\u0026l.end.x+p/2+_\u003e=n.minX\u0026\u0026l.end.y-m/2-_\u003c=n.maxY\u0026\u0026l.end.y+m/2+_\u003e=n.minY\u0026\u0026c.push({center:l.end,width:p,height:m,connectionName:A})}return c};if(this.filteredJumperPads=this.otherHdRoutes.flatMap(a=\u003ethis.isSameNetRoute(a)?[]:s(a.jumpers??[],a.connectionName)),this.inputRoute.jumpers\u0026\u0026this.inputRoute.jumpers.length\u003e0){this.filteredJumperPads.push(...s(this.inputRoute.jumpers,this.inputRoute.connectionName));for(const a of this.inputRoute.jumpers)for(let A=0;A\u003cthis.inputRoute.route.length;A++){const c=this.inputRoute.route[A];(Math.abs(c.x-a.start.x)\u003c.01\u0026\u0026Math.abs(c.y-a.start.y)\u003c.01||Math.abs(c.x-a.end.x)\u003c.01\u0026\u0026Math.abs(c.y-a.end.y)\u003c.01)\u0026\u0026this.jumperPadPointIndices.add(A)}}this.computePathSegments()}computePathSegments(){let e=0;for(let n=0;n\u003cthis.inputRoute.route.length-1;n++){const o=this.inputRoute.route[n],i=this.inputRoute.route[n+1],r=Math.sqrt((i.x-o.x)**2+(i.y-o.y)**2)+n/1e4;this.pathSegments.push({start:o,end:i,length:r,startDistance:e,endDistance:e+r}),e+=r}this.totalPathLength=e}arePointsEqual(e,n){return e.x===n.x\u0026\u0026e.y===n.y\u0026\u0026e.z===n.z}getPointAtDistance(e){e=Math.max(0,Math.min(e,this.totalPathLength));const n=this.pathSegments.find(i=\u003ee\u003e=i.startDistance\u0026\u0026e\u003c=i.endDistance);if(!n)return this.inputRoute.route[this.inputRoute.route.length-1];const o=(e-n.startDistance)/n.length;return{x:n.start.x+o*(n.end.x-n.start.x),y:n.start.y+o*(n.end.y-n.start.y),z:o\u003c.5?n.start.z:n.end.z}}getNearestIndexForDistance(e){if(e\u003c=0)return 0;if(e\u003e=this.totalPathLength)return this.inputRoute.route.length-1;const n=this.pathSegments.findIndex(r=\u003ee\u003e=r.startDistance\u0026\u0026e\u003c=r.endDistance);if(n===-1)return 0;const o=this.pathSegments[n],i=(o.startDistance+o.endDistance)/2;return e\u003ei?n+1:n}isValidPathSegment(e,n){for(const i of this.filteredObstacles)if(i.__zLayers?.includes(e.z)\u0026\u0026K8(e,n,i)\u003cthis.OBSTACLE_MARGIN+this.clearanceTraceThickness/2)return!1;const o=this.segmentTree.getSegmentsThatCouldIntersect(e,n);for(const[i,r,s]of o)if(i.z===e.z\u0026\u0026r.z===e.z){const a=qQ({x:e.x,y:e.y},{x:n.x,y:n.y},{x:i.x,y:i.y},{x:r.x,y:r.y});if(!this.useTraceWidthAwareClearance){if(a\u003cthis.OBSTACLE_MARGIN+this.TRACE_THICKNESS)return!1;continue}const A=this.traceThicknessByObstacleSegmentId.get(s);if(A===void 0)throw new Error(`Missing trace thickness for segment \"${s}\"`);if(a\u003cthis.OBSTACLE_MARGIN+this.clearanceTraceThickness/2+A/2)return!1}for(const i of this.filteredVias)if(wc(i,e,n)\u003cthis.OBSTACLE_MARGIN+i.diameter/2+this.clearanceTraceThickness/2)return!1;for(const i of this.filteredJumperPads)if(K8(e,n,i)\u003cthis.OBSTACLE_MARGIN+this.clearanceTraceThickness/2)return!1;return!(this.outline\u0026\u0026this.outline.length\u003e=3\u0026\u0026$z({start:{x:e.x,y:e.y},end:{x:n.x,y:n.y},polygon:this.outline,margin:this.minBoardEdgeClearance+this.inputRoute.traceThickness/2}))}isValidPath(e){if(e.length\u003c2)return!0;for(let n=0;n\u003ce.length-1;n++)if(e[n].z!==e[n+1].z)return!1;for(let n=0;n\u003ce.length-1;n++)if(!this.isValidPathSegment(e[n],e[n+1]))return!1;return!0}find45DegreePath(e,n){if(this.arePointsEqual(e,n))return[e];if(e.z!==n.z)return null;const o=Vft({x:e.x,y:e.y},{x:n.x,y:n.y});for(const i of o){const r=i.map(s=\u003e({x:s.x,y:s.y,z:e.z}));if(this.isValidPath(r))return r}return null}addPathToResult(e){if(e.length!==0){for(let n=0;n\u003ce.length;n++)n===0\u0026\u0026this.newRoute.length\u003e0\u0026\u0026this.arePointsEqual(this.newRoute[this.newRoute.length-1],e[n])||this.newRoute.push(e[n]);this.currentStepSize=this.maxStepSize}}appendOriginalRouteSlice(e,n){const o=this.pathSegments.findIndex(i=\u003ee\u003e=i.startDistance\u0026\u0026e\u003c=i.endDistance);if(o===-1)throw new Error(`Could not find path segment containing distance ${e}`);for(let i=o+1;i\u003c=n\u0026\u0026i\u003cthis.inputRoute.route.length;i++){const r=this.inputRoute.route[i],s=this.newRoute[this.newRoute.length-1];s\u0026\u0026this.arePointsEqual(s,r)||this.newRoute.push({...r})}}moveHead(e){this.lastHeadMoveDistance=e,this.headDistanceAlongPath=Math.min(this.headDistanceAlongPath+e,this.totalPathLength)}stepBackAndReduceStepSize(){this.headDistanceAlongPath=Math.max(this.tailDistanceAlongPath,this.headDistanceAlongPath-this.lastHeadMoveDistance),this.currentStepSize=Math.max(this.minStepSize,this.currentStepSize*this.STEP_SIZE_REDUCTION_FACTOR)}_step(){const e=this.tailDistanceAlongPath\u003e=this.totalPathLength,n=this.headDistanceAlongPath\u003e=this.totalPathLength;if(e){const h=this.inputRoute.route[this.inputRoute.route.length-1];return this.newRoute.length!==0\u0026\u0026this.arePointsEqual(this.newRoute[this.newRoute.length-1],h)||this.newRoute.push(h),void(this.solved=!0)}if(n){const h=this.getPointAtDistance(this.tailDistanceAlongPath),d=this.inputRoute.route[this.inputRoute.route.length-1],p=this.find45DegreePath(h,d);if(p)return this.addPathToResult(p),void(this.solved=!0);const m=this.lastValidPath?this.lastValidPathHeadDistance:this.tailDistanceAlongPath;return this.lastValidPath\u0026\u0026(this.addPathToResult(this.lastValidPath),this.lastValidPath=null),this.getNearestIndexForDistance(m),this.appendOriginalRouteSlice(m,this.inputRoute.route.length-1),this.tailDistanceAlongPath=this.totalPathLength,this.headDistanceAlongPath=this.totalPathLength,void(this.solved=!0)}this.moveHead(this.currentStepSize);const o=this.getPointAtDistance(this.tailDistanceAlongPath),i=this.getPointAtDistance(this.headDistanceAlongPath),r=this.getNearestIndexForDistance(this.tailDistanceAlongPath),s=this.getNearestIndexForDistance(this.headDistanceAlongPath);let a=!1,A=-1;for(let h=r;h\u003cs;h++)if(h+1\u003cthis.inputRoute.route.length\u0026\u0026this.inputRoute.route[h].z!==this.inputRoute.route[h+1].z){a=!0;const d=h;A=this.pathSegments[d].startDistance;break}if(a\u0026\u0026this.lastHeadMoveDistance\u003ethis.minStepSize)return void this.stepBackAndReduceStepSize();let c=!1,l=-1,u=-1;for(let h=r+1;h\u003c=s;h++)if(this.jumperPadPointIndices.has(h)){c=!0,l=h,u=h\u003e0\u0026\u0026h-1\u003cthis.pathSegments.length?this.pathSegments[h-1].endDistance:this.pathSegments[0]?.startDistance??0;break}if(c\u0026\u0026this.lastHeadMoveDistance\u003ethis.minStepSize)return void this.stepBackAndReduceStepSize();if(c\u0026\u0026l\u003e=0){const h=this.inputRoute.route[l];this.lastValidPath\u0026\u0026(this.addPathToResult(this.lastValidPath),this.lastValidPath=null);const d=this.newRoute[this.newRoute.length-1];return d\u0026\u0026d.x===h.x\u0026\u0026d.y===h.y||this.newRoute.push({x:h.x,y:h.y,z:h.z}),this.currentStepSize=this.maxStepSize,this.tailDistanceAlongPath=u,this.headDistanceAlongPath=this.tailDistanceAlongPath,this.lastValidPath=null,void(this.lastValidPathHeadDistance=this.tailDistanceAlongPath)}if(a\u0026\u0026A\u003e0){const h=this.lastValidPath?this.lastValidPathHeadDistance:this.tailDistanceAlongPath,d=this.getNearestIndexForDistance(A)+1,p=this.inputRoute.route[d],m={x:p.x,y:p.y};this.lastValidPath\u0026\u0026(this.addPathToResult(this.lastValidPath),this.lastValidPath=null);const _=this.newRoute[this.newRoute.length-1],f={x:m.x,y:m.y,z:_.z};if(!this.arePointsEqual(_,f)){const C=this.find45DegreePath(_,f);C?this.addPathToResult(C):this.appendOriginalRouteSlice(h,d-1)}this.newVias.push(m),this.newRoute.push({x:m.x,y:m.y,z:p.z}),this.currentStepSize=this.maxStepSize;const I=this.pathSegments.findIndex(C=\u003eC.start===p);if(I!==-1)this.tailDistanceAlongPath=this.pathSegments[I].startDistance,this.headDistanceAlongPath=this.tailDistanceAlongPath,this.lastValidPath=null,this.lastValidPathHeadDistance=this.tailDistanceAlongPath;else if(d\u003cthis.inputRoute.route.length){if(d===this.inputRoute.route.length-1)return void(this.solved=!0);console.warn(\"Fallback used for tailDistanceAlongPath after layer change\");const C=this.pathSegments.find(y=\u003ey.start===this.inputRoute.route[d]);C?(this.tailDistanceAlongPath=C.startDistance,this.headDistanceAlongPath=this.tailDistanceAlongPath,this.lastValidPath=null,this.lastValidPathHeadDistance=this.tailDistanceAlongPath):(console.error(`[${this.inputRoute.connectionName}] Could not find segment start after layer change. Path might be incomplete.\n Index sought: ${d}, Point: (${this.inputRoute.route[d].x.toFixed(3)}, ${this.inputRoute.route[d].y.toFixed(3)}, z=${this.inputRoute.route[d].z})\n Route Length: ${this.inputRoute.route.length}, Path Segments: ${this.pathSegments.length}`),this.solved=!0)}else console.warn(\"Layer change occurred at the end of the path.\"),this.solved=!0;return}const g=this.find45DegreePath(o,i);if(!g\u0026\u0026this.lastHeadMoveDistance\u003ethis.minStepSize)this.stepBackAndReduceStepSize();else{if(!g\u0026\u0026!this.lastValidPath){const h=this.getPointAtDistance(this.tailDistanceAlongPath);this.tailDistanceAlongPath+=this.minStepSize,this.moveHead(this.minStepSize);const d=this.getNearestIndexForDistance(this.tailDistanceAlongPath),p=this.inputRoute.route[d],m=this.inputRoute.route[this.inputRoute.route.length-1];return void(this.arePointsEqual(h,p)||this.arePointsEqual(p,m)||this.newRoute.push(p))}if(g)return this.lastValidPath=g,void(this.lastValidPathHeadDistance=this.headDistanceAlongPath);this.lastValidPath\u0026\u0026(this.addPathToResult(this.lastValidPath),this.lastValidPath=null,this.tailDistanceAlongPath=this.lastValidPathHeadDistance,this.moveHead(this.minStepSize))}}visualize(){const e=this.getVisualsForNewRouteAndObstacles(),n=this.getPointAtDistance(this.tailDistanceAlongPath),o=this.getPointAtDistance(this.headDistanceAlongPath);e.points.push({x:n.x,y:n.y,color:\"yellow\",label:[\"Tail\",`z: ${n.z}`].join(`\n`)}),e.points.push({x:o.x,y:o.y,color:\"orange\",label:[\"Head\",`z: ${o.z}`].join(`\n`)});const i=this.getPointAtDistance(this.headDistanceAlongPath+this.currentStepSize);e.points.push({x:i.x,y:i.y,color:\"red\",label:[\"Tentative Head\",`z: ${i.z}`].join(`\n`)});let r=0;for(;r\u003cthis.totalPathLength;){const s=this.getPointAtDistance(r);e.circles.push({center:{x:s.x,y:s.y},radius:.05,fill:\"rgba(100, 100, 100, 0.5)\"}),r+=this.totalPathLength/20}if(this.lastValidPath\u0026\u0026this.lastValidPath.length\u003e1)for(let s=0;s\u003cthis.lastValidPath.length-1;s++)e.lines.push({points:[{x:this.lastValidPath[s].x,y:this.lastValidPath[s].y},{x:this.lastValidPath[s+1].x,y:this.lastValidPath[s+1].y}],strokeColor:\"rgba(0, 255, 255, 0.9)\",strokeDash:\"3, 3\"});return e}},pZn=class extends yr{getSolverName(){return\"MultiSimplifiedPathSolver\"}simplifiedHdRoutes;currentUnsimplifiedHdRouteIndex=0;activeSubSolver=null;unsimplifiedHdRoutes;otherHdRoutes;obstacles;connMap;colorMap;outline;minBoardEdgeClearance;defaultViaDiameter;useTraceWidthAwareClearance;constructor(e){super(),this.MAX_ITERATIONS=1e8,this.unsimplifiedHdRoutes=e.unsimplifiedHdRoutes,this.otherHdRoutes=e.otherHdRoutes??[];const n=Math.max(2,...[...e.unsimplifiedHdRoutes,...this.otherHdRoutes].flatMap(o=\u003eo.route.map(i=\u003ei.z+1)))||2;this.obstacles=c7(e.obstacles,n),this.connMap=e.connMap||new TD({}),this.colorMap=e.colorMap||{},this.outline=e.outline,this.minBoardEdgeClearance=e.minBoardEdgeClearance??.2,this.defaultViaDiameter=e.defaultViaDiameter??.3,this.useTraceWidthAwareClearance=e.useTraceWidthAwareClearance??!1,this.simplifiedHdRoutes=[]}_step(){const e=this.unsimplifiedHdRoutes[this.currentUnsimplifiedHdRouteIndex];if(!this.activeSubSolver)return e?(this.activeSubSolver=new hZn({inputRoute:e,otherHdRoutes:this.otherHdRoutes.concat(this.unsimplifiedHdRoutes.slice(this.currentUnsimplifiedHdRouteIndex+1).concat(this.simplifiedHdRoutes)),obstacles:this.obstacles,connMap:this.connMap,colorMap:this.colorMap,outline:this.outline,minBoardEdgeClearance:this.minBoardEdgeClearance,useTraceWidthAwareClearance:this.useTraceWidthAwareClearance}),void this.currentUnsimplifiedHdRouteIndex++):void(this.solved=!0);this.activeSubSolver.step(),this.activeSubSolver.solved\u0026\u0026(this.simplifiedHdRoutes.push(this.activeSubSolver.simplifiedRoute),this.activeSubSolver=null)}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const e={lines:[],points:[],circles:[],rects:[],coordinateSystem:\"cartesian\",title:\"Multi Simplified Path Solver\"};for(const n of this.unsimplifiedHdRoutes)if(!this.simplifiedHdRoutes.some(o=\u003eo.connectionName===n.connectionName)){for(let o=0;o\u003cn.route.length-1;o++)e.lines.push({points:[{x:n.route[o].x,y:n.route[o].y},{x:n.route[o+1].x,y:n.route[o+1].y}],strokeColor:n.route[o].z===1?\"rgba(0, 0, 255, 0.4)\":\"rgba(255, 0, 0, 0.4)\",strokeWidth:.15,strokeDash:n.route[o].z===1?[.5,.5]:void 0});for(const o of n.vias||[])e.circles.push({center:o,radius:(n.viaDiameter??this.defaultViaDiameter)/2,fill:\"rgba(0, 0, 255, 0.4)\"})}for(const n of this.simplifiedHdRoutes){const o=this.colorMap?.[n.connectionName]||\"rgba(128, 128, 128, 0.8)\";for(let i=0;i\u003cn.route.length-1;i++)e.lines.push({points:[{x:n.route[i].x,y:n.route[i].y},{x:n.route[i+1].x,y:n.route[i+1].y}],strokeWidth:.15,strokeColor:o,strokeDash:n.route[i].z===1?[.5,.5]:void 0,step:1});for(const i of n.vias||[])e.circles.push({center:i,radius:n.viaDiameter/2,fill:\"rgba(0, 0, 255, 0.5)\",step:1})}for(const n of this.unsimplifiedHdRoutes){for(let o=0;o\u003cn.route.length-1;o++)e.lines.push({points:[{x:n.route[o].x,y:n.route[o].y},{x:n.route[o+1].x,y:n.route[o+1].y}],strokeWidth:.15,strokeColor:\"rgba(255, 0, 0, 0.2)\",strokeDash:[.5,.5],step:0,layer:`z${n.route[o].z.toString()}`});for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:n.viaDiameter/2,fill:\"rgba(255, 0, 0, 0.2)\",step:0})}for(const n of this.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:n.layers?.includes(\"top\")?\"rgba(255, 0, 0, 0.3)\":n.layers?.includes(\"bottom\")?\"rgba(0, 0, 255, 0.3)\":\"rgba(128, 128, 128, 0.3)\"});if(this.currentUnsimplifiedHdRouteIndex\u003cthis.unsimplifiedHdRoutes.length){const n=this.unsimplifiedHdRoutes[this.currentUnsimplifiedHdRouteIndex];n.route.length\u003e0\u0026\u0026e.circles.push({center:{x:n.route[0].x,y:n.route[0].y},radius:.2,fill:\"yellow\",label:\"Current\"})}return e}},mZn=(t,e)=\u003e{for(let n=0;n\u003ct.route.length-1;n++){const o=t.route[n],i=t.route[n+1];if(o.z===i.z||o.x!==e.x||o.y!==e.y||i.x!==e.x||i.y!==e.y)continue;let r=n;for(;r\u003e0\u0026\u0026t.route[r-1].x===e.x\u0026\u0026t.route[r-1].y===e.y;)r--;let s=n+1;for(;s\u003ct.route.length-1\u0026\u0026t.route[s+1].x===e.x\u0026\u0026t.route[s+1].y===e.y;)s++;if(r===0||s===t.route.length-1)return!0}return!1},Z7e=(t,e,n)=\u003en?.get(e.connectionName)??t.idToNetMap[e.connectionName]??(e.rootConnectionName?t.idToNetMap[e.rootConnectionName]:void 0),_Zn=(t,e,n)=\u003e{for(const o of e.connectedTo)if(o===n.net||t.idToNetMap[o]===n.net||t.areIdsConnected(o,n.net))return!0;return!1},fZn=(t,e,n)=\u003e{const o=n.mergedViaHdRoutes[t.routeIndex];if(!o)throw new Error(`SameNetViaMergerSolver could not find route for via at index ${t.routeIndex}`);const i=new Set;for(let r=1;r\u003co.route.length;r++){const s=o.route[r-1],a=o.route[r];s.z!==a.z\u0026\u0026s.x===t.x\u0026\u0026s.y===t.y\u0026\u0026a.x===t.x\u0026\u0026a.y===t.y\u0026\u0026(i.add(s.z),i.add(a.z))}if(i.size===0)throw new Error(`SameNetViaMergerSolver could not find transition layers for via at (${t.x}, ${t.y})`);for(const r of i){const s=o.traceThickness,a={x:t.x,y:t.y,z:r},A={x:e.x,y:e.y,z:r};if(a.x===A.x\u0026\u0026a.y===A.y)continue;const c=n.hdRouteSHI.getConflictingRoutesForSegment(a,A,s/2);for(const{conflictingRoute:h,distance:d}of c)if(h.connectionName!==o.connectionName\u0026\u0026Z7e(n.connMap,h,n.netByConnectionName)!==t.net\u0026\u0026d\u003cs/2+h.traceThickness/2)return!1;const l={centerX:(a.x+A.x)/2,centerY:(a.y+A.y)/2,width:Math.abs(a.x-A.x),height:Math.abs(a.y-A.y)},u=s/2+.1,g=n.obstacleSHI.searchArea(l.centerX,l.centerY,l.width+2*u,l.height+2*u);for(const h of g){if(!h.__zLayers)throw new Error(`SameNetViaMergerSolver found obstacle without zLayers near via at (${t.x}, ${t.y})`);if(h.__zLayers.includes(r)\u0026\u0026!_Zn(n.connMap,h,t)\u0026\u0026K8(a,A,h)\u003cu)return!1}}return!0},jft=class extends yr{constructor(e){if(super(),this.input=e,!e.connMap)throw new Error(\"SameNetViaMergerSolver requires connMap\");this.input={...e,obstacles:c7(e.obstacles,e.layerCount)},this.MAX_ITERATIONS=1e6,this.inputHdRoutes=this.input.inputHdRoutes,this.mergedViaHdRoutes=structuredClone(this.inputHdRoutes),this.unprocessedRoutes=[...this.input.inputHdRoutes],this.colorMap=this.input.colorMap,this.outline=this.input.outline,this.obstacles=this.input.obstacles,this.obstacleSHI=new OD(\"flatbush\",this.input.obstacles),this.hdRouteSHI=this.createHdRouteSpatialIndex(),this.vias=[],this.offendingVias=[],this.connMap=e.connMap,this.netByConnectionName=e.netByConnectionName,this.viasByNet=new Map,this.rebuildVias()}input;getSolverName(){return\"SameNetViaMergerSolver\"}inputHdRoutes;mergedViaHdRoutes;unprocessedRoutes;vias;offendingVias;currentViaRoutes=[];connMap;colorMap;outline;obstacles;viasByNet;netByConnectionName;obstacleSHI;hdRouteSHI;createHdRouteSpatialIndex(){return new oB([...this.mergedViaHdRoutes,...this.input.otherHdRoutes??[]])}rebuildVias(){this.vias=[],this.viasByNet=new Map;const e=(n,o,i)=\u003e{if(n.vias.length===0)return;const r=i?((s,a,A)=\u003e{const c=Z7e(s,a,A);if(!c)throw new Error(`SameNetViaMergerSolver could not find net for route \"${a.connectionName}\"`);return c})(this.connMap,n,this.netByConnectionName):Z7e(this.connMap,n,this.netByConnectionName);if(r)for(let s=0;s\u003cn.vias.length;s++){const a=n.vias[s],A=[...new Set(n.route.map(u=\u003eu.z))];if(A.length===0)throw new Error(`SameNetViaMergerSolver found via on route \"${n.connectionName}\" with no route points`);const c={x:a.x,y:a.y,diameter:n.viaDiameter,net:r,layers:A,routeIndex:o,mutable:i\u0026\u0026!(this.input.preserveRouteEndpoints\u0026\u0026mZn(n,a))};this.vias.push(c);const l=this.viasByNet.get(c.net);l?l.push(c):this.viasByNet.set(c.net,[c])}};for(let n=0;n\u003cthis.mergedViaHdRoutes.length;n++)e(this.mergedViaHdRoutes[n],n,!0);for(let n=0;n\u003c(this.input.otherHdRoutes?.length??0);n++)e(this.input.otherHdRoutes[n],this.mergedViaHdRoutes.length+n,!1)}getViaKey(e){return[e.mutable?\"mutable\":\"immutable\",e.routeIndex,e.x,e.y,e.layers.join(\",\"),e.net].join(\":\")}dedupeRouteVias(e){const n=new Set;e.vias=e.vias.filter(o=\u003e{const i=`${o.x}:${o.y}`;return!n.has(i)\u0026\u0026(n.add(i),!0)})}getOffendingViaGroupsBatch(){const e=[],n=new Set,o=[];for(const i of this.viasByNet.values()){if(i.length\u003c2)continue;const r=Math.max(1e-6,...i.map(a=\u003ea.diameter)),s=new Map;for(let a=0;a\u003ci.length;a++){const A=i[a],c=`${Math.floor(A.x/r)}:${Math.floor(A.y/r)}`,l=s.get(c);l?l.push(a):s.set(c,[a])}for(let a=0;a\u003ci.length;a++){const A=i[a],c=Math.floor(A.x/r),l=Math.floor(A.y/r),u=Math.ceil(2.5),g=[];for(let h=-u;h\u003c=u;h++)for(let d=-u;d\u003c=u;d++){const p=s.get(`${c+h}:${l+d}`);if(p)for(const m of p){if(m===a)continue;const _=i[m];if(!_.mutable)continue;const f=A.x-_.x,I=A.y-_.y,C=f*f+I*I,y=A.diameter/2+_.diameter/2,x=2.5*y;C!==0?(C\u003c=y*y||C\u003c=x*x\u0026\u0026fZn(_,A,{connMap:this.connMap,mergedViaHdRoutes:this.mergedViaHdRoutes,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,netByConnectionName:this.netByConnectionName}))\u0026\u0026g.push(_):A.mutable||g.push(_)}}g.length\u003e0\u0026\u0026o.push({keep:A,remove:g})}}o.sort((i,r)=\u003er.remove.length!==i.remove.length?r.remove.length-i.remove.length:i.keep.mutable!==r.keep.mutable?i.keep.mutable?1:-1:r.keep.layers.length!==i.keep.layers.length?r.keep.layers.length-i.keep.layers.length:i.keep.routeIndex-r.keep.routeIndex);for(const i of o){const r=this.getViaKey(i.keep);if(n.has(r))continue;const s=i.remove.filter(a=\u003e!n.has(this.getViaKey(a)));if(s.length!==0){e.push({keep:i.keep,remove:s}),n.add(r);for(const a of s)n.add(this.getViaKey(a))}}return e}moveViaTo(e,n,o=!0){if(!e.mutable)throw new Error(\"SameNetViaMergerSolver cannot mutate an immutable via anchor\");const i=this.mergedViaHdRoutes[e.routeIndex];if(!i)throw new Error(`SameNetViaMergerSolver could not find route for via at index ${e.routeIndex}`);const r=i.route,s=new Set;let a=!1;for(let A=r.length-1;A\u003e=1;A--){const c=r[A-1],l=r[A];if(c.z===l.z||c.x!==e.x||c.y!==e.y||l.x!==e.x||l.y!==e.y)continue;let u=A-1;for(;u\u003e0\u0026\u0026r[u-1].x===e.x\u0026\u0026r[u-1].y===e.y;)u--;let g=A;for(;g\u003cr.length-1\u0026\u0026r[g+1].x===e.x\u0026\u0026r[g+1].y===e.y;)g++;for(let h=u;h\u003c=g;h++)s.add(h)}if(s.size===0)throw new Error(`SameNetViaMergerSolver could not find route transition for via at (${e.x}, ${e.y}) on route \"${i.connectionName}\"`);for(const A of s){const c=r[A];r[A]={...c,x:n.x,y:n.y}}if(i.vias=i.vias.flatMap(A=\u003eA.x!==e.x||A.y!==e.y?A:(a=!0,n.mutable?[{x:n.x,y:n.y}]:[])),!a)throw new Error(`SameNetViaMergerSolver could not find via at (${e.x}, ${e.y}) on route \"${i.connectionName}\"`);this.dedupeRouteVias(i),o\u0026\u0026this.rebuildVias()}_step(){const e=this.getOffendingViaGroupsBatch();if(e.length===0)return void(this.solved=!0);let n=0;for(const o of e)for(const i of o.remove)this.moveViaTo(i,o.keep,!1),n++;this.rebuildVias(),this.hdRouteSHI=this.createHdRouteSpatialIndex(),this.stats.mergedViaGroups=e.length,this.stats.mergedViaCount=n}getMergedViaHdRoutes(){return this.mergedViaHdRoutes}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Same Net Via Merger Solver\"};for(const n of this.input.obstacles){if(!n.__zLayers)throw new Error(\"SameNetViaMergerSolver found obstacle without zLayers while visualizing\");let o=\"rgba(128, 128, 128, 0.2)\";const i=n.__zLayers.includes(0),r=n.__zLayers.includes(1);i\u0026\u0026r?o=\"rgba(128, 0, 128, 0.2)\":i?o=\"rgba(255, 0, 0, 0.2)\":r\u0026\u0026(o=\"rgba(0, 0, 255, 0.2)\"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(\", \")})`})}for(const n of this.mergedViaHdRoutes){if(n.route.length===0)continue;const o=this.input.colorMap[n.connectionName];if(!o)throw new Error(`SameNetViaMergerSolver could not find color for route \"${n.connectionName}\"`);for(let i=0;i\u003cn.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.z===s.z\u0026\u0026e.lines.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:r.z===0?\"rgba(255, 0, 0, 0.5)\":\"rgba(0, 0, 255, 0.5)\",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${r.z})`})}for(const i of n.vias)e.circles.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,fill:\"rgba(255, 0, 255, 0.5)\",label:`${n.connectionName} via`});if(n.jumpers\u0026\u0026n.jumpers.length\u003e0){const i=_x(n.jumpers,{color:o,label:n.connectionName});if(!i.rects||!i.lines)throw new Error(`SameNetViaMergerSolver expected jumper graphics for route \"${n.connectionName}\"`);e.rects.push(...i.rects),e.lines.push(...i.lines)}}return e}},IZn={getConflictingRoutesForSegment:()=\u003e[],getConflictingRoutesNearPoint:()=\u003e[]},Py=1e-6,Xz=(t,e)=\u003e{const n=`${t.x}:${t.y}:${t.z}`,o=`${e.x}:${e.y}:${e.z}`;return n\u003co?`${n}|${o}`:`${o}|${n}`},$ft=t=\u003e{const e=new Set;for(let n=1;n\u003ct.route.length;n++){const o=t.route[n-1],i=t.route[n];o.z===i.z\u0026\u0026e.add(Xz(o,i))}return e},e6e=t=\u003et.filter((e,n)=\u003e{const o=t[n-1];return!o||e.x!==o.x||e.y!==o.y||e.z!==o.z}),t6e=t=\u003e{const e=[],n=new Set;for(let o=1;o\u003ct.length;o++){const i=t[o-1],r=t[o];if(i.z===r.z||i.toNextSegmentType===\"through_obstacle\")continue;if(i.x!==r.x||i.y!==r.y)throw new Error(`CrossingViaReductionSolver found a layer transition without a via at route point ${o}`);const s=`${r.x}:${r.y}`;n.has(s)||(n.add(s),e.push({x:r.x,y:r.y}))}return e},n6e=t=\u003e{const e=[t.connectionName];return t.rootConnectionName\u0026\u0026e.push(t.rootConnectionName),e},o6e=(t,e,n)=\u003e{const o=n6e(t),i=n6e(e);return o.some(r=\u003ei.some(s=\u003er===s||n.areIdsConnected(r,s)))},CZn=(t,e,n)=\u003e{const o=n6e(e);return t.connectedTo.some(i=\u003eo.some(r=\u003ei===r||n.areIdsConnected(i,r)))},qft=t=\u003e{let e=0;for(let n=1;n\u003ct.length;n++)e+=Math.hypot(t[n].x-t[n-1].x,t[n].y-t[n-1].y);return e},Xft=(t,e)=\u003e{const n=qft(t);if(e\u003c=Py||e\u003e=n-Py)return null;let o=0;for(let i=1;i\u003ct.length;i++){const r=t[i-1],s=t[i],a=Math.hypot(s.x-r.x,s.y-r.y);if(o+a\u003ce-Py){o+=a;continue}const A=e-o;if(A\u003c=Py)return{prefix:t.slice(0,i).map(u=\u003e({...u})),suffix:t.slice(i-1).map(u=\u003e({...u})),point:{...r}};if(a-A\u003c=Py)return{prefix:t.slice(0,i+1).map(u=\u003e({...u})),suffix:t.slice(i).map(u=\u003e({...u})),point:{...s}};const c=A/a,l={x:r.x+(s.x-r.x)*c,y:r.y+(s.y-r.y)*c,z:r.z};return{prefix:[...t.slice(0,i),l].map(u=\u003e({...u})),suffix:[l,...t.slice(i)].map(u=\u003e({...u})),point:l}}return null},yZn=(t,e,n,o)=\u003e{const i=DD(t,e,n,o);if(!i)return null;const r=Math.hypot(i.x-t.x,i.y-t.y),s=Math.hypot(i.x-e.x,i.y-e.y),a=Math.hypot(i.x-n.x,i.y-n.y),A=Math.hypot(i.x-o.x,i.y-o.y);return Math.min(r,s,a,A)\u003c=Py?null:r},Zft=t=\u003et.points.some(e=\u003ee.insideJumperPad||e.toNextSegmentType),e1t=({sections:t,sectionIndex:e,side:n})=\u003e{const o=t[e],i=n===\"start\"?t[e-1]:t[e+1];if(!i)return null;const r=n===\"start\"?o.points[0]:o.points.at(-1),s=n===\"start\"?i.points.at(-1):i.points[0];return r.x!==s.x||r.y!==s.y?null:i.z},t1t=({sections:t,sectionIndex:e,targetZ:n,side:o})=\u003ee1t({sections:t,sectionIndex:e,side:o})===n,n1t=({baseIndexes:t,otherCandidateRoutes:e,ignoredConnectionNames:n,originalRouteSegmentKeys:o})=\u003e{const i=new oB([...e]);return{getConflictingRoutesForSegment:(r,s,a)=\u003e{const A=o.has(Xz(r,s));return[...A?[]:t.mutableRoutes.getConflictingRoutesForSegment(r,s,a).filter(({conflictingRoute:c})=\u003e!n.has(c.connectionName)),...A?[]:t.immutableRoutes?.getConflictingRoutesForSegment(r,s,a)??[],...i.getConflictingRoutesForSegment(r,s,a)]},getConflictingRoutesNearPoint:(r,s)=\u003e[...t.mutableRoutes.getConflictingRoutesNearPoint(r,s).filter(({conflictingRoute:a})=\u003e!n.has(a.connectionName)),...t.immutableRoutes?.getConflictingRoutesNearPoint(r,s)??[],...i.getConflictingRoutesNearPoint(r,s)]}},xZn=class extends yr{input;obstacleSHI;traceMargin;obstacleMargin;reducedHdRoutes;getSolverName(){return\"CrossingViaReductionSolver\"}constructor(e){super(),this.input={...e,obstacles:c7(e.obstacles,e.layerCount)},this.traceMargin=e.traceMargin??.1,this.obstacleMargin=e.obstacleMargin??.15,this.reducedHdRoutes=structuredClone([...e.inputHdRoutes]),this.obstacleSHI=new OD(\"flatbush\",[...this.input.obstacles]),this.MAX_ITERATIONS=1e6}collapseDetourSection({route:e,section:n,targetZ:o}){const i=n.points.map(s=\u003e({...s,z:o})),r=e6e([...e.route.slice(0,n.startIndex).map(s=\u003e({...s})),...i,...e.route.slice(n.endIndex+1).map(s=\u003e({...s}))]);return{...e,route:r,vias:t6e(r)}}relocateTransitionVia({route:e,section:n,targetZ:o,side:i,newViaDistance:r}){const s=Xft(n.points,r);if(!s)return null;const a=i===\"start\"?o:n.z,A=i===\"start\"?n.z:o,c=[...s.prefix.map(u=\u003e({...u,z:a})),...s.suffix.map(u=\u003e({...u,z:A}))],l=e6e([...e.route.slice(0,n.startIndex).map(u=\u003e({...u})),...c,...e.route.slice(n.endIndex+1).map(u=\u003e({...u}))]);return{route:{...e,route:l,vias:t6e(l)},relocatedVia:{x:s.point.x,y:s.point.y}}}relocateTransitionVias({route:e,sections:n,crossingGroups:o,detourZ:i,detourTraceThickness:r}){const s=new Map;for(const u of o){const g=s.get(u.transitionSectionIndex)??[];g.push(u),s.set(u.transitionSectionIndex,g)}const a=[],A=[],c=e.viaDiameter/2+r/2+this.traceMargin+Py;for(const[u,g]of s){if(g.length!==1)return null;const h=n[u],d=g[0];if(!t1t({sections:n,sectionIndex:u,targetZ:i,side:d.side}))return null;const p=d.side===\"start\"?Math.max(...d.crossingDistances)+c:Math.min(...d.crossingDistances)-c,m=Xft(h.points,p);if(!m)return null;const _=d.side===\"start\"?i:h.z,f=d.side===\"start\"?h.z:i;a.push({section:h,points:[...m.prefix.map(I=\u003e({...I,z:_})),...m.suffix.map(I=\u003e({...I,z:f}))]}),A.push({x:m.point.x,y:m.point.y})}let l=e.route.map(u=\u003e({...u}));for(const u of a.sort((g,h)=\u003eh.section.startIndex-g.section.startIndex))l=[...l.slice(0,u.section.startIndex),...u.points,...l.slice(u.section.endIndex+1)];return l=e6e(l),{route:{...e,route:l,vias:t6e(l)},relocatedVias:A}}routeIsClear(e,n,o){for(const i of qz(e)){for(let r=1;r\u003ci.points.length;r++){const s=i.points[r-1],a=i.points[r];if(!o.has(Xz(s,a))\u0026\u0026this.input.outline\u0026\u0026$z({start:s,end:a,polygon:[...this.input.outline],margin:e.traceThickness/2}))return!1}if(!GD({currentSection:i,targetZ:i.z,route:e,hdRouteSHI:n,obstacleSHI:this.obstacleSHI,connMap:this.input.connMap,defaultTraceThickness:e.traceThickness,obstacleMargin:this.obstacleMargin,traceMargin:this.traceMargin,shouldCheckStaticGeometryForSegment:(r,s)=\u003e!o.has(Xz(r,s))}))return!1}return!0}relocatedViaIsClear(e,n,o){const i=e.viaDiameter/2;for(let a=0;a\u003cthis.input.layerCount;a++)if(o.getConflictingRoutesNearPoint({...n,z:a},i+this.traceMargin).some(({conflictingRoute:A})=\u003e!o6e(e,A,this.input.connMap)))return!1;const r=i+this.obstacleMargin,s=this.obstacleSHI.searchArea(n.x,n.y,2*r,2*r);for(const a of s)if(!CZn(a,e,this.input.connMap)\u0026\u0026K8(n,n,a)\u003cr)return!1;if(this.input.outline){for(let a=0;a\u003cthis.input.outline.length;a++)if(wc(n,this.input.outline[a],this.input.outline[(a+1)%this.input.outline.length])\u003ci+this.traceMargin)return!1}return!0}changedSectionsAreStaticallyClear(e,n){for(const o of qz(e))if(o.points.some((i,r)=\u003e{const s=o.points[r-1];return s!==void 0\u0026\u0026!n.has(Xz(s,i))})){if(this.input.outline){for(let i=1;i\u003co.points.length;i++)if($z({start:o.points[i-1],end:o.points[i],polygon:[...this.input.outline],margin:e.traceThickness/2}))return!1}if(!GD({currentSection:o,targetZ:o.z,route:e,hdRouteSHI:IZn,obstacleSHI:this.obstacleSHI,connMap:this.input.connMap,defaultTraceThickness:e.traceThickness,obstacleMargin:Math.min(this.obstacleMargin,.1),traceMargin:this.traceMargin}))return!1}return!0}candidateIsClear(e,n){const o=[{routeIndex:e.detourRouteIndex,route:e.detourRoute},...e.transitionUpdates],i=new Set(o.map(({routeIndex:a})=\u003ethis.reducedHdRoutes[a].connectionName)),r=$ft(this.reducedHdRoutes[e.detourRouteIndex]),s=n1t({baseIndexes:n,otherCandidateRoutes:e.transitionUpdates.map(({route:a})=\u003ea),ignoredConnectionNames:i,originalRouteSegmentKeys:r});if(this.stats.candidateClearanceChecks=(this.stats.candidateClearanceChecks??0)+1,!this.routeIsClear(e.detourRoute,s,r))return!1;for(const a of e.transitionUpdates){const A=$ft(this.reducedHdRoutes[a.routeIndex]),c=n1t({baseIndexes:n,otherCandidateRoutes:o.filter(({routeIndex:l})=\u003el!==a.routeIndex).map(({route:l})=\u003el),ignoredConnectionNames:i,originalRouteSegmentKeys:A});if(!this.routeIsClear(a.route,c,A)||a.relocatedVias.some(l=\u003e!this.relocatedViaIsClear(a.route,l,c)))return!1}return this.changedSectionsAreStaticallyClear(e.detourRoute,r)}candidateRoutesHaveNoExternalCopperConflicts(e,n){const o=[e.detourRoute,...e.transitionUpdates.map(({route:s})=\u003es)],i=new Set(o.map(({connectionName:s})=\u003es)),r=[n.mutableRoutes,...n.immutableRoutes?[n.immutableRoutes]:[]];for(const s of o)for(const a of qz(s))for(let A=1;A\u003ca.points.length;A++){const c=a.points[A-1],l=a.points[A];for(const u of r)if(u.getConflictingRoutesForSegment(c,l,s.traceThickness/2+this.traceMargin).some(({conflictingRoute:g})=\u003e!i.has(g.connectionName)\u0026\u0026!o6e(s,g,this.input.connMap)))return!1}return!0}buildTransitionSegmentIndex(e,n){const o=[];for(let r=0;r\u003cthis.reducedHdRoutes.length;r++){if(this.reducedHdRoutes[r].jumpers?.length)continue;const s=e[r];for(let a=0;a\u003cs.length;a++){const A=s[a];if(!Zft(A))for(const c of[\"start\",\"end\"]){const l=e1t({sections:s,sectionIndex:a,side:c});if(l===null||l===A.z||!n.has(`${A.z}:${l}`))continue;let u=0;for(let g=1;g\u003cA.points.length;g++){const h=A.points[g-1],d=A.points[g],p=Math.hypot(d.x-h.x,d.y-h.y);p\u003ePy\u0026\u0026o.push({routeIndex:r,sectionIndex:a,side:c,adjacentZ:l,start:h,end:d,distanceFromSectionStart:u}),u+=p}}}}if(this.stats.transitionSegmentsIndexed=(this.stats.transitionSegmentsIndexed??0)+o.length,o.length===0)return null;const i=new Kft(o.length);for(const r of o)i.insert(r,Math.min(r.start.x,r.end.x),Math.min(r.start.y,r.end.y),Math.max(r.start.x,r.end.x),Math.max(r.start.y,r.end.y));return i.finish(),i}getIndexedCrossingGroups({detourRouteIndex:e,detourSection:n,targetZ:o,transitionSegmentIndex:i}){const r=new Map;for(let s=1;s\u003cn.points.length;s++){const a=n.points[s-1],A=n.points[s];if(Math.hypot(A.x-a.x,A.y-a.y)\u003c=Py)continue;this.stats.indexedDetourSegmentQueries=(this.stats.indexedDetourSegmentQueries??0)+1;const c=i.search(Math.min(a.x,A.x)-Py,Math.min(a.y,A.y)-Py,Math.max(a.x,A.x)+Py,Math.max(a.y,A.y)+Py);for(const l of c){if(l.routeIndex===e||l.start.z!==o||l.adjacentZ!==n.z)continue;this.stats.exactSegmentIntersectionChecks=(this.stats.exactSegmentIntersectionChecks??0)+1;const u=yZn(l.start,l.end,a,A);if(u===null)continue;const g=`${l.routeIndex}:${l.sectionIndex}:${l.side}`;let h=r.get(g);h||(h={transitionRouteIndex:l.routeIndex,transitionSectionIndex:l.sectionIndex,side:l.side,crossingDistances:[]},r.set(g,h)),h.crossingDistances.push(l.distanceFromSectionStart+u)}}return[...r.values()].sort((s,a)=\u003es.transitionRouteIndex!==a.transitionRouteIndex?s.transitionRouteIndex-a.transitionRouteIndex:s.transitionSectionIndex!==a.transitionSectionIndex?s.transitionSectionIndex-a.transitionSectionIndex:s.side===a.side?0:s.side===\"start\"?-1:1)}tryCreateCandidate({detourRouteIndex:e,detourSection:n,targetZ:o,transitionRouteIndex:i,transitionSection:r,transitionSections:s,transitionSectionIndex:a,side:A,crossingDistances:c,baseClearanceIndexes:l}){if(!t1t({sections:s,sectionIndex:a,targetZ:n.z,side:A}))return null;const u=this.reducedHdRoutes[e],g=this.reducedHdRoutes[i];if(c.length===0)return null;const h=g.viaDiameter/2+u.traceThickness/2+this.traceMargin+Py,d=A===\"start\"?Math.max(...c)+h:Math.min(...c)-h,p=this.relocateTransitionVia({route:g,section:r,targetZ:n.z,side:A,newViaDistance:d});if(!p)return null;const m=this.collapseDetourSection({route:u,section:n,targetZ:o});if(u.vias.length+g.vias.length-m.vias.length-p.route.vias.length!==2)return null;const _={detourRouteIndex:e,detourRoute:m,transitionUpdates:[{routeIndex:i,route:p.route,relocatedVias:[p.relocatedVia]}]};return this.candidateIsClear(_,l)?_:null}tryCreateMultiCrossingCandidate({detourRouteIndex:e,detourSection:n,targetZ:o,crossingGroups:i,sectionsByRoute:r,baseClearanceIndexes:s}){if(i.length\u003c2)return null;const a=this.reducedHdRoutes[e],A=[],c=new Map;for(const g of i){const h=c.get(g.transitionRouteIndex)??[];h.push(g),c.set(g.transitionRouteIndex,h)}for(const[g,h]of c){const d=this.reducedHdRoutes[g],p=this.relocateTransitionVias({route:d,sections:r[g],crossingGroups:h,detourZ:n.z,detourTraceThickness:a.traceThickness});if(!p)return null;A.push({routeIndex:g,route:p.route,relocatedVias:p.relocatedVias})}const l=this.collapseDetourSection({route:a,section:n,targetZ:o});if(a.vias.length+[...c.keys()].reduce((g,h)=\u003eg+this.reducedHdRoutes[h].vias.length,0)-(l.vias.length+A.reduce((g,{route:h})=\u003eg+h.vias.length,0))!==2)return null;this.stats.multiCrossingCandidates=(this.stats.multiCrossingCandidates??0)+1;const u={detourRouteIndex:e,detourRoute:l,transitionUpdates:A};return this.candidateIsClear(u,s)?this.candidateRoutesHaveNoExternalCopperConflicts(u,s)?(this.stats.multiCrossingReductions=(this.stats.multiCrossingReductions??0)+1,this.stats.transitionRoutesMovedByMultiCrossingReductions=(this.stats.transitionRoutesMovedByMultiCrossingReductions??0)+A.length,u):(this.stats.multiCrossingPreexistingConflictRejections=(this.stats.multiCrossingPreexistingConflictRejections??0)+1,null):null}findCrossingReduction(){const e=this.reducedHdRoutes.map(s=\u003eqz(s)),n=[],o=new Set;for(let s=0;s\u003cthis.reducedHdRoutes.length;s++){if(this.reducedHdRoutes[s].jumpers?.length)continue;const a=e[s];for(let A=1;A\u003ca.length-1;A++){const c=a[A-1],l=a[A],u=a[A+1];c.z!==u.z||c.z===l.z||Zft(l)||(n.push({routeIndex:s,section:l,targetZ:c.z}),o.add(`${c.z}:${l.z}`))}}if(n.length===0)return null;const i=this.buildTransitionSegmentIndex(e,o);if(!i)return null;let r=null;for(const s of n){const a=s.routeIndex,A=s.section,c=this.reducedHdRoutes[a],l=this.getIndexedCrossingGroups({detourRouteIndex:a,detourSection:A,targetZ:s.targetZ,transitionSegmentIndex:i}).filter(({transitionRouteIndex:h})=\u003e{const d=this.reducedHdRoutes[h];return!d.jumpers?.length\u0026\u0026!o6e(c,d,this.input.connMap)}),u=new Map;for(const h of l){const d=`${h.transitionRouteIndex}:${h.transitionSectionIndex}`,p=u.get(d)??[];p.push(h),u.set(d,p)}if(u.size\u003e1){r??={mutableRoutes:new oB(this.reducedHdRoutes),immutableRoutes:this.input.otherHdRoutes?.length?new oB([...this.input.otherHdRoutes]):null};let h=[{groups:[],movement:0}];const d=p=\u003e{const m=this.reducedHdRoutes[p.transitionRouteIndex],_=e[p.transitionRouteIndex][p.transitionSectionIndex],f=m.viaDiameter/2+c.traceThickness/2+this.traceMargin+Py,I=p.side===\"start\"?Math.max(...p.crossingDistances)+f:Math.min(...p.crossingDistances)-f;return p.side===\"start\"?I:qft(_.points)-I};for(const p of u.values()){const m=p.map(_=\u003e({group:_,movement:d(_)})).sort((_,f)=\u003e_.movement-f.movement);h=h.flatMap(_=\u003em.map(f=\u003e({groups:[..._.groups,f.group],movement:_.movement+f.movement}))).sort((_,f)=\u003e_.movement-f.movement).slice(0,4)}for(const p of h){const m=this.tryCreateMultiCrossingCandidate({detourRouteIndex:a,detourSection:A,targetZ:s.targetZ,crossingGroups:p.groups,sectionsByRoute:e,baseClearanceIndexes:r});if(m)return m}continue}const g=u.values().next().value??[];for(const h of g){const d=h.transitionRouteIndex,p=e[d],m=p[h.transitionSectionIndex];r??={mutableRoutes:new oB(this.reducedHdRoutes),immutableRoutes:this.input.otherHdRoutes?.length?new oB([...this.input.otherHdRoutes]):null};const _=this.tryCreateCandidate({detourRouteIndex:a,detourSection:A,targetZ:s.targetZ,transitionRouteIndex:d,transitionSection:m,transitionSections:p,transitionSectionIndex:h.transitionSectionIndex,side:h.side,crossingDistances:h.crossingDistances,baseClearanceIndexes:r});if(_)return _}}return null}_step(){const e=this.findCrossingReduction();if(e){this.reducedHdRoutes[e.detourRouteIndex]=e.detourRoute;for(const n of e.transitionUpdates)this.reducedHdRoutes[n.routeIndex]=n.route;this.stats.crossingViaReductions=(this.stats.crossingViaReductions??0)+1,this.stats.viasRemovedByCrossingReductions=(this.stats.viasRemovedByCrossingReductions??0)+2}else this.solved=!0}getReducedHdRoutes(){return this.reducedHdRoutes}visualize(){const e={lines:[],circles:[],rects:[],coordinateSystem:\"cartesian\",title:\"Crossing Via Reduction Solver\"};for(const n of this.input.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:\"rgba(128, 128, 128, 0.2)\"});for(const n of this.reducedHdRoutes){for(let o=1;o\u003cn.route.length;o++){const i=n.route[o-1],r=n.route[o];i.z===r.z\u0026\u0026e.lines.push({points:[i,r],strokeColor:i.z===0?\"#d32f2f\":\"#3367a8\",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${i.z})`})}for(const o of n.vias)e.circles.push({center:o,radius:n.viaDiameter/2,fill:\"#ff20d6\",label:`${n.connectionName} via`})}return e}},cae=1e-6,i6e=(t,e)=\u003eMath.abs(t.x-e.center.x)\u003c=e.width/2+cae\u0026\u0026Math.abs(t.y-e.center.y)\u003c=e.height/2+cae,o1t=t=\u003e(t.__zLayers?.length??t.layers?.length??0)\u003e1,j8=class extends yr{constructor(e){if(super(),this.simplificationConfig=e,this.simplificationConfig={...e,obstacles:c7(e.obstacles,e.layerCount)},this.hdRoutes=this.markThroughObstacleSegments(e.hdRoutes),e.preserveRouteEndpoints){const n=new Map;for(const o of e.hdRoutes){const i=o.route[0],r=o.route.at(-1);if(!i||!r)throw new Error(`TraceSimplificationSolver cannot preserve endpoints for empty route \"${o.connectionName}\"`);if(n.has(o.connectionName))throw new Error(`TraceSimplificationSolver cannot preserve endpoints for duplicate route \"${o.connectionName}\"`);n.set(o.connectionName,{start:{...i},end:{...r}})}this.preservedRouteEndpoints=n}this.MAX_ITERATIONS=1e8}simplificationConfig;getSolverName(){return\"TraceSimplificationSolver\"}hdRoutes=[];preservedRouteEndpoints;simplificationPipelineLoops=0;MAX_SIMPLIFICATION_PIPELINE_LOOPS=2;PHASE_ORDER=[\"via_removal\",\"crossing_via_reduction\",\"via_merging\",\"path_simplification\"];currentPhase=\"via_removal\";extractResult=null;get simplifiedHdRoutes(){return this.hdRoutes}validatePreservedRouteEndpoints(e){if(!this.preservedRouteEndpoints)return;if(e.length!==this.preservedRouteEndpoints.size)throw new Error(`TraceSimplificationSolver changed the preserved route set (expected ${this.preservedRouteEndpoints.size}, got ${e.length})`);const n=new Set,o=(i,r)=\u003eMath.abs(i.x-r.x)\u003c=cae\u0026\u0026Math.abs(i.y-r.y)\u003c=cae\u0026\u0026i.z===r.z;for(const i of e){if(n.has(i.connectionName))throw new Error(`TraceSimplificationSolver produced duplicate preserved route \"${i.connectionName}\"`);n.add(i.connectionName);const r=this.preservedRouteEndpoints.get(i.connectionName),s=i.route[0],a=i.route.at(-1);if(!(r\u0026\u0026s\u0026\u0026a\u0026\u0026o(s,r.start)\u0026\u0026o(a,r.end)))throw new Error(`TraceSimplificationSolver changed a preserved endpoint for route \"${i.connectionName}\"`)}}isSameNetObstacle(e,n){return n.connectedTo.some(o=\u003eo===e.connectionName||o===e.rootConnectionName||this.simplificationConfig.connMap.areIdsConnected(e.connectionName,o)||e.rootConnectionName!==void 0\u0026\u0026this.simplificationConfig.connMap.areIdsConnected(e.rootConnectionName,o))}getSameNetObstacleForSegment(e,n,o){return this.simplificationConfig.obstacles.find(i=\u003eo1t(i)\u0026\u0026this.isSameNetObstacle(e,i)\u0026\u0026i6e(n,i)\u0026\u0026i6e(o,i))}isViaInsideSameNetObstacle(e,n){return this.simplificationConfig.obstacles.some(o=\u003eo1t(o)\u0026\u0026this.isSameNetObstacle(e,o)\u0026\u0026i6e(n,o))}markThroughObstacleSegments(e){return e.map(n=\u003e({...n,route:n.route.map((o,i,r)=\u003e{const s=r[i+1],a=s\u0026\u0026o.z!==s.z\u0026\u0026this.getSameNetObstacleForSegment(n,o,s);if(a)return{...o,toNextSegmentType:\"through_obstacle\",...a.circuitJsonMetadata?{toNextSegmentCircuitJsonMetadata:a.circuitJsonMetadata}:{}};const A={...o};return delete A.toNextSegmentType,delete A.toNextSegmentCircuitJsonMetadata,A}),vias:n.vias.filter(o=\u003e!this.isViaInsideSameNetObstacle(n,o))}))}_step(){if(this.simplificationPipelineLoops\u003e=this.MAX_SIMPLIFICATION_PIPELINE_LOOPS)this.solved=!0;else{if(this.activeSubSolver){if(this.activeSubSolver.step(),!this.activeSubSolver.failed\u0026\u0026!this.activeSubSolver.solved)return;if(this.activeSubSolver.solved){if(this.extractResult){const e=this.extractResult(this.activeSubSolver);this.validatePreservedRouteEndpoints(e),this.hdRoutes=this.markThroughObstacleSegments(e)}if(this.activeSubSolver=null,this.extractResult=null,this.currentPhase===\"via_removal\"?this.currentPhase=this.simplificationConfig.enableCrossingViaReduction?\"crossing_via_reduction\":\"via_merging\":this.currentPhase===\"crossing_via_reduction\"?this.currentPhase=\"via_merging\":this.currentPhase===\"via_merging\"?this.currentPhase=\"path_simplification\":(this.currentPhase=\"via_removal\",this.simplificationPipelineLoops++),this.simplificationPipelineLoops\u003e=this.MAX_SIMPLIFICATION_PIPELINE_LOOPS)return void(this.solved=!0)}else if(this.activeSubSolver.failed)return this.failed=!0,void(this.error=this.activeSubSolver.error??\"Sub-solver failed without error message\")}if(!this.activeSubSolver\u0026\u0026!this.solved)switch(this.currentPhase){case\"via_removal\":this.activeSubSolver=new uZn({unsimplifiedHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],obstacles:[...this.simplificationConfig.obstacles],colorMap:{...this.simplificationConfig.colorMap},layerCount:this.simplificationConfig.layerCount,connMap:this.simplificationConfig.connMap,outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,geometryShortcutTraceMargin:.1,geometryShortcutObstacleMargin:this.simplificationConfig.minTraceToPadEdgeClearance??.15,enableGeometryShortcuts:this.simplificationPipelineLoops\u003e0,enableObstacleDetourShortcuts:this.simplificationConfig.enableCrossingViaReduction===!0\u0026\u0026this.simplificationPipelineLoops\u003e0,preserveRouteEndpoints:this.simplificationConfig.preserveRouteEndpoints,terminalLayerIndicesByPcbPortId:this.simplificationConfig.terminalLayerIndicesByPcbPortId}),this.extractResult=e=\u003ee.getOptimizedHdRoutes()??[];break;case\"crossing_via_reduction\":this.activeSubSolver=new xZn({inputHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],obstacles:[...this.simplificationConfig.obstacles],connMap:this.simplificationConfig.connMap,layerCount:this.simplificationConfig.layerCount,outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,traceMargin:.1,obstacleMargin:this.simplificationConfig.minTraceToPadEdgeClearance??.15}),this.extractResult=e=\u003ee.getReducedHdRoutes();break;case\"via_merging\":this.activeSubSolver=new jft({inputHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],netByConnectionName:this.simplificationConfig.netByConnectionName,obstacles:[...this.simplificationConfig.obstacles],colorMap:{...this.simplificationConfig.colorMap},layerCount:this.simplificationConfig.layerCount,connMap:this.simplificationConfig.connMap,outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,preserveRouteEndpoints:this.simplificationConfig.preserveRouteEndpoints}),this.extractResult=e=\u003ee.getMergedViaHdRoutes()??[];break;case\"path_simplification\":this.activeSubSolver=new pZn({unsimplifiedHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],obstacles:[...this.simplificationConfig.obstacles],connMap:this.simplificationConfig.connMap,colorMap:{...this.simplificationConfig.colorMap},outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,minBoardEdgeClearance:this.simplificationConfig.minBoardEdgeClearance,defaultViaDiameter:this.simplificationConfig.defaultViaDiameter,useTraceWidthAwareClearance:this.simplificationConfig.useTraceWidthAwareClearance}),this.extractResult=e=\u003ee.simplifiedHdRoutes;break;default:this.failed=!0,this.error=`Unknown phase: ${this.currentPhase}`}}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Trace Simplification Solver\"};for(const n of this.simplificationConfig.obstacles){let o=\"rgba(128, 128, 128, 0.2)\";const i=n.__zLayers?.includes(0),r=n.__zLayers?.includes(1);i\u0026\u0026r?o=\"rgba(128, 0, 128, 0.2)\":i?o=\"rgba(255, 0, 0, 0.2)\":r\u0026\u0026(o=\"rgba(0, 0, 255, 0.2)\"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(\", \")})`})}for(const n of this.simplificationConfig.otherHdRoutes??[]){for(let o=0;o\u003cn.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z\u0026\u0026e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:i.z===0?\"rgba(160, 32, 32, 0.55)\":\"rgba(32, 32, 160, 0.55)\",strokeWidth:n.traceThickness,strokeDash:[.08,.08],label:`${n.connectionName} immutable (z=${i.z})`})}for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:n.viaDiameter/2,fill:\"rgba(96, 96, 96, 0.45)\",label:`${n.connectionName} immutable via`})}for(const n of this.hdRoutes)if(n.route.length!==0){for(let o=0;o\u003cn.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z\u0026\u0026e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:i.z===0?\"red\":\"blue\",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${i.z})`})}for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:n.viaDiameter/2,fill:\"rgba(255, 0, 255, 0.5)\",label:`${n.connectionName} via`});if(n.jumpers\u0026\u0026n.jumpers.length\u003e0){const o=_x(n.jumpers,{color:\"orange\",label:n.connectionName});e.rects.push(...o.rects??[]),e.lines.push(...o.lines??[])}}return e}},J3=1e-9,aL=class extends yr{getSolverName(){return\"TraceWidthSolver\"}hdRoutes;hdRoutesWithWidths=[];nominalTraceWidth;minTraceWidth;obstacleMargin;TRACE_WIDTH_SCHEDULE;connectionNominalTraceWidthMap;unprocessedRoutes=[];processedRoutes=[];currentTrace=null;cursorPosition=null;currentTraceSegmentIndex=0;currentTraceSegmentT=0;currentScheduleIndex=0;currentTargetWidth=0;hasInsufficientClearance=!1;lastCollidingObstacles=[];lastCollidingRoutes=[];lastClearance=1/0;obstacles=[];obstacleSHI;hdRouteSHI;connMap;colorMap;constructor(e){super(),this.MAX_ITERATIONS=1e6,this.hdRoutes=[...e.hdRoutes],this.minTraceWidth=e.minTraceWidth,this.obstacleMargin=e.obstacleMargin??.15,this.nominalTraceWidth=0,this.TRACE_WIDTH_SCHEDULE=[],this.unprocessedRoutes=[...this.hdRoutes],this.connMap=e.connMap,this.colorMap=e.colorMap;const n=e.layerCount;this.obstacles=c7(e.obstacles??[],n),this.connectionNominalTraceWidthMap=new Map;for(const o of e.connection)o.nominalTraceWidth!==void 0\u0026\u0026this.connectionNominalTraceWidthMap.set(o.name,o.nominalTraceWidth);this.obstacles.length\u003e0\u0026\u0026(this.obstacleSHI=new OD(\"flatbush\",this.obstacles)),this.hdRouteSHI=new oB(this.hdRoutes)}getNominalTraceWidthForRoute(e){const n=this.connectionNominalTraceWidthMap.get(e.connectionName);return n!==void 0?n:e.rootConnectionName?this.connectionNominalTraceWidthMap.get(e.rootConnectionName):void 0}_step(){if(!this.currentTrace){const e=this.unprocessedRoutes.shift();if(!e)return this.hdRoutesWithWidths=this.processedRoutes,void(this.solved=!0);const n=this.getNominalTraceWidthForRoute(e);if(n===void 0){const i=e.traceThickness??this.minTraceWidth;return this.processedRoutes.push(this.createRouteWithWidth(e,i)),void(this.currentTrace=null)}this.currentTrace=e,this.nominalTraceWidth=n;const o=(this.nominalTraceWidth+this.minTraceWidth)/2;return this.TRACE_WIDTH_SCHEDULE=[this.nominalTraceWidth,o],this.currentTrace.route.length\u003c2?(this.processedRoutes.push(this.createRouteWithWidth(this.currentTrace,this.minTraceWidth)),void(this.currentTrace=null)):(this.currentScheduleIndex=0,this.currentTargetWidth=this.TRACE_WIDTH_SCHEDULE[0],void this.initializeCursor())}if(!this.stepCursorForward())return void this.finalizeCurrentTrace(this.currentTargetWidth);this.getClearanceAtPosition(this.cursorPosition)\u003cthis.currentTargetWidth/2+this.obstacleMargin\u0026\u0026(this.hasInsufficientClearance=!0,this.currentScheduleIndex++,this.currentScheduleIndex\u003cthis.TRACE_WIDTH_SCHEDULE.length?(this.currentTargetWidth=this.TRACE_WIDTH_SCHEDULE[this.currentScheduleIndex],this.initializeCursor()):this.finalizeCurrentTrace(this.minTraceWidth))}initializeCursor(){if(!this.currentTrace)return;const e=this.currentTrace.route[0];this.cursorPosition={...e},this.currentTraceSegmentIndex=0,this.currentTraceSegmentT=0,this.hasInsufficientClearance=!1}stepCursorForward(){if(!this.currentTrace||!this.cursorPosition)return!1;const e=this.currentTrace.route;let n=.1;for(;n\u003e0;){if(this.currentTraceSegmentIndex\u003e=e.length-1)return!1;const o=e[this.currentTraceSegmentIndex],i=e[this.currentTraceSegmentIndex+1];if(o.insideJumperPad\u0026\u0026i.insideJumperPad){this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0;continue}const r=i.x-o.x,s=i.y-o.y,a=Math.sqrt(r*r+s*s);if(a===0){this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0;continue}const A=this.currentTraceSegmentT*a,c=a-A;if(n\u003c=c){const l=A+n;return this.currentTraceSegmentT=l/a,this.cursorPosition={x:o.x+r*this.currentTraceSegmentT,y:o.y+s*this.currentTraceSegmentT,z:o.z},!0}if(n-=c,this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0,this.currentTraceSegmentIndex\u003e=e.length-1){const l=e[e.length-1];return this.cursorPosition={...l},!1}}return!0}isObstacleOwnJumperPad(e){if(!this.currentTrace?.jumpers)return!1;for(const n of this.currentTrace.jumpers){const o=Math.sqrt((e.center.x-n.start.x)**2+(e.center.y-n.start.y)**2),i=Math.sqrt((e.center.x-n.end.x)**2+(e.center.y-n.end.y)**2),r=Math.max(e.width,e.height)/2+.01;if(o\u003cr||i\u003cr)return!0}return!1}getClearanceAtPosition(e){if(!this.currentTrace)return 1/0;const n=this.currentTrace.rootConnectionName??this.currentTrace.connectionName,o=2*this.nominalTraceWidth;let i=1/0;if(this.lastCollidingObstacles=[],this.lastCollidingRoutes=[],this.obstacleSHI){const s=this.obstacleSHI.searchArea(e.x,e.y,o,o);for(const a of s){if(a.__zLayers\u0026\u0026!a.__zLayers.includes(e.z)||a.connectedTo.includes(n)||a.obstacleId\u0026\u0026this.connMap?.areIdsConnected(n,a.obstacleId))continue;let A=!1;if(this.connMap){for(const m of a.connectedTo)if(this.connMap.areIdsConnected(n,m)){A=!0;break}}if(A||this.isObstacleOwnJumperPad(a))continue;const c=a.center.x-a.width/2,l=a.center.x+a.width/2,u=a.center.y-a.height/2,g=a.center.y+a.height/2,h=Math.max(c-e.x,0,e.x-l),d=Math.max(u-e.y,0,e.y-g),p=Math.sqrt(h*h+d*d);p\u003cthis.currentTargetWidth/2+this.obstacleMargin\u0026\u0026this.lastCollidingObstacles.push(a),p\u003ci\u0026\u0026(i=p)}}const r=this.hdRouteSHI.getConflictingRoutesNearPoint({x:e.x,y:e.y,z:e.z},o);for(const{conflictingRoute:s,distance:a}of r){const A=s.rootConnectionName??s.connectionName;if(A===n||this.connMap?.areIdsConnected(n,A))continue;const c=a-(s.traceThickness??.15)/2;c\u003cthis.currentTargetWidth/2+this.obstacleMargin\u0026\u0026this.lastCollidingRoutes.push(s),c\u003ci\u0026\u0026(i=c)}return this.lastClearance=i,i}isObstacleOnPointLayer(e,n){return!e.__zLayers||e.__zLayers.includes(n.z)}getAdjacentNonCoincidentRoutePoint(e,n){const o=e.route[n];if(!o)return;const i=n===0?1:-1;for(let r=n+i;r\u003e=0\u0026\u0026r\u003ce.route.length;r+=i){const s=e.route[r];if(no(s,o)\u003eJ3)return s}}getObstacleWidthAlongVector(e,n){const o=(e.ccwRotationDegrees??0)*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=i,a=r,A=-r,c=i;return Math.abs(n.x*s+n.y*a)*e.width+Math.abs(n.x*A+n.y*c)*e.height}getTerminalPadWidthLimit(e,n,o){const i=e.route[n];if(!i)return;const r=this.getAdjacentNonCoincidentRoutePoint(e,n);if(!r)return;const s=n===0?u7e(i,r):u7e(r,i);if(no(s,{x:0,y:0})\u003c=J3)return;const a={x:-s.y,y:s.x};let A;for(const c of this.obstacles){if(!this.isObstacleOnPointLayer(c,i)||!Hse(c,e,this.connMap)||o7(i,c)\u003eJ3)continue;const l=this.getObstacleWidthAlongVector(c,a);if(l\u003c=J3)continue;const u=this.getObstacleWidthAlongVector(c,s)/2;(!A||l\u003cA.width||Math.abs(l-A.width)\u003c=J3\u0026\u0026u\u003eA.neckDistance)\u0026\u0026(A={width:l,neckDistance:u})}return!A||A.width\u003e=o-J3?void 0:A}getRouteDistanceInfo(e){const n=[0];let o=0;for(let i=1;i\u003ce.length;i++){const r=e[i-1];o+=no(e[i],r),n.push(o)}return{distances:n,totalDistance:o}}interpolateRoutePointAtDistance(e,n,o){for(let i=1;i\u003ce.length;i++){const r=n[i-1],s=n[i],a=s-r;if(o\u003es+J3)continue;const A=e[i-1],c=e[i];if(a\u003c=J3)return{...c};const l=Math.max(0,Math.min(1,(o-r)/a));return{x:A.x+(c.x-A.x)*l,y:A.y+(c.y-A.y)*l,z:A.z}}return{...e[e.length-1]}}getTaperWidthAtDistance({distanceFromStart:e,totalDistance:n,startLimit:o,endLimit:i,taperDistance:r,traceWidth:s}){let a=s;if(o!==void 0\u0026\u0026e\u003c=r){const A=Math.min(o.neckDistance,r);if(e\u003c=A)a=Math.min(a,o.width);else{const c=(e-A)/Math.max(r-A,J3);a=Math.min(a,o.width+(s-o.width)*c)}}if(i!==void 0){const A=n-e;if(A\u003c=r){const c=Math.min(i.neckDistance,r);if(A\u003c=c)a=Math.min(a,i.width);else{const l=(A-c)/Math.max(r-c,J3);a=Math.min(a,i.width+(s-i.width)*l)}}}return a}createTerminalTaperedRoute(e,n){if(e.route.length\u003c2)return e.route.map(l=\u003e({...l,traceThickness:l.traceThickness??n}));const o=this.getTerminalPadWidthLimit(e,0,n),i=this.getTerminalPadWidthLimit(e,e.route.length-1,n),{distances:r,totalDistance:s}=this.getRouteDistanceInfo(e.route);if(s\u003c=J3){const l=Math.min(o?.width??n,i?.width??n);return e.route.map(u=\u003e({...u,traceThickness:l}))}const a=Math.min(Math.max(2*n,.75),s/2),A=r.map((l,u)=\u003e({distanceFromStart:l,originalPointIndex:u})),c=[];if(o!==void 0){c.push(o.neckDistance);for(let l=0;l\u003c=8;l++)c.push(a*l/8)}if(i!==void 0){c.push(s-i.neckDistance);for(let l=0;l\u003c=8;l++)c.push(s-a+a*l/8)}for(const l of c){const u=Math.max(0,Math.min(s,l));A.some(g=\u003eMath.abs(g.distanceFromStart-u)\u003c=J3)||A.push({distanceFromStart:u})}return A.sort((l,u)=\u003e{const g=l.distanceFromStart-u.distanceFromStart;return Math.abs(g)\u003eJ3?g:(l.originalPointIndex??1/0)-(u.originalPointIndex??1/0)}),A.map(l=\u003e{const{distanceFromStart:u}=l,g=l.originalPointIndex!==void 0?{...e.route[l.originalPointIndex]}:this.interpolateRoutePointAtDistance(e.route,r,u);return g.traceThickness=this.getTaperWidthAtDistance({distanceFromStart:u,totalDistance:s,startLimit:o,endLimit:i,taperDistance:a,traceWidth:n}),g})}createRouteWithWidth(e,n){return{connectionName:e.connectionName,rootConnectionName:e.rootConnectionName,traceThickness:n,viaDiameter:e.viaDiameter,route:this.createTerminalTaperedRoute(e,n),vias:[...e.vias],jumpers:e.jumpers}}finalizeCurrentTrace(e){if(!this.currentTrace)return;const n=this.createRouteWithWidth(this.currentTrace,e);this.processedRoutes.push(n),this.currentTrace=null,this.cursorPosition=null,this.hasInsufficientClearance=!1}visualize(){const e={lines:[],points:[],circles:[],rects:[],coordinateSystem:\"cartesian\",title:`Trace Width Solver (schedule: [${this.TRACE_WIDTH_SCHEDULE.map(i=\u003ei.toFixed(2)).join(\", \")}]mm, fallback: ${this.minTraceWidth.toFixed(2)}mm, margin: ${this.obstacleMargin.toFixed(2)}mm)`},n=new Set(this.lastCollidingObstacles.map(i=\u003ei.obstacleId)),o=new Set(this.lastCollidingRoutes.map(i=\u003ei.connectionName));for(const i of this.obstacles){const r=n.has(i.obstacleId),s=i.__zLayers?.includes(0),a=i.__zLayers?.includes(1);let A;A=r?\"rgba(255, 0, 0, 0.6)\":s\u0026\u0026a?\"rgba(128, 0, 128, 0.15)\":s?\"rgba(255, 0, 0, 0.15)\":a?\"rgba(0, 0, 255, 0.15)\":\"rgba(128, 128, 128, 0.15)\",e.rects.push({center:i.center,width:i.width,height:i.height,fill:A,stroke:r?\"red\":void 0,label:r?`COLLIDING: ${i.obstacleId??\"obstacle\"}`:`${i.obstacleId??\"obstacle\"} (Z: ${i.__zLayers?.join(\", \")})`})}for(const i of this.processedRoutes){if(i.route.length===0)continue;const r=i.traceThickness===this.nominalTraceWidth,s=i.traceThickness===this.TRACE_WIDTH_SCHEDULE[1],a=r?\"green\":s?\"yellow\":\"orange\";for(let A=0;A\u003ci.route.length-1;A++){const c=i.route[A],l=i.route[A+1];c.insideJumperPad\u0026\u0026l.insideJumperPad||c.z===l.z\u0026\u0026e.lines.push({points:[{x:c.x,y:c.y},{x:l.x,y:l.y}],strokeColor:a,strokeWidth:c.traceThickness??i.traceThickness,label:`${i.connectionName} (w=${(c.traceThickness??i.traceThickness).toFixed(2)})`})}for(const A of i.vias)e.circles.push({center:{x:A.x,y:A.y},radius:i.viaDiameter/2,fill:\"rgba(255, 0, 255, 0.5)\",label:`${i.connectionName} via`});if(i.jumpers\u0026\u0026i.jumpers.length\u003e0){const A=_x(i.jumpers,{color:a,label:i.connectionName});e.rects.push(...A.rects??[]),e.lines.push(...A.lines??[])}}if(this.currentTrace){for(let i=0;i\u003cthis.currentTrace.route.length-1;i++){const r=this.currentTrace.route[i],s=this.currentTrace.route[i+1];r.insideJumperPad\u0026\u0026s.insideJumperPad||r.z===s.z\u0026\u0026e.lines.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:\"cyan\",strokeWidth:this.currentTrace.traceThickness??this.minTraceWidth,label:`Processing: ${this.currentTrace.connectionName}`})}this.cursorPosition\u0026\u0026(e.circles.push({center:{x:this.cursorPosition.x,y:this.cursorPosition.y},radius:this.currentTargetWidth/2,stroke:this.hasInsufficientClearance?\"red\":\"green\",fill:\"none\",label:`Testing width: ${this.currentTargetWidth.toFixed(2)}mm (clearance: ${this.lastClearance.toFixed(2)}mm)`}),e.points.push({x:this.cursorPosition.x,y:this.cursorPosition.y,color:\"orange\",label:\"Cursor\"}))}for(const i of this.unprocessedRoutes){if(i.route.length===0)continue;const r=o.has(i.connectionName);for(let s=0;s\u003ci.route.length-1;s++){const a=i.route[s],A=i.route[s+1];a.z===A.z\u0026\u0026e.lines.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:r?\"rgba(255, 0, 0, 0.8)\":\"rgba(128, 128, 128, 0.3)\",strokeWidth:i.traceThickness??this.minTraceWidth,label:r?`COLLIDING: ${i.connectionName}`:i.connectionName})}}return e}getHdRoutesWithWidths(){return this.hdRoutesWithWidths}},EZn=class extends yr{getSolverName(){return\"CapacityEdgeToPortSegmentSolver\"}nodes;edges;capacityPaths;nodeMap;nodeEdgeMap;unprocessedNodeIds;nodePortSegments;colorMap;constructor({nodes:t,edges:e,capacityPaths:n,colorMap:o}){super(),this.nodes=t,this.edges=e,this.nodeMap=new Map(t.map(i=\u003e[i.capacityMeshNodeId,i])),this.nodeEdgeMap=tL(e),this.capacityPaths=n,this.colorMap=o??{},this.unprocessedNodeIds=[...new Set(n.flatMap(i=\u003ei.nodeIds))],this.nodePortSegments=new Map}step(){const t=this.unprocessedNodeIds.pop();if(!t)return void(this.solved=!0);const e=[];for(const r of this.capacityPaths){const s=r.nodeIds.indexOf(t);s!==-1\u0026\u0026e.push({path:r,indexOfNodeInPath:s})}const n=this.nodeMap.get(t),o=[];for(const{path:r,indexOfNodeInPath:s}of e){const a=r.nodeIds[s-1],A=r.nodeIds[s+1];for(const c of[a,A]){const l=this.nodeMap.get(c);if(!l)continue;const u=BZn(n,l),g=l.availableZ.filter(d=\u003en.availableZ.includes(d));if(g.length===0)continue;const h={capacityMeshNodeId:t,start:u.start,end:u.end,connectionNames:[r.connectionName],rootConnectionNames:r.rootConnectionName?[r.rootConnectionName]:void 0,availableZ:g};o.push(h)}}const i=(function(r){const s=[],a=r.map(A=\u003e({...A,connectionNames:[...A.connectionNames],rootConnectionNames:A.rootConnectionNames?[...A.rootConnectionNames]:[],availableZ:[...A.availableZ].sort((c,l)=\u003ec-l)}));for(;a.length\u003e0;){const A=a.pop();let c=!1;for(let l=0;l\u003cs.length;l++){const u=s[l],g=lae(u.start,A.start)\u0026\u0026lae(u.end,A.end)||lae(u.start,A.end)\u0026\u0026lae(u.end,A.start),h=bZn(u.availableZ,A.availableZ);if(g\u0026\u0026h){const d=new Set(u.connectionNames);A.connectionNames.forEach(m=\u003ed.add(m)),u.connectionNames=Array.from(d);const p=new Set(u.rootConnectionNames||[]);A.rootConnectionNames?.forEach(m=\u003ep.add(m)),u.rootConnectionNames=Array.from(p),c=!0;break}}c||s.push(A)}return s})(o);this.nodePortSegments.set(t,i)}visualize(){const t={lines:[],points:[],rects:[],circles:[]};return this.nodePortSegments.forEach((e,n)=\u003e{this.nodeMap.get(n),e.forEach(o=\u003e{o.start.x,o.end.x;for(let i=0;i\u003co.connectionNames.length;i++){const r={x:.05*Math.max(...o.availableZ),y:.05*Math.max(...o.availableZ)},s={x:(o.start.x+o.end.x)/2,y:(o.start.y+o.end.y)/2},a={x:s.x+r.x,y:s.y+r.y};r.x\u003e0\u0026\u0026t.lines.push({points:[s,a],strokeColor:\"rgba(0, 0, 0, 0.25)\",strokeDash:\"5 5\"}),t.points.push({x:a.x,y:a.y,label:`${n}: ${o.connectionNames.join(\", \")}\navailableZ: ${o.availableZ.join(\",\")}\nnodePortSegmentId: ${o.nodePortSegmentId}`}),t.lines.push({points:[o.start,o.end],strokeColor:Es(this.colorMap[o.connectionNames[i]],.6)})}})}),t}};function BZn(t,e){const n={start:Math.max(t.center.x-t.width/2,e.center.x-e.width/2),end:Math.min(t.center.x+t.width/2,e.center.x+e.width/2)},o={start:Math.max(t.center.y-t.height/2,e.center.y-e.height/2),end:Math.min(t.center.y+t.height/2,e.center.y+e.height/2)};if(n.end-n.start\u003co.end-o.start){const i=(n.start+n.end)/2;return{start:{x:i,y:o.start},end:{x:i,y:o.end}}}{const i=(o.start+o.end)/2;return{start:{x:n.start,y:i},end:{x:n.end,y:i}}}}var i1t=1e-9;function lae(t,e){return Math.abs(t.x-e.x)\u003ci1t\u0026\u0026Math.abs(t.y-e.y)\u003ci1t}function bZn(t,e){if(t.length!==e.length)return!1;for(let n=0;n\u003ct.length;n++)if(t[n]!==e[n])return!1;return!0}var SZn=class{constructor(e){this.targets=e,this.buckets=new Map;for(let n=0;n\u003ce.length;n++){const o=e[n],i=Math.floor(o.bounds.minX/this.CELL_SIZE)*this.CELL_SIZE,r=Math.floor(o.bounds.minY/this.CELL_SIZE)*this.CELL_SIZE,s=o.bounds.maxX,a=o.bounds.maxY;for(let A=i;A\u003c=s;A+=this.CELL_SIZE)for(let c=r;c\u003c=a;c+=this.CELL_SIZE){const l=this.getBucketKey(A,c),u=this.buckets.get(l);u?u.push([o,n]):this.buckets.set(l,[[o,n]])}}}targets;buckets;CELL_SIZE=5;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getTargetsInArea(e,n,o,i){const r=[],s=new Set,a=Math.floor((e-o/2)/this.CELL_SIZE)*this.CELL_SIZE,A=Math.floor((n-i/2)/this.CELL_SIZE)*this.CELL_SIZE,c=e+o/2,l=n+i/2;for(let u=a;u\u003c=c;u+=this.CELL_SIZE)for(let g=A;g\u003c=l;g+=this.CELL_SIZE){const h=this.getBucketKey(u,g),d=this.buckets.get(h)||[];for(const p of d)s.has(p[1])||(s.add(p[1]),r.push(p[0]))}return r}},QZn=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.MAX_DEPTH=n?.capacityDepth??this.MAX_DEPTH,this.MAX_ITERATIONS=1e5,this.layerCount=e.layerCount??2,this.outlinePolygon=e.outline\u0026\u0026e.outline.length\u003e=3?e.outline:void 0;const o={x:(e.bounds.minX+e.bounds.maxX)/2,y:(e.bounds.minY+e.bounds.maxY)/2},i={width:e.bounds.maxX-e.bounds.minX,height:e.bounds.maxY-e.bounds.minY},r=Math.max(i.width,i.height);this.unfinishedNodes=[{capacityMeshNodeId:this.getNextNodeId(),center:o,width:r,height:r,layer:\"top\",availableZ:Array.from({length:this.layerCount},(a,A)=\u003eA),_depth:0,_containsTarget:!0,_containsObstacle:!0,_completelyInsideObstacle:!1}],this.finishedNodes=[],this.nodeToXYOverlappingObstaclesMap=new Map,this.obstacleZLayersByObstacle=new WeakMap;const s=c7(this.srj.obstacles,this.layerCount);for(const[a,A]of this.srj.obstacles.entries())this.obstacleZLayersByObstacle.set(A,s[a].__zLayers);this.obstacleTree=new OD(\"flatbush\",this.srj.obstacles),this.targets=this.computeTargets(),this.targetTree=new SZn(this.targets)}srj;opts;getSolverName(){return\"CapacityMeshNodeSolver\"}unfinishedNodes;finishedNodes;nodeToXYOverlappingObstaclesMap;layerCount;outlinePolygon;MAX_DEPTH=4;targets;targetTree;obstacleTree;obstacleZLayersByObstacle;computeTargets(){const e=[];for(const n of this.srj.connections)for(const o of n.pointsToConnect){const i=RD(o),r=this.obstacleTree.searchArea(o.x,o.y,.01,.01).filter(A=\u003e{const c=this.getObstacleZLayers(A);return!(!c||c.length===0)\u0026\u0026c.some(l=\u003ei.some(u=\u003el===Kr(u,this.layerCount)))});let s={minX:o.x-.005,minY:o.y-.005,maxX:o.x+.005,maxY:o.y+.005};r.length\u003e0\u0026\u0026(s={minX:Math.min(...r.map(A=\u003eA.center.x-A.width/2)),minY:Math.min(...r.map(A=\u003eA.center.y-A.height/2)),maxX:Math.max(...r.map(A=\u003eA.center.x+A.width/2)),maxY:Math.max(...r.map(A=\u003eA.center.y+A.height/2))});const a={...o,connectionName:n.name,availableZ:i.map(A=\u003eKr(A,this.layerCount)),bounds:s};e.push(a)}return e}getNodeBounds(e){const n=e.width/2,o=e.height/2;return{minX:e.center.x-n,maxX:e.center.x+n,minY:e.center.y-o,maxY:e.center.y+o}}getNodeRect(e){return{center:{x:e.center.x,y:e.center.y},width:e.width,height:e.height}}_nextNodeCounter=0;getNextNodeId(){return\"cn\"+this._nextNodeCounter++}getCapacityFromDepth(e){return(this.MAX_DEPTH-e+1)**2}getTargetIfNodeContainsTarget(e){const n=e.width\u003e4*this.targetTree.CELL_SIZE?this.targets:this.targetTree.getTargetsInArea(e.center.x,e.center.y,e.width,e.height);for(const o of n)if(o.bounds.minX\u003c=e.center.x+e.width/2\u0026\u0026o.bounds.maxX\u003e=e.center.x-e.width/2\u0026\u0026o.bounds.minY\u003c=e.center.y+e.height/2\u0026\u0026o.bounds.maxY\u003e=e.center.y-e.height/2\u0026\u0026o.availableZ.some(i=\u003ee.availableZ.includes(i)))return o;return null}getXYOverlappingObstacles(e){const n=this.nodeToXYOverlappingObstaclesMap.get(e.capacityMeshNodeId);if(n)return n;const o=[],i=this.getNodeBounds(e),r=i.minX,s=i.maxX,a=i.minY,A=i.maxY,c=e._parent?this.getXYOverlappingObstacles(e._parent):this.srj.obstacles;for(const l of c){const u=l.center.x-l.width/2,g=l.center.x+l.width/2,h=l.center.y-l.height/2,d=l.center.y+l.height/2;(s\u003e=u\u0026\u0026r\u003c=g\u0026\u0026A\u003e=h\u0026\u0026a\u003c=d||r\u003e=u\u0026\u0026s\u003c=g\u0026\u0026a\u003e=h\u0026\u0026A\u003c=d||u\u003e=r\u0026\u0026g\u003c=s\u0026\u0026h\u003e=a\u0026\u0026d\u003c=A)\u0026\u0026o.push(l)}return this.nodeToXYOverlappingObstaclesMap.set(e.capacityMeshNodeId,o),o}getXYZOverlappingObstacles(e){const n=this.getXYOverlappingObstacles(e),o=[];for(const i of n)e.availableZ.some(r=\u003ethis.getObstacleZLayers(i).includes(r))\u0026\u0026o.push(i);return o}doesNodeOverlapObstacle(e){if(this.getXYZOverlappingObstacles(e).length\u003e0)return!0;const n=this.getNodeBounds(e);if(this.outlinePolygon){const o=this.getNodeRect(e);if(!E_t(o,this.outlinePolygon))return!0}return n.minX\u003cthis.srj.bounds.minX||n.maxX\u003ethis.srj.bounds.maxX||n.minY\u003cthis.srj.bounds.minY||n.maxY\u003ethis.srj.bounds.maxY}isNodeCompletelyInsideObstacle(e){const n=this.getXYZOverlappingObstacles(e),o=this.getNodeBounds(e);if(this.outlinePolygon){const i=this.getNodeRect(e);if(!Nse(i,this.outlinePolygon))return!0}for(const i of n){const r=i.center.x-i.width/2,s=i.center.x+i.width/2,a=i.center.y-i.height/2,A=i.center.y+i.height/2;if(o.minX\u003e=r\u0026\u0026o.maxX\u003c=s\u0026\u0026o.minY\u003e=a\u0026\u0026o.maxY\u003c=A)return!0}return!1}getChildNodes(e){if(e._depth===this.MAX_DEPTH)return[];const n=[],o={width:e.width/2,height:e.height/2},i=[{x:e.center.x-o.width/2,y:e.center.y-o.height/2},{x:e.center.x+o.width/2,y:e.center.y-o.height/2},{x:e.center.x-o.width/2,y:e.center.y+o.height/2},{x:e.center.x+o.width/2,y:e.center.y+o.height/2}];for(const r of i){const s={capacityMeshNodeId:this.getNextNodeId(),center:r,width:o.width,height:o.height,layer:e.layer,availableZ:e.availableZ,_depth:(e._depth??0)+1,_parent:e};s._containsObstacle=this.doesNodeOverlapObstacle(s);const a=this.getTargetIfNodeContainsTarget(s);a\u0026\u0026(s._targetConnectionName=a.connectionName,s.availableZ=a.availableZ,s._containsTarget=!0),s._containsObstacle\u0026\u0026(s._completelyInsideObstacle=this.isNodeCompletelyInsideObstacle(s)),s._completelyInsideObstacle\u0026\u0026!s._containsTarget||n.push(s)}return n}shouldNodeBeXYSubdivided(e){return!(e._depth\u003e=this.MAX_DEPTH)\u0026\u0026(!!e._containsTarget||!(!e._containsObstacle||e._completelyInsideObstacle))}_step(){const e=this.unfinishedNodes.pop();if(!e)return void(this.solved=!0);const n=this.getChildNodes(e),o=[],i=[];for(const r of n){const s=this.shouldNodeBeXYSubdivided(r);s?i.push(r):s||r._containsObstacle?!s\u0026\u0026r._containsTarget\u0026\u0026o.push(r):o.push(r)}this.unfinishedNodes.push(...i),this.finishedNodes.push(...o)}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Capacity Mesh Visualization\"};if(this.outlinePolygon\u0026\u0026this.outlinePolygon.length\u003e=2){const o=this.outlinePolygon.map(i=\u003e({x:i.x,y:i.y}));o.push({...o[0]}),e.lines.push({points:o,strokeColor:\"rgba(0, 136, 255, 0.95)\",label:\"outline\"});for(const i of this.outlinePolygon)e.points.push({x:i.x,y:i.y,color:\"rgba(0, 136, 255, 0.95)\"})}for(const o of this.srj.obstacles){if(o.isCopperPour)continue;const i=this.getObstacleZLayers(o);e.rects.push({center:o.center,width:o.width,height:o.height,fill:i.length===1\u0026\u0026i.includes(1)?\"rgba(0,0,255,0.3)\":\"rgba(255,0,0,0.3)\",stroke:\"red\",label:[\"obstacle\",`z: ${i.join(\",\")}`].join(`\n`)})}const n=[...this.finishedNodes,...this.unfinishedNodes];for(const o of n){const i=Math.min(...o.availableZ),r=this.unfinishedNodes.length\u003e0\u0026\u0026o===this.unfinishedNodes[this.unfinishedNodes.length-1];e.rects.push({center:{x:o.center.x+i*o.width*.05,y:o.center.y-i*o.width*.05},width:Math.max(o.width-2,.8*o.width),height:Math.max(o.height-2,.8*o.height),fill:o._containsObstacle?\"rgba(255,0,0,0.1)\":{\"0,1\":\"rgba(0,0,0,0.1)\",0:\"rgba(0,200,200, 0.1)\",1:\"rgba(0,0,200, 0.1)\"}[o.availableZ.join(\",\")]??\"rgba(0,200,200,0.1)\",stroke:r?\"rgba(255,165,0,0.5)\":void 0,label:[o.capacityMeshNodeId,`availableZ: ${o.availableZ.join(\",\")}`,`target? ${o._containsTarget??!1}`,`obs? ${o._containsObstacle??!1}`,`${o.width.toFixed(2)}x${o.height.toFixed(2)}`,`capacity: ${l7(o).toFixed(2)}`].join(`\n`)})}return e.rects.sort((o,i)=\u003eo.center.y-i.center.y),this.srj.connections.forEach((o,i)=\u003e{const r=Y_t[i%Y_t.length];for(const s of o.pointsToConnect){const a=RD(s);e.points.push({x:s.x,y:s.y,label:`conn-${i} (${a.join(\",\")})`,color:r})}}),e}getObstacleZLayers(e){return this.obstacleZLayersByObstacle.get(e)??[]}},vZn=class extends QZn{constructor(e,n={}){super(e,n),this.srj=e,this.opts=n,this.VIA_DIAMETER=om(e).padDiameter}srj;opts;getSolverName(){return\"CapacityMeshNodeSolver2_NodeUnderObstacle\"}VIA_DIAMETER=.6;OBSTACLE_MARGIN=.1;OVERLAP_THRESHOLD_FOR_SINGLE_LAYER_NODES=.2;isNodeCompletelyOutsideBounds(e){if(this.outlinePolygon){const n=this.getNodeRect(e);if(!Nse(n,this.outlinePolygon))return!0}return e.center.x+e.width/2\u003cthis.srj.bounds.minX||e.center.x-e.width/2\u003ethis.srj.bounds.maxX||e.center.y+e.height/2\u003cthis.srj.bounds.minY||e.center.y-e.height/2\u003ethis.srj.bounds.maxY}isNodePartiallyOutsideBounds(e){if(this.outlinePolygon){const n=this.getNodeRect(e);return!!Nse(n,this.outlinePolygon)\u0026\u0026!E_t(n,this.outlinePolygon)}return e.center.x-e.width/2\u003cthis.srj.bounds.minX||e.center.x+e.width/2\u003ethis.srj.bounds.maxX||e.center.y-e.height/2\u003cthis.srj.bounds.minY||e.center.y+e.height/2\u003ethis.srj.bounds.maxY}getObstacleCoveragePercentage(e){const n=this.getXYZOverlappingObstacles(e);if(n.length===0)return 0;const o=e.center.x-e.width/2,i=e.center.x+e.width/2,r=e.center.y-e.height/2,s=e.center.y+e.height/2,a=e.width*e.height;let A=0;for(const c of n){const l=Math.max(o,c.center.x-c.width/2),u=Math.min(i,c.center.x+c.width/2),g=Math.max(r,c.center.y-c.height/2),h=Math.min(s,c.center.y+c.height/2);l\u003cu\u0026\u0026g\u003ch\u0026\u0026(A+=(u-l)*(h-g))}return A/a}shouldFilterSingleLayerNodeForObstacle(e){return e.availableZ.length!==1||!e._containsObstacle?!1:this.getObstacleCoveragePercentage(e)\u003ethis.OVERLAP_THRESHOLD_FOR_SINGLE_LAYER_NODES}shouldFilterNodeForObstacle(e){return!!e._containsObstacle\u0026\u0026(e.availableZ.length!==1||this.shouldFilterSingleLayerNodeForObstacle(e))}createChildNodeAtPosition(e,n){const o={capacityMeshNodeId:this.getNextNodeId(),center:n.center,width:n.width,height:n.height,layer:e.layer,availableZ:n.availableZ,_depth:n._depth??(e._depth??0)+1,_parent:e},i=this.getXYZOverlappingObstacles(o);o._containsObstacle=i.length\u003e0||this.isNodePartiallyOutsideBounds(o);const r=this.getTargetIfNodeContainsTarget(o);return r\u0026\u0026(o._targetConnectionName=r.connectionName,o._containsTarget=!0),o._containsObstacle\u0026\u0026(o._completelyInsideObstacle=this.isNodeCompletelyInsideObstacle(o)),o}getZSubdivisionChildNodes(e){if(e.availableZ.length===1)return[];const n=[],o=e.availableZ.map(i=\u003e[i]);for(const i of o){const r=this.createChildNodeAtPosition(e,{center:{...e.center},width:e.width,height:e.height,availableZ:i,_depth:e._depth});this.isNodeCompletelyOutsideBounds(r)||n.push(r)}return n}getChildNodes(e){if(e._depth\u003e=this.MAX_DEPTH)return[];const n=[],o={width:e.width/2,height:e.height/2},i=[{x:e.center.x-o.width/2,y:e.center.y-o.height/2},{x:e.center.x+o.width/2,y:e.center.y-o.height/2},{x:e.center.x-o.width/2,y:e.center.y+o.height/2},{x:e.center.x+o.width/2,y:e.center.y+o.height/2}];for(const r of i){const s=this.createChildNodeAtPosition(e,{center:r,width:o.width,height:o.height,availableZ:e.availableZ});this.isNodeCompletelyOutsideBounds(s)||n.push(s)}return n}shouldNodeBeXYSubdivided(e){return!(e._depth\u003e=this.MAX_DEPTH)\u0026\u0026(!!e._containsTarget||e.availableZ.length===1\u0026\u0026e._depth\u003c=this.MAX_DEPTH||!(!e._containsObstacle||e._completelyInsideObstacle))}_step(){const e=this.unfinishedNodes.pop();if(!e)return void(this.solved=!0);const n=this.getChildNodes(e),o=[],i=[];for(const r of n){const s=this.shouldNodeBeXYSubdivided(r),a=r.availableZ.length\u003e1\u0026\u0026!s\u0026\u0026(r._containsObstacle||r.width\u003cthis.VIA_DIAMETER+this.OBSTACLE_MARGIN);if(s)i.push(r);else if(s||this.shouldFilterNodeForObstacle(r)||a)if(!s\u0026\u0026r._containsTarget)if(a){const A=this.getZSubdivisionChildNodes(r);o.push(...A.filter(c=\u003ec._containsTarget||!this.shouldFilterNodeForObstacle(c)))}else o.push(r);else a\u0026\u0026o.push(...this.getZSubdivisionChildNodes(r).filter(A=\u003e!this.shouldFilterNodeForObstacle(A)));else o.push(r)}this.unfinishedNodes.push(...i),this.finishedNodes.push(...o)}},wZn=class extends yr{getSolverName(){return\"CapacitySegmentToPointSolver\"}unsolvedSegments;solvedSegments;nodeMap;colorMap;constructor({segments:e,colorMap:n,nodes:o}){super(),this.MAX_ITERATIONS=1e5,this.unsolvedSegments=e,this.solvedSegments=[],this.colorMap=n??{},this.nodeMap=Object.fromEntries(o.map(i=\u003e[i.capacityMeshNodeId,i]))}_step(){let e=!1;const n=[...this.unsolvedSegments];for(const o of n){const i=o.connectionNames.length;if((!(\"assignedPoints\"in o)||o.assignedPoints?.length!==i)\u0026\u0026i===1){const r={x:(o.start.x+o.end.x)/2,y:(o.start.y+o.end.y)/2,z:o.availableZ[0]};o.assignedPoints=[{connectionName:o.connectionNames[0],rootConnectionName:o.rootConnectionNames?.[0],point:r}],this.unsolvedSegments.splice(this.unsolvedSegments.indexOf(o),1),this.solvedSegments.push(o),e=!0}}if(!e\u0026\u0026n.length\u003e0){let o=n[0];for(const c of n)c.connectionNames.length\u003co.connectionNames.length\u0026\u0026(o=c);const i=[...o.connectionNames].sort(),r=o.end.x-o.start.x,s=o.end.y-o.start.y,a=i.length,A=[];for(let c=1;c\u003c=a;c++){const l=c/(a+1);A.push({x:o.start.x+r*l,y:o.start.y+s*l,z:o.availableZ[0]})}o.assignedPoints=i.map((c,l)=\u003e({connectionName:c,rootConnectionName:o.rootConnectionNames?.[o.connectionNames.indexOf(c)],point:A[l]})),this.unsolvedSegments.splice(this.unsolvedSegments.indexOf(o),1),this.solvedSegments.push(o),e=!0}this.unsolvedSegments.length===0\u0026\u0026(this.solved=!0)}getNodesWithPortPoints(){if(!this.solved)throw new Error(\"CapacitySegmentToPointSolver not solved, can't give port points yet\");const e=new Map;for(const n of this.solvedSegments){const o=n.capacityMeshNodeId,i=this.nodeMap[o];e.has(o)||e.set(o,{capacityMeshNodeId:o,portPoints:[],center:i.center,width:i.width,height:i.height}),e.get(o).portPoints.push(...n.assignedPoints.map(r=\u003e({...r.point,connectionName:r.connectionName})))}return Array.from(e.values())}visualize(){const e={points:[],lines:this.solvedSegments.map(i=\u003e({points:[i.start,i.end],step:4})),rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Capacity Segment to Point Solver\"};for(let i=0;i\u003cthis.solvedSegments.length;i++){const r=this.solvedSegments[i];for(let s=0;s\u003cr.assignedPoints.length;s++){const a=r.assignedPoints[s],A={x:a.point.x,y:a.point.y},c={x:a.point.x+.05*a.point.z,y:a.point.y+.05*a.point.z};a.point.z!==0\u0026\u0026e.lines.push({points:[A,c],strokeColor:\"rgba(0, 0, 0, 0.25)\",strokeDash:\"5 5\",step:4}),e.points.push({x:c.x,y:c.y,label:[`${r.capacityMeshNodeId}-${a.connectionName}`,`z: ${r.availableZ.join(\",\")}`,`nodePortSegmentId: ${r.nodePortSegmentId}`].join(`\n`),color:this.colorMap[a.connectionName],step:4})}}const n=[],o={};for(const i of this.solvedSegments){const r=i.capacityMeshNodeId;o[r]||(o[r]={});for(const s of i.assignedPoints)o[r][s.connectionName]||(o[r][s.connectionName]=[]),o[r][s.connectionName].push({x:s.point.x,y:s.point.y})}for(const i in o)for(const r in o[i]){const s=o[i][r];s.length\u003e1\u0026\u0026n.push({points:s,step:4,strokeDash:\"5 5\",strokeColor:this.colorMap[r]||\"#000\"})}return e.lines.push(...n),e}},Wf=(t,e={})=\u003e{const n=Math.min(...t.availableZ);return{center:!e.rectMargin||e.zOffset?{x:t.center.x+n*t.width*(e.zOffset??.05),y:t.center.y-n*t.width*(e.zOffset??.05)}:t.center,width:e.rectMargin?t.width-2*e.rectMargin:Math.max(t.width-.5,.8*t.width),height:e.rectMargin?t.height-2*e.rectMargin:Math.max(t.height-.5,.8*t.height),fill:t._containsObstacle?\"rgba(255,0,0,0.1)\":{\"0,1\":\"rgba(0,0,0,0.1)\",0:\"rgba(0,200,200, 0.1)\",1:\"rgba(0,0,200, 0.1)\"}[t.availableZ.join(\",\")]??\"rgba(0,200,200,0.1)\",layer:`z${t.availableZ.join(\",\")}`,label:[t.capacityMeshNodeId,`availableZ: ${t.availableZ.join(\",\")}`,t._containsTarget?\"containsTarget\":\"\",t._containsObstacle?\"containsObstacle\":\"\"].filter(Boolean).join(`\n`)}},PZn=class extends yr{getSolverName(){return\"CapacityPathingSolver\"}connectionsWithNodes;usedNodeCapacityMap;simpleRouteJson;nodes;edges;GREEDY_MULTIPLIER=1.1;MAX_CANDIDATES_IN_MEMORY=1e5;nodeMap;nodeEdgeMap;connectionNameToGoalNodeIds;colorMap;maxDepthOfNodes;activeCandidateStraightLineDistance;debug_lastNodeCostMap;hyperParameters;constructor({simpleRouteJson:e,nodes:n,edges:o,colorMap:i,MAX_ITERATIONS:r=1e6,hyperParameters:s={}}){super(),this.MAX_ITERATIONS=r,this.simpleRouteJson=e,this.nodes=n,this.edges=o,this.colorMap=i??{};const{connectionsWithNodes:a,connectionNameToGoalNodeIds:A}=this.getConnectionsWithNodes();this.connectionsWithNodes=a,this.connectionNameToGoalNodeIds=A,this.hyperParameters=s,this.usedNodeCapacityMap=new Map(this.nodes.map(c=\u003e[c.capacityMeshNodeId,0])),this.nodeMap=new Map(this.nodes.map(c=\u003e[c.capacityMeshNodeId,c])),this.nodeEdgeMap=tL(this.edges),this.maxDepthOfNodes=Math.max(...this.nodes.map(c=\u003ec._depth??0)),this.debug_lastNodeCostMap=new Map}getTotalCapacity(e){const n=e._depth??0;return(this.maxDepthOfNodes-n+1)**2}getConnectionsWithNodes(){const e=[],n=this.nodes.filter(i=\u003ei._containsTarget),o=new Map;for(const i of this.simpleRouteJson.connections){const r=[];for(const s of i.pointsToConnect){let a=this.nodes[0],A=Number.MAX_VALUE;for(const c of n){const l=Math.sqrt((c.center.x-s.x)**2+(c.center.y-s.y)**2);l\u003cA\u0026\u0026(A=l,a=c)}r.push(a)}if(r.length\u003c2)throw new Error(`Not enough nodes for connection \"${i.name}\", only ${r.length} found`);o.set(i.name,r.map(s=\u003es.capacityMeshNodeId)),e.push({connection:i,nodes:r,pathFound:!1,straightLineDistance:no(r[0].center,r[r.length-1].center)})}return e.sort((i,r)=\u003ei.straightLineDistance-r.straightLineDistance),{connectionsWithNodes:e,connectionNameToGoalNodeIds:o}}currentConnectionIndex=0;candidates;visitedNodes;computeG(e,n,o){return e.g+this.getDistanceBetweenNodes(e.node,n)}computeH(e,n,o){return this.getDistanceBetweenNodes(n,o)}getBacktrackedPath(e){const n=[];let o=e;for(;o;)n.push(o.node),o=o.prevCandidate;return n}getNeighboringNodes(e){return this.nodeEdgeMap.get(e.capacityMeshNodeId).flatMap(n=\u003en.nodeIds.filter(o=\u003eo!==e.capacityMeshNodeId)).map(n=\u003ethis.nodeMap.get(n))}getCapacityPaths(){const e=[];for(const n of this.connectionsWithNodes){const o=n.path;o\u0026\u0026e.push({capacityPathId:n.connection.name,connectionName:n.connection.name,rootConnectionName:n.connection.__rootConnectionNames?.[0],nodeIds:o.map(i=\u003ei.capacityMeshNodeId)})}return e}doesNodeHaveCapacityForTrace(e,n){const o=this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0,i=this.getTotalCapacity(e);if(e.availableZ.length===1\u0026\u0026!e._containsTarget\u0026\u0026o\u003e0)return!1;let r=0;return e.availableZ.length\u003e1\u0026\u0026n.availableZ.length===1\u0026\u0026(r+=.5),o+r\u003ci}canTravelThroughObstacle(e,n){return this.connectionNameToGoalNodeIds.get(n)?.includes(e.capacityMeshNodeId)??!1}getDistanceBetweenNodes(e,n){return Math.sqrt((e.center.x-n.center.x)**2+(e.center.y-n.center.y)**2)}reduceCapacityAlongPath(e){for(const n of e.path??[])this.usedNodeCapacityMap.set(n.capacityMeshNodeId,this.usedNodeCapacityMap.get(n.capacityMeshNodeId)+1)}isConnectedToEndGoal(e,n){return this.nodeEdgeMap.get(e.capacityMeshNodeId).some(o=\u003eo.nodeIds.includes(n.capacityMeshNodeId))}_step(){const e=this.connectionsWithNodes[this.currentConnectionIndex];if(!e)return void(this.solved=!0);const[n,o]=e.nodes;this.candidates||(this.candidates=[{prevCandidate:null,node:n,f:0,g:0,h:0}],this.debug_lastNodeCostMap=new Map,this.visitedNodes=new Set([n.capacityMeshNodeId]),this.activeCandidateStraightLineDistance=no(n.center,o.center)),this.candidates.sort((s,a)=\u003es.f-a.f);const i=this.candidates.shift();if(this.candidates.length\u003ethis.MAX_CANDIDATES_IN_MEMORY\u0026\u0026this.candidates.splice(this.MAX_CANDIDATES_IN_MEMORY,this.candidates.length-this.MAX_CANDIDATES_IN_MEMORY),!i)return console.error(`Ran out of candidates on connection ${e.connection.name}`),this.currentConnectionIndex++,this.candidates=null,this.visitedNodes=null,void(this.failed=!0);if(this.isConnectedToEndGoal(i.node,o))return e.path=this.getBacktrackedPath({prevCandidate:i,node:o,f:0,g:0,h:0}),this.reduceCapacityAlongPath(e),this.currentConnectionIndex++,this.candidates=null,void(this.visitedNodes=null);const r=this.getNeighboringNodes(i.node);for(const s of r){if(this.visitedNodes?.has(s.capacityMeshNodeId)||!this.doesNodeHaveCapacityForTrace(s,i.node))continue;const a=this.connectionsWithNodes[this.currentConnectionIndex].connection.name;if(s._containsObstacle\u0026\u0026!this.canTravelThroughObstacle(s,a))continue;const A=this.computeG(i,s,o),c=this.computeH(i,s,o),l=A+c*this.GREEDY_MULTIPLIER;this.debug_lastNodeCostMap.set(s.capacityMeshNodeId,{f:l,g:A,h:c});const u={prevCandidate:i,node:s,f:l,g:A,h:c};this.candidates.push(u)}this.visitedNodes.add(i.node.capacityMeshNodeId)}visualize(){const e={lines:[],points:[],rects:[],circles:[]};if(this.connectionsWithNodes)for(let o=0;o\u003cthis.connectionsWithNodes.length;o++){const i=this.connectionsWithNodes[o];if(i.path\u0026\u0026i.path.length\u003e0){const r=i.path.map(({center:{x:s,y:a},width:A,availableZ:c})=\u003e({x:s+.005*A*(o%10+o%19),y:a+.005*A*(o%10+o%19),availableZ:c}));e.lines.push({points:r,strokeColor:this.colorMap[i.connection.name]});for(let s=0;s\u003cr.length;s++){const a=r[s];e.points.push({x:a.x,y:a.y,label:[`conn: ${i.connection.name}`,`node: ${i.path[s].capacityMeshNodeId}`,`z: ${a.availableZ.join(\",\")}`].join(`\n`)})}}}for(const o of this.nodes){const i=this.usedNodeCapacityMap.get(o.capacityMeshNodeId)??0,r=this.getTotalCapacity(o),s=this.debug_lastNodeCostMap.get(o.capacityMeshNodeId);e.rects.push({...Wf(o,{rectMargin:.025,zOffset:.01}),label:[`${o.capacityMeshNodeId}`,`${i}/${r}`,`${o.width.toFixed(2)}x${o.height.toFixed(2)}`,`g: ${s?.g!==void 0?s.g.toFixed(2):\"?\"}`,`h: ${s?.h!==void 0?s.h.toFixed(2):\"?\"}`,`f: ${s?.f!==void 0?s.f.toFixed(2):\"?\"}`,`z: ${o.availableZ.join(\", \")}`].join(`\n`),stroke:i\u003er+.5?\"red\":void 0})}if(this.connectionsWithNodes){for(const o of this.connectionsWithNodes)if(o.connection?.pointsToConnect)for(const i of o.connection.pointsToConnect)e.points.push({x:i.x,y:i.y,label:[`pointsToConnect ${o.connection.name}`].join(`\n`)})}let n=this.connectionsWithNodes[this.currentConnectionIndex];if(!this.candidates\u0026\u0026this.currentConnectionIndex\u003e0\u0026\u0026!this.connectionsWithNodes[this.currentConnectionIndex-1].path\u0026\u0026(n=this.connectionsWithNodes[this.currentConnectionIndex-1]),n){const[o,i]=n.connection.pointsToConnect;e.lines.push({points:[{x:o.x,y:o.y},{x:i.x,y:i.y}],strokeColor:\"red\",strokeDash:\"10 5\"})}if(this.candidates){const o=this.candidates.slice(0,5),i=this.connectionsWithNodes[this.currentConnectionIndex].connection.name;o.forEach((r,s)=\u003e{const a=.5*(1-s/5),A=this.getBacktrackedPath(r);e.lines.push({points:A.map(({center:{x:c,y:l}})=\u003e({x:c,y:l})),strokeColor:Es(this.colorMap[i]??\"red\",1-a)})})}return e}},MZn=class extends PZn{getSolverName(){return\"CapacityPathingSolver5\"}NEGATIVE_CAPACITY_PENALTY_FACTOR=1;REDUCED_CAPACITY_PENALTY_FACTOR=1;constructor(...t){super(...t),this.GREEDY_MULTIPLIER=2.5}get maxCapacityFactor(){return this.hyperParameters.MAX_CAPACITY_FACTOR??1}getTotalCapacity(t){return l7(t,this.maxCapacityFactor)}getNodeCapacityPenalty(t){const e=t.width+t.height,n=.05,o=this.getTotalCapacity(t)-(this.usedNodeCapacityMap.get(t.capacityMeshNodeId)??0);return o\u003e2?n:(e-n)*Math.max(1,(2-o)/(e-n))+n}getDistanceBetweenNodes(t,e){const n=t.center.x-e.center.x,o=t.center.y-e.center.y;return Math.sqrt(n**2+o**2)}computeG(t,e,n){return t.g+this.getDistanceBetweenNodes(t.node,e)+this.getNodeCapacityPenalty(e)}computeH(t,e,n){return this.getDistanceBetweenNodes(e,n)+this.getNodeCapacityPenalty(e)}},r1t=class extends MZn{getSolverName(){return\"CapacityPathingGreedySolver\"}doesNodeHaveCapacityForTrace(e,n){return!0}getNodeCapacityPenalty(e){const n=this.getTotalCapacity(e)-(this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0)-1;if(n\u003e0)return 0;let o=1;return e.availableZ.length===1\u0026\u0026(o=10),(.05+2*Math.abs(n))*o}};function s1t(t,e,n){const o=e.x-t.x,i=e.y-t.y;if(Math.abs(o)\u003c1e-9\u0026\u0026Math.abs(i)\u003c1e-9)return t;const r=n.width/2,s=n.height/2,a=n.center.x-r,A=n.center.x+r,c=n.center.y-s,l=n.center.y+s;let u=0,g=1/0;if(Math.abs(o)\u003e1e-9){const h=(a-t.x)/o,d=(A-t.x)/o;u=Math.max(u,Math.min(h,d)),g=Math.min(g,Math.max(h,d))}else if(t.x\u003ca||t.x\u003eA)return t;if(Math.abs(i)\u003e1e-9){const h=(c-t.y)/i,d=(l-t.y)/i;u=Math.max(u,Math.min(h,d)),g=Math.min(g,Math.max(h,d))}else if(t.y\u003cc||t.y\u003el)return t;return g\u003cu||u===1/0||u\u003c-1e9?t:{x:t.x+o*u,y:t.y+i*u}}function DZn(t,e){const n=t.center,o=e.center,i=s1t(n,o,t),r=s1t(o,n,e),s=o.x-n.x,a=o.y-n.y,A=Math.sqrt(s*s+a*a);let c=i,l=r;if(A\u003e1e-9){const u={x:s/A,y:a/A},g=.3*t.width,h=.3*e.width;g+h\u003cMath.sqrt((r.x-i.x)**2+(r.y-i.y)**2)?(c={x:i.x+u.x*g,y:i.y+u.y*g},l={x:r.x-u.x*h,y:r.y-u.y*h}):(c=i,l=r)}return{lineStart:c,lineEnd:l}}var uae=t=\u003e{const{usedCapacity:e,totalCapacity:n,layerCount:o}=t;if(e\u003cn||n\u003c1\u0026\u0026e\u003c=1)return 0;if(o===1\u0026\u0026e\u003e1)return 1-.01**e;const i=e/n-1;return 1-Math.exp(-2*i)},r6e=(t,e,n)=\u003e{if(n._containsTarget||t\u003c=e)return 0;const o=1-uae({usedCapacity:t,totalCapacity:e,layerCount:n.availableZ.length});return o\u003c=0?-1e9:Math.log(o)},Zz=({totalNodeCapacityMap:t,usedNodeCapacityMap:e,nodeMap:n,sectionNodeIds:o})=\u003e{let i=0;const r=o??new Set(e.keys());for(const s of r){if(!t.has(s))continue;const a=n.get(s);if(!a)continue;const A=t.get(s),c=e.get(s)??0;i+=r6e(c,A,a)}return i};function s6e({sectionNodes:t,sectionEdges:e,sectionConnectionTerminals:n,completedPaths:o,nodeMap:i,colorMap:r,centerNodeId:s,title:a,nodeOpacity:A=.1,usedNodeCapacityMap:c,totalCapacityMap:l}){const u={points:[],lines:[],rects:[],circles:[],title:a},g=new Set(t.map(h=\u003eh.capacityMeshNodeId));for(const h of t){let d=`rgba(128, 128, 128, ${A})`,p=`rgba(128, 128, 128, ${A})`;const m=h.availableZ??[],_=m.includes(0),f=m.includes(1);_\u0026\u0026f?(d=`rgba(128, 0, 128, ${A})`,p=`rgba(128, 0, 128, ${A})`):_?(d=`rgba(0, 0, 255, ${A})`,p=`rgba(0, 0, 255, ${A})`):f\u0026\u0026(d=`rgba(255, 0, 0, ${A})`,p=`rgba(255, 0, 0, ${A})`),s\u0026\u0026h.capacityMeshNodeId===s\u0026\u0026(d=`rgba(0, 255, 0, ${A})`,p=`rgba(0, 128, 0, ${A})`),u.rects.push({...Wf(h),fill:d,stroke:p,label:`${h.capacityMeshNodeId}\n(Section Node)\nZ: ${m.join(\",\")}`});const I=u.rects.length-1;if(c\u0026\u0026l){const C=c.get(h.capacityMeshNodeId)??0,y=l.get(h.capacityMeshNodeId)??0,x=y\u003e0?(C/y*100).toFixed(1):\"N/A\",E=uae({usedCapacity:C,totalCapacity:y,layerCount:h.availableZ.length});u.rects[I].label+=`\n${C.toFixed(1)} / ${y.toFixed(1)}\n${x}% (Pf: ${(100*E).toFixed(1)}%)`,E\u003e.2\u0026\u0026(u.rects[I].stroke=Es(\"red\",.7*(.8+A)))}}for(const h of e){const[d,p]=h.nodeIds,m=i.get(d),_=i.get(p);if(m\u0026\u0026_){const{lineStart:f,lineEnd:I}=DZn(m,_);u.lines.push({points:[f,I],strokeColor:`rgba(0, 0, 0, ${.2*Math.min(1,A/.1)})`})}}return n.forEach((h,d)=\u003e{const p=i.get(h.startNodeId),m=i.get(h.endNodeId),_=r[h.connectionName]??\"black\",f=p\u0026\u0026g.has(p.capacityMeshNodeId),I=m\u0026\u0026g.has(m.capacityMeshNodeId),C=(d+d/50)%5;let y=0,x=0,E=0,B=0;if(f\u0026\u0026p){const S=.02*Math.min(p.width,p.height);y=S*C,x=S*C,u.points.push({x:p.center.x+y,y:p.center.y+x,color:_,label:`Start: ${h.connectionName}\n(${h.startNodeId})`}),u.lines.push({points:[{x:p.center.x,y:p.center.y},{x:p.center.x+y,y:p.center.y+x}],strokeColor:\"gray\",strokeDash:\"2 2\"})}if(I\u0026\u0026m){const S=.02*Math.min(m.width,m.height);E=S*C,B=S*C,u.points.push({x:m.center.x+E,y:m.center.y+B,color:_,label:`End: ${h.connectionName}\n(${h.endNodeId})`}),u.lines.push({points:[{x:m.center.x,y:m.center.y},{x:m.center.x+E,y:m.center.y+B}],strokeColor:\"gray\",strokeDash:\"2 2\"})}f\u0026\u0026I\u0026\u0026p\u0026\u0026m\u0026\u0026u.lines.push({points:[{x:p.center.x+y,y:p.center.y+x},{x:m.center.x+E,y:m.center.y+B}],strokeColor:_,strokeDash:\"5 5\"})}),o\u0026\u0026o.forEach((h,d)=\u003e{if(h.path\u0026\u0026h.path.length\u003e0){const p=r[h.connectionName]??\"gray\",m={x:(d+d/50)%5*.03,y:(d+d/50)%5*.03};u.lines.push({points:h.path.map(({center:{x:_,y:f}})=\u003e({x:_+m.x,y:f+m.y})),strokeColor:Es(p,.2)})}}),u}var NZn=class extends yr{getSolverName(){return\"CapacityPathingSingleSectionSolver\"}GREEDY_MULTIPLIER=1.5;sectionNodes;sectionEdges;sectionConnectionTerminals;nodeMap;nodeEdgeMap;colorMap;usedNodeCapacityMap;totalNodeCapacityMap;centerNodeId;currentSectionScore=0;MAX_CANDIDATES_IN_MEMORY=1e4;currentConnectionIndex=0;candidates=null;visitedNodes=null;queuedNodes=null;activeCandidateStraightLineDistance;debug_lastNodeCostMap=new Map;maxCapacityFactor=1;constructor(e){super(),this.MAX_ITERATIONS=1e4,this.centerNodeId=e.centerNodeId,this.sectionNodes=e.sectionNodes,this.sectionEdges=e.sectionEdges,this.sectionConnectionTerminals=e.sectionConnectionTerminals.map(o=\u003e({...o,path:void 0})),this.nodeMap=e.nodeMap??new Map(this.sectionNodes.map(o=\u003e[o.capacityMeshNodeId,o])),this.nodeEdgeMap=e.nodeEdgeMap??tL(this.sectionEdges),this.colorMap=e.colorMap??{},this.usedNodeCapacityMap=new Map(this.sectionNodes.map(o=\u003e[o.capacityMeshNodeId,0])),this.totalNodeCapacityMap=new Map(this.sectionNodes.map(o=\u003e[o.capacityMeshNodeId,this.getTotalCapacity(o)]));const n=new Set(this.sectionNodes.map(o=\u003eo.capacityMeshNodeId));this.currentSectionScore=Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:n}),e.hyperParameters?.SHUFFLE_SEED\u0026\u0026(this.sectionConnectionTerminals=D5(this.sectionConnectionTerminals,e.hyperParameters?.SHUFFLE_SEED))}getTotalCapacity(e){return l7(e,this.maxCapacityFactor)}getNodeCapacityPenalty(e){if(!this.nodeMap.has(e.capacityMeshNodeId))return 1/0;const n=this.getTotalCapacity(e)-(this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0)-1;if(n\u003e0)return 0;let o=1;return e.availableZ.length===1\u0026\u0026(o=10),(.05+n**2*4)*o}getDistanceBetweenNodes(e,n){const o=e.center.x-n.center.x,i=e.center.y-n.center.y;return Math.sqrt(o**2+i**2)}computeG(e,n,o){return e.g+this.getDistanceBetweenNodes(e.node,n)+this.getNodeCapacityPenalty(n)}computeH(e,n,o){return this.getDistanceBetweenNodes(n,o)+this.getNodeCapacityPenalty(n)}getBacktrackedPath(e){const n=[];let o=e;for(;o;){if(n.push(o.node),!this.nodeMap.has(o.node.capacityMeshNodeId)){console.warn(\"Backtracked path went outside section bounds\");break}o=o.prevCandidate}return n.reverse()}getNeighboringNodes(e){return this.nodeMap.has(e.capacityMeshNodeId)?this.nodeEdgeMap.get(e.capacityMeshNodeId)?.flatMap(n=\u003en.nodeIds.filter(o=\u003eo!==e.capacityMeshNodeId)).map(n=\u003ethis.nodeMap.get(n)).filter(Boolean)??[]:[]}isConnectedToEndGoal(e,n){return!(!this.nodeMap.has(e.capacityMeshNodeId)||!this.nodeMap.has(n.capacityMeshNodeId))\u0026\u0026(this.nodeEdgeMap.get(e.capacityMeshNodeId)??[]).some(o=\u003eo.nodeIds.includes(n.capacityMeshNodeId))}doesNodeHaveCapacityForTrace(e,n){return!0}reduceCapacityAlongPath(e){for(const n of e)if(this.usedNodeCapacityMap.has(n.capacityMeshNodeId)){const o=n.capacityMeshNodeId,i=this.nodeMap.get(o);if(!i){console.warn(`Node ${o} from path not found in section's nodeMap during score update.`);continue}const r=this.totalNodeCapacityMap.get(o),s=this.usedNodeCapacityMap.get(o)??0,a=r6e(s,r,i);this.currentSectionScore-=a;const A=s+1;this.usedNodeCapacityMap.set(o,A);const c=r6e(A,r,i);this.currentSectionScore+=c}}getSolvedSectionScore(){return this.currentSectionScore}_step(){const e=this.sectionConnectionTerminals[this.currentConnectionIndex];if(!e)return void(this.solved=!0);const n=this.nodeMap.get(e.startNodeId),o=this.nodeMap.get(e.endNodeId);if(!n||!o)return console.error(`Start or end node not found in section for connection ${e.connectionName}`),this.currentConnectionIndex++,this.candidates=null,void(this.visitedNodes=null);this.candidates||this._setupAStar(n,o);const i=this.candidates;if(i.length===0)return void this._handleCandidatesExhausted(e);i.sort((a,A)=\u003ea.f-A.f);const r=i.shift();if(i.length\u003ethis.MAX_CANDIDATES_IN_MEMORY\u0026\u0026i.splice(this.MAX_CANDIDATES_IN_MEMORY,i.length-this.MAX_CANDIDATES_IN_MEMORY),this.visitedNodes.add(r.node.capacityMeshNodeId),r.node.capacityMeshNodeId===o.capacityMeshNodeId)return void this._handleGoalReached(r,e,o);const s=this.getNeighboringNodes(r.node);for(const a of s){if(this.queuedNodes?.has(a.capacityMeshNodeId)||!this.doesNodeHaveCapacityForTrace(a,r.node))continue;if(a._containsObstacle){const g=a.capacityMeshNodeId===e.startNodeId,h=a.capacityMeshNodeId===e.endNodeId;if(!g\u0026\u0026!h)continue}const A=this.computeG(r,a,o),c=this.computeH(r,a,o),l=A+c*this.GREEDY_MULTIPLIER;this.debug_lastNodeCostMap.set(a.capacityMeshNodeId,{f:l,g:A,h:c});const u={prevCandidate:r,node:a,f:l,g:A,h:c};this.queuedNodes?.add(a.capacityMeshNodeId),i.push(u)}}computeProgress(){const e=this.sectionConnectionTerminals.length;if(e===0)return 1;let n=this.currentConnectionIndex/e;if(this.currentConnectionIndex\u003ce\u0026\u0026this.candidates\u0026\u0026this.candidates.length\u003e0\u0026\u0026this.activeCandidateStraightLineDistance\u0026\u0026this.activeCandidateStraightLineDistance\u003e0){const o=this.candidates.reduce((i,r)=\u003er.f\u003ci.f?r:i);n+=Math.max(0,Math.min(1,1-o.h/this.activeCandidateStraightLineDistance))/e}else this.solved\u0026\u0026(n=1);return Math.min(1,n)}_setupAStar(e,n){this.candidates=[{prevCandidate:null,node:e,f:0,g:0,h:0}],this.visitedNodes=new Set([e.capacityMeshNodeId]),this.debug_lastNodeCostMap=new Map,this.activeCandidateStraightLineDistance=no(e.center,n.center);const o=this.computeH(null,e,n);this.candidates[0].h=o,this.candidates[0].f=o*this.GREEDY_MULTIPLIER,this.debug_lastNodeCostMap.set(e.capacityMeshNodeId,{f:this.candidates[0].f,g:0,h:o}),this.queuedNodes=new Set([e.capacityMeshNodeId])}_handleCandidatesExhausted(e){console.error(`Ran out of candidates for section connection ${e.connectionName}`),this.currentConnectionIndex++,this.candidates=null,this.visitedNodes=null,this.queuedNodes=null}_handleGoalReached(e,n,o){const i=this.getBacktrackedPath(e);n.path=i,this.reduceCapacityAlongPath(i),this.currentConnectionIndex++,this.candidates=null,this.visitedNodes=null,this.queuedNodes=null}visualize(){const e=this.sectionConnectionTerminals.filter(o=\u003eo.path\u0026\u0026o.path.length\u003e0).map(o=\u003e({connectionName:o.connectionName,path:o.path})),n=s6e({sectionNodes:this.sectionNodes,sectionEdges:this.sectionEdges,sectionConnectionTerminals:this.sectionConnectionTerminals,completedPaths:e,nodeMap:this.nodeMap,colorMap:this.colorMap,centerNodeId:null,title:`Section Pathing: Conn ${this.currentConnectionIndex+1}/${this.sectionConnectionTerminals.length} (${this.sectionNodes.length} nodes)`,nodeOpacity:.1});for(const o of this.sectionNodes){const i=n.rects.findIndex(r=\u003er.label?.includes(o.capacityMeshNodeId));if(i!==-1){const r=this.debug_lastNodeCostMap.get(o.capacityMeshNodeId),s=this.usedNodeCapacityMap.get(o.capacityMeshNodeId)??0,a=this.getTotalCapacity(o),A=`${s.toFixed(1)}/${a.toFixed(1)}`,c=r?`f:${r.f.toFixed(1)} g:${r.g.toFixed(1)} h:${r.h.toFixed(1)}`:\"cost:?\";n.rects[i].label=[o.capacityMeshNodeId,`Cap: ${A}`,c,`Z: ${o.availableZ.join(\",\")}`].join(`\n`),s\u003ea\u0026\u0026(n.rects[i].stroke=Es(\"red\",.7))}}if(this.candidates\u0026\u0026this.candidates.length\u003e0){const o=this.candidates.slice().sort((a,A)=\u003ea.f-A.f).slice(0,5),i=this.sectionConnectionTerminals[this.currentConnectionIndex],r=i?.connectionName??\"unknown\",s=this.colorMap[r]??\"purple\";o.forEach((a,A)=\u003e{const c=.8*(1-A/5),l=this.getBacktrackedPath(a);l.length\u003e0\u0026\u0026n.lines.push({points:l.map(({center:{x:u,y:g}})=\u003e({x:u,y:g})),strokeColor:Es(s,1-c),strokeWidth:.05})})}return n}},gae=t=\u003eArray.from({length:t},(e,n)=\u003en),RZn=class extends Zse{getSolverName(){return\"HyperCapacityPathingSingleSectionSolver\"}constructorParams;constructor(e){super(),this.MAX_ITERATIONS=1e5,this.constructorParams=e}computeG(e){return-e.getSolvedSectionScore()}computeH(e){return 0}getCombinationDefs(){const e=this.constructorParams.sectionConnectionTerminals.length;return e===2?[[\"orderings2_for2\"]]:e===3?[[\"orderings6_for3\"]]:e===4?[[\"orderings24_for4\"]]:[[\"orderings30\"]]}getFailureMessage(){return`All CapacityPathingSingleSection solvers failed for \"${this.centerNodeId}\"`}getHyperParameterDefs(){return[{name:\"orderings2_for2\",possibleValues:gae(2).map(e=\u003e({SHUFFLE_SEED:e}))},{name:\"orderings6_for3\",possibleValues:gae(6).map(e=\u003e({SHUFFLE_SEED:e}))},{name:\"orderings24_for4\",possibleValues:gae(24).map(e=\u003e({SHUFFLE_SEED:e}))},{name:\"orderings30\",possibleValues:gae(30).map(e=\u003e({SHUFFLE_SEED:e}))}]}generateSolver(e){return new NZn({...this.constructorParams,hyperParameters:{...this.constructorParams.hyperParameters,...e}})}onSolve({solver:e}){this.winningSolver=e}get centerNodeId(){return this.constructorParams.centerNodeId}get sectionNodes(){return this.constructorParams.sectionNodes}get sectionConnectionTerminals(){return this.winningSolver?.sectionConnectionTerminals}},TZn=t=\u003eMath.floor(10*t)/10,kZn=class extends RZn{cacheHit=!1;cacheProvider;hasAttemptedToUseCache=!1;sectionNodeIdSet;cachedSectionConnectionTerminals=null;sectionScore=0;constructor(e){e.nodeMap=e.nodeMap??new Map(e.sectionNodes.map(n=\u003e[n.capacityMeshNodeId,n])),super(e),this.sectionNodeIdSet=new Set(e.sectionNodes.map(n=\u003en.capacityMeshNodeId)),this.cacheProvider=e.cacheProvider===void 0?tB():e.cacheProvider}_step(){!this.hasAttemptedToUseCache\u0026\u0026this.cacheProvider\u0026\u0026this.attemptToUseCacheSync()||(super._step(),(this.solved||this.failed)\u0026\u0026this.cacheProvider\u0026\u0026this.saveToCacheSync())}_computeBfsOrderingOfNodesInSection(){const e=new Set(this.constructorParams.centerNodeId),n=[],o=[{ancestorCapacitySum:0,capacity:0,g:0,capacityMeshNodeId:this.constructorParams.centerNodeId}];for(;o.length\u003e0;){o.sort((s,a)=\u003ea.g-s.g);const i=o.pop();if(!i)break;n.push(i.capacityMeshNodeId);const r=this.constructorParams.nodeEdgeMap.get(i.capacityMeshNodeId).flatMap(s=\u003es.nodeIds).filter(s=\u003e!e.has(s)).filter(s=\u003ethis.sectionNodeIdSet.has(s));for(const s of r){e.add(s);const a=this.constructorParams.nodeMap.get(s),A=l7(a);o.push({ancestorCapacitySum:i.g,capacity:A,g:i.g+A,capacityMeshNodeId:s})}}return n}computeCacheKeyAndTransform(){const e=this._computeBfsOrderingOfNodesInSection(),n=new Map,o=new Map;e.forEach((g,h)=\u003e{const d=`node${h}`;n.set(g,d),o.set(d,g)});const i={};for(const g of e){const h=n.get(g),d=this.constructorParams.nodeMap.get(g),p=l7(d);i[h]=TZn(p).toFixed(1)}const r=new Set,s=[];for(const g of e){const h=n.get(g),d=this.constructorParams.nodeEdgeMap.get(g)??[];for(const p of d){const m=p.nodeIds.find(_=\u003e_!==g);if(this.sectionNodeIdSet.has(m)){const _=[h,n.get(m)].sort(),f=`${_[0]}-${_[1]}`;r.has(f)||(s.push(_),r.add(f))}}}s.sort((g,h)=\u003eg[0]!==h[0]?g[0].localeCompare(h[0]):g[1].localeCompare(h[1]));const a={},A=new Map,c=new Map;for(const g of this.constructorParams.sectionConnectionTerminals){const h=n.get(g.startNodeId),d=n.get(g.endNodeId),[p,m]=[h,d].sort(),_=`${p}-\u003e${m}`,f=c.get(_)??0;c.set(_,f+1);const I=`${p}-\u003e${m}::${f}`;a[I]={start:p,end:m},A.set(I,g.connectionName)}const l=`capacitypathing:${$9e({node_capacity_map:i,node_edge_map:s,terminals:a})}`,u={cacheSpaceToRealConnectionId:A,cacheSpaceToRealNodeId:o};return this.cacheKey=l,this.cacheToSolveSpaceTransform=u,{cacheKey:l,cacheToSolveSpaceTransform:u}}applyCachedSolution(e){if(!this.cacheToSolveSpaceTransform)return console.error(\"Cache transform not available, cannot apply cached solution.\"),void(this.failed=!0);if(!e.success)return this.failed=!0,void(this.cacheHit=!0);this.cachedSectionConnectionTerminals=[];const{cacheSpaceToRealNodeId:n,cacheSpaceToRealConnectionId:o}=this.cacheToSolveSpaceTransform;for(const[i,r]of Object.entries(e.solutionPaths)){const s=o.get(i);if(!s){console.warn(`Could not find real connection name for ${i}`);continue}const a=this.constructorParams.sectionConnectionTerminals.find(c=\u003ec.connectionName===s);if(!a){console.warn(`Could not find original terminal for connection name ${s}`);continue}const A=r.map(c=\u003e{const l=n.get(c);if(!l)throw new Error(`Could not map cache node ID ${c} to real node ID for connection ${s}`);const u=this.constructorParams.nodeMap.get(l);if(!u)throw new Error(`Could not find node with ID ${l} in nodeMap for connection ${s}`);return u});this.cachedSectionConnectionTerminals.push({...a,path:A})}this.sectionScore=e.sectionScore,this.solved=!0,this.cacheHit=!0}attemptToUseCacheSync(){if(this.hasAttemptedToUseCache=!0,!this.cacheProvider?.isSyncCache)return console.log(\"Cache provider is not synchronous, skipping sync cache check.\"),!1;if(this.cacheKey||this.computeCacheKeyAndTransform(),!this.cacheKey)return console.error(\"Failed to compute cache key.\"),!1;try{const e=this.cacheProvider.getCachedSolutionSync(this.cacheKey);if(e)return this.applyCachedSolution(e),!0}catch(e){console.error(\"Error attempting to use cache:\",e)}return!1}saveToCacheSync(){if(!this.cacheKey)return void console.error(\"Cannot save to cache without cache key.\");if(!this.cacheToSolveSpaceTransform)return void console.error(\"Cache transform not available, cannot save solution to cache.\");let e;if(this.failed)e={success:!1};else{if(!this.solved)return;{const n={},{cacheSpaceToRealNodeId:o,cacheSpaceToRealConnectionId:i}=this.cacheToSolveSpaceTransform,r=new Map;for(const[A,c]of o)r.set(c,A);const s=new Map;for(const[A,c]of i)s.set(c,A);const a=[];if(super.sectionConnectionTerminals){for(const A of super.sectionConnectionTerminals)if(A.path\u0026\u0026A.path.length\u003e0){const c=A.path.map(l=\u003el.capacityMeshNodeId);a.push([A.connectionName,c])}}for(const[A,c]of a){const l=s.get(A);if(!l){console.warn(`Could not find cache space connection ID for ${A} when saving to cache.`);continue}const u=c.map(g=\u003e{const h=r.get(g);if(!h)throw new Error(`Could not map real node ID ${g} to cache node ID for connection ${A} when saving to cache.`);return h});n[l]=u}e={success:!0,sectionScore:this.sectionScore,solutionPaths:n}}}try{this.cacheProvider?.setCachedSolutionSync(this.cacheKey,e)}catch(n){console.error(\"Error saving solution to cache:\",n)}}get sectionConnectionTerminals(){return this.cacheHit\u0026\u0026this.solved\u0026\u0026this.cachedSectionConnectionTerminals?(console.log(\"returning the cached section connection terminals\"),this.cachedSectionConnectionTerminals):super.sectionConnectionTerminals}visualize(){return this.cacheHit?s6e({sectionNodes:this.constructorParams.sectionNodes,sectionEdges:this.constructorParams.sectionEdges,sectionConnectionTerminals:this.cachedSectionConnectionTerminals,completedPaths:this.cachedSectionConnectionTerminals.map(e=\u003e({connectionName:e.connectionName,path:e.path})),nodeMap:this.constructorParams.nodeMap,colorMap:this.constructorParams.colorMap,title:\"CachedHyperCapacityPathingSingleSectionSolver\"}):super.visualize()}},FZn=class extends yr{getSolverName(){return\"CapacityPathingMultiSectionSolver\"}simpleRouteJson;nodes;edges;nodeEdgeMap;connectionsWithNodes=[];colorMap;initialSolver;cacheProvider;stage=\"initialization\";nodeMap=new Map;allNodeIdsSet;usedNodeCapacityMap=new Map;totalNodeCapacityMap=new Map;nodeCapacityPercentMap=new Map;nodeOptimizationAttemptCountMap=new Map;currentSection=null;sectionSolver=null;currentScheduleIndex=0;stats;OPTIMIZATION_SCHEDULE=[{MAX_ATTEMPTS_PER_NODE:1,MAX_EXPANSION_DEGREES:3,MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE:.05},{MAX_ATTEMPTS_PER_NODE:2,MAX_EXPANSION_DEGREES:5,MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE:.2},{MAX_ATTEMPTS_PER_NODE:3,MAX_EXPANSION_DEGREES:7,MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE:.9}];get currentSchedule(){return this.OPTIMIZATION_SCHEDULE[this.currentScheduleIndex]??null}constructor(e){super(),this.stats={successfulOptimizations:0,failedOptimizations:0,failedSectionSolvers:0,startingScore:0,scheduleScores:this.OPTIMIZATION_SCHEDULE.map(({MAX_EXPANSION_DEGREES:n})=\u003e({maxExpansionDegrees:n,endingScore:0,endingHighestNodePf:0,sectionAttempts:0})),cacheHits:0,cacheMisses:0},this.MAX_ITERATIONS=e.MAX_ITERATIONS??1e7,this.cacheProvider=e.cacheProvider,this.simpleRouteJson=e.simpleRouteJson,this.nodes=e.nodes,this.edges=e.edges,this.nodeEdgeMap=tL(this.edges),this.colorMap=e.colorMap??{},this.nodeMap=new Map(this.nodes.map(n=\u003e[n.capacityMeshNodeId,n])),this.nodeEdgeMap=tL(this.edges),this.initialSolver=e.initialPathingSolver||new r1t({simpleRouteJson:this.simpleRouteJson,nodes:this.nodes,edges:this.edges,colorMap:this.colorMap}),this.activeSubSolver=this.initialSolver;for(const n of this.nodes){const o=this.initialSolver.getTotalCapacity(n);this.totalNodeCapacityMap.set(n.capacityMeshNodeId,o)}this.allNodeIdsSet=new Set(this.nodes.map(n=\u003en.capacityMeshNodeId))}_stepInitialization(){if(this.initialSolver?.step(),this.initialSolver?.failed)return this.failed=!0,void(this.error=this.initialSolver.error);if(this.initialSolver?.solved){this.usedNodeCapacityMap=new Map(this.initialSolver.usedNodeCapacityMap);for(const e of this.nodes){const n=this.totalNodeCapacityMap.get(e.capacityMeshNodeId)??0,o=this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0,i=n\u003e0?o/n:0;this.nodeCapacityPercentMap.set(e.capacityMeshNodeId,i),this.nodeOptimizationAttemptCountMap.set(e.capacityMeshNodeId,0)}this.connectionsWithNodes=this.initialSolver.connectionsWithNodes,this.stats.startingScore=Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:this.allNodeIdsSet}),this.stage=\"section-optimization\"}}_getNextNodeToOptimize(){let e=0,n=null;for(const o of this.nodes){if(o._containsTarget)continue;const i=this.nodeOptimizationAttemptCountMap.get(o.capacityMeshNodeId),r=this.totalNodeCapacityMap.get(o.capacityMeshNodeId),s=uae({usedCapacity:this.usedNodeCapacityMap.get(o.capacityMeshNodeId)??0,totalCapacity:r,layerCount:o.availableZ.length}),a=s/(i+1);i\u003cthis.currentSchedule.MAX_ATTEMPTS_PER_NODE\u0026\u0026a\u003ee\u0026\u0026s\u003ethis.currentSchedule.MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE\u0026\u0026(e=a,n=o.capacityMeshNodeId)}return n}getOverallScore(){let e=0;for(const n of this.nodes){if(n._containsTarget)continue;const o=this.totalNodeCapacityMap.get(n.capacityMeshNodeId),i=uae({usedCapacity:this.usedNodeCapacityMap.get(n.capacityMeshNodeId)??0,totalCapacity:o,layerCount:n.availableZ.length});i\u003ee\u0026\u0026(e=i)}return{highestNodePf:e,score:Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:this.allNodeIdsSet})}}_stepSectionOptimization(){if(!this.sectionSolver){const e=this._getNextNodeToOptimize();if(!e){const{highestNodePf:o,score:i}=this.getOverallScore();return this.stats.scheduleScores[this.currentScheduleIndex].endingHighestNodePf=o,this.stats.scheduleScores[this.currentScheduleIndex].endingScore=i,this.currentScheduleIndex++,void(this.currentSchedule||(this.solved=!0))}const n=(o=\u003e{const{centerNodeId:i,connectionsWithNodes:r,nodeMap:s,edges:a,nodeEdgeMap:A,expansionDegrees:c}=o,l=new Set,u=[{nodeId:i,depth:0}];l.add(i);let g=0;for(;g\u003cu.length;){const{nodeId:m,depth:_}=u[g++];if(_\u003e=c)continue;const f=A.get(m)?.flatMap(I=\u003eI.nodeIds.filter(C=\u003eC!==m))??[];for(const I of f)l.has(I)||(l.add(I),u.push({nodeId:I,depth:_+1}))}const h=Array.from(l).map(m=\u003es.get(m)),d=a.filter(m=\u003e{const[_,f]=m.nodeIds;return l.has(_)\u0026\u0026l.has(f)}),p=[];for(const m of r){if(!m.path)continue;let _=null,f=null;for(const I of m.path)if(l.has(I.capacityMeshNodeId)){_=I.capacityMeshNodeId;break}for(let I=m.path.length-1;I\u003e=0;I--){const C=m.path[I];if(l.has(C.capacityMeshNodeId)){f=C.capacityMeshNodeId;break}}_\u0026\u0026f\u0026\u0026p.push({connectionName:m.connection.name,startNodeId:_,endNodeId:f})}return{sectionConnectionTerminals:p,sectionNodes:h,sectionEdges:d,centerNodeId:i}})({centerNodeId:e,connectionsWithNodes:this.connectionsWithNodes,nodeMap:this.nodeMap,edges:this.edges,expansionDegrees:this.currentSchedule.MAX_EXPANSION_DEGREES,nodeEdgeMap:this.nodeEdgeMap});this.stats.scheduleScores[this.currentScheduleIndex].sectionAttempts++,this.currentSection=n,this.sectionSolver=new kZn({sectionNodes:this.currentSection.sectionNodes,sectionEdges:this.currentSection.sectionEdges,sectionConnectionTerminals:this.currentSection.sectionConnectionTerminals,colorMap:this.colorMap,centerNodeId:this.currentSection.centerNodeId,nodeEdgeMap:this.nodeEdgeMap,hyperParameters:{EXPANSION_DEGREES:this.currentSchedule.MAX_EXPANSION_DEGREES},cacheProvider:this.cacheProvider}),this.activeSubSolver=this.sectionSolver,this.nodeOptimizationAttemptCountMap.set(e,(this.nodeOptimizationAttemptCountMap.get(e)??0)+1)}if(this.sectionSolver.step(),(this.sectionSolver.failed||this.sectionSolver.solved)\u0026\u0026(this.sectionSolver.cacheHit?this.stats.cacheHits++:this.stats.cacheMisses++),this.sectionSolver.failed)return console.warn(`Section solver failed for node ${this.currentSection.centerNodeId}. Error: ${this.sectionSolver.error}`),this.stats.failedSectionSolvers++,this.stats.failedOptimizations++,this.sectionSolver=null,void(this.activeSubSolver=null);if(this.sectionSolver.solved){const e=this.sectionSolver.sectionConnectionTerminals,n=this.sectionSolver.sectionNodes,o=this.sectionSolver.centerNodeId;if(this.sectionSolver=null,this.activeSubSolver=null,!e)return void console.warn(`Pathing sub-solver for section ${this.currentSection.centerNodeId} did not complete successfully. Discarding results.`);const i=new Set(n.map(A=\u003eA.capacityMeshNodeId)),r=Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:i}),s=new Map(this.usedNodeCapacityMap),a=e;for(const A of a){const c=this.connectionsWithNodes.find(l=\u003el.connection.name===A.connectionName);if(c?.path){for(const l of c.path)if(i.has(l.capacityMeshNodeId)){const u=s.get(l.capacityMeshNodeId)??0;s.set(l.capacityMeshNodeId,Math.max(0,u-1))}}}for(const A of a)if(A.path)for(const c of A.path)i.has(c.capacityMeshNodeId)\u0026\u0026s.set(c.capacityMeshNodeId,(s.get(c.capacityMeshNodeId)??0)+1);Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:s,nodeMap:this.nodeMap,sectionNodeIds:i})\u003er?(this.stats.successfulOptimizations++,this._mergeSolvedSectionPaths({centerNodeId:o,sectionConnectionTerminals:e}),this._recalculateNodeCapacityUsage()):this.stats.failedOptimizations++}}_mergeSolvedSectionPaths({centerNodeId:e,sectionConnectionTerminals:n}){for(const o of n){if(!o.path){console.warn(`No path found for connection ${o.connectionName} in section ${e}`);continue}const i=this.connectionsWithNodes.find(d=\u003ed.connection.name===o.connectionName);if(!i||!i.path){console.warn(`Original connection or path not found for ${o.connectionName} while merging section ${e}`);continue}const r=i.path,s=o.path,a=r.findIndex(d=\u003ed.capacityMeshNodeId===o.startNodeId),A=r.findIndex(d=\u003ed.capacityMeshNodeId===o.endNodeId);if(a===-1||A===-1){console.warn(`Could not find start/end nodes (${o.startNodeId}/${o.endNodeId}) in original path for ${o.connectionName}`);continue}const[c,l]=a\u003c=A?[a,A]:[A,a],u=r.slice(0,c),g=r.slice(l+1);let h=s;if(s.length\u003e0\u0026\u0026r[c]\u0026\u0026s[0].capacityMeshNodeId!==r[c].capacityMeshNodeId){if(s[s.length-1].capacityMeshNodeId!==r[c].capacityMeshNodeId){console.warn(`New section path for ${o.connectionName} doesn't align with original path boundaries. Skipping merge for this connection.`);continue}h=[...s].reverse()}i.path=[...u,...h,...g]}}_recalculateNodeCapacityUsage(){this.usedNodeCapacityMap.clear();for(const e of this.connectionsWithNodes)if(e.path)for(const n of e.path)this.usedNodeCapacityMap.set(n.capacityMeshNodeId,(this.usedNodeCapacityMap.get(n.capacityMeshNodeId)??0)+1);for(const e of this.nodes){const n=this.totalNodeCapacityMap.get(e.capacityMeshNodeId)??0,o=this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0,i=n\u003e0?o/n:0;this.nodeCapacityPercentMap.set(e.capacityMeshNodeId,i)}}getCapacityPaths(){const e=[];for(const n of this.connectionsWithNodes){const o=n.path;o\u0026\u0026e.push({capacityPathId:n.connection.name,connectionName:n.connection.name,nodeIds:o.map(i=\u003ei.capacityMeshNodeId)})}return e}_step(){this.iterations\u003e=this.MAX_ITERATIONS-1?this.solved=!0:this.stage===\"initialization\"?this._stepInitialization():this.stage===\"section-optimization\"\u0026\u0026this._stepSectionOptimization()}visualize(){const e=this.connectionsWithNodes.filter(n=\u003en.path\u0026\u0026n.path.length\u003e0).map(n=\u003e({connectionName:n.connection.name,path:n.path}));return s6e({nodeMap:this.nodeMap,sectionConnectionTerminals:this.connectionsWithNodes.map(n=\u003e({connectionName:n.connection.name,startNodeId:n.path?.[0]?.capacityMeshNodeId,endNodeId:n.path?.[n.path.length-1]?.capacityMeshNodeId})),completedPaths:e,sectionNodes:this.nodes,sectionEdges:this.edges,colorMap:this.colorMap,totalCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeOpacity:.05,title:\"Capacity Pathing Multi-Section Solver (Solved)\"})}},LZn=class extends yr{getSolverName(){return\"DeadEndSolver\"}removedNodeIds;targetNodeIds;leaves;leavesIndex;adjacencyList;nodeMap;nodes;edges;constructor({nodes:e,edges:n}){super(),this.MAX_ITERATIONS=e.length,this.nodes=e,this.edges=n,this.removedNodeIds=new Set,this.targetNodeIds=new Set(e.filter(o=\u003eo._containsTarget).map(o=\u003eo.capacityMeshNodeId)),this.adjacencyList=new Map(e.map(({capacityMeshNodeId:o})=\u003e[o,new Set]));for(const{nodeIds:[o,i]}of n)this.adjacencyList.get(o).add(i),this.adjacencyList.get(i).add(o);this.leavesIndex=0,this.leaves=[...this.adjacencyList.entries()].filter(([o,i])=\u003ei.size===1).filter(([o,i])=\u003e!this.targetNodeIds.has(o)).map(([o,i])=\u003eo)}_step(){if(this.leavesIndex===this.leaves.length)return void(this.solved=!0);const e=this.leaves[this.leavesIndex],n=this.adjacencyList.get(e);if(!n||n.size===0)return this.removedNodeIds.add(e),this.adjacencyList.delete(e),this.leavesIndex+=1,void(this.leavesIndex===this.leaves.length\u0026\u0026(this.solved=!0));const[o]=n,i=o?this.adjacencyList.get(o):void 0;if(!o||!i)return this.removedNodeIds.add(e),this.adjacencyList.delete(e),this.leavesIndex+=1,void(this.leavesIndex===this.leaves.length\u0026\u0026(this.solved=!0));i.delete(e),this.removedNodeIds.add(e),this.adjacencyList.delete(e),i.size!==1||this.targetNodeIds.has(o)||this.leaves.push(o),this.leavesIndex+=1,this.leavesIndex===this.leaves.length\u0026\u0026(this.solved=!0)}visualize(){if(!this.nodeMap){this.nodeMap=new Map;for(const o of this.nodes)this.nodeMap.set(o.capacityMeshNodeId,o)}const e=new Map;for(const o of this.edges)for(const i of o.nodeIds)e.set(i,1+(e.get(i)??0));const n={lines:[],points:[],rects:this.nodes.map(o=\u003e{const i=Math.min(...o.availableZ);return{width:Math.max(o.width-2,.8*o.width),height:Math.max(o.height-2,.8*o.height),center:{x:o.center.x+i*o.width*.05,y:o.center.y-i*o.width*.05},fill:o._containsObstacle?\"rgba(255,0,0,0.1)\":{\"0,1\":\"rgba(0,0,0,0.1)\",0:\"rgba(0,200,200, 0.1)\",1:\"rgba(0,0,200, 0.1)\"}[o.availableZ.join(\",\")]??\"rgba(0,200,200,0.1)\",label:[o.capacityMeshNodeId,`availableZ: ${o.availableZ.join(\",\")}`,`target? ${o._containsTarget??!1}`,`obs? ${o._containsObstacle??!1}`,`conn: ${e.get(o.capacityMeshNodeId)??0}`].join(`\n`),layer:`z${o.availableZ.join(\",\")}`}}),circles:[]};for(const o of this.edges){const i=this.nodeMap.get(o.nodeIds[0]),r=this.nodeMap.get(o.nodeIds[1]);if(i?.center\u0026\u0026r?.center){const s=Math.min(...i.availableZ),a=Math.min(...r.availableZ),A={x:i.center.x+s*i.width*.05,y:i.center.y-s*i.width*.05},c={x:r.center.x+a*r.width*.05,y:r.center.y-a*r.width*.05},l=Array.from(new Set([...i.availableZ,...r.availableZ])).sort();n.lines.push({layer:`z${l.join(\",\")}`,points:[A,c],strokeDash:i.availableZ.join(\",\")===r.availableZ.join(\",\")?void 0:\"10 5\",strokeColor:o.nodeIds.some(u=\u003ethis.removedNodeIds.has(u))?Es(\"black\",.9):void 0})}}return n}},HZn=class extends j7e{getSolverName(){return\"NoOffBoardMultipleHighDensityRouteStitchSolver\"}constructor(e){super(e),this.unsolvedRoutes=[];const n=new Map;for(const o of e.hdRoutes){const i=n.get(o.connectionName)||[];i.push(o),n.set(o.connectionName,i)}for(const[o,i]of n.entries()){const r=e.connections.find(A=\u003eA.name===o);if(!r)continue;const s={...r.pointsToConnect[0],z:Kr(tI(r.pointsToConnect[0]),e.layerCount)},a={...r.pointsToConnect[1],z:Kr(tI(r.pointsToConnect[1]),e.layerCount)};this.unsolvedRoutes.push({connectionName:o,hdRoutes:i,start:s,end:a})}for(const o of e.connections)n.has(o.name)||this.unsolvedRoutes.push({connectionName:o.name,hdRoutes:[],start:{...o.pointsToConnect[0],z:Kr(tI(o.pointsToConnect[0]),e.layerCount)},end:{...o.pointsToConnect[1],z:Kr(tI(o.pointsToConnect[1]),e.layerCount)}})}},dae=.005,OZn=class extends yr{getSolverName(){return\"SingleLayerNodeMergerSolver\"}nodeMap;currentBatchNodeIds;absorbedNodeIds;nextBatchNodeIds;batchHadModifications;hasComputedAdjacentNodeIds=!1;newNodes;constructor(e){super(),this.nodeMap=new Map,this.MAX_ITERATIONS=1e5;for(const o of e)this.nodeMap.set(o.capacityMeshNodeId,o);this.newNodes=[],this.absorbedNodeIds=new Set;const n=[];for(const o of e)o.availableZ.length\u003e1?(this.newNodes.push(o),this.absorbedNodeIds.add(o.capacityMeshNodeId)):n.push([o,o.width*o.height]);n.sort((o,i)=\u003eo[1]-i[1]);for(const[o,i]of n){const r={...o,center:{...o.center}};this.nodeMap.set(o.capacityMeshNodeId,r)}this.currentBatchNodeIds=n.map(([o])=\u003eo.capacityMeshNodeId),this.nextBatchNodeIds=[],this.batchHadModifications=!1}computeAdjacentNodeIdsForFirstBatch(e){const n=Math.max(...e.map(i=\u003eMath.max(...i.availableZ))),o=[];for(let i=0;i\u003c=n;i++)o.push(new B7e(e.filter(r=\u003er.availableZ[0]===i)));for(const i of e){const r=[],s=o[i.availableZ[0]].getNodesInArea(i.center.x,i.center.y,4*i.width,4*i.height);for(const a of s)a._containsTarget\u0026\u0026a._targetConnectionName!==i._targetConnectionName||i._containsTarget\u0026\u0026(!a._containsTarget||a._targetConnectionName!==i._targetConnectionName)||a.capacityMeshNodeId!==i.capacityMeshNodeId\u0026\u0026Use(i,a)\u0026\u0026r.push(a);i._adjacentNodeIds=r.map(a=\u003ea.capacityMeshNodeId)}}getAdjacentSameLayerUnprocessedNodes(e){return this.getAdjacentSameLayerUnprocessedNodes2(e)}getAdjacentSameLayerUnprocessedNodes2(e){const n=[],o=Array.from(new Set((e._adjacentNodeIds??[]).map(i=\u003ethis.nodeMap.get(i)))).filter(i=\u003ei\u0026\u0026i.capacityMeshNodeId!==e.capacityMeshNodeId);o.sort((i,r)=\u003ei.width*i.height-r.width*r.height);for(const i of o)this.absorbedNodeIds.has(i.capacityMeshNodeId)||n.push(i);return n}_step(){this.hasComputedAdjacentNodeIds||(this.computeAdjacentNodeIdsForFirstBatch(this.currentBatchNodeIds.map(l=\u003ethis.nodeMap.get(l))),this.hasComputedAdjacentNodeIds=!0);let e=this.currentBatchNodeIds.pop();for(;e\u0026\u0026this.absorbedNodeIds.has(e);)e=this.currentBatchNodeIds.pop();if(!e)return this.batchHadModifications?(this.currentBatchNodeIds=this.nextBatchNodeIds.sort((l,u)=\u003e{const g=this.nodeMap.get(l),h=this.nodeMap.get(u);return g.width*g.height-h.width*h.height}),this.nextBatchNodeIds=[],void(this.batchHadModifications=!1)):(this.solved=!0,void this.newNodes.push(...this.nextBatchNodeIds.map(l=\u003ethis.nodeMap.get(l))));const n=this.nodeMap.get(e);let o=!1;const i=this.getAdjacentSameLayerUnprocessedNodes(n);if(i.length===0)return void this.nextBatchNodeIds.push(e);const r=l=\u003e{for(const u of l)this.absorbedNodeIds.add(u.capacityMeshNodeId);n._adjacentNodeIds=Array.from(new Set([...n._adjacentNodeIds??[],...l.flatMap(u=\u003eu._adjacentNodeIds??[])].filter(u=\u003eu!==n.capacityMeshNodeId\u0026\u0026!this.absorbedNodeIds.has(u))))},s=i.filter(l=\u003el.center.x\u003cn.center.x\u0026\u0026Math.abs(l.center.y-n.center.y)\u003cn.height/2);if(s.length\u003e0){const{width:l,height:u}=s[0],g=s.every(h=\u003eh.width===l\u0026\u0026h.height===u);Math.abs(s.reduce((h,d)=\u003eh+d.height,0)-n.height)\u003cdae\u0026\u0026g\u0026\u0026(n.width+=l,n.center.x=n.center.x-l/2,r(s),o=!0)}const a=i.filter(l=\u003el.center.x\u003en.center.x\u0026\u0026Math.abs(l.center.y-n.center.y)\u003cn.height/2);if(a.length\u003e0\u0026\u0026!o){const{width:l,height:u}=a[0],g=a.every(h=\u003eh.width===l\u0026\u0026h.height===u);Math.abs(a.reduce((h,d)=\u003eh+d.height,0)-n.height)\u003cdae\u0026\u0026g\u0026\u0026(n.width+=l,n.center.x=n.center.x+l/2,r(a),o=!0)}const A=i.filter(l=\u003el.center.y\u003en.center.y\u0026\u0026Math.abs(l.center.x-n.center.x)\u003cn.width/2);if(A.length\u003e0\u0026\u0026!o){const{width:l,height:u}=A[0],g=A.every(h=\u003eh.width===l\u0026\u0026h.height===u);Math.abs(A.reduce((h,d)=\u003eh+d.width,0)-n.width)\u003cdae\u0026\u0026g\u0026\u0026(n.height+=u,n.center.y=n.center.y+u/2,r(A),o=!0)}const c=i.filter(l=\u003el.center.y\u003cn.center.y\u0026\u0026Math.abs(l.center.x-n.center.x)\u003cn.width/2);if(c.length\u003e0\u0026\u0026!o){const{width:l,height:u}=c[0],g=c.every(h=\u003eh.width===l\u0026\u0026h.height===u);Math.abs(c.reduce((h,d)=\u003eh+d.width,0)-n.width)\u003cdae\u0026\u0026g\u0026\u0026(n.height+=u,n.center.y=n.center.y-u/2,r(c),o=!0)}o?(this.batchHadModifications=!0,this.currentBatchNodeIds.push(e)):this.nextBatchNodeIds.unshift(e)}visualize(){const e={circles:[],lines:[],points:[],rects:[],coordinateSystem:\"cartesian\",title:\"Same Layer Node Merger\"};for(const i of this.newNodes)e.rects.push(Wf(i));const n=this.currentBatchNodeIds[this.currentBatchNodeIds.length-1];let o;n\u0026\u0026(o=this.getAdjacentSameLayerUnprocessedNodes(this.nodeMap.get(n)));for(const i of this.currentBatchNodeIds){const r=this.nodeMap.get(i);if(!this.absorbedNodeIds.has(i)\u0026\u0026r){const s=Wf(r,{rectMargin:.01});i===n?s.stroke=\"rgba(0, 255, 0, 0.8)\":o?.some(a=\u003ea.capacityMeshNodeId===i)?s.stroke=\"rgba(128, 0, 128, 0.8)\":s.stroke=\"rgba(255, 165, 0, 0.8)\",s.layer=`z${r.availableZ.join(\",\")}`,s.label=`${s.label}\n(unprocessed)`,e.rects.push(s)}}for(const i of this.nextBatchNodeIds){const r=this.nodeMap.get(i);if(!this.absorbedNodeIds.has(i)\u0026\u0026r){const s=Wf(r,{rectMargin:.01});s.layer=`z${r.availableZ.join(\",\")}`,s.stroke=\"rgba(0, 217, 255, 0.8)\",s.label=`${s.label}\nx: ${r.center.x}, y: ${r.center.y}\n${r.width}x${r.height}\n(next batch)`,e.rects.push(s)}}return e}},GZn=class extends yr{getSolverName(){return\"StrawSolver\"}multiLayerNodes;strawNodes;skippedNodes;unprocessedNodes;strawSize;nodeIdCounter;constructor(e){super(),this.MAX_ITERATIONS=1e5,this.strawSize=e.strawSize??.5,this.multiLayerNodes=[],this.strawNodes=[],this.skippedNodes=[],this.nodeIdCounter=0,this.unprocessedNodes=[];for(const n of e.nodes)n.availableZ.length===1?this.unprocessedNodes.push(n):this.multiLayerNodes.push(n)}getCapacityOfMultiLayerNodesWithinBounds(e){let n=0;for(const o of this.multiLayerNodes){const i=o.center.x-o.width/2,r=o.center.x+o.width/2,s=o.center.y-o.height/2,a=o.center.y+o.height/2,A=Math.max(e.minX,i),c=Math.min(e.maxX,r),l=Math.max(e.minY,s),u=Math.min(e.maxY,a);if(A\u003cc\u0026\u0026l\u003cu){const g=(c-A)*(u-l)/(o.width*o.height);n+=l7(o)*g}}return n}getSurroundingCapacities(e){const n=Math.min(e.width,e.height);return{leftSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x-e.width/2-n,maxX:e.center.x-e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2}),rightSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x+e.width/2,maxX:e.center.x+e.width/2+n,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2}),topSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2-n,maxY:e.center.y-e.height/2}),bottomSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y+e.height/2,maxY:e.center.y+e.height/2+n})}}createStrawsForNode(e){const n=[],{leftSurroundingCapacity:o,rightSurroundingCapacity:i,topSurroundingCapacity:r,bottomSurroundingCapacity:s}=this.getSurroundingCapacities(e);if(1*(o+i)\u003er+s){const a=Math.floor(e.height/this.strawSize),A=e.height/a;for(let c=0;c\u003ca;c++){const l=e.center.y-e.height/2+c*A+A/2;n.push({capacityMeshNodeId:`${e.capacityMeshNodeId}_straw${c}`,center:{x:e.center.x,y:l},width:e.width,height:A,layer:e.layer,availableZ:[...e.availableZ],_depth:e._depth,_strawNode:!0,_strawParentCapacityMeshNodeId:e.capacityMeshNodeId})}}else{const a=Math.floor(e.width/this.strawSize),A=e.width/a;for(let c=0;c\u003ca;c++){const l=e.center.x-e.width/2+c*A+A/2;n.push({capacityMeshNodeId:`${e.capacityMeshNodeId}_straw${c}`,center:{x:l,y:e.center.y},width:A,height:e.height,layer:e.layer,availableZ:[...e.availableZ],_depth:e._depth,_strawNode:!0,_strawParentCapacityMeshNodeId:e.capacityMeshNodeId})}}return n}getResultNodes(){return[...this.multiLayerNodes,...this.strawNodes,...this.skippedNodes]}_step(){const e=this.unprocessedNodes.pop();if(!e)return void(this.solved=!0);if(e.width\u003cthis.strawSize\u0026\u0026e.height\u003cthis.strawSize)return void this.skippedNodes.push(e);if(e._containsTarget)return void this.skippedNodes.push(e);const n=this.createStrawsForNode(e);this.strawNodes.push(...n),n.length===0\u0026\u0026this.strawNodes.push(e)}visualize(){const e={rects:[],lines:[],points:[],circles:[],title:\"Straw Solver\"};for(const n of this.unprocessedNodes)e.rects.push({center:n.center,width:n.width,height:n.height,fill:\"rgba(200, 200, 200, 0.5)\",stroke:\"rgba(0, 0, 0, 0.5)\",label:`${n.capacityMeshNodeId}\nUnprocessed\n${n.width}x${n.height}`});for(const n of this.strawNodes){const o=n.availableZ[0]===0?\"rgba(0, 150, 255, 0.5)\":\"rgba(255, 100, 0, 0.5)\";e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,stroke:\"rgba(0, 0, 0, 0.5)\",label:`${n.capacityMeshNodeId}\nLayer: ${n.availableZ[0]}\n${n.width}x${n.height}`,layer:`z${n.availableZ.join(\",\")}`})}for(const n of this.multiLayerNodes)e.rects.push({center:n.center,width:.9*n.width,height:.9*n.height,fill:\"rgba(100, 255, 100, 0.5)\",stroke:\"rgba(0, 0, 0, 0.5)\",layer:`z${n.availableZ.join(\",\")}`,label:`${n.capacityMeshNodeId}\nLayers: ${n.availableZ.join(\",\")}\n${n.width}x${n.height}`});return e}};function a1t(t){const{nodeId:e,nodeIdToSegmentIds:n,segmentIdToNodeIds:o,hops:i}=t;if(i===0)return[e];const r=new Set([e]),s=[{nodeId:e,remainingHops:i}];for(;s.length\u003e0;){const{nodeId:a,remainingHops:A}=s.shift();if(A===0)continue;const c=n.get(a)||[];for(const l of c){const u=o.get(l)||[];for(const g of u)r.has(g)||(r.add(g),s.push({nodeId:g,remainingHops:A-1}))}}return Array.from(r)}var a6e=t=\u003eArray.from(t.entries()).map(([e,{x:n,y:o,z:i}])=\u003e`${e}(${n?.toFixed(3)??\"\"},${o?.toFixed(3)??\"\"},${i??\"\"})`).sort().join(\"\u0026\"),YZn=(t,e,n,o)=\u003e{const i=Math.min(t,e),r=Math.max(t,e),s=Math.min(n,o);return i\u003c=Math.max(n,o)\u0026\u0026r\u003e=s},hae=(t,e,n,o)=\u003e{const i=[],r=new Map(t.originalPointMap);for(const[s,a]of n.entries()){const A=r.get(s);r.set(s,{x:a.x??A.x,y:a.y??A.y,z:a.z??A.z})}for(const s of t.allNodeIds){if(!e.get(s))continue;const a=t.segmentPairsInNode.get(s);for(const A of a){const c=r.get(A[0]),l=r.get(A[1]);c.z!==l.z\u0026\u0026i.push({type:\"transition_via\",segmentPoints:A,capacityMeshNodeId:s,probabilityOfFailure:0})}for(let A=0;A\u003ca.length;A++)for(let c=A+1;c\u003ca.length;c++){const l=a[A],u=a[c],g=r.get(l[0]),h=r.get(l[1]),d=r.get(u[0]),p=r.get(u[1]);if(!YZn(g.z,h.z,d.z,p.z))continue;const m=Uh(g,h,d,p),_=g.z===h.z\u0026\u0026d.z===p.z\u0026\u0026g.z===d.z;m\u0026\u0026(_?i.push({type:\"same_layer_crossing\",segmentPoints:[l,u],capacityMeshNodeId:s,crossingLine1:l,crossingLine2:u,probabilityOfFailure:0}):g.z===h.z\u0026\u0026d.z!==p.z?i.push({type:\"single_transition_crossing\",segmentPoints:[l,u],capacityMeshNodeId:s,sameLayerCrossingLine:l,transitionCrossingLine:u,probabilityOfFailure:0}):g.z!==h.z\u0026\u0026d.z===p.z?i.push({type:\"single_transition_crossing\",segmentPoints:[l,u],capacityMeshNodeId:s,sameLayerCrossingLine:u,transitionCrossingLine:l,probabilityOfFailure:0}):g.z!==h.z\u0026\u0026d.z!==p.z\u0026\u0026i.push({type:\"double_transition_crossing\",segmentPoints:[l,u],capacityMeshNodeId:s,crossingLine1:l,crossingLine2:u,probabilityOfFailure:0}))}}return i},A1t=(t,e,n)=\u003e{if(e.type===\"change_layer\")for(const o of e.segmentPointIds){const i=t.get(o)||{};t.set(o,{...i,z:e.newZ})}else if(e.type===\"swap_position_on_segment\"){const[o,i]=e.segmentPointIds,r=n(o),s=n(i),a=t.get(o)||{},A=t.get(i)||{};t.set(o,{...a,x:s.x,y:s.y}),t.set(i,{...A,x:r.x,y:r.y})}else if(e.type===\"combined\")for(const o of e.operations)A1t(t,o,n)},c1t=(t,e)=\u003e{const n=new Map,o=new Map,i=new Map;let r=0;for(const s of t)for(const a of s.assignedPoints){const A={segmentPointId:\"SP\"+r++,segmentId:s.nodePortSegmentId,capacityMeshNodeIds:e.get(s.nodePortSegmentId),connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,x:a.point.x,y:a.point.y,z:a.point.z,directlyConnectedSegmentPointIds:[]};n.set(A.segmentPointId,A);for(const c of A.capacityMeshNodeIds)o.set(c,[...o.get(c)??[],A.segmentPointId]);i.set(s.nodePortSegmentId,[...i.get(s.nodePortSegmentId)??[],A.segmentPointId])}return{segmentPointMap:n,nodeToSegmentPointMap:o,segmentToSegmentPointMap:i}},UZn=class extends yr{getSolverName(){return\"UnravelSectionSolver\"}nodeMap;dedupedSegments;dedupedSegmentMap;MUTABLE_HOPS=1;unravelSection;candidates=[];lastProcessedCandidate=null;bestCandidate=null;originalCandidate;rootNodeId;nodeIdToSegmentIds;segmentIdToNodeIds;colorMap;tunedNodeCapacityMap;MAX_CANDIDATES=500;iterationsSinceImprovement=0;hyperParameters;selectedCandidateIndex=null;queuedOrExploredCandidatePointModificationHashes=new Set;constructorParams;constructor(e){if(super(),this.constructorParams=e,this.MUTABLE_HOPS=e.MUTABLE_HOPS??this.MUTABLE_HOPS,this.MAX_ITERATIONS=5e4,this.hyperParameters={...e.hyperParameters,MAX_ITERATIONS_WITHOUT_IMPROVEMENT:200},this.nodeMap=e.nodeMap,this.dedupedSegments=e.dedupedSegments,e.dedupedSegmentMap)this.dedupedSegmentMap=e.dedupedSegmentMap;else{this.dedupedSegmentMap=new Map;for(const n of this.dedupedSegments)this.dedupedSegmentMap.set(n.nodePortSegmentId,n)}this.nodeIdToSegmentIds=e.nodeIdToSegmentIds,this.segmentIdToNodeIds=e.segmentIdToNodeIds,this.rootNodeId=e.rootNodeId,this.colorMap=e.colorMap??{},this.unravelSection=this.createUnravelSection({segmentPointMap:e.segmentPointMap,nodeToSegmentPointMap:e.nodeToSegmentPointMap,segmentToSegmentPointMap:e.segmentToSegmentPointMap}),this.tunedNodeCapacityMap=new Map;for(const n of this.unravelSection.allNodeIds)this.tunedNodeCapacityMap.set(n,l7(this.nodeMap.get(n)));this.originalCandidate=this.createInitialCandidate(),this.candidates=[this.originalCandidate]}getConstructorParams(){return{...this.constructorParams,segmentPointMap:this.unravelSection.segmentPointMap,nodeToSegmentPointMap:this.unravelSection.segmentPointsInNode,segmentToSegmentPointMap:this.unravelSection.segmentPointsInSegment}}createUnravelSection(e){const n=a1t({nodeId:this.rootNodeId,nodeIdToSegmentIds:this.nodeIdToSegmentIds,segmentIdToNodeIds:this.segmentIdToNodeIds,hops:this.MUTABLE_HOPS}),o=a1t({nodeId:this.rootNodeId,nodeIdToSegmentIds:this.nodeIdToSegmentIds,segmentIdToNodeIds:this.segmentIdToNodeIds,hops:this.MUTABLE_HOPS+1}),i=Array.from(new Set(o).difference(new Set(n)));e?.segmentPointMap||(e=c1t(this.dedupedSegments,this.segmentIdToNodeIds));const r=new Map;for(const h of o)r.set(h,e.nodeToSegmentPointMap.get(h));const s=new Map;for(const h of o)for(const d of r.get(h)){const p=e.segmentPointMap.get(d);s.set(d,p)}const a=Array.from(s.values()),A=new Map;for(const h of a)A.set(h.segmentId,[...A.get(h.segmentId)??[],h.segmentPointId]);for(const[h,d]of r.entries())for(let p=0;p\u003cd.length;p++){const m=e.segmentPointMap.get(d[p]);for(let _=p+1;_\u003cd.length;_++){const f=e.segmentPointMap.get(d[_]);f.segmentPointId!==m.segmentPointId\u0026\u0026f.segmentId!==m.segmentId\u0026\u0026f.connectionName===m.connectionName\u0026\u0026(f.directlyConnectedSegmentPointIds.includes(m.segmentPointId)||(m.directlyConnectedSegmentPointIds.push(f.segmentPointId),f.directlyConnectedSegmentPointIds.push(m.segmentPointId)))}}const c=new Map;for(const h of o)c.set(h,[]);for(const h of a)for(const d of h.capacityMeshNodeIds){const p=c.get(d);if(p)for(const m of h.directlyConnectedSegmentPointIds){const _=e.segmentPointMap.get(m);_.segmentPointId!==h.segmentPointId\u0026\u0026_.capacityMeshNodeIds.some(f=\u003ef===d)\u0026\u0026(p.some(([f,I])=\u003ef===h.segmentPointId\u0026\u0026I===_.segmentPointId||f===_.segmentPointId\u0026\u0026I===h.segmentPointId)||p.push([h.segmentPointId,_.segmentPointId]))}}const l=new Set;for(const h of n)for(const d of this.nodeIdToSegmentIds.get(h))this.segmentIdToNodeIds.get(d).every(p=\u003e!this.nodeMap.get(p)._containsTarget)\u0026\u0026l.add(d);const u=new Set;for(const h of a){const d=h.capacityMeshNodeIds.some(_=\u003en.includes(_)),p=this.dedupedSegmentMap.get(h.segmentId),m=p\u0026\u0026p.availableZ.length\u003e1;(d||m)\u0026\u0026u.add(h.segmentPointId)}const g=new Set;for(const h of a)if(h.capacityMeshNodeIds.some(d=\u003ethis.nodeMap.get(d)?._containsTarget)){const d=this.dedupedSegmentMap.get(h.segmentId);d\u0026\u0026d.availableZ.length===1\u0026\u0026g.add(h.segmentPointId)}return{allNodeIds:o,mutableNodeIds:n,immutableNodeIds:i,mutableSegmentIds:l,segmentPairsInNode:c,segmentPointMap:s,segmentPointsInNode:r,segmentPointsInSegment:A,originalPointMap:s,mutableSegmentPointIds:u,zLockedSegmentPointIds:g}}createInitialCandidate(){const e=new Map,n=hae(this.unravelSection,this.nodeMap,e),o=this.computeG({issues:n,originalCandidate:{},operationsPerformed:0,operation:{}});return{pointModifications:e,g:o,h:0,f:o,operationsPerformed:0,candidateHash:a6e(e),issues:hae(this.unravelSection,this.nodeMap,e)}}get nextCandidate(){return this.candidates[0]??null}getPointInCandidate(e,n){const o=this.unravelSection.segmentPointMap.get(n),i=e.pointModifications.get(n);return{x:i?.x??o.x,y:i?.y??o.y,z:i?.z??o.z,segmentId:o.segmentId}}getConnectionSegmentPointIds(e){const n=[];for(const[o,i]of this.unravelSection.segmentPointMap.entries())i.connectionName===e\u0026\u0026n.push(o);return n}canConnectionUseLayer(e,n){for(const o of e){const i=this.unravelSection.segmentPointMap.get(o),r=this.dedupedSegmentMap.get(i.segmentId);if(!r||!r.availableZ.includes(n))return!1}return!0}getOperationsForIssue(e,n){const o=[];if(n.type===\"transition_via\"){const[i,r]=n.segmentPoints,s=this.getPointInCandidate(e,i),a=this.getPointInCandidate(e,r),A=this.unravelSection.segmentPointMap.get(i),c=(this.unravelSection.segmentPointMap.get(r),this.dedupedSegmentMap.get(s.segmentId).availableZ),l=this.dedupedSegmentMap.get(a.segmentId).availableZ,u=this.unravelSection.zLockedSegmentPointIds.has(i),g=this.unravelSection.zLockedSegmentPointIds.has(r),h=this.getConnectionSegmentPointIds(A.connectionName);if(this.canConnectionUseLayer(h,a.z)){const d=h.filter(p=\u003ethis.unravelSection.mutableSegmentPointIds.has(p)\u0026\u0026!this.unravelSection.zLockedSegmentPointIds.has(p));d.length\u003e0\u0026\u0026o.push({type:\"change_layer\",newZ:a.z,segmentPointIds:d})}if(this.canConnectionUseLayer(h,s.z)){const d=h.filter(p=\u003ethis.unravelSection.mutableSegmentPointIds.has(p)\u0026\u0026!this.unravelSection.zLockedSegmentPointIds.has(p));d.length\u003e0\u0026\u0026o.push({type:\"change_layer\",newZ:s.z,segmentPointIds:d})}this.unravelSection.mutableSegmentPointIds.has(i)\u0026\u0026!u\u0026\u0026c.includes(a.z)\u0026\u0026o.push({type:\"change_layer\",newZ:a.z,segmentPointIds:[i]}),this.unravelSection.mutableSegmentPointIds.has(r)\u0026\u0026!g\u0026\u0026l.includes(s.z)\u0026\u0026o.push({type:\"change_layer\",newZ:s.z,segmentPointIds:[r]})}if(n.type===\"same_layer_crossing\"){const[i,r]=n.crossingLine1,[s,a]=n.crossingLine2,A=[],c=this.unravelSection.segmentPointMap.get(i),l=this.unravelSection.segmentPointMap.get(r),u=this.unravelSection.segmentPointMap.get(s),g=this.unravelSection.segmentPointMap.get(a),h=this.unravelSection.mutableSegmentPointIds.has(i),d=this.unravelSection.mutableSegmentPointIds.has(r),p=this.unravelSection.mutableSegmentPointIds.has(s),m=this.unravelSection.mutableSegmentPointIds.has(a),_=this.unravelSection.zLockedSegmentPointIds.has(i),f=this.unravelSection.zLockedSegmentPointIds.has(r),I=this.unravelSection.zLockedSegmentPointIds.has(s),C=this.unravelSection.zLockedSegmentPointIds.has(a);h\u0026\u0026p\u0026\u0026c.segmentId===u.segmentId\u0026\u0026A.push([i,s]),h\u0026\u0026m\u0026\u0026c.segmentId===g.segmentId\u0026\u0026A.push([i,a]),d\u0026\u0026p\u0026\u0026l.segmentId===u.segmentId\u0026\u0026A.push([r,s]),d\u0026\u0026m\u0026\u0026l.segmentId===g.segmentId\u0026\u0026A.push([r,a]);for(const[k,R]of A)o.push({type:\"swap_position_on_segment\",segmentPointIds:[k,R]});const y=this.getConnectionSegmentPointIds(c.connectionName),x=this.getConnectionSegmentPointIds(u.connectionName),E=new Set;for(const k of this.unravelSection.segmentPointMap.values()){const R=this.dedupedSegmentMap.get(k.segmentId);if(R)for(const F of R.availableZ)E.add(F)}for(const k of E)if(k!==c.z\u0026\u0026this.canConnectionUseLayer(y,k)){const R=y.filter(F=\u003ethis.unravelSection.mutableSegmentPointIds.has(F)\u0026\u0026!this.unravelSection.zLockedSegmentPointIds.has(F));R.length\u003e0\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:R})}for(const k of E)if(k!==u.z\u0026\u0026this.canConnectionUseLayer(x,k)){const R=x.filter(F=\u003ethis.unravelSection.mutableSegmentPointIds.has(F)\u0026\u0026!this.unravelSection.zLockedSegmentPointIds.has(F));R.length\u003e0\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:R})}const B=this.dedupedSegmentMap.get(c.segmentId),S=this.dedupedSegmentMap.get(l.segmentId),Q=this.dedupedSegmentMap.get(u.segmentId),w=this.dedupedSegmentMap.get(g.segmentId),M=(k,R)=\u003ek.every(F=\u003eF.availableZ.includes(R));if(h\u0026\u0026d\u0026\u0026!_\u0026\u0026!f){const k=c.z===0?1:0;M([B,S],k)\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:[i,r]})}if(p\u0026\u0026m\u0026\u0026!I\u0026\u0026!C){const k=u.z===0?1:0;M([Q,w],k)\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:[s,a]})}if(h\u0026\u0026!_){const k=c.z===0?1:0;B.availableZ.includes(k)\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:[i]})}if(d\u0026\u0026!f){const k=l.z===0?1:0;S.availableZ.includes(k)\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:[r]})}if(p\u0026\u0026!I){const k=u.z===0?1:0;Q.availableZ.includes(k)\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:[s]})}if(m\u0026\u0026!C){const k=g.z===0?1:0;w.availableZ.includes(k)\u0026\u0026o.push({type:\"change_layer\",newZ:k,segmentPointIds:[a]})}}return o}computeG(e){const{issues:n,originalCandidate:o,operationsPerformed:i,operation:r}=e,s=new Map;for(const c of n){s.has(c.capacityMeshNodeId)||s.set(c.capacityMeshNodeId,{numTransitionCrossings:0,numSameLayerCrossings:0,numEntryExitLayerChanges:0});const l=s.get(c.capacityMeshNodeId);c.type===\"transition_via\"?l.numTransitionCrossings++:c.type===\"same_layer_crossing\"?l.numSameLayerCrossings++:c.type===\"double_transition_crossing\"||c.type===\"single_transition_crossing\"?l.numEntryExitLayerChanges++:c.type}let a=0;for(const[c,{numEntryExitLayerChanges:l,numSameLayerCrossings:u,numTransitionCrossings:g}]of s){const h=this.nodeMap.get(c),d=Math.min(wy(h,u,l,g),.999999);a+=Math.log(1-d)}var A;return(A=a)\u003c-Math.LN2?Math.log(1-Math.exp(A)):Math.log(-Math.expm1(A))}getUnexploredNeighborByApplyingOperation(e,n){const o=new Map(e.pointModifications);A1t(o,n,A=\u003ethis.getPointInCandidate(e,A));const i=a6e(o);if(this.queuedOrExploredCandidatePointModificationHashes.has(i))return null;const r=hae(this.unravelSection,this.nodeMap,o),s=e.operationsPerformed+1,a=this.computeG({issues:r,originalCandidate:e,operationsPerformed:s,operation:n});return{issues:r,g:a,h:0,f:a,pointModifications:o,candidateHash:i,operationsPerformed:s}}getNeighborOperationsForCandidate(e){return e.issues.flatMap(n=\u003ethis.getOperationsForIssue(e,n))}getNeighbors(e){const n=[],o=this.getNeighborOperationsForCandidate(e);for(const i of o){const r=this.getUnexploredNeighborByApplyingOperation(e,i);r\u0026\u0026n.push(r)}return n}_step(){const e=this.candidates.shift();this.iterationsSinceImprovement++,this.iterationsSinceImprovement\u003ethis.hyperParameters.MAX_ITERATIONS_WITHOUT_IMPROVEMENT?this.solved=!0:e?(this.lastProcessedCandidate=e,e.f\u003c(this.bestCandidate?.f??1/0)\u0026\u0026(this.bestCandidate=e,this.iterationsSinceImprovement=0),this.getNeighbors(e).forEach(n=\u003e{this.queuedOrExploredCandidatePointModificationHashes.has(n.candidateHash)||(this.queuedOrExploredCandidatePointModificationHashes.add(n.candidateHash),this.candidates.push(n))}),this.candidates.sort((n,o)=\u003en.f-o.f),this.candidates.length=Math.min(this.candidates.length,this.MAX_CANDIDATES)):this.solved=!0}visualize(){const e={points:[],lines:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Unravel Section Solver\"};let n=null;if(n=this.selectedCandidateIndex!==null?this.selectedCandidateIndex===\"best\"?this.bestCandidate:this.selectedCandidateIndex===\"original\"?this.originalCandidate:this.candidates[this.selectedCandidateIndex]:this.solved?this.bestCandidate:this.lastProcessedCandidate||this.candidates[0],!n)return e;const o=new Map;for(const[r,s]of this.unravelSection.segmentPointMap){const a={...s},A=n.pointModifications.get(r);A\u0026\u0026(A.x!==void 0\u0026\u0026(a.x=A.x),A.y!==void 0\u0026\u0026(a.y=A.y),A.z!==void 0\u0026\u0026(a.z=A.z)),o.set(r,a)}for(const[r,s]of o)e.points.push({x:s.x,y:s.y,label:`${r}\nSegment: ${s.segmentId} ${this.unravelSection.mutableSegmentIds.has(s.segmentId)?\"MUTABLE\":\"IMMUTABLE\"}\nLayer: ${s.z}`,color:this.colorMap[s.connectionName]||\"#000\"});const i=new Map;for(const r of this.unravelSection.allNodeIds)i.set(r,{numTransitionCrossings:0,numSameLayerCrossings:0,numEntryExitLayerChanges:0,estPf:0});for(const r of n.issues){const s=i.get(r.capacityMeshNodeId);r.type===\"transition_via\"?s.numTransitionCrossings++:r.type===\"same_layer_crossing\"?s.numSameLayerCrossings++:r.type!==\"double_transition_crossing\"\u0026\u0026r.type!==\"single_transition_crossing\"||s.numEntryExitLayerChanges++}for(const[r,s]of i.entries()){const a=this.nodeMap.get(r);s.estPf=wy(a,s.numSameLayerCrossings,s.numEntryExitLayerChanges,s.numTransitionCrossings)}for(const r of this.unravelSection.allNodeIds){const s=this.nodeMap.get(r),a=this.unravelSection.mutableNodeIds.includes(r),A=i.get(r),c=[`${r} (${a?\"MUT\":\"IMM\"})`,`${s.width.toFixed(2)}x${s.height.toFixed(2)}`,`Pf: ${A.estPf.toFixed(3)}`,`TC: ${A.numTransitionCrossings}`,`SLC: ${A.numSameLayerCrossings}`,`EELC: ${A.numEntryExitLayerChanges}`].join(`\n`);e.rects.push({center:s.center,label:c,color:a?\"green\":\"red\",width:s.width/8,height:s.height/8})}for(const[r,s]of this.unravelSection.segmentPointsInSegment){if(s.length\u003c=1)continue;const a=s.map(A=\u003eo.get(A));for(let A=0;A\u003ca.length-1;A++)e.lines.push({points:[{x:a[A].x,y:a[A].y},{x:a[A+1].x,y:a[A+1].y}],strokeColor:this.colorMap[r]||\"#000\"})}for(const[r,s]of o)for(const a of s.directlyConnectedSegmentPointIds)if(r\u003ca){const A=o.get(a);if(!A)continue;const c=s.z===A.z,l=s.z;let u;u=c?l===0?void 0:\"10 5\":\"3 3 10\",e.lines.push({points:[{x:s.x,y:s.y},{x:A.x,y:A.y}],strokeDash:u,strokeColor:this.colorMap[s.connectionName]||\"#000\"})}for(const r of n.issues){const s=this.nodeMap.get(r.capacityMeshNodeId);if(r.type===\"transition_via\")for(const a of r.segmentPoints){const A=o.get(a);e.circles.push({center:{x:A.x,y:A.y},radius:s.width/16,stroke:\"#ff0000\",fill:\"rgba(255, 0, 0, 0.2)\",label:`Via Issue\n${a}\nLayer: ${A.z}`})}else if(r.type===\"same_layer_crossing\")for(const[a,A]of[r.crossingLine1,r.crossingLine2]){const c=o.get(a),l=o.get(A);e.lines.push({points:[{x:c.x,y:c.y},{x:l.x,y:l.y}],strokeColor:\"rgba(255,0,0,0.2)\",strokeWidth:s.width/32})}}for(const[r,s]of n.pointModifications){const a=o.get(r),A=this.unravelSection.segmentPointMap.get(r);e.circles.push({center:{x:a.x,y:a.y},radius:.05,stroke:\"#0000ff\",fill:\"rgba(0, 0, 255, 0.2)\",label:`${r}\nOriginal: (${A.x.toFixed(2)}, ${A.y.toFixed(2)}, ${A.z})\nNew: (${a.x.toFixed(2)}, ${a.y.toFixed(2)}, ${a.z})`})}return e}},pae=t=\u003e(Math.round(20*t)/20).toFixed(2),l1t=t=\u003e(Math.round(1e3*t)/1e3).toFixed(3);Lse();var KZn=class extends UZn{cacheHit=!1;cacheProvider;hasAttemptedToUseCache=!1;constructor(e){super(e),this.cacheProvider=e.cacheProvider===void 0?eXn():e.cacheProvider}_step(){!this.hasAttemptedToUseCache\u0026\u0026this.cacheProvider\u0026\u0026this.attemptToUseCacheSync()||(super._step(),(this.solved||this.failed)\u0026\u0026this.cacheProvider\u0026\u0026this.saveToCacheSync())}computeCacheKeyAndTransform(){const e=this.nodeMap.get(this.rootNodeId),n=r_t(-e.center.x,-e.center.y),o=new Map,i=new Map,r=new Map,s=new Map,a=new Map,A=new Map;let c=0,l=0,u=0;const g=[...this.unravelSection.allNodeIds].sort((I,C)=\u003e{const y=this.nodeMap.get(I),x=this.nodeMap.get(C);return y.center.x!==x.center.x?y.center.x-x.center.x:y.center.y-x.center.y});for(const I of g){const C=\"node_\"+c++;o.set(I,C),i.set(C,I)}const h=[...Array.from(this.unravelSection.segmentPointMap.entries()).sort(([,I],[,C])=\u003eI.x!==C.x?I.x-C.x:I.y-C.y).map(([I])=\u003eI)].sort();for(const I of h){const C=\"sp_\"+u++;a.set(I,C),A.set(C,I);const y=this.unravelSection.segmentPointMap.get(I).segmentId;if(!r.has(y)){const x=\"seg_\"+l++;r.set(y,x),s.set(x,y)}}const d={};for(const[I,C]of o.entries()){const y=this.nodeMap.get(I),x=i_t(n,y.center);d[C]={width:y.width,height:y.height,availableZ:y.availableZ,center:{x:pae(x.x),y:pae(x.y)}}}const p={};for(const[I,C]of a.entries()){const y=this.unravelSection.segmentPointMap.get(I),x=i_t(n,{x:y.x,y:y.y});p[C]={x:pae(x.x),y:pae(x.y),z:y.z}}const m={hyperParameters:this.hyperParameters,normalizedNodes:d,normalizedSegmentPoints:p,mutableHops:this.MUTABLE_HOPS},_=`unravelsec:${$9e(m)}`,f={realToCacheTransform:n,nodeIdMap:o,segmentIdMap:r,segmentPointIdMap:a,reverseNodeIdMap:i,reverseSegmentIdMap:s,reverseSegmentPointIdMap:A};return this.cacheKey=_,this.cacheToSolveSpaceTransform=f,{cacheKey:_,cacheToSolveSpaceTransform:f}}applyCachedSolution(e){if(e.success===!1)return void(this.failed=!0);if(!this.cacheToSolveSpaceTransform)return void console.error(\"Cache transform not available to apply cached solution.\");const{reverseSegmentPointIdMap:n,reverseNodeIdMap:o}=this.cacheToSolveSpaceTransform,i=new Map;for(const[s,a]of e.bestCandidatePointModificationsDelta){const A=n.get(s);if(!A){console.warn(`Could not find original ID for normalized SP ID: ${s} when applying cache.`);continue}const c=this.unravelSection.segmentPointMap.get(A);if(!c){console.warn(`Could not find original segment point for ID: ${A} when applying cache.`);continue}const l={};if(a.dx!==void 0){const u=parseFloat(a.dx);Number.isNaN(u)?console.warn(`Failed to parse cached dx coordinate: ${a.dx}`):l.x=c.x+u}if(a.dy!==void 0){const u=parseFloat(a.dy);Number.isNaN(u)?console.warn(`Failed to parse cached dy coordinate: ${a.dy}`):l.y=c.y+u}a.dz!==void 0\u0026\u0026(l.z=c.z+a.dz),Object.keys(l).length\u003e0\u0026\u0026i.set(A,l)}const r=hae(this.unravelSection,this.nodeMap,i);this.bestCandidate={pointModifications:i,issues:r,f:e.bestCandidateF,g:e.bestCandidateF,h:0,operationsPerformed:-1,candidateHash:a6e(i)},this.cacheHit=!0,this.solved=!0}attemptToUseCacheSync(){if(this.hasAttemptedToUseCache=!0,!this.cacheProvider?.isSyncCache)return console.log(\"Cache provider is not synchronous, skipping sync cache check.\"),!1;if(this.cacheKey||this.computeCacheKeyAndTransform(),!this.cacheKey)return console.error(\"Failed to compute cache key.\"),!1;try{const e=this.cacheProvider.getCachedSolutionSync(this.cacheKey);if(e)return this.applyCachedSolution(e),!0}catch(e){console.error(\"Error attempting to use cache:\",e)}return!1}saveToCacheSync(){if(this.failed)return void this.cacheProvider?.setCachedSolutionSync(this.cacheKey,{success:!1});if(!this.bestCandidate)return;const{segmentPointIdMap:e}=this.cacheToSolveSpaceTransform,n=[];for(const[i,r]of this.bestCandidate.pointModifications.entries()){const s=e.get(i);if(!s){console.warn(`Could not find normalized ID for original SP ID: ${i} when saving to cache.`);continue}const a=this.unravelSection.segmentPointMap.get(i);if(!a){console.warn(`Could not find original segment point for ID: ${i} when saving cache.`);continue}const A={};let c=!1;if(r.x!==void 0){const l=r.x-a.x,u=l1t(l);parseFloat(u)!==0\u0026\u0026(A.dx=u,c=!0)}if(r.y!==void 0){const l=r.y-a.y,u=l1t(l);parseFloat(u)!==0\u0026\u0026(A.dy=u,c=!0)}if(r.z!==void 0){const l=r.z-a.z;l!==0\u0026\u0026(A.dz=l,c=!0)}c\u0026\u0026n.push([s,A])}const o={success:!0,bestCandidatePointModificationsDelta:n,bestCandidateF:this.bestCandidate.f};this.cacheProvider?.setCachedSolutionSync(this.cacheKey,o)}},VZn=class extends yr{getSolverName(){return\"UnravelMultiSectionSolver\"}nodeMap;dedupedSegmentMap;dedupedSegments;nodeIdToSegmentIds;segmentIdToNodeIds;nodeToSegmentPointMap;segmentToSegmentPointMap;colorMap;tunedNodeCapacityMap;MAX_NODE_ATTEMPTS=2;MUTABLE_HOPS=1;ACCEPTABLE_PF=.05;MAX_ITERATIONS_WITHOUT_IMPROVEMENT=200;nodePfMap;attemptsToFixNode;activeSubSolver=null;segmentPointMap;cacheProvider=null;constructor({assignedSegments:e,colorMap:n,nodes:o,cacheProvider:i}){super(),this.stats.successfulOptimizations=0,this.stats.failedOptimizations=0,this.stats.cacheHits=0,this.stats.cacheMisses=0,this.cacheProvider=i??null,this.MAX_ITERATIONS=1e6,this.dedupedSegments=(A=\u003e{const c=[],l=new Map;let u=-1;for(const g of A){const h=`${g.start.x}-${g.start.y}-${g.end.x}-${g.end.y}-${g.availableZ.join(\",\")}`,d=l.get(h);d?g.nodePortSegmentId=d.nodePortSegmentId:(u++,g.nodePortSegmentId=`SEG${u}`,l.set(h,g),c.push(g))}return c})(e),this.dedupedSegmentMap=new Map;for(const A of this.dedupedSegments)this.dedupedSegmentMap.set(A.nodePortSegmentId,A);this.nodeMap=new Map;for(const A of o)this.nodeMap.set(A.capacityMeshNodeId,A);this.nodeIdToSegmentIds=new Map,this.segmentIdToNodeIds=new Map,this.attemptsToFixNode=new Map;for(const A of e)this.segmentIdToNodeIds.set(A.nodePortSegmentId,[...this.segmentIdToNodeIds.get(A.nodePortSegmentId)??[],A.capacityMeshNodeId]),this.nodeIdToSegmentIds.set(A.capacityMeshNodeId,[...this.nodeIdToSegmentIds.get(A.capacityMeshNodeId)??[],A.nodePortSegmentId]);this.colorMap=n??{},this.tunedNodeCapacityMap=new Map;for(const[A,c]of this.nodeMap)this.tunedNodeCapacityMap.set(A,l7(c));const{segmentPointMap:r,nodeToSegmentPointMap:s,segmentToSegmentPointMap:a}=c1t(this.dedupedSegments,this.segmentIdToNodeIds);this.segmentPointMap=r,this.nodeToSegmentPointMap=s,this.segmentToSegmentPointMap=a,this.nodePfMap=this.computeInitialPfMap()}computeInitialPfMap(){const e=new Map;for(const[n,o]of this.nodeMap.entries())e.set(n,this.computeNodePf(o));return e}computeNodePf(e){const{numSameLayerCrossings:n,numEntryExitLayerChanges:o,numTransitionCrossings:i}=(r=\u003e{let s=0,a=0,A=0;const c=new Map;for(const g of r)c.has(g.connectionName)||c.set(g.connectionName,[]),c.get(g.connectionName).push(g);const l=[],u=[];for(const[g,h]of c.entries()){if(h.length\u003c2)continue;const d=h[0];for(let p=1;p\u003ch.length;p++){const m=h[p],_={connectionName:g,z:d.z,points:[d,m]};d.z!==m.z?(a++,u.push({connectionName:g,points:[d,m]})):l.push(_)}}for(let g=0;g\u003cl.length;g++)for(let h=g+1;h\u003cl.length;h++){const d=l[g],p=l[h];d.z===p.z\u0026\u0026Uh(d.points[0],d.points[1],p.points[0],p.points[1])\u0026\u0026s++}for(let g=0;g\u003cu.length;g++)for(let h=g+1;h\u003cu.length;h++){const d=u[g],p=u[h];Uh(d.points[0],d.points[1],p.points[0],p.points[1])\u0026\u0026A++}for(let g=0;g\u003cu.length;g++)for(let h=0;h\u003cl.length;h++){const d=u[g],p=l[h];Uh(d.points[0],d.points[1],p.points[0],p.points[1])\u0026\u0026A++}return{numSameLayerCrossings:s,numEntryExitLayerChanges:a,numTransitionCrossings:A}})((this.nodeToSegmentPointMap.get(e.capacityMeshNodeId)??[]).map(r=\u003ethis.segmentPointMap.get(r)));return wy(e,n,o,i)}_step(){if(this.iterations\u003e=this.MAX_ITERATIONS-1)return void(this.solved=!0);if(!this.activeSubSolver){let i=null,r=0;for(const[s,a]of this.nodePfMap.entries())a*(1-(this.attemptsToFixNode.get(s)??0)/this.MAX_NODE_ATTEMPTS)\u003er\u0026\u0026(r=a,i=s);if(!i||r\u003cthis.ACCEPTABLE_PF)return void(this.solved=!0);this.attemptsToFixNode.set(i,(this.attemptsToFixNode.get(i)??0)+1),this.activeSubSolver=new KZn({dedupedSegments:this.dedupedSegments,dedupedSegmentMap:this.dedupedSegmentMap,nodeMap:this.nodeMap,nodeIdToSegmentIds:this.nodeIdToSegmentIds,segmentIdToNodeIds:this.segmentIdToNodeIds,colorMap:this.colorMap,rootNodeId:i,MUTABLE_HOPS:this.MUTABLE_HOPS,segmentPointMap:this.segmentPointMap,nodeToSegmentPointMap:this.nodeToSegmentPointMap,segmentToSegmentPointMap:this.segmentToSegmentPointMap,cacheProvider:this.cacheProvider})}this.activeSubSolver.step();const{bestCandidate:e,originalCandidate:n,lastProcessedCandidate:o}=this.activeSubSolver;if(this.activeSubSolver.failed)return this.stats.failedOptimizations+=1,void(this.activeSubSolver=null);if(this.activeSubSolver.solved){if(this.activeSubSolver.cacheHit?this.stats.cacheHits+=1:this.stats.cacheMisses+=1,e\u0026\u0026e.g\u003cn.g){this.stats.successfulOptimizations+=1;for(const[i,r]of e.pointModifications.entries()){const s=this.segmentPointMap.get(i);s.x=r.x??s.x,s.y=r.y??s.y,s.z=r.z??s.z}for(const i of this.activeSubSolver.unravelSection.allNodeIds)this.nodePfMap.set(i,this.computeNodePf(this.nodeMap.get(i)))}else this.stats.failedOptimizations+=1;this.activeSubSolver=null}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:\"Unravel Multi Section Solver\"};for(const[r,s]of this.nodeMap.entries()){const a=this.nodePfMap.get(r)||0,A=Math.min(a,1),c=`rgb(${Math.floor(255*A)}, ${Math.floor(255*(1-A))}, 0)`;(this.attemptsToFixNode.get(r)??0)===0\u0026\u0026A===0||e.rects.push({center:s.center,label:[r,`${s.width.toFixed(2)}x${s.height.toFixed(2)}`,`Pf: ${a.toFixed(3)}`].join(`\n`),color:c,width:s.width/8,height:s.height/8})}for(const r of this.segmentPointMap.values()){const s=this.dedupedSegmentMap.get(r.segmentId);e.points.push({x:r.x,y:r.y,label:[r.segmentPointId,r.segmentId,`z: ${r.z}`,`segment.availableZ: ${s?.availableZ.join(\",\")}`].join(`\n`),color:this.colorMap[r.connectionName]||\"#000\"})}const n=new Map;for(const r of this.segmentPointMap.values())n.has(r.segmentId)||n.set(r.segmentId,[]),n.get(r.segmentId).push(r);for(const[r,s]of n.entries()){if(s.length\u003c2)continue;const a=[...s].sort((A,c)=\u003eA.x!==c.x?A.x-c.x:A.y-c.y);for(let A=0;A\u003ca.length-1;A++)e.lines.push({points:[{x:a[A].x,y:a[A].y},{x:a[A+1].x,y:a[A+1].y}],strokeColor:this.colorMap[r]||\"#000\"})}const o=new Set,i=Array.from(this.segmentPointMap.values());for(let r=0;r\u003ci.length;r++){const s=i[r];for(let a=r+1;a\u003ci.length;a++){const A=i[a];if(!(s.connectionName!==A.connectionName||s.segmentId===A.segmentId)\u0026\u0026s.capacityMeshNodeIds.some(c=\u003eA.capacityMeshNodeIds.includes(c))){const c=`${s.segmentPointId}-${A.segmentPointId}`;if(o.has(c))continue;o.add(c);const l=s.z===A.z,u=s.z;let g;g=l?u===0?void 0:\"10 5\":\"3 3 10\",e.lines.push({points:[{x:s.x,y:s.y},{x:A.x,y:A.y}],strokeDash:g,strokeColor:this.colorMap[s.connectionName]||\"#666\"})}}}return e}getNodesWithPortPoints(){if(!this.solved)throw new Error(\"CapacitySegmentToPointSolver not solved, can't give port points yet\");const e=new Map;for(const n of this.dedupedSegments){const o=n.nodePortSegmentId;for(const i of this.segmentIdToNodeIds.get(o)){const r=this.nodeMap.get(i);e.has(i)||e.set(i,{capacityMeshNodeId:i,portPoints:[],center:r.center,width:r.width,height:r.height})}}for(const n of this.segmentPointMap.values())for(const o of n.capacityMeshNodeIds){const i=e.get(o);i\u0026\u0026i.portPoints.push({x:n.x,y:n.y,z:n.z,connectionName:n.connectionName,rootConnectionName:n.rootConnectionName})}return Array.from(e.values())}};function fx(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var zZn=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.srj=e,this.opts={...n},this.MAX_ITERATIONS=1e8,this.viaDiameter=om(e).padDiameter,this.minTraceWidth=e.minTraceWidth;const o=this.opts;if(o.capacityDepth===void 0){const i=e.bounds.maxX-e.bounds.minX,r=e.bounds.maxY-e.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.connMap=Jm(e),this.colorMap=Jf(e,this.connMap),this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return\"AutoroutingPipeline1_OriginalUnravel\"}netToPointPairsSolver;nodeSolver;nodeTargetMerger;edgeSolver;initialPathingSolver;pathingOptimizer;edgeToPortSegmentSolver;colorMap;segmentToPointSolver;unravelMultiSectionSolver;segmentToPointOptimizer;highDensityRouteSolver;highDensityStitchSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;viaDiameter;minTraceWidth;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[fx(\"netToPointPairsSolver\",rL,e=\u003e[e.srj,e.colorMap,JQ(e.srj)],{onSolved:e=\u003e{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,this.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),fx(\"nodeSolver\",vZn,e=\u003e[e.netToPointPairsSolver?.getNewSimpleRouteJson()||e.srj,e.opts],{onSolved:e=\u003e{e.capacityNodes=e.nodeSolver?.finishedNodes}}),fx(\"singleLayerNodeMerger\",OZn,e=\u003e[e.nodeSolver?.finishedNodes],{onSolved:e=\u003e{e.capacityNodes=e.singleLayerNodeMerger?.newNodes}}),fx(\"strawSolver\",GZn,e=\u003e[{nodes:e.singleLayerNodeMerger?.newNodes}],{onSolved:e=\u003e{e.capacityNodes=e.strawSolver?.getResultNodes()}}),fx(\"edgeSolver\",WQ,e=\u003e[e.capacityNodes],{onSolved:e=\u003e{e.capacityEdges=e.edgeSolver?.edges}}),fx(\"deadEndSolver\",LZn,e=\u003e[{nodes:e.capacityNodes,edges:e.capacityEdges}],{onSolved:e=\u003e{const n=e.deadEndSolver?.removedNodeIds;e.capacityNodes=e.capacityNodes.filter(o=\u003e!n.has(o.capacityMeshNodeId)),e.capacityEdges=e.capacityEdges.filter(o=\u003eo.nodeIds.every(i=\u003e!n.has(i)))}}),fx(\"initialPathingSolver\",r1t,e=\u003e[{simpleRouteJson:e.srjWithPointPairs,nodes:e.capacityNodes,edges:e.capacityEdges||[],colorMap:e.colorMap,hyperParameters:{MAX_CAPACITY_FACTOR:1}}]),fx(\"pathingOptimizer\",FZn,e=\u003e[{initialPathingSolver:e.initialPathingSolver,simpleRouteJson:e.srjWithPointPairs,nodes:e.capacityNodes,edges:e.capacityEdges||[],colorMap:e.colorMap,cacheProvider:e.cacheProvider,hyperParameters:{MAX_CAPACITY_FACTOR:1}}]),fx(\"edgeToPortSegmentSolver\",EZn,e=\u003e[{nodes:e.capacityNodes,edges:e.capacityEdges||[],capacityPaths:e.pathingOptimizer?.getCapacityPaths()||[],colorMap:e.colorMap}]),fx(\"segmentToPointSolver\",wZn,e=\u003e{const n=[];return e.edgeToPortSegmentSolver?.nodePortSegments\u0026\u0026e.edgeToPortSegmentSolver.nodePortSegments.forEach(o=\u003e{n.push(...o)}),[{segments:n,colorMap:e.colorMap,nodes:e.capacityNodes}]}),fx(\"unravelMultiSectionSolver\",VZn,e=\u003e[{assignedSegments:e.segmentToPointSolver?.solvedSegments||[],colorMap:e.colorMap,nodes:e.capacityNodes,cacheProvider:this.cacheProvider}]),fx(\"highDensityRouteSolver\",HD,e=\u003e[{nodePortPoints:e.unravelMultiSectionSolver?.getNodesWithPortPoints()??e.segmentToPointOptimizer?.getNodesWithPortPoints()??[],colorMap:e.colorMap,connMap:e.connMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth}]),fx(\"highDensityStitchSolver\",HZn,e=\u003e[{connections:e.srjWithPointPairs.connections,hdRoutes:e.highDensityRouteSolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter}]),fx(\"traceSimplificationSolver\",j8,e=\u003e[{hdRoutes:e.highDensityStitchSolver.mergedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();const e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeTargetMerger?.visualize(),i=this.singleLayerNodeMerger?.visualize(),r=this.strawSolver?.visualize(),s=this.edgeSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.initialPathingSolver?.visualize(),c=this.pathingOptimizer?.visualize(),l=this.edgeToPortSegmentSolver?.visualize(),u=this.segmentToPointSolver?.visualize(),g=this.unravelMultiSectionSolver?.visualize()??this.segmentToPointOptimizer?.visualize(),h=this.highDensityRouteSolver?.visualize(),d=this.highDensityStitchSolver?.visualize(),p=this.traceSimplificationSolver?.visualize(),m=this.srj.outline,_=[];if(_.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),m\u0026\u0026m.length\u003e=2){const y=m.map(x=\u003e({x:x.x,y:x.y}));y.push({...y[0]}),_.push({points:y,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const f=z8(this.srj),I={points:[...this.srj.connections.flatMap(y=\u003ey.pointsToConnect.map(x=\u003e({...x,layer:J8(x,this.srj.layerCount),label:`${y.name} ${x.pcb_port_id??\"\"}`})))],rects:[...(this.srj.obstacles??[]).filter(y=\u003e!y.isCopperPour).map(y=\u003e({...y,fill:y.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":y.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(y,this.srj.layerCount),label:f(y)}))],lines:_},C=[I,e,n,o,i,r,s,a,A,c,l,u,g,h?Il(I,h):null,d,p,this.solved?Il({lines:_},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...C)}preview(){if(this.highDensityRouteSolver){const e=[];for(let n=this.highDensityRouteSolver.routes.length-1;n\u003e=0;n--){const o=this.highDensityRouteSolver.routes[n];if(e.push({points:o.route.map(i=\u003e({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length\u003e200)break}return{lines:e}}if(this.pathingOptimizer){const e=[];for(const n of this.pathingOptimizer.connectionsWithNodes)n.path\u0026\u0026e.push({points:n.path.map(o=\u003e({x:o.center.x,y:o.center.y})),strokeColor:this.colorMap[n.connection.name]});return{lines:e}}return this.netToPointPairsSolver?this.netToPointPairsSolver?.visualize():{}}_getOutputHdRoutes(){return this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error(\"Cannot get output before solving is complete\");const e=[],n=this._getOutputHdRoutes();for(const o of this.netToPointPairsSolver?.newConnections??[]){const i=o.__netConnectionName??this.srj.connections.find(s=\u003es.name===o.name)?.__netConnectionName,r=n.filter(s=\u003es.connectionName===o.name);for(let s=0;s\u003cr.length;s++){const a=r[s],A={type:\"pcb_trace\",pcb_trace_id:`${o.name}_${s}`,connection_name:i??o.__rootConnectionNames?.[0]??o.name,route:nB(a,this.srj.layerCount)};e.push(A)}}return e}getOutputSimpleRouteJson(){return{...this.srj,traces:this.getOutputSimplifiedPcbTraces()}}};function mae(t){const{pos:e,segments:n,dir:o,keepoutRadius:i}=t;let r=1/0;const s=i/4,a={x:e.x-o.x*s,y:e.y-o.y*s},A={x:e.x+o.x*s,y:e.y+o.y*s};for(const c of n){const l=M5(a,A,c.start,c.end);r=Math.min(r,l)}return r}function JZn(t,e,n,o){const i=_ae(n,o,t),r=_ae(n,o,e),s=_ae(t,e,n),a=_ae(t,e,o);if((i\u003e0\u0026\u0026r\u003c0||i\u003c0\u0026\u0026r\u003e0)\u0026\u0026(s\u003e0\u0026\u0026a\u003c0||s\u003c0\u0026\u0026a\u003e0))return!0;const A=1e-4;return!!(Math.abs(i)\u003cA\u0026\u0026fae(n,o,t))||!!(Math.abs(r)\u003cA\u0026\u0026fae(n,o,e))||!!(Math.abs(s)\u003cA\u0026\u0026fae(t,e,n))||!!(Math.abs(a)\u003cA\u0026\u0026fae(t,e,o))}function _ae(t,e,n){return(n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y)}function fae(t,e,n){return n.x\u003e=Math.min(t.x,e.x)-1e-4\u0026\u0026n.x\u003c=Math.max(t.x,e.x)+1e-4\u0026\u0026n.y\u003e=Math.min(t.y,e.y)-1e-4\u0026\u0026n.y\u003c=Math.max(t.y,e.y)+1e-4}function A6e(t,e,n){for(const o of n)if(JZn(t,e,o.start,o.end))return!1;return!0}var XQ=1e-4;function c6e(t){const e=t.width/2,n=t.height/2,o=t.center.x,i=t.center.y,r={x:o-e,y:i+n},s={x:o+e,y:i+n},a={x:o-e,y:i-n},A={x:o+e,y:i-n};return[{start:r,end:s},{start:s,end:A},{start:A,end:a},{start:a,end:r}]}function WZn(t,e,n=.1){const o=e.x-t.x,i=e.y-t.y,r=Math.sqrt(o*o+i*i);if(r===0)return[];const s=-(i/r),a=o/r,A=n/2;return[{start:{x:t.x+s*A,y:t.y+a*A},end:{x:e.x+s*A,y:e.y+a*A}},{start:{x:t.x-s*A,y:t.y-a*A},end:{x:e.x-s*A,y:e.y-a*A}}]}function jZn(t,e,n){const o=Math.hypot(t.start.x-e.x,t.start.y-e.y),i=Math.hypot(t.end.x-e.x,t.end.y-e.y);if(o\u003c=n||i\u003c=n)return!0;const r=t.end.x-t.start.x,s=t.end.y-t.start.y,a=r*r+s*s;if(a===0)return!1;const A=Math.max(0,Math.min(1,((e.x-t.start.x)*r+(e.y-t.start.y)*s)/a)),c=t.start.x+A*r,l=t.start.y+A*s;return Math.hypot(c-e.x,l-e.y)\u003c=n}function $Zn(t,e,n){if(!n||n.length===0)return!1;for(const o of n){const i=Math.abs(t.x-o.start.x)\u003cXQ\u0026\u0026Math.abs(t.y-o.start.y)\u003cXQ\u0026\u0026Math.abs(e.x-o.end.x)\u003cXQ\u0026\u0026Math.abs(e.y-o.end.y)\u003cXQ,r=Math.abs(t.x-o.end.x)\u003cXQ\u0026\u0026Math.abs(t.y-o.end.y)\u003cXQ\u0026\u0026Math.abs(e.x-o.start.x)\u003cXQ\u0026\u0026Math.abs(e.y-o.start.y)\u003cXQ;if(i||r)return!0}return!1}function qZn(t,e,n,o,i){const r=[];for(let s=0;s\u003ct.length-1;s++){const a=t[s],A=t[s+1];$Zn(a,A,i)||jZn({start:a,end:A},n,o+e)\u0026\u0026r.push(...WZn(a,A,e))}return r}var Iae=1e-4;function XZn(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=o.x-n.x,a=o.y-n.y,A=i*a-r*s;if(Math.abs(A)\u003c1e-10)return null;const c=n.x-t.x,l=n.y-t.y,u=(c*a-l*s)/A,g=(c*r-l*i)/A,h=1e-6;return u\u003eh\u0026\u0026u\u003c.999999\u0026\u0026g\u003eh\u0026\u0026g\u003c.999999?{x:t.x+u*i,y:t.y+u*r}:null}function ZZn(t,e){if(!e||e.length===0)return!1;for(const n of e)if(Math.abs(t.x-n.start.x)\u003cIae\u0026\u0026Math.abs(t.y-n.start.y)\u003cIae||Math.abs(t.x-n.end.x)\u003cIae\u0026\u0026Math.abs(t.y-n.end.y)\u003cIae)return!0;return!1}function eeo(t,e,n,o){if(!o||o.length===0)return!1;for(let i=e;i\u003c=n;i++)if(i\u003e=0\u0026\u0026i\u003ct.length\u0026\u0026ZZn(t[i],o))return!0;return!1}var W3=1e-4,u1t=class extends yr{constructor(e){super(),this.input=e;const n=e.srj?.layerCount??2;this.input={...e,obstacles:c7(e.obstacles,n)},this.MAX_ITERATIONS=1e6,this.originalHdRoutes=[...this.input.hdRoutes],this.hdRoutes=this.input.hdRoutes,this.KEEPOUT_RADIUS_SCHEDULE=e.keepoutRadiusSchedule??[.3,.5,.5],this.currentKeepoutRadius=this.KEEPOUT_RADIUS_SCHEDULE[0]??.15,this.unprocessedRoutes=[...this.hdRoutes],this.smoothedCursorRoutes=[...this.unprocessedRoutes];const o=[...this.input.obstacles,...this.getJumperPadObstacles()];this.obstacleSHI=new OD(\"flatbush\",o),this.boardOutlineRoutes=this.createBoardOutlineRoutes(),this.hdRouteSHI=new oB([...this.hdRoutes,...this.boardOutlineRoutes]);for(const[i,r,s]of this.hdRoutes.flatMap(a=\u003e[[a.route[0],a.connectionName,a.rootConnectionName],[a.route[a.route.length-1],a.connectionName,a.rootConnectionName]])){const a=this.obstacleSHI.searchArea(i.x,i.y,.01,.01).filter(c=\u003ec.__zLayers?.includes(i.z));if(a.length===0)continue;const A=a[0];this.input.connMap.addConnections([[r,s,...A.offBoardConnectsTo??[],A.obstacleId,...A.connectedTo].filter(Boolean)])}}input;getSolverName(){return\"TraceKeepoutSolver\"}originalHdRoutes;hdRoutes;redrawnHdRoutes=[];KEEPOUT_RADIUS_SCHEDULE;currentScheduleIndex=0;currentKeepoutRadius;unprocessedRoutes=[];smoothedCursorRoutes=[];processedRoutes=[];currentTrace=null;cursorPosition=null;lastCursorPosition=null;drawPosition=null;currentTraceSegmentIndex=0;currentTraceSegmentT=0;recordedDrawPositions=[];lastCollidingSegments=[];currentTraceJumperSegments=new Map;obstacleSHI;hdRouteSHI;boardOutlineRoutes=[];getSmoothDistance(){return this.currentKeepoutRadius}getJumperPadObstacles(){const e=[];if(!this.input.jumpers)return e;for(const n of this.input.jumpers)for(const o of n.pads)e.push({...o,__zLayers:[0]});return e}buildJumperSegmentMap(e){const n=new Map;if(!e.jumpers||e.jumpers.length===0)return n;const o=e.route;for(const i of e.jumpers){let r=-1,s=1/0;for(let a=0;a\u003co.length-1;a++){const A=o[a],c=o[a+1],l=Math.sqrt((A.x-i.start.x)**2+(A.y-i.start.y)**2),u=Math.sqrt((c.x-i.end.x)**2+(c.y-i.end.y)**2),g=l+u,h=Math.sqrt((A.x-i.end.x)**2+(A.y-i.end.y)**2),d=Math.sqrt((c.x-i.start.x)**2+(c.y-i.start.y)**2),p=h+d,m=Math.min(g,p);(g\u003c=p?l:h)\u003c1\u0026\u0026(g\u003c=p?u:d)\u003c1\u0026\u0026m\u003cs\u0026\u0026(s=m,r=a)}r\u003e=0\u0026\u0026n.set(r,i)}return n}_step(){if(!this.currentTrace){const r=this.unprocessedRoutes.shift();if(!r)return this.currentScheduleIndex++,this.currentScheduleIndex\u003cthis.KEEPOUT_RADIUS_SCHEDULE.length?(this.currentKeepoutRadius=this.KEEPOUT_RADIUS_SCHEDULE[this.currentScheduleIndex],this.unprocessedRoutes=D5([...this.processedRoutes],this.currentScheduleIndex),this.smoothedCursorRoutes=[...this.unprocessedRoutes],this.processedRoutes=[],void(this.hdRouteSHI=new oB([...this.unprocessedRoutes,...this.boardOutlineRoutes]))):(this.redrawnHdRoutes=this.processedRoutes,void(this.solved=!0));if(this.currentTrace=r,this.currentTrace.route.length\u003c2)return this.processedRoutes.push(this.currentTrace),void(this.currentTrace=null);this.currentTraceJumperSegments=this.buildJumperSegmentMap(this.currentTrace);const s=this.currentTrace.route[0];return this.cursorPosition={...s},this.lastCursorPosition={...s},this.drawPosition={x:s.x,y:s.y},this.currentTraceSegmentIndex=0,this.currentTraceSegmentT=0,void(this.recordedDrawPositions=[{...s}])}this.lastCursorPosition={...this.cursorPosition};const e=this.stepCursorForward();if(e===\"end\")return void this.finalizeCurrentTrace();if(e===\"jumper\")return void(this.drawPosition={x:this.cursorPosition.x,y:this.cursorPosition.y});const n=this.getCollidingSegments(this.cursorPosition);this.lastCollidingSegments=n;const o=(function(r){const{cursorPosition:s,lastCursorPosition:a,collidingSegments:A,keepoutRadius:c}=r;if(A.length===0)return null;const l=1e-4,u=s.x-a.x,g=s.y-a.y,h=Math.sqrt(u*u+g*g),d=h\u003el?{x:u/h,y:g/h}:{x:1,y:0},p=-d.y,m=d.x,_=mae({pos:s,segments:A,dir:d,keepoutRadius:c});if(_\u003e=c)return null;for(let F=1;F\u003c=20;F++){const O=F/20*c,U={x:s.x+p*O,y:s.y+m*O},Y=mae({pos:U,segments:A,dir:d,keepoutRadius:c}),W={x:s.x-p*O,y:s.y-m*O},te=mae({pos:W,segments:A,dir:d,keepoutRadius:c}),j=Y\u003e=c\u0026\u0026A6e(s,U,A),J=te\u003e=c\u0026\u0026A6e(s,W,A);if(j\u0026\u0026J)return Y\u003e=te?U:W;if(j)return U;if(J)return W}const f=c,I=[];for(let F=-60;F\u003c=60;F++){const O=F/60*f,U={x:s.x+p*O,y:s.y+m*O},Y=mae({pos:U,segments:A,dir:d,keepoutRadius:c}),W=A6e(s,U,A);I.push({pos:U,clearance:Y,dist:Math.abs(O),pathClear:W,index:F})}const C=I.filter(F=\u003eF.pathClear),y=I.findIndex(F=\u003eF.index===0),x=y\u003e=0?y:Math.floor(I.length/2);let E=null;for(let F=x+1;F\u003cI.length-1;F++){const O=I[F-1],U=I[F],Y=I[F+1];if(U.clearance\u003e=O.clearance\u0026\u0026U.clearance\u003e=Y.clearance){E=U;break}}let B=null;for(let F=x-1;F\u003e0;F--){const O=I[F-1],U=I[F],Y=I[F+1];if(U.clearance\u003e=O.clearance\u0026\u0026U.clearance\u003e=Y.clearance){B=U;break}}let S=null,Q=null;if(C.length\u003e0){const F=C.findIndex(U=\u003eU.index===0),O=F\u003e=0?F:Math.floor(C.length/2);for(let U=O+1;U\u003cC.length-1;U++){const Y=C[U-1],W=C[U],te=C[U+1];if(W.clearance\u003e=Y.clearance\u0026\u0026W.clearance\u003e=te.clearance){S=W;break}}for(let U=O-1;U\u003e0;U--){const Y=C[U-1],W=C[U],te=C[U+1];if(W.clearance\u003e=Y.clearance\u0026\u0026W.clearance\u003e=te.clearance){Q=W;break}}}const w=[E,B,S,Q,I.find(F=\u003eF.index===0)].filter(F=\u003eF!=null),M=new Set,k=w.filter(F=\u003e{const O=`${F.pos.x.toFixed(6)},${F.pos.y.toFixed(6)}`;return!M.has(O)\u0026\u0026(M.add(O),!0)});if(k.length===0){let F=I[0];if(!F)return null;for(const O of I)O.clearance\u003eF.clearance\u0026\u0026(F=O);return Math.sqrt((F.pos.x-s.x)**2+(F.pos.y-s.y)**2)\u003el?F.pos:null}let R;if(_\u003c.15*c){R=k[0];for(const F of k)F.clearance\u003eR.clearance\u0026\u0026(R=F)}else{const F=k.filter(U=\u003eU.pathClear),O=F.length\u003e0?F:k;R=O[0];for(const U of O)U.clearance\u003eR.clearance\u0026\u0026(R=U)}return Math.sqrt((R.pos.x-s.x)**2+(R.pos.y-s.y)**2)\u003el?R.pos:null})({cursorPosition:this.cursorPosition,lastCursorPosition:this.lastCursorPosition,collidingSegments:n,keepoutRadius:this.currentKeepoutRadius});this.drawPosition=o??{...this.cursorPosition};const i=this.recordedDrawPositions[this.recordedDrawPositions.length-1];if(i\u0026\u0026this.drawPosition){const r={x:i.x,y:i.y,z:i.z},s={x:this.drawPosition.x,y:this.drawPosition.y,z:this.cursorPosition.z};this.segmentIntersectsOtherRoutes(r,s)\u0026\u0026(this.drawPosition={...this.cursorPosition})}this.recordedDrawPositions.push({x:this.drawPosition.x,y:this.drawPosition.y,z:this.cursorPosition.z})}getStepDistance(){return this.currentKeepoutRadius/2}getJumperAtCurrentSegmentStart(){return this.currentTraceSegmentT\u003eW3?null:this.currentTraceJumperSegments.get(this.currentTraceSegmentIndex)??null}stepCursorForward(){if(!this.currentTrace||!this.cursorPosition)return\"end\";const e=this.currentTrace.route;let n=this.getStepDistance();for(;n\u003e0;){if(this.currentTraceSegmentIndex\u003e=e.length-1)return\"end\";const o=this.getJumperAtCurrentSegmentStart();if(o){const u=e[this.currentTraceSegmentIndex],g=e[this.currentTraceSegmentIndex+1],h=Math.sqrt((u.x-o.start.x)**2+(u.y-o.start.y)**2),d=Math.sqrt((u.x-o.end.x)**2+(u.y-o.end.y)**2),p=h\u003c=d?o.start:o.end,m=h\u003c=d?o.end:o.start;return this.recordedDrawPositions.push({x:p.x,y:p.y,z:u.z,insideJumperPad:!0}),this.recordedDrawPositions.push({x:m.x,y:m.y,z:g.z,insideJumperPad:!0}),this.cursorPosition={x:m.x,y:m.y,z:g.z},this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0,\"jumper\"}const i=e[this.currentTraceSegmentIndex],r=e[this.currentTraceSegmentIndex+1],s=r.x-i.x,a=r.y-i.y,A=Math.sqrt(s*s+a*a);if(A===0){this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0;continue}const c=this.currentTraceSegmentT*A,l=A-c;if(n\u003c=l){const u=c+n;return this.currentTraceSegmentT=u/A,this.cursorPosition={x:i.x+s*this.currentTraceSegmentT,y:i.y+a*this.currentTraceSegmentT,z:i.z},\"stepped\"}if(n-=l,this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0,this.currentTraceSegmentIndex\u003e=e.length-1){const u=e[e.length-1];return this.cursorPosition={...u},\"end\"}}return\"stepped\"}getCollidingSegments(e){if(!this.currentTrace)return[];const n=this.currentTrace.rootConnectionName??this.currentTrace.connectionName,o=2*this.currentKeepoutRadius,i=[],r=this.obstacleSHI.searchArea(e.x,e.y,o,o).filter(a=\u003ea.__zLayers?.includes(e.z));for(const a of r){if(a.__zLayers\u0026\u0026!a.__zLayers.includes(e.z)||a.connectedTo.includes(n)||a.obstacleId\u0026\u0026this.input.connMap.areIdsConnected(n,a.obstacleId))continue;let A=!1;for(const c of a.connectedTo)if(this.input.connMap.areIdsConnected(n,c)){A=!0;break}A||i.push(...c6e(a))}const s=this.hdRouteSHI.getConflictingRoutesNearPoint({x:e.x,y:e.y,z:e.z},o);for(const{conflictingRoute:a}of s){const A=a.rootConnectionName??a.connectionName;if(A===n||this.input.connMap.areIdsConnected(n,A))continue;const c=a.traceThickness??.15;i.push(...qZn(a.route,c,{x:e.x,y:e.y},o,a.jumpers))}return i}positionHasCollision(e,n=0){const o=this.getCollidingSegments(e);for(const i of o)if(wc(e,i.start,i.end)\u003c=this.currentKeepoutRadius+n)return!0;return!1}segmentIntersectsOtherRoutes(e,n){if(!this.currentTrace)return!1;const o=this.currentTrace.rootConnectionName??this.currentTrace.connectionName,i=[...this.unprocessedRoutes,...this.smoothedCursorRoutes,...this.processedRoutes];for(const r of i)if((r.rootConnectionName??r.connectionName)!==o)for(let s=0;s\u003cr.route.length-1;s++){const a=r.route[s],A=r.route[s+1];if((a.z===e.z||A.z===e.z)\u0026\u0026(!a.insideJumperPad||!A.insideJumperPad)\u0026\u0026Uh({x:e.x,y:e.y},{x:n.x,y:n.y},{x:a.x,y:a.y},{x:A.x,y:A.y}))return!0}return!1}finalizeCurrentTrace(){if(!this.currentTrace)return;const e=this.currentTrace.route[this.currentTrace.route.length-1],n=this.recordedDrawPositions[this.recordedDrawPositions.length-1];n\u0026\u0026n.x===e.x\u0026\u0026n.y===e.y||this.recordedDrawPositions.push({...e});const o=(function(r,s){if(r.length\u003c4)return r;let a=[...r],A=!0;for(;A;){A=!1;for(let c=0;c\u003ca.length-1\u0026\u0026!A;c++){const l=a[c],u=a[c+1];if(l.z===u.z)for(let g=c+2;g\u003ca.length-1\u0026\u0026!A;g++){if(g===c+1)continue;const h=a[g],d=a[g+1];if(h.z!==d.z||l.z!==h.z)continue;const p=XZn(l,u,h,d);if(p){if(eeo(a,c+1,g,s))continue;const m=[];for(let _=0;_\u003c=c;_++)m.push(a[_]);m.push({x:p.x,y:p.y,z:l.z});for(let _=g+1;_\u003ca.length;_++)m.push(a[_]);a=m,A=!0}}}}return a})(this.simplifyRoute(this.recordedDrawPositions,this.currentTrace.jumpers),this.currentTrace.jumpers),i={connectionName:this.currentTrace.connectionName,rootConnectionName:this.currentTrace.rootConnectionName,traceThickness:this.currentTrace.traceThickness,viaDiameter:this.currentTrace.viaDiameter,route:o,vias:[...this.currentTrace.vias],jumpers:this.currentTrace.jumpers};this.processedRoutes.push(i),this.hdRouteSHI.removeRoute(this.currentTrace.connectionName),this.hdRouteSHI.addRoute(i),this.currentTrace=null,this.cursorPosition=null,this.lastCursorPosition=null,this.drawPosition=null,this.recordedDrawPositions=[]}isJumperEndpoint(e,n){if(!n||n.length===0)return!1;for(const o of n)if(Math.abs(e.x-o.start.x)\u003cW3\u0026\u0026Math.abs(e.y-o.start.y)\u003cW3||Math.abs(e.x-o.end.x)\u003cW3\u0026\u0026Math.abs(e.y-o.end.y)\u003cW3)return!0;return!1}simplifyRoute(e,n){if(e.length\u003c=2)return e;const o=[e[0]];for(let i=1;i\u003ce.length-1;i++){const r=o[o.length-1],s=e[i],a=e[i+1];if(this.isJumperEndpoint(s,n)){o.push(s);continue}if(s.z!==r.z||s.z!==a.z){o.push(s);continue}const A=s.x-r.x,c=s.y-r.y,l=a.x-s.x,u=A*(a.y-s.y)-c*l;Math.abs(u)\u003e1e-6\u0026\u0026o.push(s)}return o.push(e[e.length-1]),o}createBoardOutlineRoutes(){const e=[];if(!this.input.srj)return e;const{outline:n,bounds:o}=this.input.srj;let i;i=n\u0026\u0026n.length\u003e=3?n:[{x:o.minX,y:o.minY},{x:o.maxX,y:o.minY},{x:o.maxX,y:o.maxY},{x:o.minX,y:o.maxY}];const r=this.input.srj.layerCount??2;for(let s=0;s\u003ci.length;s++){const a=i[s],A=i[(s+1)%i.length];for(let c=0;c\u003cr;c++)e.push({connectionName:`__board_outline___${s}_z${c}`,traceThickness:.01,viaDiameter:0,route:[{x:a.x,y:a.y,z:c},{x:A.x,y:A.y,z:c}],vias:[]})}return e}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:\"cartesian\",title:`Trace Keepout Solver (radius: ${this.currentKeepoutRadius.toFixed(2)})`};for(const n of this.originalHdRoutes)if(n.route.length!==0)for(let o=0;o\u003cn.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z\u0026\u0026e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:\"rgba(0,0,0,0.25)\",strokeWidth:1.5*(n.traceThickness??.15)})}if(this.input.jumpers)for(const n of this.input.jumpers){for(const o of n.pads){const i=o.connectedTo.length\u003e0?o.connectedTo.join(\", \"):\"unused\",r=o.connectedTo.length\u003e0?this.input.colorMap[o.connectedTo[0]]||\"#888888\":\"rgba(128, 128, 128, 0.5)\";e.rects.push({center:o.center,width:o.width,height:o.height,fill:r,stroke:\"rgba(0, 0, 0, 0.5)\",label:`Jumper pad (${i})`})}n.pads.length\u003e=2\u0026\u0026e.lines.push({points:[n.pads[0].center,n.pads[1].center],strokeColor:\"rgba(100, 100, 100, 0.8)\",strokeWidth:.2,label:\"Jumper body\"})}for(const n of this.input.obstacles){let o=\"rgba(128, 128, 128, 0.2)\";const i=n.__zLayers?.includes(0),r=n.__zLayers?.includes(1);i\u0026\u0026r?o=\"rgba(128, 0, 128, 0.2)\":i?o=\"rgba(255, 0, 0, 0.2)\":r\u0026\u0026(o=\"rgba(0, 0, 255, 0.2)\"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(\", \")})`})}if(this.input.srj){const{outline:n,bounds:o}=this.input.srj;let i;i=n\u0026\u0026n.length\u003e=3?n:[{x:o.minX,y:o.minY},{x:o.maxX,y:o.minY},{x:o.maxX,y:o.maxY},{x:o.minX,y:o.maxY}];for(let r=0;r\u003ci.length;r++){const s=i[r],a=i[(r+1)%i.length];e.lines.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:\"rgba(0, 128, 0, 0.6)\",strokeWidth:.1,label:\"Board outline\"})}}for(const n of this.processedRoutes){if(n.route.length===0)continue;const o=this.input.colorMap[n.connectionName]||\"#888888\",i=new Set;if(n.jumpers\u0026\u0026n.jumpers.length\u003e0)for(const r of n.jumpers)for(let s=0;s\u003cn.route.length-1;s++){const a=n.route[s],A=n.route[s+1],c=Math.abs(a.x-r.start.x)\u003cW3\u0026\u0026Math.abs(a.y-r.start.y)\u003cW3\u0026\u0026Math.abs(A.x-r.end.x)\u003cW3\u0026\u0026Math.abs(A.y-r.end.y)\u003cW3,l=Math.abs(a.x-r.end.x)\u003cW3\u0026\u0026Math.abs(a.y-r.end.y)\u003cW3\u0026\u0026Math.abs(A.x-r.start.x)\u003cW3\u0026\u0026Math.abs(A.y-r.start.y)\u003cW3;if(c||l){i.add(s);break}}for(let r=0;r\u003cn.route.length-1;r++){const s=n.route[r],a=n.route[r+1];i.has(r)?e.lines.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:\"rgba(128, 128, 128, 0.6)\",strokeDash:\"2 2\",label:`${n.connectionName} (jumper segment - fixed)`}):s.z===a.z\u0026\u0026e.lines.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:s.z===0?\"red\":\"blue\",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${s.z})`})}for(const r of n.vias)e.circles.push({center:{x:r.x,y:r.y},radius:n.viaDiameter/2,fill:\"rgba(255, 0, 255, 0.5)\",label:`${n.connectionName} via`});if(n.jumpers\u0026\u0026n.jumpers.length\u003e0){const r=_x(n.jumpers,{color:o,label:n.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}if(this.currentTrace\u0026\u0026this.recordedDrawPositions.length\u003e0){this.input.colorMap[this.currentTrace.connectionName];for(let n=0;n\u003cthis.recordedDrawPositions.length-1;n++){const o=this.recordedDrawPositions[n],i=this.recordedDrawPositions[n+1];e.lines.push({points:[{x:o.x,y:o.y},{x:i.x,y:i.y}],strokeColor:\"green\",strokeWidth:this.currentTrace.traceThickness})}if(this.cursorPosition\u0026\u0026(e.circles.push({center:{x:this.cursorPosition.x,y:this.cursorPosition.y},radius:this.currentKeepoutRadius,stroke:\"orange\",fill:\"none\"}),e.points.push({x:this.cursorPosition.x,y:this.cursorPosition.y,color:\"orange\",label:\"Cursor\"}),this.lastCursorPosition)){const n=this.cursorPosition.x-this.lastCursorPosition.x,o=this.cursorPosition.y-this.lastCursorPosition.y,i=Math.sqrt(n*n+o*o),r=i\u003e1e-4?{x:n/i,y:o/i}:{x:1,y:0},s=this.currentKeepoutRadius/4,a={x:this.cursorPosition.x-r.x*s,y:this.cursorPosition.y-r.y*s},A={x:this.cursorPosition.x+r.x*s,y:this.cursorPosition.y+r.y*s};e.lines.push({points:[a,A],strokeColor:\"cyan\",strokeWidth:.05,label:\"Projected segment\"})}this.drawPosition\u0026\u0026e.points.push({x:this.drawPosition.x,y:this.drawPosition.y,color:\"lime\",label:\"Draw\"});for(const n of this.lastCollidingSegments)e.lines.push({points:[{x:n.start.x,y:n.start.y},{x:n.end.x,y:n.end.y}],strokeColor:\"rgba(255, 0, 255, 0.8)\",strokeWidth:.02,label:\"Colliding segment\"})}if(!this.solved){for(const n of this.smoothedCursorRoutes)if(n.route.length!==0)for(let o=0;o\u003cn.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z\u0026\u0026e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:\"gray\"})}}return e}getRedrawnHdRoutes(){return this.redrawnHdRoutes}},g1t=class extends yr{constructor(e){super(),this.input=e,this.unprocessedObstacles=c7(this.input.srj.obstacles,this.input.srj.layerCount).filter(n=\u003en.offBoardConnectsTo\u0026\u0026n.offBoardConnectsTo.length\u003e0),this.unprocessedObstacles.forEach((n,o)=\u003e{n.obstacleId=n.obstacleId??`__obs${o}`}),this.offBoardConnMap=new W7e({}),this.offBoardConnMap.addConnections(this.unprocessedObstacles.filter(n=\u003en.offBoardConnectsTo?.length).map(n=\u003e[n.obstacleId,...n.offBoardConnectsTo??[]])),this.nodeTree=new B7e(this.input.capacityMeshNodes)}input;getSolverName(){return\"RelateNodesToOffBoardConnectionsSolver\"}unprocessedObstacles;nodeTree;offBoardConnMap;nodesInNet=new Map;lastProcessedObstacle;_step(){const e=this.unprocessedObstacles.pop();if(this.lastProcessedObstacle=e,!e)return void(this.solved=!0);const n=this.offBoardConnMap.getNetConnectedToId(e.obstacleId),o=this.nodeTree.getNodesInArea(e.center.x,e.center.y,.01,.01).filter(a=\u003ea.availableZ.some(A=\u003ee.__zLayers?.includes(A))).filter(a=\u003eMath.abs(a.center.x-e.center.x)\u003c.01\u0026\u0026Math.abs(a.center.y-e.center.y)\u003c.01),i=o.map(a=\u003ea.capacityMeshNodeId),r=this.nodesInNet.get(n)??[],s=[...r.map(a=\u003ea.capacityMeshNodeId),...i];for(const a of r)a._offBoardConnectedCapacityMeshNodeIds=s;for(const a of o)a._offBoardConnectedCapacityMeshNodeIds=s,a._offBoardConnectionId=n;this.nodesInNet.set(n,[...r,...o])}getOutput(){return{capacityNodes:this.input.capacityMeshNodes}}visualize(){const e={rects:[],lines:[],points:[],circles:[]},n=new Set;for(const[o,i]of this.nodesInNet)for(const r of i)n.add(r.capacityMeshNodeId);for(const o of this.input.capacityMeshNodes)n.has(o.capacityMeshNodeId)||e.rects.push({center:o.center,width:o.width-.1,height:o.height-.1,fill:\"rgba(0, 0, 0, 0.2)\"});this.lastProcessedObstacle\u0026\u0026e.rects.push({center:this.lastProcessedObstacle.center,width:this.lastProcessedObstacle.width,height:this.lastProcessedObstacle.height,fill:\"rgba(255, 0, 0, 0.5)\"});for(const[o,i]of this.nodesInNet.entries()){for(const r of i)e.rects.push({center:r.center,width:r.width,height:r.height,fill:Fz(o,.2),label:`OffBoardConn: ${o}`});for(const r of i)for(const s of i)r.capacityMeshNodeId!==s.capacityMeshNodeId\u0026\u0026e.lines.push({points:[r.center,s.center],strokeColor:Fz(o,1)})}return e}},Cae=.1,yae=.1;function xae(t,e,n,o,i,r){return(i-t)*(o-e)-(r-e)*(n-t)}function Eae(t,e,n,o,i,r){return Math.min(t,n)\u003c=i\u0026\u0026i\u003c=Math.max(t,n)\u0026\u0026Math.min(e,o)\u003c=r\u0026\u0026r\u003c=Math.max(e,o)}function teo(t,e,n,o,i,r,s,a){const A=xae(i,r,s,a,t,e),c=xae(i,r,s,a,n,o),l=xae(t,e,n,o,i,r),u=xae(t,e,n,o,s,a);return(A\u003e0\u0026\u0026c\u003c0||A\u003c0\u0026\u0026c\u003e0)\u0026\u0026(l\u003e0\u0026\u0026u\u003c0||l\u003c0\u0026\u0026u\u003e0)||!(A!==0||!Eae(i,r,s,a,t,e))||!(c!==0||!Eae(i,r,s,a,n,o))||!(l!==0||!Eae(t,e,n,o,i,r))||!(u!==0||!Eae(t,e,n,o,s,a))}function neo(t,e,n,o,i,r){const s=i-n,a=r-o,A=t-n,c=e-o,l=s*s+a*a;if(l===0)return{x:n,y:o,distSq:A*A+c*c};let u=(A*s+c*a)/l;u=Math.max(0,Math.min(1,u));const g=n+u*s,h=o+u*a,d=t-g,p=e-h;return{x:g,y:h,distSq:d*d+p*p}}var oeo=class extends yr{getSolverName(){return\"SimpleHighDensitySolver\"}unsolvedNodes;allNodes;routes;colorMap;traceWidth;viaDiameter;numMovablePoints;currentNode=null;lastNode=null;currentNodeStep=0;routesInProgress=[];pushMargin;currentNodeBounds=null;constructor({nodePortPoints:e,colorMap:n,traceWidth:o=.1,viaDiameter:i=.3,pushMargin:r=.3,numMovablePoints:s=2}){if(super(),s\u003c1||s\u003e3)throw new Error(`numMovablePoints must be 1, 2, or 3, got ${s}`);this.allNodes=[...e],this.unsolvedNodes=[...e],this.colorMap=n??{},this.routes=[],this.traceWidth=o,this.viaDiameter=i,this.numMovablePoints=s,this.pushMargin=r,this.MAX_ITERATIONS=10*e.length+1}_step(){if(this.currentNode===null){if(this.unsolvedNodes.length===0)return void(this.solved=!0);this.lastNode=this.currentNode,this.currentNode=this.unsolvedNodes.pop(),this.currentNodeStep=0,this.routesInProgress=[],this._initializeRoutesForCurrentNode()}this.currentNodeStep\u003e0\u0026\u0026this._runForceDirectedStep(),this.currentNodeStep++,this.currentNodeStep\u003e=10\u0026\u0026(this._finalizeRoutesForCurrentNode(),this.lastNode=this.currentNode,this.currentNode=null)}_initializeRoutesForCurrentNode(){const e=this.currentNode,n=e.center.x-e.width/2,o=e.center.x+e.width/2,i=e.center.y-e.height/2,r=e.center.y+e.height/2;this.currentNodeBounds={minX:n,maxX:o,minY:i,maxY:r};const s=new Map;for(const a of e.portPoints)s.has(a.connectionName)||s.set(a.connectionName,[]),s.get(a.connectionName).push({x:a.x,y:a.y,z:a.z,rootConnectionName:a.rootConnectionName});for(const[a,A]of s){if(A.length\u003c2)continue;const c=A[0],l=A[A.length-1],u=c.z,g=l.x-c.x,h=l.y-c.y,d=Math.sqrt(g*g+h*h),p=d\u003e0?g/d:0,m=d\u003e0?h/d:0,_=[];this.numMovablePoints\u003e=1\u0026\u0026_.push({x:c.x+p*yae,y:c.y+m*yae,z:u,rootConnectionName:c.rootConnectionName,connectionName:a}),this.numMovablePoints\u003e=2\u0026\u0026_.push({x:l.x-p*yae,y:l.y-m*yae,z:u,rootConnectionName:c.rootConnectionName,connectionName:a}),this.numMovablePoints\u003e=3\u0026\u0026_.push({x:c.x+g/2,y:c.y+h/2,z:u,rootConnectionName:c.rootConnectionName,connectionName:a}),this.routesInProgress.push({connectionName:a,rootConnectionName:c.rootConnectionName,startPoint:{x:c.x,y:c.y,z:u},endPoint:{x:l.x,y:l.y,z:u},movablePoints:_})}}_runForceDirectedStep(){const e=this.currentNodeBounds,n=[];for(const A of this.routesInProgress)n.push(...A.movablePoints);const o=new Map;for(const A of n)o.set(A,{fx:0,fy:0});const i=.3+this.pushMargin,r=new Map;for(const A of this.routesInProgress){const c=[{x:A.startPoint.x,y:A.startPoint.y,movablePoint:null}];A.movablePoints.length===1?c.push({x:A.movablePoints[0].x,y:A.movablePoints[0].y,movablePoint:A.movablePoints[0]}):A.movablePoints.length===2?(c.push({x:A.movablePoints[0].x,y:A.movablePoints[0].y,movablePoint:A.movablePoints[0]}),c.push({x:A.movablePoints[1].x,y:A.movablePoints[1].y,movablePoint:A.movablePoints[1]})):A.movablePoints.length===3\u0026\u0026(c.push({x:A.movablePoints[0].x,y:A.movablePoints[0].y,movablePoint:A.movablePoints[0]}),c.push({x:A.movablePoints[2].x,y:A.movablePoints[2].y,movablePoint:A.movablePoints[2]}),c.push({x:A.movablePoints[1].x,y:A.movablePoints[1].y,movablePoint:A.movablePoints[1]})),c.push({x:A.endPoint.x,y:A.endPoint.y,movablePoint:null}),r.set(A,c)}for(const A of n){const c=o.get(A),l=A.x-e.minX,u=e.maxX-A.x,g=e.maxY-A.y,h=A.y-e.minY;l\u003ci\u0026\u0026(c.fx+=Cae*(i-l)),u\u003ci\u0026\u0026(c.fx-=Cae*(i-u)),h\u003ci\u0026\u0026(c.fy+=Cae*(i-h)),g\u003ci\u0026\u0026(c.fy-=Cae*(i-g));for(const d of this.routesInProgress){if(d.rootConnectionName===A.rootConnectionName)continue;const p=r.get(d);for(let m=0;m\u003cp.length-1;m++){const _=p[m],f=p[m+1],I=neo(A.x,A.y,_.x,_.y,f.x,f.y),C=Math.sqrt(I.distSq);if(C\u003e0\u0026\u0026C\u003c2*i){const y=A.x-I.x,x=A.y-I.y,E=.002/I.distSq,B=E*y,S=E*x;c.fx+=B,c.fy+=S;const Q=_.movablePoint,w=f.movablePoint;if(Q\u0026\u0026w){const M=o.get(Q),k=o.get(w);M.fx-=B/2,M.fy-=S/2,k.fx-=B/2,k.fy-=S/2}else if(Q){const M=o.get(Q);M.fx-=B,M.fy-=S}else if(w){const M=o.get(w);M.fx-=B,M.fy-=S}}}}}const s=A=\u003eA.movablePoint?{x:A.movablePoint.x,y:A.movablePoint.y}:{x:A.x,y:A.y},a=A=\u003e{let c=null;for(const h of this.routesInProgress)if(h.movablePoints.includes(A)){c=h;break}if(!c)return!1;const l=r.get(c);let u=-1;for(let h=0;h\u003cl.length;h++)if(l[h].movablePoint===A){u=h;break}if(u===-1)return!1;const g=[];if(u\u003e0){const h=s(l[u-1]);g.push({ax:h.x,ay:h.y,bx:A.x,by:A.y})}if(u\u003cl.length-1){const h=s(l[u+1]);g.push({ax:A.x,ay:A.y,bx:h.x,by:h.y})}for(const h of this.routesInProgress){if(h.rootConnectionName===c.rootConnectionName)continue;const d=r.get(h);for(let p=0;p\u003cd.length-1;p++){const m=s(d[p]),_=s(d[p+1]);for(const f of g)if(teo(f.ax,f.ay,f.bx,f.by,m.x,m.y,_.x,_.y))return!0}}return!1};for(const A of n){const c=o.get(A);A.forceX=c.fx,A.forceY=c.fy;const l=A.x,u=A.y;A.x+=c.fx,A.y+=c.fy,A.x=Math.max(e.minX,Math.min(e.maxX,A.x)),A.y=Math.max(e.minY,Math.min(e.maxY,A.y)),a(A)\u0026\u0026(A.x=l,A.y=u)}}_finalizeRoutesForCurrentNode(){for(const e of this.routesInProgress){const{connectionName:n,rootConnectionName:o,startPoint:i,endPoint:r,movablePoints:s}=e,a=[{x:i.x,y:i.y,z:i.z}];s.length===1?a.push({x:s[0].x,y:s[0].y,z:s[0].z}):s.length===2?(a.push({x:s[0].x,y:s[0].y,z:s[0].z}),a.push({x:s[1].x,y:s[1].y,z:s[1].z})):s.length===3\u0026\u0026(a.push({x:s[0].x,y:s[0].y,z:s[0].z}),a.push({x:s[2].x,y:s[2].y,z:s[2].z}),a.push({x:s[1].x,y:s[1].y,z:s[1].z})),a.push({x:r.x,y:r.y,z:r.z});const A={connectionName:n,rootConnectionName:o,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:a,vias:[]};this.routes.push(A)}this.routesInProgress=[]}_getNodeBounds(e){return{minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2}}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const n of this.unsolvedNodes){if(n===this.currentNode)continue;const o=this._getNodeBounds(n);e.rects.push({center:{x:(o.minX+o.maxX)/2,y:(o.minY+o.maxY)/2},width:o.maxX-o.minX,height:o.maxY-o.minY,fill:\"rgba(0, 0, 0, 0.08)\",stroke:\"rgba(0, 0, 0, 0.2)\",label:n.capacityMeshNodeId})}if(this.lastNode){const n=this._getNodeBounds(this.lastNode);e.rects.push({center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY,fill:\"rgba(0, 200, 0, 0.15)\",stroke:\"rgba(0, 0, 255, 0.6)\"})}if(this.currentNode){const n=this._getNodeBounds(this.currentNode);e.rects.push({center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY,fill:\"rgba(0, 200, 0, 0.15)\",stroke:\"rgba(0, 200, 0, 0.6)\"})}for(const n of this.unsolvedNodes){const o=new Map;for(const i of n.portPoints)o.has(i.connectionName)||o.set(i.connectionName,[]),o.get(i.connectionName).push({x:i.x,y:i.y});for(const[i,r]of o)r.length\u003c2||e.lines.push({points:r.map(s=\u003e({x:s.x,y:s.y})),label:i,strokeColor:\"gray\",strokeWidth:this.traceWidth})}for(const n of this.routes){const o=Kse(n.route,n.connectionName,this.colorMap[n.connectionName]);for(const r of o)e.lines.push({points:r.points,label:r.connectionName,strokeColor:r.z===0?r.color:Es(r.color,.75),layer:`z${r.z}`,strokeWidth:n.traceThickness,strokeDash:r.z!==0?\"10, 5\":void 0});const i=n.route;for(let r=0;r\u003ci.length;r++){const s=i[r],a=r===0,A=r===i.length-1,c=!a\u0026\u0026!A;let l;l=a?\"start\":A?\"end\":`M${r}`,e.points.push({x:s.x,y:s.y,label:l,color:c?\"orange\":\"blue\"})}}for(const n of this.routesInProgress){const{startPoint:o,endPoint:i,movablePoints:r,connectionName:s}=n,a=this.colorMap[s]??\"gray\",A=[{x:o.x,y:o.y}];r.length===1?A.push({x:r[0].x,y:r[0].y}):r.length===2?(A.push({x:r[0].x,y:r[0].y}),A.push({x:r[1].x,y:r[1].y})):r.length===3\u0026\u0026(A.push({x:r[0].x,y:r[0].y}),A.push({x:r[2].x,y:r[2].y}),A.push({x:r[1].x,y:r[1].y})),A.push({x:i.x,y:i.y}),e.lines.push({points:A,label:s,strokeColor:a,strokeWidth:this.traceWidth}),e.points.push({x:o.x,y:o.y,label:\"start\",color:\"blue\"});for(let c=0;c\u003cr.length;c++){const l=r[c];if(e.points.push({x:l.x,y:l.y,label:`M${c+1}`,color:\"orange\"}),l.forceX!==void 0\u0026\u0026l.forceY!==void 0\u0026\u0026Math.sqrt(l.forceX*l.forceX+l.forceY*l.forceY)\u003e.001){e.lines.push({points:[{x:l.x,y:l.y},{x:l.x+l.forceX*5,y:l.y+l.forceY*5}],strokeColor:\"red\",strokeWidth:.02,label:`F${c+1}`});const g=.05,h=l.x+l.forceX*5,d=l.y+l.forceY*5,p=Math.atan2(l.forceY,l.forceX);e.lines.push({points:[{x:h,y:d},{x:h-g*Math.cos(p-Math.PI/6),y:d-g*Math.sin(p-Math.PI/6)}],strokeColor:\"red\",strokeWidth:.02}),e.lines.push({points:[{x:h,y:d},{x:h-g*Math.cos(p+Math.PI/6),y:d-g*Math.sin(p+Math.PI/6)}],strokeColor:\"purple\",strokeWidth:.02})}}e.points.push({x:i.x,y:i.y,label:\"end\",color:\"blue\"})}return e}},d1t=({connMap:t,connectionsWithResults:e,inputNodes:n,obstacles:o})=\u003e{const i=o.filter(a=\u003ea.offBoardConnectsTo?.length);if(i.length===0)return;const r=new TD({});r.addConnections(i.map((a,A)=\u003e[a.obstacleId??`__obs${A}`,...a.offBoardConnectsTo??[]]));const s=new Map(n.map(a=\u003e[a.capacityMeshNodeId,a]));for(const a of e){if(!a.path)continue;const A=a.connection.rootConnectionName??a.connection.name,c=new Set;for(const l of a.path){const u=s.get(l.currentNodeId);if(u?._offBoardConnectionId\u0026\u0026c.add(u._offBoardConnectionId),l.throughNodeId){const g=s.get(l.throughNodeId);g?._offBoardConnectionId\u0026\u0026c.add(g._offBoardConnectionId)}}for(const l of c){const u=r.getIdsConnectedToNet(l);u?.length\u0026\u0026t.addConnections([[A,...u]])}}};function T5(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var ieo=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.srj=e,this.opts={...n},this.viaDiameter=om(e).padDiameter,this.minTraceWidth=e.minTraceWidth;const o=this.opts;if(this.effort=o.effort??1,this.MAX_ITERATIONS=1e8*this.effort,o.capacityDepth===void 0){const i=e.bounds.maxX-e.bounds.minX,r=e.bounds.maxY-e.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.connMap=Jm(e),this.colorMap=Jf(e,this.connMap),this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return\"AssignableAutoroutingPipeline2\"}netToPointPairsSolver;nodeSolver;nodeTargetMerger;edgeSolver;relateNodesToOffBoardConnections;colorMap;highDensityRouteSolver;simpleHighDensityRouteSolver;highDensitySolver;highDensityStitchSolver;singleLayerNodeMerger;offboardPathFragmentSolver;strawSolver;deadEndSolver;traceSimplificationSolver;traceKeepoutSolver;traceWidthSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;viaDiameter;minTraceWidth;effort;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[T5(\"netToPointPairsSolver\",J7e,e=\u003e[e.srj,e.colorMap,JQ(e.srj)],{onSolved:e=\u003e{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,this.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),T5(\"nodeSolver\",qF,e=\u003e[{simpleRouteJson:e.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:e=\u003e{e.capacityNodes=e.nodeSolver?.getOutput().meshNodes??[]}}),T5(\"relateNodesToOffBoardConnections\",g1t,e=\u003e[{capacityMeshNodes:e.capacityNodes,srj:e.srj}],{onSolved:e=\u003e{e.capacityNodes=e.relateNodesToOffBoardConnections?.getOutput().capacityNodes}}),T5(\"edgeSolver\",WQ,e=\u003e[e.capacityNodes],{onSolved:e=\u003e{e.capacityEdges=e.edgeSolver?.edges}}),T5(\"availableSegmentPointSolver\",kD,e=\u003e[{nodes:e.capacityNodes,edges:e.capacityEdges||[],traceWidth:e.minTraceWidth,colorMap:e.colorMap,shouldReturnCrampedPortPoints:!1}]),T5(\"portPointPathingSolver\",z7e,e=\u003e{const n=e.capacityNodes.map(r=\u003e({capacityMeshNodeId:r.capacityMeshNodeId,center:r.center,width:r.width,height:r.height,portPoints:[],availableZ:r.availableZ,_containsTarget:r._containsTarget,_containsObstacle:r._containsObstacle,_offBoardConnectionId:r._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:r._offBoardConnectedCapacityMeshNodeIds})),o=new Map(n.map(r=\u003e[r.capacityMeshNodeId,r])),i=e.availableSegmentPointSolver;for(const r of i.sharedEdgeSegments)for(const s of r.portPoints){const[a,A]=s.nodeIds,c={portPointId:s.segmentPortPointId,x:s.x,y:s.y,z:s.availableZ[0]??0,connectionNodeIds:[a,A],distToCentermostPortOnZ:s.distToCentermostPortOnZ,connectsToOffBoardNode:r.nodeIds.some(u=\u003eo.get(u)?._offBoardConnectionId)},l=o.get(a);l\u0026\u0026l.portPoints.push(c)}return[{simpleRouteJson:e.srjWithPointPairs,inputNodes:n,capacityMeshNodes:e.capacityNodes,colorMap:e.colorMap,numShuffleSeeds:100*e.effort,hyperParameters:{JUMPER_PF_FN_ENABLED:!1,NODE_PF_FACTOR:100,NODE_PF_MAX_PENALTY:100,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,FORCE_CENTER_FIRST:!0}}]},{onSolved:e=\u003e{const n=e.portPointPathingSolver;n\u0026\u0026d1t({connMap:e.connMap,connectionsWithResults:n.connectionsWithResults,inputNodes:n.inputNodes,obstacles:e.srj.obstacles})}}),T5(\"multiSectionPortPointOptimizer\",nZn,e=\u003e{const n=e.portPointPathingSolver;return[{simpleRouteJson:e.srjWithPointPairs,inputNodes:n.inputNodes,capacityMeshNodes:e.capacityNodes,capacityMeshEdges:e.capacityEdges,colorMap:e.colorMap,initialConnectionResults:n.connectionsWithResults,initialAssignedPortPoints:n.assignedPortPoints,initialNodeAssignedPortPoints:n.nodeAssignedPortPoints}]}),T5(\"highDensitySolver\",oeo,e=\u003e[{nodePortPoints:e.multiSectionPortPointOptimizer?.getNodesWithPortPoints()??e.portPointPathingSolver?.getNodesWithPortPoints()??[],colorMap:e.colorMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth,connMap:e.connMap}]),T5(\"highDensityStitchSolver\",j7e,e=\u003e[{connections:e.srjWithPointPairs.connections,hdRoutes:e.highDensitySolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter}]),T5(\"traceSimplificationSolver\",j8,e=\u003e[{hdRoutes:e.highDensityStitchSolver?.mergedHdRoutes??e.highDensitySolver?.routes??e.highDensityRouteSolver?.routes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,iterations:2}]),T5(\"traceKeepoutSolver\",u1t,e=\u003e[{hdRoutes:e.traceSimplificationSolver?.simplifiedHdRoutes??[],obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,srj:e.srj}]),T5(\"traceWidthSolver\",aL,e=\u003e[{hdRoutes:e.traceKeepoutSolver?.redrawnHdRoutes??[],connection:e.srj.connections,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,minTraceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15,layerCount:e.srj.layerCount}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();const e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeTargetMerger?.visualize(),i=this.singleLayerNodeMerger?.visualize(),r=this.strawSolver?.visualize(),s=this.edgeSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.availableSegmentPointSolver?.visualize(),c=this.offboardPathFragmentSolver?.visualize(),l=this.portPointPathingSolver?.visualize(),u=this.multiSectionPortPointOptimizer?.visualize(),g=this.highDensityRouteSolver?.visualize(),h=this.highDensitySolver?.visualize(),d=this.simpleHighDensityRouteSolver?.visualize(),p=this.highDensityStitchSolver?.visualize(),m=this.traceSimplificationSolver?.visualize(),_=this.traceKeepoutSolver?.visualize(),f=this.traceWidthSolver?.visualize(),I=this.srj.outline,C=[];if(C.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),I\u0026\u0026I.length\u003e=2){const B=I.map(S=\u003e({x:S.x,y:S.y}));B.push({...B[0]}),C.push({points:B,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const y=z8(this.srj),x={points:[...this.srj.connections.flatMap(B=\u003eB.pointsToConnect.map(S=\u003e({...S,layer:J8(S,this.srj.layerCount),label:`${B.name} ${S.pcb_port_id??\"\"}`})))],rects:[...(this.srj.obstacles??[]).filter(B=\u003e!B.isCopperPour).map(B=\u003e({...B,fill:B.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":B.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(B,this.srj.layerCount),label:y(B)}))],lines:C},E=[x,e,n,o,i,r,s,a,A,c,l,u,g?Il(x,g):null,h?Il(x,h):null,d?Il(x,d):null,p,m,_,f,this.solved?Il({lines:C},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...E)}preview(){const e=this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes;if(e){const n=[];for(let o=e.length-1;o\u003e=0;o--){const i=e[o];if(n.push({points:i.route.map(r=\u003e({x:r.x,y:r.y})),strokeColor:this.colorMap[i.connectionName]}),n.length\u003e200)break}return{lines:n}}if(this.portPointPathingSolver){const n=[];for(const o of this.portPointPathingSolver.connectionsWithResults)o.path\u0026\u0026n.push({points:o.path.map(i=\u003e({x:i.point.x,y:i.point.y})),strokeColor:this.colorMap[o.connection.name]});return{lines:n}}return this.netToPointPairsSolver?this.netToPointPairsSolver?.visualize():{}}_getOutputHdRoutes(){return this.traceWidthSolver?.hdRoutesWithWidths??this.traceKeepoutSolver?.redrawnHdRoutes??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver?.mergedHdRoutes??this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes}getConnectedOffboardObstacles(){const e={},n=new Set(this.srj.connections.flatMap(o=\u003eo.__rootConnectionNames??[o.name]));for(const[o,i]of this.srj.obstacles.entries()){if(!i.offBoardConnectsTo?.length)continue;const r=i.obstacleId??`__obs${o}`,s=this.connMap.getNetConnectedToId(r);if(!s)continue;const a=this.connMap.getIdsConnectedToNet(s).find(A=\u003en.has(A));a\u0026\u0026(e[r]=a)}return e}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver\u0026\u0026!this.simpleHighDensityRouteSolver\u0026\u0026!this.highDensitySolver)throw new Error(\"Cannot get output before solving is complete\");const e=[],n=this._getOutputHdRoutes();for(const o of this.netToPointPairsSolver?.newConnections??[]){const i=o.__netConnectionName??this.srj.connections.find(s=\u003es.name===o.name)?.__netConnectionName,r=n.filter(s=\u003es.connectionName===o.name);for(let s=0;s\u003cr.length;s++){const a=r[s],A={type:\"pcb_trace\",pcb_trace_id:`${o.name}_${s}`,connection_name:i??o.__rootConnectionNames?.[0]??o.name,route:nB(a,this.srj.layerCount)};e.push(A)}}return e}getOutputSimpleRouteJson(){return{...this.srj,traces:this.getOutputSimplifiedPcbTraces()}}},reo=class extends yr{getSolverName(){return\"MultipleHighDensityRouteStitchSolver2\"}unsolvedRoutes;mergedHdRoutes=[];colorMap={};defaultTraceThickness;defaultViaDiameter;constructor(e){super(),this.colorMap=e.colorMap??{};const n=e.hdRoutes[0];this.defaultTraceThickness=n?.traceThickness??.15,this.defaultViaDiameter=n?.viaDiameter??e.defaultViaDiameter??.3;const o=new Map;for(const r of e.connectionPathResults)o.set(r.connection.name,r);const i=new Map;for(const r of e.hdRoutes){const s=i.get(r.connectionName);s?s.push(r):i.set(r.connectionName,[r])}this.unsolvedRoutes=[];for(const[r,s]of i.entries()){const a=e.connections.find(g=\u003eg.name===r);if(!a)continue;const A=o.get(r);let c=[];A?.path\u0026\u0026(c=A.path.map(g=\u003eg.currentNodeId));const l={...a.pointsToConnect[0],z:Kr(tI(a.pointsToConnect[0]),e.layerCount)},u={...a.pointsToConnect[1],z:Kr(tI(a.pointsToConnect[1]),e.layerCount)};this.unsolvedRoutes.push({connectionName:r,hdRoutes:s,nodeOrder:c,start:l,end:u})}this.MAX_ITERATIONS=1e5}_step(){const e=this.unsolvedRoutes.pop();if(!e)return void(this.solved=!0);const n=this.stitchOrderedRoutes(e);this.mergedHdRoutes.push(n)}stitchOrderedRoutes(e){const{connectionName:n,hdRoutes:o,nodeOrder:i,start:r,end:s}=e;if(o.length===0)return{connectionName:n,traceThickness:this.defaultTraceThickness,viaDiameter:this.defaultViaDiameter,route:[r,s],vias:[],jumpers:[]};let a;a=i.length\u003e0?this.orderRoutesByNodePath(o,i,r,n):this.orderRoutesByProximity(o,r);const A=[],c=[],l=[];A.push({x:r.x,y:r.y,z:r.z});for(let g=0;g\u003ca.length;g++){const h=a[g],d=A[A.length-1],p=h.route[0],m=h.route[h.route.length-1],_=no(d,p),f=no(d,m),I=Math.min(_,f);if(g\u003e0\u0026\u0026I\u003e1)continue;let C;C=_\u003c=f?[...h.route]:[...h.route].reverse(),C.length\u003e0\u0026\u0026no(d,C[0])\u003c.001\u0026\u0026(C=C.slice(1)),A.push(...C),c.push(...h.vias),h.jumpers\u0026\u0026l.push(...h.jumpers)}const u=no(A[A.length-1],s);return u\u003e.001\u0026\u0026u\u003c1\u0026\u0026A.push({x:s.x,y:s.y,z:s.z}),{connectionName:n,rootConnectionName:o[0]?.rootConnectionName,traceThickness:o[0]?.traceThickness??this.defaultTraceThickness,viaDiameter:o[0]?.viaDiameter??this.defaultViaDiameter,route:A,vias:c,jumpers:l}}orderRoutesByNodePath(e,n,o,i){if(e.length===0)return[];const r=new Set(e);let s=null,a=1/0;for(const _ of r){const f=_.route[0],I=_.route[_.route.length-1],C=Math.min(no(o,f),no(o,I));C\u003ca\u0026\u0026(a=C,s=_)}if(!s)return[];r.delete(s);const A=s.route[0],c=s.route[s.route.length-1];let l,u;no(o,A)\u003c=no(o,c)?(l=A,u=c):(l=c,u=A);const g=(_,f)=\u003e{let I=0;for(const C of r){if(C===f)continue;const y=C.route[0],x=C.route[C.route.length-1];(no(_,y)\u003c10||no(_,x)\u003c10)\u0026\u0026I++}return I},h=[s];let d=u;for(;r.size\u003e0;){let _=null,f=1/0,I=-1;for(const C of r){const y=C.route[0],x=C.route[C.route.length-1],E=no(d,y),B=no(d,x),S=Math.min(E,B);if(S\u003e=10)continue;const Q=g(E\u003c=B?x:y,C),w=Q===0,M=I===0,k=S-f;let R=!1;R=_===null||!!(!w\u0026\u0026M\u0026\u0026k\u003c5)||!(w\u0026\u0026!M\u0026\u0026k\u003e-5)\u0026\u0026S\u003cf,R\u0026\u0026(f=S,_=C,I=Q)}if(!_)break;{h.push(_),r.delete(_);const C=_.route[0],y=_.route[_.route.length-1];d=no(d,C)\u003c=no(d,y)?y:C}}const p=[];for(d=l;r.size\u003e0;){let _=null,f=1/0,I=-1;const C=no(d,o);for(const y of r){const x=y.route[0],E=y.route[y.route.length-1],B=no(d,x),S=no(d,E),Q=Math.min(B,S);if(Q\u003e=10)continue;const w=B\u003c=S?E:x;if(no(w,o)\u003eC+2)continue;const M=g(w,y),k=M===0,R=I===0,F=Q-f;let O=!1;O=_===null||!!(!k\u0026\u0026R\u0026\u0026F\u003c5)||!(k\u0026\u0026!R\u0026\u0026F\u003e-5)\u0026\u0026Q\u003cf,O\u0026\u0026(f=Q,_=y,I=M)}if(!_)break;{p.unshift(_),r.delete(_);const y=_.route[0],x=_.route[_.route.length-1];d=no(d,y)\u003c=no(d,x)?x:y}}const m=[...p,...h];if(r.size\u003e0){const _=[...r].map(f=\u003e{const I=f.route[0],C=f.route[f.route.length-1];return`start=(${I.x.toFixed(2)},${I.y.toFixed(2)}) end=(${C.x.toFixed(2)},${C.y.toFixed(2)})`});console.warn(`[StitchSolver] Skipped ${r.size} routes for connection ${e[0]?.connectionName??\"?\"}, skipped routes: ${_.join(\"; \")}`)}return m}orderRoutesByProximity(e,n){const o=new Set(e),i=[];let r=n;for(;o.size\u003e0;){let s=null,a=1/0,A=!1;for(const c of o){const l=c.route[0],u=c.route[c.route.length-1],g=no(r,l),h=no(r,u);g\u003ca\u0026\u0026(a=g,s=c,A=!1),h\u003ca\u0026\u0026(a=h,s=c,A=!0)}if(!s)break;{i.push(s),o.delete(s);const c=s.route[0],l=s.route[s.route.length-1];r=A?c:l}}return i}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:\"Multiple High Density Route Stitch Solver 2\"};for(const[n,o]of this.mergedHdRoutes.entries()){const i=this.colorMap[o.connectionName]??`hsl(120, 100%, ${40+10*n%40}%)`;for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1],A=s.z!==0?Es(i,.5):i;e.lines?.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:A,strokeWidth:o.traceThickness})}for(const r of o.route){const s=r.z!==0?Es(i,.5):i;e.points?.push({x:r.x,y:r.y,color:s})}for(const r of o.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:o.viaDiameter/2,fill:i});if(o.jumpers\u0026\u0026o.jumpers.length\u003e0){const r=_x(o.jumpers,{color:i,label:o.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}for(const n of this.unsolvedRoutes){const o=this.colorMap[n.connectionName]??\"gray\";e.points?.push({x:n.start.x,y:n.start.y,color:o,label:`${n.connectionName} Start`},{x:n.end.x,y:n.end.y,color:o,label:`${n.connectionName} End`});for(let i=0;i\u003cn.hdRoutes.length;i++){const r=n.hdRoutes[i];if(r.route.length\u003e1\u0026\u0026e.lines?.push({points:r.route.map(s=\u003e({x:s.x,y:s.y})),strokeColor:Es(o,.5),strokeDash:\"10 5\",label:`segment ${i}`}),r.jumpers\u0026\u0026r.jumpers.length\u003e0){const s=_x(r.jumpers,{color:o,label:r.connectionName});e.rects.push(...s.rects??[]),e.lines.push(...s.lines??[])}}}return e}},seo=Object.create,h1t=Object.defineProperty,aeo=Object.getOwnPropertyDescriptor,p1t=Object.getOwnPropertyNames,Aeo=Object.getPrototypeOf,ceo=Object.prototype.hasOwnProperty,YD=(t,e)=\u003efunction(){return e||(0,t[p1t(t)[0]])((e={exports:{}}).exports,e),e.exports},m1t=(t,e,n)=\u003e(n=t!=null?seo(Aeo(t)):{},((o,i,r,s)=\u003e{if(i\u0026\u0026typeof i==\"object\"||typeof i==\"function\")for(let a of p1t(i))ceo.call(o,a)||a===r||h1t(o,a,{get:()=\u003ei[a],enumerable:!(s=aeo(i,a))||s.enumerable});return o})(t\u0026\u0026t.__esModule?n:h1t(n,\"default\",{value:t,enumerable:!0}),t)),leo=YD({\"node_modules/is-buffer/index.js\"(t,e){function n(o){return!!o.constructor\u0026\u0026typeof o.constructor.isBuffer==\"function\"\u0026\u0026o.constructor.isBuffer(o)}e.exports=function(o){return o!=null\u0026\u0026(n(o)||(function(i){return typeof i.readFloatLE==\"function\"\u0026\u0026typeof i.slice==\"function\"\u0026\u0026n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),ueo=YD({\"node_modules/kind-of/index.js\"(t,e){var n=leo(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return\"undefined\";if(i===null)return\"null\";if(i===!0||i===!1||i instanceof Boolean)return\"boolean\";if(typeof i==\"string\"||i instanceof String)return\"string\";if(typeof i==\"number\"||i instanceof Number)return\"number\";if(typeof i==\"function\"||i instanceof Function)return\"function\";if(Array.isArray!==void 0\u0026\u0026Array.isArray(i))return\"array\";if(i instanceof RegExp)return\"regexp\";if(i instanceof Date)return\"date\";var r=o.call(i);return r===\"[object RegExp]\"?\"regexp\":r===\"[object Date]\"?\"date\":r===\"[object Arguments]\"?\"arguments\":r===\"[object Error]\"?\"error\":n(i)?\"buffer\":r===\"[object Set]\"?\"set\":r===\"[object WeakSet]\"?\"weakset\":r===\"[object Map]\"?\"map\":r===\"[object WeakMap]\"?\"weakmap\":r===\"[object Symbol]\"?\"symbol\":r===\"[object Int8Array]\"?\"int8array\":r===\"[object Uint8Array]\"?\"uint8array\":r===\"[object Uint8ClampedArray]\"?\"uint8clampedarray\":r===\"[object Int16Array]\"?\"int16array\":r===\"[object Uint16Array]\"?\"uint16array\":r===\"[object Int32Array]\"?\"int32array\":r===\"[object Uint32Array]\"?\"uint32array\":r===\"[object Float32Array]\"?\"float32array\":r===\"[object Float64Array]\"?\"float64array\":\"object\"}}}),geo=YD({\"node_modules/rename-keys/index.js\"(t,e){(function(){function n(o,i){if(typeof i!=\"function\")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)\u0026\u0026(r[i(s,o[s])||s]=o[s]);return r}e!==void 0\u0026\u0026e.exports?e.exports=n:typeof define==\"function\"\u0026\u0026define.amd?define([],function(){return n}):window.rename=n})()}}),deo=YD({\"node_modules/deep-rename-keys/index.js\"(t,e){var n=ueo(),o=geo();e.exports=function i(r,s){var a=n(r);if(a!==\"object\"\u0026\u0026a!==\"array\")throw new Error(\"expected an object\");var A=[];for(var c in a===\"object\"\u0026\u0026(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)===\"object\"||n(l)===\"array\"?A[c]=i(l,s):A[c]=l}return A}}}),_1t=YD({\"node_modules/eventemitter3/index.js\"(t,e){var n=Object.prototype.hasOwnProperty,o=\"~\";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create\u0026\u0026(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)\u0026\u0026c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u\u003cg;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once\u0026\u0026this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p\u003c_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p\u003cI;p++)switch(m[p].once\u0026\u0026this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f\u003c_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l\u0026\u0026!g.once||c\u0026\u0026g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h\u003cp;h++)(g[h].fn!==A||l\u0026\u0026!g[h].once||c\u0026\u0026g[h].context!==c)\u0026\u0026d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]\u0026\u0026(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0\u0026\u0026(e.exports=s)}}),heo=YD({\"node_modules/xml-lexer/dist/lexer.js\"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=_1t(),i=function(){},r={data:\"state-data\",cdata:\"state-cdata\",tagBegin:\"state-tag-begin\",tagName:\"state-tag-name\",tagEnd:\"state-tag-end\",attributeNameStart:\"state-attribute-name-start\",attributeName:\"state-attribute-name\",attributeNameEnd:\"state-attribute-name-end\",attributeValueBegin:\"state-attribute-value-begin\",attributeValue:\"state-attribute-value\"},s={lt:\"action-lt\",gt:\"action-gt\",space:\"action-space\",equal:\"action-equal\",quote:\"action-quote\",slash:\"action-slash\",char:\"action-char\",error:\"action-error\"},a={text:\"text\",openTag:\"open-tag\",closeTag:\"close-tag\",attributeName:\"attribute-name\",attributeValue:\"attribute-value\"},A={\" \":s.space,\"\t\":s.space,\"\\n\":s.space,\"\\r\":s.space,\"\u003c\":s.lt,\"\u003e\":s.gt,'\"':s.quote,\"'\":s.quote,\"=\":s.equal,\"/\":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x=\"\",E=\"\",B=\"\",S=\"\",Q=\"\",w=\"\",M=function(R,F){if(E[0]!==\"?\"\u0026\u0026E[0]!==\"!\"){var O={type:R,value:F};c.debug\u0026\u0026console.log(\"emit:\",O),C.emit(\"data\",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()\u0026\u0026M(a.text,x),E=\"\",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)===\"]]\u003e\"\u0026\u0026(M(a.text,x.slice(0,-3)),x=\"\",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E=\"\",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x=\"\",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)===\"![CDATA[\"\u0026\u0026(y=r.cdata,x=\"\",E=\"\")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x=\"\",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x=\"\",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(p,s.slash,function(){Q=!0,S=\"\",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(m,s.char,function(R){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S=\"\",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=\"\"),x=\"\",y=r.data}),n(_,s.char,function(R){w=\"\",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x=\"\",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug\u0026\u0026console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O\u003cF;O++)k(R[O])},C}}}}),peo=YD({\"node_modules/xml-reader/dist/reader.js\"(t,e){var n=_1t(),o=heo(),i=o.Type,r={element:\"element\",text:\"text\"},s=function(A){return Object.assign({name:\"\",type:r.element,value:\"\",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:\"done\",tagPrefix:\"tag:\",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream\u0026\u0026_===l\u0026\u0026(l.children=[],u.parent=null),A.emitTopLevelOnly\u0026\u0026_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit(\"tag\",u.name,u)),u===l\u0026\u0026(c.removeAllListeners(\"data\"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u\u0026\u0026u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]=\"\";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on(\"data\",d),l=s(),u=null,g=\"\",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:\":\"});var l=a(c),u=void 0;return l.on(\"done\",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}}),meo=(m1t(deo()),m1t(peo()),class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(t){throw this.error=`${this.constructor.name} error: ${t}`,this.failed=!0,t}!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026(this.error=`${this.constructor.name} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}getOutput(){return null}solve(){const t=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const e=Date.now();this.timeToSolve=e-t}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}}),l6e=t=\u003et?`hsl(${(e=\u003e{let n=0;for(let o=0;o\u003ce.length;o++)n=779*e.charCodeAt(o)+((n\u003c\u003c5)-n);return n})(t)%360}, 100%, 50%)`:\"rgba(0, 0, 0, 0.5)\",_eo=t=\u003e[[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY}],[{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY}],[{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}],[{x:t.minX,y:t.maxY},{x:t.minX,y:t.minY}]];function f1t(t,e){const{minX:n,maxX:o,minY:i,maxY:r}=e,s=o-n,a=r-i,A=1e-6;return Math.abs(t.y-r)\u003cA?t.x-n:Math.abs(t.x-o)\u003cA?s+(r-t.y):Math.abs(t.y-i)\u003cA?s+a+(o-t.x):Math.abs(t.x-n)\u003cA?2*s+a+(t.y-i):0}function I1t(t,e){const{minX:n,maxX:o,minY:i,maxY:r}=e,s=1e-6,a=Math.abs(t.y-r)\u003cs,A=Math.abs(t.y-i)\u003cs,c=Math.abs(t.x-o)\u003cs,l=Math.abs(t.x-n)\u003cs;if(a\u0026\u0026c)return{x:-Math.SQRT1_2,y:-Math.SQRT1_2};if(a\u0026\u0026l)return{x:Math.SQRT1_2,y:-Math.SQRT1_2};if(A\u0026\u0026c)return{x:-Math.SQRT1_2,y:Math.SQRT1_2};if(A\u0026\u0026l)return{x:Math.SQRT1_2,y:Math.SQRT1_2};if(a)return{x:0,y:-1};if(A)return{x:0,y:1};if(c)return{x:-1,y:0};if(l)return{x:1,y:0};const u=(i+r)/2,g=(n+o)/2-t.x,h=u-t.y,d=Math.hypot(g,h);return d\u003e0?{x:g/d,y:h/d}:{x:0,y:-1}}function Bae(t,e,n,o,i,r,s,a,A,c){for(let l=0;l\u003c=c;l++){const u=l/c,g=1-u,h=g*g,d=h*g,p=u*u,m=p*u,_=2*l;A[_]=d*t+3*h*u*n+3*g*p*i+m*s,A[_+1]=d*e+3*h*u*o+3*g*p*r+m*a}}function feo(t,e,n,o,i){const r=[];for(let s=0;s\u003c=i;s++){const a=s/i,A=1-a,c=A*A,l=c*A,u=a*a,g=u*a;r.push({x:l*t.x+3*c*a*e.x+3*A*u*n.x+g*o.x,y:l*t.y+3*c*a*e.y+3*A*u*n.y+g*o.y})}return r}function bae(t,e,n,o,i,r){const s=i-n,a=r-o,A=s*s+a*a;if(A===0){const g=t-n,h=e-o;return g*g+h*h}const c=Math.max(0,Math.min(1,((t-n)*s+(e-o)*a)/A)),l=t-(n+c*s),u=e-(o+c*a);return l*l+u*u}function Sae(t,e,n,o,i,r,s,a){const A=(s-i)*(e-r)-(a-r)*(t-i),c=(s-i)*(o-r)-(a-r)*(n-i),l=(n-t)*(r-e)-(o-e)*(i-t),u=(n-t)*(a-e)-(o-e)*(s-t);return(A\u003e0\u0026\u0026c\u003c0||A\u003c0\u0026\u0026c\u003e0)\u0026\u0026(l\u003e0\u0026\u0026u\u003c0||l\u003c0\u0026\u0026u\u003e0)?0:Math.min(bae(t,e,i,r,s,a),bae(n,o,i,r,s,a),bae(i,r,t,e,n,o),bae(s,a,t,e,n,o))}function Ieo(t,e,n,o,i,r,s,a){const A=(s-i)*(e-r)-(a-r)*(t-i),c=(s-i)*(o-r)-(a-r)*(n-i),l=(n-t)*(r-e)-(o-e)*(i-t),u=(n-t)*(a-e)-(o-e)*(s-t);return(A\u003e0\u0026\u0026c\u003c0||A\u003c0\u0026\u0026c\u003e0)\u0026\u0026(l\u003e0\u0026\u0026u\u003c0||l\u003c0\u0026\u0026u\u003e0)}function Ceo(t,e,n,o,i){const r=g=\u003e(g%i+i)%i,s=r(t),a=r(e),A=r(n),c=r(o),[l,u]=s\u003ca?[s,a]:[a,s];return A\u003el\u0026\u0026A\u003cu\u0026\u0026c\u003el\u0026\u0026c\u003cu}function C1t(t,e){let n=1/0,o=-1/0,i=1/0,r=-1/0;for(let s=0;s\u003ce;s++){const a=t[2*s],A=t[2*s+1];a\u003cn\u0026\u0026(n=a),a\u003eo\u0026\u0026(o=a),A\u003ci\u0026\u0026(i=A),A\u003er\u0026\u0026(r=A)}return{minX:n,maxX:o,minY:i,maxY:r}}var y1t=class extends meo{constructor(e){super(),this.problem=e;for(const n of this.problem.obstacles)n.outerSegments=_eo(n);this.precomputeObstacles()}outputTraces=[];traces=[];optimizationStep=0;maxOptimizationSteps=100;sampledPoints=[];traceBounds=[];obstacleSegments=new Float64Array(0);obstacleNetworkIds=[];numObstacleSegments=0;collisionPairs=[];lastCost=1/0;stagnantSteps=0;effectiveTraceToTraceSpacing=0;getConstructorParams(){return this.problem}precomputeObstacles(){const{obstacles:e}=this.problem;let n=0;for(const i of e)i.outerSegments\u0026\u0026(n+=i.outerSegments.length);this.obstacleSegments=new Float64Array(4*n),this.obstacleNetworkIds=[],this.numObstacleSegments=n;let o=0;for(const i of e)if(i.outerSegments)for(const r of i.outerSegments)this.obstacleSegments[o++]=r[0].x,this.obstacleSegments[o++]=r[0].y,this.obstacleSegments[o++]=r[1].x,this.obstacleSegments[o++]=r[1].y,this.obstacleNetworkIds.push(i.networkId)}initializeTraces(){const{bounds:e,waypointPairs:n}=this.problem,{minX:o,maxX:i,minY:r,maxY:s}=e,a=i-o,A=s-r,c=2*a+2*A,l=(function(m){return{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2}})(e),u=n.map((m,_)=\u003e({pair:m,t1:f1t(m.start,e),t2:f1t(m.end,e),idx:_})),g=u.map(()=\u003e[]),h=u.map(()=\u003e[]);for(const m of u)for(const _ of u)if(m.idx!==_.idx){if(m.pair.networkId\u0026\u0026_.pair.networkId\u0026\u0026m.pair.networkId===_.pair.networkId)continue;Ceo(_.t1,_.t2,m.t1,m.t2,c)\u0026\u0026(g[m.idx].push(_.idx),h[_.idx].push(m.idx))}const d=g.map(m=\u003em.length),p=Math.max(...d,1);this.traces=u.map(({pair:m,t1:_,t2:f,idx:I})=\u003e{const C=I1t(m.start,e),y=I1t(m.end,e),x=Math.hypot(m.end.x-m.start.x,m.end.y-m.start.y),E=d[I]/p,B=(m.start.x+m.end.x)/2,S=(m.start.y+m.end.y)/2,Q=x*(.25+.15*(1-Math.hypot(B-l.x,S-l.y)/Math.hypot(a/2,A/2)))*(1-.3*E),w=.05*Math.min(a,A),M=Math.max(w,Q),k=Math.max(w,Q);return{waypointPair:m,ctrl1:{x:m.start.x+M*C.x,y:m.start.y+M*C.y},ctrl2:{x:m.end.x+k*y.x,y:m.end.y+k*y.y},networkId:m.networkId,t1:_,t2:f,perpDir1:C,perpDir2:y,d1:M,d2:k,containedBy:g[I],contains:h[I]}}),this.sampledPoints=this.traces.map(()=\u003enew Float64Array(12)),this.traceBounds=this.traces.map(()=\u003e({minX:0,maxX:0,minY:0,maxY:0})),this.updateSampledTraces(),this.updateCollisionPairs()}updateSampledTraces(){for(let e=0;e\u003cthis.traces.length;e++){const n=this.traces[e];Bae(n.waypointPair.start.x,n.waypointPair.start.y,n.ctrl1.x,n.ctrl1.y,n.ctrl2.x,n.ctrl2.y,n.waypointPair.end.x,n.waypointPair.end.y,this.sampledPoints[e],5),this.traceBounds[e]=C1t(this.sampledPoints[e],6)}}updateSingleTraceSample(e){const n=this.traces[e];Bae(n.waypointPair.start.x,n.waypointPair.start.y,n.ctrl1.x,n.ctrl1.y,n.ctrl2.x,n.ctrl2.y,n.waypointPair.end.x,n.waypointPair.end.y,this.sampledPoints[e],5),this.traceBounds[e]=C1t(this.sampledPoints[e],6)}updateControlPointsFromDistances(e){const n=this.traces[e],{minX:o,maxX:i,minY:r,maxY:s}=this.problem.bounds,a=1e-6;let A=n.waypointPair.start.x+n.d1*n.perpDir1.x,c=n.waypointPair.start.y+n.d1*n.perpDir1.y,l=n.waypointPair.end.x+n.d2*n.perpDir2.x,u=n.waypointPair.end.y+n.d2*n.perpDir2.y;const g=n.waypointPair.start;Math.abs(g.x-o)\u003ca\u0026\u0026(A=Math.max(A,o)),Math.abs(g.x-i)\u003ca\u0026\u0026(A=Math.min(A,i)),Math.abs(g.y-r)\u003ca\u0026\u0026(c=Math.max(c,r)),Math.abs(g.y-s)\u003ca\u0026\u0026(c=Math.min(c,s));const h=n.waypointPair.end;Math.abs(h.x-o)\u003ca\u0026\u0026(l=Math.max(l,o)),Math.abs(h.x-i)\u003ca\u0026\u0026(l=Math.min(l,i)),Math.abs(h.y-r)\u003ca\u0026\u0026(u=Math.max(u,r)),Math.abs(h.y-s)\u003ca\u0026\u0026(u=Math.min(u,s)),A=Math.max(o,Math.min(i,A)),c=Math.max(r,Math.min(s,c)),l=Math.max(o,Math.min(i,l)),u=Math.max(r,Math.min(s,u)),n.ctrl1.x=A,n.ctrl1.y=c,n.ctrl2.x=l,n.ctrl2.y=u}updateCollisionPairs(){const e=this.effectiveTraceToTraceSpacing;this.collisionPairs=[];for(let n=0;n\u003cthis.traces.length;n++)for(let o=n+1;o\u003cthis.traces.length;o++){const i=this.traces[n],r=this.traces[o];if(i.networkId\u0026\u0026r.networkId\u0026\u0026i.networkId===r.networkId)continue;const s=this.traceBounds[n],a=this.traceBounds[o];s.maxX+e\u003e=a.minX\u0026\u0026a.maxX+e\u003e=s.minX\u0026\u0026s.maxY+e\u003e=a.minY\u0026\u0026a.maxY+e\u003e=s.minY\u0026\u0026this.collisionPairs.push([n,o])}}computeTotalCost(){const{preferredObstacleToTraceSpacing:e}=this.problem,n=this.effectiveTraceToTraceSpacing,o=n**2,i=e**2;let r=0;for(const[s,a]of this.collisionPairs){const A=this.sampledPoints[s],c=this.sampledPoints[a];for(let l=0;l\u003c5;l++){const u=A[2*l],g=A[2*l+1],h=A[2*(l+1)],d=A[2*(l+1)+1];for(let p=0;p\u003c5;p++){const m=Sae(u,g,h,d,c[2*p],c[2*p+1],c[2*(p+1)],c[2*(p+1)+1]);m\u003co\u0026\u0026(r+=(n-Math.sqrt(m))**2,m\u003c1e-18\u0026\u0026(r+=20*o))}}}for(let s=0;s\u003cthis.traces.length;s++){const a=this.traces[s],A=this.sampledPoints[s],c=this.traceBounds[s];for(let l=0;l\u003cthis.numObstacleSegments;l++){if(a.networkId\u0026\u0026this.obstacleNetworkIds[l]\u0026\u0026a.networkId===this.obstacleNetworkIds[l])continue;const u=4*l,g=this.obstacleSegments[u],h=this.obstacleSegments[u+1],d=this.obstacleSegments[u+2],p=this.obstacleSegments[u+3],m=Math.min(g,d),_=Math.max(g,d),f=Math.min(h,p),I=Math.max(h,p);if(!(c.maxX+e\u003cm||_+e\u003cc.minX||c.maxY+e\u003cf||I+e\u003cc.minY))for(let C=0;C\u003c5;C++){const y=Sae(A[2*C],A[2*C+1],A[2*(C+1)],A[2*(C+1)+1],g,h,d,p);y\u003ci\u0026\u0026(r+=(e-Math.sqrt(y))**2,y\u003c1e-18\u0026\u0026(r+=20*i))}}}return r}computeCostForTrace(e){const{preferredObstacleToTraceSpacing:n}=this.problem,o=this.effectiveTraceToTraceSpacing,i=o**2,r=n**2,s=this.traces[e],a=this.sampledPoints[e],A=this.traceBounds[e];let c=0;for(let l=0;l\u003cthis.traces.length;l++){if(l===e)continue;const u=this.traces[l];if(s.networkId\u0026\u0026u.networkId\u0026\u0026s.networkId===u.networkId)continue;const g=this.traceBounds[l];if(A.maxX+o\u003cg.minX||g.maxX+o\u003cA.minX||A.maxY+o\u003cg.minY||g.maxY+o\u003cA.minY)continue;const h=this.sampledPoints[l];for(let d=0;d\u003c5;d++){const p=a[2*d],m=a[2*d+1],_=a[2*(d+1)],f=a[2*(d+1)+1];for(let I=0;I\u003c5;I++){const C=Sae(p,m,_,f,h[2*I],h[2*I+1],h[2*(I+1)],h[2*(I+1)+1]);C\u003ci\u0026\u0026(c+=(o-Math.sqrt(C))**2,C\u003c1e-18\u0026\u0026(c+=20*i))}}}for(let l=0;l\u003cthis.numObstacleSegments;l++){if(s.networkId\u0026\u0026this.obstacleNetworkIds[l]\u0026\u0026s.networkId===this.obstacleNetworkIds[l])continue;const u=4*l,g=this.obstacleSegments[u],h=this.obstacleSegments[u+1],d=this.obstacleSegments[u+2],p=this.obstacleSegments[u+3],m=Math.min(g,d),_=Math.max(g,d),f=Math.min(h,p),I=Math.max(h,p);if(!(A.maxX+n\u003cm||_+n\u003cA.minX||A.maxY+n\u003cf||I+n\u003cA.minY))for(let C=0;C\u003c5;C++){const y=Sae(a[2*C],a[2*C+1],a[2*(C+1)],a[2*(C+1)+1],g,h,d,p);y\u003cr\u0026\u0026(c+=(n-Math.sqrt(y))**2,y\u003c1e-18\u0026\u0026(c+=20*r))}}return c}tracesIntersect(e,n){const o=this.traces[e],i=this.traces[n],r=15,s=new Float64Array(32),a=new Float64Array(32);Bae(o.waypointPair.start.x,o.waypointPair.start.y,o.ctrl1.x,o.ctrl1.y,o.ctrl2.x,o.ctrl2.y,o.waypointPair.end.x,o.waypointPair.end.y,s,r),Bae(i.waypointPair.start.x,i.waypointPair.start.y,i.ctrl1.x,i.ctrl1.y,i.ctrl2.x,i.ctrl2.y,i.waypointPair.end.x,i.waypointPair.end.y,a,r);for(let A=0;A\u003cr;A++){const c=s[2*A],l=s[2*A+1],u=s[2*(A+1)],g=s[2*(A+1)+1];for(let h=0;h\u003cr;h++)if(Ieo(c,l,u,g,a[2*h],a[2*h+1],a[2*(h+1)],a[2*(h+1)+1]))return!0}return!1}findIntersectingPairs(){const e=[];for(let n=0;n\u003cthis.traces.length;n++)for(let o=n+1;o\u003cthis.traces.length;o++){const i=this.traces[n],r=this.traces[o];if(i.networkId\u0026\u0026r.networkId\u0026\u0026i.networkId===r.networkId)continue;const s=this.traceBounds[n],a=this.traceBounds[o];s.maxX\u003ca.minX||a.maxX\u003cs.minX||s.maxY\u003ca.minY||a.maxY\u003cs.minY||this.tracesIntersect(n,o)\u0026\u0026e.push([n,o])}return e}resolveIntersections(){const{bounds:e,preferredTraceToTraceSpacing:n}=this.problem,{minX:o,maxX:i,minY:r,maxY:s}=e,a=Math.min(i-o,s-r),A=.02*a,c=1.5*a,l=this.findIntersectingPairs();if(l.length===0)return 0;let u=0;for(const[g,h]of l){const d=this.traces[g],p=this.traces[h];if(!this.tracesIntersect(g,h))continue;let m,_;d.containedBy.includes(h)?(m=h,_=g):p.containedBy.includes(g)||(d.d1+d.d2)/2\u003c(p.d1+p.d2)/2?(m=g,_=h):(m=h,_=g);const f=this.traces[m],I=this.traces[_],C=f.d1,y=f.d2,x=I.d1,E=I.d2,B=2*n,S=[{innerMult:1,outerMult:0},{innerMult:0,outerMult:1},{innerMult:.5,outerMult:.5},{innerMult:2,outerMult:0},{innerMult:1,outerMult:1},{innerMult:3,outerMult:0},{innerMult:2,outerMult:1},{innerMult:4,outerMult:0}];let Q=this.computeTotalCost(),w=null;for(const M of S)if(f.d1=C,f.d2=y,I.d1=x,I.d2=E,I.d1=Math.min(c,x+B*M.innerMult),I.d2=Math.min(c,E+B*M.innerMult),f.d1=Math.max(A,C-B*M.outerMult),f.d2=Math.max(A,y-B*M.outerMult),this.updateControlPointsFromDistances(_),this.updateControlPointsFromDistances(m),this.updateSingleTraceSample(_),this.updateSingleTraceSample(m),!this.tracesIntersect(m,_)){const k=this.computeTotalCost();(w===null||k\u003cQ)\u0026\u0026(Q=k,w=M)}w?(I.d1=Math.min(c,x+B*w.innerMult),I.d2=Math.min(c,E+B*w.innerMult),f.d1=Math.max(A,C-B*w.outerMult),f.d2=Math.max(A,y-B*w.outerMult),this.updateControlPointsFromDistances(_),this.updateControlPointsFromDistances(m),this.updateSingleTraceSample(_),this.updateSingleTraceSample(m),u++):(f.d1=C,f.d2=y,I.d1=x,I.d2=E,this.updateControlPointsFromDistances(m),this.updateControlPointsFromDistances(_),this.updateSingleTraceSample(m),this.updateSingleTraceSample(_))}return u}optimizeStep(){const{bounds:e}=this.problem,{minX:n,maxX:o,minY:i,maxY:r}=e,s=Math.min(o-n,r-i),a=this.effectiveTraceToTraceSpacing,A=4*(1-this.optimizationStep/this.maxOptimizationSteps)+.5,c=.02*s,l=1.5*s,u=[];for(let g=0;g\u003cthis.traces.length;g++)u.push({idx:g,cost:this.computeCostForTrace(g)});u.sort((g,h)=\u003eh.cost-g.cost);for(const{idx:g,cost:h}of u){if(h===0)continue;const d=this.traces[g],p=h\u003e100?2:1,m=[A*p,1.5*A*p,.5*A];for(const _ of m){const f=h\u003e100?[_,-_,2*_,2*-_,3*_,3*-_,2*a,2*-a]:[_,-_,2*_,2*-_];let I=this.computeCostForTrace(g),C=d.d1,y=d.d2;const x=d.d1,E=d.d2;for(const B of f){d.d1=Math.max(c,Math.min(l,x+B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const S=this.computeCostForTrace(g);S\u003cI\u0026\u0026(I=S,C=d.d1,y=E),d.d1=x,this.updateControlPointsFromDistances(g),d.d2=Math.max(c,Math.min(l,E+B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const Q=this.computeCostForTrace(g);Q\u003cI\u0026\u0026(I=Q,C=x,y=d.d2),d.d2=E,this.updateControlPointsFromDistances(g),d.d1=Math.max(c,Math.min(l,x+B)),d.d2=Math.max(c,Math.min(l,E+B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const w=this.computeCostForTrace(g);w\u003cI\u0026\u0026(I=w,C=d.d1,y=d.d2),d.d1=x,d.d2=E,this.updateControlPointsFromDistances(g),d.d1=Math.max(c,Math.min(l,x+B)),d.d2=Math.max(c,Math.min(l,E-B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const M=this.computeCostForTrace(g);M\u003cI\u0026\u0026(I=M,C=d.d1,y=d.d2),d.d1=x,d.d2=E,this.updateControlPointsFromDistances(g)}if(d.d1=C,d.d2=y,this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g),I\u003c.9*h)break}}this.optimizationStep%10==0\u0026\u0026this.updateCollisionPairs()}buildOutputTraces(){this.outputTraces=this.traces.map(e=\u003e({waypointPair:e.waypointPair,points:feo(e.waypointPair.start,e.ctrl1,e.ctrl2,e.waypointPair.end,20),networkId:e.networkId}))}_step(){if(this.traces.length===0\u0026\u0026(this.effectiveTraceToTraceSpacing=3*this.problem.preferredTraceToTraceSpacing,this.initializeTraces(),this.lastCost=this.computeTotalCost(),this.stagnantSteps=0),this.optimizationStep\u003cthis.maxOptimizationSteps){const n=3+-2*(this.optimizationStep/this.maxOptimizationSteps);this.effectiveTraceToTraceSpacing=this.problem.preferredTraceToTraceSpacing*n,this.optimizeStep(),this.optimizationStep++,this.optimizationStep%10==0\u0026\u0026this.resolveIntersections()\u003e0\u0026\u0026this.updateCollisionPairs();const o=this.computeTotalCost();o===0?this.optimizationStep=this.maxOptimizationSteps:o\u003e=.99*this.lastCost?(this.stagnantSteps++,this.stagnantSteps\u003e10\u0026\u0026(this.resolveIntersections()\u003e0?(this.updateCollisionPairs(),this.stagnantSteps=0):this.stagnantSteps\u003e15\u0026\u0026(this.optimizationStep=this.maxOptimizationSteps))):this.stagnantSteps=0,this.lastCost=o}this.optimizationStep\u003e=this.maxOptimizationSteps\u0026\u0026(this.resolveIntersections(),this.buildOutputTraces(),this.solved=!0)}visualize(){return this.traces.length\u003e0\u0026\u0026this.buildOutputTraces(),((e,n=[])=\u003e{const o={arrows:[],circles:[],lines:[],rects:[],coordinateSystem:\"cartesian\",points:[],texts:[],title:\"Curvy Trace Problem\"};o.lines.push({points:[{x:e.bounds.minX,y:e.bounds.minY},{x:e.bounds.maxX,y:e.bounds.minY},{x:e.bounds.maxX,y:e.bounds.maxY},{x:e.bounds.minX,y:e.bounds.maxY},{x:e.bounds.minX,y:e.bounds.minY}],strokeColor:\"rgba(0, 0, 0, 0.1)\"});for(const i of e.waypointPairs)o.points.push({...i.start,label:`start ${i.networkId??\"\"}`,color:l6e(i.networkId)}),o.points.push({...i.end,label:`end ${i.networkId??\"\"}`,color:l6e(i.networkId)});for(const i of e.obstacles)o.rects.push({center:i.center,width:i.maxX-i.minX,height:i.maxY-i.minY,fill:\"rgba(128, 128, 128, 0.3)\",stroke:\"rgba(128, 128, 128, 0.8)\",label:`netId: ${i.networkId}`});for(const i of n)o.lines.push({points:i.points,strokeColor:l6e(i.networkId)});return o})(this.problem,this.outputTraces)}},x1t=class extends yr{getSolverName(){return\"CurvyIntraNodeSolver\"}nodeWithPortPoints;colorMap;traceWidth;viaDiameter;adjacentObstacles;routes=[];curvyTraceSolver;phase=\"initializing\";constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.colorMap=e.colorMap??{},this.traceWidth=e.traceWidth??.15,this.viaDiameter=e.viaDiameter??.3,this.adjacentObstacles=e.adjacentObstacles??[],this.MAX_ITERATIONS=1e3}_step(){switch(this.phase){case\"initializing\":this._initializeCurvySolver();break;case\"solving\":this._stepCurvySolver();break;case\"done\":this.solved=!0}}_initializeCurvySolver(){const e=this.nodeWithPortPoints,n={minX:e.center.x-e.width/2,minY:e.center.y-e.height/2,maxX:e.center.x+e.width/2,maxY:e.center.y+e.height/2},o=new Map;for(const s of e.portPoints)o.has(s.connectionName)||o.set(s.connectionName,[]),o.get(s.connectionName).push(s);const i=[];for(const[s,a]of o){if(a.length\u003c2)continue;const A=a[0],c=a[a.length-1];i.push({start:{x:A.x,y:A.y},end:{x:c.x,y:c.y},networkId:s})}if(i.length===0)return void(this.phase=\"done\");const r={bounds:n,waypointPairs:i,obstacles:this.adjacentObstacles.map(s=\u003e({minX:s.minX,minY:s.minY,maxX:s.maxX,maxY:s.maxY,center:{x:(s.minX+s.maxX)/2,y:(s.minY+s.maxY)/2},networkId:s.networkId})),preferredTraceToTraceSpacing:2*this.traceWidth,preferredObstacleToTraceSpacing:2*this.traceWidth};this.curvyTraceSolver=new y1t(r),this.phase=\"solving\"}_stepCurvySolver(){this.curvyTraceSolver?(this.activeSubSolver=this.curvyTraceSolver,this.curvyTraceSolver.step(),this.curvyTraceSolver.solved?(this._convertOutputTraces(),this.phase=\"done\"):this.curvyTraceSolver.failed\u0026\u0026(this.error=this.curvyTraceSolver.error,this.failed=!0)):this.phase=\"done\"}_convertOutputTraces(){if(!this.curvyTraceSolver)return;const e=this.nodeWithPortPoints,n=new Map;for(const o of e.portPoints){const i=o.connectionName;n.has(i)||n.set(i,{connectionName:o.connectionName,rootConnectionName:o.rootConnectionName,z:o.z})}for(const o of this.curvyTraceSolver.outputTraces){const i=o.networkId??\"\",r=n.get(i);if(!r)continue;const s={connectionName:r.connectionName,rootConnectionName:r.rootConnectionName,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:o.points.map(a=\u003e({x:a.x,y:a.y,z:r.z})),vias:[]};this.routes.push(s)}}getConstructorParams(){return{nodeWithPortPoints:this.nodeWithPortPoints,colorMap:this.colorMap,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter,adjacentObstacles:this.adjacentObstacles}}visualize(){const e={lines:[],points:[],rects:[],circles:[]},n=this.nodeWithPortPoints;e.rects.push({center:n.center,width:n.width,height:n.height,fill:\"rgba(0, 200, 0, 0.1)\",stroke:\"rgba(0, 200, 0, 0.5)\",label:n.capacityMeshNodeId});for(const o of this.adjacentObstacles)e.rects.push({center:{x:(o.minX+o.maxX)/2,y:(o.minY+o.maxY)/2},width:o.maxX-o.minX,height:o.maxY-o.minY,fill:\"rgba(255, 0, 0, 0.1)\",stroke:\"rgba(255, 0, 0, 0.3)\",label:`obstacle: ${o.networkId??\"\"}`});if(this.curvyTraceSolver){const o=this.curvyTraceSolver.visualize();o.lines\u0026\u0026e.lines.push(...o.lines),o.points\u0026\u0026e.points.push(...o.points),o.rects\u0026\u0026e.rects.push(...o.rects),o.circles\u0026\u0026e.circles.push(...o.circles)}for(const o of this.routes){const i=this.colorMap[o.connectionName]??\"gray\";e.lines.push({points:o.route.map(r=\u003e({x:r.x,y:r.y})),strokeColor:i,strokeWidth:this.traceWidth,label:o.connectionName})}for(const o of n.portPoints){const i=this.colorMap[o.connectionName]??\"gray\";e.points.push({x:o.x,y:o.y,color:i,label:o.connectionName})}return e}},yeo=Object.create,E1t=Object.defineProperty,xeo=Object.getOwnPropertyDescriptor,B1t=Object.getOwnPropertyNames,Eeo=Object.getPrototypeOf,Beo=Object.prototype.hasOwnProperty,j3=(t,e)=\u003efunction(){return e||(0,t[B1t(t)[0]])((e={exports:{}}).exports,e),e.exports},Qae=j3({\"node_modules/binary-search-bounds/search-bounds.js\"(t,e){function n(A,c,l,u,g){for(var h=g+1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003e=0?(h=d,g=d-1):u=d+1}return h}function o(A,c,l,u,g){for(var h=g+1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003e0?(h=d,g=d-1):u=d+1}return h}function i(A,c,l,u,g){for(var h=u-1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003c0?(h=d,u=d+1):g=d-1}return h}function r(A,c,l,u,g){for(var h=u-1;u\u003c=g;){var d=u+g\u003e\u003e\u003e1,p=A[d];(l!==void 0?l(p,c):p-c)\u003c=0?(h=d,u=d+1):g=d-1}return h}function s(A,c,l,u,g){for(;u\u003c=g;){var h=u+g\u003e\u003e\u003e1,d=A[h],p=l!==void 0?l(d,c):d-c;if(p===0)return h;p\u003c=0?u=h+1:g=h-1}return-1}function a(A,c,l,u,g,h){return typeof l==\"function\"?h(A,c,l,u===void 0?0:0|u,g===void 0?A.length-1:0|g):h(A,c,void 0,l===void 0?0:0|l,u===void 0?A.length-1:0|u)}e.exports={ge:function(A,c,l,u,g){return a(A,c,l,u,g,n)},gt:function(A,c,l,u,g){return a(A,c,l,u,g,o)},lt:function(A,c,l,u,g){return a(A,c,l,u,g,i)},le:function(A,c,l,u,g){return a(A,c,l,u,g,r)},eq:function(A,c,l,u,g){return a(A,c,l,u,g,s)}}}}),u6e=j3({\"node_modules/two-product/two-product.js\"(t,e){e.exports=function(o,i,r){var s=o*i,a=n*o,A=a-(a-o),c=o-A,l=n*i,u=l-(l-i),g=i-u,h=c*g-(s-A*u-c*u-A*g);return r?(r[0]=h,r[1]=s,r):[h,s]};var n=+(Math.pow(2,27)+1)}}),b1t=j3({\"node_modules/robust-sum/robust-sum.js\"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1\u0026\u0026r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=o[u],m=g(p);d\u003cm?(a=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(a=p,(u+=1)\u003cr\u0026\u0026(m=g(p=o[u]))),l\u003ci\u0026\u0026d\u003cm||u\u003e=r?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l\u003ci\u0026\u0026u\u003cr;)d\u003cm?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=o[u]))),(y=(a=x)-(C=(I=s+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l\u003ci;)(y=(a=x)-(C=(I=(s=h)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)\u003ci\u0026\u0026(h=n[l]);for(;u\u003cr;)(y=(a=x)-(C=(I=(s=p)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)\u003cr\u0026\u0026(p=o[u]);return x\u0026\u0026(A[c++]=x),E\u0026\u0026(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),beo=j3({\"node_modules/two-sum/two-sum.js\"(t,e){e.exports=function(n,o,i){var r=n+o,s=r-n,a=o-s,A=n-(r-s);return i?(i[0]=A+a,i[1]=r,i):[A+a,r]}}}),S1t=j3({\"node_modules/robust-scale/robust-scale.js\"(t,e){var n=u6e(),o=beo();e.exports=function(i,r){var s=i.length;if(s===1){var a=n(i[0],r);return a[0]?a:[a[1]]}var A=new Array(2*s),c=[.1,.1],l=[.1,.1],u=0;n(i[0],r,c),c[0]\u0026\u0026(A[u++]=c[0]);for(var g=1;g\u003cs;++g){n(i[g],r,l);var h=c[1];o(h,l[0],c),c[0]\u0026\u0026(A[u++]=c[0]);var d=l[1],p=c[1],m=d+p,_=p-(m-d);c[1]=m,_\u0026\u0026(A[u++]=_)}return c[1]\u0026\u0026(A[u++]=c[1]),u===0\u0026\u0026(A[u++]=0),A.length=u,A}}}),Q1t=j3({\"node_modules/robust-subtract/robust-diff.js\"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1\u0026\u0026r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],-o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=-o[u],m=g(p);d\u003cm?(a=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(a=p,(u+=1)\u003cr\u0026\u0026(m=g(p=-o[u]))),l\u003ci\u0026\u0026d\u003cm||u\u003e=r?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=-o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l\u003ci\u0026\u0026u\u003cr;)d\u003cm?(s=h,(l+=1)\u003ci\u0026\u0026(d=g(h=n[l]))):(s=p,(u+=1)\u003cr\u0026\u0026(m=g(p=-o[u]))),(y=(a=x)-(C=(I=s+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l\u003ci;)(y=(a=x)-(C=(I=(s=h)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)\u003ci\u0026\u0026(h=n[l]);for(;u\u003cr;)(y=(a=x)-(C=(I=(s=p)+a)-s))\u0026\u0026(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)\u003cr\u0026\u0026(p=-o[u]);return x\u0026\u0026(A[c++]=x),E\u0026\u0026(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),Seo=j3({\"node_modules/robust-orientation/orientation.js\"(t,e){var n=u6e(),o=b1t(),i=S1t(),r=Q1t();function s(p,m,_,f){return function(I,C,y){var x=p(p(m(C[1],y[0]),m(-y[1],C[0])),p(m(I[1],C[0]),m(-C[1],I[0]))),E=p(m(I[1],y[0]),m(-y[1],I[0])),B=f(x,E);return B[B.length-1]}}function a(p,m,_,f){return function(I,C,y,x){var E=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2])))),B=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2])))),S=f(E,B);return S[S.length-1]}}function A(p,m,_,f){return function(I,C,y,x,E){var B=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),C[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),-y[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),x[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),-E[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-C[3])))),p(p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),x[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),-E[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),I[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-C[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-x[3]))))),S=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-y[3])),p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),x[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-E[3]))),p(p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),I[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),-C[3])),p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-E[3])))),Q=f(B,S);return Q[Q.length-1]}}function c(p){return(p===3?s:p===4?a:A)(o,n,i,r)}var l=c(3),u=c(4),g=[function(){return 0},function(){return 0},function(p,m){return m[0]-p[0]},function(p,m,_){var f,I=(p[1]-_[1])*(m[0]-_[0]),C=(p[0]-_[0])*(m[1]-_[1]),y=I-C;if(I\u003e0){if(C\u003c=0)return y;f=I+C}else{if(!(I\u003c0)||C\u003e=0)return y;f=-(I+C)}var x=33306690738754716e-32*f;return y\u003e=x||y\u003c=-x?y:l(p,m,_)},function(p,m,_,f){var I=p[0]-f[0],C=m[0]-f[0],y=_[0]-f[0],x=p[1]-f[1],E=m[1]-f[1],B=_[1]-f[1],S=p[2]-f[2],Q=m[2]-f[2],w=_[2]-f[2],M=C*B,k=y*E,R=y*x,F=I*B,O=I*E,U=C*x,Y=S*(M-k)+Q*(R-F)+w*(O-U),W=7771561172376103e-31*((Math.abs(M)+Math.abs(k))*Math.abs(S)+(Math.abs(R)+Math.abs(F))*Math.abs(Q)+(Math.abs(O)+Math.abs(U))*Math.abs(w));return Y\u003eW||-Y\u003eW?Y:u(p,m,_,f)}];function h(p){var m=g[p.length];return m||(m=g[p.length]=c(p.length)),m.apply(void 0,p)}function d(p,m,_,f,I,C,y){return function(x,E,B,S,Q){switch(arguments.length){case 0:case 1:return 0;case 2:return f(x,E);case 3:return I(x,E,B);case 4:return C(x,E,B,S);case 5:return y(x,E,B,S,Q)}for(var w=new Array(arguments.length),M=0;M\u003carguments.length;++M)w[M]=arguments[M];return p(w)}}(function(){for(;g.length\u003c=5;)g.push(c(g.length));e.exports=d.apply(void 0,[h].concat(g));for(var p=0;p\u003c=5;++p)e.exports[p]=g[p]})()}}),Qeo=j3({\"node_modules/cdt2d/lib/monotone.js\"(t,e){var n=Qae(),o=Seo()[3];function i(g,h,d,p,m){this.a=g,this.b=h,this.idx=d,this.lowerIds=p,this.upperIds=m}function r(g,h,d,p){this.a=g,this.b=h,this.type=d,this.idx=p}function s(g,h){var d=g.a[0]-h.a[0]||g.a[1]-h.a[1]||g.type-h.type;return d||(g.type!==0\u0026\u0026(d=o(g.a,g.b,h.b))?d:g.idx-h.idx)}function a(g,h){return o(g.a,g.b,h)}function A(g,h,d,p,m){for(var _=n.lt(h,p,a),f=n.gt(h,p,a),I=_;I\u003cf;++I){for(var C=h[I],y=C.lowerIds,x=y.length;x\u003e1\u0026\u0026o(d[y[x-2]],d[y[x-1]],p)\u003e0;)g.push([y[x-1],y[x-2],m]),x-=1;y.length=x,y.push(m);var E=C.upperIds;for(x=E.length;x\u003e1\u0026\u0026o(d[E[x-2]],d[E[x-1]],p)\u003c0;)g.push([E[x-2],E[x-1],m]),x-=1;E.length=x,E.push(m)}}function c(g,h){var d;return(d=g.a[0]\u003ch.a[0]?o(g.a,g.b,h.a):o(h.b,h.a,g.a))?d:(d=h.b[0]\u003cg.b[0]?o(g.a,g.b,h.b):o(h.b,h.a,g.b))||g.idx-h.idx}function l(g,h,d){var p=n.le(g,d,c),m=g[p],_=m.upperIds,f=_[_.length-1];m.upperIds=[f],g.splice(p+1,0,new i(d.a,d.b,d.idx,[f],_))}function u(g,h,d){var p=d.a;d.a=d.b,d.b=p;var m=n.eq(g,d,c),_=g[m];g[m-1].upperIds=_.upperIds,g.splice(m,1)}e.exports=function(g,h){for(var d=g.length,p=h.length,m=[],_=0;_\u003cd;++_)m.push(new r(g[_],null,0,_));for(_=0;_\u003cp;++_){var f=h[_],I=g[f[0]],C=g[f[1]];I[0]\u003cC[0]?m.push(new r(I,C,2,_),new r(C,I,1,_)):I[0]\u003eC[0]\u0026\u0026m.push(new r(C,I,2,_),new r(I,C,1,_))}m.sort(s);for(var y=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),x=[new i([y,1],[y,0],-1,[],[])],E=[],B=(_=0,m.length);_\u003cB;++_){var S=m[_],Q=S.type;Q===0?A(E,x,g,S.a,S.idx):Q===2?l(x,g,S):u(x,g,S)}return E}}}),veo=j3({\"node_modules/cdt2d/lib/triangulation.js\"(t,e){var n=Qae();function o(s,a){this.stars=s,this.edges=a}e.exports=function(s,a){for(var A=new Array(s),c=0;c\u003cs;++c)A[c]=[];return new o(A,a)};var i=o.prototype;function r(s,a,A){for(var c=1,l=s.length;c\u003cl;c+=2)if(s[c-1]===a\u0026\u0026s[c]===A)return s[c-1]=s[l-2],s[c]=s[l-1],void(s.length=l-2)}i.isConstraint=(function(){var s=[0,0];function a(A,c){return A[0]-c[0]||A[1]-c[1]}return function(A,c){return s[0]=Math.min(A,c),s[1]=Math.max(A,c),n.eq(this.edges,s,a)\u003e=0}})(),i.removeTriangle=function(s,a,A){var c=this.stars;r(c[s],a,A),r(c[a],A,s),r(c[A],s,a)},i.addTriangle=function(s,a,A){var c=this.stars;c[s].push(a,A),c[a].push(A,s),c[A].push(s,a)},i.opposite=function(s,a){for(var A=this.stars[a],c=1,l=A.length;c\u003cl;c+=2)if(A[c]===s)return A[c-1];return-1},i.flip=function(s,a){var A=this.opposite(s,a),c=this.opposite(a,s);this.removeTriangle(s,a,A),this.removeTriangle(a,s,c),this.addTriangle(s,c,A),this.addTriangle(a,A,c)},i.edges=function(){for(var s=this.stars,a=[],A=0,c=s.length;A\u003cc;++A)for(var l=s[A],u=0,g=l.length;u\u003cg;u+=2)a.push([l[u],l[u+1]]);return a},i.cells=function(){for(var s=this.stars,a=[],A=0,c=s.length;A\u003cc;++A)for(var l=s[A],u=0,g=l.length;u\u003cg;u+=2){var h=l[u],d=l[u+1];A\u003cMath.min(h,d)\u0026\u0026a.push([A,h,d])}return a}}}),weo=j3({\"node_modules/robust-in-sphere/in-sphere.js\"(t,e){var n=u6e(),o=b1t(),i=Q1t(),r=S1t();function s(d){return(d===3?a:d===4?A:d===5?c:l)(o,i,n,r)}function a(d,p,m,_){return function(f,I,C){var y=m(f[0],f[0]),x=_(y,I[0]),E=_(y,C[0]),B=m(I[0],I[0]),S=_(B,f[0]),Q=_(B,C[0]),w=m(C[0],C[0]),M=_(w,f[0]),k=_(w,I[0]),R=d(p(k,Q),p(S,x)),F=p(M,E),O=p(R,F);return O[O.length-1]}}function A(d,p,m,_){return function(f,I,C,y){var x=d(m(f[0],f[0]),m(f[1],f[1])),E=_(x,I[0]),B=_(x,C[0]),S=_(x,y[0]),Q=d(m(I[0],I[0]),m(I[1],I[1])),w=_(Q,f[0]),M=_(Q,C[0]),k=_(Q,y[0]),R=d(m(C[0],C[0]),m(C[1],C[1])),F=_(R,f[0]),O=_(R,I[0]),U=_(R,y[0]),Y=d(m(y[0],y[0]),m(y[1],y[1])),W=_(Y,f[0]),te=_(Y,I[0]),j=_(Y,C[0]),J=d(d(_(p(j,U),I[1]),d(_(p(te,k),-C[1]),_(p(O,M),y[1]))),d(_(p(te,k),f[1]),d(_(p(W,S),-I[1]),_(p(w,E),y[1])))),oe=d(d(_(p(j,U),f[1]),d(_(p(W,S),-C[1]),_(p(F,B),y[1]))),d(_(p(O,M),f[1]),d(_(p(F,B),-I[1]),_(p(w,E),C[1])))),ie=p(J,oe);return ie[ie.length-1]}}function c(d,p,m,_){return function(f,I,C,y,x){var E=d(m(f[0],f[0]),d(m(f[1],f[1]),m(f[2],f[2]))),B=_(E,I[0]),S=_(E,C[0]),Q=_(E,y[0]),w=_(E,x[0]),M=d(m(I[0],I[0]),d(m(I[1],I[1]),m(I[2],I[2]))),k=_(M,f[0]),R=_(M,C[0]),F=_(M,y[0]),O=_(M,x[0]),U=d(m(C[0],C[0]),d(m(C[1],C[1]),m(C[2],C[2]))),Y=_(U,f[0]),W=_(U,I[0]),te=_(U,y[0]),j=_(U,x[0]),J=d(m(y[0],y[0]),d(m(y[1],y[1]),m(y[2],y[2]))),oe=_(J,f[0]),ie=_(J,I[0]),ne=_(J,C[0]),le=_(J,x[0]),ge=d(m(x[0],x[0]),d(m(x[1],x[1]),m(x[2],x[2]))),_e=_(ge,f[0]),ue=_(ge,I[0]),fe=_(ge,C[0]),pe=_(ge,y[0]),ye=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),I[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),-C[2]),_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),y[2]))),d(_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),-x[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-I[2])))),d(d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),y[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),-x[2]),_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),f[2]))),d(_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-I[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-y[2]))))),Me=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-C[2])),d(_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),y[2]),_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-x[2]))),d(d(_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),f[2]),_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),-I[2])),d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-x[2])))),ve=p(ye,Me);return ve[ve.length-1]}}function l(d,p,m,_){return function(f,I,C,y,x,E){var B=d(d(m(f[0],f[0]),m(f[1],f[1])),d(m(f[2],f[2]),m(f[3],f[3]))),S=_(B,I[0]),Q=_(B,C[0]),w=_(B,y[0]),M=_(B,x[0]),k=_(B,E[0]),R=d(d(m(I[0],I[0]),m(I[1],I[1])),d(m(I[2],I[2]),m(I[3],I[3]))),F=_(R,f[0]),O=_(R,C[0]),U=_(R,y[0]),Y=_(R,x[0]),W=_(R,E[0]),te=d(d(m(C[0],C[0]),m(C[1],C[1])),d(m(C[2],C[2]),m(C[3],C[3]))),j=_(te,f[0]),J=_(te,I[0]),oe=_(te,y[0]),ie=_(te,x[0]),ne=_(te,E[0]),le=d(d(m(y[0],y[0]),m(y[1],y[1])),d(m(y[2],y[2]),m(y[3],y[3]))),ge=_(le,f[0]),_e=_(le,I[0]),ue=_(le,C[0]),fe=_(le,x[0]),pe=_(le,E[0]),ye=d(d(m(x[0],x[0]),m(x[1],x[1])),d(m(x[2],x[2]),m(x[3],x[3]))),Me=_(ye,f[0]),ve=_(ye,I[0]),he=_(ye,C[0]),Qe=_(ye,y[0]),Pe=_(ye,E[0]),we=d(d(m(E[0],E[0]),m(E[1],E[1])),d(m(E[2],E[2]),m(E[3],E[3]))),Te=_(we,f[0]),Re=_(we,I[0]),Ee=_(we,C[0]),ke=_(we,y[0]),Ce=_(we,x[0]),Le=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),I[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),y[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),f[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-I[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),C[3])),d(_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),E[3]))))),Ye=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),f[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),C[3]),_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),f[3]))),d(d(_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),-I[3]),_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),C[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),x[3]))))),tt=p(Le,Ye);return tt[tt.length-1]}}var u=[function(){return 0},function(){return 0},function(){return 0}];function g(d){var p=u[d.length];return p||(p=u[d.length]=s(d.length)),p.apply(void 0,d)}function h(d,p,m,_,f,I,C,y){return function(x,E,B,S,Q,w){switch(arguments.length){case 0:case 1:return 0;case 2:return _(x,E);case 3:return f(x,E,B);case 4:return I(x,E,B,S);case 5:return C(x,E,B,S,Q);case 6:return y(x,E,B,S,Q,w)}for(var M=new Array(arguments.length),k=0;k\u003carguments.length;++k)M[k]=arguments[k];return d(M)}}(function(){for(;u.length\u003c=6;)u.push(s(u.length));e.exports=h.apply(void 0,[g].concat(u));for(var d=0;d\u003c=6;++d)e.exports[d]=u[d]})()}}),Peo=j3({\"node_modules/cdt2d/lib/delaunay.js\"(t,e){var n=weo()[4];Qae();function o(i,r,s,a,A,c){var l=r.opposite(a,A);if(!(l\u003c0)){if(A\u003ca){var u=a;a=A,A=u,u=c,c=l,l=u}r.isConstraint(a,A)||n(i[a],i[A],i[c],i[l])\u003c0\u0026\u0026s.push(a,A)}}e.exports=function(i,r){for(var s=[],a=i.length,A=r.stars,c=0;c\u003ca;++c)for(var l=A[c],u=1;u\u003cl.length;u+=2)if(!((p=l[u])\u003cc)\u0026\u0026!r.isConstraint(c,p)){for(var g=l[u-1],h=-1,d=1;d\u003cl.length;d+=2)if(l[d-1]===p){h=l[d];break}h\u003c0||n(i[c],i[p],i[g],i[h])\u003c0\u0026\u0026s.push(c,p)}for(;s.length\u003e0;){for(var p=s.pop(),m=(g=-1,h=-1,l=A[c=s.pop()],1);m\u003cl.length;m+=2){var _=l[m-1],f=l[m];_===p?h=f:f===p\u0026\u0026(g=_)}g\u003c0||h\u003c0||n(i[c],i[p],i[g],i[h])\u003e=0||(r.flip(c,p),o(i,r,s,g,c,h),o(i,r,s,c,h,g),o(i,r,s,h,p,g),o(i,r,s,p,g,h))}}}}),Meo=j3({\"node_modules/cdt2d/lib/filter.js\"(t,e){var n=Qae();function o(r,s,a,A,c,l,u){this.cells=r,this.neighbor=s,this.flags=A,this.constraint=a,this.active=c,this.next=l,this.boundary=u}function i(r,s){return r[0]-s[0]||r[1]-s[1]||r[2]-s[2]}e.exports=function(r,s,a){var A=(function(y,x){for(var E=y.cells(),B=E.length,S=0;S\u003cB;++S){var Q=(te=E[S])[0],w=te[1],M=te[2];w\u003cM?w\u003cQ\u0026\u0026(te[0]=w,te[1]=M,te[2]=Q):M\u003cQ\u0026\u0026(te[0]=M,te[1]=Q,te[2]=w)}E.sort(i);var k=new Array(B);for(S=0;S\u003ck.length;++S)k[S]=0;var R=[],F=[],O=new Array(3*B),U=new Array(3*B),Y=null;x\u0026\u0026(Y=[]);var W=new o(E,O,U,k,R,F,Y);for(S=0;S\u003cB;++S)for(var te=E[S],j=0;j\u003c3;++j){Q=te[j],w=te[(j+1)%3];var J=O[3*S+j]=W.locate(w,Q,y.opposite(w,Q)),oe=U[3*S+j]=y.isConstraint(Q,w);J\u003c0\u0026\u0026(oe?F.push(S):(R.push(S),k[S]=1),x\u0026\u0026Y.push([w,Q,-1]))}return W})(r,a);if(s===0)return a?A.cells.concat(A.boundary):A.cells;for(var c=1,l=A.active,u=A.next,g=A.flags,h=A.cells,d=A.constraint,p=A.neighbor;l.length\u003e0||u.length\u003e0;){for(;l.length\u003e0;){var m=l.pop();if(g[m]!==-c){g[m]=c,h[m];for(var _=0;_\u003c3;++_){var f=p[3*m+_];f\u003e=0\u0026\u0026g[f]===0\u0026\u0026(d[3*m+_]?u.push(f):(l.push(f),g[f]=c))}}}var I=u;u=l,l=I,u.length=0,c=-c}var C=(function(y,x,E){for(var B=0,S=0;S\u003cy.length;++S)x[S]===E\u0026\u0026(y[B++]=y[S]);return y.length=B,y})(h,g,s);return a?C.concat(A.boundary):C},o.prototype.locate=(function(){var r=[0,0,0];return function(s,a,A){var c=s,l=a,u=A;return a\u003cA?a\u003cs\u0026\u0026(c=a,l=A,u=s):A\u003cs\u0026\u0026(c=A,l=s,u=a),c\u003c0?-1:(r[0]=c,r[1]=l,r[2]=u,n.eq(this.cells,r,i))}})()}}),Deo=j3({\"node_modules/cdt2d/cdt2d.js\"(t,e){var n=Qeo(),o=veo(),i=Peo(),r=Meo();function s(c){return[Math.min(c[0],c[1]),Math.max(c[0],c[1])]}function a(c,l){return c[0]-l[0]||c[1]-l[1]}function A(c,l,u){return l in c?c[l]:u}e.exports=function(c,l,u){Array.isArray(l)?(u=u||{},l=l||[]):(u=l||{},l=[]);var g=!!A(u,\"delaunay\",!0),h=!!A(u,\"interior\",!0),d=!!A(u,\"exterior\",!0),p=!!A(u,\"infinity\",!1);if(!h\u0026\u0026!d||c.length===0)return[];var m=n(c,l);if(g||h!==d||p){for(var _=o(c.length,(function(C){return C.map(s).sort(a)})(l)),f=0;f\u003cm.length;++f){var I=m[f];_.addTriangle(I[0],I[1],I[2])}return g\u0026\u0026i(c,_),d?h?p?r(_,0,p):_.cells():r(_,1,p):r(_,-1)}return m}}}),v1t=t=\u003et.map(e=\u003e({connectionId:e.connectionId,startRegionId:e.startRegion.regionId,endRegionId:e.endRegion.regionId,mutuallyConnectedNetworkId:e.mutuallyConnectedNetworkId})),w1t=t=\u003e({ports:t.ports.map(e=\u003e({portId:e.portId,region1Id:e.region1.regionId,region2Id:e.region2.regionId,d:e.d})),regions:t.regions.map(e=\u003e({regionId:e.regionId,pointIds:e.ports.map(n=\u003en.portId),d:e.d}))}),g6e=({port:t,boundaryRegionMap:e})=\u003e{let n=e.get(t.portId);if(!n){const o=typeof t.d?.x==\"number\"?t.d.x:0,i=typeof t.d?.y==\"number\"?t.d.y:0;n={regionId:`__section_boundary__${t.portId}`,ports:[],d:{isBoundaryRegion:!0,boundaryPortId:t.portId,...t.d,center:{x:o,y:i},bounds:{minX:o-.05,maxX:o+.05,minY:i-.05,maxY:i+.05}},assignments:[]},e.set(t.portId,n)}return n},Neo=t=\u003e{const{sectionRoute:e,graph:n}=t,o=new Set(n.ports.map(a=\u003ea.portId)),i=e.globalRoute.path.slice(e.sectionStartIndex,e.sectionEndIndex+1).filter(a=\u003eo.has(a.port.portId)),r=[];let s=e.sectionConnection.startRegion;for(let a=0;a\u003ci.length;a++){const A=i[a],c=n.ports.find(u=\u003eu.portId===A.port.portId),l=c.region1===s?c.region2:c.region1;r.push({port:c,g:0,h:0,f:0,hops:a,ripRequired:A.ripRequired,parent:a\u003e0?r[a-1]:void 0,lastPort:a\u003e0?r[a-1].port:void 0,lastRegion:a\u003e0?s:void 0,nextRegion:l}),s=l}return{connection:e.sectionConnection,path:r,requiredRip:e.globalRoute.requiredRip}},Reo=(t,e)=\u003e{let n=-1,o=-1;for(let i=0;i\u003ct.path.length;i++){const r=t.path[i];(r.lastRegion\u0026\u0026e.has(r.lastRegion.regionId)||r.nextRegion\u0026\u0026e.has(r.nextRegion.regionId))\u0026\u0026(n===-1\u0026\u0026(n=i),o=i)}return n===-1?null:{startIndex:n,endIndex:o}},Teo=t=\u003e{const{graph:e,solvedRoutes:n,centralRegion:o,expansionHopsFromCentralRegion:i}=t,r=(({centralRegion:d,expansionHopsFromCentralRegion:p})=\u003e{const m=new Set([d.regionId]),_=[{region:d,hops:0}];for(;_.length\u003e0;){const{region:f,hops:I}=_.shift();if(!(I\u003e=p+1))for(const C of f.ports){const y=C.region1===f?C.region2:C.region1;m.has(y.regionId)||(m.add(y.regionId),_.push({region:y,hops:I+1}))}}return m})({centralRegion:o,expansionHopsFromCentralRegion:i}),s=new Map,a=new Map,A=[];for(const d of e.regions)r.has(d.regionId)\u0026\u0026s.set(d.regionId,{regionId:d.regionId,ports:[],d:d.d?structuredClone(d.d):d.d,assignments:[]});for(const d of e.ports){const p=r.has(d.region1.regionId),m=r.has(d.region2.regionId);if(!p\u0026\u0026!m)continue;if(p\u0026\u0026m){const C={portId:d.portId,region1:s.get(d.region1.regionId),region2:s.get(d.region2.regionId),d:d.d};C.region1.ports.push(C),C.region2.ports.push(C),A.push(C);continue}const _=p?d.region1:d.region2,f=g6e({port:d,boundaryRegionMap:a}),I={portId:d.portId,region1:s.get(_.regionId),region2:f,d:d.d};I.region1.ports.push(I),I.region2.ports.push(I),A.push(I)}const c={regions:[...s.values(),...a.values()],ports:A},l=[],u=[],g=[];for(const d of n){const p=Reo(d,r);if(!p)continue;const m=d.path[p.startIndex],_=d.path[p.endIndex];g.push({solvedRoute:d,solvedPathStartIndex:p.startIndex,solvedPathEndIndex:p.endIndex,startCandidate:m,endCandidate:_})}const h=new Map(c.regions.map(d=\u003e[d.regionId,d]));for(const{solvedRoute:d,solvedPathStartIndex:p,solvedPathEndIndex:m,startCandidate:_,endCandidate:f}of g){let I,C,y,x;if(r.has(d.connection.startRegion.regionId))I=d.connection.startRegion.regionId,C=h.get(I);else{const Q=g6e({port:_.port,boundaryRegionMap:a});I=Q.regionId,C=Q,h.has(I)||h.set(I,Q)}if(r.has(d.connection.endRegion.regionId))y=d.connection.endRegion.regionId,x=h.get(y);else{const Q=g6e({port:f.port,boundaryRegionMap:a});y=Q.regionId,x=Q,h.has(y)||h.set(y,Q)}if(!C)throw console.error(\"[getSectionOfHyperGraphAsHyperGraph] CRITICAL ERROR: startRegion not found!\"),console.error(` Looking for: ${I}`),console.error(` Route connection: ${d.connection.connectionId}`),console.error(` Original startRegion: ${d.connection.startRegion.regionId}`),console.error(` startCandidate port: ${_.port.portId}`),console.error(\" Available regions in sectionRegionMap:\",Array.from(h.keys())),new Error(`startRegion ${I} not found in sectionRegionMap`);if(!x)throw console.error(\"[getSectionOfHyperGraphAsHyperGraph] CRITICAL ERROR: endRegion not found!\"),console.error(` Looking for: ${y}`),console.error(` Route connection: ${d.connection.connectionId}`),console.error(` Original endRegion: ${d.connection.endRegion.regionId}`),console.error(` endCandidate port: ${f.port.portId}`),console.error(\" Available regions in sectionRegionMap:\",Array.from(h.keys())),new Error(`endRegion ${y} not found in sectionRegionMap`);const E={connectionId:d.connection.connectionId,mutuallyConnectedNetworkId:d.connection.mutuallyConnectedNetworkId,startRegion:C,endRegion:x},B=d.path.slice(p,m+1),S={globalRoute:d,globalConnection:d.connection,sectionConnection:E,sectionStartIndex:p,sectionEndIndex:m};l.push({...S,canRemainFixedInSectionSolve:B.every(Q=\u003ec.ports.some(w=\u003ew.portId===Q.port.portId)),sectionRoute:Neo({sectionRoute:S,graph:c})}),u.push(E)}return{centralRegionId:o.regionId,sectionRegionIds:r,graph:c,connections:u,sectionRoutes:l}},P1t=class{heap=[];maxSize;constructor(e=[],n=1e4){if(this.maxSize=n,e.length\u003e0){this.heap=[...e].sort((o,i)=\u003eo.f-i.f).slice(0,this.maxSize);for(let o=Math.floor(this.heap.length/2)-1;o\u003e=0;o--)this._siftDown(o)}}get size(){return this.heap.length}isEmpty(){return this.heap.length===0}peek(){return this.isEmpty()?null:this.heap[0]??null}peekMany(e){return[...this.heap].sort((n,o)=\u003en.f-o.f).slice(0,e)}dequeue(){if(this.isEmpty())return null;const e=this.heap[0],n=this.heap.pop();return this.heap.length===0\u0026\u0026n!==void 0||n!==void 0\u0026\u0026(this.heap[0]=n,this._siftDown(0)),e}enqueue(e){this.heap.length\u003e=this.maxSize||(this.heap.push(e),this._siftUp(this.heap.length-1))}_siftUp(e){let n=e;for(;n\u003e0;){const o=this._parentIndex(n);if(this.heap[o].f\u003c=this.heap[n].f)break;this._swap(n,o),n=o}}_siftDown(e){let n=e;const o=this.heap.length;for(;;){const i=this._leftChildIndex(n),r=this._rightChildIndex(n);let s=n;if(i\u003co\u0026\u0026this.heap[i].f\u003cthis.heap[s].f\u0026\u0026(s=i),r\u003co\u0026\u0026this.heap[r].f\u003cthis.heap[s].f\u0026\u0026(s=r),s===n)break;this._swap(n,s),n=s}}_swap(e,n){[this.heap[e],this.heap[n]]=[this.heap[n],this.heap[e]]}_parentIndex(e){return Math.floor((e-1)/2)}_leftChildIndex(e){return 2*e+1}_rightChildIndex(e){return 2*e+2}},M1t=t=\u003e{for(const e of t.regions)e.assignments=[];for(const e of t.ports)e.assignment=void 0},d6e=({graph:t,connections:e,solvedRoutes:n})=\u003e{const o=new Map(t.ports.map(a=\u003e[a.portId,a])),i=new Map(t.regions.map(a=\u003e[a.regionId,a])),r=new Map(e.map(a=\u003e[a.connectionId,a])),s=n.map(a=\u003e{const A=[];for(const c of a.path){const l={port:o.get(c.port.portId),g:c.g,h:c.h,f:c.f,hops:c.hops,ripRequired:c.ripRequired};c.lastPort\u0026\u0026(l.lastPort=o.get(c.lastPort.portId)),c.lastRegion\u0026\u0026(l.lastRegion=i.get(c.lastRegion.regionId)),c.nextRegion\u0026\u0026(l.nextRegion=i.get(c.nextRegion.regionId));const u=A[A.length-1];u\u0026\u0026(l.parent=u),A.push(l)}return{path:A,connection:r.get(a.connection.connectionId),requiredRip:a.requiredRip}});M1t(t),t.solvedRoutes=s;for(const a of s)for(const A of a.path){if(A.port.assignment={solvedRoute:a,connection:a.connection},!A.lastPort||!A.lastRegion)continue;const c={regionPort1:A.lastPort,regionPort2:A.port,region:A.lastRegion,connection:a.connection,solvedRoute:a};A.lastRegion.assignments??=[],A.lastRegion.assignments.push(c)}return s},D1t=class extends zA{constructor(e){super(),this.input=e,this.graph=(o=\u003e{if(o.ports.length\u003e0\u0026\u0026\"region1\"in o.ports[0]\u0026\u0026typeof o.ports[0].region1==\"object\")return o;const i=new Map,r=new Map;for(const s of o.regions){const{assignments:a,...A}=s;r.set(s.regionId,{...A,d:A.d?structuredClone(A.d):A.d,ports:[],assignments:void 0})}for(const s of o.ports){const a=r.get(s.region1Id??s.region1?.regionId),A=r.get(s.region2Id??s.region2?.regionId),c={portId:s.portId,region1:a,region2:A,d:s.d};i.set(s.portId,c),a.ports.push(c),A.ports.push(c)}return{ports:Array.from(i.values()),regions:Array.from(r.values())}})(e.inputGraph),M1t(this.graph),this.connections=((o,i)=\u003e{const r=[];for(const s of o)\"startRegionId\"in s?r.push({connectionId:s.connectionId,mutuallyConnectedNetworkId:s.mutuallyConnectedNetworkId??s.connectionId,startRegion:i.regions.find(a=\u003ea.regionId===s.startRegionId),endRegion:i.regions.find(a=\u003ea.regionId===s.endRegionId)}):r.push(s);return r})(e.inputConnections,this.graph),e.inputSolvedRoutes?this.solvedRoutes=d6e({graph:this.graph,connections:this.connections,solvedRoutes:e.inputSolvedRoutes}):this.graph.solvedRoutes=this.solvedRoutes,e.greedyMultiplier!==void 0\u0026\u0026(this.greedyMultiplier=e.greedyMultiplier),e.rippingEnabled!==void 0\u0026\u0026(this.rippingEnabled=e.rippingEnabled),e.ripCost!==void 0\u0026\u0026(this.ripCost=e.ripCost);const n=new Set(this.solvedRoutes.map(o=\u003eo.connection.connectionId));this.unprocessedConnections=this.connections.filter(o=\u003e!n.has(o.connectionId)),this.candidateQueue=new P1t,this.unprocessedConnections.length===0?this.solved=!0:this.beginNewConnection()}getSolverName(){return\"HyperGraphSolver\"}graph;connections;candidateQueue;unprocessedConnections;solvedRoutes=[];currentConnection=null;currentEndRegion=null;greedyMultiplier=1;rippingEnabled=!1;ripCost=0;lastCandidate=null;visitedPointsForCurrentConnection=new Map;getConstructorParams(){return{inputGraph:w1t(this.graph),inputConnections:v1t(this.connections),greedyMultiplier:this.greedyMultiplier,rippingEnabled:this.rippingEnabled,ripCost:this.ripCost,inputSolvedRoutes:this.solvedRoutes}}computeH(e){return this.estimateCostToEnd(e.port)}estimateCostToEnd(e){return 0}getPortUsagePenalty(e){return 0}computeIncreasedRegionCostIfPortsAreUsed(e,n,o){return 0}getRipsRequiredForPortUsage(e,n,o){return[]}isRipRequiredForPortUsage(e,n,o){return!1}isTransitionAllowed(e,n,o){return!0}computeG(e){return e.parent.g+this.computeIncreasedRegionCostIfPortsAreUsed(e.lastRegion,e.lastPort,e.port)+(e.ripRequired?this.ripCost:0)+this.getPortUsagePenalty(e.port)}selectCandidatesForEnteringRegion(e){return e}computeRoutesToRip(e){const n=this.computeCrossingRoutes(e),o=this.computePortOverlapRoutes(e);return new Set([...n,...o])}computePortOverlapRoutes(e){const n=new Set;for(const o of e.path)o.port.assignment\u0026\u0026o.port.assignment.connection.mutuallyConnectedNetworkId!==e.connection.mutuallyConnectedNetworkId\u0026\u0026n.add(o.port.assignment.solvedRoute);return n}computeCrossingRoutes(e){const n=new Set;for(const o of e.path){if(!o.lastPort||!o.lastRegion)continue;const i=this.getRipsRequiredForPortUsage(o.lastRegion,o.lastPort,o.port);for(const r of i)n.add(r.solvedRoute)}return n}getNextCandidates(e){const n=e.nextRegion,o=e.port,i={};for(const s of n.ports){if(s===e.port||!this.isTransitionAllowed(n,o,s))continue;const a=s.assignment\u0026\u0026s.assignment.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId||this.isRipRequiredForPortUsage(n,o,s),A={port:s,hops:e.hops+1,parent:e,lastRegion:n,nextRegion:s.region1===n?s.region2:s.region1,lastPort:o,ripRequired:a};!this.rippingEnabled\u0026\u0026A.ripRequired||(i[A.nextRegion.regionId]??=[],i[A.nextRegion.regionId].push(A))}const r=[];for(const s in i){const a=i[s];r.push(...this.selectCandidatesForEnteringRegion(a))}for(const s of r)s.g=this.computeG(s),s.h=this.computeH(s),s.f=s.g+s.h*this.greedyMultiplier;return r}processSolvedRoute(e){const n={path:[],connection:this.currentConnection,requiredRip:!1};let o=e,i=!1;for(;o;)i||=!!o.ripRequired,n.path.unshift(o),o=o.parent;i\u0026\u0026(n.requiredRip=!0);const r=this.computeRoutesToRip(n);if(r.size\u003e0){n.requiredRip=!0;for(const s of r)this.ripSolvedRoute(s)}for(const s of n.path){if(s.port.assignment={solvedRoute:n,connection:this.currentConnection},!s.lastPort)continue;const a={regionPort1:s.lastPort,regionPort2:s.port,region:s.lastRegion,connection:this.currentConnection,solvedRoute:n};s.lastRegion.assignments?.push(a)}this.solvedRoutes.push(n),this.routeSolvedHook(n)}routeSolvedHook(e){}routeStartedHook(e){}ripSolvedRoute(e){for(const n of e.path.map(o=\u003eo.port))n.ripCount=(n.ripCount??0)+1,n.region1.assignments=n.region1.assignments?.filter(o=\u003eo.regionPort1!==n\u0026\u0026o.regionPort2!==n),n.region2.assignments=n.region2.assignments?.filter(o=\u003eo.regionPort1!==n\u0026\u0026o.regionPort2!==n),n.assignment=void 0;this.solvedRoutes=this.solvedRoutes.filter(n=\u003en!==e),this.unprocessedConnections.push(e.connection)}beginNewConnection(){this.currentConnection=this.unprocessedConnections.shift(),this.currentEndRegion=this.currentConnection.endRegion,this.candidateQueue=new P1t,this.visitedPointsForCurrentConnection.clear(),this.routeStartedHook(this.currentConnection);for(const e of this.currentConnection.startRegion.ports)this.candidateQueue.enqueue({port:e,g:0,h:0,f:0,hops:0,ripRequired:!1,nextRegion:e.region1===this.currentConnection.startRegion?e.region2:e.region1})}_step(){let e=this.candidateQueue.dequeue();if(!e)return this.failed=!0,void(this.error=\"Ran out of candidates\");let n=this.visitedPointsForCurrentConnection.get(e.port.portId);for(;e\u0026\u0026n!==void 0\u0026\u0026!(e.g\u003cn)\u0026\u0026(e=this.candidateQueue.dequeue(),e);)n=this.visitedPointsForCurrentConnection.get(e.port.portId);if(!e)return this.failed=!0,void(this.error=\"Ran out of candidates\");if(this.lastCandidate=e,this.visitedPointsForCurrentConnection.set(e.port.portId,e.g),e.nextRegion===this.currentEndRegion)return this.processSolvedRoute(e),this.unprocessedConnections.length===0?void(this.solved=!0):void this.beginNewConnection();const o=this.getNextCandidates(e);for(const i of o)this.candidateQueue.enqueue(i)}};function keo(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function h6e(t,e,n,o,i){const r=n-e,s=i-o,a=1e-6;if(Math.abs(t.y-i)\u003ca)return t.x-e;if(Math.abs(t.x-n)\u003ca)return r+(i-t.y);if(Math.abs(t.y-o)\u003ca)return r+s+(n-t.x);if(Math.abs(t.x-e)\u003ca)return 2*r+s+(t.y-o);const A=Math.abs(t.y-i),c=Math.abs(t.x-n),l=Math.abs(t.y-o),u=Math.abs(t.x-e),g=Math.min(A,c,l,u);return g===A?Math.max(0,Math.min(r,t.x-e)):g===c?r+Math.max(0,Math.min(s,i-t.y)):g===l?r+s+Math.max(0,Math.min(r,n-t.x)):2*r+s+Math.max(0,Math.min(s,t.y-o))}function Feo(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=t.x-e.x,s=t.y-e.y,a=o*o+i*i,A=a\u003e0?(c=(r*o+s*i)/a,l=0,u=1,Math.max(l,Math.min(u,c))):0;var c,l,u;return{u:A,d2:keo(t,{x:e.x+A*o,y:e.y+A*i})}}function N1t(t){const e=t.d.polygon;if(!e||e.length\u003c3)return null;const n=t.d.polygonPerimeterCache;if(n)return n;const o=(function(i){const r=i.length,s=new Array(r),a=new Array(r+1);a[0]=0;for(let A=0;A\u003cr;A++){const c=i[A],l=i[(A+1)%r],u=Math.hypot(l.x-c.x,l.y-c.y);s[A]=u,a[A+1]=a[A]+u}return{edgeLengths:s,cumulative:a,perimeter:a[r]}})(e);return t.d.polygonPerimeterCache=o,o}function R1t(t){const e=N1t(t);if(e)return e.perimeter;const{minX:n,maxX:o,minY:i,maxY:r}=t.d.bounds;return 2*(o-n)+2*(r-i)}function ZQ(t,e){if(t.region1===e){if(typeof t.region1T==\"number\")return t.region1T;const n=p6e(t.d,e);return t.region1T=n,n}if(t.region2===e){if(typeof t.region2T==\"number\")return t.region2T;const n=p6e(t.d,e);return t.region2T=n,n}return p6e(t.d,e)}function p6e(t,e){const n=e.d.polygon;if(n\u0026\u0026n.length\u003e=3){const a=N1t(e);if(a)return(function(A,c,l,u=1e-6){let g=0,h=0,d=Number.POSITIVE_INFINITY;const p=u*u;for(let m=0;m\u003cc.length;m++){const _=Feo(A,c[m],c[(m+1)%c.length]);if(_.d2\u003c=p){g=m,h=_.u,d=_.d2;break}_.d2\u003cd\u0026\u0026(g=m,h=_.u,d=_.d2)}return l.cumulative[g]+h*l.edgeLengths[g]})(t,n,a)}const{minX:o,maxX:i,minY:r,maxY:s}=e.d.bounds;return h6e(t,o,i,r,s)}function vae(t,e,n=1e-6){return Math.abs(t-e)\u003cn}function ev(t,e){return(t%e+e)%e}function wae(t,e,n,o){const i=Math.abs(ev(t-e,n));return i\u003co||n-i\u003co}function T1t(t,e,n,o,i){const r=ev(t,o),s=ev(e,o),a=ev(n,o);return!(Math.abs(s-a)\u003ci)\u0026\u0026(s\u003ca?s\u003cr\u0026\u0026r\u003ca:r\u003es||r\u003ca)}function m6e(t,e,n){if(typeof n==\"number\"\u0026\u0026n\u003e0){let[a,A]=t,[c,l]=e;return a=ev(a,n),A=ev(A,n),c=ev(c,n),l=ev(l,n),wae(a,c,n,1e-6)||wae(a,l,n,1e-6)||wae(A,c,n,1e-6)||wae(A,l,n,1e-6)?!1:T1t(c,a,A,n,1e-12)!==T1t(l,a,A,n,1e-12)}const[o,i]=t[0]\u003ct[1]?t:[t[1],t[0]],[r,s]=e[0]\u003ce[1]?e:[e[1],e[0]];return!(vae(o,r)||vae(o,s)||vae(i,r)||vae(i,s))\u0026\u0026(o\u003cr\u0026\u0026r\u003ci\u0026\u0026i\u003cs||r\u003co\u0026\u0026o\u003cs\u0026\u0026s\u003ci)}var k1t=t=\u003e{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){const{bounds:s}=r.d;e=Math.min(e,s.minX),n=Math.max(n,s.maxX),o=Math.min(o,s.minY),i=Math.max(i,s.maxY)}return{minX:e,maxX:n,minY:o,maxY:i}},F1t=(t,e,n,o)=\u003e{const i={portId:t,region1:e,region2:n,d:{x:o.x,y:o.y}};return e.ports.push(i),n.ports.push(i),i},L1t=(t,e,n)=\u003e({regionId:t,ports:[],d:{bounds:{minX:e-.2,maxX:e+.2,minY:n-.2,maxY:n+.2},center:{x:e,y:n},isPad:!1,isConnectionRegion:!0}}),tv=.01,$8=(t,e,n)=\u003eMath.max(e,Math.min(n,t)),H1t=(t,e,n)=\u003ee===\"left\"?Math.abs(t.x-n.minX)\u003ctv:e===\"right\"?Math.abs(t.x-n.maxX)\u003ctv:e===\"top\"?Math.abs(t.y-n.maxY)\u003ctv:Math.abs(t.y-n.minY)\u003ctv,Leo=(t,e,n,o)=\u003e{const i=o.x-n.x,r=o.y-n.y,s=t-n.x,a=e-n.y,A=i*i+r*r,c=A\u003e0?$8((s*i+a*r)/A,0,1):0,l=n.x+c*i,u=n.y+c*r,g=t-l,h=e-u;return{x:l,y:u,d2:g*g+h*h}},Heo=(t,e,n,o,i)=\u003e{const r=n.d.polygon;if(r\u0026\u0026r.length\u003e=3){const c=new Set(i);let l=null;for(let u=0;u\u003cr.length;u++){const g=r[u],h=r[(u+1)%r.length];if(i.length\u003e0\u0026\u0026!i.some(p=\u003eH1t(g,p,o)\u0026\u0026H1t(h,p,o)\u0026\u0026c.has(p)))continue;const d=Leo(t,e,g,h);(!l||d.d2\u003cl.d2)\u0026\u0026(l=d)}if(l)return l}const s=n.d.bounds,a=[];if(i.length\u003e0)for(const c of i)c===\"left\"?a.push({side:c,x:s.minX,y:$8(e,s.minY,s.maxY)}):c===\"right\"?a.push({side:c,x:s.maxX,y:$8(e,s.minY,s.maxY)}):c===\"top\"?a.push({side:c,x:$8(t,s.minX,s.maxX),y:s.maxY}):a.push({side:c,x:$8(t,s.minX,s.maxX),y:s.minY});a.length===0\u0026\u0026a.push({side:\"left\",x:s.minX,y:$8(e,s.minY,s.maxY)},{side:\"right\",x:s.maxX,y:$8(e,s.minY,s.maxY)},{side:\"top\",x:$8(t,s.minX,s.maxX),y:s.maxY},{side:\"bottom\",x:$8(t,s.minX,s.maxX),y:s.minY});let A=null;for(const c of a){if(i.length\u003e0\u0026\u0026!i.includes(c.side))continue;const l=t-c.x,u=e-c.y,g=l*l+u*u;(!A||g\u003cA.d2)\u0026\u0026(A={x:c.x,y:c.y,d2:g})}return A},O1t=(t,e,n,o)=\u003e{const i=((A,c,l)=\u003e{const u=[];return Math.abs(A-l.minX)\u003ctv\u0026\u0026u.push(\"left\"),Math.abs(A-l.maxX)\u003ctv\u0026\u0026u.push(\"right\"),Math.abs(c-l.maxY)\u003ctv\u0026\u0026u.push(\"top\"),Math.abs(c-l.minY)\u003ctv\u0026\u0026u.push(\"bottom\"),u})(t,e,o);let r=null,s=Number.POSITIVE_INFINITY,a={x:t,y:e};for(const A of n){if(A.d.isPad||A.d.isThroughJumper)continue;const c=A.d.bounds;if(!(Math.abs(c.minX-o.minX)\u003c.01||Math.abs(c.maxX-o.maxX)\u003c.01||Math.abs(c.minY-o.minY)\u003c.01||Math.abs(c.maxY-o.maxY)\u003c.01))continue;const l=Heo(t,e,A,o,i);if(!l)continue;const u=Math.sqrt(l.d2);u\u003cs\u0026\u0026(s=u,r=A,a={x:l.x,y:l.y})}return r?{region:r,portPosition:a}:null},Oeo=class extends zA{constructor(e){super(),this.input=e,this.graph=e.hyperGraphSolver.graph;const n=e.inputSolvedRoutes,o=e.hyperGraphSolver.connections;this.connections=o,this.solvedRoutes=d6e({graph:this.graph,connections:this.connections,solvedRoutes:n}),this.maxAttemptsPerRegion=e.MAX_ATTEMPTS_PER_REGION,this.maxSectionAttempts=e.MAX_ATTEMPTS_PER_SECTION??500,this.iterations+=this.iterations*(e.effort??1),this.fractionToReplace=e.FRACTION_TO_REPLACE??.2,this.alwaysRipConflicts=e.alwaysRipConflicts??!0}graph;connections;solvedRoutes;activeSection=null;baselineSectionCost=1/0;baselineGlobalCost=1/0;regionAttemptCounts=new Map;sectionAttempts=0;maxAttemptsPerRegion;maxSectionAttempts;fractionToReplace;alwaysRipConflicts;random=(e=\u003e{let n=e;return()=\u003e(n=1664525*n+1013904223\u003e\u003e\u003e0,n/4294967295)})(31337);getSolverName(){return\"HyperGraphSectionOptimizer\"}getConstructorParams(){return{inputGraph:w1t(this.graph),inputConnections:v1t(this.connections),inputSolvedRoutes:this.solvedRoutes,expansionHopsFromCentralRegion:this.input.expansionHopsFromCentralRegion,maxAttemptsPerRegion:this.maxAttemptsPerRegion,maxSectionAttempts:this.maxSectionAttempts,effort:this.input.effort,fractionToReplace:this.fractionToReplace,alwaysRipConflicts:this.alwaysRipConflicts,ACCEPTABLE_COST:this.input.ACCEPTABLE_REGION_COST}}getOutput(){return this.solvedRoutes}_setup(){this.beginSectionSolve()}visualize(){return this.activeSubSolver?this.activeSubSolver.visualize():{title:\"HyperGraphSectionOptimizer\",points:[],lines:[],rects:[],circles:[],texts:[],polygons:[],arrows:[]}}getCostOfRegionWithAttempts(e){const n=this.regionAttemptCounts.get(e.regionId)??0;return this.input.regionCost(e)+1e4*n}computeCostOfSection({section:e,solvedRoutes:n}){if(this.input.computeSolvedGraphCost)return this.input.computeSolvedGraphCost(n);const o=this.input.createHyperGraphSolver({inputGraph:e.graph,inputConnections:e.connections,inputSolvedRoutes:n});let i=0;for(const r of o.graph.regions)i+=this.input.regionCost(r);return i}computeSolvedGraphCost(e){if(this.input.computeSolvedGraphCost)return this.input.computeSolvedGraphCost(e);const n=this.input.createHyperGraphSolver({inputGraph:this.graph,inputConnections:this.connections,inputSolvedRoutes:e});let o=0;for(const i of n.graph.regions)o+=this.input.regionCost(i);return o}determineConnectionsToRip(e,n){const o=e.sectionRoutes.map(A=\u003eA.globalConnection.connectionId);if(this.fractionToReplace\u003e=1)return new Set(o);const i=[...o];for(let A=i.length-1;A\u003e0;A--){const c=Math.floor(this.random()*(A+1));[i[A],i[c]]=[i[c],i[A]]}const r=Math.max(1,Math.ceil(i.length*this.fractionToReplace)),s=new Set(i.slice(0,r));if(!this.alwaysRipConflicts)return s;const a=new Map(e.graph.regions.map(A=\u003e[A.regionId,A]));for(const A of e.sectionRoutes)for(const c of A.sectionRoute.path){if(!c.lastPort||!c.lastRegion)continue;const l=a.get(c.lastRegion.regionId);if(!l)continue;n.currentConnection=A.globalConnection;const u=n.getRipsRequiredForPortUsage(l,c.lastPort,c.port);for(const g of u){const h=A.globalConnection.connectionId,d=g.connection.connectionId;s.has(h)||s.has(d)||s.add(this.random()\u003c.5?h:d)}}return s}getNextCentralRegion(){let e=null,n=1/0;for(const o of this.graph.regions){if((o.assignments?.length??0)===0||(this.regionAttemptCounts.get(o.regionId)??0)\u003e=this.maxAttemptsPerRegion||this.input.regionCost(o)\u003cthis.input.ACCEPTABLE_REGION_COST)continue;const i=this.getCostOfRegionWithAttempts(o);i\u003e=n||(n=i,e=o)}return e}beginSectionSolve(){if(this.sectionAttempts\u003e=this.maxSectionAttempts)return console.log(`Reached max section attempts (${this.maxSectionAttempts}), stopping optimization`),void(this.solved=!0);const e=this.getNextCentralRegion();if(!e)return void(this.solved=!0);if(this.sectionAttempts++,this.activeSection=Teo({graph:this.graph,solvedRoutes:this.solvedRoutes,centralRegion:e,expansionHopsFromCentralRegion:this.input.expansionHopsFromCentralRegion}),!this.activeSection)return;if(this.activeSection.connections.length===0)return this.regionAttemptCounts.set(e.regionId,(this.regionAttemptCounts.get(e.regionId)??0)+1),void(this.activeSection=null);const n=this.activeSection.sectionRoutes.filter(a=\u003ea.canRemainFixedInSectionSolve),o=this.input.createHyperGraphSolver({inputGraph:this.activeSection.graph,inputConnections:this.activeSection.connections,inputSolvedRoutes:n.map(a=\u003ea.sectionRoute)}),i=this.determineConnectionsToRip(this.activeSection,o);for(const a of this.activeSection.sectionRoutes)a.canRemainFixedInSectionSolve||i.add(a.globalConnection.connectionId);const r=this.activeSection.sectionRoutes.filter(a=\u003ea.canRemainFixedInSectionSolve\u0026\u0026!i.has(a.globalConnection.connectionId)).map(a=\u003ea.sectionRoute),s=[...r,...this.activeSection.sectionRoutes.filter(a=\u003ei.has(a.globalConnection.connectionId)).map(a=\u003ea.sectionRoute)];this.baselineSectionCost=this.computeCostOfSection({section:this.activeSection,solvedRoutes:s}),this.baselineGlobalCost=this.computeSolvedGraphCost(this.solvedRoutes),this.activeSubSolver=this.input.createHyperGraphSolver({inputGraph:this.activeSection.graph,inputConnections:this.activeSection.connections,inputSolvedRoutes:r});for(const a of this.activeSubSolver.connections)a.startRegion\u0026\u0026a.endRegion||console.error({startRegion:a.startRegion?.regionId,endRegion:a.endRegion?.regionId})}_step(){if(!this.activeSubSolver)return void this.beginSectionSolve();if(this.activeSubSolver.step(),!this.activeSection)return;if(this.activeSubSolver.failed){this.failedSubSolvers??=[],this.failedSubSolvers.push(this.activeSubSolver);const a=this.regionAttemptCounts.get(this.activeSection.centralRegionId)??0;return this.regionAttemptCounts.set(this.activeSection.centralRegionId,a+1),this.activeSubSolver=null,this.activeSection=null,this.baselineSectionCost=1/0,void(this.baselineGlobalCost=1/0)}if(!this.activeSubSolver.solved)return;const e=this.activeSubSolver.solvedRoutes,n=this.computeCostOfSection({section:this.activeSection,solvedRoutes:e}),o=(a=\u003e{const{solvedRoutes:A,section:c,replacementSolvedRoutes:l}=a,u=new Map(l.map(g=\u003e[g.connection.connectionId,g]));return A.map(g=\u003e{const h=c.sectionRoutes.find(m=\u003em.globalConnection.connectionId===g.connection.connectionId);if(!h)return g;const d=u.get(g.connection.connectionId);if(!d)return g;const p=[...g.path.slice(0,h.sectionStartIndex),...d.path,...g.path.slice(h.sectionEndIndex+1)].map(m=\u003e({port:m.port,g:m.g,h:m.h,f:m.f,hops:m.hops,ripRequired:m.ripRequired,lastPort:m.lastPort,lastRegion:m.lastRegion,nextRegion:m.nextRegion}));for(let m=0;m\u003cp.length;m++)p[m].parent=m\u003e0?p[m-1]:void 0;return{connection:g.connection,path:p,requiredRip:g.requiredRip||d.requiredRip}})})({solvedRoutes:this.solvedRoutes,section:this.activeSection,replacementSolvedRoutes:e}),i=this.computeSolvedGraphCost(o),r=n\u003c=this.baselineSectionCost,s=i\u003cthis.baselineGlobalCost;if(r\u0026\u0026s){this.solvedRoutes=o;const a=this.input.hyperGraphSolver;if(!a)return;a.solvedRoutes=d6e({graph:a.graph,connections:a.connections,solvedRoutes:this.solvedRoutes});for(const A of this.activeSection.sectionRegionIds)this.regionAttemptCounts.set(A,0);this.baselineSectionCost=n,this.baselineGlobalCost=i}else{const a=this.regionAttemptCounts.get(this.activeSection.centralRegionId)??0;this.regionAttemptCounts.set(this.activeSection.centralRegionId,a+1)}this.activeSubSolver=null,this.activeSection=null,this.baselineSectionCost=1/0,this.baselineGlobalCost=1/0}};function AL(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function G1t(t){return t===void 0}function Pae(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function _6e(...t){const e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch((t=Array.isArray(t[0])?t[0]:t).length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t;return _6e(e(n,o),...i)}}}var{cos:Geo,sin:Yeo}=Math,f6e=t=\u003e({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),Y1t=(t,e)=\u003e{const n=t.regions.map(s=\u003e{const{bounds:a,center:A,...c}=s.d,l=[{x:a.minX,y:a.minY},{x:a.maxX,y:a.minY},{x:a.minX,y:a.maxY},{x:a.maxX,y:a.maxY}].map(h=\u003eAL(e,h)),u={minX:Math.min(...l.map(h=\u003eh.x)),maxX:Math.max(...l.map(h=\u003eh.x)),minY:Math.min(...l.map(h=\u003eh.y)),maxY:Math.max(...l.map(h=\u003eh.y))},g=AL(e,A);return{...s,ports:[],d:{...c,bounds:u,center:g}}}),o=new Map;for(let s=0;s\u003ct.regions.length;s++)o.set(t.regions[s],n[s]);const i=t.ports.map(s=\u003e{const a=AL(e,s.d),A=o.get(s.region1),c=o.get(s.region2),l={...s,region1:A,region2:c,d:a};return A.ports.push(l),c.ports.push(l),l}),r=t.jumperLocations?.map(s=\u003e{const a=AL(e,s.center),A=s.padRegions.map(h=\u003eo.get(h)),c=AL(e,{x:1,y:0}),l=AL(e,{x:0,y:0}),u=c.x-l.x,g=c.y-l.y;return{center:a,orientation:Math.abs(g)\u003eMath.abs(u)?s.orientation===\"horizontal\"?\"vertical\":\"horizontal\":s.orientation,padRegions:A}});return{regions:n,ports:i,...r\u0026\u0026{jumperLocations:r}}},I6e=(t,e=.8)=\u003e{let n=0;for(let o=0;o\u003ct.length;o++)n=17777*t.charCodeAt(o)+((n\u003c\u003c5)-n);return`hsla(${Math.abs(n)%360}, 70%, 50%, ${e})`},Ueo=t=\u003e{const e=(i=\u003e{const r=((s,a)=\u003e{const A={arrows:[],circles:[],title:\"Jumper Graph\",lines:[],points:[],rects:[],texts:[],polygons:[],coordinateSystem:\"cartesian\"};for(const c of s.regions){const{bounds:l,isPad:u,isThroughJumper:g,isConnectionRegion:h,polygon:d}=c.d,p=(l.minX+l.maxX)/2,m=(l.minY+l.maxY)/2,_=l.maxX-l.minX,f=l.maxY-l.minY;let I;if(I=h?\"rgba(255, 100, 255, 0.6)\":g?\"rgba(100, 200, 100, 0.5)\":u?\"rgba(255, 200, 100, 0.5)\":\"rgba(200, 200, 255, 0.1)\",d\u0026\u0026d.length\u003e=3){const C=d;A.polygons.push({points:C,fill:I})}else A.rects.push({center:{x:p,y:m},width:_-.1,height:f-.1,fill:I})}if(!a?.hidePortPoints)for(const c of s.ports){const l=c.region1.regionId.split(\":\").pop()??c.region1.regionId,u=c.region2.regionId.split(\":\").pop()??c.region2.regionId;A.circles.push({center:{x:c.d.x,y:c.d.y},radius:.05,fill:\"rgba(128, 128, 128, 0.5)\",label:`${l}-${u}`})}if(!a?.hideRegionPortLines)for(const c of s.ports){const l={x:(c.region1.d.bounds.minX+c.region1.d.bounds.maxX)/2,y:(c.region1.d.bounds.minY+c.region1.d.bounds.maxY)/2},u={x:(c.region2.d.bounds.minX+c.region2.d.bounds.maxX)/2,y:(c.region2.d.bounds.minY+c.region2.d.bounds.maxY)/2};A.lines.push({points:[l,{x:c.d.x,y:c.d.y},u],strokeColor:\"rgba(100, 100, 100, 0.3)\"})}if(a?.connections\u0026\u0026!a?.hideConnectionLines)for(const c of a.connections){const l=c.startRegion,u=c.endRegion,g={x:(l.d.bounds.minX+l.d.bounds.maxX)/2,y:(l.d.bounds.minY+l.d.bounds.maxY)/2},h={x:(u.d.bounds.minX+u.d.bounds.maxX)/2,y:(u.d.bounds.minY+u.d.bounds.maxY)/2},d=(g.x+h.x)/2,p=(g.y+h.y)/2;A.lines.push({points:[g,h],strokeColor:\"rgba(255, 50, 150, 0.8)\",strokeDash:\"3 3\"}),A.points.push({x:d,y:p,color:\"rgba(200, 0, 100, 1)\",label:c.connectionId})}return A})(i.graph,{connections:i.connections,...i.hideInitialGeometry?{hideRegionPortLines:!0,hideConnectionLines:!0,hidePortPoints:!0}:{}});if(!i.hideInitialGeometry)for(const s of r.polygons)s.stroke=\"rgba(128, 128, 128, 0.5)\",s.strokeWidth=.03;i.title\u0026\u0026(r.title=i.title);for(const s of i.priorSolvedRoutes??[]){const a=s.path.map(A=\u003e{const c=A.port;return{x:c.d.x,y:c.d.y}});a.length!==0\u0026\u0026r.lines.push({points:a,strokeColor:\"rgba(80, 80, 80, 0.45)\",strokeDash:\"4 4\"})}for(const s of i.solvedRoutes){const a=I6e(s.connection.connectionId),A=[];for(const c of s.path){const l=c.port;A.push({x:l.d.x,y:l.d.y})}A.length\u003e0\u0026\u0026r.lines.push({points:A,strokeColor:a})}return r})({graph:{regions:t.graph.regions,ports:t.graph.ports},connections:t.connections,solvedRoutes:t.solvedRoutes,hideInitialGeometry:t.iterations\u003e0});if(t.currentConnection\u0026\u0026!t.solved){const i=I6e(t.currentConnection.connectionId),r=t.currentConnection.startRegion,s=t.currentConnection.endRegion;if(!r?.d||!s?.d)return e;const a={x:(r.d.bounds.minX+r.d.bounds.maxX)/2,y:(r.d.bounds.minY+r.d.bounds.maxY)/2},A={x:(s.d.bounds.minX+s.d.bounds.maxX)/2,y:(s.d.bounds.minY+s.d.bounds.maxY)/2};e.lines.push({points:[a,A],strokeColor:i,strokeDash:\"10 5\"}),e.points.push({x:a.x-.1,y:a.y+.1,color:i,label:[t.currentConnection.connectionId,\"start\"].join(`\n`)}),e.points.push({x:A.x-.1,y:A.y+.1,color:i,label:[t.currentConnection.connectionId,\"end\"].join(`\n`)})}const n=t.candidateQueue.peekMany(10);for(let i=0;i\u003cn.length;i++){const r=n[i],s=r.port,a=i===0;e.points.push({x:s.d.x,y:s.d.y,color:a?\"green\":\"rgba(128, 128, 128, 0.25)\",label:[r.port.portId,`g: ${r.g.toFixed(2)}`,`h: ${r.h.toFixed(2)}`,`f: ${r.f.toFixed(2)}`].join(`\n`)})}const o=n[0];if(!t.solved\u0026\u0026o\u0026\u0026t.currentConnection){const i=I6e(t.currentConnection.connectionId),r=[];let s=o;for(;s;){const a=s.port;r.unshift({x:a.d.x,y:a.d.y}),s=s.parent}r.length\u003e1\u0026\u0026e.lines.push({points:r,strokeColor:i})}return e},Keo=.034685181009478865,Veo=0,zeo=4.072520483177124,Jeo=0,Weo=35.38577539020022,jeo=.5518001238069296,$eo=class extends D1t{getSolverName(){return\"JumperGraphSolver\"}UNIT_OF_COST=\"hops\";portUsagePenalty=Keo;portUsagePenaltySq=Veo;crossingPenalty=zeo;crossingPenaltySq=Jeo;ripCost=Weo;baseMaxIterations=4e3;additionalMaxIterationsPerConnection=2e3;additionalMaxIterationsPerCrossing=2e3;constructor(e){super({greedyMultiplier:jeo,rippingEnabled:!0,...e}),this.ripCost=e.ripCost??this.ripCost,this.portUsagePenalty=e.portUsagePenalty??this.portUsagePenalty,this.crossingPenalty=e.crossingPenalty??this.crossingPenalty,this.baseMaxIterations=e.baseMaxIterations??this.baseMaxIterations,this.additionalMaxIterationsPerConnection=e.additionalMaxIterationsPerConnection??this.additionalMaxIterationsPerConnection;const n=(function(o,i){if(i.length\u003c2)return 0;let r=1/0,s=-1/0,a=1/0,A=-1/0;for(const h of o.regions){const d=h;d.d?.bounds?(r=Math.min(r,d.d.bounds.minX),s=Math.max(s,d.d.bounds.maxX),a=Math.min(a,d.d.bounds.minY),A=Math.max(A,d.d.bounds.maxY)):d.d?.center\u0026\u0026(r=Math.min(r,d.d.center.x),s=Math.max(s,d.d.center.x),a=Math.min(a,d.d.center.y),A=Math.max(A,d.d.center.y))}const c=new Map;for(const h of o.regions){const d=h;d.d?.center\u0026\u0026c.set(h.regionId,d.d.center)}const l=[],u=2*(s-r)+2*(A-a);for(const h of i){let d,p;if(\"startRegion\"in h\u0026\u0026h.startRegion){const f=h.startRegion,I=h.endRegion;d=f.d?.center,p=I.d?.center}else\"startRegionId\"in h\u0026\u0026(d=c.get(h.startRegionId),p=c.get(h.endRegionId));if(!d||!p)continue;const m=h6e(d,r,s,a,A),_=h6e(p,r,s,a,A);l.push([m,_])}let g=0;for(let h=0;h\u003cl.length;h++)for(let d=h+1;d\u003cl.length;d++)m6e(l[h],l[d],u)\u0026\u0026g++;return g})(this.graph,e.inputConnections);this.MAX_ITERATIONS=this.baseMaxIterations+e.inputConnections.length*this.additionalMaxIterationsPerConnection+n*this.additionalMaxIterationsPerCrossing,this.populateDistanceToEndMaps()}populateDistanceToEndMaps(){const e=new Set(this.connections.map(n=\u003en.endRegion));for(const n of e){const o=new Map,i=[];for(o.set(n.regionId,0),i.push({region:n,distance:0});i.length\u003e0;){const{region:r,distance:s}=i.shift();for(const a of r.ports){const A=a.region1===r?a.region2:a.region1;o.has(A.regionId)||(o.set(A.regionId,s+1),i.push({region:A,distance:s+1}))}}for(const r of this.graph.ports){r.distanceToEndMap||(r.distanceToEndMap={});const s=o.get(r.region1.regionId)??1/0,a=o.get(r.region2.regionId)??1/0;r.distanceToEndMap[n.regionId]=Math.min(s,a)}}}estimateCostToEnd(e){const n=this.currentEndRegion.regionId;return e.distanceToEndMap[n]}getPortUsagePenalty(e){const n=e.ripCount??0;return n*this.portUsagePenalty+n*this.portUsagePenaltySq}isTransitionAllowed(e,n,o){if(!e.d.isPad)return!0;const i=r=\u003e!!(r.region1===e?r.region2:r.region1).d.isThroughJumper;return i(n)||i(o)}computeIncreasedRegionCostIfPortsAreUsed(e,n,o){if(e.d.isPad){const r=(e.assignments??[]).filter(s=\u003es.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId).length;return r\u003e0?r*this.crossingPenalty+r*this.crossingPenaltySq:0}const i=(function(r,s,a){const A=R1t(r),c=[ZQ(s,r),ZQ(a,r)];let l=0;const u=r.assignments??[];for(const g of u)m6e(c,[ZQ(g.regionPort1,r),ZQ(g.regionPort2,r)],A)\u0026\u0026l++;return l})(e,n,o);return i*this.crossingPenalty+i*this.crossingPenaltySq}getRipsRequiredForPortUsage(e,n,o){if(e.d.isPad)return(e.assignments??[]).filter(s=\u003es.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId);const i=(function(s,a,A){const c=R1t(s),l=[ZQ(a,s),ZQ(A,s)],u=[],g=s.assignments??[];for(const h of g)m6e(l,[ZQ(h.regionPort1,s),ZQ(h.regionPort2,s)],c)\u0026\u0026u.push(h);return u})(e,n,o),r=i.filter(s=\u003es.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId);if(!e.d.isThroughJumper)return r;for(const s of e.assignments??[])s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId\u0026\u0026r.push(s);return r}isRipRequiredForPortUsage(e,n,o){if(!e.d.isThroughJumper\u0026\u0026!e.d.isPad)return!1;for(const i of e.assignments??[])if(i.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId)return!0;return!1}routeSolvedHook(e){}routeStartedHook(e){}visualize(){return Ueo(this)}},qeo={padWidth:.8,outerPadHeight:.5,innerPadHeight:.4,leftPadCenterX:-.9,rightPadCenterX:.9,row1CenterY:-1.2,row2CenterY:-.4,row3CenterY:.4,row4CenterY:1.2},Xeo=({cols:t,rows:e,marginX:n,marginY:o,innerColChannelPointCount:i=1,innerRowChannelPointCount:r=1,regionsBetweenPads:s=!1,outerPaddingX:a=.5,outerPaddingY:A=.5,outerChannelXPointCount:c,outerChannelYPointCount:l,orientation:u=\"vertical\",center:g,bounds:h,parallelTracesUnderJumperCount:d=2})=\u003e{const p=[],m=[],{padWidth:_,outerPadHeight:f,innerPadHeight:I,leftPadCenterX:C,rightPadCenterX:y,row1CenterY:x,row2CenterY:E,row3CenterY:B,row4CenterY:S}=qeo,Q=_/2,w=f/2,M=I/2,k=y-C+_,R=k+n,F=S-x+f,O=F+o;let U=a,Y=A;if(h){const _e=t*k+(t-1)*n,ue=e*F+(e-1)*o;U=((u===\"horizontal\"?h.maxY-h.minY:h.maxX-h.minX)-_e)/2,Y=((u===\"horizontal\"?h.maxX-h.minX:h.maxY-h.minY)-ue)/2}const W=c,te=l,j=[],J=[],oe=(_e,ue,fe,pe)=\u003e({regionId:_e,ports:[],d:{bounds:ue,center:f6e(ue),isPad:fe,isThroughJumper:pe}}),ie=(_e,ue,fe)=\u003e{const pe=ue.d.bounds,ye=fe.d.bounds;let Me,ve;Math.abs(pe.maxX-ye.minX)\u003c.001?(Me=pe.maxX,ve=(Math.max(pe.minY,ye.minY)+Math.min(pe.maxY,ye.maxY))/2):Math.abs(pe.minX-ye.maxX)\u003c.001?(Me=pe.minX,ve=(Math.max(pe.minY,ye.minY)+Math.min(pe.maxY,ye.maxY))/2):Math.abs(pe.maxY-ye.minY)\u003c.001?(Me=(Math.max(pe.minX,ye.minX)+Math.min(pe.maxX,ye.maxX))/2,ve=pe.maxY):(Me=(Math.max(pe.minX,ye.minX)+Math.min(pe.maxX,ye.maxX))/2,ve=pe.minY);const he={portId:_e,region1:ue,region2:fe,d:{x:Me,y:ve}};return ue.ports.push(he),fe.ports.push(he),he},ne=(_e,ue,fe,pe)=\u003e{if(pe\u003c=0)return[];if(pe===1)return[ie(_e,ue,fe)];const ye=ue.d.bounds,Me=fe.d.bounds,ve=[];let he,Qe,Pe,we;Math.abs(ye.maxX-Me.minX)\u003c.001?(he=!0,Qe=ye.maxX,Pe=Math.max(ye.minY,Me.minY),we=Math.min(ye.maxY,Me.maxY)):Math.abs(ye.minX-Me.maxX)\u003c.001?(he=!0,Qe=ye.minX,Pe=Math.max(ye.minY,Me.minY),we=Math.min(ye.maxY,Me.maxY)):Math.abs(ye.maxY-Me.minY)\u003c.001?(he=!1,Qe=ye.maxY,Pe=Math.max(ye.minX,Me.minX),we=Math.min(ye.maxX,Me.maxX)):(he=!1,Qe=ye.minY,Pe=Math.max(ye.minX,Me.minX),we=Math.min(ye.maxX,Me.maxX));for(let Te=0;Te\u003cpe;Te++){const Re=Pe+(Te+.5)/pe*(we-Pe),Ee={portId:`${_e}:${Te}`,region1:ue,region2:fe,d:{x:he?Qe:Re,y:he?Re:Qe}};ue.ports.push(Ee),fe.ports.push(Ee),ve.push(Ee)}return ve};for(let _e=0;_e\u003ce;_e++){j[_e]=[];for(let ue=0;ue\u003ct;ue++){const fe=`cell_${_e}_${ue}`,pe=ue*R,ye=-_e*O,Me=pe+C,ve=ye+x,he=pe+C,Qe=ye+E,Pe=pe+C,we=ye+B,Te=pe+C,Re=ye+S,Ee=pe+y,ke=ye+S,Ce=pe+y,Le=ye+B,Ye=pe+y,tt=ye+E,At=pe+y,at=ye+x,nt=(zi,bi,Ar)=\u003e({minX:zi-Q,maxX:zi+Q,minY:bi-Ar,maxY:bi+Ar}),gt=nt(Me,ve,w),bt=nt(he,Qe,M),Ct=nt(Pe,we,M),Dt=nt(Te,Re,w),kt=nt(Ee,ke,w),it=nt(Ce,Le,M),Yt=nt(Ye,tt,M),pn=nt(At,at,w),be={minX:gt.maxX,maxX:pn.minX,minY:gt.minY,maxY:Dt.maxY},et=.3,It={minX:Me,maxX:At,minY:ve-et/2,maxY:ve+et/2},Bt={minX:he,maxX:Ye,minY:Qe-et/2,maxY:Qe+et/2},mt={minX:Pe,maxX:Ce,minY:we-et/2,maxY:we+et/2},st={minX:Te,maxX:Ee,minY:Re-et/2,maxY:Re+et/2},xt=gt.minX,Xe=pn.maxX,Ze=gt.minY,dt=Dt.maxY,Ut=oe(`${fe}:pad1`,gt,!0),Wt=oe(`${fe}:pad2`,bt,!0),Xt=oe(`${fe}:pad3`,Ct,!0),Jt=oe(`${fe}:pad4`,Dt,!0),yn=oe(`${fe}:pad5`,kt,!0),An=oe(`${fe}:pad6`,it,!0),kn=oe(`${fe}:pad7`,Yt,!0),$n=oe(`${fe}:pad8`,pn,!0),ht=oe(`${fe}:underjumper`,be,!1),Kt=oe(`${fe}:throughjumper1`,It,!1,!0),rn=oe(`${fe}:throughjumper2`,Bt,!1,!0),Lt=oe(`${fe}:throughjumper3`,mt,!1,!0),Ho=oe(`${fe}:throughjumper4`,st,!1,!0);p.push(Ut,Wt,Xt,Jt,yn,An,kn,$n,ht,Kt,rn,Lt,Ho);const Ao=(Me+At)/2,qe=(ve+Re)/2;J.push({center:{x:Ao,y:qe},orientation:\"vertical\",padRegions:[Ut,Wt,Xt,Jt,yn,An,kn,$n]});let vt=null,qt=null,Zt=null,nn=null,zn=null,Nn=null;s\u0026\u0026(vt=oe(`${fe}:L-BP12`,{minX:gt.minX,maxX:gt.maxX,minY:gt.maxY,maxY:bt.minY},!1),qt=oe(`${fe}:L-BP23`,{minX:bt.minX,maxX:bt.maxX,minY:bt.maxY,maxY:Ct.minY},!1),Zt=oe(`${fe}:L-BP34`,{minX:Ct.minX,maxX:Ct.maxX,minY:Ct.maxY,maxY:Dt.minY},!1),nn=oe(`${fe}:R-BP87`,{minX:pn.minX,maxX:pn.maxX,minY:pn.maxY,maxY:Yt.minY},!1),zn=oe(`${fe}:R-BP76`,{minX:Yt.minX,maxX:Yt.maxX,minY:Yt.maxY,maxY:it.minY},!1),Nn=oe(`${fe}:R-BP65`,{minX:it.minX,maxX:it.maxX,minY:it.maxY,maxY:kt.minY},!1),p.push(vt,qt,Zt,nn,zn,Nn));const Co=ue===0,ei=_e===e-1,ro=ue===t-1;let To;ro?To=Xe+U:To=(ue+1)*R+C-Q;let yo=null;_e===0\u0026\u0026(yo=oe(`${fe}:T`,{minX:Co?xt-U:xt,maxX:To,minY:dt,maxY:dt+Y},!1),p.push(yo));let Ro=null;Ro=oe(`${fe}:B`,{minX:Co?xt-U:xt,maxX:To,minY:Ze-(ei?Y:o),maxY:Ze},!1),p.push(Ro);let On=null;Co\u0026\u0026(On=oe(`${fe}:L`,{minX:xt-U,maxX:xt,minY:Ze,maxY:dt},!1),p.push(On));const uo=oe(`${fe}:R`,{minX:Xe,maxX:To,minY:Ze,maxY:dt},!1);if(p.push(uo),j[_e][ue]={pad1:Ut,pad2:Wt,pad3:Xt,pad4:Jt,pad5:yn,pad6:An,pad7:kn,pad8:$n,underjumper:ht,throughjumper1:Kt,throughjumper2:rn,throughjumper3:Lt,throughjumper4:Ho,top:yo,bottom:Ro,left:On,right:uo,leftBP12:vt,leftBP23:qt,leftBP34:Zt,rightBP87:nn,rightBP76:zn,rightBP65:Nn},yo)if(On\u0026\u0026m.push(...ne(`${fe}:T-L`,yo,On,W)),m.push(...ne(`${fe}:T-R`,yo,uo,ro?W:i)),m.push(ie(`${fe}:T-P4`,yo,Jt)),m.push(ie(`${fe}:T-P5`,yo,yn)),s){const zi=ht.d.bounds,bi=(zi.maxX-zi.minX)/(d+1);for(let Ar=1;Ar\u003c=d;Ar++){const ws={portId:`${fe}:T-UJ${Ar}`,region1:yo,region2:ht,d:{x:zi.minX+bi*Ar,y:zi.maxY}};yo.ports.push(ws),ht.ports.push(ws),m.push(ws)}}else m.push(ie(`${fe}:T-UJ`,yo,ht));if(Ro)if(On\u0026\u0026m.push(...ne(`${fe}:B-L`,Ro,On,W)),m.push(...ne(`${fe}:B-R`,Ro,uo,ro?W:i)),m.push(ie(`${fe}:B-P1`,Ro,Ut)),m.push(ie(`${fe}:B-P8`,Ro,$n)),s){const zi=ht.d.bounds,bi=(zi.maxX-zi.minX)/(d+1);for(let Ar=1;Ar\u003c=d;Ar++){const ws={portId:`${fe}:B-UJ${Ar}`,region1:Ro,region2:ht,d:{x:zi.minX+bi*Ar,y:zi.minY}};Ro.ports.push(ws),ht.ports.push(ws),m.push(ws)}}else m.push(ie(`${fe}:B-UJ`,Ro,ht));On\u0026\u0026(m.push(ie(`${fe}:L-P1`,On,Ut)),m.push(ie(`${fe}:L-P2`,On,Wt)),m.push(ie(`${fe}:L-P3`,On,Xt)),m.push(ie(`${fe}:L-P4`,On,Jt))),m.push(ie(`${fe}:R-P5`,uo,yn)),m.push(ie(`${fe}:R-P6`,uo,An)),m.push(ie(`${fe}:R-P7`,uo,kn)),m.push(ie(`${fe}:R-P8`,uo,$n)),s\u0026\u0026(On\u0026\u0026(m.push(ie(`${fe}:L-BP12`,On,vt)),m.push(ie(`${fe}:L-BP23`,On,qt)),m.push(ie(`${fe}:L-BP34`,On,Zt))),m.push(ie(`${fe}:UJ-LBP12`,vt,ht)),m.push(ie(`${fe}:UJ-LBP23`,qt,ht)),m.push(ie(`${fe}:UJ-LBP34`,Zt,ht)),m.push(ie(`${fe}:R-BP87`,uo,nn)),m.push(ie(`${fe}:R-BP76`,uo,zn)),m.push(ie(`${fe}:R-BP65`,uo,Nn)),m.push(ie(`${fe}:UJ-RBP87`,nn,ht)),m.push(ie(`${fe}:UJ-RBP76`,zn,ht)),m.push(ie(`${fe}:UJ-RBP65`,Nn,ht)));const Oo={portId:`${fe}:TJ1-P1`,region1:Kt,region2:Ut,d:{x:Me,y:ve}};Kt.ports.push(Oo),Ut.ports.push(Oo),m.push(Oo);const ko={portId:`${fe}:TJ1-P8`,region1:Kt,region2:$n,d:{x:At,y:at}};Kt.ports.push(ko),$n.ports.push(ko),m.push(ko);const Ko={portId:`${fe}:TJ2-P2`,region1:rn,region2:Wt,d:{x:he,y:Qe}};rn.ports.push(Ko),Wt.ports.push(Ko),m.push(Ko);const mi={portId:`${fe}:TJ2-P7`,region1:rn,region2:kn,d:{x:Ye,y:tt}};rn.ports.push(mi),kn.ports.push(mi),m.push(mi);const Fo={portId:`${fe}:TJ3-P3`,region1:Lt,region2:Xt,d:{x:Pe,y:we}};Lt.ports.push(Fo),Xt.ports.push(Fo),m.push(Fo);const Nr={portId:`${fe}:TJ3-P6`,region1:Lt,region2:An,d:{x:Ce,y:Le}};Lt.ports.push(Nr),An.ports.push(Nr),m.push(Nr);const Rs={portId:`${fe}:TJ4-P4`,region1:Ho,region2:Jt,d:{x:Te,y:Re}};Ho.ports.push(Rs),Jt.ports.push(Rs),m.push(Rs);const ur={portId:`${fe}:TJ4-P5`,region1:Ho,region2:yn,d:{x:Ee,y:ke}};if(Ho.ports.push(ur),yn.ports.push(ur),m.push(ur),ue\u003e0){const zi=j[_e][ue-1];m.push(ie(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:R-P1`,zi.right,Ut)),m.push(ie(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:R-P2`,zi.right,Wt)),m.push(ie(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:R-P3`,zi.right,Xt)),m.push(ie(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:R-P4`,zi.right,Jt)),s\u0026\u0026(m.push(ie(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:R-LBP12`,zi.right,vt)),m.push(ie(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:R-LBP23`,zi.right,qt)),m.push(ie(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:R-LBP34`,zi.right,Zt))),yo\u0026\u0026zi.top\u0026\u0026m.push(...ne(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:T-T`,zi.top,yo,te)),Ro\u0026\u0026zi.bottom\u0026\u0026m.push(...ne(`cell_${_e}_${ue-1}-\u003ecell_${_e}_${ue}:B-B`,zi.bottom,Ro,ei?te:r))}if(_e\u003e0){const zi=j[_e-1][ue];if(On\u0026\u0026m.push(...ne(`cell_${_e-1}_${ue}-\u003ecell_${_e}_${ue}:B-L`,zi.bottom,On,W)),m.push(ie(`cell_${_e-1}_${ue}-\u003ecell_${_e}_${ue}:B-P4`,zi.bottom,Jt)),s){const bi=ht.d.bounds,Ar=(bi.maxX-bi.minX)/(d+1);for(let ws=1;ws\u003c=d;ws++){const ds=bi.minX+Ar*ws,Et={portId:`cell_${_e-1}_${ue}-\u003ecell_${_e}_${ue}:B-UJ${ws}`,region1:zi.bottom,region2:ht,d:{x:ds,y:bi.maxY}};zi.bottom.ports.push(Et),ht.ports.push(Et),m.push(Et)}}else m.push(ie(`cell_${_e-1}_${ue}-\u003ecell_${_e}_${ue}:B-UJ`,zi.bottom,ht));m.push(ie(`cell_${_e-1}_${ue}-\u003ecell_${_e}_${ue}:B-P5`,zi.bottom,yn)),m.push(...ne(`cell_${_e-1}_${ue}-\u003ecell_${_e}_${ue}:B-R`,zi.bottom,uo,ro?W:i))}}}let le={regions:p,ports:m,jumperLocations:J};const ge=u===\"horizontal\";if(ge||g!==void 0||h!==void 0){const _e=k1t(le.regions),ue=f6e(_e),fe=[];let pe;pe=g||(h?f6e(h):ue),fe.push(Pae(pe.x,pe.y)),ge\u0026\u0026fe.push((function(Me,ve,he){const Qe=Geo(Me),Pe=Yeo(Me),we={a:Qe,c:-Pe,e:0,b:Pe,d:Qe,f:0};return G1t(ve)||G1t(he)?we:_6e([Pae(ve,he),we,Pae(-ve,-he)])})(-Math.PI/2)),fe.push(Pae(-ue.x,-ue.y));const ye=(function(...Me){return _6e(...Me)})(...fe);le=Y1t(le,ye)}return le},U1t=!0,eJ={CCW:-1,CW:1,NOT_ORIENTABLE:0},Zeo=2*Math.PI,Mae=Object.freeze({__proto__:null,BOUNDARY:2,CCW:U1t,CONTAINS:3,CW:!1,END_VERTEX:2,INSIDE:1,INTERLACE:4,NOT_VERTEX:0,ORIENTATION:eJ,OUTSIDE:0,OVERLAP_OPPOSITE:2,OVERLAP_SAME:1,PIx2:Zeo,START_VERTEX:1}),u7=1e-6;function K1t(t){u7=t}function V1t(){return u7}function C6e(t){return t\u003cu7\u0026\u0026t\u003e-u7}function UD(t,e){return t-e\u003cu7\u0026\u0026t-e\u003e-u7}function z1t(t,e){return t-e\u003eu7}function J1t(t,e){return t-e\u003c-u7}var Ve={Utils:Object.freeze({__proto__:null,DECIMALS:3,EQ:UD,EQ_0:C6e,GE:function(t,e){return t-e\u003e-u7},GT:z1t,LE:function(t,e){return t-e\u003cu7},LT:J1t,getTolerance:V1t,setTolerance:K1t}),Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in Mae)Ve[t]=Mae[t];Object.defineProperty(Ve,\"DP_TOL\",{get:function(){return V1t()},set:function(t){K1t(t)}});var ld=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError(\"Illegal Parameters\")}static get ZERO_DIVISION(){return new Error(\"Zero division\")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error(\"Unresolved boundary conflict in boolean operation\")}static get INFINITE_LOOP(){return new Error(\"Infinite loop\")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error(\"Cannot complete boolean operation\")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error(\"Abstract method cannot be invoked\")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error(\"Operation is not supported\")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error(\"Unsupported shape type\")}};Ve.Errors=ld;var y6e=class{constructor(e,n){this.first=e,this.last=n||this.first}[Symbol.iterator](){let e;return{next:()=\u003e(e=e?e.next:this.first,{value:e,done:e===void 0})}}get size(){let e=0;for(let n of this)e++;return e}toArray(e=void 0,n=void 0){let o=[],i=e||this.first,r=n||this.last,s=i;if(s===void 0)return o;do o.push(s),s=s.next;while(s!==r.next);return o}append(e){return this.isEmpty()?this.first=e:(e.prev=this.last,this.last.next=e),this.last=e,this.last.next=void 0,this.first.prev=void 0,this}insert(e,n){if(this.isEmpty())this.first=e,this.last=e;else if(n==null)e.next=this.first,this.first.prev=e,this.first=e;else{let o=n.next;n.next=e,o\u0026\u0026(o.prev=e),e.prev=n,e.next=o,this.last===n\u0026\u0026(this.last=e)}return this.last.next=void 0,this.first.prev=void 0,this}remove(e){return e===this.first\u0026\u0026e===this.last?(this.first=void 0,this.last=void 0):(e.prev\u0026\u0026(e.prev.next=e.next),e.next\u0026\u0026(e.next.prev=e.prev),e===this.first\u0026\u0026(this.first=e.next),e===this.last\u0026\u0026(this.last=e.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(e){let n=e,o=e;do{if(n!=e\u0026\u0026n===o)throw ld.INFINITE_LOOP;n=n.next,o=o.next.next}while(n!=e)}},W1t={stroke:\"black\"},eto=class{constructor(t=W1t){for(const e in t)this[e]=t[e];this.stroke=t.stroke??W1t.stroke}toAttributesString(){return Object.keys(this).reduce((t,e)=\u003et+(this[e]!==void 0?this.toAttrString(e,this[e]):\"\"),\"\")}toAttrString(t,e){const n=t===\"className\"?\"class\":this.convertCamelToKebabCase(t);return e===null?`${n} `:`${n}=\"${e.toString()}\" `}convertCamelToKebabCase(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join(\"-\").toLowerCase()}};function KD(t){return new eto(t).toAttributesString()}function cL(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ve.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ve.Point(g,h))}return n}function VD(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ve.Utils.EQ(i,e.r))n.push(o);else if(Ve.Utils.LT(i,e.r)){let r,s,a=Math.sqrt(e.r*e.r-i*i);r=t.norm.rotate90CCW().multiply(a),s=o.translate(r),n.push(s),r=t.norm.rotate90CW().multiply(a),s=o.translate(r),n.push(s)}return n}function lL(t,e){let n=[];for(let o of e.toSegments()){let i=tJ(o,t);for(let r of i)iIt(r,n)||n.push(r)}return n}function Dae(t,e){let n=[];if(lL(t,e.box).length===0)return n;let o=VD(t,new Ve.Circle(e.pc,e.r));for(let i of o)i.on(e)\u0026\u0026n.push(i);return n}function tJ(t,e){let n=[];return t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026!t.isZeroLength()\u0026\u0026n.push(t.pe),n.length\u003e0||t.isZeroLength()||t.ps.leftTo(e)\u0026\u0026t.pe.leftTo(e)||!t.ps.leftTo(e)\u0026\u0026!t.pe.leftTo(e)?n:cL(new Ve.Line(t.ps,t.pe),e)}function Nae(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)\u0026\u0026n.push(e.ps),n;let o=new Ve.Line(t.ps,t.pe),i=new Ve.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026n.push(t.pe),!e.ps.on(t)||e.ps.equalTo(t.ps)||e.ps.equalTo(t.pe)||n.push(e.ps),!e.pe.on(t)||e.pe.equalTo(t.ps)||e.pe.equalTo(t.pe)||n.push(e.pe);else{let r=cL(o,i);r.length\u003e0\u0026\u0026j1t(r[0],t)\u0026\u0026j1t(r[0],e)\u0026\u0026n.push(r[0])}return n}function j1t(t,e){const n=e.box;return Ve.Utils.LE(t.x,n.xmax)\u0026\u0026Ve.Utils.GE(t.x,n.xmin)\u0026\u0026Ve.Utils.LE(t.y,n.ymax)\u0026\u0026Ve.Utils.GE(t.y,n.ymin)}function Rae(t,e){let n=[];if(t.isZeroLength()){let[i,r]=t.ps.distanceTo(e.pc);return Ve.Utils.EQ(i,e.r)\u0026\u0026n.push(t.ps),n}let o=VD(new Ve.Line(t.ps,t.pe),e);for(let i of o)i.on(t)\u0026\u0026n.push(i);return n}function uL(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;let o=VD(new Ve.Line(t.ps,t.pe),new Ve.Circle(e.pc,e.r));for(let i of o)i.on(t)\u0026\u0026i.on(e)\u0026\u0026n.push(i);return n}function $1t(t,e){let n=[],o=new Ve.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ve.Utils.EQ_0(i)||Ve.Utils.EQ_0(r))return n;if(Ve.Utils.EQ_0(o.x)\u0026\u0026Ve.Utils.EQ_0(o.y)\u0026\u0026Ve.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s,a=t.pc.distanceTo(e.pc)[0];if(Ve.Utils.GT(a,i+r)||Ve.Utils.LT(a,Math.abs(i-r)))return n;if(o.x/=a,o.y/=a,Ve.Utils.EQ(a,i+r)||Ve.Utils.EQ(a,Math.abs(i-r)))return s=t.pc.translate(i*o.x,i*o.y),n.push(s),n;let A=i*i/(2*a)-r*r/(2*a)+a/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return s=c.translate(o.rotate90CCW().multiply(l)),n.push(s),s=c.translate(o.rotate90CW().multiply(l)),n.push(s),n}function q1t(t,e){let n=[];if(t.pc.equalTo(e.pc)\u0026\u0026Ve.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)\u0026\u0026n.push(s),s=t.end,s.on(e)\u0026\u0026n.push(s),s=e.start,s.on(t)\u0026\u0026n.push(s),s=e.end,s.on(t)\u0026\u0026n.push(s),n}let o=new Ve.Circle(t.pc,t.r),i=new Ve.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)\u0026\u0026s.on(e)\u0026\u0026n.push(s);return n}function x6e(t,e){let n=[];if(e.pc.equalTo(t.pc)\u0026\u0026Ve.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=$1t(e,new Ve.Circle(t.pc,t.r));for(let i of o)i.on(t)\u0026\u0026n.push(i);return n}function X1t(t,e){return t.isSegment?Nae(t.shape,e):uL(e,t.shape)}function Z1t(t,e){return t.isSegment?uL(t.shape,e):q1t(t.shape,e)}function eIt(t,e){return t.isSegment?tJ(t.shape,e):Dae(e,t.shape)}function tto(t,e){return t.isSegment?Rae(t.shape,e):x6e(t.shape,e)}function E6e(t,e){let n=[];for(let o of e.edges)for(let i of X1t(o,t))n.push(i);return n}function B6e(t,e){let n=[];for(let o of e.edges)for(let i of Z1t(o,t))n.push(i);return n}function nJ(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of eIt(o,t))iIt(i,n)||n.push(i);return t.sortPoints(n)}function tIt(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of tto(o,t))n.push(i);return n}function nIt(t,e){return t.isSegment?X1t(e,t.shape):t.isArc?Z1t(e,t.shape):t.isLine?eIt(e,t.shape):t.isRay?(n=e,o=t.shape,n.isSegment?b6e(o,n.shape):S6e(o,n.shape)):[];var n,o}function oIt(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...nIt(t,i)];return n}function iIt(t,e){return e.some(n=\u003en.equalTo(t))}function nv(t){return new Ve.Line(t.start,t.norm)}function b6e(t,e){return tJ(e,nv(t)).filter(n=\u003et.contains(n))}function S6e(t,e){return Dae(nv(t),e).filter(n=\u003et.contains(n))}function rIt(t,e){return VD(nv(t),e).filter(n=\u003et.contains(n))}function sIt(t,e){return cL(nv(t),e).filter(n=\u003et.contains(n))}function aIt(t,e){return nJ(nv(t),e).filter(n=\u003et.contains(n))}function AIt(t,e){if(t.intersect\u0026\u0026t.intersect instanceof Function)return t.intersect(e);throw ld.UNSUPPORTED_SHAPE_TYPE}function gL(t,e){let n=[];for(let o of e)n=[...n,...AIt(t,o.shape)];return n}var zD=class zte extends y6e{constructor(...e){if(super(),this.isInfinite=!1,e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length\u003e0){const n=e[0],o=n.length,i=s=\u003es instanceof Ve.Segment||s instanceof Ve.Arc||s instanceof Ve.Ray,r=s=\u003es instanceof Ve.Segment||s instanceof Ve.Arc;if(!(o===1\u0026\u0026(s=\u003es instanceof Ve.Segment||s instanceof Ve.Arc||s instanceof Ve.Ray||s instanceof Ve.Line)(n[0])||o\u003e1\u0026\u0026i(n[0])\u0026\u0026i(n[o-1])\u0026\u0026n.slice(1,o-1).every(r)))throw Ve.Errors.ILLEGAL_PARAMETERS;this.isInfinite=n.some(s=\u003es instanceof Ve.Ray||s instanceof Ve.Line);for(let s of n){let a=new Ve.Edge(s);this.append(a)}this.setArcLength()}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=\u003ee.merge(n.box),new Ve.Box)}get vertices(){let e=this.edges.map(n=\u003en.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new zte(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e\u003ethis.length||e\u003c0||this.isInfinite)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ve.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Point){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Line){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Circle){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Segment){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Arc){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Multiline)return Ve.Distance.multiline2multiline(this,e);throw Ve.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ve.Multiline?(function(n,o){let i=[];for(let r of n)for(let s of o)i=[...i,...AIt(r.shape,s.shape)];return i})(this,e):gL(e,this)}contains(e){if(e instanceof Ve.Point)return this.edges.some(n=\u003en.shape.contains(e));throw Ve.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new zte(this.edges.map(n=\u003en.shape.translate(e)))}rotate(e=0,n=new Ve.Point){return new zte(this.edges.map(o=\u003eo.shape.rotate(e,n)))}transform(e=new Ve.Matrix){return new zte(this.edges.map(n=\u003en.shape.transform(e)))}toShapes(){return this.edges.map(e=\u003ee.shape.clone())}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svgPoints(){return this.vertices.map(e=\u003e`${e.x},${e.y}`).join(\" \")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`\n\u003cpath ${KD({fill:\"none\",...e})} d=\"`;n+=`\nM${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`\" \u003e\n\u003c/path\u003e`,n}};Ve.Multiline=zD;function dL(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;r=i[0]===null?0:i[1]===null?t.shape.length:i[0].length;let s,a=0;UD(r,0)\u0026\u0026(a|=1),UD(r,t.shape.length)\u0026\u0026(a|=2),s=r===1/0?i[0].coord(e):2\u0026a\u0026\u0026t.next\u0026\u0026t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function oJ(t){t.int_points1_sorted=ov(t.int_points1),t.int_points2_sorted=ov(t.int_points2)}function ov(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(nto)}function nto(t,e){return t.faceId\u003ce.faceId?-1:t.faceId\u003ee.faceId?1:t.arc_length\u003ce.arc_length?-1:t.arc_length\u003ee.arc_length?1:0}function Q6e(t){if(t.int_points1.length\u003c2)return;let e,n,o,i,r=!1;for(let s=0;s\u003ct.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a\u003ct.int_points1_sorted.length\u0026\u0026(o=t.int_points1_sorted[a],UD(o.arc_length,e.arc_length));a++)o.id!==-1\u0026\u0026(i=t.int_points2[o.id],i.id!==-1\u0026\u0026o.edge_before===e.edge_before\u0026\u0026o.edge_after===e.edge_after\u0026\u0026i.edge_before===n.edge_before\u0026\u0026i.edge_after===n.edge_after\u0026\u0026(o.id=-1,i.id=-1,r=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s\u003ct.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!UD(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let A=t.int_points1[a.id];A.edge_before===e.edge_before\u0026\u0026A.edge_after===e.edge_after\u0026\u0026a.edge_before===n.edge_before\u0026\u0026a.edge_after===n.edge_after\u0026\u0026(A.id=-1,a.id=-1,r=!0)}r\u0026\u0026(t.int_points1=t.int_points1.filter(s=\u003es.id\u003e=0),t.int_points2=t.int_points2.filter(s=\u003es.id\u003e=0),t.int_points1.forEach((s,a)=\u003es.id=a),t.int_points2.forEach((s,a)=\u003es.id=a))}function v6e(t){for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after\u0026\u0026(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvEnd=2),e.edge_after\u0026\u0026(e.edge_after.bvStart=2)}function w6e(t,e){for(let n of t)n.edge_before\u0026\u0026n.edge_before.setInclusion(e),n.edge_after\u0026\u0026n.edge_after.setInclusion(e)}function hL(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s\u003ct.length\u0026\u0026o.face===n\u0026\u0026(i=t[s],i.pt.equalTo(o.pt)\u0026\u0026i.edge_before===o.edge_before\u0026\u0026i.edge_after===o.edge_after);s++)r++;return r}function pL(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start\u0026\u0026o.shape.start.equalTo(n.pt)\u0026\u0026(n.is_vertex|=1),o.shape.end\u0026\u0026o.shape.end.equalTo(n.pt)\u0026\u0026(n.is_vertex|=2),1\u0026n.is_vertex){n.edge_before=o.prev,o.prev\u0026\u0026(n.is_vertex=2);continue}if(2\u0026n.is_vertex)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof zD\u0026\u00261\u0026n.is_vertex\u0026\u0026(n.edge_after=t.first)}}function cIt(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}Ve.multiline=(...t)=\u003enew Ve.Multiline(...t);var{INSIDE:g7,OUTSIDE:d7,BOUNDARY:jf,OVERLAP_SAME:oto,OVERLAP_OPPOSITE:ito}=Mae,{NOT_VERTEX:Ghr,START_VERTEX:lIt,END_VERTEX:uIt}=Mae;function P6e(t,e){let n=e.clone().reverse(),[o]=iJ(t,n,3,!0);return o}function gIt(t,e){let[n]=iJ(t,e,2,!0);return n}function dIt(t,e){let[n,o]=iJ(t,e,2,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=\u003ea.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=\u003ea.shape)];return[i,r]}function M6e(t,e){let[n]=iJ(t,e,3,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=\u003er.shape)];return o}function hIt(t,e){let n=t.clone(),o=e.clone(),i=pIt(n,o);return oJ(i),pL(n,i.int_points1_sorted),pL(o,i.int_points2_sorted),Q6e(i),oJ(i),[i.int_points1_sorted.map(r=\u003er.pt),i.int_points2_sorted.map(r=\u003er.pt)]}function rto(t,e,n,o){let i=mIt(t,n.int_points1),r=mIt(e,n.int_points2);for(_It(i,e),_It(r,t),v6e(n.int_points1),v6e(n.int_points2),w6e(n.int_points1,e),w6e(n.int_points2,t);sto(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,A,c,l=s.int_points1.length;for(let u=0;u\u003cl;u++){let g=s.int_points1_sorted[u];g.face!==a\u0026\u0026(A=u,a=g.face);let h,d=u,p=hL(s.int_points1_sorted,u,a);h=d+p\u003cl\u0026\u0026s.int_points1_sorted[d+p].face===a?d+p:A;let m=hL(s.int_points1_sorted,h,a);c=null;for(let E=h;E\u003ch+m;E++){let B=s.int_points1_sorted[E];if(B.face===a\u0026\u0026s.int_points2[B.id].face===s.int_points2[g.id].face){c=B;break}}if(c===null)continue;let _=g.edge_after,f=c.edge_before;if(_.bv!==2||f.bv!==2||_!==f)continue;let I=s.int_points2[g.id],C=s.int_points2[c.id],y=I.edge_after,x=C.edge_before;y.bv===2\u0026\u0026x.bv===2\u0026\u0026y===x||(I=s.int_points2[c.id],C=s.int_points2[g.id],y=I.edge_after,x=C.edge_before),y.bv===2\u0026\u0026x.bv===2\u0026\u0026y===x\u0026\u0026_.setOverlap(y)}})(n),D6e(t,o,n.int_points1_sorted,!0),D6e(e,o,n.int_points2_sorted,!1),fIt(t,i,o,!0),fIt(e,r,o,!1)}function iJ(t,e,n,o){let i=t.clone(),r=e.clone(),s=pIt(i,r);return oJ(s),pL(i,s.int_points1_sorted),pL(r,s.int_points2_sorted),Q6e(s),oJ(s),rto(i,r,s,n),o\u0026\u0026(function(a,A,c){(function(l,u,g,h){for(let d of u.faces){for(let p of d)l.edges.add(p);h.find(p=\u003ep.face===d)===void 0\u0026\u0026l.addFace(d.first,d.last)}})(a,A,0,c.int_points2),(function(l,u,g){if(g.int_points1.length!==0)for(let h=0;h\u003cg.int_points1.length;h++){let d=g.int_points1[h],p=g.int_points2[h];if(d.edge_before!==void 0\u0026\u0026d.edge_after===void 0\u0026\u0026p.edge_before===void 0\u0026\u0026p.edge_after!==void 0\u0026\u0026(d.edge_before.next=p.edge_after,p.edge_after.prev=d.edge_before,d.edge_after=p.edge_after,p.edge_before=d.edge_before),p.edge_before!==void 0\u0026\u0026p.edge_after===void 0\u0026\u0026d.edge_before===void 0\u0026\u0026d.edge_after!==void 0\u0026\u0026(p.edge_before.next=d.edge_after,d.edge_after.prev=p.edge_before,p.edge_after=d.edge_after,d.edge_before=p.edge_before),d.edge_before!==void 0\u0026\u0026d.edge_after===void 0)for(let m of g.int_points1_sorted)m!==d\u0026\u0026m.edge_before===void 0\u0026\u0026m.edge_after!==void 0\u0026\u0026m.pt.equalTo(d.pt)\u0026\u0026(d.edge_before.next=m.edge_after,m.edge_after.prev=d.edge_before,d.edge_after=m.edge_after,m.edge_before=d.edge_before);if(p.edge_before!==void 0\u0026\u0026p.edge_after===void 0)for(let m of g.int_points2_sorted)m!==p\u0026\u0026m.edge_before===void 0\u0026\u0026m.edge_after!==void 0\u0026\u0026m.pt.equalTo(p.pt)\u0026\u0026(p.edge_before.next=m.edge_after,m.edge_after.prev=p.edge_before,p.edge_after=m.edge_after,m.edge_before=p.edge_before)}})(0,0,c),N6e(a,c.int_points1),N6e(A,c.int_points2),R6e(a,c.int_points1,c.int_points2),R6e(a,c.int_points2,c.int_points1)})(i,r,s),[i,r]}function pIt(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)dL(o,a,n.int_points1),dL(r,a,n.int_points2)}}return n}function mIt(t,e){let n=[];for(let o of t.faces)e.find(i=\u003ei.face===o)||n.push(o);return n}function _It(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function sto(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u\u003cc;u++){let g=o[u];g.face!==s\u0026\u0026(a=u,s=g.face);let h,d=u,p=hL(o,u,s);h=d+p\u003cc\u0026\u0026o[d+p].face===s?d+p:a;let m=hL(o,h,s);A=null;for(let I=h;I\u003ch+m;I++){let C=o[I];if(C.face===s\u0026\u0026i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv!==jf||f.bv==jf)if(_.bv==jf||f.bv!==jf){if(_.bv===jf\u0026\u0026f.bv===jf\u0026\u0026_!=f||_.bv===g7\u0026\u0026f.bv===d7||_.bv===d7\u0026\u0026f.bv===g7){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===jf\u0026\u0026f.bv===jf\u0026\u0026_!=f){let I,C=_.next;for(;C!=f;){if(C.bv!=jf){if(I===void 0)I=C.bv;else if(C.bv!=I)throw ld.UNRESOLVED_BOUNDARY_CONFLICT}C=C.next}I!=null\u0026\u0026(_.bv=I,f.bv=I);continue}if(_.bv===g7\u0026\u0026f.bv===d7||_.bv===d7\u0026\u0026f.bv===g7){let I=_;for(;I!=f;){if(I.bvStart===_.bv\u0026\u0026I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C\u003c10*Ve.DP_TOL){dL(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex\u0026lIt)x.edge_after=I,x.edge_before=I.prev,I.bvStart=jf,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex\u0026uIt)x.edge_after=I.next,I.bvEnd=jf,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=jf,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);dL(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex\u0026lIt)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex\u0026uIt)B.edge_after=E.next;else{let S=i.find(w=\u003ew.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S\u0026\u0026(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=jf,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=jf,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}oJ(r),l=!0;break}}I=I.next}if(l)break;throw ld.UNRESOLVED_BOUNDARY_CONFLICT}}else f.bv=_.bv;else _.bv=f.bv}return l}function D6e(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A\u003cn.length;A++){if(s=n[A],s.face!==i\u0026\u0026(r=A,i=s.face),i.isEmpty())continue;let c,l=A,u=hL(n,A,i);c=l+u\u003cn.length\u0026\u0026n[l+u].face===s.face?l+u:r,a=n[c];let g=c,h=hL(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===g7\u0026\u0026p.bv===g7\u0026\u0026e===1||d.bv===d7\u0026\u0026p.bv===d7\u0026\u0026e===2||(d.bv===d7||p.bv===d7)\u0026\u0026e===3\u0026\u0026!o||(d.bv===g7||p.bv===g7)\u0026\u0026e===3\u0026\u0026o||d.bv===jf\u0026\u0026p.bv===jf\u0026\u0026d.overlap\u0026oto\u0026\u0026o||d.bv===jf\u0026\u0026p.bv===jf\u0026\u0026d.overlap\u0026ito){t.removeChain(i,d,p);for(let m=l;m\u003cl+u;m++)n[m].edge_after=void 0;for(let m=g;m\u003cg+h;m++)n[m].edge_before=void 0}A+=u-1}}function N6e(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before\u0026\u0026(n.edge_before.face=void 0),n.edge_after\u0026\u0026(n.edge_after.face=void 0)}function R6e(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{y6e.testInfiniteLoop(i)}catch{throw ld.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s);for(let a of n)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s)}}function fIt(t,e,n,o){for(let i of e){let r=i.first.bv;(n===1\u0026\u0026r===g7||n===3\u0026\u0026r===g7\u0026\u0026o||n===3\u0026\u0026r===d7\u0026\u0026!o||n===2\u0026\u0026r===d7)\u0026\u0026t.deleteFace(i)}}var ato=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:hIt,innerClip:dIt,intersect:gIt,outerClip:M6e,removeNotRelevantChains:D6e,removeOldFaces:N6e,restoreFaces:R6e,subtract:P6e,unify:function(t,e){let[n]=iJ(t,e,1,!0);return n}}),Ato=RegExp(\"T.F..FFF.|T.F...F..\"),cto=RegExp(\"T........|.T.......|...T.....|....T....\"),lto=RegExp(\"FT.......|F..T.....|F...T....\"),uto=RegExp(\"T.F..F...\"),gto=RegExp(\"T.F..F...|.TF..F...|..FT.F...|..F.TF...\"),mL=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(e){this.m[0]=e}get I2B(){return this.m[1]}set I2B(e){this.m[1]=e}get I2E(){return this.m[2]}set I2E(e){this.m[2]=e}get B2I(){return this.m[3]}set B2I(e){this.m[3]=e}get B2B(){return this.m[4]}set B2B(e){this.m[4]=e}get B2E(){return this.m[5]}set B2E(e){this.m[5]=e}get E2I(){return this.m[6]}set E2I(e){this.m[6]=e}get E2B(){return this.m[7]}set E2B(e){this.m[7]=e}get E2E(){return this.m[8]}set E2E(e){this.m[8]=e}toString(){return this.m.map(e=\u003ee instanceof Array\u0026\u0026e.length\u003e0?\"T\":e instanceof Array\u0026\u0026e.length===0?\"F\":\"*\").join(\"\")}equal(){return Ato.test(this.toString())}intersect(){return cto.test(this.toString())}touch(){return lto.test(this.toString())}inside(){return uto.test(this.toString())}covered(){return gto.test(this.toString())}};function rJ(t,e){let n,o=new Ve.Ray(e),i=new Ve.Line(o.pt,o.norm);const r=new Ve.Box(o.box.xmin-Ve.DP_TOL,o.box.ymin-Ve.DP_TOL,o.box.xmax+Ve.DP_TOL,o.box.ymax+Ve.DP_TOL);if(t.box.not_intersect(r))return Ve.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ve.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ve.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ve.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=\u003eJ1t(l.pt.x,u.pt.x)?-1:z1t(l.pt.x,u.pt.x)?1:l.face_index\u003cu.face_index?-1:l.face_index\u003eu.face_index?1:l.edge.arc_length\u003cu.edge.arc_length?-1:l.edge.arc_length\u003eu.edge.arc_length?1:0);let c=0;for(let l=0;l\u003cA.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;C6e(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;C6e(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.edge.shape instanceof Ve.Segment)c++;else{let g=u.edge.shape.box;UD(u.pt.y,g.ymin)||UD(u.pt.y,g.ymax)||c++}}return n=c%2==1?1:0,n}function IIt(t,e){return _L(t,e).intersect()}function CIt(t,e){return _L(t,e).inside()}function yIt(t,e){return _L(t,e).covered()}function xIt(t,e){return yIt(e,t)}function _L(t,e){return t instanceof Ve.Line\u0026\u0026e instanceof Ve.Line?(function(n,o){let i=new mL,r=cL(n,o);return r.length===0?n.contains(o.pt)\u0026\u0026o.contains(n.pt)?(i.I2I=[n],i.I2E=[],i.E2I=[]):(i.I2I=[],i.I2E=[n],i.E2I=[o]):(i.I2I=r,i.I2E=n.split(r),i.E2I=o.split(r)),i})(t,e):t instanceof Ve.Line\u0026\u0026e instanceof Ve.Circle?(function(n,o){let i=new mL,r=VD(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new zD([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ve.Polygon([o.toArc()]).cutWithLine(n)}return i})(t,e):t instanceof Ve.Line\u0026\u0026e instanceof Ve.Box?(function(n,o){let i=new mL,r=lL(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new zD([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();o.toSegments().some(c=\u003ec.contains(r[0])\u0026\u0026c.contains(r[1]))?(i.I2I=[],i.I2B=[A[1]],i.I2E=[A[0],A[2]],i.E2I=[o]):(i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ve.Polygon(o.toSegments()).cutWithLine(n))}return i})(t,e):t instanceof Ve.Line\u0026\u0026e instanceof Ve.Polygon?(function(n,o){let i=new mL,r=nJ(n,o),s=new zD([n]),a=r.length\u003e0?r.slice():n.sortPoints(r);return s.split(a),[...s].forEach(A=\u003eA.setInclusion(o)),i.I2I=[...s].filter(A=\u003eA.bv===Ve.INSIDE).map(A=\u003eA.shape),i.I2B=[...s].slice(1).map(A=\u003eA.bv===Ve.BOUNDARY?A.shape:A.shape.start),i.I2E=[...s].filter(A=\u003eA.bv===Ve.OUTSIDE).map(A=\u003eA.shape),i.E2I=o.cutWithLine(n),i})(t,e):(t instanceof Ve.Segment||t instanceof Ve.Arc)\u0026\u0026e instanceof Ve.Polygon?EIt(t,e):(t instanceof Ve.Segment||t instanceof Ve.Arc)\u0026\u0026(e instanceof Ve.Circle||e instanceof Ve.Box)?EIt(t,new Ve.Polygon(e)):t instanceof Ve.Polygon\u0026\u0026e instanceof Ve.Polygon?Tae(t,e):(t instanceof Ve.Circle||t instanceof Ve.Box)\u0026\u0026(e instanceof Ve.Circle||e instanceof Ve.Box)?Tae(new Ve.Polygon(t),new Ve.Polygon(e)):(t instanceof Ve.Circle||t instanceof Ve.Box)\u0026\u0026e instanceof Ve.Polygon?Tae(new Ve.Polygon(t),e):t instanceof Ve.Polygon\u0026\u0026(e instanceof Ve.Circle||e instanceof Ve.Box)?Tae(t,new Ve.Polygon(e)):void 0}function EIt(t,e){let n=new mL,o=(function(s,a){return s instanceof Ve.Line?nJ(s,a):s instanceof Ve.Segment?E6e(s,a):s instanceof Ve.Arc?B6e(s,a):[]})(t,e),i=o.length\u003e0?o.slice():t.sortPoints(o),r=new zD([t]);r.split(i),[...r].forEach(s=\u003es.setInclusion(e)),n.I2I=[...r].filter(s=\u003es.bv===Ve.INSIDE).map(s=\u003es.shape),n.I2B=[...r].slice(1).map(s=\u003es.bv===Ve.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=\u003es.bv===Ve.OUTSIDE).map(s=\u003es.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(rJ(e,s)){case Ve.INSIDE:n.B2I.push(s);break;case Ve.BOUNDARY:n.B2B.push(s);break;case Ve.OUTSIDE:n.B2E.push(s)}return n}function Tae(t,e){let n=new mL,[o,i]=hIt(t,e),r=gIt(t,e),s=P6e(t,e),a=P6e(e,t),[A,c]=dIt(t,e),l=M6e(t,e),u=M6e(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var dto=Object.freeze({__proto__:null,contain:function(t,e){return CIt(e,t)},cover:xIt,covered:yIt,disjoint:function(t,e){return!IIt(t,e)},equal:function(t,e){return _L(t,e).equal()},inside:CIt,intersect:IIt,relate:_L,touch:function(t,e){return _L(t,e).touch()}}),sJ=class Tk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new Tk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new Tk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new Tk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!=\"number\"||typeof e[1]!=\"number\")throw ld.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new Tk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new Tk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new Tk(e,0,0,n,0,0))}equalTo(e){return!!Ve.Utils.EQ(this.tx,e.tx)\u0026\u0026!!Ve.Utils.EQ(this.ty,e.ty)\u0026\u0026!!Ve.Utils.EQ(this.a,e.a)\u0026\u0026!!Ve.Utils.EQ(this.b,e.b)\u0026\u0026!!Ve.Utils.EQ(this.c,e.c)\u0026\u0026!!Ve.Utils.EQ(this.d,e.d)}};Ve.Matrix=sJ,Ve.matrix=(...t)=\u003enew Ve.Matrix(...t);var hto=class{constructor(e,n){this.low=e,this.high=n}get max(){return this.clone()}less_than(e){return this.low\u003ce.low||this.low===e.low\u0026\u0026this.high\u003ce.high}equal_to(e){return this.low===e.low\u0026\u0026this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high\u003ce.low||e.high\u003cthis.low}merge(e){const n=this.low===void 0?e.low:this.low\u003ce.low?this.low:e.low,o=this.high===void 0?e.high:this.high\u003ee.high?this.high:e.high,i=this.clone();return i.low=n,i.high=o,i}output(){return[this.low,this.high]}comparable_less_than(e,n){return e\u003cn}},pto=class t5n extends hto{clone(){return new t5n(this.low,this.high)}},iv=class{constructor(e,n,o=null,i=null,r=null,s=0){if(this.left=o,this.right=i,this.parent=r,this.color=s,this.item={key:void 0,values:[]},n!==void 0\u0026\u0026this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,A]=e;if(!Number.isNaN(a)\u0026\u0026!Number.isNaN(A)){let c=a,l=A;c\u003el\u0026\u0026([c,l]=[l,c]),this.item.key=new pto(c,l)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0\u0026\u0026this.item.values.length===0\u0026\u0026this.left===null\u0026\u0026this.right===null\u0026\u0026this.color===0}requireKey(){if(!this.item.key)throw new Error(\"Node key is undefined (nil/sentinel). Operation is not applicable.\");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n\u0026\u0026o\u0026\u0026n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right\u0026\u0026this.right.max\u0026\u0026(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left\u0026\u0026this.left.max\u0026\u0026(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(n,i.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(i.high,n)}},T6e=class n5n{constructor(){this.root=null,this.nil_node=new iv}get size(){let e=0;return this.tree_walk(this.root,n=\u003ee+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=\u003ee.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=\u003e{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new iv(e));if(o)return o.item.values.push(n),o;const i=new iv(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new iv(e));return!!o\u0026\u0026(arguments.length\u003c2||n===e||o.item.values.some(i=\u003ei\u0026\u0026i.equal_to?i.equal_to(n):i===n))}remove(e,n=e){const o=this.tree_search(this.root,new iv(e));if(!o)return;if(arguments.length\u003c2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=\u003er\u0026\u0026r.equal_to?r.equal_to(n):r===n);return i\u003e=0?(o.item.values.splice(i,1),o.item.values.length===0\u0026\u0026this.tree_delete(o),o):void 0}search(e,n=(o,i)=\u003eo===i?i.output():o){const o=new iv(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new iv(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new n5n;return this.tree_walk(this.root,o=\u003e{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=\u003eo===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new iv(e)):this.root\u0026\u0026(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root\u0026\u0026n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right\u0026\u0026(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left\u0026\u0026(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e\u0026\u0026(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0\u0026\u0026this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root\u0026\u0026o.parent!=null\u0026\u0026o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1\u0026\u0026(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0\u0026\u0026n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0\u0026\u0026(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1\u0026\u0026(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0\u0026\u0026n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0\u0026\u0026(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null\u0026\u0026e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i\u0026\u0026i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:(o\u0026\u0026!i.less_than(o)||(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)\u0026\u0026o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null\u0026\u0026n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null\u0026\u0026n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null\u0026\u0026i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node\u0026\u0026(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node\u0026\u0026(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}tree_walk(e,n){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1\u0026\u0026(n.left.color===0\u0026\u0026n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===0\u0026\u0026n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,i=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==i)throw new Error(\"Red-black height property violated\");return n+=o,n}},mto=class extends Set{constructor(e){super(e),this.index=new T6e,this.forEach(n=\u003ethis.index.insert(n))}add(e){let n=this.size;const{key:o,value:i}=e,r=o||e.box,s=i||e;return super.add(s),this.size\u003en\u0026\u0026this.index.insert(r,s),this}delete(e){const{key:n,value:o}=e,i=n||e.box,r=o||e;let s=super.delete(r);return s\u0026\u0026this.index.remove(i,r),s}clear(){super.clear(),this.index=new T6e}search(e){return this.index.search(e)}hit(e){let n=new Ve.Box(e.x-1,e.y-1,e.x+1,e.y+1);return this.index.search(n).filter(o=\u003ee.on(o))}svg(){return[...this].reduce((e,n)=\u003ee+n.svg(),\"\")}};Ve.PlanarSet=mto;var rv=class{get name(){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...e){return this.transform(new sJ().translate(...e))}rotate(e,n=new Ve.Point){return this.transform(new sJ().rotate(e,n.x,n.y))}scale(e,n){return this.transform(new sJ().scale(e,n))}transform(...e){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(e={}){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}};Ve.Point=class o5n extends rv{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===2){let n=e[0];if(typeof n[0]==\"number\"\u0026\u0026typeof n[1]==\"number\")return this.x=n[0],void(this.y=n[1])}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"point\"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2\u0026\u0026typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\")return this.x=e[0],void(this.y=e[1]);throw ld.ILLEGAL_PARAMETERS}}get box(){return new Ve.Box(this.x,this.y,this.x,this.y)}clone(){return new Ve.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ve.Utils.EQ(this.x,e.x)\u0026\u0026Ve.Utils.EQ(this.y,e.y)}lessThan(e){return!!Ve.Utils.LT(this.y,e.y)||!(!Ve.Utils.EQ(this.y,e.y)||!Ve.Utils.LT(this.x,e.x))}transform(e){return new Ve.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ve.Vector(this,e.pt);if(Ve.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ve.Vector(e.pt,this);return Ve.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof o5n){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ve.Segment(this,e)]}return e instanceof Ve.Line?Ve.Distance.point2line(this,e):e instanceof Ve.Circle?Ve.Distance.point2circle(this,e):e instanceof Ve.Segment?Ve.Distance.point2segment(this,e):e instanceof Ve.Arc?Ve.Distance.point2arc(this,e):e instanceof Ve.Polygon?Ve.Distance.point2polygon(this,e):e instanceof Ve.PlanarSet?Ve.Distance.shape2planarSet(this,e):e instanceof Ve.Multiline?Ve.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof Ve.Point)return this.equalTo(e);if(e.contains\u0026\u0026e.contains instanceof Function)return e.contains(this);throw Ve.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return\"point\"}svg(e={}){const n=e.r??3;return`\n\u003ccircle cx=\"${this.x}\" cy=\"${this.y}\" r=\"${n}\"\n ${KD({fill:\"red\",...e})} /\u003e`}},Ve.point=(...t)=\u003enew Ve.Point(...t),Ve.Vector=class extends rv{constructor(...t){if(super(),this.x=0,this.y=0,t.length!==0){if(t.length===1\u0026\u0026t[0]instanceof Array\u0026\u0026t[0].length===2){let e=t[0];if(typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\")return this.x=e[0],void(this.y=e[1])}if(t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"vector\"){let{x:e,y:n}=t[0];return this.x=e,void(this.y=n)}if(t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"segment\"){let{start:e,end:n}=t[0];return this.x=n.x-e.x,void(this.y=n.y-e.y)}if(t.length===2){let e=t[0],n=t[1];if(typeof e==\"number\"\u0026\u0026typeof n==\"number\")return this.x=e,void(this.y=n);if(e instanceof Ve.Point\u0026\u0026n instanceof Ve.Point)return this.x=n.x-e.x,void(this.y=n.y-e.y)}throw ld.ILLEGAL_PARAMETERS}}clone(){return new Ve.Vector(this.x,this.y)}get slope(){let t=Math.atan2(this.y,this.x);return t\u003c0\u0026\u0026(t=2*Math.PI+t),t}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ve.Utils.EQ_0(this.length)}equalTo(t){return Ve.Utils.EQ(this.x,t.x)\u0026\u0026Ve.Utils.EQ(this.y,t.y)}multiply(t){return new Ve.Vector(t*this.x,t*this.y)}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}normalize(){if(this.isZeroLength())throw ld.ZERO_DIVISION;return new Ve.Vector(this.x/this.length,this.y/this.length)}rotate(t,e=new Ve.Point){if(e.x===0\u0026\u0026e.y===0)return this.transform(new sJ().rotate(t));throw ld.OPERATION_IS_NOT_SUPPORTED}transform(t){return new Ve.Vector(t.transform([this.x,this.y]))}rotate90CCW(){return new Ve.Vector(-this.y,this.x)}rotate90CW(){return new Ve.Vector(this.y,-this.x)}invert(){return new Ve.Vector(-this.x,-this.y)}add(t){return new Ve.Vector(this.x+t.x,this.y+t.y)}subtract(t){return new Ve.Vector(this.x-t.x,this.y-t.y)}angleTo(t){let e=this.normalize(),n=t.normalize(),o=Math.atan2(e.cross(n),e.dot(n));return o\u003c0\u0026\u0026(o+=2*Math.PI),o}projectionOn(t){let e=t.normalize(),n=this.dot(e);return e.multiply(n)}get name(){return\"vector\"}};var BIt=(...t)=\u003enew Ve.Vector(...t);Ve.vector=BIt,Ve.Segment=class dit extends rv{constructor(...e){if(super(),this.ps=new Ve.Point,this.pe=new Ve.Point,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===4){let n=e[0];return this.ps=new Ve.Point(n[0],n[1]),void(this.pe=new Ve.Point(n[2],n[3]))}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"segment\"){let{ps:n,pe:o}=e[0];return this.ps=new Ve.Point(n.x,n.y),void(this.pe=new Ve.Point(o.x,o.y))}if(!(e.length===1\u0026\u0026e[0]instanceof Ve.Point)){if(e.length===2\u0026\u0026e[0]instanceof Ve.Point\u0026\u0026e[1]instanceof Ve.Point)return this.ps=e[0].clone(),void(this.pe=e[1].clone());if(e.length===4)return this.ps=new Ve.Point(e[0],e[1]),void(this.pe=new Ve.Point(e[2],e[3]));throw ld.ILLEGAL_PARAMETERS}this.ps=e[0].clone()}}clone(){return new Ve.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ve.Vector(this.start,this.end).slope}get box(){return new Ve.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)\u0026\u0026this.pe.equalTo(e.pe)}contains(e){return Ve.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Line?tJ(this,e):e instanceof Ve.Ray?b6e(e,this):e instanceof Ve.Segment?Nae(this,e):e instanceof Ve.Circle?Rae(this,e):e instanceof Ve.Box?(function(n,o){let i=[];for(let r of o.toSegments()){let s=Nae(r,n);for(let a of s)i.push(a)}return i})(this,e):e instanceof Ve.Arc?uL(this,e):e instanceof Ve.Polygon?E6e(this,e):e instanceof Ve.Multiline?gL(this,e):void 0}distanceTo(e){if(e instanceof Ve.Point){let[n,o]=Ve.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Circle){let[n,o]=Ve.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ve.Line){let[n,o]=Ve.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ve.Segment){let[n,o]=Ve.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ve.Arc){let[n,o]=Ve.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ve.Polygon){let[n,o]=Ve.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ve.PlanarSet){let[n,o]=Ve.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ve.Multiline)return Ve.Distance.shape2multiline(this,e)}tangentInStart(){return new Ve.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ve.Vector(this.end,this.start).normalize()}reverse(){return new dit(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ve.Segment(this.start,e),new Ve.Segment(e,this.end)]}middle(){return new Ve.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e\u003ethis.length||e\u003c0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ve.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ve.Distance.point2segment(e,this);return n}definiteIntegral(e=0){return(this.end.x-this.start.x)*(this.start.y-e+(this.end.y-e))/2}transform(e=new Ve.Matrix){return new dit(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ve.Line(this.start,this.end).sortPoints(e)}get name(){return\"segment\"}svg(e={}){return`\n\u003cline x1=\"${this.start.x}\" y1=\"${this.start.y}\" x2=\"${this.end.x}\" y2=\"${this.end.y}\" ${KD(e)} /\u003e`}},Ve.segment=(...t)=\u003enew Ve.Segment(...t);var{vector:aJ}=Ve;Ve.Line=class i5n extends rv{constructor(...e){if(super(),this.pt=new Ve.Point,this.norm=new Ve.Vector(0,1),e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"line\"){let{pt:n,norm:o}=e[0];return this.pt=new Ve.Point(n),void(this.norm=new Ve.Vector(o))}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ve.Point\u0026\u0026o instanceof Ve.Point)return this.pt=n,this.norm=i5n.points2norm(n,o),void(this.norm.dot(aJ(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert());if(n instanceof Ve.Point\u0026\u0026o instanceof Ve.Vector){if(Ve.Utils.EQ_0(o.x)\u0026\u0026Ve.Utils.EQ_0(o.y))throw ld.ILLEGAL_PARAMETERS;return this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(aJ(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert())}if(n instanceof Ve.Vector\u0026\u0026o instanceof Ve.Point){if(Ve.Utils.EQ_0(n.x)\u0026\u0026Ve.Utils.EQ_0(n.y))throw ld.ILLEGAL_PARAMETERS;return this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(aJ(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert())}}throw ld.ILLEGAL_PARAMETERS}}clone(){return new Ve.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ve.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ve.Vector(this.norm.y,-this.norm.x).slope}get standard(){return[this.norm.x,this.norm.y,this.norm.dot(aJ(this.pt.x,this.pt.y))]}parallelTo(e){return Ve.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)\u0026\u0026this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ve.Vector(this.pt,e);return Ve.Utils.EQ_0(this.norm.dot(n))}coord(e){return aJ(e.x,e.y).cross(this.norm)}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Line?cL(this,e):e instanceof Ve.Ray?sIt(e,this):e instanceof Ve.Circle?VD(this,e):e instanceof Ve.Box?lL(this,e):e instanceof Ve.Segment?tJ(e,this):e instanceof Ve.Arc?Dae(this,e):e instanceof Ve.Polygon?nJ(this,e):e instanceof Ve.Multiline?gL(this,e):void 0}distanceTo(e){if(e instanceof Ve.Point){let[n,o]=Ve.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Circle){let[n,o]=Ve.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Segment){let[n,o]=Ve.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ve.Arc){let[n,o]=Ve.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ve.Polygon){let[n,o]=Ve.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ve.Point)return[new Ve.Ray(e,this.norm),new Ve.Ray(e,this.norm)];{let n=new Ve.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ve.Point){return new Ve.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ve.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=\u003ethis.coord(n)\u003cthis.coord(o)?-1:this.coord(n)\u003ethis.coord(o)?1:0)}get name(){return\"line\"}svg(e,n={}){let o=lL(this,e);if(o.length===0)return\"\";let i=o[0],r=o.length===2?o[1]:o.find(s=\u003e!s.equalTo(i));return r===void 0\u0026\u0026(r=i),new Ve.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw ld.ILLEGAL_PARAMETERS;return new Ve.Vector(e,n).normalize().rotate90CCW()}},Ve.line=(...t)=\u003enew Ve.Line(...t),Ve.Circle=class extends rv{constructor(...t){if(super(),this.pc=new Ve.Point,this.r=1,t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"circle\"){let{pc:e,r:n}=t[0];this.pc=new Ve.Point(e),this.r=n}else{let[e,n]=[...t];e\u0026\u0026e instanceof Ve.Point\u0026\u0026(this.pc=e.clone()),n!==void 0\u0026\u0026(this.r=n)}}clone(){return new Ve.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ve.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(t){return t instanceof Ve.Point?Ve.Utils.LE(t.distanceTo(this.center)[0],this.r):t instanceof Ve.Segment?Ve.Utils.LE(t.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ve.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ve.Arc?this.intersect(t).length===0\u0026\u0026Ve.Utils.LE(t.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ve.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ve.Circle?this.intersect(t).length===0\u0026\u0026Ve.Utils.LE(t.r,this.r)\u0026\u0026Ve.Utils.LE(t.center.distanceTo(this.center)[0],this.r):void 0}toArc(t=!0){return new Ve.Arc(this.center,this.r,Math.PI,-Math.PI,t)}scale(t,e){if(t!==e||this.pc.x!==0||this.pc.y!==0)throw ld.OPERATION_IS_NOT_SUPPORTED;return new Ve.Circle(this.pc,this.r*t)}transform(t=new Ve.Matrix){return new Ve.Circle(this.pc.transform(t),this.r)}intersect(t){return t instanceof Ve.Point?this.contains(t)?[t]:[]:t instanceof Ve.Line?VD(t,this):t instanceof Ve.Ray?rIt(t,this):t instanceof Ve.Segment?Rae(t,this):t instanceof Ve.Circle?$1t(t,this):t instanceof Ve.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=Rae(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ve.Arc?x6e(t,this):t instanceof Ve.Polygon?tIt(this,t):t instanceof Ve.Multiline?gL(this,t):void 0}distanceTo(t){if(t instanceof Ve.Point){let[e,n]=Ve.Distance.point2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Circle){let[e,n]=Ve.Distance.circle2circle(this,t);return[e,n]}if(t instanceof Ve.Line){let[e,n]=Ve.Distance.circle2line(this,t);return[e,n]}if(t instanceof Ve.Segment){let[e,n]=Ve.Distance.segment2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Arc){let[e,n]=Ve.Distance.arc2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Polygon){let[e,n]=Ve.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ve.PlanarSet){let[e,n]=Ve.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ve.Multiline){let[e,n]=Ve.Distance.shape2multiline(this,t);return[e,n]}}get name(){return\"circle\"}svg(t={}){return`\n\u003ccircle cx=\"${this.pc.x}\" cy=\"${this.pc.y}\" r=\"${this.r}\"\n ${KD({fill:\"none\",...t})} /\u003e`}},Ve.circle=(...t)=\u003enew Ve.Circle(...t),Ve.Arc=class extends rv{constructor(...t){if(super(),this.pc=new Ve.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,t.length!==0)if(t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"arc\"){let{pc:e,r:n,startAngle:o,endAngle:i,counterClockwise:r}=t[0];this.pc=new Ve.Point(e.x,e.y),this.r=n,this.startAngle=o,this.endAngle=i,this.counterClockwise=r}else{let[e,n,o,i,r]=[...t];e\u0026\u0026e instanceof Ve.Point\u0026\u0026(this.pc=e.clone()),n!==void 0\u0026\u0026(this.r=n),o!==void 0\u0026\u0026(this.startAngle=o),i!==void 0\u0026\u0026(this.endAngle=i),r!==void 0\u0026\u0026(this.counterClockwise=r)}}clone(){return new Ve.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let t=this.startAngle,e=this.endAngle;if(Ve.Utils.EQ(Math.abs(t-e),Ve.PIx2))return Ve.PIx2;Math.abs(t)\u003eVe.PIx2\u0026\u0026(t-=Math.trunc(t/Ve.PIx2)*Ve.PIx2),t\u003c0\u0026\u0026(t+=Ve.PIx2),Math.abs(e)\u003eVe.PIx2\u0026\u0026(e-=Math.trunc(e/Ve.PIx2)*Ve.PIx2),e\u003c0\u0026\u0026(e+=Ve.PIx2);let n=this.counterClockwise?e-t:t-e;return n\u003c0\u0026\u0026(n+=Ve.PIx2),n}get start(){return new Ve.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ve.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let t=this.breakToFunctional().reduce((e,n)=\u003ee.merge(n.start.box),new Ve.Box);return t=t.merge(this.end.box),t}contains(t){if(!Ve.Utils.EQ(this.pc.distanceTo(t)[0],this.r))return!1;if(t.equalTo(this.start))return!0;let e=new Ve.Vector(this.pc,t).slope,n=new Ve.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise);return Ve.Utils.LE(n.length,this.length)}split(t){if(this.start.equalTo(t))return[null,this.clone()];if(this.end.equalTo(t))return[this.clone(),null];let e=new Ve.Vector(this.pc,t).slope;return[new Ve.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise),new Ve.Arc(this.pc,this.r,e,this.endAngle,this.counterClockwise)]}middle(){let t=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ve.Arc(this.pc,this.r,this.startAngle,t,this.counterClockwise).end}pointAtLength(t){if(t\u003ethis.length||t\u003c0)return null;if(t===0)return this.start;if(t===this.length)return this.end;let e=t/this.length,n=this.counterClockwise?this.startAngle+this.sweep*e:this.startAngle-this.sweep*e;return new Ve.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(t){return t instanceof Ve.Point?this.contains(t)?[t]:[]:t instanceof Ve.Line?Dae(t,this):t instanceof Ve.Ray?S6e(t,this):t instanceof Ve.Circle?x6e(this,t):t instanceof Ve.Segment?uL(t,this):t instanceof Ve.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=uL(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ve.Arc?q1t(this,t):t instanceof Ve.Polygon?B6e(this,t):t instanceof Ve.Multiline?gL(this,t):void 0}distanceTo(t){if(t instanceof Ve.Point){let[e,n]=Ve.Distance.point2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Circle){let[e,n]=Ve.Distance.arc2circle(this,t);return[e,n]}if(t instanceof Ve.Line){let[e,n]=Ve.Distance.arc2line(this,t);return[e,n]}if(t instanceof Ve.Segment){let[e,n]=Ve.Distance.segment2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Arc){let[e,n]=Ve.Distance.arc2arc(this,t);return[e,n]}if(t instanceof Ve.Polygon){let[e,n]=Ve.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ve.PlanarSet){let[e,n]=Ve.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ve.Multiline)return Ve.Distance.shape2multiline(this,t)}breakToFunctional(){let t=[],e=[0,Math.PI/2,Math.PI,3*Math.PI/2],n=this.startAngle,o=this.endAngle;Ve.Utils.EQ(Math.abs(n-o),Ve.PIx2)\u0026\u0026(o=n),Math.abs(n)\u003eVe.PIx2\u0026\u0026(n-=Math.trunc(n/Ve.PIx2)*Ve.PIx2),n\u003c0\u0026\u0026(n+=Ve.PIx2),Math.abs(o)\u003eVe.PIx2\u0026\u0026(o-=Math.trunc(o/Ve.PIx2)*Ve.PIx2),o\u003c0\u0026\u0026(o+=Ve.PIx2);let i,r,s,a=n;this.counterClockwise?(r=Math.ceil(n/(Math.PI/2))%4,s=1):(r=Math.floor(n/(Math.PI/2))%4,s=-1);for(let A=0,c=r;A\u003c4;A++,c=(c+s+4)%4){if(i=e[c],i===a)continue;let l=this.counterClockwise?i-n:n-i;if(l\u003c0\u0026\u0026(l+=Ve.PIx2),l\u003ethis.sweep)break;t.push(new Ve.Arc(this.pc,this.r,a,i,this.counterClockwise)),a=i}return t.length===0?(t.push(this),t):(i=o,a!==i\u0026\u0026t.push(new Ve.Arc(this.pc,this.r,a,i,this.counterClockwise)),t)}tangentInStart(){let t=new Ve.Vector(this.pc,this.start),e=this.counterClockwise?Math.PI/2:-Math.PI/2;return t.rotate(e).normalize()}tangentInEnd(){let t=new Ve.Vector(this.pc,this.end),e=this.counterClockwise?-Math.PI/2:Math.PI/2;return t.rotate(e).normalize()}reverse(){return new Ve.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(t=new Ve.Matrix){let e=this.start.transform(t),n=this.end.transform(t),o=this.pc.transform(t),i=this.counterClockwise;return t.a*t.d\u003c0\u0026\u0026(i=!i),Ve.Arc.arcSE(o,e,n,i)}static arcSE(t,e,n,o){let{vector:i}=Ve,r=i(t,e).slope,s=i(t,n).slope;Ve.Utils.EQ(r,s)\u0026\u0026(s+=2*Math.PI,o=!0);let a=i(t,e).length;return new Ve.Arc(t,a,r,s,o)}definiteIntegral(t=0){return this.breakToFunctional().reduce((e,n)=\u003ee+n.circularSegmentDefiniteIntegral(t),0)}circularSegmentDefiniteIntegral(t){let e=new Ve.Segment(this.start,this.end).definiteIntegral(t),n=Ve.Utils.EQ(this.sweep,Ve.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?e-n:e+n}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(t){let{vector:e}=Ve;return t.slice().sort((n,o)=\u003e{let i=e(this.pc,n).slope,r=e(this.pc,o).slope;return i\u003cr?-1:i\u003er?1:0})}get name(){return\"arc\"}svg(t={}){let e=this.sweep\u003c=Math.PI?\"0\":\"1\",n=this.counterClockwise?\"1\":\"0\";return Ve.Utils.EQ(this.sweep,2*Math.PI)?new Ve.Circle(this.pc,this.r).svg(t):`\n\u003cpath d=\"M${this.start.x},${this.start.y}\n A${this.r},${this.r} 0 ${e},${n} ${this.end.x},${this.end.y}\"\n ${KD({fill:\"none\",...t})} /\u003e`}},Ve.arc=(...t)=\u003enew Ve.Arc(...t),Ve.Box=class Jte extends rv{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new Jte(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ve.Point(this.xmin,this.ymin)}get high(){return new Ve.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ve.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax\u003ce.xmin||this.xmin\u003ee.xmax||this.ymax\u003ce.ymin||this.ymin\u003ee.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new Jte(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!this.low.lessThan(e.low)||!(!this.low.equalTo(e.low)||!this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)\u0026\u0026this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e\u003c=0?this.clone():new Jte(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ve.Point(this.xmin,this.ymin),new Ve.Point(this.xmax,this.ymin),new Ve.Point(this.xmax,this.ymax),new Ve.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ve.Segment(e[0],e[1]),new Ve.Segment(e[1],e[2]),new Ve.Segment(e[2],e[3]),new Ve.Segment(e[3],e[0])]}rotate(e,n=new Ve.Point){throw ld.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ve.Matrix){return this.toPoints().map(n=\u003en.transform(e)).reduce((n,o)=\u003en.merge(o.box),new Jte)}contains(e){return e instanceof Ve.Point?e.x\u003e=this.xmin\u0026\u0026e.x\u003c=this.xmax\u0026\u0026e.y\u003e=this.ymin\u0026\u0026e.y\u003c=this.ymax:e instanceof Ve.Segment?e.vertices.every(n=\u003ethis.contains(n)):e instanceof Ve.Box?e.toSegments().every(n=\u003ethis.contains(n)):e instanceof Ve.Circle?this.contains(e.box):e instanceof Ve.Arc?e.vertices.every(n=\u003ethis.contains(n))\u0026\u0026this.toSegments().every(n=\u003euL(n,e).length===0):!(e instanceof Ve.Line||e instanceof Ve.Ray)\u0026\u0026(e instanceof Ve.Multiline?e.toShapes().every(n=\u003ethis.contains(n)):e instanceof Ve.Polygon?this.contains(e.box):void 0)}distanceTo(e){const n=this.toSegments().map(i=\u003ei.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=\u003e{i[0]\u003co[0]\u0026\u0026(o=i)}),o}get name(){return\"box\"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`\n\u003crect x=\"${this.xmin}\" y=\"${this.ymin}\" width=\"${n}\" height=\"${o}\"\n ${KD({fill:\"none\",...e})} /\u003e`}},Ve.box=(...t)=\u003enew Ve.Box(...t),Ve.Edge=class{constructor(t){this.shape=t,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ve.Segment}get isArc(){return this.shape instanceof Ve.Arc}get isLine(){return this.shape instanceof Ve.Line}get isRay(){return this.shape instanceof Ve.Ray}middle(){return this.shape.middle()}pointAtLength(t){return this.shape.pointAtLength(t)}contains(t){return this.shape.contains(t)}setInclusion(t){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ve.Line||this.shape instanceof Ve.Ray)return this.bv=Ve.OUTSIDE,this.bv;if(this.bvStart===void 0\u0026\u0026(this.bvStart=rJ(t,this.start)),this.bvEnd===void 0\u0026\u0026(this.bvEnd=rJ(t,this.end)),this.bvStart===Ve.OUTSIDE||this.bvEnd==Ve.OUTSIDE)this.bv=Ve.OUTSIDE;else if(this.bvStart===Ve.INSIDE||this.bvEnd==Ve.INSIDE)this.bv=Ve.INSIDE;else{let e=rJ(t,this.middle());this.bv=e}return this.bv}setOverlap(t){let e,n=this.shape,o=t.shape;n instanceof Ve.Segment\u0026\u0026o instanceof Ve.Segment?n.start.equalTo(o.start)\u0026\u0026n.end.equalTo(o.end)?e=Ve.OVERLAP_SAME:n.start.equalTo(o.end)\u0026\u0026n.end.equalTo(o.start)\u0026\u0026(e=Ve.OVERLAP_OPPOSITE):(n instanceof Ve.Arc\u0026\u0026o instanceof Ve.Arc||n instanceof Ve.Segment\u0026\u0026o instanceof Ve.Arc||n instanceof Ve.Arc\u0026\u0026o instanceof Ve.Segment)\u0026\u0026(n.start.equalTo(o.start)\u0026\u0026n.end.equalTo(o.end)\u0026\u0026n.middle().equalTo(o.middle())?e=Ve.OVERLAP_SAME:n.start.equalTo(o.end)\u0026\u0026n.end.equalTo(o.start)\u0026\u0026n.middle().equalTo(o.middle())\u0026\u0026(e=Ve.OVERLAP_OPPOSITE)),this.overlap===void 0\u0026\u0026(this.overlap=e),t.overlap===void 0\u0026\u0026(t.overlap=e)}svg(){if(this.shape instanceof Ve.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ve.Arc){let t,e=this.shape,n=e.counterClockwise?\"1\":\"0\";if(Ve.Utils.EQ(e.sweep,2*Math.PI)){let o=e.counterClockwise?1:-1,i=new Ve.Arc(e.pc,e.r,e.startAngle,e.startAngle+o*Math.PI,e.counterClockwise),r=new Ve.Arc(e.pc,e.r,e.startAngle+o*Math.PI,e.endAngle,e.counterClockwise);return t=\"0\",` A${i.r},${i.r} 0 ${t},${n} ${i.end.x},${i.end.y}\n A${r.r},${r.r} 0 ${t},${n} ${r.end.x},${r.end.y}`}return t=e.sweep\u003c=Math.PI?\"0\":\"1\",` A${e.r},${e.r} 0 ${t},${n} ${e.end.x},${e.end.y}`}}toJSON(){return this.shape.toJSON()}};var _to=class extends y6e{constructor(e,n){super(e,n),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let e;return{next:()=\u003e{let n=e||this.first,o=!this.first||!!e\u0026\u0026e===this.first;return e=n?n.next:void 0,{value:n,done:o}}}}append(e){return super.append(e),this.setCircularLinks(),this}insert(e,n){return super.insert(e,n),this.setCircularLinks(),this}remove(e){return super.remove(e),this}};Ve.Face=class Wte extends _to{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=\u003ei instanceof Ve.Point)){let i=Wte.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=\u003ei instanceof Array\u0026\u0026i.length===2)){let i=o.map(s=\u003enew Ve.Point(s[0],s[1])),r=Wte.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=\u003ei instanceof Ve.Segment||i instanceof Ve.Arc))this.shapes2face(e.edges,o);else if(o.every(i=\u003ei.name===\"segment\"||i.name===\"arc\")){let i=[];for(let r of o){let s;s=r.name===\"segment\"?new Ve.Segment(r):new Ve.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof Wte){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ve.Circle)this.shapes2face(e.edges,[n[0].toArc(U1t)]);else if(n[0]instanceof Ve.Box){let o=n[0];this.shapes2face(e.edges,[new Ve.Segment(new Ve.Point(o.xmin,o.ymin),new Ve.Point(o.xmax,o.ymin)),new Ve.Segment(new Ve.Point(o.xmax,o.ymin),new Ve.Point(o.xmax,o.ymax)),new Ve.Segment(new Ve.Point(o.xmax,o.ymax),new Ve.Point(o.xmin,o.ymax)),new Ve.Segment(new Ve.Point(o.xmin,o.ymax),new Ve.Point(o.xmin,o.ymin))])}}n.length===2\u0026\u0026n[0]instanceof Ve.Edge\u0026\u0026n[1]instanceof Ve.Edge\u0026\u0026(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=\u003ee.shape.start.clone())}get shapes(){return this.edges.map(e=\u003ee.shape.clone())}get box(){if(this._box===void 0){let e=new Ve.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e\u003ethis.perimeter||e\u003c0)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o\u003ce.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ve.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ve.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0\u0026\u0026(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ve.Utils.EQ_0(e)?this._orientation=eJ.NOT_ORIENTABLE:Ve.Utils.LT(e,0)?this._orientation=eJ.CCW:this._orientation=eJ.CW}return this._orientation}isSimple(e){return Wte.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ve.Segment\u0026\u0026a.shape instanceof Ve.Segment\u0026\u0026(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if((!c.equalTo(r.start)||!c.equalTo(a.end)||a!==r.prev)\u0026\u0026(!c.equalTo(r.end)||!c.equalTo(a.start)||a!==r.next)\u0026\u0026(i.push(c),o))break;if(i.length\u003e0\u0026\u0026o)break}if(i.length\u003e0\u0026\u0026o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)\u0026\u0026(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ve.Polygon(this.shapes)}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=\" z\",e}},Ve.Ray=class r5n extends rv{constructor(...e){if(super(),this.pt=new Ve.Point,this.norm=new Ve.Vector(0,1),e.length!==0\u0026\u0026(e.length\u003e=1\u0026\u0026e[0]instanceof Ve.Point\u0026\u0026(this.pt=e[0].clone()),e.length!==1)){if(!(e.length===2\u0026\u0026e[1]instanceof Ve.Vector))throw ld.ILLEGAL_PARAMETERS;this.norm=e[1].clone()}}clone(){return new r5n(this.pt,this.norm)}get slope(){return new Ve.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ve.Box(e\u003eMath.PI/2\u0026\u0026e\u003c3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e\u003e=0\u0026\u0026e\u003c=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e\u003e=Math.PI/2\u0026\u0026e\u003c=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e\u003e=Math.PI\u0026\u0026e\u003c=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ve.Vector(this.pt,e);return Ve.Utils.EQ_0(this.norm.dot(n))\u0026\u0026Ve.Utils.GE(n.cross(this.norm),0)}coord(e){return BIt(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ve.Segment(this.pt,e),new Ve.Ray(e,this.norm)]:[]}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Segment?b6e(this,e):e instanceof Ve.Arc?S6e(this,e):e instanceof Ve.Line?sIt(this,e):e instanceof Ve.Ray?(o=e,cL(nv(n=this),nv(o)).filter(i=\u003en.contains(i)).filter(i=\u003eo.contains(i))):e instanceof Ve.Circle?rIt(this,e):e instanceof Ve.Box?(function(i,r){return lL(nv(i),r).filter(s=\u003ei.contains(s))})(this,e):e instanceof Ve.Polygon?aIt(this,e):e instanceof Ve.Multiline?gL(this,e):void 0;var n,o}rotate(e,n=new Ve.Point){return new Ve.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ve.Ray(this.pt.transform(e),this.norm.clone())}get name(){return\"ray\"}svg(e,n={}){let o=lL(new Ve.Line(this.pt,this.norm),e);return o=o.filter(i=\u003ethis.contains(i)),o.length===0||o.length===2?\"\":new Ve.Segment(this.pt,o[0]).svg(n)}},Ve.ray=(...t)=\u003enew Ve.Ray(...t),Ve.Polygon=class YM{constructor(){this.faces=new Ve.PlanarSet,this.edges=new Ve.PlanarSet;let e=[...arguments];if(e.length===1\u0026\u0026(e[0]instanceof Array\u0026\u0026e[0].length\u003e0||e[0]instanceof Ve.Circle||e[0]instanceof Ve.Box)){let n=e[0];if(e[0]instanceof Array\u0026\u0026e[0].every(o=\u003eo instanceof Array))if(n.every(o=\u003eo instanceof Array\u0026\u0026o.length===2\u0026\u0026typeof o[0]==\"number\"\u0026\u0026typeof o[1]==\"number\"))this.faces.add(new Ve.Face(this,n));else for(let o of n)if(o instanceof Array\u0026\u0026o[0]instanceof Array\u0026\u0026o[0].every(i=\u003ei instanceof Array\u0026\u0026i.length===2\u0026\u0026typeof i[0]==\"number\"\u0026\u0026typeof i[1]==\"number\"))for(let i of o)this.faces.add(new Ve.Face(this,i));else this.faces.add(new Ve.Face(this,o));else this.faces.add(new Ve.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=\u003ee.merge(n.box),new Ve.Box)}get vertices(){return[...this.faces].flatMap(e=\u003ee.vertices)}clone(){let e=new YM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new YM;return e.forEach(o=\u003e[...o.faces].forEach(i=\u003en.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=\u003en+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ve.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next!==n){for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}else this.deleteFace(e)}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ve.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e\u0026\u0026(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const n=this.splitToIslands().flatMap(o=\u003eo._cutSingleIsland(e)).filter(o=\u003eo.isValid()\u0026\u0026o.isEmpty()===!1);return this.createFromArray(n)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i,r,s={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=nIt(a,A);for(let l of c)dL(a,l,s.int_points1),dL(A,l,s.int_points2)}if(s.int_points1.length===0)return n;s.int_points1_sorted=ov(s.int_points1),s.int_points2_sorted=ov(s.int_points2),pL(o,s.int_points1_sorted),pL(n,s.int_points2_sorted),Q6e(s),s.int_points1_sorted=ov(s.int_points1),s.int_points2_sorted=ov(s.int_points2),v6e(s.int_points1),w6e(s.int_points1,n);for(let a of s.int_points1_sorted)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.bv===a.edge_after.bv\u0026\u0026(s.int_points2[a.id]=-1,a.id=-1);if(s.int_points1=s.int_points1.filter(a=\u003ea.id\u003e=0),s.int_points2=s.int_points2.filter(a=\u003ea.id\u003e=0),s.int_points1.forEach((a,A)=\u003e{a.id=A}),s.int_points2.forEach((a,A)=\u003e{a.id=A}),s.int_points1.length===0)return n;s.int_points1_sorted=ov(s.int_points1),s.int_points2_sorted=ov(s.int_points2);for(let a=1;a\u003cs.int_points1_sorted.length;a++)if(r=s.int_points1_sorted[a],i=s.int_points1_sorted[a-1],r.edge_before\u0026\u0026r.edge_before.bv===1){let A=i.edge_after,c=r.edge_before,l=o.getChain(A,c);cIt(s.int_points2[i.id],s.int_points2[r.id],l),l.forEach(u=\u003en.edges.add(u)),l=l.reverse().map(u=\u003enew Ve.Edge(u.shape.reverse()));for(let u=0;u\u003cl.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];cIt(s.int_points2[r.id],s.int_points2[i.id],l),l.forEach(u=\u003en.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new zD([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=\u003er.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=\u003e[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=\u003es.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size\u003c=1)return this.clone();const e=this.splitToIslands(),n=new YM;return e.forEach(o=\u003e{o.faces.forEach(i=\u003en.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?eJ.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=\u003e{this.isOuter(n)\u0026\u0026e++}),e\u003e1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ve.Point){let n=rJ(this,e);return n===1||n===2}return xIt(this,e)}distanceTo(e){if(e instanceof Ve.Point){let[n,o]=Ve.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Circle||e instanceof Ve.Line||e instanceof Ve.Segment||e instanceof Ve.Arc){let[n,o]=Ve.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Polygon){let n,o,i=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let r of this.edges){let s=i[0];[n,o]=Ve.Distance.shape2planarSet(r.shape,e.edges,s),Ve.Utils.LT(n,s)\u0026\u0026(i=[n,o])}return i}}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Line?nJ(e,this):e instanceof Ve.Ray?aIt(e,this):e instanceof Ve.Circle?tIt(e,this):e instanceof Ve.Segment?E6e(e,this):e instanceof Ve.Arc?B6e(e,this):e instanceof Ve.Polygon?(function(n,o){let i=[];if(n.isEmpty()||o.isEmpty()||n.box.not_intersect(o.box))return i;for(let r of n.edges)i=[...i,...oIt(r,o)];return i})(e,this):e instanceof Ve.Multiline?(function(n,o){let i=[];if(o.isEmpty()||n.size===0)return i;for(let r of n)i=[...i,...oIt(r,o)];return i})(e,this):void 0}translate(e){let n=new YM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.translate(e)));return n}rotate(e=0,n=new Ve.Point){let o=new YM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.rotate(e,n)));return o}scale(e,n){let o=new YM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.scale(e,n)));return o}transform(e=new Ve.Matrix){let n=new YM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.transform(e)));return n}toJSON(){return[...this.faces].map(e=\u003ee.toJSON())}toArray(){return[...this.faces].map(e=\u003ee.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=\u003ee+n.svg(),\"\")}svg(e={}){let n=`\n\u003cpath ${KD({fillRule:\"evenodd\",fill:\"lightcyan\",...e})} d=\"`;for(let o of this.faces)n+=`\n${o.svg()}`;return n+=`\" \u003e\n\u003c/path\u003e`,n}},Ve.polygon=(...t)=\u003enew Ve.Polygon(...t);var{Circle:k6e,Line:bIt,Point:SIt,Vector:kae,Utils:F6e}=Ve;Ve.Inversion=class Kye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new kae(e.pc,n),i=e.r*e.r,r=o.dot(o);return F6e.EQ_0(r)?new SIt(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(F6e.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new kae(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new bIt(s,r)}{let i=new kae(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new k6e(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(F6e.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new kae(e.pc,i.end);return s=s.multiply(r/o),new k6e(e.pc.translate(s),r)}}inverse(e){return e instanceof SIt?Kye.inversePoint(this.circle,e):e instanceof k6e?Kye.inverseCircle(this.circle,e):e instanceof bIt?Kye.inverseLine(this.circle,e):void 0}},Ve.inversion=t=\u003enew Ve.Inversion(t),Ve.Distance=class Tr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ve.Vector(e,o).length,new Ve.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ve.Utils.EQ_0(o))return[n.r,new Ve.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ve.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ve.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return Tr.point2point(e,n.start);let o,i,r=new Ve.Vector(n.start,n.end),s=new Ve.Vector(n.start,e),a=new Ve.Vector(n.end,e),A=r.dot(s),c=-r.dot(a);if(Ve.Utils.GE(A,0)\u0026\u0026Ve.Utils.GE(c,0)){let l=n.tangentInStart();return o=Math.abs(l.cross(s)),i=n.start.translate(l.multiply(l.dot(s))),[o,new Ve.Segment(e,i)]}return A\u003c0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o,i,r=new Ve.Circle(n.pc,n.r),s=[];return[o,i]=Tr.point2circle(e,r),i.end.on(n)\u0026\u0026s.push(Tr.point2circle(e,r)),s.push(Tr.point2point(e,n.start)),s.push(Tr.point2point(e,n.end)),Tr.sort(s),s[0]}static point2edge(e,n){return n.shape instanceof Ve.Segment?Tr.point2segment(e,n.shape):Tr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let i=[];return i.push(Tr.point2line(e.start,n)),i.push(Tr.point2line(e.end,n)),Tr.sort(i),i[0]}static segment2segment(e,n){let o=Nae(e,n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let i,r,s=[];return[i,r]=Tr.point2segment(n.start,e),s.push([i,r.reverse()]),[i,r]=Tr.point2segment(n.end,e),s.push([i,r.reverse()]),s.push(Tr.point2segment(e.start,n)),s.push(Tr.point2segment(e.end,n)),Tr.sort(s),s[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Line(e.ps,e.pe),[r,s]=Tr.point2line(n.center,i);if(Ve.Utils.GE(r,n.r)\u0026\u0026s.end.on(e))return Tr.point2circle(s.end,n);{let[a,A]=Tr.point2circle(e.start,n),[c,l]=Tr.point2circle(e.end,n);return Ve.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Line(e.ps,e.pe),r=new Ve.Circle(n.pc,n.r),[s,a]=Tr.point2line(r.center,i);if(Ve.Utils.GE(s,r.r)\u0026\u0026a.end.on(e)){let[u,g]=Tr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A,c,l=[];return l.push(Tr.point2arc(e.start,n)),l.push(Tr.point2arc(e.end,n)),[A,c]=Tr.point2segment(n.start,e),l.push([A,c.reverse()]),[A,c]=Tr.point2segment(n.end,e),l.push([A,c.reverse()]),Tr.sort(l),l[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return Tr.point2point(i.start,r.start)}{let i=new Ve.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(Tr.point2point(r[0],s[0])),a.push(Tr.point2point(r[0],s[1])),a.push(Tr.point2point(r[1],s[0])),a.push(Tr.point2point(r[1],s[1])),Tr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let[i,r]=Tr.point2line(e.center,n),[s,a]=Tr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Circle(e.center,e.r),[r,s]=Tr.point2line(i.center,n);if(!Ve.Utils.GE(r,i.r)){let a=[];return a.push(Tr.point2line(e.start,n)),a.push(Tr.point2line(e.end,n)),Tr.sort(a),a[0]}{let[a,A]=Tr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Circle(e.center,e.r),[r,s]=Tr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(Tr.point2circle(e.start,n)),a.push(Tr.point2circle(e.end,n)),Tr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Circle(e.center,e.r),r=new Ve.Circle(n.center,n.r),[s,a]=Tr.circle2circle(i,r);if(a.start.on(e)\u0026\u0026a.end.on(n))return[s,a];{let A,c,l=[];return[A,c]=Tr.point2arc(e.start,n),c.end.on(n)\u0026\u0026l.push([A,c]),[A,c]=Tr.point2arc(e.end,n),c.end.on(n)\u0026\u0026l.push([A,c]),[A,c]=Tr.point2arc(n.start,e),c.end.on(e)\u0026\u0026l.push([A,c.reverse()]),[A,c]=Tr.point2arc(n.end,e),c.end.on(e)\u0026\u0026l.push([A,c.reverse()]),[A,c]=Tr.point2point(e.start,n.start),l.push([A,c]),[A,c]=Tr.point2point(e.start,n.end),l.push([A,c]),[A,c]=Tr.point2point(e.end,n.start),l.push([A,c]),[A,c]=Tr.point2point(e.end,n.end),l.push([A,c]),Tr.sort(l),l[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n.edges){let[r,s]=Tr.point2edge(e,i);Ve.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ve.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ve.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin;return[r,a*a+A*A]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let A of n){[r,s]=Tr.box2box_minmax(e.box,A.item.key);for(let c of A.item.values)c instanceof Ve.Edge?i.insert([r,s],c.shape):i.insert([r,s],c);Ve.Utils.LT(s,o)\u0026\u0026(o=s)}if(n.length===0)return o;let a=[...n.map(A=\u003eA.left.isNil()?void 0:A.left).filter(A=\u003eA!==void 0),...n.map(A=\u003eA.right.isNil()?void 0:A.right).filter(A=\u003eA!==void 0)].filter(A=\u003e{let[c,l]=Tr.box2box_minmax(e.box,A.max);return Ve.Utils.LE(c,o)});return o=Tr.minmax_tree_process_level(e,a,o,i)}static minmax_tree(e,n,o){let i=new T6e,r=[n.index.root],s=o\u003cNumber.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=Tr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null\u0026\u0026!n.isNil()){if([i,r]=Tr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ve.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=Tr.distanceToArray(e,n.item.values);return Ve.Utils.LT(s,i[0])\u0026\u0026(i=[s,a]),[i,r]=Tr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ve.Segment],r=!1;if(n instanceof Ve.PlanarSet){let s=Tr.minmax_tree(e,n,o);[i,r]=Tr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=\u003eVe.Utils.LT(n[0],o[0])?-1:Ve.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ve.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n){let[r,s]=Tr.distance(e,i.shape);Ve.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of e)for(let r of n){let[s,a]=Tr.distance(i.shape,r.shape);Ve.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}};var{Multiline:fto,Point:QIt,Segment:Ito,Polygon:vIt}=Ve;function L6e(t){return new QIt(t.split(\" \").map(Number))}function wIt(t){return t.split(\", \").map(L6e)}function H6e(t){const e=wIt(t);let n=[];for(let o=0;o\u003ce.length-1;o++)n.push(new Ito(e[o],e[o+1]));return new fto(n)}function PIt(t){const e=t.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\"),n=new vIt;let o;return e.forEach((i,r)=\u003e{let s=i.split(\", \").map(A=\u003enew QIt(A.split(\" \").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o\u0026\u0026a.reverse()}),n}function Cto(t){return t.startsWith(\"POLYGON\")?PIt(t.replace(/^POLYGON /,\"\")):(function(e){const n=e.split(/\\)\\), \\(\\(/).map(i=\u003e\"((\"+i+\"))\").map(PIt),o=new vIt;return n.reduce((i,r)=\u003e[...i,...r?.faces],[]).forEach(i=\u003eo.addFace([...i?.shapes])),o})(t.replace(/^MULTIPOLYGON \\(\\(\\((.*)\\)\\)\\)$/,\"$1\"))}function MIt(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"POINT\"))}function DIt(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"LINESTRING\"))}Ve.isWktString=function(t){return t.startsWith(\"POINT\")||MIt(t)||t.startsWith(\"LINESTRING\")||DIt(t)||t.startsWith(\"MULTILINESTRING\")||t.startsWith(\"POLYGON\")||t.startsWith(\"MULTIPOINT\")||t.startsWith(\"MULTIPOLYGON\")||t.startsWith(\"GEOMETRYCOLLECTION\")},Ve.parseWKT=function t(e){if(e.startsWith(\"POINT\"))return L6e(e.replace(/^POINT \\(/,\"\").replace(/\\)$/,\"\"));if(e.startsWith(\"MULTIPOINT\"))return wIt(e.replace(/^MULTIPOINT \\(/,\"\").replace(/\\)$/,\"\"));if(e.startsWith(\"LINESTRING\"))return H6e(e.replace(/^LINESTRING \\(/,\"\").replace(/\\)$/,\"\"));if(e.startsWith(\"MULTILINESTRING\"))return(function(n){return n.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\").map(H6e)})(e.replace(/^MULTILINESTRING /,\"\"));if(e.startsWith(\"POLYGON\")||e.startsWith(\"MULTIPOLYGON\"))return Cto(e);if(e.startsWith(\"GEOMETRYCOLLECTION\")){const n=/(?\u003ctype\u003ePOINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \\((?:[^\\(\\)]|\\([^\\)]*\\))*\\)/g,o=e.match(n);return o[0].startsWith(\"GEOMETRYCOLLECTION\")\u0026\u0026(o[0]=o[0].replace(\"GEOMETRYCOLLECTION (\",\"\")),o.map(t).map(i=\u003ei instanceof Array?i:[i]).reduce((i,r)=\u003e[...i,...r],[])}return MIt(e)?(function(n){return n.split(`\n`).map(o=\u003eo.match(/\\(([^)]+)\\)/)[1]).map(L6e)})(e):DIt(e)?(function(n){return n.split(`\n`).map(o=\u003eo.match(/\\(([^)]+)\\)/)[1]).map(H6e).reduce((o,i)=\u003e[...o,...i],[])})(e):[]},Ve.BooleanOperations=ato,Ve.Relations=dto,JD=Deo(),NIt=1,O6e=JD!=null?yeo(Eeo(JD)):{},((t,e,n,o)=\u003e{if(e\u0026\u0026typeof e==\"object\"||typeof e==\"function\")for(let i of B1t(e))Beo.call(t,i)||i===n||E1t(t,i,{get:()=\u003ee[i],enumerable:!(o=xeo(e,i))||o.enumerable})})(!NIt\u0026\u0026JD\u0026\u0026JD.__esModule?O6e:E1t(O6e,\"default\",{value:JD,enumerable:!0}),JD);var JD,NIt,O6e,yto=Object.create,RIt=Object.defineProperty,xto=Object.getOwnPropertyDescriptor,TIt=Object.getOwnPropertyNames,Eto=Object.getPrototypeOf,Bto=Object.prototype.hasOwnProperty,WD=(t,e)=\u003efunction(){return e||(0,t[TIt(t)[0]])((e={exports:{}}).exports,e),e.exports},kIt=(t,e,n)=\u003e(n=t!=null?yto(Eto(t)):{},((o,i,r,s)=\u003e{if(i\u0026\u0026typeof i==\"object\"||typeof i==\"function\")for(let a of TIt(i))Bto.call(o,a)||a===r||RIt(o,a,{get:()=\u003ei[a],enumerable:!(s=xto(i,a))||s.enumerable});return o})(t\u0026\u0026t.__esModule?n:RIt(n,\"default\",{value:t,enumerable:!0}),t)),bto=WD({\"node_modules/is-buffer/index.js\"(t,e){function n(o){return!!o.constructor\u0026\u0026typeof o.constructor.isBuffer==\"function\"\u0026\u0026o.constructor.isBuffer(o)}e.exports=function(o){return o!=null\u0026\u0026(n(o)||(function(i){return typeof i.readFloatLE==\"function\"\u0026\u0026typeof i.slice==\"function\"\u0026\u0026n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),Sto=WD({\"node_modules/kind-of/index.js\"(t,e){var n=bto(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return\"undefined\";if(i===null)return\"null\";if(i===!0||i===!1||i instanceof Boolean)return\"boolean\";if(typeof i==\"string\"||i instanceof String)return\"string\";if(typeof i==\"number\"||i instanceof Number)return\"number\";if(typeof i==\"function\"||i instanceof Function)return\"function\";if(Array.isArray!==void 0\u0026\u0026Array.isArray(i))return\"array\";if(i instanceof RegExp)return\"regexp\";if(i instanceof Date)return\"date\";var r=o.call(i);return r===\"[object RegExp]\"?\"regexp\":r===\"[object Date]\"?\"date\":r===\"[object Arguments]\"?\"arguments\":r===\"[object Error]\"?\"error\":n(i)?\"buffer\":r===\"[object Set]\"?\"set\":r===\"[object WeakSet]\"?\"weakset\":r===\"[object Map]\"?\"map\":r===\"[object WeakMap]\"?\"weakmap\":r===\"[object Symbol]\"?\"symbol\":r===\"[object Int8Array]\"?\"int8array\":r===\"[object Uint8Array]\"?\"uint8array\":r===\"[object Uint8ClampedArray]\"?\"uint8clampedarray\":r===\"[object Int16Array]\"?\"int16array\":r===\"[object Uint16Array]\"?\"uint16array\":r===\"[object Int32Array]\"?\"int32array\":r===\"[object Uint32Array]\"?\"uint32array\":r===\"[object Float32Array]\"?\"float32array\":r===\"[object Float64Array]\"?\"float64array\":\"object\"}}}),Qto=WD({\"node_modules/rename-keys/index.js\"(t,e){(function(){function n(o,i){if(typeof i!=\"function\")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)\u0026\u0026(r[i(s,o[s])||s]=o[s]);return r}e!==void 0\u0026\u0026e.exports?e.exports=n:typeof define==\"function\"\u0026\u0026define.amd?define([],function(){return n}):window.rename=n})()}}),vto=WD({\"node_modules/deep-rename-keys/index.js\"(t,e){var n=Sto(),o=Qto();e.exports=function i(r,s){var a=n(r);if(a!==\"object\"\u0026\u0026a!==\"array\")throw new Error(\"expected an object\");var A=[];for(var c in a===\"object\"\u0026\u0026(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)===\"object\"||n(l)===\"array\"?A[c]=i(l,s):A[c]=l}return A}}}),FIt=WD({\"node_modules/eventemitter3/index.js\"(t,e){var n=Object.prototype.hasOwnProperty,o=\"~\";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create\u0026\u0026(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)\u0026\u0026c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u\u003cg;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once\u0026\u0026this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p\u003c_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p\u003cI;p++)switch(m[p].once\u0026\u0026this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f\u003c_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l\u0026\u0026!g.once||c\u0026\u0026g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h\u003cp;h++)(g[h].fn!==A||l\u0026\u0026!g[h].once||c\u0026\u0026g[h].context!==c)\u0026\u0026d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]\u0026\u0026(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0\u0026\u0026(e.exports=s)}}),wto=WD({\"node_modules/xml-lexer/dist/lexer.js\"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=FIt(),i=function(){},r={data:\"state-data\",cdata:\"state-cdata\",tagBegin:\"state-tag-begin\",tagName:\"state-tag-name\",tagEnd:\"state-tag-end\",attributeNameStart:\"state-attribute-name-start\",attributeName:\"state-attribute-name\",attributeNameEnd:\"state-attribute-name-end\",attributeValueBegin:\"state-attribute-value-begin\",attributeValue:\"state-attribute-value\"},s={lt:\"action-lt\",gt:\"action-gt\",space:\"action-space\",equal:\"action-equal\",quote:\"action-quote\",slash:\"action-slash\",char:\"action-char\",error:\"action-error\"},a={text:\"text\",openTag:\"open-tag\",closeTag:\"close-tag\",attributeName:\"attribute-name\",attributeValue:\"attribute-value\"},A={\" \":s.space,\"\t\":s.space,\"\\n\":s.space,\"\\r\":s.space,\"\u003c\":s.lt,\"\u003e\":s.gt,'\"':s.quote,\"'\":s.quote,\"=\":s.equal,\"/\":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x=\"\",E=\"\",B=\"\",S=\"\",Q=\"\",w=\"\",M=function(R,F){if(E[0]!==\"?\"\u0026\u0026E[0]!==\"!\"){var O={type:R,value:F};c.debug\u0026\u0026console.log(\"emit:\",O),C.emit(\"data\",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()\u0026\u0026M(a.text,x),E=\"\",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)===\"]]\u003e\"\u0026\u0026(M(a.text,x.slice(0,-3)),x=\"\",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E=\"\",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x=\"\",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)===\"![CDATA[\"\u0026\u0026(y=r.cdata,x=\"\",E=\"\")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x=\"\",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x=\"\",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(p,s.slash,function(){Q=!0,S=\"\",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(m,s.char,function(R){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S=\"\",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=\"\"),x=\"\",y=r.data}),n(_,s.char,function(R){w=\"\",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x=\"\",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug\u0026\u0026console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O\u003cF;O++)k(R[O])},C}}}}),Pto=WD({\"node_modules/xml-reader/dist/reader.js\"(t,e){var n=FIt(),o=wto(),i=o.Type,r={element:\"element\",text:\"text\"},s=function(A){return Object.assign({name:\"\",type:r.element,value:\"\",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:\"done\",tagPrefix:\"tag:\",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream\u0026\u0026_===l\u0026\u0026(l.children=[],u.parent=null),A.emitTopLevelOnly\u0026\u0026_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit(\"tag\",u.name,u)),u===l\u0026\u0026(c.removeAllListeners(\"data\"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u\u0026\u0026u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]=\"\";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on(\"data\",d),l=s(),u=null,g=\"\",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:\":\"});var l=a(c),u=void 0;return l.on(\"done\",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}}),Mto=(kIt(vto()),kIt(Pto()),Object.create),LIt=Object.defineProperty,Dto=Object.getOwnPropertyDescriptor,HIt=Object.getOwnPropertyNames,Nto=Object.getPrototypeOf,Rto=Object.prototype.hasOwnProperty,jD=(t,e)=\u003efunction(){return e||(0,t[HIt(t)[0]])((e={exports:{}}).exports,e),e.exports},OIt=(t,e,n)=\u003e(n=t!=null?Mto(Nto(t)):{},((o,i,r,s)=\u003e{if(i\u0026\u0026typeof i==\"object\"||typeof i==\"function\")for(let a of HIt(i))Rto.call(o,a)||a===r||LIt(o,a,{get:()=\u003ei[a],enumerable:!(s=Dto(i,a))||s.enumerable});return o})(t\u0026\u0026t.__esModule?n:LIt(n,\"default\",{value:t,enumerable:!0}),t)),Tto=jD({\"node_modules/is-buffer/index.js\"(t,e){function n(o){return!!o.constructor\u0026\u0026typeof o.constructor.isBuffer==\"function\"\u0026\u0026o.constructor.isBuffer(o)}e.exports=function(o){return o!=null\u0026\u0026(n(o)||(function(i){return typeof i.readFloatLE==\"function\"\u0026\u0026typeof i.slice==\"function\"\u0026\u0026n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),kto=jD({\"node_modules/kind-of/index.js\"(t,e){var n=Tto(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return\"undefined\";if(i===null)return\"null\";if(i===!0||i===!1||i instanceof Boolean)return\"boolean\";if(typeof i==\"string\"||i instanceof String)return\"string\";if(typeof i==\"number\"||i instanceof Number)return\"number\";if(typeof i==\"function\"||i instanceof Function)return\"function\";if(Array.isArray!==void 0\u0026\u0026Array.isArray(i))return\"array\";if(i instanceof RegExp)return\"regexp\";if(i instanceof Date)return\"date\";var r=o.call(i);return r===\"[object RegExp]\"?\"regexp\":r===\"[object Date]\"?\"date\":r===\"[object Arguments]\"?\"arguments\":r===\"[object Error]\"?\"error\":n(i)?\"buffer\":r===\"[object Set]\"?\"set\":r===\"[object WeakSet]\"?\"weakset\":r===\"[object Map]\"?\"map\":r===\"[object WeakMap]\"?\"weakmap\":r===\"[object Symbol]\"?\"symbol\":r===\"[object Int8Array]\"?\"int8array\":r===\"[object Uint8Array]\"?\"uint8array\":r===\"[object Uint8ClampedArray]\"?\"uint8clampedarray\":r===\"[object Int16Array]\"?\"int16array\":r===\"[object Uint16Array]\"?\"uint16array\":r===\"[object Int32Array]\"?\"int32array\":r===\"[object Uint32Array]\"?\"uint32array\":r===\"[object Float32Array]\"?\"float32array\":r===\"[object Float64Array]\"?\"float64array\":\"object\"}}}),Fto=jD({\"node_modules/rename-keys/index.js\"(t,e){(function(){function n(o,i){if(typeof i!=\"function\")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)\u0026\u0026(r[i(s,o[s])||s]=o[s]);return r}e!==void 0\u0026\u0026e.exports?e.exports=n:typeof define==\"function\"\u0026\u0026define.amd?define([],function(){return n}):window.rename=n})()}}),Lto=jD({\"node_modules/deep-rename-keys/index.js\"(t,e){var n=kto(),o=Fto();e.exports=function i(r,s){var a=n(r);if(a!==\"object\"\u0026\u0026a!==\"array\")throw new Error(\"expected an object\");var A=[];for(var c in a===\"object\"\u0026\u0026(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)===\"object\"||n(l)===\"array\"?A[c]=i(l,s):A[c]=l}return A}}}),GIt=jD({\"node_modules/eventemitter3/index.js\"(t,e){var n=Object.prototype.hasOwnProperty,o=\"~\";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create\u0026\u0026(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)\u0026\u0026c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u\u003cg;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once\u0026\u0026this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p\u003c_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p\u003cI;p++)switch(m[p].once\u0026\u0026this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f\u003c_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l\u0026\u0026!g.once||c\u0026\u0026g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h\u003cp;h++)(g[h].fn!==A||l\u0026\u0026!g[h].once||c\u0026\u0026g[h].context!==c)\u0026\u0026d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]\u0026\u0026(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0\u0026\u0026(e.exports=s)}}),Hto=jD({\"node_modules/xml-lexer/dist/lexer.js\"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=GIt(),i=function(){},r={data:\"state-data\",cdata:\"state-cdata\",tagBegin:\"state-tag-begin\",tagName:\"state-tag-name\",tagEnd:\"state-tag-end\",attributeNameStart:\"state-attribute-name-start\",attributeName:\"state-attribute-name\",attributeNameEnd:\"state-attribute-name-end\",attributeValueBegin:\"state-attribute-value-begin\",attributeValue:\"state-attribute-value\"},s={lt:\"action-lt\",gt:\"action-gt\",space:\"action-space\",equal:\"action-equal\",quote:\"action-quote\",slash:\"action-slash\",char:\"action-char\",error:\"action-error\"},a={text:\"text\",openTag:\"open-tag\",closeTag:\"close-tag\",attributeName:\"attribute-name\",attributeValue:\"attribute-value\"},A={\" \":s.space,\"\t\":s.space,\"\\n\":s.space,\"\\r\":s.space,\"\u003c\":s.lt,\"\u003e\":s.gt,'\"':s.quote,\"'\":s.quote,\"=\":s.equal,\"/\":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x=\"\",E=\"\",B=\"\",S=\"\",Q=\"\",w=\"\",M=function(R,F){if(E[0]!==\"?\"\u0026\u0026E[0]!==\"!\"){var O={type:R,value:F};c.debug\u0026\u0026console.log(\"emit:\",O),C.emit(\"data\",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()\u0026\u0026M(a.text,x),E=\"\",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)===\"]]\u003e\"\u0026\u0026(M(a.text,x.slice(0,-3)),x=\"\",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E=\"\",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x=\"\",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)===\"![CDATA[\"\u0026\u0026(y=r.cdata,x=\"\",E=\"\")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x=\"\",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x=\"\",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(p,s.slash,function(){Q=!0,S=\"\",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),x=\"\",y=r.data}),n(m,s.char,function(R){S=\"\",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S=\"\",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=\"\"),x=\"\",y=r.data}),n(_,s.char,function(R){w=\"\",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x=\"\",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug\u0026\u0026console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O\u003cF;O++)k(R[O])},C}}}}),Oto=jD({\"node_modules/xml-reader/dist/reader.js\"(t,e){var n=GIt(),o=Hto(),i=o.Type,r={element:\"element\",text:\"text\"},s=function(A){return Object.assign({name:\"\",type:r.element,value:\"\",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:\"done\",tagPrefix:\"tag:\",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream\u0026\u0026_===l\u0026\u0026(l.children=[],u.parent=null),A.emitTopLevelOnly\u0026\u0026_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit(\"tag\",u.name,u)),u===l\u0026\u0026(c.removeAllListeners(\"data\"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u\u0026\u0026u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]=\"\";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on(\"data\",d),l=s(),u=null,g=\"\",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:\":\"});var l=a(c),u=void 0;return l.on(\"done\",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}});OIt(Lto()),OIt(Oto());function G6e(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;return t}var AJ=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function Fae(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var Gto=class extends AJ{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null\u0026\u0026(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()\u0026\u0026(this.step(),!this.failed\u0026\u0026!this.solved););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??\"none\"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex\u003ethis.pipelineDef.findIndex(A=\u003eA.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n\u0026\u0026(G6e(n,0),e=1);let o=null;this.solved\u0026\u0026(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=\u003e{const a=this[r.solverName],A=a?.visualize();return A?(G6e(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved\u0026\u0026o\u0026\u0026(G6e(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=\u003er.points||[]),rects:i.flatMap(r=\u003er.rects||[]),lines:i.flatMap(r=\u003er.lines||[]),circles:i.flatMap(r=\u003er.circles||[]),texts:i.flatMap(r=\u003er.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},Y6e=(t,e,n)=\u003e(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),YIt=(t,e)=\u003e{const n=[...new Set(t)].map(r=\u003e{const s=e[r];return s?{i:r,x:s.x,y:s.y}:null}).filter(r=\u003er!==null);if(n.sort((r,s)=\u003er.x-s.x||r.y-s.y),n.length\u003c=2)return n.map(r=\u003er.i);const o=[],i=[];for(const r of n){for(;o.length\u003e=2;){const s=o[o.length-2],a=o[o.length-1];if(!s||!a||Y6e(s,a,r)\u003e1e-10)break;o.pop()}o.push(r)}for(let r=n.length-1;r\u003e=0;r--){const s=n[r];if(s){for(;i.length\u003e=2;){const a=i[i.length-2],A=i[i.length-1];if(!a||!A||Y6e(a,A,s)\u003e1e-10)break;i.pop()}i.push(s)}}return o.pop(),i.pop(),o.concat(i).map(r=\u003er.i)},UIt=t=\u003et!==void 0,Yto=class extends AJ{input;output=null;constructor(e){super(),this.input=e}_step(){const{regions:e,hulls:n}={regions:(o=this.input).cells.map(i=\u003ei.map(r=\u003eo.pts[r]).filter(UIt)),hulls:o.cells.map(i=\u003eYIt(i,o.pts).map(r=\u003eo.pts[r]).filter(UIt))};var o;this.output={pts:this.input.pts,validTris:this.input.validTris,regions:e,hulls:n,depths:this.input.depths},this.stats={regions:e.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const e=this.output;return e?{points:e.pts.map(n=\u003e({x:n.x,y:n.y,color:\"#3b82f6\"})),lines:e.regions.flatMap(n=\u003en.flatMap((o,i)=\u003e{const r=n[(i+1)%n.length];return r?[{points:[o,r],strokeColor:\"#0f766e\"}]:[]})),rects:[],circles:[],texts:[{x:4,y:12,text:`regions: ${e.regions.length}`,color:\"#1f2937\"}]}:{points:[],lines:[],rects:[],circles:[],texts:[]}}},Lae=(t,e,n)=\u003e{const o=Math.cos(n.ccwRotation),i=Math.sin(n.ccwRotation);return{x:n.center.x+t*o-e*i,y:n.center.y+t*i+e*o}},Uto=(t,e=[],n,o=[])=\u003e{const i=[],{minX:r,maxX:s,minY:a,maxY:A}=t;i.push({x:r,y:a},{x:s,y:a},{x:s,y:A},{x:r,y:A});for(let c=1;c\u003c10;c++){const l=c/10;i.push({x:r+l*(s-r),y:a}),i.push({x:s,y:a+l*(A-a)}),i.push({x:s-l*(s-r),y:A}),i.push({x:r,y:A-l*(A-a)})}for(const c of e){const l=c.diameter/2+n;for(let u=0;u\u003c24;u++){const g=2*Math.PI*u/24;i.push({x:c.center.x+l*Math.cos(g),y:c.center.y+l*Math.sin(g)})}}for(const c of o){const l=c.width/2+n,u=c.height/2+n,g=Math.max(2,Math.ceil(Math.max(2*l,2*u)/20));for(let h=0;h\u003cg;h++){const d=h/g;i.push(Lae(2*d*l-l,-u,c)),i.push(Lae(l,2*d*u-u,c)),i.push(Lae(l-2*d*l,u,c)),i.push(Lae(-l,u-2*d*u,c))}}return i.map((c,l)=\u003e({x:c.x+1e-6*(l%7-3),y:c.y+1e-6*(l%5-2)}))},Kto=class extends AJ{input;output=null;constructor(e){super(),this.input=e}_step(){const e=this.input.vias??[],n=this.input.rects??[];this.output={pts:Uto(this.input.bounds,e,this.input.clearance,n)},this.stats={points:this.output.pts.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const e=(this.output?.pts??[]).map(n=\u003e({x:n.x,y:n.y,color:\"#2563eb\"}));return{points:e,lines:[],rects:[],circles:(this.input.vias??[]).map(n=\u003e({center:{x:n.center.x,y:n.center.y},radius:n.diameter/2+this.input.clearance,stroke:\"#ef4444\"})),texts:[{x:this.input.bounds.minX+6,y:this.input.bounds.minY+12,text:`sample points: ${e.length}`,color:\"#1f2937\"}]}}},Vto=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r\u003c1e-10)return Math.hypot(t.x-e.x,t.y-e.y);let s=((t.x-e.x)*o+(t.y-e.y)*i)/r;return s=Math.max(0,Math.min(1,s)),Math.hypot(t.x-e.x-s*o,t.y-e.y-s*i)},KIt=(t,e)=\u003e{if(t.length\u003c=3)return 0;const n=YIt(t,e),o=new Set(n),i=n.map(s=\u003ee[s]).filter(s=\u003e!!s);let r=0;for(const s of t){if(o.has(s))continue;const a=e[s];if(!a)continue;let A=Number.POSITIVE_INFINITY;for(let c=0;c\u003ci.length;c++){const l=i[c],u=i[(c+1)%i.length];l\u0026\u0026u\u0026\u0026(A=Math.min(A,Vto(a,l,u)))}r=Math.max(r,A)}return r},U6e=(t,e)=\u003et\u003ce?1e5*t+e:1e5*e+t,zto=(t,e)=\u003e{const n=t.map((u,g)=\u003e[u,t[(g+1)%t.length]]),o=e.map((u,g)=\u003e[u,e[(g+1)%e.length]]),i=new Set;for(const[u,g]of n)if(g!==void 0)for(const[h,d]of o)d!==void 0\u0026\u0026u===d\u0026\u0026g===h\u0026\u0026i.add(U6e(u,g));if(i.size===0)return null;const r=[];for(const[u,g]of n)g!==void 0\u0026\u0026(i.has(U6e(u,g))||r.push([u,g]));for(const[u,g]of o)g!==void 0\u0026\u0026(i.has(U6e(u,g))||r.push([u,g]));if(r.length===0)return null;const s=new Map;for(const[u,g]of r)s.set(u,g);const a=r[0]?.[0];if(a===void 0)return null;const A=[a];let c=s.get(a),l=0;for(;c!==void 0\u0026\u0026c!==a\u0026\u0026l++\u003cr.length+5;)A.push(c),c=s.get(c);return c!==a||A.length!==r.length?null:A},Jto=(t,e)=\u003et\u003ce?1e5*t+e:1e5*e+t,Wto=class extends AJ{input;output=null;constructor(t){super(),this.input=t}_step(){const t=((e,n,o)=\u003e{if(!e.length)return{cells:[],depths:[]};const i=e.map(([A,c,l])=\u003e{const u=n[A],g=n[c],h=n[l];return u\u0026\u0026g\u0026\u0026h\u0026\u0026Y6e(u,g,h)\u003c0?[A,l,c]:[A,c,l]});let r=!0,s=0;for(;r\u0026\u0026s++\u003c800;){r=!1;const A=new Map,c=i.map(()=\u003enew Set);for(let d=0;d\u003ci.length;d++){const p=i[d];if(p)for(let m=0;m\u003cp.length;m++){const _=p[m],f=p[(m+1)%p.length];if(_===void 0||f===void 0)continue;const I=Jto(_,f);if(A.has(I)){const C=A.get(I);C!==void 0\u0026\u0026(c[d]?.add(C),c[C]?.add(d))}else A.set(I,d)}}let l=-1,u=-1,g=null,h=Number.POSITIVE_INFINITY;for(let d=0;d\u003ci.length;d++){const p=c[d];if(p)for(const m of p){if(m\u003c=d)continue;const _=zto(i[d]??[],i[m]??[]);if(!_)continue;const f=KIt(_,n);f\u003c=o+1e-6\u0026\u0026f\u003ch\u0026\u0026(h=f,l=d,u=m,g=_)}}if(l\u003c0||u\u003c0||!g)break;i[l]=g,i.splice(u,1),r=!0}const a=i.map(A=\u003eKIt(A,n));return{cells:i,depths:a}})(this.input.validTris,this.input.pts,this.input.concavityTolerance);this.output={pts:this.input.pts,validTris:this.input.validTris,cells:t.cells,depths:t.depths},this.stats={mergedCells:t.cells.length,maxDepth:t.depths.length?Math.max(...t.depths):0},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const t=this.output?.cells??[];return{points:this.input.pts.map(e=\u003e({x:e.x,y:e.y,color:\"#3b82f6\"})),lines:t.flatMap(e=\u003ee.flatMap((n,o)=\u003e{const i=this.input.pts[n],r=e[(o+1)%e.length],s=r===void 0?void 0:this.input.pts[r];return i\u0026\u0026s?[{points:[i,s],strokeColor:\"#10b981\"}]:[]})),rects:[],circles:[],texts:[{x:4,y:12,text:`merged cells: ${t.length}`,color:\"#1f2937\"}]}}},VIt=(t,e,n)=\u003e{const o=2*(t.x*(e.y-n.y)+e.x*(n.y-t.y)+n.x*(t.y-e.y));if(Math.abs(o)\u003c1e-10)return{x:0,y:0,r2:1e18};const i=t.x*t.x+t.y*t.y,r=e.x*e.x+e.y*e.y,s=n.x*n.x+n.y*n.y,a=(i*(e.y-n.y)+r*(n.y-t.y)+s*(t.y-e.y))/o,A=(i*(n.x-e.x)+r*(t.x-n.x)+s*(e.x-t.x))/o;return{x:a,y:A,r2:(t.x-a)**2+(t.y-A)**2}},jto=(t,e,n)=\u003e[t.a,t.b,t.c].includes(e)\u0026\u0026[t.a,t.b,t.c].includes(n),$to=(t,e,n,o=[],i,r=[])=\u003et.filter(([s,a,A])=\u003e{const c=e[s],l=e[a],u=e[A];return!c||!l||!u?!1:((g,h,d,p=[],m,_=[])=\u003e{const{minX:f,maxX:I,minY:C,maxY:y}=d;if(g\u003cf-.1||g\u003eI+.1||h\u003cC-.1||h\u003ey+.1)return!1;for(const x of p){const E=x.diameter/2+m;if((g-x.center.x)**2+(h-x.center.y)**2\u003cE*E-.1)return!1}for(const x of _){const E=x.width/2+m,B=x.height/2+m,S=g-x.center.x,Q=h-x.center.y,w=Math.cos(x.ccwRotation),M=Math.sin(x.ccwRotation),k=S*w+Q*M,R=-S*M+Q*w;if(Math.abs(k)\u003cE-.1\u0026\u0026Math.abs(R)\u003cB-.1)return!1}return!0})((c.x+l.x+u.x)/3,(c.y+l.y+u.y)/3,n,o,i,r)}),qto=class extends AJ{input;output=null;constructor(t){super(),this.input=t}_step(){const t=this.input.vias??[],e=this.input.rects??[],n=(i=\u003e{const r=i.map((_,f)=\u003e({..._,i:f}));if(r.length\u003c3)return[];let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(const _ of r)s=Math.min(s,_.x),a=Math.min(a,_.y),A=Math.max(A,_.x),c=Math.max(c,_.y);const l=Math.max(A-s,c-a)||1,u=(s+A)/2,g=(a+c)/2,h={x:u-30*l,y:g-l,i:-1},d={x:u,y:g+30*l,i:-2},p={x:u+30*l,y:g-l,i:-3};let m=[{a:h,b:d,c:p,cc:VIt(h,d,p)}];for(const _ of r){const f=m.filter(y=\u003e{const x=_.x-y.cc.x,E=_.y-y.cc.y;return x*x+E*E\u003cy.cc.r2+1e-6}),I=new Set(f),C=[];for(const y of f){const x=[[y.a,y.b],[y.b,y.c],[y.c,y.a]];for(const[E,B]of x){let S=!1;for(const Q of f)if(Q!==y\u0026\u0026jto(Q,E,B)){S=!0;break}S||C.push([E,B])}}m=m.filter(y=\u003e!I.has(y));for(const[y,x]of C)m.push({a:y,b:x,c:_,cc:VIt(y,x,_)})}return m.filter(_=\u003e_.a.i\u003e=0\u0026\u0026_.b.i\u003e=0\u0026\u0026_.c.i\u003e=0).map(_=\u003e[_.a.i,_.b.i,_.c.i])})(this.input.pts),o=$to(n,this.input.pts,this.input.bounds,t,this.input.clearance,e);this.output={pts:this.input.pts,validTris:o},this.stats={candidateTriangles:n.length,validTriangles:o.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const t=this.output?.validTris??[];return{points:this.input.pts.map(e=\u003e({x:e.x,y:e.y,color:\"#2563eb\"})),lines:t.flatMap(([e,n,o])=\u003e{const i=this.input.pts[e],r=this.input.pts[n],s=this.input.pts[o];return i\u0026\u0026r\u0026\u0026s?[{points:[i,r],strokeColor:\"#64748b\"},{points:[r,s],strokeColor:\"#64748b\"},{points:[s,i],strokeColor:\"#64748b\"}]:[]}),rects:[],circles:[],texts:[{x:this.input.bounds.minX+6,y:this.input.bounds.minY+12,text:`valid triangles: ${t.length}`,color:\"#1f2937\"}]}}},Xto=class extends Gto{pipelineDef=[Fae(\"generatePoints\",Kto,t=\u003e[t.inputProblem]),Fae(\"triangulate\",qto,t=\u003e{const e=t.getStageOutput(\"generatePoints\");if(!e)throw new Error(\"generatePoints output missing\");return[{pts:e.pts,bounds:t.inputProblem.bounds,vias:t.inputProblem.vias,rects:t.inputProblem.rects,clearance:t.inputProblem.clearance}]}),Fae(\"mergeCells\",Wto,t=\u003e{const e=t.getStageOutput(\"triangulate\");if(!e)throw new Error(\"triangulate output missing\");return[{pts:e.pts,validTris:e.validTris,concavityTolerance:t.inputProblem.concavityTolerance}]}),Fae(\"buildRegions\",Yto,t=\u003e{const e=t.getStageOutput(\"mergeCells\");if(!e)throw new Error(\"mergeCells output missing\");return[e]})];getConstructorParams(){return[this.inputProblem]}getOutput(){return this.getStageOutput(\"buildRegions\")??null}visualize(){const t=this.getOutput();return t?{points:t.pts.map(e=\u003e({x:e.x,y:e.y,color:\"#38b6ff\"})),lines:t.regions.flatMap(e=\u003ee.map((n,o)=\u003e{const i=e[(o+1)%e.length]??n;return{points:[{x:n.x,y:n.y},{x:i.x,y:i.y}],strokeColor:\"#4ecb82\"}})),rects:[],circles:(this.inputProblem.vias??[]).map(e=\u003e({center:{x:e.center.x,y:e.center.y},radius:e.diameter/2,stroke:\"#ff6b6b\"})),texts:[{x:this.inputProblem.bounds.minX+8,y:this.inputProblem.bounds.minY+16,text:`regions=${t.regions.length}`,color:\"#ffffff\"}]}:{points:[],lines:[],rects:[],circles:[],texts:[]}}},K6e=1e-9,Zto=(t,e)=\u003e{const n=[jIt(t)],o=[];let i=e.maxSplitsPerRegion??32;for(;n.length\u003e0;){const r=n.pop();if(!r)continue;if(r.length\u003c4){o.push(r);continue}const s=eno(r,e);if(!s||i\u003c=0){o.push(r);continue}const[a,A]=nno(r,s.i,s.j);i-=1,n.push(a,A)}return o},eno=(t,e)=\u003e{const n=ono(t);if(!n)return null;const{triangles:o}=n,i=ano(t);if(i\u003c=K6e)return null;const r=Math.sqrt(i),s=o.map(A=\u003eAno(t[A[0]],t[A[1]],t[A[2]]));let a=null;for(const A of n.internalEdges){const{i:c,j:l,triA:u,triB:g}=A,h=cno(t[c],t[l])/r;if(h\u003ee.maxNeckRatio)continue;const d=tno(u,g,o.length,n.triangleAdjacency,s),p=i-d,m=Math.min(d,p)/i;if(m\u003ce.minSplitBalanceRatio)continue;const _=h/Math.max(m,K6e);(!a||_\u003ca.score)\u0026\u0026(a={i:c,j:l,score:_})}return a?{i:a.i,j:a.j}:null},tno=(t,e,n,o,i)=\u003e{const r=new Array(n).fill(!1),s=[t];r[e]=!0;let a=0;for(;s.length\u003e0;){const A=s.pop();if(A===void 0||r[A])continue;r[A]=!0,a+=i[A]??0;const c=o[A]??[];for(const l of c)r[l]||s.push(l)}return a},nno=(t,e,n)=\u003e[zIt(t,e,n),zIt(t,n,e)],zIt=(t,e,n)=\u003e{const o=[],i=t.length;let r=e;for(o.push(t[r]);r!==n;)r=(r+1)%i,o.push(t[r]);return jIt(o)},ono=t=\u003e{const e=t.length;if(e\u003c3)return null;const n=new Set;for(let a=0;a\u003ce;a++){const A=(a+1)%e;n.add(WIt(a,A))}const o=ino(t);if(!o||o.length===0)return null;const i=new Map;o.forEach((a,A)=\u003e{for(let c=0;c\u003c3;c++){const l=a[c],u=a[(c+1)%3],g=WIt(l,u),h=i.get(g);h?h.push(A):i.set(g,[A])}});const r=Array.from({length:o.length},()=\u003e[]),s=[];for(const[a,A]of i.entries()){if(n.has(a)||A.length!==2)continue;const[c,l]=a.split(\"_\"),u=Number(c),g=Number(l),h=A[0],d=A[1];s.push({i:u,j:g,triA:h,triB:d});const p=r[h],m=r[d];p\u0026\u0026p.push(d),m\u0026\u0026m.push(h)}return{triangles:o,internalEdges:s,triangleAdjacency:r}},ino=t=\u003e{const e=t.length;if(e\u003c3)return null;const n=Math.sign(JIt(t));if(n===0)return null;const o=[...Array(e).keys()];n\u003c0\u0026\u0026o.reverse();const i=[];let r=0;for(;o.length\u003e3\u0026\u0026r\u003ce*e;){let s=!1;for(let a=0;a\u003co.length;a++){const A=o[(a-1+o.length)%o.length],c=o[a],l=o[(a+1)%o.length];if(A===void 0||c===void 0||l===void 0)continue;const u=t[A],g=t[c],h=t[l];if(!u||!g||!h||!rno(u,g,h))continue;let d=!1;for(const p of o){if(p===A||p===c||p===l)continue;const m=t[p];if(m\u0026\u0026sno(m,u,g,h)){d=!0;break}}if(!d){i.push([A,c,l]),o.splice(a,1),s=!0;break}}if(!s)return null;r+=1}if(o.length===3){const[s,a,A]=o;s!==void 0\u0026\u0026a!==void 0\u0026\u0026A!==void 0\u0026\u0026i.push([s,a,A])}return i},rno=(t,e,n)=\u003ecJ(t,e,n)\u003eK6e,sno=(t,e,n,o)=\u003e{const i=cJ(e,n,t),r=cJ(n,o,t),s=cJ(o,e,t);return i\u003e=-1e-9\u0026\u0026r\u003e=-1e-9\u0026\u0026s\u003e=-1e-9},cJ=(t,e,n)=\u003e(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),JIt=t=\u003e{let e=0;for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];o\u0026\u0026i\u0026\u0026(e+=o.x*i.y-i.x*o.y)}return e/2},ano=t=\u003eMath.abs(JIt(t)),Ano=(t,e,n)=\u003eMath.abs(cJ(t,e,n))/2,cno=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),WIt=(t,e)=\u003et\u003ce?`${t}_${e}`:`${e}_${t}`,jIt=t=\u003e{if(t.length\u003c2)return t;const e=t[0],n=t[t.length-1];return e\u0026\u0026n\u0026\u0026e.x===n.x\u0026\u0026e.y===n.y?t.slice(0,-1):t},$3={pattern:\"grid\",pitchX:2.2,pitchY:1.8,staggerAxis:\"x\",staggerOffset:1.1,staggerOffsetX:1.1,padWidth:.9,padHeight:1,padGap:.35,viaDiameter:.3,clearance:.2,concavityTolerance:.3,boundsPadding:1.2,orientation:\"horizontal\",portSpacing:.25,maxNeckRatio:0,minSplitBalanceRatio:.2},lno=(t,e)=\u003e{let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const s of t)for(const a of s.padCenters){const A=e.orientation===\"horizontal\"?e.padWidth/2:e.padHeight/2,c=e.orientation===\"horizontal\"?e.padHeight/2:e.padWidth/2;a.x-A\u003cn\u0026\u0026(n=a.x-A),a.y-c\u003co\u0026\u0026(o=a.y-c),a.x+A\u003ei\u0026\u0026(i=a.x+A),a.y+c\u003er\u0026\u0026(r=a.y+c)}return{minX:n-e.boundsPadding,minY:o-e.boundsPadding,maxX:i+e.boundsPadding,maxY:r+e.boundsPadding}},uno=t=\u003et.pattern===\"staggered\"?(e=\u003e{const n=[],o=[],i=e.padGap/2+e.padWidth/2,r=-(e.cols-1)*e.pitchX/2,s=-(e.rows-1)*e.pitchY/2;for(let a=0;a\u003ce.rows;a++){const A=e.staggerAxis===\"x\"\u0026\u0026a%2==1?e.staggerOffset:0;for(let c=0;c\u003ce.cols;c++){const l=e.staggerAxis===\"y\"\u0026\u0026c%2==1?e.staggerOffset:0,u={x:r+c*e.pitchX+A,y:s+a*e.pitchY+l},g=e.orientation===\"horizontal\"?{x:u.x-i,y:u.y}:{x:u.x,y:u.y-i},h=e.orientation===\"horizontal\"?{x:u.x+i,y:u.y}:{x:u.x,y:u.y+i};n.push({jumperId:`jumper_r${a}_c${c}`,center:u,orientation:e.orientation,padCenters:[g,h]}),o.push({center:g,diameter:e.viaDiameter},{center:h,diameter:e.viaDiameter})}}return{jumpers:n,vias:o,bounds:lno(n,e)}})(t):(e=\u003e{const n=[],o=[],i=e.padGap/2+e.padWidth/2,r=-(e.cols-1)*e.pitchX/2,s=-(e.rows-1)*e.pitchY/2;for(let a=0;a\u003ce.rows;a++)for(let A=0;A\u003ce.cols;A++){const c={x:r+A*e.pitchX,y:s+a*e.pitchY},l=e.orientation===\"horizontal\"?{x:c.x-i,y:c.y}:{x:c.x,y:c.y-i},u=e.orientation===\"horizontal\"?{x:c.x+i,y:c.y}:{x:c.x,y:c.y+i},g=`jumper_r${a}_c${A}`;n.push({jumperId:g,center:c,orientation:e.orientation,padCenters:[l,u]}),o.push({center:l,diameter:e.viaDiameter},{center:u,diameter:e.viaDiameter})}return{jumpers:n,vias:o,bounds:{minX:r-i-e.padWidth/2-e.boundsPadding,maxX:r+(e.cols-1)*e.pitchX+i+e.padWidth/2+e.boundsPadding,minY:s-i-e.padHeight/2-e.boundsPadding,maxY:s+(e.rows-1)*e.pitchY+i+e.padHeight/2+e.boundsPadding}}})(t),$It=t=\u003e({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),V6e=t=\u003e[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}],sv=(t,e,n)=\u003eMath.abs(t-e)\u003c=n,Hae=(t,e,n)=\u003esv(t.x,e.x,n)\u0026\u0026sv(t.y,e.y,n),gno=t=\u003et.map((e,n)=\u003e{const o=(i=\u003e{let r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(const c of i)c.x\u003cr\u0026\u0026(r=c.x),c.y\u003cs\u0026\u0026(s=c.y),c.x\u003ea\u0026\u0026(a=c.x),c.y\u003eA\u0026\u0026(A=c.y);return{minX:r,minY:s,maxX:a,maxY:A}})(e);return{regionId:`top_${n}`,ports:[],d:{bounds:o,center:$It(o),polygon:e,isPad:!1}}}),dno=t=\u003e{const e=t.end.x-t.start.x,n=t.end.y-t.start.y;return Math.hypot(e,n)},fL=(t,e)=\u003e({x:t.start.x+(t.end.x-t.start.x)*e,y:t.start.y+(t.end.y-t.start.y)*e}),qIt=(t,e,n)=\u003e{const o=[];if(!t.d.polygon||!e.d.polygon)return o;for(let i=0;i\u003ct.d.polygon.length;i++){const r=t.d.polygon[i],s=t.d.polygon[(i+1)%t.d.polygon.length];if(r\u0026\u0026s)for(let a=0;a\u003ce.d.polygon.length;a++){const A=e.d.polygon[a],c=e.d.polygon[(a+1)%e.d.polygon.length];if(!A||!c)continue;const l=_no({start:r,end:s},{start:A,end:c},n);l\u0026\u0026(o.some(u=\u003emno(u,l,n))||o.push(l))}}return o},hno=(t,e)=\u003e{const n=[];for(const o of t){let i=o,r=!0;for(;r;){r=!1;for(let s=0;s\u003cn.length;s++){const a=n[s];if(!a)continue;const A=pno(i,a,e);if(A){i=A,n.splice(s,1),r=!0;break}}}n.push(i)}return n},pno=(t,e,n)=\u003e{const o=t.end.x-t.start.x,i=t.end.y-t.start.y,r=e.end.x-e.start.x,s=e.end.y-e.start.y,a=o**2+i**2;if(a\u003c=n**2||!sv(o*s-i*r,0,n))return null;const A=e.start.x-t.start.x,c=e.start.y-t.start.y,l=e.end.x-t.start.x,u=e.end.y-t.start.y,g=o*u-i*l;if(!sv(o*c-i*A,0,n)||!sv(g,0,n))return null;const h=(A*o+c*i)/a,d=(l*o+u*i)/a,p=Math.min(h,d),m=Math.max(h,d),_=n/Math.sqrt(a);if(p\u003e1+_||m\u003c0-_)return null;const f=Math.min(0,p),I=Math.max(1,m);return{start:fL(t,f),end:fL(t,I)}},mno=(t,e,n)=\u003eHae(t.start,e.start,n)\u0026\u0026Hae(t.end,e.end,n)||Hae(t.start,e.end,n)\u0026\u0026Hae(t.end,e.start,n),_no=(t,e,n)=\u003e{const o=t.end.x-t.start.x,i=t.end.y-t.start.y,r=e.end.x-e.start.x,s=e.end.y-e.start.y,a=o**2+i**2;if(a\u003c=n**2||!sv(o*s-i*r,0,n))return null;const A=e.start.x-t.start.x,c=e.start.y-t.start.y,l=e.end.x-t.start.x,u=e.end.y-t.start.y,g=o*u-i*l;if(!sv(o*c-i*A,0,n)||!sv(g,0,n))return null;const h=(A*o+c*i)/a,d=(l*o+u*i)/a,p=Math.max(0,Math.min(h,d)),m=Math.min(1,Math.max(h,d));return m-p\u003c=n/Math.sqrt(a)?null:{start:fL(t,p),end:fL(t,m)}},fno=(t,e,n)=\u003e{const o=Math.max(t.minX,e.minX),i=Math.min(t.maxX,e.maxX),r=Math.max(t.minY,e.minY),s=Math.min(t.maxY,e.maxY);return i\u003co-n||s\u003cr-n?null:{minX:o,maxX:i,minY:r,maxY:s}},Ino=t=\u003e{const e=(d=\u003e{const p=d.orientation??$3.orientation,m=d.staggerAxis??$3.staggerAxis,_=d.padWidth??$3.padWidth,f=d.padHeight??$3.padHeight,I=d.padGap??$3.padGap,C=d.clearance??$3.clearance,y=d.colSpacing??d.pitchX??$3.pitchX,x=d.rowSpacing??d.pitchY??$3.pitchY,E=(B=_,S=f,Q=I,p===\"horizontal\"?{x:Q+2*B,y:S}:{x:S,y:Q+2*B});var B,S,Q;const w=C,M=((F,O,U,Y,W)=\u003eF===\"horizontal\"?O===\"x\"?W+2*U:Y:O===\"x\"?Y:W+2*U)(p,m,_,f,I)/2,k=d.staggerOffset??d.staggerOffsetX??M,R={...$3,...d,orientation:p,staggerAxis:m,pitchX:Math.max(y,E.x+w),pitchY:Math.max(x,E.y+w),padWidth:_,padHeight:f,padGap:I,staggerOffset:k,staggerOffsetX:k,concavityTolerance:d.concavityTolerance??$3.concavityTolerance,clearance:C,portSpacing:d.portSpacing??$3.portSpacing,maxNeckRatio:d.maxNeckRatio??$3.maxNeckRatio,minSplitBalanceRatio:d.minSplitBalanceRatio??$3.minSplitBalanceRatio};if(R.cols\u003c=0||R.rows\u003c=0)throw new Error(\"rows and cols must be \u003e 0\");if(!Number.isFinite(R.portSpacing)||R.portSpacing\u003c=0)throw new Error(\"portSpacing must be \u003e 0\");if(!Number.isFinite(R.maxNeckRatio)||R.maxNeckRatio\u003c0)throw new Error(\"maxNeckRatio must be \u003e= 0\");if(!Number.isFinite(R.minSplitBalanceRatio)||R.minSplitBalanceRatio\u003c0||R.minSplitBalanceRatio\u003e.5)throw new Error(\"minSplitBalanceRatio must be between 0 and 0.5\");return R})(t),n=uno(e),o=e.orientation===\"horizontal\"?e.padWidth:e.padHeight,i=e.orientation===\"horizontal\"?e.padHeight:e.padWidth,r=n.jumpers.flatMap(d=\u003ed.padCenters.map(p=\u003e({center:p,width:o,height:i,ccwRotation:0}))),s=new Xto({bounds:n.bounds,rects:r,clearance:0,concavityTolerance:e.concavityTolerance});s.solve();const a=s.getOutput();if(!a)throw new Error(s.error??\"ConvexRegionsSolver failed\");const A=((d,p)=\u003e{if(p.maxNeckRatio\u003c=0)return d;const m=[];for(const _ of d)m.push(...Zto(_,p));return m})(a.regions,{maxNeckRatio:e.maxNeckRatio,minSplitBalanceRatio:e.minSplitBalanceRatio}),c=gno(A),l=((d,p)=\u003ed.flatMap(m=\u003e{const[_,f]=m.padCenters,I=p.orientation===\"horizontal\"?p.padWidth/2:p.padHeight/2,C=p.orientation===\"horizontal\"?p.padHeight/2:p.padWidth/2,y={minX:_.x-I,maxX:_.x+I,minY:_.y-C,maxY:_.y+C},x={minX:f.x-I,maxX:f.x+I,minY:f.y-C,maxY:f.y+C},E=I/2,B=C/2,S=p.orientation===\"horizontal\"?{minX:Math.min(_.x,f.x),maxX:Math.max(_.x,f.x),minY:m.center.y-B,maxY:m.center.y+B}:{minX:m.center.x-E,maxX:m.center.x+E,minY:Math.min(_.y,f.y),maxY:Math.max(_.y,f.y)};return[{regionId:`${m.jumperId}_pad1`,ports:[],d:{bounds:y,center:_,polygon:V6e(y),isPad:!0,isThroughJumper:!1}},{regionId:`${m.jumperId}_bridge`,ports:[],d:{bounds:S,center:m.center,polygon:V6e(S),isPad:!1,isThroughJumper:!0}},{regionId:`${m.jumperId}_pad2`,ports:[],d:{bounds:x,center:f,polygon:V6e(x),isPad:!0,isThroughJumper:!1}}]}))(n.jumpers,{orientation:e.orientation,padWidth:e.padWidth,padHeight:e.padHeight}),u=((d,p,m=1e-5)=\u003e{const _=[];let f=0;for(let I=0;I\u003cd.length;I++){const C=d[I];if(C?.d.polygon)for(let y=I+1;y\u003cd.length;y++){const x=d[y];if(!x?.d.polygon)continue;const E=qIt(C,x,m);for(const B of E){const S=dno(B),Q=Math.floor(S/p),w=Math.max(1,Q-1);for(let M=0;M\u003cw;M++){const k=fL(B,(M+1)/(w+1));_.push({portId:\"tp_\"+f++,region1:C,region2:x,d:{x:k.x,y:k.y}})}}}}return _})(c,e.portSpacing),g=((d,p,m=1e-5)=\u003e{const _=[];let f=0,I=0;const C=d.filter(x=\u003ex.d.isPad),y=d.filter(x=\u003ex.d.isThroughJumper\u0026\u0026!x.d.isPad);for(const x of C)for(const E of p){const B=qIt(x,E,m),S=hno(B,m);for(const Q of S){const w=fL(Q,.5);_.push({portId:\"jp_\"+f++,region1:x,region2:E,d:{x:w.x,y:w.y}})}}for(const x of y)for(const E of C){const B=fno(x.d.bounds,E.d.bounds,m);if(!B)continue;const S=$It(B);_.push({portId:\"jip_\"+I++,region1:E,region2:x,d:{x:S.x,y:S.y}})}return _})(l,c),h=[...u,...g];return(d=\u003e{for(const p of d)p.region1.ports.push(p),p.region2.ports.push(p)})(h),{regions:[...c,...l],ports:h,jumperLocations:n.jumpers.map((d,p)=\u003e({center:d.center,orientation:d.orientation,padRegions:[l[3*p],l[3*p+2]].filter(m=\u003e!!m)})),topLayerRegions:c,jumperRegions:l,jumpers:n.jumpers,vias:n.vias,bounds:n.bounds}},Cno=class extends yr{getSolverName(){return\"JumperPrepatternSolver2_HyperGraph\"}constructorParams;nodeWithPortPoints;colorMap;traceWidth;obstacleMargin;hyperParameters;jumperGraphSolver=null;xyConnections=[];graphBounds=null;jumperLocations=[];solvedRoutes=[];jumpers=[];phase=\"jumperGraph\";curvySolvers=[];currentCurvySolverIndex=0;routeInfos=[];regionCurvedPaths=new Map;constructor(t){super(),this.constructorParams=t,this.nodeWithPortPoints=t.nodeWithPortPoints,this.colorMap=t.colorMap??{},this.traceWidth=t.traceWidth??.15,this.obstacleMargin=t.obstacleMargin??.15,this.hyperParameters=t.hyperParameters??{},this.MAX_ITERATIONS=1e6,Object.keys(this.colorMap).length===0\u0026\u0026(this.colorMap=this._buildColorMap())}getConstructorParams(){return this.constructorParams}_buildColorMap(){const t=[\"#e6194b\",\"#3cb44b\",\"#ffe119\",\"#4363d8\",\"#f58231\",\"#911eb4\",\"#46f0f0\",\"#f032e6\",\"#bcf60c\",\"#fabebe\"],e={},n=new Set;for(const i of this.nodeWithPortPoints.portPoints)n.add(i.connectionName);let o=0;for(const i of Array.from(n))e[i]=t[o%t.length],o++;return e}_normalizeRegionPolygonsToBounds(t){for(const e of t.regions){const n=e.d,o=n?.polygon,i=n?.bounds;if(!o||o.length===0||!i)continue;let r=1/0,s=1/0;for(const c of o)r=Math.min(r,c.x),s=Math.min(s,c.y);const a=i.minX-r,A=i.minY-s;(Math.abs(a)\u003e1e-12||Math.abs(A)\u003e1e-12)\u0026\u0026(n.polygon=o.map(c=\u003e({x:c.x+a,y:c.y+A}))),n.polygonPerimeterCache\u0026\u0026(n.polygonPerimeterCache=void 0)}return t}_getPatternConfig(){return{cols:this.hyperParameters.COLS??1,rows:this.hyperParameters.ROWS??1}}_generate0603Grid(t,e,n,o){const i=e===\"horizontal\"?t.rows:t.cols,r=e===\"horizontal\"?t.cols:t.rows,s=o.maxX-o.minX,a=o.maxY-o.minY,A=.35,c=this.hyperParameters.TRACE_CHANNELS_BETWEEN_JUMPERS??1,l=this.traceWidth*c+2*this.obstacleMargin,u=e===\"horizontal\"?2.15:1,g=e===\"horizontal\"?1:2.15,h=e===\"horizontal\"?\"x\":\"y\",d=n===\"staggered\",p=d\u0026\u0026h===\"x\"?u/2:d?g/2:0,m=Math.max(0,s-1),_=Math.max(0,a-1),f=Math.max(0,m-(d\u0026\u0026h===\"x\"?p:0)),I=Math.max(0,_-(d\u0026\u0026h===\"y\"?p:0)),C=i\u003e1?Math.max(u+l,(f-u)/(i-1)):u,y=r\u003e1?Math.max(g+l,(I-g)/(r-1)):g,x=Ino({cols:i,rows:r,orientation:e,pattern:n,staggerAxis:h,colSpacing:C,rowSpacing:y,padWidth:.9,padHeight:1,padGap:A,clearance:l,boundsPadding:0,maxNeckRatio:.4,minSplitBalanceRatio:.2}),E=x.bounds,B=(E.minX+E.maxX)/2,S=(E.minY+E.maxY)/2,Q=r_t((o.minX+o.maxX)/2-B,(o.minY+o.maxY)/2-S);return this._normalizeRegionPolygonsToBounds(Y1t(x,Q))}_initializeGraph(){const t=this.nodeWithPortPoints,e=this._getPatternConfig(),n=this.hyperParameters.ORIENTATION??\"vertical\",o=this.hyperParameters.JUMPER_TYPE??\"1206x4\",i=this.hyperParameters.PATTERN??\"grid\",r={minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2};let s;if(this.graphBounds=r,o===\"0603\"){const c=this._generate0603Grid(e,n,i,r);if(!c)return this.error=`0603 grid (${e.cols}x${e.rows}) is too large to fit in node bounds`,this.failed=!0,!1;s=c}else s=Xeo({cols:e.cols,rows:e.rows,marginX:Math.max(1.2,.3*e.cols),marginY:Math.max(1.2,.3*e.rows),outerPaddingX:.4,outerPaddingY:.4,parallelTracesUnderJumperCount:2,innerColChannelPointCount:3,innerRowChannelPointCount:3,outerChannelXPointCount:3,outerChannelYPointCount:3,regionsBetweenPads:!0,orientation:n,bounds:r});if(s.regions.length\u003e0){let c=1/0,l=-1/0,u=1/0,g=-1/0;for(const d of s.regions){if(!d.d?.isPad)continue;const p=d.d?.bounds;p\u0026\u0026(c=Math.min(c,p.minX),l=Math.max(l,p.maxX),u=Math.min(u,p.minY),g=Math.max(g,p.maxY))}const h=o===\"0603\"?.5:1;if(c-h\u003cr.minX||l+h\u003er.maxX||u-h\u003cr.minY||g+h\u003er.maxY)return this.error=`baseGraph bounds (${c.toFixed(2)}, ${u.toFixed(2)}, ${l.toFixed(2)}, ${g.toFixed(2)}) exceed node bounds (${r.minX.toFixed(2)}, ${r.minY.toFixed(2)}, ${r.maxX.toFixed(2)}, ${r.maxY.toFixed(2)})`,this.failed=!0,!1}this.jumperLocations=s.jumperLocations?.map(c=\u003e({center:c.center,orientation:c.orientation,padRegions:c.padRegions}))??[];const a=new Map;for(const c of t.portPoints){const l=a.get(c.connectionName);l?l.points.push(c):a.set(c.connectionName,{points:[c],rootConnectionName:c.rootConnectionName})}this.xyConnections=[];for(const[c,l]of Array.from(a.entries()))l.points.length\u003c2||this.xyConnections.push({start:{x:l.points[0].x,y:l.points[0].y},end:{x:l.points[1].x,y:l.points[1].y},connectionId:c});if(this.xyConnections.length===0)return this.solved=!0,!0;const A=((c,l)=\u003e{const u=[...c.regions],g=[...c.ports],h=[],d=k1t(c.regions);for(const p of l){const{start:m,end:_,connectionId:f}=p,I=L1t(`conn:${f}:start`,m.x,m.y);u.push(I);const C=L1t(`conn:${f}:end`,_.x,_.y);u.push(C);const y=O1t(m.x,m.y,c.regions,d);if(y){const B=F1t(`conn:${f}:start-port`,I,y.region,y.portPosition);g.push(B)}const x=O1t(_.x,_.y,c.regions,d);if(x){const B=F1t(`conn:${f}:end-port`,C,x.region,x.portPosition);g.push(B)}const E={connectionId:f,mutuallyConnectedNetworkId:f,startRegion:I,endRegion:C};h.push(E)}return{regions:u,ports:g,connections:h}})(s,this.xyConnections);return this.jumperGraphSolver=new $eo({inputGraph:{regions:A.regions,ports:A.ports},inputConnections:A.connections}),this.jumperGraphSolver.MAX_ITERATIONS*=3,!0}_step(){switch(this.phase){case\"jumperGraph\":this._stepJumperGraph();break;case\"curvyTrace\":this._stepCurvyTrace();break;case\"done\":this.solved=!0}}_stepJumperGraph(){if(!this.jumperGraphSolver){if(this._initializeGraph(),this.solved)return;if(!this.jumperGraphSolver)return void(this.failed=!0)}this.activeSubSolver=this.jumperGraphSolver,this.jumperGraphSolver.step(),this.jumperGraphSolver.solved?(this._initializeCurvyTraceSolvers(),this.curvySolvers.length\u003e0?this.phase=\"curvyTrace\":(this._finalizeCurvyTraceResults(),this.phase=\"done\",this.solved=!0)):this.jumperGraphSolver.failed\u0026\u0026(this.error=this.jumperGraphSolver.error,this.failed=!0)}_stepCurvyTrace(){if(this.currentCurvySolverIndex\u003e=this.curvySolvers.length)return this._finalizeCurvyTraceResults(),this.phase=\"done\",void(this.solved=!0);const t=this.curvySolvers[this.currentCurvySolverIndex],e=t.solver;if(this.activeSubSolver=e,e.step(),e.solved){const n=t.regionId;this.regionCurvedPaths.has(n)||this.regionCurvedPaths.set(n,new Map);for(const o of e.outputTraces){const i=o.networkId??\"\",r=o.points.map(a=\u003e({x:a.x,y:a.y})),s={path:r,start:r[0]??{x:0,y:0},end:r[r.length-1]??{x:0,y:0}};this.regionCurvedPaths.get(n).has(i)||this.regionCurvedPaths.get(n).set(i,[]),this.regionCurvedPaths.get(n).get(i).push(s)}this.currentCurvySolverIndex++}else e.failed\u0026\u0026this.currentCurvySolverIndex++}_initializeCurvyTraceSolvers(){if(!this.jumperGraphSolver)return;const t=new Set,e=[];for(const o of this.jumperLocations)for(const i of o.padRegions){const r=i.d.bounds,s=i.d.center;e.push({minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY,center:{x:s.x,y:s.y},networkIds:[]})}const n=new Map;for(let o=0;o\u003cthis.jumperGraphSolver.solvedRoutes.length;o++){const i=this.jumperGraphSolver.solvedRoutes[o],r=i.connection.connectionId,s=this.nodeWithPortPoints.portPoints.find(u=\u003eu.connectionName===r)?.rootConnectionName,a=[],A=[];let c=null,l=null;for(let u=0;u\u003ci.path.length;u++){const g=i.path[u],h=g.port,d=g.lastRegion,p=h.region1,m=h.region2;let _;if(d)p\u0026\u0026p.regionId!==d.regionId?_=p:m\u0026\u0026m.regionId!==d.regionId\u0026\u0026(_=m);else{const f=i.path[u+1],I=f?.lastRegion;if(I\u0026\u0026(p\u0026\u0026p.regionId===I.regionId?_=p:m\u0026\u0026m.regionId===I.regionId\u0026\u0026(_=m)),!_){const C=y=\u003ey?.regionId?.startsWith(\"conn:\");_=!p||C(p)||p.d?.isPad||p.d?.isThroughJumper?!m||C(m)||m.d?.isPad||m.d?.isThroughJumper?!p||p.d?.isPad||p.d?.isThroughJumper?(!m||m.d?.isPad||m.d?.isThroughJumper)\u0026\u0026p||m:p:m:p}}if(_\u0026\u0026(!c||_.regionId!==c.regionId)){if(c\u0026\u0026l){A.push({regionId:c.regionId,region:c,entryPort:l,exitPort:h});const f=c.regionId;n.has(f)||n.set(f,[]),n.get(f).push({regionId:c.regionId,region:c,routeIndex:o,connectionName:r,rootConnectionName:s,entryPort:l,exitPort:h})}c=_,l=h}if(d?.d?.isThroughJumper\u0026\u0026!t.has(d.regionId)){t.add(d.regionId);const f=d.d.bounds,I=d.d.center,C=f.maxX-f.minX\u003ef.maxY-f.minY,y=(this.hyperParameters.JUMPER_TYPE??\"1206x4\")===\"0603\"?\"0603\":\"1206x4_pair\";C?a.push({route_type:\"jumper\",start:{x:f.minX,y:I.y},end:{x:f.maxX,y:I.y},footprint:y}):a.push({route_type:\"jumper\",start:{x:I.x,y:f.minY},end:{x:I.x,y:f.maxY},footprint:y})}}if(c\u0026\u0026l){const u=i.path[i.path.length-1];A.push({regionId:c.regionId,region:c,entryPort:l,exitPort:u?.port||null})}this.routeInfos.push({connectionId:r,rootConnectionName:s,jumpers:a,traversals:A})}for(let o=0;o\u003cthis.routeInfos.length;o++){const i=this.routeInfos[o],r=i.rootConnectionName??i.connectionId;for(const s of i.jumpers){const a=[s.start,s.end];for(const A of a)for(const c of e){const l=Math.abs(c.center.x-A.x),u=Math.abs(c.center.y-A.y);l\u003c.1\u0026\u0026u\u003c.1\u0026\u0026(c.networkIds.includes(r)||c.networkIds.push(r))}}}for(const[o,i]of n){if(i.length===0)continue;const r=i[0].region;if(r.d.isPad||r.d.isThroughJumper)continue;const s=r.d.bounds,a=[];for(const g of i)a.push({start:{x:g.entryPort.d.x,y:g.entryPort.d.y},end:{x:g.exitPort.d.x,y:g.exitPort.d.y},networkId:g.rootConnectionName??g.connectionName});const A=.01,c=e.filter(g=\u003eg.minX\u003c=s.maxX+A\u0026\u0026g.maxX\u003e=s.minX-A\u0026\u0026g.minY\u003c=s.maxY+A\u0026\u0026g.maxY\u003e=s.minY-A).map(g=\u003e{const h=i.map(p=\u003ep.rootConnectionName??p.connectionName),d=g.networkIds.find(p=\u003eh.includes(p));return{minX:g.minX,minY:g.minY,maxX:g.maxX,maxY:g.maxY,center:g.center,networkId:d}}),l={bounds:s,waypointPairs:a,obstacles:c,preferredTraceToTraceSpacing:2*this.traceWidth,preferredObstacleToTraceSpacing:2*this.traceWidth},u=new y1t(l);this.curvySolvers.push({solver:u,regionId:o,traversals:i.map(g=\u003e({routeIndex:g.routeIndex,connectionName:g.connectionName,rootConnectionName:g.rootConnectionName}))})}}_finalizeCurvyTraceResults(){const t=(e,n)=\u003eMath.sqrt((e.x-n.x)**2+(e.y-n.y)**2);for(let e=0;e\u003cthis.routeInfos.length;e++){const n=this.routeInfos[e],o=[];for(const i of n.traversals){const r=i.regionId,s=n.rootConnectionName??n.connectionId,a=this.regionCurvedPaths.get(r)?.get(s);let A=null;if(a\u0026\u0026a.length\u003e0){const c={x:i.entryPort.d.x,y:i.entryPort.d.y},l=i.exitPort?{x:i.exitPort.d.x,y:i.exitPort.d.y}:null;let u=null,g=1/0;for(const h of a){const d=t(h.start,c)+(l?t(h.end,l):0);d\u003cg\u0026\u0026(g=d,u=h)}u\u0026\u0026g\u003c.5\u0026\u0026(A=u.path)}if(A\u0026\u0026A.length\u003e0)for(let c=o.length\u003e0?1:0;c\u003cA.length;c++)o.push({x:A[c].x,y:A[c].y,z:0});else o.length===0\u0026\u0026o.push({x:i.entryPort.d.x,y:i.entryPort.d.y,z:0}),i.exitPort\u0026\u0026o.push({x:i.exitPort.d.x,y:i.exitPort.d.y,z:0})}this.solvedRoutes.push({connectionName:n.connectionId,rootConnectionName:n.rootConnectionName,traceThickness:this.traceWidth,route:o,jumpers:n.jumpers})}}getOutput(){return this.solvedRoutes}getOutputJumpers(){if(this.jumpers.length\u003e0)return this.jumpers;const t=new Map;for(const o of this.solvedRoutes)for(const i of o.jumpers){const r=[i.start,i.end];for(const s of r){const a=`${s.x.toFixed(3)},${s.y.toFixed(3)}`,A=t.get(a)??[];o.rootConnectionName\u0026\u0026!A.includes(o.rootConnectionName)\u0026\u0026A.push(o.rootConnectionName),A.includes(o.connectionName)||A.push(o.connectionName),t.set(a,A)}}const e=this.hyperParameters.JUMPER_TYPE??\"1206x4\",n=W8[e===\"0603\"?\"0603\":\"1206x4_pair\"];for(const o of this.jumperLocations){const i=o.orientation===\"horizontal\",r=o.padRegions.map(a=\u003e{const A=a.d.bounds,c=a.d.center,l=A.maxX-A.minX,u=A.maxY-A.minY,g=`${c.x.toFixed(3)},${c.y.toFixed(3)}`;return{type:\"rect\",center:c,width:l,height:u,layers:[\"top\"],connectedTo:[...t.get(g)??[]]}}),s={jumper_footprint:e,center:o.center,orientation:o.orientation,width:i?n.length:n.width,height:i?n.width:n.length,pads:r};this.jumpers.push(s)}return this.jumpers=this.jumpers.filter(o=\u003eo.pads.some(i=\u003ei.connectedTo.length\u003e0)),this.jumpers}visualize(){if(this.jumperGraphSolver\u0026\u0026!this.solved)return this.jumperGraphSolver.visualize();const t={lines:[],points:[],rects:[],circles:[]},e=this.nodeWithPortPoints,n={minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2};t.lines.push({points:[{x:n.minX,y:n.minY},{x:n.maxX,y:n.minY},{x:n.maxX,y:n.maxY},{x:n.minX,y:n.maxY},{x:n.minX,y:n.minY}],strokeColor:\"rgba(255, 0, 0, 0.25)\",strokeDash:\"4 4\",layer:\"border\"});for(const o of e.portPoints)t.points.push({x:o.x,y:o.y,label:o.connectionName,color:this.colorMap[o.connectionName]??\"blue\"});for(const o of this.solvedRoutes){const i=this.colorMap[o.connectionName]??\"blue\";for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];t.lines.push({points:[s,a],strokeColor:Es(i,.2),strokeWidth:o.traceThickness,layer:\"route-layer-0\"})}for(const r of o.jumpers)this._drawJumperPads(t,r,Es(i,.5))}return t}_drawJumperPads(t,e,n){const o=W8[e.footprint],i=e.end.x-e.start.x,r=e.end.y-e.start.y,s=Math.abs(i)\u003eMath.abs(r),a=s?o.padLength:o.padWidth,A=s?o.padWidth:o.padLength;t.rects.push({center:{x:e.start.x,y:e.start.y},width:a,height:A,fill:n,stroke:\"rgba(0, 0, 0, 0.5)\",layer:\"jumper\"}),t.rects.push({center:{x:e.end.x,y:e.end.y},width:a,height:A,fill:n,stroke:\"rgba(0, 0, 0, 0.5)\",layer:\"jumper\"}),t.lines.push({points:[e.start,e.end],strokeColor:\"rgba(100, 100, 100, 0.8)\",strokeWidth:.3*o.padWidth,layer:\"jumper-body\"})}},yno=class extends Zse{constructorParams;nodeWithPortPoints;colorMap;traceWidth;obstacleMargin;connMap;baseHyperParameters;availableJumperTypes;solvedRoutes=[];jumpers=[];constructor(t){super(),this.constructorParams=t,this.nodeWithPortPoints=t.nodeWithPortPoints,this.colorMap=t.colorMap??{},this.traceWidth=t.traceWidth??.15,this.obstacleMargin=t.obstacleMargin??.15,this.connMap=t.connMap,this.baseHyperParameters=t.hyperParameters??{},this.availableJumperTypes=t.availableJumperTypes??[\"0603\"],this.MAX_ITERATIONS=1e6,this.GREEDY_MULTIPLIER=1,this.MIN_SUBSTEPS=1e3}getConstructorParams(){return this.constructorParams}getHyperParameterDefs(){const t=[],e=this.nodeWithPortPoints,n=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"vertical\",1);t.push({name:\"0603_max_rows_and_cols_vert_1trace_grid\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:n.cols,ROWS:n.rows,ORIENTATION:\"vertical\",PATTERN:\"grid\",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const o=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"vertical\",1,\"staggered\");t.push({name:\"0603_max_rows_and_cols_vert_1trace_staggered\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:o.cols,ROWS:o.rows,ORIENTATION:\"vertical\",PATTERN:\"staggered\",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const i=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"vertical\",2);t.push({name:\"0603_max_rows_and_cols_vert_2trace_grid\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:i.cols,ROWS:i.rows,ORIENTATION:\"vertical\",PATTERN:\"grid\",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]});const r=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"vertical\",2,\"staggered\");t.push({name:\"0603_max_rows_and_cols_vert_2trace_staggered\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:r.cols,ROWS:r.rows,ORIENTATION:\"vertical\",PATTERN:\"staggered\",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]});const s=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"horizontal\",1);t.push({name:\"0603_max_rows_and_cols_horz_1trace_grid\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:s.cols,ROWS:s.rows,ORIENTATION:\"horizontal\",PATTERN:\"grid\",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const a=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"horizontal\",1,\"staggered\");t.push({name:\"0603_max_rows_and_cols_horz_1trace_staggered\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:a.cols,ROWS:a.rows,ORIENTATION:\"horizontal\",PATTERN:\"staggered\",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const A=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"horizontal\",2);t.push({name:\"0603_max_rows_and_cols_horz_2trace_grid\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:A.cols,ROWS:A.rows,ORIENTATION:\"horizontal\",PATTERN:\"grid\",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]});const c=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,\"horizontal\",2,\"staggered\");return t.push({name:\"0603_max_rows_and_cols_horz_2trace_staggered\",possibleValues:[{JUMPER_TYPE:\"0603\",COLS:c.cols,ROWS:c.rows,ORIENTATION:\"horizontal\",PATTERN:\"staggered\",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]}),t.push({name:\"1206x4\",possibleValues:[{JUMPER_TYPE:\"1206x4\"}]}),t.push({name:\"1206x4_cols\",possibleValues:[1,2,3,4,6,8,10].map(l=\u003e({COLS:l}))}),t.push({name:\"1206x4_rows\",possibleValues:[1,2,3,4,8].map(l=\u003e({ROWS:l}))}),t.push({name:\"orientation\",possibleValues:[{ORIENTATION:\"vertical\"},{ORIENTATION:\"horizontal\"}]}),t}isValidCombination(t){const{JUMPER_TYPE:e,COLS:n,ROWS:o}=t,i=[1,2,4,6,8],r=[1,2,3,4,6,8,10],s=[1,2,3,4,8];return e===\"0603\"?i.includes(n)\u0026\u0026i.includes(o):e===\"1206x4\"\u0026\u0026r.includes(n)\u0026\u0026s.includes(o)}getCombinationDefs(){return[[\"0603_max_rows_and_cols_vert_1trace_grid\"],[\"0603_max_rows_and_cols_vert_1trace_staggered\"],[\"0603_max_rows_and_cols_horz_1trace_grid\"],[\"0603_max_rows_and_cols_horz_1trace_staggered\"],[\"0603_max_rows_and_cols_vert_2trace_grid\"],[\"0603_max_rows_and_cols_vert_2trace_staggered\"],[\"0603_max_rows_and_cols_horz_2trace_grid\"],[\"0603_max_rows_and_cols_horz_2trace_staggered\"],[\"1206x4\",\"1206x4_cols\",\"1206x4_rows\",\"orientation\"]]}calculateMax0603ConfigWithTraceChannels(t,e,n,o,i=\"grid\"){const r=this.traceWidth*o+2*this.obstacleMargin,s=n===\"horizontal\"?2.15:1,a=n===\"horizontal\"?1:2.15,A=n===\"horizontal\"?\"x\":\"y\",c=i===\"staggered\"\u0026\u0026A===\"x\"?s/2:i===\"staggered\"?a/2:0,l=Math.max(0,t-1),u=Math.max(0,e-1),g=Math.max(0,l-(i===\"staggered\"\u0026\u0026A===\"x\"?c:0)),h=Math.max(0,u-(i===\"staggered\"\u0026\u0026A===\"y\"?c:0)),d=s+r,p=a+r,m=Math.max(1,Math.floor(1+(g-s)/d)),_=Math.max(1,Math.floor(1+(h-a)/p));return n===\"vertical\"?{cols:m,rows:_}:{cols:_,rows:m}}initializeSolvers(){const t=this.getHyperParameterDefs(),e=this.getCombinationDefs();this.supervisedSolvers=[];for(const n of e){const o=n.some(s=\u003es.startsWith(\"0603_max_rows_and_cols_\")),i=n.includes(\"1206x4\");if(o\u0026\u0026!this.availableJumperTypes.includes(\"0603\")||i\u0026\u0026!this.availableJumperTypes.includes(\"1206x4\"))continue;const r=this.getHyperParameterCombinations(t.filter(s=\u003en.includes(s.name)));for(const s of r){const a=this.generateSolver(s),A=this.computeG(a);this.supervisedSolvers.push({hyperParameters:s,solver:a,h:0,g:A,f:A})}}}generateSolver(t){return new Cno({nodeWithPortPoints:this.nodeWithPortPoints,colorMap:this.colorMap,traceWidth:this.traceWidth,hyperParameters:{COLS:t.COLS,ROWS:t.ROWS,ORIENTATION:t.ORIENTATION,JUMPER_TYPE:t.JUMPER_TYPE,PATTERN:t.PATTERN,TRACE_CHANNELS_BETWEEN_JUMPERS:t.TRACE_CHANNELS_BETWEEN_JUMPERS},obstacleMargin:this.obstacleMargin})}computeG(t){const e=t.hyperParameters.COLS*t.hyperParameters.ROWS;return t.iterations/1e4+.25*e}computeH(t){return 1-(t.progress||0)}onSolve(t){this.solvedRoutes=t.solver.solvedRoutes,this.jumpers=t.solver.getOutputJumpers()}getOutput(){return this.solvedRoutes}getOutputJumpers(){return this.jumpers}visualize(){return this.winningSolver?this.winningSolver.visualize():super.visualize()}};function xno(t){return{connectionName:t.connectionName,rootConnectionName:t.rootConnectionName,regionId:t.regionId,traceThickness:t.traceThickness,viaDiameter:0,route:t.route,vias:[],jumpers:t.jumpers}}var Eno=class extends yr{getSolverName(){return\"JumperHighDensitySolver\"}allNodes;nodeAnalyses;routes;colorMap;traceWidth;obstacleMargin;viaDiameter;connMap;hyperParameters;availableJumperTypes;capacityMeshNodes;capacityMeshEdges;capacityMeshNodeMap;nodeAdjacencyMap;nodesWithoutCrossings;nodesWithCrossings;curvyIntraNodeSolvers;currentCurvySolverIndex;jumperSolvers;currentJumperSolverIndex;phase;jumpers=[];constructor({nodePortPoints:t,colorMap:e,traceWidth:n=.15,obstacleMargin:o=.15,viaDiameter:i=.3,connMap:r,hyperParameters:s,capacityMeshNodes:a=[],capacityMeshEdges:A=[],availableJumperTypes:c}){super(),this.allNodes=[...t],this.colorMap=e??{},this.routes=[],this.traceWidth=n,this.obstacleMargin=o,this.viaDiameter=i,this.connMap=r,this.hyperParameters=s,this.capacityMeshNodes=a,this.capacityMeshEdges=A,this.availableJumperTypes=c??[\"0603\"],this.capacityMeshNodeMap=new Map(a.map(g=\u003e[g.capacityMeshNodeId,g])),this.nodeAdjacencyMap=this._buildNodeAdjacencyMap(),this.nodesWithoutCrossings=[],this.nodesWithCrossings=[],this.nodeAnalyses=[],this.curvyIntraNodeSolvers=[],this.currentCurvySolverIndex=0,this.jumperSolvers=[],this.currentJumperSolverIndex=0,this.phase=\"analyzing\",this._analyzeNodes();const l=1e3*this.nodesWithoutCrossings.length,u=1e5*this.nodesWithCrossings.length;this.MAX_ITERATIONS=l+u+100}_buildNodeAdjacencyMap(){const t=new Map;for(const e of this.capacityMeshEdges){const[n,o]=e.nodeIds;t.has(n)||t.set(n,new Set),t.has(o)||t.set(o,new Set),t.get(n).add(o),t.get(o).add(n)}return t}_analyzeNodes(){for(const t of this.allNodes){const e=Wm(t),n={node:t,hasCrossings:e.numSameLayerCrossings\u003e0,numSameLayerCrossings:e.numSameLayerCrossings};this.nodeAnalyses.push(n),e.numSameLayerCrossings\u003e0?this.nodesWithCrossings.push(t):this.nodesWithoutCrossings.push(t)}this.nodesWithoutCrossings.length\u003e0?(this.phase=\"curvy\",this._initializeCurvySolvers()):this.nodesWithCrossings.length\u003e0?(this.phase=\"jumpers\",this._initializeJumperSolvers()):this.phase=\"done\"}_step(){switch(this.phase){case\"analyzing\":this.nodesWithoutCrossings.length\u003e0?(this.phase=\"curvy\",this._initializeCurvySolvers()):this.nodesWithCrossings.length\u003e0?(this.phase=\"jumpers\",this._initializeJumperSolvers()):this.phase=\"done\";break;case\"curvy\":this._stepCurvySolvers();break;case\"jumpers\":this._stepJumperSolvers();break;case\"done\":this.solved=!0}}_getAdjacentObstacles(t){const e=[],n=this.nodeAdjacencyMap.get(t.capacityMeshNodeId);if(!n||n.size===0)return e;const o=new Map(this.allNodes.map(i=\u003e[i.capacityMeshNodeId,i]));for(const i of n){const r=this.capacityMeshNodeMap.get(i);if(!r||!r._containsObstacle\u0026\u0026!r._containsTarget)continue;const s=r.center.x-r.width/2,a=r.center.y-r.height/2,A=r.center.x+r.width/2,c=r.center.y+r.height/2;let l;if(r._containsTarget)if(r._targetConnectionName)l=r._targetConnectionName;else{const u=o.get(i);u\u0026\u0026u.portPoints.length\u003e0\u0026\u0026(l=u.portPoints[0].rootConnectionName??u.portPoints[0].connectionName)}e.push({minX:s,minY:a,maxX:A,maxY:c,networkId:l})}return e}_initializeCurvySolvers(){for(const t of this.nodesWithoutCrossings){const e=this._getAdjacentObstacles(t),n=new x1t({nodeWithPortPoints:t,colorMap:this.colorMap,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter,adjacentObstacles:e});this.curvyIntraNodeSolvers.push(n)}}_stepCurvySolvers(){if(this.curvyIntraNodeSolvers.length===0)return this.phase=this.nodesWithCrossings.length\u003e0?\"jumpers\":\"done\",void(this.phase===\"jumpers\"\u0026\u0026this._initializeJumperSolvers());const t=this.curvyIntraNodeSolvers[this.currentCurvySolverIndex];if(this.activeSubSolver=t,!t)return this.phase=this.nodesWithCrossings.length\u003e0?\"jumpers\":\"done\",void(this.phase===\"jumpers\"\u0026\u0026this._initializeJumperSolvers());if(t.step(),t.solved){this.routes.push(...t.routes),this.currentCurvySolverIndex++;for(let e=this.currentCurvySolverIndex;e\u003cthis.curvyIntraNodeSolvers.length;e++){this.curvyIntraNodeSolvers[e];const n=this.nodesWithoutCrossings[e],o=this._getAdjacentObstacles(n),i=new x1t({nodeWithPortPoints:n,colorMap:this.colorMap,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter,adjacentObstacles:o});this.curvyIntraNodeSolvers[e]=i}this.currentCurvySolverIndex\u003e=this.curvyIntraNodeSolvers.length\u0026\u0026(this.phase=this.nodesWithCrossings.length\u003e0?\"jumpers\":\"done\",this.phase===\"jumpers\"\u0026\u0026this._initializeJumperSolvers())}else t.failed\u0026\u0026(this.error=`CurvyIntraNodeSolver failed for node: ${t.nodeWithPortPoints.capacityMeshNodeId}: ${t.error}`,this.failed=!0)}_initializeJumperSolvers(){for(const t of this.nodesWithCrossings){const e=new yno({nodeWithPortPoints:t,colorMap:this.colorMap,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,connMap:this.connMap,availableJumperTypes:this.availableJumperTypes});this.jumperSolvers.push(e)}}_stepJumperSolvers(){if(this.jumperSolvers.length===0)return this.phase=\"done\",void(this.solved=!0);const t=this.jumperSolvers[this.currentJumperSolverIndex];if(this.activeSubSolver=t,!t)return this.phase=\"done\",void(this.solved=!0);if(t.step(),t.solved){for(const e of t.solvedRoutes)this.routes.push(xno(e));this.jumpers.push(...t.getOutputJumpers()),this.currentJumperSolverIndex++,this.currentJumperSolverIndex\u003e=this.jumperSolvers.length\u0026\u0026(this.phase=\"done\",this.solved=!0)}else t.failed\u0026\u0026(this.error=`HyperJumperPrepatternSolver2 failed for node: ${t.nodeWithPortPoints.capacityMeshNodeId}: ${t.error}`,this.failed=!0)}computeProgress(){const t=this.allNodes.length;if(t===0)return 1;let e=0;e+=this.currentCurvySolverIndex;const n=this.curvyIntraNodeSolvers[this.currentCurvySolverIndex];n\u0026\u0026(e+=n.progress),e+=this.currentJumperSolverIndex;const o=this.jumperSolvers[this.currentJumperSolverIndex];return o\u0026\u0026(e+=o.progress),e/t}getConstructorParams(){return{nodePortPoints:this.allNodes,colorMap:this.colorMap,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,viaDiameter:this.viaDiameter,connMap:this.connMap,hyperParameters:this.hyperParameters,capacityMeshNodes:this.capacityMeshNodes,capacityMeshEdges:this.capacityMeshEdges,availableJumperTypes:this.availableJumperTypes}}getOutputJumpers(){return this.jumpers}visualize(){const t={lines:[],points:[],rects:[],circles:[]};if(this.failed\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();if(this.phase===\"curvy\"\u0026\u0026this.curvyIntraNodeSolvers[this.currentCurvySolverIndex])return this.curvyIntraNodeSolvers[this.currentCurvySolverIndex].visualize();if(this.phase===\"jumpers\"\u0026\u0026this.jumperSolvers[this.currentJumperSolverIndex])return this.jumperSolvers[this.currentJumperSolverIndex].visualize();for(const e of this.routes){const n=e.rootConnectionName??e.connectionName,o=Kse(e.route,e.connectionName,this.colorMap[n]);for(const i of o)t.lines.push({points:i.points,label:i.connectionName,strokeColor:i.z===0?i.color:Es(i.color??\"gray\",.75),layer:`z${i.z}`,strokeWidth:e.traceThickness,strokeDash:i.z!==0?\"10, 5\":void 0});for(const i of e.vias)t.circles.push({center:i,radius:e.viaDiameter/2,fill:Es(this.colorMap[n]??\"gray\",.5),layer:\"via\"});if(\"jumpers\"in e\u0026\u0026e.jumpers)for(const i of e.jumpers){const r=this.colorMap[n]??\"gray\",s=i.footprint??\"1206\",a=W8[s],A=i.end.x-i.start.x,c=i.end.y-i.start.y,l=Math.abs(A)\u003eMath.abs(c),u=l?a.padLength:a.padWidth,g=l?a.padWidth:a.padLength;t.rects.push({center:i.start,width:u,height:g,fill:Es(r,.5),stroke:\"rgba(0, 0, 0, 0.5)\",layer:\"jumper\"}),t.rects.push({center:i.end,width:u,height:g,fill:Es(r,.5),stroke:\"rgba(0, 0, 0, 0.5)\",layer:\"jumper\"}),t.lines.push({points:[i.start,i.end],strokeColor:\"rgba(100, 100, 100, 0.8)\",strokeWidth:.3*a.padWidth,layer:\"jumper-body\"})}}for(const e of this.nodeAnalyses){const n=e.node;n.center.x,n.width,n.center.x,n.width,n.center.y,n.height,n.center.y,n.height,t.rects.push({center:n.center,width:n.width,height:n.height,fill:e.hasCrossings?\"rgba(255, 200, 0, 0.1)\":\"rgba(0, 200, 0, 0.1)\",stroke:e.hasCrossings?\"rgba(255, 150, 0, 0.5)\":\"rgba(0, 150, 0, 0.5)\",label:[n.capacityMeshNodeId,e.hasCrossings?`crossings: ${e.numSameLayerCrossings}`:\"no crossings\"].join(`\n`)})}return t}};function q8(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var Bno=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e,this.srj=t,this.opts={...e},this.viaDiameter=om(t).padDiameter,this.minTraceWidth=t.minTraceWidth;const n=this.opts;if(this.effort=n.effort??1,this.MAX_ITERATIONS=1e8*this.effort,n.capacityDepth===void 0){const o=t.bounds.maxX-t.bounds.minX,i=t.bounds.maxY-t.bounds.minY,r=Math.max(o,i),s=n.targetMinCapacity??.5;n.capacityDepth=$Q(r,s)}this.connMap=Jm(t),this.colorMap=Jf(t,this.connMap),this.cacheProvider=n.cacheProvider===void 0?tB():n.cacheProvider===null?null:n.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return\"AssignableAutoroutingPipeline3\"}netToPointPairsSolver;traceKeepoutSolver;nodeSolver;nodeTargetMerger;edgeSolver;relateNodesToOffBoardConnections;colorMap;highDensityRouteSolver;simpleHighDensityRouteSolver;highDensitySolver;highDensityStitchSolver;singleLayerNodeMerger;offboardPathFragmentSolver;strawSolver;deadEndSolver;traceSimplificationSolver;traceWidthSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;viaDiameter;minTraceWidth;effort;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[q8(\"netToPointPairsSolver\",J7e,t=\u003e[t.srj,t.colorMap,JQ(t.srj)],{onSolved:t=\u003e{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,this.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),q8(\"nodeSolver\",qF,t=\u003e[{simpleRouteJson:t.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:t=\u003e{t.capacityNodes=t.nodeSolver?.getOutput().meshNodes??[]}}),q8(\"relateNodesToOffBoardConnections\",g1t,t=\u003e[{capacityMeshNodes:t.capacityNodes,srj:t.srj}],{onSolved:t=\u003e{t.capacityNodes=t.relateNodesToOffBoardConnections?.getOutput().capacityNodes}}),q8(\"edgeSolver\",WQ,t=\u003e[t.capacityNodes],{onSolved:t=\u003e{t.capacityEdges=t.edgeSolver?.edges}}),q8(\"availableSegmentPointSolver\",kD,t=\u003e[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!1}]),q8(\"portPointPathingSolver\",z7e,t=\u003e{const e=t.capacityNodes.map(i=\u003e({capacityMeshNodeId:i.capacityMeshNodeId,center:i.center,width:i.width,height:i.height,portPoints:[],availableZ:i.availableZ,_containsTarget:i._containsTarget,_containsObstacle:i._containsObstacle,_offBoardConnectionId:i._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:i._offBoardConnectedCapacityMeshNodeIds})),n=new Map(e.map(i=\u003e[i.capacityMeshNodeId,i])),o=t.availableSegmentPointSolver;for(const i of o.sharedEdgeSegments)for(const r of i.portPoints){const[s,a]=r.nodeIds,A={portPointId:r.segmentPortPointId,x:r.x,y:r.y,z:r.availableZ[0]??0,connectionNodeIds:[s,a],distToCentermostPortOnZ:r.distToCentermostPortOnZ,connectsToOffBoardNode:i.nodeIds.some(l=\u003en.get(l)?._offBoardConnectionId)},c=n.get(s);c\u0026\u0026c.portPoints.push(A)}return[{simpleRouteJson:t.srjWithPointPairs,inputNodes:e,capacityMeshNodes:t.capacityNodes,colorMap:t.colorMap,numShuffleSeeds:10*t.effort,hyperParameters:{JUMPER_PF_FN_ENABLED:!0,NODE_PF_FACTOR:100,MAX_RIPS:100*t.effort,RIPPING_ENABLED:!0,MAX_RIPPING_PF_THRESHOLD:.9,MIN_RIPPING_PF_THRESHOLD:.1,RANDOM_RIP_FRACTION:.05,NODE_PF_MAX_PENALTY:1e3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:0,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,FORCE_CENTER_FIRST:!0}}]},{onSolved:t=\u003e{const e=t.portPointPathingSolver;e\u0026\u0026d1t({connMap:t.connMap,connectionsWithResults:e.connectionsWithResults,inputNodes:e.inputNodes,obstacles:t.srj.obstacles})}}),q8(\"highDensitySolver\",Eno,t=\u003e[{nodePortPoints:t.multiSectionPortPointOptimizer?.getNodesWithPortPoints()??t.portPointPathingSolver?.getNodesWithPortPoints()??[],colorMap:t.colorMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,connMap:t.connMap,capacityMeshNodes:t.capacityNodes??[],capacityMeshEdges:t.capacityEdges??[],availableJumperTypes:t.srj.availableJumperTypes}]),q8(\"highDensityStitchSolver\",reo,t=\u003e[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensitySolver.routes,connectionPathResults:t.multiSectionPortPointOptimizer?.connectionResults??t.portPointPathingSolver?.connectionsWithResults??[],colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter}]),q8(\"traceKeepoutSolver\",u1t,t=\u003e[{hdRoutes:t.traceSimplificationSolver?.simplifiedHdRoutes??t.highDensityStitchSolver?.mergedHdRoutes??[],obstacles:t.srj.obstacles,jumpers:t.highDensitySolver?.getOutputJumpers()??[],connMap:t.connMap,colorMap:t.colorMap,srj:t.srj}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.netToPointPairsSolver?.visualize(),e=this.nodeSolver?.visualize(),n=this.nodeTargetMerger?.visualize(),o=this.singleLayerNodeMerger?.visualize(),i=this.strawSolver?.visualize(),r=this.edgeSolver?.visualize(),s=this.traceKeepoutSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.availableSegmentPointSolver?.visualize(),c=this.offboardPathFragmentSolver?.visualize(),l=this.portPointPathingSolver?.visualize(),u=this.multiSectionPortPointOptimizer?.visualize(),g=this.highDensityRouteSolver?.visualize(),h=this.highDensitySolver?.visualize(),d=this.simpleHighDensityRouteSolver?.visualize(),p=this.highDensityStitchSolver?.visualize(),m=this.traceSimplificationSolver?.visualize(),_=this.traceWidthSolver?.visualize(),f=this.srj.outline,I=[];if(I.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),f\u0026\u0026f.length\u003e=2){const E=f.map(B=\u003e({x:B.x,y:B.y}));E.push({...E[0]}),I.push({points:E,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const C=z8(this.srj),y={points:[...this.srj.connections.flatMap(E=\u003eE.pointsToConnect.map(B=\u003e({...B,layer:J8(B,this.srj.layerCount),label:`${E.name} ${B.pcb_port_id??\"\"}`})))],rects:[...(this.srj.obstacles??[]).filter(E=\u003e!E.isCopperPour).map(E=\u003e({...E,fill:E.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":E.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(E,this.srj.layerCount),label:C(E)}))],lines:I},x=[y,t,e,n,o,i,r,a,A,c,l,u,g?Il(y,g):null,h?Il(y,h):null,d?Il(y,d):null,p,m,s,_,this.solved?Il({lines:I},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...x)}preview(){const t=this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes;if(t){const e=[];for(let n=t.length-1;n\u003e=0;n--){const o=t[n];if(e.push({points:o.route.map(i=\u003e({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length\u003e200)break}return{lines:e}}if(this.portPointPathingSolver){const e=[];for(const n of this.portPointPathingSolver.connectionsWithResults)n.path\u0026\u0026e.push({points:n.path.map(o=\u003e({x:o.point.x,y:o.point.y})),strokeColor:this.colorMap[n.connection.name]});return{lines:e}}return this.netToPointPairsSolver?this.netToPointPairsSolver?.visualize():{}}_getOutputHdRoutes(){return this.traceWidthSolver?.hdRoutesWithWidths??this.traceKeepoutSolver?.redrawnHdRoutes??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver?.mergedHdRoutes??this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes}getConnectedOffboardObstacles(){const t={},e=new Set(this.srj.connections.flatMap(n=\u003en.__rootConnectionNames??[n.name]));for(const[n,o]of this.srj.obstacles.entries()){if(!o.offBoardConnectsTo?.length)continue;const i=o.obstacleId??`__obs${n}`;o.obstacleId=i;const r=this.connMap.getNetConnectedToId(i);if(!r)continue;const s=this.connMap.getIdsConnectedToNet(r).find(a=\u003ee.has(a));s\u0026\u0026(t[i]=s)}return t}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver\u0026\u0026!this.simpleHighDensityRouteSolver\u0026\u0026!this.highDensitySolver)throw new Error(\"Cannot get output before solving is complete\");const t=[],e=this._getOutputHdRoutes();for(const n of this.netToPointPairsSolver?.newConnections??[]){const o=n.__netConnectionName??this.srj.connections.find(r=\u003er.name===n.name)?.__netConnectionName,i=e.filter(r=\u003er.connectionName===n.name);for(let r=0;r\u003ci.length;r++){const s=i[r],a={type:\"pcb_trace\",pcb_trace_id:`${n.name}_${r}`,connection_name:o??n.__rootConnectionNames?.[0]??n.name,route:nB(s,this.srj.layerCount)};t.push(a)}}return t}getOutputJumpers(){return this.highDensitySolver?this.highDensitySolver.getOutputJumpers():[]}getOutputSimpleRouteJson(){const t=this.getOutputJumpers();return{...this.srj,traces:this.getOutputSimplifiedPcbTraces(),jumpers:t.length\u003e0?t:void 0}}},XIt=t=\u003e{const{candidates:e,mapOfCapacityMeshNodeIdToRef:n}=t;let o=!0;for(const i of e){let r=!1;i.port.nodeIds.forEach(s=\u003e{const a=n.get(s);if(!a)throw new Error(`Could not find capacity mesh node for id ${s}`);a._containsObstacle\u0026\u0026(r=!0)}),r||(o=!1)}return o},ZIt=t=\u003et.depth+1e3*t.countOfCrampedPortPointsInPath,eCt=class extends zA{constructor(t){if(super(),this.input=t,this.input.depthLimit\u003c1)throw new Error(\"Depth limit must be at least 1\");this._setup()}input;queue=[];resultExploredPortPoints=[];currentExploredPortPoints=null;visitedExploredPortPoints=new Map;getSolverName(){return\"singleTargetNecessaryCrampedPortPointSolver\"}_setup(){const t=this.input.mapOfCapacityMeshNodeIdToSegmentPortPoints.get(this.input.target.capacityMeshNodeId)??[];for(const e of t){if(this.input.shouldIgnoreCrampedPortPoints\u0026\u0026e.cramped)continue;const n={port:e,depth:1,parent:null,countOfCrampedPortPointsInPath:e.cramped?1:0},o=this.visitedExploredPortPoints.get(e);(!o||this.getCandidateCost(n)\u003cthis.getCandidateCost(o))\u0026\u0026(this.visitedExploredPortPoints.set(e,n),this.queue.push(n))}}_step(){if(this.queue.length===0)return this.currentExploredPortPoints=null,void(this.solved=!0);for(;this.queue.length\u003e0;){if(this.currentExploredPortPoints=this.queue.shift(),this.visitedExploredPortPoints.get(this.currentExploredPortPoints.port)!==this.currentExploredPortPoints)continue;if(this.currentExploredPortPoints.depth===this.input.depthLimit){this.resultExploredPortPoints.push(this.currentExploredPortPoints);continue}const t=this.currentExploredPortPoints.port.nodeIds.map(e=\u003e{const n=this.input.mapOfCapacityMeshNodeIdToRef.get(e);if(!n)throw new Error(`Could not find capacity mesh node for id ${e}`);return n}).flatMap(e=\u003ethis.input.mapOfCapacityMeshNodeIdToSegmentPortPoints.get(e.capacityMeshNodeId)??[]);for(const e of t){if(this.input.shouldIgnoreCrampedPortPoints\u0026\u0026e.cramped)continue;const n={port:e,depth:this.currentExploredPortPoints.depth+1,parent:this.currentExploredPortPoints,countOfCrampedPortPointsInPath:this.currentExploredPortPoints.countOfCrampedPortPointsInPath+(e.cramped?1:0)},o=this.visitedExploredPortPoints.get(e);o\u0026\u0026this.getCandidateCost(o)\u003c=this.getCandidateCost(n)||(this.visitedExploredPortPoints.set(e,n),this.queue.push(n))}}this.solved=!0}getCandidateCost(t){return t.depth+1e3*t.countOfCrampedPortPointsInPath}getOutput(){return this.resultExploredPortPoints}visualize(){const t={points:[],rects:[]};for(const e of this.visitedExploredPortPoints.keys())t.points.push({...e,color:e.cramped?\"blue\":\"green\"});return t}},lJ=class extends zA{constructor(t){super(),this.input=t,this._setup()}input;unprocessedTargets=[];targetNode=[];currentTarget;crampedPortPointsToKeep=new Set;candidatesAtDepth=[];isRunningCrampedPass=!1;filteredOutput;activeSubSolver=null;nodeMap=new Map;mapOfCapacityMeshNodeIdToSegmentPortPoints=new Map;getSolverName(){return\"multiTargetNecessaryCrampedPortPointSolver\"}_setup(){this.targetNode=this.input.capacityMeshNodes.filter(t=\u003et._containsObstacle),this.targetNode=this.targetNode.filter(t=\u003e{for(const e of this.input.simpleRouteJson.connections)for(const n of e.pointsToConnect)if(o7(n,t)\u003c=0)return!0;return!1}),this.unprocessedTargets=[...this.targetNode],this.unprocessedTargets.sort((t,e)=\u003et.center.x-e.center.x);for(const t of this.input.capacityMeshNodes)this.nodeMap.set(t.capacityMeshNodeId,t);for(const t of this.input.sharedEdgeSegments)for(const e of t.portPoints){const n=e.nodeIds;for(const o of n){if(!this.nodeMap.get(o))throw new Error(`Could not find capacity mesh node for id ${o}`);const i=this.mapOfCapacityMeshNodeIdToSegmentPortPoints.get(o)||[];this.mapOfCapacityMeshNodeIdToSegmentPortPoints.set(o,[...i,e])}}}_step(){if(this.activeSubSolver){if(this.activeSubSolver._step(),!this.activeSubSolver.solved)return;if(this.activeSubSolver.failed)return this.failed=!0,void(this.error=this.activeSubSolver.error);if(this.candidatesAtDepth=this.activeSubSolver.getOutput(),this.activeSubSolver=null,!this.currentTarget)return this.failed=!0,void(this.error=\"Missing current capacity mesh node while finishing BFS\");if(!this.isRunningCrampedPass)return XIt({candidates:this.candidatesAtDepth,mapOfCapacityMeshNodeIdToRef:this.nodeMap})||this.candidatesAtDepth.length===0?(this.isRunningCrampedPass=!0,void(this.activeSubSolver=new eCt({target:this.currentTarget,depthLimit:3,shouldIgnoreCrampedPortPoints:!1,mapOfCapacityMeshNodeIdToSegmentPortPoints:this.mapOfCapacityMeshNodeIdToSegmentPortPoints,mapOfCapacityMeshNodeIdToRef:this.nodeMap}))):void(this.currentTarget=void 0);let t=this.candidatesAtDepth.filter(e=\u003e{const n=e.port;return n.nodeIds.map(o=\u003e{const i=this.nodeMap.get(o);if(!i)throw this.failed=!0,this.error=`Could not find capacity mesh node for id ${o}`,new Error(`Could not find capacity mesh node for id ${o}`);return i}).every(o=\u003e!o._containsObstacle)\u0026\u0026n.cramped});if(XIt({candidates:t,mapOfCapacityMeshNodeIdToRef:this.nodeMap})\u0026\u0026(this.error=`All candidates are blocked by obstacles even after including cramped port points for capacity mesh node ${this.currentTarget.capacityMeshNodeId}`),this.candidatesAtDepth=[...t].sort((e,n)=\u003e{const o=ZIt(e)-ZIt(n);return o!==0?o:this.getCandidateExitCapacity(n)-this.getCandidateExitCapacity(e)}),this.candidatesAtDepth.length===0)this.error=`No candidates found for capacity mesh node ${this.currentTarget.capacityMeshNodeId} even after including cramped port points`;else{const e=new Map;for(const o of this.candidatesAtDepth){if(!o.parent)throw new Error(`Missing parent for cramped escape candidate ${o.port.segmentPortPointId}`);const i=`${o.parent.port.segmentPortPointId}-\u003e${o.port.segmentPortPointId}`;if(!e.has(i)\u0026\u0026(e.set(i,o),e.size===5))break}const n=[...e.values()];for(const o of n)this.keepCandidatePath(o)}return this.isRunningCrampedPass=!1,void(this.currentTarget=void 0)}if(!this.currentTarget)return this.currentTarget=this.unprocessedTargets.shift(),this.currentTarget?(this.isRunningCrampedPass=!1,this.candidatesAtDepth=[],void(this.activeSubSolver=new eCt({target:this.currentTarget,depthLimit:2,shouldIgnoreCrampedPortPoints:!0,mapOfCapacityMeshNodeIdToSegmentPortPoints:this.mapOfCapacityMeshNodeIdToSegmentPortPoints,mapOfCapacityMeshNodeIdToRef:this.nodeMap}))):void(this.solved=!0)}getOutput(){return this.filteredOutput||(this.filteredOutput=this.input.sharedEdgeSegments.map(t=\u003e({...t,portPoints:t.portPoints.flatMap(e=\u003e!e.cramped||this.crampedPortPointsToKeep.has(e)?[e]:this.isMultilayerEscapePort(e)?[{...e,tinyHypergraphPortPenalty:1e3}]:[])}))),this.filteredOutput}getCandidateExitCapacity(t){if(!t.parent)throw new Error(`Missing parent for cramped escape candidate ${t.port.segmentPortPointId}`);const e=new Set(t.parent.port.nodeIds),n=t.port.nodeIds.filter(o=\u003e!e.has(o)).map(o=\u003e{const i=this.nodeMap.get(o);if(!i)throw new Error(`Could not find capacity mesh node for id ${o}`);return i});if(n.length===0)throw new Error(`Could not find exit node for cramped escape candidate ${t.port.segmentPortPointId}`);return Math.max(0,...n.map(o=\u003eo.width*o.height*o.availableZ.length))}keepCandidatePath(t){this.crampedPortPointsToKeep.add(t.port);let e=t.parent;for(;e;)this.crampedPortPointsToKeep.add(e.port),e=e.parent}isMultilayerEscapePort(t){return t.nodeIds.some(e=\u003e(this.nodeMap.get(e)?.availableZ.length??0)\u003e1)}visualize(){const t={rects:[],points:[]};for(const e of this.targetNode)t.rects.push({...e,fill:this.currentTarget?.capacityMeshNodeId===e.capacityMeshNodeId?\"rgba(255, 0, 0, 0.5)\":\"rgba(255, 0, 0, 0.2)\"});for(const e of this.candidatesAtDepth)t.points.push({...e.port,color:e.port.cramped?\"blue\":\"green\"});for(const e of this.crampedPortPointsToKeep)t.points.push({...e,color:\"blue\"});return this.activeSubSolver?MD(t,this.activeSubSolver.visualize()):t}},IL=t=\u003e`${t.x.toFixed(4)},${t.y.toFixed(4)}`,tCt=t=\u003et.netIsAssignable===!0\u0026\u0026(t.layers?.length??0)\u003e1,bno=(t,e)=\u003et.connectedTo?.find(n=\u003en.startsWith(\"pcb_via\"))??t.obstacleId??`assignable_via_${e}`,Sno=t=\u003e[...new Set(t.obstacle.layers.map(e=\u003eKr(e,t.layerCount)))].sort((e,n)=\u003ee-n),Qno=t=\u003eIL(t.center),nCt=t=\u003enew Set(t.filter(tCt).map(Qno));function k5(t,e){if(t==null)throw new Error(e)}function z6e(t,e){const n=[];for(const o of t)e.includes(o)\u0026\u0026n.push(o);return n}function oCt(t){return o7(t.point,t.region.d)\u003c=.001\u0026\u0026z6e((\"layers\"in t.point?t.point.layers:[t.point.layer]).map(e=\u003eKr(e,t.layerCount)),t.region.d.availableZ).length\u003e0}function iCt({graph:t,point:e,layerCount:n}){const o=t.regions.filter(r=\u003eoCt({point:e,region:r,layerCount:n})),i=(function({point:r,layerCount:s}){const a=(\"layers\"in r?r.layers:[r.layer]).map(A=\u003eKr(A,s));return[...new Set(a)]})({point:e,layerCount:n});return o.find(r=\u003e(function({region:s,pointZLayers:a}){return s.ports.some(A=\u003ea.includes(A.d.z)\u0026\u0026z6e(a,A.region1.d.availableZ).length\u003e0\u0026\u0026z6e(a,A.region2.d.availableZ).length\u003e0)})({region:r,pointZLayers:i}))??o[0]}var rCt=(t,e)=\u003e{const n=t.getNetConnectedToId(e);if(!n)throw new Error(`Could not resolve net ID for connection \"${e}\"`);return n},vno=t=\u003e{const e=t.graph.regions.filter(i=\u003ei.d.availableZ.includes(t.z)\u0026\u0026!i.d._assignableVia).map(i=\u003e({region:i,distance:o7(t.point,i.d)})).sort((i,r)=\u003ei.distance-r.distance||i.region.d.width*i.region.d.height-r.region.d.width*r.region.d.height),n=e[0]?.distance;if(n===void 0)return[];const o=Math.max(n+1e-6,t.viaRadius+.15);return e.filter(i=\u003ei.distance\u003c=o).slice(0,4).map(i=\u003ei.region)};function uJ(t){const e={ports:[],regions:[]},n=[];for(const o of t.capacityMeshNodes){const i=o._connectedTo?.map(r=\u003erCt(t.connectivityMap,r));e.regions.push({regionId:o.capacityMeshNodeId,d:i?{...o,_connectedTo:[...new Set(i)]}:o,ports:[]})}for(const o of t.segmentPortPoints){const[i,r]=o.nodeIds,s=e.regions.find(A=\u003eA.regionId===i),a=e.regions.find(A=\u003eA.regionId===r);k5(s,`Could not find region with id ${i} for segment port point ${o.segmentPortPointId}`),k5(a,`Could not find region with id ${r} for segment port point ${o.segmentPortPointId}`);for(const A of o.availableZ){const c=o._preloadedTracePortAssignments?.filter(g=\u003eg.z===A),l={portId:`${o.segmentPortPointId}::${A}`,x:o.x,y:o.y,z:A,distToCentermostPortOnZ:o.distToCentermostPortOnZ,cramped:o.cramped,regions:[s,a],tinyHypergraphPortPenalty:o.tinyHypergraphPortPenalty,_preloadedFixedNetIds:c\u0026\u0026c.length\u003e0?[...new Set(c.map(g=\u003eg.fixedNetId))].sort():void 0,_preloadedTracePortAssignments:c},u={portId:o.segmentPortPointId,d:l,region1:s,region2:a};e.ports.push(u),s.ports.push(u),a.ports.push(u)}}(o=\u003e{for(const[i,r]of o.assignableViaObstacles.entries()){if(!tCt(r))continue;const s=Sno({obstacle:r,layerCount:o.layerCount});if(s.length\u003c2)continue;const a=`assignable-via:${bno(r,i)}`,A=Math.min(r.width,r.height)/2,c={regionId:a,d:{capacityMeshNodeId:a,center:{...r.center},width:r.width,height:r.height,layer:`z${s.join(\",\")}`,availableZ:s,_containsObstacle:!1,_completelyInsideObstacle:!1,_containsTarget:!1,_assignableVia:!0,_assignedViaObstacle:r},ports:[]},l=[];for(const u of s)for(const g of vno({graph:o.graph,point:r.center,z:u,viaRadius:A})){const h={portId:`${a}:port:${g.regionId}:z${u}`,x:r.center.x,y:r.center.y,z:u,distToCentermostPortOnZ:0,cramped:!1,regions:[g,c]},d={portId:h.portId,d:h,region1:g,region2:c};l.push(d),g.ports.push(d)}if(new Set(l.map(u=\u003eu.d.z)).size\u003c2)for(const u of l)u.region1.ports=u.region1.ports.filter(g=\u003eg!==u);else c.ports.push(...l),o.graph.regions.push(c),o.graph.ports.push(...l)}})({graph:e,assignableViaObstacles:t.assignableViaObstacles??[],layerCount:t.layerCount});for(const o of t.simpleRouteJsonConnections){const[i,r]=o.pointsToConnect,s=iCt({graph:e,point:i,layerCount:t.layerCount}),a=iCt({graph:e,point:r,layerCount:t.layerCount});k5(s,`Could not find start region for connection \"${o.name}\"`),k5(a,`Could not find end region for connection \"${o.name}\"`),n.push({connectionId:o.name,mutuallyConnectedNetworkId:rCt(t.connectivityMap,o.name),startRegion:s,endRegion:a,simpleRouteConnection:o})}return{graph:e,connections:n}}function wno(t,e){const n={lines:[],points:[]};if(!t)return n;let o=t.shift();if(!o)return n;const i=[];n.points.push({...o.port.d,color:\"rgb(255, 50, 50)\",label:`g: ${o.g}\nh: ${o.h}\nf: ${o.f}\nripRequired: ${o.ripRequired}`});do i.push({x:o.port.d.x,y:o.port.d.y,z:o.port.d.z}),o=o.parent;while(o);i.reverse();const r=i[0]?.z??0;i.unshift({x:e.x,y:e.y,z:r});for(let s=0;s\u003ci.length-1;s++){const a=i[s],A=i[s+1];let c;c=a.z===A.z?a.z===0?void 0:\"10 5\":\"3 3 10\",n.lines.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:\"rgba(255, 250, 50, 1)\",strokeWidth:.01,strokeDash:c})}for(const s of t)n.points.push({...s.port.d,color:\"rgb(0, 64, 255)\",label:`${s.port.portId}\ng: ${s.g}\nh: ${s.h}\nf: ${s.f}\nripRequired: ${s.ripRequired}`});return n}function Pno(t,e){const n={lines:[],points:[]};for(const o of t){const i=e[o.connection.connectionId]??\"rgba(255, 50, 50, 1)\",r=[{x:o.connection.startRegion.d.center.x,y:o.connection.startRegion.d.center.y,z:o.connection.startRegion.d?.availableZ?.[0]??0}];for(const s of o.path)r.push({x:s.port.d.x,y:s.port.d.y,z:s.port.d.z});r.push({x:o.connection.endRegion.d.center.x,y:o.connection.endRegion.d.center.y,z:o.connection.endRegion.d?.availableZ?.[0]??0});for(let s=0;s\u003cr.length-1;s++){const a=r[s],A=r[s+1];let c;c=a.z===A.z?a.z===0?void 0:\"10 5\":\"3 3 10\";const l={points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:i,strokeWidth:.01,strokeDash:c};n.lines.push(l)}}return n}function Mno(t,e){const n={lines:[],points:[]};for(const o of t){const i=o.startRegion.d.center,r=o.endRegion.d.center,s=(i.x+r.x)/2,a=(i.y+r.y)/2,A=e[o.connectionId]??\"rgba(255, 50, 150, 0.8)\";n.points.push({x:s,y:a,color:A,label:o.connectionId}),n.lines.push({points:[i,r],strokeColor:A,strokeWidth:.1,strokeDash:(o.startRegion.d?.availableZ?.[0]??0)===0?void 0:\"10 5\"})}return n}function Dno(t){const e={rects:[],points:[]};for(const n of t.regions)e.rects.push({center:n.d.center,width:n.d.width,height:n.d.height,fill:\"rgba(200, 200, 200, 0.5)\",label:n.regionId});for(const n of t.ports)e.points.push({x:n.d.x,y:n.d.y,color:\"rgba(4, 90, 20, 0.3)\",label:n.portId});return e}var sCt=class extends D1t{constructor(e){super({inputConnections:e.connections,inputGraph:e.graph,inputSolvedRoutes:e.inputSolvedRoutes,greedyMultiplier:e.weights.GREEDY_MULTIPLIER,ripCost:e.weights.RIPPING_PF_COST,rippingEnabled:e.flags.RIPPING_ENABLED}),this.params=e,this.regionMemoryPfMap=e.opts?.regionMemoryPfMap??new Map,this.baseRegionFailureCostMap=new Map,this.regionRipCountMap=new Map,this.totalRipCount=0,e.weights.MAX_ITERATIONS_PER_PATH\u003e0\u0026\u0026(this.MAX_ITERATIONS=e.weights.MAX_ITERATIONS_PER_PATH*e.effort)}params;regionMemoryPfMap;baseRegionFailureCostMap;regionRipCountMap;totalRipCount;estimateCostToEnd(e){const n=this.currentEndRegion;return k5(n,\"Current end region is undefined\"),no(e.d,n.d.center)}computeH(e){const n=e,o=this.computeDistanceTraveled(n);if(this.params.weights.RANDOM_WALK_DISTANCE\u003e0\u0026\u0026o\u003cthis.params.weights.RANDOM_WALK_DISTANCE)return 0;const i=this.estimateCostToEnd(e.port),r=(e.port.d.distToCentermostPortOnZ-this.params.weights.CENTER_OFFSET_FOCUS_SHIFT)*this.params.weights.CENTER_OFFSET_DIST_PENALTY_FACTOR,s=e.nextRegion?.regionId??e.lastRegion?.regionId,a=s?this.regionMemoryPfMap.get(s)??0:0;return i+r+this.computeMemoryPfPenalty(a)+this.computeDeviation(e)*this.params.weights.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR}computeIncreasedRegionCostIfPortsAreUsed(e,n,o){const i=this.currentConnection;k5(i,\"Current connection is undefined\");const r=this.getBaseRegionFailureCost(e),s=this.computeRegionPfWithAdditionalSegment(e,n,o,i.connectionId,i.mutuallyConnectedNetworkId);if(s\u003e=this.NODE_MAX_PF)return this.params.weights.NODE_PF_MAX_PENALTY;const a=this.pfToFailureCost(s),A=Math.max(0,a-r);return Math.min(this.params.weights.NODE_PF_MAX_PENALTY,A*this.params.weights.NODE_PF_FACTOR)}computeG(e){const n=e;let o=super.computeG(e);return n.lastPort\u0026\u0026n.lastPort.d.z!==n.port.d.z\u0026\u0026(o+=this.params.weights.LAYER_CHANGE_COST),n.nextRegion!==this.currentEndRegion?o:o+this.computeEndRegionCloseCost(n)}getPortUsagePenalty(e){const n=e.assignment;if(!n)return 0;const o=this.currentConnection?.mutuallyConnectedNetworkId;return n.connection.mutuallyConnectedNetworkId===o?0:.5*Math.max(1,this.params.weights.NODE_PF_FACTOR)+this.params.weights.BASE_CANDIDATE_COST}getRipsRequiredForPortUsage(e,n,o){const i=e.assignments??[];return i.length===0?[]:i.filter(r=\u003er.connection.mutuallyConnectedNetworkId!==this.currentConnection?.mutuallyConnectedNetworkId\u0026\u0026r.regionPort1!==n\u0026\u0026r.regionPort2!==n\u0026\u0026r.regionPort1!==o\u0026\u0026r.regionPort2!==o\u0026\u0026Uh(r.regionPort1.d,r.regionPort2.d,n.d,o.d))}selectCandidatesForEnteringRegion(e){const n=this.currentConnection?.startRegion,o=this.currentConnection?.endRegion;k5(n,\"Current connection or start region is undefined\"),k5(o,\"Current connection or end region is undefined\");const i=e.filter(a=\u003e{const A=a.nextRegion;return!A?.d._containsObstacle||A===n||A===o});let r=this.params.flags.FORCE_CENTER_FIRST?this.getCenterFirstEnteringRegionCandidates(i):i;const s=-this.params.weights.MIN_ALLOWED_BOARD_SCORE;if(s\u003e0){const a=r.filter(A=\u003eA.g+A.h\u003c=s);a.length\u003e0\u0026\u0026(r=a)}return r}routeSolvedHook(e){this.baseRegionFailureCostMap.clear();const n=new Set;for(const r of e.path){const s=r.lastRegion;s\u0026\u0026n.add(s)}for(const r of n){const s=this.computeRegionPfFromAssignments(r);this.regionMemoryPfMap.set(r.regionId,s)}if(!e.requiredRip||this.unprocessedConnections.length\u003c2)return;const[o,...i]=this.unprocessedConnections;this.unprocessedConnections=[...i,o]}computeRoutesToRip(e){const n=super.computePortOverlapRoutes(e),o=new Set(n),i=new Map;e.path.map(c=\u003e{if(!c.lastPort||!c.lastRegion)return;const l=this.getRipsRequiredForPortUsage(c.lastRegion,c.lastPort,c.port);if(l.length===0)return null;const u=i.get(c.lastRegion)??new Set;for(const g of l)u.add(g.solvedRoute);i.set(c.lastRegion,u)});const r=e.path.flatMap(c=\u003ec.lastRegion?[c.lastRegion]:[]),s=Array.from(new Set([...i.keys(),...r])),a=this.params.weights.SHUFFLE_SEED+this.iterations+this.solvedRoutes.length+this.totalRipCount,A=D5(s,a);for(const c of A){if(this.totalRipCount\u003e=this.params.weights.MAX_RIPS)break;const l=this.getRegionRippingPfThreshold(c.regionId);let u=this.computeRegionPf({region:c,newlySolvedRoute:e,routesToRip:o});if(this.regionMemoryPfMap.set(c.regionId,u),u\u003c=l)continue;const g=new Set;let h=0;for(;u\u003el\u0026\u0026!(this.totalRipCount\u003e=this.params.weights.MAX_RIPS);){if(!c.assignments||c.assignments.length===0)throw new Error(\"We are trying to rip a region with no assignments, this should not happen\");const d=c.assignments.map(m=\u003e{const _=m.solvedRoute;return m.connection.connectionId===e.connection.connectionId?null:o.has(_)?void 0:_}).filter(m=\u003e!!m);if(d.length===0)break;const p=D5(d,a+h+g.size)[0];if(!p)break;g.add(p.connection),o.add(p),this.totalRipCount++,h++,this.regionRipCountMap.set(c.regionId,(this.regionRipCountMap.get(c.regionId)??0)+1),u=this.computeRegionPf({region:c,newlySolvedRoute:e,routesToRip:o}),this.regionMemoryPfMap.set(c.regionId,u)}}if(o.size\u003en.size){if(this.totalRipCount\u003e=this.params.weights.MAX_RIPS)return o;const c=this.solvedRoutes.filter(h=\u003e!o.has(h)\u0026\u0026h.connection.connectionId!==e.connection.connectionId);if(c.length===0)return o;const l=Math.max(1,Math.floor(this.params.weights.RANDOM_RIP_FRACTION*c.length)),u=D5(c,a);let g=0;for(const h of u){if(g\u003e=l||this.totalRipCount\u003e=this.params.weights.MAX_RIPS)break;o.has(h)||(o.add(h),g++,this.totalRipCount++)}}return o}computeDeviation(e){const n=this.currentConnection?.startRegion.d.center,o=this.currentConnection?.endRegion.d.center;return k5(n,\"Current connection or start region is undefined\"),k5(o,\"Current connection or end region is undefined\"),wc(e.port.d,n,o)}computeDistanceTraveled(e){let n=0,o=e;for(;o?.parent;)n+=no(o.parent.port.d,o.port.d),o=o.parent;return n}computeMemoryPfPenalty(e){const n=Math.min(Math.max(e,0),.999999),o=Math.min(this.params.weights.NODE_PF_MAX_PENALTY,-Math.log(1-n));return o*this.params.weights.MEMORY_PF_FACTOR+o*this.params.weights.NODE_PF_FACTOR*.01}computeEndRegionCloseCost(e){const n=this.currentConnection,o=this.currentEndRegion;k5(n,\"Current connection is undefined\"),k5(o,\"Current end region is undefined\");const i=n.endRegion.d.center,r={portId:`end-target:${n.connectionId}`,region1:o,region2:o,d:{portId:`end-target:${n.connectionId}`,x:i.x,y:i.y,z:e.port.d.z,distToCentermostPortOnZ:0,regions:[o,o]}};return this.computeIncreasedRegionCostIfPortsAreUsed(o,e.port,r)}getCenterFirstEnteringRegionCandidates(e){const n=new Map;for(const i of e){const r=i.port.d.z,s=n.get(r)??[];s.push(i),n.set(r,s)}const o=[];for(const i of n.values()){const r=i.sort((c,l)=\u003ec.port.d.distToCentermostPortOnZ-l.port.d.distToCentermostPortOnZ)[0];if(!r)continue;if(this.isPortAvailableForCurrentNet(r.port)){o.push(r);continue}const s=i.sort((c,l)=\u003ec.port.d.x!==l.port.d.x?c.port.d.x-l.port.d.x:c.port.d.y-l.port.d.y),a=[];let A=[];for(const c of s)this.isPortAvailableForCurrentNet(c.port)?A.push(c):A.length\u003e0\u0026\u0026(a.push(A),A=[]);A.length\u003e0\u0026\u0026a.push(A);for(const c of a)o.push(c[Math.floor(c.length/2)])}return o}isPortAvailableForCurrentNet(e){const n=e.assignment;if(!n)return!0;const o=this.currentConnection?.mutuallyConnectedNetworkId;return n.connection.mutuallyConnectedNetworkId===o}computeRegionPfFromAssignments(e){const n=this.getRegionAssignedPortPoints(e),o={...e.d,portPoints:n},i=Wm(o),r=e.d;return wy(r,i.numSameLayerCrossings,i.numEntryExitLayerChanges,i.numTransitionPairCrossings)}clampPf(e){return Math.min(Math.max(e,0),.999999)}get NODE_MAX_PF(){return Math.min(.99999,1-Math.exp(-this.params.weights.NODE_PF_MAX_PENALTY))}pfToFailureCost(e){const n=this.clampPf(e);return n\u003e=this.NODE_MAX_PF?this.params.weights.NODE_PF_MAX_PENALTY:-Math.log(1-n)}getBaseRegionFailureCost(e){const n=this.baseRegionFailureCostMap.get(e.regionId);if(n!=null)return n;const o=this.computeRegionPfFromAssignments(e),i=this.pfToFailureCost(o);return this.baseRegionFailureCostMap.set(e.regionId,i),i}getRegionAssignedPortPoints(e){return(e.assignments??[]).flatMap(n=\u003e{const o=n.regionPort1.d,i=n.regionPort2.d,r=n.connection.connectionId,s=n.connection.simpleRouteConnection?.__rootConnectionNames?.[0];return[{x:o.x,y:o.y,z:o.z,connectionName:r,rootConnectionName:s},{x:i.x,y:i.y,z:i.z,connectionName:r,rootConnectionName:s}]})}computeRegionPfWithAdditionalSegment(e,n,o,i,r){const s=this.getRegionAssignedPortPoints(e),a=[{x:n.d.x,y:n.d.y,z:n.d.z,connectionName:i,rootConnectionName:r},{x:o.d.x,y:o.d.y,z:o.d.z,connectionName:i,rootConnectionName:r}],A={...e.d,portPoints:[...s,...a]},c=Wm(A);return wy(e.d,c.numSameLayerCrossings,c.numEntryExitLayerChanges,c.numTransitionPairCrossings)}getRegionRippingPfThreshold(e){const n=this.regionRipCountMap.get(e)??0,o=Math.max(1,Math.floor(this.params.weights.MAX_RIPS/10)),i=Math.min(1,n/o);return(this.params.weights.START_RIPPING_PF_THRESHOLD||.3)*(1-i)+(this.params.weights.END_RIPPING_PF_THRESHOLD||1)*i}computeRegionPf({region:e,newlySolvedRoute:n,routesToRip:o}){const i=[...(e.assignments??[]).filter(A=\u003e!o.has(A.solvedRoute)).flatMap(A=\u003e{const c=A.regionPort1,l=A.regionPort2,u=A.connection.connectionId,g=A.connection.simpleRouteConnection?.__rootConnectionNames?.[0];return[{x:c.d.x,y:c.d.y,z:c.d.z,connectionName:u,rootConnectionName:g},{x:l.d.x,y:l.d.y,z:l.d.z,connectionName:u,rootConnectionName:g}]}),...n.path.flatMap(A=\u003e{if(!A.lastPort||A.lastRegion!==e)return[];const c=A.lastPort,l=A.port;return[{x:c.d.x,y:c.d.y,z:c.d.z,connectionName:n.connection.connectionId,rootConnectionName:n.connection.simpleRouteConnection?.__rootConnectionNames?.[0]},{x:l.d.x,y:l.d.y,z:l.d.z,connectionName:n.connection.connectionId,rootConnectionName:n.connection.simpleRouteConnection?.__rootConnectionNames?.[0]}]})],r={capacityMeshNodeId:e.d.capacityMeshNodeId,center:e.d.center,width:e.d.width,height:e.d.height,portPoints:i,availableZ:e.d.availableZ},s=Wm(r),a=e.d;return wy(a,s.numSameLayerCrossings,s.numEntryExitLayerChanges,s.numTransitionPairCrossings)}computeNodePf(e){const n=this.getOutput().nodesWithPortPoints.find(r=\u003er.capacityMeshNodeId===e.capacityMeshNodeId),o=this.params.graph.regions.find(r=\u003er.d.capacityMeshNodeId===e.capacityMeshNodeId);if(!n||!o)return null;const i=Wm(n);return wy(o.d,i.numSameLayerCrossings,i.numEntryExitLayerChanges,i.numTransitionPairCrossings)}getOutput(){new Map(this.params.graph.regions.map(r=\u003e[r.regionId,r]));const e=new Set;for(const r of this.params.connections)e.add(r.startRegion.regionId),e.add(r.endRegion.regionId);const n=new Map;for(const r of this.solvedRoutes){const s=r.path;if(s.length===0)continue;const a=s[0]?.port,A=s[s.length-1]?.port;if(!a||!A)continue;const c=r.connection.connectionId,l=r.connection,u=l.simpleRouteConnection?.__rootConnectionNames?.[0],g=r.connection.startRegion.regionId,h=r.connection.endRegion.regionId,d=n.get(g)??[];d.push({portPointId:a.d.portId,x:a.d.x,y:a.d.y,z:a.d.z,connectionName:c,rootConnectionName:u}),n.set(g,d);const p=n.get(h)??[];p.push({portPointId:A.d.portId,x:A.d.x,y:A.d.y,z:A.d.z,connectionName:c,rootConnectionName:u}),n.set(h,p)}const o=[],i=[];for(const r of this.params.graph.regions){const s=(r.assignments??[]).flatMap(l=\u003e{const u=l.connection.connectionId,g=l.connection.simpleRouteConnection?.__rootConnectionNames?.[0];return[{portPointId:l.regionPort1.d.portId,x:l.regionPort1.d.x,y:l.regionPort1.d.y,z:l.regionPort1.d.z,connectionName:u,rootConnectionName:g,nextPortPointId:l.regionPort2.d.portId},{portPointId:l.regionPort2.d.portId,x:l.regionPort2.d.x,y:l.regionPort2.d.y,z:l.regionPort2.d.z,connectionName:u,rootConnectionName:g,prevPortPointId:l.regionPort1.d.portId}]}),a=[];if(r.d._containsObstacle\u0026\u0026e.has(r.regionId)){const l=n.get(r.regionId)??[],u=[];for(const h of l)s.some(d=\u003ed.connectionName===h.connectionName\u0026\u0026d.rootConnectionName===h.rootConnectionName\u0026\u0026d.portPointId===h.portPointId)||u.push(h);s.push(...u);const g=new Map;for(const h of s){const d=`${h.connectionName}::${h.rootConnectionName??\"\"}`,p=g.get(d)??[];p.push(h),g.set(d,p)}for(const[h,d]of g.entries()){const[p,m=\"\"]=h.split(\"::\"),_=d[0];if(!_)continue;const f={portPointId:`center:${r.regionId}:${p}:${m}`,x:r.d.center.x,y:r.d.center.y,z:_.z,connectionName:p,rootConnectionName:m||void 0};if(d.length\u003e=2){const I=d[d.length-1];_.portPointId\u0026\u0026(_.nextPortPointId=f.portPointId,f.prevPortPointId=_.portPointId),I.portPointId\u0026\u0026(I.prevPortPointId=f.portPointId,f.nextPortPointId=I.portPointId)}a.push(f)}}const A=[...s,...a];A.length\u003e0\u0026\u0026o.push({capacityMeshNodeId:r.d.capacityMeshNodeId,center:r.d.center,width:r.d.width,height:r.d.height,portPoints:A,availableZ:r.d.availableZ});const c=r.ports.map(l=\u003e{const u=l.d,g=l.d.regions.some(h=\u003e!!h.d._offBoardConnectionId);return{portPointId:l.d.portId,x:l.d.x,y:l.d.y,z:l.d.z,prevPortPointId:u.prevPortPointId,nextPortPointId:u.nextPortPointId,connectionNodeIds:l.d.regions.map(h=\u003eh.regionId),distToCentermostPortOnZ:l.d.distToCentermostPortOnZ,connectsToOffBoardNode:g}});i.push({capacityMeshNodeId:r.d.capacityMeshNodeId,center:r.d.center,width:r.d.width,height:r.d.height,portPoints:c,availableZ:r.d.availableZ,_containsObstacle:r.d._containsObstacle,_containsTarget:r.d._containsTarget,_offBoardConnectionId:r.d._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:r.d._offBoardConnectedCapacityMeshNodeIds})}return{nodesWithPortPoints:o,inputNodeWithPortPoints:i}}visualize(){return(function(e){let n={};return n=e.reduce((o,i)=\u003eo\u0026\u0026i?MD(o,i):{},n),n||{}})([Dno(this.params.graph),this.visualizePfOverlay(),Mno(this.params.connections,this.params.colorMap??{}),wno(this.candidateQueue.peekMany(100),this.currentConnection?.startRegion.d.center),Pno(this.solvedRoutes,this.params.colorMap??{})])}visualizePfOverlay(){const e=this.getOutput(),n=e?.inputNodeWithPortPoints??[],o=new Map((e?.nodesWithPortPoints??[]).map(r=\u003e[r.capacityMeshNodeId,r])),i={rects:[]};for(const r of n){const s=this.computeNodePf(r),a=s??0,A=o.get(r.capacityMeshNodeId),c=A?Wm(A):{numSameLayerCrossings:0,numEntryExitLayerChanges:0,numTransitionPairCrossings:0},l=Math.min(255,Math.floor(512*a)),u=Math.max(0,255-Math.floor(512*a));let g=`rgba(${l}, ${u}, ${u}, ${a\u003c.001?\"0.1\":\"0.3\"})`;r._containsObstacle\u0026\u0026(g=\"rgba(255, 0, 0, 0.3)\"),r._offBoardConnectedCapacityMeshNodeIds?.length\u0026\u0026(g=\"rgba(255, 165, 0, 0.3)\"),i.rects.push({center:r.center,width:r.width-.2,height:r.height-.2,layer:`z${r?.availableZ?.join(\",\")}`,fill:g,label:`${r.capacityMeshNodeId}\npf: ${s===null?\"n/a\":s.toFixed(3)}\nxSame: ${c.numSameLayerCrossings}, xLC: ${c.numEntryExitLayerChanges}, xTransition: ${c.numTransitionPairCrossings}`})}return i}},Nno=t=\u003e{if(!t.assignments||t.assignments.length===0)return t.d?.assignment?0:1;const e=t.assignments.flatMap(i=\u003e{const r=i.regionPort1.d,s=i.regionPort2.d,a=i.connection.connectionId,A=i.connection,c=A.simpleRouteConnection?.__rootConnectionNames?.[0];return[{x:r.x,y:r.y,z:r.z,connectionName:a,rootConnectionName:c},{x:s.x,y:s.y,z:s.z,connectionName:a,rootConnectionName:c}]}),n={...t.d,portPoints:e},o=Wm(n);return wy(t.d,o.numSameLayerCrossings,o.numEntryExitLayerChanges,o.numTransitionPairCrossings)};function F5(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var Rno=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.srj=e,this.opts={...n},this.viaDiameter=om(e).padDiameter,this.minTraceWidth=e.minTraceWidth;const o=this.opts;if(this.effort=o.effort??1,this.MAX_ITERATIONS=1e8*this.effort,o.capacityDepth===void 0){const i=e.bounds.maxX-e.bounds.minX,r=e.bounds.maxY-e.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.connMap=Jm(e),this.colorMap=Jf(e,this.connMap),this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;netToPointPairsSolver;nodeSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityStitchSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;hyperGraphSectionOptimizer;viaDiameter;minTraceWidth;effort;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[F5(\"netToPointPairsSolver\",rL,e=\u003e[e.srj,e.colorMap,JQ(e.srj)],{onSolved:e=\u003e{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,this.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),F5(\"nodeSolver\",qF,e=\u003e[{simpleRouteJson:e.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:e=\u003e{e.capacityNodes=e.nodeSolver?.getOutput().meshNodes??[]}}),F5(\"edgeSolver\",WQ,e=\u003e[e.capacityNodes],{onSolved:e=\u003e{e.capacityEdges=e.edgeSolver?.edges}}),F5(\"availableSegmentPointSolver\",kD,e=\u003e[{nodes:e.capacityNodes,edges:e.capacityEdges||[],traceWidth:e.minTraceWidth,colorMap:e.colorMap,shouldReturnCrampedPortPoints:!0}]),F5(\"necessaryCrampedPortPointSolver\",lJ,e=\u003e[{capacityMeshNodes:e.capacityNodes,sharedEdgeSegments:e.availableSegmentPointSolver.getOutput(),simpleRouteJson:e.srjWithPointPairs}]),F5(\"portPointPathingSolver\",sCt,e=\u003e{const n=e.necessaryCrampedPortPointSolver?.getOutput()??e.availableSegmentPointSolver.getOutput(),{graph:o,connections:i}=uJ({capacityMeshNodes:e.capacityNodes,layerCount:e.srj.layerCount,connectivityMap:e.connMap,segmentPortPoints:n.flatMap(r=\u003er.portPoints),simpleRouteJsonConnections:e.srjWithPointPairs.connections});return[{graph:o,connections:i,layerCount:e.srj.layerCount,effort:e.effort,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),F5(\"hyperGraphSectionOptimizer\",Oeo,e=\u003e{const n=e.portPointPathingSolver;return[{hyperGraphSolver:n,inputSolvedRoutes:n.solvedRoutes,expansionHopsFromCentralRegion:1,createHyperGraphSolver:o=\u003enew sCt({graph:o.inputGraph,connections:o.inputConnections,inputSolvedRoutes:o.inputSolvedRoutes,layerCount:e.srj.layerCount,effort:e.effort,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}),regionCost:Nno,effort:e.effort,ACCEPTABLE_REGION_COST:.1,MAX_ATTEMPTS_PER_REGION:Math.max(3,3*e.effort),MAX_ATTEMPTS_PER_SECTION:Math.max(50,50*e.effort),FRACTION_TO_REPLACE:1,alwaysRipConflicts:!0}]}),F5(\"uniformPortDistributionSolver\",kz,e=\u003e[{nodeWithPortPoints:e.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:e.minTraceWidth,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount}]),F5(\"highDensityRouteSolver\",HD,e=\u003e[{nodePortPoints:e.uniformPortDistributionSolver?.getOutput()??[],nodePfById:new Map((e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(n=\u003e[n.capacityMeshNodeId,e.portPointPathingSolver?.computeNodePf(n)??null])),colorMap:e.colorMap,connMap:e.connMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth}]),F5(\"highDensityStitchSolver\",j7e,e=\u003e[{connections:e.srjWithPointPairs.connections,hdRoutes:e.highDensityRouteSolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter}]),F5(\"traceSimplificationSolver\",j8,e=\u003e[{hdRoutes:e.highDensityStitchSolver.mergedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,iterations:2}]),F5(\"traceWidthSolver\",aL,e=\u003e[{hdRoutes:e.traceSimplificationSolver.simplifiedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,minTraceWidth:e.minTraceWidth,connection:e.srj.connections,layerCount:e.srj.layerCount}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();const e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeTargetMerger?.visualize(),i=this.singleLayerNodeMerger?.visualize(),r=this.strawSolver?.visualize(),s=this.edgeSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.availableSegmentPointSolver?.visualize(),c=this.portPointPathingSolver?.visualize(),l=this.multiSectionPortPointOptimizer?.visualize(),u=this.uniformPortDistributionSolver?.visualize(),g=this.highDensityRouteSolver?.visualize(),h=this.highDensityStitchSolver?.visualize(),d=this.traceSimplificationSolver?.visualize(),p=this.necessaryCrampedPortPointSolver?.visualize(),m=this.highDensityRouteSolver?.visualize(),_=this.srj.outline,f=[];if(f.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),_\u0026\u0026_.length\u003e=2){const x=_.map(E=\u003e({x:E.x,y:E.y}));x.push({...x[0]}),f.push({points:x,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const I=z8(this.srj),C={points:[...this.srj.connections.flatMap(x=\u003ex.pointsToConnect.map(E=\u003e({...E,layer:J8(E,this.srj.layerCount),label:`${x.name} ${E.pcb_port_id??\"\"}`})))],rects:[...(this.srj.obstacles??[]).filter(x=\u003e!x.isCopperPour).map(x=\u003e({...x,fill:x.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":x.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(x,this.srj.layerCount),label:I(x)}))],lines:f},y=[C,e,n,o,i,r,s,a,A,p,c,m,l,u,g?Il(C,g):null,h,d,this.solved?Il({lines:f},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...y)}preview(){if(this.highDensityRouteSolver){const e=[];for(let n=this.highDensityRouteSolver.routes.length-1;n\u003e=0;n--){const o=this.highDensityRouteSolver.routes[n];if(e.push({points:o.route.map(i=\u003e({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length\u003e200)break}return{lines:e}}return this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():{}}_getOutputHdRoutes(){return this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error(\"Cannot get output before solving is complete\");const e=[],n=this._getOutputHdRoutes();for(const o of this.netToPointPairsSolver?.newConnections??[]){const i=o.__netConnectionName??this.srj.connections.find(s=\u003es.name===o.name)?.__netConnectionName,r=n.filter(s=\u003es.connectionName===o.name);for(let s=0;s\u003cr.length;s++){const a=r[s],A={type:\"pcb_trace\",pcb_trace_id:`${o.name}_${s}`,connection_name:i??o.__rootConnectionNames?.[0]??o.name,route:nB(a,this.srj.layerCount)};e.push(A)}}return e}getOutputSimpleRouteJson(){return{...this.srj,traces:this.getOutputSimplifiedPcbTraces()}}},Tno=class{MAX_ITERATIONS=1e3;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};pendingEffects;cacheHit;cacheKey;cacheToSolveSpaceTransform;getSolverName(){return this.constructor.name}step(){if(!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,console.error(this.error),this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations (MAX_ITERATIONS=${this.MAX_ITERATIONS})`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}},kno=(t,e)=\u003e{const n=l=\u003el===\" \"||l===`\n`||l===\"\\r\"||l===\"\t\",o=l=\u003e{let u=0,g=l.length;for(;u\u003cg\u0026\u0026n(l[u]);)u+=1;for(;g\u003eu\u0026\u0026n(l[g-1]);)g-=1;return l.slice(u,g)},i=l=\u003e{const u=[];let g=0,h=0;for(let d=0;d\u003cl.length;d+=1){const p=l[d];p!==\"(\"?p!==\")\"?p===\",\"\u0026\u0026h===0\u0026\u0026(u.push(o(l.slice(g,d))),g=d+1):h\u003e0\u0026\u0026(h-=1):h+=1}return u.push(o(l.slice(g))),u},r=l=\u003e{return`${u=l,Math.min(1,Math.max(0,u))}`;var u},s=(l=\u003e{const u=o(l);if(!u.startsWith(\"#\"))return null;const g=u.slice(1);if(g.length!==3\u0026\u0026g.length!==6)return null;for(const h of g){const d=h.toLowerCase();if(!(d\u003e=\"0\"\u0026\u0026d\u003c=\"9\")\u0026\u0026!(d\u003e=\"a\"\u0026\u0026d\u003c=\"f\"))return null}if(g.length===3){const[h,d,p]=g;return{r:Number.parseInt(h+h,16),g:Number.parseInt(d+d,16),b:Number.parseInt(p+p,16)}}return{r:Number.parseInt(g.slice(0,2),16),g:Number.parseInt(g.slice(2,4),16),b:Number.parseInt(g.slice(4,6),16)}})(e);if(s)return`rgba(${s.r}, ${s.g}, ${s.b}, ${r(1-t)})`;const a=(l=\u003e{const u=o(l),g=u.indexOf(\"(\");return g\u003c=0||u[u.length-1]!==\")\"?null:{name:o(u.slice(0,g)).toLowerCase(),args:i(u.slice(g+1,-1))}})(e);if(!a)return e;const{name:A,args:c}=a;if(A===\"hsl\"||A===\"rgb\")return c.length!==3?e:`${A}a(${c[0]}, ${c[1]}, ${c[2]}, ${r(1-t)})`;if(A===\"hsla\"||A===\"rgba\"){if(c.length!==4)return e;const l=(u=\u003e{const g=o(u);if(!g)return null;const h=Number.parseFloat(g);return Number.isFinite(h)?h:null})(c[3]);return l===null?e:`${A}(${c[0]}, ${c[1]}, ${c[2]}, ${r(l-t)})`}return e},Fno=(t,e)=\u003e{try{return kno(e,t)}catch(n){return console.error(n),t}},aCt=t=\u003et.rootConnectionName??t.connectionName,gJ=t=\u003e{const e=[];for(let n=0;n\u003ct.route.length-1;n+=1){const o=t.route[n],i=t.route[n+1];if(!o||!i||o.z===i.z||Math.abs(o.x-i.x)\u003e1e-6||Math.abs(o.y-i.y)\u003e1e-6)continue;const r={x:Math.round(1e3*o.x)/1e3,y:Math.round(1e3*o.y)/1e3},s=e.at(-1);s\u0026\u0026s.x===r.x\u0026\u0026s.y===r.y||e.push(r)}return e},CL=(t,e,n=.001)=\u003eMath.abs(t.x-e.x)\u003c=n\u0026\u0026Math.abs(t.y-e.y)\u003c=n,J6e=(t,e)=\u003e({minX:t.center.x-t.width/2+e,maxX:t.center.x+t.width/2-e,minY:t.center.y-t.height/2+e,maxY:t.center.y+t.height/2-e}),W6e=(t,e)=\u003e({x:t.x-e.x,y:t.y-e.y}),dJ=(t,e)=\u003et.x*e.x+t.y*e.y,ACt=(t,e,n)=\u003e({x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}),X8=t=\u003e{const e=[];for(let n=0;n\u003ct.length;n+=1){const o=t[n];if(o)for(let i=0;i\u003co.route.length-1;i+=1){const r=o.route[i],s=o.route[i+1];r\u0026\u0026s\u0026\u0026(r.z!==s.z||CL(r,s)||e.push({routeIndex:n,rootConnectionName:aCt(o),startIndex:i,endIndex:i+1,start:r,end:s,z:r.z,traceRadius:(o.traceThickness??.1)/2}))}}return e},hJ=(t,e,n=1e-6)=\u003e{const o=e.end.x-e.start.x,i=e.end.y-e.start.y,r=o*o+i*i;if(r\u003c=n)return{x:e.start.x,y:e.start.y,t:0};const s=((t.x-e.start.x)*o+(t.y-e.start.y)*i)/r,a=(A=s,Math.max(0,Math.min(A,1)));var A;return{x:e.start.x+o*a,y:e.start.y+i*a,t:a}},av=(t,e,n=1e-6)=\u003e{const o=W6e(t.end,t.start),i=W6e(e.end,e.start),r=W6e(t.start,e.start),s=dJ(o,o),a=dJ(o,i),A=dJ(i,i),c=dJ(o,r),l=dJ(i,r),u=s*A-a*a,g=n;let h,d,p=u,m=u;u\u003c=g?(h=0,p=1,d=l,m=A):(h=a*l-A*c,d=s*l-a*c,h\u003c0?(h=0,d=l,m=A):h\u003ep\u0026\u0026(h=p,d=l+a,m=A)),d\u003c0?(d=0,-c\u003c0?h=0:-c\u003es?h=p:(h=-c,p=s)):d\u003em\u0026\u0026(d=m,-c+a\u003c0?h=0:-c+a\u003es?h=p:(h=-c+a,p=s));const _=Math.abs(h)\u003c=g?0:h/p,f=Math.abs(d)\u003c=g?0:d/m,I=ACt(t.start,t.end,_),C=ACt(e.start,e.end,f),y=hJ(t.start,e,n),x=hJ(t.end,e,n),E=hJ(e.start,t,n),B=hJ(e.end,t,n);return[{leftT:_,rightT:f,leftPoint:I,rightPoint:C},{leftT:0,rightT:y.t,leftPoint:t.start,rightPoint:y},{leftT:1,rightT:x.t,leftPoint:t.end,rightPoint:x},{leftT:E.t,rightT:0,leftPoint:E,rightPoint:e.start},{leftT:B.t,rightT:1,leftPoint:B,rightPoint:e.end}].sort((S,Q)=\u003eMath.hypot(S.leftPoint.x-S.rightPoint.x,S.leftPoint.y-S.rightPoint.y)-Math.hypot(Q.leftPoint.x-Q.rightPoint.x,Q.leftPoint.y-Q.rightPoint.y))},h7=1e-6,pJ=t=\u003e{const e=[];for(const n of t){const o=e[n.routeIndex]??[];o[n.startIndex]=n,e[n.routeIndex]=o}return e},cCt=(t,e)=\u003et\u003ce?[t,e]:[e,t],Oae=(t,e)=\u003et.some(([n,o])=\u003en===e[0]\u0026\u0026o===e[1]),lCt=(t,e,n)=\u003e{let o,i=Number.POSITIVE_INFINITY;for(const r of t){if(r.routeIndex!==e.routeIndex||r.z!==e.z||r.endIndex!==e.startIndex\u0026\u0026r.startIndex!==e.endIndex)continue;const[s]=av(r,n);if(!s)continue;const a=Math.hypot(s.leftPoint.x-s.rightPoint.x,s.leftPoint.y-s.rightPoint.y);a\u003e=i||(i=a,o=r)}return o},uCt=(t,e)=\u003e{const n=X8(e),o=X8(t),i=pJ(o),r=[];for(let s=0;s\u003cn.length;s+=1){const a=n[s];if(a)for(let A=s+1;A\u003cn.length;A+=1){const c=n[A];if(!c||a.z!==c.z||a.rootConnectionName===c.rootConnectionName||Math.max(a.start.x,a.end.x)\u003cMath.min(c.start.x,c.end.x)||Math.max(c.start.x,c.end.x)\u003cMath.min(a.start.x,a.end.x)||Math.max(a.start.y,a.end.y)\u003cMath.min(c.start.y,c.end.y)||Math.max(c.start.y,c.end.y)\u003cMath.min(a.start.y,a.end.y))continue;const[l]=av(a,c);if(!l||Math.hypot(l.leftPoint.x-l.rightPoint.x,l.leftPoint.y-l.rightPoint.y)\u003eh7||l.leftT\u003c=h7||l.leftT\u003e=.999999||l.rightT\u003c=h7||l.rightT\u003e=.999999)continue;const u=i[a.routeIndex]?.[a.startIndex],g=i[c.routeIndex]?.[c.startIndex];if(!u||!g)continue;const[h]=av(u,g);if(!h||Math.hypot(h.leftPoint.x-h.rightPoint.x,h.leftPoint.y-h.rightPoint.y)\u003c=h7)continue;const d=lCt(o,u,g),p=lCt(o,g,u),m=d?[u,d]:[u],_=p?[g,p]:[g];for(const f of m)for(const I of _){const C={leftRouteIndex:a.routeIndex,leftStartPointIndex:f.startIndex,rightRouteIndex:c.routeIndex,rightStartPointIndex:I.startIndex};r.some(y=\u003ey.leftRouteIndex===C.leftRouteIndex\u0026\u0026y.leftStartPointIndex===C.leftStartPointIndex\u0026\u0026y.rightRouteIndex===C.rightRouteIndex\u0026\u0026y.rightStartPointIndex===C.rightStartPointIndex)||r.push(C)}}}return r},j6e=t=\u003e{const e=X8(t),n=[];for(let o=0;o\u003ce.length;o+=1){const i=e[o];if(i)for(let r=o+1;r\u003ce.length;r+=1){const s=e[r];if(!s||i.z!==s.z||i.rootConnectionName===s.rootConnectionName)continue;const[a]=av(i,s);if(a\u0026\u0026Math.hypot(a.leftPoint.x-a.rightPoint.x,a.leftPoint.y-a.rightPoint.y)+h7\u003ci.traceRadius+s.traceRadius){const A=cCt(i.routeIndex,s.routeIndex);Oae(n,A)||n.push(A)}}}return n},$6e=(t,e)=\u003ee\u003c=1||e\u003e=t-2,gCt=(t,e)=\u003ee.some(n=\u003e$6e(t,n)),Gae=.2,q6e=.4,Lno=.65+.05,Yae=.03,dCt=1e3,Wu=1e-6,X6e=.015,hCt=t=\u003eMath.round(t*dCt)/dCt,Z6e=(t,e)=\u003e({x:t.x-e.x,y:t.y-e.y}),pCt=(t,e)=\u003e({x:t.x*e,y:t.y*e}),mCt=(t,e)=\u003et.x*e.x+t.y*e.y,Hno=(t,e,n)=\u003e({x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}),$D=t=\u003eMath.max(0,Math.min(t,1)),yL=(t,e,n)=\u003eMath.max(e,Math.min(t,n)),_Ct=(t,e)=\u003e{const n=(o=\u003eMath.hypot(o.x,o.y))(t);return n\u003c=e||n\u003c=Wu?t:pCt(t,e/n)},fCt=(t,e=0)=\u003e({minX:t.center.x-t.width/2-e,maxX:t.center.x+t.width/2+e,minY:t.center.y-t.height/2-e,maxY:t.center.y+t.height/2+e}),Ono=(t,e,n=0)=\u003e{const o=fCt(e,n);return t.x\u003e=o.minX\u0026\u0026t.x\u003c=o.maxX\u0026\u0026t.y\u003e=o.minY\u0026\u0026t.y\u003c=o.maxY},Gno=(t,e,n)=\u003e{if(t.regionId){const s=e.findIndex(a=\u003ea.capacityMeshNodeId===t.regionId);if(s!==-1)return s}const o=[...t.route.map(({x:s,y:a})=\u003e({x:s,y:a})),...t.vias.map(({x:s,y:a})=\u003e({x:s,y:a}))];let i=-1,r=Number.POSITIVE_INFINITY;for(let s=0;s\u003ce.length;s++){const a=e[s];if(!a||!o.every(c=\u003eOno(c,a,n)))continue;const A=a.width*a.height;A\u003cr\u0026\u0026(r=A,i=s)}return i},ICt=(t,e,n,o)=\u003e{const i=((r,s,a)=\u003e{const A=Math.min(Math.abs(r.originalX-a.minX),Math.abs(a.maxX-r.originalX)),c=Math.min(Math.abs(r.originalY-a.minY),Math.abs(a.maxY-r.originalY));return Math.abs(A-c)\u003c=Wu?Math.abs(s.x-r.x)\u003e=Math.abs(s.y-r.y)?\"y\":\"x\":A\u003cc?\"y\":\"x\"})(t,e,n);return _Ct(i===\"x\"?{x:1.1*(t.x-e.x)*o,y:0}:{x:0,y:1.1*(t.y-e.y)*o},.06*o)},xL=(t,e,n,o,i=3.5,r=.2,s=.4)=\u003e{const a=Math.max(t,0);if(a\u003e=s)return 0;const A=a/r;if(A\u003c1){const u=1-A;return e*u**3*(1+u*i)}const c=(a-r)/Math.max(s-r,Wu),l=e*n*Math.exp(-c*o);return l\u003c1e-5?0:l},Yno=(t,e)=\u003e{const n=t.boundaryPadding\u003e0?.001:0,o=e.minX+t.boundaryPadding+n,i=e.maxX-t.boundaryPadding-n,r=e.minY+t.boundaryPadding+n,s=e.maxY-t.boundaryPadding-n;t.x=yL(t.x,o,i),t.y=yL(t.y,r,s)},e8e=(t,e)=\u003e{for(const n of t)for(const o of n.nodes)Yno(o,e)},CCt=t=\u003et.kind===\"via\"?.4:.25,Uno=t=\u003e(t.kind,.5),yCt=t=\u003et.kind===\"via\"?12:3.5,Kno=t=\u003et.kind===\"via\"?.18:.06,Vno=t=\u003et.kind===\"via\"?1.35:1.05,zno=(t,e)=\u003et.kind===\"via\"?3*e:e,t8e=(t,e,n,o)=\u003e{const i=2*e;t[i]=(t[i]??0)+n,t[i+1]=(t[i+1]??0)+o},qD=(t,e,n,o,i,r)=\u003e{if(t.fixed||t8e(o,t.node.forceIndex,e,n),!t.fixed\u0026\u0026i\u0026\u0026r!==void 0){const s=2*r;i[s]=(i[s]??0)+e,i[s+1]=(i[s+1]??0)+n}},xCt=(t,e,n,o,i=.5)=\u003e{const{startNode:r,endNode:s}=t,a=1-$D(i),A=$D(i),c=r.fixed?0:a,l=s.fixed?0:A,u=c+l;if(!(u\u003c=Wu)){if(!r.fixed\u0026\u0026c\u003e0){const g=c/u;t8e(o,r.forceIndex,e*g,n*g)}if(!s.fixed\u0026\u0026l\u003e0){const g=l/u;t8e(o,s.forceIndex,e*g,n*g)}}},Jno=(t,e,n,o,i)=\u003e{if(e.fixed)return{x:0,y:0};const{minX:r,maxX:s,minY:a,maxY:A}=t,c=(d=\u003ed.kind===\"via\"?.65:Gae)(e),l=(d=\u003ed.kind===\"via\"?Lno:q6e)(e),u=(d=\u003ed.kind===\"via\"?.015:.08)(e),g=(d=\u003ed.kind===\"via\"?80:20)(e),h=yCt(e);return{x:xL(n-r,Yae,u,g,h,c,l)*i-xL(s-n,Yae,u,g,h,c,l)*i,y:xL(o-a,Yae,u,g,h,c,l)*i-xL(A-o,Yae,u,g,h,c,l)*i}},Wno=t=\u003e{if(t.length===0)return null;const e=new X4(t.length);for(const n of t){const{startNode:o,endNode:i}=n;e.add(Math.min(o.x,i.x),Math.min(o.y,i.y),Math.max(o.x,i.x),Math.max(o.y,i.y))}return e.finish(),{index:e,segments:t}},ECt=t=\u003e{const e=new Map,n=new Map;for(const o of t){const i=n.get(o.z)??[];i.push(o),n.set(o.z,i)}for(const[o,i]of n){const r=Wno(i);r\u0026\u0026e.set(o,r)}return{byLayer:e}},BCt=(t,e,n,o,i)=\u003e{const r=a=\u003e({candidateIndexes:a.index.search(n-i,o-i,n+i,o+i),segments:a.segments});if(e.kind===\"point\"){const a=t.byLayer.get(e.z);return a?[r(a)]:[]}const s=[];for(const a of t.byLayer.values())s.push(r(a));return s},jno=t=\u003e{const e=[];for(let n=0;n\u003ct.length;n+=1){const o=t[n];if(!o)continue;const i=new Set;for(let r=0;r\u003co.route.length-1;r+=1){const s=o.route[r],a=o.route[r+1];if(!s||!a||s.z===a.z||!CL(s,a))continue;const A=[r,r+1];for(let u=r-1;u\u003e=0;u-=1){const g=o.route[u];if(!g||!CL(g,s))break;A.push(u)}for(let u=r+2;u\u003co.route.length;u+=1){const g=o.route[u];if(!g||!CL(g,s))break;A.push(u)}const c=[...new Set(A)].sort((u,g)=\u003eu-g);let l=!1;for(const u of c)if(i.has(u)){l=!0;break}if(!l){for(const u of c)i.add(u);e.push({routeIndex:n,rootConnectionName:aCt(o),pointIndexes:c,x:s.x,y:s.y,radius:(o.viaDiameter??.3)/2,movable:!gCt(o.route.length,c)})}}}return e},n8e=t=\u003e{const{routes:e,via:n,dx:o,dy:i,node:r}=t;if(!n.movable)return!1;n.x+=o,n.y+=i,((a,A)=\u003e{const c=J6e(A,a.radius+Wu);a.x=yL(a.x,c.minX,c.maxX),a.y=yL(a.y,c.minY,c.maxY)})(n,r);const s=e[n.routeIndex];if(!s)return!1;for(const a of n.pointIndexes){const A=s.route[a];A\u0026\u0026(A.x=n.x,A.y=n.y)}return!0},$no=t=\u003e{const{routes:e,node:n,vias:o}=t;let i=!1;for(let r=0;r\u003co.length;r+=1){const s=o[r];if(s)for(let a=r+1;a\u003co.length;a+=1){const A=o[a];if(!A)continue;const c=s.radius+A.radius+.1+X6e,l=s.x-A.x,u=s.y-A.y,g=Math.hypot(l,u),h=c-g;if(h\u003c=0)continue;const d=1.61803398875*(97*r+13*a),p=g\u003eWu?l/g:Math.cos(d),m=g\u003eWu?u/g:Math.sin(d),_=Number(s.movable)+Number(A.movable);if(_===0)continue;const f=Math.min(.04,h/_);i=n8e({routes:e,via:s,dx:p*f,dy:m*f,node:n})||i,i=n8e({routes:e,via:A,dx:-p*f,dy:-m*f,node:n})||i}}return i},qno=t=\u003e{const{routes:e,node:n,vias:o,segments:i}=t;let r=!1;for(let s=0;s\u003co.length;s+=1){const a=o[s];if(a?.movable)for(const A of i){if(a.rootConnectionName===A.rootConnectionName)continue;const c=hJ(a,A),l=a.x-c.x,u=a.y-c.y,g=Math.hypot(l,u),h=a.radius+A.traceRadius+.1+X6e-g;if(h\u003c=0)continue;const d=A.end.x-A.start.x,p=A.end.y-A.start.y,m=Math.hypot(d,p),_=s%2==0?1:-1,f=g\u003eWu?l/g:m\u003eWu?-p/m*_:1,I=g\u003eWu?u/g:m\u003eWu?d/m*_:0,C=Math.min(.04,h);r=n8e({routes:e,via:a,dx:f*C,dy:I*C,node:n})||r}}return r},bCt=t=\u003e{const{routes:e,routeIndex:n,pointIndex:o,dx:i,dy:r,node:s}=t,a=e[n];if(!a||o\u003c=0||o\u003e=a.route.length-1)return!1;const A=((u,g,h=.001)=\u003e{const d=u[g];if(!d)return[];const p=[g];for(let m=g-1;m\u003e=0;m-=1){const _=u[m];if(!_||!CL(_,d,h))break;p.push(m)}for(let m=g+1;m\u003cu.length;m+=1){const _=u[m];if(!_||!CL(_,d,h))break;p.push(m)}return[...new Set(p)]})(a.route,o);if(gCt(a.route.length,A))return!1;const c=J6e(s,Wu);let l=!1;for(const u of A){const g=a.route[u];g\u0026\u0026(g.x=yL(g.x+i,c.minX,c.maxX),g.y=yL(g.y+r,c.minY,c.maxY),l=!0)}return l},o8e=t=\u003e{const{routes:e,segment:n,dx:o,dy:i,node:r,t:s}=t,a=1-$D(s),A=$D(s),c=bCt({routes:e,routeIndex:n.routeIndex,pointIndex:n.startIndex,dx:o*a,dy:i*a,node:r}),l=bCt({routes:e,routeIndex:n.routeIndex,pointIndex:n.endIndex,dx:o*A,dy:i*A,node:r});return c||l},SCt=t=\u003e{const{routes:e,node:n,segments:o,movableRouteIndexes:i}=t;let r=!1;for(let s=0;s\u003co.length;s+=1){const a=o[s];if(a)for(let A=s+1;A\u003co.length;A+=1){const c=o[A];if(!c||a.z!==c.z||a.rootConnectionName===c.rootConnectionName)continue;const l=a.traceRadius+c.traceRadius+.1+X6e;if(Math.max(a.start.x,a.end.x)+l\u003c=Math.min(c.start.x,c.end.x)||Math.max(c.start.x,c.end.x)+l\u003c=Math.min(a.start.x,a.end.x)||Math.max(a.start.y,a.end.y)+l\u003c=Math.min(c.start.y,c.end.y)||Math.max(c.start.y,c.end.y)+l\u003c=Math.min(a.start.y,a.end.y))continue;const[u]=av(a,c);if(!u)continue;const g=u.leftPoint.x-u.rightPoint.x,h=u.leftPoint.y-u.rightPoint.y,d=Math.hypot(g,h),p=l-d;if(p\u003c=0)continue;const m=!i||i.has(a.routeIndex),_=!i||i.has(c.routeIndex),f=Number(m)+Number(_);if(f===0)continue;const I=a.end.x-a.start.x,C=a.end.y-a.start.y,y=Math.hypot(I,C),x=(s+A)%2==0?1:-1,E=d\u003eWu?g/d:y\u003eWu?-C/y*x:1,B=d\u003eWu?h/d:y\u003eWu?I/y*x:0,S=Math.min(.025,p/f);m\u0026\u0026(r=o8e({routes:e,segment:a,dx:E*S,dy:B*S,node:n,t:u.leftT})||r),_\u0026\u0026(r=o8e({routes:e,segment:c,dx:-E*S,dy:-B*S,node:n,t:u.rightT})||r)}}return r},QCt=(t,e)=\u003e{for(let n=0;n\u003c10;n+=1){const o=jno(e),i=X8(e),r=$no({routes:e,node:t,vias:o}),s=qno({routes:e,node:t,vias:o,segments:i}),a=SCt({routes:e,node:t,segments:i});if(!r\u0026\u0026!s\u0026\u0026!a)break}for(const n of e)n.vias=gJ(n);return e},Xno=(t,e,n)=\u003e{for(let o=0;o\u003c10\u0026\u0026SCt({routes:e,node:t,segments:X8(e),movableRouteIndexes:n});o+=1);for(const o of n){const i=e[o];i\u0026\u0026(i.vias=gJ(i))}return e},vCt=(t,e,n,o,i,r=3,s=.02)=\u003e{for(let a=0;a\u003cr;a+=1){i.fill(0);const A=ECt(o);for(let c=0;c\u003cn.length;c+=1){const l=n[c];if(!l||l.kind!==\"via\")continue;const u=l.node;for(let g=c+1;g\u003cn.length;g+=1){const h=n[g];if(!h||h.kind!==\"via\"||l.rootConnectionName===h.rootConnectionName)continue;const d=h.node,p=u.x-d.x,m=u.y-d.y;if(Math.abs(p)\u003e=Gae||Math.abs(m)\u003e=Gae)continue;const _=Math.hypot(p,m),f=Gae-_;if(f\u003c=0)continue;let I=0,C=0;if(_\u003eWu){const B=1/_;I=p*B,C=m*B}else{const B=1.61803398875*(1009*a+97*c+13*g);I=Math.cos(B),C=Math.sin(B)}const y=Math.min(s,.9*f),x=I*y,E=C*y;qD(l,x,E,i),qD(h,-x,-E,i)}}for(let c=0;c\u003cn.length;c+=1){const l=n[c];if(!l)continue;const u=l.node,g=CCt(l),h=BCt(A,l,u.x,u.y,g);for(const d of h)for(const p of d.candidateIndexes){const m=d.segments[p];if(!m||l.rootConnectionName===m.rootConnectionName)continue;const{startNode:_,endNode:f}=m,I=f.x-_.x,C=f.y-_.y,y=I*I+C*C;if(y\u003c=Wu)continue;const x=u.x-_.x,E=u.y-_.y,B=$D((x*I+E*C)/y),S=_.x+I*B,Q=_.y+C*B,w=u.x-S,M=u.y-Q,k=Math.hypot(w,M),R=g-k;if(R\u003c=0)continue;const F=1009*a+97*c+13*m.obstacleIndex;let O=0,U=0;if(k\u003eWu){const j=1/k;O=w*j,U=M*j}else{const j=-C,J=I,oe=Math.hypot(j,J);if(oe\u003eWu){const ie=(F%2==0?1:-1)/oe;O=j*ie,U=J*ie}else{const ie=1.61803398875*F;O=Math.cos(ie),U=Math.sin(ie)}}const Y=Math.min(zno(l,s),R*Vno(l)),W=O*Y,te=U*Y;qD(l,W,te,i),xCt(m,-W,-te,i,B)}}for(let c=0;c\u003ce.length;c+=1){const l=e[c];if(l)for(let u=0;u\u003cl.nodes.length;u+=1){const g=l.nodes[u];if(!g||g.fixed)continue;const h=2*g.forceIndex;let d=i[h]??0,p=i[h+1]??0;const m=Math.hypot(d,p);if(m\u003es\u0026\u0026m\u003eWu){const _=s/m;d*=_,p*=_}g.x+=d,g.y+=p}}e8e(e,t)}},wCt=(t,e,n,o)=\u003e{const{mutableRoutes:i,totalNodeCount:r}=(h=\u003e{let d=0;return{mutableRoutes:h.map(p=\u003e{const m=[],_=new Int32Array(p.route.length);_.fill(-1);for(let f=0;f\u003cp.route.length;f+=1){const I=p.route[f];if(!I)continue;const C=p.route[f-1],y=m.at(-1),x=m.length-1;y\u0026\u0026C\u0026\u0026C.x===I.x\u0026\u0026C.y===I.y?(C.z!==I.z\u0026\u0026(y.boundaryPadding=Math.max(y.boundaryPadding,p.viaDiameter/2)),y.pointIndexes.push(f),y.fixed||=$6e(p.route.length,f),_[f]=x):(m.push({x:I.x,y:I.y,originalX:I.x,originalY:I.y,boundaryPadding:0,pointIndexes:[f],fixed:$6e(p.route.length,f),forceIndex:d}),_[f]=m.length-1,d+=1)}return{route:p,rootConnectionName:p.rootConnectionName??p.connectionName,nodes:m,pointNodeIndexes:_}}),totalNodeCount:d}})(e),s=(h=\u003e{const d=[];for(let p=0;p\u003ch.length;p+=1){const m=h[p];if(m)for(let _=0;_\u003cm.nodes.length;_+=1){const f=m.nodes[_],I=f?.pointIndexes[0],C=I===void 0?void 0:m.route.route[I];f\u0026\u0026C\u0026\u0026(f.pointIndexes.length\u003e1?d.push({kind:\"via\",routeIndex:p,rootConnectionName:m.rootConnectionName,node:f,fixed:f.fixed}):d.push({kind:\"point\",routeIndex:p,rootConnectionName:m.rootConnectionName,node:f,z:C.z,fixed:f.fixed}))}}return d})(i),a=(h=\u003e{const d=[];for(let p=0;p\u003ch.length;p+=1){const m=h[p];if(m)for(let _=0;_\u003cm.nodes.length-1;_+=1){const f=m.nodes[_],I=m.nodes[_+1],C=f?.pointIndexes[0],y=C===void 0?void 0:m.route.route[C];f\u0026\u0026I\u0026\u0026y\u0026\u0026d.push({obstacleIndex:d.length,rootConnectionName:m.rootConnectionName,z:y.z,startNode:f,endNode:I})}}return d})(i),A=new Float64Array(2*r),c=new Float64Array(2*r),l=o?.includeForceVectors??!0;e8e(i,t);let u=[];for(let h=0;h\u003cn;h+=1){const d=n\u003c=1?0:h/Math.max(n-1,1),p=.25+.75*(1-d),m=1-d,_=l\u0026\u0026h===n-1,f=_?new Float64Array(2*s.length):void 0;A.fill(0);for(let C=0;C\u003cs.length;C+=1){const y=s[C];if(!y||y.kind!==\"via\")continue;const x=y.node;for(let E=C+1;E\u003cs.length;E+=1){const B=s[E];if(!B||B.kind!==\"via\"||y.rootConnectionName===B.rootConnectionName)continue;const S=B.node,Q=x.x-S.x,w=x.y-S.y;if(Math.abs(Q)\u003e=q6e||Math.abs(w)\u003e=q6e)continue;const M=Math.hypot(Q,w);let k=0,R=0;if(M\u003eWu){const Y=1/M;k=Q*Y,R=w*Y}else{const Y=1.61803398875*(97*C+13*E);k=Math.cos(Y),R=Math.sin(Y)}const F=xL(M,.034,.08,18)*p;if(F\u003c=0)continue;const O=k*F,U=R*F;qD(y,O,U,A,f,C),qD(B,-O,-U,A,f,E)}}const I=ECt(a);for(let C=0;C\u003cs.length;C+=1){const y=s[C];if(!y)continue;const x=y.node,E=Uno(y),B=BCt(I,y,x.x,x.y,E);for(const S of B)for(const Q of S.candidateIndexes){const w=S.segments[Q];if(!w||y.rootConnectionName===w.rootConnectionName)continue;const{startNode:M,endNode:k}=w,R=k.x-M.x,F=k.y-M.y,O=R*R+F*F;if(O\u003c=Wu)continue;const U=x.x-M.x,Y=x.y-M.y,W=$D((U*R+Y*F)/O),te=M.x+R*W,j=M.y+F*W,J=x.x-te,oe=x.y-j,ie=Math.hypot(J,oe),ne=97*C+13*w.obstacleIndex;let le=0,ge=0;if(ie\u003eWu){const pe=1/ie;le=J*pe,ge=oe*pe}else{const pe=-F,ye=R,Me=Math.hypot(pe,ye);if(Me\u003eWu){const ve=(ne%2==0?1:-1)/Me;le=pe*ve,ge=ye*ve}else{const ve=1.61803398875*ne;le=Math.cos(ve),ge=Math.sin(ve)}}const _e=xL(ie,Kno(y),.08,18,yCt(y),CCt(y),E)*p;if(_e\u003c=0)continue;const ue=le*_e,fe=ge*_e;qD(y,ue,fe,A,f,C),xCt(w,-ue,-fe,A,W)}}_\u0026\u0026(u=new Array(s.length));for(let C=0;C\u003cs.length;C+=1){const y=s[C];if(!y)continue;const x=y.node,E=Jno(t,y,x.x,x.y,p);if(qD(y,E.x,E.y,A,f,C),_\u0026\u0026f){const B=2*C;u[C]={kind:y.kind,routeIndex:y.routeIndex,rootConnectionName:y.rootConnectionName,x:x.x,y:x.y,dx:f[B]??0,dy:f[B+1]??0}}}for(let C=0;C\u003ci.length;C+=1){const y=i[C];if(!y)continue;const x=y.nodes.length-2;for(let E=0;E\u003cy.nodes.length;E+=1){const B=y.nodes[E];if(!B||B.fixed)continue;const S=2*B.forceIndex;let Q=(A[S]??0)+.14*(B.originalX-B.x),w=(A[S+1]??0)+.14*(B.originalY-B.y),M=0,k=0,R=0,F=0;const O=y.nodes[E-1],U=y.nodes[E+1];if(O||U){let J=0,oe=0,ie=0;if(O\u0026\u0026(J+=O.x,oe+=O.y,ie+=1),U\u0026\u0026(J+=U.x,oe+=U.y,ie+=1),ie\u003e0){const ne=1/ie;Q+=.22*(J*ne-B.x),w+=.22*(oe*ne-B.y)}}if(O\u0026\u0026U\u0026\u0026m\u003e0){const J=Z6e(U,O),oe=mCt(J,J);if(oe\u003eWu){const ie=$D(mCt(Z6e(B,O),J)/oe),ne=Hno(O,U,ie),le=_Ct(pCt(Z6e(ne,B),.55*m),.02*m);M=le.x,k=le.y}}if(m\u003e0){if(E===1\u0026\u0026O?.fixed){const J=ICt(O,B,t,m);R+=J.x,F+=J.y}if(E===x\u0026\u0026U?.fixed){const J=ICt(U,B,t,m);R+=J.x,F+=J.y}}let Y=.85*Q*p,W=.85*w*p;const te=Math.hypot(Y,W),j=.012*p;if(te\u003ej\u0026\u0026te\u003eWu){const J=j/te;Y*=J,W*=J}B.x+=Y+M+R,B.y+=W+k+F}}e8e(i,t),vCt(t,i,s,a,c,3,.02)}return vCt(t,i,s,a,c,8,.03),{routes:(h=\u003eh.map(({route:d,nodes:p,pointNodeIndexes:m})=\u003e{const _=d.route.map((I,C)=\u003e{const y=m[C]??-1,x=y\u003e=0?p[y]:void 0;return x?{...I,x:hCt(x.x),y:hCt(x.y)}:I}),f={...d,route:_,vias:[]};return f.vias=gJ(f),f}))(i),forceVectors:u,stepsCompleted:n}},mJ=class extends Tno{sampleEntries;originalHdRoutes;originalNodeWithPortPoints;colorMap;totalStepsPerNode;nodeAssignmentMargin;improvedRoutesByIndex=new Map;activeSampleIndex=0;latestVisualization={};constructor(e){super(),this.originalHdRoutes=e.hdRoutes,this.originalNodeWithPortPoints=e.nodeWithPortPoints,this.colorMap=e.colorMap??{},this.totalStepsPerNode=e.totalStepsPerNode??60,this.nodeAssignmentMargin=e.nodeAssignmentMargin??.2;const n=new Map;for(let o=0;o\u003ce.hdRoutes.length;o++){const i=Gno(e.hdRoutes[o],e.nodeWithPortPoints,this.nodeAssignmentMargin);if(i===-1)continue;const r=n.get(i)??[];r.push(o),n.set(i,r)}this.sampleEntries=Array.from(n.entries()).map(([o,i])=\u003e({node:e.nodeWithPortPoints[o],routeIndexes:i})),this.MAX_ITERATIONS=Math.max(10*this.sampleEntries.length,1e3),this.stats={nodeAssignmentMargin:this.nodeAssignmentMargin,sampleCount:this.sampleEntries.length,improvedNodeCount:0,improvedRouteCount:0,totalStepsPerNode:this.totalStepsPerNode}}getSolverName(){return\"HighDensityForceImproveSolver\"}getConstructorParams(){return[{nodeWithPortPoints:this.originalNodeWithPortPoints,hdRoutes:this.originalHdRoutes,totalStepsPerNode:this.totalStepsPerNode,nodeAssignmentMargin:this.nodeAssignmentMargin,colorMap:this.colorMap}]}_step(){const e=this.sampleEntries[this.activeSampleIndex];if(!e)return void(this.solved=!0);const n=fCt(e.node),o=e.routeIndexes.map(a=\u003ethis.originalHdRoutes[a]),i=wCt(n,o,this.totalStepsPerNode,{includeForceVectors:!0});QCt(e.node,i.routes);const r=uCt(o,i.routes);let s=r.length===0?i:wCt(n,((a,A)=\u003e{const{routes:c,node:l,selectors:u}=a,g=structuredClone(c),h=X8(c),d=pJ(h),p=u.flatMap(m=\u003e{const _=d[m.leftRouteIndex]?.[m.leftStartPointIndex],f=d[m.rightRouteIndex]?.[m.rightStartPointIndex];if(!_||!f)return[];const[I]=av(_,f);if(!I)return[];const C=I.leftPoint.x-I.rightPoint.x,y=I.leftPoint.y-I.rightPoint.y,x=Math.hypot(C,y);return x\u003c=h7?[]:[{selector:m,directionX:C/x,directionY:y/x,requiredDistance:_.traceRadius+f.traceRadius+.015}]});for(let m=0;m\u003c3;m+=1){const _=X8(g),f=pJ(_);for(const I of p){const C=f[I.selector.leftRouteIndex]?.[I.selector.leftStartPointIndex],y=f[I.selector.rightRouteIndex]?.[I.selector.rightStartPointIndex];if(!C||!y)continue;const[x]=av(C,y);if(!x)continue;const E=(x.leftPoint.x-x.rightPoint.x)*I.directionX+(x.leftPoint.y-x.rightPoint.y)*I.directionY,B=I.requiredDistance-E;if(B\u003c=0)continue;const S=Math.min(.025,B/2);A({routes:g,segment:C,dx:I.directionX*S,dy:I.directionY*S,node:l,t:x.leftT}),A({routes:g,segment:y,dx:-I.directionX*S,dy:-I.directionY*S,node:l,t:x.rightT})}}for(const m of g)m.vias=gJ(m);return g})({routes:o,node:e.node,selectors:r},o8e),this.totalStepsPerNode,{includeForceVectors:!0});if(s!==i){QCt(e.node,s.routes);const a=uCt(o,s.routes);if(a.length\u003e0){const A=((c,l)=\u003e{const{originalRoutes:u,guardedRoutes:g,node:h,crossingSelectors:d,protectedSelectors:p}=c,m=pJ(X8(u)),_=pJ(X8(g)),f=j6e(g),I=p.map(({leftRouteIndex:y,rightRouteIndex:x})=\u003ecCt(y,x)),C=J6e(h,h7);for(const y of d){const x=_[y.leftRouteIndex]?.[y.leftStartPointIndex],E=_[y.rightRouteIndex]?.[y.rightStartPointIndex];if(!x||!E)continue;const[B]=av(x,E);if(!(!B||Math.hypot(B.leftPoint.x-B.rightPoint.x,B.leftPoint.y-B.rightPoint.y)\u003eh7||B.leftT\u003c=h7||B.leftT\u003e=.999999||B.rightT\u003c=h7||B.rightT\u003e=.999999))for(const S of[\"right\",\"left\"]){const Q=S===\"left\"?y.leftRouteIndex:y.rightRouteIndex,w=S===\"left\"?y.leftStartPointIndex:y.rightStartPointIndex,M=S===\"left\"?y.rightRouteIndex:y.leftRouteIndex,k=S===\"left\"?y.rightStartPointIndex:y.leftStartPointIndex,R=u[Q],F=g[Q],O=m[M]?.[k],U=_[M]?.[k];if(!(R\u0026\u0026F\u0026\u0026O\u0026\u0026U))continue;const Y=R.route[w]?.z,W=[];for(let te=w-2;te\u003c=w+3;te+=1){const j=R.route[te];!j||te\u003c=0||te\u003e=R.route.length-1||j.z!==Y||[R.route[te-1],R.route[te+1]].some(J=\u003eJ\u0026\u0026J.z!==j.z)||W.push(te)}if(W.length!==0)for(const[te,j]of[[O.start,U.start],[O.end,U.end]])for(const J of[1.51,1.25,1.75,2]){const oe=[...g],ie=structuredClone(F);oe[Q]=ie;let ne=!0;for(const ue of W){const fe=R.route[ue],pe=ie.route[ue];if(!fe||!pe)continue;const ye=j.x+(fe.x-te.x)*J,Me=j.y+(fe.y-te.y)*J;if(ye\u003c=C.minX||ye\u003e=C.maxX||Me\u003c=C.minY||Me\u003e=C.maxY){ne=!1;break}pe.x=ye,pe.y=Me}if(!ne)continue;ie.vias=gJ(ie);let le=oe,ge=j6e(le);const _e=new Set;for(const[ue,fe]of ge)Oae(f,[ue,fe])||(ue===Q\u0026\u0026fe!==Q?_e.add(fe):fe===Q\u0026\u0026ue!==Q\u0026\u0026_e.add(ue));if(_e.size\u003e0){const ue=l(h,structuredClone(oe),_e),fe=j6e(ue);I.every(pe=\u003e!Oae(fe,pe))\u0026\u0026fe.length\u003cge.length\u0026\u0026(le=ue,ge=fe)}if(I.every(ue=\u003e!Oae(ge,ue))\u0026\u0026ge.length\u003cf.length)return le}}}})({originalRoutes:o,guardedRoutes:s.routes,node:e.node,crossingSelectors:a,protectedSelectors:[...r,...a]},Xno);A\u0026\u0026(s={...s,routes:A})}}for(let a=0;a\u003ce.routeIndexes.length;a++)this.improvedRoutesByIndex.set(e.routeIndexes[a],s.routes[a]);this.latestVisualization=PCt({node:e.node,routes:s.routes,forceVectors:s.forceVectors,colorMap:this.colorMap}),this.activeSampleIndex+=1,this.stats={nodeAssignmentMargin:this.nodeAssignmentMargin,sampleCount:this.sampleEntries.length,improvedNodeCount:this.activeSampleIndex,improvedRouteCount:this.improvedRoutesByIndex.size,totalStepsPerNode:this.totalStepsPerNode},this.activeSampleIndex\u003e=this.sampleEntries.length\u0026\u0026(this.solved=!0)}getOutput(){return this.originalHdRoutes.map((e,n)=\u003ethis.improvedRoutesByIndex.get(n)??e)}visualize(){return this.solved?PCt({routes:this.getOutput(),colorMap:this.colorMap}):this.latestVisualization}},PCt=t=\u003e{const e=[],n=[],o=[];t.node\u0026\u0026o.push({center:t.node.center,width:t.node.width,height:t.node.height,stroke:\"rgba(14,165,233,0.7)\",fill:\"rgba(14,165,233,0.04)\",label:t.node.capacityMeshNodeId});for(const i of t.routes){const r=t.colorMap?.[i.connectionName]??\"#0ea5e9\";for(let s=0;s\u003ci.route.length-1;s++){const a=i.route[s],A=i.route[s+1];a.z===A.z\u0026\u0026e.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:a.z===0?r:Fno(r,.5),strokeWidth:i.traceThickness,layer:`z${a.z}`,strokeDash:a.z!==0?[.1,.3]:void 0})}for(const s of i.vias)n.push({center:{x:s.x,y:s.y},radius:i.viaDiameter/2,stroke:r,fill:\"rgba(14,165,233,0.12)\"})}for(const i of t.forceVectors??[])e.push({points:[{x:i.x,y:i.y},{x:i.x+5*i.dx,y:i.y+5*i.dy}],strokeColor:\"rgba(244,63,94,0.85)\",strokeWidth:.06,strokeDash:[.08,.08]});return{lines:e,circles:n,rects:o}},_J=.005,i8e=1e-6,Uae=(t,e)=\u003e({minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}),MCt=t=\u003eUae({minX:Math.min(t.start.x,t.end.x),minY:Math.min(t.start.y,t.end.y),maxX:Math.max(t.start.x,t.end.x),maxY:Math.max(t.start.y,t.end.y)},t.width/2),Kae=t=\u003e{const e=t.diameter/2;return{minX:t.x-e,minY:t.y-e,maxX:t.x+e,maxY:t.y+e}},r8e=t=\u003e({minX:t.x-t.width/2,minY:t.y-t.height/2,maxX:t.x+t.width/2,maxY:t.y+t.height/2}),DCt=(t,e)=\u003e`${t}:${e}`,s8e=class{constructor(e){this.cellSize=e}cellSize;cells=new Map;insert(e,n){const o=Math.floor(n.minX/this.cellSize),i=Math.floor(n.maxX/this.cellSize),r=Math.floor(n.minY/this.cellSize),s=Math.floor(n.maxY/this.cellSize);for(let a=o;a\u003c=i;a+=1)for(let A=r;A\u003c=s;A+=1){const c=DCt(a,A),l=this.cells.get(c);l?l.push(e):this.cells.set(c,[e])}}query(e){const n=Math.floor(e.minX/this.cellSize),o=Math.floor(e.maxX/this.cellSize),i=Math.floor(e.minY/this.cellSize),r=Math.floor(e.maxY/this.cellSize),s=new Set;for(let a=n;a\u003c=o;a+=1)for(let A=i;A\u003c=r;A+=1){const c=this.cells.get(DCt(a,A));if(c)for(const l of c)s.add(l)}return[...s]}},Zno=(t,e)=\u003e{const n=DD(t.start,t.end,e.start,e.end);if(n)return n;const o=[{left:t.start,right:z_(t.start,e.start,e.end)},{left:t.end,right:z_(t.end,e.start,e.end)},{left:z_(e.start,t.start,t.end),right:e.start},{left:z_(e.end,t.start,t.end),right:e.end}];let i={left:t.start,right:e.start},r=Number.POSITIVE_INFINITY;for(const s of o){const a=Math.hypot(s.left.x-s.right.x,s.left.y-s.right.y);a\u003cr\u0026\u0026(i=s,r=a)}return{x:(i.left.x+i.right.x)/2,y:(i.left.y+i.right.y)/2}},NCt=(t,e)=\u003e{const n=z_(e,t.start,t.end);return{x:(n.x+e.x)/2,y:(n.y+e.y)/2}},eoo=(t,e)=\u003e{const n=z_({x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2},t.start,t.end),o=Math.max(e.minX,Math.min(e.maxX,n.x)),i=Math.max(e.minY,Math.min(e.maxY,n.y));return{x:(n.x+o)/2,y:(n.y+i)/2}},too=t=\u003e{const e=new Set;for(const n of t.route)n.route_type===\"wire\"\u0026\u0026(n.start_pcb_port_id\u0026\u0026e.add(n.start_pcb_port_id),n.end_pcb_port_id\u0026\u0026e.add(n.end_pcb_port_id));return[...e]},a8e=(t,e,n)=\u003en\u003c0?`PCB trace ${t} overlaps with ${e} (accidental contact)`:`PCB trace ${t} is too close to ${e} (gap: ${n.toFixed(3)}mm)`,fJ=class{constructor(e,n={}){if(this.srj=e,this.traceClearance=n.traceClearance??.1,this.viaClearance=Math.max(n.viaClearance??.1,.1),this.viaToPadClearance=n.viaToPadClearance??this.srj.minViaEdgeToPadEdgeClearance??.1,this.connMap=n.connMap,this.includeTraceViaOwnerMetadata=n.includeTraceViaOwnerMetadata??!1,this.cellSize=n.spatialCellSize??this.getDefaultSpatialCellSize(),!Number.isFinite(this.traceClearance)||this.traceClearance\u003c0)throw new Error(\"traceClearance must be a non-negative finite number\");if(!Number.isFinite(this.viaClearance))throw new Error(\"viaClearance must be a finite number\");if(!Number.isFinite(this.viaToPadClearance)||this.viaToPadClearance\u003c0)throw new Error(\"viaToPadClearance must be a non-negative finite number\");if(!Number.isFinite(this.cellSize)||this.cellSize\u003c=0)throw new Error(\"spatialCellSize must be a positive finite number\");this.compileConnectionAliases(),this.obstacles=this.compileStaticObstacles(),this.indexStaticObstacles()}srj;traceClearance;viaClearance;viaToPadClearance;cellSize;connMap;includeTraceViaOwnerMetadata;canonicalNetByAlias=new Map;connMapNetByCanonicalNet=new Map;obstacles;obstacleIndexesByLayer=new Map;lastRunStats={traceCount:0,segmentCount:0,viaCount:0,obstacleCount:0,broadPhaseCandidateCount:0,exactCheckCount:0};getDefaultSpatialCellSize(){const e=Math.max(0,this.srj.bounds.maxX-this.srj.bounds.minX),n=Math.max(0,this.srj.bounds.maxY-this.srj.bounds.minY);return Math.max(.25,Math.max(e,n)/64,(this.srj.minViaDiameter??.3)+Math.max(this.traceClearance,this.viaToPadClearance))}compileConnectionAliases(){const e=new Map;for(const n of this.srj.connections){const o=n.netConnectionName??n.rootConnectionName??n.name,i=[n.name,n.rootConnectionName,n.netConnectionName,...n.mergedConnectionNames??[],...n.pointsToConnect.flatMap(r=\u003e[r.pointId,r.pcb_port_id])];for(const r of i){if(!r)continue;this.canonicalNetByAlias.set(r,o);const s=this.connMap?.getNetConnectedToId(r);if(!s)continue;let a=e.get(o);a||(a=new Set,e.set(o,a)),a.add(s)}this.canonicalNetByAlias.set(o,o)}for(const[n,o]of e)o.size===1\u0026\u0026this.connMapNetByCanonicalNet.set(n,o.values().next().value)}resolveNetId(e){const n=this.connMap?.getNetConnectedToId(e);if(n)return n;const o=this.canonicalNetByAlias.get(e);return o?this.connMapNetByCanonicalNet.get(o)??o:e}areConnected(e,n){return e===n||!!this.connMap?.areIdsConnected(e,n)||this.resolveNetId(e)===this.resolveNetId(n)}compileStaticObstacles(){const e=[],n=new Set,o=new Set;for(const i of this.srj.obstacles){if(i.layers.length===0)continue;const r=i.connectedTo.find(h=\u003eh.startsWith(\"pcb_smtpad_\")),s=i.connectedTo.find(h=\u003eh.startsWith(\"pcb_plated_hole_\")),a=i.connectedTo.find(h=\u003eh.startsWith(\"pcb_port_\"));if(!r\u0026\u0026!s\u0026\u0026!a)continue;const A=i.layers.length\u003e1,c=A?\"pcb_plated_hole\":\"pcb_smtpad\",l=A?s??`pcb_plated_hole_${i.center.x.toFixed(3)}_${i.center.y.toFixed(3)}`:r??`pcb_smtpad_${i.center.x.toFixed(3)}_${i.center.y.toFixed(3)}`,u=A?o:n;if(u.has(l))continue;u.add(l);const g=A\u0026\u0026Math.abs(i.width-i.height)\u003c.001;e.push({kind:\"obstacle\",obstacleType:c,obstacleId:l,connectedTo:i.connectedTo,x:i.center.x,y:i.center.y,width:i.width,height:i.height,...g?{radius:Math.max(i.width,i.height)/2}:{},layers:i.layers,...a?{pcbPortId:a}:{}})}return e}indexStaticObstacles(){for(const e of this.obstacles){const n=Uae(r8e(e),Math.max(this.traceClearance,this.viaToPadClearance));for(const o of e.layers){let i=this.obstacleIndexesByLayer.get(o);i||(i=new s8e(this.cellSize),this.obstacleIndexesByLayer.set(o,i)),i.insert(e,n)}}}collectDynamicGeometry(e){const n=[],o=[],i=new Set;for(const r of e){const s=this.resolveNetId(r.connection_name),a=too(r);for(let A=0;A\u003cr.route.length-1;A+=1){const c=r.route[A],l=r.route[A+1];c?.route_type===\"wire\"\u0026\u0026l?.route_type===\"wire\"\u0026\u0026c.layer===l.layer\u0026\u0026(Math.abs(c.x-l.x)\u003c=i8e\u0026\u0026Math.abs(c.y-l.y)\u003c=i8e||n.push({kind:\"trace_segment\",order:n.length,traceId:r.pcb_trace_id,netId:s,start:{x:c.x,y:c.y},end:{x:l.x,y:l.y},width:noo(c,l),layer:c.layer,pcbPortIds:a}))}for(const A of r.route){if(A.route_type!==\"via\")continue;const c=`${A.x},${A.y},${A.from_layer},${A.to_layer}`;i.has(c)||(i.add(c),o.push({kind:\"via\",order:o.length,viaId:`via_${o.length}`,traceId:r.pcb_trace_id,netId:s,x:A.x,y:A.y,diameter:A.via_diameter??this.srj.minViaDiameter??.3,layers:[A.from_layer,A.to_layer]}))}}return{segments:n,vias:o}}buildDynamicIndexes(e,n){const o=new Map,i=(r,s,a)=\u003e{let A=o.get(r);A||(A=new s8e(this.cellSize),o.set(r,A)),A.insert(s,Uae(a,this.traceClearance))};for(const r of e)i(r.layer,r,MCt(r));for(const r of n)for(const s of r.layers)i(s,r,Kae(r));return o}obstacleSharesNet(e,n){return n.connectedTo.some(o=\u003ethis.areConnected(e,o))}checkTracePair(e,n){if(this.areConnected(e.netId,n.netId))return;this.lastRunStats.exactCheckCount+=1;const o=M5(e.start,e.end,n.start,n.end)-e.width/2-n.width/2;if(o\u003ethis.traceClearance-_J)return;const i=`overlap_${e.traceId}_${n.traceId}`;return{type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:a8e(e.traceId,`PCB trace ${n.traceId}`,o),pcb_trace_id:e.traceId,source_trace_id:\"\",pcb_trace_error_id:i,minimum_clearance:this.traceClearance,actual_clearance:o,pcb_component_ids:[],pcb_port_ids:[...new Set([...e.pcbPortIds,...n.pcbPortIds])],center:Zno(e,n)}}checkTraceVia(e,n){if(this.areConnected(e.netId,n.netId))return;this.lastRunStats.exactCheckCount+=1;const o=Nz(e.start,e.end,{x:n.x,y:n.y,radius:n.diameter/2})-e.width/2;if(o\u003ethis.traceClearance-_J)return;const i=`overlap_${e.traceId}_${n.viaId}`;return{type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:a8e(e.traceId,`pcb_via \"${n.viaId}\"`,o),pcb_trace_id:e.traceId,...this.includeTraceViaOwnerMetadata?{pcb_trace_ids:[e.traceId,n.traceId],pcb_via_id:n.viaId,pcb_via_ids:[n.viaId]}:{},source_trace_id:\"\",pcb_trace_error_id:i,minimum_clearance:this.traceClearance,actual_clearance:o,pcb_component_ids:[],pcb_port_ids:e.pcbPortIds,center:NCt(e,n)}}checkTraceObstacle(e,n){if(this.obstacleSharesNet(e.netId,n))return;this.lastRunStats.exactCheckCount+=1;const o=r8e(n),i=(n.radius===void 0?Dz(e.start,e.end,o):Nz(e.start,e.end,{x:n.x,y:n.y,radius:n.radius}))-e.width/2;if(i+_J\u003e=this.traceClearance)return;const r=`overlap_${e.traceId}_${n.obstacleId}`;return{type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:a8e(e.traceId,`${n.obstacleType} \"${n.obstacleId}\"`,i),pcb_trace_id:e.traceId,source_trace_id:\"\",pcb_trace_error_id:r,minimum_clearance:this.traceClearance,actual_clearance:i,pcb_component_ids:[],pcb_port_ids:[...new Set([...e.pcbPortIds,...n.pcbPortId?[n.pcbPortId]:[]])],center:n.radius===void 0?eoo(e,o):NCt(e,n)}}checkViaObstacle(e,n){if(this.obstacleSharesNet(e.netId,n))return;this.lastRunStats.exactCheckCount+=1;const o=r8e(n),i=(n.radius===void 0?Math.hypot(Math.max(o.minX-e.x,0,e.x-o.maxX),Math.max(o.minY-e.y,0,e.y-o.maxY)):Math.hypot(e.x-n.x,e.y-n.y)-n.radius)-e.diameter/2;if(i+_J\u003e=this.viaToPadClearance)return;const r=`via_pad_clearance_${e.viaId}_${n.obstacleId}`,s={x:(e.x+n.x)/2,y:(e.y+n.y)/2};return{type:\"pcb_pad_pad_clearance_error\",error_type:\"pcb_pad_pad_clearance_error\",pcb_pad_pad_clearance_error_id:r,message:`pcb_via \"${e.viaId}\" and ${n.obstacleType} \"${n.obstacleId}\" are too close (gap: ${i.toFixed(3)}mm)`,pcb_trace_id:e.traceId,pcb_pad_ids:[e.viaId,n.obstacleId],pcb_via_ids:[e.viaId],minimum_clearance:this.viaToPadClearance,actual_clearance:i,center:s}}checkViaPairs(e){if(e.length\u003c2)return[];const n=[],o=new s8e(this.cellSize);for(const i of e)o.insert(i,Uae(Kae(i),this.viaClearance));for(const i of e)for(const r of o.query(Kae(i))){if(this.lastRunStats.broadPhaseCandidateCount+=1,r.order\u003c=i.order)continue;this.lastRunStats.exactCheckCount+=1;const s=Math.hypot(i.x-r.x,i.y-r.y);if(s\u003c=i8e)continue;const a=s-i.diameter/2-r.diameter/2;if(a+_J\u003e=this.viaClearance)continue;const A=this.areConnected(i.netId,r.netId),c=[i.viaId,r.viaId].sort().join(\"_\"),l={x:(i.x+r.x)/2,y:(i.y+r.y)/2};n.push({type:\"pcb_via_clearance_error\",error_type:\"pcb_via_clearance_error\",pcb_error_id:`${A?\"same_net\":\"different_net\"}_vias_close_${c}`,message:`Vias ${i.viaId} and ${r.viaId}${A?\"\":\" from different nets\"} are too close together (gap: ${a.toFixed(3)}mm)`,pcb_via_ids:[i.viaId,r.viaId],...this.includeTraceViaOwnerMetadata?{pcb_trace_ids:[i.traceId,r.traceId]}:{},pcb_via_pair_net_relation:A?\"same_net\":\"different_net\",minimum_clearance:this.viaClearance,actual_clearance:a,pcb_center:l,center:l})}return n}evaluate(e){return this.evaluateInternal(e,!0)}evaluateLegacy(e){return this.evaluateInternal(e,!1)}evaluateInternal(e,n){const{segments:o,vias:i}=this.collectDynamicGeometry(e),r=this.buildDynamicIndexes(o,i),s=[],a=[];this.lastRunStats={traceCount:e.length,segmentCount:o.length,viaCount:i.length,obstacleCount:this.obstacles.length,broadPhaseCandidateCount:0,exactCheckCount:0};for(const g of o){const h=MCt(g),d=r.get(g.layer)?.query(h)??[],p=this.obstacleIndexesByLayer.get(g.layer)?.query(h)??[];for(const m of d){if(this.lastRunStats.broadPhaseCandidateCount+=1,m.kind===\"trace_segment\"\u0026\u0026m.order\u003c=g.order)continue;const _=m.kind===\"trace_segment\"?this.checkTracePair(g,m):this.checkTraceVia(g,m);_\u0026\u0026s.push(_)}for(const m of p){this.lastRunStats.broadPhaseCandidateCount+=1;const _=this.checkTraceObstacle(g,m);_\u0026\u0026s.push(_)}}const A=this.checkViaPairs(i);if(n)for(const g of i){const h=new Set;for(const d of g.layers){const p=this.obstacleIndexesByLayer.get(d)?.query(Kae(g))??[];for(const m of p){if(h.has(m))continue;h.add(m),this.lastRunStats.broadPhaseCandidateCount+=1;const _=this.checkViaObstacle(g,m);_\u0026\u0026a.push(_)}}}const c=new Map;for(const g of s){const h=String(g.pcb_trace_error_id),d=c.get(h),p=Number(g.actual_clearance);if(!d){c.set(h,{...g,first_contact_center:g.center,first_contact_message:g.message,first_actual_clearance:p,worst_contact_center:g.center,worst_contact_message:g.message,worst_actual_clearance:p});continue}const m=Number(d.worst_actual_clearance);(p\u003cm||!Number.isFinite(m))\u0026\u0026(d.worst_contact_center=g.center,d.worst_contact_message=g.message,d.worst_actual_clearance=p)}const l=[...c.values()].map(g=\u003e({...g,center:typeof g.worst_contact_center==\"object\"?g.worst_contact_center:g.center,message:typeof g.worst_contact_message==\"string\"?g.worst_contact_message:g.message,actual_clearance:typeof g.worst_actual_clearance==\"number\"?g.worst_actual_clearance:g.actual_clearance}));l.push(...a),l.push(...A);const u=l.filter(g=\u003eg.center);return{errors:l,errorsWithCenters:u,locationAwareErrors:u}}},noo=(t,e)=\u003et.width??e.width??.1,ooo=[1,1.75,-1],ioo=[1,1.75,-1],roo=8/3,Dr=1e-6,bA=.001,IJ=.14,CJ=.035,My=.015,A8e=t=\u003et.minTraceToPadEdgeClearance??.16,c8e=t=\u003et.minViaEdgeToPadEdgeClearance??.1,RCt=t=\u003eMath.max(48,Math.round(48*Math.max(1,t))),soo=t=\u003et\u003e=2?ooo:ioo,aoo=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s\u0026\u0026o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){this.netMap[i].push(...this.netMap[r]),this.netMap[r]=this.netMap[i];for(const s of this.netMap[i])this.idToNetMap[s]=i}}for(const r of n)this.netMap[i].includes(r)||this.netMap[i].push(r),this.idToNetMap[r]=i}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return!!i\u0026\u0026(o===i||i===e||i===e)}areAllIdsConnected(e){const n=this.getNetConnectedToId(e[0]);for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}},l8e=t=\u003e{const e=[];for(const o of t)if(o.type===\"source_trace\")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type===\"pcb_port\"){const{pcb_port_id:i,source_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([r,i])}else if(o.type===\"pcb_smtpad\"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_plated_hole\"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_trace\"){const{pcb_trace_id:i,source_trace_id:r}=o,s=Array.isArray(o.route)?o.route.filter(a=\u003ea\u0026\u0026a.route_type===\"wire\"):[];if(r\u0026\u0026i\u0026\u0026e.push([i,r]),Array.isArray(s)){const a=s.find(c=\u003ec?.start_pcb_port_id)?.start_pcb_port_id,A=s.find(c=\u003ec?.end_pcb_port_id)?.end_pcb_port_id;a\u0026\u0026i\u0026\u0026A\u0026\u0026e.push([a,i,A])}}else if(o.type===\"pcb_via\"){const{pcb_via_id:i,pcb_trace_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"source_component\"\u0026\u0026o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=(function(o){const i=new Map;let r=0;function s(a){for(const[,c]of i)if(c.has(a))return c;const A=new Set;return i.set(\"connectivity_net\"+r++,A),A}for(const a of o){let A=null;for(const c of a){if(A){if(!A.has(c)){const l=s(c);if(l!==A){for(const u of l)A.add(u);i.delete(Array.from(i.entries()).find(([,u])=\u003eu===l)[0])}}}else A=s(c);A.add(c)}}return Object.fromEntries(Array.from(i.entries()).map(([a,A])=\u003e[a,Array.from(A)]))})(e);return new aoo(n)},Vae={};e_t(Vae,{all_layers:()=\u003eLJ,any_circuit_element:()=\u003eB3t,any_soup_element:()=\u003eaAe,any_source_component:()=\u003evyt,asset:()=\u003ey8e,base_circuit_json_error:()=\u003eWl,battery_capacity:()=\u003enyt,brep_shape:()=\u003e$8e,cadModelDefaultDirectionMap:()=\u003ezio,cad_component:()=\u003ei3t,cad_model_axis_directions:()=\u003eo3t,cad_model_formats:()=\u003eVio,capacitance:()=\u003eI8e,circuit_json_footprint_load_error:()=\u003ePxt,current:()=\u003evL,distance:()=\u003eao,duration_ms:()=\u003ewL,experiment_type:()=\u003eu3t,external_footprint_load_error:()=\u003ewxt,frequency:()=\u003etN,getZodPrefixedIdWithDefault:()=\u003eSo,inductance:()=\u003eeyt,kicadAt:()=\u003enAe,kicadEffects:()=\u003eoyt,kicadFont:()=\u003ex8e,kicadFootprintAttributes:()=\u003eryt,kicadFootprintMetadata:()=\u003eAyt,kicadFootprintModel:()=\u003eayt,kicadFootprintPad:()=\u003esyt,kicadFootprintProperties:()=\u003eiyt,kicadProperty:()=\u003eFJ,kicadSymbolEffects:()=\u003euyt,kicadSymbolMetadata:()=\u003edyt,kicadSymbolPinNames:()=\u003elyt,kicadSymbolPinNumbers:()=\u003ecyt,kicadSymbolProperties:()=\u003egyt,kicadSymbolProperty:()=\u003euv,layer_ref:()=\u003eWA,layer_string:()=\u003eW8e,length:()=\u003eDi,manufacturing_drc_properties:()=\u003ex2t,ms:()=\u003eJ_,ninePointAnchor:()=\u003eob,parseAndConvertSiUnit:()=\u003eL5,pcbRenderLayer:()=\u003eIio,pcb_autorouting_error:()=\u003eDxt,pcb_board:()=\u003e$2t,pcb_breakout_point:()=\u003eFxt,pcb_component:()=\u003eE2t,pcb_component_invalid_layer_error:()=\u003eJxt,pcb_component_not_on_board_edge_error:()=\u003ezxt,pcb_component_outside_board_error:()=\u003eVxt,pcb_connector_not_in_accessible_orientation_warning:()=\u003eTxt,pcb_copper_pour:()=\u003eKxt,pcb_copper_pour_brep:()=\u003eYxt,pcb_copper_pour_polygon:()=\u003eUxt,pcb_copper_pour_rect:()=\u003eGxt,pcb_copper_text:()=\u003eixt,pcb_courtyard_circle:()=\u003et3t,pcb_courtyard_outline:()=\u003eZxt,pcb_courtyard_overlap_error:()=\u003eyxt,pcb_courtyard_pill:()=\u003en3t,pcb_courtyard_polygon:()=\u003ee3t,pcb_courtyard_rect:()=\u003eXxt,pcb_cutout:()=\u003eQxt,pcb_cutout_circle:()=\u003eBxt,pcb_cutout_path:()=\u003eSxt,pcb_cutout_polygon:()=\u003ebxt,pcb_cutout_rect:()=\u003eExt,pcb_fabrication_note_dimension:()=\u003ehxt,pcb_fabrication_note_path:()=\u003egxt,pcb_fabrication_note_rect:()=\u003edxt,pcb_fabrication_note_text:()=\u003euxt,pcb_footprint_overlap_error:()=\u003eCxt,pcb_ground_plane:()=\u003eLxt,pcb_ground_plane_region:()=\u003eHxt,pcb_group:()=\u003eMxt,pcb_hole:()=\u003eP2t,pcb_hole_circle_or_square_shape:()=\u003ebio,pcb_hole_circle_shape:()=\u003eEio,pcb_hole_oval_shape:()=\u003eSio,pcb_hole_pill_shape:()=\u003eQio,pcb_hole_rect_shape:()=\u003eBio,pcb_hole_rotated_pill_shape:()=\u003evio,pcb_keepout:()=\u003exxt,pcb_manual_edit_conflict_warning:()=\u003eNxt,pcb_missing_footprint_error:()=\u003evxt,pcb_net:()=\u003eW2t,pcb_note_dimension:()=\u003eIxt,pcb_note_line:()=\u003efxt,pcb_note_path:()=\u003e_xt,pcb_note_rect:()=\u003emxt,pcb_note_text:()=\u003epxt,pcb_pad_pad_clearance_error:()=\u003e$xt,pcb_pad_trace_clearance_error:()=\u003eqxt,pcb_panel:()=\u003eq2t,pcb_panelization_placement_error:()=\u003eZ2t,pcb_placement_error:()=\u003eX2t,pcb_plated_hole:()=\u003eM2t,pcb_port:()=\u003eD2t,pcb_port_not_connected_error:()=\u003eJ2t,pcb_port_not_matched_error:()=\u003ez2t,pcb_route_hint:()=\u003eC2t,pcb_route_hints:()=\u003exio,pcb_silkscreen_circle:()=\u003esxt,pcb_silkscreen_graphic:()=\u003ecxt,pcb_silkscreen_graphic_brep:()=\u003eAxt,pcb_silkscreen_line:()=\u003etxt,pcb_silkscreen_oval:()=\u003eaxt,pcb_silkscreen_path:()=\u003enxt,pcb_silkscreen_pill:()=\u003elxt,pcb_silkscreen_rect:()=\u003erxt,pcb_silkscreen_text:()=\u003eoxt,pcb_smtpad:()=\u003eR2t,pcb_smtpad_pill:()=\u003eN2t,pcb_solder_paste:()=\u003eT2t,pcb_text:()=\u003ek2t,pcb_thermal_spoke:()=\u003eOxt,pcb_trace:()=\u003eG2t,pcb_trace_error:()=\u003eK2t,pcb_trace_hint:()=\u003eext,pcb_trace_missing_error:()=\u003eV2t,pcb_trace_route_point:()=\u003eO2t,pcb_trace_route_point_through_pad:()=\u003eH2t,pcb_trace_route_point_via:()=\u003eL2t,pcb_trace_route_point_wire:()=\u003eF2t,pcb_trace_too_long_warning:()=\u003eU2t,pcb_trace_warning:()=\u003eY2t,pcb_via:()=\u003ej2t,pcb_via_clearance_error:()=\u003eWxt,pcb_via_trace_clearance_error:()=\u003ejxt,point:()=\u003e_r,point3:()=\u003enb,point_with_bulge:()=\u003eI2t,port_arrangement:()=\u003e$yt,position:()=\u003e_io,position3:()=\u003efio,resistance:()=\u003etAe,ring:()=\u003ej8e,rotation:()=\u003eim,route_hint_point:()=\u003ey2t,schematic_arc:()=\u003en2t,schematic_box:()=\u003eVyt,schematic_circle:()=\u003et2t,schematic_component:()=\u003eqyt,schematic_component_port_arrangement_by_sides:()=\u003ejyt,schematic_component_port_arrangement_by_size:()=\u003eWyt,schematic_debug_line:()=\u003el2t,schematic_debug_object:()=\u003eg2t,schematic_debug_object_base:()=\u003erAe,schematic_debug_point:()=\u003eu2t,schematic_debug_rect:()=\u003ec2t,schematic_error:()=\u003ea2t,schematic_group:()=\u003ep2t,schematic_layout_error:()=\u003eA2t,schematic_line:()=\u003eZyt,schematic_manual_edit_conflict_warning:()=\u003eh2t,schematic_net_label:()=\u003es2t,schematic_path:()=\u003ezyt,schematic_pin_styles:()=\u003eJyt,schematic_port:()=\u003er2t,schematic_rect:()=\u003ee2t,schematic_sheet:()=\u003ef2t,schematic_symbol:()=\u003eXyt,schematic_table:()=\u003em2t,schematic_table_cell:()=\u003e_2t,schematic_text:()=\u003ei2t,schematic_trace:()=\u003eo2t,schematic_voltage_probe:()=\u003ed2t,simulation_ac_current_source:()=\u003ec3t,simulation_ac_voltage_source:()=\u003es3t,simulation_current_probe:()=\u003ef3t,simulation_current_source:()=\u003el3t,simulation_dc_current_source:()=\u003eA3t,simulation_dc_voltage_source:()=\u003er3t,simulation_experiment:()=\u003ed3t,simulation_op_amp:()=\u003eC3t,simulation_oscilloscope_trace:()=\u003eE3t,simulation_spice_subcircuit:()=\u003ey3t,simulation_switch:()=\u003em3t,simulation_transient_current_graph:()=\u003ep3t,simulation_transient_voltage_graph:()=\u003eh3t,simulation_unknown_experiment_error:()=\u003eI3t,simulation_voltage_probe:()=\u003e_3t,simulation_voltage_source:()=\u003ea3t,size:()=\u003eC8e,source_ambiguous_port_reference:()=\u003eTyt,source_board:()=\u003eRyt,source_component_base:()=\u003evu,source_component_internal_connection:()=\u003ePyt,source_component_misconfigured_error:()=\u003eJ8e,source_component_pins_underspecified_warning:()=\u003eGyt,source_failed_to_create_component_error:()=\u003eEyt,source_group:()=\u003eDyt,source_i2c_misconfigured_error:()=\u003ez8e,source_interconnect:()=\u003eSyt,source_invalid_component_property_error:()=\u003eG8e,source_manually_placed_via:()=\u003eFyt,source_missing_manufacturer_part_number_warning:()=\u003eK8e,source_missing_property_error:()=\u003exyt,source_net:()=\u003eNyt,source_no_ground_pin_defined_warning:()=\u003eOyt,source_no_power_pin_defined_warning:()=\u003eHyt,source_part_not_found_warning:()=\u003eKyt,source_pcb_ground_plane:()=\u003ekyt,source_pin_attributes:()=\u003eIyt,source_pin_missing_trace_warning:()=\u003eU8e,source_pin_must_be_connected_error:()=\u003eYyt,source_port:()=\u003ewyt,source_project_metadata:()=\u003eO8e,source_property_ignored_warning:()=\u003eByt,source_refdes_convention_warning:()=\u003eV8e,source_simple_ammeter:()=\u003efyt,source_simple_battery:()=\u003ev8e,source_simple_capacitor:()=\u003eE8e,source_simple_chip:()=\u003eS8e,source_simple_connector:()=\u003eyyt,source_simple_crystal:()=\u003eCyt,source_simple_current_source:()=\u003emyt,source_simple_diode:()=\u003eiAe,source_simple_fiducial:()=\u003ehyt,source_simple_fuse:()=\u003e_yt,source_simple_ground:()=\u003epyt,source_simple_inductor:()=\u003ew8e,source_simple_led:()=\u003eb8e,source_simple_mosfet:()=\u003eF8e,source_simple_op_amp:()=\u003eL8e,source_simple_pin_header:()=\u003eD8e,source_simple_pinout:()=\u003eN8e,source_simple_potentiometer:()=\u003eM8e,source_simple_power_source:()=\u003eQ8e,source_simple_push_button:()=\u003eP8e,source_simple_resistor:()=\u003eB8e,source_simple_resonator:()=\u003eR8e,source_simple_switch:()=\u003eH8e,source_simple_test_point:()=\u003ek8e,source_simple_transistor:()=\u003eT8e,source_simple_voltage_probe:()=\u003ebyt,source_simple_voltage_source:()=\u003eQyt,source_trace:()=\u003eMyt,source_trace_not_connected_error:()=\u003eY8e,source_unnamed_trace_warning:()=\u003eLyt,spice_simulation_options:()=\u003eg3t,supplier_footprint_mismatch_warning:()=\u003ekxt,supplier_name:()=\u003eoAe,time:()=\u003emio,timestamp:()=\u003etyt,unknown_error_finding_part:()=\u003eUyt,visible_layer:()=\u003eW_,voltage:()=\u003etb,wave_shape:()=\u003eX8e});var zae=t=\u003e{const e=Math.round(1e3*t)/1e3;return`${Number(e.toFixed(3))}mm`},TCt=new Map([[\"T\",1e12],[\"G\",1e9],[\"M\",1e6],[\"K\",1e3],[\"k\",1e3],[\"\",1],[\"m\",.001],[\"µ\",1e-6],[\"μ\",1e-6],[\"u\",1e-6],[\"n\",1e-9],[\"p\",1e-12],[\"f\",1e-15]]),Aoo=[...TCt.keys()];function kCt(t){return TCt.get(t)}var FCt={Hz:{baseUnit:\"Hz\",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:\"g\",variants:{kg:1e3,g:1}},Ω:{baseUnit:\"Ω\",variants:{mΩ:.001,mohm:.001,mOhm:.001,milliohm:.001,Ω:1,ohm:1,Ohm:1,kΩ:1e3,KΩ:1e3,kohm:1e3,kOhm:1e3,KOhm:1e3,Kohm:1e3,MΩ:1e6,Mohm:1e6,MOhm:1e6,megohm:1e6,Megohm:1e6,GΩ:1e9,Gohm:1e9,GOhm:1e9,TΩ:1e12,Tohm:1e12,TOhm:1e12}},V:{baseUnit:\"V\",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:\"A\",variants:{µA:1e-6,μA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:\"F\",variants:{pF:1e-12,nF:1e-9,µF:1e-6,μF:1e-6,uF:1e-6,mF:.001,F:1,kF:1e3,KF:1e3,MF:1e6}},H:{baseUnit:\"H\",variants:{pH:1e-12,nH:1e-9,µH:1e-6,μH:1e-6,uH:1e-6,mH:.001,H:1,kH:1e3,KH:1e3,MH:1e6}},ml:{baseUnit:\"ml\",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:\"deg\",variants:{rad:180/Math.PI}},ms:{baseUnit:\"ms\",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,μs:.001,ms:1,s:1e3}},mm:{baseUnit:\"mm\",variants:{nm:1e-6,µm:.001,μm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},u8e=new Set;for(const[t,e]of Object.entries(FCt)){u8e.add(t);for(const n of Object.keys(e.variants))u8e.add(n)}function L5(t,e){if(t==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t==\"string\"\u0026\u0026t.match(/^-?[\\d.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t==\"number\")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t==\"object\"\u0026\u0026\"x\"in t\u0026\u0026\"y\"in t){const c=L5(t.x,e),l=L5(t.x,e),u=L5(t.y,e);return l.value===null||u.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:c.parsedUnit,unitOfValue:c.unitOfValue,value:{x:l.value,y:u.value}}}const n=t.toString().split(\"\").reverse().join(\"\"),o=n.match(/[^\\d\\s]+/)?.[0];if(!o)throw new Error(`Could not determine unit: \"${t}\"`);const i=o.split(\"\").reverse().join(\"\"),r=t.slice(0,-i.length),s=kCt(i);if(e\u0026\u0026s!=null)return{parsedUnit:null,unitOfValue:e,value:Number.parseFloat(r)*s};if(s!=null\u0026\u0026!u8e.has(i))return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(r)*s};const{baseUnit:a,conversionFactor:A}=(function(c){for(const l of Object.values(FCt)){if(c in l.variants)return{baseUnit:l.baseUnit,conversionFactor:l.variants[c]};for(const[u,g]of Object.entries(l.variants)){if(!c.endsWith(u))continue;const h=kCt(c.slice(0,-u.length));if(h!=null)return{baseUnit:l.baseUnit,conversionFactor:h*g}}}return{baseUnit:c,conversionFactor:1}})(i);return{parsedUnit:i,unitOfValue:a,value:A*Number.parseFloat(r)}}var Cl,Ix,g8e;Aoo.filter(t=\u003et!==\"\").sort((t,e)=\u003ee.length-t.length).map(t=\u003et.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$\u0026\")).join(\"|\");var N={};e_t(N,{BRAND:()=\u003eDoo,DIRTY:()=\u003ejae,EMPTY_PATH:()=\u003euoo,INVALID:()=\u003eea,NEVER:()=\u003epio,OK:()=\u003eDy,ParseStatus:()=\u003eCx,Schema:()=\u003eJA,ZodAny:()=\u003ebL,ZodArray:()=\u003eeN,ZodBigInt:()=\u003eEJ,ZodBoolean:()=\u003eBJ,ZodBranded:()=\u003e_8e,ZodCatch:()=\u003eTJ,ZodDate:()=\u003ebJ,ZodDefault:()=\u003eRJ,ZodDiscriminatedUnion:()=\u003eKCt,ZodEffects:()=\u003erB,ZodEnum:()=\u003eDJ,ZodError:()=\u003eiB,ZodFirstPartyTypeKind:()=\u003eaa,ZodFunction:()=\u003ezCt,ZodIntersection:()=\u003ewJ,ZodIssueCode:()=\u003ehi,ZodLazy:()=\u003ePJ,ZodLiteral:()=\u003eMJ,ZodMap:()=\u003eXae,ZodNaN:()=\u003eeAe,ZodNativeEnum:()=\u003eNJ,ZodNever:()=\u003eeb,ZodNull:()=\u003eQJ,ZodNullable:()=\u003elv,ZodNumber:()=\u003exJ,ZodObject:()=\u003eH5,ZodOptional:()=\u003em7,ZodParsedType:()=\u003exr,ZodPipeline:()=\u003ef8e,ZodPromise:()=\u003eQL,ZodReadonly:()=\u003ekJ,ZodRecord:()=\u003eVCt,ZodSchema:()=\u003eJA,ZodSet:()=\u003eZae,ZodString:()=\u003eBL,ZodSymbol:()=\u003e$ae,ZodTransformer:()=\u003erB,ZodTuple:()=\u003ecv,ZodType:()=\u003eJA,ZodUndefined:()=\u003eSJ,ZodUnion:()=\u003evJ,ZodUnknown:()=\u003eZD,ZodVoid:()=\u003eqae,addIssueToContext:()=\u003enr,any:()=\u003eGoo,array:()=\u003eVoo,bigint:()=\u003ekoo,boolean:()=\u003eXCt,coerce:()=\u003ehio,custom:()=\u003ejCt,date:()=\u003eFoo,datetimeRegex:()=\u003eUCt,defaultErrorMap:()=\u003eEL,discriminatedUnion:()=\u003ejoo,effect:()=\u003eZCt,enum:()=\u003eiio,function:()=\u003etio,getErrorMap:()=\u003eJae,getParsedType:()=\u003eZ8,instanceof:()=\u003eRoo,intersection:()=\u003e$oo,isAborted:()=\u003ed8e,isAsync:()=\u003eyJ,isDirty:()=\u003eh8e,isValid:()=\u003eXD,late:()=\u003eNoo,lazy:()=\u003enio,literal:()=\u003eoio,makeIssue:()=\u003eWae,map:()=\u003eZoo,nan:()=\u003eToo,nativeEnum:()=\u003erio,never:()=\u003eUoo,null:()=\u003eOoo,nullable:()=\u003eAio,number:()=\u003eqCt,object:()=\u003ezoo,objectUtil:()=\u003eg8e,oboolean:()=\u003edio,onumber:()=\u003egio,optional:()=\u003eaio,ostring:()=\u003euio,pipeline:()=\u003elio,preprocess:()=\u003ecio,promise:()=\u003esio,quotelessJson:()=\u003ecoo,record:()=\u003eXoo,set:()=\u003eeio,setErrorMap:()=\u003eloo,strictObject:()=\u003eJoo,string:()=\u003e$Ct,symbol:()=\u003eLoo,transformer:()=\u003eZCt,tuple:()=\u003eqoo,undefined:()=\u003eHoo,union:()=\u003eWoo,unknown:()=\u003eYoo,util:()=\u003eCl,void:()=\u003eKoo}),(Ix=Cl||(Cl={})).assertEqual=t=\u003e{},Ix.assertIs=function(t){},Ix.assertNever=function(t){throw new Error},Ix.arrayToEnum=t=\u003e{const e={};for(const n of t)e[n]=n;return e},Ix.getValidEnumValues=t=\u003e{const e=Ix.objectKeys(t).filter(o=\u003etypeof t[t[o]]!=\"number\"),n={};for(const o of e)n[o]=t[o];return Ix.objectValues(n)},Ix.objectValues=t=\u003eIx.objectKeys(t).map(function(e){return t[e]}),Ix.objectKeys=typeof Object.keys==\"function\"?t=\u003eObject.keys(t):t=\u003e{const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)\u0026\u0026e.push(n);return e},Ix.find=(t,e)=\u003e{for(const n of t)if(e(n))return n},Ix.isInteger=typeof Number.isInteger==\"function\"?t=\u003eNumber.isInteger(t):t=\u003etypeof t==\"number\"\u0026\u0026Number.isFinite(t)\u0026\u0026Math.floor(t)===t,Ix.joinValues=function(t,e=\" | \"){return t.map(n=\u003etypeof n==\"string\"?`'${n}'`:n).join(e)},Ix.jsonStringifyReplacer=(t,e)=\u003etypeof e==\"bigint\"?e.toString():e,(g8e||(g8e={})).mergeShapes=(t,e)=\u003e({...t,...e});var xr=Cl.arrayToEnum([\"string\",\"nan\",\"number\",\"integer\",\"float\",\"boolean\",\"date\",\"bigint\",\"symbol\",\"function\",\"undefined\",\"null\",\"array\",\"object\",\"unknown\",\"promise\",\"void\",\"never\",\"map\",\"set\"]),Z8=t=\u003e{switch(typeof t){case\"undefined\":return xr.undefined;case\"string\":return xr.string;case\"number\":return Number.isNaN(t)?xr.nan:xr.number;case\"boolean\":return xr.boolean;case\"function\":return xr.function;case\"bigint\":return xr.bigint;case\"symbol\":return xr.symbol;case\"object\":return Array.isArray(t)?xr.array:t===null?xr.null:t.then\u0026\u0026typeof t.then==\"function\"\u0026\u0026t.catch\u0026\u0026typeof t.catch==\"function\"?xr.promise:typeof Map\u003c\"u\"\u0026\u0026t instanceof Map?xr.map:typeof Set\u003c\"u\"\u0026\u0026t instanceof Set?xr.set:typeof Date\u003c\"u\"\u0026\u0026t instanceof Date?xr.date:xr.object;default:return xr.unknown}},hi=Cl.arrayToEnum([\"invalid_type\",\"invalid_literal\",\"custom\",\"invalid_union\",\"invalid_union_discriminator\",\"invalid_enum_value\",\"unrecognized_keys\",\"invalid_arguments\",\"invalid_return_type\",\"invalid_date\",\"invalid_string\",\"too_small\",\"too_big\",\"invalid_intersection_types\",\"not_multiple_of\",\"not_finite\"]),coo=t=\u003eJSON.stringify(t,null,2).replace(/\"([^\"]+)\":/g,\"$1:\"),iB=class s5n extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=o=\u003e{this.issues=[...this.issues,o]},this.addIssues=(o=[])=\u003e{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name=\"ZodError\",this.issues=e}format(e){const n=e||function(r){return r.message},o={_errors:[]},i=r=\u003e{for(const s of r.issues)if(s.code===\"invalid_union\")s.unionErrors.map(i);else if(s.code===\"invalid_return_type\")i(s.returnTypeError);else if(s.code===\"invalid_arguments\")i(s.argumentsError);else if(s.path.length===0)o._errors.push(n(s));else{let a=o,A=0;for(;A\u003cs.path.length;){const c=s.path[A];A===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],A++}}};return i(this),o}static assert(e){if(!(e instanceof s5n))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Cl.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=\u003en.message){const n={},o=[];for(const i of this.issues)if(i.path.length\u003e0){const r=i.path[0];n[r]=n[r]||[],n[r].push(e(i))}else o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}};iB.create=t=\u003enew iB(t);var EL=(t,e)=\u003e{let n;switch(t.code){case hi.invalid_type:n=t.received===xr.undefined?\"Required\":`Expected ${t.expected}, received ${t.received}`;break;case hi.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Cl.jsonStringifyReplacer)}`;break;case hi.unrecognized_keys:n=`Unrecognized key(s) in object: ${Cl.joinValues(t.keys,\", \")}`;break;case hi.invalid_union:n=\"Invalid input\";break;case hi.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Cl.joinValues(t.options)}`;break;case hi.invalid_enum_value:n=`Invalid enum value. Expected ${Cl.joinValues(t.options)}, received '${t.received}'`;break;case hi.invalid_arguments:n=\"Invalid function arguments\";break;case hi.invalid_return_type:n=\"Invalid function return type\";break;case hi.invalid_date:n=\"Invalid date\";break;case hi.invalid_string:typeof t.validation==\"object\"?\"includes\"in t.validation?(n=`Invalid input: must include \"${t.validation.includes}\"`,typeof t.validation.position==\"number\"\u0026\u0026(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):\"startsWith\"in t.validation?n=`Invalid input: must start with \"${t.validation.startsWith}\"`:\"endsWith\"in t.validation?n=`Invalid input: must end with \"${t.validation.endsWith}\"`:Cl.assertNever(t.validation):n=t.validation!==\"regex\"?`Invalid ${t.validation}`:\"Invalid\";break;case hi.too_small:n=t.type===\"array\"?`Array must contain ${t.exact?\"exactly\":t.inclusive?\"at least\":\"more than\"} ${t.minimum} element(s)`:t.type===\"string\"?`String must contain ${t.exact?\"exactly\":t.inclusive?\"at least\":\"over\"} ${t.minimum} character(s)`:t.type===\"number\"||t.type===\"bigint\"?`Number must be ${t.exact?\"exactly equal to \":t.inclusive?\"greater than or equal to \":\"greater than \"}${t.minimum}`:t.type===\"date\"?`Date must be ${t.exact?\"exactly equal to \":t.inclusive?\"greater than or equal to \":\"greater than \"}${new Date(Number(t.minimum))}`:\"Invalid input\";break;case hi.too_big:n=t.type===\"array\"?`Array must contain ${t.exact?\"exactly\":t.inclusive?\"at most\":\"less than\"} ${t.maximum} element(s)`:t.type===\"string\"?`String must contain ${t.exact?\"exactly\":t.inclusive?\"at most\":\"under\"} ${t.maximum} character(s)`:t.type===\"number\"?`Number must be ${t.exact?\"exactly\":t.inclusive?\"less than or equal to\":\"less than\"} ${t.maximum}`:t.type===\"bigint\"?`BigInt must be ${t.exact?\"exactly\":t.inclusive?\"less than or equal to\":\"less than\"} ${t.maximum}`:t.type===\"date\"?`Date must be ${t.exact?\"exactly\":t.inclusive?\"smaller than or equal to\":\"smaller than\"} ${new Date(Number(t.maximum))}`:\"Invalid input\";break;case hi.custom:n=\"Invalid input\";break;case hi.invalid_intersection_types:n=\"Intersection results could not be merged\";break;case hi.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case hi.not_finite:n=\"Number must be finite\";break;default:n=e.defaultError,Cl.assertNever(t)}return{message:n}},LCt=EL;function loo(t){LCt=t}function Jae(){return LCt}var Wae=t=\u003e{const{data:e,path:n,errorMaps:o,issueData:i}=t,r=[...n,...i.path||[]],s={...i,path:r};if(i.message!==void 0)return{...i,path:r,message:i.message};let a=\"\";const A=o.filter(c=\u003e!!c).slice().reverse();for(const c of A)a=c(s,{data:e,defaultError:a}).message;return{...i,path:r,message:a}},uoo=[];function nr(t,e){const n=Jae(),o=Wae({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===EL?void 0:EL].filter(i=\u003e!!i)});t.common.issues.push(o)}var rs,HCt,Cx=class a5n{constructor(){this.value=\"valid\"}dirty(){this.value===\"valid\"\u0026\u0026(this.value=\"dirty\")}abort(){this.value!==\"aborted\"\u0026\u0026(this.value=\"aborted\")}static mergeArray(e,n){const o=[];for(const i of n){if(i.status===\"aborted\")return ea;i.status===\"dirty\"\u0026\u0026e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const r=await i.key,s=await i.value;o.push({key:r,value:s})}return a5n.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:r,value:s}=i;if(r.status===\"aborted\"||s.status===\"aborted\")return ea;r.status===\"dirty\"\u0026\u0026e.dirty(),s.status===\"dirty\"\u0026\u0026e.dirty(),r.value===\"__proto__\"||s.value===void 0\u0026\u0026!i.alwaysSet||(o[r.value]=s.value)}return{status:e.value,value:o}}},ea=Object.freeze({status:\"aborted\"}),jae=t=\u003e({status:\"dirty\",value:t}),Dy=t=\u003e({status:\"valid\",value:t}),d8e=t=\u003et.status===\"aborted\",h8e=t=\u003et.status===\"dirty\",XD=t=\u003et.status===\"valid\",yJ=t=\u003etypeof Promise\u003c\"u\"\u0026\u0026t instanceof Promise;(HCt=rs||(rs={})).errToObj=t=\u003etypeof t==\"string\"?{message:t}:t||{},HCt.toString=t=\u003etypeof t==\"string\"?t:t?.message;var p7=class{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},OCt=(t,e)=\u003e{if(XD(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error(\"Validation failed but no issues detected.\");return{success:!1,get error(){if(this._error)return this._error;const n=new iB(t.common.issues);return this._error=n,this._error}}};function SA(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e\u0026\u0026(n||o))throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(r,s)=\u003e{const{message:a}=t;return r.code===\"invalid_enum_value\"?{message:a??s.defaultError}:s.data===void 0?{message:a??o??s.defaultError}:r.code!==\"invalid_type\"?{message:s.defaultError}:{message:a??n??s.defaultError}},description:i}}var p8e,JA=class{get description(){return this._def.description}_getType(e){return Z8(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Z8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Cx,ctx:{common:e.parent.common,data:e.data,parsedType:Z8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(yJ(n))throw new Error(\"Synchronous parse encountered promise.\");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){const o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z8(e)},i=this._parseSync({data:e,path:o.path,parent:o});return OCt(o,i)}\"~validate\"(e){const n={common:{issues:[],async:!!this[\"~standard\"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z8(e)};if(!this[\"~standard\"].async)try{const o=this._parseSync({data:e,path:[],parent:n});return XD(o)?{value:o.value}:{issues:n.common.issues}}catch(o){o?.message?.toLowerCase()?.includes(\"encountered\")\u0026\u0026(this[\"~standard\"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(o=\u003eXD(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z8(e)},i=this._parse({data:e,path:o.path,parent:o}),r=await(yJ(i)?i:Promise.resolve(i));return OCt(o,r)}refine(e,n){const o=i=\u003etypeof n==\"string\"||n===void 0?{message:n}:typeof n==\"function\"?n(i):n;return this._refinement((i,r)=\u003e{const s=e(i),a=()=\u003er.addIssue({code:hi.custom,...o(i)});return typeof Promise\u003c\"u\"\u0026\u0026s instanceof Promise?s.then(A=\u003e!!A||(a(),!1)):!!s||(a(),!1)})}refinement(e,n){return this._refinement((o,i)=\u003e!!e(o)||(i.addIssue(typeof n==\"function\"?n(o,i):n),!1))}_refinement(e){return new rB({schema:this,typeName:aa.ZodEffects,effect:{type:\"refinement\",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[\"~standard\"]={version:1,vendor:\"zod\",validate:n=\u003ethis[\"~validate\"](n)}}optional(){return m7.create(this,this._def)}nullable(){return lv.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eN.create(this)}promise(){return QL.create(this,this._def)}or(e){return vJ.create([this,e],this._def)}and(e){return wJ.create(this,e,this._def)}transform(e){return new rB({...SA(this._def),schema:this,typeName:aa.ZodEffects,effect:{type:\"transform\",transform:e}})}default(e){const n=typeof e==\"function\"?e:()=\u003ee;return new RJ({...SA(this._def),innerType:this,defaultValue:n,typeName:aa.ZodDefault})}brand(){return new _8e({typeName:aa.ZodBranded,type:this,...SA(this._def)})}catch(e){const n=typeof e==\"function\"?e:()=\u003ee;return new TJ({...SA(this._def),innerType:this,catchValue:n,typeName:aa.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return f8e.create(this,e)}readonly(){return kJ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},goo=/^c[^\\s-]{8,}$/i,doo=/^[0-9a-z]+$/,hoo=/^[0-9A-HJKMNP-TV-Z]{26}$/i,poo=/^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0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Boo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,boo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,GCt=\"((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))\",Soo=new RegExp(`^${GCt} dist/standalone.min.js - muse/esp32-eink-display - tscircuit );function YCt(t){let e=\"[0-5]\\\\d\";return t.precision?e=`${e}\\\\.\\\\d{${t.precision}}`:t.precision==null\u0026\u0026(e=`${e}(\\\\.\\\\d+)?`),`([01]\\\\d|2[0-3]):[0-5]\\\\d(:${e})${t.precision?\"+\":\"?\"}`}function Qoo(t){return new RegExp(`^${YCt(t)} dist/standalone.min.js - muse/esp32-eink-display - tscircuit )}function UCt(t){let e=`${GCt}T${YCt(t)}`;const n=[];return n.push(t.local?\"Z?\":\"Z\"),t.offset\u0026\u0026n.push(\"([+-]\\\\d{2}:?\\\\d{2})\"),e=`${e}(${n.join(\"|\")})`,new RegExp(`^${e} dist/standalone.min.js - muse/esp32-eink-display - tscircuit )}function voo(t,e){return!(e!==\"v4\"\u0026\u0026e||!Coo.test(t))||!(e!==\"v6\"\u0026\u0026e||!xoo.test(t))}function woo(t,e){if(!_oo.test(t))return!1;try{const[n]=t.split(\".\");if(!n)return!1;const o=n.replace(/-/g,\"+\").replace(/_/g,\"/\").padEnd(n.length+(4-n.length%4)%4,\"=\"),i=JSON.parse(atob(o));return typeof i==\"object\"\u0026\u0026i!==null\u0026\u0026(!(\"typ\"in i)||i?.typ===\"JWT\")\u0026\u0026!!i.alg\u0026\u0026(!e||i.alg===e)}catch{return!1}}function Poo(t,e){return!(e!==\"v4\"\u0026\u0026e||!yoo.test(t))||!(e!==\"v6\"\u0026\u0026e||!Eoo.test(t))}var BL=class jte extends JA{_parse(e){if(this._def.coerce\u0026\u0026(e.data=String(e.data)),this._getType(e)!==xr.string){const i=this._getOrReturnCtx(e);return nr(i,{code:hi.invalid_type,expected:xr.string,received:i.parsedType}),ea}const n=new Cx;let o;for(const i of this._def.checks)if(i.kind===\"min\")e.data.length\u003ci.value\u0026\u0026(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_small,minimum:i.value,type:\"string\",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind===\"max\")e.data.length\u003ei.value\u0026\u0026(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_big,maximum:i.value,type:\"string\",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind===\"length\"){const r=e.data.length\u003ei.value,s=e.data.length\u003ci.value;(r||s)\u0026\u0026(o=this._getOrReturnCtx(e,o),r?nr(o,{code:hi.too_big,maximum:i.value,type:\"string\",inclusive:!0,exact:!0,message:i.message}):s\u0026\u0026nr(o,{code:hi.too_small,minimum:i.value,type:\"string\",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind===\"email\")Ioo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"email\",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind===\"emoji\")p8e||(p8e=new RegExp(\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\",\"u\")),p8e.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"emoji\",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind===\"uuid\")poo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"uuid\",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind===\"nanoid\")moo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"nanoid\",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind===\"cuid\")goo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"cuid\",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind===\"cuid2\")doo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"cuid2\",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind===\"ulid\")hoo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"ulid\",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind===\"url\")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),nr(o,{validation:\"url\",code:hi.invalid_string,message:i.message}),n.dirty()}else i.kind===\"regex\"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"regex\",code:hi.invalid_string,message:i.message}),n.dirty())):i.kind===\"trim\"?e.data=e.data.trim():i.kind===\"includes\"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind===\"toLowerCase\"?e.data=e.data.toLowerCase():i.kind===\"toUpperCase\"?e.data=e.data.toUpperCase():i.kind===\"startsWith\"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind===\"endsWith\"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind===\"datetime\"?UCt(i).test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:\"datetime\",message:i.message}),n.dirty()):i.kind===\"date\"?Soo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:\"date\",message:i.message}),n.dirty()):i.kind===\"time\"?Qoo(i).test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:\"time\",message:i.message}),n.dirty()):i.kind===\"duration\"?foo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"duration\",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind===\"ip\"?voo(e.data,i.version)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"ip\",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind===\"jwt\"?woo(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"jwt\",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind===\"cidr\"?Poo(e.data,i.version)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"cidr\",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind===\"base64\"?Boo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"base64\",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind===\"base64url\"?boo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:\"base64url\",code:hi.invalid_string,message:i.message}),n.dirty()):Cl.assertNever(i);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(i=\u003ee.test(i),{validation:n,code:hi.invalid_string,...rs.errToObj(o)})}_addCheck(e){return new jte({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:\"email\",...rs.errToObj(e)})}url(e){return this._addCheck({kind:\"url\",...rs.errToObj(e)})}emoji(e){return this._addCheck({kind:\"emoji\",...rs.errToObj(e)})}uuid(e){return this._addCheck({kind:\"uuid\",...rs.errToObj(e)})}nanoid(e){return this._addCheck({kind:\"nanoid\",...rs.errToObj(e)})}cuid(e){return this._addCheck({kind:\"cuid\",...rs.errToObj(e)})}cuid2(e){return this._addCheck({kind:\"cuid2\",...rs.errToObj(e)})}ulid(e){return this._addCheck({kind:\"ulid\",...rs.errToObj(e)})}base64(e){return this._addCheck({kind:\"base64\",...rs.errToObj(e)})}base64url(e){return this._addCheck({kind:\"base64url\",...rs.errToObj(e)})}jwt(e){return this._addCheck({kind:\"jwt\",...rs.errToObj(e)})}ip(e){return this._addCheck({kind:\"ip\",...rs.errToObj(e)})}cidr(e){return this._addCheck({kind:\"cidr\",...rs.errToObj(e)})}datetime(e){return typeof e==\"string\"?this._addCheck({kind:\"datetime\",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:\"datetime\",precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...rs.errToObj(e?.message)})}date(e){return this._addCheck({kind:\"date\",message:e})}time(e){return typeof e==\"string\"?this._addCheck({kind:\"time\",precision:null,message:e}):this._addCheck({kind:\"time\",precision:e?.precision===void 0?null:e?.precision,...rs.errToObj(e?.message)})}duration(e){return this._addCheck({kind:\"duration\",...rs.errToObj(e)})}regex(e,n){return this._addCheck({kind:\"regex\",regex:e,...rs.errToObj(n)})}includes(e,n){return this._addCheck({kind:\"includes\",value:e,position:n?.position,...rs.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:\"startsWith\",value:e,...rs.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:\"endsWith\",value:e,...rs.errToObj(n)})}min(e,n){return this._addCheck({kind:\"min\",value:e,...rs.errToObj(n)})}max(e,n){return this._addCheck({kind:\"max\",value:e,...rs.errToObj(n)})}length(e,n){return this._addCheck({kind:\"length\",value:e,...rs.errToObj(n)})}nonempty(e){return this.min(1,rs.errToObj(e))}trim(){return new jte({...this._def,checks:[...this._def.checks,{kind:\"trim\"}]})}toLowerCase(){return new jte({...this._def,checks:[...this._def.checks,{kind:\"toLowerCase\"}]})}toUpperCase(){return new jte({...this._def,checks:[...this._def.checks,{kind:\"toUpperCase\"}]})}get isDatetime(){return!!this._def.checks.find(e=\u003ee.kind===\"datetime\")}get isDate(){return!!this._def.checks.find(e=\u003ee.kind===\"date\")}get isTime(){return!!this._def.checks.find(e=\u003ee.kind===\"time\")}get isDuration(){return!!this._def.checks.find(e=\u003ee.kind===\"duration\")}get isEmail(){return!!this._def.checks.find(e=\u003ee.kind===\"email\")}get isURL(){return!!this._def.checks.find(e=\u003ee.kind===\"url\")}get isEmoji(){return!!this._def.checks.find(e=\u003ee.kind===\"emoji\")}get isUUID(){return!!this._def.checks.find(e=\u003ee.kind===\"uuid\")}get isNANOID(){return!!this._def.checks.find(e=\u003ee.kind===\"nanoid\")}get isCUID(){return!!this._def.checks.find(e=\u003ee.kind===\"cuid\")}get isCUID2(){return!!this._def.checks.find(e=\u003ee.kind===\"cuid2\")}get isULID(){return!!this._def.checks.find(e=\u003ee.kind===\"ulid\")}get isIP(){return!!this._def.checks.find(e=\u003ee.kind===\"ip\")}get isCIDR(){return!!this._def.checks.find(e=\u003ee.kind===\"cidr\")}get isBase64(){return!!this._def.checks.find(e=\u003ee.kind===\"base64\")}get isBase64url(){return!!this._def.checks.find(e=\u003ee.kind===\"base64url\")}get minLength(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e}};function Moo(t,e){const n=(t.toString().split(\".\")[1]||\"\").length,o=(e.toString().split(\".\")[1]||\"\").length,i=n\u003eo?n:o;return Number.parseInt(t.toFixed(i).replace(\".\",\"\"))%Number.parseInt(e.toFixed(i).replace(\".\",\"\"))/10**i}BL.create=t=\u003enew BL({checks:[],typeName:aa.ZodString,coerce:t?.coerce??!1,...SA(t)});var xJ=class hit extends JA{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce\u0026\u0026(e.data=Number(e.data)),this._getType(e)!==xr.number){const i=this._getOrReturnCtx(e);return nr(i,{code:hi.invalid_type,expected:xr.number,received:i.parsedType}),ea}let n;const o=new Cx;for(const i of this._def.checks)i.kind===\"int\"?Cl.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.invalid_type,expected:\"integer\",received:\"float\",message:i.message}),o.dirty()):i.kind===\"min\"?(i.inclusive?e.data\u003ci.value:e.data\u003c=i.value)\u0026\u0026(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_small,minimum:i.value,type:\"number\",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind===\"max\"?(i.inclusive?e.data\u003ei.value:e.data\u003e=i.value)\u0026\u0026(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_big,maximum:i.value,type:\"number\",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind===\"multipleOf\"?Moo(e.data,i.value)!==0\u0026\u0026(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind===\"finite\"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.not_finite,message:i.message}),o.dirty()):Cl.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit(\"min\",e,!0,rs.toString(n))}gt(e,n){return this.setLimit(\"min\",e,!1,rs.toString(n))}lte(e,n){return this.setLimit(\"max\",e,!0,rs.toString(n))}lt(e,n){return this.setLimit(\"max\",e,!1,rs.toString(n))}setLimit(e,n,o,i){return new hit({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:rs.toString(i)}]})}_addCheck(e){return new hit({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:\"int\",message:rs.toString(e)})}positive(e){return this._addCheck({kind:\"min\",value:0,inclusive:!1,message:rs.toString(e)})}negative(e){return this._addCheck({kind:\"max\",value:0,inclusive:!1,message:rs.toString(e)})}nonpositive(e){return this._addCheck({kind:\"max\",value:0,inclusive:!0,message:rs.toString(e)})}nonnegative(e){return this._addCheck({kind:\"min\",value:0,inclusive:!0,message:rs.toString(e)})}multipleOf(e,n){return this._addCheck({kind:\"multipleOf\",value:e,message:rs.toString(n)})}finite(e){return this._addCheck({kind:\"finite\",message:rs.toString(e)})}safe(e){return this._addCheck({kind:\"min\",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:rs.toString(e)})._addCheck({kind:\"max\",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:rs.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=\u003ee.kind===\"int\"||e.kind===\"multipleOf\"\u0026\u0026Cl.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind===\"finite\"||o.kind===\"int\"||o.kind===\"multipleOf\")return!0;o.kind===\"min\"?(n===null||o.value\u003en)\u0026\u0026(n=o.value):o.kind===\"max\"\u0026\u0026(e===null||o.value\u003ce)\u0026\u0026(e=o.value)}return Number.isFinite(n)\u0026\u0026Number.isFinite(e)}};xJ.create=t=\u003enew xJ({checks:[],typeName:aa.ZodNumber,coerce:t?.coerce||!1,...SA(t)});var EJ=class pit extends JA{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==xr.bigint)return this._getInvalidInput(e);let n;const o=new Cx;for(const i of this._def.checks)i.kind===\"min\"?(i.inclusive?e.data\u003ci.value:e.data\u003c=i.value)\u0026\u0026(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_small,type:\"bigint\",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind===\"max\"?(i.inclusive?e.data\u003ei.value:e.data\u003e=i.value)\u0026\u0026(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_big,type:\"bigint\",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind===\"multipleOf\"?e.data%i.value!==BigInt(0)\u0026\u0026(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Cl.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return nr(n,{code:hi.invalid_type,expected:xr.bigint,received:n.parsedType}),ea}gte(e,n){return this.setLimit(\"min\",e,!0,rs.toString(n))}gt(e,n){return this.setLimit(\"min\",e,!1,rs.toString(n))}lte(e,n){return this.setLimit(\"max\",e,!0,rs.toString(n))}lt(e,n){return this.setLimit(\"max\",e,!1,rs.toString(n))}setLimit(e,n,o,i){return new pit({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:rs.toString(i)}]})}_addCheck(e){return new pit({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!1,message:rs.toString(e)})}negative(e){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!1,message:rs.toString(e)})}nonpositive(e){return this._addCheck({kind:\"max\",value:BigInt(0),inclusive:!0,message:rs.toString(e)})}nonnegative(e){return this._addCheck({kind:\"min\",value:BigInt(0),inclusive:!0,message:rs.toString(e)})}multipleOf(e,n){return this._addCheck({kind:\"multipleOf\",value:e,message:rs.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e}};EJ.create=t=\u003enew EJ({checks:[],typeName:aa.ZodBigInt,coerce:t?.coerce??!1,...SA(t)});var BJ=class extends JA{_parse(t){if(this._def.coerce\u0026\u0026(t.data=!!t.data),this._getType(t)!==xr.boolean){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.boolean,received:e.parsedType}),ea}return Dy(t.data)}};BJ.create=t=\u003enew BJ({typeName:aa.ZodBoolean,coerce:t?.coerce||!1,...SA(t)});var bJ=class A5n extends JA{_parse(e){if(this._def.coerce\u0026\u0026(e.data=new Date(e.data)),this._getType(e)!==xr.date){const i=this._getOrReturnCtx(e);return nr(i,{code:hi.invalid_type,expected:xr.date,received:i.parsedType}),ea}if(Number.isNaN(e.data.getTime()))return nr(this._getOrReturnCtx(e),{code:hi.invalid_date}),ea;const n=new Cx;let o;for(const i of this._def.checks)i.kind===\"min\"?e.data.getTime()\u003ci.value\u0026\u0026(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:\"date\"}),n.dirty()):i.kind===\"max\"?e.data.getTime()\u003ei.value\u0026\u0026(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:\"date\"}),n.dirty()):Cl.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new A5n({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:\"min\",value:e.getTime(),message:rs.toString(n)})}max(e,n){return this._addCheck({kind:\"max\",value:e.getTime(),message:rs.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind===\"min\"\u0026\u0026(e===null||n.value\u003ee)\u0026\u0026(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind===\"max\"\u0026\u0026(e===null||n.value\u003ce)\u0026\u0026(e=n.value);return e!=null?new Date(e):null}};bJ.create=t=\u003enew bJ({checks:[],coerce:t?.coerce||!1,typeName:aa.ZodDate,...SA(t)});var $ae=class extends JA{_parse(t){if(this._getType(t)!==xr.symbol){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.symbol,received:e.parsedType}),ea}return Dy(t.data)}};$ae.create=t=\u003enew $ae({typeName:aa.ZodSymbol,...SA(t)});var SJ=class extends JA{_parse(t){if(this._getType(t)!==xr.undefined){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.undefined,received:e.parsedType}),ea}return Dy(t.data)}};SJ.create=t=\u003enew SJ({typeName:aa.ZodUndefined,...SA(t)});var QJ=class extends JA{_parse(t){if(this._getType(t)!==xr.null){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.null,received:e.parsedType}),ea}return Dy(t.data)}};QJ.create=t=\u003enew QJ({typeName:aa.ZodNull,...SA(t)});var bL=class extends JA{constructor(){super(...arguments),this._any=!0}_parse(t){return Dy(t.data)}};bL.create=t=\u003enew bL({typeName:aa.ZodAny,...SA(t)});var ZD=class extends JA{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Dy(t.data)}};ZD.create=t=\u003enew ZD({typeName:aa.ZodUnknown,...SA(t)});var eb=class extends JA{_parse(t){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.never,received:e.parsedType}),ea}};eb.create=t=\u003enew eb({typeName:aa.ZodNever,...SA(t)});var qae=class extends JA{_parse(t){if(this._getType(t)!==xr.undefined){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.void,received:e.parsedType}),ea}return Dy(t.data)}};qae.create=t=\u003enew qae({typeName:aa.ZodVoid,...SA(t)});var eN=class Vye extends JA{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==xr.array)return nr(n,{code:hi.invalid_type,expected:xr.array,received:n.parsedType}),ea;if(i.exactLength!==null){const s=n.data.length\u003ei.exactLength.value,a=n.data.length\u003ci.exactLength.value;(s||a)\u0026\u0026(nr(n,{code:s?hi.too_big:hi.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:\"array\",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null\u0026\u0026n.data.length\u003ci.minLength.value\u0026\u0026(nr(n,{code:hi.too_small,minimum:i.minLength.value,type:\"array\",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null\u0026\u0026n.data.length\u003ei.maxLength.value\u0026\u0026(nr(n,{code:hi.too_big,maximum:i.maxLength.value,type:\"array\",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=\u003ei.type._parseAsync(new p7(n,s,n.path,a)))).then(s=\u003eCx.mergeArray(o,s));const r=[...n.data].map((s,a)=\u003ei.type._parseSync(new p7(n,s,n.path,a)));return Cx.mergeArray(o,r)}get element(){return this._def.type}min(e,n){return new Vye({...this._def,minLength:{value:e,message:rs.toString(n)}})}max(e,n){return new Vye({...this._def,maxLength:{value:e,message:rs.toString(n)}})}length(e,n){return new Vye({...this._def,exactLength:{value:e,message:rs.toString(n)}})}nonempty(e){return this.min(1,e)}};function SL(t){if(t instanceof H5){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=m7.create(SL(o))}return new H5({...t._def,shape:()=\u003ee})}return t instanceof eN?new eN({...t._def,type:SL(t.element)}):t instanceof m7?m7.create(SL(t.unwrap())):t instanceof lv?lv.create(SL(t.unwrap())):t instanceof cv?cv.create(t.items.map(e=\u003eSL(e))):t}eN.create=(t,e)=\u003enew eN({type:t,minLength:null,maxLength:null,exactLength:null,typeName:aa.ZodArray,...SA(e)});var H5=class v9 extends JA{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Cl.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==xr.object){const A=this._getOrReturnCtx(e);return nr(A,{code:hi.invalid_type,expected:xr.object,received:A.parsedType}),ea}const{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:r}=this._getCached(),s=[];if(!(this._def.catchall instanceof eb\u0026\u0026this._def.unknownKeys===\"strip\"))for(const A in o.data)r.includes(A)||s.push(A);const a=[];for(const A of r){const c=i[A],l=o.data[A];a.push({key:{status:\"valid\",value:A},value:c._parse(new p7(o,l,o.path,A)),alwaysSet:A in o.data})}if(this._def.catchall instanceof eb){const A=this._def.unknownKeys;if(A===\"passthrough\")for(const c of s)a.push({key:{status:\"valid\",value:c},value:{status:\"valid\",value:o.data[c]}});else if(A===\"strict\")s.length\u003e0\u0026\u0026(nr(o,{code:hi.unrecognized_keys,keys:s}),n.dirty());else if(A!==\"strip\")throw new Error(\"Internal ZodObject error: invalid unknownKeys value.\")}else{const A=this._def.catchall;for(const c of s){const l=o.data[c];a.push({key:{status:\"valid\",value:c},value:A._parse(new p7(o,l,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=\u003e{const A=[];for(const c of a){const l=await c.key,u=await c.value;A.push({key:l,value:u,alwaysSet:c.alwaysSet})}return A}).then(A=\u003eCx.mergeObjectSync(n,A)):Cx.mergeObjectSync(n,a)}get shape(){return this._def.shape()}strict(e){return rs.errToObj,new v9({...this._def,unknownKeys:\"strict\",...e!==void 0?{errorMap:(n,o)=\u003e{const i=this._def.errorMap?.(n,o).message??o.defaultError;return n.code===\"unrecognized_keys\"?{message:rs.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new v9({...this._def,unknownKeys:\"strip\"})}passthrough(){return new v9({...this._def,unknownKeys:\"passthrough\"})}extend(e){return new v9({...this._def,shape:()=\u003e({...this._def.shape(),...e})})}merge(e){return new v9({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=\u003e({...this._def.shape(),...e._def.shape()}),typeName:aa.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new v9({...this._def,catchall:e})}pick(e){const n={};for(const o of Cl.objectKeys(e))e[o]\u0026\u0026this.shape[o]\u0026\u0026(n[o]=this.shape[o]);return new v9({...this._def,shape:()=\u003en})}omit(e){const n={};for(const o of Cl.objectKeys(this.shape))e[o]||(n[o]=this.shape[o]);return new v9({...this._def,shape:()=\u003en})}deepPartial(){return SL(this)}partial(e){const n={};for(const o of Cl.objectKeys(this.shape)){const i=this.shape[o];e\u0026\u0026!e[o]?n[o]=i:n[o]=i.optional()}return new v9({...this._def,shape:()=\u003en})}required(e){const n={};for(const o of Cl.objectKeys(this.shape))if(e\u0026\u0026!e[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof m7;)i=i._def.innerType;n[o]=i}return new v9({...this._def,shape:()=\u003en})}keyof(){return JCt(Cl.objectKeys(this.shape))}};H5.create=(t,e)=\u003enew H5({shape:()=\u003et,unknownKeys:\"strip\",catchall:eb.create(),typeName:aa.ZodObject,...SA(e)}),H5.strictCreate=(t,e)=\u003enew H5({shape:()=\u003et,unknownKeys:\"strict\",catchall:eb.create(),typeName:aa.ZodObject,...SA(e)}),H5.lazycreate=(t,e)=\u003enew H5({shape:t,unknownKeys:\"strip\",catchall:eb.create(),typeName:aa.ZodObject,...SA(e)});var vJ=class extends JA{_parse(t){const{ctx:e}=this._processInputParams(t),n=this._def.options;if(e.common.async)return Promise.all(n.map(async o=\u003e{const i={...e,common:{...e.common,issues:[]},parent:null};return{result:await o._parseAsync({data:e.data,path:e.path,parent:i}),ctx:i}})).then(function(o){for(const r of o)if(r.result.status===\"valid\")return r.result;for(const r of o)if(r.result.status===\"dirty\")return e.common.issues.push(...r.ctx.common.issues),r.result;const i=o.map(r=\u003enew iB(r.ctx.common.issues));return nr(e,{code:hi.invalid_union,unionErrors:i}),ea});{let o;const i=[];for(const s of n){const a={...e,common:{...e.common,issues:[]},parent:null},A=s._parseSync({data:e.data,path:e.path,parent:a});if(A.status===\"valid\")return A;A.status!==\"dirty\"||o||(o={result:A,ctx:a}),a.common.issues.length\u0026\u0026i.push(a.common.issues)}if(o)return e.common.issues.push(...o.ctx.common.issues),o.result;const r=i.map(s=\u003enew iB(s));return nr(e,{code:hi.invalid_union,unionErrors:r}),ea}}get options(){return this._def.options}};vJ.create=(t,e)=\u003enew vJ({options:t,typeName:aa.ZodUnion,...SA(e)});var Av=t=\u003et instanceof PJ?Av(t.schema):t instanceof rB?Av(t.innerType()):t instanceof MJ?[t.value]:t instanceof DJ?t.options:t instanceof NJ?Cl.objectValues(t.enum):t instanceof RJ?Av(t._def.innerType):t instanceof SJ?[void 0]:t instanceof QJ?[null]:t instanceof m7?[void 0,...Av(t.unwrap())]:t instanceof lv?[null,...Av(t.unwrap())]:t instanceof _8e||t instanceof kJ?Av(t.unwrap()):t instanceof TJ?Av(t._def.innerType):[],KCt=class c5n extends JA{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==xr.object)return nr(n,{code:hi.invalid_type,expected:xr.object,received:n.parsedType}),ea;const o=this.discriminator,i=n.data[o],r=this.optionsMap.get(i);return r?n.common.async?r._parseAsync({data:n.data,path:n.path,parent:n}):r._parseSync({data:n.data,path:n.path,parent:n}):(nr(n,{code:hi.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ea)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const r of n){const s=Av(r.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \\`${e}\\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,r)}}return new c5n({typeName:aa.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...SA(o)})}};function m8e(t,e){const n=Z8(t),o=Z8(e);if(t===e)return{valid:!0,data:t};if(n===xr.object\u0026\u0026o===xr.object){const i=Cl.objectKeys(e),r=Cl.objectKeys(t).filter(a=\u003ei.indexOf(a)!==-1),s={...t,...e};for(const a of r){const A=m8e(t[a],e[a]);if(!A.valid)return{valid:!1};s[a]=A.data}return{valid:!0,data:s}}if(n===xr.array\u0026\u0026o===xr.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let r=0;r\u003ct.length;r++){const s=m8e(t[r],e[r]);if(!s.valid)return{valid:!1};i.push(s.data)}return{valid:!0,data:i}}return n===xr.date\u0026\u0026o===xr.date\u0026\u0026+t==+e?{valid:!0,data:t}:{valid:!1}}var wJ=class extends JA{_parse(t){const{status:e,ctx:n}=this._processInputParams(t),o=(i,r)=\u003e{if(d8e(i)||d8e(r))return ea;const s=m8e(i.value,r.value);return s.valid?((h8e(i)||h8e(r))\u0026\u0026e.dirty(),{status:e.value,value:s.data}):(nr(n,{code:hi.invalid_intersection_types}),ea)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,r])=\u003eo(i,r)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};wJ.create=(t,e,n)=\u003enew wJ({left:t,right:e,typeName:aa.ZodIntersection,...SA(n)});var cv=class l5n extends JA{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==xr.array)return nr(o,{code:hi.invalid_type,expected:xr.array,received:o.parsedType}),ea;if(o.data.length\u003cthis._def.items.length)return nr(o,{code:hi.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),ea;!this._def.rest\u0026\u0026o.data.length\u003ethis._def.items.length\u0026\u0026(nr(o,{code:hi.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:\"array\"}),n.dirty());const i=[...o.data].map((r,s)=\u003e{const a=this._def.items[s]||this._def.rest;return a?a._parse(new p7(o,r,o.path,s)):null}).filter(r=\u003e!!r);return o.common.async?Promise.all(i).then(r=\u003eCx.mergeArray(n,r)):Cx.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new l5n({...this._def,rest:e})}};cv.create=(t,e)=\u003e{if(!Array.isArray(t))throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");return new cv({items:t,typeName:aa.ZodTuple,rest:null,...SA(e)})};var VCt=class u5n extends JA{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==xr.object)return nr(o,{code:hi.invalid_type,expected:xr.object,received:o.parsedType}),ea;const i=[],r=this._def.keyType,s=this._def.valueType;for(const a in o.data)i.push({key:r._parse(new p7(o,a,o.path,a)),value:s._parse(new p7(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?Cx.mergeObjectAsync(n,i):Cx.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return new u5n(n instanceof JA?{keyType:e,valueType:n,typeName:aa.ZodRecord,...SA(o)}:{keyType:BL.create(),valueType:e,typeName:aa.ZodRecord,...SA(n)})}},Xae=class extends JA{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:e,ctx:n}=this._processInputParams(t);if(n.parsedType!==xr.map)return nr(n,{code:hi.invalid_type,expected:xr.map,received:n.parsedType}),ea;const o=this._def.keyType,i=this._def.valueType,r=[...n.data.entries()].map(([s,a],A)=\u003e({key:o._parse(new p7(n,s,n.path,[A,\"key\"])),value:i._parse(new p7(n,a,n.path,[A,\"value\"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=\u003e{for(const a of r){const A=await a.key,c=await a.value;if(A.status===\"aborted\"||c.status===\"aborted\")return ea;A.status!==\"dirty\"\u0026\u0026c.status!==\"dirty\"||e.dirty(),s.set(A.value,c.value)}return{status:e.value,value:s}})}{const s=new Map;for(const a of r){const A=a.key,c=a.value;if(A.status===\"aborted\"||c.status===\"aborted\")return ea;A.status!==\"dirty\"\u0026\u0026c.status!==\"dirty\"||e.dirty(),s.set(A.value,c.value)}return{status:e.value,value:s}}}};Xae.create=(t,e,n)=\u003enew Xae({valueType:e,keyType:t,typeName:aa.ZodMap,...SA(n)});var Zae=class mit extends JA{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==xr.set)return nr(o,{code:hi.invalid_type,expected:xr.set,received:o.parsedType}),ea;const i=this._def;i.minSize!==null\u0026\u0026o.data.size\u003ci.minSize.value\u0026\u0026(nr(o,{code:hi.too_small,minimum:i.minSize.value,type:\"set\",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null\u0026\u0026o.data.size\u003ei.maxSize.value\u0026\u0026(nr(o,{code:hi.too_big,maximum:i.maxSize.value,type:\"set\",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const r=this._def.valueType;function s(A){const c=new Set;for(const l of A){if(l.status===\"aborted\")return ea;l.status===\"dirty\"\u0026\u0026n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const a=[...o.data.values()].map((A,c)=\u003er._parse(new p7(o,A,o.path,c)));return o.common.async?Promise.all(a).then(A=\u003es(A)):s(a)}min(e,n){return new mit({...this._def,minSize:{value:e,message:rs.toString(n)}})}max(e,n){return new mit({...this._def,maxSize:{value:e,message:rs.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};Zae.create=(t,e)=\u003enew Zae({valueType:t,minSize:null,maxSize:null,typeName:aa.ZodSet,...SA(e)});var zCt=class zye extends JA{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==xr.function)return nr(n,{code:hi.invalid_type,expected:xr.function,received:n.parsedType}),ea;function o(a,A){return Wae({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Jae(),EL].filter(c=\u003e!!c),issueData:{code:hi.invalid_arguments,argumentsError:A}})}function i(a,A){return Wae({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Jae(),EL].filter(c=\u003e!!c),issueData:{code:hi.invalid_return_type,returnTypeError:A}})}const r={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof QL){const a=this;return Dy(async function(...A){const c=new iB([]),l=await a._def.args.parseAsync(A,r).catch(g=\u003e{throw c.addIssue(o(A,g)),c}),u=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(u,r).catch(g=\u003e{throw c.addIssue(i(u,g)),c})})}{const a=this;return Dy(function(...A){const c=a._def.args.safeParse(A,r);if(!c.success)throw new iB([o(A,c.error)]);const l=Reflect.apply(s,this,c.data),u=a._def.returns.safeParse(l,r);if(!u.success)throw new iB([i(l,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new zye({...this._def,args:cv.create(e).rest(ZD.create())})}returns(e){return new zye({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new zye({args:e||cv.create([]).rest(ZD.create()),returns:n||ZD.create(),typeName:aa.ZodFunction,...SA(o)})}},PJ=class extends JA{get schema(){return this._def.getter()}_parse(t){const{ctx:e}=this._processInputParams(t);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}};PJ.create=(t,e)=\u003enew PJ({getter:t,typeName:aa.ZodLazy,...SA(e)});var MJ=class extends JA{_parse(t){if(t.data!==this._def.value){const e=this._getOrReturnCtx(t);return nr(e,{received:e.data,code:hi.invalid_literal,expected:this._def.value}),ea}return{status:\"valid\",value:t.data}}get value(){return this._def.value}};function JCt(t,e){return new DJ({values:t,typeName:aa.ZodEnum,...SA(e)})}MJ.create=(t,e)=\u003enew MJ({value:t,typeName:aa.ZodLiteral,...SA(e)});var DJ=class _it extends JA{_parse(e){if(typeof e.data!=\"string\"){const n=this._getOrReturnCtx(e),o=this._def.values;return nr(n,{expected:Cl.joinValues(o),received:n.parsedType,code:hi.invalid_type}),ea}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return nr(n,{received:n.data,code:hi.invalid_enum_value,options:o}),ea}return Dy(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return _it.create(e,{...this._def,...n})}exclude(e,n=this._def){return _it.create(this.options.filter(o=\u003e!e.includes(o)),{...this._def,...n})}};DJ.create=JCt;var NJ=class extends JA{_parse(t){const e=Cl.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==xr.string\u0026\u0026n.parsedType!==xr.number){const o=Cl.objectValues(e);return nr(n,{expected:Cl.joinValues(o),received:n.parsedType,code:hi.invalid_type}),ea}if(this._cache||(this._cache=new Set(Cl.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Cl.objectValues(e);return nr(n,{received:n.data,code:hi.invalid_enum_value,options:o}),ea}return Dy(t.data)}get enum(){return this._def.values}};NJ.create=(t,e)=\u003enew NJ({values:t,typeName:aa.ZodNativeEnum,...SA(e)});var QL=class extends JA{unwrap(){return this._def.type}_parse(t){const{ctx:e}=this._processInputParams(t);if(e.parsedType!==xr.promise\u0026\u0026e.common.async===!1)return nr(e,{code:hi.invalid_type,expected:xr.promise,received:e.parsedType}),ea;const n=e.parsedType===xr.promise?e.data:Promise.resolve(e.data);return Dy(n.then(o=\u003ethis._def.type.parseAsync(o,{path:e.path,errorMap:e.common.contextualErrorMap})))}};QL.create=(t,e)=\u003enew QL({type:t,typeName:aa.ZodPromise,...SA(e)});var rB=class extends JA{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===aa.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:e,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:r=\u003e{nr(n,r),r.fatal?e.abort():e.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type===\"preprocess\"){const r=o.transform(n.data,i);if(n.common.async)return Promise.resolve(r).then(async s=\u003e{if(e.value===\"aborted\")return ea;const a=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return a.status===\"aborted\"?ea:a.status===\"dirty\"||e.value===\"dirty\"?jae(a.value):a});{if(e.value===\"aborted\")return ea;const s=this._def.schema._parseSync({data:r,path:n.path,parent:n});return s.status===\"aborted\"?ea:s.status===\"dirty\"||e.value===\"dirty\"?jae(s.value):s}}if(o.type===\"refinement\"){const r=s=\u003e{const a=o.refinement(s,i);if(n.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status===\"aborted\"?ea:(s.status===\"dirty\"\u0026\u0026e.dirty(),r(s.value),{status:e.value,value:s.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=\u003es.status===\"aborted\"?ea:(s.status===\"dirty\"\u0026\u0026e.dirty(),r(s.value).then(()=\u003e({status:e.value,value:s.value}))))}if(o.type===\"transform\"){if(n.common.async===!1){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!XD(r))return ea;const s=o.transform(r.value,i);if(s instanceof Promise)throw new Error(\"Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.\");return{status:e.value,value:s}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(r=\u003eXD(r)?Promise.resolve(o.transform(r.value,i)).then(s=\u003e({status:e.value,value:s})):ea)}Cl.assertNever(o)}};rB.create=(t,e,n)=\u003enew rB({schema:t,typeName:aa.ZodEffects,effect:e,...SA(n)}),rB.createWithPreprocess=(t,e,n)=\u003enew rB({schema:e,effect:{type:\"preprocess\",transform:t},typeName:aa.ZodEffects,...SA(n)});var m7=class extends JA{_parse(t){return this._getType(t)===xr.undefined?Dy(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};m7.create=(t,e)=\u003enew m7({innerType:t,typeName:aa.ZodOptional,...SA(e)});var lv=class extends JA{_parse(t){return this._getType(t)===xr.null?Dy(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lv.create=(t,e)=\u003enew lv({innerType:t,typeName:aa.ZodNullable,...SA(e)});var RJ=class extends JA{_parse(t){const{ctx:e}=this._processInputParams(t);let n=e.data;return e.parsedType===xr.undefined\u0026\u0026(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:e.path,parent:e})}removeDefault(){return this._def.innerType}};RJ.create=(t,e)=\u003enew RJ({innerType:t,typeName:aa.ZodDefault,defaultValue:typeof e.default==\"function\"?e.default:()=\u003ee.default,...SA(e)});var TJ=class extends JA{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return yJ(i)?i.then(r=\u003e({status:\"valid\",value:r.status===\"valid\"?r.value:this._def.catchValue({get error(){return new iB(o.common.issues)},input:o.data})})):{status:\"valid\",value:i.status===\"valid\"?i.value:this._def.catchValue({get error(){return new iB(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};TJ.create=(t,e)=\u003enew TJ({innerType:t,typeName:aa.ZodCatch,catchValue:typeof e.catch==\"function\"?e.catch:()=\u003ee.catch,...SA(e)});var eAe=class extends JA{_parse(e){if(this._getType(e)!==xr.nan){const n=this._getOrReturnCtx(e);return nr(n,{code:hi.invalid_type,expected:xr.nan,received:n.parsedType}),ea}return{status:\"valid\",value:e.data}}};eAe.create=t=\u003enew eAe({typeName:aa.ZodNaN,...SA(t)});var Doo=Symbol(\"zod_brand\"),_8e=class extends JA{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}},f8e=class g5n extends JA{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=\u003e{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status===\"aborted\"?ea:i.status===\"dirty\"?(n.dirty(),jae(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status===\"aborted\"?ea:i.status===\"dirty\"?(n.dirty(),{status:\"dirty\",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new g5n({in:e,out:n,typeName:aa.ZodPipeline})}},kJ=class extends JA{_parse(e){const n=this._def.innerType._parse(e),o=i=\u003e(XD(i)\u0026\u0026(i.value=Object.freeze(i.value)),i);return yJ(n)?n.then(i=\u003eo(i)):o(n)}unwrap(){return this._def.innerType}};function WCt(t,e){const n=typeof t==\"function\"?t(e):typeof t==\"string\"?{message:t}:t;return typeof n==\"string\"?{message:n}:n}function jCt(t,e={},n){return t?bL.create().superRefine((o,i)=\u003e{const r=t(o);if(r instanceof Promise)return r.then(s=\u003e{if(!s){const a=WCt(e,o),A=a.fatal??n??!0;i.addIssue({code:\"custom\",...a,fatal:A})}});if(!r){const s=WCt(e,o),a=s.fatal??n??!0;i.addIssue({code:\"custom\",...s,fatal:a})}}):bL.create()}kJ.create=(t,e)=\u003enew kJ({innerType:t,typeName:aa.ZodReadonly,...SA(e)});var aa,Yc,Noo={object:H5.lazycreate};(Yc=aa||(aa={})).ZodString=\"ZodString\",Yc.ZodNumber=\"ZodNumber\",Yc.ZodNaN=\"ZodNaN\",Yc.ZodBigInt=\"ZodBigInt\",Yc.ZodBoolean=\"ZodBoolean\",Yc.ZodDate=\"ZodDate\",Yc.ZodSymbol=\"ZodSymbol\",Yc.ZodUndefined=\"ZodUndefined\",Yc.ZodNull=\"ZodNull\",Yc.ZodAny=\"ZodAny\",Yc.ZodUnknown=\"ZodUnknown\",Yc.ZodNever=\"ZodNever\",Yc.ZodVoid=\"ZodVoid\",Yc.ZodArray=\"ZodArray\",Yc.ZodObject=\"ZodObject\",Yc.ZodUnion=\"ZodUnion\",Yc.ZodDiscriminatedUnion=\"ZodDiscriminatedUnion\",Yc.ZodIntersection=\"ZodIntersection\",Yc.ZodTuple=\"ZodTuple\",Yc.ZodRecord=\"ZodRecord\",Yc.ZodMap=\"ZodMap\",Yc.ZodSet=\"ZodSet\",Yc.ZodFunction=\"ZodFunction\",Yc.ZodLazy=\"ZodLazy\",Yc.ZodLiteral=\"ZodLiteral\",Yc.ZodEnum=\"ZodEnum\",Yc.ZodEffects=\"ZodEffects\",Yc.ZodNativeEnum=\"ZodNativeEnum\",Yc.ZodOptional=\"ZodOptional\",Yc.ZodNullable=\"ZodNullable\",Yc.ZodDefault=\"ZodDefault\",Yc.ZodCatch=\"ZodCatch\",Yc.ZodPromise=\"ZodPromise\",Yc.ZodBranded=\"ZodBranded\",Yc.ZodPipeline=\"ZodPipeline\",Yc.ZodReadonly=\"ZodReadonly\";var Roo=(t,e={message:`Input not instance of ${t.name}`})=\u003ejCt(n=\u003en instanceof t,e),$Ct=BL.create,qCt=xJ.create,Too=eAe.create,koo=EJ.create,XCt=BJ.create,Foo=bJ.create,Loo=$ae.create,Hoo=SJ.create,Ooo=QJ.create,Goo=bL.create,Yoo=ZD.create,Uoo=eb.create,Koo=qae.create,Voo=eN.create,zoo=H5.create,Joo=H5.strictCreate,Woo=vJ.create,joo=KCt.create,$oo=wJ.create,qoo=cv.create,Xoo=VCt.create,Zoo=Xae.create,eio=Zae.create,tio=zCt.create,nio=PJ.create,oio=MJ.create,iio=DJ.create,rio=NJ.create,sio=QL.create,ZCt=rB.create,aio=m7.create,Aio=lv.create,cio=rB.createWithPreprocess,lio=f8e.create,uio=()=\u003e$Ct().optional(),gio=()=\u003eqCt().optional(),dio=()=\u003eXCt().optional(),hio={string:t=\u003eBL.create({...t,coerce:!0}),number:t=\u003exJ.create({...t,coerce:!0}),boolean:t=\u003eBJ.create({...t,coerce:!0}),bigint:t=\u003eEJ.create({...t,coerce:!0}),date:t=\u003ebJ.create({...t,coerce:!0})},pio=ea,tAe=N.string().or(N.number()).transform(t=\u003eL5(t,\"Ω\").value),I8e=N.string().or(N.number()).transform(t=\u003eL5(t,\"F\").value).transform(t=\u003eNumber.parseFloat(t.toPrecision(12))),eyt=N.string().or(N.number()).transform(t=\u003eL5(t,\"H\").value),tb=N.string().or(N.number()).transform(t=\u003eL5(t,\"V\").value),Di=N.string().or(N.number()).transform(t=\u003eL5(t).value),tN=N.string().or(N.number()).transform(t=\u003eL5(t,\"Hz\").value),ao=Di,vL=N.string().or(N.number()).transform(t=\u003eL5(t,\"A\").value),wL=N.string().or(N.number()).transform(t=\u003eL5(t).value),mio=wL,J_=wL,tyt=N.string().datetime(),im=N.string().or(N.number()).transform(t=\u003etypeof t==\"number\"?t:t.endsWith(\"deg\")?Number.parseFloat(t.split(\"deg\")[0]):t.endsWith(\"rad\")?180*Number.parseFloat(t.split(\"rad\")[0])/Math.PI:Number.parseFloat(t)),nyt=N.number().or(N.string().endsWith(\"mAh\")).transform(t=\u003e{if(typeof t==\"string\"){const e=t.replace(\"mAh\",\"\"),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error(\"Invalid capacity\");return n}return t}).describe(\"Battery capacity in mAh\"),_r=N.object({x:ao,y:ao}),_io=_r,nb=N.object({x:ao,y:ao,z:ao}),fio=nb,C8e=N.object({width:N.number(),height:N.number()}),So=t=\u003eN.string().optional().default(()=\u003e`${t}_${(e=\u003e{const n=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";return Array.from({length:e},()=\u003en[Math.floor(62*Math.random())]).join(\"\")})(10)}`),ob=N.enum([\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"]),Iio=N.enum([\"top_silkscreen\",\"bottom_silkscreen\",\"top_copper\",\"bottom_copper\",\"top_soldermask\",\"bottom_soldermask\",\"top_fabrication_note\",\"bottom_fabrication_note\",\"top_user_note\",\"bottom_user_note\",\"top_courtyard\",\"bottom_courtyard\",\"inner1_copper\",\"inner2_copper\",\"inner3_copper\",\"inner4_copper\",\"inner5_copper\",\"inner6_copper\",\"inner7_copper\",\"inner8_copper\",\"edge_cuts\",\"drill\"]),y8e=N.object({project_relative_path:N.string(),url:N.string(),mimetype:N.string()}),nAe=_r.extend({rotation:im.optional()}),x8e=N.object({size:_r.optional(),thickness:ao.optional()}),oyt=N.object({font:x8e.optional()}),FJ=N.object({value:N.string(),at:nAe.optional(),layer:N.string().optional(),uuid:N.string().optional(),hide:N.boolean().optional(),effects:oyt.optional()}),iyt=N.object({Reference:FJ.optional(),Value:FJ.optional(),Datasheet:FJ.optional(),Description:FJ.optional()}),ryt=N.object({through_hole:N.boolean().optional(),smd:N.boolean().optional(),exclude_from_pos_files:N.boolean().optional(),exclude_from_bom:N.boolean().optional()}),syt=N.object({name:N.string(),type:N.string(),shape:N.string().optional(),at:nAe.optional(),size:_r.optional(),drill:ao.optional(),layers:N.array(N.string()).optional(),removeUnusedLayers:N.boolean().optional(),uuid:N.string().optional()}),ayt=N.object({path:N.string(),offset:nb.optional(),scale:nb.optional(),rotate:nb.optional()}),Ayt=N.object({footprintName:N.string().optional(),version:N.union([N.number(),N.string()]).optional(),generator:N.string().optional(),generatorVersion:N.union([N.number(),N.string()]).optional(),layer:N.string().optional(),properties:iyt.optional(),attributes:ryt.optional(),pads:N.array(syt).optional(),embeddedFonts:N.boolean().optional(),model:ayt.optional()}),cyt=N.object({hide:N.boolean().optional()}),lyt=N.object({offset:ao.optional(),hide:N.boolean().optional()}),uyt=N.object({font:x8e.optional(),justify:N.union([N.string(),N.array(N.string())]).optional(),hide:N.boolean().optional()}),uv=N.object({value:N.string(),id:N.union([N.number(),N.string()]).optional(),at:nAe.optional(),effects:uyt.optional()}),gyt=N.object({Reference:uv.optional(),Value:uv.optional(),Footprint:uv.optional(),Datasheet:uv.optional(),Description:uv.optional(),ki_keywords:uv.optional(),ki_fp_filters:uv.optional()}),dyt=N.object({symbolName:N.string().optional(),extends:N.string().optional(),pinNumbers:cyt.optional(),pinNames:lyt.optional(),excludeFromSim:N.boolean().optional(),inBom:N.boolean().optional(),onBoard:N.boolean().optional(),properties:gyt.optional(),embeddedFonts:N.boolean().optional()}),Wl=N.object({error_type:N.string(),message:N.string(),is_fatal:N.boolean().optional()}),oAe=N.enum([\"jlcpcb\",\"macrofab\",\"pcbway\",\"digikey\",\"mouser\",\"lcsc\"]),vu=N.object({type:N.literal(\"source_component\"),ftype:N.string().optional(),source_component_id:N.string(),name:N.string(),manufacturer_part_number:N.string().optional(),supplier_part_numbers:N.record(oAe,N.array(N.string())).optional(),display_value:N.string().optional(),display_name:N.string().optional(),are_pins_interchangeable:N.boolean().optional(),internally_connected_source_port_ids:N.array(N.array(N.string())).optional(),source_group_id:N.string().optional(),subcircuit_id:N.string().optional()}),E8e=vu.extend({ftype:N.literal(\"simple_capacitor\"),capacitance:I8e,max_voltage_rating:tb.optional(),display_capacitance:N.string().optional(),max_decoupling_trace_length:ao.optional()}),B8e=vu.extend({ftype:N.literal(\"simple_resistor\"),resistance:tAe,display_resistance:N.string().optional()}),iAe=vu.extend({ftype:N.literal(\"simple_diode\")}),hyt=vu.extend({ftype:N.literal(\"simple_fiducial\")}),b8e=iAe.extend({ftype:N.literal(\"simple_led\"),color:N.string().optional(),wavelength:N.string().optional()}),pyt=vu.extend({ftype:N.literal(\"simple_ground\")}),S8e=vu.extend({ftype:N.literal(\"simple_chip\")}),Q8e=vu.extend({ftype:N.literal(\"simple_power_source\"),voltage:tb}),myt=vu.extend({ftype:N.literal(\"simple_current_source\"),current:vL,frequency:tN.optional(),peak_to_peak_current:vL.optional(),wave_shape:N.enum([\"sine\",\"square\",\"triangle\",\"sawtooth\",\"dc\"]).optional().default(\"dc\"),phase:N.number().optional(),duty_cycle:N.number().min(0).max(1).optional()}),_yt=vu.extend({ftype:N.literal(\"simple_fuse\"),current_rating_amps:N.number().describe(\"Nominal current in amps the fuse is rated for\"),voltage_rating_volts:N.number().describe(\"Voltage rating in volts, e.g. ±5V would be 5\")}),fyt=vu.extend({ftype:N.literal(\"simple_ammeter\")}),Iyt=N.object({must_be_connected:N.boolean().optional(),provides_power:N.boolean().optional(),requires_power:N.boolean().optional(),provides_ground:N.boolean().optional(),requires_ground:N.boolean().optional(),provides_voltage:N.union([N.string(),N.number()]).optional(),requires_voltage:N.union([N.string(),N.number()]).optional(),do_not_connect:N.boolean().optional(),include_in_board_pinout:N.boolean().optional(),can_use_internal_pullup:N.boolean().optional(),is_using_internal_pullup:N.boolean().optional(),needs_external_pullup:N.boolean().optional(),can_use_internal_pulldown:N.boolean().optional(),is_using_internal_pulldown:N.boolean().optional(),needs_external_pulldown:N.boolean().optional(),can_use_open_drain:N.boolean().optional(),is_using_open_drain:N.boolean().optional(),can_use_push_pull:N.boolean().optional(),is_using_push_pull:N.boolean().optional(),should_have_decoupling_capacitor:N.boolean().optional(),recommended_decoupling_capacitor_capacitance:N.union([N.string(),N.number()]).optional(),is_configured_for_i2c_sda:N.boolean().optional(),is_configured_for_i2c_scl:N.boolean().optional(),is_configured_for_spi_mosi:N.boolean().optional(),is_configured_for_spi_miso:N.boolean().optional(),is_configured_for_spi_sck:N.boolean().optional(),is_configured_for_spi_cs:N.boolean().optional(),is_configured_for_uart_tx:N.boolean().optional(),is_configured_for_uart_rx:N.boolean().optional(),supports_i2c_sda:N.boolean().optional(),supports_i2c_scl:N.boolean().optional(),supports_spi_mosi:N.boolean().optional(),supports_spi_miso:N.boolean().optional(),supports_spi_sck:N.boolean().optional(),supports_spi_cs:N.boolean().optional(),supports_uart_tx:N.boolean().optional(),supports_uart_rx:N.boolean().optional()}),v8e=vu.extend({ftype:N.literal(\"simple_battery\"),capacity:nyt}),w8e=vu.extend({ftype:N.literal(\"simple_inductor\"),inductance:eyt,display_inductance:N.string().optional(),max_current_rating:N.number().optional()}),P8e=vu.extend({ftype:N.literal(\"simple_push_button\")}),M8e=vu.extend({ftype:N.literal(\"simple_potentiometer\"),max_resistance:tAe,display_max_resistance:N.string().optional()}),Cyt=vu.extend({ftype:N.literal(\"simple_crystal\"),frequency:N.number().describe(\"Frequency in Hz\"),load_capacitance:N.number().optional().describe(\"Load capacitance in pF\"),pin_variant:N.enum([\"two_pin\",\"four_pin\"]).optional()}),D8e=vu.extend({ftype:N.literal(\"simple_pin_header\"),pin_count:N.number(),gender:N.enum([\"male\",\"female\"]).optional().default(\"male\")}),yyt=vu.extend({ftype:N.literal(\"simple_connector\"),standard:N.enum([\"usb_c\",\"m2\"]).optional()}),N8e=vu.extend({ftype:N.literal(\"simple_pinout\")}),R8e=vu.extend({ftype:N.literal(\"simple_resonator\"),load_capacitance:I8e,equivalent_series_resistance:tAe.optional(),frequency:tN}),T8e=vu.extend({ftype:N.literal(\"simple_transistor\"),transistor_type:N.enum([\"npn\",\"pnp\"])}),k8e=vu.extend({ftype:N.literal(\"simple_test_point\"),footprint_variant:N.enum([\"pad\",\"through_hole\"]).optional(),pad_shape:N.enum([\"rect\",\"circle\"]).optional(),pad_diameter:N.union([N.number(),N.string()]).optional(),hole_diameter:N.union([N.number(),N.string()]).optional(),width:N.union([N.number(),N.string()]).optional(),height:N.union([N.number(),N.string()]).optional()}),F8e=vu.extend({ftype:N.literal(\"simple_mosfet\"),channel_type:N.enum([\"n\",\"p\"]),mosfet_mode:N.enum([\"enhancement\",\"depletion\"])}),L8e=vu.extend({ftype:N.literal(\"simple_op_amp\")}),H8e=vu.extend({ftype:N.literal(\"simple_switch\")}),O8e=N.object({type:N.literal(\"source_project_metadata\"),name:N.string().optional(),software_used_string:N.string().optional(),project_url:N.string().optional(),source_filesystem_md5_hash:N.string().optional(),created_at:tyt.optional()}),xyt=Wl.extend({type:N.literal(\"source_missing_property_error\"),source_missing_property_error_id:So(\"source_missing_property_error\"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal(\"source_missing_property_error\").default(\"source_missing_property_error\")}).describe(\"The source code is missing a property\"),Eyt=Wl.extend({type:N.literal(\"source_failed_to_create_component_error\"),source_failed_to_create_component_error_id:So(\"source_failed_to_create_component_error\"),error_type:N.literal(\"source_failed_to_create_component_error\").default(\"source_failed_to_create_component_error\"),component_name:N.string().optional(),subcircuit_id:N.string().optional(),parent_source_component_id:N.string().optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),schematic_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional()}).describe(\"Error emitted when a component fails to be constructed\"),G8e=Wl.extend({type:N.literal(\"source_invalid_component_property_error\"),source_invalid_component_property_error_id:So(\"source_invalid_component_property_error\"),source_component_id:N.string(),property_name:N.string(),property_value:N.unknown().optional(),expected_format:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal(\"source_invalid_component_property_error\").default(\"source_invalid_component_property_error\")}).describe(\"The source component property is invalid\"),Y8e=Wl.extend({type:N.literal(\"source_trace_not_connected_error\"),source_trace_not_connected_error_id:So(\"source_trace_not_connected_error\"),error_type:N.literal(\"source_trace_not_connected_error\").default(\"source_trace_not_connected_error\"),subcircuit_id:N.string().optional(),source_group_id:N.string().optional(),source_trace_id:N.string().optional(),connected_source_port_ids:N.array(N.string()).optional(),selectors_not_found:N.array(N.string()).optional()}).describe(\"Occurs when a source trace selector does not match any ports\"),Byt=N.object({type:N.literal(\"source_property_ignored_warning\"),source_property_ignored_warning_id:So(\"source_property_ignored_warning\"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal(\"source_property_ignored_warning\").default(\"source_property_ignored_warning\"),message:N.string()}).describe(\"The source property was ignored\"),U8e=N.object({type:N.literal(\"source_pin_missing_trace_warning\"),source_pin_missing_trace_warning_id:So(\"source_pin_missing_trace_warning\"),warning_type:N.literal(\"source_pin_missing_trace_warning\").default(\"source_pin_missing_trace_warning\"),message:N.string(),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a source component pin is missing a trace connection\"),K8e=N.object({type:N.literal(\"source_missing_manufacturer_part_number_warning\"),source_missing_manufacturer_part_number_warning_id:So(\"source_missing_manufacturer_part_number_warning\"),warning_type:N.literal(\"source_missing_manufacturer_part_number_warning\").default(\"source_missing_manufacturer_part_number_warning\"),message:N.string(),source_component_id:N.string(),standard:N.string(),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a standard connector is missing manufacturer part number\"),V8e=N.object({type:N.literal(\"source_refdes_convention_warning\"),source_refdes_convention_warning_id:So(\"source_refdes_convention_warning\"),warning_type:N.literal(\"source_refdes_convention_warning\").default(\"source_refdes_convention_warning\"),message:N.string(),source_component_id:N.string(),refdes:N.string(),source_component_ftype:N.string(),expected_prefixes:N.array(N.string()),actual_prefix:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a source component reference designator does not match the component type convention\"),byt=vu.extend({ftype:N.literal(\"simple_voltage_probe\")}),Syt=vu.extend({ftype:N.literal(\"interconnect\")}),z8e=Wl.extend({type:N.literal(\"source_i2c_misconfigured_error\"),source_i2c_misconfigured_error_id:So(\"source_i2c_misconfigured_error\"),error_type:N.literal(\"source_i2c_misconfigured_error\").default(\"source_i2c_misconfigured_error\"),source_port_ids:N.array(N.string())}).describe(\"Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net\"),J8e=Wl.extend({type:N.literal(\"source_component_misconfigured_error\"),source_component_misconfigured_error_id:So(\"source_component_misconfigured_error\"),error_type:N.literal(\"source_component_misconfigured_error\").default(\"source_component_misconfigured_error\"),source_component_ids:N.array(N.string()),source_port_ids:N.array(N.string()).optional()}).describe(\"Error emitted when one or more source components have an invalid or conflicting configuration\"),Qyt=vu.extend({ftype:N.literal(\"simple_voltage_source\"),voltage:tb,frequency:tN.optional(),peak_to_peak_voltage:tb.optional(),wave_shape:N.enum([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]).optional(),phase:im.optional(),duty_cycle:N.number().optional().describe(\"Duty cycle as a fraction (0 to 1)\"),pulse_delay:J_.optional(),rise_time:J_.optional(),fall_time:J_.optional(),pulse_width:J_.optional(),period:J_.optional()}),vyt=N.union([B8e,E8e,iAe,hyt,b8e,pyt,S8e,Q8e,myt,fyt,v8e,w8e,P8e,M8e,Cyt,D8e,yyt,N8e,R8e,H8e,T8e,k8e,F8e,L8e,_yt,byt,Syt,Qyt,O8e,xyt,G8e,Eyt,Y8e,Byt,U8e,K8e,V8e,z8e,J8e]),wyt=N.object({type:N.literal(\"source_port\"),pin_number:N.number().optional(),port_hints:N.array(N.string()).optional(),name:N.string(),source_port_id:N.string(),source_component_id:N.string().optional(),source_group_id:N.string().optional(),most_frequently_referenced_by_name:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}).merge(Iyt),Pyt=N.object({type:N.literal(\"source_component_internal_connection\"),source_component_internal_connection_id:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}),Myt=N.object({type:N.literal(\"source_trace\"),source_trace_id:N.string(),connected_source_port_ids:N.array(N.string()),connected_source_net_ids:N.array(N.string()),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),max_length:N.number().optional(),name:N.string().optional(),min_trace_thickness:N.number().optional(),display_name:N.string().optional()}),Dyt=N.object({type:N.literal(\"source_group\"),source_group_id:N.string(),subcircuit_id:N.string().optional(),parent_subcircuit_id:N.string().optional(),parent_source_group_id:N.string().optional(),is_subcircuit:N.boolean().optional(),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),was_automatically_named:N.boolean().optional()}),Nyt=N.object({type:N.literal(\"source_net\"),source_net_id:N.string(),name:N.string(),member_source_group_ids:N.array(N.string()),is_power:N.boolean().optional(),is_ground:N.boolean().optional(),is_digital_signal:N.boolean().optional(),is_analog_signal:N.boolean().optional(),is_positive_voltage_source:N.boolean().optional(),trace_width:N.number().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),Ryt=N.object({type:N.literal(\"source_board\"),source_board_id:N.string(),source_group_id:N.string(),title:N.string().optional()}).describe(\"Defines a board in the source domain\"),Tyt=Wl.extend({type:N.literal(\"source_ambiguous_port_reference\"),source_ambiguous_port_reference_id:So(\"source_ambiguous_port_reference\"),error_type:N.literal(\"source_ambiguous_port_reference\").default(\"source_ambiguous_port_reference\"),source_port_id:N.string().optional(),source_component_id:N.string().optional()}).describe(\"Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous\"),kyt=N.object({type:N.literal(\"source_pcb_ground_plane\"),source_pcb_ground_plane_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Defines a ground plane in the source domain\"),LJ=[\"top\",\"bottom\",\"inner1\",\"inner2\",\"inner3\",\"inner4\",\"inner5\",\"inner6\",\"inner7\",\"inner8\"],W8e=N.enum(LJ),WA=W8e.or(N.object({name:W8e})).transform(t=\u003etypeof t==\"string\"?t:t.name),W_=N.enum([\"top\",\"bottom\"]),Fyt=N.object({type:N.literal(\"source_manually_placed_via\"),source_manually_placed_via_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional()}).describe(\"Defines a via that is manually placed in the source domain\"),Lyt=N.object({type:N.literal(\"source_unnamed_trace_warning\"),source_unnamed_trace_warning_id:So(\"source_unnamed_trace_warning\"),warning_type:N.literal(\"source_unnamed_trace_warning\").default(\"source_unnamed_trace_warning\"),message:N.string(),source_trace_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a source trace is missing a name\"),Hyt=N.object({type:N.literal(\"source_no_power_pin_defined_warning\"),source_no_power_pin_defined_warning_id:So(\"source_no_power_pin_defined_warning\"),warning_type:N.literal(\"source_no_power_pin_defined_warning\").default(\"source_no_power_pin_defined_warning\"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a chip has no source ports with requires_power=true\"),Oyt=N.object({type:N.literal(\"source_no_ground_pin_defined_warning\"),source_no_ground_pin_defined_warning_id:So(\"source_no_ground_pin_defined_warning\"),warning_type:N.literal(\"source_no_ground_pin_defined_warning\").default(\"source_no_ground_pin_defined_warning\"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a chip has no source ports marked as ground pins\"),Gyt=N.object({type:N.literal(\"source_component_pins_underspecified_warning\"),source_component_pins_underspecified_warning_id:So(\"source_component_pins_underspecified_warning\"),warning_type:N.literal(\"source_component_pins_underspecified_warning\").default(\"source_component_pins_underspecified_warning\"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when all ports on a source component are underspecified\"),Yyt=Wl.extend({type:N.literal(\"source_pin_must_be_connected_error\"),source_pin_must_be_connected_error_id:So(\"source_pin_must_be_connected_error\"),error_type:N.literal(\"source_pin_must_be_connected_error\").default(\"source_pin_must_be_connected_error\"),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a pin with mustBeConnected attribute is not connected to any trace\"),Uyt=Wl.extend({type:N.literal(\"unknown_error_finding_part\"),unknown_error_finding_part_id:So(\"unknown_error_finding_part\"),error_type:N.literal(\"unknown_error_finding_part\").default(\"unknown_error_finding_part\"),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when an unexpected error occurs while finding a part\"),Kyt=N.object({type:N.literal(\"source_part_not_found_warning\"),source_part_not_found_warning_id:So(\"source_part_not_found_warning\"),warning_type:N.literal(\"source_part_not_found_warning\").default(\"source_part_not_found_warning\"),message:N.string(),source_component_id:N.string().optional(),subcircuit_id:N.string().optional(),supplier_name:oAe.optional(),manufacturer_part_number:N.string().optional(),supplier_part_number:N.string().optional(),part_name:N.string().optional()}).describe(\"Warning emitted when a requested part can not be found\"),Vyt=N.object({type:N.literal(\"schematic_box\"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),width:ao,height:ao,is_dashed:N.boolean().default(!1),x:ao,y:ao,subcircuit_id:N.string().optional()}).describe(\"Draws a box on the schematic\"),zyt=N.object({type:N.literal(\"schematic_path\"),schematic_path_id:So(\"schematic_path\"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),fill_color:N.string().optional(),is_filled:N.boolean().optional(),is_dashed:N.boolean().default(!1),stroke_width:ao.nullable().optional(),stroke_color:N.string().optional(),dash_length:ao.optional(),dash_gap:ao.optional(),points:N.array(_r),subcircuit_id:N.string().optional()}),Jyt=N.record(N.object({left_margin:Di.optional(),right_margin:Di.optional(),top_margin:Di.optional(),bottom_margin:Di.optional()})),Wyt=N.object({left_size:N.number(),right_size:N.number(),top_size:N.number().optional(),bottom_size:N.number().optional()}),jyt=N.object({left_side:N.object({pins:N.array(N.number()),direction:N.enum([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),right_side:N.object({pins:N.array(N.number()),direction:N.enum([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),top_side:N.object({pins:N.array(N.number()),direction:N.enum([\"left-to-right\",\"right-to-left\"]).optional()}).optional(),bottom_side:N.object({pins:N.array(N.number()),direction:N.enum([\"left-to-right\",\"right-to-left\"]).optional()}).optional()}),$yt=N.union([Wyt,jyt]),qyt=N.object({type:N.literal(\"schematic_component\"),size:C8e,center:_r,source_component_id:N.string().optional(),schematic_component_id:N.string(),schematic_sheet_id:N.string().optional(),schematic_symbol_id:N.string().optional(),pin_spacing:Di.optional(),pin_styles:Jyt.optional(),box_width:Di.optional(),symbol_name:N.string().optional(),port_arrangement:$yt.optional(),port_labels:N.record(N.string()).optional(),symbol_display_value:N.string().optional(),subcircuit_id:N.string().optional(),schematic_group_id:N.string().optional(),is_schematic_group:N.boolean().optional(),source_group_id:N.string().optional(),is_box_with_pins:N.boolean().optional().default(!0)}),Cio=N.object({kicad_symbol:dyt.optional()}).catchall(N.unknown()),Xyt=N.object({type:N.literal(\"schematic_symbol\"),schematic_symbol_id:N.string(),name:N.string().optional(),metadata:Cio.optional()}).describe(\"Defines a named schematic symbol that can be referenced by components.\"),Zyt=N.object({type:N.literal(\"schematic_line\"),schematic_line_id:So(\"schematic_line\"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),x1:ao,y1:ao,x2:ao,y2:ao,stroke_width:ao.nullable().optional(),color:N.string().default(\"#000000\"),is_dashed:N.boolean().default(!1),dash_length:ao.optional(),dash_gap:ao.optional(),subcircuit_id:N.string().optional()}).describe(\"Draws a styled line on the schematic\"),e2t=N.object({type:N.literal(\"schematic_rect\"),schematic_rect_id:So(\"schematic_rect\"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:_r,width:ao,height:ao,rotation:im.default(0),stroke_width:ao.nullable().optional(),color:N.string().default(\"#000000\"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe(\"Draws a styled rectangle on the schematic\"),t2t=N.object({type:N.literal(\"schematic_circle\"),schematic_circle_id:So(\"schematic_circle\"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:_r,radius:ao,stroke_width:ao.nullable().optional(),color:N.string().default(\"#000000\"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe(\"Draws a styled circle on the schematic\"),n2t=N.object({type:N.literal(\"schematic_arc\"),schematic_arc_id:So(\"schematic_arc\"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:_r,radius:ao,start_angle_degrees:im,end_angle_degrees:im,direction:N.enum([\"clockwise\",\"counterclockwise\"]).default(\"counterclockwise\"),stroke_width:ao.nullable().optional(),color:N.string().default(\"#000000\"),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe(\"Draws a styled arc on the schematic\"),o2t=N.object({type:N.literal(\"schematic_trace\"),schematic_trace_id:N.string(),schematic_sheet_id:N.string().optional(),source_trace_id:N.string().optional(),junctions:N.array(N.object({x:N.number(),y:N.number()})),edges:N.array(N.object({from:N.object({x:N.number(),y:N.number()}),to:N.object({x:N.number(),y:N.number()}),is_crossing:N.boolean().optional(),from_schematic_port_id:N.string().optional(),to_schematic_port_id:N.string().optional()})),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),yio=N.enum([\"center\",\"left\",\"right\",\"top\",\"bottom\"]),i2t=N.object({type:N.literal(\"schematic_text\"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),schematic_text_id:N.string(),text:N.string(),font_size:N.number().default(.18),position:N.object({x:ao,y:ao}),rotation:N.number().default(0),anchor:N.union([yio.describe(\"legacy\"),ob]).default(\"center\"),color:N.string().default(\"#000000\"),subcircuit_id:N.string().optional()}),r2t=N.object({type:N.literal(\"schematic_port\"),schematic_port_id:N.string(),source_port_id:N.string(),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),center:_r,facing_direction:N.enum([\"up\",\"down\",\"left\",\"right\"]).optional(),distance_from_component_edge:N.number().optional(),side_of_component:N.enum([\"top\",\"bottom\",\"left\",\"right\"]).optional(),true_ccw_index:N.number().optional(),pin_number:N.number().optional(),display_pin_label:N.string().optional(),subcircuit_id:N.string().optional(),is_connected:N.boolean().optional(),has_input_arrow:N.boolean().optional(),has_output_arrow:N.boolean().optional(),is_drawn_with_inversion_circle:N.boolean().optional()}).describe(\"Defines a port on a schematic component\"),s2t=N.object({type:N.literal(\"schematic_net_label\"),schematic_net_label_id:So(\"schematic_net_label\"),schematic_sheet_id:N.string().optional(),schematic_trace_id:N.string().optional(),source_trace_id:N.string().optional(),source_net_id:N.string(),center:_r,anchor_position:_r.optional(),anchor_side:N.enum([\"top\",\"bottom\",\"left\",\"right\"]),text:N.string(),symbol_name:N.string().optional(),is_movable:N.boolean().optional(),subcircuit_id:N.string().optional()}),a2t=Wl.extend({type:N.literal(\"schematic_error\"),schematic_error_id:N.string(),error_type:N.literal(\"schematic_port_not_found\").default(\"schematic_port_not_found\"),subcircuit_id:N.string().optional()}).describe(\"Defines a schematic error on the schematic\"),A2t=Wl.extend({type:N.literal(\"schematic_layout_error\"),schematic_layout_error_id:So(\"schematic_layout_error\"),error_type:N.literal(\"schematic_layout_error\").default(\"schematic_layout_error\"),source_group_id:N.string(),schematic_group_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when schematic layout fails for a group\"),rAe=N.object({type:N.literal(\"schematic_debug_object\"),label:N.string().optional(),subcircuit_id:N.string().optional()}),c2t=rAe.extend({shape:N.literal(\"rect\"),center:_r,size:C8e}),l2t=rAe.extend({shape:N.literal(\"line\"),start:_r,end:_r}),u2t=rAe.extend({shape:N.literal(\"point\"),center:_r}),g2t=N.discriminatedUnion(\"shape\",[c2t,l2t,u2t]),d2t=N.object({type:N.literal(\"schematic_voltage_probe\"),schematic_voltage_probe_id:N.string(),schematic_sheet_id:N.string().optional(),source_component_id:N.string().optional(),name:N.string().optional(),position:_r,schematic_trace_id:N.string(),voltage:tb.optional(),subcircuit_id:N.string().optional(),color:N.string().optional(),label_alignment:ob.optional()}).describe(\"Defines a voltage probe measurement point on a schematic trace\"),h2t=N.object({type:N.literal(\"schematic_manual_edit_conflict_warning\"),schematic_manual_edit_conflict_warning_id:So(\"schematic_manual_edit_conflict_warning\"),warning_type:N.literal(\"schematic_manual_edit_conflict_warning\").default(\"schematic_manual_edit_conflict_warning\"),message:N.string(),schematic_component_id:N.string(),schematic_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe(\"Warning emitted when a component has both manual placement and explicit schX/schY coordinates\"),p2t=N.object({type:N.literal(\"schematic_group\"),schematic_group_id:So(\"schematic_group\"),schematic_sheet_id:N.string().optional(),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Di,height:Di,center:_r,schematic_component_ids:N.array(N.string()),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),description:N.string().optional()}).describe(\"Defines a group of components on the schematic\"),m2t=N.object({type:N.literal(\"schematic_table\"),schematic_table_id:So(\"schematic_table\"),schematic_sheet_id:N.string().optional(),anchor_position:_r,column_widths:N.array(ao),row_heights:N.array(ao),cell_padding:ao.optional(),border_width:ao.optional(),subcircuit_id:N.string().optional(),schematic_component_id:N.string().optional(),anchor:ob.optional()}).describe(\"Defines a table on the schematic\"),_2t=N.object({type:N.literal(\"schematic_table_cell\"),schematic_table_cell_id:So(\"schematic_table_cell\"),schematic_sheet_id:N.string().optional(),schematic_table_id:N.string(),start_row_index:N.number(),end_row_index:N.number(),start_column_index:N.number(),end_column_index:N.number(),text:N.string().optional(),center:_r,width:ao,height:ao,horizontal_align:N.enum([\"left\",\"center\",\"right\"]).optional(),vertical_align:N.enum([\"top\",\"middle\",\"bottom\"]).optional(),font_size:ao.optional(),subcircuit_id:N.string().optional()}).describe(\"Defines a cell within a schematic_table\"),f2t=N.object({type:N.literal(\"schematic_sheet\"),schematic_sheet_id:So(\"schematic_sheet\"),name:N.string().optional(),sheet_index:N.number().optional(),subcircuit_id:N.string().optional(),outline_color:N.string().optional()}).describe(\"Defines a schematic sheet or page that components can be placed on\"),I2t=N.object({x:ao,y:ao,bulge:N.number().optional()}),j8e=N.object({vertices:N.array(I2t)}),$8e=N.object({outer_ring:j8e,inner_rings:N.array(j8e).default([])}),C2t=N.object({x:ao,y:ao,via:N.boolean().optional(),via_to_layer:WA.optional()}),xio=N.array(C2t),y2t=N.object({x:ao,y:ao,via:N.boolean().optional(),to_layer:WA.optional(),trace_width:ao.optional()}),x2t=N.object({min_trace_width:Di.optional(),min_board_edge_clearance:Di.optional(),min_via_hole_edge_to_via_hole_edge_clearance:Di.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:Di.optional(),min_trace_to_pad_edge_clearance:Di.optional(),min_pad_edge_to_pad_edge_clearance:Di.optional(),min_same_net_trace_edge_to_trace_edge_clearance:Di.optional(),min_different_net_trace_edge_to_trace_edge_clearance:Di.optional(),min_via_edge_to_pad_edge_clearance:Di.optional(),min_via_hole_diameter:Di.optional(),min_via_pad_diameter:Di.optional()}),E2t=N.object({type:N.literal(\"pcb_component\"),pcb_component_id:So(\"pcb_component\"),source_component_id:N.string(),center:_r,layer:WA,rotation:im,display_offset_x:N.string().optional().describe(\"How to display the x offset for this part, usually corresponding with how the user specified it\"),display_offset_y:N.string().optional().describe(\"How to display the y offset for this part, usually corresponding with how the user specified it\"),width:Di,height:Di,do_not_place:N.boolean().optional(),is_allowed_to_be_off_board:N.boolean().optional(),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),position_mode:N.enum([\"packed\",\"relative_to_group_anchor\",\"relative_to_another_component\",\"none\"]).optional(),anchor_position:_r.optional(),anchor_alignment:ob.optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),cable_insertion_center:_r.optional(),insertion_direction:N.enum([\"from_above\",\"from_left\",\"from_right\",\"from_front\",\"from_back\"]).optional(),metadata:N.object({kicad_footprint:Ayt.optional()}).optional(),obstructs_within_bounds:N.boolean().default(!0).describe(\"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath\")}).describe(\"Defines a component on the PCB\"),B2t=N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:So(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"circle\"),hole_diameter:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Eio=B2t.describe(\"Defines a circular hole on the PCB\"),b2t=N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:So(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"rect\"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Bio=b2t.describe(\"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square.\"),S2t=N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:So(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.enum([\"circle\",\"square\"]),hole_diameter:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),bio=S2t.describe(\"Defines a circular or square hole on the PCB\"),Q2t=N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:So(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"oval\"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Sio=Q2t.describe(\"Defines an oval hole on the PCB\"),v2t=N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:So(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"pill\"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Qio=v2t.describe(\"Defines a pill-shaped hole on the PCB\"),w2t=N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:So(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"rotated_pill\"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,ccw_rotation:im,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),vio=w2t.describe(\"Defines a rotated pill-shaped hole on the PCB\"),P2t=S2t.or(Q2t).or(v2t).or(w2t).or(B2t).or(b2t),wio=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"circle\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_diameter:N.number(),hole_diameter:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Pio=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.enum([\"oval\",\"pill\"]),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_width:N.number(),outer_height:N.number(),hole_width:N.number(),hole_height:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,ccw_rotation:im,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Mio=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"circular_hole_with_rect_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal(\"circle\"),pad_shape:N.literal(\"rect\"),hole_diameter:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So(\"pcb_plated_hole\"),soldermask_margin:N.number().optional(),rect_ccw_rotation:im.optional()}),Dio=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"pill_hole_with_rect_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal(\"pill\"),pad_shape:N.literal(\"rect\"),hole_width:N.number(),hole_height:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Nio=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"rotated_pill_hole_with_rect_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal(\"rotated_pill\"),pad_shape:N.literal(\"rect\"),hole_width:N.number(),hole_height:N.number(),hole_ccw_rotation:im,rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),rect_ccw_rotation:im,hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Rio=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"hole_with_polygon_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.enum([\"circle\",\"oval\",\"pill\",\"rotated_pill\"]),hole_diameter:N.number().optional(),hole_width:N.number().optional(),hole_height:N.number().optional(),pad_outline:N.array(N.object({x:ao,y:ao})).min(3),hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So(\"pcb_plated_hole\"),soldermask_margin:N.number().optional(),ccw_rotation:im.optional()}),M2t=N.union([wio,Pio,Mio,Dio,Nio,Rio]),D2t=N.object({type:N.literal(\"pcb_port\"),pcb_port_id:So(\"pcb_port\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_port_id:N.string(),pcb_component_id:N.string().optional(),x:ao,y:ao,layers:N.array(WA),is_board_pinout:N.boolean().optional()}).describe(\"Defines a port on the PCB\"),Tio=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"circle\"),pcb_smtpad_id:So(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,radius:N.number(),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),kio=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"rect\"),pcb_smtpad_id:So(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),Fio=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"rotated_rect\"),pcb_smtpad_id:So(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),ccw_rotation:im,layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),N2t=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"pill\"),pcb_smtpad_id:So(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),radius:N.number(),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Lio=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"rotated_pill\"),pcb_smtpad_id:So(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),radius:N.number(),ccw_rotation:im,layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Hio=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"polygon\"),pcb_smtpad_id:So(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),points:N.array(_r),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),R2t=N.discriminatedUnion(\"shape\",[Tio,kio,Fio,Lio,N2t,Hio]).describe(\"Defines an SMT pad on the PCB\"),Oio=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"circle\"),pcb_solder_paste_id:So(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,radius:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Gio=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"rect\"),pcb_solder_paste_id:So(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Yio=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"pill\"),pcb_solder_paste_id:So(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),radius:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Uio=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"rotated_rect\"),pcb_solder_paste_id:So(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),ccw_rotation:ao,layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Kio=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"oval\"),pcb_solder_paste_id:So(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),T2t=N.union([Oio,Gio,Yio,Uio,Kio]).describe(\"Defines solderpaste on the PCB\"),k2t=N.object({type:N.literal(\"pcb_text\"),pcb_text_id:So(\"pcb_text\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),text:N.string(),center:_r,layer:WA,width:Di,height:Di,lines:N.number(),align:N.enum([\"bottom-left\"])}).describe(\"Defines text on the PCB\"),F2t=N.object({route_type:N.literal(\"wire\"),x:ao,y:ao,width:ao,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),start_pcb_port_id:N.string().optional(),end_pcb_port_id:N.string().optional(),layer:WA}),L2t=N.object({route_type:N.literal(\"via\"),x:ao,y:ao,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),hole_diameter:ao.optional(),outer_diameter:ao.optional(),from_layer:WA,to_layer:WA}),H2t=N.object({route_type:N.literal(\"through_pad\"),start:_r,end:_r,width:ao,start_layer:WA,end_layer:WA,pcb_smtpad_id:N.string().optional(),pcb_plated_hole_id:N.string().optional()}),O2t=N.union([F2t,L2t,H2t]),G2t=N.object({type:N.literal(\"pcb_trace\"),source_trace_id:N.string().optional(),pcb_component_id:N.string().optional(),pcb_trace_id:So(\"pcb_trace\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),route_thickness_mode:N.enum([\"constant\",\"interpolated\"]).default(\"constant\").optional(),route_order_index:N.number().optional(),should_round_corners:N.boolean().optional(),trace_length:N.number().optional(),highlight_color:N.string().optional(),route:N.array(O2t)}).describe(\"Defines a trace on the PCB\"),Y2t=N.object({type:N.literal(\"pcb_trace_warning\"),pcb_trace_warning_id:So(\"pcb_trace_warning\"),warning_type:N.literal(\"pcb_trace_warning\").default(\"pcb_trace_warning\"),message:N.string(),center:_r.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines a trace warning on the PCB\"),U2t=N.object({type:N.literal(\"pcb_trace_too_long_warning\"),pcb_trace_too_long_warning_id:So(\"pcb_trace_too_long_warning\"),warning_type:N.literal(\"pcb_trace_too_long_warning\").default(\"pcb_trace_too_long_warning\"),message:N.string(),pcb_trace_id:N.string(),source_net_id:N.string().optional(),source_trace_id:N.string().optional(),actual_trace_length:ao,maximum_trace_length:ao,subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a PCB trace is longer than its maximum allowed length\"),K2t=Wl.extend({type:N.literal(\"pcb_trace_error\"),pcb_trace_error_id:So(\"pcb_trace_error\"),error_type:N.literal(\"pcb_trace_error\").default(\"pcb_trace_error\"),center:_r.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines a trace error on the PCB\"),V2t=Wl.extend({type:N.literal(\"pcb_trace_missing_error\"),pcb_trace_missing_error_id:So(\"pcb_trace_missing_error\"),error_type:N.literal(\"pcb_trace_missing_error\").default(\"pcb_trace_missing_error\"),center:_r.optional(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines an error when a source trace has no corresponding PCB trace\"),z2t=Wl.extend({type:N.literal(\"pcb_port_not_matched_error\"),pcb_error_id:So(\"pcb_error\"),error_type:N.literal(\"pcb_port_not_matched_error\").default(\"pcb_port_not_matched_error\"),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines a trace error on the PCB where a port is not matched\"),J2t=Wl.extend({type:N.literal(\"pcb_port_not_connected_error\"),pcb_port_not_connected_error_id:So(\"pcb_port_not_connected_error\"),error_type:N.literal(\"pcb_port_not_connected_error\").default(\"pcb_port_not_connected_error\"),pcb_port_ids:N.array(N.string()),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines an error when a pcb port is not connected to any trace\"),W2t=N.object({type:N.literal(\"pcb_net\"),pcb_net_id:So(\"pcb_net\"),source_net_id:N.string().optional(),highlight_color:N.string().optional()}).describe(\"Defines a net on the PCB\"),j2t=N.object({type:N.literal(\"pcb_via\"),pcb_via_id:So(\"pcb_via\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),x:ao,y:ao,outer_diameter:ao.default(\"0.6mm\"),hole_diameter:ao.default(\"0.25mm\"),from_layer:WA.optional(),to_layer:WA.optional(),layers:N.array(WA),pcb_trace_id:N.string().optional(),net_is_assignable:N.boolean().optional(),net_assigned:N.boolean().optional(),is_tented:N.boolean().optional()}).describe(\"Defines a via on the PCB\"),$2t=N.object({type:N.literal(\"pcb_board\"),pcb_board_id:So(\"pcb_board\"),pcb_panel_id:N.string().optional(),carrier_pcb_board_id:N.string().optional(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),is_mounted_to_carrier_board:N.boolean().optional(),width:Di.optional(),height:Di.optional(),center:_r,display_offset_x:N.string().optional().describe(\"How to display the x offset for this board, usually corresponding with how the user specified it\"),display_offset_y:N.string().optional().describe(\"How to display the y offset for this board, usually corresponding with how the user specified it\"),thickness:Di.optional().default(1.4),num_layers:N.number().optional().default(4),outline:N.array(_r).optional(),shape:N.enum([\"rect\",\"polygon\"]).optional(),material:N.enum([\"fr4\",\"fr1\"]).default(\"fr4\"),solder_mask_color:N.string().optional(),silkscreen_color:N.string().optional(),anchor_position:_r.optional(),anchor_alignment:ob.optional(),position_mode:N.enum([\"relative_to_panel_anchor\",\"none\"]).optional()}).merge(x2t).describe(\"Defines the board outline of the PCB\"),q2t=N.object({type:N.literal(\"pcb_panel\"),pcb_panel_id:So(\"pcb_panel\"),width:Di,height:Di,center:_r,thickness:Di.optional().default(1.4),covered_with_solder_mask:N.boolean().optional().default(!0)}).describe(\"Defines a PCB panel that can contain multiple boards\"),X2t=Wl.extend({type:N.literal(\"pcb_placement_error\"),pcb_placement_error_id:So(\"pcb_placement_error\"),error_type:N.literal(\"pcb_placement_error\").default(\"pcb_placement_error\"),subcircuit_id:N.string().optional()}).describe(\"Defines a placement error on the PCB\"),Z2t=Wl.extend({type:N.literal(\"pcb_panelization_placement_error\"),pcb_panelization_placement_error_id:So(\"pcb_panelization_placement_error\"),error_type:N.literal(\"pcb_panelization_placement_error\").default(\"pcb_panelization_placement_error\"),pcb_panel_id:N.string().optional(),pcb_board_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Defines a panelization placement error on the PCB\"),ext=N.object({type:N.literal(\"pcb_trace_hint\"),pcb_trace_hint_id:So(\"pcb_trace_hint\"),pcb_port_id:N.string(),pcb_component_id:N.string(),route:N.array(y2t),subcircuit_id:N.string().optional()}).describe(\"A hint that can be used during generation of a PCB trace\"),txt=N.object({type:N.literal(\"pcb_silkscreen_line\"),pcb_silkscreen_line_id:So(\"pcb_silkscreen_line\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),stroke_width:ao.default(\"0.1mm\"),x1:ao,y1:ao,x2:ao,y2:ao,layer:W_}).describe(\"Defines a silkscreen line on the PCB\"),nxt=N.object({type:N.literal(\"pcb_silkscreen_path\"),pcb_silkscreen_path_id:So(\"pcb_silkscreen_path\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,route:N.array(_r),stroke_width:Di}).describe(\"Defines a silkscreen path on the PCB\"),oxt=N.object({type:N.literal(\"pcb_silkscreen_text\"),pcb_silkscreen_text_id:So(\"pcb_silkscreen_text\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ao.default(\"0.2mm\"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Di,top:Di,bottom:Di,right:Di}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:N.number().optional(),layer:WA,is_mirrored:N.boolean().default(!1).optional(),anchor_position:_r.default({x:0,y:0}),anchor_alignment:ob.default(\"center\")}).describe(\"Defines silkscreen text on the PCB\"),ixt=N.object({type:N.literal(\"pcb_copper_text\"),pcb_copper_text_id:So(\"pcb_copper_text\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ao.default(\"0.2mm\"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Di,top:Di,bottom:Di,right:Di}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:N.number().optional(),layer:WA,is_mirrored:N.boolean().default(!1).optional(),anchor_position:_r.default({x:0,y:0}),anchor_alignment:ob.default(\"center\")}).describe(\"Defines copper text on the PCB\"),rxt=N.object({type:N.literal(\"pcb_silkscreen_rect\"),pcb_silkscreen_rect_id:So(\"pcb_silkscreen_rect\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:WA,stroke_width:Di.default(\"1mm\"),corner_radius:Di.optional(),is_filled:N.boolean().default(!0).optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),ccw_rotation:N.number().optional()}).describe(\"Defines a silkscreen rect on the PCB\"),sxt=N.object({type:N.literal(\"pcb_silkscreen_circle\"),pcb_silkscreen_circle_id:So(\"pcb_silkscreen_circle\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius:Di,layer:W_,stroke_width:Di.default(\"1mm\"),is_filled:N.boolean().optional()}).describe(\"Defines a silkscreen circle on the PCB\"),axt=N.object({type:N.literal(\"pcb_silkscreen_oval\"),pcb_silkscreen_oval_id:So(\"pcb_silkscreen_oval\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius_x:ao,radius_y:ao,layer:W_,ccw_rotation:im.optional()}).describe(\"Defines a silkscreen oval on the PCB\"),Axt=N.object({type:N.literal(\"pcb_silkscreen_graphic\"),pcb_silkscreen_graphic_id:So(\"pcb_silkscreen_graphic\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,image_asset:y8e.optional()}).extend({shape:N.literal(\"brep\"),brep_shape:$8e}).describe(\"Defines a BRep silkscreen graphic on the PCB\"),cxt=N.discriminatedUnion(\"shape\",[Axt]).describe(\"Defines a silkscreen graphic on the PCB\"),lxt=N.object({type:N.literal(\"pcb_silkscreen_pill\"),pcb_silkscreen_pill_id:So(\"pcb_silkscreen_pill\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:WA,ccw_rotation:N.number().optional()}).describe(\"Defines a silkscreen pill on the PCB\"),uxt=N.object({type:N.literal(\"pcb_fabrication_note_text\"),pcb_fabrication_note_text_id:So(\"pcb_fabrication_note_text\"),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ao.default(\"1mm\"),pcb_component_id:N.string(),text:N.string(),ccw_rotation:N.number().optional(),layer:W_,anchor_position:_r.default({x:0,y:0}),anchor_alignment:N.enum([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),color:N.string().optional()}).describe(\"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\"),gxt=N.object({type:N.literal(\"pcb_fabrication_note_path\"),pcb_fabrication_note_path_id:So(\"pcb_fabrication_note_path\"),pcb_component_id:N.string(),subcircuit_id:N.string().optional(),layer:WA,route:N.array(_r),stroke_width:Di,color:N.string().optional()}).describe(\"Defines a fabrication path on the PCB for fabricators or assemblers\"),dxt=N.object({type:N.literal(\"pcb_fabrication_note_rect\"),pcb_fabrication_note_rect_id:So(\"pcb_fabrication_note_rect\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:W_,stroke_width:Di.default(\"0.1mm\"),corner_radius:Di.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe(\"Defines a fabrication note rectangle on the PCB\"),hxt=N.object({type:N.literal(\"pcb_fabrication_note_dimension\"),pcb_fabrication_note_dimension_id:So(\"pcb_fabrication_note_dimension\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,from:_r,to:_r,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset:Di.optional(),offset_distance:Di.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:Di.default(\"1mm\"),color:N.string().optional(),arrow_size:Di.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB fabrication notes\"),pxt=N.object({type:N.literal(\"pcb_note_text\"),pcb_note_text_id:So(\"pcb_note_text\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ao.default(\"1mm\"),text:N.string().optional(),anchor_position:_r.default({x:0,y:0}),anchor_alignment:N.enum([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),layer:W_.default(\"top\"),is_mirrored_from_top_view:N.boolean().optional(),color:N.string().optional()}).describe(\"Defines a documentation note in text on the PCB\"),mxt=N.object({type:N.literal(\"pcb_note_rect\"),pcb_note_rect_id:So(\"pcb_note_rect\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),center:_r,width:Di,height:Di,layer:W_.default(\"top\"),stroke_width:Di.default(\"0.1mm\"),corner_radius:Di.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe(\"Defines a rectangular documentation note on the PCB\"),_xt=N.object({type:N.literal(\"pcb_note_path\"),pcb_note_path_id:So(\"pcb_note_path\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),route:N.array(_r),layer:W_.default(\"top\"),stroke_width:Di.default(\"0.1mm\"),color:N.string().optional()}).describe(\"Defines a polyline documentation note on the PCB\"),fxt=N.object({type:N.literal(\"pcb_note_line\"),pcb_note_line_id:So(\"pcb_note_line\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),x1:ao,y1:ao,x2:ao,y2:ao,layer:W_.default(\"top\"),stroke_width:ao.default(\"0.1mm\"),color:N.string().optional(),is_dashed:N.boolean().optional()}).describe(\"Defines a straight documentation note line on the PCB\"),Ixt=N.object({type:N.literal(\"pcb_note_dimension\"),pcb_note_dimension_id:So(\"pcb_note_dimension\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),from:_r,to:_r,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset_distance:Di.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:Di.default(\"1mm\"),layer:W_.default(\"top\"),color:N.string().optional(),arrow_size:Di.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB documentation notes\"),Cxt=Wl.extend({type:N.literal(\"pcb_footprint_overlap_error\"),pcb_error_id:So(\"pcb_error\"),error_type:N.literal(\"pcb_footprint_overlap_error\").default(\"pcb_footprint_overlap_error\"),pcb_smtpad_ids:N.array(N.string()).optional(),pcb_plated_hole_ids:N.array(N.string()).optional(),pcb_hole_ids:N.array(N.string()).optional(),pcb_keepout_ids:N.array(N.string()).optional()}).describe(\"Error emitted when a pcb footprint overlaps with another element\"),yxt=Wl.extend({type:N.literal(\"pcb_courtyard_overlap_error\"),pcb_error_id:So(\"pcb_error\"),error_type:N.literal(\"pcb_courtyard_overlap_error\").default(\"pcb_courtyard_overlap_error\"),pcb_component_ids:N.tuple([N.string(),N.string()])}).describe(\"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another\"),xxt=N.object({type:N.literal(\"pcb_keepout\"),shape:N.literal(\"rect\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:ao,height:ao,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()}).or(N.object({type:N.literal(\"pcb_keepout\"),shape:N.literal(\"circle\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius:ao,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()})),sAe=N.object({type:N.literal(\"pcb_cutout\"),pcb_cutout_id:So(\"pcb_cutout\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_board_id:N.string().optional(),pcb_panel_id:N.string().optional()}),Ext=sAe.extend({shape:N.literal(\"rect\"),center:_r,width:Di,height:Di,rotation:im.optional(),corner_radius:Di.optional()}),Bxt=sAe.extend({shape:N.literal(\"circle\"),center:_r,radius:Di}),bxt=sAe.extend({shape:N.literal(\"polygon\"),points:N.array(_r)}),Sxt=sAe.extend({shape:N.literal(\"path\"),route:N.array(_r),slot_width:Di,slot_length:Di.optional(),space_between_slots:Di.optional(),slot_corner_radius:Di.optional()}),Qxt=N.discriminatedUnion(\"shape\",[Ext,Bxt,bxt,Sxt]).describe(\"Defines a cutout on the PCB, removing board material.\"),vxt=Wl.extend({type:N.literal(\"pcb_missing_footprint_error\"),pcb_missing_footprint_error_id:So(\"pcb_missing_footprint_error\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal(\"pcb_missing_footprint_error\").default(\"pcb_missing_footprint_error\"),source_component_id:N.string()}).describe(\"Defines a missing footprint error on the PCB\"),wxt=Wl.extend({type:N.literal(\"external_footprint_load_error\"),external_footprint_load_error_id:So(\"external_footprint_load_error\"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),error_type:N.literal(\"external_footprint_load_error\").default(\"external_footprint_load_error\")}).describe(\"Defines an error when an external footprint fails to load\"),Pxt=Wl.extend({type:N.literal(\"circuit_json_footprint_load_error\"),circuit_json_footprint_load_error_id:So(\"circuit_json_footprint_load_error\"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal(\"circuit_json_footprint_load_error\").default(\"circuit_json_footprint_load_error\"),circuit_json:N.array(N.any()).optional()}).describe(\"Defines an error when a circuit JSON footprint fails to load\"),Mxt=N.object({type:N.literal(\"pcb_group\"),pcb_group_id:So(\"pcb_group\"),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Di.optional(),height:Di.optional(),center:_r,display_offset_x:N.string().optional().describe(\"How to display the x offset for this group, usually corresponding with how the user specified it\"),display_offset_y:N.string().optional().describe(\"How to display the y offset for this group, usually corresponding with how the user specified it\"),outline:N.array(_r).optional(),anchor_position:_r.optional(),anchor_alignment:ob.default(\"center\"),position_mode:N.enum([\"packed\",\"relative_to_group_anchor\",\"none\"]).optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),pcb_component_ids:N.array(N.string()),child_layout_mode:N.enum([\"packed\",\"none\"]).optional(),name:N.string().optional(),description:N.string().optional(),layout_mode:N.string().optional(),autorouter_configuration:N.object({trace_clearance:Di}).optional(),autorouter_used_string:N.string().optional()}).describe(\"Defines a group of components on the PCB\"),Dxt=Wl.extend({type:N.literal(\"pcb_autorouting_error\"),pcb_error_id:So(\"pcb_autorouting_error\"),error_type:N.literal(\"pcb_autorouting_error\").default(\"pcb_autorouting_error\"),subcircuit_id:N.string().optional()}).describe(\"The autorouting has failed to route a portion of the board\"),Nxt=N.object({type:N.literal(\"pcb_manual_edit_conflict_warning\"),pcb_manual_edit_conflict_warning_id:So(\"pcb_manual_edit_conflict_warning\"),warning_type:N.literal(\"pcb_manual_edit_conflict_warning\").default(\"pcb_manual_edit_conflict_warning\"),message:N.string(),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe(\"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\"),Rxt=N.enum([\"x-\",\"x+\",\"y+\",\"y-\"]),Txt=N.object({type:N.literal(\"pcb_connector_not_in_accessible_orientation_warning\"),pcb_connector_not_in_accessible_orientation_warning_id:So(\"pcb_connector_not_in_accessible_orientation_warning\"),warning_type:N.literal(\"pcb_connector_not_in_accessible_orientation_warning\").default(\"pcb_connector_not_in_accessible_orientation_warning\"),message:N.string(),pcb_component_id:N.string(),source_component_id:N.string().optional(),pcb_board_id:N.string().optional(),facing_direction:Rxt,recommended_facing_direction:Rxt,subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction\"),kxt=N.object({type:N.literal(\"supplier_footprint_mismatch_warning\"),supplier_footprint_mismatch_warning_id:So(\"supplier_footprint_mismatch_warning\"),warning_type:N.literal(\"supplier_footprint_mismatch_warning\").default(\"supplier_footprint_mismatch_warning\"),message:N.string(),source_component_id:N.string(),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),supplier_name:oAe.optional(),supplier_part_number:N.string().optional(),supplier_footprint_url:N.string().optional(),footprint_copper_intersection_over_union:N.number()}).describe(\"Warning emitted when a supplier part footprint does not match the expected footprint\"),Fxt=N.object({type:N.literal(\"pcb_breakout_point\"),pcb_breakout_point_id:So(\"pcb_breakout_point\"),pcb_group_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional(),source_port_id:N.string().optional(),source_net_id:N.string().optional(),x:ao,y:ao}).describe(\"Defines a routing target within a pcb_group for a source_trace or source_net\"),Lxt=N.object({type:N.literal(\"pcb_ground_plane\"),pcb_ground_plane_id:So(\"pcb_ground_plane\"),source_pcb_ground_plane_id:N.string(),source_net_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Defines a ground plane on the PCB\"),Hxt=N.object({type:N.literal(\"pcb_ground_plane_region\"),pcb_ground_plane_region_id:So(\"pcb_ground_plane_region\"),pcb_ground_plane_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:WA,points:N.array(_r)}).describe(\"Defines a polygon region of a ground plane\"),Oxt=N.object({type:N.literal(\"pcb_thermal_spoke\"),pcb_thermal_spoke_id:So(\"pcb_thermal_spoke\"),pcb_ground_plane_id:N.string(),shape:N.string(),spoke_count:N.number(),spoke_thickness:ao,spoke_inner_diameter:ao,spoke_outer_diameter:ao,pcb_plated_hole_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Pattern for connecting a ground plane to a plated hole\"),q8e=N.object({type:N.literal(\"pcb_copper_pour\"),pcb_copper_pour_id:So(\"pcb_copper_pour\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:WA,source_net_id:N.string().optional(),covered_with_solder_mask:N.boolean().optional().default(!0)}),Gxt=q8e.extend({shape:N.literal(\"rect\"),center:_r,width:Di,height:Di,rotation:im.optional()}),Yxt=q8e.extend({shape:N.literal(\"brep\"),brep_shape:$8e}),Uxt=q8e.extend({shape:N.literal(\"polygon\"),points:N.array(_r)}),Kxt=N.discriminatedUnion(\"shape\",[Gxt,Yxt,Uxt]).describe(\"Defines a copper pour on the PCB.\"),Vxt=Wl.extend({type:N.literal(\"pcb_component_outside_board_error\"),pcb_component_outside_board_error_id:So(\"pcb_component_outside_board_error\"),error_type:N.literal(\"pcb_component_outside_board_error\").default(\"pcb_component_outside_board_error\"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:_r,component_bounds:N.object({min_x:N.number(),max_x:N.number(),min_y:N.number(),max_y:N.number()}),subcircuit_id:N.string().optional(),source_component_id:N.string().optional()}).describe(\"Error emitted when a PCB component is placed outside the board boundaries\"),zxt=Wl.extend({type:N.literal(\"pcb_component_not_on_board_edge_error\"),pcb_component_not_on_board_edge_error_id:So(\"pcb_component_not_on_board_edge_error\"),error_type:N.literal(\"pcb_component_not_on_board_edge_error\").default(\"pcb_component_not_on_board_edge_error\"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:_r,pad_to_nearest_board_edge_distance:N.number(),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a component that must be placed on the board edge is centered away from the edge\"),Jxt=Wl.extend({type:N.literal(\"pcb_component_invalid_layer_error\"),pcb_component_invalid_layer_error_id:So(\"pcb_component_invalid_layer_error\"),error_type:N.literal(\"pcb_component_invalid_layer_error\").default(\"pcb_component_invalid_layer_error\"),pcb_component_id:N.string().optional(),source_component_id:N.string(),layer:WA,subcircuit_id:N.string().optional()}).describe(\"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)\"),Wxt=Wl.extend({type:N.literal(\"pcb_via_clearance_error\"),pcb_error_id:So(\"pcb_error\"),error_type:N.literal(\"pcb_via_clearance_error\").default(\"pcb_via_clearance_error\"),pcb_via_ids:N.array(N.string()).min(2),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when vias are closer than the allowed clearance\"),jxt=Wl.extend({type:N.literal(\"pcb_via_trace_clearance_error\"),pcb_via_trace_clearance_error_id:So(\"pcb_via_trace_clearance_error\"),error_type:N.literal(\"pcb_via_trace_clearance_error\").default(\"pcb_via_trace_clearance_error\"),pcb_via_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a via and trace are closer than the allowed clearance\"),$xt=Wl.extend({type:N.literal(\"pcb_pad_pad_clearance_error\"),pcb_pad_pad_clearance_error_id:So(\"pcb_pad_pad_clearance_error\"),error_type:N.literal(\"pcb_pad_pad_clearance_error\").default(\"pcb_pad_pad_clearance_error\"),pcb_pad_ids:N.array(N.string()).min(2),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when pads are closer than the allowed clearance\"),qxt=Wl.extend({type:N.literal(\"pcb_pad_trace_clearance_error\"),pcb_pad_trace_clearance_error_id:So(\"pcb_pad_trace_clearance_error\"),error_type:N.literal(\"pcb_pad_trace_clearance_error\").default(\"pcb_pad_trace_clearance_error\"),pcb_pad_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a pad and trace are closer than allowed clearance\"),Xxt=N.object({type:N.literal(\"pcb_courtyard_rect\"),pcb_courtyard_rect_id:So(\"pcb_courtyard_rect\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:W_,ccw_rotation:im.optional(),color:N.string().optional()}).describe(\"Defines a courtyard rectangle on the PCB\"),Zxt=N.object({type:N.literal(\"pcb_courtyard_outline\"),pcb_courtyard_outline_id:So(\"pcb_courtyard_outline\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,outline:N.array(_r).min(2)}).describe(\"Defines a courtyard outline on the PCB\"),e3t=N.object({type:N.literal(\"pcb_courtyard_polygon\"),pcb_courtyard_polygon_id:So(\"pcb_courtyard_polygon\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,points:N.array(_r).min(3),color:N.string().optional()}).describe(\"Defines a courtyard polygon on the PCB\"),t3t=N.object({type:N.literal(\"pcb_courtyard_circle\"),pcb_courtyard_circle_id:So(\"pcb_courtyard_circle\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius:Di,layer:W_,color:N.string().optional()}).describe(\"Defines a courtyard circle on the PCB\"),n3t=N.object({type:N.literal(\"pcb_courtyard_pill\"),pcb_courtyard_pill_id:So(\"pcb_courtyard_pill\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,radius:Di,layer:W_,color:N.string().optional()}).describe(\"Defines a courtyard pill on the PCB\"),Vio=[\"obj\",\"stl\",\"3mf\",\"gltf\",\"glb\",\"step\",\"wrl\"],o3t=[\"x+\",\"x-\",\"y+\",\"y-\",\"z+\",\"z-\"],zio={obj:\"z+\",stl:\"z+\",\"3mf\":\"z+\",gltf:\"y+\",glb:\"y+\",step:\"z+\",wrl:\"y+\"},i3t=N.object({type:N.literal(\"cad_component\"),cad_component_id:N.string(),pcb_component_id:N.string(),source_component_id:N.string(),position:nb,rotation:nb.optional(),size:nb.optional(),layer:WA.optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),model_obj_url:N.string().optional(),model_stl_url:N.string().optional(),model_3mf_url:N.string().optional(),model_gltf_url:N.string().optional(),model_glb_url:N.string().optional(),model_step_url:N.string().optional(),model_wrl_url:N.string().optional(),model_asset:y8e.optional(),model_unit_to_mm_scale_factor:N.number().optional(),model_board_normal_direction:N.enum(o3t).optional().describe(`The direction in the model's coordinate space that is considered \"up\" or \"coming out of the board surface\"`),model_origin_position:nb.optional(),model_origin_alignment:N.enum([\"unknown\",\"center\",\"center_of_component_on_board_surface\",\"bottom_center_of_component\"]).optional(),model_object_fit:N.enum([\"contain_within_bounds\",\"fill_bounds\"]).optional().default(\"contain_within_bounds\"),model_jscad:N.any().optional(),show_as_translucent_model:N.boolean().optional(),show_as_bounding_box:N.boolean().optional(),anchor_alignment:N.enum([\"center\",\"center_of_component_on_board_surface\"]).optional().default(\"center\")}).describe(\"Defines a component on the PCB\"),X8e=N.enum([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]),Jio=N.union([N.string(),N.number()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),r3t=N.object({type:N.literal(\"simulation_voltage_source\"),simulation_voltage_source_id:So(\"simulation_voltage_source\"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),voltage:tb}).describe(\"Defines a DC voltage source for simulation\"),s3t=N.object({type:N.literal(\"simulation_voltage_source\"),simulation_voltage_source_id:So(\"simulation_voltage_source\"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),voltage:tb.optional(),frequency:tN.optional(),peak_to_peak_voltage:tb.optional(),wave_shape:X8e.optional(),phase:im.optional(),duty_cycle:Jio.optional(),pulse_delay:J_.optional(),rise_time:J_.optional(),fall_time:J_.optional(),pulse_width:J_.optional(),period:J_.optional()}).describe(\"Defines an AC voltage source for simulation\"),a3t=N.union([r3t,s3t]).describe(\"Defines a voltage source for simulation\"),Wio=N.union([N.string(),N.number()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),A3t=N.object({type:N.literal(\"simulation_current_source\"),simulation_current_source_id:So(\"simulation_current_source\"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),current:vL}).describe(\"Defines a DC current source for simulation\"),c3t=N.object({type:N.literal(\"simulation_current_source\"),simulation_current_source_id:So(\"simulation_current_source\"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),current:vL.optional(),frequency:tN.optional(),peak_to_peak_current:vL.optional(),wave_shape:X8e.optional(),phase:im.optional(),duty_cycle:Wio.optional()}).describe(\"Defines an AC current source for simulation\"),l3t=N.union([A3t,c3t]).describe(\"Defines a current source for simulation\"),u3t=N.union([N.literal(\"spice_dc_sweep\"),N.literal(\"spice_dc_operating_point\"),N.literal(\"spice_transient_analysis\"),N.literal(\"spice_ac_analysis\")]),g3t=N.object({method:N.enum([\"trap\",\"gear\"]).optional(),reltol:N.union([N.number(),N.string()]).optional(),abstol:N.union([N.number(),N.string()]).optional(),vntol:N.union([N.number(),N.string()]).optional()}).describe(\"SPICE solver options for a simulation experiment\"),d3t=N.object({type:N.literal(\"simulation_experiment\"),simulation_experiment_id:So(\"simulation_experiment\"),name:N.string(),experiment_type:u3t,time_per_step:wL.optional(),start_time_ms:J_.optional(),end_time_ms:J_.optional(),spice_options:g3t.optional()}).describe(\"Defines a simulation experiment configuration\"),h3t=N.object({type:N.literal(\"simulation_transient_voltage_graph\"),simulation_transient_voltage_graph_id:So(\"simulation_transient_voltage_graph\"),simulation_experiment_id:N.string(),timestamps_ms:N.array(N.number()).optional(),voltage_levels:N.array(N.number()),source_component_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),time_per_step:wL,start_time_ms:J_,end_time_ms:J_,name:N.string().optional(),color:N.string().optional()}).describe(\"Stores voltage measurements over time for a simulation\"),p3t=N.object({type:N.literal(\"simulation_transient_current_graph\"),simulation_transient_current_graph_id:So(\"simulation_transient_current_graph\"),simulation_experiment_id:N.string(),timestamps_ms:N.array(N.number()).optional(),current_levels:N.array(N.number()),source_component_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),time_per_step:wL,start_time_ms:J_,end_time_ms:J_,name:N.string().optional(),color:N.string().optional()}).describe(\"Stores current measurements over time for a simulation\"),m3t=N.object({type:N.literal(\"simulation_switch\"),simulation_switch_id:So(\"simulation_switch\"),source_component_id:N.string().optional(),closes_at:J_.optional(),opens_at:J_.optional(),starts_closed:N.boolean().optional(),switching_frequency:tN.optional()}).describe(\"Defines a switch for simulation timing control\"),_3t=N.object({type:N.literal(\"simulation_voltage_probe\"),simulation_voltage_probe_id:So(\"simulation_voltage_probe\"),source_component_id:N.string().optional(),name:N.string().optional(),signal_input_source_port_id:N.string().optional(),signal_input_source_net_id:N.string().optional(),reference_input_source_port_id:N.string().optional(),reference_input_source_net_id:N.string().optional(),subcircuit_id:N.string().optional(),color:N.string().optional()}).describe(\"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.\").superRefine((t,e)=\u003e{if(t.reference_input_source_port_id||t.reference_input_source_net_id){const n=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,o=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;n\u0026\u0026o?e.addIssue({code:N.ZodIssueCode.custom,message:\"Cannot mix port and net connections in a differential probe.\"}):n?t.signal_input_source_port_id\u0026\u0026t.reference_input_source_port_id||e.addIssue({code:N.ZodIssueCode.custom,message:\"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id.\"}):o\u0026\u0026(t.signal_input_source_net_id\u0026\u0026t.reference_input_source_net_id||e.addIssue({code:N.ZodIssueCode.custom,message:\"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id.\"}))}else!!t.signal_input_source_port_id==!!t.signal_input_source_net_id\u0026\u0026e.addIssue({code:N.ZodIssueCode.custom,message:\"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id.\"})}),f3t=N.object({type:N.literal(\"simulation_current_probe\"),simulation_current_probe_id:So(\"simulation_current_probe\"),source_component_id:N.string().optional(),name:N.string().optional(),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),subcircuit_id:N.string().optional(),color:N.string().optional()}).describe(\"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint.\").superRefine((t,e)=\u003e{const n=!!t.positive_source_port_id,o=!!t.negative_source_port_id,i=!!t.positive_source_net_id,r=!!t.negative_source_net_id,s=n||o,a=i||r;s\u0026\u0026a?e.addIssue({code:N.ZodIssueCode.custom,message:\"Cannot mix port and net connections in a current probe.\"}):s?n\u0026\u0026o||e.addIssue({code:N.ZodIssueCode.custom,message:\"Current probe using source ports requires both positive_source_port_id and negative_source_port_id.\"}):a?i\u0026\u0026r||e.addIssue({code:N.ZodIssueCode.custom,message:\"Current probe using source nets requires both positive_source_net_id and negative_source_net_id.\"}):e.addIssue({code:N.ZodIssueCode.custom,message:\"A current probe must have either positive/negative source port ids or positive/negative source net ids.\"})}),I3t=Wl.extend({type:N.literal(\"simulation_unknown_experiment_error\"),simulation_unknown_experiment_error_id:So(\"simulation_unknown_experiment_error\"),error_type:N.literal(\"simulation_unknown_experiment_error\").default(\"simulation_unknown_experiment_error\"),simulation_experiment_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"An unknown error occurred during the simulation experiment.\"),C3t=N.object({type:N.literal(\"simulation_op_amp\"),simulation_op_amp_id:So(\"simulation_op_amp\"),source_component_id:N.string().optional(),inverting_input_source_port_id:N.string(),non_inverting_input_source_port_id:N.string(),output_source_port_id:N.string(),positive_supply_source_port_id:N.string(),negative_supply_source_port_id:N.string()}).describe(\"Defines a simple ideal operational amplifier for simulation\"),y3t=N.object({type:N.literal(\"simulation_spice_subcircuit\"),simulation_spice_subcircuit_id:So(\"simulation_spice_subcircuit\"),source_component_id:N.string(),spice_pin_to_source_port_map:N.record(N.string(),N.string()),subcircuit_source:N.string()}).describe(\"Defines a custom SPICE subcircuit model for simulation\"),x3t=t=\u003et!==void 0,E3t=N.object({type:N.literal(\"simulation_oscilloscope_trace\"),simulation_oscilloscope_trace_id:So(\"simulation_oscilloscope_trace\"),simulation_transient_voltage_graph_id:N.string().optional(),simulation_transient_current_graph_id:N.string().optional(),simulation_voltage_probe_id:N.string().optional(),simulation_current_probe_id:N.string().optional(),display_name:N.string().optional(),color:N.string().optional(),display_center_value:N.number().optional(),display_center_offset_divs:N.number().optional(),volts_per_div:N.number().positive().optional(),amps_per_div:N.number().positive().optional()}).describe(\"Defines how a simulation measurement is rendered as an oscilloscope-style trace.\").superRefine((t,e)=\u003e{const n=[t.simulation_transient_voltage_graph_id,t.simulation_voltage_probe_id].filter(x3t).length,o=[t.simulation_transient_current_graph_id,t.simulation_current_probe_id].filter(x3t).length;n+o!==1\u0026\u0026e.addIssue({code:N.ZodIssueCode.custom,message:\"An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe.\"}),n\u003e0\u0026\u0026t.amps_per_div!==void 0\u0026\u0026e.addIssue({code:N.ZodIssueCode.custom,message:\"Voltage oscilloscope traces must use volts_per_div, not amps_per_div.\"}),o\u003e0\u0026\u0026t.volts_per_div!==void 0\u0026\u0026e.addIssue({code:N.ZodIssueCode.custom,message:\"Current oscilloscope traces must use amps_per_div, not volts_per_div.\"})}),B3t=N.union([Myt,wyt,Pyt,vyt,Nyt,Dyt,S8e,E8e,iAe,b8e,B8e,Q8e,v8e,w8e,D8e,N8e,R8e,H8e,T8e,k8e,F8e,L8e,M8e,P8e,kyt,Fyt,Ryt,O8e,G8e,Y8e,U8e,Lyt,K8e,V8e,Hyt,Oyt,Gyt,Yyt,Uyt,Kyt,z8e,J8e,Tyt,E2t,P2t,vxt,wxt,Pxt,Nxt,Txt,kxt,M2t,xxt,D2t,W2t,k2t,G2t,Y2t,U2t,j2t,R2t,T2t,$2t,q2t,Mxt,ext,txt,nxt,oxt,lxt,ixt,rxt,sxt,axt,cxt,K2t,V2t,X2t,Z2t,z2t,J2t,Wxt,jxt,$xt,qxt,gxt,uxt,dxt,hxt,pxt,mxt,_xt,fxt,Ixt,Dxt,Cxt,yxt,Fxt,Qxt,Lxt,Hxt,Oxt,Kxt,Vxt,zxt,Jxt,Xxt,Zxt,e3t,t3t,n3t,Vyt,i2t,Zyt,e2t,t2t,n2t,qyt,Xyt,r2t,o2t,zyt,a2t,A2t,s2t,g2t,d2t,h2t,p2t,f2t,m2t,_2t,i3t,a3t,l3t,d3t,h3t,p3t,m3t,_3t,f3t,E3t,I3t,C3t,y3t]),aAe=B3t;function b3t(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}var yx=(t,e={})=\u003e{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split(\"_\").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=\u003e{if(s===\"toArray\")return()=\u003e(n.editCount=o.editCount,n);if(s===\"editCount\")return o.editCount;if(s===\"subtree\")return A=\u003eyx((function(c,l){if(!l.subcircuit_id\u0026\u0026!l.source_group_id)return[...c];let u=l;if(l.subcircuit_id){const m=new Set([l.subcircuit_id]),_=new Map,f=new Map;for(const C of c)if(C.type===\"source_group\"){const y=C.source_group_id,x=C.subcircuit_id;x\u0026\u0026f.set(y,x);const E=C.parent_source_group_id;E\u0026\u0026(_.has(E)||_.set(E,[]),_.get(E).push(y))}let I;for(const[C,y]of f)if(y===l.subcircuit_id){I=C;break}if(I){const C=y=\u003e{const x=_.get(y)||[];for(const E of x){const B=f.get(E);B\u0026\u0026m.add(B),C(E)}};C(I),u={...l,subcircuit_ids:Array.from(m)}}}const g=new Map;for(const m of c){const _=m[`${m.type}_id`];typeof _==\"string\"\u0026\u0026g.set(_,m)}const h=new Map;for(const m of c){const _=Object.entries(m);for(const[f,I]of _)if(f!==\"parent_source_group_id\"){if(f.endsWith(\"_id\")\u0026\u0026typeof I==\"string\")b3t(h,m,g.get(I));else if(f.endsWith(\"_ids\")\u0026\u0026Array.isArray(I))for(const C of I)typeof C==\"string\"\u0026\u0026b3t(h,m,g.get(C))}}const d=[],p=new Set;for(const m of c){let _=!1;(u.subcircuit_id\u0026\u0026\"subcircuit_id\"in m\u0026\u0026m.subcircuit_id===u.subcircuit_id||u.subcircuit_ids\u0026\u0026\"subcircuit_id\"in m\u0026\u0026m.subcircuit_id\u0026\u0026u.subcircuit_ids.includes(m.subcircuit_id)||u.source_group_id\u0026\u0026\"source_group_id\"in m\u0026\u0026m.source_group_id===u.source_group_id||u.source_group_id\u0026\u0026\"member_source_group_ids\"in m\u0026\u0026Array.isArray(m.member_source_group_ids)\u0026\u0026m.member_source_group_ids.includes(u.source_group_id))\u0026\u0026(_=!0),_\u0026\u0026(d.push(m),p.add(m))}for(;d.length\u003e0;){const m=d.shift(),_=h.get(m);if(_)for(const f of _)p.has(f)||(p.add(f),d.push(f))}return c.filter(m=\u003ep.has(m))})(n,A),e);if(s===\"insert\")return A=\u003e{const c=A.type;if(!c)throw new Error(\"insert requires an element with a type\");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts\u0026\u0026(Vae[c]??aAe).parse(u),n.push(u),o.editCount++,u};if(s===\"insertAll\")return A=\u003eA.map(c=\u003ei.insert(c));const a=s;return{get:A=\u003en.find(c=\u003ec.type===a\u0026\u0026c[`${a}_id`]===A),getUsing:A=\u003e{const c=Object.keys(A);if(c.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const l=c[0],u=l.replace(\"_id\",\"\"),g=n.find(h=\u003eh.type===u\u0026\u0026h[l]===A[l]);return g?n.find(h=\u003eh.type===a\u0026\u0026h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=\u003e{const c=Object.keys(A);return n.find(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},list:A=\u003e{const c=A?Object.keys(A):[];return n.filter(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},insert:A=\u003e{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts\u0026\u0026(Vae[a]??aAe).parse(l),n.push(l),o.editCount++,l},delete:A=\u003e{const c=n.find(l=\u003el[`${a}_id`]===A);c\u0026\u0026(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=\u003e{const l=n.find(u=\u003eu.type===a\u0026\u0026u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=\u003e{if(a===\"source_component\")return n.find(c=\u003ec.type===\"source_component\"\u0026\u0026c.name===A.replace(/\\./g,\"\"));if(a===\"pcb_port\"||a===\"source_port\"||a===\"schematic_port\"){const[c,l]=A.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),u=n.find(h=\u003eh.type===\"source_component\"\u0026\u0026h.name===c);if(!u)return null;const g=n.find(h=\u003eh.type===\"source_port\"\u0026\u0026h.source_component_id===u.source_component_id\u0026\u0026(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a===\"source_port\")return g;if(a===\"pcb_port\")return n.find(h=\u003eh.type===\"pcb_port\"\u0026\u0026h.source_port_id===g.source_port_id);if(a===\"schematic_port\")return n.find(h=\u003eh.type===\"schematic_port\"\u0026\u0026h.source_port_id===g.source_port_id)}}}}});return i};yx.unparsed=yx;var nI=yx;function Z8e(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var S3t=(t,e={})=\u003e{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const r of t){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split(\"_\").pop()||\"\");Number.isNaN(A)||(n.counts[s]=Math.max(n.counts[s]??0,A))}const o=e.indexConfig||{},i=n.indexes;if(o.byId\u0026\u0026(i.byId=new Map),o.byType\u0026\u0026(i.byType=new Map),o.byRelation\u0026\u0026(i.byRelation=new Map),o.bySubcircuit\u0026\u0026(i.bySubcircuit=new Map),o.byCustomField\u0026\u0026o.byCustomField.length\u003e0){i.byCustomField=new Map;for(const r of o.byCustomField)i.byCustomField.set(r,new Map)}for(const r of t){if(o.byId){const s=Z8e(r);i.byId.set(s,r)}if(o.byType){const s=i.byType.get(r.type)||[];s.push(r),i.byType.set(r.type,s)}if(o.byRelation){const s=Object.entries(r);for(const[a,A]of s)if(a.endsWith(\"_id\")\u0026\u0026a!==`${r.type}_id`\u0026\u0026typeof A==\"string\"){const c=i.byRelation.get(a)||new Map,l=c.get(A)||[];l.push(r),c.set(A,l),i.byRelation.set(a,c)}}if(o.bySubcircuit\u0026\u0026\"subcircuit_id\"in r){const s=r.subcircuit_id;if(s\u0026\u0026typeof s==\"string\"){const a=i.bySubcircuit.get(s)||[];a.push(r),i.bySubcircuit.set(s,a)}}if(o.byCustomField\u0026\u0026i.byCustomField){for(const s of o.byCustomField)if(s in r){const a=r[s];if(a!==void 0\u0026\u0026(typeof a==\"string\"||typeof a==\"number\")){const A=String(a),c=i.byCustomField.get(s),l=c.get(A)||[];l.push(r),c.set(A,l)}}}}t._internal_store_indexed=n}return new Proxy({},{get:(o,i)=\u003e{if(i===\"toArray\")return()=\u003e(t.editCount=n.editCount,t);if(i===\"editCount\")return n.editCount;const r=i;return{get:s=\u003e{const a=e.indexConfig||{};return a.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${r}:${s}`)||null:a.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(r)||[]).find(A=\u003eA[`${r}_id`]===s)||null:t.find(A=\u003eA.type===r\u0026\u0026A[`${r}_id`]===s)||null},getUsing:s=\u003e{const a=e.indexConfig||{},A=Object.keys(s);if(A.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const c=A[0],l=c.replace(\"_id\",\"\");if(a.byRelation\u0026\u0026n.indexes.byRelation){const g=n.indexes.byRelation.get(c);if(g){const h=(g.get(s[c])||[]).find(p=\u003ep.type===l);if(!h)return null;const d=h[`${r}_id`];return a.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${r}:${d}`)||null:a.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(r)||[]).find(p=\u003ep[`${r}_id`]===d)||null:t.find(p=\u003ep.type===r\u0026\u0026p[`${r}_id`]===d)||null}}const u=t.find(g=\u003eg.type===l\u0026\u0026g[c]===s[c]);return u\u0026\u0026t.find(g=\u003eg.type===r\u0026\u0026g[`${r}_id`]===u[`${r}_id`])||null},getWhere:s=\u003e{const a=e.indexConfig||{},A=Object.keys(s);if(A.length===1\u0026\u0026a.byCustomField\u0026\u0026n.indexes.byCustomField){const c=A[0],l=n.indexes.byCustomField.get(c);if(l){const u=String(s[c]);return(l.get(u)||[]).find(g=\u003eg.type===r)||null}}if(\"subcircuit_id\"in s\u0026\u0026a.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const c=s.subcircuit_id;return(n.indexes.bySubcircuit.get(c)||[]).find(l=\u003el.type===r\u0026\u0026A.every(u=\u003el[u]===s[u]))||null}return a.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(r)||[]).find(c=\u003eA.every(l=\u003ec[l]===s[l]))||null:t.find(c=\u003ec.type===r\u0026\u0026A.every(l=\u003ec[l]===s[l]))||null},list:s=\u003e{const a=e.indexConfig||{},A=s?Object.keys(s):[];if(A.length===0\u0026\u0026a.byType\u0026\u0026n.indexes.byType)return n.indexes.byType.get(r)||[];if(A.length===1\u0026\u0026A[0]===\"subcircuit_id\"\u0026\u0026a.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const l=s.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).filter(u=\u003eu.type===r)}let c;return c=a.byType\u0026\u0026n.indexes.byType?n.indexes.byType.get(r)||[]:t.filter(l=\u003el.type===r),A.length\u003e0?c.filter(l=\u003eA.every(u=\u003el[u]===s[u])):c},insert:s=\u003e{n.counts[r]??=-1,n.counts[r]++;const a=n.counts[r],A={type:r,[`${r}_id`]:`${r}_${a}`,...s};e.validateInserts\u0026\u0026(Vae[r]??aAe).parse(A),t.push(A),n.editCount++;const c=e.indexConfig||{};if(c.byId\u0026\u0026n.indexes.byId){const l=Z8e(A);n.indexes.byId.set(l,A)}if(c.byType\u0026\u0026n.indexes.byType){const l=n.indexes.byType.get(r)||[];l.push(A),n.indexes.byType.set(r,l)}if(c.byRelation\u0026\u0026n.indexes.byRelation){const l=Object.entries(A);for(const[u,g]of l)if(u.endsWith(\"_id\")\u0026\u0026u!==`${A.type}_id`\u0026\u0026typeof g==\"string\"){const h=n.indexes.byRelation.get(u)||new Map,d=h.get(g)||[];d.push(A),h.set(g,d),n.indexes.byRelation.set(u,h)}}if(c.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in A){const l=A.subcircuit_id;if(l\u0026\u0026typeof l==\"string\"){const u=n.indexes.bySubcircuit.get(l)||[];u.push(A),n.indexes.bySubcircuit.set(l,u)}}if(c.byCustomField\u0026\u0026n.indexes.byCustomField){for(const l of c.byCustomField)if(l in A){const u=A[l];if(u!==void 0\u0026\u0026(typeof u==\"string\"||typeof u==\"number\")){const g=String(u),h=n.indexes.byCustomField.get(l),d=h.get(g)||[];d.push(A),h.set(g,d)}}}return A},delete:s=\u003e{const a=e.indexConfig||{};let A;if(a.byId\u0026\u0026n.indexes.byId?A=n.indexes.byId.get(`${r}:${s}`):a.byType\u0026\u0026n.indexes.byType?A=(n.indexes.byType.get(r)||[]).find(u=\u003eu[`${r}_id`]===s):A=t.find(l=\u003el[`${r}_id`]===s),!A)return;const c=t.indexOf(A);if(c\u003e=0\u0026\u0026(t.splice(c,1),n.editCount++),a.byId\u0026\u0026n.indexes.byId){const l=Z8e(A);n.indexes.byId.delete(l)}if(a.byType\u0026\u0026n.indexes.byType){const l=(n.indexes.byType.get(r)||[]).filter(u=\u003eu[`${r}_id`]!==s);n.indexes.byType.set(r,l)}if(a.byRelation\u0026\u0026n.indexes.byRelation)for(const[l,u]of n.indexes.byRelation.entries())for(const[g,h]of u.entries()){const d=h.filter(p=\u003ep!==A);d.length===0?u.delete(g):u.set(g,d)}if(a.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in A){const l=A.subcircuit_id;if(l){const u=(n.indexes.bySubcircuit.get(l)||[]).filter(g=\u003eg!==A);u.length===0?n.indexes.bySubcircuit.delete(l):n.indexes.bySubcircuit.set(l,u)}}if(a.byCustomField\u0026\u0026n.indexes.byCustomField)for(const l of n.indexes.byCustomField.values())for(const[u,g]of l.entries()){const h=g.filter(d=\u003ed!==A);h.length===0?l.delete(u):l.set(u,h)}},update:(s,a)=\u003e{const A=e.indexConfig||{};let c;if(A.byId\u0026\u0026n.indexes.byId?c=n.indexes.byId.get(`${r}:${s}`):A.byType\u0026\u0026n.indexes.byType?c=(n.indexes.byType.get(r)||[]).find(u=\u003eu[`${r}_id`]===s):c=t.find(l=\u003el.type===r\u0026\u0026l[`${r}_id`]===s),!c)return null;if(A.byRelation\u0026\u0026n.indexes.byRelation){const l=Object.entries(c);for(const[u,g]of l)if(u.endsWith(\"_id\")\u0026\u0026u!==`${c.type}_id`\u0026\u0026typeof g==\"string\"\u0026\u0026u in a\u0026\u0026a[u]!==g){const h=n.indexes.byRelation.get(u);if(h){const d=(h.get(g)||[]).filter(p=\u003ep!==c);d.length===0?h.delete(g):h.set(g,d)}}}if(A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c\u0026\u0026\"subcircuit_id\"in a){const l=c.subcircuit_id;if(l!==a.subcircuit_id){const u=(n.indexes.bySubcircuit.get(l)||[]).filter(g=\u003eg!==c);u.length===0?n.indexes.bySubcircuit.delete(l):n.indexes.bySubcircuit.set(l,u)}}if(A.byCustomField\u0026\u0026n.indexes.byCustomField){for(const l of A.byCustomField)if(l in c\u0026\u0026l in a\u0026\u0026c[l]!==a[l]){const u=n.indexes.byCustomField.get(l);if(u){const g=String(c[l]),h=(u.get(g)||[]).filter(d=\u003ed!==c);h.length===0?u.delete(g):u.set(g,h)}}}if(Object.assign(c,a),n.editCount++,A.byRelation\u0026\u0026n.indexes.byRelation){const l=Object.entries(c);for(const[u,g]of l)if(u.endsWith(\"_id\")\u0026\u0026u!==`${c.type}_id`\u0026\u0026typeof g==\"string\"\u0026\u0026u in a){const h=n.indexes.byRelation.get(u)||new Map,d=h.get(g)||[];d.includes(c)||(d.push(c),h.set(g,d),n.indexes.byRelation.set(u,h))}}if(A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c\u0026\u0026\"subcircuit_id\"in a){const l=c.subcircuit_id;if(l\u0026\u0026typeof l==\"string\"){const u=n.indexes.bySubcircuit.get(l)||[];u.includes(c)||(u.push(c),n.indexes.bySubcircuit.set(l,u))}}if(A.byCustomField\u0026\u0026n.indexes.byCustomField){for(const l of A.byCustomField)if(l in c\u0026\u0026l in a){const u=c[l];if(u!==void 0\u0026\u0026(typeof u==\"string\"||typeof u==\"number\")){const g=String(u),h=n.indexes.byCustomField.get(l),d=h.get(g)||[];d.includes(c)||(d.push(c),h.set(g,d))}}}return c},select:s=\u003e{if(r===\"source_component\")return t.find(a=\u003ea.type===\"source_component\"\u0026\u0026a.name===s.replace(/\\./g,\"\"))||null;if(r===\"pcb_port\"||r===\"source_port\"||r===\"schematic_port\"){const[a,A]=s.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),c=t.find(u=\u003eu.type===\"source_component\"\u0026\u0026u.name===a);if(!c)return null;const l=t.find(u=\u003eu.type===\"source_port\"\u0026\u0026u.source_component_id===c.source_component_id\u0026\u0026(u.name===A||(u.port_hints??[]).includes(A)));if(!l)return null;if(r===\"source_port\")return l;if(r===\"pcb_port\")return t.find(u=\u003eu.type===\"pcb_port\"\u0026\u0026u.source_port_id===l.source_port_id)||null;if(r===\"schematic_port\")return t.find(u=\u003eu.type===\"schematic_port\"\u0026\u0026u.source_port_id===l.source_port_id)||null}return null}}}})};S3t.unparsed=S3t;var Q3t=t=\u003et[`${t.type}_id`];function ebe(t,e){const n=yx(t).pcb_trace.get(e);if(!n)return`trace[${e}]`;const o=n.route.flatMap(i=\u003e[i.start_pcb_port_id,i.end_pcb_port_id]).filter(Boolean);return o.length===0?`trace[${e}]`:`trace[${o.map(i=\u003e{const r=(function(s){const a=yx(t).pcb_port.get(s);if(!a)return null;const A=a.pcb_component_id?yx(t).pcb_component.get(a.pcb_component_id):void 0;if(!A)return null;const c=yx(t).source_component.get(A.source_component_id);if(!c)return null;const l=yx(t).source_port.get(a.source_port_id),u=l?.port_hints?l.port_hints[1]:\"\";return{componentName:c.name,portHint:u}})(i);return r?`.${r.componentName} \u003e port.${r.portHint}`:`port[${i}]`}).join(\", \")}]`}var tbe=(t,e)=\u003e{const n=yx(t).pcb_port.get(e);if(!n)return`pcb_port[#${e}]`;const o=n.pcb_component_id?yx(t).pcb_component.get(n.pcb_component_id):void 0;if(!o)return`pcb_port[#${e}]`;const i=yx(t).source_component.get(o.source_component_id);if(!i)return`pcb_port[#${e}]`;const r=yx(t).source_port.get(n.source_port_id);if(!r)return`pcb_port[#${e}]`;let s;return s=r?.port_hints\u0026\u0026r.port_hints.length\u003e0||r.port_hints\u0026\u0026r.port_hints.length\u003e0?r.port_hints[0]:e,`pcb_port[.${i.name} \u003e .${s}]`},Ny=(t,e)=\u003e{if(typeof e==\"string\"){const n=((o,i)=\u003eo.find(r=\u003eQ3t(r)===i)??null)(t,e);return Ny(t,n)}switch(e.type){case\"pcb_port\":return tbe(t,e.pcb_port_id);case\"pcb_smtpad\":return(function(n,o){const i=yx(n).pcb_smtpad.get(o);return i\u0026\u0026i.pcb_port_id?tbe(n,i.pcb_port_id):`smtpad[${o}]`})(t,e.pcb_smtpad_id);case\"pcb_trace\":return ebe(t,e.pcb_trace_id);case\"source_component\":return`source_component[${e.name}]`;default:return`${e.type}[#${Q3t(e)}]`}},v3t=(t,e)=\u003e({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),AAe=(t,e,n)=\u003e{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},jio=(t,e,n,o,i)=\u003e{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=\u003e({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=\u003eu.x)),minY:Math.min(...l.map(u=\u003eu.y)),maxX:Math.max(...l.map(u=\u003eu.x)),maxY:Math.max(...l.map(u=\u003eu.y))}},nbe=t=\u003e{let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){if(!r.type.startsWith(\"pcb_\"))continue;if(r.type===\"pcb_smtpad\"\u0026\u0026r.shape===\"polygon\"\u0026\u0026Array.isArray(r.points)){for(const l of r.points)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y);continue}if(r.type===\"pcb_hole\"\u0026\u0026r.hole_shape===\"circle\"){const l=AAe(r.x,r.y,r.hole_diameter);e=Math.min(e,l.minX),n=Math.min(n,l.minY),o=Math.max(o,l.maxX),i=Math.max(i,l.maxY);continue}if(r.type===\"pcb_plated_hole\"){let l;if(\"outer_diameter\"in r\u0026\u0026typeof r.outer_diameter==\"number\"?l=AAe(r.x,r.y,r.outer_diameter):\"hole_diameter\"in r\u0026\u0026typeof r.hole_diameter==\"number\"\u0026\u0026(l=AAe(r.x,r.y,r.hole_diameter)),\"rect_pad_width\"in r\u0026\u0026typeof r.rect_pad_width==\"number\"\u0026\u0026\"rect_pad_height\"in r\u0026\u0026typeof r.rect_pad_height==\"number\"){const u=jio(r.x,r.y,r.rect_pad_width,r.rect_pad_height,\"rect_ccw_rotation\"in r?r.rect_ccw_rotation??0:0);l=l?v3t(l,u):u}if(\"hole_diameter\"in r\u0026\u0026typeof r.hole_diameter==\"number\"){const u=AAe(r.x+(\"hole_offset_x\"in r?r.hole_offset_x??0:0),r.y+(\"hole_offset_y\"in r?r.hole_offset_y??0:0),r.hole_diameter);l=l?v3t(l,u):u}if(l){e=Math.min(e,l.minX),n=Math.min(n,l.minY),o=Math.max(o,l.maxX),i=Math.max(i,l.maxY);continue}}let s,a,A,c;if(\"x\"in r\u0026\u0026\"y\"in r\u0026\u0026(s=Number(r.x),a=Number(r.y)),\"outer_diameter\"in r\u0026\u0026(A=Number(r.outer_diameter),c=Number(r.outer_diameter)),\"width\"in r\u0026\u0026(A=Number(r.width)),\"height\"in r\u0026\u0026(c=Number(r.height)),\"center\"in r\u0026\u0026(s=r.center.x,a=r.center.y),s!==void 0\u0026\u0026a!==void 0)e=Math.min(e,s),n=Math.min(n,a),o=Math.max(o,s),i=Math.max(i,a),A!==void 0\u0026\u0026c!==void 0\u0026\u0026(e=Math.min(e,s-A/2),n=Math.min(n,a-c/2),o=Math.max(o,s+A/2),i=Math.max(i,a+c/2)),\"radius\"in r\u0026\u0026(e=Math.min(e,s-r.radius),n=Math.min(n,a-r.radius),o=Math.max(o,s+r.radius),i=Math.max(i,a+r.radius));else if(r.type===\"pcb_trace\")for(const l of r.route)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y);else if(r.type===\"pcb_courtyard_outline\")for(const l of r.outline)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y);else if(r.type===\"pcb_courtyard_polygon\")for(const l of r.points)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y)}return{minX:e,minY:n,maxX:o,maxY:i}},gv=t=\u003et[`${t.type}_id`],w3t={Hz:{baseUnit:\"Hz\",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:\"g\",variants:{kg:1e3,g:1}},Ω:{baseUnit:\"Ω\",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:\"V\",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:\"A\",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:\"F\",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:\"ml\",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:\"deg\",variants:{rad:180/Math.PI}},ms:{baseUnit:\"ms\",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,ms:1,s:1e3}},mm:{baseUnit:\"mm\",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},obe=new Set;for(const[t,e]of Object.entries(w3t)){obe.add(t);for(const n of Object.keys(e.variants))obe.add(n)}var P3t={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12};function sB(t){if(t==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t==\"string\"\u0026\u0026t.match(/^-?[\\d\\.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t==\"number\")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t==\"object\"\u0026\u0026\"x\"in t\u0026\u0026\"y\"in t){const{parsedUnit:a,unitOfValue:A}=sB(t.x),c=sB(t.x),l=sB(t.y);return c.value===null||l.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:a,unitOfValue:A,value:{x:c.value,y:l.value}}}const e=t.toString().split(\"\").reverse().join(\"\"),n=e.match(/[^\\d\\s]+/)?.[0];if(!n)throw new Error(`Could not determine unit: \"${t}\"`);const o=n.split(\"\").reverse().join(\"\"),i=t.slice(0,-o.length);if(o in P3t\u0026\u0026!obe.has(o)){const a=P3t[o];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(i)*a}}const{baseUnit:r,conversionFactor:s}=(function(a){for(const[A,c]of Object.entries(w3t))if(a in c.variants)return{baseUnit:c.baseUnit,conversionFactor:c.variants[a]};return{baseUnit:a,conversionFactor:1}})(o);return{parsedUnit:o,unitOfValue:r,value:s*Number.parseFloat(i)}}var ibe=N.string().or(N.number()).transform(t=\u003esB(t).value),M3t=N.string().or(N.number()).transform(t=\u003esB(t).value).transform(t=\u003eNumber.parseFloat(t.toPrecision(12))),$io=N.string().or(N.number()).transform(t=\u003esB(t).value),dv=N.string().or(N.number()).transform(t=\u003esB(t).value),Ui=N.string().or(N.number()).transform(t=\u003esB(t).value),PL=N.string().or(N.number()).transform(t=\u003esB(t).value),ho=Ui,HJ=N.string().or(N.number()).transform(t=\u003esB(t).value),rbe=N.string().or(N.number()).transform(t=\u003esB(t).value),ML=rbe,qio=N.string().datetime(),jm=N.string().or(N.number()).transform(t=\u003etypeof t==\"number\"?t:t.endsWith(\"deg\")?Number.parseFloat(t.split(\"deg\")[0]):t.endsWith(\"rad\")?180*Number.parseFloat(t.split(\"rad\")[0])/Math.PI:Number.parseFloat(t)),Xio=N.number().or(N.string().endsWith(\"mAh\")).transform(t=\u003e{if(typeof t==\"string\"){const e=t.replace(\"mAh\",\"\"),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error(\"Invalid capacity\");return n}return t}).describe(\"Battery capacity in mAh\"),Lr=N.object({x:ho,y:ho}),nN=N.object({x:ho,y:ho,z:ho}),D3t=N.object({width:N.number(),height:N.number()}),Yo=t=\u003eN.string().optional().default(()=\u003e`${t}_${(e=\u003e{const n=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";return Array.from({length:e},()=\u003en[Math.floor(62*Math.random())]).join(\"\")})(10)}`),hv=N.enum([\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"]),Zio=(N.enum([\"top_silkscreen\",\"bottom_silkscreen\",\"top_copper\",\"bottom_copper\",\"top_soldermask\",\"bottom_soldermask\",\"top_fabrication_note\",\"bottom_fabrication_note\",\"top_user_note\",\"bottom_user_note\",\"top_courtyard\",\"bottom_courtyard\",\"inner1_copper\",\"inner2_copper\",\"inner3_copper\",\"inner4_copper\",\"inner5_copper\",\"inner6_copper\",\"edge_cuts\",\"drill\"]),N.object({project_relative_path:N.string(),url:N.string(),mimetype:N.string()})),sbe=Lr.extend({rotation:jm.optional()}),N3t=N.object({size:Lr.optional(),thickness:ho.optional()}),ero=N.object({font:N3t.optional()}),cAe=N.object({value:N.string(),at:sbe.optional(),layer:N.string().optional(),uuid:N.string().optional(),hide:N.boolean().optional(),effects:ero.optional()}),tro=N.object({Reference:cAe.optional(),Value:cAe.optional(),Datasheet:cAe.optional(),Description:cAe.optional()}),nro=N.object({through_hole:N.boolean().optional(),smd:N.boolean().optional(),exclude_from_pos_files:N.boolean().optional(),exclude_from_bom:N.boolean().optional()}),oro=N.object({name:N.string(),type:N.string(),shape:N.string().optional(),at:sbe.optional(),size:Lr.optional(),drill:ho.optional(),layers:N.array(N.string()).optional(),removeUnusedLayers:N.boolean().optional(),uuid:N.string().optional()}),iro=N.object({path:N.string(),offset:nN.optional(),scale:nN.optional(),rotate:nN.optional()}),rro=N.object({footprintName:N.string().optional(),version:N.union([N.number(),N.string()]).optional(),generator:N.string().optional(),generatorVersion:N.union([N.number(),N.string()]).optional(),layer:N.string().optional(),properties:tro.optional(),attributes:nro.optional(),pads:N.array(oro).optional(),embeddedFonts:N.boolean().optional(),model:iro.optional()}),sro=N.object({hide:N.boolean().optional()}),aro=N.object({offset:ho.optional(),hide:N.boolean().optional()}),Aro=N.object({font:N3t.optional(),justify:N.union([N.string(),N.array(N.string())]).optional(),hide:N.boolean().optional()}),oN=N.object({value:N.string(),id:N.union([N.number(),N.string()]).optional(),at:sbe.optional(),effects:Aro.optional()}),cro=N.object({Reference:oN.optional(),Value:oN.optional(),Footprint:oN.optional(),Datasheet:oN.optional(),Description:oN.optional(),ki_keywords:oN.optional(),ki_fp_filters:oN.optional()}),lro=N.object({symbolName:N.string().optional(),extends:N.string().optional(),pinNumbers:sro.optional(),pinNames:aro.optional(),excludeFromSim:N.boolean().optional(),inBom:N.boolean().optional(),onBoard:N.boolean().optional(),properties:cro.optional(),embeddedFonts:N.boolean().optional()}),N0=N.object({error_type:N.string(),message:N.string(),is_fatal:N.boolean().optional()}),R3t=N.enum([\"jlcpcb\",\"macrofab\",\"pcbway\",\"digikey\",\"mouser\",\"lcsc\"]),Mg=N.object({type:N.literal(\"source_component\"),ftype:N.string().optional(),source_component_id:N.string(),name:N.string(),manufacturer_part_number:N.string().optional(),supplier_part_numbers:N.record(R3t,N.array(N.string())).optional(),display_value:N.string().optional(),display_name:N.string().optional(),are_pins_interchangeable:N.boolean().optional(),internally_connected_source_port_ids:N.array(N.array(N.string())).optional(),source_group_id:N.string().optional(),subcircuit_id:N.string().optional()}),T3t=Mg.extend({ftype:N.literal(\"simple_capacitor\"),capacitance:M3t,max_voltage_rating:dv.optional(),display_capacitance:N.string().optional(),max_decoupling_trace_length:ho.optional()}),k3t=Mg.extend({ftype:N.literal(\"simple_resistor\"),resistance:ibe,display_resistance:N.string().optional()}),abe=Mg.extend({ftype:N.literal(\"simple_diode\")}),uro=Mg.extend({ftype:N.literal(\"simple_fiducial\")}),F3t=abe.extend({ftype:N.literal(\"simple_led\"),color:N.string().optional(),wavelength:N.string().optional()}),gro=Mg.extend({ftype:N.literal(\"simple_ground\")}),L3t=Mg.extend({ftype:N.literal(\"simple_chip\")}),H3t=Mg.extend({ftype:N.literal(\"simple_power_source\"),voltage:dv}),dro=Mg.extend({ftype:N.literal(\"simple_current_source\"),current:HJ,frequency:PL.optional(),peak_to_peak_current:HJ.optional(),wave_shape:N.enum([\"sine\",\"square\",\"triangle\",\"sawtooth\",\"dc\"]).optional().default(\"dc\"),phase:N.number().optional(),duty_cycle:N.number().min(0).max(1).optional()}),hro=N.object({must_be_connected:N.boolean().optional(),provides_power:N.boolean().optional(),requires_power:N.boolean().optional(),provides_ground:N.boolean().optional(),requires_ground:N.boolean().optional(),provides_voltage:N.union([N.string(),N.number()]).optional(),requires_voltage:N.union([N.string(),N.number()]).optional(),do_not_connect:N.boolean().optional(),include_in_board_pinout:N.boolean().optional(),can_use_internal_pullup:N.boolean().optional(),is_using_internal_pullup:N.boolean().optional(),needs_external_pullup:N.boolean().optional(),can_use_internal_pulldown:N.boolean().optional(),is_using_internal_pulldown:N.boolean().optional(),needs_external_pulldown:N.boolean().optional(),can_use_open_drain:N.boolean().optional(),is_using_open_drain:N.boolean().optional(),can_use_push_pull:N.boolean().optional(),is_using_push_pull:N.boolean().optional(),should_have_decoupling_capacitor:N.boolean().optional(),recommended_decoupling_capacitor_capacitance:N.union([N.string(),N.number()]).optional(),is_configured_for_i2c_sda:N.boolean().optional(),is_configured_for_i2c_scl:N.boolean().optional(),is_configured_for_spi_mosi:N.boolean().optional(),is_configured_for_spi_miso:N.boolean().optional(),is_configured_for_spi_sck:N.boolean().optional(),is_configured_for_spi_cs:N.boolean().optional(),is_configured_for_uart_tx:N.boolean().optional(),is_configured_for_uart_rx:N.boolean().optional(),supports_i2c_sda:N.boolean().optional(),supports_i2c_scl:N.boolean().optional(),supports_spi_mosi:N.boolean().optional(),supports_spi_miso:N.boolean().optional(),supports_spi_sck:N.boolean().optional(),supports_spi_cs:N.boolean().optional(),supports_uart_tx:N.boolean().optional(),supports_uart_rx:N.boolean().optional()}),pro=Mg.extend({ftype:N.literal(\"simple_fuse\"),current_rating_amps:N.number().describe(\"Nominal current in amps the fuse is rated for\"),voltage_rating_volts:N.number().describe(\"Voltage rating in volts, e.g. ±5V would be 5\")}),O3t=Mg.extend({ftype:N.literal(\"simple_battery\"),capacity:Xio}),G3t=Mg.extend({ftype:N.literal(\"simple_inductor\"),inductance:$io,display_inductance:N.string().optional(),max_current_rating:N.number().optional()}),Y3t=Mg.extend({ftype:N.literal(\"simple_push_button\")}),U3t=Mg.extend({ftype:N.literal(\"simple_potentiometer\"),max_resistance:ibe,display_max_resistance:N.string().optional()}),mro=Mg.extend({ftype:N.literal(\"simple_crystal\"),frequency:N.number().describe(\"Frequency in Hz\"),load_capacitance:N.number().optional().describe(\"Load capacitance in pF\"),pin_variant:N.enum([\"two_pin\",\"four_pin\"]).optional()}),K3t=Mg.extend({ftype:N.literal(\"simple_pin_header\"),pin_count:N.number(),gender:N.enum([\"male\",\"female\"]).optional().default(\"male\")}),_ro=Mg.extend({ftype:N.literal(\"simple_connector\"),standard:N.enum([\"usb_c\",\"m2\"]).optional()}),V3t=Mg.extend({ftype:N.literal(\"simple_pinout\")}),z3t=Mg.extend({ftype:N.literal(\"simple_resonator\"),load_capacitance:M3t,equivalent_series_resistance:ibe.optional(),frequency:PL}),J3t=Mg.extend({ftype:N.literal(\"simple_transistor\"),transistor_type:N.enum([\"npn\",\"pnp\"])}),W3t=Mg.extend({ftype:N.literal(\"simple_test_point\"),footprint_variant:N.enum([\"pad\",\"through_hole\"]).optional(),pad_shape:N.enum([\"rect\",\"circle\"]).optional(),pad_diameter:N.union([N.number(),N.string()]).optional(),hole_diameter:N.union([N.number(),N.string()]).optional(),width:N.union([N.number(),N.string()]).optional(),height:N.union([N.number(),N.string()]).optional()}),j3t=Mg.extend({ftype:N.literal(\"simple_mosfet\"),channel_type:N.enum([\"n\",\"p\"]),mosfet_mode:N.enum([\"enhancement\",\"depletion\"])}),$3t=Mg.extend({ftype:N.literal(\"simple_op_amp\")}),q3t=Mg.extend({ftype:N.literal(\"simple_switch\")}),X3t=N.object({type:N.literal(\"source_project_metadata\"),name:N.string().optional(),software_used_string:N.string().optional(),project_url:N.string().optional(),created_at:qio.optional()}),fro=N0.extend({type:N.literal(\"source_missing_property_error\"),source_missing_property_error_id:Yo(\"source_missing_property_error\"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal(\"source_missing_property_error\").default(\"source_missing_property_error\")}).describe(\"The source code is missing a property\"),Iro=N0.extend({type:N.literal(\"source_failed_to_create_component_error\"),source_failed_to_create_component_error_id:Yo(\"source_failed_to_create_component_error\"),error_type:N.literal(\"source_failed_to_create_component_error\").default(\"source_failed_to_create_component_error\"),component_name:N.string().optional(),subcircuit_id:N.string().optional(),parent_source_component_id:N.string().optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),schematic_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional()}).describe(\"Error emitted when a component fails to be constructed\"),Z3t=N0.extend({type:N.literal(\"source_invalid_component_property_error\"),source_invalid_component_property_error_id:Yo(\"source_invalid_component_property_error\"),source_component_id:N.string(),property_name:N.string(),property_value:N.unknown().optional(),expected_format:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal(\"source_invalid_component_property_error\").default(\"source_invalid_component_property_error\")}).describe(\"The source component property is invalid\"),eEt=N0.extend({type:N.literal(\"source_trace_not_connected_error\"),source_trace_not_connected_error_id:Yo(\"source_trace_not_connected_error\"),error_type:N.literal(\"source_trace_not_connected_error\").default(\"source_trace_not_connected_error\"),subcircuit_id:N.string().optional(),source_group_id:N.string().optional(),source_trace_id:N.string().optional(),connected_source_port_ids:N.array(N.string()).optional(),selectors_not_found:N.array(N.string()).optional()}).describe(\"Occurs when a source trace selector does not match any ports\"),Cro=N.object({type:N.literal(\"source_property_ignored_warning\"),source_property_ignored_warning_id:Yo(\"source_property_ignored_warning\"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal(\"source_property_ignored_warning\").default(\"source_property_ignored_warning\"),message:N.string()}).describe(\"The source property was ignored\"),tEt=N.object({type:N.literal(\"source_pin_missing_trace_warning\"),source_pin_missing_trace_warning_id:Yo(\"source_pin_missing_trace_warning\"),warning_type:N.literal(\"source_pin_missing_trace_warning\").default(\"source_pin_missing_trace_warning\"),message:N.string(),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a source component pin is missing a trace connection\"),nEt=N.object({type:N.literal(\"source_missing_manufacturer_part_number_warning\"),source_missing_manufacturer_part_number_warning_id:Yo(\"source_missing_manufacturer_part_number_warning\"),warning_type:N.literal(\"source_missing_manufacturer_part_number_warning\").default(\"source_missing_manufacturer_part_number_warning\"),message:N.string(),source_component_id:N.string(),standard:N.string(),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a standard connector is missing manufacturer part number\"),yro=Mg.extend({ftype:N.literal(\"simple_voltage_probe\")}),xro=Mg.extend({ftype:N.literal(\"interconnect\")}),oEt=N0.extend({type:N.literal(\"source_i2c_misconfigured_error\"),source_i2c_misconfigured_error_id:Yo(\"source_i2c_misconfigured_error\"),error_type:N.literal(\"source_i2c_misconfigured_error\").default(\"source_i2c_misconfigured_error\"),source_port_ids:N.array(N.string())}).describe(\"Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net\"),Ero=Mg.extend({ftype:N.literal(\"simple_voltage_source\"),voltage:dv,frequency:PL.optional(),peak_to_peak_voltage:dv.optional(),wave_shape:N.enum([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]).optional(),phase:jm.optional(),duty_cycle:N.number().optional().describe(\"Duty cycle as a fraction (0 to 1)\")}),Bro=N.union([k3t,T3t,abe,uro,F3t,gro,L3t,H3t,dro,O3t,G3t,Y3t,U3t,mro,K3t,_ro,V3t,z3t,q3t,J3t,W3t,j3t,$3t,pro,yro,xro,Ero,X3t,fro,Z3t,Iro,eEt,Cro,tEt,nEt,oEt]),bro=N.object({type:N.literal(\"source_port\"),pin_number:N.number().optional(),port_hints:N.array(N.string()).optional(),name:N.string(),source_port_id:N.string(),source_component_id:N.string().optional(),source_group_id:N.string().optional(),most_frequently_referenced_by_name:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}).merge(hro),Sro=N.object({type:N.literal(\"source_component_internal_connection\"),source_component_internal_connection_id:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}),Qro=N.object({type:N.literal(\"source_trace\"),source_trace_id:N.string(),connected_source_port_ids:N.array(N.string()),connected_source_net_ids:N.array(N.string()),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),max_length:N.number().optional(),min_trace_thickness:N.number().optional(),display_name:N.string().optional()}),vro=N.object({type:N.literal(\"source_group\"),source_group_id:N.string(),subcircuit_id:N.string().optional(),parent_subcircuit_id:N.string().optional(),parent_source_group_id:N.string().optional(),is_subcircuit:N.boolean().optional(),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),was_automatically_named:N.boolean().optional()}),wro=N.object({type:N.literal(\"source_net\"),source_net_id:N.string(),name:N.string(),member_source_group_ids:N.array(N.string()),is_power:N.boolean().optional(),is_ground:N.boolean().optional(),is_digital_signal:N.boolean().optional(),is_analog_signal:N.boolean().optional(),is_positive_voltage_source:N.boolean().optional(),trace_width:N.number().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),Pro=N.object({type:N.literal(\"source_board\"),source_board_id:N.string(),source_group_id:N.string(),title:N.string().optional()}).describe(\"Defines a board in the source domain\"),Mro=N0.extend({type:N.literal(\"source_ambiguous_port_reference\"),source_ambiguous_port_reference_id:Yo(\"source_ambiguous_port_reference\"),error_type:N.literal(\"source_ambiguous_port_reference\").default(\"source_ambiguous_port_reference\"),source_port_id:N.string().optional(),source_component_id:N.string().optional()}).describe(\"Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous\"),Dro=N.object({type:N.literal(\"source_pcb_ground_plane\"),source_pcb_ground_plane_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Defines a ground plane in the source domain\"),lAe=[\"top\",\"bottom\",\"inner1\",\"inner2\",\"inner3\",\"inner4\",\"inner5\",\"inner6\"],iEt=N.enum(lAe),Pc=iEt.or(N.object({name:iEt})).transform(t=\u003etypeof t==\"string\"?t:t.name),mC=N.enum([\"top\",\"bottom\"]),Nro=N.object({type:N.literal(\"source_manually_placed_via\"),source_manually_placed_via_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional()}).describe(\"Defines a via that is manually placed in the source domain\"),Rro=N.object({type:N.literal(\"source_no_power_pin_defined_warning\"),source_no_power_pin_defined_warning_id:Yo(\"source_no_power_pin_defined_warning\"),warning_type:N.literal(\"source_no_power_pin_defined_warning\").default(\"source_no_power_pin_defined_warning\"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a chip has no source ports with requires_power=true\"),Tro=N.object({type:N.literal(\"source_no_ground_pin_defined_warning\"),source_no_ground_pin_defined_warning_id:Yo(\"source_no_ground_pin_defined_warning\"),warning_type:N.literal(\"source_no_ground_pin_defined_warning\").default(\"source_no_ground_pin_defined_warning\"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a chip has no source ports marked as ground pins\"),kro=N.object({type:N.literal(\"source_component_pins_underspecified_warning\"),source_component_pins_underspecified_warning_id:Yo(\"source_component_pins_underspecified_warning\"),warning_type:N.literal(\"source_component_pins_underspecified_warning\").default(\"source_component_pins_underspecified_warning\"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Warning emitted when all ports on a source component are underspecified\"),Fro=N0.extend({type:N.literal(\"source_pin_must_be_connected_error\"),source_pin_must_be_connected_error_id:Yo(\"source_pin_must_be_connected_error\"),error_type:N.literal(\"source_pin_must_be_connected_error\").default(\"source_pin_must_be_connected_error\"),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a pin with mustBeConnected attribute is not connected to any trace\"),Lro=N0.extend({type:N.literal(\"unknown_error_finding_part\"),unknown_error_finding_part_id:Yo(\"unknown_error_finding_part\"),error_type:N.literal(\"unknown_error_finding_part\").default(\"unknown_error_finding_part\"),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when an unexpected error occurs while finding a part\"),Hro=N.object({type:N.literal(\"schematic_box\"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),width:ho,height:ho,is_dashed:N.boolean().default(!1),x:ho,y:ho,subcircuit_id:N.string().optional()}).describe(\"Draws a box on the schematic\"),Oro=N.object({type:N.literal(\"schematic_path\"),schematic_path_id:Yo(\"schematic_path\"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),fill_color:N.string().optional(),is_filled:N.boolean().optional(),stroke_width:ho.nullable().optional(),stroke_color:N.string().optional(),points:N.array(Lr),subcircuit_id:N.string().optional()}),Gro=N.record(N.object({left_margin:Ui.optional(),right_margin:Ui.optional(),top_margin:Ui.optional(),bottom_margin:Ui.optional()})),Yro=N.object({left_size:N.number(),right_size:N.number(),top_size:N.number().optional(),bottom_size:N.number().optional()}),Uro=N.object({left_side:N.object({pins:N.array(N.number()),direction:N.enum([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),right_side:N.object({pins:N.array(N.number()),direction:N.enum([\"top-to-bottom\",\"bottom-to-top\"]).optional()}).optional(),top_side:N.object({pins:N.array(N.number()),direction:N.enum([\"left-to-right\",\"right-to-left\"]).optional()}).optional(),bottom_side:N.object({pins:N.array(N.number()),direction:N.enum([\"left-to-right\",\"right-to-left\"]).optional()}).optional()}),Kro=N.union([Yro,Uro]),Vro=N.object({type:N.literal(\"schematic_component\"),size:D3t,center:Lr,source_component_id:N.string().optional(),schematic_component_id:N.string(),schematic_symbol_id:N.string().optional(),pin_spacing:Ui.optional(),pin_styles:Gro.optional(),box_width:Ui.optional(),symbol_name:N.string().optional(),port_arrangement:Kro.optional(),port_labels:N.record(N.string()).optional(),symbol_display_value:N.string().optional(),subcircuit_id:N.string().optional(),schematic_group_id:N.string().optional(),is_schematic_group:N.boolean().optional(),source_group_id:N.string().optional(),is_box_with_pins:N.boolean().optional().default(!0)}),zro=N.object({kicad_symbol:lro.optional()}).catchall(N.unknown()),Jro=N.object({type:N.literal(\"schematic_symbol\"),schematic_symbol_id:N.string(),name:N.string().optional(),metadata:zro.optional()}).describe(\"Defines a named schematic symbol that can be referenced by components.\"),Wro=N.object({type:N.literal(\"schematic_line\"),schematic_line_id:Yo(\"schematic_line\"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),x1:ho,y1:ho,x2:ho,y2:ho,stroke_width:ho.nullable().optional(),color:N.string().default(\"#000000\"),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe(\"Draws a styled line on the schematic\"),jro=N.object({type:N.literal(\"schematic_rect\"),schematic_rect_id:Yo(\"schematic_rect\"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:Lr,width:ho,height:ho,rotation:jm.default(0),stroke_width:ho.nullable().optional(),color:N.string().default(\"#000000\"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe(\"Draws a styled rectangle on the schematic\"),$ro=N.object({type:N.literal(\"schematic_circle\"),schematic_circle_id:Yo(\"schematic_circle\"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:Lr,radius:ho,stroke_width:ho.nullable().optional(),color:N.string().default(\"#000000\"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe(\"Draws a styled circle on the schematic\"),qro=N.object({type:N.literal(\"schematic_arc\"),schematic_arc_id:Yo(\"schematic_arc\"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:Lr,radius:ho,start_angle_degrees:jm,end_angle_degrees:jm,direction:N.enum([\"clockwise\",\"counterclockwise\"]).default(\"counterclockwise\"),stroke_width:ho.nullable().optional(),color:N.string().default(\"#000000\"),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe(\"Draws a styled arc on the schematic\"),Xro=N.object({type:N.literal(\"schematic_trace\"),schematic_trace_id:N.string(),source_trace_id:N.string().optional(),junctions:N.array(N.object({x:N.number(),y:N.number()})),edges:N.array(N.object({from:N.object({x:N.number(),y:N.number()}),to:N.object({x:N.number(),y:N.number()}),is_crossing:N.boolean().optional(),from_schematic_port_id:N.string().optional(),to_schematic_port_id:N.string().optional()})),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),Zro=N.enum([\"center\",\"left\",\"right\",\"top\",\"bottom\"]),eso=N.object({type:N.literal(\"schematic_text\"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),schematic_text_id:N.string(),text:N.string(),font_size:N.number().default(.18),position:N.object({x:ho,y:ho}),rotation:N.number().default(0),anchor:N.union([Zro.describe(\"legacy\"),hv]).default(\"center\"),color:N.string().default(\"#000000\"),subcircuit_id:N.string().optional()}),tso=N.object({type:N.literal(\"schematic_port\"),schematic_port_id:N.string(),source_port_id:N.string(),schematic_component_id:N.string().optional(),center:Lr,facing_direction:N.enum([\"up\",\"down\",\"left\",\"right\"]).optional(),distance_from_component_edge:N.number().optional(),side_of_component:N.enum([\"top\",\"bottom\",\"left\",\"right\"]).optional(),true_ccw_index:N.number().optional(),pin_number:N.number().optional(),display_pin_label:N.string().optional(),subcircuit_id:N.string().optional(),is_connected:N.boolean().optional(),has_input_arrow:N.boolean().optional(),has_output_arrow:N.boolean().optional(),is_drawn_with_inversion_circle:N.boolean().optional()}).describe(\"Defines a port on a schematic component\"),nso=N.object({type:N.literal(\"schematic_net_label\"),schematic_net_label_id:Yo(\"schematic_net_label\"),schematic_trace_id:N.string().optional(),source_trace_id:N.string().optional(),source_net_id:N.string(),center:Lr,anchor_position:Lr.optional(),anchor_side:N.enum([\"top\",\"bottom\",\"left\",\"right\"]),text:N.string(),symbol_name:N.string().optional(),is_movable:N.boolean().optional(),subcircuit_id:N.string().optional()}),oso=N0.extend({type:N.literal(\"schematic_error\"),schematic_error_id:N.string(),error_type:N.literal(\"schematic_port_not_found\").default(\"schematic_port_not_found\"),subcircuit_id:N.string().optional()}).describe(\"Defines a schematic error on the schematic\"),iso=N0.extend({type:N.literal(\"schematic_layout_error\"),schematic_layout_error_id:Yo(\"schematic_layout_error\"),error_type:N.literal(\"schematic_layout_error\").default(\"schematic_layout_error\"),source_group_id:N.string(),schematic_group_id:N.string(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when schematic layout fails for a group\"),Abe=N.object({type:N.literal(\"schematic_debug_object\"),label:N.string().optional(),subcircuit_id:N.string().optional()}),rso=Abe.extend({shape:N.literal(\"rect\"),center:Lr,size:D3t}),sso=Abe.extend({shape:N.literal(\"line\"),start:Lr,end:Lr}),aso=Abe.extend({shape:N.literal(\"point\"),center:Lr}),Aso=N.discriminatedUnion(\"shape\",[rso,sso,aso]),cso=N.object({type:N.literal(\"schematic_voltage_probe\"),schematic_voltage_probe_id:N.string(),source_component_id:N.string().optional(),name:N.string().optional(),position:Lr,schematic_trace_id:N.string(),voltage:dv.optional(),subcircuit_id:N.string().optional(),color:N.string().optional(),label_alignment:hv.optional()}).describe(\"Defines a voltage probe measurement point on a schematic trace\"),lso=N.object({type:N.literal(\"schematic_manual_edit_conflict_warning\"),schematic_manual_edit_conflict_warning_id:Yo(\"schematic_manual_edit_conflict_warning\"),warning_type:N.literal(\"schematic_manual_edit_conflict_warning\").default(\"schematic_manual_edit_conflict_warning\"),message:N.string(),schematic_component_id:N.string(),schematic_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe(\"Warning emitted when a component has both manual placement and explicit schX/schY coordinates\"),uso=N.object({type:N.literal(\"schematic_group\"),schematic_group_id:Yo(\"schematic_group\"),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Ui,height:Ui,center:Lr,schematic_component_ids:N.array(N.string()),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),description:N.string().optional()}).describe(\"Defines a group of components on the schematic\"),gso=N.object({type:N.literal(\"schematic_table\"),schematic_table_id:Yo(\"schematic_table\"),anchor_position:Lr,column_widths:N.array(ho),row_heights:N.array(ho),cell_padding:ho.optional(),border_width:ho.optional(),subcircuit_id:N.string().optional(),schematic_component_id:N.string().optional(),anchor:hv.optional()}).describe(\"Defines a table on the schematic\"),dso=N.object({type:N.literal(\"schematic_table_cell\"),schematic_table_cell_id:Yo(\"schematic_table_cell\"),schematic_table_id:N.string(),start_row_index:N.number(),end_row_index:N.number(),start_column_index:N.number(),end_column_index:N.number(),text:N.string().optional(),center:Lr,width:ho,height:ho,horizontal_align:N.enum([\"left\",\"center\",\"right\"]).optional(),vertical_align:N.enum([\"top\",\"middle\",\"bottom\"]).optional(),font_size:ho.optional(),subcircuit_id:N.string().optional()}).describe(\"Defines a cell within a schematic_table\"),hso=N.object({type:N.literal(\"schematic_sheet\"),schematic_sheet_id:Yo(\"schematic_sheet\"),name:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Defines a schematic sheet or page that components can be placed on\"),pso=N.object({x:ho,y:ho,bulge:N.number().optional()}),rEt=N.object({vertices:N.array(pso)}),mso=N.object({outer_ring:rEt,inner_rings:N.array(rEt).default([])}),_so=N.object({x:ho,y:ho,via:N.boolean().optional(),via_to_layer:Pc.optional()}),fso=(N.array(_so),N.object({x:ho,y:ho,via:N.boolean().optional(),to_layer:Pc.optional(),trace_width:ho.optional()})),Iso=N.object({min_trace_width:Ui.optional(),min_board_edge_clearance:Ui.optional(),min_via_hole_edge_to_via_hole_edge_clearance:Ui.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:Ui.optional(),min_trace_to_pad_edge_clearance:Ui.optional(),min_pad_edge_to_pad_edge_clearance:Ui.optional(),min_same_net_trace_edge_to_trace_edge_clearance:Ui.optional(),min_different_net_trace_edge_to_trace_edge_clearance:Ui.optional(),min_via_hole_diameter:Ui.optional(),min_via_pad_diameter:Ui.optional()}),Cso=N.object({type:N.literal(\"pcb_component\"),pcb_component_id:Yo(\"pcb_component\"),source_component_id:N.string(),center:Lr,layer:Pc,rotation:jm,display_offset_x:N.string().optional().describe(\"How to display the x offset for this part, usually corresponding with how the user specified it\"),display_offset_y:N.string().optional().describe(\"How to display the y offset for this part, usually corresponding with how the user specified it\"),width:Ui,height:Ui,do_not_place:N.boolean().optional(),is_allowed_to_be_off_board:N.boolean().optional(),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),position_mode:N.enum([\"packed\",\"relative_to_group_anchor\",\"relative_to_another_component\",\"none\"]).optional(),anchor_position:Lr.optional(),anchor_alignment:hv.optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),cable_insertion_center:Lr.optional(),insertion_direction:N.enum([\"from_above\",\"from_left\",\"from_right\",\"from_front\",\"from_back\"]).optional(),metadata:N.object({kicad_footprint:rro.optional()}).optional(),obstructs_within_bounds:N.boolean().default(!0).describe(\"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath\")}).describe(\"Defines a component on the PCB\"),sEt=N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:Yo(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"circle\"),hole_diameter:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),aEt=(sEt.describe(\"Defines a circular hole on the PCB\"),N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:Yo(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"rect\"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),AEt=(aEt.describe(\"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square.\"),N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:Yo(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.enum([\"circle\",\"square\"]),hole_diameter:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),cEt=(AEt.describe(\"Defines a circular or square hole on the PCB\"),N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:Yo(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"oval\"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),lEt=(cEt.describe(\"Defines an oval hole on the PCB\"),N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:Yo(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"pill\"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),uEt=(lEt.describe(\"Defines a pill-shaped hole on the PCB\"),N.object({type:N.literal(\"pcb_hole\"),pcb_hole_id:Yo(\"pcb_hole\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal(\"rotated_pill\"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,ccw_rotation:jm,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),yso=(uEt.describe(\"Defines a rotated pill-shaped hole on the PCB\"),AEt.or(cEt).or(lEt).or(uEt).or(sEt).or(aEt)),xso=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"circle\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_diameter:N.number(),hole_diameter:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Eso=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.enum([\"oval\",\"pill\"]),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_width:N.number(),outer_height:N.number(),hole_width:N.number(),hole_height:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,ccw_rotation:jm,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Bso=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"circular_hole_with_rect_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal(\"circle\"),pad_shape:N.literal(\"rect\"),hole_diameter:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo(\"pcb_plated_hole\"),soldermask_margin:N.number().optional(),rect_ccw_rotation:jm.optional()}),bso=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"pill_hole_with_rect_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal(\"pill\"),pad_shape:N.literal(\"rect\"),hole_width:N.number(),hole_height:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Sso=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"rotated_pill_hole_with_rect_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal(\"rotated_pill\"),pad_shape:N.literal(\"rect\"),hole_width:N.number(),hole_height:N.number(),hole_ccw_rotation:jm,rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),rect_ccw_rotation:jm,hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo(\"pcb_plated_hole\"),soldermask_margin:N.number().optional()}),Qso=N.object({type:N.literal(\"pcb_plated_hole\"),shape:N.literal(\"hole_with_polygon_pad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.enum([\"circle\",\"oval\",\"pill\",\"rotated_pill\"]),hole_diameter:N.number().optional(),hole_width:N.number().optional(),hole_height:N.number().optional(),pad_outline:N.array(N.object({x:ho,y:ho})).min(3),hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo(\"pcb_plated_hole\"),soldermask_margin:N.number().optional(),ccw_rotation:jm.optional()}),vso=N.union([xso,Eso,Bso,bso,Sso,Qso]),wso=N.object({type:N.literal(\"pcb_port\"),pcb_port_id:Yo(\"pcb_port\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_port_id:N.string(),pcb_component_id:N.string().optional(),x:ho,y:ho,layers:N.array(Pc),is_board_pinout:N.boolean().optional()}).describe(\"Defines a port on the PCB\"),Pso=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"circle\"),pcb_smtpad_id:Yo(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,radius:N.number(),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Mso=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"rect\"),pcb_smtpad_id:Yo(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),Dso=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"rotated_rect\"),pcb_smtpad_id:Yo(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),ccw_rotation:jm,layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),Nso=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"pill\"),pcb_smtpad_id:Yo(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),radius:N.number(),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Rso=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"rotated_pill\"),pcb_smtpad_id:Yo(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),radius:N.number(),ccw_rotation:jm,layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Tso=N.object({type:N.literal(\"pcb_smtpad\"),shape:N.literal(\"polygon\"),pcb_smtpad_id:Yo(\"pcb_smtpad\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),points:N.array(Lr),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),kso=N.discriminatedUnion(\"shape\",[Pso,Mso,Dso,Rso,Nso,Tso]).describe(\"Defines an SMT pad on the PCB\"),Fso=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"circle\"),pcb_solder_paste_id:Yo(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,radius:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Lso=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"rect\"),pcb_solder_paste_id:Yo(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Hso=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"pill\"),pcb_solder_paste_id:Yo(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),radius:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Oso=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"rotated_rect\"),pcb_solder_paste_id:Yo(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),ccw_rotation:ho,layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Gso=N.object({type:N.literal(\"pcb_solder_paste\"),shape:N.literal(\"oval\"),pcb_solder_paste_id:Yo(\"pcb_solder_paste\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Yso=N.union([Fso,Lso,Hso,Oso,Gso]).describe(\"Defines solderpaste on the PCB\"),Uso=N.object({type:N.literal(\"pcb_text\"),pcb_text_id:Yo(\"pcb_text\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),text:N.string(),center:Lr,layer:Pc,width:Ui,height:Ui,lines:N.number(),align:N.enum([\"bottom-left\"])}).describe(\"Defines text on the PCB\"),Kso=N.object({route_type:N.literal(\"wire\"),x:ho,y:ho,width:ho,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),start_pcb_port_id:N.string().optional(),end_pcb_port_id:N.string().optional(),layer:Pc}),Vso=N.object({route_type:N.literal(\"via\"),x:ho,y:ho,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),hole_diameter:ho.optional(),outer_diameter:ho.optional(),from_layer:Pc,to_layer:Pc}),zso=N.union([Kso,Vso]),Jso=N.object({type:N.literal(\"pcb_trace\"),source_trace_id:N.string().optional(),pcb_component_id:N.string().optional(),pcb_trace_id:Yo(\"pcb_trace\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),route_thickness_mode:N.enum([\"constant\",\"interpolated\"]).default(\"constant\").optional(),route_order_index:N.number().optional(),should_round_corners:N.boolean().optional(),trace_length:N.number().optional(),highlight_color:N.string().optional(),route:N.array(zso)}).describe(\"Defines a trace on the PCB\"),Wso=N.object({type:N.literal(\"pcb_trace_warning\"),pcb_trace_warning_id:Yo(\"pcb_trace_warning\"),warning_type:N.literal(\"pcb_trace_warning\").default(\"pcb_trace_warning\"),message:N.string(),center:Lr.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines a trace warning on the PCB\"),jso=N0.extend({type:N.literal(\"pcb_trace_error\"),pcb_trace_error_id:Yo(\"pcb_trace_error\"),error_type:N.literal(\"pcb_trace_error\").default(\"pcb_trace_error\"),center:Lr.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines a trace error on the PCB\"),$so=N0.extend({type:N.literal(\"pcb_trace_missing_error\"),pcb_trace_missing_error_id:Yo(\"pcb_trace_missing_error\"),error_type:N.literal(\"pcb_trace_missing_error\").default(\"pcb_trace_missing_error\"),center:Lr.optional(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines an error when a source trace has no corresponding PCB trace\"),qso=N0.extend({type:N.literal(\"pcb_port_not_matched_error\"),pcb_error_id:Yo(\"pcb_error\"),error_type:N.literal(\"pcb_port_not_matched_error\").default(\"pcb_port_not_matched_error\"),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines a trace error on the PCB where a port is not matched\"),Xso=N0.extend({type:N.literal(\"pcb_port_not_connected_error\"),pcb_port_not_connected_error_id:Yo(\"pcb_port_not_connected_error\"),error_type:N.literal(\"pcb_port_not_connected_error\").default(\"pcb_port_not_connected_error\"),pcb_port_ids:N.array(N.string()),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe(\"Defines an error when a pcb port is not connected to any trace\"),Zso=N.object({type:N.literal(\"pcb_net\"),pcb_net_id:Yo(\"pcb_net\"),source_net_id:N.string().optional(),highlight_color:N.string().optional()}).describe(\"Defines a net on the PCB\"),eao=N.object({type:N.literal(\"pcb_via\"),pcb_via_id:Yo(\"pcb_via\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),x:ho,y:ho,outer_diameter:ho.default(\"0.6mm\"),hole_diameter:ho.default(\"0.25mm\"),from_layer:Pc.optional(),to_layer:Pc.optional(),layers:N.array(Pc),pcb_trace_id:N.string().optional(),net_is_assignable:N.boolean().optional(),net_assigned:N.boolean().optional(),is_tented:N.boolean().optional()}).describe(\"Defines a via on the PCB\"),tao=N.object({type:N.literal(\"pcb_board\"),pcb_board_id:Yo(\"pcb_board\"),pcb_panel_id:N.string().optional(),carrier_pcb_board_id:N.string().optional(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),is_mounted_to_carrier_board:N.boolean().optional(),width:Ui.optional(),height:Ui.optional(),center:Lr,display_offset_x:N.string().optional().describe(\"How to display the x offset for this board, usually corresponding with how the user specified it\"),display_offset_y:N.string().optional().describe(\"How to display the y offset for this board, usually corresponding with how the user specified it\"),thickness:Ui.optional().default(1.4),num_layers:N.number().optional().default(4),outline:N.array(Lr).optional(),shape:N.enum([\"rect\",\"polygon\"]).optional(),material:N.enum([\"fr4\",\"fr1\"]).default(\"fr4\"),anchor_position:Lr.optional(),anchor_alignment:hv.optional(),position_mode:N.enum([\"relative_to_panel_anchor\",\"none\"]).optional()}).merge(Iso).describe(\"Defines the board outline of the PCB\"),nao=N.object({type:N.literal(\"pcb_panel\"),pcb_panel_id:Yo(\"pcb_panel\"),width:Ui,height:Ui,center:Lr,thickness:Ui.optional().default(1.4),covered_with_solder_mask:N.boolean().optional().default(!0)}).describe(\"Defines a PCB panel that can contain multiple boards\"),oao=N0.extend({type:N.literal(\"pcb_placement_error\"),pcb_placement_error_id:Yo(\"pcb_placement_error\"),error_type:N.literal(\"pcb_placement_error\").default(\"pcb_placement_error\"),subcircuit_id:N.string().optional()}).describe(\"Defines a placement error on the PCB\"),iao=N0.extend({type:N.literal(\"pcb_panelization_placement_error\"),pcb_panelization_placement_error_id:Yo(\"pcb_panelization_placement_error\"),error_type:N.literal(\"pcb_panelization_placement_error\").default(\"pcb_panelization_placement_error\"),pcb_panel_id:N.string().optional(),pcb_board_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Defines a panelization placement error on the PCB\"),rao=N.object({type:N.literal(\"pcb_trace_hint\"),pcb_trace_hint_id:Yo(\"pcb_trace_hint\"),pcb_port_id:N.string(),pcb_component_id:N.string(),route:N.array(fso),subcircuit_id:N.string().optional()}).describe(\"A hint that can be used during generation of a PCB trace\"),sao=N.object({type:N.literal(\"pcb_silkscreen_line\"),pcb_silkscreen_line_id:Yo(\"pcb_silkscreen_line\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),stroke_width:ho.default(\"0.1mm\"),x1:ho,y1:ho,x2:ho,y2:ho,layer:mC}).describe(\"Defines a silkscreen line on the PCB\"),aao=N.object({type:N.literal(\"pcb_silkscreen_path\"),pcb_silkscreen_path_id:Yo(\"pcb_silkscreen_path\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,route:N.array(Lr),stroke_width:Ui}).describe(\"Defines a silkscreen path on the PCB\"),Aao=N.object({type:N.literal(\"pcb_silkscreen_text\"),pcb_silkscreen_text_id:Yo(\"pcb_silkscreen_text\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ho.default(\"0.2mm\"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Ui,top:Ui,bottom:Ui,right:Ui}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:N.number().optional(),layer:Pc,is_mirrored:N.boolean().default(!1).optional(),anchor_position:Lr.default({x:0,y:0}),anchor_alignment:hv.default(\"center\")}).describe(\"Defines silkscreen text on the PCB\"),cao=N.object({type:N.literal(\"pcb_copper_text\"),pcb_copper_text_id:Yo(\"pcb_copper_text\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ho.default(\"0.2mm\"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Ui,top:Ui,bottom:Ui,right:Ui}).default({left:\"0.2mm\",top:\"0.2mm\",bottom:\"0.2mm\",right:\"0.2mm\"}).optional(),ccw_rotation:N.number().optional(),layer:Pc,is_mirrored:N.boolean().default(!1).optional(),anchor_position:Lr.default({x:0,y:0}),anchor_alignment:hv.default(\"center\")}).describe(\"Defines copper text on the PCB\"),lao=N.object({type:N.literal(\"pcb_silkscreen_rect\"),pcb_silkscreen_rect_id:Yo(\"pcb_silkscreen_rect\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:Pc,stroke_width:Ui.default(\"1mm\"),corner_radius:Ui.optional(),is_filled:N.boolean().default(!0).optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),ccw_rotation:N.number().optional()}).describe(\"Defines a silkscreen rect on the PCB\"),uao=N.object({type:N.literal(\"pcb_silkscreen_circle\"),pcb_silkscreen_circle_id:Yo(\"pcb_silkscreen_circle\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius:Ui,layer:mC,stroke_width:Ui.default(\"1mm\"),is_filled:N.boolean().optional()}).describe(\"Defines a silkscreen circle on the PCB\"),gao=N.object({type:N.literal(\"pcb_silkscreen_oval\"),pcb_silkscreen_oval_id:Yo(\"pcb_silkscreen_oval\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius_x:ho,radius_y:ho,layer:mC,ccw_rotation:jm.optional()}).describe(\"Defines a silkscreen oval on the PCB\"),dao=N.object({type:N.literal(\"pcb_silkscreen_pill\"),pcb_silkscreen_pill_id:Yo(\"pcb_silkscreen_pill\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:Pc,ccw_rotation:N.number().optional()}).describe(\"Defines a silkscreen pill on the PCB\"),hao=N.object({type:N.literal(\"pcb_fabrication_note_text\"),pcb_fabrication_note_text_id:Yo(\"pcb_fabrication_note_text\"),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ho.default(\"1mm\"),pcb_component_id:N.string(),text:N.string(),layer:mC,anchor_position:Lr.default({x:0,y:0}),anchor_alignment:N.enum([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),color:N.string().optional()}).describe(\"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators\"),pao=N.object({type:N.literal(\"pcb_fabrication_note_path\"),pcb_fabrication_note_path_id:Yo(\"pcb_fabrication_note_path\"),pcb_component_id:N.string(),subcircuit_id:N.string().optional(),layer:Pc,route:N.array(Lr),stroke_width:Ui,color:N.string().optional()}).describe(\"Defines a fabrication path on the PCB for fabricators or assemblers\"),mao=N.object({type:N.literal(\"pcb_fabrication_note_rect\"),pcb_fabrication_note_rect_id:Yo(\"pcb_fabrication_note_rect\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:mC,stroke_width:Ui.default(\"0.1mm\"),corner_radius:Ui.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe(\"Defines a fabrication note rectangle on the PCB\"),_ao=N.object({type:N.literal(\"pcb_fabrication_note_dimension\"),pcb_fabrication_note_dimension_id:Yo(\"pcb_fabrication_note_dimension\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,from:Lr,to:Lr,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset:Ui.optional(),offset_distance:Ui.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:Ui.default(\"1mm\"),color:N.string().optional(),arrow_size:Ui.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB fabrication notes\"),fao=N.object({type:N.literal(\"pcb_note_text\"),pcb_note_text_id:Yo(\"pcb_note_text\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:ho.default(\"1mm\"),text:N.string().optional(),anchor_position:Lr.default({x:0,y:0}),anchor_alignment:N.enum([\"center\",\"top_left\",\"top_right\",\"bottom_left\",\"bottom_right\"]).default(\"center\"),layer:mC.default(\"top\"),is_mirrored_from_top_view:N.boolean().optional(),color:N.string().optional()}).describe(\"Defines a documentation note in text on the PCB\"),Iao=N.object({type:N.literal(\"pcb_note_rect\"),pcb_note_rect_id:Yo(\"pcb_note_rect\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:mC.default(\"top\"),stroke_width:Ui.default(\"0.1mm\"),corner_radius:Ui.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe(\"Defines a rectangular documentation note on the PCB\"),Cao=N.object({type:N.literal(\"pcb_note_path\"),pcb_note_path_id:Yo(\"pcb_note_path\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),route:N.array(Lr),layer:mC.default(\"top\"),stroke_width:Ui.default(\"0.1mm\"),color:N.string().optional()}).describe(\"Defines a polyline documentation note on the PCB\"),yao=N.object({type:N.literal(\"pcb_note_line\"),pcb_note_line_id:Yo(\"pcb_note_line\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),x1:ho,y1:ho,x2:ho,y2:ho,layer:mC.default(\"top\"),stroke_width:ho.default(\"0.1mm\"),color:N.string().optional(),is_dashed:N.boolean().optional()}).describe(\"Defines a straight documentation note line on the PCB\"),xao=N.object({type:N.literal(\"pcb_note_dimension\"),pcb_note_dimension_id:Yo(\"pcb_note_dimension\"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),from:Lr,to:Lr,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset_distance:Ui.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal(\"tscircuit2024\").default(\"tscircuit2024\"),font_size:Ui.default(\"1mm\"),layer:mC.default(\"top\"),color:N.string().optional(),arrow_size:Ui.default(\"1mm\")}).describe(\"Defines a measurement annotation within PCB documentation notes\"),Eao=N0.extend({type:N.literal(\"pcb_footprint_overlap_error\"),pcb_error_id:Yo(\"pcb_error\"),error_type:N.literal(\"pcb_footprint_overlap_error\").default(\"pcb_footprint_overlap_error\"),pcb_smtpad_ids:N.array(N.string()).optional(),pcb_plated_hole_ids:N.array(N.string()).optional(),pcb_hole_ids:N.array(N.string()).optional(),pcb_keepout_ids:N.array(N.string()).optional()}).describe(\"Error emitted when a pcb footprint overlaps with another element\"),Bao=N0.extend({type:N.literal(\"pcb_courtyard_overlap_error\"),pcb_error_id:Yo(\"pcb_error\"),error_type:N.literal(\"pcb_courtyard_overlap_error\").default(\"pcb_courtyard_overlap_error\"),pcb_component_ids:N.tuple([N.string(),N.string()])}).describe(\"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another\"),bao=N.object({type:N.literal(\"pcb_keepout\"),shape:N.literal(\"rect\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:ho,height:ho,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()}).or(N.object({type:N.literal(\"pcb_keepout\"),shape:N.literal(\"circle\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius:ho,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()})),uAe=N.object({type:N.literal(\"pcb_cutout\"),pcb_cutout_id:Yo(\"pcb_cutout\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_board_id:N.string().optional(),pcb_panel_id:N.string().optional()}),Sao=uAe.extend({shape:N.literal(\"rect\"),center:Lr,width:Ui,height:Ui,rotation:jm.optional(),corner_radius:Ui.optional()}),Qao=uAe.extend({shape:N.literal(\"circle\"),center:Lr,radius:Ui}),vao=uAe.extend({shape:N.literal(\"polygon\"),points:N.array(Lr)}),wao=uAe.extend({shape:N.literal(\"path\"),route:N.array(Lr),slot_width:Ui,slot_length:Ui.optional(),space_between_slots:Ui.optional(),slot_corner_radius:Ui.optional()}),Pao=N.discriminatedUnion(\"shape\",[Sao,Qao,vao,wao]).describe(\"Defines a cutout on the PCB, removing board material.\"),Mao=N0.extend({type:N.literal(\"pcb_missing_footprint_error\"),pcb_missing_footprint_error_id:Yo(\"pcb_missing_footprint_error\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal(\"pcb_missing_footprint_error\").default(\"pcb_missing_footprint_error\"),source_component_id:N.string()}).describe(\"Defines a missing footprint error on the PCB\"),Dao=N0.extend({type:N.literal(\"external_footprint_load_error\"),external_footprint_load_error_id:Yo(\"external_footprint_load_error\"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),error_type:N.literal(\"external_footprint_load_error\").default(\"external_footprint_load_error\")}).describe(\"Defines an error when an external footprint fails to load\"),Nao=N0.extend({type:N.literal(\"circuit_json_footprint_load_error\"),circuit_json_footprint_load_error_id:Yo(\"circuit_json_footprint_load_error\"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal(\"circuit_json_footprint_load_error\").default(\"circuit_json_footprint_load_error\"),circuit_json:N.array(N.any()).optional()}).describe(\"Defines an error when a circuit JSON footprint fails to load\"),Rao=N.object({type:N.literal(\"pcb_group\"),pcb_group_id:Yo(\"pcb_group\"),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Ui.optional(),height:Ui.optional(),center:Lr,display_offset_x:N.string().optional().describe(\"How to display the x offset for this group, usually corresponding with how the user specified it\"),display_offset_y:N.string().optional().describe(\"How to display the y offset for this group, usually corresponding with how the user specified it\"),outline:N.array(Lr).optional(),anchor_position:Lr.optional(),anchor_alignment:hv.default(\"center\"),position_mode:N.enum([\"packed\",\"relative_to_group_anchor\",\"none\"]).optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),pcb_component_ids:N.array(N.string()),child_layout_mode:N.enum([\"packed\",\"none\"]).optional(),name:N.string().optional(),description:N.string().optional(),layout_mode:N.string().optional(),autorouter_configuration:N.object({trace_clearance:Ui}).optional(),autorouter_used_string:N.string().optional()}).describe(\"Defines a group of components on the PCB\"),Tao=N0.extend({type:N.literal(\"pcb_autorouting_error\"),pcb_error_id:Yo(\"pcb_autorouting_error\"),error_type:N.literal(\"pcb_autorouting_error\").default(\"pcb_autorouting_error\"),subcircuit_id:N.string().optional()}).describe(\"The autorouting has failed to route a portion of the board\"),kao=N.object({type:N.literal(\"pcb_manual_edit_conflict_warning\"),pcb_manual_edit_conflict_warning_id:Yo(\"pcb_manual_edit_conflict_warning\"),warning_type:N.literal(\"pcb_manual_edit_conflict_warning\").default(\"pcb_manual_edit_conflict_warning\"),message:N.string(),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe(\"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates\"),gEt=N.enum([\"x-\",\"x+\",\"y+\",\"y-\"]),Fao=N.object({type:N.literal(\"pcb_connector_not_in_accessible_orientation_warning\"),pcb_connector_not_in_accessible_orientation_warning_id:Yo(\"pcb_connector_not_in_accessible_orientation_warning\"),warning_type:N.literal(\"pcb_connector_not_in_accessible_orientation_warning\").default(\"pcb_connector_not_in_accessible_orientation_warning\"),message:N.string(),pcb_component_id:N.string(),source_component_id:N.string().optional(),pcb_board_id:N.string().optional(),facing_direction:gEt,recommended_facing_direction:gEt,subcircuit_id:N.string().optional()}).describe(\"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction\"),Lao=N.object({type:N.literal(\"supplier_footprint_mismatch_warning\"),supplier_footprint_mismatch_warning_id:Yo(\"supplier_footprint_mismatch_warning\"),warning_type:N.literal(\"supplier_footprint_mismatch_warning\").default(\"supplier_footprint_mismatch_warning\"),message:N.string(),source_component_id:N.string(),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),supplier_name:R3t.optional(),supplier_part_number:N.string().optional(),supplier_footprint_url:N.string().optional(),footprint_copper_intersection_over_union:N.number()}).describe(\"Warning emitted when a supplier part footprint does not match the expected footprint\"),Hao=N.object({type:N.literal(\"pcb_breakout_point\"),pcb_breakout_point_id:Yo(\"pcb_breakout_point\"),pcb_group_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional(),source_port_id:N.string().optional(),source_net_id:N.string().optional(),x:ho,y:ho}).describe(\"Defines a routing target within a pcb_group for a source_trace or source_net\"),Oao=N.object({type:N.literal(\"pcb_ground_plane\"),pcb_ground_plane_id:Yo(\"pcb_ground_plane\"),source_pcb_ground_plane_id:N.string(),source_net_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Defines a ground plane on the PCB\"),Gao=N.object({type:N.literal(\"pcb_ground_plane_region\"),pcb_ground_plane_region_id:Yo(\"pcb_ground_plane_region\"),pcb_ground_plane_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:Pc,points:N.array(Lr)}).describe(\"Defines a polygon region of a ground plane\"),Yao=N.object({type:N.literal(\"pcb_thermal_spoke\"),pcb_thermal_spoke_id:Yo(\"pcb_thermal_spoke\"),pcb_ground_plane_id:N.string(),shape:N.string(),spoke_count:N.number(),spoke_thickness:ho,spoke_inner_diameter:ho,spoke_outer_diameter:ho,pcb_plated_hole_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Pattern for connecting a ground plane to a plated hole\"),cbe=N.object({type:N.literal(\"pcb_copper_pour\"),pcb_copper_pour_id:Yo(\"pcb_copper_pour\"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:Pc,source_net_id:N.string().optional(),covered_with_solder_mask:N.boolean().optional().default(!0)}),Uao=cbe.extend({shape:N.literal(\"rect\"),center:Lr,width:Ui,height:Ui,rotation:jm.optional()}),Kao=cbe.extend({shape:N.literal(\"brep\"),brep_shape:mso}),Vao=cbe.extend({shape:N.literal(\"polygon\"),points:N.array(Lr)}),zao=N.discriminatedUnion(\"shape\",[Uao,Kao,Vao]).describe(\"Defines a copper pour on the PCB.\"),Jao=N0.extend({type:N.literal(\"pcb_component_outside_board_error\"),pcb_component_outside_board_error_id:Yo(\"pcb_component_outside_board_error\"),error_type:N.literal(\"pcb_component_outside_board_error\").default(\"pcb_component_outside_board_error\"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:Lr,component_bounds:N.object({min_x:N.number(),max_x:N.number(),min_y:N.number(),max_y:N.number()}),subcircuit_id:N.string().optional(),source_component_id:N.string().optional()}).describe(\"Error emitted when a PCB component is placed outside the board boundaries\"),Wao=N0.extend({type:N.literal(\"pcb_component_not_on_board_edge_error\"),pcb_component_not_on_board_edge_error_id:Yo(\"pcb_component_not_on_board_edge_error\"),error_type:N.literal(\"pcb_component_not_on_board_edge_error\").default(\"pcb_component_not_on_board_edge_error\"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:Lr,pad_to_nearest_board_edge_distance:N.number(),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a component that must be placed on the board edge is centered away from the edge\"),jao=N0.extend({type:N.literal(\"pcb_component_invalid_layer_error\"),pcb_component_invalid_layer_error_id:Yo(\"pcb_component_invalid_layer_error\"),error_type:N.literal(\"pcb_component_invalid_layer_error\").default(\"pcb_component_invalid_layer_error\"),pcb_component_id:N.string().optional(),source_component_id:N.string(),layer:Pc,subcircuit_id:N.string().optional()}).describe(\"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)\"),$ao=N0.extend({type:N.literal(\"pcb_via_clearance_error\"),pcb_error_id:Yo(\"pcb_error\"),error_type:N.literal(\"pcb_via_clearance_error\").default(\"pcb_via_clearance_error\"),pcb_via_ids:N.array(N.string()).min(2),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when vias are closer than the allowed clearance\"),qao=N0.extend({type:N.literal(\"pcb_via_trace_clearance_error\"),pcb_via_trace_clearance_error_id:Yo(\"pcb_via_trace_clearance_error\"),error_type:N.literal(\"pcb_via_trace_clearance_error\").default(\"pcb_via_trace_clearance_error\"),pcb_via_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a via and trace are closer than the allowed clearance\"),Xao=N0.extend({type:N.literal(\"pcb_pad_pad_clearance_error\"),pcb_pad_pad_clearance_error_id:Yo(\"pcb_pad_pad_clearance_error\"),error_type:N.literal(\"pcb_pad_pad_clearance_error\").default(\"pcb_pad_pad_clearance_error\"),pcb_pad_ids:N.array(N.string()).min(2),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when pads are closer than the allowed clearance\"),Zao=N0.extend({type:N.literal(\"pcb_pad_trace_clearance_error\"),pcb_pad_trace_clearance_error_id:Yo(\"pcb_pad_trace_clearance_error\"),error_type:N.literal(\"pcb_pad_trace_clearance_error\").default(\"pcb_pad_trace_clearance_error\"),pcb_pad_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe(\"Error emitted when a pad and trace are closer than allowed clearance\"),eAo=N.object({type:N.literal(\"pcb_courtyard_rect\"),pcb_courtyard_rect_id:Yo(\"pcb_courtyard_rect\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:mC,ccw_rotation:jm.optional(),color:N.string().optional()}).describe(\"Defines a courtyard rectangle on the PCB\"),tAo=N.object({type:N.literal(\"pcb_courtyard_outline\"),pcb_courtyard_outline_id:Yo(\"pcb_courtyard_outline\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,outline:N.array(Lr).min(2)}).describe(\"Defines a courtyard outline on the PCB\"),nAo=N.object({type:N.literal(\"pcb_courtyard_polygon\"),pcb_courtyard_polygon_id:Yo(\"pcb_courtyard_polygon\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,points:N.array(Lr).min(3),color:N.string().optional()}).describe(\"Defines a courtyard polygon on the PCB\"),oAo=N.object({type:N.literal(\"pcb_courtyard_circle\"),pcb_courtyard_circle_id:Yo(\"pcb_courtyard_circle\"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius:Ui,layer:mC,color:N.string().optional()}).describe(\"Defines a courtyard circle on the PCB\"),iAo=N.object({type:N.literal(\"cad_component\"),cad_component_id:N.string(),pcb_component_id:N.string(),source_component_id:N.string(),position:nN,rotation:nN.optional(),size:nN.optional(),layer:Pc.optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),model_obj_url:N.string().optional(),model_stl_url:N.string().optional(),model_3mf_url:N.string().optional(),model_gltf_url:N.string().optional(),model_glb_url:N.string().optional(),model_step_url:N.string().optional(),model_wrl_url:N.string().optional(),model_asset:Zio.optional(),model_unit_to_mm_scale_factor:N.number().optional(),model_board_normal_direction:N.enum([\"x+\",\"x-\",\"y+\",\"y-\",\"z+\",\"z-\"]).optional().describe(`The direction in the model's coordinate space that is considered \"up\" or \"coming out of the board surface\"`),model_origin_position:nN.optional(),model_origin_alignment:N.enum([\"unknown\",\"center\",\"center_of_component_on_board_surface\",\"bottom_center_of_component\"]).optional(),model_object_fit:N.enum([\"contain_within_bounds\",\"fill_bounds\"]).optional().default(\"contain_within_bounds\"),model_jscad:N.any().optional(),show_as_translucent_model:N.boolean().optional(),anchor_alignment:N.enum([\"center\",\"center_of_component_on_board_surface\"]).optional().default(\"center\")}).describe(\"Defines a component on the PCB\"),dEt=N.enum([\"sinewave\",\"square\",\"triangle\",\"sawtooth\"]),rAo=N.union([N.string(),N.number()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),sAo=N.object({type:N.literal(\"simulation_voltage_source\"),simulation_voltage_source_id:Yo(\"simulation_voltage_source\"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),voltage:dv}).describe(\"Defines a DC voltage source for simulation\"),aAo=N.object({type:N.literal(\"simulation_voltage_source\"),simulation_voltage_source_id:Yo(\"simulation_voltage_source\"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),voltage:dv.optional(),frequency:PL.optional(),peak_to_peak_voltage:dv.optional(),wave_shape:dEt.optional(),phase:jm.optional(),duty_cycle:rAo.optional()}).describe(\"Defines an AC voltage source for simulation\"),AAo=N.union([sAo,aAo]).describe(\"Defines a voltage source for simulation\"),cAo=N.union([N.string(),N.number()]).transform(t=\u003etypeof t==\"string\"?t.endsWith(\"%\")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,\"Duty cycle must be non-negative\").max(1,\"Duty cycle cannot be greater than 100%\")),lAo=N.object({type:N.literal(\"simulation_current_source\"),simulation_current_source_id:Yo(\"simulation_current_source\"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),current:HJ}).describe(\"Defines a DC current source for simulation\"),uAo=N.object({type:N.literal(\"simulation_current_source\"),simulation_current_source_id:Yo(\"simulation_current_source\"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),current:HJ.optional(),frequency:PL.optional(),peak_to_peak_current:HJ.optional(),wave_shape:dEt.optional(),phase:jm.optional(),duty_cycle:cAo.optional()}).describe(\"Defines an AC current source for simulation\"),gAo=N.union([lAo,uAo]).describe(\"Defines a current source for simulation\"),dAo=N.union([N.literal(\"spice_dc_sweep\"),N.literal(\"spice_dc_operating_point\"),N.literal(\"spice_transient_analysis\"),N.literal(\"spice_ac_analysis\")]),hAo=N.object({type:N.literal(\"simulation_experiment\"),simulation_experiment_id:Yo(\"simulation_experiment\"),name:N.string(),experiment_type:dAo,time_per_step:rbe.optional(),start_time_ms:ML.optional(),end_time_ms:ML.optional()}).describe(\"Defines a simulation experiment configuration\"),pAo=N.object({type:N.literal(\"simulation_transient_voltage_graph\"),simulation_transient_voltage_graph_id:Yo(\"simulation_transient_voltage_graph\"),simulation_experiment_id:N.string(),timestamps_ms:N.array(N.number()).optional(),voltage_levels:N.array(N.number()),source_component_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),time_per_step:rbe,start_time_ms:ML,end_time_ms:ML,name:N.string().optional(),color:N.string().optional()}).describe(\"Stores voltage measurements over time for a simulation\"),mAo=N.object({type:N.literal(\"simulation_switch\"),simulation_switch_id:Yo(\"simulation_switch\"),source_component_id:N.string().optional(),closes_at:ML.optional(),opens_at:ML.optional(),starts_closed:N.boolean().optional(),switching_frequency:PL.optional()}).describe(\"Defines a switch for simulation timing control\"),_Ao=N.object({type:N.literal(\"simulation_voltage_probe\"),simulation_voltage_probe_id:Yo(\"simulation_voltage_probe\"),source_component_id:N.string().optional(),name:N.string().optional(),signal_input_source_port_id:N.string().optional(),signal_input_source_net_id:N.string().optional(),reference_input_source_port_id:N.string().optional(),reference_input_source_net_id:N.string().optional(),subcircuit_id:N.string().optional(),color:N.string().optional()}).describe(\"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.\").superRefine((t,e)=\u003e{if(t.reference_input_source_port_id||t.reference_input_source_net_id){const n=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,o=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;n\u0026\u0026o?e.addIssue({code:N.ZodIssueCode.custom,message:\"Cannot mix port and net connections in a differential probe.\"}):n?t.signal_input_source_port_id\u0026\u0026t.reference_input_source_port_id||e.addIssue({code:N.ZodIssueCode.custom,message:\"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id.\"}):o\u0026\u0026(t.signal_input_source_net_id\u0026\u0026t.reference_input_source_net_id||e.addIssue({code:N.ZodIssueCode.custom,message:\"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id.\"}))}else!!t.signal_input_source_port_id==!!t.signal_input_source_net_id\u0026\u0026e.addIssue({code:N.ZodIssueCode.custom,message:\"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id.\"})}),fAo=N0.extend({type:N.literal(\"simulation_unknown_experiment_error\"),simulation_unknown_experiment_error_id:Yo(\"simulation_unknown_experiment_error\"),error_type:N.literal(\"simulation_unknown_experiment_error\").default(\"simulation_unknown_experiment_error\"),simulation_experiment_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe(\"An unknown error occurred during the simulation experiment.\"),IAo=N.object({type:N.literal(\"simulation_op_amp\"),simulation_op_amp_id:Yo(\"simulation_op_amp\"),source_component_id:N.string().optional(),inverting_input_source_port_id:N.string(),non_inverting_input_source_port_id:N.string(),output_source_port_id:N.string(),positive_supply_source_port_id:N.string(),negative_supply_source_port_id:N.string()}).describe(\"Defines a simple ideal operational amplifier for simulation\"),hEt=(N.union([Qro,bro,Sro,Bro,wro,vro,L3t,T3t,abe,F3t,k3t,H3t,O3t,G3t,K3t,V3t,z3t,q3t,J3t,W3t,j3t,$3t,U3t,Y3t,Dro,Nro,Pro,X3t,Z3t,eEt,tEt,nEt,Rro,Tro,kro,Fro,Lro,oEt,Mro,Cso,yso,Mao,Dao,Nao,kao,Fao,Lao,vso,bao,wso,Zso,Uso,Jso,Wso,eao,kso,Yso,tao,nao,Rao,rao,sao,aao,Aao,dao,cao,lao,uao,gao,jso,$so,oao,iao,qso,Xso,$ao,qao,Xao,Zao,pao,hao,mao,_ao,fao,Iao,Cao,yao,xao,Tao,Eao,Bao,Hao,Pao,Oao,Gao,Yao,zao,Jao,Wao,jao,eAo,tAo,nAo,oAo,Hro,eso,Wro,jro,$ro,qro,Vro,Jro,tso,Xro,Oro,oso,iso,nso,Aso,cso,lso,uso,hso,gso,dso,iAo,AAo,gAo,hAo,pAo,mAo,_Ao,fAo,IAo]),!0),OJ={CCW:-1,CW:1,NOT_ORIENTABLE:0},CAo=2*Math.PI,gAe=Object.freeze({__proto__:null,BOUNDARY:2,CCW:hEt,CONTAINS:3,CW:!1,END_VERTEX:2,INSIDE:1,INTERLACE:4,NOT_VERTEX:0,ORIENTATION:OJ,OUTSIDE:0,OVERLAP_OPPOSITE:2,OVERLAP_SAME:1,PIx2:CAo,START_VERTEX:1}),_7=1e-6;function pEt(t){_7=t}function mEt(){return _7}function lbe(t){return t\u003c_7\u0026\u0026t\u003e-_7}function iN(t,e){return t-e\u003c_7\u0026\u0026t-e\u003e-_7}function _Et(t,e){return t-e\u003e_7}function fEt(t,e){return t-e\u003c-_7}var Ke={Utils:Object.freeze({__proto__:null,DECIMALS:3,EQ:iN,EQ_0:lbe,GE:function(t,e){return t-e\u003e-_7},GT:_Et,LE:function(t,e){return t-e\u003c_7},LT:fEt,getTolerance:mEt,setTolerance:pEt}),Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in gAe)Ke[t]=gAe[t];Object.defineProperty(Ke,\"DP_TOL\",{get:function(){return mEt()},set:function(t){pEt(t)}});var ud=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError(\"Illegal Parameters\")}static get ZERO_DIVISION(){return new Error(\"Zero division\")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error(\"Unresolved boundary conflict in boolean operation\")}static get INFINITE_LOOP(){return new Error(\"Infinite loop\")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error(\"Cannot complete boolean operation\")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error(\"Abstract method cannot be invoked\")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error(\"Operation is not supported\")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error(\"Unsupported shape type\")}};Ke.Errors=ud;var ube=class{constructor(t,e){this.first=t,this.last=e||this.first}[Symbol.iterator](){let t;return{next:()=\u003e(t=t?t.next:this.first,{value:t,done:t===void 0})}}get size(){let t=0;for(let e of this)t++;return t}toArray(t=void 0,e=void 0){let n=[],o=t||this.first,i=e||this.last,r=o;if(r===void 0)return n;do n.push(r),r=r.next;while(r!==i.next);return n}append(t){return this.isEmpty()?this.first=t:(t.prev=this.last,this.last.next=t),this.last=t,this.last.next=void 0,this.first.prev=void 0,this}insert(t,e){if(this.isEmpty())this.first=t,this.last=t;else if(e==null)t.next=this.first,this.first.prev=t,this.first=t;else{let n=e.next;e.next=t,n\u0026\u0026(n.prev=t),t.prev=e,t.next=n,this.last===e\u0026\u0026(this.last=t)}return this.last.next=void 0,this.first.prev=void 0,this}remove(t){return t===this.first\u0026\u0026t===this.last?(this.first=void 0,this.last=void 0):(t.prev\u0026\u0026(t.prev.next=t.next),t.next\u0026\u0026(t.next.prev=t.prev),t===this.first\u0026\u0026(this.first=t.next),t===this.last\u0026\u0026(this.last=t.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(t){let e=t,n=t;do{if(e!=t\u0026\u0026e===n)throw ud.INFINITE_LOOP;e=e.next,n=n.next.next}while(e!=t)}},IEt={stroke:\"black\"},yAo=class{constructor(t=IEt){for(const e in t)this[e]=t[e];this.stroke=t.stroke??IEt.stroke}toAttributesString(){return Object.keys(this).reduce((t,e)=\u003et+(this[e]!==void 0?this.toAttrString(e,this[e]):\"\"),\"\")}toAttrString(t,e){const n=t===\"className\"?\"class\":this.convertCamelToKebabCase(t);return e===null?`${n} `:`${n}=\"${e.toString()}\" `}convertCamelToKebabCase(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join(\"-\").toLowerCase()}};function rN(t){return new yAo(t).toAttributesString()}function DL(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ke.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ke.Point(g,h))}return n}function sN(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ke.Utils.EQ(i,e.r))n.push(o);else if(Ke.Utils.LT(i,e.r)){let r,s,a=Math.sqrt(e.r*e.r-i*i);r=t.norm.rotate90CCW().multiply(a),s=o.translate(r),n.push(s),r=t.norm.rotate90CW().multiply(a),s=o.translate(r),n.push(s)}return n}function NL(t,e){let n=[];for(let o of e.toSegments()){let i=GJ(o,t);for(let r of i)PEt(r,n)||n.push(r)}return n}function dAe(t,e){let n=[];if(NL(t,e.box).length===0)return n;let o=sN(t,new Ke.Circle(e.pc,e.r));for(let i of o)i.on(e)\u0026\u0026n.push(i);return n}function GJ(t,e){let n=[];return t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026!t.isZeroLength()\u0026\u0026n.push(t.pe),n.length\u003e0||t.isZeroLength()||t.ps.leftTo(e)\u0026\u0026t.pe.leftTo(e)||!t.ps.leftTo(e)\u0026\u0026!t.pe.leftTo(e)?n:DL(new Ke.Line(t.ps,t.pe),e)}function hAe(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)\u0026\u0026n.push(e.ps),n;let o=new Ke.Line(t.ps,t.pe),i=new Ke.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026n.push(t.pe),!e.ps.on(t)||e.ps.equalTo(t.ps)||e.ps.equalTo(t.pe)||n.push(e.ps),!e.pe.on(t)||e.pe.equalTo(t.ps)||e.pe.equalTo(t.pe)||n.push(e.pe);else if(o.parallelTo(i)){const r=new Ke.Vector(t.ps,t.pe),s=new Ke.Vector(e.ps,e.pe),a=new Ke.Vector(t.ps,e.ps),A=r.cross(s);if(!Ke.Utils.EQ_0(A)){const c=a.cross(s)/A,l=a.cross(r)/A;Ke.Utils.GE(c,0)\u0026\u0026Ke.Utils.LE(c,1)\u0026\u0026Ke.Utils.GE(l,0)\u0026\u0026Ke.Utils.LE(l,1)\u0026\u0026n.push(CEt(t.ps.translate(r.multiply(c)),t,e))}}else{let r=DL(o,i);r.length\u003e0\u0026\u0026yEt(r[0],t)\u0026\u0026yEt(r[0],e)\u0026\u0026n.push(CEt(r[0],t,e))}return n}function CEt(t,e,n){for(const o of[e.ps,e.pe,n.ps,n.pe])if(t.equalTo(o))return o;return t}function yEt(t,e){const n=e.box;return Ke.Utils.LE(t.x,n.xmax)\u0026\u0026Ke.Utils.GE(t.x,n.xmin)\u0026\u0026Ke.Utils.LE(t.y,n.ymax)\u0026\u0026Ke.Utils.GE(t.y,n.ymin)}function pAe(t,e){let n=[];if(t.isZeroLength()){let[i,r]=t.ps.distanceTo(e.pc);return Ke.Utils.EQ(i,e.r)\u0026\u0026n.push(t.ps),n}let o=sN(new Ke.Line(t.ps,t.pe),e);for(let i of o)i.on(t)\u0026\u0026n.push(i);return n}function RL(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;let o=sN(new Ke.Line(t.ps,t.pe),new Ke.Circle(e.pc,e.r));for(let i of o)i.on(t)\u0026\u0026i.on(e)\u0026\u0026n.push(i);return n}function xEt(t,e){let n=[],o=new Ke.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ke.Utils.EQ_0(i)||Ke.Utils.EQ_0(r))return n;if(Ke.Utils.EQ_0(o.x)\u0026\u0026Ke.Utils.EQ_0(o.y)\u0026\u0026Ke.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s,a=t.pc.distanceTo(e.pc)[0];if(Ke.Utils.GT(a,i+r)||Ke.Utils.LT(a,Math.abs(i-r)))return n;if(o.x/=a,o.y/=a,Ke.Utils.EQ(a,i+r)||Ke.Utils.EQ(a,Math.abs(i-r)))return s=t.pc.translate(i*o.x,i*o.y),n.push(s),n;let A=i*i/(2*a)-r*r/(2*a)+a/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return s=c.translate(o.rotate90CCW().multiply(l)),n.push(s),s=c.translate(o.rotate90CW().multiply(l)),n.push(s),n}function EEt(t,e){let n=[];if(t.pc.equalTo(e.pc)\u0026\u0026Ke.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)\u0026\u0026n.push(s),s=t.end,s.on(e)\u0026\u0026n.push(s),s=e.start,s.on(t)\u0026\u0026n.push(s),s=e.end,s.on(t)\u0026\u0026n.push(s),n}let o=new Ke.Circle(t.pc,t.r),i=new Ke.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)\u0026\u0026s.on(e)\u0026\u0026n.push(s);return n}function gbe(t,e){let n=[];if(e.pc.equalTo(t.pc)\u0026\u0026Ke.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=xEt(e,new Ke.Circle(t.pc,t.r));for(let i of o)i.on(t)\u0026\u0026n.push(i);return n}function BEt(t,e){return t.isSegment?hAe(t.shape,e):RL(e,t.shape)}function bEt(t,e){return t.isSegment?RL(t.shape,e):EEt(t.shape,e)}function SEt(t,e){return t.isSegment?GJ(t.shape,e):dAe(e,t.shape)}function xAo(t,e){return t.isSegment?pAe(t.shape,e):gbe(t.shape,e)}function dbe(t,e){let n=[];for(let o of e.edges)for(let i of BEt(o,t))n.push(i);return n}function hbe(t,e){let n=[];for(let o of e.edges)for(let i of bEt(o,t))n.push(i);return n}function YJ(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of SEt(o,t))PEt(i,n)||n.push(i);return t.sortPoints(n)}function QEt(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of xAo(o,t))n.push(i);return n}function vEt(t,e){return t.isSegment?BEt(e,t.shape):t.isArc?bEt(e,t.shape):t.isLine?SEt(e,t.shape):t.isRay?(n=e,o=t.shape,n.isSegment?pbe(o,n.shape):mbe(o,n.shape)):[];var n,o}function wEt(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...vEt(t,i)];return n}function PEt(t,e){return e.some(n=\u003en.equalTo(t))}function pv(t){return new Ke.Line(t.start,t.norm)}function pbe(t,e){return GJ(e,pv(t)).filter(n=\u003et.contains(n))}function mbe(t,e){return dAe(pv(t),e).filter(n=\u003et.contains(n))}function MEt(t,e){return sN(pv(t),e).filter(n=\u003et.contains(n))}function DEt(t,e){return DL(pv(t),e).filter(n=\u003et.contains(n))}function NEt(t,e){return YJ(pv(t),e).filter(n=\u003et.contains(n))}function REt(t,e){if(t.intersect\u0026\u0026t.intersect instanceof Function)return t.intersect(e);throw ud.UNSUPPORTED_SHAPE_TYPE}function TL(t,e){let n=[];for(let o of e)n=[...n,...REt(t,o.shape)];return n}var aN=class $te extends ube{constructor(...e){if(super(),this.isInfinite=!1,e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length\u003e0){const n=e[0],o=n.length,i=s=\u003es instanceof Ke.Segment||s instanceof Ke.Arc||s instanceof Ke.Ray,r=s=\u003es instanceof Ke.Segment||s instanceof Ke.Arc;if(!(o===1\u0026\u0026(s=\u003es instanceof Ke.Segment||s instanceof Ke.Arc||s instanceof Ke.Ray||s instanceof Ke.Line)(n[0])||o\u003e1\u0026\u0026i(n[0])\u0026\u0026i(n[o-1])\u0026\u0026n.slice(1,o-1).every(r)))throw Ke.Errors.ILLEGAL_PARAMETERS;this.isInfinite=n.some(s=\u003es instanceof Ke.Ray||s instanceof Ke.Line);for(let s of n){let a=new Ke.Edge(s);this.append(a)}this.setArcLength()}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=\u003ee.merge(n.box),new Ke.Box)}get vertices(){let e=this.edges.map(n=\u003en.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new $te(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e\u003ethis.length||e\u003c0||this.isInfinite)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ke.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Ke.Point){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Line){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Circle){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Segment){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Arc){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Box){const[n,o]=Ke.Distance.shape2multiline(new Ke.Polygon(e),this);return[n,o.reverse()]}if(e instanceof Ke.Multiline)return Ke.Distance.multiline2multiline(this,e);throw Ke.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ke.Multiline?(function(n,o){let i=[];for(let r of n)for(let s of o)i=[...i,...REt(r.shape,s.shape)];return i})(this,e):TL(e,this)}contains(e){if(e instanceof Ke.Point)return this.edges.some(n=\u003en.shape.contains(e));throw Ke.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new $te(this.edges.map(n=\u003en.shape.translate(e)))}rotate(e=0,n=new Ke.Point){return new $te(this.edges.map(o=\u003eo.shape.rotate(e,n)))}transform(e=new Ke.Matrix){return new $te(this.edges.map(n=\u003en.shape.transform(e)))}toShapes(){return this.edges.map(e=\u003ee.shape.clone())}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svgPoints(){return this.vertices.map(e=\u003e`${e.x},${e.y}`).join(\" \")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`\n\u003cpath ${rN({fill:\"none\",...e})} d=\"`;n+=`\nM${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`\" \u003e\n\u003c/path\u003e`,n}};Ke.Multiline=aN;function kL(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;r=i[0]===null?0:i[1]===null?t.shape.length:i[0].length;let s,a=0;iN(r,0)\u0026\u0026(a|=1),iN(r,t.shape.length)\u0026\u0026(a|=2),s=r===1/0?i[0].coord(e):2\u0026a\u0026\u0026t.next\u0026\u0026t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function UJ(t){t.int_points1_sorted=mv(t.int_points1),t.int_points2_sorted=mv(t.int_points2)}function mv(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(EAo)}function EAo(t,e){return t.faceId\u003ce.faceId?-1:t.faceId\u003ee.faceId?1:t.arc_length\u003ce.arc_length?-1:t.arc_length\u003ee.arc_length?1:0}function _be(t){if(t.int_points1.length\u003c2)return;let e,n,o,i,r=!1;for(let s=0;s\u003ct.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a\u003ct.int_points1_sorted.length\u0026\u0026(o=t.int_points1_sorted[a],iN(o.arc_length,e.arc_length));a++)o.id!==-1\u0026\u0026(i=t.int_points2[o.id],i.id!==-1\u0026\u0026o.edge_before===e.edge_before\u0026\u0026o.edge_after===e.edge_after\u0026\u0026i.edge_before===n.edge_before\u0026\u0026i.edge_after===n.edge_after\u0026\u0026(o.id=-1,i.id=-1,r=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s\u003ct.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!iN(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let A=t.int_points1[a.id];A.edge_before===e.edge_before\u0026\u0026A.edge_after===e.edge_after\u0026\u0026a.edge_before===n.edge_before\u0026\u0026a.edge_after===n.edge_after\u0026\u0026(A.id=-1,a.id=-1,r=!0)}r\u0026\u0026(t.int_points1=t.int_points1.filter(s=\u003es.id\u003e=0),t.int_points2=t.int_points2.filter(s=\u003es.id\u003e=0),t.int_points1.forEach((s,a)=\u003es.id=a),t.int_points2.forEach((s,a)=\u003es.id=a))}function fbe(t){for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after\u0026\u0026(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvEnd=2),e.edge_after\u0026\u0026(e.edge_after.bvStart=2)}function Ibe(t,e){for(let n of t)n.edge_before\u0026\u0026n.edge_before.setInclusion(e),n.edge_after\u0026\u0026n.edge_after.setInclusion(e)}function FL(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s\u003ct.length\u0026\u0026o.face===n\u0026\u0026(i=t[s],i.pt.equalTo(o.pt)\u0026\u0026i.edge_before===o.edge_before\u0026\u0026i.edge_after===o.edge_after);s++)r++;return r}function LL(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start\u0026\u0026o.shape.start.equalTo(n.pt)\u0026\u0026(n.is_vertex|=1),o.shape.end\u0026\u0026o.shape.end.equalTo(n.pt)\u0026\u0026(n.is_vertex|=2),1\u0026n.is_vertex){n.edge_before=o.prev,o.prev\u0026\u0026(n.is_vertex=2);continue}if(2\u0026n.is_vertex)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof aN\u0026\u00261\u0026n.is_vertex\u0026\u0026(n.edge_after=t.first)}}function TEt(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}Ke.multiline=(...t)=\u003enew Ke.Multiline(...t);var{INSIDE:f7,OUTSIDE:I7,BOUNDARY:$f,OVERLAP_SAME:BAo,OVERLAP_OPPOSITE:bAo}=gAe,{NOT_VERTEX:Yhr,START_VERTEX:kEt,END_VERTEX:FEt}=gAe;function Cbe(t,e){let n=e.clone().reverse(),[o]=KJ(t,n,3,!0);return o}function LEt(t,e){let[n]=KJ(t,e,2,!0);return n}function HEt(t,e){let[n,o]=KJ(t,e,2,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=\u003ea.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=\u003ea.shape)];return[i,r]}function ybe(t,e){let[n]=KJ(t,e,3,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=\u003er.shape)];return o}function OEt(t,e){let n=t.clone(),o=e.clone(),i=GEt(n,o);return UJ(i),LL(n,i.int_points1_sorted),LL(o,i.int_points2_sorted),_be(i),UJ(i),[i.int_points1_sorted.map(r=\u003er.pt),i.int_points2_sorted.map(r=\u003er.pt)]}function SAo(t,e,n,o){let i=YEt(t,n.int_points1),r=YEt(e,n.int_points2);for(UEt(i,e),UEt(r,t),fbe(n.int_points1),fbe(n.int_points2),Ibe(n.int_points1,e),Ibe(n.int_points2,t);QAo(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,A,c,l=s.int_points1.length;for(let u=0;u\u003cl;u++){let g=s.int_points1_sorted[u];g.face!==a\u0026\u0026(A=u,a=g.face);let h,d=u,p=FL(s.int_points1_sorted,u,a);h=d+p\u003cl\u0026\u0026s.int_points1_sorted[d+p].face===a?d+p:A;let m=FL(s.int_points1_sorted,h,a);c=null;for(let E=h;E\u003ch+m;E++){let B=s.int_points1_sorted[E];if(B.face===a\u0026\u0026s.int_points2[B.id].face===s.int_points2[g.id].face){c=B;break}}if(c===null)continue;let _=g.edge_after,f=c.edge_before;if(_.bv!==2||f.bv!==2||_!==f)continue;let I=s.int_points2[g.id],C=s.int_points2[c.id],y=I.edge_after,x=C.edge_before;y.bv===2\u0026\u0026x.bv===2\u0026\u0026y===x||(I=s.int_points2[c.id],C=s.int_points2[g.id],y=I.edge_after,x=C.edge_before),y.bv===2\u0026\u0026x.bv===2\u0026\u0026y===x\u0026\u0026_.setOverlap(y)}})(n),xbe(t,o,n.int_points1_sorted,!0),xbe(e,o,n.int_points2_sorted,!1),KEt(t,i,o,!0),KEt(e,r,o,!1)}function KJ(t,e,n,o){let i=t.clone(),r=e.clone(),s=GEt(i,r);return UJ(s),LL(i,s.int_points1_sorted),LL(r,s.int_points2_sorted),_be(s),UJ(s),SAo(i,r,s,n),o\u0026\u0026(function(a,A,c){(function(l,u,g,h){for(let d of u.faces){for(let p of d)l.edges.add(p);h.find(p=\u003ep.face===d)===void 0\u0026\u0026l.addFace(d.first,d.last)}})(a,A,0,c.int_points2),(function(l,u,g){if(g.int_points1.length!==0)for(let h=0;h\u003cg.int_points1.length;h++){let d=g.int_points1[h],p=g.int_points2[h];if(d.edge_before!==void 0\u0026\u0026d.edge_after===void 0\u0026\u0026p.edge_before===void 0\u0026\u0026p.edge_after!==void 0\u0026\u0026(d.edge_before.next=p.edge_after,p.edge_after.prev=d.edge_before,d.edge_after=p.edge_after,p.edge_before=d.edge_before),p.edge_before!==void 0\u0026\u0026p.edge_after===void 0\u0026\u0026d.edge_before===void 0\u0026\u0026d.edge_after!==void 0\u0026\u0026(p.edge_before.next=d.edge_after,d.edge_after.prev=p.edge_before,p.edge_after=d.edge_after,d.edge_before=p.edge_before),d.edge_before!==void 0\u0026\u0026d.edge_after===void 0)for(let m of g.int_points1_sorted)m!==d\u0026\u0026m.edge_before===void 0\u0026\u0026m.edge_after!==void 0\u0026\u0026m.pt.equalTo(d.pt)\u0026\u0026(d.edge_before.next=m.edge_after,m.edge_after.prev=d.edge_before,d.edge_after=m.edge_after,m.edge_before=d.edge_before);if(p.edge_before!==void 0\u0026\u0026p.edge_after===void 0)for(let m of g.int_points2_sorted)m!==p\u0026\u0026m.edge_before===void 0\u0026\u0026m.edge_after!==void 0\u0026\u0026m.pt.equalTo(p.pt)\u0026\u0026(p.edge_before.next=m.edge_after,m.edge_after.prev=p.edge_before,p.edge_after=m.edge_after,m.edge_before=p.edge_before)}})(0,0,c),Ebe(a,c.int_points1),Ebe(A,c.int_points2),Bbe(a,c.int_points1,c.int_points2),Bbe(a,c.int_points2,c.int_points1),VEt(a),VEt(A)})(i,r,s),[i,r]}function GEt(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)kL(o,a,n.int_points1),kL(r,a,n.int_points2)}}return n}function YEt(t,e){let n=[];for(let o of t.faces)e.find(i=\u003ei.face===o)||n.push(o);return n}function UEt(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function QAo(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u\u003cc;u++){let g=o[u];g.face!==s\u0026\u0026(a=u,s=g.face);let h,d=u,p=FL(o,u,s);h=d+p\u003cc\u0026\u0026o[d+p].face===s?d+p:a;let m=FL(o,h,s);A=null;for(let I=h;I\u003ch+m;I++){let C=o[I];if(C.face===s\u0026\u0026i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv!==$f||f.bv==$f)if(_.bv==$f||f.bv!==$f){if(_.bv===$f\u0026\u0026f.bv===$f\u0026\u0026_!=f||_.bv===f7\u0026\u0026f.bv===I7||_.bv===I7\u0026\u0026f.bv===f7){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===$f\u0026\u0026f.bv===$f\u0026\u0026_!=f){let I,C=_.next;for(;C!=f;){if(C.bv!=$f){if(I===void 0)I=C.bv;else if(C.bv!=I)throw ud.UNRESOLVED_BOUNDARY_CONFLICT}C=C.next}I!=null\u0026\u0026(_.bv=I,f.bv=I);continue}if(_.bv===f7\u0026\u0026f.bv===I7||_.bv===I7\u0026\u0026f.bv===f7){let I=_;for(;I!=f;){if(I.bvStart===_.bv\u0026\u0026I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C\u003c10*Ke.DP_TOL){kL(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex\u0026kEt)x.edge_after=I,x.edge_before=I.prev,I.bvStart=$f,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex\u0026FEt)x.edge_after=I.next,I.bvEnd=$f,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=$f,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);kL(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex\u0026kEt)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex\u0026FEt)B.edge_after=E.next;else{let S=i.find(w=\u003ew.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S\u0026\u0026(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=$f,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=$f,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}UJ(r),l=!0;break}}I=I.next}if(l)break;throw ud.UNRESOLVED_BOUNDARY_CONFLICT}}else f.bv=_.bv;else _.bv=f.bv}return l}function xbe(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A\u003cn.length;A++){if(s=n[A],s.face!==i\u0026\u0026(r=A,i=s.face),i.isEmpty())continue;let c,l=A,u=FL(n,A,i);c=l+u\u003cn.length\u0026\u0026n[l+u].face===s.face?l+u:r,a=n[c];let g=c,h=FL(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===f7\u0026\u0026p.bv===f7\u0026\u0026e===1||d.bv===I7\u0026\u0026p.bv===I7\u0026\u0026e===2||(d.bv===I7||p.bv===I7)\u0026\u0026e===3\u0026\u0026!o||(d.bv===f7||p.bv===f7)\u0026\u0026e===3\u0026\u0026o||d.bv===$f\u0026\u0026p.bv===$f\u0026\u0026d.overlap\u0026BAo\u0026\u0026o||d.bv===$f\u0026\u0026p.bv===$f\u0026\u0026d.overlap\u0026bAo){t.removeChain(i,d,p);for(let m=l;m\u003cl+u;m++)n[m].edge_after=void 0;for(let m=g;m\u003cg+h;m++)n[m].edge_before=void 0}A+=u-1}}function Ebe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before\u0026\u0026(n.edge_before.face=void 0),n.edge_after\u0026\u0026(n.edge_after.face=void 0)}function Bbe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{ube.testInfiniteLoop(i)}catch{throw ud.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s);for(let a of n)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s)}}function KEt(t,e,n,o){for(let i of e){let r=i.first.bv;(n===1\u0026\u0026r===f7||n===3\u0026\u0026r===f7\u0026\u0026o||n===3\u0026\u0026r===I7\u0026\u0026!o||n===2\u0026\u0026r===I7)\u0026\u0026t.deleteFace(i)}}function VEt(t){const e=[];for(const n of t.edges)n.face\u0026\u0026t.faces.has(n.face)||e.push(n);for(const n of e)t.edges.delete(n)}var vAo=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:OEt,innerClip:HEt,intersect:LEt,outerClip:ybe,removeNotRelevantChains:xbe,removeOldFaces:Ebe,restoreFaces:Bbe,subtract:Cbe,unify:function(t,e){let[n]=KJ(t,e,1,!0);return n}}),wAo=RegExp(\"T.F..FFF.|T.F...F..\"),PAo=RegExp(\"T........|.T.......|...T.....|....T....\"),MAo=RegExp(\"FT.......|F..T.....|F...T....\"),DAo=RegExp(\"T.F..F...\"),NAo=RegExp(\"T.F..F...|.TF..F...|..FT.F...|..F.TF...\"),HL=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=\u003et instanceof Array\u0026\u0026t.length\u003e0?\"T\":t instanceof Array\u0026\u0026t.length===0?\"F\":\"*\").join(\"\")}equal(){return wAo.test(this.toString())}intersect(){return PAo.test(this.toString())}touch(){return MAo.test(this.toString())}inside(){return DAo.test(this.toString())}covered(){return NAo.test(this.toString())}};function VJ(t,e){let n,o=new Ke.Ray(e),i=new Ke.Line(o.pt,o.norm);const r=new Ke.Box(o.box.xmin-Ke.DP_TOL,o.box.ymin-Ke.DP_TOL,o.box.xmax+Ke.DP_TOL,o.box.ymax+Ke.DP_TOL);if(t.box.not_intersect(r))return Ke.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ke.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ke.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ke.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=\u003efEt(l.pt.x,u.pt.x)?-1:_Et(l.pt.x,u.pt.x)?1:l.face_index\u003cu.face_index?-1:l.face_index\u003eu.face_index?1:l.edge.arc_length\u003cu.edge.arc_length?-1:l.edge.arc_length\u003eu.edge.arc_length?1:0);let c=0;for(let l=0;l\u003cA.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;lbe(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;lbe(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.edge.shape instanceof Ke.Segment)c++;else{let g=u.edge.shape.box;iN(u.pt.y,g.ymin)||iN(u.pt.y,g.ymax)||c++}}return n=c%2==1?1:0,n}function zEt(t,e){return OL(t,e).intersect()}function JEt(t,e){return OL(t,e).inside()}function WEt(t,e){return OL(t,e).covered()}function jEt(t,e){return WEt(e,t)}function OL(t,e){return t instanceof Ke.Line\u0026\u0026e instanceof Ke.Line?(function(n,o){let i=new HL,r=DL(n,o);return r.length===0?n.contains(o.pt)\u0026\u0026o.contains(n.pt)?(i.I2I=[n],i.I2E=[],i.E2I=[]):(i.I2I=[],i.I2E=[n],i.E2I=[o]):(i.I2I=r,i.I2E=n.split(r),i.E2I=o.split(r)),i})(t,e):t instanceof Ke.Line\u0026\u0026e instanceof Ke.Circle?(function(n,o){let i=new HL,r=sN(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new aN([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ke.Polygon([o.toArc()]).cutWithLine(n)}return i})(t,e):t instanceof Ke.Line\u0026\u0026e instanceof Ke.Box?(function(n,o){let i=new HL,r=NL(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new aN([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();o.toSegments().some(c=\u003ec.contains(r[0])\u0026\u0026c.contains(r[1]))?(i.I2I=[],i.I2B=[A[1]],i.I2E=[A[0],A[2]],i.E2I=[o]):(i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ke.Polygon(o.toSegments()).cutWithLine(n))}return i})(t,e):t instanceof Ke.Line\u0026\u0026e instanceof Ke.Polygon?(function(n,o){let i=new HL,r=YJ(n,o),s=new aN([n]),a=r.length\u003e0?r.slice():n.sortPoints(r);return s.split(a),[...s].forEach(A=\u003eA.setInclusion(o)),i.I2I=[...s].filter(A=\u003eA.bv===Ke.INSIDE).map(A=\u003eA.shape),i.I2B=[...s].slice(1).map(A=\u003eA.bv===Ke.BOUNDARY?A.shape:A.shape.start),i.I2E=[...s].filter(A=\u003eA.bv===Ke.OUTSIDE).map(A=\u003eA.shape),i.E2I=o.cutWithLine(n),i})(t,e):(t instanceof Ke.Segment||t instanceof Ke.Arc)\u0026\u0026e instanceof Ke.Polygon?$Et(t,e):(t instanceof Ke.Segment||t instanceof Ke.Arc)\u0026\u0026(e instanceof Ke.Circle||e instanceof Ke.Box)?$Et(t,new Ke.Polygon(e)):t instanceof Ke.Polygon\u0026\u0026e instanceof Ke.Polygon?mAe(t,e):(t instanceof Ke.Circle||t instanceof Ke.Box)\u0026\u0026(e instanceof Ke.Circle||e instanceof Ke.Box)?mAe(new Ke.Polygon(t),new Ke.Polygon(e)):(t instanceof Ke.Circle||t instanceof Ke.Box)\u0026\u0026e instanceof Ke.Polygon?mAe(new Ke.Polygon(t),e):t instanceof Ke.Polygon\u0026\u0026(e instanceof Ke.Circle||e instanceof Ke.Box)?mAe(t,new Ke.Polygon(e)):void 0}function $Et(t,e){let n=new HL,o=(function(s,a){return s instanceof Ke.Line?YJ(s,a):s instanceof Ke.Segment?dbe(s,a):s instanceof Ke.Arc?hbe(s,a):[]})(t,e),i=o.length\u003e0?o.slice():t.sortPoints(o),r=new aN([t]);r.split(i),[...r].forEach(s=\u003es.setInclusion(e)),n.I2I=[...r].filter(s=\u003es.bv===Ke.INSIDE).map(s=\u003es.shape),n.I2B=[...r].slice(1).map(s=\u003es.bv===Ke.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=\u003es.bv===Ke.OUTSIDE).map(s=\u003es.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(VJ(e,s)){case Ke.INSIDE:n.B2I.push(s);break;case Ke.BOUNDARY:n.B2B.push(s);break;case Ke.OUTSIDE:n.B2E.push(s)}return n}function mAe(t,e){let n=new HL,[o,i]=OEt(t,e),r=LEt(t,e),s=Cbe(t,e),a=Cbe(e,t),[A,c]=HEt(t,e),l=ybe(t,e),u=ybe(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var RAo=Object.freeze({__proto__:null,contain:function(t,e){return JEt(e,t)},cover:jEt,covered:WEt,disjoint:function(t,e){return!zEt(t,e)},equal:function(t,e){return OL(t,e).equal()},inside:JEt,intersect:zEt,relate:OL,touch:function(t,e){return OL(t,e).touch()}}),zJ=class kk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new kk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new kk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new kk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!=\"number\"||typeof e[1]!=\"number\")throw ud.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new kk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new kk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new kk(e,0,0,n,0,0))}equalTo(e){return!!Ke.Utils.EQ(this.tx,e.tx)\u0026\u0026!!Ke.Utils.EQ(this.ty,e.ty)\u0026\u0026!!Ke.Utils.EQ(this.a,e.a)\u0026\u0026!!Ke.Utils.EQ(this.b,e.b)\u0026\u0026!!Ke.Utils.EQ(this.c,e.c)\u0026\u0026!!Ke.Utils.EQ(this.d,e.d)}};Ke.Matrix=zJ,Ke.matrix=(...t)=\u003enew Ke.Matrix(...t);var TAo=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low\u003ct.low||this.low===t.low\u0026\u0026this.high\u003ct.high}equal_to(t){return this.low===t.low\u0026\u0026this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high\u003ct.low||t.high\u003cthis.low}merge(t){const e=this.low===void 0?t.low:this.low\u003ct.low?this.low:t.low,n=this.high===void 0?t.high:this.high\u003et.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t\u003ce}},kAo=class d5n extends TAo{clone(){return new d5n(this.low,this.high)}},_v=class{constructor(t,e,n=null,o=null,i=null,r=0){if(this.left=n,this.right=o,this.parent=i,this.color=r,this.item={key:void 0,values:[]},e!==void 0\u0026\u0026this.item.values.push(e),t!==void 0)if(Array.isArray(t)){const[s,a]=t;if(!Number.isNaN(s)\u0026\u0026!Number.isNaN(a)){let A=s,c=a;A\u003ec\u0026\u0026([A,c]=[c,A]),this.item.key=new kAo(A,c)}}else this.item.key=t;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0\u0026\u0026this.item.values.length===0\u0026\u0026this.left===null\u0026\u0026this.right===null\u0026\u0026this.color===0}requireKey(){if(!this.item.key)throw new Error(\"Node key is undefined (nil/sentinel). Operation is not applicable.\");return this.item.key}less_than(t){const e=this.requireKey(),n=t.requireKey();return e.less_than(n)}_value_equal(t){const e=this.item.values[0],n=t.item.values[0];return e\u0026\u0026n\u0026\u0026e.equal_to?e.equal_to(n):e===n}equal_to(t){const e=this.requireKey(),n=t.requireKey();return e.equal_to(n)}intersect(t){const e=this.requireKey(),n=t.requireKey();return e.intersect(n)}copy_data(t){this.item.key=t.item.key,this.item.values=t.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right\u0026\u0026this.right.max\u0026\u0026(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left\u0026\u0026this.left.max\u0026\u0026(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(t){if(!this.left)return!0;const e=this.left.max?this.left.max.high:this.left.item.key.high,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(e,o.low)}not_intersect_right_subtree(t){if(!this.right)return!0;const e=this.right.max?this.right.max.low:this.right.item.key.low,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(o.high,e)}},bbe=class h5n{constructor(){this.root=null,this.nil_node=new _v}get size(){let e=0;return this.tree_walk(this.root,n=\u003ee+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=\u003ee.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=\u003e{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new _v(e));if(o)return o.item.values.push(n),o;const i=new _v(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new _v(e));return!!o\u0026\u0026(arguments.length\u003c2||n===e||o.item.values.some(i=\u003ei\u0026\u0026i.equal_to?i.equal_to(n):i===n))}remove(e,n=e){const o=this.tree_search(this.root,new _v(e));if(!o)return;if(arguments.length\u003c2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=\u003er\u0026\u0026r.equal_to?r.equal_to(n):r===n);return i\u003e=0?(o.item.values.splice(i,1),o.item.values.length===0\u0026\u0026this.tree_delete(o),o):void 0}search(e,n=(o,i)=\u003eo===i?i.output():o){const o=new _v(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new _v(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new h5n;return this.tree_walk(this.root,o=\u003e{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=\u003eo===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new _v(e)):this.root\u0026\u0026(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root\u0026\u0026n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right\u0026\u0026(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left\u0026\u0026(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e\u0026\u0026(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0\u0026\u0026this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root\u0026\u0026o.parent!=null\u0026\u0026o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1\u0026\u0026(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0\u0026\u0026n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0\u0026\u0026(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1\u0026\u0026(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0\u0026\u0026n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0\u0026\u0026(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null\u0026\u0026e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i\u0026\u0026i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:(o\u0026\u0026!i.less_than(o)||(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)\u0026\u0026o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null\u0026\u0026n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null\u0026\u0026n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null\u0026\u0026i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node\u0026\u0026(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node\u0026\u0026(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}tree_walk(e,n){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1\u0026\u0026(n.left.color===0\u0026\u0026n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===0\u0026\u0026n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,i=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==i)throw new Error(\"Red-black height property violated\");return n+=o,n}},FAo=class extends Set{constructor(t){super(t),this.index=new bbe,this.forEach(e=\u003ethis.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,i=n||t.box,r=o||t;return super.add(r),this.size\u003ee\u0026\u0026this.index.insert(i,r),this}delete(t){const{key:e,value:n}=t,o=e||t.box,i=n||t;let r=super.delete(i);return r\u0026\u0026this.index.remove(o,i),r}clear(){super.clear(),this.index=new bbe}search(t){return this.index.search(t)}hit(t){let e=new Ke.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(n=\u003et.on(n))}svg(){return[...this].reduce((t,e)=\u003et+e.svg(),\"\")}};Ke.PlanarSet=FAo;var fv=class{get name(){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new zJ().translate(...t))}rotate(t,e=new Ke.Point){return this.transform(new zJ().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new zJ().scale(t,e))}transform(...t){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}};Ke.Point=class p5n extends fv{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===2){let n=e[0];if(typeof n[0]==\"number\"\u0026\u0026typeof n[1]==\"number\")return this.x=n[0],void(this.y=n[1])}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"point\"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2\u0026\u0026typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\")return this.x=e[0],void(this.y=e[1]);throw ud.ILLEGAL_PARAMETERS}}get box(){return new Ke.Box(this.x,this.y,this.x,this.y)}clone(){return new Ke.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ke.Utils.EQ(this.x,e.x)\u0026\u0026Ke.Utils.EQ(this.y,e.y)}lessThan(e){return!!Ke.Utils.LT(this.y,e.y)||!(!Ke.Utils.EQ(this.y,e.y)||!Ke.Utils.LT(this.x,e.x))}transform(e){return new Ke.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ke.Vector(this,e.pt);if(Ke.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ke.Vector(e.pt,this);return Ke.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof p5n){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ke.Segment(this,e)]}return e instanceof Ke.Line?Ke.Distance.point2line(this,e):e instanceof Ke.Circle?Ke.Distance.point2circle(this,e):e instanceof Ke.Segment?Ke.Distance.point2segment(this,e):e instanceof Ke.Arc?Ke.Distance.point2arc(this,e):e instanceof Ke.Box?Ke.Distance.point2polygon(this,new Ke.Polygon(e)):e instanceof Ke.Polygon?Ke.Distance.point2polygon(this,e):e instanceof Ke.PlanarSet?Ke.Distance.shape2planarSet(this,e):e instanceof Ke.Multiline?Ke.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof Ke.Point)return this.equalTo(e);if(e.contains\u0026\u0026e.contains instanceof Function)return e.contains(this);throw Ke.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return\"point\"}svg(e={}){const n=e.r??3;return`\n\u003ccircle cx=\"${this.x}\" cy=\"${this.y}\" r=\"${n}\"\n ${rN({fill:\"red\",...e})} /\u003e`}};var LAo=(...t)=\u003enew Ke.Point(...t);Ke.point=LAo,Ke.Vector=class extends fv{constructor(...t){if(super(),this.x=0,this.y=0,t.length!==0){if(t.length===1\u0026\u0026t[0]instanceof Array\u0026\u0026t[0].length===2){let e=t[0];if(typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\")return this.x=e[0],void(this.y=e[1])}if(t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"vector\"){let{x:e,y:n}=t[0];return this.x=e,void(this.y=n)}if(t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"segment\"){let{start:e,end:n}=t[0];return this.x=n.x-e.x,void(this.y=n.y-e.y)}if(t.length===2){let e=t[0],n=t[1];if(typeof e==\"number\"\u0026\u0026typeof n==\"number\")return this.x=e,void(this.y=n);if(e instanceof Ke.Point\u0026\u0026n instanceof Ke.Point)return this.x=n.x-e.x,void(this.y=n.y-e.y)}throw ud.ILLEGAL_PARAMETERS}}clone(){return new Ke.Vector(this.x,this.y)}get slope(){let t=Math.atan2(this.y,this.x);return t\u003c0\u0026\u0026(t=2*Math.PI+t),t}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ke.Utils.EQ_0(this.length)}equalTo(t){return Ke.Utils.EQ(this.x,t.x)\u0026\u0026Ke.Utils.EQ(this.y,t.y)}multiply(t){return new Ke.Vector(t*this.x,t*this.y)}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}normalize(){if(this.isZeroLength())throw ud.ZERO_DIVISION;return new Ke.Vector(this.x/this.length,this.y/this.length)}rotate(t,e=new Ke.Point){if(e.x===0\u0026\u0026e.y===0)return this.transform(new zJ().rotate(t));throw ud.OPERATION_IS_NOT_SUPPORTED}transform(t){return new Ke.Vector(t.transform([this.x,this.y]))}rotate90CCW(){return new Ke.Vector(-this.y,this.x)}rotate90CW(){return new Ke.Vector(this.y,-this.x)}invert(){return new Ke.Vector(-this.x,-this.y)}add(t){return new Ke.Vector(this.x+t.x,this.y+t.y)}subtract(t){return new Ke.Vector(this.x-t.x,this.y-t.y)}angleTo(t){let e=this.normalize(),n=t.normalize(),o=Math.atan2(e.cross(n),e.dot(n));return o\u003c0\u0026\u0026(o+=2*Math.PI),o}projectionOn(t){let e=t.normalize(),n=this.dot(e);return e.multiply(n)}get name(){return\"vector\"}};var qEt=(...t)=\u003enew Ke.Vector(...t);Ke.vector=qEt,Ke.Segment=class fit extends fv{constructor(...e){if(super(),this.ps=new Ke.Point,this.pe=new Ke.Point,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===4){let n=e[0];return this.ps=new Ke.Point(n[0],n[1]),void(this.pe=new Ke.Point(n[2],n[3]))}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"segment\"){let{ps:n,pe:o}=e[0];return this.ps=new Ke.Point(n.x,n.y),void(this.pe=new Ke.Point(o.x,o.y))}if(!(e.length===1\u0026\u0026e[0]instanceof Ke.Point)){if(e.length===2\u0026\u0026e[0]instanceof Ke.Point\u0026\u0026e[1]instanceof Ke.Point)return this.ps=e[0].clone(),void(this.pe=e[1].clone());if(e.length===4)return this.ps=new Ke.Point(e[0],e[1]),void(this.pe=new Ke.Point(e[2],e[3]));throw ud.ILLEGAL_PARAMETERS}this.ps=e[0].clone()}}clone(){return new Ke.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ke.Vector(this.start,this.end).slope}get box(){return new Ke.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)\u0026\u0026this.pe.equalTo(e.pe)}contains(e){return Ke.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Line?GJ(this,e):e instanceof Ke.Ray?pbe(e,this):e instanceof Ke.Segment?hAe(this,e):e instanceof Ke.Circle?pAe(this,e):e instanceof Ke.Box?(function(n,o){let i=[];for(let r of o.toSegments()){let s=hAe(r,n);for(let a of s)i.push(a)}return i})(this,e):e instanceof Ke.Arc?RL(this,e):e instanceof Ke.Polygon?dbe(this,e):e instanceof Ke.Multiline?TL(this,e):void 0}distanceTo(e){if(e instanceof Ke.Point){let[n,o]=Ke.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Circle){let[n,o]=Ke.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ke.Line){let[n,o]=Ke.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ke.Segment){let[n,o]=Ke.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ke.Arc){let[n,o]=Ke.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ke.Box){let[n,o]=Ke.Distance.shape2polygon(this,new Ke.Polygon(e));return[n,o]}if(e instanceof Ke.Polygon){let[n,o]=Ke.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ke.PlanarSet){let[n,o]=Ke.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ke.Multiline)return Ke.Distance.shape2multiline(this,e)}tangentInStart(){return new Ke.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ke.Vector(this.end,this.start).normalize()}reverse(){return new fit(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ke.Segment(this.start,e),new Ke.Segment(e,this.end)]}middle(){return new Ke.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e\u003ethis.length||e\u003c0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ke.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ke.Distance.point2segment(e,this);return n}definiteIntegral(e=0){return(this.end.x-this.start.x)*(this.start.y-e+(this.end.y-e))/2}transform(e=new Ke.Matrix){return new fit(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ke.Line(this.start,this.end).sortPoints(e)}get name(){return\"segment\"}svg(e={}){return`\n\u003cline x1=\"${this.start.x}\" y1=\"${this.start.y}\" x2=\"${this.end.x}\" y2=\"${this.end.y}\" ${rN(e)} /\u003e`}};var HAo=(...t)=\u003enew Ke.Segment(...t);Ke.segment=HAo;var{vector:JJ}=Ke;Ke.Line=class m5n extends fv{constructor(...e){if(super(),this.pt=new Ke.Point,this.norm=new Ke.Vector(0,1),e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"line\"){let{pt:n,norm:o}=e[0];return this.pt=new Ke.Point(n),void(this.norm=new Ke.Vector(o))}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ke.Point\u0026\u0026o instanceof Ke.Point)return this.pt=n,this.norm=m5n.points2norm(n,o),void(this.norm.dot(JJ(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert());if(n instanceof Ke.Point\u0026\u0026o instanceof Ke.Vector){if(Ke.Utils.EQ_0(o.x)\u0026\u0026Ke.Utils.EQ_0(o.y))throw ud.ILLEGAL_PARAMETERS;return this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(JJ(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert())}if(n instanceof Ke.Vector\u0026\u0026o instanceof Ke.Point){if(Ke.Utils.EQ_0(n.x)\u0026\u0026Ke.Utils.EQ_0(n.y))throw ud.ILLEGAL_PARAMETERS;return this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(JJ(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert())}}throw ud.ILLEGAL_PARAMETERS}}clone(){return new Ke.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ke.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ke.Vector(this.norm.y,-this.norm.x).slope}get standard(){return[this.norm.x,this.norm.y,this.norm.dot(JJ(this.pt.x,this.pt.y))]}parallelTo(e){return Ke.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)\u0026\u0026this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ke.Vector(this.pt,e);return Ke.Utils.EQ_0(this.norm.dot(n))}coord(e){return JJ(e.x,e.y).cross(this.norm)}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Line?DL(this,e):e instanceof Ke.Ray?DEt(e,this):e instanceof Ke.Circle?sN(this,e):e instanceof Ke.Box?NL(this,e):e instanceof Ke.Segment?GJ(e,this):e instanceof Ke.Arc?dAe(this,e):e instanceof Ke.Polygon?YJ(this,e):e instanceof Ke.Multiline?TL(this,e):void 0}distanceTo(e){if(e instanceof Ke.Point){let[n,o]=Ke.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Circle){let[n,o]=Ke.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Segment){let[n,o]=Ke.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ke.Arc){let[n,o]=Ke.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ke.Box){let[n,o]=Ke.Distance.shape2polygon(this,new Ke.Polygon(e));return[n,o]}if(e instanceof Ke.Polygon){let[n,o]=Ke.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ke.Point)return[new Ke.Ray(e,this.norm),new Ke.Ray(e,this.norm)];{let n=new Ke.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ke.Point){return new Ke.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ke.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=\u003ethis.coord(n)\u003cthis.coord(o)?-1:this.coord(n)\u003ethis.coord(o)?1:0)}get name(){return\"line\"}svg(e,n={}){let o=NL(this,e);if(o.length===0)return\"\";let i=o[0],r=o.length===2?o[1]:o.find(s=\u003e!s.equalTo(i));return r===void 0\u0026\u0026(r=i),new Ke.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw ud.ILLEGAL_PARAMETERS;return new Ke.Vector(e,n).normalize().rotate90CCW()}};var OAo=(...t)=\u003enew Ke.Line(...t);Ke.line=OAo,Ke.Circle=class extends fv{constructor(...t){if(super(),this.pc=new Ke.Point,this.r=1,t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"circle\"){let{pc:e,r:n}=t[0];this.pc=new Ke.Point(e),this.r=n}else{let[e,n]=[...t];e\u0026\u0026e instanceof Ke.Point\u0026\u0026(this.pc=e.clone()),n!==void 0\u0026\u0026(this.r=n)}}clone(){return new Ke.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ke.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(t){return t instanceof Ke.Point?Ke.Utils.LE(t.distanceTo(this.center)[0],this.r):t instanceof Ke.Segment?Ke.Utils.LE(t.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ke.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ke.Arc?this.intersect(t).length===0\u0026\u0026Ke.Utils.LE(t.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ke.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ke.Circle?this.intersect(t).length===0\u0026\u0026Ke.Utils.LE(t.r,this.r)\u0026\u0026Ke.Utils.LE(t.center.distanceTo(this.center)[0],this.r):void 0}toArc(t=!0){return new Ke.Arc(this.center,this.r,Math.PI,-Math.PI,t)}scale(t,e){if(t!==e||this.pc.x!==0||this.pc.y!==0)throw ud.OPERATION_IS_NOT_SUPPORTED;return new Ke.Circle(this.pc,this.r*t)}transform(t=new Ke.Matrix){return new Ke.Circle(this.pc.transform(t),this.r)}intersect(t){return t instanceof Ke.Point?this.contains(t)?[t]:[]:t instanceof Ke.Line?sN(t,this):t instanceof Ke.Ray?MEt(t,this):t instanceof Ke.Segment?pAe(t,this):t instanceof Ke.Circle?xEt(t,this):t instanceof Ke.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=pAe(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ke.Arc?gbe(t,this):t instanceof Ke.Polygon?QEt(this,t):t instanceof Ke.Multiline?TL(this,t):void 0}distanceTo(t){if(t instanceof Ke.Point){let[e,n]=Ke.Distance.point2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Circle){let[e,n]=Ke.Distance.circle2circle(this,t);return[e,n]}if(t instanceof Ke.Line){let[e,n]=Ke.Distance.circle2line(this,t);return[e,n]}if(t instanceof Ke.Segment){let[e,n]=Ke.Distance.segment2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Arc){let[e,n]=Ke.Distance.arc2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Box){let[e,n]=Ke.Distance.shape2polygon(this,new Ke.Polygon(t));return[e,n]}if(t instanceof Ke.Polygon){let[e,n]=Ke.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ke.PlanarSet){let[e,n]=Ke.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ke.Multiline){let[e,n]=Ke.Distance.shape2multiline(this,t);return[e,n]}}get name(){return\"circle\"}svg(t={}){return`\n\u003ccircle cx=\"${this.pc.x}\" cy=\"${this.pc.y}\" r=\"${this.r}\"\n ${rN({fill:\"none\",...t})} /\u003e`}},Ke.circle=(...t)=\u003enew Ke.Circle(...t),Ke.Arc=class extends fv{constructor(...t){if(super(),this.pc=new Ke.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,t.length!==0)if(t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"arc\"){let{pc:e,r:n,startAngle:o,endAngle:i,counterClockwise:r}=t[0];this.pc=new Ke.Point(e.x,e.y),this.r=n,this.startAngle=o,this.endAngle=i,this.counterClockwise=r}else{let[e,n,o,i,r]=[...t];e\u0026\u0026e instanceof Ke.Point\u0026\u0026(this.pc=e.clone()),n!==void 0\u0026\u0026(this.r=n),o!==void 0\u0026\u0026(this.startAngle=o),i!==void 0\u0026\u0026(this.endAngle=i),r!==void 0\u0026\u0026(this.counterClockwise=r)}}clone(){return new Ke.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let t=this.startAngle,e=this.endAngle;if(Ke.Utils.EQ(Math.abs(t-e),Ke.PIx2))return Ke.PIx2;Math.abs(t)\u003eKe.PIx2\u0026\u0026(t-=Math.trunc(t/Ke.PIx2)*Ke.PIx2),t\u003c0\u0026\u0026(t+=Ke.PIx2),Math.abs(e)\u003eKe.PIx2\u0026\u0026(e-=Math.trunc(e/Ke.PIx2)*Ke.PIx2),e\u003c0\u0026\u0026(e+=Ke.PIx2);let n=this.counterClockwise?e-t:t-e;return n\u003c0\u0026\u0026(n+=Ke.PIx2),n}get start(){return new Ke.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ke.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let t=this.breakToFunctional().reduce((e,n)=\u003ee.merge(n.start.box),new Ke.Box);return t=t.merge(this.end.box),t}contains(t){if(!Ke.Utils.EQ(this.pc.distanceTo(t)[0],this.r))return!1;if(t.equalTo(this.start))return!0;let e=new Ke.Vector(this.pc,t).slope,n=new Ke.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise);return Ke.Utils.LE(n.length,this.length)}split(t){if(this.start.equalTo(t))return[null,this.clone()];if(this.end.equalTo(t))return[this.clone(),null];let e=new Ke.Vector(this.pc,t).slope;return[new Ke.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise),new Ke.Arc(this.pc,this.r,e,this.endAngle,this.counterClockwise)]}middle(){let t=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ke.Arc(this.pc,this.r,this.startAngle,t,this.counterClockwise).end}pointAtLength(t){if(t\u003ethis.length||t\u003c0)return null;if(t===0)return this.start;if(t===this.length)return this.end;let e=t/this.length,n=this.counterClockwise?this.startAngle+this.sweep*e:this.startAngle-this.sweep*e;return new Ke.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(t){return t instanceof Ke.Point?this.contains(t)?[t]:[]:t instanceof Ke.Line?dAe(t,this):t instanceof Ke.Ray?mbe(t,this):t instanceof Ke.Circle?gbe(this,t):t instanceof Ke.Segment?RL(t,this):t instanceof Ke.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=RL(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ke.Arc?EEt(this,t):t instanceof Ke.Polygon?hbe(this,t):t instanceof Ke.Multiline?TL(this,t):void 0}distanceTo(t){if(t instanceof Ke.Point){let[e,n]=Ke.Distance.point2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Circle){let[e,n]=Ke.Distance.arc2circle(this,t);return[e,n]}if(t instanceof Ke.Line){let[e,n]=Ke.Distance.arc2line(this,t);return[e,n]}if(t instanceof Ke.Segment){let[e,n]=Ke.Distance.segment2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Arc){let[e,n]=Ke.Distance.arc2arc(this,t);return[e,n]}if(t instanceof Ke.Box){let[e,n]=Ke.Distance.shape2polygon(this,new Ke.Polygon(t));return[e,n]}if(t instanceof Ke.Polygon){let[e,n]=Ke.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ke.PlanarSet){let[e,n]=Ke.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ke.Multiline)return Ke.Distance.shape2multiline(this,t)}breakToFunctional(){let t=[],e=[0,Math.PI/2,Math.PI,3*Math.PI/2],n=this.startAngle,o=this.endAngle;Ke.Utils.EQ(Math.abs(n-o),Ke.PIx2)\u0026\u0026(o=n),Math.abs(n)\u003eKe.PIx2\u0026\u0026(n-=Math.trunc(n/Ke.PIx2)*Ke.PIx2),n\u003c0\u0026\u0026(n+=Ke.PIx2),Math.abs(o)\u003eKe.PIx2\u0026\u0026(o-=Math.trunc(o/Ke.PIx2)*Ke.PIx2),o\u003c0\u0026\u0026(o+=Ke.PIx2);let i,r,s,a=n;this.counterClockwise?(r=Math.ceil(n/(Math.PI/2))%4,s=1):(r=Math.floor(n/(Math.PI/2))%4,s=-1);for(let A=0,c=r;A\u003c4;A++,c=(c+s+4)%4){if(i=e[c],i===a)continue;let l=this.counterClockwise?i-n:n-i;if(l\u003c0\u0026\u0026(l+=Ke.PIx2),l\u003ethis.sweep)break;t.push(new Ke.Arc(this.pc,this.r,a,i,this.counterClockwise)),a=i}return t.length===0?(t.push(this),t):(i=o,a!==i\u0026\u0026t.push(new Ke.Arc(this.pc,this.r,a,i,this.counterClockwise)),t)}tangentInStart(){let t=new Ke.Vector(this.pc,this.start),e=this.counterClockwise?Math.PI/2:-Math.PI/2;return t.rotate(e).normalize()}tangentInEnd(){let t=new Ke.Vector(this.pc,this.end),e=this.counterClockwise?-Math.PI/2:Math.PI/2;return t.rotate(e).normalize()}reverse(){return new Ke.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(t=new Ke.Matrix){let e=this.start.transform(t),n=this.end.transform(t),o=this.pc.transform(t),i=this.counterClockwise;return t.a*t.d\u003c0\u0026\u0026(i=!i),Ke.Arc.arcSE(o,e,n,i)}static arcSE(t,e,n,o){let{vector:i}=Ke,r=i(t,e).slope,s=i(t,n).slope;Ke.Utils.EQ(r,s)\u0026\u0026(s+=2*Math.PI,o=!0);let a=i(t,e).length;return new Ke.Arc(t,a,r,s,o)}definiteIntegral(t=0){return this.breakToFunctional().reduce((e,n)=\u003ee+n.circularSegmentDefiniteIntegral(t),0)}circularSegmentDefiniteIntegral(t){let e=new Ke.Segment(this.start,this.end).definiteIntegral(t),n=Ke.Utils.EQ(this.sweep,Ke.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?e-n:e+n}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(t){let{vector:e}=Ke;return t.slice().sort((n,o)=\u003e{let i=e(this.pc,n).slope,r=e(this.pc,o).slope;return i\u003cr?-1:i\u003er?1:0})}get name(){return\"arc\"}svg(t={}){let e=this.sweep\u003c=Math.PI?\"0\":\"1\",n=this.counterClockwise?\"1\":\"0\";return Ke.Utils.EQ(this.sweep,2*Math.PI)?new Ke.Circle(this.pc,this.r).svg(t):`\n\u003cpath d=\"M${this.start.x},${this.start.y}\n A${this.r},${this.r} 0 ${e},${n} ${this.end.x},${this.end.y}\"\n ${rN({fill:\"none\",...t})} /\u003e`}},Ke.arc=(...t)=\u003enew Ke.Arc(...t),Ke.Box=class qte extends fv{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new qte(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ke.Point(this.xmin,this.ymin)}get high(){return new Ke.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ke.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax\u003ce.xmin||this.xmin\u003ee.xmax||this.ymax\u003ce.ymin||this.ymin\u003ee.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new qte(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!this.low.lessThan(e.low)||!(!this.low.equalTo(e.low)||!this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)\u0026\u0026this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e\u003c=0?this.clone():new qte(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ke.Point(this.xmin,this.ymin),new Ke.Point(this.xmax,this.ymin),new Ke.Point(this.xmax,this.ymax),new Ke.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ke.Segment(e[0],e[1]),new Ke.Segment(e[1],e[2]),new Ke.Segment(e[2],e[3]),new Ke.Segment(e[3],e[0])]}rotate(e,n=new Ke.Point){throw ud.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ke.Matrix){return this.toPoints().map(n=\u003en.transform(e)).reduce((n,o)=\u003en.merge(o.box),new qte)}contains(e){return e instanceof Ke.Point?e.x\u003e=this.xmin\u0026\u0026e.x\u003c=this.xmax\u0026\u0026e.y\u003e=this.ymin\u0026\u0026e.y\u003c=this.ymax:e instanceof Ke.Segment?e.vertices.every(n=\u003ethis.contains(n)):e instanceof Ke.Box?e.toSegments().every(n=\u003ethis.contains(n)):e instanceof Ke.Circle?this.contains(e.box):e instanceof Ke.Arc?e.vertices.every(n=\u003ethis.contains(n))\u0026\u0026this.toSegments().every(n=\u003eRL(n,e).length===0):!(e instanceof Ke.Line||e instanceof Ke.Ray)\u0026\u0026(e instanceof Ke.Multiline?e.toShapes().every(n=\u003ethis.contains(n)):e instanceof Ke.Polygon?this.contains(e.box):void 0)}distanceTo(e){const n=this.toSegments().map(i=\u003ei.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=\u003e{i[0]\u003co[0]\u0026\u0026(o=i)}),o}get name(){return\"box\"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`\n\u003crect x=\"${this.xmin}\" y=\"${this.ymin}\" width=\"${n}\" height=\"${o}\"\n ${rN({fill:\"none\",...e})} /\u003e`}},Ke.box=(...t)=\u003enew Ke.Box(...t),Ke.Edge=class{constructor(t){this.shape=t,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ke.Segment}get isArc(){return this.shape instanceof Ke.Arc}get isLine(){return this.shape instanceof Ke.Line}get isRay(){return this.shape instanceof Ke.Ray}middle(){return this.shape.middle()}pointAtLength(t){return this.shape.pointAtLength(t)}contains(t){return this.shape.contains(t)}setInclusion(t){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ke.Line||this.shape instanceof Ke.Ray)return this.bv=Ke.OUTSIDE,this.bv;if(this.bvStart===void 0\u0026\u0026(this.bvStart=VJ(t,this.start)),this.bvEnd===void 0\u0026\u0026(this.bvEnd=VJ(t,this.end)),this.bvStart===Ke.OUTSIDE||this.bvEnd==Ke.OUTSIDE)this.bv=Ke.OUTSIDE;else if(this.bvStart===Ke.INSIDE||this.bvEnd==Ke.INSIDE)this.bv=Ke.INSIDE;else{let e=VJ(t,this.middle());this.bv=e}return this.bv}setOverlap(t){let e,n=this.shape,o=t.shape;n instanceof Ke.Segment\u0026\u0026o instanceof Ke.Segment?n.start.equalTo(o.start)\u0026\u0026n.end.equalTo(o.end)?e=Ke.OVERLAP_SAME:n.start.equalTo(o.end)\u0026\u0026n.end.equalTo(o.start)\u0026\u0026(e=Ke.OVERLAP_OPPOSITE):(n instanceof Ke.Arc\u0026\u0026o instanceof Ke.Arc||n instanceof Ke.Segment\u0026\u0026o instanceof Ke.Arc||n instanceof Ke.Arc\u0026\u0026o instanceof Ke.Segment)\u0026\u0026(n.start.equalTo(o.start)\u0026\u0026n.end.equalTo(o.end)\u0026\u0026n.middle().equalTo(o.middle())?e=Ke.OVERLAP_SAME:n.start.equalTo(o.end)\u0026\u0026n.end.equalTo(o.start)\u0026\u0026n.middle().equalTo(o.middle())\u0026\u0026(e=Ke.OVERLAP_OPPOSITE)),this.overlap===void 0\u0026\u0026(this.overlap=e),t.overlap===void 0\u0026\u0026(t.overlap=e)}svg(){if(this.shape instanceof Ke.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ke.Arc){let t,e=this.shape,n=e.counterClockwise?\"1\":\"0\";if(Ke.Utils.EQ(e.sweep,2*Math.PI)){let o=e.counterClockwise?1:-1,i=new Ke.Arc(e.pc,e.r,e.startAngle,e.startAngle+o*Math.PI,e.counterClockwise),r=new Ke.Arc(e.pc,e.r,e.startAngle+o*Math.PI,e.endAngle,e.counterClockwise);return t=\"0\",` A${i.r},${i.r} 0 ${t},${n} ${i.end.x},${i.end.y}\n A${r.r},${r.r} 0 ${t},${n} ${r.end.x},${r.end.y}`}return t=e.sweep\u003c=Math.PI?\"0\":\"1\",` A${e.r},${e.r} 0 ${t},${n} ${e.end.x},${e.end.y}`}}toJSON(){return this.shape.toJSON()}};var GAo=class extends ube{constructor(t,e){super(t,e),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let t;return{next:()=\u003e{let e=t||this.first,n=!this.first||!!t\u0026\u0026t===this.first;return t=e?e.next:void 0,{value:e,done:n}}}}append(t){return super.append(t),this.setCircularLinks(),this}insert(t,e){return super.insert(t,e),this.setCircularLinks(),this}remove(t){return super.remove(t),this}};Ke.Face=class Xte extends GAo{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=\u003ei instanceof Ke.Point)){let i=Xte.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=\u003ei instanceof Array\u0026\u0026i.length===2)){let i=o.map(s=\u003enew Ke.Point(s[0],s[1])),r=Xte.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=\u003ei instanceof Ke.Segment||i instanceof Ke.Arc))this.shapes2face(e.edges,o);else if(o.every(i=\u003ei.name===\"segment\"||i.name===\"arc\")){let i=[];for(let r of o){let s;s=r.name===\"segment\"?new Ke.Segment(r):new Ke.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof Xte){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ke.Circle)this.shapes2face(e.edges,[n[0].toArc(hEt)]);else if(n[0]instanceof Ke.Box){let o=n[0];this.shapes2face(e.edges,[new Ke.Segment(new Ke.Point(o.xmin,o.ymin),new Ke.Point(o.xmax,o.ymin)),new Ke.Segment(new Ke.Point(o.xmax,o.ymin),new Ke.Point(o.xmax,o.ymax)),new Ke.Segment(new Ke.Point(o.xmax,o.ymax),new Ke.Point(o.xmin,o.ymax)),new Ke.Segment(new Ke.Point(o.xmin,o.ymax),new Ke.Point(o.xmin,o.ymin))])}}n.length===2\u0026\u0026n[0]instanceof Ke.Edge\u0026\u0026n[1]instanceof Ke.Edge\u0026\u0026(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=\u003ee.shape.start.clone())}get shapes(){return this.edges.map(e=\u003ee.shape.clone())}get box(){if(this._box===void 0){let e=new Ke.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e\u003ethis.perimeter||e\u003c0)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o\u003ce.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ke.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ke.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0\u0026\u0026(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ke.Utils.EQ_0(e)?this._orientation=OJ.NOT_ORIENTABLE:Ke.Utils.LT(e,0)?this._orientation=OJ.CCW:this._orientation=OJ.CW}return this._orientation}isSimple(e){return Xte.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ke.Segment\u0026\u0026a.shape instanceof Ke.Segment\u0026\u0026(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if((!c.equalTo(r.start)||!c.equalTo(a.end)||a!==r.prev)\u0026\u0026(!c.equalTo(r.end)||!c.equalTo(a.start)||a!==r.next)\u0026\u0026(i.push(c),o))break;if(i.length\u003e0\u0026\u0026o)break}if(i.length\u003e0\u0026\u0026o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)\u0026\u0026(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ke.Polygon(this.shapes)}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=\" z\",e}},Ke.Ray=class _5n extends fv{constructor(...e){if(super(),this.pt=new Ke.Point,this.norm=new Ke.Vector(0,1),e.length!==0\u0026\u0026(e.length\u003e=1\u0026\u0026e[0]instanceof Ke.Point\u0026\u0026(this.pt=e[0].clone()),e.length!==1)){if(!(e.length===2\u0026\u0026e[1]instanceof Ke.Vector))throw ud.ILLEGAL_PARAMETERS;this.norm=e[1].clone()}}clone(){return new _5n(this.pt,this.norm)}get slope(){return new Ke.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ke.Box(e\u003eMath.PI/2\u0026\u0026e\u003c3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e\u003e=0\u0026\u0026e\u003c=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e\u003e=Math.PI/2\u0026\u0026e\u003c=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e\u003e=Math.PI\u0026\u0026e\u003c=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ke.Vector(this.pt,e);return Ke.Utils.EQ_0(this.norm.dot(n))\u0026\u0026Ke.Utils.GE(n.cross(this.norm),0)}coord(e){return qEt(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ke.Segment(this.pt,e),new Ke.Ray(e,this.norm)]:[]}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Segment?pbe(this,e):e instanceof Ke.Arc?mbe(this,e):e instanceof Ke.Line?DEt(this,e):e instanceof Ke.Ray?(o=e,DL(pv(n=this),pv(o)).filter(s=\u003en.contains(s)).filter(s=\u003eo.contains(s))):e instanceof Ke.Circle?MEt(this,e):e instanceof Ke.Box?(r=e,NL(pv(i=this),r).filter(s=\u003ei.contains(s))):e instanceof Ke.Polygon?NEt(this,e):e instanceof Ke.Multiline?TL(this,e):void 0;var n,o,i,r}rotate(e,n=new Ke.Point){return new Ke.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ke.Ray(this.pt.transform(e),this.norm.clone())}get name(){return\"ray\"}svg(e,n={}){let o=NL(new Ke.Line(this.pt,this.norm),e);return o=o.filter(i=\u003ethis.contains(i)),o.length===0||o.length===2?\"\":new Ke.Segment(this.pt,o[0]).svg(n)}},Ke.ray=(...t)=\u003enew Ke.Ray(...t);var YAo=class UM{constructor(){this.faces=new Ke.PlanarSet,this.edges=new Ke.PlanarSet;let e=[...arguments];if(e.length===1\u0026\u0026(e[0]instanceof Array\u0026\u0026e[0].length\u003e0||e[0]instanceof Ke.Circle||e[0]instanceof Ke.Box)){let n=e[0];if(e[0]instanceof Array\u0026\u0026e[0].every(o=\u003eo instanceof Array))if(n.every(o=\u003eo instanceof Array\u0026\u0026o.length===2\u0026\u0026typeof o[0]==\"number\"\u0026\u0026typeof o[1]==\"number\"))this.faces.add(new Ke.Face(this,n));else for(let o of n)if(o instanceof Array\u0026\u0026o[0]instanceof Array\u0026\u0026o[0].every(i=\u003ei instanceof Array\u0026\u0026i.length===2\u0026\u0026typeof i[0]==\"number\"\u0026\u0026typeof i[1]==\"number\"))for(let i of o)this.faces.add(new Ke.Face(this,i));else this.faces.add(new Ke.Face(this,o));else this.faces.add(new Ke.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=\u003ee.merge(n.box),new Ke.Box)}get vertices(){return[...this.faces].flatMap(e=\u003ee.vertices)}clone(){let e=new UM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new UM;return e.forEach(o=\u003e[...o.faces].forEach(i=\u003en.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=\u003en+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ke.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next!==n){for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}else this.deleteFace(e)}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ke.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e\u0026\u0026(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const n=this.splitToIslands().flatMap(o=\u003eo._cutSingleIsland(e)).filter(o=\u003eo.isValid()\u0026\u0026o.isEmpty()===!1);return this.createFromArray(n)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i,r,s={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=vEt(a,A);for(let l of c)kL(a,l,s.int_points1),kL(A,l,s.int_points2)}if(s.int_points1.length===0)return n;s.int_points1_sorted=mv(s.int_points1),s.int_points2_sorted=mv(s.int_points2),LL(o,s.int_points1_sorted),LL(n,s.int_points2_sorted),_be(s),s.int_points1_sorted=mv(s.int_points1),s.int_points2_sorted=mv(s.int_points2),fbe(s.int_points1),Ibe(s.int_points1,n);for(let a of s.int_points1_sorted)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.bv===a.edge_after.bv\u0026\u0026(s.int_points2[a.id]=-1,a.id=-1);if(s.int_points1=s.int_points1.filter(a=\u003ea.id\u003e=0),s.int_points2=s.int_points2.filter(a=\u003ea.id\u003e=0),s.int_points1.forEach((a,A)=\u003e{a.id=A}),s.int_points2.forEach((a,A)=\u003e{a.id=A}),s.int_points1.length===0)return n;s.int_points1_sorted=mv(s.int_points1),s.int_points2_sorted=mv(s.int_points2);for(let a=1;a\u003cs.int_points1_sorted.length;a++)if(r=s.int_points1_sorted[a],i=s.int_points1_sorted[a-1],r.edge_before\u0026\u0026r.edge_before.bv===1){let A=i.edge_after,c=r.edge_before,l=o.getChain(A,c);TEt(s.int_points2[i.id],s.int_points2[r.id],l),l.forEach(u=\u003en.edges.add(u)),l=l.reverse().map(u=\u003enew Ke.Edge(u.shape.reverse()));for(let u=0;u\u003cl.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];TEt(s.int_points2[r.id],s.int_points2[i.id],l),l.forEach(u=\u003en.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new aN([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=\u003er.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=\u003e[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=\u003es.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size\u003c=1)return this.clone();const e=this.splitToIslands(),n=new UM;return e.forEach(o=\u003e{o.faces.forEach(i=\u003en.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?OJ.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=\u003e{this.isOuter(n)\u0026\u0026e++}),e\u003e1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ke.Point){let n=VJ(this,e);return n===1||n===2}return jEt(this,e)}distanceTo(e){if(e instanceof Ke.Point){let[n,o]=Ke.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Circle||e instanceof Ke.Line||e instanceof Ke.Segment||e instanceof Ke.Arc){let[n,o]=Ke.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Box)return this.distanceTo(new Ke.Polygon(e));if(e instanceof Ke.Polygon){let n,o,i=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let r of this.edges){let s=i[0];[n,o]=Ke.Distance.shape2planarSet(r.shape,e.edges,s),Ke.Utils.LT(n,s)\u0026\u0026(i=[n,o])}return i}}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Line?YJ(e,this):e instanceof Ke.Ray?NEt(e,this):e instanceof Ke.Circle?QEt(e,this):e instanceof Ke.Segment?dbe(e,this):e instanceof Ke.Arc?hbe(e,this):e instanceof Ke.Polygon?(function(n,o){let i=[];if(n.isEmpty()||o.isEmpty()||n.box.not_intersect(o.box))return i;for(let r of n.edges)i=[...i,...wEt(r,o)];return i})(e,this):e instanceof Ke.Multiline?(function(n,o){let i=[];if(o.isEmpty()||n.size===0)return i;for(let r of n)i=[...i,...wEt(r,o)];return i})(e,this):void 0}translate(e){let n=new UM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.translate(e)));return n}rotate(e=0,n=new Ke.Point){let o=new UM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.rotate(e,n)));return o}scale(e,n){let o=new UM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.scale(e,n)));return o}transform(e=new Ke.Matrix){let n=new UM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.transform(e)));return n}toJSON(){return[...this.faces].map(e=\u003ee.toJSON())}toArray(){return[...this.faces].map(e=\u003ee.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=\u003ee+n.svg(),\"\")}svg(e={}){let n=`\n\u003cpath ${rN({fillRule:\"evenodd\",fill:\"lightcyan\",...e})} d=\"`;for(let o of this.faces)n+=`\n${o.svg()}`;return n+=`\" \u003e\n\u003c/path\u003e`,n}};Ke.Polygon=YAo,Ke.polygon=(...t)=\u003enew Ke.Polygon(...t);var{Circle:Sbe,Line:XEt,Point:ZEt,Vector:_Ae,Utils:Qbe}=Ke;Ke.Inversion=class Jye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new _Ae(e.pc,n),i=e.r*e.r,r=o.dot(o);return Qbe.EQ_0(r)?new ZEt(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(Qbe.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new _Ae(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new XEt(s,r)}{let i=new _Ae(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new Sbe(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(Qbe.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new _Ae(e.pc,i.end);return s=s.multiply(r/o),new Sbe(e.pc.translate(s),r)}}inverse(e){return e instanceof ZEt?Jye.inversePoint(this.circle,e):e instanceof Sbe?Jye.inverseCircle(this.circle,e):e instanceof XEt?Jye.inverseLine(this.circle,e):void 0}},Ke.inversion=t=\u003enew Ke.Inversion(t),Ke.Distance=class kr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ke.Vector(e,o).length,new Ke.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ke.Utils.EQ_0(o))return[n.r,new Ke.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ke.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ke.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return kr.point2point(e,n.start);let o,i,r=new Ke.Vector(n.start,n.end),s=new Ke.Vector(n.start,e),a=new Ke.Vector(n.end,e),A=r.dot(s),c=-r.dot(a);if(Ke.Utils.GE(A,0)\u0026\u0026Ke.Utils.GE(c,0)){let l=n.tangentInStart();return o=Math.abs(l.cross(s)),i=n.start.translate(l.multiply(l.dot(s))),[o,new Ke.Segment(e,i)]}return A\u003c0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o,i,r=new Ke.Circle(n.pc,n.r),s=[];return[o,i]=kr.point2circle(e,r),i.end.on(n)\u0026\u0026s.push(kr.point2circle(e,r)),s.push(kr.point2point(e,n.start)),s.push(kr.point2point(e,n.end)),kr.sort(s),s[0]}static point2edge(e,n){return n.shape instanceof Ke.Segment?kr.point2segment(e,n.shape):kr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let i=[];return i.push(kr.point2line(e.start,n)),i.push(kr.point2line(e.end,n)),kr.sort(i),i[0]}static segment2segment(e,n){let o=hAe(e,n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let i,r,s=[];return[i,r]=kr.point2segment(n.start,e),s.push([i,r.reverse()]),[i,r]=kr.point2segment(n.end,e),s.push([i,r.reverse()]),s.push(kr.point2segment(e.start,n)),s.push(kr.point2segment(e.end,n)),kr.sort(s),s[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Line(e.ps,e.pe),[r,s]=kr.point2line(n.center,i);if(Ke.Utils.GE(r,n.r)\u0026\u0026s.end.on(e))return kr.point2circle(s.end,n);{let[a,A]=kr.point2circle(e.start,n),[c,l]=kr.point2circle(e.end,n);return Ke.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Line(e.ps,e.pe),r=new Ke.Circle(n.pc,n.r),[s,a]=kr.point2line(r.center,i);if(Ke.Utils.GE(s,r.r)\u0026\u0026a.end.on(e)){let[u,g]=kr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A,c,l=[];return l.push(kr.point2arc(e.start,n)),l.push(kr.point2arc(e.end,n)),[A,c]=kr.point2segment(n.start,e),l.push([A,c.reverse()]),[A,c]=kr.point2segment(n.end,e),l.push([A,c.reverse()]),kr.sort(l),l[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return kr.point2point(i.start,r.start)}{let i=new Ke.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(kr.point2point(r[0],s[0])),a.push(kr.point2point(r[0],s[1])),a.push(kr.point2point(r[1],s[0])),a.push(kr.point2point(r[1],s[1])),kr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let[i,r]=kr.point2line(e.center,n),[s,a]=kr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Circle(e.center,e.r),[r,s]=kr.point2line(i.center,n);if(!Ke.Utils.GE(r,i.r)){let a=[];return a.push(kr.point2line(e.start,n)),a.push(kr.point2line(e.end,n)),kr.sort(a),a[0]}{let[a,A]=kr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Circle(e.center,e.r),[r,s]=kr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(kr.point2circle(e.start,n)),a.push(kr.point2circle(e.end,n)),kr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Circle(e.center,e.r),r=new Ke.Circle(n.center,n.r),[s,a]=kr.circle2circle(i,r);if(a.start.on(e)\u0026\u0026a.end.on(n))return[s,a];{let A,c,l=[];return[A,c]=kr.point2arc(e.start,n),c.end.on(n)\u0026\u0026l.push([A,c]),[A,c]=kr.point2arc(e.end,n),c.end.on(n)\u0026\u0026l.push([A,c]),[A,c]=kr.point2arc(n.start,e),c.end.on(e)\u0026\u0026l.push([A,c.reverse()]),[A,c]=kr.point2arc(n.end,e),c.end.on(e)\u0026\u0026l.push([A,c.reverse()]),[A,c]=kr.point2point(e.start,n.start),l.push([A,c]),[A,c]=kr.point2point(e.start,n.end),l.push([A,c]),[A,c]=kr.point2point(e.end,n.start),l.push([A,c]),[A,c]=kr.point2point(e.end,n.end),l.push([A,c]),kr.sort(l),l[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n.edges){let[r,s]=kr.point2edge(e,i);Ke.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ke.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ke.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin;return[r,a*a+A*A]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let A of n){[r,s]=kr.box2box_minmax(e.box,A.item.key);for(let c of A.item.values)c instanceof Ke.Edge?i.insert([r,s],c.shape):i.insert([r,s],c);Ke.Utils.LT(s,o)\u0026\u0026(o=s)}if(n.length===0)return o;let a=[...n.map(A=\u003eA.left.isNil()?void 0:A.left).filter(A=\u003eA!==void 0),...n.map(A=\u003eA.right.isNil()?void 0:A.right).filter(A=\u003eA!==void 0)].filter(A=\u003e{let[c,l]=kr.box2box_minmax(e.box,A.max);return Ke.Utils.LE(c,o)});return o=kr.minmax_tree_process_level(e,a,o,i)}static minmax_tree(e,n,o){let i=new bbe,r=[n.index.root],s=o\u003cNumber.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=kr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null\u0026\u0026!n.isNil()){if([i,r]=kr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ke.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=kr.distanceToArray(e,n.item.values);return Ke.Utils.LT(s,i[0])\u0026\u0026(i=[s,a]),[i,r]=kr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ke.Segment],r=!1;if(n instanceof Ke.PlanarSet){let s=kr.minmax_tree(e,n,o);[i,r]=kr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=\u003eKe.Utils.LT(n[0],o[0])?-1:Ke.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ke.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n){let[r,s]=kr.distance(e,i.shape);Ke.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of e)for(let r of n){let[s,a]=kr.distance(i.shape,r.shape);Ke.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}};var{Multiline:UAo,Point:e5t,Segment:KAo,Polygon:t5t}=Ke;function vbe(t){return new e5t(t.split(\" \").map(Number))}function n5t(t){return t.split(\", \").map(vbe)}function wbe(t){const e=n5t(t);let n=[];for(let o=0;o\u003ce.length-1;o++)n.push(new KAo(e[o],e[o+1]));return new UAo(n)}function o5t(t){const e=t.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\"),n=new t5t;let o;return e.forEach((i,r)=\u003e{let s=i.split(\", \").map(A=\u003enew e5t(A.split(\" \").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o\u0026\u0026a.reverse()}),n}function VAo(t){return t.startsWith(\"POLYGON\")?o5t(t.replace(/^POLYGON /,\"\")):(function(e){const n=e.split(/\\)\\), \\(\\(/).map(i=\u003e\"((\"+i+\"))\").map(o5t),o=new t5t;return n.reduce((i,r)=\u003e[...i,...r?.faces],[]).forEach(i=\u003eo.addFace([...i?.shapes])),o})(t.replace(/^MULTIPOLYGON \\(\\(\\((.*)\\)\\)\\)$/,\"$1\"))}function i5t(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"POINT\"))}function r5t(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"LINESTRING\"))}function s5t(t,e,n,o){return Math.sqrt((n-t)**2+(o-e)**2)}Ke.isWktString=function(t){return t.startsWith(\"POINT\")||i5t(t)||t.startsWith(\"LINESTRING\")||r5t(t)||t.startsWith(\"MULTILINESTRING\")||t.startsWith(\"POLYGON\")||t.startsWith(\"MULTIPOINT\")||t.startsWith(\"MULTIPOLYGON\")||t.startsWith(\"GEOMETRYCOLLECTION\")},Ke.parseWKT=function t(e){if(e.startsWith(\"POINT\"))return vbe(e.replace(/^POINT \\(/,\"\").replace(/\\)$/,\"\"));if(e.startsWith(\"MULTIPOINT\"))return n5t(e.replace(/^MULTIPOINT \\(/,\"\").replace(/\\)$/,\"\"));if(e.startsWith(\"LINESTRING\"))return wbe(e.replace(/^LINESTRING \\(/,\"\").replace(/\\)$/,\"\"));if(e.startsWith(\"MULTILINESTRING\"))return(function(n){return n.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\").map(wbe)})(e.replace(/^MULTILINESTRING /,\"\"));if(e.startsWith(\"POLYGON\")||e.startsWith(\"MULTIPOLYGON\"))return VAo(e);if(e.startsWith(\"GEOMETRYCOLLECTION\")){const n=/(?\u003ctype\u003ePOINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \\((?:[^\\(\\)]|\\([^\\)]*\\))*\\)/g,o=e.match(n);return o[0].startsWith(\"GEOMETRYCOLLECTION\")\u0026\u0026(o[0]=o[0].replace(\"GEOMETRYCOLLECTION (\",\"\")),o.map(t).map(i=\u003ei instanceof Array?i:[i]).reduce((i,r)=\u003e[...i,...r],[])}return i5t(e)?(function(n){return n.split(`\n`).map(o=\u003eo.match(/\\(([^)]+)\\)/)[1]).map(vbe)})(e):r5t(e)?(function(n){return n.split(`\n`).map(o=\u003eo.match(/\\(([^)]+)\\)/)[1]).map(wbe).reduce((o,i)=\u003e[...o,...i],[])})(e):[]},Ke.BooleanOperations=vAo,Ke.Relations=RAo;var zAo=class{buckets;objectsById;getBounds;getId;CELL_SIZE=.4;constructor({objects:t,getBounds:e,getId:n,CELL_SIZE:o}){this.buckets=new Map,this.objectsById=new Map,this.getBounds=e,this.getId=n??(()=\u003ethis._getNextId()),this.CELL_SIZE=o??this.CELL_SIZE;for(const i of t)this.addObject(i)}_idCounter=0;_getNextId(){return\"\"+this._idCounter++}addObject(t){const e=this.getBounds(t),n=this.getId(t),o={...t,spatialIndexId:n};this.objectsById.set(n,o);const i=Math.floor(e.minX/this.CELL_SIZE),r=Math.floor(e.minY/this.CELL_SIZE),s=Math.floor(e.maxX/this.CELL_SIZE),a=Math.floor(e.maxY/this.CELL_SIZE);for(let A=i;A\u003c=s;A++)for(let c=r;c\u003c=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l);u?u.push(o):this.buckets.set(l,[o])}}removeObject(t){const e=this.objectsById.get(t);if(!e)return!1;this.objectsById.delete(t);const n=this.getBounds(e),o=Math.floor(n.minX/this.CELL_SIZE),i=Math.floor(n.minY/this.CELL_SIZE),r=Math.floor(n.maxX/this.CELL_SIZE),s=Math.floor(n.maxY/this.CELL_SIZE);for(let a=o;a\u003c=r;a++)for(let A=i;A\u003c=s;A++){const c=`${a}x${A}`,l=this.buckets.get(c);if(l){const u=l.findIndex(g=\u003eg.spatialIndexId===t);u!==-1\u0026\u0026(l.splice(u,1),l.length===0\u0026\u0026this.buckets.delete(c))}}return!0}getBucketKey(t,e){return`${Math.floor(t/this.CELL_SIZE)}x${Math.floor(e/this.CELL_SIZE)}`}getObjectsInBounds(t,e=0){const n=[],o=new Set,i=Math.floor((t.minX-e)/this.CELL_SIZE),r=Math.floor((t.minY-e)/this.CELL_SIZE),s=Math.floor((t.maxX+e)/this.CELL_SIZE),a=Math.floor((t.maxY+e)/this.CELL_SIZE);for(let A=i;A\u003c=s;A++)for(let c=r;c\u003c=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l)||[];for(const g of u){const h=g.spatialIndexId;o.has(h)||(o.add(h),n.push(g))}}return n}},a5t=.1,JAo=.1,WAo=a5t,jAo=a5t,GL=.005;function $Ao(t){return t.type===\"pcb_trace_segment\"||t.type===\"pcb_smtpad\"?[t.layer]:t.type===\"pcb_plated_hole\"?Array.isArray(t.layers)?t.layers:[...lAe]:t.type===\"pcb_hole\"?[...lAe]:t.type===\"pcb_via\"?Array.isArray(t.layers)?t.layers:[...lAe]:t.type===\"pcb_keepout\"\u0026\u0026Array.isArray(t.layers)?t.layers:[]}var A5t=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=e.minX,r=e.minY,s=e.maxX,a=e.maxY;if(n.x===o.x\u0026\u0026n.y===o.y){const B=Math.max(i,Math.min(s,n.x)),S=Math.max(r,Math.min(a,n.y));return B===n.x\u0026\u0026S===n.y?{x:n.x,y:n.y}:{x:B,y:S}}const A=o.x-n.x,c=o.y-n.y,l=A!==0?(i-n.x)/A:Number.NEGATIVE_INFINITY,u=A!==0?(s-n.x)/A:Number.POSITIVE_INFINITY,g=c!==0?(r-n.y)/c:Number.NEGATIVE_INFINITY,h=c!==0?(a-n.y)/c:Number.POSITIVE_INFINITY,d=Math.max(Math.min(l,u),Math.min(g,h)),p=Math.min(Math.max(l,u),Math.max(g,h));if(d\u003c=p\u0026\u0026p\u003e=0\u0026\u0026d\u003c=1){const B=Math.max(0,Math.min(1,d));return{x:n.x+B*A,y:n.y+B*c}}const m={x:Math.max(i,Math.min(s,n.x)),y:Math.max(r,Math.min(a,n.y))},_={x:Math.max(i,Math.min(s,o.x)),y:Math.max(r,Math.min(a,o.y))},f=(m.x-n.x)**2+(m.y-n.y)**2,I=(_.x-o.x)**2+(_.y-o.y)**2,C=[{start:{x:i,y:r},end:{x:s,y:r}},{start:{x:s,y:r},end:{x:s,y:a}},{start:{x:s,y:a},end:{x:i,y:a}},{start:{x:i,y:a},end:{x:i,y:r}}];let y=Math.min(f,I),x=f\u003c=I?m:_;const E=(B,S,Q)=\u003eMath.max(S,Math.min(Q,B));for(const B of C){const S={x:o.x-n.x,y:o.y-n.y},Q={x:B.end.x-B.start.x,y:B.end.y-B.start.y},w={x:n.x-B.start.x,y:n.y-B.start.y},M=S.x*S.x+S.y*S.y,k=S.x*Q.x+S.y*Q.y,R=S.x*w.x+S.y*w.y,F=Q.x*Q.x+Q.y*Q.y,O=Q.x*w.x+Q.y*w.y,U=M*F-k*k;if(Math.abs(U)\u003c1e-10)continue;let Y=(k*O-F*R)/U,W=(M*O-k*R)/U;Y=E(Y,0,1),W=E(W,0,1);const te={x:n.x+Y*S.x,y:n.y+Y*S.y},j={x:B.start.x+W*Q.x,y:B.start.y+W*Q.y},J=te.x-j.x,oe=te.y-j.y,ie=J*J+oe*oe;ie\u003cy\u0026\u0026(y=ie,x={x:(te.x+j.x)/2,y:(te.y+j.y)/2})}return x},qAo=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i={x:e.x1,y:e.y1},r={x:e.x2,y:e.y2},s={x:o.x-n.x,y:o.y-n.y},a={x:r.x-i.x,y:r.y-i.y},A=s.x*s.x+s.y*s.y,c=a.x*a.x+a.y*a.y;if(A===0||c===0){if(A===0\u0026\u0026c===0)return{x:(n.x+i.x)/2,y:(n.y+i.y)/2};if(A===0){const Q=C7(((n.x-i.x)*a.x+(n.y-i.y)*a.y)/c,0,1),w={x:i.x+Q*a.x,y:i.y+Q*a.y};return{x:(n.x+w.x)/2,y:(n.y+w.y)/2}}const B=C7(((i.x-n.x)*s.x+(i.y-n.y)*s.y)/A,0,1),S={x:n.x+B*s.x,y:n.y+B*s.y};return{x:(S.x+i.x)/2,y:(S.y+i.y)/2}}const l=n.x-i.x,u=n.y-i.y,g=s.x*s.x+s.y*s.y,h=s.x*a.x+s.y*a.y,d=s.x*l+s.y*u,p=a.x*a.x+a.y*a.y,m=a.x*l+a.y*u,_=g*p-h*h;if(_\u003c1e-10)return XAo(n,o,i,r,s,a,A,c);let f=(h*m-p*d)/_,I=(g*m-h*d)/_;f=C7(f,0,1),I=C7(I,0,1),I=(f*h+m)/p,I=C7(I,0,1),f=(I*h-d)/g,f=C7(f,0,1);const C=n.x+f*s.x,y=n.y+f*s.y,x=i.x+I*a.x,E=i.y+I*a.y;return{x:(C+x)/2,y:(y+E)/2}},XAo=(t,e,n,o,i,r,s,a)=\u003e{let A=((n.x-t.x)*i.x+(n.y-t.y)*i.y)/s;A=C7(A,0,1);const c={x:t.x+A*i.x,y:t.y+A*i.y};let l=((o.x-t.x)*i.x+(o.y-t.y)*i.y)/s;l=C7(l,0,1);const u={x:t.x+l*i.x,y:t.y+l*i.y};let g=((t.x-n.x)*r.x+(t.y-n.y)*r.y)/a;g=C7(g,0,1);const h={x:n.x+g*r.x,y:n.y+g*r.y};let d=((e.x-n.x)*r.x+(e.y-n.y)*r.y)/a;d=C7(d,0,1);const p={x:n.x+d*r.x,y:n.y+d*r.y},m=[{pointA:c,pointB:n,distance:Math.sqrt((c.x-n.x)**2+(c.y-n.y)**2)},{pointA:u,pointB:o,distance:Math.sqrt((u.x-o.x)**2+(u.y-o.y)**2)},{pointA:t,pointB:h,distance:Math.sqrt((t.x-h.x)**2+(t.y-h.y)**2)},{pointA:e,pointB:p,distance:Math.sqrt((e.x-p.x)**2+(e.y-p.y)**2)}].reduce((_,f)=\u003ef.distance\u003c_.distance?f:_);return{x:(m.pointA.x+m.pointB.x)/2,y:(m.pointA.y+m.pointB.y)/2}},C7=(t,e,n)=\u003eMath.max(e,Math.min(n,t)),WJ=t=\u003et.type===\"pcb_trace_segment\"?{minX:Math.min(t.x1,t.x2),minY:Math.min(t.y1,t.y2),maxX:Math.max(t.x1,t.x2),maxY:Math.max(t.y1,t.y2)}:nbe([t]);function ZAo(t){const e=new Set;for(const n of t.route)n.route_type===\"wire\"\u0026\u0026(n.start_pcb_port_id\u0026\u0026e.add(n.start_pcb_port_id),n.end_pcb_port_id\u0026\u0026e.add(n.end_pcb_port_id));return Array.from(e)}function Pbe(t){const e=new Set;for(const n of t)for(const o of ZAo(n))e.add(o);return Array.from(e)}var eco=t=\u003e{if(t.type===\"pcb_via\"||t.type===\"pcb_plated_hole\"\u0026\u0026t.shape===\"circle\")return t.outer_diameter/2;if(t.type===\"pcb_hole\"\u0026\u0026t.hole_shape===\"circle\")return t.hole_diameter/2;if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"circle\")return t.radius;throw new Error(`Could not determine radius of element: ${JSON.stringify(t)}`)};function tco(t,{connMap:e,minClearance:n=.1}={}){const o=[];(p=\u003e{const m=p.filter(C=\u003eC.type===\"pcb_port\"),_=p.filter(C=\u003eC.type===\"pcb_smtpad\"),f=p.filter(C=\u003eC.type===\"pcb_trace\");function I(C,y={}){const x=y.traceWidth||0,E=m.find(B=\u003es5t(B.x,B.y,C.x,C.y)\u003c.01);if(E)return E.pcb_port_id;if(y.isFirstOrLastPoint){const B=_.find(S=\u003eS.shape===\"rect\"?Math.abs(C.x-S.x)\u003cS.width/2+x/2\u0026\u0026Math.abs(C.y-S.y)\u003cS.height/2+x/2:S.shape===\"circle\"?s5t(C.x,C.y,S.x,S.y)\u003cS.radius:void 0);if(B)return B.pcb_port_id??null}return null}for(const C of f)for(let y=0;y\u003cC.route.length;y++){const x=C.route[y],E=y===0||y===C.route.length-1;if(x.route_type===\"wire\"){if(!x.start_pcb_port_id\u0026\u0026y===0){const B=I(x,{isFirstOrLastPoint:E,traceWidth:x.width});B\u0026\u0026(x.start_pcb_port_id=B)}if(!x.end_pcb_port_id\u0026\u0026y===C.route.length-1){const B=I(x,{isFirstOrLastPoint:E,traceWidth:x.width});B\u0026\u0026(x.end_pcb_port_id=B)}}}})(t),e??=l8e(t);const i=nI(t).pcb_trace.list().flatMap(p=\u003e{const m=[];for(let _=0;_\u003cp.route.length-1;_++){const f=p.route[_],I=p.route[_+1];f.route_type===\"wire\"\u0026\u0026I.route_type===\"wire\"\u0026\u0026f.layer===I.layer\u0026\u0026m.push({type:\"pcb_trace_segment\",pcb_trace_id:p.pcb_trace_id,_pcbTrace:p,thickness:\"width\"in f?f.width:\"width\"in I?I.width:JAo,layer:f.layer,x1:f.x,y1:f.y,x2:I.x,y2:I.y})}return m}),r=nI(t).pcb_smtpad.list(),s=nI(t).pcb_plated_hole.list(),a=nI(t).pcb_hole.list(),A=nI(t).pcb_via.list(),c=nI(t).pcb_keepout.list(),l=[...i,...r,...s,...a,...A,...c],u=new zAo({objects:l,getBounds:WJ}),g=p=\u003eNy(t,p),h=(p,m,_)=\u003e_\u003c0?`PCB trace ${p} overlaps with ${m} (accidental contact)`:`PCB trace ${p} is too close to ${m} (gap: ${_.toFixed(3)}mm)`,d=new Set;for(const p of i){const m=n,_=WJ(p),f=u.getObjectsInBounds(_,m+p.thickness/2);if(p.x1!==p.x2||p.y1!==p.y2)for(const I of f){if(!$Ao(I).includes(p.layer))continue;if(I.type===\"pcb_trace_segment\"){const x=I;if(p.layer!==x.layer||e.areIdsConnected(p.pcb_trace_id,x.pcb_trace_id))continue;const E=M5({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},{x:x.x1,y:x.y1},{x:x.x2,y:x.y2})-p.thickness/2-x.thickness/2;if(E\u003en-GL)continue;const B=`overlap_${p.pcb_trace_id}_${x.pcb_trace_id}`,S=`overlap_${x.pcb_trace_id}_${p.pcb_trace_id}`;if(d.has(B)||d.has(S))continue;d.add(B),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:h(g(p.pcb_trace_id),g(x.pcb_trace_id),E),pcb_trace_id:p.pcb_trace_id,source_trace_id:\"\",pcb_trace_error_id:B,pcb_component_ids:[],center:qAo(p,x),pcb_port_ids:Pbe([p._pcbTrace,x._pcbTrace])});continue}const C=gv(I);if(e.areIdsConnected(p.pcb_trace_id,\"pcb_trace_id\"in I?I.pcb_trace_id:C))continue;if(I.type===\"pcb_via\"||I.type===\"pcb_plated_hole\"\u0026\u0026I.shape===\"circle\"||I.type===\"pcb_hole\"||I.type===\"pcb_smtpad\"\u0026\u0026I.shape===\"circle\"){const x=eco(I),E=Nz({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},{x:I.x,y:I.y,radius:x})-p.thickness/2;if(E\u003en-GL)continue;const B=`overlap_${p.pcb_trace_id}_${C}`;if(d.has(B))continue;d.add(B),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:h(g(p.pcb_trace_id),`${I.type} \"${g(gv(I))}\"`,E),pcb_trace_id:p.pcb_trace_id,center:A5t(p,WJ(I)),source_trace_id:\"\",pcb_trace_error_id:B,pcb_component_ids:[\"pcb_component_id\"in I?I.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...Pbe([p._pcbTrace]),\"pcb_port_id\"in I?I.pcb_port_id:void 0].filter(Boolean)})}const y=Dz({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},WJ(I))-p.thickness/2;if(y+GL\u003cm){const x=`overlap_${p.pcb_trace_id}_${C}`;if(d.has(x))continue;d.add(x),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:h(g(p.pcb_trace_id),`${I.type} \"${g(gv(I))}\"`,y),pcb_trace_id:p.pcb_trace_id,source_trace_id:\"\",pcb_trace_error_id:x,pcb_component_ids:[\"pcb_component_id\"in I?I.pcb_component_id:void 0].filter(Boolean),center:A5t(p,WJ(I)),pcb_port_ids:[...Pbe([p._pcbTrace]),\"pcb_port_id\"in I?I.pcb_port_id:void 0].filter(Boolean)})}}}return o}function Mbe(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function c5t(t,e){return Mbe(t,e)\u003c=GL}function nco(t,{connMap:e,minClearance:n=WAo}={}){const o=t.filter(s=\u003es.type===\"pcb_via\");if(o.length\u003c2)return[];e??=l8e(t);const i=[],r=new Set;for(let s=0;s\u003co.length;s++)for(let a=s+1;a\u003co.length;a++){const A=o[s],c=o[a];if(c5t(A,c)||!e.areIdsConnected(A.pcb_via_id,c.pcb_via_id))continue;const l=Mbe(A,c)-A.outer_diameter/2-c.outer_diameter/2;if(l+GL\u003e=n)continue;const u=[A.pcb_via_id,c.pcb_via_id].sort().join(\"_\");r.has(u)||(r.add(u),i.push({type:\"pcb_via_clearance_error\",pcb_error_id:`same_net_vias_close_${u}`,message:`Vias ${Ny(t,A.pcb_via_id)} and ${Ny(t,c.pcb_via_id)} are too close together (gap: ${l.toFixed(3)}mm)`,error_type:\"pcb_via_clearance_error\",pcb_via_ids:[A.pcb_via_id,c.pcb_via_id],minimum_clearance:n,actual_clearance:l,pcb_center:{x:(A.x+c.x)/2,y:(A.y+c.y)/2}}))}return i}function oco(t,{connMap:e,minClearance:n=jAo}={}){const o=t.filter(s=\u003es.type===\"pcb_via\");if(o.length\u003c2)return[];e??=l8e(t);const i=[],r=new Set;for(let s=0;s\u003co.length;s++)for(let a=s+1;a\u003co.length;a++){const A=o[s],c=o[a];if(c5t(A,c)||e.areIdsConnected(A.pcb_via_id,c.pcb_via_id))continue;const l=Mbe(A,c)-A.outer_diameter/2-c.outer_diameter/2;if(l+GL\u003e=n)continue;const u=[A.pcb_via_id,c.pcb_via_id].sort().join(\"_\");r.has(u)||(r.add(u),i.push({type:\"pcb_via_clearance_error\",pcb_error_id:`different_net_vias_close_${u}`,message:`Vias ${Ny(t,A.pcb_via_id)} and ${Ny(t,c.pcb_via_id)} from different nets are too close together (gap: ${l.toFixed(3)}mm)`,error_type:\"pcb_via_clearance_error\",pcb_via_ids:[A.pcb_via_id,c.pcb_via_id],minimum_clearance:n,actual_clearance:l,pcb_center:{x:(A.x+c.x)/2,y:(A.y+c.y)/2}}))}return i}var Dbe=t=\u003e({minSpacing:t,minClearance:t}),xx={traceClearance:.1,viaClearance:.1},l5t=t=\u003e(e=\u003e\"layer\"in e)(t)?[t.layer]:t.layers,O5=(t,e)=\u003et===0?\"top\":t===e-1?\"bottom\":`inner${t}`;function ico(t,e,n){let o,i=Number.POSITIVE_INFINITY;for(const r of e){const s=n.get(r);if(!s)continue;const a=Math.hypot(s.x-t.x,s.y-t.y);a\u003ci\u0026\u0026(i=a,o=r)}return o??e[0]}function rco(t){const e=[],n=new Set,o=new Set,i=(function(r){const s=new Map;for(const a of r.connections)for(const A of a.pointsToConnect)A.pcb_port_id\u0026\u0026s.set(A.pcb_port_id,{x:A.x,y:A.y});return s})(t);for(const r of t.obstacles){const s=r.connectedTo,a=s.find(_=\u003e_.startsWith(\"pcb_smtpad_\")),A=s.find(_=\u003e_.startsWith(\"pcb_plated_hole_\")),c=s.filter(_=\u003e_.startsWith(\"pcb_port_\")),l=ico(r.center,c,i);if(!a\u0026\u0026!A\u0026\u0026!l)continue;const u=r.layers;if(u.length===0)continue;const g=r.width,h=r.height,d=r.center.x,p=r.center.y;if(u.length\u003e1){const _=A??`pcb_plated_hole_${d.toFixed(3)}_${p.toFixed(3)}`;if(o.has(_))continue;if(o.add(_),Math.abs(g-h)\u003c.001){e.push({type:\"pcb_plated_hole\",pcb_plated_hole_id:_,shape:\"circle\",outer_diameter:Math.max(g,h),hole_diameter:Math.max(.5*Math.min(g,h),.1),x:d,y:p,layers:u,...l?{pcb_port_id:l}:{}});continue}e.push({type:\"pcb_plated_hole\",pcb_plated_hole_id:_,shape:\"circular_hole_with_rect_pad\",hole_shape:\"circle\",hole_diameter:Math.max(.5*Math.min(g,h),.1),rect_pad_width:g,rect_pad_height:h,hole_offset_x:0,hole_offset_y:0,x:d,y:p,layers:u,...l?{pcb_port_id:l}:{}});continue}const m=a??`pcb_smtpad_${d.toFixed(3)}_${p.toFixed(3)}`;n.has(m)||(n.add(m),e.push({type:\"pcb_smtpad\",pcb_smtpad_id:m,layer:u[0],shape:\"rect\",width:g,height:h,x:d,y:p,...l?{pcb_port_id:l}:{}}))}return e}function sco(t,e,n=.1,o=t.minViaDiameter??.3){const i=[];i.push(...(function(s,a){const A=[];return s.connections.forEach(c=\u003e{const l=c.pointsToConnect.filter(p=\u003ep.pcb_port_id).map(p=\u003ep.pcb_port_id).filter(Boolean),u=c.netConnectionName||c.rootConnectionName||c.name,g=[],h=a.find(p=\u003e(p.connection_name??p.connectionName)===c.name);if(h){const p=_=\u003e\"route_type\"in _\u0026\u0026_.route_type===\"jumper\"?_.start:\"x\"in _\u0026\u0026\"y\"in _?{x:_.x,y:_.y}:{x:0,y:0},m=[p(h.route[0]),p(h.route[h.route.length-1])];for(const _ of m)for(const f of s.obstacles)o7(_,f)\u003c=0\u0026\u0026g.push(f)}const d=A.find(p=\u003ep.type===\"source_trace\"\u0026\u0026p.source_trace_id===u);if(d){const p=d;p.connected_source_port_ids=[...new Set([...p.connected_source_port_ids,...l])]}else A.push({type:\"source_trace\",source_trace_id:u,connected_source_port_ids:l.concat(g.flatMap(p=\u003e[`obstacle_${p.center.x.toFixed(3)}_${p.center.y.toFixed(3)}_${p.layers.join(\".\")}`,...p.connectedTo])),connected_source_net_ids:[]})}),A})(t,e)),i.push(...(function(s){const a=new Map;return s.connections.forEach(A=\u003e{A.pointsToConnect.forEach(c=\u003e{c.pcb_port_id\u0026\u0026a.set(c.pcb_port_id,{type:\"pcb_port\",pcb_port_id:c.pcb_port_id,source_port_id:c.pcb_port_id,x:c.x,y:c.y,layers:l5t(c)})})}),Array.from(a.values())})(t)),i.push(...rco(t)),i.push(...(function(s,a=.3){const A=[],c=new Set;return s.length\u003e0\u0026\u0026(\"type\"in s[0]\u0026\u0026s[0].type===\"pcb_trace\"?s.forEach(l=\u003e{l.route.forEach(u=\u003e{if(u.route_type===\"via\"){const g=u.via_diameter??a,h=`${u.x},${u.y},${u.from_layer},${u.to_layer}`;c.has(h)||(A.push({type:\"pcb_via\",pcb_via_id:`via_${A.length}`,pcb_trace_id:l.pcb_trace_id,x:u.x,y:u.y,outer_diameter:g,hole_diameter:.5*g,layers:[u.from_layer,u.to_layer]}),c.add(h))}})}):s.forEach((l,u)=\u003e{const g=`trace_${u}`,h=l.viaDiameter??a;for(let d=1;d\u003cl.route.length;d++){const p=l.route[d-1],m=l.route[d];if(p.z!==m.z\u0026\u0026Math.abs(p.x-m.x)\u003c.01\u0026\u0026Math.abs(p.y-m.y)\u003c.01){const _=O5(p.z,2),f=O5(m.z,2),I=`${m.x},${m.y},${_},${f}`;c.has(I)||(A.push({type:\"pcb_via\",pcb_via_id:`via_${A.length}`,pcb_trace_id:g,x:m.x,y:m.y,outer_diameter:h,hole_diameter:.5*h,layers:[_,f]}),c.add(I))}}})),A})(e,o));const r=new Map;return t.connections.forEach(s=\u003e{r.set(s.name,s.netConnectionName||s.rootConnectionName||s.name)}),e.length\u003e0\u0026\u0026(\"type\"in e[0]\u0026\u0026e[0].type===\"pcb_trace\"?e.forEach(s=\u003e{const a=s.connection_name;i.push((function(A,c){return{type:\"pcb_trace\",pcb_trace_id:A.pcb_trace_id,source_trace_id:c,route:A.route.map(l=\u003el.route_type===\"wire\"?{route_type:\"wire\",x:l.x,y:l.y,width:l.width,layer:l.layer,start_pcb_port_id:l.start_pcb_port_id,end_pcb_port_id:l.end_pcb_port_id}:l.route_type===\"via\"?{route_type:\"via\",x:l.x,y:l.y,from_layer:l.from_layer,to_layer:l.to_layer}:null).filter(l=\u003el!==null)}})(s,r.get(a)||a))}):e.forEach((s,a)=\u003e{const A=s.connectionName,c=(function(l,u,g,h=.1){const d=[];if(!l.jumpers||l.jumpers.length===0)return[{type:\"pcb_trace\",pcb_trace_id:u,source_trace_id:g,route:l.route.map((f,I)=\u003e{const C=I===0,y=I===l.route.length-1;return{route_type:\"wire\",x:f.x,y:f.y,width:h,layer:O5(f.z,2),...C\u0026\u0026f.pcb_port_id?{start_pcb_port_id:f.pcb_port_id}:{},...y\u0026\u0026f.pcb_port_id?{end_pcb_port_id:f.pcb_port_id}:{}}})}];const p=[];for(const f of l.jumpers){let I=-1,C=-1;for(let y=0;y\u003cl.route.length;y++){const x=l.route[y];Math.abs(x.x-f.start.x)\u003c.01\u0026\u0026Math.abs(x.y-f.start.y)\u003c.01\u0026\u0026(I=y),Math.abs(x.x-f.end.x)\u003c.01\u0026\u0026Math.abs(x.y-f.end.y)\u003c.01\u0026\u0026(C=y)}I!==-1\u0026\u0026C!==-1\u0026\u0026(I\u003eC\u0026\u0026([I,C]=[C,I]),p.push({startIdx:I,endIdx:C}))}p.sort((f,I)=\u003ef.startIdx-I.startIdx);let m=0,_=0;for(const{startIdx:f,endIdx:I}of p){if(f\u003e=m){const C=l.route.slice(m,f+1);C.length\u003e0\u0026\u0026(d.push({type:\"pcb_trace\",pcb_trace_id:`${u}_${_}`,source_trace_id:g,route:C.map((y,x)=\u003e{const E=x===0\u0026\u0026m===0;return{route_type:\"wire\",x:y.x,y:y.y,width:h,layer:O5(y.z,2),...E\u0026\u0026y.pcb_port_id?{start_pcb_port_id:y.pcb_port_id}:{}}})}),_++)}m=I}if(m\u003cl.route.length){const f=l.route.slice(m);f.length\u003e0\u0026\u0026d.push({type:\"pcb_trace\",pcb_trace_id:`${u}_${_}`,source_trace_id:g,route:f.map((I,C)=\u003e{const y=C===f.length-1;return{route_type:\"wire\",x:I.x,y:I.y,width:h,layer:O5(I.z,2),...y\u0026\u0026I.pcb_port_id?{end_pcb_port_id:I.pcb_port_id}:{}}})})}return d})(s,`trace_${a}`,r.get(A)||A,n);i.push(...c)})),i}var aB=t=\u003et.rootConnectionName??t.connectionName,jJ=(t,e)=\u003e{if(t\u0026\u0026e)return t.getNetConnectedToId(e)},AB=(t,e,n)=\u003e{if(!e)return!1;if(t===e||n?.areIdsConnected(t,e))return!0;const o=jJ(n,t),i=jJ(n,e);return!(!o||o!==e\u0026\u0026o!==i)||!(!i||i!==t\u0026\u0026i!==o)},Ry=(t,e,n)=\u003ee.connectedTo?.some(o=\u003eAB(t,o,n))??!1,y7=(t,e,n)=\u003eMath.max(e,Math.min(t,n)),AN=(t,e)=\u003e{t.x=y7(t.x,e.minX,e.maxX),t.y=y7(t.y,e.minY,e.maxY)},cN=(t,e)=\u003e({minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}),u5t=(t,e)=\u003e({minCellX:Math.floor(t.minX/e),maxCellX:Math.floor(t.maxX/e),minCellY:Math.floor(t.minY/e),maxCellY:Math.floor(t.maxY/e)}),g5t=(t,e)=\u003e`${t}:${e}`,Nbe=(t,e,n)=\u003e{const o=new Map;for(let i=0;i\u003ct.length;i+=1){const r=t[i];if(!r)continue;const s=u5t(e(r),n);for(let a=s.minCellX;a\u003c=s.maxCellX;a+=1)for(let A=s.minCellY;A\u003c=s.maxCellY;A+=1){const c=g5t(a,A),l=o.get(c);l?l.push(i):o.set(c,[i])}}return o},YL=(t,e,n)=\u003e{const o=new Set,i=u5t(e,n);for(let r=i.minCellX;r\u003c=i.maxCellX;r+=1)for(let s=i.minCellY;s\u003c=i.maxCellY;s+=1){const a=t.get(g5t(r,s));if(a)for(const A of a)o.add(A)}return[...o].sort((r,s)=\u003er-s)},d5t=1e-6,aco=(t,e,n)=\u003e{if(t.length===0)return[];const o=n?.traceThickness??.1,i=t[0],r=t.at(-1),s=l=\u003e{if(l.pcb_port_id)return l.pcb_port_id;const u=O5(l.z,e);return n?.connectionPoints?.find(g=\u003e{return g.pcb_port_id\u0026\u0026(h=g,d=l,Math.abs(h.x-d.x)\u003c=d5t\u0026\u0026Math.abs(h.y-d.y)\u003c=d5t)\u0026\u0026l5t(g).includes(u);var h,d})?.pcb_port_id},a=s(i),A=s(r),c=[{route_type:\"wire\",x:i.x,y:i.y,width:o,layer:O5(i.z,e),...a?{start_pcb_port_id:a}:{},...t.length===1\u0026\u0026A?{end_pcb_port_id:A}:{}}];for(let l=1;l\u003ct.length;l+=1){const u=t[l-1],g=t[l];u\u0026\u0026g\u0026\u0026(u.z===g.z||u.x!==g.x||u.y!==g.y?c.push({route_type:\"wire\",x:g.x,y:g.y,width:o,layer:O5(g.z,e),...l===t.length-1\u0026\u0026A?{end_pcb_port_id:A}:{}}):c.push({route_type:\"via\",x:g.x,y:g.y,from_layer:O5(u.z,e),to_layer:O5(g.z,e),...n?.viaDiameter?{via_diameter:n.viaDiameter}:{}}))}return c},h5t=t=\u003e({...t,route:t.route.map(e=\u003e({...e})),vias:t.vias.map(e=\u003e({...e}))}),x7=t=\u003et.map(h5t),UL=(t,e)=\u003e{const n=new Set(e);return t.map((o,i)=\u003en.has(i)?h5t(o):o)},j_=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=bA\u0026\u0026Math.abs(t.y-e.y)\u003c=bA,Aco=[\"pcb_smtpad\",\"pcb_plated_hole\",\"pcb_hole\",\"pcb_keepout\"],Ty=t=\u003etypeof t.type==\"string\"?t.type:typeof t.error_type==\"string\"?t.error_type:void 0,Rbe=t=\u003e{if(Ty(t)===\"pcb_pad_trace_clearance_error\")return!0;const e=typeof t.message==\"string\"?t.message.toLowerCase():\"\";return(e.includes(\"pcb_trace\")||e.includes(\"pcb trace\"))\u0026\u0026Aco.some(n=\u003ee.includes(n))},Tbe=t=\u003e{const e=typeof t.message==\"string\"?t.message:\"\",n=e.match(/gap: (-?\\d+(?:\\.\\d+)?)mm/),o=e.match(/required: (-?\\d+(?:\\.\\d+)?)mm/);if(n\u0026\u0026o){const i=Number.parseFloat(n[1]),r=Number.parseFloat(o[1]);if(Number.isFinite(i)\u0026\u0026Number.isFinite(r))return Math.max(0,r-i)}if(n){const i=Number.parseFloat(n[1]),r=xx.traceClearance;if(Number.isFinite(i))return Math.max(0,r-i)}return 1},p5t={projectEngineError:t=\u003e({...t,center:typeof t.first_contact_center==\"object\"?t.first_contact_center:t.center,message:typeof t.first_contact_message==\"string\"?t.first_contact_message:t.message,actual_clearance:typeof t.first_actual_clearance==\"number\"?t.first_actual_clearance:t.actual_clearance}),getErrorSeverity:Tbe},cco={projectEngineError:t=\u003et,getErrorSeverity:t=\u003e{const e=Number(t.minimum_clearance),n=Number(t.worst_actual_clearance);return Number.isFinite(e)\u0026\u0026Number.isFinite(n)?Math.max(0,e-n):Tbe(t)}},KL=(t,e=Tbe)=\u003et.reduce((n,o)=\u003en+e(o),0),m5t=(t,e,n,o,i,r=p5t)=\u003e{const s=i\u0026\u0026!n?t:((h,d)=\u003ed?{...h,connections:h.connections.map(p=\u003e{const m=jJ(d,p.name)??jJ(d,p.rootConnectionName)??p.netConnectionName;return m?{...p,netConnectionName:m}:p}),obstacles:h.obstacles.map(p=\u003e{const m=new Set(p.connectedTo);for(const _ of p.connectedTo){const f=jJ(d,_);f\u0026\u0026m.add(f)}return{...p,connectedTo:[...m]}})}:h)(t,o),{traces:a,traceRouteIndexById:A}=((h,d)=\u003e{const p=[],m=new Map,_=new Map;for(let f=0;f\u003cd.length;f+=1){const I=d[f];if(!I)continue;const C=_.get(I.connectionName);C?C.push({route:I,routeIndex:f}):_.set(I.connectionName,[{route:I,routeIndex:f}])}for(const f of h.connections){const I=_.get(f.name)??[];for(let C=0;C\u003cI.length;C+=1){const y=I[C];if(!y)continue;const x=`${f.name}_${C}`;p.push({type:\"pcb_trace\",pcb_trace_id:x,connection_name:f.netConnectionName??f.rootConnectionName??f.name,route:aco(y.route.route,h.layerCount,{traceThickness:y.route.traceThickness??f.nominalTraceWidth??h.nominalTraceWidth??h.minTraceWidth,viaDiameter:y.route.viaDiameter??h.minViaDiameter,connectionPoints:f.pointsToConnect})}),m.set(x,y.routeIndex)}}return{traces:p,traceRouteIndexById:m}})(s,e),c=n?.({srj:s,routes:e,traces:a});if(c){const h=Array.isArray(c)?c:c.errors,d=Array.isArray(c)?c:c.errorsWithCenters??c.errors;return{errors:d,count:h.length,issueScore:KL(d,r.getErrorSeverity),legacyIssueScore:KL(d.filter(p=\u003e!Ex(p)),r.getErrorSeverity),traceRouteIndexById:A}}const l=i?.evaluate(a)??((h,d={})=\u003e{const p=Math.max(d.viaClearance??.1,.1),m=[...tco(h,Dbe(d.traceClearance)),...nco(h,Dbe(p)),...oco(h,Dbe(p))],_=h.filter(y=\u003ey.type===\"pcb_via\"),f=new Map(_.map(y=\u003e[y.pcb_via_id,y])),I=m.map(y=\u003e{if(\"center\"in y\u0026\u0026y.center)return y;if(\"pcb_center\"in y\u0026\u0026y.pcb_center)return{...y,center:y.pcb_center};if(\"pcb_via_ids\"in y\u0026\u0026Array.isArray(y.pcb_via_ids)){const[x,E]=y.pcb_via_ids;if(typeof x!=\"string\"||typeof E!=\"string\")return y;const B=f.get(x),S=f.get(E);if(B\u0026\u0026S)return{...y,center:{x:(B.x+S.x)/2,y:(B.y+S.y)/2}}}if(\"pcb_error_id\"in y\u0026\u0026typeof y.pcb_error_id==\"string\"\u0026\u0026(y.pcb_error_id.startsWith(\"same_net_vias_close_\")||y.pcb_error_id.startsWith(\"different_net_vias_close_\"))){const x=y.pcb_error_id.replace(\"same_net_vias_close_\",\"\").replace(\"different_net_vias_close_\",\"\").split(\"_\").filter(Boolean);if(x.length===2){const E=x[0],B=x[1];if(!E||!B)return y;const S=f.get(E),Q=f.get(B);if(S\u0026\u0026Q)return{...y,center:{x:(S.x+Q.x)/2,y:(S.y+Q.y)/2}}}}return y}),C=I.filter(y=\u003e!!y.center);return{errors:m,errorsWithCenters:I,locationAwareErrors:C}})(sco(s,a,s.minTraceWidth,s.minViaDiameter),{traceClearance:s.minTraceToPadEdgeClearance??xx.traceClearance,viaClearance:s.minTraceToPadEdgeClearance??xx.viaClearance}),u=l.errors,g=(l.errorsWithCenters.length\u003e0?l.errorsWithCenters:l.errors).map(h=\u003er.projectEngineError(h));return{errors:g,count:u.length,issueScore:KL(g,r.getErrorSeverity),legacyIssueScore:KL(g.filter(h=\u003e!Ex(h)),r.getErrorSeverity),traceRouteIndexById:A}},E7=(t,e,n,o,i)=\u003em5t(t,e,n,o,i,p5t),lco=(t,e,n,o,i)=\u003em5t(t,e,n,o,i,cco),Iv=(t,e=.3)=\u003e{const n=[];for(let o=0;o\u003ct.length;o+=1){const i=t[o];if(!i)continue;const r=new Set;for(let s=0;s\u003ci.route.length-1;s+=1){const a=i.route[s],A=i.route[s+1];if(!a||!A||a.z===A.z||!j_(a,A))continue;const c=[s,s+1];for(let h=s-1;h\u003e=0;h-=1){const d=i.route[h];if(!d||!j_(d,a))break;c.push(h)}for(let h=s+2;h\u003ci.route.length;h+=1){const d=i.route[h];if(!d||!j_(d,a))break;c.push(h)}const l=[...new Set(c)];if(l.some(h=\u003er.has(h)))continue;for(const h of l)r.add(h);const u=l.filter(h=\u003eh===0||h===i.route.length-1),g=u.some(h=\u003e!!i.route[h]?.pcb_port_id);n.push({routeIndex:o,rootConnectionName:aB(i),pointIndexes:l,zLayers:[...new Set(l.map(h=\u003ei.route[h].z))],x:a.x,y:a.y,radius:(i.viaDiameter??e)/2,movable:u.length===0,canCanonicalize:u.length===0||!g})}}return n},fAe=(t,e)=\u003e{const n=[];for(let o=0;o\u003ct.route.length-1;o+=1){const i=t.route[o],r=t.route[o+1];i\u0026\u0026r\u0026\u0026(i.z!==r.z||j_(i,r)||n.push({routeIndex:e,rootConnectionName:aB(t),startIndex:o,endIndex:o+1,start:i,end:r,z:i.z,radius:(t.traceThickness??.1)/2}))}return n},$J=t=\u003et.flatMap((e,n)=\u003efAe(e,n)),IAe=t=\u003e({minX:t.x,minY:t.y,maxX:t.x,maxY:t.y}),lN=t=\u003e({minX:Math.min(t.start.x,t.end.x),minY:Math.min(t.start.y,t.end.y),maxX:Math.max(t.start.x,t.end.x),maxY:Math.max(t.start.y,t.end.y)}),_5t=t=\u003e({minX:t.center.x-t.width/2,minY:t.center.y-t.height/2,maxX:t.center.x+t.width/2,maxY:t.center.y+t.height/2}),VL=(t,e)=\u003e{if(t.zLayers\u0026\u0026t.zLayers.length\u003e0)return t.zLayers;const n=Array.from({length:e},(o,i)=\u003ei).filter(o=\u003et.layers.includes(O5(o,e)));return n.length\u003e0?n:Array.from({length:e},(o,i)=\u003ei)},f5t=(t,e,n)=\u003e{const o=e.reduce((s,a)=\u003eMath.max(s,a.radius),(t.minViaDiameter??.3)/2),i=n.reduce((s,a)=\u003eMath.max(s,a.radius),t.minTraceWidth/2),r=xx.traceClearance+My;return Math.max(2*o+.2+My,o+i+r,2*i+r,i+A8e(t)+My,o+c8e(t)+My)},I5t=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r\u003c=Dr)return{x:e.x,y:e.y,t:0};const s=y7(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return{x:e.x+o*s,y:e.y+i*s,t:s}},G5=(t,e)=\u003eI5t(t,e.start,e.end),Cv=(t,e)=\u003e{const n=e.width/2,o=e.height/2,i=Math.max(Math.abs(t.x-e.center.x)-n,0),r=Math.max(Math.abs(t.y-e.center.y)-o,0);return Math.hypot(i,r)},CAe=(t,e)=\u003et.x\u003e=e.center.x-e.width/2-bA\u0026\u0026t.x\u003c=e.center.x+e.width/2+bA\u0026\u0026t.y\u003e=e.center.y-e.height/2-bA\u0026\u0026t.y\u003c=e.center.y+e.height/2+bA,kbe=(t,e,n,o)=\u003et.obstacles.find(i=\u003eRy(aB(e),i,o)\u0026\u0026VL(i,t.layerCount).includes(n.z)\u0026\u0026CAe(n,i)),yAe=(t,e,n=.6,o)=\u003e{let i;for(const r of t.obstacles){if(o\u0026\u0026!o(r))continue;const s=Cv(e,r);s\u003en||(!i||s\u003ci.distance)\u0026\u0026(i={obstacle:r,distance:s})}return i?.obstacle},xAe=(t,e,n)=\u003e{const o=e.width/2,i=e.height/2,r=y7(t.x,e.center.x-o,e.center.x+o),s=y7(t.y,e.center.y-i,e.center.y+i);let a=t.x-r,A=t.y-s,c=Math.hypot(a,A);c\u003c=Dr\u0026\u0026(o-Math.abs(t.x-e.center.x)\u003ci-Math.abs(t.y-e.center.y)?(a=t.x\u003e=e.center.x?1:-1,A=0,c=0):(a=0,A=t.y\u003e=e.center.y?1:-1,c=0));const l=n-c;if(l\u003c=0)return;const u=Math.hypot(a,A);return{direction:{x:u\u003eDr?a/u:1,y:u\u003eDr?A/u:0},penetration:l}},C5t=(t,e,n,o)=\u003e{const i=e.message;if(typeof i!=\"string\"||!i.includes(\"pcb_\"))return n;const r=Array.isArray(e.pcb_pad_ids)?e.pcb_pad_ids.filter(a=\u003etypeof a==\"string\"):[],s=t.obstacles.find(a=\u003er.some(A=\u003ea.connectedTo.includes(A))\u0026\u0026!0);return s?s.center:yAe(t,n,.6,o)?.center??n},y5t=(t,e)=\u003e{const n=t.route[e];if(!n)return[];const o=[e];for(let i=e-1;i\u003e=0;i-=1){const r=t.route[i];if(!r||!j_(r,n))break;o.push(i)}for(let i=e+1;i\u003ct.route.length;i+=1){const r=t.route[i];if(!r||!j_(r,n))break;o.push(i)}return[...new Set(o)]},Fbe=(t,e)=\u003e{if(e\u003c=0||e\u003e=t.route.length-1)return;const n=y5t(t,e);return n.includes(0)||n.includes(t.route.length-1)?void 0:n},zL=(t,e)=\u003et.x\u003e=e.minX-bA\u0026\u0026t.x\u003c=e.maxX+bA\u0026\u0026t.y\u003e=e.minY-bA\u0026\u0026t.y\u003c=e.maxY+bA,Lbe=(t,e)=\u003eMath.min(t.x-e.minX,e.maxX-t.x,t.y-e.minY,e.maxY-t.y),uco=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=t.x-e.x,s=o*(t.y-e.y)-i*r;if(Math.abs(s)\u003ebA)return!1;const a=Math.min(e.x,n.x)-bA,A=Math.max(e.x,n.x)+bA,c=Math.min(e.y,n.y)-bA,l=Math.max(e.y,n.y)+bA;return t.x\u003e=a\u0026\u0026t.x\u003c=A\u0026\u0026t.y\u003e=c\u0026\u0026t.y\u003c=l},qJ=(t,e)=\u003e{if(e.length\u003c3)return!0;for(let o=0;o\u003ce.length;o+=1){const i=e[o],r=e[(o+1)%e.length];if(i\u0026\u0026r\u0026\u0026uco(t,i,r))return!0}let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o,o+=1){const r=e[o],s=e[i];!r||!s||r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},x5t=(t,e)=\u003e{const n=Math.hypot(t,e);if(!(n\u003c=Dr))return{x:t/n,y:e/n}},E5t=(t,e)=\u003et.outline\u0026\u0026t.outline.length\u003e=3?((n,o)=\u003e{const i=qJ(n,o);let r;for(let u=0;u\u003co.length;u+=1){const g=o[u],h=o[(u+1)%o.length];if(!g||!h)continue;const d=I5t(n,g,h),p=Math.hypot(n.x-d.x,n.y-d.y);(!r||p\u003cr.distance)\u0026\u0026(r={projection:d,start:g,end:h,distance:p})}if(!r)return;const s=x5t(i?n.x-r.projection.x:r.projection.x-n.x,i?n.y-r.projection.y:r.projection.y-n.y);if(s)return s;const a=r.end.x-r.start.x,A=r.end.y-r.start.y,c=Math.hypot(a,A);if(c\u003c=Dr)return;const l=(u=\u003e{let g=0;for(let h=0;h\u003cu.length;h+=1){const d=u[h],p=u[(h+1)%u.length];d\u0026\u0026p\u0026\u0026(g+=d.x*p.y-p.x*d.y)}return g/2})(o)\u003e=0;return{x:l?-A/c:A/c,y:l?a/c:-a/c}})(e,t.outline):((n,o)=\u003e{const i=n.x-o.minX,r=o.maxX-n.x,s=n.y-o.minY,a=o.maxY-n.y,A=Math.min(i,r,s,a);let c=0,l=0;return i\u003c=A+bA\u0026\u0026(c+=1),r\u003c=A+bA\u0026\u0026(c-=1),s\u003c=A+bA\u0026\u0026(l+=1),a\u003c=A+bA\u0026\u0026(l-=1),x5t(c,l)})(e,t.bounds),B5t=(t,e)=\u003et.outline\u0026\u0026t.outline.length\u003e=3?qJ(e,t.outline):zL(e,t.bounds),ky=(t,e)=\u003e{if(t.outline\u0026\u0026t.outline.length\u003e=3){const n=((o,i)=\u003e{let r=Number.POSITIVE_INFINITY;for(let s=0;s\u003ci.length;s+=1){const a=i[s],A=i[(s+1)%i.length];a\u0026\u0026A\u0026\u0026(r=Math.min(r,wc(o,a,A)))}return r})(e,t.outline);return qJ(e,t.outline)?n:-n}return Lbe(e,t.bounds)},ib=(t,e,n)=\u003e{if(Math.abs(e.x-n.x)\u003c=bA\u0026\u0026Math.abs(e.y-n.y)\u003c=bA)return Math.min(ky(t,e),ky(t,n));if(t.outline\u0026\u0026t.outline.length\u003e=3){if(!qJ(e,t.outline)||!qJ(n,t.outline))return Math.min(ky(t,e),ky(t,n));let o=Number.POSITIVE_INFINITY;for(let i=0;i\u003ct.outline.length;i+=1){const r=t.outline[i],s=t.outline[(i+1)%t.outline.length];r\u0026\u0026s\u0026\u0026(o=Math.min(o,M5(e,n,r,s)))}return o}return zL(e,t.bounds)\u0026\u0026zL(n,t.bounds)?Math.min(Lbe(e,t.bounds),Lbe(n,t.bounds)):Math.min(ky(t,e),ky(t,n))},JL=(t,e)=\u003ee+Math.max(.16,t.defaultObstacleMargin??0,xx.traceClearance),EAe=(t,e,n)=\u003ee\u003ct-bA\u0026\u0026Math.min(t,e)\u003c=n+bA,b5t=(t,e,n,o,i)=\u003e{const r=t*n.x+e*n.y,s=-Math.max(0,o-i);if(r\u003e=s-bA)return{x:t,y:e};const a=s-r;return{x:t+n.x*a,y:e+n.y*a}},Hbe=(t,e,n,o,i)=\u003e{const r=E5t(t,e);return r?b5t(n,o,r,ky(t,e),JL(t,i)):{x:n,y:o}},S5t=(t,e,n,o)=\u003e{const i=[...new Set(n)].sort((A,c)=\u003eA-c);if(i.length===0)return Number.POSITIVE_INFINITY;const r=new Set(i),s=A=\u003eo?.get(A)??e.route[A];let a=Number.POSITIVE_INFINITY;for(const A of i){const c=s(A);c\u0026\u0026(a=Math.min(a,ky(t,c)))}for(let A=0;A\u003ce.route.length-1;A+=1){if(!r.has(A)\u0026\u0026!r.has(A+1))continue;const c=s(A),l=s(A+1);c\u0026\u0026l\u0026\u0026(a=Math.min(a,ib(t,c,l)))}return a},BAe=(t,e,n,o,i,r)=\u003e{const s=[...new Set(n)].sort((g,h)=\u003eg-h);if(s.length===0)return;const a=((g,h,d,p,m,_)=\u003e{const f=[...new Set(d)].sort((y,x)=\u003ey-x);let I={x:p,y:m};const C=JL(g,_);for(let y=0;y\u003cMath.max(1,f.length);y+=1){let x=!1;for(const E of f){const B=h.route[E];if(!B)continue;const S=E5t(g,B);if(!S)continue;const Q=b5t(I.x,I.y,S,ky(g,B),C);(Math.abs(Q.x-I.x)\u003eDr||Math.abs(Q.y-I.y)\u003eDr)\u0026\u0026(I=Q,x=!0)}if(!x)break}return I})(t,e,s,o,i,r);if(Math.abs(a.x)\u003c=Dr\u0026\u0026Math.abs(a.y)\u003c=Dr)return;const A=new Map;for(const g of s){const h=e.route[g];if(!h)continue;const d={x:h.x+a.x,y:h.y+a.y};A.set(g,d)}const c=S5t(t,e,s),l=S5t(t,e,s,A);if(l\u003cr-bA)return;const u=JL(t,r);return EAe(c,l,u)?void 0:a},bAe=(t,e,n,o,i,r,s)=\u003e{const a=t[e];if(!a)return!1;const A=Fbe(a,n);if(!A)return!1;const c=BAe(r,a,A,o,i,s);if(!c)return!1;let l=!1;for(const u of A){const g=a.route[u];g\u0026\u0026(g.x+=c.x,g.y+=c.y,AN(g,r.bounds),l=!0)}return l},Q5t=(t,e,n,o,i,r)=\u003eFbe(e,n)??((s,a,A,c,l,u)=\u003e{const g=a.route[A];if(!g||g.pcb_port_id||A!==0\u0026\u0026A!==a.route.length-1)return;const h=kbe(s,a,g,u);if(!h)return;const d={...g,x:g.x+c,y:g.y+l};return B5t(s,d)\u0026\u0026CAe(d,h)?y5t(a,A):void 0})(t,e,n,o,i,r),v5t=(t,e,n,o,i,r)=\u003e{const s=BAe(i,t,e,n,o,r);if(!s)return!1;let a=!1;for(const A of e){const c=t.route[A];c\u0026\u0026(c.x+=s.x,c.y+=s.y,AN(c,i.bounds),a=!0)}return a},w5t=(t,e,n,o,i,r)=\u003e{const s=e.route[n];if(!s||s.pcb_port_id)return!1;const a=kbe(t,e,s,r);return!!a\u0026\u0026CAe({...s,x:s.x+o,y:s.y+i},a)},gco=(t,e,n,o)=\u003e{const i=e.route[n];if(i\u0026\u0026!i.pcb_port_id)return kbe(t,e,i,o)},P5t=(t,e,n,o,i,r,s)=\u003e{const a=t[e];if(!a||a.route.length===0)return!1;const A=((h,d,p,m,_)=\u003e{let f=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY;for(const x of[0,d.route.length-1]){const E=d.route[x],B=gco(h,d,x,_);if(!E||!B)return;f=Math.max(f,B.center.x-B.width/2-E.x),I=Math.min(I,B.center.x+B.width/2-E.x),C=Math.max(C,B.center.y-B.height/2-E.y),y=Math.min(y,B.center.y+B.height/2-E.y)}if(!(f\u003eI||C\u003ey))return{x:y7(p,f,I),y:y7(m,C,y)}})(i,a,n,o,s);if(!A)return!1;const c=a.route.map((h,d)=\u003ed),l=BAe(i,a,c,A.x,A.y,r);if(!l)return!1;const u=a.route.length-1;if(!w5t(i,a,0,l.x,l.y,s)||!w5t(i,a,u,l.x,l.y,s))return!1;let g=!1;for(const h of a.route)h.x+=l.x,h.y+=l.y,AN(h,i.bounds),g=!0;return g},M5t=(t,e,n)=\u003e{const o=e.x-t.x,i=e.y-t.y,r=n.x-e.x,s=n.y-e.y;return Math.abs(o*s-i*r)\u003c=bA},D5t=(t,e)=\u003e{if(t.z!==e.z)return!1;const n=e.end.x-e.start.x,o=e.end.y-e.start.y,i=t.x-e.start.x,r=t.y-e.start.y;return Math.abs(n*r-o*i)\u003c=bA},dco=(t,e)=\u003e{const n=((i,r)=\u003e{const s=r.end.x-r.start.x,a=r.end.y-r.start.y,A=Math.max(bA,.12*(i.traceThickness??.1)),c=Math.abs(a)\u003c=A,l=Math.abs(s)\u003c=A;let u=r.startIndex,g=r.endIndex;if(c||l){const h=c?(r.start.y+r.end.y)/2:(r.start.x+r.end.x)/2;for(;u\u003e0;){const d=i.route[u-1];if(!d||d.z!==r.z||Math.abs((c?d.y:d.x)-h)\u003eA)break;u-=1}for(;g\u003ci.route.length-1;){const d=i.route[g+1];if(!d||d.z!==r.z||Math.abs((c?d.y:d.x)-h)\u003eA)break;g+=1}return Array.from({length:g-u+1},(d,p)=\u003eu+p)}for(;u\u003e0;){const h=i.route[u-1],d=i.route[u],p=i.route[u+1];if(!(h\u0026\u0026d\u0026\u0026p\u0026\u0026h.z===r.z\u0026\u0026D5t(h,r)\u0026\u0026M5t(h,d,p)))break;u-=1}for(;g\u003ci.route.length-1;){const h=i.route[g-1],d=i.route[g],p=i.route[g+1];if(!(h\u0026\u0026d\u0026\u0026p\u0026\u0026p.z===r.z\u0026\u0026D5t(p,r)\u0026\u0026M5t(h,d,p)))break;g+=1}return Array.from({length:g-u+1},(h,d)=\u003eu+d)})(t,e);if(n.length\u003c=2)return;const o=[];for(const i of n){const r=Fbe(t,i);if(!r)return;o.push(...r)}return[...new Set(o)]},Obe=(t,e)=\u003ee\u003e0\u0026\u0026e\u003ct.route.length-1\u0026\u0026!((n,o)=\u003e{const i=n.route[o];if(!i)return!1;const r=n.route[o-1],s=n.route[o+1];return r\u0026\u0026r.z!==i.z\u0026\u0026j_(r,i)||s\u0026\u0026s.z!==i.z\u0026\u0026j_(s,i)})(t,e),N5t=(t,e,n)=\u003e{const o=t.route[e.startIndex],i=t.route[e.endIndex];return!(!o||!i)\u0026\u0026o.z===e.z\u0026\u0026i.z===e.z\u0026\u0026!!((r,s)=\u003elN(r).maxX\u003e=s.minX-bA\u0026\u0026lN(r).minX\u003c=s.maxX+bA\u0026\u0026lN(r).maxY\u003e=s.minY-bA\u0026\u0026lN(r).minY\u003c=s.maxY+bA)(e,n)\u0026\u0026(Obe(t,e.startIndex)||Obe(t,e.endIndex))},hco=(t,e,n,o,i,r,s)=\u003e{const a=t[e.routeIndex];if(!a)return!1;const A=((c,l,u,g)=\u003e{const h=cN(_5t(u),g);let d=l.startIndex,p=l.startIndex;for(;d\u003e0;){const _={...l,startIndex:d-1,endIndex:d,start:c.route[d-1],end:c.route[d]};if(!c.route[d-1]||!N5t(c,_,h))break;d-=1}for(;p\u003cc.route.length-2;){const _={...l,startIndex:p+1,endIndex:p+2,start:c.route[p+1],end:c.route[p+2]};if(!c.route[p+2]||!N5t(c,_,h))break;p+=1}const m=[];for(let _=d;_\u003c=p+1;_+=1)Obe(c,_)\u0026\u0026m.push(_);return[...new Set(m)]})(a,e,n,o);return!(A.length\u003c=2)\u0026\u0026v5t(a,A,i,r,s,e.radius)},R5t=(t,e)=\u003e{const n=G5(e,t),o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i),s=t.end.x-t.start.x,a=t.end.y-t.start.y,A=Math.hypot(s,a),c=t.routeIndex%2==0?1:-1;return{projection:n,direction:r\u003eDr?{x:o/r,y:i/r}:A\u003eDr?{x:-a/A*c,y:s/A*c}:{x:1,y:0}}},Gbe=(t,e,n,o,i)=\u003e{const r=t[e.routeIndex];if(!r)return!1;const s=Hbe(i,e,n,o,e.radius);if(Math.abs(s.x)\u003c=Dr\u0026\u0026Math.abs(s.y)\u003c=Dr)return!1;const a={x:e.x+s.x,y:e.y+s.y},A=ky(i,e),c=ky(i,a);if(c\u003ce.radius-bA)return!1;const l=JL(i,e.radius);if(EAe(A,c,l))return!1;e.x+=s.x,e.y+=s.y,AN(e,i.bounds);for(const u of e.pointIndexes){const g=r.route[u];g\u0026\u0026(g.x=e.x,g.y=e.y)}return!0},T5t=(t,e)=\u003e{const n=Iv(t),o=n.find(i=\u003ei.routeIndex===e.routeIndex\u0026\u0026i.pointIndexes.some(r=\u003ee.pointIndexes.includes(r)));return o?n.filter(i=\u003ei.rootConnectionName===o.rootConnectionName\u0026\u0026Math.hypot(i.x-o.x,i.y-o.y)\u003c=bA):[]},WL=(t,e,n,o,i)=\u003ee.movable\u0026\u0026T5t(t,e).length\u003c=1\u0026\u0026Gbe(t,e,n,o,i),pco=(t,e,n,o,i=1)=\u003e{const{projection:r,direction:s}=R5t(e,n),a=IJ*i,A=1-r.t,c=r.t,l=bAe(t,e.routeIndex,e.startIndex,s.x*a*A,s.y*a*A,o,e.radius),u=bAe(t,e.routeIndex,e.endIndex,s.x*a*c,s.y*a*c,o,e.radius);return!(!l\u0026\u0026!u)||((g,h,d,p,m)=\u003e{const _=g[h.routeIndex];if(!_)return!1;const{projection:f,direction:I}=R5t(h,d),C=Hbe(p,f,I.x*IJ*m,I.y*IJ*m,h.radius);if(Math.abs(C.x)\u003c=Dr\u0026\u0026Math.abs(C.y)\u003c=Dr)return!1;const y={..._.route[h.startIndex],x:f.x+C.x,y:f.y+C.y};if(AN(y,p.bounds),wc(y,h.start,h.end)\u003c=bA)return!1;const x=_.route[h.startIndex],E=_.route[h.endIndex];if(!x||!E)return!1;const B=ib(p,x,E),S=Math.min(ky(p,y),ib(p,x,y),ib(p,y,E));if(S\u003ch.radius-bA)return!1;const Q=JL(p,h.radius);return!EAe(B,S,Q)\u0026\u0026(_.route.splice(h.endIndex,0,y),!0)})(t,e,n,o,i)},mco=(t,e,n,o,i,r=1)=\u003e{const s=e.radius+A8e(o)+My,a=O5t(e,n,s);if(!a)return!1;const A=Math.min(.3*Math.abs(r),a.penetration+My),c=a.direction.x*A,l=a.direction.y*A,u=t[e.routeIndex];if(!u)return!1;const g=!(S=\u003e{for(let Q=0;Q\u003cS.route.length-1;Q+=1){const w=S.route[Q],M=S.route[Q+1];if(w\u0026\u0026M\u0026\u0026w.z!==M.z\u0026\u0026j_(w,M))return!0}return!1})(u);if(g\u0026\u0026P5t(t,e.routeIndex,c,l,o,e.radius,i)||hco(t,e,n,s,c,l,o)||((S,Q,w,M,k)=\u003e{const R=S[Q.routeIndex];if(!R)return!1;const F=dco(R,Q);return!!F\u0026\u0026v5t(R,F,w,M,k,Q.radius)})(t,e,c,l,o)||((S,Q,w,M,k,R)=\u003e{const F=S[Q.routeIndex];if(!F)return!1;const O=Q5t(k,F,Q.startIndex,w,M,R),U=Q5t(k,F,Q.endIndex,w,M,R);if(!O||!U)return!1;const Y=[...new Set([...O,...U])],W=BAe(k,F,Y,w,M,Q.radius);if(!W)return!1;let te=!1;for(const j of Y){const J=F.route[j];J\u0026\u0026(J.x+=W.x,J.y+=W.y,AN(J,k.bounds),te=!0)}return te})(t,e,c,l,o,i)||!g\u0026\u0026P5t(t,e.routeIndex,c,l,o,e.radius,i))return!0;const d=n.width/2,p=n.height/2,m=(Math.abs(a.direction.y)\u003e=Math.abs(a.direction.x)?[{...u.route[e.startIndex],x:n.center.x-d-s,y:n.center.y+a.direction.y*(p+s)},{...u.route[e.startIndex],x:n.center.x+d+s,y:n.center.y+a.direction.y*(p+s)}]:[{...u.route[e.startIndex],x:n.center.x+a.direction.x*(d+s),y:n.center.y-p-s},{...u.route[e.startIndex],x:n.center.x+a.direction.x*(d+s),y:n.center.y+p+s}]).map(S=\u003e{const{t:Q}=G5(S,e),w={x:e.start.x+(e.end.x-e.start.x)*Q,y:e.start.y+(e.end.y-e.start.y)*Q},M=Hbe(o,w,S.x-w.x,S.y-w.y,e.radius);return S.x=w.x+M.x,S.y=w.y+M.y,AN(S,o.bounds),{point:S,t:Q,moved:Math.abs(M.x)\u003eDr||Math.abs(M.y)\u003eDr,awayFromObstacleMotion:M.x*a.direction.x+M.y*a.direction.y}}).sort((S,Q)=\u003eS.t-Q.t);if(!m.some(({moved:S})=\u003eS)||!m.some(({awayFromObstacleMotion:S})=\u003eS\u003ebA))return!1;const _=m.map(({point:S})=\u003eS);if(_.every(S=\u003ewc(S,e.start,e.end)\u003c=bA)||_.some(S=\u003e!B5t(o,S)))return!1;const f=u.route[e.startIndex],I=u.route[e.endIndex],C=_[0],y=_[1];if(!(f\u0026\u0026I\u0026\u0026C\u0026\u0026y))return!1;const x=ib(o,f,I),E=Math.min(ky(o,C),ky(o,y),ib(o,f,C),ib(o,C,y),ib(o,y,I));if(E\u003ce.radius-bA)return!1;const B=JL(o,e.radius);return!EAe(x,E,B)\u0026\u0026(u.route.splice(e.endIndex,0,..._),!0)},B7=(t,e,n)=\u003e{let o;for(const i of t){if(n!==void 0\u0026\u0026i.routeIndex!==n)continue;const r=G5(e,i),s=Math.hypot(r.x-e.x,r.y-e.y);(!o||s\u003co.distance)\u0026\u0026(o={segment:i,distance:s})}return o?.segment},XJ=(t,e,n)=\u003e{let o;for(const i of t){if(n!==void 0\u0026\u0026i.routeIndex!==n)continue;const r=Math.hypot(i.x-e.x,i.y-e.y);(!o||r\u003co.distance)\u0026\u0026(o={via:i,distance:r})}return o?.via},_co=(t,e)=\u003e{const n=t.map(o=\u003e({via:o,distance:Math.hypot(o.x-e.x,o.y-e.y)})).sort((o,i)=\u003eo.distance-i.distance).slice(0,2).map(({via:o})=\u003eo);return n.length===2?n:void 0},Ybe=(t,e,n,o)=\u003e{const i=e.x-n.x,r=e.y-n.y,s=Math.hypot(i,r);return WL(t,e,(s\u003eDr?i/s:1)*IJ,(s\u003eDr?r/s:0)*IJ,o)},k5t=(t,e)=\u003e{const n=G5(t.start,e),o=G5(t.end,e),i=G5(e.start,t),r=G5(e.end,t);return[{leftT:0,rightT:n.t,leftPoint:t.start,rightPoint:n},{leftT:1,rightT:o.t,leftPoint:t.end,rightPoint:o},{leftT:i.t,rightT:0,leftPoint:i,rightPoint:e.start},{leftT:r.t,rightT:1,leftPoint:r,rightPoint:e.end}].sort((s,a)=\u003eMath.hypot(s.leftPoint.x-s.rightPoint.x,s.leftPoint.y-s.rightPoint.y)-Math.hypot(a.leftPoint.x-a.rightPoint.x,a.leftPoint.y-a.rightPoint.y))},ZJ=(t,e,n,o,i,r)=\u003e{const s=y7(r,0,1),a=1-s,A=s,c=bAe(t,e.routeIndex,e.startIndex,n*a,o*a,i,e.radius),l=bAe(t,e.routeIndex,e.endIndex,n*A,o*A,i,e.radius);return c||l},F5t=(t,e,n,o,i,r=.035,s=!1)=\u003e{if(!s\u0026\u0026AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const a=e.radius+n.radius+.2+My,A=e.x-n.x,c=e.y-n.y,l=Math.hypot(A,c),u=a-l;if(u\u003c=0)return!1;const g=1.618*(97*e.routeIndex+13*n.routeIndex),h=l\u003eDr?A/l:Math.cos(g),d=l\u003eDr?c/l:Math.sin(g),p=Number(e.movable)+Number(n.movable);if(p===0)return!1;const m=Math.min(r,u/p),_=WL(t,e,h*m,d*m,o),f=WL(t,n,-h*m,-d*m,o);return _||f},fco=(t,e,n,o,i)=\u003e{if(!AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const[r,s]=e.canCanonicalize?n.canCanonicalize\u0026\u0026e.routeIndex\u003c=n.routeIndex?[e,n]:[n,e]:[e,n];return((a,A,c,l)=\u003e{if(!c.canCanonicalize)return!1;const u=A.x-c.x,g=A.y-c.y;if(!c.movable\u0026\u0026Math.hypot(u,g)\u003ec.radius+bA)return!1;const h=a[c.routeIndex];if(!h)return!1;const d={x:c.x,y:c.y},p=c.pointIndexes.map(m=\u003e{const _=h.route[m];return _?{pointIndex:m,x:_.x,y:_.y}:void 0});if(Gbe(a,c,u,g,l)\u0026\u0026j_(c,A))return!0;c.x=d.x,c.y=d.y;for(const m of p){if(!m)continue;const _=h.route[m.pointIndex];_\u0026\u0026(_.x=m.x,_.y=m.y)}return!1})(t,r,s,o)},Ube=(t,e,n,o,i,r=.035,s=2,a=!1)=\u003e{if(AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const A=G5(e,n),c=e.x-A.x,l=e.y-A.y,u=Math.hypot(c,l),g=e.radius+n.radius+xx.traceClearance+My-u;if(g\u003c=0)return!1;const h=n.end.x-n.start.x,d=n.end.y-n.start.y,p=Math.hypot(h,d),m=e.routeIndex%2==0?1:-1,_=u\u003eDr?c/u:p\u003eDr?-d/p*m:1,f=u\u003eDr?l/u:p\u003eDr?h/p*m:0,I=Math.min(r,g/s),C=a?((x,E,B,S,Q)=\u003e{const w=T5t(x,E);if(w.length===0||w.some(k=\u003e!k.movable||x[k.routeIndex]===void 0))return!1;const M=w.reduce((k,R)=\u003eR.radius\u003ek.radius?R:k);if(!Gbe(x,M,B,S,Q))return!1;for(const k of w){if(k===M)continue;k.x=M.x,k.y=M.y;const R=x[k.routeIndex];for(const F of k.pointIndexes){const O=R.route[F];O\u0026\u0026(O.x=M.x,O.y=M.y)}}return!0})(t,e,_*I,f*I,o):WL(t,e,_*I,f*I,o),y=ZJ(t,n,-_*I,-f*I,o,A.t);return C||y},L5t=(t,e,n,o,i)=\u003e{if(e.z!==n.z||AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const[r]=k5t(e,n);if(!r)return!1;const s=r.leftPoint.x-r.rightPoint.x,a=r.leftPoint.y-r.rightPoint.y,A=Math.hypot(s,a),c=e.radius+n.radius+xx.traceClearance+My-A;if(c\u003c=0)return!1;const l=e.end.x-e.start.x,u=e.end.y-e.start.y,g=Math.hypot(l,u),h=(e.routeIndex+n.routeIndex)%2==0?1:-1,d=A\u003eDr?s/A:g\u003eDr?-u/g*h:1,p=A\u003eDr?a/A:g\u003eDr?l/g*h:0,m=Math.min(CJ,c/2),_=ZJ(t,e,d*m,p*m,o,r.leftT),f=ZJ(t,n,-d*m,-p*m,o,r.rightT);return _||f},eW=(t,e,n)=\u003eVL(t,n).includes(e.z),H5t=(t,e,n,o,i)=\u003e{const r=e[n];if(!r)return;const s=fAe(r,n);if(s.length===0)return;const a=aB(r),A=B7(s,o);if(!A)return;const c=yAe(t,o,.6,g=\u003e!Ry(a,g,i)\u0026\u0026eW(g,A,t.layerCount));if(c)return{obstacle:c,segment:A};const l=yAe(t,o,.6,g=\u003e!Ry(a,g,i)\u0026\u0026s.some(h=\u003eeW(g,h,t.layerCount)));if(!l)return;const u=B7(s.filter(g=\u003eeW(l,g,t.layerCount)),o);return u?{obstacle:l,segment:u}:void 0},O5t=(t,e,n)=\u003e{const o=e.width/2,i=e.height/2,r=[{x:e.center.x-o,y:e.center.y-i},{x:e.center.x+o,y:e.center.y-i},{x:e.center.x+o,y:e.center.y+i},{x:e.center.x-o,y:e.center.y+i}],s=[e.center,...r].map(l=\u003eG5(l,t)),a=[{point:t.start,t:0},{point:t.end,t:1},{point:{x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2},t:.5},...s.map(l=\u003e({point:{x:l.x,y:l.y},t:l.t}))];let A;const c=Math.hypot(t.end.x-t.start.x,t.end.y-t.start.y);for(const l of a){const u=xAe(l.point,e,n);if(!u)continue;const g=c\u003eDr?Math.abs(((t.end.x-t.start.x)*u.direction.y-(t.end.y-t.start.y)*u.direction.x)/c):0;(!A||u.penetration\u003eA.penetration+Dr||Math.abs(u.penetration-A.penetration)\u003c=Dr\u0026\u0026g\u003eA.normality)\u0026\u0026(A={...u,normality:g,t:l.t})}return A},Ico=(t,e,n,o=!1)=\u003e{let i=!1;const r=Iv(e),s=$J(e),a=f5t(t,r,s),A=Math.max(1,2*a),c=Nbe(r,IAe,A),l=Nbe(s,lN,A);for(let u=0;u\u003cr.length;u+=1){const g=r[u];if(!g)continue;const h=YL(c,cN(IAe(g),a),A);for(const d of h){if(d\u003c=u)continue;const p=r[d];p\u0026\u0026(i=F5t(e,g,p,t,n,CJ,o)||i)}}for(let u=0;u\u003cr.length;u+=1){const g=r[u];if(!g)continue;const h=YL(l,cN(IAe(g),a),A);for(const d of h){const p=s[d];p\u0026\u0026(i=Ube(e,g,p,t,n)||i)}}for(let u=0;u\u003cs.length;u+=1){const g=s[u];if(!g)continue;const h=YL(l,cN(lN(g),a),A);for(const d of h){if(d\u003c=u)continue;const p=s[d];p\u0026\u0026(i=L5t(e,g,p,t,n)||i)}}return((u,g,h,d,p,m,_,f)=\u003e{let I=!1;const C=u.minTraceWidth/2+A8e(u)+My,y=(u.minViaDiameter??.3)/2+c8e(u)+My;for(const x of u.obstacles){if(x.isCopperPour)continue;const E=_5t(x),B=YL(p,cN(E,y),_);for(const Q of B){const w=h[Q];if(!w||Ry(w.rootConnectionName,x,f))continue;const M=xAe(w,x,y);if(!M)continue;const k=Math.min(CJ,M.penetration);I=WL(g,w,M.direction.x*k,M.direction.y*k,u)||I}const S=YL(m,cN(E,C),_);for(const Q of S){const w=d[Q];if(!w||Ry(w.rootConnectionName,x,f)||!eW(x,w,u.layerCount))continue;const M=O5t(w,x,C);if(!M)continue;const k=Math.min(CJ,M.penetration);I=ZJ(g,w,M.direction.x*k,M.direction.y*k,u,M.t)||I}}return I})(t,e,r,s,c,l,A,n)||i},G5t=(t,e,n,o=1,i,r=!1,s=!0)=\u003e{const a=x7(e),A=Math.max(2,Math.round(12*Math.max(1,n)*o));let c=!1;for(let l=0;l\u003cA\u0026\u0026Ico(t,a,i,r);l+=1)c=!0;return c\u0026\u0026s\u0026\u0026((l,u,g)=\u003e{let h=!1;const d=Iv(u),p=$J(u),m=f5t(l,d,p),_=Math.max(1,2*m),f=Nbe(p,lN,_);for(const I of d){const C=YL(f,cN(IAe(I),m),_);for(const y of C){const x=p[y];x\u0026\u0026(h=Ube(u,I,x,l,g,CJ,1.75)||h)}}})(t,a,i),c?rb(a):e},Cco=t=\u003e{const e=[];for(let n=0;n\u003ct.route.length-1;n+=1){const o=t.route[n],i=t.route[n+1];if(!o||!i||o.toNextSegmentType===\"through_obstacle\"||o.z===i.z||!j_(o,i))continue;const r={x:o.x,y:o.y},s=e.at(-1);s\u0026\u0026j_(s,r)||e.push(r)}return e},Y5t=t=\u003e({...t,vias:Cco(t)}),rb=t=\u003et.map(Y5t),jL=(t,e)=\u003e{const n=new Set(e);return t.map((o,i)=\u003en.has(i)?Y5t(o):o)},U5t=t=\u003e{const e=t.pcb_trace_id;if(typeof e!=\"string\")return;const n=e.match(/^trace_(\\d+)/);return n?Number.parseInt(n[1],10):void 0},tW=t=\u003e{const e=t.center??t.pcb_center;if(!e||typeof e!=\"object\")return;const n=e;return typeof n.x==\"number\"\u0026\u0026typeof n.y==\"number\"?{x:n.x,y:n.y}:void 0},Kbe=(t,e=!0)=\u003et.errors.filter(n=\u003e(o=\u003eTy(o)===\"pcb_via_clearance_error\"||Array.isArray(o.pcb_via_ids))(n)\u0026\u0026(e||!Ex(n))).length,Ex=t=\u003eTy(t)===\"pcb_pad_pad_clearance_error\"\u0026\u0026Array.isArray(t.pcb_via_ids)\u0026\u0026t.pcb_via_ids.length===1,K5t=t=\u003e{const e=Object.entries(t).filter(([o,i])=\u003eo!==\"source_trace_id\"\u0026\u0026(o.endsWith(\"_id\")||o.endsWith(\"_ids\"))\u0026\u0026i!==void 0\u0026\u0026i!==\"\").sort(([o],[i])=\u003eo.localeCompare(i)),n=typeof t.message==\"string\"?t.message.replace(/-?\\d+\\.\\d+/g,\"#\"):\"\";return JSON.stringify([Ty(t),e,n])},Bx=t=\u003eMath.max(t.errors.filter(e=\u003e!Ex(e)).length,t.count-t.errors.filter(Ex).length),V5t=t=\u003e{const e=Bx(t);return e\u003e0?e:t.count},z5t=t=\u003e{if(Bx(t)===0)return t.issueScore;const e=t.errors.filter(n=\u003e!Ex(n));return t.errors.some(Ex)?KL(e):t.legacyIssueScore??KL(e)},nW=(t,e)=\u003e{const n=Bx(t),o=Bx(e);return n!==o?n\u003co:!(n\u003e0)\u0026\u0026t.count\u003ce.count},J5t=t=\u003e{const e=t.filter(n=\u003e!Ex(n));return e.length\u003e0?e:t},uN=(t,e)=\u003e{const n=t.pcb_trace_id;return typeof n==\"string\"?e.get(n)??U5t(t):U5t(t)},$L=(t,e,n,o,i)=\u003e{const r=n.pcb_port_id;if(!r)return!1;const s=(i??e.viaDiameter)/2;return t.obstacles.some(a=\u003e{const A=VL(a,t.layerCount);return!(A.length!==1||A[0]!==n.z||!a.connectedTo.includes(r)||n.x-s\u003ca.center.x-a.width/2-Dr||n.x+s\u003ea.center.x+a.width/2+Dr||n.y-s\u003ca.center.y-a.height/2-Dr||n.y+s\u003ea.center.y+a.height/2+Dr)\u0026\u0026(Ry(aB(e),a,o)||Ry(e.connectionName,a,o))})},W5t=[0,1,-1,2,-2,3,-3,4],j5t=W5t.flatMap(t=\u003eW5t.map(e=\u003e[t,e])).sort(([t,e],[n,o])=\u003eMath.abs(t)+Math.abs(e)-Math.abs(n)-Math.abs(o)),$5t=j5t.length,q5t=(t,e,n)=\u003et.x-e\u003e=n.minX-Dr\u0026\u0026t.x+e\u003c=n.maxX+Dr\u0026\u0026t.y-e\u003e=n.minY-Dr\u0026\u0026t.y+e\u003c=n.maxY+Dr,Y5=(t,e)=\u003e{const n=t.at(-1);n\u0026\u0026j_(n,e)\u0026\u0026n.z===e.z\u0026\u0026n.pcb_port_id===e.pcb_port_id||t.push(e)},yco=(t,e,n,o,i,r,s,a=0)=\u003e{const A=Ty(n);if(A!==\"pcb_pad_trace_clearance_error\"\u0026\u0026A!==\"pcb_trace_error\"||i\u003c0||i\u003e=t.layerCount)return!1;const c=e[o];if(!c||c.route.length\u003c2)return!1;const l=c.route.map(U=\u003e({...U})),u=l[0],g=l.at(-1);if(!u||!g)return!1;const h=tW(n);if(!h)return!1;const d=Rbe(n),p=d?H5t(t,e,o,h,s):void 0,m=d?p?.segment:B7(fAe(c,o),h);if(!m||m.z===i)return!1;let _=m.startIndex,f=m.endIndex;const I=r===\"full\"?l.length:r;for(let U=0;U\u003cI;U+=1){let Y=!1;if(l[_-1]?.z===m.z\u0026\u0026(_-=1,Y=!0),l[f+1]?.z===m.z\u0026\u0026(f+=1,Y=!0),!Y)break}const C=_===0\u0026\u0026u.pcb_port_id,y=f===l.length-1\u0026\u0026g.pcb_port_id,x=c.viaDiameter/2,E=j5t[a%$5t],B=U=\u003e{const Y=U===\"start\"?u:g,W=((J,oe,ie,ne)=\u003e{const le=ie.pcb_port_id;if(le)return J.obstacles.find(ge=\u003e{const _e=VL(ge,J.layerCount);return!(_e.length!==1||_e[0]!==ie.z||!ge.connectedTo.includes(le)||!CAe(ie,ge))\u0026\u0026(Ry(aB(oe),ge,ne)||Ry(oe.connectionName,ge,ne))})})(t,c,Y,s),te=((J,oe)=\u003e{const ie=oe===\"start\"?J[0]:J.at(-1);if(!ie)return;const ne=oe===\"start\"?Array.from({length:J.length-1},(le,ge)=\u003ege+1):Array.from({length:J.length-1},(le,ge)=\u003eJ.length-ge-2);for(const le of ne){const ge=J[le];if(!ge)continue;const _e=ge.x-ie.x,ue=ge.y-ie.y,fe=Math.hypot(_e,ue);if(!(fe\u003c=Dr))return{x:_e/fe,y:ue/fe}}})(l,U);if(!W||!te)return;const j=((J,oe,ie,ne)=\u003e{let le=0,ge=Math.hypot(oe.width,oe.height)+2*ne;const _e=ne+Dr,ue=fe=\u003e({x:J.x+ie.x*fe,y:J.y+ie.y*fe});if(!(Cv(ue(ge),oe)\u003c_e)){for(;ge-le\u003eDr;){const fe=(le+ge)/2;Cv(ue(fe),oe)\u003e=_e?ge=fe:le=fe}return ue(ge)}})(Y,W,((J,oe)=\u003e{const ie=oe*Math.PI/4,ne=Math.cos(ie),le=Math.sin(ie);return{x:J.x*ne-J.y*le,y:J.x*le+J.y*ne}})(te,U===\"start\"?E[0]:E[1]),x);return!j||!q5t(j,x,t.bounds)||Cv(j,W)+Dr\u003cx?void 0:j},S=C?B(\"start\"):void 0,Q=y?B(\"end\"):void 0;if(C\u0026\u0026!S||y\u0026\u0026!Q)return!1;const w=[];for(let U=0;U\u003c_;U+=1)Y5(w,l[U]);const M=l[_],k=_\u003e0\u0026\u0026j_(l[_-1],M),R=l[f],F=f\u003cl.length-1\u0026\u0026j_(l[f+1],R);C?(Y5(w,u),Y5(w,{...u,...S,pcb_port_id:void 0}),Y5(w,{...u,...S,z:i,pcb_port_id:void 0})):(k||Y5(w,{...M,pcb_port_id:void 0}),Y5(w,{...M,z:i,pcb_port_id:void 0}));const O=y?f-1:f;for(let U=_+1;U\u003c=O;U+=1)Y5(w,{...l[U],z:i,pcb_port_id:void 0});y?(Y5(w,{...g,...Q,z:i,pcb_port_id:void 0}),Y5(w,{...g,...Q,pcb_port_id:void 0}),Y5(w,g)):F||Y5(w,{...R,pcb_port_id:void 0});for(let U=f+1;U\u003cl.length;U+=1)Y5(w,l[U]);for(let U=1;U\u003cw.length-1;U+=1)w[U].pcb_port_id=void 0;return c.route=w,!0},xco=(t,e,n,o,i,r,s)=\u003e{const a=Ty(n);if(a!==\"pcb_pad_trace_clearance_error\"\u0026\u0026a!==\"pcb_trace_error\"||i\u003c0||i\u003e=t.layerCount)return!1;const A=uN(n,o);if(A===void 0)return!1;const c=e[A];if(!c||c.route.length\u003c2)return!1;const l=c.route[0],u=c.route.at(-1);if(!l||!u||l.z!==u.z||i===l.z||c.route.some(h=\u003eh.z!==l.z)||!l.pcb_port_id||!u.pcb_port_id||!$L(t,c,l,r,s)||!$L(t,c,u,r,s))return!1;const g=c.route.map(h=\u003e({...h}));return c.route=[g[0],{...g[0],z:i,pcb_port_id:void 0},...g.slice(1,-1).map(h=\u003e({...h,z:i})),{...g.at(-1),z:i,pcb_port_id:void 0},g.at(-1)],!0},Eco=(t,e,n,o,i,r,s)=\u003e{if(Ty(n)!==\"pcb_pad_trace_clearance_error\")return!1;const a=uN(n,o);if(a===void 0)return!1;const A=e[a];if(!A||A.route.length\u003c4)return!1;const c=A.route.map(m=\u003e({...m}));if(i===\"start\"){const m=c[0];if(!$L(t,A,m,r,s))return!1;let _=-1;for(let x=1;x\u003cc.length;x+=1)if(c[x].z!==m.z){_=x;break}if(_\u003c=0)return!1;const f=_-1;if(!j_(c[f],c[_]))return!1;let I=_;for(;I+1\u003cc.length\u0026\u0026j_(c[_],c[I+1]);)I+=1;const C=c[I].z,y=c.slice(f,I+1).map(x=\u003ex.z);return A.route=[m,...y.slice(1).map(x=\u003e({...m,z:x,pcb_port_id:void 0})),...c.slice(1,f+1).map(x=\u003e({...x,z:C})),...c.slice(I+1)],!0}const l=c.at(-1);if(!$L(t,A,l,r,s))return!1;let u=-1;for(let m=c.length-2;m\u003e=0;m-=1)if(c[m].z!==l.z){u=m;break}if(u\u003c0||u\u003e=c.length-1)return!1;const g=u+1;if(!j_(c[u],c[g]))return!1;let h=u;for(;h-1\u003e=0\u0026\u0026j_(c[u],c[h-1]);)h-=1;const d=c[h].z,p=c.slice(h,g+1).map(m=\u003em.z);return A.route=[...c.slice(0,h+1),...c.slice(g+1,-1).map(m=\u003e({...m,z:d})),{...l,z:d,pcb_port_id:void 0},...p.slice(1,-1).map(m=\u003e({...l,z:m,pcb_port_id:void 0})),l],!0},oW=(t,e)=\u003e{const n=t.pcb_trace_id;if(typeof n!=\"string\"||Array.isArray(t.pcb_via_ids)\u0026\u0026t.pcb_via_ids.length\u003e0)return;const o=Array.isArray(t.pcb_trace_ids)?t.pcb_trace_ids.filter(c=\u003etypeof c==\"string\"):[],i=t.pcb_trace_error_id,r=`overlap_${n}_`,s=typeof i==\"string\"\u0026\u0026i.startsWith(r)?i.slice(r.length):void 0,a=[n,...o,...s?[s]:[]],A=[...new Set(a.map(c=\u003ee.get(c)).filter(c=\u003ec!==void 0))];return A.length\u003e=2?[A[0],A[1]]:void 0},Bco=(t,e,n,o,i)=\u003e{if(Ty(n)!==\"pcb_trace_error\")return;const r=oW(n,o);if(!r)return;const s=n.worst_contact_center??n.center;if(!s||typeof s!=\"object\")return;const a=s;if(typeof a.x!=\"number\"||typeof a.y!=\"number\")return;const A={x:a.x,y:a.y},c=$J(e),l=B7(c,A,r[0]),u=B7(c,A,r[1]);if(!l||!u||l.z!==u.z)return;const[g]=k5t(l,u);if(!g)return;const h=g.leftPoint.x-g.rightPoint.x,d=g.leftPoint.y-g.rightPoint.y,p=Math.hypot(h,d),m=Number(n.minimum_clearance),_=Number.isFinite(m)?m:xx.traceClearance,f=l.radius+u.radius+_-p;if(f\u003c=Dr)return;const I=i===0?l:u,C=i===0?g.leftT:g.rightT,y=(1-C)**2+C**2;if(y\u003c=Dr)return;const x=f/y,E=i===0?g.leftPoint:g.rightPoint,B=i===0?g.rightPoint:g.leftPoint,S=i===0?1:-1,Q=I.end.x-I.start.x,w=I.end.y-I.start.y,M=Math.hypot(Q,w),k=(I.routeIndex+(i===0?u.routeIndex:l.routeIndex))%2==0?1:-1,R=p\u003eDr?(E.x-B.x)/p:M\u003eDr?-w/M*k*S:S,F=p\u003eDr?(E.y-B.y)/p:M\u003eDr?Q/M*k*S:0;return ZJ(e,I,R*x,F*x,t,C)?{movedRouteIndex:I.routeIndex}:void 0},bco=t=\u003e{const{srj:e,via:n,segment:o,initialTarget:i,requiredTraceDistance:r,requiredObstacleDistance:s,connMap:a}=t,A=e.obstacles.filter(u=\u003e!u.isCopperPour\u0026\u0026!Ry(n.rootConnectionName,u,a)\u0026\u0026VL(u,e.layerCount).some(g=\u003en.zLayers.includes(g))),c=A.filter(u=\u003e!!xAe(i,u,s));return[i,...c.flatMap(u=\u003e(g=\u003e{const{point:h,obstacle:d,requiredDistance:p}=g,m=d.center.x-d.width/2,_=d.center.x+d.width/2,f=d.center.y-d.height/2,I=d.center.y+d.height/2,C=Math.max(m-h.x,h.x-_,0),y=Math.max(f-h.y,h.y-I,0),x=[];if(C\u003cp){const E=Math.sqrt(p*p-C*C);x.push({x:h.x,y:f-E-Dr},{x:h.x,y:I+E+Dr})}if(y\u003cp){const E=Math.sqrt(p*p-y*y);x.push({x:m-E-Dr,y:h.y},{x:_+E+Dr,y:h.y})}return x})({point:i,obstacle:u,requiredDistance:s}))].filter(u=\u003e{if(!q5t(u,n.radius,e.bounds))return!1;const g=G5(u,o);return!(Math.hypot(u.x-g.x,u.y-g.y)\u003cr-Dr)\u0026\u0026A.every(h=\u003eCv(u,h)\u003e=s-Dr)}).sort((u,g)=\u003eMath.hypot(u.x-n.x,u.y-n.y)-Math.hypot(g.x-n.x,g.y-n.y))[0]},Sco=(t,e,n,o,i,r)=\u003e{if(Ty(n)!==\"pcb_trace_error\")return!1;const s=typeof n.pcb_trace_error_id==\"string\"?n.pcb_trace_error_id.toLowerCase():\"\",a=typeof n.message==\"string\"?n.message.toLowerCase():\"\";if(!(typeof n.pcb_via_id==\"string\"||Array.isArray(n.pcb_via_ids)||s.includes(\"_via_\")||a.includes(\"via\"))||uN(n,o)!==i||oW(n,o))return!1;const A=n.worst_contact_center??n.center;if(!A||typeof A!=\"object\")return!1;const c=A;if(typeof c.x!=\"number\"||typeof c.y!=\"number\")return!1;const l={x:c.x,y:c.y},u=B7($J(e),l,i),g=XJ(Iv(e),l);if(!u||!g||!g.movable||AB(g.rootConnectionName,u.rootConnectionName,r))return!1;const h=G5(g,u),d=g.x-h.x,p=g.y-h.y,m=Math.hypot(d,p),_=Number(n.minimum_clearance),f=Number.isFinite(_)?_:xx.traceClearance,I=g.radius+u.radius+f-m;if(I\u003c=Dr)return!1;const C=u.end.x-u.start.x,y=u.end.y-u.start.y,x=Math.hypot(C,y),E=g.routeIndex%2==0?1:-1,B=m\u003eDr?d/m:x\u003eDr?-y/x*E:1,S=m\u003eDr?p/m:x\u003eDr?C/x*E:0,Q=g.radius+u.radius+f+My,w=g.radius+c8e(t)+My,M={x:g.x+B*(I+My),y:g.y+S*(I+My)},k=bco({srj:t,via:g,segment:u,initialTarget:M,requiredTraceDistance:Q,requiredObstacleDistance:w,connMap:r});return!!k\u0026\u0026WL(e,g,k.x-g.x,k.y-g.y,t)},Vbe=(t,e,n)=\u003e{if(Ty(e)!==\"pcb_trace_error\")return;const o=tW(e),i=t[n];if(!o||!i)return;const r=B7(fAe(i,n),o);return r?{center:o,route:i,segment:r}:void 0},X5t=(t,e,n,o)=\u003e{const i=Vbe(t,e,n);if(!i)return;const{route:r,segment:s}=i,a=Math.max(0,s.startIndex-o),A=Math.min(r.route.length-1,s.endIndex+o),c=r.route.slice(a,A+1),l=c[0],u=c.at(-1);return l\u0026\u0026u\u0026\u0026!c.some(g=\u003eg.z!==l.z)\u0026\u0026l.z===u.z?{route:r,spanStartIndex:a,spanEndIndex:A,start:l,end:u}:void 0},Qco=(t,e,n,o,i,r,s=0,a,A)=\u003e{if(r\u003c0||r\u003e=t.layerCount)return!1;const c=oW(n,o);if(!c)return!1;const l=c[i],u=Vbe(e,n,l);if(!u||u.segment.z===r)return!1;const{route:g,segment:h}=u;let d=h.startIndex,p=h.endIndex;for(let I=0;I\u003cs;I+=1)g.route[d-1]?.z===h.z\u0026\u0026(d-=1),g.route[p+1]?.z===h.z\u0026\u0026(p+=1);if(d===0\u0026\u0026g.route[0]?.pcb_port_id\u0026\u0026!$L(t,g,g.route[0],a,A)||p===g.route.length-1\u0026\u0026g.route.at(-1)?.pcb_port_id\u0026\u0026!$L(t,g,g.route.at(-1),a,A))return!1;const m=g.route[d],_=g.route[p];if(!m||!_||m.z!==_.z)return!1;const f=g.route.slice(d,p+1).map(I=\u003e({...I,z:r,pcb_port_id:void 0}));return g.route.splice(d,p-d+1,{...m},...f,{..._}),!0},vco=(t,e,n,o,i,r)=\u003e{if(o\u003c=0||i\u003c=0)return!1;const s=Vbe(t,e,n);if(!s)return!1;const{center:a,route:A,segment:c}=s,l=c.end.x-c.start.x,u=c.end.y-c.start.y,g=Math.hypot(l,u);if(g\u003c=Dr)return!1;const h=G5(a,c),d=y7(h.t-o/g,.02,.98),p=y7(h.t+o/g,.02,.98);if(d\u003e=p)return!1;const m=E=\u003e({x:c.start.x+l*E,y:c.start.y+u*E,z:c.z}),_=m(d),f=m(p),I=-u/g*r,C=l/g*r,y=A.route[c.startIndex],x=A.route[c.endIndex];return A.route.splice(c.startIndex,2,{...y},_,{..._,x:_.x+I*i,y:_.y+C*i},{...f,x:f.x+I*i,y:f.y+C*i},f,{...x}),!0},wco=(t,e,n,o,i,r,s,a=!1)=\u003e{if(!Number.isInteger(i)||i\u003c0||i\u003e=t.layerCount)return!1;const A=tW(n),c=e[o],l=c?.route[0],u=c?.route.at(-1);if(!c||!A||!l||!u||l.z!==u.z||l.z===i||c.jumpers?.length||c.route.some(Y=\u003eY.z!==l.z||Y.toNextSegmentType===\"through_obstacle\"))return!1;const g=u.x-l.x,h=u.y-l.y,d=Math.hypot(g,h);if(d\u003c=Dr||d\u003e8)return!1;const p=g/d,m=h/d,_=m*r,f=-p*r,I=Y=\u003e(Y.x-A.x)*p+(Y.y-A.y)*m,C=(Y,W,te)=\u003e({x:A.x+p*Y+_*W,y:A.y+m*Y+f*W,z:te}),y=(c.viaDiameter??t.minViaDiameter??.3)+(t.minTraceToPadEdgeClearance??xx.traceClearance??.1),x=(a?1.25:-.75)*y,E=(a?-.75:1.25)*y,B=I(l)+.5*y*s,S=I(u)+y*s,Q=C(B,x,l.z),w=C(S,E,l.z),M=C(B,2*y,i),k=C(S,2*y,i),R=[{...l},Q,{...Q,z:i},M,k,{...w,z:i},w,{...u}],F=t.minBoardEdgeClearance??0,O=(c.viaDiameter??t.minViaDiameter??.3)/2,U=c.traceThickness/2;if([Q,w].some(Y=\u003eky(t,Y)+bA\u003cO+F))return!1;for(let Y=0;Y\u003cR.length-1;Y+=1){const W=R[Y],te=R[Y+1];if(W.z===te.z\u0026\u0026ib(t,W,te)+bA\u003cU+F)return!1}return c.route.splice(0,c.route.length,...R),!0},Pco=(t,e,n,o,i,r,s)=\u003e{if(!Number.isInteger(i)||i\u003c1||r\u003c=0)return!1;const a=X5t(e,n,o,i);if(!a)return!1;const{route:A,spanStartIndex:c,spanEndIndex:l,start:u,end:g}=a,h=g.x-u.x,d=g.y-u.y,p=Math.hypot(h,d);if(p\u003c=Dr)return!1;const m=-d/p*s*r,_=h/p*s*r,f={...u,x:u.x+m,y:u.y+_,pcb_port_id:void 0},I={...g,x:g.x+m,y:g.y+_,pcb_port_id:void 0};return!(!zL(f,t.bounds)||!zL(I,t.bounds))\u0026\u0026(A.route.splice(c,l-c+1,{...u},f,I,{...g}),!0)},Mco=(t,e,n,o,i,r)=\u003e{if(!Number.isInteger(i)||i\u003c0)return!1;const s=X5t(e,n,o,i);if(!s)return!1;const{route:a,spanStartIndex:A,spanEndIndex:c,start:l,end:u}=s;return!(Math.hypot(r.x-l.x,r.y-l.y)\u003c=Dr||Math.hypot(r.x-u.x,r.y-u.y)\u003c=Dr||!zL(r,t.bounds))\u0026\u0026(a.route.splice(A,c-A+1,{...l},{x:r.x,y:r.y,z:l.z},{...u}),!0)},b7=(t,e,n,o,i,r)=\u003e{if(r){const A=Bx(t),c=Bx(r);if(A!==c)return A\u003cc}const s=V5t(t),a=z5t(t);return s\u003cn||s===n\u0026\u0026a\u003co||s===n\u0026\u0026e\u003ci},Z5t=(t,e,n,o,i,r,s=!0,a=!1,A=!0,c=!1)=\u003e{let l=!1;const u=Iv(e),g=$J(e);for(const h of n){const d=tW(h);if(!d)continue;let p=d;const m=h.pcb_via_ids,_=Ty(h)===\"pcb_via_clearance_error\",f=Ex(h),I=Array.isArray(m)\u0026\u0026m.length\u003e0,C=!_\u0026\u0026!f\u0026\u0026I\u0026\u0026(typeof h.pcb_trace_id==\"string\"||Array.isArray(h.pcb_trace_ids)),y=c\u0026\u0026C;if(I\u0026\u0026!C){p=C5t(t,h,d);const R=uN(h,o),F=m.length\u003e1?_co(u,d):void 0;if(F){const O=a\u0026\u0026Ty(h)===\"pcb_via_clearance_error\"\u0026\u0026h.pcb_via_pair_net_relation===\"same_net\",U=s\u0026\u0026Ty(h)===\"pcb_via_clearance_error\";l=(O?fco(e,F[0],F[1],t,r):F5t(e,F[0],F[1],t,r,.16*Math.abs(i),U))||l}else{const O=XJ(u,d,R);O\u0026\u0026(l=Ybe(e,O,p,t)||l)}continue}const x=h.pcb_trace_id,E=uN(h,o);if(y\u0026\u0026E===void 0)continue;const B=Array.isArray(h.pcb_trace_ids)?h.pcb_trace_ids.filter(R=\u003etypeof R==\"string\"):[];if(y\u0026\u0026typeof x==\"string\"\u0026\u0026E!==void 0\u0026\u0026B.includes(x)\u0026\u0026B.some(R=\u003eR!==x\u0026\u0026!o.has(R))){const R=XJ(u,d,E);if(R){l=Ybe(e,R,d,t)||l;continue}}const S=s\u0026\u0026!C?oW(h,o):void 0;if(S){const R=B7(g,d,S[0]),F=B7(g,d,S[1]);if(R\u0026\u0026F\u0026\u0026L5t(e,R,F,t,r)){l=!0;continue}}const Q=Rbe(h),w=Q\u0026\u0026E!==void 0?H5t(t,e,E,d,r):void 0,M=Q?w?.segment:B7(g,d,E);if(M){const R=Q?w?.obstacle:yAe(t,d);if(Q\u0026\u0026!R)continue;p=Q?R?.center??d:C5t(t,h,d);const F=y?void 0:XJ(u,d),O=Ty(h)===\"pcb_via_trace_clearance_error\",U=typeof h.pcb_trace_error_id==\"string\"?h.pcb_trace_error_id.toLowerCase():\"\",Y=typeof h.message==\"string\"?h.message.toLowerCase():\"\",W=O||typeof h.pcb_via_id==\"string\"||Array.isArray(h.pcb_via_ids)||U.includes(\"_via_\")||Y.includes(\"via\"),te=Array.isArray(h.pcb_port_ids)\u0026\u0026h.pcb_port_ids.length\u003e0;if(F\u0026\u0026!AB(F.rootConnectionName,M.rootConnectionName,r)\u0026\u0026(O||Math.hypot(F.x-d.x,F.y-d.y)\u003c.45)\u0026\u0026Ube(e,F,M,t,r,.3*Math.abs(i),1,A)\u0026\u0026(l=!0,W\u0026\u0026!te))continue;l=(R!==void 0\u0026\u0026(Q||!Ry(M.rootConnectionName,R,r)\u0026\u0026eW(R,M,t.layerCount))?mco(e,M,R,t,r,i):pco(e,M,p,t,i))||l}const k=y?void 0:XJ(u,d);k\u0026\u0026Math.hypot(k.x-d.x,k.y-d.y)\u003c.35\u0026\u0026(l=Ybe(e,k,p,t)||l)}return l},$_=1e-6,iW=.006,Dco=[1,.5,.25,.1,.05,.025],qL=(t,e)=\u003e(e.traceThickness??t.minTraceWidth)/2,SAe=t=\u003et.minTraceToPadEdgeClearance??.1,e4t=(t,e)=\u003ee.viaDiameter??t.minViaDiameter??.3,yv=(t,e)=\u003eno(t,e)\u003c$_,t4t=t=\u003e{const e=[],n=o=\u003e{e.some(i=\u003eyv(i,o))||e.push({x:o.x,y:o.y})};for(const o of t.vias)n(o);for(let o=0;o\u003ct.route.length-1;o+=1){const i=t.route[o],r=t.route[o+1];i\u0026\u0026r\u0026\u0026i.z!==r.z\u0026\u0026yv(i,r)\u0026\u0026n(i)}return e},QAe=t=\u003eno({x:0,y:0},t)\u003c$_?{x:0,y:0}:u7e({x:0,y:0},t),n4t=(t,e)=\u003e{if(t.zLayers\u0026\u0026t.zLayers.length\u003e0)return t.zLayers;const n=Array.from({length:e},(o,i)=\u003ei).filter(o=\u003et.layers.includes(O5(o,e)));return n.length\u003e0?n:Array.from({length:e},(o,i)=\u003ei)},zbe=(t,e,n)=\u003eAB(aB(t),aB(e),n)||AB(aB(t),e.connectionName,n)||AB(t.connectionName,aB(e),n)||AB(t.connectionName,e.connectionName,n),o4t=(t,e,n)=\u003eRy(aB(t),e,n)||Ry(t.connectionName,e,n),Nco=(t,e,n,o)=\u003e!n.pcb_port_id\u0026\u0026t.obstacles.some(i=\u003eo4t(e,i,o)\u0026\u0026n4t(i,t.layerCount).includes(n.z)\u0026\u0026((r,s)=\u003er.x\u003e=s.center.x-s.width/2-$_\u0026\u0026r.x\u003c=s.center.x+s.width/2+$_\u0026\u0026r.y\u003e=s.center.y-s.height/2-$_\u0026\u0026r.y\u003c=s.center.y+s.height/2+$_)(n,i)),i4t=(t,e,n,o,i)=\u003e{if(!((s,a)=\u003es.zLayers.includes(a))(i,n.z))return Number.POSITIVE_INFINITY;const r=qL(t,e);return i.kind===\"pad\"?K8(n,o,i.obstacle)-(SAe(t)+r+iW):wc(i.center,n,o)-(SAe(t)+r+i.diameter/2+iW)},Rco=(t,e,n)=\u003e{const o=n.kind===\"pad\"?n.obstacle.center:n.center,i=z_(o,t,e);let r=QAe({x:i.x-o.x,y:i.y-o.y});if(Math.abs(r.x)\u003c$_\u0026\u0026Math.abs(r.y)\u003c$_){const s=e.x-t.x,a=e.y-t.y,A=V8(t,e),c=QAe({x:-a,y:s}),l={x:-c.x,y:-c.y};r=no({x:A.x+c.x,y:A.y+c.y},o)\u003e=no({x:A.x+l.x,y:A.y+l.y},o)?c:l}return r},rW=(t,e,n,o)=\u003e{if(n\u003c=0||n\u003e=e.route.length-1){const a=e.route[n];return!a||!Nco(t,e,a,o)}const i=e.route[n];if(!i||i.insideJumperPad)return!0;const r=e.route[n-1],s=e.route[n+1];return!(!r||r.z===i.z)||!(!s||s.z===i.z)||e.vias.some(a=\u003eyv(a,i))},r4t=(t,e,n)=\u003e{let o=0;for(let i=0;i\u003ce.route.length-1;i+=1){const r=e.route[i],s=e.route[i+1];if(r\u0026\u0026s\u0026\u0026r.z===s.z\u0026\u0026!yv(r,s))for(const a of n){const A=i4t(t,e,r,s,a);!(A\u003e=0)\u0026\u0026(o+=A*A,a.kind===\"pad\")\u0026\u0026K8(r,s,a.obstacle)\u003c$_\u0026\u0026(o+=.01/(wc(a.obstacle.center,r,s)+.01))}}return o},s4t=(t,e,n,o)=\u003e{let i=0;for(let r=0;r\u003ce.route.length-1;r+=1){const s=e.route[r],a=e.route[r+1];if(s\u0026\u0026a\u0026\u0026s.z===a.z\u0026\u0026!yv(s,a)){for(const A of n)if(!zbe(e,A,o)){for(let c=0;c\u003cA.route.length-1;c+=1){const l=A.route[c],u=A.route[c+1];if(!l||!u||l.z!==s.z||u.z!==s.z||yv(l,u))continue;const g=M5(s,a,l,u)-qL(t,e)-qL(t,A),h=SAe(t)+iW-g;h\u003e0\u0026\u0026(i+=h*h)}for(const c of t4t(A)){const l=wc(c,s,a)-qL(t,e)-e4t(t,A)/2,u=SAe(t)+iW-l;u\u003e0\u0026\u0026(i+=u*u)}}}}return i},Tco=(t,e,n,o,i)=\u003e{const r=e.route.map(()=\u003e({x:0,y:0}));for(let s=0;s\u003ce.route.length-1;s+=1){const a=e.route[s],A=e.route[s+1];if(a\u0026\u0026A\u0026\u0026a.z===A.z\u0026\u0026!yv(a,A)){for(const c of n){const l=i4t(t,e,a,A,c);if(l\u003e=0)continue;const u=Rco(a,A,c);if(Math.abs(u.x)\u003c$_\u0026\u0026Math.abs(u.y)\u003c$_)continue;const g=!rW(t,e,s,i),h=!rW(t,e,s+1,i);if(!g\u0026\u0026!h)continue;const d=-l,p=g\u0026\u0026h?.5:g?1:0,m=g\u0026\u0026h?.5:h?1:0;r[s].x+=u.x*d*p,r[s].y+=u.y*d*p,r[s+1].x+=u.x*d*m,r[s+1].y+=u.y*d*m}for(const c of o)if(!zbe(e,c,i))for(let l=0;l\u003cc.route.length-1;l+=1){const u=c.route[l],g=c.route[l+1];if(!u||!g||u.z!==a.z||g.z!==a.z||yv(u,g))continue;const h=M5(a,A,u,g)-qL(t,e)-qL(t,c),d=t.minTraceToPadEdgeClearance+iW-h;if(d\u003c=0)continue;const p=V8(a,A),m=z_(p,u,g);let _=QAe({x:p.x-m.x,y:p.y-m.y});if(Math.abs(_.x)\u003c$_\u0026\u0026Math.abs(_.y)\u003c$_){const x=A.x-a.x,E=A.y-a.y;_=QAe({x:-E,y:x})}const f=!rW(t,e,s,i),I=!rW(t,e,s+1,i);if(!f\u0026\u0026!I)continue;const C=f\u0026\u0026I?.5:f?1:0,y=f\u0026\u0026I?.5:I?1:0;r[s].x+=_.x*d*C,r[s].y+=_.y*d*C,r[s+1].x+=_.x*d*y,r[s+1].y+=_.y*d*y}}}return r},kco=(t,e,n,o,i)=\u003e({...e,route:e.route.map((r,s)=\u003e{if(rW(t,e,s,i))return{...r};const a=((A,c)=\u003e{const l=no({x:0,y:0},A);if(l\u003c=c||l\u003c$_)return A;const u=c/l;return{x:A.x*u,y:A.y*u}})(n[s]??{x:0,y:0},.5);return{...r,x:r.x+a.x*o,y:r.y+a.y*o}}),vias:e.vias.map(r=\u003e({...r})),jumpers:e.jumpers?[...e.jumpers]:void 0}),Fco=(t,e)=\u003ee.route.every(n=\u003en.x\u003e=t.bounds.minX-$_\u0026\u0026n.x\u003c=t.bounds.maxX+$_\u0026\u0026n.y\u003e=t.bounds.minY-$_\u0026\u0026n.y\u003c=t.bounds.maxY+$_),Lco=(t,e,n,o,i)=\u003e{const r=((c,l,u,g)=\u003e{const h=[];for(const p of c.obstacles)p.isCopperPour||o4t(u,p,g)||h.push({kind:\"pad\",obstacle:p,zLayers:n4t(p,c.layerCount)});const d=Array.from({length:c.layerCount},(p,m)=\u003em);for(const p of l)if(p!==u\u0026\u0026!zbe(u,p,g))for(const m of t4t(p))h.push({kind:\"via\",center:{x:m.x,y:m.y},diameter:e4t(c,p),zLayers:d,connectionName:p.connectionName,rootConnectionName:p.rootConnectionName});return h})(t,e,n,i),s=e.filter((c,l)=\u003el!==o\u0026\u0026c!==n);let a=n,A=r4t(t,a,r)+s4t(t,a,s,i);for(let c=0;c\u003c160\u0026\u0026!(A\u003c=$_);c+=1){const l=Tco(t,a,r,s,i);if(l.every(h=\u003eno(h,{x:0,y:0})\u003c1e-9))break;let u=null,g=A;for(const h of Dco){const d=kco(t,a,l,h,i),p=r4t(t,d,r)+s4t(t,d,s,i);if(p\u003cA-1e-6\u0026\u0026Fco(t,d)){u=d,g=p;break}}if(!u)break;a=u,A=g}return a},xv=1e-6,Hco=[1,.5,.25,.1,.05,.025],Oco=(t,e)=\u003et.some(n=\u003ee.includes(n)),Gco=(t,e,n,o)=\u003e(Ry(t.rootConnectionName,n,o)||Ry(e.connectionName,n,o))\u0026\u0026Cv(t,n)\u003c=xv,a4t=(t,e,n,o)=\u003e{const i=[],r=e[n.routeIndex];if(!r)return i;for(const s of t.obstacles){if(s.isCopperPour||Gco(n,r,s,o))continue;const a=VL(s,t.layerCount);Oco(n.zLayers,a)\u0026\u0026i.push({obstacle:s})}return i},Yco=(t,e,n)=\u003eCv(e,n.obstacle)-(e.radius+t.minViaEdgeToPadEdgeClearance+.006),A4t=(t,e,n,o)=\u003eIv(e,t.minViaDiameter).filter(i=\u003ei.routeIndex===n).reduce((i,r)=\u003ei+((s,a,A,c)=\u003e{let l=0;for(const u of a4t(s,a,A,c)){const g=Yco(s,A,u);!(g\u003e=0)\u0026\u0026(l+=g*g,Cv(A,u.obstacle)\u003cxv)\u0026\u0026(l+=.01/(no(A,u.obstacle.center)+.01))}return l})(t,e,r,o),0),Uco=(t,e,n,o)=\u003e{const i=e[n];if(!i)return[];const r=i.route.map(()=\u003e({x:0,y:0})),s=Iv(e,t.minViaDiameter).filter(a=\u003ea.routeIndex===n);for(const a of s)if(a.movable)for(const A of a4t(t,e,a,o)){const c=a.radius+t.minViaEdgeToPadEdgeClearance+.006,l=xAe(a,A.obstacle,c);if(l)for(const u of a.pointIndexes)r[u].x+=l.direction.x*l.penetration,r[u].y+=l.direction.y*l.penetration}return r},Kco=(t,e,n,o)=\u003e{const i=new Set(Iv([e],t.minViaDiameter).flatMap(r=\u003er.movable?r.pointIndexes:[]));return{...e,route:e.route.map((r,s)=\u003e{if(!i.has(s))return{...r};const a=((A,c)=\u003e{const l=no({x:0,y:0},A);if(l\u003c=c||l\u003cxv)return A;const u=c/l;return{x:A.x*u,y:A.y*u}})(n[s]??{x:0,y:0},.5);return{...r,x:r.x+a.x*o,y:r.y+a.y*o}}),vias:e.vias.map(r=\u003e({...r})),jumpers:e.jumpers?[...e.jumpers]:void 0}},Vco=(t,e)=\u003ee.route.every(n=\u003en.x\u003e=t.bounds.minX-xv\u0026\u0026n.x\u003c=t.bounds.maxX+xv\u0026\u0026n.y\u003e=t.bounds.minY-xv\u0026\u0026n.y\u003c=t.bounds.maxY+xv),zco=(t,e,n,o,i)=\u003e{let r=n,s=A4t(t,e,o,i);for(let a=0;a\u003c160\u0026\u0026!(s\u003c=xv);a+=1){const A=Uco(t,e,o,i);if(A.every(u=\u003eno(u,{x:0,y:0})\u003c1e-9))break;let c=null,l=s;for(const u of Hco){const g=Kco(t,r,A,u),h=[...e];h[o]=g;const d=A4t(t,h,o,i);if(d\u003cs-1e-6\u0026\u0026Vco(t,g)){c=g,l=d;break}}if(!c)break;e[o]=c,r=c,s=l}return r},Jco=[.2,.4,.8,1.2].flatMap(t=\u003e[.2,.3,.45,.6].flatMap(e=\u003e[-1,1].map(n=\u003e({halfSpan:t,offset:e,directionSign:n})))),c4t=Jco.flatMap(t=\u003e[0,1].map(e=\u003e({kind:\"segment\",routeSide:e,...t}))),Jbe=[1,-1].flatMap(t=\u003e[1,-1].flatMap(e=\u003e[!1,!0].flatMap(n=\u003e[0,1].map(o=\u003e({routeSide:o,normalDirectionSign:t,tangentDirectionSign:e,reverseEndpointOffsets:n}))))),Wco=[...[0,1].map(t=\u003e({kind:\"displacementChain\",routeSide:t})),...[-1,1].flatMap(t=\u003e[0,1].map(e=\u003e({kind:\"segment\",routeSide:e,halfSpan:.4,offset:1.2,directionSign:t}))),...[-1,1].flatMap(t=\u003e[0,1].map(e=\u003e({kind:\"span\",routeSide:e,spanExpansion:3,offset:1.8,directionSign:t}))),...[{dx:-2.4,dy:-.4},{dx:-2.4,dy:.4},{dx:2.4,dy:-.4},{dx:2.4,dy:.4},{dx:-.4,dy:-2.4},{dx:-.4,dy:2.4},{dx:.4,dy:-2.4},{dx:.4,dy:2.4}].flatMap(t=\u003e[0,1].map(e=\u003e({kind:\"waypoint\",routeSide:e,spanExpansion:2,...t}))),...[{dx:-.17,dy:0},{dx:.17,dy:0},{dx:0,dy:-.17},{dx:0,dy:.17}].flatMap(t=\u003e[0,1].map(e=\u003e({kind:\"waypoint\",routeSide:e,spanExpansion:0,...t}))),...c4t],Wbe=[0,1,2],S7=class extends zA{srj;inputHdRoutes;guardedInputHdRoutes;connMap;effort;drcEvaluator;referenceDrcEvaluator;autoroutingDrcEngine;viaHoleDiameter;configuredMaxIterations;enableBroadFallback;enableLargeBoardBroadFallback;enableTargetedErrorSweep;enablePostSolveClearanceRelaxation;enableSafeTraceLayerMoves;enableViaInPadLayerMoves;enableTraceViaOwnerTargeting;outputHdRoutes;initialDrcIssueCount;initialRepairDrcIssueCount;initialLowCountErrorsHaveMovableTraces=!1;broadForceAccepted=!1;targetedForceAccepted=!1;candidateAttempts=0;viaInPadCandidateAttempts=0;viaInPadCandidatesAccepted=0;padTopologyErrorCursor=0;safeTraceLayerCursorByErrorId=new Map;traceLayerCorridorCursorByErrorId=new Map;tracePairDetourCursorByErrorId=new Map;errorCursor=0;stalledIterations=0;bestDrcIssueCountSeen;bestDrcIssueScoreSeen;lastDrcCountImprovementCheckIteration=0;drcCountPlateauChecks=0;largeBoardBroadFallbackMisses=0;outputSnapshot;legacyCleanCheckpoint;viaPadRepairRolledBack=!1;referenceInputDrcIssueCount;referenceCandidateDrcIssueCount;referenceCandidateRolledBack=!1;referenceInputSnapshot;inputSnapshot;constructor(t){if(super(),this.srj=t.srj,this.inputHdRoutes=t.hdRoutes,this.guardedInputHdRoutes=rb(x7(t.hdRoutes)),this.connMap=t.connMap,this.effort=t.effort??1,this.drcEvaluator=t.drcEvaluator,this.referenceDrcEvaluator=t.referenceDrcEvaluator,this.autoroutingDrcEngine=t.autoroutingDrcEngine??(t.drcEvaluator?void 0:new fJ(t.srj,{connMap:t.connMap,traceClearance:t.srj.minTraceToPadEdgeClearance??xx.traceClearance,viaClearance:t.srj.minTraceToPadEdgeClearance??xx.viaClearance,includeTraceViaOwnerMetadata:t.enableTraceViaOwnerTargeting??!1})),t.viaHoleDiameter!==void 0\u0026\u0026(!Number.isFinite(t.viaHoleDiameter)||t.viaHoleDiameter\u003c=0))throw new Error(\"viaHoleDiameter must be a positive finite number\");this.viaHoleDiameter=t.viaHoleDiameter,this.configuredMaxIterations=t.maxIterations,this.enableBroadFallback=t.enableBroadFallback??!0,this.enableLargeBoardBroadFallback=t.enableLargeBoardBroadFallback??!0,this.enableTargetedErrorSweep=t.enableTargetedErrorSweep??!1,this.enablePostSolveClearanceRelaxation=t.enablePostSolveClearanceRelaxation??!0,this.enableSafeTraceLayerMoves=t.enableSafeTraceLayerMoves??!1,this.enableViaInPadLayerMoves=t.enableViaInPadLayerMoves??!1,this.enableTraceViaOwnerTargeting=t.enableTraceViaOwnerTargeting??!1,this.outputHdRoutes=t.hdRoutes,this.referenceDrcEvaluator\u0026\u0026(this.referenceInputSnapshot=this.getReferenceDrcSnapshot(this.inputHdRoutes)),this.MAX_ITERATIONS=this.configuredMaxIterations??RCt(this.effort)}getConstructorParams(){return[{srj:this.srj,hdRoutes:this.inputHdRoutes,connMap:this.connMap,effort:this.effort,drcEvaluator:this.drcEvaluator,referenceDrcEvaluator:this.referenceDrcEvaluator,autoroutingDrcEngine:this.autoroutingDrcEngine,viaHoleDiameter:this.viaHoleDiameter,maxIterations:this.configuredMaxIterations,enableBroadFallback:this.enableBroadFallback,enableLargeBoardBroadFallback:this.enableLargeBoardBroadFallback,enableTargetedErrorSweep:this.enableTargetedErrorSweep,enablePostSolveClearanceRelaxation:this.enablePostSolveClearanceRelaxation,enableSafeTraceLayerMoves:this.enableSafeTraceLayerMoves,enableViaInPadLayerMoves:this.enableViaInPadLayerMoves,enableTraceViaOwnerTargeting:this.enableTraceViaOwnerTargeting}]}updateStats(t){this.stats={initialDrcIssueCount:this.initialDrcIssueCount??t.count,finalDrcIssueCount:t.count,globalDrcForceImproveMaxIterations:this.MAX_ITERATIONS,globalDrcForceImproveBroadForceAccepted:this.broadForceAccepted,globalDrcForceImproveTargetedForceAccepted:this.targetedForceAccepted,globalDrcForceImproveCandidateAttempts:this.candidateAttempts,globalDrcForceImproveViaInPadCandidateAttempts:this.viaInPadCandidateAttempts,globalDrcForceImproveViaInPadCandidatesAccepted:this.viaInPadCandidatesAccepted,globalDrcForceImproveStalledIterations:this.stalledIterations,globalDrcForceImproveBestDrcIssueCountSeen:this.bestDrcIssueCountSeen??t.count,globalDrcForceImproveBestDrcIssueScoreSeen:this.bestDrcIssueScoreSeen??t.issueScore,globalDrcForceImproveDrcCountPlateauChecks:this.drcCountPlateauChecks,globalDrcForceImproveLargeBoardBroadFallbackMisses:this.largeBoardBroadFallbackMisses,globalDrcForceImproveViaPadRepairRolledBack:this.viaPadRepairRolledBack,globalDrcForceImproveReferenceInputDrcIssueCount:this.referenceInputDrcIssueCount,globalDrcForceImproveReferenceCandidateDrcIssueCount:this.referenceCandidateDrcIssueCount,globalDrcForceImproveReferenceCandidateRolledBack:this.referenceCandidateRolledBack}}finishAtLegacyCleanCheckpoint(){const t=this.legacyCleanCheckpoint;return!!t\u0026\u0026(this.outputHdRoutes=t.routes,this.outputSnapshot=t.snapshot,this.viaPadRepairRolledBack=!0,this.updateStats(t.snapshot),this.solved=!0,!0)}increaseMaxIterationsForDrcIssueCount(t){this.configuredMaxIterations===void 0?this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,((e,n)=\u003eMath.max(RCt(n),Math.ceil(e*roo*Math.max(1,n))))(t,this.effort),((e,n)=\u003ee\u003e120\u0026\u0026n\u003e0?192:48)(this.inputHdRoutes.length,t)):this.MAX_ITERATIONS=this.configuredMaxIterations}getSnapshot(t){return(this.initialLowCountErrorsHaveMovableTraces?lco:E7)(this.srj,t,this.drcEvaluator,this.connMap,this.autoroutingDrcEngine)}getReferenceDrcSnapshot(t){const e={traces:[],srj:this.srj,routes:t,hdRoutes:t},n=this.referenceDrcEvaluator?.getCachedResult?.(e);if(n){const o=Array.isArray(n)?n:n.errors;return{errors:o,count:o.length}}return E7(this.srj,t,this.referenceDrcEvaluator,this.connMap,this.autoroutingDrcEngine)}getViaIssueCount(t){return Kbe(t,!1)}getRepairIssueCount(t){return V5t(t)}getRepairIssueScore(t){return z5t(t)}acceptSolvedRoutes(t,e){const n=this.enablePostSolveClearanceRelaxation?((c,l,u)=\u003e{if(c.minTraceToPadEdgeClearance===void 0||c.minTraceToPadEdgeClearance\u003c=0)return l;let g=!1;const h=x7(l);for(let d=0;d\u003c4;d+=1)for(let p=0;p\u003ch.length;p+=1){const m=h[p];if(!m)continue;const _=Lco(c,h,m,p,u);_!==m\u0026\u0026(h[p]=_,g=!0)}return g?h:l})(this.srj,t,this.connMap):t,o=this.enablePostSolveClearanceRelaxation?((c,l,u)=\u003e{if(c.minViaEdgeToPadEdgeClearance===void 0||c.minViaEdgeToPadEdgeClearance\u003c=0)return l;let g=!1;const h=x7(l);for(let d=0;d\u003c4;d+=1)for(let p=0;p\u003ch.length;p+=1){const m=h[p];if(!m)continue;const _=zco(c,h,m,p,u);_!==m\u0026\u0026(h[p]=_,g=!0)}return g?rb(h):l})(this.srj,n,this.connMap):t,i=o===t?e:this.getSnapshot(o),r=i.count\u003ce.count||i.count===e.count\u0026\u0026i.issueScore\u003c=e.issueScore;let s=r?o:t,a=r?i:e;const A=this.inputSnapshot??this.getSnapshot(this.guardedInputHdRoutes);if(this.referenceDrcEvaluator){const c=this.referenceInputSnapshot,l=this.getReferenceDrcSnapshot(s);this.referenceInputDrcIssueCount=c.count,this.referenceCandidateDrcIssueCount=l.count,l.count\u003ec.count\u0026\u0026(s=this.guardedInputHdRoutes,a=A,this.referenceCandidateRolledBack=!0)}this.outputHdRoutes=s,this.outputSnapshot=a,this.stalledIterations=0,this.updateStats(a),this.solved=!0}updateDrcCountPlateauState(t){const e=this.getRepairIssueCount(t),n=this.getRepairIssueScore(t);this.bestDrcIssueCountSeen??=e,this.bestDrcIssueScoreSeen??=n;const o=this.initialRepairDrcIssueCount??e,i=this.inputHdRoutes.length\u003e120\u0026\u0026o\u003e0;if((o\u003e=20||i)\u0026\u0026this.iterations\u003c192)return(e\u003cthis.bestDrcIssueCountSeen||e===this.bestDrcIssueCountSeen\u0026\u0026n\u003cthis.bestDrcIssueScoreSeen)\u0026\u0026(this.bestDrcIssueCountSeen=e,this.bestDrcIssueScoreSeen=n),void(i\u0026\u0026this.largeBoardBroadFallbackMisses\u003e=2\u0026\u0026(this.solved=!0));const r=(s=\u003es\u003e=20?8:s\u003c=2?1:2)(o);if(!(this.iterations-this.lastDrcCountImprovementCheckIteration\u003cr)){if(this.lastDrcCountImprovementCheckIteration=this.iterations,e\u003cthis.bestDrcIssueCountSeen||e===this.bestDrcIssueCountSeen\u0026\u0026n\u003cthis.bestDrcIssueScoreSeen)return this.bestDrcIssueCountSeen=e,this.bestDrcIssueScoreSeen=n,void(this.drcCountPlateauChecks=0);this.drcCountPlateauChecks+=1,this.drcCountPlateauChecks\u003e=2\u0026\u0026(this.solved=!0)}}_step(){let t=this.outputHdRoutes,e=this.outputSnapshot??this.getSnapshot(t);const n=Bx(e);if(this.legacyCleanCheckpoint\u0026\u0026n\u003e0)return void this.finishAtLegacyCleanCheckpoint();if(!this.legacyCleanCheckpoint\u0026\u0026n===0\u0026\u0026e.errors.some(Ex)\u0026\u0026(this.legacyCleanCheckpoint={routes:rb(x7(t)),snapshot:e}),this.initialDrcIssueCount===void 0){this.inputSnapshot=e,this.initialDrcIssueCount=e.count,this.initialRepairDrcIssueCount=this.getRepairIssueCount(e);const R=J5t(e.errors);this.initialLowCountErrorsHaveMovableTraces=this.initialRepairDrcIssueCount\u003e0\u0026\u0026this.initialRepairDrcIssueCount\u003c=3\u0026\u0026R.every(F=\u003euN(F,e.traceRouteIndexById)!==void 0),this.initialLowCountErrorsHaveMovableTraces\u0026\u0026(e=this.getSnapshot(t)),this.bestDrcIssueCountSeen=this.getRepairIssueCount(e),this.bestDrcIssueScoreSeen=this.getRepairIssueScore(e),this.increaseMaxIterationsForDrcIssueCount(this.getRepairIssueCount(e))}if(e.count===0)return void this.acceptSolvedRoutes(t,e);let o=this.getRepairIssueCount(e),i=this.getRepairIssueScore(e),r=this.getViaIssueCount(e);const s=e.errors.filter(R=\u003e!!tW(R));if(s.length===0)return void this.acceptSolvedRoutes(t,e);const a=(A=this.effort,Math.max(1,Math.round(3*Math.max(1,A))));var A;let c=0,l=0,u=!1,g=!1,h=!1;const d=J5t(s),p=this.enableTargetedErrorSweep?d.find(R=\u003eR.type===\"pcb_via_clearance_error\"\u0026\u0026R.pcb_via_pair_net_relation===\"same_net\"):void 0,m=this.enableTargetedErrorSweep\u0026\u0026(this.iterations-1)%8==0,_=p??(m?d.find(R=\u003eR.type===\"pcb_via_clearance_error\"):void 0),f=_?[_,...d.filter(R=\u003eR!==_)]:d,I=Math.min(f.length,Math.max(1,Math.ceil(this.effort))),C=_?0:this.errorCursor%f.length,y=this.enableTargetedErrorSweep?((R,F)=\u003e{const O=Math.max(2,Math.round(12*Math.max(1,F)));return R.filter(U=\u003eTy(U)===\"pcb_trace_error\").slice(0,O)})(s,this.effort):[],x=o\u003c=1||this.initialLowCountErrorsHaveMovableTraces,E=!this.initialLowCountErrorsHaveMovableTraces\u0026\u0026o\u003c=8\u0026\u0026this.srj.layerCount\u003e1,B=_?[]:s.filter(R=\u003eR.type===\"pcb_pad_trace_clearance_error\"||(this.enableSafeTraceLayerMoves||x||E)\u0026\u0026R.type===\"pcb_trace_error\"),S=B.map((R,F)=\u003eB[(this.padTopologyErrorCursor+F)%B.length]);for(const R of this.enableSafeTraceLayerMoves||this.enableViaInPadLayerMoves?S:[]){const F=!this.enableSafeTraceLayerMoves||l\u003e=a,O=!this.enableViaInPadLayerMoves||c\u003e=a;if(g||F\u0026\u0026O)break;let U;this.padTopologyErrorCursor=(B.indexOf(R)+1)%B.length;const Y=typeof R.pcb_trace_error_id==\"string\"?R.pcb_trace_error_id:typeof R.pcb_trace_id==\"string\"?R.pcb_trace_id:void 0,W=uN(R,e.traceRouteIndexById),te=oW(R,e.traceRouteIndexById);if(this.enableSafeTraceLayerMoves\u0026\u0026W!==void 0){const J=te??[W],oe=J.length*this.srj.layerCount*Wbe.length,ie=J.length*this.srj.layerCount*$5t,ne=oe+ie,le=Rbe(R),ge=le?0:oe,_e=le?ie:0;let ue=Y?this.safeTraceLayerCursorByErrorId.get(Y)??0:0,fe=0;for(;l\u003ca\u0026\u0026fe\u003cne;){const pe=ue;ue=(ue+1)%ne,fe+=1;const ye=pe\u003e=ge\u0026\u0026pe\u003cge+ie,Me=pe-(ye?ge:_e),ve=Me%J.length,he=Math.floor(Me/J.length),Qe=he%this.srj.layerCount,Pe=ye?\"full\":Wbe[Math.floor(he/this.srj.layerCount)%Wbe.length],we=ye?Math.floor(he/this.srj.layerCount):0,Te=J[ve],Re=UL(t,[Te]);if(!yco(this.srj,Re,R,Te,Qe,Pe,this.connMap,we))continue;const Ee=jL(Re,[Te]);l+=1,this.candidateAttempts+=1;const ke=this.getSnapshot(Ee),Ce=this.getViaIssueCount(ke),Le=U?.snapshot??e;Ce\u003c=(U?.viaIssueCount??r)\u0026\u0026nW(ke,Le)\u0026\u0026(U={routes:Ee,snapshot:ke,viaIssueCount:Ce,usesViaInPad:!1})}Y\u0026\u0026this.safeTraceLayerCursorByErrorId.set(Y,ue)}if(this.enableSafeTraceLayerMoves\u0026\u0026E\u0026\u0026Y\u0026\u0026te){let J=this.traceLayerCorridorCursorByErrorId.get(Y)??0,oe=0;for(;c\u003ca\u0026\u0026oe\u003cJbe.length;){const ie=Jbe[J%Jbe.length];J+=1,oe+=1;const ne=te[ie.routeSide],le=t[ne]?.route[0]?.z;if(le===void 0)continue;const ge=(le+1)%this.srj.layerCount,_e=UL(t,[ne]);if(!wco(this.srj,_e,R,ne,ge,ie.normalDirectionSign,ie.tangentDirectionSign,ie.reverseEndpointOffsets))continue;const ue=jL(_e,[ne]);c+=1,this.candidateAttempts+=1;const fe=this.getSnapshot(ue),pe=this.getViaIssueCount(fe),ye=U?.snapshot??e;pe\u003c=(U?.viaIssueCount??r)\u0026\u0026nW(fe,ye)\u0026\u0026(U={routes:ue,snapshot:fe,viaIssueCount:pe,usesViaInPad:!1})}this.traceLayerCorridorCursorByErrorId.set(Y,J)}if(this.enableSafeTraceLayerMoves\u0026\u0026x\u0026\u0026Y\u0026\u0026(this.initialLowCountErrorsHaveMovableTraces\u0026\u0026(te||W!==void 0)||!this.initialLowCountErrorsHaveMovableTraces\u0026\u0026te)){const J=this.initialLowCountErrorsHaveMovableTraces?Wco:c4t,oe=te??[W];let ie=this.tracePairDetourCursorByErrorId.get(Y)??0,ne=0;for(;c\u003ca\u0026\u0026ne\u003cJ.length;){const le=J[ie%J.length];ie+=1,ne+=1;const ge=oe[le.routeSide];if(ge===void 0)continue;const _e=this.initialLowCountErrorsHaveMovableTraces\u0026\u0026R.worst_contact_center?{...R,center:R.worst_contact_center,message:R.worst_contact_message??R.message,actual_clearance:R.worst_actual_clearance??R.actual_clearance}:R;if(le.kind===\"displacementChain\"){const Qe=x7(t),Pe=Bco(this.srj,Qe,_e,e.traceRouteIndexById,le.routeSide);if(!Pe)continue;u=!0,c+=1,this.candidateAttempts+=1;let we=rb(Qe),Te=this.getSnapshot(we),Re=this.getViaIssueCount(Te),Ee=this.getRepairIssueCount(Te);if(Ee\u003e0\u0026\u0026Ee\u003c=3\u0026\u0026c\u003ca){const Le=x7(we);let Ye=!1;for(const tt of Te.errors)Ye=Sco(this.srj,Le,tt,Te.traceRouteIndexById,Pe.movedRouteIndex,this.connMap)||Ye;if(Ye){c+=1,this.candidateAttempts+=1;const tt=rb(Le),At=this.getSnapshot(tt),at=this.getViaIssueCount(At);b7(At,at,Ee,this.getRepairIssueScore(Te),Re,Te)\u0026\u0026(we=tt,Te=At,Re=at,Ee=this.getRepairIssueCount(Te))}}const ke=U?this.getRepairIssueCount(U.snapshot):o,Ce=U?this.getRepairIssueScore(U.snapshot):i;if(b7(Te,Re,ke,Ce,U?.viaIssueCount??r,U?.snapshot??e)\u0026\u0026(U={routes:we,snapshot:Te,viaIssueCount:Re,usesViaInPad:!1}),Ee===0)break;continue}const ue=UL(t,[ge]);if(!(le.kind===\"segment\"?vco(ue,_e,ge,le.halfSpan,le.offset,le.directionSign):le.kind===\"span\"?Pco(this.srj,ue,_e,ge,le.spanExpansion,le.offset,le.directionSign):Mco(this.srj,ue,_e,ge,le.spanExpansion,{x:_e.center.x+le.dx,y:_e.center.y+le.dy})))continue;const fe=jL(ue,[ge]);u=!0,c+=1,this.candidateAttempts+=1;const pe=this.getSnapshot(fe),ye=this.getViaIssueCount(pe),Me=U?this.getRepairIssueCount(U.snapshot):o,ve=U?this.getRepairIssueScore(U.snapshot):i,he=U?.viaIssueCount??r;(this.initialLowCountErrorsHaveMovableTraces?b7(pe,ye,Me,ve,he,U?.snapshot??e):ye\u003c=he\u0026\u0026nW(pe,U?.snapshot??e))\u0026\u0026(U={routes:fe,snapshot:pe,viaIssueCount:ye,usesViaInPad:!1})}this.tracePairDetourCursorByErrorId.set(Y,ie)}for(const J of this.enableViaInPadLayerMoves?[\"start\",\"end\"]:[]){if(c\u003e=a||W===void 0)break;const oe=UL(t,[W]);if(!Eco(this.srj,oe,R,e.traceRouteIndexById,J,this.connMap,this.viaHoleDiameter))continue;const ie=jL(oe,[W]);this.viaInPadCandidateAttempts+=1,c+=1,this.candidateAttempts+=1;const ne=this.getSnapshot(ie),le=this.getViaIssueCount(ne),ge=U?this.getRepairIssueCount(U.snapshot):o,_e=U?this.getRepairIssueScore(U.snapshot):i;b7(ne,le,ge,_e,U?.viaIssueCount??r,U?.snapshot??e)\u0026\u0026(U={routes:ie,snapshot:ne,viaIssueCount:le,usesViaInPad:!0})}const j=this.enableViaInPadLayerMoves?this.srj.layerCount:0;for(let J=0;J\u003cj\u0026\u0026!(c\u003e=a)\u0026\u0026W!==void 0;J+=1){const oe=UL(t,[W]);if(!xco(this.srj,oe,R,e.traceRouteIndexById,J,this.connMap,this.viaHoleDiameter))continue;const ie=jL(oe,[W]);this.viaInPadCandidateAttempts+=1,c+=1,this.candidateAttempts+=1;const ne=this.getSnapshot(ie),le=this.getViaIssueCount(ne),ge=U?this.getRepairIssueCount(U.snapshot):o,_e=U?this.getRepairIssueScore(U.snapshot):i;b7(ne,le,ge,_e,U?.viaIssueCount??r,U?.snapshot??e)\u0026\u0026(U={routes:ie,snapshot:ne,viaIssueCount:le,usesViaInPad:!0})}if(this.enableViaInPadLayerMoves\u0026\u0026x\u0026\u0026te){const J=this.iterations%2==0?[0,1]:[1,0],oe=this.iterations%3;for(const ie of J)for(let ne=0;ne\u003cthis.srj.layerCount\u0026\u0026!(c\u003e=a);ne+=1){const le=te[ie],ge=UL(t,[le]);if(!Qco(this.srj,ge,R,e.traceRouteIndexById,ie,ne,oe,this.connMap,this.viaHoleDiameter))continue;const _e=jL(ge,[le]);this.viaInPadCandidateAttempts+=1,c+=1,this.candidateAttempts+=1;const ue=this.getSnapshot(_e),fe=this.getViaIssueCount(ue),pe=U?this.getRepairIssueCount(U.snapshot):o,ye=U?this.getRepairIssueScore(U.snapshot):i;b7(ue,fe,pe,ye,U?.viaIssueCount??r,U?.snapshot??e)\u0026\u0026(U={routes:_e,snapshot:ue,viaIssueCount:fe,usesViaInPad:!0})}}U\u0026\u0026(t=U.routes,e=U.snapshot,o=this.getRepairIssueCount(e),i=this.getRepairIssueScore(e),r=U.viaIssueCount,this.targetedForceAccepted=!0,U.usesViaInPad\u0026\u0026(this.viaInPadCandidatesAccepted+=1),g=!0)}if(!g\u0026\u0026y.length\u003e=2){const R=x7(t);let F=!1;for(const O of y)F=Z5t(this.srj,R,[O],e.traceRouteIndexById,1,this.connMap,!0,this.enableTargetedErrorSweep,!1,this.enableTraceViaOwnerTargeting)||F;if(F){const O=rb(R);c+=1,this.candidateAttempts+=1;const U=this.getSnapshot(O),Y=this.getViaIssueCount(U);if(b7(U,Y,o,i,r,e)\u0026\u0026(t=O,e=U,o=this.getRepairIssueCount(U),i=this.getRepairIssueScore(U),r=Y,this.targetedForceAccepted=!0,g=!0,U.count===0))return void this.acceptSolvedRoutes(t,e)}}for(let R=0;R\u003cI\u0026\u0026c\u003ca\u0026\u0026!g;R+=1){const F=(C+R)%f.length,O=f[F];if(!O)continue;this.errorCursor=(F+1)%f.length;const U=o===1;for(const Y of soo(this.effort)){if(c\u003e=a)break;const W=x7(t);if(!Z5t(this.srj,W,[O],e.traceRouteIndexById,Y,this.connMap,!0,this.enableTargetedErrorSweep,U,this.enableTraceViaOwnerTargeting))continue;const te=rb(W);c+=1,this.candidateAttempts+=1;const j=this.getSnapshot(te),J=this.getViaIssueCount(j);if(b7(j,J,o,i,r,e)){if(t=te,e=j,o=this.getRepairIssueCount(j),i=this.getRepairIssueScore(j),r=J,this.targetedForceAccepted=!0,g=!0,j.count===0)return void this.acceptSolvedRoutes(t,e);break}}if(g)break}const Q=t.length\u003c=120,w=(M=s.length,Math.max(16,Math.min(64,2*M)));var M;const k=this.enableLargeBoardBroadFallback\u0026\u0026this.MAX_ITERATIONS\u003e=192\u0026\u0026!Q\u0026\u0026this.stalledIterations\u003e0\u0026\u0026this.stalledIterations%w===0;if(this.enableBroadFallback\u0026\u0026!g\u0026\u0026(Q||this.effort\u003e=2\u0026\u0026this.stalledIterations\u003e=2||k)){h=k;for(const R of[1,2]){const F=G5t(this.srj,t,this.effort,R,this.connMap,this.drcEvaluator===void 0,!1);if(F===t)continue;const O=this.getSnapshot(F),U=this.getViaIssueCount(O);if(b7(O,U,o,i,r,e)\u0026\u0026(t=F,e=O,o=this.getRepairIssueCount(O),i=this.getRepairIssueScore(O),r=U,this.broadForceAccepted=!0,g=!0,O.count===0))return void this.acceptSolvedRoutes(t,e)}}g?this.largeBoardBroadFallbackMisses=0:h\u0026\u0026(this.largeBoardBroadFallbackMisses+=1),this.outputHdRoutes=t,this.outputSnapshot=e,this.stalledIterations=g?0:this.stalledIterations+1,u||this.updateDrcCountPlateauState(e),this.updateStats(e),(this.solved||o===0)\u0026\u0026this.acceptSolvedRoutes(t,e)}tryFinalAcceptance(){const t=this.outputSnapshot??this.getSnapshot(this.outputHdRoutes);this.legacyCleanCheckpoint\u0026\u0026Bx(t)\u003e0\u0026\u0026this.finishAtLegacyCleanCheckpoint()||this.acceptSolvedRoutes(this.outputHdRoutes,t)}getOutput(){return this.outputHdRoutes}visualize(){return super.visualize()}preview(){return this.visualize()}},jbe=class extends zA{params;inputHdRoutes;guardedInputHdRoutes;broadMaxIterations;broadPassMultiplier;autoroutingDrcEngine;legacyDrcEvaluator;outputHdRoutes;phase=\"start\";inputSnapshot;baselineSolver;baselineSnapshot;broadInputSnapshot;broadSnapshot;broadSolver;safeTraceLayerInputRoutes;safeTraceLayerInputSnapshot;safeTraceLayerSolver;safeTraceLayerPhaseAccepted=!1;mixedSafeTraceLayerSolver;mixedSafeTraceLayerPhaseAccepted=!1;legacySafeTraceLayerRoutes;legacySafeTraceLayerSnapshot;legacySafeTraceLayerSelectedSolver;viaInPadSolver;portfolioSelectedSolver;selectedSolver;referenceInputDrcIssueCount;referenceCandidateDrcIssueCount;referenceCandidateRolledBack=!1;mixedReferenceInputDrcIssueCount;mixedReferenceCandidateDrcIssueCount;referenceInputSnapshot;constructor(e){if(super(),!Number.isFinite(e.broadPassMultiplier))throw new Error(\"broadPassMultiplier must be a finite number\");if(e.broadPassMultiplier\u003c=0)throw new Error(\"broadPassMultiplier must be greater than zero\");if(!Number.isInteger(e.broadMaxIterations))throw new Error(\"broadMaxIterations must be an integer\");if(e.broadMaxIterations\u003c=0)throw new Error(\"broadMaxIterations must be greater than zero\");if(e.viaInPadMaxIterations!==void 0\u0026\u0026!Number.isInteger(e.viaInPadMaxIterations))throw new Error(\"viaInPadMaxIterations must be an integer\");if(e.viaInPadMaxIterations!==void 0\u0026\u0026e.viaInPadMaxIterations\u003c=0)throw new Error(\"viaInPadMaxIterations must be greater than zero\");this.autoroutingDrcEngine=e.autoroutingDrcEngine??(e.drcEvaluator?void 0:new fJ(e.srj,{connMap:e.connMap,traceClearance:e.srj.minTraceToPadEdgeClearance??xx.traceClearance,viaClearance:e.srj.minTraceToPadEdgeClearance??xx.viaClearance,includeTraceViaOwnerMetadata:e.enableTraceViaOwnerTargeting??!1})),this.legacyDrcEvaluator=n=\u003e{const o=e.drcEvaluator?.evaluateLegacy??e.drcEvaluator,i=o?o(n):this.autoroutingDrcEngine.evaluateLegacy(n.traces),r=Array.isArray(i)?i:i.errors,s=Array.isArray(i)?i:i.errorsWithCenters??i.errors;return{errors:r.filter(a=\u003e!Ex(a)),errorsWithCenters:s.filter(a=\u003e!Ex(a))}},this.params={...e,autoroutingDrcEngine:this.autoroutingDrcEngine},this.inputHdRoutes=e.hdRoutes,this.guardedInputHdRoutes=rb(x7(e.hdRoutes)),this.broadMaxIterations=e.broadMaxIterations,this.broadPassMultiplier=e.broadPassMultiplier,this.outputHdRoutes=e.hdRoutes,this.params.referenceDrcEvaluator\u0026\u0026(this.referenceInputSnapshot=this.getReferenceDrcSnapshot(this.inputHdRoutes))}getConstructorParams(){return[{...this.params,hdRoutes:this.inputHdRoutes}]}stepBranch(e,n){if(this.activeSubSolver=e,e.step(),e.failed)throw new Error(`${n} DRC repair branch failed: ${e.error}`)}getReferenceDrcSnapshot(e){const n={traces:[],srj:this.params.srj,routes:e,hdRoutes:e},o=this.params.referenceDrcEvaluator?.getCachedResult?.(n);if(o){const i=Array.isArray(o)?o:o.errors;return{errors:i,count:i.length}}return E7(this.params.srj,e,this.params.referenceDrcEvaluator,this.params.connMap,this.autoroutingDrcEngine)}finishWithOutput(e,n,o){let i=e,r=n;if(this.params.referenceDrcEvaluator){const s=this.referenceInputSnapshot,a=this.getReferenceDrcSnapshot(i);this.referenceInputDrcIssueCount=s.count,this.referenceCandidateDrcIssueCount=a.count,(a.count\u003es.count||a.count===s.count\u0026\u0026((A,c)=\u003e{const l=new Set(c.map(K5t));return A.some(u=\u003e!l.has(K5t(u)))})(a.errors,s.errors))\u0026\u0026(i=this.guardedInputHdRoutes,r=this.inputSnapshot,this.referenceCandidateRolledBack=!0)}this.outputHdRoutes=i,this.selectedSolver=o,this.activeSubSolver=null,this.phase=\"done\",this.progress=1,this.stats={...this.portfolioSelectedSolver?.stats??{},...o?.stats??{},finalDrcIssueCount:r.count,drcBranchPortfolioInitialDrcIssueCount:this.inputSnapshot?.count??n.count,drcBranchPortfolioBaselineDrcIssueCount:this.baselineSnapshot?.count??n.count,drcBranchPortfolioBroadInitialDrcIssueCount:this.broadInputSnapshot?.count,drcBranchPortfolioBroadFinalDrcIssueCount:this.broadSnapshot?.count,drcBranchPortfolioBroadMaxIterations:this.broadMaxIterations,drcBranchPortfolioBroadBranchAttempted:!!this.broadSolver,drcBranchPortfolioBroadBranchAccepted:this.portfolioSelectedSolver!==void 0\u0026\u0026this.portfolioSelectedSolver===this.broadSolver,drcBranchPortfolioSafeTraceLayerPhaseAttempted:!!this.safeTraceLayerSolver,drcBranchPortfolioSafeTraceLayerPhaseAccepted:this.safeTraceLayerPhaseAccepted,drcBranchPortfolioMixedSafeTraceLayerPhaseAttempted:!!this.mixedSafeTraceLayerSolver,drcBranchPortfolioMixedSafeTraceLayerPhaseAccepted:this.mixedSafeTraceLayerPhaseAccepted,drcBranchPortfolioViaInPadPhaseAttempted:!!this.viaInPadSolver,drcBranchPortfolioViaInPadMaxIterations:this.params.viaInPadMaxIterations,drcBranchPortfolioFinalNonViaPadDrcIssueCount:Bx(r),drcBranchPortfolioReferenceInputDrcIssueCount:this.referenceInputDrcIssueCount,drcBranchPortfolioReferenceCandidateDrcIssueCount:this.referenceCandidateDrcIssueCount,drcBranchPortfolioReferenceCandidateRolledBack:this.referenceCandidateRolledBack,drcBranchPortfolioMixedReferenceInputDrcIssueCount:this.mixedReferenceInputDrcIssueCount,drcBranchPortfolioMixedReferenceCandidateDrcIssueCount:this.mixedReferenceCandidateDrcIssueCount},this.solved=!0}startBaselineBranch(){this.baselineSolver=new S7({...this.params,hdRoutes:this.inputHdRoutes,drcEvaluator:this.legacyDrcEvaluator,referenceDrcEvaluator:void 0,enableSafeTraceLayerMoves:!1,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.baselineSolver,this.phase=\"baseline\"}startSafeTraceLayerPhase(e,n,o){this.portfolioSelectedSolver=o,this.params.enableSafeTraceLayerMoves?(this.safeTraceLayerInputRoutes=e,this.safeTraceLayerInputSnapshot=n,this.safeTraceLayerSolver=new S7({...this.params,hdRoutes:e,drcEvaluator:this.legacyDrcEvaluator,referenceDrcEvaluator:void 0,maxIterations:this.params.viaInPadMaxIterations??this.params.maxIterations,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.safeTraceLayerSolver,this.phase=\"safeTraceLayer\"):this.startViaInPadPhase(e,n,o)}startViaInPadPhase(e,n,o){this.portfolioSelectedSolver=o;const i=this.params.enableViaInPadLayerMoves\u0026\u0026this.params.viaInPadDrcEvaluator!==void 0;n.errors.some(Ex)||i?(this.viaInPadSolver=new S7({...this.params,hdRoutes:e,drcEvaluator:this.params.viaInPadDrcEvaluator??this.params.drcEvaluator,maxIterations:this.params.viaInPadMaxIterations??this.params.maxIterations,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!1,enableViaInPadLayerMoves:this.params.enableViaInPadLayerMoves}),this.activeSubSolver=this.viaInPadSolver,this.phase=\"viaInPad\"):this.finishWithOutput(e,n,o)}startMixedSafeTraceLayerPhase(e,n,o){this.legacySafeTraceLayerRoutes=e,this.legacySafeTraceLayerSnapshot=n,this.legacySafeTraceLayerSelectedSolver=o,this.mixedSafeTraceLayerSolver=new S7({...this.params,hdRoutes:this.safeTraceLayerInputRoutes,drcEvaluator:this.params.drcEvaluator,referenceDrcEvaluator:void 0,maxIterations:this.params.viaInPadMaxIterations??this.params.maxIterations,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.mixedSafeTraceLayerSolver,this.phase=\"mixedSafeTraceLayer\"}startBroadBranch(){const e=G5t(this.params.srj,this.inputHdRoutes,this.params.effort??1,this.broadPassMultiplier,this.params.connMap);this.broadInputSnapshot=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),nW(this.broadInputSnapshot,this.baselineSnapshot)?(this.broadSolver=new S7({...this.params,hdRoutes:e,drcEvaluator:this.legacyDrcEvaluator,referenceDrcEvaluator:void 0,maxIterations:this.broadMaxIterations,enableSafeTraceLayerMoves:!1,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.broadSolver,this.phase=\"broad\"):this.startSafeTraceLayerPhase(this.baselineSolver.getOutput(),this.baselineSnapshot,this.baselineSolver)}_step(){if(this.phase===\"start\")return this.inputSnapshot=E7(this.params.srj,this.inputHdRoutes,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),Bx(this.inputSnapshot)===0?void this.startViaInPadPhase(this.inputHdRoutes,this.inputSnapshot):void this.startBaselineBranch();if(this.phase===\"baseline\"){if(this.stepBranch(this.baselineSolver,\"baseline\"),!this.baselineSolver.solved)return;const e=this.baselineSolver.getOutput();return this.baselineSnapshot=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),Bx(this.baselineSnapshot)===0?void this.startViaInPadPhase(e,this.baselineSnapshot,this.baselineSolver):void(this.params.enableSafeTraceLayerMoves\u0026\u0026this.baselineSnapshot.count\u003c=3?this.startSafeTraceLayerPhase(e,this.baselineSnapshot,this.baselineSolver):this.startBroadBranch())}if(this.phase===\"broad\"){if(this.stepBranch(this.broadSolver,\"broad\"),!this.broadSolver.solved)return;const e=this.broadSolver.getOutput();return this.broadSnapshot=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),nW(this.broadSnapshot,this.baselineSnapshot)?void this.startSafeTraceLayerPhase(e,this.broadSnapshot,this.broadSolver):void this.startSafeTraceLayerPhase(this.baselineSolver.getOutput(),this.baselineSnapshot,this.baselineSolver)}if(this.phase===\"safeTraceLayer\"){if(this.stepBranch(this.safeTraceLayerSolver,\"safe trace-layer\"),!this.safeTraceLayerSolver.solved)return;const e=this.safeTraceLayerSolver.getOutput(),n=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),o=Kbe(this.safeTraceLayerInputSnapshot),i=Kbe(n);this.safeTraceLayerPhaseAccepted=i\u003c=o\u0026\u0026b7(n,i,this.safeTraceLayerInputSnapshot.count,this.safeTraceLayerInputSnapshot.issueScore,o);const r=this.safeTraceLayerPhaseAccepted?e:this.safeTraceLayerInputRoutes,s=this.safeTraceLayerPhaseAccepted?n:this.safeTraceLayerInputSnapshot,a=this.safeTraceLayerPhaseAccepted?this.safeTraceLayerSolver:this.portfolioSelectedSolver;return s.count\u003e0\u0026\u0026!this.broadInputSnapshot?void this.startBroadBranch():Bx(s)\u003e0\u0026\u0026this.safeTraceLayerInputSnapshot.errors.some(Ex)?void this.startMixedSafeTraceLayerPhase(r,s,a):void this.startViaInPadPhase(r,s,a)}if(this.phase===\"mixedSafeTraceLayer\"){if(this.stepBranch(this.mixedSafeTraceLayerSolver,\"mixed safe trace-layer\"),!this.mixedSafeTraceLayerSolver.solved)return;const e=this.mixedSafeTraceLayerSolver.getOutput(),n=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),o=Bx(n)\u003c=Bx(this.legacySafeTraceLayerSnapshot);let i=!0;if(this.params.referenceDrcEvaluator){const r=this.getReferenceDrcSnapshot(this.legacySafeTraceLayerRoutes),s=this.getReferenceDrcSnapshot(e);this.mixedReferenceInputDrcIssueCount=r.count,this.mixedReferenceCandidateDrcIssueCount=s.count,i=s.count\u003c=r.count}return this.mixedSafeTraceLayerPhaseAccepted=o\u0026\u0026i,void this.startViaInPadPhase(this.mixedSafeTraceLayerPhaseAccepted?e:this.legacySafeTraceLayerRoutes,this.mixedSafeTraceLayerPhaseAccepted?n:this.legacySafeTraceLayerSnapshot,this.mixedSafeTraceLayerPhaseAccepted?this.mixedSafeTraceLayerSolver:this.legacySafeTraceLayerSelectedSolver)}if(this.phase===\"viaInPad\"){if(this.stepBranch(this.viaInPadSolver,\"via-in-pad\"),!this.viaInPadSolver.solved)return;const e=this.viaInPadSolver.getOutput(),n=E7(this.params.srj,e,this.params.viaInPadDrcEvaluator??this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine);this.finishWithOutput(e,n,this.viaInPadSolver)}}getOutput(){return this.outputHdRoutes}visualize(){return(this.activeSubSolver??this.selectedSolver)?.visualize()??super.visualize()}preview(){return(this.activeSubSolver??this.selectedSolver)?.preview()??this.visualize()}},vAe=class extends yr{constructor(t,e,n=Number.POSITIVE_INFINITY,o=.010000000000000002){super(),this.nodes=t,this.maxNodeDimension=e,this.maxNodeRatio=n,this.minNodeArea=o,this.outputNodes=[]}nodes;maxNodeDimension;maxNodeRatio;minNodeArea;outputNodes;getSolverName(){return\"NodeDimensionSubdivisionSolver\"}getSubdivisionGrid(t){const e=Number.isFinite(this.maxNodeDimension)\u0026\u0026this.maxNodeDimension\u003e0,n=Number.isFinite(this.maxNodeRatio)\u0026\u0026this.maxNodeRatio\u003e0;let o=e?Math.max(1,Math.ceil(t.width/this.maxNodeDimension)):1,i=e?Math.max(1,Math.ceil(t.height/this.maxNodeDimension)):1;if(n\u0026\u0026t.width\u003e0\u0026\u0026t.height\u003e0)for(;;){const r=t.width/o,s=t.height/i;if((r\u003e=s?r/s:s/r)\u003c=this.maxNodeRatio)break;r\u003e=s?o++:i++}return{cols:o,rows:i}}shouldRemoveNode(t){const e=Number.isFinite(this.minNodeArea)\u0026\u0026this.minNodeArea\u003e0;if(!Number.isFinite(t.width)||!Number.isFinite(t.height))return!0;if(!e||t.width*t.height\u003e=this.minNodeArea)return!1;if(Math.min(t.width,t.height)\u003c.002)return!0;if(t._containsTarget)return!1;let n=0;for(const o of this.nodes)if(o.capacityMeshNodeId!==t.capacityMeshNodeId\u0026\u0026t.availableZ.some(i=\u003eo.availableZ.includes(i))\u0026\u0026Use(t,o)\u0026\u0026(o._containsTarget||(n++,n\u003e=2)))return!1;return!0}subdivideNode(t){if(this.shouldRemoveNode(t))return[];const{cols:e,rows:n}=this.getSubdivisionGrid(t);if(e===1\u0026\u0026n===1)return[t];const o=t.width/e,i=t.height/n,r=t.center.x-t.width/2,s=t.center.y-t.height/2,a=[];for(let A=0;A\u003cn;A++)for(let c=0;c\u003ce;c++)a.push({...t,capacityMeshNodeId:`${t.capacityMeshNodeId}__sub_${A}_${c}`,center:{x:r+o*(c+.5),y:s+i*(A+.5)},width:o,height:i,availableZ:[...t.availableZ]});return a}_step(){const t=this.nodes.length;let e=0,n=0,o=0;for(const i of this.nodes){const r=!Number.isFinite(i.width)||!Number.isFinite(i.height),s=this.subdivideNode(i);s.length!==0?(s.length\u003e1\u0026\u0026e++,this.outputNodes.push(...s)):r?o++:n++}this.stats={inputNodeCount:t,outputNodeCount:this.outputNodes.length,subdividedNodeCount:e,removedSmallNodeCount:n,removedInvalidNodeCount:o,maxNodeDimension:this.maxNodeDimension,maxNodeRatio:this.maxNodeRatio,minNodeArea:this.minNodeArea},this.solved=!0}visualize(){return{rects:this.outputNodes.map(t=\u003e({center:t.center,width:t.width,height:t.height,label:`${t.capacityMeshNodeId}\n${t.width.toFixed(2)}x${t.height.toFixed(2)}`,layer:`z${t.availableZ.join(\",\")}`,fill:\"rgba(0, 200, 255, 0.08)\",stroke:\"rgba(0, 120, 180, 0.5)\"}))}}},cB=t=\u003e{const e=[...new Set(t.filter(n=\u003etypeof n==\"number\"\u0026\u0026Number.isInteger(n)\u0026\u0026n\u003e=0))].sort((n,o)=\u003en-o);if(e.length!==0)return`z${e.join(\",\")}`},$be=t=\u003e{const e=[];for(let n=0;n\u003c31;n++)t\u00261\u003c\u003cn\u0026\u0026e.push(n);return e},Ev=t=\u003etypeof t==\"object\"\u0026\u0026t!==null,l4t=t=\u003eEv(t)?{...t}:t===void 0?{}:{value:t},gN=(t,e)=\u003e{const n=t.topology.regionMetadata?.[e];if(Ev(n)){if(typeof n.serializedRegionId==\"string\")return n.serializedRegionId;if(typeof n.regionId==\"string\")return n.regionId;if(typeof n.capacityMeshNodeId==\"string\")return n.capacityMeshNodeId}return`region-${e}`},XL=(t,e)=\u003e{const n=t.topology.portMetadata?.[e];if(Ev(n)){if(typeof n.serializedPortId==\"string\")return n.serializedPortId;if(typeof n.portId==\"string\")return(o=n.portId).includes(\"::\")?o.slice(0,o.indexOf(\"::\")):o}var o;return`port-${e}`},u4t=(t,e)=\u003e{const n=t.problem.routeMetadata?.[e];return Ev(n)\u0026\u0026typeof n.connectionId==\"string\"?n.connectionId:`route-${e}`},jco=(t,e)=\u003e{const n=l4t(t.topology.regionMetadata?.[e]);if(Ev(n.center)||(n.center={x:t.topology.regionCenterX[e],y:t.topology.regionCenterY[e]}),typeof n.width!=\"number\"\u0026\u0026(n.width=t.topology.regionWidth[e]),typeof n.height!=\"number\"\u0026\u0026(n.height=t.topology.regionHeight[e]),!Array.isArray(n.availableZ)){const o=t.topology.regionAvailableZMask?.[e]??0;o!==0\u0026\u0026(n.availableZ=$be(o))}return n.layer=cB(Array.isArray(n.availableZ)?n.availableZ:[])??cB((t.topology.regionIncidentPorts[e]??[]).map(o=\u003et.topology.portZ[o]))??\"z0\",n},$co=(t,e)=\u003e{const n=l4t(t.topology.portMetadata?.[e]);return typeof n.x!=\"number\"\u0026\u0026(n.x=t.topology.portX[e]),typeof n.y!=\"number\"\u0026\u0026(n.y=t.topology.portY[e]),typeof n.z!=\"number\"\u0026\u0026(n.z=t.topology.portZ[e]),n.layer=cB([t.topology.portZ[e]])??\"z0\",n},g4t=(t,e,n)=\u003e{const o=(t.topology.incidentPortRegion[e]??[]).find(i=\u003ei!==n);if(o===void 0)throw new Error(`Port ${e} is not incident to a region outside route region ${n}`);return o},qco=(t,e,n)=\u003e{const{orderedPortIds:o,orderedRegionIds:i}=((u,g,h)=\u003e{if(h.length===0)throw new Error(`Route ${g} has no solved segments`);const d=u.problem.routeStartPort[g],p=u.problem.routeEndPort[g],m=new Map;h.forEach((C,y)=\u003e{const x={...C,segmentIndex:y},E=m.get(C.fromPortId)??[];E.push(x),m.set(C.fromPortId,E);const B=m.get(C.toPortId)??[];B.push(x),m.set(C.toPortId,B)});const _=[d],f=[],I=(C,y,x)=\u003e{if(C===p)return!0;for(const E of m.get(C)??[]){if(y.has(E.segmentIndex))continue;const B=E.fromPortId===C?E.toPortId:E.fromPortId;if(!x.has(B)){if(y.add(E.segmentIndex),x.add(B),f.push(E.regionId),_.push(B),I(B,y,x))return!0;_.pop(),f.pop(),x.delete(B),y.delete(E.segmentIndex)}}return!1};if(!I(d,new Set,new Set([d])))throw new Error(`Route ${g} is not a single ordered path from ${d} to ${p}`);return{orderedPortIds:_,orderedRegionIds:f}})(t,e,n),r=i[0],s=i[i.length-1];if(r===void 0||s===void 0)throw new Error(`Route ${e} could not determine endpoint regions`);const a=gN(t,g4t(t,o[0],r)),A=gN(t,g4t(t,o[o.length-1],s)),c=((u,g,h,d)=\u003e{const p=u.problem.routeMetadata?.[g];return{connectionId:u4t(u,g),startRegionId:(Ev(p)\u0026\u0026typeof p.startRegionId==\"string\"?p.startRegionId:void 0)??h,endRegionId:(Ev(p)\u0026\u0026typeof p.endRegionId==\"string\"?p.endRegionId:void 0)??d,mutuallyConnectedNetworkId:(Ev(p)\u0026\u0026typeof p.mutuallyConnectedNetworkId==\"string\"?p.mutuallyConnectedNetworkId:void 0)??`net-${u.problem.routeNet[g]}`}})(t,e,a,A),l=o.map((u,g)=\u003e{const h={portId:XL(t,u),g,h:0,f:g,hops:g,ripRequired:!1,nextRegionId:g\u003ci.length?gN(t,i[g]):c.endRegionId};return g\u003e0\u0026\u0026(h.lastPortId=XL(t,o[g-1]),h.lastRegionId=gN(t,i[g-1])),h});return{connection:c,solvedRoute:{connection:c,path:l,requiredRip:!1}}},Xco=t=\u003e{if(!t.solved||t.failed)throw new Error(\"convertToSerializedHyperGraph requires a solved, non-failed solver\");const{topology:e}=t,n=(s=\u003e{const a=Array.from({length:s.problem.routeCount},()=\u003e[]);return s.state.regionSegments.forEach((A,c)=\u003e{for(const[l,u,g]of A)a[l].push({regionId:c,fromPortId:u,toPortId:g})}),a})(t),o=Array.from({length:e.regionCount},(s,a)=\u003e{const A=t.state.regionSegments[a].map(([c,l,u])=\u003e({regionPort1Id:XL(t,l),regionPort2Id:XL(t,u),connectionId:u4t(t,c)}));return{regionId:gN(t,a),pointIds:e.regionIncidentPorts[a].map(c=\u003eXL(t,c)),d:jco(t,a),...A.length\u003e0\u0026\u0026{assignments:A}}}),i=Array.from({length:e.portCount},(s,a)=\u003e{const[A,c]=e.incidentPortRegion[a]??[];if(A===void 0||c===void 0)throw new Error(`Port ${a} is missing incident regions`);return{portId:XL(t,a),region1Id:gN(t,A),region2Id:gN(t,c),d:$co(t,a)}}),r=n.map((s,a)=\u003eqco(t,a,s));return{regions:o,ports:i,connections:r.map(({connection:s})=\u003es),solvedRoutes:r.map(({solvedRoute:s})=\u003es)}},d4t=.3,h4t=t=\u003et\u003e0\u0026\u0026!(t\u0026t-1),Zco=(t,e,n,o,i,r=0,s=.3,a=0)=\u003e(2*e+1*n+1*o)*(s+.15)**2*(1+i/5)/t+(h4t(r)?10*e:0)+a*(i/elo(r))**2*.1**2/t,elo=t=\u003e{if(t===0)return 2;let e=t\u003e\u003e\u003e0,n=0;for(;e!==0;)n+=1\u0026e,e\u003e\u003e\u003e=1;return n},p4t=(t,e,n,o,i,r)=\u003e{const{netIds:s,lesserAngles:a,greaterAngles:A,layerMasks:c}=t;let l=0,u=0;for(let g=0;g\u003cs.length;g++)e!==s[g]\u0026\u0026(n\u003ca[g]\u0026\u0026a[g]\u003co)!=(n\u003cA[g]\u0026\u0026A[g]\u003co)\u0026\u0026((i\u0026c[g])!==0?l++:u++);return[l,u,r]},tlo=(t,e,n)=\u003e{const o=t.routeStartPort[e],i=t.routeEndPort[e],r=new Map;for(const{fromPortId:A,toPortId:c}of n){const l=r.get(A)??new Set;l.add(c),r.set(A,l);const u=r.get(c)??new Set;u.add(A),r.set(c,u)}const s=new Set,a=[o];for(;a.length\u003e0;){const A=a.pop();if(!s.has(A)){s.add(A);for(const c of r.get(A)??[])a.push(c)}}if(!s.has(i))throw new Error(`Initial assignments for route ${e} do not connect ${o} to ${i}`);if(n.some(({fromPortId:A,toPortId:c})=\u003e!s.has(A)||!s.has(c)))throw new Error(`Initial assignments for route ${e} contain disconnected segments`)},m4t=({topology:t,problem:e,state:n,routeSuccessCountByRouteId:o,appendSegmentToRegionCache:i})=\u003e{const r=e.initialAssignments??[];if(r.length===0)return;const s=new Map;for(const A of r){const{routeId:c,regionId:l,fromPortId:u,toPortId:g}=A;if(!Number.isInteger(c)||c\u003c0||c\u003e=e.routeCount)throw new Error(`Initial assignment references invalid route ${c}`);if(!Number.isInteger(l)||l\u003c0||l\u003e=t.regionCount)throw new Error(`Initial assignment references invalid region ${l}`);for(const d of[u,g]){if(!Number.isInteger(d)||d\u003c0||d\u003e=t.portCount)throw new Error(`Initial assignment references invalid port ${d}`);if(!t.incidentPortRegion[d]?.includes(l))throw new Error(`Initial assignment port ${d} is not incident to region ${l}`)}const h=s.get(c)??[];h.push(A),s.set(c,h)}for(const[A,c]of s)tlo(e,A,c);const a=new Set(s.keys());for(const{routeId:A,regionId:c,fromPortId:l,toPortId:u}of r){const g=e.routeNet[A];for(const h of[l,u]){const d=n.portAssignment[h];if(d!==-1\u0026\u0026d!==g)throw new Error(`Initial assignment port ${h} is assigned to multiple nets`);n.portAssignment[h]=g}n.currentRouteNetId=g,n.regionSegments[c].push([A,l,u]),i(c,l,u)}n.currentRouteNetId=void 0,n.unroutedRoutes=n.unroutedRoutes.filter(A=\u003e!a.has(A));for(const A of a)o[A]=1;return{initialAssignmentCount:r.length,initiallyRoutedRouteCount:a.size}},_4t=class{constructor(t,e){this.items=t,this.compare=e}items;compare;get length(){return this.items.length}toArray(){return[...this.items]}clear(){this.items.length=0}queue(t){this.items.push(t),this.siftUp(this.items.length-1)}dequeue(){const t=this.items[0];if(t===void 0)return;const e=this.items.pop();return this.items.length\u003e0\u0026\u0026(this.items[0]=e,this.siftDown(0)),t}siftUp(t){let e=t;for(;e\u003e0;){const n=e-1\u003e\u003e1,o=this.items[n],i=this.items[e];if(this.compare(o,i)\u003c=0)return;this.items[n]=i,this.items[e]=o,e=n}}siftDown(t){let e=t;const n=this.items.length;for(;;){const o=2*e+1;if(o\u003e=n)return;const i=o+1;let r=o;i\u003cn\u0026\u0026this.compare(this.items[i],this.items[o])\u003c0\u0026\u0026(r=i);const s=this.items[e],a=this.items[r];if(this.compare(s,a)\u003c=0)return;this.items[e]=a,this.items[r]=s,e=r}}},wAe=(t,e)=\u003e{const n=[...t],o=(i=\u003e{let r=i\u003e\u003e\u003e0;return()=\u003e{r+=1831565813;let s=r;return s=Math.imul(s^s\u003e\u003e\u003e15,1|s),s^=s+Math.imul(s^s\u003e\u003e\u003e7,61|s),((s^s\u003e\u003e\u003e14)\u003e\u003e\u003e0)/4294967296}})(e);for(let i=n.length-1;i\u003e0;i--){const r=Math.floor(o()*(i+1));[n[i],n[r]]=[n[r],n[i]]}return n},f4t=(t,e)=\u003et.routeMetadata?.[e],nlo=t=\u003et?.simpleRouteConnection?.pointsToConnect?.map(({pointId:e})=\u003etypeof e==\"string\"?e:null).filter(e=\u003ee!==null)??[],olo=(t,e)=\u003e{const n=f4t(t,e)?.connectionId;return typeof n==\"string\"?n:`route-${e}`},ilo=(t,e,n)=\u003e{const o=t.portEndpointNetIds[n];if(!o)return!1;for(const i of o)if(i!==e)return!0;return!1},I4t=(t,e,n)=\u003e{const o=t.regionNetId[n];return o!==-1\u0026\u0026o!==e},rlo=t=\u003e[...new Set(t.routeIds)].filter(e=\u003e!((n,o)=\u003e{const{topology:i,problem:r,problemSetup:s,portAssignment:a,maxPrecheckHops:A}=n,c=r.routeNet[o],l=r.routeStartPort[o],u=r.routeEndPort[o];if(l===u)return!0;const g=n.getStartingNextRegionId(o,l);if(g===void 0)return!1;const h=[{portId:l,nextRegionId:g}],d=new Set([l*i.regionCount+g]);for(let p=0;p\u003ch.length;p++){const m=h[p];if(!I4t(r,c,m.nextRegionId))for(const _ of i.regionIncidentPorts[m.nextRegionId]??[]){const f=a[_];if(ilo(s,c,_))continue;if(_===u){if(f!==-1\u0026\u0026f!==c)continue;return!0}if(_===m.portId||f!==-1\u0026\u0026f!==c||r.portSectionMask[_]===0)continue;const I=i.incidentPortRegion[_]??[],C=I[0]===m.nextRegionId?I[1]:I[0];if(C===void 0||I4t(r,c,C))continue;const y=_*i.regionCount+C;if(!d.has(y)){if(d.size\u003e=A)return!0;d.add(y),h.push({portId:_,nextRegionId:C})}}}return!1})(t,e)).map(e=\u003et.getRouteSummary(e)),C4t=t=\u003e{const e=new Array(t);for(let n=0;n\u003ct;n++)e[n]=n;return e},qbe=\"rgba(220, 38, 38, 0.98)\",y4t=\"rgba(220, 38, 38, 0.18)\",Xbe=(...t)=\u003et.filter(e=\u003e!!e).join(`\n`),x4t=(t,e)=\u003e{const n=.005*t.topology.portZ[e];return{x:t.topology.portX[e]+n,y:t.topology.portY[e]+n}},E4t=(t,e)=\u003ecB([t.topology.portZ[e]])??\"z0\",B4t=(t,e)=\u003e{const n=t.topology.portMetadata?.[e];return`port: ${n?.serializedPortId??n?.portId??`port-${e}`}`},b4t=(t,e)=\u003e`z: ${t.topology.portZ[e]}`,slo=(t,e)=\u003e((n,o,i)=\u003e{const r=n.topology.portZ[o],s=n.topology.portZ[i];return r===s?`z: ${r}`:`z: ${r} -\u003e ${s}`})(t,t.problem.routeStartPort[e],t.problem.routeEndPort[e]),alo=(t,e)=\u003e`net: ${t.problem.routeNet[e]}`,PAe=.05,Alo={r:255,g:64,b:64,a:.72},MAe=\"rgba(220, 38, 38, 0.98)\",S4t=\"rgba(220, 38, 38, 0.12)\",Q4t=\"10 6\",q_=(...t)=\u003et.filter(e=\u003e!!e).join(`\n`),v4t=t=\u003eMath.min(1,Math.max(0,t)),Zbe=(t,e,n)=\u003eMath.round(t+(e-t)*n),w4t=({r:t,g:e,b:n,a:o})=\u003e`rgba(${t}, ${e}, ${n}, ${o})`,dN=(t,e)=\u003e{const n=t.problem.routeMetadata?.[e];return n?.connectionId??n?.mutuallyConnectedNetworkId??`route-${e}`},eSe=t=\u003etypeof t.centerRouteId==\"number\",tSe=(t,e)=\u003eeSe(t)?e===t.centerRouteId?1:.5:1,P4t=(t,e)=\u003e{const n=t.match(/^(rgba|hsla)\\((.*),\\s*([0-9]*\\.?[0-9]+)\\)$/);if(!n)return t;const[,o,i,r]=n,s=v4t(Number(r)*e);return`${o}(${i}, ${Number(s.toFixed(3))})`},hN=(t,e,n=.8)=\u003e((o,i,r=.8)=\u003e{const s=`${o.problem.routeNet[i]}:${dN(o,i)}`;let a=0;for(let A=0;A\u003cs.length;A++)a=17777*s.charCodeAt(A)+((a\u003c\u003c5)-a);return`hsla(${Math.abs(a)%360}, 70%, 50%, ${r})`})(t,e,n*tSe(t,e)),M4t=(t,e)=\u003e`net: ${t.problem.routeNet[e]}`,D4t=(t,e)=\u003e{const n=t.topology.regionMetadata?.[e],o=n?.polygon;if(Array.isArray(o)\u0026\u0026o.length\u003e=3){const c=o.map(u=\u003eu.x),l=o.map(u=\u003eu.y);return{minX:Math.min(...c),maxX:Math.max(...c),minY:Math.min(...l),maxY:Math.max(...l)}}const i=n?.bounds;if(i\u0026\u0026typeof i.minX==\"number\"\u0026\u0026typeof i.maxX==\"number\"\u0026\u0026typeof i.minY==\"number\"\u0026\u0026typeof i.maxY==\"number\")return i;const r=t.topology.regionWidth[e],s=t.topology.regionHeight[e],a=t.topology.regionCenterX[e],A=t.topology.regionCenterY[e];return{minX:a-r/2,maxX:a+r/2,minY:A-s/2,maxY:A+s/2}},N4t=(t,e)=\u003e({x:t.topology.regionCenterX[e],y:t.topology.regionCenterY[e]}),R4t=(t,e)=\u003e{const n=t.topology.regionMetadata?.[e],o=Array.isArray(n?.availableZ)?n.availableZ.filter(s=\u003etypeof s==\"number\"\u0026\u0026Number.isInteger(s)\u0026\u0026s\u003e=0):[];if(o.length\u003e0)return cB(o)??\"z0\";const i=$be(t.topology.regionAvailableZMask?.[e]??0);if(i.length\u003e0)return cB(i)??\"z0\";const r=[...new Set((t.topology.regionIncidentPorts[e]??[]).map(s=\u003et.topology.portZ[s]))].sort((s,a)=\u003es-a);return cB(r)??\"z0\"},T4t=(t,e)=\u003e{const n=t.state.regionIntersectionCaches[e],o=n?.existingRegionCost??0,i=t.state.regionCongestionCost[e]??0,r=t.problem.regionNetId[e];return q_(`region: region-${e}`,`net: ${r===-1?\"free\":`${r}`}`,t.getAdditionalRegionLabel(e),`cost: ${o.toFixed(3)}`,`congestion: ${i.toFixed(3)}`,`same layer X: ${n?.existingSameLayerIntersections??0}`,`trans X: ${n?.existingCrossingLayerIntersections??0}`,`entry exit X: ${n?.existingEntryExitLayerChanges??0}`)},k4t=(t,e)=\u003e{const n=t.topology.regionMetadata?.[e];return n?.isConnectionRegion?{r:255,g:100,b:255,a:.6}:n?.isThroughJumper?{r:100,g:200,b:100,a:.5}:n?.isPad?{r:255,g:200,b:100,a:.5}:n?.layer===\"bottom\"?{r:52,g:152,b:219,a:.08}:{r:200,g:200,b:255,a:.1}},clo=(t,e)=\u003e{const n=k4t(t,e),o=v4t(t.state.regionIntersectionCaches[e]?.existingRegionCost??0);return w4t((r=Alo,s=o**.8,{r:Zbe((i=n).r,r.r,s),g:Zbe(i.g,r.g,s),b:Zbe(i.b,r.b,s),a:Number((i.a+(r.a-i.a)*s).toFixed(3))}));var i,r,s},U5=(t,e)=\u003e{const n=((i,r)=\u003e({x:i.topology.portX[r],y:i.topology.portY[r]}))(t,e),o=.005*t.topology.portZ[e];return{x:n.x+o,y:n.y+o}},sW=U5,bx=(t,e)=\u003ecB([t.topology.portZ[e]])??\"z0\",ZL=(t,e)=\u003e{const n=t.topology.portMetadata?.[e];return`port: ${n?.serializedPortId??n?.portId??`port-${e}`}`},F4t=(t,e,n)=\u003e{if(n!==void 0)return`net: ${t.problem.routeNet[n]}`;const o=t.state.portAssignment[e];if(o\u003e=0)return`net: ${o}`;const i=new Set;for(let r=0;r\u003ct.problem.routeCount;r++)t.problem.routeStartPort[r]!==e\u0026\u0026t.problem.routeEndPort[r]!==e||i.add(t.problem.routeNet[r]);return i.size!==0?`net: ${Array.from(i).sort((r,s)=\u003er-s).join(\", \")}`:void 0},sb=(t,e)=\u003e`z: ${t.topology.portZ[e]}`,L4t=(t,e,n)=\u003e{const o=t.topology.portZ[e],i=t.topology.portZ[n];return o===i?`z: ${o}`:`z: ${o} -\u003e ${i}`},nSe=(t,e)=\u003eL4t(t,t.problem.routeStartPort[e],t.problem.routeEndPort[e]),DAe=(t,e,n)=\u003eq_(ZL(t,e),((o,i)=\u003e{const r=o.topology.incidentPortRegion[i]?.[0],s=o.topology.incidentPortRegion[i]?.[1];return`connects: region-${r??\"?\"} \u003c-\u003e region-${s??\"?\"}`})(t,e),F4t(t,e,n)),llo=(t,e,n,o)=\u003e{const i=t.topology.portZ[n];return i!==t.topology.portZ[o]?{strokeColor:P4t(\"rgba(22, 160, 133, 0.95)\",tSe(t,e)),strokeDash:\"2 4 2\"}:i\u003e0?{strokeColor:P4t(\"rgba(52, 152, 219, 0.95)\",tSe(t,e)),strokeDash:\"3 2\"}:{strokeColor:hN(t,e)}},H4t=(t,e)=\u003e{for(let n=0;n\u003ct.state.regionSegments.length;n++){const o=t.state.regionSegments[n]??[];for(const[i,r,s]of o)e.lines.push({points:[U5(t,r),U5(t,s)],label:q_(`route: ${dN(t,i)}`,`region: region-${n}`,L4t(t,r,s)),layer:bx(t,r),...llo(t,i,r,s)})}},O4t=(t,e)=\u003e{const n=new Set;for(let o=0;o\u003ct.state.regionSegments.length;o++){const i=t.state.regionSegments[o]??[];for(const[r,s,a]of i)for(const A of[s,a]){const c=`${r}:${A}`;if(n.has(c))continue;n.add(c);const l=U5(t,A);e.points.push({x:l.x,y:l.y,color:hN(t,r,1),layer:bx(t,A),label:q_(`route: ${dN(t,r)}`,ZL(t,A),F4t(t,A,r),sb(t,A))})}}},ulo=(t,e)=\u003e{for(let n=0;n\u003ct.problem.routeCount;n++)if(t.problem.routeStartPort[n]===e||t.problem.routeEndPort[n]===e)return!0;return!1},glo=(t,e,n)=\u003e{const o=((s,a)=\u003e{const A=new Set;for(let c=0;c\u003ca.length;c++)if(a[c]===1)for(const l of s.topology.incidentPortRegion[c]??[])A.add(l);return A})(t,n),i=\"rgba(245, 158, 11, 0.95)\",r=\"rgba(245, 158, 11, 0.08)\";for(const s of o){const a=t.topology.regionMetadata?.[s],A=a?.polygon,c=D4t(t,s),l=N4t(t,s),u=c.maxX-c.minX,g=c.maxY-c.minY,h=R4t(t,s),d=q_(\"section region\",T4t(t,s));Array.isArray(A)\u0026\u0026A.length\u003e=3?e.polygons.push({points:A,fill:r,stroke:i,strokeWidth:2,layer:h,label:d}):e.rects.push({center:l,width:Math.max(u-PAe,.05),height:Math.max(g-PAe,.05),fill:r,stroke:i,layer:h,label:d})}for(let s=0;s\u003cn.length;s++)n[s]===1\u0026\u0026e.circles.push({center:sW(t,s),radius:.07,fill:\"rgba(251, 191, 36, 0.18)\",stroke:i,layer:bx(t,s),label:q_(DAe(t,s),sb(t,s),\"section port\")})},NAe=(t,e={})=\u003e{const n={arrows:[],circles:[],infiniteLines:[],lines:[],points:[],polygons:[],rects:[],texts:[],title:\"Tiny HyperGraph\",coordinateSystem:\"cartesian\"},o=((a,A)=\u003e{if(!A?.highlightSectionMask)return;const c=A.sectionPortMask??a.problem.portSectionMask;if(c.length!==a.topology.portCount)return;let l=0,u=0;for(let g=0;g\u003cc.length;g++)c[g]===1?l+=1:u+=1;return l!==0\u0026\u0026u!==0?c:void 0})(t,e),i=(a=\u003e{const A=a.getStaticallyUnroutableRoutes();if(A.length!==0)return new Set(A.map(c=\u003ec.routeId))})(t);for(let a=0;a\u003ct.topology.regionCount;a++){const A=t.topology.regionMetadata?.[a],c=A?.polygon,l=D4t(t,a),u=N4t(t,a),g=l.maxX-l.minX,h=l.maxY-l.minY,d=R4t(t,a),p=w4t(k4t(t,a));Array.isArray(c)\u0026\u0026c.length\u003e=3?n.polygons.push({points:c,fill:p,layer:d}):n.rects.push({center:u,width:Math.max(g-PAe,.05),height:Math.max(h-PAe,.05),fill:clo(t,a),layer:d,label:T4t(t,a)})}if(((a,A,c)=\u003e{for(let l=0;l\u003ca.problem.routeCount;l++){if(c\u0026\u0026!c.has(l))continue;const u=a.problem.routeStartPort[l],g=a.problem.routeEndPort[l],h=U5(a,u),d=U5(a,g),p=hN(a,l),m=dN(a,l),_=M4t(a,l);A.points.push({x:h.x,y:h.y,color:p,layer:bx(a,u),label:q_(`route: ${m}`,_,\"endpoint: start\",ZL(a,u),sb(a,u))}),A.points.push({x:d.x,y:d.y,color:p,layer:bx(a,g),label:q_(`route: ${m}`,_,\"endpoint: end\",ZL(a,g),sb(a,g))})}})(t,n,i),t.iterations===0){for(const a of n.polygons)a.stroke=\"rgba(128, 128, 128, 0.5)\";for(const a of n.rects)a.stroke=\"rgba(128, 128, 128, 0.5)\"}if(t.iterations===0){for(let a=0;a\u003ct.topology.portCount;a++){const A=o?.[a]===1;e.showOnlySectionPortsOnIdle\u0026\u0026!A||n.circles.push({center:sW(t,a),radius:.05,fill:t.topology.portZ[a]\u003e0?\"rgba(52, 152, 219, 0.55)\":\"rgba(128, 128, 128, 0.5)\",layer:bx(t,a),label:q_(DAe(t,a),sb(t,a))})}if(i)((a,A)=\u003e{for(const c of a.getStaticallyUnroutableRoutes()){const{routeId:l,connectionId:u,startPortId:g,endPortId:h}=c,d=x4t(a,g),p=x4t(a,h),m=Xbe(`static reachability failed: ${u}`,alo(a,l),c.startRegionId?`startRegionId: ${c.startRegionId}`:void 0,c.endRegionId?`endRegionId: ${c.endRegionId}`:void 0,c.pointIds.length\u003e=2?`points: ${c.pointIds.join(\" -\u003e \")}`:void 0,slo(a,l));A.lines.push({points:[d,p],strokeColor:qbe,strokeDash:\"8 4\",label:m}),A.circles.push({center:d,radius:.12,fill:y4t,stroke:qbe,layer:E4t(a,g),label:Xbe(m,\"endpoint: start\",B4t(a,g),b4t(a,g))}),A.circles.push({center:p,radius:.12,fill:y4t,stroke:qbe,layer:E4t(a,h),label:Xbe(m,\"endpoint: end\",B4t(a,h),b4t(a,h))})}})(t,n);else{const a=new Set;for(const A of t.state.regionSegments)for(const[c]of A)a.add(c);if(a.size\u003e0\u0026\u0026(H4t(t,n),O4t(t,n)),e.showInitialRouteHints!==!1){const A=new Set(t.state.unroutedRoutes);t.state.currentRouteId!==void 0\u0026\u0026A.add(t.state.currentRouteId),((c,l,u)=\u003e{for(let g=0;g\u003cc.problem.routeCount;g++){if(u\u0026\u0026!u.has(g))continue;const h=c.problem.routeStartPort[g],d=c.problem.routeEndPort[g],p=U5(c,h),m=U5(c,d),_={x:(p.x+m.x)/2,y:(p.y+m.y)/2};l.lines.push({points:[p,m],strokeColor:hN(c,g),strokeDash:\"3 3\",layer:bx(c,h),label:q_(dN(c,g),nSe(c,g))}),l.points.push({x:_.x,y:_.y,color:hN(c,g,1),layer:bx(c,h),label:q_(dN(c,g),nSe(c,g))})}})(t,n,A)}}}else H4t(t,n),O4t(t,n),(a=\u003eeSe(a)\u0026\u0026a.showUnassignedPortsInVisualization===!0)(t)\u0026\u0026((a,A)=\u003e{for(let c=0;c\u003ca.topology.portCount;c++)a.state.portAssignment[c]\u003e=0||ulo(a,c)||A.circles.push({center:sW(a,c),radius:.04,fill:a.topology.portZ[c]\u003e0?\"rgba(52, 152, 219, 0.2)\":\"rgba(128, 128, 128, 0.2)\",stroke:a.topology.portZ[c]\u003e0?\"rgba(52, 152, 219, 0.6)\":\"rgba(128, 128, 128, 0.6)\",layer:bx(a,c),label:q_(DAe(a,c),sb(a,c),\"state: unassigned\")})})(t,n),eSe(t)||(((a,A)=\u003e{const c=a.state.currentRouteId;if(c===void 0||a.solved)return;const l=a.problem.routeStartPort[c],u=a.problem.routeEndPort[c],g=U5(a,l),h=U5(a,u),d=hN(a,c),p=dN(a,c);A.lines.push({points:[g,h],strokeColor:d,strokeDash:\"10 5\",label:q_(p,nSe(a,c))})})(t,n),((a,A)=\u003e{if(a.solved)return;const c=a.state.currentRouteId,l=a.state.candidateQueue.toArray().sort((d,p)=\u003ed.f-p.f).slice(0,10);for(let d=0;d\u003cl.length;d++){const p=l[d],m=U5(a,p.portId),_=d===0;A.points.push({x:m.x,y:m.y,color:_?\"green\":\"rgba(128, 128, 128, 0.25)\",layer:bx(a,p.portId),label:q_(DAe(a,p.portId,c),sb(a,p.portId),`g: ${p.g.toFixed(2)}`,`h: ${p.h.toFixed(2)}`,`f: ${p.f.toFixed(2)}`)})}const u=l[0];if(!u)return;const g=[];let h=u;for(;h;)g.unshift(U5(a,h.portId)),h=h.prevCandidate;g.length\u003e1\u0026\u0026A.lines.push({points:g,strokeColor:c!==void 0?hN(a,c):\"rgba(0, 160, 120, 0.9)\"})})(t,n));o\u0026\u0026glo(t,n,o),((a,A)=\u003e{if(a.failed)for(const c of a.getNeverSuccessfullyRoutedRoutes()){const{routeId:l,connectionId:u,attempts:g,startPortId:h,endPortId:d}=c,p=M4t(a,l),m=sW(a,h),_=sW(a,d),f=q_(`never routed: ${u}`,`attempts: ${g}`,p,c.startRegionId?`startRegionId: ${c.startRegionId}`:void 0,c.endRegionId?`endRegionId: ${c.endRegionId}`:void 0);A.lines.push({points:[{x:0,y:0},{x:m.x,y:m.y}],strokeColor:MAe,strokeDash:Q4t,layer:bx(a,h),label:q_(f,\"origin guide\",\"endpoint: start\")}),A.circles.push({center:m,radius:1,fill:S4t,stroke:MAe,layer:bx(a,h),label:q_(f,\"endpoint: start\",ZL(a,h),sb(a,h))}),A.lines.push({points:[{x:0,y:0},{x:_.x,y:_.y}],strokeColor:MAe,strokeDash:Q4t,layer:bx(a,d),label:q_(f,\"origin guide\",\"endpoint: end\")}),A.circles.push({center:_,radius:1,fill:S4t,stroke:MAe,layer:bx(a,d),label:q_(f,\"endpoint: end\",ZL(a,d),sb(a,d))})}})(t,n);const r=t.state.unroutedRoutes.length+(t.state.currentRouteId===void 0?0:1),s=o?o.reduce((a,A)=\u003ea+ +(A===1),0):0;return n.title=[\"Tiny HyperGraph\",`iter=${t.iterations}`,`pending=${r}`,o?`sectionPorts=${s}`:void 0,i?`staticReachabilityFailed=${i.size}`:void 0,t.failed?\"failed\":t.solved?\"solved\":\"running\"].filter(Boolean).join(\" | \"),n},oSe=5e4,aW=()=\u003e({netIds:new Int32Array(0),lesserAngles:new Int32Array(0),greaterAngles:new Int32Array(0),layerMasks:new Int32Array(0),existingCrossingLayerIntersections:0,existingSameLayerIntersections:0,existingEntryExitLayerChanges:0,existingRegionCost:0,existingSegmentCount:0}),dlo=t=\u003e({netIds:new Int32Array(t.netIds),lesserAngles:new Int32Array(t.lesserAngles),greaterAngles:new Int32Array(t.greaterAngles),layerMasks:new Int32Array(t.layerMasks),existingCrossingLayerIntersections:t.existingCrossingLayerIntersections,existingSameLayerIntersections:t.existingSameLayerIntersections,existingEntryExitLayerChanges:t.existingEntryExitLayerChanges,existingRegionCost:t.existingRegionCost,existingSegmentCount:t.existingSegmentCount}),AW=t=\u003e{return{portAssignment:new Int32Array(t.portAssignment),regionSegments:(e=t.regionSegments,e.map(n=\u003en.map(([o,i,r])=\u003e[o,i,r]))),regionIntersectionCaches:t.regionIntersectionCaches.map(dlo),regionCongestionCost:new Float64Array(t.regionCongestionCost),ripCount:t.ripCount};var e},G4t=(t,e)=\u003e{e\u0026\u0026(e.minViaPadDiameter!==void 0\u0026\u0026(t.minViaPadDiameter=e.minViaPadDiameter),e.DISTANCE_TO_COST!==void 0\u0026\u0026(t.DISTANCE_TO_COST=e.DISTANCE_TO_COST),e.RIP_THRESHOLD_START!==void 0\u0026\u0026(t.RIP_THRESHOLD_START=e.RIP_THRESHOLD_START),e.RIP_THRESHOLD_END!==void 0\u0026\u0026(t.RIP_THRESHOLD_END=e.RIP_THRESHOLD_END),e.RIP_THRESHOLD_RAMP_ATTEMPTS!==void 0\u0026\u0026(t.RIP_THRESHOLD_RAMP_ATTEMPTS=e.RIP_THRESHOLD_RAMP_ATTEMPTS),e.RIP_CONGESTION_REGION_COST_FACTOR!==void 0\u0026\u0026(t.RIP_CONGESTION_REGION_COST_FACTOR=e.RIP_CONGESTION_REGION_COST_FACTOR),e.TRACE_DENSITY_COST_FACTOR!==void 0\u0026\u0026(t.TRACE_DENSITY_COST_FACTOR=Math.max(0,e.TRACE_DENSITY_COST_FACTOR)),e.USE_LAZY_ROUTE_HEURISTIC!==void 0\u0026\u0026(t.USE_LAZY_ROUTE_HEURISTIC=e.USE_LAZY_ROUTE_HEURISTIC),e.USE_SPARSE_CANDIDATE_STORAGE!==void 0\u0026\u0026(t.USE_SPARSE_CANDIDATE_STORAGE=e.USE_SPARSE_CANDIDATE_STORAGE),e.MAX_ITERATIONS!==void 0\u0026\u0026(t.MAX_ITERATIONS=e.MAX_ITERATIONS),e.VERBOSE!==void 0\u0026\u0026(t.VERBOSE=e.VERBOSE),e.STATIC_REACHABILITY_PRECHECK!==void 0\u0026\u0026(t.STATIC_REACHABILITY_PRECHECK=e.STATIC_REACHABILITY_PRECHECK),e.STATIC_REACHABILITY_PRECHECK_MAX_HOPS!==void 0\u0026\u0026(t.STATIC_REACHABILITY_PRECHECK_MAX_HOPS=e.STATIC_REACHABILITY_PRECHECK_MAX_HOPS),e.ACCEPT_BEST_SOLUTION_ON_TIMEOUT!==void 0\u0026\u0026(t.ACCEPT_BEST_SOLUTION_ON_TIMEOUT=e.ACCEPT_BEST_SOLUTION_ON_TIMEOUT),e.GREEDY_FINAL_ROUTE_ITERS!==void 0\u0026\u0026(t.GREEDY_FINAL_ROUTE_ITERS=e.GREEDY_FINAL_ROUTE_ITERS),e.PARTIAL_RIP_ENABLED!==void 0\u0026\u0026(t.PARTIAL_RIP_ENABLED=e.PARTIAL_RIP_ENABLED),e.PARTIAL_RIP_MIN_ROUTE_COUNT!==void 0\u0026\u0026(t.PARTIAL_RIP_MIN_ROUTE_COUNT=e.PARTIAL_RIP_MIN_ROUTE_COUNT),e.PARTIAL_RIP_MAX_ROUTE_COUNT!==void 0\u0026\u0026(t.PARTIAL_RIP_MAX_ROUTE_COUNT=e.PARTIAL_RIP_MAX_ROUTE_COUNT),e.PARTIAL_RIP_MAX_DISTANCE!==void 0\u0026\u0026(t.PARTIAL_RIP_MAX_DISTANCE=e.PARTIAL_RIP_MAX_DISTANCE),e.PARTIAL_RIP_QUALITY_MAX_DISTANCE!==void 0\u0026\u0026(t.PARTIAL_RIP_QUALITY_MAX_DISTANCE=e.PARTIAL_RIP_QUALITY_MAX_DISTANCE),e.PARTIAL_RIP_MAX_ATTEMPTS!==void 0\u0026\u0026(t.PARTIAL_RIP_MAX_ATTEMPTS=e.PARTIAL_RIP_MAX_ATTEMPTS),e.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS!==void 0\u0026\u0026(t.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS=e.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS),e.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT!==void 0\u0026\u0026(t.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT=e.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT),e.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO!==void 0\u0026\u0026(t.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO=e.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO),e.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO!==void 0\u0026\u0026(t.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO=e.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO),e.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO!==void 0\u0026\u0026(t.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO=e.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO),e.OUTSIDE_IN_ROUTING!==void 0\u0026\u0026(t.OUTSIDE_IN_ROUTING=e.OUTSIDE_IN_ROUTING),e.OUTSIDE_IN_MAX_DISTANCE!==void 0\u0026\u0026(t.OUTSIDE_IN_MAX_DISTANCE=e.OUTSIDE_IN_MAX_DISTANCE))},RAe=t=\u003e({minViaPadDiameter:t.minViaPadDiameter,DISTANCE_TO_COST:t.DISTANCE_TO_COST,RIP_THRESHOLD_START:t.RIP_THRESHOLD_START,RIP_THRESHOLD_END:t.RIP_THRESHOLD_END,RIP_THRESHOLD_RAMP_ATTEMPTS:t.RIP_THRESHOLD_RAMP_ATTEMPTS,RIP_CONGESTION_REGION_COST_FACTOR:t.RIP_CONGESTION_REGION_COST_FACTOR,TRACE_DENSITY_COST_FACTOR:t.TRACE_DENSITY_COST_FACTOR,USE_LAZY_ROUTE_HEURISTIC:t.USE_LAZY_ROUTE_HEURISTIC,USE_SPARSE_CANDIDATE_STORAGE:t.USE_SPARSE_CANDIDATE_STORAGE,MAX_ITERATIONS:t.MAX_ITERATIONS,VERBOSE:t.VERBOSE,STATIC_REACHABILITY_PRECHECK:t.STATIC_REACHABILITY_PRECHECK,STATIC_REACHABILITY_PRECHECK_MAX_HOPS:t.STATIC_REACHABILITY_PRECHECK_MAX_HOPS,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:t.ACCEPT_BEST_SOLUTION_ON_TIMEOUT,GREEDY_FINAL_ROUTE_ITERS:t.GREEDY_FINAL_ROUTE_ITERS,PARTIAL_RIP_ENABLED:t.PARTIAL_RIP_ENABLED,PARTIAL_RIP_MIN_ROUTE_COUNT:t.PARTIAL_RIP_MIN_ROUTE_COUNT,PARTIAL_RIP_MAX_ROUTE_COUNT:t.PARTIAL_RIP_MAX_ROUTE_COUNT,PARTIAL_RIP_MAX_DISTANCE:t.PARTIAL_RIP_MAX_DISTANCE,PARTIAL_RIP_QUALITY_MAX_DISTANCE:t.PARTIAL_RIP_QUALITY_MAX_DISTANCE,PARTIAL_RIP_MAX_ATTEMPTS:t.PARTIAL_RIP_MAX_ATTEMPTS,PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS:t.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS,PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT:t.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT,PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO:t.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO,PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO:t.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO,PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO:t.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO,OUTSIDE_IN_ROUTING:t.OUTSIDE_IN_ROUTING,OUTSIDE_IN_MAX_DISTANCE:t.OUTSIDE_IN_MAX_DISTANCE}),hlo=(t,e)=\u003et.f-e.f,Bv=class extends zA{constructor(t,e,n){super(),this.topology=t,this.problem=e,G4t(this,n);let o=1;const i=new Int32Array(t.portCount).fill(-1),r=new Int32Array(t.portCount).fill(-1);for(let A=0;A\u003ct.portCount;A++){const c=t.incidentPortRegion[A]??[];c.length\u003eo\u0026\u0026(o=c.length),i[A]=c[0]??-1,r[A]=c[1]??-1}this.candidateHopSlotStride=o,this.candidateFirstRegionByPortId=i,this.candidateSecondRegionByPortId=r;const s=t.portCount*o;this.candidateHopCapacity=s,this.state={portAssignment:new Int32Array(t.portCount).fill(-1),regionSegments:Array.from({length:t.regionCount},()=\u003e[]),regionIntersectionCaches:Array.from({length:t.regionCount},()=\u003eaW()),currentRouteId:void 0,currentRouteNetId:void 0,unroutedRoutes:C4t(e.routeCount),candidateQueue:new _4t([],hlo),candidateBestCostByHopId:this.USE_SPARSE_CANDIDATE_STORAGE?new Map:new Float64Array(s),candidateBestCostGenerationByHopId:this.USE_SPARSE_CANDIDATE_STORAGE?new Map:new Uint32Array(s),candidateBestCostGeneration:1,goalPortId:-1,ripCount:0,regionCongestionCost:new Float64Array(t.regionCount).fill(0)},this.routeAttemptCountByRouteId=new Uint32Array(e.routeCount),this.routeSuccessCountByRouteId=new Uint32Array(e.routeCount);const a=m4t({topology:t,problem:e,state:this.state,routeSuccessCountByRouteId:this.routeSuccessCountByRouteId,appendSegmentToRegionCache:(A,c,l)=\u003ethis.appendSegmentToRegionCache(A,c,l)});a\u0026\u0026(this.stats={...this.stats,...a})}topology;problem;state;candidateHopSlotStride;candidateHopCapacity;candidateFirstRegionByPortId;candidateSecondRegionByPortId;candidateOverflowBestCost;_problemSetup;routeAttemptCountByRouteId;routeSuccessCountByRouteId;bestSolvedStateSnapshot;bestSolvedStateSummary;hasLoggedNeverSuccessfullyRoutedRoutes=!1;staticallyUnroutableRoutes=[];segmentGeometryScratch={lesserAngle:0,greaterAngle:0,layerMask:0,entryExitLayerChanges:0};ADD_SEGMENT_DISTANCE_TO_G=!1;DISTANCE_TO_COST=.05;minViaPadDiameter=d4t;RIP_THRESHOLD_START=.05;RIP_THRESHOLD_END=.8;RIP_THRESHOLD_RAMP_ATTEMPTS=50;RIP_CONGESTION_REGION_COST_FACTOR=.1;TRACE_DENSITY_COST_FACTOR=0;USE_LAZY_ROUTE_HEURISTIC=!1;USE_SPARSE_CANDIDATE_STORAGE=!1;MAX_ITERATIONS=1e6;VERBOSE=!1;STATIC_REACHABILITY_PRECHECK=!0;STATIC_REACHABILITY_PRECHECK_MAX_HOPS=16;ACCEPT_BEST_SOLUTION_ON_TIMEOUT=!0;GREEDY_FINAL_ROUTE_ITERS=4;PARTIAL_RIP_ENABLED=!1;PARTIAL_RIP_MIN_ROUTE_COUNT=0;PARTIAL_RIP_MAX_ROUTE_COUNT=Number.POSITIVE_INFINITY;PARTIAL_RIP_MAX_DISTANCE=12;PARTIAL_RIP_QUALITY_MAX_DISTANCE;PARTIAL_RIP_MAX_ATTEMPTS=Number.POSITIVE_INFINITY;PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS=0;PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT=Number.POSITIVE_INFINITY;PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO=0;PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO=.2;PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO=.1;OUTSIDE_IN_ROUTING=!1;OUTSIDE_IN_MAX_DISTANCE=24;get problemSetup(){return this._problemSetup||(this._problemSetup=this.computeProblemSetup()),this._problemSetup}computeProblemSetup(){const{topology:t,problem:e}=this,n=this.USE_LAZY_ROUTE_HEURISTIC?void 0:new Float64Array(t.portCount*e.routeCount),o=t.portX,i=t.portY,r=Array.from({length:t.portCount},()=\u003enew Set),s=new Int32Array(t.portCount).fill(-1),a=(A,c)=\u003e{r[A].add(c);const l=s[A];l===-1?s[A]=c:l!==c\u0026\u0026(s[A]=-2)};for(let A=0;A\u003ce.routeCount;A++){const c=e.routeNet[A];if(a(e.routeStartPort[A],c),a(e.routeEndPort[A],c),n){const l=e.routeEndPort[A],u=o[l],g=i[l];for(let h=0;h\u003ct.portCount;h++){const d=o[h]-u,p=i[h]-g;n[h*e.routeCount+A]=Math.sqrt(d*d+p*p)*this.DISTANCE_TO_COST}}}return{portHCostToEndOfRoute:n,portEndpointNetIds:r,portEndpointReservationNetId:s}}_setup(){if(this.problemSetup,this.STATIC_REACHABILITY_PRECHECK){const t=rlo({topology:this.topology,problem:this.problem,problemSetup:this.problemSetup,portAssignment:this.state.portAssignment,routeIds:this.state.unroutedRoutes,maxPrecheckHops:Math.max(0,this.STATIC_REACHABILITY_PRECHECK_MAX_HOPS),getStartingNextRegionId:(e,n)=\u003ethis.getStartingNextRegionId(e,n),getRouteSummary:e=\u003ethis.getRouteSummary(e)});this.staticallyUnroutableRoutes=t,t.length\u003e0\u0026\u0026(this.failed=!0,this.error=(e=\u003e{const n=e.slice(0,5).map(i=\u003e{const r=i.pointIds.length\u003e=2?`${i.pointIds[0]}-\u003e${i.pointIds[1]}`:`${i.startPortId}-\u003e${i.endPortId}`;return`${i.connectionId} (${r})`}).join(\", \"),o=e.length-5;return[\"Static reachability precheck failed:\",`${e.length} route(s) have no legal path under the current reservation and start-region rules`,o\u003e0?`${n}, +${o} more`:n].join(\" \")})(t),this.stats={...this.stats,staticallyUnroutableRouteCount:t.length})}}_step(){const{problem:t,topology:e,state:n}=this;if(n.currentRouteId===void 0){if(n.unroutedRoutes.length===0)return void this.onAllRoutesRouted();n.currentRouteId=n.unroutedRoutes.shift(),n.currentRouteNetId=t.routeNet[n.currentRouteId],this.routeAttemptCountByRouteId[n.currentRouteId]+=1,this.resetCandidateBestCosts();const s=this.getRouteStartPortId(n.currentRouteId);n.candidateQueue.clear();const a=this.getStartingNextRegionId(n.currentRouteId,s);if(a===void 0)return this.failed=!0,void(this.error=`Start port ${s} has no incident regions`);this.setCandidateBestCost(this.getHopId(s,a),0),n.candidateQueue.queue({nextRegionId:a,portId:s,f:0,g:0,h:0}),n.goalPortId=this.getRouteEndPortId(n.currentRouteId)}const o=n.candidateQueue.dequeue();if(!o)return void this.onOutOfCandidates();const i=this.getHopId(o.portId,o.nextRegionId);if(o.g\u003ethis.getCandidateBestCost(i)||this.isRegionReservedForDifferentNet(o.nextRegionId))return;const r=e.regionIncidentPorts[o.nextRegionId];for(const s of r){const a=n.portAssignment[s];if(this.isPortReservedForDifferentNet(s))continue;if(s===n.goalPortId){if(a!==-1\u0026\u0026a!==n.currentRouteNetId)continue;return void this.onPathFound(o)}if(a!==-1\u0026\u0026a!==n.currentRouteNetId||s===o.portId||t.portSectionMask[s]===0)continue;const A=e.incidentPortRegion[s][0]===o.nextRegionId?e.incidentPortRegion[s][1]:e.incidentPortRegion[s][0];if(A===void 0||this.isRegionReservedForDifferentNet(A))continue;const c=this.getHopId(s,A);if(n.candidateQueue.isClosedHop?.(s,A)===!0)continue;const l=this.getCandidateBestCost(c);if(o.g\u003e=l)continue;const u=this.computeG(o,s,l);if(!Number.isFinite(u)||u\u003e=l)continue;const g=this.computeH(s),h={prevRegionId:o.nextRegionId,nextRegionId:A,portId:s,g:u,h:g,f:u+g,prevCandidate:o};if(s===n.goalPortId)return void this.onPathFound(h);this.setCandidateBestCost(c,u),n.candidateQueue.queue(h)}}resetCandidateBestCosts(){const{state:t}=this;if(this.candidateOverflowBestCost?.clear(),t.candidateBestCostGeneration===4294967295)return t.candidateBestCostByHopId instanceof Map\u0026\u0026t.candidateBestCostByHopId.clear(),t.candidateBestCostGenerationByHopId instanceof Map?t.candidateBestCostGenerationByHopId.clear():t.candidateBestCostGenerationByHopId.fill(0),void(t.candidateBestCostGeneration=1);t.candidateBestCostGeneration+=1}getCandidateBestCost(t){if(t\u003c0)return this.candidateOverflowBestCost?.get(t)??Number.POSITIVE_INFINITY;const{state:e}=this,n=e.candidateBestCostGenerationByHopId;return(n instanceof Map?n.get(t):n[t])===e.candidateBestCostGeneration?e.candidateBestCostByHopId instanceof Map?e.candidateBestCostByHopId.get(t):e.candidateBestCostByHopId[t]:Number.POSITIVE_INFINITY}setCandidateBestCost(t,e){if(t\u003c0)return this.candidateOverflowBestCost||(this.candidateOverflowBestCost=new Map),void this.candidateOverflowBestCost.set(t,e);const{state:n}=this;n.candidateBestCostGenerationByHopId instanceof Map?n.candidateBestCostGenerationByHopId.set(t,n.candidateBestCostGeneration):n.candidateBestCostGenerationByHopId[t]=n.candidateBestCostGeneration,n.candidateBestCostByHopId instanceof Map?n.candidateBestCostByHopId.set(t,e):n.candidateBestCostByHopId[t]=e}getHopId(t,e){const n=t*this.candidateHopSlotStride;if(this.candidateFirstRegionByPortId[t]===e)return n;if(this.candidateSecondRegionByPortId[t]===e)return n+1;const o=this.topology.incidentPortRegion[t];for(let i=2;i\u003c(o?.length??0);i++)if(o[i]===e)return n+i;return-(t*this.topology.regionCount+e)-1}getStartingNextRegionId(t,e){const n=this.topology.incidentPortRegion[e]??[],o=this.problem.routeNet[t];return n.find(i=\u003ethis.problem.regionNetId[i]===-1)??n.find(i=\u003ethis.problem.regionNetId[i]===o)??n[0]}getRouteStartPortId(t){return this.problem.routeStartPort[t]}getRouteEndPortId(t){return this.problem.routeEndPort[t]}isPortReservedForDifferentNet(t){const e=this.problemSetup.portEndpointReservationNetId[t]??-1;return e===-2||e!==-1\u0026\u0026e!==this.state.currentRouteNetId}isRegionReservedForDifferentNet(t){const e=this.problem.regionNetId[t];return e!==-1\u0026\u0026e!==this.state.currentRouteNetId}isKnownSingleLayerRegion(t){const e=this.topology.regionAvailableZMask?.[t]??0;return h4t(e)}computeRegionCostForRegion(t,e,n,o,i){return((r,s,a,A,c,l,u=0,g=.3,h=0)=\u003eZco(r*s,a,A,c,l,u,g,h))(this.topology.regionWidth[t],this.topology.regionHeight[t],e,n,o,i,this.topology.regionAvailableZMask?.[t]??0,this.minViaPadDiameter,this.TRACE_DENSITY_COST_FACTOR)}populateSegmentGeometryScratch(t,e,n){const{topology:o}=this,i=this.segmentGeometryScratch,r=this.candidateFirstRegionByPortId[e]===t||this.candidateSecondRegionByPortId[e]!==t?o.portAngleForRegion1[e]:o.portAngleForRegion2?.[e]??o.portAngleForRegion1[e],s=this.candidateFirstRegionByPortId[n]===t||this.candidateSecondRegionByPortId[n]!==t?o.portAngleForRegion1[n]:o.portAngleForRegion2?.[n]??o.portAngleForRegion1[n],a=o.portZ[e],A=o.portZ[n];return i.lesserAngle=r\u003cs?r:s,i.greaterAngle=r\u003cs?s:r,i.layerMask=1\u003c\u003ca|1\u003c\u003cA,i.entryExitLayerChanges=a!==A?1:0,i}appendSegmentToRegionCache(t,e,n){const{state:o}=this,i=o.regionIntersectionCaches[t],r=this.populateSegmentGeometryScratch(t,e,n),[s,a,A]=p4t(i,o.currentRouteNetId,r.lesserAngle,r.greaterAngle,r.layerMask,r.entryExitLayerChanges),c=i.netIds.length+1,l=new Int32Array(c);l.set(i.netIds),l[c-1]=o.currentRouteNetId;const u=new Int32Array(c);u.set(i.lesserAngles),u[c-1]=r.lesserAngle;const g=new Int32Array(c);g.set(i.greaterAngles),g[c-1]=r.greaterAngle;const h=new Int32Array(c);h.set(i.layerMasks),h[c-1]=r.layerMask;const d=i.existingSameLayerIntersections+s,p=i.existingCrossingLayerIntersections+a,m=i.existingEntryExitLayerChanges+A,_=u.length;o.regionIntersectionCaches[t]={netIds:l,lesserAngles:u,greaterAngles:g,layerMasks:h,existingSameLayerIntersections:d,existingCrossingLayerIntersections:p,existingEntryExitLayerChanges:m,existingSegmentCount:_,existingRegionCost:this.computeRegionCostForRegion(t,d,p,m,_)}}getSolvedPathSegments(t){const{state:e}=this,n=[];let o=t;for(;o;)n.unshift(o),o=o.prevCandidate;const i=[];for(let s=1;s\u003cn.length;s++)i.push({regionId:n[s-1].nextRegionId,fromPortId:n[s-1].portId,toPortId:n[s].portId});const r=n[n.length-1];return r\u0026\u0026r.portId!==e.goalPortId\u0026\u0026i.push({regionId:r.nextRegionId,fromPortId:r.portId,toPortId:e.goalPortId}),i}resetRoutingStateForRerip(){const{topology:t,problem:e,state:n}=this;n.portAssignment.fill(-1),n.regionSegments=Array.from({length:t.regionCount},()=\u003e[]),n.regionIntersectionCaches=Array.from({length:t.regionCount},()=\u003eaW()),n.currentRouteNetId=void 0,n.currentRouteId=void 0,n.unroutedRoutes=wAe(C4t(e.routeCount),n.ripCount),n.candidateQueue.clear(),this.resetCandidateBestCosts(),n.goalPortId=-1}getMaxRegionCost(){const{topology:t,state:e}=this;let n=0;for(let o=0;o\u003ct.regionCount;o++){const i=e.regionIntersectionCaches[o]?.existingRegionCost??0;n=Math.max(n,i)}return n}getRouteMetadata(t){return this.problem.routeMetadata?.[t]}getRouteConnectionId(t){const e=this.getRouteMetadata(t)?.connectionId;return typeof e==\"string\"?e:`route-${t}`}getRouteSummary(t){return(({problem:e,routeId:n,getRouteMetadata:o,getRouteConnectionId:i})=\u003e{const r=o?.(n)??f4t(e,n);return{routeId:n,connectionId:i?.(n)??olo(e,n),startPortId:e.routeStartPort[n],endPortId:e.routeEndPort[n],startRegionId:typeof r?.startRegionId==\"string\"?r.startRegionId:void 0,endRegionId:typeof r?.endRegionId==\"string\"?r.endRegionId:void 0,pointIds:nlo(r)}})({problem:this.problem,routeId:t,getRouteMetadata:e=\u003ethis.getRouteMetadata(e),getRouteConnectionId:e=\u003ethis.getRouteConnectionId(e)})}getAdditionalRegionLabel(t){}getNeverSuccessfullyRoutedRoutes(){const t=[];for(let e=0;e\u003cthis.problem.routeCount;e++){const n=this.routeAttemptCountByRouteId[e];n===0||this.routeSuccessCountByRouteId[e]\u003e0||t.push({...this.getRouteSummary(e),attempts:n})}return t}getStaticallyUnroutableRoutes(){return this.staticallyUnroutableRoutes}logNeverSuccessfullyRoutedRoutes(){if(!this.VERBOSE||this.hasLoggedNeverSuccessfullyRoutedRoutes)return;const t=this.getNeverSuccessfullyRoutedRoutes();if(this.hasLoggedNeverSuccessfullyRoutedRoutes=!0,t.length!==0){console.log([\"[TinyHyperGraphSolver:never-routed-summary]\",`count=${t.length}`].join(\" \"));for(const e of t){const n=e.pointIds.length\u003e=2?`${e.pointIds[0]}-\u003e${e.pointIds[1]}`:\"unknown\";console.log([\"[TinyHyperGraphSolver:never-routed]\",`routeId=${e.routeId}`,`connectionId=${e.connectionId}`,`attempts=${e.attempts}`,`pointPath=${n}`,`startRegionId=${e.startRegionId??\"unknown\"}`,`endRegionId=${e.endRegionId??\"unknown\"}`].join(\" \"))}}}logRipEvent(t,e,n={}){this.VERBOSE\u0026\u0026console.log([\"[TinyHyperGraphSolver:rip]\",`ripCount=${this.state.ripCount}`,`maxRegionCostBeforeRip=${e.toFixed(3)}`,`reason=${t}`,...Object.entries(n).map(([o,i])=\u003e`${o}=${typeof i==\"number\"?Number.isInteger(i)?String(i):i.toFixed(3):i}`)].join(\" \"))}compareRegionCostSummaries(t,e){return t.maxRegionCost!==e.maxRegionCost?t.maxRegionCost-e.maxRegionCost:t.totalRegionCost-e.totalRegionCost}captureBestSolvedState(t){this.bestSolvedStateSummary\u0026\u0026this.compareRegionCostSummaries(t,this.bestSolvedStateSummary)\u003e=0||this.replaceBestSolvedState(t)}replaceBestSolvedState(t){this.bestSolvedStateSummary=t,this.bestSolvedStateSnapshot=AW({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches,regionCongestionCost:this.state.regionCongestionCost,ripCount:this.state.ripCount})}restoreBestSolvedState(){if(!this.bestSolvedStateSnapshot)return;const t=AW(this.bestSolvedStateSnapshot);this.state.portAssignment=t.portAssignment,this.state.regionSegments=t.regionSegments,this.state.regionIntersectionCaches=t.regionIntersectionCaches,this.state.regionCongestionCost=t.regionCongestionCost,this.state.ripCount=t.ripCount,this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=[],this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1}getRemainingRouteIdsForGreedyFinalRoute(){const t=new Set(this.state.unroutedRoutes);return this.state.currentRouteId!==void 0\u0026\u0026t.add(this.state.currentRouteId),[...t]}applySnapshotToGreedyFinalRouteSolver(t,e,n){const o=AW(e);t.state.portAssignment=o.portAssignment,t.state.regionSegments=o.regionSegments,t.state.regionIntersectionCaches=o.regionIntersectionCaches,t.state.regionCongestionCost=o.regionCongestionCost,t.state.ripCount=0,t.state.currentRouteId=void 0,t.state.currentRouteNetId=void 0,t.state.unroutedRoutes=[...n],t.state.candidateQueue.clear(),t.resetCandidateBestCosts(),t.state.goalPortId=-1}summarizeSolvedState(t){let e=0,n=0;for(const o of t.state.regionIntersectionCaches){const i=o.existingRegionCost;e=Math.max(e,i),n+=i}return{maxRegionCost:e,totalRegionCost:n}}tryGreedyFinalRouteAcceptance(){const t=Math.max(0,Math.floor(this.GREEDY_FINAL_ROUTE_ITERS));if(t===0)return!1;const e=this.getRemainingRouteIdsForGreedyFinalRoute();if(e.length===0)return!1;const n=AW({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches,regionCongestionCost:this.state.regionCongestionCost,ripCount:this.state.ripCount});for(let o=0;o\u003ct;o++){const i=o===0?e:wAe(e,this.state.ripCount+o),r=new plo(this.topology,this.problem,{...RAe(this),ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!1,GREEDY_FINAL_ROUTE_ITERS:0,MAX_ITERATIONS:oSe,RIP_THRESHOLD_RAMP_ATTEMPTS:0,STATIC_REACHABILITY_PRECHECK:!1});if(this.applySnapshotToGreedyFinalRouteSolver(r,n,i),r.solve(),r.solved\u0026\u0026!r.failed)return this.bestSolvedStateSnapshot=AW({portAssignment:r.state.portAssignment,regionSegments:r.state.regionSegments,regionIntersectionCaches:r.state.regionIntersectionCaches,regionCongestionCost:r.state.regionCongestionCost,ripCount:r.state.ripCount}),this.bestSolvedStateSummary=this.summarizeSolvedState(r),this.restoreBestSolvedState(),this.stats={...this.stats,acceptedGreedyFinalRouteOnTimeout:!0,greedyFinalRouteIter:o,greedyFinalRouteRemainingRouteCount:e.length,greedyFinalRouteMaxIterations:oSe,neverSuccessfullyRoutedRouteCount:0,maxRegionCost:this.bestSolvedStateSummary.maxRegionCost,totalRegionCost:this.bestSolvedStateSummary.totalRegionCost,bestMaxRegionCost:this.bestSolvedStateSummary.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary.totalRegionCost},this.solved=!0,this.failed=!1,this.error=null,!0}return this.stats={...this.stats,greedyFinalRouteAttemptCount:t,greedyFinalRouteRemainingRouteCount:e.length,greedyFinalRouteMaxIterations:oSe},!1}onAllRoutesRouted(){const{topology:t,state:e}=this,n=this.RIP_THRESHOLD_RAMP_ATTEMPTS\u003c=0?1:Math.min(1,e.ripCount/this.RIP_THRESHOLD_RAMP_ATTEMPTS),o=this.RIP_THRESHOLD_START+(this.RIP_THRESHOLD_END-this.RIP_THRESHOLD_START)*n,i=[],r=new Float64Array(t.regionCount);let s=0,a=0;for(let A=0;A\u003ct.regionCount;A++){const c=e.regionIntersectionCaches[A]?.existingRegionCost??0;r[A]=c,s=Math.max(s,c),a+=c,c\u003eo\u0026\u0026i.push(A)}if(this.captureBestSolvedState({maxRegionCost:s,totalRegionCost:a}),this.stats={...this.stats,currentRipThreshold:o,hotRegionCount:i.length,maxRegionCost:s,totalRegionCost:a,bestMaxRegionCost:this.bestSolvedStateSummary?.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary?.totalRegionCost,ripCount:e.ripCount},i.length===0||e.ripCount\u003e=this.RIP_THRESHOLD_RAMP_ATTEMPTS)this.solved=!0;else{for(let A=0;A\u003ct.regionCount;A++)e.regionCongestionCost[A]+=r[A]*this.RIP_CONGESTION_REGION_COST_FACTOR;e.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:e.ripCount,maxRegionCostBeforeRip:s,reripRegionCount:i.length},this.logRipEvent(\"hot_regions\",s,{hotRegionCount:i.length,currentRipThreshold:o})}}onOutOfCandidates(){const{topology:t,state:e}=this,n=e.currentRouteId,o=this.getMaxRegionCost();for(let i=0;i\u003ct.regionCount;i++){const r=e.regionIntersectionCaches[i]?.existingRegionCost??0;e.regionCongestionCost[i]+=r*this.RIP_CONGESTION_REGION_COST_FACTOR}e.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:e.ripCount,maxRegionCost:o,maxRegionCostBeforeRip:o,reripReason:\"out_of_candidates\"},this.logRipEvent(\"out_of_candidates\",o,{...n===void 0?{}:{routeId:n,connectionId:this.getRouteConnectionId(n)}})}onPathFound(t){const{state:e}=this,n=e.currentRouteId;if(n===void 0)return;this.routeSuccessCountByRouteId[n]+=1;const o=this.getSolvedPathSegments(t);for(const{regionId:i,fromPortId:r,toPortId:s}of o)e.regionSegments[i].push([n,r,s]),e.portAssignment[r]=e.currentRouteNetId,e.portAssignment[s]=e.currentRouteNetId,this.appendSegmentToRegionCache(i,r,s);e.candidateQueue.clear(),e.currentRouteNetId=void 0,e.currentRouteId=void 0}computeG(t,e,n=Number.POSITIVE_INFINITY,o){const{state:i,topology:r}=this,s=t.nextRegionId,a=i.regionIntersectionCaches[s];let A=0;if(this.ADD_SEGMENT_DISTANCE_TO_G){let x=o;if(x===void 0){const E=r.portX[t.portId]-r.portX[e],B=r.portY[t.portId]-r.portY[e];x=Math.sqrt(E*E+B*B)}A=x*this.DISTANCE_TO_COST}if(t.g+i.regionCongestionCost[s]+(this.problem.portPenalty?.[e]??0)+A\u003en+1e-9)return Number.POSITIVE_INFINITY;const c=t.portId,l=this.candidateFirstRegionByPortId[c]===s||this.candidateSecondRegionByPortId[c]!==s?r.portAngleForRegion1[c]:r.portAngleForRegion2?.[c]??r.portAngleForRegion1[c],u=this.candidateFirstRegionByPortId[e]===s||this.candidateSecondRegionByPortId[e]!==s?r.portAngleForRegion1[e]:r.portAngleForRegion2?.[e]??r.portAngleForRegion1[e],g=l\u003cu?l:u,h=l\u003cu?u:l,d=r.portZ[c],p=r.portZ[e],m=1\u003c\u003cd|1\u003c\u003cp,_=d!==p?1:0,[f,I,C]=p4t(a,i.currentRouteNetId,g,h,m,_);if(f\u003e0\u0026\u0026this.isKnownSingleLayerRegion(s))return Number.POSITIVE_INFINITY;const y=this.computeRegionCostForRegion(s,a.existingSameLayerIntersections+f,a.existingCrossingLayerIntersections+I,a.existingEntryExitLayerChanges+C,a.existingSegmentCount+1)-a.existingRegionCost;return t.g+y+i.regionCongestionCost[s]+(this.problem.portPenalty?.[e]??0)+A}tryFinalAcceptance(){const t=this.getNeverSuccessfullyRoutedRoutes();if(this.stats={...this.stats,neverSuccessfullyRoutedRouteCount:t.length},this.ACCEPT_BEST_SOLUTION_ON_TIMEOUT\u0026\u0026this.bestSolvedStateSnapshot\u0026\u0026this.bestSolvedStateSummary)return this.restoreBestSolvedState(),this.stats={...this.stats,acceptedBestSolutionOnTimeout:!0,maxRegionCost:this.bestSolvedStateSummary.maxRegionCost,totalRegionCost:this.bestSolvedStateSummary.totalRegionCost,bestMaxRegionCost:this.bestSolvedStateSummary.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary.totalRegionCost},this.solved=!0,this.failed=!1,void(this.error=null);this.ACCEPT_BEST_SOLUTION_ON_TIMEOUT\u0026\u0026this.tryGreedyFinalRouteAcceptance()||this.logNeverSuccessfullyRoutedRoutes()}computeH(t){const e=this.problemSetup.portHCostToEndOfRoute;if(e)return e[t*this.problem.routeCount+this.state.currentRouteId];const n=this.getRouteEndPortId(this.state.currentRouteId),o=this.topology.portX[t]-this.topology.portX[n],i=this.topology.portY[t]-this.topology.portY[n];return Math.sqrt(o*o+i*i)*this.DISTANCE_TO_COST}visualize(){return NAe(this)}getOutput(){return Xco(this)}},plo=class extends Bv{computeG(t,e){return t.g}},mlo=class{constructor(t,e){this.regionCount=t,this.compactHopIndex=e,e\u0026\u0026(this.hopStateGeneration=new Uint32Array(e.hopCapacity),this.hopIndexOrClosed=new Int32Array(e.hopCapacity))}regionCount;compactHopIndex;items=[];indexByHopId=new Map;closedHopIds=new Set;hopStateGeneration;hopIndexOrClosed;currentHopStateGeneration=1;get length(){return this.items.length}toArray(){return[...this.items]}clear(){this.items.length=0,this.indexByHopId.clear(),this.closedHopIds.clear(),this.hopStateGeneration\u0026\u0026(this.currentHopStateGeneration===4294967295?(this.hopStateGeneration.fill(0),this.currentHopStateGeneration=1):this.currentHopStateGeneration+=1)}isClosedHop(t,e){return this.isHopClosed(this.getHopIdFromValues(t,e))}queue(t){const e=this.getHopId(t);if(this.isHopClosed(e))return;const n=this.getQueuedHopIndex(e);if(n!==void 0){const i=this.items[n];return t.g\u003e=i.g?void 0:(this.items[n]=t,void(t.f\u003c=i.f?this.siftUp(n):this.siftDown(n)))}const o=this.items.length;this.items.push(t),this.siftUp(o)}dequeue(){const t=this.items[0];if(!t)return;const e=this.getHopId(t);this.closeHop(e);const n=this.items.pop();return this.items.length\u003e0\u0026\u0026(this.items[0]=n,this.siftDown(0)),t}getHopId(t){return this.getHopIdFromValues(t.portId,t.nextRegionId)}getHopIdFromValues(t,e){const n=this.compactHopIndex;if(!n)return t*this.regionCount+e;const o=t*n.hopSlotStride;if(n.firstRegionByPortId[t]===e)return o;if(n.secondRegionByPortId[t]===e)return o+1;const i=n.incidentPortRegion[t];for(let r=2;r\u003c(i?.length??0);r++)if(i[r]===e)return o+r;return-(t*this.regionCount+e)-1}getQueuedHopIndex(t){if(t\u003e=0\u0026\u0026this.hopStateGeneration?.[t]===this.currentHopStateGeneration){const e=this.hopIndexOrClosed[t];return e\u003e=0?e:void 0}return this.indexByHopId.get(t)}isHopClosed(t){return t\u003e=0\u0026\u0026this.hopStateGeneration?.[t]===this.currentHopStateGeneration?this.hopIndexOrClosed[t]===-1:this.closedHopIds.has(t)}setQueuedHopIndex(t,e){if(t\u003e=0\u0026\u0026this.hopStateGeneration)return this.hopStateGeneration[t]=this.currentHopStateGeneration,void(this.hopIndexOrClosed[t]=e);this.indexByHopId.set(t,e)}closeHop(t){if(t\u003e=0\u0026\u0026this.hopStateGeneration)return this.hopStateGeneration[t]=this.currentHopStateGeneration,void(this.hopIndexOrClosed[t]=-1);this.indexByHopId.delete(t),this.closedHopIds.add(t)}siftUp(t){const e=this.items[t];let n=t;for(;n\u003e0;){const o=n-1\u003e\u003e1,i=this.items[o];if(i.f\u003c=e.f)break;this.items[n]=i,this.setQueuedHopIndex(this.getHopId(i),n),n=o}this.items[n]=e,this.setQueuedHopIndex(this.getHopId(e),n)}siftDown(t){const e=this.items[t];let n=t;for(;;){const o=2*n+1;if(o\u003e=this.items.length)break;const i=o+1,r=i\u003cthis.items.length\u0026\u0026this.items[i].f\u003cthis.items[o].f?i:o,s=this.items[r];if(e.f\u003c=s.f)break;this.items[n]=s,this.setQueuedHopIndex(this.getHopId(s),n),n=r}this.items[n]=e,this.setQueuedHopIndex(this.getHopId(e),n)}},_lo=class extends Bv{constructor(t,e,n){super(t,e,n),this.ADD_SEGMENT_DISTANCE_TO_G=!0}_setup(){super._setup(),this.state.candidateQueue=new mlo(this.topology.regionCount,{hopCapacity:this.candidateHopCapacity,hopSlotStride:this.candidateHopSlotStride,firstRegionByPortId:this.candidateFirstRegionByPortId,secondRegionByPortId:this.candidateSecondRegionByPortId,incidentPortRegion:this.topology.incidentPortRegion})}onPathFound(t){const e=this.state.goalPortId;if(t.portId===e)return void super.onPathFound(t);const n=this.computeG(t,e);if(!Number.isFinite(n))return;const o=this.getHopId(e,t.nextRegionId);n\u003e=this.getCandidateBestCost(o)||(this.setCandidateBestCost(o,n),this.state.candidateQueue.queue({prevRegionId:t.nextRegionId,nextRegionId:t.nextRegionId,portId:e,g:n,h:0,f:n,prevCandidate:t}))}},flo=new Set,Ilo=class extends _lo{partialRipRoutePlans=new Map;outsideInRouteSearch;oneSidedFallbackRouteId;partialRipWindowDistance;partialRipCount=0;partiallyRippedRouteCount=0;partiallyRippedSegmentCount=0;retainedPartialRipSegmentCount=0;outsideInRouteCount=0;outsideInCompletedRouteCount=0;outsideInFallbackRouteCount=0;outsideInForwardExpansionCount=0;outsideInReverseExpansionCount=0;outsideInDistancePruneCount=0;completedRoundSummaries=[];firstCompletedRoundSummary;partialRipQualityBaselineSummary;bestSolvedRoundSummary;partialRipTargetReached=!1;useComplexityAwareSelection=!1;constructor(t,e,n){super(t,e,n),n?.PARTIAL_RIP_ENABLED===void 0\u0026\u0026(this.PARTIAL_RIP_ENABLED=!0),n?.OUTSIDE_IN_ROUTING===void 0\u0026\u0026(this.OUTSIDE_IN_ROUTING=!0),this.PARTIAL_RIP_ENABLED\u0026\u0026n?.PARTIAL_RIP_MAX_ATTEMPTS===void 0\u0026\u0026(this.PARTIAL_RIP_MAX_ATTEMPTS=10),(e.routeCount\u003cMath.max(0,this.PARTIAL_RIP_MIN_ROUTE_COUNT)||e.routeCount\u003eMath.max(0,this.PARTIAL_RIP_MAX_ROUTE_COUNT))\u0026\u0026(this.PARTIAL_RIP_ENABLED=!1,this.OUTSIDE_IN_ROUTING=!1),this.useComplexityAwareSelection=e.routeCount\u003e=Math.max(0,this.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT)}getRouteStartPortId(t){return this.PARTIAL_RIP_ENABLED?this.partialRipRoutePlans.get(t)?.activeStartPortId??super.getRouteStartPortId(t):super.getRouteStartPortId(t)}getRouteEndPortId(t){return this.PARTIAL_RIP_ENABLED?this.partialRipRoutePlans.get(t)?.activeEndPortId??super.getRouteEndPortId(t):super.getRouteEndPortId(t)}getStartingNextRegionId(t,e){if(!this.PARTIAL_RIP_ENABLED)return super.getStartingNextRegionId(t,e);const n=this.partialRipRoutePlans.get(t);return n\u0026\u0026n.activeStartPortId===e?n.forcedStartRegionId:super.getStartingNextRegionId(t,e)}getEndingNextRegionId(t,e){const n=this.partialRipRoutePlans.get(t);return n\u0026\u0026n.activeEndPortId===e?n.forcedEndRegionId:super.getStartingNextRegionId(t,e)}computeH(t){if(!this.PARTIAL_RIP_ENABLED)return super.computeH(t);const e=this.state.currentRouteId;if(e===void 0||!this.partialRipRoutePlans.has(e))return super.computeH(t);const n=this.getRouteEndPortId(e),o=this.topology.portX[t]-this.topology.portX[n],i=this.topology.portY[t]-this.topology.portY[n];return Math.sqrt(o*o+i*i)*this.DISTANCE_TO_COST}onPathFound(t){if(!this.PARTIAL_RIP_ENABLED\u0026\u0026!this.OUTSIDE_IN_ROUTING)return void super.onPathFound(t);const e=this.state.currentRouteId,n=e!==void 0\u0026\u0026this.outsideInRouteSearch?.routeId===e;super.onPathFound(t),e!==void 0\u0026\u0026this.state.currentRouteId===void 0\u0026\u0026(this.partialRipRoutePlans.delete(e),n\u0026\u0026(this.outsideInCompletedRouteCount+=1),this.oneSidedFallbackRouteId===e\u0026\u0026(this.oneSidedFallbackRouteId=void 0)),this.outsideInRouteSearch=void 0,this.publishOutsideInStats()}resetRoutingStateForRerip(){this.PARTIAL_RIP_ENABLED||this.OUTSIDE_IN_ROUTING?(this.partialRipRoutePlans.clear(),this.outsideInRouteSearch=void 0,this.oneSidedFallbackRouteId=void 0,super.resetRoutingStateForRerip()):super.resetRoutingStateForRerip()}clearPartialRipPlans(t){for(const e of t)this.partialRipRoutePlans.delete(e)}getRouteIdsPreferredForPreservation(){return flo}getCommittedRouteSegments(t){const e=[];for(let A=0;A\u003cthis.state.regionSegments.length;A++)for(const[c,l,u]of this.state.regionSegments[A]??[])c===t\u0026\u0026e.push({segmentIndex:e.length,regionId:A,fromPortId:l,toPortId:u});if(e.length===0)return;const n=new Map;for(const A of e)for(const c of[A.fromPortId,A.toPortId]){const l=n.get(c)??[];l.push(A.segmentIndex),n.set(c,l)}const o=this.problem.routeEndPort[t],i=[],r=new Set,s=new Set([this.problem.routeStartPort[t]]),a=A=\u003e{if(A===o)return!0;for(const c of n.get(A)??[]){if(r.has(c))continue;const l=e[c],u=l.fromPortId===A?l.toPortId:l.fromPortId;if(!s.has(u)){if(r.add(c),s.add(u),i.push({regionId:l.regionId,fromPortId:A,toPortId:u}),a(u))return!0;i.pop(),s.delete(u),r.delete(c)}}return!1};return a(this.problem.routeStartPort[t])\u0026\u0026r.size===e.length?i:void 0}getSegmentDistance(t){const e=this.topology.portX[t.fromPortId]-this.topology.portX[t.toPortId],n=this.topology.portY[t.fromPortId]-this.topology.portY[t.toPortId];return Math.sqrt(e*e+n*n)}getPartialRipWindow(t,e,n){let o,i=Number.NEGATIVE_INFINITY;for(let l=0;l\u003ct.length;l++){const u=t[l];if(!e.has(u.regionId))continue;const g=n[u.regionId]??0;g\u003ei\u0026\u0026(i=g,o=l)}if(o===void 0)return;const r=Math.max(0,this.partialRipWindowDistance??this.PARTIAL_RIP_MAX_DISTANCE);let s=o,a=o,A=this.getSegmentDistance(t[o])/2,c=A;for(;s\u003e0;){const l=this.getSegmentDistance(t[s-1]);if(A+l\u003er)break;s-=1,A+=l}for(;a+1\u003ct.length;){const l=this.getSegmentDistance(t[a+1]);if(c+l\u003er)break;a+=1,c+=l}return{startIndex:s,endIndex:a}}appendRetainedSegment(t,e,n){t[n.regionId].push([e,n.fromPortId,n.toPortId])}preparePartialRip(t,e){if(!this.PARTIAL_RIP_ENABLED||t.length===0)return!1;const n=new Set(t);if(this.partialRipWindowDistance===void 0){let l=0;for(const h of t)l=Math.max(l,e[h]??0);const u=Math.max(0,this.PARTIAL_RIP_MAX_DISTANCE),g=Math.max(u,this.PARTIAL_RIP_QUALITY_MAX_DISTANCE??2*u);this.partialRipWindowDistance=l\u003c=1.5*this.RIP_THRESHOLD_END?g:u}const o=new Set;for(const l of t)for(const[u]of this.state.regionSegments[l]??[])o.add(u);if(o.size===0)return!1;const i=this.getRouteIdsPreferredForPreservation(),r=[...o].some(l=\u003e!i.has(l)),s=Array.from({length:this.topology.regionCount},()=\u003e[]),a=new Map;let A=0,c=0;for(let l=0;l\u003cthis.problem.routeCount;l++){const u=this.getCommittedRouteSegments(l);if(!u)return!1;if(!o.has(l)||r\u0026\u0026i.has(l)){for(const p of u)this.appendRetainedSegment(s,l,p),c+=1;continue}const g=this.getPartialRipWindow(u,n,e);if(!g)return!1;for(let p=0;p\u003cu.length;p++){const m=u[p];p\u003e=g.startIndex\u0026\u0026p\u003c=g.endIndex?A+=1:(this.appendRetainedSegment(s,l,m),c+=1)}const h=u[g.startIndex],d=u[g.endIndex];a.set(l,{routeId:l,activeStartPortId:h.fromPortId,activeEndPortId:d.toPortId,forcedStartRegionId:h.regionId,forcedEndRegionId:d.regionId,rippedSegmentCount:g.endIndex-g.startIndex+1,retainedSegmentCount:u.length-(g.endIndex-g.startIndex+1)})}return a.size!==0\u0026\u0026A!==0\u0026\u0026(this.partialRipRoutePlans=a,this.rebuildRetainedRoutingState(s,[...a.keys()]),this.partialRipCount+=1,this.partiallyRippedRouteCount+=a.size,this.partiallyRippedSegmentCount+=A,this.retainedPartialRipSegmentCount+=c,this.publishPartialRipStats(),!0)}rebuildRetainedRoutingState(t,e){this.state.portAssignment.fill(-1),this.state.regionSegments=Array.from({length:this.topology.regionCount},()=\u003e[]),this.state.regionIntersectionCaches=Array.from({length:this.topology.regionCount},()=\u003eaW()),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=e,this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1,this.outsideInRouteSearch=void 0,this.oneSidedFallbackRouteId=void 0;for(let n=0;n\u003ct.length;n++)for(const[o,i,r]of t[n]??[]){const s=this.problem.routeNet[o];this.state.currentRouteNetId=s;for(const a of[i,r]){const A=this.state.portAssignment[a];if(A!==-1\u0026\u0026A!==s)throw new Error(`OutsideInPartialRipTinyHyperGraphSolver: retained port ${a} belongs to multiple nets`);this.state.portAssignment[a]=s}this.state.regionSegments[n].push([o,i,r]),this.appendSegmentToRegionCache(n,i,r)}this.state.currentRouteNetId=void 0}publishPartialRipStats(){this.stats={...this.stats,partialRipCount:this.partialRipCount,partiallyRippedRouteCount:this.partiallyRippedRouteCount,partiallyRippedSegmentCount:this.partiallyRippedSegmentCount,retainedPartialRipSegmentCount:this.retainedPartialRipSegmentCount,partialRipMaxDistance:this.partialRipWindowDistance??this.PARTIAL_RIP_MAX_DISTANCE,partialRipBaseMaxDistance:this.PARTIAL_RIP_MAX_DISTANCE,partialRipQualityMaxDistance:this.PARTIAL_RIP_QUALITY_MAX_DISTANCE??2*this.PARTIAL_RIP_MAX_DISTANCE,partialRipMaxAttempts:this.PARTIAL_RIP_MAX_ATTEMPTS}}publishOutsideInStats(){this.stats={...this.stats,outsideInRouteCount:this.outsideInRouteCount,outsideInCompletedRouteCount:this.outsideInCompletedRouteCount,outsideInFallbackRouteCount:this.outsideInFallbackRouteCount,outsideInForwardExpansionCount:this.outsideInForwardExpansionCount,outsideInReverseExpansionCount:this.outsideInReverseExpansionCount,outsideInDistancePruneCount:this.outsideInDistancePruneCount,outsideInMaxDistance:this.OUTSIDE_IN_MAX_DISTANCE}}createOutsideInFrontier(t,e,n){const o=new _4t([],(A,c)=\u003eA.f===c.f?A.g-c.g:A.f-c.f),i=this.topology.portX[t]-this.topology.portX[n],r=this.topology.portY[t]-this.topology.portY[n],s=Math.sqrt(i*i+r*r)*this.DISTANCE_TO_COST,a={portId:t,nextRegionId:e,f:s,g:0,h:s,travelDistance:0};return o.queue(a),{queue:o,bestCostByHopId:new Map([[this.getHopId(t,e),0]]),settledByPortId:new Map,settledByRegionId:new Map,targetPortId:n}}startOutsideInRouteSearch(t){const e=this.getRouteStartPortId(t),n=this.getRouteEndPortId(t),o=this.getStartingNextRegionId(t,e),i=this.getEndingNextRegionId(t,n);return o!==void 0\u0026\u0026i!==void 0\u0026\u0026(this.state.goalPortId=n,this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.outsideInRouteSearch={routeId:t,forward:this.createOutsideInFrontier(e,o,n),reverse:this.createOutsideInFrontier(n,i,e),expandForwardNext:!0,distanceLimitHit:!1,bestJoinedCost:Number.POSITIVE_INFINITY},this.outsideInRouteCount+=1,this.publishOutsideInStats(),!0)}dequeueFreshCandidate(t){for(;t.queue.length\u003e0;){const e=t.queue.dequeue(),n=this.getHopId(e.portId,e.nextRegionId);if(e.g\u003c=(t.bestCostByHopId.get(n)??1/0))return e}}recordSettledCandidate(t,e){const n=t.settledByPortId.get(e.portId);(!n||e.g\u003cn.g)\u0026\u0026t.settledByPortId.set(e.portId,e);const o=t.settledByRegionId.get(e.nextRegionId)??[];o.push(e),o.sort((i,r)=\u003ei.g-r.g),o.length\u003e16\u0026\u0026(o.length=16),t.settledByRegionId.set(e.nextRegionId,o)}getCandidatePath(t){const e=[];let n=t;for(;n;)e.push(n),n=n.prevCandidate;return e.reverse(),e}buildJoinedCandidate(t,e){const n=this.getCandidatePath(t),o=this.getCandidatePath(e),i=n.map(({portId:A})=\u003eA),r=n.slice(0,-1).map(({nextRegionId:A})=\u003eA);if(t.portId!==e.portId){if(t.nextRegionId!==e.nextRegionId)return;const A=this.topology.portX[t.portId]-this.topology.portX[e.portId],c=this.topology.portY[t.portId]-this.topology.portY[e.portId],l=Math.sqrt(A*A+c*c);if(t.travelDistance+e.travelDistance+l\u003e2*this.OUTSIDE_IN_MAX_DISTANCE)return;const u=this.computeG(t,e.portId);if(!Number.isFinite(u))return;r.push(t.nextRegionId),i.push(e.portId)}for(let A=o.length-2;A\u003e=0;A--){const c=o[A];r.push(c.nextRegionId),i.push(c.portId)}if(new Set(i).size!==i.length||r.length+1!==i.length)return;let s={portId:i[0],nextRegionId:r[0],f:0,g:0,h:0};for(let A=1;A\u003ci.length;A++)s={portId:i[A],prevRegionId:r[A-1],nextRegionId:r[A]??r[A-1],prevCandidate:s,f:0,g:0,h:0};const a=t.portId===e.portId?0:this.computeG(t,e.portId)-t.g;return{candidate:s,cost:t.g+e.g+a}}considerOutsideInJoins(t,e){const n=this.outsideInRouteSearch,o=e?n.reverse:n.forward,i=s=\u003e{!s||s.cost\u003e=n.bestJoinedCost||(n.bestJoinedCandidate=s.candidate,n.bestJoinedCost=s.cost,n.remainingPostMeetingExpansions=24)},r=o.settledByPortId.get(t.portId);r\u0026\u0026i(e?this.buildJoinedCandidate(t,r):this.buildJoinedCandidate(r,t));for(const s of o.settledByRegionId.get(t.nextRegionId)??[])i(e?this.buildJoinedCandidate(t,s):this.buildJoinedCandidate(s,t))}commitBestOutsideInJoin(){const t=this.outsideInRouteSearch?.bestJoinedCandidate;return!!t\u0026\u0026(this.onPathFound(t),!0)}expandOutsideInFrontier(t){const e=this.outsideInRouteSearch,n=t?e.forward:e.reverse,o=this.dequeueFreshCandidate(n);if(!o)return!1;if(t?this.outsideInForwardExpansionCount+=1:this.outsideInReverseExpansionCount+=1,this.isRegionReservedForDifferentNet(o.nextRegionId))return!0;this.recordSettledCandidate(n,o),this.considerOutsideInJoins(o,t);for(const i of this.topology.regionIncidentPorts[o.nextRegionId]??[]){if(i===o.portId||this.isPortReservedForDifferentNet(i))continue;const r=this.state.portAssignment[i];if(r!==-1\u0026\u0026r!==this.state.currentRouteNetId||i!==n.targetPortId\u0026\u0026this.problem.portSectionMask[i]===0)continue;const s=this.topology.portX[o.portId]-this.topology.portX[i],a=this.topology.portY[o.portId]-this.topology.portY[i],A=Math.sqrt(s*s+a*a),c=o.travelDistance+A;if(c\u003ethis.OUTSIDE_IN_MAX_DISTANCE){e.distanceLimitHit=!0,this.outsideInDistancePruneCount+=1;continue}const l=this.topology.incidentPortRegion[i]?.[0]===o.nextRegionId?this.topology.incidentPortRegion[i]?.[1]:this.topology.incidentPortRegion[i]?.[0];if(l===void 0||this.isRegionReservedForDifferentNet(l))continue;const u=this.getHopId(i,l),g=n.bestCostByHopId.get(u)??1/0;if(o.g\u003e=g)continue;const h=this.computeG(o,i,g,A);if(!Number.isFinite(h)||h\u003e=g)continue;n.bestCostByHopId.set(u,h);const d=this.topology.portX[i]-this.topology.portX[n.targetPortId],p=this.topology.portY[i]-this.topology.portY[n.targetPortId],m=Math.sqrt(d*d+p*p)*this.DISTANCE_TO_COST;n.queue.queue({portId:i,prevRegionId:o.nextRegionId,nextRegionId:l,prevCandidate:o,f:h+m,g:h,h:m,travelDistance:c})}return!0}fallBackToOneSidedRouteSearch(){const t=this.state.currentRouteId;t!==void 0\u0026\u0026(this.outsideInRouteSearch=void 0,this.outsideInFallbackRouteCount+=1,this.oneSidedFallbackRouteId=t,this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.goalPortId=-1,this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.unroutedRoutes.unshift(t),this.publishOutsideInStats())}_step(){if(!this.OUTSIDE_IN_ROUTING)return void super._step();const t=this.state.currentRouteId??this.state.unroutedRoutes[0];if(t!==void 0\u0026\u0026!this.partialRipRoutePlans.has(t))return void super._step();if(this.oneSidedFallbackRouteId!==void 0)return void super._step();if(this.state.currentRouteId===void 0){if(this.state.unroutedRoutes.length===0)return void this.onAllRoutesRouted();const o=this.state.unroutedRoutes.shift();if(this.state.currentRouteId=o,this.state.currentRouteNetId=this.problem.routeNet[o],this.routeAttemptCountByRouteId[o]+=1,!this.startOutsideInRouteSearch(o))return this.failed=!0,void(this.error=`Route ${o} has an endpoint without an incident region`)}const e=this.outsideInRouteSearch;if(!e)return;let n=this.expandOutsideInFrontier(e.expandForwardNext);if(this.state.currentRouteId!==void 0\u0026\u0026(n||(n=this.expandOutsideInFrontier(!e.expandForwardNext),this.state.currentRouteId!==void 0)))if(e.expandForwardNext=!e.expandForwardNext,e.bestJoinedCandidate\u0026\u0026(e.remainingPostMeetingExpansions=(e.remainingPostMeetingExpansions??1)-1,(e.remainingPostMeetingExpansions??0)\u003c=0))this.commitBestOutsideInJoin();else{if(!n\u0026\u0026e.forward.queue.length===0\u0026\u0026e.reverse.queue.length===0){if(this.commitBestOutsideInJoin())return;this.outsideInRouteSearch=void 0,e.distanceLimitHit?this.fallBackToOneSidedRouteSearch():this.onOutOfCandidates()}this.publishOutsideInStats()}}shouldReplaceBestSolvedState(t){const e=this.bestSolvedRoundSummary;if(!e)return!0;if(!this.useComplexityAwareSelection)return this.compareRegionCostSummaries(t,e)\u003c0;const n=this.partialRipQualityBaselineSummary;if(!n)return this.compareRegionCostSummaries(t,e)\u003c0;const o=this.firstCompletedRoundSummary??n,i=o.maxRegionCost*(1+Math.max(0,this.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO)),r=o.totalRegionCost*(1+Math.max(0,this.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO)),s=t.maxRegionCost\u003c=i\u0026\u0026t.totalRegionCost\u003c=r;return s!==(e.maxRegionCost\u003c=i\u0026\u0026e.totalRegionCost\u003c=r)?s:s\u0026\u0026t.segmentCount!==e.segmentCount?t.segmentCount\u003ce.segmentCount:this.compareRegionCostSummaries(t,e)\u003c0}onAllRoutesRouted(){if(!this.PARTIAL_RIP_ENABLED)return void super.onAllRoutesRouted();const{state:t,topology:e}=this,n=Math.min(this.RIP_THRESHOLD_RAMP_ATTEMPTS,this.PARTIAL_RIP_MAX_ATTEMPTS),o=Math.max(0,this.RIP_THRESHOLD_RAMP_ATTEMPTS),i=o\u003c=0?1:Math.min(1,t.ripCount/o),r=this.RIP_THRESHOLD_START+(this.RIP_THRESHOLD_END-this.RIP_THRESHOLD_START)*i,s=new Float64Array(e.regionCount),a=[];let A=0,c=0,l=0,u=0,g=0;for(let S=0;S\u003ce.regionCount;S++){const Q=t.regionIntersectionCaches[S]?.existingRegionCost??0;s[S]=Q,A=Math.max(A,Q),c+=Q;const w=t.regionSegments[S]?.length??0;l+=w,u=Math.max(u,w),g+=w*w,Q\u003er\u0026\u0026a.push(S)}const h={maxRegionCost:A,totalRegionCost:c},d={...h,ripCount:t.ripCount,segmentCount:l,maxRegionSegmentCount:u,squaredRegionSegmentCount:g};this.completedRoundSummaries.push(d),this.firstCompletedRoundSummary??=d,this.partialRipQualityBaselineSummary===void 0\u0026\u0026t.ripCount\u003e=Math.max(0,this.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS)\u0026\u0026(this.partialRipQualityBaselineSummary=d),this.shouldReplaceBestSolvedState(d)\u0026\u0026(this.replaceBestSolvedState(h),this.bestSolvedRoundSummary=d);const p=this.firstCompletedRoundSummary,m=this.partialRipQualityBaselineSummary??p,_=Math.max(0,this.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO),f=Math.max(0,this.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO),I=m.maxRegionCost*(1-_),C=m.totalRegionCost*(1+f),y=this.useComplexityAwareSelection\u0026\u0026t.ripCount\u003em.ripCount\u0026\u0026_\u003e0\u0026\u0026A\u003c=I\u0026\u0026c\u003c=C\u0026\u0026l\u003c=m.segmentCount;if(y\u0026\u0026(this.partialRipTargetReached=!0),this.stats={...this.stats,currentRipThreshold:r,hotRegionCount:a.length,maxRegionCost:A,totalRegionCost:c,bestMaxRegionCost:this.bestSolvedStateSummary?.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary?.totalRegionCost,ripCount:t.ripCount,completedRoundSummaries:this.completedRoundSummaries.map(S=\u003e({...S})),firstMaxRegionCost:p.maxRegionCost,firstTotalRegionCost:p.totalRegionCost,firstSegmentCount:p.segmentCount,firstMaxRegionSegmentCount:p.maxRegionSegmentCount,firstSquaredRegionSegmentCount:p.squaredRegionSegmentCount,partialRipQualityBaselineRipCount:m.ripCount,partialRipQualityBaselineMaxRegionCost:m.maxRegionCost,partialRipQualityBaselineTotalRegionCost:m.totalRegionCost,partialRipQualityBaselineSegmentCount:m.segmentCount,partialRipQualityBaselineMaxRegionSegmentCount:m.maxRegionSegmentCount,partialRipQualityBaselineSquaredRegionSegmentCount:m.squaredRegionSegmentCount,bestSolvedSegmentCount:this.bestSolvedRoundSummary?.segmentCount,bestSolvedMaxRegionSegmentCount:this.bestSolvedRoundSummary?.maxRegionSegmentCount,bestSolvedSquaredRegionSegmentCount:this.bestSolvedRoundSummary?.squaredRegionSegmentCount,partialRipTargetMaxRegionCost:I,partialRipMaxTargetTotalRegionCost:C,partialRipComplexityAwareSelection:this.useComplexityAwareSelection,partialRipComplexitySelectionMinRouteCount:this.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT,partialRipMaxRegionCostGrowthRatio:this.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO,partialRipTargetReached:this.partialRipTargetReached},this.publishPartialRipStats(),a.length===0||y||t.ripCount\u003e=n)return this.restoreBestSolvedState(),void(this.solved=!0);for(let S=0;S\u003ce.regionCount;S++)t.regionCongestionCost[S]+=s[S]*this.RIP_CONGESTION_REGION_COST_FACTOR;const x=t.ripCount\u003cMath.max(0,this.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS);t.ripCount+=1;const E=!x\u0026\u0026this.preparePartialRip(a,s);E||this.resetRoutingStateForRerip();const B=x?\"warmup_full\":E?\"partial\":\"full_fallback\";this.stats={...this.stats,ripCount:t.ripCount,maxRegionCostBeforeRip:A,reripRegionCount:a.length,reripMode:B,partialRipWarmupFullRipAttempts:this.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS},this.logRipEvent(\"hot_regions\",A,{hotRegionCount:a.length,currentRipThreshold:r,reripMode:B,partialRouteCount:E?this.partialRipRoutePlans.size:0})}},Y4t=t=\u003e{const e=typeof t.d?.netId==\"number\"?t.d.netId:typeof t.d?.NetId==\"number\"?t.d.NetId:void 0;return Number.isFinite(e)?e:void 0},Clo=t=\u003e{const e=new Set;for(const r of t.connections??[])e.add(r.startRegionId),e.add(r.endRegionId);const n=new Set(t.regions.filter(r=\u003e(s=\u003e{if(s.d?._containsObstacle!==!0)return!1;const a=Y4t(s);return a===void 0||a===-1})(r)\u0026\u0026!e.has(r.regionId)).map(r=\u003er.regionId));if(n.size===0)return t;const o=t.ports.filter(r=\u003e!n.has(r.region1Id)\u0026\u0026!n.has(r.region2Id)),i=(t.connections??[]).find(r=\u003en.has(r.startRegionId)||n.has(r.endRegionId));if(i)throw new Error(`Connection \"${i.connectionId}\" references full-obstacle region`);return{...t,regions:t.regions.filter(r=\u003e!n.has(r.regionId)),ports:o}},U4t=t=\u003e{const e=t.d?.bounds;if(e)return e;const n=t.d?.center,o=t.d?.width,i=t.d?.height;return n\u0026\u0026typeof n.x==\"number\"\u0026\u0026typeof n.y==\"number\"\u0026\u0026typeof o==\"number\"\u0026\u0026typeof i==\"number\"?{minX:n.x-o/2,maxX:n.x+o/2,minY:n.y-i/2,maxY:n.y+i/2}:{minX:0,maxX:0,minY:0,maxY:0}},K4t=t=\u003eNumber(t.d?.x??0),V4t=t=\u003eNumber(t.d?.y??0),z4t=(t,e)=\u003e{if(!e)return 0;const n=U4t(e),o=K4t(t),i=V4t(t),r=n.minX\u003c=o\u0026\u0026o\u003c=n.maxX,s=n.minY\u003c=i\u0026\u0026i\u003c=n.maxY;if(s\u0026\u0026o\u003e=n.maxX){const p=Math.max(n.maxY-n.minY,1e-9),m=(i-n.minY)/p;return Math.round(9e3*m)}if(r\u0026\u0026i\u003e=n.maxY){const p=Math.max(n.maxX-n.minX,1e-9),m=(n.maxX-o)/p;return 9e3+Math.round(9e3*m)}if(s\u0026\u0026o\u003c=n.minX){const p=Math.max(n.maxY-n.minY,1e-9),m=(n.maxY-i)/p;return 18e3+Math.round(9e3*m)}if(r\u0026\u0026i\u003c=n.minY){const p=Math.max(n.maxX-n.minX,1e-9),m=(o-n.minX)/p;return 27e3+Math.round(9e3*m)}const a=Math.abs(o-n.minX),A=Math.abs(o-n.maxX),c=Math.abs(i-n.minY),l=Math.abs(i-n.maxY),u=Math.min(a,A,c,l),g=Math.max(n.maxX-n.minX,1e-9),h=Math.max(n.maxY-n.minY,1e-9);if(u===A){const p=(i-n.minY)/h;return Math.round(9e3*p)}if(u===l){const p=(n.maxX-o)/g;return 9e3+Math.round(9e3*p)}if(u===a){const p=(n.maxY-i)/h;return 18e3+Math.round(9e3*p)}const d=(o-n.minX)/g;return 27e3+Math.round(9e3*d)},J4t=(t,e)=\u003e{if(t)return[...t.pointIds].sort((n,o)=\u003e{const i=e.get(n),r=e.get(o),s=Number(i?.d?.distToCentermostPortOnZ??Number.POSITIVE_INFINITY),a=Number(r?.d?.distToCentermostPortOnZ??Number.POSITIVE_INFINITY);if(s!==a)return s-a;const A=Number(i?.d?.z??0),c=Number(r?.d?.z??0);return A!==c?A-c:n.localeCompare(o)})[0]},iSe=t=\u003e{const e=Clo(t),n=new Map,o=new Map,i=new Map,r=new Map((e.solvedRoutes??[]).map(_e=\u003e[_e.connection.connectionId,_e]));e.regions.forEach((_e,ue)=\u003e{n.set(_e.regionId,ue)}),e.ports.forEach((_e,ue)=\u003e{o.set(_e.portId,ue),i.set(_e.portId,_e)});const s=e.regions.length,a=e.ports.length,A=e.regions.map(_e=\u003e_e.pointIds.map(ue=\u003eo.get(ue)).filter(ue=\u003eue!==void 0)),c=Array.from({length:a},()=\u003e[]),l=new Float64Array(s),u=new Float64Array(s),g=new Float64Array(s),h=new Float64Array(s),d=new Int32Array(s),p=new Int32Array(s).fill(-1),m=new Int8Array(s);e.regions.forEach((_e,ue)=\u003e{const fe=(ye=\u003e{const Me=U4t(ye),ve=typeof ye.d?.width==\"number\"?ye.d.width:Me.maxX-Me.minX,he=typeof ye.d?.height==\"number\"?ye.d.height:Me.maxY-Me.minY;return{centerX:typeof ye.d?.center?.x==\"number\"?ye.d.center.x:(Me.minX+Me.maxX)/2,centerY:typeof ye.d?.center?.y==\"number\"?ye.d.center.y:(Me.minY+Me.maxY)/2,width:ve,height:he}})(_e);l[ue]=fe.width,u[ue]=fe.height,g[ue]=fe.centerX,h[ue]=fe.centerY,d[ue]=(ye=\u003e{const Me=ye.d?.availableZ;if(!Array.isArray(Me))return 0;let ve=0;for(const he of Me)!Number.isInteger(he)||he\u003c0||he\u003e=31||(ve|=1\u003c\u003che);return ve})(_e);const pe=Y4t(_e);pe!==void 0\u0026\u0026(p[ue]=pe,m[ue]=1)});const _=new Int32Array(a),f=new Int32Array(a),I=new Float64Array(a),C=new Float64Array(a),y=new Int32Array(a);e.ports.forEach((_e,ue)=\u003e{const fe=n.get(_e.region1Id),pe=n.get(_e.region2Id);if(fe===void 0||pe===void 0)throw new Error(`Port \"${_e.portId}\" references missing regions \"${_e.region1Id}\" or \"${_e.region2Id}\"`);c[ue]=[fe,pe],I[ue]=K4t(_e),C[ue]=V4t(_e),y[ue]=(ye=\u003e{const Me=Number(ye.d?.z??0);return Number.isFinite(Me)?Me:0})(_e),_[ue]=z4t(_e,e.regions[fe]),f[ue]=z4t(_e,e.regions[pe])});const x=e.regions.map((_e,ue)=\u003e((fe,pe)=\u003e{const ye=fe.d\u0026\u0026typeof fe.d==\"object\"\u0026\u0026!Array.isArray(fe.d)?{...fe.d}:{value:fe.d};return ye.layer=pe,Object.defineProperty(ye,\"serializedRegionId\",{value:fe.regionId,enumerable:!1,configurable:!0,writable:!0}),ye})(_e,(fe=\u003ecB($be(d[fe]))??cB((A[fe]??[]).map(pe=\u003ey[pe]))??\"z0\")(ue))),E=e.ports.map((_e,ue)=\u003e((fe,pe)=\u003e{const ye=fe.d\u0026\u0026typeof fe.d==\"object\"\u0026\u0026!Array.isArray(fe.d)?{...fe.d}:{value:fe.d};return ye.layer=pe,Object.defineProperty(ye,\"serializedPortId\",{value:fe.portId,enumerable:!1,configurable:!0,writable:!0}),ye})(_e,cB([y[ue]])??\"z0\")),B=e.connections??[],S=new Map;let Q=0;const w=_e=\u003e{const ue=_e.mutuallyConnectedNetworkId??_e.connectionId;let fe=S.get(ue);return fe===void 0\u0026\u0026(fe=Q++,S.set(ue,fe)),fe},M=Array.from({length:s},()=\u003enew Set),k=(_e,ue)=\u003e{const fe=n.get(_e);if(fe===void 0)throw new Error(`Connection references missing region \"${_e}\"`);M[fe].add(ue)};B.forEach(_e=\u003e{const ue=w(_e);k(_e.startRegionId,ue),k(_e.endRegionId,ue)}),M.forEach((_e,ue)=\u003e{m[ue]!==1\u0026\u0026_e.size===1\u0026\u0026(p[ue]=[..._e][0])});const R=B.map(_e=\u003e{const ue=r.get(_e.connectionId),fe=((pe,ye)=\u003epe.ports.filter(Me=\u003eMe.region1Id===ye.startRegionId\u0026\u0026Me.region2Id===ye.endRegionId||Me.region2Id===ye.startRegionId\u0026\u0026Me.region1Id===ye.endRegionId).map(Me=\u003eMe.portId))(e,_e);return{connection:_e,solvedRoute:ue,sharedPortIds:fe}}).filter(({solvedRoute:_e,sharedPortIds:ue})=\u003eue.length===0||(_e?.path.length??0)\u003e1),F=R.length,O=new Map(R.map(({connection:_e},ue)=\u003e[_e.connectionId,ue])),U=new Int8Array(a).fill(1),Y=new Int32Array(F),W=new Int32Array(F),te=new Int32Array(F);R.forEach(({connection:_e,solvedRoute:ue},fe)=\u003e{const pe=J4t(e.regions.find(Pe=\u003ePe.regionId===_e.startRegionId),i),ye=J4t(e.regions.find(Pe=\u003ePe.regionId===_e.endRegionId),i),Me=ue?.path[0]?.portId??pe,ve=ue?.path[ue.path.length-1]?.portId??ye,he=Me!==void 0?o.get(Me):void 0,Qe=ve!==void 0?o.get(ve):void 0;if(he===void 0||Qe===void 0)throw new Error(`Connection \"${_e.connectionId}\" could not be mapped to route endpoints`);Y[fe]=he,W[fe]=Qe,te[fe]=w(_e)});const j={portCount:a,regionCount:s,regionIncidentPorts:A,incidentPortRegion:c,regionWidth:l,regionHeight:u,regionCenterX:g,regionCenterY:h,regionAvailableZMask:d,regionMetadata:x,portAngleForRegion1:_,portAngleForRegion2:f,portX:I,portY:C,portZ:y,portMetadata:E},J=e.regions.flatMap((_e,ue)=\u003e(_e.assignments??[]).map(fe=\u003e{const pe=O.get(fe.connectionId);if(pe===void 0)throw new Error(`Region \"${_e.regionId}\" assignment references unknown routable connection \"${fe.connectionId}\"`);const ye=o.get(fe.regionPort1Id),Me=o.get(fe.regionPort2Id);if(ye===void 0||Me===void 0)throw new Error(`Region \"${_e.regionId}\" assignment references missing port \"${ye===void 0?fe.regionPort1Id:fe.regionPort2Id}\"`);if(!A[ue]?.includes(ye)||!A[ue]?.includes(Me))throw new Error(`Region \"${_e.regionId}\" assignment ports must both belong to the region`);return{routeId:pe,regionId:ue,fromPortId:ye,toPortId:Me}})),oe=Float64Array.from(e.ports,_e=\u003e{const ue=Number(_e.d?.tinyHypergraphPortPenalty??0);return Number.isFinite(ue)\u0026\u0026ue\u003e0?ue:0}),ie=oe.some(_e=\u003e_e\u003e0),ne={routeCount:F,portSectionMask:U,routeMetadata:R.map(({connection:_e})=\u003e_e),routeStartPort:Y,routeEndPort:W,routeNet:te,regionNetId:p,...J.length\u003e0\u0026\u0026{initialAssignments:J},...ie\u0026\u0026{portPenalty:oe}},le=[],ge=[];for(const{solvedRoute:_e}of R){if(!_e){le.push([]),ge.push([]);continue}const ue=[],fe=[];for(let pe=1;pe\u003c_e.path.length;pe++){const ye=_e.path[pe-1],Me=_e.path[pe],ve=ye?.portId,he=Me?.portId,Qe=ve!==void 0?o.get(ve):void 0,Pe=he!==void 0?o.get(he):void 0;if(Qe===void 0||Pe===void 0)continue;const we=typeof ye?.nextRegionId==\"string\"?ye.nextRegionId:typeof Me?.lastRegionId==\"string\"?Me.lastRegionId:void 0;ue.push([Qe,Pe]),fe.push(we!==void 0?n.get(we):void 0)}le.push(ue),ge.push(fe)}return{topology:j,problem:ne,solution:{solvedRoutePathSegments:le,solvedRoutePathRegionIds:ge}}},eH=t=\u003etypeof t==\"object\"\u0026\u0026t!==null,tH=t=\u003eArray.isArray(t)?t.map(e=\u003etH(e)):eH(t)?Object.fromEntries(Object.entries(t).map(([e,n])=\u003e[e,tH(n)])):t,ylo=t=\u003eeH(t)?{...t}:t===void 0?{}:{value:t},bv=(t,e=0)=\u003etypeof t==\"number\"\u0026\u0026Number.isFinite(t)?t:e,cW=t=\u003e({x:bv(t.d?.x),y:bv(t.d?.y)}),W4t=t=\u003e[t.region1Id,t.region2Id].sort().join(\"\\0\"),xlo=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),j4t=t=\u003e{const e=Math.hypot(t.x,t.y);if(!(e\u003c=1e-9))return{x:t.x/e,y:t.y/e}},$4t=t=\u003e{const e=t?.d?.center;if(eH(e))return{x:bv(e.x),y:bv(e.y)};const n=(o=\u003e{const i=o?.d?.bounds;if(eH(i)\u0026\u0026typeof i.minX==\"number\"\u0026\u0026typeof i.maxX==\"number\"\u0026\u0026typeof i.minY==\"number\"\u0026\u0026typeof i.maxY==\"number\")return{minX:i.minX,maxX:i.maxX,minY:i.minY,maxY:i.maxY};const r=o?.d?.center,s=bv(o?.d?.width),a=bv(o?.d?.height);if(eH(r)){const A=bv(r.x),c=bv(r.y);return{minX:A-s/2,maxX:A+s/2,minY:c-a/2,maxY:c+a/2}}return{minX:0,maxX:0,minY:0,maxY:0}})(t);return{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2}},Elo=(t,e)=\u003e{const n=W4t(t),o=cW(t);let i,r=Number.POSITIVE_INFINITY;for(const s of e){if(s.portId===t.portId||W4t(s)!==n)continue;const a=xlo(o,cW(s));a\u003c=1e-9||a\u003e=r||(i=s,r=a)}return i},Blo=(t,e,n)=\u003e{const o=cW(t);if(e){const i=cW(e),r=j4t({x:o.x-i.x,y:o.y-i.y});if(r)return r}return((i,r)=\u003e{const s=$4t(r.get(i.region1Id)),a=$4t(r.get(i.region2Id));return j4t({x:-(a.y-s.y),y:a.x-s.x})??{x:1,y:0}})(t,n)},blo=(t,e,n)=\u003e{const o=`${t}::dup${e}`;if(!n.has(o))return n.add(o),o;for(let i=2;;i++){const r=`${o}-${i}`;if(!n.has(r))return n.add(r),r}},Slo=(t,e,n)=\u003e{const o=t.indexOf(e);o!==-1?t.splice(o+1,0,...n):t.push(...n)},Qlo=(t,e)=\u003e{const n=t.portMetadata?.[e];if(eH(n)){if(typeof n.serializedPortId==\"string\")return n.serializedPortId;if(typeof n.portId==\"string\")return n.portId}return`port-${e}`},vlo=(t,e)=\u003e({routeCount:1,portSectionMask:new Int8Array(t.portSectionMask),routeMetadata:t.routeMetadata===void 0?void 0:[t.routeMetadata[e]],routeStartPort:Int32Array.from([t.routeStartPort[e]]),routeEndPort:Int32Array.from([t.routeEndPort[e]]),routeNet:Int32Array.from([t.routeNet[e]]),regionNetId:new Int32Array(t.regionNetId),portPenalty:t.portPenalty===void 0?void 0:new Float64Array(t.portPenalty)}),wlo=t=\u003e{const e=new Set;for(const n of t.state.regionSegments)for(const[,o,i]of n)e.add(o),e.add(i);return e.size===0\u0026\u0026t.problem.routeCount===1\u0026\u0026(e.add(t.problem.routeStartPort[0]),e.add(t.problem.routeEndPort[0])),e},Plo=class extends zA{constructor(t,e={}){super(),this.serializedHyperGraph=t,this.options=e}serializedHyperGraph;options;revisedSerializedHyperGraph;report={portUseCounts:{},duplicatedPorts:[]};getDuplicatePortProximity(){return this.options.duplicatePortProximity??.05}getIndividualRouteSolveOptions(){return{RIP_THRESHOLD_RAMP_ATTEMPTS:0,STATIC_REACHABILITY_PRECHECK:!1,...this.options.routeSolveOptions}}getPortUseCounts(){const{topology:t,problem:e}=iSe(this.serializedHyperGraph);this.options.useSerializedPortPenalties===!1\u0026\u0026(e.portPenalty=void 0);const n=new Map;for(let o=0;o\u003ce.routeCount;o++){const i=vlo(e,o),r=new Bv(t,i,this.getIndividualRouteSolveOptions());if(r.solve(),!r.solved||r.failed)throw new Error(`Route ${o} could not be solved independently: ${r.error??\"unknown error\"}`);for(const s of wlo(r)){const a=Qlo(t,s);n.set(a,(n.get(a)??0)+1)}}return n}duplicateCongestedPorts(t){const e=this.getDuplicatePortProximity();if(!(e\u003e0))throw new Error(\"duplicatePortProximity must be greater than zero\");const{solvedRoutes:n,...o}=this.serializedHyperGraph,i=this.serializedHyperGraph.regions.map(l=\u003e({...l,pointIds:[...l.pointIds],d:tH(l.d)})),r=this.serializedHyperGraph.ports.map(l=\u003e({...l,d:tH(l.d)})),s=new Map(i.map(l=\u003e[l.regionId,l])),a=new Map(r.map(l=\u003e[l.portId,l])),A=new Set(r.map(l=\u003el.portId)),c=[];for(const[l,u]of[...t.entries()].sort(([g],[h])=\u003eg.localeCompare(h))){if(u\u003c=1)continue;const g=a.get(l);if(!g)continue;const h=u-1,d=Elo(g,this.serializedHyperGraph.ports),p=Blo(g,d,s),m=cW(g),_=[];for(let f=1;f\u003c=h;f++){const I=blo(l,f,A),C=e*f/(h+1),y=ylo(tH(g.d));y.x=m.x+p.x*C,y.y=m.y+p.y*C,y.duplicatedFromPortId=l,y.duplicateIndex=f,y.duplicatePortUseCount=u,y.duplicatePortProximity=e,y.repairReason=\"congested-port\",r.push({...g,portId:I,d:y}),_.push(I)}for(const f of[g.region1Id,g.region2Id]){const I=s.get(f);I\u0026\u0026Slo(I.pointIds,l,_)}c.push({sourcePortId:l,duplicatePortIds:_,useCount:u})}return this.report={portUseCounts:Object.fromEntries([...t.entries()].sort()),duplicatedPorts:c},{...o,regions:i,ports:r,connections:this.serializedHyperGraph.connections===void 0?void 0:tH(this.serializedHyperGraph.connections)}}_setup(){try{const t=this.getPortUseCounts();this.revisedSerializedHyperGraph=this.duplicateCongestedPorts(t),this.stats={...this.stats,duplicateSourcePortCount:this.report.duplicatedPorts.length,duplicatedPortCount:this.report.duplicatedPorts.reduce((e,n)=\u003ee+n.duplicatePortIds.length,0)},this.solved=!0}catch(t){this.failed=!0,this.error=t instanceof Error?t.message:String(t)}}_step(){this.failed||(this.solved=!0)}getOutput(){if(!this.revisedSerializedHyperGraph||this.failed)throw new Error(\"DuplicateCongestedPortSolver does not have a repaired topology output\");return this.revisedSerializedHyperGraph}},rSe=(t,e)=\u003e{const n=t.owners.size-e.owners.size;if(n!==0)return n;const o=t.distance-e.distance;return o!==0?o:t.queueOrder-e.queueOrder},Mlo=class{heap=[];push(t){this.heap.push(t);let e=this.heap.length-1;for(;e\u003e0;){const n=Math.floor((e-1)/2);if(rSe(this.heap[n],this.heap[e])\u003c=0)break;[this.heap[n],this.heap[e]]=[this.heap[e],this.heap[n]],e=n}}pop(){const t=this.heap[0],e=this.heap.pop();if(!t||!e)return null;if(this.heap.length===0)return t;this.heap[0]=e;let n=0;for(;;){const o=2*n+1,i=o+1;let r=n;if(o\u003cthis.heap.length\u0026\u0026rSe(this.heap[o],this.heap[r])\u003c0\u0026\u0026(r=o),i\u003cthis.heap.length\u0026\u0026rSe(this.heap[i],this.heap[r])\u003c0\u0026\u0026(r=i),r===n)break;[this.heap[n],this.heap[r]]=[this.heap[r],this.heap[n]],n=r}return t}},q4t=(t,e)=\u003e!(t.distance\u003ee.distance)\u0026\u0026((n,o)=\u003e{if(n.size\u003eo.size)return!1;for(const i of n)if(!o.has(i))return!1;return!0})(t.owners,e.owners),Dlo=(t,e)=\u003e{const n=[],o=[];let i=t;for(;i!==null;)n.push(i.state),i.incomingHop!==null\u0026\u0026o.push(i.incomingHop),i=i.parent;return n.reverse(),o.reverse(),{found:!0,states:n,hops:o,owners:new Set(t.owners),distance:t.distance,expandedLabelCount:e}},Nlo=t=\u003e{for(;;){const e=t.pop();if(e===null)return null;if(e.active)return e}},X4t=(t,e)=\u003e{G4t(t,e),e\u0026\u0026(e.MAX_RIPS!==void 0\u0026\u0026(t.MAX_RIPS=e.MAX_RIPS),e.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT!==void 0\u0026\u0026(t.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT=e.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT),e.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST!==void 0\u0026\u0026(t.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST=e.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST))},Z4t=t=\u003et.map(e=\u003ee.map(([n,o,i])=\u003e[n,o,i])),Rlo=t=\u003e({netIds:new Int32Array(t.netIds),lesserAngles:new Int32Array(t.lesserAngles),greaterAngles:new Int32Array(t.greaterAngles),layerMasks:new Int32Array(t.layerMasks),existingCrossingLayerIntersections:t.existingCrossingLayerIntersections,existingSameLayerIntersections:t.existingSameLayerIntersections,existingEntryExitLayerChanges:t.existingEntryExitLayerChanges,existingRegionCost:t.existingRegionCost,existingSegmentCount:t.existingSegmentCount}),sSe=t=\u003e({portAssignment:new Int32Array(t.portAssignment),regionSegments:Z4t(t.regionSegments),regionIntersectionCaches:t.regionIntersectionCaches.map(Rlo)}),aSe=(t,e)=\u003e{const n=sSe(e);t.state.portAssignment=n.portAssignment,t.state.regionSegments=n.regionSegments,t.state.regionIntersectionCaches=n.regionIntersectionCaches},eBt=t=\u003e{let e=0,n=0;for(let o=0;o\u003ct.length;o++){const i=t[o]?.existingRegionCost??0;e=Math.max(e,i),n+=i}return{maxRegionCost:e,totalRegionCost:n}},tBt=(t,e)=\u003et.maxRegionCost!==e.maxRegionCost?t.maxRegionCost-e.maxRegionCost:t.totalRegionCost-e.totalRegionCost,Tlo=(t,e,n)=\u003e{const o=t.incidentPortRegion[e]??[],i=t.incidentPortRegion[n]??[],r=o.find(s=\u003ei.includes(s));if(r===void 0)throw new Error(`Ports ${e} and ${n} do not share a region`);return r},nBt=(t,e,n,o)=\u003e{const i=n.solvedRoutePathSegments[o]??[],r=n.solvedRoutePathRegionIds?.[o]??[],s=e.routeStartPort[o],a=e.routeEndPort[o];if(i.length===0){if(s===a)return{orderedPortIds:[s],orderedRegionIds:[]};throw new Error(`Route ${o} does not have an existing solved path`)}const A=new Map;i.forEach(([d,p],m)=\u003e{const _={segmentIndex:m,fromPortId:d,toPortId:p,regionId:r[m]},f=A.get(d)??[];f.push(_),A.set(d,f);const I=A.get(p)??[];I.push(_),A.set(p,I)});const c=[s],l=[],u=new Set;let g,h=s;for(;h!==a;){const d=(A.get(h)??[]).filter(({segmentIndex:_,fromPortId:f,toPortId:I})=\u003eu.has(_)?!1:(f===h?I:f)!==g);if(d.length!==1)throw new Error(`Route ${o} is not a single ordered path from ${s} to ${a}`);const p=d[0],m=p.fromPortId===h?p.toPortId:p.fromPortId;u.add(p.segmentIndex),l.push(p.regionId??Tlo(t,p.fromPortId,p.toPortId)),c.push(m),g=h,h=m}if(u.size!==i.length)throw new Error(`Route ${o} contains disconnected solved segments`);return{orderedPortIds:c,orderedRegionIds:l}},oBt=(t,e,n,o)=\u003e{const i=new Bv(t,e,o);return((r,s)=\u003e{r.state.portAssignment.fill(-1),r.state.regionSegments=Array.from({length:r.topology.regionCount},()=\u003e[]),r.state.regionIntersectionCaches=Array.from({length:r.topology.regionCount},()=\u003eaW()),r.state.currentRouteId=void 0,r.state.currentRouteNetId=void 0,r.state.unroutedRoutes=[],r.state.candidateQueue.clear(),r.resetCandidateBestCosts(),r.state.goalPortId=-1,r.state.ripCount=0,r.state.regionCongestionCost.fill(0);for(let a=0;a\u003cs.length;a++)for(const[A,c,l]of s[a]??[])r.state.currentRouteNetId=r.problem.routeNet[A],r.state.regionSegments[a].push([A,c,l]),r.state.portAssignment[c]=r.state.currentRouteNetId,r.state.portAssignment[l]=r.state.currentRouteNetId,r.appendSegmentToRegionCache(a,c,l);r.state.currentRouteId=void 0,r.state.currentRouteNetId=void 0,r.solved=!0,r.failed=!1,r.error=null})(i,n),i},iBt=(t,e,n)=\u003e{const o=new Int32Array(e.routeStartPort),i=new Int32Array(e.routeEndPort),r=Array.from({length:e.routeCount},(a,A)=\u003e({routeId:A,fixedSegments:[]})),s=[];for(let a=0;a\u003ce.routeCount;a++){const A=r[a],{orderedPortIds:c,orderedRegionIds:l}=nBt(t,e,n,a),u=[];let g;for(let m=0;m\u003cc.length;m++){const _=c[m],f=e.portSectionMask[_]===1;f\u0026\u0026g===void 0?g=m:f||g===void 0||(u.push({startIndex:g,endIndex:m-1}),g=void 0)}if(g!==void 0\u0026\u0026u.push({startIndex:g,endIndex:c.length-1}),u.length===0){for(let m=1;m\u003cc.length;m++)A.fixedSegments.push({regionId:l[m-1],fromPortId:c[m-1],toPortId:c[m]});continue}if(u.length\u003e1)throw new Error(`Route ${a} enters the section multiple times; only one contiguous section span is currently supported`);const h=u[0],d=Math.max(0,h.startIndex-1),p=Math.min(c.length-1,h.endIndex+1);if(p\u003c=d)throw new Error(`Route ${a} does not have a valid section span`);for(let m=1;m\u003c=d;m++)A.fixedSegments.push({regionId:l[m-1],fromPortId:c[m-1],toPortId:c[m]});for(let m=p+1;m\u003cc.length;m++)A.fixedSegments.push({regionId:l[m-1],fromPortId:c[m-1],toPortId:c[m]});A.activeStartPortId=c[d],A.activeEndPortId=c[p],A.forcedStartRegionId=l[d],o[a]=A.activeStartPortId,i[a]=A.activeEndPortId,s.push(a)}return{sectionProblem:{routeCount:e.routeCount,portSectionMask:new Int8Array(e.portSectionMask),routeMetadata:e.routeMetadata,routeStartPort:o,routeEndPort:i,routeNet:new Int32Array(e.routeNet),regionNetId:new Int32Array(e.regionNetId),portPenalty:e.portPenalty===void 0?void 0:new Float64Array(e.portPenalty)},routePlans:r,activeRouteIds:s}},klo=(t,e,n)=\u003eiBt(t,e,n).activeRouteIds,Flo=class extends Bv{constructor(t,e,n,o,i,r,s,a){super(t,e,a),this.routePlans=n,this.activeRouteIds=o,this.mutableRegionIds=i,this.immutableRegionSummary=r,this.baselineSummary=s,X4t(this,a),this.state.unroutedRoutes=[...o],this.applyFixedSegments(),this.fixedSnapshot=sSe({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches})}routePlans;activeRouteIds;mutableRegionIds;immutableRegionSummary;baselineSummary;bestSnapshot;fixedSnapshot;bestSummary;baselineBeatRipCount;previousBestMaxRegionCost=Number.POSITIVE_INFINITY;ripsSinceBestMaxRegionCostImprovement=0;MAX_RIPS=Number.POSITIVE_INFINITY;MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT=Number.POSITIVE_INFINITY;EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST=Number.POSITIVE_INFINITY;applyFixedSegments(){for(const t of this.routePlans)for(const{regionId:e,fromPortId:n,toPortId:o}of t.fixedSegments)this.state.currentRouteNetId=this.problem.routeNet[t.routeId],this.state.regionSegments[e].push([t.routeId,n,o]),this.state.portAssignment[n]=this.state.currentRouteNetId,this.state.portAssignment[o]=this.state.currentRouteNetId,this.appendSegmentToRegionCache(e,n,o);this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0}captureBestState(t){this.bestSummary\u0026\u0026tBt(t,this.bestSummary)\u003e=0||(this.bestSummary=t,this.bestSnapshot=sSe({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches}))}restoreBestState(){this.bestSnapshot\u0026\u0026(aSe(this,this.bestSnapshot),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=[],this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1)}getStartingNextRegionId(t,e){const n=this.routePlans[t]?.forcedStartRegionId;return n!==void 0?n:super.getStartingNextRegionId(t,e)}resetRoutingStateForRerip(){if(!this.fixedSnapshot)return super.resetRoutingStateForRerip(),this.state.unroutedRoutes=wAe([...this.activeRouteIds],this.state.ripCount),void this.applyFixedSegments();aSe(this,this.fixedSnapshot),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=wAe([...this.activeRouteIds],this.state.ripCount),this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1}onAllRoutesRouted(){const{state:t}=this,e=Math.min(this.MAX_RIPS,this.RIP_THRESHOLD_RAMP_ATTEMPTS),n=e\u003c=0?1:Math.min(1,t.ripCount/e),o=this.RIP_THRESHOLD_START+(this.RIP_THRESHOLD_END-this.RIP_THRESHOLD_START)*n,i=[],r=new Float64Array(this.mutableRegionIds.length);let s=0,a=0;for(let u=0;u\u003cthis.mutableRegionIds.length;u++){const g=this.mutableRegionIds[u],h=t.regionIntersectionCaches[g]?.existingRegionCost??0;r[u]=h,s=Math.max(s,h),a+=h,h\u003eo\u0026\u0026i.push(g)}const A=Math.max(this.immutableRegionSummary.maxRegionCost,s),c=this.immutableRegionSummary.totalRegionCost+a;this.captureBestState({maxRegionCost:A,totalRegionCost:c});const l=this.bestSummary??{maxRegionCost:A,totalRegionCost:c};if(l.maxRegionCost\u003cthis.previousBestMaxRegionCost-Number.EPSILON?(this.previousBestMaxRegionCost=l.maxRegionCost,this.ripsSinceBestMaxRegionCostImprovement=0):this.ripsSinceBestMaxRegionCostImprovement+=1,this.baselineBeatRipCount===void 0\u0026\u0026l.maxRegionCost\u003cthis.baselineSummary.maxRegionCost-Number.EPSILON\u0026\u0026(this.baselineBeatRipCount=t.ripCount),this.stats={...this.stats,activeRouteCount:this.activeRouteIds.length,currentRipThreshold:o,hotRegionCount:i.length,maxRegionCost:A,totalRegionCost:c,bestMaxRegionCost:l.maxRegionCost,bestTotalRegionCost:l.totalRegionCost,ripCount:t.ripCount},i.length===0||t.ripCount\u003e=e||this.ripsSinceBestMaxRegionCostImprovement\u003e=this.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT||this.baselineBeatRipCount!==void 0\u0026\u0026t.ripCount-this.baselineBeatRipCount\u003e=this.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST)return this.restoreBestState(),void(this.solved=!0);for(let u=0;u\u003cthis.mutableRegionIds.length;u++){const g=this.mutableRegionIds[u];t.regionCongestionCost[g]+=r[u]*this.RIP_CONGESTION_REGION_COST_FACTOR}t.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:t.ripCount,reripRegionCount:i.length}}onOutOfCandidates(){const{state:t}=this;for(const e of this.mutableRegionIds){const n=t.regionIntersectionCaches[e]?.existingRegionCost??0;t.regionCongestionCost[e]+=n*this.RIP_CONGESTION_REGION_COST_FACTOR}t.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:t.ripCount,reripReason:\"out_of_candidates\"}}tryFinalAcceptance(){if(this.bestSnapshot)return this.restoreBestState(),void(this.solved=!0);this.fixedSnapshot\u0026\u0026aSe(this,this.fixedSnapshot),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=[...this.activeRouteIds],this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1,this.stats={...this.stats,acceptedFixedSectionStateOnTimeout:!0},this.solved=!0}visualize(){return NAe(this,{highlightSectionMask:!0,showInitialRouteHints:!1,showOnlySectionPortsOnIdle:!0})}},lW=class extends zA{constructor(t,e,n,o){super(),this.topology=t,this.problem=e,this.initialSolution=n,X4t(this,o),this.baselineSolver=((i,r,s,a)=\u003e{const A=Array.from({length:i.regionCount},()=\u003e[]);for(let c=0;c\u003cr.routeCount;c++){const{orderedPortIds:l,orderedRegionIds:u}=nBt(i,r,s,c);for(let g=1;g\u003cl.length;g++){const h=l[g-1],d=l[g];A[u[g-1]].push([c,h,d])}}return oBt(i,r,A,a)})(t,e,n,RAe(this)),this.baselineSummary=eBt(this.baselineSolver.state.regionIntersectionCaches),this.sectionRegionIds=((i,r)=\u003e{const s=new Set;for(let a=0;a\u003cr.portSectionMask.length;a++)if(r.portSectionMask[a]===1)for(const A of i.incidentPortRegion[a]??[])s.add(A);return[...s]})(t,e),this.sectionBaselineSummary=((i,r)=\u003e{let s=0,a=0;for(const A of r){const c=i[A]?.existingRegionCost??0;s=Math.max(s,c),a+=c}return{maxRegionCost:s,totalRegionCost:a}})(this.baselineSolver.state.regionIntersectionCaches,this.sectionRegionIds),this.outsideSectionBaselineSummary=((i,r)=\u003e{const s=new Set(r);let a=0,A=0;for(let c=0;c\u003ci.length;c++){if(s.has(c))continue;const l=i[c]?.existingRegionCost??0;a=Math.max(a,l),A+=l}return{maxRegionCost:a,totalRegionCost:A}})(this.baselineSolver.state.regionIntersectionCaches,this.sectionRegionIds),this.applySectionRipPolicy()}topology;problem;initialSolution;baselineSolver;baselineSummary;sectionBaselineSummary;outsideSectionBaselineSummary;sectionRegionIds;optimizedSolver;sectionSolver;activeRouteIds=[];DISTANCE_TO_COST=.05;minViaPadDiameter=d4t;VERBOSE=!1;RIP_THRESHOLD_START=.05;RIP_THRESHOLD_END=.8;RIP_THRESHOLD_RAMP_ATTEMPTS=50;MAX_RIPS=Number.POSITIVE_INFINITY;MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT=10;EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST=10;RIP_CONGESTION_REGION_COST_FACTOR=.1;MAX_ITERATIONS=1e6;STATIC_REACHABILITY_PRECHECK=!1;STATIC_REACHABILITY_PRECHECK_MAX_HOPS=16;ACCEPT_BEST_SOLUTION_ON_TIMEOUT=!0;GREEDY_FINAL_ROUTE_ITERS=4;applySectionRipPolicy(){this.RIP_THRESHOLD_START=.05,this.RIP_THRESHOLD_END=Math.max(this.RIP_THRESHOLD_START,this.sectionBaselineSummary.maxRegionCost),this.MAX_RIPS=Math.min(this.MAX_RIPS,20)}_setup(){this.applySectionRipPolicy();const{sectionProblem:t,routePlans:e,activeRouteIds:n}=iBt(this.topology,this.problem,this.initialSolution);if(this.activeRouteIds=n,n.length===0)return this.optimizedSolver=this.baselineSolver,this.stats={...this.stats,activeRouteCount:0,initialMaxRegionCost:this.baselineSummary.maxRegionCost,finalMaxRegionCost:this.baselineSummary.maxRegionCost,optimized:!1},void(this.solved=!0);var o;this.sectionSolver=new Flo(this.topology,t,e,n,this.sectionRegionIds,this.outsideSectionBaselineSummary,this.baselineSummary,{...RAe(o=this),MAX_RIPS:o.MAX_RIPS,MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT:o.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT,EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST:o.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST}),this.activeSubSolver=this.sectionSolver,this.stats={...this.stats,sectionBaselineMaxRegionCost:this.sectionBaselineSummary.maxRegionCost,sectionBaselineTotalRegionCost:this.sectionBaselineSummary.totalRegionCost,effectiveRipThresholdStart:this.RIP_THRESHOLD_START,effectiveRipThresholdEnd:this.RIP_THRESHOLD_END,effectiveMaxRips:this.MAX_RIPS}}_step(){if(!this.sectionSolver)return void(this.solved=!0);if(this.sectionSolver.step(),this.stats={...this.stats,...this.sectionSolver.stats,activeRouteCount:this.activeRouteIds.length},this.sectionSolver.failed)return this.optimizedSolver=this.baselineSolver,this.stats={...this.stats,initialMaxRegionCost:this.baselineSummary.maxRegionCost,initialTotalRegionCost:this.baselineSummary.totalRegionCost,finalMaxRegionCost:this.baselineSummary.maxRegionCost,finalTotalRegionCost:this.baselineSummary.totalRegionCost,optimized:!1,sectionSearchFailedFallbackToBaseline:!0,sectionSearchError:this.sectionSolver.error},void(this.solved=!0);if(!this.sectionSolver.solved)return;const t=oBt(this.topology,this.problem,Z4t(this.sectionSolver.state.regionSegments),RAe(this)),e=eBt(t.state.regionIntersectionCaches),n=tBt(e,this.baselineSummary)\u003c0;this.optimizedSolver=n?t:this.baselineSolver;const o=n?e:this.baselineSummary;this.stats={...this.stats,initialMaxRegionCost:this.baselineSummary.maxRegionCost,initialTotalRegionCost:this.baselineSummary.totalRegionCost,candidateMaxRegionCost:e.maxRegionCost,candidateTotalRegionCost:e.totalRegionCost,finalMaxRegionCost:o.maxRegionCost,finalTotalRegionCost:o.totalRegionCost,optimized:n},this.solved=!0}tryFinalAcceptance(){this.optimizedSolver=this.baselineSolver,this.stats={...this.stats,initialMaxRegionCost:this.baselineSummary.maxRegionCost,initialTotalRegionCost:this.baselineSummary.totalRegionCost,finalMaxRegionCost:this.baselineSummary.maxRegionCost,finalTotalRegionCost:this.baselineSummary.totalRegionCost,optimized:!1,sectionSolverTimeoutFallbackToBaseline:!0},this.solved=!0,this.failed=!1,this.error=null}getSolvedSolver(){if(!this.solved||this.failed||!this.optimizedSolver)throw new Error(\"TinyHyperGraphSectionSolver does not have a solved output yet\");return this.optimizedSolver}visualize(){return this.optimizedSolver?NAe(this.optimizedSolver,{highlightSectionMask:!0}):this.sectionSolver?this.sectionSolver.visualize():NAe(this.baselineSolver,{highlightSectionMask:!0,showInitialRouteHints:!1,showOnlySectionPortsOnIdle:!0})}getOutput(){return this.getSolvedSolver().getOutput()}},Llo=[\"self-touch\",\"onehop-all\",\"onehop-touch\",\"twohop-all\",\"twohop-touch\"],Hlo={\"self-all\":0,\"self-touch\":0,\"onehop-all\":1,\"onehop-touch\":1,\"twohop-all\":2,\"twohop-touch\":2,\"threehop-all\":3,\"threehop-touch\":3,\"fourhop-all\":4,\"fourhop-touch\":4},Olo=(t,e)=\u003e{const n=new Set(e);for(const o of e)for(const i of t.regionIncidentPorts[o]??[])for(const r of t.incidentPortRegion[i]??[])n.add(r);return[...n]},Glo=(t,e,n)=\u003e{let o=[...new Set(e)];for(let i=0;i\u003cn;i+=1)o=Olo(t,o);return o},Ylo=(t,e,n)=\u003ee.flatMap(o=\u003en.map(i=\u003e((r,s,a)=\u003e({label:`hot-${s}-${a}`,family:a,regionIds:Glo(r,[s],Hlo[a]),portSelectionRule:a.endsWith(\"-all\")?\"all-incident-regions-selected\":\"touches-selected-region\"}))(t,o,i))),Ulo={RIP_THRESHOLD_RAMP_ATTEMPTS:5},Klo={DISTANCE_TO_COST:.05,RIP_THRESHOLD_RAMP_ATTEMPTS:16,RIP_CONGESTION_REGION_COST_FACTOR:.1,MAX_ITERATIONS:5e4,MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT:6,EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST:Number.POSITIVE_INFINITY},ASe=t=\u003et.state.regionIntersectionCaches.reduce((e,n)=\u003eMath.max(e,n.existingRegionCost),0),Vlo=(t,e)=\u003e{const n=iSe(t),o=new lW(n.topology,n.problem,n.solution,e);return ASe(o.baselineSolver)},zlo=(t,e,n)=\u003e{const o=new Set(e);return Int8Array.from({length:t.portCount},(i,r)=\u003e{const s=t.incidentPortRegion[r]??[];return n===\"touches-selected-region\"?s.some(a=\u003eo.has(a))?1:0:s.length\u003e0\u0026\u0026s.every(a=\u003eo.has(a))?1:0})},Jlo=(t,e)=\u003e({routeCount:t.routeCount,portSectionMask:e,routeMetadata:t.routeMetadata,routeStartPort:new Int32Array(t.routeStartPort),routeEndPort:new Int32Array(t.routeEndPort),routeNet:new Int32Array(t.routeNet),regionNetId:new Int32Array(t.regionNetId),portPenalty:t.portPenalty===void 0?void 0:new Float64Array(t.portPenalty)}),Wlo=(t,e,n,o,i,r)=\u003e{const s=performance.now(),a=performance.now(),A=new lW(e,n,o,r),c=ASe(A.baselineSolver),l=performance.now()-a;let u,g,h=c,d=new Int8Array(e.portCount),p=0,m=0,_=0,f=0,I=0,C=0,y=0;const x=new Set,E=i?.maxHotRegions??r.MAX_HOT_REGIONS??2;for(const B of((S,Q,w,M)=\u003e{const k=S.state.regionIntersectionCaches.map((R,F)=\u003e({regionId:F,regionCost:R.existingRegionCost})).filter(({regionCost:R})=\u003eR\u003e0).sort((R,F)=\u003eF.regionCost-R.regionCost).slice(0,w).map(({regionId:R})=\u003eR);return Ylo(Q,k,M)})(t,e,E,i?.candidateFamilies??[...Llo])){const S=Jlo(n,zlo(e,B.regionIds,B.portSelectionRule));p+=1;const Q=S.portSectionMask.join(\",\");if(x.has(Q))_+=1;else{x.add(Q);try{const w=performance.now(),M=klo(e,S,o);if(f+=performance.now()-w,M.length===0)continue;m+=1;const k=performance.now(),R=new lW(e,S,o,r);I+=performance.now()-k;const F=performance.now();if(R.solve(),C+=performance.now()-F,R.failed||!R.solved)continue;if(Number(R.stats.finalMaxRegionCost??ASe(R.getSolvedSolver()))\u003ch-1e-9){const O=performance.now(),U=Vlo(R.getOutput(),r);y+=performance.now()-O,U\u003ch-1e-9\u0026\u0026(h=U,d=new Int8Array(S.portSectionMask),u=B.label,g=B.family)}}catch{}}}return{portSectionMask:d,baselineMaxRegionCost:c,finalMaxRegionCost:h,generatedCandidateCount:p,candidateCount:m,duplicateCandidateCount:_,totalMs:performance.now()-s,baselineEvaluationMs:l,candidateEligibilityMs:f,candidateInitMs:I,candidateSolveMs:C,candidateReplayScoreMs:y,winningCandidateLabel:u,winningCandidateFamily:g}},jlo=class extends n7{initialVisualizationSolver;selectedSectionMask;selectedSectionCandidateLabel;selectedSectionCandidateFamily;constructor(t){super(t),this.MAX_ITERATIONS=2e5}loadHyperGraph(t){return iSe(t)}getSolveGraphOptions(){return{...Ulo,...this.inputProblem.minViaPadDiameter===void 0?{}:{minViaPadDiameter:this.inputProblem.minViaPadDiameter},...this.inputProblem.solveGraphOptions}}getSectionSolverOptions(){return{...Klo,...this.inputProblem.minViaPadDiameter===void 0?{}:{minViaPadDiameter:this.inputProblem.minViaPadDiameter},...this.inputProblem.sectionSolverOptions}}pipelineDef=[{solverName:\"solveGraph\",solverClass:Bv,getConstructorParams:t=\u003e{const{topology:e,problem:n}=t.loadHyperGraph(t.inputProblem.serializedHyperGraph);return[e,n,t.getSolveGraphOptions()]}},{solverName:\"optimizeSection\",solverClass:lW,getConstructorParams:t=\u003et.getSectionStageParams()}];getSectionStageParams(){const t=this.getStageOutput(\"solveGraph\");if(!t)throw new Error(\"solveGraph did not produce a solved serialized hypergraph\");const e=this.getSolver(\"solveGraph\");if(!e)throw new Error(\"solveGraph solver is unavailable\");const n=this.getSectionSolverOptions(),{topology:o,problem:i,solution:r}=this.loadHyperGraph(t),s=this.inputProblem.createSectionMask?this.inputProblem.createSectionMask({serializedHyperGraph:this.inputProblem.serializedHyperGraph,solvedSerializedHyperGraph:t,solvedSolver:e,topology:o,problem:i,solution:r}):(()=\u003e{const a=Wlo(e,o,i,r,this.inputProblem.sectionSearchConfig,n);return this.selectedSectionCandidateLabel=a.winningCandidateLabel,this.selectedSectionCandidateFamily=a.winningCandidateFamily,this.stats={...this.stats,sectionSearchGeneratedCandidateCount:a.generatedCandidateCount,sectionSearchCandidateCount:a.candidateCount,sectionSearchDuplicateCandidateCount:a.duplicateCandidateCount,sectionSearchBaselineMaxRegionCost:a.baselineMaxRegionCost,sectionSearchFinalMaxRegionCost:a.finalMaxRegionCost,sectionSearchDelta:a.baselineMaxRegionCost-a.finalMaxRegionCost,selectedSectionCandidateLabel:a.winningCandidateLabel??null,selectedSectionCandidateFamily:a.winningCandidateFamily??null,sectionSearchMs:a.totalMs,sectionSearchBaselineEvaluationMs:a.baselineEvaluationMs,sectionSearchCandidateEligibilityMs:a.candidateEligibilityMs,sectionSearchCandidateInitMs:a.candidateInitMs,sectionSearchCandidateSolveMs:a.candidateSolveMs,sectionSearchCandidateReplayScoreMs:a.candidateReplayScoreMs},a.portSectionMask})();return this.selectedSectionMask=new Int8Array(s),i.portSectionMask=new Int8Array(s),this.stats={...this.stats,sectionMaskPortCount:[...s].filter(a=\u003ea===1).length},[o,i,r,n]}getInitialVisualizationSolver(){if(!this.initialVisualizationSolver){const{topology:t,problem:e}=this.loadHyperGraph(this.inputProblem.serializedHyperGraph);this.initialVisualizationSolver=new Bv(t,e,this.getSolveGraphOptions())}return this.initialVisualizationSolver}initialVisualize(){return this.getInitialVisualizationSolver().visualize()}visualize(){return this.iterations===0?this.initialVisualize()??super.visualize():super.visualize()}getOutput(){return this.getStageOutput(\"optimizeSection\")??this.getStageOutput(\"solveGraph\")??null}tryFinalAcceptance(){this.getStageOutput(\"solveGraph\")\u0026\u0026(this.stats={...this.stats,acceptedSolveGraphOutputOnSectionPipelineTimeout:!0},this.activeSubSolver=void 0,this.solved=!0,this.failed=!1,this.error=null)}},$lo=class extends Ilo{failedOwnerPairCounts=new Map;selectiveReripStats={selectiveRipCount:0,selectivelyRippedRouteCount:0,globalReripCount:0,alternateBlockerSearchCount:0,alternateOwnerCount:0,failedOwnerPairCount:0,maxFailedOwnerPairCount:0,failedOwnerPairs:[],lastDirectOwnerRouteIds:[],lastRepeatedOwnerRouteIds:[],lastAlternateOwnerRouteIds:[],lastRippedRouteIds:[],lastRelaxedSearchExpandedLabelCount:0,lastAlternateSearchExpandedLabelCount:0};selectiveReripCongestionUpdateCount=0;constructor(t,e,n){super(t,e,n)}getSelectiveReripStats(){return{...this.selectiveReripStats,failedOwnerPairs:this.selectiveReripStats.failedOwnerPairs.map(t=\u003e({...t})),lastDirectOwnerRouteIds:[...this.selectiveReripStats.lastDirectOwnerRouteIds],lastRepeatedOwnerRouteIds:[...this.selectiveReripStats.lastRepeatedOwnerRouteIds],lastAlternateOwnerRouteIds:[...this.selectiveReripStats.lastAlternateOwnerRouteIds],lastRippedRouteIds:[...this.selectiveReripStats.lastRippedRouteIds]}}onOutOfCandidates(){const t=this.state.currentRouteId;if(t===void 0)throw new Error(\"SelectiveReripTinyHyperGraphSolver: candidate search exhausted without a current route\");const e=this.findRelaxedBlockerPathPreferringPreservedRoutes();if(!e.found||e.owners.size===0)return this.selectiveReripStats.globalReripCount+=1,this.selectiveReripStats.globalReripReason=e.found?\"no_blocker_path\":e.reason,this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=[],this.selectiveReripStats.lastRepeatedOwnerRouteIds=[],this.selectiveReripStats.lastAlternateOwnerRouteIds=[],this.selectiveReripStats.lastRippedRouteIds=[],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=0,super.onOutOfCandidates(),void this.publishSelectiveReripStats();const n=[...e.owners],o=[];for(const A of n)this.incrementFailedOwnerPair(t,A)\u003e=2\u0026\u0026o.push(A);if(n.some(A=\u003ethis.hasFailedOwnerPath(A,t)))return this.selectiveReripStats.globalReripCount+=1,this.selectiveReripStats.globalReripReason=\"failed_owner_cycle\",this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=n,this.selectiveReripStats.lastRepeatedOwnerRouteIds=o,this.selectiveReripStats.lastAlternateOwnerRouteIds=[],this.selectiveReripStats.lastRippedRouteIds=[],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=0,this.failedOwnerPairCounts.clear(),super.onOutOfCandidates(),void this.publishSelectiveReripStats();let i;if(o.length\u003e0\u0026\u0026(this.selectiveReripStats.alternateBlockerSearchCount+=1,i=this.findRelaxedBlockerPathPreferringPreservedRoutes(new Set(o)),!i.found))return this.selectiveReripStats.globalReripCount+=1,this.selectiveReripStats.globalReripReason=i.reason,this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=n,this.selectiveReripStats.lastRepeatedOwnerRouteIds=o,this.selectiveReripStats.lastAlternateOwnerRouteIds=[],this.selectiveReripStats.lastRippedRouteIds=[],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=i.expandedLabelCount,super.onOutOfCandidates(),void this.publishSelectiveReripStats();const r=i?.found?[...i.owners]:void 0,s=(function(A){const c=new Set(A.alternateOwnerRouteIds??A.directOwnerRouteIds);if(c.delete(A.failedRouteId),c.size===0)throw new Error(`SelectiveReripTinyHyperGraphSolver: route ${A.failedRouteId} has blocker resources but no distinct committed owner can be reripped`);return c})({failedRouteId:t,directOwnerRouteIds:n,alternateOwnerRouteIds:r});this.clearPartialRipPlans(s);const a=(r??[]).filter(A=\u003e!e.owners.has(A));this.selectiveReripCongestionUpdateCount\u003c1\u0026\u0026(this.addCongestionCostForSelectiveRerip(),this.selectiveReripCongestionUpdateCount+=1),this.rebuildCommittedState(s),this.state.ripCount+=1,this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=(function(A){const c=A.pendingRouteIds.filter(u=\u003eu!==A.failedRouteId\u0026\u0026!A.rippedRouteIds.has(u)),l=[...A.rippedRouteIds].filter(u=\u003eu!==A.failedRouteId);return[A.failedRouteId,...c,...l]})({failedRouteId:t,pendingRouteIds:this.state.unroutedRoutes,rippedRouteIds:s}),this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1,this.selectiveReripStats.selectiveRipCount+=1,this.selectiveReripStats.selectivelyRippedRouteCount+=s.size,this.selectiveReripStats.alternateOwnerCount+=a.length,this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=n,this.selectiveReripStats.lastRepeatedOwnerRouteIds=o,this.selectiveReripStats.lastAlternateOwnerRouteIds=a,this.selectiveReripStats.lastRippedRouteIds=[...s],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=i?.expandedLabelCount??0,this.publishSelectiveReripStats()}addCongestionCostForSelectiveRerip(){for(let t=0;t\u003cthis.topology.regionCount;t++){const e=this.state.regionIntersectionCaches[t]?.existingRegionCost??0;this.state.regionCongestionCost[t]+=e*this.RIP_CONGESTION_REGION_COST_FACTOR}}findRelaxedBlockerPath(t=new Set){const e=this.state.currentRouteId,n=this.state.currentRouteNetId;if(e===void 0||n===void 0)throw new Error(\"SelectiveReripTinyHyperGraphSolver: blocker search requires a current route and net\");const o=this.getRouteStartPortId(e),i=this.getRouteEndPortId(e),r=this.getStartingNextRegionId(e,o);if(r===void 0)throw new Error(`SelectiveReripTinyHyperGraphSolver: route ${this.describeRoute(e)} has no starting region for blocker search`);const s=this.getPortOwners();return(a=\u003e{const A=a.maxExpandedLabels??Number.POSITIVE_INFINITY;if(A!==Number.POSITIVE_INFINITY\u0026\u0026(!Number.isInteger(A)||A\u003c0))throw new Error(\"maxExpandedLabels must be a non-negative integer\");const c=new Map,l=new Mlo;let u=0,g=0;const h={state:a.start,stateKey:a.getStateKey(a.start),owners:new Set,distance:0,parent:null,incomingHop:null,queueOrder:u++,active:!0};for(c.set(h.stateKey,[h]),l.push(h);;){const d=Nlo(l);if(d===null)return{found:!1,reason:\"no_path\",expandedLabelCount:g};if(a.isGoal(d.state))return Dlo(d,g);if(g\u003e=A)return{found:!1,reason:\"expansion_limit\",expandedLabelCount:g};g++;for(const p of a.getHops(d.state)){if(!Number.isFinite(p.distance)||p.distance\u003c0)throw new Error(\"Distinct-owner blocker hops require finite distances \u003e= 0\");const m=new Set(d.owners);for(const y of p.owners??[])m.add(y);const _=d.distance+p.distance;if(!Number.isFinite(_))throw new Error(\"Distinct-owner blocker path distance overflowed\");const f={state:p.state,stateKey:a.getStateKey(p.state),owners:m,distance:_,parent:d,incomingHop:p,queueOrder:u++,active:!0},I=c.get(f.stateKey)??[];if(I.some(y=\u003eq4t(y,f)))continue;const C=[];for(const y of I)q4t(f,y)?y.active=!1:C.push(y);C.push(f),c.set(f.stateKey,C),l.push(f)}}})({start:{portId:o,nextRegionId:r},getStateKey:({portId:a,nextRegionId:A})=\u003ethis.getHopId(a,A),isGoal:({portId:a})=\u003ea===i,getHops:a=\u003ethis.getRelaxedSearchHops({state:a,goalPortId:i,routeNetId:n,portOwners:s,forbiddenOwnerRouteIds:t}),maxExpandedLabels:this.getRelaxedSearchExpansionLimit()})}findRelaxedBlockerPathPreferringPreservedRoutes(t=new Set){const e=this.getRouteIdsPreferredForPreservation();if(e.size===0)return this.findRelaxedBlockerPath(t);const n=new Set(t);for(const i of e)n.add(i);const o=this.findRelaxedBlockerPath(n);return o.found\u0026\u0026o.owners.size\u003e0?o:this.findRelaxedBlockerPath(t)}getRelaxedSearchExpansionLimit(){let t=0;for(const n of this.topology.incidentPortRegion)t+=n.length;const e=Math.max(4,Math.ceil(Math.log2(this.problem.routeCount+1)));return Math.max(4096,t*e*4)}getRelaxedSearchHops(t){const{state:e,goalPortId:n,routeNetId:o}=t;if(this.isRegionReservedForDifferentNet(e.nextRegionId))return[];const i=[];for(const r of this.topology.regionIncidentPorts[e.nextRegionId]??[]){if(r===e.portId||this.isPortReservedForDifferentNet(r)||r!==n\u0026\u0026this.problem.portSectionMask[r]===0)continue;const s=this.getHopBlockerResources({regionId:e.nextRegionId,fromPortId:e.portId,toPortId:r,routeNetId:o,portOwners:t.portOwners}),a=[...new Set(s.flatMap(c=\u003ec.owners))];if(a.some(c=\u003et.forbiddenOwnerRouteIds.has(c)))continue;let A=e.nextRegionId;if(r!==n){const[c,l]=this.topology.incidentPortRegion[r]??[];if(A=c===e.nextRegionId?l:c,A===void 0||this.isRegionReservedForDifferentNet(A))continue}i.push({state:{portId:r,nextRegionId:A},distance:Math.hypot(this.topology.portX[e.portId]-this.topology.portX[r],this.topology.portY[e.portId]-this.topology.portY[r]),owners:a,data:{resources:s}})}return i}getHopBlockerResources(t){const e=[],n=this.state.portAssignment[t.toPortId];if(n!==-1\u0026\u0026n!==t.routeNetId){const i=[...t.portOwners.get(t.toPortId)??new Set].filter(r=\u003ethis.problem.routeNet[r]!==t.routeNetId);if(i.length===0)throw new Error(`SelectiveReripTinyHyperGraphSolver: port ${t.toPortId} is assigned to foreign net ${n} without a committed route owner`);e.push({kind:\"port\",portId:t.toPortId,owners:i})}const o=this.getHardBlockedCrossingOwners(t.regionId,t.fromPortId,t.toPortId);return o.length\u003e0\u0026\u0026e.push({kind:\"same_layer_intersection\",regionId:t.regionId,fromPortId:t.fromPortId,toPortId:t.toPortId,owners:o}),e}getPortOwners(){const t=new Map;for(const e of this.state.regionSegments)for(const[n,o,i]of e)for(const r of[o,i]){const s=t.get(r)??new Set;s.add(n),t.set(r,s)}return t}getHardBlockedCrossingOwners(t,e,n){if(!this.isKnownSingleLayerRegion(t))return[];const o=this.state.currentRouteNetId;if(o===void 0)throw new Error(\"SelectiveReripTinyHyperGraphSolver: crossing ownership requires a current route net\");const i=new Set;for(const[r,s,a]of this.state.regionSegments[t]??[])this.problem.routeNet[r]!==o\u0026\u0026this.segmentsCrossOnSameLayer(t,e,n,s,a)\u0026\u0026i.add(r);return[...i]}segmentsCrossOnSameLayer(t,e,n,o,i){const r={...this.populateSegmentGeometryScratch(t,e,n)},s={...this.populateSegmentGeometryScratch(t,o,i)};return(r.layerMask\u0026s.layerMask)===0||r.lesserAngle===s.lesserAngle||r.lesserAngle===s.greaterAngle||r.greaterAngle===s.lesserAngle||r.greaterAngle===s.greaterAngle?!1:(r.lesserAngle\u003cs.lesserAngle\u0026\u0026s.lesserAngle\u003cr.greaterAngle)!=(r.lesserAngle\u003cs.greaterAngle\u0026\u0026s.greaterAngle\u003cr.greaterAngle)}rebuildCommittedState(t){this.state.regionSegments=this.state.regionSegments.map(e=\u003ee.filter(([n])=\u003e!t.has(n))),this.state.portAssignment.fill(-1),this.state.regionIntersectionCaches=Array.from({length:this.topology.regionCount},()=\u003eaW());for(let e=0;e\u003cthis.state.regionSegments.length;e++)for(const[n,o,i]of this.state.regionSegments[e]){const r=this.problem.routeNet[n];this.state.currentRouteNetId=r;for(const s of[o,i]){const a=this.state.portAssignment[s];if(a!==-1\u0026\u0026a!==r)throw new Error(`SelectiveReripTinyHyperGraphSolver: rebuilding committed routes found cross-net ownership at port ${s} between net ${a} and net ${r}`);this.state.portAssignment[s]=r}this.appendSegmentToRegionCache(e,o,i)}this.state.currentRouteNetId=void 0}incrementFailedOwnerPair(t,e){const n=this.failedOwnerPairCounts.get(t)??new Map,o=(n.get(e)??0)+1;return n.set(e,o),this.failedOwnerPairCounts.set(t,n),o}hasFailedOwnerPath(t,e){const n=[t],o=new Set;for(;n.length\u003e0;){const i=n.pop();if(i===e)return!0;o.has(i)||(o.add(i),n.push(...this.failedOwnerPairCounts.get(i)?.keys()??[]))}return!1}publishSelectiveReripStats(){const t=[];for(const[e,n]of this.failedOwnerPairCounts)for(const[o,i]of n)t.push({failedRouteId:e,ownerRouteId:o,count:i});t.sort((e,n)=\u003ee.failedRouteId-n.failedRouteId||e.ownerRouteId-n.ownerRouteId),this.selectiveReripStats.failedOwnerPairs=t,this.selectiveReripStats.failedOwnerPairCount=t.length,this.selectiveReripStats.maxFailedOwnerPairCount=Math.max(0,...t.map(({count:e})=\u003ee)),this.stats={...this.stats,...this.getSelectiveReripStats()}}describeRoute(t){const e=this.problem.routeMetadata?.[t]?.connectionId;return e===void 0?String(t):`${t} (${String(e)})`}},rBt=class extends $lo{initialAssignmentRouteIds;getRouteIdsPreferredForPreservation(){return this.initialAssignmentRouteIds||(this.initialAssignmentRouteIds=new Set((this.problem.initialAssignments??[]).map(t=\u003et.routeId))),this.initialAssignmentRouteIds}resetRoutingStateForRerip(){super.resetRoutingStateForRerip(),this.problem.initialAssignments?.length\u0026\u0026m4t({topology:this.topology,problem:this.problem,state:this.state,routeSuccessCountByRouteId:this.routeSuccessCountByRouteId,appendSegmentToRegionCache:(t,e,n)=\u003ethis.appendSegmentToRegionCache(t,e,n)})}},Sv=t=\u003e{if(typeof t!=\"object\"||t===null)return!1;const e=t,n=e.preloadedTraceSection;return typeof e.connectionId==\"string\"\u0026\u0026typeof n?.traceId==\"string\"\u0026\u0026typeof n.startRoutePosition==\"number\"\u0026\u0026typeof n.endRoutePosition==\"number\"\u0026\u0026typeof n.startPoint?.x==\"number\"\u0026\u0026typeof n.startPoint.y==\"number\"\u0026\u0026typeof n.startPoint.z==\"number\"\u0026\u0026typeof n.endPoint?.x==\"number\"\u0026\u0026typeof n.endPoint.y==\"number\"\u0026\u0026typeof n.endPoint.z==\"number\"},qlo=(t,e)=\u003e`__tscircuit_preloaded_trace__:${JSON.stringify([t,e])}`,cSe=t=\u003e[t.region1Id,t.region2Id],sBt=(t,e)=\u003e{const n=new Set(cSe(e));return cSe(t).filter(o=\u003en.has(o))},Xlo=(t,e,n)=\u003e{const o=t[e],i=t[e+1],r=sBt(o.port,i.port);if(r.length===0)return;if(r.length===1)return r[0];const s=t[e+2];if(s){const a=new Set(sBt(i.port,s.port)),A=r.find(c=\u003ea.has(c));if(A)return A}return n\u0026\u0026r.includes(n)?n:[...r].sort()[0]},aBt=(t,e)=\u003ecSe(t).find(n=\u003en!==e)??e,ABt=t=\u003e{const e=new Set((t.connections??[]).filter(Sv).map(i=\u003ei.connectionId)),n=t.ports.filter(i=\u003e(i.d?._preloadedTracePortAssignments?.length??0)\u003e0).length,o=t.regions.reduce((i,r)=\u003ei+(r.assignments??[]).filter(s=\u003ee.has(s.connectionId)).length,0);return{preloadedTraceCount:e.size,preloadedPortCount:n,preloadedAssignmentCount:o}},cBt=t=\u003etypeof t==\"object\"\u0026\u0026t!==null?t:{},lSe=t=\u003etypeof t==\"object\"\u0026\u0026t!==null?t:{},TAe=1e-6,uSe={DISTANCE_TO_COST:.05,RIP_THRESHOLD_START:.05,RIP_THRESHOLD_END:.8,RIP_CONGESTION_REGION_COST_FACTOR:.1,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!0,GREEDY_FINAL_ROUTE_ITERS:4,PARTIAL_RIP_MIN_ROUTE_COUNT:100,PARTIAL_RIP_MAX_ROUTE_COUNT:350,PARTIAL_RIP_MAX_ATTEMPTS:7,PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS:1,PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT:100,PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO:.02,PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO:.05,PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO:.1},Zlo={DISTANCE_TO_COST:.05,RIP_THRESHOLD_START:.05,RIP_THRESHOLD_END:.8,RIP_CONGESTION_REGION_COST_FACTOR:.1,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!0,GREEDY_FINAL_ROUTE_ITERS:4,MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT:6,EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST:Number.POSITIVE_INFINITY},gSe=t=\u003eMath.max(t,.01),dSe=t=\u003eNumber.isFinite(t)?{minViaPadDiameter:t}:{},e0o=(t,e)=\u003e{const n=gSe(t);return{...uSe,...dSe(e),USE_SPARSE_CANDIDATE_STORAGE:!1,RIP_THRESHOLD_RAMP_ATTEMPTS:Math.ceil(10*n),MAX_ITERATIONS:Math.ceil(2e6*n)}},t0o=(t,e)=\u003e{const n=gSe(t);return{...Zlo,...dSe(e),USE_SPARSE_CANDIDATE_STORAGE:!1,RIP_THRESHOLD_RAMP_ATTEMPTS:Math.ceil(16*n),MAX_ITERATIONS:Math.ceil(1e6*n)}},lBt=t=\u003e(t.solveGraphOptions?.MAX_ITERATIONS??1e6)+(t.sectionSolverOptions?.MAX_ITERATIONS??1e6)+1e6,n0o=t=\u003et.mutuallyConnectedNetworkId,hSe=(t,e)=\u003et.simpleRouteConnection?.pointsToConnect[e],uBt=t=\u003e{const e=hSe(t.routeMetadata,t.endpointIndex);if(!e)return t.fallbackZ;const n=RD(e).map(o=\u003eKr(o,t.layerCount));return t.regionAvailableZ.find(o=\u003en.includes(o))??t.fallbackZ},o0o=(t,e)=\u003e{const n=t.d,o=n.bounds;return{capacityMeshNodeId:t.d.capacityMeshNodeId,center:{x:t.d.center.x,y:t.d.center.y},width:t.d.width,height:t.d.height,availableZ:[...t.d.availableZ],...o?{bounds:{minX:o.minX,maxX:o.maxX,minY:o.minY,maxY:o.maxY}}:{},_containsObstacle:t.d._containsObstacle,_containsTarget:t.d._containsTarget,_offBoardConnectionId:t.d._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:t.d._offBoardConnectedCapacityMeshNodeIds===void 0?void 0:[...t.d._offBoardConnectedCapacityMeshNodeIds],_qfpRegionType:n._qfpRegionType,_isNarrowQfpPadGap:n._isNarrowQfpPadGap,...e!==void 0?{netId:e}:{}}},i0o=t=\u003e{const e=t.d;return{portId:t.d.portId,x:t.d.x,y:t.d.y,z:t.d.z,prevPortPointId:e.prevPortPointId,nextPortPointId:e.nextPortPointId,distToCentermostPortOnZ:t.d.distToCentermostPortOnZ,tinyHypergraphPortPenalty:t.d.tinyHypergraphPortPenalty,cramped:t.d.cramped,_preloadedFixedNetIds:t.d._preloadedFixedNetIds,_preloadedTracePortAssignments:t.d._preloadedTracePortAssignments}},r0o=t=\u003e{const e=(function(){const A=new Map;return c=\u003e{const l=c.mutuallyConnectedNetworkId;let u=A.get(l);return u===void 0\u0026\u0026(u=A.size,A.set(l,u)),u}})(),n=(function(A){const c=new Map,l=new Set,u=new Map;for(const h of A.params.connections){const d=h.mutuallyConnectedNetworkId,p=A.getNetIndex({connectionId:h.connectionId,mutuallyConnectedNetworkId:d});for(const m of[h.connectionId,d])u.set(m,p);for(const m of h.simpleRouteConnection.pointsToConnect)for(const _ of A.params.graph.regions){if(!oCt({point:m,region:_,layerCount:A.params.layerCount}))continue;if(m.pcb_port_id===void 0\u0026\u0026_.d._containsTarget!==!0){l.add(_.regionId);continue}let f=c.get(_.regionId);f||(f=new Set,c.set(_.regionId,f)),f.add(p)}}for(const h of A.params.graph.regions)for(const d of h.d._connectedTo??[]){const p=u.get(d);if(p===void 0)continue;let m=c.get(h.regionId);m||(m=new Set,c.set(h.regionId,m)),m.add(p)}const g=new Map;for(const h of l)g.set(h,-1);for(const[h,d]of c)d.size===1\u0026\u0026g.set(h,[...d][0]);return g})({params:t,getNetIndex:e}),o=t.graph.regions.map(A=\u003e({regionId:A.regionId,pointIds:A.ports.map(c=\u003ec.d.portId),d:o0o(A,n.get(A.regionId))})),i=t.graph.ports.map(A=\u003e({portId:A.d.portId,region1Id:A.region1.regionId,region2Id:A.region2.regionId,d:i0o(A)})),r=t.connections.map(A=\u003e({connectionId:A.connectionId,mutuallyConnectedNetworkId:A.mutuallyConnectedNetworkId,startRegionId:A.startRegion.regionId,endRegionId:A.endRegion.regionId,simpleRouteConnection:A.simpleRouteConnection})),s=[];for(const A of t.connections){const c={connectionId:A.connectionId,mutuallyConnectedNetworkId:A.mutuallyConnectedNetworkId,simpleRouteConnection:A.simpleRouteConnection},l=e(c),u=hSe(c,0),g=hSe(c,1),h=A.startRegion.d.availableZ[0]??0,d=A.endRegion.d.availableZ[0]??0,p=uBt({routeMetadata:c,endpointIndex:0,fallbackZ:h,regionAvailableZ:A.startRegion.d.availableZ,layerCount:t.layerCount}),m=uBt({routeMetadata:c,endpointIndex:1,fallbackZ:d,regionAvailableZ:A.endRegion.d.availableZ,layerCount:t.layerCount}),_=`tiny-terminal:start-region:${A.connectionId}`,f=`tiny-terminal:end-region:${A.connectionId}`,I=`tiny-terminal:start-port:${A.connectionId}`,C=`tiny-terminal:end-port:${A.connectionId}`;o.push({regionId:_,pointIds:[I],d:{capacityMeshNodeId:_,center:{x:u?.x??A.startRegion.d.center.x,y:u?.y??A.startRegion.d.center.y},width:TAe,height:TAe,availableZ:[p],_containsTarget:!0,_tinyTerminal:!0,_tinyTerminalNetId:A.mutuallyConnectedNetworkId,netId:l}}),o.push({regionId:f,pointIds:[C],d:{capacityMeshNodeId:f,center:{x:g?.x??A.endRegion.d.center.x,y:g?.y??A.endRegion.d.center.y},width:TAe,height:TAe,availableZ:[m],_containsTarget:!0,_tinyTerminal:!0,_tinyTerminalNetId:A.mutuallyConnectedNetworkId,netId:l}}),i.push({portId:I,region1Id:A.startRegion.regionId,region2Id:_,d:{portId:I,x:u?.x??A.startRegion.d.center.x,y:u?.y??A.startRegion.d.center.y,z:p,distToCentermostPortOnZ:0,_tinyTerminal:!0,...t.preserveTerminalPcbPortIds\u0026\u0026u?.pcb_port_id?{pcb_port_id:u.pcb_port_id}:{}}}),i.push({portId:C,region1Id:A.endRegion.regionId,region2Id:f,d:{portId:C,x:g?.x??A.endRegion.d.center.x,y:g?.y??A.endRegion.d.center.y,z:m,distToCentermostPortOnZ:0,_tinyTerminal:!0,...t.preserveTerminalPcbPortIds\u0026\u0026g?.pcb_port_id?{pcb_port_id:g.pcb_port_id}:{}}});const y=o.find(E=\u003eE.regionId===A.startRegion.regionId),x=o.find(E=\u003eE.regionId===A.endRegion.regionId);y?.pointIds.push(I),x?.pointIds.push(C),s.push({connection:{connectionId:A.connectionId},path:[{portId:I},{portId:C}]})}const a={regions:o,ports:i,connections:r,solvedRoutes:s};return(A=\u003e{const c=new Map,l=new Map,u=new Set((A.connections??[]).flatMap(_=\u003e[_.startRegionId,_.endRegionId])),g=new Set(A.regions.filter(_=\u003e{const f=typeof _.d?.netId==\"number\"?_.d.netId:typeof _.d?.NetId==\"number\"?_.d.NetId:void 0;return _.d?._containsObstacle===!0\u0026\u0026(f===void 0||f===-1)\u0026\u0026!u.has(_.regionId)}).map(_=\u003e_.regionId));let h=0;for(const _ of A.ports){const f=_.d,I=f?._preloadedTracePortAssignments??[];if(I.length\u003e0\u0026\u0026h++,!g.has(_.region1Id)\u0026\u0026!g.has(_.region2Id))for(const C of I){const y=l.get(C.traceId);if(y!==void 0\u0026\u0026y!==C.fixedNetId)throw new Error(`Preloaded trace \"${C.traceId}\" maps to multiple canonical nets`);l.set(C.traceId,C.fixedNetId);const x=c.get(C.traceId)??[];x.push({port:_,assignment:C}),c.set(C.traceId,x)}}const d=new Map(A.regions.map(_=\u003e[_.regionId,_])),p=A.connections??=[],m=A.solvedRoutes??=[];for(const[_,f]of c){f.sort((E,B)=\u003eE.assignment.routePosition-B.assignment.routePosition||E.assignment.z-B.assignment.z||E.port.portId.localeCompare(B.port.portId));const I=f.filter(({port:E},B)=\u003eB===0||E.portId!==f[B-1].port.portId);if(I.length\u003c2)continue;const C=[];let y;for(let E=0;E\u003cI.length-1;E++){const B=I[E],S=I[E+1];if(B.assignment.z===S.assignment.z\u0026\u0026Math.abs(B.assignment.routePosition-S.assignment.routePosition)\u003c=1e-6){y=void 0;continue}const Q=Xlo(I,E,y);Q?(C.push({regionId:Q,from:B,to:S}),y=Q):y=void 0}const x=[];for(const E of C){const B=x.at(-1);B\u0026\u0026B.at(-1).to.port.portId===E.from.port.portId?B.push(E):x.push([E])}for(const[E,B]of x.entries()){const S=qlo(_,E);for(const F of B){const O=d.get(F.regionId);if(!O)throw new Error(`Preloaded trace \"${_}\" references missing region \"${F.regionId}\"`);O.assignments=[...O.assignments??[],{regionPort1Id:F.from.port.portId,regionPort2Id:F.to.port.portId,connectionId:S}]}const Q=B[0],w=B.at(-1),M=Q.from.port,k=w.to.port,R={connectionId:S,mutuallyConnectedNetworkId:l.get(_)??_,startRegionId:aBt(M,Q.regionId),endRegionId:aBt(k,w.regionId),preloadedTraceSection:{traceId:_,startRoutePosition:Q.from.assignment.routePosition,endRoutePosition:w.to.assignment.routePosition,startPoint:{x:Q.from.assignment.tracePoint.x,y:Q.from.assignment.tracePoint.y,z:Q.from.assignment.z},endPoint:{x:w.to.assignment.tracePoint.x,y:w.to.assignment.tracePoint.y,z:w.to.assignment.z}}};p.push(R),m.push({requiredRip:!1,connection:R,path:[M,k].map(F=\u003e({portId:F.portId,g:0,h:0,f:0,hops:0,ripRequired:!1}))})}}})(a),a},gBt=t=\u003e{const e=new Map;for(let n=0;n\u003ct.problem.routeNet.length;n++){const o=t.problem.routeMetadata?.[n],i=o?.mutuallyConnectedNetworkId;if(typeof i!=\"string\"||i.length===0)throw new Error(`Tiny hypergraph route ${n} is missing a net ID`);e.set(i,t.problem.routeNet[n])}for(let n=0;n\u003ct.problem.regionNetId.length;n++){const o=t.topology.regionMetadata?.[n]?._tinyTerminalNetId;if(typeof o!=\"string\")continue;const i=e.get(o);i!==void 0\u0026\u0026(t.problem.regionNetId[n]=i)}},dBt=t=\u003e{const e=new Map;t.topology.regionMetadata?.forEach((o,i)=\u003e{typeof o.serializedRegionId==\"string\"\u0026\u0026e.set(o.serializedRegionId,i)});const n=new Set;for(const o of t.problem.routeMetadata??[])Sv(o)||(typeof o.startRegionId==\"string\"\u0026\u0026n.add(o.startRegionId),typeof o.endRegionId==\"string\"\u0026\u0026n.add(o.endRegionId));for(const o of t.problem.routeMetadata??[])if(Sv(o))for(const i of[o.startRegionId,o.endRegionId]){if(typeof i!=\"string\"||n.has(i))continue;const r=e.get(i);if(r===void 0)continue;const s=t.topology.regionMetadata?.[r];typeof s?.netId==\"number\"||typeof s?.NetId==\"number\"||(t.problem.regionNetId[r]=-1)}},hBt=t=\u003e{if(t.problem.metadataPortPenaltiesApplied)return 0;let e=0,n=t.problem.portPenalty!==void 0;for(let i=0;i\u003ct.topology.portCount;i++){const r=Number(t.topology.portMetadata?.[i]?.tinyHypergraphPortPenalty),s=Number.isFinite(r)\u0026\u0026r\u003e0?r:0;s\u003e0\u0026\u0026e++,t.problem.portPenalty?.[i]!==s\u0026\u0026(n=!1)}if(n)return t.problem.metadataPortPenaltiesApplied=!0,e;e=0;const o=t.problem.portPenalty?new Float64Array(t.problem.portPenalty):new Float64Array(t.topology.portCount);for(let i=0;i\u003ct.topology.portCount;i++){const r=Number(t.topology.portMetadata?.[i]?.tinyHypergraphPortPenalty);!Number.isFinite(r)||r\u003c=0||(o[i]+=r,e++)}return e\u003e0\u0026\u0026(t.problem.portPenalty=o),t.problem.metadataPortPenaltiesApplied=!0,e},pBt=class extends jlo{configuredSolvers=new WeakSet;duplicatePortPenaltyCount=0;metadataPortPenaltyCount=0;crampedPortPenaltyCount=0;preloadedPortCount=0;preloadedFixedSegmentCount=0;crampedPortTraversalPenalty;useSelectiveReripRouting;constructor(t,e){super(t),this.useSelectiveReripRouting=e,this.crampedPortTraversalPenalty=150;const n=ABt(t.serializedHyperGraph);if(this.preloadedPortCount=n.preloadedPortCount,this.preloadedFixedSegmentCount=n.preloadedAssignmentCount,e){const o=this.pipelineDef.find(i=\u003ei.solverName===\"solveGraph\");if(!o)throw new Error(\"Tiny hypergraph pipeline is missing the solveGraph stage\");o.solverClass=rBt}this.MAX_ITERATIONS=lBt(t)}loadHyperGraph(t){const e=super.loadHyperGraph(t);((r,s)=\u003e{const a=new Map;for(const A of s.connections??[])Sv(A)\u0026\u0026a.set(A.connectionId,A.preloadedTraceSection);for(const A of r.problem.routeMetadata??[]){const c=a.get(A.connectionId);c\u0026\u0026(A.preloadedTraceSection=c)}})(e,this.inputProblem.serializedHyperGraph);const n=hBt(e),{duplicatePortPenaltyCount:o,crampedPortPenaltyCount:i}=((r,s)=\u003e{let a=0,A=0;const c=r.problem.portPenalty?new Float64Array(r.problem.portPenalty):new Float64Array(r.topology.portCount);for(let l=0;l\u003cr.topology.portCount;l++){const u=r.topology.portMetadata?.[l];typeof u?.duplicatedFromPortId==\"string\"\u0026\u0026(c[l]+=150,a++),u?.cramped\u0026\u0026s\u003e0\u0026\u0026(c[l]+=s,A++)}return(a\u003e0||A\u003e0)\u0026\u0026(r.problem.portPenalty=c),{duplicatePortPenaltyCount:a,crampedPortPenaltyCount:A}})(e,this.crampedPortTraversalPenalty);return gBt(e),dBt(e),this.metadataPortPenaltyCount=Math.max(this.metadataPortPenaltyCount,n),this.duplicatePortPenaltyCount=Math.max(this.duplicatePortPenaltyCount,o),this.crampedPortPenaltyCount=Math.max(this.crampedPortPenaltyCount,i),e}_step(){super._step(),this.configureSolver(this.activeSubSolver)}getInitialVisualizationSolver(){if(this.useSelectiveReripRouting\u0026\u0026!this.initialVisualizationSolver){const{topology:e,problem:n}=this.loadHyperGraph(this.inputProblem.serializedHyperGraph);this.initialVisualizationSolver=new rBt(e,n,this.getSolveGraphOptions())}const t=super.getInitialVisualizationSolver();return this.configureSolver(t),t}getSolvedTinySolver(){const t=this.getSolver(\"optimizeSection\");if(t?.solved\u0026\u0026!t.failed)return t.getSolvedSolver();const e=this.getSolver(\"solveGraph\");if(e?.solved\u0026\u0026!e.failed)return e;throw new Error(\"TinyHyperGraph section pipeline does not have a solved graph\")}configureSolver(t){if(t\u0026\u0026!this.configuredSolvers.has(t)){if(t instanceof lW||t instanceof Bv){const e=t;hBt(e),gBt(e),dBt(e)}this.configuredSolvers.add(t)}}},kAe=class extends yr{constructor(t){super(),this.params=t;const e=(l=\u003el.map(u=\u003e{const g=u.simpleRouteConnection;if(!g)throw new Error(`TinyHypergraphPortPointPathingSolver requires a SimpleRouteConnection for \"${u.connectionId}\"`);const h=u.mutuallyConnectedNetworkId;if(!h)throw new Error(`TinyHypergraphPortPointPathingSolver requires a net ID for \"${u.connectionId}\"`);return{...u,mutuallyConnectedNetworkId:h,simpleRouteConnection:g}}))(t.connections),n=t.flags.USE_SELECTIVE_RERIP_ROUTING?(function(l,u){const g=new Map;for(const h of l){const d=u(h);g.set(d,(g.get(d)??0)+1)}return l.map((h,d)=\u003e({connection:h,index:d})).sort((h,d)=\u003e(g.get(u(d.connection))??0)-(g.get(u(h.connection))??0)||h.index-d.index).map(({connection:h})=\u003eh)})(e,n0o):e;this.rootConnectionNameByConnectionId=new Map(n.map(l=\u003e[l.connectionId,l.simpleRouteConnection.__rootConnectionNames?.[0]]));const o=r0o({...t,connections:n});this.originalPreloadedSegmentKeysByConnectionId=(l=\u003e{const u=new Map;for(const g of l.connections??[])Sv(g)\u0026\u0026u.set(g.connectionId,new Set);for(const g of l.regions)for(const h of g.assignments??[]){const d=u.get(h.connectionId);if(!d)continue;const[p,m]=[h.regionPort1Id,h.regionPort2Id].sort();d.add(JSON.stringify([g.regionId,p,m]))}return u})(o);const i=ABt(o),r=i.preloadedPortCount\u003e0,s=r\u0026\u0026t.flags.USE_PARTIAL_RIP_ROUTING_WITH_PRELOADED_TRACES===!0,a=s?Math.max(o.connections?.length??0,i.preloadedAssignmentCount):void 0;let A=o;if(n.length\u003c=180){const l=new Plo(o,{duplicatePortProximity:.05,useSerializedPortPenalties:!1,routeSolveOptions:{...dSe(t.minViaPadDiameter),USE_SPARSE_CANDIDATE_STORAGE:!1,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!0,GREEDY_FINAL_ROUTE_ITERS:4,MAX_ITERATIONS:Math.ceil(2e6*gSe(t.effort)),RIP_THRESHOLD_RAMP_ATTEMPTS:0,STATIC_REACHABILITY_PRECHECK:!0}});if(l.solve(),l.failed)this.duplicateCongestedPortError=l.error??\"unknown error\";else{this.duplicateCongestedPortReport=l.report,A=l.getOutput();for(const u of A.ports){const g=lSe(u.d);typeof g.duplicatedFromPortId==\"string\"\u0026\u0026(delete g._preloadedFixedNetIds,delete g._preloadedTracePortAssignments)}}}else this.duplicateCongestedPortError=`Skipped for ${n.length} connections`;this.duplicatedPortCount=this.duplicateCongestedPortReport?.duplicatedPorts.reduce((l,u)=\u003el+u.duplicatePortIds.length,0)??0;const c=((l,u,g,h=!0,d)=\u003e{const p=l.connections?.length??0,m=d??p,_=uSe.PARTIAL_RIP_MIN_ROUTE_COUNT,f=uSe.PARTIAL_RIP_MAX_ROUTE_COUNT,I=h\u0026\u0026m\u003e=_\u0026\u0026m\u003c=f;return{serializedHyperGraph:l,createSectionMask:({topology:C})=\u003enew Int8Array(C.portCount),solveGraphOptions:{...e0o(u,g),...I?{PARTIAL_RIP_MIN_ROUTE_COUNT:0,PARTIAL_RIP_MAX_ROUTE_COUNT:Number.POSITIVE_INFINITY,PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT:0}:{PARTIAL_RIP_ENABLED:!1,OUTSIDE_IN_ROUTING:!1}},sectionSolverOptions:t0o(u,g)}})({...A,solvedRoutes:o.solvedRoutes},t.effort,t.minViaPadDiameter,!r||s,a);this.tinyPipelineSolver=new pBt(c,t.flags.USE_SELECTIVE_RERIP_ROUTING===!0),this.primaryTinyPipelineSolver=this.tinyPipelineSolver,n.length\u003e=30\u0026\u0026n.length\u003c=99\u0026\u0026(this.alternativeTinyPipelineInput={...c,solveGraphOptions:{...c.solveGraphOptions,TRACE_DENSITY_COST_FACTOR:1}}),this.MAX_ITERATIONS=lBt(c)*(this.alternativeTinyPipelineInput?2:1),this.originalRegionById=new Map(t.graph.regions.map(l=\u003e[l.regionId,l])),this.originalRegionIds=new Set(this.originalRegionById.keys()),this.inputNodeWithPortPoints=((l,u)=\u003e{const g=new Map(u.regions.map(d=\u003e[d.regionId,d])),h=new Map(u.ports.map(d=\u003e[d.portId,d]));return l.graph.regions.map(d=\u003e{const p=g.get(d.regionId),m=(p?.pointIds??d.ports.map(_=\u003e_.d.portId)).map(_=\u003eh.get(_)).filter(_=\u003e_\u0026\u0026!lSe(_.d)._tinyTerminal).map(_=\u003e{const f=_,I=lSe(f.d),C=g.get(f.region1Id),y=g.get(f.region2Id),x=!!(cBt(C?.d)._offBoardConnectionId??cBt(y?.d)._offBoardConnectionId);return{portPointId:f.portId,x:Number(I.x??0),y:Number(I.y??0),z:Number(I.z??0),prevPortPointId:typeof I.prevPortPointId==\"string\"?I.prevPortPointId:void 0,nextPortPointId:typeof I.nextPortPointId==\"string\"?I.nextPortPointId:void 0,connectionNodeIds:[f.region1Id,f.region2Id],distToCentermostPortOnZ:Number(I.distToCentermostPortOnZ??0),cramped:!!I.cramped,connectsToOffBoardNode:x}});return{capacityMeshNodeId:d.d.capacityMeshNodeId,center:d.d.center,width:d.d.width,height:d.d.height,portPoints:m,availableZ:d.d.availableZ,_containsObstacle:d.d._containsObstacle,_containsTarget:d.d._containsTarget,_offBoardConnectionId:d.d._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:d.d._offBoardConnectedCapacityMeshNodeIds,_qfpRegionType:d.d._qfpRegionType,_isNarrowQfpPadGap:d.d._isNarrowQfpPadGap}})})(t,A)}params;tinyPipelineSolver;primaryTinyPipelineSolver;alternativeTinyPipelineSolver;alternativeTinyPipelineInput;candidatePortfolioPhase=\"primary\";primaryCandidateSummary;alternativeCandidateSummary;alternativeCandidateEvaluated=!1;selectedCandidate=\"primary\";duplicateCongestedPortReport;duplicateCongestedPortError;duplicatedPortCount=0;inputNodeWithPortPoints;originalRegionById;originalRegionIds;rootConnectionNameByConnectionId;originalPreloadedSegmentKeysByConnectionId;getSolverName(){return\"TinyHypergraphPortPointPathingSolver\"}getChangedPreloadedRouteIds(t){const e=new Map,n=new Map;for(let i=0;i\u003ct.problem.routeCount;i++){const r=this.getRouteMetadata(t,i);Sv(r)\u0026\u0026(e.set(r.connectionId,i),n.set(i,new Set))}for(let i=0;i\u003ct.state.regionSegments.length;i++){const r=t.topology.regionMetadata?.[i]?.serializedRegionId;for(const[s,a,A]of t.state.regionSegments[i]??[]){const c=n.get(s);if(!c)continue;const l=t.topology.portMetadata?.[a]?.serializedPortId,u=t.topology.portMetadata?.[A]?.serializedPortId;if(typeof r!=\"string\"||typeof l!=\"string\"||typeof u!=\"string\")throw new Error(`Tiny hypergraph preloaded route ${s} has a segment without serialized topology IDs`);const[g,h]=[l,u].sort();c.add(JSON.stringify([r,g,h]))}}const o=new Set;for(const[i,r]of this.originalPreloadedSegmentKeysByConnectionId){const s=e.get(i);if(s===void 0)throw new Error(`Tiny hypergraph lost preloaded trace section \"${i}\"`);const a=n.get(s);if(r.size\u003e0\u0026\u0026a.size===0)throw new Error(`Tiny hypergraph lost preloaded trace section \"${i}\"`);(r.size!==a.size||[...r].some(A=\u003e!a.has(A)))\u0026\u0026o.add(s)}return o}summarizePipelineCandidate(t){const e=t.getSolvedTinySolver();let n=0,o=0,i=0,r=0,s=0,a=0;const A=e.topology.regionMetadata??[];for(let c=0;c\u003ce.state.regionSegments.length;c++){const l=e.state.regionSegments[c];s+=l.length;for(const[,_,f]of l)e.topology.portZ[_]!==e.topology.portZ[f]\u0026\u0026(a+=1);const u=A[c]?.capacityMeshNodeId;if(!u||!this.originalRegionIds.has(u))continue;const g=this.originalRegionById.get(u);if(!g||l.length===0)continue;const h=l.map(([_,f,I])=\u003e[this.createAssignedPortPoint(e,_,f),this.createAssignedPortPoint(e,_,I)]),d={capacityMeshNodeId:g.d.capacityMeshNodeId,center:g.d.center,width:g.d.width,height:g.d.height,portPoints:h.flat(),availableZ:g.d.availableZ},p=Wm(d),m=wy(g.d,p.numSameLayerCrossings,p.numEntryExitLayerChanges,p.numTransitionPairCrossings);n+=m,o+=m*m,i=Math.max(i,m),r+=d.portPoints.length**2}return{nodePfSum:n,nodePfSquaredSum:o,nodePfMax:i,squaredNodePortPointCount:r,segmentCount:s,layerChangeCount:a,changedPreloadedTraceSectionCount:this.getChangedPreloadedRouteIds(e).size}}shouldEvaluateAlternative(t){const e=this.primaryTinyPipelineSolver.getSolvedTinySolver().problem.routeCount;return this.alternativeTinyPipelineInput!==void 0\u0026\u0026((n,o)=\u003en.nodePfSum\u003e4\u0026\u0026n.nodePfMax\u003e1\u0026\u0026n.squaredNodePortPointCount/Math.max(1,o)\u003e=125)(t,e)}shouldSelectAlternative(t,e){return((n,o,i)=\u003e{if(o.changedPreloadedTraceSectionCount\u003en.changedPreloadedTraceSectionCount)return!1;const r=i\u003e40?.92:.95,s=o.nodePfSum\u003c=.9*n.nodePfSum\u0026\u0026o.nodePfSquaredSum\u003c=.85*n.nodePfSquaredSum\u0026\u0026o.nodePfMax\u003c=.85*n.nodePfMax\u0026\u0026o.squaredNodePortPointCount\u003c.98*n.squaredNodePortPointCount\u0026\u0026o.segmentCount\u003c=.97*n.segmentCount;return o.nodePfSum\u003c=1.03*n.nodePfSum\u0026\u0026o.nodePfSquaredSum\u003c=1.06*n.nodePfSquaredSum\u0026\u0026(o.squaredNodePortPointCount\u003cn.squaredNodePortPointCount*r||s)})(t,e,this.primaryTinyPipelineSolver.getSolvedTinySolver().problem.routeCount)}finishCandidatePortfolio(){this.candidatePortfolioPhase=\"complete\",this.solved=this.tinyPipelineSolver.solved,this.failed=this.tinyPipelineSolver.failed,this.error=this.tinyPipelineSolver.error??null}getSolveGraphBenchmarkMetrics(){const t=this.tinyPipelineSolver.getSolver(\"solveGraph\");if(!t)return;const e=t.state.regionSegments.map(r=\u003er.length),n=this.selectedCandidate===\"alternative\"?this.alternativeCandidateSummary:this.primaryCandidateSummary,o=t.stats,i=this.tinyPipelineSolver.getStageStats().solveGraph;return{routeCount:t.problem.routeCount,traceDensityCandidateEvaluated:this.alternativeCandidateEvaluated,traceDensityCandidateSelected:this.selectedCandidate===\"alternative\",downstreamNodePfSum:n?.nodePfSum,downstreamNodePfSquaredSum:n?.nodePfSquaredSum,downstreamNodePfMax:n?.nodePfMax,downstreamSquaredNodePortPointCount:n?.squaredNodePortPointCount,changedPreloadedTraceSectionCount:n?.changedPreloadedTraceSectionCount,iterations:t.iterations,timeMs:i?.timeSpent,ripCount:o.ripCount,partialRipCount:o.partialRipCount,partiallyRippedRouteCount:o.partiallyRippedRouteCount,partiallyRippedSegmentCount:o.partiallyRippedSegmentCount,retainedPartialRipSegmentCount:o.retainedPartialRipSegmentCount,firstMaxRegionCost:o.firstMaxRegionCost,bestMaxRegionCost:o.bestMaxRegionCost,firstTotalRegionCost:o.firstTotalRegionCost,bestTotalRegionCost:o.bestTotalRegionCost,firstSegmentCount:o.firstSegmentCount,bestSolvedSegmentCount:o.bestSolvedSegmentCount,bestSolvedMaxRegionSegmentCount:o.bestSolvedMaxRegionSegmentCount,bestSolvedSquaredRegionSegmentCount:o.bestSolvedSquaredRegionSegmentCount,finalMaxRegionSegmentCount:Math.max(0,...e),finalSquaredRegionSegmentCount:e.reduce((r,s)=\u003er+s*s,0),finalSegmentCount:n?.segmentCount,finalLayerChangeCount:n?.layerChangeCount,warmupFullRipAttempts:o.partialRipWarmupFullRipAttempts,complexityAwareSelection:o.partialRipComplexityAwareSelection,targetReached:o.partialRipTargetReached,outsideInCompletedRouteCount:o.outsideInCompletedRouteCount,outsideInFallbackRouteCount:o.outsideInFallbackRouteCount,outsideInForwardExpansionCount:o.outsideInForwardExpansionCount,outsideInReverseExpansionCount:o.outsideInReverseExpansionCount}}_step(){this.tinyPipelineSolver.step(),this.candidatePortfolioPhase===\"primary\"\u0026\u0026this.primaryTinyPipelineSolver.failed?(this.alternativeTinyPipelineInput=void 0,this.finishCandidatePortfolio()):this.candidatePortfolioPhase===\"primary\"\u0026\u0026this.primaryTinyPipelineSolver.solved?(this.primaryCandidateSummary=this.summarizePipelineCandidate(this.primaryTinyPipelineSolver),this.shouldEvaluateAlternative(this.primaryCandidateSummary)?(this.alternativeCandidateEvaluated=!0,this.alternativeTinyPipelineSolver=new pBt(this.alternativeTinyPipelineInput,this.params.flags.USE_SELECTIVE_RERIP_ROUTING===!0),this.tinyPipelineSolver=this.alternativeTinyPipelineSolver,this.candidatePortfolioPhase=\"alternative\"):(this.alternativeTinyPipelineInput=void 0,this.finishCandidatePortfolio())):this.candidatePortfolioPhase===\"alternative\"\u0026\u0026(this.tinyPipelineSolver.solved||this.tinyPipelineSolver.failed)\u0026\u0026(this.tinyPipelineSolver.solved\u0026\u0026!this.tinyPipelineSolver.failed\u0026\u0026(this.alternativeCandidateSummary=this.summarizePipelineCandidate(this.tinyPipelineSolver)),this.alternativeCandidateSummary\u0026\u0026this.primaryCandidateSummary\u0026\u0026this.shouldSelectAlternative(this.primaryCandidateSummary,this.alternativeCandidateSummary)?(this.selectedCandidate=\"alternative\",this.primaryTinyPipelineSolver=void 0,this.alternativeTinyPipelineSolver=void 0):(this.tinyPipelineSolver=this.primaryTinyPipelineSolver,this.alternativeTinyPipelineSolver=void 0),this.alternativeTinyPipelineInput=void 0,this.finishCandidatePortfolio());const t=this.tinyPipelineSolver.getSolver(\"optimizeSection\"),e=this.getCurrentTinySolver();this.solved=this.candidatePortfolioPhase===\"complete\"\u0026\u0026this.tinyPipelineSolver.solved,this.failed=this.candidatePortfolioPhase===\"complete\"\u0026\u0026this.tinyPipelineSolver.failed,this.error=this.failed?this.tinyPipelineSolver.error??null:null,this.progress=this.candidatePortfolioPhase===\"complete\"?1:this.candidatePortfolioPhase===\"alternative\"?.5+.5*this.tinyPipelineSolver.progress:this.alternativeTinyPipelineInput?.5*this.tinyPipelineSolver.progress:this.tinyPipelineSolver.progress,this.stats={duplicateCongestedPortSourceCount:this.duplicateCongestedPortReport?.duplicatedPorts.length??0,duplicateCongestedPortCount:this.duplicateCongestedPortReport?.duplicatedPorts.reduce((n,o)=\u003en+o.duplicatePortIds.length,0)??0,duplicateCongestedPortFallbackToOriginal:!!this.duplicateCongestedPortError,duplicateCongestedPortPenalty:this.duplicatedPortCount\u003e0?150:0,duplicateCongestedPortPenaltyCount:this.tinyPipelineSolver.duplicatePortPenaltyCount,metadataPortPenaltyCount:this.tinyPipelineSolver.metadataPortPenaltyCount,crampedPortPenalty:this.tinyPipelineSolver.crampedPortTraversalPenalty,crampedPortPenaltyCount:this.tinyPipelineSolver.crampedPortPenaltyCount,preloadedPortCount:this.tinyPipelineSolver.preloadedPortCount,preloadedFixedSegmentCount:this.tinyPipelineSolver.preloadedFixedSegmentCount,duplicateCongestedPortError:this.duplicateCongestedPortError,candidatePortfolioPhase:this.candidatePortfolioPhase,candidatePortfolioSelectedCandidate:this.selectedCandidate,candidatePortfolioPrimarySummary:this.primaryCandidateSummary,candidatePortfolioAlternativeSummary:this.alternativeCandidateSummary,...this.tinyPipelineSolver.stats??{},...e?.stats??{},...t?.stats??{},currentStage:this.tinyPipelineSolver.getCurrentStageName(),stageStats:this.tinyPipelineSolver.getStageStats()},this.activeSubSolver=this.tinyPipelineSolver.activeSubSolver??null}preview(){return this.visualize()}getCurrentTinySolver(){const t=this.tinyPipelineSolver.getSolver(\"optimizeSection\");return t?.solved\u0026\u0026!t.failed?t.getSolvedSolver():this.tinyPipelineSolver.getSolver(\"solveGraph\")||void 0}getSolvedTinySolver(){return this.tinyPipelineSolver.getSolvedTinySolver()}getRouteMetadata(t,e){return t.problem.routeMetadata?.[e]}createAssignedPortPoint(t,e,n){const o=this.getRouteMetadata(t,e),i=o?(a=\u003ea.simpleRouteConnection?.name??a.connectionId)(o):`route-${e}`,r=o?this.rootConnectionNameByConnectionId.get(o.connectionId)??o.mutuallyConnectedNetworkId:void 0,s=t.topology.portMetadata?.[n];return{portPointId:String(s?.serializedPortId??s?.portId??`tiny-port-${n}`),x:t.topology.portX[n],y:t.topology.portY[n],z:t.topology.portZ[n],connectionName:i,rootConnectionName:r,...this.params.preserveTerminalPcbPortIds\u0026\u0026typeof s?.pcb_port_id==\"string\"?{pcb_port_id:s.pcb_port_id}:{},prevPortPointId:typeof s?.prevPortPointId==\"string\"?s.prevPortPointId:void 0,nextPortPointId:typeof s?.nextPortPointId==\"string\"?s.nextPortPointId:void 0}}getOutput(){const t=this.getSolvedTinySolver(),e=[],n=t.state.regionSegments,o=t.topology.regionMetadata??[],i=this.getChangedPreloadedRouteIds(t);for(let s=0;s\u003cn.length;s++){const a=o[s]?.capacityMeshNodeId;if(!a||!this.originalRegionIds.has(a))continue;const A=this.originalRegionById.get(a);if(!A)continue;const c=n[s].filter(([u])=\u003e{const g=this.getRouteMetadata(t,u);return!Sv(g)||i.has(u)}).map(([u,g,h])=\u003e{const d=this.createAssignedPortPoint(t,u,g),p=this.createAssignedPortPoint(t,u,h);return d.portPointId\u0026\u0026p.portPointId\u0026\u0026(d.nextPortPointId=p.portPointId,p.prevPortPointId=d.portPointId),[d,p]}),l=c.flat();l.length!==0\u0026\u0026e.push({capacityMeshNodeId:A.d.capacityMeshNodeId,center:A.d.center,width:A.d.width,height:A.d.height,portPoints:l,portPointsInPairs:c,availableZ:A.d.availableZ})}const r=[...i].map(s=\u003e{const a=this.getRouteMetadata(t,s);if(!Sv(a))throw new Error(`Changed preloaded hypergraph route ${s} is missing section metadata`);const A=a.preloadedTraceSection;return{connectionName:a.connectionId,traceId:A.traceId,startRoutePosition:A.startRoutePosition,endRoutePosition:A.endRoutePosition,connection:{name:a.connectionId,__rootConnectionNames:[a.mutuallyConnectedNetworkId],pointsToConnect:[{x:A.startPoint.x,y:A.startPoint.y,layer:Kh(A.startPoint.z,this.params.layerCount)},{x:A.endPoint.x,y:A.endPoint.y,layer:Kh(A.endPoint.z,this.params.layerCount)}]}}});return this.stats.changedPreloadedTraceSectionCount=r.length,{nodesWithPortPoints:e,inputNodeWithPortPoints:this.inputNodeWithPortPoints,changedPreloadedTraceSections:r}}computeNodePf(t){const e=this.getOutput().nodesWithPortPoints.find(i=\u003ei.capacityMeshNodeId===t.capacityMeshNodeId),n=this.originalRegionById.get(t.capacityMeshNodeId);if(!e||!n)return null;const o=Wm(e);return wy(n.d,o.numSameLayerCrossings,o.numEntryExitLayerChanges,o.numTransitionPairCrossings)}tryFinalAcceptance(){}getConstructorParams(){return[this.params]}visualize(){return this.tinyPipelineSolver.visualize()}},uW=(t,e)=\u003e{if(!t||t===\"none\")return t;try{const n=wD(t);return`rgba(${n.red},${n.green},${n.blue},${e})`}catch{return Es(t,1-e)}},ab=({srj:t,opacity:e=.25,visualizationOptions:n={}})=\u003e{const o=mx({...t,obstacles:[]},n);return{...o,points:[],lines:o.lines?.map(i=\u003e({...i,strokeColor:uW(i.strokeColor,e)})),rects:o.rects?.map(i=\u003e({...i,fill:uW(i.fill,e),stroke:uW(i.stroke,e)})),circles:o.circles?.map(i=\u003e({...i,fill:uW(i.fill,e),stroke:uW(i.stroke,e)}))}};function pSe(t,e){return t.x\u003e=e.center.x-e.width/2\u0026\u0026t.x\u003c=e.center.x+e.width/2\u0026\u0026t.y\u003e=e.center.y-e.height/2\u0026\u0026t.y\u003c=e.center.y+e.height/2}var mSe=\"escape-via:\",q3=1e-4,s0o=t=\u003et.obstacleId??[t.layers.join(\".\"),t.center.x.toFixed(4),t.center.y.toFixed(4),t.width.toFixed(4),t.height.toFixed(4)].join(\":\"),mBt=(t,e,n=1e-4)=\u003eno(t,e)\u003c=n,FAe=class extends yr{constructor(e,n={}){super(),this.ogSrj=e,this.viaDiameter=n.viaDiameter??om(e).padDiameter,this.viaRadius=this.viaDiameter/2,this.minTraceWidth=n.minTraceWidth??e.minTraceWidth,this.obstacleMargin=n.obstacleMargin??e.defaultObstacleMargin??.15,this.requiredViaToPadClearance=Math.max(this.obstacleMargin,e.minViaEdgeToPadEdgeClearance??0),this.escapeOffset=this.viaRadius+Math.max(this.minTraceWidth/2,this.requiredViaToPadClearance),this.requiredTraceClearance=this.minTraceWidth/2+this.obstacleMargin/2,this.requiredViaToViaClearance=this.viaDiameter+this.obstacleMargin,this.outputSrj=e,this.escapeViaMetadataByPointId=new Map,this.createdEscapeVias=[]}ogSrj;getSolverName(){return\"EscapeViaLocationSolver\"}viaDiameter;viaRadius;minTraceWidth;obstacleMargin;escapeOffset;requiredTraceClearance;requiredViaToPadClearance;requiredViaToViaClearance;outputSrj;escapeViaMetadataByPointId;createdEscapeVias;nextEscapeViaIndex=0;getConnectionNetIds(e){return new Set([e.name,...e.__rootConnectionNames??[],e.__netConnectionName].filter(n=\u003e!!n))}obstacleMatchesConnectionNet(e,n){return e.connectedTo.some(o=\u003en.has(o))}getObstacleZs(e){return e.__zLayers\u0026\u0026e.__zLayers.length\u003e0?e.__zLayers:e.layers.map(n=\u003eKr(n,this.ogSrj.layerCount))}getViaSpanLayers(e,n){const o=Kr(e,this.ogSrj.layerCount),i=Kr(n,this.ogSrj.layerCount),r=Math.min(o,i),s=Math.max(o,i),a=Array.from({length:s-r+1},(A,c)=\u003er+c);return{__zLayers:a,layers:a.map(A=\u003eKh(A,this.ogSrj.layerCount))}}createEscapeViaObstacle(e){const{escapeVia:n,connectionNetIds:o}=e,{layers:i,__zLayers:r}=this.getViaSpanLayers(n.sourceLayer,n.targetLayer);return{obstacleId:`escape-via-obstacle:${n.pointId}`,type:\"rect\",layers:i,__zLayers:r,center:{x:n.x,y:n.y},width:this.viaDiameter,height:this.viaDiameter,connectedTo:Array.from(o)}}selectSourceObstacle(e){const{point:n,sourceLayer:o,connectionNetIds:i}=e;return this.ogSrj.obstacles.filter(r=\u003e!r.isCopperPour\u0026\u0026r.layers.includes(o)\u0026\u0026pSe(n,r)).sort((r,s)=\u003e{const a=r.connectedTo.includes(n.pointId??\"\")||r.connectedTo.includes(n.pcb_port_id??\"\")||this.obstacleMatchesConnectionNet(r,i);return a!==(s.connectedTo.includes(n.pointId??\"\")||s.connectedTo.includes(n.pcb_port_id??\"\")||this.obstacleMatchesConnectionNet(s,i))?a?-1:1:r.width*r.height-s.width*s.height})[0]}getCandidatePositions(e,n){if(!n)return this.dedupeCandidatePositions([{x:e.x+this.escapeOffset,y:e.y},{x:e.x-this.escapeOffset,y:e.y},{x:e.x,y:e.y+this.escapeOffset},{x:e.x,y:e.y-this.escapeOffset},{x:e.x+this.escapeOffset,y:e.y+this.escapeOffset},{x:e.x+this.escapeOffset,y:e.y-this.escapeOffset},{x:e.x-this.escapeOffset,y:e.y+this.escapeOffset},{x:e.x-this.escapeOffset,y:e.y-this.escapeOffset}]);const o=n.center.x-n.width/2,i=n.center.x+n.width/2,r=n.center.y-n.height/2,s=n.center.y+n.height/2,a=o-this.escapeOffset,A=i+this.escapeOffset,c=r-this.escapeOffset,l=s+this.escapeOffset,u=this.getEdgeSamples(r,s,e.y),g=this.getEdgeSamples(o,i,e.x),h=[];for(const d of u)h.push({x:a,y:d},{x:A,y:d});for(const d of g)h.push({x:d,y:c},{x:d,y:l});return this.dedupeCandidatePositions(h)}dedupeCandidatePositions(e){const n=[];for(const o of e)n.some(i=\u003emBt(i,o))||n.push(o);return n}pushEdgeSample(e,n,o,i){const r=Math.max(o,Math.min(i,n));e.some(s=\u003eMath.abs(s-r)\u003c=q3)||e.push(r)}getEdgeSamples(e,n,o){const i=[],r=n-e;if(this.pushEdgeSample(i,o,e,n),r\u003c=q3)return i;this.pushEdgeSample(i,e,e,n),this.pushEdgeSample(i,n,e,n),this.pushEdgeSample(i,(e+n)/2,e,n);const s=Math.max(e,Math.min(n,o)),a=Math.max(this.requiredViaToViaClearance,q3),A=Math.ceil(r/a);for(let c=1;c\u003c=A;c++){const l=c*a;this.pushEdgeSample(i,s+l,e,n),this.pushEdgeSample(i,s-l,e,n)}return i}isInsideBoard(e){return e.x\u003e=this.ogSrj.bounds.minX+this.viaRadius\u0026\u0026e.x\u003c=this.ogSrj.bounds.maxX-this.viaRadius\u0026\u0026e.y\u003e=this.ogSrj.bounds.minY+this.viaRadius\u0026\u0026e.y\u003c=this.ogSrj.bounds.maxY-this.viaRadius\u0026\u0026(!(this.ogSrj.outline\u0026\u0026this.ogSrj.outline.length\u003e=3)||X7e(e,this.ogSrj.outline))}hasClearEscapePath(e){const{sourcePoint:n,candidate:o,sourceLayer:i,sourceObstacle:r}=e;if(this.ogSrj.outline\u0026\u0026this.ogSrj.outline.length\u003e=3\u0026\u0026$z({start:n,end:o,polygon:this.ogSrj.outline,margin:this.requiredTraceClearance}))return!1;for(const s of this.ogSrj.obstacles){if(s===r||!s.layers.includes(i))continue;if(pSe(o,s))return!1;const a=c6e(s);if(Math.min(...a.map(A=\u003eqQ(n,o,A.start,A.end)))+q3\u003cthis.requiredTraceClearance)return!1}return!0}getBoardBoundarySegments(){if(this.ogSrj.outline\u0026\u0026this.ogSrj.outline.length\u003e=3)return this.ogSrj.outline.map((r,s)=\u003e({start:r,end:this.ogSrj.outline[(s+1)%this.ogSrj.outline.length]}));const{minX:e,maxX:n,minY:o,maxY:i}=this.ogSrj.bounds;return[{start:{x:e,y:o},end:{x:n,y:o}},{start:{x:n,y:o},end:{x:n,y:i}},{start:{x:n,y:i},end:{x:e,y:i}},{start:{x:e,y:i},end:{x:e,y:o}}]}getRayProbeDistance(){const{minX:e,maxX:n,minY:o,maxY:i}=this.ogSrj.bounds;return 2*Math.hypot(n-e,i-o)+this.viaDiameter}getRayIntersectionDistance(e){const{rayStart:n,rayEnd:o,segmentStart:i,segmentEnd:r}=e;if(!Uh(n,o,i,r))return null;const s=DD(n,o,i,r);if(!s)return null;const a=no(n,s);return a\u003c=q3?null:a}getProjectedFreeSpace(e){const{sourcePoint:n,candidate:o}=e,i=o.x-n.x,r=o.y-n.y;return Math.abs(i)\u003c=q3||Math.abs(r)\u003c=q3?this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:i,y:r},travelDistance:no(n,o)}):Math.min(this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:0,y:Math.sign(r)},travelDistance:Math.abs(r)}),this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:Math.sign(i),y:Math.sign(r)},travelDistance:no(n,o)}),this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:Math.sign(i),y:0},travelDistance:Math.abs(i)}))}getProjectedFreeSpaceAlongDirection(e){const{sourcePoint:n,sourceLayer:o,sourceObstacle:i,direction:r,travelDistance:s}=e,a=Math.hypot(r.x,r.y);if(a\u003c=q3||s\u003c=q3)return 0;const A=this.getRayProbeDistance(),c=r.x/a,l=r.y/a,u={x:n.x+c*A,y:n.y+l*A};let g=Number.POSITIVE_INFINITY;for(const h of this.ogSrj.obstacles)if(h!==i\u0026\u0026h.layers.includes(o))for(const d of c6e(h)){const p=this.getRayIntersectionDistance({rayStart:n,rayEnd:u,segmentStart:d.start,segmentEnd:d.end});p!==null\u0026\u0026(g=Math.min(g,p))}for(const h of this.getBoardBoundarySegments()){const d=this.getRayIntersectionDistance({rayStart:n,rayEnd:u,segmentStart:h.start,segmentEnd:h.end});d!==null\u0026\u0026(g=Math.min(g,d))}return Number.isFinite(g)?Math.max(0,g-s):0}getMinBlockingClearance(e){const{candidate:n,connectionNetIds:o,sourceZ:i,targetZ:r}=e,s=Math.min(i,r),a=Math.max(i,r);let A=Number.POSITIVE_INFINITY;for(const c of this.ogSrj.obstacles){const l=this.getObstacleZs(c);if(!l.some(g=\u003eg\u003e=s\u0026\u0026g\u003c=a)||c.isCopperPour\u0026\u0026!l.includes(i))continue;const u=o7(n,c)-this.viaRadius;if(A=Math.min(A,u),A+q3\u003cthis.requiredViaToPadClearance)return A}return A}getMinPlacedEscapeViaClearance(e){let n=Number.POSITIVE_INFINITY;for(const o of this.createdEscapeVias){const i=no(e,o)-this.viaDiameter;if(n=Math.min(n,i),n+q3\u003cthis.obstacleMargin)return n}return n}selectPointOwner(e){const{point:n,groupConnections:o,matchingCopperPours:i}=e,r=iae(n),s=o.map(a=\u003e({connection:a,pointIndex:a.pointsToConnect.findIndex(A=\u003eiae(A)===r)})).filter(a=\u003ea.pointIndex!==-1);return s.length===0?null:(s.sort((a,A)=\u003e{const c=i.some(l=\u003ethis.obstacleMatchesConnectionNet(l,this.getConnectionNetIds(a.connection)));return c!==i.some(l=\u003ethis.obstacleMatchesConnectionNet(l,this.getConnectionNetIds(A.connection)))?c?-1:1:a.pointIndex-A.pointIndex}),s[0])}findBestEscapeViaCandidate(e){const{connection:n,point:o,pointIndex:i,matchingCopperPours:r,connectionNetIds:s,sourceObstacle:a}=e;if(!ND(o))return null;const A=o.layer,c=Kr(A,this.ogSrj.layerCount),l=a??this.selectSourceObstacle({point:o,sourceLayer:A,connectionNetIds:s}),u=this.getCandidatePositions(o,l);let g=null;for(const h of r){const d=h.layers[0];if(!d||d===A)continue;const p=Kr(d,this.ogSrj.layerCount),m=s0o(h);for(const _ of u){if(!this.isInsideBoard(_)||!pSe(_,h)||!this.hasClearEscapePath({sourcePoint:o,candidate:_,sourceLayer:A,sourceObstacle:l}))continue;const f=this.getMinBlockingClearance({candidate:_,connectionNetIds:s,sourceZ:c,targetZ:p});if(f+q3\u003cthis.requiredViaToPadClearance)continue;const I=this.getMinPlacedEscapeViaClearance(_);if(I+q3\u003cthis.obstacleMargin)continue;const C=this.getProjectedFreeSpace({sourcePoint:o,candidate:_,sourceLayer:A,sourceObstacle:l}),y=Math.min(C,3),x=100*f-no(o,_)-.5*Math.abs(p-c)+2*y+(Number.isFinite(I)?10*Math.min(I,this.requiredViaToViaClearance):0);(!g||x\u003eg.score)\u0026\u0026(g={pointId:`${mSe}${n.name}:${o.pointId??`p${i}`}:${d}:${this.nextEscapeViaIndex++}`,x:_.x,y:_.y,connectionName:n.name,rootConnectionName:n.__rootConnectionNames?.[0]??n.name,sourcePointIndex:i,sourcePointId:o.pointId,sourceLayer:A,targetLayer:d,targetPourKey:m,score:x})}}return g}buildPointPlacementPlans(e){const{mergedConnection:n,groupConnections:o,matchingCopperPours:i,connectionNetIds:r}=e,s=[];for(const a of n.pointsToConnect){const A=this.selectPointOwner({point:a,groupConnections:o,matchingCopperPours:i});if(!A)continue;const c=ND(a)?this.selectSourceObstacle({point:a,sourceLayer:a.layer,connectionNetIds:r}):void 0,l=ND(a)?this.getCandidatePositions(a,c).length:0;s.push({point:a,pointOwner:A,sourceObstacle:c,candidateCount:l})}return s.sort((a,A)=\u003e{if(a.candidateCount!==A.candidateCount)return a.candidateCount-A.candidateCount;const c=(a.sourceObstacle?.width??0)*(a.sourceObstacle?.height??0),l=(A.sourceObstacle?.width??0)*(A.sourceObstacle?.height??0);return c!==l?c-l:a.pointOwner.pointIndex-A.pointOwner.pointIndex})}_step(){const e=this.ogSrj.obstacles.filter(a=\u003ea.isCopperPour),n=this.ogSrj.connections,o=n.map(a=\u003estructuredClone(a)),i=new Map(o.map(a=\u003e[a.name,a])),r=structuredClone(this.ogSrj.obstacles),s=Yft([...n]);for(const a of s){const A=new Set(a.__rootConnectionNames??[a.name]),c=n.filter(p=\u003e(p.__rootConnectionNames??[p.name]).some(m=\u003eA.has(m)));if(c.length===0)continue;const l=new Set;for(const p of c)for(const m of this.getConnectionNetIds(p))l.add(m);const u=e.filter(p=\u003ethis.obstacleMatchesConnectionNet(p,l));if(u.length===0)continue;const g=new Map,h=new Map,d=this.buildPointPlacementPlans({mergedConnection:a,groupConnections:c,matchingCopperPours:u,connectionNetIds:l});for(const{point:p,pointOwner:m,sourceObstacle:_}of d){const f=this.findBestEscapeViaCandidate({connection:m.connection,point:p,pointIndex:m.pointIndex,matchingCopperPours:u,connectionNetIds:l,sourceObstacle:_});if(!f)continue;const I=i.get(m.connection.name);if(!I||I.pointsToConnect.some(y=\u003eND(y)\u0026\u0026y.layer===f.sourceLayer\u0026\u0026mBt(y,f)))continue;I.pointsToConnect.push({x:f.x,y:f.y,layer:f.sourceLayer,pointId:f.pointId,terminalVia:{toLayer:f.targetLayer,viaDiameter:this.viaDiameter}}),this.escapeViaMetadataByPointId.set(f.pointId,f),this.createdEscapeVias.push(f),r.push(this.createEscapeViaObstacle({escapeVia:f,connectionNetIds:this.getConnectionNetIds(m.connection)}));const C=g.get(f.targetPourKey);C?C.push(f.pointId):g.set(f.targetPourKey,[f.pointId]),h.has(f.targetPourKey)||h.set(f.targetPourKey,m.connection.name)}for(const[p,m]of g.entries()){if(m.length\u003c=1)continue;const _=h.get(p);if(!_)continue;const f=i.get(_);f\u0026\u0026(f.externallyConnectedPointIds=[...f.externallyConnectedPointIds??[],m])}}this.outputSrj={...structuredClone(this.ogSrj),connections:o,obstacles:r},this.solved=!0}getOutputSimpleRouteJson(){return structuredClone(this.outputSrj)}getEscapeViaMetadataByPointId(){return new Map(this.escapeViaMetadataByPointId)}visualize(){return{title:\"Escape Via Location Solver\",points:this.outputSrj.connections.flatMap(e=\u003ee.pointsToConnect.map(n=\u003e({x:n.x,y:n.y,color:n.pointId?.startsWith(mSe)===!0?\"#0f766e\":\"#dc2626\",label:n.pointId?.startsWith(mSe)===!0?`${e.name}\nescape via`:e.name}))),lines:this.createdEscapeVias.map(e=\u003e{const n=this.outputSrj.connections.find(o=\u003eo.name===e.connectionName)?.pointsToConnect[e.sourcePointIndex]??null;return{points:n?[{x:n.x,y:n.y},{x:e.x,y:e.y}]:[{x:e.x,y:e.y}],strokeColor:\"#0f766e\"}}),circles:this.createdEscapeVias.map(e=\u003e({center:{x:e.x,y:e.y},radius:this.viaRadius,strokeColor:\"#0f766e\",label:`${e.connectionName}\n${e.targetLayer}`})),rects:this.outputSrj.obstacles.filter(e=\u003e!e.isCopperPour).map(e=\u003e({...e,fill:\"rgba(220,38,38,0.12)\"}))}}},a0o=t=\u003e({...t}),Qv=t=\u003e({...t,route:t.route?.map(a0o),vias:t.vias?.map(e=\u003e({...e}))}),lB=t=\u003et.map(Qv),_Bt=\"#0000FF\",_Se=.15,Qr=1e-6,gW=.1,nH=[\"top\",\"bottom\",\"left\",\"right\"],fSe=t=\u003et.x*t.x+t.y*t.y,LAe=(t,e)=\u003e({x:t.x-e.x,y:t.y-e.y}),vv=(t,e,n)=\u003e{const o=LAe(n,e),i=fSe(o);if(i\u003c=Qr)return Math.sqrt(fSe(LAe(t,e)));const r=(a=LAe(t,e),A=o,s=(a.x*A.x+a.y*A.y)/i,Math.max(0,Math.min(1,s)));var s,a,A;const c={x:e.x+o.x*r,y:e.y+o.y*r};return Math.sqrt(fSe(LAe(t,c)))},Ab=t=\u003et?.z===1?\"bottom\":\"top\",A0o=(t,e,n)=\u003e(t.z??0)===(e.z??0)\u0026\u0026(e.z??0)===(n.z??0)\u0026\u0026(t.x===e.x\u0026\u0026e.x===n.x||t.y===e.y\u0026\u0026e.y===n.y),HAe=(t,e,n)=\u003e{const o=n?.get(t);if(o)return o;const i=t.route??[],r=t.traceThickness??_Se;let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=!1;const u=(h,d,p)=\u003e{s=Math.min(s,h-p),a=Math.min(a,d-p),A=Math.max(A,h+p),c=Math.max(c,d+p),l=!0},g={segments:[],segmentsByLayer:{top:[],bottom:[]},vias:(t.vias??[]).map(h=\u003e{const d=(h.diameter??t.viaDiameter??.3)/2;return u(h.x,h.y,d),{center:{x:h.x,y:h.y},radius:d,routeIndex:e}}),bounds:{minX:0,minY:0,maxX:0,maxY:0}};for(let h=0;h\u003ci.length-1;){const d=i[h];let p=h+1,m=i[p];const _=r/2;for(d\u0026\u0026u(d.x,d.y,_),m\u0026\u0026u(m.x,m.y,_);p\u003ci.length-1;){const C=i[p],y=i[p+1];if(!d||!C||!y||Ab(d)!==Ab(C)||Ab(C)!==Ab(y)||!A0o(d,C,y))break;p+=1,m=y,u(y.x,y.y,_)}if(!d||!m){h+=1;continue}const f=Ab(d),I={start:d,end:m,routeIndex:e,pointIndex:h,endPointIndex:p,thickness:r,halfThickness:_,layer:f,minX:Math.min(d.x,m.x)-_,maxX:Math.max(d.x,m.x)+_,minY:Math.min(d.y,m.y)-_,maxY:Math.max(d.y,m.y)+_};g.segments.push(I),g.segmentsByLayer[f].push(I),h=p}if(!l)for(const h of i)u(h.x,h.y,r/2);return g.bounds=l?{minX:s,minY:a,maxX:A,maxY:c}:{minX:0,minY:0,maxX:0,maxY:0},n?.set(t,g),g},OAe=(t,e,n)=\u003ee.x\u003c=Math.max(t.x,n.x)+Qr\u0026\u0026e.x\u003e=Math.min(t.x,n.x)-Qr\u0026\u0026e.y\u003c=Math.max(t.y,n.y)+Qr\u0026\u0026e.y\u003e=Math.min(t.y,n.y)-Qr,GAe=(t,e,n)=\u003e(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y),ISe=(t,e,n,o)=\u003e((i,r,s,a)=\u003e{const A=GAe(i,r,s),c=GAe(i,r,a),l=GAe(s,a,i),u=GAe(s,a,r);return!!(Math.abs(A)\u003c=Qr\u0026\u0026OAe(i,s,r))||!!(Math.abs(c)\u003c=Qr\u0026\u0026OAe(i,a,r))||!!(Math.abs(l)\u003c=Qr\u0026\u0026OAe(s,i,a))||!!(Math.abs(u)\u003c=Qr\u0026\u0026OAe(s,r,a))||A\u003e0!=c\u003e0\u0026\u0026l\u003e0!=u\u003e0})(t,e,n,o)?0:Math.min(vv(t,n,o),vv(e,n,o),vv(n,t,e),vv(o,t,e)),Q7=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=Qr\u0026\u0026Math.abs(t.y-e.y)\u003c=Qr,fBt=(t,e)=\u003eQ7(t.start,e.start)||Q7(t.start,e.end)||Q7(t.end,e.start)||Q7(t.end,e.end),IBt=t=\u003e{if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=\u003e!!n);return Array.from(new Set(e))},c0o=(t,e)=\u003e{const n=IBt(t),o=IBt(e);return n.length!==0\u0026\u0026o.length!==0\u0026\u0026n.some(i=\u003eo.includes(i))},l0o=(t,e,n)=\u003et.minX-n\u003c=e.maxX\u0026\u0026t.maxX+n\u003e=e.minX\u0026\u0026t.minY-n\u003c=e.maxY\u0026\u0026t.maxY+n\u003e=e.minY,u0o=(t,e,n)=\u003e{const o=n+t.halfThickness+e.halfThickness-Qr;return t.minX-n\u003c=e.maxX\u0026\u0026t.maxX+n\u003e=e.minX\u0026\u0026t.minY-n\u003c=e.maxY\u0026\u0026t.maxY+n\u003e=e.minY\u0026\u0026o\u003e0},CBt=(t,e,n,o)=\u003e{const i=o+n.halfThickness+e-Qr,r=t.x-i,s=t.x+i,a=t.y-i,A=t.y+i;return r\u003c=n.maxX\u0026\u0026s\u003e=n.minX\u0026\u0026a\u003c=n.maxY\u0026\u0026A\u003e=n.minY},g0o=(t,e)=\u003e{const n=new WeakMap,o=t.map((a,A)=\u003eHAe(a,A,n)),i=[],r=new Set,s=a=\u003e{r.has(a.label)||(r.add(a.label),i.push(a))};for(let a=0;a\u003co.length;a+=1){const A=o[a];if(A)for(let c=a+1;c\u003co.length;c+=1){const l=o[c];if(l\u0026\u0026!c0o(t[a],t[c])\u0026\u0026l0o(A.bounds,l.bounds,e)){for(const u of[\"top\",\"bottom\"]){const g=A.segmentsByLayer[u],h=l.segmentsByLayer[u];for(const d of g)for(const p of h){if(fBt(d,p)||!u0o(d,p,e))continue;const m=e+(d.thickness+p.thickness)/2-Qr;ISe(d.start,d.end,p.start,p.end)\u003e=m||s({center:{x:(Math.max(d.minX-e,p.minX-e)+Math.min(d.maxX+e,p.maxX+e))/2,y:(Math.max(d.minY-e,p.minY-e)+Math.min(d.maxY+e,p.maxY+e))/2},label:`trace-violation:${a}:s${d.pointIndex}:${c}:s${p.pointIndex}:${u}`})}}for(const u of A.segments)for(const[g,h]of l.vias.entries()){if(!CBt(h.center,h.radius,u,e))continue;const d=e+u.halfThickness+h.radius-Qr;vv(h.center,u.start,u.end)\u003e=d||s({center:h.center,label:`trace-violation:${a}:s${u.pointIndex}:${c}:v${g}`})}for(const u of l.segments)for(const[g,h]of A.vias.entries()){if(!CBt(h.center,h.radius,u,e))continue;const d=e+u.halfThickness+h.radius-Qr;vv(h.center,u.start,u.end)\u003e=d||s({center:h.center,label:`trace-violation:${a}:v${g}:${c}:s${u.pointIndex}`})}}}}return(a=\u003e{const A=[];for(const c of a){const l=A.find(u=\u003e{return g=u.center,h=c.center,Math.hypot(g.x-h.x,g.y-h.y)\u003c=.28;var g,h});l?(l.center={x:(l.center.x*l.count+c.center.x)/(l.count+1),y:(l.center.y*l.count+c.center.y)/(l.count+1)},l.labels.push(c.label),l.count+=1):A.push({center:c.center,labels:[c.label],count:1})}return A.map((c,l)=\u003e({center:c.center,radius:Math.min(.3,.2+.035*Math.sqrt(c.count-1)),stroke:\"#f59e0b\",fill:\"rgba(245, 158, 11, 0.46)\",label:c.count===1?c.labels[0]:`trace-violations:${l}:count-${c.count}`}))})(i)},wv=({routeIndexes:t,layers:e,routePointIndexes:n})=\u003e`${t[0]}:${e[0]}:${n[0].join(\",\")}:${t[1]}:${e[1]}:${n[1].join(\",\")}`,YAe=(t,e,n,o,i,r,s)=\u003e{const a=((c,l,u,g,h,d)=\u003ec\u003cu?`${c}:${l}:${h.join(\",\")}:${u}:${g}:${d.join(\",\")}`:`${u}:${g}:${d.join(\",\")}:${c}:${l}:${h.join(\",\")}`)(e,n,o,i,r,s),A=t.get(a);if(A){const[c,l]=e\u003co?[r,s]:[s,r];for(const u of c)A.routePointIndexes[0].includes(u)||A.routePointIndexes[0].push(u);for(const u of l)A.routePointIndexes[1].includes(u)||A.routePointIndexes[1].push(u);return A.routePointIndexes[0].sort((u,g)=\u003eu-g),void A.routePointIndexes[1].sort((u,g)=\u003eu-g)}e\u003co?t.set(a,{routeIndexes:[e,o],layers:[n,i],routePointIndexes:[[...new Set(r)].sort((c,l)=\u003ec-l),[...new Set(s)].sort((c,l)=\u003ec-l)]}):t.set(a,{routeIndexes:[o,e],layers:[i,n],routePointIndexes:[[...new Set(s)].sort((c,l)=\u003ec-l),[...new Set(r)].sort((c,l)=\u003ec-l)]})},UAe=t=\u003e{const e=[];for(let n=t.pointIndex;n\u003c=t.endPointIndex;n+=1)e.push(n);return e},Pv=(t,e)=\u003e!e||t.some(n=\u003ee.has(n)),KAe=(t,e)=\u003e{const n=t.route??[],o=[];for(let i=0;i\u003cn.length;i+=1){const r=n[i];r\u0026\u0026Math.abs(r.x-e.center.x)\u003c=Qr\u0026\u0026Math.abs(r.y-e.center.y)\u003c=Qr\u0026\u0026o.push(i)}return o},d0o=(t,e,n)=\u003et.minX-n\u003c=e.maxX\u0026\u0026t.maxX+n\u003e=e.minX\u0026\u0026t.minY-n\u003c=e.maxY\u0026\u0026t.maxY+n\u003e=e.minY,h0o=(t,e,n)=\u003e{const o=n+t.halfThickness+e.halfThickness-Qr;return t.minX-n\u003c=e.maxX\u0026\u0026t.maxX+n\u003e=e.minX\u0026\u0026t.minY-n\u003c=e.maxY\u0026\u0026t.maxY+n\u003e=e.minY\u0026\u0026o\u003e0},yBt=(t,e,n,o)=\u003e{const i=o+n.halfThickness+e-Qr,r=t.x-i,s=t.x+i,a=t.y-i,A=t.y+i;return r\u003c=n.maxX\u0026\u0026s\u003e=n.minX\u0026\u0026a\u003c=n.maxY\u0026\u0026A\u003e=n.minY},p0o=(t,e,n)=\u003e{const o=n+t.radius+e.radius-Qr;return Math.abs(t.center.x-e.center.x)\u003c=o\u0026\u0026Math.abs(t.center.y-e.center.y)\u003c=o},Fy=(t,e,n,o,i)=\u003e{const r=t.map((l,u)=\u003eHAe(l,u,o)),s=new Map;if(e.size===0)return[];const a=Array.from(e),A=new Map,c=l=\u003e{const u=A.get(l);if(u)return u;const g=r[l];if(!g)return[];const h=[];for(let d=0;d\u003cr.length;d+=1){if(d===l)continue;const p=r[d];p\u0026\u0026d0o(g.bounds,p.bounds,n)\u0026\u0026h.push(d)}return A.set(l,h),h};for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.segments){const p=UAe(d);if(Pv(p,h))for(const m of g){if(l\u003em\u0026\u0026e.has(m))continue;const _=r[m];if(!_)continue;const f=i?.get(m),I=_.segmentsByLayer[d.layer];for(const C of I){const y=UAe(C);if(!Pv(y,f)||fBt(d,C)||!h0o(d,C,n))continue;const x=n+(d.thickness+C.thickness)/2-Qr;ISe(d.start,d.end,C.start,C.end)\u003cx\u0026\u0026YAe(s,d.routeIndex,d.layer,C.routeIndex,C.layer,p,y)}}}}for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.vias){const p=KAe(t[d.routeIndex],d);if(Pv(p,h))for(const m of g){if(l\u003em\u0026\u0026e.has(m))continue;const _=r[m];if(!_)continue;const f=i?.get(m);for(const I of _.segments){const C=UAe(I);if(!Pv(C,f)||!yBt(d.center,d.radius,I,n))continue;const y=n+I.thickness/2+d.radius-Qr;vv(d.center,I.start,I.end)\u003cy\u0026\u0026YAe(s,I.routeIndex,I.layer,d.routeIndex,\"via\",C,p)}}}}for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.segments){const p=UAe(d);if(Pv(p,h))for(const m of g){const _=r[m];if(!_)continue;const f=i?.get(m);for(const I of _.vias){const C=KAe(t[I.routeIndex],I);if(!Pv(C,f)||!yBt(I.center,I.radius,d,n))continue;const y=n+d.thickness/2+I.radius-Qr;vv(I.center,d.start,d.end)\u003cy\u0026\u0026YAe(s,d.routeIndex,d.layer,I.routeIndex,\"via\",p,C)}}}}for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.vias){const p=KAe(t[d.routeIndex],d);if(Pv(p,h))for(const m of g){if(l\u003em\u0026\u0026e.has(m))continue;const _=r[m];if(!_)continue;const f=i?.get(m);for(const I of _.vias){const C=KAe(t[I.routeIndex],I);if(!Pv(C,f)||!p0o(d,I,n))continue;const y=n+d.radius+I.radius-Qr;Math.hypot(d.center.x-I.center.x,d.center.y-I.center.y)\u003cy\u0026\u0026YAe(s,d.routeIndex,\"via\",I.routeIndex,\"via\",p,C)}}}}return Array.from(s.values())},xBt=(t,e)=\u003et.x\u003e=e.minX-Qr\u0026\u0026t.x\u003c=e.maxX+Qr\u0026\u0026t.y\u003e=e.minY-Qr\u0026\u0026t.y\u003c=e.maxY+Qr,m0o=(t,e,n)=\u003e{switch(e){case\"left\":return{minX:t.minX,maxX:t.minX+n,minY:t.minY,maxY:t.maxY};case\"right\":return{minX:t.maxX-n,maxX:t.maxX,minY:t.minY,maxY:t.maxY};case\"top\":return{minX:t.minX,maxX:t.maxX,minY:t.maxY-n,maxY:t.maxY};case\"bottom\":return{minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.minY+n}}},_0o=(t,e,n)=\u003e{const o=e.x-t.x,i=e.y-t.y;let r=0,s=1;const a=(c,l)=\u003e{if(Math.abs(c)\u003c=Qr)return l\u003e=-1e-6;const u=l/c;return c\u003c0?!(u\u003es)\u0026\u0026(u\u003er\u0026\u0026(r=u),!0):!(u\u003cr)\u0026\u0026(u\u003cs\u0026\u0026(s=u),!0)};if(!(a(-o,t.x-n.minX)\u0026\u0026a(o,n.maxX-t.x)\u0026\u0026a(-i,t.y-n.minY)\u0026\u0026a(i,n.maxY-t.y)))return 0;const A=Math.hypot(o,i);return Math.max(0,s-r)*A},EBt=(t,e)=\u003enH.filter(n=\u003e{switch(n){case\"left\":return Math.abs(t.x-e.minX)\u003c=Qr;case\"right\":return Math.abs(t.x-e.maxX)\u003c=Qr;case\"top\":return Math.abs(t.y-e.maxY)\u003c=Qr;case\"bottom\":return Math.abs(t.y-e.minY)\u003c=Qr}return!1}),BBt=(t,e)=\u003e{const n=[];return t.x\u003ce.minX-Qr\u0026\u0026n.push(\"left\"),t.x\u003ee.maxX+Qr\u0026\u0026n.push(\"right\"),t.y\u003ee.maxY+Qr\u0026\u0026n.push(\"top\"),t.y\u003ce.minY-Qr\u0026\u0026n.push(\"bottom\"),n},f0o=(t,e,n)=\u003e{const o=e.x-t.x,i=e.y-t.y;switch(n){case\"left\":case\"right\":return Math.abs(o)\u003c=Qr\u0026\u0026Math.abs(i)\u003eQr;case\"top\":case\"bottom\":return Math.abs(i)\u003c=Qr\u0026\u0026Math.abs(o)\u003eQr}},VAe=(t,e,n)=\u003e{const o=[],i=Math.max(n,Qr),r=Math.min(.1,i/4);for(let s=0;s\u003ct.length;s+=1){const a=t[s],A=a?.route??[];for(let c=0;c\u003cA.length-1;c+=1){const l=A[c],u=A[c+1];if(!l||!u)continue;const g=BBt(l,e),h=BBt(u,e),d=EBt(l,e),p=EBt(u,e),m=nH.filter(I=\u003e!(_0o(l,u,m0o(e,I,i))\u003c=r)\u0026\u0026!!f0o(l,u,I)),_=!xBt(l,e)||!xBt(u,e),f=Array.from(new Set([...m,...g,...h]));(_||f.length!==0)\u0026\u0026o.push({routeIndex:s,connectionName:a.connectionName??a.rootConnectionName??`route-${s}`,segmentIndex:c,touchedSides:f,startSides:d,endSides:p,start:l,end:u})}}return o},CSe=t=\u003et?.center\u0026\u0026t.width\u0026\u0026t.height?{minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2,width:t.width,height:t.height,center:t.center}:null,bBt=t=\u003et===\"bottom\"?_Bt:\"#FF0000\",ySe=t=\u003e{const e=t.route??[],n=[];if(e.length\u003c2)return n;let o=Ab(e[0]),i=[e[0]];for(let r=1;r\u003ce.length;r+=1){const s=e[r],a=Ab(s);a===o?i.push(s):(i.length\u003e=2\u0026\u0026n.push({points:i,strokeColor:bBt(o),strokeWidth:t.traceThickness??_Se,label:t.connectionName??\"route\"}),o=a,i=[e[r-1],s])}return i.length\u003e=2\u0026\u0026n.push({points:i,strokeColor:bBt(o),strokeWidth:t.traceThickness??_Se,label:t.connectionName??\"route\"}),n},I0o=(t,e)=\u003e({title:`HighDensityRepair02 Initial State (margin=${e})`,routes:t}),zAe=t=\u003e{const e=[];for(const n of t){const o=e[e.length-1];o\u0026\u0026o.z===n.z\u0026\u0026Q7(o,n)||e.push(n)}return e},C0o=(t,e,n)=\u003e{const o=Math.max(0,t.minX-e.maxX,e.minX-t.maxX),i=Math.max(0,t.minY-e.maxY,e.minY-t.maxY);return Math.hypot(o,i)\u003c=n+Qr},SBt=(t,e)=\u003e{let n=Number.POSITIVE_INFINITY;for(const o of t.segments)for(const i of e.segments){if(o.layer!==i.layer)continue;const r=ISe(o.start,o.end,i.start,i.end)-(o.thickness+i.thickness)/2;n=Math.min(n,r)}return n},xSe=({currentRoutes:t,candidateRoutes:e,candidateRouteIndexes:n,maximumAllowedClearance:o})=\u003e{const i=new WeakMap,r=new WeakMap,s=[],a=Array.from(n).sort((u,g)=\u003eu-g),A=t.map((u,g)=\u003eHAe(u,g,i)),c=e.map((u,g)=\u003eHAe(u,g,r)),l=new Set;for(const u of a)for(let g=0;g\u003ce.length;g+=1){if(g===u)continue;const h=Math.min(u,g),d=Math.max(u,g),p=`${h}:${d}`;if(l.has(p))continue;l.add(p);const m=c[h],_=c[d];if(!m||!_||!C0o(m.bounds,_.bounds,o))continue;const f=SBt(m,_);if(!Number.isFinite(f)||f\u003eo+Qr||!A[h]||!A[d])continue;const I=SBt(A[h],A[d]);!Number.isFinite(I)||f\u003e=I-Qr||s.push({routeIndexes:[h,d],previousClearance:I,nextClearance:f})}return s},JAe=.001,y0o=(t,e)=\u003et.map(n=\u003e{const o=n.route??[];return o.length===0?n:{...n,route:o.map((i,r)=\u003er===0||r===o.length-1?((s,a)=\u003e{const A={...s};return Math.abs(A.x-a.minX)\u003c=JAe?A.x=a.minX:Math.abs(A.x-a.maxX)\u003c=JAe\u0026\u0026(A.x=a.maxX),Math.abs(A.y-a.minY)\u003c=JAe?A.y=a.minY:Math.abs(A.y-a.maxY)\u003c=JAe\u0026\u0026(A.y=a.maxY),A})(i,e):i)}}),x0o=(t,e)=\u003eArray.from(e).flatMap(n=\u003eySe(t[n]).map(o=\u003e({...o,strokeColor:\"#000000\",strokeWidth:o.strokeWidth,label:`candidate:${o.label}`}))),QBt=(t,e,n,o,i)=\u003e{const r=\"rgba(0, 0, 0, 0)\";switch(e){case\"left\":return{center:{x:t.minX+n/2,y:t.center.y},width:n,height:t.height,stroke:r,fill:o,label:i};case\"right\":return{center:{x:t.maxX-n/2,y:t.center.y},width:n,height:t.height,stroke:r,fill:o,label:i};case\"top\":return{center:{x:t.center.x,y:t.maxY-n/2},width:t.width,height:n,stroke:r,fill:o,label:i};case\"bottom\":return{center:{x:t.center.x,y:t.minY+n/2},width:t.width,height:n,stroke:r,fill:o,label:i}}},E0o=({routes:t,candidateRoutes:e,candidateRouteIndexes:n,originalRoutes:o,boundary:i,side:r,margin:s,rejected:a,rejectionReason:A})=\u003e{const c=Array.from(n).map(l=\u003ee[l].connectionName??`route-${l}`);return{title:a?`${r} move rejected (${A})`:`${r} move accepted`,routes:a?t:e,originalRoutes:o,activeSide:r,candidateRouteNames:c,overlayLines:a?x0o(e,n):[],overlayRects:[QBt(i,r,s,a?\"rgba(220, 38, 38, 0.14)\":\"rgba(16, 185, 129, 0.14)\",a?`rejected:${r}`:`accepted:${r}`)]}},B0o=(t,e,n,o)=\u003e{const i=(t?.adjacentObstacles??[]).some(r=\u003e((s,a,A,c)=\u003e{const l=(u=\u003eu.center\u0026\u0026u.width\u0026\u0026u.height?{minX:u.center.x-u.width/2,maxX:u.center.x+u.width/2,minY:u.center.y-u.height/2,maxY:u.center.y+u.height/2}:null)(s);if(!l)return!1;switch(A){case\"left\":return l.maxX\u003e=a.minX-Qr\u0026\u0026l.minX\u003c=a.minX+c+Qr;case\"right\":return l.minX\u003c=a.maxX+Qr\u0026\u0026l.maxX\u003e=a.maxX-c-Qr;case\"top\":return l.minY\u003c=a.maxY+Qr\u0026\u0026l.maxY\u003e=a.maxY-c-Qr;case\"bottom\":return l.maxY\u003e=a.minY-Qr\u0026\u0026l.minY\u003c=a.minY+c+Qr}})(r,e,n,o));return{hasObstacle:i,moveAmount:i?o:o/2}},b0o=({start:t,end:e,side:n,boundary:o,amount:i,targetAxisValue:r})=\u003e{const s=(({side:a,boundary:A,amount:c,targetAxisValue:l})=\u003e{const u=l??(()=\u003e{switch(a){case\"left\":return A.minX+c;case\"right\":return A.maxX-c;case\"top\":return A.maxY-c;case\"bottom\":return A.minY+c}})();switch(a){case\"left\":case\"right\":return Math.min(Math.max(u,A.minX),A.maxX);case\"top\":case\"bottom\":return Math.min(Math.max(u,A.minY),A.maxY)}})({side:n,boundary:o,amount:i,targetAxisValue:r});switch(n){case\"left\":case\"right\":return zAe([t,{x:s,y:t.y,z:t.z},{x:s,y:e.y,z:e.z},e]);case\"top\":case\"bottom\":return zAe([t,{x:t.x,y:s,z:t.z},{x:e.x,y:s,z:e.z},e])}},S0o=(t,e,n,o,i,r,s,a=!1)=\u003e{const A=t.route??[];if(A.length\u003c2||e.length===0)return Qv(t);const c=a?i:Math.max(i,r),l=((g,h)=\u003e{switch(g){case\"left\":return{x:h,y:0};case\"right\":return{x:-h,y:0};case\"top\":return{x:0,y:-h};case\"bottom\":return{x:0,y:h}}})(o,c);if(a||(t.vias?.length??0)\u003e0||A.length\u003e2){const g=Qv(t),h=g.route??[];for(const d of e){const p=h[d];p\u0026\u0026(h[d]={...p,x:p.x+l.x,y:p.y+l.y})}for(const d of g.vias??[])e.some(p=\u003e{const m=t.route?.[p];return!!m\u0026\u0026Q7(m,d)})\u0026\u0026(d.x+=l.x,d.y+=l.y);return g}const u=Qv(t);if(A.length===2\u0026\u0026e.length===2\u0026\u0026e[0]===0\u0026\u0026e[1]===1){const g=A[0],h=A[1];return Qv({...t,route:b0o({start:g,end:h,side:o,boundary:n,amount:c,targetAxisValue:s})})}return u},WAe=(t,e,n)=\u003e{switch(n){case\"left\":return t.x-e.minX;case\"right\":return e.maxX-t.x;case\"top\":return e.maxY-t.y;case\"bottom\":return t.y-e.minY}},vBt=(t,e,n)=\u003e{const o=(i=\u003e{const r=i.route??[];if(r.length===0)return[];const s=[];for(let a=0;a\u003cr.length;a+=1){const A=r[a];if(!A)continue;a===0||a===r.length-1||s.push(A);const c=r[a+1];c\u0026\u0026s.push({x:(A.x+c.x)/2,y:(A.y+c.y)/2})}return s})(t);return o.length===0?Number.POSITIVE_INFINITY:o.reduce((i,r)=\u003eMath.min(i,WAe(r,e,n)),Number.POSITIVE_INFINITY)},wBt=(t,e,n=[])=\u003e{const o=t.route??[],i=[],r=new Set,s=e.length===0||e.includes(\"via\");if(o.length===2)return[0,1];const a=A=\u003e{if(A\u003c=0||A\u003e=o.length-1||r.has(A))return;const c=o[A];c\u0026\u0026(s||e.includes(Ab(c)))\u0026\u0026(r.add(A),i.push(A))};if(n.length\u003e0)for(const A of n)a(A);else for(let A=1;A\u003co.length-1;A+=1)a(A);for(let A=0;A\u003ci.length;A+=1){const c=i[A],l=o[c];if(l)for(let u=1;u\u003co.length-1;u+=1){if(r.has(u))continue;const g=o[u];g\u0026\u0026g.z!==l.z\u0026\u0026Q7(g,l)\u0026\u0026(r.add(u),i.push(u))}}return i.sort((A,c)=\u003eA-c),i},PBt=(t,e)=\u003eMath.max(0,...(t.route??[]).map(n=\u003eMath.max(e.minX-n.x,n.x-e.maxX,e.minY-n.y,n.y-e.maxY,0))),oH=(t,e,n,o)=\u003eWAe(t,e,n)\u003c=o+Qr,MBt=(t,e,n,o)=\u003e{const i=t.route??[],r=[],s=new Set;let a=1,A=i.length-2;for(;a\u003ci.length-1\u0026\u0026Q7(i[a],i[0]);)a+=1;for(;A\u003e0\u0026\u0026Q7(i[A],i[i.length-1]);)A-=1;for(let c=a;c\u003c=A;c+=1)oH(i[c],e,n,o)\u0026\u0026(s.add(c),r.push(c));for(let c=0;c\u003cr.length;c+=1){const l=i[r[c]];if(l)for(let u=a;u\u003c=A;u+=1){if(s.has(u))continue;const g=i[u];g\u0026\u0026g.z!==l.z\u0026\u0026Q7(g,l)\u0026\u0026(s.add(u),r.push(u))}}return r.length===0\u0026\u0026i.length===2\u0026\u0026i.some(c=\u003eoH(c,e,n,o))?[0,1]:(r.sort((c,l)=\u003ec-l),r)},Q0o=(t,e,n)=\u003e{const o=t.route??[],i=n===0?o[0]:o[o.length-1];return i?nH.filter(r=\u003eWAe(i,e,r)\u003c=Qr):[]},v0o=(t,e,n)=\u003e{const o=t.route??[],i=e.route??[];if(o.length===0||i.length===0)return!0;for(const r of[0,-1]){const s=Q0o(t,n,r);if(s.length===0)continue;const a=r===0?i[0]:i[i.length-1];if(!a)return!1;for(const A of s)if(WAe(a,n,A)\u003eQr)return!1}return!0},w0o=(t,e)=\u003eMath.hypot(e.x-t.x,e.y-t.y),DBt=(t,e,n,o)=\u003e{const i=t.route??[];if(i.length===0)return\"none\";let r=!1;for(let s=0;s\u003ci.length;s+=1){const a=i[s];if(a\u0026\u0026oH(a,e,n,o)){if(s!==0\u0026\u0026s!==i.length-1)return\"interior\";r=!0}}for(let s=0;s\u003ci.length-1;s+=1){const a=i[s],A=i[s+1];if(a\u0026\u0026A\u0026\u0026oH(a,e,n,o)\u0026\u0026oH(A,e,n,o)\u0026\u0026!(w0o(a,A)\u003c=Qr))return\"interior\"}return r?\"endpoint\":\"none\"},NBt=({currentRoutes:t,routeIndex:e,side:n,moveSide:o=n,boundary:i,margin:r,moveAmount:s,geometryCache:a})=\u003e{const A=t[e],c=(A.route?.length??0)===2,l=MBt(A,i,n,r);if(l.length===0)return null;const u=new Set,g=new Map,h=new Set,d=t.slice();let p=!1,m=\"overlap\";const _=new Set([e]),f=new Map([[e,new Set]]),I=new Map([[e,new Set]]),C=[e];let y=0,x=null,E=null,B=null,S=null;const Q=R=\u003enew Set(R.map(F=\u003ewv(F))),w=()=\u003ex||(x=Fy(t,u,r,a,g),x),M=()=\u003eB||(B=Fy(t,u,0,a,g),B),k=()=\u003eS||(S=Fy(d,u,0,a,g),S);for(;y\u003cC.length\u0026\u0026!p;){const R=C[y];if(y+=1,_.delete(R),u.has(R))continue;const F=d[R],O=Array.from(f.get(R)??[]),U=Array.from(I.get(R)??[]);f.delete(R),I.delete(R);const Y=R===e?MBt(F,i,n,r):wBt(F,O,U);if(Y.length===0){if(R===e)return null;p=!0,m=\"eventual-overlap\";break}const W=F.route??[],te=R===e?void 0:o===\"left\"||o===\"right\"?(W[Y[0]]?.x??0)+(o===\"left\"?s:-s):(W[Y[0]]?.y??0)+(o===\"top\"?-s:s);d[R]=S0o(F,Y,i,o,s,r,te,R!==e),u.add(R),g.set(R,new Set(Y)),x=null,E=null,B=null,S=null,(F.route?.length??0)===2\u0026\u0026h.add(R);const j=PBt(t[R],i);if(PBt(d[R],i)\u003ej+1e-6){p=!0,m=\"boundary\";break}if(!v0o(t[R],d[R],i)){p=!0,m=\"endpoint-boundary\";break}const J=Fy(d,new Set([R]),r,a,new Map([[R,new Set(Y)]]));for(const oe of J){if(Q(w()).has(wv(oe)))continue;const[ie,ne]=oe.routeIndexes,le=u.has(ie),ge=u.has(ne);if(le\u0026\u0026ge)continue;const _e=le?ne:ie,ue=le?oe.layers[1]:oe.layers[0],fe=le?oe.routePointIndexes[1]:oe.routePointIndexes[0];if(u.has(_e)||_.has(_e)){if(_.has(_e)){const pe=f.get(_e)??new Set;pe.add(ue),f.set(_e,pe);const ye=I.get(_e)??new Set;for(const Me of fe)ye.add(Me);I.set(_e,ye)}}else _.add(_e),C.push(_e),f.set(_e,new Set([ue])),I.set(_e,new Set(fe))}}if(!p\u0026\u0026u.size\u003e1){const R=Q(w()),F=Q(E||(E=Fy(d,u,r,a,g),E));for(const O of F)if(!R.has(O)){p=!0,m=\"eventual-overlap\";break}}if(!p\u0026\u0026u.size\u003e1){const R=Q(M()),F=Q(k());for(const O of F)if(!R.has(O)){p=!0,m=\"eventual-overlap\";break}}if(!p){const R=new Set(Fy(t,u,0,a).map(O=\u003ewv(O))),F=Fy(d,u,0,a);for(const O of F){const U=wv(O);if(!R.has(U)){p=!0,m=\"eventual-overlap\";break}}}return p||(({currentRoutes:F,candidateRoutes:O,candidateRouteIndexes:U,boundary:Y,activeSide:W})=\u003e{const te=nH.filter(J=\u003eJ!==W),j=[];for(const J of U){const oe=F[J],ie=O[J];if(oe\u0026\u0026ie)for(const ne of te){const le=vBt(oe,Y,ne),ge=vBt(ie,Y,ne);le\u003eQr\u0026\u0026ge\u003c=Qr\u0026\u0026j.push({routeIndex:J,side:ne,previousClearance:le,nextClearance:ge})}}return j})({currentRoutes:t,candidateRoutes:d,candidateRouteIndexes:u,boundary:i,activeSide:n}).length\u003e0\u0026\u0026(p=!0,m=\"boundary-touch\"),p||(({currentRoutes:F,candidateRoutes:O,candidateRouteIndexes:U,geometryCache:Y,currentConflicts:W,candidateConflicts:te})=\u003e{const j=W??Fy(F,U,0,Y),J=te??Fy(O,U,0,Y),oe=new Set(j.map(ie=\u003ewv(ie)));return J.filter(ie=\u003e{const ne=wv(ie);if(oe.has(ne))return!1;const[le,ge]=ie.routeIndexes,[_e,ue]=ie.layers,fe=U.has(le),pe=U.has(ge);if(fe\u0026\u0026pe)return!1;const ye=fe?ue:_e,Me=O[fe?ge:le];return!!Me\u0026\u0026wBt(Me,[ye]).length===0})})({currentRoutes:t,candidateRoutes:d,candidateRouteIndexes:u,geometryCache:a,currentConflicts:M(),candidateConflicts:k()}).length\u003e0\u0026\u0026(p=!0,m=\"fixed-trace-touch\"),p||xSe({currentRoutes:t,candidateRoutes:d,candidateRouteIndexes:u,maximumAllowedClearance:Math.min(r/2,gW)}).length\u003e0\u0026\u0026(p=!0,m=\"trace-clearance\"),!p\u0026\u0026((R,F,O,U,Y,W)=\u003eArray.from(O).some(te=\u003e{const j=R[te],J=F[te];return nH.filter(oe=\u003eoe!==Y).some(oe=\u003e{const ie=DBt(j,U,oe,W),ne=DBt(J,U,oe,W);return ie===\"none\"\u0026\u0026ne!==\"none\"})}))(t,d,u,i,n,r)\u0026\u0026(p=!0,m=\"side-regression\"),{isTwoPointRoute:c,movableIndexes:l,candidateRouteIndexes:u,movedTwoPointRouteIndexes:h,candidateRoutes:d,rejected:p,rejectionReason:m}},P0o=(t,e,n,o,i)=\u003e{const r=t.route??[];if(e.length===0)return null;if(o===\"top\"||o===\"bottom\"){const a=e.reduce((A,c)=\u003eA+(r[c]?.x??n.center.x),0)/e.length;return a\u003cn.center.x-i/2?\"right\":a\u003en.center.x+i/2?\"left\":null}const s=e.reduce((a,A)=\u003ea+(r[A]?.y??n.center.y),0)/e.length;return s\u003en.center.y+i/2?\"bottom\":s\u003cn.center.y-i/2?\"top\":null},M0o=({side:t,sample:e,boundary:n,margin:o,repairedRoutes:i,frames:r,captureProgressFrames:s,lockedTwoPointRoutes:a,geometryCache:A,allowTwoPointWithoutObstacle:c=!1})=\u003e{const{hasObstacle:l,moveAmount:u}=B0o(e,n,t,o);s\u0026\u0026r.push(((d,p,m,_,f,I)=\u003e({title:`${m} boundary analysis: move=${f.toFixed(3)} (${I?\"obstacle-side\":\"clear-side\"})`,routes:d,activeSide:m,overlayRects:[QBt(p,m,_,\"rgba(245, 158, 11, 0.16)\",`strip:${m}`)]}))(lB(i),n,t,o,u,l));const g=new Set;let h=0;for(let d=0;d\u003ci.length;d+=1){if(g.has(d)||a.has(d))continue;const p=i[d];if((p.route?.length??0)===2\u0026\u0026!l\u0026\u0026!c)continue;let m=NBt({currentRoutes:i,routeIndex:d,side:t,boundary:n,margin:o,moveAmount:u,geometryCache:A});if(m){if(m.rejected){const _=P0o(p,m.movableIndexes,n,t,o);if(_){const f=NBt({currentRoutes:i,routeIndex:d,side:t,moveSide:_,boundary:n,margin:o,moveAmount:u,geometryCache:A});f\u0026\u0026!f.rejected\u0026\u0026(m=f)}}if(s\u0026\u0026r.push(E0o({routes:lB(i),candidateRoutes:m.candidateRoutes,candidateRouteIndexes:m.candidateRouteIndexes,originalRoutes:m.rejected?void 0:Array.from(m.candidateRouteIndexes).map(_=\u003eQv(i[_])),boundary:n,side:t,margin:o,rejected:m.rejected,rejectionReason:m.rejectionReason})),!m.rejected){i.splice(0,i.length,...m.candidateRoutes);for(const _ of m.movedTwoPointRouteIndexes)a.add(_);h+=1}g.add(d)}}return{movesAccepted:h}},dW=(t,e,n,o)=\u003eoH(t,e,n,o),hW=(t,e,n,o)=\u003e{switch(n){case\"left\":return{...t,x:Math.min(e.minX+o,e.maxX)};case\"right\":return{...t,x:Math.max(e.maxX-o,e.minX)};case\"top\":return{...t,y:Math.max(e.maxY-o,e.minY)};case\"bottom\":return{...t,y:Math.min(e.minY+o,e.maxY)}}},RBt=t=\u003e`${t.routeIndexes[0]}:${t.layers[0]}:${t.routeIndexes[1]}:${t.layers[1]}`,TBt=t=\u003e{if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=\u003e!!n);return Array.from(new Set(e))},kBt=(t,e)=\u003e{const n=TBt(t),o=TBt(e);return n.length!==0\u0026\u0026o.length!==0\u0026\u0026n.some(i=\u003eo.includes(i))},iH=(t,e,n)=\u003et?VAe([t],e,n).length:0,FBt=(t,e,n,o)=\u003e{const i=new Set(Fy(t,new Set([n]),o).map(wv));return Fy(e,new Set([n]),o).some(r=\u003e!i.has(wv(r)))},LBt=(t,e,n)=\u003eVAe(t,e,n).length,HBt=t=\u003e{if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=\u003e!!n);return Array.from(new Set(e))},OBt=(t,e)=\u003eFy(t,new Set(t.map((n,o)=\u003eo)),gW,e).filter(n=\u003e!(n.layers[0]===\"via\"\u0026\u0026n.layers[1]===\"via\"||((o,i)=\u003e{const r=HBt(o),s=HBt(i);return r.length!==0\u0026\u0026s.length!==0\u0026\u0026r.some(a=\u003es.includes(a))})(t[n.routeIndexes[0]],t[n.routeIndexes[1]]))).length,D0o=t=\u003e{const e=nH;return[...e.slice(t%e.length),...e.slice(0,t%e.length)]},N0o=(t,e,n=!1)=\u003e{const o=CSe(t?.nodeWithPortPoints),i=o?((g,h)=\u003eg.map(d=\u003e{const p=d.route??[];let m=!1;const _=p.map(f=\u003e{let I=f.x,C=f.y;return I\u003ch.minX?I=h.minX:I\u003eh.maxX\u0026\u0026(I=h.maxX),C\u003ch.minY?C=h.minY:C\u003eh.maxY\u0026\u0026(C=h.maxY),I===f.x\u0026\u0026C===f.y?f:(m=!0,{...f,x:I,y:C})});return m?{...d,route:_}:d}))(y0o(lB(t?.nodeHdRoutes??[]),o),o):lB(t?.nodeHdRoutes??[]),r=Math.max(e??.4,.05),s=lB(i);if(!o)return{boundary:null,baseRoutes:i,repairedRoutes:s,margin:r,frames:[{title:\"HighDensityRepair02 Missing Boundary\",routes:s}]};const a=n?[I0o(lB(s),r)]:[],A=new WeakMap;let c=LBt(s,o,r);for(let g=0;g\u003c1;g+=1){const h=new Set;let d=0;for(const m of D0o(g)){const{movesAccepted:_}=M0o({side:m,sample:t,boundary:o,frames:a,margin:r,repairedRoutes:s,captureProgressFrames:n,lockedTwoPointRoutes:h,geometryCache:A,allowTwoPointWithoutObstacle:g\u003e=1});d+=_}const p=LBt(s,o,r);if(d===0||p===0||p\u003e=c)break;c=p}const l=lB(s),u=OBt(s,A);return(({routes:g,boundary:h,margin:d,geometryCache:p})=\u003e{const m=VAe(g,h,d);if(m.length===0)return{movesAccepted:0};const _=new Map;for(const B of m){const S=_.get(B.routeIndex)??new Set;for(const Q of B.touchedSides)S.add(Q);_.set(B.routeIndex,S)}const f=[8e-6,.01,d/4,d/2,d+8e-6];let I=0;const C=(B,S,Q)=\u003e{const w=S.route??[];if(w.length\u003c2)return!1;const M={...S,route:zAe(w)};if((M.route?.length??0)\u003c2)return!1;const k=g.slice();if(k[B]=M,iH(k[B],h,d)\u003e=Q)return!1;const R=O=\u003ekBt(g[O.routeIndexes[0]],g[O.routeIndexes[1]]),F=new Set(Fy(g,new Set([B]),0,p).filter(O=\u003e!R(O)).map(RBt));return!Fy(k,new Set([B]),0,p).filter(O=\u003e!R(O)).some(O=\u003e!F.has(RBt(O)))\u0026\u0026!(xSe({currentRoutes:g,candidateRoutes:k,candidateRouteIndexes:new Set([B]),maximumAllowedClearance:Math.min(d/2,gW)}).filter(O=\u003e!kBt(g[O.routeIndexes[0]],g[O.routeIndexes[1]])).length\u003e0||(g[B]=M,0))},y=(B,S,Q,w)=\u003e{if(S.length===0)return!1;for(const M of f){const k=g[B],R=Qv(k),F=R.route??[];let O=!1;for(const U of S){const Y=F[U];Y\u0026\u0026(F[U]=hW(Y,h,Q,M),O=!0)}if(!O)return!1;if(C(B,R,w))return!0}return!1},x=(B,S)=\u003e{const Q=[];return S===\"top\"||S===\"bottom\"?(Math.abs(B.x-h.minX)\u003c=Qr\u0026\u0026Q.push(\"left\"),Math.abs(B.x-h.maxX)\u003c=Qr\u0026\u0026Q.push(\"right\")):(Math.abs(B.y-h.minY)\u003c=Qr\u0026\u0026Q.push(\"bottom\"),Math.abs(B.y-h.maxY)\u003c=Qr\u0026\u0026Q.push(\"top\")),Q},E=(B,S,Q)=\u003e{const w=g[B],M=w.route??[];if(M.length!==2)return!1;const[k,R]=M;if(!dW(k,h,S,d)||!dW(R,h,S,d))return!1;const F=x(k,S),O=x(R,S);for(const U of f){let Y=hW(k,h,S,U),W=hW(R,h,S,U);for(const j of F)Y=hW(Y,h,j,U);for(const j of O)W=hW(W,h,j,U);const te={...w,route:[k,Y,W,R]};if(C(B,te,Q))return!0}return!1};for(const[B,S]of _)if(g[B])for(const Q of S){let w=!0;for(;w;){w=!1;const M=g[B].route??[];if(M.length===2){const Y=iH(g[B],h,d);Y\u003e0\u0026\u0026E(B,Q,Y)\u0026\u0026(I+=1);break}if(M.length\u003c3)break;const k=iH(g[B],h,d);if(k===0)break;const R=[];for(let Y=1;Y\u003cM.length-1;Y+=1){const W=M[Y];W\u0026\u0026dW(W,h,Q,d)\u0026\u0026R.push(Y)}if(R.length===0)break;if(y(B,R,Q,k)){I+=1,w=!0;continue}let F=!1,O=k,U=0;for(;U\u003cR.length;){let Y=U;for(;Y+1\u003cR.length\u0026\u0026R[Y+1]===R[Y]+1;)Y+=1;y(B,R.slice(U,Y+1),Q,O)\u0026\u0026(I+=1,F=!0,O=iH(g[B],h,d)),U=Y+1}if(!F){const Y=g[B].route??[];let W=k;for(let te=1;te\u003cY.length-1;te+=1){const j=Y[te];j\u0026\u0026dW(j,h,Q,d)\u0026\u0026y(B,[te],Q,W)\u0026\u0026(I+=1,F=!0,W=iH(g[B],h,d))}}F\u0026\u0026(w=!0)}}for(const[B,S]of _){const Q=g[B];if(!Q)continue;const w=Q.route??[];if(w.length\u003c=2)continue;const M=iH(g[B],h,d);if(M!==0)for(const k of S){if(!w.every(U=\u003edW(U,h,k,d)))continue;const R=w[0]?.z;if(!w.every(U=\u003eU.z===R))continue;const F={...Q,route:[w[0],w[w.length-1]]},O=g[B];g[B]=F,E(B,k,M)?I+=1:g[B]=O;break}}})({routes:l,boundary:o,margin:r,geometryCache:A}),OBt(l,A)\u003c=u\u0026\u0026s.splice(0,s.length,...l),(({routes:g,boundary:h,clearanceMargin:d})=\u003e{for(let p=0;p\u003cg.length;p+=1){const m=g[p];if((m.route??[]).length\u003c=2)continue;const _=d,f=Math.max(h.width/2-Qr,0),I=Math.max(h.height/2-Qr,0),C=Math.min(_,f),y=Math.min(_,I),x=Qv(m),E=x.route??[];let B=!1;for(let k=1;k\u003cE.length-1;k+=1){const R=E[k];if(!R)continue;const F=Math.min(Math.max(R.x,h.minX+C),h.maxX-C),O=Math.min(Math.max(R.y,h.minY+y),h.maxY-y);(Math.abs(F-R.x)\u003eQr||Math.abs(O-R.y)\u003eQr)\u0026\u0026(R.x=F,R.y=O,B=!0)}if(!B||(x.route=zAe(E),(x.route?.length??0)\u003c2))continue;const S=lB(g);S[p]=x;const Q=FBt(g,S,p,0),w=FBt(g,S,p,d),M=xSe({currentRoutes:g,candidateRoutes:S,candidateRouteIndexes:new Set([p]),maximumAllowedClearance:d}).length\u003e0;Q||w||M||(g[p]=x)}})({routes:s,boundary:o,clearanceMargin:r}),a.push(((g,h,d)=\u003e({title:`HighDensityRepair02 Final State (margin=${d})`,routes:g,originalRoutes:h}))(lB(s),lB(i),r)),{boundary:o,baseRoutes:i,repairedRoutes:s,frames:a,margin:r}},R0o=class extends zA{constructor(t={}){super(),this.params=t,this.showBoundryViolationMarkers=t.showBoundryViolationMarkers??!1}params;frames=[];currentFrameIndex=0;showBoundryViolationMarkers;repairedRoutes=[];_setup(){this.buildFrames();const t=this.getCurrentBoundryViolationCount(),e=this.getCurrentTraceViolationCount();this.stats={boundryViolationCount:t,traceViolationCount:e,margin:this.params.margin??.4,frames:this.frames.length,currentFrame:this.currentFrameIndex}}_step(){if(this.frames.length\u003c=1){const n=this.getCurrentBoundryViolationCount(),o=this.getCurrentTraceViolationCount();return this.showBoundryViolationMarkers=!0,this.stats={...this.stats,boundryViolationCount:n,traceViolationCount:o},void(this.solved=!0)}this.currentFrameIndex\u003cthis.frames.length-1\u0026\u0026(this.currentFrameIndex+=1);const t=this.getCurrentBoundryViolationCount(),e=this.getCurrentTraceViolationCount();this.stats={boundryViolationCount:t,traceViolationCount:e,margin:this.params.margin??.4,frames:this.frames.length,currentFrame:this.currentFrameIndex,title:this.frames[this.currentFrameIndex]?.title},this.currentFrameIndex\u003e=this.frames.length-1\u0026\u0026(this.showBoundryViolationMarkers=!0,this.solved=!0)}getConstructorParams(){return[this.params]}getOutput(){const t=this.getCurrentTraceViolationCount();return{margin:this.params.margin??.4,repairedRoutes:this.repairedRoutes,frameCount:this.frames.length,traceViolationCount:t}}setShowBoundryViolationMarkers(t){this.showBoundryViolationMarkers=t}buildFrames(){const t=N0o(this.params.sample,this.params.margin,this.params.captureProgressFrames??!1);this.frames=t.frames,this.repairedRoutes=t.repairedRoutes}getCurrentFrame(){const t=this.params.sample;return this.frames[this.currentFrameIndex]??{title:\"HighDensityRepair02\",routes:lB(t?.nodeHdRoutes??[])}}getBoundryViolationsForFrame(t){const e=CSe(this.params.sample?.nodeWithPortPoints);return e?VAe(t.routes,e,this.params.margin??.4):[]}getCurrentBoundryViolationCount(){return this.getBoundryViolationsForFrame(this.getCurrentFrame()).length}getRouteNetNames(t){if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=\u003e!!n);return Array.from(new Set(e))}areRoutesSameNet(t,e){const n=this.getRouteNetNames(t),o=this.getRouteNetNames(e);return n.length!==0\u0026\u0026o.length!==0\u0026\u0026n.some(i=\u003eo.includes(i))}getCurrentTraceViolationCount(){const t=this.getCurrentFrame().routes,e=new Set(t.map((n,o)=\u003eo));return Fy(t,e,gW).filter(n=\u003e!(n.layers[0]===\"via\"\u0026\u0026n.layers[1]===\"via\"||this.areRoutesSameNet(t[n.routeIndexes[0]],t[n.routeIndexes[1]]))).length}visualize(){const t=this.params.sample,e=t?.nodeWithPortPoints,n=t?.adjacentObstacles??[],o=this.getCurrentFrame(),i=CSe(e),r=i\u0026\u0026e?.capacityMeshNodeId?[{center:i.center,width:i.width,height:i.height,stroke:\"#1d4ed8\",fill:\"rgba(29, 78, 216, 0.08)\",label:e.capacityMeshNodeId}]:i?[{center:i.center,width:i.width,height:i.height,stroke:\"#1d4ed8\",fill:\"rgba(29, 78, 216, 0.08)\",label:\"capacity-node\"}]:[],s=n.filter(g=\u003eg.center\u0026\u0026g.width\u0026\u0026g.height).map((g,h)=\u003e({center:g.center,width:g.width,height:g.height,stroke:g.type===\"oval\"?\"#a855f7\":\"#dc2626\",fill:g.type===\"oval\"?\"rgba(168, 85, 247, 0.12)\":\"rgba(220, 38, 38, 0.08)\",label:g.type?`obstacle:${g.type}:${h}`:`obstacle:${h}`})),a=this.showBoundryViolationMarkers\u0026\u0026i?this.getBoundryViolationsForFrame(o).map(g=\u003e{const h=g.end.x-g.start.x,d=g.end.y-g.start.y,p=Math.max(Math.hypot(h,d),.2),m=Math.abs(h)\u003e=Math.abs(d);return{center:{x:(g.start.x+g.end.x)/2,y:(g.start.y+g.end.y)/2},width:m?p:.18,height:m?.18:p,stroke:\"#b45309\",fill:\"rgba(250, 204, 21, 0.45)\",label:`boundry-violation:${g.routeIndex}:${g.segmentIndex}`}}):[],A=this.showBoundryViolationMarkers?g0o(o.routes,gW):[],c=[...(e?.portPoints??[]).map(g=\u003e({x:g.x,y:g.y,color:\"#0f766e\",label:g.connectionName??g.portPointId??\"port-point\"})),...o.routes.flatMap(g=\u003eg.route??[]).map(g=\u003e({x:g.x,y:g.y,color:Ab(g)===\"bottom\"?_Bt:\"#0ea5e9\",label:\"\"})),...o.overlayPoints??[]],l=[...(o.originalRoutes??[]).flatMap(g=\u003eySe(g).map(h=\u003e({...h,strokeColor:\"#111111\",strokeWidth:Math.max(.6*h.strokeWidth,.05),label:`original:${h.label}`}))),...o.routes.filter(g=\u003e(g.route?.length??0)\u003e=2).flatMap(g=\u003eySe(g)),...o.overlayLines??[]],u=o.routes.flatMap(g=\u003e(g.vias??[]).map(h=\u003e({center:{x:h.x,y:h.y},radius:(h.diameter??g.viaDiameter??.3)/2,stroke:\"#7c3aed\",fill:\"rgba(124, 58, 237, 0.2)\",label:g.connectionName?`via:${g.connectionName}`:\"via\"})));return u.push(...A),{coordinateSystem:\"cartesian\",title:o.title,rects:[...r,...s,...o.overlayRects??[],...a],points:c,lines:l,circles:u,arrows:o.overlayArrows}}},GBt=(t,e=0)=\u003e({minX:t.center.x-t.width/2-e,maxX:t.center.x+t.width/2+e,minY:t.center.y-t.height/2-e,maxY:t.center.y+t.height/2+e}),T0o=(t,e,n=0)=\u003e{const o=GBt(e,n);return t.x\u003e=o.minX\u0026\u0026t.x\u003c=o.maxX\u0026\u0026t.y\u003e=o.minY\u0026\u0026t.y\u003c=o.maxY},k0o=(t,e)=\u003et.route.length\u003e0\u0026\u0026e.some(n=\u003e(o=\u003e(o.__zLayers?.length??o.layers?.length??0)\u003e1)(n)\u0026\u0026((o,i)=\u003eo.connectedTo.includes(i.connectionName)||i.rootConnectionName!==void 0\u0026\u0026o.connectedTo.includes(i.rootConnectionName))(n,t)\u0026\u0026t.route.every(o=\u003e((i,r)=\u003e{const s=r.width/2,a=r.height/2;return Math.abs(i.x-r.center.x)\u003c=s\u0026\u0026Math.abs(i.y-r.center.y)\u003c=a})(o,n))),F0o=(t,e,n)=\u003e{if(t.regionId){const i=e.findIndex(r=\u003er.capacityMeshNodeId===t.regionId);if(i!==-1)return i}const o=[...t.route.map(({x:i,y:r})=\u003e({x:i,y:r})),...t.vias.map(({x:i,y:r})=\u003e({x:i,y:r}))];for(let i=0;i\u003ce.length;i++){const r=e[i];if(o.every(s=\u003eT0o(s,r,n)))return i}return-1},L0o=(t,e)=\u003e({connectionName:t.connectionName??e.connectionName,rootConnectionName:t.rootConnectionName??e.rootConnectionName,...e.startPcbPortId?{startPcbPortId:e.startPcbPortId}:{},...e.endPcbPortId?{endPcbPortId:e.endPcbPortId}:{},regionId:t.capacityMeshNodeId??e.regionId,traceThickness:t.traceThickness??e.traceThickness,viaDiameter:t.viaDiameter??e.viaDiameter,route:t.route?.map(n=\u003e({x:n.x,y:n.y,z:n.z??0}))??e.route,vias:t.vias?.map(n=\u003e({x:n.x,y:n.y}))??e.vias,jumpers:e.jumpers}),H0o=(t,e,n)=\u003e{const o=GBt(t,n);return e.search(o).filter(i=\u003e{return r=o,s=(a=\u003e({minX:a.center.x-a.width/2,maxX:a.center.x+a.width/2,minY:a.center.y-a.height/2,maxY:a.center.y+a.height/2}))(i),r.minX\u003c=s.maxX\u0026\u0026r.maxX\u003e=s.minX\u0026\u0026r.minY\u003c=s.maxY\u0026\u0026r.maxY\u003e=s.minY;var r,s}).map(i=\u003e({type:i.type,center:i.center,width:i.width,height:i.height}))},pW=class extends yr{repairMargin;sampleEntries;originalHdRoutes;originalNodeWithPortPoints;originalObstacles;obstacleSHI;colorMap;repairedRoutesByIndex=new Map;activeSampleIndex=0;activeSubSolver=null;latestVisualization={};constructor(t){super(),this.repairMargin=t.repairMargin??.2,this.originalHdRoutes=t.hdRoutes,this.originalNodeWithPortPoints=t.nodeWithPortPoints,this.originalObstacles=t.obstacles,this.obstacleSHI=new OD(\"flatbush\",this.originalObstacles),this.colorMap=t.colorMap??{};const e=new Map;for(let o=0;o\u003ct.hdRoutes.length;o++){if(k0o(t.hdRoutes[o],t.obstacles))continue;const i=F0o(t.hdRoutes[o],t.nodeWithPortPoints,this.repairMargin);if(i===-1)continue;const r=e.get(i)??[];r.push(o),e.set(i,r)}const n=Array.from(e.entries()).map(([o,i])=\u003e{const r=t.nodeWithPortPoints[o];return{node:r,routeIndexes:i,sample:{nodeWithPortPoints:{capacityMeshNodeId:r.capacityMeshNodeId,center:r.center,width:r.width,height:r.height,portPoints:r.portPoints.map(s=\u003e({x:s.x,y:s.y,z:s.z,connectionName:s.connectionName,portPointId:s.portPointId,prevPortPointId:s.prevPortPointId,nextPortPointId:s.nextPortPointId}))},nodeHdRoutes:i.map(s=\u003e{return{capacityMeshNodeId:(a=t.hdRoutes[s]).regionId,connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,route:a.route.map(A=\u003e({x:A.x,y:A.y,z:A.z})),traceThickness:a.traceThickness,vias:a.vias.map(A=\u003e({x:A.x,y:A.y,diameter:a.viaDiameter})),viaDiameter:a.viaDiameter};var a}),adjacentObstacles:H0o(r,this.obstacleSHI,this.repairMargin)}}});this.sampleEntries=t.maxSampleEntries!==void 0\u0026\u0026n.length\u003et.maxSampleEntries?[]:n,this.MAX_ITERATIONS=Math.max(1e3*this.sampleEntries.length,1e5),this.stats={sampleCount:this.sampleEntries.length,skippedSampleCount:n.length\u003ethis.sampleEntries.length?n.length:0,repairedNodeCount:0,repairedRouteCount:0}}getSolverName(){return\"Pipeline4HighDensityRepairSolver\"}getConstructorParams(){return[{nodeWithPortPoints:this.sampleEntries.map(t=\u003et.node),hdRoutes:this.originalHdRoutes,obstacles:this.originalObstacles,repairMargin:this.repairMargin,colorMap:this.colorMap}]}_step(){const t=this.sampleEntries[this.activeSampleIndex];if(t){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.latestVisualization=this.activeSubSolver.visualize(),this.activeSubSolver.failed)return this.failed=!0,this.error=this.activeSubSolver.error??`High density repair failed for node ${t.node.capacityMeshNodeId}`,void(this.activeSubSolver=null);if(!this.activeSubSolver.solved)return;const e=this.activeSubSolver.getOutput().repairedRoutes;for(let n=0;n\u003ct.routeIndexes.length;n++){const o=t.routeIndexes[n],i=this.originalHdRoutes[o],r=e[n];this.repairedRoutesByIndex.set(o,r?L0o(r,i):i)}return this.activeSubSolver=null,this.activeSampleIndex+=1,this.stats={sampleCount:this.sampleEntries.length,repairedNodeCount:this.activeSampleIndex,repairedRouteCount:this.repairedRoutesByIndex.size},void(this.activeSampleIndex\u003e=this.sampleEntries.length\u0026\u0026(this.solved=!0))}this.activeSubSolver=new R0o({sample:t.sample,margin:this.repairMargin}),this.latestVisualization=this.activeSubSolver.visualize()}else this.solved=!0}getOutput(){return this.originalHdRoutes.map((t,e)=\u003ethis.repairedRoutesByIndex.get(e)??t)}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();if(!this.solved)return this.latestVisualization;const t=[],e=[];for(const n of this.getOutput()){const o=this.colorMap[n.connectionName]??\"#0ea5e9\";for(let i=0;i\u003cn.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.z===s.z\u0026\u0026t.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:r.z===0?o:Es(o,.5),strokeWidth:n.traceThickness,layer:`z${r.z}`,strokeDash:r.z!==0?[.1,.3]:void 0})}for(const i of n.vias)e.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,stroke:o,fill:\"rgba(14,165,233,0.12)\"})}return{title:\"Pipeline4 High Density Repair\",lines:t,circles:e}}},mW=1e-6,YBt=({startGap:t,endGap:e,segmentGap:n,requiredGap:o})=\u003e{const i=t\u003co\u0026\u0026e\u003e=o-mW\u0026\u0026n\u003e=t-mW,r=e\u003co\u0026\u0026t\u003e=o-mW\u0026\u0026n\u003e=e-mW,s=t\u003co\u0026\u0026e\u003co\u0026\u0026n\u003e=Math.min(t,e)-mW;return i||r||s},O0o=class{minClearance;rootsByConnection=new Map;sameNetCache=new Map;segments=[];vias=[];segmentIndexesByLayer;viaIndex;constructor({hdRoutes:t,minClearance:e=.1}){this.minClearance=e;for(const n of t)this.addRoute(n);this.buildSpatialIndexes()}addRoute(t){const e=this.rootsByConnection.get(t.connectionName)??new Set;e.add(t.rootConnectionName??t.connectionName),this.rootsByConnection.set(t.connectionName,e),this.sameNetCache.clear();for(let n=0;n\u003ct.route.length-1;n+=1){const o=t.route[n],i=t.route[n+1];if(o.z!==i.z||o.insideJumperPad\u0026\u0026i.insideJumperPad)continue;const r={connectionName:t.connectionName,start:o,end:i,traceThickness:t.traceThickness};this.segments.push(r),this.insertSegmentIntoSpatialIndex(r)}for(const n of t.vias){const o={connectionName:t.connectionName,x:n.x,y:n.y,diameter:t.viaDiameter};this.vias.push(o),this.insertViaIntoSpatialIndex(o)}}insertSegmentIntoSpatialIndex(t){if(!this.segmentIndexesByLayer)return;let e=this.segmentIndexesByLayer.get(t.start.z);e||(e=new jz,this.segmentIndexesByLayer.set(t.start.z,e));const n=t.traceThickness/2;e.insert(t,Math.min(t.start.x,t.end.x)-n,Math.min(t.start.y,t.end.y)-n,Math.max(t.start.x,t.end.x)+n,Math.max(t.start.y,t.end.y)+n)}insertViaIntoSpatialIndex(t){if(!this.viaIndex)return;const e=t.diameter/2;this.viaIndex.insert(t,t.x-e,t.y-e,t.x+e,t.y+e)}buildSpatialIndexes(){this.segmentIndexesByLayer=new Map;const t=new Map;for(const e of this.segments){const n=t.get(e.start.z);n?n.push(e):t.set(e.start.z,[e])}for(const[e,n]of t){const o=new jz;o.bulkLoad(n.map(i=\u003e{const r=i.traceThickness/2;return{item:i,minX:Math.min(i.start.x,i.end.x)-r,minY:Math.min(i.start.y,i.end.y)-r,maxX:Math.max(i.start.x,i.end.x)+r,maxY:Math.max(i.start.y,i.end.y)+r}})),this.segmentIndexesByLayer.set(e,o)}this.viaIndex=new jz,this.viaIndex.bulkLoad(this.vias.map(e=\u003e{const n=e.diameter/2;return{item:e,minX:e.x-n,minY:e.y-n,maxX:e.x+n,maxY:e.y+n}}))}areSameNet(t,e){if(t===e)return!0;const n=this.sameNetCache.get(t)?.get(e);if(n!==void 0)return n;const o=this.rootsByConnection.get(t),i=this.rootsByConnection.get(e);let r=!1;if(o\u0026\u0026i){for(const a of o)if(i.has(a)){r=!0;break}}let s=this.sameNetCache.get(t);return s||(s=new Map,this.sameNetCache.set(t,s)),s.set(e,r),r}isSegmentClear({connectionName:t,start:e,end:n,traceThickness:o}){const i=o/2,r=this.minClearance+i,s=Math.min(e.x,n.x)-r,a=Math.min(e.y,n.y)-r,A=Math.max(e.x,n.x)+r,c=Math.max(e.y,n.y)+r,l=this.segmentIndexesByLayer?.get(e.z)?.search(s,a,A,c)??[];for(const g of l){if(this.areSameNet(t,g.connectionName))continue;const h=this.minClearance+i+g.traceThickness/2,d=qQ(e,n,g.start,g.end);if(d\u003ch\u0026\u0026!YBt({startGap:wc(e,g.start,g.end),endGap:wc(n,g.start,g.end),segmentGap:d,requiredGap:h}))return!1}const u=this.viaIndex?.search(s,a,A,c)??[];for(const g of u){if(this.areSameNet(t,g.connectionName))continue;const h=this.minClearance+i+g.diameter/2,d=wc(g,e,n);if(d\u003ch\u0026\u0026!YBt({startGap:Math.hypot(e.x-g.x,e.y-g.y),endGap:Math.hypot(n.x-g.x,n.y-g.y),segmentGap:d,requiredGap:h}))return!1}return!0}},_C=1e-9,ESe=1.25,Mv=(t,e)=\u003et\u003ce?-1:t\u003ee?1:0,v7=(t,e)=\u003eMv(t.z,e.z)||Mv(t.x,e.x)||Mv(t.y,e.y),UBt=t=\u003e`${t.z.toFixed(6)}:${t.x.toFixed(6)}:${t.y.toFixed(6)}`,KBt=t=\u003e{const e=t.route.map(UBt).join(\"|\"),n=[...t.route].reverse().map(UBt).join(\"|\");return e\u003c=n?e:n},_W=(t,e)=\u003e{const n=t.connectionName.localeCompare(e.connectionName);if(n!==0)return n;const o=(t.rootConnectionName??\"\").localeCompare(e.rootConnectionName??\"\");if(o!==0)return o;const i=KBt(t).localeCompare(KBt(e));return i!==0?i:Mv(t.traceThickness,e.traceThickness)||Mv(t.viaDiameter,e.viaDiameter)||Mv(t.route.length,e.route.length)||Mv(t.vias.length,e.vias.length)||Mv(t.jumpers?.length??0,e.jumpers?.length??0)},VBt=1e5,pN=.001,zBt=1.000000001,BSe=class extends yr{getSolverName(){return\"SingleHighDensityRouteStitchSolver3\"}mergedHdRoute;remainingHdRoutes;start;end;colorMap;allowedLayerTransitionPointKeys;isStitchSegmentClear;stitchClearanceMode;isPlanarStitchClear(t,e){return this.isStitchSegmentClear({connectionName:this.mergedHdRoute.connectionName,start:t,end:e,traceThickness:this.mergedHdRoute.traceThickness})}constructor(t){super();const e=[...t.hdRoutes].sort(_W);if(this.remainingHdRoutes=e,this.colorMap=t.colorMap??{},this.allowedLayerTransitionPointKeys=t.allowedLayerTransitionPointKeys,this.isStitchSegmentClear=t.isStitchSegmentClear,this.stitchClearanceMode=t.stitchClearanceMode,e.length===0){this.start=t.start,this.end=t.end;const h=t.defaultTraceThickness??.15,d=[{x:t.start.x,y:t.start.y,z:t.start.z}],p=[];if(t.start.z!==t.end.z){if(t.allowedLayerTransitionPointKeys\u0026\u0026!t.allowedLayerTransitionPointKeys.has(IL(t.start)))return this.failed=!0,void(this.error=`Layer transition at ${IL(t.start)} is not allowed`);d.push({x:t.start.x,y:t.start.y,z:t.end.z}),p.push({x:t.start.x,y:t.start.y})}const m=d[d.length-1],_={x:t.end.x,y:t.end.y,z:t.end.z},f={connectionName:t.connectionName,start:m,end:_,traceThickness:h};return no(m,_)\u003epN\u0026\u0026!this.isStitchSegmentClear(f)\u0026\u0026this.stitchClearanceMode===\"require_clear\"?(this.failed=!0,void(this.error=`Terminal stitch for \"${t.connectionName}\" violates copper clearance`)):(d.push(_),this.mergedHdRoute={connectionName:t.connectionName,...t.preserveTerminalPcbPortIds\u0026\u0026t.start.pcb_port_id?{startPcbPortId:t.start.pcb_port_id}:{},...t.preserveTerminalPcbPortIds\u0026\u0026t.end.pcb_port_id?{endPcbPortId:t.end.pcb_port_id}:{},rootConnectionName:e[0]?.rootConnectionName,route:d,vias:p,jumpers:[],viaDiameter:t.defaultViaDiameter??.3,traceThickness:h},void(this.solved=!0))}const n=new Set((t.preserveTerminalPcbPortIds?[t.start.pcb_port_id,t.end.pcb_port_id]:[]).filter(h=\u003eh!==void 0));if(t.preserveTerminalPcbPortIds\u0026\u0026t.start.pcb_port_id\u0026\u0026t.start.pcb_port_id===t.end.pcb_port_id)throw new Error(`SingleHighDensityRouteStitchSolver3 received duplicate PCB terminal \"${t.start.pcb_port_id}\" for \"${t.connectionName}\"`);const o=e.flatMap(h=\u003e[h.startPcbPortId,h.endPcbPortId]).filter(h=\u003eh!==void 0);if(n.size\u003e0){for(const h of o)if(!n.has(h))throw new Error(`SingleHighDensityRouteStitchSolver3 found unknown PCB terminal \"${h}\" on \"${t.connectionName}\"`)}let i=1/0,r=e[0],s=\"start-to-end\";for(const h of e){const d=h.route[0],p=h.route[h.route.length-1],m=no(t.start,d),_=no(t.start,p),f=no(t.end,d),I=no(t.end,p),C=Math.min(m,_,f,I);(C\u003ci-_C||Math.abs(C-i)\u003c=_C\u0026\u0026_W(h,r)\u003c0)\u0026\u0026(i=C,r=h,s=Math.min(f,I)\u003cMath.min(m,_)-_C||Math.abs(Math.min(f,I)-Math.min(m,_))\u003c=_C\u0026\u0026v7(t.end,t.start)\u003c0?\"end-to-start\":\"start-to-end\")}s===\"start-to-end\"?(this.start=t.start,this.end=t.end):(this.start=t.end,this.end=t.start);const a=r.route[0],A=r.route[r.route.length-1],c=no(this.start,a),l=no(this.start,A),u=c\u003cl-_C||Math.abs(c-l)\u003c=_C\u0026\u0026v7(a,A)\u003c=0?a:A,g=u===a?r.startPcbPortId:r.endPcbPortId;if(g\u0026\u0026this.start.pcb_port_id\u0026\u0026g!==this.start.pcb_port_id)throw new Error(`SingleHighDensityRouteStitchSolver3 terminal identity disagrees with route orientation for \"${t.connectionName}\"`);this.mergedHdRoute={connectionName:t.connectionName,...t.preserveTerminalPcbPortIds\u0026\u0026this.start.pcb_port_id?{startPcbPortId:this.start.pcb_port_id}:{},...t.preserveTerminalPcbPortIds\u0026\u0026this.end.pcb_port_id?{endPcbPortId:this.end.pcb_port_id}:{},rootConnectionName:r.rootConnectionName,route:[{x:this.start.x,y:this.start.y,z:u.z}],vias:[],jumpers:[],viaDiameter:r.viaDiameter,traceThickness:r.traceThickness}}getDisjointedRoute(){for(const t of this.remainingHdRoutes)if([t.route[0],t.route[t.route.length-1]].some(e=\u003e!this.remainingHdRoutes.some(n=\u003en===t?!1:[n.route[0],n.route[n.route.length-1]].some(o=\u003eo.z===e.z\u0026\u0026no(e,o)\u003c.001))))return{firstRoute:t};return{firstRoute:this.remainingHdRoutes[0]}}_step(){if(this.remainingHdRoutes.length===0){const a=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1],A={...this.end,z:a.z},c=no(a,A);if(c\u003epN\u0026\u0026c\u003c=ESe){if(!this.isPlanarStitchClear(a,A)\u0026\u0026this.stitchClearanceMode===\"require_clear\")return this.failed=!0,void(this.error=`Terminal stitch for \"${this.mergedHdRoute.connectionName}\" violates copper clearance`);this.mergedHdRoute.route.push({x:this.end.x,y:this.end.y,z:a.z})}return void(this.solved=!0)}const t=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1];let e=-1,n=\"first\",o=1/0,i=!1;for(let a=0;a\u003cthis.remainingHdRoutes.length;a++){const A=this.remainingHdRoutes[a],c=A.route[0],l=A.route[A.route.length-1],u=no(t,c),g=no(t,l);let h=1/0;if(t.z===c.z){if(u\u003cpN)h=u;else if(u\u003c=1){const p=this.isPlanarStitchClear(t,c);p||this.stitchClearanceMode===\"prefer_clear\"?h=VBt+(p?0:zBt)+u:i=!0}}else u\u003cpN\u0026\u0026(!this.allowedLayerTransitionPointKeys||this.allowedLayerTransitionPointKeys.has(IL(c)))\u0026\u0026(h=1e3+u);h\u003co\u0026\u0026(o=h,e=a,n=\"first\");let d=1/0;if(t.z===l.z){if(g\u003cpN)d=g;else if(g\u003c=1){const p=this.isPlanarStitchClear(t,l);p||this.stitchClearanceMode===\"prefer_clear\"?d=VBt+(p?0:zBt)+g:i=!0}}else g\u003cpN\u0026\u0026(!this.allowedLayerTransitionPointKeys||this.allowedLayerTransitionPointKeys.has(IL(l)))\u0026\u0026(d=1e3+g);d\u003co\u0026\u0026(o=d,e=a,n=\"last\")}if(e===-1)return i?(this.failed=!0,void(this.error=`Route stitch for \"${this.mergedHdRoute.connectionName}\" violates copper clearance`)):void(this.remainingHdRoutes=[]);const r=this.remainingHdRoutes[e];let s;this.remainingHdRoutes.splice(e,1),s=n===\"first\"?r.route:(a=\u003e{const A=[...a].reverse().map(c=\u003e{const{toNextSegmentType:l,...u}=c;return u});for(let c=0;c\u003ca.length-1;c++){const l=a[c]?.toNextSegmentType;if(!l)continue;const u=a.length-c-2;A[u]={...A[u],toNextSegmentType:l}}return A})(r.route),s.length\u003e0\u0026\u0026no(t,s[0])\u003cpN\u0026\u0026t.z===s[0].z?(s[0].toNextSegmentType\u0026\u0026(t.toNextSegmentType=s[0].toNextSegmentType),this.mergedHdRoute.route.push(...s.slice(1))):this.mergedHdRoute.route.push(...s),this.mergedHdRoute.vias.push(...r.vias),r.jumpers\u0026\u0026this.mergedHdRoute.jumpers.push(...r.jumpers)}visualize(){const t={points:[],lines:[],circles:[],rects:[],title:\"Single High Density Route Stitch Solver 3\"};if(t.points?.push({x:this.start.x,y:this.start.y,color:\"green\",label:\"Start\"},{x:this.end.x,y:this.end.y,color:\"red\",label:\"End\"}),this.mergedHdRoute\u0026\u0026this.mergedHdRoute.route.length\u003e1){t.lines?.push({points:this.mergedHdRoute.route.map(e=\u003e({x:e.x,y:e.y})),strokeColor:\"green\"});for(const e of this.mergedHdRoute.route)t.points?.push({x:e.x,y:e.y,color:\"green\"});for(const e of this.mergedHdRoute.vias)t.circles?.push({center:{x:e.x,y:e.y},radius:this.mergedHdRoute.viaDiameter/2,fill:\"green\"});if(this.mergedHdRoute.jumpers\u0026\u0026this.mergedHdRoute.jumpers.length\u003e0){const e=_x(this.mergedHdRoute.jumpers,{color:\"green\",label:this.mergedHdRoute.connectionName});t.rects.push(...e.rects??[]),t.lines.push(...e.lines??[])}}for(const e of this.remainingHdRoutes){t.lines?.push({points:e.route.map(n=\u003e({x:n.x,y:n.y})),strokeColor:\"orange\"});for(const n of e.route)t.points?.push({x:n.x,y:n.y,color:\"orange\"});for(const n of e.vias)t.circles?.push({center:{x:n.x,y:n.y},radius:e.viaDiameter/2,fill:\"orange\"});if(e.jumpers\u0026\u0026e.jumpers.length\u003e0){const n=_x(e.jumpers,{color:\"orange\",label:e.connectionName});t.rects.push(...n.rects??[]),t.lines.push(...n.lines??[])}}return t}},G0o=class{constructor(t=!1){this.preferSameLayerTerminalEndpoints=t}preferSameLayerTerminalEndpoints;endpointClusters=new Map;getEndpointKey(t,e){const n=this.endpointClusters.get(t)??[];let o,i=1/0;for(const s of n){if(s.point.z!==e.z)continue;const a=no(s.point,e);a\u003c=.1\u0026\u0026(a\u003ci-_C||Math.abs(a-i)\u003c=_C\u0026\u0026(!o||v7(s.point,o.point)\u003c0))\u0026\u0026(o=s,i=a)}if(o)return o.key;const r=`${t}:endpoint_${n.length}`;return n.push({key:r,point:{x:e.x,y:e.y,z:e.z}}),this.endpointClusters.set(t,n),r}getClusters(t){return this.endpointClusters.get(t)??[]}getClosestEndpointKey(t,e,n){const o=e.flatMap(c=\u003e[c.route[0],c.route[c.route.length-1]]),i=o.filter(c=\u003ec.z===n.z),r=this.preferSameLayerTerminalEndpoints\u0026\u0026i.length\u003e0?i:o;let s=null,a=null,A=1/0;for(const c of r){const l=no(n,c),u=this.getEndpointKey(t,c);(l\u003cA-_C||Math.abs(l-A)\u003c=_C\u0026\u0026(s===null||u.localeCompare(s)\u003c0||u===s\u0026\u0026a!==null\u0026\u0026v7(c,a)\u003c0))\u0026\u0026(A=l,s=u,a=c)}return s}},jAe=(t,e,n)=\u003e{const o=t.get(e)??[];o.some(i=\u003ei.nextHash===n.nextHash\u0026\u0026i.routeIndex===n.routeIndex)||(o.push(n),t.set(e,o))},Y0o=t=\u003e{const e=[...t.possibleEndpoints].sort(v7),n=e.reduce((r,s)=\u003e{const a=no(s,t.globalStart),A=no(r,t.globalStart);return a\u003cA-_C||Math.abs(a-A)\u003c=_C\u0026\u0026v7(s,r)\u003c0?s:r}),o=e.filter(r=\u003er!==n),i=(o.length\u003e0?o:t.possibleEndpoints).reduce((r,s)=\u003e{const a=no(s,t.globalEnd),A=no(r,t.globalEnd);return a\u003cA-_C||Math.abs(a-A)\u003c=_C\u0026\u0026v7(s,r)\u003c0?s:r});return{start:n,end:i}},JBt=t=\u003e{const e=[...t.terminals].sort(v7);let n=e[0],o=no(t.islandEndpoint,n);for(const i of e.slice(1)){const r=no(t.islandEndpoint,i);(r\u003co-_C||Math.abs(r-o)\u003c=_C\u0026\u0026v7(i,n)\u003c0)\u0026\u0026(n=i,o=r)}return o\u003c=ESe?n:t.islandEndpoint},bSe=t=\u003e{if(t.hdRoutes.length\u003c=2)return t.hdRoutes;const e=[...t.hdRoutes].sort(_W),n=t.endpointIndex.getClosestEndpointKey(t.connectionName,e,t.start),o=t.endpointIndex.getClosestEndpointKey(t.connectionName,e,t.end);if(!n||!o||n===o)return e;const i=new Map;for(let g=0;g\u003ce.length;g++){const h=e[g],d=t.endpointIndex.getEndpointKey(t.connectionName,h.route[0]),p=t.endpointIndex.getEndpointKey(t.connectionName,h.route[h.route.length-1]);jAe(i,d,{nextHash:p,routeIndex:g}),jAe(i,p,{nextHash:d,routeIndex:g})}const r=[...t.endpointIndex.getClusters(t.connectionName)].sort((g,h)=\u003ev7(g.point,h.point));for(let g=0;g\u003cr.length;g++){const h=r[g];for(let d=g+1;d\u003cr.length;d++){const p=r[d];h.point.z===p.point.z\u0026\u0026(no(h.point,p.point)\u003e1||(jAe(i,h.key,{nextHash:p.key,routeIndex:null}),jAe(i,p.key,{nextHash:h.key,routeIndex:null})))}}for(const[g,h]of i.entries())i.set(g,[...h].sort((d,p)=\u003e{if(d.routeIndex===null\u0026\u0026p.routeIndex!==null)return 1;if(d.routeIndex!==null\u0026\u0026p.routeIndex===null)return-1;if(d.routeIndex!==null\u0026\u0026p.routeIndex!==null){const m=_W(e[d.routeIndex],e[p.routeIndex]);if(m!==0)return m}return d.nextHash.localeCompare(p.nextHash)}));const s=[n],a=new Set([n]),A=new Map;for(;s.length\u003e0;){const g=s.shift();if(g===o)break;for(const h of i.get(g)??[])a.has(h.nextHash)||(a.add(h.nextHash),A.set(h.nextHash,{prevHash:g,routeIndex:h.routeIndex}),s.push(h.nextHash))}if(!a.has(o))return e;const c=[];let l=o;for(;l!==n;){const g=A.get(l);if(!g)return e;g.routeIndex!==null\u0026\u0026c.push(g.routeIndex),l=g.prevHash}if(c.length===0)return t.hdRoutes;const u=c.reverse().map(g=\u003ee[g]);return u.length\u003e0\u0026\u0026!t.canStitchBetweenTerminals({connectionName:t.connectionName,hdRoutes:u,start:t.start,end:t.end})?e:u},$Ae=class extends yr{getSolverName(){return\"MultipleHighDensityRouteStitchSolver3\"}unsolvedRoutes;activeSolver=null;mergedHdRoutes=[];colorMap={};defaultTraceThickness;defaultViaDiameter;allowedLayerTransitionPointKeys;preserveTerminalPcbPortIds;endpointIndex;clearanceValidator;canStitchBetweenTerminals(t){const e=new BSe({connectionName:t.connectionName,hdRoutes:t.hdRoutes,start:t.start,end:t.end,colorMap:this.colorMap,defaultTraceThickness:this.defaultTraceThickness,defaultViaDiameter:this.defaultViaDiameter,allowedLayerTransitionPointKeys:this.allowedLayerTransitionPointKeys,preserveTerminalPcbPortIds:this.preserveTerminalPcbPortIds,isStitchSegmentClear:s=\u003ethis.clearanceValidator.isSegmentClear(s),stitchClearanceMode:\"require_clear\"});for(;!e.solved\u0026\u0026!e.failed\u0026\u0026e.iterations\u003ce.MAX_ITERATIONS;)e.step();if(e.failed)return!1;const n=e.mergedHdRoute.route[0],o=e.mergedHdRoute.route[e.mergedHdRoute.route.length-1],i=no(n,t.start)+no(o,t.end),r=no(n,t.end)+no(o,t.start);return Math.min(i,r)\u003c=ESe}getSharedRootPathRoutes(t){const e=t.rootConnectionName;if(!e)return null;const n=new Set(t.hdRoutes),o=t.allHdRoutes.filter(r=\u003e(r.rootConnectionName??r.connectionName)===e);if(o.every(r=\u003en.has(r)))return null;const i=bSe({connectionName:t.connectionName,hdRoutes:o,start:t.start,end:t.end,endpointIndex:this.endpointIndex,canStitchBetweenTerminals:r=\u003ethis.canStitchBetweenTerminals(r)});return!i.some(r=\u003e!n.has(r))||i.length\u003e=o.length?null:i}constructor(t){super(),this.endpointIndex=new G0o(t.preferSameLayerTerminalEndpoints),this.colorMap=t.colorMap??{},this.allowedLayerTransitionPointKeys=t.allowedLayerTransitionPointKeys,this.preserveTerminalPcbPortIds=t.preserveTerminalPcbPortIds??!1;const e=[...t.hdRoutes].sort(_W);this.clearanceValidator=new O0o({hdRoutes:e});const n=e[0];this.defaultTraceThickness=n?.traceThickness??.15,this.defaultViaDiameter=n?.viaDiameter??t.defaultViaDiameter??.3;const o=new W7e({}),i=[],r=new Map;for(let A=0;A\u003ce.length;A++){const c=e[A],l=c.route[0],u=c.route[c.route.length-1];i.push([`route_island_${A}`,this.endpointIndex.getEndpointKey(c.connectionName,l),this.endpointIndex.getEndpointKey(c.connectionName,u)])}o.addConnections(i);for(const A of i)for(const c of A.slice(1))r.set(c,(r.get(c)??0)+1);this.unsolvedRoutes=[];const s=Array.from(new Set(Object.values(o.idToNetMap)));for(const A of s){const c=o.getIdsConnectedToNet(A),l=e.filter((I,C)=\u003ec.includes(`route_island_${C}`));if(l.length===0)continue;const u=t.connections.find(I=\u003eI.name===l[0].connectionName),g=l.flatMap(I=\u003e[I.route[0],I.route[I.route.length-1]]),h=new Map,d=[];for(const I of g){const C=this.endpointIndex.getEndpointKey(l[0].connectionName,I);h.has(C)||h.set(C,I),r.get(C)===1\u0026\u0026d.push(I)}const p=d.length\u003e0?d:[...h.values()];if(p.length===0)continue;let m,_;if(p.length\u003e=2){const I={...u.pointsToConnect[0],z:Kr(tI(u.pointsToConnect[0]),t.layerCount)},C={...u.pointsToConnect[1],z:Kr(tI(u.pointsToConnect[1]),t.layerCount)};({start:m,end:_}=Y0o({possibleEndpoints:p,globalStart:I,globalEnd:C})),no(m,u.pointsToConnect[1])\u003cno(_,u.pointsToConnect[0])\u0026\u0026([m,_]=[_,m]),m=JBt({islandEndpoint:m,terminals:[I,C]}),_=JBt({islandEndpoint:_,terminals:[I,C]})}else m={...u.pointsToConnect[0],z:Kr(tI(u.pointsToConnect[0]),t.layerCount)},_={...u.pointsToConnect[1],z:Kr(tI(u.pointsToConnect[1]),t.layerCount)};const f=bSe({connectionName:l[0].connectionName,hdRoutes:l,start:m,end:_,endpointIndex:this.endpointIndex,canStitchBetweenTerminals:I=\u003ethis.canStitchBetweenTerminals(I)});this.unsolvedRoutes.push({connectionName:l[0].connectionName,hdRoutes:f,start:m,end:_})}const a=new Map;for(const A of this.unsolvedRoutes){const c=a.get(A.connectionName);c?c.push(A):a.set(A.connectionName,[A])}this.unsolvedRoutes=Array.from(a.entries()).flatMap(([A,c])=\u003e{const l=t.connections.find(_=\u003e_.name===A),u=c.some(_=\u003e_.hdRoutes.some(f=\u003ef.route.length\u003c2)),g=c.length\u003e1\u0026\u0026(_=\u003e{for(let f=0;f\u003c_.length;f++)for(let I=f+1;I\u003c_.length;I++){const C=[_[f].start,_[f].end],y=[_[I].start,_[I].end];for(const x of C)for(const E of y)if(x.z===E.z\u0026\u0026no(x,E)\u003c=1)return!0}return!1})(c);if(!l)return c;const h={...l.pointsToConnect[0],z:Kr(tI(l.pointsToConnect[0]),t.layerCount)},d={...l.pointsToConnect[1],z:Kr(tI(l.pointsToConnect[1]),t.layerCount)},p=c.flatMap(_=\u003e_.hdRoutes),m=c.length\u003e1?this.getSharedRootPathRoutes({connectionName:A,rootConnectionName:l.__rootConnectionNames?.[0]??p[0]?.rootConnectionName,hdRoutes:p,allHdRoutes:e,start:h,end:d}):null;return u||g||m?[{connectionName:A,hdRoutes:m??bSe({connectionName:A,hdRoutes:p,start:h,end:d,endpointIndex:this.endpointIndex,canStitchBetweenTerminals:_=\u003ethis.canStitchBetweenTerminals(_)}),start:h,end:d}]:c}),this.MAX_ITERATIONS=1e5}_step(){if(this.activeSolver)return this.activeSolver.step(),void(this.activeSolver.solved?(this.activeSolver instanceof BSe\u0026\u0026(this.clearanceValidator.addRoute(this.activeSolver.mergedHdRoute),this.mergedHdRoutes.push(this.activeSolver.mergedHdRoute)),this.activeSolver=null):this.activeSolver.failed\u0026\u0026(this.failed=!0,this.error=this.activeSolver.error));const t=this.unsolvedRoutes.pop();t?this.activeSolver=new BSe({connectionName:t.connectionName,hdRoutes:t.hdRoutes,start:t.start,end:t.end,colorMap:this.colorMap,defaultTraceThickness:this.defaultTraceThickness,defaultViaDiameter:this.defaultViaDiameter,allowedLayerTransitionPointKeys:this.allowedLayerTransitionPointKeys,preserveTerminalPcbPortIds:this.preserveTerminalPcbPortIds,isStitchSegmentClear:e=\u003ethis.clearanceValidator.isSegmentClear(e),stitchClearanceMode:\"prefer_clear\"}):this.solved=!0}visualize(){const t={points:[],lines:[],circles:[],rects:[],title:\"Multiple High Density Route Stitch Solver 3\"};if(this.activeSolver){const e=this.activeSolver.visualize();e.points?.length\u0026\u0026t.points?.push(...e.points),e.lines?.length\u0026\u0026t.lines?.push(...e.lines),e.circles?.length\u0026\u0026t.circles?.push(...e.circles),e.rects?.length\u0026\u0026(t.rects||(t.rects=[]),t.rects.push(...e.rects))}for(const[e,n]of this.mergedHdRoutes.entries()){const o=this.colorMap[n.connectionName]??`hsl(120, 100%, ${40+10*e%40}%)`;for(let i=0;i\u003cn.route.length-1;i++){const r=n.route[i],s=n.route[i+1],a=r.z!==0?Es(o,.5):o;t.lines?.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:a,strokeWidth:n.traceThickness})}for(const i of n.route){const r=i.z!==0?Es(o,.5):o;t.points?.push({x:i.x,y:i.y,color:r})}for(const i of n.vias)t.circles?.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,fill:o});if(n.jumpers\u0026\u0026n.jumpers.length\u003e0){const i=_x(n.jumpers,{color:o,label:n.connectionName});t.rects.push(...i.rects??[]),t.lines.push(...i.lines??[])}}return t}},WBt=t=\u003e(t%360+360)%360,U0o=(t,e)=\u003e{const{ccwRotationDegrees:n,...o}=t,i=(r=\u003e{const s=WBt(r),a=[0,90,180,270];for(const A of a)if(Math.min(Math.abs(s-A),360-Math.abs(s-A))\u003c=.01)return A;return null})(e);return i===90||i===270?{...o,width:t.height,height:t.width}:o},jBt=t=\u003e\"layers\"in t?t.layers:[t.layer],$Bt=(t,e)=\u003e!(jBt(t).length\u003e0\u0026\u0026!jBt(t).some(n=\u003ee.layers.includes(n)))\u0026\u0026y_t(t,Pg(e)),qBt=(t,e)=\u003e{const{minX:n,maxX:o,minY:i,maxY:r}=Pg(e);return{x:Math.max(n,Math.min(o,t.x)),y:Math.max(i,Math.min(r,t.y))}},K0o=(t,e)=\u003et.obstacleId??`${t.componentId??\"obstacle\"}_${e}`;function XBt(t,e=2){const{center:n,width:o,height:i,rotation:r}=t,s=[],a=Math.max(1,Math.ceil(e)),A=r*Math.PI/180,c=Math.cos(A),l=Math.sin(A);if(o\u003e=i){const u=o/a;for(let g=0;g\u003ca;g++){const h=(g-a/2+.5)*u,d=h*c,p=h*l,m=Math.abs(u*c)+Math.abs(i*l),_=Math.abs(u*l)+Math.abs(i*c);s.push({center:{x:n.x+d,y:n.y+p},width:m,height:_})}}else{const u=i/a;for(let g=0;g\u003ca;g++){const h=(g-a/2+.5)*u,d=-h*l,p=h*c,m=Math.abs(o*c)+Math.abs(u*l),_=Math.abs(o*l)+Math.abs(u*c);s.push({center:{x:n.x+d,y:n.y+p},width:m,height:_})}}return s}var ZBt=t=\u003e{if(t.type===\"oval\")return ZBt({...t,type:\"rect\"});const e=t.ccwRotationDegrees;if(typeof e!=\"number\"||!Number.isFinite(e))return[t];if((A=\u003e{const c=WBt(A);return[0,90,180,270].some(l=\u003eMath.min(Math.abs(c-l),360-Math.abs(c-l))\u003c=.01)})(e))return[U0o(t,e)];const{ccwRotationDegrees:n,...o}=t,i={center:t.center,width:t.width,height:t.height,rotation:e},r=(A=\u003e{const c=Math.max(A.width,A.height),l=Math.min(A.width,A.height);return A.obstacleId?.startsWith(\"trace_obstacle_\")?Math.max(2,Math.ceil(c/.75)):l\u003c=0?2:c/l\u003c2||l\u003e=.9?null:Math.max(2,Math.ceil(c/.75))})(t),s=t.connectedTo.length\u003e0\u0026\u0026!t.obstacleId?.startsWith(\"trace_obstacle_\")?(A=\u003e{const c=A.rotation*Math.PI/180,l=Math.cos(c),u=Math.sin(c),g=[-1,1].flatMap(S=\u003e[-1,1].map(Q=\u003e{const w=S*(A.width/2),M=Q*(A.height/2);return{x:A.center.x+w*l-M*u,y:A.center.y+w*u+M*l}})),h=[g[0],g[2],g[3],g[1]],d=Math.min(...h.map(S=\u003eS.x)),p=Math.max(...h.map(S=\u003eS.x)),m=Math.min(...h.map(S=\u003eS.y)),_=Math.max(...h.map(S=\u003eS.y)),f=p-d\u003c=_-m?\"x\":\"y\",I=f===\"x\"?d:m,C=f===\"x\"?p:_,y=Math.max(1,Math.ceil((C-I)/.4)),x=(C-I)/y,E=(S,Q,w)=\u003e{const M=[],k=R=\u003eR[f];for(let R=0;R\u003cS.length;R++){const F=S[R],O=S[(R+1)%S.length],U=k(F),Y=k(O),W=w?U\u003e=Q:U\u003c=Q,te=w?Y\u003e=Q:Y\u003c=Q;if(W\u0026\u0026M.push(F),W===te)continue;const j=(Q-U)/(Y-U);M.push({x:F.x+(O.x-F.x)*j,y:F.y+(O.y-F.y)*j})}return M},B=[];for(let S=0;S\u003cy;S++){const Q=I+S*x,w=S===y-1?C:Q+x,M=E(E(h,Q,!0),w,!1);if(M.length===0)continue;const k=Math.min(...M.map(U=\u003eU.x)),R=Math.max(...M.map(U=\u003eU.x)),F=Math.min(...M.map(U=\u003eU.y)),O=Math.max(...M.map(U=\u003eU.y));B.push({center:{x:(k+R)/2,y:(F+O)/2},width:R-k,height:O-F})}return B})(i):r===null?((A,c)=\u003e{const{center:l,width:u,height:g,rotation:h}=A,d=Math.max(1,Math.ceil(u/c)),p=Math.max(1,Math.ceil(g/c)),m=u/d,_=g/p,f=h*Math.PI/180,I=Math.cos(f),C=Math.sin(f),y=[];for(let x=0;x\u003cd;x++){const E=(x-d/2+.5)*m;for(let B=0;B\u003cp;B++){const S=(B-p/2+.5)*_;y.push({center:{x:l.x+E*I-S*C,y:l.y+E*C+S*I},width:Math.abs(m*I)+Math.abs(_*C),height:Math.abs(m*C)+Math.abs(_*I)})}}return y})(i,(A=\u003eA.obstacleId?.startsWith(\"trace_obstacle_\")?.75:.4)(t)):t.obstacleId?.startsWith(\"trace_obstacle_\")?XBt(i,r):((A,c)=\u003e{const{center:l,width:u,height:g,rotation:h}=A,d=Math.max(u,g),p=Math.min(u,g),m=Math.max(1,Math.ceil(c)),_=d/m,f=h*Math.PI/180,I=Math.cos(f),C=Math.sin(f),y=Math.max(_,.75*p),x=[];for(let E=0;E\u003cm;E++){const B=(E-m/2+.5)*_,S=u\u003e=g?B*I:-B*C,Q=u\u003e=g?B*C:B*I;x.push({center:{x:l.x+S,y:l.y+Q},width:y,height:y})}return x})(i,r),a=t.connectedTo.length\u003e0?s.reduce((A,c,l)=\u003e{const u=s[A],g=(u.center.x-t.center.x)**2+(u.center.y-t.center.y)**2;return(c.center.x-t.center.x)**2+(c.center.y-t.center.y)**2\u003cg?l:A},0):-1;return s.map((A,c)=\u003e({...o,obstacleId:c===a?o.obstacleId:o.obstacleId?`${o.obstacleId}_approx_${c}`:void 0,connectedTo:o.connectedTo,center:A.center,width:A.width,height:A.height}))},e9t=t=\u003e{const e=new Map,n=new Map,o=new Map;for(const[r,s]of t.obstacles.entries()){const a=ZBt(s),A=K0o(s,r);n.set(A,a),o.set(A,s);for(const c of a){const l=[c.center.x.toFixed(6),c.center.y.toFixed(6),c.width.toFixed(6),c.height.toFixed(6),c.layers.join(\",\")].join(\":\"),u=e.get(l);u?u.connectedTo=[...new Set([...u.connectedTo,...c.connectedTo])]:e.set(l,c)}}const i=t.connections.map(r=\u003e({...r,pointsToConnect:r.pointsToConnect.map(s=\u003e{const a=(A=\u003e[A.pointId,A.pcb_port_id].filter(c=\u003e!!c))(s);if(a.length===0)return s;for(const[A,c]of o){if(!a.some(h=\u003ec.connectedTo.includes(h))||!$Bt(s,c))continue;const l=n.get(A)??[];if(l.length===0)continue;if(l.some(h=\u003e$Bt(s,h)))return s;let u=l[0],g=Number.POSITIVE_INFINITY;for(const h of l){const d=no(qBt(s,h),s);d\u003cg\u0026\u0026(g=d,u=h)}return{...s,...qBt(s,u)}}return s})}));return{...t,connections:i,obstacles:[...e.values()]}},qAe=.001,t9t=t=\u003et.route_type===\"wire\",V0o=t=\u003et.route_type===\"via\",z0o=t=\u003et.route_type===\"through_obstacle\",n9t=(t,e,n)=\u003e{const o=Kr(t,n),i=Kr(e,n),r=Math.min(o,i),s=Math.max(o,i);return Array.from({length:s-r+1},(a,A)=\u003eKh(r+A,n))},o9t=({obstacleId:t,start:e,end:n,width:o,layer:i,connectedTo:r})=\u003e{const s=n.x-e.x,a=n.y-e.y,A=Math.hypot(s,a);return A\u003c=qAe?null:{obstacleId:t,type:\"rect\",layers:[i],center:{x:(e.x+n.x)/2,y:(e.y+n.y)/2},width:A,height:Math.max(o,qAe),ccwRotationDegrees:180*Math.atan2(a,s)/Math.PI,connectedTo:r}};function J0o(t){if(!t)return t;const e=(n=\u003e{if(!n)return[];const o=[],i=om(n);for(const[r,s]of(n.traces??[]).entries()){const a=s.connectsTo??[];for(let A=0;A\u003cs.route.length;A++){const c=s.route[A];if(V0o(c)){const l=c.via_diameter??i.padDiameter;o.push({obstacleId:`trace_obstacle_${s.pcb_trace_id}_${r}_${A}_via`,type:\"rect\",layers:n9t(c.from_layer,c.to_layer,n.layerCount),center:{x:c.x,y:c.y},width:Math.max(l,qAe),height:Math.max(l,qAe),connectedTo:a});continue}if(z0o(c)){const l=o9t({obstacleId:`trace_obstacle_${s.pcb_trace_id}_${r}_${A}_through`,start:c.start,end:c.end,width:c.width,layer:c.from_layer,connectedTo:a});l\u0026\u0026(l.layers=n9t(c.from_layer,c.to_layer,n.layerCount),o.push(l))}}for(let A=0;A\u003cs.route.length-1;A++){const c=s.route[A],l=s.route[A+1];if(!t9t(c)||!t9t(l)||c.layer!==l.layer)continue;const u=o9t({obstacleId:`trace_obstacle_${s.pcb_trace_id}_${r}_${A}_wire`,start:c,end:l,width:c.width,layer:c.layer,connectedTo:a});u\u0026\u0026o.push(u)}}return o})(t);return e.length===0?t:{...t,obstacles:[...t.obstacles??[],...e]}}function i9t(t,e){const n=(function(o,i){const r=Hz(o.__zLayers??o.zLayers??[],i);if(r.length\u003e0)return r;const s=Oz(o.layers,i);if(s.length\u003e0)return s;throw new Error(`Obstacle \"${o.obstacleId??\"unknown\"}\" has no layers on this ${i}-layer board`)})(t,e);return{...t,layers:n.map(o=\u003eKh(o,e)),zLayers:n,__zLayers:n}}function mN(t){return{...t,obstacles:t.obstacles.map(e=\u003ei9t(e,t.layerCount)),jumpers:t.jumpers?.map(e=\u003e({...e,pads:e.pads.map(n=\u003ei9t(n,t.layerCount))}))}}var r9t=t=\u003e{const e=t.obstacles.filter(i=\u003e!((r,s)=\u003e!(a=\u003e(a.connectedTo?.length??0)\u003e0||(a.offBoardConnectsTo?.length??0)\u003e0||a.netIsAssignable===!0)(r)\u0026\u0026(s.outline\u0026\u0026s.outline.length\u003e=3?!Nse(r,s.outline):!WF({minX:r.center.x-r.width/2,maxX:r.center.x+r.width/2,minY:r.center.y-r.height/2,maxY:r.center.y+r.height/2},s.bounds)))(i,t)),n=e.length!==t.obstacles.length,o=n\u0026\u0026t.outline\u0026\u0026t.outline.length\u003e=3?(i=\u003e{if(i.width\u0026\u0026i.height\u0026\u0026i.center){const u=i.width/2,g=i.height/2;return{minX:i.center.x-u,minY:i.center.y-g,maxX:i.center.x+u,maxY:i.center.y+g,width:i.width,height:i.height,center:{x:i.center.x,y:i.center.y}}}if(!i.outline||i.outline.length===0)throw new Error(\"Unable to compute board bounds. pcb_board must include width/height/center or a non-empty outline.\");let r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(const u of i.outline)r=Math.min(r,u.x),s=Math.min(s,u.y),a=Math.max(a,u.x),A=Math.max(A,u.y);const c=a-r,l=A-s;return{minX:r,minY:s,maxX:a,maxY:A,width:c,height:l,center:{x:r+c/2,y:s+l/2}}})({center:{x:0,y:0},num_layers:t.layerCount,outline:t.outline}):t.bounds;return n?{...t,obstacles:e,bounds:o}:t},XAe=class extends yr{constructor(t,e={}){super(),this.inputSrj=t,this.visualizationOptions=e,this.MAX_ITERATIONS=1}inputSrj;visualizationOptions;outputSrj;_step(){const t=mN(this.inputSrj),e=J0o(t)??t,n=e9t(r9t(e));this.outputSrj=mN(n),this.solved=!0}getOutputSimpleRouteJson(){if(!this.outputSrj)throw new Error(\"PreprocessSimpleRouteJsonSolver has not solved yet\");return this.outputSrj}getConstructorParams(){return[this.inputSrj,this.visualizationOptions]}visualize(){return this.outputSrj?Il(mx({...this.outputSrj,traces:[]},this.visualizationOptions),ab({srj:this.outputSrj,visualizationOptions:this.visualizationOptions})):{lines:[],points:[],rects:[],circles:[]}}};function oI(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var s9t=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e,this.originalSrj=t,this.opts={...e};const n=this.opts;if(this.effort=n.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=n.maxNodeDimension??16,this.maxNodeRatio=n.maxNodeRatio??6,this.minNodeArea=n.minNodeArea??.1**2,this.setSimpleRouteJson(t),n.capacityDepth===void 0){const o=this.srj.bounds.maxX-this.srj.bounds.minX,i=this.srj.bounds.maxY-this.srj.bounds.minY,r=Math.max(o,i),s=n.targetMinCapacity??.5;n.capacityDepth=$Q(r,s)}this.cacheProvider=n.cacheProvider===void 0?tB():n.cacheProvider===null?null:n.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;nodeSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityRepairSolver;highDensityStitchSolver;globalDrcForceImproveSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[oI(\"preprocessSimpleRouteJsonSolver\",XAe,t=\u003e[t.originalSrj],{onSolved:t=\u003e{t.setSimpleRouteJson(t.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),oI(\"escapeViaLocationSolver\",FAe,t=\u003e[t.srj,{viaDiameter:t.viaDiameter,minTraceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=\u003e{t.srjWithEscapeViaLocations=t.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),oI(\"netToPointPairsSolver\",rL,t=\u003e{const e=t.srjWithEscapeViaLocations??t.srj;return[e,t.colorMap,JQ(e)]},{onSolved:t=\u003e{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,t.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),oI(\"nodeSolver\",qF,t=\u003e[{simpleRouteJson:t.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:t=\u003e{t.capacityNodes=t.nodeSolver?.getOutput().meshNodes??[]}}),oI(\"nodeDimensionSubdivisionSolver\",vAe,t=\u003e[t.capacityNodes,t.maxNodeDimension,t.maxNodeRatio,t.minNodeArea],{onSolved:t=\u003e{t.capacityNodes=t.nodeDimensionSubdivisionSolver?.outputNodes??[]}}),oI(\"edgeSolver\",WQ,t=\u003e[t.capacityNodes],{onSolved:t=\u003e{t.capacityEdges=t.edgeSolver?.edges}}),oI(\"availableSegmentPointSolver\",kD,t=\u003e[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!0}]),oI(\"necessaryCrampedPortPointSolver\",lJ,t=\u003e[{capacityMeshNodes:t.capacityNodes,sharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),simpleRouteJson:t.srjWithPointPairs}]),oI(\"portPointPathingSolver\",kAe,t=\u003e{const e=t.necessaryCrampedPortPointSolver?.getOutput()??t.availableSegmentPointSolver.getOutput(),{graph:n,connections:o}=uJ({capacityMeshNodes:t.capacityNodes,layerCount:t.srj.layerCount,connectivityMap:t.connMap,segmentPortPoints:e.flatMap(i=\u003ei.portPoints),simpleRouteJsonConnections:t.srjWithPointPairs.connections});return[{graph:n,connections:o,layerCount:t.srj.layerCount,effort:t.effort,minViaPadDiameter:t.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),oI(\"uniformPortDistributionSolver\",kz,t=\u003e[{nodeWithPortPoints:t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:t.minTraceWidth,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]),oI(\"highDensityRouteSolver\",HD,t=\u003e{const e=t.uniformPortDistributionSolver?.getOutput()??[],n=t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],o=(e.length\u003e0?e:n).map(i=\u003eSft(i)?{...i,availableZ:Array.from({length:t.srj.layerCount},(r,s)=\u003es)}:i);return t.highDensityNodePortPoints=structuredClone(o),[{nodePortPoints:o,nodePfById:new Map((t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(i=\u003e[i.capacityMeshNodeId,t.portPointPathingSolver?.computeNodePf(i)??null])),colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount,useGrowShrinkHighDensityIntraNodeSolver:!0}]}),oI(\"highDensityForceImproveSolver\",mJ,t=\u003e[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityRouteSolver.routes,colorMap:t.colorMap,totalStepsPerNode:Math.max(20,Math.round(60*t.effort)),nodeAssignmentMargin:t.srj.defaultObstacleMargin??.2}]),oI(\"highDensityRepairSolver\",pW,t=\u003e[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,obstacles:t.srj.obstacles,colorMap:t.colorMap,repairMargin:t.srj.defaultObstacleMargin??.2}]),oI(\"highDensityStitchSolver\",$Ae,t=\u003e[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensityRepairSolver?.getOutput()??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter}]),oI(\"traceSimplificationSolver\",j8,t=\u003e[{hdRoutes:t.highDensityStitchSolver.mergedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,outline:t.srj.outline,defaultViaDiameter:t.viaDiameter,layerCount:t.srj.layerCount,minTraceToPadEdgeClearance:t.srj.minTraceToPadEdgeClearance,iterations:2}]),oI(\"traceWidthSolver\",aL,t=\u003e[{hdRoutes:t.traceSimplificationSolver.simplifiedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,minTraceWidth:t.minTraceWidth,connection:t.srj.connections,obstacleMargin:t.srj.minTraceToPadEdgeClearance??.15,layerCount:t.srj.layerCount}]),oI(\"globalDrcForceImproveSolver\",S7,t=\u003e[{srj:t.srjWithPointPairs,hdRoutes:t.traceWidthSolver.getHdRoutesWithWidths(),effort:t.effort}])];setSimpleRouteJson(t){this.srj=t;const e=om(this.srj);this.viaDiameter=e.padDiameter,this.viaHoleDiameter=e.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.escapeViaLocationSolver?.visualize(),e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeDimensionSubdivisionSolver?.visualize(),i=this.nodeTargetMerger?.visualize(),r=this.singleLayerNodeMerger?.visualize(),s=this.strawSolver?.visualize(),a=this.edgeSolver?.visualize(),A=this.deadEndSolver?.visualize(),c=this.availableSegmentPointSolver?.visualize(),l=this.portPointPathingSolver?.visualize(),u=this.multiSectionPortPointOptimizer?.visualize(),g=this.uniformPortDistributionSolver?.visualize(),h=this.highDensityRouteSolver?.visualize(),d=this.highDensityForceImproveSolver?.visualize(),p=this.highDensityRepairSolver?.visualize(),m=this.highDensityStitchSolver?.visualize(),_=this.traceSimplificationSolver?.visualize(),f=this.necessaryCrampedPortPointSolver?.visualize(),I=(this.highDensityRouteSolver?.visualize(),this.originalSrj),C=I.outline,y=[];if(y.push({points:[{x:I.bounds?.minX??-50,y:I.bounds?.minY??-50},{x:I.bounds?.maxX??50,y:I.bounds?.minY??-50},{x:I.bounds?.maxX??50,y:I.bounds?.maxY??50},{x:I.bounds?.minX??-50,y:I.bounds?.maxY??50},{x:I.bounds?.minX??-50,y:I.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),C\u0026\u0026C.length\u003e=2){const Q=C.map(w=\u003e({x:w.x,y:w.y}));Q.push({...Q[0]}),y.push({points:Q,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const x=z8(I),E={points:[...I.connections.flatMap(Q=\u003eQ.pointsToConnect.map(w=\u003e({...w,layer:J8(w,I.layerCount),label:`${Q.name} ${w.pcb_port_id??\"\"}`})))],rects:[...(I.obstacles??[]).filter(Q=\u003e!Q.isCopperPour).map(Q=\u003e({...Q,fill:Q.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":Q.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(Q,I.layerCount),label:x(Q)}))],lines:y},B=ab({srj:I}),S=[Il(E,B),t,e,n,o,i,r,s,a,A,c,f,l,u,g,h?Il(E,h):null,d,p,m,_,this.solved?Il({lines:y},ab({srj:this.originalSrj}),mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...S)}preview(){if(this.highDensityRouteSolver){const t=[];for(let e=this.highDensityRouteSolver.routes.length-1;e\u003e=0;e--){const n=this.highDensityRouteSolver.routes[e];if(t.push({points:n.route.map(o=\u003e({x:o.x,y:o.y})),strokeColor:this.colorMap[n.connectionName]}),t.length\u003e200)break}return{lines:t}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){return this.globalDrcForceImproveSolver?.getOutput()??this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error(\"Cannot get output before solving is complete\");const t=[],e=this._getOutputHdRoutes();for(const n of this.netToPointPairsSolver?.newConnections??[]){const o=n.__netConnectionName??this.originalSrj.connections.find(r=\u003er.name===n.name)?.__netConnectionName,i=e.filter(r=\u003er.connectionName===n.name);for(let r=0;r\u003ci.length;r++){const s=i[r],a={type:\"pcb_trace\",pcb_trace_id:`${n.name}_${r}`,connection_name:o??n.__rootConnectionNames?.[0]??n.name,route:nB(s,this.srj.layerCount,{connectionPoints:n.pointsToConnect,defaultViaHoleDiameter:this.viaHoleDiameter,obstacles:this.srj.obstacles,connMap:this.connMap})};t.push(a)}}return t}getOutputSimpleRouteJson(){return{...this.originalSrj,traces:this.getOutputSimplifiedPcbTraces()}}},a9t=t=\u003e{const e=[];let n=t;for(;n;)e.push(n),n=n.activeSubSolver;for(let o=e.length-1;o\u003e=0;o--){const i=e[o]?.pendingEffects?.filter(Boolean)??[];if(i.length\u003e0)return i}return[]},ZAe=t=\u003e/\\/solve\\/?$/.test(t)?t.replace(/\\/+$/,\"\"):`${t.replace(/\\/+$/,\"\")}/solve`,W0o=(t,e,n)=\u003e{const o=(i=\u003e{const r=new Map;for(const s of i.portPoints)s.rootConnectionName\u0026\u0026!r.has(s.connectionName)\u0026\u0026r.set(s.connectionName,s.rootConnectionName);return r})(t);return e.map(i=\u003e({connectionName:i.connectionName,rootConnectionName:i.rootConnectionName??o.get(i.connectionName)??void 0,traceThickness:i.traceThickness??n.traceWidth,viaDiameter:i.viaDiameter??n.viaDiameter,route:(i.route??[]).map(r=\u003e({x:r.x,y:r.y,z:r.z,...r.insideJumperPad?{insideJumperPad:!0}:{}})),vias:(i.vias??[]).map(r=\u003e({x:r.x,y:r.y})),...i.jumpers?{jumpers:i.jumpers}:{}}))},SSe=(t,e)=\u003e{if(t.length===0)return null;const n=Math.min(Math.max(e,0),1),o=(t.length-1)*n,i=Math.floor(o),r=Math.ceil(o),s=t[i],a=t[r];return i===r?s:s+(a-s)*(o-i)},rH=t=\u003enew Set(t.portPoints.map(e=\u003ee.connectionName)).size,A9t=t=\u003e!(rH(t)\u003c3)\u0026\u0026(t.availableZ?.length??0)!==1,c9t=t=\u003et?.MULTI_HEAD_POLYLINE_SOLVER?\"MultiHeadPolyLineIntraNodeSolver3\":t?.CLOSED_FORM_SINGLE_TRANSITION?\"SingleTransitionIntraNodeSolver\":t?.CLOSED_FORM_TWO_TRACE_SAME_LAYER?\"TwoCrossingRoutesHighDensitySolver\":t?.CLOSED_FORM_TWO_TRACE_TRANSITION_CROSSING?\"SingleTransitionCrossingRouteSolver\":t?.HIGH_DENSITY_A01?\"HighDensitySolverA01\":t?.HIGH_DENSITY_A03?\"HighDensitySolverA03\":\"SingleHighDensityRouteSolver6_VertHorzLayer_FutureCost\",l9t=t=\u003e{if(t instanceof T7e){const n=c9t(t.hyperParameters);return t.cacheHit?`${n} [cached]`:n}if(t instanceof Wse)return c9t(t.hyperParameters);if(t\u0026\u0026typeof t==\"object\"\u0026\u0026\"getSolverName\"in t\u0026\u0026typeof t.getSolverName==\"function\")return t.getSolverName();const e=t?.constructor;return typeof e?.name==\"string\"?e.name:\"unknown\"},u9t=t=\u003et.winningSolver?l9t(t.winningSolver):l9t(t),j0o=class extends yr{getSolverName(){return\"Pipeline5HdCacheHighDensitySolver\"}unsolvedNodePortPoints;colorMap;connMap;viaDiameter;traceWidth;obstacleMargin;obstacles;layerCount;hdCacheBaseUrl;fetchImpl;nodePfById;routes=[];nodeSolveMetadataById=new Map;launchedRemoteSolves=!1;solvedRoutesByNodeIndex=new Map;failedNodeResults=[];remoteResponseMeasurements=[];constructor({nodePortPoints:t,colorMap:e,connMap:n,viaDiameter:o,traceWidth:i,obstacleMargin:r,obstacles:s,layerCount:a,nodePfById:A,hdCacheBaseUrl:c,fetchImpl:l}){super(),this.unsolvedNodePortPoints=t,this.colorMap=e??{},this.connMap=n,this.viaDiameter=o??.3,this.traceWidth=i??.15,this.obstacleMargin=r??.15,this.obstacles=s??[],this.layerCount=a??2,this.hdCacheBaseUrl=c??\"https://hd-cache.tscircuit.com\",this.fetchImpl=(l??globalThis.fetch).bind(globalThis),this.nodePfById=A instanceof Map?new Map(A):new Map(Object.entries(A??{})),this.pendingEffects=[],this.stats={localDirectNodeCount:0,localSolvedNodeCount:0,localFallbackNodeCount:0,remoteFallbackNodeCount:0,remoteRequestsStarted:0,remoteRequestsCompleted:0,remoteResponseSampleCount:0,remoteKOrderSampleCount:0,slowestRemoteResponseMs:null,slowestRemoteResponseNodeId:null,p50RemoteResponseMs:null,p50RemoteKOrder:null,p95RemoteKOrder:null,remoteSources:{}}}computeProgress(){return this.unsolvedNodePortPoints.length===0?1:this.nodeSolveMetadataById.size/this.unsolvedNodePortPoints.length}solveNodeLocally(t,e,n={}){const o=new Vz({nodeWithPortPoints:t,colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,obstacles:this.obstacles,layerCount:this.layerCount});if(o.solve(),o.failed){const r=o.error??`Local intra-node solver failed for ${t.capacityMeshNodeId}`,s=rH(t);return this.failedNodeResults.push({node:t,error:n.remoteFailure\u0026\u0026n.resolution===\"local-fallback\"?`Remote solve failed (${n.remoteFailure}); local fallback failed (${r})`:r}),void this.recordNodeSolveMetadata(t,{status:\"failed\",resolution:\"failed\",solverType:u9t(o),supervisorType:o.getSolverName(),iterations:o.iterations,pairCount:s,routeCount:0,remoteAttempt:n.resolution===\"local-fallback\"?{attempted:!0,endpoint:ZAe(this.hdCacheBaseUrl),source:\"error\",durationMs:n.remoteDurationMs,error:n.remoteFailure??r}:{attempted:!1},error:r})}this.solvedRoutesByNodeIndex.set(e,o.solvedRoutes);const i=rH(t);this.recordNodeSolveMetadata(t,{status:\"solved\",resolution:n.resolution??\"local\",solverType:u9t(o),supervisorType:o.getSolverName(),iterations:o.iterations,pairCount:i,routeCount:o.solvedRoutes.length,remoteAttempt:n.resolution===\"local-fallback\"?{attempted:!0,endpoint:ZAe(this.hdCacheBaseUrl),source:\"error\",durationMs:n.remoteDurationMs,error:n.remoteFailure}:{attempted:!1}}),n.resolution===\"local-fallback\"?(this.stats.localFallbackNodeCount+=1,this.stats.remoteFallbackNodeCount+=1):this.stats.localDirectNodeCount+=1,this.stats.localSolvedNodeCount+=1}async solveNodeViaHdCache(t,e){const n=ZAe(this.hdCacheBaseUrl),o={\"content-type\":\"application/json\"},i={nodeWithPortPoints:t},r=JSON.stringify(i),s=Date.now();let a,A,c,l=null,u=null;try{const h=await this.fetchImpl(n,{method:\"POST\",headers:o,body:r});if(a=h.status,A=h.ok,c=await h.text(),l=Date.now()-s,u=c?JSON.parse(c):null,!h.ok)throw new Error(u?.message??c??`hd-cache request failed with status ${h.status}`);if(!u?.ok||u.routes===null)throw new Error(u?.message??`hd-cache returned no routes for ${t.capacityMeshNodeId}`);const d=W0o(t,u.routes,{traceWidth:this.traceWidth,viaDiameter:this.viaDiameter});this.solvedRoutesByNodeIndex.set(e,d),this.recordNodeSolveMetadata(t,{status:\"solved\",resolution:\"remote\",solverType:`hd-cache.tscircuit.com [${u.source}]`,iterations:null,pairCount:rH(t),routeCount:d.length,remoteAttempt:{attempted:!0,endpoint:ZAe(this.hdCacheBaseUrl),source:u.source,durationMs:l}}),this.recordRemoteSource(u.source)}catch(h){l??=Date.now()-s;const d=(p=\u003ep instanceof Error?p.message:String(p))(h);this.recordFailedHdCacheRequest({nodeId:t.capacityMeshNodeId,pairCount:rH(t),failedAt:new Date().toISOString(),durationMs:l,error:d,url:n,request:{method:\"POST\",headers:o,body:r,bodyJson:i},response:a!==void 0||A!==void 0||c!==void 0||u!==null?{status:a,ok:A,text:c,body:u}:void 0}),this.recordRemoteSource(\"error\"),this.solveNodeLocally(t,e,{resolution:\"local-fallback\",remoteFailure:d,remoteDurationMs:l})}finally{this.recordRemoteResponseMetrics(t.capacityMeshNodeId,l??Date.now()-s,(g=u?.kOrder,typeof g==\"number\"\u0026\u0026Number.isFinite(g)?u.kOrder:null)),this.stats.remoteRequestsCompleted+=1}var g}launchRemoteSolves(){const t=[];this.unsolvedNodePortPoints.forEach((e,n)=\u003e{if(!A9t(e))return void this.solveNodeLocally(e,n);const o={name:`hd-cache:${e.capacityMeshNodeId}`,promise:Promise.resolve()};o.promise=this.solveNodeViaHdCache(e,n).finally(()=\u003e{this.pendingEffects=this.pendingEffects?.filter(i=\u003ei!==o)}),t.push(o)}),this.pendingEffects=t,this.stats.remoteRequestsStarted=t.length}recordRemoteSource(t){this.stats.remoteSources[t]=(this.stats.remoteSources[t]??0)+1}recordRemoteResponseMetrics(t,e,n){this.remoteResponseMeasurements.push({nodeId:t,durationMs:e,kOrder:n}),this.stats.remoteResponseSampleCount=this.remoteResponseMeasurements.length,this.stats.remoteKOrderSampleCount=this.remoteResponseMeasurements.filter(s=\u003es.kOrder!==null).length;let o=null;for(const s of this.remoteResponseMeasurements)(!o||s.durationMs\u003eo.durationMs)\u0026\u0026(o=s);this.stats.slowestRemoteResponseMs=o?.durationMs??null,this.stats.slowestRemoteResponseNodeId=o?.nodeId??null;const i=this.remoteResponseMeasurements.map(s=\u003es.durationMs).sort((s,a)=\u003es-a);this.stats.p50RemoteResponseMs=SSe(i,.5);const r=this.remoteResponseMeasurements.map(s=\u003es.kOrder).filter(s=\u003es!==null).sort((s,a)=\u003es-a);this.stats.p50RemoteKOrder=SSe(r,.5),this.stats.p95RemoteKOrder=SSe(r,.95)}recordFailedHdCacheRequest(t){const e=(()=\u003e{if(typeof window\u003e\"u\")return null;const n=window;return Array.isArray(n.__FAILED_HD_CACHE_REQUESTS)||(n.__FAILED_HD_CACHE_REQUESTS=[]),n.__FAILED_HD_CACHE_REQUESTS})();e\u0026\u0026e.push(t)}recordNodeSolveMetadata(t,e){this.nodeSolveMetadataById.set(t.capacityMeshNodeId,{...e,node:t,nodePf:this.nodePfById.get(t.capacityMeshNodeId)??null})}ensureFailedNodeMetadata(){for(const t of this.failedNodeResults)this.nodeSolveMetadataById.has(t.node.capacityMeshNodeId)||this.recordNodeSolveMetadata(t.node,{status:\"failed\",resolution:\"failed\",solverType:\"unknown\",iterations:null,pairCount:rH(t.node),routeCount:0,remoteAttempt:{attempted:A9t(t.node),source:\"error\",error:t.error},error:t.error})}getVisibleRoutes(){if(this.solved)return this.routes;const t=[];for(let e=0;e\u003cthis.unsolvedNodePortPoints.length;e++)t.push(...this.solvedRoutesByNodeIndex.get(e)??[]);return t}createNodeMarkerLabel(t,e){return[\"hd_node_marker\",`node: ${t}`,`status: ${e.status}`,`resolution: ${e.resolution}`,`solver: ${e.solverType}`,...e.supervisorType?[`supervisor: ${e.supervisorType}`]:[],...e.iterations!==null?[`iterations: ${e.iterations}`]:[],`pairCount: ${e.pairCount}`,`routes: ${e.routeCount}`,`nodePf: ${e.nodePf??\"n/a\"}`,\"remoteAttempted: \"+(e.remoteAttempt.attempted?\"yes\":\"no\"),...e.remoteAttempt.source?[`remoteSource: ${e.remoteAttempt.source}`]:[],...e.remoteAttempt.durationMs!==void 0?[`remoteDurationMs: ${e.remoteAttempt.durationMs}`]:[],...e.remoteAttempt.error?[`remoteError: ${e.remoteAttempt.error}`]:[],`portPoints: ${e.node.portPoints.length}`,...e.error?[`error: ${e.error}`]:[]].join(`\n`)}_step(){if(!this.launchedRemoteSolves)return this.launchedRemoteSolves=!0,void this.launchRemoteSolves();if(!((this.pendingEffects?.length??0)\u003e0)){if(this.failedNodeResults.length\u003e0){this.ensureFailedNodeMetadata();const t=this.failedNodeResults[0];return this.failed=!0,void(this.error=`Failed to solve ${this.failedNodeResults.length} nodes via hd-cache. First failure: ${t?.node.capacityMeshNodeId} (${t?.error})`)}this.routes=[];for(let t=0;t\u003cthis.unsolvedNodePortPoints.length;t++)this.routes.push(...this.solvedRoutesByNodeIndex.get(t)??[]);this.solved=!0}}visualize(){const t={lines:[],points:[],rects:[],circles:[]};for(const e of this.getVisibleRoutes()){const n=Kse(e.route,e.connectionName,this.colorMap[e.connectionName]);for(const o of n)t.lines.push({points:o.points,label:o.connectionName,strokeColor:o.z===0?o.color:Es(o.color,.75),layer:`z${o.z}`,strokeWidth:e.traceThickness,strokeDash:o.z!==0?\"10, 5\":void 0});for(const o of e.vias)t.circles.push({center:o,layer:\"z0,1\",radius:e.viaDiameter/2,fill:this.colorMap[e.connectionName],label:`${e.connectionName} via`})}for(const[e,n]of this.nodeSolveMetadataById){const o=n.node.center.x-n.node.width/2,i=n.node.center.x+n.node.width/2,r=n.node.center.y-n.node.height/2,s=n.node.center.y+n.node.height/2,a=this.createNodeMarkerLabel(e,n),A=n.status===\"solved\"?\"blue\":\"red\",c=n.status===\"solved\"?.03:.08;if(t.lines.push({points:[{x:o,y:r},{x:i,y:r}],layer:\"hd_node_boundaries\",strokeColor:A,strokeDash:\"6, 4\",strokeWidth:c,label:a},{points:[{x:i,y:r},{x:i,y:s}],layer:\"hd_node_boundaries\",strokeColor:A,strokeDash:\"6, 4\",strokeWidth:c,label:a},{points:[{x:i,y:s},{x:o,y:s}],layer:\"hd_node_boundaries\",strokeColor:A,strokeDash:\"6, 4\",strokeWidth:c,label:a},{points:[{x:o,y:s},{x:o,y:r}],layer:\"hd_node_boundaries\",strokeColor:A,strokeDash:\"6, 4\",strokeWidth:c,label:a}),n.status===\"solved\")t.points.push({x:n.node.center.x,y:n.node.center.y,color:A,layer:\"hd_node_markers\",label:a});else{t.lines.push({points:[{x:0,y:0},{x:n.node.center.x,y:n.node.center.y}],layer:\"hd_failed_node_guides\",strokeColor:A,strokeDash:\"8, 6\",strokeWidth:.05,label:a});const l=Math.max(n.node.width,1.2),u=Math.max(n.node.height,1.2),g=l/2,h=u/2;t.rects.push({center:n.node.center,layer:\"hd_node_markers\",width:l,height:u,fill:\"rgba(255, 0, 0, 0.3)\",stroke:A,label:a}),t.circles.push({center:n.node.center,radius:Math.max(.6*Math.max(l,u),1.1),layer:\"hd_node_markers\",fill:\"rgba(255, 0, 0, 0.08)\",stroke:A,label:a}),t.lines.push({points:[{x:n.node.center.x-g,y:n.node.center.y-h},{x:n.node.center.x+g,y:n.node.center.y+h}],layer:\"hd_node_markers\",strokeColor:A,strokeWidth:.16,label:a},{points:[{x:n.node.center.x-g,y:n.node.center.y+h},{x:n.node.center.x+g,y:n.node.center.y-h}],layer:\"hd_node_markers\",strokeColor:A,strokeWidth:.16,label:a})}}return t}},$0o=class extends s9t{hdCacheBaseUrl;hdCacheFetch;constructor(t,e={}){super(t,{...e,maxNodeDimension:e.maxNodeDimension??7,maxNodeRatio:e.maxNodeRatio??4}),this.hdCacheBaseUrl=e.hdCacheBaseUrl??\"https://hd-cache.tscircuit.com\",this.hdCacheFetch=e.hdCacheFetch,this.replaceHighDensityPipelineStep()}replaceHighDensityPipelineStep(){const t=this.pipelineDef.findIndex(e=\u003ee.solverName===\"highDensityRouteSolver\");if(t===-1)throw new Error(\"Pipeline4 highDensityRouteSolver step is missing\");this.pipelineDef[t]={...this.pipelineDef[t],solverClass:j0o,getConstructorParams:e=\u003e{const n=e.uniformPortDistributionSolver?.getOutput()??[],o=e.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],i=n.length\u003e0?n:o;return e.highDensityNodePortPoints=structuredClone(i),[{nodePortPoints:i,nodePfById:new Map((e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(r=\u003e[r.capacityMeshNodeId,e.portPointPathingSolver?.computeNodePf(r)??null])),colorMap:e.colorMap,connMap:e.connMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount,hdCacheBaseUrl:e.hdCacheBaseUrl,fetchImpl:e.hdCacheFetch}]}}}async stepAsync(){if(this.solved||this.failed)return;this.step();const t=a9t(this);t.length!==0\u0026\u0026(await Promise.race(t.map(e=\u003ee.promise.then(()=\u003ee.name,()=\u003ee.name))),this.solved||this.failed||this.step())}async solveAsync(){const t=Date.now();for(;!this.solved\u0026\u0026!this.failed;)await this.stepAsync();this.timeToSolve=Date.now()-t}solve(){throw new Error(\"AutoroutingPipelineSolver5_HdCache requires async execution. Use solveAsync() or stepAsync().\")}};X9e(Z$n(),1);var _N=t=\u003et.rootConnectionName??t.connectionName,sH=(t,e)=\u003et.flatMap((n,o)=\u003e_N(n)===e?[o]:[]),uB=(t,e,n,o)=\u003e{const i=(g,h,d)=\u003e{const p=d.x-h.x,m=d.y-h.y,_=g.x-h.x,f=g.y-h.y,I=p**2+m**2,C=I===0?0:Math.max(0,Math.min(1,(_*p+f*m)/I));return Math.hypot(g.x-(h.x+C*p),g.y-(h.y+C*m))},r={x:e.x-t.x,y:e.y-t.y},s={x:o.x-n.x,y:o.y-n.y},a={x:n.x-t.x,y:n.y-t.y},A=(g,h)=\u003eg.x*h.y-g.y*h.x,c=A(r,s),l=Math.hypot(r.x,r.y),u=1e-12*(l*Math.hypot(s.x,s.y)+1);if(Math.abs(c)\u003eu){const g=A(a,s)/c,h=A(a,r)/c;if(g\u003e=-1e-12\u0026\u0026g\u003c=1+1e-12\u0026\u0026h\u003e=-1e-12\u0026\u0026h\u003c=1+1e-12)return 0}else if(l\u003e1e-12\u0026\u0026Math.abs(A(a,r))\u003c=u){const g=Math.abs(r.x)\u003e=Math.abs(r.y),h=Math.min(g?t.x:t.y,g?e.x:e.y),d=Math.max(g?t.x:t.y,g?e.x:e.y),p=Math.min(g?n.x:n.y,g?o.x:o.y),m=Math.max(g?n.x:n.y,g?o.x:o.y);if(Math.max(h,p)\u003c=Math.min(d,m)+1e-12)return 0}return Math.min(i(t,n,o),i(e,n,o),i(n,t,e),i(o,t,e))},QSe=(t,e)=\u003eMath.hypot(e.x-t.x,e.y-t.y),cb=t=\u003e{let e=0;for(let n=0;n\u003ct.route.length-1;n++)e+=QSe(t.route[n],t.route[n+1]);return e},aH=(t,e)=\u003ee.reduce((n,o)=\u003en+cb(t[o]),0),AH=(t,e)=\u003e{const n=t.__zLayers,o=t.zLayers,i=n!==void 0?n:o;if(i!==void 0){if(!Array.isArray(i)||i.length===0||i.some(r=\u003e!Number.isInteger(r)||r\u003c0||r\u003e=e))throw new Error(\"Obstacle has invalid z-layer indexes\");return i}if(t.layers.length===0)throw new Error(\"Obstacle has no declared layers\");return t.layers.map(r=\u003e{if(r===\"top\")return 0;if(r===\"bottom\")return e-1;const s=/^inner(\\d+)$/.exec(r),a=s?Number(s[1]):-1;if(a\u003c=0||a\u003e=e-1)throw new Error(`Obstacle has invalid layer name \"${r}\"`);return a})},cH=t=\u003e{const e=(r,s,a,A)=\u003e{const c=a.center.x-a.width/2-A,l=a.center.x+a.width/2+A,u=a.center.y-a.height/2-A,g=a.center.y+a.height/2+A;if(r.x\u003e=c\u0026\u0026r.x\u003c=l\u0026\u0026r.y\u003e=u\u0026\u0026r.y\u003c=g||s.x\u003e=c\u0026\u0026s.x\u003c=l\u0026\u0026s.y\u003e=u\u0026\u0026s.y\u003c=g)return!0;const h=[{x:c,y:u},{x:l,y:u},{x:l,y:g},{x:c,y:g}];return h.some((d,p)=\u003euB(r,s,d,h[(p+1)%h.length])===0)};if(t.bounds\u0026\u0026t.meanderPoints.some(r=\u003er.x\u003ct.bounds.minX||r.x\u003et.bounds.maxX||r.y\u003ct.bounds.minY||r.y\u003et.bounds.maxY))return!1;const n=(r,s,a)=\u003e{const A=a.x-s.x,c=a.y-s.y,l=A*A+c*c,u=l===0?0:Math.max(0,Math.min(1,((r.x-s.x)*A+(r.y-s.y)*c)/l));return Math.hypot(r.x-(s.x+u*A),r.y-(s.y+u*c))},o=_N(t.route),i=t.route.traceThickness/2+t.obstacleMargin;for(let r=0;r\u003ct.meanderPoints.length-1;r++){const s=t.meanderPoints[r],a=t.meanderPoints[r+1];for(const A of t.obstacles){if(!AH(A,t.layerCount).includes(s.z))continue;const c=r===0||r===t.meanderPoints.length-2;if((!A.connectedTo.includes(o)||!c)\u0026\u0026e(s,a,A,i))return!1}for(const A of t.routedRoutes){const c=_N(A)===o;for(const l of A.vias){if(l.zLayers\u0026\u0026!l.zLayers.includes(s.z))continue;const u=Math.hypot(l.x-s.x,l.y-s.y)\u003c=1e-8||Math.hypot(l.x-a.x,l.y-a.y)\u003c=1e-8,g=t.route.traceThickness/2+A.viaDiameter/2+t.obstacleMargin;if((!c||!u)\u0026\u0026n(l,s,a)\u003cg)return!1}if(!c)for(let l=0;l\u003cA.route.length-1;l++){const u=A.route[l],g=A.route[l+1];if(s.z!==u.z||s.z!==g.z)continue;const h=t.route.traceThickness/2+A.traceThickness/2+t.obstacleMargin;if(uB(s,a,u,g)\u003ch)return!1}}}return!0},g9t=t=\u003e{const e=[];for(const o of t.routeIndexes){const i=t.routes[o],r=t.minMeanderGap??Math.max(.3,2*i.traceThickness),s=i.traceThickness+r,a=Math.max(t.minimumToothPitch??0,2*s),A=t.minMeanderHeight??s;for(let c=0;c\u003ci.route.length-1;c++){const l=i.route[c],u=i.route[c+1],g=QSe(l,u);if(g\u003c=0||l.z!==u.z)continue;const h=Math.min(Math.max(0,Math.floor(g/a)-1),t.maxToothCount);for(let d=1;d\u003c=h;d++){const p=g/(d+1),m=[p,Math.sqrt(a*p),a].filter((f,I,C)=\u003eC.findIndex(y=\u003eMath.abs(y-f)\u003c1e-9)===I),_=d%2==0?[\"balanced\",\"negative\",\"positive\"]:[\"negative\",\"positive\"];for(const f of m)for(const I of _)e.push({routeIndex:o,segmentIndex:c,segmentLength:g,toothCount:d,maximumDepth:t.maximumDepth,minimumHeight:A,toothPitch:f,placement:I,heightProfile:d\u003e1?\"tapered\":\"uniform\"})}}}const n={balanced:0,negative:1,positive:2};return e.sort((o,i)=\u003eo.toothCount-i.toothCount||n[o.placement]-n[i.placement]||i.toothPitch-o.toothPitch||i.segmentLength-o.segmentLength)},q0o=t=\u003e{if(t.centerlineDistanceCost===null)return 0;const e=t.predictedToothDepths.flatMap((_,f)=\u003e_\u003e0?[f]:[]);if(e.length===0)return 0;const n=e.map(_=\u003et.predictedToothDepths[_]),o=Math.max(...n),i=n.reduce((_,f)=\u003e_+f,0)/n.length,r=Math.sqrt(n.reduce((_,f)=\u003e_+(f-i)**2,0)/n.length),s=e[0],a=(e.at(-1)-s+1)*t.toothPitch,A=o/(t.toothPitch/2),c=t.addedLength/a,l=A/(1+A)*40,u=c/(1+c)*30,g=t.predictedToothDepths.map((_,f)=\u003eMath.sin(Math.PI*(f+1)/(t.predictedToothDepths.length+1))),h=Math.max(...g),d=Math.sqrt(t.predictedToothDepths.reduce((_,f,I)=\u003e_+(f-o*g[I]/h)**2,0)/t.predictedToothDepths.length),p=100-l-u-Math.min(10,(t.heightProfile===\"tapered\"?d:r)/i*10)-2*(n.length-1)-7*Math.min(1,t.addedLength/t.segmentLength)-100*t.centerlineDistanceCost,m=t.centerlineDistanceCost\u003e0?p:Math.max(0,p);return Math.round(1e6*m)/1e6},lH=t=\u003e{if(t.toothDepths.length!==t.toothCount)throw new Error(`LengthMatchingSolver: expected ${t.toothCount} tooth depths, received ${t.toothDepths.length}`);if(t.toothDepths.some(A=\u003e!Number.isFinite(A)||A\u003c0))throw new Error(\"LengthMatchingSolver: every meander tooth depth must be a non-negative finite number\");const e=t.route.route[t.segmentIndex],n=t.route.route[t.segmentIndex+1],o=QSe(e,n),i=(n.x-e.x)/o,r=(n.y-e.y)/o,s=(o-(t.toothCount-.5)*t.toothPitch)/2,a=[{...e}];for(let A=0;A\u003ct.toothCount;A++){const c=t.toothDepths[A];if(c===0)continue;const l=t.placement===\"balanced\"?A%2==0?-1:1:t.placement===\"negative\"?-1:1,u={x:-r*l,y:i*l},g=s+A*t.toothPitch,h=g+t.toothPitch/2,d={...e,x:e.x+i*g,y:e.y+r*g};a.push(d,{...d,x:d.x+u.x*c,y:d.y+u.y*c},{...e,x:e.x+i*h+u.x*c,y:e.y+r*h+u.y*c},{...e,x:e.x+i*h,y:e.y+r*h})}return a.push({...n}),(A=\u003e{if(A.length\u003c3)return A;const c=[{...A[0]}];for(let l=1;l\u003cA.length-1;l++){const u=A[l-1],g=A[l],h=A[l+1],d=Math.hypot(g.x-u.x,g.y-u.y),p=Math.hypot(h.x-g.x,h.y-g.y);if(d===0||p===0)throw new Error(\"LengthMatchingSolver: meander contains a zero-length segment\");const m={x:(g.x-u.x)/d,y:(g.y-u.y)/d},_={x:(h.x-g.x)/p,y:(h.y-g.y)/p};if(Math.abs(m.x*_.y-m.y*_.x)\u003c1e-9){c.push({...g});continue}const f=Math.min(d,p)/2,I={...g,x:g.x-m.x*f,y:g.y-m.y*f},C={...g,x:g.x+_.x*f,y:g.y+_.y*f},y=c.at(-1);I.x===y.x\u0026\u0026I.y===y.y||c.push(I);for(let x=1;x\u003c6;x++){const E=x/6,B=1-E;c.push({...g,x:B**2*I.x+2*B*E*g.x+E**2*C.x,y:B**2*I.y+2*B*E*g.y+E**2*C.y})}c.push(C)}return c.push({...A[A.length-1]}),c})(a)},uH=t=\u003e[...t.route.route.slice(0,t.segmentIndex),...lH(t),...t.route.route.slice(t.segmentIndex+2)],fW=t=\u003e{const e=cb(t.route),n=(()=\u003e{const O=[];for(let U=0;U\u003ct.candidate.toothCount;U++){const Y=Array(t.candidate.toothCount).fill(0);Y[U]=t.candidate.maximumDepth;const W=lH({...t.candidate,route:t.route,toothDepths:Y});if(t.isGeometryValid(W)){O.push(t.candidate.maximumDepth);continue}let te=0,j=t.candidate.maximumDepth;for(let J=0;J\u003c32;J++){const oe=(te+j)/2,ie=Array(t.candidate.toothCount).fill(0);ie[U]=oe;const ne=lH({...t.candidate,route:t.route,toothDepths:ie});t.isGeometryValid(ne)?te=oe:j=oe}O.push(te)}return O})(),o=(O=\u003e{if(O.heightProfile!==\"tapered\")return Array(O.toothCount).fill(1);const U=Array.from({length:O.toothCount},(W,te)=\u003eMath.sin(Math.PI*(te+1)/(O.toothCount+1))),Y=Math.max(...U);return U.map(W=\u003eW/Y)})(t.candidate),i=t.candidate.maximumDepth,r=n.map((O,U)=\u003eMath.min(O,i*o[U])),s=[.25,.75],a=r.map(O=\u003eO*s[0]),A=r.map(O=\u003eO*s[1]),c=uH({...t.candidate,route:t.route,toothDepths:a}),l=uH({...t.candidate,route:t.route,toothDepths:A}),u=[cb({...t.route,route:c})-e,cb({...t.route,route:l})-e],g=uH({...t.candidate,route:t.route,toothDepths:r}),h=cb({...t.route,route:g})-e,d=(u[1]-u[0])/(s[1]-s[0]),p=u[0]-d*s[0],m=d\u003e0\u0026\u0026Number.isFinite(d)?(t.targetAddedLength-p)/d:0,_=Math.min(t.targetAddedLength,h),f=t.targetAddedLength\u003e0\u0026\u0026_\u003e0?(O=\u003e{let U=0,Y=t.candidate.maximumDepth;for(let te=0;te\u003c32;te++){const j=(U+Y)/2,J=O.maximumToothDepths.map((le,ge)=\u003eMath.min(le,j*O.toothHeightWeights[ge])),oe=uH({...t.candidate,route:t.route,toothDepths:J}),ie=cb({...t.route,route:oe})-O.originalLength,ne=lH({...t.candidate,route:t.route,toothDepths:J});t.isGeometryValid(ne)\u0026\u0026ie\u003cO.targetAddedLength?U=j:Y=j}const W=(U+Y)/2;return{depthLevel:W,toothDepths:O.maximumToothDepths.map((te,j)=\u003eMath.min(te,W*O.toothHeightWeights[j]))}})({maximumToothDepths:n,toothHeightWeights:o,originalLength:e,targetAddedLength:_}):{depthLevel:m*i,toothDepths:r.map(O=\u003eMath.max(0,O*m))},I=f.depthLevel/i,C=f.toothDepths,y=uH({...t.candidate,route:t.route,toothDepths:C}),x=cb({...t.route,route:y})-e,E=Math.abs(_-x),B=lH({...t.candidate,route:t.route,toothDepths:C});let S=0;if(t.getCenterlineDistanceCost\u0026\u0026(S=t.getCenterlineDistanceCost(B)),S!==null\u0026\u0026(!Number.isFinite(S)||S\u003c0))throw new Error(\"LengthMatchingSolver: meander centerline distance cost must be a non-negative finite number\");const Q=Number.isFinite(I)\u0026\u0026I\u003e0\u0026\u0026I\u003c=1,w=C.every(O=\u003eO===0||O\u003e=t.candidate.minimumHeight),M=t.isGeometryValid(B);let k,R=null;S===null?R=\"no-paired-same-layer-geometry\":Q?E\u003et.lengthTolerance?R=\"target-error\":M?w||(R=\"below-minimum-height\"):R=\"invalid-geometry\":R=\"invalid-scale\",k=R?{valid:!1,invalidReason:R}:{valid:!0,invalidReason:null};const F={...t.candidate,connectionName:t.connectionName,maximumToothDepths:n,sampleScaleFactors:s,sampleAddedLengths:u,slope:d,intercept:p,predictedScaleFactor:I,predictedToothDepths:C,predictedRoute:y,addedLength:x,maximumAddedLength:h,resultingError:E,testedSegment:[{...t.route.route[t.candidate.segmentIndex]},{...t.route.route[t.candidate.segmentIndex+1]}],meanderPoints:B,centerlineDistanceCost:S,qualityScore:0,...k};return{...F,qualityScore:q0o(F)}},X0o=t=\u003e{const e=(c=\u003e{if(c.heightProfile!==\"tapered\")return Array(c.toothCount).fill(1);const l=Array.from({length:c.toothCount},(g,h)=\u003eMath.sin(Math.PI*(h+1)/(c.toothCount+1))),u=Math.max(...l);return l.map(g=\u003eg/u)})(t.candidate),n=Math.max(...e.map(c=\u003et.candidate.minimumHeight/c)),o=t.candidate.maximumDepth/2**30,i=e.map(c=\u003ec*(n+o));if(i.some(c=\u003ec\u003et.candidate.maximumDepth))return null;const r=lH({...t.candidate,route:t.route,toothDepths:i});if(!t.isGeometryValid(r))return null;const s=uH({...t.candidate,route:t.route,toothDepths:i}),a=cb({...t.route,route:s})-cb(t.route),A=fW({...t,targetAddedLength:a});return A.valid?A:null},d9t=t=\u003e{const e=(A,c)=\u003e{const l=A[c.routeIndex];if(!l)throw new Error(`LengthMatchingSolver: dual meander references missing route ${c.routeIndex}`);const u=[...A];return u[c.routeIndex]={...l,route:c.predictedRoute},u},n=(()=\u003e{if(t.targetAddedLength+t.config.lengthTolerance\u003ct.plan.minimumAddedLength||t.targetAddedLength-t.config.lengthTolerance\u003et.plan.maximumAddedLength)return null;const A=t.plan.attemptOptions.map(u=\u003eMath.min(...u.map(g=\u003eg.attempt.addedLength)));let c=Math.max(0,t.targetAddedLength-t.plan.minimumAddedLength),l=A.map((u,g)=\u003eg);for(;c\u003e1e-9\u0026\u0026l.length\u003e0;){const u=c/l.length;let g=0;const h=[];for(const d of l){const p=Math.max(...t.plan.attemptOptions[d].map(_=\u003e_.attempt.maximumAddedLength))-A[d],m=Math.min(p,u);A[d]+=m,g+=m,p-m\u003e1e-9\u0026\u0026h.push(d)}if(g\u003c=1e-9)break;c-=g,l=h}return c\u003c=t.config.lengthTolerance?A:null})();if(!n)return null;const o=t.plan.attemptOptions.map((A,c)=\u003e({attemptOptions:A,targetAddedLength:n[c]})).sort((A,c)=\u003ec.attemptOptions[0].candidate.routeIndex-A.attemptOptions[0].candidate.routeIndex||c.attemptOptions[0].candidate.segmentIndex-A.attemptOptions[0].candidate.segmentIndex);let i=[...t.routes];const r=[];for(const A of o){const c=A.attemptOptions[0]?.candidate;if(!c)throw new Error(\"LengthMatchingSolver: empty dual-meander segment options\");const l=i[c.routeIndex];if(!l)throw new Error(`LengthMatchingSolver: missing planned dual-meander route ${c.routeIndex}`);let u=null;for(const g of A.attemptOptions){if(g.attempt.addedLength-t.config.lengthTolerance\u003eA.targetAddedLength||g.attempt.maximumAddedLength+t.config.lengthTolerance\u003cA.targetAddedLength)continue;const h=fW({candidate:g.candidate,route:l,connectionName:t.connectionName,targetAddedLength:A.targetAddedLength,lengthTolerance:t.config.lengthTolerance,isGeometryValid:d=\u003ecH({route:l,meanderPoints:d,routedRoutes:t.excludedConnectionName?i.filter(p=\u003e_N(p)!==t.excludedConnectionName):i,...t.config})});h.valid\u0026\u0026(!u||h.qualityScore\u003eu.qualityScore)\u0026\u0026(u=h)}if(!u)return null;i=e(i,u),r.push(u)}const s=r.reduce((A,c)=\u003eA+c.addedLength,0);if(Math.abs(s-t.targetAddedLength)\u003et.config.lengthTolerance)return null;const a=r[0];if(!a)throw new Error(\"LengthMatchingSolver: fitted an empty dual-meander plan\");return{attempts:[a,...r.slice(1)],routes:i,addedLength:s}},ece=t=\u003e{if(t.length===0)throw new Error(\"LengthMatchingSolver: cannot score an empty meander plan\");return t.reduce((e,n)=\u003ee+n.qualityScore,0)/t.length-3*(t.length-1)},h9t=t=\u003e{const e=i=\u003e[i.candidate.toothCount,i.candidate.placement,i.candidate.heightProfile].join(\":\"),n=new Map;for(const i of t){const r=e(i),s=`${i.candidate.routeIndex}:${i.candidate.segmentIndex}`,a=n.get(r);if(!a){n.set(r,new Map([[s,[i]]]));continue}const A=a.get(s);A?A.push(i):a.set(s,[i])}const o=[];for(const i of n.values()){const r=[...i.values()].map(s=\u003e({attempts:s,maximumAddedLength:Math.max(...s.map(a=\u003ea.attempt.maximumAddedLength)),minimumAddedLength:Math.min(...s.map(a=\u003ea.attempt.addedLength)),rankingAttempt:s.reduce((a,A)=\u003eA.attempt.qualityScore\u003ea.attempt.qualityScore?A:a)})).sort((s,a)=\u003ea.maximumAddedLength-s.maximumAddedLength);for(const s of r)o.push({attempts:[s.rankingAttempt],attemptOptions:[s.attempts],minimumAddedLength:s.minimumAddedLength,maximumAddedLength:s.maximumAddedLength,rankingQualityScore:s.rankingAttempt.attempt.qualityScore});for(let s=2;s\u003c=r.length;s++){const a=r.slice(0,s),A=a.map(c=\u003ec.rankingAttempt);o.push({attempts:A,attemptOptions:a.map(c=\u003ec.attempts),minimumAddedLength:a.reduce((c,l)=\u003ec+l.minimumAddedLength,0),maximumAddedLength:a.reduce((c,l)=\u003ec+l.maximumAddedLength,0),rankingQualityScore:ece(A.map(c=\u003ec.attempt))})}}return o},tce=class extends Error{connectionName;reason;constructor(t){super(t.message),this.name=\"LengthMatchingNoSolutionError\",this.connectionName=t.connectionName,this.reason=t.reason}},fN=t=\u003e[t.routeIndex,t.segmentIndex,t.toothCount,t.placement,t.toothPitch,t.heightProfile,t.maximumDepth,t.minimumHeight].join(\":\"),p9t=t=\u003e{const e=new Map,n=[...t.attempts].sort((i,r)=\u003ei.addedLength-r.addedLength);let o=t.targetAddedLength;for(let i=0;i\u003cn.length;i++){const r=n[i],s=Math.min(r.addedLength,o/(n.length-i));e.set(fN(r),{routeIndex:r.routeIndex,segmentIndex:r.segmentIndex,targetAddedLength:s}),o-=s}return e},Z0o=(t,e)=\u003e`z${AH(t,e).join(\",\")}`,IN=t=\u003e`z${t}`,euo=t=\u003e{if(!t.showAttempt)return;if(!t.attempt)return void(r=\u003e{const s=r.activePair?.candidates[r.activePair.candidateIndex];if(!s)return;const a=r.routes[s.routeIndex];if(!a)return;const A=a.route[s.segmentIndex],c=a.route[s.segmentIndex+1];A\u0026\u0026c\u0026\u0026r.graphics.lines.push({points:[A,c],strokeColor:\"rgba(234, 179, 8, 0.6)\",strokeWidth:2*a.traceThickness,strokeDash:[.1,.1],layer:IN(A.z)})})(t);const e=t.routes[t.attempt.routeIndex],[n,o]=t.attempt.testedSegment,i=t.theme.getConnectionColor(t.attempt.connectionName);t.graphics.lines.push({points:[n,o],strokeColor:t.theme.getTestedSegmentColor(i),strokeWidth:e.traceThickness,strokeDash:[.15,.15],layer:IN(n.z)}),t.attempt.valid?t.graphics.lines.push({points:t.attempt.meanderPoints.map(({x:r,y:s})=\u003e({x:r,y:s})),strokeColor:\"rgba(234, 179, 8, 0.6)\",strokeWidth:2*e.traceThickness,strokeDash:[.1,.1],layer:IN(n.z)}):t.graphics.lines.push({points:t.attempt.meanderPoints.map(({x:r,y:s})=\u003e({x:r,y:s})),strokeColor:t.theme.getRejectedCandidateColor(i),strokeWidth:e.traceThickness,strokeDash:[.1,.1],layer:IN(n.z)}),t.graphics.points.push({x:n.x,y:n.y,color:i,layer:IN(n.z)},{x:o.x,y:o.y,color:i,layer:IN(o.z)})},tuo=t=\u003e{const e={lines:[],points:[],rects:[],circles:[]},n=(o=\u003e{for(const i of Object.values(o))Bz(0,i);return{getConnectionColor:(i,r)=\u003eo[i]??(r?o[r]:void 0)??(s=\u003es?`hsl(${300*s.split(\"\").reduce((a,A)=\u003ea+A.charCodeAt(0),0)/s.length%360}, 100%, 50%)`:\"rgba(0, 0, 0, 0.5)\")(i),getInnerLayerConnectionColor:i=\u003eBz(.5,i),getTestedSegmentColor:i=\u003eBz(.55,i),getRejectedCandidateColor:i=\u003eBz(.45,i),boardBounds:{fill:\"rgba(30,41,59,0.03)\",stroke:\"rgba(30,41,59,0.55)\"},obstacle:{fill:\"rgba(255,0,0,0.25)\",stroke:\"rgba(255,0,0,0.5)\"},via:{fill:\"blue\",stroke:\"none\"}}})(t.colorMap);return(o=\u003e{for(const i of o.routes){const r=_N(i),s=o.theme.getConnectionColor(r,i.connectionName);for(let A=0;A\u003ci.route.length-1;A++){const c=i.route[A],l=i.route[A+1];c.z===l.z\u0026\u0026o.graphics.lines.push({points:[c,l],strokeColor:c.z===0?s:o.theme.getInnerLayerConnectionColor(s),strokeWidth:i.traceThickness,...c.z===0?{}:{strokeDash:[.2,.2]},layer:IN(c.z)})}const a=[...new Set(i.route.map(A=\u003eA.z))];for(const A of i.vias)o.graphics.circles.push({center:A,radius:i.viaDiameter/2,fill:o.theme.via.fill,stroke:o.theme.via.stroke,layer:`z${(A.zLayers??a).join(\",\")}`})}})({routes:t.routes,theme:n,graphics:e}),(o=\u003e{if(o.bounds){const{minX:i,maxX:r,minY:s,maxY:a}=o.bounds;o.graphics.rects.push({center:{x:(i+r)/2,y:(s+a)/2},width:r-i,height:a-s,fill:o.theme.boardBounds.fill,stroke:o.theme.boardBounds.stroke,layer:`z${Array.from({length:o.layerCount},(A,c)=\u003ec).join(\",\")}`})}for(const i of o.obstacles)o.graphics.rects.push({center:i.center,width:i.width,height:i.height,ccwRotationDegrees:i.ccwRotationDegrees,fill:o.theme.obstacle.fill,stroke:o.theme.obstacle.stroke,layer:Z0o(i,o.layerCount)})})({obstacles:t.obstacles,bounds:t.bounds,layerCount:t.layerCount,theme:n,graphics:e}),euo({routes:t.routes,attempt:t.currentAttempt,activePair:t.activePair,showAttempt:!t.solved,theme:n,graphics:e}),{...e}},m9t=class extends zA{constructor(t){super(),this.params=t,this.MAX_ITERATIONS=1e5,this.matchedHdRoutes=t.hdRoutes.map(e=\u003e({...e,route:e.route.map(n=\u003e({...n}))})),this.pairs=t.differentialPairs??[]}params;matchedHdRoutes;pairs;nextPairIndex=0;activePair=null;currentAttempt=null;config=null;candidatesTried=0;getSolverName(){return\"LengthMatchingSolver\"}startNextPair(){const t=this.pairs[this.nextPairIndex++];if(!t)return void(this.solved=!0);((l,u)=\u003e{if(l.connectionNames[0]===l.connectionNames[1])throw new Error(\"LengthMatchingSolver: a differential pair must reference two distinct connections\");if(!Number.isFinite(l.lengthTolerance)||l.lengthTolerance\u003c0)throw new Error(\"LengthMatchingSolver: differential pair lengthTolerance must be a non-negative finite number\");for(const h of[l.minimumCenterlineDistance,l.maximumCenterlineDistance])if(h!==void 0\u0026\u0026(!Number.isFinite(h)||h\u003c=0))throw new Error(\"LengthMatchingSolver: differential pair centerline distances must be positive finite numbers\");if(l.minimumCenterlineDistance!==void 0\u0026\u0026l.maximumCenterlineDistance!==void 0\u0026\u0026l.minimumCenterlineDistance\u003el.maximumCenterlineDistance)throw new Error(\"LengthMatchingSolver: differential pair minimumCenterlineDistance cannot exceed maximumCenterlineDistance\");const g=new Map(u.map(h=\u003e[h.name,h]));for(const h of l.connectionNames){const d=g.get(h);if(!d)throw new Error(`LengthMatchingSolver: differential pair references unknown connection \"${h}\"`);if(d.pointsToConnect.length!==2)throw new Error(`LengthMatchingSolver: differential pair connection \"${h}\" must have exactly two points before MST splitting`)}})(t,this.params.originalConnections);const e=sH(this.matchedHdRoutes,t.connectionNames[0]),n=sH(this.matchedHdRoutes,t.connectionNames[1]);if(e.length===0\u0026\u0026n.length===0)return;if(e.length===0||n.length===0)throw new Error(`LengthMatchingSolver: differential pair ${t.connectionNames.join(\"/\")} has routed geometry for only one connection`);const o=aH(this.matchedHdRoutes,e),i=aH(this.matchedHdRoutes,n),r=Math.abs(o-i);if(r\u003c=t.lengthTolerance)return;const s=o\u003ci,a=t.connectionNames[s?0:1],A=t.connectionNames[s?1:0],c=g9t({routes:this.matchedHdRoutes,routeIndexes:s?e:n,maximumDepth:this.getConfig().maximumMeanderDepth,minimumToothPitch:this.getConfig().minimumToothPitch,minMeanderGap:this.getConfig().minMeanderGap,minMeanderHeight:this.getConfig().minMeanderHeight,maxToothCount:this.getConfig().maxToothCount});if(c.length===0)throw new tce({message:`LengthMatchingSolver: no same-layer straight segment can tune connection \"${a}\"`,connectionName:a,reason:\"no-meander-candidate\"});this.activePair={pair:t,longerConnectionName:A,longerRouteIndexes:s?n:e,shorterConnectionName:a,targetAddedLength:r,remainingAddedLength:r,candidates:c,candidateIndex:0,lastMatchedSegmentIndexByRoute:new Map,partialAttempts:[],fullAttempts:[],plannedAttemptTargets:null,hasMinimumHeightBlockedAttempt:!1}}acceptAttempt(t,e){const n=this.matchedHdRoutes[e.routeIndex];this.matchedHdRoutes[e.routeIndex]={...n,route:e.predictedRoute},t.remainingAddedLength-=e.addedLength,t.lastMatchedSegmentIndexByRoute.set(e.routeIndex,e.segmentIndex),t.candidateIndex=0,t.partialAttempts=[],t.fullAttempts=[],t.plannedAttemptTargets?.delete(fN(e)),t.plannedAttemptTargets?.size===0\u0026\u0026(t.plannedAttemptTargets=null),t.remainingAddedLength\u003c=t.pair.lengthTolerance\u0026\u0026(this.activePair=null)}tryCandidate(t){let e;for(;!e;){const r=t.candidates[t.candidateIndex++];if(!r)break;const s=t.lastMatchedSegmentIndexByRoute.get(r.routeIndex);(s===void 0||r.segmentIndex\u003cs)\u0026\u0026(!t.plannedAttemptTargets||t.plannedAttemptTargets.has(fN(r))\u0026\u0026![...t.plannedAttemptTargets.values()].some(a=\u003ea.routeIndex===r.routeIndex\u0026\u0026a.segmentIndex\u003er.segmentIndex))\u0026\u0026(e=r)}if(!e){const r=t.fullAttempts.reduce((a,A)=\u003e!a||A.qualityScore\u003ea.qualityScore?A:a,null),s=(a=\u003e{const A=u=\u003e[u.toothCount,u.placement,u.heightProfile].join(\":\"),c=new Map;for(const u of a.attempts){const g=`${u.routeIndex}:${u.segmentIndex}`,h=A(u),d=c.get(h);if(!d){c.set(h,new Map([[g,[u]]]));continue}const p=d.get(g);p?p.push(u):d.set(g,[u])}let l=null;for(const u of c.values()){const g=[...u.values()].map(d=\u003e({attempts:d,maximumCapacityAttempt:d.reduce((p,m)=\u003em.addedLength\u003ep.addedLength?m:p)})).sort((d,p)=\u003ep.maximumCapacityAttempt.addedLength-d.maximumCapacityAttempt.addedLength);let h=0;for(let d=0;d\u003cg.length;d++){if(h+=g[d].maximumCapacityAttempt.addedLength,h+a.lengthTolerance\u003ca.targetAddedLength)continue;const p=g.slice(0,d+1),m=p.map(y=\u003ey.maximumCapacityAttempt),_=p9t({attempts:m,targetAddedLength:a.targetAddedLength}),f=p.map(y=\u003e{const x=_.get(fN(y.maximumCapacityAttempt));if(!x)throw new Error(`LengthMatchingSolver: missing capacity target for ${fN(y.maximumCapacityAttempt)}`);const E=y.attempts.filter(B=\u003eB.addedLength+a.lengthTolerance\u003e=x.targetAddedLength);if(E.length===0)throw new Error(`LengthMatchingSolver: no pitch can supply planned target for route ${y.maximumCapacityAttempt.routeIndex} segment ${y.maximumCapacityAttempt.segmentIndex}`);return E.reduce((B,S)=\u003eS.qualityScore\u003eB.qualityScore||S.qualityScore===B.qualityScore\u0026\u0026S.toothPitch\u003eB.toothPitch?S:B)}),I=ece(f);if(!l){l={attempts:f};break}const C=ece(l.attempts);(f.length\u003cl.attempts.length||f.length===l.attempts.length\u0026\u0026I\u003eC)\u0026\u0026(l={attempts:f});break}}return l})({attempts:t.partialAttempts,targetAddedLength:t.remainingAddedLength,lengthTolerance:t.pair.lengthTolerance});if(r\u0026\u0026(!s||r.qualityScore\u003e=ece(s.attempts)))return void this.acceptAttempt(t,r);if(!s){if(!(t.hasMinimumHeightBlockedAttempt\u0026\u0026t.plannedAttemptTargets===null\u0026\u0026t.lastMatchedSegmentIndexByRoute.size===0))throw new tce({message:`LengthMatchingSolver: linear regression exhausted all segment/tooth combinations for \"${t.shorterConnectionName}\"; required ${t.targetAddedLength.toFixed(4)}mm`,connectionName:t.shorterConnectionName,reason:\"meander-search-exhausted\"});return this.tryDualMeanderPlan(t)}return t.plannedAttemptTargets=p9t({attempts:s.attempts,targetAddedLength:t.remainingAddedLength}),t.candidateIndex=0,t.partialAttempts=[],void(t.fullAttempts=[])}const n=this.matchedHdRoutes[e.routeIndex],o=this.getConfig(),i=t.plannedAttemptTargets?.get(fN(e));if(t.plannedAttemptTargets!==null\u0026\u0026i===void 0)throw new Error(`LengthMatchingSolver: missing planned target for ${fN(e)}`);this.currentAttempt=fW({candidate:e,route:n,connectionName:t.shorterConnectionName,targetAddedLength:i===void 0?t.remainingAddedLength:i.targetAddedLength,lengthTolerance:t.pair.lengthTolerance,isGeometryValid:r=\u003ecH({route:n,meanderPoints:r,routedRoutes:this.matchedHdRoutes,obstacles:o.obstacles,bounds:o.bounds,layerCount:o.layerCount,obstacleMargin:o.obstacleMargin}),getCenterlineDistanceCost:t.pair.minimumCenterlineDistance===void 0\u0026\u0026t.pair.maximumCenterlineDistance===void 0?void 0:r=\u003e(s=\u003e{let a=0,A=0;for(let c=0;c\u003cs.meanderPoints.length-1;c++){const l=s.meanderPoints[c],u=s.meanderPoints[c+1],g=Math.hypot(u.x-l.x,u.y-l.y);if(g!==0){for(let h=0;h\u003c4;h++){const d=(h+.5)/4,p={x:l.x+(u.x-l.x)*d,y:l.y+(u.y-l.y)*d},m=[];for(const f of s.pairedRoutes)for(let I=0;I\u003cf.route.length-1;I++){const C=f.route[I],y=f.route[I+1];l.z===C.z\u0026\u0026l.z===y.z\u0026\u0026m.push(uB(p,p,C,y))}if(m.length===0)return null;const _=Math.min(...m);A+=g*Math.max(0,(s.minimumCenterlineDistance??Number.NEGATIVE_INFINITY)-_,_-(s.maximumCenterlineDistance??Number.POSITIVE_INFINITY))/4}a+=g}}if(a===0)throw new Error(\"LengthMatchingSolver: cannot measure a zero-length meander centerline\");return A/a})({meanderPoints:r,pairedRoutes:t.longerRouteIndexes.map(s=\u003ethis.matchedHdRoutes[s]),minimumCenterlineDistance:t.pair.minimumCenterlineDistance,maximumCenterlineDistance:t.pair.maximumCenterlineDistance})}),this.candidatesTried++,this.currentAttempt.invalidReason===\"below-minimum-height\"\u0026\u0026(t.hasMinimumHeightBlockedAttempt=!0),this.stats={pair:`${t.pair.connectionNames[0]}/${t.pair.connectionNames[1]}`,candidatesTried:this.candidatesTried,segmentIndex:e.segmentIndex,toothCount:e.toothCount,toothPitch:e.toothPitch,placement:e.placement,predictedScaleFactor:this.currentAttempt.predictedScaleFactor,predictedToothDepths:this.currentAttempt.predictedToothDepths,resultingError:this.currentAttempt.resultingError,qualityScore:this.currentAttempt.qualityScore,accepted:this.currentAttempt.valid},this.currentAttempt.valid\u0026\u0026(t.plannedAttemptTargets===null?t.remainingAddedLength-this.currentAttempt.addedLength\u003c=t.pair.lengthTolerance?t.fullAttempts.push(this.currentAttempt):t.partialAttempts.push(this.currentAttempt):this.acceptAttempt(t,this.currentAttempt))}tryDualMeanderPlan(t){if(t.remainingAddedLength!==t.targetAddedLength)throw new Error(`LengthMatchingSolver: cannot start a dual-meander plan after partially tuning \"${t.shorterConnectionName}\"`);const e=this.getConfig(),n=g9t({routes:this.matchedHdRoutes,routeIndexes:t.longerRouteIndexes,maximumDepth:e.maximumMeanderDepth,minimumToothPitch:e.minimumToothPitch,minMeanderGap:e.minMeanderGap,minMeanderHeight:e.minMeanderHeight,maxToothCount:e.maxToothCount}),o=(a=\u003e{const A=(C,y)=\u003eC.rankingQualityScore!==y.rankingQualityScore?C.rankingQualityScore\u003ey.rankingQualityScore:C.leftIndex!==y.leftIndex?C.leftIndex\u003cy.leftIndex:C.rightIndex\u003cy.rightIndex,c=(C,y)=\u003e{C.push(y);let x=C.length-1;for(;x\u003e0;){const E=Math.floor((x-1)/2),B=C[E];if(A(B,y))break;C[x]=B,x=E}C[x]=y},l=C=\u003e{const y=C[0],x=C.pop();if(!y||!x||C.length===0)return y;let E=0;for(;;){const B=2*E+1,S=B+1;if(B\u003e=C.length)break;const Q=S\u003cC.length\u0026\u0026A(C[S],C[B])?S:B,w=C[Q];if(A(x,w))break;C[E]=w,E=Q}return C[E]=x,y},u=function*(C){const y=[...C.leftOptions].sort((B,S)=\u003eC.getLeftQualityScore(S)-C.getLeftQualityScore(B)),x=[...C.rightOptions].sort((B,S)=\u003eC.getRightQualityScore(S)-C.getRightQualityScore(B)),E=[];for(let B=0;B\u003cy.length;B++){const S=x[0];if(!S)break;c(E,{leftIndex:B,rightIndex:0,rankingQualityScore:(C.getLeftQualityScore(y[B])+C.getRightQualityScore(S))/2})}for(;E.length\u003e0;){const B=l(E);yield[y[B.leftIndex],x[B.rightIndex]];const S=B.rightIndex+1,Q=x[S];Q\u0026\u0026c(E,{leftIndex:B.leftIndex,rightIndex:S,rankingQualityScore:(C.getLeftQualityScore(y[B.leftIndex])+C.getRightQualityScore(Q))/2})}},g=(C,y)=\u003e{const x=C[y.routeIndex];if(!x)throw new Error(`LengthMatchingSolver: dual meander references missing route ${y.routeIndex}`);const E=[...C];return E[y.routeIndex]={...x,route:y.predictedRoute},E},h=C=\u003e{const y=C.routes[C.attempt.routeIndex];if(!y)throw new Error(`LengthMatchingSolver: cannot validate missing dual-meander route ${C.attempt.routeIndex}`);return cH({route:y,meanderPoints:C.attempt.meanderPoints,routedRoutes:C.routes,...C.config})},d=C=\u003e{const y=C.routes.filter(E=\u003e_N(E)!==C.counterpartConnectionName),x=[];for(const E of C.candidates){const B=C.routes[E.routeIndex];if(!B)throw new Error(`LengthMatchingSolver: dual-meander candidate references missing route ${E.routeIndex}`);const S=X0o({candidate:E,route:B,connectionName:C.connectionName,lengthTolerance:C.config.lengthTolerance,isGeometryValid:Q=\u003ecH({route:B,meanderPoints:Q,routedRoutes:y,...C.config})});S\u0026\u0026x.push({candidate:E,attempt:S})}return x},p={obstacles:a.obstacles,bounds:a.bounds,layerCount:a.layerCount,obstacleMargin:a.obstacleMargin},m=d({candidates:a.shorterCandidates,routes:a.routes,connectionName:a.shorterConnectionName,counterpartConnectionName:a.longerConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}});if(m.length===0)return null;const _=d({candidates:a.longerCandidates,routes:a.routes,connectionName:a.longerConnectionName,counterpartConnectionName:a.shorterConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}}),f=u({leftOptions:_,rightOptions:m,getLeftQualityScore:C=\u003eC.attempt.qualityScore,getRightQualityScore:C=\u003eC.attempt.qualityScore});for(const[C,y]of f){const x=Math.max(C.attempt.addedLength,y.attempt.addedLength-a.originalLengthDifference),E=x+a.originalLengthDifference;if(x-a.lengthTolerance\u003eC.attempt.maximumAddedLength||E-a.lengthTolerance\u003ey.attempt.maximumAddedLength)continue;const B=a.routes[C.candidate.routeIndex];if(!B)throw new Error(`LengthMatchingSolver: missing longer route ${C.candidate.routeIndex}`);const S=a.routes[y.candidate.routeIndex];if(!S)throw new Error(`LengthMatchingSolver: missing shorter route ${y.candidate.routeIndex}`);const Q=a.routes.filter(Y=\u003e_N(Y)!==a.shorterConnectionName),w=fW({candidate:C.candidate,route:B,connectionName:a.longerConnectionName,targetAddedLength:x,lengthTolerance:a.lengthTolerance,isGeometryValid:Y=\u003ecH({route:B,meanderPoints:Y,routedRoutes:Q,...p})});if(!w.valid||Math.abs(w.addedLength-x)\u003ea.lengthTolerance)continue;const M=g(a.routes,w),k=w.addedLength+a.originalLengthDifference,R=fW({candidate:y.candidate,route:S,connectionName:a.shorterConnectionName,targetAddedLength:k,lengthTolerance:a.lengthTolerance,isGeometryValid:Y=\u003ecH({route:S,meanderPoints:Y,routedRoutes:M,...p})});if(!R.valid)continue;const F=g(M,R),O=sH(F,a.longerConnectionName),U=sH(F,a.shorterConnectionName);if(!(Math.abs(aH(F,U)-aH(F,O))\u003ea.lengthTolerance)\u0026\u0026h({attempt:w,routes:F,config:p})\u0026\u0026h({attempt:R,routes:F,config:p}))return{longerAttempts:[w],shorterAttempts:[R]}}const I=u({leftOptions:h9t(_),rightOptions:h9t(m),getLeftQualityScore:C=\u003eC.rankingQualityScore,getRightQualityScore:C=\u003eC.rankingQualityScore});for(const[C,y]of I){if(C.attempts.length===1\u0026\u0026y.attempts.length===1)continue;const x=Math.max(C.minimumAddedLength,y.minimumAddedLength-a.originalLengthDifference),E=x+a.originalLengthDifference;if(x-a.lengthTolerance\u003eC.maximumAddedLength||E-a.lengthTolerance\u003ey.maximumAddedLength)continue;const B=d9t({plan:C,targetAddedLength:x,routes:a.routes,connectionName:a.longerConnectionName,excludedConnectionName:a.shorterConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}});if(!B)continue;const S=d9t({plan:y,targetAddedLength:B.addedLength+a.originalLengthDifference,routes:B.routes,connectionName:a.shorterConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}});if(!S)continue;const Q=sH(S.routes,a.longerConnectionName),w=sH(S.routes,a.shorterConnectionName),M=Math.abs(aH(S.routes,w)-aH(S.routes,Q)),k=[...B.attempts,...S.attempts];if(!(M\u003ea.lengthTolerance||k.some(R=\u003e!h({attempt:R,routes:S.routes,config:p}))))return{longerAttempts:B.attempts,shorterAttempts:S.attempts}}return null})({routes:this.matchedHdRoutes,longerConnectionName:t.longerConnectionName,shorterConnectionName:t.shorterConnectionName,originalLengthDifference:t.targetAddedLength,lengthTolerance:t.pair.lengthTolerance,longerCandidates:n,shorterCandidates:t.candidates,obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount,obstacleMargin:e.obstacleMargin});if(!o)throw new tce({message:`LengthMatchingSolver: linear regression exhausted all segment/tooth combinations for \"${t.shorterConnectionName}\"; required ${t.targetAddedLength.toFixed(4)}mm`,connectionName:t.shorterConnectionName,reason:\"meander-search-exhausted\"});const i=[...this.matchedHdRoutes];for(const a of[...o.longerAttempts,...o.shorterAttempts]){const A=this.matchedHdRoutes[a.routeIndex];if(!A)throw new Error(`LengthMatchingSolver: cannot commit dual meander to missing route ${a.routeIndex}`);i[a.routeIndex]={...A,route:a.predictedRoute}}this.matchedHdRoutes=i,this.currentAttempt=o.shorterAttempts[0];const r=o.longerAttempts.reduce((a,A)=\u003ea+A.addedLength,0),s=o.shorterAttempts.reduce((a,A)=\u003ea+A.addedLength,0);this.stats={pair:`${t.pair.connectionNames[0]}/${t.pair.connectionNames[1]}`,mode:\"dual-meander\",longerAddedLength:r,shorterAddedLength:s,resultingError:Math.abs(s-r-t.targetAddedLength)},this.activePair=null}getConfig(){return this.config||(this.config=(t=\u003e{const e=t.maximumMeanderDepth??5,n=t.maxToothCount??12;if(!Number.isFinite(e)||e\u003c=0)throw new Error(\"LengthMatchingSolver: maximumMeanderDepth must be a positive finite number\");if(t.minimumToothPitch!==void 0\u0026\u0026(!Number.isFinite(t.minimumToothPitch)||t.minimumToothPitch\u003c=0))throw new Error(\"LengthMatchingSolver: minimumToothPitch must be a positive finite number\");if(t.minMeanderGap!==void 0\u0026\u0026(!Number.isFinite(t.minMeanderGap)||t.minMeanderGap\u003c=0))throw new Error(\"LengthMatchingSolver: minMeanderGap must be a positive finite number\");if(t.minMeanderHeight!==void 0\u0026\u0026(!Number.isFinite(t.minMeanderHeight)||t.minMeanderHeight\u003c=0))throw new Error(\"LengthMatchingSolver: minMeanderHeight must be a positive finite number\");if(t.minMeanderHeight!==void 0\u0026\u0026t.minMeanderHeight\u003ee)throw new Error(\"LengthMatchingSolver: minMeanderHeight cannot exceed maximumMeanderDepth\");if(!Number.isFinite(n)||!Number.isInteger(n)||n\u003c=0)throw new Error(\"LengthMatchingSolver: maxToothCount must be a positive finite integer\");return{maximumMeanderDepth:e,minimumToothPitch:t.minimumToothPitch,minMeanderGap:t.minMeanderGap,minMeanderHeight:t.minMeanderHeight,maxToothCount:n,obstacles:t.obstacles??[],bounds:t.bounds,obstacleMargin:t.obstacleMargin??.15,layerCount:t.layerCount??2,colorMap:t.colorMap??{}}})(this.params)),this.config}_step(){this.getConfig(),this.activePair?this.tryCandidate(this.activePair):this.startNextPair()}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved)throw new Error(\"LengthMatchingSolver: getOutput() called before the solver completed\");return{matchedHdRoutes:this.matchedHdRoutes}}getBestEffortOutput(){const t=structuredClone(this.matchedHdRoutes),e=this.activePair?.fullAttempts??[];let n=null;for(const o of e)(!n||o.qualityScore\u003en.qualityScore)\u0026\u0026(n=o);if(!n)for(const o of this.activePair?.partialAttempts??[])(!n||o.addedLength\u003en.addedLength||o.addedLength===n.addedLength\u0026\u0026o.qualityScore\u003en.qualityScore)\u0026\u0026(n=o);if(n){const o=t[n.routeIndex];o\u0026\u0026(t[n.routeIndex]={...o,route:structuredClone(n.predictedRoute)})}return{matchedHdRoutes:t}}computeProgress(){if(this.solved)return 1;if(this.pairs.length===0)return this.config?1:0;const t=Math.max(0,this.nextPairIndex-1),e=this.activePair?this.activePair.candidateIndex/this.activePair.candidates.length:0;return Math.min(.99,(t+e)/this.pairs.length)}visualize(){const t=this.getConfig();return tuo({routes:this.matchedHdRoutes,obstacles:t.obstacles,bounds:t.bounds,layerCount:t.layerCount,colorMap:t.colorMap,activePair:this.activePair,currentAttempt:this.currentAttempt,solved:this.solved})}},Dg=(t,e)=\u003e{if(t===\"top\")return 0;if(t===\"bottom\")return e-1;const n=/^inner(\\d+)$/.exec(t);if(!n)return-1;const o=Number(n[1]);return o\u003e0\u0026\u0026o\u003ce-1?o:-1},w7=(t,e)=\u003et===0?\"top\":t===e-1?\"bottom\":`inner${t}`,gH=(t,e,n)=\u003e{const o=Dg(t,n),i=Dg(e,n);if(o\u003c0||i\u003c0)return[];const r=Math.min(o,i),s=Math.max(o,i);return Array.from({length:s-r+1},(a,A)=\u003ew7(r+A,n))},vSe=1e-8,qf=(t,e)=\u003e{if(t.route.length===0)throw new Error(`trace \"${t.connection_name}\" has an empty route`);if(t.route.some(g=\u003eg.route_type!==\"wire\"\u0026\u0026g.route_type!==\"via\"))throw new Error(`trace \"${t.connection_name}\" contains unsupported jumper or through-obstacle geometry`);const n=t.route.findIndex(g=\u003eg.route_type===\"wire\"),o=t.route[n],i=t.route.findLast(g=\u003eg.route_type===\"wire\");if(o?.route_type!==\"wire\"||!i)throw new Error(`trace \"${t.connection_name}\" must contain a wire point`);const r=[],s=[],a=[],A=[];let c=null,l=o.width;if(n\u003e0){let g=o.layer;for(let d=n-1;d\u003e=0;d--){const p=t.route[d];if(p?.route_type!==\"via\")throw new Error(`trace \"${t.connection_name}\" has unsupported geometry before its first wire`);if(g===p.to_layer)g=p.from_layer;else{if(g!==p.from_layer)throw new Error(`trace \"${t.connection_name}\" has discontinuous leading vias`);g=p.to_layer}}const h=t.route[0];if(h.route_type!==\"via\")throw new Error(`trace \"${t.connection_name}\" has an invalid leading entry`);c={x:h.x,y:h.y,layer:g,width:o.width},r.push(c)}for(const g of t.route){if(g.route_type===\"wire\"){if(!Number.isFinite(g.x)||!Number.isFinite(g.y)||!Number.isFinite(g.width)||g.width\u003c=0||Dg(g.layer,e)\u003c0)throw new Error(`trace \"${t.connection_name}\" has an invalid wire point`);l=Math.max(l,g.width);const f={x:g.x,y:g.y,layer:g.layer,width:g.width};if(c){if(c.layer!==f.layer)throw new Error(`trace \"${t.connection_name}\" changes layers without a via`);Math.hypot(c.x-f.x,c.y-f.y)\u003evSe\u0026\u0026s.push({start:c,end:f,layer:f.layer,width:Math.max(c.width,f.width),connectionName:t.connection_name,terminal:null})}r.push(f),c=f;continue}if(g.route_type!==\"via\")throw new Error(`trace \"${t.connection_name}\" contains unsupported route geometry`);if(!c)throw new Error(`trace \"${t.connection_name}\" has a leading via`);const h=Dg(g.from_layer,e),d=Dg(g.to_layer,e),p=g.via_diameter??c.width;if(!Number.isFinite(g.x)||!Number.isFinite(g.y)||h\u003c0||d\u003c0||h===d||g.via_diameter!==void 0\u0026\u0026(!Number.isFinite(g.via_diameter)||g.via_diameter\u003c=0)||g.via_hole_diameter!==void 0\u0026\u0026(!Number.isFinite(g.via_hole_diameter)||g.via_hole_diameter\u003c=0||g.via_hole_diameter\u003e=p))throw new Error(`trace \"${t.connection_name}\" has an invalid via`);const m=c.layer===g.from_layer?g.from_layer:c.layer===g.to_layer?g.to_layer:null;if(!m)throw new Error(`trace \"${t.connection_name}\" has a discontinuous via transition`);Math.hypot(c.x-g.x,c.y-g.y)\u003evSe\u0026\u0026s.push({start:c,end:g,layer:c.layer,width:c.width,connectionName:t.connection_name,terminal:null});const _=m===g.from_layer?g.to_layer:g.from_layer;A.push({...g,from_layer:m,to_layer:_}),a.push({x:g.x,y:g.y,layers:gH(m,_,e),diameter:p,connectionName:t.connection_name,terminal:r.length===1?\"start\":null}),c={x:g.x,y:g.y,layer:_,width:c.width},r.push(c)}if(r.length\u003c2||s.length===0)throw new Error(`trace \"${t.connection_name}\" does not contain a routable path`);s[0].terminal=s.length===1?\"both\":\"start\",s[s.length-1].terminal=s.length===1?\"both\":\"end\";const u=a.at(-1);return u\u0026\u0026Math.hypot(u.x-i.x,u.y-i.y)\u003c=vSe\u0026\u0026(u.terminal=\"end\"),{source:t,points:r,segments:s,vias:a,transitions:A,width:l,viaDiameter:t.__postProcessingViaDiameter??l,...o.start_pcb_port_id?{startPortId:o.start_pcb_port_id}:{},...i.end_pcb_port_id?{endPortId:i.end_pcb_port_id}:{}}},wSe=(t,e)=\u003e{const n=[],o=[],i=t.route.find(A=\u003eA.route_type===\"wire\"),r=i?.route_type===\"wire\"?i.width:null,s={\"0603\":.95,1206:1.8,\"1206x4_pair\":1.8};let a=null;for(let A=0;A\u003ct.route.length;A++){const c=t.route[A];if(c.route_type===\"wire\"){if(!Number.isFinite(c.x)||!Number.isFinite(c.y)||!Number.isFinite(c.width)||c.width\u003c=0||Dg(c.layer,e)\u003c0)throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" has an invalid wire`);if(a\u0026\u0026a.layer!==c.layer)throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" changes layer without a transition`);a\u0026\u0026n.push({start:a,end:c,layer:c.layer,width:Math.max(a.width,c.width),connectionName:t.connection_name,terminal:null}),a=c;continue}if(c.route_type===\"via\"){const h=gH(c.from_layer,c.to_layer,e),d=a,p=c.via_diameter??d?.width??r;if(!Number.isFinite(c.x)||!Number.isFinite(c.y)||h.length\u003c2||p===null||!Number.isFinite(p)||p\u003c=0||c.via_hole_diameter!==void 0\u0026\u0026(!Number.isFinite(c.via_hole_diameter)||c.via_hole_diameter\u003c=0||p!==null\u0026\u0026c.via_hole_diameter\u003e=p))throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" has an invalid via`);d\u0026\u0026Math.hypot(d.x-c.x,d.y-c.y)\u003e1e-8\u0026\u0026n.push({start:d,end:c,layer:d.layer,width:d.width,connectionName:t.connection_name,terminal:null}),o.push({x:c.x,y:c.y,layers:h,diameter:p,connectionName:t.connection_name,terminal:A===0?\"start\":A===t.route.length-1?\"end\":null});const m=t.route.slice(A+1).find(f=\u003ef.route_type===\"wire\"),_=d?.layer===c.from_layer?c.to_layer:d?.layer===c.to_layer?c.from_layer:m?.route_type!==\"wire\"||m.layer!==c.from_layer\u0026\u0026m.layer!==c.to_layer?null:m.layer;if(!_)throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" has a discontinuous via`);a={x:c.x,y:c.y,layer:_,width:d?.width??r??p};continue}if(c.route_type===\"jumper\"){const h=s[c.footprint];if(!Number.isFinite(c.start.x)||!Number.isFinite(c.start.y)||!Number.isFinite(c.end.x)||!Number.isFinite(c.end.y)||Dg(c.layer,e)\u003c0)throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" has an invalid jumper`);if(a\u0026\u0026(a.layer!==c.layer||Math.hypot(a.x-c.start.x,a.y-c.start.y)\u003e1e-8))throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" has a discontinuous jumper`);n.push({start:c.start,end:c.end,layer:c.layer,width:h,connectionName:t.connection_name,terminal:null}),a={...c.end,layer:c.layer,width:h};continue}const l=gH(c.from_layer,c.to_layer,e);if(!Number.isFinite(c.start.x)||!Number.isFinite(c.start.y)||!Number.isFinite(c.end.x)||!Number.isFinite(c.end.y)||!Number.isFinite(c.width)||c.width\u003c=0||l.length\u003c2)throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" has invalid through-obstacle copper`);if(a\u0026\u0026(a.layer!==c.from_layer\u0026\u0026a.layer!==c.to_layer||Math.hypot(a.x-c.start.x,a.y-c.start.y)\u003e1e-8))throw new Error(`PostProcessingSolver: immutable trace \"${t.connection_name}\" has discontinuous through-obstacle copper`);for(const h of l)n.push({start:c.start,end:c.end,layer:h,width:c.width,connectionName:t.connection_name,terminal:null});const u=a,g=u?.layer===c.to_layer?c.from_layer:c.to_layer;a={...c.end,layer:g,width:c.width}}return{segments:n,vias:o}},nuo=(t,e)=\u003e{const n=wSe(t,e);return[...n.segments.map((o,i)=\u003e({connectionName:`${t.connection_name}#immutable-segment-${i}`,rootConnectionName:t.connection_name,traceThickness:o.width,viaDiameter:o.width,route:[{x:o.start.x,y:o.start.y,z:Dg(o.layer,e),traceThickness:o.width},{x:o.end.x,y:o.end.y,z:Dg(o.layer,e),traceThickness:o.width}],vias:[]})),...n.vias.map((o,i)=\u003e({connectionName:`${t.connection_name}#immutable-via-${i}`,rootConnectionName:t.connection_name,traceThickness:o.diameter,viaDiameter:o.diameter,route:[],vias:[{x:o.x,y:o.y,zLayers:o.layers.map(r=\u003eDg(r,e))}]}))]},lb=t=\u003et.segments.reduce((e,n)=\u003ee+Math.hypot(n.end.x-n.start.x,n.end.y-n.start.y),0),_9t=t=\u003e{const{simpleRouteJson:e}=t.params,n=(c=\u003e{const l=new Set(c.reroutedPairs.map(u=\u003eu.connectionNames.join(\"\\0\")));return c.declaredPairs.filter(u=\u003e{const g=u.connectionNames.map(p=\u003ec.traces.filter(m=\u003em.connection_name===p));if(g.some(p=\u003ep.length!==1))return!1;if(l.has(u.connectionNames.join(\"\\0\")))return!0;const h=g.map(p=\u003ep[0]);if(h.some(p=\u003ep.route.length\u003c2||p.route[0]?.route_type!==\"wire\"||!p.route.every(m=\u003em.route_type===\"wire\"||m.route_type===\"via\")))return!1;const d=h.map(p=\u003elb(qf(p,c.layerCount)));return Math.abs(d[0]-d[1])\u003eu.lengthTolerance+1e-7}).map(u=\u003estructuredClone(u))})({traces:t.result.traces,declaredPairs:e.differentialPairs,reroutedPairs:t.result.reroutedPairs,layerCount:e.layerCount}),o=new Set(n.flatMap(c=\u003ec.connectionNames)),i=[],r=[],s=[],a=new Set;for(let c=0;c\u003ct.result.traces.length;c++){const l=t.result.traces[c];if(!o.has(l.connection_name))continue;const u=l.route.every(S=\u003eS.route_type===\"wire\"||S.route_type===\"via\"),g=l.route[0]?.route_type===\"wire\";if(!u||!g)throw new Error(`PostProcessingSolver: rerouted connection \"${l.connection_name}\" cannot be bound to LengthMatchingSolver`);const h=qf(l,e.layerCount),d=l.route[0];if(d.route_type!==\"wire\")throw new Error(`PostProcessingSolver: trace \"${l.connection_name}\" lost its first wire during binding`);const p=[{x:d.x,y:d.y,z:Dg(d.layer,e.layerCount),traceThickness:d.width}],m=[],_=[];let f=d.layer,I=d.width;for(const S of l.route.slice(1)){if(S.route_type===\"wire\"){if(S.layer!==f)throw new Error(`PostProcessingSolver: trace \"${l.connection_name}\" changes layers without a via while binding`);p.push({x:S.x,y:S.y,z:Dg(S.layer,e.layerCount),traceThickness:S.width}),I=S.width;continue}if(S.route_type!==\"via\")throw new Error(`PostProcessingSolver: trace \"${l.connection_name}\" contains unsupported bound geometry`);const Q=f===S.from_layer?S.to_layer:f===S.to_layer?S.from_layer:null;if(!Q)throw new Error(`PostProcessingSolver: trace \"${l.connection_name}\" has a discontinuous bound via`);const w=p.at(-1);Math.hypot(w.x-S.x,w.y-S.y)\u003e1e-8\u0026\u0026p.push({x:S.x,y:S.y,z:Dg(f,e.layerCount),traceThickness:I}),p.push({x:S.x,y:S.y,z:Dg(Q,e.layerCount),traceThickness:I}),m.push({x:S.x,y:S.y,zLayers:gH(S.from_layer,S.to_layer,e.layerCount).map(M=\u003eDg(M,e.layerCount))}),_.push({...S}),f=Q}if(p.length\u003c2)throw new Error(`PostProcessingSolver: trace \"${l.connection_name}\" has no bound copper segments`);const C=Math.max(...p.map(S=\u003eS.traceThickness??h.width)),y=h.viaDiameter,x=i.length;i.push({connectionName:l.connection_name,traceThickness:C,viaDiameter:y,route:p,vias:m});const E=p[0],B=p.at(-1);r.push({name:l.connection_name,pointsToConnect:[{x:E.x,y:E.y,layer:d.layer,...h.startPortId?{pcb_port_id:h.startPortId}:{}},{x:B.x,y:B.y,layer:h.points.at(-1).layer,...h.endPortId?{pcb_port_id:h.endPortId}:{}}]}),s.push({traceIndex:c,matchedRouteIndex:x,viaTemplates:_,startEndpoint:{...E},endEndpoint:{...B},...h.startPortId?{startPortId:h.startPortId}:{},...h.endPortId?{endPortId:h.endPortId}:{}}),a.add(l.connection_name)}for(const c of o)if(!a.has(c))throw new Error(`PostProcessingSolver: missing LengthMatchingSolver binding for rerouted connection \"${c}\"`);for(const c of t.result.traces)o.has(c.connection_name)||i.push(...nuo(c,e.layerCount));const A=Math.max(0,...i.filter(c=\u003ec.route.length\u003e=2).map(c=\u003ec.traceThickness));return{solverParams:{hdRoutes:i,originalConnections:r,differentialPairs:n,obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount,obstacleMargin:A},traceBindings:s,baseTraces:structuredClone(t.result.traces)}},f9t=t=\u003e{const e=new Map;for(const i of t.differentialPairs)for(const r of i.connectionNames){const s=t.hdRoutes.map((a,A)=\u003e({route:a,hdRouteIndex:A})).filter(({route:a})=\u003ea.connectionName===r);s.length===1\u0026\u0026e.set(s[0].hdRouteIndex,r)}const n=t.hdRoutes.map((i,r)=\u003e{const s=[],a=new Map;for(let A=0;A\u003c(i.jumpers?.length??0);A++){const c=i.jumpers[A],l=i.route.map((d,p)=\u003e({point:d,index:p})).filter(({point:d})=\u003eMath.hypot(d.x-c.start.x,d.y-c.start.y)\u003c=1e-8).map(({index:d})=\u003ed),u=i.route.map((d,p)=\u003e({point:d,index:p})).filter(({point:d})=\u003eMath.hypot(d.x-c.end.x,d.y-c.end.y)\u003c=1e-8).map(({index:d})=\u003ed),g=[...l.flatMap(d=\u003eu.filter(p=\u003ep\u003ed).map(p=\u003e({startIndex:d,endIndex:p}))),...u.flatMap(d=\u003el.filter(p=\u003ep\u003ed).map(p=\u003e({startIndex:d,endIndex:p})))];if(g.length!==1)throw new Error(`PostProcessingSolver: immutable HD route \"${i.connectionName}\" has an ambiguous jumper traversal`);const h=g[0];if(a.has(h.startIndex)||[...a.values()].some(({endIndex:d})=\u003eh.startIndex\u003cd||h.endIndex\u003c=d))throw new Error(`PostProcessingSolver: immutable HD route \"${i.connectionName}\" has overlapping or unordered jumpers`);a.set(h.startIndex,{endIndex:h.endIndex,jumperIndex:A})}if(i.route.length\u003e0){const A=i.route[0];s.push({route_type:\"wire\",x:A.x,y:A.y,width:A.traceThickness??i.traceThickness,layer:w7(A.z,t.layerCount)});for(let g=0;g\u003ci.route.length-1;g++){const h=i.route[g],d=a.get(g);if(d){const f=i.route[d.endIndex],I=i.jumpers[d.jumperIndex];if(h.z!==f.z)throw new Error(`PostProcessingSolver: immutable HD route \"${i.connectionName}\" changes layers through a jumper`);s.push({route_type:\"jumper\",start:{x:h.x,y:h.y},end:{x:f.x,y:f.y},footprint:I.footprint,layer:w7(h.z,t.layerCount)}),s.push({route_type:\"wire\",x:f.x,y:f.y,width:f.traceThickness??i.traceThickness,layer:w7(f.z,t.layerCount)}),g=d.endIndex-1;continue}const p=i.route[g+1],m=w7(h.z,t.layerCount),_=w7(p.z,t.layerCount);h.z!==p.z\u0026\u0026(h.toNextSegmentType===\"through_obstacle\"?s.push({route_type:\"through_obstacle\",start:{x:h.x,y:h.y},end:{x:p.x,y:p.y},from_layer:m,to_layer:_,width:h.traceThickness??i.traceThickness}):s.push({route_type:\"via\",x:p.x,y:p.y,from_layer:m,to_layer:_,via_diameter:i.viaDiameter})),s.push({route_type:\"wire\",x:p.x,y:p.y,width:p.traceThickness??i.traceThickness,layer:_})}const c=s.filter(g=\u003eg.route_type===\"wire\"),l=i.startPcbPortId??i.route[0]?.pcb_port_id,u=i.endPcbPortId??i.route.at(-1)?.pcb_port_id;l\u0026\u0026c[0]\u0026\u0026(c[0].start_pcb_port_id=l),u\u0026\u0026c.at(-1)\u0026\u0026(c.at(-1).end_pcb_port_id=u)}return{type:\"pcb_trace\",pcb_trace_id:`post_processing_hd_route_${r}`,connection_name:i.connectionName,__postProcessingViaDiameter:i.viaDiameter,route:s}}),o=structuredClone(t.obstacles);for(let i=0;i\u003ct.hdRoutes.length;i++){const r=t.hdRoutes[i],s=new Set([r.connectionName,r.rootConnectionName,r.startPcbPortId,r.endPcbPortId,r.route[0]?.pcb_port_id,r.route.at(-1)?.pcb_port_id,e.get(i)].filter(a=\u003ea!==void 0));for(const a of o)a.connectedTo.some(A=\u003es.has(A))\u0026\u0026(a.connectedTo=[...new Set([...a.connectedTo,...s])])}return{params:{simpleRouteJson:{traces:n,differentialPairs:structuredClone(t.differentialPairs),obstacles:o,bounds:structuredClone(t.bounds),layerCount:t.layerCount},...t.routingGrid?{routingGrid:structuredClone(t.routingGrid)}:{}},routeBindings:[...e.entries()].map(([i,r])=\u003e({hdRouteIndex:i,traceIndex:i,internalConnectionName:r})),sourceHdRoutes:structuredClone(t.hdRoutes)}};function I9t(t){const e=structuredClone(t.model.sourceHdRoutes);for(const n of t.model.routeBindings){const o=t.binding.traceBindings.find(A=\u003eA.traceIndex===n.traceIndex);if(!o)continue;const i=t.result.matchedHdRoutes[o.matchedRouteIndex],r=e[n.hdRouteIndex];if(!i||!r)throw new Error(`PostProcessingSolver: missing matched or source HD route for \"${n.internalConnectionName}\"`);if(i.connectionName!==n.internalConnectionName)throw new Error(`PostProcessingSolver: matched HD binding changed \"${n.internalConnectionName}\" to \"${i.connectionName}\"`);const s=i.route.map(A=\u003e({...A})),a=(A,c)=\u003e{if(A\u0026\u0026c\u0026\u0026(c.pcb_port_id\u0026\u0026(A.pcb_port_id=c.pcb_port_id),c.insideJumperPad\u0026\u0026t.rejectInsideJumperPad))throw new Error(`PostProcessingSolver: cannot restore jumper-pad metadata on rerouted connection \"${n.internalConnectionName}\"`)};a(s[0],r.route[0]),a(s.at(-1),r.route.at(-1)),e[n.hdRouteIndex]={...r,route:s,vias:structuredClone(i.vias)}}return{hdRoutes:e,postProcessingErrors:[]}}var Dv=class extends Error{connectionNames;reason;constructor(t){super(`PostProcessingSolver: differential pair ${t.connectionNames.join(\"/\")} ${t.message}`),this.name=\"DifferentialPairRoutingError\",this.connectionNames=[t.connectionNames[0],t.connectionNames[1]],this.reason=t.reason}},PSe=class extends Error{connectionNames;reason;constructor(t){super(t.message),this.name=\"PostProcessingConstraintError\",this.connectionNames=[...t.connectionNames],this.reason=t.reason}},C9t=class extends Error{reason=\"grid-capacity-exhausted\";constructor(t){super(t),this.name=\"PostProcessingGridCapacityError\"}},y9t=t=\u003e{const e=75e3*t.simpleRouteJson.differentialPairs.length;if(!Number.isSafeInteger(e))throw new Error(\"PostProcessingSolver: derived rerouting iteration bound exceeds the safe integer range\");const n=Math.min(e,8e4);return Math.max(1,n)},nce=t=\u003estructuredClone(t),x9t=(t,e,n)=\u003e{const o=c=\u003e{const l=-(e.ccwRotationDegrees??0)*Math.PI/180,u=c.x-e.center.x,g=c.y-e.center.y;return{x:u*Math.cos(l)-g*Math.sin(l),y:u*Math.sin(l)+g*Math.cos(l)}},i=o(t.start),r=o(t.end),s=e.width/2+n,a=e.height/2+n;if(Math.abs(i.x)\u003c=s\u0026\u0026Math.abs(i.y)\u003c=a||Math.abs(r.x)\u003c=s\u0026\u0026Math.abs(r.y)\u003c=a)return!0;const A=[{x:-s,y:-a},{x:s,y:-a},{x:s,y:a},{x:-s,y:a}];return A.some((c,l)=\u003euB(i,r,c,A[(l+1)%A.length])\u003c=1e-7)},ouo=t=\u003e{const e=[],n=[];for(const u of t.immutableTraces){const g=wSe(u,t.layerCount);e.push(...g.segments),n.push(...g.vias)}const o=Array.from({length:t.layerCount},()=\u003e[]);for(const u of e){const g=Dg(u.layer,t.layerCount);o[g].push(u)}const i=(u,g)=\u003eMath.hypot(u.x-g.x,u.y-g.y)\u003c=1e-8,r=(u,g,h)=\u003e{const d=h.x-g.x,p=h.y-g.y,m=d*d+p*p,_=m===0?0:Math.max(0,Math.min(1,((u.x-g.x)*d+(u.y-g.y)*p)/m));return Math.hypot(u.x-g.x-d*_,u.y-g.y-p*_)},s=(u,g,h)=\u003e{const d=-(g.ccwRotationDegrees??0)*Math.PI/180,p=u.x-g.center.x,m=u.y-g.center.y,_=p*Math.cos(d)-m*Math.sin(d),f=p*Math.sin(d)+m*Math.cos(d);return Math.abs(_)\u003c=g.width/2+h\u0026\u0026Math.abs(f)\u003c=g.height/2+h},a=(u,g)=\u003e{const h=Dg(g,t.layerCount);return AH(u,t.layerCount).includes(h)},A=(u,g,h)=\u003e{const d=((m,_,f)=\u003e{const I=Math.hypot(_.x,_.y);if(I\u003c=1e-10)throw new Error(\"PostProcessingSolver: cannot orient terminal fanout on a zero-length spine\");const C=-_.y/I*t.side*t.centerlineSpacing/2,y=_.x/I*t.side*t.centerlineSpacing/2,x=f===\"start\"?[t.firstStartTerminal,t.secondStartTerminal]:[t.firstEndTerminal,t.secondEndTerminal],E=[t.firstWidth,t.secondWidth],B=[t.firstConnectionName,t.secondConnectionName];return x.map((S,Q)=\u003e{const w=Q===0?1:-1,M={x:m.x+C*w,y:m.y+y*w};return{start:f===\"start\"?S:M,end:f===\"start\"?M:S,layer:m.layer,width:E[Q],connectionName:B[Q],terminal:f}})})(u,g,h),p=d.map(m=\u003eh===\"start\"?m.end:m.start);return d.every(c)\u0026\u0026p.every((m,_)=\u003et.obstacles.every(f=\u003e!a(f,u.layer)||!s(m,f,1.5*d[_].width+(t.terminalMiterMargin??0))))\u0026\u0026uB(d[0].start,d[0].end,d[1].start,d[1].end)\u003e=d[0].width/2+d[1].width/2-1e-7},c=u=\u003e{const g=u.width/2,h=g+u.width,d=Dg(u.layer,t.layerCount),p=Math.min(u.start.x,u.end.x),m=Math.max(u.start.x,u.end.x),_=Math.min(u.start.y,u.end.y),f=Math.max(u.start.y,u.end.y);for(const I of[u.start,u.end])if(I.x-g\u003ct.bounds.minX||I.x+g\u003et.bounds.maxX||I.y-g\u003ct.bounds.minY||I.y+g\u003et.bounds.maxY)return!1;for(const I of t.obstacles){if(!a(I,u.layer))continue;const C=Math.hypot(I.width/2+h,I.height/2+h);if(m\u003cI.center.x-C||p\u003eI.center.x+C||f\u003cI.center.y-C||_\u003eI.center.y+C)continue;const[y,x]=u.connectionName===t.firstConnectionName?[t.firstStartTerminal,t.firstEndTerminal]:[t.secondStartTerminal,t.secondEndTerminal],E=s(y,I,0)\u0026\u0026(s(u.start,I,g+u.width)||s(u.end,I,g+u.width))\u0026\u0026Math.hypot(u.end.x-y.x,u.end.y-y.y)\u003e=Math.hypot(u.start.x-y.x,u.start.y-y.y),B=s(x,I,0)\u0026\u0026(s(u.start,I,g+u.width)||s(u.end,I,g+u.width))\u0026\u0026Math.hypot(u.end.x-x.x,u.end.y-x.y)\u003c=Math.hypot(u.start.x-x.x,u.start.y-x.y);if(!(I.connectedTo.includes(u.connectionName)\u0026\u0026(E||B))\u0026\u0026x9t(u,I,g+u.width))return!1}for(const I of o[d]){const C=u.width/2+I.width/2+Math.max(u.width,I.width);if(!(m+C\u003cMath.min(I.start.x,I.end.x)||p-C\u003eMath.max(I.start.x,I.end.x)||f+C\u003cMath.min(I.start.y,I.end.y)||_-C\u003eMath.max(I.start.y,I.end.y))\u0026\u0026uB(u.start,u.end,I.start,I.end)\u003cC)return!1}for(const I of n)if(I.layers.includes(u.layer)\u0026\u0026r(I,u.start,u.end)\u003cu.width/2+I.diameter/2+u.width)return!1;return!0},l=u=\u003e{const g=u.diameter/2;if(u.x-g\u003ct.bounds.minX||u.x+g\u003et.bounds.maxX||u.y-g\u003ct.bounds.minY||u.y+g\u003et.bounds.maxY)return!1;for(const h of t.obstacles)if(u.layers.some(d=\u003ea(h,d))\u0026\u0026!(u.terminal!==null\u0026\u0026h.connectedTo.includes(u.connectionName)\u0026\u0026s(u,h,0))\u0026\u0026s(u,h,g+u.diameter))return!1;for(const h of e){if(!u.layers.includes(h.layer))continue;const d=g+h.width/2+Math.max(u.diameter,h.width);if(r(u,h.start,h.end)\u003cd)return!1}for(const h of n){if(!h.layers.some(p=\u003eu.layers.includes(p)))continue;const d=g+h.diameter/2+Math.max(u.diameter,h.diameter);if(Math.hypot(u.x-h.x,u.y-h.y)\u003cd)return!1}return!0};return{isEdgeValid:(u,g)=\u003e{if(u.layer!==g.layer||!((d,p)=\u003e{const m=Math.hypot(p.x-d.x,p.y-d.y);if(m===0)return[];const _=-(p.y-d.y)/m*t.side*t.centerlineSpacing/2,f=(p.x-d.x)/m*t.side*t.centerlineSpacing/2,I=i(d,t.start),C=i(p,t.end),y=t.terminalFanout?I\u0026\u0026C?\"both\":I?\"start\":C?\"end\":null:null,x=I\u0026\u0026t.terminalFanout?t.firstStartTerminal:{x:d.x+_,y:d.y+f},E=C\u0026\u0026t.terminalFanout?t.firstEndTerminal:{x:p.x+_,y:p.y+f},B=I\u0026\u0026t.terminalFanout?t.secondStartTerminal:{x:d.x-_,y:d.y-f},S=C\u0026\u0026t.terminalFanout?t.secondEndTerminal:{x:p.x-_,y:p.y-f};return[{start:x,end:E,layer:d.layer,width:t.firstWidth,connectionName:t.firstConnectionName,terminal:y},{start:B,end:S,layer:d.layer,width:t.secondWidth,connectionName:t.secondConnectionName,terminal:y}]})(u,g).every(c))return!1;if(t.terminalFanout||t.terminalMiterMargin===void 0)return!0;const h={x:g.x-u.x,y:g.y-u.y};return!(i(u,t.start)\u0026\u0026!A(u,h,\"start\"))\u0026\u0026!(i(g,t.end)\u0026\u0026!A(g,h,\"end\"))},isTerminalFanoutValid:A,isViaValid:(u,g,h)=\u003e{const d=Math.hypot(h.x,h.y);if(d\u003c=1e-10)throw new Error(\"PostProcessingSolver: cannot orient a coupled via on a zero-length spine\");const p=gH(u.layer,g,t.layerCount),m=-h.y/d*t.side*t.centerlineSpacing/2,_=h.x/d*t.side*t.centerlineSpacing/2,f=i(u,t.start)?\"start\":i(u,t.end)?\"end\":null;return[{x:u.x+m,y:u.y+_,layers:p,diameter:t.firstViaDiameter,connectionName:t.firstConnectionName,terminal:f},{x:u.x-m,y:u.y-_,layers:p,diameter:t.secondViaDiameter,connectionName:t.secondConnectionName,terminal:f}].every(l)}}},MSe=(t,e,n)=\u003e{const i=(u,g)=\u003e{const h=-(g.ccwRotationDegrees??0)*Math.PI/180,d=u.x-g.center.x,p=u.y-g.center.y;return{x:d*Math.cos(h)-p*Math.sin(h),y:d*Math.sin(h)+p*Math.cos(h)}},r=(u,g,h)=\u003e{const d=h.x-g.x,p=h.y-g.y,m=d*d+p*p,_=m===0?0:Math.max(0,Math.min(1,((u.x-g.x)*d+(u.y-g.y)*p)/m));return Math.hypot(u.x-(g.x+_*d),u.y-(g.y+_*p))},s=(u,g,h)=\u003e{const d=Dg(g,h);return AH(u,h).includes(d)},a=(u,g,h)=\u003e{const d=u.width/2;if(u.start.x-d\u003cg.bounds.minX-1e-7||u.start.x+d\u003eg.bounds.maxX+1e-7||u.start.y-d\u003cg.bounds.minY-1e-7||u.start.y+d\u003eg.bounds.maxY+1e-7||u.end.x-d\u003cg.bounds.minX-1e-7||u.end.x+d\u003eg.bounds.maxX+1e-7||u.end.y-d\u003cg.bounds.minY-1e-7||u.end.y+d\u003eg.bounds.maxY+1e-7)return!1;for(const p of g.obstacles){if(!s(p,u.layer,g.layerCount))continue;const m=u.terminal===\"both\"?[u.start,u.end]:u.terminal===\"start\"?[u.start]:u.terminal===\"end\"?[u.end]:[];if(!(p.connectedTo.includes(u.connectionName)\u0026\u0026m.some(_=\u003e{const f=i(_,p);return Math.abs(f.x)\u003c=p.width/2+1e-7\u0026\u0026Math.abs(f.y)\u003c=p.height/2+1e-7}))\u0026\u0026x9t(u,p,d+u.width))return!1}for(const p of h.segments){if(p.layer!==u.layer)continue;const m=u.width/2+p.width/2+Math.max(u.width,p.width);if(uB(u.start,u.end,p.start,p.end)\u003cm-1e-7)return!1}for(const p of h.vias){if(!p.layers.includes(u.layer))continue;const m=u.width/2+p.diameter/2+u.width;if(r(p,u.start,u.end)\u003cm-1e-7)return!1}return!0},A=(u,g,h)=\u003e{const d=u.diameter/2;if(u.x-d\u003cg.bounds.minX-1e-7||u.x+d\u003eg.bounds.maxX+1e-7||u.y-d\u003cg.bounds.minY-1e-7||u.y+d\u003eg.bounds.maxY+1e-7)return!1;for(const p of g.obstacles){if(!u.layers.some(_=\u003es(p,_,g.layerCount)))continue;const m=i(u,p);if(!(u.terminal!==null\u0026\u0026p.connectedTo.includes(u.connectionName)\u0026\u0026Math.abs(m.x)\u003c=p.width/2+1e-7\u0026\u0026Math.abs(m.y)\u003c=p.height/2+1e-7)\u0026\u0026Math.abs(m.x)\u003c=p.width/2+d+u.diameter\u0026\u0026Math.abs(m.y)\u003c=p.height/2+d+u.diameter)return!1}for(const p of h.segments){if(!u.layers.includes(p.layer))continue;const m=d+p.width/2+Math.max(u.diameter,p.width);if(r(u,p.start,p.end)\u003cm-1e-7)return!1}for(const p of h.vias){if(!p.layers.some(_=\u003eu.layers.includes(_)))continue;const m=d+p.diameter/2+Math.max(u.diameter,p.diameter);if(Math.hypot(u.x-p.x,u.y-p.y)\u003cm-1e-7)return!1}return!0},c=u=\u003e{for(let g=0;g\u003cu.segments.length;g++){const h=u.segments[g];for(let d=g+2;d\u003cu.segments.length;d++){const p=u.segments[d];if(h.layer===p.layer\u0026\u0026!(u.segments.slice(g+1,d).reduce((m,_)=\u003em+Math.hypot(_.end.x-_.start.x,_.end.y-_.start.y),0)\u003c=h.width+p.width+1e-7)\u0026\u0026uB(h.start,h.end,p.start,p.end)\u003ch.width/2+p.width/2-1e-7)return!0}}for(const g of u.vias)for(const h of u.segments)if(g.layers.includes(h.layer)\u0026\u0026!(Math.hypot(g.x-h.start.x,g.y-h.start.y)\u003c=1e-7||Math.hypot(g.x-h.end.x,g.y-h.end.y)\u003c=1e-7)\u0026\u0026r(g,h.start,h.end)\u003cg.diameter/2+h.width/2-1e-7)return!0;return!1},l=((u,g)=\u003e{const h=[],d=[];for(const p of u){const m=wSe(p,g);h.push(...m.segments),d.push(...m.vias)}return{segments:h,vias:d}})(n.immutableTraces,n.layerCount);if(!((u,g)=\u003e{for(const h of u.segments)for(const d of g.segments){if(h.layer!==d.layer)continue;const p=h.width/2+d.width/2;if(uB(h.start,h.end,d.start,d.end)\u003cp-1e-7)return!1}for(const[h,d]of[[u.vias,g.segments],[g.vias,u.segments]])for(const p of h)for(const m of d)if(p.layers.includes(m.layer)\u0026\u0026r(p,m.start,m.end)\u003cp.diameter/2+m.width/2-1e-7)return!1;for(const h of u.vias)for(const d of g.vias)if(h.layers.some(p=\u003ed.layers.includes(p))\u0026\u0026Math.hypot(h.x-d.x,h.y-d.y)\u003ch.diameter/2+d.diameter/2-1e-7)return!1;return!0})(t,e)||c(t)||c(e))return!1;for(const u of[t,e])if(u.segments.some(g=\u003e!a(g,n,l))||u.vias.some(g=\u003e!A(g,n,l)))return!1;return!0},E9t=[{x:1,y:0},{x:1,y:1},{x:0,y:1},{x:-1,y:1},{x:-1,y:0},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1}],iuo=class{constructor(t){this.input=t;const{bounds:e,grid:n}=t,o={minX:e.minX+n.outerPerimeterWidth,maxX:e.maxX-n.outerPerimeterWidth,minY:e.minY+n.outerPerimeterWidth,maxY:e.maxY-n.outerPerimeterWidth},i=this.createAxis(e.minX,e.maxX,n.outerGridStep,[o.minX,o.maxX]),r=this.createAxis(e.minY,e.maxY,n.outerGridStep,[o.minY,o.maxY]),s=this.createAxis(o.minX,o.maxX,n.innerGridStep,[],t.start.x),a=this.createAxis(o.minY,o.maxY,n.innerGridStep,[],t.start.y),A=this.createGrid(i,r,u=\u003eu.x\u003c=o.minX||u.x\u003e=o.maxX||u.y\u003c=o.minY||u.y\u003e=o.maxY),c=this.createGrid(s,a,()=\u003e!0);this.connectLocalNeighbors(A),this.connectLocalNeighbors(c);for(const u of[\"left\",\"right\",\"bottom\",\"top\"])this.connectBoundaries(u,A,c,o);const l=this.nodes.map((u,g)=\u003eg);this.connectEndpoint(t.start,l),this.connectEndpoint(t.end,l)}input;nodes=[];nodeIdByPoint=new Map;endpointNodeIdByPoint=new Map;getPlanarNeighbors(t){const e=this.endpointNodeIdByPoint.get(this.exactKeyFor(t))??this.nodeIdByPoint.get(this.keyFor(t));if(e===void 0)throw new Error(`PostProcessingSolver: coupled path point (${t.x}, ${t.y}) is not on the composite grid`);return[...this.nodes[e].neighborIds].map(n=\u003e({...this.nodes[n].point,layer:t.layer}))}getNodeCount(){return this.nodes.length}getSearchStateCountUpperBound(t){const e=this.nodes.reduce((n,o)=\u003en+o.neighborIds.size,0)*t+1;if(!Number.isSafeInteger(e))throw new Error(\"PostProcessingSolver: composite-grid search-state bound exceeds the safe integer range\");return e}createAxis(t,e,n,o,i=t){const r=[t,e,...o].map(a=\u003e({value:a,fixed:!0}));for(let a=Math.ceil((t-i)/n);i+a*n\u003ce-1e-8;a++)r.push({value:i+a*n,fixed:!1});r.sort((a,A)=\u003ea.value-A.value||Number(A.fixed)-Number(a.fixed));const s=[];for(const a of r){const A=s.at(-1);!A||Math.abs(a.value-A.value)\u003e1e-8?s.push(a):a.fixed\u0026\u0026!A.fixed\u0026\u0026(s[s.length-1]=a)}return s.map(a=\u003ea.value)}createGrid(t,e,n){return e.map(o=\u003et.map(i=\u003e{const r={x:i,y:o};return n(r)?this.addNode(r):null}))}connectLocalNeighbors(t){for(let e=0;e\u003ct.length;e++)for(let n=0;n\u003c(t[e]?.length??0);n++){const o=t[e][n];if(o!==null)for(const i of E9t){const r=t[e+i.y]?.[n+i.x];r!=null\u0026\u0026this.connect(o,r)}}}connectBoundaries(t,e,n,o){const i=t===\"left\"?o.minX:t===\"right\"?o.maxX:t===\"bottom\"?o.minY:o.maxY,r=t===\"left\"||t===\"right\",s=l=\u003eMath.abs((r?l.x:l.y)-i)\u003c=1e-8,a=l=\u003e{const u=new Set;for(const g of l)for(const h of g)h!==null\u0026\u0026s(this.nodes[h].point)\u0026\u0026u.add(h);return[...u].sort((g,h)=\u003e{const d=this.nodes[g].point,p=this.nodes[h].point;return(r?d.y-p.y:d.x-p.x)||g-h})},A=a(e),c=a(n);if(A.length===0||c.length===0)throw new Error(`PostProcessingSolver: composite grid has no ${t} boundary bridge candidates`);for(const l of A)this.connect(l,this.findNearestAlongBoundary(l,c,r));for(const l of c)this.connect(l,this.findNearestAlongBoundary(l,A,r))}findNearestAlongBoundary(t,e,n){const o=this.nodes[t].point;let i=e[0],r=Number.POSITIVE_INFINITY;for(const s of e){const a=this.nodes[s].point,A=Math.abs(n?o.y-a.y:o.x-a.x);(A\u003cr-1e-8||Math.abs(A-r)\u003c=1e-8\u0026\u0026s\u003ci)\u0026\u0026(r=A,i=s)}return i}connectEndpoint(t,e){const n=this.nodeIdByPoint.get(this.keyFor(t)),o=n===void 0?null:this.nodes[n].point,i=o?.x===t.x\u0026\u0026o.y===t.y?n:this.nodes.push({point:{x:t.x,y:t.y},neighborIds:new Set})-1;this.endpointNodeIdByPoint.set(this.exactKeyFor(t),i);const r=(s,a)=\u003e{const A=this.nodes[s].point,c=e.filter(l=\u003el!==s).map(l=\u003e({nodeId:l,distance:Math.hypot(this.nodes[l].point.x-A.x,this.nodes[l].point.y-A.y)})).filter(({distance:l})=\u003el\u003e1e-10).sort((l,u)=\u003el.distance-u.distance||l.nodeId-u.nodeId).slice(0,a);if(c.length===0)throw new Error(\"PostProcessingSolver: composite grid has no endpoint connection candidates\");for(const{nodeId:l}of c)this.connect(s,l)};r(i,8);for(const s of E9t){const a={x:t.x+s.x*this.input.grid.innerGridStep,y:t.y+s.y*this.input.grid.innerGridStep};if(a.x\u003cthis.input.bounds.minX||a.x\u003ethis.input.bounds.maxX||a.y\u003cthis.input.bounds.minY||a.y\u003ethis.input.bounds.maxY)continue;const A=this.addNode(a);this.connect(i,A),r(A,4)}}addNode(t){const e=this.keyFor(t),n=this.nodeIdByPoint.get(e);if(n!==void 0)return n;const o=this.nodes.length;return this.nodes.push({point:{x:t.x,y:t.y},neighborIds:new Set}),this.nodeIdByPoint.set(e,o),o}connect(t,e){if(t===e)return;const n=this.nodes[t],o=this.nodes[e];n.neighborIds.add(e),o.neighborIds.add(t)}keyFor(t){const e=Object.is(t.x,-0)?0:t.x,n=Object.is(t.y,-0)?0:t.y;return`${e.toFixed(12)}:${n.toFixed(12)}`}exactKeyFor(t){return`${Object.is(t.x,-0)?0:t.x}:${Object.is(t.y,-0)?0:t.y}`}},ruo=class{constructor(t){if(this.input=t,this.startLayer=Dg(t.start.layer,t.layerCount),this.endLayer=Dg(t.end.layer,t.layerCount),this.grid=new iuo(t),this.maxSearchStates=this.grid.getSearchStateCountUpperBound(t.layerCount),this.exploredStateLimit=Math.min(this.maxSearchStates,2e4),this.startLayer\u003c0||this.endLayer\u003c0)return this.queue=[],void(this.status=\"exhausted\");const e={point:t.start,direction:null,cost:0,estimate:this.estimate(t.start),parent:null,sequence:0};this.queue=[e],this.bestCosts.set(this.keyFor(t.start,null),0)}input;queue;bestCosts=new Map;startLayer;endLayer;grid;maxSearchStates;exploredStateLimit;current=null;result=null;status=\"searching\";explored=0;nextSequence=1;isComplete(){return this.status!==\"searching\"}getPath(){return this.result}getPreviewPath(){return this.current?this.createPath(this.current):[this.input.start]}getExploredCount(){return this.explored}getProgress(){return this.status!==\"searching\"?1:Math.min(.99,this.explored/this.exploredStateLimit)}getGridNodeCount(){return this.grid.getNodeCount()}step(){if(this.status!==\"searching\")return;const t=this.popQueue();if(!t)return void(this.status=\"exhausted\");const e=this.bestCosts.get(this.keyFor(t.point,t.direction));if(e===void 0)throw new Error(\"PostProcessingSolver: coupled path queue contains an untracked state\");if(t.cost\u003ee+1e-10)this.queue.length===0\u0026\u0026(this.status=\"exhausted\");else{if(this.current=t,this.explored++,this.explored\u003ethis.maxSearchStates)throw new Error(`PostProcessingSolver: coupled path search exceeded its ${this.maxSearchStates}-state graph invariant limit`);if(this.isEnd(t.point)){const n=this.createPath(t);return n[n.length-1]=this.input.end,this.result=this.simplifyPath(n),void(this.status=\"found\")}this.explored\u003e=this.exploredStateLimit?this.status=\"exhausted\":(this.enqueuePlanarNeighbors(t),this.enqueueViaNeighbors(t),this.queue.length===0\u0026\u0026(this.status=\"exhausted\"))}}isEnd(t){return t.layer===this.input.end.layer\u0026\u0026t.x===this.input.end.x\u0026\u0026t.y===this.input.end.y}estimate(t){return Math.hypot(t.x-this.input.end.x,t.y-this.input.end.y)+3*Math.abs(Dg(t.layer,this.input.layerCount)-this.endLayer)}keyFor(t,e){return`${Object.is(t.x,-0)?0:t.x}:${Object.is(t.y,-0)?0:t.y}:${t.layer}:${e?.key??\"start\"}`}createDirection(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.hypot(n,o);if(i\u003c=1e-10)throw new Error(\"PostProcessingSolver: composite grid produced a zero-length planar edge\");const r=n/i,s=o/i;return{x:r,y:s,key:`${r.toFixed(6)}:${s.toFixed(6)}`}}createPath(t){const e=[];let n=t;for(;n;)e.push(n.point),n=n.parent;return e.reverse()}simplifyPath(t){return t.filter((e,n)=\u003e{if(n===0||n===t.length-1)return!0;const o=t[n-1],i=t[n+1],r={x:e.x-o.x,y:e.y-o.y},s={x:i.x-e.x,y:i.y-e.y},a=r.x*s.y-r.y*s.x,A=Math.hypot(r.x,r.y)*Math.hypot(s.x,s.y);return Math.abs(a)\u003e1e-10*A||e.layer!==o.layer||e.layer!==i.layer})}hasHigherQueuePriority(t,e){return t.estimate!==e.estimate?t.estimate\u003ce.estimate:t.cost!==e.cost?t.cost\u003ce.cost:t.point.x!==e.point.x?t.point.x\u003ce.point.x:t.point.y!==e.point.y?t.point.y\u003ce.point.y:t.point.layer!==e.point.layer?t.point.layer\u003ce.point.layer:t.sequence\u003ce.sequence}pushQueue(t){this.queue.push(t);let e=this.queue.length-1;for(;e\u003e0;){const n=Math.floor((e-1)/2),o=this.queue[n];if(!this.hasHigherQueuePriority(t,o))break;this.queue[e]=o,e=n}this.queue[e]=t}popQueue(){const t=this.queue[0],e=this.queue.pop();if(!t||!e||this.queue.length===0)return t;let n=0;for(;;){const o=2*n+1;if(o\u003e=this.queue.length)break;const i=o+1;let r=o;i\u003cthis.queue.length\u0026\u0026this.hasHigherQueuePriority(this.queue[i],this.queue[o])\u0026\u0026(r=i);const s=this.queue[r];if(!this.hasHigherQueuePriority(s,e))break;this.queue[n]=s,n=r}return this.queue[n]=e,t}enqueuePlanarNeighbors(t){for(const e of this.grid.getPlanarNeighbors(t.point)){if(!this.input.isEdgeValid(t.point,e))continue;const n=this.createDirection(t.point,e),o=t.direction===null||t.direction.key===n.key?0:.18,i=t.cost+Math.hypot(e.x-t.point.x,e.y-t.point.y)+o,r=this.keyFor(e,n);(this.bestCosts.get(r)??Number.POSITIVE_INFINITY)\u003c=i||(this.bestCosts.set(r,i),this.pushQueue({point:e,direction:n,cost:i,estimate:i+this.estimate(e),parent:t,sequence:this.nextSequence++}))}}enqueueViaNeighbors(t){if(!t.direction)return;const e=Dg(t.point.layer,this.input.layerCount);for(const n of[e-1,e+1]){if(n\u003c0||n\u003e=this.input.layerCount)continue;const o=w7(n,this.input.layerCount);if(!this.input.isViaValid(t.point,o,t.direction))continue;const i={...t.point,layer:o},r=t.cost+4,s=this.keyFor(i,t.direction);(this.bestCosts.get(s)??Number.POSITIVE_INFINITY)\u003c=r||(this.bestCosts.set(s,r),this.pushQueue({point:i,direction:t.direction,cost:r,estimate:r+this.estimate(i),parent:t,sequence:this.nextSequence++}))}}},B9t=t=\u003e{const e=Math.min(t.bounds.maxX-t.bounds.minX,t.bounds.maxY-t.bounds.minY),n=t.config?.innerGridStep??t.defaultInnerGridStep,o=t.config?.outerGridStep??4*n,i=t.config?.outerPerimeterWidth??Math.min(o,e/4);if(!Number.isFinite(n)||n\u003c1e-4)throw new Error(\"PostProcessingSolver: routingGrid.innerGridStep must be finite and at least 0.0001\");if(!Number.isFinite(o)||o\u003c=n)throw new Error(\"PostProcessingSolver: routingGrid.outerGridStep must be finite and greater than innerGridStep\");if(!Number.isFinite(i)||i\u003c=0||2*i\u003e=e)throw new Error(\"PostProcessingSolver: routingGrid.outerPerimeterWidth must be finite, positive, and less than half the smaller board extent\");const r=t.bounds.maxX-t.bounds.minX,s=t.bounds.maxY-t.bounds.minY;if((Math.ceil(r/o)+4)*(Math.ceil(s/o)+4)+(Math.ceil((r-2*i)/n)+2)*(Math.ceil((s-2*i)/n)+2)+18\u003e25e4)throw new C9t(\"PostProcessingSolver: valid input exceeds the 250000-node optimization grid capacity\");return{innerGridStep:n,outerGridStep:o,outerPerimeterWidth:i}},b9t=t=\u003e{const e=-t.pathDirection.y,n=t.pathDirection.x,o=Math.tan(t.maximumTurnDegrees*Math.PI/180),i=Math.max(0,...t.lanes.map(({point:A,polarity:c})=\u003e{const l=A.x-t.anchor.x,u=A.y-t.anchor.y,g=l*t.escapeDirection.x+u*t.escapeDirection.y,h=l*e+u*n,d=c*t.side*t.centerlineSpacing/2;return g+Math.abs(h-d)/o})),r=t.maxUncoupledLength??i;if(i\u003er+1e-8)return null;const s=Math.max(.05,Math.min(.25,t.searchStep/2)),a=Math.max(1,Math.ceil((r-i)/s)+1);for(let A=0;A\u003ca;A++){const c=Math.min(r,i+A*s),l={x:t.anchor.x+t.escapeDirection.x*c,y:t.anchor.y+t.escapeDirection.y*c,layer:t.anchor.layer};if(t.lanes.every(({point:u,polarity:g})=\u003e{const h=g*t.side*t.centerlineSpacing/2,d=l.x+e*h,p=l.y+n*h;return t.maxUncoupledLength===void 0||Math.hypot(d-u.x,p-u.y)\u003c=t.maxUncoupledLength+1e-8})\u0026\u0026t.isValid(l))return l}return null},suo=[.75,.5,1,.25,1.25],oce=100,auo=class{constructor(t){this.input=t,this.pairName=t.pair.connectionNames.join(\"/\"),this.prepared=this.prepare()}input;pairName;prepared;candidates=[];result=null;search=null;nextAttempt=0;exploredNodeCount=0;isComplete(){return this.result!==null}getResult(){if(!this.result)throw new Error(`PostProcessingSolver: differential pair ${this.pairName} is not complete`);return this.result}getPreviewPath(){return this.search?.getPreviewPath()??null}getProgress(){if(this.result)return 1;const t=this.prepared.attempts.length,e=this.search?.getProgress()??0;return Math.min(.99,(this.nextAttempt+e)/t)}getStats(){return{phase:this.search?\"searching\":\"candidate-selection\",pair:this.pairName,attemptIndex:this.nextAttempt,attemptCount:this.prepared.attempts.length,exploredNodeCount:this.exploredNodeCount+(this.search?.getExploredCount()??0),gridNodeCount:this.search?.getGridNodeCount()??0,acceptedCandidateCount:this.candidates.length}}step(){if(this.result)return;const t=this.prepared;if(!this.search){const i=t.attempts[this.nextAttempt];return i?void(this.search=new ruo(i.input)):void this.complete()}if(this.search.step(),!this.search.isComplete())return;const e=this.search.getPath();this.exploredNodeCount+=this.search.getExploredCount();const n=t.attempts[this.nextAttempt];if(!n)throw new Error(`PostProcessingSolver: differential pair ${this.pairName} lost its active attempt`);if(this.search=null,this.nextAttempt++,!e)return;const o=(i=\u003e{const r=(S,Q)=\u003eMath.hypot(S.x-Q.x,S.y-Q.y)\u003c=1e-8;if(i.path.length\u003c2)throw new Error(\"PostProcessingSolver: coupled path has fewer than two stations\");const s=(S,Q)=\u003e{for(let w=S+Q;w\u003e=0\u0026\u0026w\u003ci.path.length;w+=Q){const M=i.path[w];if(!r(M,i.path[S]))return M}return null},a=S=\u003e{const Q=i.path[S],w=s(S,-1),M=s(S,1),k=(J,oe)=\u003e{const ie=oe.x-J.x,ne=oe.y-J.y,le=Math.hypot(ie,ne);if(le\u003c=1e-10)throw new Error(\"PostProcessingSolver: cannot offset a zero-length spine\");return{x:-ne/le,y:ie/le}},R=i.side*i.centerlineSpacing/2;if(!w||!M){const J=k(w??Q,M??Q);return{x:J.x*R,y:J.y*R}}if(i.terminalFanout\u0026\u0026S===1)return k(w,Q);if(i.terminalFanout\u0026\u0026S===i.path.length-2)return k(Q,M);if(i.terminalFanout\u0026\u0026i.path[S+1]?.layer!==Q.layer)return k(w,Q);const F=k(w,Q),O=k(Q,M),U={x:F.x+O.x,y:F.y+O.y},Y=Math.hypot(U.x,U.y);if(Y\u003c=1e-10)return null;const W=U.x/Y,te=U.y/Y,j=R/(W*F.x+te*F.y);return{x:W*j,y:te*j}},A=i.first.points[0],c=i.first.points.at(-1),l=i.reverseSecond?i.second.points.at(-1):i.second.points[0],u=i.reverseSecond?i.second.points[0]:i.second.points.at(-1),g=[[{route_type:\"wire\",x:A.x,y:A.y,width:A.width,layer:A.layer}],[{route_type:\"wire\",x:l.x,y:l.y,width:l.width,layer:l.layer}]],h=[i.first.transitions[0],i.second.transitions[0]];let d=0;const p=i.terminalFanout?1:0,m=i.path.length-2,_=i.path[m],f=i.path[m-1],I=i.terminalFanout\u0026\u0026_?.layer===c.layer\u0026\u0026f?.layer===_.layer,C=i.terminalFanout?I?m-1:i.path.length-1:i.path.length;for(let S=p;S\u003cC;S++){const Q=i.path[S],w=a(S);if(!w)return null;for(const M of[0,1]){const k=M===0?1:-1,R={x:Q.x+w.x*k,y:Q.y+w.y*k},F=g[M],O=i.path[S-1];if(O\u0026\u0026O.layer!==Q.layer){if(!r(O,Q))throw new Error(\"PostProcessingSolver: a coupled layer transition moved in the plane\");const U=[...F].reverse().find(W=\u003eW.route_type===\"wire\");if(!U)throw new Error(\"PostProcessingSolver: generated via has no preceding wire\");const Y=h[M];F.push({route_type:\"via\",x:U.x,y:U.y,from_layer:O.layer,to_layer:Q.layer,via_diameter:Y?.via_diameter??(M===0?i.first.viaDiameter:i.second.viaDiameter),...Y?.via_hole_diameter!==void 0?{via_hole_diameter:Y.via_hole_diameter}:{}}),F.push({route_type:\"wire\",x:U.x,y:U.y,width:M===0?i.first.width:i.second.width,layer:Q.layer})}else{const U=F.at(-1);U?.route_type===\"wire\"\u0026\u0026r(U,R)\u0026\u0026U.layer===Q.layer||F.push({route_type:\"wire\",...R,width:M===0?i.first.width:i.second.width,layer:Q.layer})}}i.path[S-1]?.layer!==Q.layer\u0026\u0026S\u003e0\u0026\u0026d++}const y=(S,Q)=\u003e{const w=S.at(-1);if(!w||w.route_type!==\"wire\")throw new Error(\"PostProcessingSolver: terminal fanout has no preceding wire\");const M=S.at(-2);let k=!1;if(M?.route_type===\"wire\"\u0026\u0026M.layer===w.layer\u0026\u0026w.layer===Q.layer){const R={x:w.x-M.x,y:w.y-M.y},F={x:Q.x-w.x,y:Q.y-w.y},O=Math.hypot(R.x,R.y),U=Math.hypot(F.x,F.y);if(O\u003e1e-8\u0026\u0026U\u003e1e-8\u0026\u0026Math.abs(R.x*F.x+R.y*F.y)\u003c=1e-8){const Y={x:w.x-R.x/O*U,y:w.y-R.y/O*U};(Y.x-M.x)*(R.x/O)+(Y.y-M.y)*(R.y/O)\u003e1e-8\u0026\u0026(w.x=Y.x,w.y=Y.y,k=!0)}}i.terminalFanout\u0026\u0026!k\u0026\u0026w.x!==Q.x\u0026\u0026w.y!==Q.y\u0026\u0026S.push({route_type:\"wire\",x:Q.x,y:w.y,width:Q.width,layer:Q.layer}),S.push({route_type:\"wire\",x:Q.x,y:Q.y,width:Q.width,layer:Q.layer})};y(g[0],c),y(g[1],u),i.reverseSecond\u0026\u0026(g[1]=g[1].reverse().map(S=\u003eS.route_type===\"via\"?{...S,from_layer:S.to_layer,to_layer:S.from_layer}:S));const x=(S,Q)=\u003e{const w=S.filter(M=\u003eM.route_type===\"wire\");for(const M of w)delete M.start_pcb_port_id,delete M.end_pcb_port_id;Q.startPortId\u0026\u0026(w[0].start_pcb_port_id=Q.startPortId),Q.endPortId\u0026\u0026(w.at(-1).end_pcb_port_id=Q.endPortId)};x(g[0],i.first),x(g[1],i.second);const E={...i.first.source,route:g[0]},B={...i.second.source,route:g[1]};return{first:E,second:B,firstParsed:qf(E,i.layerCount),secondParsed:qf(B,i.layerCount),edgeGap:i.edgeGap,centerlineDistance:i.centerlineSpacing,bendCount:Math.max(0,i.path.length-d-2),viaPairCount:d}})({first:t.first,second:t.second,reverseSecond:t.reverseSecond,path:e,centerlineSpacing:n.edgeGap+t.first.width/2+t.second.width/2,edgeGap:n.edgeGap,side:n.side,layerCount:this.input.layerCount,terminalFanout:t.terminalFanout});o\u0026\u0026MSe(o.firstParsed,o.secondParsed,t.context)\u0026\u0026this.candidates.push(o)}prepare(){const t=this.input.traces.map((E,B)=\u003e({trace:E,index:B})).filter(({trace:E})=\u003eE.connection_name===this.input.pair.connectionNames[0]),e=this.input.traces.map((E,B)=\u003e({trace:E,index:B})).filter(({trace:E})=\u003eE.connection_name===this.input.pair.connectionNames[1]);if(t.length!==1||e.length!==1)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:\"trace-resolution-failure\",message:\"must resolve each connection_name to exactly one non-branching trace\"});if(t[0].index===e[0].index)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:\"trace-resolution-failure\",message:\"resolved both members to one trace\"});let n,o;try{n=qf(t[0].trace,this.input.layerCount),o=qf(e[0].trace,this.input.layerCount)}catch(E){throw new Dv({connectionNames:this.input.pair.connectionNames,reason:\"invalid-routed-geometry\",message:`has unsupported or invalid routed geometry: ${E instanceof Error?E.message:String(E)}`})}const i=n.points[0],r=n.points.at(-1),s=Math.hypot(i.x-o.points[0].x,i.y-o.points[0].y)+Math.hypot(r.x-o.points.at(-1).x,r.y-o.points.at(-1).y),a=Math.hypot(i.x-o.points.at(-1).x,i.y-o.points.at(-1).y)+Math.hypot(r.x-o.points[0].x,r.y-o.points[0].y)+1e-8\u003cs,A=a?o.points.at(-1):o.points[0],c=a?o.points[0]:o.points.at(-1);if(i.layer!==A.layer||r.layer!==c.layer)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:\"terminal-layer-mismatch\",message:\"does not have common paired layers at both terminal stations\"});const l={x:(i.x+A.x)/2,y:(i.y+A.y)/2,layer:i.layer},u={x:(r.x+c.x)/2,y:(r.y+c.y)/2,layer:r.layer},g=Math.hypot(u.x-l.x,u.y-l.y);if(g\u003c1e-6)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:\"coincident-terminal-midpoints\",message:\"has coincident terminal-pair midpoints\"});const h={x:-(u.y-l.y)/g,y:(u.x-l.x)/g},d=i.x-A.x,p=i.y-A.y,m=d*h.x+p*h.y\u003e=0?1:-1,_=(E,B)=\u003e{const S=E.x-B.x,Q=E.y-B.y,w=Math.hypot(S,Q);return w\u003e1e-8\u0026\u0026Math.abs(S*h.x+Q*h.y)/w\u003c.5},f=_(i,A)\u0026\u0026_(r,c),I={x:h.y,y:-h.x},C=[i,A].some(E=\u003e(E.x-l.x)*I.x+(E.y-l.y)*I.y\u003e1e-8),y={immutableTraces:this.input.traces.filter((E,B)=\u003eB!==t[0].index\u0026\u0026B!==e[0].index),obstacles:this.input.obstacles,bounds:this.input.bounds,layerCount:this.input.layerCount},x=(E=\u003e{const{minimumCenterlineDistance:B,maximumCenterlineDistance:S}=E;if(B===void 0\u0026\u0026S===void 0)return E.legacyCenterlineDistances;const Q=[...B!==void 0\u0026\u0026S!==void 0?[(B+S)/2,B,S,B-.25,S+.25]:B!==void 0?[B,B+.25,B+.5,B-.25,B+1]:[S,S-.25,S-.5,S+.25,S-1],...E.legacyCenterlineDistances];return Q.filter((w,M)=\u003ew\u003eE.minimumPhysicalDistance\u0026\u0026Q.findIndex(k=\u003eMath.abs(k-w)\u003c1e-8)===M)})({minimumCenterlineDistance:this.input.pair.minimumCenterlineDistance,maximumCenterlineDistance:this.input.pair.maximumCenterlineDistance,minimumPhysicalDistance:n.width/2+o.width/2,legacyCenterlineDistances:suo.map(E=\u003eE+n.width/2+o.width/2)}).flatMap(E=\u003e{const B=E-n.width/2-o.width/2;return[m,m===1?-1:1].flatMap(S=\u003e{const Q=B9t({config:this.input.routingGrid,bounds:this.input.bounds,defaultInnerGridStep:Math.max(.25,Math.min(.5,E/2))}),w=(F,O)=\u003eouo({...y,start:F,end:O,firstConnectionName:n.source.connection_name,secondConnectionName:o.source.connection_name,firstStartTerminal:i,firstEndTerminal:r,secondStartTerminal:A,secondEndTerminal:c,firstWidth:n.width,secondWidth:o.width,firstViaDiameter:n.transitions[0]?.via_diameter??n.viaDiameter,secondViaDiameter:o.transitions[0]?.via_diameter??o.viaDiameter,centerlineSpacing:E,side:S,terminalFanout:f,terminalMiterMargin:this.input.pair.maxUncoupledLength===void 0?void 0:E/2});let M=this.input.pair.maxUncoupledLength===void 0?((F,O)=\u003e{if(!C||f)return l;const U=[{terminal:i,offset:O*F/2},{terminal:A,offset:-O*F/2}],Y=Math.tan(55*Math.PI/180),W=Math.max(...U.map(({terminal:te,offset:j})=\u003e{const J=(te.x-l.x)*I.x+(te.y-l.y)*I.y,oe=(te.x-l.x)*h.x+(te.y-l.y)*h.y;return J+Math.abs(oe-j)/Y}));return{x:l.x+I.x*W,y:l.y+I.y*W,layer:l.layer}})(E,S):l,k=u;if(!f\u0026\u0026this.input.pair.maxUncoupledLength!==void 0){const F=w(l,u),O=b9t({anchor:l,escapeDirection:I,pathDirection:I,centerlineSpacing:E,side:S,lanes:[{point:i,polarity:1},{point:A,polarity:-1}],maxUncoupledLength:this.input.pair.maxUncoupledLength,maximumTurnDegrees:55,searchStep:Q.innerGridStep,isValid:Y=\u003eF.isTerminalFanoutValid(Y,I,\"start\")}),U=b9t({anchor:u,escapeDirection:{x:-I.x,y:-I.y},pathDirection:I,centerlineSpacing:E,side:S,lanes:[{point:r,polarity:1},{point:c,polarity:-1}],maxUncoupledLength:this.input.pair.maxUncoupledLength,maximumTurnDegrees:45,searchStep:Q.innerGridStep,isValid:Y=\u003eF.isTerminalFanoutValid(Y,I,\"end\")});if(!O||!U)return[];if(M=O,k=U,(k.x-M.x)*I.x+(k.y-M.y)*I.y\u003c=Q.innerGridStep)return[]}const R=w(M,k);return[{edgeGap:B,side:S,input:{start:M,end:k,bounds:this.input.bounds,layerCount:this.input.layerCount,grid:Q,...R}}]})});return{first:n,second:o,reverseSecond:a,terminalFanout:f,context:y,attempts:x}}complete(){if(this.candidates.length===0)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:\"no-valid-candidate\",message:\"could not be improved without violating bounds, copper clearance, or coupled-via constraints\"});this.candidates.sort((t,e)=\u003ethis.score(t)-this.score(e)||t.edgeGap-e.edgeGap),this.result={status:\"accepted\",candidate:this.candidates[0]}}score(t){return(this.input.pair.minimumCenterlineDistance!==void 0||this.input.pair.maximumCenterlineDistance!==void 0?Math.max(0,(this.input.pair.minimumCenterlineDistance??Number.NEGATIVE_INFINITY)-t.centerlineDistance)*oce+Math.max(0,t.centerlineDistance-(this.input.pair.maximumCenterlineDistance??Number.POSITIVE_INFINITY))*oce:t.edgeGap\u003c.5?(.5-t.edgeGap)*oce:t.edgeGap\u003e1?(t.edgeGap-1)*oce:0)+lb(t.firstParsed)+lb(t.secondParsed)+.15*t.bendCount+8*t.viaPairCount}},IW=t=\u003e{const e={lines:[],points:[],rects:[],circles:[]};e.rects.push({center:{x:(t.bounds.minX+t.bounds.maxX)/2,y:(t.bounds.minY+t.bounds.maxY)/2},width:t.bounds.maxX-t.bounds.minX,height:t.bounds.maxY-t.bounds.minY,fill:\"rgba(30, 70, 120, 0.04)\",stroke:\"rgba(30, 70, 120, 0.55)\",layer:`z${Array.from({length:t.layerCount},(n,o)=\u003eo).join(\",\")}`});for(const n of t.obstacles){const o=AH(n,t.layerCount);e.rects.push({center:n.center,width:n.width,height:n.height,ccwRotationDegrees:n.ccwRotationDegrees,fill:\"rgba(220, 60, 60, 0.16)\",stroke:\"rgba(190, 40, 40, 0.75)\",layer:`z${o.join(\",\")}`})}for(let n=0;n\u003c(t.previewPath?.length??0)-1;n++){const o=t.previewPath[n],i=t.previewPath[n+1];if(o.layer!==i.layer)continue;const r=Dg(o.layer,t.layerCount);e.lines.push({points:[o,i],strokeColor:\"#16a34a\",strokeWidth:.08,strokeDash:[.18,.12],layer:`z${r}`})}for(const n of t.traces){if(t.activeConnectionNames?.includes(n.connection_name))continue;const o=\"#2563eb\";let i=null;for(const r of n.route)if(r.route_type===\"wire\"){if(i\u0026\u0026i.layer===r.layer){const s=Dg(r.layer,t.layerCount);e.lines.push({points:[i,r],strokeColor:o,strokeWidth:Math.max(i.width,r.width),...s===0?{}:{strokeDash:[.2,.16]},layer:`z${s}`})}i=r}else if(r.route_type===\"via\"){const s=gH(r.from_layer,r.to_layer,t.layerCount).map(a=\u003eDg(a,t.layerCount));if(e.circles.push({center:r,radius:(r.via_diameter??i?.width??.2)/2,fill:\"rgba(37, 99, 235, 0.45)\",stroke:o,layer:`z${s.join(\",\")}`}),i){const a=i.width;i={x:r.x,y:r.y,layer:r.to_layer,width:a}}}}return e},Auo=class extends zA{constructor(t){super(),this.params=t,this.outputTraces=nce(t.simpleRouteJson.traces),this.MAX_ITERATIONS=y9t(t)}params;outputTraces;reroutedPairs=[];failures=[];nextPairIndex=0;activeConnectionNames=null;activeSession=null;getSolverName(){return\"DifferentialPairReroutingSolver\"}_step(){const t=this.params.simpleRouteJson.differentialPairs[this.nextPairIndex];if(!t)return void this.finish();this.activeConnectionNames=t.connectionNames;try{if(!this.activeSession)return this.activeSession=new auo({pair:t,traces:this.outputTraces,obstacles:this.params.simpleRouteJson.obstacles,bounds:this.params.simpleRouteJson.bounds,layerCount:this.params.simpleRouteJson.layerCount,routingGrid:this.params.routingGrid}),void(this.stats=this.activeSession.getStats());this.activeSession.step()}catch(n){if(!(n instanceof Dv))throw n;return void this.skipFailedPair(t,n)}if(this.stats=this.activeSession.getStats(),!this.activeSession.isComplete())return;const e=this.activeSession.getResult();this.activeSession=null;for(const n of[e.candidate.first,e.candidate.second]){const o=this.outputTraces.findIndex(i=\u003ei.connection_name===n.connection_name);if(o\u003c0)throw new Error(`DifferentialPairReroutingSolver: accepted replacement for unknown connection \"${n.connection_name}\"`);this.outputTraces[o]=n}this.reroutedPairs.push(t),this.nextPairIndex++,this.nextPairIndex!==this.params.simpleRouteJson.differentialPairs.length?this.stats={phase:\"accepted\",pair:t.connectionNames.join(\"/\"),pairIndex:this.nextPairIndex-1,pairCount:this.params.simpleRouteJson.differentialPairs.length}:this.finish()}finish(){this.activeConnectionNames=null,this.solved=!0,this.stats={phase:\"complete\",acceptedPairCount:this.reroutedPairs.length,skippedPairCount:this.failures.length}}skipFailedPair(t,e){this.failures.push({connectionNames:[...t.connectionNames],reason:e.reason,message:e.message}),this.activeSession=null,this.nextPairIndex++,this.nextPairIndex!==this.params.simpleRouteJson.differentialPairs.length?this.stats={phase:\"skipped\",pair:t.connectionNames.join(\"/\"),pairIndex:this.nextPairIndex-1,pairCount:this.params.simpleRouteJson.differentialPairs.length,skippedPairCount:this.failures.length}:this.finish()}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved)throw new Error(\"DifferentialPairReroutingSolver: getOutput() called before completion\");return this.getBestEffortOutput()}getBestEffortOutput(){return{traces:nce(this.outputTraces),reroutedPairs:this.reroutedPairs.map(t=\u003e({...t,connectionNames:[...t.connectionNames]})),failures:this.failures.map(t=\u003e({...t,connectionNames:[...t.connectionNames]}))}}computeProgress(){return this.solved?1:this.params.simpleRouteJson.differentialPairs.length===0?0:(this.nextPairIndex+(this.activeSession?.getProgress()??0))/this.params.simpleRouteJson.differentialPairs.length}visualize(){return IW({traces:this.outputTraces,obstacles:this.params.simpleRouteJson.obstacles,bounds:this.params.simpleRouteJson.bounds,layerCount:this.params.simpleRouteJson.layerCount,activeConnectionNames:this.activeConnectionNames,previewPath:this.activeSession?.getPreviewPath()??null})}},K5=1e-8,cuo=class extends zA{constructor(t){super(),this.input=t,this.traces=nce(t.traces),this.MAX_ITERATIONS=Math.max(1,t.reroutedPairs.length+1)}input;traces;nextPairIndex=0;getSolverName(){return\"FortyFiveDegreeSimplificationSolver\"}_step(){const t=this.input.reroutedPairs[this.nextPairIndex];if(!t)return this.solved=!0,void(this.stats={phase:\"complete\",simplifiedPairCount:this.nextPairIndex});this.traces=(e=\u003e{const n=e.pair.connectionNames.join(\"/\"),o=e.pair.connectionNames.map(B=\u003ee.traces.map((S,Q)=\u003e({trace:S,index:Q})).filter(({trace:S})=\u003eS.connection_name===B));if(o[0].length!==1||o[1].length!==1)throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} must resolve to exactly two traces`);const i=o[0][0].index,r=o[1][0].index;if(i===r)throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} resolved both members to one trace`);const s=structuredClone(e.traces),a={immutableTraces:s.filter((B,S)=\u003eS!==i\u0026\u0026S!==r),obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount},A=B=\u003e{const S=qf(B[i],e.layerCount),Q=qf(B[r],e.layerCount);let w=0;for(const[M,k]of[[S.segments,Q.segments],[Q.segments,S.segments]])for(const R of M){if(R.terminal!==null)continue;const F=k.filter(O=\u003eO.layer===R.layer);if(F.length===0)throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} lost common-layer interior copper`);w=Math.max(w,Math.min(...F.map(O=\u003euB(R.start,R.end,O.start,O.end))))}return w},c=B=\u003e{const S=qf(B[i],e.layerCount),Q=qf(B[r],e.layerCount);let w=Number.POSITIVE_INFINITY;for(const[M,k]of[[S.segments,Q.segments],[Q.segments,S.segments]])for(const R of M)if(R.terminal===null)for(const F of k)F.layer===R.layer\u0026\u0026(w=Math.min(w,uB(R.start,R.end,F.start,F.end)-R.width/2-F.width/2));return Number.isFinite(w)?w:null},l=B=\u003e{const S=qf(B[i],e.layerCount),Q=qf(B[r],e.layerCount);return MSe(S,Q,a)};if(!l(s))throw new Error(`FortyFiveDegreeSimplificationSolver: rerouted pair ${n} has invalid complete copper before simplification`);if(e.pair.maxUncoupledLength!==void 0\u0026\u0026e.pair.minimumCenterlineDistance!==void 0\u0026\u0026e.pair.maximumCenterlineDistance!==void 0\u0026\u0026Math.abs(e.pair.minimumCenterlineDistance-e.pair.maximumCenterlineDistance)\u003c=K5)return s;const u=qf(s[i],e.layerCount),g=qf(s[r],e.layerCount),h=Math.abs(lb(u)-lb(g)),d=c(s),p=e.pair.maximumCenterlineDistance??1+u.width/2+g.width/2,m=Math.min(A(s),p),_=B=\u003e{if(!l(B)||A(B)\u003em+K5)return!1;const S=c(B);return d===null||S===null||S\u003e=d-K5},f=(B,S)=\u003e{const Q=Math.abs(S.x-B.x),w=Math.abs(S.y-B.y),M=S.x\u003e=B.x?1:-1,k=S.y\u003e=B.y?1:-1,R=[],F={x:S.x-M*w,y:B.y};(F.x-B.x)*M\u003e=-1e-8\u0026\u0026(F.x-S.x)*M\u003c=K5\u0026\u0026R.push([B,F,S]);const O={x:B.x,y:S.y-k*Q};(O.y-B.y)*k\u003e=-1e-8\u0026\u0026(O.y-S.y)*k\u003c=K5\u0026\u0026R.push([B,O,S]);const U={x:B.x+M*Math.min(Q,w),y:B.y+k*Math.min(Q,w)};return R.push([B,U,S]),R.map((Y,W)=\u003e{const te=Y.filter((J,oe)=\u003eoe===0||Math.hypot(J.x-Y[oe-1].x,J.y-Y[oe-1].y)\u003eK5),j=te.slice(0,-1).map((J,oe)=\u003e{const ie=te[oe+1],ne=Math.abs(ie.x-J.x),le=Math.abs(ie.y-J.y);return{length:Math.hypot(ne,le),straight:ne\u003c=K5||le\u003c=K5?Math.hypot(ne,le):0}});return{points:te,usableStraightLength:Math.max(0,...j.map(J=\u003eJ.straight)),bendCount:Math.max(0,te.length-2),priority:W}}).filter((Y,W,te)=\u003ete.findIndex(j=\u003eJSON.stringify(j.points)===JSON.stringify(Y.points))===W).sort((Y,W)=\u003eW.usableStraightLength-Y.usableStraightLength||Y.bendCount-W.bendCount||Y.priority-W.priority)},I=B=\u003e{const S=[];for(let Q=0;Q\u003cB.route.length-1;Q++){const w=B.route[Q];if(w?.route_type===\"wire\")for(let M=B.route.length-1;M\u003e=Q+1;M--){if(Q===0||M===B.route.length-1)continue;const k=B.route[M];k?.route_type===\"wire\"\u0026\u0026k.layer===w.layer\u0026\u0026(B.route.slice(Q+1,M).some(R=\u003eR.route_type!==\"wire\"||R.layer!==w.layer)||S.push({startIndex:Q,endIndex:M,skippedPointCount:M-Q-1}))}}return S.sort((Q,w)=\u003ew.skippedPointCount-Q.skippedPointCount||Q.startIndex-w.startIndex||w.endIndex-Q.endIndex)},C=(B,S,Q)=\u003e{const w=B.route[S.startIndex],M=B.route[S.endIndex],k=Math.max(w.width,M.width),R=Q.points.slice(1,-1).map(F=\u003e({route_type:\"wire\",...F,width:k,layer:w.layer}));return{...B,route:[...B.route.slice(0,S.startIndex+1),...R,...B.route.slice(S.endIndex)]}};for(const B of[i,r]){let S=!0;for(;S;){S=!1;const Q=s[B];for(const w of I(Q)){const M=Q.route[w.startIndex],k=Q.route[w.endIndex],R=Q.route.slice(w.startIndex,w.endIndex+1),F=R.slice(0,-1).every((O,U)=\u003e{const Y=R[U+1],W=Math.abs(Y.x-O.x),te=Math.abs(Y.y-O.y);return W\u003c=K5||te\u003c=K5||Math.abs(W-te)\u003c=K5});for(const O of f(M,k)){if(O.points.length\u003e=R.length\u0026\u0026F)continue;const U=C(Q,w,O),Y=[...s];if(Y[B]=U,JSON.stringify(U.route)===JSON.stringify(Q.route))continue;if(_(Y)){s[B]=U,S=!0;break}const W=B===i?r:i,te=s[W],j=I(te).find(ie=\u003eie.startIndex===w.startIndex\u0026\u0026ie.endIndex===w.endIndex);if(!j)continue;const J=te.route[j.startIndex],oe=te.route[j.endIndex];for(const ie of f(J,oe)){const ne=C(te,j,ie),le=[...Y];if(le[W]=ne,_(le)){s[B]=U,s[W]=ne,S=!0;break}}if(S)break}if(S)break}}}if(!_(s))throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} produced invalid complete copper`);const y=qf(s[i],e.layerCount),x=qf(s[r],e.layerCount),E=Math.abs(lb(y)-lb(x));return Math.abs(E-h)\u003ee.pair.lengthTolerance+K5?structuredClone(e.traces):s})({traces:this.traces,pair:t,obstacles:this.input.obstacles,bounds:this.input.bounds,layerCount:this.input.layerCount}),this.nextPairIndex++,this.stats={phase:\"simplifying\",pair:t.connectionNames.join(\"/\"),pairIndex:this.nextPairIndex-1,pairCount:this.input.reroutedPairs.length}}getConstructorParams(){return[this.input]}getOutput(){if(!this.solved)throw new Error(\"FortyFiveDegreeSimplificationSolver: getOutput() called before completion\");return this.getBestEffortOutput()}getBestEffortOutput(){return{traces:nce(this.traces),reroutedPairs:this.input.reroutedPairs.map(t=\u003e({...t,connectionNames:[...t.connectionNames]}))}}computeProgress(){return this.solved?1:this.input.reroutedPairs.length===0?0:this.nextPairIndex/this.input.reroutedPairs.length}visualize(){return IW({traces:this.traces,obstacles:this.input.obstacles,bounds:this.input.bounds,layerCount:this.input.layerCount,activeConnectionNames:this.input.reroutedPairs[this.nextPairIndex]?.connectionNames??null,previewPath:null})}},luo=class extends zA{constructor(t){super(),this.input=t}input;output=null;visualizationTraces=null;getSolverName(){return\"HdRouteReconstructionSolver\"}_step(){this.visualizationTraces=(t=\u003e{const{simpleRouteJson:e}=t.params;if(t.result.matchedHdRoutes.length!==t.binding.solverParams.hdRoutes.length)throw new Error(\"PostProcessingSolver: LengthMatchingSolver changed the search route count\");const n=structuredClone(t.binding.baseTraces);for(const o of t.binding.traceBindings){const i=t.result.matchedHdRoutes[o.matchedRouteIndex];if(!i)throw new Error(`PostProcessingSolver: missing matched route at index ${o.matchedRouteIndex}`);const r=n[o.traceIndex];if(!r)throw new Error(`PostProcessingSolver: missing simplified trace binding at index ${o.traceIndex}`);if(r.connection_name!==i.connectionName)throw new Error(`PostProcessingSolver: route binding changed connection \"${r.connection_name}\" to \"${i.connectionName}\"`);if(i.route.length\u003c2)throw new Error(`PostProcessingSolver: matched connection \"${i.connectionName}\" has incomplete geometry`);const s=i.route[0],a=i.route.at(-1);if(Math.hypot(s.x-o.startEndpoint.x,s.y-o.startEndpoint.y)\u003e1e-8||s.z!==o.startEndpoint.z||Math.hypot(a.x-o.endEndpoint.x,a.y-o.endEndpoint.y)\u003e1e-8||a.z!==o.endEndpoint.z)throw new Error(`PostProcessingSolver: matched connection \"${i.connectionName}\" moved a preserved endpoint`);const A=[];let c=0;const l=g=\u003e({route_type:\"wire\",x:g.x,y:g.y,width:g.traceThickness??i.traceThickness,layer:w7(g.z,e.layerCount)});A.push(l(i.route[0]));for(let g=1;g\u003ci.route.length;g++){const h=i.route[g-1],d=i.route[g];if(h.z===d.z){A.push(l(d));continue}if(Math.hypot(h.x-d.x,h.y-d.y)\u003e1e-8)throw new Error(`PostProcessingSolver: matched connection \"${i.connectionName}\" moves while changing layers`);const p=o.viaTemplates[c++];if(!p)throw new Error(`PostProcessingSolver: matched connection \"${i.connectionName}\" added an unbound via`);if(Math.hypot(p.x-d.x,p.y-d.y)\u003e1e-8)throw new Error(`PostProcessingSolver: matched connection \"${i.connectionName}\" moved a preserved via`);const m=w7(h.z,e.layerCount),_=w7(d.z,e.layerCount),f=new Set([p.from_layer,p.to_layer]);if(!f.has(m)||!f.has(_))throw new Error(`PostProcessingSolver: matched connection \"${i.connectionName}\" changed a preserved via span`);A.push({...p}),A.push(l(d))}if(c!==o.viaTemplates.length)throw new Error(`PostProcessingSolver: matched connection \"${i.connectionName}\" removed a preserved via`);const u=A.filter(g=\u003eg.route_type===\"wire\");for(const g of u)delete g.start_pcb_port_id,delete g.end_pcb_port_id;o.startPortId\u0026\u0026(u[0].start_pcb_port_id=o.startPortId),o.endPortId\u0026\u0026(u.at(-1).end_pcb_port_id=o.endPortId),n[o.traceIndex]={...r,route:A}}for(const o of t.binding.solverParams.differentialPairs){const i=o.connectionNames.join(\"/\"),r=o.connectionNames.map(u=\u003en.map((g,h)=\u003e({trace:g,index:h})).filter(({trace:g})=\u003eg.connection_name===u));if(r[0].length!==1||r[1].length!==1)throw new Error(`PostProcessingSolver: reconstructed pair ${i} does not resolve to complete copper`);const s=r[0][0],a=r[1][0],A=qf(s.trace,e.layerCount),c=qf(a.trace,e.layerCount),l=Math.abs(lb(A)-lb(c));if(l\u003eo.lengthTolerance+1e-7)throw new PSe({message:`PostProcessingSolver: reconstructed pair ${i} exceeds length tolerance ${o.lengthTolerance} with error ${l}`,connectionNames:[...o.connectionNames],reason:\"length-tolerance-unsatisfied\"});if(!MSe(A,c,{immutableTraces:n.filter((u,g)=\u003eg!==s.index\u0026\u0026g!==a.index),obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount}))throw new PSe({message:`PostProcessingSolver: length matching produced invalid complete copper for pair ${i}`,connectionNames:[...o.connectionNames],reason:\"invalid-final-copper\"})}return n})(this.input),this.output=I9t({...this.input,rejectInsideJumperPad:!0}),this.stats={phase:\"complete\",routeCount:this.output.hdRoutes.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){if(!this.output||!this.solved)throw new Error(\"HdRouteReconstructionSolver: getOutput() called before completion\");return structuredClone(this.output)}visualize(){const t=this.visualizationTraces??this.input.simplified.traces,{obstacles:e,bounds:n,layerCount:o}=this.input.params.simpleRouteJson;return IW({traces:t,obstacles:e,bounds:n,layerCount:o,activeConnectionNames:null,previewPath:null})}},S9t=class extends n7{differentialPairReroutingSolver;fortyFiveDegreeSimplificationSolver;lengthMatchingSolver;hdRouteReconstructionSolver;lengthMatchingBinding=null;model;fallbackOutput=null;postProcessingErrors=[];pipelineDef=[eh(\"differentialPairReroutingSolver\",Auo,t=\u003e[t.model.params]),eh(\"fortyFiveDegreeSimplificationSolver\",cuo,t=\u003e{const e=t.getStageOutput(\"differentialPairReroutingSolver\");if(!e)throw new Error(\"PostProcessingSolver: rerouting stage completed without output\");const{obstacles:n,bounds:o,layerCount:i}=t.model.params.simpleRouteJson;return[{...e,obstacles:n,bounds:o,layerCount:i}]}),eh(\"lengthMatchingSolver\",m9t,t=\u003e{const e=t.getStageOutput(\"fortyFiveDegreeSimplificationSolver\");if(!e)throw new Error(\"PostProcessingSolver: 45-degree simplification stage completed without output\");return t.lengthMatchingBinding=_9t({result:e,params:t.model.params}),[t.lengthMatchingBinding.solverParams]}),eh(\"hdRouteReconstructionSolver\",luo,t=\u003e{const e=t.getStageOutput(\"fortyFiveDegreeSimplificationSolver\"),n=t.getStageOutput(\"lengthMatchingSolver\");if(!e||!n||!t.lengthMatchingBinding)throw new Error(\"PostProcessingSolver: reconstruction stage is missing a required binding or output\");return[{binding:t.lengthMatchingBinding,result:n,simplified:e,params:t.model.params,model:t.model}]},{onSolved:t=\u003e{const e=t.getStageOutput(\"differentialPairReroutingSolver\");if(!e)throw new Error(\"PostProcessingSolver: cannot summarize missing rerouting output\");t.stats={phase:\"complete\",acceptedPairCount:e.reroutedPairs.length},e.failures.length\u003e0\u0026\u0026(t.stats.skippedPairCount=e.failures.length,t.stats.postProcessingErrorCount=e.failures.length)}})];constructor(t){super(structuredClone(t));let e=null;try{(function(o){if(!o||typeof o!=\"object\")throw new Error(\"PostProcessingSolver: params must be an object\");if(!Array.isArray(o.hdRoutes))throw new Error(\"PostProcessingSolver: hdRoutes must be an array\");if(!Array.isArray(o.differentialPairs))throw new Error(\"PostProcessingSolver: differentialPairs must be an array\");if(!Array.isArray(o.obstacles))throw new Error(\"PostProcessingSolver: obstacles must be an array\");if(!Number.isInteger(o.layerCount)||o.layerCount\u003c1)throw new Error(\"PostProcessingSolver: layerCount must be a positive integer\");for(const l of o.obstacles){if(!l||typeof l!=\"object\"||l.type!==\"rect\"||!l.center||!Number.isFinite(l.center.x)||!Number.isFinite(l.center.y)||!Number.isFinite(l.width)||l.width\u003c=0||!Number.isFinite(l.height)||l.height\u003c=0||!Array.isArray(l.layers)||l.layers.some(u=\u003etypeof u!=\"string\")||!Array.isArray(l.connectedTo)||l.connectedTo.some(u=\u003etypeof u!=\"string\"||u.length===0)||l.ccwRotationDegrees!==void 0\u0026\u0026!Number.isFinite(l.ccwRotationDegrees))throw new Error(\"PostProcessingSolver: obstacle declaration is invalid\");AH(l,o.layerCount)}const{minX:i,maxX:r,minY:s,maxY:a}=o.bounds??{};if(![i,r,s,a].every(Number.isFinite)||i\u003e=r||s\u003e=a)throw new Error(\"PostProcessingSolver: bounds must have finite positive extents\");const A=new Set(o.differentialPairs.flatMap(l=\u003el.connectionNames));for(const l of o.hdRoutes){if(!l||typeof l!=\"object\"||typeof l.connectionName!=\"string\"||l.connectionName.length===0||l.rootConnectionName!==void 0\u0026\u0026(typeof l.rootConnectionName!=\"string\"||l.rootConnectionName.length===0)||!Number.isFinite(l.traceThickness)||l.traceThickness\u003c=0||!Number.isFinite(l.viaDiameter)||l.viaDiameter\u003c0||l.viaDiameter===0\u0026\u0026A.has(l.connectionName)||!Array.isArray(l.route)||!Array.isArray(l.vias)||l.jumpers!==void 0\u0026\u0026!Array.isArray(l.jumpers))throw new Error(\"PostProcessingSolver: HD route declaration is invalid\");if(l.startPcbPortId!==void 0\u0026\u0026(typeof l.startPcbPortId!=\"string\"||l.startPcbPortId.length===0)||l.endPcbPortId!==void 0\u0026\u0026(typeof l.endPcbPortId!=\"string\"||l.endPcbPortId.length===0))throw new Error(`PostProcessingSolver: HD route \"${l.connectionName}\" has invalid terminal metadata`);for(const u of l.route)if(!u||typeof u!=\"object\"||!Number.isFinite(u.x)||!Number.isFinite(u.y)||!Number.isInteger(u.z)||u.z\u003c0||u.z\u003e=o.layerCount||u.traceThickness!==void 0\u0026\u0026(!Number.isFinite(u.traceThickness)||u.traceThickness\u003c=0))throw new Error(`PostProcessingSolver: HD route \"${l.connectionName}\" has an invalid route point`);for(const u of l.vias)if(!u||typeof u!=\"object\"||!Number.isFinite(u.x)||!Number.isFinite(u.y)||u.zLayers!==void 0\u0026\u0026(!Array.isArray(u.zLayers)||u.zLayers.some(g=\u003e!Number.isInteger(g)||g\u003c0||g\u003e=o.layerCount)))throw new Error(`PostProcessingSolver: HD route \"${l.connectionName}\" has an invalid via`);if(l.vias.length\u003e0\u0026\u0026l.viaDiameter\u003c=0)throw new Error(`PostProcessingSolver: HD route \"${l.connectionName}\" has a non-positive via diameter`);for(const u of l.jumpers??[])if(!(u\u0026\u0026typeof u==\"object\"\u0026\u0026u.route_type===\"jumper\"\u0026\u0026Number.isFinite(u.start?.x)\u0026\u0026Number.isFinite(u.start?.y)\u0026\u0026Number.isFinite(u.end?.x)\u0026\u0026Number.isFinite(u.end?.y)\u0026\u0026[\"0603\",\"1206\",\"1206x4_pair\"].includes(u.footprint)))throw new Error(`PostProcessingSolver: HD route \"${l.connectionName}\" has an invalid jumper`)}const c=new Set;for(const l of o.differentialPairs){if(!l||typeof l!=\"object\"||!Array.isArray(l.connectionNames)||l.connectionNames.length!==2||l.connectionNames[0]===l.connectionNames[1]||!l.connectionNames.every(u=\u003etypeof u==\"string\"\u0026\u0026u.length\u003e0)||!Number.isFinite(l.lengthTolerance)||l.lengthTolerance\u003c0)throw new Error(\"PostProcessingSolver: differential pair declaration is invalid\");for(const u of[l.minimumCenterlineDistance,l.maximumCenterlineDistance])if(u!==void 0\u0026\u0026(!Number.isFinite(u)||u\u003c=0))throw new Error(\"PostProcessingSolver: differential pair centerline distances must be positive finite numbers\");if(l.maxUncoupledLength!==void 0\u0026\u0026(!Number.isFinite(l.maxUncoupledLength)||l.maxUncoupledLength\u003c0))throw new Error(\"PostProcessingSolver: differential pair maxUncoupledLength must be a non-negative finite number\");if(l.minimumCenterlineDistance!==void 0\u0026\u0026l.maximumCenterlineDistance!==void 0\u0026\u0026l.minimumCenterlineDistance\u003el.maximumCenterlineDistance)throw new Error(\"PostProcessingSolver: differential pair minimumCenterlineDistance cannot exceed maximumCenterlineDistance\");for(const u of l.connectionNames){if(c.has(u))throw new Error(`PostProcessingSolver: connection \"${u}\" belongs to multiple differential pairs`);c.add(u)}}for(const l of[.25,.5])B9t({config:o.routingGrid,bounds:o.bounds,defaultInnerGridStep:l})})(t)}catch(o){if(!(o instanceof C9t))throw o;e=o}if(this.model=f9t(t),e)return void this.finishWithBestEffortOutput({stage:\"differentialPairReroutingSolver\",message:e.message,reason:e.reason});const n=y9t(this.model.params)+Math.max(1,t.differentialPairs.length+1)+1e5+10;if(!Number.isSafeInteger(n))throw new Error(\"PostProcessingSolver: derived pipeline iteration bound exceeds the safe integer range\");this.MAX_ITERATIONS=n}getSolverName(){return\"PostProcessingSolver\"}getConstructorParams(){return[structuredClone(this.inputProblem)]}_step(){const t=this.getCurrentStageName();try{super._step()}catch(n){const o=this.classifyOptimizationFailure(n,t);if(!o)throw n;return void this.finishWithBestEffortOutput(o)}if(!this.failed)return;const e=this.classifyIterationFailure(this.error,t);if(!e)throw new Error(this.error??\"PostProcessingSolver failed without an error message\");this.finishWithBestEffortOutput(e)}tryFinalAcceptance(){const t=this.getCurrentStageName();t!==\"differentialPairReroutingSolver\"\u0026\u0026t!==\"lengthMatchingSolver\"||this.finishWithBestEffortOutput({stage:t,message:\"PostProcessingSolver reached its iteration limit\",reason:\"iteration-limit-exhausted\"})}classifyOptimizationFailure(t,e){return e===\"lengthMatchingSolver\"\u0026\u0026t instanceof tce?{stage:e,message:t.message,connectionName:t.connectionName,reason:t.reason}:e===\"hdRouteReconstructionSolver\"\u0026\u0026t instanceof PSe||e===\"differentialPairReroutingSolver\"\u0026\u0026t instanceof Dv\u0026\u0026t.reason===\"no-valid-candidate\"?{stage:e,message:t.message,connectionNames:[...t.connectionNames],reason:t.reason}:null}classifyIterationFailure(t,e){return e!==\"differentialPairReroutingSolver\"\u0026\u0026e!==\"lengthMatchingSolver\"?null:t\u0026\u0026t.endsWith(\"ran out of iterations\")?{stage:e,message:t,reason:\"iteration-limit-exhausted\"}:null}createBestEffortOutput(t){let e=this.lengthMatchingBinding;if(!e){const o=this.getStageOutput(\"fortyFiveDegreeSimplificationSolver\")??this.fortyFiveDegreeSimplificationSolver?.getBestEffortOutput(),i=this.getStageOutput(\"differentialPairReroutingSolver\")??this.differentialPairReroutingSolver?.getBestEffortOutput(),r=o??i;r\u0026\u0026(e=_9t({result:r,params:this.model.params}))}if(!e)return{output:{hdRoutes:structuredClone(this.inputProblem.hdRoutes),postProcessingErrors:[]},source:\"input-hd-routes\"};let n=this.getStageOutput(\"lengthMatchingSolver\");return n||(n=this.lengthMatchingSolver?.getBestEffortOutput()),n\u0026\u0026t.reason!==\"invalid-final-copper\"||(n={matchedHdRoutes:e.solverParams.hdRoutes}),{output:I9t({binding:e,result:n,model:this.model}),source:\"best-effort-hd-routes\"}}finishWithBestEffortOutput(t){const e=this.createBestEffortOutput(t),n={type:\"post_processing_error\",...t,returnedRouteSource:e.source};this.postProcessingErrors.push(n),this.fallbackOutput=e.output,this.activeSubSolver=null,this.error=null,this.failed=!1,this.solved=!0,this.progress=1,this.stats={phase:\"complete\",postProcessingErrorCount:this.postProcessingErrors.length}}getOutput(){if(!this.solved)throw new Error(\"PostProcessingSolver: getOutput() called before the solver completed\");const t=this.fallbackOutput??this.getStageOutput(\"hdRouteReconstructionSolver\");if(!t)throw new Error(\"PostProcessingSolver: completed pipeline is missing reconstruction output\");const e=this.getStageOutput(\"differentialPairReroutingSolver\")??this.differentialPairReroutingSolver?.getBestEffortOutput(),n=e?.failures??[];let o=\"input-hd-routes\";(e?.reroutedPairs.length??0)\u003e0\u0026\u0026(o=\"best-effort-hd-routes\");const i=[...n.map(s=\u003e({type:\"post_processing_error\",stage:\"differentialPairReroutingSolver\",message:s.message,connectionNames:[...s.connectionNames],reason:s.reason,returnedRouteSource:o})),...this.postProcessingErrors],r=structuredClone(t);return r.postProcessingErrors=structuredClone(i),r}initialVisualize(){if(this.fallbackOutput)return{lines:this.fallbackOutput.hdRoutes.map(i=\u003e({points:i.route.map(({x:r,y:s})=\u003e({x:r,y:s})),strokeWidth:i.traceThickness}))};const{traces:t,obstacles:e,bounds:n,layerCount:o}=this.model.params.simpleRouteJson;return IW({traces:structuredClone(t),obstacles:e,bounds:n,layerCount:o,activeConnectionNames:null,previewPath:null})}finalVisualize(){if(this.fallbackOutput)return this.initialVisualize();const t=f9t({...this.inputProblem,hdRoutes:this.getOutput().hdRoutes}),{traces:e,obstacles:n,bounds:o,layerCount:i}=t.params.simpleRouteJson;return IW({traces:e,obstacles:n,bounds:o,layerCount:i,activeConnectionNames:null,previewPath:null})}},CW=class Iit{static generators=new Map;static register(e){Iit.generators.set(e.componentKind,e)}static create(e){const n=e.detectedComponent.componentKind,o=Iit.generators.get(n);if(!o)throw new Error(`No topology generator registered for component kind \"${n}\"`);return new o(e)}},yW=t=\u003e[t.obstacle.obstacleId??t.obstacle.componentId??\"obstacle\",t.start.x.toFixed(4),t.start.y.toFixed(4),t.end.x.toFixed(4),t.end.y.toFixed(4),t.expansionDirection.x,t.expansionDirection.y].join(\":\"),Q9t=t=\u003e{let e=0;for(const n of t)e=31*e+n.charCodeAt(0)\u003e\u003e\u003e0;return e},$m=(t,e)=\u003e`hsla(${Q9t(yW(t))%360},72%,36%,${e})`,xW=t=\u003e{const e=t.expansionDirection;return e.x\u003c0?\"left\":e.x\u003e0?\"right\":e.y\u003c0?\"bottom\":\"top\"},P7=t=\u003e({x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2}),DSe=t=\u003e{const e=/^bga-gapfill-(\\d+)-/.exec(t.capacityMeshNodeId);return e?Number.parseInt(e[1],10):null},v9t=(t,e)=\u003e{const n=P7(t),o=P7(e),i=n.y-o.y;if(Math.abs(i)\u003e1e-6)return i;const r=n.x-o.x;return Math.abs(r)\u003e1e-6?r:yW(t).localeCompare(yW(e))},ice=t=\u003e{const e=[...t].sort(v9t),n=[];let o=e.shift();for(;o\u0026\u0026(n.push(o),e.length!==0);){const i=P7(o);let r=0,s=Number.POSITIVE_INFINITY;for(let a=0;a\u003ce.length;a++){const A=e[a],c=P7(A),l=(c.x-i.x)**2+(c.y-i.y)**2;l\u003cs-1e-9?(s=l,r=a):Math.abs(l-s)\u003c=1e-9\u0026\u0026v9t(A,e[r])\u003c0\u0026\u0026(r=a)}o=e.splice(r,1)[0]}return n},gB=(t,e)=\u003e{const n=yW(t),o=e.findIndex(i=\u003eyW(i)===n);return o\u003e=0?`E${o+1}`:`E${Q9t(n).toString(36).slice(0,4)}`},NSe=t=\u003et.flatMap(e=\u003e{const n=Pg(e);return[{obstacle:e,start:{x:n.minX,y:n.minY},end:{x:n.minX,y:n.maxY},expansionDirection:{x:-1,y:0}},{obstacle:e,start:{x:n.maxX,y:n.minY},end:{x:n.maxX,y:n.maxY},expansionDirection:{x:1,y:0}},{obstacle:e,start:{x:n.minX,y:n.minY},end:{x:n.maxX,y:n.minY},expansionDirection:{x:0,y:-1}},{obstacle:e,start:{x:n.minX,y:n.maxY},end:{x:n.maxX,y:n.maxY},expansionDirection:{x:0,y:1}}]}),CN=.001,rce=.001,uuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;meshIndex;allEdges=[];queueEdges=[];disconnectedEdges=[];currentEdge=null;lastSearchBounds=null;lastCandidateMeshNodes=[];lastMatchedMeshNode=null;_setup(){const t=Math.max(this.inputProblem.meshNodes.length,1);this.meshIndex=new X4(t);for(const n of this.inputProblem.meshNodes){const o=Pg(n);this.meshIndex.add(o.minX,o.minY,o.maxX,o.maxY)}this.meshIndex.finish();const e=NSe(this.inputProblem.unmarkedComponentObstacles);this.queueEdges=e,this.allEdges=ice(e),this.currentEdge=null,this.lastSearchBounds=null,this.lastCandidateMeshNodes=[],this.lastMatchedMeshNode=null}_step(){const t=this.queueEdges.shift();if(!t)return this.currentEdge=null,this.lastSearchBounds=null,this.lastCandidateMeshNodes=[],this.lastMatchedMeshNode=null,void(this.solved=!0);this.currentEdge=t,this.lastMatchedMeshNode=null;const e=Math.abs(t.start.x-t.end.x)\u003c=CN,n=e?{minX:t.start.x-rce,maxX:t.start.x+rce,minY:Math.min(t.start.y,t.end.y),maxY:Math.max(t.start.y,t.end.y)}:{minX:Math.min(t.start.x,t.end.x),maxX:Math.max(t.start.x,t.end.x),minY:t.start.y-rce,maxY:t.start.y+rce};this.lastSearchBounds=n;const o=this.meshIndex.search(n.minX,n.minY,n.maxX,n.maxY);this.lastCandidateMeshNodes=o.map(r=\u003ethis.inputProblem.meshNodes[r]);let i=!1;for(const r of o){const s=this.inputProblem.meshNodes[r],a=Pg(s);if(e){if(!(Math.min(a.maxY,Math.max(t.start.y,t.end.y))-Math.max(a.minY,Math.min(t.start.y,t.end.y))\u003eCN))continue;if(t.expansionDirection.x===-1\u0026\u0026Math.abs(a.maxX-t.start.x)\u003c=CN){i=!0,this.lastMatchedMeshNode=s;break}if(t.expansionDirection.x===1\u0026\u0026Math.abs(a.minX-t.start.x)\u003c=CN){i=!0,this.lastMatchedMeshNode=s;break}continue}if(Math.min(a.maxX,Math.max(t.start.x,t.end.x))-Math.max(a.minX,Math.min(t.start.x,t.end.x))\u003eCN){if(t.expansionDirection.y===-1\u0026\u0026Math.abs(a.maxY-t.start.y)\u003c=CN){i=!0,this.lastMatchedMeshNode=s;break}if(t.expansionDirection.y===1\u0026\u0026Math.abs(a.minY-t.start.y)\u003c=CN){i=!0,this.lastMatchedMeshNode=s;break}}}i||this.disconnectedEdges.push(t)}getOutput(){return this.disconnectedEdges}visualize(){const t=this.disconnectedEdges,e=this.allEdges.length\u003e0?this.allEdges:[...t,...this.currentEdge?[this.currentEdge]:[]],n=this.currentEdge?$m(this.currentEdge,.88):\"rgba(40,40,40,0.4)\",o=this.inputProblem.meshNodes.map(u=\u003e({...Wf(u,{rectMargin:.01}),fill:u._containsObstacle?\"rgba(120,120,120,0.18)\":\"rgba(120,120,120,0.08)\",stroke:u._containsObstacle?\"rgba(120,120,120,0.42)\":\"rgba(120,120,120,0.24)\"})),i=this.lastSearchBounds\u0026\u0026this.currentEdge?[{center:(r=this.lastSearchBounds,{x:(r.minX+r.maxX)/2,y:(r.minY+r.maxY)/2}),width:this.lastSearchBounds.maxX-this.lastSearchBounds.minX,height:this.lastSearchBounds.maxY-this.lastSearchBounds.minY,fill:$m(this.currentEdge,.1),stroke:$m(this.currentEdge,.36),label:[gB(this.currentEdge,e),\"search band\"].join(\" \")}]:[];var r;const s=this.lastCandidateMeshNodes.map(u=\u003e({...Wf(u,{rectMargin:.018}),fill:u===this.lastMatchedMeshNode?\"rgba(0,180,90,0.24)\":this.currentEdge?$m(this.currentEdge,.16):\"rgba(80,120,160,0.16)\",stroke:u===this.lastMatchedMeshNode?\"rgba(0,150,80,0.88)\":n,label:[u===this.lastMatchedMeshNode?\"matched\":\"candidate\",u.capacityMeshNodeId,`z:${u.availableZ.join(\",\")}`].join(`\n`)})),a=this.inputProblem.unmarkedComponentObstacles.map(u=\u003e({center:u.center,width:u.width,height:u.height,fill:\"rgba(160,160,160,0.10)\",stroke:\"rgba(160,160,160,0.40)\",label:u.obstacleId??u.componentId??\"obstacle\"})),A=t.map(u=\u003e({points:[u.start,u.end],strokeColor:$m(u,.14),strokeWidth:.01,strokeDash:\"5 4\",label:[gB(u,e),xW(u),\"disconnected\"].join(\" \")})),c=[],l=[];if(this.currentEdge){const u=P7(this.currentEdge);c.push({points:[this.currentEdge.start,this.currentEdge.end],strokeColor:$m(this.currentEdge,1),strokeWidth:.06,label:[gB(this.currentEdge,e),xW(this.currentEdge),\"checking\"].join(\" \")},{points:[u,{x:u.x+.16*this.currentEdge.expansionDirection.x,y:u.y+.16*this.currentEdge.expansionDirection.y}],strokeColor:$m(this.currentEdge,.82),strokeWidth:.02,strokeDash:\"3 3\"}),l.push({...u,color:$m(this.currentEdge,1),label:gB(this.currentEdge,e)})}return{rects:[...o,...i,...s,...a],lines:[...A,...c],points:l}}},Nv=.001,Rv=.001,sce=1e-6,guo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;meshIndex;meshBounds;expandedNodes=[];_setup(){const t=Math.max(this.inputProblem.meshNodes.length,1);this.meshIndex=new X4(t);let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of this.inputProblem.meshNodes){const s=Pg(r);this.meshIndex.add(s.minX,s.minY,s.maxX,s.maxY),e=Math.min(e,s.minX),n=Math.max(n,s.maxX),o=Math.min(o,s.minY),i=Math.max(i,s.maxY)}this.meshIndex.finish(),this.meshBounds=this.inputProblem.meshNodes.length?{minX:e,maxX:n,minY:o,maxY:i}:{minX:0,maxX:0,minY:0,maxY:0}}getObstacleAvailableZ(t){return t.__zLayers??t.layers.map(e=\u003eKr(e,this.inputProblem.layerCount))}getSharedOverlapArea(t,e){if(!t.availableZ.some(s=\u003ee.availableZ.includes(s)))return 0;const n=Pg(t),o=Pg(e),i=Math.min(n.maxX,o.maxX)-Math.max(n.minX,o.minX),r=Math.min(n.maxY,o.maxY)-Math.max(n.minY,o.minY);return i\u003c=sce||r\u003c=sce?0:i*r}getNodeObstacleOverlapArea(t,e){const n=this.getObstacleAvailableZ(e);if(!t.availableZ.some(a=\u003en.includes(a)))return 0;const o=Pg(t),i=Pg(e),r=Math.min(o.maxX,i.maxX)-Math.max(o.minX,i.minX),s=Math.min(o.maxY,i.maxY)-Math.max(o.minY,i.minY);return r\u003c=sce||s\u003c=sce?0:r*s}getClosestMeshNode(t,e){const n=Math.abs(t.start.x-t.end.x)\u003c=Nv,o=this.getObstacleAvailableZ(t.obstacle),i=n?t.expansionDirection.x\u003c0?{minX:this.meshBounds.minX,maxX:t.start.x,minY:Math.min(t.start.y,t.end.y)-Rv,maxY:Math.max(t.start.y,t.end.y)+Rv}:{minX:t.start.x,maxX:this.meshBounds.maxX,minY:Math.min(t.start.y,t.end.y)-Rv,maxY:Math.max(t.start.y,t.end.y)+Rv}:t.expansionDirection.y\u003c0?{minX:Math.min(t.start.x,t.end.x)-Rv,maxX:Math.max(t.start.x,t.end.x)+Rv,minY:this.meshBounds.minY,maxY:t.start.y}:{minX:Math.min(t.start.x,t.end.x)-Rv,maxX:Math.max(t.start.x,t.end.x)+Rv,minY:t.start.y,maxY:this.meshBounds.maxY},r=this.meshIndex.search(i.minX,i.minY,i.maxX,i.maxY);let s=null,a=Number.POSITIVE_INFINITY;const A=[...r.map(c=\u003ethis.inputProblem.meshNodes[c]),...e];for(const c of A){if(c._containsObstacle||!c.availableZ.some(g=\u003eo.includes(g)))continue;const l=Pg(c);if((n?Math.min(Math.max(t.start.y,t.end.y),l.maxY)-Math.max(Math.min(t.start.y,t.end.y),l.minY):Math.min(Math.max(t.start.x,t.end.x),l.maxX)-Math.max(Math.min(t.start.x,t.end.x),l.minX))\u003c=Nv)continue;const u=n?t.expansionDirection.x\u003c0?t.start.x-l.maxX:l.minX-t.start.x:t.expansionDirection.y\u003c0?t.start.y-l.maxY:l.minY-t.start.y;u\u003cNv||u\u003e=a||(a=u,s=c)}return s}createExpandedNode(t,e,n){const o=Pg(e),i=this.getObstacleAvailableZ(t.obstacle);if(Math.abs(t.start.x-t.end.x)\u003c=Nv){const c=Math.max(Math.min(t.start.y,t.end.y),o.minY),l=Math.min(Math.max(t.start.y,t.end.y),o.maxY),u=t.expansionDirection.x\u003c0?o.maxX:t.start.x,g=t.expansionDirection.x\u003c0?t.start.x:o.minX;return g-u\u003c=Nv||l-c\u003c=Nv?null:{capacityMeshNodeId:`bga-gapfill-${n}-${t.obstacle.obstacleId??\"no-obstacle\"}-${e.capacityMeshNodeId}`,center:{x:(u+g)/2,y:(c+l)/2},width:g-u,height:l-c,layer:`z${i.join(\",\")}`,availableZ:i}}const r=Math.max(Math.min(t.start.x,t.end.x),o.minX),s=Math.min(Math.max(t.start.x,t.end.x),o.maxX),a=t.expansionDirection.y\u003c0?o.maxY:t.start.y,A=t.expansionDirection.y\u003c0?t.start.y:o.minY;return s-r\u003c=Nv||A-a\u003c=Nv?null:{capacityMeshNodeId:`bga-gapfill-${n}-${t.obstacle.obstacleId??\"no-obstacle\"}-${e.capacityMeshNodeId}`,center:{x:(r+s)/2,y:(a+A)/2},width:s-r,height:A-a,layer:`z${i.join(\",\")}`,availableZ:i}}overlapsExistingGeometry(t,e){for(const n of this.inputProblem.meshNodes)if(this.getSharedOverlapArea(t,n)\u003e0)return!0;for(const n of e)if(this.getSharedOverlapArea(t,n)\u003e0)return!0;for(const n of this.inputProblem.edgesWithObstacle)if(this.getNodeObstacleOverlapArea(t,n.obstacle)\u003e0)return!0;return!1}_step(){const t=[];for(const[e,n]of this.inputProblem.edgesWithObstacle.entries()){const o=this.getClosestMeshNode(n,t);if(!o)continue;const i=this.createExpandedNode(n,o,e);i\u0026\u0026(this.overlapsExistingGeometry(i,t)||t.push(i))}this.expandedNodes=t,this.solved=!0}getOutput(){return this.expandedNodes}visualize(){const t=this.inputProblem.edgesWithObstacle,e=ice(t);return{rects:[...this.inputProblem.meshNodes.map(n=\u003e({...Wf(n,{rectMargin:.01}),fill:n._containsObstacle?\"rgba(255,0,0,0.16)\":\"rgba(0,120,255,0.08)\",stroke:n._containsObstacle?\"rgba(255,0,0,0.35)\":\"rgba(0,120,255,0.28)\"})),...this.expandedNodes.map(n=\u003e{const o=DSe(n),i=o===null?null:t[o]??null;return{...Wf(n,{rectMargin:.012,zOffset:.01}),fill:i?$m(i,.24):\"rgba(0,160,100,0.24)\",stroke:i?$m(i,.72):\"rgba(0,160,100,0.68)\",label:[i?gB(i,e):\"E?\",\"expanded\",n.capacityMeshNodeId,`z:${n.availableZ.join(\",\")}`].join(`\n`)}})],lines:[...this.inputProblem.edgesWithObstacle.map(n=\u003e({points:[n.start,n.end],strokeColor:$m(n,.9),strokeWidth:.034,label:[gB(n,e),xW(n)].join(\" \")})),...this.inputProblem.edgesWithObstacle.map(n=\u003e{const o=P7(n);return{points:[o,{x:o.x+.16*n.expansionDirection.x,y:o.y+.16*n.expansionDirection.y}],strokeColor:$m(n,.7),strokeWidth:.016,strokeDash:\"3 3\"}})],points:this.inputProblem.edgesWithObstacle.map(n=\u003e({...P7(n),color:$m(n,.95),label:gB(n,e)}))}}},yN=.001,duo=class extends n7{constructor(t){super(t),this.inputProblem=t}inputProblem;detectEdgesNotConnectedToMesh;expandUnconnectedEdgesToMesh;pipelineDef=[eh(\"detectEdgesNotConnectedToMesh\",uuo,t=\u003e[t.inputProblem]),eh(\"expandUnconnectedEdgesToMesh\",guo,t=\u003e[{meshNodes:t.inputProblem.meshNodes,edgesWithObstacle:t.detectEdgesNotConnectedToMesh.getOutput(),layerCount:t.inputProblem.layerCount}])];getOutput(){return[...this.inputProblem.meshNodes,...this.expandUnconnectedEdgesToMesh.getOutput()]}getExpandedNodes(){return this.expandUnconnectedEdgesToMesh.getOutput()}getObstacleLayer(t){return`z${(t.obstacle.__zLayers??t.obstacle.layers.map(e=\u003eKr(e,this.inputProblem.layerCount))).join(\",\")}`}getObstacleRects(){return this.inputProblem.unmarkedComponentObstacles.map(t=\u003e{const e=t.__zLayers??t.layers.map(n=\u003eKr(n,this.inputProblem.layerCount));return{center:t.center,width:t.width,height:t.height,fill:\"rgba(150,150,150,0.08)\",stroke:\"rgba(90,90,90,0.42)\",label:t.obstacleId??t.componentId??\"bga obstacle\",layer:`z${e.join(\",\")}`}})}getBaseMeshRects(){return this.inputProblem.meshNodes.map(t=\u003e({...Wf(t,{rectMargin:.025,zOffset:.01}),fill:t._containsObstacle?\"rgba(210,60,60,0.14)\":\"rgba(80,120,160,0.08)\",stroke:t._containsObstacle?\"rgba(190,40,40,0.42)\":\"rgba(80,120,160,0.28)\",label:`mesh ${t.capacityMeshNodeId}\nz:${t.availableZ.join(\",\")}`}))}initialVisualize(){const t=NSe(this.inputProblem.unmarkedComponentObstacles),e=ice(t),n=[...t.map(o=\u003e({points:[o.start,o.end],strokeColor:$m(o,.72),strokeWidth:.018,strokeDash:\"0.05 0.035\",layer:this.getObstacleLayer(o),label:[gB(o,e),xW(o)].join(\" \")})),...t.map(o=\u003e{const i=P7(o);return{points:[i,{x:i.x+.18*o.expansionDirection.x,y:i.y+.18*o.expansionDirection.y}],strokeColor:$m(o,.64),strokeWidth:.012,strokeDash:\"0.035 0.025\",layer:this.getObstacleLayer(o)}})];return{title:\"BGA GapFill: candidate obstacle edges\",rects:[...this.getBaseMeshRects(),...this.getObstacleRects()],lines:n}}finalVisualize(){const t=this.getStageOutput(\"detectEdgesNotConnectedToMesh\")??[],e=this.getStageOutput(\"expandUnconnectedEdgesToMesh\")??[],n=ice(NSe(this.inputProblem.unmarkedComponentObstacles)),o=new Map;for(const A of e){const c=DSe(A);c!==null\u0026\u0026o.set(c,A)}const i=e.map(A=\u003e{const c=DSe(A),l=c===null?null:t[c]??null,u=l?(({expandedNode:d,edge:p,meshNodes:m})=\u003e{const _=Pg(d),f=Math.abs(p.start.x-p.end.x)\u003c=yN;return m.filter(I=\u003e{if(I._containsObstacle||!d.availableZ.some(y=\u003eI.availableZ.includes(y)))return!1;const C=Pg(I);return f?!(Math.min(_.maxY,C.maxY)-Math.max(_.minY,C.minY)\u003c=yN)\u0026\u0026(p.expansionDirection.x\u003c0?Math.abs(C.maxX-_.minX)\u003c=yN:Math.abs(C.minX-_.maxX)\u003c=yN):!(Math.min(_.maxX,C.maxX)-Math.max(_.minX,C.minX)\u003c=yN)\u0026\u0026(p.expansionDirection.y\u003c0?Math.abs(C.maxY-_.minY)\u003c=yN:Math.abs(C.minY-_.maxY)\u003c=yN)}).map(I=\u003eI.capacityMeshNodeId)})({expandedNode:A,edge:l,meshNodes:this.inputProblem.meshNodes}):[],g=l?gB(l,n):\"E?\",h=l===null?\"rgba(0,160,100,0.72)\":$m(l,.72);return{...Wf(A,{rectMargin:.012,zOffset:.01}),fill:l===null?\"rgba(0,160,100,0.24)\":$m(l,.16),stroke:h,label:[`${g} gap fill`,u.length\u003e0?`to ${u.join(\",\")}`:\"target mesh not adjacent\",`z:${A.availableZ.join(\",\")}`].join(`\n`)}}),r=t.map((A,c)=\u003e{const l=o.get(c);return{points:[A.start,A.end],strokeColor:l?$m(A,.68):\"rgba(80,80,80,0.14)\",strokeWidth:l?.026:.008,...l?{}:{strokeDash:\"5 4\"},layer:this.getObstacleLayer(A),label:[[gB(A,n),xW(A)].join(\" \"),l?\"filled\":\"no fill created\"].join(`\n`)}}),s=t.flatMap((A,c)=\u003e{const l=P7(A),u=o.get(c);return u?[{points:[l,u.center],strokeColor:$m(A,.42),strokeWidth:.012,strokeDash:\"0.035 0.025\",layer:this.getObstacleLayer(A)}]:[]}),a=t.flatMap((A,c)=\u003eo.has(c)?[{...P7(A),color:$m(A,.82),label:gB(A,n),layer:this.getObstacleLayer(A)}]:[]);return{title:\"BGA GapFill: disconnected edges and created mesh\",rects:[...this.getBaseMeshRects(),...this.getObstacleRects(),...i],lines:[...r,...s],points:a}}};function w9t(t,e){const n=[];for(let o=0;o\u003ct.length;o++){const i=t[o];n.push(i);const r=t[o+1];if(r===void 0)continue;const s=Math.round((r-i)/e);if(!(s\u003c=1))for(let a=1;a\u003cs;a++){const A=a/s;n.push(Number((i+(r-i)*A).toFixed(6)))}}return n}var dH=.001;function P9t(t){const e=[];for(let r=1;r\u003ct.length;r++){const s=t[r]-t[r-1];s\u003edH\u0026\u0026e.push(s)}if(e.length===0)return null;const n=Math.min(...e),o=e.filter(r=\u003er\u003c=1.5*n).sort((r,s)=\u003er-s),i=Math.floor(o.length/2);return o.length%2==0?(o[i-1]+o[i])/2:o[i]}function M9t(t){return[...new Set(t)].sort((e,n)=\u003ee-n)}function ace(t){return Number(t.toFixed(6))}var huo=class f5n{static fromObstacles(e){if(e.length===0)return null;const n=M9t(e.map(s=\u003es.center.x)),o=M9t(e.map(s=\u003es.center.y)),i=P9t(n),r=P9t(o);return i===null||r===null?null:new f5n({obstacles:e,xCoordinates:w9t(n,i),yCoordinates:w9t(o,r),pitchX:i,pitchY:r})}xCoordinates;yCoordinates;pitchX;pitchY;originX;originY;rowCount;colCount;padWidth;padHeight;slots=new Map;constructor(e){this.xCoordinates=e.xCoordinates,this.yCoordinates=e.yCoordinates,this.pitchX=e.pitchX,this.pitchY=e.pitchY,this.originX=this.xCoordinates[0],this.originY=this.yCoordinates[0],this.colCount=this.xCoordinates.length,this.rowCount=this.yCoordinates.length,this.padWidth=e.obstacles[0].width,this.padHeight=e.obstacles[0].height;for(const n of e.obstacles){const o=this.getSlotForObstacle(n);o\u0026\u0026this.slots.set(this.getSlotKey(o.row,o.col),{...o,obstacle:n})}}getSlotKey(e,n){return`${e}:${n}`}getAxisIndex(e,n){let o=-1,i=Number.POSITIVE_INFINITY;for(let r=0;r\u003ce.length;r++){const s=Math.abs(e[r]-n);s\u003ci\u0026\u0026(i=s,o=r)}return i\u003c=dH?o:null}getAxisCoordinate(e,n){return e[n]}hasPadAt(e,n){return this.slots.has(this.getSlotKey(e,n))}getSlotForObstacle(e){const n=this.getAxisIndex(this.yCoordinates,e.center.y),o=this.getAxisIndex(this.xCoordinates,e.center.x);return n===null||o===null||n\u003c0||n\u003e=this.rowCount||o\u003c0||o\u003e=this.colCount?null:{row:n,col:o}}getSlotCenter(e,n){return{x:this.getAxisCoordinate(this.xCoordinates,n),y:this.getAxisCoordinate(this.yCoordinates,e)}}getHorizontalGap(e,n){const o=this.getSlotCenter(e,n),i=this.getSlotCenter(e,n+1),r=Math.abs(i.x-o.x);return{orientation:\"horizontal\",row:e,col:n,center:{x:ace((o.x+i.x)/2),y:o.y},width:r-this.padWidth,height:this.padHeight,isBetweenTwoPads:this.hasPadAt(e,n)\u0026\u0026this.hasPadAt(e,n+1)}}getVerticalGap(e,n){const o=this.getSlotCenter(e,n),i=this.getSlotCenter(e+1,n),r=Math.abs(i.y-o.y);return{orientation:\"vertical\",row:e,col:n,center:{x:o.x,y:ace((o.y+i.y)/2)},width:this.padWidth,height:r-this.padHeight,isBetweenTwoPads:this.hasPadAt(e,n)\u0026\u0026this.hasPadAt(e+1,n)}}getDiagonalGap(e,n){const o=this.getSlotCenter(e,n),i=this.getSlotCenter(e+1,n+1),r=Math.abs(i.x-o.x),s=Math.abs(i.y-o.y);return{orientation:\"diagonal\",row:e,col:n,center:{x:ace((o.x+i.x)/2),y:ace((o.y+i.y)/2)},width:r-this.padWidth,height:s-this.padHeight,isBetweenTwoPads:this.hasPadAt(e,n)\u0026\u0026this.hasPadAt(e+1,n+1)}}getDiagonalGaps(){const e=[];for(let n=0;n\u003cthis.rowCount-1;n++)for(let o=0;o\u003cthis.colCount-1;o++)e.push(this.getDiagonalGap(n,o));return e.filter(n=\u003en.width\u003edH\u0026\u0026n.height\u003edH)}getAxisGaps(){const e=[];for(let n=0;n\u003cthis.rowCount;n++)for(let o=0;o\u003cthis.colCount-1;o++)e.push(this.getHorizontalGap(n,o));for(let n=0;n\u003cthis.rowCount-1;n++)for(let o=0;o\u003cthis.colCount;o++)e.push(this.getVerticalGap(n,o));return e.filter(n=\u003en.width\u003edH\u0026\u0026n.height\u003edH)}getMissingSlots(){const e=[];for(let n=0;n\u003cthis.rowCount;n++)for(let o=0;o\u003cthis.colCount;o++)this.hasPadAt(n,o)||e.push({row:n,col:o,center:this.getSlotCenter(n,o),width:this.padWidth,height:this.padHeight});return e}};function puo(t){if([t.point.pointId,t.point.pcb_port_id].filter(o=\u003etypeof o==\"string\").some(o=\u003et.obstacle.connectedTo.includes(o)))return!0;if(t.obstacle.connectedTo.length===0||o7(t.point,t.obstacle)\u003e.001)return!1;const e=RD(t.point).map(o=\u003eKr(o,t.layerCount)),n=t.obstacle.layers.map(o=\u003eKr(o,t.layerCount));return e.some(o=\u003en.includes(o))}function D9t(t){return t.obstacleId??[t.componentId??\"no-component\",t.center.x,t.center.y,t.width,t.height,t.layers.join(\",\")].join(\":\")}function N9t({componentId:t,orientationKey:e,row:n,col:o,center:i,width:r,height:s}){return[\"cmn\",e,t,n,o,i.x,i.y,r,s].join(\"_\")}function R9t(t){const{componentId:e,bgaGap:n,freeLayers:o,multiLayerThreshold:i}=t,r=n.width\u003ei\u0026\u0026n.height\u003ei;let s=\"d\";n.orientation===\"horizontal\"\u0026\u0026(s=\"h\"),n.orientation===\"vertical\"\u0026\u0026(s=\"v\");const a=N9t({componentId:e,orientationKey:s,row:n.row,col:n.col,center:n.center,width:n.width,height:n.height});return n.orientation===\"diagonal\"\u0026\u0026r||!n.isBetweenTwoPads\u0026\u0026r?[{center:n.center,width:n.width,height:n.height,availableZ:[...o],capacityMeshNodeId:`${a}_all`,layer:\"\"}]:o.map(A=\u003e({center:n.center,width:n.width,height:n.height,availableZ:[A],capacityMeshNodeId:`${a}_${A}`,layer:\"\"}))}function muo(t){const{componentId:e,obstacle:n,freeLayers:o,layerCount:i}=t,r=n.layers.map(A=\u003eKr(A,i)),s=o.filter(A=\u003e!r.includes(A)),a=D9t(n);return s.map(A=\u003e({capacityMeshNodeId:`free-${e}-${a}-${A}`,center:n.center,width:n.width,height:n.height,layer:`z${A}`,availableZ:[A]}))}function T9t(t,e,n){const o=e.layers.map(s=\u003eKr(s,n.layerCount)),i=D9t(e),r=(function(s){for(const a of s.srj.connections)for(const A of a.pointsToConnect)if(puo({point:A,obstacle:s.obstacle,layerCount:s.srj.layerCount}))return a.__rootConnectionNames?.[0]??a.name})({obstacle:e,srj:n});return{capacityMeshNodeId:`obstacle-${t}-${i}-${o.join(\",\")}-${e.center.x}-${e.center.y}`,_containsObstacle:!0,...r?{_containsTarget:!0,_targetConnectionName:r}:{},center:e.center,width:e.width,height:e.height,layer:`z${o.join(\",\")}`,availableZ:o}}var _uo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;componentObstacles=[];meshNodes=[];getConstructorParams(){return[this.inputProblem]}_step(){const{srj:t,componentBounds:e,componentId:n,markedComponentObstacles:o,unmarkedComponentObstacles:i}=this.inputProblem,r=t.obstacles.filter(g=\u003eg.isCopperPour===!0).filter(g=\u003eWF(Pg(g),e)).flatMap(g=\u003eg.layers.map(h=\u003eKr(h,t.layerCount))),s=Array.from({length:t.layerCount},(g,h)=\u003eh).filter(g=\u003e!r.includes(g));if(this.componentObstacles=o,o.length===0||s.length===0)return void(this.solved=!0);const a=huo.fromObstacles(o);if(!a)return void(this.solved=!0);const A=a.getAxisGaps(),c=a.getDiagonalGaps(),l=a.getMissingSlots(),u=1.2*(this.inputProblem.viaDiameter??om(t).padDiameter);this.meshNodes=[...A.flatMap(g=\u003eR9t({componentId:n,bgaGap:g,freeLayers:s,multiLayerThreshold:u})),...c.flatMap(g=\u003eR9t({componentId:n,bgaGap:g,freeLayers:s,multiLayerThreshold:u})),...l.flatMap(g=\u003e(function(h){const{componentId:d,missingBgaSlot:p,freeLayers:m,multiLayerThreshold:_}=h,f=N9t({componentId:d,orientationKey:\"missing\",row:p.row,col:p.col,center:p.center,width:p.width,height:p.height});return p.width\u003e_\u0026\u0026p.height\u003e_?[{center:p.center,width:p.width,height:p.height,availableZ:[...m],capacityMeshNodeId:`${f}_all`,layer:\"\"}]:m.map(I=\u003e({center:p.center,width:p.width,height:p.height,availableZ:[I],capacityMeshNodeId:`${f}_${I}`,layer:\"\"}))})({componentId:n,missingBgaSlot:g,freeLayers:s,multiLayerThreshold:u})),...o.flatMap(g=\u003e[...muo({componentId:n,obstacle:g,freeLayers:s,layerCount:t.layerCount}),T9t(n,g,t)]),...i.flatMap(g=\u003e[T9t(n,g,t)])],this.meshNodes=(function(g){const h=new Map;return g.map(d=\u003e{const p=h.get(d.capacityMeshNodeId)??0;return h.set(d.capacityMeshNodeId,p+1),p===0?d:{...d,capacityMeshNodeId:`${d.capacityMeshNodeId}__dup${p}`}})})(this.meshNodes),this.solved=!0}getOutput(){return this.meshNodes}visualize(){return{rects:[{center:{x:(this.inputProblem.componentBounds.minX+this.inputProblem.componentBounds.maxX)/2,y:(this.inputProblem.componentBounds.minY+this.inputProblem.componentBounds.maxY)/2},width:this.inputProblem.componentBounds.maxX-this.inputProblem.componentBounds.minX,height:this.inputProblem.componentBounds.maxY-this.inputProblem.componentBounds.minY,fill:\"rgba(0,0,0,0)\",stroke:\"rgba(30,30,30,0.65)\",label:`component ${this.inputProblem.componentId}`},...this.inputProblem.markedComponentObstacles.map(t=\u003e({center:t.center,width:t.width,height:t.height,fill:\"rgba(255,0,0,0.18)\",stroke:\"rgba(255,0,0,0.52)\",label:`pad ${t.obstacleId??\"obstacle\"}`})),...this.inputProblem.unmarkedComponentObstacles.map(t=\u003e({center:t.center,width:t.width,height:t.height,fill:\"rgba(255,140,0,0.14)\",stroke:\"rgba(255,140,0,0.42)\",label:`foreign ${t.obstacleId??\"obstacle\"}`})),...this.meshNodes.map(t=\u003e({...Wf(t,{rectMargin:.01}),fill:t._containsObstacle?\"rgba(255,0,0,0.14)\":t.capacityMeshNodeId.includes(\"missing\")?\"rgba(0,200,120,0.18)\":\"rgba(0,120,255,0.12)\",stroke:t._containsObstacle?\"rgba(255,0,0,0.36)\":t.capacityMeshNodeId.includes(\"missing\")?\"rgba(0,200,120,0.52)\":\"rgba(0,120,255,0.38)\"}))]}}};function RSe(t){return t.capacityMeshNodeId.startsWith(\"bga-gapfill-\")}function fuo(t){return JSON.stringify({availableZ:[...t.availableZ].sort((e,n)=\u003ee-n),_containsTarget:t._containsTarget??!1,_targetConnectionName:t._targetConnectionName??null,_depth:t._depth??null,_strawNode:t._strawNode??!1,_strawParentCapacityMeshNodeId:t._strawParentCapacityMeshNodeId??null,_qfpRegionType:t._qfpRegionType??null,_isNarrowQfpPadGap:t._isNarrowQfpPadGap??!1,_soicRegionType:t._soicRegionType??null,_offBoardConnectionId:t._offBoardConnectionId??null,_offboardNetName:t._offboardNetName??null,_isVirtualOffboard:t._isVirtualOffboard??!1,_containsObstacle:t._containsObstacle??!1})}function Iuo(t,e){const n=Pg(t);for(const o of e){if(!t.availableZ.some(r=\u003eo.availableZ.includes(r)))continue;const i=Pg(o);if(WF(n,i))return!0}return!1}function Cuo(t){const e=t[0];if(!e)throw new Error(\"createMergedNode requires at least one source node\");let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const s of t){const a=Pg(s);n=Math.min(n,a.minX),o=Math.max(o,a.maxX),i=Math.min(i,a.minY),r=Math.max(r,a.maxY)}return{...e,capacityMeshNodeId:`merge:${t.map(s=\u003es.capacityMeshNodeId).join(\":\")}`,center:{x:(n+o)/2,y:(i+r)/2},width:o-n,height:r-i}}function EW(t,e,n){return{center:t.center,width:t.width,height:t.height,fill:e,stroke:e,label:n}}var yuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;obstacleNodes=[];passthroughNodes=[];mergedNodes=[];pendingGroups=[];totalGroupCount=0;processedGroupCount=0;debugFilteredNodes=[];debugMergeEvents=[];currentGroupKey=null;currentRootNodeId=null;lastMergedNodeId=null;_setup(){this.obstacleNodes=this.inputProblem.meshNodes.filter(e=\u003ee._containsObstacle===!0),this.passthroughNodes=[],this.mergedNodes=[],this.pendingGroups=[],this.totalGroupCount=0,this.processedGroupCount=0,this.debugFilteredNodes=[],this.debugMergeEvents=[],this.currentGroupKey=null,this.currentRootNodeId=null,this.lastMergedNodeId=null;const t=new Map;for(const e of this.inputProblem.meshNodes){if(e._containsObstacle===!0){this.passthroughNodes.push(e),this.debugFilteredNodes.push({type:\"preserved-obstacle\",node:e,reason:\"contains-obstacle\"});continue}if(RSe(e)){this.passthroughNodes.push(e);continue}if(e.availableZ.length!==this.inputProblem.layerCount){this.passthroughNodes.push(e);continue}let n=!1;for(let r=0;r\u003cthis.inputProblem.layerCount;r+=1)if(!e.availableZ.includes(r)){n=!0;break}if(n){this.passthroughNodes.push(e);continue}if(Iuo(e,this.obstacleNodes)){this.passthroughNodes.push(e),this.debugFilteredNodes.push({type:\"preserved-overlap\",node:e,reason:\"overlaps-obstacle\"});continue}const o=fuo(e),i=t.get(o);i?i.push(e):t.set(o,[e])}for(const[e,n]of t.entries())n.length\u003c=1?this.passthroughNodes.push(...n):this.pendingGroups.push({groupKey:e,nodes:n});this.pendingGroups.sort((e,n)=\u003en.nodes.length-e.nodes.length),this.totalGroupCount=this.pendingGroups.length,this.updateStats(\"setup\")}_step(){const t=this.pendingGroups.shift();if(!t)return this.currentGroupKey=null,this.currentRootNodeId=null,this.solved=!0,void this.updateStats(\"done\");const e=t.nodes[0];this.currentGroupKey=t.groupKey,this.currentRootNodeId=e?e.capacityMeshNodeId:null;const n=(function(i){if(!i.nodes[0])return{outputNodes:[],mergeEvents:[]};let r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.POSITIVE_INFINITY;for(const d of i.nodes){r=Math.min(r,d.width),s=Math.min(s,d.height);const p=Pg(d);a=Math.min(a,p.minX),A=Math.min(A,p.minY)}const c=new Map,l=[];for(const d of i.nodes){const p=Pg(d),m=Math.round((p.minX-a)/r),_=Math.round((p.minY-A)/s),f=Math.max(1,Math.round(d.width/r)),I=Math.max(1,Math.round(d.height/s));for(let C=0;C\u003cI;C+=1)for(let y=0;y\u003cf;y+=1)c.set(`${m+y},${_+C}`,d);l.push({col:m,row:_})}l.sort((d,p)=\u003ed.row-p.row||d.col-p.col);const u=new Set,g=[],h=[];for(const d of l){const p=`${d.col},${d.row}`;if(u.has(p))continue;let m=0;for(;;){const B=`${d.col+m},${d.row}`;if(!c.has(B)||u.has(B))break;m+=1}let _=m,f=1,I=1,C=1;for(let B=1;;B+=1){const S=d.row+B-1;let Q=0;for(;Q\u003c_;){const w=`${d.col+Q},${S}`;if(!c.has(w)||u.has(w))break;Q+=1}if(Q===0)break;_=Math.min(_,Q);for(let w=_;w\u003e=1;w-=1){const M=w*r,k=B*s,R=Math.min(M,k);if((R\u003c=1e-6?Number.POSITIVE_INFINITY:Math.max(M,k)/R)\u003e4)continue;const F=w*B;F\u003eC\u0026\u0026(C=F,f=w,I=B);break}}const y=new Map;for(let B=0;B\u003cI;B+=1)for(let S=0;S\u003cf;S+=1){const Q=`${d.col+S},${d.row+B}`,w=c.get(Q);w\u0026\u0026(u.add(Q),y.set(w.capacityMeshNodeId,w))}const x=[...y.values()];if(x.length\u003c=1){const B=x[0];B\u0026\u0026g.push(B);continue}const E=Cuo(x);g.push(E),h.push({type:\"merge\",groupKey:i.groupKey,sourceNodes:x,mergedNode:E})}return{outputNodes:g,mergeEvents:h}})(t);this.mergedNodes.push(...n.outputNodes),this.processedGroupCount+=1,this.debugMergeEvents.push(...n.mergeEvents);const o=n.mergeEvents[n.mergeEvents.length-1];o\u0026\u0026(this.lastMergedNodeId=o.mergedNode.capacityMeshNodeId),this.updateStats(n.mergeEvents.length\u003e0?\"merged-group\":\"passthrough-group\")}computeProgress(){return this.totalGroupCount===0?1:this.processedGroupCount/this.totalGroupCount}updateStats(t){const e=new Set(this.debugMergeEvents.map(o=\u003eo.groupKey)),n={lastAction:t,totalGroupCount:this.totalGroupCount,processedGroupCount:this.processedGroupCount,pendingGroupCount:this.pendingGroups.length,mergedNodeCount:this.mergedNodes.length,passthroughNodeCount:this.passthroughNodes.length,gapFillNodeCount:this.passthroughNodes.filter(RSe).length,preservedObstacleNodeCount:this.debugFilteredNodes.filter(o=\u003eo.type===\"preserved-obstacle\").length,preservedOverlapNodeCount:this.debugFilteredNodes.filter(o=\u003eo.type===\"preserved-overlap\").length,mergeCount:this.debugMergeEvents.length,mergedGroupCount:e.size,currentGroupKey:this.currentGroupKey,currentRootNodeId:this.currentRootNodeId,lastMergedNodeId:this.lastMergedNodeId};this.stats=n}getConstructorParams(){return[this.inputProblem]}getOutput(){return[...this.mergedNodes,...this.passthroughNodes]}visualize(){const t=this.getOutput(),e=this.currentRootNodeId?t.find(o=\u003eo.capacityMeshNodeId===this.currentRootNodeId)??null:null,n=this.lastMergedNodeId?t.find(o=\u003eo.capacityMeshNodeId===this.lastMergedNodeId)??null:null;return{rects:[...this.debugFilteredNodes.map(o=\u003eEW(o.node,o.type===\"preserved-obstacle\"?\"rgba(255,64,64,0.35)\":\"rgba(255,160,64,0.35)\",o.reason)),...this.passthroughNodes.map(o=\u003eEW(o,o._containsObstacle?\"rgba(255,0,0,0.35)\":RSe(o)?\"rgba(0,120,255,0.18)\":\"rgba(160,160,160,0.12)\")),...this.mergedNodes.map(o=\u003eEW(o,\"rgba(120,120,120,0.14)\")),...e?[EW(e,\"rgba(255,215,0,0.35)\",\"active-group\")]:[],...n?[EW(n,\"rgba(0,200,120,0.28)\",\"merged\")]:[]]}}},xuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;obstacleQueue=[];obstacleQueueIndex=0;meshNodes=[];_setup(){this.obstacleQueue=this.inputProblem.obstacles,this.obstacleQueueIndex=0,this.meshNodes=[...this.inputProblem.meshNodes]}_step(){if(this.obstacleQueueIndex\u003e=this.obstacleQueue.length)return void(this.solved=!0);const t=this.obstacleQueue[this.obstacleQueueIndex],e=t.layers.map(o=\u003eKr(o,this.inputProblem.layerCount)),n=[];for(const o of this.meshNodes){if(o._containsObstacle){n.push(o);continue}if(!e.some(r=\u003eo.availableZ.includes(r))){n.push(o);continue}if(!WF(Pg(o),Pg(t))){n.push(o);continue}if(o.availableZ.length===1)continue;const i=o.availableZ.filter(r=\u003e!e.includes(r));for(const r of i){const s={...o,capacityMeshNodeId:`${o.capacityMeshNodeId}:z${r}`,availableZ:[r],layer:`z${r}`};n.push(s)}}this.meshNodes=n,this.obstacleQueueIndex+=1,this.stats={obstaclesProcessed:this.obstacleQueueIndex,obstacleCount:this.obstacleQueue.length,meshNodeCount:this.meshNodes.length}}computeProgress(){return this.obstacleQueue.length===0?1:this.obstacleQueueIndex/this.obstacleQueue.length}getConstructorParams(){return[this.inputProblem]}getOutput(){return this.meshNodes}visualize(){const t=this.obstacleQueueIndex\u003cthis.obstacleQueue.length?this.obstacleQueue[this.obstacleQueueIndex]??null:null,e=this.obstacleQueue.slice(0,this.obstacleQueueIndex),n=t?this.obstacleQueue.slice(this.obstacleQueueIndex+1):[];return{rects:[...e.map(o=\u003e({center:o.center,width:o.width,height:o.height,fill:\"rgba(160,160,160,0.10)\",stroke:\"rgba(160,160,160,0.35)\",label:`processed ${o.obstacleId??\"obstacle\"}`})),...t?[{center:t.center,width:t.width,height:t.height,fill:\"rgba(255,140,0,0.22)\",stroke:\"rgba(255,140,0,0.75)\",label:`active ${t.obstacleId??\"obstacle\"}`}]:[],...n.map(o=\u003e({center:o.center,width:o.width,height:o.height,fill:\"rgba(255,0,0,0.05)\",stroke:\"rgba(255,0,0,0.22)\",label:`pending ${o.obstacleId??\"obstacle\"}`})),...this.meshNodes.map(o=\u003e({...Wf(o,{rectMargin:.01}),fill:o._containsObstacle?\"rgba(255,0,0,0.18)\":\"rgba(0,120,255,0.12)\",stroke:o._containsObstacle?\"rgba(255,0,0,0.45)\":\"rgba(0,120,255,0.45)\"}))]}}};CW.register(class extends n7{constructor(t){super(t),this.inputProblem=t}inputProblem;static componentKind=\"bga\";initialTopologySolver;removeMeshNodeOverlappingWithUnmarkedObstacle;gapfillDueToNodeRemoval;mergeMeshNodes;markedComponentObstacles=[];unmarkedComponentObstacles=[];pipelineDef=[eh(\"initialTopologySolver\",_uo,t=\u003e[{srj:t.inputProblem.inputSrj,componentBounds:t.inputProblem.detectedComponent.bounds,componentId:t.inputProblem.detectedComponent.componentId,markedComponentObstacles:t.markedComponentObstacles,unmarkedComponentObstacles:t.unmarkedComponentObstacles,viaDiameter:t.inputProblem.viaDiameter}]),eh(\"removeMeshNodeOverlappingWithUnmarkedObstacle\",xuo,t=\u003e[{meshNodes:t.initialTopologySolver.getOutput(),obstacles:t.unmarkedComponentObstacles,layerCount:t.inputProblem.inputSrj.layerCount}]),eh(\"gapfillDueToNodeRemoval\",duo,t=\u003e[{meshNodes:t.removeMeshNodeOverlappingWithUnmarkedObstacle.getOutput(),unmarkedComponentObstacles:t.unmarkedComponentObstacles,layerCount:t.inputProblem.inputSrj.layerCount}]),eh(\"mergeMeshNodes\",yuo,t=\u003e[{meshNodes:t.gapfillDueToNodeRemoval.getOutput(),layerCount:t.inputProblem.inputSrj.layerCount}])];_setup(){const t=this.inputProblem.detectedComponent.bounds,e=this.inputProblem.detectedComponent.componentId,n=[],o=[];for(const i of this.inputProblem.inputSrj.obstacles){const r=Pg(i);WF(t,r)\u0026\u0026(i.componentId!==e?o.push(i):n.push(i))}this.markedComponentObstacles=n,this.unmarkedComponentObstacles=o}getConstructorParams(){return[this.inputProblem]}getOutput(){return{routingRegions:this.mergeMeshNodes?.getOutput()??this.gapfillDueToNodeRemoval?.getOutput()??this.removeMeshNodeOverlappingWithUnmarkedObstacle?.getOutput()??[]}}initialVisualize(){return{rects:[{center:{x:(this.inputProblem.detectedComponent.bounds.minX+this.inputProblem.detectedComponent.bounds.maxX)/2,y:(this.inputProblem.detectedComponent.bounds.minY+this.inputProblem.detectedComponent.bounds.maxY)/2},width:this.inputProblem.detectedComponent.bounds.maxX-this.inputProblem.detectedComponent.bounds.minX,height:this.inputProblem.detectedComponent.bounds.maxY-this.inputProblem.detectedComponent.bounds.minY,fill:\"rgba(0,0,0,0)\",stroke:\"rgba(30,30,30,0.65)\",label:`bga ${this.inputProblem.detectedComponent.componentId}`},...this.markedComponentObstacles.map(t=\u003e({center:t.center,width:t.width,height:t.height,fill:\"rgba(255,0,0,0.18)\",stroke:\"rgba(255,0,0,0.52)\",label:`pad ${t.obstacleId??\"obstacle\"}`})),...this.unmarkedComponentObstacles.map(t=\u003e({center:t.center,width:t.width,height:t.height,fill:\"rgba(255,140,0,0.14)\",stroke:\"rgba(255,140,0,0.42)\",label:`foreign ${t.obstacleId??\"obstacle\"}`}))]}}finalVisualize(){return{rects:this.getOutput().routingRegions.map(t=\u003e({...Wf(t,{rectMargin:.01}),fill:t._containsObstacle?\"rgba(255,0,0,0.16)\":\"rgba(0,120,255,0.12)\",stroke:t._containsObstacle?\"rgba(255,0,0,0.36)\":\"rgba(0,120,255,0.42)\"}))}}});var k9t=1e-6;function Ace(t,e){return t.__zLayers\u0026\u0026t.__zLayers.length\u003e0?Hz(t.__zLayers,e):Oz(t.layers,e)}function cce(t){const e=[...t].sort((r,s)=\u003er-s),n=[];for(let r=1;r\u003ce.length;r++){const s=e[r]-e[r-1];s\u003ek9t\u0026\u0026n.push(s)}const o=n.length\u003e0?Math.max(k9t,Math.min(...n)/4):.001,i=[];for(const r of e){const s=i[i.length-1];(s===void 0||Math.abs(r-s)\u003eo)\u0026\u0026i.push(r)}return i}function TSe(t){return Array.from({length:Math.max(0,t)},(e,n)=\u003en)}var F9t=1e-6;function L9t(t){return t.maxX-t.minX\u003eF9t\u0026\u0026t.maxY-t.minY\u003eF9t}function H9t(t){return(function(e){const n=Math.min(e.width,e.height),o=Math.max(e.width,e.height);return n\u003c=0?0:o/n})(t)\u003e=1.5}function Euo(t,e){const n=[{side:\"top\",distance:Math.abs(t.center.y-e.minY)},{side:\"right\",distance:Math.abs(e.maxX-t.center.x)},{side:\"bottom\",distance:Math.abs(e.maxY-t.center.y)},{side:\"left\",distance:Math.abs(t.center.x-e.minX)}];return n.sort((o,i)=\u003eo.distance-i.distance),n[0].side}function Buo(t,e){return t.map((n,o)=\u003e({key:`pad:${n.obstacleId??o}`,bounds:Is(n),regionType:\"pad\",obstacleZ:Ace(n,e)}))}function buo(t,e){return t.map((n,o)=\u003e({key:`thermal-pad:${n.obstacleId??o}`,bounds:Is(n),regionType:\"pad\",obstacleZ:Ace(n,e)}))}function O9t(t,e){return!!L9t(t)\u0026\u0026Math.min(t.maxX-t.minX,t.maxY-t.minY)\u003c=e}function lce({side:t,sideObstacles:e,bounds:n,innerBounds:o,narrowThreshold:i}){const r=[];for(let s=0;s\u003ce.length-1;s++){const a=Is(e[s]),A=Is(e[s+1]);let c;c=t===\"top\"?{minX:a.maxX,maxX:A.minX,minY:n.minY,maxY:o.minY}:t===\"right\"?{minX:o.maxX,maxX:n.maxX,minY:a.maxY,maxY:A.minY}:t===\"bottom\"?{minX:a.maxX,maxX:A.minX,minY:o.maxY,maxY:n.maxY}:{minX:n.minX,maxX:o.minX,minY:a.maxY,maxY:A.minY},r.push({key:`${t}-gap-${s}`,bounds:c,regionType:\"pad-gap\",isNarrowPadGap:O9t(c,i)})}return r}function uce({side:t,sideObstacles:e,thermalPadBounds:n,narrowThreshold:o}){const i=[];for(let r=0;r\u003ce.length;r++){const s=Is(e[r]),a=e[r-1]?Is(e[r-1]):null,A=e[r+1]?Is(e[r+1]):null;let c;c=t===\"top\"?{minX:a?(a.maxX+s.minX)/2:s.minX,maxX:A?(s.maxX+A.minX)/2:s.maxX,minY:s.maxY,maxY:n.minY}:t===\"right\"?{minX:n.maxX,maxX:s.minX,minY:a?(a.maxY+s.minY)/2:s.minY,maxY:A?(s.maxY+A.minY)/2:s.maxY}:t===\"bottom\"?{minX:a?(a.maxX+s.minX)/2:s.minX,maxX:A?(s.maxX+A.minX)/2:s.maxX,minY:n.maxY,maxY:s.minY}:{minX:s.maxX,maxX:n.minX,minY:a?(a.maxY+s.minY)/2:s.minY,maxY:A?(s.maxY+A.minY)/2:s.maxY},i.push({key:`inner-${t}-pad-${r}`,bounds:c,regionType:\"pad-gap\",isNarrowPadGap:O9t(c,o)})}return i}function Suo({bounds:t,innerBounds:e,sideGroups:n}){const o=n.top[0]?Is(n.top[0]):null,i=n.top.at(-1)?Is(n.top.at(-1)):null,r=n.right[0]?Is(n.right[0]):null,s=n.right.at(-1)?Is(n.right.at(-1)):null,a=n.bottom[0]?Is(n.bottom[0]):null,A=n.bottom.at(-1)?Is(n.bottom.at(-1)):null,c=n.left[0]?Is(n.left[0]):null,l=n.left.at(-1)?Is(n.left.at(-1)):null;return[{key:\"corner-nw-outer\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:t.minY,maxY:e.minY}},{key:\"corner-nw-top\",regionType:\"corner\",bounds:{minX:e.minX,maxX:o?.minX??e.minX,minY:t.minY,maxY:e.minY}},{key:\"corner-nw-left\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:e.minY,maxY:c?.minY??e.minY}},{key:\"corner-ne-outer\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:t.minY,maxY:e.minY}},{key:\"corner-ne-top\",regionType:\"corner\",bounds:{minX:i?.maxX??e.maxX,maxX:e.maxX,minY:t.minY,maxY:e.minY}},{key:\"corner-ne-right\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.minY,maxY:r?.minY??e.minY}},{key:\"corner-se-outer\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-se-right\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:s?.maxY??e.maxY,maxY:e.maxY}},{key:\"corner-se-bottom\",regionType:\"corner\",bounds:{minX:A?.maxX??e.maxX,maxX:e.maxX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-sw-outer\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-sw-bottom\",regionType:\"corner\",bounds:{minX:e.minX,maxX:a?.minX??e.minX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-sw-left\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:l?.maxY??e.maxY,maxY:e.maxY}}]}function Quo({innerBounds:t,thermalPadBounds:e,sideGroups:n}){const o=n.top[0]?Is(n.top[0]):null,i=n.top.at(-1)?Is(n.top.at(-1)):null,r=n.right[0]?Is(n.right[0]):null,s=n.right.at(-1)?Is(n.right.at(-1)):null,a=n.bottom[0]?Is(n.bottom[0]):null,A=n.bottom.at(-1)?Is(n.bottom.at(-1)):null,c=n.left[0]?Is(n.left[0]):null,l=n.left.at(-1)?Is(n.left.at(-1)):null;return[{key:\"inner-corner-nw-core\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:t.minY,maxY:e.minY}},{key:\"inner-corner-nw-top\",regionType:\"corner\",bounds:{minX:e.minX,maxX:o?.minX??e.minX,minY:t.minY,maxY:e.minY}},{key:\"inner-corner-nw-left\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:e.minY,maxY:c?.minY??e.minY}},{key:\"inner-corner-ne-core\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:t.minY,maxY:e.minY}},{key:\"inner-corner-ne-top\",regionType:\"corner\",bounds:{minX:i?.maxX??e.maxX,maxX:e.maxX,minY:t.minY,maxY:e.minY}},{key:\"inner-corner-ne-right\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.minY,maxY:r?.minY??e.minY}},{key:\"inner-corner-se-core\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.maxY,maxY:t.maxY}},{key:\"inner-corner-se-right\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:s?.maxY??e.maxY,maxY:e.maxY}},{key:\"inner-corner-se-bottom\",regionType:\"corner\",bounds:{minX:A?.maxX??e.maxX,maxX:e.maxX,minY:e.maxY,maxY:t.maxY}},{key:\"inner-corner-sw-core\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:e.maxY,maxY:t.maxY}},{key:\"inner-corner-sw-bottom\",regionType:\"corner\",bounds:{minX:e.minX,maxX:a?.minX??e.minX,minY:e.maxY,maxY:t.maxY}},{key:\"inner-corner-sw-left\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:l?.maxY??e.maxY,maxY:e.maxY}}]}CW.register(class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;static componentKind=\"qfp_thermalpad\";output=null;getConstructorParams(){return[this.inputProblem]}_step(){if(this.output)return void(this.solved=!0);const{layerCount:t,obstacles:e}=this.inputProblem.inputSrj,{bounds:n,componentId:o}=this.inputProblem.detectedComponent,i=TSe(t),r=e.filter(f=\u003ef.componentId===o),s=r.length\u003e0?r:e,{padRingObstacles:a,thermalPadObstacles:A}=(function(f){return{padRingObstacles:f.filter(H9t),thermalPadObstacles:f.filter(I=\u003e!H9t(I))}})(s),c=(function(f,I){const C={top:[],right:[],bottom:[],left:[]};for(const y of f)C[Euo(y,I)].push(y);return C.top.sort((y,x)=\u003ey.center.x-x.center.x),C.bottom.sort((y,x)=\u003ey.center.x-x.center.x),C.left.sort((y,x)=\u003ey.center.y-x.center.y),C.right.sort((y,x)=\u003ey.center.y-x.center.y),C})(a,n),l=(function({bounds:f,sideGroups:I}){return{minX:I.left.length\u003e0?Math.max(...I.left.map(C=\u003eIs(C).maxX)):f.minX,maxX:I.right.length\u003e0?Math.min(...I.right.map(C=\u003eIs(C).minX)):f.maxX,minY:I.top.length\u003e0?Math.max(...I.top.map(C=\u003eIs(C).maxY)):f.minY,maxY:I.bottom.length\u003e0?Math.min(...I.bottom.map(C=\u003eIs(C).minY)):f.maxY}})({bounds:n,sideGroups:c}),u=(function(f){return f.length===0?null:f.reduce((I,C)=\u003e{const y=Is(C);return{minX:Math.min(I.minX,y.minX),maxX:Math.max(I.maxX,y.maxX),minY:Math.min(I.minY,y.minY),maxY:Math.max(I.maxY,y.maxY)}},Is(f[0]))})(A);if(!u)return this.failed=!0,void(this.error=\"QfpThermalPadTopologyGeneratorSolver requires a thermal pad\");const g=o,h=this.inputProblem.viaDiameter??om(this.inputProblem.inputSrj).padDiameter,d=this.inputProblem.obstacleMargin??this.inputProblem.inputSrj.defaultObstacleMargin??.15,p=h+2*d,m=this.inputProblem.inputSrj.minTraceWidth+2*d,_=[...Buo(a,t),...buo(A,t),...lce({side:\"top\",sideObstacles:c.top,bounds:n,innerBounds:l,narrowThreshold:m}),...lce({side:\"right\",sideObstacles:c.right,bounds:n,innerBounds:l,narrowThreshold:m}),...lce({side:\"bottom\",sideObstacles:c.bottom,bounds:n,innerBounds:l,narrowThreshold:m}),...lce({side:\"left\",sideObstacles:c.left,bounds:n,innerBounds:l,narrowThreshold:m}),...uce({side:\"top\",sideObstacles:c.top,thermalPadBounds:u,narrowThreshold:m}),...uce({side:\"right\",sideObstacles:c.right,thermalPadBounds:u,narrowThreshold:m}),...uce({side:\"bottom\",sideObstacles:c.bottom,thermalPadBounds:u,narrowThreshold:m}),...uce({side:\"left\",sideObstacles:c.left,thermalPadBounds:u,narrowThreshold:m}),...Quo({innerBounds:l,thermalPadBounds:u,sideGroups:c}),...Suo({bounds:n,innerBounds:l,sideGroups:c})].flatMap(f=\u003e(function({nodeId:I,bounds:C,availableZ:y,multiLayerThreshold:x,regionType:E,isNarrowPadGap:B=!1,obstacleZ:S=[]}){if(!L9t(C))return[];const Q=(function(k){return{center:{x:(k.minX+k.maxX)/2,y:(k.minY+k.maxY)/2},width:k.maxX-k.minX,height:k.maxY-k.minY}})(C),w=Math.min(Q.width,Q.height)\u003ex,M=w?[{availableZ:y.filter(k=\u003e!S.includes(k)),containsObstacle:!1},{availableZ:y.filter(k=\u003eS.includes(k)),containsObstacle:!0}].filter(k=\u003ek.availableZ.length\u003e0):y.map(k=\u003e({availableZ:[k],containsObstacle:S.includes(k)}));return M.map(k=\u003e({capacityMeshNodeId:M.length===1?I:w?`${I}:${k.containsObstacle?\"obstacle\":\"free\"}`:`${I}:z${k.availableZ[0]}`,center:Q.center,width:Q.width,height:Q.height,layer:`z${k.availableZ.join(\",\")}`,availableZ:k.availableZ,_qfpRegionType:E,_isNarrowQfpPadGap:B,_containsObstacle:k.containsObstacle}))})({nodeId:`qfp_thermalpad:${g}:${f.key}`,bounds:f.bounds,availableZ:i,multiLayerThreshold:p,regionType:f.regionType,isNarrowPadGap:f.isNarrowPadGap,obstacleZ:f.obstacleZ}));this.output={routingRegions:_},this.stats={componentId:o,layerCount:t,viaDiameter:h,obstacleMargin:d,multiLayerThreshold:p,narrowPadGapThreshold:m,thermalPadCount:A.length,perimeterPadCount:a.length,innerCornerRectCount:_.filter(f=\u003ef.capacityMeshNodeId.includes(\":inner-corner-\")).length,narrowPadGapNodeCount:_.filter(f=\u003ef._isNarrowQfpPadGap).length,topPadCount:c.top.length,rightPadCount:c.right.length,bottomPadCount:c.bottom.length,leftPadCount:c.left.length,multiLayerNodeCount:_.filter(f=\u003ef.availableZ.length\u003e1).length,totalMeshNodeCount:_.length},this.solved=!0}getOutput(){if(!this.output)throw new Error(\"QfpThermalPadTopologyGeneratorSolver has not solved yet\");return this.output}});var G9t=1e-6;function Y9t(t){return t.maxX-t.minX\u003eG9t\u0026\u0026t.maxY-t.minY\u003eG9t}function vuo(t,e){const n=[{side:\"top\",distance:Math.abs(t.center.y-e.minY)},{side:\"right\",distance:Math.abs(e.maxX-t.center.x)},{side:\"bottom\",distance:Math.abs(e.maxY-t.center.y)},{side:\"left\",distance:Math.abs(t.center.x-e.minX)}];return n.sort((o,i)=\u003eo.distance-i.distance),n[0].side}function wuo(t,e){return t.map((n,o)=\u003e({key:`pad:${n.obstacleId??o}`,bounds:Is(n),regionType:\"pad\",obstacleZ:Ace(n,e),connectedTo:[...n.connectedTo]}))}function Puo(t,e){return!!Y9t(t)\u0026\u0026Math.min(t.maxX-t.minX,t.maxY-t.minY)\u003c=e}function gce({side:t,sideObstacles:e,bounds:n,centralBounds:o,narrowThreshold:i}){const r=[];for(let s=0;s\u003ce.length-1;s++){const a=Is(e[s]),A=Is(e[s+1]);let c;c=t===\"top\"?{minX:a.maxX,maxX:A.minX,minY:n.minY,maxY:o.minY}:t===\"right\"?{minX:o.maxX,maxX:n.maxX,minY:a.maxY,maxY:A.minY}:t===\"bottom\"?{minX:a.maxX,maxX:A.minX,minY:o.maxY,maxY:n.maxY}:{minX:n.minX,maxX:o.minX,minY:a.maxY,maxY:A.minY},r.push({key:`${t}-gap-${s}`,bounds:c,regionType:\"pad-gap\",isNarrowPadGap:Puo(c,i)})}return r}function Muo({bounds:t,centralBounds:e,sideGroups:n}){const o=n.top[0]?Is(n.top[0]):null,i=n.top.at(-1)?Is(n.top.at(-1)):null,r=n.right[0]?Is(n.right[0]):null,s=n.right.at(-1)?Is(n.right.at(-1)):null,a=n.bottom[0]?Is(n.bottom[0]):null,A=n.bottom.at(-1)?Is(n.bottom.at(-1)):null,c=n.left[0]?Is(n.left[0]):null,l=n.left.at(-1)?Is(n.left.at(-1)):null;return[{key:\"corner-nw-outer\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:t.minY,maxY:e.minY}},{key:\"corner-nw-top\",regionType:\"corner\",bounds:{minX:e.minX,maxX:o?.minX??e.minX,minY:t.minY,maxY:e.minY}},{key:\"corner-nw-left\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:e.minY,maxY:c?.minY??e.minY}},{key:\"corner-ne-outer\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:t.minY,maxY:e.minY}},{key:\"corner-ne-top\",regionType:\"corner\",bounds:{minX:i?.maxX??e.maxX,maxX:e.maxX,minY:t.minY,maxY:e.minY}},{key:\"corner-ne-right\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.minY,maxY:r?.minY??e.minY}},{key:\"corner-se-outer\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-se-right\",regionType:\"corner\",bounds:{minX:e.maxX,maxX:t.maxX,minY:s?.maxY??e.maxY,maxY:e.maxY}},{key:\"corner-se-bottom\",regionType:\"corner\",bounds:{minX:A?.maxX??e.maxX,maxX:e.maxX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-sw-outer\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-sw-bottom\",regionType:\"corner\",bounds:{minX:e.minX,maxX:a?.minX??e.minX,minY:e.maxY,maxY:t.maxY}},{key:\"corner-sw-left\",regionType:\"corner\",bounds:{minX:t.minX,maxX:e.minX,minY:l?.maxY??e.maxY,maxY:e.maxY}}]}CW.register(class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;static componentKind=\"qfp\";output=null;getConstructorParams(){return[this.inputProblem]}_step(){if(this.output)return void(this.solved=!0);const{layerCount:t,obstacles:e}=this.inputProblem.inputSrj,{bounds:n,componentId:o}=this.inputProblem.detectedComponent,i=TSe(t),r=e.filter(p=\u003ep.componentId===o),s=r.length\u003e0?r:e,a=(function(p,m){const _={top:[],right:[],bottom:[],left:[]};for(const f of p)_[vuo(f,m)].push(f);return _.top.sort((f,I)=\u003ef.center.x-I.center.x),_.bottom.sort((f,I)=\u003ef.center.x-I.center.x),_.left.sort((f,I)=\u003ef.center.y-I.center.y),_.right.sort((f,I)=\u003ef.center.y-I.center.y),_})(s,n),A=(function({bounds:p,sideGroups:m}){return{minX:m.left.length\u003e0?Math.max(...m.left.map(_=\u003eIs(_).maxX)):p.minX,maxX:m.right.length\u003e0?Math.min(...m.right.map(_=\u003eIs(_).minX)):p.maxX,minY:m.top.length\u003e0?Math.max(...m.top.map(_=\u003eIs(_).maxY)):p.minY,maxY:m.bottom.length\u003e0?Math.min(...m.bottom.map(_=\u003eIs(_).minY)):p.maxY}})({bounds:n,sideGroups:a}),c=o,l=this.inputProblem.viaDiameter??om(this.inputProblem.inputSrj).padDiameter,u=this.inputProblem.obstacleMargin??this.inputProblem.inputSrj.defaultObstacleMargin??.15,g=l+2*u,h=this.inputProblem.inputSrj.minTraceWidth+2*u,d=[{key:\"center\",bounds:A,regionType:\"center\"},...wuo(s,t),...gce({side:\"top\",sideObstacles:a.top,bounds:n,centralBounds:A,narrowThreshold:h}),...gce({side:\"right\",sideObstacles:a.right,bounds:n,centralBounds:A,narrowThreshold:h}),...gce({side:\"bottom\",sideObstacles:a.bottom,bounds:n,centralBounds:A,narrowThreshold:h}),...gce({side:\"left\",sideObstacles:a.left,bounds:n,centralBounds:A,narrowThreshold:h}),...Muo({bounds:n,centralBounds:A,sideGroups:a})].flatMap(p=\u003e(function({nodeId:m,bounds:_,availableZ:f,multiLayerThreshold:I,regionType:C,isNarrowPadGap:y=!1,obstacleZ:x=[],connectedTo:E}){if(!Y9t(_))return[];const B=(function(w){return{center:{x:(w.minX+w.maxX)/2,y:(w.minY+w.maxY)/2},width:w.maxX-w.minX,height:w.maxY-w.minY}})(_),S=Math.min(B.width,B.height)\u003eI,Q=S?[{availableZ:f.filter(w=\u003e!x.includes(w)),containsObstacle:!1},{availableZ:f.filter(w=\u003ex.includes(w)),containsObstacle:!0}].filter(w=\u003ew.availableZ.length\u003e0):f.map(w=\u003e({availableZ:[w],containsObstacle:x.includes(w)}));return Q.map(w=\u003e({capacityMeshNodeId:Q.length===1?m:S?`${m}:${w.containsObstacle?\"obstacle\":\"free\"}`:`${m}:z${w.availableZ[0]}`,center:B.center,width:B.width,height:B.height,layer:`z${w.availableZ.join(\",\")}`,availableZ:w.availableZ,_qfpRegionType:C,_isNarrowQfpPadGap:y,_containsObstacle:w.containsObstacle,_connectedTo:w.containsObstacle?E:void 0}))})({nodeId:`qfp:${c}:${p.key}`,bounds:p.bounds,availableZ:i,multiLayerThreshold:g,regionType:p.regionType,isNarrowPadGap:p.isNarrowPadGap,obstacleZ:p.obstacleZ,connectedTo:p.connectedTo}));this.output={routingRegions:d},this.stats={componentId:o,layerCount:t,viaDiameter:l,obstacleMargin:u,multiLayerThreshold:g,narrowPadGapThreshold:h,narrowPadGapNodeCount:d.filter(p=\u003ep._isNarrowQfpPadGap).length,topPadCount:a.top.length,rightPadCount:a.right.length,bottomPadCount:a.bottom.length,leftPadCount:a.left.length,multiLayerNodeCount:d.filter(p=\u003ep.availableZ.length\u003e1).length,totalMeshNodeCount:d.length},this.solved=!0}getOutput(){if(!this.output)throw new Error(\"QfpTopologyGeneratorSolver has not solved yet\");return this.output}});var U9t=1e-6;function Duo({nodeId:t,bounds:e,availableZ:n,multiLayerThreshold:o,regionType:i,obstacleZ:r=[],connectedTo:s}){if(!(function(l){return l.maxX-l.minX\u003eU9t\u0026\u0026l.maxY-l.minY\u003eU9t})(e))return[];const a=(function(l){return{center:{x:(l.minX+l.maxX)/2,y:(l.minY+l.maxY)/2},width:l.maxX-l.minX,height:l.maxY-l.minY}})(e),A=Math.min(a.width,a.height)\u003eo,c=A?[{availableZ:n.filter(l=\u003e!r.includes(l)),containsObstacle:!1},{availableZ:n.filter(l=\u003er.includes(l)),containsObstacle:!0}].filter(l=\u003el.availableZ.length\u003e0):n.map(l=\u003e({availableZ:[l],containsObstacle:r.includes(l)}));return c.map(l=\u003e({capacityMeshNodeId:c.length===1?t:A?`${t}:${l.containsObstacle?\"obstacle\":\"free\"}`:`${t}:z${l.availableZ[0]}`,center:a.center,width:a.width,height:a.height,layer:`z${l.availableZ.join(\",\")}`,availableZ:l.availableZ,_soicRegionType:i,_containsObstacle:l.containsObstacle,_connectedTo:l.containsObstacle?s:void 0}))}function K9t(t,e){let n=0,o=Number.POSITIVE_INFINITY;for(let i=0;i\u003ce.length;i++){const r=Math.abs(t-e[i]);r\u003co\u0026\u0026(n=i,o=r)}return n}function Nuo(t,e){return t.map((n,o)=\u003e({key:`pad:${n.obstacleId??o}`,bounds:Is(n),regionType:\"pad\",obstacleZ:Ace(n,e),connectedTo:[...n.connectedTo]}))}function kSe(t,e){if(t.componentId!==e.componentId)return!1;const{bounds:n}=e;return t.center.x\u003e=n.minX\u0026\u0026t.center.x\u003c=n.maxX\u0026\u0026t.center.y\u003e=n.minY\u0026\u0026t.center.y\u003c=n.maxY}function V9t({detectedComponent:t,inputSrj:e}){const n=e.obstacles.filter(a=\u003ekSe(a,t)),o=Array.from({length:e.layerCount},(a,A)=\u003eA),i=o.map(a=\u003eKh(a,e.layerCount)),r=Array.from(new Set(n.flatMap(a=\u003ea.connectedTo))),{bounds:s}=t;return{obstacleId:`${t.componentId}_component_bounds`,componentId:t.componentId,type:\"rect\",layers:i,__zLayers:o,center:{x:(s.minX+s.maxX)/2,y:(s.minY+s.maxY)/2},width:s.maxX-s.minX,height:s.maxY-s.minY,connectedTo:r}}function dce(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){const s=Is(r);e=Math.min(e,s.minX),n=Math.max(n,s.maxX),o=Math.min(o,s.minY),i=Math.max(i,s.maxY)}return{minX:e,maxX:n,minY:o,maxY:i}}function Ruo(t){const e=t.componentDetectionOutput??[],n=(function({detectedComponents:r,inputSrj:s}){return r.map(a=\u003e{const A=s.obstacles.filter(c=\u003ekSe(c,a));return{componentId:a.componentId,componentKind:a.componentKind,memberObstacleIds:A.map((c,l)=\u003ec.obstacleId??`${a.componentId}:member:${l}`),memberObstacles:A,replacementObstacle:V9t({detectedComponent:a,inputSrj:s})}})})({detectedComponents:e,inputSrj:t.inputSrj}),o=t.globalNoConnectionSrj??(e.length\u003e0?(function({detectedComponents:r,inputSrj:s}){return{...structuredClone(s),obstacles:[...s.obstacles.filter(a=\u003e!r.some(A=\u003ekSe(a,A))),...r.map(a=\u003eV9t({detectedComponent:a,inputSrj:s}))]}})({detectedComponents:e,inputSrj:t.inputSrj}):t.inputSrj)??t.brokenSrj?.componentsAsObstaclesSrj,i=t.components??n??t.brokenSrj?.components??[];if(!o)throw new Error(\"MultiGraphTopologyPlannerSolver requires globalNoConnectionSrj or detected components\");return{globalNoConnectionSrj:o,components:i}}function Tuo({rects:t,components:e}){return t\u0026\u0026e.length!==0?t.filter(n=\u003e!(function(o){return typeof o.label==\"string\"\u0026\u0026o.label.startsWith(\"node \")})(n)||!e.some(o=\u003e(function({rect:i,obstacle:r}){if(!i.center||i.width===void 0||i.height===void 0)return!1;const s=1e-9,a=Pg({center:i.center,width:i.width,height:i.height}),A=Pg({center:r.center,width:r.width,height:r.height});return z9t({bounds:a,outerBounds:A,epsilon:s})})({rect:n,obstacle:o.replacementObstacle}))):t}function z9t({bounds:t,outerBounds:e,epsilon:n}){return t.minX\u003e=e.minX-n\u0026\u0026t.maxX\u003c=e.maxX+n\u0026\u0026t.minY\u003e=e.minY-n\u0026\u0026t.maxY\u003c=e.maxY+n}CW.register(class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;static componentKind=\"soic\";output=null;getConstructorParams(){return[this.inputProblem]}_step(){if(this.output)return void(this.solved=!0);const{layerCount:t,obstacles:e}=this.inputProblem.inputSrj,{bounds:n,componentId:o}=this.inputProblem.detectedComponent,i=TSe(t),r=e.filter(_=\u003e_.componentId===o),s=r.length\u003e0?r:e,a=(function(_){const f=cce(_.map(I=\u003eI.center.y)).length;return cce(_.map(I=\u003eI.center.x)).length===2\u0026\u0026f!==2?\"vertical-columns\":\"horizontal-rows\"})(s),A=(function({obstacles:_,orientation:f}){const I={left:[],right:[],top:[],bottom:[]};if(f===\"vertical-columns\"){const y=cce(_.map(x=\u003ex.center.x));for(const x of _)I[K9t(x.center.x,y)===0?\"left\":\"right\"].push(x);return I.left.sort((x,E)=\u003ex.center.y-E.center.y),I.right.sort((x,E)=\u003ex.center.y-E.center.y),I}const C=cce(_.map(y=\u003ey.center.y));for(const y of _)I[K9t(y.center.y,C)===0?\"top\":\"bottom\"].push(y);return I.top.sort((y,x)=\u003ey.center.x-x.center.x),I.bottom.sort((y,x)=\u003ey.center.x-x.center.x),I})({obstacles:s,orientation:a}),c=(function({bounds:_,orientation:f,sideGroups:I}){return f===\"vertical-columns\"?{minX:Math.max(...I.left.map(C=\u003eIs(C).maxX)),maxX:Math.min(...I.right.map(C=\u003eIs(C).minX)),minY:_.minY,maxY:_.maxY}:{minX:_.minX,maxX:_.maxX,minY:Math.max(...I.top.map(C=\u003eIs(C).maxY)),maxY:Math.min(...I.bottom.map(C=\u003eIs(C).minY))}})({bounds:n,orientation:a,sideGroups:A}),l=o,u=this.inputProblem.viaDiameter??om(this.inputProblem.inputSrj).padDiameter,g=this.inputProblem.obstacleMargin??this.inputProblem.inputSrj.defaultObstacleMargin??.15,h=2*(u+g),d=a===\"vertical-columns\"?[\"left\",\"right\"]:[\"top\",\"bottom\"],p=[{key:\"center\",bounds:c,regionType:\"center\"},...Nuo(s,t),...d.flatMap(_=\u003e(function({side:f,sideObstacles:I,bounds:C,centralBounds:y}){const x=[];for(let E=0;E\u003cI.length-1;E++){const B=Is(I[E]),S=Is(I[E+1]);let Q;Q=f===\"left\"?{minX:C.minX,maxX:y.minX,minY:B.maxY,maxY:S.minY}:f===\"right\"?{minX:y.maxX,maxX:C.maxX,minY:B.maxY,maxY:S.minY}:f===\"top\"?{minX:B.maxX,maxX:S.minX,minY:C.minY,maxY:y.minY}:{minX:B.maxX,maxX:S.minX,minY:y.maxY,maxY:C.maxY},x.push({key:`${f}-gap-${E}`,bounds:Q,regionType:\"pad-gap\"})}return x})({side:_,sideObstacles:A[_],bounds:n,centralBounds:c}))],m=p.flatMap(_=\u003eDuo({nodeId:`soic:${l}:${_.key}`,bounds:_.bounds,availableZ:i,multiLayerThreshold:h,regionType:_.regionType,obstacleZ:_.obstacleZ,connectedTo:_.connectedTo}));this.output={routingRegions:m},this.stats={componentId:o,layerCount:t,orientation:a,viaDiameter:u,obstacleMargin:g,multiLayerThreshold:h,firstSidePadCount:A[d[0]].length,secondSidePadCount:A[d[1]].length,multiLayerNodeCount:m.filter(_=\u003e_.availableZ.length\u003e1).length,totalMeshNodeCount:m.length},this.solved=!0}getOutput(){if(!this.output)throw new Error(\"SoicTopologyGeneratorSolver has not solved yet\");return this.output}});var kuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;activeSubSolver=null;currentIndex=0;componentMeshNodes=[];getConstructorParams(){return[this.inputProblem]}_step(){if(this.activeSubSolver)return this.activeSubSolver.step(),this.activeSubSolver.failed?(this.error=this.activeSubSolver.error,this.failed=!0,void(this.activeSubSolver=null)):this.activeSubSolver.solved?(this.componentMeshNodes.push(this.activeSubSolver.getOutput().routingRegions),this.currentIndex+=1,void(this.activeSubSolver=null)):void 0;if(this.currentIndex\u003e=this.inputProblem.componentSrjs.length)return void(this.solved=!0);const t=this.inputProblem.componentKinds[this.currentIndex],e=this.inputProblem.componentSrjs[this.currentIndex],n={inputSrj:e,detectedComponent:{componentId:this.inputProblem.componentIds[this.currentIndex],componentKind:t,bounds:{__type:\"rect\",...e.bounds}},viaDiameter:this.inputProblem.viaDiameter,obstacleMargin:this.inputProblem.obstacleMargin};this.activeSubSolver=CW.create(n)}getOutput(){return{componentMeshNodes:this.componentMeshNodes}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.inputProblem.componentSrjs[this.currentIndex]??null,e=this.componentMeshNodes.flatMap(n=\u003en);return{rects:[...t?[{center:{x:(t.bounds.minX+t.bounds.maxX)/2,y:(t.bounds.minY+t.bounds.maxY)/2},width:t.bounds.maxX-t.bounds.minX,height:t.bounds.maxY-t.bounds.minY,fill:\"rgba(0,0,0,0)\",stroke:\"rgba(255,140,0,0.72)\",label:`active component ${this.inputProblem.componentIds[this.currentIndex]??this.currentIndex}`},...t.obstacles.map(n=\u003e({center:n.center,width:n.width,height:n.height,fill:\"rgba(255,140,0,0.10)\",stroke:\"rgba(255,140,0,0.30)\",label:n.obstacleId??n.componentId??\"obstacle\"}))]:[],...e.map(n=\u003e({...Wf(n,{rectMargin:.01}),fill:n._containsObstacle?\"rgba(255,0,0,0.14)\":\"rgba(0,120,255,0.12)\",stroke:n._containsObstacle?\"rgba(255,0,0,0.34)\":\"rgba(0,120,255,0.38)\"}))]}}},xN=.001;function hce(t){const e=[...t].sort((o,i)=\u003eo-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)\u003exN)\u0026\u0026n.push(o)}return n}function J9t(t){const e=Math.min(...t),n=Math.max(...t);return!(e\u003c=0)\u0026\u0026n/e\u003c=1.01}function Fuo(t){if(!(function(s){return J9t(s.map(a=\u003ea.width))\u0026\u0026J9t(s.map(a=\u003ea.height))})(t)||!(function(s){return s.every(a=\u003e{const A=Math.min(a.width,a.height),c=Math.max(a.width,a.height);return!(A\u003c=0)\u0026\u0026c/A\u003c=1.5})})(t))return!1;const e=hce(t.map(s=\u003es.center.y)),n=hce(t.map(s=\u003es.center.x)),o=e.length,i=n.length;if(o\u003c3||i\u003c3)return!1;const r=o*i;return!((r\u003e0?t.length/r:0)\u003c.5)\u0026\u0026!!(function(s,a,A){if(a.length\u003c3||A.length\u003c3)return!1;const c=new Set(a.slice(1,-1)),l=new Set(A.slice(1,-1));let u=0;for(const g of s)c.has(g.center.y)\u0026\u0026l.has(g.center.x)\u0026\u0026(u+=1);return u\u003e=1})(t,e,n)}function Luo(t){return[Math.round(t.width/xN),Math.round(t.height/xN),t.layers.join(\",\")].join(\":\")}function W9t(t){if(t.length\u003c3)return!1;const e=[...t].sort((o,i)=\u003eo-i),n=e[1]-e[0];return!(n\u003c=xN)\u0026\u0026e.every((o,i)=\u003ei===0||Math.abs(o-e[i-1]-n)\u003c=xN)}function Huo(t){const e=(function(o){const i=new Map;for(const r of o){const s=Math.round(r.center.y/xN),a=Math.round(r.center.x/xN),A=i.get(s)??{y:r.center.y,obstaclesByX:new Map};A.obstaclesByX.set(a,r),i.set(s,A)}return[...i.values()]})(t);let n=[];for(const o of e){const i=[...o.obstaclesByX.keys()];if(!W9t([...o.obstaclesByX.values()].map(a=\u003ea.center.x)))continue;const r=e.filter(a=\u003ei.every(A=\u003ea.obstaclesByX.has(A)));if(!W9t(r.map(a=\u003ea.y)))continue;const s=r.flatMap(a=\u003ei.map(A=\u003ea.obstaclesByX.get(A)));s.length\u003en.length\u0026\u0026(n=s)}return n}function j9t(t){if(Fuo(t))return t;const e=Map.groupBy(t,Luo);let n=[];for(const o of e.values()){const i=Huo(o);i.length\u003en.length\u0026\u0026(n=i)}return n.length\u003e0?n:null}function $9t(t){const e=Math.min(t.width,t.height),n=Math.max(t.width,t.height);return e\u003e0\u0026\u0026n/e\u003e=1.5}function q9t({perimeterPadObstacles:t,thermalPadObstacles:e}){if(e.length===0)return!0;if(e.length\u003e4)return!1;const n=dce(t),o=n.maxX-n.minX,i=n.maxY-n.minY,r=n.minX+.2*o,s=n.maxX-.2*o,a=n.minY+.2*i,A=n.maxY-.2*i,c=Math.min(...t.map(l=\u003eMath.min(l.width,l.height)));return e.every(l=\u003e{const u=Math.min(l.width,l.height);return l.center.x\u003e=r\u0026\u0026l.center.x\u003c=s\u0026\u0026l.center.y\u003e=a\u0026\u0026l.center.y\u003c=A\u0026\u0026u\u003ec})}function X9t(t){if(t.length\u003c12||t.length\u003e32)return!1;const{counts:e,maxNearestSideRatio:n}=(function(o){const i=dce(o),r=i.maxX-i.minX,s=i.maxY-i.minY,a={top:0,right:0,bottom:0,left:0};if(r\u003c=0||s\u003c=0)return{counts:a,maxNearestSideRatio:1};let A=0;for(const c of o){const l=c.width\u003ec.height,u=[{side:\"top\",distance:Math.abs(c.center.y-i.minY),axisSpan:s,orientationMatches:!l},{side:\"right\",distance:Math.abs(i.maxX-c.center.x),axisSpan:r,orientationMatches:l},{side:\"bottom\",distance:Math.abs(i.maxY-c.center.y),axisSpan:s,orientationMatches:!l},{side:\"left\",distance:Math.abs(c.center.x-i.minX),axisSpan:r,orientationMatches:l}].filter(g=\u003eg.orientationMatches).sort((g,h)=\u003eg.distance-h.distance)[0];a[u.side]+=1,A=Math.max(A,u.distance/u.axisSpan)}return{counts:a,maxNearestSideRatio:A}})(t);return e.top\u003e=3\u0026\u0026e.right\u003e=3\u0026\u0026e.bottom\u003e=3\u0026\u0026e.left\u003e=3\u0026\u0026n\u003c=.25}function Z9t(t){return{perimeterPadObstacles:(function(n){return n.filter($9t)})(t),thermalPadObstacles:t.filter(n=\u003e!$9t(n))}}function e7t(t){const e=Math.min(...t),n=Math.max(...t);return!(e\u003c=0)\u0026\u0026n/e\u003c=1.01}function t7t(t,e){let n=0,o=Number.POSITIVE_INFINITY;for(let i=0;i\u003ce.length;i++){const r=Math.abs(t-e[i]);r\u003co\u0026\u0026(n=i,o=r)}return n}function Ouo({memberObstacles:t,inputSrj:e}){if(!(function(r){return e7t(r.map(s=\u003es.width))\u0026\u0026e7t(r.map(s=\u003es.height))})(t))return!1;const n=hce(t.map(r=\u003er.center.y)),o=hce(t.map(r=\u003er.center.x));if(!(n.length===2\u0026\u0026o.length\u003e=4||o.length===2\u0026\u0026n.length\u003e=4))return!1;const i=(function({memberObstacles:r,rowAxisValues:s,columnAxisValues:a}){if(s.length===2\u0026\u0026a.length\u003e=4){const A=[[],[]];for(const c of r)A[t7t(c.center.y,s)].push(c);return Math.min(...A[1].map(c=\u003ec.center.y-c.height/2))-Math.max(...A[0].map(c=\u003ec.center.y+c.height/2))}if(a.length===2\u0026\u0026s.length\u003e=4){const A=[[],[]];for(const c of r)A[t7t(c.center.x,a)].push(c);return Math.min(...A[1].map(c=\u003ec.center.x-c.width/2))-Math.max(...A[0].map(c=\u003ec.center.x+c.width/2))}return null})({memberObstacles:t,rowAxisValues:n,columnAxisValues:o});return i===null?!1:i\u003e2*(om(e).padDiameter+(e.defaultObstacleMargin??.15))}var Guo=[class I5n{constructor(e){this.params=e}params;static componentKind=\"qfp_thermalpad\";componentKind=I5n.componentKind;static isMatch({memberObstacles:e}){return(function(n){const{perimeterPadObstacles:o,thermalPadObstacles:i}=Z9t(n);return i.length!==0\u0026\u0026!!X9t(o)\u0026\u0026q9t({perimeterPadObstacles:o,thermalPadObstacles:i})})(e)}},class C5n{constructor(e){this.params=e}params;static componentKind=\"qfp\";componentKind=C5n.componentKind;static isMatch({memberObstacles:e}){return(function(n){const{perimeterPadObstacles:o,thermalPadObstacles:i}=Z9t(n);return!(i.length\u003e0)\u0026\u0026!!q9t({perimeterPadObstacles:o,thermalPadObstacles:i})\u0026\u0026X9t(o)})(e)}},class y5n{constructor(e){this.params=e}params;static componentKind=\"soic\";componentKind=y5n.componentKind;static isMatch(e){return Ouo(e)}},class x5n{constructor(e){this.params=e}params;static componentKind=\"bga\";componentKind=x5n.componentKind;static isMatch({memberObstacles:e}){return(function(n){return j9t(n)!==null})(e)}}];function Yuo(t){return(function(e){for(const n of Guo)if(n.isMatch(e))return new n(e);return null})(t)?.componentKind??null}var Uuo=class extends zA{inputSrj;initialized=!1;groupedComponentObstacles={};groupedComponentKinds={};unprocessedComponentIds=[];detectedComponents=[];currentComponentId=null;currentMemberObstacles=[];output=null;constructor({inputSrj:t}){super(),this.inputSrj=t}getConstructorParams(){return[{inputSrj:this.inputSrj}]}_step(){this.initialized?this.output?this.solved=!0:this.currentComponentId!==null||this.unprocessedComponentIds.length\u003e0?this.processNextComponent():(this.finalizeOutput(),this.solved=!0):this.initializeDetectionState()}getOutput(){if(!this.output)throw new Error(\"ComponentDetectionSolver has not solved yet\");return this.output}visualize(){const t=[];t.push(...this.inputSrj.obstacles.filter(n=\u003e!n.componentId).map(n=\u003e({center:n.center,width:n.width,height:n.height,fill:\"rgba(120, 120, 120, 0.10)\",stroke:\"rgba(120, 120, 120, 0.40)\",label:n.obstacleId,layer:n.layers.join(\",\"),step:0})));const e=new Set(this.detectedComponents.map(n=\u003en.componentId));for(const n of this.inputSrj.obstacles){if(!n.componentId||e.has(n.componentId))continue;const o=n.componentId===this.currentComponentId,i=Fz(n.componentId),r=this.groupedComponentKinds[n.componentId];t.push({center:n.center,width:n.width,height:n.height,fill:Es(i,o?.55:.82),stroke:Es(i,o?.1:.45),label:r?`${n.componentId} ${r.toUpperCase()}`:n.componentId,layer:n.layers.join(\",\"),step:o?1:0})}for(const n of this.detectedComponents){const o=Fz(n.componentId);t.push({center:{x:(n.bounds.minX+n.bounds.maxX)/2,y:(n.bounds.minY+n.bounds.maxY)/2},width:n.bounds.maxX-n.bounds.minX,height:n.bounds.maxY-n.bounds.minY,fill:Es(o,.88),stroke:Es(o,.1),label:`${n.componentId} ${n.componentKind.toUpperCase()} region`,step:2})}return{title:this.getVisualizationTitle(),rects:t,lines:[],points:[],circles:[]}}preview(){return this.visualize()}initializeDetectionState(){this.initialized=!0,this.groupedComponentKinds={},this.groupedComponentObstacles=this.groupObstaclesByComponentId({obstacles:this.inputSrj.obstacles}),this.unprocessedComponentIds=Object.keys(this.groupedComponentObstacles).sort(),this.detectedComponents=[],this.currentComponentId=null,this.currentMemberObstacles=[],this.output=null}processNextComponent(){if(!this.currentComponentId){const t=this.unprocessedComponentIds.shift();return t?(this.currentComponentId=t,void(this.currentMemberObstacles=this.groupedComponentObstacles[t]??[])):(this.currentComponentId=null,void(this.currentMemberObstacles=[]))}if(this.currentMemberObstacles.length===0)return this.currentComponentId=null,void(this.currentMemberObstacles=[]);this.detectedComponents.push(this.createDetectedComponent({componentId:this.currentComponentId,componentKind:this.groupedComponentKinds[this.currentComponentId],memberObstacles:this.currentMemberObstacles})),this.currentComponentId=null,this.currentMemberObstacles=[]}finalizeOutput(){this.output=this.detectedComponents.map(t=\u003e({...t,bounds:{...t.bounds}})),this.stats={initialized:this.initialized,totalComponentCount:Object.keys(this.groupedComponentObstacles).length,detectedComponentCount:this.detectedComponents.length,detectedBgaComponentCount:this.detectedComponents.filter(t=\u003et.componentKind===\"bga\").length,detectedQfpComponentCount:this.detectedComponents.filter(t=\u003et.componentKind===\"qfp\").length,detectedQfpComponentIds:this.detectedComponents.filter(t=\u003et.componentKind===\"qfp\").map(t=\u003et.componentId),detectedQfpThermalPadComponentCount:this.detectedComponents.filter(t=\u003et.componentKind===\"qfp_thermalpad\").length,detectedQfpThermalPadComponentIds:this.detectedComponents.filter(t=\u003et.componentKind===\"qfp_thermalpad\").map(t=\u003et.componentId),detectedSoicComponentCount:this.detectedComponents.filter(t=\u003et.componentKind===\"soic\").length,detectedSoicComponentIds:this.detectedComponents.filter(t=\u003et.componentKind===\"soic\").map(t=\u003et.componentId),remainingComponentCount:this.unprocessedComponentIds.length,hasActiveComponent:this.currentComponentId!==null}}groupObstaclesByComponentId({obstacles:t}){const e={},n={};for(const i of t)i.componentId\u0026\u0026(e[i.componentId]??=[],e[i.componentId].push(i));const o=Object.entries(e).flatMap(([i,r])=\u003e{const s=this.inputSrj.bounds;if(r.some(A=\u003e!z9t({bounds:Is(A),outerBounds:s,epsilon:0})))return[];const a=Yuo({memberObstacles:r,inputSrj:this.inputSrj});return a?(n[i]=a,[[i,a===\"bga\"?j9t(r):r]]):[]});return this.groupedComponentKinds=n,Object.fromEntries(o)}createDetectedComponent({componentId:t,componentKind:e,memberObstacles:n}){return{componentId:t,componentKind:e,bounds:{__type:\"rect\",...dce(n)}}}getVisualizationTitle(){const t=Object.keys(this.groupedComponentObstacles).length||new Set(this.inputSrj.obstacles.map(n=\u003en.componentId).filter(n=\u003e!!n)).size,e=this.detectedComponents.length;return this.initialized?this.output||this.solved?`Component Detection: done ${e}/${t}`:this.currentComponentId!==null||this.unprocessedComponentIds.length\u003e0?`Component Detection: ${e}/${t} processed`:`Component Detection: finalizing ${e}/${t}`:\"Component Detection: setup\"}},Kuo=t=\u003et.componentId\u0026\u0026t.obstacleId?`${t.componentId}\n${t.obstacleId}`:t.componentId??t.obstacleId??\"obstacle\",n7t=class extends n7{rectBoundsComponentDetection;pipelineDef=[eh(\"rectBoundsComponentDetection\",Uuo,t=\u003e[{inputSrj:t.inputProblem.inputSrj}])];getConstructorParams(){return[this.inputProblem]}getOutput(){const t=this.getStageOutput(\"rectBoundsComponentDetection\");if(!t)throw new Error(\"ComponentDetectionSolver has not solved yet\");return t}initialVisualize(){const{bounds:t}=this.inputProblem.inputSrj;return{title:\"Component Detection: board and grouped component pads\",rects:[{center:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2},width:t.maxX-t.minX,height:t.maxY-t.minY,fill:\"rgba(0, 0, 0, 0)\",stroke:\"rgba(40, 40, 40, 0.7)\",label:\"Board bounds\",step:0},...this.inputProblem.inputSrj.obstacles.map(e=\u003e{const n=e.componentId?Fz(e.componentId):null;return{center:e.center,width:e.width,height:e.height,fill:n?Es(n,.72):\"rgba(120, 120, 120, 0.10)\",stroke:n?Es(n,.28):\"rgba(120, 120, 120, 0.40)\",label:Kuo(e),layer:e.layers.join(\",\"),step:e.componentId?1:0}})],lines:[],points:[],circles:[]}}},M7=1e-9;function EN(t){return Pg({center:t.center,width:t.width,height:t.height})}function o7t(t,e){const n={minX:Math.max(t.minX,e.minX),maxX:Math.min(t.maxX,e.maxX),minY:Math.max(t.minY,e.minY),maxY:Math.min(t.maxY,e.maxY)};return FSe(n)?n:null}function FSe(t){const e=t.maxX-t.minX,n=t.maxY-t.minY,o=Number.isFinite(e)\u0026\u0026e\u003eM7,i=Number.isFinite(n)\u0026\u0026n\u003eM7;return o\u0026\u0026i}function Vuo(t){(function(o){if(!Number.isInteger(o.layerCount))throw new Error(\"TopologyMergingSolver: layerCount must be an integer\");if(o.layerCount\u003c=0)throw new Error(\"TopologyMergingSolver: layerCount must be positive\");if(o.nodeGroups.length===0)throw new Error(\"TopologyMergingSolver: at least one node group is required\");const i=new Set;let r=0;for(const s of o.nodeGroups){if(i.has(s.groupId))throw new Error(`TopologyMergingSolver: duplicate topology group id \"${s.groupId}\"`);if(i.add(s.groupId),r+=s.nodes.length,s.nodes.length===0)throw new Error(`TopologyMergingSolver: topology group \"${s.groupId}\" is empty`);const a=new Set;for(const A of s.nodes){if(a.has(A.capacityMeshNodeId))throw new Error(`TopologyMergingSolver: duplicate node id \"${A.capacityMeshNodeId}\" in group \"${s.groupId}\"`);a.add(A.capacityMeshNodeId),zuo({node:A,groupId:s.groupId,layerCount:o.layerCount})}}if(r===0)throw new Error(\"TopologyMergingSolver: topology node groups are empty\")})(t);const e=[],n=new Map;for(let o=0;o\u003ct.nodeGroups.length;o++){const i=t.nodeGroups[o];for(const r of i.nodes){const s={sourceKey:`${i.groupId}:${r.capacityMeshNodeId}`,groupIndex:o,node:r,bounds:EN(r)};e.push(s),n.set(s.sourceKey,s)}}return{preparedNodes:e,preparedNodeBySourceKey:n}}function zuo({node:t,groupId:e,layerCount:n}){if(!FSe(EN(t)))throw new Error(`TopologyMergingSolver: node \"${t.capacityMeshNodeId}\" in group \"${e}\" has invalid bounds`);if(t.availableZ.length===0)throw new Error(`TopologyMergingSolver: node \"${t.capacityMeshNodeId}\" in group \"${e}\" has no available layers`);const o=[...new Set(t.availableZ)].sort((s,a)=\u003es-a),i=o.some(s=\u003e!Number.isInteger(s)||s\u003c0||s\u003e=n),r=o.length===t.availableZ.length\u0026\u0026o.every((s,a)=\u003es===t.availableZ[a]);if(i||!r)throw new Error(`TopologyMergingSolver: node \"${t.capacityMeshNodeId}\" in group \"${e}\" has invalid or unsorted availableZ`)}var Ly=1e-5,hH=4e-5;function i7t({regions:t,preparedNodeBySourceKey:e,nodeGroups:n,provenance:o,preserveSourceIds:i=!0}){i\u0026\u0026(o.groupIndexesByNodeId.clear(),o.sourceKeysByNodeId.clear());const r=[...t].sort((a,A)=\u003ea.bounds.minX-A.bounds.minX||a.bounds.minY-A.bounds.minY||a.bounds.maxX-A.bounds.maxX||a.bounds.maxY-A.bounds.maxY||a.availableZ[0]-A.availableZ[0]),s=new Set;return r.map((a,A)=\u003e{const c=a.sourceKeys.map(p=\u003e{const m=e.get(p);if(!m)throw new Error(`TopologyMergingSolver: missing source node for \"${p}\"`);return m}),l=c.map(({node:p})=\u003ep),u=(function({sourceNodes:p,isComponentTopologyNode:m}){if(p.length===1)return{_isComponentTopologyNode:!!m||p[0]._isComponentTopologyNode};const _=p.map(E=\u003eE.capacityMeshNodeId),f=LSe(p.map(E=\u003eE._targetConnectionName),\"target connection\",_),I=LSe(p.map(E=\u003eE._offBoardConnectionId),\"off-board connection\",_),C=LSe(p.map(E=\u003eE._offboardNetName),\"off-board net\",_),y=Array.from(new Set(p.flatMap(E=\u003eE._offBoardConnectedCapacityMeshNodeIds??[]))),x=Array.from(new Set(p.flatMap(E=\u003eE._connectedTo??[])));return{_containsObstacle:p.some(E=\u003eE._containsObstacle)||void 0,_completelyInsideObstacle:p.some(E=\u003eE._completelyInsideObstacle)||void 0,_containsTarget:p.some(E=\u003eE._containsTarget)||void 0,_targetConnectionName:f,_isVirtualOffboard:p.some(E=\u003eE._isVirtualOffboard)||void 0,_offboardNetName:C,_offBoardConnectionId:I,_offBoardConnectedCapacityMeshNodeIds:y.length\u003e0?y:void 0,_qfpRegionType:r7t(p.map(E=\u003eE._qfpRegionType)),_isNarrowQfpPadGap:p.some(E=\u003eE._isNarrowQfpPadGap)||void 0,_soicRegionType:r7t(p.map(E=\u003eE._soicRegionType)),_isComponentTopologyNode:m||void 0,_connectedTo:x.length\u003e0?x:void 0}})({sourceNodes:l,isComponentTopologyNode:c.some(({groupIndex:p})=\u003en[p].isComponent)}),g=i\u0026\u0026c.length===1?c[0].node:null;let d=!!(g\u0026\u0026(function({region:p,sourceNode:m,usedNodeIds:_}){const f=EN(m),I=Math.abs(p.bounds.minX-f.minX)\u003c=Ly\u0026\u0026Math.abs(p.bounds.maxX-f.maxX)\u003c=Ly\u0026\u0026Math.abs(p.bounds.minY-f.minY)\u003c=Ly\u0026\u0026Math.abs(p.bounds.maxY-f.maxY)\u003c=Ly,C=p.availableZ.length===m.availableZ.length\u0026\u0026p.availableZ.every((y,x)=\u003ey===m.availableZ[x]);return I\u0026\u0026C\u0026\u0026!_.has(m.capacityMeshNodeId)})({region:a,sourceNode:g,usedNodeIds:s}))?g.capacityMeshNodeId:`topology_merge_${A}`;for(;s.has(d);)d=`${d}_next`;return s.add(d),i\u0026\u0026(o.groupIndexesByNodeId.set(d,[...new Set(c.map(({groupIndex:p})=\u003ep))]),o.sourceKeysByNodeId.set(d,[...a.sourceKeys])),{...g??l[0],...u,capacityMeshNodeId:d,center:{x:(a.bounds.minX+a.bounds.maxX)/2,y:(a.bounds.minY+a.bounds.maxY)/2},width:a.bounds.maxX-a.bounds.minX,height:a.bounds.maxY-a.bounds.minY,layer:`z${a.availableZ.join(\",\")}`,availableZ:[...a.availableZ],_adjacentNodeIds:void 0,_parent:void 0,_strawNode:void 0,_strawParentCapacityMeshNodeId:void 0}})}function LSe(t,e,n){const o=Array.from(new Set(t.filter(i=\u003ei!==void 0)));if(o.length\u003e1)throw new Error(`TopologyMergingSolver: conflicting ${e} values for overlapping source nodes ${n.join(\", \")}`);return o[0]}function r7t(t){const e=Array.from(new Set(t.filter(n=\u003en!==void 0)));return e.length===1?e[0]:void 0}function Juo({node:t,sourceKey:e,preparedNodeBySourceKey:n}){const o=n.get(e);if(!o)throw new Error(`TopologyMergingSolver: missing source node for output \"${t.capacityMeshNodeId}\"`);const i=EN(t),r=i.minX\u003e=o.bounds.minX-hH\u0026\u0026i.maxX\u003c=o.bounds.maxX+hH\u0026\u0026i.minY\u003e=o.bounds.minY-hH\u0026\u0026i.maxY\u003c=o.bounds.maxY+hH,s=t.availableZ.every(a=\u003eo.node.availableZ.includes(a));if(!r||!s)throw new Error(`TopologyMergingSolver: output node \"${t.capacityMeshNodeId}\" escapes its source geometry or layers`)}function Wuo({groupIndexesA:t,groupIndexesB:e,sourceKeysA:n,sourceKeysB:o,sharedLayers:i,preparedNodeBySourceKey:r}){if(t.length!==1||e.length!==1||t[0]!==e[0]||n.length!==1||o.length!==1||n[0]===o[0])return!1;const s=r.get(n[0]),a=r.get(o[0]);return!s||!a||i.length===0?!1:i.some(A=\u003es.node.availableZ.includes(A)\u0026\u0026a.node.availableZ.includes(A))\u0026\u0026o7t(s.bounds,a.bounds)!==null}function s7t(t){const e=[...t].sort((o,i)=\u003eo-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)\u003eLy)\u0026\u0026n.push(o)}return n}function juo(t,e){return e.x\u003e=t.minX-Ly\u0026\u0026e.x\u003c=t.maxX+Ly\u0026\u0026e.y\u003e=t.minY-Ly\u0026\u0026e.y\u003c=t.maxY+Ly}function $uo({coveringNodes:t,nodeGroups:e,layerCount:n}){const o=new Map;for(let i=0;i\u003cn;i++){const r=t.filter(({node:g})=\u003eg.availableZ.includes(i)).sort((g,h)=\u003eg.sourceKey.localeCompare(h.sourceKey));if(r.length===0)continue;const s=new Set(r.map(({groupIndex:g})=\u003eg)),a=r.filter(({node:g})=\u003eg._containsObstacle\u0026\u0026g._containsTarget),A=a.filter(({groupIndex:g})=\u003e!e[g].isComponent),c=new Set(a.map(({groupIndex:g})=\u003eg)),l=a.length\u003e0?A.length\u003e0||c.size===1?\"target-passthrough\":\"target-merged\":s.size===1?\"passthrough\":\"merged\",u=Zuo({topologyMode:l,nodesOnLayer:r,targetObstacleNodes:a,globalTargetObstacleNodes:A});for(const g of u){const h=JSON.stringify({mode:l,sourceKeys:g}),d=o.get(h);d?d.availableZ.push(i):o.set(h,{availableZ:[i],sourceKeys:g,topologyMode:l,topologySignature:h})}}return[...o.values()]}function a7t(t){return JSON.stringify({availableZ:t.availableZ,topologySignature:t.topologySignature})}function quo(t){return JSON.stringify({mergeKey:a7t(t),minY:t.bounds.minY.toPrecision(15),maxY:t.bounds.maxY.toPrecision(15)})}function Xuo(t){return JSON.stringify({mergeKey:a7t(t),minX:t.bounds.minX.toPrecision(15),maxX:t.bounds.maxX.toPrecision(15)})}function A7t(t,e){const n=new Map;for(const o of t){const i=e===\"horizontal\"?quo(o):Xuo(o),r=n.get(i)??[];r.push(o),n.set(i,r)}return[...n.values()].flatMap(o=\u003e(function(i,r){const s=[...i].sort((A,c)=\u003er===\"horizontal\"?A.bounds.minX-c.bounds.minX:A.bounds.minY-c.bounds.minY),a=[];for(const A of s){const c=a[a.length-1],l=c!==void 0\u0026\u0026(r===\"horizontal\"?Math.abs(c.bounds.maxX-A.bounds.minX)\u003c=Ly:Math.abs(c.bounds.maxY-A.bounds.minY)\u003c=Ly);c\u0026\u0026l?r===\"horizontal\"?c.bounds.maxX=A.bounds.maxX:c.bounds.maxY=A.bounds.maxY:a.push({...A,bounds:{...A.bounds},availableZ:[...A.availableZ],sourceKeys:[...A.sourceKeys]})}return a})(o,e))}function Zuo({topologyMode:t,nodesOnLayer:e,targetObstacleNodes:n,globalTargetObstacleNodes:o}){return t===\"target-passthrough\"?(o.length\u003e0?o:n).map(({sourceKey:i})=\u003e[i]):t===\"target-merged\"?[n.map(({sourceKey:i})=\u003ei).sort()]:t===\"passthrough\"?e.map(({sourceKey:i})=\u003e[i]):[e.map(({sourceKey:i})=\u003ei).sort()]}var c7t=class extends zA{constructor(t){super(),this.inputProblem=t,this.MAX_ITERATIONS=1e5;const{preparedNodes:e,preparedNodeBySourceKey:n}=Vuo(t);this.preparedNodes=e,this.preparedNodeBySourceKey=n,this.xCoordinates=s7t(this.preparedNodes.flatMap(({bounds:o})=\u003e[o.minX,o.maxX])),this.stats={inputNodeCount:this.preparedNodes.length,xSlabCount:Math.max(0,this.xCoordinates.length-1),processedXSlabCount:0,atomicRegionCount:0,outputNodeCount:0}}inputProblem;preparedNodes;preparedNodeBySourceKey;outputProvenance={groupIndexesByNodeId:new Map,sourceKeysByNodeId:new Map};xCoordinates;atomicRegions=[];outputNodes=[];currentXIndex=0;getConstructorParams(){return[this.inputProblem]}_step(){if(this.inputProblem.nodeGroups.length===1)return void this.completePassthroughTopology();if(this.currentXIndex\u003cthis.xCoordinates.length-1)return this.processCurrentXSlab(),this.currentXIndex+=1,this.stats.processedXSlabCount=this.currentXIndex,void(this.stats.atomicRegionCount=this.atomicRegions.length);const t=(function(e){let n=e;for(;;){const o=A7t(n,\"horizontal\"),i=A7t(o,\"vertical\");if(i.length===n.length)return i;n=i}})((function({regions:e,preparedNodeBySourceKey:n}){const o=new Map;for(const r of e)for(const s of r.sourceKeys){const a=o.get(s)??new Set;a.add(r.topologyMode),o.set(s,a)}const i=new Set([...o.entries()].filter(([,r])=\u003er.size===1\u0026\u0026r.has(\"target-passthrough\")).map(([r])=\u003er));return i.size===0?e:[...e.filter(r=\u003er.topologyMode!==\"target-passthrough\"||!i.has(r.sourceKeys[0])),...[...i].map(r=\u003e{const s=n.get(r);if(!s)throw new Error(`TopologyMergingSolver: missing authoritative target source \"${r}\"`);return{bounds:{...s.bounds},availableZ:[...s.node.availableZ],sourceKeys:[r],topologyMode:\"target-passthrough\",topologySignature:JSON.stringify({mode:\"target-passthrough\",sourceKeys:[r]})}})]})({regions:this.atomicRegions,preparedNodeBySourceKey:this.preparedNodeBySourceKey}));this.outputNodes=i7t({regions:t,preparedNodeBySourceKey:this.preparedNodeBySourceKey,nodeGroups:this.inputProblem.nodeGroups,provenance:this.outputProvenance}),(function({nodes:e,preparedNodeBySourceKey:n,provenance:o}){const i=new Set;for(const r of e){if(i.has(r.capacityMeshNodeId))throw new Error(`TopologyMergingSolver: duplicate output node id \"${r.capacityMeshNodeId}\"`);if(i.add(r.capacityMeshNodeId),!FSe(EN(r)))throw new Error(`TopologyMergingSolver: output node \"${r.capacityMeshNodeId}\" has invalid bounds`);if(r.availableZ.length===0)throw new Error(`TopologyMergingSolver: output node \"${r.capacityMeshNodeId}\" has no available layers`);const s=o.sourceKeysByNodeId.get(r.capacityMeshNodeId);if(!s)throw new Error(`TopologyMergingSolver: missing output provenance for node \"${r.capacityMeshNodeId}\"`);s.length===1\u0026\u0026Juo({node:r,sourceKey:s[0],preparedNodeBySourceKey:n})}for(let r=0;r\u003ce.length;r++){const s=e[r];for(let a=r+1;a\u003ce.length;a++){const A=e[a],c=s.availableZ.filter(_=\u003eA.availableZ.includes(_));if(c.length===0)continue;const l=o7t(EN(s),EN(A));if(!l)continue;const u=l.maxX-l.minX,g=l.maxY-l.minY;if(u\u003c=hH||g\u003c=hH)continue;const h=o.groupIndexesByNodeId.get(s.capacityMeshNodeId),d=o.groupIndexesByNodeId.get(A.capacityMeshNodeId);if(!h||!d)throw new Error(`TopologyMergingSolver: missing output provenance for overlapping nodes \"${s.capacityMeshNodeId}\" and \"${A.capacityMeshNodeId}\"`);const p=o.sourceKeysByNodeId.get(s.capacityMeshNodeId),m=o.sourceKeysByNodeId.get(A.capacityMeshNodeId);if(!p||!m)throw new Error(`TopologyMergingSolver: missing source provenance for overlapping nodes \"${s.capacityMeshNodeId}\" and \"${A.capacityMeshNodeId}\"`);if(!Wuo({groupIndexesA:h,groupIndexesB:d,sourceKeysA:p,sourceKeysB:m,sharedLayers:c,preparedNodeBySourceKey:n}))throw new Error(`TopologyMergingSolver: output nodes \"${s.capacityMeshNodeId}\" and \"${A.capacityMeshNodeId}\" have an unresolved inter-group overlap on a shared layer`)}}})({nodes:this.outputNodes,preparedNodeBySourceKey:this.preparedNodeBySourceKey,provenance:this.outputProvenance}),this.stats.outputNodeCount=this.outputNodes.length,this.stats.compactedRegionCount=t.length,this.solved=!0}getOutput(){if(!this.solved)throw new Error(\"TopologyMergingSolver: getOutput() called before the solver completed\");return this.outputNodes}computeProgress(){const t=Math.max(1,this.xCoordinates.length-1);return this.solved?1:Math.min(.99,this.currentXIndex/t)}visualize(){const t=this.solved?this.outputNodes:i7t({regions:this.atomicRegions,preparedNodeBySourceKey:this.preparedNodeBySourceKey,nodeGroups:this.inputProblem.nodeGroups,provenance:this.outputProvenance,preserveSourceIds:!1});return{title:`Topology Merging: ${t.length} refined regions`,coordinateSystem:\"cartesian\",rects:t.map(e=\u003e({...Wf(e,{rectMargin:.01,zOffset:.02}),label:`${e.capacityMeshNodeId}\navailableZ: ${e.availableZ.join(\",\")}\ncomponent: ${e._isComponentTopologyNode?\"yes\":\"no\"}`})),lines:[],points:[],circles:[],texts:[]}}completePassthroughTopology(){const t=this.inputProblem.nodeGroups[0];this.outputNodes=t.nodes;for(const e of this.outputNodes)this.outputProvenance.groupIndexesByNodeId.set(e.capacityMeshNodeId,[0]),this.outputProvenance.sourceKeysByNodeId.set(e.capacityMeshNodeId,[`${t.groupId}:${e.capacityMeshNodeId}`]);this.stats.processedXSlabCount=this.stats.xSlabCount,this.stats.atomicRegionCount=0,this.stats.compactedRegionCount=0,this.stats.outputNodeCount=this.outputNodes.length,this.stats.passthroughNodeCount=this.outputNodes.length,this.solved=!0}processCurrentXSlab(){const t=this.xCoordinates[this.currentXIndex],e=this.xCoordinates[this.currentXIndex+1];if(e-t\u003c=Ly)return;const n=(t+e)/2,o=this.preparedNodes.filter(({bounds:r})=\u003en\u003e=r.minX-Ly\u0026\u0026n\u003c=r.maxX+Ly),i=s7t(o.flatMap(({bounds:r})=\u003e[r.minY,r.maxY]));for(let r=0;r\u003ci.length-1;r++){const s=i[r],a=i[r+1];if(a-s\u003c=Ly)continue;const A={x:n,y:(s+a)/2},c=o.filter(({bounds:u})=\u003ejuo(u,A));if(c.length===0)continue;const l=$uo({coveringNodes:c,nodeGroups:this.inputProblem.nodeGroups,layerCount:this.inputProblem.layerCount});for(const u of l)this.atomicRegions.push({bounds:{minX:t,maxX:e,minY:s,maxY:a},availableZ:u.availableZ,sourceKeys:u.sourceKeys,topologyMode:u.topologyMode,topologySignature:u.topologySignature})}}};function ego({meshNodes:t,components:e}){return e.length===0?t:t.map(n=\u003ee.some(i=\u003e(function({node:r,component:s}){const{replacementObstacle:a}=s,A=Math.abs(r.center.x-a.center.x)\u003c=M7\u0026\u0026Math.abs(r.center.y-a.center.y)\u003c=M7\u0026\u0026Math.abs(r.width-a.width)\u003c=M7\u0026\u0026Math.abs(r.height-a.height)\u003c=M7;if(s.componentKind!==\"qfp\"\u0026\u0026s.componentKind!==\"qfp_thermalpad\"\u0026\u0026s.componentKind!==\"soic\")return A;const c=a.center.x-a.width/2,l=a.center.x+a.width/2,u=a.center.y-a.height/2,g=a.center.y+a.height/2,h=r.center.x\u003e=c-M7\u0026\u0026r.center.x\u003c=l+M7\u0026\u0026r.center.y\u003e=u-M7\u0026\u0026r.center.y\u003c=g+M7,d=r.width*r.height,p=a.width*a.height,m=h\u0026\u0026d\u003e=.2*p;return A||m})({node:n,component:i}))?{...n,_containsObstacle:void 0,_completelyInsideObstacle:void 0,_containsTarget:void 0,_targetConnectionName:void 0,_connectedTo:void 0}:n)}var l7t=class extends n7{globalTopologySolver;componentTopologyBatchSolver;normalizedInput;pipelineDef=[eh(\"globalTopologySolver\",qF,t=\u003e[t.getGlobalTopologySolverInput()]),eh(\"componentTopologyBatchSolver\",kuo,t=\u003e[{componentSrjs:t.getComponentNoConnectionSrjs(),componentIds:t.normalizedInput.components.map(e=\u003ee.componentId),componentKinds:t.normalizedInput.components.map(e=\u003ee.componentKind),viaDiameter:t.inputProblem.viaDiameter,obstacleMargin:t.inputProblem.obstacleMargin}])];constructor(t){super(t),this.normalizedInput=Ruo(t)}getConstructorParams(){return[this.inputProblem]}getOutput(){const t=ego({meshNodes:this.getStageOutput(\"globalTopologySolver\")?.meshNodes??[],components:this.normalizedInput.components}),e=this.getStageOutput(\"componentTopologyBatchSolver\")?.componentMeshNodes??[],n=this.getComponentNoConnectionSrjs();return{globalNoConnectionSrj:this.normalizedInput.globalNoConnectionSrj,componentNoConnectionSrjs:n,globalMeshNodes:t,componentMeshNodes:e}}finalVisualize(){const t=this.getOutput();return{title:\"Topology Planning: generated topology groups\",rects:[...t.componentNoConnectionSrjs.flatMap((e,n)=\u003e{const o=this.normalizedInput.components[n]??null;return e.obstacles.map(i=\u003e({center:i.center,width:i.width,height:i.height,fill:\"rgba(120, 120, 120, 0.06)\",stroke:\"rgba(120, 120, 120, 0.35)\",label:i.obstacleId??o?.componentId??\"component-pad\",layer:i.layers.join(\",\")}))}),...[...t.globalMeshNodes,...t.componentMeshNodes.flat()].map(e=\u003e{const n=this.normalizedInput.components.find(o=\u003ee.capacityMeshNodeId.includes(o.componentId));return{...Wf(e,{rectMargin:.01}),fill:e._containsObstacle?Es(\"red\",.82):\"rgba(0, 120, 255, 0.12)\",stroke:e._containsObstacle?Es(\"red\",.3):\"rgba(0, 120, 255, 0.55)\",label:n?`${n.componentKind.toUpperCase()} ${e.capacityMeshNodeId}`:e.capacityMeshNodeId}})],lines:[],points:[],circles:[],texts:[]}}visualize(){return this.filterGlobalRectDiffNodesFromVisualization({visualization:super.visualize()})}preview(){return this.filterGlobalRectDiffNodesFromVisualization({visualization:super.preview()})}getComponentNoConnectionSrjs(){return this.normalizedInput.components.map(t=\u003e(function({inputSrj:e,component:n}){const o=dce(n.memberObstacles),i=Math.max(e.minViaPadDiameter??e.min_via_pad_diameter??e.minViaDiameter??.3,e.defaultObstacleMargin??.15,2*e.minTraceWidth),r=new Set(n.memberObstacles.flatMap(A=\u003eA.connectedTo)),s=e.connections.flatMap(A=\u003eA.pointsToConnect.filter(c=\u003e{const l=[c.pointId,c.pcb_port_id].filter(g=\u003etypeof g==\"string\").some(g=\u003er.has(g)),u=c.x\u003e=o.minX-i\u0026\u0026c.x\u003c=o.maxX+i\u0026\u0026c.y\u003e=o.minY-i\u0026\u0026c.y\u003c=o.maxY+i;return l\u0026\u0026u})).reduce((A,c)=\u003e({minX:Math.min(A.minX,c.x),maxX:Math.max(A.maxX,c.x),minY:Math.min(A.minY,c.y),maxY:Math.max(A.maxY,c.y)}),o),a=e.obstacles.filter(A=\u003eWF(Is(A),s)).map(A=\u003e({...A}));return{...structuredClone(e),bounds:s,obstacles:a}})({inputSrj:this.inputProblem.inputSrj,component:t}))}getGlobalTopologySolverInput(){return{simpleRouteJson:this.normalizedInput.globalNoConnectionSrj,maxGapFillPasses:4}}filterGlobalRectDiffNodesFromVisualization({visualization:t}){return{...t,rects:Tuo({rects:t.rects,components:this.normalizedInput.components})}}},HSe=(t,e)=\u003e{if(t)return Object.entries(e).sort(([n],[o])=\u003eo.length-n.length).find(([n])=\u003et.includes(n))?.[1]},pce=(t,e)=\u003e({...t,points:t.points?.map(n=\u003e({...n,color:HSe(n.label,e)??n.color})),lines:t.lines?.map(n=\u003e({...n,strokeColor:HSe(n.label,e)??n.strokeColor})),circles:t.circles?.map(n=\u003e{const o=HSe(n.label,e);return o?{...n,fill:o,stroke:o}:n})}),u7t=class extends yr{constructor(t){super(),this.topologyPlanningSolver=t,this.solved=t.solved,this.failed=t.failed,this.error=t.error,this.stats=t.stats}topologyPlanningSolver;getOutput(){return this.topologyPlanningSolver.getOutput().componentMeshNodes.flat()}visualize(){return this.topologyPlanningSolver.finalVisualize()??this.topologyPlanningSolver.visualize()}preview(){return this.visualize()}},BN=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(t){throw this.error=`${this.getSolverName()} error: ${t}`,this.failed=!0,t}!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}getOutput(){return null}solve(){const t=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const e=Date.now();this.timeToSolve=e-t}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}},OSe=t=\u003et.filter(e=\u003e!!e),g7t=(t,e,n)=\u003e{const o=`${Math.round(100*t.x)},${Math.round(100*t.y)}`,i=e.map(r=\u003e((s,a)=\u003es===\"top\"?0:s===\"bottom\"?a-1:Number.parseInt(s.slice(5),10))(r,n)).sort().join(\"-\");return`${o}:${i}`},Tv=class{parent=new Map;constructor(t,e=t.traces??[],n={}){for(const o of t.connections)this.unionAll(OSe([o.name,o.source_trace_id,o.rootConnectionName,o.netConnectionName,...o.mergedConnectionNames??[],...o.pointsToConnect.flatMap(i=\u003e[i.pointId,i.pcb_port_id,...n.includePhysicalPositionAliases?[g7t(i,i.layers??[i.layer],t.layerCount)]:[]])]));for(const o of[...e,...t.fixedTraces??[]])this.unionAll(OSe([o.pcb_trace_id,o.connection_name,o.source_trace_id,o.rootConnectionName,...o.mergedConnectionNames??[],...o.connectsTo??[]]));for(const o of t.obstacles)this.unionAll(n.includePhysicalPositionAliases?OSe([o.obstacleId,...o.connectedTo,...o.offBoardConnectsTo??[],g7t(o.center,o.layers,t.layerCount)]):o.connectedTo)}canonicalize(t){return[...new Set(t.map(e=\u003ethis.find(e)))]}unionAll(t){const e=t[0];if(e){this.add(e);for(let n=1;n\u003ct.length;n++)this.union(e,t[n])}}add(t){this.parent.has(t)||this.parent.set(t,t)}find(t){this.add(t);const e=this.parent.get(t);if(e===t)return t;const n=this.find(e);return this.parent.set(t,n),n}union(t,e){const n=this.find(t),o=this.find(e);n!==o\u0026\u0026this.parent.set(o,n)}},Ki=1e-6,Aa=(t,e)=\u003eMath.hypot(e.x-t.x,e.y-t.y),bN=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r\u003c=1e-12)return Aa(t,e);const s=th(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return Math.hypot(t.x-(e.x+o*s),t.y-(e.y+i*s))},SN=(t,e,n=1e-6)=\u003eMath.abs(t.x-e.x)\u003c=n\u0026\u0026Math.abs(t.y-e.y)\u003c=n,th=(t,e,n)=\u003eMath.max(e,Math.min(n,t)),BW=(t,e,n)=\u003e(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),bW=(t,e,n)=\u003eMath.abs(BW(e,n,t))\u003c=1e-9\u0026\u0026t.x\u003e=Math.min(e.x,n.x)-1e-9\u0026\u0026t.x\u003c=Math.max(e.x,n.x)+1e-9\u0026\u0026t.y\u003e=Math.min(e.y,n.y)-1e-9\u0026\u0026t.y\u003c=Math.max(e.y,n.y)+1e-9,GSe=(t,e,n,o)=\u003e((i,r,s,a)=\u003e{const A=BW(i,r,s),c=BW(i,r,a),l=BW(s,a,i),u=BW(s,a,r);return A*c\u003c0\u0026\u0026l*u\u003c0||Math.abs(A)\u003c=1e-9\u0026\u0026bW(s,i,r)||Math.abs(c)\u003c=1e-9\u0026\u0026bW(a,i,r)||Math.abs(l)\u003c=1e-9\u0026\u0026bW(i,s,a)||Math.abs(u)\u003c=1e-9\u0026\u0026bW(r,s,a)})(t,e,n,o)?0:Math.min(bN(t,n,o),bN(e,n,o),bN(n,t,e),bN(o,t,e)),d7t=(t,e)=\u003e{let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o],s=e[i];if(bW(t,s,r))return!0;r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},YSe=(t,e,n)=\u003e{if(d7t(t,n)||d7t(e,n))return 0;let o=Number.POSITIVE_INFINITY;for(let i=0;i\u003cn.length;i++){const r=n[i],s=n[(i+1)%n.length];o=Math.min(o,GSe(t,e,r,s))}return o};function h7t(t,e,n){let o=0,i=1;const r=e.x-t.x,s=e.y-t.y,a=[[-r,t.x-n.minX],[r,n.maxX-t.x],[-s,t.y-n.minY],[s,n.maxY-t.y]];for(const[A,c]of a){if(Math.abs(A)\u003c1e-12){if(c\u003c0)return!1;continue}const l=c/A;if(A\u003c0?o=Math.max(o,l):i=Math.min(i,l),o\u003ei)return!1}return!0}function p7t({start:t,end:e,width:n,base:o}){const i=Aa(t,e),r=(c=\u003eth(1.25*c,.25,.75))(n),s=Math.max(1,Math.ceil(i/r)),a=n/2,A=[];for(let c=0;c\u003cs;c++){const l=c/s,u=(c+1)/s,g=t.x+(e.x-t.x)*l,h=t.y+(e.y-t.y)*l,d=t.x+(e.x-t.x)*u,p=t.y+(e.y-t.y)*u;A.push({...o,minX:Math.min(g,d)-a,minY:Math.min(h,p)-a,maxX:Math.max(g,d)+a,maxY:Math.max(h,p)+a,exactShape:{type:\"segment\",start:{x:g,y:h},end:{x:d,y:p},width:n}})}return A}var tgo=(t,e,n)=\u003e{const o=Math.cos(n),i=Math.sin(n),r=t.x-e.x,s=t.y-e.y;return{x:e.x+r*o-s*i,y:e.y+r*i+s*o}},ngo=class{nodeIndices=[];priorities=[];get size(){return this.nodeIndices.length}push(t,e){let n=this.nodeIndices.length;for(this.nodeIndices.push(t),this.priorities.push(e);n\u003e0;){const o=n-1\u003e\u003e1;if(this.priorities[o]\u003c=e)break;this.swap(n,o),n=o}}pop(){const t=this.nodeIndices[0],e=this.nodeIndices.pop(),n=this.priorities.pop();if(this.nodeIndices.length===0)return t;this.nodeIndices[0]=e,this.priorities[0]=n;let o=0;for(;;){const i=2*o+1,r=i+1;if(i\u003e=this.nodeIndices.length)break;let s=i;if(r\u003cthis.nodeIndices.length\u0026\u0026this.priorities[r]\u003cthis.priorities[i]\u0026\u0026(s=r),this.priorities[o]\u003c=this.priorities[s])break;this.swap(o,s),o=s}return t}swap(t,e){[this.nodeIndices[t],this.nodeIndices[e]]=[this.nodeIndices[e],this.nodeIndices[t]],[this.priorities[t],this.priorities[e]]=[this.priorities[e],this.priorities[t]]}},ogo=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]],mce=[\"#d53535\",\"#3478c8\",\"#8e44ad\",\"#15956f\"],m7t=class extends BN{problem;searchBounds;rows;columns;origin;nodes=[];open=new ngo;bestCost=new Map;closed=new Set;baseStateCount;stateSpaceUpperBound;endLayerIndices;targetCell;segmentWidthCache=new Map;closedStateCount=0;output=null;constructor(t){super(),this.problem=t;const e=Math.max(t.traceWidth,t.viaDiameter)/2+t.obstacleIndex.clearance,n=th(Math.min(t.start.x,t.end.x)-t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),o=th(Math.max(t.start.x,t.end.x)+t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),i=th(Math.min(t.start.y,t.end.y)-t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),r=th(Math.max(t.start.y,t.end.y)+t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),s=Math.floor((n-t.gridOffset.x)/t.gridSize)*t.gridSize+t.gridOffset.x,a=Math.floor((i-t.gridOffset.y)/t.gridSize)*t.gridSize+t.gridOffset.y;this.origin={x:s,y:a},this.columns=Math.max(2,Math.floor((o-s)/t.gridSize)+1),this.rows=Math.max(2,Math.floor((r-a)/t.gridSize)+1),this.searchBounds={minX:s,minY:a,maxX:s+(this.columns-1)*t.gridSize,maxY:a+(this.rows-1)*t.gridSize};const A=this.rows*this.columns*t.layers.length*(t.maxViaCount+1);this.baseStateCount=A,this.stateSpaceUpperBound=A*(this.rows*this.columns+1),this.targetCell=this.pointToCell(t.end),this.endLayerIndices=new Set(t.endLayers.map(l=\u003et.layers.indexOf(l)).filter(l=\u003el\u003e=0));const c=this.pointToCell(t.start);for(const l of t.startLayers){const u=t.layers.indexOf(l);if(u\u003c0||this.endpointCollides(t.start,u))continue;const g={...c,...t.start,layerIndex:u,viaCount:0,viaPoints:[],g:0,f:this.heuristic(t.start),parentIndex:-1},h=this.nodes.length;this.nodes.push(g),this.open.push(h,g.f),this.bestCost.set(this.toStateIndex(g),0)}this.open.size!==0\u0026\u0026this.endLayerIndices.size!==0||(this.failed=!0,this.error=\"No collision-free multilayer route endpoint\"),this.MAX_ITERATIONS=Math.min(15e3,Math.max(2e3,2*A)),this.stats=this.createStats()}getSolverName(){return`LayerAwareGridRouteSolver(${this.problem.gridSize.toFixed(3)}mm)`}_step(){if(this.open.size===0)return this.failed=!0,void(this.error=\"No collision-free multilayer grid route found\");const t=this.open.pop(),e=this.nodes[t],n=this.toStateIndex(e);if(!this.closed.has(n)){if(this.closed.add(n),this.closedStateCount++,e.row===this.targetCell.row\u0026\u0026e.column===this.targetCell.column\u0026\u0026this.endLayerIndices.has(e.layerIndex)\u0026\u0026e.viaCount\u003e=this.problem.minViaCount\u0026\u0026!this.segmentCollides(e,this.problem.end))return this.output=this.reconstructRoute(t),this.solved=!0,void(this.stats=this.createStats());this.expandPlanarMoves(t,e),this.expandViaMoves(t,e),this.stats=this.createStats()}}expandPlanarMoves(t,e){for(const[n,o]of ogo){const i=e.row+n,r=e.column+o;if(i\u003c0||i\u003e=this.rows||r\u003c0||r\u003e=this.columns)continue;const s=this.cellToPoint(i,r),a=this.getSafeSegmentWidth(e,s);if(a\u003c=0)continue;const A=this.problem.gridSize*(n!==0\u0026\u0026o!==0?Math.SQRT2:1)*Math.max(1,(this.problem.traceWidth/a)**this.problem.neckPenaltyExponent);this.enqueueNode({row:i,column:r,...s,layerIndex:e.layerIndex,viaCount:e.viaCount,viaPoints:e.viaPoints,g:e.g+A,parentIndex:t})}}expandViaMoves(t,e){if(e.viaCount\u003e=this.problem.maxViaCount)return;const n=.5*this.problem.gridSize;if(Aa(e,this.problem.start)\u003cn-1e-9||Aa(e,this.problem.end)\u003cn-1e-9)return;const o=e.parentIndex\u003e=0?this.nodes[e.parentIndex]:void 0;if(!o||o.layerIndex===e.layerIndex||!SN(o,e))for(let i=0;i\u003cthis.problem.layers.length;i++)i!==e.layerIndex\u0026\u0026(this.problem.obstacleIndex.collidesVia({point:e,layers:this.problem.layers,padDiameter:this.problem.viaDiameter,holeDiameter:this.problem.viaHoleDiameter,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreTraceIndices:this.problem.softTraceIndices,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance,blockSameNetObstacles:!0,sameNetObstacleClearance:0,otherNewViaPoints:e.viaPoints,fixedVias:this.problem.fixedVias})||this.enqueueNode({row:e.row,column:e.column,x:e.x,y:e.y,layerIndex:i,viaCount:e.viaCount+1,viaPoints:[...e.viaPoints,{x:e.x,y:e.y}],g:e.g+this.problem.viaCost,parentIndex:t}))}enqueueNode(t){const e=this.toStateIndex(t);if(this.closed.has(e)||t.g\u003e=(this.bestCost.get(e)??Number.POSITIVE_INFINITY))return;this.bestCost.set(e,t.g);const n=t.g+this.heuristic(t),o=this.nodes.length;this.nodes.push({...t,f:n}),this.open.push(o,n)}endpointCollides(t,e){return this.getSafeSegmentWidth({...t,layerIndex:e,viaCount:0},t)\u003c=0}segmentCollides(t,e){return this.getSafeSegmentWidth(t,e)\u003c=0}getSafeSegmentWidth(t,e){const n=this.problem.layers[t.layerIndex],o=this.problem.startLayers.length===1\u0026\u0026t.viaCount===0\u0026\u0026n===this.problem.originalStartLayer\u0026\u0026Aa(this.problem.start,t)\u003c=this.problem.maxStartNeckLength+1e-9\u0026\u0026Aa(this.problem.start,e)\u003c=this.problem.maxStartNeckLength+1e-9,i=this.problem.endLayers.length===1\u0026\u0026n===this.problem.originalEndLayer\u0026\u0026Aa(this.problem.end,t)\u003c=this.problem.maxEndNeckLength+1e-9\u0026\u0026Aa(this.problem.end,e)\u003c=this.problem.maxEndNeckLength+1e-9,r=Math.max(o?this.problem.startNeckWidth:0,i?this.problem.endNeckWidth:0),s=[t.x,t.y,e.x,e.y,t.layerIndex,t.viaCount,r].join(\":\"),a=this.segmentWidthCache.get(s);if(a!==void 0)return a;const A=l=\u003e!this.problem.obstacleIndex.collides({start:t,end:e,layer:n,width:l,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreTraceIndices:this.problem.softTraceIndices,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance});let c=0;if(o||i){let u=Math.ceil((r-1e-9)/.025),g=Math.floor((this.problem.traceWidth+1e-9)/.025);for(;u\u003c=g;){const h=Math.floor((u+g)/2),d=Number((h*.025).toFixed(6));A(d)?(c=d,u=h+1):g=h-1}c\u003cr-1e-9\u0026\u0026A(r)\u0026\u0026(c=r)}else c=A(this.problem.traceWidth)?this.problem.traceWidth:0;return this.segmentWidthCache.set(s,c),c}reconstructRoute(t){const e=[];let n=t;for(;n\u003e=0;){const a=this.nodes[n];e.push(a),n=a.parentIndex}e.reverse();const o=e[e.length-1];SN(o,this.problem.end)||e.push({...o,...this.problem.end,row:this.targetCell.row,column:this.targetCell.column,parentIndex:-1});const i=[];let r=[e[0]];for(let a=1;a\u003ce.length;a++){const A=e[a-1],c=e[a];c.layerIndex!==A.layerIndex?(i.push(r),r=[c]):r.push(c)}i.push(r);const s=[];for(let a=0;a\u003ci.length;a++){const A=this.simplifySection(i[a]),c=A.slice(0,-1).map((g,h)=\u003ethis.getSafeSegmentWidth(g,A[h+1])),l=A.map((g,h)=\u003e({route_type:\"wire\",x:g.x,y:g.y,layer:this.problem.layers[g.layerIndex],width:c.length===0?Math.min(this.problem.startNeckWidth,this.problem.endNeckWidth):h===0?c[0]:h===A.length-1?c[c.length-1]:Math.min(c[h-1],c[h])}));s.push(...l);const u=i[a+1];if(u){const g=this.problem.layers[A.at(-1).layerIndex],h=this.problem.layers[u[0].layerIndex],d=A.at(-1);s.push({route_type:\"via\",x:d.x,y:d.y,from_layer:g,to_layer:h,via_diameter:this.problem.viaDiameter,via_hole_diameter:this.problem.viaHoleDiameter})}}return{route:s,traceWidth:this.problem.traceWidth,startNeckWidth:this.problem.startNeckWidth,endNeckWidth:this.problem.endNeckWidth,gridSize:this.problem.gridSize,gridOffset:this.problem.gridOffset,viaCount:i.length-1}}simplifySection(t){return t.length\u003c=2?t:this.problem.neckPenaltyExponent\u003e1?this.simplifyStrictSection(t):this.simplifyWidthPreservingSection(t)}simplifyStrictSection(t){const e=t.slice(0,-1).map((r,s)=\u003ethis.getSafeSegmentWidth(r,t[s+1])),n=[0];for(let r=0;r\u003ce.length;r++)n.push(n[r]+this.getWidthPenalizedCost(t[r],t[r+1],e[r]));const o=[t[0]];let i=0;for(;i\u003ct.length-1;){let r=t.length-1;for(;r\u003ei+1\u0026\u0026!this.shortcutPreservesRouteQuality(t,e,n,i,r);)r--;o.push(t[r]),i=r}return this.removeRedundantCollinearPoints(o)}shortcutPreservesRouteQuality(t,e,n,o,i){const r=this.getSafeSegmentWidth(t[o],t[i]);if(r\u003c=0)return!1;let s=Number.POSITIVE_INFINITY;for(let A=o;A\u003ci;A++)s=Math.min(s,e[A]);const a=n[i]-n[o];return r\u003e=s-1e-9\u0026\u0026this.getWidthPenalizedCost(t[o],t[i],r)\u003c=a+1e-9}getWidthPenalizedCost(t,e,n){return Aa(t,e)*Math.max(1,(this.problem.traceWidth/n)**this.problem.neckPenaltyExponent)}simplifyWidthPreservingSection(t){const e=t.slice(0,-1).map((A,c)=\u003ethis.getSafeSegmentWidth(A,t[c+1])),n=[0];for(let A=0;A\u003ce.length;A++)n.push(n[A]+Aa(t[A],t[A+1])*Math.max(1,(this.problem.traceWidth/e[A])**this.problem.neckPenaltyExponent));const o=new Float64Array(t.length).fill(Number.POSITIVE_INFINITY),i=new Float64Array(t.length).fill(Number.POSITIVE_INFINITY),r=new Int32Array(t.length).fill(-1);o[0]=0,i[0]=0;for(let A=1;A\u003ct.length;A++){let c=Number.POSITIVE_INFINITY;for(let l=A-1;l\u003e=0;l--){if(c=Math.min(c,e[l]),!Number.isFinite(o[l]))continue;const u=this.getSafeSegmentWidth(t[l],t[A]);if(u\u003cc-1e-9)continue;const g=Aa(t[l],t[A]);if(g*Math.max(1,(this.problem.traceWidth/u)**this.problem.neckPenaltyExponent)\u003en[A]-n[l]+1e-9)continue;const h=o[l]+g*Math.max(0,this.problem.traceWidth-u),d=i[l]+g;(h\u003co[A]-1e-9||Math.abs(h-o[A])\u003c=1e-9\u0026\u0026d\u003ci[A]-1e-9)\u0026\u0026(o[A]=h,i[A]=d,r[A]=l)}}const s=[];let a=t.length-1;for(;a\u003e=0\u0026\u0026(s.push(t[a]),a!==0);)if(a=r[a],a\u003c0)return t;return s.reverse(),this.removeRedundantCollinearPoints(s)}removeRedundantCollinearPoints(t){return t.filter((e,n,o)=\u003e{if(n===0||n===o.length-1)return!0;const i=o[n-1],r=o[n+1],s=(e.x-i.x)*(r.y-e.y)-(e.y-i.y)*(r.x-e.x),a=Math.abs(this.getSafeSegmentWidth(i,e)-this.getSafeSegmentWidth(e,r))\u003c1e-9;return Math.abs(s)\u003e1e-8||!a})}pointToCell(t){return{column:th(Math.round((t.x-this.origin.x)/this.problem.gridSize),0,this.columns-1),row:th(Math.round((t.y-this.origin.y)/this.problem.gridSize),0,this.rows-1)}}cellToPoint(t,e){return{x:this.origin.x+e*this.problem.gridSize,y:this.origin.y+t*this.problem.gridSize}}toStateIndex(t){const e=((t.viaCount*this.problem.layers.length+t.layerIndex)*this.rows+t.row)*this.columns+t.column;if(t.viaCount!==1||t.viaPoints.length===0||Aa(t,t.viaPoints[0])\u003e=this.problem.viaHoleDiameter+this.problem.obstacleIndex.minViaHoleEdgeToViaHoleEdgeClearance-1e-9)return e;const n=this.pointToCell(t.viaPoints[0]);return e+(1+n.row*this.columns+n.column)*this.baseStateCount}heuristic(t){return Aa(t,this.problem.end)}createStats(){return{phase:\"layer-aware-grid-search\",gridSize:this.problem.gridSize,traceWidth:this.problem.traceWidth,startNeckWidth:this.problem.startNeckWidth,endNeckWidth:this.problem.endNeckWidth,maxViaCount:this.problem.maxViaCount,minViaCount:this.problem.minViaCount,openStates:this.open.size,closedStates:this.closedStateCount,trackedStates:this.bestCost.size,stateSpaceUpperBound:this.stateSpaceUpperBound}}computeProgress(){return Math.min(.99,this.iterations/this.MAX_ITERATIONS)}getOutput(){return this.output}getConstructorParams(){const{obstacleIndex:t,...e}=this.problem;return[e]}visualize(){const t=this.nodes.filter(i=\u003ethis.closed.has(this.toStateIndex(i))).slice(-2e3).map(i=\u003e({x:i.x,y:i.y,color:`${mce[i.layerIndex%mce.length]}55`})),e=[],n=[],o=this.output?.route??[];for(let i=0;i\u003co.length-1;i++){const r=o[i],s=o[i+1];if(r?.route_type===\"wire\"\u0026\u0026s?.route_type===\"wire\"\u0026\u0026r.layer===s.layer){const a=this.problem.layers.indexOf(r.layer);e.push({points:[r,s],strokeColor:mce[a%mce.length]??\"#333\",strokeWidth:r.width})}r?.route_type===\"via\"\u0026\u0026n.push({center:r,radius:(r.via_diameter??this.problem.viaDiameter)/2,fill:\"#d4a017\"})}return{coordinateSystem:\"cartesian\",title:this.getSolverName(),rects:[{center:{x:(this.searchBounds.minX+this.searchBounds.maxX)/2,y:(this.searchBounds.minY+this.searchBounds.maxY)/2},width:this.searchBounds.maxX-this.searchBounds.minX,height:this.searchBounds.maxY-this.searchBounds.minY,stroke:\"#777\"}],points:[...t,{...this.problem.start,color:\"green\",label:\"reroute start\"},{...this.problem.end,color:\"purple\",label:\"reroute target\"}],lines:e,circles:n,texts:[]}}},_ce=[{direction:1,strength:.7},{direction:-1,strength:.7},{direction:1,strength:1},{direction:-1,strength:1}],igo=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r\u003c=1e-12)return{...e};const s=th(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return{x:e.x+o*s,y:e.y+i*s}},USe=class extends BN{problem;phase=\"prepare-candidate\";variantCursor=0;relaxationIteration=0;candidatePoints=[];sampledPoints;output=null;constructor(t){super(),this.problem=t,this.sampledPoints=this.sampleRoute(),this.MAX_ITERATIONS=100,this.stats=this.createStats()}getSolverName(){return\"ElasticTracePushSolver\"}_step(){switch(this.phase){case\"prepare-candidate\":if(this.variantCursor\u003e=_ce.length)return this.failed=!0,void(this.error=\"No collision-free elastic displacement found\");this.candidatePoints=this.sampledPoints.map(t=\u003e({...t})),this.relaxationIteration=0,this.phase=\"relax-candidate\";break;case\"relax-candidate\":this.relaxCandidate(),this.relaxationIteration++,this.relaxationIteration\u003e=10\u0026\u0026(this.phase=\"validate-candidate\");break;case\"validate-candidate\":{const t=this.simplifyCandidate(this.candidatePoints);this.pathCollides(t)?(this.variantCursor++,this.phase=\"prepare-candidate\"):(this.output={points:t,traceWidth:this.problem.traceWidth},this.phase=\"complete\");break}case\"complete\":this.solved=!0}this.stats=this.createStats()}sampleRoute(){const t=[],e=th(2*this.problem.traceWidth,.2,.45),n=this.problem.trace.route;for(let o=this.problem.range.startIndex;o\u003cthis.problem.range.endIndex;o++){const i=n[o],r=n[o+1];if(i?.route_type!==\"wire\"||r?.route_type!==\"wire\"||i.layer!==r.layer)continue;t.length===0\u0026\u0026t.push({x:i.x,y:i.y});const s=Aa(i,r),a=Math.max(1,Math.ceil(s/e));for(let A=1;A\u003c=a;A++){const c=A/a;t.push({x:i.x+(r.x-i.x)*c,y:i.y+(r.y-i.y)*c})}}return t}relaxCandidate(){const t=_ce[this.variantCursor],e=this.candidatePoints.map(o=\u003e({...o})),n=new Uint8Array(this.candidatePoints.length);for(let o=1;o\u003cthis.candidatePoints.length-1;o++){const i=this.candidatePoints[o],r=this.findNearestCorridorSegment(i);if(!r)continue;const s=Aa(r.segment.start,r.segment.end);if(s\u003c=1e-9)continue;const a=r.segment.width/2+this.problem.traceWidth/2+this.problem.obstacleIndex.clearance+.025;if(r.distance\u003ea+.35)continue;const A={x:(r.segment.start.y-r.segment.end.y)/s*t.direction,y:(r.segment.end.x-r.segment.start.x)/s*t.direction},c=a-((i.x-r.closest.x)*A.x+(i.y-r.closest.y)*A.y);if(c\u003c=0)continue;const l=Math.min(.35,c*t.strength);e[o]={x:i.x+A.x*l,y:i.y+A.y*l},n[o]=1}for(let o=1;o\u003ce.length-1;o++){if(!n[o])continue;const i=e[o-1],r=e[o],s=e[o+1];e[o]={x:.85*r.x+(i.x+s.x)/2*.15,y:.85*r.y+(i.y+s.y)/2*.15}}this.candidatePoints=e}findNearestCorridorSegment(t){let e;for(const n of this.problem.corridor){if(n.layer!==this.problem.layer)continue;const o=igo(t,n.start,n.end),i=Aa(t,o);(!e||i\u003ce.distance)\u0026\u0026(e={segment:n,closest:o,distance:i})}return e}simplifyCandidate(t){if(t.length\u003c=2)return t;const e=[t[0]];let n=0;for(;n\u003ct.length-1;){let o=t.length-1;for(;o\u003en+1\u0026\u0026this.segmentCollides(t[n],t[o]);)o--;e.push(t[o]),n=o}return e.filter((o,i,r)=\u003ei===0||!SN(o,r[i-1]))}pathCollides(t){if(t.length\u003c2)return!0;for(let e=0;e\u003ct.length-1;e++)if(this.segmentCollides(t[e],t[e+1]))return!0;return!1}segmentCollides(t,e){return this.problem.obstacleIndex.collides({start:t,end:e,layer:this.problem.layer,width:this.problem.traceWidth,connectionNames:this.problem.connectionNames,ignoreTraceIndex:-1})}createStats(){const t=_ce[this.variantCursor];return{phase:this.phase,direction:t?.direction,strength:t?.strength,variantCursor:this.variantCursor,relaxationIteration:this.relaxationIteration,sampledPointCount:this.sampledPoints.length}}computeProgress(){return Math.min(.99,(this.variantCursor+this.relaxationIteration/12)/_ce.length)}getOutput(){return this.output}getConstructorParams(){return[this.problem]}visualize(){return{coordinateSystem:\"cartesian\",title:`Elastic trace push: ${this.phase}`,lines:[...this.problem.corridor.map(t=\u003e({points:[t.start,t.end],strokeColor:\"rgba(255, 128, 0, 0.6)\",strokeWidth:t.width})),...this.candidatePoints.length\u003e1?[{points:this.candidatePoints,strokeColor:\"#1769d2\",strokeWidth:this.problem.traceWidth}]:[]],points:[],rects:[],circles:[],texts:[]}}},fce=(t,e)=\u003e{const n=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return n\u003c=Ki||o\u003c=Ki||Math.abs(n-o)\u003c=Ki},KSe=t=\u003e{let e=0;for(let n=0;n\u003ct.length-1;n++)fce(t[n],t[n+1])||e++;return e},SW=t=\u003e{let e=0;for(let n=0;n\u003ct.length-1;n++)e+=Aa(t[n],t[n+1]);return e},rgo=t=\u003et.filter((e,n)=\u003en===0||!SN(e,t[n-1])),_7t=(t,e)=\u003e{const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o),s=Math.sign(n),a=Math.sign(o),A=[];fce(t,e)\u0026\u0026A.push([t,e]),A.push([t,{x:e.x,y:t.y},e],[t,{x:t.x,y:e.y},e]),i\u003e=r?A.push([t,{x:e.x-s*r,y:t.y},e],[t,{x:t.x+s*r,y:e.y},e]):A.push([t,{x:t.x,y:e.y-a*i},e],[t,{x:e.x,y:t.y+a*i},e]);const c=new Map;for(const l of A){const u=rgo(l);if(u.length\u003c2||u.some((h,d)=\u003ed\u003cu.length-1\u0026\u0026!fce(h,u[d+1])))continue;const g=u.map(h=\u003e`${h.x.toFixed(6)},${h.y.toFixed(6)}`).join(\";\");c.set(g,u)}return[...c.values()].sort((l,u)=\u003eSW(l)-SW(u)||l.length-u.length)},sgo=class{nodeIndices=[];priorities=[];get size(){return this.nodeIndices.length}push(t,e){let n=this.nodeIndices.length;for(this.nodeIndices.push(t),this.priorities.push(e);n\u003e0;){const o=n-1\u003e\u003e1;if(this.priorities[o]\u003c=e)break;this.swap(n,o),n=o}}pop(){const t=this.nodeIndices[0],e=this.nodeIndices.pop(),n=this.priorities.pop();if(this.nodeIndices.length===0)return t;this.nodeIndices[0]=e,this.priorities[0]=n;let o=0;for(;;){const i=2*o+1,r=i+1;if(i\u003e=this.nodeIndices.length)break;let s=i;if(r\u003cthis.nodeIndices.length\u0026\u0026this.priorities[r]\u003cthis.priorities[i]\u0026\u0026(s=r),this.priorities[o]\u003c=this.priorities[s])break;this.swap(o,s),o=s}return t}swap(t,e){[this.nodeIndices[t],this.nodeIndices[e]]=[this.nodeIndices[e],this.nodeIndices[t]],[this.priorities[t],this.priorities[e]]=[this.priorities[e],this.priorities[t]]}},ago=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]],Ice=class extends BN{problem;searchBounds;rows;columns;origin;nodes=[];open=new sgo;bestCost;closed;closedCellCount=0;targetCell;output=null;constructor(t){super(),this.problem=t;const e=t.traceWidth/2+t.obstacleIndex.clearance,n=th(Math.min(t.start.x,t.end.x)-t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),o=th(Math.max(t.start.x,t.end.x)+t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),i=th(Math.min(t.start.y,t.end.y)-t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),r=th(Math.max(t.start.y,t.end.y)+t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),s=Math.floor((n-t.gridOffset.x)/t.gridSize)*t.gridSize+t.gridOffset.x,a=Math.floor((i-t.gridOffset.y)/t.gridSize)*t.gridSize+t.gridOffset.y;if(this.origin={x:s,y:a},this.columns=Math.max(2,Math.floor((o-s)/t.gridSize)+1),this.rows=Math.max(2,Math.floor((r-a)/t.gridSize)+1),this.searchBounds={minX:s,minY:a,maxX:s+(this.columns-1)*t.gridSize,maxY:a+(this.rows-1)*t.gridSize},this.bestCost=new Float64Array(this.rows*this.columns).fill(Number.POSITIVE_INFINITY),this.closed=new Uint8Array(this.rows*this.columns),this.endpointCollides(t.start)||this.endpointCollides(t.end))return this.failed=!0,this.error=\"Grid-route endpoint violates obstacle clearance\",this.targetCell={row:0,column:0},this.MAX_ITERATIONS=1,void(this.stats=this.createStats());const A=this.pointToCell(t.start);this.targetCell=this.pointToCell(t.end);const c={...A,x:t.start.x,y:t.start.y,g:0,f:this.heuristic(t.start),parentIndex:-1};this.nodes.push(c),this.open.push(0,c.f),this.bestCost[this.toFlatIndex(A.row,A.column)]=0,this.MAX_ITERATIONS=Math.min(5e3,Math.max(1e3,this.rows*this.columns*2)),this.stats=this.createStats()}endpointCollides(t){return this.problem.obstacleIndex.collides({start:t,end:t,layer:this.problem.layer,width:this.problem.traceWidth,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance})}getSolverName(){return`ObstacleAwareGridRouteSolver(${this.problem.gridSize.toFixed(3)}mm)`}_step(){if(this.open.size===0)return this.failed=!0,void(this.error=\"No collision-free grid route found\");const t=this.open.pop(),e=this.nodes[t],n=this.toFlatIndex(e.row,e.column);if(!this.closed[n]){if(this.closed[n]=1,this.closedCellCount++,e.row===this.targetCell.row\u0026\u0026e.column===this.targetCell.column\u0026\u0026this.getAllowedConnector(e,this.problem.end)!==null)return this.output={points:this.reconstructPath(t),traceWidth:this.problem.traceWidth,gridSize:this.problem.gridSize,gridOffset:this.problem.gridOffset},this.solved=!0,void(this.stats=this.createStats());for(const[o,i]of ago){const r=e.row+o,s=e.column+i;if(r\u003c0||r\u003e=this.rows||s\u003c0||s\u003e=this.columns)continue;const a=this.toFlatIndex(r,s);if(this.closed[a])continue;const A=this.cellToPoint(r,s),c=this.getAllowedConnector(e,A);if(c===null)continue;const l=e.parentIndex===-1\u0026\u0026this.problem.requireOctilinear?SW(c):this.problem.gridSize*(o!==0\u0026\u0026i!==0?Math.SQRT2:1),u=e.g+l;if(u\u003e=this.bestCost[a])continue;this.bestCost[a]=u;const g=u+this.heuristic(A),h=this.nodes.length;this.nodes.push({row:r,column:s,...A,g:u,f:g,parentIndex:t}),this.open.push(h,g)}this.stats=this.createStats()}}segmentCollides(t,e){return this.problem.obstacleIndex.collides({start:t,end:e,layer:this.problem.layer,width:this.problem.traceWidth,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance})}getAllowedConnector(t,e){return this.problem.requireOctilinear\u0026\u0026(\"parentIndex\"in t\u0026\u0026t.parentIndex===-1||SN(e,this.problem.end))?_7t(t,e).find(n=\u003en.slice(0,-1).every((o,i)=\u003e!this.segmentCollides(o,n[i+1])))??null:this.segmentCollides(t,e)?null:[t,e]}pointToCell(t){return{column:th(Math.round((t.x-this.origin.x)/this.problem.gridSize),0,this.columns-1),row:th(Math.round((t.y-this.origin.y)/this.problem.gridSize),0,this.rows-1)}}cellToPoint(t,e){return{x:this.origin.x+e*this.problem.gridSize,y:this.origin.y+t*this.problem.gridSize}}toFlatIndex(t,e){return t*this.columns+e}heuristic(t){return Math.hypot(this.problem.end.x-t.x,this.problem.end.y-t.y)}reconstructPath(t){const e=[];let n=t;for(;n\u003e=0;){const r=this.nodes[n];e.push({x:r.x,y:r.y}),n=r.parentIndex}if(e.reverse(),SN(e[0],this.problem.start)||e.unshift({...this.problem.start}),SN(e[e.length-1],this.problem.end)||e.push({...this.problem.end}),this.problem.requireOctilinear){const r=[e[0]];for(let s=0;s\u003ce.length-1;s++){const a=e[s],A=e[s+1],c=s===0||s===e.length-2?this.getAllowedConnector(s===0?{...a,parentIndex:-1}:a,A):[a,A];if(!c)return e;r.push(...c.slice(1))}return r.filter((s,a,A)=\u003e{if(a===0||a===A.length-1)return!0;const c=A[a-1],l=A[a+1],u=(s.x-c.x)*(l.y-s.y)-(s.y-c.y)*(l.x-s.x);return Math.abs(u)\u003e1e-8||!fce(c,l)})}const o=[e[0]];let i=0;for(;i\u003ce.length-1;){let r=e.length-1;for(;r\u003ei+1\u0026\u0026this.segmentCollides(e[i],e[r]);)r--;o.push(e[r]),i=r}return o.filter((r,s,a)=\u003e{if(s===0||s===a.length-1)return!0;const A=a[s-1],c=a[s+1],l=(r.x-A.x)*(c.y-r.y)-(r.y-A.y)*(c.x-r.x);return Math.abs(l)\u003e1e-8})}createStats(){return{phase:\"obstacle-aware-grid-search\",gridSize:this.problem.gridSize,traceWidth:this.problem.traceWidth,gridOffset:this.problem.gridOffset,openCells:this.open.size,closedCells:this.closedCellCount,gridCells:this.rows*this.columns}}computeProgress(){return Math.min(.99,this.iterations/this.MAX_ITERATIONS)}getOutput(){return this.output}getConstructorParams(){const{obstacleIndex:t,...e}=this.problem;return[e]}visualize(){const t=this.nodes.filter(n=\u003ethis.closed[this.toFlatIndex(n.row,n.column)]).slice(-2e3).map(n=\u003e({x:n.x,y:n.y,color:\"rgba(0,90,255,0.22)\"})),e=this.output?.points??[];return{coordinateSystem:\"cartesian\",title:this.getSolverName(),rects:[{center:{x:(this.searchBounds.minX+this.searchBounds.maxX)/2,y:(this.searchBounds.minY+this.searchBounds.maxY)/2},width:this.searchBounds.maxX-this.searchBounds.minX,height:this.searchBounds.maxY-this.searchBounds.minY,stroke:\"#777\"}],points:[...t,{...this.problem.start,color:\"green\",label:\"reroute start\"},{...this.problem.end,color:\"purple\",label:\"reroute target\"}],lines:e.length\u003e1?[{points:e,strokeColor:\"#00a050\",strokeWidth:this.problem.traceWidth}]:[],circles:[],texts:[]}}},ub=class{items;clearance;boardEdgeClearance;boardLayers;minViaHoleEdgeToViaHoleEdgeClearance;defaultViaHoleDiameter;bounds;maxIndexedViaHoleDiameter;index;connectionNameSets;copperObjectIds;connectionNameResolver;connectedPads;dynamicTraceIndex;constructor(t,e,n,o=[],i=new Tv(t,e)){var r;this.bounds=t.bounds,this.boardLayers=(r=t.layerCount,[\"top\",...Array.from({length:Math.max(0,r-2)},(s,a)=\u003e`inner${a+1}`),...r\u003e1?[\"bottom\"]:[]]),this.dynamicTraceIndex=n,this.clearance=Math.max(t.defaultObstacleMargin??0,t.minTraceToPadEdgeClearance??0,.1),this.boardEdgeClearance=t.minBoardEdgeClearance??this.clearance,this.minViaHoleEdgeToViaHoleEdgeClearance=Math.max(t.minViaHoleEdgeToViaHoleEdgeClearance??0,.1),this.defaultViaHoleDiameter=t.min_via_hole_diameter??t.minViaHoleDiameter??.3,this.items=[...t.obstacles.flatMap((s,a)=\u003e(function(A,c=.6){const l=(A.ccwRotationDegrees??0)*Math.PI/180,u=Math.max(1,Math.ceil(A.width/c)),g=Math.max(1,Math.ceil(A.height/c)),h=A.width/u,d=A.height/g,p=[];for(let m=0;m\u003cg;m++)for(let _=0;_\u003cu;_++){const f={x:A.center.x-A.width/2+(_+.5)*h,y:A.center.y-A.height/2+(m+.5)*d},I=h/2,C=d/2,y=[{x:f.x-I,y:f.y-C},{x:f.x+I,y:f.y-C},{x:f.x+I,y:f.y+C},{x:f.x-I,y:f.y+C}].map(x=\u003etgo(x,A.center,l));p.push({minX:Math.min(...y.map(x=\u003ex.x)),minY:Math.min(...y.map(x=\u003ex.y)),maxX:Math.max(...y.map(x=\u003ex.x)),maxY:Math.max(...y.map(x=\u003ex.y)),layers:A.layers,kind:\"obstacle\",obstacleKind:A.connectedTo[0]?.startsWith(\"pcb_via_\")?\"via\":A.connectedTo[0]?.startsWith(\"pcb_smtpad_\")||A.connectedTo[0]?.startsWith(\"pcb_plated_hole_\")?\"pad\":\"other\",connectionNames:A.connectedTo,exactShape:{type:\"polygon\",points:y}})}return p})(s).map(A=\u003e({...A,copperObjectId:`obstacle:${a}`}))),...this.createTraceItems(t.fixedTraces??[],!0),...this.createTraceItems(e),...o],this.maxIndexedViaHoleDiameter=this.items.reduce((s,a)=\u003ea.kind===\"via\"?Math.max(s,a.viaHoleDiameter??this.defaultViaHoleDiameter):s,this.defaultViaHoleDiameter),this.connectionNameResolver=i,this.connectionNameSets=this.items.map(s=\u003enew Set(i.canonicalize(s.connectionNames))),this.copperObjectIds=this.items.map((s,a)=\u003es.copperObjectId??`indexed-item:${a}`),this.connectedPads=t.obstacles.flatMap(s=\u003es.connectedTo.some(a=\u003ea.startsWith(\"pcb_smtpad_\")||a.startsWith(\"pcb_plated_hole_\"))?[{obstacle:s,canonicalConnectionNames:new Set(i.canonicalize(s.connectedTo))}]:[]),this.index=this.items.length\u003e0?new X4(this.items.length):null;for(const s of this.items)this.index.add(s.minX,s.minY,s.maxX,s.maxY);this.index?.finish()}createTraceItems(t,e=!1){const n=[];for(let o=0;o\u003ct.length;o++){const i=t[o],r=e?void 0:o,s=`${e?\"fixed-trace\":\"trace\"}:${o}`,a=!e\u0026\u0026o===this.dynamicTraceIndex,A=[i.connection_name,i.source_trace_id,i.rootConnectionName,...i.mergedConnectionNames??[],...i.connectsTo??[]].filter(c=\u003e!!c);for(let c=0;c\u003ci.route.length;c++){const l=i.route[c];if(l.route_type===\"via\"){const g=l.via_diameter??.6;n.push({minX:l.x-g/2,minY:l.y-g/2,maxX:l.x+g/2,maxY:l.y+g/2,layers:this.boardLayers,kind:\"via\",connectionNames:A,copperObjectId:s,traceIndex:r,routeStartIndex:c,routeEndIndex:c,viaHoleDiameter:l.via_hole_diameter??this.defaultViaHoleDiameter,exactShape:{type:\"circle\",center:{x:l.x,y:l.y},radius:g/2}});continue}if(a)continue;const u=i.route[c+1];l.route_type===\"wire\"\u0026\u0026u?.route_type===\"wire\"\u0026\u0026l.layer===u.layer\u0026\u0026n.push(...p7t({start:l,end:u,width:l.width,base:{layers:[l.layer],kind:\"trace\",connectionNames:A,copperObjectId:s,traceIndex:r,routeStartIndex:c,routeEndIndex:c+1}}))}}return n}collides(t){if(this.isOutsideBounds(t))return!0;const{radius:e,candidates:n,canonicalConnectionNames:o}=this.getCollisionCandidates(t);for(const i of n)if(this.itemCollides(i,t,e,o))return!0;return!1}findCollisions(t){const{radius:e,candidates:n,canonicalConnectionNames:o}=this.getCollisionCandidates(t),i=[];for(const r of n)this.itemCollides(r,t,e,o)\u0026\u0026i.push(this.items[r]);return i}getSameNetCopperContactIds(t){const e=t.width/2,n=this.index?.search(Math.min(t.start.x,t.end.x)-e,Math.min(t.start.y,t.end.y)-e,Math.max(t.start.x,t.end.x)+e,Math.max(t.start.y,t.end.y)+e)??[],o=new Set(this.connectionNameResolver.canonicalize(t.connectionNames)),i=new Set;for(const r of n){const s=this.items[r];s.layers.includes(t.layer)\u0026\u0026(s.traceIndex===t.ignoreTraceIndex||t.ignoreTraceIndices?.includes(s.traceIndex??-1)||[...this.connectionNameSets[r]].some(a=\u003eo.has(a))\u0026\u0026this.itemCopperTouches(s,t,e)\u0026\u0026i.add(this.copperObjectIds[r]))}return i}getConnectedPadWidthLimit(t){if(Math.hypot(t.end.x-t.start.x,t.end.y-t.start.y)\u003c=1e-5)return null;const e=this.getConnectedPadWidthLimitAtPoint(t,t.start),n=this.getConnectedPadWidthLimitAtPoint(t,t.end);return e===null?n:n===null?e:Math.min(e,n)}getConnectedPadWidthLimitAtPoint(t,e){const n=this.getConnectedPadsAtPoint(t,e);return n.length===0?null:Math.max(...n.map(({obstacle:o})=\u003ethis.getPadWidthNormalToQuery(o,t)))}getConnectedPadEndpointWidthLimitAtPoint(t,e){const n=this.getConnectedPadsAtPoint(t,e);return n.length===0?null:Math.max(...n.map(({obstacle:o})=\u003e{const i=this.getObstacleLocalPoint(e,o);return Math.max(0,2*Math.min(o.width/2-Math.abs(i.x),o.height/2-Math.abs(i.y)))}))}getConnectedPadBoundaryPoint(t,e){const n=e===\"start\"?t.start:t.end,o=e===\"start\"?t.end:t.start,i=this.getConnectedPadsAtPoint(t,n).sort((r,s)=\u003ethis.getPadWidthNormalToQuery(s.obstacle,t)-this.getPadWidthNormalToQuery(r.obstacle,t))[0];return!i||this.pointIsInsideObstacle(o,i.obstacle)?null:this.getObstacleBoundaryPoint(n,o,i.obstacle)}getConnectedPadsAtPoint(t,e){const n=new Set(this.connectionNameResolver.canonicalize(t.connectionNames));return this.connectedPads.filter(({obstacle:o,canonicalConnectionNames:i})=\u003eo.layers.includes(t.layer)\u0026\u0026[...i].some(r=\u003en.has(r))\u0026\u0026this.pointIsInsideObstacle(e,o))}pointIsInsideObstacle(t,e){const{x:n,y:o}=this.getObstacleLocalPoint(t,e);return Math.abs(n)\u003c=e.width/2+1e-9\u0026\u0026Math.abs(o)\u003c=e.height/2+1e-9}getObstacleLocalPoint(t,e){const n=-(e.ccwRotationDegrees??0)*Math.PI/180,o=Math.cos(n),i=Math.sin(n),r=t.x-e.center.x,s=t.y-e.center.y;return{x:r*o-s*i,y:r*i+s*o}}getPadWidthNormalToQuery(t,e){const n=e.end.x-e.start.x,o=e.end.y-e.start.y,i=Math.hypot(n,o);if(i\u003c=1e-9)return Math.min(t.width,t.height);const r=-o/i,s=n/i,a=-(t.ccwRotationDegrees??0)*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=r*A-s*c,u=r*c+s*A;return Math.abs(l)*t.width+Math.abs(u)*t.height}getObstacleBoundaryPoint(t,e,n){const o=-(n.ccwRotationDegrees??0)*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=g=\u003e{const h=g.x-n.center.x,d=g.y-n.center.y;return{x:h*i-d*r,y:h*r+d*i}},a=s(t),A=s(e),c={x:A.x-a.x,y:A.y-a.y},l=[];if(Math.abs(c.x)\u003e1e-12){const g=c.x\u003e0?n.width/2:-n.width/2;l.push((g-a.x)/c.x)}if(Math.abs(c.y)\u003e1e-12){const g=c.y\u003e0?n.height/2:-n.height/2;l.push((g-a.y)/c.y)}const u=Math.min(...l.filter(g=\u003eg\u003e=0\u0026\u0026g\u003c=1));return Number.isFinite(u)?{x:t.x+(e.x-t.x)*u,y:t.y+(e.y-t.y)*u}:null}getConnectedLayersAtPoint(t,e){const n=new Set(this.connectionNameResolver.canonicalize(e)),o=new Set,i=this.index?.search(t.x,t.y,t.x,t.y)??[];for(const r of i){const s=this.items[r];if(s.kind===\"obstacle\"\u0026\u0026[...this.connectionNameSets[r]].some(a=\u003en.has(a))\u0026\u0026(s.exactShape?.type===\"polygon\"?YSe(t,t,s.exactShape.points)\u003c=1e-9:s.exactShape?.type===\"circle\"?Math.hypot(s.exactShape.center.x-t.x,s.exactShape.center.y-t.y)\u003c=s.exactShape.radius+1e-9:t.x\u003e=s.minX-1e-9\u0026\u0026t.x\u003c=s.maxX+1e-9\u0026\u0026t.y\u003e=s.minY-1e-9\u0026\u0026t.y\u003c=s.maxY+1e-9))for(const a of s.layers)o.add(a)}return[...o]}collidesVia(t){return this.getViaViolationSignatures(t).size\u003e0}getViaViolationSignatures(t){const e=new Set;for(const a of t.layers){const A={start:t.point,end:t.point,layer:a,width:t.padDiameter,connectionNames:t.connectionNames,ignoreTraceIndex:t.ignoreTraceIndex,ignoreTraceIndices:t.ignoreTraceIndices,ignoreRouteRange:t.ignoreRouteRange,obstacleClearance:t.obstacleClearance,blockSameNetObstacles:t.blockSameNetObstacles,sameNetObstacleClearance:t.sameNetObstacleClearance};this.isOutsideBounds(A)\u0026\u0026e.add(`board-edge:${a}`);const{radius:c,candidates:l,canonicalConnectionNames:u}=this.getCollisionCandidates(A);for(const g of l)this.itemCollides(g,A,c,u)\u0026\u0026e.add(`copper:${a}:${this.getViolationObjectId(g)}`)}const n=t.holeDiameter+this.minViaHoleEdgeToViaHoleEdgeClearance;for(const a of t.otherNewViaPoints??[])Math.hypot(a.x-t.point.x,a.y-t.point.y)\u003cn-1e-9\u0026\u0026e.add(`new-via-drill:${a.x},${a.y}:${t.holeDiameter}`);const o=t.fixedVias??[];for(let a=0;a\u003co.length;a++){const A=o[a],c=t.holeDiameter/2+A.holeDiameter/2+this.minViaHoleEdgeToViaHoleEdgeClearance;Math.hypot(A.point.x-t.point.x,A.point.y-t.point.y)\u003cc-1e-9\u0026\u0026e.add(`fixed-via-drill:${a}:${A.point.x},${A.point.y}:${A.holeDiameter}`)}const i=t.holeDiameter/2+this.maxIndexedViaHoleDiameter/2+this.minViaHoleEdgeToViaHoleEdgeClearance,r=this.index?.search(t.point.x-i,t.point.y-i,t.point.x+i,t.point.y+i)??[],s=new Set;for(const a of r){const A=this.items[a];if(A.kind!==\"via\"||A.exactShape?.type!==\"circle\"||A.traceIndex===t.ignoreTraceIndex\u0026\u0026t.ignoreRouteRange\u0026\u0026(A.routeEndIndex??-1)\u003e=t.ignoreRouteRange.start\u0026\u0026(A.routeStartIndex??Number.POSITIVE_INFINITY)\u003c=t.ignoreRouteRange.end||t.ignoreTraceIndices?.includes(A.traceIndex??-1))continue;const c=`${this.copperObjectIds[a]??\"unknown\"}:${A.routeStartIndex??-1}`;if(s.has(c))continue;s.add(c);const l=A.viaHoleDiameter??this.defaultViaHoleDiameter,u=t.holeDiameter/2+l/2+this.minViaHoleEdgeToViaHoleEdgeClearance;Math.hypot(A.exactShape.center.x-t.point.x,A.exactShape.center.y-t.point.y)\u003cu-1e-9\u0026\u0026e.add(`indexed-via-drill:${this.getViolationObjectId(a)}`)}return e}getViolationObjectId(t){const e=this.items[t],n=this.copperObjectIds[t],o=`${e.routeStartIndex??\"\"}-${e.routeEndIndex??\"\"}`;if(e.kind===\"obstacle\")return n;if(e.exactShape?.type===\"segment\"){const{start:i,end:r,width:s}=e.exactShape;return`${n}:${e.kind}:${o}:${i.x},${i.y}:${r.x},${r.y}:${s}`}if(e.exactShape?.type===\"circle\"){const{center:i,radius:r}=e.exactShape;return`${n}:${e.kind}:${o}:${i.x},${i.y}:${r}`}return e.exactShape?.type===\"polygon\"?`${n}:${e.kind}:${o}:${e.exactShape.points.map(i=\u003e`${i.x},${i.y}`).join(\";\")}`:`${n}:${e.kind}:${o}:${e.minX},${e.minY},${e.maxX},${e.maxY}`}getCollisionCandidates(t){const e=Math.max(this.clearance,t.obstacleClearance??this.clearance,t.sameNetObstacleClearance??0),n=t.width/2+e,o={minX:Math.min(t.start.x,t.end.x)-n,minY:Math.min(t.start.y,t.end.y)-n,maxX:Math.max(t.start.x,t.end.x)+n,maxY:Math.max(t.start.y,t.end.y)+n};return{radius:n,candidates:this.index?.search(o.minX,o.minY,o.maxX,o.maxY)??[],canonicalConnectionNames:this.connectionNameResolver.canonicalize(t.connectionNames)}}itemCollides(t,e,n,o){const i=this.items[t];if(!i.layers.includes(e.layer))return!1;const r=this.connectionNameSets[t],s=o.some(c=\u003er.has(c));if(s\u0026\u0026(!e.blockSameNetObstacles||i.kind!==\"obstacle\"||i.obstacleKind===\"via\")||i.kind===\"trace\"\u0026\u0026e.ignoreTraceIndices?.includes(i.traceIndex??-1)||i.kind===\"trace\"\u0026\u0026i.traceIndex===e.ignoreTraceIndex\u0026\u0026e.ignoreRouteRange\u0026\u0026(i.routeEndIndex??-1)\u003e=e.ignoreRouteRange.start\u0026\u0026(i.routeStartIndex??Number.POSITIVE_INFINITY)\u003c=e.ignoreRouteRange.end)return!1;const a=i.kind===\"obstacle\"\u0026\u0026i.obstacleKind===\"pad\"?s\u0026\u0026e.blockSameNetObstacles?e.sameNetObstacleClearance??e.obstacleClearance??this.clearance:e.obstacleClearance??this.clearance:this.clearance,A=e.width/2+a;return i.exactShape?.type===\"segment\"?GSe(e.start,e.end,i.exactShape.start,i.exactShape.end)\u003c=A+i.exactShape.width/2+1e-9:i.exactShape?.type===\"polygon\"?YSe(e.start,e.end,i.exactShape.points)\u003c=A+1e-9:i.exactShape?.type===\"circle\"?bN(i.exactShape.center,e.start,e.end)\u003c=A+i.exactShape.radius+1e-9:h7t(e.start,e.end,{minX:i.minX-A,minY:i.minY-A,maxX:i.maxX+A,maxY:i.maxY+A})}itemCopperTouches(t,e,n){return t.exactShape?.type===\"segment\"?GSe(e.start,e.end,t.exactShape.start,t.exactShape.end)\u003c=n+t.exactShape.width/2+1e-9:t.exactShape?.type===\"polygon\"?YSe(e.start,e.end,t.exactShape.points)\u003c=n+1e-9:t.exactShape?.type===\"circle\"?bN(t.exactShape.center,e.start,e.end)\u003c=n+t.exactShape.radius+1e-9:h7t(e.start,e.end,{minX:t.minX-n,minY:t.minY-n,maxX:t.maxX+n,maxY:t.maxY+n})}isOutsideBounds(t){const e=t.width/2+this.boardEdgeClearance;return Math.min(t.start.x,t.end.x)-e\u003cthis.bounds.minX||Math.max(t.start.x,t.end.x)+e\u003ethis.bounds.maxX||Math.min(t.start.y,t.end.y)-e\u003cthis.bounds.minY||Math.max(t.start.y,t.end.y)+e\u003ethis.bounds.maxY}},f7t=[{x:0,y:0},{x:.5,y:0},{x:0,y:.5},{x:.5,y:.5}],dB=t=\u003et?.route_type===\"wire\",pH=class extends BN{inputProblem;traces;corridor;phase=\"scan-corridor\";corridorCursor=0;blockerCursor=0;offsetCursor=0;resolutionCursor=0;attemptedGridCount=0;blockerIndex;connectionNameResolver;connectionByTraceId=new Map;mutableTraceIndices;blockersByTrace=new Map;blockers=[];currentBlocker=null;currentRange=null;currentTraceWidth=0;gridResolutions=[];currentObstacleIndex=null;output=null;constructor(t,e=new Tv(t.simpleRouteJson,t.traces)){super(),this.inputProblem=structuredClone(t),this.traces=structuredClone(t.traces),this.corridor=structuredClone(t.corridor),this.mutableTraceIndices=t.mutableTraceIndices?new Set(t.mutableTraceIndices):null,this.connectionNameResolver=e,this.blockerIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,t.powerTraceIndex,[],this.connectionNameResolver),this.activeSubSolver=null,this.MAX_ITERATIONS=25e3,this.stats=this.createStats()}getSolverName(){return\"LocalTraceInflationSolver\"}_step(){if(this.activeSubSolver)return this.stepActiveSubSolver(),void(this.stats=this.createStats());switch(this.phase){case\"scan-corridor\":this.scanNextCorridorSegment();break;case\"select-blocker\":this.selectNextBlocker();break;case\"try-elastic-push\":break;case\"try-grid-candidate\":this.startNextGridCandidate();break;case\"complete\":this.output?this.solved=!0:(this.failed=!0,this.error=\"No locally reroutable trace blocks the power corridor\")}this.stats=this.createStats()}scanNextCorridorSegment(){const t=this.corridor[this.corridorCursor];if(!t)return this.blockers=[...this.blockersByTrace.values()].sort((o,i)=\u003eo.traceIndex-i.traceIndex),void(this.phase=\"select-blocker\");const e=this.traces[this.inputProblem.powerTraceIndex],n=this.blockerIndex.findCollisions({start:t.start,end:t.end,layer:t.layer,width:t.width,connectionNames:e?this.getTraceConnectionNames(e):[]});for(const o of n)this.recordBlockingTrace(o);this.corridorCursor++}recordBlockingTrace(t){if(t.kind!==\"trace\"||t.traceIndex===void 0||t.routeStartIndex===void 0||t.routeEndIndex===void 0||t.traceIndex===this.inputProblem.powerTraceIndex||this.mutableTraceIndices!==null\u0026\u0026!this.mutableTraceIndices.has(t.traceIndex))return;const e=this.traces[t.traceIndex];if(!e)return;const n=this.findConnectionForTrace(e);if((n?this.resolveNominalTraceWidth(n):this.getTraceNominalWidth(e))\u003e=(this.inputProblem.pushOnlyNominalWidthsBelow??this.inputProblem.nominalPowerWidth)-Ki)return;const o=this.blockersByTrace.get(t.traceIndex);if(o)return o.firstRouteIndex=Math.min(o.firstRouteIndex,t.routeStartIndex),void(o.lastRouteIndex=Math.max(o.lastRouteIndex,t.routeEndIndex));this.blockersByTrace.set(t.traceIndex,{traceIndex:t.traceIndex,firstRouteIndex:t.routeStartIndex,lastRouteIndex:t.routeEndIndex})}selectNextBlocker(){if(this.currentBlocker=this.blockers[this.blockerCursor]??null,!this.currentBlocker)return void(this.phase=\"complete\");const t=this.findStableAnchorRange(this.currentBlocker);if(!t)return void this.blockerCursor++;const e=this.traces[this.currentBlocker.traceIndex];this.currentRange=t,this.currentTraceWidth=this.getRangeWidth(e,t),this.gridResolutions=this.getGridResolutions(this.currentTraceWidth),this.resolutionCursor=0,this.offsetCursor=0,this.currentObstacleIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,this.currentBlocker.traceIndex,this.createInflatedCorridorItems(),this.connectionNameResolver),this.activeSubSolver=new USe({trace:e,range:t,layer:e.route[t.startIndex].layer,traceWidth:this.currentTraceWidth,corridor:this.corridor,obstacleIndex:this.currentObstacleIndex,connectionNames:this.getTraceConnectionNames(e)}),this.phase=\"try-elastic-push\"}findStableAnchorRange(t){const e=this.traces[t.traceIndex];if(!e)return null;let n=t.firstRouteIndex,o=t.lastRouteIndex;for(;n\u003e0;){const A=e.route[n];if(dB(A)\u0026\u0026this.pointClearsCorridor(A))break;n--}for(;o\u003ce.route.length-1;){const A=e.route[o];if(dB(A)\u0026\u0026this.pointClearsCorridor(A))break;o++}const i=e.route[n],r=e.route[o];if(!dB(i)||!dB(r)||i.layer!==r.layer||!this.pointClearsCorridor(i)||!this.pointClearsCorridor(r)||n\u003e=o)return null;const s={startIndex:n,endIndex:o},a=this.getRangeLength(e,s);return!Number.isFinite(a)||a\u003e(this.inputProblem.maxRerouteLength??10)+Ki?null:s}pointClearsCorridor(t){return this.corridor.every(e=\u003e{if(e.layer!==t.layer)return!0;const n=e.width/2+t.width/2+this.blockerIndex.clearance;return bN(t,e.start,e.end)\u003e=n-Ki})}startNextGridCandidate(){if(!this.currentBlocker||!this.currentRange)return void(this.phase=\"select-blocker\");if(this.resolutionCursor\u003e=this.gridResolutions.length)return this.blockerCursor++,void(this.phase=\"select-blocker\");if(this.offsetCursor\u003e=f7t.length)return this.resolutionCursor++,void(this.offsetCursor=0);const t=this.traces[this.currentBlocker.traceIndex],e=t.route[this.currentRange.startIndex],n=t.route[this.currentRange.endIndex];if(!dB(e)||!dB(n))return this.blockerCursor++,void(this.phase=\"select-blocker\");const o=this.gridResolutions[this.resolutionCursor],i=f7t[this.offsetCursor],r=this.currentObstacleIndex;if(!r)return this.blockerCursor++,void(this.phase=\"select-blocker\");this.attemptedGridCount++,this.activeSubSolver=new Ice({start:e,end:n,layer:e.layer,traceWidth:this.currentTraceWidth,gridSize:o,gridOffset:{x:i.x*o,y:i.y*o},connectionNames:this.getTraceConnectionNames(t),obstacleIndex:r,ignoreTraceIndex:this.currentBlocker.traceIndex,ignoreRouteRange:{start:this.currentRange.startIndex,end:this.currentRange.endIndex},bounds:this.inputProblem.simpleRouteJson.bounds,searchPadding:th(2.5*this.inputProblem.nominalPowerWidth,1.5,4)})}stepActiveSubSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput();if(e)return this.applyRoute(e,t instanceof USe?\"elastic\":\"grid\"),this.activeSubSolver=null,void(this.phase=\"complete\")}this.failedSubSolvers??=[],this.failedSubSolvers.push(t),this.activeSubSolver=null,t instanceof USe?this.phase=\"try-grid-candidate\":this.offsetCursor++}}applyRoute(t,e){const n=this.currentBlocker,o=this.currentRange,i=this.traces[n.traceIndex],r=i.route[o.startIndex],s=i.route[o.endIndex],a=t.points.map(A=\u003e({route_type:\"wire\",x:A.x,y:A.y,width:this.currentTraceWidth,layer:r.layer}));a[0].width=Math.max(a[0].width,r.width),a[a.length-1].width=Math.max(a[a.length-1].width,s.width),i.route.splice(o.startIndex,o.endIndex-o.startIndex+1,...a),this.output={traces:this.traces,pushedTraceIndex:n.traceIndex,replacedRange:o,strategy:e}}createInflatedCorridorItems(){return this.corridor.flatMap(t=\u003ep7t({start:t.start,end:t.end,width:t.width,base:{layers:[t.layer],kind:\"obstacle\",connectionNames:[]}}))}getGridResolutions(t){return[th(1.5*t,.1,.3),th(.75*t,.08,.18)].filter((e,n,o)=\u003eo.findIndex(i=\u003eMath.abs(i-e)\u003cKi)===n)}getRangeWidth(t,e){let n=this.inputProblem.simpleRouteJson.minTraceWidth;for(let o=e.startIndex;o\u003c=e.endIndex;o++){const i=t.route[o];dB(i)\u0026\u0026(n=Math.max(n,i.width))}return n}getRangeLength(t,e){let n=0;for(let o=e.startIndex;o\u003ce.endIndex;o++){const i=t.route[o],r=t.route[o+1];if(!dB(i)||!dB(r)||i.layer!==r.layer)return Number.POSITIVE_INFINITY;n+=Aa(i,r)}return n}resolveNominalTraceWidth(t){return Math.max(t.nominalTraceWidth??t.width??this.inputProblem.simpleRouteJson.nominalTraceWidth??this.inputProblem.simpleRouteJson.minTraceWidth,this.inputProblem.simpleRouteJson.minTraceWidth)}getTraceNominalWidth(t){return t.route.reduce((e,n)=\u003en.route_type===\"wire\"?Math.max(e,n.width):e,this.inputProblem.simpleRouteJson.minTraceWidth)}findConnectionForTrace(t){const e=this.connectionByTraceId.get(t.pcb_trace_id);if(e!==void 0)return e??void 0;const n=this.getTraceConnectionNames(t),o=this.inputProblem.simpleRouteJson.connections.find(i=\u003e[i.name,i.source_trace_id,i.rootConnectionName,i.netConnectionName,...i.mergedConnectionNames??[]].filter(r=\u003e!!r).some(r=\u003en.includes(r)))??null;return this.connectionByTraceId.set(t.pcb_trace_id,o),o??void 0}getTraceConnectionNames(t){return[t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[]].filter(e=\u003e!!e)}createStats(){return{phase:this.phase,corridorSegment:this.corridorCursor,corridorSegmentCount:this.corridor.length,blockingTraceCount:this.blockersByTrace.size,blockerCursor:this.blockerCursor,pushedTraceIndex:this.currentBlocker?.traceIndex,anchorRange:this.currentRange,traceWidth:this.currentTraceWidth,gridSize:this.gridResolutions[this.resolutionCursor],gridOffsetVariant:this.offsetCursor,attemptedGridCount:this.attemptedGridCount}}computeProgress(){return this.phase===\"scan-corridor\"?this.corridor.length===0?.25:this.corridorCursor/this.corridor.length*.25:this.blockers.length===0?.5:Math.min(.99,.25+this.blockerCursor/this.blockers.length)}getOutput(){return this.output}getConstructorParams(){return[this.inputProblem]}visualize(){const t=[];for(let e=0;e\u003cthis.traces.length;e++){const n=this.traces[e];for(let o=0;o\u003cn.route.length-1;o++){const i=n.route[o],r=n.route[o+1];dB(i)\u0026\u0026dB(r)\u0026\u0026i.layer===r.layer\u0026\u0026t.push({points:[i,r],strokeColor:e===this.currentBlocker?.traceIndex?\"#1769d2\":\"#777\",strokeWidth:Math.max(i.width,r.width)})}}for(const e of this.corridor)t.push({points:[e.start,e.end],strokeColor:\"rgba(255, 128, 0, 0.55)\",strokeWidth:e.width});return{coordinateSystem:\"cartesian\",title:this.getSolverName(),lines:t,points:[],rects:[],circles:[],texts:[]}}},nh=1e-6,QN=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),gb=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i,s=r\u003c=1e-12?0:Math.max(0,Math.min(1,((t.x-e.x)*o+(t.y-e.y)*i)/r));return Math.hypot(t.x-(e.x+s*o),t.y-(e.y+s*i))},Cce=(t,e,n)=\u003e(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),VSe=(t,e,n,o)=\u003e((i,r,s,a)=\u003e{const A=Cce(s,a,i),c=Cce(s,a,r),l=Cce(i,r,s),u=Cce(i,r,a);return(A\u003e0\u0026\u0026c\u003c0||A\u003c0\u0026\u0026c\u003e0)\u0026\u0026(l\u003e0\u0026\u0026u\u003c0||l\u003c0\u0026\u0026u\u003e0)})(t,e,n,o)?0:Math.min(gb(t,n,o),gb(e,n,o),gb(n,t,e),gb(o,t,e)),QW=t=\u003e{const e=(t.ccwRotationDegrees??0)*Math.PI/180,n=Math.cos(e),o=Math.sin(e);return[{x:-t.width/2,y:-t.height/2},{x:t.width/2,y:-t.height/2},{x:t.width/2,y:t.height/2},{x:-t.width/2,y:t.height/2}].map(i=\u003e({x:t.center.x+i.x*n-i.y*o,y:t.center.y+i.x*o+i.y*n}))},mH=t=\u003e{if(!(t.type===\"oval\"||t.shape===\"circle\"))return!1;if(Math.abs(t.width-t.height)\u003enh)throw new Error(`Physical connectivity does not yet support non-circular oval obstacle ${t.obstacleId??\"\u003cunknown\u003e\"}`);return!0},vW=(t,e)=\u003e{for(let o=0;o\u003ce.length;o++)if(gb(t,e[o],e[(o+1)%e.length])\u003c=nh)return!0;let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o],s=e[i];r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},wW=(t,e)=\u003e{if(mH(e))return Math.max(0,QN(t,e.center)-e.width/2);const n=QW(e);return vW(t,n)?0:Math.min(...n.map((o,i)=\u003egb(t,o,n[(i+1)%n.length])))},I7t=(t,e)=\u003e{if(mH(t))return mH(e)?Math.max(0,QN(t.center,e.center)-t.width/2-e.width/2):Math.max(0,wW(t.center,e)-t.width/2);if(mH(e))return I7t(e,t);const n=QW(t),o=QW(e);if(vW(n[0],o)||vW(o[0],n))return 0;let i=Number.POSITIVE_INFINITY;for(let r=0;r\u003cn.length;r++)for(let s=0;s\u003co.length;s++)i=Math.min(i,VSe(n[r],n[(r+1)%n.length],o[s],o[(s+1)%o.length]));return i},yce=(t,e)=\u003e({minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}),xce=t=\u003e({minX:t.x,minY:t.y,maxX:t.x,maxY:t.y}),C7t=t=\u003e{if(mH(t))return yce(xce(t.center),t.width/2);const e=QW(t);return{minX:Math.min(...e.map(n=\u003en.x)),minY:Math.min(...e.map(n=\u003en.y)),maxX:Math.max(...e.map(n=\u003en.x)),maxY:Math.max(...e.map(n=\u003en.y))}},vN=(t,e)=\u003e{if(!((n,o)=\u003en.layers.some(i=\u003eo.layers.includes(i)))(t,e)||!((n,o)=\u003en.maxX+nh\u003e=o.minX\u0026\u0026o.maxX+nh\u003e=n.minX\u0026\u0026n.maxY+nh\u003e=o.minY\u0026\u0026o.maxY+nh\u003e=n.minY)(t.bounds,e.bounds))return!1;if(t.kind===\"bridge-pad\"){const n={kind:\"obstacle\",obstacle:t.obstacle,layers:t.layers,bounds:t.bounds};return e.kind===\"bridge-pad\"?vN(n,{kind:\"obstacle\",obstacle:e.obstacle,layers:e.layers,bounds:e.bounds}):vN(n,e)}return e.kind===\"bridge-pad\"?vN(e,t):t.kind===\"endpoint\"?e.kind===\"endpoint\"?QN(t.point,e.point)\u003c=nh:e.kind===\"obstacle\"?wW(t.point,e.obstacle)\u003c=nh:e.kind===\"segment\"?gb(t.point,e.start,e.end)\u003c=e.width/2+nh:QN(t.point,e.center)\u003c=e.diameter/2+nh:e.kind===\"endpoint\"?vN(e,t):t.kind===\"obstacle\"?e.kind===\"obstacle\"?I7t(t.obstacle,e.obstacle)\u003c=nh:e.kind===\"segment\"?((n,o,i)=\u003e{if(mH(i))return Math.max(0,gb(i.center,n,o)-i.width/2);const r=QW(i);return vW(n,r)||vW(o,r)?0:Math.min(...r.map((s,a)=\u003eVSe(n,o,s,r[(a+1)%r.length])))})(e.start,e.end,t.obstacle)\u003c=e.width/2+nh:wW(e.center,t.obstacle)\u003c=e.diameter/2+nh:e.kind===\"obstacle\"?vN(e,t):t.kind===\"segment\"?e.kind===\"segment\"?VSe(t.start,t.end,e.start,e.end)\u003c=(t.width+e.width)/2+nh:gb(e.center,t.start,t.end)\u003c=t.width/2+e.diameter/2+nh:e.kind===\"segment\"?vN(e,t):QN(t.center,e.center)\u003c=(t.diameter+e.diameter)/2+nh},Ago=class{parent;constructor(t){this.parent=Array.from({length:t},(e,n)=\u003en)}find(t){const e=this.parent[t];if(e===t)return t;const n=this.find(e);return this.parent[t]=n,n}union(t,e){const n=this.find(t),o=this.find(e);n!==o\u0026\u0026(this.parent[o]=n)}},cgo=(t,e)=\u003e{const n=e.indexOf(t.from_layer),o=e.indexOf(t.to_layer);return n\u003c0||o\u003c0?[...new Set([t.from_layer,t.to_layer])]:e.slice(Math.min(n,o),Math.max(n,o)+1)},lgo=t=\u003e[t.pcb_trace_id,t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[],...t.connectsTo??[]].filter(e=\u003e!!e),ugo=t=\u003e[t.name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[],t.netConnectionName,...t.pointsToConnect.flatMap(e=\u003e[e.pointId,e.pcb_port_id])].filter(e=\u003e!!e),ggo=t=\u003e[t.obstacleId,...t.connectedTo,...t.offBoardConnectsTo??[]].filter(e=\u003e!!e),y7t=(t,e,n,o)=\u003e({kind:\"bridge-contact\",center:{x:t.x,y:t.y},diameter:e,layers:n,bridgeId:o,bounds:yce(xce(t),e/2)}),PW=.01,dgo={\"0603\":{horizontalWidth:.8,horizontalHeight:.95,centerSpacings:[1.65,1.8]},1206:{horizontalWidth:.6,horizontalHeight:1.6,centerSpacings:[3.2]},\"1206x4_pair\":{horizontalWidth:.8,horizontalHeight:.5,centerSpacings:[2.7]}},x7t=(t,e,n)=\u003e{if(!t.layer)throw new Error(`Jumper ${n} is missing its layer`);const o=dgo[t.footprint];if(!o)throw new Error(`Unsupported jumper footprint ${String(t.footprint)} on ${n}`);const i=Math.abs(t.end.x-t.start.x),r=Math.abs(t.end.y-t.start.y),s=l=\u003eo.centerSpacings.some(u=\u003eMath.abs(l-u)\u003cPW),a=r\u003cPW\u0026\u0026s(i),A=i\u003cPW\u0026\u0026s(r);if(!a\u0026\u0026!A)throw new Error(`Jumper ${n} does not match ${t.footprint} pad spacing`);const c={type:\"rect\",center:{...e},width:a?o.horizontalWidth:o.horizontalHeight,height:a?o.horizontalHeight:o.horizontalWidth,layers:[t.layer],connectedTo:[]};return{kind:\"bridge-pad\",obstacle:c,layers:c.layers,bridgeId:n,bounds:C7t(c)}},hgo=(t,e,n)=\u003e{if(t.layer!==n.layer||e.layer!==n.layer)return!1;const o=(s,a)=\u003eMath.abs(s.x-a.x)\u003cPW\u0026\u0026Math.abs(s.y-a.y)\u003cPW,i=o(t,n.start)\u0026\u0026o(e,n.end),r=o(t,n.end)\u0026\u0026o(e,n.start);return i||r},pgo=(t,e,n,o)=\u003e{const i=[],r=t.route.flatMap((A,c)=\u003eA.route_type===\"jumper\"?[{routePoint:A,routePointIndex:c}]:[]),s=new Map;for(const A of r){const c=[];for(let u=1;u\u003ct.route.length;u++){const g=t.route[u-1],h=t.route[u];g?.route_type===\"wire\"\u0026\u0026h?.route_type===\"wire\"\u0026\u0026hgo(g,h,A.routePoint)\u0026\u0026c.push(u)}if(c.length!==1)throw new Error(`Jumper ${t.pcb_trace_id}:${A.routePointIndex} matched ${c.length} placeholder wire segments`);const l=c[0];if(s.has(l))throw new Error(`Multiple jumpers matched placeholder segment ${l} on ${t.pcb_trace_id}`);s.set(l,A)}let a;for(let A=0;A\u003ct.route.length;A++){const c=t.route[A];if(c.route_type===\"wire\"){if(a\u0026\u0026a.layer===c.layer\u0026\u0026QN(a,c)\u003enh){const u=a;if(!s.get(A)){const g=u.width/2;i.push({kind:\"segment\",start:{x:u.x,y:u.y},end:{x:c.x,y:c.y},width:u.width,layers:[u.layer],bounds:yce({minX:Math.min(u.x,c.x),minY:Math.min(u.y,c.y),maxX:Math.max(u.x,c.x),maxY:Math.max(u.y,c.y)},g)})}}a=c;continue}if(a=void 0,c.route_type===\"via\"){const u=t.route[A-1],g=t.route[A+1];for(const d of[u,g])if(d?.route_type===\"wire\"\u0026\u0026QN(d,c)\u003enh)throw new Error(`Via ${t.pcb_trace_id}:${A} is adjacent to a non-colocated wire endpoint`);const h=c.via_diameter??n;i.push({kind:\"via\",center:{x:c.x,y:c.y},diameter:h,layers:cgo(c,e),bounds:yce(xce(c),h/2)});continue}const l=`${t.pcb_trace_id}:${A}:${c.route_type}`;if(c.route_type===\"jumper\"){i.push(x7t(c,c.start,l),x7t(c,c.end,l));continue}if(c.route_type===\"through_obstacle\"){if(!o.find(u=\u003eu.layers.includes(c.from_layer)\u0026\u0026u.layers.includes(c.to_layer)\u0026\u0026wW(c.start,u)\u003c=nh\u0026\u0026wW(c.end,u)\u003c=nh))throw new Error(`Through-obstacle marker ${l} has no same-net multilayer obstacle witness`);i.push(y7t(c.start,0,[c.from_layer],l),y7t(c.end,0,[c.to_layer],l));continue}throw new Error(`Unsupported route primitive: ${String(c.route_type)}`)}return i},E7t=(t,e,n)=\u003e{const o=t.pointsToConnect[n];return o.pointId??o.pcb_port_id??`${t.name}[${e}:${n}]`},B7t=t=\u003e{const e={},n={},o=[];for(let i=0;i\u003ct.connections.length;i++){const r=t.connections[i];for(let s=0;s\u003cr.pointsToConnect.length;s++){const a=`${i}:${s}`;e[a]=E7t(r,i,s),n[a]=a,o.push([a])}}return{endpointCount:Object.keys(e).length,endpointLabels:e,componentByEndpointKey:n,endpointComponents:o}},Ece=t=\u003e{if(t===null||typeof t!=\"object\")return JSON.stringify(t)??String(t);if(Array.isArray(t))return`[${t.map(n=\u003eEce(n)).join(\",\")}]`;const e=t;return`{${Object.keys(e).sort().map(n=\u003e`${JSON.stringify(n)}:${Ece(e[n])}`).join(\",\")}}`},b7t=(t,e)=\u003e{const n=new Tv(t,e,{includePhysicalPositionAliases:!0}),o=(i=t.layerCount)\u003c=1?[\"top\"]:i===2?[\"top\",\"bottom\"]:[\"top\",...Array.from({length:i-2},(g,h)=\u003e`inner${h+1}`),\"bottom\"];var i;const r=(g=\u003e{const h=g.min_via_hole_diameter??g.minViaHoleDiameter??0;return Math.max(h,g.min_via_pad_diameter??g.minViaPadDiameter??g.minViaDiameter??.6)})(t),s=new Map,a=new Map,A={},c=(g,h)=\u003e{const d=s.get(g)??[];d.push(h),s.set(g,d)};for(let g=0;g\u003ct.connections.length;g++){const h=t.connections[g],d=n.canonicalize(ugo(h));if(d.length!==1)throw new Error(`Connection ${h.name} resolved to ${d.length} canonical nets`);for(let p=0;p\u003ch.pointsToConnect.length;p++){const m=h.pointsToConnect[p],_=`${g}:${p}`,f=E7t(h,g,p);A[_]=f;const I={kind:\"endpoint\",endpointKey:_,endpointLabel:f,point:{x:m.x,y:m.y},layers:m.layers??[m.layer],bounds:xce(m)};for(const C of d)c(C,I)}}for(const g of t.obstacles){const h={kind:\"obstacle\",obstacle:g,layers:g.layers,bounds:C7t(g)};for(const d of n.canonicalize(ggo(g))){const p=a.get(d)??[];p.push(g),a.set(d,p),s.has(d)\u0026\u0026c(d,h)}}for(const g of[...e,...t.fixedTraces??[]]){const h=n.canonicalize(lgo(g));if(h.length!==1)throw new Error(`Trace ${g.pcb_trace_id} resolved to ${h.length} canonical nets`);const d=a.get(h[0])??[],p=pgo(g,o,r,d);for(const m of h)if(s.has(m))for(const _ of p)c(m,_)}const l={},u=[];for(const g of s.values()){const h=new Ago(g.length),d=new Map;for(let _=0;_\u003cg.length;_++){const f=g[_];if(f.kind!==\"bridge-contact\"\u0026\u0026f.kind!==\"bridge-pad\")continue;const I=d.get(f.bridgeId);I===void 0?d.set(f.bridgeId,_):h.union(I,_)}const p=g.length\u003e0?new X4(g.length):null;if(p){for(const _ of g)p.add(_.bounds.minX,_.bounds.minY,_.bounds.maxX,_.bounds.maxY);p.finish()}for(let _=0;_\u003cg.length;_++){const f=g[_],I=p?.search(f.bounds.minX-nh,f.bounds.minY-nh,f.bounds.maxX+nh,f.bounds.maxY+nh)??[];for(const C of I)C\u003c=_||vN(f,g[C])\u0026\u0026h.union(_,C)}const m=new Map;for(let _=0;_\u003cg.length;_++){const f=g[_];if(f.kind!==\"endpoint\")continue;const I=h.find(_),C=m.get(I)??[];C.push(f.endpointKey),m.set(I,C)}for(const _ of m.values()){_.sort();const f=_[0];u.push(_);for(const I of _){if(l[I]!==void 0)throw new Error(`Endpoint ${I} was assigned to multiple canonical nets`);l[I]=f}}}return u.sort(([g=\"\"],[h=\"\"])=\u003eg.localeCompare(h)),{endpointCount:Object.keys(A).length,endpointLabels:A,componentByEndpointKey:l,endpointComponents:u}},Bce=class{baseline;inputProblem;baselineCaptureError;baselineTraceSignature;constructor(e,n){this.inputProblem=e,this.baselineTraceSignature=Ece(n);try{this.baseline=b7t(e,n),this.baselineCaptureError=null}catch(o){this.baseline=B7t(e),this.baselineCaptureError=o instanceof Error?o.message:String(o)}}validate(e){if(this.baselineCaptureError){const i=Ece(e)===this.baselineTraceSignature;return{safe:i,candidate:this.baseline,regressions:[],validationError:i?`Connectivity validation is limited to exact trace preservation: ${this.baselineCaptureError}`:`Connectivity validation failed closed: ${this.baselineCaptureError}`}}let n;try{n=b7t(this.inputProblem,e)}catch(i){return{safe:!1,candidate:B7t(this.inputProblem),regressions:[],validationError:`Connectivity validation failed closed: ${i instanceof Error?i.message:String(i)}`}}const o=[];for(const i of this.baseline.endpointComponents){if(i.length\u003c2)continue;const r=new Map;for(const s of i){const a=n.componentByEndpointKey[s]??`missing:${s}`,A=r.get(a)??[];A.push(s),r.set(a,A)}r.size\u003c=1||o.push({baselineEndpointKeys:[...i],baselineEndpointLabels:i.map(s=\u003ethis.baseline.endpointLabels[s]),candidateComponents:[...r.values()]})}return{safe:o.length===0,candidate:n,regressions:o}}},S7t=[{x:0,y:0},{x:.5,y:.5}],mgo=[.15,.2,.25,.3,.4,.5],jA=t=\u003et?.route_type===\"wire\",zSe=t=\u003et?.route_type===\"via\",_go=Array.from({length:24},(t,e)=\u003e{const n=e*Math.PI/12;return{x:Math.cos(n),y:Math.sin(n)}}),_H=t=\u003e[...new Set(t.map(e=\u003eNumber(e.toFixed(6))))].sort((e,n)=\u003en-e),JSe=class extends BN{inputProblem;traces;obstacleIndex;phase=\"repair-vias\";traceCursor=0;routeCursor=0;candidateCursor=0;clearanceTierCursor=0;attemptedCandidateCount=0;attemptedClearanceShoveCount=0;attemptedViaGridCount=0;committedClearanceShoveCount=0;viaPairCountRemoved=0;viaCountRemoved=0;simplifiedPathCount=0;normalizedSegmentCount=0;achievedExtraClearanceCount=0;relocatedViaCount=0;unresolvedViaCount=0;attemptedPushedViaRepairCount=0;committedPushedViaRepairCount=0;padClearanceRerouteCount=0;unresolvedPadClearanceCount=0;initialPadClearanceViolationCount=0;remainingPadClearanceViolationCount=0;initialPadClearanceViolationCountByClearance={};remainingPadClearanceViolationCountByClearance={};budgetLimited=!1;connectivityValidationCount=0;connectivityRollbackCount=0;connectivityRegressionEndpointIds=[];connectivityValidationError=null;connectivityRollbackMutationStats=null;connectionNameResolver;connectionByTraceId=new Map;connectivityInvariant;initialConnectivitySafeTraces;mutableTraceIndices;mutableTraceIndexSet;viaRepairTraceIndices;traceIndices;maxRerouteLength;clearancePaddingTiers;desiredPadClearance;initialTraceLengths=new Map;candidates=[];candidateShoveCount=0;rollbackTraces=null;baseCandidateValidated=!1;activeShovePadding=0;viaGridAttempt=null;candidateSetMayUseGridFallback=!1;pendingPushedViaRepair=null;alternatePushedViaRepairs=[];pushedViaRepairRollbackTraces=null;connectivityFinalized=!1;finalizedMutatedTraceIndices=[];resumePhase=\"scan-via-pairs\";constructor(t){super(),this.inputProblem=structuredClone(t),this.traces=structuredClone(t.traces),this.initialConnectivitySafeTraces=structuredClone(t.traces),this.connectivityInvariant=new Bce(this.inputProblem.simpleRouteJson,this.initialConnectivitySafeTraces),this.connectionNameResolver=new Tv(t.simpleRouteJson,this.traces),this.maxRerouteLength=t.maxRerouteLength??10,this.desiredPadClearance=t.desiredPadClearance,this.clearancePaddingTiers=_H([...t.clearancePaddingTiers??[.1,.05,0],0]).filter(i=\u003ei\u003e=0);const e=this.traces.map((i,r)=\u003er),n=(i,r,s)=\u003e{const a=[...new Set(i??s)];for(const A of a)if(!Number.isInteger(A)||A\u003c0||A\u003e=this.traces.length)throw new RangeError(`Invalid cleanup ${r} index: ${A}`);return a},o=n(t.traceIndices,\"trace\",e);this.viaRepairTraceIndices=n(t.viaRepairTraceIndices,\"via repair trace\",o),this.mutableTraceIndices=n(t.mutableTraceIndices,\"mutable trace\",o),this.mutableTraceIndexSet=new Set(this.mutableTraceIndices),this.traceIndices=o.filter(i=\u003ethis.resolveNominalTraceWidth(this.traces[i])\u003e=.499999);for(const i of this.traceIndices)this.initialTraceLengths.set(i,this.measureTraceLength(this.traces[i]));this.obstacleIndex=this.createObstacleIndex(),this.initialPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCount=this.initialPadClearanceViolationCount,this.initialPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),this.remainingPadClearanceViolationCountByClearance={...this.initialPadClearanceViolationCountByClearance},this.activeSubSolver=null,this.MAX_ITERATIONS=1e6,this.stats=this.createStats()}getSolverName(){return\"PowerTraceCleanupSolver\"}_step(){if(this.activeSubSolver)return this.stepActiveShoveSolver(),void(this.stats=this.createStats());switch(this.phase){case\"repair-vias\":this.repairNextVia();break;case\"scan-via-pairs\":this.scanNextViaPair();break;case\"scan-pad-clearance\":this.scanNextPadClearance();break;case\"scan-simplification\":this.scanNextSimplification();break;case\"evaluate-candidate\":this.evaluateCurrentCandidate();break;case\"shove-clearance\":break;case\"route-via-pair\":this.startNextViaGridCandidate();break;case\"complete\":this.ensureConnectivitySafeOutput(),this.solved=!0}this.stats=this.createStats()}repairNextVia(){const t=this.viaRepairTraceIndices[this.traceCursor],e=t===void 0?void 0:this.traces[t];if(!e)return this.traceCursor=0,this.routeCursor=0,this.phase=\"scan-via-pairs\",void this.rebuildObstacleIndex();const n=e.route.findIndex((c,l)=\u003el\u003e=this.routeCursor\u0026\u0026zSe(c));if(n===-1)return this.traceCursor++,void(this.routeCursor=0);this.routeCursor=n+1;const o=e.route[n],i=e.route[n-1],r=e.route[n+1];if(!zSe(o)||!jA(i)||!jA(r))return;const s=this.getTraceConnectionNames(e),a=this.getBaseObstacleClearance();if(!this.obstacleIndex.collidesVia({point:o,layers:this.obstacleIndex.boardLayers,padDiameter:o.via_diameter??.6,holeDiameter:o.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter,connectionNames:s,ignoreTraceIndex:t,ignoreRouteRange:{start:n,end:n},obstacleClearance:a,blockSameNetObstacles:!0,sameNetObstacleClearance:0}))return;const A=this.findViaRepair(e,n,a);if(!A){const c=this.findPushableViaRepairs(e,n,a),l=c.shift();return l?(this.alternatePushedViaRepairs=c,void this.startPushedViaRepair(l)):void this.unresolvedViaCount++}e.route.splice(A.startIndex,A.endIndex-A.startIndex+1,...A.route),this.relocatedViaCount++,this.routeCursor=A.startIndex+A.route.length,this.rebuildObstacleIndex()}findViaRepair(t,e,n){const o=this.createViaRepairContext(t,e);if(!o)return null;const i=o.candidates.map(r=\u003e({point:r,movedLength:Aa(o.leftAnchor,r)+Aa(r,o.rightAnchor)})).filter(({movedLength:r})=\u003er\u003c=o.originalLength+Math.min(6,this.maxRerouteLength)+Ki);i.sort((r,s)=\u003er.movedLength-s.movedLength||Aa(r.point,o.via)-Aa(s.point,o.via));for(const r of i)if(this.isViaRepairPointSafe(o,r.point,n))return this.createViaRepairReplacement(o,r.point);return null}findPushableViaRepairs(t,e,n){const o=this.viaRepairTraceIndices[this.traceCursor];if(o===void 0)return[];const i=this.createViaRepairContext(t,e);if(!i)return[];const r=i.candidates.flatMap(s=\u003e{const a=Aa(i.leftAnchor,s)+Aa(s,i.rightAnchor);if(a\u003ei.originalLength+Math.min(6,this.maxRerouteLength)+Ki)return[];const A=new Set,c=this.getViaRepairCollisionQueries(i,s,n);for(const u of c)for(const g of this.obstacleIndex.findCollisions(u)){if(g.kind!==\"trace\"||g.traceIndex===void 0||g.traceIndex===o||!this.mutableTraceIndexSet.has(g.traceIndex))return[];A.add(g.traceIndex)}if(A.size===0||A.size\u003e2)return[];const l=[...A];return this.isViaRepairPointSafe(i,s,n,l)?[{point:s,movedLength:a,blockerCount:A.size,blockerKey:[...A].sort((u,g)=\u003eu-g).join(\",\")}]:[]});return r.sort((s,a)=\u003es.blockerCount-a.blockerCount||s.movedLength-a.movedLength||Aa(s.point,i.via)-Aa(a.point,i.via)),[...new Map([...r].reverse().map(s=\u003e[s.blockerKey,s])).values(),...r].filter((s,a,A)=\u003eA.findIndex(c=\u003ec.point.x===s.point.x\u0026\u0026c.point.y===s.point.y)===a).slice(0,12).map(s=\u003e({traceIndex:o,viaIndex:e,point:s.point,padClearance:n,corridor:[{start:i.leftAnchor,end:s.point,layer:i.leftWire.layer,width:i.leftWire.width},{start:s.point,end:i.rightAnchor,layer:i.rightWire.layer,width:i.rightWire.width},...this.obstacleIndex.boardLayers.map(a=\u003e({start:s.point,end:s.point,layer:a,width:i.viaDiameter}))]}))}createViaRepairContext(t,e){const n=t.route[e],o=t.route[e-1],i=t.route[e+1];if(!zSe(n)||!jA(o)||!jA(i))return null;const r=e-1==0||!jA(t.route[e-2]),s=e+1===t.route.length-1||!jA(t.route[e+2]),a=r?o:t.route[e-2],A=s?i:t.route[e+2],c=Aa(a,n)+Aa(n,A),l=this.getTraceConnectionNames(t),u=n.via_diameter??.6,g=n.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter,h=Math.max(.3,g+this.obstacleIndex.minViaHoleEdgeToViaHoleEdgeClearance+.05),d=[h,h+.15,h+.3,h+.5,h+.75,h+1,h+1.5,h+2].flatMap(m=\u003e_go.map(_=\u003e({x:.025*Math.round((n.x+_.x*m)/.025),y:.025*Math.round((n.y+_.y*m)/.025)}))),p=[...d,...d.flatMap(m=\u003e[{x:m.x,y:Math.floor(10*n.y)/10},{x:m.x,y:Math.ceil(10*n.y)/10},{x:Math.floor(10*n.x)/10,y:m.y},{x:Math.ceil(10*n.x)/10,y:m.y}])].filter((m,_,f)=\u003ef.findIndex(I=\u003eI.x===m.x\u0026\u0026I.y===m.y)===_);return{trace:t,viaIndex:e,via:n,leftWire:o,rightWire:i,leftIsEndpoint:r,rightIsEndpoint:s,leftAnchor:a,rightAnchor:A,originalLength:c,connectionNames:l,viaDiameter:u,holeDiameter:g,ignoreRouteRange:{start:Math.max(0,e-2),end:Math.min(t.route.length-1,e+2)},candidates:p}}getViaRepairCollisionQueries(t,e,n,o){const i=this.viaRepairTraceIndices[this.traceCursor],r={connectionNames:t.connectionNames,ignoreTraceIndex:i,ignoreTraceIndices:o,ignoreRouteRange:t.ignoreRouteRange,obstacleClearance:n};return[...this.obstacleIndex.boardLayers.map(s=\u003e({...r,start:e,end:e,layer:s,width:t.viaDiameter,blockSameNetObstacles:!0,sameNetObstacleClearance:0})),{...r,start:t.leftAnchor,end:e,layer:t.leftWire.layer,width:t.leftWire.width},{...r,start:e,end:t.rightAnchor,layer:t.rightWire.layer,width:t.rightWire.width}]}isViaRepairPointSafe(t,e,n,o){const i=this.viaRepairTraceIndices[this.traceCursor];return!this.obstacleIndex.collidesVia({point:e,layers:this.obstacleIndex.boardLayers,padDiameter:t.viaDiameter,holeDiameter:t.holeDiameter,connectionNames:t.connectionNames,ignoreTraceIndex:i,ignoreTraceIndices:o,ignoreRouteRange:{start:t.viaIndex,end:t.viaIndex},obstacleClearance:n,blockSameNetObstacles:!0,sameNetObstacleClearance:0})\u0026\u0026!this.getViaRepairCollisionQueries(t,e,n,o).slice(this.obstacleIndex.boardLayers.length).some(r=\u003ethis.obstacleIndex.collides(r))}createViaRepairReplacement(t,e){const n={...t.leftWire,...e},o={...t.via,...e},i={...t.rightWire,...e};return{startIndex:t.viaIndex-1,endIndex:t.viaIndex+1,route:[...t.leftIsEndpoint?[t.leftWire]:[],n,o,i,...t.rightIsEndpoint?[t.rightWire]:[]]}}startPushedViaRepair(t){this.pendingPushedViaRepair=t,this.pushedViaRepairRollbackTraces=structuredClone(this.traces),this.attemptedPushedViaRepairCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem.simpleRouteJson,traces:this.traces,powerTraceIndex:t.traceIndex,nominalPowerWidth:Math.max(...t.corridor.map(e=\u003ee.width)),pushOnlyNominalWidthsBelow:Number.POSITIVE_INFINITY,mutableTraceIndices:this.mutableTraceIndices,corridor:t.corridor,maxRerouteLength:this.maxRerouteLength},this.connectionNameResolver)}finishPushedViaRepairSolver(t){const e=this.pendingPushedViaRepair;if(this.activeSubSolver=null,!e)return;if(t.solved){const o=t.getOutput();if(o){this.traces=o.traces,this.rebuildObstacleIndex();const i=this.traces[e.traceIndex],r=i?this.createViaRepairContext(i,e.viaIndex):null;if(r\u0026\u0026this.isViaRepairPointSafe(r,e.point,e.padClearance)){const s=this.createViaRepairReplacement(r,e.point);return i.route.splice(s.startIndex,s.endIndex-s.startIndex+1,...s.route),this.relocatedViaCount++,this.committedPushedViaRepairCount++,this.routeCursor=s.startIndex+s.route.length,this.pendingPushedViaRepair=null,this.alternatePushedViaRepairs=[],this.pushedViaRepairRollbackTraces=null,void this.rebuildObstacleIndex()}}}this.pushedViaRepairRollbackTraces\u0026\u0026(this.traces=this.pushedViaRepairRollbackTraces),this.pendingPushedViaRepair=null,this.pushedViaRepairRollbackTraces=null;const n=this.alternatePushedViaRepairs.shift();if(n)return this.rebuildObstacleIndex(),void this.startPushedViaRepair(n);this.alternatePushedViaRepairs=[],this.unresolvedViaCount++,this.rebuildObstacleIndex()}scanNextViaPair(){const t=this.traceIndices[this.traceCursor];if(t===void 0)return this.traceCursor=0,this.routeCursor=0,void(this.phase=\"scan-pad-clearance\");const e=this.traces[t],n=e.route.findIndex((_,f)=\u003ef\u003e=this.routeCursor\u0026\u0026_.route_type===\"via\");if(n===-1)return void this.advanceTrace();const o=e.route.slice(n+1).findIndex(_=\u003e_.route_type===\"via\");if(o===-1)return void this.advanceTrace();const i=n-1,r=n+1+o+1,s=e.route[i],a=e.route[r];if(this.routeCursor=n+1,!jA(s)||!jA(a)||s.layer!==a.layer||Aa(s,a)\u003ethis.maxRerouteLength+Ki)return;const A=this.createCandidates({kind:\"via-pair\",traceIndex:t,startIndex:i,endIndex:r}),c=A[0]?.width??Math.max(s.width,a.width),l=A[0]?.padClearance??this.getCandidatePadClearance(\"via-pair\",t,i,r),u=_=\u003e{const f=e.route[_];return!!jA(f)\u0026\u0026this.obstacleIndex.findCollisions({start:f,end:f,layer:f.layer,width:c,connectionNames:this.getTraceConnectionNames(e),ignoreTraceIndex:t,ignoreRouteRange:{start:Math.max(0,i-1),end:Math.min(e.route.length-1,r+1)},obstacleClearance:l}).some(I=\u003eI.kind===\"obstacle\"\u0026\u0026I.obstacleKind===\"pad\")},g=e.route[i-1],h=e.route[r+1],d=A.length\u003e0\u0026\u0026u(i)\u0026\u0026jA(g)\u0026\u0026g.layer===s.layer?i-1:i,p=A.length\u003e0\u0026\u0026u(r)\u0026\u0026jA(h)\u0026\u0026h.layer===a.layer?r+1:r,m=[{startIndex:i,endIndex:r},{startIndex:d,endIndex:r},{startIndex:i,endIndex:p},{startIndex:d,endIndex:p}].filter((_,f,I)=\u003eI.findIndex(C=\u003eC.startIndex===_.startIndex\u0026\u0026C.endIndex===_.endIndex)===f).flatMap(_=\u003e_.startIndex===i\u0026\u0026_.endIndex===r?A:this.createCandidates({kind:\"via-pair\",traceIndex:t,startIndex:_.startIndex,endIndex:_.endIndex}));m.length!==0\u0026\u0026this.beginCandidates(m,\"scan-via-pairs\",!0)}scanNextPadClearance(){const t=this.traceIndices[this.traceCursor];if(t===void 0)return this.traceCursor=0,this.routeCursor=0,void(this.phase=\"scan-simplification\");const e=this.traces[t];if(this.resolveNominalTraceWidth(e)\u003c.499999)return void this.advanceTrace();const n=this.routeCursor,o=e.route[n],i=e.route[n+1];if(!jA(o)||!jA(i)||o.layer!==i.layer)return void(n\u003e=e.route.length-1?this.advanceTrace():this.routeCursor++);if(this.routeCursor++,!this.segmentHasPadClearanceViolation(t,n))return;const r=this.getPadClearanceIntervals(e,n).flatMap(s=\u003ethis.getImprovedPadClearanceTiers(t,s.startIndex,s.endIndex).flatMap(a=\u003ethis.createCandidates({kind:\"pad-clearance\",traceIndex:t,startIndex:s.startIndex,endIndex:s.endIndex,padClearance:a}).slice(0,8)));r.length!==0?this.beginCandidates(r.slice(0,72),\"scan-pad-clearance\",!0):this.unresolvedPadClearanceCount++}segmentHasPadClearanceViolation(t,e){const n=this.traces[t],o=n.route[e],i=n.route[e+1];return!(!jA(o)||!jA(i)||o.layer!==i.layer)\u0026\u0026this.obstacleIndex.findCollisions({start:o,end:i,layer:o.layer,width:Math.max(o.width,i.width),connectionNames:this.getTraceConnectionNames(n),ignoreTraceIndex:t,ignoreRouteRange:{start:Math.max(0,e-1),end:Math.min(n.route.length-1,e+2)},obstacleClearance:this.getPadClearanceForTrace(n)}).some(r=\u003er.kind===\"obstacle\"\u0026\u0026r.obstacleKind===\"pad\")}getPadClearanceIntervals(t,e){const n=t.route[e];if(!jA(n))return[];const o=[e];let i=0;for(let s=e-1;s\u003e=0;s--){const a=t.route[s],A=t.route[s+1];if(!jA(a)||!jA(A)||a.layer!==n.layer||A.layer!==n.layer||(i+=Aa(a,A),i\u003ethis.maxRerouteLength/2+Ki))break;o.push(s)}const r=[e+1];i=0;for(let s=e+1;s\u003ct.route.length-1;s++){const a=t.route[s],A=t.route[s+1];if(!jA(a)||!jA(A)||a.layer!==n.layer||A.layer!==n.layer||(i+=Aa(a,A),i\u003ethis.maxRerouteLength/2+Ki))break;r.push(s+1)}return o.flatMap(s=\u003er.map(a=\u003e({startIndex:s,endIndex:a,length:this.measureRouteRange(t,s,a).length}))).filter(s=\u003es.length\u003c=this.maxRerouteLength+Ki\u0026\u0026s.startIndex\u003cs.endIndex).sort((s,a)=\u003ea.length-s.length).slice(0,8)}scanNextSimplification(){const t=this.traceIndices[this.traceCursor];if(t===void 0)return this.remainingPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),void(this.phase=\"complete\");const e=this.traces[t],n=this.routeCursor,o=e.route[n];if(!jA(o)||n\u003e=e.route.length-1)return void(n\u003e=e.route.length-1?this.advanceTrace():this.routeCursor++);let i=0;const r=[];for(let a=n+1;a\u003ce.route.length;a++){const A=e.route[a-1],c=e.route[a];if(!jA(A)||!jA(c)||A.layer!==o.layer||c.layer!==o.layer||(i+=Aa(A,c),i\u003ethis.maxRerouteLength+Ki))break;const l=this.measureRouteRange(e,n,a);(l.nonOctilinearSegmentCount\u003e0||l.pointCount\u003e3)\u0026\u0026r.push(a)}const s=r.slice(-6).reverse().flatMap(a=\u003ethis.createCandidates({kind:\"simplification\",traceIndex:t,startIndex:n,endIndex:a}));s.length!==0?this.beginCandidates(s,\"scan-simplification\"):this.routeCursor++}createCandidates({kind:t,traceIndex:e,startIndex:n,endIndex:o,padClearance:i}){const r=this.traces[e],s=r.route[n],a=r.route[o];if(!jA(s)||!jA(a)||s.layer!==a.layer)return[];const A=this.resolveNominalTraceWidth(r),c=this.measureRouteRange(r,n,o),l=i??this.getCandidatePadClearance(t,e,n,o),u=[],g=_7t(s,a);if(t===\"pad-clearance\"\u0026\u0026KSe([s,a])===0){const d=Aa(s,a);if(d\u003eKi){const p={x:-(a.y-s.y)/d,y:(a.x-s.x)/d};for(const m of[.25,.5,.75,1,1.5,2])for(const _ of[-1,1])g.push([s,{x:s.x+p.x*m*_,y:s.y+p.y*m*_},{x:a.x+p.x*m*_,y:a.y+p.y*m*_},a])}}const h=new Map(g.map(d=\u003e[d.map(p=\u003e`${p.x.toFixed(6)},${p.y.toFixed(6)}`).join(\";\"),d]));for(const d of h.values()){const p=SW(d);if(p\u003ethis.maxRerouteLength+Ki||t===\"pad-clearance\"\u0026\u0026p\u003e1.35*c.length+.5||t===\"simplification\"\u0026\u0026(p\u003e1.1*c.length+Ki||this.measureTraceLength(r)-c.length+p\u003e1.01*(this.initialTraceLengths.get(e)??this.measureTraceLength(r))+Ki))continue;const m=p\u003c=Ki?A:A-c.deficitArea/p;if(m\u003eA+Ki)continue;const _=.05*Math.ceil(Math.max(this.inputProblem.simpleRouteJson.minTraceWidth,m)/.05-Ki),f=_H([A,Math.min(A,_),Math.min(A,Math.max(this.inputProblem.simpleRouteJson.minTraceWidth,m))].map(I=\u003eMath.max(I,s.width)));for(const I of f){const C=this.measureCandidate(d,I,A,a.width,s.width);C.deficitArea\u003ec.deficitArea+Ki||C.conservativeDeficitArea\u003ec.conservativeDeficitArea+Ki||!this.preservesCoverage(C,c)||(t!==\"simplification\"||c.nonOctilinearSegmentCount!==0||C.pointCount\u003cc.pointCount\u0026\u0026C.length\u003cc.length-Ki)\u0026\u0026u.push({kind:t,traceIndex:e,startIndex:n,endIndex:o,layer:s.layer,points:d,width:I,padClearance:l,originalQuality:c})}}return u.slice(0,18)}beginCandidates(t,e,n=!1){this.candidates=t,this.candidateCursor=0,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.rollbackTraces=null,this.baseCandidateValidated=!1,this.resumePhase=e,this.candidateSetMayUseGridFallback=n,this.phase=\"evaluate-candidate\"}evaluateCurrentCandidate(){const t=this.candidates[this.candidateCursor];if(!t)return void this.finishCandidateSet(!1);if(!this.baseCandidateValidated)return this.candidateCollides(t,0)?this.getPushableTraceIndices(t,0)\u0026\u0026this.candidateShoveCount\u003c2\u0026\u0026this.attemptedClearanceShoveCount\u003c48?void this.startClearanceShove(t,0):void this.advanceCandidate():this.candidateShoveCount\u003e0?void this.applyCandidate(t,0):(this.baseCandidateValidated=!0,void(this.clearanceTierCursor=0));const e=this.clearancePaddingTiers[this.clearanceTierCursor];if(e===void 0||e\u003c=Ki)return void this.applyCandidate(t,0);if(this.attemptedCandidateCount++,!this.candidateCollides(t,e))return void this.applyCandidate(t,e);this.getPushableTraceIndices(t,e)\u0026\u0026this.candidateShoveCount\u003c2\u0026\u0026this.attemptedClearanceShoveCount\u003c48?this.startClearanceShove(t,e):(this.rollbackCandidateShoves(),this.clearanceTierCursor++,this.candidateShoveCount=0)}advanceCandidate(){this.rollbackCandidateShoves(),this.candidateCursor++,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.baseCandidateValidated=!1}candidateCollides(t,e){const n=this.traces[t.traceIndex],o=this.getTraceConnectionNames(n);for(let i=0;i\u003ct.points.length-1;i++){const r=this.getCandidateSegmentWidth(t,i);if(this.obstacleIndex.collides({start:t.points[i],end:t.points[i+1],layer:t.layer,width:r+2*e,connectionNames:o,ignoreTraceIndex:t.traceIndex,ignoreRouteRange:{start:Math.max(0,t.startIndex-1),end:Math.min(n.route.length-1,t.endIndex+1)},obstacleClearance:t.padClearance}))return!0}return!1}getPushableTraceIndices(t,e){const n=this.traces[t.traceIndex],o=this.getTraceConnectionNames(n),i=new Set;for(let r=0;r\u003ct.points.length-1;r++){const s=this.getCandidateSegmentWidth(t,r),a={start:t.points[r],end:t.points[r+1],layer:t.layer,width:s+2*e,connectionNames:o,ignoreTraceIndex:t.traceIndex,ignoreRouteRange:{start:Math.max(0,t.startIndex-1),end:Math.min(n.route.length-1,t.endIndex+1)},obstacleClearance:t.padClearance};if(!this.obstacleIndex.collides(a))continue;const A=this.obstacleIndex.findCollisions(a);if(A.length===0)return null;for(const c of A){if(c.kind!==\"trace\"||c.traceIndex===void 0||c.traceIndex===t.traceIndex||!this.mutableTraceIndexSet.has(c.traceIndex))return null;const l=this.traces[c.traceIndex];if(!l||this.resolveNominalTraceWidth(l)\u003e=t.width-Ki)return null;i.add(c.traceIndex)}}return i.size\u003e0\u0026\u0026i.size\u003c=2?[...i]:null}startClearanceShove(t,e){this.rollbackTraces??=structuredClone(this.traces),this.activeShovePadding=e;const n=t.width+2*e,o=t.points.slice(0,-1).map((i,r)=\u003e({start:i,end:t.points[r+1],layer:t.layer,width:this.getCandidateSegmentWidth(t,r)+2*e}));this.attemptedClearanceShoveCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem.simpleRouteJson,traces:this.traces,powerTraceIndex:t.traceIndex,nominalPowerWidth:n,pushOnlyNominalWidthsBelow:t.width,mutableTraceIndices:this.mutableTraceIndices,corridor:o,maxRerouteLength:this.maxRerouteLength},this.connectionNameResolver),this.phase=\"shove-clearance\"}getCandidateSegmentWidth(t,e){const n=this.traces[t.traceIndex],o=n.route[t.startIndex],i=n.route[t.endIndex],r=e===0\u0026\u0026jA(o)?o.width:t.width,s=e===t.points.length-2\u0026\u0026jA(i)?i.width:t.width;return Math.max(r,s)}stepActiveShoveSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed)if(this.pendingPushedViaRepair\u0026\u0026t instanceof pH)this.finishPushedViaRepairSolver(t);else if(t instanceof Ice)this.finishViaGridSolver(t);else{if(this.activeSubSolver=null,this.phase=\"evaluate-candidate\",t.solved){const e=t.getOutput();if(e)return this.traces=e.traces,this.candidateShoveCount++,void this.rebuildObstacleIndex()}this.failedSubSolvers??=[],this.failedSubSolvers.push(t),this.rollbackCandidateShoves(),this.activeShovePadding\u003c=Ki?this.advanceCandidate():this.clearanceTierCursor++,this.candidateShoveCount=0}}rollbackCandidateShoves(){this.rollbackTraces\u0026\u0026(this.traces=this.rollbackTraces,this.rollbackTraces=null,this.rebuildObstacleIndex())}applyCandidate(t,e){const n=this.traces[t.traceIndex],o=n.route[t.startIndex],i=n.route[t.endIndex],r=t.points.map((A,c)=\u003e({...c===0?o:c===t.points.length-1?i:{route_type:\"wire\",layer:t.layer,width:t.width},x:A.x,y:A.y,layer:t.layer,width:c===0?o.width:c===t.points.length-1?i.width:t.width})),s=n.route.slice(t.startIndex,t.endIndex+1),a=t.originalQuality.nonOctilinearSegmentCount;if(n.route.splice(t.startIndex,t.endIndex-t.startIndex+1,...r),t.kind===\"via-pair\"){const A=s.filter(c=\u003ec.route_type===\"via\").length;this.viaPairCountRemoved++,this.viaCountRemoved+=A,this.routeCursor=Math.max(0,t.startIndex-1)}else t.kind===\"pad-clearance\"?(this.padClearanceRerouteCount++,this.routeCursor=t.startIndex+Math.max(1,r.length-1)):(this.simplifiedPathCount++,this.normalizedSegmentCount+=a,this.routeCursor=t.startIndex+Math.max(1,r.length-1));this.committedClearanceShoveCount+=this.candidateShoveCount,e\u003eKi\u0026\u0026this.achievedExtraClearanceCount++,this.rollbackTraces=null,this.candidateShoveCount=0,this.rebuildObstacleIndex(),this.finishCandidateSet(!0)}finishCandidateSet(t){const e=this.candidates[0],n=_H(this.candidates.filter(i=\u003ei.kind===e?.kind).map(i=\u003ei.width)),o=_H(this.candidates.filter(i=\u003ei.kind===e?.kind\u0026\u0026i.traceIndex===e.traceIndex\u0026\u0026i.startIndex===e.startIndex\u0026\u0026i.endIndex===e.endIndex).map(i=\u003ei.padClearance));if(this.rollbackCandidateShoves(),this.candidates=[],this.candidateCursor=0,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.baseCandidateValidated=!1,!t\u0026\u0026this.candidateSetMayUseGridFallback\u0026\u0026e)return this.candidateSetMayUseGridFallback=!1,void this.beginViaGridAttempt(e,n,o);this.candidateSetMayUseGridFallback=!1,t||this.routeCursor++,this.phase=this.resumePhase}beginViaGridAttempt(t,e,n=[t.padClearance]){this.viaGridAttempt={kind:t.kind,traceIndex:t.traceIndex,startIndex:t.startIndex,endIndex:t.endIndex,layer:t.layer,padClearances:n,padClearanceCursor:0,originalQuality:t.originalQuality,widths:e,widthCursor:0,gridSizes:[],gridSizeCursor:0,offsetCursor:0},this.phase=\"route-via-pair\"}startNextViaGridCandidate(){const t=this.viaGridAttempt;if(!t)return void(this.phase=this.resumePhase);if(t.padClearanceCursor\u003e=t.padClearances.length)return t.kind===\"pad-clearance\"\u0026\u0026this.unresolvedPadClearanceCount++,this.viaGridAttempt=null,this.routeCursor++,void(this.phase=this.resumePhase);if(t.widthCursor\u003e=t.widths.length)return t.padClearanceCursor++,t.widthCursor=0,t.gridSizes=[],t.gridSizeCursor=0,void(t.offsetCursor=0);const e=t.widths[t.widthCursor],n=t.padClearances[t.padClearanceCursor];if(t.gridSizes.length===0\u0026\u0026(t.gridSizes=_H([th(e/2,.2,.4),th(e/3,.15,.25)])),t.gridSizeCursor\u003e=t.gridSizes.length)return t.widthCursor++,t.gridSizes=[],t.gridSizeCursor=0,void(t.offsetCursor=0);if(t.offsetCursor\u003e=S7t.length)return t.gridSizeCursor++,void(t.offsetCursor=0);const o=this.traces[t.traceIndex],i=o.route[t.startIndex],r=o.route[t.endIndex];if(!jA(i)||!jA(r))return this.viaGridAttempt=null,this.routeCursor++,void(this.phase=this.resumePhase);const s=t.gridSizes[t.gridSizeCursor],a=S7t[t.offsetCursor];this.attemptedViaGridCount++,this.activeSubSolver=new Ice({start:i,end:r,layer:t.layer,traceWidth:e,gridSize:s,gridOffset:{x:a.x*s,y:a.y*s},connectionNames:this.getTraceConnectionNames(o),obstacleIndex:this.obstacleIndex,ignoreTraceIndex:t.traceIndex,ignoreRouteRange:{start:Math.max(0,t.startIndex-1),end:Math.min(o.route.length-1,t.endIndex+1)},bounds:this.inputProblem.simpleRouteJson.bounds,obstacleClearance:n,searchPadding:Math.min(4,Math.max(2,Aa(i,r)/2,3*e)),requireOctilinear:!0})}finishViaGridSolver(t){const e=this.viaGridAttempt;if(this.activeSubSolver=null,t.solved\u0026\u0026e){const n=t.getOutput(),o=this.traces[e.traceIndex];if(n\u0026\u0026o){const i=this.resolveNominalTraceWidth(o),r=this.measureCandidate(n.points,n.traceWidth,i,o.route[e.endIndex].width,o.route[e.startIndex].width);if(r.nonOctilinearSegmentCount===0\u0026\u0026r.length\u003c=this.maxRerouteLength+Ki\u0026\u0026r.deficitArea\u003c=e.originalQuality.deficitArea+Ki\u0026\u0026r.conservativeDeficitArea\u003c=e.originalQuality.conservativeDeficitArea+Ki\u0026\u0026this.preservesCoverage(r,e.originalQuality)){const s={kind:e.kind,traceIndex:e.traceIndex,startIndex:e.startIndex,endIndex:e.endIndex,layer:e.layer,points:n.points,width:n.traceWidth,padClearance:e.padClearances[e.padClearanceCursor],originalQuality:e.originalQuality};return this.viaGridAttempt=null,void this.beginCandidates([s],this.resumePhase,!1)}}}t.failed\u0026\u0026(this.failedSubSolvers??=[],this.failedSubSolvers.push(t)),e\u0026\u0026e.offsetCursor++,this.phase=\"route-via-pair\"}measureRouteRange(t,e,n){const o=this.resolveNominalTraceWidth(t);let i=0,r=0,s=0,a=0,A=0,c=0,l=0;for(let u=e;u\u003c=n;u++){if(jA(t.route[u])\u0026\u0026l++,u\u003e=n)continue;const g=t.route[u],h=t.route[u+1];if(!jA(g)||!jA(h)||g.layer!==h.layer)continue;const d=Aa(g,h);i+=d,r+=d*Math.max(0,o-g.width),g.width\u003e=o-Ki\u0026\u0026(a+=d),s+=d*Math.max(0,o-Math.min(g.width,h.width)),Math.min(g.width,h.width)\u003e=o-Ki\u0026\u0026(A+=d),c+=KSe([g,h])}return{length:i,deficitArea:r,conservativeDeficitArea:s,nominalLength:a,conservativeNominalLength:A,nonOctilinearSegmentCount:c,pointCount:l}}measureTraceLength(t){let e=0;for(let n=0;n\u003ct.route.length-1;n++){const o=t.route[n],i=t.route[n+1];jA(o)\u0026\u0026jA(i)\u0026\u0026o.layer===i.layer\u0026\u0026(e+=Aa(o,i))}return e}measureCandidate(t,e,n,o=e,i=e){const r=SW(t);let s=0,a=0,A=0,c=0;for(let l=0;l\u003ct.length-1;l++){const u=Aa(t[l],t[l+1]),g=l===0?i:e,h=l===t.length-2?o:e,d=Math.min(g,h);s+=u*Math.max(0,n-g),a+=u*Math.max(0,n-d),g\u003e=n-Ki\u0026\u0026(A+=u),d\u003e=n-Ki\u0026\u0026(c+=u)}return{length:r,deficitArea:s,conservativeDeficitArea:a,nominalLength:A,conservativeNominalLength:c,nonOctilinearSegmentCount:KSe(t),pointCount:t.length}}preservesCoverage(t,e){const n=e.length\u003c=Ki?1:e.nominalLength/e.length,o=t.length\u003c=Ki?1:t.nominalLength/t.length,i=e.length\u003c=Ki?1:e.conservativeNominalLength/e.length,r=t.length\u003c=Ki?1:t.conservativeNominalLength/t.length;return!(o+Ki\u003cn||r+Ki\u003ci)\u0026\u0026!(t.length\u003ee.length+Ki\u0026\u0026o\u003c.999999)}advanceTrace(){this.traceCursor++,this.routeCursor=0,this.rebuildObstacleIndex()}createObstacleIndex(){return new ub(this.inputProblem.simpleRouteJson,this.traces,this.phase===\"repair-vias\"?void 0:this.traceIndices?.[this.traceCursor],[],this.connectionNameResolver)}rebuildObstacleIndex(){this.obstacleIndex=this.createObstacleIndex()}resolveNominalTraceWidth(t){const e=this.findConnectionForTrace(t);return Math.max(e?.nominalTraceWidth??e?.width??this.inputProblem.simpleRouteJson.nominalTraceWidth??this.inputProblem.simpleRouteJson.minTraceWidth,this.inputProblem.simpleRouteJson.minTraceWidth)}getPadClearanceForTrace(t){const e=this.getBaseObstacleClearance();return this.resolveNominalTraceWidth(t)\u003e=.499999?Math.max(e,this.desiredPadClearance??this.resolveNominalTraceWidth(t)/2):e}getBaseObstacleClearance(){return Math.max(this.inputProblem.simpleRouteJson.defaultObstacleMargin??0,this.inputProblem.simpleRouteJson.minTraceToPadEdgeClearance??0,.1)}getCandidatePadClearance(t,e,n,o){const i=this.traces[e],r=this.getBaseObstacleClearance(),s=this.getPadClearanceForTrace(i);if(t===\"pad-clearance\")return s;const a=t===\"via-pair\"?Math.min(s,Math.max(r,.15)):s;return this.findExistingPadClearance(e,n,o,r,a)}getImprovedPadClearanceTiers(t,e,n){const o=this.traces[t],i=this.getBaseObstacleClearance(),r=this.getPadClearanceForTrace(o),s=this.findExistingPadClearance(t,e,n,i,r),a=Math.max(.025,Math.min(.05,r/10)),A=[r];for(let c=r-a;c\u003es+a/2;c-=a)A.push(c);return _H(A).filter(c=\u003ec\u003es+Ki)}findExistingPadClearance(t,e,n,o,i){if(this.routeRangeHasPadClearanceViolation(t,e,n,o))return o;if(!this.routeRangeHasPadClearanceViolation(t,e,n,i))return i;let r=o,s=i;for(let a=0;a\u003c7;a++){const A=(r+s)/2;this.routeRangeHasPadClearanceViolation(t,e,n,A)?s=A:r=A}return Math.max(o,Number((r-.001).toFixed(6)))}routeRangeHasPadClearanceViolation(t,e,n,o){const i=this.traces[t],r=this.getTraceConnectionNames(i);for(let s=e;s\u003cn;s++){const a=i.route[s],A=i.route[s+1];if(!(!jA(a)||!jA(A)||a.layer!==A.layer)\u0026\u0026this.obstacleIndex.findCollisions({start:a,end:A,layer:a.layer,width:Math.max(a.width,A.width),connectionNames:r,ignoreTraceIndex:t,ignoreRouteRange:{start:Math.max(0,e-1),end:Math.min(i.route.length-1,n+1)},obstacleClearance:o}).some(c=\u003ec.kind===\"obstacle\"\u0026\u0026c.obstacleKind===\"pad\"))return!0}return!1}countPadClearanceViolations(t){let e=0;for(const n of this.traceIndices){const o=this.traces[n];if(!o)continue;const i=this.getTraceConnectionNames(o);for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];!jA(s)||!jA(a)||s.layer!==a.layer||this.obstacleIndex.findCollisions({start:s,end:a,layer:s.layer,width:Math.max(s.width,a.width),connectionNames:i,ignoreTraceIndex:n,ignoreRouteRange:{start:Math.max(0,r-1),end:Math.min(o.route.length-1,r+2)},obstacleClearance:t??this.getPadClearanceForTrace(o)}).some(A=\u003eA.kind===\"obstacle\"\u0026\u0026A.obstacleKind===\"pad\")\u0026\u0026e++}}return e}countPadClearanceViolationsByTier(){return Object.fromEntries(mgo.map(t=\u003e[t.toFixed(2),this.countPadClearanceViolations(t)]))}findConnectionForTrace(t){const e=this.connectionByTraceId.get(t.pcb_trace_id);if(e!==void 0)return e??void 0;const n=new Set(this.connectionNameResolver.canonicalize(this.getTraceConnectionNames(t))),o=this.inputProblem.simpleRouteJson.connections.find(i=\u003ethis.connectionNameResolver.canonicalize(this.getConnectionNames(i)).some(r=\u003en.has(r)))??null;return this.connectionByTraceId.set(t.pcb_trace_id,o),o??void 0}getConnectionNames(t){return[t.name,t.source_trace_id,t.rootConnectionName,t.netConnectionName,...t.mergedConnectionNames??[]].filter(e=\u003e!!e)}getTraceConnectionNames(t){return[t.pcb_trace_id,t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[],...t.connectsTo??[]].filter(e=\u003e!!e)}ensureConnectivitySafeOutput(){if(!this.connectivityFinalized){this.connectivityFinalized=!0,this.connectivityValidationCount++;try{const t=this.connectivityInvariant.validate(this.traces);if(this.connectivityValidationError??=t.validationError??null,t.safe)return void(this.finalizedMutatedTraceIndices=this.getMutatedTraceIndices());this.connectivityRegressionEndpointIds=[...new Set(t.regressions.flatMap(e=\u003ee.baselineEndpointLabels))]}catch(t){this.connectivityValidationError=t instanceof Error?t.message:String(t)}this.connectivityRollbackCount++,this.connectivityRollbackMutationStats={committedClearanceShoveCount:this.committedClearanceShoveCount,viaPairCountRemoved:this.viaPairCountRemoved,viaCountRemoved:this.viaCountRemoved,simplifiedPathCount:this.simplifiedPathCount,normalizedSegmentCount:this.normalizedSegmentCount,achievedExtraClearanceCount:this.achievedExtraClearanceCount,relocatedViaCount:this.relocatedViaCount,committedPushedViaRepairCount:this.committedPushedViaRepairCount,padClearanceRerouteCount:this.padClearanceRerouteCount},this.committedClearanceShoveCount=0,this.viaPairCountRemoved=0,this.viaCountRemoved=0,this.simplifiedPathCount=0,this.normalizedSegmentCount=0,this.achievedExtraClearanceCount=0,this.relocatedViaCount=0,this.committedPushedViaRepairCount=0,this.padClearanceRerouteCount=0,this.traces=structuredClone(this.initialConnectivitySafeTraces),this.obstacleIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,void 0,[],this.connectionNameResolver),this.remainingPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),this.finalizedMutatedTraceIndices=this.getMutatedTraceIndices()}}getMutatedTraceIndices(){const t=Math.max(this.initialConnectivitySafeTraces.length,this.traces.length);return Array.from({length:t},(e,n)=\u003en).filter(e=\u003eJSON.stringify(this.initialConnectivitySafeTraces[e])!==JSON.stringify(this.traces[e]))}createStats(){const t=this.candidates[this.candidateCursor],e=this.phase===\"repair-vias\"?this.viaRepairTraceIndices:this.traceIndices;return{phase:this.phase,budgetLimited:this.budgetLimited,completionReason:this.phase===\"complete\"||this.solved?this.connectivityRollbackCount\u003e0?\"connectivity_rollback\":this.budgetLimited?\"iteration_budget\":this.connectivityValidationError?\"connectivity_validation_unavailable\":\"completed\":null,resultStatus:this.connectivityRollbackCount\u003e0||this.budgetLimited||this.connectivityValidationError!==null?\"best_effort\":\"complete\",traceCursor:this.traceCursor,traceCount:e.length,traceIndex:e[this.traceCursor],routeCursor:this.routeCursor,candidateCursor:this.candidateCursor,candidateCount:this.candidates.length,candidateKind:t?.kind,candidateWidth:t?.width,candidatePointCount:t?.points.length,clearancePadding:this.clearancePaddingTiers[this.clearanceTierCursor],candidateShoveCount:this.candidateShoveCount,attemptedCandidateCount:this.attemptedCandidateCount,attemptedClearanceShoveCount:this.attemptedClearanceShoveCount,attemptedViaGridCount:this.attemptedViaGridCount,committedClearanceShoveCount:this.committedClearanceShoveCount,viaPairCountRemoved:this.viaPairCountRemoved,viaCountRemoved:this.viaCountRemoved,simplifiedPathCount:this.simplifiedPathCount,normalizedSegmentCount:this.normalizedSegmentCount,achievedExtraClearanceCount:this.achievedExtraClearanceCount,relocatedViaCount:this.relocatedViaCount,unresolvedViaCount:this.unresolvedViaCount,attemptedPushedViaRepairCount:this.attemptedPushedViaRepairCount,committedPushedViaRepairCount:this.committedPushedViaRepairCount,padClearanceRerouteCount:this.padClearanceRerouteCount,unresolvedPadClearanceCount:this.unresolvedPadClearanceCount,initialPadClearanceViolationCount:this.initialPadClearanceViolationCount,remainingPadClearanceViolationCount:this.remainingPadClearanceViolationCount,initialPadClearanceViolationCountByClearance:{...this.initialPadClearanceViolationCountByClearance},remainingPadClearanceViolationCountByClearance:{...this.remainingPadClearanceViolationCountByClearance},connectivityValidationCount:this.connectivityValidationCount,connectivityRollbackCount:this.connectivityRollbackCount,connectivityRegressionEndpointIds:[...this.connectivityRegressionEndpointIds],connectivityValidationError:this.connectivityValidationError,connectivityRollbackMutationStats:this.connectivityRollbackMutationStats===null?null:{...this.connectivityRollbackMutationStats},mutatedTraceIndices:[...this.finalizedMutatedTraceIndices],spatialIndexRectCount:this.obstacleIndex.items.length}}computeProgress(){if(this.solved||this.phase===\"complete\")return 1;const t=this.phase===\"repair-vias\"?this.viaRepairTraceIndices:this.traceIndices;if(t.length===0)return 1;const e=this.resumePhase===\"scan-via-pairs\"?0:.5;return Math.min(.99,e+this.traceCursor/t.length*.5)}getConstructorParams(){return[this.inputProblem]}tryFinalAcceptance(){const t=this.pushedViaRepairRollbackTraces??this.rollbackTraces;t\u0026\u0026(this.traces=t),this.activeSubSolver=null,this.rollbackTraces=null,this.pushedViaRepairRollbackTraces=null,this.pendingPushedViaRepair=null,this.alternatePushedViaRepairs=[],this.viaGridAttempt=null,this.candidates=[],this.candidateCursor=0,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.baseCandidateValidated=!1,this.candidateSetMayUseGridFallback=!1,this.ensureConnectivitySafeOutput(),this.obstacleIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,void 0,[],this.connectionNameResolver),this.remainingPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),this.budgetLimited=!0,this.phase=\"complete\",this.solved=!0,this.progress=1,this.stats=this.createStats()}getOutput(){return structuredClone(this.solved?this.traces:this.initialConnectivitySafeTraces)}visualize(){const t=[],e=[],n=this.candidates[this.candidateCursor];for(let o=0;o\u003cthis.traces.length;o++){const i=this.traces[o];for(const r of i.route)r.route_type===\"via\"\u0026\u0026e.push({center:r,radius:(r.via_diameter??.6)/2,fill:\"#d4a017\",stroke:\"#7a5700\"});for(let r=0;r\u003ci.route.length-1;r++){const s=i.route[r],a=i.route[r+1];jA(s)\u0026\u0026jA(a)\u0026\u0026s.layer===a.layer\u0026\u0026t.push({points:[s,a],strokeColor:s.layer===\"bottom\"?\"#376fc4\":\"#777\",strokeWidth:s.width})}}if(n)for(let o=0;o\u003cn.points.length-1;o++)t.push({points:[n.points[o],n.points[o+1]],strokeColor:\"#ff7400\",strokeWidth:n.width+2*(this.clearancePaddingTiers[this.clearanceTierCursor]??0)});return{coordinateSystem:\"cartesian\",title:`Power trace cleanup: ${this.phase}`,lines:t,points:[],circles:e,rects:[],texts:[]}}},hB=t=\u003et?.route_type===\"wire\",WSe=class extends BN{inputProblem;traces;obstacleIndex;traceCursor=0;routeCursor=0;repairedSegmentCount=0;repairedPadNeckSegmentCount=0;unresolvedSegmentCount=0;totalWidthReduction=0;budgetLimited=!1;connectivityValidationCount=0;connectivityRollbackCount=0;connectivityRegressionEndpointIds=[];connectivityValidationError=null;connectivityRollbackMutationStats=null;connectionNameResolver;nominalWidthByTraceId=new Map;connectivityInvariant;initialConnectivitySafeTraces;minimumTraceWidth;traceIndices;connectivityFinalized=!1;constructor(e){super(),this.inputProblem=structuredClone(e),this.traces=structuredClone(e.traces),this.initialConnectivitySafeTraces=structuredClone(e.traces),this.connectivityInvariant=new Bce(this.inputProblem.simpleRouteJson,this.initialConnectivitySafeTraces),this.connectionNameResolver=new Tv(e.simpleRouteJson,this.traces),this.minimumTraceWidth=e.simpleRouteJson.minTraceWidth;const n=e.traceIndices?[...new Set(e.traceIndices)]:this.traces.map((i,r)=\u003er);for(const i of n)if(!Number.isInteger(i)||i\u003c0||i\u003e=this.traces.length)throw new RangeError(`Invalid clearance-repair trace index: ${i}`);this.traceIndices=n,this.obstacleIndex=this.createConservativeObstacleIndex();const o=this.traceIndices.reduce((i,r)=\u003ei+Math.max(0,this.traces[r].route.length-1),0);this.MAX_ITERATIONS=Math.max(10,8*o+2*this.traceIndices.length),this.stats=this.createStats()}getSolverName(){return\"PowerTraceClearanceRepairSolver\"}_step(){const e=this.traceIndices[this.traceCursor],n=e===void 0?void 0:this.traces[e];if(!n)return this.ensureConnectivitySafeOutput(),this.solved=!0,void(this.stats=this.createStats());if(this.routeCursor\u003e=n.route.length-1)return this.traceCursor++,this.routeCursor=0,void(this.stats=this.createStats());const o=this.routeCursor++,i=n.route[o],r=n.route[o+1];if(!hB(i)||!hB(r)||i.layer!==r.layer)return void(this.stats=this.createStats());const s=Math.max(i.width,r.width),a={start:i,end:r,layer:i.layer,width:s,connectionNames:this.getTraceConnectionNames(n),ignoreTraceIndex:e,ignoreRouteRange:{start:o,end:o+1}};if(this.repairConnectedPadNeck(n,o,a))return void(this.stats=this.createStats());if(!this.segmentHasForeignTraceCollision(o,s))return void(this.stats=this.createStats());if(this.segmentHasForeignTraceCollision(o,this.minimumTraceWidth))return this.unresolvedSegmentCount++,void(this.stats=this.createStats());let A=this.minimumTraceWidth,c=s;for(let m=0;m\u003c10;m++){const _=(A+c)/2;this.segmentHasForeignTraceCollision(o,_)?c=_:A=_}const l=s\u003e=.5?.025:.0125,u=Math.max(this.minimumTraceWidth,Math.floor((A+Ki)/l)*l),g=this.segmentHasForeignTraceCollision(o,u)?A:u,h=i.width,d=r.width;i.width=Math.min(i.width,g),r.width=Math.min(r.width,g);const p=h-i.width+(d-r.width);if(p\u003c=Ki)return this.unresolvedSegmentCount++,void(this.stats=this.createStats());this.repairedSegmentCount++,this.totalWidthReduction+=p,this.obstacleIndex=this.createConservativeObstacleIndex(),this.routeCursor=Math.max(0,o-1),this.stats=this.createStats()}repairConnectedPadNeck(e,n,o){const i=e.route[n],r=e.route[n+1];if(!hB(i)||!hB(r))return!1;let s=this.obstacleIndex.getConnectedPadWidthLimitAtPoint(o,i),a=this.obstacleIndex.getConnectedPadWidthLimitAtPoint(o,r);n===0\u0026\u0026(s=this.getSmallerLimit(s,this.obstacleIndex.getConnectedPadEndpointWidthLimitAtPoint(o,i))),n+1===e.route.length-1\u0026\u0026(a=this.getSmallerLimit(a,this.obstacleIndex.getConnectedPadEndpointWidthLimitAtPoint(o,r)));const A=s,c=a;if((A===null||i.width\u003c=A+Ki)\u0026\u0026(c===null||r.width\u003c=c+Ki))return!1;const l=i.width,u=r.width;if(A!==null\u0026\u0026(i.width=Math.min(i.width,A)),c!==null\u0026\u0026(r.width=Math.min(r.width,c)),A!==null\u0026\u0026c===null)this.insertPadBoundaryTransition(e,n,o,\"start\",i.width,u);else if(A===null\u0026\u0026c!==null)this.insertPadBoundaryTransition(e,n,o,\"end\",r.width,l);else if(A!==null\u0026\u0026c!==null){const g=this.obstacleIndex.getConnectedPadBoundaryPoint(o,\"start\"),h=this.obstacleIndex.getConnectedPadBoundaryPoint(o,\"end\");g\u0026\u0026h\u0026\u0026(this.insertPadBoundaryTransition(e,n,o,\"start\",i.width,u),this.insertPadBoundaryTransition(e,n+2,o,\"end\",r.width,l))}return this.totalWidthReduction+=l-i.width+(u-r.width),this.repairedPadNeckSegmentCount++,this.obstacleIndex=this.createConservativeObstacleIndex(),this.routeCursor=Math.max(0,n-1),!0}getSmallerLimit(e,n){return e===null?n:n===null?e:Math.min(e,n)}insertPadBoundaryTransition(e,n,o,i,r,s){const a=this.obstacleIndex.getConnectedPadBoundaryPoint(o,i);if(!a)return;const A=i===\"start\"?o.start:o.end,c=i===\"start\"?o.end:o.start,l=Math.hypot(c.x-A.x,c.y-A.y);if(l\u003c=1e-9)return;const u=Math.min(1e-6,l/4),g=(c.x-A.x)/l,h=(c.y-A.y)/l,d={route_type:\"wire\",x:a.x-g*u,y:a.y-h*u,width:r,layer:o.layer},p={...d,x:a.x+g*u,y:a.y+h*u,width:s},m=i===\"start\"?e.route[n+1]:e.route[n],_=i===\"start\"?e.route[n+2]:e.route[n-1];if(hB(m)\u0026\u0026_?.route_type===\"via\"){const f=this.resolveNominalTraceWidth(e);this.obstacleIndex.collides({...o,start:m,end:p,width:f})||(m.width=Math.max(m.width,f),p.width=m.width)}e.route.splice(n+1,0,...i===\"start\"?[d,p]:[p,d])}resolveNominalTraceWidth(e){const n=this.nominalWidthByTraceId.get(e.pcb_trace_id);if(n!==void 0)return n;const o=new Set(this.connectionNameResolver.canonicalize(this.getTraceConnectionNames(e))),i=this.inputProblem.simpleRouteJson.connections.find(s=\u003ethis.connectionNameResolver.canonicalize([s.name,s.source_trace_id,s.rootConnectionName,s.netConnectionName,...s.mergedConnectionNames??[]].filter(a=\u003e!!a)).some(a=\u003eo.has(a))),r=Math.max(i?.nominalTraceWidth??i?.width??this.inputProblem.simpleRouteJson.nominalTraceWidth??this.minimumTraceWidth,this.minimumTraceWidth);return this.nominalWidthByTraceId.set(e.pcb_trace_id,r),r}segmentHasForeignTraceCollision(e,n){const o=this.traceIndices[this.traceCursor],i=o===void 0?void 0:this.traces[o],r=i?.route[e],s=i?.route[e+1];return!!(i\u0026\u0026hB(r)\u0026\u0026hB(s)\u0026\u0026r.layer===s.layer)\u0026\u0026this.obstacleIndex.findCollisions({start:r,end:s,layer:r.layer,width:n,connectionNames:this.getTraceConnectionNames(i),ignoreTraceIndex:o,ignoreRouteRange:{start:e,end:e+1}}).some(a=\u003ea.kind===\"trace\"\u0026\u0026a.traceIndex!==void 0\u0026\u0026a.traceIndex!==o)}createConservativeObstacleIndex(){const e=structuredClone(this.traces);for(const n of e)for(let o=0;o\u003cn.route.length-1;o++){const i=n.route[o],r=n.route[o+1];hB(i)\u0026\u0026hB(r)\u0026\u0026i.layer===r.layer\u0026\u0026(i.width=Math.max(i.width,r.width))}return new ub(this.inputProblem.simpleRouteJson,e,void 0,[],this.connectionNameResolver)}getTraceConnectionNames(e){return[e.pcb_trace_id,e.connection_name,e.source_trace_id,e.rootConnectionName,...e.mergedConnectionNames??[],...e.connectsTo??[]].filter(n=\u003e!!n)}ensureConnectivitySafeOutput(){if(!this.connectivityFinalized){this.connectivityFinalized=!0,this.connectivityValidationCount++;try{const e=this.connectivityInvariant.validate(this.traces);if(this.connectivityValidationError??=e.validationError??null,e.safe)return;this.connectivityRegressionEndpointIds=[...new Set(e.regressions.flatMap(n=\u003en.baselineEndpointLabels))]}catch(e){this.connectivityValidationError=e instanceof Error?e.message:String(e)}this.connectivityRollbackCount++,this.connectivityRollbackMutationStats={repairedSegmentCount:this.repairedSegmentCount,repairedPadNeckSegmentCount:this.repairedPadNeckSegmentCount,totalWidthReduction:this.totalWidthReduction},this.repairedSegmentCount=0,this.repairedPadNeckSegmentCount=0,this.totalWidthReduction=0,this.traces=structuredClone(this.initialConnectivitySafeTraces),this.obstacleIndex=this.createConservativeObstacleIndex()}}createStats(){return{phase:this.solved?\"complete\":\"repair-trace-clearance\",budgetLimited:this.budgetLimited,completionReason:this.solved?this.connectivityRollbackCount\u003e0?\"connectivity_rollback\":this.budgetLimited?\"iteration_budget\":this.connectivityValidationError?\"connectivity_validation_unavailable\":\"completed\":null,resultStatus:this.connectivityRollbackCount\u003e0||this.budgetLimited||this.connectivityValidationError!==null?\"best_effort\":\"complete\",traceCursor:this.traceCursor,traceCount:this.traceIndices.length,traceIndex:this.traceIndices[this.traceCursor],routeCursor:this.routeCursor,repairedSegmentCount:this.repairedSegmentCount,repairedPadNeckSegmentCount:this.repairedPadNeckSegmentCount,unresolvedSegmentCount:this.unresolvedSegmentCount,totalWidthReduction:this.totalWidthReduction,connectivityValidationCount:this.connectivityValidationCount,connectivityRollbackCount:this.connectivityRollbackCount,connectivityRegressionEndpointIds:[...this.connectivityRegressionEndpointIds],connectivityValidationError:this.connectivityValidationError,connectivityRollbackMutationStats:this.connectivityRollbackMutationStats===null?null:{...this.connectivityRollbackMutationStats},spatialIndexRectCount:this.obstacleIndex.items.length}}computeProgress(){return this.solved||this.traceIndices.length===0?1:Math.min(.99,this.traceCursor/this.traceIndices.length)}tryFinalAcceptance(){this.ensureConnectivitySafeOutput(),this.budgetLimited=!0,this.solved=!0,this.progress=1,this.stats=this.createStats()}getConstructorParams(){return[this.inputProblem]}getOutput(){return structuredClone(this.solved?this.traces:this.initialConnectivitySafeTraces)}visualize(){const e=[];for(let n=0;n\u003cthis.traces.length;n++){const o=this.traces[n];for(let i=0;i\u003co.route.length-1;i++){const r=o.route[i],s=o.route[i+1];hB(r)\u0026\u0026hB(s)\u0026\u0026r.layer===s.layer\u0026\u0026e.push({points:[r,s],strokeColor:n===this.traceIndices[this.traceCursor]\u0026\u0026i===this.routeCursor?\"#ff7400\":r.layer===\"bottom\"?\"#376fc4\":\"#777\",strokeWidth:Math.max(r.width,s.width)})}}return{coordinateSystem:\"cartesian\",title:\"Power trace direction-independent clearance repair\",lines:e,points:[],circles:[],rects:[],texts:[]}}},Q7t=[{x:0,y:0},{x:.5,y:0},{x:0,y:.5},{x:.5,y:.5}],v7t=[{offset:{x:0,y:0},strictNecking:!0},{offset:{x:.5,y:.5},strictNecking:!0},{offset:{x:0,y:0},strictNecking:!1},{offset:{x:.5,y:.5},strictNecking:!1}],w7t=t=\u003e[...new Set(t.map(e=\u003eNumber(e.toFixed(6))))].sort((e,n)=\u003en-e),Sa=t=\u003et?.route_type===\"wire\",fgo=class extends BN{inputProblem;options;traces;obstacleIndex;connectionNameResolver;connectionByTraceId=new Map;connectivityInvariant;lastConnectivitySafeTraces;traceOrder;selectedOwnedTraceIndices;selectedCleanupTraceIndices;selectedViaRepairTraceIndices;mutableBlockerTraceIndices;immutableTraceIndices;initialImmutableTraceSignatures=new Map;traceOrderCursor=-1;maxPassCount=4;previousWidthDeficit=0;passIndex=0;completedPassCount=0;lastNormalizedWidthDeficitGain=0;normalizedWidthDeficitGainByPass=[];plateauReached=!1;phase=\"scan-trace\";traceIndex=-1;routeSegmentIndex=0;nominalTraceWidth=0;currentIntervals=[];intervalCursor=0;candidateWidths=[];widthCursor=0;gridResolutions=[];resolutionCursor=0;offsetCursor=0;keptTraceCount=0;recreatedTraceCount=0;expandedSegmentCount=0;intermediateExpandedSegmentCount=0;pathWidthUpgradeCount=0;inPlaceWidthProbeCount=0;reroutedSegmentCount=0;unresolvedSegmentCount=0;attemptedGridCount=0;attemptedLayerGridCount=0;attemptedInflationCount=0;pushedTraceCount=0;elasticPushedTraceCount=0;layerReroutedTraceCount=0;insertedViaCount=0;neckedLayerSegmentCount=0;removedViaPairCount=0;removedViaCount=0;simplifiedPathCount=0;normalizedSegmentCount=0;cleanupClearanceShoveCount=0;relocatedViaCount=0;unresolvedViaCount=0;initialImmutableViaViolationCount=0;remainingImmutableViaViolationCount=0;initialImmutableViaViolationPairCount=0;remainingImmutableViaViolationPairCount=0;immutableTraceMutationIds=[];lastSafeImmutableViaViolationSignatures=new Set;immutableViaViolationRollbackCount=0;attemptedImmutableViaViolationCount=null;attemptedImmutableViaViolationPairCount=null;immutableViaViolationRegressionIds=[];padClearanceRerouteCount=0;unresolvedPadClearanceCount=0;repairedTraceClearanceSegmentCount=0;repairedPadNeckSegmentCount=0;unresolvedTraceClearanceSegmentCount=0;sameNetContactRejectionCount=0;connectivityValidationCount=0;connectivityRollbackCount=0;connectivityRollbackPhases=[];immutableSafetyRollbackCount=0;immutableSafetyRollbackPhases=[];connectivityRegressionEndpointIds=[];connectivityValidationError=null;connectivityRollbackMutationStats=null;immutableSafetyRollbackMutationStats=null;discardedExpansionMutationStats=null;initialPadClearanceViolationCount=0;remainingPadClearanceViolationCount=0;initialPadClearanceViolationCountByClearance={};remainingPadClearanceViolationCountByClearance={};budgetLimitedExpansion=!1;finalAcceptanceUsed=!1;cleanupCompleted=!1;clearanceRepairCompleted=!1;cleanupBestEffortAccepted=!1;clearanceRepairBestEffortAccepted=!1;cleanupIterationBudget=0;clearanceRepairIterationBudget=0;expansionPushedTraceIndices=new Set;cleanupMutatedTraceIndices=[];failedSubSolverCount=0;inflationAttemptsBySegment=new Map;layerAttemptCountByTrace=new Map;layerRerouteCountByTrace=new Map;activeInflationKey=null;activeInflationWidth=null;layerAttempt=null;pendingLayerOutput=null;pendingLayerPushCount=0;constructor(t,e={}){super(),this.inputProblem=structuredClone(t),this.options=structuredClone(e),this.traces=structuredClone(t.traces??[]),this.connectionNameResolver=new Tv(this.inputProblem,this.traces),this.lastConnectivitySafeTraces=structuredClone(this.traces),this.connectivityInvariant=new Bce(this.inputProblem,this.lastConnectivitySafeTraces);const n=e.onlyConnectionNames?new Set(this.connectionNameResolver.canonicalize([...e.onlyConnectionNames])):null,o=this.traces.flatMap((s,a)=\u003en?this.connectionNameResolver.canonicalize(this.getTraceConnectionNames(s)).some(A=\u003en.has(A))?[a]:[]:[a]),i=new Map(o.map(s=\u003e[s,this.getInitialTracePriority(this.traces[s])]));this.traceOrder=o.sort((s,a)=\u003ei.get(a)-i.get(s)||s-a),this.selectedOwnedTraceIndices=this.traceOrder.filter(s=\u003ethis.findConnectionForTrace(this.traces[s])),this.selectedCleanupTraceIndices=[...this.selectedOwnedTraceIndices],this.selectedViaRepairTraceIndices=[...this.selectedOwnedTraceIndices],this.mutableBlockerTraceIndices=this.traces.flatMap((s,a)=\u003ethis.findConnectionForTrace(s)?[a]:[]);const r=new Set(this.mutableBlockerTraceIndices);this.immutableTraceIndices=this.traces.flatMap((s,a)=\u003er.has(a)?[]:(this.initialImmutableTraceSignatures.set(a,JSON.stringify(s)),[a])),this.previousWidthDeficit=this.calculateWidthDeficit().deficit,this.obstacleIndex=new ub(this.inputProblem,this.traces,this.traceIndex\u003e=0?this.traceIndex:void 0,[],this.connectionNameResolver),this.lastSafeImmutableViaViolationSignatures=this.getImmutableViaViolationSignatures(this.traces),this.initialImmutableViaViolationCount=this.countViolatingImmutableVias(this.lastSafeImmutableViaViolationSignatures),this.remainingImmutableViaViolationCount=this.initialImmutableViaViolationCount,this.initialImmutableViaViolationPairCount=this.lastSafeImmutableViaViolationSignatures.size,this.remainingImmutableViaViolationPairCount=this.initialImmutableViaViolationPairCount,this.activeSubSolver=null,this.MAX_ITERATIONS=8e6,this.stats=this.createStats()}getSolverName(){return\"PowerTraceExpanderSolver\"}_step(){if(this.shouldStartBudgetFinalization())return this.startBudgetFinalization(),void(this.stats=this.createStats());if(this.activeSubSolver)return this.stepActiveGridSolver(),void(this.stats=this.createStats());switch(this.phase){case\"scan-trace\":this.scanNextTrace();break;case\"evaluate-segment\":this.evaluateNextSegment();break;case\"try-trace-inflation\":case\"cleanup\":case\"repair-trace-clearance\":break;case\"try-layer-candidate\":this.startNextLayerCandidate();break;case\"try-grid-candidate\":this.startNextGridCandidate();break;case\"complete\":this.acceptConnectivityCheckpoint(this.traces,\"final\"),this.solved=!0}this.stats=this.createStats()}scanNextTrace(){if(this.traceOrderCursor++,this.routeSegmentIndex=0,this.traceOrderCursor\u003e=this.traceOrder.length)return void this.finishOrStartNextPass();this.traceIndex=this.traceOrder[this.traceOrderCursor];const t=this.traces[this.traceIndex];this.findConnectionForTrace(t)?(this.nominalTraceWidth=this.resolveNominalTraceWidth(t),this.traceMeetsNominalWidth(t,this.nominalTraceWidth)?this.keptTraceCount++:(this.rebuildObstacleIndex(),t.route=(function(e,n){if(e.length\u003c2)return e.map(i=\u003e({...i}));const o=[];for(let i=0;i\u003ce.length-1;i++){const r=e[i],s=e[i+1];if(o.push({...r}),r.route_type!==\"wire\"||s.route_type!==\"wire\"||r.layer!==s.layer||r.width\u003e=n-Ki)continue;const a=Aa(r,s),A=Math.max(1,Math.ceil(a/n));for(let c=1;c\u003cA;c++){const l=c/A;o.push({route_type:\"wire\",x:r.x+(s.x-r.x)*l,y:r.y+(s.y-r.y)*l,width:r.width,layer:r.layer})}}return o.push({...e[e.length-1]}),o})(t.route,this.nominalTraceWidth),this.recreatedTraceCount++,this.phase=\"evaluate-segment\")):this.keptTraceCount++}finishOrStartNextPass(){const{deficit:t,nominalArea:e}=this.calculateWidthDeficit(),n=this.previousWidthDeficit-t;if(this.lastNormalizedWidthDeficitGain=e\u003c=Ki?0:n/e,this.normalizedWidthDeficitGainByPass.push(this.lastNormalizedWidthDeficitGain),this.plateauReached=this.lastNormalizedWidthDeficitGain\u003c.001,this.completedPassCount=this.passIndex+1,this.passIndex+1\u003cthis.maxPassCount\u0026\u0026this.lastNormalizedWidthDeficitGain\u003e=.001)return this.previousWidthDeficit=t,this.passIndex++,this.traceOrderCursor=-1,this.traceIndex=-1,this.routeSegmentIndex=0,this.inflationAttemptsBySegment.clear(),void(this.phase=\"scan-trace\");this.startCleanup()}startCleanup(){this.acceptConnectivityCheckpoint(this.traces,\"expansion\"),this.traceIndex=this.traces.length,this.phase=\"cleanup\";const t=new JSe({simpleRouteJson:this.inputProblem,traces:this.traces,traceIndices:this.selectedCleanupTraceIndices,viaRepairTraceIndices:this.selectedViaRepairTraceIndices,mutableTraceIndices:this.mutableBlockerTraceIndices,maxRerouteLength:10,desiredPadClearance:this.options.powerTraceToPadClearance}),e=this.getRemainingParentIterationsAfterCurrentStep(),n=e===0?0:Math.max(1,Math.floor(.75*e));t.MAX_ITERATIONS=Math.min(t.MAX_ITERATIONS,n),this.cleanupIterationBudget=t.MAX_ITERATIONS,this.activeSubSolver=t}shouldStartBudgetFinalization(){return!this.budgetLimitedExpansion\u0026\u0026this.phase!==\"cleanup\"\u0026\u0026this.phase!==\"repair-trace-clearance\"\u0026\u0026this.phase!==\"complete\"\u0026\u0026this.iterations\u003e=this.getExpansionIterationBudget()}getFinalizationIterationReserve(){return Math.min(Math.max(0,this.MAX_ITERATIONS-1),Math.max(1,Math.floor(.125*this.MAX_ITERATIONS)))}getExpansionIterationBudget(){return Math.max(1,this.MAX_ITERATIONS-this.getFinalizationIterationReserve())}startBudgetFinalization(){this.budgetLimitedExpansion=!0,this.activeSubSolver=null,this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.activeInflationKey=null,this.activeInflationWidth=null,this.layerAttempt=null,this.discardInFlightExpansion(),this.startCleanup()}discardInFlightExpansion(){this.discardedExpansionMutationStats=this.captureAndResetExpansionMutationStats(),this.restoreLastConnectivitySafeTraces()}rollbackConnectivityRegressedExpansion(){this.connectivityRollbackMutationStats=this.captureAndResetExpansionMutationStats(),this.restoreLastConnectivitySafeTraces()}rollbackImmutableUnsafeExpansion(){this.immutableSafetyRollbackMutationStats=this.captureAndResetExpansionMutationStats(),this.restoreLastConnectivitySafeTraces()}captureAndResetExpansionMutationStats(){const t={recreatedTraceCount:this.recreatedTraceCount,expandedSegmentCount:this.expandedSegmentCount,intermediateExpandedSegmentCount:this.intermediateExpandedSegmentCount,pathWidthUpgradeCount:this.pathWidthUpgradeCount,reroutedSegmentCount:this.reroutedSegmentCount,pushedTraceCount:this.pushedTraceCount,elasticPushedTraceCount:this.elasticPushedTraceCount,layerReroutedTraceCount:this.layerReroutedTraceCount,insertedViaCount:this.insertedViaCount,neckedLayerSegmentCount:this.neckedLayerSegmentCount};return this.recreatedTraceCount=0,this.expandedSegmentCount=0,this.intermediateExpandedSegmentCount=0,this.pathWidthUpgradeCount=0,this.reroutedSegmentCount=0,this.pushedTraceCount=0,this.elasticPushedTraceCount=0,this.layerReroutedTraceCount=0,this.insertedViaCount=0,this.neckedLayerSegmentCount=0,this.expansionPushedTraceIndices.clear(),t}restoreLastConnectivitySafeTraces(){this.traces=structuredClone(this.lastConnectivitySafeTraces),this.rebuildObstacleIndex()}getRemainingParentIterationsAfterCurrentStep(){return Math.max(0,this.MAX_ITERATIONS-this.iterations-1)}calculateWidthDeficit(){let t=0,e=0;for(const n of this.traceOrder){const o=this.traces[n];if(!this.findConnectionForTrace(o))continue;const i=this.resolveNominalTraceWidth(o);for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];if(!Sa(s)||!Sa(a)||s.layer!==a.layer)continue;const A=Aa(s,a),c=s.width;e+=A*i,t+=A*Math.max(0,i-c)}}return{deficit:t,nominalArea:e}}getInitialTracePriority(t){const e=this.resolveNominalTraceWidth(t);let n=0;for(let o=0;o\u003ct.route.length-1;o++){const i=t.route[o],r=t.route[o+1];Sa(i)\u0026\u0026Sa(r)\u0026\u0026i.layer===r.layer\u0026\u0026(n+=Aa(i,r)*Math.max(0,e-Math.min(i.width,r.width)))}return e*n}evaluateNextSegment(){const t=this.traces[this.traceIndex];if(!t)return void(this.phase=\"scan-trace\");const e=this.findNextUnderWidthSegment(t,this.routeSegmentIndex,this.nominalTraceWidth);if(e===-1)return void(this.phase=\"scan-trace\");this.routeSegmentIndex=e;const n=t.route[e],o=t.route[e+1];if(!Sa(n)||!Sa(o))return void this.routeSegmentIndex++;const i=this.getTraceConnectionNames(t),r=Math.min(n.width,o.width),s=this.findMaximumSafeInPlaceWidth(t,e,i);if(s\u003er+Ki){if(n.width=Math.max(n.width,s),o.width=Math.max(o.width,s),s\u003e=this.nominalTraceWidth-Ki)return this.expandedSegmentCount++,void this.routeSegmentIndex++;this.intermediateExpandedSegmentCount++}this.startTraceInflation(t,e)||this.prepareLayerRouteAttempt(t,e)||this.prepareRegularGridCandidates(t,e)}prepareRegularGridCandidates(t,e){if(this.currentIntervals=this.getExponentialIntervalCandidates(t,e,this.nominalTraceWidth),this.intervalCursor=0,this.candidateWidths=this.getCandidateWidths(this.nominalTraceWidth),this.widthCursor=0,this.gridResolutions=[],this.resolutionCursor=0,this.offsetCursor=0,this.currentIntervals.length===0)return this.unresolvedSegmentCount++,void this.routeSegmentIndex++;this.phase=\"try-grid-candidate\"}prepareLayerRouteAttempt(t,e){if(this.nominalTraceWidth\u003c.499999)return!1;const n=this.options.allowNewVias!==!1\u0026\u0026this.inputProblem.layerCount\u003e=2,o=n?2:this.maxPassCount,i=this.layerAttemptCountByTrace.get(this.traceIndex)??0,r=this.layerRerouteCountByTrace.get(this.traceIndex)??0;if(r\u003e=o||i\u003e=o||i\u003ethis.passIndex||i\u003e0\u0026\u0026r===0)return!1;const s=t.route[e],a=t.route[e+1];if(!Sa(s)||!Sa(a)||Math.min(s.width,a.width)\u003e=.5*this.nominalTraceWidth-Ki)return!1;const A=this.getExponentialIntervalCandidates(t,e,this.nominalTraceWidth).filter(f=\u003ethis.intervalSupportsLayerRouting(t,f)).sort((f,I)=\u003eI.endIndex-f.endIndex||f.startIndex-I.startIndex||this.getRouteIntervalLength(t,I.startIndex,I.endIndex)-this.getRouteIntervalLength(t,f.startIndex,f.endIndex))[0];if(!A)return!1;const c=this.getRouteQuality(t.route.slice(A.startIndex,A.endIndex+1));if(c.deficitArea\u003cthis.nominalTraceWidth||i\u003e0\u0026\u0026c.deficitArea/Math.max(c.length,Ki)\u003c.25)return!1;const l=t.route[A.startIndex],u=t.route[A.endIndex],g=this.getTraceConnectionNames(t),h=n?this.getEndpointLayers(l,g):[l.layer],d=n?this.getEndpointLayers(u,g):[u.layer],p=Math.min(this.nominalTraceWidth,Math.max(l.width,this.findMaximumSafeInPlaceWidth(t,A.startIndex,g))),m=Math.min(this.nominalTraceWidth,Math.max(u.width,this.findMaximumSafeInPlaceWidth(t,A.endIndex-1,g))),_=this.getSoftTraceIndices(this.nominalTraceWidth);return this.layerAttemptCountByTrace.set(this.traceIndex,i+1),this.layerAttempt={interval:A,minViaCount:n?1:0,maxViaCount:n?2:0,candidateWidths:[this.nominalTraceWidth],widthCursor:0,gridResolutions:[th(this.nominalTraceWidth/4,.2,.3)],resolutionCursor:0,offsetCursor:0,startLayers:h,endLayers:d,startNeckWidth:p,endNeckWidth:m,softTraceIndices:_},this.phase=\"try-layer-candidate\",!0}intervalSupportsLayerRouting(t,e){if(e.startIndex\u003e=e.endIndex)return!1;for(let i=e.startIndex;i\u003c=e.endIndex;i++){const r=t.route[i];if(!Sa(r))return!1}const n=t.route[e.startIndex],o=t.route[e.endIndex];return n.layer===o.layer}getEndpointLayers(t,e){return[...new Set([t.layer,...this.obstacleIndex.getConnectedLayersAtPoint({x:t.x,y:t.y},e)])].filter(n=\u003ethis.obstacleIndex.boardLayers.includes(n))}getSoftTraceIndices(t){const e=[];for(let n=0;n\u003cthis.traces.length;n++){if(n===this.traceIndex)continue;const o=this.traces[n],i=this.findConnectionForTrace(o);i\u0026\u0026Math.max(i.nominalTraceWidth??i.width??this.inputProblem.nominalTraceWidth??this.inputProblem.minTraceWidth,this.inputProblem.minTraceWidth)\u003ct-Ki\u0026\u0026e.push(n)}return e}startNextLayerCandidate(){const t=this.layerAttempt,e=this.traces[this.traceIndex];if(!t||!e)return this.layerAttempt=null,void(this.phase=\"evaluate-segment\");if(t.widthCursor\u003e=t.candidateWidths.length){const d=this.routeSegmentIndex;return this.layerAttempt=null,void this.prepareRegularGridCandidates(e,d)}const n=t.candidateWidths[t.widthCursor];if(t.gridResolutions.length===0\u0026\u0026(t.gridResolutions=this.getGridResolutions(n)),t.resolutionCursor\u003e=t.gridResolutions.length)return t.widthCursor++,t.gridResolutions=[],t.resolutionCursor=0,void(t.offsetCursor=0);if(t.offsetCursor\u003e=v7t.length)return t.resolutionCursor++,void(t.offsetCursor=0);const o=e.route[t.interval.startIndex],i=e.route[t.interval.endIndex];if(!Sa(o)||!Sa(i))return this.layerAttempt=null,void this.prepareRegularGridCandidates(e,this.routeSegmentIndex);const r=t.gridResolutions[t.resolutionCursor],s=v7t[t.offsetCursor],a=s.offset,A=Math.min(t.startNeckWidth,t.endNeckWidth),c=this.inputProblem.min_via_hole_diameter??this.inputProblem.minViaHoleDiameter??.3,l=Math.max(c,this.inputProblem.min_via_pad_diameter??this.inputProblem.minViaPadDiameter??this.inputProblem.minViaDiameter??.6),u=Math.max(this.inputProblem.minTraceWidth,Math.min(s.strictNecking?t.startNeckWidth:A,n)),g=Math.max(this.inputProblem.minTraceWidth,Math.min(s.strictNecking?t.endNeckWidth:A,n)),h=th(3*this.nominalTraceWidth,1.5,3);t.maxViaCount\u003e0?this.attemptedLayerGridCount++:this.attemptedGridCount++,this.activeSubSolver=new m7t({start:o,end:i,originalStartLayer:o.layer,originalEndLayer:i.layer,startLayers:t.startLayers,endLayers:t.endLayers,layers:this.obstacleIndex.boardLayers,traceWidth:n,startNeckWidth:u,endNeckWidth:g,maxStartNeckLength:h,maxEndNeckLength:h,neckPenaltyExponent:s.strictNecking?2:1,viaDiameter:l,viaHoleDiameter:c,minViaCount:t.minViaCount,maxViaCount:t.maxViaCount,viaCost:Math.max(1,2*this.nominalTraceWidth),gridSize:r,gridOffset:{x:a.x*r,y:a.y*r},connectionNames:this.getTraceConnectionNames(e),obstacleIndex:this.obstacleIndex,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,t.interval.startIndex-1),end:Math.min(e.route.length-1,t.interval.endIndex+1)},softTraceIndices:t.softTraceIndices,fixedVias:this.getFixedViasOutsideInterval(e,t.interval),bounds:this.inputProblem.bounds,obstacleClearance:this.getDesiredPadClearance(n),searchPadding:Math.min(5,Math.max(2.5,Aa(o,i)/2,4*n))})}startNextGridCandidate(){const t=this.traces[this.traceIndex];if(!t)return void(this.phase=\"scan-trace\");if(this.widthCursor\u003e=this.candidateWidths.length)return this.unresolvedSegmentCount++,this.routeSegmentIndex++,void(this.phase=\"evaluate-segment\");if(this.intervalCursor\u003e=this.currentIntervals.length)return this.widthCursor++,this.intervalCursor=0,this.gridResolutions=[],this.resolutionCursor=0,void(this.offsetCursor=0);const e=this.candidateWidths[this.widthCursor],n=t.route[this.routeSegmentIndex],o=t.route[this.routeSegmentIndex+1];if(Sa(n)\u0026\u0026Sa(o)\u0026\u0026e\u003c=Math.min(n.width,o.width)+Ki)return void(this.widthCursor=this.candidateWidths.length);if(this.gridResolutions.length===0\u0026\u0026(this.gridResolutions=this.getGridResolutions(e)),this.resolutionCursor\u003e=this.gridResolutions.length)return this.intervalCursor++,this.resolutionCursor=0,void(this.offsetCursor=0);if(this.offsetCursor\u003e=Q7t.length)return this.resolutionCursor++,void(this.offsetCursor=0);const i=this.currentIntervals[this.intervalCursor],r=t.route[i.startIndex],s=t.route[i.endIndex];if(!Sa(r)||!Sa(s)||r.layer!==s.layer)return this.intervalCursor++,this.resolutionCursor=0,void(this.offsetCursor=0);if(this.endpointCollides(t,i,r,e)||this.endpointCollides(t,i,s,e))return this.intervalCursor++,this.resolutionCursor=0,void(this.offsetCursor=0);const a=this.gridResolutions[this.resolutionCursor],A=Q7t[this.offsetCursor],c={x:A.x*a,y:A.y*a};this.attemptedGridCount++,this.activeSubSolver=new Ice({start:r,end:s,layer:r.layer,traceWidth:e,gridSize:a,gridOffset:c,connectionNames:this.getTraceConnectionNames(t),obstacleIndex:this.obstacleIndex,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,i.startIndex-1),end:Math.min(t.route.length-1,i.endIndex+1)},bounds:this.inputProblem.bounds,obstacleClearance:this.getDesiredPadClearance(e),searchPadding:Math.min(5,Math.max(1.5,Aa(r,s)/2,3*e))})}endpointCollides(t,e,n,o){return this.obstacleIndex.collides({start:n,end:n,layer:n.layer,width:o,connectionNames:this.getTraceConnectionNames(t),ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,e.startIndex-1),end:Math.min(t.route.length-1,e.endIndex+1)},obstacleClearance:this.getDesiredPadClearance(o)})}stepActiveGridSolver(){if(this.activeSubSolver instanceof WSe)return void this.stepActiveTraceClearanceRepairSolver();if(this.activeSubSolver instanceof JSe)return void this.stepActiveCleanupSolver();if(this.activeSubSolver instanceof pH)return void this.stepActiveInflationSolver();if(this.activeSubSolver instanceof m7t)return void this.stepActiveLayerSolver();const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput();if(e){const n=this.gridRouteReplacementCollides(e)||this.gridRouteBoundaryCollides(e);if(!n\u0026\u0026this.gridRoutePreservesSameNetContacts(e))return this.applyGridRoute(this.maximizeGridRouteWidth(e)),void(this.activeSubSolver=null);n||this.sameNetContactRejectionCount++}}this.retainFailedSubSolver(t),this.activeSubSolver=null,this.offsetCursor++}}stepActiveCleanupSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved)return this.adoptCleanupOutput(t),this.activeSubSolver=null,void this.startTraceClearanceRepair();this.retainFailedSubSolver(t),this.activeSubSolver=null,this.startTraceClearanceRepair()}}adoptCleanupOutput(t){const e=this.acceptConnectivityCheckpoint(t.getOutput(),\"cleanup\");this.cleanupCompleted=!t.budgetLimited;const n=t.stats;this.connectivityValidationError??=n.connectivityValidationError??null,this.connectivityValidationCount+=Number(n.connectivityValidationCount??0);const o=Number(n.connectivityRollbackCount??0);o\u003e0\u0026\u0026(this.connectivityRollbackCount+=o,this.connectivityRollbackPhases.includes(\"cleanup\")||this.connectivityRollbackPhases.push(\"cleanup\"),this.connectivityRegressionEndpointIds=[...new Set([...this.connectivityRegressionEndpointIds,...n.connectivityRegressionEndpointIds??[]])]);const i=e\u0026\u0026o===0;this.cleanupBestEffortAccepted=t.budgetLimited\u0026\u0026i,this.cleanupMutatedTraceIndices=i?[...n.mutatedTraceIndices??[]]:[],this.removedViaPairCount=i?Number(n.viaPairCountRemoved??0):0,this.removedViaCount=i?Number(n.viaCountRemoved??0):0,this.simplifiedPathCount=i?Number(n.simplifiedPathCount??0):0,this.normalizedSegmentCount=i?Number(n.normalizedSegmentCount??0):0,this.cleanupClearanceShoveCount=i?Number(n.committedClearanceShoveCount??0):0,this.relocatedViaCount=i?Number(n.relocatedViaCount??0):0,this.unresolvedViaCount=Number(n.unresolvedViaCount??0),this.padClearanceRerouteCount=i?Number(n.padClearanceRerouteCount??0):0,this.unresolvedPadClearanceCount=Number(n.unresolvedPadClearanceCount??0),this.initialPadClearanceViolationCount=Number(n.initialPadClearanceViolationCount??0),this.remainingPadClearanceViolationCount=Number(n.remainingPadClearanceViolationCount??0),this.initialPadClearanceViolationCountByClearance={...n.initialPadClearanceViolationCountByClearance??{}},this.remainingPadClearanceViolationCountByClearance={...n.remainingPadClearanceViolationCountByClearance??{}},this.rebuildObstacleIndex()}startTraceClearanceRepair(){this.phase=\"repair-trace-clearance\";const t=[...new Set([...this.getOwnedTraceIndices(),...this.expansionPushedTraceIndices,...this.cleanupMutatedTraceIndices])],e=new WSe({simpleRouteJson:this.inputProblem,traces:this.traces,traceIndices:t});e.MAX_ITERATIONS=Math.min(e.MAX_ITERATIONS,this.getRemainingParentIterationsAfterCurrentStep()),this.clearanceRepairIterationBudget=e.MAX_ITERATIONS,this.activeSubSolver=e}stepActiveTraceClearanceRepairSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved)return this.adoptClearanceRepairOutput(t),this.activeSubSolver=null,void(this.phase=\"complete\");this.retainFailedSubSolver(t),this.activeSubSolver=null,this.phase=\"complete\"}}adoptClearanceRepairOutput(t){const e=this.acceptConnectivityCheckpoint(t.getOutput(),\"clearance-repair\");this.clearanceRepairCompleted=!t.budgetLimited;const n=t.stats;this.connectivityValidationError??=n.connectivityValidationError??null,this.connectivityValidationCount+=Number(n.connectivityValidationCount??0);const o=Number(n.connectivityRollbackCount??0);o\u003e0\u0026\u0026(this.connectivityRollbackCount+=o,this.connectivityRollbackPhases.includes(\"clearance-repair\")||this.connectivityRollbackPhases.push(\"clearance-repair\"),this.connectivityRegressionEndpointIds=[...new Set([...this.connectivityRegressionEndpointIds,...n.connectivityRegressionEndpointIds??[]])]);const i=e\u0026\u0026o===0;this.clearanceRepairBestEffortAccepted=t.budgetLimited\u0026\u0026i,this.repairedTraceClearanceSegmentCount=i?Number(n.repairedSegmentCount??0):0,this.repairedPadNeckSegmentCount=i?Number(n.repairedPadNeckSegmentCount??0):0,this.unresolvedTraceClearanceSegmentCount=Number(n.unresolvedSegmentCount??0),this.rebuildObstacleIndex()}stepActiveLayerSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput();if(e){const n=!this.layerRouteReplacementCollides(e,!0)\u0026\u0026this.layerRouteImprovesInterval(e),o=n\u0026\u0026this.layerRoutePreservesSameNetContacts(e);if(o){if(this.activeSubSolver=null,this.pendingLayerOutput=e,this.pendingLayerPushCount=0,!this.layerRouteReplacementCollides(e,!1))return void this.applyLayerRoute(e);if(this.startPendingLayerInflation())return;this.pendingLayerOutput=null}n\u0026\u0026!o\u0026\u0026this.sameNetContactRejectionCount++}}this.retainFailedSubSolver(t),this.activeSubSolver=null,this.layerAttempt\u0026\u0026this.layerAttempt.offsetCursor++,this.phase=\"try-layer-candidate\"}}layerRouteReplacementCollides(t,e){const n=this.traces[this.traceIndex],o=this.layerAttempt;if(!n||!o)return!0;const i=this.getTraceConnectionNames(n),r=e?o.softTraceIndices:void 0,s={start:Math.max(0,o.interval.startIndex-1),end:Math.min(n.route.length-1,o.interval.endIndex+1)},a=this.getFixedViasOutsideInterval(n,o.interval);for(let A=0;A\u003ct.route.length;A++){const c=t.route[A];if(c?.route_type===\"via\"){if(this.obstacleIndex.collidesVia({point:c,layers:this.obstacleIndex.boardLayers,padDiameter:c.via_diameter??.6,holeDiameter:c.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter,connectionNames:i,ignoreTraceIndex:this.traceIndex,ignoreTraceIndices:r,otherNewViaPoints:t.route.slice(0,A).filter(u=\u003eu.route_type===\"via\").map(u=\u003e({x:u.x,y:u.y})),fixedVias:a,ignoreRouteRange:s,obstacleClearance:this.getDesiredPadClearance(t.traceWidth),blockSameNetObstacles:!0,sameNetObstacleClearance:0}))return!0;continue}const l=t.route[A+1];if(c?.route_type===\"wire\"\u0026\u0026l?.route_type===\"wire\"\u0026\u0026c.layer===l.layer\u0026\u0026this.obstacleIndex.collides({start:c,end:l,layer:c.layer,width:Math.max(c.width,l.width),connectionNames:i,ignoreTraceIndex:this.traceIndex,ignoreTraceIndices:r,ignoreRouteRange:s,obstacleClearance:this.getDesiredPadClearance(t.traceWidth)}))return!0}return this.layerRouteBoundaryCollides(t,e)}getFixedViasOutsideInterval(t,e){return t.route.flatMap((n,o)=\u003en.route_type!==\"via\"||o\u003e=e.startIndex\u0026\u0026o\u003c=e.endIndex?[]:[{point:{x:n.x,y:n.y},padDiameter:n.via_diameter??.6,holeDiameter:n.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter}])}layerRouteBoundaryCollides(t,e){const n=this.traces[this.traceIndex],o=this.layerAttempt,i=t.route.find(a=\u003ea.route_type===\"wire\");let r;for(let a=t.route.length-1;a\u003e=0;a--){const A=t.route[a];if(A?.route_type===\"wire\"){r=A;break}}if(!i||!r)return!0;const s=[{outside:n.route[o.interval.startIndex-1],inside:i},{outside:n.route[o.interval.endIndex+1],inside:r}];for(const a of s)if(Sa(a.outside)\u0026\u0026a.outside.layer===a.inside.layer\u0026\u0026this.obstacleIndex.collides({start:a.outside,end:a.inside,layer:a.inside.layer,width:Math.max(a.outside.width,a.inside.width),connectionNames:this.getTraceConnectionNames(n),ignoreTraceIndex:this.traceIndex,ignoreTraceIndices:e?o.softTraceIndices:void 0,ignoreRouteRange:{start:Math.max(0,o.interval.startIndex-1),end:Math.min(n.route.length-1,o.interval.endIndex+1)},obstacleClearance:this.getDesiredPadClearance(t.traceWidth)}))return!0;return!1}layerRouteImprovesInterval(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval,o=this.getRouteQuality(e.route.slice(n.startIndex,n.endIndex+1)),i=this.getRouteQuality(t.route);return i.length\u003c=o.length+10+Ki\u0026\u0026i.deficitArea\u003c=o.deficitArea-Math.max(.05,.1*o.deficitArea)}getRouteQuality(t){let e=0,n=0;for(let o=0;o\u003ct.length-1;o++){const i=t[o],r=t[o+1];if(!Sa(i)||!Sa(r)||i.layer!==r.layer)continue;const s=Aa(i,r),a=Math.min(i.width,r.width);e+=s,n+=s*Math.max(0,this.nominalTraceWidth-a)}return{length:e,deficitArea:n}}getLayerInflationCorridor(t){const e=[];for(let n=0;n\u003ct.route.length;n++){const o=t.route[n];if(o?.route_type===\"via\"){for(const r of this.obstacleIndex.boardLayers)e.push({start:o,end:o,layer:r,width:o.via_diameter??.6});continue}const i=t.route[n+1];o?.route_type===\"wire\"\u0026\u0026i?.route_type===\"wire\"\u0026\u0026o.layer===i.layer\u0026\u0026e.push({start:o,end:i,layer:o.layer,width:Math.max(o.width,i.width)})}return e}startPendingLayerInflation(){const t=this.pendingLayerOutput;if(!t||this.pendingLayerPushCount\u003e=2)return!1;const e=this.getLayerInflationCorridor(t);return e.length!==0\u0026\u0026(this.pendingLayerPushCount++,this.attemptedInflationCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem,traces:this.traces,powerTraceIndex:this.traceIndex,nominalPowerWidth:t.traceWidth,mutableTraceIndices:this.mutableBlockerTraceIndices,corridor:e,maxRerouteLength:10},this.connectionNameResolver),this.phase=\"try-trace-inflation\",!0)}applyLayerRoute(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval,o=this.createLayerRouteReplacement(t);e.route.splice(n.startIndex,n.endIndex-n.startIndex+1,...o),t.viaCount\u003e0\u0026\u0026this.layerReroutedTraceCount++,this.layerRerouteCountByTrace.set(this.traceIndex,(this.layerRerouteCountByTrace.get(this.traceIndex)??0)+1),this.reroutedSegmentCount++,this.insertedViaCount+=t.viaCount,t.viaCount\u003e0\u0026\u0026(this.neckedLayerSegmentCount+=o.filter(i=\u003ei.route_type===\"wire\"\u0026\u0026i.width\u003cthis.nominalTraceWidth-Ki).length),this.routeSegmentIndex=n.startIndex,this.currentIntervals=[],this.layerAttempt=null,this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.phase=\"evaluate-segment\"}createLayerRouteReplacement(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval,o=e.route[n.startIndex],i=e.route[n.endIndex],r=structuredClone(t.route),s=r.findIndex(A=\u003eA.route_type===\"wire\");let a=-1;for(let A=r.length-1;A\u003e=0;A--)if(r[A]?.route_type===\"wire\"){a=A;break}return s\u003e=0\u0026\u0026(r[s]={...o,...r[s]}),a\u003e=0\u0026\u0026(r[a]={...i,...r[a]}),r}layerRoutePreservesSameNetContacts(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval;return this.routeReplacementPreservesSameNetContacts(e,n,this.createLayerRouteReplacement(t))}startTraceInflation(t,e){const n=t.route[e],o=t.route[e+1];if(!Sa(n)||!Sa(o))return!1;const i=Math.min(n.width,o.width),r=this.findBestPushableInflationWidth(t,e,i);if(!r)return!1;const s=this.getLocalInflationCorridor(t,e,r);if(s.length===0)return!1;const a=[this.traceIndex,n.x,n.y,o.x,o.y].join(\":\"),A=this.inflationAttemptsBySegment.get(a)??0;return!(A\u003e=2)\u0026\u0026(this.inflationAttemptsBySegment.set(a,A+1),this.activeInflationKey=a,this.activeInflationWidth=r,this.attemptedInflationCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem,traces:this.traces,powerTraceIndex:this.traceIndex,nominalPowerWidth:r,mutableTraceIndices:this.mutableBlockerTraceIndices,corridor:s,maxRerouteLength:10},this.connectionNameResolver),this.phase=\"try-trace-inflation\",!0)}hasOnlyPushableTraceBlockers(t,e,n){const o=Math.max(0,e-1),i=Math.min(t.route.length-2,e+1),r=new Set;for(let s=o;s\u003c=i;s++){const a=t.route[s],A=t.route[s+1];if(!Sa(a)||!Sa(A)||a.layer!==A.layer)continue;const c={start:a,end:A,layer:a.layer,width:n,connectionNames:this.getTraceConnectionNames(t),ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:o,end:i+1},obstacleClearance:this.getDesiredPadClearance(n)},l=this.obstacleIndex.findCollisions(c);if(l.length===0\u0026\u0026this.obstacleIndex.collides(c))return!1;for(const u of l){if(u.kind!==\"trace\"||u.traceIndex===void 0)return!1;const g=this.traces[u.traceIndex];if(!g)return!1;const h=this.findConnectionForTrace(g);if(!h||(h.nominalTraceWidth??h.width??this.inputProblem.nominalTraceWidth??this.inputProblem.minTraceWidth)\u003e=n-Ki)return!1;r.add(u.traceIndex)}}return r.size\u003e0\u0026\u0026r.size\u003c=2}findBestPushableInflationWidth(t,e,n){const o=this.nominalTraceWidth\u003e=.5?.05:.0125;for(let i=this.nominalTraceWidth;i\u003en+Ki;i-=o){const r=Number(i.toFixed(6));if(this.hasOnlyPushableTraceBlockers(t,e,r))return r}return null}stepActiveInflationSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput(),n=e\u0026\u0026this.sameNetContactsArePreserved(this.traces[e.pushedTraceIndex].route,e.traces[e.pushedTraceIndex].route,this.getTraceConnectionNames(this.traces[e.pushedTraceIndex]),e.pushedTraceIndex);if(e\u0026\u0026n)return this.traces=e.traces,this.pushedTraceCount++,this.expansionPushedTraceIndices.add(e.pushedTraceIndex),e.strategy===\"elastic\"\u0026\u0026this.elasticPushedTraceCount++,this.activeSubSolver=null,this.activeInflationKey=null,this.activeInflationWidth=null,this.rebuildObstacleIndex(),this.pendingLayerOutput?!this.layerRouteReplacementCollides(this.pendingLayerOutput,!1)\u0026\u0026this.layerRoutePreservesSameNetContacts(this.pendingLayerOutput)?void this.applyLayerRoute(this.pendingLayerOutput):this.startPendingLayerInflation()?void 0:(this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.layerAttempt\u0026\u0026this.layerAttempt.offsetCursor++,void(this.phase=\"try-layer-candidate\")):void(this.phase=\"evaluate-segment\");e\u0026\u0026!n\u0026\u0026this.sameNetContactRejectionCount++}if(this.retainFailedSubSolver(t),this.activeInflationKey\u0026\u0026this.inflationAttemptsBySegment.set(this.activeInflationKey,2),this.activeInflationKey=null,this.activeInflationWidth=null,this.activeSubSolver=null,this.pendingLayerOutput)return this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.layerAttempt\u0026\u0026this.layerAttempt.offsetCursor++,void(this.phase=\"try-layer-candidate\");this.phase=\"evaluate-segment\"}}getLocalInflationCorridor(t,e,n){const o=t.route[e],i=t.route[e+1];if(!Sa(o)||!Sa(i)||o.layer!==i.layer)return[];const r=th(4*n,2,4),s=r/2;let a=e,A=0;for(;a\u003e0;){const h=t.route[a-1],d=t.route[a];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(A+p\u003es+Ki)break;A+=p,a--}let c=e+1,l=0;for(;c\u003ct.route.length-1;){const h=t.route[c],d=t.route[c+1];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(l+p\u003es+Ki)break;l+=p,c++}let u=r-A-l;for(;u\u003eKi\u0026\u0026a\u003e0;){const h=t.route[a-1],d=t.route[a];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(p\u003eu+Ki)break;u-=p,a--}for(;u\u003eKi\u0026\u0026c\u003ct.route.length-1;){const h=t.route[c],d=t.route[c+1];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(p\u003eu+Ki)break;u-=p,c++}const g=[];for(let h=a;h\u003cc;h++){const d=t.route[h],p=t.route[h+1];Sa(d)\u0026\u0026Sa(p)\u0026\u0026d.layer===p.layer\u0026\u0026g.push({start:d,end:p,layer:d.layer,width:n})}return g}applyGridRoute(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=this.createGridRouteReplacement(t);e.route.splice(n.startIndex,n.endIndex-n.startIndex+1,...o),this.reroutedSegmentCount++,this.routeSegmentIndex=n.startIndex+o.length-1,this.currentIntervals=[],this.phase=\"evaluate-segment\"}createGridRouteReplacement(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=e.route[n.startIndex],i=e.route[n.endIndex],r=t.points.map(s=\u003e({route_type:\"wire\",x:s.x,y:s.y,width:t.traceWidth,layer:o.layer}));return r[0].width=Math.max(o.width,t.traceWidth),r[r.length-1].width=Math.max(i.width,t.traceWidth),r}gridRoutePreservesSameNetContacts(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor];return this.routeReplacementPreservesSameNetContacts(e,n,this.createGridRouteReplacement(t))}routeReplacementPreservesSameNetContacts(t,e,n){const o=this.getTraceConnectionNames(t),i=this.getSameNetContactIds(t.route.slice(e.startIndex,e.endIndex+1),o,this.traceIndex),r=new Set([...this.getSameNetContactIds(t.route.slice(0,e.startIndex+1),o,this.traceIndex),...this.getSameNetContactIds(t.route.slice(e.endIndex),o,this.traceIndex)]),s=new Set([...i].filter(A=\u003e!r.has(A)));if(s.size===0)return!0;const a=this.getSameNetContactIds(n,o,this.traceIndex);return[...s].every(A=\u003ea.has(A))}sameNetContactsArePreserved(t,e,n,o){const i=this.getSameNetContactIds(t,n,o);if(i.size===0)return!0;const r=this.getSameNetContactIds(e,n,o);return[...i].every(s=\u003er.has(s))}getSameNetContactIds(t,e,n){const o=new Set;for(let i=0;i\u003ct.length;i++){const r=t[i];if(r?.route_type===\"via\"){for(const a of this.getViaLayers(r))for(const A of this.obstacleIndex.getSameNetCopperContactIds({start:r,end:r,layer:a,width:r.via_diameter??.6,connectionNames:e,ignoreTraceIndex:n}))o.add(A);continue}const s=t[i+1];if(r?.route_type===\"wire\"\u0026\u0026s?.route_type===\"wire\"\u0026\u0026r.layer===s.layer)for(const a of this.obstacleIndex.getSameNetCopperContactIds({start:r,end:s,layer:r.layer,width:Math.min(r.width,s.width),connectionNames:e,ignoreTraceIndex:n}))o.add(a)}return o}getViaLayers(t){const e=this.obstacleIndex.boardLayers.indexOf(t.from_layer),n=this.obstacleIndex.boardLayers.indexOf(t.to_layer);return e\u003c0||n\u003c0?this.obstacleIndex.boardLayers:this.obstacleIndex.boardLayers.slice(Math.min(e,n),Math.max(e,n)+1)}gridRouteReplacementCollides(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=e.route[n.startIndex],i=e.route[n.endIndex],r=this.getTraceConnectionNames(e);for(let s=0;s\u003ct.points.length-1;s++){const a=Math.max(t.traceWidth,s===0?o.width:0,s===t.points.length-2?i.width:0);if(this.obstacleIndex.collides({start:t.points[s],end:t.points[s+1],layer:o.layer,width:a,connectionNames:r,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,n.startIndex-1),end:Math.min(e.route.length-1,n.endIndex+1)},obstacleClearance:this.getDesiredPadClearance(a)}))return!0}return!1}gridRouteBoundaryCollides(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=this.getTraceConnectionNames(e),i=[{startIndex:n.startIndex-1,endIndex:n.startIndex},{startIndex:n.endIndex,endIndex:n.endIndex+1}];for(const r of i){const s=e.route[r.startIndex],a=e.route[r.endIndex];if(Sa(s)\u0026\u0026Sa(a)\u0026\u0026s.layer===a.layer\u0026\u0026this.obstacleIndex.collides({start:s,end:a,layer:s.layer,width:Math.max(s.width,a.width,t.traceWidth),connectionNames:o,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:r.startIndex,end:r.endIndex},obstacleClearance:this.getDesiredPadClearance(Math.max(s.width,a.width,t.traceWidth))}))return!0}return!1}canExpandSegmentAndEndpoints(t,e,n,o=this.nominalTraceWidth){const i=Math.max(0,e-1),r=Math.min(t.route.length-2,e+1);for(let s=i;s\u003c=r;s++){const a=t.route[s],A=t.route[s+1];if(!Sa(a)||!Sa(A)||a.layer!==A.layer)continue;const c=s\u003c=e+1\u0026\u0026s+1\u003e=e,l=Math.max(a.width,A.width,c?o:0);if(this.obstacleIndex.collides({start:a,end:A,layer:a.layer,width:l,connectionNames:n,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:i,end:r+1},obstacleClearance:this.getDesiredPadClearance(l)}))return!1}return!0}findMaximumSafeInPlaceWidth(t,e,n){const o=t.route[e],i=t.route[e+1];if(!Sa(o)||!Sa(i))return 0;const r=Math.min(o.width,i.width);if(this.probeInPlaceWidth(t,e,n,this.nominalTraceWidth))return this.nominalTraceWidth;let s=r,a=this.nominalTraceWidth;for(let l=0;l\u003c7;l++){const u=(s+a)/2;if(u\u003c=s+Ki)break;this.probeInPlaceWidth(t,e,n,u)?s=u:a=u}const A=this.nominalTraceWidth\u003e=.5?.025:.0125,c=Math.max(r,Math.floor((s+Ki)/A)*A);return c\u003er+Ki\u0026\u0026this.probeInPlaceWidth(t,e,n,c)?c:r}probeInPlaceWidth(t,e,n,o){return this.inPlaceWidthProbeCount++,this.canExpandSegmentAndEndpoints(t,e,n,o)}maximizeGridRouteWidth(t){if(t.traceWidth\u003e=this.nominalTraceWidth-Ki)return t;let e=t.traceWidth,n=this.nominalTraceWidth;for(let r=0;r\u003c7;r++){const s=(e+n)/2,a={...t,traceWidth:s};this.gridRouteReplacementCollides(a)||this.gridRouteBoundaryCollides(a)?n=s:e=s}const o=this.nominalTraceWidth\u003e=.5?.025:.0125,i=Math.max(t.traceWidth,Math.floor((e+Ki)/o)*o);if(i\u003et.traceWidth+Ki){const r={...t,traceWidth:i};if(!this.gridRouteReplacementCollides(r)\u0026\u0026!this.gridRouteBoundaryCollides(r))return this.pathWidthUpgradeCount++,r}return t}getExponentialIntervalCandidates(t,e,n){const o=this.getExponentialIndices(t,e,-1,n,5),i=this.getExponentialIndices(t,e,1,n,10).filter(s=\u003es\u003ee),r=[];for(const s of o)for(const a of i){const A=this.getRouteIntervalLength(t,s,a);A\u003e10.000001||r.push({startIndex:s,endIndex:a,routeLength:A})}return r.sort((s,a)=\u003es.routeLength-a.routeLength).filter((s,a,A)=\u003eA.findIndex(c=\u003ec.startIndex===s.startIndex\u0026\u0026c.endIndex===s.endIndex)===a).slice(0,10).map(({startIndex:s,endIndex:a})=\u003e({startIndex:s,endIndex:a}))}getExponentialIndices(t,e,n,o,i){const r=[e];let s=0,a=Math.max(o,.3),A=e,c=e;for(;;){const l=A+n;if(l\u003c0||l\u003e=t.route.length)break;const u=t.route[A],g=t.route[l];if(!Sa(u)||!Sa(g)||u.layer!==g.layer)break;const h=Aa(u,g);if(s+h\u003ei+Ki)break;s+=h,A=l,c=l,s+Ki\u003e=a\u0026\u0026(r.push(l),a*=2)}return r.includes(c)||r.push(c),r}getRouteIntervalLength(t,e,n){let o=0;for(let i=e;i\u003cn;i++){const r=t.route[i],s=t.route[i+1];if(!Sa(r)||!Sa(s)||r.layer!==s.layer)return Number.POSITIVE_INFINITY;o+=Aa(r,s)}return o}getCandidateWidths(t){const e=this.inputProblem.minTraceWidth;return w7t([t,.875*t,.75*t,.625*t,.5*t,.375*t,.25*t,e]).filter(n=\u003en\u003e=e-Ki)}getGridResolutions(t){return w7t([Math.max(.1,Math.min(.5,t/2)),Math.max(.1,Math.min(.25,t/3))])}resolveNominalTraceWidth(t){const e=this.findConnectionForTrace(t);return Math.max(e?.nominalTraceWidth??e?.width??this.inputProblem.nominalTraceWidth??this.inputProblem.minTraceWidth,this.inputProblem.minTraceWidth)}getDesiredPadClearance(t=this.nominalTraceWidth){const e=Math.max(this.inputProblem.defaultObstacleMargin??0,this.inputProblem.minTraceToPadEdgeClearance??0,.1);return t\u003c.499999||this.phase!==\"cleanup\"?e:Math.max(e,this.options.powerTraceToPadClearance??t/2)}findConnectionForTrace(t){const e=this.connectionByTraceId.get(t.pcb_trace_id);if(e!==void 0)return e??void 0;const n=this.getTraceConnectionNames(t),o=this.inputProblem.connections.find(i=\u003ethis.connectionMatchesTrace(i,n))??null;return this.connectionByTraceId.set(t.pcb_trace_id,o),o??void 0}getOwnedTraceIndices(){return[...this.selectedOwnedTraceIndices]}connectionMatchesTrace(t,e){return[t.name,t.source_trace_id,t.rootConnectionName,t.netConnectionName,...t.mergedConnectionNames??[]].filter(n=\u003e!!n).some(n=\u003ee.includes(n))}getTraceConnectionNames(t){return[t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[]].filter(e=\u003e!!e)}traceMeetsNominalWidth(t,e){return t.route.every(n=\u003en.route_type!==\"wire\"||n.width\u003e=e-Ki)}findNextUnderWidthSegment(t,e,n){for(let o=e;o\u003ct.route.length-1;o++){const i=t.route[o],r=t.route[o+1];if(Sa(i)\u0026\u0026Sa(r)\u0026\u0026i.layer===r.layer\u0026\u0026(i.width\u003cn-Ki||r.width\u003cn-Ki))return o}return-1}getMutatedImmutableTraceIds(t){return this.immutableTraceIndices.flatMap(e=\u003e{const n=t[e];return JSON.stringify(n)===this.initialImmutableTraceSignatures.get(e)?[]:[n?.pcb_trace_id??this.traces[e]?.pcb_trace_id??String(e)]})}getImmutableViaViolationSignatures(t){const e=new Set;if(this.immutableTraceIndices.length===0)return e;const n=new Tv(this.inputProblem,t),o=new ub(this.inputProblem,t,void 0,[],n);for(const i of this.immutableTraceIndices){const r=t[i];if(!r)continue;const s=[r.pcb_trace_id,r.connection_name,r.source_trace_id,r.rootConnectionName,...r.mergedConnectionNames??[],...r.connectsTo??[]].filter(a=\u003e!!a);for(let a=0;a\u003cr.route.length;a++){const A=r.route[a];if(A?.route_type!==\"via\")continue;const c=`${r.pcb_trace_id}:${a}`,l=o.getViaViolationSignatures({point:A,layers:o.boardLayers,padDiameter:A.via_diameter??this.inputProblem.min_via_pad_diameter??this.inputProblem.minViaPadDiameter??this.inputProblem.minViaDiameter??.6,holeDiameter:A.via_hole_diameter??o.defaultViaHoleDiameter,connectionNames:s,ignoreTraceIndex:i,ignoreRouteRange:{start:a,end:a},blockSameNetObstacles:!0,sameNetObstacleClearance:0});for(const u of l)e.add(`${c}|${u}`)}}return e}countViolatingImmutableVias(t){return new Set([...t].map(e=\u003ee.split(\"|\")[0])).size}acceptConnectivityCheckpoint(t,e){this.connectivityValidationCount++;let n=!1,o=!1;try{const i=this.connectivityInvariant.validate(t),r=this.getMutatedImmutableTraceIds(t),s=this.getImmutableViaViolationSignatures(t),a=[...s].filter(c=\u003e!this.lastSafeImmutableViaViolationSignatures.has(c)),A=a.length\u003e0;if(n=!i.safe,o=r.length\u003e0||A,this.connectivityValidationError??=i.validationError??null,!n\u0026\u0026!o)return this.traces=structuredClone(t),this.lastConnectivitySafeTraces=structuredClone(t),this.remainingImmutableViaViolationCount=this.countViolatingImmutableVias(s),this.remainingImmutableViaViolationPairCount=s.size,this.lastSafeImmutableViaViolationSignatures=s,this.connectivityInvariant=new Bce(this.inputProblem,this.lastConnectivitySafeTraces),!0;this.immutableTraceMutationIds=[...new Set([...this.immutableTraceMutationIds,...r])],A\u0026\u0026(this.immutableViaViolationRollbackCount++,this.attemptedImmutableViaViolationCount=this.countViolatingImmutableVias(s),this.attemptedImmutableViaViolationPairCount=s.size,this.immutableViaViolationRegressionIds=[...new Set([...this.immutableViaViolationRegressionIds,...a])]),this.connectivityRegressionEndpointIds=[...new Set([...this.connectivityRegressionEndpointIds,...i.regressions.flatMap(c=\u003ec.baselineEndpointLabels)])]}catch(i){n=!0,this.connectivityValidationError=i instanceof Error?i.message:String(i)}return n\u0026\u0026(this.connectivityRollbackCount++,this.connectivityRollbackPhases.includes(e)||this.connectivityRollbackPhases.push(e)),o\u0026\u0026(this.immutableSafetyRollbackCount++,this.immutableSafetyRollbackPhases.includes(e)||this.immutableSafetyRollbackPhases.push(e)),e===\"expansion\"?n?this.rollbackConnectivityRegressedExpansion():this.rollbackImmutableUnsafeExpansion():this.restoreLastConnectivitySafeTraces(),this.remainingImmutableViaViolationCount=this.countViolatingImmutableVias(this.lastSafeImmutableViaViolationSignatures),this.remainingImmutableViaViolationPairCount=this.lastSafeImmutableViaViolationSignatures.size,!1}rebuildObstacleIndex(){this.obstacleIndex=new ub(this.inputProblem,this.traces,this.traceIndex,[],this.connectionNameResolver)}retainFailedSubSolver(t){this.failedSubSolverCount++,this.failedSubSolvers??=[],this.failedSubSolvers.length\u003c16?this.failedSubSolvers.push(t):this.failedSubSolvers[15]=t}tryFinalAcceptance(){this.finalAcceptanceUsed=!0;let t=!1;this.activeSubSolver instanceof JSe?(this.activeSubSolver.tryFinalAcceptance(),this.adoptCleanupOutput(this.activeSubSolver),t=!0):this.activeSubSolver instanceof WSe\u0026\u0026(this.activeSubSolver.tryFinalAcceptance(),this.adoptClearanceRepairOutput(this.activeSubSolver),t=!0),t||this.phase===\"cleanup\"||this.phase===\"repair-trace-clearance\"||this.phase===\"complete\"||this.discardInFlightExpansion(),this.activeSubSolver=null,this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.activeInflationKey=null,this.activeInflationWidth=null,this.layerAttempt=null,this.acceptConnectivityCheckpoint(this.traces,\"final\"),this.traceIndex=this.traces.length,this.phase=\"complete\",this.rebuildObstacleIndex(),this.progress=1,this.solved=!0,this.stats=this.createStats()}createStats(){return{phase:this.phase,pass:this.passIndex+1,completedPassCount:this.completedPassCount,lastNormalizedWidthDeficitGain:this.lastNormalizedWidthDeficitGain,normalizedWidthDeficitGainByPass:[...this.normalizedWidthDeficitGainByPass],plateauReached:this.plateauReached,traceIndex:this.traceIndex,traceCount:this.traces.length,selectedTraceCount:this.traceOrder.length,routeSegmentIndex:this.routeSegmentIndex,nominalTraceWidth:this.nominalTraceWidth,intervalCursor:this.intervalCursor,intervalCount:this.currentIntervals.length,candidateWidth:this.candidateWidths[this.widthCursor],gridSize:this.gridResolutions[this.resolutionCursor],gridOffsetVariant:this.offsetCursor,keptTraceCount:this.keptTraceCount,recreatedTraceCount:this.recreatedTraceCount,expandedSegmentCount:this.expandedSegmentCount,intermediateExpandedSegmentCount:this.intermediateExpandedSegmentCount,pathWidthUpgradeCount:this.pathWidthUpgradeCount,inPlaceWidthProbeCount:this.inPlaceWidthProbeCount,reroutedSegmentCount:this.reroutedSegmentCount,unresolvedSegmentCount:this.unresolvedSegmentCount,attemptedGridCount:this.attemptedGridCount,attemptedLayerGridCount:this.attemptedLayerGridCount,attemptedInflationCount:this.attemptedInflationCount,activeInflationWidth:this.activeInflationWidth,pushedTraceCount:this.pushedTraceCount,elasticPushedTraceCount:this.elasticPushedTraceCount,layerReroutedTraceCount:this.layerReroutedTraceCount,insertedViaCount:this.insertedViaCount,neckedLayerSegmentCount:this.neckedLayerSegmentCount,removedViaPairCount:this.removedViaPairCount,removedViaCount:this.removedViaCount,simplifiedPathCount:this.simplifiedPathCount,normalizedSegmentCount:this.normalizedSegmentCount,cleanupClearanceShoveCount:this.cleanupClearanceShoveCount,relocatedViaCount:this.relocatedViaCount,unresolvedViaCount:this.unresolvedViaCount,initialImmutableViaViolationCount:this.initialImmutableViaViolationCount,remainingImmutableViaViolationCount:this.remainingImmutableViaViolationCount,initialImmutableViaViolationPairCount:this.initialImmutableViaViolationPairCount,remainingImmutableViaViolationPairCount:this.remainingImmutableViaViolationPairCount,skippedImmutableViaRepairCount:this.remainingImmutableViaViolationCount,immutableViaViolationRollbackCount:this.immutableViaViolationRollbackCount,attemptedImmutableViaViolationCount:this.attemptedImmutableViaViolationCount,attemptedImmutableViaViolationPairCount:this.attemptedImmutableViaViolationPairCount,immutableViaViolationRegressionIds:[...this.immutableViaViolationRegressionIds],immutableTraceMutationIds:[...this.immutableTraceMutationIds],padClearanceRerouteCount:this.padClearanceRerouteCount,unresolvedPadClearanceCount:this.unresolvedPadClearanceCount,repairedTraceClearanceSegmentCount:this.repairedTraceClearanceSegmentCount,repairedPadNeckSegmentCount:this.repairedPadNeckSegmentCount,unresolvedTraceClearanceSegmentCount:this.unresolvedTraceClearanceSegmentCount,sameNetContactRejectionCount:this.sameNetContactRejectionCount,connectivityValidationCount:this.connectivityValidationCount,connectivityRollbackCount:this.connectivityRollbackCount,connectivityRollbackPhases:[...this.connectivityRollbackPhases],immutableSafetyRollbackCount:this.immutableSafetyRollbackCount,immutableSafetyRollbackPhases:[...this.immutableSafetyRollbackPhases],connectivityRegressionEndpointIds:[...this.connectivityRegressionEndpointIds],connectivityValidationError:this.connectivityValidationError,connectivityRollbackMutationStats:this.connectivityRollbackMutationStats===null?null:{...this.connectivityRollbackMutationStats},immutableSafetyRollbackMutationStats:this.immutableSafetyRollbackMutationStats===null?null:{...this.immutableSafetyRollbackMutationStats},expansionPushedTraceIndices:[...this.expansionPushedTraceIndices],cleanupMutatedTraceIndices:[...this.cleanupMutatedTraceIndices],discardedExpansionMutationStats:this.discardedExpansionMutationStats===null?null:{...this.discardedExpansionMutationStats},initialPadClearanceViolationCount:this.initialPadClearanceViolationCount,remainingPadClearanceViolationCount:this.remainingPadClearanceViolationCount,initialPadClearanceViolationCountByClearance:{...this.initialPadClearanceViolationCountByClearance},remainingPadClearanceViolationCountByClearance:{...this.remainingPadClearanceViolationCountByClearance},budgetLimitedExpansion:this.budgetLimitedExpansion,finalAcceptanceUsed:this.finalAcceptanceUsed,cleanupCompleted:this.cleanupCompleted,clearanceRepairCompleted:this.clearanceRepairCompleted,cleanupBestEffortAccepted:this.cleanupBestEffortAccepted,clearanceRepairBestEffortAccepted:this.clearanceRepairBestEffortAccepted,cleanupStatus:this.connectivityRollbackPhases.includes(\"cleanup\")?\"connectivity_rollback\":this.immutableSafetyRollbackPhases.includes(\"cleanup\")?\"immutable_safety_rollback\":this.cleanupBestEffortAccepted?\"budget_limited\":this.cleanupCompleted?\"completed\":this.phase===\"cleanup\"?\"in_progress\":\"not_started\",clearanceRepairStatus:this.connectivityRollbackPhases.includes(\"clearance-repair\")?\"connectivity_rollback\":this.immutableSafetyRollbackPhases.includes(\"clearance-repair\")?\"immutable_safety_rollback\":this.clearanceRepairBestEffortAccepted?\"budget_limited\":this.clearanceRepairCompleted?\"completed\":this.phase===\"repair-trace-clearance\"?\"in_progress\":\"not_started\",cleanupIterationBudget:this.cleanupIterationBudget,clearanceRepairIterationBudget:this.clearanceRepairIterationBudget,completionReason:this.phase===\"complete\"||this.solved?this.connectivityRollbackCount\u003e0?\"connectivity_rollback\":this.immutableSafetyRollbackCount\u003e0?\"immutable_safety_rollback\":this.connectivityValidationError?\"connectivity_validation_unavailable\":this.finalAcceptanceUsed?\"total_iteration_budget\":this.budgetLimitedExpansion?\"expansion_budget\":this.cleanupBestEffortAccepted?\"cleanup_budget\":this.clearanceRepairBestEffortAccepted?\"clearance_repair_budget\":this.remainingImmutableViaViolationCount\u003e0?\"immutable_via_violations_preserved\":\"completed\":null,resultStatus:this.finalAcceptanceUsed||this.budgetLimitedExpansion||this.cleanupBestEffortAccepted||this.clearanceRepairBestEffortAccepted||this.connectivityRollbackCount\u003e0||this.immutableSafetyRollbackCount\u003e0||this.connectivityValidationError!==null||this.remainingImmutableViaViolationCount\u003e0?\"best_effort\":\"complete\",failedSubSolverCount:this.failedSubSolverCount,retainedFailedSubSolverCount:this.failedSubSolvers?.length??0,expansionIterationBudget:this.getExpansionIterationBudget(),finalizationIterationReserve:this.getFinalizationIterationReserve(),spatialIndexRectCount:this.obstacleIndex.items.length}}computeProgress(){return this.solved||this.phase===\"complete\"?1:this.budgetLimitedExpansion?.99:this.traceOrder.length===0?1:Math.min(.99,(this.passIndex+Math.max(0,this.traceOrderCursor)/this.traceOrder.length)/this.maxPassCount)}getConstructorParams(){return[this.inputProblem,this.options]}getOutput(){return structuredClone(this.lastConnectivitySafeTraces)}visualize(){const t=[],e=[];for(let n=0;n\u003cthis.traces.length;n++){const o=this.traces[n],i=this.resolveNominalTraceWidth(o);for(const r of o.route)r.route_type===\"via\"\u0026\u0026e.push({center:r,radius:(r.via_diameter??.6)/2,fill:\"#d4a017\",stroke:\"#7a5700\"});for(let r=0;r\u003co.route.length-1;r++){const s=o.route[r],a=o.route[r+1];if(!Sa(s)||!Sa(a)||s.layer!==a.layer)continue;const A=n===this.traceIndex\u0026\u0026r===this.routeSegmentIndex,c=s.width\u003e=i-Ki\u0026\u0026a.width\u003e=i-Ki,l=s.layer===\"bottom\";t.push({points:[s,a],strokeColor:A?\"#ff8c00\":c?l?\"#2468c7\":\"#169c45\":l?\"#8b4bb8\":\"#cc3344\",strokeWidth:Math.max(s.width,a.width)})}}return{coordinateSystem:\"cartesian\",title:`Power trace expander: ${this.phase}`,lines:t,points:[],circles:e,rects:this.obstacleIndex.items.filter(n=\u003en.kind===\"obstacle\").slice(0,2e3).map(n=\u003e({center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY,fill:\"rgba(80,80,80,0.12)\",stroke:\"rgba(80,80,80,0.35)\"})),texts:[]}}},P7t=class extends yr{constructor(t,e={}){if(super(),this.inputSrj=t,this.options=e,this.powerTraceExpanderSolver=new fgo(t,e),e.onlyConnectionNames?.length===0)return this.MAX_ITERATIONS=1,this.progress=1,this.solved=!0,void(this.stats={selectedTraceCount:0,bypassed:!0});this.MAX_ITERATIONS=this.powerTraceExpanderSolver.MAX_ITERATIONS+1}inputSrj;options;powerTraceExpanderSolver;_step(){const t=this.powerTraceExpanderSolver;if(t.step(),this.progress=t.progress,this.stats=t.stats,t.failed)return this.error=t.error,void(this.failed=!0);t.solved\u0026\u0026(this.solved=!0)}getConstructorParams(){return[this.inputSrj,this.options]}getOutput(){if(!this.solved)throw new Error(\"Cannot get power trace expansion output before solving\");return this.powerTraceExpanderSolver.getOutput()}visualize(){return mx({...this.inputSrj,traces:this.getOutput()},{traceColorMode:\"layer\"})}},jSe=({connections:t,originalConnections:e,layerCount:n,obstacles:o,defaultViaHoleDiameter:i,connMap:r})=\u003e{const s=new Map;for(const u of e)s.has(u.name)||s.set(u.name,u.__netConnectionName);const a=t.map(u=\u003e{if(u.pointsToConnect.length!==2)throw new Error(`Expected Pipeline7 output connection \"${u.name}\" to have two points, got ${u.pointsToConnect.length}`);const[g,h]=u.pointsToConnect;return{connection:u,connectsTo:[g?.pointId,h?.pointId].filter(d=\u003e!!d),outputConnectionName:u.__netConnectionName??s.get(u.name)??u.__rootConnectionNames?.[0]??u.name}}),A=o.filter(u=\u003e(u.__zLayers?.length??u.layers?.length??0)\u003e1),c=new Map,l=u=\u003e{let g=c.get(u.connectionName);g||(g=new Map,c.set(u.connectionName,g));const h=g.get(u.rootConnectionName);if(h)return h;const d=A.filter(p=\u003eHse(p,u,r));return g.set(u.rootConnectionName,d),d};return u=\u003e{const g=[],h=new Map;for(const d of u){const p=h.get(d.connectionName);p?p.push(d):h.set(d.connectionName,[d])}for(const{connection:d,connectsTo:p,outputConnectionName:m}of a){const _=h.get(d.name)??[];for(let f=0;f\u003c_.length;f+=1){const I=_[f];g.push({type:\"pcb_trace\",pcb_trace_id:`${d.name}_${f}`,connection_name:m,connectsTo:p,route:nB(I,n,{connectionPoints:d.pointsToConnect,defaultViaHoleDiameter:i,connectedMultilayerObstacles:l(I),connMap:r})})}}return g}},M7t=({connections:t,originalConnections:e,hdRoutes:n,layerCount:o,obstacles:i,defaultViaHoleDiameter:r,connMap:s})=\u003ejSe({connections:t,originalConnections:e,layerCount:o,obstacles:i,defaultViaHoleDiameter:r,connMap:s})(n),D7t=t=\u003e{const e=Math.max(t.minTraceWidth+.1,2*t.minTraceWidth);return t.connections.flatMap(n=\u003e(n.nominalTraceWidth??t.nominalTraceWidth??t.minTraceWidth)+1e-6\u003e=e?[n.name]:[])},N7t=(t,e,n=new Map(t.map(o=\u003e[o.connectionName,o])))=\u003e{const o=new Map(e.map(i=\u003e[i.name,i]));return t.map(i=\u003e{if(i.route.length===0)throw new Error(`Cannot lock PCB terminals for empty route \"${i.connectionName}\"`);const r=o.get(i.connectionName);if(!r)throw new Error(`Cannot lock PCB terminals: connection \"${i.connectionName}\" was not found`);if(r.pointsToConnect.length!==2)throw new Error(`Cannot lock PCB terminals for \"${i.connectionName}\": expected 2 connection points, found ${r.pointsToConnect.length}`);const s=n.get(i.connectionName)??i,a=new Map;for(const g of r.pointsToConnect)if(g.pcb_port_id){if(a.has(g.pcb_port_id))throw new Error(`Cannot lock duplicate PCB terminal \"${g.pcb_port_id}\" for \"${i.connectionName}\"`);a.set(g.pcb_port_id,g)}if(a.size===0)return i;const A=[s.startPcbPortId,s.endPcbPortId].filter(g=\u003eg!==void 0);if(A.length===0)return i;if(new Set(A).size!==A.length||A.some(g=\u003e!a.has(g)))throw new Error(`Cannot lock PCB terminals for \"${i.connectionName}\": route endpoint IDs do not match connection terminal IDs`);const c=s.startPcbPortId?a.get(s.startPcbPortId):void 0,l=s.endPcbPortId?a.get(s.endPcbPortId):void 0,u=i.route.map((g,h)=\u003e{if(h===0\u0026\u0026c)return{...g,x:c.x,y:c.y,pcb_port_id:c.pcb_port_id};if(h===i.route.length-1\u0026\u0026l)return{...g,x:l.x,y:l.y,pcb_port_id:l.pcb_port_id};const d={...g};return delete d.pcb_port_id,d});return{...i,route:u}})},R7t=({originalSrj:t,newlyRoutedTraces:e,currentPreloadedTraces:n,expandedConnectionNames:o,resolveConnectedTraceAliases:i=!1})=\u003e{const r=n??t.traces??[],s=i?Igo({originalSrj:t,newlyRoutedTraces:e,preloadedTraces:r,expandedConnectionNames:o}):new Set(r.filter(l=\u003eo.includes(l.connection_name))),a=r.filter(l=\u003e!s.has(l)),A=new Set([...e.map(l=\u003el.pcb_trace_id),...a.map(l=\u003el.pcb_trace_id)]),c=r.filter(l=\u003es.has(l)).map(l=\u003e{const u=l.pcb_trace_id;let g=u,h=2;for(;A.has(g);)g=`${u}_power_expansion_${h++}`;return A.add(g),{...l,pcb_trace_id:g,__replaces_pcb_trace_id:l.__replaces_pcb_trace_id??l.pcb_trace_id}});return{...t,traces:[...e,...c],fixedTraces:a}},Igo=({originalSrj:t,newlyRoutedTraces:e,preloadedTraces:n,expandedConnectionNames:o})=\u003e{const i=new Set(n.map(c=\u003ec.pcb_trace_id)),r=new Set([...i,...e.map(c=\u003ec.pcb_trace_id)]),s=e.map((c,l)=\u003e{if(!i.has(c.pcb_trace_id))return c;const u=`__pipeline7_new_trace_${l}_${c.pcb_trace_id}`;let g=u,h=2;for(;r.has(g);)g=`${u}_${h++}`;return r.add(g),{...c,pcb_trace_id:g}}),a=new Tv({...t,traces:[...s,...n]}),A=new Set(a.canonicalize([...o]));return new Set(n.filter(c=\u003ea.canonicalize([c.connection_name]).some(l=\u003eA.has(l))))};function T7t(t){return new Set((t??[]).filter(e=\u003ee._isComponentTopologyNode).map(e=\u003ee.capacityMeshNodeId))}function k7t(t,e){return t.nodeIds.some(n=\u003ee.has(n))}function Cgo({sharedEdgeSegments:t,componentCapacityMeshNodeIds:e}){return t.filter(n=\u003e!k7t(n,e))}function Cp(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var F7t=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e;const n=mN(t);this.originalSrj=n,this.opts={...e};const o=this.opts;if(this.effort=o.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=o.maxNodeDimension??16,this.maxNodeRatio=o.maxNodeRatio??6,this.minNodeArea=o.minNodeArea??.1**2,this.visualizationTraceColorMode=o.visualizationTraceColorMode??\"layer\",this.setSimpleRouteJson(n),o.capacityDepth===void 0){const i=this.srj.bounds.maxX-this.srj.bounds.minX,r=this.srj.bounds.maxY-this.srj.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return\"AutoroutingPipelineSolver7_MultiGraph\"}preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;componentTopologyGeneratorSolver;topologyPlanningSolver;topologyMergingSolver;globalTopologyGeneratorSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityRepairSolver;highDensityStitchSolver;globalDrcForceImproveSolver;exactGeometryDrcForceImproveSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;lengthMatchingPostProcessingSolver;powerTraceExpansionSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;componentDetectionSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;visualizationTraceColorMode;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;sharedEdgeSegmentsWithNecessaryCrampedPortPoints;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[Cp(\"preprocessSimpleRouteJsonSolver\",XAe,t=\u003e[t.originalSrj,{traceColorMode:t.visualizationTraceColorMode}],{onSolved:t=\u003e{t.setSimpleRouteJson(t.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),Cp(\"componentDetectionSolver\",n7t,t=\u003e[{inputSrj:t.srj}]),Cp(\"escapeViaLocationSolver\",FAe,t=\u003e[t.srj,{viaDiameter:t.viaDiameter,minTraceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=\u003e{t.srjWithEscapeViaLocations=t.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),Cp(\"netToPointPairsSolver\",rL,t=\u003e{const e=t.srjWithEscapeViaLocations??t.srj;return[e,t.colorMap,JQ(e)]},{onSolved:t=\u003e{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,t.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),Cp(\"topologyPlanningSolver\",l7t,t=\u003e[{inputSrj:t.srjWithPointPairs,componentDetectionOutput:t.componentDetectionSolver.getOutput(),viaDiameter:t.viaDiameter,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=\u003e{t.topologyPlanningSolver.getOutput(),t.globalTopologyGeneratorSolver=t.topologyPlanningSolver.globalTopologySolver,t.componentTopologyGeneratorSolver=new u7t(t.topologyPlanningSolver)}}),Cp(\"topologyMergingSolver\",c7t,t=\u003e{const e=t.topologyPlanningSolver.getOutput();return[{layerCount:t.srj.layerCount,nodeGroups:[{groupId:\"global\",nodes:e.globalMeshNodes,isComponent:!1},...e.componentMeshNodes.map((n,o)=\u003e({groupId:`component-${o}`,nodes:n,isComponent:!0}))]}]},{onSolved:t=\u003e{t.capacityNodes=t.topologyMergingSolver.getOutput()}}),Cp(\"nodeDimensionSubdivisionSolver\",vAe,t=\u003e[t.capacityNodes,t.maxNodeDimension,t.maxNodeRatio,t.minNodeArea],{onSolved:t=\u003e{t.capacityNodes=t.nodeDimensionSubdivisionSolver.outputNodes}}),Cp(\"edgeSolver\",WQ,t=\u003e[t.capacityNodes],{onSolved:t=\u003e{t.capacityEdges=t.edgeSolver?.edges}}),Cp(\"availableSegmentPointSolver\",kD,t=\u003e[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!0}]),Cp(\"necessaryCrampedPortPointSolver\",lJ,t=\u003e{const e=T7t(t.capacityNodes);return[{capacityMeshNodes:t.capacityNodes.filter(n=\u003e!e.has(n.capacityMeshNodeId)),sharedEdgeSegments:Cgo({sharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),componentCapacityMeshNodeIds:e}),simpleRouteJson:t.srjWithPointPairs}]},{onSolved:t=\u003e{const e=T7t(t.capacityNodes);t.sharedEdgeSegmentsWithNecessaryCrampedPortPoints=(function({originalSharedEdgeSegments:n,filteredSharedEdgeSegments:o,componentCapacityMeshNodeIds:i}){const r=new Map(o.map(s=\u003e[s.edgeId,s]));return n.map(s=\u003ek7t(s,i)?s:r.get(s.edgeId)??s)})({originalSharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),filteredSharedEdgeSegments:t.necessaryCrampedPortPointSolver.getOutput(),componentCapacityMeshNodeIds:e})}}),Cp(\"portPointPathingSolver\",kAe,t=\u003e{const e=t.sharedEdgeSegmentsWithNecessaryCrampedPortPoints??t.necessaryCrampedPortPointSolver?.getOutput()??t.availableSegmentPointSolver.getOutput(),{graph:n,connections:o}=uJ({capacityMeshNodes:t.capacityNodes,layerCount:t.srj.layerCount,connectivityMap:t.connMap,segmentPortPoints:e.flatMap(i=\u003ei.portPoints),simpleRouteJsonConnections:t.srjWithPointPairs.connections});return[{graph:n,connections:o,layerCount:t.srj.layerCount,effort:t.effort,preserveTerminalPcbPortIds:!0,minViaPadDiameter:t.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0,USE_SELECTIVE_RERIP_ROUTING:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),Cp(\"uniformPortDistributionSolver\",kz,t=\u003e[{nodeWithPortPoints:t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:t.minTraceWidth,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]),Cp(\"highDensityRouteSolver\",HD,t=\u003e{const e=t.uniformPortDistributionSolver?.getOutput()??[],n=t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],o=e.length\u003e0?e:n;return t.highDensityNodePortPoints=structuredClone(o),[{nodePortPoints:o,nodePfById:new Map((t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(i=\u003e[i.capacityMeshNodeId,t.portPointPathingSolver?.computeNodePf(i)??null])),colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount,useGrowShrinkHighDensityIntraNodeSolver:!0,preserveTerminalPcbPortIds:!0,growShrinkFallbackToInvalidGeometryOnFailure:!0,captureSearchDebug:!1}]}),Cp(\"highDensityForceImproveSolver\",mJ,t=\u003e[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityRouteSolver.routes,colorMap:t.colorMap,totalStepsPerNode:Math.max(12,Math.round(20*t.effort)),nodeAssignmentMargin:t.srj.defaultObstacleMargin??.2}]),Cp(\"highDensityRepairSolver\",pW,t=\u003e[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,obstacles:t.srj.obstacles,colorMap:t.colorMap,repairMargin:t.srj.defaultObstacleMargin??.2,maxSampleEntries:80}]),Cp(\"highDensityStitchSolver\",$Ae,t=\u003e[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensityRepairSolver?.getOutput()??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter,preserveTerminalPcbPortIds:!0}]),Cp(\"traceSimplificationSolver\",j8,t=\u003e[{hdRoutes:t.highDensityStitchSolver.mergedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,outline:t.srj.outline,defaultViaDiameter:t.viaDiameter,layerCount:t.srj.layerCount,minTraceToPadEdgeClearance:t.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:t.srj.minBoardEdgeClearance,enableCrossingViaReduction:!0,iterations:2}]),Cp(\"traceWidthSolver\",aL,t=\u003e[{hdRoutes:t.traceSimplificationSolver.simplifiedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,minTraceWidth:t.minTraceWidth,connection:t.srj.connections,obstacleMargin:t.srj.minTraceToPadEdgeClearance??.15,layerCount:t.srj.layerCount}]),Cp(\"globalDrcForceImproveSolver\",S7,t=\u003e[{srj:t.srjWithPointPairs,hdRoutes:N7t(t.traceWidthSolver.getHdRoutesWithWidths(),t.netToPointPairsSolver?.newConnections??[],new Map((t.highDensityStitchSolver?.mergedHdRoutes??[]).map(e=\u003e[e.connectionName,e]))),connMap:t.connMap,effort:t.effort,maxIterations:16,enableLargeBoardBroadFallback:!1,enablePostSolveClearanceRelaxation:!1}]),Cp(\"exactGeometryDrcForceImproveSolver\",jbe,t=\u003e{const e=t.globalDrcForceImproveSolver.getOutput(),n=(o=\u003e{const i={...o.srjWithPointPairs,minTraceWidth:o.originalSrj.minTraceWidth,minViaDiameter:o.originalSrj.minViaDiameter??o.srjWithPointPairs.minViaDiameter},r=Math.max(om(o.originalSrj).padDiameter,i.minTraceWidth)+Math.max(.1,.1),s=new fJ(i,{connMap:o.connMap,traceClearance:.1,viaClearance:.1,spatialCellSize:r}),a=jSe(o),A=o.originalSrj.traces??[];return({routes:c,hdRoutes:l})=\u003e{const u=c??l;if(!u)throw new Error(\"Pipeline7 autorouting DRC evaluation requires HD routes\");const g=a(u),h=A.length?[...A,...g]:g;return s.evaluate(h)}})({connections:t.netToPointPairsSolver?.newConnections??[],originalConnections:t.originalSrj.connections,layerCount:t.srj.layerCount,obstacles:t.srj.obstacles,defaultViaHoleDiameter:t.viaHoleDiameter,connMap:t.connMap,srjWithPointPairs:t.srjWithPointPairs,originalSrj:t.originalSrj});return[{srj:t.srjWithPointPairs,hdRoutes:e,connMap:t.connMap,effort:t.effort,viaHoleDiameter:t.viaHoleDiameter,drcEvaluator:n,viaInPadDrcEvaluator:n,maxIterations:32,enableLargeBoardBroadFallback:!1,enableBroadFallback:!1,enableTargetedErrorSweep:!0,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:t.originalSrj.allowViaInPad??!1,viaInPadMaxIterations:32,broadMaxIterations:12,broadPassMultiplier:3}]}),Cp(\"lengthMatchingPostProcessingSolver\",S9t,t=\u003e{const e=t.netToPointPairsSolver;if(!e)throw new Error(\"Pipeline7: length-matching post-processing requires NetToPointPairsSolver output\");const n=e.newConnections,o=new Map;for(const s of t.srj.differentialPairs??[])for(const a of s.connectionNames){const A=n.filter(c=\u003ec.name===a||c.__rootConnectionNames?.includes(a)||c.__netConnectionName===a);if(A.length!==1)throw new Error(`Pipeline7: differential pair connection \"${a}\" must resolve to exactly one final point-pair connection, got ${A.length}`);o.set(a,A[0].name)}const i=t.exactGeometryDrcForceImproveSolver.getOutput(),r=(t.srj.differentialPairs??[]).map(s=\u003e{const a=s.connectionNames.map(l=\u003e{const u=o.get(l);if(!u)throw new Error(`Pipeline7: differential pair connection \"${l}\" is missing from final routed output`);return u});if(a[0]===a[1])throw new Error(`Pipeline7: differential pair ${s.connectionNames.join(\"/\")} resolves both members to \"${a[0]}\"`);if(s.traceGap===void 0)return{connectionNames:a,lengthTolerance:s.lengthTolerance,maxUncoupledLength:s.maxUncoupledLength};const A=a.map(l=\u003e{const u=i.filter(g=\u003eg.connectionName===l);if(u.length!==1)throw new Error(`Pipeline7: differential pair connection \"${l}\" must resolve to exactly one final HD route, got ${u.length}`);return u[0]}),c=s.traceGap+A.reduce((l,u)=\u003el+u.traceThickness/2,0);return{connectionNames:a,lengthTolerance:s.lengthTolerance,maxUncoupledLength:s.maxUncoupledLength,minimumCenterlineDistance:c,maximumCenterlineDistance:c}});return[{hdRoutes:i,differentialPairs:r,obstacles:t.srj.obstacles,bounds:t.srj.bounds,layerCount:t.srj.layerCount}]}),Cp(\"powerTraceExpansionSolver\",P7t,t=\u003e{const e=t.opts.powerTraceExpansion??{},n=e.onlyConnectionNames??D7t(t.originalSrj);return[R7t({originalSrj:t.originalSrj,newlyRoutedTraces:t.getPrePowerTraceOutputSimplifiedPcbTraces(),expandedConnectionNames:n}),{allowNewVias:!1,...e,onlyConnectionNames:n}]})];setSimpleRouteJson(t){this.srj=t;const e=om(this.srj);this.viaDiameter=e.padDiameter,this.viaHoleDiameter=e.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;computeProgress(){const t=this.activeSubSolver?.progress??0;return(this.currentPipelineStepIndex+t)/this.pipelineDef.length}_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),t.solverName!==\"lengthMatchingPostProcessingSolver\"\u0026\u0026t.solverName!==\"powerTraceExpansionSolver\"||(this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,this.iterations+this.activeSubSolver.MAX_ITERATIONS+1)),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.visualizeStage(this.activeSubSolver);const t=this.escapeViaLocationSolver?.visualize(),e=this.netToPointPairsSolver?.visualize(),n=this.componentDetectionSolver?.visualize(),o=this.componentTopologyGeneratorSolver?.visualize(),i=this.globalTopologyGeneratorSolver?.visualize(),r=this.topologyMergingSolver?.visualize(),s=this.nodeDimensionSubdivisionSolver?.visualize(),a=this.nodeTargetMerger?.visualize(),A=this.singleLayerNodeMerger?.visualize(),c=this.strawSolver?.visualize(),l=this.edgeSolver?.visualize(),u=this.deadEndSolver?.visualize(),g=this.availableSegmentPointSolver?.visualize(),h=this.portPointPathingSolver?.visualize(),d=this.multiSectionPortPointOptimizer?.visualize(),p=this.uniformPortDistributionSolver?.visualize(),m=this.highDensityRouteSolver?.visualize(),_=this.highDensityForceImproveSolver?.visualize(),f=this.highDensityRepairSolver?.visualize(),I=this.highDensityStitchSolver?.visualize(),C=this.traceSimplificationSolver?.visualize(),y=this.lengthMatchingPostProcessingSolver?.visualize(),x=this.traceWidthSolver?.visualize(),E=this.necessaryCrampedPortPointSolver?.visualize(),B=(this.highDensityRouteSolver?.visualize(),this.originalSrj),S=B.outline,Q=[];if(Q.push({points:[{x:B.bounds?.minX??-50,y:B.bounds?.minY??-50},{x:B.bounds?.maxX??50,y:B.bounds?.minY??-50},{x:B.bounds?.maxX??50,y:B.bounds?.maxY??50},{x:B.bounds?.minX??-50,y:B.bounds?.maxY??50},{x:B.bounds?.minX??-50,y:B.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),S\u0026\u0026S.length\u003e=2){const j=S.map(J=\u003e({x:J.x,y:J.y}));j.push({...j[0]}),Q.push({points:j,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const w=z8(B),M={points:[...B.connections.flatMap(j=\u003ej.pointsToConnect.map(J=\u003e({...J,layer:J8(J,B.layerCount),label:`${j.name} ${J.pcb_port_id??\"\"}`})))],rects:[...(B.obstacles??[]).filter(j=\u003e!j.isCopperPour).map(j=\u003e({...j,fill:j.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":j.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(j,B.layerCount),label:w(j)}))],lines:Q},k={traceColorMode:this.visualizationTraceColorMode},R=ab({srj:B,visualizationOptions:k}),F=Il(M,R),O=this.preprocessSimpleRouteJsonSolver?.visualize(),U=this.globalDrcForceImproveSolver?.visualize(),Y=this.exactGeometryDrcForceImproveSolver?.visualize(),W=[F,O,n,o,t,e,i,r,s,a,A,c,l,u,g,E,h,d,p,m?Il(M,m):null,_,f,I,C,x,U,Y,y,this.solved?Il({lines:Q},ab({srj:this.originalSrj,visualizationOptions:k}),this.visualizeFinalOutput()):null].filter(Boolean),te=Il(...W);return this.visualizationTraceColorMode===\"net\"?pce(te,this.colorMap):te}visualizeStage(t){const e=t.visualize();return this.visualizationTraceColorMode===\"net\"?pce(e,this.colorMap):e}visualizeFinalOutput(){const t=this.visualizationTraceColorMode,e=this.getOutputSimpleRouteJson();return mx(e,{traceColorMode:t})}preview(){if(this.highDensityRouteSolver){const t=[];for(let e=this.highDensityRouteSolver.routes.length-1;e\u003e=0;e--){const n=this.highDensityRouteSolver.routes[e];if(t.push({points:n.route.map(o=\u003e({x:o.x,y:o.y})),strokeColor:this.colorMap[n.connectionName]}),t.length\u003e200)break}return{lines:t}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.componentTopologyGeneratorSolver?this.componentTopologyGeneratorSolver.visualize():this.componentDetectionSolver?this.componentDetectionSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){if(this.lengthMatchingPostProcessingSolver){const{hdRoutes:t}=this.lengthMatchingPostProcessingSolver.getOutput();return t}return this.exactGeometryDrcForceImproveSolver?.getOutput()??this.globalDrcForceImproveSolver?.getOutput()??this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error(\"Cannot get output before solving is complete\");return this.powerTraceExpansionSolver?this.powerTraceExpansionSolver.getOutput():this.getPrePowerTraceOutputSimplifiedPcbTraces()}getPrePowerTraceOutputSimplifiedPcbTraces(){return M7t({connections:this.netToPointPairsSolver?.newConnections??[],originalConnections:this.originalSrj.connections,hdRoutes:this._getOutputHdRoutes(),layerCount:this.srj.layerCount,obstacles:this.srj.obstacles,defaultViaHoleDiameter:this.viaHoleDiameter,connMap:this.connMap})}getOutputSimpleRouteJson(){return{...this.originalSrj,traces:this.getOutputSimplifiedPcbTraces()}}},L7t=t=\u003e[...new Set(t)].sort((e,n)=\u003ee-n),ygo=class extends yr{constructor(t){super(),this.params=t,this.MAX_ITERATIONS=1}params;outputNodes=[];outputSharedEdgeSegments=[];nodeIdByOriginalAndZ=new Map;getSolverName(){return\"SplitNodesIntoSingleLayerNodeSolver\"}_step(){this.outputNodes=this.params.capacityMeshNodes.flatMap(t=\u003eL7t(t.availableZ).map(e=\u003e{const n=((o,i)=\u003e`${o}__z${i}`)(t.capacityMeshNodeId,e);return this.nodeIdByOriginalAndZ.set(`${t.capacityMeshNodeId}:${e}`,n),{...t,capacityMeshNodeId:n,layer:`z${e}`,availableZ:[e],_parent:t}})),this.outputSharedEdgeSegments=this.params.sharedEdgeSegments.flatMap(t=\u003ethis.splitSharedEdgeSegment(t)),this.stats={inputNodeCount:this.params.capacityMeshNodes.length,outputNodeCount:this.outputNodes.length,inputPortPointCount:this.params.sharedEdgeSegments.reduce((t,e)=\u003et+e.portPoints.length,0),outputPortPointCount:this.outputSharedEdgeSegments.reduce((t,e)=\u003et+e.portPoints.length,0)},this.solved=!0}getSplitNodeId(t,e){return this.nodeIdByOriginalAndZ.get(`${t}:${e}`)}splitPortPoint(t){return L7t(t.availableZ).flatMap(e=\u003e{const n=t.nodeIds.map(o=\u003ethis.getSplitNodeId(o,e));return n[0]\u0026\u0026n[1]?[{...t,segmentPortPointId:`${t.segmentPortPointId}__z${e}`,availableZ:[e],nodeIds:[n[0],n[1]]}]:[]})}splitSharedEdgeSegment(t){const e=new Map;for(const n of t.portPoints.flatMap(o=\u003ethis.splitPortPoint(o))){const o=n.availableZ[0];if(o===void 0)continue;const i=e.get(o)??[];i.push(n),e.set(o,i)}return[...e.entries()].map(([n,o])=\u003e({...t,edgeId:`${t.edgeId}__z${n}`,nodeIds:o[0].nodeIds,availableZ:[n],portPoints:o}))}getOutput(){return{capacityMeshNodes:this.outputNodes,sharedEdgeSegments:this.outputSharedEdgeSegments}}getConstructorParams(){return[this.params]}visualize(){return{rects:this.outputNodes.map(t=\u003e({...Wf(t),label:`${t.capacityMeshNodeId}\n${t.layer}`})),points:this.outputSharedEdgeSegments.flatMap(t=\u003et.portPoints.map(e=\u003e({x:e.x,y:e.y,label:`${e.segmentPortPointId}\nz${e.availableZ.join(\",\")}`})))}}};function Xf(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var xgo=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e,this.originalSrj=t,this.opts={...e};const n=this.opts;if(this.effort=n.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=n.maxNodeDimension??16,this.maxNodeRatio=n.maxNodeRatio??6,this.minNodeArea=n.minNodeArea??.1**2,this.setSimpleRouteJson(t),n.capacityDepth===void 0){const o=this.srj.bounds.maxX-this.srj.bounds.minX,i=this.srj.bounds.maxY-this.srj.bounds.minY,r=Math.max(o,i),s=n.targetMinCapacity??.5;n.capacityDepth=$Q(r,s)}this.cacheProvider=n.cacheProvider===void 0?tB():n.cacheProvider===null?null:n.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;nodeSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityForceImproveRoutes;highDensityRepairSolver;highDensityRepairRoutes;highDensityStitchSolver;globalDrcForceImproveSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;availableSegmentPointSolver;splitNodesIntoSingleLayerNodeSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[Xf(\"preprocessSimpleRouteJsonSolver\",XAe,t=\u003e[t.originalSrj],{onSolved:t=\u003e{t.setSimpleRouteJson(t.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),Xf(\"escapeViaLocationSolver\",FAe,t=\u003e[t.srj,{viaDiameter:t.viaDiameter,minTraceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=\u003e{t.srjWithEscapeViaLocations=t.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),Xf(\"netToPointPairsSolver\",rL,t=\u003e{const e=t.srjWithEscapeViaLocations??t.srj;return[e,t.colorMap,JQ(e)]},{onSolved:t=\u003e{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,t.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),Xf(\"nodeSolver\",qF,t=\u003e[{simpleRouteJson:t.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:t=\u003e{t.capacityNodes=t.nodeSolver?.getOutput().meshNodes??[]}}),Xf(\"nodeDimensionSubdivisionSolver\",vAe,t=\u003e[t.capacityNodes,t.maxNodeDimension,t.maxNodeRatio,t.minNodeArea],{onSolved:t=\u003e{t.capacityNodes=t.nodeDimensionSubdivisionSolver?.outputNodes??[]}}),Xf(\"edgeSolver\",WQ,t=\u003e[t.capacityNodes],{onSolved:t=\u003e{t.capacityEdges=t.edgeSolver?.edges}}),Xf(\"availableSegmentPointSolver\",kD,t=\u003e[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!0}]),Xf(\"necessaryCrampedPortPointSolver\",lJ,t=\u003e[{capacityMeshNodes:t.capacityNodes,sharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),simpleRouteJson:t.srjWithPointPairs}]),Xf(\"splitNodesIntoSingleLayerNodeSolver\",ygo,t=\u003e[{capacityMeshNodes:t.capacityNodes,sharedEdgeSegments:t.necessaryCrampedPortPointSolver?.getOutput()??t.availableSegmentPointSolver.getOutput()}],{onSolved:t=\u003e{t.capacityNodes=t.splitNodesIntoSingleLayerNodeSolver.getOutput().capacityMeshNodes}}),Xf(\"portPointPathingSolver\",kAe,t=\u003e{const e=t.splitNodesIntoSingleLayerNodeSolver.getOutput(),{graph:n,connections:o}=uJ({capacityMeshNodes:e.capacityMeshNodes,layerCount:t.srj.layerCount,connectivityMap:t.connMap,segmentPortPoints:e.sharedEdgeSegments.flatMap(i=\u003ei.portPoints),simpleRouteJsonConnections:t.srjWithPointPairs.connections,assignableViaObstacles:t.originalSrj.obstacles});return[{graph:n,connections:o,layerCount:t.srj.layerCount,effort:t.effort,minViaPadDiameter:t.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),Xf(\"uniformPortDistributionSolver\",kz,t=\u003e[{nodeWithPortPoints:t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:t.minTraceWidth,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]),Xf(\"highDensityRouteSolver\",HD,t=\u003e{const e=t.uniformPortDistributionSolver?.getOutput()??[],n=t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],o=e.length\u003e0?e:n;return t.highDensityNodePortPoints=structuredClone(o),[{nodePortPoints:o,nodePfById:new Map((t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(i=\u003e[i.capacityMeshNodeId,t.portPointPathingSolver?.computeNodePf(i)??null])),colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]}),Xf(\"highDensityForceImproveSolver\",mJ,t=\u003e[{nodeWithPortPoints:t.getHighDensityNodePortPointsWithAssignableViasFirst(),hdRoutes:t.getMovableHighDensityRoutes(t.highDensityRouteSolver.routes),colorMap:t.colorMap,totalStepsPerNode:Math.max(20,Math.round(60*t.effort)),nodeAssignmentMargin:t.srj.defaultObstacleMargin??.2}],{onSolved:t=\u003e{t.highDensityForceImproveRoutes=t.mergeMovableHighDensityRoutesBack(t.highDensityRouteSolver.routes,t.highDensityForceImproveSolver.getOutput())}}),Xf(\"highDensityRepairSolver\",pW,t=\u003e[{nodeWithPortPoints:t.getHighDensityNodePortPointsWithAssignableViasFirst(),hdRoutes:t.getMovableHighDensityRoutes(t.highDensityForceImproveRoutes??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes),obstacles:t.srj.obstacles,colorMap:t.colorMap,repairMargin:t.srj.defaultObstacleMargin??.2}],{onSolved:t=\u003e{const e=t.highDensityForceImproveRoutes??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes;t.highDensityRepairRoutes=t.mergeMovableHighDensityRoutesBack(e,t.highDensityRepairSolver.getOutput())}}),Xf(\"highDensityStitchSolver\",$Ae,t=\u003e[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensityRepairRoutes??t.highDensityRepairSolver?.getOutput()??t.highDensityForceImproveRoutes??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter,allowedLayerTransitionPointKeys:nCt(t.originalSrj.obstacles)}]),Xf(\"traceSimplificationSolver\",j8,t=\u003e[{hdRoutes:t.highDensityStitchSolver.mergedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,outline:t.srj.outline,defaultViaDiameter:t.viaDiameter,layerCount:t.srj.layerCount,minTraceToPadEdgeClearance:t.srj.minTraceToPadEdgeClearance,iterations:2}]),Xf(\"traceWidthSolver\",aL,t=\u003e[{hdRoutes:t.traceSimplificationSolver.simplifiedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,minTraceWidth:t.minTraceWidth,connection:t.srj.connections,obstacleMargin:t.srj.minTraceToPadEdgeClearance??.15,layerCount:t.srj.layerCount}]),Xf(\"globalDrcForceImproveSolver\",S7,t=\u003e[{srj:t.srjWithPointPairs,hdRoutes:t.traceWidthSolver.getHdRoutesWithWidths(),effort:t.effort}])];setSimpleRouteJson(t){this.srj=t;const e=om(this.srj);this.viaDiameter=e.padDiameter,this.viaHoleDiameter=e.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.escapeViaLocationSolver?.visualize(),e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeDimensionSubdivisionSolver?.visualize(),i=this.nodeTargetMerger?.visualize(),r=this.singleLayerNodeMerger?.visualize(),s=this.strawSolver?.visualize(),a=this.edgeSolver?.visualize(),A=this.deadEndSolver?.visualize(),c=this.availableSegmentPointSolver?.visualize(),l=this.splitNodesIntoSingleLayerNodeSolver?.visualize(),u=this.portPointPathingSolver?.visualize(),g=this.multiSectionPortPointOptimizer?.visualize(),h=this.uniformPortDistributionSolver?.visualize(),d=this.highDensityRouteSolver?.visualize(),p=this.highDensityForceImproveSolver?.visualize(),m=this.highDensityRepairSolver?.visualize(),_=this.highDensityStitchSolver?.visualize(),f=this.traceSimplificationSolver?.visualize(),I=this.necessaryCrampedPortPointSolver?.visualize(),C=(this.highDensityRouteSolver?.visualize(),this.originalSrj),y=C.outline,x=[];if(x.push({points:[{x:C.bounds?.minX??-50,y:C.bounds?.minY??-50},{x:C.bounds?.maxX??50,y:C.bounds?.minY??-50},{x:C.bounds?.maxX??50,y:C.bounds?.maxY??50},{x:C.bounds?.minX??-50,y:C.bounds?.maxY??50},{x:C.bounds?.minX??-50,y:C.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),y\u0026\u0026y.length\u003e=2){const w=y.map(M=\u003e({x:M.x,y:M.y}));w.push({...w[0]}),x.push({points:w,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const E=z8(C),B={points:[...C.connections.flatMap(w=\u003ew.pointsToConnect.map(M=\u003e({...M,layer:J8(M,C.layerCount),label:`${w.name} ${M.pcb_port_id??\"\"}`})))],rects:[...(C.obstacles??[]).filter(w=\u003e!w.isCopperPour).map(w=\u003e({...w,fill:w.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":w.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(w,C.layerCount),label:E(w)}))],lines:x},S=ab({srj:C}),Q=[Il(B,S),t,e,n,o,i,r,s,a,A,c,I,l,u,g,h,d?Il(B,d):null,p,m,_,f,this.solved?Il({lines:x},ab({srj:this.originalSrj}),mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...Q)}preview(){if(this.highDensityRouteSolver){const t=[];for(let e=this.highDensityRouteSolver.routes.length-1;e\u003e=0;e--){const n=this.highDensityRouteSolver.routes[e];if(t.push({points:n.route.map(o=\u003e({x:o.x,y:o.y})),strokeColor:this.colorMap[n.connectionName]}),t.length\u003e200)break}return{lines:t}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){const t=this.globalDrcForceImproveSolver?.getOutput();return t\u0026\u0026this.routesOnlyUsePreplacedVias(t)?t:this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityRepairRoutes??this.highDensityForceImproveRoutes??this.highDensityStitchSolver.mergedHdRoutes}routesOnlyUsePreplacedVias(t){const e=nCt(this.originalSrj.obstacles);return e.size===0||t.every(n=\u003en.vias.every(o=\u003ee.has(IL(o))))}getHighDensityNodePortPointsWithAssignableViasFirst(){return[...this.highDensityNodePortPoints??[]].sort((t,e)=\u003e{const n=t.capacityMeshNodeId.startsWith(\"assignable-via:\");return n===e.capacityMeshNodeId.startsWith(\"assignable-via:\")?0:n?-1:1})}getPreplacedAssignableViaObstacles(){return this.originalSrj.obstacles.filter(t=\u003et.netIsAssignable===!0\u0026\u0026(t.layers?.length??0)\u003e1)}isFixedPreplacedViaRoute(t){const e=this.getPreplacedAssignableViaObstacles();return e.length!==0\u0026\u0026t.vias.length!==0\u0026\u0026e.some(n=\u003e[...t.route,...t.vias].every(o=\u003eo7(o,n)\u003c=0))}getMovableHighDensityRouteIndexes(t){return t.map((e,n)=\u003ethis.isFixedPreplacedViaRoute(e)?-1:n).filter(e=\u003ee!==-1)}getMovableHighDensityRoutes(t){return this.getMovableHighDensityRouteIndexes(t).map(e=\u003et[e])}mergeMovableHighDensityRoutesBack(t,e){const n=this.getMovableHighDensityRouteIndexes(t),o=[...t];for(let i=0;i\u003cn.length;i++)o[n[i]]=e[i];return o}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error(\"Cannot get output before solving is complete\");const t=[],e=this._getOutputHdRoutes();for(const n of this.netToPointPairsSolver?.newConnections??[]){const o=n.__netConnectionName??this.originalSrj.connections.find(r=\u003er.name===n.name)?.__netConnectionName,i=e.filter(r=\u003er.connectionName===n.name);for(let r=0;r\u003ci.length;r++){const s=i[r],a={type:\"pcb_trace\",pcb_trace_id:`${n.name}_${r}`,connection_name:o??n.__rootConnectionNames?.[0]??n.name,route:nB(s,this.srj.layerCount,{connectionPoints:n.pointsToConnect,defaultViaHoleDiameter:this.viaHoleDiameter,obstacles:this.srj.obstacles,connMap:this.connMap})};t.push(a)}}return t}getOutputSimpleRouteJson(){return{...this.originalSrj,traces:this.getOutputSimplifiedPcbTraces()}}},H7t=(t,e)=\u003e{const n=t.filter(o=\u003e(o.rootConnectionName??o.connectionName)===e);if(n.length!==0)return n.reduce((o,i)=\u003eo+i.route.slice(1).reduce((r,s,a)=\u003e{const A=i.route[a];return r+Math.hypot(s.x-A.x,s.y-A.y)},0),0)},Ego=(t,e)=\u003e{const n=new Set(t.flatMap(o=\u003eo.maxLengthSkew===void 0?[]:o.connectionNames));return e.flatMap(o=\u003e{if(!n.has(o.name))return[];const i=o.pointsToConnect[0],r=o.pointsToConnect.at(-1);if(!i||!r||i===r)throw new Error(`Length matching: bus connection \"${o.name}\" needs at least two points`);return[{...o,pointsToConnect:[i,r]}]})},Bgo=class extends yr{constructor(t){super(),this.params=t,this.differentialPairSolver=new S9t({hdRoutes:t.hdRoutes,differentialPairs:t.differentialPairs,obstacles:t.obstacles,bounds:t.bounds,layerCount:t.layerCount}),this.MAX_ITERATIONS=this.differentialPairSolver.MAX_ITERATIONS+1e5+10}params;differentialPairSolver;busLengthMatchingSolver;outputHdRoutes;getSolverName(){return\"LengthMatchingPostProcessingSolver\"}_step(){if(!this.differentialPairSolver.solved)return this.differentialPairSolver.step(),void(this.differentialPairSolver.failed\u0026\u0026(this.failed=!0,this.error=this.differentialPairSolver.error));if(!this.busLengthMatchingSolver){const n=this.differentialPairSolver.getOutput().hdRoutes,o=(t=this.params.buses,e=n,t.flatMap(i=\u003e{const r=i.maxLengthSkew;if(r===void 0||i.connectionNames.length\u003c2)return[];const s=i.connectionNames.map(A=\u003e{const c=H7t(e,A);if(c===void 0)throw new Error(`Length matching: bus \"${i.busId}\" has no routed geometry for connection \"${A}\"`);return{connectionName:A,length:c}}),a=s.reduce((A,c)=\u003ec.length\u003eA.length?c:A);return s.flatMap(A=\u003eA.connectionName===a.connectionName?[]:[{connectionNames:[A.connectionName,a.connectionName],lengthTolerance:r}])}));return o.length===0?(this.outputHdRoutes=n,void(this.solved=!0)):void(this.busLengthMatchingSolver=new m9t({hdRoutes:n,originalConnections:Ego(this.params.buses,this.params.connections),differentialPairs:o,obstacles:this.params.obstacles,bounds:this.params.bounds,layerCount:this.params.layerCount,obstacleMargin:this.params.obstacleMargin}))}var t,e;if(this.busLengthMatchingSolver.step(),this.busLengthMatchingSolver.failed)return this.failed=!0,void(this.error=this.busLengthMatchingSolver.error);this.busLengthMatchingSolver.solved\u0026\u0026(this.outputHdRoutes=this.busLengthMatchingSolver.getOutput().matchedHdRoutes,((n,o)=\u003e{for(const i of n){if(i.maxLengthSkew===void 0||i.connectionNames.length\u003c2)continue;const r=i.connectionNames.map(a=\u003e{const A=H7t(o,a);if(A===void 0)throw new Error(`Length matching: bus \"${i.busId}\" lost routed geometry for connection \"${a}\"`);return A}),s=Math.max(...r)-Math.min(...r);if(s\u003ei.maxLengthSkew+1e-6)throw new Error(`Length matching: bus \"${i.busId}\" routed length skew ${s.toFixed(4)}mm exceeds ${i.maxLengthSkew.toFixed(4)}mm`)}})(this.params.buses,this.outputHdRoutes),this.solved=!0)}getOutput(){if(!this.solved||!this.outputHdRoutes)throw new Error(\"LengthMatchingPostProcessingSolver output requested before completion\");return{hdRoutes:this.outputHdRoutes}}visualize(){return this.busLengthMatchingSolver?.visualize()??this.differentialPairSolver.visualize()}},fH=1e-9,O7t=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=fH\u0026\u0026Math.abs(t.y-e.y)\u003c=fH\u0026\u0026t.z===e.z,bgo=(t,e)=\u003e{if(t.length===0)return void t.push(...e.route);const n=t.at(-1);if(e.route[0]\u0026\u0026O7t(n,e.route[0]))t.push(...e.route.slice(1));else{if(!e.route.at(-1)||!O7t(n,e.route.at(-1)))throw new Error(`Pipeline9 could not reconnect mutated preloaded segment \"${e.connectionName}\"`);t.push(...e.route.slice(0,-1).reverse())}},$Se=(t,e)=\u003e{const n=t.preloadedRoutePositionStart??t.preloadedRouteIndex,o=e.preloadedRoutePositionStart??e.preloadedRouteIndex,i=t.preloadedRoutePositionEnd??n,r=e.preloadedRoutePositionEnd??o;return n-o||i-r||t.preloadedRouteIndex-e.preloadedRouteIndex||t.connectionName.localeCompare(e.connectionName)},Sgo=t=\u003e{const e=t.route.flatMap(n=\u003en.route_type===\"wire\"||n.route_type===\"through_obstacle\"?[n.width]:[]);return e.length\u003e0?Math.max(...e):void 0},G7t=({trace:t,updatedTraceRoutes:e,layerCount:n,defaultViaHoleDiameter:o,obstacles:i,connMap:r})=\u003e{if(e.length===0)throw new Error(`Pipeline9 lost every fixed route for mutated trace \"${t.pcb_trace_id}\"`);const s=[];let a,A=0,c=0;for(const u of[...e].sort($Se))bgo(s,u),A=Math.max(A,u.traceThickness),c=Math.max(c,u.viaDiameter),a??=u.rootConnectionName;const l={connectionName:t.connection_name,rootConnectionName:a,traceThickness:Sgo(t)??A,viaDiameter:c,route:s,vias:s.slice(0,-1).flatMap((u,g)=\u003e{const h=s[g+1];return u.z!==h.z\u0026\u0026Math.abs(u.x-h.x)\u003c=fH\u0026\u0026Math.abs(u.y-h.y)\u003c=fH?[{x:h.x,y:h.y}]:[]})};return nB(l,n,{defaultViaHoleDiameter:o,obstacles:i,connMap:r})},qSe=(t,e)=\u003et.filter(n=\u003e{if(n.isThroughObstacle===!0)return!1;const o=n.preloadedRoutePositionStart,i=n.preloadedRoutePositionEnd;if(o===void 0||i===void 0)throw new Error(`Pipeline9 fixed route \"${n.connectionName}\" is missing route-position metadata`);const r=Math.min(o,i),s=Math.max(o,i);return r\u003e=e.routePositionStart-fH\u0026\u0026s\u003c=e.routePositionEnd+fH}),Qgo=({trace:t,originalTraceRoutes:e,updatedTraceRoutes:n,layerCount:o,defaultViaHoleDiameter:i,obstacles:r,connMap:s})=\u003e{if(n.length===0)throw new Error(`Pipeline9 lost every fixed route for mutated trace \"${t.pcb_trace_id}\"`);const a=(u=\u003e{const g=[];let h=0;for(let d=0;d\u003cu.route.length;d++)u.route[d]?.route_type===\"through_obstacle\"\u0026\u0026(h\u003cd\u0026\u0026g.push({routePositionStart:h,routePositionEnd:d-1}),h=d+1);return h\u003cu.route.length\u0026\u0026g.push({routePositionStart:h,routePositionEnd:u.route.length-1}),g})(t),A=n.filter(u=\u003eu.isThroughObstacle!==!0);for(const u of A)if(a.filter(g=\u003eqSe([u],g).includes(u)).length!==1)throw new Error(`Pipeline9 fixed route \"${u.connectionName}\" crosses an immutable through-obstacle primitive`);const c=[];let l=0;for(const u of a){c.push(...t.route.slice(l,u.routePositionStart));const g=qSe(e,u),h=qSe(n,u);if(g.length\u003e0\u0026\u0026h.length===0)throw new Error(`Pipeline9 lost every fixed route for an ordinary section of mutated trace \"${t.pcb_trace_id}\"`);c.push(...h.length\u003e0?G7t({trace:t,updatedTraceRoutes:h,layerCount:o,defaultViaHoleDiameter:i,obstacles:r,connMap:s}):t.route.slice(u.routePositionStart,u.routePositionEnd+1)),l=u.routePositionEnd+1}return c.push(...t.route.slice(l)),c},Y7t=(t,e)=\u003e{const n=new Set(e.map(o=\u003eo.pcb_trace_id));return t.map(o=\u003e{if(!n.has(o.pcb_trace_id))return n.add(o.pcb_trace_id),o;const i=`${o.pcb_trace_id}_routed`;let r=i,s=2;for(;n.has(r);)r=`${i}_${s}`,s+=1;return n.add(r),{...o,pcb_trace_id:r}})},vgo=(t,e,n)=\u003e{const o=s=\u003e`${s.x}:${s.y}`,i=new Map;for(const s of e){const a=o(s.center),A=i.get(a)??[];A.push(s),i.set(a,A)}const r=new Map;for(const s of t)for(const a of s.pointsToConnect){if(!a.pcb_port_id)continue;const A=r.get(a.pcb_port_id)??new Set,c=\"layers\"in a?a.layers:[a.layer];for(const l of c)A.add(Kr(l,n));for(const l of i.get(o(a))??[])if(!(l.layers.length\u003c=1)\u0026\u0026l.connectedTo.includes(a.pcb_port_id))for(const u of l.layers)A.add(Kr(u,n));r.set(a.pcb_port_id,A)}return r},XSe=(t,e)=\u003enew Map(t.flatMap(n=\u003e{const o=e.getNetConnectedToId(n.connectionName)??(n.rootConnectionName?e.getNetConnectedToId(n.rootConnectionName)??(e.netMap[n.rootConnectionName]?n.rootConnectionName:void 0):void 0);return o?[[n.connectionName,o]]:[]})),wN=1e-9,ZSe=1e-6,U7t=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=ZSe\u0026\u0026Math.abs(t.y-e.y)\u003c=ZSe\u0026\u0026t.z===e.z,K7t=t=\u003enew Map(t.map((e,n)=\u003e[e.pcb_trace_id,n])),V7t=(t,e)=\u003e{const n=t[0],o=t.at(-1);if(!n||!o)throw new Error(\"Pipeline9 cannot split an empty preloaded route\");if(n.z!==o.z)throw new Error(\"Pipeline9 cannot partially split a preloaded layer transition\");return{...n,x:n.x+(o.x-n.x)*e,y:n.y+(o.y-n.y)*e}},z7t=({traces:t,fixedHdRoutes:e,sections:n})=\u003e{const o=(({traces:i,sections:r})=\u003e{const s=K7t(i),a=new Map;for(const A of r){const c=s.get(A.traceId);if(c===void 0)throw new Error(`Pipeline9 hypergraph changed missing preloaded trace \"${A.traceId}\"`);const l=a.get(c)??[];l.push({start:Math.min(A.startRoutePosition,A.endRoutePosition),end:Math.max(A.startRoutePosition,A.endRoutePosition)}),a.set(c,l)}for(const A of a.values())A.sort((c,l)=\u003ec.start-l.start||c.end-l.end);return a})({traces:t,sections:n});return e.flatMap(i=\u003e{const r=o.get(i.preloadedTraceIndex);if(!r?.length)return[i];const s=i.preloadedRoutePositionStart,a=i.preloadedRoutePositionEnd;if(s===void 0||a===void 0)throw new Error(`Pipeline9 fixed route \"${i.connectionName}\" is missing route-position metadata`);if(Math.abs(a-s)\u003c=wN)return r.some(c=\u003ec.start-wN\u003c=s\u0026\u0026s\u003c=c.end+wN)?[]:[i];let A=[{start:s,end:a}];for(const c of r)A=A.flatMap(l=\u003e{if(c.end\u003c=l.start+wN||c.start\u003e=l.end-wN)return[l];const u=[];return c.start\u003el.start+wN\u0026\u0026u.push({start:l.start,end:Math.min(c.start,l.end)}),c.end\u003cl.end-wN\u0026\u0026u.push({start:Math.max(c.end,l.start),end:l.end}),u});return A.map((c,l)=\u003e{const u=(c.start-s)/(a-s),g=(c.end-s)/(a-s);return{...i,connectionName:`${i.connectionName}_hypergraph_fixed_${l}`,preloadedRoutePositionStart:c.start,preloadedRoutePositionEnd:c.end,route:[V7t(i.route,u),V7t(i.route,g)],vias:[]}})})},wgo=({traces:t,sections:e,stitchedHdRoutes:n,layerCount:o})=\u003e{const i=K7t(t);return e.map((r,s)=\u003e{const a=i.get(r.traceId);if(a===void 0)throw new Error(`Pipeline9 cannot materialize missing preloaded trace \"${r.traceId}\"`);const[A,c]=((d,p)=\u003e{const m=d.connection.pointsToConnect.map(_=\u003e({x:_.x,y:_.y,z:Kr(tI(_),p)}));if(!m[0]||!m[1])throw new Error(`Pipeline9 changed section \"${d.connectionName}\" is missing an endpoint`);return[m[0],m[1]]})(r,o),l=n.flatMap(d=\u003e{if(d.connectionName!==r.connectionName)return[];const p=(({route:m,sectionStart:_,sectionEnd:f})=\u003e{const I=m.route[0],C=m.route.at(-1);if(!I||!C)return null;const y=I.z===_.z\u0026\u0026C.z===f.z,x=I.z===f.z\u0026\u0026C.z===_.z,E=y?no(I,_)+no(C,f):Number.POSITIVE_INFINITY,B=x?no(I,f)+no(C,_):Number.POSITIVE_INFINITY;return Number.isFinite(E)||Number.isFinite(B)?E\u003c=B?{score:E,reverse:!1}:{score:B,reverse:!0}:null})({route:d,sectionStart:A,sectionEnd:c});return p?[{route:d,...p}]:[]});l.sort((d,p)=\u003ed.score-p.score);const u=l[0],g=l[1];if(!u||g\u0026\u0026Math.abs(g.score-u.score)\u003c=ZSe)throw new Error(`Pipeline9 expected one nearest stitched route for changed preloaded section \"${r.connectionName}\", got ${l.length}`);return{...(({route:d,reverse:p,sectionStart:m,sectionEnd:_})=\u003e{const f=p?(I=\u003e{const C=[...I].reverse().map(y=\u003e{const{toNextSegmentType:x,...E}=y;return E});for(let y=0;y\u003cI.length-1;y++){const x=I[y]?.toNextSegmentType;x\u0026\u0026(C[I.length-y-2]={...C[I.length-y-2],toNextSegmentType:x})}return C})(d.route):[...d.route];if(!f[0]||!f.at(-1))throw new Error(`Pipeline9 cannot materialize empty route \"${d.connectionName}\"`);return U7t(f[0],m)||f.unshift(m),U7t(f.at(-1),_)||f.push(_),{...d,route:f}})({route:u.route,reverse:u.reverse,sectionStart:A,sectionEnd:c}),preloadedTraceIndex:a,preloadedRouteIndex:Number.MAX_SAFE_INTEGER-e.length+s,preloadedRoutePositionStart:r.startRoutePosition,preloadedRoutePositionEnd:r.endRoutePosition,isThroughObstacle:!1}})},IH=1e-6,J7t=t=\u003et.map(e=\u003e{const n=[];for(const o of e.route){const i=n.at(-1);if(!i||i.z===o.z||i.toNextSegmentType===\"through_obstacle\"){n.push(o);continue}const r=Math.abs(i.x-o.x)\u003c=IH\u0026\u0026Math.abs(i.y-o.y)\u003c=IH,s=e.vias.some(A=\u003eMath.abs(A.x-i.x)\u003c=IH\u0026\u0026Math.abs(A.y-i.y)\u003c=IH),a=e.vias.some(A=\u003eMath.abs(A.x-o.x)\u003c=IH\u0026\u0026Math.abs(A.y-o.y)\u003c=IH);if(r)n.push(o);else{if(!s\u0026\u0026!a)throw new Error(`Pipeline9 route \"${e.connectionName}\" changes layers from z=${i.z} to z=${o.z} without an explicit via`);if(s===a)throw new Error(`Pipeline9 route \"${e.connectionName}\" has an ambiguous layer transition between (${i.x}, ${i.y}) and (${o.x}, ${o.y})`);s?n.push({x:i.x,y:i.y,z:o.z}):n.push({x:o.x,y:o.y,z:i.z}),n.push(o)}}return{...e,route:n}}),iI=1e-9,W7t=t=\u003e({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2}),j7t=(t,e)=\u003et.x\u003e=e.minX-iI\u0026\u0026t.x\u003c=e.maxX+iI\u0026\u0026t.y\u003e=e.minY-iI\u0026\u0026t.y\u003c=e.maxY+iI,$7t=(t,e,n)=\u003en\u003c=iI?t:n\u003e=.999999999?e:{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n,z:t.z},Pgo=(t,e,n)=\u003e{const o=e.x-t.x,i=e.y-t.y;if(Math.abs(o)\u003c=iI\u0026\u0026Math.abs(i)\u003c=iI)return j7t(t,n)\u0026\u0026j7t(e,n)?{start:t,end:e}:null;let r=0,s=1;const a=[[-o,t.x-n.minX],[o,n.maxX-t.x],[-i,t.y-n.minY],[i,n.maxY-t.y]];for(const[A,c]of a){if(Math.abs(A)\u003c=iI){if(c\u003c0)return null;continue}const l=c/A;if(A\u003c0?r=Math.max(r,l):s=Math.min(s,l),r\u003es+iI)return null}return{start:$7t(t,e,r),end:$7t(t,e,s)}},Mgo=t=\u003e{const e=t.sourceRoutes[0],n=`pipeline9_fallback:${e.connectionName}`,o=`${n}:start`,i=`${n}:end`;return[{...t.start.point,portPointId:o,nextPortPointId:i,connectionName:e.connectionName,rootConnectionName:e.rootConnectionName},{...t.end.point,portPointId:i,prevPortPointId:o,connectionName:e.connectionName,rootConnectionName:e.rootConnectionName}]},bce=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=iI\u0026\u0026Math.abs(t.y-e.y)\u003c=iI\u0026\u0026t.z===e.z,Dgo=(t,e)=\u003et.sourceRoute.preloadedTraceIndex===e.sourceRoute.preloadedTraceIndex\u0026\u0026bce(t.sourceRoute.route.at(-1),e.sourceRoute.route[0]),MW=(t,e,n=new Set)=\u003e{const o=new Map,i=[],r=new Set(t.portPoints.map(u=\u003eu.z)),s=e.map(u=\u003e((g,h)=\u003e{const d=W7t(h);let p,m;for(let _=0;_\u003cg.route.length-1;_++){const f=Pgo(g.route[_],g.route[_+1],d);f\u0026\u0026(p??={segmentIndex:_,point:f.start},m={segmentIndex:_,point:f.end})}return p\u0026\u0026m?Math.abs(p.point.x-m.point.x)\u003c=iI\u0026\u0026Math.abs(p.point.y-m.point.y)\u003c=iI\u0026\u0026p.point.z===m.point.z?null:{sourceRoute:g,start:p,end:m}:null})(u,t)).filter(u=\u003eu!==null),a=s.filter(u=\u003eu.sourceRoute.isThroughObstacle!==!0\u0026\u0026(((g,h)=\u003eh.size===0||[g.start.point,...g.sourceRoute.route.slice(g.start.segmentIndex+1,g.end.segmentIndex+1),g.end.point].some(d=\u003eh.has(d.z)))(u,r)||n.has(u.sourceRoute.connectionName))).sort((u,g)=\u003eu.sourceRoute.preloadedTraceIndex-g.sourceRoute.preloadedTraceIndex||u.sourceRoute.preloadedRouteIndex-g.sourceRoute.preloadedRouteIndex),A=new Set(a.map(u=\u003eu.sourceRoute)),c=s.map(u=\u003eu.sourceRoute).filter(u=\u003e!A.has(u)),l=[];for(let u=0;u\u003ca.length;u++){const g=a[u],h=a[u-1],d=l.at(-1);h\u0026\u0026d\u0026\u0026Dgo(h,g)?(d.sourceRoutes.push(g.sourceRoute),d.end=g.end):l.push({sourceRoutes:[g.sourceRoute],start:g.start,end:g.end})}for(const u of l){const g=u.sourceRoutes[0].connectionName;if(o.has(g))throw new Error(`Pipeline9 regional fallback found duplicate fixed route section identity \"${g}\"`);o.set(g,u),i.push(Mgo(u))}return{nodeWithPortPoints:{...t,portPoints:[...t.portPoints,...i.flatMap(u=\u003eu)],portPointsInPairs:[...t.portPointsInPairs??[],...i]},fixedRouteSectionsByConnectionName:o,fixedObstacleRoutes:c}},Ngo=t=\u003e{const e=[];for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];o.z!==i.z\u0026\u0026Math.abs(o.x-i.x)\u003c=iI\u0026\u0026Math.abs(o.y-i.y)\u003c=iI\u0026\u0026e.push({x:i.x,y:i.y})}return e},eQe=(t,e)=\u003eq7t({section:t,replacement:e,sourceMutationMasks:new Map,replacementIsMutated:!1}).route,q7t=({section:t,replacement:e,sourceMutationMasks:n,replacementIsMutated:o})=\u003e{const i=t.sourceRoutes[0],r=t.sourceRoutes.at(-1),s=((h,d)=\u003e{const p=h.route,m=p[0],_=p.at(-1);if(!m||!_)throw new Error(`Pipeline9 regional fallback produced an empty replacement for \"${d.sourceRoutes[0].connectionName}\"`);const f=Math.hypot(m.x-d.start.point.x,m.y-d.start.point.y)+Math.hypot(_.x-d.end.point.x,_.y-d.end.point.y);return Math.hypot(_.x-d.start.point.x,_.y-d.start.point.y)+Math.hypot(m.x-d.end.point.x,m.y-d.end.point.y)\u003cf?[...p].reverse():p})(e,t),a=[],A=[],c=(h,d)=\u003e{const p=n.get(h.connectionName);if(p\u0026\u0026p.length!==h.route.length-1)throw new Error(`Pipeline9 fixed route mutation mask for \"${h.connectionName}\" has ${p.length} segments, expected ${h.route.length-1}`);return p?.[d]??!1},l=(h,d)=\u003e{const p=a.at(-1);if(p){if(!bce(p,h)){if(p.z!==h.z\u0026\u0026(Math.abs(p.x-h.x)\u003eiI||Math.abs(p.y-h.y)\u003eiI)){const m={...h,z:p.z};bce(p,m)||(a.push(m),A.push(d))}bce(a.at(-1),h)||(a.push(h),A.push(d))}}else a.push(h)};l(i.route[0],!1);for(let h=1;h\u003c=t.start.segmentIndex;h++)l(i.route[h],c(i,h-1));l(t.start.point,c(i,t.start.segmentIndex));const u=A.length;for(const h of s.slice(1,-1))l(h,o);l(t.end.point,o);const g=A.length\u003eu;for(let h=t.end.segmentIndex+1;h\u003cr.route.length;h++)l(r.route[h],c(r,h-1));if(A.length!==a.length-1)throw new Error(`Pipeline9 produced an invalid mutation mask while splicing \"${i.connectionName}\"`);return{route:{...i,preloadedRoutePositionStart:i.preloadedRoutePositionStart,preloadedRoutePositionEnd:r.preloadedRoutePositionEnd,traceThickness:Math.max(...t.sourceRoutes.map(h=\u003eh.traceThickness)),viaDiameter:Math.max(...t.sourceRoutes.map(h=\u003eh.viaDiameter)),route:a,vias:Ngo(a)},mutatedSegments:A,replacementProducedSegment:g}},Sce=1e-6,Qce=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=Sce\u0026\u0026Math.abs(t.y-e.y)\u003c=Sce\u0026\u0026t.z===e.z,X7t=(t,e)=\u003e{for(const n of e)t.at(-1)\u0026\u0026Qce(t.at(-1),n)||t.push(n)},Z7t=t=\u003et.slice(0,-1).flatMap((e,n)=\u003e{const o=t[n+1];return e.z!==o.z\u0026\u0026Math.abs(e.x-o.x)\u003c=Sce\u0026\u0026Math.abs(e.y-o.y)\u003c=Sce?[{x:o.x,y:o.y}]:[]}),e6t=t=\u003e{const e=t.preloadedRoutePositionStart,n=t.preloadedRoutePositionEnd;if(e===void 0||n===void 0)throw new Error(`Pipeline9 fixed route \"${t.connectionName}\" is missing route-position metadata`);return{start:Math.min(e,n),end:Math.max(e,n)}},t6t=(t,e)=\u003e{const n=e6t(t),o=e6t(e);return t.preloadedTraceIndex-e.preloadedTraceIndex||n.start-o.start||n.end-o.end||t.preloadedRouteIndex-e.preloadedRouteIndex||t.connectionName.localeCompare(e.connectionName)},n6t=(t,e)=\u003e{const n=t.route.at(-1),o=e.route[0];return!!(n\u0026\u0026o\u0026\u0026t.preloadedTraceIndex===e.preloadedTraceIndex\u0026\u0026Qce(n,o))},o6t=(t,e)=\u003e{const n=t.preloadedRoutePositionStart??t.preloadedRouteIndex;return n+((t.preloadedRoutePositionEnd??t.preloadedRouteIndex)-n)*e/(t.route.length-1)},i6t=(t,e)=\u003et.route[e].z!==t.route[e+1].z,Rgo=({updatedFixedRoutes:t,regionalMutationMasks:e})=\u003e{const n=[],o=(({updatedFixedRoutes:i,regionalMutationMasks:r})=\u003e{const s=new Map;for(const l of i){if(l.route.length===0)throw new Error(`Pipeline9 cannot normalize empty fixed route \"${l.connectionName}\"`);const u=l.route.length-1;if(s.has(l.connectionName))throw new Error(`Pipeline9 cannot normalize duplicate fixed route \"${l.connectionName}\"`);const g=r.get(l.connectionName);if(g\u0026\u0026g.length!==u)throw new Error(`Pipeline9 fixed route mutation mask for \"${l.connectionName}\" has ${g.length} segments, expected ${u}`);const h=l.isThroughObstacle!==!0\u0026\u0026(l.jumpers?.length??0)===0;s.set(l.connectionName,Array.from({length:u},(d,p)=\u003eh\u0026\u0026(g?.[p]??!1)))}let a=[];const A=()=\u003e{for(;a[0]\u0026\u0026i6t(a[0].route,a[0].segmentIndex);){const l=a.shift();s.get(l.route.connectionName)[l.segmentIndex]=!1}for(;a.at(-1)\u0026\u0026i6t(a.at(-1).route,a.at(-1).segmentIndex);){const l=a.pop();s.get(l.route.connectionName)[l.segmentIndex]=!1}a=[]};let c;for(const l of[...i].sort(t6t)){c\u0026\u0026!n6t(c,l)\u0026\u0026A();const u=s.get(l.connectionName);if(u.length!==0){for(let g=0;g\u003cu.length;g++)u[g]?a.push({route:l,segmentIndex:g}):A();c=l}else A(),c=l}return A(),s})({updatedFixedRoutes:t,regionalMutationMasks:e});for(const i of t){const r=i.route.length-1,s=o.get(i.connectionName);if(r===0){n.push({route:i,mutated:!1});continue}const a=[];for(let A=0;A\u003cr;A++){const c=s[A],l=a.at(-1);l?.mutated===c?l.end=A+1:a.push({start:A,end:A+1,mutated:c})}for(const[A,c]of a.entries()){const l=i.route.slice(c.start,c.end+1),u={...i,connectionName:a.length===1?i.connectionName:`${i.connectionName}_mutation_fragment_${A}`,preloadedRouteIndex:i.preloadedRouteIndex+A/(a.length+1),preloadedRoutePositionStart:o6t(i,c.start),preloadedRoutePositionEnd:o6t(i,c.end),route:l,vias:Z7t(l)};n.push({route:u,mutated:c.mutated})}}return n},Tgo=({updatedFixedRoutes:t,regionalMutationMasks:e})=\u003e{const n=Rgo({updatedFixedRoutes:t,regionalMutationMasks:e}),o=n.map(({route:a})=\u003ea),i=(a=\u003e{const A=[];let c;for(const l of[...a].sort((u,g)=\u003et6t(u.route,g.route))){const u=l.route;if(!l.mutated){c=void 0;continue}const g=u.route[0],h=u.route.at(-1);if(!g||!h||u.route.length\u003c2)throw new Error(`Pipeline9 cannot simplify empty fixed route \"${u.connectionName}\"`);const d=c?.sourceRoutes.at(-1);c\u0026\u0026d\u0026\u0026n6t(d,u)?(c.sourceRoutes.push(u),c.end={segmentIndex:u.route.length-2,point:h}):(c={sourceRoutes:[u],start:{segmentIndex:0,point:g},end:{segmentIndex:u.route.length-2,point:h}},A.push(c))}return A})(n),r=i.map((a,A)=\u003e{const c=((l,u)=\u003e{const g=l.sourceRoutes[0],h=l.sourceRoutes.at(-1);if(!g||!h)throw new Error(\"Pipeline9 cannot simplify an empty mutation section\");const d=[l.start.point];for(const[p,m]of l.sourceRoutes.entries()){const _=p===0,f=p===l.sourceRoutes.length-1,I=_?l.start.segmentIndex+1:0,C=f?l.end.segmentIndex+1:m.route.length;X7t(d,m.route.slice(I,C))}if(X7t(d,[l.end.point]),d.length\u003c2)throw new Error(`Pipeline9 mutation section for \"${g.connectionName}\" has no routable span`);return{connectionName:`pipeline9_mutated_preload_${g.preloadedTraceIndex}_${u}`,rootConnectionName:g.rootConnectionName,traceThickness:Math.max(...l.sourceRoutes.map(p=\u003ep.traceThickness)),viaDiameter:Math.max(...l.sourceRoutes.map(p=\u003ep.viaDiameter)),route:d,vias:Z7t(d)}})(a,A);return{connectionName:c.connectionName,section:a,hdRoute:c}}),s=new Set(r.flatMap(({section:a})=\u003ea.sourceRoutes.map(A=\u003eA.connectionName)));return{sections:r,immutableHdRoutes:o.filter(a=\u003e!s.has(a.connectionName)),normalizedFixedRoutes:o}},tQe=1e-9,kv=(t,e,n,o,i)=\u003e{const r=i.getNetConnectedToId(t.connection_name)??t.connection_name,s=[],a=(A,c,l=o,u=[],g,h,d=!1)=\u003e{A.length\u003c2||s.push({connectionName:`${t.connection_name}_fixed_${e}_${s.length}`,rootConnectionName:r,preloadedTraceIndex:e,preloadedRouteIndex:s.length,preloadedRoutePositionStart:g,preloadedRoutePositionEnd:h,isThroughObstacle:d,traceThickness:Math.max(tQe,c),viaDiameter:Math.max(tQe,l),route:A,vias:u})};for(let A=0;A\u003ct.route.length;A++){const c=t.route[A];if(c.route_type===\"via\"){a([{x:c.x,y:c.y,z:Kr(c.from_layer,n)},{x:c.x,y:c.y,z:Kr(c.to_layer,n)}],tQe,c.via_diameter??o,[{x:c.x,y:c.y}],A,A);continue}if(c.route_type===\"through_obstacle\"){const u=Kr(c.from_layer,n),g=Kr(c.to_layer,n);for(let h=Math.min(u,g);h\u003c=Math.max(u,g);h++)a([{...c.start,z:h},{...c.end,z:h}],c.width,o,[],A,A+1,!0);continue}const l=t.route[A+1];c.route_type===\"wire\"\u0026\u0026l?.route_type===\"wire\"\u0026\u0026c.layer===l.layer\u0026\u0026a([{x:c.x,y:c.y,z:Kr(c.layer,n)},{x:l.x,y:l.y,z:Kr(l.layer,n)}],Math.max(c.width,l.width),o,[],A,A+1)}return s};function Fv(t,e){return{x:t.a*e.x+t.b*e.y+t.c,y:t.d*e.x+t.e*e.y+t.f}}var kgo={highResolutionCellSize:.1,highResolutionCellThickness:8,lowResolutionCellSize:.4,traceMargin:.15,traceThickness:.1,viaDiameter:.3,viaMinDistFromBorder:.15},Fgo={...kgo},nQe=(t,e,n)=\u003e{const[o,i]=t;if(o===i)return;const r=((s,a)=\u003e{const A=s.portPointId??`${s.connectionName}:${s.x}:${s.y}:${s.z}`,c=a.portPointId??`${a.connectionName}:${a.x}:${a.y}:${a.z}`;return A\u003cc?`${A}|${c}`:`${c}|${A}`})(o,i);e.has(r)||(e.add(r),n.push(t))},r6t=(t,e,n)=\u003e{for(let o=0;o\u003ct.length-1;o++)nQe([t[o],t[o+1]],e,n)},Lgo=t=\u003e{const e=[],n=new Set,o=(s=\u003e{const a=new Map;for(const A of s)A.portPointId\u0026\u0026a.set(A.portPointId,A);return a})(t);for(const s of t){if(s.prevPortPointId){const a=o.get(s.prevPortPointId);a\u0026\u0026a.connectionName===s.connectionName\u0026\u0026nQe([a,s],n,e)}if(s.nextPortPointId){const a=o.get(s.nextPortPointId);a\u0026\u0026a.connectionName===s.connectionName\u0026\u0026nQe([s,a],n,e)}}if(e.length===0)return r6t(t,n,e),e;const i=(s=\u003e{const a=new Set;for(const[A,c]of s)A.portPointId\u0026\u0026a.add(A.portPointId),c.portPointId\u0026\u0026a.add(c.portPointId);return a})(e),r=t.filter(s=\u003e!s.portPointId||!i.has(s.portPointId));return r6t(r,n,e),e};function vce(t,e,n){return Math.max(e,Math.min(n,t))}var oQe=[\"left\",\"top\",\"right\",\"bottom\",\"middle\"],Hgo=class{f=new Float64Array(1024);seq=new Uint32Array(1024);id=new Int32Array(1024);n=0;push(t,e,n){this.ensureCapacity(this.n+1);let o=this.n++;for(this.f[o]=t,this.seq[o]=e,this.id[o]=n;o\u003e0;){const i=o-1\u003e\u003e1;if(this.less(i,o))break;this.swap(o,i),o=i}}pop(){const t=this.id[0];return this.n--,this.n\u003e0\u0026\u0026(this.f[0]=this.f[this.n],this.seq[0]=this.seq[this.n],this.id[0]=this.id[this.n],this.siftDown(0)),t}get size(){return this.n}clear(){this.n=0}ensureCapacity(t){if(t\u003c=this.f.length)return;let e=this.f.length;for(;e\u003ct;)e*=2;const n=new Float64Array(e);n.set(this.f),this.f=n;const o=new Uint32Array(e);o.set(this.seq),this.seq=o;const i=new Int32Array(e);i.set(this.id),this.id=i}siftDown(t){for(;;){const e=2*t+1,n=e+1;if(e\u003e=this.n)return;let o=e;if(n\u003cthis.n\u0026\u0026!this.less(e,n)\u0026\u0026(o=n),this.less(t,o))return;this.swap(t,o),t=o}}less(t,e){const n=this.f[t],o=this.f[e];return n!==o?n\u003co:this.seq[t]\u003cthis.seq[e]}swap(t,e){const n=this.f[t];this.f[t]=this.f[e],this.f[e]=n;const o=this.seq[t];this.seq[t]=this.seq[e],this.seq[e]=o;const i=this.id[t];this.id[t]=this.id[e],this.id[e]=i}},Ogo=class{z=new Int32Array(1024);cellId=new Int32Array(1024);g=new Float64Array(1024);parent=new Int32Array(1024);ripHead=new Int32Array(1024).fill(-1);ripCount=new Int32Array(1024);length=0;clear(){this.length=0}push(t,e,n,o,i,r){this.ensureCapacity(this.length+1);const s=this.length++;return this.z[s]=t,this.cellId[s]=e,this.g[s]=n,this.parent[s]=o,this.ripHead[s]=i,this.ripCount[s]=r,s}ensureCapacity(t){if(t\u003c=this.z.length)return;let e=this.z.length;for(;e\u003ct;)e*=2;const n=new Int32Array(e);n.set(this.z),this.z=n;const o=new Int32Array(e);o.set(this.cellId),this.cellId=o;const i=new Float64Array(e);i.set(this.g),this.g=i;const r=new Int32Array(e);r.set(this.parent),this.parent=r;const s=new Int32Array(e);s.fill(-1),s.set(this.ripHead.subarray(0,this.length)),this.ripHead=s;const a=new Int32Array(e);a.set(this.ripCount.subarray(0,this.length)),this.ripCount=a}},Ggo=class{connId=new Int32Array(1024);prev=new Int32Array(1024).fill(-1);length=0;clear(){this.length=0}append(t,e){this.ensureCapacity(this.length+1);const n=this.length++;return this.connId[n]=e,this.prev[n]=t,n}contains(t,e){for(let n=t;n\u003e=0;n=this.prev[n])if(this.connId[n]===e)return!0;return!1}collect(t,e){e.length=0;for(let n=t;n\u003e=0;n=this.prev[n])e.push(this.connId[n])}ensureCapacity(t){if(t\u003c=this.connId.length)return;let e=this.connId.length;for(;e\u003ct;)e*=2;const n=new Int32Array(e);n.set(this.connId),this.connId=n;const o=new Int32Array(e);o.fill(-1),o.set(this.prev.subarray(0,this.length)),this.prev=o}};function iQe(t,e){return e??t.replace(/_mst\\d+$/,\"\")}function rQe(t,e){const n=t.x-e.center.x,o=t.y-e.center.y,i=Math.cos(-e.rotationRadians),r=Math.sin(-e.rotationRadians);return{x:n*i-o*r,y:n*r+o*i}}function s6t(t){return{minX:-t.width/2,minY:-t.height/2,maxX:t.width/2,maxY:t.height/2}}function X3(t,e,n){return Math.max(e,Math.min(n,t))}function CH(t,e){for(let n=0;n\u003ct.length;n++)if(t[n]===e)return;t.push(e)}function a6t(t,e){for(let n=0;n\u003ct.length;n++)if(t[n].cellId===e.cellId)return;t.push(e)}function DW(t,e,n,o,i,r,s){const a=t-X3(t,o,r),A=e-X3(e,i,s);return a*a+A*A\u003c=n*n}function PN(t){const e=t.segmentEnd.x-t.segmentStart.x,n=t.segmentEnd.y-t.segmentStart.y,o=e**2+n**2;if(o===0)return(t.point.x-t.segmentStart.x)**2+(t.point.y-t.segmentStart.y)**2;const i=X3(((t.point.x-t.segmentStart.x)*e+(t.point.y-t.segmentStart.y)*n)/o,0,1),r=t.segmentStart.x+i*e,s=t.segmentStart.y+i*n;return(t.point.x-r)**2+(t.point.y-s)**2}function NW(t){const e=X3(t.point.x,t.rect.minX,t.rect.maxX),n=X3(t.point.y,t.rect.minY,t.rect.maxY),o=t.point.x-e,i=t.point.y-n;return o*o+i*i}function RW(t){return(t.second.x-t.first.x)*(t.third.y-t.first.y)-(t.second.y-t.first.y)*(t.third.x-t.first.x)}function wce(t){return!(Math.abs(RW({first:t.segmentStart,second:t.segmentEnd,third:t.point}))\u003e1e-9)\u0026\u0026t.point.x\u003e=Math.min(t.segmentStart.x,t.segmentEnd.x)\u0026\u0026t.point.x\u003c=Math.max(t.segmentStart.x,t.segmentEnd.x)\u0026\u0026t.point.y\u003e=Math.min(t.segmentStart.y,t.segmentEnd.y)\u0026\u0026t.point.y\u003c=Math.max(t.segmentStart.y,t.segmentEnd.y)}function A6t(t){const e=RW({first:t.firstStart,second:t.firstEnd,third:t.secondStart}),n=RW({first:t.firstStart,second:t.firstEnd,third:t.secondEnd}),o=RW({first:t.secondStart,second:t.secondEnd,third:t.firstStart}),i=RW({first:t.secondStart,second:t.secondEnd,third:t.firstEnd});return e*n\u003c0\u0026\u0026o*i\u003c0||wce({point:t.secondStart,segmentStart:t.firstStart,segmentEnd:t.firstEnd})||wce({point:t.secondEnd,segmentStart:t.firstStart,segmentEnd:t.firstEnd})||wce({point:t.firstStart,segmentStart:t.secondStart,segmentEnd:t.secondEnd})||wce({point:t.firstEnd,segmentStart:t.secondStart,segmentEnd:t.secondEnd})}function Ygo(t){return A6t(t)?0:Math.min(PN({point:t.firstStart,segmentStart:t.secondStart,segmentEnd:t.secondEnd}),PN({point:t.firstEnd,segmentStart:t.secondStart,segmentEnd:t.secondEnd}),PN({point:t.secondStart,segmentStart:t.firstStart,segmentEnd:t.firstEnd}),PN({point:t.secondEnd,segmentStart:t.firstStart,segmentEnd:t.firstEnd}))}function c6t(t){if((function(n){if(NW({point:n.segmentStart,rect:n.rect})===0||NW({point:n.segmentEnd,rect:n.rect})===0)return!0;const o=[{x:n.rect.minX,y:n.rect.minY},{x:n.rect.maxX,y:n.rect.minY},{x:n.rect.maxX,y:n.rect.maxY},{x:n.rect.minX,y:n.rect.maxY}];for(let i=0;i\u003co.length;i++){const r=(i+1)%o.length;if(A6t({firstStart:n.segmentStart,firstEnd:n.segmentEnd,secondStart:o[i],secondEnd:o[r]}))return!0}return!1})(t))return!0;const e=t.radius**2;return NW({point:t.segmentStart,rect:t.rect})\u003c=e||NW({point:t.segmentEnd,rect:t.rect})\u003c=e?!0:[{x:t.rect.minX,y:t.rect.minY},{x:t.rect.maxX,y:t.rect.minY},{x:t.rect.maxX,y:t.rect.maxY},{x:t.rect.minX,y:t.rect.maxY}].some(n=\u003ePN({point:n,segmentStart:t.segmentStart,segmentEnd:t.segmentEnd})\u003c=e)}var Ugo=class extends zA{getSolverName(){return\"HighDensitySolverB01\"}nodeWithPortPoints;obstacles;highResolutionCellSize;highResolutionCellThickness;lowResolutionCellSize;viaDiameter;MAX_RIPS;maxCellCount;traceThickness;traceMargin;obstacleClearanceMargin;viaMinDistFromBorder;showPenaltyMap;showUsedCellMap;effort;stepMultiplier;hyperParameters;initialPenaltyFn;boundsMinX;boundsMaxX;boundsMinY;boundsMaxY;gridToBoundsTransform;availableZ;zToLayer;layerToZ;layers;fineRows;fineCols;lowScale;bandRows;bandCols;regions;planeSize;cellCenterX;cellCenterY;cellMinX;cellMinY;cellMaxX;cellMaxY;cellWidth;cellHeight;cellRegion;cellRow;cellCol;viaAllowed;neighborOffset;neighborIds;neighborCosts;usedCellsFlat;sharedCellsFlat;portOwnerFlat;penalty2d;ripStateBuckets;visitedStamp;bestGStamp;bestGValue;visitedFlatStamp;sharedCrossRootPortFlat;stamp=0;connNameToId;connIdToName;connIdToRootNet;overlapFriendlyRootNets;usedIndicesByConn;unsolvedSegs;solvedRoutes;activeConnSeg=null;activeConnId=-1;nodePool;heap;ripChain;seqCounter=0;_viaOccs=[];_cellOccs=[];_rippedIds=[];ripCount;totalRipEvents=0;searchIterations=0;consecutiveSkips=0;penaltyCap;baseSearchBudgetIters;_moveCost=0;_moveRippedHead=-1;_moveRipCount=0;traceKeepoutRadius;viaKeepoutRadius;obstacleTraceRootIdsFlat;obstacleViaRootIdsByCell;obstacleRootNameToId;obstacleRootNames;obstacleTracePrimitives;obstacleViaPrimitives;obstacleRectPrimitives;obstacleTraceBlockedCellCount=0;obstacleViaBlockedCellCount=0;get unsolvedConnections(){return this.unsolvedSegs}get solvedConnectionsMap(){const t=new Map;for(let e=0;e\u003cthis.solvedRoutes.length;e++){const n=this.getSolvedRoutesForConn(e);n.length\u003e0\u0026\u0026t.set(e,n)}return t}get activeConnection(){if(!this.activeConnSeg)return null;const t=this.activeConnSeg.startCellId,e=this.activeConnSeg.endCellId;return{connectionName:this.connIdToName[this.activeConnSeg.connId]??\"\",start:{cellId:t,region:oQe[this.cellRegion[t]],row:this.cellRow[t],col:this.cellCol[t],x:this.cellCenterX[t],y:this.cellCenterY[t],z:this.activeConnSeg.startZ},end:{cellId:e,region:oQe[this.cellRegion[e]],row:this.cellRow[e],col:this.cellCol[e],x:this.cellCenterX[e],y:this.cellCenterY[e],z:this.activeConnSeg.endZ}}}get openSet(){return{length:this.heap?.size??0}}get gridStats(){return{cells:this.planeSize||0,layers:this.layers||0,states:(this.planeSize||0)*(this.layers||0),ripStateBuckets:this.ripStateBuckets||0,neighborEdges:this.neighborIds?.length??0,regionCounts:this.regions?Object.fromEntries(this.regions.map(t=\u003e[t.name,t.rows*t.cols])):{},obstacleTraceBlockedCells:this.obstacleTraceBlockedCellCount,obstacleViaBlockedCells:this.obstacleViaBlockedCellCount,obstacleRootCount:this.obstacleRootNames?.length??0,obstacleRectCount:this.obstacleRectPrimitives?.length??0}}constructor(t){super(),this.nodeWithPortPoints=t.nodeWithPortPoints,this.obstacles=t.obstacles,this.highResolutionCellSize=t.highResolutionCellSize??.1,this.highResolutionCellThickness=Math.max(1,Math.floor(t.highResolutionCellThickness??8)),this.lowResolutionCellSize=t.lowResolutionCellSize??.4,this.viaDiameter=t.viaDiameter,this.maxCellCount=t.maxCellCount,this.traceThickness=t.traceThickness??.1,this.traceMargin=t.traceMargin??.15,this.obstacleClearanceMargin=t.obstacleClearanceMargin??0,this.viaMinDistFromBorder=t.viaMinDistFromBorder??.15,this.showPenaltyMap=t.showPenaltyMap??!1,this.showUsedCellMap=t.showUsedCellMap??!1,this.effort=t.effort??1,this.stepMultiplier=Math.max(1,Math.floor(t.stepMultiplier??1)),this.hyperParameters={shuffleSeed:0,ripCost:8,ripTracePenalty:.5,ripViaPenalty:.75,viaBaseCost:.1,greedyMultiplier:1.5,sameRootObstacleCostMultiplier:1,...t.hyperParameters},this.MAX_ITERATIONS=1e8,this.MAX_RIPS=200,this.initialPenaltyFn=t.initialPenaltyFn}getConstructorParams(){return[{nodeWithPortPoints:this.nodeWithPortPoints,obstacles:this.obstacles,highResolutionCellSize:this.highResolutionCellSize,highResolutionCellThickness:this.highResolutionCellThickness,lowResolutionCellSize:this.lowResolutionCellSize,viaDiameter:this.viaDiameter,maxCellCount:this.maxCellCount,stepMultiplier:this.stepMultiplier,traceThickness:this.traceThickness,traceMargin:this.traceMargin,obstacleClearanceMargin:this.obstacleClearanceMargin,viaMinDistFromBorder:this.viaMinDistFromBorder,showPenaltyMap:this.showPenaltyMap,showUsedCellMap:this.showUsedCellMap,effort:this.effort,hyperParameters:this.hyperParameters,initialPenaltyFn:this.initialPenaltyFn}]}_setup(){const{nodeWithPortPoints:t}=this,{width:e,height:n,center:o}=t;if(e\u003e15||n\u003e15)return this.error=`HighDensitySolverB01 only supports routing windows up to 15x15mm; received ${e}x${n}mm`,void(this.failed=!0);const i=this.lowResolutionCellSize/this.highResolutionCellSize,r=Math.round(i);if(!Number.isFinite(i)||i\u003c=0||Math.abs(i-r)\u003e1e-9)return this.error=\"lowResolutionCellSize must be a positive integer multiple of highResolutionCellSize\",void(this.failed=!0);this.lowScale=Math.max(1,r),this.availableZ=t.availableZ??[...new Set(t.portPoints.map(h=\u003eh.z))].sort((h,d)=\u003eh-d),this.layers=this.availableZ.length,this.zToLayer=new Map,this.layerToZ=new Map;for(let h=0;h\u003cthis.availableZ.length;h++){const d=this.availableZ[h];this.zToLayer.set(d,h),this.layerToZ.set(h,d)}this.boundsMinX=o.x-e/2,this.boundsMaxX=o.x+e/2,this.boundsMinY=o.y-n/2,this.boundsMaxY=o.y+n/2,this.traceKeepoutRadius=this.traceMargin+this.traceThickness/2,this.viaKeepoutRadius=this.viaDiameter/2+this.traceKeepoutRadius,this.buildFiveRegionGrid(e,n),this.gridToBoundsTransform=this.computeGridToBoundsTransform();const s=this.layers*this.planeSize;if(this.maxCellCount!==void 0\u0026\u0026s\u003ethis.maxCellCount)return this.error=`Cell count ${s} exceeds maxCellCount ${this.maxCellCount}`,void(this.failed=!0);this.connNameToId=new Map,this.connIdToName=[],this.connIdToRootNet=[],this.overlapFriendlyRootNets=new Set,this.unsolvedSegs=this.buildConnectionSegs(),this.penalty2d=new Float64Array(this.planeSize);const a=e\u003e0?1/e:0,A=n\u003e0?1/n:0;for(let h=0;h\u003cthis.planeSize;h++){let d=0;this.initialPenaltyFn\u0026\u0026(d+=this.initialPenaltyFn({x:this.cellCenterX[h],y:this.cellCenterY[h],px:(this.cellCenterX[h]-this.boundsMinX)*a,py:(this.cellCenterY[h]-this.boundsMinY)*A,cellId:h,region:oQe[this.cellRegion[h]],row:this.cellRow[h],col:this.cellCol[h]})),this.penalty2d[h]=d}this.usedCellsFlat=new Int32Array(s).fill(-1),this.sharedCellsFlat=Array.from({length:s},()=\u003e{}),this.portOwnerFlat=new Int32Array(s).fill(-1),this.sharedCrossRootPortFlat=new Uint8Array(s),this.obstacleTraceRootIdsFlat=Array.from({length:s},()=\u003e{}),this.obstacleViaRootIdsByCell=Array.from({length:this.planeSize},()=\u003e{}),this.obstacleRootNameToId=new Map,this.obstacleRootNames=[],this.obstacleTracePrimitives=[],this.obstacleViaPrimitives=[],this.obstacleRectPrimitives=[];const c=this.rasterizeObstacles();if(c)return this.error=c,void(this.failed=!0);this.ripStateBuckets=1;const l=s;this.visitedStamp=new Uint32Array(l),this.bestGStamp=new Uint32Array(l),this.bestGValue=new Float64Array(l),this.visitedFlatStamp=new Uint32Array(s),this.stamp=0;const u=new Map;for(const h of this.nodeWithPortPoints.portPoints){const d=this.connNameToId.get(h.connectionName);if(d===void 0)continue;const p=this.pointToCell(h),m=p.z*this.planeSize+p.cellId,_=this.connIdToRootNet[d],f=u.get(m);f===void 0?u.set(m,_):f!==_\u0026\u0026(this.sharedCrossRootPortFlat[m]=1);const I=this.portOwnerFlat[m];this.portOwnerFlat[m]=I===-1||I===d?d:-2}this.solvedRoutes=[],this.usedIndicesByConn=[],this.ripCount=[],this.consecutiveSkips=0,this.penaltyCap=.5*this.hyperParameters.ripCost,this.shuffleConnections();const g=(function(h){const d=h.planeSize*h.layers,p=h.connectionCount,m=Math.sqrt(p),_=Math.max(1,h.maxIterations),f=vce(Math.round(d*(8+1.2*m)),15e4,12e6),I=vce(Math.round(f*h.effort),15e4,12e6),C=vce(Math.round(.2*_),15e4,2e6);return{maxIterationsIters:Math.max(1,Math.min(_,Math.max(C,I))),baseSearchBudgetIters:vce(Math.round(d*(10+.8*m)*h.effort),5e4,4e6)}})({planeSize:this.planeSize,layers:this.layers,connectionCount:this.unsolvedSegs.length,effort:this.effort,maxIterations:this.MAX_ITERATIONS});this.baseSearchBudgetIters=g.baseSearchBudgetIters,this.MAX_ITERATIONS=g.maxIterationsIters,this.activeConnSeg=null,this.activeConnId=-1,this.nodePool=new Ogo,this.heap=new Hgo,this.ripChain=new Ggo,this.seqCounter=0}_step(){for(let t=0;t\u003cthis.stepMultiplier;t++){if(this.solved||this.failed)return;this.stepOnce()}}rasterizeObstacles(){for(let t=0;t\u003cthis.obstacles.length;t++){const e=this.obstacles[t];if(e.type===\"rect\"){const i=this.rasterizeRectObstacle(e,t);if(i)return i;continue}if(e.traceThickness\u003c=0||e.viaDiameter\u003c=0||e.route.length\u003c2)return`Obstacle ${t} must have positive trace/via sizes and at least two route points`;const n=iQe(e.connectionName,e.rootConnectionName),o=this.internObstacleRootName(n);for(let i=1;i\u003ce.route.length;i++){const r=e.route[i-1],s=e.route[i];if(!(Number.isFinite(r.x)\u0026\u0026Number.isFinite(r.y)\u0026\u0026Number.isFinite(r.z)\u0026\u0026Number.isFinite(s.x)\u0026\u0026Number.isFinite(s.y)\u0026\u0026Number.isFinite(s.z)))return`Obstacle ${t} contains non-finite route coordinates`;if(r.z===s.z){const a=this.zToLayer.get(r.z);if(a===void 0)return`Obstacle ${t} uses unavailable layer z=${r.z}`;this.rasterizeObstacleTraceSegment({segmentStart:r,segmentEnd:s,layer:a,obstacleRootId:o,obstacleTraceThickness:e.traceThickness})}else if(!e.vias.some(a=\u003ea.x===s.x\u0026\u0026a.y===s.y)){const a=this.rasterizeObstacleVia({center:s,obstacleRootId:o,obstacleViaDiameter:e.viaDiameter,zStart:r.z,zEnd:s.z,obstacleIndex:t});if(a)return a}}for(const i of e.vias){if(!Number.isFinite(i.x)||!Number.isFinite(i.y))return`Obstacle ${t} contains non-finite via coordinates`;const r=this.rasterizeObstacleVia({center:i,obstacleRootId:o,obstacleViaDiameter:e.viaDiameter,zStart:i.zStart,zEnd:i.zEnd,obstacleIndex:t});if(r)return r}}return this.obstacleTraceBlockedCellCount=this.obstacleTraceRootIdsFlat.reduce((t,e)=\u003et+(e?1:0),0),this.obstacleViaBlockedCellCount=this.obstacleViaRootIdsByCell.reduce((t,e)=\u003et+(e?1:0),0),null}rasterizeRectObstacle(t,e){if(!Number.isFinite(t.center.x)||!Number.isFinite(t.center.y)||!Number.isFinite(t.width)||!Number.isFinite(t.height)||t.width\u003c=0||t.height\u003c=0)return`Rect obstacle ${e} must have finite geometry and positive dimensions`;const n=[];for(const c of t.zLayers){const l=this.zToLayer.get(c);if(l===void 0)return`Rect obstacle ${e} uses unavailable layer z=${c}`;CH(n,l)}if(n.length===0)return`Rect obstacle ${e} must apply to at least one layer`;const o=this.internObstacleRootName(iQe(t.connectionName,t.rootConnectionName)),i={rootId:o,center:t.center,width:t.width,height:t.height,rotationRadians:(t.ccwRotationDegrees??0)*Math.PI/180,layers:n};this.obstacleRectPrimitives.push(i);const r=this.transformBoundsPointToGrid(t.center),s=Math.hypot(t.width/2,t.height/2),a=this.getConservativeGridRadius(s+this.traceThickness/2+this.traceMargin);this.forEachCellNearCircle(r.x,r.y,a,c=\u003e{for(const l of n)this.addObstacleRootId({rootIdsByCell:this.obstacleTraceRootIdsFlat,cellIndex:l*this.planeSize+c,obstacleRootId:o})});const A=this.getConservativeGridRadius(s+this.viaDiameter/2+this.traceMargin);return this.forEachCellNearCircle(r.x,r.y,A,c=\u003e{this.addObstacleRootId({rootIdsByCell:this.obstacleViaRootIdsByCell,cellIndex:c,obstacleRootId:o})}),null}internObstacleRootName(t){const e=this.obstacleRootNameToId.get(t);if(e!==void 0)return e;const n=this.obstacleRootNames.length;return this.obstacleRootNames.push(t),this.obstacleRootNameToId.set(t,n),n}rasterizeObstacleTraceSegment(t){this.obstacleTracePrimitives.push({rootId:t.obstacleRootId,layer:t.layer,segmentStart:t.segmentStart,segmentEnd:t.segmentEnd,traceRadius:t.obstacleTraceThickness/2});const e=this.transformBoundsPointToGrid(t.segmentStart),n=this.transformBoundsPointToGrid(t.segmentEnd),o=this.getConservativeGridRadius(t.obstacleTraceThickness/2+this.traceMargin),i=this.getConservativeGridRadius(t.obstacleTraceThickness/2+this.viaDiameter/2+this.traceMargin);this.forEachCellNearSegment({segmentStart:e,segmentEnd:n,radius:o},r=\u003e{this.addObstacleRootId({rootIdsByCell:this.obstacleTraceRootIdsFlat,cellIndex:t.layer*this.planeSize+r,obstacleRootId:t.obstacleRootId})}),this.forEachCellNearSegment({segmentStart:e,segmentEnd:n,radius:i},r=\u003e{this.addObstacleRootId({rootIdsByCell:this.obstacleViaRootIdsByCell,cellIndex:r,obstacleRootId:t.obstacleRootId})})}rasterizeObstacleVia(t){if(t.zStart===void 0!=(t.zEnd===void 0))return`Obstacle ${t.obstacleIndex} via must provide both zStart and zEnd`;let e=Array.from({length:this.layers},(r,s)=\u003es);if(t.zStart!==void 0\u0026\u0026t.zEnd!==void 0){if(!Number.isFinite(t.zStart)||!Number.isFinite(t.zEnd))return`Obstacle ${t.obstacleIndex} contains a non-finite via layer span`;const r=Math.min(t.zStart,t.zEnd),s=Math.max(t.zStart,t.zEnd);e=this.availableZ.flatMap((a,A)=\u003ea\u003e=r\u0026\u0026a\u003c=s?[A]:[])}if(e.length===0)return null;this.obstacleViaPrimitives.push({rootId:t.obstacleRootId,center:t.center,viaRadius:t.obstacleViaDiameter/2,layers:e});const n=this.transformBoundsPointToGrid(t.center),o=this.getConservativeGridRadius(t.obstacleViaDiameter/2+this.traceThickness/2+this.traceMargin),i=this.getConservativeGridRadius(t.obstacleViaDiameter/2+this.viaDiameter/2+this.traceMargin);return this.forEachCellNearCircle(n.x,n.y,Math.max(o,i),r=\u003e{const s=this.getCellRect(r);if(DW(n.x,n.y,o,s.minX,s.minY,s.maxX,s.maxY))for(const a of e)this.addObstacleRootId({rootIdsByCell:this.obstacleTraceRootIdsFlat,cellIndex:a*this.planeSize+r,obstacleRootId:t.obstacleRootId});DW(n.x,n.y,i,s.minX,s.minY,s.maxX,s.maxY)\u0026\u0026this.addObstacleRootId({rootIdsByCell:this.obstacleViaRootIdsByCell,cellIndex:r,obstacleRootId:t.obstacleRootId})}),null}forEachCellNearSegment(t,e){const n={x:(t.segmentStart.x+t.segmentEnd.x)/2,y:(t.segmentStart.y+t.segmentEnd.y)/2},o=Math.hypot(t.segmentEnd.x-t.segmentStart.x,t.segmentEnd.y-t.segmentStart.y)/2+t.radius;this.forEachCellNearCircle(n.x,n.y,o,i=\u003e{c6t({segmentStart:t.segmentStart,segmentEnd:t.segmentEnd,radius:t.radius,rect:this.getCellRect(i)})\u0026\u0026e(i)})}getCellRect(t){return{minX:this.cellMinX[t],minY:this.cellMinY[t],maxX:this.cellMaxX[t],maxY:this.cellMaxY[t]}}transformBoundsPointToGrid(t){const e=this.gridToBoundsTransform;return{x:(t.x-e.c)/e.a,y:(t.y-e.f)/e.e}}getConservativeGridRadius(t){return t/Math.min(Math.abs(this.gridToBoundsTransform.a),Math.abs(this.gridToBoundsTransform.e))}addObstacleRootId(t){let e=t.rootIdsByCell[t.cellIndex];e||(e=[],t.rootIdsByCell[t.cellIndex]=e),CH(e,t.obstacleRootId)}isBlockedByObstacleRoots(t,e){if(!t)return!1;const n=this.connIdToRootNet[e];for(const o of t)if(this.obstacleRootNames[o]!==n)return!0;return!1}hasSameRootObstacle(t,e){if(!t)return!1;const n=this.connIdToRootNet[e];return t.some(o=\u003ethis.obstacleRootNames[o]===n)}isLateralMoveBlockedByObstacleGeometry(t){const e=this.connIdToRootNet[t.activeConn],n=this.activeConnSeg,o=n\u0026\u0026t.layer===n.startZ\u0026\u0026t.fromCellId===n.startCellId?n.startPoint:Fv(this.gridToBoundsTransform,{x:this.cellCenterX[t.fromCellId],y:this.cellCenterY[t.fromCellId]}),i=n\u0026\u0026t.layer===n.endZ\u0026\u0026t.toCellId===n.endCellId?n.endPoint:Fv(this.gridToBoundsTransform,{x:this.cellCenterX[t.toCellId],y:this.cellCenterY[t.toCellId]});for(const r of this.obstacleTracePrimitives){if(r.layer!==t.layer||this.obstacleRootNames[r.rootId]===e)continue;const s=r.traceRadius+this.traceThickness/2+this.obstacleClearanceMargin;if(Ygo({firstStart:o,firstEnd:i,secondStart:r.segmentStart,secondEnd:r.segmentEnd})\u003cs*s)return!0}for(const r of this.obstacleViaPrimitives){if(!r.layers.includes(t.layer)||this.obstacleRootNames[r.rootId]===e)continue;const s=r.viaRadius+this.traceThickness/2+this.obstacleClearanceMargin;if(PN({point:r.center,segmentStart:o,segmentEnd:i})\u003cs*s)return!0}for(const r of this.obstacleRectPrimitives)if(r.layers.includes(t.layer)\u0026\u0026this.obstacleRootNames[r.rootId]!==e\u0026\u0026c6t({segmentStart:rQe(o,r),segmentEnd:rQe(i,r),radius:this.traceThickness/2+this.obstacleClearanceMargin,rect:s6t(r)}))return!0;return!1}isViaMoveBlockedByObstacleGeometry(t){const e=this.connIdToRootNet[t.activeConn],n=Fv(this.gridToBoundsTransform,{x:this.cellCenterX[t.cellId],y:this.cellCenterY[t.cellId]});for(const o of this.obstacleTracePrimitives){if(this.obstacleRootNames[o.rootId]===e)continue;const i=o.traceRadius+this.viaDiameter/2+this.obstacleClearanceMargin;if(PN({point:n,segmentStart:o.segmentStart,segmentEnd:o.segmentEnd})\u003ci*i)return!0}for(const o of this.obstacleViaPrimitives){if(this.obstacleRootNames[o.rootId]===e)continue;const i=o.viaRadius+this.viaDiameter/2+this.obstacleClearanceMargin;if((n.x-o.center.x)**2+(n.y-o.center.y)**2\u003ci*i)return!0}for(const o of this.obstacleRectPrimitives){if(this.obstacleRootNames[o.rootId]===e)continue;const i=rQe(n,o),r=this.viaDiameter/2+this.obstacleClearanceMargin;if(NW({point:i,rect:s6t(o)})\u003cr*r)return!0}return!1}buildFiveRegionGrid(t,e){this.fineCols=Math.max(1,Math.ceil(t/this.highResolutionCellSize)),this.fineRows=Math.max(1,Math.ceil(e/this.highResolutionCellSize)),this.bandCols=Math.min(this.highResolutionCellThickness,Math.floor(this.fineCols/2)),this.bandRows=Math.min(this.highResolutionCellThickness,Math.floor(this.fineRows/2));const n=Math.max(0,this.fineCols-2*this.bandCols),o=Math.max(0,this.fineRows-2*this.bandRows),i=n,r=n;this.regions=[{id:0,name:\"left\",fineOriginRow:0,fineOriginCol:0,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:1,name:\"top\",fineOriginRow:0,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:i,cellScale:1,rows:this.bandRows,cols:i,offset:0},{id:2,name:\"right\",fineOriginRow:0,fineOriginCol:this.fineCols-this.bandCols,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:3,name:\"bottom\",fineOriginRow:this.fineRows-this.bandRows,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:r,cellScale:1,rows:this.bandRows,cols:r,offset:0},{id:4,name:\"middle\",fineOriginRow:this.bandRows,fineOriginCol:this.bandCols,fineRows:o,fineCols:n,cellScale:this.lowScale,rows:o\u003e0?Math.ceil(o/this.lowScale):0,cols:n\u003e0?Math.ceil(n/this.lowScale):0,offset:0}];let s=0;for(let C=0;C\u003cthis.regions.length;C++)this.regions[C].offset=s,s+=this.regions[C].rows*this.regions[C].cols;this.planeSize=s,this.cellCenterX=new Float64Array(this.planeSize),this.cellCenterY=new Float64Array(this.planeSize),this.cellMinX=new Float64Array(this.planeSize),this.cellMinY=new Float64Array(this.planeSize),this.cellMaxX=new Float64Array(this.planeSize),this.cellMaxY=new Float64Array(this.planeSize),this.cellWidth=new Float64Array(this.planeSize),this.cellHeight=new Float64Array(this.planeSize),this.cellRegion=new Uint8Array(this.planeSize),this.cellRow=new Int32Array(this.planeSize),this.cellCol=new Int32Array(this.planeSize),this.viaAllowed=new Uint8Array(this.planeSize);for(let C=0;C\u003cthis.regions.length;C++){const y=this.regions[C];for(let x=0;x\u003cy.rows;x++){const E=y.fineOriginRow+x*y.cellScale,B=Math.min(y.fineOriginRow+y.fineRows,E+y.cellScale),S=this.boundsMinY+E*this.highResolutionCellSize,Q=Math.min(this.boundsMaxY,this.boundsMinY+B*this.highResolutionCellSize);for(let w=0;w\u003cy.cols;w++){const M=y.fineOriginCol+w*y.cellScale,k=Math.min(y.fineOriginCol+y.fineCols,M+y.cellScale),R=this.boundsMinX+M*this.highResolutionCellSize,F=Math.min(this.boundsMaxX,this.boundsMinX+k*this.highResolutionCellSize),O=this.cellIdFor(y.id,x,w);this.cellCenterX[O]=(R+F)/2,this.cellCenterY[O]=(S+Q)/2,this.cellMinX[O]=R,this.cellMinY[O]=S,this.cellMaxX[O]=F,this.cellMaxY[O]=Q,this.cellWidth[O]=F-R,this.cellHeight[O]=Q-S,this.cellRegion[O]=y.id,this.cellRow[O]=x,this.cellCol[O]=w;const U=Math.min(this.cellCenterX[O]-this.boundsMinX,this.boundsMaxX-this.cellCenterX[O],this.cellCenterY[O]-this.boundsMinY,this.boundsMaxY-this.cellCenterY[O]);this.viaAllowed[O]=U\u003e=this.viaMinDistFromBorder?1:0}}}const a=Array.from({length:this.planeSize},()=\u003e[]),A=(C,y)=\u003e{if(C===y||C\u003c0||y\u003c0)return;const x=this.cellCenterX[C]-this.cellCenterX[y],E=this.cellCenterY[C]-this.cellCenterY[y],B=Math.hypot(x,E);a6t(a[C],{cellId:y,cost:B}),a6t(a[y],{cellId:C,cost:B})};for(let C=0;C\u003cthis.regions.length;C++){const y=this.regions[C];for(let x=0;x\u003cy.rows;x++)for(let E=0;E\u003cy.cols;E++){const B=this.cellIdFor(y.id,x,E);x+1\u003cy.rows\u0026\u0026A(B,this.cellIdFor(y.id,x+1,E)),E+1\u003cy.cols\u0026\u0026A(B,this.cellIdFor(y.id,x,E+1))}}const c=this.regions[0],l=this.regions[1],u=this.regions[2],g=this.regions[3],h=this.regions[4],d=c.rows\u003e0\u0026\u0026c.cols\u003e0,p=l.rows\u003e0\u0026\u0026l.cols\u003e0,m=u.rows\u003e0\u0026\u0026u.cols\u003e0,_=g.rows\u003e0\u0026\u0026g.cols\u003e0,f=h.rows\u003e0\u0026\u0026h.cols\u003e0;if(d\u0026\u0026p)for(let C=0;C\u003cthis.bandRows;C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(1,C,0));if(p\u0026\u0026m)for(let C=0;C\u003cthis.bandRows;C++)A(this.cellIdFor(1,C,l.cols-1),this.cellIdFor(2,C,0));if(d\u0026\u0026_)for(let C=this.fineRows-this.bandRows;C\u003cthis.fineRows;C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(3,C-(this.fineRows-this.bandRows),0));if(_\u0026\u0026m)for(let C=this.fineRows-this.bandRows;C\u003cthis.fineRows;C++)A(this.cellIdFor(3,C-(this.fineRows-this.bandRows),g.cols-1),this.cellIdFor(2,C,0));if(d\u0026\u0026f)for(let C=this.bandRows;C\u003cthis.fineRows-this.bandRows;C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(4,Math.floor((C-this.bandRows)/this.lowScale),0));if(m\u0026\u0026f)for(let C=this.bandRows;C\u003cthis.fineRows-this.bandRows;C++)A(this.cellIdFor(4,Math.floor((C-this.bandRows)/this.lowScale),h.cols-1),this.cellIdFor(2,C,0));if(p\u0026\u0026f)for(let C=this.bandCols;C\u003cthis.fineCols-this.bandCols;C++)A(this.cellIdFor(1,l.rows-1,C-this.bandCols),this.cellIdFor(4,0,Math.floor((C-this.bandCols)/this.lowScale)));if(_\u0026\u0026f)for(let C=this.bandCols;C\u003cthis.fineCols-this.bandCols;C++)A(this.cellIdFor(4,h.rows-1,Math.floor((C-this.bandCols)/this.lowScale)),this.cellIdFor(3,0,C-this.bandCols));if(!f\u0026\u0026!p\u0026\u0026!_\u0026\u0026d\u0026\u0026m)for(let C=0;C\u003cMath.min(c.rows,u.rows);C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(2,C,0));if(!f\u0026\u0026!d\u0026\u0026!m\u0026\u0026p\u0026\u0026_)for(let C=0;C\u003cMath.min(l.cols,g.cols);C++)A(this.cellIdFor(1,l.rows-1,C),this.cellIdFor(3,0,C));const I=this.flattenNeighborLists(a);this.neighborOffset=I.offset,this.neighborIds=I.ids,this.neighborCosts=I.costs}cellIdFor(t,e,n){const o=this.regions[t];return o.offset+e*o.cols+n}stepOnce(){if(!this.activeConnSeg){if(this.unsolvedSegs.length===0)return void(this.solved=!0);const f=this.unsolvedSegs.shift();this.activeConnSeg=f,this.activeConnId=f.connId,this.nodePool.clear(),this.ripChain.clear(),this.heap.clear(),this.seqCounter=0,this.searchIterations=0,this.nextStamp();const I=this.computeH(f.startZ,f.startCellId,f.endZ,f.endCellId)*this.hyperParameters.greedyMultiplier,C=this.nodePool.push(f.startZ,f.startCellId,0,-1,-1,0),y=f.startZ*this.planeSize+f.startCellId,x=this.getSearchStateIdx(y,0);return this.bestGStamp[x]=this.stamp,this.bestGValue[x]=0,void this.heap.push(I,this.seqCounter++,C)}this.searchIterations++;const t=this.ripCount[this.activeConnId]??0,e=Math.round(this.baseSearchBudgetIters*(1+.25*Math.min(t,10)));if(this.searchIterations\u003ee){const f=this.penalty2d;for(let I=0;I\u003cf.length;I++)f[I]=.9*f[I];return this.unsolvedSegs.push(this.activeConnSeg),this.activeConnSeg=null,this.activeConnId=-1,this.heap.clear(),this.nodePool.clear(),this.consecutiveSkips++,void(this.consecutiveSkips\u003e=Math.max(3,3*this.unsolvedSegs.length)\u0026\u0026(this.error=`Convergence failure: ${this.unsolvedSegs.length} connections stuck`,this.failed=!0))}if(this.heap.size===0)return this.error=`No path found for ${this.connIdToName[this.activeConnId]}`,void(this.failed=!0);const n=this.heap.pop(),o=this.nodePool.z[n],i=this.nodePool.cellId[n],r=this.nodePool.g[n],s=this.nodePool.ripHead[n],a=this.nodePool.ripCount[n],A=o*this.planeSize+i,c=this.getSearchStateIdx(A,a);if(this.visitedStamp[c]===this.stamp)return;this.visitedStamp[c]=this.stamp,this.visitedFlatStamp[A]=this.stamp;const l=this.activeConnSeg;if(o===l.endZ\u0026\u0026i===l.endCellId)return this.finalizeRoute(n),this.activeConnSeg=null,void(this.activeConnId=-1);const u=this.visitedStamp,g=this.stamp,h=this.activeConnId,d=l.endZ,p=l.endCellId,m=this.neighborOffset[i],_=this.neighborOffset[i+1];for(let f=m;f\u003c_;f++){const I=this.neighborIds[f],C=o*this.planeSize+I;if(this.computeMoveCostAndRips(h,o,i,I,!1,s,a,this.neighborCosts[f]),this._moveCost\u003c0)continue;const y=this.getSearchStateIdx(C,this._moveRipCount);if(u[y]===g)continue;const x=r+this._moveCost;if(this.bestGStamp[y]===g\u0026\u0026x\u003e=this.bestGValue[y])continue;this.bestGStamp[y]=g,this.bestGValue[y]=x;const E=x+this.computeH(o,I,d,p)*this.hyperParameters.greedyMultiplier,B=this.nodePool.push(o,I,x,n,this._moveRippedHead,this._moveRipCount);this.heap.push(E,this.seqCounter++,B)}if(this.viaAllowed[i])for(let f=0;f\u003cthis.layers;f++){if(f===o)continue;const I=f*this.planeSize+i;if(this.computeMoveCostAndRips(h,f,i,i,!0,s,a,0),this._moveCost\u003c0)continue;const C=this.getSearchStateIdx(I,this._moveRipCount);if(u[C]===g)continue;const y=r+this._moveCost;if(this.bestGStamp[C]===g\u0026\u0026y\u003e=this.bestGValue[C])continue;this.bestGStamp[C]=g,this.bestGValue[C]=y;const x=y+this.computeH(f,i,d,p)*this.hyperParameters.greedyMultiplier,E=this.nodePool.push(f,i,y,n,this._moveRippedHead,this._moveRipCount);this.heap.push(x,this.seqCounter++,E)}}computeMoveCostAndRips(t,e,n,o,i,r,s,a){let A=0,c=r,l=s;const u=e*this.planeSize+o,g=i?this.obstacleViaRootIdsByCell[o]:[...this.obstacleTraceRootIdsFlat[e*this.planeSize+n]??[],...this.obstacleTraceRootIdsFlat[u]??[]];if(this.isBlockedByObstacleRoots(g,t)\u0026\u0026(i?this.isViaMoveBlockedByObstacleGeometry({activeConn:t,cellId:o}):this.isLateralMoveBlockedByObstacleGeometry({activeConn:t,layer:e,fromCellId:n,toCellId:o})))return this._moveCost=-1,this._moveRippedHead=c,void(this._moveRipCount=l);const h=this.hasSameRootObstacle(g,t);if(i){A+=this.hyperParameters.viaBaseCost,A+=Math.min(this.penalty2d[o],this.penaltyCap);const d=this.portOwnerFlat[u],p=this.allowSharedUse(t,d),m=this.activeConnSeg,_=!!m\u0026\u0026e===m.endZ\u0026\u0026o===m.endCellId;if(d\u003e=0\u0026\u0026d!==t\u0026\u0026!p\u0026\u0026!_)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillViaOccupants(o,t);const f=this._viaOccs;for(let I=0;I\u003cf.length;I++){const C=f[I];this.ripChain.contains(c,C)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,C),l++),A+=this.hyperParameters.ripViaPenalty}}else{A+=a,A+=Math.min(this.penalty2d[o],this.penaltyCap);const d=this.portOwnerFlat[u],p=this.allowSharedUse(t,d),m=this.activeConnSeg,_=!!m\u0026\u0026e===m.endZ\u0026\u0026o===m.endCellId;if(d\u003e=0\u0026\u0026d!==t\u0026\u0026!p\u0026\u0026!_)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillTraceOccupants(u,t,this._cellOccs);for(let f=0;f\u003cthis._cellOccs.length;f++){const I=this._cellOccs[f];this.ripChain.contains(c,I)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,I),l++),A+=this.hyperParameters.ripTracePenalty}}h\u0026\u0026(A*=this.hyperParameters.sameRootObstacleCostMultiplier),this._moveCost=A,this._moveRippedHead=c,this._moveRipCount=l}fillViaOccupants(t,e){const n=this._viaOccs;n.length=0;const o=this.cellCenterX[t],i=this.cellCenterY[t];this.forEachCellNearCircle(o,i,this.viaKeepoutRadius,r=\u003e{if(DW(o,i,this.viaKeepoutRadius,this.cellMinX[r],this.cellMinY[r],this.cellMaxX[r],this.cellMaxY[r]))for(let s=0;s\u003cthis.layers;s++)this.pushFlatOccupants(s*this.planeSize+r,e,n)})}fillTraceOccupants(t,e,n){n.length=0,this.pushFlatOccupants(t,e,n)}pushFlatOccupants(t,e,n){const o=this.usedCellsFlat[t];o===-1||o===e||this.allowSharedUse(e,o)||CH(n,o);const i=this.sharedCellsFlat[t];if(i)for(let r=0;r\u003ci.length;r++){const s=i[r];s!==e\u0026\u0026(this.allowSharedUse(e,s)||CH(n,s))}}addSharedOccupant(t,e){if(this.usedCellsFlat[t]===e)return;let n=this.sharedCellsFlat[t];n||(n=[],this.sharedCellsFlat[t]=n),CH(n,e)}replaceOccupants(t,e){this.usedCellsFlat[t]=e,this.sharedCellsFlat[t]=void 0}removeOccupant(t,e){const n=this.sharedCellsFlat[t];if(this.usedCellsFlat[t]===e)return void(n\u0026\u0026n.length\u003e0?(this.usedCellsFlat[t]=n.pop(),n.length===0\u0026\u0026(this.sharedCellsFlat[t]=void 0)):this.usedCellsFlat[t]=-1);if(!n)return;const o=n.indexOf(e);o!==-1\u0026\u0026(n.splice(o,1),n.length===0\u0026\u0026(this.sharedCellsFlat[t]=void 0))}allowSharedUse(t,e){return e\u003c0?!1:this.connIdToRootNet[e]===this.connIdToRootNet[t]}shouldSkipFixedPortHalo(t,e){const n=this.portOwnerFlat[t];return n!==e\u0026\u0026(n===-2||!(n\u003c0)\u0026\u0026!this.allowSharedUse(e,n))}nextStamp(){this.stamp=this.stamp+1\u003e\u003e\u003e0,this.stamp===0\u0026\u0026(this.visitedStamp.fill(0),this.bestGStamp.fill(0),this.visitedFlatStamp.fill(0),this.stamp=1)}getSearchStateIdx(t,e){return t}computeH(t,e,n,o){const i=Math.hypot(this.cellCenterX[e]-this.cellCenterX[o],this.cellCenterY[e]-this.cellCenterY[o]);return t===n?i:i+this.hyperParameters.viaBaseCost}internConn(t,e){const n=this.connNameToId.get(t);if(n!==void 0)return n;const o=this.connIdToName.length;return this.connIdToName.push(t),this.connIdToRootNet.push(iQe(t,e)),this.connNameToId.set(t,o),o}buildConnectionSegs(){const t=new Map;for(const o of this.nodeWithPortPoints.portPoints){const i=o.connectionName;t.has(i)||t.set(i,{points:[],rootConnectionName:o.rootConnectionName}),t.get(i).points.push(o)}const e=[],n=new Map;for(const[o,i]of t){const r=i.points,s=Lgo(r);if(s.length===0)continue;const a=this.internConn(o,i.rootConnectionName);for(const[A,c]of s){const l=this.pointToCell(A),u=this.pointToCell(c),g=`${l.z}:${l.cellId}`,h=`${u.z}:${u.cellId}`,d=g\u003ch?`${g}|${h}`:`${h}|${g}`,p=this.connIdToRootNet[a],m=`${p}|${d}`,_=n.get(m);if(_){if(this.overlapFriendlyRootNets.add(p),!_.connectionAliases.some(I=\u003eI.connectionName===o)){const I=_.startZ===l.z\u0026\u0026_.startCellId===l.cellId\u0026\u0026_.endZ===u.z\u0026\u0026_.endCellId===u.cellId,C=_.startZ===u.z\u0026\u0026_.startCellId===u.cellId\u0026\u0026_.endZ===l.z\u0026\u0026_.endCellId===l.cellId;if(!I\u0026\u0026!C)throw new Error(`Connection alias ${o} does not match canonical segment ${m}`);_.connectionAliases.push({connectionName:o,rootConnectionName:p,startPoint:A,endPoint:c,reversedFromCanonical:!I\u0026\u0026C})}continue}const f={connId:a,startZ:l.z,startCellId:l.cellId,startPoint:A,endZ:u.z,endCellId:u.cellId,endPoint:c,connectionAliases:[{connectionName:o,rootConnectionName:p,startPoint:A,endPoint:c,reversedFromCanonical:!1}]};n.set(m,f),e.push(f)}}return e}pointToCell(t){const e=X3(Math.floor((t.x-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),n=X3(Math.floor((t.y-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);let o=4;e\u003cthis.bandCols?o=0:e\u003e=this.fineCols-this.bandCols?o=2:n\u003cthis.bandRows?o=1:n\u003e=this.fineRows-this.bandRows\u0026\u0026(o=3);const i=this.regions[o],r=n-i.fineOriginRow,s=e-i.fineOriginCol,a=X3(Math.floor(r/i.cellScale),0,Math.max(0,i.rows-1)),A=X3(Math.floor(s/i.cellScale),0,Math.max(0,i.cols-1));return{z:this.zToLayer.get(t.z)??0,cellId:this.cellIdFor(o,a,A)}}shuffleConnections(){const t=this.unsolvedSegs;let e=this.hyperParameters.shuffleSeed\u003e\u003e\u003e0;const n=()=\u003e(e=Math.imul(e,1664525)+1013904223\u003e\u003e\u003e0,e/4294967295);for(let o=t.length-1;o\u003e0;o--){const i=Math.floor(n()*(o+1)),r=t[o];t[o]=t[i],t[i]=r}}finalizeRoute(t){this.consecutiveSkips=Math.max(0,this.consecutiveSkips-1);const e=[];let n=t;for(;n\u003e=0;){const c=this.nodePool.z[n],l=this.nodePool.cellId[n];e.push(c*this.planeSize+l),n=this.nodePool.parent[n]}for(e.reverse();e.length\u003e1\u0026\u0026this.sharedCrossRootPortFlat[e[0]];)e.shift();for(;e.length\u003e1\u0026\u0026this.sharedCrossRootPortFlat[e[e.length-1]];)e.pop();const o=this.extractViaCellIds(e),i=this.activeConnId;this.ripChain.collect(this.nodePool.ripHead[t],this._rippedIds);for(let c=0;c\u003cthis._rippedIds.length;c++)if(this.ripTrace(this._rippedIds[c]),this.failed)return;const r=[];for(let c=0;c\u003ce.length;c++){const l=e[c],u=Math.floor(l/this.planeSize),g=l-u*this.planeSize;this.markTraceFootprint(i,u,g,r)}const s=[];for(let c=0;c\u003co.length;c++)this.markViaFootprint(i,o[c],r,s);for(;this.usedIndicesByConn.length\u003c=i;)this.usedIndicesByConn.push(void 0);const a=this.usedIndicesByConn[i]??[];for(a.push(...r),this.usedIndicesByConn[i]=a;this.solvedRoutes.length\u003c=i;)this.solvedRoutes.push(void 0);const A=this.solvedRoutes[i]??[];A.push({connId:i,states:Int32Array.from(e),viaCellIds:Int32Array.from(o),startPoint:this.activeConnSeg.startPoint,endPoint:this.activeConnSeg.endPoint,connectionAliases:this.activeConnSeg.connectionAliases}),this.solvedRoutes[i]=A;for(let c=0;c\u003cs.length;c++)if(this.ripTrace(s[c]),this.failed)return;if(this._rippedIds.length\u003e0||s.length\u003e0){const c=this.penalty2d,l=this.penaltyCap;if(this.totalRipEvents\u003e50)for(let u=0;u\u003cc.length;u++)c[u]=.99*c[u];else for(let u=0;u\u003cc.length;u++)c[u]\u003el\u0026\u0026(c[u]=.5*c[u])}}extractViaCellIds(t){const e=[];for(let n=1;n\u003ct.length;n++){const o=t[n-1],i=t[n],r=Math.floor(o/this.planeSize),s=Math.floor(i/this.planeSize);r!==s\u0026\u0026e.push(i-s*this.planeSize)}return e}markTraceFootprint(t,e,n,o){const i=this.cellCenterX[n],r=this.cellCenterY[n];this.forEachCellNearCircle(i,r,this.traceKeepoutRadius,s=\u003e{if(!DW(i,r,this.traceKeepoutRadius,this.cellMinX[s],this.cellMinY[s],this.cellMaxX[s],this.cellMaxY[s]))return;const a=e*this.planeSize+s;if(s!==n\u0026\u0026this.shouldSkipFixedPortHalo(a,t))return;const A=this.usedCellsFlat[a],c=this.allowSharedUse(t,A);(A===-1||A===t||c)\u0026\u0026(A!==-1\u0026\u0026A!==t?this.addSharedOccupant(a,t):this.usedCellsFlat[a]=t,o.push(a))})}markViaFootprint(t,e,n,o){const i=this.cellCenterX[e],r=this.cellCenterY[e];this.forEachCellNearCircle(i,r,this.viaKeepoutRadius,s=\u003e{if(DW(i,r,this.viaKeepoutRadius,this.cellMinX[s],this.cellMinY[s],this.cellMaxX[s],this.cellMaxY[s]))for(let a=0;a\u003cthis.layers;a++){const A=a*this.planeSize+s;if(s!==e\u0026\u0026this.shouldSkipFixedPortHalo(A,t))continue;if(this.fillTraceOccupants(A,t,this._cellOccs),this._cellOccs.length\u003e0){for(let l=0;l\u003cthis._cellOccs.length;l++)CH(o,this._cellOccs[l]);this.replaceOccupants(A,t),n.push(A);continue}const c=this.usedCellsFlat[A];c!==-1\u0026\u0026c!==t?this.addSharedOccupant(A,t):this.usedCellsFlat[A]=t,n.push(A)}})}forEachCellNearCircle(t,e,n,o){const i=X3(Math.floor((t-n-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),r=X3(Math.floor((t+n-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),s=X3(Math.floor((e-n-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1),a=X3(Math.floor((e+n-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);for(let A=0;A\u003cthis.regions.length;A++){const c=this.regions[A];if(c.rows===0||c.cols===0)continue;const l=Math.max(s,c.fineOriginRow),u=Math.min(a,c.fineOriginRow+c.fineRows-1),g=Math.max(i,c.fineOriginCol),h=Math.min(r,c.fineOriginCol+c.fineCols-1);if(l\u003eu||g\u003eh)continue;const d=Math.floor((l-c.fineOriginRow)/c.cellScale),p=Math.floor((u-c.fineOriginRow)/c.cellScale),m=Math.floor((g-c.fineOriginCol)/c.cellScale),_=Math.floor((h-c.fineOriginCol)/c.cellScale);for(let f=d;f\u003c=p;f++)for(let I=m;I\u003c=_;I++)o(this.cellIdFor(c.id,f,I))}}ripTrace(t){for(;this.ripCount.length\u003c=t;)this.ripCount.push(0);if(this.ripCount[t]++,this.totalRipEvents++,this.totalRipEvents\u003e=this.MAX_RIPS)return this.error=`Convergence failure: exceeded MAX_RIPS ${this.MAX_RIPS}`,void(this.failed=!0);const e=this.getSolvedRoutesForConn(t);if(e.length\u003e0)for(const o of e){for(let i=0;i\u003co.states.length;i++){const r=o.states[i]%this.planeSize;this.penalty2d[r]=this.penalty2d[r]+this.hyperParameters.ripTracePenalty}for(let i=0;i\u003co.viaCellIds.length;i++){const r=o.viaCellIds[i];this.penalty2d[r]=this.penalty2d[r]+this.hyperParameters.ripViaPenalty}}const n=this.usedIndicesByConn[t];if(n){for(let o=0;o\u003cn.length;o++)this.removeOccupant(n[o],t);this.usedIndicesByConn[t]=void 0}if(e.length\u003e0){this.solvedRoutes[t]=void 0;for(const o of e){const i=o.states[0],r=o.states[o.states.length-1],s=Math.floor(i/this.planeSize),a=Math.floor(r/this.planeSize);this.unsolvedSegs.push({connId:t,startZ:s,startCellId:i-s*this.planeSize,startPoint:o.startPoint,endZ:a,endCellId:r-a*this.planeSize,endPoint:o.endPoint,connectionAliases:o.connectionAliases})}}}flattenNeighborLists(t){const e=new Int32Array(t.length+1);let n=0;for(let s=0;s\u003ct.length;s++)e[s]=n,n+=t[s].length;e[t.length]=n;const o=new Int32Array(n),i=new Float32Array(n);let r=0;for(let s=0;s\u003ct.length;s++){const a=t[s];for(let A=0;A\u003ca.length;A++){const c=a[A];o[r]=c.cellId,i[r]=c.cost,r++}}return{offset:e,ids:o,costs:i}}visualize(){const t=[\"red\",\"blue\",\"orange\",\"green\"],e=this.gridToBoundsTransform,n=[],o=[],i=[],r=[];r.push({center:{x:this.nodeWithPortPoints.center.x,y:this.nodeWithPortPoints.center.y},width:this.nodeWithPortPoints.width,height:this.nodeWithPortPoints.height,stroke:\"gray\"});const s=({route:A,connectionName:c,strokeWidth:l,strokeDash:u,labelPrefix:g})=\u003e{if(A.length\u003c2)return;let h=0;for(let p=1;p\u003cA.length;p+=1){const m=A[p-1];A[p].z!==m.z\u0026\u0026(p-h\u003e=2\u0026\u0026o.push({points:A.slice(h,p).map(_=\u003e({x:_.x,y:_.y})),strokeColor:t[m.z]??\"rgba(128,128,128,0.75)\",strokeWidth:l,strokeDash:u,label:`${g} ${c} z=${m.z}`}),h=p)}if(A.length-h\u003c2)return;const d=A[h].z;o.push({points:A.slice(h).map(p=\u003e({x:p.x,y:p.y})),strokeColor:t[d]??\"rgba(128,128,128,0.75)\",strokeWidth:l,strokeDash:u,label:`${g} ${c} z=${d}`})};for(const A of this.obstacles)if(A.type!==\"rect\"){s({route:A.route,connectionName:A.connectionName,strokeWidth:A.traceThickness,strokeDash:[.12,.08],labelPrefix:\"fixed obstacle\"});for(const c of A.vias)i.push({center:{x:c.x,y:c.y},radius:A.viaDiameter/2,fill:\"rgba(128,0,128,0.25)\",stroke:\"purple\",label:`fixed obstacle ${A.connectionName} via`})}else r.push({center:A.center,width:A.width,height:A.height,fill:\"rgba(128,0,128,0.12)\",stroke:\"purple\",label:`fixed obstacle ${A.connectionName}`});if(this.showPenaltyMap\u0026\u0026this.penalty2d){let A=0;for(let c=0;c\u003cthis.penalty2d.length;c++)this.penalty2d[c]\u003eA\u0026\u0026(A=this.penalty2d[c]);if(A\u003e0)for(let c=0;c\u003cthis.planeSize;c++){const l=this.penalty2d[c];if(l\u003c=0)continue;const u=Fv(e,{x:this.cellCenterX[c],y:this.cellCenterY[c]}),g=Math.min(.6,l/A*.6);r.push({center:u,width:this.cellWidth[c]*e.a,height:this.cellHeight[c]*e.e,fill:`rgba(255,165,0,${g.toFixed(3)})`})}}if(this.showUsedCellMap\u0026\u0026this.usedCellsFlat)for(let A=0;A\u003cthis.layers;A++){const c=A*this.planeSize;for(let l=0;l\u003cthis.planeSize;l++){if(this.usedCellsFlat[c+l]===-1)continue;const u=Fv(e,{x:this.cellCenterX[l],y:this.cellCenterY[l]});r.push({center:u,width:this.cellWidth[l]*e.a,height:this.cellHeight[l]*e.e,fill:\"rgba(0,0,255,0.5)\"})}}for(const A of this.nodeWithPortPoints.portPoints)n.push({x:A.x,y:A.y,color:t[A.z]??\"gray\",label:A.connectionName});const a=this.getOutput();for(const A of a)s({route:A.route,connectionName:A.connectionName,strokeWidth:this.traceThickness,labelPrefix:\"B01 route\"});for(const A of a)for(const c of A.vias)i.push({center:{x:c.x,y:c.y},radius:this.viaDiameter/2,fill:\"rgba(0,0,0,0.3)\",stroke:\"black\",label:`B01 route ${A.connectionName} via`});if(this.activeConnSeg\u0026\u0026this.visitedFlatStamp){const A=this.stamp;for(let c=0;c\u003cthis.layers;c++){const l=c*this.planeSize;for(let u=0;u\u003cthis.planeSize;u++){if(this.visitedFlatStamp[l+u]!==A)continue;const g=Fv(e,{x:this.cellCenterX[u],y:this.cellCenterY[u]});n.push({x:g.x,y:g.y,color:\"rgba(0,0,255,0.2)\"})}}}return{points:n,lines:o,circles:i,rects:r,coordinateSystem:\"cartesian\",title:`HighDensityB01 [${this.getSolvedRouteCount()} solved, ${this.unsolvedSegs?.length??0} remaining]`}}getOutput(){const t=this.gridToBoundsTransform,e=[];for(let n=0;n\u003cthis.solvedRoutes.length;n++){const o=this.getSolvedRoutesForConn(n);if(o.length!==0)for(const i of o){const r=Array.from(i.states,a=\u003e{const A=Math.floor(a/this.planeSize),c=a-A*this.planeSize,l=Fv(t,{x:this.cellCenterX[c],y:this.cellCenterY[c]});return{x:l.x,y:l.y,z:this.layerToZ.get(A)??A}}),s=Array.from(i.viaCellIds,a=\u003eFv(t,{x:this.cellCenterX[a],y:this.cellCenterY[a]}));for(const a of i.connectionAliases){const A=(a.reversedFromCanonical?[...r].reverse():r).map(c=\u003e({...c}));A.length\u003e0\u0026\u0026(A[0]={...a.startPoint},A.length\u003e1\u0026\u0026(A[A.length-1]={...a.endPoint})),e.push({connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:A,vias:s.map(c=\u003e({...c}))})}}}return e}getSolvedRoutesForConn(t){const e=this.solvedRoutes[t];return e?Array.isArray(e)?e:[e]:[]}getSolvedRouteCount(){let t=0;for(let e=0;e\u003cthis.solvedRoutes.length;e++)t+=this.getSolvedRoutesForConn(e).length;return t}computeGridToBoundsTransform(){let t=1/0,e=-1/0,n=1/0,o=-1/0;for(let l=0;l\u003cthis.planeSize;l++){const u=this.cellCenterX[l],g=this.cellCenterY[l];u\u003ct\u0026\u0026(t=u),u\u003ee\u0026\u0026(e=u),g\u003cn\u0026\u0026(n=g),g\u003eo\u0026\u0026(o=g)}const i=e-t,r=o-n,s=this.boundsMaxX-this.boundsMinX,a=this.boundsMaxY-this.boundsMinY,A=i\u003e0?s/i:1,c=r\u003e0?a/r:1;return{a:A,b:0,c:i\u003e0?this.boundsMinX-A*t:(this.boundsMinX+this.boundsMaxX)/2-t,d:0,e:c,f:r\u003e0?this.boundsMinY-c*n:(this.boundsMinY+this.boundsMaxY)/2-n}}},l6t=new WeakMap,MN=t=\u003e{const e=l6t.get(t);if(e)return e;const n=[],o=[];for(let r=1;r\u003ct.route.length;r++){const s=t.route[r-1],a=t.route[r],A=Math.hypot(a.x-s.x,a.y-s.y),c=Math.max(s.traceThickness??t.traceThickness,a.traceThickness??t.traceThickness);if(s.z!==a.z\u0026\u0026s.toNextSegmentType===\"through_obstacle\"){const l=Math.min(s.z,a.z),u=Math.max(s.z,a.z);if(A\u003c=1e-9){const g=t.vias.some(h=\u003eMath.hypot(h.x-a.x,h.y-a.y)\u003c=1e-9);o.push({center:{x:a.x,y:a.y},minZ:l,maxZ:u,diameter:g?t.viaDiameter:c});continue}for(let g=l;g\u003c=u;g++)n.push({start:{...s,z:g},end:{...a,z:g},z:g,width:c});continue}A\u003e1e-9\u0026\u0026n.push({start:s,end:s.z===a.z?a:{...a,z:s.z},z:s.z,width:c}),s.z!==a.z\u0026\u0026o.push({center:{x:a.x,y:a.y},minZ:Math.min(s.z,a.z),maxZ:Math.max(s.z,a.z),diameter:t.viaDiameter})}const i={wireSegments:n,viaSpans:o};return l6t.set(t,i),i},u6t=(t,e,n)=\u003e{const o=t.end.x-t.start.x,i=t.end.y-t.start.y,r=Math.hypot(o,i),s={x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2};return Math.abs(o)\u003c=1e-9||Math.abs(i)\u003c=1e-9?[{center:s,width:Math.abs(o)\u003eMath.abs(i)?r:t.width,height:Math.abs(o)\u003eMath.abs(i)?t.width:r}]:XBt({center:s,width:r,height:t.width,rotation:180*Math.atan2(i,o)/Math.PI},Math.max(n,Math.ceil(r/e)))},g6t=({fixedObstacleRoutes:t,layerCount:e})=\u003et.flatMap((n,o)=\u003e{const i=[n.connectionName,n.rootConnectionName].filter(s=\u003etypeof s==\"string\"),r=MN(n);return[...r.wireSegments.flatMap((s,a)=\u003eu6t(s,.75,2).map((A,c)=\u003e({obstacleId:`pipeline9_fixed_obstacle_${o}_wire_${a}_${c}`,type:\"rect\",layers:[Kh(s.z,e)],center:A.center,width:A.width,height:A.height,connectedTo:i}))),...r.viaSpans.map((s,a)=\u003e({obstacleId:`pipeline9_fixed_obstacle_${o}_via_${a}`,type:\"rect\",layers:Array.from({length:s.maxZ-s.minZ+1},(A,c)=\u003eKh(s.minZ+c,e)),center:s.center,width:s.diameter,height:s.diameter,connectedTo:i}))]}),d6t=(t,e,n)=\u003e{const o=[t.connectionName,t.rootConnectionName].filter(r=\u003etypeof r==\"string\"),i=[e.connectionName,e.rootConnectionName].filter(r=\u003etypeof r==\"string\");return o.some(r=\u003ei.some(s=\u003er===s||n.areIdsConnected(r,s)))},h6t=(t,e)=\u003et.minX\u003c=e.maxX\u0026\u0026t.maxX\u003e=e.minX\u0026\u0026t.minY\u003c=e.maxY\u0026\u0026t.maxY\u003e=e.minY,p6t=({left:t,right:e,clearance:n,leftBounds:o})=\u003e{const i=MN(t),r=MN(e),s=o?i.wireSegments.filter(A=\u003e((c,l)=\u003e{const u={minX:Math.min(c.start.x,c.end.x)-c.width/2,maxX:Math.max(c.start.x,c.end.x)+c.width/2,minY:Math.min(c.start.y,c.end.y)-c.width/2,maxY:Math.max(c.start.y,c.end.y)+c.width/2};return h6t(u,l)})(A,o)):i.wireSegments,a=o?i.viaSpans.filter(A=\u003e((c,l)=\u003e{const u={minX:c.center.x-c.diameter/2,maxX:c.center.x+c.diameter/2,minY:c.center.y-c.diameter/2,maxY:c.center.y+c.diameter/2};return h6t(u,l)})(A,o)):i.viaSpans;for(const A of s){for(const c of r.wireSegments){if(A.z!==c.z)continue;const l=A.width/2+c.width/2+n;if(qQ(A.start,A.end,c.start,c.end)\u003cl)return!0}for(const c of r.viaSpans){if(A.z\u003cc.minZ||A.z\u003ec.maxZ)continue;const l=A.width/2+c.diameter/2+n;if(qQ(A.start,A.end,c.center,c.center)\u003cl)return!0}}for(const A of a){for(const c of r.wireSegments){if(c.z\u003cA.minZ||c.z\u003eA.maxZ)continue;const l=A.diameter/2+c.width/2+n;if(qQ(A.center,A.center,c.start,c.end)\u003cl)return!0}for(const c of r.viaSpans){if(A.minZ\u003ec.maxZ||c.minZ\u003eA.maxZ)continue;const l=A.diameter/2+c.diameter/2+n;if(Math.hypot(A.center.x-c.center.x,A.center.y-c.center.y)\u003cl)return!0}}return!1},Kgo=({routes:t,movablePreloadedConnectionNames:e,boardObstacles:n,connMap:o,layerCount:i,viaToPadClearance:r})=\u003et.some(s=\u003ee.has(s.connectionName)?MN(s).viaSpans.some(a=\u003en.some(A=\u003eHse(A,s,o)?!1:!!((l,u)=\u003e(l.__zLayers??l.zLayers)||l.layers.map(h=\u003eKr(h,u)))(A,i).some(l=\u003el\u003e=a.minZ\u0026\u0026l\u003c=a.maxZ)\u0026\u0026((l,u)=\u003e{const g=-1*(u.ccwRotationDegrees??0)*Math.PI/180,h=l.x-u.center.x,d=l.y-u.center.y,p=h*Math.cos(g)-d*Math.sin(g),m=h*Math.sin(g)+d*Math.cos(g),_=Math.max(Math.abs(p)-u.width/2,0),f=Math.max(Math.abs(m)-u.height/2,0);return Math.hypot(_,f)})(a.center,A)\u003ca.diameter/2+r)):!1),m6t=class extends yr{params;highDensitySolver;forceImproveSolver;repairSolver;phase=\"route\";constructor(t){super(),this.params=t,this.stats={preloadedViaCandidateRejectionCount:0,forceImproveCandidateRejectionCount:0,repairCandidateRejectionCount:0},this.highDensitySolver=new HD({nodePortPoints:[t.nodeWithPortPoints],colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.traceWidth,obstacleMargin:t.obstacleMargin,effort:t.effort,nodePfById:t.nodePfById,obstacles:t.obstacles,layerCount:t.layerCount,useGrowShrinkHighDensityIntraNodeSolver:!0,preserveTerminalPcbPortIds:!1,growShrinkFallbackToInvalidGeometryOnFailure:!1,growShrinkSolutionValidator:t.boardObstacles\u0026\u0026t.movablePreloadedConnectionNames\u0026\u0026t.viaToPadClearance!==void 0?e=\u003ethis.validateCandidateRoutes(e):void 0}),this.activeSubSolver=this.highDensitySolver,this.MAX_ITERATIONS=1e8*t.effort}getSolverName(){return\"Pipeline9RegionalFallbackSolver\"}validateCandidateRoutes(t){const{boardObstacles:e,movablePreloadedConnectionNames:n,viaToPadClearance:o}=this.params;if(!e||!n||o===void 0)return!0;const i=Kgo({routes:t,movablePreloadedConnectionNames:n,boardObstacles:e,connMap:this.params.connMap,layerCount:this.params.layerCount,viaToPadClearance:o});return i\u0026\u0026(this.stats.preloadedViaCandidateRejectionCount=Number(this.stats.preloadedViaCandidateRejectionCount??0)+1),!i}_step(){if(this.phase===\"route\"){if(this.highDensitySolver.step(),this.highDensitySolver.failed)return this.error=this.highDensitySolver.error,void(this.failed=!0);if(!this.highDensitySolver.solved)return;const t=J7t(this.highDensitySolver.routes);return this.validateCandidateRoutes(t)?(this.forceImproveSolver=new mJ({nodeWithPortPoints:[this.params.nodeWithPortPoints],hdRoutes:t,colorMap:this.params.colorMap,totalStepsPerNode:Math.max(12,Math.round(20*this.params.effort)),nodeAssignmentMargin:this.params.obstacleMargin}),this.activeSubSolver=this.forceImproveSolver,void(this.phase=\"improve\")):(this.error=\"Pipeline9 regional route output failed its candidate validator\",void(this.failed=!0))}if(this.phase===\"improve\"){if(this.forceImproveSolver.step(),this.forceImproveSolver.failed)return this.error=this.forceImproveSolver.error,void(this.failed=!0);if(!this.forceImproveSolver.solved)return;const t=this.forceImproveSolver.getOutput();return this.validateCandidateRoutes(t)?(this.repairSolver=new pW({nodeWithPortPoints:[this.params.nodeWithPortPoints],hdRoutes:t,obstacles:this.params.obstacles,colorMap:this.params.colorMap,repairMargin:this.params.obstacleMargin,maxSampleEntries:80}),this.activeSubSolver=this.repairSolver,void(this.phase=\"repair\")):(this.stats.forceImproveCandidateRejectionCount=Number(this.stats.forceImproveCandidateRejectionCount??0)+1,this.error=\"Pipeline9 regional force-improve output failed its candidate validator\",void(this.failed=!0))}if(this.phase===\"repair\"){if(this.repairSolver.step(),this.repairSolver.failed)return this.error=this.repairSolver.error,void(this.failed=!0);if(!this.repairSolver.solved)return;const t=this.repairSolver.getOutput();return this.validateCandidateRoutes(t)?(this.activeSubSolver=null,this.phase=\"done\",void(this.solved=!0)):(this.stats.repairCandidateRejectionCount=Number(this.stats.repairCandidateRejectionCount??0)+1,this.error=\"Pipeline9 regional repair output failed its candidate validator\",void(this.failed=!0))}}getOutput(){return this.repairSolver?.getOutput()??this.forceImproveSolver?.getOutput()??this.highDensitySolver.routes}visualize(){return this.repairSolver?.visualize()??this.forceImproveSolver?.visualize()??this.highDensitySolver.visualize()}},_6t=(t,e)=\u003e({minX:t.center.x-t.width/2-e,maxX:t.center.x+t.width/2+e,minY:t.center.y-t.height/2-e,maxY:t.center.y+t.height/2+e}),Vgo=(t,e,n)=\u003e{const o=Math.max(n.minX-t.x,0,t.x-n.maxX),i=Math.max(n.minY-t.y,0,t.y-n.maxY);return o*o+i*i\u003c=e*e},zgo=(t,e,n,o)=\u003eMath.min(t.x,e.x)-n\u003c=o.maxX\u0026\u0026Math.max(t.x,e.x)+n\u003e=o.minX\u0026\u0026Math.min(t.y,e.y)-n\u003c=o.maxY\u0026\u0026Math.max(t.y,e.y)+n\u003e=o.minY,TW=(t,e)=\u003e{const n=o=\u003e({...o,rootConnectionName:e.getNetConnectedToId(o.rootConnectionName??o.connectionName)??o.rootConnectionName??o.connectionName});return{...t,portPoints:t.portPoints.map(n),portPointsInPairs:t.portPointsInPairs?.map(([o,i])=\u003e[n(o),n(i)])}},Jgo=({nodeWithPortPoints:t,connMap:e,colorMap:n,viaDiameter:o,traceWidth:i,obstacleMargin:r,effort:s,nodePfById:a,obstacles:A,layerCount:c})=\u003enew HD({nodePortPoints:[TW(t,e)],colorMap:n,connMap:e,viaDiameter:o,traceWidth:i,obstacleMargin:r,effort:s,nodePfById:a,obstacles:A,layerCount:c,useGrowShrinkHighDensityIntraNodeSolver:!0,preserveTerminalPcbPortIds:!1,growShrinkFallbackToInvalidGeometryOnFailure:!1,captureSearchDebug:!1}),sQe=class extends yr{fixedHdRoutes;connMap;colorMap;obstacles;layerCount;viaDiameter;traceWidth;obstacleMargin;viaToPadClearance;effort;nodePfById;preserveTerminalPcbPortIds;includeBoardObstacles;enableRegionalFallback;maxB01Rips;routes=[];failedSolvers=[];unsolvedNodePortPoints;fixedRouteReplacements=new Map;removedFixedRouteConnectionNames=new Set;preloadedTraceMutationMasks=new Map;activeRegularSolver=null;activeB01Solver=null;activeFallbackSolver=null;activeFallbackFixedRouteSections=new Map;activeFallbackFixedObstacleRoutes=[];activeFallbackPromotedFixedRouteConnectionNames=new Set;activeFallbackReason=null;activeNode=null;constructor(t){super(),this.fixedHdRoutes=t.fixedHdRoutes,this.connMap=t.connMap,this.colorMap=t.colorMap??{},this.obstacles=t.obstacles,this.layerCount=t.layerCount,this.viaDiameter=t.viaDiameter,this.traceWidth=t.traceWidth,this.obstacleMargin=t.obstacleMargin,this.viaToPadClearance=t.viaToPadClearance,this.effort=t.effort,this.nodePfById=t.nodePfById instanceof Map?new Map(t.nodePfById):new Map(Object.entries(t.nodePfById??{})),this.preserveTerminalPcbPortIds=t.preserveTerminalPcbPortIds??!1,this.includeBoardObstacles=t.includeBoardObstacles??!1,this.enableRegionalFallback=t.enableRegionalFallback??!0,this.maxB01Rips=t.maxB01Rips,this.unsolvedNodePortPoints=[...t.nodePortPoints],this.MAX_ITERATIONS=1e8*this.effort,this.stats={nodeCount:t.nodePortPoints.length,solvedNodeCount:0,fixedObstacleCount:t.fixedHdRoutes.length,fixedObstacleUses:0,boardObstacleUses:0,fallbackNodeCount:0,regularNodeCount:0,b01NodeCount:0,reroutedFixedRouteCount:0,reroutedFixedRouteSectionCount:0,promotedFallbackAttemptCount:0,promotedFixedRouteCount:0,regionalPreloadedViaCandidateRejectionCount:0,regionalForceImproveCandidateRejectionCount:0,regionalRepairCandidateRejectionCount:0}}getSolverName(){return\"Pipeline9HighDensitySolver\"}getUpdatedFixedHdRoutes(){return this.fixedHdRoutes.flatMap(t=\u003ethis.removedFixedRouteConnectionNames.has(t.connectionName)?[]:[this.fixedRouteReplacements.get(t.connectionName)??t])}finishActiveNode(t){const e=this.activeNode?((n,o)=\u003en.map(i=\u003e({...i,rootConnectionName:o.portPoints.find(r=\u003er.connectionName===i.connectionName)?.rootConnectionName??i.rootConnectionName})))(t,this.activeNode):t;this.routes.push(...this.preserveTerminalPcbPortIds\u0026\u0026this.activeNode?((n,o)=\u003e{const i=o.portPoints.filter(r=\u003er.pcb_port_id!==void 0);return n.map(r=\u003e{const s=r.route[0],a=r.route.at(-1),A=i.find(l=\u003es!==void 0\u0026\u0026l.connectionName===r.connectionName\u0026\u0026l.x===s.x\u0026\u0026l.y===s.y\u0026\u0026l.z===s.z),c=i.find(l=\u003ea!==void 0\u0026\u0026l.connectionName===r.connectionName\u0026\u0026l.x===a.x\u0026\u0026l.y===a.y\u0026\u0026l.z===a.z);return{...r,startPcbPortId:A?.pcb_port_id,endPcbPortId:c?.pcb_port_id}})})(e,this.activeNode):e),this.stats.solvedNodeCount=Number(this.stats.solvedNodeCount??0)+1,this.activeB01Solver=null,this.activeRegularSolver=null,this.activeFallbackSolver=null,this.activeFallbackFixedRouteSections.clear(),this.activeFallbackFixedObstacleRoutes=[],this.activeFallbackPromotedFixedRouteConnectionNames.clear(),this.activeFallbackReason=null,this.activeNode=null}startRegularSolver(t){this.activeNode=t,this.activeRegularSolver=Jgo({nodeWithPortPoints:t,colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:this.effort,nodePfById:this.nodePfById,obstacles:this.obstacles,layerCount:this.layerCount}),this.stats.regularNodeCount=Number(this.stats.regularNodeCount??0)+1}startRegionalFallback(t=new Set){if(!this.activeNode)throw new Error(\"Pipeline9 cannot start a regional fallback without an active node\");const e={...TW(this.activeNode,this.connMap),availableZ:Array.from({length:this.layerCount},(s,a)=\u003ea)},n=MW(e,this.getUpdatedFixedHdRoutes(),t),o=new Set([...n.fixedRouteSectionsByConnectionName.values()].flatMap(s=\u003es.sourceRoutes.map(a=\u003ea.connectionName)));for(const s of t)if(!o.has(s))throw new Error(`Pipeline9 could not promote fixed route \"${s}\" into the active regional fallback`);const i=[...t].filter(s=\u003e!this.activeFallbackPromotedFixedRouteConnectionNames.has(s)).length;this.activeFallbackFixedRouteSections=n.fixedRouteSectionsByConnectionName,this.activeFallbackFixedObstacleRoutes=n.fixedObstacleRoutes,this.activeFallbackPromotedFixedRouteConnectionNames=new Set(t);const r=g6t({fixedObstacleRoutes:this.activeFallbackFixedObstacleRoutes,layerCount:this.layerCount});this.activeFallbackSolver=new m6t({nodeWithPortPoints:n.nodeWithPortPoints,colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:this.effort,nodePfById:this.nodePfById,obstacles:[...this.obstacles,...r],boardObstacles:this.obstacles,movablePreloadedConnectionNames:o,viaToPadClearance:this.viaToPadClearance,layerCount:this.layerCount}),t.size===0?this.stats.fallbackNodeCount=Number(this.stats.fallbackNodeCount??0)+1:(this.stats.promotedFallbackAttemptCount=Number(this.stats.promotedFallbackAttemptCount??0)+1,this.stats.promotedFixedRouteCount=Number(this.stats.promotedFixedRouteCount??0)+i)}finishRegionalFallback(){if(!this.activeFallbackSolver)return;if(!this.activeNode)throw new Error(\"Pipeline9 cannot finish a regional fallback without an active node\");this.recordRegionalCandidateRejections();const t=[],e=new Map;for(const g of this.activeFallbackSolver.getOutput()){if(!this.activeFallbackFixedRouteSections.has(g.connectionName)){t.push(g);continue}const h=e.get(g.connectionName)??[];h.push(g),e.set(g.connectionName,h)}const n=[],o=[];for(const[g,h]of this.activeFallbackFixedRouteSections){const d=e.get(g)??[];if(d.length===0){o.push(h);continue}if(d.length\u003e1)return this.error=`Pipeline9 regional fallback expected one replacement for fixed route \"${g}\", got ${d.length}`,void(this.failed=!0);const p=q7t({section:h,replacement:d[0],sourceMutationMasks:this.preloadedTraceMutationMasks,replacementIsMutated:!0});n.push({connectionName:g,section:h,replacement:p.route,mutatedSegments:p.mutatedSegments,replacementProducedSegment:p.replacementProducedSegment})}const i=[...t,...n.map(({replacement:g})=\u003eg)],r=[...this.activeFallbackFixedObstacleRoutes,...o.flatMap(g=\u003eg.sourceRoutes)],s=_6t(this.activeNode,this.obstacleMargin+Math.max(this.traceWidth,this.viaDiameter)/2),a=new Map;for(const g of i)for(const h of r)d6t(g,h,this.connMap)||p6t({left:g,right:h,clearance:this.obstacleMargin,leftBounds:s})\u0026\u0026a.set(h.connectionName,h);if(a.size\u003e0){const g=[...a.keys()],h=[...a].flatMap(([p,m])=\u003em.isThroughObstacle===!0?[]:[p]),d=new Set(this.activeFallbackPromotedFixedRouteConnectionNames);for(const p of h)d.add(p);if(d.size===this.activeFallbackPromotedFixedRouteConnectionNames.size){const p=[...a].flatMap(([m,_])=\u003e_.isThroughObstacle===!0?[m]:[]);return this.error=p.length\u003e0?`Pipeline9 regional fallback conflicts with immutable through-obstacle route(s): ${p.join(\", \")}`:`Pipeline9 promoted regional fallback could not resolve immutable fixed route conflict(s): ${g.join(\", \")}`,void(this.failed=!0)}return void this.startRegionalFallback(d)}const A=new Map;for(const{section:g,replacementProducedSegment:h}of n)if(h)for(const d of g.sourceRoutes){const p=d.preloadedRoutePositionStart,m=d.preloadedRoutePositionEnd;if(p===void 0!=(m===void 0))throw new Error(`Pipeline9 fixed route \"${d.connectionName}\" has incomplete route-position metadata`);const _=Math.min(p??d.preloadedRouteIndex,m??d.preloadedRouteIndex),f=Math.max(p??d.preloadedRouteIndex,m??d.preloadedRouteIndex),I=A.get(d.preloadedTraceIndex);A.set(d.preloadedTraceIndex,{start:Math.min(I?.start??_,_),end:Math.max(I?.end??f,f)})}for(const{connectionName:g,section:h,replacement:d,mutatedSegments:p}of n){this.fixedRouteReplacements.set(g,d),this.preloadedTraceMutationMasks.set(g,p);for(const m of h.sourceRoutes.slice(1))this.removedFixedRouteConnectionNames.add(m.connectionName),this.preloadedTraceMutationMasks.delete(m.connectionName)}const c=MW({...TW(this.activeNode,this.connMap),portPoints:[],portPointsInPairs:[],availableZ:Array.from({length:this.layerCount},(g,h)=\u003eh)},this.getUpdatedFixedHdRoutes()),l=new Set;for(const g of c.fixedRouteSectionsByConnectionName.values()){const h=g.sourceRoutes[0];if(!h)continue;const d=A.get(h.preloadedTraceIndex);if(d)for(const[p,m]of g.sourceRoutes.entries()){const _=m.preloadedRoutePositionStart??m.preloadedRouteIndex,f=m.preloadedRoutePositionEnd??m.preloadedRouteIndex,I={start:Math.min(_,f),end:Math.max(_,f)},C=I.start===I.end,y=d.start===d.end;if(!(C||y?I.start\u003c=d.end\u0026\u0026d.start\u003c=I.end:I.start\u003cd.end\u0026\u0026d.start\u003cI.end))continue;l.add(h.preloadedTraceIndex);const x=[...this.preloadedTraceMutationMasks.get(m.connectionName)??Array(m.route.length-1).fill(!1)];if(x.length!==m.route.length-1)throw new Error(`Pipeline9 fixed route mutation mask for \"${m.connectionName}\" has ${x.length} segments, expected ${m.route.length-1}`);const E=p===0?g.start.segmentIndex:0,B=p===g.sourceRoutes.length-1?g.end.segmentIndex:m.route.length-2;for(let S=E;S\u003c=B;S++)x[S]=!0;this.preloadedTraceMutationMasks.set(m.connectionName,x)}}for(const g of A.keys())if(!l.has(g))throw new Error(`Pipeline9 could not capture accepted mutation provenance for trace ${g}`);const u=n.reduce((g,{section:h})=\u003eg+h.sourceRoutes.length,0);this.stats.reroutedFixedRouteCount=Number(this.stats.reroutedFixedRouteCount??0)+u,this.stats.reroutedFixedRouteSectionCount=Number(this.stats.reroutedFixedRouteSectionCount??0)+n.length,this.finishActiveNode(t)}recordRegionalCandidateRejections(){if(!this.activeFallbackSolver)return;const t=this.activeFallbackSolver.stats;this.stats.regionalPreloadedViaCandidateRejectionCount=Number(this.stats.regionalPreloadedViaCandidateRejectionCount??0)+Number(t.preloadedViaCandidateRejectionCount??0),this.stats.regionalForceImproveCandidateRejectionCount=Number(this.stats.regionalForceImproveCandidateRejectionCount??0)+Number(t.forceImproveCandidateRejectionCount??0),this.stats.regionalRepairCandidateRejectionCount=Number(this.stats.regionalRepairCandidateRejectionCount??0)+Number(t.repairCandidateRejectionCount??0)}finishRegularSolverFailure(t){if(this.activeFallbackReason=`regular high-density routing failed: ${t}`,this.activeRegularSolver=null,!this.enableRegionalFallback)return this.error=`Pipeline9 ${this.activeFallbackReason}`,this.failed=!0,void(this.activeNode=null);this.startRegionalFallback()}_step(){if(this.activeFallbackSolver)return this.activeFallbackSolver.step(),this.activeFallbackSolver.failed?(this.recordRegionalCandidateRejections(),this.error=[`Pipeline9 primary high-density routing failed: ${this.activeFallbackReason??\"unknown error\"}`,`regional fallback failed: ${this.activeFallbackSolver.error??\"unknown error\"}`].join(\"; \"),this.failed=!0,this.activeFallbackSolver=null,this.activeFallbackFixedRouteSections.clear(),this.activeFallbackFixedObstacleRoutes=[],this.activeFallbackPromotedFixedRouteConnectionNames.clear(),void(this.activeNode=null)):this.activeFallbackSolver.solved?void this.finishRegionalFallback():void 0;if(this.activeRegularSolver)return this.activeRegularSolver.step(),this.activeRegularSolver.failed?void this.finishRegularSolverFailure(this.activeRegularSolver.error??\"unknown error\"):this.activeRegularSolver.solved?void this.finishActiveNode(this.activeRegularSolver.routes):void 0;if(this.activeB01Solver)return this.activeB01Solver.step(),this.activeB01Solver.failed?(this.failedSolvers.push(this.activeB01Solver),this.activeFallbackReason=`B01 failed: ${this.activeB01Solver.error??\"unknown error\"}`,this.activeB01Solver=null,this.enableRegionalFallback?void this.startRegionalFallback():(this.error=`Pipeline9 ${this.activeFallbackReason}`,this.failed=!0,void(this.activeNode=null))):this.activeB01Solver.solved?void this.finishActiveNode(this.activeB01Solver.getOutput()):void 0;const t=this.unsolvedNodePortPoints.pop();if(!t)return void(this.solved=!0);const e=_6t(t,this.obstacleMargin),n=Math.max(this.traceWidth,this.viaDiameter)/2,o=this.getUpdatedFixedHdRoutes().filter(s=\u003e((a,A,c,l)=\u003e{const u=new Set(A.availableZ??A.portPoints.map(g=\u003eg.z));for(let g=1;g\u003ca.route.length;g++){const h=a.route[g-1],d=a.route[g];if(h.z===d.z){if(u.has(h.z)\u0026\u0026zgo(h,d,a.traceThickness/2+l,c))return!0;continue}const p=Math.min(h.z,d.z),m=Math.max(h.z,d.z);if([...u].some(_=\u003e_\u003e=p\u0026\u0026_\u003c=m)\u0026\u0026Vgo(d,a.viaDiameter/2+l,c))return!0}return!1})(s,t,e,n)).flatMap(s=\u003e((a,A)=\u003e{const c=new Set(A.availableZ??A.portPoints.map(g=\u003eg.z));if(c.size===0)throw new Error(`Pipeline9 B01 node \"${A.capacityMeshNodeId}\" has no available layers`);const l={type:\"route\",connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,traceThickness:a.traceThickness,viaDiameter:a.viaDiameter},u=[];for(let g=1;g\u003ca.route.length;g++){const h=a.route[g-1],d=a.route[g];if(h.z===d.z){if(!c.has(h.z))continue;u.push({...l,route:[h,d],vias:[]});continue}const p=Math.min(h.z,d.z),m=Math.max(h.z,d.z);[...c].some(_=\u003e_\u003e=p\u0026\u0026_\u003c=m)\u0026\u0026u.push({...l,route:[h,d],vias:[{x:d.x,y:d.y,zStart:h.z,zEnd:d.z}]})}return u})(s,t));if(this.stats.fixedObstacleUses=Number(this.stats.fixedObstacleUses??0)+o.length,o.length===0)return void this.startRegularSolver(t);const i=(this.includeBoardObstacles?this.obstacles:[]).filter(s=\u003e((a,A)=\u003e{const c=(a.ccwRotationDegrees??0)*Math.PI/180,l=Math.abs(Math.cos(c)),u=Math.abs(Math.sin(c)),g=a.width/2*l+a.height/2*u,h=a.width/2*u+a.height/2*l;return a.center.x-g\u003c=A.maxX\u0026\u0026a.center.x+g\u003e=A.minX\u0026\u0026a.center.y-h\u003c=A.maxY\u0026\u0026a.center.y+h\u003e=A.minY})(s,e)).map(s=\u003e(({obstacle:a,node:A,connMap:c,layerCount:l})=\u003e{const u=new Set(A.availableZ??A.portPoints.map(d=\u003ed.z)),g=(a.zLayers??a.layers.map(d=\u003eKr(d,l))).filter(d=\u003eu.has(d));if(g.length===0)return;const h=a.connectedTo[0]??a.obstacleId??`pipeline9_obstacle_${a.center.x}_${a.center.y}`;return{type:\"rect\",connectionName:h,rootConnectionName:c.getNetConnectedToId(h)??h,center:a.center,width:a.width,height:a.height,ccwRotationDegrees:a.ccwRotationDegrees,zLayers:g}})({obstacle:s,node:t,connMap:this.connMap,layerCount:this.layerCount})).filter(s=\u003es!==void 0);if(this.stats.boardObstacleUses=Number(this.stats.boardObstacleUses??0)+i.length,this.activeNode=t,t.width\u003e15||t.height\u003e15)return this.activeFallbackReason=`B01 node \"${t.capacityMeshNodeId}\" exceeds the 15x15mm routing limit (${t.width}x${t.height}mm)`,void this.startRegionalFallback();const r=TW(t,this.connMap);this.stats.b01NodeCount=Number(this.stats.b01NodeCount??0)+1,this.activeB01Solver=new Ugo({...Fgo,nodeWithPortPoints:r,obstacles:[...o,...i],viaDiameter:this.viaDiameter,viaMinDistFromBorder:this.viaDiameter/2,traceThickness:this.traceWidth,traceMargin:this.obstacleMargin,obstacleClearanceMargin:.15,effort:this.effort}),this.maxB01Rips!==void 0\u0026\u0026(this.activeB01Solver.MAX_RIPS=this.maxB01Rips)}visualize(){return this.activeFallbackSolver?.visualize()??this.activeRegularSolver?.visualize()??this.activeB01Solver?.visualize()??{lines:this.routes.flatMap(t=\u003et.route.slice(0,-1).map((e,n)=\u003e({points:[e,t.route[n+1]],strokeWidth:t.traceThickness,layer:`z${e.z}`,label:t.connectionName}))),points:[],rects:[],circles:[]}}},f6t=(t,e)=\u003e{const n=e*Math.PI/180;return{x:t.x*Math.cos(n)-t.y*Math.sin(n),y:t.x*Math.sin(n)+t.y*Math.cos(n)}},I6t=({x:t,y:e,width:n,height:o,ccwRotation:i})=\u003e{const r=n/2,s=o/2;return[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(a=\u003e{const A=f6t(a,i);return{x:t+A.x,y:e+A.y}})},aQe=t=\u003e{const e=t.shape===\"rotated_pill\"?t.ccw_rotation:0,n=Math.max(Math.max(t.width,t.height)/2-t.radius,0),o=t.width\u003e=t.height?{x:n,y:0}:{x:0,y:n},i=f6t(o,e);return{start:{x:t.x-i.x,y:t.y-i.y},end:{x:t.x+i.x,y:t.y+i.y},radius:t.radius}},kW=t=\u003e{if(t.type===\"pcb_smtpad\"){if(t.shape===\"polygon\")return t.points;if(t.shape===\"rotated_rect\")return I6t({x:t.x,y:t.y,width:t.width,height:t.height,ccwRotation:t.ccw_rotation})}if(t.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in t\u0026\u0026\"rect_pad_height\"in t)return I6t({x:t.x,y:t.y,width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:\"rect_ccw_rotation\"in t\u0026\u0026typeof t.rect_ccw_rotation==\"number\"?t.rect_ccw_rotation:0});throw new Error(`Expected polygonal pad geometry, got ${t.type} with shape \"${t.shape}\"`)},C6t=t=\u003et.map((e,n)=\u003e[e,t[(n+1)%t.length]]),AQe=(t,e,n,o)=\u003e{const i=DD(t,e,n,o);if(i)return{distance:0,pointOnA:i,pointOnB:i,center:i};const r=[{pointOnA:t,pointOnB:z_(t,n,o)},{pointOnA:e,pointOnB:z_(e,n,o)},{pointOnA:z_(n,t,e),pointOnB:n},{pointOnA:z_(o,t,e),pointOnB:o}];let s=r[0],a=B_t(s.pointOnA,s.pointOnB);for(const A of r.slice(1)){const c=B_t(A.pointOnA,A.pointOnB);c\u003ca\u0026\u0026(s=A,a=c)}return{distance:M5(t,e,n,o),pointOnA:s.pointOnA,pointOnB:s.pointOnB,center:{x:(s.pointOnA.x+s.pointOnB.x)/2,y:(s.pointOnA.y+s.pointOnB.y)/2}}};function y6t(t,e){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}var x6t=1e-9,D7=1e-9;function Wgo(t,e){const n=(t.y-e.start.y)*(e.end.x-e.start.x)-(t.x-e.start.x)*(e.end.y-e.start.y);if(Math.abs(n)\u003ex6t)return!1;const o=(t.x-e.start.x)*(e.end.x-e.start.x)+(t.y-e.start.y)*(e.end.y-e.start.y);return o\u003c-1e-9?!1:o\u003c=(e.end.x-e.start.x)**2+(e.end.y-e.start.y)**2+x6t}function cQe(t,e){let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o],s=e[i];if(Wgo(t,{start:r,end:s}))return!0;r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n}function Lv(t,e){if(e.type===\"pcb_smtpad\"){if(e.shape===\"circle\")return y6t(t,e)\u003c=e.radius+D7;if(e.shape===\"rect\"){const n=e.width/2,o=e.height/2;return Math.abs(t.x-e.x)\u003c=n+D7\u0026\u0026Math.abs(t.y-e.y)\u003c=o+D7}if(e.shape===\"rotated_rect\")return cQe(t,kW(e));if(e.shape===\"pill\"||e.shape===\"rotated_pill\"){if(e.shape===\"rotated_pill\"){const A=aQe(e);return wc(t,A.start,A.end)\u003c=A.radius+D7}const n=e.width/2,o=e.height/2,i=e.radius;if(Math.abs(t.x-e.x)\u003c=n-i+D7\u0026\u0026Math.abs(t.y-e.y)\u003c=o+D7)return!0;const r=Math.max(Math.abs(t.x-e.x)-(n-i),0),s=Math.max(Math.abs(t.y-e.y)-(o-i),0),a=i+D7;return r*r+s*s\u003c=a*a}if(e.shape===\"polygon\")return cQe(t,e.points)}if(e.type===\"pcb_plated_hole\"){if(e.shape===\"circle\")return y6t(t,e)\u003c=e.outer_diameter/2+D7;if(\"rect_pad_width\"in e\u0026\u0026\"rect_pad_height\"in e)return cQe(t,kW(e));if(e.shape===\"oval\"||e.shape===\"pill\")return Math.abs(t.x-e.x)\u003c=e.outer_width/2+D7\u0026\u0026Math.abs(t.y-e.y)\u003c=e.outer_height/2+D7}return!1}function E6t(t,e,n,o){return Math.sqrt((n-t)**2+(o-e)**2)}var B6t=.1,b6t=.1,jgo=.2,S6t=.1,Hv=.005,yH=t=\u003et.find(e=\u003ee.type===\"pcb_board\"),xH=(t,e)=\u003et?.[e],Pce=t=\u003enbe([t]),$go=t=\u003e{const e=Pce(t);return Math.min(e.maxX-e.minX,e.maxY-e.minY)/2},qgo=t=\u003e{const e=(n=\u003e{const o=Pce(n);return V8({x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY})})(t);return{kind:\"circle\",x:e.x,y:e.y,radius:$go(t)}},Q6t=t=\u003enI(t).pcb_trace.list().flatMap(e=\u003e{const n=[];for(let o=0;o\u003ce.route.length-1;o++){const i=e.route[o],r=e.route[o+1];i.route_type===\"wire\"\u0026\u0026r.route_type===\"wire\"\u0026\u0026i.layer===r.layer\u0026\u0026n.push({type:\"pcb_trace_segment\",pcb_trace_id:e.pcb_trace_id,_pcbTrace:e,thickness:\"width\"in i?i.width:\"width\"in r?r.width:S6t,layer:i.layer,x1:i.x,y1:i.y,x2:r.x,y2:r.y})}return n}),v6t=t=\u003e{const e=t._pcbTrace.route.flatMap(i=\u003ei.route_type===\"through_pad\"?[i.start,i.end]:[{x:i.x,y:i.y}]),n=e[0],o=e[e.length-1];return n\u0026\u0026o?V8(n,o):V8({x:t.x1,y:t.y1},{x:t.x2,y:t.y2})},lQe=({tracePoint:t,obstaclePoint:e,traceRadius:n,obstacleRadius:o})=\u003e{const i=e.x-t.x,r=e.y-t.y,s=Math.hypot(i,r);if(s===0)return V8(t,e);const a=i/s,A=r/s;return V8({x:t.x+a*n,y:t.y+A*n},{x:e.x-a*o,y:e.y-A*o})},uQe=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=t.thickness/2;if(e.type===\"pcb_via\"||(r=e).type===\"pcb_via\"||r.shape===\"circle\"){const a=e.type===\"pcb_via\"?{x:e.x,y:e.y,radius:e.outer_diameter/2}:qgo(e),A=z_(a,n,o);return{gap:Nz(n,o,a)-i,center:lQe({tracePoint:A,obstaclePoint:a,traceRadius:i,obstacleRadius:a.radius})}}var r;if((a=\u003ea.type===\"pcb_smtpad\"\u0026\u0026(a.shape===\"pill\"||a.shape===\"rotated_pill\"))(e)){const a=((A,c)=\u003e{const l=aQe(c),u=AQe({x:A.x1,y:A.y1},{x:A.x2,y:A.y2},l.start,l.end);return{distance:u.distance,center:u.center,radius:l.radius,tracePoint:u.pointOnA,obstaclePoint:u.pointOnB}})(t,e);return{gap:a.distance-i-a.radius,center:lQe({tracePoint:a.tracePoint,obstaclePoint:a.obstaclePoint,traceRadius:i,obstacleRadius:a.radius})}}const s=((a,A,c)=\u003e{if(c.length\u003c3)return{distance:Number.POSITIVE_INFINITY,center:a,tracePoint:a,obstaclePoint:a};const l=C6t(c).map(([g,h])=\u003eDD(a,A,g,h)).filter(g=\u003eg!==null);if(l.length\u003e0){const g=A.x-a.x,h=A.y-a.y,d=g*g+h*h;return l.sort((p,m)=\u003e((p.x-a.x)*g+(p.y-a.y)*h)/d-((m.x-a.x)*g+(m.y-a.y)*h)/d),{distance:0,center:l[0],tracePoint:l[0],obstaclePoint:l[0]}}if(Mz(a,c)||Mz(A,c)){const g={x:(a.x+A.x)/2,y:(a.y+A.y)/2};return{distance:0,center:g,tracePoint:g,obstaclePoint:g}}let u=AQe(a,A,c[0],c[1]);for(const[g,h]of C6t(c).slice(1)){const d=AQe(a,A,g,h);d.distance\u003cu.distance\u0026\u0026(u=d)}return{distance:u.distance,center:u.center,tracePoint:u.pointOnA,obstaclePoint:u.pointOnB}})(n,o,(a=\u003e{if(a.type===\"pcb_smtpad\"\u0026\u0026(a.shape===\"polygon\"||a.shape===\"rotated_rect\"))return{kind:\"polygon\",points:kW(a)};if(a.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in a\u0026\u0026\"rect_pad_height\"in a)return{kind:\"polygon\",points:kW(a)};const A=Pce(a);return{kind:\"polygon\",points:[{x:A.minX,y:A.minY},{x:A.maxX,y:A.minY},{x:A.maxX,y:A.maxY},{x:A.minX,y:A.maxY}]}})(e).points);return{gap:s.distance-i,center:lQe({tracePoint:s.tracePoint,obstaclePoint:s.obstaclePoint,traceRadius:i,obstacleRadius:0})}},Mce=t=\u003et\u003c=0,w6t=class{buckets;objectsById;getBounds;getId;CELL_SIZE=.4;constructor({objects:t,getBounds:e,getId:n,CELL_SIZE:o}){this.buckets=new Map,this.objectsById=new Map,this.getBounds=e,this.getId=n??(()=\u003ethis._getNextId()),this.CELL_SIZE=o??this.CELL_SIZE;for(const i of t)this.addObject(i)}_idCounter=0;_getNextId(){return\"\"+this._idCounter++}addObject(t){const e=this.getBounds(t),n=this.getId(t),o={...t,spatialIndexId:n};this.objectsById.set(n,o);const i=Math.floor(e.minX/this.CELL_SIZE),r=Math.floor(e.minY/this.CELL_SIZE),s=Math.floor(e.maxX/this.CELL_SIZE),a=Math.floor(e.maxY/this.CELL_SIZE);for(let A=i;A\u003c=s;A++)for(let c=r;c\u003c=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l);u?u.push(o):this.buckets.set(l,[o])}}removeObject(t){const e=this.objectsById.get(t);if(!e)return!1;this.objectsById.delete(t);const n=this.getBounds(e),o=Math.floor(n.minX/this.CELL_SIZE),i=Math.floor(n.minY/this.CELL_SIZE),r=Math.floor(n.maxX/this.CELL_SIZE),s=Math.floor(n.maxY/this.CELL_SIZE);for(let a=o;a\u003c=r;a++)for(let A=i;A\u003c=s;A++){const c=`${a}x${A}`,l=this.buckets.get(c);if(l){const u=l.findIndex(g=\u003eg.spatialIndexId===t);u!==-1\u0026\u0026(l.splice(u,1),l.length===0\u0026\u0026this.buckets.delete(c))}}return!0}getBucketKey(t,e){return`${Math.floor(t/this.CELL_SIZE)}x${Math.floor(e/this.CELL_SIZE)}`}getObjectsInBounds(t,e=0){const n=[],o=new Set,i=Math.floor((t.minX-e)/this.CELL_SIZE),r=Math.floor((t.minY-e)/this.CELL_SIZE),s=Math.floor((t.maxX+e)/this.CELL_SIZE),a=Math.floor((t.maxY+e)/this.CELL_SIZE);for(let A=i;A\u003c=s;A++)for(let c=r;c\u003c=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l)||[];for(const g of u){const h=g.spatialIndexId;o.has(h)||(o.add(h),n.push(g))}}return n}};function gQe(t){return t.type===\"pcb_trace_segment\"||t.type===\"pcb_smtpad\"?[t.layer]:t.type===\"pcb_plated_hole\"?Array.isArray(t.layers)?t.layers:[...LJ]:t.type===\"pcb_hole\"?[...LJ]:t.type===\"pcb_via\"?Array.isArray(t.layers)?t.layers:[...LJ]:t.type===\"pcb_keepout\"\u0026\u0026Array.isArray(t.layers)?t.layers:[]}var P6t=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=e.minX,r=e.minY,s=e.maxX,a=e.maxY;if(n.x===o.x\u0026\u0026n.y===o.y){const B=Math.max(i,Math.min(s,n.x)),S=Math.max(r,Math.min(a,n.y));return B===n.x\u0026\u0026S===n.y?{x:n.x,y:n.y}:{x:B,y:S}}const A=o.x-n.x,c=o.y-n.y,l=A!==0?(i-n.x)/A:Number.NEGATIVE_INFINITY,u=A!==0?(s-n.x)/A:Number.POSITIVE_INFINITY,g=c!==0?(r-n.y)/c:Number.NEGATIVE_INFINITY,h=c!==0?(a-n.y)/c:Number.POSITIVE_INFINITY,d=Math.max(Math.min(l,u),Math.min(g,h)),p=Math.min(Math.max(l,u),Math.max(g,h));if(d\u003c=p\u0026\u0026p\u003e=0\u0026\u0026d\u003c=1){const B=Math.max(0,Math.min(1,d));return{x:n.x+B*A,y:n.y+B*c}}const m={x:Math.max(i,Math.min(s,n.x)),y:Math.max(r,Math.min(a,n.y))},_={x:Math.max(i,Math.min(s,o.x)),y:Math.max(r,Math.min(a,o.y))},f=(m.x-n.x)**2+(m.y-n.y)**2,I=(_.x-o.x)**2+(_.y-o.y)**2,C=[{start:{x:i,y:r},end:{x:s,y:r}},{start:{x:s,y:r},end:{x:s,y:a}},{start:{x:s,y:a},end:{x:i,y:a}},{start:{x:i,y:a},end:{x:i,y:r}}];let y=Math.min(f,I),x=f\u003c=I?m:_;const E=(B,S,Q)=\u003eMath.max(S,Math.min(Q,B));for(const B of C){const S={x:o.x-n.x,y:o.y-n.y},Q={x:B.end.x-B.start.x,y:B.end.y-B.start.y},w={x:n.x-B.start.x,y:n.y-B.start.y},M=S.x*S.x+S.y*S.y,k=S.x*Q.x+S.y*Q.y,R=S.x*w.x+S.y*w.y,F=Q.x*Q.x+Q.y*Q.y,O=Q.x*w.x+Q.y*w.y,U=M*F-k*k;if(Math.abs(U)\u003c1e-10)continue;let Y=(k*O-F*R)/U,W=(M*O-k*R)/U;Y=E(Y,0,1),W=E(W,0,1);const te={x:n.x+Y*S.x,y:n.y+Y*S.y},j={x:B.start.x+W*Q.x,y:B.start.y+W*Q.y},J=te.x-j.x,oe=te.y-j.y,ie=J*J+oe*oe;ie\u003cy\u0026\u0026(y=ie,x={x:(te.x+j.x)/2,y:(te.y+j.y)/2})}return x},Xgo=(t,e)=\u003e{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i={x:e.x1,y:e.y1},r={x:e.x2,y:e.y2},s={x:o.x-n.x,y:o.y-n.y},a={x:r.x-i.x,y:r.y-i.y},A=s.x*s.x+s.y*s.y,c=a.x*a.x+a.y*a.y;if(A===0||c===0){if(A===0\u0026\u0026c===0)return{x:(n.x+i.x)/2,y:(n.y+i.y)/2};if(A===0){const Q=N7(((n.x-i.x)*a.x+(n.y-i.y)*a.y)/c,0,1),w={x:i.x+Q*a.x,y:i.y+Q*a.y};return{x:(n.x+w.x)/2,y:(n.y+w.y)/2}}const B=N7(((i.x-n.x)*s.x+(i.y-n.y)*s.y)/A,0,1),S={x:n.x+B*s.x,y:n.y+B*s.y};return{x:(S.x+i.x)/2,y:(S.y+i.y)/2}}const l=n.x-i.x,u=n.y-i.y,g=s.x*s.x+s.y*s.y,h=s.x*a.x+s.y*a.y,d=s.x*l+s.y*u,p=a.x*a.x+a.y*a.y,m=a.x*l+a.y*u,_=g*p-h*h;if(_\u003c1e-10)return Zgo(n,o,i,r,s,a,A,c);let f=(h*m-p*d)/_,I=(g*m-h*d)/_;f=N7(f,0,1),I=N7(I,0,1),I=(f*h+m)/p,I=N7(I,0,1),f=(I*h-d)/g,f=N7(f,0,1);const C=n.x+f*s.x,y=n.y+f*s.y,x=i.x+I*a.x,E=i.y+I*a.y;return{x:(C+x)/2,y:(y+E)/2}},Zgo=(t,e,n,o,i,r,s,a)=\u003e{let A=((n.x-t.x)*i.x+(n.y-t.y)*i.y)/s;A=N7(A,0,1);const c={x:t.x+A*i.x,y:t.y+A*i.y};let l=((o.x-t.x)*i.x+(o.y-t.y)*i.y)/s;l=N7(l,0,1);const u={x:t.x+l*i.x,y:t.y+l*i.y};let g=((t.x-n.x)*r.x+(t.y-n.y)*r.y)/a;g=N7(g,0,1);const h={x:n.x+g*r.x,y:n.y+g*r.y};let d=((e.x-n.x)*r.x+(e.y-n.y)*r.y)/a;d=N7(d,0,1);const p={x:n.x+d*r.x,y:n.y+d*r.y},m=[{pointA:c,pointB:n,distance:Math.sqrt((c.x-n.x)**2+(c.y-n.y)**2)},{pointA:u,pointB:o,distance:Math.sqrt((u.x-o.x)**2+(u.y-o.y)**2)},{pointA:t,pointB:h,distance:Math.sqrt((t.x-h.x)**2+(t.y-h.y)**2)},{pointA:e,pointB:p,distance:Math.sqrt((e.x-p.x)**2+(e.y-p.y)**2)}].reduce((_,f)=\u003ef.distance\u003c_.distance?f:_);return{x:(m.pointA.x+m.pointB.x)/2,y:(m.pointA.y+m.pointB.y)/2}},N7=(t,e,n)=\u003eMath.max(e,Math.min(n,t)),EH=t=\u003e{if(t.type===\"pcb_trace_segment\")return{minX:Math.min(t.x1,t.x2),minY:Math.min(t.y1,t.y2),maxX:Math.max(t.x1,t.x2),maxY:Math.max(t.y1,t.y2)};if(t.type===\"pcb_smtpad\"||t.type===\"pcb_plated_hole\"){if(t.type===\"pcb_smtpad\"\u0026\u0026(t.shape===\"rotated_rect\"||t.shape===\"polygon\")||t.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in t\u0026\u0026\"rect_pad_height\"in t){const e=kW(t);return{minX:Math.min(...e.map(n=\u003en.x)),minY:Math.min(...e.map(n=\u003en.y)),maxX:Math.max(...e.map(n=\u003en.x)),maxY:Math.max(...e.map(n=\u003en.y))}}if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"rotated_pill\"){const e=aQe(t);return{minX:Math.min(e.start.x,e.end.x)-e.radius,minY:Math.min(e.start.y,e.end.y)-e.radius,maxX:Math.max(e.start.x,e.end.x)+e.radius,maxY:Math.max(e.start.y,e.end.y)+e.radius}}}return nbe([t])};function dQe(t){return t.route_type!==\"wire\"?[]:[t.start_pcb_port_id,t.end_pcb_port_id].filter(e=\u003e!!e)}function M6t(t){const e=new Set;for(const n of t.route)for(const o of dQe(n))e.add(o);return Array.from(e)}function Dce(t){const e=new Set;for(const n of t)for(const o of M6t(n))e.add(o);return Array.from(e)}var edo=t=\u003e{if(t.type===\"pcb_via\"||t.type===\"pcb_plated_hole\"\u0026\u0026t.shape===\"circle\")return t.outer_diameter/2;if(t.type===\"pcb_hole\"\u0026\u0026t.hole_shape===\"circle\")return t.hole_diameter/2;if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"circle\")return t.radius;throw new Error(`Could not determine radius of element: ${JSON.stringify(t)}`)},tdo=t=\u003et.type===\"pcb_port\"?t.pcb_port_id:t.type===\"pcb_smtpad\"?t.pcb_smtpad_id:t.pcb_plated_hole_id;function ndo(t,{connMap:e,minClearance:n}={}){const o=[];(I=\u003e{const C=I.filter(B=\u003eB.type===\"pcb_port\"),y=I.filter(B=\u003eB.type===\"pcb_smtpad\"),x=I.filter(B=\u003eB.type===\"pcb_trace\");function E(B,S={}){const Q=S.traceWidth||0,w=C.find(M=\u003eE6t(M.x,M.y,B.x,B.y)\u003c.01);if(w)return w.pcb_port_id;if(S.isFirstOrLastPoint){const M=y.find(k=\u003ek.shape===\"rect\"?Math.abs(B.x-k.x)\u003ck.width/2+Q/2\u0026\u0026Math.abs(B.y-k.y)\u003ck.height/2+Q/2:k.shape===\"circle\"?E6t(B.x,B.y,k.x,k.y)\u003ck.radius:k.shape===\"pill\"||k.shape===\"rotated_pill\"?Lv(B,k):void 0);if(M)return M.pcb_port_id??null}return null}for(const B of x)for(let S=0;S\u003cB.route.length;S++){const Q=B.route[S],w=S===0||S===B.route.length-1;if(Q.route_type===\"wire\"){if(!Q.start_pcb_port_id\u0026\u0026S===0){const M=E(Q,{isFirstOrLastPoint:w,traceWidth:Q.width});M\u0026\u0026(Q.start_pcb_port_id=M)}if(!Q.end_pcb_port_id\u0026\u0026S===B.route.length-1){const M=E(Q,{isFirstOrLastPoint:w,traceWidth:Q.width});M\u0026\u0026(Q.end_pcb_port_id=M)}}}})(t),e??=eL(t);const i=yH(t);n??=xH(i,\"min_trace_to_pad_edge_clearance\")??.1;const r=nI(t).pcb_trace.list().flatMap(I=\u003e{const C=[];for(let y=0;y\u003cI.route.length-1;y++){const x=I.route[y],E=I.route[y+1];x.route_type===\"wire\"\u0026\u0026E.route_type===\"wire\"\u0026\u0026x.layer===E.layer\u0026\u0026C.push({type:\"pcb_trace_segment\",pcb_trace_id:I.pcb_trace_id,_pcbTrace:I,thickness:\"width\"in x?x.width:\"width\"in E?E.width:S6t,layer:x.layer,x1:x.x,y1:x.y,x2:E.x,y2:E.y})}return C}),s=nI(t).pcb_smtpad.list(),a=nI(t).pcb_plated_hole.list(),A=nI(t).pcb_port.list(),c=nI(t).pcb_hole.list(),l=nI(t).pcb_via.list(),u=nI(t).pcb_keepout.list(),g=[...A,...s,...a],h=new Map;for(const I of u){const C=new Set(I.excluded_pcb_component_ids??[]);C.size!==0\u0026\u0026h.set(I.pcb_keepout_id,g.filter(y=\u003ey.pcb_component_id\u0026\u0026C.has(y.pcb_component_id)).map(tdo))}const d=[...r,...s,...a,...c,...l,...u],p=new w6t({objects:d,getBounds:EH}),m=I=\u003eNy(t,I),_=(I,C,y)=\u003eMce(y)?`PCB trace ${I} overlaps with ${C} (accidental contact)`:`PCB trace ${I} is too close to ${C} (gap: ${y.toFixed(3)}mm)`,f=new Set;for(const I of r){const C=n,y=EH(I),x=p.getObjectsInBounds(y,C+I.thickness/2);if(I.x1!==I.x2||I.y1!==I.y2)for(const E of x){if(!gQe(E).includes(I.layer)||E.type===\"pcb_keepout\"\u0026\u0026(h.get(E.pcb_keepout_id)??[]).some(Q=\u003ee.areIdsConnected(I.pcb_trace_id,Q)))continue;if(E.type===\"pcb_trace_segment\"){const Q=E;if(I.layer!==Q.layer||e.areIdsConnected(I.pcb_trace_id,Q.pcb_trace_id))continue;const w=M5({x:I.x1,y:I.y1},{x:I.x2,y:I.y2},{x:Q.x1,y:Q.y1},{x:Q.x2,y:Q.y2})-I.thickness/2-Q.thickness/2;if(w\u003en-Hv)continue;const M=`overlap_${I.pcb_trace_id}_${Q.pcb_trace_id}`,k=`overlap_${Q.pcb_trace_id}_${I.pcb_trace_id}`;if(f.has(M)||f.has(k))continue;f.add(M),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:_(m(I.pcb_trace_id),m(Q.pcb_trace_id),w),pcb_trace_id:I.pcb_trace_id,source_trace_id:\"\",pcb_trace_error_id:M,pcb_component_ids:[],center:Xgo(I,Q),pcb_port_ids:Dce([I._pcbTrace,Q._pcbTrace])});continue}const B=gv(E);if(e.areIdsConnected(I.pcb_trace_id,\"pcb_trace_id\"in E?E.pcb_trace_id:B))continue;if(E.type===\"pcb_smtpad\"||E.type===\"pcb_plated_hole\"||E.type===\"pcb_via\"){const{gap:Q,center:w}=uQe(I,E);if(!Mce(Q))continue;const M=`overlap_${I.pcb_trace_id}_${B}`;if(f.has(M))continue;f.add(M),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:_(m(I.pcb_trace_id),`${E.type} \"${m(B)}\"`,Q),pcb_trace_id:I.pcb_trace_id,center:w,source_trace_id:\"\",pcb_trace_error_id:M,pcb_component_ids:[\"pcb_component_id\"in E?E.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...Dce([I._pcbTrace]),\"pcb_port_id\"in E?E.pcb_port_id:void 0].filter(Boolean)});continue}if(E.type===\"pcb_hole\"){const Q=edo(E),w=Nz({x:I.x1,y:I.y1},{x:I.x2,y:I.y2},{x:E.x,y:E.y,radius:Q})-I.thickness/2;if(w\u003en-Hv)continue;const M=`overlap_${I.pcb_trace_id}_${B}`;if(f.has(M))continue;f.add(M),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:_(m(I.pcb_trace_id),`${E.type} \"${m(gv(E))}\"`,w),pcb_trace_id:I.pcb_trace_id,center:P6t(I,EH(E)),source_trace_id:\"\",pcb_trace_error_id:M,pcb_component_ids:[\"pcb_component_id\"in E?E.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...Dce([I._pcbTrace]),\"pcb_port_id\"in E?E.pcb_port_id:void 0].filter(Boolean)})}const S=Dz({x:I.x1,y:I.y1},{x:I.x2,y:I.y2},EH(E))-I.thickness/2;if(S+Hv\u003cC){const Q=`overlap_${I.pcb_trace_id}_${B}`;if(f.has(Q))continue;f.add(Q),o.push({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:_(m(I.pcb_trace_id),`${E.type} \"${m(gv(E))}\"`,S),pcb_trace_id:I.pcb_trace_id,source_trace_id:\"\",pcb_trace_error_id:Q,pcb_component_ids:[\"pcb_component_id\"in E?E.pcb_component_id:void 0].filter(Boolean),center:P6t(I,EH(E)),pcb_port_ids:[...Dce([I._pcbTrace]),\"pcb_port_id\"in E?E.pcb_port_id:void 0].filter(Boolean)})}}}return o}function FW(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function D6t(t,e){return FW(t,e)\u003c=Hv}function odo(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=\u003ea.type===\"pcb_via\");if(o.length\u003c2)return[];const i=yH(t);n??=xH(i,\"min_via_hole_edge_to_via_hole_edge_clearance\")??B6t,e??=eL(t);const r=[],s=new Set;for(let a=0;a\u003co.length;a++)for(let A=a+1;A\u003co.length;A++){const c=o[a],l=o[A];if(D6t(c,l)||!e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=FW(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+Hv\u003e=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join(\"_\");s.has(g)||(s.add(g),r.push({type:\"pcb_via_clearance_error\",pcb_error_id:`same_net_vias_close_${g}`,message:`Vias ${Ny(t,c.pcb_via_id)} and ${Ny(t,l.pcb_via_id)} are too close together (gap: ${u.toFixed(3)}mm)`,error_type:\"pcb_via_clearance_error\",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function ido(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=\u003ea.type===\"pcb_via\");if(o.length\u003c2)return[];const i=yH(t);n??=xH(i,\"min_via_hole_edge_to_via_hole_edge_clearance\")??B6t,e??=eL(t);const r=[],s=new Set;for(let a=0;a\u003co.length;a++)for(let A=a+1;A\u003co.length;A++){const c=o[a],l=o[A];if(D6t(c,l)||e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=FW(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+Hv\u003e=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join(\"_\");s.has(g)||(s.add(g),r.push({type:\"pcb_via_clearance_error\",pcb_error_id:`different_net_vias_close_${g}`,message:`Vias ${Ny(t,c.pcb_via_id)} and ${Ny(t,l.pcb_via_id)} from different nets are too close together (gap: ${u.toFixed(3)}mm)`,error_type:\"pcb_via_clearance_error\",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function N6t(t){return t.route_type===\"through_pad\"?{x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2}:{x:t.x,y:t.y}}function R6t(t,e,n,o){return t.route_type===\"wire\"\u0026\u0026e.some(i=\u003e!i.pcb_port_id||i.pcb_port_id===n?!1:o.get(i.pcb_port_id)?.some(s=\u003eLv({x:t.x,y:t.y},s))??!1)}function rdo({firstPoint:t,lastPoint:e,port:n,expectedPorts:o,padMap:i}){let r;const s=t.route_type===\"wire\"?t:void 0,a=e.route_type===\"wire\"?e:void 0,A=dQe(t).includes(n.pcb_port_id),c=dQe(e).includes(n.pcb_port_id);A\u0026\u0026s?r=s:c\u0026\u0026a||R6t(t,o,n.pcb_port_id,i)\u0026\u0026a?r=a:R6t(e,o,n.pcb_port_id,i)\u0026\u0026s?r=s:s\u0026\u0026a?r=FW(s,n)\u003c=FW(a,n)?s:a:s?r=s:a\u0026\u0026(r=a);const l=N6t(t),u=N6t(e);return r?{x:r.x,y:r.y}:{x:(l.x+u.x)/2,y:(l.y+u.y)/2}}function sdo(t){const e=[],n=t.filter(l=\u003el.type===\"pcb_port\"),o=t.filter(l=\u003el.type===\"pcb_trace\"),i=t.filter(l=\u003el.type===\"source_trace\"),r=t.filter(l=\u003el.type===\"pcb_smtpad\"),s=t.filter(l=\u003el.type===\"pcb_plated_hole\"),a=new Map,A=new aXn(t),c=new Set;for(const l of r)l.pcb_port_id\u0026\u0026a.set(l.pcb_port_id,[...a.get(l.pcb_port_id)??[],l]);for(const l of s)l.pcb_port_id\u0026\u0026a.set(l.pcb_port_id,[...a.get(l.pcb_port_id)??[],l]);for(const l of o){if(l.route.length===0)continue;const u=l.route[0],g=l.route[l.route.length-1],h=i.find(m=\u003em.source_trace_id===l.source_trace_id),d=h?n.filter(m=\u003eh.connected_source_port_ids?.includes(m.source_port_id)):[];for(let m=1;m\u003cl.route.length-1;m++){const _=l.route[m-1],f=l.route[m],I=l.route[m+1];if(f.route_type===\"via\"){const C=_.route_type===\"wire\",y=I.route_type===\"wire\";if(C\u0026\u0026y){const x=Math.abs(_.x-f.x)\u003c.01\u0026\u0026Math.abs(_.y-f.y)\u003c.01,E=Math.abs(I.x-f.x)\u003c.01\u0026\u0026Math.abs(I.y-f.y)\u003c.01;if(!x||!E){const B=ebe(t,l.pcb_trace_id);e.push({type:\"pcb_trace_error\",message:`Via in trace [${B}] is misaligned at position {x: ${f.x}, y: ${f.y}}.`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`misaligned_via_${l.pcb_trace_id}_${m}`,pcb_component_ids:[],pcb_port_ids:[]})}}}}const p=ebe(t,l.pcb_trace_id);if(h\u0026\u0026d.length\u003e0){if(c.has(h.source_trace_id))continue;c.add(h.source_trace_id)}for(const m of d){if(!m.pcb_port_id)continue;const _=a.get(m.pcb_port_id);if(!_?.length)continue;let f=!1;const I=[...A.getAllTracesConnectedToTrace(l.pcb_trace_id),...o.filter(x=\u003ex.source_trace_id===h?.source_trace_id)];for(const x of I){if(x.pcb_trace_id===l.pcb_trace_id||!x.source_trace_id)continue;const E=i.find(Q=\u003eQ.source_trace_id===x.source_trace_id);if(!h||x.source_trace_id!==h.source_trace_id\u0026\u0026!E?.connected_source_port_ids.includes(m.source_port_id))continue;const B=x.route[0],S=x.route.at(-1);if(M6t(x).includes(m.pcb_port_id)||B?.route_type===\"wire\"\u0026\u0026_.some(Q=\u003eLv(B,Q))||S?.route_type===\"wire\"\u0026\u0026_.some(Q=\u003eLv(S,Q))){f=!0;break}}if(f)continue;const C=u.route_type===\"wire\"\u0026\u0026_.some(x=\u003eLv({x:u.x,y:u.y},x)),y=g.route_type===\"wire\"\u0026\u0026_.some(x=\u003eLv({x:g.x,y:g.y},x));if(!C\u0026\u0026!y){const x=tbe(t,m.pcb_port_id).replace(\"pcb_port\",\"\"),E=_[0].type.replace(/pcb_/,\"\"),B=rdo({firstPoint:u,lastPoint:g,port:m,expectedPorts:d,padMap:a});e.push({type:\"pcb_trace_error\",message:`Trace [${p}] is missing a connection to ${E}${x}`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`missing_connection_${l.pcb_trace_id}_${m.pcb_port_id}`,center:B,pcb_component_ids:[],pcb_port_ids:[m.pcb_port_id]})}}if(d.length===0){let m=!1,_=!1;const f=u.route_type===\"wire\"\u0026\u0026g.route_type===\"wire\"\u0026\u0026Math.abs(u.x-g.x)\u003c.01\u0026\u0026Math.abs(u.y-g.y)\u003c.01;for(const I of a.values())u.route_type===\"wire\"\u0026\u0026I.some(C=\u003eLv({x:u.x,y:u.y},C))\u0026\u0026(m=!0),g.route_type===\"wire\"\u0026\u0026I.some(C=\u003eLv({x:g.x,y:g.y},C))\u0026\u0026(_=!0);m||u.route_type!==\"wire\"||e.push({type:\"pcb_trace_error\",message:`Trace [${p}] has disconnected endpoint at (${u.x.toFixed(2)}, ${u.y.toFixed(2)})`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${l.pcb_trace_id}_start`,center:{x:u.x,y:u.y},pcb_component_ids:[],pcb_port_ids:[]}),_||g.route_type!==\"wire\"||f\u0026\u0026!m||e.push({type:\"pcb_trace_error\",message:`Trace [${p}] has disconnected endpoint at (${g.x.toFixed(2)}, ${g.y.toFixed(2)})`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:\"pcb_trace_error\",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${l.pcb_trace_id}_end`,center:{x:g.x,y:g.y},pcb_component_ids:[],pcb_port_ids:[]})}}return e}function ado(t,e={}){const n=[],o=yH(t);if(!o)return n;const i=e.margin??xH(o,\"min_board_edge_clearance\")??jgo,r=(function(a){if(a.outline\u0026\u0026a.outline.length\u003e0)return a.outline.map(A=\u003e({x:A.x,y:A.y}));if(a.center\u0026\u0026typeof a.width==\"number\"\u0026\u0026typeof a.height==\"number\"){const A=a.center.x,c=a.center.y,l=a.width/2,u=a.height/2;return[{x:A-l,y:c-u},{x:A+l,y:c-u},{x:A+l,y:c+u},{x:A-l,y:c+u}]}return null})(o);if(!r)return n;const s=nI(t).pcb_trace.list();for(const a of s)if(!(a.route.length\u003c2))for(let A=0;A\u003ca.route.length-1;A++){const c=a.route[A],l=a.route[A+1];if(c.route_type!==\"wire\"||l.route_type!==\"wire\")continue;const u=\"width\"in c?c.width:\"width\"in l?l.width:.1,g={x:c.x,y:c.y},h={x:l.x,y:l.y};let d=Number.POSITIVE_INFINITY;for(let m=0;m\u003cr.length;m++){const _=M5(g,h,r[m],r[(m+1)%r.length]);_\u003cd\u0026\u0026(d=_)}const p=u/2+i;if(d\u003cp){const m={type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",pcb_trace_error_id:`trace_too_close_to_board_${a.pcb_trace_id}_segment_${A}`,message:`Trace too close to board edge (${d.toFixed(3)}mm \u003c ${p.toFixed(3)}mm required, margin: ${i}mm)`,pcb_trace_id:a.pcb_trace_id,source_trace_id:a.source_trace_id||\"\",center:{x:(g.x+h.x)/2,y:(g.y+h.y)/2},pcb_component_ids:[],pcb_port_ids:[]};n.push(m)}}return n}function Ado(t,{connMap:e,minClearance:n}={}){const o=(c=\u003e[...nI(c).pcb_smtpad.list(),...nI(c).pcb_plated_hole.list()])(t),i=Q6t(t);if(o.length===0||i.length===0)return[];const r=yH(t);n??=xH(r,\"min_trace_to_pad_edge_clearance\")??b6t,e??=eL(t);const s=new w6t({objects:o,getBounds:Pce,getId:c=\u003egv(c)}),a=new Map,A=new Set;for(const c of i){const l=s.getObjectsInBounds(EH(c),n+c.thickness/2);for(const u of l){const g=gv(u);if(!gQe(u).includes(c.layer)||e.areIdsConnected(c.pcb_trace_id,g))continue;const h=`${g}_${c.pcb_trace_id}`,{gap:d}=uQe(c,u);if(Mce(d)){a.delete(h),A.add(h);continue}if(A.has(h)||d+Hv\u003e=n)continue;const p={type:\"pcb_pad_trace_clearance_error\",pcb_pad_trace_clearance_error_id:`pad_trace_clearance_${h}`,error_type:\"pcb_pad_trace_clearance_error\",message:`Pad ${Ny(t,g)} and trace ${Ny(t,c.pcb_trace_id)} are too close (clearance: ${zae(d)}, minimum: ${zae(n)})`,pcb_pad_id:g,pcb_trace_id:c.pcb_trace_id,minimum_clearance:n,actual_clearance:d,center:v6t(c)},m=a.get(h);(!m||d\u003cm.gap)\u0026\u0026a.set(h,{error:p,gap:d})}}return Array.from(a.values()).map(({error:c})=\u003ec)}var cdo=(t,e={})=\u003e{const n=(d=\u003e{const p=eL(d),m=d.filter(_=\u003e_.type===\"pcb_via\"\u0026\u0026typeof _.pcb_trace_id==\"string\").map(_=\u003e[_.pcb_via_id,_.pcb_trace_id]);return p.addConnections(m),p})(t),o=Math.max(e.viaClearance??.1,.1),i=ndo(t,{connMap:n,minClearance:e.traceClearance}),r=e.includeTypedTraceClearance!==!1,s=r?(function(d,{connMap:p,minClearance:m}={}){const _=d.filter(x=\u003ex.type===\"pcb_via\"),f=Q6t(d);if(_.length===0||f.length===0)return[];const I=yH(d);m??=xH(I,\"min_trace_to_pad_edge_clearance\")??b6t,p??=eL(d);const C=new Map,y=new Set;for(const x of _)for(const E of f){if(!gQe(x).includes(E.layer)||p.areIdsConnected(E.pcb_trace_id,x.pcb_via_id))continue;const B=`${x.pcb_via_id}_${E.pcb_trace_id}`,{gap:S}=uQe(E,x);if(Mce(S)){C.delete(B),y.add(B);continue}if(y.has(B)||S+Hv\u003e=m)continue;const Q={type:\"pcb_via_trace_clearance_error\",pcb_via_trace_clearance_error_id:`via_trace_clearance_${B}`,error_type:\"pcb_via_trace_clearance_error\",message:`Via ${Ny(d,x.pcb_via_id)} and trace ${Ny(d,E.pcb_trace_id)} are too close (clearance: ${zae(S)}, minimum: ${zae(m)})`,pcb_via_id:x.pcb_via_id,pcb_trace_id:E.pcb_trace_id,minimum_clearance:m,actual_clearance:S,center:v6t(E)},w=C.get(B);(!w||S\u003cw.gap)\u0026\u0026C.set(B,{error:Q,gap:S})}return Array.from(C.values()).map(({error:x})=\u003ex)})(t,{connMap:n,minClearance:e.traceClearance}):[],a=r?Ado(t,{connMap:n,minClearance:e.traceClearance}):[],A=[...odo(t,{connMap:n,minClearance:o}),...ido(t,{connMap:n,minClearance:o})],c=[...i,...ado(t),...e.includeTraceContinuity===!1?[]:sdo(t),...s,...a,...A],l=t.filter(d=\u003ed.type===\"pcb_via\"),u=new Map(l.map(d=\u003e[d.pcb_via_id,d])),g=c.map(d=\u003e{if(d.type===\"pcb_via_trace_clearance_error\"\u0026\u0026typeof d.pcb_via_id==\"string\"){const p=u.get(d.pcb_via_id);if(p)return{...d,center:{x:p.x,y:p.y}}}if(\"center\"in d\u0026\u0026d.center)return d;if(\"pcb_center\"in d\u0026\u0026d.pcb_center)return{...d,center:d.pcb_center};if(\"pcb_via_ids\"in d\u0026\u0026Array.isArray(d.pcb_via_ids)){const[p,m]=d.pcb_via_ids,_=u.get(p),f=u.get(m);if(_\u0026\u0026f)return{...d,center:{x:(_.x+f.x)/2,y:(_.y+f.y)/2}}}if(\"pcb_error_id\"in d\u0026\u0026typeof d.pcb_error_id==\"string\"\u0026\u0026(d.pcb_error_id.startsWith(\"same_net_vias_close_\")||d.pcb_error_id.startsWith(\"different_net_vias_close_\"))){const p=d.pcb_error_id.replace(\"same_net_vias_close_\",\"\").replace(\"different_net_vias_close_\",\"\").split(\"_\").filter(Boolean);if(p.length===2){const m=u.get(p[0]),_=u.get(p[1]);if(m\u0026\u0026_)return{...d,center:{x:(m.x+_.x)/2,y:(m.y+_.y)/2}}}}return d}),h=g.filter(d=\u003e!!d.center);return{errors:c,errorsWithCenters:g,locationAwareErrors:h}},hQe={traceClearance:.1,viaClearance:.1},T6t=t=\u003et.circuitJsonMetadata??{},k6t=({connections:t,obstacles:e})=\u003enew Set([...t.flatMap(n=\u003en.pointsToConnect.flatMap(o=\u003eo.pcb_port_id?[o.pcb_port_id]:[])),...e.flatMap(n=\u003e{const o=T6t(n).pcb_port_id;return o?[o]:[]})]),pQe=t=\u003et.__netConnectionName??t.__rootConnectionNames?.[0]??t.name,ldo=t=\u003eArray.from(new Set([t.name,t.__netConnectionName,...t.__rootConnectionNames??[],...t.pointsToConnect.flatMap(e=\u003e[e.pointId,e.pcb_port_id])])).filter(e=\u003e!!e),F6t=(t,e)=\u003e{const n=new Map,o=new Set,i=new Map;for(const r of t){const s=pQe(r);for(const l of ldo(r)){const u=n.get(l);u\u0026\u0026u!==s?(n.delete(l),o.add(l)):o.has(l)||n.set(l,s)}const a=e.getNetConnectedToId(r.name);if(!a)continue;const A=a,c=i.get(A)??new Set;c.add(s),i.set(A,c)}return{connMap:e,circuitJsonSourceTraceIdBySrjDeclaredConnectionReference:n,circuitJsonSourceTraceIdsByConnectivityNetId:i}},BH=(t,e)=\u003e{const n=t.circuitJsonSourceTraceIdBySrjDeclaredConnectionReference.get(e);if(n)return n;const o=t.connMap.getNetConnectedToId(e);if(!o)return;const i=t.circuitJsonSourceTraceIdsByConnectivityNetId.get(o);return i?.size===1?i.values().next().value:void 0};function udo(t,e,n=t){const o=[],i=n===t?t.connections:[...t.connections,...n.connections],r=n===t?t.obstacles:n.obstacles,s=F6t(i,Jm(n===t?t:{...n,connections:i})),a=k6t({connections:i,obstacles:r});if(i.forEach(A=\u003e{const c=A.pointsToConnect.map(_=\u003e_.pcb_port_id).filter(_=\u003e!!_),l=new Set(c),u=_=\u003e(f=\u003eArray.from(new Set(f.flatMap(I=\u003eI.connectedTo))))(_).filter(f=\u003e!l.has(f)),g=A.pointsToConnect.map(_=\u003e_.pointId).filter(_=\u003e!!_),h=BH(s,A.name)??pQe(A),d=[],p=e.find(_=\u003e(_.connection_name??_.connectionName)===A.name);if(p){const _=I=\u003e\"route_type\"in I\u0026\u0026I.route_type===\"jumper\"?I.start:\"x\"in I\u0026\u0026\"y\"in I?{x:I.x,y:I.y}:{x:0,y:0},f=[_(p.route[0]),_(p.route[p.route.length-1])];for(const I of f)for(const C of r)o7(I,C)\u003c=0\u0026\u0026d.push(C)}const m=o.find(_=\u003e_.type===\"source_trace\"\u0026\u0026_.source_trace_id===h);if(m){const _=m;_.connected_source_port_ids=[...new Set([..._.connected_source_port_ids,...c])],_.connected_source_net_ids=[...new Set([..._.connected_source_net_ids??[],...g,...u(d)])]}else o.push({type:\"source_trace\",source_trace_id:h,connected_source_port_ids:c,connected_source_net_ids:u(d).concat(g)})}),e[0]\u0026\u0026\"type\"in e[0]){const A=new Map(i.map(c=\u003e[c.name,c]));for(const c of e){const l=[...new Set((c.connectsTo??[]).filter(m=\u003ea.has(m)))],u=new Set(l),g=[...new Set((c.connectsTo??[]).filter(m=\u003e!u.has(m)))];if(l.length===0\u0026\u0026g.length===0)continue;const h=A.get(c.connection_name),d=BH(s,c.connection_name)??c.connectsTo?.map(m=\u003eBH(s,m)).find(m=\u003em!==void 0)??(h?pQe(h):c.connection_name),p=o.find(m=\u003em.type===\"source_trace\"\u0026\u0026m.source_trace_id===d);p?.type!==\"source_trace\"?o.push({type:\"source_trace\",source_trace_id:d,connected_source_port_ids:l,connected_source_net_ids:g}):(p.connected_source_port_ids=[...new Set([...p.connected_source_port_ids,...l])],p.connected_source_net_ids=[...new Set([...p.connected_source_net_ids??[],...g])])}}return o}function gdo(t,e,n){let o,i=Number.POSITIVE_INFINITY;for(const r of e){const s=n.get(r);if(!s)continue;const a=Math.hypot(s.x-t.x,s.y-t.y);a\u003ci\u0026\u0026(i=a,o=r)}return o??e[0]}var ddo=new Set([\"top\",\"bottom\",\"inner1\",\"inner2\",\"inner3\",\"inner4\",\"inner5\",\"inner6\",\"inner7\",\"inner8\"]),bH=t=\u003eddo.has(t);function hdo(t){const e=[],n=new Set,o=new Set,i=(function(s){const a=new Map;for(const A of s.connections)for(const c of A.pointsToConnect)c.pcb_port_id\u0026\u0026a.set(c.pcb_port_id,{x:c.x,y:c.y});return a})(t),r=k6t(t);for(const s of t.obstacles){const a=s.connectedTo,A=T6t(s);if(A.pcb_via_id)continue;const c=A.pcb_smtpad_id,l=A.pcb_plated_hole_id,u=[...new Set([...A.pcb_port_id?[A.pcb_port_id]:[],...a.filter(C=\u003er.has(C))])],g=gdo(s.center,u,i);if(!c\u0026\u0026!l\u0026\u0026!g)continue;const h=s.layers.filter(bH);if(h.length===0)continue;const d=s.width,p=s.height,m=s.center.x,_=s.center.y,f=s.ccwRotationDegrees;if(l||h.length\u003e1){const C=l??`pcb_plated_hole_${m.toFixed(3)}_${_.toFixed(3)}`;if(o.has(C))continue;if(o.add(C),typeof f==\"number\"\u0026\u0026Number.isFinite(f)){const y=Math.max(.5*Math.min(d,p),.1);e.push({type:\"pcb_plated_hole\",pcb_plated_hole_id:C,shape:\"rotated_pill_hole_with_rect_pad\",hole_shape:\"rotated_pill\",pad_shape:\"rect\",hole_width:y,hole_height:y,hole_ccw_rotation:f,rect_pad_width:d,rect_pad_height:p,rect_ccw_rotation:f,hole_offset_x:0,hole_offset_y:0,x:m,y:_,layers:h,...g?{pcb_port_id:g}:{}});continue}if(Math.abs(d-p)\u003c.001){e.push({type:\"pcb_plated_hole\",pcb_plated_hole_id:C,shape:\"circle\",outer_diameter:Math.max(d,p),hole_diameter:Math.max(.5*Math.min(d,p),.1),x:m,y:_,layers:h,...g?{pcb_port_id:g}:{}});continue}e.push({type:\"pcb_plated_hole\",pcb_plated_hole_id:C,shape:\"circular_hole_with_rect_pad\",hole_shape:\"circle\",hole_diameter:Math.max(.5*Math.min(d,p),.1),rect_pad_width:d,rect_pad_height:p,hole_offset_x:0,hole_offset_y:0,x:m,y:_,layers:h,...g?{pcb_port_id:g}:{}});continue}const I=c??`pcb_smtpad_${m.toFixed(3)}_${_.toFixed(3)}`;n.has(I)||(n.add(I),typeof f==\"number\"\u0026\u0026Number.isFinite(f)?e.push({type:\"pcb_smtpad\",pcb_smtpad_id:I,layer:h[0],shape:\"rotated_rect\",x:m,y:_,width:d,height:p,ccw_rotation:f,...g?{pcb_port_id:g}:{}}):e.push({type:\"pcb_smtpad\",pcb_smtpad_id:I,layer:h[0],shape:\"rect\",width:d,height:p,x:m,y:_,...g?{pcb_port_id:g}:{}}))}return e}function pdo(t,e,n={}){const{minTraceWidth:o=.1,minViaDiameter:i,minViaHoleDiameter:r,originalSrj:s,includeOriginalConnections:a=!1}=n,A=om(t),c=i??A.padDiameter,l=t.min_via_hole_diameter??t.minViaHoleDiameter,u=r??l??(i!==void 0?.5*c:A.holeDiameter),g=[];g.push(...udo(t,e,a\u0026\u0026s?s:t)),g.push(...(function(d){const p=new Map;return d.connections.forEach(m=\u003e{m.pointsToConnect.forEach(_=\u003e{_.pcb_port_id\u0026\u0026p.set(_.pcb_port_id,{type:\"pcb_port\",pcb_port_id:_.pcb_port_id,source_port_id:_.pcb_port_id,x:_.x,y:_.y,layers:RD(_)})})}),Array.from(p.values())})(a\u0026\u0026s?s:t)),g.push(...hdo(s??t)),g.push(...(function(d,p,m=.3,_=.5*m){const f=[],I=new Set;return d.length\u003e0\u0026\u0026(\"type\"in d[0]\u0026\u0026d[0].type===\"pcb_trace\"?d.forEach(C=\u003e{C.route.forEach(y=\u003e{if(y.route_type===\"via\"){if(!bH(y.from_layer)||!bH(y.to_layer))return;const x=y.via_diameter??m,E=y.via_hole_diameter??_,B=`${y.x},${y.y},${y.from_layer},${y.to_layer}`;I.has(B)||(f.push({type:\"pcb_via\",pcb_via_id:`via_${f.length}`,pcb_trace_id:C.pcb_trace_id,x:y.x,y:y.y,outer_diameter:x,hole_diameter:E,layers:[y.from_layer,y.to_layer]}),I.add(B))}})}):d.forEach((C,y)=\u003e{const x=`trace_${y}`,E=C.viaDiameter??m,B=_;for(let S=1;S\u003cC.route.length;S++){const Q=C.route[S-1],w=C.route[S];if(Q.z!==w.z\u0026\u0026Math.abs(Q.x-w.x)\u003c.01\u0026\u0026Math.abs(Q.y-w.y)\u003c.01){const M=Kh(Q.z,p),k=Kh(w.z,p),R=`${w.x},${w.y},${M},${k}`;I.has(R)||(f.push({type:\"pcb_via\",pcb_via_id:`via_${f.length}`,pcb_trace_id:x,x:w.x,y:w.y,outer_diameter:E,hole_diameter:B,layers:[M,k]}),I.add(R))}}})),f})(e,t.layerCount,c,u));const h=F6t(t.connections,Jm(t));return e.length\u003e0\u0026\u0026(\"type\"in e[0]\u0026\u0026e[0].type===\"pcb_trace\"?e.forEach(d=\u003e{const p=BH(h,d.connection_name)??d.connectsTo?.map(m=\u003eBH(h,m)).find(m=\u003e!!m)??d.connection_name;g.push((function(m,_){return{type:\"pcb_trace\",pcb_trace_id:m.pcb_trace_id,source_trace_id:_,route:m.route.map(f=\u003e{if(f.route_type===\"wire\"){if(!bH(f.layer))return null;const I=\"start_pcb_port_id\"in f\u0026\u0026typeof f.start_pcb_port_id==\"string\"?f.start_pcb_port_id:void 0,C=\"end_pcb_port_id\"in f\u0026\u0026typeof f.end_pcb_port_id==\"string\"?f.end_pcb_port_id:void 0;return{route_type:\"wire\",x:f.x,y:f.y,width:f.width,layer:f.layer,...I?{start_pcb_port_id:I}:{},...C?{end_pcb_port_id:C}:{}}}return f.route_type===\"via\"\u0026\u0026bH(f.from_layer)\u0026\u0026bH(f.to_layer)?{route_type:\"via\",x:f.x,y:f.y,from_layer:f.from_layer,to_layer:f.to_layer}:null}).filter(f=\u003ef!==null)}})(d,p))}):e.forEach((d,p)=\u003e{const m=(function(_,f,I,C,y=.1){const x=[];if(!_.jumpers||_.jumpers.length===0)return[{type:\"pcb_trace\",pcb_trace_id:f,source_trace_id:I,route:_.route.map((Q,w)=\u003e{const M=w===0,k=w===_.route.length-1;return{route_type:\"wire\",x:Q.x,y:Q.y,width:Q.traceThickness??y,layer:Kh(Q.z,C),...M\u0026\u0026Q.pcb_port_id?{start_pcb_port_id:Q.pcb_port_id}:{},...k\u0026\u0026Q.pcb_port_id?{end_pcb_port_id:Q.pcb_port_id}:{}}})}];const E=[];for(const Q of _.jumpers){let w=-1,M=-1;for(let k=0;k\u003c_.route.length;k++){const R=_.route[k];Math.abs(R.x-Q.start.x)\u003c.01\u0026\u0026Math.abs(R.y-Q.start.y)\u003c.01\u0026\u0026(w=k),Math.abs(R.x-Q.end.x)\u003c.01\u0026\u0026Math.abs(R.y-Q.end.y)\u003c.01\u0026\u0026(M=k)}w!==-1\u0026\u0026M!==-1\u0026\u0026(w\u003eM\u0026\u0026([w,M]=[M,w]),E.push({startIdx:w,endIdx:M}))}E.sort((Q,w)=\u003eQ.startIdx-w.startIdx);let B=0,S=0;for(const{startIdx:Q,endIdx:w}of E){if(Q\u003e=B){const M=_.route.slice(B,Q+1);M.length\u003e0\u0026\u0026(x.push({type:\"pcb_trace\",pcb_trace_id:`${f}_${S}`,source_trace_id:I,route:M.map((k,R)=\u003e{const F=R===0\u0026\u0026B===0;return{route_type:\"wire\",x:k.x,y:k.y,width:k.traceThickness??y,layer:Kh(k.z,C),...F\u0026\u0026k.pcb_port_id?{start_pcb_port_id:k.pcb_port_id}:{}}})}),S++)}B=w}if(B\u003c_.route.length){const Q=_.route.slice(B);Q.length\u003e0\u0026\u0026x.push({type:\"pcb_trace\",pcb_trace_id:`${f}_${S}`,source_trace_id:I,route:Q.map((w,M)=\u003e{const k=M===Q.length-1;return{route_type:\"wire\",x:w.x,y:w.y,width:w.traceThickness??y,layer:Kh(w.z,C),...k\u0026\u0026w.pcb_port_id?{end_pcb_port_id:w.pcb_port_id}:{}}})})}return x})(d,`trace_${p}`,BH(h,d.connectionName)??d.connectionName,t.layerCount,o);g.push(...m)})),g}var mQe=(t,e)=\u003e{const n=new Set(e.flatMap(o=\u003eo.__replaces_pcb_trace_id?[o.__replaces_pcb_trace_id]:[]));return[...t.filter(o=\u003e!n.has(o.pcb_trace_id)),...e]},_Qe=({inputSrj:t,srjWithPointPairs:e,routedTraces:n,drcOptions:o})=\u003e{const i=t.traces??[],r=pdo(e,mQe(i,n),{minTraceWidth:t.minTraceWidth,minViaDiameter:t.minViaDiameter,originalSrj:t,includeOriginalConnections:!0});return{circuitJson:r,...cdo(r,{...hQe,...o})}},mdo=class extends zA{params;inputHdRoutes;outputHdRoutes;phase=\"start\";fastProbeSolver;fallbackSolver;selectedSolver;fastProbeDrcIssueCount;fastProbeAttempted=!1;constructor(e){super(),this.params=e,this.inputHdRoutes=e.hdRoutes,this.outputHdRoutes=e.hdRoutes}getConstructorParams(){return[{...this.params,hdRoutes:this.inputHdRoutes}]}startFastProbe(){this.fastProbeAttempted=!0,this.fastProbeSolver=new jbe({...this.params,hdRoutes:this.inputHdRoutes,maxIterations:4,broadPassMultiplier:.1}),this.activeSubSolver=this.fastProbeSolver,this.phase=\"fastProbe\"}startFallback(){this.fallbackSolver=new jbe({...this.params,hdRoutes:this.inputHdRoutes}),this.activeSubSolver=this.fallbackSolver,this.phase=\"fallback\"}evaluateFastProbeDrcIssueCount(e){const n=this.fastProbeSolver?.stats.finalDrcIssueCount;if(typeof n==\"number\"\u0026\u0026Number.isFinite(n)\u0026\u0026n\u003e=0)return n;const o=this.params.drcEvaluator?.({traces:[],srj:this.params.srj,routes:e,hdRoutes:e});return o?Array.isArray(o)?o.length:o.errors.length:void 0}finish(e,n){this.outputHdRoutes=e.getOutput(),this.selectedSolver=e,this.activeSubSolver=null,this.phase=\"done\",this.progress=1,this.stats={...e.stats,pipeline7AdaptiveExactDrcFastProbeAttempted:this.fastProbeAttempted,pipeline7AdaptiveExactDrcFastProbeAccepted:n,pipeline7AdaptiveExactDrcFastProbeDrcIssueCount:this.fastProbeDrcIssueCount},this.solved=!0}_step(){if(this.phase!==\"start\"){if(this.phase===\"fastProbe\"){try{this.fastProbeSolver.step()}catch{return void this.startFallback()}if(this.fastProbeSolver.failed)return void this.startFallback();if(!this.fastProbeSolver.solved)return;const e=this.fastProbeSolver.getOutput();try{this.fastProbeDrcIssueCount=this.evaluateFastProbeDrcIssueCount(e)}catch{return void this.startFallback()}return void(this.fastProbeDrcIssueCount===0?this.finish(this.fastProbeSolver,!0):this.startFallback())}if(this.phase===\"fallback\"){if(this.fallbackSolver.step(),this.fallbackSolver.failed)throw new Error(`Pipeline7 full DRC repair portfolio failed: ${this.fallbackSolver.error}`);this.fallbackSolver.solved\u0026\u0026this.finish(this.fallbackSolver,!1)}}else this.params.srj.layerCount===2\u0026\u0026this.params.enableSafeTraceLayerMoves?this.startFastProbe():this.startFallback()}getOutput(){return this.outputHdRoutes}visualize(){return(this.activeSubSolver??this.selectedSolver)?.visualize()??super.visualize()}preview(){return(this.activeSubSolver??this.selectedSolver)?.preview()??this.visualize()}},DN=(t,e)=\u003e{const n=t({hdRoutes:e,traces:[]});return Array.isArray(n)?n:n.errorsWithCenters??n.errors},_do=({error:t,preloadRepairTraceIds:e})=\u003e(o=\u003e{const i=typeof o.pcb_trace_id==\"string\"?o.pcb_trace_id:void 0,r=Array.isArray(o.pcb_trace_ids)?o.pcb_trace_ids.filter(c=\u003etypeof c==\"string\"):[],s=[...typeof o.pcb_via_id==\"string\"?[o.pcb_via_id]:[],...Array.isArray(o.pcb_via_ids)?o.pcb_via_ids:[]].filter(c=\u003etypeof c==\"string\"),a=i?`overlap_${i}_`:void 0,A=a\u0026\u0026typeof o.pcb_trace_error_id==\"string\"\u0026\u0026o.pcb_trace_error_id.startsWith(a)?o.pcb_trace_error_id.slice(a.length):void 0;if(r.length\u003e0){const c=i\u0026\u0026!r.includes(i)?[i,...r]:[...r];return c.length\u003c2\u0026\u0026A\u0026\u0026!s.includes(A)\u0026\u0026c.push(A),c}return[i,A].filter(c=\u003etypeof c==\"string\"\u0026\u0026!s.includes(c))})(t).some(o=\u003ee.has(o))?!0:(t.__collapsed_trace_participants??[]).flatMap(o=\u003enew Set(o.evaluationTraceIds).size\u003e1?[o.solverTraceId]:[]).some(o=\u003ee.collidingFixedTraceIds?.has(o)),L6t=t=\u003et.reduce((e,n)=\u003e{if(typeof n.actual_clearance==\"number\"\u0026\u0026typeof n.minimum_clearance==\"number\")return e+Math.max(0,n.minimum_clearance-n.actual_clearance);const o=(typeof n.message==\"string\"?n.message:\"\").match(/gap: (-?\\d+(?:\\.\\d+)?)mm/);return o?e+Math.max(0,.1-Number.parseFloat(o[1])):e+1},0),Nce=(t,e)=\u003et.length\u003ce.length||t.length===e.length\u0026\u0026L6t(t)\u003cL6t(e)-1e-9,fQe=({routes:t,newConnections:e,syntheticConnectionNames:n})=\u003e{const o=new Set([...e.map(s=\u003es.name),...n]),i=new Map,r=new Map;for(let s=0;s\u003ct.length;s++){const a=t[s];if(!o.has(a.connectionName))continue;const A=i.get(a.connectionName)??0;i.set(a.connectionName,A+1),r.set(`${a.connectionName}_${A}`,s)}return r},fdo=[3,4,5,6,8],Ido=(t,e)=\u003e{const n=typeof t.pcb_pad_id==\"string\"?t.pcb_pad_id:typeof t.pcb_trace_error_id==\"string\"?t.pcb_trace_error_id.match(/(pcb_(?:smtpad|plated_hole|hole|keepout)_\\d+)$/)?.[1]:void 0;if(n){const o=e.obstacles.find(i=\u003ei.obstacleId===n||i.connectedTo[0]===n);if(o)return o.center}return(o=\u003e{const i=o.center;return i\u0026\u0026typeof i==\"object\"\u0026\u0026\"x\"in i\u0026\u0026\"y\"in i\u0026\u0026typeof i.x==\"number\"\u0026\u0026typeof i.y==\"number\"?{x:i.x,y:i.y}:void 0})(t)},Cdo=({error:t,routeIndexByTraceId:e})=\u003e{const n=typeof t.pcb_trace_id==\"string\"?t.pcb_trace_id:void 0,o=[...typeof t.pcb_via_id==\"string\"?[t.pcb_via_id]:[],...Array.isArray(t.pcb_via_ids)?t.pcb_via_ids.filter(a=\u003etypeof a==\"string\"):[]],i=n?`overlap_${n}_`:void 0,r=i\u0026\u0026typeof t.pcb_trace_error_id==\"string\"\u0026\u0026t.pcb_trace_error_id.startsWith(i)?t.pcb_trace_error_id.slice(i.length):void 0,s=r!==void 0\u0026\u0026o.includes(r);return[n,...Array.isArray(t.pcb_trace_ids)?t.pcb_trace_ids:[],s?void 0:r].filter(a=\u003etypeof a==\"string\"\u0026\u0026e.has(a)).filter((a,A,c)=\u003ec.indexOf(a)===A)},H6t=t=\u003et.map((e,n)=\u003e({...e,preloadedTraceId:`pipeline9_joint_candidate_${n}`,preloadedTraceIndex:n,preloadedRouteIndex:0,isThroughObstacle:!1})),O6t=(t,e)=\u003et.minX\u003c=e.maxX\u0026\u0026t.maxX\u003e=e.minX\u0026\u0026t.minY\u003c=e.maxY\u0026\u0026t.maxY\u003e=e.minY,G6t=t=\u003e({minX:t.center.x-t.diameter/2,maxX:t.center.x+t.diameter/2,minY:t.center.y-t.diameter/2,maxY:t.center.y+t.diameter/2}),ydo=t=\u003e({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2}),xdo=(t,e)=\u003e{const n=MN(t);return n.wireSegments.some(o=\u003eO6t((i=\u003e({minX:Math.min(i.start.x,i.end.x)-i.width/2,maxX:Math.max(i.start.x,i.end.x)+i.width/2,minY:Math.min(i.start.y,i.end.y)-i.width/2,maxY:Math.max(i.start.y,i.end.y)+i.width/2}))(o),e))||n.viaSpans.some(o=\u003eO6t(G6t(o),e))},Edo=({routes:t,fixedObstacleRoutes:e,routeIndex:n,center:o,regionSize:i,srj:r,connMap:s,colorMap:a,viaDiameter:A,traceWidth:c,obstacleMargin:l,effort:u})=\u003e{const g=H6t(t),h=g[n];if(!h)return;const d={capacityMeshNodeId:`pipeline9_joint_drc_${n}_${i}`,center:o,width:i,height:i,availableZ:Array.from({length:r.layerCount},(C,y)=\u003ey),portPoints:[],portPointsInPairs:[]},p=MW(d,[h]),m=p.fixedRouteSectionsByConnectionName.get(h.connectionName);if(!m)return;const _=g.filter((C,y)=\u003ey!==n),f=new sQe({nodePortPoints:[p.nodeWithPortPoints],fixedHdRoutes:[..._,...e],connMap:s,colorMap:a,obstacles:r.obstacles,layerCount:r.layerCount,viaDiameter:A,traceWidth:c,obstacleMargin:l,effort:u,preserveTerminalPcbPortIds:!0,includeBoardObstacles:!0,enableRegionalFallback:!1,maxB01Rips:120});if(f.solve(),!f.solved||f.failed)return;const I=f.routes.find(C=\u003eC.connectionName===h.connectionName);return I?{routes:t.map((C,y)=\u003ey===n?eQe(m,I):C),usedFallback:Number(f.stats.fallbackNodeCount??0)\u003e0}:void 0},Bdo=({routes:t,fixedRouteCopperSpatialIndex:e,center:n,regionSize:o,srj:i,connMap:r,colorMap:s,viaDiameter:a,traceWidth:A,obstacleMargin:c,effort:l})=\u003e{const u=H6t(t),g={capacityMeshNodeId:\"pipeline9_joint_drc_regular_fallback\",center:n,width:o,height:o,availableZ:Array.from({length:i.layerCount},(B,S)=\u003eS),portPoints:[],portPointsInPairs:[]},h=MW(g,u);if(h.fixedRouteSectionsByConnectionName.size===0||!(B=\u003e{const S=W7t(B);return B.portPoints.every(Q=\u003eCft({point:Q,bounds:S})===\"on-boundary\")})(h.nodeWithPortPoints))return;const d=[...h.fixedRouteSectionsByConnectionName.values()].flatMap(B=\u003eB.sourceRoutes).reduce((B,S)=\u003e{const Q=MN(S);return Math.max(B,S.viaDiameter/2,...Q.wireSegments.map(w=\u003ew.width/2),...Q.viaSpans.map(w=\u003ew.diameter/2))},Math.max(A/2,a/2)),p={minX:n.x-o/2-c-d,maxX:n.x+o/2+c+d,minY:n.y-o/2-c-d,maxY:n.y+o/2+c+d},m=e.getRoutesOverlappingBounds(p),_=g6t({fixedObstacleRoutes:m,layerCount:i.layerCount}),f=new m6t({nodeWithPortPoints:h.nodeWithPortPoints,colorMap:s,connMap:r,viaDiameter:a,traceWidth:A,obstacleMargin:c,effort:l,obstacles:[...i.obstacles,..._],layerCount:i.layerCount});if(f.solve(),!f.solved||f.failed)return;const I=f.getOutput(),C=new Map(I.map(B=\u003e[B.connectionName,B])),y=new Map,x=new Set;for(const[B,S]of h.fixedRouteSectionsByConnectionName){const Q=C.get(B);if(!Q)return;y.set(S.sourceRoutes[0].preloadedTraceIndex,eQe(S,Q));for(const w of S.sourceRoutes.slice(1))x.add(w.preloadedTraceIndex)}const E=u.flatMap((B,S)=\u003ex.has(S)?[]:[y.get(S)??B]);return(({candidateRoutes:B,fixedObstacleRoutes:S,obstacleMargin:Q,connMap:w,candidateBounds:M})=\u003e{for(const k of B)for(const R of S)if(!d6t(k,R,w)\u0026\u0026p6t({left:k,right:R,clearance:Q,leftBounds:M}))return!0;return!1})({candidateRoutes:E,fixedObstacleRoutes:m,obstacleMargin:c,connMap:r,candidateBounds:p})?void 0:E},bdo=({srj:t,routes:e,fixedObstacleRoutes:n,newConnections:o,syntheticConnectionNames:i,drcEvaluator:r,initialErrors:s,preloadRepairTraceIds:a,connMap:A,colorMap:c,viaDiameter:l,traceWidth:u,obstacleMargin:g,effort:h})=\u003e{let d=e,p=s??DN(r,d),m=0,_=0,f=0,I=0,C=!1;const y=(Q=\u003e{if(!Number.isInteger(Q)||Q\u003c0)throw new Error(\"Pipeline9 regional repair route count must be nonnegative\");const w=Math.floor(7e3/Math.max(1,Q));return Math.max(16,Math.min(192,w))})(e.length),x=p.filter(Q=\u003e_do({error:Q,preloadRepairTraceIds:a})).length;if(x===0)return{routes:d,attemptedCandidateCount:m,acceptedCandidateCount:_,fallbackCandidateCount:f,candidateSearchCount:I,candidateSearchBudget:y,candidateSearchBudgetExhausted:C,safeTraceLayerRepairSkippedForBudget:!1,remainingDrcIssueCount:p.length,preloadEligibleDrcIssueCount:x,preloadRepairAttempted:!1};const E=(Q=\u003e{const w=new Map,M=(k,R)=\u003e{const F=Math.floor(R.minX/4),O=Math.floor(R.maxX/4),U=Math.floor(R.minY/4),Y=Math.floor(R.maxY/4);for(let W=F;W\u003c=O;W++)for(let te=U;te\u003c=Y;te++){const j=`${W}:${te}`,J=w.get(j)??new Set;J.add(k),w.set(j,J)}};for(let k=0;k\u003cQ.length;k++){const R=MN(Q[k]);for(const F of R.wireSegments)for(const O of u6t(F,4,1))M(k,ydo(O));for(const F of R.viaSpans)M(k,G6t(F))}return{getRoutesOverlappingBounds:k=\u003e{const R=new Set,F=Math.floor(k.minX/4),O=Math.floor(k.maxX/4),U=Math.floor(k.minY/4),Y=Math.floor(k.maxY/4);for(let W=F;W\u003c=O;W++)for(let te=U;te\u003c=Y;te++)for(const j of w.get(`${W}:${te}`)??[])R.add(j);return[...R].sort((W,te)=\u003eW-te).map(W=\u003eQ[W]).filter(W=\u003exdo(W,k))}}})(n);for(let Q=0;Q\u003c2\u0026\u0026!C;Q++){let w=!1;const M=fQe({routes:d,newConnections:o,syntheticConnectionNames:i}),k=p.filter(R=\u003e(R.type===\"pcb_trace_error\"||R.type===\"pcb_pad_trace_clearance_error\"||R.type===\"pcb_via_trace_clearance_error\"||R.type===\"pcb_via_clearance_error\")\u0026\u0026typeof R.pcb_trace_id==\"string\");for(const R of k){if(C)break;const F=Ido(R,t),O=Cdo({error:R,routeIndexByTraceId:M});if(!F)continue;let U=d,Y=p;for(const W of O.slice(0,2)){if(C)break;const te=M.get(W);if(te!==void 0){for(const j of fdo){if(I\u003e=y){C=!0;break}I++;const J=Edo({routes:d,fixedObstacleRoutes:n,routeIndex:te,center:F,regionSize:j,srj:t,connMap:A,colorMap:c,viaDiameter:l,traceWidth:u,obstacleMargin:g,effort:h});if(!J)continue;m++,J.usedFallback\u0026\u0026f++;const oe=DN(r,J.routes);if(Nce(oe,Y)\u0026\u0026(U=J.routes,Y=oe),Y.length===0)break}if(Y.length===0)break}}if(U!==d||C||(I\u003e=y?C=!0:I++),U===d\u0026\u0026!C){const W=Bdo({routes:d,fixedRouteCopperSpatialIndex:E,center:F,regionSize:3,srj:t,connMap:A,colorMap:c,viaDiameter:l,traceWidth:u,obstacleMargin:g,effort:h});if(W){m++,f++;const te=DN(r,W);Nce(te,Y)\u0026\u0026(U=W,Y=te)}}if(U!==d\u0026\u0026(d=U,p=Y,_++,w=!0),C)break}if(!w||p.length===0)break}const B=p.some(Q=\u003eQ.type===\"pcb_trace_error\"||Q.type===\"pcb_pad_trace_clearance_error\"),S=B\u0026\u0026C;if(B\u0026\u0026!C){const Q=new S7({srj:{...t,traces:void 0},hdRoutes:d,connMap:A,effort:h,drcEvaluator:r,maxIterations:8,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:!1});if(Q.solve(),Q.failed)throw new Error(`Pipeline9 post-regional safe trace-layer repair failed: ${Q.error??\"unknown error\"}`);const w=Q.getOutput(),M=DN(r,w);Nce(M,p)\u0026\u0026(d=w,p=M)}return{routes:d,attemptedCandidateCount:m,acceptedCandidateCount:_,fallbackCandidateCount:f,candidateSearchCount:I,candidateSearchBudget:y,candidateSearchBudgetExhausted:C,safeTraceLayerRepairSkippedForBudget:S,remainingDrcIssueCount:p.length,preloadEligibleDrcIssueCount:x,preloadRepairAttempted:x\u003e0}},Sdo=[.9,.72],Qdo=Array.from({length:16},(t,e)=\u003ee*Math.PI/8),vdo=t=\u003et.type===\"pcb_pad_trace_clearance_error\"||t.type===\"pcb_trace_error\"\u0026\u0026!(Array.isArray(t.pcb_trace_ids)\u0026\u0026t.pcb_trace_ids.length\u003e=2),wdo=t=\u003e{if(typeof t.pcb_pad_id==\"string\")return t.pcb_pad_id;if(typeof t.pcb_trace_error_id==\"string\"){const n=t.pcb_trace_error_id.match(/(pcb_(?:smtpad|plated_hole|hole|keepout)_\\d+)$/)?.[1];if(n)return n}return(typeof t.message==\"string\"?t.message:\"\").match(/(?:pcb_smtpad|pcb_plated_hole|pcb_hole|pcb_keepout)\\[#?([^\\]\"]+)\\]/)?.[1]},Pdo=(t,e)=\u003e{if(!e)return;const n=e.startsWith(\"pcb_\")?e:`pcb_${e}`;return t.obstacles.find(o=\u003eo.obstacleId===n||o.connectedTo[0]===n)},Mdo=({srj:t,pcbPortId:e,z:n,portPositionMap:o})=\u003e{const i=Kh(n,t.layerCount),r=o.get(e),s=t.obstacles.filter(a=\u003ea.layers.includes(i)\u0026\u0026a.connectedTo.includes(e));return r?s.reduce((a,A)=\u003ea?Math.hypot(A.center.x-r.x,A.center.y-r.y)\u003cMath.hypot(a.center.x-r.x,a.center.y-r.y)?A:a:A,void 0):s[0]},Ddo=({terminalObstacle:t,conflictingObstacle:e,traceRadius:n})=\u003e{const o=Math.max(0,t.width/2-n),i=Math.max(0,t.height/2-n),r=(t.ccwRotationDegrees??0)*Math.PI/180;return Sdo.flatMap(s=\u003eQdo.map(a=\u003e{const A={x:Math.cos(a)*o*s,y:Math.sin(a)*i*s},c=(u=r,{x:(l=A).x*Math.cos(u)-l.y*Math.sin(u),y:l.x*Math.sin(u)+l.y*Math.cos(u)});var l,u;return{x:t.center.x+c.x,y:t.center.y+c.y}})).sort((s,a)=\u003eMath.hypot(a.x-e.center.x,a.y-e.center.y)-Math.hypot(s.x-e.center.x,s.y-e.center.y)).slice(0,16)},Ndo=({routes:t,routeIndex:e,endpointIndex:n,point:o,bounds:i,collapseAdjacent:r})=\u003e{const s=(h=\u003eh.map(d=\u003e({...d,route:d.route.map(p=\u003e({...p})),vias:d.vias.map(p=\u003e({...p}))})))(t),a=s[e];if(!a||a.route.length\u003c2)return;const A=n===0?0:a.route.length-1,c=n===0?1:A-1,l=a.route[A],u=a.route[c];if(!l||!u||l.z!==u.z)return;const g=a.traceThickness/2;if(!(o.x-g\u003ci.minX||o.x+g\u003ei.maxX||o.y-g\u003ci.minY||o.y+g\u003ei.maxY)){if(a.route[A]={...l,...o},r){const h=n===0?c+1:c-1,d=a.route[h],p=a.vias.some(m=\u003em.x===u.x\u0026\u0026m.y===u.y);if(!d||d.z!==l.z||u.pcb_port_id!==void 0||p)return;a.route[c]={...u,...o}}return s}},Rdo=({srj:t,routes:e,newConnections:n,syntheticConnectionNames:o,drcEvaluator:i})=\u003e{let r=e,s=DN(i,r),a=0,A=0;const c=(l=\u003e{const u=new Map;for(const g of l.connections)for(const h of g.pointsToConnect)h.pcb_port_id\u0026\u0026u.set(h.pcb_port_id,h);return u})(t);for(let l=0;l\u003c2;l++){let u=!1;const g=fQe({routes:r,newConnections:n,syntheticConnectionNames:o});for(const h of s.filter(vdo)){if(typeof h.pcb_trace_id!=\"string\")continue;const d=g.get(h.pcb_trace_id),p=Pdo(t,wdo(h));if(d===void 0||!p)continue;const m=r[d];let _=r,f=s;for(const I of[0,-1]){const C=I===0?m.route[0]:m.route.at(-1);if(!C||typeof C.pcb_port_id!=\"string\")continue;const y=Mdo({srj:t,pcbPortId:C.pcb_port_id,z:C.z,portPositionMap:c});if(!y||y===p)continue;const x=Math.hypot(p.width,p.height)/2+Math.hypot(y.width,y.height)/2+.5;if(!(Math.hypot(C.x-p.center.x,C.y-p.center.y)\u003ex))for(const E of Ddo({terminalObstacle:y,conflictingObstacle:p,traceRadius:m.traceThickness/2}))for(const B of[!1,!0]){const S=Ndo({routes:r,routeIndex:d,endpointIndex:I,point:E,bounds:t.bounds,collapseAdjacent:B});if(!S)continue;a++;const Q=DN(i,S);Nce(Q,f)\u0026\u0026(_=S,f=Q)}}_!==r\u0026\u0026(r=_,s=f,A++,u=!0)}if(!u||s.length===0)break}return{routes:r,attemptedCandidateCount:a,acceptedCandidateCount:A,remainingErrors:s}},Tdo=[\"pcb_trace_error_id\",\"pcb_error_id\",\"pcb_via_trace_clearance_error_id\",\"pcb_pad_trace_clearance_error_id\"],IQe=(t,e)=\u003e{let n=t;const o=[...e].sort(([i],[r])=\u003er.length-i.length);for(const[i,r]of o)n=n.replaceAll(i,r);return n},Y6t=(t,e)=\u003e{const n=String(t.type??t.error_type??\"unknown\");if(n===\"pcb_via_clearance_error\")return((i,r)=\u003e{const s=[...typeof i.pcb_trace_id==\"string\"?[i.pcb_trace_id]:[],...Array.isArray(i.pcb_trace_ids)?i.pcb_trace_ids.filter(l=\u003etypeof l==\"string\"):[]].map(l=\u003eIQe(l,r)).filter((l,u,g)=\u003eg.indexOf(l)===u).sort(),a=i.center\u0026\u0026typeof i.center==\"object\"?i.center:i.pcb_center\u0026\u0026typeof i.pcb_center==\"object\"?i.pcb_center:void 0,A=typeof a?.x==\"number\"\u0026\u0026typeof a.y==\"number\"?{x:a.x,y:a.y}:void 0,c=typeof i.pcb_via_pair_net_relation==\"string\"?i.pcb_via_pair_net_relation:void 0;if(s.length!==0\u0026\u0026A\u0026\u0026c)return`pcb_via_clearance_error:${JSON.stringify({traceIds:s,center:A,netRelation:c})}`})(t,e);for(const i of Tdo){const r=t[i];if(typeof r==\"string\")return`${n}:${IQe(r,e)}`}const o=Object.fromEntries(Object.entries(t).filter(([i,r])=\u003e(i.endsWith(\"_id\")||i.endsWith(\"_ids\"))\u0026\u0026(typeof r==\"string\"||Array.isArray(r))).sort(([i],[r])=\u003ei.localeCompare(r)).map(([i,r])=\u003e[i,typeof r==\"string\"?IQe(r,e):r]));return`${n}:${JSON.stringify(o)}`},SH=({errors:t,baselineErrors:e,originalTraceIdByPreparedTraceId:n=new Map})=\u003e{const o=new Set(e.filter(i=\u003e!(r=\u003etypeof r.pcb_trace_error_id==\"string\"\u0026\u0026r.pcb_trace_error_id.startsWith(\"missing_connection_\"))(i)).map(i=\u003eY6t(i,new Map)));return o.delete(void 0),t.filter(i=\u003e{const r=Y6t(i,n);return r===void 0||!o.has(r)})},Rce=1.5,kdo=({errorsWithCenters:t,traces:e,layerCount:n,defaultViaDiameter:o,connMap:i})=\u003e{const r=(a=\u003ea.flatMap(A=\u003e{if(A.type!==\"pcb_trace_error\"||!Array.isArray(A.pcb_port_ids)||A.pcb_port_ids.length\u003c4)return[];const c=A.center;return c\u0026\u0026typeof c==\"object\"\u0026\u0026\"x\"in c\u0026\u0026\"y\"in c\u0026\u0026typeof c.x==\"number\"\u0026\u0026typeof c.y==\"number\"?[{x:c.x,y:c.y}]:[]}))(t),s=new Set;for(let a=0;a\u003ce.length;a++){const A=e[a],c=kv(A,a,n,o,i);r.some(l=\u003ec.some(u=\u003e{const g=u.route.map(d=\u003ed.x),h=u.route.map(d=\u003ed.y);return Math.min(...g)\u003c=l.x+Rce\u0026\u0026Math.max(...g)\u003e=l.x-Rce\u0026\u0026Math.min(...h)\u003c=l.y+Rce\u0026\u0026Math.max(...h)\u003e=l.y-Rce}))\u0026\u0026s.add(A.pcb_trace_id)}return s},Fdo=({routes:t,otherHdRoutes:e,obstacles:n,colorMap:o,layerCount:i,connMap:r})=\u003e{const s=XSe([...t,...e],r),a=new jft({inputHdRoutes:t,otherHdRoutes:e,netByConnectionName:s,obstacles:n,colorMap:o,layerCount:i,connMap:r});if(a.solve(),a.failed)throw new Error(`Pipeline9 could not merge movable preloaded vias: ${a.error??\"unknown error\"}`);return a.getMergedViaHdRoutes()??t},U6t=({errors:t,circuitJson:e,newTraceIds:n})=\u003e{const o=new Map(e.flatMap(i=\u003ei.type===\"pcb_via\"\u0026\u0026typeof i.pcb_via_id==\"string\"\u0026\u0026typeof i.pcb_trace_id==\"string\"?[[i.pcb_via_id,i.pcb_trace_id]]:[]));return t.map(i=\u003e{const r=typeof i.pcb_trace_id==\"string\"?i.pcb_trace_id:void 0,s=Array.isArray(i.pcb_trace_ids)?i.pcb_trace_ids.filter(u=\u003etypeof u==\"string\"):[],a=[...typeof i.pcb_via_id==\"string\"?[i.pcb_via_id]:[],...Array.isArray(i.pcb_via_ids)?i.pcb_via_ids.filter(u=\u003etypeof u==\"string\"):[]].filter((u,g,h)=\u003eh.indexOf(u)===g);if(r\u0026\u0026typeof i.pcb_trace_error_id==\"string\"){const u=`overlap_${r}_`,g=i.pcb_trace_error_id.startsWith(u)?i.pcb_trace_error_id.slice(u.length):void 0,h=g!==void 0\u0026\u0026(a.includes(g)||o.has(g)\u0026\u0026!s.includes(g)),d=s.find(p=\u003ep!==r\u0026\u0026n.has(p))??(g\u0026\u0026!h?g:void 0);if(!n.has(r)\u0026\u0026a.length===0\u0026\u0026d\u0026\u0026n.has(d)){const p=[d,r,...s].filter((m,_,f)=\u003ef.indexOf(m)===_);return{...i,pcb_trace_id:d,pcb_trace_ids:p,pcb_trace_error_id:`overlap_${d}_${r}`}}}const A=a.flatMap(u=\u003e{const g=o.get(u);return g?[g]:[]}).filter((u,g,h)=\u003eh.indexOf(u)===g),c=A.length\u003e0?A:s.filter(u=\u003eu!==r),l=c.find(u=\u003en.has(u));if(l\u0026\u0026(!r||!n.has(r))){const u=[l,...r?[r]:[],...s,...c].filter((g,h,d)=\u003ed.indexOf(g)===h);return{...i,pcb_trace_id:l,pcb_trace_ids:u,pcb_via_id:a[0],pcb_via_ids:a}}if(a.length\u003e0){const u=[...r?[r]:[],...s,...c].filter((g,h,d)=\u003ed.indexOf(g)===h);return{...i,pcb_trace_ids:u,pcb_via_id:a[0],pcb_via_ids:a}}return i})},Tce=1e-9,K6t=t=\u003e{const e=new Set,n=[];for(const o of t)for(const i of o.route){if(i.route_type!==\"via\")continue;const r=`${i.x},${i.y},${i.from_layer},${i.to_layer}`;e.has(r)||(e.add(r),n.push({type:\"pcb_via\",pcb_via_id:`via_${n.length}`,pcb_trace_id:o.pcb_trace_id}))}return n},R7=({errors:t,circuitJson:e,evaluatedTraceIds:n})=\u003e{const o=new Map(e.flatMap(i=\u003ei.type===\"pcb_via\"\u0026\u0026typeof i.pcb_via_id==\"string\"\u0026\u0026typeof i.pcb_trace_id==\"string\"?[[i.pcb_via_id,i.pcb_trace_id]]:[]));return t.map(i=\u003e{const r=[...typeof i.pcb_via_id==\"string\"?[i.pcb_via_id]:[],...Array.isArray(i.pcb_via_ids)?i.pcb_via_ids.filter(h=\u003etypeof h==\"string\"):[]],s=typeof i.pcb_trace_id==\"string\"?i.pcb_trace_id:void 0,a=s?`overlap_${s}_`:void 0,A=a\u0026\u0026typeof i.pcb_trace_error_id==\"string\"\u0026\u0026i.pcb_trace_error_id.startsWith(a)?i.pcb_trace_error_id.slice(a.length):void 0,c=typeof i.pcb_trace_error_id==\"string\"?i.pcb_trace_error_id.match(/_(via_\\d+)$/)?.[1]:void 0,l=r.length!==0||!c||!o.has(c)||A\u0026\u0026n.has(A)?void 0:c,u=[...r,...l?[l]:[]].filter((h,d,p)=\u003ep.indexOf(h)===d),g=[...typeof i.pcb_trace_id==\"string\"?[i.pcb_trace_id]:[],...Array.isArray(i.pcb_trace_ids)?i.pcb_trace_ids.filter(h=\u003etypeof h==\"string\"):[],...u.flatMap(h=\u003e{const d=o.get(h);return d?[d]:[]})].filter((h,d,p)=\u003ep.indexOf(h)===d);return{...i,...u.length\u003e0?{pcb_via_id:u[0],pcb_via_ids:u}:{},...u.length\u003e0\u0026\u0026g.length\u003e0?{pcb_trace_ids:g}:{}}})},V6t=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=Tce\u0026\u0026Math.abs(t.y-e.y)\u003c=Tce\u0026\u0026t.z===e.z,Ldo=({trace:t,sectionGroup:e,syntheticConnectionName:n,connMap:o})=\u003e{const i=e.routes;if(i.length===0)throw new Error(`Pipeline9 cannot exactly repair empty preloaded section for trace \"${t.pcb_trace_id}\"`);const r=[];for(const l of i){if(r.length===0){r.push(...l.route);continue}const u=r.at(-1);if(l.route[0]\u0026\u0026V6t(u,l.route[0]))r.push(...l.route.slice(1));else{if(!l.route.at(-1)||!V6t(u,l.route.at(-1)))throw new Error(`Pipeline9 cannot reconnect preloaded trace \"${t.pcb_trace_id}\" for exact repair`);r.push(...l.route.slice(0,-1).reverse())}}const s=e.routePositionStart===0,a=e.routePositionEnd===t.route.length-1,A=s?t.connectsTo?.[0]:null,c=a?t.connectsTo?.at(-1):null;return A\u0026\u0026r[0]\u0026\u0026(r[0]={...r[0],pcb_port_id:A}),c\u0026\u0026r.at(-1)\u0026\u0026(r[r.length-1]={...r.at(-1),pcb_port_id:c}),{connectionName:n,rootConnectionName:o.getNetConnectedToId(t.connection_name)??t.connection_name,traceThickness:Math.max(...i.map(l=\u003el.traceThickness)),viaDiameter:Math.max(...i.map(l=\u003el.viaDiameter)),route:r,vias:r.slice(0,-1).flatMap((l,u)=\u003e{const g=r[u+1];return l.z!==g.z\u0026\u0026(h=l,d=g,Math.abs(h.x-d.x)\u003c=Tce\u0026\u0026Math.abs(h.y-d.y)\u003c=Tce)?[{x:g.x,y:g.y}]:[];var h,d})}},Hdo=({trace:t,traceIndex:e,layerCount:n,defaultViaDiameter:o,connMap:i})=\u003e{const r=t.route.flatMap((A,c)=\u003eA.route_type===\"through_obstacle\"?[c]:[]),s=new Map,a=kv(t,e,n,o,i);for(const A of a){const c=A.preloadedRoutePositionStart,l=A.preloadedRoutePositionEnd;if(c===void 0||l===void 0)throw new Error(`Pipeline9 preloaded trace section is missing route positions for \"${t.pcb_trace_id}\"`);if(t.route[c]?.route_type===\"through_obstacle\")continue;const u=r.filter(h=\u003eh\u003cc).length,g=s.get(u)??{routePositionStart:c,routePositionEnd:l,routes:[]};g.routePositionStart=Math.min(g.routePositionStart,c),g.routePositionEnd=Math.max(g.routePositionEnd,l),g.routes.push(A),s.set(u,g)}return[...s.values()]},z6t=(t,e)=\u003et.map(n=\u003e{const o=Array.isArray(n.pcb_trace_ids)?n.pcb_trace_ids.filter(p=\u003etypeof p==\"string\"):[],i=typeof n.pcb_trace_id==\"string\"?n.pcb_trace_id:void 0,r=i?`overlap_${i}_`:void 0,s=r\u0026\u0026typeof n.pcb_trace_error_id==\"string\"\u0026\u0026n.pcb_trace_error_id.startsWith(r)?n.pcb_trace_error_id.slice(r.length):void 0,a=[...typeof n.pcb_via_id==\"string\"?[n.pcb_via_id]:[],...Array.isArray(n.pcb_via_ids)?n.pcb_via_ids.filter(p=\u003etypeof p==\"string\"):[]],A=s!==void 0\u0026\u0026a.includes(s),c=[i,...o,A?void 0:s].filter(p=\u003etypeof p==\"string\"),l=new Map;for(const p of c){const m=e.get(p)??p,_=l.get(m)??new Set;_.add(p),l.set(m,_)}const u=[...l].flatMap(([p,m])=\u003em.size\u003e1?[{solverTraceId:p,evaluationTraceIds:[...m]}]:[]),g=i?e.get(i)??i:void 0,h=o.map(p=\u003ee.get(p)??p),d=s?A?s:e.get(s)??s:void 0;return g!==i||h.some((p,m)=\u003ep!==o[m])||d!==s?{...n,...i?{pcb_trace_id:g}:{},...Array.isArray(n.pcb_trace_ids)?{pcb_trace_ids:h}:{},...g\u0026\u0026d?{pcb_trace_error_id:`overlap_${g}_${d}`}:{},...u.length\u003e0?{__collapsed_trace_participants:u}:{}}:n}),Odo=(t,e)=\u003e{const n=t.hdRoute.route[0],o=t.hdRoute.route.at(-1);return{name:t.syntheticConnectionName,rootConnectionName:t.hdRoute.rootConnectionName,__netConnectionName:t.originalTrace.connection_name,nominalTraceWidth:t.hdRoute.traceThickness,pointsToConnect:[{x:n.x,y:n.y,layer:Kh(n.z,e),pointId:`${t.syntheticConnectionName}:start`},{x:o.x,y:o.y,layer:Kh(o.z,e),pointId:`${t.syntheticConnectionName}:end`}]}},Gdo=({originalTrace:t,repairedSections:e})=\u003e{const n=[];let o=0;for(const i of[...e].sort((r,s)=\u003er.routePositionStart-s.routePositionStart)){if(i.routePositionStart\u003co)throw new Error(`Pipeline9 found overlapping repaired sections for preloaded trace \"${t.pcb_trace_id}\"`);n.push(...t.route.slice(o,i.routePositionStart),...i.route),o=i.routePositionEnd+1}return n.push(...t.route.slice(o)),{...t,__replaces_pcb_trace_id:t.pcb_trace_id,route:n}},Ydo=class extends yr{params;inputNewHdRoutes;inputUpdatedPreloadedTraces;movablePreloadedSections;fixedPreloadedObstacleRoutes;syntheticConnectionNames;exactRepairSolver;drcEvaluator;cachedReferenceDrcEvaluator;referenceDrcValidationCount=0;referenceDrcFalseNegativeCount=0;indexedDrcEvaluationCount=0;indexedDrcCacheHitCount=0;indexedDrcEvaluationTimeMs=0;indexedDrcCandidateCache=new Map;combinedOutput;cacheIndexedDrcResult(e,n){if(this.indexedDrcCandidateCache.size\u003e=64){const o=this.indexedDrcCandidateCache.keys().next().value;o!==void 0\u0026\u0026this.indexedDrcCandidateCache.delete(o)}this.indexedDrcCandidateCache.set(e,n)}constructor(e){super(),this.params=e,this.inputNewHdRoutes=e.newHdRoutes,this.inputUpdatedPreloadedTraces=e.updatedPreloadedTraces;const n=e.updatedPreloadedTraces.filter(J=\u003ee.mutatedPreloadedTraceIds.has(J.pcb_trace_id)),o=jSe({connections:e.newConnections,originalConnections:e.originalSrj.connections,layerCount:e.layerCount,obstacles:e.obstacles,defaultViaHoleDiameter:e.defaultViaHoleDiameter,connMap:e.connMap}),i=o(e.newHdRoutes),r=new Set(i.map(J=\u003eJ.pcb_trace_id)),s=(({originalPreloadedTraces:J,mutatedPreloadedTraces:oe,newTraces:ie})=\u003e{const ne=new Set(ie.map(ue=\u003eue.pcb_trace_id)),le=new Map(oe.map(ue=\u003e[ue.pcb_trace_id,ue])),ge=new Set([...J.map(ue=\u003eue.pcb_trace_id),...ne]),_e=new Map;return{routedTraces:[...J.filter(ue=\u003ene.has(ue.pcb_trace_id)).map(ue=\u003e{const fe=le.get(ue.pcb_trace_id)??ue,pe=`${ue.pcb_trace_id}_preloaded`;let ye=pe,Me=2;for(;ge.has(ye);)ye=`${pe}_${Me}`,Me+=1;return ge.add(ye),_e.set(ye,ue.pcb_trace_id),{...fe,pcb_trace_id:ye,__replaces_pcb_trace_id:ue.pcb_trace_id}}),...oe.filter(ue=\u003e!ne.has(ue.pcb_trace_id)),...ie],originalPreloadedTraceIdByPreparedTraceId:_e}})({originalPreloadedTraces:e.originalSrj.traces??[],mutatedPreloadedTraces:n,newTraces:i}),a=e.originalSrj.minTraceToPadEdgeClearance??hQe.traceClearance??.1,A=hQe.viaClearance,c=_Qe({inputSrj:e.originalSrj,srjWithPointPairs:e.srjWithPointPairs,routedTraces:[],drcOptions:{traceClearance:a}}),l=new Set((e.originalSrj.traces??[]).map(J=\u003eJ.pcb_trace_id)),u=R7({errors:c.errors,circuitJson:c.circuitJson,evaluatedTraceIds:l}),g=R7({errors:c.errorsWithCenters,circuitJson:c.circuitJson,evaluatedTraceIds:l}),h=_Qe({inputSrj:e.originalSrj,srjWithPointPairs:e.srjWithPointPairs,routedTraces:s.routedTraces,drcOptions:{traceClearance:a}}),d=new Set(mQe(e.originalSrj.traces??[],s.routedTraces).map(J=\u003eJ.pcb_trace_id)),p=R7({errors:h.errors,circuitJson:h.circuitJson,evaluatedTraceIds:d}),m=R7({errors:h.errorsWithCenters,circuitJson:h.circuitJson,evaluatedTraceIds:d}),_={...h,errors:SH({errors:p,baselineErrors:u,originalTraceIdByPreparedTraceId:s.originalPreloadedTraceIdByPreparedTraceId}),errorsWithCenters:SH({errors:m,baselineErrors:g,originalTraceIdByPreparedTraceId:s.originalPreloadedTraceIdByPreparedTraceId})},f=(({errors:J,circuitJson:oe})=\u003e{const ie=new Map(oe.flatMap(le=\u003ele.type===\"pcb_via\"\u0026\u0026typeof le.pcb_via_id==\"string\"\u0026\u0026typeof le.pcb_trace_id==\"string\"?[[le.pcb_via_id,le.pcb_trace_id]]:[])),ne=new Set;for(const le of J){const ge=typeof le.pcb_trace_id==\"string\"?le.pcb_trace_id:void 0,_e=[...typeof le.pcb_via_id==\"string\"?[le.pcb_via_id]:[],...Array.isArray(le.pcb_via_ids)?le.pcb_via_ids.filter(fe=\u003etypeof fe==\"string\"):[]];if(typeof le.pcb_trace_id==\"string\"\u0026\u0026ne.add(le.pcb_trace_id),Array.isArray(le.pcb_trace_ids))for(const fe of le.pcb_trace_ids)typeof fe==\"string\"\u0026\u0026ne.add(fe);if(typeof le.pcb_via_id==\"string\"){const fe=ie.get(le.pcb_via_id);fe\u0026\u0026ne.add(fe)}if(Array.isArray(le.pcb_via_ids))for(const fe of le.pcb_via_ids){if(typeof fe!=\"string\")continue;const pe=ie.get(fe);pe\u0026\u0026ne.add(pe)}const ue=ge?`overlap_${ge}_`:void 0;if(ue\u0026\u0026typeof le.pcb_trace_error_id==\"string\"\u0026\u0026le.pcb_trace_error_id.startsWith(ue)){const fe=le.pcb_trace_error_id.slice(ue.length);_e.includes(fe)||ne.add(fe)}}return ne})({errors:_.errors,circuitJson:_.circuitJson}),I=new Map(e.updatedPreloadedTraces.map(J=\u003e[J.pcb_trace_id,J])),C=new Set;for(const J of f){const oe=s.originalPreloadedTraceIdByPreparedTraceId.get(J);oe\u0026\u0026I.has(oe)?C.add(oe):!r.has(J)\u0026\u0026I.has(J)\u0026\u0026C.add(J)}for(const J of kdo({errorsWithCenters:_.errorsWithCenters,traces:e.updatedPreloadedTraces,layerCount:e.layerCount,defaultViaDiameter:e.defaultViaDiameter,connMap:e.connMap}))C.add(J);this.movablePreloadedSections=[];for(const J of C){const oe=I.get(J);if(!oe)throw new Error(`Pipeline9 cannot find preloaded trace \"${J}\" selected for exact repair`);const ie=e.updatedPreloadedTraces.findIndex(le=\u003ele.pcb_trace_id===J),ne=Hdo({trace:oe,traceIndex:ie,layerCount:e.layerCount,defaultViaDiameter:e.defaultViaDiameter,connMap:e.connMap});for(const[le,ge]of ne.entries()){const _e=`pipeline9_preloaded_drc_${this.movablePreloadedSections.length}`;this.movablePreloadedSections.push({originalTrace:oe,originalRoutePositionStart:ge.routePositionStart,originalRoutePositionEnd:ge.routePositionEnd,syntheticConnectionName:_e,evaluationTraceId:`${oe.pcb_trace_id}__pipeline9_section_${le}`,hdRoute:Ldo({trace:oe,sectionGroup:ge,syntheticConnectionName:_e,connMap:e.connMap})})}}this.syntheticConnectionNames=new Set(this.movablePreloadedSections.map(J=\u003eJ.syntheticConnectionName));const y=new Set(this.movablePreloadedSections.map(J=\u003eJ.originalTrace.pcb_trace_id));this.fixedPreloadedObstacleRoutes=e.updatedPreloadedTraces.flatMap((J,oe)=\u003e{const ie=kv(J,oe,e.layerCount,e.defaultViaDiameter,e.connMap);return y.has(J.pcb_trace_id)?ie.filter(ne=\u003e{const le=ne.preloadedRoutePositionStart;return le!==void 0\u0026\u0026J.route[le]?.route_type===\"through_obstacle\"}):ie});const x=new Map;for(const[J,oe]of this.movablePreloadedSections.entries()){const ie=oe.originalTrace.pcb_trace_id,ne=x.get(ie)??[];ne.push(J),x.set(ie,ne)}for(const J of(({errors:oe,circuitJson:ie,originalTraceIdByPreparedTraceId:ne})=\u003e{const le=new Map(ie.flatMap(ge=\u003ege.type===\"pcb_via\"\u0026\u0026typeof ge.pcb_via_id==\"string\"\u0026\u0026typeof ge.pcb_trace_id==\"string\"?[[ge.pcb_via_id,ge.pcb_trace_id]]:[]));return oe.flatMap(ge=\u003e{if(ge.type!==\"pcb_via_clearance_error\"||!Array.isArray(ge.pcb_via_ids)||typeof ge.actual_clearance!=\"number\"||ge.actual_clearance\u003e=0)return[];const _e=ge.pcb_via_ids.flatMap(ue=\u003e{if(typeof ue!=\"string\")return[];const fe=le.get(ue);return fe?[ne.get(fe)??fe]:[]}).filter((ue,fe,pe)=\u003epe.indexOf(ue)===fe);return _e.length\u003e0?[_e]:[]})})({errors:_.errors,circuitJson:_.circuitJson,originalTraceIdByPreparedTraceId:s.originalPreloadedTraceIdByPreparedTraceId})){const oe=J.flatMap(le=\u003ex.get(le)??[]).filter((le,ge,_e)=\u003e_e.indexOf(le)===ge);if(oe.length===0)continue;const ie=new Set(oe),ne=Fdo({routes:oe.map(le=\u003ethis.movablePreloadedSections[le].hdRoute),otherHdRoutes:[...e.newHdRoutes,...this.fixedPreloadedObstacleRoutes,...this.movablePreloadedSections.flatMap((le,ge)=\u003eie.has(ge)?[]:[le.hdRoute])],obstacles:e.obstacles,colorMap:e.colorMap,layerCount:e.layerCount,connMap:e.connMap});for(let le=0;le\u003coe.length;le++)this.movablePreloadedSections[oe[le]].hdRoute=ne[le]}if(this.stats={initialJointDrcIssueCount:_.errors.length,baselineJointDrcIssueCount:c.errors.length,initialJointDrcIssueCountByType:_.errors.reduce((J,oe)=\u003e{const ie=String(oe.type??oe.error_type??\"unknown\");return J[ie]=(J[ie]??0)+1,J},{}),movablePreloadedTraceCount:y.size,movablePreloadedSectionCount:this.movablePreloadedSections.length,exactRepairConfiguredMaxIterations:32,exactRepairConfiguredViaInPadMaxIterations:32,exactRepairConfiguredBroadMaxIterations:12},_.errors.length===0)return void(this.solved=!0);const E=new Set(this.movablePreloadedSections.map(J=\u003eJ.originalTrace.pcb_trace_id)),B=n.filter(J=\u003e!E.has(J.pcb_trace_id)),S=new Map(this.movablePreloadedSections.map(J=\u003e[J.syntheticConnectionName,Odo(J,e.layerCount)])),{traces:Q,...w}=e.srjWithPointPairs,M={...w,connections:[...e.srjWithPointPairs.connections,...S.values()]},k=new fJ({...M,minTraceWidth:e.originalSrj.minTraceWidth,minViaDiameter:e.originalSrj.minViaDiameter??e.defaultViaDiameter},{connMap:e.connMap,traceClearance:a,viaClearance:A,includeTraceViaOwnerMetadata:!0,spatialCellSize:Math.max(e.defaultViaDiameter,e.originalSrj.minTraceWidth)+Math.max(a,A)}),R=k.evaluate(e.originalSrj.traces??[]),F=K6t(e.originalSrj.traces??[]),O={...R,errors:R7({errors:R.errors,circuitJson:F,evaluatedTraceIds:l}),errorsWithCenters:R7({errors:R.errorsWithCenters,circuitJson:F,evaluatedTraceIds:l})};let U;const Y=J=\u003e{const oe=J.filter(ye=\u003e!this.syntheticConnectionNames.has(ye.connectionName)),ie=o(oe),ne=Y7t(ie,e.originalSrj.traces??[]),le=new Set,ge=new Map,_e=this.movablePreloadedSections.map(ye=\u003e{const Me=J.find(Qe=\u003eQe.connectionName===ye.syntheticConnectionName);if(!Me)throw new Error(`Pipeline9 joint DRC repair lost preloaded section \"${ye.syntheticConnectionName}\"`);const ve=ye.originalTrace.pcb_trace_id;ge.set(ye.evaluationTraceId,ve);const he=!le.has(ve);return le.add(ve),{...ye.originalTrace,pcb_trace_id:ye.evaluationTraceId,...he?{__replaces_pcb_trace_id:ve}:{__replaces_pcb_trace_id:void 0},route:nB(Me,e.layerCount,{defaultViaHoleDiameter:e.defaultViaHoleDiameter,obstacles:e.obstacles,connMap:e.connMap})}}),ue=new Map;for(let ye=0;ye\u003cie.length;ye++)ue.set(ne[ye].pcb_trace_id,ie[ye].pcb_trace_id);for(const ye of this.movablePreloadedSections)ue.set(ye.evaluationTraceId,`${ye.syntheticConnectionName}_0`);const fe=new Set(ue.values()),pe=[...B,..._e,...ne];return{evaluatedTraces:mQe(e.originalSrj.traces??[],pe),movableTraceIds:fe,originalTraceIdByEvaluationTraceId:ge,routedTraces:pe,solverTraceIdByEvaluationTraceId:ue}},W=({errors:J,errorsWithCenters:oe,circuitJson:ie,movableTraceIds:ne,solverTraceIdByEvaluationTraceId:le})=\u003e{const ge=ie.map(_e=\u003e{if(!(\"pcb_trace_id\"in _e)||typeof _e.pcb_trace_id!=\"string\")return _e;const ue=le.get(_e.pcb_trace_id);return ue?{..._e,pcb_trace_id:ue}:_e});return{errors:U6t({errors:z6t(J,le),circuitJson:ge,newTraceIds:ne}),errorsWithCenters:U6t({errors:z6t(oe,le),circuitJson:ge,newTraceIds:ne})}},te=({routes:J,hdRoutes:oe})=\u003e{const ie=J??oe;if(!ie)throw new Error(\"Pipeline9 cached reference DRC requires HD routes\");const ne=JSON.stringify(ie);if(U?.candidateKey===ne)return U.result;this.referenceDrcValidationCount+=1;const le=(({routes:ge,hdRoutes:_e})=\u003e{const ue=ge??_e;if(!ue)throw new Error(\"Pipeline9 reference DRC repair requires HD routes\");const fe=Y(ue),pe=_Qe({inputSrj:e.originalSrj,srjWithPointPairs:e.srjWithPointPairs,routedTraces:fe.routedTraces,drcOptions:{traceClearance:a}}),ye=new Set(fe.evaluatedTraces.map(Pe=\u003ePe.pcb_trace_id)),Me=R7({errors:pe.errors,circuitJson:pe.circuitJson,evaluatedTraceIds:ye}),ve=R7({errors:pe.errorsWithCenters,circuitJson:pe.circuitJson,evaluatedTraceIds:ye}),he=SH({errors:Me,baselineErrors:u,originalTraceIdByPreparedTraceId:fe.originalTraceIdByEvaluationTraceId}),Qe=SH({errors:ve,baselineErrors:g,originalTraceIdByPreparedTraceId:fe.originalTraceIdByEvaluationTraceId});return W({errors:he,errorsWithCenters:Qe,circuitJson:pe.circuitJson,movableTraceIds:fe.movableTraceIds,solverTraceIdByEvaluationTraceId:fe.solverTraceIdByEvaluationTraceId})})({routes:ie,hdRoutes:ie});return U={candidateKey:ne,result:le},le};this.cachedReferenceDrcEvaluator=te;const j=({routes:J,hdRoutes:oe})=\u003e{const ie=J??oe;if(!ie)throw new Error(\"Pipeline9 joint DRC repair requires HD routes\");const ne=JSON.stringify(ie),le=this.indexedDrcCandidateCache.get(ne);if(le!==void 0)return this.indexedDrcCacheHitCount+=1,le;const ge=performance.now();this.indexedDrcEvaluationCount+=1;const _e=Y(ie),ue=k.evaluate(_e.evaluatedTraces),fe=K6t(_e.evaluatedTraces),pe=new Set(_e.evaluatedTraces.map(Pe=\u003ePe.pcb_trace_id)),ye=R7({errors:ue.errors,circuitJson:fe,evaluatedTraceIds:pe}),Me=R7({errors:ue.errorsWithCenters,circuitJson:fe,evaluatedTraceIds:pe}),ve=SH({errors:ye,baselineErrors:O.errors,originalTraceIdByPreparedTraceId:_e.originalTraceIdByEvaluationTraceId}),he=SH({errors:Me,baselineErrors:O.errorsWithCenters,originalTraceIdByPreparedTraceId:_e.originalTraceIdByEvaluationTraceId});if(ve.length===0){const Pe=this.referenceDrcValidationCount,we=te({routes:ie,hdRoutes:ie}),Te=Array.isArray(we)?we:we.errors;return this.referenceDrcValidationCount\u003ePe\u0026\u0026Te.length\u003e0\u0026\u0026(this.referenceDrcFalseNegativeCount+=1),this.indexedDrcEvaluationTimeMs+=performance.now()-ge,this.cacheIndexedDrcResult(ne,we),we}const Qe=W({errors:ve,errorsWithCenters:he,circuitJson:fe,movableTraceIds:_e.movableTraceIds,solverTraceIdByEvaluationTraceId:_e.solverTraceIdByEvaluationTraceId});return this.indexedDrcEvaluationTimeMs+=performance.now()-ge,this.cacheIndexedDrcResult(ne,Qe),Qe};this.drcEvaluator=j,this.exactRepairSolver=new mdo({srj:M,hdRoutes:[...e.newHdRoutes,...this.movablePreloadedSections.map(J=\u003eJ.hdRoute)],connMap:e.connMap,effort:e.effort,viaHoleDiameter:e.defaultViaHoleDiameter,drcEvaluator:j,viaInPadDrcEvaluator:j,maxIterations:32,enableBroadFallback:!1,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!0,enableTraceViaOwnerTargeting:!0,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:e.originalSrj.allowViaInPad??!1,viaInPadMaxIterations:32,broadMaxIterations:12,broadPassMultiplier:3}),this.activeSubSolver=this.exactRepairSolver,this.MAX_ITERATIONS=this.exactRepairSolver.MAX_ITERATIONS+1}getSolverName(){return\"Pipeline9JointDrcRepairSolver\"}_step(){if(!this.exactRepairSolver)return void(this.solved=!0);if(this.exactRepairSolver.step(),this.progress=this.exactRepairSolver.progress,this.exactRepairSolver.failed)return this.failed=!0,void(this.error=this.exactRepairSolver.error);if(!this.exactRepairSolver.solved)return;const e=this.exactRepairSolver.getOutput(),n=this.exactRepairSolver.stats.finalDrcIssueCount,o=typeof n==\"number\"\u0026\u0026Number.isFinite(n)\u0026\u0026n\u003e=0?n:void 0,i=o===void 0||o\u003c=16;let r;if(i){const c=this.cachedReferenceDrcEvaluator({traces:[],routes:e,hdRoutes:e}),l=Array.isArray(c)?c:c.errors;if(r=l.length,l.length===0)return this.combinedOutput=e,this.stats={...this.stats,...this.exactRepairSolver.stats,postExactIndexedDrcIssueCount:o,postExactPrecisionPassMaxIndexedIssueCount:16,postExactPrecisionPassAttempted:!0,postExactReferenceValidationAttempted:!0,postExactReferenceValidationSkippedForIndexedIssueCount:!1,postExactReferenceDrcIssueCount:0,postExactReferenceAccepted:!0,regionalB01RepairCandidateCount:0,regionalB01RepairAcceptedCount:0,regionalB01RepairFallbackCandidateCount:0,regionalB01RepairCandidateSearchCount:0,regionalB01RepairCandidateSearchBudget:0,regionalB01RepairCandidateSearchBudgetExhausted:!1,regionalB01RepairSafeTraceLayerSkippedForBudget:!1,regionalB01RepairRemainingDrcIssueCount:0,regionalB01RepairPreloadEligibleDrcIssueCount:0,regionalB01RepairAttempted:!1,regionalB01RepairTraceIdCount:0,terminalEscapeSkippedForIndexedIssueCount:!1,terminalEscapeCandidateCount:0,terminalEscapeAcceptedCount:0,referenceDrcValidationCount:this.referenceDrcValidationCount,referenceDrcFalseNegativeCount:this.referenceDrcFalseNegativeCount,indexedDrcEvaluationCount:this.indexedDrcEvaluationCount,indexedDrcCacheHitCount:this.indexedDrcCacheHitCount,indexedDrcEvaluationTimeMs:this.indexedDrcEvaluationTimeMs,indexedDrcCandidateCacheSize:this.indexedDrcCandidateCache.size,indexedDrcCandidateCacheCapacity:64},void(this.solved=!0)}const s=i?Rdo({srj:this.params.srj,routes:e,newConnections:this.params.newConnections,syntheticConnectionNames:this.syntheticConnectionNames,drcEvaluator:this.drcEvaluator}):{routes:e,attemptedCandidateCount:0,acceptedCandidateCount:0,remainingErrors:DN(this.drcEvaluator,e)},a=(({routes:c,newConnections:l,syntheticConnectionNames:u,fixedPreloadedObstacleRoutes:g,updatedPreloadedTraces:h})=\u003e{const d=new Set,p=Object.assign(new Set,{collidingFixedTraceIds:d}),m=fQe({routes:c,newConnections:l,syntheticConnectionNames:u}),_=new Set;for(const[f,I]of m)u.has(c[I].connectionName)?p.add(f):_.add(f);for(const f of g){const I=h[f.preloadedTraceIndex];if(!I)throw new Error(`Pipeline9 fixed preload route has invalid trace index ${f.preloadedTraceIndex}`);_.has(I.pcb_trace_id)?d.add(I.pcb_trace_id):p.add(I.pcb_trace_id)}return p})({routes:s.routes,newConnections:this.params.newConnections,syntheticConnectionNames:this.syntheticConnectionNames,fixedPreloadedObstacleRoutes:this.fixedPreloadedObstacleRoutes,updatedPreloadedTraces:this.params.updatedPreloadedTraces}),A=bdo({srj:this.params.srj,routes:s.routes,fixedObstacleRoutes:this.fixedPreloadedObstacleRoutes,newConnections:this.params.newConnections,syntheticConnectionNames:this.syntheticConnectionNames,drcEvaluator:this.drcEvaluator,initialErrors:s.remainingErrors,preloadRepairTraceIds:a,connMap:this.params.connMap,colorMap:this.params.colorMap,viaDiameter:this.params.defaultViaDiameter,traceWidth:this.params.srj.minTraceWidth,obstacleMargin:this.params.srj.defaultObstacleMargin??this.params.srj.minTraceToPadEdgeClearance??.15,effort:this.params.effort});this.combinedOutput=A.routes,this.stats={...this.stats,...this.exactRepairSolver.stats,postExactIndexedDrcIssueCount:o,postExactPrecisionPassMaxIndexedIssueCount:16,postExactPrecisionPassAttempted:i,postExactReferenceValidationAttempted:i,postExactReferenceValidationSkippedForIndexedIssueCount:!i,postExactReferenceDrcIssueCount:r,postExactReferenceAccepted:!1,regionalB01RepairCandidateCount:A.attemptedCandidateCount,regionalB01RepairAcceptedCount:A.acceptedCandidateCount,regionalB01RepairFallbackCandidateCount:A.fallbackCandidateCount,regionalB01RepairCandidateSearchCount:A.candidateSearchCount,regionalB01RepairCandidateSearchBudget:A.candidateSearchBudget,regionalB01RepairCandidateSearchBudgetExhausted:A.candidateSearchBudgetExhausted,regionalB01RepairSafeTraceLayerSkippedForBudget:A.safeTraceLayerRepairSkippedForBudget,regionalB01RepairRemainingDrcIssueCount:A.remainingDrcIssueCount,regionalB01RepairPreloadEligibleDrcIssueCount:A.preloadEligibleDrcIssueCount,regionalB01RepairAttempted:A.preloadRepairAttempted,regionalB01RepairTraceIdCount:a.size+(a.collidingFixedTraceIds?.size??0),terminalEscapeSkippedForIndexedIssueCount:!i,terminalEscapeCandidateCount:s.attemptedCandidateCount,terminalEscapeAcceptedCount:s.acceptedCandidateCount,referenceDrcValidationCount:this.referenceDrcValidationCount,referenceDrcFalseNegativeCount:this.referenceDrcFalseNegativeCount,indexedDrcEvaluationCount:this.indexedDrcEvaluationCount,indexedDrcCacheHitCount:this.indexedDrcCacheHitCount,indexedDrcEvaluationTimeMs:this.indexedDrcEvaluationTimeMs,indexedDrcCandidateCacheSize:this.indexedDrcCandidateCache.size,indexedDrcCandidateCacheCapacity:64},this.solved=!0}getCombinedOutput(){return this.combinedOutput??this.exactRepairSolver?.getOutput()??this.inputNewHdRoutes}getOutput(){return this.getCombinedOutput().filter(e=\u003e!this.syntheticConnectionNames.has(e.connectionName))}getUpdatedPreloadedTraces(){const e=new Map(this.getCombinedOutput().map(i=\u003e[i.connectionName,i])),n=new Map;for(const i of this.movablePreloadedSections){const r=e.get(i.syntheticConnectionName);if(!r)throw new Error(`Pipeline9 joint DRC repair output is missing \"${i.syntheticConnectionName}\"`);const s=i.originalTrace.pcb_trace_id,a=n.get(s)??[];a.push({routePositionStart:i.originalRoutePositionStart,routePositionEnd:i.originalRoutePositionEnd,route:nB(r,this.params.layerCount,{defaultViaHoleDiameter:this.params.defaultViaHoleDiameter,obstacles:this.params.obstacles,connMap:this.params.connMap})}),n.set(s,a)}const o=new Map([...n].map(([i,r])=\u003e{const s=this.inputUpdatedPreloadedTraces.find(a=\u003ea.pcb_trace_id===i);if(!s)throw new Error(`Pipeline9 cannot find preloaded trace \"${i}\" while rebuilding repaired sections`);return[i,Gdo({originalTrace:s,repairedSections:r})]}));return this.inputUpdatedPreloadedTraces.map(i=\u003eo.get(i.pcb_trace_id)??i)}getMutatedPreloadedTraces(){const e=new Set([...this.params.mutatedPreloadedTraceIds,...this.movablePreloadedSections.map(n=\u003en.originalTrace.pcb_trace_id)]);return this.getUpdatedPreloadedTraces().filter(n=\u003ee.has(n.pcb_trace_id))}visualize(){return this.exactRepairSolver?.visualize()??{}}},J6t=1e-6,W6t=(t,e,n)=\u003e{const o=Kr(t,n),i=Kr(e,n);return Array.from({length:Math.abs(i-o)+1},(r,s)=\u003eMath.min(o,i)+s)},j6t=t=\u003et.route_type===\"wire\",Udo=(t,e,n)=\u003et.portPoints.filter(o=\u003eo.availableZ.includes(n)\u0026\u0026!(o._preloadedTracePortAssignments??[]).some(i=\u003ei.z===n\u0026\u0026i.fixedNetId!==e.fixedNetId)).map(o=\u003e({portPoint:o,distance:wc(o,e.start,e.end)})).sort((o,i)=\u003eo.distance-i.distance||o.portPoint.distToCentermostPortOnZ-i.portPoint.distToCentermostPortOnZ||o.portPoint.segmentPortPointId.localeCompare(i.portPoint.segmentPortPointId))[0]?.portPoint,Kdo=(t,e,n)=\u003e{t._preloadedFixedNetIds=[...new Set([...t._preloadedFixedNetIds??[],e.fixedNetId])].sort();const o=e.end.x-e.start.x,i=e.end.y-e.start.y,r=o*o+i*i,s=r===0?0:Math.max(0,Math.min(1,((t.x-e.start.x)*o+(t.y-e.start.y)*i)/r)),a={traceId:e.traceId,fixedNetId:e.fixedNetId,routePosition:e.routePositionStart+s*(e.routePositionEnd-e.routePositionStart),tracePoint:{x:e.start.x+s*o,y:e.start.y+s*i},z:n},A=t._preloadedTracePortAssignments??[];A.some(c=\u003ec.traceId===a.traceId\u0026\u0026c.fixedNetId===a.fixedNetId\u0026\u0026c.z===a.z\u0026\u0026Math.abs(c.routePosition-a.routePosition)\u003c=J6t)||(t._preloadedTracePortAssignments=[...A,a].sort((c,l)=\u003ec.traceId.localeCompare(l.traceId)||c.routePosition-l.routePosition||c.z-l.z))},Vdo=class extends yr{constructor(e,n){super(),this.sharedEdgeSegments=e,this.srj=n,this.MAX_ITERATIONS=1,this.primitives=(o=\u003e{const i=[],r=Jm(o);for(const s of o.traces??[]){if(!s.connection_name)throw new Error(`Preloaded trace \"${s.pcb_trace_id}\" is missing a connection name`);const a=r.getNetConnectedToId(s.connection_name)??s.connection_name;for(const[A,c]of s.route.entries())if(c.route_type===\"via\")i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A,routePositionEnd:A,zLayers:W6t(c.from_layer,c.to_layer,o.layerCount),start:c,end:c});else if(c.route_type===\"through_obstacle\")i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A,routePositionEnd:A+1,zLayers:W6t(c.from_layer,c.to_layer,o.layerCount),start:c.start,end:c.end});else if(c.route_type===\"jumper\"){const l=Kr(c.layer,o.layerCount);for(const[u,g]of[c.start,c.end].entries())i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A+u,routePositionEnd:A+u,zLayers:[l],start:g,end:g})}for(let A=0;A\u003cs.route.length-1;A++){const c=s.route[A],l=s.route[A+1];j6t(c)\u0026\u0026j6t(l)\u0026\u0026c.layer===l.layer\u0026\u0026i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A,routePositionEnd:A+1,zLayers:[Kr(c.layer,o.layerCount)],start:c,end:l})}}return i})(n)}sharedEdgeSegments;srj;primitives;getSolverName(){return\"PreloadedTraceGraphSolver\"}_step(){for(const o of this.primitives)for(const i of this.sharedEdgeSegments)if(!(qQ(o.start,o.end,i.start,i.end)\u003eJ6t))for(const r of o.zLayers){if(!i.availableZ.includes(r))continue;const s=Udo(i,o,r);s\u0026\u0026Kdo(s,o,r)}const e=this.sharedEdgeSegments.flatMap(o=\u003eo.portPoints),n=e.filter(o=\u003e(o._preloadedFixedNetIds?.length??0)\u003e0);this.stats={preloadedTraceCount:this.srj.traces?.length??0,preloadedTraceShapeCount:this.primitives.length,inputBoundaryCount:this.sharedEdgeSegments.length,outputBoundaryCount:this.sharedEdgeSegments.length,inputPortCount:e.length,outputPortCount:e.length,preloadedPortCount:n.length,tracePortAssignmentCount:n.reduce((o,i)=\u003eo+(i._preloadedTracePortAssignments?.length??0),0),topologyChanged:!1},this.solved=!0}getOutput(){if(!this.solved)throw new Error(\"PreloadedTraceGraphSolver has not solved yet\");return this.sharedEdgeSegments}},zdo=class extends XAe{_step(){const{traces:e,...n}=this.inputSrj,o=mN(n),i=mN(e9t(r9t(o)));this.outputSrj=e===void 0?i:{...i,traces:e},this.solved=!0}};function $6t(t){return new Set((t??[]).filter(e=\u003ee._isComponentTopologyNode).map(e=\u003ee.capacityMeshNodeId))}function q6t(t,e){return t.nodeIds.some(n=\u003ee.has(n))}function Jdo({sharedEdgeSegments:t,componentCapacityMeshNodeIds:e}){return t.filter(n=\u003e!q6t(n,e))}function oh(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var X6t=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n;const o=mN(e);this.originalSrj=o,this.opts={...n};const i=this.opts;if(this.effort=i.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=i.maxNodeDimension??15,this.maxNodeRatio=i.maxNodeRatio??6,this.minNodeArea=i.minNodeArea??.1**2,this.visualizationTraceColorMode=i.visualizationTraceColorMode??\"layer\",this.setSimpleRouteJson(o),i.capacityDepth===void 0){const r=this.srj.bounds.maxX-this.srj.bounds.minX,s=this.srj.bounds.maxY-this.srj.bounds.minY,a=Math.max(r,s),A=i.targetMinCapacity??.5;i.capacityDepth=$Q(a,A)}this.cacheProvider=i.cacheProvider===void 0?tB():i.cacheProvider===null?null:i.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return\"AutoroutingPipelineSolver9_PreloadedTraceGraph\"}preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;componentTopologyGeneratorSolver;topologyPlanningSolver;topologyMergingSolver;globalTopologyGeneratorSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityRepairSolver;highDensityStitchSolver;globalDrcForceImproveSolver;pipeline9JointDrcRepairSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;mutatedPreloadedTraceSimplificationSolver;lengthMatchingPostProcessingSolver;powerTraceExpansionSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;preloadedTraceGraphSolver;componentDetectionSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;visualizationTraceColorMode;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;sharedEdgeSegmentsWithNecessaryCrampedPortPoints;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[oh(\"preprocessSimpleRouteJsonSolver\",zdo,e=\u003e[e.originalSrj,{traceColorMode:e.visualizationTraceColorMode}],{onSolved:e=\u003e{e.setSimpleRouteJson(e.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),oh(\"componentDetectionSolver\",n7t,e=\u003e[{inputSrj:e.srj}]),oh(\"escapeViaLocationSolver\",FAe,e=\u003e[e.srj,{viaDiameter:e.viaDiameter,minTraceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15}],{onSolved:e=\u003e{e.srjWithEscapeViaLocations=e.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),oh(\"netToPointPairsSolver\",rL,e=\u003e{const n=e.srjWithEscapeViaLocations??e.srj;return[n,e.colorMap,JQ(n)]},{onSolved:e=\u003e{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,e.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),oh(\"topologyPlanningSolver\",l7t,e=\u003e[{inputSrj:e.srjWithPointPairs,componentDetectionOutput:e.componentDetectionSolver.getOutput(),viaDiameter:e.viaDiameter,obstacleMargin:e.srj.defaultObstacleMargin??.15}],{onSolved:e=\u003e{e.topologyPlanningSolver.getOutput(),e.globalTopologyGeneratorSolver=e.topologyPlanningSolver.globalTopologySolver,e.componentTopologyGeneratorSolver=new u7t(e.topologyPlanningSolver)}}),oh(\"topologyMergingSolver\",c7t,e=\u003e{const n=e.topologyPlanningSolver.getOutput();return[{layerCount:e.srj.layerCount,nodeGroups:[{groupId:\"global\",nodes:n.globalMeshNodes,isComponent:!1},...n.componentMeshNodes.map((o,i)=\u003e({groupId:`component-${i}`,nodes:o,isComponent:!0}))]}]},{onSolved:e=\u003e{e.capacityNodes=e.topologyMergingSolver.getOutput()}}),oh(\"nodeDimensionSubdivisionSolver\",vAe,e=\u003e[e.capacityNodes,e.maxNodeDimension,e.maxNodeRatio,e.minNodeArea],{onSolved:e=\u003e{e.capacityNodes=e.nodeDimensionSubdivisionSolver.outputNodes}}),oh(\"edgeSolver\",WQ,e=\u003e[e.capacityNodes],{onSolved:e=\u003e{e.capacityEdges=e.edgeSolver?.edges}}),oh(\"availableSegmentPointSolver\",kD,e=\u003e[{nodes:e.capacityNodes,edges:e.capacityEdges||[],traceWidth:e.minTraceWidth,colorMap:e.colorMap,shouldReturnCrampedPortPoints:!0}]),oh(\"necessaryCrampedPortPointSolver\",lJ,e=\u003e{const n=$6t(e.capacityNodes);return[{capacityMeshNodes:e.capacityNodes.filter(o=\u003e!n.has(o.capacityMeshNodeId)),sharedEdgeSegments:Jdo({sharedEdgeSegments:e.availableSegmentPointSolver.getOutput(),componentCapacityMeshNodeIds:n}),simpleRouteJson:e.srjWithPointPairs}]},{onSolved:e=\u003e{const n=$6t(e.capacityNodes);e.sharedEdgeSegmentsWithNecessaryCrampedPortPoints=(function({originalSharedEdgeSegments:o,filteredSharedEdgeSegments:i,componentCapacityMeshNodeIds:r}){const s=new Map(i.map(a=\u003e[a.edgeId,a]));return o.map(a=\u003eq6t(a,r)?a:s.get(a.edgeId)??a)})({originalSharedEdgeSegments:e.availableSegmentPointSolver.getOutput(),filteredSharedEdgeSegments:e.necessaryCrampedPortPointSolver.getOutput(),componentCapacityMeshNodeIds:n})}}),oh(\"preloadedTraceGraphSolver\",Vdo,e=\u003e[e.sharedEdgeSegmentsWithNecessaryCrampedPortPoints,e.srjWithPointPairs]),oh(\"portPointPathingSolver\",kAe,e=\u003e{const n=e.sharedEdgeSegmentsWithNecessaryCrampedPortPoints??e.necessaryCrampedPortPointSolver?.getOutput()??e.availableSegmentPointSolver.getOutput(),{graph:o,connections:i}=uJ({capacityMeshNodes:e.capacityNodes,layerCount:e.srj.layerCount,connectivityMap:e.connMap,segmentPortPoints:n.flatMap(r=\u003er.portPoints),simpleRouteJsonConnections:e.srjWithPointPairs.connections});return[{graph:o,connections:i,layerCount:e.srj.layerCount,effort:e.effort,preserveTerminalPcbPortIds:!0,minViaPadDiameter:e.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0,USE_SELECTIVE_RERIP_ROUTING:!0,USE_PARTIAL_RIP_ROUTING_WITH_PRELOADED_TRACES:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),oh(\"uniformPortDistributionSolver\",kz,e=\u003e[{nodeWithPortPoints:e.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:e.minTraceWidth,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount}]),oh(\"highDensityRouteSolver\",sQe,e=\u003e{const n=e.portPointPathingSolver;if(!n)throw new Error(\"Pipeline9 invariant violated: high-density routing requires the completed port-point pathing solver\");const o=n.getOutput(),i=e.uniformPortDistributionSolver?.getOutput()??[],r=o.nodesWithPortPoints,s=i.length\u003e0?i:r;e.highDensityNodePortPoints=structuredClone(s);const a=(e.originalSrj.traces??[]).flatMap((A,c)=\u003ekv(A,c,e.originalSrj.layerCount,e.viaDiameter,e.connMap));return[{nodePortPoints:s,fixedHdRoutes:z7t({traces:e.originalSrj.traces??[],fixedHdRoutes:a,sections:e.getChangedPreloadedTraceSections()}),connMap:e.connMap,colorMap:e.colorMap,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15,viaToPadClearance:e.srj.minViaEdgeToPadEdgeClearance,effort:e.effort,includeBoardObstacles:!0,nodePfById:new Map(o.inputNodeWithPortPoints.map(A=\u003e[A.capacityMeshNodeId,n.computeNodePf(A)])),preserveTerminalPcbPortIds:!0}]}),oh(\"highDensityForceImproveSolver\",mJ,e=\u003e[{nodeWithPortPoints:e.highDensityNodePortPoints??[],hdRoutes:J7t(e.highDensityRouteSolver.routes),colorMap:e.colorMap,totalStepsPerNode:Math.max(12,Math.round(20*e.effort)),nodeAssignmentMargin:e.srj.defaultObstacleMargin??.2}]),oh(\"highDensityRepairSolver\",pW,e=\u003e[{nodeWithPortPoints:e.highDensityNodePortPoints??[],hdRoutes:e.highDensityForceImproveSolver?.getOutput()??e.highDensityRouteSolver.routes,obstacles:e.srj.obstacles,colorMap:e.colorMap,repairMargin:e.srj.defaultObstacleMargin??.2,maxSampleEntries:80}]),oh(\"highDensityStitchSolver\",$Ae,e=\u003e[{connections:[...e.srjWithPointPairs.connections,...e.getChangedPreloadedTraceSections().map(n=\u003en.connection)],hdRoutes:e.highDensityRepairSolver?.getOutput()??e.highDensityForceImproveSolver?.getOutput()??e.highDensityRouteSolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter,preserveTerminalPcbPortIds:!0,preferSameLayerTerminalEndpoints:!0}]),oh(\"traceSimplificationSolver\",j8,e=\u003e{const n=e.getPreloadedTraceUpdatesAfterHighDensity().updatedPreloadedTraces.flatMap((s,a)=\u003ekv(s,a,e.originalSrj.layerCount,e.viaDiameter,e.connMap)),o=new Set(e.getChangedPreloadedTraceSections().map(s=\u003es.connectionName)),i=e.highDensityStitchSolver.mergedHdRoutes.filter(s=\u003e!o.has(s.connectionName)),r=XSe([...i,...n],e.connMap);return[{hdRoutes:i,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,minTraceToPadEdgeClearance:e.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:e.srj.minBoardEdgeClearance,otherHdRoutes:n,netByConnectionName:r,enableCrossingViaReduction:!0,terminalLayerIndicesByPcbPortId:vgo(e.srj.connections,e.srj.obstacles,e.srj.layerCount),iterations:2}]}),oh(\"mutatedPreloadedTraceSimplificationSolver\",j8,e=\u003e{const n=e.getPreparedMutatedPreloadedTraceSections(),o=n.sections.map(r=\u003er.hdRoute),i=[...n.immutableHdRoutes,...e.traceSimplificationSolver.simplifiedHdRoutes];return[{hdRoutes:o,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,minTraceToPadEdgeClearance:e.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:e.srj.minBoardEdgeClearance,otherHdRoutes:i,netByConnectionName:XSe([...o,...i],e.connMap),enableCrossingViaReduction:!0,preserveRouteEndpoints:!0,iterations:2}]}),oh(\"traceWidthSolver\",aL,e=\u003e[{hdRoutes:e.traceSimplificationSolver.simplifiedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,minTraceWidth:e.minTraceWidth,connection:e.srjWithPointPairs.connections,obstacleMargin:e.srj.minTraceToPadEdgeClearance??.15,layerCount:e.srj.layerCount}]),oh(\"globalDrcForceImproveSolver\",S7,e=\u003e[{srj:e.getSrjWithMaterializedPreloadedTraces(),hdRoutes:N7t(e.traceWidthSolver.getHdRoutesWithWidths(),e.netToPointPairsSolver?.newConnections??[],new Map((e.highDensityStitchSolver?.mergedHdRoutes??[]).map(n=\u003e[n.connectionName,n]))),connMap:e.connMap,effort:e.effort,maxIterations:16,enableLargeBoardBroadFallback:!1,enablePostSolveClearanceRelaxation:!1}]),oh(\"pipeline9JointDrcRepairSolver\",Ydo,e=\u003e{const n=e.getPreloadedTraceUpdatesAfterHighDensity(),o=e.getSrjWithMaterializedPreloadedTraces();return[{srj:o,srjWithPointPairs:o,originalSrj:e.originalSrj,newConnections:e.netToPointPairsSolver?.newConnections??[],newHdRoutes:e.globalDrcForceImproveSolver.getOutput(),updatedPreloadedTraces:n.updatedPreloadedTraces,mutatedPreloadedTraceIds:new Set(n.mutatedPreloadedTraces.map(i=\u003ei.pcb_trace_id)),connMap:e.connMap,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter,defaultViaHoleDiameter:e.viaHoleDiameter,effort:e.effort,colorMap:e.colorMap}]}),oh(\"lengthMatchingPostProcessingSolver\",Bgo,e=\u003e{const n=e.netToPointPairsSolver;if(!n)throw new Error(\"Pipeline9: length-matching post-processing requires NetToPointPairsSolver output\");const o=n.newConnections,i=new Map;for(const a of e.srj.differentialPairs??[])for(const A of a.connectionNames){const c=o.filter(l=\u003el.name===A||l.__rootConnectionNames?.includes(A)||l.__netConnectionName===A);if(c.length!==1)throw new Error(`Pipeline9: differential pair connection \"${A}\" must resolve to exactly one final point-pair connection, got ${c.length}`);i.set(A,c[0].name)}const r=e.pipeline9JointDrcRepairSolver.getOutput(),s=(e.srj.differentialPairs??[]).map(a=\u003e{const A=a.connectionNames.map(u=\u003e{const g=i.get(u);if(!g)throw new Error(`Pipeline9: differential pair connection \"${u}\" is missing from final routed output`);return g});if(A[0]===A[1])throw new Error(`Pipeline9: differential pair ${a.connectionNames.join(\"/\")} resolves both members to \"${A[0]}\"`);if(a.traceGap===void 0)return{connectionNames:A,lengthTolerance:a.lengthTolerance};const c=A.map(u=\u003e{const g=r.filter(h=\u003eh.connectionName===u);if(g.length!==1)throw new Error(`Pipeline9: differential pair connection \"${u}\" must resolve to exactly one final HD route, got ${g.length}`);return g[0]}),l=a.traceGap+c.reduce((u,g)=\u003eu+g.traceThickness/2,0);return{connectionNames:A,lengthTolerance:a.lengthTolerance,minimumCenterlineDistance:l,maximumCenterlineDistance:l}});return[{hdRoutes:r,differentialPairs:s,buses:e.srj.buses??[],connections:e.srj.connections,obstacles:e.srj.obstacles,bounds:e.srj.bounds,layerCount:e.srj.layerCount,obstacleMargin:e.srj.minTraceToPadEdgeClearance??.15}]}),oh(\"powerTraceExpansionSolver\",P7t,e=\u003e{const n=e.opts.powerTraceExpansion??{},o=n.onlyConnectionNames??D7t(e.originalSrj);return[R7t({originalSrj:e.originalSrj,newlyRoutedTraces:e.getNewTracesBeforePowerExpansion(),currentPreloadedTraces:e.getUpdatedPreloadedTraces(),expandedConnectionNames:o,resolveConnectedTraceAliases:!0}),{allowNewVias:!1,...n,onlyConnectionNames:o}]})];setSimpleRouteJson(e){this.srj=e;const n=om(this.srj);this.viaDiameter=n.padDiameter,this.viaHoleDiameter=n.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;computeProgress(){const e=this.activeSubSolver?.progress??0;return(this.currentPipelineStepIndex+e)/this.pipelineDef.length}_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),e.solverName!==\"lengthMatchingPostProcessingSolver\"\u0026\u0026e.solverName!==\"powerTraceExpansionSolver\"||(this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,this.iterations+this.activeSubSolver.MAX_ITERATIONS+1)),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.visualizeStage(this.activeSubSolver);const e=this.escapeViaLocationSolver?.visualize(),n=this.netToPointPairsSolver?.visualize(),o=this.componentDetectionSolver?.visualize(),i=this.componentTopologyGeneratorSolver?.visualize(),r=this.globalTopologyGeneratorSolver?.visualize(),s=this.topologyMergingSolver?.visualize(),a=this.nodeDimensionSubdivisionSolver?.visualize(),A=this.nodeTargetMerger?.visualize(),c=this.singleLayerNodeMerger?.visualize(),l=this.strawSolver?.visualize(),u=this.edgeSolver?.visualize(),g=this.deadEndSolver?.visualize(),h=this.availableSegmentPointSolver?.visualize(),d=this.portPointPathingSolver?.visualize(),p=this.multiSectionPortPointOptimizer?.visualize(),m=this.uniformPortDistributionSolver?.visualize(),_=this.highDensityRouteSolver?.visualize(),f=this.highDensityForceImproveSolver?.visualize(),I=this.highDensityRepairSolver?.visualize(),C=this.highDensityStitchSolver?.visualize(),y=this.traceSimplificationSolver?.visualize(),x=this.mutatedPreloadedTraceSimplificationSolver?.visualize(),E=this.lengthMatchingPostProcessingSolver?.visualize(),B=this.powerTraceExpansionSolver?.visualize(),S=this.traceWidthSolver?.visualize(),Q=this.necessaryCrampedPortPointSolver?.visualize(),w=(this.highDensityRouteSolver?.visualize(),this.originalSrj),M=w.outline,k=[];if(k.push({points:[{x:w.bounds?.minX??-50,y:w.bounds?.minY??-50},{x:w.bounds?.maxX??50,y:w.bounds?.minY??-50},{x:w.bounds?.maxX??50,y:w.bounds?.maxY??50},{x:w.bounds?.minX??-50,y:w.bounds?.maxY??50},{x:w.bounds?.minX??-50,y:w.bounds?.minY??-50}],strokeColor:\"rgba(255,0,0,0.25)\"}),M\u0026\u0026M.length\u003e=2){const ie=M.map(ne=\u003e({x:ne.x,y:ne.y}));ie.push({...ie[0]}),k.push({points:ie,strokeColor:\"rgba(0, 136, 255, 0.95)\"})}const R=z8(w),F={points:[...w.connections.flatMap(ie=\u003eie.pointsToConnect.map(ne=\u003e({...ne,layer:J8(ne,w.layerCount),label:`${ie.name} ${ne.pcb_port_id??\"\"}`})))],rects:[...(w.obstacles??[]).filter(ie=\u003e!ie.isCopperPour).map(ie=\u003e({...ie,fill:ie.layers?.includes(\"top\")?\"rgba(255,0,0,0.25)\":ie.layers?.includes(\"bottom\")?\"rgba(0,0,255,0.25)\":\"rgba(255,0,0,0.25)\",layer:r7(ie,w.layerCount),label:R(ie)}))],lines:k},O={traceColorMode:this.visualizationTraceColorMode},U=ab({srj:w,visualizationOptions:O}),Y=Il(F,U),W=this.preprocessSimpleRouteJsonSolver?.visualize(),te=this.globalDrcForceImproveSolver?.visualize(),j=this.pipeline9JointDrcRepairSolver?.visualize(),J=[Y,W,o,i,e,n,r,s,a,A,c,l,u,g,h,Q,d,p,m,_?Il(F,_):null,f,I,C,y,x,S,te,j,E,B,this.solved?Il({lines:k},ab({srj:this.originalSrj,visualizationOptions:O}),this.visualizeFinalOutput()):null].filter(Boolean),oe=Il(...J);return this.visualizationTraceColorMode===\"net\"?pce(oe,this.colorMap):oe}visualizeStage(e){const n=e.visualize();return this.visualizationTraceColorMode===\"net\"?pce(n,this.colorMap):n}visualizeFinalOutput(){const e=this.visualizationTraceColorMode,n=this.getOutputSimpleRouteJson();return mx(n,{traceColorMode:e})}preview(){if(this.highDensityRouteSolver){const e=[];for(let n=this.highDensityRouteSolver.routes.length-1;n\u003e=0;n--){const o=this.highDensityRouteSolver.routes[n];if(e.push({points:o.route.map(i=\u003e({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length\u003e200)break}return{lines:e}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.componentTopologyGeneratorSolver?this.componentTopologyGeneratorSolver.visualize():this.componentDetectionSolver?this.componentDetectionSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){if(((this.originalSrj.differentialPairs?.length??0)\u003e0||(this.originalSrj.buses??[]).some(e=\u003ee.maxLengthSkew!==void 0))\u0026\u0026this.lengthMatchingPostProcessingSolver){const{hdRoutes:e}=this.lengthMatchingPostProcessingSolver.getOutput();return e}return this.pipeline9JointDrcRepairSolver?.getOutput()??this.globalDrcForceImproveSolver?.getOutput()??this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOriginalFixedHdRoutes(){return(this.originalSrj.traces??[]).flatMap((e,n)=\u003ekv(e,n,this.originalSrj.layerCount,this.viaDiameter,this.connMap))}getChangedPreloadedTraceSections(){return this.portPointPathingSolver?.getOutput().changedPreloadedTraceSections??[]}getPreloadedFixedRouteStateAfterHighDensity(){const e=this.getOriginalFixedHdRoutes(),n=this.getChangedPreloadedTraceSections(),o=z7t({traces:this.originalSrj.traces??[],fixedHdRoutes:e,sections:n}),i=n.length===0?[]:wgo({traces:this.originalSrj.traces??[],sections:n,stitchedHdRoutes:this.highDensityStitchSolver?.mergedHdRoutes??[],layerCount:this.originalSrj.layerCount}),r=new Set(n.map(a=\u003ea.traceId)),s=e.filter(a=\u003er.has(this.originalSrj.traces?.[a.preloadedTraceIndex]?.pcb_trace_id??\"\")).map(a=\u003ea.connectionName);return{originalFixedRoutes:e,updatedFixedRoutes:[...this.highDensityRouteSolver?.getUpdatedFixedHdRoutes()??o,...i],replacedConnectionNames:new Set([...this.highDensityRouteSolver?.fixedRouteReplacements.keys()??[],...s]),mutationMasks:new Map([...this.highDensityRouteSolver?.preloadedTraceMutationMasks??[],...i.map(a=\u003e[a.connectionName,Array(a.route.length-1).fill(!0)])])}}getPreparedMutatedPreloadedTraceSections(){const e=this.getPreloadedFixedRouteStateAfterHighDensity();return Tgo({updatedFixedRoutes:e.updatedFixedRoutes,regionalMutationMasks:e.mutationMasks})}getPreloadedTraceUpdatesAfterHighDensity(){const e=this.getPreloadedFixedRouteStateAfterHighDensity(),n=this.getPreparedMutatedPreloadedTraceSections(),o=this.mutatedPreloadedTraceSimplificationSolver?.solved===!0?(({updatedFixedRoutes:i,sections:r,simplifiedHdRoutes:s})=\u003e{const a=new Set(r.map(u=\u003eu.connectionName)),A=new Map(s.map(u=\u003e[u.connectionName,u]));if(A.size!==r.length||s.some(u=\u003e!a.has(u.connectionName)))throw new Error(`Pipeline9 trace simplification changed the mutation-section set (expected ${r.length}, got ${s.length})`);const c=new Map,l=new Set;for(const u of r){const g=A.get(u.connectionName);if(!g)throw new Error(`Pipeline9 trace simplification lost mutation section \"${u.connectionName}\"`);const h=g.route[0],d=g.route.at(-1);if(!(h\u0026\u0026d\u0026\u0026Qce(h,u.section.start.point)\u0026\u0026Qce(d,u.section.end.point)))throw new Error(`Pipeline9 trace simplification changed mutation-section boundary \"${u.connectionName}\"`);const p=eQe(u.section,g),m=u.section.sourceRoutes[0];l.add(m.connectionName);for(const _ of u.section.sourceRoutes){if(c.has(_.connectionName))throw new Error(`Pipeline9 attempted to simplify fixed route \"${_.connectionName}\" more than once`);c.set(_.connectionName,p)}}return i.flatMap(u=\u003e{const g=c.get(u.connectionName);return g?l.has(u.connectionName)?[g]:[]:[u]})})({updatedFixedRoutes:n.normalizedFixedRoutes,sections:n.sections,simplifiedHdRoutes:this.mutatedPreloadedTraceSimplificationSolver.simplifiedHdRoutes}):e.updatedFixedRoutes;return(({originalTraces:i,originalFixedRoutes:r,updatedFixedRoutes:s,replacedConnectionNames:a,layerCount:A,defaultViaHoleDiameter:c,obstacles:l,connMap:u})=\u003e{const g=new Map,h=new Map;for(const p of r){const m=g.get(p.preloadedTraceIndex)??[];m.push(p),g.set(p.preloadedTraceIndex,m)}for(const p of s){const m=h.get(p.preloadedTraceIndex)??[];m.push(p),h.set(p.preloadedTraceIndex,m)}const d=[];return{updatedPreloadedTraces:i.map((p,m)=\u003e{const _=(g.get(m)??[]).sort($Se);if(!_.some(y=\u003ea.has(y.connectionName)))return p;const f=(h.get(m)??[]).sort($Se),I=p.route.some(y=\u003ey.route_type===\"through_obstacle\"),C={...p,__replaces_pcb_trace_id:p.pcb_trace_id,route:I?Qgo({trace:p,originalTraceRoutes:_,updatedTraceRoutes:f,layerCount:A,defaultViaHoleDiameter:c,obstacles:l,connMap:u}):G7t({trace:p,updatedTraceRoutes:f,layerCount:A,defaultViaHoleDiameter:c,obstacles:l,connMap:u})};return d.push(C),C}),mutatedPreloadedTraces:d}})({originalTraces:this.originalSrj.traces??[],originalFixedRoutes:e.originalFixedRoutes,updatedFixedRoutes:o,replacedConnectionNames:e.replacedConnectionNames,layerCount:this.originalSrj.layerCount,defaultViaHoleDiameter:this.viaHoleDiameter,obstacles:this.originalSrj.obstacles,connMap:this.connMap})}getSrjWithMaterializedPreloadedTraces(){return{...this.srjWithPointPairs,traces:this.getPreloadedTraceUpdatesAfterHighDensity().updatedPreloadedTraces}}getUpdatedPreloadedTraces(){return this.pipeline9JointDrcRepairSolver?.getUpdatedPreloadedTraces()??this.getPreloadedTraceUpdatesAfterHighDensity().updatedPreloadedTraces}getMutatedPreloadedTraces(){return this.pipeline9JointDrcRepairSolver?.getMutatedPreloadedTraces()??this.getPreloadedTraceUpdatesAfterHighDensity().mutatedPreloadedTraces}getNewTracesBeforePowerExpansion(){if(!this.highDensityRouteSolver)throw new Error(\"Cannot get new traces before high-density routing\");const e=M7t({connections:this.netToPointPairsSolver?.newConnections??[],originalConnections:this.originalSrj.connections,hdRoutes:this._getOutputHdRoutes(),layerCount:this.srj.layerCount,obstacles:this.srj.obstacles,defaultViaHoleDiameter:this.viaHoleDiameter,connMap:this.connMap});return Y7t(e,this.originalSrj.traces??[])}getPowerTraceExpansionFixedTraces(){if(!this.powerTraceExpansionSolver)throw new Error(\"Pipeline9 invariant violated: solved pipeline is missing the unconditional power-trace expansion solver\");return this.powerTraceExpansionSolver.inputSrj.fixedTraces}getOutputSimplifiedPcbTraces(){if(!this.solved)throw new Error(\"Cannot get output before solving is complete\");if(!this.powerTraceExpansionSolver)throw new Error(\"Pipeline9 invariant violated: solved pipeline is missing the unconditional power-trace expansion solver\");return[...this.getPowerTraceExpansionFixedTraces().filter(e=\u003ee.__replaces_pcb_trace_id!==void 0),...this.powerTraceExpansionSolver.getOutput()]}getOutputSimpleRouteJson(){if(!this.solved)throw new Error(\"Cannot get output before solving is complete\");if(!this.powerTraceExpansionSolver)throw new Error(\"Pipeline9 invariant violated: solved pipeline is missing the unconditional power-trace expansion solver\");const e=[...this.getPowerTraceExpansionFixedTraces(),...this.powerTraceExpansionSolver.getOutput()];return{...this.originalSrj,traces:e}}},Wdo=\"0.0.873\",CQe=({nodeWithPortPoints:t,obstacleMargin:e,traceWidth:n,viaDiameter:o})=\u003e{const i=Tz(t),r=e+Math.max(n,o)/2+1e-6;return{minX:t.center.x+8*(i.minX-t.center.x)-r,maxX:t.center.x+8*(i.maxX-t.center.x)+r,minY:t.center.y+8*(i.minY-t.center.y)-r,maxY:t.center.y+8*(i.maxY-t.center.y)+r}},Z6t=(t,e)=\u003e{const n=(t.ccwRotationDegrees??0)*Math.PI/180,o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=t.width/2,s=t.height/2,a=Math.max(r,r*o+s*i),A=Math.max(s,r*i+s*o);return t.center.x-a\u003c=e.maxX\u0026\u0026t.center.x+a\u003e=e.minX\u0026\u0026t.center.y-A\u003c=e.maxY\u0026\u0026t.center.y+A\u003e=e.minY},QH=(t,e)=\u003e{for(const n of[e.connectionName,e.rootConnectionName,e.portPointId,e.pcb_port_id,e.prevPortPointId,e.nextPortPointId])n!==void 0\u0026\u0026t.add(n)},e8t=(t,e)=\u003eObject.fromEntries(Object.entries(t.netMap).flatMap(([n,o])=\u003e{const i=o.filter(r=\u003ee.has(r));return i.length\u003e0||e.has(n)?[[n,i]]:[]})),t8t=({obstacle:t,connectedTo:e,preserveRotation:n})=\u003e({type:\"rect\",layers:t.layers,...t.zLayers===void 0?{}:{zLayers:t.zLayers},...t.__zLayers===void 0?{}:{__zLayers:t.__zLayers},center:t.center,width:t.width,height:t.height,...n\u0026\u0026t.ccwRotationDegrees!==void 0?{ccwRotationDegrees:t.ccwRotationDegrees}:{},connectedTo:e,...t.circuitJsonMetadata===void 0?{}:{circuitJsonMetadata:t.circuitJsonMetadata}});function jdo({nodeWithPortPoints:t,connMap:e,obstacles:n,obstacleMargin:o,traceWidth:i,viaDiameter:r}){const s=CQe({nodeWithPortPoints:t,obstacleMargin:o,traceWidth:i,viaDiameter:r}),a=new Set;for(const c of t.portPoints)QH(a,c);for(const c of t.portPointsInPairs??[])QH(a,c[0]),QH(a,c[1]);const A=n.flatMap(c=\u003e{if(!Z6t(c,s))return[];const l=(({obstacle:u,nodeWithPortPoints:g,connMap:h})=\u003e{const d=new Set(g.portPoints.flatMap(_=\u003e{const f=h.getNetConnectedToId(_.rootConnectionName??_.connectionName)??_.rootConnectionName??_.connectionName;return[_.connectionName,f]})),p=new Set(u.connectedTo.filter(_=\u003ed.has(_))),m=new Map;for(const _ of d){const f=h.getNetConnectedToId(_)??_,I=m.get(f)??[];I.push(_),m.set(f,I)}for(const _ of m.values()){if([...p].some(I=\u003e_.some(C=\u003eC===I||h.areIdsConnected(C,I))))continue;const f=u.connectedTo.find(I=\u003e_.some(C=\u003eC===I||h.areIdsConnected(C,I)));f!==void 0\u0026\u0026p.add(f)}return[...p]})({obstacle:c,nodeWithPortPoints:t,connMap:e});for(const u of l)a.add(u);return[t8t({obstacle:c,connectedTo:l,preserveRotation:!0})]});return{connectivityNetMap:e8t(e,a),obstacles:A}}var $do=(...t)=\u003e{const e=new Map;for(const n of t)for(const[o,i]of Object.entries(n)){const r=e.get(o)??new Set;for(const s of i)r.add(s);e.set(o,r)}return Object.fromEntries([...e].map(([n,o])=\u003e[n,[...o]]))};function qdo({nodeWithPortPoints:t,connMap:e,colorMap:n,obstacles:o,obstacleMargin:i,traceWidth:r,viaDiameter:s}){const a=CQe({nodeWithPortPoints:t,obstacleMargin:i,traceWidth:r,viaDiameter:s}),A=(u=\u003e[...new Set(u.portPoints.map(g=\u003eg.connectionName))])(t),c=o.flatMap(u=\u003e{if(!Z6t(u,a))return[];const g=A.filter(h=\u003eu.connectedTo.some(d=\u003ed===h||e.areIdsConnected(h,d)));return g.length===0?[]:[t8t({obstacle:u,connectedTo:g,preserveRotation:!1})]}),l=new Set;for(const u of t.portPoints)QH(l,u);for(const u of t.portPointsInPairs??[])QH(l,u[0]),QH(l,u[1]);for(const u of c)for(const g of[u.circuitJsonMetadata?.pcb_smtpad_id,u.circuitJsonMetadata?.pcb_plated_hole_id,u.circuitJsonMetadata?.pcb_port_id,u.circuitJsonMetadata?.pcb_via_id,...u.connectedTo??[]])g!==void 0\u0026\u0026l.add(g);return{connectivityNetMap:e8t(e,l),colorMap:Object.fromEntries(Object.entries(n??{}).filter(([u])=\u003el.has(u))),obstacles:c}}var yQe=\"https://hd-cache2.tscircuit.com\",n8t=31e4,o8t=1835008,i8t=16777216,ih=class extends Error{constructor(e,n){super(n),this.reason=e,this.name=\"HdCache2RequestError\"}reason},LW=t=\u003et instanceof Error?t.message:String(t),Xdo=new Set([\"pcb_smtpad_id\",\"pcb_plated_hole_id\",\"pcb_port_id\",\"pcb_via_id\",\"source_component_name\",\"source_port_name\"]),Zdo=t=\u003e!(!t||typeof t!=\"object\"||Array.isArray(t))\u0026\u0026Object.entries(t).every(([e,n])=\u003eXdo.has(e)\u0026\u0026typeof n==\"string\"),HW=(t,e)=\u003eMath.abs(t-e)\u003c=1e-9*Math.max(1,Math.abs(t),Math.abs(e)),r8t=1e-6,eho=(t,e)=\u003e{const n=e===\"ordinary\"?r8t:.001,o=new Set;for(let r=0;r\u003ct.route.length-1;r++){const s=t.route[r],a=t.route[r+1],A=s.z!==a.z;if(s.toNextSegmentType===\"through_obstacle\"){if(!A)return!1;continue}if(s.toNextSegmentCircuitJsonMetadata!==void 0)return!1;if(!A)continue;const c=[],l=[];for(const[u,g]of t.vias.entries())Math.hypot(g.x-s.x,g.y-s.y)\u003c=n\u0026\u0026c.push(u),Math.hypot(g.x-a.x,g.y-a.y)\u003c=n\u0026\u0026l.push(u);if(Math.hypot(s.x-a.x,s.y-a.y)\u003c=r8t){if(c.length===0)return!1;for(const u of c)o.add(u)}else{if(e===\"regional-fallback\"||c.length===0==(l.length===0))return!1;for(const u of[...c,...l])o.add(u)}}const i=t.route.at(-1);return i.toNextSegmentType===void 0\u0026\u0026i.toNextSegmentCircuitJsonMetadata===void 0\u0026\u0026t.vias.every((r,s)=\u003eo.has(s))},tho=(t,e,n)=\u003e{if(!Array.isArray(t))return!1;const o=new Map;for(const A of e.nodeWithPortPoints.portPoints){const c=o.get(A.connectionName)??[];c.push(A),o.set(A.connectionName,c)}const i=new Set(e.nodeWithPortPoints.availableZ??e.nodeWithPortPoints.portPoints.map(A=\u003eA.z)),r=CQe({nodeWithPortPoints:e.nodeWithPortPoints,obstacleMargin:e.obstacleMargin,traceWidth:e.traceWidth,viaDiameter:e.viaDiameter}),s=(A,c)=\u003e(o.get(c)??[]).some(l=\u003etypeof A.x==\"number\"\u0026\u0026HW(A.x,l.x)\u0026\u0026typeof A.y==\"number\"\u0026\u0026HW(A.y,l.y)\u0026\u0026A.z===l.z);for(const A of t){if(!A||typeof A!=\"object\")return!1;const c=A;if(typeof c.connectionName!=\"string\"||c.connectionName.length===0||!o.has(c.connectionName)||typeof c.traceThickness!=\"number\"||!Number.isFinite(c.traceThickness)||c.traceThickness\u003c=0||typeof c.viaDiameter!=\"number\"||!Number.isFinite(c.viaDiameter)||c.viaDiameter\u003c=0||!HW(c.viaDiameter,e.viaDiameter)||!Array.isArray(c.route)||c.route.length\u003c2||!Array.isArray(c.vias))return!1;for(const u of[c.rootConnectionName,c.startPcbPortId,c.endPcbPortId,c.regionId])if(u!==void 0\u0026\u0026typeof u!=\"string\")return!1;for(const u of c.route){if(!u||typeof u!=\"object\")return!1;const g=u;if(typeof g.x!=\"number\"||!Number.isFinite(g.x)||typeof g.y!=\"number\"||!Number.isFinite(g.y)||g.x\u003cr.minX||g.x\u003er.maxX||g.y\u003cr.minY||g.y\u003er.maxY||typeof g.z!=\"number\"||!Number.isInteger(g.z)||g.z\u003c0||g.z\u003e=e.layerCount||n===\"ordinary\"\u0026\u0026!i.has(g.z)||g.traceThickness!==void 0\u0026\u0026(typeof g.traceThickness!=\"number\"||!Number.isFinite(g.traceThickness)||g.traceThickness\u003c=0)||g.pcb_port_id!==void 0\u0026\u0026typeof g.pcb_port_id!=\"string\"||g.insideJumperPad!==void 0\u0026\u0026typeof g.insideJumperPad!=\"boolean\"||g.toNextSegmentType!==void 0\u0026\u0026g.toNextSegmentType!==\"through_obstacle\"||g.toNextSegmentCircuitJsonMetadata!==void 0\u0026\u0026!Zdo(g.toNextSegmentCircuitJsonMetadata))return!1}const l=c.route;if(!(n!==\"ordinary\"||s(l[0],c.connectionName)\u0026\u0026s(l.at(-1),c.connectionName)))return!1;for(const u of c.vias){if(!u||typeof u!=\"object\")return!1;const g=u;if(typeof g.x!=\"number\"||!Number.isFinite(g.x)||typeof g.y!=\"number\"||!Number.isFinite(g.y)||g.x\u003cr.minX||g.x\u003er.maxX||g.y\u003cr.minY||g.y\u003er.maxY)return!1}if(!eho(c,n))return!1;if(c.jumpers!==void 0){if(!Array.isArray(c.jumpers))return!1;for(const u of c.jumpers){if(!u||typeof u!=\"object\")return!1;const g=u,h=g.start,d=g.end;if(g.route_type!==\"jumper\"||g.footprint!==\"0603\"\u0026\u0026g.footprint!==\"1206\"\u0026\u0026g.footprint!==\"1206x4_pair\"||!h||typeof h.x!=\"number\"||!Number.isFinite(h.x)||typeof h.y!=\"number\"||!Number.isFinite(h.y)||!d||typeof d.x!=\"number\"||!Number.isFinite(d.x)||typeof d.y!=\"number\"||!Number.isFinite(d.y)||h.x\u003cr.minX||h.x\u003er.maxX||h.y\u003cr.minY||h.y\u003er.maxY||d.x\u003cr.minX||d.x\u003er.maxX||d.y\u003cr.minY||d.y\u003er.maxY)return!1}}}const a=t;return n===\"ordinary\"?((A,c)=\u003e{const l=c.portPointsInPairs??[];if(l.length\u003e0){for(const[g,h]of l)if(!eae(A,g.connectionName,z3(g)).has(z3(h)))return!1;return!0}const u=new Map;for(const g of c.portPoints){const h=u.get(g.connectionName)??[];h.push(g),u.set(g.connectionName,h)}for(const[g,h]of u)for(const[d,p]of Yz(h))if(!eae(A,g,z3(d)).has(z3(p)))return!1;return!0})(a,e.nodeWithPortPoints):((A,c)=\u003e{const l=(p,m)=\u003e{if(p.z!==m.z)return!1;const _=p.x-m.x,f=p.y-m.y;return Math.hypot(_,f)\u003c=.001},u=new Map;for(const p of A){const m=p.route.some((y,x)=\u003e{const E=p.route[x+1];return!(E===void 0||HW(y.x,E.x)\u0026\u0026HW(y.y,E.y)\u0026\u0026y.z===E.z)}),_=p.route[0],f=p.route.at(-1);if(!m||!_||!f)return!1;const I=c.portPoints.filter(y=\u003ey.connectionName===p.connectionName);if(!I.some(y=\u003el(_,y))||!I.some(y=\u003el(f,y)))return!1;const C=u.get(p.connectionName)??[];C.push({start:_,end:f}),u.set(p.connectionName,C)}const g=(p,m,_)=\u003e{if(l(m,_))return!0;const f=u.get(p)??[],I=[],C=new Set;for(const[y,x]of f.entries())(l(m,x.start)||l(m,x.end))\u0026\u0026(I.push(y),C.add(y));for(;I.length\u003e0;){const y=f[I.pop()];if(l(_,y.start)||l(_,y.end))return!0;for(const[x,E]of f.entries())C.has(x)||(l(y.start,E.start)||l(y.start,E.end)||l(y.end,E.start)||l(y.end,E.end))\u0026\u0026(C.add(x),I.push(x))}return!1},h=c.portPointsInPairs??[];if(h.length\u003e0)return h.every(([p,m])=\u003eg(p.connectionName,p,m));const d=new Map;for(const p of c.portPoints){const m=d.get(p.connectionName)??[];m.push(p),d.set(p.connectionName,m)}return[...d].every(([,p])=\u003eYz(p).every(([m,_])=\u003eg(m.connectionName,m,_)))})(a,e.nodeWithPortPoints)},nho=class{constructor(e,n=yQe,o={}){this.autorouterVersion=e,this.serverUrl=n;const{cacheVersion:i}=o;if(i!==void 0\u0026\u0026i.trim().length===0)throw new Error(\"hd-cache2 cacheVersion must not be empty\");this.cacheVersion=i}autorouterVersion;serverUrl;cacheVersion;stats={batchRequestsStarted:0,batchRequestsCompleted:0,batchItemsStarted:0,batchBodyBytesStarted:0,batchMaxBodyBytes:0,batchCacheMisses:0,singleRequestsStarted:0,batchInvalidLines:0,batchUnknownRequestIds:0,batchDuplicateRequestIds:0};solveMany(e){const n=e.map((s,a)=\u003ethis.createPendingSolve(String(a),s)),o=n.filter(s=\u003es.serializedItem!==null),{batches:i,singletonSolves:r}=this.prepareBatches(o);for(const s of i)this.fetchBatch(s);for(const s of r)this.launchSingleSolve(s);return n.map(s=\u003es.promise)}createPendingSolve(e,n){let o;const i={requestId:e,input:n,serializedItem:null,promise:new Promise(r=\u003e{o=r}),resolve:o,settled:!1,singleSolveStarted:!1};try{i.serializedItem=JSON.stringify({requestId:e,input:n})}catch(r){this.settleWithFallback(i,\"request_serialization_error\",LW(r))}return i}settle(e,n){e.settled||(e.settled=!0,e.resolve(n))}settleWithFallback(e,n,o){this.settle(e,{kind:\"local-fallback\",reason:n,error:o})}parseSuccessfulResponse(e,n){if(!e||typeof e!=\"object\"||Array.isArray(e))throw new ih(\"invalid_response\",\"hd-cache2 returned a non-object response\");const o=e;if(o.ok!==!0)throw new ih(\"remote_error\",typeof o.message==\"string\"?o.message:\"hd-cache2 returned an unsuccessful response\");if(o.autorouterVersion!==this.autorouterVersion)throw new ih(\"version_mismatch\",`hd-cache2 returned autorouter version ${String(o.autorouterVersion)}, expected ${this.autorouterVersion}`);if(o.cacheVersion!==this.cacheVersion)throw new ih(\"cache_version_mismatch\",`hd-cache2 returned cache version ${String(o.cacheVersion)}, expected ${String(this.cacheVersion)}`);if(o.source!==\"cache\"\u0026\u0026o.source!==\"solver\")throw new ih(\"invalid_response\",\"hd-cache2 returned an invalid cache source\");if(o.solutionStage!==\"ordinary\"\u0026\u0026o.solutionStage!==\"regional-fallback\")throw new ih(\"invalid_response\",\"hd-cache2 returned an invalid solution stage\");if(o.solutionStage===\"regional-fallback\"\u0026\u0026(!n.enableRegionalFallback||typeof o.ordinaryFailure!=\"string\"||o.ordinaryFailure.length===0))throw new ih(\"invalid_response\",\"hd-cache2 returned invalid regional fallback metadata\");if(o.solutionStage===\"ordinary\"\u0026\u0026Object.prototype.hasOwnProperty.call(o,\"ordinaryFailure\"))throw new ih(\"invalid_response\",\"hd-cache2 returned regional metadata on an ordinary result\");if(o.solutionStage===\"ordinary\"\u0026\u0026o.status===\"failed\"\u0026\u0026n.enableRegionalFallback)throw new ih(\"invalid_response\",\"hd-cache2 returned an intermediate ordinary failure\");if(o.status===\"solved\"\u0026\u0026tho(o.routes,n,o.solutionStage)||o.status===\"failed\"\u0026\u0026typeof o.error==\"string\"\u0026\u0026o.error.length\u003e0)return o;throw new ih(\"invalid_response\",\"hd-cache2 returned an invalid solve result\")}parseBatchCacheMiss(e){if(e.ok!==!1||e.code!==\"CACHE_MISS\")return null;if(e.autorouterVersion!==this.autorouterVersion)throw new ih(\"version_mismatch\",`hd-cache2 returned autorouter version ${String(e.autorouterVersion)}, expected ${this.autorouterVersion}`);if(e.cacheVersion!==this.cacheVersion)throw new ih(\"cache_version_mismatch\",`hd-cache2 returned cache version ${String(e.cacheVersion)}, expected ${String(this.cacheVersion)}`);if(typeof e.message!=\"string\")throw new ih(\"invalid_response\",\"hd-cache2 returned an invalid cache miss response\");return e}async fetchSingle(e){const n=new AbortController;let o=!1;const i=setTimeout(()=\u003e{o=!0,n.abort(new Error(\"hd-cache2 transport timed out after 310000ms\"))},n8t);i.unref?.();try{const s={autorouterVersion:this.autorouterVersion,...this.cacheVersion===void 0?{}:{cacheVersion:this.cacheVersion},input:e.input};let a;try{a=JSON.stringify(s)}catch(u){throw new ih(\"request_serialization_error\",LW(u))}const A=await fetch((r=this.serverUrl,/\\/solve\\/?$/.test(r)?r.replace(/\\/+$/,\"\"):`${r.replace(/\\/+$/,\"\")}/solve`),{method:\"POST\",headers:{accept:\"application/json\",\"content-type\":\"application/json\"},body:a,signal:n.signal}),c=await A.text();let l=null;try{l=c?JSON.parse(c):null}catch{throw A.ok?new ih(\"invalid_json\",`hd-cache2 returned invalid JSON with status ${A.status}`):new ih(\"http_error\",`hd-cache2 request failed with status ${A.status}`)}if(!A.ok){const u=l\u0026\u0026typeof l==\"object\"\u0026\u0026\"message\"in l\u0026\u0026typeof l.message==\"string\"?l.message:`hd-cache2 request failed with status ${A.status}`;throw new ih(\"http_error\",u)}this.settle(e,{kind:\"remote\",response:this.parseSuccessfulResponse(l,e.input)})}catch(s){const a=s instanceof ih?s.reason:o?\"transport_timeout\":\"transport_error\";this.settleWithFallback(e,a,LW(s))}finally{clearTimeout(i)}var r}launchSingleSolve(e){e.singleSolveStarted||e.settled||(e.singleSolveStarted=!0,this.stats.singleRequestsStarted+=1,this.fetchSingle(e))}handleBatchResponseLine(e,n,o){if(e.trim().length===0)return;if(e.length\u003ei8t)throw new ih(\"response_too_large\",\"hd-cache2 returned an oversized batch result line\");let i;try{i=JSON.parse(e)}catch{return void(this.stats.batchInvalidLines+=1)}if(!i||typeof i!=\"object\"||Array.isArray(i))return void(this.stats.batchInvalidLines+=1);const r=i,s=r.requestId;if(typeof s!=\"string\")return void(this.stats.batchInvalidLines+=1);const a=n.get(s);if(a)if(o.has(s))this.stats.batchDuplicateRequestIds+=1;else{o.add(s);try{if(this.parseBatchCacheMiss(r))return this.stats.batchCacheMisses+=1,void this.launchSingleSolve(a);this.settle(a,{kind:\"remote\",response:this.parseSuccessfulResponse(r,a.input)})}catch(A){this.stats.batchInvalidLines+=1,this.settleWithFallback(a,A instanceof ih?A.reason:\"invalid_response\",LW(A))}}else this.stats.batchUnknownRequestIds+=1}async readBatchResponse(e,n){if(!e.body)throw new ih(\"invalid_response\",\"hd-cache2 returned an empty batch response body\");const o=new Map(n.items.map(A=\u003e[A.requestId,A])),i=new Set,r=new TextDecoder,s=e.body.getReader();let a=\"\";for(;i.size\u003cn.items.length;){const{done:A,value:c}=await s.read();if(a+=r.decode(c,{stream:!A}),a.length\u003ei8t\u0026\u0026!a.includes(`\n`))throw new ih(\"response_too_large\",\"hd-cache2 returned an oversized unterminated batch result line\");let l=a.indexOf(`\n`);for(;l\u003e=0;){const u=a.slice(0,l);a=a.slice(l+1),this.handleBatchResponseLine(u,o,i),l=a.indexOf(`\n`)}if(A){a.trim().length\u003e0\u0026\u0026this.handleBatchResponseLine(a,o,i);break}}if(i.size!==n.items.length)for(const A of n.items)i.has(A.requestId)||this.settleWithFallback(A,\"missing_response\",`hd-cache2 batch ended without result ${A.requestId}`);else await s.cancel().catch(()=\u003e{})}async fetchBatch(e){const n=new AbortController;let o=!1;const i=setTimeout(()=\u003e{o=!0,n.abort(new Error(\"hd-cache2 batch transport timed out after 310000ms\"))},n8t);i.unref?.(),this.stats.batchRequestsStarted+=1,this.stats.batchItemsStarted+=e.items.length,this.stats.batchBodyBytesStarted+=e.bodyBytes,this.stats.batchMaxBodyBytes=Math.max(this.stats.batchMaxBodyBytes,e.bodyBytes);try{const r=await fetch((s=\u003e{const a=s.replace(/\\/+$/,\"\");return/\\/solve-batch$/.test(a)?a:/\\/solve$/.test(a)?a.replace(/\\/solve$/,\"/solve-batch\"):`${a}/solve-batch`})(this.serverUrl),{method:\"POST\",headers:{accept:\"application/x-ndjson\",\"content-type\":\"application/json\"},body:e.body,signal:n.signal});if(!r.ok){const s=await r.text().catch(()=\u003e\"\");let a=`hd-cache2 batch request failed with status ${r.status}`;try{const A=s?JSON.parse(s):null;A\u0026\u0026typeof A==\"object\"\u0026\u0026\"message\"in A\u0026\u0026typeof A.message==\"string\"\u0026\u0026(a=A.message)}catch{}throw new ih(\"http_error\",a)}await this.readBatchResponse(r,e)}catch(r){const s=r instanceof ih?r.reason:o?\"transport_timeout\":\"transport_error\";for(const a of e.items)a.singleSolveStarted||this.settleWithFallback(a,s,LW(r))}finally{clearTimeout(i),this.stats.batchRequestsCompleted+=1}}prepareBatches(e){const n=new TextEncoder,o=this.cacheVersion===void 0?\"\":`,\"cacheVersion\":${JSON.stringify(this.cacheVersion)}`,i=`{\"autorouterVersion\":${JSON.stringify(this.autorouterVersion)}${o},\"items\":[`,r=n.encode(i+\"]}\").byteLength,s=[],a=[];let A=[],c=r;const l=()=\u003e{A.length!==0\u0026\u0026(s.push({body:`${i}${A.map(u=\u003eu.serializedItem).join(\",\")}]}`,bodyBytes:c,items:A}),A=[],c=r)};for(const u of e){const g=n.encode(u.serializedItem).byteLength,h=A.length===0?0:1;r+g\u003eo8t?(l(),a.push(u)):((A.length\u003e=100||c+h+g\u003eo8t)\u0026\u0026l(),A.push(u),c+=(A.length===1?0:1)+g)}return l(),{batches:s,singletonSolves:a}}},oho=\"ordinary_then_regional_without_fixed_copper_v1\",iho=class extends sQe{autorouterVersion;hdCache2ServerUrl;hdCache2CacheVersion;requestTimeoutMs;hdCache2Client;launchedRemoteSolves=!1;waitingForRemoteNode=null;remoteRequestByNode=new Map;remoteResultByNode=new Map;logicallyTimedOutNodes=new Set;constructor({autorouterVersion:e,hdCache2ServerUrl:n,hdCache2CacheVersion:o,requestTimeoutMs:i,...r}){if(super(r),r.effort!==1)throw new Error(`Pipeline9 networked high-density routing requires effort=1, received ${r.effort}`);if(this.requestTimeoutMs=i??3e4,!Number.isFinite(this.requestTimeoutMs)||this.requestTimeoutMs\u003c=0)throw new Error(`Pipeline9 network request timeout must be a positive number, received ${this.requestTimeoutMs}`);this.autorouterVersion=e,this.hdCache2ServerUrl=n??yQe,this.hdCache2CacheVersion=o,this.hdCache2Client=new nho(this.autorouterVersion,this.hdCache2ServerUrl,{cacheVersion:o}),this.pendingEffects=[],this.stats={...this.stats,remoteRequestsStarted:0,remoteRequestsCompleted:0,remoteBatchRequestsStarted:0,remoteBatchRequestsCompleted:0,remoteBatchItemsStarted:0,remoteBatchBodyBytesStarted:0,remoteBatchMaxBodyBytes:0,remoteBatchCacheMisses:0,remoteSingleRequestsStarted:0,remoteBatchInvalidLines:0,remoteBatchUnknownRequestIds:0,remoteBatchDuplicateRequestIds:0,remoteCacheHits:0,remoteSolverResults:0,remoteSolvedResults:0,remoteFailedResults:0,remoteOrdinaryResults:0,remoteRegionalFallbackResults:0,remoteRegionalFallbackResultsApplied:0,remoteRegionalFallbackResultsDeferredToLocal:0,remoteTransportFallbacks:0,remoteLogicalTimeoutFallbacks:0,remoteFallbackReasonCounts:{}}}getSolverName(){return\"Pipeline9NetworkedHighDensitySolver\"}async waitForAllRemoteRequests(){const e=[...this.remoteRequestByNode.values()];e.length!==0?(await Promise.all(e.map(({promise:n})=\u003en)),this.syncClientStats()):this.syncClientStats()}createNodeInput(e){const n=this.enableRegionalFallback?jdo({nodeWithPortPoints:e,connMap:this.connMap,obstacles:this.obstacles,obstacleMargin:this.obstacleMargin,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter}):{connectivityNetMap:{},obstacles:[]},o=qdo({nodeWithPortPoints:e,connMap:this.connMap,colorMap:this.colorMap,obstacles:this.enableRegionalFallback?n.obstacles:this.obstacles,obstacleMargin:this.obstacleMargin,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter});return{solvePolicy:oho,enableRegionalFallback:this.enableRegionalFallback,nodeWithPortPoints:e,connectivityNetMap:$do(o.connectivityNetMap,n.connectivityNetMap),colorMap:o.colorMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:1,obstacles:o.obstacles,regionalObstacles:n.obstacles,layerCount:this.layerCount,nodePf:this.nodePfById.get(e.capacityMeshNodeId)??null}}syncClientStats(){const e=this.hdCache2Client.stats;this.stats.remoteBatchRequestsStarted=e.batchRequestsStarted,this.stats.remoteBatchRequestsCompleted=e.batchRequestsCompleted,this.stats.remoteBatchItemsStarted=e.batchItemsStarted,this.stats.remoteBatchBodyBytesStarted=e.batchBodyBytesStarted,this.stats.remoteBatchMaxBodyBytes=e.batchMaxBodyBytes,this.stats.remoteBatchCacheMisses=e.batchCacheMisses,this.stats.remoteSingleRequestsStarted=e.singleRequestsStarted,this.stats.remoteBatchInvalidLines=e.batchInvalidLines,this.stats.remoteBatchUnknownRequestIds=e.batchUnknownRequestIds,this.stats.remoteBatchDuplicateRequestIds=e.batchDuplicateRequestIds}recordFallbackReason(e){const n=this.stats.remoteFallbackReasonCounts;n[e]=(n[e]??0)+1}trackRemoteSolve(e,n){const o=performance.now()+this.requestTimeoutMs;this.stats.remoteRequestsStarted+=1;const i=n.then(r=\u003e{const s=this.logicallyTimedOutNodes.has(e);s||this.remoteResultByNode.set(e,r),r.kind===\"remote\"?(r.response.source===\"cache\"\u0026\u0026(this.stats.remoteCacheHits+=1),r.response.source===\"solver\"\u0026\u0026(this.stats.remoteSolverResults+=1),r.response.status===\"solved\"?this.stats.remoteSolvedResults+=1:this.stats.remoteFailedResults+=1):s||(this.stats.remoteTransportFallbacks+=1,this.recordFallbackReason(r.reason)),this.stats.remoteRequestsCompleted+=1,this.syncClientStats()});this.remoteRequestByNode.set(e,{promise:i,deadlineAt:o})}launchRemoteSolves(){const e=[],n=[...this.unsolvedNodePortPoints].reverse();for(const i of n)try{e.push({node:i,input:this.createNodeInput(i)})}catch(r){this.trackRemoteSolve(i,Promise.resolve({kind:\"local-fallback\",reason:\"request_serialization_error\",error:r instanceof Error?r.message:String(r)}))}const o=this.hdCache2Client.solveMany(e.map(({input:i})=\u003ei));for(const[i,r]of o.entries())this.trackRemoteSolve(e[i].node,r);this.syncClientStats()}async waitForCurrentRemoteNode(e,n){const o=n.deadlineAt-performance.now();if(o\u003c=0)return void this.recordLogicalTimeout(e);let i;const r=await Promise.race([n.promise.then(()=\u003e\"request-settled\"),new Promise(s=\u003e{i=setTimeout(()=\u003es(\"logical-timeout\"),o)})]);i!==void 0\u0026\u0026clearTimeout(i),r===\"logical-timeout\"\u0026\u0026this.recordLogicalTimeout(e)}recordLogicalTimeout(e){this.logicallyTimedOutNodes.add(e),this.stats.remoteLogicalTimeoutFallbacks+=1,this.stats.remoteTransportFallbacks+=1,this.recordFallbackReason(\"logical_timeout\")}startRegularSolver(e){const n=this.remoteResultByNode.get(e);if(!n){const o=this.remoteRequestByNode.get(e);if(o){this.waitingForRemoteNode=e;const i=this.waitForCurrentRemoteNode(e,o);i.then(()=\u003e{this.waitingForRemoteNode===e\u0026\u0026(this.pendingEffects=[])});const r={name:`hd-cache2:${e.capacityMeshNodeId}`,promise:i};return void(this.pendingEffects=[r])}return void super.startRegularSolver(e)}this.applyRemoteResultToRegularNode(e,n)}applyRemoteResultToRegularNode(e,n){if(n.kind!==\"local-fallback\"){if(this.stats.regularNodeCount=Number(this.stats.regularNodeCount??0)+1,this.activeNode=e,n.response.solutionStage===\"regional-fallback\"){if(this.stats.remoteRegionalFallbackResults+=1,!this.canUseNoFixedCopperRegionalResult(e))return this.stats.remoteRegionalFallbackResultsDeferredToLocal+=1,void this.finishRegularSolverFailure(n.response.ordinaryFailure);this.stats.remoteRegionalFallbackResultsApplied+=1,this.stats.fallbackNodeCount=Number(this.stats.fallbackNodeCount??0)+1}else this.stats.remoteOrdinaryResults+=1;if(n.response.status===\"failed\")return this.error=n.response.error,this.failed=!0,void(this.activeNode=null);this.finishActiveNode(n.response.routes)}else super.startRegularSolver(e)}canUseNoFixedCopperRegionalResult(e){const n={...TW(e,this.connMap),availableZ:Array.from({length:this.layerCount},(i,r)=\u003er)},o=MW(n,this.getUpdatedFixedHdRoutes());return o.fixedRouteSectionsByConnectionName.size===0\u0026\u0026o.fixedObstacleRoutes.length===0}_step(){if(this.syncClientStats(),this.launchedRemoteSolves||(this.launchedRemoteSolves=!0,this.launchRemoteSolves()),this.waitingForRemoteNode){const e=this.waitingForRemoteNode;if(this.logicallyTimedOutNodes.has(e))return this.waitingForRemoteNode=null,this.pendingEffects=[],void super.startRegularSolver(e);const n=this.remoteResultByNode.get(e);return n?(this.waitingForRemoteNode=null,this.pendingEffects=[],void this.applyRemoteResultToRegularNode(e,n)):void 0}super._step()}},s8t=class extends X6t{hdCache2ServerUrl;hdCache2CacheVersion;getSolverName(){return\"AutoroutingPipelineSolver9_Networked\"}constructor(e,n={}){if(super(e,n),this.effort!==1)throw new Error(`AutoroutingPipelineSolver9_Networked is only available at effort=1, received ${this.effort}`);this.hdCache2ServerUrl=n.hdCache2ServerUrl??yQe,this.hdCache2CacheVersion=n.hdCache2CacheVersion,this.replaceHighDensityPipelineStep()}replaceHighDensityPipelineStep(){const e=this.pipelineDef.findIndex(i=\u003ei.solverName===\"highDensityRouteSolver\"),n=this.pipelineDef[e];if(!n)throw new Error(\"Pipeline9 highDensityRouteSolver step is missing\");const o=n.getConstructorParams;this.pipelineDef[e]={...n,solverClass:iho,getConstructorParams:i=\u003e{const[r]=o(i);return[{...r,autorouterVersion:Wdo,hdCache2ServerUrl:i.hdCache2ServerUrl,hdCache2CacheVersion:i.hdCache2CacheVersion}]}}}async stepAsync(){if(this.solved||this.failed)return;this.step();const e=a9t(this);e.length!==0\u0026\u0026(await Promise.race(e.map(n=\u003en.promise.then(()=\u003en.name,()=\u003en.name))),this.solved||this.failed||this.step())}async solveAsync(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)await this.stepAsync();this.timeToSolve=Date.now()-e}async solveUntilPhaseAsync(e){for(;this.getCurrentPhase()!==e\u0026\u0026!this.solved\u0026\u0026!this.failed;)await this.stepAsync()}solve(){throw new Error(\"AutoroutingPipelineSolver9_Networked requires async execution. Use solveAsync() or stepAsync().\")}solveUntilPhase(e){throw new Error(\"AutoroutingPipelineSolver9_Networked requires solveUntilPhaseAsync().\")}};globalThis.process?.env?.FANOUT_FLOW_DEBUG;var rho=class extends zA{constructor(e){super(),this.inputProblem=e,this.simplifiedRouteByTraceId=new Map(e.simplifiedHdRoutes.map(n=\u003e[n.connectionName,n])),this.MAX_ITERATIONS=e.preparedInput.preparedTraces.length+1}inputProblem;simplifiedRouteByTraceId;outputTraces=[];nextTraceIndex=0;getSolverName(){return\"ApplyTraceSimplificationSolver\"}_step(){const e=this.inputProblem.preparedInput.preparedTraces,n=e[this.nextTraceIndex];n?(this.outputTraces.push(this.applyTrace(n)),this.nextTraceIndex++,this.progress=this.nextTraceIndex/Math.max(1,e.length)):this.finishApplication()}applyTrace(e){if(!e.mutableHdRoute)return structuredClone(e.originalTrace);const n=this.simplifiedRouteByTraceId.get(e.originalTrace.pcb_trace_id);if(!n||e.uniformTraceWidth===void 0)throw new Error(`Simplification removed trace \"${e.originalTrace.pcb_trace_id}\"`);const o=nB(n,this.inputProblem.preparedInput.srj.layerCount,{defaultViaHoleDiameter:e.viaHoleDiameter,obstacles:this.inputProblem.preparedInput.srj.obstacles,connMap:this.inputProblem.preparedInput.connMap}),i=o.filter(s=\u003es.route_type===\"jumper\"),r=((s,a)=\u003es.map(A=\u003eA.route_type===\"wire\"||A.route_type===\"through_obstacle\"?{...A,width:a}:A))([...structuredClone(e.leadingTerminalVias),...o.filter(s=\u003es.route_type!==\"jumper\"),...structuredClone(e.trailingTerminalVias),...i],e.uniformTraceWidth);return((s,a)=\u003e{const A=s.filter(c=\u003ec.route_type===\"wire\");a.startPcbPortId\u0026\u0026A[0]\u0026\u0026(A[0].start_pcb_port_id=a.startPcbPortId),a.endPcbPortId\u0026\u0026A.at(-1)\u0026\u0026(A.at(-1).end_pcb_port_id=a.endPcbPortId)})(r,n),{...structuredClone(e.originalTrace),route:r}}finishApplication(){const e=this.inputProblem.preparedInput.preparedTraces;this.stats={inputTraceCount:e.length,outputTraceCount:this.outputTraces.length,inputRoutePointCount:e.reduce((n,o)=\u003en+o.originalTrace.route.length,0),outputRoutePointCount:this.outputTraces.reduce((n,o)=\u003en+o.route.length,0)},this.progress=1,this.solved=!0}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error(\"Cannot get applied traces before conversion completes\");return{...structuredClone(this.inputProblem.preparedInput.originalSrj),traces:structuredClone(this.outputTraces)}}},OW=(t,e)=\u003e{const n=t.at(-1);if(n\u0026\u0026(o=n,i=e,Math.abs(o.x-i.x)\u003c=1e-9\u0026\u0026Math.abs(o.y-i.y)\u003c=1e-9\u0026\u0026o.z===i.z))return e.traceThickness!==void 0\u0026\u0026(n.traceThickness=e.traceThickness),void(e.pcb_port_id!==void 0\u0026\u0026(n.pcb_port_id=e.pcb_port_id));var o,i;t.push(e)},sho=(t,e,n)=\u003e{for(let o=e+1;o\u003ct.length;o++){const i=t[o];if(i.route_type===\"wire\")return Kr(i.layer,n);if(i.route_type===\"through_obstacle\")return Kr(i.from_layer,n)}},aho=({fromZ:t,toZ:e,previousZ:n,nextZ:o})=\u003en===t?[t,e]:n===e?[e,t]:o===e?[t,e]:o===t?[e,t]:[t,e],Aho=(t,e)=\u003e{for(const n of t)if(n.route_type===\"via\"\u0026\u0026n.via_diameter!==void 0)return n.via_diameter;return e},a8t=(t,e)=\u003e{const n=e===\"start\"?t:[...t].reverse();for(const o of n){if(o.route_type!==\"wire\")continue;const i=e===\"start\"?o.start_pcb_port_id:o.end_pcb_port_id;if(i)return i}},cho=t=\u003e({route_type:\"jumper\",start:{...t.start},end:{...t.end},footprint:t.footprint}),lho=(t,e)=\u003e{for(const n of t.route)if(n.route_type===\"via\"\u0026\u0026n.via_hole_diameter!==void 0)return n.via_hole_diameter;return e},uho=class extends zA{preparedInput;seenTraceIds=new Set;nextTraceIndex=0;constructor(e){super();const n=structuredClone(e.inputSrj),o=mN(n),i=Jm(o);this.preparedInput={originalSrj:n,srj:o,connMap:i,colorMap:Jf(o,i),immutableHdRoutes:[],mutableHdRoutes:[],netByConnectionName:new Map,options:{...e.options},preparedTraces:[]},this.MAX_ITERATIONS=(o.traces?.length??0)+1}getSolverName(){return\"PrepareTraceSimplificationSolver\"}_step(){const e=this.preparedInput.srj.traces??[],n=e[this.nextTraceIndex];if(!n)return this.stats={inputTraceCount:e.length,mutableTraceCount:this.preparedInput.mutableHdRoutes.length,immutableTraceCount:e.length-this.preparedInput.mutableHdRoutes.length},this.progress=1,void(this.solved=!0);this.prepareTrace(n,this.nextTraceIndex),this.nextTraceIndex++,this.progress=this.nextTraceIndex/Math.max(1,e.length)}prepareTrace(e,n){if(this.seenTraceIds.has(e.pcb_trace_id))throw new Error(`Duplicate pcb_trace_id \"${e.pcb_trace_id}\"`);this.seenTraceIds.add(e.pcb_trace_id);const o=om(this.preparedInput.srj),i=(g=\u003e{const h=g.route.flatMap(p=\u003ep.route_type===\"wire\"||p.route_type===\"through_obstacle\"?[p.width]:[]),d=h[0];if(d!==void 0\u0026\u0026!h.some(p=\u003eMath.abs(p-d)\u003e1e-9))return d})(e),{traceToSimplify:r,leadingTerminalVias:s,trailingTerminalVias:a}=(g=\u003e{let h=0;for(;g.route[h]?.route_type===\"via\";)h++;let d=g.route.length;for(;g.route[d-1]?.route_type===\"jumper\";)d--;let p=d;for(;p\u003eh\u0026\u0026g.route[p-1]?.route_type===\"via\";)p--;return{traceToSimplify:{...g,route:[...g.route.slice(h,p),...g.route.slice(d)]},leadingTerminalVias:g.route.slice(0,h),trailingTerminalVias:g.route.slice(p,d)}})(e),A=this.preparedInput.connMap.getNetConnectedToId(e.connection_name)??e.connection_name,c=i===void 0?void 0:((g,h)=\u003e{const d=[],p=[],m=[],_=((f,I)=\u003e{for(const C of f)if(C.route_type===\"wire\"||C.route_type===\"through_obstacle\")return C.width;return I})(g.route,h.defaultTraceThickness);for(let f=0;f\u003cg.route.length;f++){const I=g.route[f];if(I.route_type===\"jumper\"){m.push(cho(I));continue}if(I.route_type===\"wire\"){OW(d,{x:I.x,y:I.y,z:Kr(I.layer,h.layerCount),traceThickness:I.width,pcb_port_id:I.start_pcb_port_id??I.end_pcb_port_id});continue}const C=Kr(I.from_layer,h.layerCount),y=Kr(I.to_layer,h.layerCount),[x,E]=aho({fromZ:C,toZ:y,previousZ:d.at(-1)?.z,nextZ:sho(g.route,f,h.layerCount)});if(I.route_type===\"via\"){OW(d,{x:I.x,y:I.y,z:x,traceThickness:_}),OW(d,{x:I.x,y:I.y,z:E,traceThickness:_}),p.push({x:I.x,y:I.y});continue}const B=x===C,S=B?I.start:I.end,Q=B?I.end:I.start;OW(d,{...S,z:x,traceThickness:I.width,toNextSegmentType:\"through_obstacle\",...I.circuitJsonMetadata?{toNextSegmentCircuitJsonMetadata:I.circuitJsonMetadata}:{}}),OW(d,{...Q,z:E,traceThickness:I.width})}return{connectionName:g.pcb_trace_id,rootConnectionName:h.rootConnectionName,startPcbPortId:a8t(g.route,\"start\"),endPcbPortId:a8t(g.route,\"end\"),traceThickness:_,viaDiameter:Aho(g.route,h.defaultViaDiameter),route:d,vias:p,...m.length\u003e0?{jumpers:m}:{}}})(r,{layerCount:this.preparedInput.srj.layerCount,defaultTraceThickness:i,defaultViaDiameter:o.padDiameter,rootConnectionName:A}),l=c\u0026\u0026c.route.length\u003e=2?c:void 0;if(this.preparedInput.preparedTraces.push({originalTrace:e,mutableHdRoute:l,leadingTerminalVias:s,trailingTerminalVias:a,uniformTraceWidth:i,viaHoleDiameter:lho(e,o.holeDiameter)}),!l)return void this.preparedInput.immutableHdRoutes.push(...kv(e,n,this.preparedInput.srj.layerCount,o.padDiameter,this.preparedInput.connMap));this.preparedInput.mutableHdRoutes.push(l),this.preparedInput.netByConnectionName.set(l.connectionName,A),this.preparedInput.colorMap[l.connectionName]=this.preparedInput.colorMap[A]??this.preparedInput.colorMap[e.connection_name]??\"#2563eb\";const u={...e,route:[...s,...a]};this.preparedInput.immutableHdRoutes.push(...kv(u,n,this.preparedInput.srj.layerCount,o.padDiameter,this.preparedInput.connMap))}getOutput(){if(!this.solved)throw new Error(\"Cannot get prepared traces before preparation completes\");return this.preparedInput}},gho=class extends zA{constructor(e){super(),this.inputProblem=e;const n=e.preparedInput,o=om(n.srj);this.traceSimplificationSolver=new j8({hdRoutes:n.mutableHdRoutes,otherHdRoutes:n.immutableHdRoutes,obstacles:n.srj.obstacles,connMap:n.connMap,colorMap:n.colorMap,outline:n.srj.outline,defaultViaDiameter:o.padDiameter,layerCount:n.srj.layerCount,minTraceToPadEdgeClearance:n.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:n.srj.minBoardEdgeClearance,netByConnectionName:n.netByConnectionName,enableCrossingViaReduction:n.options.enableCrossingViaReduction??!0,preserveRouteEndpoints:!0,useTraceWidthAwareClearance:!0}),this.traceSimplificationSolver.MAX_SIMPLIFICATION_PIPELINE_LOOPS=n.options.iterations??2,this.activeSubSolver=this.traceSimplificationSolver,this.MAX_ITERATIONS=this.traceSimplificationSolver.MAX_ITERATIONS+1}inputProblem;traceSimplificationSolver;getSolverName(){return\"TraceSimplificationStageSolver\"}_step(){if(this.traceSimplificationSolver.step(),this.progress=this.traceSimplificationSolver.progress,this.stats={...this.traceSimplificationSolver.stats},this.traceSimplificationSolver.failed)return this.error=this.traceSimplificationSolver.error??\"Trace simplification failed\",this.failed=!0,void(this.activeSubSolver=null);this.traceSimplificationSolver.solved\u0026\u0026(this.progress=1,this.solved=!0,this.activeSubSolver=null)}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error(\"Cannot get simplified routes before cleanup completes\");return structuredClone(this.traceSimplificationSolver.simplifiedHdRoutes)}visualize(){return this.traceSimplificationSolver.visualize()}preview(){return this.traceSimplificationSolver.preview()}},dho=class extends zA{constructor(e){super(),this.inputProblem=e;const n=e.preparedInput;this.drcEngine=new fJ(n.srj,{connMap:n.connMap,traceClearance:n.srj.minTraceToPadEdgeClearance??.1,viaClearance:.1}),this.MAX_ITERATIONS=3}inputProblem;drcEngine;phase=\"baseline\";baselineErrorCounts={};outputErrorCounts={};getSolverName(){return\"ValidateTraceSimplificationSolver\"}_step(){return this.phase===\"baseline\"?(this.baselineErrorCounts=this.evaluateErrorCounts(this.inputProblem.preparedInput.originalSrj),this.phase=\"output\",void(this.progress=1/3)):this.phase===\"output\"?(this.outputErrorCounts=this.evaluateErrorCounts(this.inputProblem.outputSrj),this.phase=\"compare\",void(this.progress=2/3)):(this.assertNoNewDrcErrors(),this.stats={baselineErrorCounts:this.baselineErrorCounts,outputErrorCounts:this.outputErrorCounts},this.progress=1,void(this.solved=!0))}evaluateErrorCounts(e){return(n=\u003e{const o={};for(const i of n.errors)o[i.type]=(o[i.type]??0)+1;return o})(this.drcEngine.evaluate(e.traces??[]))}assertNoNewDrcErrors(){const e=[...new Set([...Object.keys(this.baselineErrorCounts),...Object.keys(this.outputErrorCounts)])].filter(o=\u003e(this.outputErrorCounts[o]??0)\u003e(this.baselineErrorCounts[o]??0));if(e.length===0)return;const n=e.map(o=\u003e`${o}: ${this.baselineErrorCounts[o]??0} -\u003e ${this.outputErrorCounts[o]??0}`).join(\", \");throw new Error(`Pipeline 11 simplification introduced DRC errors (${n})`)}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error(\"Cannot get Pipeline 11 output before DRC validation\");return structuredClone(this.inputProblem.outputSrj)}},hho=class extends n7{prepareTraceSimplificationSolver;traceSimplificationStageSolver;applyTraceSimplificationSolver;validateTraceSimplificationSolver;pipelineDef=[eh(\"prepareTraceSimplificationSolver\",uho,t=\u003e[{inputSrj:t.inputProblem.inputSrj,options:t.inputProblem.options}]),eh(\"traceSimplificationStageSolver\",gho,t=\u003e[{preparedInput:t.prepareTraceSimplificationSolver.getOutput()}]),eh(\"applyTraceSimplificationSolver\",rho,t=\u003e[{preparedInput:t.prepareTraceSimplificationSolver.getOutput(),simplifiedHdRoutes:t.traceSimplificationStageSolver.getOutput()}]),eh(\"validateTraceSimplificationSolver\",dho,t=\u003e[{preparedInput:t.prepareTraceSimplificationSolver.getOutput(),outputSrj:t.applyTraceSimplificationSolver.getOutput()}])];constructor(t,e={}){if(e.iterations!==void 0\u0026\u0026(!Number.isInteger(e.iterations)||e.iterations\u003c1))throw new Error(\"Simplification iterations must be a positive integer\");super({inputSrj:t,options:{...e}}),this.MAX_ITERATIONS=1e8}getSolverName(){return\"AutoroutingPipelineSolver11_Simplification\"}getConstructorParams(){return[this.inputProblem.inputSrj,this.inputProblem.options]}getOutput(){if(!this.validateTraceSimplificationSolver?.solved)throw new Error(\"Pipeline 11 simplification has not solved yet\");return this.validateTraceSimplificationSolver.getOutput()}getOutputSimpleRouteJson(){return this.getOutput()}getOutputSimplifiedPcbTraces(){return structuredClone(this.getOutput().traces??[])}initialVisualize(){return mx(this.inputProblem.inputSrj)}finalVisualize(){return mx(this.getOutput())}},vH=1e-9,xQe=t=\u003e(e=\u003ee.route_type===\"wire\")(t)||(e=\u003ee.route_type===\"via\")(t)?t:(e=\u003ee.route_type===\"through_obstacle\")(t)\u0026\u0026Math.hypot(t.end.x-t.start.x,t.end.y-t.start.y)\u003c=vH?{route_type:t.route_type,x:t.start.x,y:t.start.y,from_layer:t.from_layer,to_layer:t.to_layer,width:t.width}:null,pho=(t,e)=\u003et.layer??e.layer??t.to_layer??e.from_layer??t.from_layer??e.to_layer??\"top\",mho=(t,e,n)=\u003et.width??e.width??n,wH=(t,e,n,o,i)=\u003e({x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n,layer:o,width:i}),A8t=(t,e)=\u003e({...t,x:Math.abs(t.x-e.minX)\u003c1e-6?e.minX:Math.abs(t.x-e.maxX)\u003c1e-6?e.maxX:t.x,y:Math.abs(t.y-e.minY)\u003c1e-6?e.minY:Math.abs(t.y-e.maxY)\u003c1e-6?e.maxY:t.y}),c8t=({x:t,y:e,layer:n})=\u003e({x:t,y:e,layer:n}),l8t=({x:t,y:e,layer:n,width:o})=\u003e({route_type:\"wire\",x:t,y:e,layer:n,width:o}),_ho=(t,e,n)=\u003e{const o=e.x-t.x,i=e.y-t.y;let r=0,s=1;const a=(A,c)=\u003e{if(Math.abs(A)\u003cvH)return c\u003e=0;const l=c/A;if(A\u003c0){if(l\u003es)return!1;l\u003er\u0026\u0026(r=l)}else{if(l\u003cr)return!1;l\u003cs\u0026\u0026(s=l)}return!0};return a(-o,t.x-n.minX)\u0026\u0026a(o,n.maxX-t.x)\u0026\u0026a(-i,t.y-n.minY)\u0026\u0026a(i,n.maxY-t.y)?{startT:r,endT:s}:null},u8t=(t,e)=\u003et.x\u003e=e.minX-1e-6\u0026\u0026t.x\u003c=e.maxX+1e-6\u0026\u0026t.y\u003e=e.minY-1e-6\u0026\u0026t.y\u003c=e.maxY+1e-6\u0026\u0026(Math.abs(t.x-e.minX)\u003c=1e-6||Math.abs(t.x-e.maxX)\u003c=1e-6||Math.abs(t.y-e.minY)\u003c=1e-6||Math.abs(t.y-e.maxY)\u003c=1e-6),EQe=(t,e,n,o,i)=\u003e{var r,s;r=o,s=i,Math.hypot(r.x-s.x,r.y-s.y)\u003c=vH||t.push({type:\"pcb_trace\",pcb_trace_id:`${e.pcb_trace_id}_keep_${n}`,connection_name:e.connection_name,route:[l8t(o),l8t(i)]})},g8t=({obstacleId:t,start:e,end:n,layer:o,width:i})=\u003e{const r=n.x-e.x,s=n.y-e.y,a=Math.hypot(r,s);return a\u003ei+vH?null:{obstacleId:t,type:\"rect\",layers:[o],center:{x:(e.x+n.x)/2,y:(e.y+n.y)/2},width:a,height:i,ccwRotationDegrees:180*Math.atan2(s,r)/Math.PI,connectedTo:[]}},d8t=({connection:t,point:e,endpointIndex:n})=\u003e({obstacleId:`${t.name}_route_endpoint_${n}`,type:\"rect\",layers:[e.layer],center:{x:e.x,y:e.y},width:e.width,height:e.width,connectedTo:[t.name,t.__rootConnectionNames?.[0]??t.name]}),h8t=({trace:t,ripIndex:e,start:n,end:o,region:i,allowInteriorStart:r,allowInteriorEnd:s})=\u003e{if(!r\u0026\u0026!u8t(n,i)||!s\u0026\u0026!u8t(o,i))return null;const a=(({trace:A,ripIndex:c,start:l,end:u})=\u003e({name:`${A.connection_name}_reroute_${A.pcb_trace_id}_${c}`,__rootConnectionNames:[A.connection_name],pointsToConnect:[c8t(l),c8t(u)]}))({trace:t,ripIndex:e,start:n,end:o});return{connection:a,endpointObstacles:[d8t({connection:a,point:n,endpointIndex:0}),d8t({connection:a,point:o,endpointIndex:1})]}},fho=(t,e,n)=\u003e{const o=[],i=[],r=[],s=[];let a=null,A=!1,c=0,l=!1;for(let u=0;u\u003ct.route.length-1;u++){const g=xQe(t.route[u]),h=xQe(t.route[u+1]);if(!g||!h)return null;const d=pho(g,h),p=mho(g,h,n),m=_ho(g,h,e),_=wH(g,h,0,d,p),f=wH(g,h,1,d,p),I=u===0;if(!m){EQe(o,t,c++,_,f);continue}if(l=!0,m.startT\u003evH){const E=wH(g,h,m.startT,d,p),B=g8t({obstacleId:`${t.pcb_trace_id}_keep_${c}_bounds`,start:_,end:E,layer:d,width:p});B\u0026\u0026s.push(B),EQe(o,t,c++,_,E)}const C=wH(g,h,m.endT,d,p),y=A8t(wH(g,h,m.startT,d,p),e),x=A8t(wH(g,h,m.endT,d,p),e);if(a||(a=y,A=I\u0026\u0026m.startT\u003c=vH),m.endT\u003c.999999999){const E=h8t({trace:t,ripIndex:i.length,start:a,end:x,region:e,allowInteriorStart:A});E\u0026\u0026(i.push(E.connection),r.push(...E.endpointObstacles)),a=null,A=!1;const B=g8t({obstacleId:`${t.pcb_trace_id}_keep_${c}_bounds`,start:C,end:f,layer:d,width:p});B\u0026\u0026s.push(B),EQe(o,t,c++,C,f)}}if(a){const u=t.route.slice().reverse().map(xQe).find(g=\u003e!!g);if(u){const g=h8t({trace:t,ripIndex:i.length,start:a,end:{x:u.x,y:u.y,layer:u.layer??u.from_layer??a.layer,width:a.width},region:e,allowInteriorStart:A,allowInteriorEnd:!0});g\u0026\u0026(i.push(g.connection),r.push(...g.endpointObstacles))}}return{keptTraces:o,rerouteConnections:i,rerouteEndpointObstacles:r,clippedTraceSegmentObstacles:s,hadIntersection:l}},Iho=(t,e)=\u003e{const n=structuredClone(t),o=[],i=[],r=[],s=[];for(const A of t.traces??[]){const c=fho(A,e,t.minTraceWidth);c\u0026\u0026c.hadIntersection?(o.push(...c.keptTraces),i.push(...c.rerouteConnections),r.push(...c.rerouteEndpointObstacles),s.push(...c.clippedTraceSegmentObstacles)):o.push(structuredClone(A))}const a=((A,c)=\u003e{const l={minX:A.minX,maxX:A.maxX,minY:A.minY,maxY:A.maxY};for(const u of c){const g=Is(u);l.minX=Math.min(l.minX,g.minX),l.maxX=Math.max(l.maxX,g.maxX),l.minY=Math.min(l.minY,g.minY),l.maxY=Math.max(l.maxY,g.maxY)}return l})(e,[...r,...s]);return{...n,bounds:a,obstacles:[...n.obstacles,...r],traces:o,connections:i}},Cho=(t,e)=\u003e{const n=new Map(e.connections.map(i=\u003e[i.name,i.__rootConnectionNames?.[0]??i.name])),o=(e.traces??[]).map(i=\u003e{const r=n.get(i.connection_name);return r?{...structuredClone(i),connection_name:r}:structuredClone(i)});return{...structuredClone(t),traces:o,jumpers:e.jumpers?structuredClone(e.jumpers):structuredClone(t.jumpers)}};var p8t={0:\"M0.301025 0.257813 L0.206593 0.283385 L0.122042 0.361307 L0.075923 0.474441 L0.064942 0.642221 L0.091296 0.78289 L0.159376 0.899463 L0.257104 0.961214 L0.344948 0.961214 L0.442678 0.899463 L0.510757 0.78289 L0.537111 0.642221 L0.526131 0.474441 L0.480012 0.361307 L0.39546 0.283385 L0.301025 0.257813\",1:\"M0.220426 0.40845 L0.381626 0.270996 L0.381626 0.948966\",2:\"M0.110409 0.39212 L0.125621 0.342293 L0.170571 0.295823 L0.244237 0.26431 L0.291518 0.257813 L0.373319 0.263799 L0.434683 0.290705 L0.468239 0.331966 L0.480292 0.379913 L0.479492 0.411806 L0.465088 0.465192 L0.402571 0.568988 L0.245134 0.766438 L0.07959 0.948045 L0.522462 0.948045\",3:\"M0.081606 0.345073 L0.119154 0.315633 L0.178996 0.284091 L0.255265 0.257813 L0.349133 0.263062 L0.43127 0.289348 L0.48994 0.336662 L0.525141 0.394491 L0.513407 0.457577 L0.466472 0.504892 L0.384334 0.541692 L0.290464 0.56272 L0.20833 0.573235 L0.290464 0.583749 L0.384334 0.610035 L0.466472 0.652092 L0.519274 0.709922 L0.531007 0.773007 L0.50754 0.841351 L0.454738 0.899179 L0.3726 0.946494 L0.310412 0.961214 L0.209503 0.959111 L0.127367 0.946494 L0.071046 0.929671\",4:\"M0.418494 0.270996 L0.048828 0.724199 L0.553224 0.724199 M0.414181 0.578167 L0.414181 0.94897\",5:\"M0.074951 0.270996 L0.074951 0.614701 L0.267655 0.5695 L0.405247 0.586502 L0.460002 0.617189 L0.498028 0.660731 L0.527101 0.779401 L0.513352 0.841049 L0.477274 0.889568 L0.406378 0.93463 L0.324445 0.958337 L0.247399 0.962139 L0.182516 0.949767 L0.130068 0.925508 L0.074951 0.875607 M0.074951 0.270996 L0.527101 0.270996\",6:\"M0.428549 0.257813 L0.341433 0.285053 L0.26073 0.312099 L0.192188 0.360182 L0.138902 0.410969 L0.098219 0.500422 L0.070249 0.584267 L0.067264 0.670716 L0.065164 0.756863 L0.087163 0.820973 L0.108168 0.861042 L0.157916 0.913131 L0.210981 0.948192 L0.29279 0.961214 L0.384548 0.956206 L0.456409 0.924151 L0.507262 0.881077 L0.5349 0.821975 L0.537111 0.771889 L0.521634 0.718798 L0.498418 0.67372 L0.463042 0.636657 L0.414398 0.613617 L0.34696 0.598591 L0.28284 0.595587 L0.215403 0.605604 L0.145756 0.641665 L0.109274 0.678729 L0.064942 0.724006\",7:\"M0.071534 0.270996 L0.530519 0.270996 L0.495935 0.291702 L0.477752 0.305407 L0.435186 0.346112 L0.412067 0.374136 L0.388565 0.40796 L0.365315 0.448098 L0.342943 0.495062 L0.322081 0.549366 L0.303364 0.611524 L0.287416 0.68205 L0.270077 0.80465 L0.26253 0.94897\",8:\"M0.286761 0.257813 L0.210684 0.27162 L0.1414 0.305622 L0.092494 0.382125 L0.111513 0.450128 L0.16857 0.502193 L0.228345 0.539382 L0.377781 0.594635 L0.470161 0.645637 L0.52586 0.706203 L0.538087 0.792269 L0.506841 0.87621 L0.438915 0.927212 L0.339743 0.961214 L0.263666 0.959089 L0.174004 0.929337 L0.102003 0.881523 L0.063965 0.811395 L0.066682 0.741266 L0.102003 0.671139 L0.180797 0.608448 L0.259591 0.580822 L0.358762 0.548945 L0.456576 0.49688 L0.486463 0.446941 L0.487822 0.362999 L0.453859 0.302434 L0.384574 0.265245 L0.286761 0.257813\",9:\"M0.511026 0.437812 L0.491026 0.347812 L0.451026 0.297812 L0.391026 0.267812 L0.311026 0.257813 L0.231026 0.267812 L0.161026 0.297812 L0.111026 0.347812 L0.091026 0.417812 L0.111026 0.487812 L0.161026 0.537812 L0.231026 0.567812 L0.311026 0.577812 L0.391026 0.557812 L0.451026 0.517812 L0.491026 0.477812 L0.511026 0.437812 M0.510026 0.438812 L0.434026 0.636812 L0.381026 0.777812 L0.337026 0.879812 L0.301026 0.957812\",\"!\":\"M0.301026 0.270996 L0.301026 0.749566 M0.251466 0.94897 L0.350587 0.94897\",'\"':\"M0.16504 0.270996 L0.16504 0.523022 M0.437013 0.270996 L0.437013 0.523022\",\"#\":\"M0.20958 0.282227 L0.146515 0.949754 M0.461844 0.282227 L0.398779 0.949754 M0.032999 0.526969 L0.600587 0.452796 M0.001465 0.82366 L0.569055 0.749486\",$:\"M0.307121 0.240234 L0.307121 1.083502 M0.490031 0.415915 L0.404676 0.328075 L0.23396 0.310507 L0.136407 0.398347 L0.099828 0.521324 L0.124213 0.591596 L0.197379 0.644299 L0.429061 0.697003 L0.502224 0.749708 L0.526613 0.837547 L0.477836 0.960526 L0.355897 1.013228 L0.197379 0.99566 L0.112021 0.942957 L0.07544 0.837547\",\"'\":\"M0.301026 0.270996 L0.301026 0.523022\",\"(\":\"M0.413087 0.241211 L0.372337 0.28347 L0.331589 0.334184 L0.290838 0.393349 L0.25009 0.460965 L0.219528 0.528584 L0.199153 0.5962 L0.188966 0.655364 L0.199153 0.714529 L0.219528 0.782146 L0.25009 0.849764 L0.290838 0.91738 L0.331589 0.976544 L0.372337 1.027258 L0.413087 1.069491\",\")\":\"M0.188966 0.241211 L0.229716 0.28347 L0.270466 0.334184 L0.311213 0.393349 L0.351964 0.460965 L0.382526 0.528584 L0.4029 0.5962 L0.413087 0.655364 L0.4029 0.714529 L0.382526 0.782146 L0.351964 0.849764 L0.311213 0.91738 L0.270466 0.976544 L0.229716 1.027258 L0.188966 1.069491\",\"*\":\"M0.301026 0.458702 L0.301026 0.681942 M0.301026 0.458702 L0.520997 0.536834 M0.301026 0.458702 L0.439954 0.257813 M0.301026 0.458702 L0.162098 0.257813 M0.301026 0.458702 L0.081055 0.536834\",\"+\":\"M0.042969 0.66845 L0.559083 0.66845 M0.301023 0.428223 L0.301023 0.908661\",\",\":\"M0.38672 0.852051 L0.215333 1.030661 L0.301025 1.119971\",\"-\":\"M0.173829 0.686035 L0.428224 0.686035\",\".\":\"M0.362549 0.851074 L0.239503 0.851074\",\"/\":\"M0.062501 1.035249 L0.539551 0.270996\",\"\u003c\":\"M0.559083 0.441895 L0.042969 0.66939 L0.042969 0.66939 L0.559083 0.896902\",\"=\":\"M0.042969 0.545898 L0.559083 0.545898 M0.042969 0.80837 L0.559083 0.80837\",\"\u003e\":\"M0.042969 0.441895 L0.559083 0.66939 L0.559083 0.66939 L0.042969 0.896902\",A:\"M0.018067 0.94897 L0.290179 0.270996 L0.583986 0.94897 M0.155303 0.684521 L0.433548 0.684521\",B:\"M0.063965 0.94897 L0.063965 0.278953 L0.209356 0.270996 L0.342486 0.294394 L0.432179 0.37292 L0.418224 0.48773 L0.312686 0.549166 L0.084728 0.575531 L0.306377 0.589434 L0.468877 0.647456 L0.538087 0.736658 L0.5324 0.85202 L0.501247 0.902983 L0.42355 0.944398 L0.063965 0.94897\",C:\"M0.529054 0.419847 L0.498425 0.345196 L0.442238 0.292341 L0.33583 0.257813 L0.257199 0.268357 L0.187906 0.303748 L0.120243 0.385432 L0.072998 0.599844 L0.110073 0.815385 L0.165381 0.902183 L0.222883 0.942801 L0.334904 0.961214 L0.43253 0.937679 L0.504816 0.868999 L0.529054 0.772065\",D:\"M0.064454 0.94897 L0.071838 0.285078 L0.171217 0.270996 L0.247348 0.272633 L0.37101 0.306078 L0.462461 0.378304 L0.514748 0.475555 L0.535591 0.576392 L0.537599 0.652313 L0.528065 0.717381 L0.508562 0.772419 L0.445948 0.855695 L0.362356 0.90871 L0.225203 0.945862 L0.064454 0.94897\",E:\"M0.080078 0.270996 L0.080078 0.94897 M0.080078 0.270996 L0.521974 0.270996 M0.080078 0.609981 L0.389405 0.609981 M0.080078 0.94897 L0.521974 0.94897\",F:\"M0.086426 0.270996 L0.086426 0.94897 M0.091304 0.275607 L0.515626 0.275607 M0.091304 0.607677 L0.447344 0.607677\",G:\"M0.498034 0.284943 L0.374621 0.257813 L0.244219 0.268648 L0.160577 0.311997 L0.094556 0.398116 L0.056397 0.58404 L0.076752 0.785532 L0.120865 0.858197 L0.188947 0.916734 L0.271008 0.953591 L0.357069 0.961214 L0.43715 0.932047 L0.501262 0.858539 L0.545656 0.648611 L0.329595 0.648131\",H:\"M0.066895 0.270996 L0.066895 0.94897 M0.066895 0.595658 L0.530009 0.595658 M0.535157 0.270996 L0.535157 0.94897\",I:\"M0.301026 0.270996 L0.301026 0.94897\",J:\"M0.506839 0.270996 L0.507814 0.782193 L0.498468 0.846168 L0.480733 0.880789 L0.455864 0.90832 L0.426095 0.929408 L0.360746 0.954812 L0.302508 0.962139 L0.223573 0.953638 L0.16538 0.930312 L0.137072 0.907715 L0.116428 0.880312 L0.102822 0.848819 L0.095633 0.813947 L0.094239 0.776413\",K:\"M0.035401 0.270996 L0.035401 0.94897 M0.502258 0.316194 L0.035401 0.687823 M0.212484 0.582361 L0.566652 0.933903\",L:\"M0.07544 0.270996 L0.07544 0.94897 L0.526613 0.94897\",M:\"M0.042481 0.94897 L0.042481 0.270996 L0.301027 0.712492 L0.559571 0.270996 L0.559571 0.94897\",N:\"M0.067871 0.94897 L0.067871 0.270996 L0.534181 0.94897 L0.525031 0.270996\",O:\"M0.287293 0.961214 L0.19843 0.933567 L0.1172 0.849451 L0.057129 0.563945 L0.114348 0.350255 L0.18455 0.289392 L0.306101 0.257813 L0.42054 0.29572 L0.487543 0.365003 L0.544923 0.625294 L0.516366 0.789624 L0.465476 0.884596 L0.375084 0.949287 L0.287293 0.961214\",P:\"M0.070557 0.94897 L0.070557 0.28379 L0.20704 0.270996 L0.329134 0.278993 L0.408525 0.300514 L0.444022 0.317908 L0.500637 0.368929 L0.525796 0.423728 L0.531496 0.50384 L0.508934 0.554205 L0.473724 0.582043 L0.417577 0.604365 L0.336375 0.620372 L0.226014 0.629268 L0.082368 0.630258\",Q:\"M0.282435 1.050813 L0.195447 1.019646 L0.115933 0.924817 L0.057129 0.602943 L0.113139 0.362034 L0.18186 0.293418 L0.300844 0.257813 L0.412868 0.300553 L0.478457 0.37866 L0.534625 0.672103 L0.506671 0.857367 L0.456855 0.964437 L0.368371 1.037368 L0.282435 1.050813 M0.341225 0.815559 L0.544923 1.070653\",R:\"M0.034912 0.944112 L0.034912 0.288556 L0.227127 0.270996 L0.362038 0.276867 L0.443423 0.294907 L0.477644 0.309614 L0.505809 0.328757 L0.526616 0.352817 L0.544963 0.418061 L0.543241 0.475921 L0.524463 0.517817 L0.49076 0.546518 L0.444265 0.564799 L0.355195 0.578739 L0.047653 0.589627 M0.303054 0.617306 L0.56714 0.94897\",S:\"M0.483037 0.364333 L0.407613 0.267477 L0.22883 0.257813 L0.128623 0.327565 L0.087712 0.455539 L0.104656 0.518727 L0.168054 0.573307 L0.41928 0.617318 L0.503796 0.669342 L0.535157 0.759324 L0.493846 0.900055 L0.367668 0.961214 L0.205436 0.956661 L0.116711 0.907038 L0.066895 0.790334\",T:\"M0.022949 0.270996 L0.579103 0.270996 M0.309284 0.270996 L0.309284 0.94897\",U:\"M0.072022 0.270996 L0.07308 0.648875 L0.080372 0.75167 L0.099024 0.827813 L0.134786 0.885729 L0.181571 0.924023 L0.251464 0.95168 L0.339655 0.962139 L0.401553 0.951668 L0.45232 0.924086 L0.482701 0.891771 L0.495745 0.870529 L0.515699 0.81637 L0.525014 0.744626 L0.530031 0.272017\",V:\"M0.027832 0.270996 L0.320083 0.94897 L0.57422 0.270996\",W:\"M0 0.270996 L0.079799 0.940377 L0.285198 0.472884 L0.505255 0.94897 L0.602052 0.270996\",X:\"M0.009034 0.270996 L0.586805 0.94897 M0.593019 0.270996 L0.015246 0.94897\",Y:\"M0.018067 0.270996 L0.293132 0.574135 M0.583986 0.271959 L0.294954 0.57606 L0.305277 0.94897\",Z:\"M0.053711 0.270996 L0.548341 0.270996 L0.053711 0.94897 L0.548341 0.94897\",\"[\":\"M0.404542 0.240234 L0.197511 0.240234 L0.197511 1.069424 L0.404542 1.069424\",\"\\\\\":\"M0.062501 0.270996 L0.539551 1.035249\",\"]\":\"M0.19751 0.240234 L0.404542 0.240234 L0.404542 1.069424 L0.19751 1.069424\",\"^\":\"M0.035156 0.523931 L0.301024 0.270996 L0.566896 0.523931\",_:\"M0 1.160601 L0.602052 1.160601\",a:\"M0.527101 0.439941 L0.527101 0.973965 M0.527101 0.553824 L0.451366 0.477535 L0.376759 0.439941 L0.263722 0.439941 L0.187989 0.477535 L0.112255 0.553824 L0.074951 0.66881 L0.074951 0.745099 L0.112255 0.85898 L0.187989 0.93527 L0.263722 0.973965 L0.376759 0.973965 L0.451366 0.93527 L0.527101 0.85898\",b:\"M0.07666 0.240234 L0.07666 0.959985 M0.07666 0.582737 L0.151822 0.514237 L0.225865 0.480483 L0.338045 0.480483 L0.413211 0.514237 L0.488374 0.582737 L0.525392 0.685983 L0.525392 0.754485 L0.488374 0.856739 L0.413211 0.92524 L0.338045 0.959985 L0.225865 0.959985 L0.151822 0.92524 L0.07666 0.856739\",c:\"M0.512452 0.553823 L0.441624 0.477535 L0.371854 0.439941 L0.26614 0.439941 L0.195312 0.477535 L0.124486 0.553823 L0.0896 0.668808 L0.0896 0.745099 L0.124486 0.858979 L0.195312 0.93527 L0.26614 0.973965 L0.371854 0.973965 L0.441624 0.93527 L0.512452 0.858979\",d:\"M0.525392 0.240234 L0.525392 0.959985 M0.525392 0.582737 L0.450232 0.514237 L0.376189 0.480483 L0.264006 0.480483 L0.188844 0.514237 L0.11368 0.582737 L0.076661 0.685983 L0.076661 0.754485 L0.11368 0.856739 L0.188844 0.92524 L0.264006 0.959985 L0.376189 0.959985 L0.450232 0.92524 L0.525392 0.856739\",e:\"M0.059571 0.668808 L0.542482 0.668808 M0.542482 0.592521 L0.502641 0.516231 L0.461594 0.477535 L0.381914 0.439941 L0.261186 0.439941 L0.180299 0.477535 L0.099412 0.553823 L0.059571 0.668808 L0.059571 0.745099 L0.099412 0.858979 L0.180299 0.93527 L0.261186 0.973965 L0.381914 0.973965 L0.461594 0.93527 L0.542482 0.858979\",f:\"M0.512941 0.240234 L0.406984 0.240234 L0.301026 0.274346 L0.248047 0.374731 L0.248047 0.946817 M0.089112 0.476088 L0.459965 0.476088\",g:\"M0.525392 0.439941 L0.525392 0.989395 L0.488373 1.091918 L0.45023 1.126757 L0.376189 1.160601 L0.264004 1.160601 L0.188844 1.126757 L0.113681 1.058075 L0.076661 0.954555 M0.525392 0.542467 L0.45023 0.473786 L0.376189 0.439941 L0.264004 0.439941 L0.188844 0.473786 L0.113681 0.542467 L0.076661 0.645988 L0.076661 0.714669 L0.113681 0.817193 L0.188844 0.885875 L0.264004 0.920713 L0.376189 0.920713 L0.45023 0.885875 L0.525392 0.817193\",h:\"M0.092041 0.240234 L0.092041 0.946817 M0.092041 0.61058 L0.205937 0.509225 L0.282214 0.476086 L0.396109 0.476086 L0.47187 0.509225 L0.510011 0.61058 L0.510011 0.946817\",i:\"M0.261026 0.240234 L0.341026 0.240234 M0.300978 0.476089 L0.300978 0.946817\",j:\"M0.3853 0.240234 L0.447023 0.240234 M0.416159 0.465708 L0.416159 1.011689 L0.383887 1.108586 L0.252832 1.140264 L0.15503 1.108586\",k:\"M0.065186 0.240234 L0.065186 0.946817 M0.493824 0.476086 L0.065186 0.812323 M0.236758 0.677829 L0.536867 0.946817\",l:\"M0.301026 0.234863 L0.301026 0.946441\",m:\"M0.050538 0.439941 L0.050538 0.960796 M0.050538 0.588758 L0.114405 0.476607 L0.157178 0.439941 L0.236864 0.439941 L0.279637 0.476607 L0.32241 0.588758 L0.32241 0.960796 M0.32241 0.588758 L0.386281 0.476607 L0.428467 0.439941 L0.50874 0.439941 L0.551515 0.476607 L0.551515 0.960796\",n:\"M0.092041 0.439941 L0.092041 0.960796 M0.092041 0.588758 L0.205936 0.476607 L0.282216 0.439941 L0.396113 0.439941 L0.471871 0.476607 L0.510011 0.588758 L0.510011 0.960796\",o:\"M0.247175 0.439941 L0.175178 0.477535 L0.103186 0.553823 L0.066895 0.668808 L0.066895 0.745099 L0.103186 0.858979 L0.175178 0.93527 L0.247175 0.973965 L0.354874 0.973965 L0.426872 0.93527 L0.498866 0.858979 L0.535157 0.745099 L0.535157 0.668808 L0.498866 0.553823 L0.426872 0.477535 L0.354874 0.439941 L0.247175 0.439941\",p:\"M0.076904 0.439941 L0.076904 1.154244 M0.076904 0.541563 L0.151986 0.473487 L0.225944 0.439941 L0.338005 0.439941 L0.413087 0.473487 L0.488166 0.541563 L0.525148 0.644169 L0.525148 0.712246 L0.488166 0.813866 L0.413087 0.881942 L0.338005 0.916471 L0.225944 0.916471 L0.151986 0.881942 L0.076904 0.813866\",q:\"M0.525148 0.441895 L0.525148 1.156195 M0.525148 0.5435 L0.450067 0.47544 L0.376106 0.441895 L0.264042 0.441895 L0.188966 0.47544 L0.113885 0.5435 L0.076905 0.646108 L0.076905 0.714187 L0.113885 0.815809 L0.188966 0.883886 L0.264042 0.918418 L0.376106 0.918418 L0.450067 0.883886 L0.525148 0.815809\",r:\"M0.107422 0.439941 L0.107422 0.960796 M0.107422 0.663164 L0.155824 0.551014 L0.252626 0.476607 L0.349428 0.439941 L0.49463 0.439941\",s:\"M0.475556 0.477535 L0.400757 0.439941 L0.276092 0.439941 L0.176361 0.477535 L0.101563 0.553823 L0.101563 0.630112 L0.176361 0.668808 L0.301024 0.668808 L0.425688 0.745099 L0.50049 0.821387 L0.50049 0.897677 L0.425688 0.93527 L0.325956 0.973965 L0.201295 0.973965 L0.126496 0.93527 L0.101563 0.858979\",t:\"M0.246032 0.297852 L0.246032 0.826549 L0.301023 0.919323 L0.411011 0.950848 L0.520997 0.950848 M0.081055 0.515799 L0.466004 0.515799\",u:\"M0.092041 0.454102 L0.092041 0.826134 L0.13018 0.937211 L0.205936 0.974954 L0.319832 0.974954 L0.396113 0.937211 L0.510011 0.826134 M0.510011 0.454102 L0.510011 0.974954\",v:\"M0.048828 0.453125 L0.301026 0.961719 M0.553224 0.453125 L0.301026 0.961719\",w:\"M0 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.451539 0.961719 M0.602052 0.453125 L0.451539 0.961719\",x:\"M0.03711 0.453125 L0.564943 0.961719 M0.564943 0.453125 L0.03711 0.961719\",y:\"M0.084618 0.453125 L0.320232 0.921476 M0.55713 0.453125 L0.320232 0.921476 L0.242119 1.055289 L0.163369 1.122196 L0.084618 1.155166 L0.044922 1.155166\",z:\"M0.505373 0.452148 L0.09668 0.961651 M0.09668 0.452148 L0.505373 0.452148 M0.09668 0.961651 L0.505373 0.961651\"},Ov={};for(const t in p8t){Ov[t]=[];const e=p8t[t].split(\"M\").slice(1).map(n=\u003en.split(\"L\").map(o=\u003eo.trim().split(\" \").map(parseFloat)));for(const n of e)for(let o=0;o\u003cn.length-1;o++)Ov[t].push({x1:n[o][0],y1:1-n[o][1],x2:n[o+1][0],y2:1-n[o+1][1]})}var yho=.09,xho=.692052,Eho=.692052,Bho=1.152,bho=0,Sho=Ov,Qho={0:.692052,1:.692052,2:.692052,3:.692052,4:.692052,5:.692052,6:.692052,7:.692052,8:.692052,9:.692052,\"!\":.692052,'\"':.692052,\"#\":.692052,$:.692052,\"'\":.692052,\"(\":.692052,\")\":.692052,\"*\":.692052,\"+\":.692052,\",\":.692052,\"-\":.692052,\".\":.692052,\"/\":.692052,\"\u003c\":.692052,\"=\":.692052,\"\u003e\":.692052,A:.692052,B:.692052,C:.692052,D:.692052,E:.692052,F:.692052,G:.692052,H:.692052,I:.692052,J:.692052,K:.692052,L:.692052,M:.692052,N:.692052,O:.692052,P:.692052,Q:.692052,R:.692052,S:.692052,T:.692052,U:.692052,V:.692052,W:.692052,X:.692052,Y:.692052,Z:.692052,\"[\":.692052,\"\\\\\":.692052,\"]\":.692052,\"^\":.692052,_:.692052,a:.692052,b:.692052,c:.692052,d:.692052,e:.692052,f:.692052,g:.692052,h:.692052,i:.692052,j:.692052,k:.692052,l:.692052,m:.692052,n:.692052,o:.692052,p:.692052,q:.692052,r:.692052,s:.692052,t:.692052,u:.692052,v:.692052,w:.692052,x:.692052,y:.692052,z:.692052,\" \":.692052},vho={},Gv={glyphWidthRatio:xho,spaceWidthRatio:Eho,lineHeightRatio:Bho,strokeWidthRatio:yho,letterSpacingRatio:bho},rm=Uint8Array,Z3=Uint16Array,BQe=Int32Array,kce=new rm([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fce=new rm([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),bQe=new rm([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),m8t=function(t,e){for(var n=new Z3(31),o=0;o\u003c31;++o)n[o]=e+=1\u003c\u003ct[o-1];for(var i=new BQe(n[30]),o=1;o\u003c30;++o)for(var r=n[o];r\u003cn[o+1];++r)i[r]=r-n[o]\u003c\u003c5|o;return{b:n,r:i}},_8t=m8t(kce,2),f8t=_8t.b,SQe=_8t.r;f8t[28]=258,SQe[258]=28;for(var I8t=m8t(Fce,0),who=I8t.b,C8t=I8t.r,QQe=new Z3(32768),gd=0;gd\u003c32768;++gd){var Yv=(gd\u002643690)\u003e\u003e1|(gd\u002621845)\u003c\u003c1;Yv=(Yv\u002652428)\u003e\u003e2|(Yv\u002613107)\u003c\u003c2,Yv=(Yv\u002661680)\u003e\u003e4|(Yv\u00263855)\u003c\u003c4,QQe[gd]=((Yv\u002665280)\u003e\u003e8|(Yv\u0026255)\u003c\u003c8)\u003e\u003e1}for(var T7=(function(t,e,n){for(var o=t.length,i=0,r=new Z3(e);i\u003co;++i)t[i]\u0026\u0026++r[t[i]-1];var s=new Z3(e);for(i=1;i\u003ce;++i)s[i]=s[i-1]+r[i-1]\u003c\u003c1;var a;if(n){a=new Z3(1\u003c\u003ce);var A=15-e;for(i=0;i\u003co;++i)if(t[i])for(var c=i\u003c\u003c4|t[i],l=e-t[i],u=s[t[i]-1]++\u003c\u003cl,g=u|(1\u003c\u003cl)-1;u\u003c=g;++u)a[QQe[u]\u003e\u003eA]=c}else for(a=new Z3(o),i=0;i\u003co;++i)t[i]\u0026\u0026(a[i]=QQe[s[t[i]-1]++]\u003e\u003e15-t[i]);return a}),Uv=new rm(288),gd=0;gd\u003c144;++gd)Uv[gd]=8;for(var gd=144;gd\u003c256;++gd)Uv[gd]=9;for(var gd=256;gd\u003c280;++gd)Uv[gd]=7;for(var gd=280;gd\u003c288;++gd)Uv[gd]=8;for(var GW=new rm(32),gd=0;gd\u003c32;++gd)GW[gd]=5;var Pho=T7(Uv,9,0),Mho=T7(Uv,9,1),Dho=T7(GW,5,0),Nho=T7(GW,5,1),vQe=function(t){for(var e=t[0],n=1;n\u003ct.length;++n)t[n]\u003ee\u0026\u0026(e=t[n]);return e},pB=function(t,e,n){var o=e/8|0;return(t[o]|t[o+1]\u003c\u003c8)\u003e\u003e(e\u00267)\u0026n},wQe=function(t,e){var n=e/8|0;return(t[n]|t[n+1]\u003c\u003c8|t[n+2]\u003c\u003c16)\u003e\u003e(e\u00267)},PQe=function(t){return(t+7)/8|0},PH=function(t,e,n){return(e==null||e\u003c0)\u0026\u0026(e=0),(n==null||n\u003et.length)\u0026\u0026(n=t.length),new rm(t.subarray(e,n))},Rho=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],Sx=function(t,e,n){var o=new Error(e||Rho[t]);if(o.code=t,Error.captureStackTrace\u0026\u0026Error.captureStackTrace(o,Sx),!n)throw o;return o},y8t=function(t,e,n,o){var i=t.length,r=0;if(!i||e.f\u0026\u0026!e.l)return n||new rm(0);var s=!n,a=s||e.i!=2,A=e.i;s\u0026\u0026(n=new rm(i*3));var c=function(pe){var ye=n.length;if(pe\u003eye){var Me=new rm(Math.max(ye*2,pe));Me.set(n),n=Me}},l=e.f||0,u=e.p||0,g=e.b||0,h=e.l,d=e.d,p=e.m,m=e.n,_=i*8;do{if(!h){l=pB(t,u,1);var f=pB(t,u+1,3);if(u+=3,f)if(f==1)h=Mho,d=Nho,p=9,m=5;else if(f==2){var x=pB(t,u,31)+257,E=pB(t,u+10,15)+4,B=x+pB(t,u+5,31)+1;u+=14;for(var S=new rm(B),Q=new rm(19),w=0;w\u003cE;++w)Q[bQe[w]]=pB(t,u+w*3,7);u+=E*3;for(var M=vQe(Q),k=(1\u003c\u003cM)-1,R=T7(Q,M,1),w=0;w\u003cB;){var F=R[pB(t,u,k)];u+=F\u002615;var I=F\u003e\u003e4;if(I\u003c16)S[w++]=I;else{var O=0,U=0;for(I==16?(U=3+pB(t,u,3),u+=2,O=S[w-1]):I==17?(U=3+pB(t,u,7),u+=3):I==18\u0026\u0026(U=11+pB(t,u,127),u+=7);U--;)S[w++]=O}}var Y=S.subarray(0,x),W=S.subarray(x);p=vQe(Y),m=vQe(W),h=T7(Y,p,1),d=T7(W,m,1)}else Sx(1);else{var I=PQe(u)+4,C=t[I-4]|t[I-3]\u003c\u003c8,y=I+C;if(y\u003ei){A\u0026\u0026Sx(0);break}a\u0026\u0026c(g+C),n.set(t.subarray(I,y),g),e.b=g+=C,e.p=u=y*8,e.f=l;continue}if(u\u003e_){A\u0026\u0026Sx(0);break}}a\u0026\u0026c(g+131072);for(var te=(1\u003c\u003cp)-1,j=(1\u003c\u003cm)-1,J=u;;J=u){var O=h[wQe(t,u)\u0026te],oe=O\u003e\u003e4;if(u+=O\u002615,u\u003e_){A\u0026\u0026Sx(0);break}if(O||Sx(2),oe\u003c256)n[g++]=oe;else if(oe==256){J=u,h=null;break}else{var ie=oe-254;if(oe\u003e264){var w=oe-257,ne=kce[w];ie=pB(t,u,(1\u003c\u003cne)-1)+f8t[w],u+=ne}var le=d[wQe(t,u)\u0026j],ge=le\u003e\u003e4;le||Sx(3),u+=le\u002615;var W=who[ge];if(ge\u003e3){var ne=Fce[ge];W+=wQe(t,u)\u0026(1\u003c\u003cne)-1,u+=ne}if(u\u003e_){A\u0026\u0026Sx(0);break}a\u0026\u0026c(g+131072);var _e=g+ie;if(g\u003cW){var ue=r-W,fe=Math.min(W,_e);for(ue+g\u003c0\u0026\u0026Sx(3);g\u003cfe;++g)n[g]=o[ue+g]}for(;g\u003c_e;++g)n[g]=n[g-W]}}e.l=h,e.p=J,e.b=g,e.f=l,h\u0026\u0026(l=1,e.m=p,e.d=d,e.n=m)}while(!l);return g!=n.length\u0026\u0026s?PH(n,0,g):n.subarray(0,g)},db=function(t,e,n){n\u003c\u003c=e\u00267;var o=e/8|0;t[o]|=n,t[o+1]|=n\u003e\u003e8},YW=function(t,e,n){n\u003c\u003c=e\u00267;var o=e/8|0;t[o]|=n,t[o+1]|=n\u003e\u003e8,t[o+2]|=n\u003e\u003e16},MQe=function(t,e){for(var n=[],o=0;o\u003ct.length;++o)t[o]\u0026\u0026n.push({s:o,f:t[o]});var i=n.length,r=n.slice();if(!i)return{t:b8t,l:0};if(i==1){var s=new rm(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(y,x){return y.f-x.f}),n.push({s:-1,f:25001});var a=n[0],A=n[1],c=0,l=1,u=2;for(n[0]={s:-1,f:a.f+A.f,l:a,r:A};l!=i-1;)a=n[n[c].f\u003cn[u].f?c++:u++],A=n[c!=l\u0026\u0026n[c].f\u003cn[u].f?c++:u++],n[l++]={s:-1,f:a.f+A.f,l:a,r:A};for(var g=r[0].s,o=1;o\u003ci;++o)r[o].s\u003eg\u0026\u0026(g=r[o].s);var h=new Z3(g+1),d=DQe(n[l-1],h,0);if(d\u003ee){var o=0,p=0,m=d-e,_=1\u003c\u003cm;for(r.sort(function(x,E){return h[E.s]-h[x.s]||x.f-E.f});o\u003ci;++o){var f=r[o].s;if(h[f]\u003ee)p+=_-(1\u003c\u003cd-h[f]),h[f]=e;else break}for(p\u003e\u003e=m;p\u003e0;){var I=r[o].s;h[I]\u003ce?p-=1\u003c\u003ce-h[I]++-1:++o}for(;o\u003e=0\u0026\u0026p;--o){var C=r[o].s;h[C]==e\u0026\u0026(--h[C],++p)}d=e}return{t:new rm(h),l:d}},DQe=function(t,e,n){return t.s==-1?Math.max(DQe(t.l,e,n+1),DQe(t.r,e,n+1)):e[t.s]=n},x8t=function(t){for(var e=t.length;e\u0026\u0026!t[--e];);for(var n=new Z3(++e),o=0,i=t[0],r=1,s=function(A){n[o++]=A},a=1;a\u003c=e;++a)if(t[a]==i\u0026\u0026a!=e)++r;else{if(!i\u0026\u0026r\u003e2){for(;r\u003e138;r-=138)s(32754);r\u003e2\u0026\u0026(s(r\u003e10?r-11\u003c\u003c5|28690:r-3\u003c\u003c5|12305),r=0)}else if(r\u003e3){for(s(i),--r;r\u003e6;r-=6)s(8304);r\u003e2\u0026\u0026(s(r-3\u003c\u003c5|8208),r=0)}for(;r--;)s(i);r=1,i=t[a]}return{c:n.subarray(0,o),n:e}},UW=function(t,e){for(var n=0,o=0;o\u003ce.length;++o)n+=t[o]*e[o];return n},E8t=function(t,e,n){var o=n.length,i=PQe(e+2);t[i]=o\u0026255,t[i+1]=o\u003e\u003e8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var r=0;r\u003co;++r)t[i+r+4]=n[r];return(i+4+o)*8},B8t=function(t,e,n,o,i,r,s,a,A,c,l){db(e,l++,n),++i[256];for(var u=MQe(i,15),g=u.t,h=u.l,d=MQe(r,15),p=d.t,m=d.l,_=x8t(g),f=_.c,I=_.n,C=x8t(p),y=C.c,x=C.n,E=new Z3(19),B=0;B\u003cf.length;++B)++E[f[B]\u002631];for(var B=0;B\u003cy.length;++B)++E[y[B]\u002631];for(var S=MQe(E,7),Q=S.t,w=S.l,M=19;M\u003e4\u0026\u0026!Q[bQe[M-1]];--M);var k=c+5\u003c\u003c3,R=UW(i,Uv)+UW(r,GW)+s,F=UW(i,g)+UW(r,p)+s+14+3*M+UW(E,Q)+2*E[16]+3*E[17]+7*E[18];if(A\u003e=0\u0026\u0026k\u003c=R\u0026\u0026k\u003c=F)return E8t(e,l,t.subarray(A,A+c));var O,U,Y,W;if(db(e,l,1+(F\u003cR)),l+=2,F\u003cR){O=T7(g,h,0),U=g,Y=T7(p,m,0),W=p;var te=T7(Q,w,0);db(e,l,I-257),db(e,l+5,x-1),db(e,l+10,M-4),l+=14;for(var B=0;B\u003cM;++B)db(e,l+3*B,Q[bQe[B]]);l+=3*M;for(var j=[f,y],J=0;J\u003c2;++J)for(var oe=j[J],B=0;B\u003coe.length;++B){var ie=oe[B]\u002631;db(e,l,te[ie]),l+=Q[ie],ie\u003e15\u0026\u0026(db(e,l,oe[B]\u003e\u003e5\u0026127),l+=oe[B]\u003e\u003e12)}}else O=Pho,U=Uv,Y=Dho,W=GW;for(var B=0;B\u003ca;++B){var ne=o[B];if(ne\u003e255){var ie=ne\u003e\u003e18\u002631;YW(e,l,O[ie+257]),l+=U[ie+257],ie\u003e7\u0026\u0026(db(e,l,ne\u003e\u003e23\u002631),l+=kce[ie]);var le=ne\u002631;YW(e,l,Y[le]),l+=W[le],le\u003e3\u0026\u0026(YW(e,l,ne\u003e\u003e5\u00268191),l+=Fce[le])}else YW(e,l,O[ne]),l+=U[ne]}return YW(e,l,O[256]),l+U[256]},Tho=new BQe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),b8t=new rm(0),kho=function(t,e,n,o,i,r){var s=r.z||t.length,a=new rm(o+s+5*(1+Math.ceil(s/7e3))+i),A=a.subarray(o,a.length-i),c=r.l,l=(r.r||0)\u00267;if(e){l\u0026\u0026(A[0]=r.r\u003e\u003e3);for(var u=Tho[e-1],g=u\u003e\u003e13,h=u\u00268191,d=(1\u003c\u003cn)-1,p=r.p||new Z3(32768),m=r.h||new Z3(d+1),_=Math.ceil(n/3),f=2*_,I=function(ve){return(t[ve]^t[ve+1]\u003c\u003c_^t[ve+2]\u003c\u003cf)\u0026d},C=new BQe(25e3),y=new Z3(288),x=new Z3(32),E=0,B=0,S=r.i||0,Q=0,w=r.w||0,M=0;S+2\u003cs;++S){var k=I(S),R=S\u002632767,F=m[k];if(p[R]=F,m[k]=R,w\u003c=S){var O=s-S;if((E\u003e7e3||Q\u003e24576)\u0026\u0026(O\u003e423||!c)){l=B8t(t,A,0,C,y,x,B,Q,M,S-M,l),Q=E=B=0,M=S;for(var U=0;U\u003c286;++U)y[U]=0;for(var U=0;U\u003c30;++U)x[U]=0}var Y=2,W=0,te=h,j=R-F\u002632767;if(O\u003e2\u0026\u0026k==I(S-j))for(var J=Math.min(g,O)-1,oe=Math.min(32767,S),ie=Math.min(258,O);j\u003c=oe\u0026\u0026--te\u0026\u0026R!=F;){if(t[S+Y]==t[S+Y-j]){for(var ne=0;ne\u003cie\u0026\u0026t[S+ne]==t[S+ne-j];++ne);if(ne\u003eY){if(Y=ne,W=j,ne\u003eJ)break;for(var le=Math.min(j,ne-2),ge=0,U=0;U\u003cle;++U){var _e=S-j+U\u002632767,ue=p[_e],fe=_e-ue\u002632767;fe\u003ege\u0026\u0026(ge=fe,F=_e)}}}R=F,F=p[R],j+=R-F\u002632767}if(W){C[Q++]=268435456|SQe[Y]\u003c\u003c18|C8t[W];var pe=SQe[Y]\u002631,ye=C8t[W]\u002631;B+=kce[pe]+Fce[ye],++y[257+pe],++x[ye],w=S+Y,++E}else C[Q++]=t[S],++y[t[S]]}}for(S=Math.max(S,w);S\u003cs;++S)C[Q++]=t[S],++y[t[S]];l=B8t(t,A,c,C,y,x,B,Q,M,S-M,l),c||(r.r=l\u00267|A[l/8|0]\u003c\u003c3,l-=7,r.h=m,r.p=p,r.i=S,r.w=w)}else{for(var S=r.w||0;S\u003cs+c;S+=65535){var Me=S+65535;Me\u003e=s\u0026\u0026(A[l/8|0]=c,Me=s),l=E8t(A,l+1,t.subarray(S,Me))}r.i=s}return PH(a,0,o+PQe(l)+i)},Fho=(function(){for(var t=new Int32Array(256),e=0;e\u003c256;++e){for(var n=e,o=9;--o;)n=(n\u00261\u0026\u0026-306674912)^n\u003e\u003e\u003e1;t[e]=n}return t})(),Lho=function(){var t=-1;return{p:function(e){for(var n=t,o=0;o\u003ce.length;++o)n=Fho[n\u0026255^e[o]]^n\u003e\u003e\u003e8;t=n},d:function(){return~t}}},S8t=function(){var t=1,e=0;return{p:function(n){for(var o=t,i=e,r=n.length|0,s=0;s!=r;){for(var a=Math.min(s+2655,r);s\u003ca;++s)i+=o+=n[s];o=(o\u002665535)+15*(o\u003e\u003e16),i=(i\u002665535)+15*(i\u003e\u003e16)}t=o,e=i},d:function(){return t%=65521,e%=65521,(t\u0026255)\u003c\u003c24|(t\u002665280)\u003c\u003c8|(e\u0026255)\u003c\u003c8|e\u003e\u003e8}}},Q8t=function(t,e,n,o,i){if(!i\u0026\u0026(i={l:1},e.dictionary)){var r=e.dictionary.subarray(-32768),s=new rm(r.length+t.length);s.set(r),s.set(t,r.length),t=s,i.w=r.length}return kho(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,o,i)},KW=function(t,e,n){for(;n;++e)t[e]=n,n\u003e\u003e\u003e=8},Hho=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level\u003c2?4:e.level==9?2:0,t[9]=3,e.mtime!=0\u0026\u0026KW(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var o=0;o\u003c=n.length;++o)t[o+10]=n.charCodeAt(o)}},Oho=function(t){return 10+(t.filename?t.filename.length+1:0)},Gho=function(t,e){var n=e.level,o=n==0?0:n\u003c6?1:n==9?3:2;if(t[0]=120,t[1]=o\u003c\u003c6|(e.dictionary\u0026\u002632),t[1]|=31-(t[0]\u003c\u003c8|t[1])%31,e.dictionary){var i=S8t();i.p(e.dictionary),KW(t,2,i.d())}},v8t=function(t,e){return((t[0]\u002615)!=8||t[0]\u003e\u003e4\u003e7||(t[0]\u003c\u003c8|t[1])%31)\u0026\u0026Sx(6,\"invalid zlib data\"),(t[1]\u003e\u003e5\u00261)==+!e\u0026\u0026Sx(6,\"invalid zlib data: \"+(t[1]\u002632?\"need\":\"unexpected\")+\" dictionary\"),(t[1]\u003e\u003e3\u00264)+2},NQe=(function(){function t(e,n){typeof e==\"function\"\u0026\u0026(n=e,e={}),this.ondata=n;var o=e\u0026\u0026e.dictionary\u0026\u0026e.dictionary.subarray(-32768);this.s={i:0,b:o?o.length:0},this.o=new rm(32768),this.p=new rm(0),o\u0026\u0026this.o.set(o)}return t.prototype.e=function(e){if(this.ondata||Sx(5),this.d\u0026\u0026Sx(4),!this.p.length)this.p=e;else if(e.length){var n=new rm(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length),this.p=n}},t.prototype.c=function(e){this.s.i=+(this.d=e||!1);var n=this.s.b,o=y8t(this.p,this.s,this.o);this.ondata(PH(o,n,this.s.b),this.d),this.o=PH(o,this.s.b-32768),this.s.b=this.o.length,this.p=PH(this.p,this.s.p/8|0),this.s.p\u0026=7},t.prototype.push=function(e,n){this.e(e),this.c(n)},t})();function RQe(t,e){e||(e={});var n=Lho(),o=t.length;n.p(t);var i=Q8t(t,e,Oho(e),8),r=i.length;return Hho(i,e),KW(i,r-8,n.d()),KW(i,r-4,o),i}function w8t(t,e){e||(e={});var n=S8t();n.p(t);var o=Q8t(t,e,e.dictionary?6:2,4);return Gho(o,e),KW(o,o.length-4,n.d()),o}var Lce=(function(){function t(e,n){NQe.call(this,e,n),this.v=e\u0026\u0026e.dictionary?2:1}return t.prototype.push=function(e,n){if(NQe.prototype.e.call(this,e),this.v){if(this.p.length\u003c6\u0026\u0026!n)return;this.p=this.p.subarray(v8t(this.p,this.v-1)),this.v=0}n\u0026\u0026(this.p.length\u003c4\u0026\u0026Sx(6,\"invalid zlib data\"),this.p=this.p.subarray(0,-4)),NQe.prototype.c.call(this,n)},t})();function Yho(t,e){return y8t(t.subarray(v8t(t,e),-4),{i:2},e,e)}var P8t=typeof TextEncoder\u003c\"u\"\u0026\u0026new TextEncoder,Uho=typeof TextDecoder\u003c\"u\"\u0026\u0026new TextDecoder,Kho=0;try{Uho.decode(b8t,{stream:!0}),Kho=1}catch{}function TQe(t,e){var n;if(P8t)return P8t.encode(t);for(var o=t.length,i=new rm(t.length+(t.length\u003e\u003e1)),r=0,s=function(c){i[r++]=c},n=0;n\u003co;++n){if(r+5\u003ei.length){var a=new rm(r+8+(o-n\u003c\u003c1));a.set(i),i=a}var A=t.charCodeAt(n);A\u003c128||e?s(A):A\u003c2048?(s(192|A\u003e\u003e6),s(128|A\u002663)):A\u003e55295\u0026\u0026A\u003c57344?(A=65536+(A\u00261047552)|t.charCodeAt(++n)\u00261023,s(240|A\u003e\u003e18),s(128|A\u003e\u003e12\u002663),s(128|A\u003e\u003e6\u002663),s(128|A\u002663)):(s(224|A\u003e\u003e12),s(128|A\u003e\u003e6\u002663),s(128|A\u002663))}return PH(i,0,r)}function M8t(t,e=\"utf8\"){return new TextDecoder(e).decode(t)}const Vho=new TextEncoder;function zho(t){return Vho.encode(t)}const Jho=1024*8,Who=(()=\u003e{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)\u0026t[0])})(),kQe={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class VW{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(e=Jho,n={}){let o=!1;typeof e==\"number\"?e=new ArrayBuffer(e):(o=!0,this.lastWrittenByte=e.byteLength);const i=n.offset?n.offset\u003e\u003e\u003e0:0,r=e.byteLength-i;let s=i;(ArrayBuffer.isView(e)||e instanceof VW)\u0026\u0026(e.byteLength!==e.buffer.byteLength\u0026\u0026(s=e.byteOffset+i),e=e.buffer),o?this.lastWrittenByte=r:this.lastWrittenByte=0,this.buffer=e,this.length=r,this.byteLength=r,this.byteOffset=s,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,s,r),this._mark=0,this._marks=[]}available(e=1){return this.offset+e\u003c=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error(\"Mark stack empty\");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const o=(this.offset+e)*2,i=new Uint8Array(o);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=o,this.byteLength=o,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,\"uint8\")}readArray(e,n){const o=kQe[n].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,r=this.buffer.slice(i,i+o);if(this.littleEndian===Who\u0026\u0026n!==\"uint8\"\u0026\u0026n!==\"int8\"){const a=new Uint8Array(this.buffer.slice(i,i+o));a.reverse();const A=new kQe[n](a.buffer);return this.offset+=o,A.reverse(),A}const s=new kQe[n](r);return this.offset+=o,s}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let n=\"\";for(let o=0;o\u003ce;o++)n+=this.readChar();return n}readUtf8(e=1){return M8t(this.readBytes(e))}decodeText(e=1,n=\"utf8\"){return M8t(this.readBytes(e),n)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let n=0;n\u003ce.length;n++)this._data.setUint8(this.offset++,e[n]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let n=0;n\u003ce.length;n++)this.writeUint8(e.charCodeAt(n));return this}writeUtf8(e){return this.writeBytes(zho(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset\u003ethis.lastWrittenByte\u0026\u0026(this.lastWrittenByte=this.offset)}}const D8t=[];for(let t=0;t\u003c256;t++){let e=t;for(let n=0;n\u003c8;n++)e\u00261?e=3988292384^e\u003e\u003e\u003e1:e=e\u003e\u003e\u003e1;D8t[t]=e}const N8t=4294967295;function jho(t,e,n){let o=t;for(let i=0;i\u003cn;i++)o=D8t[(o^e[i])\u0026255]^o\u003e\u003e\u003e8;return o}function R8t(t,e){return(jho(N8t,t,e)^N8t)\u003e\u003e\u003e0}function T8t(t,e,n){const o=t.readUint32(),i=R8t(new Uint8Array(t.buffer,t.byteOffset+t.offset-e-4,e),e);if(i!==o)throw new Error(`CRC mismatch for chunk ${n}. Expected ${o}, found ${i}`)}function MH(t,e){t.writeUint32(R8t(new Uint8Array(t.buffer,t.byteOffset+t.offset-e,e),e))}function k8t(t,e,n){for(let o=0;o\u003cn;o++)e[o]=t[o]}function F8t(t,e,n,o){let i=0;for(;i\u003co;i++)e[i]=t[i];for(;i\u003cn;i++)e[i]=t[i]+e[i-o]\u0026255}function L8t(t,e,n,o){let i=0;if(n.length===0)for(;i\u003co;i++)e[i]=t[i];else for(;i\u003co;i++)e[i]=t[i]+n[i]\u0026255}function H8t(t,e,n,o,i){let r=0;if(n.length===0){for(;r\u003ci;r++)e[r]=t[r];for(;r\u003co;r++)e[r]=t[r]+(e[r-i]\u003e\u003e1)\u0026255}else{for(;r\u003ci;r++)e[r]=t[r]+(n[r]\u003e\u003e1)\u0026255;for(;r\u003co;r++)e[r]=t[r]+(e[r-i]+n[r]\u003e\u003e1)\u0026255}}function O8t(t,e,n,o,i){let r=0;if(n.length===0){for(;r\u003ci;r++)e[r]=t[r];for(;r\u003co;r++)e[r]=t[r]+e[r-i]\u0026255}else{for(;r\u003ci;r++)e[r]=t[r]+n[r]\u0026255;for(;r\u003co;r++)e[r]=t[r]+$ho(e[r-i],n[r],n[r-i])\u0026255}}function $ho(t,e,n){const o=t+e-n,i=Math.abs(o-t),r=Math.abs(o-e),s=Math.abs(o-n);return i\u003c=r\u0026\u0026i\u003c=s?t:r\u003c=s?e:n}function qho(t,e,n,o,i,r){switch(t){case 0:k8t(e,n,i);break;case 1:F8t(e,n,i,r);break;case 2:L8t(e,n,o,i);break;case 3:H8t(e,n,o,i,r);break;case 4:O8t(e,n,o,i,r);break;default:throw new Error(`Unsupported filter: ${t}`)}}const Xho=new Uint16Array([255]),Zho=new Uint8Array(Xho.buffer)[0]===255;function epo(t){const{data:e,width:n,height:o,channels:i,depth:r}=t,s=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],a=Math.ceil(r/8)*i,A=new Uint8Array(o*n*a);let c=0;for(let l=0;l\u003c7;l++){const u=s[l],g=Math.ceil((n-u.x)/u.xStep),h=Math.ceil((o-u.y)/u.yStep);if(g\u003c=0||h\u003c=0)continue;const d=g*a,p=new Uint8Array(d);for(let m=0;m\u003ch;m++){const _=e[c++],f=e.subarray(c,c+d);c+=d;const I=new Uint8Array(d);qho(_,f,I,p,d,a),p.set(I);for(let C=0;C\u003cg;C++){const y=u.x+C*u.xStep,x=u.y+m*u.yStep;if(!(y\u003e=n||x\u003e=o))for(let E=0;E\u003ca;E++)A[(x*n+y)*a+E]=I[C*a+E]}}}if(r===16){const l=new Uint16Array(A.buffer);if(Zho)for(let u=0;u\u003cl.length;u++)l[u]=tpo(l[u]);return l}else return A}function tpo(t){return(t\u0026255)\u003c\u003c8|t\u003e\u003e8\u0026255}const npo=new Uint16Array([255]),opo=new Uint8Array(npo.buffer)[0]===255,ipo=new Uint8Array(0);function G8t(t){const{data:e,width:n,height:o,channels:i,depth:r}=t,s=Math.ceil(r/8)*i,a=Math.ceil(r/8*i*n),A=new Uint8Array(o*a);let c=ipo,l=0,u,g;for(let h=0;h\u003co;h++){switch(u=e.subarray(l+1,l+1+a),g=A.subarray(h*a,(h+1)*a),e[l]){case 0:k8t(u,g,a);break;case 1:F8t(u,g,a,s);break;case 2:L8t(u,g,c,a);break;case 3:H8t(u,g,c,a,s);break;case 4:O8t(u,g,c,a,s);break;default:throw new Error(`Unsupported filter: ${e[l]}`)}c=g,l+=a+1}if(r===16){const h=new Uint16Array(A.buffer);if(opo)for(let d=0;d\u003ch.length;d++)h[d]=rpo(h[d]);return h}else return A}function rpo(t){return(t\u0026255)\u003c\u003c8|t\u003e\u003e8\u0026255}const zW=Uint8Array.of(137,80,78,71,13,10,26,10);function spo(t){t.writeBytes(zW)}function Y8t(t){if(!apo(t.readBytes(zW.length)))throw new Error(\"wrong PNG signature\")}function apo(t){if(t.length\u003czW.length)return!1;for(let e=0;e\u003czW.length;e++)if(t[e]!==zW[e])return!1;return!0}const U8t=\"tEXt\",K8t=0,V8t=new TextDecoder(\"latin1\");function z8t(t){if(J8t(t),t.length===0||t.length\u003e79)throw new Error(\"keyword length must be between 1 and 79\")}const Apo=/^[\\u0000-\\u00FF]*$/;function J8t(t){if(!Apo.test(t))throw new Error(\"invalid latin1 text\")}function cpo(t,e,n){const o=W8t(e);t[o]=upo(e,n-o.length-1)}function lpo(t,e,n){z8t(e),J8t(n);const o=e.length+1+n.length;t.writeUint32(o),t.writeChars(U8t),t.writeChars(e),t.writeByte(K8t),t.writeChars(n),MH(t,o+4)}function W8t(t){for(t.mark();t.readByte()!==K8t;);const e=t.offset;t.reset();const n=V8t.decode(t.readBytes(e-t.offset-1));return t.skip(1),z8t(n),n}function upo(t,e){return V8t.decode(t.readBytes(e))}const qm={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Hce={UNKNOWN:-1,DEFLATE:0},FQe={UNKNOWN:-1,ADAPTIVE:0},Kv={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Oce={NONE:0,BACKGROUND:1,PREVIOUS:2},LQe={SOURCE:0,OVER:1};class gpo extends VW{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;_chunks;_inflatorResult;constructor(e,n={}){super(e);const{checkCrc:o=!1}=n;this._checkCrc=o,this._inflator=new Lce((i,r)=\u003e{if(this._chunks.push(i),r){const s=this._chunks.reduce((A,c)=\u003eA+c.length,0);this._inflatorResult=new Uint8Array(s);let a=0;for(const A of this._chunks)this._inflatorResult.set(A,a),a+=A.length;this._chunks=[]}}),this._chunks=[],this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=Hce.UNKNOWN,this._filterMethod=FQe.UNKNOWN,this._interlaceMethod=Kv.UNKNOWN,this._colorType=qm.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this._inflatorResult=new Uint8Array(0),this.setBigEndian()}decode(){for(Y8t(this);!this._end;){const e=this.readUint32(),n=this.readChars(4);this.decodeChunk(e,n)}return this._inflator.push(new Uint8Array(0),!0),this.decodeImage(),this._png}decodeApng(){for(Y8t(this);!this._end;){const e=this.readUint32(),n=this.readChars(4);this.decodeApngChunk(e,n)}return this.decodeApngImage(),this._apng}decodeChunk(e,n){const o=this.offset;switch(n){case\"IHDR\":this.decodeIHDR();break;case\"PLTE\":this.decodePLTE(e);break;case\"IDAT\":this.decodeIDAT(e);break;case\"IEND\":this._end=!0;break;case\"tRNS\":this.decodetRNS(e);break;case\"iCCP\":this.decodeiCCP(e);break;case U8t:cpo(this._png.text,this,e);break;case\"pHYs\":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-o!==e)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?T8t(this,e+4,n):this.skip(4)}decodeApngChunk(e,n){const o=this.offset;switch(n!==\"fdAT\"\u0026\u0026n!==\"IDAT\"\u0026\u0026this._writingDataChunks\u0026\u0026this.pushDataToFrame(),n){case\"acTL\":this.decodeACTL();break;case\"fcTL\":this.decodeFCTL();break;case\"fdAT\":this.decodeFDAT(e);break;default:this.decodeChunk(e,n),this.offset=o+e;break}if(this.offset-o!==e)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?T8t(this,e+4,n):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=dpo(this.readUint8());const n=this.readUint8();this._colorType=n;let o;switch(n){case qm.GREYSCALE:o=1;break;case qm.TRUECOLOUR:o=3;break;case qm.INDEXED_COLOUR:o=1;break;case qm.GREYSCALE_ALPHA:o=2;break;case qm.TRUECOLOUR_ALPHA:o=4;break;case qm.UNKNOWN:default:throw new Error(`Unknown color type: ${n}`)}if(this._png.channels=o,this._compressionMethod=this.readUint8(),this._compressionMethod!==Hce.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const n=e/3;this._hasPalette=!0;const o=[];this._palette=o;for(let i=0;i\u003cn;i++)o.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const n=e,o=this.offset+this.byteOffset;try{this._inflator.push(new Uint8Array(this.buffer,o,n),!1)}catch(i){throw new Error(\"Error while decompressing the data:\",{cause:i})}this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let n=e,o=this.offset+this.byteOffset;o+=4,n-=4;try{this._inflator.push(new Uint8Array(this.buffer,o,n),!1)}catch(i){throw new Error(\"Error while decompressing the data:\",{cause:i})}this.skip(e)}decodetRNS(e){switch(this._colorType){case qm.GREYSCALE:case qm.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2\u003ethis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let n=0;n\u003ce/2;n++)this._transparency[n]=this.readUint16();break}case qm.INDEXED_COLOUR:{if(e\u003ethis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let n=0;for(;n\u003ce;n++){const o=this.readByte();this._palette[n].push(o)}for(;n\u003cthis._palette.length;n++)this._palette[n].push(255);break}case qm.UNKNOWN:case qm.GREYSCALE_ALPHA:case qm.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const n=W8t(this),o=this.readUint8();if(o!==Hce.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${o}`);const i=this.readBytes(e-n.length-2);this._png.iccEmbeddedProfile={name:n,profile:Yho(i)}}decodepHYs(){const e=this.readUint32(),n=this.readUint32(),o=this.readByte();this._png.resolution={x:e,y:n,unit:o}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e\u003cthis._numberOfFrames;e++){const n={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},o=this._frames.at(e);if(o){if(o.data=G8t({data:o.data,width:o.width,height:o.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette\u0026\u0026(this._apng.palette=this._palette),this._hasTransparency\u0026\u0026(this._apng.transparency=this._transparency),e===0||o.xOffset===0\u0026\u0026o.yOffset===0\u0026\u0026o.width===this._png.width\u0026\u0026o.height===this._png.height)n.data=o.data;else{const i=this._apng.frames.at(e-1);this.disposeFrame(o,i,n),this.addFrameDataToCanvas(n,o)}this._apng.frames.push(n)}}return this._apng}disposeFrame(e,n,o){switch(e.disposeOp){case Oce.NONE:break;case Oce.BACKGROUND:for(let i=0;i\u003cthis._png.height;i++)for(let r=0;r\u003cthis._png.width;r++){const s=(i*e.width+r)*this._png.channels;for(let a=0;a\u003cthis._png.channels;a++)o.data[s+a]=0}break;case Oce.PREVIOUS:o.data.set(n.data);break;default:throw new Error(\"Unknown disposeOp\")}}addFrameDataToCanvas(e,n){const o=1\u003c\u003cthis._png.depth,i=(r,s)=\u003e{const a=((r+n.yOffset)*this._png.width+n.xOffset+s)*this._png.channels,A=(r*n.width+s)*this._png.channels;return{index:a,frameIndex:A}};switch(n.blendOp){case LQe.SOURCE:for(let r=0;r\u003cn.height;r++)for(let s=0;s\u003cn.width;s++){const{index:a,frameIndex:A}=i(r,s);for(let c=0;c\u003cthis._png.channels;c++)e.data[a+c]=n.data[A+c]}break;case LQe.OVER:for(let r=0;r\u003cn.height;r++)for(let s=0;s\u003cn.width;s++){const{index:a,frameIndex:A}=i(r,s);for(let c=0;c\u003cthis._png.channels;c++){const l=n.data[A+this._png.channels-1]/o,u=c%(this._png.channels-1)===0?1:n.data[A+c],g=Math.floor(l*u+(1-l)*e.data[a+c]);e.data[a+c]+=g}}break;default:throw new Error(\"Unknown blendOp\")}}decodeImage(){const e=this._inflatorResult;if(this._filterMethod!==FQe.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Kv.NO_INTERLACE)this._png.data=G8t({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Kv.ADAM7)this._png.data=epo({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette\u0026\u0026(this._png.palette=this._palette),this._hasTransparency\u0026\u0026(this._png.transparency=this._transparency)}pushDataToFrame(){this._inflator.push(new Uint8Array(0),!0);const e=this._inflatorResult,n=this._frames.at(-1);n?n.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Oce.NONE,blendOp:LQe.SOURCE,data:e}),this._inflator=new Lce((o,i)=\u003e{if(this._chunks.push(o),i){const r=this._chunks.reduce((a,A)=\u003ea+A.length,0);this._inflatorResult=new Uint8Array(r);let s=0;for(const a of this._chunks)this._inflatorResult.set(a,s),s+=a.length;this._chunks=[]}}),this._chunks=[],this._writingDataChunks=!1}}function dpo(t){if(t!==1\u0026\u0026t!==2\u0026\u0026t!==4\u0026\u0026t!==8\u0026\u0026t!==16)throw new Error(`invalid bit depth: ${t}`);return t}const hpo={level:3};class ppo extends VW{_png;_zlibOptions;_colorType;_interlaceMethod;constructor(e,n={}){super(),this._colorType=qm.UNKNOWN,this._zlibOptions={...hpo,...n.zlib},this._png=this._checkData(e),this._interlaceMethod=(n.interlace===\"Adam7\"?Kv.ADAM7:Kv.NO_INTERLACE)??Kv.NO_INTERLACE,this.setBigEndian()}encode(){if(spo(this),this.encodeIHDR(),this._png.palette\u0026\u0026(this.encodePLTE(),this._png.palette[0].length===4\u0026\u0026this.encodeTRNS()),this.encodeData(),this._png.text)for(const[e,n]of Object.entries(this._png.text))lpo(this,e,n);return this.encodeIEND(),this.toArray()}encodeIHDR(){this.writeUint32(13),this.writeChars(\"IHDR\"),this.writeUint32(this._png.width),this.writeUint32(this._png.height),this.writeByte(this._png.depth),this.writeByte(this._colorType),this.writeByte(Hce.DEFLATE),this.writeByte(FQe.ADAPTIVE),this.writeByte(this._interlaceMethod),MH(this,17)}encodeIEND(){this.writeUint32(0),this.writeChars(\"IEND\"),MH(this,4)}encodePLTE(){const e=this._png.palette?.length*3;this.writeUint32(e),this.writeChars(\"PLTE\");for(const n of this._png.palette)this.writeByte(n[0]),this.writeByte(n[1]),this.writeByte(n[2]);MH(this,4+e)}encodeTRNS(){const e=this._png.palette.filter(n=\u003en.at(-1)!==255);this.writeUint32(e.length),this.writeChars(\"tRNS\");for(const n of e)this.writeByte(n.at(-1));MH(this,4+e.length)}encodeIDAT(e){this.writeUint32(e.length),this.writeChars(\"IDAT\"),this.writeBytes(e),MH(this,e.length+4)}encodeData(){const{width:e,height:n,channels:o,depth:i,data:r}=this._png,s=i\u003c=8?Math.ceil(e*i/8)*o:Math.ceil(e*i/8*o/2),a=new VW().setBigEndian();let A=0;if(this._interlaceMethod===Kv.NO_INTERLACE)for(let u=0;u\u003cn;u++)a.writeByte(0),i===16?A=Ipo(r,a,s,A):A=_po(r,a,s,A);else this._interlaceMethod===Kv.ADAM7\u0026\u0026(A=fpo(this._png,r,a,A));const c=a.toArray(),l=w8t(c,this._zlibOptions);this.encodeIDAT(l)}_checkData(e){const{colorType:n,channels:o,depth:i}=mpo(e,e.palette),r={width:j8t(e.width,\"width\"),height:j8t(e.height,\"height\"),channels:o,data:e.data,depth:i,text:e.text,palette:e.palette};this._colorType=n;const s=i\u003c8?Math.ceil(r.width*i/8)*r.height*o:r.width*r.height*o;if(r.data.length!==s)throw new RangeError(`wrong data size. Found ${r.data.length}, expected ${s}`);return r}}function j8t(t,e){if(Number.isInteger(t)\u0026\u0026t\u003e0)return t;throw new TypeError(`${e} must be a positive integer`)}function mpo(t,e){const{channels:n=4,depth:o=8}=t;if(n!==4\u0026\u0026n!==3\u0026\u0026n!==2\u0026\u0026n!==1)throw new RangeError(`unsupported number of channels: ${n}`);const i={channels:n,depth:o,colorType:qm.UNKNOWN};switch(n){case 4:i.colorType=qm.TRUECOLOUR_ALPHA;break;case 3:i.colorType=qm.TRUECOLOUR;break;case 1:e?i.colorType=qm.INDEXED_COLOUR:i.colorType=qm.GREYSCALE;break;case 2:i.colorType=qm.GREYSCALE_ALPHA;break;default:throw new Error(\"unsupported number of channels\")}return i}function _po(t,e,n,o){for(let i=0;i\u003cn;i++)e.writeByte(t[o++]);return o}function fpo(t,e,n,o){const i=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],{width:r,height:s,channels:a,depth:A}=t;let c;A===16?c=a*A/8/2:c=a*A/8;for(let l=0;l\u003c7;l++){const u=i[l],g=Math.floor((r-u.x+u.xStep-1)/u.xStep),h=Math.floor((s-u.y+u.yStep-1)/u.yStep);if(g\u003c=0||h\u003c=0)continue;const d=g*c;for(let p=0;p\u003ch;p++){const m=u.y+p*u.yStep,_=A\u003c=8?new Uint8Array(d):new Uint16Array(d);let f=0;for(let I=0;I\u003cg;I++){const C=u.x+I*u.xStep;if(C\u003cr\u0026\u0026m\u003cs){const y=(m*r+C)*c;for(let x=0;x\u003cc;x++)_[f++]=e[y+x]}}if(n.writeByte(0),A===8)n.writeBytes(_);else if(A===16)for(const I of _)n.writeByte(I\u003e\u003e8\u0026255),n.writeByte(I\u0026255)}}return o}function Ipo(t,e,n,o){for(let i=0;i\u003cn;i++)e.writeUint16(t[o++]);return o}function Cpo(t,e){return new gpo(t,e).decode()}function ypo(t,e){return new ppo(t,e).encode()}function ca(){return ca=Object.assign?Object.assign.bind():function(t){for(var e=1;e\u003carguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)\u0026\u0026(t[o]=n[o])}return t},ca.apply(null,arguments)}function xpo(t){if(t===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}function JW(t,e){return JW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},JW(t,e)}function NN(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,JW(t,e)}function HQe(t){return HQe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HQe(t)}function Epo(t){try{return Function.toString.call(t).indexOf(\"[native code]\")!==-1}catch{return typeof t==\"function\"}}function $8t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($8t=function(){return!!t})()}function Bpo(t,e,n){if($8t())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var i=new(t.bind.apply(t,o));return n\u0026\u0026JW(i,n.prototype),i}function OQe(t){var e=typeof Map==\"function\"?new Map:void 0;return OQe=function(o){if(o===null||!Epo(o))return o;if(typeof o!=\"function\")throw new TypeError(\"Super expression must either be null or a function\");if(e!==void 0){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Bpo(o,arguments,HQe(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),JW(i,o)},OQe(t)}var bpo={env:{}},Spo={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n`,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n`,3:`Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n`,4:`Couldn't generate valid rgb string from %s, it returned %s.\n\n`,5:`Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n`,6:`Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n`,7:`Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n`,8:`Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n`,9:`Please provide a number of steps to the modularScale helper.\n\n`,10:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n`,11:`Invalid value passed as base to modularScale, expected number or em string but got \"%s\"\n\n`,12:`Expected a string ending in \"px\" or a number passed as the first argument to %s(), got \"%s\" instead.\n\n`,13:`Expected a string ending in \"px\" or a number passed as the second argument to %s(), got \"%s\" instead.\n\n`,14:`Passed invalid pixel value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n`,15:`Passed invalid base value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n`,16:`You must provide a template to this method.\n\n`,17:`You passed an unsupported selector state to this method.\n\n`,18:`minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n`,19:`fromSize and toSize must be provided as stringified numbers with the same units.\n\n`,20:`expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n`,21:\"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",22:\"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",23:`fontFace expects a name of a font-family.\n\n`,24:`fontFace expects either the path to the font file(s) or a name of a local copy.\n\n`,25:`fontFace expects localFonts to be an array.\n\n`,26:`fontFace expects fileFormats to be an array.\n\n`,27:`radialGradient requries at least 2 color-stops to properly render.\n\n`,28:`Please supply a filename to retinaImage() as the first argument.\n\n`,29:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n`,30:\"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",31:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n`,32:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n`,33:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n`,34:`borderRadius expects a radius value as a string or number as the second argument.\n\n`,35:`borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n`,36:`Property must be a string value.\n\n`,37:`Syntax Error at %s.\n\n`,38:`Formula contains a function that needs parentheses at %s.\n\n`,39:`Formula is missing closing parenthesis at %s.\n\n`,40:`Formula has too many closing parentheses at %s.\n\n`,41:`All values in a formula must have the same unit or be unitless.\n\n`,42:`Please provide a number of steps to the modularScale helper.\n\n`,43:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n`,44:`Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n`,45:`Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n`,46:`Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n`,47:`minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n`,48:`fromSize and toSize must be provided as stringified numbers with the same units.\n\n`,49:`Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n`,50:`Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n`,51:`Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n`,52:`fontFace expects either the path to the font file(s) or a name of a local copy.\n\n`,53:`fontFace expects localFonts to be an array.\n\n`,54:`fontFace expects fileFormats to be an array.\n\n`,55:`fontFace expects a name of a font-family.\n\n`,56:`linearGradient requries at least 2 color-stops to properly render.\n\n`,57:`radialGradient requries at least 2 color-stops to properly render.\n\n`,58:`Please supply a filename to retinaImage() as the first argument.\n\n`,59:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n`,60:\"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",61:`Property must be a string value.\n\n`,62:`borderRadius expects a radius value as a string or number as the second argument.\n\n`,63:`borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n`,64:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n`,65:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n`,66:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n`,67:`You must provide a template to this method.\n\n`,68:`You passed an unsupported selector state to this method.\n\n`,69:`Expected a string ending in \"px\" or a number passed as the first argument to %s(), got %s instead.\n\n`,70:`Expected a string ending in \"px\" or a number passed as the second argument to %s(), got %s instead.\n\n`,71:`Passed invalid pixel value %s to %s(), please pass a value like \"12px\" or 12.\n\n`,72:`Passed invalid base value %s to %s(), please pass a value like \"12px\" or 12.\n\n`,73:`Please provide a valid CSS variable.\n\n`,74:`CSS variable not found and no default was provided.\n\n`,75:`important requires a valid style object, got a %s instead.\n\n`,76:`fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n`,77:`remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n`,78:`base must be set in \"px\" or \"%\" but you set it in \"%s\".\n`};function Qpo(){for(var t=arguments.length,e=new Array(t),n=0;n\u003ct;n++)e[n]=arguments[n];var o=e[0],i=[],r;for(r=1;r\u003ce.length;r+=1)i.push(e[r]);return i.forEach(function(s){o=o.replace(/%[a-z]/,s)}),o}var k7=(function(t){NN(e,t);function e(n){var o;if(bpo.env.NODE_ENV===\"production\")o=t.call(this,\"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\"+n+\" for more information.\")||this;else{for(var i=arguments.length,r=new Array(i\u003e1?i-1:0),s=1;s\u003ci;s++)r[s-1]=arguments[s];o=t.call(this,Qpo.apply(void 0,[Spo[n]].concat(r)))||this}return xpo(o)}return e})(OQe(Error));function GQe(t){return Math.round(t*255)}function vpo(t,e,n){return GQe(t)+\",\"+GQe(e)+\",\"+GQe(n)}function Gce(t,e,n,o){if(o===void 0\u0026\u0026(o=vpo),e===0)return o(n,n,n);var i=(t%360+360)%360/60,r=(1-Math.abs(2*n-1))*e,s=r*(1-Math.abs(i%2-1)),a=0,A=0,c=0;i\u003e=0\u0026\u0026i\u003c1?(a=r,A=s):i\u003e=1\u0026\u0026i\u003c2?(a=s,A=r):i\u003e=2\u0026\u0026i\u003c3?(A=r,c=s):i\u003e=3\u0026\u0026i\u003c4?(A=s,c=r):i\u003e=4\u0026\u0026i\u003c5?(a=s,c=r):i\u003e=5\u0026\u0026i\u003c6\u0026\u0026(a=r,c=s);var l=n-r/2,u=a+l,g=A+l,h=c+l;return o(u,g,h)}var q8t={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"00ffff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000\",blanchedalmond:\"ffebcd\",blue:\"0000ff\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"00ffff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkgrey:\"a9a9a9\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkslategrey:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dimgrey:\"696969\",dodgerblue:\"1e90ff\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"ff00ff\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",grey:\"808080\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgray:\"d3d3d3\",lightgreen:\"90ee90\",lightgrey:\"d3d3d3\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslategray:\"789\",lightslategrey:\"789\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"0f0\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"f0f\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370db\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"db7093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",rebeccapurple:\"639\",red:\"f00\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",slategrey:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",wheat:\"f5deb3\",white:\"fff\",whitesmoke:\"f5f5f5\",yellow:\"ff0\",yellowgreen:\"9acd32\"};function wpo(t){if(typeof t!=\"string\")return t;var e=t.toLowerCase();return q8t[e]?\"#\"+q8t[e]:t}var Ppo=/^#[a-fA-F0-9]{6}$/,Mpo=/^#[a-fA-F0-9]{8}$/,Dpo=/^#[a-fA-F0-9]{3}$/,Npo=/^#[a-fA-F0-9]{4}$/,YQe=/^rgb\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*\\)$/i,Rpo=/^rgb(?:a)?\\(\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,)?\\s*(\\d{1,3})\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i,Tpo=/^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i,kpo=/^hsl(?:a)?\\(\\s*(\\d{0,3}[.]?[0-9]+(?:deg)?)\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,)?\\s*(\\d{1,3}[.]?[0-9]?)%\\s*(?:,|\\/)\\s*([-+]?\\d*[.]?\\d+[%]?)\\s*\\)$/i;function WW(t){if(typeof t!=\"string\")throw new k7(3);var e=wpo(t);if(e.match(Ppo))return{red:parseInt(\"\"+e[1]+e[2],16),green:parseInt(\"\"+e[3]+e[4],16),blue:parseInt(\"\"+e[5]+e[6],16)};if(e.match(Mpo)){var n=parseFloat((parseInt(\"\"+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(\"\"+e[1]+e[2],16),green:parseInt(\"\"+e[3]+e[4],16),blue:parseInt(\"\"+e[5]+e[6],16),alpha:n}}if(e.match(Dpo))return{red:parseInt(\"\"+e[1]+e[1],16),green:parseInt(\"\"+e[2]+e[2],16),blue:parseInt(\"\"+e[3]+e[3],16)};if(e.match(Npo)){var o=parseFloat((parseInt(\"\"+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(\"\"+e[1]+e[1],16),green:parseInt(\"\"+e[2]+e[2],16),blue:parseInt(\"\"+e[3]+e[3],16),alpha:o}}var i=YQe.exec(e);if(i)return{red:parseInt(\"\"+i[1],10),green:parseInt(\"\"+i[2],10),blue:parseInt(\"\"+i[3],10)};var r=Rpo.exec(e.substring(0,50));if(r)return{red:parseInt(\"\"+r[1],10),green:parseInt(\"\"+r[2],10),blue:parseInt(\"\"+r[3],10),alpha:parseFloat(\"\"+r[4])\u003e1?parseFloat(\"\"+r[4])/100:parseFloat(\"\"+r[4])};var s=Tpo.exec(e);if(s){var a=parseInt(\"\"+s[1],10),A=parseInt(\"\"+s[2],10)/100,c=parseInt(\"\"+s[3],10)/100,l=\"rgb(\"+Gce(a,A,c)+\")\",u=YQe.exec(l);if(!u)throw new k7(4,e,l);return{red:parseInt(\"\"+u[1],10),green:parseInt(\"\"+u[2],10),blue:parseInt(\"\"+u[3],10)}}var g=kpo.exec(e.substring(0,50));if(g){var h=parseInt(\"\"+g[1],10),d=parseInt(\"\"+g[2],10)/100,p=parseInt(\"\"+g[3],10)/100,m=\"rgb(\"+Gce(h,d,p)+\")\",_=YQe.exec(m);if(!_)throw new k7(4,e,m);return{red:parseInt(\"\"+_[1],10),green:parseInt(\"\"+_[2],10),blue:parseInt(\"\"+_[3],10),alpha:parseFloat(\"\"+g[4])\u003e1?parseFloat(\"\"+g[4])/100:parseFloat(\"\"+g[4])}}throw new k7(5)}function Fpo(t){var e=t.red/255,n=t.green/255,o=t.blue/255,i=Math.max(e,n,o),r=Math.min(e,n,o),s=(i+r)/2;if(i===r)return t.alpha!==void 0?{hue:0,saturation:0,lightness:s,alpha:t.alpha}:{hue:0,saturation:0,lightness:s};var a,A=i-r,c=s\u003e.5?A/(2-i-r):A/(i+r);switch(i){case e:a=(n-o)/A+(n\u003co?6:0);break;case n:a=(o-e)/A+2;break;default:a=(e-n)/A+4;break}return a*=60,t.alpha!==void 0?{hue:a,saturation:c,lightness:s,alpha:t.alpha}:{hue:a,saturation:c,lightness:s}}function Vv(t){return Fpo(WW(t))}var Lpo=function(e){return e.length===7\u0026\u0026e[1]===e[2]\u0026\u0026e[3]===e[4]\u0026\u0026e[5]===e[6]?\"#\"+e[1]+e[3]+e[5]:e},UQe=Lpo;function RN(t){var e=t.toString(16);return e.length===1?\"0\"+e:e}function KQe(t){return RN(Math.round(t*255))}function Hpo(t,e,n){return UQe(\"#\"+KQe(t)+KQe(e)+KQe(n))}function X8t(t,e,n){return Gce(t,e,n,Hpo)}function Opo(t,e,n){if(typeof t==\"object\"\u0026\u0026e===void 0\u0026\u0026n===void 0)return X8t(t.hue,t.saturation,t.lightness);throw new k7(1)}function Gpo(t,e,n,o){if(typeof t==\"object\"\u0026\u0026e===void 0\u0026\u0026n===void 0\u0026\u0026o===void 0)return t.alpha\u003e=1?X8t(t.hue,t.saturation,t.lightness):\"rgba(\"+Gce(t.hue,t.saturation,t.lightness)+\",\"+t.alpha+\")\";throw new k7(2)}function Z8t(t,e,n){if(typeof t==\"number\"\u0026\u0026typeof e==\"number\"\u0026\u0026typeof n==\"number\")return UQe(\"#\"+RN(t)+RN(e)+RN(n));if(typeof t==\"object\"\u0026\u0026e===void 0\u0026\u0026n===void 0)return UQe(\"#\"+RN(t.red)+RN(t.green)+RN(t.blue));throw new k7(6)}function Yce(t,e,n,o){if(typeof t==\"object\"\u0026\u0026e===void 0\u0026\u0026n===void 0\u0026\u0026o===void 0)return t.alpha\u003e=1?Z8t(t.red,t.green,t.blue):\"rgba(\"+t.red+\",\"+t.green+\",\"+t.blue+\",\"+t.alpha+\")\";throw new k7(7)}var Ypo=function(e){return typeof e.red==\"number\"\u0026\u0026typeof e.green==\"number\"\u0026\u0026typeof e.blue==\"number\"\u0026\u0026(typeof e.alpha!=\"number\"||typeof e.alpha\u003e\"u\")},Upo=function(e){return typeof e.red==\"number\"\u0026\u0026typeof e.green==\"number\"\u0026\u0026typeof e.blue==\"number\"\u0026\u0026typeof e.alpha==\"number\"},Kpo=function(e){return typeof e.hue==\"number\"\u0026\u0026typeof e.saturation==\"number\"\u0026\u0026typeof e.lightness==\"number\"\u0026\u0026(typeof e.alpha!=\"number\"||typeof e.alpha\u003e\"u\")},Vpo=function(e){return typeof e.hue==\"number\"\u0026\u0026typeof e.saturation==\"number\"\u0026\u0026typeof e.lightness==\"number\"\u0026\u0026typeof e.alpha==\"number\"};function zv(t){if(typeof t!=\"object\")throw new k7(8);if(Upo(t))return Yce(t);if(Ypo(t))return Z8t(t);if(Vpo(t))return Gpo(t);if(Kpo(t))return Opo(t);throw new k7(8)}function ebt(t,e,n){return function(){var i=n.concat(Array.prototype.slice.call(arguments));return i.length\u003e=e?t.apply(this,i):ebt(t,e,i)}}function eE(t){return ebt(t,t.length,[])}function zpo(t,e){if(e===\"transparent\")return e;var n=Vv(e);return zv(ca({},n,{hue:n.hue+parseFloat(t)}))}eE(zpo);function DH(t,e,n){return Math.max(t,Math.min(e,n))}function Jpo(t,e){if(e===\"transparent\")return e;var n=Vv(e);return zv(ca({},n,{lightness:DH(0,1,n.lightness-parseFloat(t))}))}eE(Jpo);function Wpo(t,e){if(e===\"transparent\")return e;var n=Vv(e);return zv(ca({},n,{saturation:DH(0,1,n.saturation-parseFloat(t))}))}eE(Wpo);function jpo(t,e){if(e===\"transparent\")return e;var n=Vv(e);return zv(ca({},n,{lightness:DH(0,1,n.lightness+parseFloat(t))}))}var $po=eE(jpo),qpo=$po;function Xpo(t,e,n){if(e===\"transparent\")return n;if(n===\"transparent\")return e;if(t===0)return n;var o=WW(e),i=ca({},o,{alpha:typeof o.alpha==\"number\"?o.alpha:1}),r=WW(n),s=ca({},r,{alpha:typeof r.alpha==\"number\"?r.alpha:1}),a=i.alpha-s.alpha,A=parseFloat(t)*2-1,c=A*a===-1?A:A+a,l=1+A*a,u=(c/l+1)/2,g=1-u,h={red:Math.floor(i.red*u+s.red*g),green:Math.floor(i.green*u+s.green*g),blue:Math.floor(i.blue*u+s.blue*g),alpha:i.alpha*parseFloat(t)+s.alpha*(1-parseFloat(t))};return Yce(h)}var Zpo=eE(Xpo),tbt=Zpo;function emo(t,e){if(e===\"transparent\")return e;var n=WW(e),o=typeof n.alpha==\"number\"?n.alpha:1,i=ca({},n,{alpha:DH(0,1,(o*100+parseFloat(t)*100)/100)});return Yce(i)}eE(emo);function tmo(t,e){if(e===\"transparent\")return e;var n=Vv(e);return zv(ca({},n,{saturation:DH(0,1,n.saturation+parseFloat(t))}))}eE(tmo);function nmo(t,e){return e===\"transparent\"?e:zv(ca({},Vv(e),{hue:parseFloat(t)}))}eE(nmo);function omo(t,e){return e===\"transparent\"?e:zv(ca({},Vv(e),{lightness:parseFloat(t)}))}eE(omo);function imo(t,e){return e===\"transparent\"?e:zv(ca({},Vv(e),{saturation:parseFloat(t)}))}eE(imo);function rmo(t,e){return e===\"transparent\"?e:tbt(parseFloat(t),\"rgb(0, 0, 0)\",e)}eE(rmo);function smo(t,e){return e===\"transparent\"?e:tbt(parseFloat(t),\"rgb(255, 255, 255)\",e)}eE(smo);function amo(t,e){if(e===\"transparent\")return e;var n=WW(e),o=typeof n.alpha==\"number\"?n.alpha:1,i=ca({},n,{alpha:DH(0,1,+(o*100-parseFloat(t)*100).toFixed(2)/100)});return Yce(i)}eE(amo);var Jv=1e-9,Uce=(t,e,n)=\u003et\u003e=e-Jv\u0026\u0026t\u003c=n+Jv,Amo=t=\u003e{const e=[];for(const n of t)e.some(o=\u003eMath.abs(o.x-n.x)\u003cJv\u0026\u0026Math.abs(o.y-n.y)\u003cJv)||e.push(n);return e};function nbt(t,e){const{origin:n,directionVector:o}=t;if(Math.abs(o.x)\u003cJv\u0026\u0026Math.abs(o.y)\u003cJv)return null;const i=[];if(Math.abs(o.x)\u003e=Jv){const c=(e.minX-n.x)/o.x,l=n.y+c*o.y;Uce(l,e.minY,e.maxY)\u0026\u0026i.push({x:e.minX,y:l});const u=(e.maxX-n.x)/o.x,g=n.y+u*o.y;Uce(g,e.minY,e.maxY)\u0026\u0026i.push({x:e.maxX,y:g})}if(Math.abs(o.y)\u003e=Jv){const c=(e.minY-n.y)/o.y,l=n.x+c*o.x;Uce(l,e.minX,e.maxX)\u0026\u0026i.push({x:l,y:e.minY});const u=(e.maxY-n.y)/o.y,g=n.x+u*o.x;Uce(g,e.minX,e.maxX)\u0026\u0026i.push({x:g,y:e.maxY})}const r=Amo(i);if(r.length\u003c2)return null;let s=r[0],a=r[1],A=(s.x-a.x)**2+(s.y-a.y)**2;for(let c=0;c\u003cr.length;c++)for(let l=c+1;l\u003cr.length;l++){const u=r[c],g=r[l],h=(u.x-g.x)**2+(u.y-g.y)**2;h\u003eA\u0026\u0026(s=u,a=g,A=h)}return[s,a]}function obt(t,e,n){const o=bV(t),i=[Bn(o,{x:0,y:0}),Bn(o,{x:e,y:0}),Bn(o,{x:0,y:n}),Bn(o,{x:e,y:n})];return{minX:Math.min(...i.map(r=\u003er.x)),maxX:Math.max(...i.map(r=\u003er.x)),minY:Math.min(...i.map(r=\u003er.y)),maxY:Math.max(...i.map(r=\u003er.y))}}var cmo=.6,lmo=1,ibt=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),rbt=t=\u003e(t.ccwRotationDegrees??0)*Math.PI/180,umo=t=\u003et.a*t.d-t.b*t.c\u003c0?1:-1,gmo=(t,e)=\u003erbt(t)*umo(e),dmo=(t,e)=\u003e{const n=Math.cos(e),o=Math.sin(e);return{x:t.x*n-t.y*o,y:t.x*o+t.y*n}},sbt=t=\u003eAbt(t,rbt(t)),abt=(t,e)=\u003eAbt(t,gmo(t,e)),Abt=(t,e)=\u003e{const n=t.width/2,o=t.height/2;return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(i=\u003e{const r=dmo(i,e);return{x:t.center.x+r.x,y:t.center.y+r.y}})},hmo=t=\u003esbt(t).reduce((n,o)=\u003e({minX:Math.min(n.minX,o.x),maxX:Math.max(n.maxX,o.x),minY:Math.min(n.minY,o.y),maxY:Math.max(n.maxY,o.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0}),VQe=(t,e)=\u003e{const n=abt(t,e).map(c=\u003eBn(e,c)),o=Bn(e,t.center),i=ibt(n[0],n[1]),r=ibt(n[1],n[2]),s=n.length\u003e=2?Math.atan2(n[1].y-n[0].y,n[1].x-n[0].x):0,a=s*180/Math.PI,A=n.reduce((c,l)=\u003e({minX:Math.min(c.minX,l.x),maxX:Math.max(c.maxX,l.x),minY:Math.min(c.minY,l.y),maxY:Math.max(c.maxY,l.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0});return{center:o,corners:n,width:i,height:r,angleRadians:s,angleDegrees:a,bounds:A}},pmo=2,mmo=12,_mo=12,Kce=t=\u003e({tip:{...t},base:{...t},leftWing:{...t},rightWing:{...t}}),cbt=(t,e,n)=\u003e{const o=t.x-e.x,i=t.y-e.y,r=Math.hypot(o,i);if(r===0)return Kce(t);const s=o/r,A=-(i/r)*(n/2),c=s*(n/2);return{tip:{...t},base:{...e},leftWing:{x:e.x+A,y:e.y+c},rightWing:{x:e.x-A,y:e.y-c}}};function jW(t){const{start:e,end:n}=t,o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i),s=pmo,a=mmo;if(r===0){const f=t.doubleSided?[Kce(e),Kce(e)]:[Kce(e)];return{shaftStart:{...e},shaftEnd:{...e},heads:f,shaftWidth:s,headLength:0,headWidth:a,length:r}}const A=o/r,c=i/r,l=Math.min(_mo,r*.5),u=Math.max(l,s*2),g=t.doubleSided?r/2:r,h=Math.min(u,g),d={x:n.x-A*h,y:n.y-c*h},p=[cbt(n,d,a)];let m={...e};const _={...d};if(t.doubleSided){const f={x:e.x+A*h,y:e.y+c*h};p.unshift(cbt(e,f,a)),m=f}return{shaftStart:m,shaftEnd:_,heads:p,shaftWidth:s,headLength:h,headWidth:a,length:r}}function lbt(t){const e=jW(t);return[e.shaftStart,e.shaftEnd,...e.heads.flatMap(o=\u003e[o.tip,o.base,o.leftWing,o.rightWing])].reduce((o,i)=\u003e({minX:Math.min(o.minX,i.x),maxX:Math.max(o.maxX,i.x),minY:Math.min(o.minY,i.y),maxY:Math.max(o.maxY,i.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function Vce(t,e,{fontSize:n=12,strokeWidth:o=2,normalPadding:i=6,alongOffset:r=0}={}){const s={x:(t.x+e.x)/2,y:(t.y+e.y)/2},a=e.x-t.x,A=e.y-t.y,c=Math.hypot(a,A);if(c===0)return{x:s.x+r,y:s.y-(o/2+n*.65+i),angleRadians:0,angleDegrees:0,direction:{x:1,y:0},normal:{x:0,y:-1}};let l=a/c,u=A/c,g=-u,h=l;(l\u003c0||l===0\u0026\u0026u\u003c0)\u0026\u0026(l=-l,u=-u,g=-g,h=-h);const p=Math.atan2(u,l),m=o/2+n*.65+i;return{x:s.x+g*m+l*r,y:s.y+h*m+u*r,angleRadians:p,angleDegrees:p*180/Math.PI,direction:{x:l,y:u},normal:{x:g,y:h}}}var rh=[\"rgba(239, 68, 68, 0.8)\",\"rgba(249, 115, 22, 0.8)\",\"rgba(245, 158, 11, 0.8)\",\"rgba(234, 179, 8, 0.8)\",\"rgba(132, 204, 22, 0.8)\",\"rgba(34, 197, 94, 0.8)\",\"rgba(16, 185, 129, 0.8)\",\"rgba(20, 184, 166, 0.8)\",\"rgba(6, 182, 212, 0.8)\",\"rgba(14, 165, 233, 0.8)\",\"rgba(59, 130, 246, 0.8)\",\"rgba(99, 102, 241, 0.8)\",\"rgba(139, 92, 246, 0.8)\",\"rgba(168, 85, 247, 0.8)\",\"rgba(217, 70, 239, 0.8)\",\"rgba(236, 72, 153, 0.8)\",\"rgba(249, 168, 212, 0.8)\",\"rgba(161, 161, 170, 0.8)\"];function ubt(t,e,n,o={}){const i=o.padding??40,r=o.yFlip??!1;let s;if(\"center\"in t){const l=t.width/2,u=t.height/2;s={minX:t.center.x-l,maxX:t.center.x+l,minY:t.center.y-u,maxY:t.center.y+u}}else s=t;const a=s.maxX-s.minX||1,A=s.maxY-s.minY||1,c=Math.min((e-2*i)/a,(n-2*i)/A);return Ad(pA(e/2,n/2),dC(c,r?-c:c),pA(-(s.minX+a/2),-(s.minY+A/2)))}function V5(t){const e=[...t.points||[],...(t.lines||[]).flatMap(n=\u003en.points),...(t.polygons||[]).flatMap(n=\u003en.points),...(t.rects||[]).flatMap(n=\u003esbt(n)),...(t.circles||[]).flatMap(n=\u003e[{x:n.center.x-n.radius,y:n.center.y},{x:n.center.x+n.radius,y:n.center.y},{x:n.center.x,y:n.center.y-n.radius},{x:n.center.x,y:n.center.y+n.radius}]),...(t.arrows||[]).flatMap(n=\u003e{const o=lbt(n);return[{x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY}]}),...(t.texts||[]).flatMap(n=\u003e{const o=n.fontSize??12,i=n.text.length*o*cmo,r=o*lmo,s=n.anchorSide??\"center\",a={top_left:{dx:0,dy:0},top_center:{dx:-i/2,dy:0},top_right:{dx:-i,dy:0},center_left:{dx:0,dy:-r/2},center:{dx:-i/2,dy:-r/2},center_right:{dx:-i,dy:-r/2},bottom_left:{dx:0,dy:-r},bottom_center:{dx:-i/2,dy:-r},bottom_right:{dx:-i,dy:-r}},{dx:A,dy:c}=a[s],l=n.x+A,u=n.y+c;return[{x:l,y:u},{x:l+i,y:u+r}]})];return e.length===0?{minX:-1,maxX:1,minY:-1,maxY:1}:e.reduce((n,o)=\u003e({minX:Math.min(n.minX,o.x),maxX:Math.max(n.maxX,o.x),minY:Math.min(n.minY,o.y),maxY:Math.max(n.maxY,o.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function fmo(t,e,n={}){const o=n.disableLabels!==!1,i=n.hideInlineLabels??o,r=e instanceof HTMLCanvasElement?e.getContext(\"2d\"):e;if(!r)throw new Error(\"Could not get 2D context from canvas\");const s=e instanceof HTMLCanvasElement?e.width:e.canvas.width,a=e instanceof HTMLCanvasElement?e.height:e.canvas.height;let A;if(n.transform)A=n.transform;else if(n.viewbox)A=ubt(n.viewbox,s,a,{padding:n.padding,yFlip:n.yFlip});else{const c=V5(t),l=t.coordinateSystem===\"cartesian\";A=ubt(c,s,a,{padding:n.padding??40,yFlip:l})}if(r.clearRect(0,0,s,a),r.save(),t.rects\u0026\u0026t.rects.length\u003e0\u0026\u0026t.rects.forEach(c=\u003e{const l=VQe(c,A);r.save(),r.translate(l.center.x,l.center.y),Math.abs(l.angleRadians)\u003e1e-6\u0026\u0026r.rotate(l.angleRadians),r.beginPath(),r.rect(-l.width/2,-l.height/2,l.width,l.height),c.fill\u0026\u0026(r.fillStyle=c.fill,r.fill()),c.stroke\u0026\u0026(r.strokeStyle=c.stroke,r.stroke()),r.restore()}),t.circles\u0026\u0026t.circles.length\u003e0\u0026\u0026t.circles.forEach(c=\u003e{const l=Bn(A,c.center),u=c.radius*Math.abs(A.a);r.beginPath(),r.arc(l.x,l.y,u,0,2*Math.PI),c.fill\u0026\u0026(r.fillStyle=c.fill,r.fill()),c.stroke\u0026\u0026(r.strokeStyle=c.stroke??\"transparent\",r.stroke())}),t.polygons\u0026\u0026t.polygons.length\u003e0\u0026\u0026t.polygons.forEach(c=\u003e{if(c.points.length===0)return;const l=c.points.map(u=\u003eBn(A,u));r.beginPath(),r.moveTo(l[0].x,l[0].y);for(let u=1;u\u003cl.length;u++)r.lineTo(l[u].x,l[u].y);r.closePath(),c.fill\u0026\u0026(r.fillStyle=c.fill,r.fill()),c.stroke\u0026\u0026(r.strokeStyle=c.stroke,c.strokeWidth!==void 0\u0026\u0026(r.lineWidth=c.strokeWidth*Math.abs(A.a)),r.stroke())}),t.arrows\u0026\u0026t.arrows.length\u003e0\u0026\u0026t.arrows.forEach((c,l)=\u003e{const u=jW(c),g=Bn(A,u.shaftStart),h=Bn(A,u.shaftEnd),d=c.color||rh[l%rh.length],p=Math.hypot(A.a,A.b);r.strokeStyle=d,r.fillStyle=d,r.lineWidth=u.shaftWidth*(p||1),r.lineCap=\"round\",r.setLineDash([]),r.beginPath(),r.moveTo(g.x,g.y),r.lineTo(h.x,h.y),r.stroke(),u.heads.forEach(y=\u003e{const x=Bn(A,y.tip),E=Bn(A,y.leftWing),B=Bn(A,y.rightWing);r.beginPath(),r.moveTo(x.x,x.y),r.lineTo(E.x,E.y),r.lineTo(B.x,B.y),r.closePath(),r.fill()});const m=12,_=u.shaftWidth*(p||1),f=m*.6,I=Vce(g,h,{fontSize:m,strokeWidth:_,normalPadding:6,alongOffset:c.label?f:0}),C=Vce(g,h,{fontSize:m,strokeWidth:_,normalPadding:12,alongOffset:c.inlineLabel?-f:0});if(r.fillStyle=d,r.font=`${m}px sans-serif`,!o\u0026\u0026c.label){const y=C.x,x=C.y;r.save(),r.textAlign=\"center\",r.textBaseline=\"middle\",r.fillText(c.label,y,x),r.restore()}!i\u0026\u0026c.inlineLabel\u0026\u0026(r.save(),r.translate(I.x,I.y),r.rotate(I.angleRadians),r.textAlign=\"center\",r.textBaseline=\"middle\",r.fillText(c.inlineLabel,0,0),r.restore())}),t.lines\u0026\u0026t.lines.length\u003e0\u0026\u0026t.lines.map((c,l)=\u003e({line:c,originalIndex:l})).sort((c,l)=\u003e(c.line.zIndex??0)-(l.line.zIndex??0)||c.originalIndex-l.originalIndex).forEach(({line:c,originalIndex:l})=\u003e{if(c.points.length===0)return;r.beginPath();const u=Bn(A,c.points[0]);r.moveTo(u.x,u.y);for(let g=1;g\u003cc.points.length;g++){const h=Bn(A,c.points[g]);r.lineTo(h.x,h.y)}if(r.strokeStyle=c.strokeColor||rh[l%rh.length],c.strokeWidth?r.lineWidth=c.strokeWidth*A.a:r.lineWidth=2,r.lineCap=\"round\",c.strokeDash)if(typeof c.strokeDash==\"string\"){let g;if(c.strokeDash.includes(\",\"))g=c.strokeDash.split(\",\").map(h=\u003eparseFloat(h.trim())).filter(h=\u003e!Number.isNaN(h));else{const h=parseFloat(c.strokeDash.trim());g=Number.isNaN(h)?[]:[h]}r.setLineDash(g)}else r.setLineDash(c.strokeDash.map(g=\u003eg*Math.abs(A.a)));else r.setLineDash([]);r.stroke()}),t.infiniteLines\u0026\u0026t.infiniteLines.length\u003e0){const c=obt(A,s,a);t.infiniteLines.forEach((l,u)=\u003e{const g=nbt(l,c);if(!g)return;const[h,d]=g,p=Bn(A,h),m=Bn(A,d);if(r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(m.x,m.y),r.strokeStyle=l.strokeColor||rh[u%rh.length],r.lineWidth=l.strokeWidth?l.strokeWidth*Math.abs(A.a):2,r.lineCap=\"round\",l.strokeDash)if(typeof l.strokeDash==\"string\"){let _;if(l.strokeDash.includes(\",\"))_=l.strokeDash.split(\",\").map(f=\u003eparseFloat(f.trim())).filter(f=\u003e!Number.isNaN(f));else{const f=parseFloat(l.strokeDash.trim());_=Number.isNaN(f)?[]:[f]}r.setLineDash(_)}else r.setLineDash(l.strokeDash.map(_=\u003e_*Math.abs(A.a)));else r.setLineDash([]);r.stroke()})}t.texts\u0026\u0026t.texts.length\u003e0\u0026\u0026t.texts.forEach(c=\u003e{const l=Bn(A,{x:c.x,y:c.y});r.fillStyle=c.color||\"black\",r.font=`${(c.fontSize??12)*Math.abs(A.a)}px sans-serif`;const u=c.anchorSide??\"center\",g={top_left:\"left\",center_left:\"left\",bottom_left:\"left\",top_center:\"center\",center:\"center\",bottom_center:\"center\",top_right:\"right\",center_right:\"right\",bottom_right:\"right\"},h={top_left:\"top\",top_center:\"top\",top_right:\"top\",center_left:\"middle\",center:\"middle\",center_right:\"middle\",bottom_left:\"bottom\",bottom_center:\"bottom\",bottom_right:\"bottom\"};r.textAlign=g[u],r.textBaseline=h[u],r.fillText(c.text,l.x,l.y)}),t.points\u0026\u0026t.points.length\u003e0\u0026\u0026t.points.forEach((c,l)=\u003e{const u=Bn(A,c);r.beginPath(),r.arc(u.x,u.y,3,0,2*Math.PI),r.fillStyle=c.color||rh[l%rh.length],r.fill(),c.label\u0026\u0026!o\u0026\u0026(r.fillStyle=c.color||\"black\",r.font=\"12px sans-serif\",r.fillText(c.label,u.x+5,u.y-5))}),r.restore()}var zQe,gbt;function Imo(){if(gbt)return zQe;gbt=1,zQe=function(n){return n!=null\u0026\u0026(t(n)||e(n)||!!n._isBuffer)};function t(n){return!!n.constructor\u0026\u0026typeof n.constructor.isBuffer==\"function\"\u0026\u0026n.constructor.isBuffer(n)}function e(n){return typeof n.readFloatLE==\"function\"\u0026\u0026typeof n.slice==\"function\"\u0026\u0026t(n.slice(0,0))}return zQe}var JQe,dbt;function Cmo(){if(dbt)return JQe;dbt=1;var t=Imo(),e=Object.prototype.toString;return JQe=function(o){if(typeof o\u003e\"u\")return\"undefined\";if(o===null)return\"null\";if(o===!0||o===!1||o instanceof Boolean)return\"boolean\";if(typeof o==\"string\"||o instanceof String)return\"string\";if(typeof o==\"number\"||o instanceof Number)return\"number\";if(typeof o==\"function\"||o instanceof Function)return\"function\";if(typeof Array.isArray\u003c\"u\"\u0026\u0026Array.isArray(o))return\"array\";if(o instanceof RegExp)return\"regexp\";if(o instanceof Date)return\"date\";var i=e.call(o);return i===\"[object RegExp]\"?\"regexp\":i===\"[object Date]\"?\"date\":i===\"[object Arguments]\"?\"arguments\":i===\"[object Error]\"?\"error\":t(o)?\"buffer\":i===\"[object Set]\"?\"set\":i===\"[object WeakSet]\"?\"weakset\":i===\"[object Map]\"?\"map\":i===\"[object WeakMap]\"?\"weakmap\":i===\"[object Symbol]\"?\"symbol\":i===\"[object Int8Array]\"?\"int8array\":i===\"[object Uint8Array]\"?\"uint8array\":i===\"[object Uint8ClampedArray]\"?\"uint8clampedarray\":i===\"[object Int16Array]\"?\"int16array\":i===\"[object Uint16Array]\"?\"uint16array\":i===\"[object Int32Array]\"?\"int32array\":i===\"[object Uint32Array]\"?\"uint32array\":i===\"[object Float32Array]\"?\"float32array\":i===\"[object Float64Array]\"?\"float64array\":\"object\"},JQe}var WQe={exports:{}},hbt;function ymo(){return hbt||(hbt=1,(function(t){(function(){function e(n,o){if(typeof o!=\"function\")return n;var i={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)\u0026\u0026(i[o(r,n[r])||r]=n[r]);return i}t.exports?t.exports=e:window.rename=e})()})(WQe)),WQe.exports}var jQe,pbt;function xmo(){if(pbt)return jQe;pbt=1;var t=Cmo(),e=ymo();return jQe=function n(o,i){var r=t(o);if(r!==\"object\"\u0026\u0026r!==\"array\")throw new Error(\"expected an object\");var s=[];r===\"object\"\u0026\u0026(o=e(o,i),s={});for(var a in o)if(o.hasOwnProperty(a)){var A=o[a];t(A)===\"object\"||t(A)===\"array\"?s[a]=n(A,i):s[a]=A}return s},jQe}var Emo=xmo();const Bmo=_y(Emo);var $Qe={exports:{}},mbt;function _bt(){return mbt||(mbt=1,(function(t){var e=Object.prototype.hasOwnProperty,n=\"~\";function o(){}Object.create\u0026\u0026(o.prototype=Object.create(null),new o().__proto__||(n=!1));function i(s,a,A){this.fn=s,this.context=a,this.once=A||!1}function r(){this._events=new o,this._eventsCount=0}r.prototype.eventNames=function(){var a=[],A,c;if(this._eventsCount===0)return a;for(c in A=this._events)e.call(A,c)\u0026\u0026a.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(A)):a},r.prototype.listeners=function(a,A){var c=n?n+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u\u003cg;u++)h[u]=l[u].fn;return h},r.prototype.emit=function(a,A,c,l,u,g){var h=n?n+a:a;if(!this._events[h])return!1;var d=this._events[h],p=arguments.length,m,_;if(d.fn){switch(d.once\u0026\u0026this.removeListener(a,d.fn,void 0,!0),p){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,A),!0;case 3:return d.fn.call(d.context,A,c),!0;case 4:return d.fn.call(d.context,A,c,l),!0;case 5:return d.fn.call(d.context,A,c,l,u),!0;case 6:return d.fn.call(d.context,A,c,l,u,g),!0}for(_=1,m=new Array(p-1);_\u003cp;_++)m[_-1]=arguments[_];d.fn.apply(d.context,m)}else{var f=d.length,I;for(_=0;_\u003cf;_++)switch(d[_].once\u0026\u0026this.removeListener(a,d[_].fn,void 0,!0),p){case 1:d[_].fn.call(d[_].context);break;case 2:d[_].fn.call(d[_].context,A);break;case 3:d[_].fn.call(d[_].context,A,c);break;case 4:d[_].fn.call(d[_].context,A,c,l);break;default:if(!m)for(I=1,m=new Array(p-1);I\u003cp;I++)m[I-1]=arguments[I];d[_].fn.apply(d[_].context,m)}}return!0},r.prototype.on=function(a,A,c){var l=new i(A,c||this),u=n?n+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},r.prototype.once=function(a,A,c){var l=new i(A,c||this,!0),u=n?n+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},r.prototype.removeListener=function(a,A,c,l){var u=n?n+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new o:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn===A\u0026\u0026(!l||g.once)\u0026\u0026(!c||g.context===c)\u0026\u0026(--this._eventsCount===0?this._events=new o:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h\u003cp;h++)(g[h].fn!==A||l\u0026\u0026!g[h].once||c\u0026\u0026g[h].context!==c)\u0026\u0026d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new o:delete this._events[u]}return this},r.prototype.removeAllListeners=function(a){var A;return a?(A=n?n+a:a,this._events[A]\u0026\u0026(--this._eventsCount===0?this._events=new o:delete this._events[A])):(this._events=new o,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=n,r.EventEmitter=r,t.exports=r})($Qe)),$Qe.exports}var qQe,fbt;function bmo(){if(fbt)return qQe;fbt=1;function t(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var e=_bt(),n=function(){},o={data:\"state-data\",cdata:\"state-cdata\",tagBegin:\"state-tag-begin\",tagName:\"state-tag-name\",tagEnd:\"state-tag-end\",attributeNameStart:\"state-attribute-name-start\",attributeName:\"state-attribute-name\",attributeNameEnd:\"state-attribute-name-end\",attributeValueBegin:\"state-attribute-value-begin\",attributeValue:\"state-attribute-value\"},i={lt:\"action-lt\",gt:\"action-gt\",space:\"action-space\",equal:\"action-equal\",quote:\"action-quote\",slash:\"action-slash\",char:\"action-char\",error:\"action-error\"},r={text:\"text\",openTag:\"open-tag\",closeTag:\"close-tag\",attributeName:\"attribute-name\",attributeValue:\"attribute-value\"},s={\" \":i.space,\"\t\":i.space,\"\\n\":i.space,\"\\r\":i.space,\"\u003c\":i.lt,\"\u003e\":i.gt,'\"':i.quote,\"'\":i.quote,\"=\":i.equal,\"/\":i.slash},a=function(l){return s[l]||i.char},A=function(l){var u,g,h,d,p,m,_,f,I,C;l=Object.assign({debug:!1},l);var y=new e,x=o.data,E=\"\",B=\"\",S=\"\",Q=\"\",w=\"\",M=\"\",k=function(O,U){if(!(B[0]===\"?\"||B[0]===\"!\")){var Y={type:O,value:U};l.debug\u0026\u0026console.log(\"emit:\",Y),y.emit(\"data\",Y)}};y.stateMachine=(C={},t(C,o.data,(u={},t(u,i.lt,function(){E.trim()\u0026\u0026k(r.text,E),B=\"\",w=!1,x=o.tagBegin}),t(u,i.char,function(F){E+=F}),u)),t(C,o.cdata,t({},i.char,function(F){E+=F,E.substr(-3)===\"]]\u003e\"\u0026\u0026(k(r.text,E.slice(0,-3)),E=\"\",x=o.data)})),t(C,o.tagBegin,(g={},t(g,i.space,n),t(g,i.char,function(F){B=F,x=o.tagName}),t(g,i.slash,function(){B=\"\",w=!0}),g)),t(C,o.tagName,(h={},t(h,i.space,function(){w?x=o.tagEnd:(x=o.attributeNameStart,k(r.openTag,B))}),t(h,i.gt,function(){k(w?r.closeTag:r.openTag,B),E=\"\",x=o.data}),t(h,i.slash,function(){x=o.tagEnd,k(r.openTag,B)}),t(h,i.char,function(F){B+=F,B===\"![CDATA[\"\u0026\u0026(x=o.cdata,E=\"\",B=\"\")}),h)),t(C,o.tagEnd,(d={},t(d,i.gt,function(){k(r.closeTag,B),E=\"\",x=o.data}),t(d,i.char,n),d)),t(C,o.attributeNameStart,(p={},t(p,i.char,function(F){S=F,x=o.attributeName}),t(p,i.gt,function(){E=\"\",x=o.data}),t(p,i.space,n),t(p,i.slash,function(){w=!0,x=o.tagEnd}),p)),t(C,o.attributeName,(m={},t(m,i.space,function(){x=o.attributeNameEnd}),t(m,i.equal,function(){k(r.attributeName,S),x=o.attributeValueBegin}),t(m,i.gt,function(){Q=\"\",k(r.attributeName,S),k(r.attributeValue,Q),E=\"\",x=o.data}),t(m,i.slash,function(){w=!0,Q=\"\",k(r.attributeName,S),k(r.attributeValue,Q),x=o.tagEnd}),t(m,i.char,function(F){S+=F}),m)),t(C,o.attributeNameEnd,(_={},t(_,i.space,n),t(_,i.equal,function(){k(r.attributeName,S),x=o.attributeValueBegin}),t(_,i.gt,function(){Q=\"\",k(r.attributeName,S),k(r.attributeValue,Q),E=\"\",x=o.data}),t(_,i.char,function(F){Q=\"\",k(r.attributeName,S),k(r.attributeValue,Q),S=F,x=o.attributeName}),_)),t(C,o.attributeValueBegin,(f={},t(f,i.space,n),t(f,i.quote,function(F){M=F,Q=\"\",x=o.attributeValue}),t(f,i.gt,function(){Q=\"\",k(r.attributeValue,Q),E=\"\",x=o.data}),t(f,i.char,function(F){M=\"\",Q=F,x=o.attributeValue}),f)),t(C,o.attributeValue,(I={},t(I,i.space,function(F){M?Q+=F:(k(r.attributeValue,Q),x=o.attributeNameStart)}),t(I,i.quote,function(F){M===F?(k(r.attributeValue,Q),x=o.attributeNameStart):Q+=F}),t(I,i.gt,function(F){M?Q+=F:(k(r.attributeValue,Q),E=\"\",x=o.data)}),t(I,i.slash,function(F){M?Q+=F:(k(r.attributeValue,Q),w=!0,x=o.tagEnd)}),t(I,i.char,function(F){Q+=F}),I)),C);var R=function(O){l.debug\u0026\u0026console.log(x,O);var U=y.stateMachine[x],Y=U[a(O)]||U[i.error]||U[i.char];Y(O)};return y.write=function(F){for(var O=F.length,U=0;U\u003cO;U++)R(F[U])},y};return qQe={State:o,Action:i,Type:r,create:A},qQe}var XQe,Ibt;function Smo(){if(Ibt)return XQe;Ibt=1;var t=_bt(),e=bmo(),n=e.Type,o={element:\"element\",text:\"text\"},i=function(A){return Object.assign({name:\"\",type:o.element,value:\"\",parent:null,attributes:{},children:[]},A)},r=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:\"done\",tagPrefix:\"tag:\",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new t,d=function(m){switch(m.type){case n.openTag:if(u===null)u=l,u.name=m.value;else{var _=i({name:m.value,parent:u});u.children.push(_),u=_}break;case n.closeTag:var f=u.parent;if(A.parentNodes||(u.parent=null),u.name!==m.value)break;A.stream\u0026\u0026f===l\u0026\u0026(l.children=[],u.parent=null),(!A.emitTopLevelOnly||f===l)\u0026\u0026(h.emit(A.tagPrefix+u.name,u),h.emit(\"tag\",u.name,u)),u===l\u0026\u0026(c.removeAllListeners(\"data\"),h.emit(A.doneEvent,u),l=null),u=f;break;case n.text:u\u0026\u0026u.children.push(i({type:o.text,value:m.value,parent:A.parentNodes?u:null}));break;case n.attributeName:g=m.value,u.attributes[g]=\"\";break;case n.attributeValue:u.attributes[g]=m.value;break}};return h.reset=function(){c=e.create({debug:A.debug}),c.on(\"data\",d),l=i(),u=null,g=\"\",h.parse=c.write},h.reset(),h},s=function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:\":\"});var l=r(c),u=void 0;return l.on(\"done\",function(g){u=g}),l.parse(A),u};return XQe={parseSync:s,create:r,NodeType:o},XQe}var Qmo=Smo(),vmo=function(e){var n=Qmo.parseSync(\"\u003croot\u003e\".concat(e,\"\u003c/root\u003e\"),{parentNodes:!1}),o=n.children\u0026\u0026n.children.length\u003e0\u0026\u0026n.children.every(function(i){return i.name===\"svg\"});if(o)return n.children.length===1?n.children[0]:n.children;throw Error(\"nothing to parse\")},wmo=function(e){return Bmo(e,function(n){return Mmo(n)?n:Pmo(n)})},Pmo=function(e){return e.replace(/[-|:]([a-z])/gi,function(n,o){return o.toUpperCase()})},Mmo=function(e){return/^(data|aria)(-\\w+)/.test(e)},Dmo=function(e){if(e){var n=String(e);return/[\u0026\u003c\u003e]/.test(n)?\"\u003c![CDATA[\".concat(n.replace(/]]\u003e/,\"]]]]\u003e\u003c![CDATA[\u003e\"),\"]]\u003e\"):n}return\"\"},Nmo=function(e){return String(e).replace(/\u0026/g,\"\u0026amp;\").replace(/'/g,\"\u0026apos;\").replace(/\"/g,\"\u0026quot;\").replace(/\u003c/g,\"\u0026lt;\").replace(/\u003e/g,\"\u0026gt;\")},$W=function(e){var n=arguments.length\u003e1\u0026\u0026arguments[1]!==void 0?arguments[1]:{},o=n.transformNode,i=o===void 0?function(A){return A}:o,r=n.camelcase,s=r===void 0?!1:r,a=function(c){var l;return l=i(c),s\u0026\u0026(l=wmo(l)),l};return a(vmo(e))},Cbt=function t(e){var n=arguments.length\u003e1\u0026\u0026arguments[1]!==void 0?arguments[1]:{},o=n.transformAttr,i=o===void 0?function(h,d,p){return\"\".concat(h,'=\"').concat(p(d),'\"')}:o,r=n.transformNode,s=r===void 0?function(h){return h}:r,a=n.selfClose,A=a===void 0?!0:a;if(Array.isArray(e))return e.map(function(h){return t(h,{transformAttr:i,selfClose:A,transformNode:s})}).join(\"\");var c=s(e);if(c.type===\"text\")return Dmo(c.value);var l=\"\";for(var u in c.attributes){var g=i(u,c.attributes[u],Nmo,c.name);l+=g?\" \".concat(g):\"\"}return c.children\u0026\u0026c.children.length\u003e0||!A?\"\u003c\".concat(c.name).concat(l,\"\u003e\").concat(t(c.children,{transformAttr:i,transformNode:s,selfClose:A}),\"\u003c/\").concat(c.name,\"\u003e\"):\"\u003c\".concat(c.name).concat(l,\"/\u003e\")};function ybt(t,e,n){return{...t,points:t.points?.map(o=\u003e({...o,x:o.x+e,y:o.y+n})),lines:t.lines?.map(o=\u003e({...o,points:o.points.map(i=\u003e({x:i.x+e,y:i.y+n}))})),infiniteLines:t.infiniteLines?.map(o=\u003e({...o,origin:{x:o.origin.x+e,y:o.origin.y+n}})),polygons:t.polygons?.map(o=\u003e({...o,points:o.points.map(i=\u003e({x:i.x+e,y:i.y+n}))})),rects:t.rects?.map(o=\u003e({...o,center:{x:o.center.x+e,y:o.center.y+n}})),circles:t.circles?.map(o=\u003e({...o,center:{x:o.center.x+e,y:o.center.y+n}})),arrows:t.arrows?.map(o=\u003e({...o,start:{x:o.start.x+e,y:o.start.y+n},end:{x:o.end.x+e,y:o.end.y+n}})),texts:t.texts?.map(o=\u003e({...o,x:o.x+e,y:o.y+n}))}}var NH=(t,e)=\u003e({...t,rects:[...t.rects??[],...e.rects??[]],points:[...t.points??[],...e.points??[]],lines:[...t.lines??[],...e.lines??[]],infiniteLines:[...t.infiniteLines??[],...e.infiniteLines??[]],polygons:[...t.polygons??[],...e.polygons??[]],circles:[...t.circles??[],...e.circles??[]],arrows:[...t.arrows??[],...e.arrows??[]],texts:[...t.texts??[],...e.texts??[]]});function zce(t,e={}){if(t.length===0)return{};let n=t[0],o=V5(n);const i=o.minY,r=[o];for(let s=1;s\u003ct.length;s++){const a=t[s],A=V5(a),c=o.maxX-o.minX,l=A.maxX-A.minX,u=(c+l)/8,g=o.maxX+u-A.minX,h=i-A.minY,d=ybt(a,g,h);n=NH(n,d),o=V5(d),r.push(o)}if(e.titles\u0026\u0026e.titles.length\u003e0){const s=V5(n),A=(s.maxX-s.minX)*.025,c=e.titles.slice(0,r.length).map((l,u)=\u003e{const g=r[u];return{x:(g.minX+g.maxX)/2,y:g.maxY+A,text:l,fontSize:A,anchorSide:\"bottom_center\"}});n=NH(n,{texts:c})}return n}function ZQe(t,e={}){if(t.length===0)return{};let n=t[0],o=V5(n);const i=o.minX,r=[o];for(let s=1;s\u003ct.length;s++){const a=t[s],A=V5(a),c=o.maxY-o.minY,l=A.maxY-A.minY,u=(c+l)/8,g=i-A.minX,h=o.minY-u-A.maxY,d=ybt(a,g,h);n=NH(n,d),o=V5(d),r.push(o)}if(e.titles\u0026\u0026e.titles.length\u003e0){const s=V5(n),A=(s.maxY-s.minY)*.025,c=e.titles.slice(0,r.length).map((l,u)=\u003e{const g=r[u];return{x:g.minX-A,y:g.maxY,text:l,fontSize:A,anchorSide:\"top_right\"}});n=NH(n,{texts:c})}return n}function RH(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;return t}var fC=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function TH(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var eve=class extends fC{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e){this.solved=!0;return}if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null\u0026\u0026(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()\u0026\u0026(this.step(),!(this.failed||this.solved)););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??\"none\"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex\u003ethis.pipelineDef.findIndex(A=\u003eA.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n\u0026\u0026(RH(n,0),e=1);let o=null;this.solved\u0026\u0026(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=\u003e{const A=this[r.solverName]?.visualize();return A?(RH(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved\u0026\u0026o\u0026\u0026(RH(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=\u003er.points||[]),rects:i.flatMap(r=\u003er.rects||[]),lines:i.flatMap(r=\u003er.lines||[]),circles:i.flatMap(r=\u003er.circles||[]),texts:i.flatMap(r=\u003er.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},tve={};async function Rmo(t={}){var e,n=t,o=!!globalThis.window,i=!!globalThis.WorkerGlobalScope,r=globalThis.process?.versions?.node\u0026\u0026globalThis.process?.type!=\"renderer\";if(r){const{createRequire:ot}=await Promise.resolve().then(()=\u003exfn);var s=ot(typeof document\u003e\"u\"\u0026\u0026typeof location\u003e\"u\"?require(\"url\").pathToFileURL(__filename).href:typeof document\u003e\"u\"?location.href:Bu\u0026\u0026Bu.tagName.toUpperCase()===\"SCRIPT\"\u0026\u0026Bu.src||new URL(\"standalone.min.js\",document.baseURI).href)}var a=!1;n.setup=function(){if(a)return;a=!0,n.initTBB();function ot(gn,bn,go=(Go=\u003eGo)){if(bn)for(let Go of bn)gn.push_back(go(Go));return gn}function rt(gn,bn=(go=\u003ego)){const go=[],Go=gn.size();for(let hr=0;hr\u003cGo;hr++)go.push(bn(gn.get(hr)));return go}function Ot(gn,bn=(go=\u003ego)){const go=[],Go=gn.size();for(let hr=0;hr\u003cGo;hr++){const ia=gn.get(hr),lA=ia.size(),MA=[];for(let Fa=0;Fa\u003clA;Fa++)MA.push(bn(ia.get(Fa)));go.push(MA)}return go}function an(gn){return gn[0].length\u003c3\u0026\u0026(gn=[gn]),ot(new n.Vector2_vec2,gn,bn=\u003eot(new n.Vector_vec2,bn,go=\u003ego instanceof Array?{x:go[0],y:go[1]}:go))}function Dn(gn){for(let bn=0;bn\u003cgn.size();bn++)gn.get(bn).delete();gn.delete()}function Xn(gn){return gn[0]instanceof Array?{x:gn[0][0],y:gn[0][1]}:typeof gn[0]==\"number\"?{x:gn[0]||0,y:gn[1]||0}:gn[0]}function oo(gn){return gn[0]instanceof Array?{x:gn[0][0],y:gn[0][1],z:gn[0][2]}:typeof gn[0]==\"number\"?{x:gn[0]||0,y:gn[1]||0,z:gn[2]||0}:gn[0]}function vo(gn){return gn==\"EvenOdd\"?0:gn==\"NonZero\"?1:gn==\"Negative\"?3:2}function Xo(gn){return gn==\"Round\"?1:gn==\"Miter\"?2:0}const Ti=n.CrossSection;function ir(gn,bn=\"Positive\"){if(gn instanceof Ti)return gn;{const go=an(gn),Go=new Ti(go,vo(bn));return Dn(go),Go}}n.CrossSection.prototype.translate=function(...gn){return this._Translate(Xn(gn))},n.CrossSection.prototype.scale=function(gn){return typeof gn==\"number\"?this._Scale({x:gn,y:gn}):this._Scale(Xn([gn]))},n.CrossSection.prototype.mirror=function(gn){return this._Mirror(Xn([gn]))},n.CrossSection.prototype.warp=function(gn){const bn=Vc(function(Go){const hr=Me(Go,\"double\"),ia=Me(Go+8,\"double\"),lA=[hr,ia];gn(lA),ve(Go,lA[0],\"double\"),ve(Go+8,lA[1],\"double\")},\"vi\"),go=this._Warp(bn);return ha(bn),go},n.CrossSection.prototype.decompose=function(){const gn=this._Decompose(),bn=rt(gn);return gn.delete(),bn},n.CrossSection.prototype.bounds=function(){const gn=this._Bounds();return{min:[\"x\",\"y\"].map(bn=\u003egn.min[bn]),max:[\"x\",\"y\"].map(bn=\u003egn.max[bn])}},n.CrossSection.prototype.offset=function(gn,bn=\"Round\",go=2,Go=0){return this._Offset(gn,Xo(bn),go,Go)},n.CrossSection.prototype.simplify=function(gn=1e-6){return this._Simplify(gn)},n.CrossSection.prototype.extrude=function(gn,bn=0,go=0,Go=[1,1],hr=!1){Go=Xn([Go]);const ia=n._Extrude(this._ToPolygons(),gn,bn,go,Go);return hr?ia.translate([0,0,-gn/2]):ia},n.CrossSection.prototype.revolve=function(gn=0,bn=360){return n._Revolve(this._ToPolygons(),gn,bn)},n.CrossSection.prototype.add=function(gn){return this._add(ir(gn))},n.CrossSection.prototype.subtract=function(gn){return this._subtract(ir(gn))},n.CrossSection.prototype.intersect=function(gn){return this._intersect(ir(gn))},n.CrossSection.prototype.toPolygons=function(){const gn=this._ToPolygons(),bn=Ot(gn,go=\u003e[go.x,go.y]);return gn.delete(),bn},n.Manifold.prototype.smoothOut=function(gn=52.5,bn=0){return this._SmoothOut(gn,bn)},n.Manifold.prototype.warp=function(gn){const bn=Vc(function(hr){const ia=Me(hr,\"double\"),lA=Me(hr+8,\"double\"),MA=Me(hr+16,\"double\"),Fa=[ia,lA,MA];gn(Fa),ve(hr,Fa[0],\"double\"),ve(hr+8,Fa[1],\"double\"),ve(hr+16,Fa[2],\"double\")},\"vi\"),go=this._Warp(bn);ha(bn);const Go=go.status();if(Go!==\"NoError\")throw new n.ManifoldError(Go);return go},n.Manifold.prototype.warpBatch=function(gn){const bn=Vc(function(hr,ia){const lA=n.HEAPF64??w;if(!lA)throw new Error(\"WASM heap is not initialized (HEAPF64 unavailable)\");const MA=new Float64Array(lA.buffer,hr,ia*3);gn(MA,ia)},\"vii\"),go=this._WarpBatch(bn);ha(bn);const Go=go.status();if(Go!==\"NoError\")throw new n.ManifoldError(Go);return go},n.Manifold.prototype.calculateNormals=function(gn=0,bn=52.5){return this._CalculateNormals(gn,bn)},n.Manifold.prototype.smoothByNormals=function(gn=0){return this._SmoothByNormals(gn)},n.Manifold.prototype.setProperties=function(gn,bn){const go=this.numProp(),Go=Vc(function(ia,lA,MA){const Fa=[];for(let Hr=0;Hr\u003cgn;++Hr)Fa[Hr]=Me(ia+8*Hr,\"double\");const La=[];for(let Hr=0;Hr\u003c3;++Hr)La[Hr]=Me(lA+8*Hr,\"double\");const Y0=[];for(let Hr=0;Hr\u003cgo;++Hr)Y0[Hr]=Me(MA+8*Hr,\"double\");bn(Fa,La,Y0);for(let Hr=0;Hr\u003cgn;++Hr)ve(ia+8*Hr,Fa[Hr],\"double\")},\"viii\"),hr=this._SetProperties(gn,Go);return ha(Go),hr},n.Manifold.prototype.translate=function(...gn){return this._Translate(oo(gn))},n.Manifold.prototype.rotate=function(gn,bn,go){return Array.isArray(gn)?this._Rotate(...gn):this._Rotate(gn,bn||0,go||0)},n.Manifold.prototype.scale=function(gn){return typeof gn==\"number\"?this._Scale({x:gn,y:gn,z:gn}):this._Scale(oo([gn]))},n.Manifold.prototype.mirror=function(gn){return this._Mirror(oo([gn]))},n.Manifold.prototype.trimByPlane=function(gn,bn=0){return this._TrimByPlane(oo([gn]),bn)},n.Manifold.prototype.slice=function(gn=0){const bn=this._Slice(gn),go=new Ti(bn,vo(\"Positive\"));return Dn(bn),go},n.Manifold.prototype.project=function(){const gn=this._Project(),bn=new Ti(gn,vo(\"Positive\"));return Dn(gn),bn},n.Manifold.prototype.rayCast=function(gn,bn){const go=this._RayCast(oo([gn]),oo([bn])),Go=rt(go,hr=\u003e({faceID:hr.faceID,distance:hr.distance,position:[\"x\",\"y\",\"z\"].map(ia=\u003ehr.position[ia]),normal:[\"x\",\"y\",\"z\"].map(ia=\u003ehr.normal[ia])}));return go.delete(),Go},n.Manifold.prototype.split=function(gn){const bn=this._Split(gn),go=rt(bn);return bn.delete(),go},n.Manifold.prototype.splitByPlane=function(gn,bn=0){const go=this._SplitByPlane(oo([gn]),bn),Go=rt(go);return go.delete(),Go},n.Manifold.prototype.decompose=function(){const gn=this._Decompose(),bn=rt(gn);return gn.delete(),bn},n.Manifold.prototype.boundingBox=function(){const gn=this._boundingBox();return{min:[\"x\",\"y\",\"z\"].map(bn=\u003egn.min[bn]),max:[\"x\",\"y\",\"z\"].map(bn=\u003egn.max[bn])}},n.Manifold.prototype.simplify=function(gn=0){return this._Simplify(gn)};class Gs{constructor({numProp:bn=3,triVerts:go=new Uint32Array,vertProperties:Go=new Float32Array,mergeFromVert:hr,mergeToVert:ia,runIndex:lA,runOriginalID:MA,faceID:Fa,halfedgeTangent:La,runTransform:Y0,runFlags:Hr,tolerance:fh=0}={}){this.numProp=bn,this.triVerts=go,this.vertProperties=Go,this.mergeFromVert=hr,this.mergeToVert=ia,this.runIndex=lA,this.runOriginalID=MA,this.faceID=Fa,this.halfedgeTangent=La,this.runTransform=Y0,this.runFlags=Hr,this.tolerance=fh}get numTri(){return this.triVerts.length/3}get numVert(){return this.vertProperties.length/this.numProp}get numRun(){return this.runOriginalID.length}merge(){const{changed:bn,mesh:go}=n._Merge(this);return Object.assign(this,{...go}),bn}verts(bn){return this.triVerts.subarray(3*bn,3*(bn+1))}position(bn){return this.vertProperties.subarray(this.numProp*bn,this.numProp*bn+3)}extras(bn){return this.vertProperties.subarray(this.numProp*bn+3,this.numProp*(bn+1))}tangent(bn){return this.halfedgeTangent.subarray(4*bn,4*(bn+1))}transform(bn){const go=new Array(16);for(const Go of[0,1,2,3])for(const hr of[0,1,2])go[4*Go+hr]=this.runTransform[12*bn+3*Go+hr];return go[15]=1,go}backside(bn){return this.runFlags!=null\u0026\u0026bn\u003cthis.runFlags.length\u0026\u0026(this.runFlags[bn]\u00261)!==0}hasNormals(bn){return this.runFlags!=null\u0026\u0026bn\u003cthis.runFlags.length\u0026\u0026(this.runFlags[bn]\u00262)!==0}}n.Mesh=Gs,n.Manifold.prototype.getMesh=function(gn=-1){return new Gs(this._GetMeshJS(gn))},n.ManifoldError=function(bn,...go){let Go=\"Unknown error\";switch(bn){case\"NonFiniteVertex\":Go=\"Non-finite vertex\";break;case\"NotManifold\":Go=\"Not manifold\";break;case\"VertexOutOfBounds\":Go=\"Vertex index out of bounds\";break;case\"PropertiesWrongLength\":Go=\"Properties have wrong length\";break;case\"MissingPositionProperties\":Go=\"Less than three properties\";break;case\"MergeVectorsDifferentLengths\":Go=\"Merge vectors have different lengths\";break;case\"MergeIndexOutOfBounds\":Go=\"Merge index out of bounds\";break;case\"TransformWrongLength\":Go=\"Transform vector has wrong length\";break;case\"RunIndexWrongLength\":Go=\"Run index vector has wrong length\";break;case\"FaceIDWrongLength\":Go=\"Face ID vector has wrong length\";break;case\"InvalidConstruction\":Go=\"Manifold constructed with invalid parameters\";break;case\"ResultTooLarge\":Go=\"Result exceeds maximum size\";break;case\"InvalidTangents\":Go=\"Invalid halfedge tangents\";break}const hr=Error.apply(this,[Go,...go]);hr.name=this.name=\"ManifoldError\",this.message=hr.message,this.stack=hr.stack,this.code=bn},n.ManifoldError.prototype=Object.create(Error.prototype,{constructor:{value:n.ManifoldError,writable:!0,configurable:!0}}),n.CrossSection=function(gn,bn=\"Positive\"){const go=an(gn),Go=new Ti(go,vo(bn));return Dn(go),Go},n.CrossSection.ofPolygons=function(gn,bn=\"Positive\"){return new n.CrossSection(gn,bn)},n.CrossSection.square=function(...gn){let bn;gn.length==0?bn={x:1,y:1}:typeof gn[0]==\"number\"?bn={x:gn[0],y:gn[0]}:bn=Xn(gn);const go=gn[1]||!1;return n._Square(bn,go)},n.CrossSection.circle=function(gn,bn=0){return n._Circle(gn,bn)};function qr(gn){return function(...bn){bn.length==1\u0026\u0026(bn=bn[0]);const go=new n.Vector_crossSection;for(const hr of bn)go.push_back(ir(hr));const Go=n[\"_crossSection\"+gn](go);return go.delete(),Go}}n.CrossSection.compose=qr(\"Compose\"),n.CrossSection.union=qr(\"UnionN\"),n.CrossSection.difference=qr(\"DifferenceN\"),n.CrossSection.intersection=qr(\"IntersectionN\");function ps(gn,bn){ot(gn,bn,go=\u003ego instanceof Array?{x:go[0],y:go[1]}:go)}n.CrossSection.hull=function(...gn){gn.length==1\u0026\u0026(gn=gn[0]);let bn=new n.Vector_vec2;for(const Go of gn)if(Go instanceof Ti)n._crossSectionCollectVertices(bn,Go);else if(Go instanceof Array\u0026\u0026Go.length==2\u0026\u0026typeof Go[0]==\"number\")bn.push_back({x:Go[0],y:Go[1]});else if(Go.x)bn.push_back(Go);else{const ia=Go[0].length==2\u0026\u0026typeof Go[0][0]==\"number\"||Go[0].x?[Go]:Go;for(const lA of ia)ps(bn,lA)}const go=n._crossSectionHullPoints(bn);return bn.delete(),go},n.CrossSection.prototype=Object.create(Ti.prototype),Object.defineProperty(n.CrossSection,Symbol.hasInstance,{get:()=\u003egn=\u003egn instanceof Ti});const Ic=n.Manifold;n.Manifold=function(gn){const bn=new Ic(gn),go=bn.status();if(go!==\"NoError\")throw new n.ManifoldError(go);return bn},n.Manifold.ofMesh=function(gn){return new n.Manifold(gn)},n.Manifold.tetrahedron=function(){return n._Tetrahedron()},n.Manifold.cube=function(...gn){let bn;gn.length==0?bn={x:1,y:1,z:1}:typeof gn[0]==\"number\"?bn={x:gn[0],y:gn[0],z:gn[0]}:bn=oo(gn);const go=gn[1]||!1;return n._Cube(bn,go)},n.Manifold.cylinder=function(gn,bn,go=-1,Go=0,hr=!1){return n._Cylinder(gn,bn,go,Go,hr)},n.Manifold.sphere=function(gn,bn=0){return n._Sphere(gn,bn)},n.Manifold.smooth=function(gn,bn=[]){const go=new n.Vector_smoothness;ot(go,bn);const Go=n._Smooth(gn,go);return go.delete(),Go},n.Manifold.extrude=function(gn,bn,go=0,Go=0,hr=[1,1],ia=!1){return(gn instanceof Ti?gn:n.CrossSection(gn,\"Positive\")).extrude(bn,go,Go,hr,ia)},n.Manifold.revolve=function(gn,bn=0,go=360){return(gn instanceof Ti?gn:n.CrossSection(gn,\"Positive\")).revolve(bn,go)},n.Manifold.reserveIDs=function(gn){return n._ReserveIDs(gn)};function lc(gn){return function(...bn){bn.length==1\u0026\u0026(bn=bn[0]);const go=new n.Vector_manifold;for(const hr of bn)go.push_back(hr);const Go=n[\"_manifold\"+gn+\"N\"](go);return go.delete(),Go}}n.Manifold.union=lc(\"Union\"),n.Manifold.compose=n.Manifold.union,n.Manifold.difference=lc(\"Difference\"),n.Manifold.intersection=lc(\"Intersection\"),n.Manifold.levelSet=function(gn,bn,go,Go=0,hr=-1){const ia={min:{x:bn.min[0],y:bn.min[1],z:bn.min[2]},max:{x:bn.max[0],y:bn.max[1],z:bn.max[2]}},lA=Vc(function(Fa){const La=Me(Fa,\"double\"),Y0=Me(Fa+8,\"double\"),Hr=Me(Fa+16,\"double\");return gn([La,Y0,Hr])},\"di\"),MA=n._LevelSet(lA,ia,go,Go,hr);return ha(lA),MA},n.ExecutionContext.prototype.fromMesh=function(gn){return this._FromMesh(gn)},n.ExecutionContext.prototype.smooth=function(gn,bn=[]){const go=new n.Vector_smoothness;ot(go,bn);const Go=this._Smooth(gn,go);return go.delete(),Go},n.ExecutionContext.prototype.levelSet=function(gn,bn,go,Go=0,hr=-1){const ia={min:{x:bn.min[0],y:bn.min[1],z:bn.min[2]},max:{x:bn.max[0],y:bn.max[1],z:bn.max[2]}},lA=Vc(function(Fa){const La=Me(Fa,\"double\"),Y0=Me(Fa+8,\"double\"),Hr=Me(Fa+16,\"double\");return gn([La,Y0,Hr])},\"di\"),MA=this._LevelSet(lA,ia,go,Go,hr);return ha(lA),MA};function ka(gn,bn){ot(gn,bn,go=\u003ego instanceof Array?{x:go[0],y:go[1],z:go[2]}:go)}n.Manifold.hull=function(...gn){gn.length==1\u0026\u0026(gn=gn[0]);let bn=new n.Vector_vec3;for(const Go of gn)Go instanceof Ic?n._manifoldCollectVertices(bn,Go):Go instanceof Array\u0026\u0026Go.length==3\u0026\u0026typeof Go[0]==\"number\"?bn.push_back({x:Go[0],y:Go[1],z:Go[2]}):Go.x?bn.push_back(Go):ka(bn,Go);const go=n._manifoldHullPoints(bn);return bn.delete(),go},n.Manifold.prototype=Object.create(Ic.prototype),Object.defineProperty(n.Manifold,Symbol.hasInstance,{get:()=\u003egn=\u003egn instanceof Ic}),n.triangulate=function(gn,bn=-1,go=!0){const Go=an(gn),hr=rt(n._Triangulate(Go,bn,go),ia=\u003e[ia[0],ia[1],ia[2]]);return Dn(Go),hr}};var A=typeof document\u003e\"u\"\u0026\u0026typeof location\u003e\"u\"?require(\"url\").pathToFileURL(__filename).href:typeof document\u003e\"u\"?location.href:Bu\u0026\u0026Bu.tagName.toUpperCase()===\"SCRIPT\"\u0026\u0026Bu.src||new URL(\"standalone.min.js\",document.baseURI).href,c=\"\";function l(ot){return n.locateFile?n.locateFile(ot,c):c+ot}var u,g;if(r){var h=s(\"node:fs\");A.startsWith(\"file:\")\u0026\u0026(c=s(\"node:path\").dirname(s(\"node:url\").fileURLToPath(A))+\"/\"),g=ot=\u003e{ot=_(ot)?new URL(ot):ot;var rt=h.readFileSync(ot);return rt},u=async(ot,rt=!0)=\u003e{ot=_(ot)?new URL(ot):ot;var Ot=h.readFileSync(ot,rt?void 0:\"utf8\");return Ot},tve.argv.length\u003e1\u0026\u0026tve.argv[1].replace(/\\\\/g,\"/\"),tve.argv.slice(2)}else if(o||i){try{c=new URL(\".\",A).href}catch{}i\u0026\u0026(g=ot=\u003e{var rt=new XMLHttpRequest;return rt.open(\"GET\",ot,!1),rt.responseType=\"arraybuffer\",rt.send(null),new Uint8Array(rt.response)}),u=async ot=\u003e{if(_(ot))return new Promise((Ot,an)=\u003e{var Dn=new XMLHttpRequest;Dn.open(\"GET\",ot,!0),Dn.responseType=\"arraybuffer\",Dn.onload=()=\u003e{if(Dn.status==200||Dn.status==0\u0026\u0026Dn.response){Ot(Dn.response);return}an(Dn.status)},Dn.onerror=an,Dn.send(null)});var rt=await fetch(ot,{credentials:\"same-origin\"});if(rt.ok)return rt.arrayBuffer();throw new Error(rt.status+\" : \"+rt.url)}}console.log.bind(console);var d=console.error.bind(console),p,m=!1,_=ot=\u003eot.startsWith(\"file://\"),f,I,C,y,x,E,B,S,Q,w,M,k,R=!1;function F(){var ot=_h.buffer;C=new Int8Array(ot),x=new Int16Array(ot),y=new Uint8Array(ot),E=new Uint16Array(ot),B=new Int32Array(ot),S=new Uint32Array(ot),Q=new Float32Array(ot),w=new Float64Array(ot),M=new BigInt64Array(ot),k=new BigUint64Array(ot)}function O(){if(n.preRun)for(typeof n.preRun==\"function\"\u0026\u0026(n.preRun=[n.preRun]);n.preRun.length;)ye(n.preRun.shift());_e(pe)}function U(){R=!0,ku.J()}function Y(){if(n.postRun)for(typeof n.postRun==\"function\"\u0026\u0026(n.postRun=[n.postRun]);n.postRun.length;)fe(n.postRun.shift());_e(ue)}function W(ot){n.onAbort?.(ot),ot=\"Aborted(\"+ot+\")\",d(ot),m=!0,ot+=\". Build with -sASSERTIONS for more info.\";var rt=new WebAssembly.RuntimeError(ot);throw I?.(rt),rt}var te;function j(){return n.locateFile?l(\"manifold.wasm\"):new URL(\"data:application/wasm;base64,AGFzbQEAAAABlwRFYAF/AGACf38AYAJ/fwF/YAN/f38AYAF/AX9gBH9/f38AYAN/f38Bf2AFf39/f38AY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MQgA3AxggDEIANwMoIAxCgICAgICAgPg/NwMgIAxCADcDMCAMQgA3AzggDEIANwNIIAxCgICAgICAgPg/NwNAIAxCADcDUCAMQgA3A1ggDEGYAmogAUEYaiIFIAwQygEgDCsDmAIgDCsDoAJiBEAgASgCDCELIwBBwAZrIgMkACADQgA3A/AEIANCgICAgICAgPg/NwPoBCADQgA3A/gEIANCADcDgAUgA0IANwOQBSADQoCAgICAgID4PzcDiAUgA0IANwOYBSADQgA3A6AFIANCADcDsAUgA0KAgICAgICA+D83A6gFIANCADcDuAUgA0IANwPABSADQaADaiAFIANB6ARqEMoBAkAgAysDoAMgAysDqANhBEAgDCALEDcaDAELIAwQOyEIIAsoAkQiAgRAIAggAjYCRAwBCyAFKQMAITEgBSkDCCEyIAUpAxAhMyAFKQMYITQgBSkDICE1IAUpAyghNiAFKQMwITcgBSkDOCE4IAUpA0AhOSAFKQNIITogBSkDUCE7IAMgBSkDWEL///////////8Ag0KAgICAgICA+P8AVDoA8wQgAyA7Qv///////////wCDQoCAgICAgID4/wBUOgDyBCADIDpC////////////AINCgICAgICAgPj/AFQ6APEEIAMgOUL///////////8Ag0KAgICAgICA+P8AVDoA8AQgAyA4Qv///////////wCDQoCAgICAgID4/wBUOgDvBCADIDdC////////////AINCgICAgICAgPj/AFQ6AO4EIAMgNkL///////////8Ag0KAgICAgICA+P8AVDoA7QQgAyA1Qv///////////wCDQoCAgICAgID4/wBUOgDsBCADIDRC////////////AINCgICAgICAgPj/AFQ6AOsEIAMgM0L///////////8Ag0KAgICAgICA+P8AVDoA6gQgAyAyQv///////////wCDQoCAgICAgID4/wBUOgDpBCADIDFC////////////AINCgICAgICAgPj/AFQ6AOgEAkACQCADLQDpBCADLQDoBHFFDQAgAy0A6gRBAXFFDQAgAy0A7AQgAy0A6wRxRQ0AIAMtAO0EQQFxRQ0AIAMtAO8EIAMtAO4EcUUNACADLQDwBEEBcUUNACADLQDyBCADLQDxBHFFDQAgAy0A8wRBAXENAQsgCEEBECwMAQ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AGogC0YNACAIKALYASICBEAgAhAiCyAIQgA3AtgBIAggCygC3AEiAjYC4AEgCCACNgLcASACRQ0AIAggAkEEdCICECciBDYC2AEgAkUNACAEIAsoAtgBIAL8CgAACyAIIAsrAzA5AzAgCCALKwM4OQM4IAggCygCQDYCQCAIQYgBaiIOIAtBiAFqEJICIAggC0Ew/AoAACAIQdgAaiIJIAtB2ABqIg8Q7QIgCEHoAGoiByALQegAahDtAiAIQfgAaiIKIAtB+ABqEO0CIAsoArwBIQIgA0IANwOABCADQgA3A4gEIANCADcDkAQgA0IANwOYBCADIAMpA4AENwOgAiADIAMpA4gENwOoAiADIAMpA5AENwOwAiADIAMpA5gENwO4AiAIQbgBaiACIANBoAJqENoEIAhBfzYCyAEgCCgCzAEiAiAIQdABaiIERwRAA0AgAisDICEVIAIrAyghFCACKwMwIRcgAisDOCEbIAIrA0AhGCACKwNIIRYgAisDUCEZIAIrA1ghGiACKwNgIR4gAisDaCEfIAIrA3AhHCACKwN4ISAgA0KAgICAgICA+D83A+AFIAMgIDkD2AUgAyAcOQPQBSADIB85A8gFIANCADcDwAUgAyAeOQO4BSADIBo5A7AFIAMgGTkDqAUgA0IANwOgBSADIBY5A5gFIAMgGDkDkAUgAyAbOQOIBSADQgA3A4AFIAMgFzkD+AQgAyAUOQPwBCADIBU5A+gEIANBoANqIgYgBSADQegEahDwASACQSBqIAZB4AD8CgAAAkAgAigCBCIGBEADQCAGIgIoAgAiBg0ADAILAAsDQCACIAIoAggiAigCAEcNAAsLIAIgBEcNAAsLIAsoAkwhAiADQgA3A5gDIANCADcDkAMgA0IANwOIAyADQgA3A4gCIANCADcDkAIgA0IANwOYAiAIQcgAaiACIANBiAJqEGcgCygCrAEhAiADQgA3A/ACIANCADcD+AIgA0IANwOAAyADIAMpA/ACNwPwASADIAMpA/gCNwP4ASADIAMpA4ADNwOAAiAIQagBaiACIANB8AFqEGcgCygCnAEhAiADQgA3A9gCIANCADcD4AIgA0IANwPoAiADIAMpA9gCNwPYASAD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ADYC0AIgA0IANwLIAiAIIANB6ARqIANByAJqQQAQzwIgAyADKQLoBDcCwAIgAiADQcACahC2BCADKALIAiICBEAgAhAiCyADKALoBCICRQ0AIAIQIgsgA0HABmokAEGoAhAjIgJB2JMCNgIAIAJCADcCBCACQRBqIAwQowEhBCAMIAI2ApwCIAwgBDYCmAIgAUEMaiAMQZgCahBOAkAgDCgCnAIiAkUNACACIAIoAgQiBEEBazYCBCAEDQAgAiACKAIAKAIIEQAAIAIQJAsgDBA6GiABQgA3AyAgAUKAgICAgICA+D83AxggAUIANwMoIAFCADcDMCABQgA3A0AgAUKAgICAgICA+D83AzggAUIANwNIIAFCADcDUCABQgA3A2AgAUKAgICAgICA+D83A1ggAUIANwNoIAFCADcDcAsgACABKAIMNgIAIAAgASgCECIANgIEIAAEQCAAIAAoAgRBAWo2AgQLIAxBsAJqJAAL9QEBBH8jAEEQayIDJAAgACgCABogAQRAIAAoAggiAiACKAIAKAIMEQQAIQIgAUEANgIMIAFBADYCBCABIAIgAkEAR2siAjYCACABIAJBC2w2AggLAkAgACgCCCICIAIoAgAoAggRBABBA0YNACADQQhqIgIgAEEIaiIEKAIAIgUgASAFKAIAKAIAEQMAIAQgAhBOIAMoAgwiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgACgCCAJAIAAoAgwiAEUNACAAKAIEQX9HDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EQaiQAC7EEAQZ/IwBBIGsiAiQAIABBADYCTCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQcgAahBxIABB2ABqIgMQOCAAQegAahA4IABB+ABqEDggAxDvAiAAQQA2ApwBIABBmAFqEHEgAEEANgKsASAAQagBahBxIABBADYCvAEgAEG4AWoQkwEgAkIANwIIIAJBfzYCACACQgA3AhggAkIANwIQIAIgAkEIaiIENgIEIABBfzYCyAEgAEHMAWogACgC0AEQbyAAIAIoAgQ2AswBIAAgAigCCCIFNgLQASAAIAIoAgwiBjYC1AEgAEHQAWohAyAAQcgBaiEHAkAgBkUEQCAAIAM2AswBDAELIAUgAzYCCCACQgA3AgggAiAENgIECyACQQRqAkAgAiAHRwRAIAAoAtgBIgQEQCAEECILIAAgAigCEDYC2AEgACACKAIUNgLcASAAIAIoAhg2AuABDAELIAIoAhAiBEUNACAEECILIAJBADYCGCACQgA3AhAgAigCCBBvIAAoAugBIgMEQCADECILIABBADYC8AEgAEIANwPoASAAKAL4ASIDBEAgAxAiCyAAQQA2AoACIABCADcD+AEgACgCiAIiAwRAIAMQIgsgAEEANgKQAiAAQgA3A4gCIAAgATYCRCACQSBqJAALUgEEfyAAKAIAIQECQCAAKAIEIgNFBEAMAQsgA0ECdCIEECchAiAERQ0AIAIgASAE/AoAAAsgACABBH8gARAiIAAoAgQFIAMLNgIIIAAgAjYCAAuQAQECfyMAQRBrIgMkAEEkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcCCCAAIAI2AgQgACACQQxqNgIAIABCADcCECABKAIAGiAAQQhqIAFBCGoQXiADQQhqIAFBEGoQfyADIAMpAgg3AwAgAEEQaiADEOcCIANBEGokACAACzcBAn8CQCAAKAIEIgFFDQAgASABKAIEIgJBAWs2AgQgAg0AIAEgASgCACgCCBEAACABECQLIAALBgAgABAiC3IBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARAlIAEgACgCBCIEayIDQQBMDQAgACgCACAEQQJ0aiEEA0AgBCACNgIAIARBBGohBCADQQFLIANBAWshAw0ACwsgACABNgIEBEAgABAtCwtgACAAIAM2AhBBACEDIABBADYCDAJAIAEEQCABQYCAgIABTw0BIAFBBHQQIyEDCyAAIAM2AgAgACADIAJBBHRqIgI2AgggACADIAFBBHRqNgIMIAAgAjYCBCAADwsQcgALVwEDfyAAKAIIIAFJBEAgAUEYb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yAENgIQIAJBADYCCCACQgA3AgALIAIQSSADQgA3AiggA0IANwIgIAEoAnghCSABKAJ8IQVBACEEIAJBADYCAEEEECMiB0EBNgIAIAIgBTYCCCACIAU2AgQgAiAHNgIMIANBIGohCgJAIAVFDQAgAiAFQQJ0IggQJyIENgIAIAhFDQAgBCAJIAj8CgAACyACIApHBEAgAyAHNgIsIAJBADYCDCADIAU2AiggAyAFNgIkIAMgBDYCICACQQA2AgggAkIANwIACyACEEkgAkEQaiQAIABBADYCkAEgAEIANwOIAQJAIAEoAowBIgNFDQAgASgCiAEhBCADQQN0IgIQJyEGIAJFDQAgBiAEIAL8CgAAC0EAIQIgAEEANgKgASAAQgA3A5gBIAAgAzYCkAEgACADNgKMASAAIAY2AogBQQAhBgJAIAEoApwBIgNFDQAgASgCmAEhBSADQRhsIgQQJyEGIARFDQAgBiAFIAT8CgAACyAAQQA2ArABIABCADcDqAEgACADNgKgASAAIAM2ApwBIAAgBjYCmAECQCABKAKsASIDRQ0AIAEoAqgBIQQgA0EYbCIGECchAiAGRQ0AIAIgBCAG/AoAAAtBACEGIABBADYCwAEgAEIANwO4ASAAIAM2ArABIAAgAzYCrAEgACACNgKoAUEAIQICQCABKAK8ASIDRQ0AIAEoArgBIQUgA0EFdCIEECchAiAERQ0AIAIgBSAE/AoAAAsgACADNgLAASAAIAM2ArwBIAAgAjYCuAEgASgCyAEhAiAAQgA3A9ABIAAgAjYCyAEgACAAQdABajYCzAEgAEHMAWogASgCzAEgAUHQAWoQgwMgAEEANgLgASAAQgA3A9gBAkAgASgC3AEiA0UNACABKALYASEEIANBBHQiAhAnIQYgAkUNACAGIAQgAvwKAAALQQAhAiAAQQA2AvABIABCADcD6AEgACADNgLgASAAIAM2AtwBIAAgBjYC2AFBACEGAkAgASgC7AEiA0UNACABKALoASEFIANBMGwiBBAnIQYgBEUNACAGIAUgBPwKAAALIABBADYCgAIgAEIANwP4ASAAIAM2AvABIAAgAzYC7AEgACAGNgLoAQJAIAEoAvwBIgNF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A3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASAAC1UBAn8gAEEANgIIIABCADcCACABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQR1EI8DIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALoAIBBX8jAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABKAIANgIAIAJBBGohAQwBCyACIAAoAgAiBGtBAnUiBkEBaiICQYCAgIAETw0BIAVBDGpB/////wMgAyAEayIDQQF1IgQgAiACIARJGyADQfz///8HTxsgBiAAEEoiAigCCCIDIAEoAgA2AgAgAiADQQRqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFrIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACEFMLIAAgATYCBCAFQSBqJAAPCxAmAAvQAQIBfAF/IwBBEGsiAiQARAAAAAAAAPh/IQECQCAAvUL///////////8Ag0L/////////9/8AVg0ARAAAAAAAAAAAIQEgAEQAAAAAAAAAAGMEQCAAmhA+miEBDAELIACZRAAAAAAAgFZAIAJBDGoQpQNEGC1EVPshCUCiRAAAAAAAgGZAoyEAAkACQAJAAkAgAigCDEEEbw4EAAECAwQLIAAQqAEhAQwDCyAAEJcBIQEMAgsgABCoAZohAQwBCyAAEJcBmiEBCyACQRBqJAAgAQspACAAIAEoAgQgAhASIgEQGzYCBCAAQZygAjYCACABQQlPBEAgARABCwujAQEBf0EkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcDGCAAQoCAgICAgID4PzcDECAAQgA3AwggACACNgIEIAAgAkEMajYCACAAQgA3AyAgAEIANwMwIABCgICAgICAgPg/NwMoIABCADcDOCABKAIAGiAAQQhqIAFBCGoQXiAAQRBqIAFBEGpBMPwKAAAgAAsOACAAQQhqEC8aIAAQLwsCAAtyAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACAAIAEoAgA2AgggACABKAIEIgI2AgwgAgRAIAIgAigCBEEBajYCBAsgAEIANwIQIAEQLxoLVwEDfyAAKAIIIAFJBEAgAUEDdBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBA3QiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy0BAX8gACgCACIBBEAgACABNgIEIAAoAggaIAEQIiAAQQA2AgggAEIANwIACwuLAQEDfyMAQRBrIgMkAEGoAhAjIgJBoJACNgIAIAJCADcCBCACQRBqEDshBCACIAE2AlQgAyACNgIMIAMgBDYCCCACIAIoAgRBAWo2AgQgAyADKQIINwMAIAAgAxBIGiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANBEGokAAs+ACADBEAgACADEKMCIAAoAgQhAyABIAJHBEADQCADIAEQPEEMaiEDIAFBDGoiASACRw0ACwsgACADNgIECwt5AQJ/IwBBEGsiAyQAQSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACADQQRqIAEQWSAAIAMoAgQ2AgggACADKAIINgIMIABCADcCECABEC8aIANBEGokACAAC1gBAX8CQCAAKAIMIgFFDQ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rAwAhBAJAIAEgAWIEQCAFIQIgBiEDIAQhAQwBCyAEIARiDQAgBSACIAIgBWMbIQIgBiADIAMgBmMbIQMgBCABIAEgBGMbIQELIAdBGGoiByAJRw0ACwwBCyAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDAEQAAAAAAADw/yECRAAAAAAAAPD/IQNEAAAAAAAA8P8hAQsgACACOQMoIAAgAzkDICAAIAE5AxhBACEHAkAgACkDAEL///////////8Ag0L/////////9/8AVg0AIAApAwhC////////////AINCgICAgICAgPj/AFoNACAAKQMQQv///////////wCDQoCAgICAgID4/wBaDQAgACkDGEL///////////8Ag0KAgICAgICA+P8AVCAAKQMgQv///////////wCDQoCAgICAgID4/wBUcSAAKQMoQv///////////wCDQoCAgICAgID4/wBUcSEHCyAHRQRAIABBABAsCwuDAQECf0GgARAjIQMjAEEQayICJAAgA0IANwIEIANBgJQCNgIAIAIgASgCADYCCCACIAEoAgQiATYCDCABBEAgASABKAIEQQFqNgIECyACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgAkEQaiQAIAAgAzYCBCAAIAE2AgAgACADQRRqIAEQjwELwAoCC38GfCMAQUBqIgMkACAAKAJcIQQgA0IANwM4IANCADcDMCADQgA3AyggA0IANwMAIANCADcDCCADQgA3AxAgAEGoAWogBEEDbiIGIAMQZwJAAkACQCAEQQJNBEAgBkEEdCEBDAELIAZBBHQQJyEIA0AgAkEEdCILIAAoAtgBakF/NgIMAkAgACgCWCACQQxsaiIFKAIAIglBAEgEQEQAAAAAAAAAACEMDAELIAAoAqgBIAJBGGxqIgEgACgCSCIHIAUoAgRBGGxqIgorAwAgByAJQRhsaiIJKwMAIgyhIg4gByAFKAIIQRhsaiIFKwMIIAkrAwgiDaEiD6IgCisDCCANoSINIAUrAwAgDKEiEKKhIgwgDCAMoiANIAUrAxAgCSsDECIMoSIRoiAKKwMQIAyhIgwgD6KhIg0gDaIgDCAQoiAOIBGioSIOIA6ioKAiDJ8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f0EEEHQiAEGQ4gE2AgAgAEGc4gFBqwMQCwALkwEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARAzIAEgACgCBCIDa0EYbCIEQQBMDQAgBEEYbiEEIAAoAgAgA0EYbGohAwNAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyAEQQFLIARBAWshBA0ACwsgACABNgIEBEAgABBxCwuKAwEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACQQA2AgggAkIANwIAIAIgASgCADYCACACIAEoAgQ2AgQgAiABKAIINgIIIAFBADYCCCABQgA3AgAgAkEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIgNBADYCCCADQgA3AgAgAyABKAIANgIAIAMgASgCBDYCBCADIAEoAgg2AgggAUEANgIIIAFCADcCACACIANBDGo2AgggAigCBCAAKAIEIAAoAgAiA2siAUF0bUEMbGohBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQ1QELIAAgATYCBCAFQSBqJAAPCxAmAAvcAgEEfyMAQRBrIgMkACAAQZCcAjYCACAAEN4BIABBJGogACgCJBC9AyAAIAAoAjQiASAAKAI4IgJHBH8DQCABKAIAIgQEQCAEECILIAFBBGoiASACRw0ACyAAKAI0BSABCzYCOCAAQQA6AHwgAEEAOgAYIAAgACgCJDYCMCAAKAKAASIBBEAgACABNgKEASAAKAKIARogARAiCyAAKAJoIgEEQCAAIAE2AmwgACgCcBogARAiCyAAKAJcIgEEQCAAIAE2AmAgACgCZBogARAiCyAAKAJQIgEEQCAAIAE2AlQgACgCWBogARAiCyAAKAJAIgEEQCAAIAE2AkQgACgCSBogARAiCyAAKAI0IgEEQCAAIAE2AjggACgCPBogARAiCyADIABBJGo2AgwgAygCDCIBKAIAIgIEQCABIAIQvQMgAygCDCIBKAIAIAEoAggaECILIANBEGokACAAC40BAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgAEIANwMYIABCgICAgICAgPg/NwMQIABCADcDCCAAIAI2AgQgACACQQxqNgIAIABCADcDICAAQgA3AzAgAEKAgICAgICA+D83AyggAEIANwM4IABBCGogARBeIAEQLxoLBwAgABEOAAsYAQF/QQwQIyIAQQA2AgggAEIANwIAIAALIAAgACgCBCABEBIiACACKAIEEBUgAEEJTwRAIAAQAQsLSgECfyAAKAIEIgIgACgCCCIBRwRAA0AgACABQQhrIgE2AgggARAvGiACIAAoAggiAUcNAAsLIAAoAgAiAQRAIAAoAgwaIAEQIgsLHQAgAQRAIAAgASgCABBvIAAgASgCBBBvIAEQIgsL+wMBB38CQAJ/QQIgAUEBRg0AGiABIAEgAUEBa3FFDQAaIAEQ9gELIgMgACgCBCIBTQRAIAEgA00NASAAKAIMsyAAKgIQlY38ASECIAEgAyABQQNJIAFpQQFLcgR/IAIQ9gEFIAJBAUEgIAJBAWtna3QgAkECSRsLIgIgAiADSRsiA00NAQsgACEBAkACQCADBEAgA0GAgICABE8NASADQQJ0IgAQIyEFIAEoAgAhAiABIAU2AgAgAgRAIAEoAgQaIAIQIiABKAIAIQULIAEgAzYCBCAABEAgBUEAIAD8CwALIAEoAggiAEUNAiABQQhqIQEgACgCBCECAkAgA2kiBEEBTQRAIAIgA0EBa3EhAgwBCyACIANJDQAgAiADcCECCyAFIAJBAnRqIAE2AgAgACgCACIBRQ0CIANBAWshByAEQQFLIQgDQCABKAIEIQQCQCAIRQRAIAQgB3EhBAwBCyADIARLDQAgBCADcCEECwJAIAIgBEYEQCABIQAMAQsgBSAEQQJ0aiIGKAIARQRAIAYgADYCACABIQAgBCECDAELIAAgASgCADYCACABIAYoAgAoAgA2AgAgBigCACABNgIACyAAKAIAIgENAAsMAgsgASgCACEAIAFBADYCACAABEAgASgCBBogABAiCyABQQA2AgQMAQsQcgALCwtSAQR/IAAoAgAhAQJAIAAoAgQiA0UEQAwBCyADQRhsIgQQJyECIARFDQAgAiABIAT8CgAACyAAIAEEfyABECIgACgCBAUgAws2AgggACACNgIACx0BAX9BBBB0IgBBiO4BNgIAIABByO4BQe0CEAsAC3EBAX8gAkUEQCAAKAIEIAEoAgRGDwsgACABRgRAQQEPCwJAIAAoAgQiAi0AACIARSAAIAEoAgQiAS0AACIDR3INAANAIAEtAAEhAyACLQABIgBFDQEgAUEBaiEBIAJBAWohAiAAIANGDQALCyAAIANGCw4AIABB0ABqECdB0ABqCxsBAX8gAARAIAAoAgAiAQRAIAEQIgsgABAiCwuiAgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAEQPEEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIAEQPBogAiACKAIIQQxqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFBdG1BDGxqIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACENUBCyAAIAE2AgQgBUEgaiQADwsQJgALgQECAn8BfCMAQRBrIgMkAEHwngItAABBAXFFBEBBAUHYiwJBARAGIQRB8J4CQQE6AABB7J4CIAQ2AgALIANBADYCDEHsngIoAgAgASACIANBDGpBABAFIQUgAygCDCEBIAAgBfwDNgIEIABBnKACNgIAIAEEQCABEAQLIANBEGokAAuoAQEDfyMAQaACayIDJAACQAJAIAEoAgAiBCgCkAEiAkUEQCABKAIEIgEgASgCBEEBajYCBAwBCyACIAIoAgxBAWo2AgwgBCgCkAEhAiABKAIEIgEgASgCBEEBajYCBCACRQ0AIAItABBBAUcNACADQQhqEDsiAUEONgJEIAAgARCjAUEBOgCYAiABEDoaDAELIABBADoAmAIgAEEAOgAACyADQaACaiQAC5UCAQN/IAACfwJAIAEoAgQiBEUEQCABQQRqIgUhAgwBCyACKAIAIQYDQCAEIgIoAhAiBSAGSgRAIAQhBSAEKAIAIgQNAQwCC0EAIAUgBk4NAhogAigCBCIEDQALIAJBBGohBQtBiAEQIyIEIAMoAgAoAgA2AhAgBEEYakEAQfAA/AsAIARCADcDKCAEQoCAgICAgID4PzcDICAEQX82AhggBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQQA7AYABIAEgAiAFIAQQggFBAQs6AAQgACAENgIAC1YBBX8gACgCACICKAIAIgEEQCABIQMgAiEEIAIoAgQiBSABRwRAA0AgASAFQRhrECgiBUcNAAsgACgCACIEKAIAIQMLIAIgATYCBCAEKAIIGiADECILC0oBA38gACgCBCICIAFHBEADQCACQQxrIgQoAgAiAwRAIAJBCGsgAzYCACACQQRrKAIAGiADECILIAQiAiABRw0ACwsgACABNgIECwwAIAEgACgCABEEAAvzAgEFfyAAKAIEIAAoAgAiAmtBAnUiAyABSQRAIwBBIGsiBSQAAkACQAJAIAEgA2siAyAAKAIIIgQgACgCBCICa0ECdU0EQCAAIAMEfyADQQJ0IgAEQCACQQAgAPwLAAsgACACagUgAgs2AgQMAQsgAiAAKAIAIgJrQQJ1IgYgA2oiAUGAgICABE8NASAFQQxqQf////8DIAQgAmsiAkEBdSIEIAEgASAESRsgAkH8////B08bIAYgABBKIgEoAgghAiADQQJ0IgMEQCACQQAgA/wLAAsgASACIANqNgIIIAEoAgQgACgCBCAAKAIAIgRrIgJrIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2AgwgARBTCy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EAgACgCDBogARAiCwuNAQECfCAAIAAQogFEEeotgZmXcT2iIgJEAAAAAAAA8L8gAkQAAAAAAADwv2QbIgJEAAAAAAAA8L8gAr1C////////////AINCgICAgICAgPj/AFQbIgI5AzAgAQRAIAAQogFEAAAAAAAAgD6iIgMgAiACIANjGyECCyAAIAIgACsDOCIDIAIgA2QbOQM4C4sDAQZ/IwBBIGsiAiQAQZiVAiIDIAMoAgAiA0EBajYCACACIAM2AgwgACADNgLIASAAKALcASEBIABB2AFqIgQgACgCXEEDbiIFEDkgACAFNgLcASABQRFJIAEgBUEBdE1yRQRAIAQQgwELIAAoAlwiAUEDbiEFIAFBA08EQCAEKAIAIQZBACEBA0AgBiABQQR0aiIEQX82AgggBCADNgIEIAQgAzYCACABQQFqIgEgBUcNAAsLIAAQ7gIhASAAQcwBaiIEIAAoAtABEG8gACAAQdABajYCzAEgAEIANwPQASACIAJBDGoiADYCFCACQRhqIAQgACACQRRqEHkgAigCGCIAQgA3AyggAEKAgICAgICA+D83AyAgACADNgIYIABCADcDMCAAQgA3AzggAEIANwNIIABCgICAgICAgPg/NwNAIABCADcDUCAAQgA3A1ggAEIANwNoIABCgICAgICAgPg/NwNgIABCADcDcCAAQgA3A3ggAEEAOgCAASAAIAE6AIEBIAJBIGokAAuLAQEBfwJAIAFFDQAgASgCBCIDBEAgAygCBEF/Rw0BCyAAKAIEIgAEQCAAIAAoAgRBAWo2AgQgACAAKAIIQQFqNgIIIAEoAgQhAwsgASAANgIEIAEgAjYCACADBEAgAxAkCyAARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwvHAwIBfwx8IwBB0ABrIgIkACABKwNAIQMgASsDECEEIAErAyghBSABKwMwIQYgASsDOCEHIAIgASsDICIIIAErAwAiCaIgASsDCCIKIAErAxgiC6KhOQNIIAIgCiAGoiAHIAmioTkDQCACIAcgC6IgCCAGoqE5AzggAiAEIAuiIAUgCaKhOQMwIAIgAyAJoiAEIAaioTkDKCACIA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JExLG0vZ7uIT6gokStUpyAT36SvqCioKIgASADoqGgoAwDCyABIAEgAKIiAURJVVVVVVXFP6IgACADRAAAAAAAAOA/oiABIAAgAqIgAER81c9aOtnlPaJE65wriublWr6goiAAIABEff6xV+Mdxz6iRNVhwRmgASq/oKJEpvgQERERgT+goKKhoiADoaChmgwCC0QAAAAAAADwPyAARAAAAAAAAOA/oiIEoSIFRAAAAAAAAPA/IAWhIAShIAAgACAAIABEkBXLGaAB+j6iRHdRwRZswVa/oKJETFVVVVVVpT+goiACIAKiIAAgAETUOIi+6fqovaJExLG0vZ7uIT6gokStUpyAT36SvqCioKIgASADoqGgoJoMAQsgASABIACiIgFESVVVVVVVxT+iIAAgA0QAAAAAAADgP6IgASAAIAKiIABEfNXPWjrZ5T2iROucK4rm5Vq+oKIgACAARH3+sVfjHcc+okTVYcEZoAEqv6CiRKb4EBEREYE/oKCioaIgA6GgoQsgBkEQaiQAC5oCAQV/IAACfyAAKAIEIgIgACgCCEkEQCACIAEQiwFBGGoMAQsjAEEgayIFJAAgACgCBCAAKAIAIgNrQRhtIgRBAWoiAkGr1arVAE8EQBAmAAsgBUEMakGq1arVACAAKAIIIANrQRhtIgNBAXQiBiACIAIgBkkbIANB1arVKk8bIAQgABBkIgIoAgggARCLARogAiACKAIIQRhqNgIIIAAoAgAiASAAKAIEIgMgAigCBCADIAFrQWhtQRhsaiIDEKUCIAAoAgAhASAAIAM2AgAgAiABNgIEIAAgAigCCCIDNgIEIAIgATYCCCAAKAIIIQQgACACKAIMNgIIIAIgATYCACACIAQ2AgwgAhCkAiAFQSBqJAAgAws2AgQLPQECfyAAKAIEIgIgACgCCCIBRwRAIAAgASACIAFrQQdqQXhxajYCCAsgACgCACIBBEAgACgCDBogARAiCwvoAgEGfyABKAI8IgcoAhAiAigCECEFIAAoAjwiAygCECIEKAIQIQYCQAJAIAMoAgggAEYEQCAFIAQ2AhQgBCAFNgIQIAIgBjYCECAGIAI2AhQgAyACNgIQIAMgBygCCCICNgIIIA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QQFqIgQgCUcNAAsLIAMoAhQiAARAIAAQIgsgAygCJCIABEAgABAiCyADKAI0IgAEQCAAECILIANB0ABqJAALVwEDfyAAKAIIIAFJBEAgAUEwbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBMGwiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy4AIAApAwggASkDCFQgACgCACgCDCgCTCIAIAEoAgAoAgwoAkwiAUkgACABRhsLsAEBDHwgASsDSCEHIAErAzAhCCABKwMAIQkgASsDGCEKIAErA1AhCyABKwM4IQwgASsDCCENIAErAyAhDiAAIAIrAwAiAyABKwMQoiACKwMIIgQgASsDKKKgIAIrAxAiBSABKwNAoqAgAisDGCIGIAErA1iioDkDECAAIAMgDaIgBCAOoqAgBSAMoqAgBiALoqA5AwggACADIAmiIAQgCqKgIAUgCKKgIAYgB6KgOQMAC1oBA3wgACsDKJkiAiAAKwMQmSIBIAEgAmMbIgIgACsDIJkiASAAKwMImSIDIAEgA2QbIgEgASACYxsiAiAAKwMYmSIBIAArAwCZIgMgASADZBsiASABIAJjGwu9BwEDfyAAIAFByAD8CgAAIABBADYCUCAAQgA3A0ggACABKAJINgJIIAAgASgCTDYCTCAAIAEoAlA2AlAgAUEANgJQIAFCADcDSCAAQQA2AmAgAEIANwNYIAAgASgCZDYCZCABQQA2AmQgACABKAJYNgJYIAAgASgCXDYCXCAAIAEoAmA2AmAgAUEANgJgIAFCADcDWCAAQQA2AnAgAEIANwNoIAAgASgCdDYCdCABQQA2AnQgACABKAJoNgJoIAAgASgCbDYCbCAAIAEoAnA2AnAgAUEANgJwIAFCADcDaCAAQQA2AoABIABCADcDeCAAIAEoAoQBNgKEASABQQA2AoQBIAAgASgCeDYCeCAAIAEoAnw2AnwgACABKAKAATYCgAEgAUEANgKAASABQgA3A3ggAEEANgKQASAAQgA3A4gBIAAgASgCiAE2AogBIAAgASgCjAE2AowBIAAgASgCkAE2ApABIAFBADYCkAEgAUIANwOIASAAQQA2AqABIABCADcDmAEgACABKAKYATYCmAEgACABKAKcATYCnAEgACABKAKgATYCoAEgAUEANgKgASABQgA3A5gBIABBADYCsAEgAEIANwOoASAAIAEoAqgBNgKoASAAIAEoAqwBNgKsASAAIAEoArABNgKwASABQQA2ArABIAFCADcDqAEgAEEANgLAASAAQgA3A7gBIAAgASgCuAE2ArgBIAAgASgCvAE2ArwBIAAgASgCwAE2AsABIAFBADYCwAEgAUIANwO4ASAAIAEoAsgBNgLIASAAIAEoAswBNgLMASAAIAEoAtABIgM2AtABIAAgASgC1AEiBDYC1AEgAEHQAWohAgJAIARFBEAgACACNgLMAQwBCyADIAI2AgggAUIANwPQASABIAFB0AFqNgLMAQsgAEEANgLgASAAQgA3A9gBIAAgASgC2AE2AtgBIAAgASgC3AE2AtwBIAAgASgC4AE2AuABIAFBADYC4AEgAUIANwPYASAAQQA2AvABIABCADcD6AEgACABKALoATYC6AEgACABKALsATYC7AEgACABKALwATYC8AEgAUEANgLwASABQgA3A+gBIABBADYCgAIgAEIANwP4ASAAIAEoAvgBNgL4ASAAIAEoAvwBNgL8ASAAIAEoAoACNgKAAiABQQA2AoACIAFCADcD+AEgAEEANgKQAiAAQgA3A4gCIAAgASgCiAI2AogCIAAgASgCjAI2AowCIAAgASgCkAI2ApACIAFBADYCkAIgAUIANwOIAiAAC44BAgJ/AXwjAEEQayICJABB6J4CLQAAQQFxRQRAQQJByIsCQQMQBiEDQeieAkEBOgAAQeSeAiADNgIACyACIAEpAgA3AwggAkEANgIEQeSeAigCAEEAQQAgAkEEaiACQQhqEAUhBCACKAIEIQEgACAE/AM2AgQgAEGcoAI2AgAgAQRAIAEQBAsgAkEQaiQAC5oBAQV/IABCADcCBCAAKAIAIQMgAEEANgIAIAAgASgCBCIEEDMgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQUgASgCACEGA0AgBSACQRhsaiIAIAMgBiACQQJ0aigCAEEYbGoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAJBAWoiAiAERw0ACwwBCyADRQ0BCyADECILC4EBAQR/IABCADcCBCAAKAIAIQIgAEEANgIAIAAgASgCBCIEECUgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQAgASgCACEBA0AgACADQQJ0IgVqIAIgASAFaigCAEECdGooAgA2AgAgA0EBaiIDIARHDQALDAELIAJFDQELIAIQIgsL0gQBBH8gASAAIAFGIgM6AAwCQCADDQADQCABKAIIIgMtAAwNAQJAAkAgAygCCCICKAIAIgQgA0YEQAJAIAIoAgQiBUUNACAFLQAMDQAgA0EBOgAMIAIgACACRjoADCAFQQE6AAwMAgsCQCADKAIAIAFGBEAgAyEBDAELIAMgAygCBCIBKAIAIgA2AgQCQAJAAkAgAEUEQCABIAI2AggMAQsgACADNgIIIAMoAggiAigCACABIAI2AgggA0cNAQsgAiABNgIADAELIAIgATYCBAsgASADNgIAIAMgATYCCCABKAIIIgIoAgAhBAsgAUEBOgAMIAJBADoADCACIAQoAgQiADYCACAABEAgACACNgIICyAEIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAQ2AgAMAQsgACAENgIECyAEIAI2AgQgAiAENgIIDwsgBEUNASAELQAMDQEgA0EBOgAMIAIgACACRjoADCAEQQE6AAwLIAIhASAAIAJHDQEMAgsLAkAgAygCACIEIAFHBEAgAyEEDAELIAMgBCgCBCIANgIAIAAEQCAAIAM2AgggAygCCCECCyAEIAI2AggCQCACKAIAIANGBEAgAiAENgIADAELIAIgBDYCBAsgBCADNgIEIAMgBDYCCCAEKAIIIQILIARBAToADCACQQA6AAwgAiACKAIEIgEoAgAiADYCBCAABEAgACACNgIICyABIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAE2AgAMAQsgACABNgIECyABIAI2AgAgAiABNgIICwvgBQIFfAJ/IwBBEGsiBiQAAkAgAL1CIIinQf////8HcSIHQfvDpP8DTQRAIAdBgIDA8gNJDQEgACAAIAAgAKIiAKIgACAAIAAgAKKiIABEfNXPWjrZ5T2iROucK4rm5Vq+oKIgACAARH3+sVfjHcc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EANgIAIAIgBzYCACAFBEAgBRAiCwJAIAAgA0YEQCADIQAMAQsCQCAAQQRrIgQoAgAiBygCACICKQMIIgsgCCgCACIFKQMIIgxSBEAgCyAMUw0BDAILIAIpAwAgBSkDAFcNAQsgACgCACEFIAAhAiAEIQAMAQsLIAAoAgAhAiAAIAg2AgAgAkUNACACECILIAFBBGoiBSAGRw0ACwwBCyAAIANBAXYiBkECdCIIaiEHIAMgBUwEQCAAIAcgAiAGIAQQtQMgByABIAIgAyAGayAEIAhqIgIQtQMgCSADNgIMIAQgA0ECdGohBQJAIAQiASACIgNHBEADQCACIAVGBEAgASADRg0DA0AgASgCACEFIAFBADYCACAAKAIAIQIgACAFNgIAIAIEQCACECILIABBBGohACABQQRqIgEgA0cNAAsMAwsCQAJAAkAgASgCACIHKAIAIgYpAwgiCyACKAIAIggoAgAiCikDCCIMUgRAIAsgDFMNAQwCCyAGKQMAIAopAwBXDQELIAJBADYCACAAKAIAIQYgACAINgIAIAYEQCAGECILIAJBBGohAgwBCyABQQA2AgAgACgCACEGIAAgBzYCACAGBEAgBhAiCyABQQRqIQELIABBBGohACABIANHDQALCyACIAVGDQADQCACKAIAIQMgAkEANgIAIAAoAgAhASAAIAM2AgAgAQRAIAEQIgsgAEEEaiEAIAJBBGoiAiAFRw0ACwsgCUEMaiAEELQDDAELIAAgByACIAYgBCAFELABIAcgASACIAMgBmsiAyAEIAUQsAEgACAHIAEgAiAGIAMgBCAFELkCCyAJQRBqJAALHQECfyAAKAIEIAAoAgAiAmtBDG0EQCAAIAIQewsLFwAgAEHomgI2AgAgAEEEaiABENEEIAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRBAALSgAgACABKAIANgIAIAAgASgCBDYCBCABQgA3AwAgACABKAIINgIIIAAgASgCDDYCDCABQgA3AwggAEEQaiABQRBqQTD8CgAAIAALvAUCBX8CfCMAQSBrIgUkAAJAAkACQCACDgMCAgABCyABQRBrKwMAIAAr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zYCACACIAQ2AgwgAhCMAQsgACABNgIEIAVBIGokAA8LECYAC9gEAwV/AXwBfiMAQRBrIgYkAAJAAkACQCACDgMCAgABCyABQRBrIgErAwAgACsDAGRFDQEgBiAAKQMINwMIIAYgACkDADcDACAAIAEpAwg3AwggACABKQMANwMAIAEgBikDCDcDCCABIAYpAwA3AwAMAQsgAkGAAUwEQCAAIAFGDQEgAEEQaiIDIAFGDQEgACEEA0AgAyEFIAQrAxAiCiAEKwMAZARAIAQpAxghCyADIQIDQAJAIAIgBCIDKQMINwMIIAIgAykDADcDACAAIANGBEAgACEDDAELIAMhAiAKIANBEGsiBCsDAGQNAQsLIAMgCzcDCCADIAo5AwALIAEgBSIEQRBqIgNHDQALDAELIAIgAkEBdiIHayEIIAAgB0EEdCIJaiEFAkAgAiAETARAIAAgBSAHIAMQrwQgBSABIAggAyAJaiIBEK8EIAMgAkEEdGohBCABIQIDQCACIARGBEAgASADRg0EA0AgACADKQMINwMIIAAgAykDADcDACAAQRBqIQAgA0EQaiIDIAFHDQALDAQLAkAgAisDACADKwMAZARAIAAgAikDCDcDCCAAIAIpAwA3AwAgAkEQaiECDAELIAAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiEDCyAAQRBqIQAgASADRw0ACwwBCyAAIAUgByADIAQQxQEgBSABIAggAyAEEMUBIAAgBSABIAcgCCADIAQQ6wIMAQsgAiAERg0AA0AgACACKQMINwMIIAAgAikDADcDACAAQRBqIQAgAkEQaiICIARHDQALCyAGQRBqJAALvQQCBH8BfgJAAkACQCADDgMCAgABCyACKAIAKAIAIgIgAUEEayIBKAIAIgNBA3RqKQMAIAIgACgCACIEQQN0aikDAFoNASAAIAM2AgAgASAENgIADwsgA0GAAUwEQCAAIAFGDQEgAEEEaiIEIAFGDQEgAigCACgCACEGIAAhAwNAIAQiByECIAYgAygCBCIIQQN0aikDACIKIAYgAygCACIFQQN0aikDAFQEQANAAkAgAiAFNgIAIAAgAyIERgRAIAAhBAwBCyAEIQIgCiAGIARB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AgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIABBGGohACADQRhqIgMgAUcNAAsMBAsCQAJAIAIrAwAiCiADKwMAIgtjRQRAIAogC2INASACKAIMIAMoAgxODQELIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBSAHIAMgBBDLASAFIAEgCCADIAQQywEgACAFIAEgByAIIAMgBBCCAwwBCyACIARGDQADQCAAIAIpAxA3AxAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAGQSBqJAALVgEDfyABIABrIgJBGG0hAwJAIAJBgRhOBEAgAyECA0AgAkEYbBBQIgQNAiACQQF2IgINAAsLIAAgASADQQBBABDLAQ8LIAAgASADIAQgAhDLASAEECILOAEBfyAABEAgACgCABDNASAAKAIEEM0BIAAoAhQiAQRAIAAgATYCGCAAKAIcGiABECILIAAQIgsL8gECCHwCfyABKwMAIQYgAisDACEHIAAgASsDCCIFIAMrAwgiCCACKwMIIgkgBaEiC5kgBCsDCCIKIAihIgyZYyIOGyAJIAogDhsgCCAFoSIFmSAKIAmhIgiZYyINGyALIAwgDhsgBSAIIA0bIAUgCKGjIgVEAAAAAAAAAAAgBb1C////////////AINCgICAgICAgPj/AFQbIgWioDkDCCAAIAYgByANGyAHIAahIAWioDkDACAAIAErAxAiBiACKwMQIgcgDRsgBSAHIAahoqA5AxAgACADKwMQIgYgBCsDECIHIA0bIAUgByAGoaKgOQMYC4UEAgZ/An0gAigCACEGIAACfwJAIAEoAgQiBEUNACABKAIAAn8gBEEBayAGcSAEaSIFQQFNDQAaIAYgBCAGSw0AGiAGIARwCyIHQQJ0aigCACICRQ0AIAIoAgAiAkUNACAEQQFrIQggBUEBSyEJA0ACQCAGIAIoAgQiBUcEQAJAIAlFBEAgBSAIcSEFDAELIAQgBUsNACAFIARwIQULIAUgB0cNAwwBCyAC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EBcRsFIAYLDQQMBgsgDiACKAIUIggpAwAiD1MgCyAOVXENAiAOIA9XIAsgDllyRQRAQQEgBmshBgwDCyAIIAIgBRCHASIIDQELIAkhAgwFC0EBIAZrIAYgByAIQQBOc0EBcRshBiAFKQMIIQwLIAdBAXMhBwwBCwtBASECIAlBAUYNAwwBC0ECIQIgCUECRw0AQQAhAgwCCyAFKAIQIgUgAEcNAAsgA0EUaiAAELsDIANBCGogARC7A0EAIQICQCADKAIUIgQgAygCGCIBRg0AQQAhBQJAA0ACQAJAAkAgBCADQQhqELoDIgBBAWsOAgEAAgtBACECIAVBAkYNBCAAIQUgBEEQaiIEIAFHDQIMBAtBASECIAVBAUYNAyAAIQUgBEEQaiIEIAFHDQEMAgsgBEEQaiIEIAFHDQALQQAhAiAFQQFHDQELAn4gAygCFCICIAMoAhgiAEYEQEIAIQtCAAwBC0KAgICAgICAgIB/IQtC////////////ACENQv///////////wAhDEKAgICAgICAgIB/IQ8DQCACKQMIIgogCyAKIAtVGyELIAogDCAKIAxTGyEMIAIpAwAiCiAPIAogD1UbIQ8gCiANIAogDVMbIQ0gAkEQaiICIABHDQALIAsgDHxCAn8hCyANIA98QgJ/CyEKIAMgCzcDKCADIAo3AyAgA0EgaiADQQhqELoDQQFGIQILIAMoAggiAARAIAMgADYCDCADKAIQGiAAECILIAMoAhQiAEUNACADIAA2AhggAygCHBogABAiCyADQTBqJAAgAgvdAgEGfyMAQSBrIgYkAEHQABAjIgRBAEHQAPwLACAEIAAoAoQBIgEgACgCgAEiA2tBAnUiAjYCAAJAAkAgACgCiAEiBSABSwRAIAEgBDYCACABQQRqIQMMAQsgAkEBaiIBQYCAgIAETw0BIAZBDGpB/////wMgBSADayIDQQF1IgUgASABIAVJGyADQfz///8HTxsgAiAAQYABahBKIgEoAggiAiAENgIAIAEgAkEEajYCCCABKAIEIAAoAoQBIAAoAoABIgVrIgJrIQMgAgRAIAMgBSAC/AoAAAsgACgCgAEhAiAAIAM2AoABIAEgAjYCBCAAI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yAAIAIgB2xHDQALIAFBL0kNAQtB0wEhAwNAIAAgA24iASADSQ0DIAAgASADbEYNASAAIANBCmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBDGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBEGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBEmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBFmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBHGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBHmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBJGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBKGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBKmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBLmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBNGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBOmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBPGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBwgBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQcYAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HIAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBzgBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQdIAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HYAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB4ABqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQeQAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HmAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB6gBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQewAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HwAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB+ABqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQf4AaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0GCAWoiAW4iAiABSQ0DIAAgASACbEYNASAAI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ACAARAAAAAAAAGADoiEAIAFBuHBLBEAgAUHJB2ohAQwBCyAARAAAAAAAAGADoiEAQfBoIAEgAUHwaE0bQZIPaiEBCyAAIAFB/wdqrUI0hr+iCwoAIAAgABCnA6ILQwAgACAAIAGlIAG9Qv///////////wCDQoCAgICAgID4/wBWGyABIAC9Qv///////////wCDQoCAgICAgID4/wBYGwtNAgF/AXwjAEEQayIFJAAgBSAENgIIIAUgAzYCDCAAKAIQIgBFBEAQZgALIAAgASACIAVBDGogBUEIaiAAKAIAKAIYERgAIAVBEGokAAukAgICfwV+AkAgASgCEEUNAAJAIAEpAzggASkDKFUEQCABKQMwIAEpAyBVDQELIAAgARC9AiABKAIQIgNFDQEgAyAALQB1QQAgAUFAaxD9AUUNAUL///////////8AIQdCgICAgICAgICAfyEIAkAgASgCQCICIAEoAkQiAEYEQEKAgICAgICAgIB/IQVC////////////ACEGDAELQv///////////wAhBkKAgICAgICAgIB/IQUDQCACKQMIIgQgCCAEIAhVGyEIIAQgBiAEIAZTGyEGIAIpAwAiBCAFIAQgBVUbIQUgBCAHIAQgB1MbIQcgAkEQaiICIABHDQALCyABIAg3AzggASAFNwMwIAEgBjcDKCABIAc3AyALQQEhAgsgAgvtBgIGfwR+IwBBIGsiCCQAAkAgAEUNACAAKAIQIgQgAEYNACACRQRAIAQgACgCFEYNAQsgAxC2AyABBH8gAEEUagUgACgCECIAQRBqCygCACEGIAApAwAhCiAAKQMIIQsCQAJAAkAgAygCBCIEIAMoAggiBUkEQCAEIAs3AwggBCAKNwMAIARBEGohBAwBCyAEIAMoAgAiCWtBBHUiB0EBaiIEQYCAgIABTw0BIAhBDGpB/////wAgBSAJayIFQQN1IgkgBCAEIAlJGyAFQfD///8HTxsgByADEDIiBSgCCCIEIAs3AwggBCAKNwMAIAUgBEEQajYCCCAFKAIEIAMoAgQgAygCACIJayIEayEHIAQEQCAHIAkgBPwKAAALIAMoAgAhCSADIAc2AgAgBSAJNgIEIAMgBSgCCCIENgIEIAUgCTYCCCADKAIIIQcgAyAFKAIMNgIIIAUgCTYCACAFIAc2AgwgBRA2CyADIAQ2AgQgACAGRwRAQRRBECABGyEJA0AgCiAGKQMAIg1RIAYpAwgiDCALUXFFBEACQCADKAIIIgUgBEsEQCAEIAw3AwggBCANNwMAIARBEGohBAwBCyAEIAMoAgAiBGtBBHUiB0EBaiIBQYCAgIABTw0EIAhBDGpB/////wAgBSAEayIEQQN1IgUgASABIAVJGyAEQfD///8HTxsgByADEDIhBSAIKAIUIgEgDDcDCCABIA03AwAgCCABQRBqNgIUIAgoAhAgAygCBCADKAIAIgdrIgFrIQQgAQRAIAQgByAB/AoAAAsgAygCACEBIAMgBDYCACAIIAE2AhAgAyAIKAIUIgQ2AgQgCCABNgIUIAMoAgghByADIAgoAhg2AgggCCAHNgIYIAUgATYCACAFEDYLIAMgBDYCBCAMIQsgDSEKCyAGIAlqKAIAIgYgAEcNAAsLAkAgAg0AIAQgAygCAGtBMEcNACAGKAIUIgAgBigCECIBKAIQRw0AIAApAwAiCiABKQMAIgt9QgF8QgJYBEAgACkDCCABKQMIfUIBfEIDVA0DCyAGKQMAQgF8IgwgC31CAlgEQCAGKQMIIAEpAwh9QgF8QgNUDQMLIAwgCn1CAlYNACAGKQMIIAApAwh9QgF8QgNUDQILQQEhBgwCCxAmAAtBACEGCyAIQSBqJAAgBgvDBAIEfgZ/IwBBEGsiCSQAIAEgASkDGCIDNwMIIAEgASkDECIFNwMAIAEgASgCVEEQQRQgASgCMEEAShtqKAIAIgY2AlQgBikDACEEIAYpAwghAiABIAU3AyAgASACNwMYIAEgBDcDECABAnwgAiADUgRAIAEpAxAgBX25IAIgA325owwBC0T////////v/0T////////vfyABKQMQIAVVGws5AyggASgCYARAIAAgASABEH4gASkDCCEDIAEpAxghAgsCQCACIANRBEAgASgCWC0ACA0BQQAhBkEQQRQgASgCMEEAShsiCCABKAJUaigCACIHKQMIIANSDQEgASkDACEFIAEpABAhBCAALQB0QQFxIQACQANAIABBACAHKQMAIgIgBFMgB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qQQBBKfwLACACIAQoAgAiASkDADcDACABKQMIIRAgAkF/NgIwIAIgEDcDCCACIAIpAwAiEjcDICACIAQoAgAoAhQiATYCVCACIAEpAwg3AxggASkDACEQIAIgBDYCWCACIBA3AxAgAgJ8IAIpAxgiESACKQMIIhBSBEAgAikDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAIpAxAgElUbCzkDKCAEKAIALQAYQQJxRQRAIAIhBgwCC0EAIQYMAgtBACEGQQAhAiABQQJxDQELQegAECMiAUEAQegA/AsAIAFBATYCMCABQTRqQQBBKfwLACABIAQoAgAiAikDADcDACACKQMIIRAgAUEBNgIwIAEgEDcDCCABIAEpAwAiEjcDICABIAQoAgAoAhAiAjYCVCABIAIpAwg3AxggAikDACEQIAEgBDYCWCABIBA3AxAgAQJ8IAEpAxgiESABKQMIIhBSBEAgASkDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAEpAxAgElUbCyIcOQMoAkAgBkUEQEEAIQYMAQsCQCAGKQMYIAYpAwhRBEAgBisDKET////////v/2ENAgwBCyAQIBFRBEAgHET////////vf2ENAgwBCyAGKwMoIBxjDQELIAYhAiABIQYMAQsgASECCyACQQE6AFwgAEEcaiEEAkAgACgCHCIBRQRAIAJCADcDQCAAIAI2AhwMAQsgASACEL8CBEADQAJAIAQoAgAiAUHEAGohBCABKAJEIgVFDQAgBSACEL8CDQELCwJAIAEoAmBBAkYEQCABKAJEIgFFDQELIAIgASgCRCIENgJEIAQEQCAEIAI2AkALIAIgATYCQCABIAI2AkQLDAELIAJBADYCQCACIAAoAhwiATYCRCABIAI2AkAgACACNgIcCwJAIAIoAlgtAAhBAUYEQEEAIQUgACgCHCEBAkAgACgCCARAIAEgAkcEQCACKAI4IQQgAigCNCEFA0ACQCABKAJYIgcoAgRBAUYEQCACIAQgASgCMGoiBDYCOAwBCyAHLQAIDQAgAiAFIAEoAjBqIgU2AjQLIAEoAkQiASACRw0ACwsMAQtBACEEAkAgASACRgRAQQAhAQwBCwNAAkAgAS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EgBEcNAAsgACgCmAEgAkEYbGoiASAOIA4gDqIgEiASoiAQIBCioKCfIg6jRAAAAAAAAAAAIBAgDqMiEL1C////////////AINCgICAgICAgPj/AFQiBBs5AxAgASASIA6jRAAAAAAAAAAAIAQbOQMIIAEgEEQAAAAAAAAAACAEGzkDAAsgAkEBaiICIAlHDQALCyAGKAIAIgAEQCAGIAA2AgQgBigCCBogABAiCyAFQUBrJAALgAEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARA5IAEgACgCBCIDayIEQQBMDQAgACgCACADQQR0aiEDA0AgAyACKQIINwIIIAMgAikCADcCACADQRBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQgwELCz4AIAMEQCAAIAMQ8gEgACgCBCEDIAEgAkcEQANAIAMgARAuQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQLC4gBAQl8IAErAzAhBiABKwMAIQcgASsDGCEIIAErAzghCSABKwMIIQogASsDICELIAAgAisDACIDIAErAxCiIAIrAwgiBCABKwMooqAgAisDECIFIAErA0CioDkDECAAIAMgCqIgBCALoqAgBSAJoqA5AwggACADIAeiIAQgCKKgIAUgBqKgOQMAC0oBAn8gACgCBCICIAAoAggiAUcEQANAIAAgAUEQayIBNgIIIAEQLxogAiAAKAIIIgFHDQALCyAAKAIAIgEEQCAAKAIMGiABECILCzABAn8jAEGgAmsiASQAIAFBCGoQOyICQQ42AkQgACACEO8BIAIQOhogAUGgAmokAAt3AQF/IwBBMGsiAyQAIANBGGogASACEJcCIAMgASACQRhqEJcCIABBMGogASACQTBqEJcCIAAgAykDKDcDECAAIAMpAyA3AwggACADKQMYNwMAIAAgAykDADcDGCAAIAMpAwg3AyAgACADKQMQNwMoIANBMGokAAuMAQECfyAAIAEoAgA2AgACQAJAIAEoAgQiAkUEQCAAQQA2AgQMAQsgAigCBCEBA0ACQCABQX9GBEBBACECDAELIAIgAUEBaiACKAIEIgMgASADRiIBGzYCBCABDQAgAyEBDAELCy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E2AgwgBhA2IAAoAkwhASACKAIAIQULIAAgBDYCSCAFIANBBHRqIQgCQCABIARLBEAgBCAIKQMINwMIIAQgCCkDADcDACAEQRBqIQEMAQsgBCAHKAIAIgRrQQR1IgVBAWoiBkGAgICAAU8NAiAJQQxqQf////8AIAEgBGsiBEEDdSIBIAYgASAGSxsgBEHw////B08bIAUgBxAyIgYoAggiASAIKQMINwMIIAEgCCkDADcDACAGIAYoAghBEGo2AgggBigCBCAAKAJIIAAoAkQiAWsiBWshBCAFBEAgBCABIAX8CgAACyAAKAJEIQUgACAENgJEIAYgBTYCBCAAIAYoAggiATYCSCAGIAU2AgggACgCTCEEIAAgBigCDDYCTCAGIAU2AgAgBiAENgIMIAYQNgsgACABNgJIIANBBHQiBCAAKAI4aiIDKwMIIAArAxAiC6IgAigCACAEaiICKQMIuaAQNPwGIRIgCyADKwMAoiACKQMAuaAQNPwGIRECQCAAKAJMIgIgAUsEQCABIBI3AwggASARNwMAIAFBEGohAgwBCyABIAcoAgAiAWtBBHUiA0EBaiIEQYCAgIABTw0CIAlBDGpB/////wAgAiABayICQQN1IgEgBCABIARLGyACQfD///8HTxsgAyAHEDIiBCgCCCIBIBI3AwggASARNwMAIAQgAUEQajYCCCAEKAIEIAAoAkggACgCRCIBayIDayECIAMEQCACIAEgA/wKAAALIAAoAkQhAyAAIAI2AkQgBCADNgIEIAAgBCgCCCICNgJIIAQgAzYCCCAAKAJMIQEgACAEKAIMNgJMIAQgAzYCACAEIAE2AgwgBBA2CyAAIAI2AkgMAwsgACgCZCIBQQJHIAtEK4cW2c737z9kcQ0BAkACQAJAAkAgAUEBaw4DAwIAAQsgCyAAKwMYRAAAAAAAAPC/oGQNBAsgACACIAMgBBC2AgwECyAAIAIgAyAEAnwgCiALoCAKvUL///////////8Ag0KBgICAgICA+P8AVCALvUL///////////8Ag0KAgICAgICA+P8AWHFFDQAaIAu9IhFCIIinIgJBgIDA/wNrIBGnIgFyRQRAIAoQqQMMAQsgAkEedkECcSIAIAq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EEQayIKJAACQAJAAkACQAJAIAQgBUwEQCAAIAFHDQEgBiEADAILIAIgCUcNAiAGIQAMAwsgBiEAIAchAQNAIAEoAgAhAyABQQA2AgAgACADNgIAIABBBGohACAIQQFqIQggAUEEaiIBIAlHDQALCyAKIAg2AgwjAEEQayIDJAACQCAAIAYiAUYNAANAIAIgCUYEQCAAIAFHBEADQCABKAIAIQQgAUEANgIAIAcoAgAhAiAHIAQ2AgAgAgRAIAIQIgsgB0EEaiEHIAFBBGoiASAARw0ACyAAIQELIAMgBzYCDCADIAE2AggMAgsCQAJAAkAgASgCACIFKAIAIgQpAwgiESAJKAIAIggoAgAiCykDCCISUgRAIBEgElMNAQwCCyAEKQMAIAspAwBXDQELIAlBADYCACAHKAIAIQQgByAINgIAIAQEQCAEECILIAlBBGohCQwBCyABQQA2AgAgBygCACEEIAcgBTYCACAEBEAgBBAiCyABQQRqIQELIAdBBGohByAAIAFHDQALCyADQRBqJAAMAgsgBiEAA0AgASgCACEEIAFBADYCACAAIAQ2AgAgAEEEaiEAIAhBAWohCCABQQRqIgEgAkcNAAsLIAogCDYCDCAKIAM2AgggCSEBIAIhBAJAIAYgACICRg0AA0AgASAHRgRAA0AgAkEEayICKAIAIQEgAkEANgIAIARBBGsiBCgCACEAIAQgATYCACAABEAgABAiCyACIAZHDQAMAwsACwJAAkACQCABQQRrIgAoAgAiCSgCACIFKQMIIhEgAkEEayIDKAIAIggoAgAiCykDCCISUgRAIBEgElMNAQwCCyAFKQMAIAspAwBXDQELIABBADYCACAEQQRrIgEoAgAhBSABIAk2AgAgACEBDAELIANBADYCACAEQQRrIgAoAgAhBSAAIAg2AgAgASEAIAMhAgsgBQRAIAUQIiAAIQELIARBBGshBCACIAZHDQALCwsgBgRAIApBDGogBhC0AwsgCkEQaiQADAILAkAgBCAFSARAIAEgBUECbSINQQJ0aiEKIAEgACIJRwRAIAEgAGtBAnUhCCAKKAIAKAIAIgwpAwghEQNAAn8CQAJAIBEgCSAIQQF2IgtBAnRqI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ECMiAUEANgIIIAFCADcCACAFIAE2AhggAUEEaiEEQQAhAgwCCyABQQRqIQQgASgCBCIAIAEoAggiAk8NASAAIAM2AgAgAEEEaiECDAILIAIoAhAiAARAIAAQIgsgAhAiDAILIAAgASgCACIHa0ECdSIJQQFqIgBBgICAgARPDQIgBkEMakH/////AyACIAdrIgJBAXUiByAAIAAgB0kbIAJB/P///wdPGyAJIAEQSiIAKAIIIgIgAzYCACAAIAJBBGo2AgggACgCBCAEKAIAIAEoAgAiA2siAmshByACBEAgByADIAL8CgAACyABKAIAIQMgASAHNgIAIAAgAzYCBCAEIAAoAggiAjYCACAAIAM2AgggASgCCCEHIAEgACgCDDYCCCAAIAM2AgAgACAHNgIMIAAQUwsgBCACNgIACyAGQSBqJAAMAQsQJgALIAUoAhAiA0UNAyADKAIUIgYgAygCECICKAIQIgRHDQIMAwsgASADRg0CIAIoAhAhBCABKAIUIQYgASEADAALAAsACwsPCwNAIAMoAhAgAxAiIgMNAAsgAUEANgIQC8MCARF+IAIpAwggASkDCCIEfSINIA1CP4ciDoUgDn0iBUL/////D4MiBiABKQMAIgcgACkDAH0iDyAPQj+HIhCFIBB9IghC/////w+DIgl+IgNCIIggBiAIQiCIIgh+fCIRQv////8PgyAJIAVCIIgiCX58IhJCIIYgA0L/////D4OEIAIpAwAgB30iBSAFQj+HIgaFIAZ9IgNC/////w+DIgogBCAAKQMIfSIEIARCP4ciB4UgB30iC0L/////D4MiDH4iE0IgiCAKIAtCIIgiC358IgpC/////w+DIANCIIgiAyAMfnwiDEIghiATQv////8Pg4RRIAggCX4gEUIgiHwgEkIgiHwgAyALfiAKQiCIfCAMQiCIfFFxIA6nIA1CAFVqIBCnIA9CAFVqbCAGpyAFQgBVaiAHpyAEQgBVamxGcQuJAwIEfwJ+An8gASkDICIHIAApAyAiBlIEQCAGIAdTDAELIABBEGoiBSABIAFBEGoiAxCHASICBEAgAkEfdgwBCwJAIAAoAlQiBC0AGEEEcQ0AIAApAxggASkDGFcNACABIAUgB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nVJDQALCyADQQA2AjQgA0IANwIsIAMoAkQhASADQegAakEAQegA/AsAIANCADcDYCADQQI2AlwgA0IANwJUIANB7ABqQQBBMPwLACADQaABakEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIEIAEQmwEgBCADQThqIgUQ4QEgA0EANgL8ASADQgA3AvQBIARBA0ECIAJBAUYbQQIgA0EsaiICIANB9AFqIgEQ4gEgAyABNgIkIANBJGoQKSAEEGkaQRgQIyIBQbSaAjYCACABQgA3AgQgAUEMaiIGIAIQWyADIAE2AhggAyAGNgIUIAMgAykCFDcDCCAAIANBCGoQaiADIAI2AlAgBBApDAELIANBADYCQCADQgA3AjggA0E4aiADKAJEIgIoAgAiBSACKAIEIgIgAiAFa0EMbRBHIAEoAgQgASgCACIEa0HBAE8EQCADQaABaiEGIANB7ABqIQcgA0HoAGohCEEBIQkDQCADQSRqIAQgCUEGdGoQTSADQQA2AjQgA0IANwIsIAMoAiQhBCAIQQBB6AD8CwAgA0IANwNgIANBAjYCXCADQgA3AlQgB0EAQTD8CwAgBkEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIFIANBOGoiAhCbASAFIAQQ4QEgA0EANgL8ASADQgA3AvQBIAVBAUECIANBLGoiBCADQfQBaiIKEOIBIAMgCjYCTCADQcwAahApIAUQaRogAigCACIKBEAgAiAKEHsgAigCCBogAigCABAiIAJBADYCCCACQgA3AgALIAMgAygCLDYCOCADKQIwIRAgA0EANgI0IAMgEDcCPCADQgA3AiwgAyAENgJQIAUQKQJAIAMoAigiAkUNACACIAIoAgQiBUEBazYCBCAFDQAgAiACKAIAKAIIEQAAIAIQJAsgCUEBaiIJIAEoAgQgASgCACIEa0EGdUkNAAsLQRgQIyIBQbSaAjY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ACEOA0AgDiAAKwMAYw0CIABBGGohACADQQFrIgMNAAsMBAsgAyAESg0BIAAgAUYNAyAFIQMgACEHA0AgAyAHKQMQNwMQIAMgBykDCDcDCCADIAcpAwA3AwAgA0EYaiEDIAdBGGoiByABRw0ACwNAIAEgAkYEQCADIAVrQQRrIgFFDQUgACAFIAH8CgAADAULAkAgASsDACAFKwMAYwRAIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAFBGGohAQwBCyAAIAUoAhA2AhAgACAFKQMINwMIIAAgBSkDADcDACAFQRhqIQULIABBGGohACADIAVHDQALDAMLAkAgAyAESARAIAEgBEECbSILQRhsaiEIAkAgACABRgRAIAAhBwwBCyABIABrQRhtIQkgCCsDACEOIAAhBwNAIAcgByAJQQF2IgxBGGxqIgdBGGogDiAHKwMAYyINGyEHIAwgCSAMQX9zaiANGyIJDQALCyAHIABrQRhtIQwMAQsgA0EBRgRAIAogACkDEDcDGCAKIAApAwg3AxAgCiAAKQMANwMIIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAEgCigCGDYCECABIAopAxA3AwggASAKKQMINwMADAQLIAAgA0ECbSIMQRhsaiEHAkAgASACRgRAIAEhCAwBCyACIAFrQRhtIQkgBysDACEOIAEhCANAIAggCUEBdiILQRhsaiINQRhqIAggDSsDACAOYyINGyEIIAkgC0F/c2ogCyANGyIJDQALCyAIIAFrQRhtIQsLIApBCGogByABIAgQ0AMgCigCCCEJAn8gCyAMaiAEIAtrIgQgAyAMayIDakgEQCAAIAcgCSAMIAsgBSAGEMgCIAkhACAIDAELIAkgCCACIAMgBCAFIAYQyAIgCyEEIAwhAyAJIQIgBwshASAEDQEMAgsLIAEgAkYNACAFIQMgASEHA0AgAyAHKQMQNwMQIAMgBykDCDcDCCADIAcpAwA3AwAgA0EYaiEDIAdBGGoiByACRw0ACwNAIAAgAUcEQCACQRhrIgIgAUEYayIEIANBGGsiBiAGKwMAIAQrAwBjIgcbIggoAhA2AhAgAiAIKQMINwMIIAI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EaKgIhSiIAQgDyARoiAEIAQgIKIgDyAKoqCioCIKoqAhHCAPIA8gDyAEIAmioKIgBCAPIAmiIAQgDaKgIhGioCIJoiAEIA8gEaIgBCAEIA8gDaKgoqAiDaKgIhFEAAAAAAAAAABiBEAgGyARoyEbIBwgEaMhHCAaIBGjIRoLIA1EAAAAAAAAAABiBEAgCyANoyELIAogDaMhCiAIIA2jIQgLIAlEAAAAAAAAAABiBEAgDiAJoyEOIBQgCaMhFCAMIAmjIQwLAkAgCiAUoSIJIAkgCaIgCCAMoSIIIAiioCALIA6hIgkgCaKgnyILoyIMvUL///////////8Ag0L/////////9/8AWARAIAYgDDkD+AEgBiAJIAujOQOIAiAGIAggC6M5A4ACDAELIAZCADcDiAIgBkIANwOAAiAGQgA3A/gBC0QAAAAAAAAAACEOIBKaIBUgFaIgFiAWoqAgEiASoqCfIhGjISQgFSARoyIVvUL///////////8Ag0KAgICAgICA+P8AVCECIAUrAxAhISAFKwMIISIgBSsDACEjIAMrAxAiCSAQIBcgF6IgEyAToqAgECAQoqCfIgijRAAAAAAAAAAAIBcgCKMiC71C////////////AINCgICAgICAgPj/AFQiBRsiECALRAAAAAAAAAAAIAUbIhIgAysDACIKokQAAAAAAAAAAKAgEyAIo0QAAAAAAAAAACAFGyITIAMrAwgiDaKgIBAgCaKgIgiioSIMIAyiIAogEiAIoqEiCyALoiANIBMgCKKhIgggCKKgoCIUIAogCqIgDSANoqAgCSAJoqBEEeotgZmXcT2iYwRAICEgGKEiCCAQIBIgIyAfoSIJokQAAAAAAAAAAKAgEyAiIBmhIgqioCAQIAiioCIIoqEiDCAMoiAJIBIgCKKhIgsgC6IgCiATIAiioSIIIAiioKAhFAtEAAAAAAAAAAAhDUQAAAAAAAAAACEJIAsgFJ8iCqMiC71C////////////AINC//////////f/AFgEQCAIIAqjIQ0gDCAKoyEOIAshCQtEAAAAAAAAAAAhCyADKwMwIgggJEQAAAAAAAAAgCACGyIUIBWaRAAAAAAAAACAIAIbIhcgAysDICIM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IARBwAJqIBxEAAAAAAAA8D8gGKEiFyABEOYDIBggF6IiGEQAAAAAAAAAAKAgHEQAAAAAAADwPyAcoaIiF6AhIiAYIAQrA/gHokQAAAAAAAAAAKAgFyAEKwOwBaKgISMgGCAEKwPwB6JEAAAAAAAAAACgIBcgBCsDqAWioCEkIBggBCsD6AeiRAAAAAAAAAAAoCAXIAQrA6AFoqAhIAsgIkQAAAAAAAAAAGIEQCAjICKjISMgJCAioyEkICAgIqMhIAsgCiAjOQMQIAogJDkDCCAKICA5AwAgIL1C////////////AINC//////////f/AFYgJL1C////////////AINC//////////f/AFZyRSAjvUL///////////8Ag0L/////////9/8AWHENACAKIAQpA5AINwMQIAogBCkDiAg3AwggCiAEKQOACDcDAAsgFkEBaiIWIA9HDQALCyAAQQA2ArwBIABBuAFqEJMBAkAgDSgCvAEgDSgCXEYEQCAAEFogABBYDAELIAAQlAILIAAgAxBUIABBfzYCyAELIAQoAhgiAARAIAAQIgsgDRA6GgsgBEHwCGokAAsfACABBEAgACABKAIAENICIAAgASgCBBDSAiABECILCzoAIAEEQCAAIAEoAgAQ0wIgACABKAIEENMCIAEoAhQiAARAIAEgADYCGCABKAIcGiAAECILIAEQIgsLghMCCn8afCMAQYABayICJAAgASgCBCILBEADQAJAIAEoAgAgCGotAABBAUcNACAAKAK4ASEKIAAoArwBBEAgCiAIQQV0aisDGEQAAAAAAAAAAGMNAQtBACEDIAJBADYCeCACQgA3AnAgAkEANgJoIAJCADcCYEQAAAAAAAAAACEVIAAoAkgiBSAAKAJYIAhBAnRqIgRBeEEEIAhBA3BBAkYbaigCAEEYbGoiCSsDACAFIAQoAgBBGGwiBGoiBSsDACIfoSIOIA4gDqIgCSsDCCAFKwMIIiChIgwgDKKgIAkrAxAgBSsDECIhoSIPIA+ioJ8iE6MiDkQAAAAAAAAAACAOvUL///////////8Ag0KAgICAgICA+P8AVCIFGyEOIAwgE6NEAAAAAAAAAAAgBRshDCAPIBOjRAAAAAAAAAAAIAUbIRMgACgCmA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QQxtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMoAgg2AgggASADKQIANwIAIAFBDGohASADQQxqIgMgAkcNAAsLIAAgBSABIAVrajYCBA8LIAIgAWsiA0UgASACRnJFBEAgBCABIAP8CgAACyAAIAMgBGo2AgQPCyAAEEUgA0HWqtWqAUkEQCAAQdWq1aoBIAAoAgggACgCAGtBDG0iBUEBdCIEIAMgAyAESRsgBUGq1arVAE8bEKMCIAAoAgQhAyABIAJHBEADQCADIAEoAgg2AgggAyABKQIANwIAIANBDGohAyABQQxqIgEgAkcNAAsLIAAgAzYCBA8LECYAC9gCAQN/IAAoAgggACgCACIEa0EYbSADTwRAIAAoAgQiBSAEayIGQRhtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACABQRhqIQEgA0EYaiIDIAJHDQALCyAAIAUgASAFa2o2AgQPCyACIAFrIgNFIAEgAkZyRQRAIAQgASAD/AoAAAsgACADIARqNgIEDwsgABBFIANBq9Wq1QBJBEAgAEGq1arVACAAKAIIIAAoAgBrQRhtIgVBAXQiBCADIAMgBEkbIAVB1arVKk8bEPIBIAAoAgQhAyABIAJHBEADQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQPCxAmAAsfACABBEAgACABKAIAEPICIAAgASgCBBDyAiABECILC2EBAn8CQCABKAIEIgNFBEAgASECA0AgAiACKAIIIgIoAgBHDQALDAELA0AgAyICKAIAIgMNAAsLIAEgACgCAEYEQCAAIAI2AgALIAAgACgCCEEBazYCCCAAKAIEIAEQxAQL1AMBCn8jAEEgayIEJAAgBEIANwIYIAQgBEEYaiIKNgIUIAEgAkcEQCABIQUDQCAEIAUoAgA2AgggBCAFIAFrQQR1NgIMQRgQIyIIIAQoAggiDT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AsoAnghDiALKAJoIQwgFigCaCEKIAsoAlghByAWKAJYIQNBACEFA0AgByARKAIAIAVqQQJ0IiZqIAMgBUECdCInaigCACANajYCACAMICZqIAogJ2ooAgAgEmo2AgAgDiAmaiATBH8gFigCeCAnaigCACAlagUgJQs2AgAgBUEBaiIFIAhHDQALIBYoAkAhEwsCQCATRSATQQBMcg0AIBMgFigCjAFqQQFrIQ4gISgCACEMIBYoAogBIQpBACEIA0AgDiAIayINIA0gE3AiB0cEQCAKIAhBA3QiA2oiBSANIAdrQQN0aiEHIAwgJCgCACAXbEEDdGogA2ohAwNAIAMgBSsDADkDACADIBdBA3RqIQMgBSATQQN0aiIFIAdHDQALCyAIQQFqIgggE0cNAAsgE0ECTA0AIARCgICAgICAgPg/NwMoIARCADcDQCAEQgA3AzggBEIANwMwIARCgICAgICAgPg/NwNIIARCADcDYCAEQgA3A1ggBEIANwNQIARCgICAgICAgPg/NwNoIARCADcDgAEgBEIANwN4IARCADcDcCAEQdgFaiIDIA9BGGogBEEoaiIFEMoBIBUoAgAhDyAEKwPYBSAEKwPgBWENACAPKwMYITcgDysDMCE4IA8rA0ghOSAPKwMgITogDysDOCEuIA8rA1AhLSAPKwMoISwgDysDQCErIAQgDysDWDkDmAYgBCArOQOQBiAEICw5A4gGIAQgLTkDgAYgBCAuOQP4BSAEIDo5A/AFIAQgOTkD6AUgBCA4OQPgBSAEIDc5A9gFIAUgAxCQASAVKAIAKAIMIgNB2ABqIANByAFqIAUgISAWKAKMASATbiAXIAQoAsQEIBRqKAIAEL4EIBUoAgAhDwsgBEKAgICAgICA+D83AyggBEIANwNAIARCADcDOCAEQgA3AzAgBEKAgICAgICA+D83A0ggBEIANwNgIARCADcDWCAEQgA3A1AgBEKAgICAgICA+D83A2ggBEIANwOAASAEQgA3A3ggBEIANwNwIARB2AVqIA9BGGogBEEoahDKASAVKAIAIQgCQCAEKwPYBSAEKwPgBWEEQCAIKAIMIgUoAkwiAwRAIANBGGwiAwRAIBkoAgAgBCgC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KAIEIhEoApgBIRUgESgCSCEWQQAhAUEAIQIDQAJ/IAogFSAEIA9BBGogAmooAgBBBHRqIhAoAgRBGGwiDmorAwCaZCAOIBZqIg4rAwAiCCAGYyAGIAhhGyAKIBUgECgCCEEYbCITaisDAJpkIBMgFmoiEysDACIJIAZjIAYgCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBAoAgAhGCAOKwMQIQcgDisDCCEFAkAgBiAIoSILIAYgCaEiDCALmSAMmWMiDhsgCSAIoaMiCL1C////////////AINC//////////f/AFYNACATKwMIIgkgBaEiC71C////////////AINCgICAgICAgPj/AFoNACATKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgDhsgCCANoqAhByAFIAkgDhsgCCALoqAhBQsgGUEAIBEoAqgBIg4gGEEDbUEYbGorAwggDiARKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAUgFCsDCCIIYyAFIAhhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AIA5BACAOayAQLQAMGyASaiESIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIQIAc5AxAgECAHOQMIIBAgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyASRQRARAAAAAAAAPh/IQVBAAwBCyASQQAgESgCqAEgA0EYbGorAxBEAAAAAAAAAABkIA8rAyAiBSAPKwM4IgYgFCsDCCIHIA8rAxAiCKEiCZkgByAPKwMoIgehIgqZYyIBGyAGIAWhIgYgCSAKIAEbIAcgCKGjIgeioCAFIAa9Qv///////////wCDQoCAgICAgID4/wBUGyAFIA8rAzAgDysDGKG9Qv///////////wCDQoCAgICAgID4/wBUGyAFIAe9Qv///////////wCDQoCAgICAgID4/wBUGyIFIBQrAxAiBmMgBSAGYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0w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YRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNACAOQQAgDmsgEC0ADBsgEmohEiABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiECAHOQMQIBAgBzkDCCAQIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gEkUEQEQAAAAAAAD4fyEFQQAMAQsgEkEAIBEoAqgBIANBGGxqKwMQRAAAAAAAAAAAYyAPKwMgIgUgDysDOCIGIBQrAwgiByAPKwMQIgihIgmZIAcgDysDKCIHoSIKmWMiARsgBiAFoSIGIAkgCiABGyAHIAihoyIHoqAgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsiBSAUKwMQIgZjIAUgBmEbGwshASAAIAU5AwggACABNgIAC7IJAQ5/IwBBEGsiESQAAkAgBUUNAANAAkACQCAFIAdMIAQgB0xyRQRAIARFDQQgAygCACgCACINIAEoAgAiC0EDdGoiCEEBIAMoAgQoAgAiCWtBAnQiDmohCiAIIAlBAnQiD2ooAgAhCANAIAggDSAAKAIAIglBA3RqIgwgD2ooAgAiEEgNAiAIIBBGBEAgCigCACAMIA5qKAIASA0DCyAAQQRqIQAgBEEBayIEDQALDAQLIAQgBUoNASAAIAFGDQMgBiEEIAAhCANAIAQgCCgCADYCACAEQQRqIQQgCEEEaiIIIAFHDQALIAMoAgQhBSADKAIAIQMDQCABIAJGBEAgBCAGayIBRQ0FIAAgBiAB/AoAAAwFCwJAAkAgAygCACIHIAEoAgAiCEEDdGoiCyAFKAIAIglBAnQiCmooAgAiDCAKIAcgBigCACIKQQN0aiIHaigCACINTgRAIAwgDUcNASALQQEgCWtBAnQiCWooAgAgByAJaigCAE4NAQsgACAINgIAIAFBBGohAQwBCyAAIAo2AgAgBkEEaiEGCyAAQQRqIQAgBCAGRw0ACwwDCwJAIAQgBUgEQ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AgAiDigCSGoiFCsDACEIIA4oApgBIAJqKwMAmiELIAEoAgQiEigCmAEhFSASKAJIIRZBACEBQQAhAgNAAn8gFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwAgC2QgCCAOIBZqIg4rAwAiBmMgBiAIYRsgFSARKAIEQRhsIhBqKwMAIAtkIAggECAWaiIQKwMAIgljIAggCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBEoAgAhGCAQKwMQIQcgECsDCCEFAkAgCCAJoSIKIAggBqEiDCAKmSAMmWMiEBsgBiAJoaMiBr1C////////////AINC//////////f/AFYNACAOKwMIIgkgBaEiCr1C////////////AINCgICAgICAgPj/AFoNACAOKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgEBsgBiANoqAhByAFIAkgEBsgBiAKoqAhBQsgGUEAIBIoAqgBIg4gGEEDbUEYbGorAwggDiASKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIBQrAwgiBiAFYyAFIAZhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AQQAgDmsgDiARLQAMGyATaiETIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIRIAc5AxAgESAHOQMIIBEgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyATRQRARAAAAAAAAPh/IQVBAAwBCyATQQAgEigCqAEgA0EYbGorAxBEAAAAAAAAAABkIBQrAxAiCCAPKwMgIgUgDysDOCIHIBQrAwgiBiAPKwMQIgmhIguZIAYgDysDKCIGoSIKmWMiARsgByAFoSIHIAsgCiABGyAGIAmhoyIGoqAgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsiBWMgBSAIYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBD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RASARKAIIIQgCfyAKIAxqIAUgCmsiBSAEIAxrIgRqSARAIAAgCSAIIAMgDCAKIAYgBxCLAyAIIQAgCwwBCyAIIAsgAiADIAQgBSAGIAcQiwMgCiEFIAwhBCAIIQIgCQshASAFDQEMAgsLIAEgAkYNACAGIQQgASEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAkcNAAsgAygCBCELIAMoAgAhCQNAIAAgASIDRgRAA0AgAkEEayICIARBBGsiBCgCADYCACAEIAZHDQAMAwsACwJAIAkoAgAiCiAEQQRrIgcoAgAiCEEDdGoiDCALKAIAIg1BAnQiAWooAgAiDiABIAogA0EEayIBKAIAIgVBA3RqIgpqKAIAIg9IDQAgDiAPRgRAIAxBASANa0ECdCINaigCACAKIA1qKAIASA0BCyAIIQUgAyEBIAchBAsgAkEEayICIAU2AgAgBCAGRw0ACwsgEUEQaiQAC5QHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCyAOKAJIIAJqIhQrAwAhCCABKAIEIhIoApgBIRUgEigCSCEWQQAhAUEAIQIDQAJ/IAsgFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwBjIAggDiAWaiIOKwMAIgZjIAYgCGEbIAsgFSARKAIEQRhsIhBqKwMAYyAIIBAgFmoiECsDACIJYyAIIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyARKAIAIRggECsDECEHIBArAwghBQJAIAggCaEiCiAIIAahIgwgCpkgDJljIhAbIAYgCaGjIga9Qv///////////wCDQv/////////3/wBWDQAgDisDCCIJIAWhIgq9Qv///////////wCDQoCAgICAgID4/wBaDQAgDisDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIBAbIAYgDaKgIQcgBSAJIBAbIAYgCqKgIQULIBlBACASKAKoASIOIBhBA21BGGxqKwMIIA4gEigCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAUKwMIIgYgBWMgBSAGYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNAEEAIA5rIA4gES0ADBsgE2ohEyABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiESAHOQMQIBEgBzkDCCARIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gE0UEQEQAAAAAAAD4fyEFQQAMAQsgE0EAIBIoAqgBIANBGGxqKwMQRAAAAAAAAAAAZCAUKwMQIgggDysDICIFIA8rAzgiByAUKwMIIgYgDysDECIJoSILmSAGIA8rAygiBqEiCpljIgEbIAcgBaEiByALIAogARsgBiAJoaMiBqKgIAUgB71C////////////AINCgICAgICAgPj/AFQbIAUgDysDMCAPKwMYob1C////////////AINCgICAgICAgPj/AFQbIAUgBr1C////////////AINCgICAgICAgPj/AFQbIgVjIAUgCGEbGwshASAAIAU5AwggACABNgIAC/wHAw9/A3wDfiMAQdABayIEJAAgBEGgAWpBAEEw/AsAIARB8ABqQQBBMPwLACABKAIAIhAoAlggAkECdGoiBUF4QQQgAkEDb0ECRhtqKAIAIQ8gBSgCACEMIAEoAgQhBSAEQQI2AhAgBEKAgICAEDcCCCAFKAJYIg0gA0EDbCIOQQJ0aiERIAUoAmghEgNAQQEhCQJAIA0gBEEIaiAGaigCACIKIA5qIgtBAnQiB2ooAgAiBSARQQRBCCAKQQFGG0EAIAobQYzpAGooAgBBAnRqKAIAIghIBEAgBSEHIAghBQwBCyAHIBJqKAIAIQtBACEJIAghBwsgBEFAayAKQQR0aiIIIAk6AAwgCCAFNgIIIAggBzYCBCAIIAs2AgAgBkEEaiIGQQxHDQALIAQgDzYCOCAEIAw2AjQgAUEIaiENQQAhBkEAIQdBACEIQQAhCQNAIARBCGogDSAEQTRqIAhqKAIAIgsgAyAEQUBrEIoDAkAgBCsDECITvUL///////////8Ag0L/////////9/8AVg0AIAQoAggiCkEAIAprIAsgDEYbIAlqIQkgBk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ARAiCyAGKAIoIgFFDQAgARAiCyAGQThqEJUBCyAMKAIAIgFFDQAgDCABNgIEIAwoAggaIAEQIgsgBkGQAWokACAVIAsQgQUgBSgCRCIBRQ0AIAEQIgsgBUGwAWokACAACzQBAX8gAUGAgICAAU8EQBAmAAsgACABQQR0IgIQIyIBNgIEIAAgATYCACAAIAEgAmo2AggLNAEBfyABQYCAgIACTwRAECYACyAAIAFBA3QiAhAjIgE2AgQgACABNgIAIAAgASACajYCCAtIAQF/IABBADYCCCAAQgA3AgAgAQRAIAAgARDyASAAKAIEIgIgAUEYbGohAQNAIAIQ6wFBGGoiAiABRw0ACyAAIAE2AgQLIAALRAEBfyAAQQA2AgggAEIANwIAIAEEQCAAIAEQjwMgACgCBCECIAFBBHQiAQRAIAJBACAB/AsACyAAIAEgAmo2AgQLIAAL5SEDFH8BfAx9IwBBgAFrIgQkACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMAQJAAkAgAkUNACACLQAQQQFHDQAgAEEOECwMAQsgASgCFCABKAIQa0ECdSIRQQNuIg8gASgCCCIHIAEoAgQiBWtBAnUgASgCACIDbiINckUEQCAAQQAQLAwBCyARQQtLIA1BBE9xRQRAIABBAhAsDAELIANBAk0EQCAAQQUQLAwBCyABKAIgIgwgASgCHCIKayABKAIsIAEoAihrRwRAIABBBhAsDAELAkAgASgCTC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YCACACIAQ2AgwgAhCpAgsgACABNgIEIAVBIGokAA8LECYAC4sBAQN/IwBBEGsiAiQAIAJBCGoiAyABQfgQED8gAigCDCADEKoCIQMgAigCDCIEQQlPBEAgBBABCyAAQQA2AgggAEIANwIAIAAgAxB9IAIgACgCADYCBCACIAM2AgAgAkEIaiACEI0CIAIoAgwgASgCBBAUIAIoAgwiAEEJTwRAIAAQAQsgAkEQaiQAC1sBA38jAEEgayIDJAAgASAAKAIEIgVBAXVqIQEgACgCACEAIANBCGoiBCABIAIgBUEBcQR/IAEoAgAgAGooAgAFIAALEQMAQRgQIyAEEC4gBBAoGiADQSBqJAALMwEDf0EEECMiAiABNgIAQZjxASAAQQNBACEAQdSGAiAAQbncAGpBsgIgAkEAQQBBABAAC0sBAn8gACgCBCIGQQh1IQcgACgCACIAIAEgAiAGQQFxBH8gAygCACAHaigCAAUgBwsgA2ogBEECIAZBAnEbIAUgACgCACgCFBEIAAtRAQF/AkAgAUUNACABQdjoARBiIgFFDQAgASgCCCAAKAIIQX9zcQ0AIAAoAgwoAgQgASgCDCgCBEcNACAAKAIQKAIEIAEoAhAoAgRGIQILIAILewEDfyAAKAIEIgRBAXEhBgJ/IAEtADdBAUYEQCAEQQh1IgUgBkUNARogAigCACAFaigCAAwBCyAEQQh1IAZFDQAaIAEgACgCACgCBDYCOEEAIQJBAAshBSAAKAIAIgAgASACIAVqIANBAiAEQQJxGyAAKAIAKAIcEQUACwsAIAEgAiAAEQEACw0AIAAoAgQgASgCBEYLQAECfyMAQRBrIgIkACMAQRBrIgEkACABIAA2AgwgAUEMakEEEPcBIAFBEGokACACQRBqJABBH3FBAnRB0JwCagtoAQN/IwBBEGsiAyQAIANBADoADiABIABrQQJ1IQEgAigCACEEA0AgAQRAIAEgAUEBdiICQX9zaiACIAAgAkECdGoiAigCACAESSIFGyEBIAJBBGogACAFGyEADAELCyADQRBqJAAgAAvsBAMEfwV+AXwgAkEANgIAAkAgAb1C////////////AINCgICAgICAgPj/AFYgAUQAAAAAAAAAAGFyRQRAIAC9IglCNIinQf8PcSIDQf8PRw0BCyAAIAGiIgAgAKMPCwJAIABEAAAAAAAAAABhDQAgAb0iCkI0iKdB/w9xIQQCfiADRQRAQQAhAyAJQgyGIgdCAFkEQANAIANBAWshAyAHQgGGIgdCAFkNAAsLIAlBASADa62GDAELIAlC/////////weDQoCAgICAgIAIhAshBwJ+IARFBEBBACEEIApCDIYiCEIAWQRAA0AgBEEBayEEIAhCAYYiCEIAWQ0ACwsgCkEBIARrrYYMAQsgCkL/////////B4NCgICAgICAgAiECyEIAn4CQAJAIAMgBE4EQCADIARKBEADQCAHIAh9IgsgByALQgBZIgYbQgGGIQcgBSAGckEBdCEFIANBAWsiAyAESg0ACyAEIQMLIAUgByAIfSIIQgBZIgZyIQUgCCAHIAYbIgdQBEBBRCEDQgAhBwwDCyAHQv////////8HVg0BA0AgA0EBayEDIAciCEIBhiEHIAhCgICAgICAgARUDQALDAELIANBAWogBEcNAwsgA0EATA0AIAdCgICAgICAgAh9IAOtQjSGhAwBCyAHQQEgA2utiAsgAZkhAL8hAQJAAkAgAyAERg0AIANBAWogBEcNASABIAGgIgwgAGQNACAFQQFxRSAAIAxicg0BCyAFQQFqIQUgASAAoSEBCyACQQAgBUH/////B3EiAmsgAiAJIAqFQgBTGzYCACABmiABIAlCAFMbIQALIAALGwAgAEIBhkKAgICAgICAEHxCgYCAgICAgBBUCxUBAX8jAEEQayIBIAA5AwggASsDCAvaFgMSfwR8AX4jAEEwayIJJAACQAJAAkAgAL0iGEIgiKciA0H/////B3EiBkH61L2ABE0EQCADQf//P3FB+8MkRg0BIAZB/LKLgARNBEAgGEIAWQRAIAEgAEQAAEBU+yH5v6AiAEQxY2IaYbTQvaAiFDkDACABIAAgFKFEMWNiGmG00L2gOQMIQQEhAwwFCyABIABEAABAVPsh+T+gIgBEMWNiGmG00D2gIhQ5AwAgASAAIBShRDFjYhphtNA9oDkDCEF/IQMMBAsgGEIAWQRAIAEgAEQAAEBU+yEJwKA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JUQRARAAAAAAAAAAAIAYgB1ENARoLRAAAAAAAAPA/IAggCX25IgMgA6IgBiAHfbkiBSAFoqCfoyIEIAOaoiEDIAQgBaILIQQgACADOQMIIAAgBDkDAAuACAMIfwF8Bn4jAEEQayIGJAAgAEEANgIIIABCADcCACAAIAEoAgAiAyABKAIEIgEgASADa0EMbRBHIABBADYCHCAAIAI2AhggAEEAOgAUIABBADoAECAAQQA6AAwCQCAAKAIAIgIgACgCBCIHRwR/A0ACQAJAAkAgAigCACIBIAIoAgQiBEYNAANAIAEiA0EQaiIBIARGDQEgAykDACADKQMQUg0AIAMpAwggAykDGFINAAsMAQsgASIDIARHDQAgBiAENgIIIAYgBDYCBAwBCyAEIANBIGoiAUcEQCADQRBqIQUDQAJAIAMpAwAgASkDAFEEQCADKQMIIAUpAxhRDQELIAMgASkDCDcDGCADIAEpAwA3AxAgA0EQaiEDCyABIQUgAUEQaiIBIARHDQALCyAGIAQ2AgggBiADQRBqNgIECyAGKAIEIgMgAigCBCIBRwRAIAEgAyABIANraiIFayIERSABIAVGckUEQCADIAUgBPwKAAALIAIgAyAEaiIBNgIECwJAIAEgAigCACIFa0ERSQ0AIAUpAwAhDANAIAFBEGsiAykDACAMUg0BIAFBCGspAwAgBSkDCFINASACIAM2AgQgAyIBIAVrQRBLDQALCyACQQxqIgIgB0cNAAsgACgCHAVBAAtFBEBBACEFIAAtABBBAUYEQCAAQQA6ABALIAAoAgQiAiAAKAIAIgRHBEBC////////////ACEOQoCAgICAgICAgH8hDQNARP///////+9/IQsgBCAFQQxsIglqIgEoAgAiAyABKAIEIgpHBEACQANAAkAgAykDCCIMIA1TDQAgDCANUQRAIAMpAwAgDlkNAQsgC0T////////vf2EEQCAAKAIAIgQgCWoiASgCBCIHIAEoAgAiAWsiCEEhSQ0DAkAgB0EQayICIAcgCEEQcSIHGyIIIAFGBEBEAAAAAAAAAAAhCwwBCyACKQMAIQxEAAAAAAAAAAAhCwNAIAEpAwgiDyABKQMYfLkgASkDACIQIA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AEpAxA3AxAgBCABKQMINwMIIAQgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDACAEIAAgAigCABECAEUNBCADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAQpAxA3AxAgACAEKQMINwMIIAAgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDAAwECyAFBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMBAsgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAEIAIoAgARAgBFDQMgAyAEKQMQNwMYIAMgBCkDCDcDECADIAQpAwA3AwggBCABKQMQNwMQIAQgASkDCDcDCCAEIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAwsgAUEYayEFIABBGGoiASAAIAIoAgARAgAhCCAAQTBqIgQgASACKAIAEQIAIQYCQCAIRQRAIAZFDQEgAyABKQMQNwMYIAMgASkDCDcDECADIAEpAwA3AwggASAEKQMQNwMQIAEgBCkDCDcDCCABIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAAIAIoAgARAgBFDQEgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAQsgBgRAIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgBCkDEDcDECAAIAQpAwg3AwggACAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMADAELIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgAykDGDcDECABIAMpAxA3AwggASADKQMINwMAIAQgASACKAIAEQIARQ0AIAMgASkDEDcDGCADIAEpAwg3AxAgAyABKQMANwMIIAEgBCkDEDcDECABIAQpAwg3AwggASAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMACyAFIAQgAigCABECAEUNAiADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAUpAxA3AxAgBCAFKQMINwMIIAQgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDACAEIAEgAigCABECAEUNAiADIAEpAxA3AxggAyABKQMINwMQIAMgASkDADcDCCABIAQpAxA3AxAgASAEKQMINwMIIAEgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACABIAAgAigCABECAEUNAiADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDAAwCCyAAIABBGGogAEEwaiAAQcgAaiABQRhrIAIQsgMMAQsgAEEYaiIFIAAgAigCABECACEIIABBMGoiBCAFIAIoAgARAgAhBgJAIAhFBEAgBkUNASADIAUpAxA3AxggAyAFKQMINwMQIAMgBSkDADcDCCAFIAQpAxA3AxAgBSAEKQMINwMIIAUgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACAFIAAgAigCABECAEUNASADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAUpAxA3AxAgACAFKQMINwMIIAAgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDAAwBCyAGBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAMAQsgAyAAKQ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GDcDECACIAYpAxA3AwggAiAGKQMINwMADAELIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMACwJAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACwJAIAQgAyAFKAIAEQIARQ0AIAYgAykDEDcDGCAGIAMpAwg3AxAgBiADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBikDGDcDECAEIAYpAxA3AwggBCAGKQMINwMAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACA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yAGKQMAIAgpAwBXDQELIAVBADYCACAEIAc2AgAgBUEEaiEFDAELIABBADYCACAEIAM2AgAgAEEEaiEACyAEQQRqIQQgACACRw0ACwsgASAFRg0AA0AgBSgCACEAIAVBADYCACAEIAA2AgAgBEEEaiEEIAVBBGoiBSABRw0ACwsLDwsgAEEANgIAIAQgAjYCACABKAIAIQAgAUEANgIAIAQgADYCBAseAQJ/IAAoAgQgACgCACICa0EEdQRAIAAgAjYCBAsLjzMBCn8jAEEgayIFJAADQCABQcgAayEKIAFBMGshDCABQRhrIQkCQANAAkACQAJAAkACQCABIABrIghBGG0iBg4GBgYAAQIDBAsgAUEYayIBIAAgAigCABECAEUNBSAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAAQRhqIgMgACACKAIAEQIAIAFBGGsiASADIAIoAgARAgAhBEUEQCAERQ0FIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgASkDEDcDECADIAEpAwg3AwggAyABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMAIAMgACACKAIAEQIARQ0FIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMADAULIAQEQCAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAMgAigCABECAEUNBCAFIAMpAxA3AxggBSADKQMINwMQIAUgAykDADcDCCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwECyABQRhrIQQgAEEYaiIBIAAgAigCABECACEIIABBMGoiAyABIAIoAgARAgAhBgJAIAhFBEAgBkUNASAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAAgAigCABECAEUNASAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCyAGBEAgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACADKQMQNwMQIAAgAykDCDcDCCAAIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwAMAQsgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKQMYNwMQIAEgBSkDEDcDCCABIAUpAwg3AwAgAyABIAIoAgARAgBFDQAgBSABKQMQNwMYIAUgASkDCDcDECAFIAEpAwA3AwggASADKQMQNwMQIAEgAykDCDcDCCABIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwALIAQgAyACKAIAEQIARQ0DIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBSkDGDcDECAEIAUpAxA3AwggBCAFKQMINwMAIAMgASACKAIAEQIARQ0DIAUgASkDEDcDGCAFIAEpAwg3AxAgBSABKQMANwMIIAEgAykDEDcDECABIAMpAwg3AwggASADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMAIAEgACACKAIAEQIARQ0DIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMADAMLIAAgAEEYaiAAQTBqIABByABqIAFBGGsgAhCyAwwCCyAIQb8ETARAIARBAXEEQCACIQYjAEEgayIHJAACQCAAIgIgASIIRg0AIAEgAEEYaiIBRg0AA0AgASIDIAAgBigCABECAARAIAcgASkDEDcDGCAHIAEpAwg3AxAgByABKQMANwMIIAEhBANAAkAgBCAAIgEpAxA3AxAgBCAAKQMINwMIIAQgACkDADcDACAAIAJGBEAgAiEBDAELIAEhBCAHQQhqIAFBGGsiACAGKAIAEQIADQELCyABIAcpAxg3AxAgASAHKQMQNwMIIAEgBykDCDcDAAsgAyIAQRhqIgEgCEcNAAsLIAdBIGokAAwDCyACIQMjAEEgayIIJAACQCABIgYgAEYNACAAQRhqIgEgBkYNAANAIAEiAiAAIAMoAgARAgAEQCAIIAEpAxA3AxggCCABKQMINwMQIAggASkDADcDCANAIAEiBCAAIgEpAxA3AxAgBCAAKQMINwMIIAQgACkDADcDACAIQQhqIABBGGsiACADKAIAEQIADQALIAEgCCkDGDcDECABIAgpAxA3AwggASAIKQMINwMACyACIgBBGGoiASAGRw0ACwsgCEEgaiQADAILIANFBEAgACABRg0CIwBBIGsiCSQAIAEgACIERwRAIAEgAGsiBkEYbSEIIAZBGU4EQCAIQQJrQQF2IQADQCAEIAIgCCAEIAAiA0EYbGoQrwMgAEEBayEAIAMNAAsLIAEiACAARwRAA0AgACAEIAIoAgARAgAEQCAJIAApAxA3AxggCSAAKQMINwMQIAkgACkDADcDCCAAIAQpAxA3AxAgACAEKQMINwMIIAAgBCkDADcDACAEIAkpAxg3AxAgBCAJKQMQNwMIIAQgCSkDCDcDACAEIAIgCCAEEK8DCyAAQRhqIgAgAUcNAAsLIAZBGU4EQCAGQRhuIQMDQCAJIAQpAxA3AxggCSAEKQMINwMQIAkgBCkDADcDCCADIgZBAmtBAXYhCkEAIQggB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kDEDcDECAHIAApAwg3AwggByAAKQMANwMAAkAgByABIghBGGsgAigCABECAARAIAAhBgNAIAcgBkEYaiIGIAIoAgARAgBFDQALDAELIAAhBgNAIAZBGGoiBiAITw0BIAcgBiACKAIAEQIARQ0ACwsgBiAISQRAA0AgByAIQRhrIgggAigCABECAA0ACwsgBiAISQRAA0AgByAGKQMQNwMoIAcgBikDCDcDICAHIAYpAwA3AxggBiAIKQMQNwMQIAYgCCkDCDcDCCAGIAgpAwA3AwAgCCAHKQMoNwMQIAggBykDIDcDCCAIIAcpAxg3AwADQCAHIAZBGGoiBiACKAIAEQIARQ0ACwNAIAcgCEEYayIIIAIoAgARAgANAAsgBiAISQ0ACwsgBkEYayIIIABHBEAgACAIKQMQNwMQIAAgCCkDCDcDCCAAIAgpAwA3AwALIAggBykDEDcDECAIIAcpAwg3AwggCCAHKQMANwMAIAdBMGokACAGIQAMAQsLIAEhByMAQTBrIgkkACAJIAApAxA3AxAgCSAAKQMINwMIIAkgACkDADcDACAAIQYDQCAGIghBGGoiBiAJIAIoAgARAgANAAsCQCAAIAhGBEADQCAGIAdPDQIgB0EYayIHIAkgAigCABECAEUNAAwCCwALA0AgB0EYayIHIAkgAigCABECAEUNAAsLIAYgB08iCkUEQANAIAkgBikDEDcDKCAJIAYpAwg3AyAgCSAGKQMANwMYIAYgBykDEDcDECAGIAcpAwg3AwggBiAHKQMANwMAIAcgCSkDKDcDECAHIAkpAyA3AwggByAJKQMYNwMAA0AgBiIIQRhqIgYgCSACKAIAEQIADQALA0AgB0EYayIHIAkgAigCABECAEUNAAsgBiAHSQ0ACwsgACAIRwRAIAAgCCkDEDcDECAAIAgpAwg3AwggACAIKQMANwMACyAIIAkpAxA3AxAgCCAJKQMINwMIIAggCSkDADcDACAFIAo6AAwgBSAINgIIIAlBMGokACAFKAIIIQgCQCAFLQAMQQFHDQAgACAIIAIQsAMhByAIQRhqIgYgASACELADBEAgCCEBIAdFDQMMAgsgB0UNACAGIQAMAgsgACAIIAIgAyALELcDIAhBGGohAEEAIQQMAQsLIAVBIGokAAubFgIOfwZ+IwBBMGsiBiQAIAZCADcDECAGQgA3AwggASgCMCEDIAEoAlQiAikDCCEQAkAgASgCWC0ACCIOQQFGBEAgA0EASgRAA0AgAiIDKAIQIgIpAwggEFINAyADLQAYQQZxRQ0ADAMLAAsDQCACIgMoAhQiAikDCCAQUg0CIAMtABhBBnFFDQALDAELIANBAEoEQANAIAIiAygCECICKQMIIBBRDQAMAgsACwNAIAIiAygCFCICKQMIIBBRDQALCyADKAIYQR10QR91IANxIQkgASkDICEQAn4CQCABKQMQIhIgASkDAFEEQCABIQIDQCACKAJEIgJBAEchAyACRQ0CIAIoAlQgCUcNAAsMAQsgECASIBAgElUbIRUgECASIBAgElMiAxsMAQsgECEVIBALIRICQAJAIAEoAjxFDQAgBiABKQMINwMgIAYgEDcDGCABIAZBGGoQYyIHKAIYLQBMDQACQCAAKAJgIgIgACgCZCIFSQRAIAJBAToACCACQQA2AgQgAiAHNgIAIAJBDGohBQwBCyACIABB3ABqIgQoAgAiCmtBDG0iDEEBaiICQdaq1aoBTw0CIAZBGGpB1arVqgEgBSAKa0EMbSIFQQF0IgogAiACIApJGyAFQarVqtUATxsgDCAEEGEiAigCCCIFQQE6AAggBUEANgIEIAUgBzYCACACIAVBDGo2AgggAigCBCAAKAJgIAAoAlwiB2siBUF0bUEMbGohBCAFBEAgBCAHIAX8CgAACyAAKAJcIQcgACAENgJcIAIgBzYCBCAAIAIoAggiBTYCYCACIAc2AgggACgCZCEEIAAgAigCDDYCZCACIAc2AgAgAiAENgIMIAIQ1gELIAAgBTYCYAsgAUEQaiEHIABB3ABqIQogAUFAayEMIAFBxABqIQ0DQAJAAkACQCANIAwgAxsoAgAiAkUNAANAIAkgAigCVEYEQAJAIAEoAjxFDQAgAigCYARAIAAgAiACQRBqEH4gASgCPEUNAQsgCSABKAJURwRAA0AgASAHEGMaIAAgARD+ASABKAJUIAlHDQALCyADBEAgACABIAIgBxCGAQwBCyAAIAIgASAHEIYBCwJAIAIoAkQiAyACKAJAIgVyRQRAIAIgACgCHCIHRw0BCwJAIAUEQCAFIAM2AkQMAQsgACADNgIcCyADBEAgAyAFNgJACyACECIgACgCHCEHCyABKAJEIgIgASgCQCIDckUgASAHR3ENAwJAIAMEQCADIAI2AkQMAQsgACACNgIcCyACBEAgAiADNgJACyABECIMAwsCfwJAAkACQAJAIAkgASgCVCIERw0AIAQtABhBA3ENACACKQMgIRQMAQsgAikDICEUAkAgAwRAIBQgFVcNAQwHCyASIBRVDQYLIBQgBykDAFINACACKQMYIhEgAikDCFENACACQSBqIQUgBiAEQRBBFCABKAIwQQBKG2ooAgAiBCkDCDcDECAGIAQpAwA3AwggAigCWCIELQAIIQgCQCADBEACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFUNCAwCCyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIUw0BDAcLAkACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFkNAQwICyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIVw0HCyAGIAEpAwg3AxAgBiAUNwMIDAMLIAYgASkDCDcDECAGIBQ3AwgMAQsgBiABKQMINwMQIAYgFDcDCCACQSBqIQUgA0UNAQsgACABIAIgBkEIahDcASACKAJEIgQEQCAEIAE2AkALIAwoAgAiCARAIAggAjYCRAsgAiABNgJEIAIgC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giA0EIcUUEQCABIANBCHI2AhhBDBAjIgNBADoACCADIAI2AgQgAyABNgIAAkAgACgCBCIBIAAoAggiAkkEQCABIAM2AgAgAUEEaiEDDAELIAEgACgCACIEa0ECdSIFQQFqIgFBgICAgARPDQIgBkEMakH/////AyACIARrIgJBAXUiBCABIAEgBEkbIAJB/P///wdPGyAFIAAQSiIBKAIIIgIgAzYCACABIAJBBGo2AgggASgCBCAAKAIEIAAoAgAiBGsiAmshAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAggiAzYCBCABIAI2AgggACgCCCEEIAAgASgCDDYCCCABIAI2AgAgASAENgIMIAEoAgQiBSABKAIIIgJHBEADQCABIAJBBGsiAjYCCCACKAIAIQQgAkEANgIAIAQEQCAEECIgASgCCCECCyACIAVHDQALCyABKAIAIgIEQCABKAIMGiACECILCyAAIAM2AgQLIAZBIGokAA8LECYAC3gBAn8gACgCPCICIAEoAjwiA0YEQCACIAIpAwhCIIk3AwgPCwJAIAJFDQAgAigCCCAARgRAIAIgATYCCAwBCyACIAE2AgwLAkAgA0UNACADKAIIIAFGBEAgAyAANgIIDAELIAMgADYCDAsgACADNgI8IAEgAjYCPAtqAQJ/IwBBEGsiBCQAIAIEQCADIAJBDGxqIQIDQCAEIAA2AgwgBCABEDwhBSADEEUgAyAFKAIANgIAIAMgBCgCBDYCBCADIAQoAgg2AgggAUEMaiEBIANBDGoiAyACRw0ACwsgBEEQaiQAC/wBAQR/IwBBEGsiByQAIAAoAgQiBiEEIAIgASAGIANraiIFSwRAIAUhAwNAIARBADYCCCAEQgA3AgAgBCADKAIANgIAIAQgAygCBDYCBCAEIAMoAgg2AgggA0EANgIIIANCADcCACAEQQxqIQQgA0EMaiIDIAJJDQALCyAAIAQ2AgQgBiEAIAEiAyAFIgZHBEADQCAAIgFBDGsiABBFIAAgBUEMayICKAIANgIAIAFBCGsgBUEIaygCADYCACABQQRrIAVBBGsiASgCADYCACABQQA2AgAgAkIANwIA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AAKQMQNwOgAiADIAApAxg3A6gCIANBsAJqIANBoAJqIAQRAgAhBEUEQCAERQ0EIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDACACKAIAIQEgAyAAKQMYNwOYAiADIAApAxA3A5ACIAMgACkDADcDgAIgAyAAKQMINwOIAiADQZACaiADQYACaiABEQIARQ0EIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDEAwECyAEBEAgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQPYBDcDCCABIAMpA9AENwMADAQLIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDECACKAIAIQIgAyABKQMINwP4ASADIAEpAwA3A/ABIAMgACkDEDcD4AEgAyAAKQMYNwPoASADQfABaiADQeABaiACEQIARQ0DIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDAAwDCyACKAIAIQQgAyAAKQMYNwO4BCADIAApAxA3A7AEIAMgACkDADcDoAQgAyAAKQMINwOoBCADQbAEaiADQaAEaiAEEQIAIQUgAigCACEEIAMgACkDKDcDmAQgAyAAKQMgNwOQBCADIAApAxA3A4AEIAMgACkDGDcDiAQgAUEQayEBIANBkARqIANBgARqIAQRAgAhBAJAIAVFBEAgBEUNASADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyAgAigCACEEIAMgACkDGDcD+AMgAyAAKQMQNwPwAyADIAApAwA3A+ADIAMgACkDCDcD6AMgA0HwA2ogA0HgA2ogBBECAEUNASADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAMAQsgBARAIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAyg3AwggACAAKQMgNwMAIAAgAykD2AQ3AyggACADKQPQBDcDIAwBCyADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAgAigCACEEIAMgACkDKDcD2AMgAyAAKQMgNwPQAyADIAApAxA3A8ADIAMgACkDGDcDyAMgA0HQA2ogA0HAA2ogBBECAEUNACADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyALIAIoAgAhBCADIAEpAwg3A7gDIAMgASkDADcDsAMgAyAAKQMgNwOgAyADIAApAyg3A6gDIANBsANqIANBoANqIAQRAgBFDQIgAyAAKQMoNwPYBCADIAApAyA3A9AEIAAgASkDCDcDKCAAIAEpAwA3AyAgASADKQPYBDcDCCABIAMpA9AENwMAIAIoAgAhASADIAApAyg3A5gDIAMgACkDIDcDkAMgAyAAKQMQNwOAAyADIAApAxg3A4gDIANBkANqIANBgANqIAERAgBFDQIgAyAAKQMYNwPYBCADIAApAxA3A9AEIAAgACkDKDcDGCAAIAApAyA3AxAgACADKQPYBDcDKCAAIAMpA9AENwMgIAIoAgAhASADIAApAxg3A/gCIAMgACkDEDcD8AIgAyAAKQMANwPgAiADIAApAwg3A+gCIANB8AJqIANB4AJqIAERAgBFDQIgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgACkDGDcDCCAAIAApAxA3AwAgACADKQPYBDcDGCAAIAMpA9AENwMQDAILIAAgAEEQaiAAQSBqIABBMGogAUEQayACEMQDDAELIAIoAgAhBCADIAApAxg3A7gBIAMgACkDEDcDsAEgAyAAKQMANwOgASADIAApAwg3A6gBIANBsAFqIANBoAFqIAQRAgAhByACKAIAIQUgAyAAKQMoNwOYASADIAApAyA3A5ABIAMgACkDEDcDg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IAYgASkDCDcD2AIgBiABKQMANwPQAiAGIAApAwA3A8ACIAYgACkDCDcDyAIgBkHQAmogBkHAAmogBxECACEIIAUoAgAhByAGIAIpAwg3A7gCIAYgAikDADcDsAIgBiABKQMANwOgAiAGIAEpAwg3A6gCIAZBsAJqIAZBoAJqIAcRAgAhBwJAIAhFBEAgB0UNASAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACEHIAYgASkDCDcDmAIgBiABKQMANwOQAiAGIAApAwA3A4ACIAYgACkDCDcDiAIgBkGQAmogBkGAAmogBxECAEUNASAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwAMAQsgBwRAIAYgACkDCDcD6AIgBiAAKQMANwPgAiAAIAIpAwg3AwggACACKQMANwMAIAIgBikD6AI3AwggAiAGKQPgAjcDAAwBCyAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwAgBSgCACEHIAYgAikDCDcD+AEgBiACKQMANwPwASAGIAEpAwA3A+ABIAYgASkDCDcD6AEgBkHwAWogBkHgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwALIAUoAgAhByAGIAMpAwg3A9gBIAYgAykDADcD0AEgBiACKQMANwPAASAGIAIpAwg3A8gBAkAgBkHQAWogBkHAAWogBxECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEHIAYgAikDCDcDuAEgBiACKQMANwOwASAGIAEpAwA3A6ABIAYgASkDCDcDqAEgBkGwAWogBkGgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACEHIAYgASkDCDcDmAEgBiABKQMANwOQASAGIAApAwA3A4ABIAYgACkDCDcDiAEgBkGQAWogBkGAAWogBxECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAUoAgAhByAGIAQpAwg3A3ggBiAEKQMANwNwIAYgAykDADcDYCAGIAMpAwg3A2gCQCAGQfAAaiAGQeAAaiAHEQIARQ0AIAYgAykDCDcD6AIgBiADKQMANwPgAiADIAQpAwg3AwggAyAEKQMANwMAIAQgBikD6AI3AwggBCAGKQPgAjcDACAFKAIAIQQgBiADKQMINwNYIAYgAykDADcDUCAGIAIpAwA3A0AgBiACKQMINwNIIAZB0ABqIAZBQGsgBBECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEDIAYgAikDCDcDOCAGIAIpAwA3AzAgBiABKQMANwMgIAYgASkDCDcDKCAGQTBqIAZBIGogAxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACECIAYgASkDCDcDGCAGIAEpAwA3AxAgBiAAKQMANwMAIAYgACkDCDcDCCAGQRBqIAYgAhECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAZB8AJqJAALCAAgABBpECILhAMCBX8BfCMAQUBqIgIkACAAQQA2AgggAEIANwIAIAJBCGogARBNIAJBADYCPCACQgA3AjQgAkE0aiACKAIIIgEoAgAiAyABKAIEIgEgASADa0EMbRBHAkAgAigCDCIBRQ0AIAEgASgCBCIDQQFrNgIEIAMNACABIAEoAgAoAggRAAAgARAkCyAAIAIoAjggAigCNGtBDG0QViACKAI0IgMgAigCOCIFRwRAA0AgAkEoaiADEDwhBCACQQA2AiQgAkIANwIcIAJBHGogAigCLCAEKAIAa0EEdRBcIAQoAgAiASACKAIsIgZHBEADQCABKwMAIQcgAiABKwMIOQMQIAIgBzkDCCACQRxqIAJBCGoQTCABQRBqIgEgBkcNAAsLIAAgAkEcahB2IAIoAhwiAQRAIAIgATYCICACKAIkGiABECILIAQoAgAiAQRAIAIgATYCLCACKAIwGiABECILIANBDGoiAyAFRw0ACwsgAiACQTRqNgIIIAJBCGoQKSACQUBrJAAL5QECBXwDf0T////////vfyEFRP///////+//IQYCQCABKAIAIgcgASgCBCIIRgRARP///////+//IQNE////////738hBAwBC0T////////vfyEERP///////+//IQMDQCAHKAIAIgEgBygCBCIJRwRAA0AgASsDCCICIAMgAiADZBshAyACIAQgAiAEYxshBCABKwMAIgIgBiACIAZkGyEGIAIgBSACIAVjGyEFIAFBEGoiASAJRw0ACwsgB0EMaiIHIAhHDQALCyAAIAM5AxggACAGOQMQIAAgBDkDCCAAIAU5AwAL1QECB3wDfwJAIAEoAgQiCSABKAIAIgprIgtBEUkNACAAKwMIIQcgACsDACEIA0AgCiALaiIAQRBrKwMAIABBIGsrAwAiAqEiAyAHIABBGGsrAwAiBKEiBaIgAEEIaysDACAEoSIEIAggAqEiAqKhIgZEAAAAAAAAAABkBEAgAiACoiAFIAWioCIFIAMgA6IgBCAEoqAiAyADIAVjG0QAAAAAAAAAAKKZIAYgBqJEAAAAAAAAEECiZkUNAgsgASAJQRBrIgk2AgQgCSAKayILQRBLDQALCwuRPwIKfwJ+IwBB0AhrIgUkAANAIAFBMGshCiABQSBrIQsgAUEQayEJAkADQAJAAkACQAJAAkAgASAAa0EEdSIIDgYGBgABAgMECyABQRBrIgEpAwghDyACKAIAIQIgBSABKQMAIhA3A7AFIAUgDzcDuAggBSAQNwOwCCAFIA83A7gFIAUgACkDADcDoAUgBSAAKQMINwOoBSAFQbAFaiAFQaAFaiACEQIARQ0FIAUgACkD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UEQCADRQ0BIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAApAyg3AxggACAAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDICACKAIAIQMgBSAAKQMYNwPYByAFIAApAxA3A9AHIAUgACkDADcDwAcgBSAAKQMINwPIByAFQdAHaiAFQcAHaiADEQIARQ0BIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDEAwBCyADBEAgBSAAKQMINwPICCAFIAApAwA3A8AIIAAgACkDKDcDCCAAIAApAyA3AwAgACAFKQPICDcDKCAAIAUpA8AINwMgDAELIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDECACKAIAIQMgBSAAKQMoNwO4ByAFIAApAyA3A7AHIAUgACkDEDcDoAcgBSAAKQMYNwOoByAFQbAHaiAFQaAHaiADEQIARQ0AIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAApAyg3AxggACAAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDIAsgAigCACEDIAUgASkDCDcDmAcgBSABKQMANwOQByAFIAApAyA3A4AHIAUgACkDKDcDiAcgBUGQB2ogBUGAB2ogAxECAEUNAyAFIAApAyg3A8gIIAUgACkDIDcDwAggACABKQMINwMoIAAgASkDADcDICABIAUpA8gINwMIIAEgBSkDwAg3AwAgAigCACEBIAUgACkDKDcD+AYgBSAAKQMgNwPwBiAFIAApAxA3A+AGIAUgACkDGDcD6AYgBUHwBmogBUHgBmogARECAEUNAyAFIAApAxg3A8gIIAUgACkDEDcDwAggACAAKQMoNwMYIAAgACkDIDcDECAAIAUpA8gINwMoIAAgBSkDwAg3AyAgAigCACEBIAUgACkDGDcD2AYgBSAAKQMQNwPQBiAFIAApAwA3A8AGIAUgACkDCDcDyAYgBUHQBmogBUHABmogARECAEUNAyAFIAApAwg3A8gIIAUgACkDADcDwAggACAAKQMYNwMIIAAgACkDEDcDACAAIAUpA8gINwMYIAAgBSkDwAg3AxAMAwsgACAAQRBqIABBIGogAEEwaiABQRBrIAIQxAMMAgsgCEEXTARAIARBAXEEQCACIQYjAEHQAGsiByQAAkAgACICIAEiCEYNACAAQRBqIgEgCEYNAANAIAYoAgAhBCAHIAEiAykDCDcDOCAHIAEpAwA3AzAgByAAKQMANwMgIAcgACkDCDcDKCAHQTBqIAdBIGogBBECAARAIAcgASkDCDcDSCAHIAEpAwA3A0AgASEEA0ACQCAEIAAiASkDCDcDCCAEIAApAwA3AwAgACACRgRAIAIhAQwBCyAGKAIAIQkgByAHKQNINwMYIAcgBykDQDcDECAHIAFBEGsiACkDADcDACAHIAApAwg3AwggASEEIAdBEGogByAJEQIADQELCyABIAcpA0g3AwggASAHKQNANwMACyADIgBBEGoiASAIRw0ACwsgB0HQAGokAAwDCyACIQMjAEHQAGsiCCQAAkAgASIEIABGDQAgASAAQRBqIgFGDQADQCADKAIAIQYgCCABIgIpAwg3AzggCCABKQMANwMwIAggACkDADcDICAIIAApAwg3AyggCEEwaiAIQSBqIAYRAgAEQCAIIAEpAwg3A0ggCCABKQMANwNAA0AgASIGIAAiASkDCDcDCCAGIAApAwA3AwAgAygCACEGIAggCCkDSDcDGCAIIAgpA0A3AxAgCCAAQRBrIgApAwg3AwggCCAAKQMANwMAIAhBEGogCCAGEQIADQALIAEgCCkDSDcDCCABIAgpA0A3AwALIAIiAEEQaiIBIARHDQALCyAIQdAAaiQADAILIANFBEAgACABRg0CIwBBMGsiCSQAIAEgACIDRwRAIAEgAGtBBHUiBkECTgRAIAZBAmtBAXYhAANAIAMgAiAGIAMgACIEQQR0ahDCAyAAQQFrIQAgBA0ACwsgASIAIABHBEADQCACKAIAIQQgCSAAKQMINwMYIAkgACkDADcDECAJIAMpAwA3AwAgCSADKQMINwMIIAlBEGogCSAEEQIABEAgCSAAKQMINwMoIAkgACkDADcDICAAIAMpAwg3AwggACADKQMANwMAIAMgCSkDKDcDCCADIAkpAy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ACDcDAAwBCyAHBEAgBSAAKQMYNwPICCAFIAApAxA3A8AIIAAgCykDCDcDGCAAIAspAwA3AxAgCyAFKQPICDcDCCALIAUpA8AINwMADAELIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAgpAwg3AxggACAIKQMANwMQIAggBSkDyAg3AwggCCAFKQPACDcDACACKAIAIQcgBSALKQMINwO4AiAFIAspAwA3A7ACIAUgCCkDADcDoAIgBSAIKQMINwOoAiAFQbACaiAFQaACaiAHEQIARQ0AIAUgCCkDCDcDyAggBSAIKQMANwPACCAIIAspAwg3AwggCCALKQMANwMAIAsgBSkDyAg3AwggCyAFKQPACDcDAAsgAigCACEHIAUgBikDGDcDmAIgBSAGKQMQNwOQAiAFIAApAyA3A4ACIAUgACkDKDcDiAIgBUGQAmogBUGAAmogBxECACEMIAIoAgAhByAFIAopAwg3A/gBIAUgCikDADcD8AEgBSAGKQMQNwPgASAFIAYpAxg3A+gBIAVB8AFqIAVB4AFqIAcRAgAhBwJAIAxFBEAgB0UNASAFIAYpAxg3A8gIIAUgBikDEDcDwAggBiAKKQMINwMYIAYgCikDADcDECAKIAUpA8gINwMIIAogBSkDwAg3AwAgAigCACEHIAUgBikDGDcD2AEgBSAGKQMQNwPQASAFIAApAyA3A8ABIAUgACkDKDcDyAEgBUHQAWogBUHAAWogBxECAEUNASAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcDICAGIAUpA8gINwMYIAYgBSkDwAg3AxAMAQsgBwRAIAUgACkDKDcDyAggBSAAKQMgNwPACCAAIAopAwg3AyggACAKKQMANwMgIAogBSkDyAg3AwggCiAFKQPACDcDAAwBCyAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcDICAGIAUpA8gINwMYIAYgBSkDwAg3AxAgAigCACEHIAUgCikDCDcDuAEgBSAKKQMANwOwASAFIAYpAxA3A6ABIAUgBikDGDcDqAEgBUGwAWogBUGgAWogBxECAEUNACAFIAYpAxg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gAUEYayECIAFBEGsrAwAgACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgAikDEDcDKCADIAIpAwg3AyAgAyACKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQIDQCAEIQUgAkEYaiEGAkAgACsDICACKwMIYwRAIAYgAikDEDcDECAGIAIpAwg3AwggBiACKQMANwMAAn8gAyACIANGDQAaA0AgAiAAKwMgIAJBEGsrAwBjRQ0BGiACIAJBGGsiBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADCyIEIAUoAhA2AhAgBCAFKQMINwMIIAQgBSkDADcDAAwBCyAGIAUpAxA3AxAgBiAFKQMINwMIIAYgBSkDADcDAAsgBiECIAUiAEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgVBGGwiBmoiBCAFIAMgBRC1ASAEIAEgAiAFayICIAMgBmogAhC1ASAEIQIDQCABIAJGBEAgACAERg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAERw0ACwwECwJAIAIrAwggACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAERw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwudBQEIfyMAQSBrIgUkACADIQQCQCABIAJGDQAgAiAERgRAIAEhBAwBCyACIAFBGGoiBEYEQCAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCADIAJrIgJBBGsiBwRAIAEgBCAH/AoAAAsgASACaiIEIAUoAhg2AhAgBCAFKQMQNwMIIAQgBSkDCDcDAAwBCyADIAJBGGpGBEAgBSADQRhrIgIpAxA3AxggBSACKQMINwMQIAUgAikDADcDCCADIAIgAWsiB0FobUEYbGohBAJAIAEgAkYNACAHQQRrIgJFDQAgBCABIAL8CgAACyABIAUoAhg2AhAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCwJ/IwBBIGshBiACIAEiBGsiCUEYbSIHIAMgAmsiC0EYbSIBRwRAIAchAgNAIAIgASICbyIBDQALIAQgAkEYbGohAgNAIAYgAkEYayICKQMQNwMYIAYgAikDCDcDECAGIAIpAwA3AwggAiAJaiEIIAIhAQNAIAEiCiAIIgEoAhA2AhAgCiABKQMINwMIIAogASkDADcDACABIAlqIAQgByADIAFrQRhtIghrQRhsaiAHIAhIGyIIIAJHDQALIAEgBigCGDYCECABIAYpAxA3AwggASAGKQMINwMAIAIgBEcNAAsgBCALagwBCwJAIAIgBEYgAiADRnINACACIQEDQCAGIAQpAxA3AxggBiAEKQMINwMQIAYgBCkDADcDCCAEIAEoAhA2AhAgBCABKQMINwMIIAQgASkDADcDACABIAYoAhg2AhAgASAGKQMQNwMIIAEgBikDCDcDACAEQRhqIgQgAkYNASABQRhqIgEgA0cNAAsLIAILIQQLIAAgAzYCBCAAIAQ2AgAgBUEgaiQAC4IGAQN/AkACQAJAAkACQCACDgMEAgABCyABQRhrIgErAwAgACsDAGMEQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgASkDEDcDKCADIAEpAwg3AyAgAyABKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQADQCAAQRhqIQUCQCAEKwMAIAArAwBjBEAgBSAAKQMQNwMQIAUgACkDCDcDCCAFIAApAwA3AwACfyADIAAgA0YNABoDQCAAIAQrAwAgAEEYayICKwMAY0UNARogACACKAIQNgIQIAAgAikDCDcDCCAAIAIpAwA3AwAgAiIAIANHDQALIAMLIgIgBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMADAELIAUgBCkDEDcDECAFIAQpAwg3AwggBSAEKQMANwMACyAFIQAgBEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgRBGGwiBmoiBSAEIAMgBBC2ASAFIAEgAiAEayICIAMgBmogAhC2ASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAFRw0ACwwECwJAIAIrAwAgACsDAGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAFRw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwuLCwEQfyMAQSBrIgckACAHQQA2AhggB0IANwIQIAdBEGogASgCJBAlIAEoAgwhDyABKAIIIQogASgCBCELIAEoAgAhBgJAAkACQCACKAIMQQBOBEBBASERDAELQQEhESALQQRBCCAGQQFGG0EAIAYbQZSVAWooAgBHDQELIAohDCAGIQoMAQtBASESIAQgBC0AA0EBczoAAyAEIAQtAAJBAXM6AAIgBCAELQABQQFzOgABIAQgBC0AAEEBczoAAEEAIREgCyEMIAYhCwsgAUEEaiETIAdCgoCAgDA3AgggB0KAgICAEDcCACACQQRqIRADQCAKIQYCQAJAAkACQCAHIAhqKAIAIg0OAwMAAQILIAshBgwCCyAMIQYMAQsgDyEGCyACIQkCQAJAAkAgBg4CAgABCyAQIQkMAQsgAkEIQQwgBkECRhtqIQkLIAkoAgBBAE4EQCAKIQY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QCACKAI0IgVFDQAgAigCMCEHIAVBDGwiAhAnIQYgAkUNACAGIAcgAvwKAAALIAQgBTYCqAcgBCAFNgKkByAEIAY2AqAHDAELIARBADYCqAcgBEIANwOgByAEQfAGakEAQSz8CwAgBCARNgKIByAEIAo2AoQHIAQgCTYCgAcgBCAQNgKMByASQYABEFUgBCgCkAciCCAEKAKUByIGQQV0aiICQgA3AwggAkKAgICAgICA+D83AwAgAkIANwMQIAJCADcDGCAEIAZBAWoiAjYClAcgBCgCmAchBQJAIBBBAEoEQCAEAn8gAiAFTwRAIBIgBUEBdEGAASAFGxBVIAQoApAHIgggBCgClAciBkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBCgCmAchBSAGQQFqDAELIAggAkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBkECagsiBzYClAcCQCAFIAdNBEAgEiAFQQF0QYABIAUbEFUgBCgCkAciCCAEKAKUByIHQQV0aiICQgA3AwggAkIANwMAIAJCADcDGCACQoCAgICAgID4PzcDECAEKAKYByEFDAELIAggB0EFdGoiAkIANwMIIAJCADcDACACQgA3AxggAkKAgICAgICA+D83AxALIAQgB0EBaiICNgKUBwJ/IAIgBU8EQCASIAVBAXRBgAEgBRsQVSAEKAKUByICQQFqIQYgBCgCkAciCCACQQV0agwBCyAHQQJqIQYgCCACQQV0agsiAkIANwMQIAJCADcDCCACQgA3AwAgAkKAgICAgICA+D83AxggBCAGNgKUByAEQoKAgIAwNwLgBSAEQoCAgIAQNwLYBUEAIQ9BACENQQAhBUEAIQ4DQAJAAkAgBEHYBWogDmooAgAiGUEATA0AQQQhByAJIQsCQAJAAkAgGUEBayIMDgICAAELIAUhByAKIQsMAQsgESAQIAxBAkYiAhshCyANIA8gAhshBwsgByALakEBayECAkACQCAMDgIDAQALIAIhDwwBCyACIQ0LIAUhAgsgESAQIBlBAkYbIQxBASEHIAggGUEBakEDcUEFdGoiBSsDGCElIAUrAxAhJiA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8gACABRwRAAkAgACgCDCICRQ0AIAIgAigCACICQQFrNgIAIAJBAUoNACAAKAIMIgIEQCACECILIABBADYCDCAAKAIAIgIEQCACECILIABBADYCCCAAQgA3AgALIAAgASgCDDYCDCABQQA2AgwgACABKAIANgIAIAAgASgCBDYCBCAAIAEoAgg2AgggAUEANgIIIAFCADcCAAJAIAAoAhwiAkUNACACIAIoAgAiAkEBazYCACACQQFKDQAgACgCHCICBEAgAhAiCyAAQQA2AhwgACgCECICBEAgAhAiCyAAQQA2AhggAEIANwIQCyAAIAEoAhw2AhwgAUEANgIcIAAgASgCEDYCECAAIAEoAhQ2AhQgACABKAIYNgIYIAFBADYCGCABQgA3AhACQCAAKAIsIgJFDQAgAiACKAIAIgJBAWs2AgAgAkEBSg0AIAAoAiwiAgRAIAIQIgsgAEEANgIsIAAoAiAiAgRAIAIQIgsgAEEANgIoIABCADcCIAsgACABKAIsNgIsIAFBADYCLCAAIAEoAiA2AiAgACABKAIkNgIkIAAgASgCKDYCKCABQQA2AiggAUIANwIgCwujTgIefxB8IwBBgANrIgokAAJAIAEoAgQiBUUNAAJAIAJFDQAgAi0AEEEBRw0AIABBDhAsDAELIAEoAgAhASAKIAU2AkwgCiABNgJIIApB0ABqIgNCADcCLCADQQA2AiQgA0IANwIcIAMgCigCSDYCLCADIAooAkw2AjAgA0IANwJEIANCADcCPCADQgA3AjRBBBAjIgFBATYCACADQQA2AogBIANCADcCgAEgA0EANgJ4IANCADcCcCADQQA2AmggA0IANwJgIANBADYCWCADQgA3AlAgAyABNgJMIANBADYC9AEgA0IANwLsASADQQA2AuQBIANCADcC3AEgA0EANgLUASADQgA3AswBIANBADYCxAEgA0IANwK8ASADQgA3A6gBIANCADcDsAEgA0H8AWpBAEEw/AsAIApBADYCQCAKQgA3AjhBACEFIwBBkAFrIgYkAAJAIAMoAjBFBEBBBBAjIgFBATYCACAKIAE2AgwgBkEANgKEASAKQQA2AgggCkIANwIAIAZBADYCgAEgBkIANwJ4IApBADYCGCAKQ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QNgIIIAUgASgCIDYCDCAAIAVBBGoQnQUgA0EDaiIDIAQoAgQgBCgCACIBa0EEdUkNAAsLIAVBEGokACAEQRhqEMcBIAQoAgAiAARAIAQgADYCBCAEKAIIGiAAECILIARBMGokAAtFAQF/IAAoAgwEQCAAKAIIEMUEIABBADYCCAJAIAAoAgQiAUUNACABQQJ0IgFFDQAgACgCAEEAIAH8CwALIABBADYCDAsLxAECAn8CfCABKAI4IgIgASgCPCIDNgI8IAMgAjYCOCACIAMrAyAgAisDIKEiBCADKwMYIAIrAxihIgUgBaIgBCAEoqCfIgSjRAAAAAAAAAAAIAUgBKMiBL1C////////////AINCgICAgICAgPj/AFQiAxs5AzAgAiAERAAAAAAAAAAAIAMbOQMoAkAgASgCOCgCACICIAEoAgAiA0YNACADIAEoAjwoAgAiAUYgASACRnINACAAQcgAaiACIAMgARCOBAsLZQECfwJAIAEoAgQiA0UEQCABIQIDQCACIAIoAggiAigCAEcNAAsMAQsDQCADIgIoAgAiAw0ACwsgASAAKAIARgRAIAAgAjYCAAsgACAAKAIIQQFrNgIIIAAoAgQgARDEBCABECILWgEDfyAAKAIIIAFJBEAgAUEYbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBGGxBBGsiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALC74BAQR/IAAQiQQgASgCACEDIAFBADYCACAAKAIAIQIgACADNgIAIAIEQCAAKAIEGiACECILIAAgASgCBDYCBCABQQA2AgQgACABKAIMIgI2AgwgACABKgIQOAIQIAAgASgCCCIDNgIIIAIEQCAAQQhqIQQgAygCBCECAkAgACgCBCIDIANBAWsiBXFFBEAgAiAFcSECDAELIAIgA0kNACACIANwIQILIAAoAgAgAkECdGogBDYCACABQgA3AggLCx0AIAAgASACEIoCIAAgAiADEIoCIAAgAyABEIoCCyoAIAAgACgCDCABQQNsahBcIABBGGogACgCJCABarMgACoCKJWN/AEQcAv+AQEFfyABKAIAIgMgASgCBCIFRwRAA0AgAygCBC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ADIAJrQWhtQRhsaiIDEKUCIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQpAILIARBIGokAA8LECYAC4whAxJ/FXwBfiMAQZADayIFJAACQAJAAkAgBEUNACAELQAQQQFHDQBBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQahA7IQIgAUEONgJUIAUgATYCjAEgBSACNgKIASABIAEoAgRBAWo2AgQgBSAFKQKIATcDKCAAIAVBKGoQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgARCFBCEHAn8gAhCFBCILIAdFckUEQCABIQZBAQwBCyACIQYgASECIAchCSALCyEMIAYoAlxBAk0EQEGoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAIQNyECIAUgATYChAEgBSACNgKAASABIAEoAgRBAWo2AgQgBSAFKQKAATcDACAAIAUQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgAigCXCEIQagCECMiD0GgkAI2AgAgD0IANwIEIA9BEGohAQJAIAhBAk0EQCABIAYQNyEBIAUgDzYCfCAFIAE2AnggDyAPKAIEQQFqNgIEIAUgBSkCeDcDCCAAIAVBCGoQSBoMAQsgASACEDchASAFIA82AlwgBSABNgJYIA8gDygCBEEBajYCBCAFIAUpAlg3AyAgBUHgAGogBUEgahBIIRMgBUEANgJUIAVCADcCTCAFQcwAaiIBIAIoAlxBA25B5wdqQegHbkEBahCTBCABAn8gASgCBCIIIAEoAghJBEAgCCATEC5BGGoMAQsjAEEgayINJAAgASgCBCABKAIAIgprQRhtIg5BAWoiCEGr1arVAE8EQBAmAAsgDUEMakGq1arVACABKAIIIAprQRhtIgpBAXQiECAIIAggEEkbIApB1arVKk8bIA4gARBkIggoAgggExAuGiAIIAgoAghBGGo2AgggASgCACIKIAEoAgQiDiAIKAIEIA4gCmtBaG1BGGxqIg4QpQIgASgCACEKIAEgDjYCACA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AlAI2AgAgA0IANwIEIANBEGohBSMAQRBrIgIkACACIAEoAgAiBjYCCCAGBEBBEBAjIgQgBjYCDCAEQeyXAjYCACAEQgA3AgQLIAIgBDYCDCABQQA2AgAgAiACKQIINwMAIAUgAhD+AiACQRBqJAAgACADNgIEIAAgBTYCACAAIANBFGogBRCPASAHQRBqJAAL0gQBAn8jAEGQBGsiAyQAIANBhARqIAFBABArECogA0H8A2ogAkEAECsQKiADQcgAaiIBIANB6AJqIAMoAoQEIAMoAvwDQQFBABCOAyICQQIQnwIgA0GYAhAjIAEQowE2AiAgA0HgAmogA0EgahCXBCADKAIgIQEgA0EANgIgIAEEQCABEDoQIgsgA0HIAGoiARA6GiABIAJBARCfAiADQZgCECMgARCjATYCICADQUBrIANBIGoQlwQgAygCICEBIANBADYCICABBEAgARA6ECILIANByABqEDoaIAMgAygC4AI2AjggAyADKALkAiIBNgI8IAEEQCABIAEoAgRBAWo2AgQLIAMgAykCODcDECADQcgAaiADQRBqEEMgAyADKAJANgIYIAMgAygCRCIBNgIcIAEEQCABIAEoAgRBAWo2AgQLIAMgAykCGDcDCCADQSBqIgEgA0EIahBDIAAgA0HIAGoiBBCLARogAEEYaiABEIsBGiABECgaIAQQKBoCQCADKAJEIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygC5AIiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAhD8AgJAIAMoAoAEIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCiAQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0GQBGokAAtKAQd/QQQQIyIDIAI2AgBBBBAjIgQgAjYCAEHw7wEgAUGQ6wEiAUEAIQJB7SRBASEFQbsBIAMgASACQfEkaiAFQbsBaiAEEAogAAviAwICfwV8IwBBgAFrIgMkACADQfgAaiABQQAQKxAqAkAgAygCeCgCRCIEBEAgACAEEEYMAQsgAisDACIHIAeiIAIrAwgiBiAGoqAgAisDECIFIAWioCIIRAAAAAAAAAAAYQRAIAAQ6wEaDAELIANCADcDcCADQgA3A2ggA0IANwNgIANEAAAAAAAA8D8gBSAInyIIoyIFIAWiIgkgCaChOQNYIANEAAAAAAAAAAAgBSAGIAijIgaiIgkgCaChIgk5A1AgA0QAAAAAAAAAACAHIAijIgcgBaIiBSAFoKEiBTkDSCADIAk5A0AgA0QAAAAAAADwPyAGIAaiIgggCKChOQM4IANEAAAAAAAAAAAgByAGoiIGIAagoSIGOQMwIAMgBTkDKCADIAY5AyAgA0QAAAAAAADwPyAHIAeiIgUgBaChOQMYIANBCGogARCKASADQRBqIAMoAggiASADQRhqIAEoAgAoAgQRAwAgAyADKQIQNwMAIAAgAxBDIAMoAgwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsCQCADKAJ8IgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIANBgAFqJAALlQUCA38DfCMAQSBrIgUkACAFQRBqIAEQigEgBSgCECEGIwBB0ANrIgEkACACRAAAAAAAgFZAoCIIED4hCSACED4hCiACED4hAiAIED4hCCABQgA3A5ADIAFCgICAgICAgPg/NwOIAyABQgA3A5gDIAFCADcDoAMgASAIOQPIAyABIAKaOQPAAyABQgA3A7gDIAEgCjkDsAMgASAJOQOoAyADRAAAAAAAgFZAoCICED4hCCADED4hCSADED4hAyABIAIQPjkDgAMgAUIANwP4AiABIAM5A/ACIAFCADcD6AIgAUKAgICAgICA+D83A+ACIAFCADcD2AIgASAJmjkD0AIgAUIANwPIAiABIAg5A8ACIAREAAAAAACAVkCgIgIQPiEDIAQQPiEIIAQQPiEEIAIQPiECIAFCADcDoAIgASACOQOYAiABIASaOQOQAiABQgA3A4gCIAEgCDkDgAIgASADOQP4ASABQgA3A6gCIAFCADcDsAIgAUKAgICAgICA+D83A7gCIA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qIgUhAAJAIAQrAwAgAisDAGRFDQAgBSACKQMINwMIIAUgAikDADcDACADIQAgAiADRg0AA0AgBCsDACACQRBrIgArAwBkRQRAIAIhAAwCCyACIAApAwg3AwggAiAAKQMANwMAIAAiAiADRw0ACyADIQALIAAgBCkDCDcDCCAAIAQpAwA3AwAgBEEQaiIEIAFHDQALDAMLIAAgACACQQF2IgRBBHQiBmoiBSAEIAMgBBDFASAFIAEgAiAEayICIAMgBmogAhDFASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMINwMIIAMgACkDADcDACADQRBqIQMgAEEQaiIAIAVHDQALDAQLAkAgAisDACAAKwMAZARAIAMgAikDCDcDCCADIAIpAwA3AwAgAkEQaiECDAELIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiEACyADQRBqIQMgACAFRw0ACwwBCyADIAApAwg3AwggAyAAKQMANwMADAELIAEgAkYNAANAIAMgAikDCDcDCCADIAIpAwA3AwAgA0EQaiEDIAJBEGoiAiABRw0ACwsLbAEBfyAAKAIIIgFFBEBBAA8LAkAgACABKAIAIgBGBEAgAUEANgIAA0AgASgCBCIARQ0CA0AgACIBKAIAIgANAAsMAAsACyABQQA2AgQgAEUNAANAIAAiASgCACIADQAgASgCBCIADQALCyABC6ICAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCADcCACACQQhqIQEMAQsgAiAAKAIAIgRrQQN1IgZBAWoiAkGAgICAAk8NASAFQQxqQf////8BIAMgBGsiA0ECdSIEIAIgAiAESRsgA0H4////B08bIAYgABBLIgIoAgggASkCADcCACACIAIoAghBCGo2AgggAigCBCAAKAIEIAAoAgAiA2siAWshBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQmQELIAAgATYCBCAFQSBqJAAPCxAmAAtTAQF/IABBADYCCCAAQgA3AgAgAQRAIAAg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w0CCyACQQA6AAwgACACKAIIIgJHBEAgAi0ADA0GCyACQQE6AAwPCyACKAIEIgFFDQELIAEtAAxBAUYNACACIQMMAQsgA0EBOgAMIAJBADoADCACIAMoAgQiADYCACAABEAgACACNgIICyADIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAM2AgAMAQsgACADNgIECyADIAI2AgQgAiADNgIIIAIhAQsgAyADKAIIIgAtAAw6AAwgAEEBOgAMIAFBAToADCAAIAAoAgQiASgCACICNgIEIAIEQCACIAA2AggLIAEgACgCCCICNgIIAkAgAigCACAARgRAIAIgATYCAAwBCyACIAE2AgQLIAEgADYCACAAIAE2AggPCyAEQQFxRQRAIAJBAToADCABQQA6AAwgASADKAIEIgQ2AgAgBARAIAQgATYCCAsgAyABKAIIIgQ2AggCQCAEKAIAIAFGBEAgBCADNgIADAELIAQgAzYCBAsgAyABNgIEIAEgAzYCCCACIAAgACACKAIEIgFGGyEAIAEoAgAhAgsgAigCACIBBEAgAS0ADEEBRw0FCwJAIAIoAgQiAwRAIAMtAAxBAUcNAQsgAkEAOgAMIAIoAggiAi0ADEEBRiAAIAJHcQ0BIAJBAToADA8LIAEEQCABLQAMQQFHDQUgAigCBCEDCyADQQE6AAwgAkEAOgAMIAIgAygCACIANgIEIAAEQCAAIAI2AggLIAMgAigCCCIANgIIAkAgACgCACACRgRAIAAgAzYCAAwBCyAAIAM2AgQLIAMgAjYCACACIAM2AgggAiEBDAULIAIoAggiAUEEQQAgAiABKAIARhtqKAIAIQIMAAsACyAEQQE6AAwLDwsgAiEDCyADIAMoAggiAC0ADDoADCAAQQE6AAwgAUEBOgAMIAAgACgCACIBKAIEIgI2AgAgAgRAIAIgADYCCAsgASAAKAIIIgI2AggCQCACKAIAIABGBEAgAiABNgIADAELIAIgATYCBAsgASAANgIEIAAgATYCCAs0AQJ/IAAEQANAIAAoAgAgACgCECIBBEAgACABNgIUIAAoAhgaIAEQIgsgABAiIgANAAsLC+cDAQ1/IwBB4ABrIgdBGGpBAEHI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C4wCAgF/DXwgAQRAIAAoAgAiAyABQRhsaiEBIAArA0ghCCAAKwNAIQkgACsDOCEKIAArAzAhCyAAKwMoIQwgACsDICENIAArAxghDiAAKwMQIQ8gACsDCCEQA0AgAkQAAAAAAAAAACAOIAMrAwAiBKIgCyADKwMIIgWioCAIIAMrAxAiBqKgIgcgByAHoiAQIASiIA0gBaKgIAogBqKgIgcgB6IgDyAEoiAMIAWioCAJIAaioCIEIASioKCfIgWjIAcgBaMiBiAGYiIAGzkDECACRAAAAAAAAAAAIAQgBaMgABs5AwggAkQAAAAAAAAAACAGIAAbOQMAIAJBGGohAiADQRhqIgMgAUcNAAsLC5QBAQR/IAAoAgQiAyABQQF0SyADQRBLcQJAIAEgA00NACAAIAEQVSABIAAoAgQiA2siBEEATA0AIAAoAgAgA0EFdGohAwNAIAMgAikDGDcDGCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQSBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQkwELC5ECAgJ/BnwjAEHQAGsiAyQAIAMgASsDADkDGCADIAErAwg5AyAgASsDECEFIANCgICAgICAgPg/NwMwIAMgBTkDKCADQThqIAIgA0EYaiIEEKEBIAMgASsDGDkDGCADIAErAyA5AyAgASsDKCEFIANCgICAgICAgPg/NwMwIAMgBTkDKCADIAIgBBChASADKwM4IQUgAysDACEGIAMrA0AhByADKwMIIQggACADKwMQIgkgAysDSCIKIAkgCmQiARs5AyggACAIIAcgByAIYyICGzkDICAAIAYgBSAFIAZjIgQbOQMYIAAgCiAJIAEbOQMQIAAgByAIIAIbOQMIIAAgBSAGIAQbOQMAIANB0ABqJAALdAECfyMAQRBrIgIkAEGgARAjIgNBgJQCNgIAIANCADcCBCACIAEoAgA2AgggAiABKAIENgIMIAFCADcCACACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgACADNgIEIAAgATYCACAAIANBFGogARCPASACQRBqJAAL9AQCDn8GfCMAQYABayICJAAgASgCDCEDIAJCADcDICACQoCAgICAgID4PzcDGCACQgA3AyggAkIANwMwIAJCADcDQCACQoCAgICAgID4PzcDOCACQgA3A0ggAkIANwNQIAJCADcDYCACQoCAgICAgID4PzcDWCACQgA3A2ggAkIANwNwIAIgAUEYaiIHIAJBGGoQygECQCACKwMAIAIrAwhhBEAgACADQTD8CgAADAELIAIgASkDcDcDKCACIAEpA2g3AyAgAiABKQNgNwMYIAIgASkDcDcDECACIAEpA2g3AwggAiABKQNgNwMAIAFByABqIQggAUEwaiEJIANBGGohCgNAIAhBCEEQIAVBAUYbQQAgBRsiBGohCyAEIAdqIQwgBCAJaiENIAIgBGoiDisDACERIAJBGGogBGoiDysDACESQQAhAQNAIBECfwJAAkACQCABDgIAAQILIAwrAwAgAysDAKIhEEEAIQYgBwwCCyANKwMAIAMrAwiiIRBBCCEGIAkMAQsgCysDACADKwMQoiEQQRAhBiAICyAEaisDACAGIApqKwMAoiITIBAgECATYxugIREgEiATIBAgECATZBugIRIgAUEBaiIBQQNHDQALIA8gEjkDACAOIBE5AwAgBUEBaiIFQQNHDQALIAIrAwAhECACKwMYIREgAisDCCESIAIrAyAhEyAAIAIrAxAiFCACKwMoIhUgFCAVZCIBGzkDKCAAIBIgEyASIBNkIgMbOQMgIAAgECARIBAgEWQiBBs5AxggACAVIBQgARs5AxAgACATIBIgAxs5AwggACARIBAgBBs5AwALIAJBgAFqJAAL/AMCBX8MfCMAQfABayIDJAAgASsDGCEIIAErAyAhCSABKwMoIQogASsDMCELIAErAzghDCABKwNAIQ0gASsDSCEOIAErA1AhDyABKwNYIRAgASsDYCERIAErA2ghEiABKwNwIRMgA0KAgICAgICA+D83A3ggAyATOQNwIAMgEjkDaCADIBE5A2AgA0IANwNYIAMgEDkDUCADIA85A0ggAyAOOQNAIANCADcDOCADIA05AzAgAyAMOQMoIAMgCzkDICADQgA3AxggAyAKOQMQIAMgCTkDCCADIAg5AwAgA0GAAWoiBCACIAMQ8AEjAEHwAGsiAiQAQaABECMiBUGAlAI2AgAgBUIANwIEIAIgASgCDDYCaCACIAEoAhAiATYCbCABBEAgASABKAIEQQFqNgIECyADQeQBaiEGIAIgAikCaDcDYCACIARB4AD8CgAAIAVBEGoiAUIANwIEIAFBmJICNgIAIAEgAkHgAGoiBygCADYCDCABIAcoAgQiBDYCECAEBEAgBCAEKAIEQQFqNgIECyABQRhqIAJB4AD8CgAAIAFCADcDiAEgAUIANwOAASABQgA3A3ggBxAvGiAGIAU2AgQgBiABNgIAIAYgBUEUaiABEI8BIAJB8ABqJAAgACADKALkATYCACAAIAMoAugBNgIEIANB8AFqJAAL2QIBBH8jAEEwayIEJAAgBCADOgAbIARBADYCFCAEQgA3AgwgBEEEaiABQQRqEJsCIQMgBEEcakEBQQAgBEEMahBLIgEoAggiBSADKAIANgIAIAUgAygCBDYCBCADQgA3AgAgASAFQQhqNgIIIAEoAgQgBCgCECAEKAIMIgdrIgVrIQYgBQRAIAYgByAF/AoAAAsgBCgCDCEFIAQgBjYCDCABIAU2AgQgBCABKAIIIgY2AhAgASAFNgIIIAQoAhQhByAEIAEoAgw2AhQgASAFNgIAIAEgBzYCDCABEG4gAygCBCEBIAQgBjYCEAJAIAFFDQAgASABKAIEIgNBAWs2AgQgAw0AIAEgASgCACgCCBEAACABECQLIARBDGoiASACEP8CIARBHGoiAiABIARBG2oQgAMgACAEKAIcNgIAIAAgBCgCIDYCBCAEIAE2AhwgAhBlIARBMGokAAvgBgIDfwJ8AkACQAJAAkACQCACDgMEAgABCwJAIAFBGGsiAisDACIHIAArAwAiCGNFBEAgByAIYg0BIAFBDGsoAgAgACgCDE4NAQsgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgAyAAKQMANwMYIAMgACkDCDcDICADIAApAxA3AygPCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACADIAIpAwA3AxggAyACKQMINwMgIAMgAikDEDcDKA8LIAJBCEoNASAAIAFGDQIgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiICIAFGDQIgAyEFA0AgACEGIAIhACAFIgJBGGohBQJ/IAYrAxgiByACKwMAIghjRQRAIAUiBCAHIAhiDQEaIAQgBigCJCACKAIMTg0BGgsgBSACKQMQNwMQIAUgAikDCDcDCCAFIAIpAwA3AwAgAyACIANGDQAaAkADQCAAKwMAIgcgAkEYayIEKwMAIghjRQRAIAcgCGINAiAGKAIkIAJBDGsoAgBODQILIAIgBCkDEDcDECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADDAELIAILIgQgACkDEDcDECAEIAApAwg3AwggBCAAKQMANwMAIABBGGoiAiABRw0ACwwCCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyAAIAAgAkEBdiIFQRhsIgZqIgQgBSADIAUQywEgBCABIAIgBWsiAiADIAZqIAIQywEgBCECA0AgASACRgRAIAAgBEYNAgNAIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIANBGGohAyAAQRhqIgAgBEcNAAsMAgsCQAJAIAIrAwAiByAAKwMAIghjRQRAIAcgCGINASACKAIMIAAoAgxODQELIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAJBGGohAgwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIQALIANBGGohAyAAIARHDQALIAEgAkYNAANAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyACQRhqIgIgAUcNAAsLC4sBAQV/IwBBEGsiA0KAgICAEDcCBCADQQI2AgwgACgCACgCACABQQxsaiEEIAAoAgQgAUECdGoiBSgCACEBIAAoAgwhBkEAIQADQCAFIAEgBiAEIANBBGogAGooAgBBAnRqKAIAQQJ0aigCACICIAJBH3UiAnMgAmtqIgE2AgAgAEEEaiIAQQxHDQALCwIAC7cCAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCCDcCCCACIAEpAgA3AgAgAkEQaiEBDAELIAIgACgCACIEa0EEdSIGQQFqIgJBgICAgAFPDQEgBUEM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BiADKAIgIghqKAIAIQ0gACgCLCIJIAQgBSACQQBIIgIbQQJ0aigCACEBIAkgBSAEIAIbQQJ0aigCACEEIAggAygCECAGaigCACICQQJ0aigCACEIIAAoAjQiAyAKQQJ0aigCAEECdCEGIAMgAkEDbSIJQQJ0aigCAEECdCEOA0AgACgCECAGaiICIAIoAgAiA0EBajYCACAAKAIQIA5qIgIgAigCACIFQQFqNgIAIAAoAgAiDyADQQR0IhBqIgIgDTYCDCACIAU2AgggAiABNgIEIAIgBDYCACAPIAVBBHQiBWoiAiAINgIMIAIgAzYCCCACIAQ2AgQgAiABNgIAIAAoAggiAyAQaiICQX82AgwgAiAKNgIIIAJBfzYCBCACIAc2AgAgAyAFaiICQX82AgwgAiAJNgIIIAJBfzYCBCACIAc2AgAgAUEBaiEBIARBAWohBCALQQFqIgsgDEcNAAsLC8cCAQV/IwBBIGsiBiQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkDEDcDECACIAEpAwg3AwggAiABKQMANwMAIAJBGGohAQwBCyACIAAoAgAiBGtBGG0iBUEBaiICQavVqtUATw0BIAZBDGpBqtWq1QAgAyAEa0EYbSIDQQF0IgQgAiACIARJGyADQdWq1SpPGyAFIAAQZCICKAIIIgMgASkDEDcDECADIAEpAwg3AwggAyABKQMANwMAIAIoAgQgACgCBCAAKAIAIgRrIgFBaG1BGGxqIQUgAQRAIAUgBCAB/AoAAAsgACgCACEEIAAgBTYCACACIAQ2AgQgACADQRhqIgE2AgQgAiAENgIIIAAoAgghAyAAIAIoAgw2AgggAiAENgIAIAIgAzYCDCACEIwBCyAAIAE2AgQgBkEgaiQADwsQJgALkwEBA38gACgCGCgCACABQQN0aiICKAIEIQMgACgCCCACKAIAQQJ0aiICIAAoAhAgAUECdGooAgAiASABQR91IgFzIAFrIgEgAigCAGo2AgAgACgCACICIANBA21BAnRqIgQgBCgCACABajYCACACIAAoAhwoAhAgA0ECdGooAgBBA21BAnRqIgAgACgCACABajYCAAuTAQEDfyAAKAIYKAI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MoAgA2AgAgBEEEaiEEIANBBGoiAyABRw0ACwsL6gwDDHwRfwF+IwBBkAFrIhQkACAUQeAAakEAQTD8CwAgFEEwakEAQTD8CwAgFCAENgIsIBQgAzYCKCAUQoCAgIAQNwIAIAEoAgQiGigCSCIfIAdBGGwiFWoiICsDACILIB8gBkEYbCIXaiIhKwMAIgyhIQ4gBUEDbSEiIBooApgBIiMgFWorAwAhDyAXICNqKwMAIRAgASgCACIbKAKYASEcIBsoAkghHUEAIQFBACEXA0ACfyAPIBwgFEEoaiAUIBdqKAIAIh5BAnRqKAIAQRhsIhVqKwMAmiIJZCAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAmiEPIAMgHGorAwCaIRBBACEXA0ACfyAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJIBBkIAwgAyAfaiIDKwMAIghjIAggDGEbIAkgD2QgCCALZCAIIAthG2siHEUEQEQAAAAAAAD4fyEJRAAAAAAAAPh/IQpBAAwBCyAGKwMQIQogBisDCCEJAkAgCCAMoSINIAggC6EiCCANmSAImWMiFRsgDqMiCL1C////////////AINC//////////f/AFYNACAEKwMIIg0gCaEiEb1C////////////AINCgICAgICAgPj/AFoNACAEKwMQIhIgCqEiE71C////////////AINCgICAgICAgPj/AFoNACAKIBIgFRsgCCAToqAhCiAJIA0gFRsgCCARoqAhCQsgHEEAIBsoAqgBIhUgB0EYbGorAwggFSAbKAJoIAJBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAkgAysDCCIIYyAIIAlhGxsLIRUCQCAJvUL///////////8Ag0L/////////9/8AVg0AIBVBACAVayAYGyAZaiEZIAFBAUoEQEECIQEMAQsgAUUgFUUgFnNFckUEQEEBIQEMAQsgAUEYbCIYIBRBMGpqIhYgAykDACIlNwMAIBYgAykDEDcDECAWIAMpAwg3AwggFEHgAGogGGoiAyAJOQMIIAMgCjkDECADICU3AwAgAUEBaiEBIBVBAEchFgsgF0EEaiIXQQhHDQALAn8gGUUEQEQAAAAAAAD4fyEIRAAAAAAAAPh/IQtEAAAAAAAA+H8hCkQAAAAAAAD4fyEJQQAMAQsgFCAUQeAAaiAUQfgAaiAUQTBqIBRByABqEM4BIBQrAwghCyAUKwMAIQggGUEAIBsoAqgBIgEgB0EYbGorAxAgASAbKAJoIAJBAnRqKAIAQQNtQRhsaisDEKCaIBooAqgBIgEgIkEYbGorAxAgASAaKAJoIAVBAnRqKAIAQQNtQRhsaisDEKBjIBQrAxAiCiAUKwMYIgljIAkgCmEbGwshASAAIAk5AyAgACAKOQMYIAAgCzkDECAAIAg5AwggACABNgIAIBRBkAFqJAAL8QMBA38jAEEgayIGJAACQCAAKAIEIAJBMGxqIgcrAwAgASsDG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DQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAIQ8gAyAcaisDACEQQQAhFwNAAn8gECAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJYyAMIAMgH2oiAysDACIIYyAIIAxhGyAJIA9kIAggC2QgCCALYRtrIhxFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgBisDECEKIAYrAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgBCsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgBCsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLIBxBACAbKAKoASIVIAdBGGxqKwMIIBUgGygCaCACQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAJIAMrAwgiCGMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgGBsgGWohGSABQQFKBEBBAiEBDAELIAFFI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QQAgGSAAKwMAZkUNABpBACAYIAArAyBlRQ0AGkEAIBggACsDCGZFDQAaAkAgCkEBcQ0AIAgoAgQoAgAgFWooAgAhCyAIKAIAIg4oAgQhACACQQI2AogCIAJCgICAgBA3AoACIAAoAlgiDyAKQQF1IhAgCmoiEUECdGohEiAAKAJoIRNBACEBA0BBASEMAkAgDyACQYACaiABaigCACIHIBFqIg1BAnQiBGooAgAiACASQQRBCCAHQQFGG0EAIAcbQYzpAGooAgBBAnRqKAIAIgNIBEAgACEEIAMhAAwBCyAEIBNqKAIAIQ1BACEMIAMhBAsgAkGQAmoiFCAHQQR0aiIDIAw6AAwgAyAANgIIIAMgBDYCBCADIA02AgAgAUEEaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQigMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAmo2AgALIApBgYCAgHhxQQFGCyEHAkAgGSAWIAVBMGxqIgArAxhlRQ0AIBkgACsDAGZFDQAgGCAAKwMgZUUNACAYIAArAwhmRQ0AAkAgBUEBcQ0AIAgoAgQoAgAgFWooAgAhCyAIKAIAIg4oAgQhACACQQI2AogCIAJCgICAgBA3AoACIAAoAlgiDyAFQQF1IhAgBWoiEUECdGohEiAAKAJoIRNBACEBA0BBASEMAkAgDyACQYACaiABaigCACIGIBFqIg1BAnQiBGooAgAiACASQQRBCCAGQQFGG0EAIAYbQYzpAGooAgBBAnRqKAIAIgNIBEAgACEEIAMhAAwBCyAEIBNqKAIAIQ1BACEMIAMhBAsgAkGQAmoiFCAGQQR0aiIDIAw6AAwgAyAANgIIIAMgBDYCBCADIA02AgAgAUEEaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQigMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAmo2AgALIAVBgYCAgHhxQQFGIQYLAkAgBiAHckUEQCAJQQBIDQEgAiAJQQJ0aigCACEAIAlBAWshCQwCCyAKIAUgBxshAC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A0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEgECMiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBIGokACAAC7oBAQN/IwBBEGsiAyQAIAAoAgAhAiADIAEgACgCBCIAQQF1aiIBIABBAXEEfyABKAIAIAJqKAIABSACCxEBAEEMECMiAEEANgIIIABCADcCACADKAIEIgIhBCACIAMoAgAiAWtBBnUiAgRAIAAgAhCVAyAAKAIEIQIgASAERwRAA0AgAiABEEBBQGshAiABQUBrIgEgBEcNAAsLIAAgAjYCBAsgAyADNgIMIANBDGoQmAMgA0EQaiQAIAALVwECfyMAQUBqIgMkACABIAAoAgQiBEEBdWohASAAKAIAIQAgAyABIAIgBEEBcQR/IAEoAgAgAGooAgAFIAALEQsAQcAAECMgAxBAIAMQQRogA0FAayQACwsAIAAQaRogABAiC3MBAn8jAEHQAGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACAEQQFxBEAgASgCACAAaigCACEACyADIAIpAwg3AwggAyACKQMANwMAIANBEGoiAiABIAMgABEDAEHAABAjIAIQQCACEEEaIANB0ABqJAALJAECfiAAKQMAIAEpAwBTIAApAwgiAiABKQMIIgNVIAIgA1EbCwYAQYCcAgsUACAAQQRqQQAgASgCBEGhmAFGGwtPAQJ/AkAgASgCBCICBEAgASgCACIBIAJBBHRqIQMDQCAAKAIEKAIQIgJFDQIgAiABIAIoAgAoAhgRAQAgAUEQaiIBIANHDQALCw8LEGYACxUAIAFByJsCNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQcibAjYCACABIAAoAgQ2AgQgAQsQACAAKAIMIAAoAghrQQJ1CwoAIABBCGoQhAILZwEDfyAAKAIEIgMgACgCCCIBRwRAA0AgACABQQRrIgE2AgggASgCACECIAFBADYCACACBEAgAiACKAIAKAIEEQAAIAAoAgghAQsgASADRw0ACwsgACgCACIBBEAgACgCDBogARAiCwviBAMGfwF8AX4jAEEgayIGJAACf0EwECMhAyMAQSBrIgIkACADQQA2AiggA0IANwMgIANBADYCECADQgA3AwggAyAANgIEIANBmJsCNgIAAkACQCAARQRAIANCgICAgICAgPg/NwMYIAJBADYCDCACQgA3AgREAAAAAAAA8D8hCAwBCyADIAArAxgiCDkDGCACQQA2AgwgAkIANwIEIAhEAAAAAAAAAABhDQELIAJBBGogASgCBCABKAIAa0EEdRBcIAEoAgAiBCABKAIEIgFHBEADQCAEKQMAIQkgAiAIIAQpAwi5ojkDGCACIAggCbmiOQMQIAJBBGogAkEQahBMIARBEGoiBCABRw0ACwsgA0EgahBFIAMgAigCBDYCICADIAIoAgg2AiQgAyACKAIMNgIoIAJBIGokACADDAELQQIQggIACyEDAkACQCAAKAIMIgEgACgCECICSQRAIAEgAzYCACABQQRqIQMMAQsgASAAQQhqIgQoAgAiBWtBAnUiB0EBaiIBQYCAgIAETw0BIAZBDGpB/////wMgAiAFayICQQF1IgUgASABIAVJGyACQfz///8HTxsgByAEEEoiASgCCCICIAM2AgAgASACQQRqNgIIIAEoAgQgACgCDCAAKAIIIgJrIgNrIQQgAwRAIAQgAiAD/AoAAAsgACgCCCECIAAgBDYCCCABIAI2AgQgACABKAIIIgM2AgwgASACNgIIIAAoAhAhBCAAIAEoAgw2AhAgASACNgIAIAEgBDYCDCABEMwFCyAAIAM2AgwgA0EEaygCACAGQSBqJAAPCxAmAAsJACAAEIMCECILcQEDfyMAQeAAayIDJAAgA0EANgIUIANCADcCDCADQQxqIgQgASgCACIFIAEoAgQiASABIAVrQQxtEEcgA0EYaiIBIAQgAiAAEQMAQcAAECMgARC0ASABEEEaIAMgBDYCXCADQdwAahApIANB4ABqJAALFQAgACgCBCAAQQRqIAAsAA9BAEgbCycAIABB6JoCNgIAIAAsAA9BAEgEQCAAKAIMGiAAKAIEECILIAAQIgslACAAQeiaAjYCACAALAAPQQBIBEAgACgCDBogACgCBBAiCyAACyUBAX8jAEEQayIBJAAgASAAQQxqNgIMIAFBDGoQKSABQRBqJAALDwAgAEG0mg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qIgQgAkcNAAsLIANBEGogBRA8IQIgA0EANgIkIANCADcCHCADQRxqIgYgAiACQQxqQQEQR0EYECMiBEG0mgI2AgAgBEIANwIEIARBDGoiByAGEFsgAyAENgIsIAMgBzYCKCADIAMpAig3AwggACADQQhqEGogAyAGNgI8IANBPGoQKSACKAIAIgAEQCACIAA2AgQgAigCCBogABAiCyAFKAIAIgBFDQAgBSAANgIEIAUoAggaIAAQIgsgA0FAayQAC5MDAgN/BHwjAEFAaiIDJAACQAJAAkAgASsDACIGRAAAAAAAAAAAYw0AIAErAwgiB0QAAAAAAAAAAGMNACAGIAaiIAcgB6KgRAAAAAAAAAAAYg0BCyAAEOMBDAELIANBwAAQIyIBNgIwIAMgAUFAayIENgI4IAMgBDYCNCACBEAgB0QAAAAAAADgP6IiCJohByAGRAAAAAAAAOA/oiIJmiEGCyABIAc5AzggASAJOQMwIAEgBzkDKCABIAY5AyAgASAIOQMYIAEgBjkDECABIAg5AwggASAJOQMAIANBEGogA0EwahA8IQEgA0EANgIkIANCADcCHCADQRxqIgQgASABQQxqQQEQR0EYECMiAkG0mgI2AgAgAkIANwIEIAJBDGoiBSAEEFsgAyACNgIsIAMgBTYCKCADIAMpAig3AwggACADQQhqEGogAyAENgI8IANBPGoQKSABKAIAIgAEQCABIAA2AgQgASgCCBogABAiCyADKAIwIgBFDQAgAyAANgI0IAMoAjgaIAAQIgsgA0FAayQACzUBAX8gASAAKAIEIgJBAXVqIQEgACgCACEAIAEgAkEBcQR/IAEoAgAgAGooAgAFIAALEQAAC0YBAn9BCBAjIQFBIBAjIgBCADcCDCAAQfiUAjYCACAAQgA3AgQgAEIANwIUIABBADYCHCABIAA2AgQgASAAQQxqNgIAIAELSwEBf0HYnwIoAgAiAARAA0AgACgCACAAQRhqEMoCIAAQIiIADQALC0HQnwIoAgAhAEHQnwJBADYCACAABEBB1J8CKAIAGiAAECILCw0AIAAEQCAAEC8QIgsLBgBBpJoCCwYAQcjwAQsUACAAQQRqQQAgASgCBEH+kw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CADKAJ4IQwgAygCWCENIAMoAqgBIQcgAygCaCEIIAEoAqABIQ5BACECA0ACQCAHIAggCCACQQJ0IglqKAIAIgpBAnRqKAIAQQNtQRhsaisDEEQAAAAAAAAAAGZFDQAgByAKQQNtQRhsaisDEEQAAAAAAAAAAGNFDQAgCSANaiIFQXhBBCACQQNvQQJGG2ooAgAhDyAFKAIAIRAgDiAEQQR0aiIFIAkgDGooAgA2AgwgBSAKNgIIIAUgDzYCBCAFIBA2AgAgBEEBaiEECyACQQFqIgIgC0cNAAsLIAFCADcDmAEgAUIANwOQASABQgA3AzAgAUIANwM4IAFBoAFqIAQgAUEwahCVAiABQfgAaiICIAEoAqABIgQgBCABKAKkAUEEdGpBABD0AiABQgA3A0ggAUKAgICAgICA+D83A0AgAUIANwNQIAFCADcDYCABQoCAgICAgID4PzcDWCABQgA3A2ggASABKQKgATcCcCABIAFBQGtBMPwKAAAgAUGEAWogAiABQfAAaiIEIANByABqIAEQxwQgASACNgJwIAQQKSAAQQA2AgggAEIANwIAIAEoAoQBIgMgASgCiAEiBEcEQANAIAFBADYCgAEgAUIANwJ4IAMoAgAiAiADKAIEIgVHBEADQCABQfgAaiACEEwgAkEYaiICIAVHDQALCyAAIAFB+ABqEHYgASgCeCICBEAgASACNgJ8IAEoAoABGiACECILIANBDGoiAyAERw0ACwsgASABQYQBajYCeCABQfgAahApIAEoAqABIgAEQCAAECILIAFBsAFqJAACQCAGKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAZBEGokAAuODgMPfwl8An4jAEEQayILJAAgC0EIaiABQQAQKxAqIAsoAgghBiMAQcACayIBJAAgASAGKQMINwM4IAEgBikDADcDMCABIAYpAyA3AxAgASAGKQMYNwMIIAFBADYCKCABQgA3AiAgAUEgakGAARCfASABIAEoAiQiA0EBajYCJCABKQMwIRsgASkDOCEcIAEoAiAgA0EwbGoiAyACOQMQIAMgHDcDCCADIBs3AwAgAyABKQMQNwMgIAMgAS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QKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBASADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBACADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC3EBA38jAEGQAWsiBCQAIARByABqIgUgARDkAiAEQRhqIgYgBUEw/AoAACAEIAIpAxA3AxAgBCACKQMINwMIIAQgAikDADcDACAEQfgAaiICIAYgBCADEJYEIAAgASACQQIQ6AEgAhAoGiAEQZABaiQAC8oDAgN/AX4jAEHQAGsiAyQAIANBxABqIAFBEGoQfyADQTxqIAEgAygCRBArECoCQCADKAI8IgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEIAFBEGogBBA3IQQgAyABNgI4IAMgBDYCNAJAIAEoAswBRQ0AIAMgApk5AyAgA0GslwI2AhggAyADQRhqIgU2AiggBCAFQQEgAygCRBDRAiAFIAMoAigiAUYEf0EQBSABRQ0BQRQLIQQgASABKAIAIARqKAIAEQAACyADQQhqIAN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RSAKRXINASABQeADaiAGQQFqIgZBAnRqIAU2AgAMAQsLIAAoAgAiCCAAKAIEIgBGDQAgCCAAIAAgCGtBBnVnQQF0QT5zQQEQ/AQLIAMQOhoLIAFBwAZqJAACQCACKAI8IgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAJBQGskACAHQTBqJAALsQMBBH8jAEGAAWsiBCQAIAQgAikDADcDCCAEIAIpAwg3AxAgBCACKQMQNwMYIARB0ABqIQYjAEGwAWsiAiQAIAJBqAFqIAFBABArECoCQCACKAKoASgCRCIFBEAgAkGQAWoiASAFEEYgBiABEC4aIAZBGGogARAuGiABECgaDAELIAEQwAEEQCACQZABaiIBEOsBGiACQfgAaiIFEOsBGiAGIAEQiwEaIAZBGGogBRCLARogBRAoGiABECgaDAELIAJByABqIgUgARDkAiACQRhqIgcgBUEw/AoAACACIAQpAxg3AxAgAiAEKQMQNwMIIAIgBCkDCDcDACACQZABaiIFIAcgAiADEJYEIAYgASAFEJgEIAUQKBoLAkAgAigCrAEiAUUNACABIAEoAgQiBUEBazYCBCAFDQAgASABKAIAKAIIEQAAIAEQJAsgAkGwAWokACAEQSBqIAYQLiIBQRhqIARB6ABqIgYQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAGECgaIARB0ABqECgaIARBgAFqJAALDwAgAEH4lAI2AgAgABAiCw0AIABB+JQCNgIAIAALKAEBfyAAKAIAIgAoAggiAUUEQEQAAAAAAADwPw8LIAAoAgy3IAG3owsXACAAKAIAIgAEfyAALQAQBUEAC0EBcQsMACAAKAIAQQE6ABALdgECfyMAQeAAayIDJAAgA0EwaiIEIAEgAhCYBCADIAQQLiIBQRhqIANByABqIgQQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAEECgaIANBMGoQKBogA0HgAGokAAu1AQEDfyAAIwBBEGsiACQAIAAgAUEQahB/IABBCGog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gAhASADQRBqIg0gC0Ew/AoAACAKIAggDSAEIAUgBiABEPsDAkAgCCgCECIBIAhHBEBBFCEJIAFFDQELIAEgASgCACAJaigCABEAAAsgAyACNgJEIAMgCjYCQCACIAIoAgRBAWo2AgQgAyADKQJANwMIIAAgA0EIahDmAiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANB4ABqJAACQCAMIAcoAkgiAEYEf0EQBSAARQ0BQRQLIQEgACAAKAIAIAFqKAIAEQAACyAHQdAAaiQAC1YBAn8jAEEQayICJAAjAEEQayIBJAAgASAAQRBqIgBBhAFqNgIIIAFBCGoQZSABIABB+ABqNgIMIAFBDGoQZSAAQfAAahAvGiABQRBqJAAgAkEQaiQACw8AIABBiJMCNgIAIAAQIgsNACAAQYiTAjYCACAACwQAQQELkgIBBH8jAEEQayIBJABBASEDAkAgACgCgAENAEEAIQMgAUEANgIMIAFCADcCBCABIAA2AgAgAUEEaiABED0gASgCBCICIAEoAggiAEcEQANAIABBBGsiACgCACEEIAEgADYCCAJAIAQoAoABBEAgA0EBaiEDDAELIAQoAhQaIAQoAgwiAigCACIAIAIoAgQiAkcEQANAAkAgACgCACIEIAQoAgAoAggRBABBA0YEQCADQQFqIQMMAQsgASAAKAIANgIAIAFBBGogARA9CyAAQQhqIgAgAkcNAAsLIAEoAgghACABKAIEIQILIAAgAkcNAAsLIAJFDQAgASACNgIIIAEoAgwaIAIQIgsgAUEQaiQAIAMLJQEBf0EDIQEgAC0AHCIAQQJNBH8gAEECdEGM+ABqKAIABSABCwvFIgMVfwF+DHwjAEGgAmsiBCQAIAEoAhQaAkACQAJAIAEoAoABIgUEQCAAIAU2AgAgACABKAKEASIANgIEIAAEQCAAIAAoAgRBAWo2AgQLDAELIARBADYC+AEgBEIANwLwASAEQQA6AOABIARBADYCgAIgBEEANgLoASAEIARBjAJqIAFBBGoQmwIiBygCADYCgAEgBCAHKAIEIgU2AoQBIAUEQCAFIAUoAgRBAWo2AgQLQaABECMiBUGI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AvQBIgMgBCgC8AFHDQALCyAAIAEoAoABNgIAIAAgASgChAEiADYCBCAARQ0AIAAgACgCBEEBajYCBAsgBCAEQfABajYCACAEEGULIARBoAJqJAAPCxAmAAsQJgALwwQCBH8MfCMAQfABayIDJABBmAEQIyIGQbCTAjYCACAGQgA3AgQjAEEQayIFJAAgBkEQaiIEQgA3AgQgBEG0kgI2AgAgBUEANgIIIAVCADcCACAEQQxqIAUQ0wQgBSAFNgIMIAVBDGoQZSAEQgA3AyggBEKAgICAgICA+D83AyAgBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQgA3A4ABIAVBEGokACADQegBaiIFIAY2AgQgBSAENgIAIAUgBkEUaiAEEI8BIAMoAugBQQxqIgQgAUEMaiIFRwRAIAQgBRBeIARBCGogBUEIahBeCyABKwMgIQcgASsDKCEIIAErAzAhCSABKwM4IQogASsDQCELIAErA0ghDCABKwNQIQ0gASsDWCEOIAErA2AhDyABKwNoIRAgASsDcCERIAErA3ghEiADQoCAgICAgID4PzcDgAEgAyASOQN4IAMgETkDcCADIBA5A2ggA0IANwNgIAMgDzkDWCADIA45A1AgAyANOQNIIANCADcDQCADIAw5AzggAyALOQMwIAMgCjkDKCADQgA3AyAgAyAJOQMYIAMgCDkDECADIAc5AwggA0GIAWoiBCACIANBCGoQ8AEgAygC6AEiAkEgaiAEQeAA/AoAACACIAEtABw6ABwgACACNgIAIAAgAygC7AE2AgQgA0HwAWokAAtnAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIFQgA3AgAgBUIONwIIIAJBCGogBCADIAEoAgAQkwUgAiACKQIINwMAIAAgAhDmAiACQRBqJAAgBBCqASAEQYABaiQAC44BAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIDQgA3AgAgA0IHNwIIIAEoAgAhA0GoAhAjIgFBoJACNg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AgAUIANwIEQRAhCCABQRBqIAQQNyEEIAIgATYCQCACIAQ2AjwgAkEgaiAHEFchBiMAQSBrIgEkACABIAY2AgwgAUGklQI2AgggASABQQhqIgU2AhggBCAFELsEAkAgBSABKAIYIgRGBH9BEAUgBEUNAUEUCyEFIAQgBCgCACAFaigCABEAAAsgAUEgaiQAAkAgBiAGKAIQIgFHBEBBFCEIIAFFDQELIAEgASgCACAIaigCABEAAAsgAkEQaiACQTxqEFkgAiACKQIQIgk3AhggAkIANwIQIAIgCTcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAigCQCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAIoAkgiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkHQAGokAAJAIAcgAygCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIANBIGokAAsGAEGIkgILFAAgAEEEakEAIAEoAgRB5PAARhsLCwAgAUHYkQI2AgALEQBBCBAjIgBB2JECNgIAIAALBgBByJECCxQAIABBBGpBACABKAIEQfvrAEYbCwsAIAFBkJECNgIACxEAQQgQIyIAQZCRAjYCACAAC5sDAgl/AXwjAEGQAWsiAyQAIANBhAFqIAIQlgUgA0EgakEAQeAA/AsAIANCgoCAgDA3AhggA0KAgICAEDcCECADQThqIQggAygChAEhCQNAIANBEGogBmooAgAhBCADQoCAgIAQNwIEIAkgBEEFdGohCiADQQI2AgwgA0EgakEwQcgAIARBAkYbaiELQQAhAgNAIAogA0EEaiACaigCACIHQQN0aisDACEMIANBIGohBQJAAkACQCAEDgICAAELIAghBQwBCyALIQULIAVBCEEQIAdBAUYbQQAgBxtqIAw5AwAgAkEEaiICQQxHDQALIAZBBGoiBkEQRw0ACyMAQSBrIgIkACACQRBqIAEQigEgAkEYaiACKAIQIgEgA0EgaiABKAIAKAIEEQMAIAIgAikCGDcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkEgaiQAIAMoAoQBIgAEQCADIAA2AogBIAMoAowBGiAAECILIANBkAFqJAALCwAgACABQQIQiAELCwAgACABQQEQiAELCwAgACABQQAQiAELDQAgACABIAJBAhDoAQsNACAAIAEgAkEBEOgBCw0AIAAgASACQQAQ6AELBgBBgJECCxQAIABBBGpBACABKAIEQefoAEYbC/0BAQN/IwBBgAFrIgMkACADIAEQ3wEjAEEgayIBJABBJBAjIgJCADcCDCACQYSWAjYCACACQgA3AgQgAkIANwIUIAJCADcCHCAAIAI2AgQgACACQQxqNgIAQagCECMiAkGgkAI2AgAgAkIANwIEIAJBEGogA0EAEJMDIQQgASACNgIQIAEgBDYCDCABQRRqIAFBDGoQ3AQgACABKAIUNgIIIAAgASgCGDYCDCABQgA3AhQCQCABKAIQIgJFDQAgAiACKAIEIgRBAWs2AgQgBA0AIAIgAigCACgCCBEAACACECQLIABCADcCECABQSBqJAAgAxCqASADQYABaiQACxUAIAFByJACNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQciQAjYCACABIAAoAgQ2AgQgAQsPACAAQaCQAjYCACAAECILDQAgAEGgkAI2AgAgAAvwEAITfwJ+IwBB0AFrIgMkACADQcgBaiICIAFBABArECoCQCADKALIASgCRCIEBEAgA0GwAWoiASAEEEYgAEEANgIIIABCADcCACAAIAEgAkEBEJYCIAEQKBoMAQsgA0GkAWogARCQAiICEJYBIQ0gAgRAIAKtIRYDQCANKAIAIBWnQQN0aiAVNwMAIBVCAXwiFSAWUg0ACwsgAygCyAEiBCgCXARAQQAhAgNAIAQoAlggAkECdGoiBSgCACIGIAVBeEEEIAJBA29BAkYbaigCACIFSARAIA0gBiAFEF8gAygCyAEhBAsgAkEBaiICIAQoAlxJDQALCyADQQA2AqABIANCADcCmAECQCANIANBmAFqEIwFIhNBAUYEQCAAQQEQkQMoAgAgARCjBAwBCwJAIAMoApwBIgQgAygCmAEiAkYNACAEIAJrIgQQJyEOIARFDQAgDiACIAT8CgAACyABEJACIQ8gAEEANgIIIABCADcCACATQQBKBEADQEGoAhAjIghBoJACNgIAIAhCADcCBCAIQRBqEDshBiAIIAMoAsgBIgIrAzA5A0AgCCACKwM4OQNIQQAhAiADQQA2ApABIANCADcCiAEgA0GIAWogDxAlIAMgDzYCjAEgAygCiAEiBSEEIA8EQANAIBAgDiACQQJ0aigCAEYEQCAEIAI2AgAgBEEEaiEECyACQQFqIgIgD0cNAAsLIANCADcDgAEgA0IANwN4IANCADcDcCADQgA3AyggA0IANwMwIANCADcDOCAIQdgAaiAEIAVrQQJ1IgQgA0EoahBnIANCADcDaCADQgA3A2AgA0IANwNYIANCADcDECADQgA3AxggA0IANwMgIAhBqAFqIAQgA0EQahBnQQAhAiADQYgBaiAEQQAQMSADKAKMASIEBEAgCCgCWCEKIAMoAsgBIgsoAkghDCADKAKIASEFA0AgCiACQRhsaiIHIAwgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACyAIKAKoASEKIAsoApgBIQtBACECA0AgCiACQRhsaiIHIAsgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACwtBACECIANBADYCUCADQgA3AkggA0HIAGogARC/ARAlIAMoAsgBIQcgARC/AQRAA0AgECAOIAcoAlggAkEMbGooAgBBAnRqKAIARgRAAkAgAygCTCIEIAMoAlAiBU8EQCADQcgAaiAFQQF0QYABIAUbECUgAygCSCADKAJMIgRBAnRqIAI2AgAMAQsgAygCSCAEQQJ0aiACNgIACyADIARBAWo2AkwLIAEQvwEgAkEBaiICSw0ACwsgAygCTARAIAMoAsgBIQcjAEFAaiIFJAAgBigC3AEhAiAGQdgBaiIEIAMoAkwiCRA5IAYgCTYC3AEgAkERSSACIAlBAXQiCk1yRQRAIAQQgw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ACAJIBFrIglBA3UiESADIAMgEUkbIAlB8P///wdPGyAPIAgQMiERIAEoAiQiAyABKQMQNwMIIAMgASkDCDcDACABIAEoAiRBEGo2AiQgASgCICAHKAI8IAcoAjgiCWsiA2shDyADBEAgDyAJIAP8CgAACyAHKAI4IQkgByAPNgI4IAEgCTYCICAHIAEoAiQiAzYCPCABIAk2AiQgBygCQCEPIAcgASgCKDYCQCABIA82AiggESAJNgIAIBEQNgsgByADNgI8IAYgC0cNAAsgDSgCACEGCyABQQhqIAsgBhCtAwJAIAcoAkAiBiADSwRAIAMgASkDEDcDCCADIAEpAwg3AwAgA0EQaiEGDAELIAMgCCgCACIJa0EEdSILQQFqIgNBgICAgAFPDQsgAUEcakH/////ACAGIAlrIgZBA3UiCSADIAMgCUkbIAZB8P///wdPGyALIAgQMiIDKAIIIgYgASkDEDcDCCAGIAEpAwg3AwAgAyADKAIIQRBqNgIIIAMoAgQgBygCPCAHKAI4IghrIgZrIQkgBgRAIAkgCCAG/AoAAAsgBygCOCEIIAcgCTYCOCADIAg2AgQgByADKAIIIgY2AjwgAyAINgIIIAcoAkAhCSAHIAMoAgw2AkAgAyAINgIAIAMgCTYCDCADEDYLIAcgBjYCPAsgAUEwaiQADAALAkACQAJAIAcoAmgOAgABAgsgByAKIA0QswIMAgsjAEEwayIIJAAgByAKIA0QswICQCAIQQxqIA0QPCIJKAIAIgEgCSgCBCIDRg0AIAEgA0EQayIDTw0AA0AgCCABKQMINwMgIAggASkDADcDGCABIAMpAwg3AwggASADKQMANwMAIAMgCCkDIDcDCCADIAgpAxg3AwAgAUEQaiIBIANBEGsiA0kNAAsLAkAgBygCOCIBIAcoAjwiBkYNACABIAZBEGsiA08NAANAIAggASkDCDcDICAIIAEpAwA3AxggASADKQMINwMIIAEgAykDADcDACADIAgpAyA3AwggAyAIKQMYNwMAIAFBEGoiASADQRBrIgNJDQALIAcoAjwhBiAHKAI4IQELIAdBOGohEQJAAkAgBygCQCILIAZLBEAgBiABKQMINwMIIAY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CDAELIAcgDUEAQQAQtgILQQEhASANKAIEIA0oAgBrQQR1IhFBAWsiA0EBSwRAQQAhBgNAIAcgCiANIAEgBhC0AiABIgZBAWoiASADRw0ACwsgBygCOCEIIAMEQCADIQEDQCAIIAFBAWsiBkEEdGoiDysDACECIAggAUEEdGoiASAPKwMImjkDCCABIAKaOQMAIAYiAQ0ACwsgCCAIIANBBHRqIgEpAwg3AwggCCABKQMANwMAAkAgBygCmAFFBEAgBysDECECDAELIAcgCyANIAdBOGogAyADEPsBIgI5AxALAkAgAplEEeotgZmXcT1lBEAgDSgCACADQQR0aiEGAkAgBygCSCIBIAcoAkwiCEkEQCABIAYpAwg3AwggASAGKQMANwMAIAFBEGohBgwBCyABIAdBxABqIgsoAgAiD2tBBHUiFEEBaiIBQYCAgIABTw0MIAlBDGpB/////wAgCCAPayIIQQN1Ig8gASABIA9JGyAIQfD///8HTxsgFCALEDIiASgCCCIIIAYpAwg3AwggCCAGKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIIayIGayELIAYEQCALIAggBvwKAAALIAcoAkQhCCAHIAs2AkQgASAINgIEIAcgASgCCCIGNgJIIAEgCDYCCCAHKAJMIQsgByABKAIMNgJMIAEgCDYCACABIAs2AgwgARA2CyAHIAY2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANIAMgAxC3AgwCCyAHIA0gAyADRBgtRFT7IQlAELUCDAELIAcgDSADIAMQtgILIBFBAmsiAQRAA0AgByAKIA0gASADELQCIAEiA0EBayIBDQALCyAHKAJQIAdBxABqEHYgCUEgaiQADAALCyANQQxqIg0gCigCBEcNAAsLIA5BMGokACAHKAIABEAgBygCUCIBIAEoAgAQewsgCkEgaiIKIAcoAlxHDQALCyAHKAJQIgEoAgQgASgCAEYNAAJ/QQAgBygCWCIKIAcoAlwiA0YNABoCQANAIAooAhxFDQEgCkEgaiIKIANHDQALQQAMAQsgCi0AFAshAyAMQQA7ARggDEIANwMQIAxBAjYCDCAMQgA3Ag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FCACQgA3AgwgAkHYAGpBAEHoAPwLACACQgA3A1AgAkECNgJMIAJCADcCRCACQdwAakEAQTD8CwAgAkGQAWpBAEEk/AsAIAJBADYCyAEgAkIANwPAASACQQE6AL0BIAJBAToAtAEgAkKAgICAgICAoD43A9gBIAJCgICAgICAgNDBADcD0AEgAkH8mgI2AkAgAkFAayIBIAJBKGoiBxCbASACQQA2AugBIAJCADcC4AEgAUECQQIgAkEMaiIEIAJB4AFqIgMQ4gEgAiADNgLsASACQewBahApIAEQaRpBGBAjIgNBtJoCNgIAIANCADcCBCADQQxqIgggBBBbIAIgAzYCHCACIAg2AhggAiACKQIYNwMAIAAgAhBqIAIgBDYCQCABECkgAiAHNgJAIAEQKSACKAI0IgAEQCACIAA2AjggAigCPBogABAiCyACQfABaiQADAELEGYACwJAIAkgBigCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAZBIGokAAJAIAogBSgCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAVBIGokAAsMACABIAAoAgQREAALFQAgAUGMjwI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBjI8CNgIAIAEgACgCBDYCBCABCwYAQeyOAgsUACAAQQRqQQAgASgCBEGL5QBGGwtRAQF/IwBBIGsiBCQAIAMoAgAhAyABKAIAIAAoAgQhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQQhqIAMgABEDACAEQSBqJAALFQAgAUG0jgI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBtI4CNgIAIAEgACgCBDYCBCABCwYAQaSOAgsUACAAQQRqQQAgASgCBEHj4wBGGwuCAgEGfyMAQRBrIgIkACABKAIAIQcgASgCBCEEQQAhASACQQA2AgwgAkIANwIEIAJBBGogBEEDbBDUASACKAIEIQUgBARAA0AgBSABQRhsIgZqIgMgBiAHaiIGKwMAOQMAIAMgBisDCDkDCCADIAYrAxA5AxAgAUEBaiIBIARHDQALCyAFIAQgACgCBCgCABEBACACKA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EcNAAsgBEEEaiIEQQxHDQALIAAgASADQSBqEOABIAMoAlQiAARAIAMgADYCWCADKAJcGiAAECILIANB4ABqJAALNgECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgACgCABEFAEEYECMgBRAuIAUQKBogBEEgaiQACyoBAX8jAEEQayIDJAAgA0EIaiABIAIgACgCABEDACADKAIMIANBEGokAAthAQF/IwBBMGsiBCQAIAAoAgAhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQSBqIgIgASAEQQhqIAMgABEPACACEJQDIAQgAjYCLCAEQSxqEHogBEEwaiQACzUBAX8jAEEQayIDJAAgAyABIAIgACgCABEDACADEJQDIAMgAzYCDCADQQxqEHogA0EQaiQACzYBAX8jAEFAaiIGJAAgBiABIAIgAyAEIAUgACgCABEqAEHAABAjIAYQQCAGEEEaIAZBQGskAAsLACAAIAFBAhDFAgtfAQF/IwBB0ABrIgMkACAAKAIAIQAgAyACNgIMIANBnKACNgIIIANBEGoiAiABIANBCGogABEDAEHAABAjIAIQQCACEEEaIAMoAgwiAEEJTwRAIAAQAQsgA0HQAGokAAuBAgICfwF8IwBB4ABrIgMkACADQQhqIgQgASACIAAoAgARAwAgA0EwaiAEQSj8CgAAQQIhACADLQBQQQFGBEAjAEEQayIAJABB2J4CLQAAQQFxRQRAQQJBmIQCQQMQBiEBQdieAkEBOgAAQdSeAiABNgIAC0EgECMiASADKQNINwMYIAEgAykDQDcDECABIAMpAzg3AwggASADKQMwNwMAIAAgATYCCCAAQQA2AgRB1J4CKAIAQQBBACAAQQRqIABBCGoQBSEFIAAoAgQhASADIAX8AzYCXCADQZygAjYCWCABBEAgARAECyAAQRBqJAAgAygCXCEACyADQeAAaiQAIAALTAEBfyMAQSBrIgMkACAAKAIAIQAgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAEgAyAAEQEAIANBIGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgi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IAIgACgCABEDACADIAMpAxAiBDcDICADIAMpAwg3AxhBAiEAIASnQQFxBEAjAEEQayIAJABBqJ4CLQAAQQFxRQRAQQJB6PwBQQMQBiEBQaieAkEBOgAAQaSeAiABNgIACyAAIAMrAxg5AwggAEEANgIEQaSeAigCAEEAQQAgAEEEaiAAQQhqEAUhBSAAKAIEIQEgAyAF/AM2AiwgA0GcoAI2AiggAQRAIAEQBAsgAEEQaiQAIAMoAiwhAAsgA0EwaiQAIAALMAEBfyMAQRBrIgQkACAAKAIAIQAgBCADOQMIIAEgAiAEQQhqIAARAwAgBEEQaiQACy4BAX8jAEEQayIDJAAgACgCACEAIAMgAjkDCCABIANBCGogABEBACADQRBqJAAL8wECAn8BfCMAQSBrIgMkACADQQhqIgQgASACIAAoAgARAwBBAiEAAkAgAy0AFEEBRw0AIwBBEGsiACQAQZyeAi0AAEEBcUUEQEECQfj6AUEDEAYhAUGcngJBAToAAEGYngIgATYCAAsgAEEMECMgBBA8NgIIIABBADYCBEGYngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgIcIANBnKACNgIYIAEEQCABEAQLIABBEGokACADKAIcIQAgAy0AFEEBRw0AIAMoAggiAUUNACADIAE2AgwgAygCEBogARAiCyADQSBqJAAgAAsNACAAIAEgAkECEMYCC0gBAX8jAEEQayIDJAAgACgCACEAIAEgA0EEaiACEDwiASAAEQEAIAEoAgAiAARAIAEgADYCBCABKAIIGiAAECILIANBEGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQZCeAi0AAEEBcUUEQEECQYj5AUEDEAYhAUGQngJBAToAAEGMngIgATYCAAtBEBAjIgEgAykDKDcDCCABIAMpAyA3AwAgACABNgIIIABBADYCBEGMngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgI8IANBnKACNgI4IA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CBEHonQIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgKcASADQZygAjYCmAEgAQRAIAEQBAsgAEEQaiQAIAMoApwBIQALIANBoAFqJAAgAAsNACAAIAEgAkEAEMYCCy8BAX8jAEFAaiIDJAAgACgCACEAIAMgAkHAAPwKAAAgASADIAARAQAgA0FAayQAC1EBAn8jAEHQAGsiByQAIAAoAgAhACAHQQhqIgggA0Ew/AoAACAHQThqIgMgASACIAggBCAFIAYgABEoAEEYECMgAxAuIAMQKBogB0HQAGokAAtbAQF/IwBBIGsiBCQAIAAoAgAhACAEIAI2AgQgBEGcoAI2AgAgBEEIaiICIAEgBCADIAARBQBBGBAjIAIQLiACECgaIAQoAgQiAEEJTwRAIAAQAQsgBEEgaiQACzcAIAAoAgAgAUEFdGoiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAQQELmgYCB38BfCMAQdABayIDJABBJBAjIgRCADcCDCAEQYSWAjYCACAEQgA3AgQgBEIANwIUIARCADcCHCAAQgA3AxggAEKAgICAgICA+D83AxAgAEIANwMIIAAgBDYCBCAAIARBDGo2AgAgAEIANwMgIABCADcDMCAAQoCAgICAgID4PzcDKCAAQgA3AzggA0EANgIcIANCADcCFCADQRRqIAEoAgQgASgCAGtBDG0QViABKAIAIgcgASgCBCIIRwRAA0AgA0EgaiAHEDwiCSEBIwBBEGsiBCQAIANBwAFqIgVBADYCCCAFQgA3AgAgBSABKAIEIAEoAgBrQQR1EFwgASgCACIGIAEoAgQiAUcEQANAIAYrAwAhCiAEIAYrAwg5AwggBCAKOQMAIAUgBBBMIAZBEGoiBiABRw0ACwsgBEEQaiQAIANBFGogBRBoIAMoAsABIgEEQCADIAE2AsQBIAMoAsgBGiABECILIAkoAgAiAQRAIAMgATYCJCADKAIoGiABECILIAdBDGoiByAIRw0ACwsgA0EANgIQIANCADcCCCADQThqQQBB6AD8CwAgA0IANwMwIANBAjYCLCADQgA3AiQgA0E8akEAQTD8CwAgA0HwAGpBAEEk/AsAIANBADYCqAEgA0IANwOgASADQQE6AJ0BIANBAToAlAEgA0KAgICAgICAoD43A7gBIANCgICAgICAgNDBADcDsAEgA0H8mgI2AiAgA0EgaiIBIANBFGoQmwEgA0EANgLIASADQgA3AsABIAFBAkEDIAIgAkEDTxsiAkEAIAJBAWtBA0kbIANBCGoiBCADQcABaiICEOIBIAMgAjYCzAEgA0HMAWoQKSABEGkaQRgQIyICQbSaAjYCACACQgA3AgQgAkEMaiIFIAQQWyADIAI2AiQgAyAFNgIgIABBCGogARBOAkAgAygCJCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADIANBCGo2AsABIANBwAFqECkgAyADQRRqNgIgIANBIGoQKSADQdABaiQAC10AIAACfyABKAIEIAEoAgAiAWtBBXUgAksEQCAAIAEgAkEFdGoiASkDGDcDGCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDAEEBDAELIABBADoAAEEACzoAIAsQACAAKAIEIAAoAgBrQQV1C8cDAQV/AkAgACgCBCAAKAIAIgNrQQV1IgQgAUkEQCMAQSBrIgYkAAJAAkAgASAEayIEIAAoAggiBSAAKAIEIgNrQQV1TQRAIAAgBAR/IAMgBEEFdGohAANAIAMgAikDGDcDGCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQSBqIgMgAEcNAAsgAAUgAws2AgQMAQsgAyAAKAIAIgNrQQV1IgcgBGoiAUGAgIDAAE8NASAGQQxqQf///z8gBSADayIDQQR1IgUgASABIAVJGyADQeD///8HTxsgByAAEJYDIgEoAggiAyAEQQV0aiEEA0AgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBIGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAmshAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIA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twIBBX8CQCAAKAIEIgMgACgCACIFa0EGdSIEIAFJBEAjAEEgayIFJAACQAJAIAEgBGsiASAAKAIIIgYgACgCBCIDa0EGdU0EQCAAIAEEfyADIAFBBnRqIQADQCADIAIQQEFAayIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIEa0EGdSIHIAFqIgNBgICAIE8NASAFQQxqQf///x8gBiAEayIEQQV1IgYgAyADIAZJGyAEQcD///8HTxsgByAAEKkBIgQoAggiAyABQQZ0aiEBA0AgAyACEEBBQGsiAyABRw0ACyAEIAE2AgggACAEEKcCIAQQpgILIAVBIGokAAwCCxAmAAsgASAESQRAIAMgBSABQQZ0aiIBRwRAA0AgASADQUBqEEEiA0cNAAsLIAAgATYCBAsLC78BAQV/AkAjAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABELQBQUBrIQEMAQsgAiAAKAIAIgRrQQZ1IgZBAWoiAkGAgIAgTw0BIAVBDGpB////HyADIARrIgNBBXUiBCACIAIgBEkbIANBwP///wdPGyAGIAAQqQEiAigCCCABELQBGiACIAIoAghBQGs2AgggACACEKcCIAAoAgQhASACEKYCCyAAIAE2AgQgBUEgaiQADAELECYACwssAQF/IwBBEGsiASQAIAAEQCABIAA2AgwgAUEMahCYAyAAECILIAFBEGokAAsGAEGE/gELFwAgACgCACABQQN0aiACKwMAOQMAQQELPQAgAAJ/IAEoAgQgASgCACIBa0EDdSACSwRAIAAgASACQQN0aisDADkDAEEBDAELIABBADoAAEEACzoACAvtGgQVfwZ8A30CfiMAQZABayINJAAgABAaNgIEIABBnKACNgIAIA1BEGoiCCABEN8BIwBBkARrIgIkACACQgA3AogCIAIgAkGIAmoiCjYChAIgAkH4AWogCCgCCCAIKAIEa0ECdSAIKAIAbhDsASIQKAIAIgYgECgCBCIFRwRAIAYhBANAIAQgAzYCACADQQFqIQMgBEEEaiIEIAVHDQALCyAIKAIgIgMgCCgCHCIERwRAIAMgBGtBAnUhBSAIKAIoIQdBACEDA0AgBiAE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AAJAAkAgASAEayIEIAAoAggiBSAAKAIEIgNrQQN1TQRAIAAgBAR/IAMgBEEDdGohACACKwMAIQgDQCADIAg5AwAgA0EIaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EDdSIHIARqIgFBgICAgAJPDQEgBkEMakH/////ASAFIANrIgNBAnUiBSABIAEgBUkbIANB+P///wdPGyAHIAAQSyIBKAIIIgMgBEEDdGohBCACKwMAIQgDQCADIAg5AwAgA0EIaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQmQELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQN0ajYCBAsLCwkAIAAgARCoAgsGAEGM/AELMgAgAiAAKAIAIAFBDGxqIgBHBEAgACACKAIAIgAgAigCBCIBIAEgAGtBBHUQmQMLQQELOgAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsahA8GkEBDAELIABBADoAAEEACzoADAuHAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIQPEEMaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EMbSIHIARqIgFB1qrVqgFPDQEgBkEMakHVqtWqASAFIANrQQxtIgNBAXQiBSABIAEgBUkbIANBqtWq1QBPGyAHIAAQYSIBKAIIIgMgBEEMbGohBANAIAMgAhA8QQxqIgMgBEcNAAsgASAENgIIIAEoAgQgACgCBCAAKAIAIgRrIgJBdG1BDGxqIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2Agwg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DCDcDCCAAIAEpAwA3AwBBAQwBCyAAQQA6AABBAAs6ABgLuwMBBX8CQCAAKAIEIAAoAgAiA2tBGG0iBCABSQRAIwBBIGsiBiQAAkACQCABIARrIgQgACgCCCIFIAAoAgQiA2tBGG1NBEAgACAEBH8gAyAEQRhsaiEAA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EYbSIHIARqIgFBq9Wq1QBPDQEgBkEMakGq1arVACAFIANrQRhtIgNBAXQiBSABIAEgBUkbIANB1arVKk8bIAcgABBkIgEoAggiAyAEQRhsaiEEA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICQWhtQRhsaiEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQjAELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQRhsajYCBAsLCwkAIAAgARDEAQsGAEG89gELIwAgACgCACABQQxsaiIAIAIoAgg2AgggACACKQIANwIAQQELSQAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsaiIBKAIINgIIIAAgASkCADcCAEEBDAELIABBADoAAEEACzoADAuoAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBDG0iByAEaiIBQdaq1aoBTw0BIAZBDGpB1arVqgEgBSADa0EMbSIDQQF0IgUgASABIAVJGyADQarVqtUATxsgByAAEGEiASgCCCIDIARBDGxqIQQDQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAkF0bUEMbGohAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABENYBCyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEMbGo2AgQLCwsJACAAIAEQnQULBgBBzPQBCxgAIAAoAgAgAUEGdGogAkHAAPwKAABBAQs+ACAAAn8gASgCBCABKAIAIgFrQQZ1IAJLBEAgACABIAJBBnRqQcAA/AoAAEEBDAELIABBADoAAEEACzoAQAuMAwEFfwJAIAAoAgQgACgCACIDa0EGdSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EGdU0EQCAAIAQEfyADIARBBnRqIQADQCADIAJBwAD8CgAAIANBQGsiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBBnUiByAEaiIBQYCAgCBPDQEgBkEMakH///8fIAUgA2siA0EFdSIFIAEgASAFSRsgA0HA////B08bIAcgABCpASIBKAIIIgMgBEEGdGohBANAIAMgAkHAAPwKAAAgA0FAayIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQqQILIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQZ0ajYCBAsLCwkAIAAgARCaAwsGAEHo8gELDwAgASAAKAIAaiACNwMACw0AIAEgACgCAGopAwALHgAgASAAKAIAaiIAIAIpAwg3AwggACACKQMANwMACyoBAX8gACgCACECQRAQIyIAIAEgAmoiASkDCDcDCCAAIAEpAwA3AwAgAAsHACAAEQwACwkAIAEgABEZAAsJACABIAARAAALCQAgASAAERsACwkAIAEgABEEAAtNAQF/IwBBEGsiAiQAIAIgATYCBCACQZygAjYCACACQQhqIAIgABEBACACKAIMIAJBADYCDCACKAIEIgFBCU8EQCABEAELIAJBEGokAAtIAQJ/IwBB0ABrIgYkACAGQQhqIgcgAkEw/AoAACAGQThqIgIgASAHIAMgBCAFIAARKQBBGBAjIAIQLiACECgaIAZB0ABqJAALMwECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgABEPAEEYECMgBRAuIAUQKBogBEEgaiQAC5QBAQJ/IwBBEGsiBCQAIARBBGogASACIAMgABEVAEEMECMiAEEANgIIIABCADcCACAEKAIIIgEgBCgCBCIDRwRAIAAgASADayIBQQxtEKMCIAAoAgQhBSABBEAgBSADIAH8CgAACyAAIAEgBWo2AgQLIAQoAgQiAQRAIAQgATYCCCAEKAIMGiABECILIARBEGokACAAC04BAX8jAEEwayIGJAAgBiAFKQMANwMIIAYgBSkDCDcDECAGQRhqIgUgASACIAMgBCAGQQhqIAARIwBBGBAjIAUQLiAFECgaIAZBMGokAAtSAQF/IwBBIGsiAyQAIAMgATYCBCADQZygAjYCACADQQhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIAMoAgQiAUEJTwRAIAEQAQsgA0EgaiQACy0BAn8jAEEgayIBJAAgAUEIaiICIAARAABBGBAjIAIQLiACECgaIAFBIGokAAsxAQJ/IwBBIGsiAyQAIANBCGoiBCABIAIgABEWAEEYECMgBBAuIAQQKBogA0EgaiQACzcBAn8jAEEgayIGJAAgBkEIaiIHIAEgAiADIAQgBSAAESQAQRgQIyAHEC4gBxAoGiAGQSBqJAALTwEBfyMAQTBrIgMkACADIAEpAwA3AwAgAyABKQMINwMIIAMgASkDEDcDECADQRhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIANBMGokAAtdAQN/IwBBIGsiBCQAIAEgACgCBCIGQQF1aiEBIAAoAgAhACAEQQhqIgUgASACIAMgBkEBcQR/IAEoAgAgAGooAgAFIAALEQ8AQRgQIyAFEC4gBRAoGiAEQSBqJAALXQEDfyMAQSBrIgQkACABIAAoAgQiBkEBdWohASAAKAIAIQAgBEEIaiIFIAEgAiADIAZBAXEEfyABKAIAIABqKAIABSAACxEFAEEYECMgBRAuIAUQKBogBEEgaiQACzkBAX8gASAAKAIEIgRBAXVqIQEgACgCACEAIAEgAiADIARBAXEEfyABKAIAIABqKAIABSAACxEmAAtXAQJ/IwBBMGsiAiQAIAEgACgCBCIDQQF1aiEBIAAoAgAhACACIAEgA0EBcQR/IAEoAgAgAGooAgAFIAALEQEAQTAQIyIAIAJBMPwKAAAgAkEwaiQAIAALWgECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBACACEJQDIAIgAjYCDCACQQxqEHogAkEQaiQAC18BA38jAEEgayIFJAAgASAAKAIEIgdBAXVqIQEgACgCACEAIAVBCGoiBiABIAIgAyAEIAdBAXEEfyABKAIAIABqKAIABSAACxEiAEEYECMgBhAuIAYQKBogBUEgaiQAC3oBAn8jAEEwayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIARBAXEEQCABKAIAIABqKAIAIQALIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGoiAiABIAMgABEDAEEYECMgAhAuIAIQKBogA0EwaiQAC10BA38jAEEgayIEJAAgASAAKAIEIgZBAXVqIQEgACgCACEAIARBCGoiBSABIAIgAyAGQQFxBH8gASgCACAAaigCAAUgAAsRJwBBGBAjIAUQLiAFECgaIARBIGokAAtbAQN/IwBBIGsiAyQAIAEgACgCBCIFQQF1aiEBIAAoAgAhACADQQhqIgQgASACIAVBAXEEfyABKAIAIABqKAIABSAACxELAEEYECMgBBAuIAQQKBogA0EgaiQAC1kBA38jAEEgayICJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIAJBCGoiAyABIARBAXEEfyABKAIAIABqKAIABSAACxEBAEEYECMgAxAuIAMQKBogAkEgaiQAC1wBAn8jAEEQayIDJAAgASAAKAIEIgRBAXVqIQE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gACQCAAIAEoAgggBBBzBEAgAiABKAIERw0BIAEoAhxBAUYNASABIAM2AhwPCyAAIAEoAgAgBBBzBEACQCABKAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQIgAUEBNgIgDwsgASADNgIgAkAgASgCLEEERg0AIAFBADsBNCAAKAIIIgAgASACIAJBASAEIAAoAgAoAhQRCAAgAS0ANUEBRgRAIAFBAzYCLCABLQA0RQ0BDAMLIAFBBDYCLAsgASACNgIUIAEgASgCKEEBajYCKCABKAIkQQFHDQEgASgCGEECRw0BIAFBAToANg8LIAAoAggiACABIAIgAyAEIAAoAgAoAhgRBwALC1YBA38jAEHQAGsiAiQAIAJBEGoiAyACQQRqIAEQPCIBIAARAQBBwAAQIyADEEAgAxBBGiABKAIAIgAEQCABIAA2AgQgASgCCBogABAiCyACQdAAaiQAC6gEAQV/IAAoAgQiAhCvAkEBaiIBECciAAR/An8gAUGABE8EQCABBEAgACACIAH8CgAACyAADAELIAAgAWohAwJAIAAgAnNBA3FFBEACQCAAQQNxRQRAIAAhAQwBCyABRQRAIAAhAQwBCyAAIQEDQCABIAItAAA6AAAgAkEBaiECIAFBAWoiAUEDcUUNASABIANJDQALCyADQXxxIQQCQCADQcAASQ0AIAEgBEFAaiIFSw0AA0AgASACKAIANgIAIAEgAigCBDYCBCABIAIoAgg2AgggASACKAIMNgIMIAEgAigCEDYCECABIAIoAhQ2AhQgASACKAIYNgIYIAEgAigCHDYCHCABIAIoAiA2AiAgASACKAIkNgIkIAEgAigCKDYCKCABIAIoAiw2AiwgASACKAIwNgIwIAEgAigCNDYCNCABIAIoAjg2AjggASACKAI8NgI8IAJBQGshAiABQUBrIgEgBU0NAAsLIAEgBE8NAQNAIAEgAigCADYCACACQQRqIQIgAUEEaiIBIARJDQALDAELIANBBEkEQCAAIQEMAQsgAUEESQRAIAAhAQwBCyADQQRrIQUgACEBA0AgASACLQAAOgAAIAEgAi0AAToAASABIAItAAI6AAIgASACLQADOgADIAJBBGohAiABQQRqIgEgBU0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F9FRUUAWk5LOG1hbmlmb2xkOE1hbmlmb2xkMTRSZWZpbmVUb0xlbmd0aEVkRTMkXzAATlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk5LOG1hbmlmb2xkOE1hbmlmb2xkMTdSZWZpbmVUb1RvbGVyYW5jZUVkRTMkXzBGaU42bGluYWxnM3ZlY0lkTGkzRUVFTlM2X0lkTGk0RUVFUzhfRUVFAFpOSzhtYW5pZm9sZDhNYW5pZm9sZDE3UmVmaW5lVG9Ub2xlcmFuY2VFZEUzJF8wAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGxFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTM19FRU5TXzlhbGxvY2F0b3JJUzNfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGxFRUUAAAAAABgtRFT7Iek/GC1EVPsh6b/SITN/fNkCQNIhM3982QLAAEHHhgELEYAYLURU+yEJQBgtRFT7IQnAAEHshgELBQEAAAABAEGEhwELAQEAQZiHAQslAQAAAAAAAAD/////AAAAAAAAAAABAAAAAAAAAP////8AAAAAAQBByIcBCxz/////AQAAAP///////////////wEAAAD/////AEH0hwELBP////8AQYiIAQtJ/////wAAAAAAAAAA//////////8BAAAA/////wAAAAD/////AQAAAP//////////AAAAAAEAAAACAAAAAAAAAAEAAAABAAAAAgBB4IgBC7AR////////////////AAAAAAMAAAAEAAAAAAAAAAEAAAAFAAAAAQAAAAUAAAADAAAAAQAAAAQAAAACAAAAAQAAAAAAAAADAAAAAgAAAAUAAAAAAAAABQAAAAMAAAACAAAAAgAAAAMAAAAFAAAAAAAAAAUAAAACAAAAAwAAAAAAAAABAAAAAgAAAAQAAAABAAAAAwAAAAUAAAABAAAABQAAAAEAAAAAAAAABAAAAAMAAAAAAAAA////////////////////////////////////////////////////////////////AwAAAAQAAAABAAAA////////////////AwAAAAI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A1IwAAAx2AABVSAAADHYAALpIAAAAAAAAEI0AACgCAAApAgAAKgIAACsCAAAsAgAALQIAAC4CAAAvAgAAMAIAADR2AAD4SAAAHI0AAAx2AACSSQAADHYAAP5JAAAAAAAASI0AADUCAAA2AgAANwIAAKABAAA4AgAANHYAAKBKAAD0cgAANHYAAOlKAAAUdwAAAAAAAFSNAAAzAgAAOQIAADoCAAAAAAAAhI0AADsCAAA8AgAANHYAAAxLAAAYjgAAAAAAAKyNAAA9AgAAPgIAAD8CAABAAgAAQQIAADR2AAAlSwAAuI0AAAx2AAA/SwAAAAAAAOyNAABCAgAAQwIAAEQCAABFAgAARgIAAEcCAABIAgAASQIAAEoCAAA0dgAAWEsAAPiNAAAMdgAA10sAAAx2AAAhTAAAAAAAABiOAAA7AgAATAIAAAx2AAByTAAAAAAAADCOAAA7AgAATQIAADR2AACPTAAAGI4AAAAgAACwlQEAQdCcAgt+oJIAALiSAADQkgAA6JIAAACTAAAYkwAAMJMAAEiTAABgkwAAeJMAAJCTAACokwAAwJMAANiTAADwkwAACJQAACCUAAA4lAAAUJQAAGiUAACAlAAAmJQAALCUAADIlAAA4JQAAPiUAAAQlQAAKJUAAECVAABYlQAAcJUAAIiV\",typeof document\u003e\"u\"\u0026\u0026typeof location\u003e\"u\"?require(\"url\").pathToFileURL(__filename).href:typeof document\u003e\"u\"?location.href:Bu\u0026\u0026Bu.tagName.toUpperCase()===\"SCRIPT\"\u0026\u0026Bu.src||new URL(\"standalone.min.js\",document.baseURI).href).href}function J(ot){if(ot==te\u0026\u0026p)return new Uint8Array(p);if(g)return g(ot);throw\"both async and sync fetching of the wasm failed\"}async function oe(ot){if(!p)try{var rt=await u(ot);return new Uint8Array(rt)}catch{}return J(ot)}async function ie(ot,rt){try{var Ot=await oe(ot),an=await WebAssembly.instantiate(Ot,rt);return an}catch(Dn){d(`failed to asynchronously prepare wasm: ${Dn}`),W(Dn)}}async function ne(ot,rt,Ot){if(!ot\u0026\u0026!_(rt)\u0026\u0026!r)try{var an=fetch(rt,{credentials:\"same-origin\"}),Dn=await WebAssembly.instantiateStreaming(an,Ot);return Dn}catch(Xn){d(`wasm streaming compile failed: ${Xn}`),d(\"falling back to ArrayBuffer instantiation\")}return ie(rt,Ot)}function le(){var ot={a:f1};return ot}async function ge(){function ot(Xn,oo){return ku=Xn.exports,ku=fm(ku),HC(ku),F(),ku}function rt(Xn){return ot(Xn.instance)}var Ot=le();if(n.instantiateWasm)return new Promise((Xn,oo)=\u003e{n.instantiateWasm(Ot,(vo,Xo)=\u003e{Xn(ot(vo))})});te??=j();var an=await ne(p,te,Ot),Dn=rt(an);return Dn}var _e=ot=\u003e{for(;ot.length\u003e0;)ot.shift()(n)},ue=[],fe=ot=\u003eue.push(ot),pe=[],ye=ot=\u003epe.push(ot);function Me(ot,rt=\"i8\"){switch(rt.endsWith(\"*\")\u0026\u0026(rt=\"*\"),rt){case\"i1\":return C[ot\u003e\u003e\u003e0];case\"i8\":return C[ot\u003e\u003e\u003e0];case\"i16\":return x[ot\u003e\u003e\u003e1\u003e\u003e\u003e0];case\"i32\":return B[ot\u003e\u003e\u003e2\u003e\u003e\u003e0];case\"i64\":return M[ot\u003e\u003e\u003e3\u003e\u003e\u003e0];case\"float\":return Q[ot\u003e\u003e\u003e2\u003e\u003e\u003e0];case\"double\":return w[ot\u003e\u003e\u003e3\u003e\u003e\u003e0];case\"*\":return S[ot\u003e\u003e\u003e2\u003e\u003e\u003e0];default:W(`invalid type for getValue: ${rt}`)}}function ve(ot,rt,Ot=\"i8\"){switch(Ot.endsWith(\"*\")\u0026\u0026(Ot=\"*\"),Ot){case\"i1\":C[ot\u003e\u003e\u003e0]=rt;break;case\"i8\":C[ot\u003e\u003e\u003e0]=rt;break;case\"i16\":x[ot\u003e\u003e\u003e1\u003e\u003e\u003e0]=rt;break;case\"i32\":B[ot\u003e\u003e\u003e2\u003e\u003e\u003e0]=rt;break;case\"i64\":M[ot\u003e\u003e\u003e3\u003e\u003e\u003e0]=BigInt(rt);break;case\"float\":Q[ot\u003e\u003e\u003e2\u003e\u003e\u003e0]=rt;break;case\"double\":w[ot\u003e\u003e\u003e3\u003e\u003e\u003e0]=rt;break;case\"*\":S[ot\u003e\u003e\u003e2\u003e\u003e\u003e0]=rt;break;default:W(`invalid type for setValue: ${Ot}`)}}class he{constructor(rt){this.excPtr=rt,this.ptr=rt-24}set_type(rt){S[this.ptr+4\u003e\u003e\u003e2\u003e\u003e\u003e0]=rt}get_type(){return S[this.ptr+4\u003e\u003e\u003e2\u003e\u003e\u003e0]}set_destructor(rt){S[this.ptr+8\u003e\u003e\u003e2\u003e\u003e\u003e0]=rt}get_destructor(){return S[this.ptr+8\u003e\u003e\u003e2\u003e\u003e\u003e0]}set_caught(rt){rt=rt?1:0,C[this.ptr+12\u003e\u003e\u003e0]=rt}get_caught(){return C[this.ptr+12\u003e\u003e\u003e0]!=0}set_rethrown(rt){rt=rt?1:0,C[this.ptr+13\u003e\u003e\u003e0]=rt}get_rethrown(){return C[this.ptr+13\u003e\u003e\u003e0]!=0}init(rt,Ot){this.set_adjusted_ptr(0),this.set_type(rt),this.set_destructor(Ot)}set_adjusted_ptr(rt){S[this.ptr+16\u003e\u003e\u003e2\u003e\u003e\u003e0]=rt}get_adjusted_ptr(){return S[this.ptr+16\u003e\u003e\u003e2\u003e\u003e\u003e0]}}var Qe=0;function Pe(ot,rt,Ot){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0;var an=new he(ot);throw an.init(rt,Ot),Qe=ot,Qe}var we=()=\u003eW(\"\"),Te={},Re=ot=\u003e{for(;ot.length;){var rt=ot.pop(),Ot=ot.pop();Ot(rt)}};function Ee(ot){return this.fromWireType(S[ot\u003e\u003e\u003e2\u003e\u003e\u003e0])}var ke={},Ce={},Le={},Ye=class extends Error{constructor(rt){super(rt),this.name=\"InternalError\"}},tt=ot=\u003e{throw new Ye(ot)},At=(ot,rt,Ot)=\u003e{ot.forEach(vo=\u003eLe[vo]=rt);function an(vo){var Xo=Ot(vo);Xo.length!==ot.length\u0026\u0026tt(\"Mismatched type converter count\");for(var Ti=0;Ti\u003cot.length;++Ti)Dt(ot[Ti],Xo[Ti])}var Dn=new Array(rt.length),Xn=[],oo=0;for(let[vo,Xo]of rt.entries())Ce.hasOwnProperty(Xo)?Dn[vo]=Ce[Xo]:(Xn.push(Xo),ke.hasOwnProperty(Xo)||(ke[Xo]=[]),ke[Xo].push(()=\u003e{Dn[vo]=Ce[Xo],++oo,oo===Xn.length\u0026\u0026an(Dn)}));Xn.length===0\u0026\u0026an(Dn)},at=function(ot){ot\u003e\u003e\u003e=0;var rt=Te[ot];delete Te[ot];var Ot=rt.rawConstructor,an=rt.rawDestructor,Dn=rt.fields,Xn=Dn.map(oo=\u003eoo.getterReturnType).concat(Dn.map(oo=\u003eoo.setterArgumentType));At([ot],Xn,oo=\u003e{var vo={};for(var[Xo,Ti]of Dn.entries()){const ir=oo[Xo],Gs=Ti.getter,qr=Ti.getterContext,ps=oo[Xo+Dn.length],Ic=Ti.setter,lc=Ti.setterContext;vo[Ti.fieldName]={read:ka=\u003eir.fromWireType(Gs(qr,ka)),write:(ka,gn)=\u003e{var bn=[];Ic(lc,ka,ps.toWireType(bn,gn)),Re(bn)},optional:ir.optional}}return[{name:rt.name,fromWireType:ir=\u003e{var Gs={};for(var qr in vo)Gs[qr]=vo[qr].read(ir);return an(ir),Gs},toWireType:(ir,Gs)=\u003e{for(var qr in vo)if(!(qr in Gs)\u0026\u0026!vo[qr].optional)throw new TypeError(`Missing field: \"${qr}\"`);var ps=Ot();for(qr in vo)vo[qr].write(ps,Gs[qr]);return ir!==null\u0026\u0026ir.push(an,ps),ps},readValueFromPointer:Ee,destructorFunction:an}]})},nt=ot=\u003e{ot\u003e\u003e\u003e=0;for(var rt=\"\";;){var Ot=y[ot++\u003e\u003e\u003e0];if(!Ot)return rt;rt+=String.fromCharCode(Ot)}},gt=class extends Error{constructor(rt){super(rt),this.name=\"BindingError\"}},bt=ot=\u003e{throw new gt(ot)};function Ct(ot,rt,Ot={}){var an=rt.name;if(ot||bt(`type \"${an}\" must have a positive integer typeid pointer`),Ce.hasOwnProperty(ot)){if(Ot.ignoreDuplicateRegistrations)return;bt(`Cannot register type '${an}' twice`)}if(Ce[ot]=rt,delete Le[ot],ke.hasOwnProperty(ot)){var Dn=ke[ot];delete ke[ot],Dn.forEach(Xn=\u003eXn())}}function Dt(ot,rt,Ot={}){return Ct(ot,rt,Ot)}var kt=(ot,rt,Ot)=\u003e{switch(rt){case 1:return Ot?an=\u003eC[an\u003e\u003e\u003e0]:an=\u003ey[an\u003e\u003e\u003e0];case 2:return Ot?an=\u003ex[an\u003e\u003e\u003e1\u003e\u003e\u003e0]:an=\u003eE[an\u003e\u003e\u003e1\u003e\u003e\u003e0];case 4:return Ot?an=\u003eB[an\u003e\u003e\u003e2\u003e\u003e\u003e0]:an=\u003eS[an\u003e\u003e\u003e2\u003e\u003e\u003e0];case 8:return Ot?an=\u003eM[an\u003e\u003e\u003e3\u003e\u003e\u003e0]:an=\u003ek[an\u003e\u003e\u003e3\u003e\u003e\u003e0];default:throw new TypeError(`invalid integer width (${rt}): ${ot}`)}},it=function(ot,rt,Ot,an,Dn){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,rt=nt(rt);const Xn=an===0n;let oo=vo=\u003evo;if(Xn){const vo=Ot*8;oo=Xo=\u003eBigInt.asUintN(vo,Xo),Dn=oo(Dn)}Dt(ot,{name:rt,fromWireType:oo,toWireType:(vo,Xo)=\u003e(typeof Xo==\"number\"\u0026\u0026(Xo=BigInt(Xo)),Xo),readValueFromPointer:kt(rt,Ot,!Xn),destructorFunction:null})};function Yt(ot,rt,Ot,an){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,rt=nt(rt),Dt(ot,{name:rt,fromWireType:function(Dn){return!!Dn},toWireType:function(Dn,Xn){return Xn?Ot:an},readValueFromPointer:function(Dn){return this.fromWireType(y[Dn\u003e\u003e\u003e0])},destructorFunction:null})}var pn=ot=\u003e({count:ot.count,deleteScheduled:ot.deleteScheduled,preservePointerOnDelete:ot.preservePointerOnDelete,ptr:ot.ptr,ptrType:ot.ptrType,smartPtr:ot.smartPtr,smartPtrType:ot.smartPtrType}),be=ot=\u003e{function rt(Ot){return Ot.$.ptrType.registeredClass.name}bt(rt(ot)+\" instance already deleted\")},et=!1,It=ot=\u003e{},Bt=ot=\u003e{ot.smartPtr?ot.smartPtrType.rawDestructor(ot.smartPtr):ot.ptrType.registeredClass.rawDestructor(ot.ptr)},mt=ot=\u003e{ot.count.value-=1;var rt=ot.count.value===0;rt\u0026\u0026Bt(ot)},st=ot=\u003eglobalThis.FinalizationRegistry?(et=new FinalizationRegistry(rt=\u003e{mt(rt.$)}),st=rt=\u003e{var Ot=rt.$,an=!!Ot.smartPtr;if(an){var Dn={$:Ot};et.register(rt,Dn,rt)}return rt},It=rt=\u003eet.unregister(rt),st(ot)):(st=rt=\u003ert,ot),xt=()=\u003e{let ot=Xe.prototype;Object.assign(ot,{isAliasOf(Ot){if(!(this instanceof Xe)||!(Ot instanceof Xe))return!1;var an=this.$.ptrType.registeredClass,Dn=this.$.ptr;Ot.$=Ot.$;for(var Xn=Ot.$.ptrType.registeredClass,oo=Ot.$.ptr;an.baseClass;)Dn=an.upcast(Dn),an=an.baseClass;for(;Xn.baseClass;)oo=Xn.upcast(oo),Xn=Xn.baseClass;return an===Xn\u0026\u0026Dn===oo},clone(){if(this.$.ptr||be(this),this.$.preservePointerOnDelete)return this.$.count.value+=1,this;var Ot=st(Object.create(Object.getPrototypeOf(this),{$:{value:pn(this.$)}}));return Ot.$.count.value+=1,Ot.$.deleteScheduled=!1,Ot},delete(){this.$.ptr||be(this),this.$.deleteScheduled\u0026\u0026!this.$.preservePointerOnDelete\u0026\u0026bt(\"Object already scheduled for deletion\"),It(this),mt(this.$),this.$.preservePointerOnDelete||(this.$.smartPtr=void 0,this.$.ptr=void 0)},isDeleted(){return!this.$.ptr},deleteLater(){return this.$.ptr||be(this),this.$.deleteScheduled\u0026\u0026!this.$.preservePointerOnDelete\u0026\u0026bt(\"Object already scheduled for deletion\"),this.$.deleteScheduled=!0,this}});const rt=Symbol.dispose;rt\u0026\u0026(ot[rt]=ot.delete)};function Xe(){}var Ze=(ot,rt)=\u003eObject.defineProperty(rt,\"name\",{value:ot}),dt={},Ut=(ot,rt,Ot)=\u003e{if(ot[rt].overloadTable===void 0){var an=ot[rt];ot[rt]=function(...Dn){return ot[rt].overloadTable.hasOwnProperty(Dn.length)||bt(`Function '${Ot}' called with an invalid number of arguments (${Dn.length}) - expects one of (${ot[rt].overloadTable})!`),ot[rt].overloadTable[Dn.length].apply(this,Dn)},ot[rt].overloadTable=[],ot[rt].overloadTable[an.argCount]=an}},Wt=(ot,rt,Ot)=\u003e{n.hasOwnProperty(ot)?((Ot===void 0||n[ot].overloadTable!==void 0\u0026\u0026n[ot].overloadTable[Ot]!==void 0)\u0026\u0026bt(`Cannot register public name '${ot}' twice`),Ut(n,ot,ot),n[ot].overloadTable.hasOwnProperty(Ot)\u0026\u0026bt(`Cannot register multiple overloads of a function with the same number of arguments (${Ot})!`),n[ot].overloadTable[Ot]=rt):(n[ot]=rt,n[ot].argCount=Ot)},Xt=48,Jt=57,yn=ot=\u003e{ot=ot.replace(/[^a-zA-Z0-9_]/g,\"$\");var rt=ot.charCodeAt(0);return rt\u003e=Xt\u0026\u0026rt\u003c=Jt?`_${ot}`:ot};function An(ot,rt,Ot,an,Dn,Xn,oo,vo){this.name=ot,this.constructor=rt,this.instancePrototype=Ot,this.rawDestructor=an,this.baseClass=Dn,this.getActualType=Xn,this.upcast=oo,this.downcast=vo,this.pureVirtualFunctions=[]}var kn=(ot,rt,Ot)=\u003e{for(;rt!==Ot;)rt.upcast||bt(`Expected null or instance of ${Ot.name}, got an instance of ${rt.name}`),ot=rt.upcast(ot),rt=rt.baseClass;return ot},$n=ot=\u003e{if(ot===null)return\"null\";var rt=typeof ot;return rt===\"object\"||rt===\"array\"||rt===\"function\"?ot.toString():\"\"+ot};function ht(ot,rt){if(rt===null)return this.isReference\u0026\u0026bt(`null is not a valid ${this.name}`),0;rt.$||bt(`Cannot pass \"${$n(rt)}\" as a ${this.name}`),rt.$.ptr||bt(`Cannot pass deleted object as a pointer of type ${this.name}`);var Ot=rt.$.ptrType.registeredClass,an=kn(rt.$.ptr,Ot,this.registeredClass);return an}function Kt(ot,rt){var Ot;if(rt===null)return this.isReference\u0026\u0026bt(`null is not a valid ${this.name}`),this.isSmartPointer?(Ot=this.rawConstructor(),ot!==null\u0026\u0026ot.push(this.rawDestructor,Ot),Ot):0;(!rt||!rt.$)\u0026\u0026bt(`Cannot pass \"${$n(rt)}\" as a ${this.name}`),rt.$.ptr||bt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst\u0026\u0026rt.$.ptrType.isConst\u0026\u0026bt(`Cannot convert argument of type ${rt.$.smartPtrType?rt.$.smartPtrType.name:rt.$.ptrType.name} to parameter type ${this.name}`);var an=rt.$.ptrType.registeredClass;if(Ot=kn(rt.$.ptr,an,this.registeredClass),this.isSmartPointer)switch(rt.$.smartPtr===void 0\u0026\u0026bt(\"Passing raw pointer to smart pointer is illegal\"),this.sharingPolicy){case 0:rt.$.smartPtrType===this?Ot=rt.$.smartPtr:bt(`Cannot convert argument of type ${rt.$.smartPtrType?rt.$.smartPtrType.name:rt.$.ptrType.name} to parameter type ${this.name}`);break;case 1:Ot=rt.$.smartPtr;break;case 2:if(rt.$.smartPtrType===this)Ot=rt.$.smartPtr;else{var Dn=rt.clone();Ot=this.rawShare(Ot,bi.toHandle(()=\u003eDn.delete())),ot!==null\u0026\u0026ot.push(this.rawDestructor,Ot)}break;default:bt(\"Unsupported sharing policy\")}return Ot}function rn(ot,rt){if(rt===null)return this.isReference\u0026\u0026bt(`null is not a valid ${this.name}`),0;rt.$||bt(`Cannot pass \"${$n(rt)}\" as a ${this.name}`),rt.$.ptr||bt(`Cannot pass deleted object as a pointer of type ${this.name}`),rt.$.ptrType.isConst\u0026\u0026bt(`Cannot convert argument of type ${rt.$.ptrType.name} to parameter type ${this.name}`);var Ot=rt.$.ptrType.registeredClass,an=kn(rt.$.ptr,Ot,this.registeredClass);return an}var Lt=(ot,rt,Ot)=\u003e{if(rt===Ot)return ot;if(Ot.baseClass===void 0)return null;var an=Lt(ot,rt,Ot.baseClass);return an===null?null:Ot.downcast(an)},Ho={},Ao=(ot,rt)=\u003e{for(rt===void 0\u0026\u0026bt(\"ptr should not be undefined\");ot.baseClass;)rt=ot.upcast(rt),ot=ot.baseClass;return rt},qe=(ot,rt)=\u003e(rt=Ao(ot,rt),Ho[rt]),vt=(ot,rt)=\u003e{(!rt.ptrType||!rt.ptr)\u0026\u0026tt(\"makeClassHandle requires ptr and ptrType\");var Ot=!!rt.smartPtrType,an=!!rt.smartPtr;return Ot!==an\u0026\u0026tt(\"Both smartPtrType and smartPtr must be specified\"),rt.count={value:1},st(Object.create(ot,{$:{value:rt,writable:!0}}))};function qt(ot){var rt=this.getPointee(ot);if(!rt)return this.destructor(ot),null;var Ot=qe(this.registeredClass,rt);if(Ot!==void 0){if(Ot.$.count.value===0)return Ot.$.ptr=rt,Ot.$.smartPtr=ot,Ot.clone();var an=Ot.clone();return this.destructor(ot),an}function Dn(){return this.isSmartPointer?vt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rt,smartPtrType:this,smartPtr:ot}):vt(this.registeredClass.instancePrototype,{ptrType:this,ptr:ot})}var Xn=this.registeredClass.getActualType(rt),oo=dt[Xn];if(!oo)return Dn.call(this);var vo;this.isConst?vo=oo.constPointerType:vo=oo.pointerType;var Xo=Lt(rt,this.registeredClass,vo.registeredClass);return Xo===null?Dn.call(this):this.isSmartPointer?vt(vo.registeredClass.instancePrototype,{ptrType:vo,ptr:Xo,smartPtrType:this,smartPtr:ot}):vt(vo.registeredClass.instancePrototype,{ptrType:vo,ptr:Xo})}var Zt=()=\u003e{Object.assign(nn.prototype,{getPointee(ot){return this.rawGetPointee\u0026\u0026(ot=this.rawGetPointee(ot)),ot},destructor(ot){this.rawDestructor?.(ot)},readValueFromPointer:Ee,fromWireType:qt})};function nn(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti,ir){this.name=ot,this.registeredClass=rt,this.isReference=Ot,this.isConst=an,this.isSmartPointer=Dn,this.pointeeType=Xn,this.sharingPolicy=oo,this.rawGetPointee=vo,this.rawConstructor=Xo,this.rawShare=Ti,this.rawDestructor=ir,!Dn\u0026\u0026rt.baseClass===void 0?an?(this.toWireType=ht,this.destructorFunction=null):(this.toWireType=rn,this.destructorFunction=null):this.toWireType=Kt}var zn=(ot,rt,Ot)=\u003e{n.hasOwnProperty(ot)||tt(\"Replacing nonexistent public symbol\"),n[ot].overloadTable!==void 0\u0026\u0026Ot!==void 0?n[ot].overloadTable[Ot]=rt:(n[ot]=rt,n[ot].argCount=Ot)},Nn=ot=\u003en0.get(ot),Co=(ot,rt,Ot=[],an=!1)=\u003e{var Dn=Nn(rt),Xn=Dn(...Ot);function oo(vo){return ot[0]==\"p\"?vo\u003e\u003e\u003e0:vo}return oo(Xn)},ei=(ot,rt,Ot=!1)=\u003e(...an)=\u003eCo(ot,rt,an,Ot),ro=(ot,rt,Ot=!1)=\u003e{ot=nt(ot);function an(){if(ot.includes(\"p\"))return ei(ot,rt,Ot);var Xn=Nn(rt);return Xn}var Dn=an();return typeof Dn!=\"function\"\u0026\u0026bt(`unknown function pointer with signature ${ot}: ${rt}`),Dn};class To extends Error{}var yo=ot=\u003e{var rt=BI(ot),Ot=nt(rt);return PA(rt),Ot},Ro=(ot,rt)=\u003e{var Ot=[],an={};function Dn(Xn){if(!an[Xn]\u0026\u0026!Ce[Xn]){if(Le[Xn]){Le[Xn].forEach(Dn);return}Ot.push(Xn),an[Xn]=!0}}throw rt.forEach(Dn),new To(`${ot}: `+Ot.map(yo).join([\", \"]))};function On(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti,ir,Gs,qr){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Dn\u003e\u003e\u003e=0,Xn\u003e\u003e\u003e=0,oo\u003e\u003e\u003e=0,vo\u003e\u003e\u003e=0,Xo\u003e\u003e\u003e=0,Ti\u003e\u003e\u003e=0,ir\u003e\u003e\u003e=0,Gs\u003e\u003e\u003e=0,qr\u003e\u003e\u003e=0,ir=nt(ir),Xn=ro(Dn,Xn),vo\u0026\u0026=ro(oo,vo),Ti\u0026\u0026=ro(Xo,Ti),qr=ro(Gs,qr);var ps=yn(ir);Wt(ps,function(){Ro(`Cannot construct ${ir} due to unbound types`,[an])}),At([ot,rt,Ot],an?[an]:[],Ic=\u003e{Ic=Ic[0];var lc,ka;an?(lc=Ic.registeredClass,ka=lc.instancePrototype):ka=Xe.prototype;var gn=Ze(ir,function(...lA){if(Object.getPrototypeOf(this)!==bn)throw new gt(`Use 'new' to construct ${ir}`);if(go.constructor_body===void 0)throw new gt(`${ir} has no accessible constructor`);var MA=go.constructor_body[lA.length];if(MA===void 0)throw new gt(`Tried to invoke ctor of ${ir} with invalid number of parameters (${lA.length}) - expected (${Object.keys(go.constructor_body).toString()}) parameters instead!`);return MA.apply(this,lA)}),bn=Object.create(ka,{constructor:{value:gn}});gn.prototype=bn;var go=new An(ir,gn,bn,qr,lc,Xn,vo,Ti);go.baseClass\u0026\u0026(go.baseClass.__derivedClasses??=[],go.baseClass.__derivedClasses.push(go));var Go=new nn(ir,go,!0,!1,!1),hr=new nn(ir+\"*\",go,!1,!1,!1),ia=new nn(ir+\" const*\",go,!1,!0,!1);return dt[ot]={pointerType:hr,constPointerType:ia},zn(ps,gn),[Go,hr,ia]})}var uo=(ot,rt)=\u003e{for(var Ot=[],an=0;an\u003cot;an++)Ot.push(S[rt+an*4\u003e\u003e\u003e2\u003e\u003e\u003e0]);return Ot};function Oo(ot){for(var rt=1;rt\u003cot.length;++rt)if(ot[rt]!==null\u0026\u0026ot[rt].destructorFunction===void 0)return!0;return!1}function ko(ot,rt,Ot,an){var Dn=Oo(ot),Xn=ot.length-2,oo=[],vo=[\"fn\"];rt\u0026\u0026vo.push(\"thisWired\");for(var Xo=0;Xo\u003cXn;++Xo)oo.push(`arg${Xo}`),vo.push(`arg${Xo}Wired`);oo=oo.join(\",\"),vo=vo.join(\",\");var Ti=`return function (${oo}) {\n`;Dn\u0026\u0026(Ti+=`var destructors = [];\n`);var ir=Dn?\"destructors\":\"null\",Gs=[\"humanName\",\"throwBindingError\",\"invoker\",\"fn\",\"runDestructors\",\"fromRetWire\",\"toClassParamWire\"];rt\u0026\u0026(Ti+=`var thisWired = toClassParamWire(${ir}, this);\n`);for(var Xo=0;Xo\u003cXn;++Xo){var qr=`toArg${Xo}Wire`;Ti+=`var arg${Xo}Wired = ${qr}(${ir}, arg${Xo});\n`,Gs.push(qr)}if(Ti+=(Ot||an?\"var rv = \":\"\")+`invoker(${vo});\n`,Dn)Ti+=`runDestructors(destructors);\n`;else for(var Xo=rt?1:2;Xo\u003cot.length;++Xo){var ps=Xo===1?\"thisWired\":\"arg\"+(Xo-2)+\"Wired\";ot[Xo].destructorFunction!==null\u0026\u0026(Ti+=`${ps}_dtor(${ps});\n`,Gs.push(`${ps}_dtor`))}return Ot\u0026\u0026(Ti+=`var ret = fromRetWire(rv);\nreturn ret;\n`),Ti+=`}\n`,new Function(Gs,Ti)}function Ko(ot,rt,Ot,an,Dn,Xn){var oo=rt.length;oo\u003c2\u0026\u0026bt(\"argTypes array size mismatch! Must at least get return value and 'this' types!\");for(var vo=rt[1]!==null\u0026\u0026Ot!==null,Xo=Oo(rt),Ti=!rt[0].isVoid,ir=rt[0],Gs=rt[1],qr=[ot,bt,an,Dn,Re,ir.fromWireType.bind(ir),Gs?.toWireType.bind(Gs)],ps=2;ps\u003coo;++ps){var Ic=rt[ps];qr.push(Ic.toWireType.bind(Ic))}if(!Xo)for(var ps=vo?1:2;ps\u003crt.length;++ps)rt[ps].destructorFunction!==null\u0026\u0026qr.push(rt[ps].destructorFunction);var ka=ko(rt,vo,Ti,Xn)(...qr);return Ze(ot,ka)}var mi=function(ot,rt,Ot,an,Dn,Xn){ot\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Dn\u003e\u003e\u003e=0,Xn\u003e\u003e\u003e=0;var oo=uo(rt,Ot);Dn=ro(an,Dn),At([],[ot],vo=\u003e{vo=vo[0];var Xo=`constructor ${vo.name}`;if(vo.registeredClass.constructor_body===void 0\u0026\u0026(vo.registeredClass.constructor_body=[]),vo.registeredClass.constructor_body[rt-1]!==void 0)throw new gt(`Cannot register multiple constructors with identical number of parameters (${rt-1}) for class '${vo.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return vo.registeredClass.constructor_body[rt-1]=()=\u003e{Ro(`Cannot construct ${vo.name} due to unbound types`,oo)},At([],oo,Ti=\u003e(Ti.splice(1,0,null),vo.registeredClass.constructor_body[rt-1]=Ko(Xo,Ti,null,Dn,Xn),[])),[]})},Fo=ot=\u003e{ot=ot.trim();const rt=ot.indexOf(\"(\");return rt===-1?ot:ot.slice(0,rt)},Nr=function(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Dn\u003e\u003e\u003e=0,Xn\u003e\u003e\u003e=0,oo\u003e\u003e\u003e=0;var ir=uo(Ot,an);rt=nt(rt),rt=Fo(rt),Xn=ro(Dn,Xn,Xo),At([],[ot],Gs=\u003e{Gs=Gs[0];var qr=`${Gs.name}.${rt}`;rt.startsWith(\"@@\")\u0026\u0026(rt=Symbol[rt.substring(2)]),vo\u0026\u0026Gs.registeredClass.pureVirtualFunctions.push(rt);function ps(){Ro(`Cannot call ${qr} due to unbound types`,ir)}var Ic=Gs.registeredClass.instancePrototype,lc=Ic[rt];return lc===void 0||lc.overloadTable===void 0\u0026\u0026lc.className!==Gs.name\u0026\u0026lc.argCount===Ot-2?(ps.argCount=Ot-2,ps.className=Gs.name,Ic[rt]=ps):(Ut(Ic,rt,qr),Ic[rt].overloadTable[Ot-2]=ps),At([],ir,ka=\u003e{var gn=Ko(qr,ka,Gs,Xn,oo,Xo);return Ic[rt].overloadTable===void 0?(gn.argCount=Ot-2,Ic[rt]=gn):Ic[rt].overloadTable[Ot-2]=gn,[]}),[]})},Rs=[],ur=[0,1,,1,null,1,!0,1,!1,1];function zi(ot){ot\u003e\u003e\u003e=0,ot\u003e9\u0026\u0026--ur[ot+1]===0\u0026\u0026(ur[ot]=void 0,Rs.push(ot))}var bi={toValue:ot=\u003e(ot||bt(`Cannot use deleted val. handle = ${ot}`),ur[ot]),toHandle:ot=\u003e{switch(ot){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const rt=Rs.pop()||ur.length;return ur[rt]=ot,ur[rt+1]=1,rt}}}},Ar={name:\"emscripten::val\",fromWireType:ot=\u003e{var rt=bi.toValue(ot);return zi(ot),rt},toWireType:(ot,rt)=\u003ebi.toHandle(rt),readValueFromPointer:Ee,destructorFunction:null};function ws(ot){return ot\u003e\u003e\u003e=0,Dt(ot,Ar)}var ds=(ot,rt,Ot)=\u003e{switch(rt){case 1:return Ot?function(an){return this.fromWireType(C[an\u003e\u003e\u003e0])}:function(an){return this.fromWireType(y[an\u003e\u003e\u003e0])};case 2:return Ot?function(an){return this.fromWireType(x[an\u003e\u003e\u003e1\u003e\u003e\u003e0])}:function(an){return this.fromWireType(E[an\u003e\u003e\u003e1\u003e\u003e\u003e0])};case 4:return Ot?function(an){return this.fromWireType(B[an\u003e\u003e\u003e2\u003e\u003e\u003e0])}:function(an){return this.fromWireType(S[an\u003e\u003e\u003e2\u003e\u003e\u003e0])};default:throw new TypeError(`invalid integer width (${rt}): ${ot}`)}};function Et(ot){return ot===0?\"object\":ot===1?\"number\":\"string\"}function Gt(ot,rt,Ot,an,Dn){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,rt=nt(rt);const Xn=Et(Dn);switch(Xn){case\"object\":{let Ti=function(){};Ti.values={},Dt(ot,{name:rt,constructor:Ti,valueType:Xn,fromWireType:function(ir){return this.constructor.values[ir]},toWireType:(ir,Gs)=\u003eGs.value,readValueFromPointer:ds(rt,Ot,an),destructorFunction:null}),Wt(rt,Ti);break}case\"number\":{var oo={};Dt(ot,{name:rt,keysMap:oo,valueType:Xn,fromWireType:Ti=\u003eTi,toWireType:(Ti,ir)=\u003eir,readValueFromPointer:ds(rt,Ot,an),destructorFunction:null}),Wt(rt,oo),delete n[rt].argCount;break}case\"string\":{var vo={},Xo={},oo={};Dt(ot,{name:rt,valuesMap:vo,reverseMap:Xo,keysMap:oo,valueType:Xn,fromWireType:function(ir){return this.reverseMap[ir]},toWireType:function(ir,Gs){return this.valuesMap[Gs]},readValueFromPointer:ds(rt,Ot,an),destructorFunction:null}),Wt(rt,oo),delete n[rt].argCount;break}}}var Rt=(ot,rt)=\u003e{var Ot=Ce[ot];return Ot===void 0\u0026\u0026bt(`${rt} has unknown type ${yo(ot)}`),Ot};function Ht(ot,rt,Ot){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0;var an=Rt(ot,\"enum\");switch(rt=nt(rt),an.valueType){case\"object\":{var Dn=an.constructor,Xn=Object.create(an.constructor.prototype,{value:{value:Ot},constructor:{value:Ze(`${an.name}_${rt}`,function(){})}});Dn.values[Ot]=Xn,Dn[rt]=Xn;break}case\"number\":{an.keysMap[rt]=Ot;break}case\"string\":{an.valuesMap[rt]=Ot,an.reverseMap[Ot]=rt,an.keysMap[rt]=rt;break}}}var Qt=(ot,rt)=\u003e{switch(rt){case 4:return function(Ot){return this.fromWireType(Q[Ot\u003e\u003e\u003e2\u003e\u003e\u003e0])};case 8:return function(Ot){return this.fromWireType(w[Ot\u003e\u003e\u003e3\u003e\u003e\u003e0])};default:throw new TypeError(`invalid float width (${rt}): ${ot}`)}},Nt=function(ot,rt,Ot){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,rt=nt(rt),Dt(ot,{name:rt,fromWireType:an=\u003ean,toWireType:(an,Dn)=\u003eDn,readValueFromPointer:Qt(rt,Ot),destructorFunction:null})};function _n(ot,rt,Ot,an,Dn,Xn,oo,vo){ot\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Dn\u003e\u003e\u003e=0,Xn\u003e\u003e\u003e=0;var Xo=uo(rt,Ot);ot=nt(ot),ot=Fo(ot),Dn=ro(an,Dn,oo),Wt(ot,function(){Ro(`Cannot call ${ot} due to unbound types`,Xo)},rt-1),At([],Xo,Ti=\u003e{var ir=[Ti[0],null].concat(Ti.slice(1));return zn(ot,Ko(ot,ir,null,Dn,Xn,oo),rt-1),[]})}var qn=function(ot,rt,Ot,an,Dn){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,rt=nt(rt);const Xn=an===0;let oo=Xo=\u003eXo;if(Xn){var vo=32-8*Ot;oo=Xo=\u003eXo\u003c\u003cvo\u003e\u003e\u003evo,Dn=oo(Dn)}Dt(ot,{name:rt,fromWireType:oo,toWireType:(Xo,Ti)=\u003eTi,readValueFromPointer:kt(rt,Ot,an!==0),destructorFunction:null})},En=(ot,rt,Ot)=\u003e{const an=(Dn,Xn)=\u003e{let oo=0;return{next(){if(oo\u003e=Dn)return{done:!0};const vo=oo;return oo++,{value:Xn(vo),done:!1}},[Symbol.iterator](){return this}}};ot[Symbol.iterator]||(ot[Symbol.iterator]=function(){const Dn=this[rt]();return an(Dn,Xn=\u003ethis[Ot](Xn))})},Rn=function(ot,rt,Ot,an){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Ot=nt(Ot),an=nt(an),At([],[ot,rt],Dn=\u003e{const Xn=Dn[0];return En(Xn.registeredClass.instancePrototype,Ot,an),[]})};function Hn(ot,rt,Ot){ot\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0;var an=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],Dn=an[rt];function Xn(oo){var vo=S[oo\u003e\u003e\u003e2\u003e\u003e\u003e0],Xo=S[oo+4\u003e\u003e\u003e2\u003e\u003e\u003e0];return new Dn(C.buffer,Xo,vo)}Ot=nt(Ot),Dt(ot,{name:Ot,fromWireType:Xn,readValueFromPointer:Xn},{ignoreDuplicateRegistrations:!0})}var Lo=Object.assign({optional:!0},Ar);function Io(ot,rt){ot\u003e\u003e\u003e=0,Dt(ot,Lo)}var gi=(ot,rt,Ot,an)=\u003e{if(Ot\u003e\u003e\u003e=0,!(an\u003e0))return 0;for(var Dn=Ot,Xn=Ot+an-1,oo=0;oo\u003cot.length;++oo){var vo=ot.codePointAt(oo);if(vo\u003c=127){if(Ot\u003e=Xn)break;rt[Ot++\u003e\u003e\u003e0]=vo}else if(vo\u003c=2047){if(Ot+1\u003e=Xn)break;rt[Ot++\u003e\u003e\u003e0]=192|vo\u003e\u003e6,rt[Ot++\u003e\u003e\u003e0]=128|vo\u002663}else if(vo\u003c=65535){if(Ot+2\u003e=Xn)break;rt[Ot++\u003e\u003e\u003e0]=224|vo\u003e\u003e12,rt[Ot++\u003e\u003e\u003e0]=128|vo\u003e\u003e6\u002663,rt[Ot++\u003e\u003e\u003e0]=128|vo\u002663}else{if(Ot+3\u003e=Xn)break;rt[Ot++\u003e\u003e\u003e0]=240|vo\u003e\u003e18,rt[Ot++\u003e\u003e\u003e0]=128|vo\u003e\u003e12\u002663,rt[Ot++\u003e\u003e\u003e0]=128|vo\u003e\u003e6\u002663,rt[Ot++\u003e\u003e\u003e0]=128|vo\u002663,oo++}}return rt[Ot\u003e\u003e\u003e0]=0,Ot-Dn},jo=(ot,rt,Ot)=\u003egi(ot,y,rt,Ot),oi=ot=\u003e{for(var rt=0,Ot=0;Ot\u003cot.length;++Ot){var an=ot.charCodeAt(Ot);an\u003c=127?rt++:an\u003c=2047?rt+=2:an\u003e=55296\u0026\u0026an\u003c=57343?(rt+=4,++Ot):rt+=3}return rt},Ji=globalThis.TextDecoder\u0026\u0026new TextDecoder,wi=(ot,rt,Ot,an)=\u003e{var Dn=rt+Ot;if(an)return Dn;for(;ot[rt]\u0026\u0026!(rt\u003e=Dn);)++rt;return rt},Br=(ot,rt=0,Ot,an)=\u003e{rt\u003e\u003e\u003e=0;var Dn=wi(ot,rt,Ot,an);if(Dn-rt\u003e16\u0026\u0026ot.buffer\u0026\u0026Ji)return Ji.decode(ot.subarray(rt,Dn));for(var Xn=\"\";rt\u003cDn;){var oo=ot[rt++];if(!(oo\u0026128)){Xn+=String.fromCharCode(oo);continue}var vo=ot[rt++]\u002663;if((oo\u0026224)==192){Xn+=String.fromCharCode((oo\u002631)\u003c\u003c6|vo);continue}var Xo=ot[rt++]\u002663;if((oo\u0026240)==224?oo=(oo\u002615)\u003c\u003c12|vo\u003c\u003c6|Xo:oo=(oo\u00267)\u003c\u003c18|vo\u003c\u003c12|Xo\u003c\u003c6|ot[rt++]\u002663,oo\u003c65536)Xn+=String.fromCharCode(oo);else{var Ti=oo-65536;Xn+=String.fromCharCode(55296|Ti\u003e\u003e10,56320|Ti\u00261023)}}return Xn},gr=(ot,rt,Ot)=\u003e(ot\u003e\u003e\u003e=0,ot?Br(y,ot,rt,Ot):\"\");function oa(ot,rt){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,rt=nt(rt),Dt(ot,{name:rt,fromWireType(Ot){var an=S[Ot\u003e\u003e\u003e2\u003e\u003e\u003e0],Dn=Ot+4,Xn;return Xn=gr(Dn,an,!0),PA(Ot),Xn},toWireType(Ot,an){an instanceof ArrayBuffer\u0026\u0026(an=new Uint8Array(an));var Dn,Xn=typeof an==\"string\";Xn||ArrayBuffer.isView(an)\u0026\u0026an.BYTES_PER_ELEMENT==1||bt(\"Cannot pass non-string to std::string\"),Xn?Dn=oi(an):Dn=an.length;var oo=G0(4+Dn+1),vo=oo+4;return S[oo\u003e\u003e\u003e2\u003e\u003e\u003e0]=Dn,Xn?jo(an,vo,Dn+1):y.set(an,vo\u003e\u003e\u003e0),Ot!==null\u0026\u0026Ot.push(PA,oo),oo},readValueFromPointer:Ee,destructorFunction(Ot){PA(Ot)}})}var hs=globalThis.TextDecoder?new TextDecoder(\"utf-16le\"):void 0,Li=(ot,rt,Ot)=\u003e{var an=ot\u003e\u003e\u003e1,Dn=wi(E,an,rt/2,Ot);if(Dn-an\u003e16\u0026\u0026hs)return hs.decode(E.subarray(an\u003e\u003e\u003e0,Dn\u003e\u003e\u003e0));for(var Xn=\"\",oo=an;oo\u003cDn;++oo){var vo=E[oo\u003e\u003e\u003e0];Xn+=String.fromCharCode(vo)}return Xn},ys=(ot,rt,Ot)=\u003e{if(Ot??=2147483647,Ot\u003c2)return 0;Ot-=2;for(var an=rt,Dn=Ot\u003cot.length*2?Ot/2:ot.length,Xn=0;Xn\u003cDn;++Xn){var oo=ot.charCodeAt(Xn);x[rt\u003e\u003e\u003e1\u003e\u003e\u003e0]=oo,rt+=2}return x[rt\u003e\u003e\u003e1\u003e\u003e\u003e0]=0,rt-an},dr=ot=\u003eot.length*2,cA=(ot,rt,Ot)=\u003e{for(var an=\"\",Dn=ot\u003e\u003e\u003e2,Xn=0;!(Xn\u003e=rt/4);Xn++){var oo=S[Dn+Xn\u003e\u003e\u003e0];if(!oo\u0026\u0026!Ot)break;an+=String.fromCodePoint(oo)}return an},vA=(ot,rt,Ot)=\u003e{if(rt\u003e\u003e\u003e=0,Ot??=2147483647,Ot\u003c4)return 0;for(var an=rt,Dn=an+Ot-4,Xn=0;Xn\u003cot.length;++Xn){var oo=ot.codePointAt(Xn);if(oo\u003e65535\u0026\u0026Xn++,B[rt\u003e\u003e\u003e2\u003e\u003e\u003e0]=oo,rt+=4,rt+4\u003eDn)break}return B[rt\u003e\u003e\u003e2\u003e\u003e\u003e0]=0,rt-an},Yl=ot=\u003e{for(var rt=0,Ot=0;Ot\u003cot.length;++Ot){var an=ot.codePointAt(Ot);an\u003e65535\u0026\u0026Ot++,rt+=4}return rt};function H0(ot,rt,Ot){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,Ot=nt(Ot);var an,Dn,Xn;rt===2?(an=Li,Dn=ys,Xn=dr):(an=cA,Dn=vA,Xn=Yl),Dt(ot,{name:Ot,fromWireType:oo=\u003e{var vo=S[oo\u003e\u003e\u003e2\u003e\u003e\u003e0],Xo=an(oo+4,vo*rt,!0);return PA(oo),Xo},toWireType:(oo,vo)=\u003e{typeof vo!=\"string\"\u0026\u0026bt(`Cannot pass non-string to C++ string type ${Ot}`);var Xo=Xn(vo),Ti=G0(4+Xo+rt);return S[Ti\u003e\u003e\u003e2\u003e\u003e\u003e0]=Xo/rt,Dn(vo,Ti+4,Xo+rt),oo!==null\u0026\u0026oo.push(PA,Ti),Ti},readValueFromPointer:Ee,destructorFunction(oo){PA(oo)}})}function ph(ot,rt,Ot,an,Dn,Xn){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Dn\u003e\u003e\u003e=0,Xn\u003e\u003e\u003e=0,Te[ot]={name:nt(rt),rawConstructor:ro(Ot,an),rawDestructor:ro(Dn,Xn),fields:[]}}function Xh(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Dn\u003e\u003e\u003e=0,Xn\u003e\u003e\u003e=0,oo\u003e\u003e\u003e=0,vo\u003e\u003e\u003e=0,Xo\u003e\u003e\u003e=0,Ti\u003e\u003e\u003e=0,Te[ot].fields.push({fieldName:nt(rt),getterReturnType:Ot,getter:ro(an,Dn),getterContext:Xn,setterArgumentType:oo,setter:ro(vo,Xo),setterContext:Ti})}var Bl=function(ot,rt){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,rt=nt(rt),Dt(ot,{isVoid:!0,name:rt,fromWireType:()=\u003e{},toWireType:(Ot,an)=\u003e{}})};function fc(ot,rt){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,ot=bi.toValue(ot),rt=bi.toValue(rt),ot.set(rt)}var Nd=[],il=ot=\u003e{var rt=Nd.length;return Nd.push(ot),rt},Ul=(ot,rt)=\u003e{for(var Ot=new Array(ot),an=0;an\u003cot;++an)Ot[an]=Rt(S[rt+an*4\u003e\u003e\u003e2\u003e\u003e\u003e0],`parameter ${an}`);return Ot},m_=(ot,rt,Ot)=\u003e{var an=[],Dn=ot(an,Ot);return an.length\u0026\u0026(S[rt\u003e\u003e\u003e2\u003e\u003e\u003e0]=bi.toHandle(an)),Dn},ag={},Rd=ot=\u003e{var rt=ag[ot];return rt===void 0?nt(ot):rt},mh=function(ot,rt,Ot){rt\u003e\u003e\u003e=0;var an=8,[Dn,...Xn]=Ul(ot,rt),oo=Dn.toWireType.bind(Dn),vo=Xn.map(ps=\u003eps.readValueFromPointer.bind(ps));ot--;var Xo={toValue:bi.toValue},Ti=vo.map((ps,Ic)=\u003e{var lc=`argFromPtr${Ic}`;return Xo[lc]=ps,`${lc}(args${Ic?\"+\"+Ic*an:\"\"})`}),ir;switch(Ot){case 0:ir=\"toValue(handle)\";break;case 2:ir=\"new (toValue(handle))\";break;case 3:ir=\"\";break;case 1:Xo.getStringOrSymbol=Rd,ir=\"toValue(handle)[getStringOrSymbol(methodName)]\";break}ir+=`(${Ti})`,Dn.isVoid||(Xo.toReturnWire=oo,Xo.emval_returnValue=m_,ir=`return emval_returnValue(toReturnWire, destructorsRef, ${ir})`),ir=`return function (handle, methodName, destructorsRef, args) {\n${ir}\n}`;var Gs=new Function(Object.keys(Xo),ir)(...Object.values(Xo)),qr=`methodCaller\u003c(${Xn.map(ps=\u003eps.name)}) =\u003e ${Dn.name}\u003e`;return il(Ze(qr,Gs))};function mm(ot,rt){return ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,ot=bi.toValue(ot),rt=bi.toValue(rt),ot==rt}function gu(ot,rt){return ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,ot=bi.toValue(ot),rt=bi.toValue(rt),bi.toHandle(ot[rt])}function Ag(ot){ot\u003e\u003e\u003e=0,ot\u003e9\u0026\u0026(ur[ot+1]+=1)}function C0(ot,rt,Ot,an,Dn){return ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,an\u003e\u003e\u003e=0,Dn\u003e\u003e\u003e=0,Nd[ot](rt,Ot,an,Dn)}function FC(ot){return ot\u003e\u003e\u003e=0,bi.toHandle(Rd(ot))}function O0(){return bi.toHandle({})}function __(ot){ot\u003e\u003e\u003e=0;var rt=bi.toValue(ot);Re(rt),zi(ot)}function Qp(ot,rt,Ot){ot\u003e\u003e\u003e=0,rt\u003e\u003e\u003e=0,Ot\u003e\u003e\u003e=0,ot=bi.toValue(ot),rt=bi.toValue(rt),Ot=bi.toValue(Ot),ot[rt]=Ot}var _1=()=\u003e4294901760,tr=(ot,rt)=\u003eMath.ceil(ot/rt)*rt,Vo=ot=\u003e{var rt=_h.buffer.byteLength,Ot=(ot-rt+65535)/65536|0;try{return _h.grow(Ot),F(),1}catch{}};function wA(ot){ot\u003e\u003e\u003e=0;var rt=y.length,Ot=_1();if(ot\u003eOt)return!1;for(var an=1;an\u003c=4;an*=2){var Dn=rt*(1+.2/an);Dn=Math.min(Dn,ot+100663296);var Xn=Math.min(Ot,tr(Math.max(ot,Dn),65536)),oo=Vo(Xn);if(oo)return!0}return!1}var Td=(ot,rt)=\u003e{if(da)for(var Ot=ot;Ot\u003cot+rt;Ot++){var an=Nn(Ot);an\u0026\u0026da.set(an,Ot)}},da,Zh=ot=\u003e(da||(da=new WeakMap,Td(0,n0.length)),da.get(ot)||0),mf=[],LC=()=\u003emf.length?mf.pop():n0.grow(1),_f=(ot,rt)=\u003en0.set(ot,rt),_m=ot=\u003e{const rt=ot.length;return[rt%128|128,rt\u003e\u003e7,...ot]},du={i:127,p:127,j:126,f:125,d:124,e:111},cg=ot=\u003e_m(Array.from(ot,rt=\u003e{var Ot=du[rt];return Ot})),Ug=(ot,rt)=\u003e{var Ot=Uint8Array.of(0,97,115,109,1,0,0,0,1,..._m([1,96,...cg(rt.slice(1)),...cg(rt[0]===\"v\"?\"\":rt[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),an=new WebAssembly.Module(Ot),Dn=new WebAssembly.Instance(an,{e:{f:ot}}),Xn=Dn.exports.f;return Xn},Vc=(ot,rt)=\u003e{var Ot=Zh(ot);if(Ot)return Ot;var an=LC();try{_f(an,ot)}catch(Xn){if(!(Xn instanceof TypeError))throw Xn;var Dn=Ug(ot,rt);_f(an,Dn)}return da.set(ot,an),an},ha=ot=\u003e{da.delete(Nn(ot)),_f(ot,null),mf.push(ot)};if(xt(),Zt(),n.noExitRuntime\u0026\u0026n.noExitRuntime,n.print\u0026\u0026n.print,n.printErr\u0026\u0026(d=n.printErr),n.wasmBinary\u0026\u0026(p=n.wasmBinary),n.arguments\u0026\u0026n.arguments,n.thisProgram\u0026\u0026n.thisProgram,n.preInit)for(typeof n.preInit==\"function\"\u0026\u0026(n.preInit=[n.preInit]);n.preInit.length\u003e0;)n.preInit.shift()();n.addFunction=Vc,n.removeFunction=ha;var BI,G0,PA,_h,n0;function HC(ot){BI=ot.K,G0=ot.M,PA=ot.N,_h=ot.I,n0=ot.L}var f1={l:Pe,C:we,q:at,z:it,G:Yt,j:On,i:mi,a:Nr,E:ws,x:Gt,d:Ht,y:Nt,c:_n,p:qn,m:Rn,h:Hn,n:Io,F:oa,w:H0,r:ph,k:Xh,H:Bl,u:fc,g:mh,b:zi,o:mm,B:gu,t:Ag,f:C0,s:FC,A:O0,e:__,v:Qp,D:wA};function fm(ot){ot=Object.assign({},ot);var rt=an=\u003eDn=\u003ean(Dn)\u003e\u003e\u003e0,Ot=an=\u003e()=\u003ean()\u003e\u003e\u003e0;return ot.K=rt(ot.K),ot.M=rt(ot.M),ot._emscripten_stack_alloc=rt(ot._emscripten_stack_alloc),ot.emscripten_stack_get_current=Ot(ot.emscripten_stack_get_current),ot}function vp(){O();function ot(){n.calledRun=!0,!m\u0026\u0026(U(),f?.(n),n.onRuntimeInitialized?.(),Y())}n.setStatus?(n.setStatus(\"Running...\"),setTimeout(()=\u003e{setTimeout(()=\u003en.setStatus(\"\"),1),ot()},1)):ot()}var ku;return ku=await ge(),vp(),R?e=n:e=new Promise((ot,rt)=\u003e{f=ot,I=rt}),e}const Tmo=\"AGFzbQEAAAABlwRFYAF/AGACf38AYAJ/fwF/YAN/f38AYAF/AX9gBH9/f38AYAN/f38Bf2AFf39/f38AYAZ/f39/f38AYAR/f39/AX9gCH9/f39/f39/AGADf398AGAAAGABfAF8YAABf2AEf39/fABgAX8BfGACf38BfGAHf39/f39/fwBgBX9/f39/AX9gBH9/f3wBf2AEf398fwBgA398fwBgCn9/f39/f39/f38AYAV/f39/fwF8YAF8AX9gA39/fAF/YAF8AGAEf398fwF/YAR/f398AXxgA3x8fwF8YAJ8fAF8YAJ8fwF/YAJ/fgBgBX9/fHx8AGAGf398f3x/AGAGf3x8fH9/AGADf3x/AX9gA39/fAF8YAR/f3x8AGAHf39/f3x8fABgBn9/f3x8fABgBn9/fH98fABgDX9/f39/f39/f39/f38AYAV/f39+fgBgAnx/AXxgBX9/f398AGAFf39/f3wBf2AFf398fH8AYAZ/f39/fH8AYAJ/fgF/YAV/f398fwF/YAF+AX9gA39/fwF8YAd/f39/fHx/AGAHf39/fHx8fwBgDH9/f39/f39/f39/fwBgCX9/f39/f39/fwBgBn9/fH98fAF/YAd/f39/fHx8AX9gA39/fgBgAn9/AX5gAn98AX9gAn98AGAGf39/fHx8AX9gBn9/fH98fwF/YAZ/fHx8f38Bf2AFf398fHwBf2AEf398fAF/As0BIgFhAWEAFwFhAWIAAAFhAWMACgFhAWQAAwFhAWUAAAFhAWYAGAFhA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wtBABCsASICQX9GDQMgASEEQYClAigCACIAQQFrIgUgAnEEQCABIAJrIAIgBWpBACAAa3FqIQQLIAQgBk0NA0HcpAIoAgAiAARAQdSkAigCACIFIARqIgcgBU0gACAHSXINBAsgBBCsASIAIAJHDQEMBQsgBCACayAHcSIEEKwBIgIgACgCACAAKAIEakYNASACIQALIABBf0YNASAGQTBqIARNBEAgACECDAQLQYSlAigCACICIAMgBGtqQQAgAmtxIgIQrAFBf0YNASACIARqIQQgACECDAMLIAJBf0cNAgtB4KQCQeCkAigCAEEEcjYCAAsgARCsASICQX9GQQAQrAEiAEF/RnIgACACTXINBSAAIAJrIgQgBkEoak0NBQtB1KQCQdSkAigCACAEaiIANgIAQdikAigCACAASQRAQdikAiAANgIACwJAQbyhAigCACIDBEBB5KQCIQADQCACIAAoAgAiASAAKAIEIgVqRg0CIAAoAggiAA0ACwwEC0G0oQIoAgAiAEEAIAAgAk0bRQRAQbShAiACNgIAC0EAIQBB6KQCIAQ2AgBB5KQCIAI2AgBBxKECQX82AgBByKECQfykAigCADYCAEHwpAJBADYCAANAIABBA3QiASABQcyhAmoiBTYC1KECIAEgBTYC2KECIABBAWoiAEEgRw0AC0GwoQIgBEEoayIAQXggAmtBB3EiAWsiBTYCAEG8oQIgASACaiIBNgIAIAEgBUEBcjYCBCAAIAJqQSg2AgRBwKECQYylAigCADYCAAwECyACIANNIAEgA0tyDQIgACgCDEEIcQ0CIAAgBCAFajYCBEG8oQIgA0F4IANrQQdxIgBqIgE2AgBBsKECQbChAigCACAEaiICIABrIgA2AgAgASAAQQFyNgIEIAIgA2pBKDYCBEHAoQJBjKUCKAIANgIADAMLQQAhAAwGC0EAIQAMBAtBtKECKAIAIAJLBEBBtKECIAI2AgALIAIgBGohBUHkpAIhAAJAA0AgBSAAKAIAIgFHBEAgACgCCCIADQEMAgsLIAAtAAxBCHFFDQMLQeSkAiEAA0ACQCAAKAIAIgEgA00EQCADIAEgACgCBGoiBUkNAQsgACgCCCEADAELC0GwoQIg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gBBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMAQsgAiAGQQNyNgIEIAIgBmoiBSADQQFyNgIEIAMgBWogAzYCACAIBEAgCEF4cUHMoQJqIQBBuKECKAIAIQECf0EBIAhBA3Z0IgcgBHFFBEBBpKECIAQgB3I2AgAgAAwBCyAAKAIICyEEIAAgATYCCCAEIAE2AgwgASAANgIMIAEgBDYCCAtBuKECIAU2AgBBrKECIAM2AgALIAJBCGohAAsgCkEQaiQAIAALFgAgAEEQahAvGiAAQQhqEC8aIAAQLwsrAQJ/IAAoAgAiASgCACICBEAgASACEHsgACgCACIAKAIAIAAoAggaECILC/w9AxJ/HXwLfiMAQbACayIMJAAgDEIANwMIIAxCgICAgICAgPg/NwMAIAxCADcDECAMQgA3AxggDEIANwMoIAxCgICAgICAgPg/NwMgIAxCADcDMCAMQgA3AzggDEIANwNIIAxCgICAgICAgPg/NwNAIAxCADcDUCAMQgA3A1ggDEGYAmogAUEYaiIFIAwQygEgDCsDmAIgDCsDoAJiBEAgASgCDCELIwBBwAZrIgMkACADQgA3A/AEIANCgICAgICAgPg/NwPoBCADQgA3A/gEIANCADcDgAUgA0IANwOQBSADQoCAgICAgID4PzcDiAUgA0IANwOYBSADQgA3A6AFIANCADcDsAUgA0KAgICAgICA+D83A6gFIANCADcDuAUgA0IANwPABSADQaADaiAFIANB6ARqEMoBAkAgAysDoAMgAysDqANhBEAgDCALEDcaDAELIAwQOyEIIAsoAkQiAgRAIAggAjYCRAwBCyAFKQMAITEgBSkDCCEyIAUpAxAhMyAFKQMYITQgBSkDICE1IAUpAyghNiAFKQMwITcgBSkDOCE4IAUpA0AhOSAFKQNIITogBSkDUCE7IAMgBSkDWEL///////////8Ag0KAgICAgICA+P8AVDoA8wQgAyA7Qv///////////wCDQoCAgICAgID4/wBUOgDyBCADIDpC////////////AINCgICAgICAgPj/AFQ6APEEIAMgOUL///////////8Ag0KAgICAgICA+P8AVDoA8AQgAyA4Qv///////////wCDQoCAgICAgID4/wBUOgDvBCADIDdC////////////AINCgICAgICAgPj/AFQ6AO4EIAMgNkL///////////8Ag0KAgICAgICA+P8AVDoA7QQgAyA1Qv///////////wCDQoCAgICAgID4/wBUOgDsBCADIDRC////////////AINCgICAgICAgPj/AFQ6AOsEIAMgM0L///////////8Ag0KAgICAgICA+P8AVDoA6gQgAyAyQv///////////wCDQoCAgICAgID4/wBUOgDpBCADIDFC////////////AINCgICAgICAgPj/AFQ6AOgEAkACQCADLQDpBCADLQDoBHFFDQAgAy0A6gRBAXFFDQAgAy0A7AQgAy0A6wRxRQ0AIAMtAO0EQQFxRQ0AIAMtAO8EIAMtAO4EcUUNACADLQDwBEEBcUUNACADLQDyBCADLQDxBHFFDQAgAy0A8wRBAXENAQsgCEEBECwMAQsgCCALKALIATYCyAEgCCALRwRAIAsoAswBIQYgC0HQAWohEiMAQRBrIg0kACAIQcwBaiIKKAIIBEAgDSAKNgIEIAooAgAhAiAKIApBBGo2AgAgCigCBEEANgIIIApCADcCBCANIAIoAgQiBCACIAQbIgI2AgwgDSACNgIIIAIEQCANIAIQsAQ2AggLAkAgDSgCDCICRSAGIBJGcg0AA0AgAiAGKAIQNgIQIAJBGGogBkEYakHqAPwKAAAgAiEJAkAgCigCBCIERQRAIApBBGoiAiEHDAELIAkoAhAhDgNAIAQiAigCECAOSgRAIAIhByACKAIAIgQNAQwCCyACKAIEIgQNAAsgAkEEaiEHCyAKIAIgByAJEIIBIA0gDSgCCCICNgIMIAIEQCANIAIQsAQ2AggLAkAgBigCBCICBEADQCACIgYoAgAiAg0ADAILAAsDQCAGIAYoAggiBigCAEcNAAsLIA0oAgwiAkUNASAGIBJHDQALCyANKAIEIA0oAgwQbyANKAIIIgIEQCACKAIIIgQEQANAIAQiAigCCCIEDQALIA0gAjYCCAsgDSgCBCACEG8LCyAGIBJHBEAgCkEEaiEQA0AjAEEQayIRJABBiAEQIyITQRBqIg8gBkEQakH4APwKAAACfwJAAkAgECIHIApBBGoiBEcEQCAPKAIAIgkgBygCEEoNA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TBByAAgDUECRhtqIQILIAkgAiAQaisDAEQAAAAAAAAAAGFqIQkgD0EEaiIPQQxHDQALIAlBAkYEQCAOQQRqIg5BDEcNAQsLIAlBAkYEQCAIQegBaiICIAtB6AFqELkEIAhB+AFqIAtB+AFqELgEIAhBiAJqIAtBiAJqELcEIAgoAuwBIQkgAyACNgLsBCADIAU2AugEQQAhBCMAQTBrIgckACAJBEAgBiECA0AgByAEQTBsIgYgAigCBCIFKAIAaiACKAIAENsEIAUoAgAgBmogB0Ew/AoAACAEQQFqIgQgCUcNAAsLIAdBMGokAAwBCyAIKAJcQQNJDQAgCEHoAWoiAiALQegBaiIEELkEIAJBEGogBEEQahC4BCACQSBqIARBIGoQtwQgA0EANgLwBCADQgA3AugEIANBADYC0AIgA0IANwLIAiAIIANB6ARqIANByAJqQQAQzwIgAyADKQLoBDcCwAIgAiADQcACahC2BCADKALIAiICBEAgAhAiCyADKALoBCICRQ0AIAIQIgsgA0HABmokAEGoAhAjIgJB2JMCNgIAIAJCADcCBCACQRBqIAwQowEhBCAMIAI2ApwCIAwgBDYCmAIgAUEMaiAMQZgCahBOAkAgDCgCnAIiAkUNACACIAIoAgQiBEEBazYCBCAEDQAgAiACKAIAKAIIEQAAIAIQJAsgDBA6GiABQgA3AyAgAUKAgICAgICA+D83AxggAUIANwMoIAFCADcDMCABQgA3A0AgAUKAgICAgICA+D83AzggAUIANwNIIAFCADcDUCABQgA3A2AgAUKAgICAgICA+D83A1ggAUIANwNoIAFCADcDcAsgACABKAIMNgIAIAAgASgCECIANgIEIAAEQCAAIAAoAgRBAWo2AgQLIAxBsAJqJAAL9QEBBH8jAEEQayIDJAAgACgCABogAQRAIAAoAggiAiACKAIAKAIMEQQAIQIgAUEANgIMIAFBADYCBCABIAIgAkEAR2siAjYCACABIAJBC2w2AggLAkAgACgCCCICIAIoAgAoAggRBABBA0YNACADQQhqIgIgAEEIaiIEKAIAIgUgASAFKAIAKAIAEQMAIAQgAhBOIAMoAgwiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgACgCCAJAIAAoAgwiAEUNACAAKAIEQX9HDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EQaiQAC7EEAQZ/IwBBIGsiAiQAIABBADYCTCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQcgAahBxIABB2ABqIgMQOCAAQegAahA4IABB+ABqEDggAxDvAiAAQQA2ApwBIABBmAFqEHEgAEEANgKsASAAQagBahBxIABBADYCvAEgAEG4AWoQkwEgAkIANwIIIAJBfzYCACACQgA3AhggAkIANwIQIAIgAkEIaiIENgIEIABBfzYCyAEgAEHMAWogACgC0AEQbyAAIAIoAgQ2AswBIAAgAigCCCIFNgLQASAAIAIoAgwiBjYC1AEgAEHQAWohAyAAQcgBaiEHAkAgBkUEQCAAIAM2AswBDAELIAUgAzYCCCACQgA3AgggAiAENgIECyACQQRqAkAgAiAHRwRAIAAoAtgBIgQEQCAEECILIAAgAigCEDYC2AEgACACKAIUNgLcASAAIAIoAhg2AuABDAELIAIoAhAiBEUNACAEECILIAJBADYCGCACQgA3AhAgAigCCBBvIAAoAugBIgMEQCADECILIABBADYC8AEgAEIANwPoASAAKAL4ASIDBEAgAxAiCyAAQQA2AoACIABCADcD+AEgACgCiAIiAwRAIAMQIgsgAEEANgKQAiAAQgA3A4gCIAAgATYCRCACQSBqJAALUgEEfyAAKAIAIQECQCAAKAIEIgNFBEAMAQsgA0ECdCIEECchAiAERQ0AIAIgASAE/AoAAAsgACABBH8gARAiIAAoAgQFIAMLNgIIIAAgAjYCAAuQAQECfyMAQRBrIgMkAEEkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcCCCAAIAI2AgQgACACQQxqNgIAIABCADcCECABKAIAGiAAQQhqIAFBCGoQXiADQQhqIAFBEGoQfyAD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AAsgAgRAIAIQIgsgACABNgIIIAAgBDYCAAsLogIBAX8gACgCiAIiAQRAIAEQIgsgAEEANgKQAiAAQgA3A4gCIAAoAvgBIgEEQCABECILIABBADYCgAIgAEIANwP4ASAAKALoASIBBEAgARAiCyAAKALYASIBBEAgARAiCyAAQQA2AuABIABCADcD2AEgAEHMAWogACgC0AEQbyAAKAK4ASIBBEAgARAiCyAAQQA2AsABIABCADcDuAEgACgCqAEiAQRAIAEQIgsgAEEANgKwASAAQgA3A6gBIAAoApgBIgEEQCABECILIABBADYCoAEgAEIANwOYASAAKAKIASIBBEAgARAiCyAAQQA2ApABIABCADcDiAEgAEH4AGoQSSAAQegAahBJIABB2ABqEEkgACgCSCIBBEAgARAiCyAAC7kCACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASAAC1UBAn8gAEEANgIIIABCADcCACABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQR1EI8DIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALoAIBBX8jAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABKAIANgIAIAJBBGohAQwBCyACIAAoAgAiBGtBAnUiBkEBaiICQYCAgIAETw0BIAVBDGpB/////wMgAyAEayIDQQF1IgQgAiACIARJGyADQfz///8HTxsgBiAAEEoiAigCCCIDIAEoAgA2AgAgAiADQQRqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFrIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACEFMLIAAgATYCBCAFQSBqJAAPCxAmAAvQAQIBfAF/IwBBEGsiAiQARAAAAAAAAPh/IQECQCAAvUL///////////8Ag0L/////////9/8AVg0ARAAAAAAAAAAAIQEgAEQAAAAAAAAAAGMEQCAAmhA+miEBDAELIACZRAAAAAAAgFZAIAJBDGoQpQNEGC1EVPshCUCiRAAAAAAAgGZAoyEAAkACQAJAAkAgAigCDEEEbw4EAAECAwQLIAAQqAEhAQwDCyAAEJcBIQEMAgsgABCoAZohAQwBCyAAEJcBmiEBCyACQRBqJAAgAQspACAAIAEoAgQgAhASIgEQGzYCBCAAQZygAjYCACABQQlPBEAgARABCwujAQEBf0EkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcDGCAAQoCAgICAgID4PzcDECAAQgA3AwggACACNgIEIAAgAkEMajYCACAAQgA3AyAgAEIANwMwIABCgICAgICAgPg/NwMoIABCADcDOCABKAIAGiAAQQhqIAFBCGoQXiAAQRBqIAFBEGpBMPwKAAAgAAsOACAAQQhqEC8aIAAQLwsCAAtyAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACAAIAEoAgA2AgggACABKAIEIgI2AgwgAgRAIAIgAigCBEEBajYCBAsgAEIANwIQIAEQLxoLVwEDfyAAKAIIIAFJBEAgAUEDdBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBA3QiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy0BAX8gACgCACIBBEAgACABNgIEIAAoAggaIAEQIiAAQQA2AgggAEIANwIACwuLAQEDfyMAQRBrIgMkAEGoAhAjIgJBoJACNgIAIAJCADcCBCACQRBqEDshBCACIAE2AlQgAyACNgIMIAMgBDYCCCACIAIoAgRBAWo2AgQgAyADKQIINwMAIAAgAxBIGiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANBEGokAAs+ACADBEAgACADEKMCIAAoAgQhAyABIAJHBEADQCADIAEQPEEMaiEDIAFBDGoiASACRw0ACwsgACADNgIECwt5AQJ/IwBBEGsiAyQAQSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACADQQRqIAEQWSAAIAMoAgQ2AgggACADKAIINgIMIABCADcCECABEC8aIANBEGokACAAC1gBAX8CQCAAKAIMIgFFDQAgASABKAIAIgFBAWs2AgAgAUEBSg0AIAAoAgwiAQRAIAEQIgsgAEEANgIMIAAoAgAiAQRAIAEQIgsgAEEANgIIIABCADcCAAsLYAAgACADNgIQQQAhAyAAQQA2AgwCQCABBEAgAUGAgICABE8NASABQQJ0ECMhAwsgACADNgIAIAAgAyACQQJ0aiICNgIIIAAgAyABQQJ0ajYCDCAAIAI2AgQgAA8LEHIAC2AAIAAgAzYCEEEAIQMgAEEANgIMAkAgAQRAIAFBgICAgAJPDQEgAUEDdBAjIQMLIAAgAzYCACAAIAMgAkEDdGoiAjYCCCAAIAMgAUEDdGo2AgwgACACNgIEIAAPCxByAAu3AgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAEpAwg3AwggAiABKQMANwMAIAJBEGohAQwBCyACIAAoAgAiBGtBBHUiBkEBaiICQYCAgIABTw0BIAVBDGpB/////wAgAyAEayIDQQN1IgQgAiACIARJGyADQfD///8HTxsgBiAAEDIiAigCCCIDIAEpAwg3AwggAyABKQMANwMAIAIgAigCCEEQajYCCCACKAIEIAAoAgQgACgCACIDayIBayEEIAEEQCAEIAMgAfwKAAALIAAoAgAhAyAAIAQ2AgAgAiADNgIEIAAgAigCCCIBNgIEIA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AhAgAA8LIAEgAkYEQCAAIAA2AhAgASgCECIBIAAgASgCACgCDBEBACAADwsgACACIAIoAgAoAggRBAA2AhAgAAuABQIGfAN/AkAgACgCTCIIBEAgACgCSCIHIAhBGGxqIQlEAAAAAAAA8H8hAkQAAAAAAADwfyEDIAchCEQAAAAAAADwfyEBA0AgCCsDECEFIAgrAwghBiAIKwMAIQQCQCABIAFiBEAgBSECIAYhAyAEIQEMAQsgBCAEYg0AIAIgBSACIAVjGyECIAMgBiADIAZjGyEDIAEgBCABIARjGyEBCyAIQRhqIgggCUcNAAsgACACOQMQIAAgAzkDCCAAIAE5AwBEAAAAAAAA8P8hAkQAAAAAAADw/yEDRAAAAAAAAPD/IQEDQCAHKwMQIQUgBysDCCEGIAcrAwAhBAJAIAEgAWIEQCAFIQIgBiEDIAQhAQwBCyAEIARiDQAgBSACIAIgBWMbIQIgBiADIAMgBmMbIQMgBCABIAEgBGMbIQELIAdBGGoiByAJRw0ACwwBCyAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDAEQAAAAAAADw/yECRAAAAAAAAPD/IQNEAAAAAAAA8P8hAQsgACACOQMoIAAgAzkDICAAIAE5AxhBACEHAkAgACkDAEL///////////8Ag0L/////////9/8AVg0AIAApAwhC////////////AINCgICAgICAgPj/AFoNACAAKQMQQv///////////wCDQoCAgICAgID4/wBaDQAgACkDGEL///////////8Ag0KAgICAgICA+P8AVCAAKQMgQv///////////wCDQoCAgICAgID4/wBUcSAAKQMoQv///////////wCDQoCAgICAgID4/wBUcSEHCyAHRQRAIABBABAsCwuDAQECf0GgARAjIQMjAEEQayICJAAgA0IANwIEIANBgJQCNgIAIAIgASgCADYCCCACIAEoAgQiATYCDCABBEAgASABKAIEQQFqNgIECyACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgAkEQaiQAIAAgAzYCBCAAIAE2AgAgACADQRRqIAEQjwELwAoCC38GfCMAQUBqIgMkACAAKAJcIQQgA0IANwM4IAN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CAHIAIpAwBSDQEgBiACKQMIUg0BIAIPCyAHIAMpAwBSDQAgBiADKQMIUg0AIAMPC0EgECMiACABKQMINwMIIAAgASkDADcDACAAQQA2AhwgACAENgIYIAMgADYCFCAAIAM2AhAgACACNgIUIAIgADYCECAFRQRAIAQgADYCEAsgAAtgACAAIAM2AhBBACEDIABBADYCDAJAIAEEQCABQavVqtUATw0BIAFBGGwQIyEDCyAAIAM2AgAgACADIAJBGGxqIgI2AgggACADIAFBGGxqNgIMIAAgAjYCBCAADwsQcgALVgEFfyAAKAIAIgIoAgAiAQRAIAEhAyACIQQgAigCBCIFIAFHBEADQCABIAVBCGsQLyIFRw0ACyAAKAIAIgQoAgAhAwsgAiABNgIEIAQoAggaIAMQIgsLHQEBf0EEEHQiAEGQ4gE2AgAgAEGc4gFBqwMQCwALkwEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARAzIAEgACgCBCIDa0EYbCIEQQBMDQAgBEEYbiEEIAAoAgAgA0EYbGohAwNAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyAEQQFLIARBAWshBA0ACwsgACABNgIEBEAgABBxCwuKAwEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACQQA2AgggAkIANwIAIAIgASgCADYCACACIAEoAgQ2AgQgAiABKAIINgIIIAFBADYCCCABQgA3AgAgAkEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIgNBADYCCCADQgA3AgAgAyABKAIANgIAIAMgASgCBDYCBCADIAEoAgg2AgggAUEANgIIIAFCADcCACACIANBDGo2AgggAigCBCAAKAIEIAAoAgAiA2siAUF0bUEMbGohBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQ1QELIAAgATYCBCAFQSBqJAAPCxAmAAvcAgEEfyMAQRBrIgMkACAAQZCcAjYCACAAEN4BIABBJGogACgCJBC9AyAAIAAoAjQiASAAKAI4IgJHBH8DQCABKAIAIgQEQCAEECILIAFBBGoiASACRw0ACyAAKAI0BSABCzYCOCAAQQA6AHwgAEEAOgAYIAAgACgCJDYCMCAAKAKAASIBBEAgACABNgKEASAAKAKIARogARAiCyAAKAJoIgEEQCAAIAE2AmwgACgCcBogARAiCyAAKAJcIgEEQCAAIAE2AmAgACgCZBogARAiCyAAKAJQIgEEQCAAIAE2AlQgACgCWBogARAiCyAAKAJAIgEEQCAAIAE2AkQgACgCSBogARAiCyAAKAI0IgEEQCAAIAE2AjggACgCPBogARAiCyADIABBJGo2AgwgAygCDCIBKAIAIgIEQCABIAIQvQMgAygCDCIBKAIAIAEoAggaECILIANBEGokACAAC40BAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgAEIANwMYIABCgICAgICAgPg/NwMQIABCADcDCCAAIAI2AgQgACACQQxqNgIAIABCADcDICAAQgA3AzAgAEKAgICAgICA+D83AyggAEIANwM4IABBCGogARBeIAEQLxoLBwAgABEOAAsYAQF/QQwQIyIAQQA2AgggAEIANwIAIAALIAAgACgCBCABEBIiACACKAIEEBUgAEEJTwRAIAAQAQsLSgECfyAAKAIEIgIgACgCCCIBRwRAA0AgACABQQhrIgE2AgggARAvGiACIAAoAggiAUcNAAsLIAAoAgAiAQRAIAAoAgwaIAEQIgsLHQAgAQRAIAAgASgCABBvIAAgASgCBBBvIAEQIgsL+wMBB38CQAJ/QQIgAUEBRg0AGiABIAEgAUEBa3FFDQAaIAEQ9gELIgMgACgCBCIBTQRAIAEgA00NASAAKAIMsyAAKgIQlY38ASECIAEgAyABQQNJIAFpQQFLcgR/IAIQ9gEFIAJBAUEgIAJBAWtna3QgAkECSRsLIgIgAiADSRsiA00NAQsgACEBAkACQ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CACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACENUBCyAAIAE2AgQgBUEgaiQADwsQJgALgQECAn8BfCMAQRBrIgMkAEHwngItAABBAXFFBEBBAUHYiwJBARAGIQRB8J4CQQE6AABB7J4CIAQ2AgALIANBADYCDEHsngIoAgAgASACIANBDGpBABAFIQUgAygCDCEBIAAgBfwDNgIEIABBnKACNgIAIAEEQCABEAQLIANBEGokAAuoAQEDfyMAQaACayIDJAACQAJAIAEoAgAiBCgCkAEiAkUEQCABKAIEIgEgASgCBEEBajYCBAwBCyACIAIoAgxBAWo2AgwgBCgCkAEhAiABKAIEIgEgASgCBEEBajYCBCACRQ0AIAItABBBAUcNACADQQhqEDsiAUEONgJEIAAgARCjAUEBOgCYAiABEDoaDAELIABBADoAmAIgAEEAOgAACyADQaACaiQAC5UCAQN/IAACfwJAIAEoAgQiBEUEQCABQQRqIgUhAgwBCyACKAIAIQYDQCAEIgIoAhAiBSAGSgRAIAQhBSAEKAIAIgQNAQwCC0EAIAUgBk4NAhogAigCBCIEDQALIAJBBGohBQtBiAEQIyIEIAMoAgAoAgA2AhAgBEEYakEAQfAA/AsAIARCADcDKCAEQoCAgICAgID4PzcDICAEQX82AhggBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQQA7AYABIAEgAiAFIAQQggFBAQs6AAQgACAENgIAC1YBBX8gACgCACICKAIAIgEEQCABIQMgAiEEIAIoAgQiBSABRwRAA0AgASAFQRhrECgiBUcNAAsgACgCACIEKAIAIQMLIAIgATYCBCAEKAIIGiADECILC0oBA38gACgCBCICIAFHBEADQCACQQxrIgQoAgAiAwRAIAJBCGsgAzYCACACQQRrKAIAGiADECILIAQiAiABRw0ACwsgACABNgIECwwAIAEgACgCABEEAAvzAgEFfyAAKAIEIAAoAgAi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iADQRxqIANBK2oQgAMgAyADKQIsIgk3AgwgA0IANwIsIAMgCTcDACAAIAMQQwJAIAMoAjAiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAyADQRxqNgIsIANBLGoQZQsgA0FAayQACwsAIAAEQCAAECILCzAAIAEoAgAaIAAgASgCCDYCACAAIAEoAgwiADYCBCAABEAgACAAKAIEQQFqNgIECwtVACAAIAEoAgA2AgAgACABKAIENgIEIAFCADcCACAAIAEoAgg2AgggACABKAIMNgIMIAFCADcCCCAAIAEoAhA2AhAgACABKAIUNgIUIAFCADcCECAAC0UBAn8gACgCBCICIAAoAggiAUcEQCAAIAEgASACa0EYayICQRhwIAJrakEYazYCCAsgACgCACIBBEAgACgCDBogARAiCwuNAQECfCAAIAAQogFEEeotgZmXcT2iIgJEAAAAAAAA8L8gAkQAAAAAAADwv2QbIgJEAAAAAAAA8L8gAr1C////////////AINCgICAgICAgPj/AFQbIgI5AzAgAQRAIAAQogFEAAAAAAAAgD6iIgMgAiACIANjGyECCyAAIAIgACsDOCIDIAIgA2QbOQM4C4sDAQZ/IwBBIGsiAiQAQZiVAiIDIAMoAgAiA0EBajYCACACIAM2AgwgACADNgLIASAAKALcASEBIABB2AFqIgQgACgCXEEDbiIFEDkgACAFNgLcASABQRFJIAEgBUEBdE1yRQRAIAQQgwELIAAoAlwiAUEDbiEFIAFBA08EQCAEKAIAIQZBACEBA0AgBiABQQR0aiIEQX82AgggBCADNgIEIAQgAzYCACABQQFqIgEgBUcNAAsLIAAQ7gIhASAAQcwBaiIEIAAoAtABEG8gACAAQdABajYCzAEgAEIANwPQASACIAJBDGoiADYCFCACQRhqIAQgACACQRRqEHkgAigCGCIAQgA3AyggAEKAgICAgICA+D83AyAgACADNgIYIABCADcDMCAAQgA3AzggAEIANwNIIABCgICAgICAgPg/NwNAIABCADcDUCAAQgA3A1ggAEIANwNoIABCgICAgICAgPg/NwNgIABCADcDcCAAQgA3A3ggAEEAOgCAAS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gABBkIgIoAgggARCLARogAiACKAIIQRhqNgIIIAAoAgAiASAAKAIEIgMgAigCBCADIAFrQWhtQRhsaiIDEKUCIAAoAgAhASAAIAM2AgAgAiABNgIEIAAgAigCCCIDNgIEIAIgATYCCCAAKAIIIQQgACACKAIMNgIIIAIgATYCACACIAQ2AgwgAhCkAiAFQSBqJAAgAws2AgQLPQECfyAAKAIEIgIgACgCCCIBRwRAIAAgASACIAFrQQdqQXhxajYCCAsgACgCACIBBEAgACgCDBogARAiCwvoAgEGfyABKAI8IgcoAhAiAigCECEFIAAoAjwiAygCECIEKAIQIQYCQAJAIAMoAgggAEYEQCAFIAQ2AhQgBCAFNgIQIAIgBjYCECAGIAI2AhQgAyACNgIQIAMgBygCCCICNgIIIAINAQwCCyAGIAI2AhQgAiAGNgIQIAQgBTYCECAFIAQ2AhQgAyAHKAIMIgI2AgwgAkUNAQsgAiADNgI8C0EAIQUgASgCPCIEQQA2AhAgBEIANwMIIAAoAjwhAwJAIAAoAlQtABhBA3EEQCAEIAMoAhA2AhAgA0EANgIQDAELAkAgAygCBCICRQ0AA0AgAigCEARAIAIhBQwCCyACKAIEIgINAAsLIAMgBTYCBCADQQBHIQUCQCADRSADIARGcg0AIAMhAgNAIAIoAgQiAkEARyEFIAJFDQEgAiAERw0ACwsgBQRAIAMgBCgCBDYCBAsgBCADNgIECyAAQQA2AjwgAUEANgI8C0QCAX8BfCMAQRBrIgIkACACIAEgACsDkAEiAyADIABB+ABqEMICIAAgAkEAEMACIAIgAjYCDCACQQxqECkgAkEQaiQAC68DAQd8IAAgASsDECIEIAErAwAiAyADoiABKwMIIgUgBaKgIAQgBKKgnyIGo0QAAAAAAAAAACADIAajIgi9Qv///////////wCDQoCAgICAgID4/wBUIgEbIgkgAisDECIEIAIrAwAiAyADoiACKwMIIgcgB6KgIAQgBKKgnyIEo0QAAAAAAAAAACADIASjIgO9Qv///////////wCDQoCAgICAgID4/wBUIgIboiAFIAajRAAAAAAAAAAAIAEbIgUgByAEo0Q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gAUEANgJQIAFCADcDSCAAQQA2AmAgAEIANwNYIAAgASgCZDYCZCABQQA2AmQgACABKAJYNgJYIAAgASgCXDYCXCAAIAEoAmA2AmAgAUEANgJgIAFCADcDWCAAQQA2AnAgAEIANwNoIAAgASgCdDYCdCABQQA2AnQgACABKAJoNgJoIAAgASgCbDYCbCAAIAEoAnA2AnAgAUEANgJwIAFCADcDaCAAQQA2AoABIABCADcDeCAAIAEoAoQBNgKEASABQQA2AoQBIAAgASgCeDYCeCAAIAEoAnw2AnwgACABKAKAATYCgAEgAUEANgKAASABQgA3A3ggAEEANgKQASAAQgA3A4gBIAAgASgCiAE2AogBIAAgASgCjAE2AowBIAAgASgCkAE2ApABIAFBADYCkAEgAUIANwOIASAAQQA2AqABIABCADcDmAEgACABKAKYATYCmAEgACABKAKcATYCnAEgACABKAKgATYCoAEgAUEANgKgASABQgA3A5gBIABBADYCsAEgAEIANwOoASAAIAEoAqgBNgKoASAAIAEoAqwBNgKsASAAIAEoArABNgKwASABQQA2ArABIAFCADcDqAEgAEEANgLAASAAQgA3A7gBIAAgASgCuAE2ArgBIAAgASgCvAE2ArwBIAAgASgCwAE2AsABIAFBADYCwAEgAUIANwO4ASAAIAEoAsgBNgLIASAAIAEoAswBNgLMASAAIAEoAtABIgM2AtABIAAgASgC1AEiBDYC1AEgAEHQAWohAgJAIARFBEAgACACNgLMAQwBCyADIAI2AgggAUIANwPQASABIAFB0AFqNgLMAQsgAEEANgLgASAAQgA3A9gBIAAgASgC2AE2AtgBIAAgASgC3AE2AtwBIAAgASgC4AE2AuABIAFBADYC4AEgAUIANwPYASAAQQA2AvABIABCADcD6AEgACABKALoATYC6AEgACABKALsATYC7AEgACABKALwATYC8AEgAUEANgLwASABQgA3A+gBIABBADYCgAIgAEIANwP4ASAAIAEoAvgBNgL4ASAAIAEoAvwBNgL8ASAAIAEoAoACNgKAAiABQQA2AoACIAFCADcD+AEgAEEANgKQAiAAQgA3A4gCIAAgASgCiAI2AogCIAAgASgCjAI2AowCIAAgASgCkAI2ApACIAFBADYCkAIgAUIANwOIAiAAC44BAgJ/AXwjAEEQayICJABB6J4CLQAAQQFxRQRAQQJByIsCQQMQBiEDQeieAkEBOgAAQeSeAiADNgIACyACIAEpAgA3AwggAkEANgIEQeSeAigCAEEAQQAgAkEEaiACQQhqEAUhBCACKAIEIQEgACAE/AM2AgQgAEGcoAI2AgAgAQRAIAEQBAsgAkEQaiQAC5oBAQV/IABCADcCBCAAKAIAIQMgAEEANgIAIAAgASgCBCIEEDMgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQUgASgCACEGA0AgBSACQRhsaiIAIAMgBiACQQJ0aigCAEEYbGoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAJBAWoiAiAERw0ACwwBCyADRQ0BCyADECILC4EBAQR/IABCADcCBCAAKAIAIQIgAEEANgIAIAAgASgCBCIEECUgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQAgASgCACEBA0AgACADQQJ0IgVqIAIgASAFaigCAEECdGooAgA2AgAgA0EBaiIDIARHDQALDAELIAJFDQELIAIQIgsL0gQBBH8gASAAIAFGIgM6AAwCQCADDQADQCABKAIIIgMtAAwNAQJAAkAgAygCCCICKAIAIgQgA0YEQAJAIAIoAgQiBUUNACAFLQAMDQAgA0EBOgAMIAIgACACRjoADCAFQQE6AAwMAgsCQCADKAIAIAFGBEAgAyEBDAELIAMgAygCBCIBKAIAIgA2AgQCQAJAAkAgAEUEQCABIAI2AggMAQsgACADNgIIIAMoAggiAigCACABIAI2AgggA0cNAQsgAiABNgIADAELIAIgATYCBAsgASADNgIAIAMgATYCCCABKAIIIgIoAgAhBAsgAUEBOgAMIAJBADoADCACIAQoAgQiADYCACAABEAgACACNgIICyAEIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAQ2AgAMAQsgACAENgIECyAEIAI2AgQgAiAENgIIDwsgBEUNASAELQAMDQEgA0EBOgAMIAIgACACRjoADCAEQQE6AAwLIAIhASAAIAJHDQEMAgsLAkAgAygCACIEIAFHBEAgAyEEDAELIAMgBCgCBCIANgIAIAAEQCAAIAM2AgggAygCCCECCyAEIAI2AggCQCACKAIAIANGBEAgAiAENgIADAELIAIgBDYCBAsgBCADNgIEIAMgBDYCCCAEKAIIIQILIARBAToADCACQQA6AAwgAiACKAIEIgEoAgAiADYCBCAABEAgACACNgIICyABIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAE2AgAMAQsgACABNgIECyABIAI2AgAgAiABNgIICwvgBQIFfAJ/IwBBEGsiBiQAAkAgAL1CIIinQf////8HcSIHQfvDpP8DTQRAIAdBgIDA8gNJDQEgACAAIAAgAKIiAKIgACAAIAAgAKKiIABEfNXPWjrZ5T2iROucK4rm5Vq+oKIgACAARH3+sVfjHcc+okTVYcEZoAEqv6CiRKb4EBEREYE/oKCiRElVVVVVVcW/oKKgIQAMAQsgB0GAgMD/B08EQCAAIAChIQAMAQsgACAGEIoFIQcgBisDACIBIAGiIgAgAKIhAiAGKwMIIQMCQAJAAkACQCAHQQNxQQFrDgMBAgMACyABIAEgAKIiAURJVVVVVVXFP6IgACADRAAAAAAAAOA/oiABIAAgAqIgAER81c9aOtnlPaJE65wriublWr6goiAAIABEff6xV+Mdxz6iRNVhwRmgASq/oKJEpvgQERERgT+goKKhoiADoaChIQAMAwtEAAAAAAAA8D8gAEQAAAAAAADgP6IiBKEiBUQAAAAAAADwPyAFoSAEoSAAIAAgACAARJAVyxmgAfo+okR3UcEWbMFWv6CiRExVVVVVVaU/oKIgAiACoiAAIABE1DiIvun6qL2iRMSxtL2e7iE+oKJErVKcgE9+kr6goqCiIAEgA6KhoKAhAAwCCyABIAEgAKIiAURJVVVVVVXFP6IgACADRAAAAAAAAOA/oiABIAAgAqIgAER81c9aOtnlPaJE65wriublWr6goiAAIABEff6xV+Mdxz6iRNVhwRmgASq/oKJEpvgQERERgT+goKKhoiADoaChmiEADAELRAAAAAAAAPA/IABEAAAAAAAA4D+iIgShIgVEAAAAAAAA8D8gBaEgBKEgACAAI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C2MEQCADKAIkIQUMAQsgCiALYg0BIAMoAiQiBSADKAIMTg0BCyADKQMoIQwgAygCICEHIAQgAykDEDcDECAEIAMpAwg3AwggBCADKQMANwMAAn8gACAAIANGDQAaAkADQCAKIANBGGsiAisDACILY0UEQCAKIAtiDQIgBSADQQxrKAIATg0CCyADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACIgMgAEcNAAsgAAwBCyADCyICIAw3AxAgAiAFNgIMIAIgBzYCCCACIAo5AwALIAEgBEEYaiICRw0ACwwBCyACIAJBAXYiB2shCCAAIAdBGGwiCWohBQJAIAIgBEwEQCAAIAUgByADEOAEIAUgASAIIAMgCWoiARDgBCADIAJBGGxqIQQgASECA0AgAiAERgRAIAEgA0YNBANAIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIABBGGohACADQRhqIgMgAUcNAAsMBAsCQAJAIAIrAwAiCiADKwMAIgtjRQRAIAogC2INASACKAIMIAMoAgxODQELIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBSAHIAMgBBDLASAFIAEgCCADIAQQywEgACAFIAEgByAIIAMgBBCCAwwBCyACIARGDQADQCAAIAIpAxA3AxAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAGQSBqJAALVgEDfyABIABrIgJBGG0hAwJAIAJBgRhOBEAgAyECA0AgAkEYbBBQIgQNAiACQQF2IgINAAsLIAAgASADQQBBABDLAQ8LIAAgASADIAQgAhDLASAEECILOAEBfyAABEAgACgCABDNASAAKAIEEM0BIAAoAhQiAQRAIAAgATYCGCAAKAIcGiABECILIAAQIgsL8gECCHwCfyABKwMAIQYgAisDACEHIAAgASsDCCIFIAMrAwgiCCACKwMIIgkgBaEiC5kgBCsDCCIKIAihIgyZYyIOGyAJIAogDhsgCCAFoSIFmSAKIAmhIgiZYyING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IAwQyAEgCyANIAMoAnggBWooAgAQyAEgAygCaCIJIAFBBWoiDEECdGogBSAJaiIFKAIAIg02AgAgCSANQQJ0aiAMNgIAIAkgAUEEaiIMQQJ0aiAONgIAIAUgDDYCACAJIAFBA2oiBUECdGogATYCACAJIAFBAnRqIAU2AgAgDkEDbSEFAkAgAygC3AEiCUUNACADKALYASIOIAVBBHRqIQEgAygC4AEiDCAJTQRAIAQgASkCCDcDECAEIAEpAgA3AwggDyAMQQF0QYABIAwbEDkgAyADKALcASIBQQFqNgLcASADKALYASABQQR0aiIBIAQpAxA3AgggASAEKQMINwIADAELIAMgCUEBajYC3AEgDiAJQQR0aiIJIAEpAgg3AgggCSABKQIANwIACwJAIAMoAqwBIglFDQAgAygCqAEiDCAFQRhsaiEBIAMoArABIgUgCU0EQCAEIAEpAxA3AxggBCABKQMINwMQIAQgASkDADcDCCARIAVBAXRBgAEgBRsQMyADIAMoAqwBIgFBAWo2AqwBIAMoAqgBIAFBGGxqIgEgBCkDGDcDECABIAQpAxA3AwggASAEKQMINwMADAELIAMgCUEBajYCrAEgDCAJQRhsaiIJIAEpAxA3AxAgCSABKQMINwMIIAkgASkDADcDAAsgAiAHRg0CIAMoAmghAgwDCyAFQXhBBCABQQNvQQJGG2ogCWooAgAiASAHRw0ACwsgAygCSCIFIApBGGxqIQECQCADKAJMIgkgAygCUCICTwRAIAQgASkDEDcDGCAEIAEpAwg3AxAgBCABKQMANwMIIANByABqIAJBAXRBgAEgAhsQMyADIAMoAkwiAUEBajYCTCADKAJIIAFBGGxqIgEgBCkDGDcDECABIAQpAxA3AwggASAEKQMINwMADAELIAMgCUEBajYCTCAFIAlBGGxqIgIgASkDEDcDECACIAEpAwg3AwggAiABKQMANwMACwJAIAMoApwBIgJFDQAgAygCmAEiDCAKQRhsaiEBIAMoAqABIgUgAk0EQCAEIAEpAxA3AxggBCABKQMINwMQIAQgASkDADcDCCADQZgBaiAFQQF0QYABIAUbEDMgAyADKAKcASIBQQFqNgKcASADKAK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AEEwRiIAGyIGQQJ0KAKQ5AEgACAFaiIFQdIBbGohAAwACwALIARBEGokACAAC7MBAQN/IwBBEGsiAyQAIAEhAgNAIAJBBE8EQCAAKAAAQZXTx94FbCIEQRh2IARzQZXTx94FbCABQZXTx94FbHMhASACQQRrIQIgAEEEaiEADAELCwJAAkACQAJAIAJBAWsOAwIBAAMLIAAtAAJBEHQgAXMhAQsgAC0AAUEIdCABcyEBCyABIAAtAABzQZXTx94FbCEBCyABQQ12IAFzQZXTx94FbCIAQQ92IABzIANBEGokAAuoAQACQCABQYAITgRAIABEAAAAAAAA4H+iIQAgAUH/D0kEQCABQf8HayEBDAILIABEAAAAAAAA4H+iIQBB/RcgASABQf0XTxtB/g9rIQEMAQsgAUGBeEoNACAARAAAAAAAAGADoiEAIAFBuHBLBEAgAUHJB2ohAQwBCyAARAAAAAAAAGADoiEAQfBoIAEgAUHwaE0bQZIPaiEBCyAAIAFB/wdqrUI0hr+iCwoAIAAgABCnA6ILQwAgACAAIAGlIAG9Qv///////////wCDQoCAgICAgID4/wBWGyABIAC9Qv///////////wCDQoCAgICAgID4/wBYGwtNAgF/AXwjAEEQayIFJAAgBSAENgIIIAUgAzYCDCAAKAIQIgBFBEAQZgALIAAgASACIAVBDGogBUEIaiAAKAIAKAIYERgAIAVBEGokAAukAgICfwV+AkAgASgCEEUNAAJAIAEpAzggASkDKFUEQCABKQMwIAEpAyBVDQELIAAgARC9AiABKAIQIgNFDQEgAyAALQB1QQAgAUFAaxD9AUUNAUL///////////8AIQdCgICAgICAgICAfyEIAkAgASgCQCICIAEoAkQiAEYEQEKAgICAgICAgIB/IQVC////////////ACEGDAELQv///////////wAhBkKAgICAgICAgIB/IQUDQCACKQMIIgQgCCAEIAhVGyEIIAQgBiAEIAZTGyEGIAIpAwAiBCAFIAQgBVUbIQUgBCAHIAQgB1MbIQcgAkEQaiICIABHDQALCyABIAg3AzggASAFNwMwIAEgBjcDKCABIAc3AyALQQEhAgsgAgvtBgIGfwR+IwBBIG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wh9QgF8QgNUDQILQQEhBgwCCxAmAAtBACEGCyAIQSBqJAAgBgvDBAIEfgZ/IwBBEGsiCSQAIAEgASkDGCIDNwMIIAEgASkDECIFNwMAIAEgASgCVEEQQRQgASgCMEEAShtqKAIAIgY2AlQgBikDACEEIAYpAwghAiABIAU3AyAgASACNwMYIAEgBDcDECABAnwgAiADUgRAIAEpAxAgBX25IAIgA325owwBC0T////////v/0T////////vfyABKQMQIAVVGws5AyggASgCYARAIAAgASABEH4gASkDCCEDIAEpAxghAgsCQCACIANRBEAgASgCWC0ACA0BQQAhBkEQQRQgASgCMEEAShsiCCABKAJUaigCACIHKQMIIANSDQEgASkDACEFIAEpABAhBCAALQB0QQFxIQACQANAIABBACAHKQMAIgIgBFMgBCAFV0YbRQRAIAEgAjcDECABIAc2AlQgBy0AGEEEcQ0CQQEhBiACIQQgAyAHIAhqKAIAIgcpAwhRDQEMAgsLIAQhAiAGQQFxRQ0CCyABRP///////+//RP///////+9/IAIgBVUbOQMoDAELIAkgAjcDCCAAQUBrIAlBCGoQkgECQCAAKAJEIgggACgCQCIKa0EDdSIGQQJIDQAgCiAGQQJrQQF2IgdBA3RqIgYpAwAiAyAIQQhrIgspAwAiBFkNAANAAkAgBiEIIAsgAzcDACAHRQ0AIAYhCyAKIAdBAWtBAXYiB0EDdGoiBikDACIDIARTDQELCyAIIAQ3AwALIAAgASABQQAQgQIgACABIAFBARCAAgsgCUEQaiQAC+tJAwx/DH4IfCMAQRBrIg8kACAAIAM6ABkgACACNgIIIAAgATYCBCMAQRBrIg0kACAALQAYRQRAIA1BB2ohBwJAAkAgACgCKCIFIAAoAiQiBGtBAnUiAkEASgRAIAIhAwNAIANBAnQQUCIGDQIgA0EBdiIDDQALCyAEIAUgByACQQBBABCwAQwBCyAEIAUgByACIAYgAxCwASAGECILIABBAToAGAsgACgCKCIHIAAoAiQiCEcEQCAAQUBrIQQDQCANIAdBBGsiBygCACgCACkDCDcDCCAEIA1BCGoQkgECQCAAKAJEIgMgACgCQCIFa0EDdSICQQJIDQAgBSACQQJrQQF2IghBA3RqIgYpAwAiESADQQhrIgMpAwAiEFkNAANAAkAgBiECIAMgETcDACAIRQ0AIAIhAyAFIAhBAWtBAXYiCEEDdGoiBikDACIRIBBTDQELCyACIBA3AwALIAcgACgCJCIIRw0ACwsgAEEBOgB9IABCADcCHCAAIAg2AjAgDUEQaiQAQQEhAwJAIAFFDQAgACAPQQhqELkDRQ0AQQAhAyAALQB9QQFHDQADQCAPKQMIIRMjAEEQayIKJAACQCAAKAIwIgYgACgCKEYNACAAQUBrIQ0DQCAGKAIAIgQoAgAiASkDCCATUg0BIAAgBkEEajYCMAJAAkAgASgCGCIBQQFxRQRAQegAECMiAkEAQegA/AsAIAJBATYCMCACQTRqQQBBKfwLACACIAQoAgAiASkDADcDACABKQMIIRAgAkF/NgIwIAIgEDcDCCACIAIpAwAiEjcDICACIAQoAgAoAhQiATYCVCACIAEpAwg3AxggASkDACEQIAIgBDYCWCACIBA3AxAgAgJ8IAIpAxgiESACKQMIIhBSBEAgAikDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAIpAxAgElUbCzkDKCAEKAIALQAYQQJxRQRAIAIhBgwCC0EAIQYMAgtBACEGQQAhAiABQQJxDQELQegAECMiAUEAQegA/AsAIAFBATYCMCABQTRqQQBBKfwLACABIAQoAgAiAikDADcDACACKQMIIRAgAUEBNgIwIAEgEDcDCCABIAEpAwAiEjcDICABIAQoAgAoAhAiAjYCVCABIAIpAwg3AxggAikDACEQIAEgBDYCWCABIBA3AxAgAQJ8IAEpAxgiESABKQMIIhBSBEAgASkDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAEpAxAgElUbCyIcOQMoAkAgBkUEQEEAIQYMAQsCQCAGKQMYIAYpAwhRBEAgBisDKET////////v/2ENAgwBCyAQIBFRBEAgHET////////vf2ENAgwBCyAGKwMoIBxjDQELIAYhAiABIQYMAQsgASECCyACQQE6AFwgAEEcaiEEAkAgACgCHCIBRQRAIAJCADcDQ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BysDCCAIKwMIIhOhIg8gD6KgIAcrAxAgCCsDECIUoSIVIBWioJ8iFqMiF71C////////////AINC//////////f/AFYNACARIAMgDUF4QQQgDEECRhtqIAtBAnRqKAIAQRhsaiIDKwMAoSIRIBEgEaIgEyADKwMIoSIRIBGioCAUIAMrAxChIhMgE6KgnyIUoyIYvUL///////////8Ag0KAgICAgICA+P8AWg0AIA4CfEQAAAAAAAAAACAVIBajIBMgFKOiIA8gFqMgESAUo6IgFyAYokQAAAAAAAAAAKCgoCIORAAAAAAAAPC/ZQ0AGkQYLURU+yEJQCAORAAAAAAAAPA/Zg0AGiAOmhBdCyIPIAAoAqgBIApBGGxqIgMrAxCioCEOIBIgDyADKwMIoqAhEiAQIA8gAysDAKKgIRALIAEgBEcNAAsgACgCmAEgAkEYbGoiASAOIA4gDqIgEiASoiAQIBCioKCfIg6jRAAAAAAAAAAAIBAgDqMiEL1C////////////AINCgICAgICAgPj/AFQiBBs5AxAgASASIA6jRAAAAAAAAAAAIAQbOQMIIAEgEEQAAAAAAAAAACAEGzkDAAsgAkEBaiICIAlHDQALCyAGKAIAIgAEQCAGIAA2AgQgBigCCBogABAiCyAFQUBrJAALgAEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARA5IAEgACgCBCIDayIEQQBMDQAgACgCACADQQR0aiEDA0AgAyACKQIINwIIIAMgAikCADcCACADQRBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQgwELCz4AIAMEQCAAIAMQ8gEgACgCBCEDIAEgAkcEQANAIAMgARAuQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQLC4gBAQl8IAErAzAhBiABKwMAIQcgASsDGCEIIAErAzghCSABKwMIIQogASsDICELIAAgAisDACIDIAErAxCiIAIrAwgiBCABKwMooqAgAisDECIFIAErA0CioDkDECAAIAMgCqIgBCALoqAgBSAJoqA5AwggACADIAeiIAQgCKKgIAUgBqKgOQMAC0oBAn8gACgCBCICIAAoAggiAUcEQ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bASIDIAUoAgQ2AgQgAiADNgIYIAIoAhAiBCADNgIYQSAQIyIBQQA2AhwgASADNgIYIAEgCzcDCCABIAo3AwAgASAENgIUIAEgAjYCECADIAE2AhAgAiABNgIUIAQgATYCECAILQAZQQFHDQMgACABENoBBEBBDBAjIgBBADYCCCAAQgA3AgAgAyAANgIYIAZBDGpBAUEAIAAQSiIBKAIIIgIgBTYCACABIAJBBGo2AgggASgCBCAAKAIEIAAoAgAiBGsiAmshAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAggiAzYCBCABIAI2AgggACgCCCEEIAAgASgCDDYCCCABIAI2AgAgASAENgIMIAEQUyAAIAM2AgQMBAsgBSgCGCIBRQRAQQAhAEEMECMiAUEANgIIIAFCADcCACAFIAE2AhggAUEEaiEEQQAhAgwCCyABQQRqIQQgASgCBCIAIAEoAggiAk8NASAAIAM2AgAgAEEEaiECDAILIAIoAhAiAARAIAAQIgsgAhAiDAILIAAgASgCACIHa0ECdSIJQQFqIgBBgICAgARPDQIgBkEMakH/////AyACIAdrIgJBAXUiByAAIAAgB0kbIAJB/P///wdPGyAJIAEQSiIAKAIIIgIgAzYCACAAIAJBBGo2AgggACgCBCAEKAIAIAEoAgAiA2siAmshByACBEAgByADIAL8CgAACyABKAIAIQMgASAHNgIAIAAgAzYCBCAEIAAoAggiAjYCACAAIAM2AgggASgCCCEHIAEgACgCDDYCCCAAIAM2AgAgACAHNgIMIAAQUwsgBCACNgIACyAGQSBqJAAMAQsQJgALIAUoAhAiA0UNAyADKAIUIgYgAygCECICKAIQIgRHDQIMAwsgASADRg0CIAIoAhAhBCABKAIUIQYgASEADAALAAsACwsPCwNAIAMoAhAgAxAiIgMNAAsgAUEANgIQC8MCARF+IAIpAwggASkDCCIEfSINIA1CP4ciDoUgDn0iBUL/////D4MiBiABKQMAIgcgACkDAH0iDyAPQj+HIhCFIBB9IghC/////w+DIgl+IgNCIIggBiAIQiCIIgh+fCIRQv////8PgyAJIAVCIIgiCX58IhJCIIYgA0L/////D4OEIAIpAwAgB30iBSAFQj+HIgaFIAZ9IgNC/////w+DIgogBCAAKQMIfSIEIARCP4ciB4UgB30iC0L/////D4MiDH4iE0IgiCAKIAtCIIgiC358IgpC/////w+DIANCIIgiAyAMfnwiDEIghiATQv////8Pg4RRIAggCX4gEUIgiHwgEkIgiHwgAyALfiAKQiCIfCAMQiCIfFFxIA6nIA1CAFVqIBCnIA9CAFVqbCAGpyAFQgBVaiAHpyAEQgBVamxGcQuJAwIEfwJ+An8gASkDICIHIAApAyAiBlIEQCAGIAdTDAELIABBEGoiBSABIAFBEGoiAxCHASICBEAgAkEfdgwBCwJAIAAoAlQiBC0AGEEEcQ0AIAApAxggASkDGFcNACABIAUgBEEQQRQgACgCMEEAShtqKAIAEIcBQQBMDAELAkAgASgCVCICLQAYQQRxDQAgASkDGCAAKQMYVw0AIAEgAyACQRBBFCABKAIwQQBKG2ooAgAQhwFBAE4MAQsgAS0AXCICIAEpAwgiBiAAKQMIUg0AGiACIAYgACgCWCgCACkDCFINABogAiAALQBcIAJHDQAaQQECfyAAKAIwQQBKBEAgBCgCFEEUagwBCyAEKAIQQRBqCygCACAAIAUQvgINABogACgCVCEDAn8gACgCMEEASgRAIAMoAhRBFGoMAQsgAygCEEEQagshACABKAJUIQMgAiAAKAIAIAECfyABKAIwQQBKBEAgAygCFEEUagwBCyADKAIQQRBqCygCABCHAUEASkYLQQFxC/QGAgt/An4gAEEAOgAYIAIhCSAAQTRqIQQgAEEkaiEKIwBBIGsiCyQAAkACQAJAIAEoAgAiBiABKAIEIgxGDQAgBiEAA0AgACgCBCAAKAIAa0EEdSADaiEDIABBDGoiACAMRw0ACyADRQ0AQX8gA0EFdCIAIANB////P0sbECMiByAAaiEBIAchAANAIABBADYCGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIgAgAUcNAAsgByECA0ACQCAGKAIAIgMgBigCBCIIRg0AQQAhASACQQA2AhQgAiEAQQAhBQNAAkAgAQRA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IAVrQQxtIAYQYSIFKAIIIgsgCEEMbGohBANAIAsgChA8IApBDGohCkEMaiILIARHDQALIAUgBDYCCCAFKAIEGiAGKAIEIAdrIggEQCAEIAcgCPwKAAALIAUgBSgCCCAGKAIEIAdrajYCCCAGIAc2AgQgBSgCBCAHIAYoAgAiCGsiBEF0bUEMbGohByAEBEAgByAIIAT8CgAACyAGKAIAIQQgBiAHNgIAIAUgBDYCBCAGIAUoAgg2AgQgBSAENgIIIAYoAgghByAGIAUoAgw2AgggBSAENgIAIAUgBzYCDCAFENUBDAELECYACyANQSBqJAACQCADKAJUIgVFDQAgBSAFKAIEIgRBAWs2AgQgBA0AIAUgBSgCACgCCBEAACAFECQLIAlBAWoiCSABKAIEIAEoAgAiBGtBBnVJDQALCyADQQA2AjQgA0IANwIsIAMoAkQhASADQegAakEAQegA/AsAIANCADcDYCADQQI2AlwgA0IANwJUIANB7ABqQQBBMPwLACADQaABakEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIEIAEQmwEgBCADQThqIgUQ4QEgA0EANgL8ASADQgA3AvQBIARBA0ECIAJBAUYbQQIgA0EsaiICIANB9AFqIgEQ4gEgAyABNgIkIANBJGoQKSAEEGkaQRgQIyIBQbSaAjYCACABQgA3AgQgAUEMaiIGIAIQWyADIAE2AhggAyAGNgIUIAMgAykCFDcDCCAAIANBCGoQaiADIAI2AlAgBBApDAELIANBADYCQCADQgA3AjggA0E4aiADKAJEIgIoAgAiBSACKAIEIgIgAiAFa0EMbRBHIAEoAgQgASgCACIEa0HBAE8EQCADQaABaiEGIANB7ABqIQcgA0HoAGohCEEBIQkDQCADQSRqIAQgCUEGdGoQTSADQQA2AjQgA0IANwIsIAMoAiQhBCAIQQBB6AD8CwAgA0IANwNgIANBAjYCXCADQgA3AlQgB0EAQTD8CwAgBkEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIFIANBOGoiAhCbASAFIAQQ4QEgA0EANgL8ASADQgA3AvQBIAVBAUECIANBLGoiBCADQfQBaiIKEOIBIAMgCjYCTCADQcwAahApIAUQaRogAigCACIKBEAgAiAKEHsgAigCCBogAigCABAiIAJBADYCCCACQgA3AgALIAMgAygCLDYCOCADKQIwIRAgA0EANgI0IAMgEDcCPCADQgA3AiwgAyAENgJQIAUQKQJAIAMoAigiAkUNACACIAIoAgQiBUEBazYCBCAFDQAgAiACKAIAKAIIEQAAIAIQJAsgCUEBaiIJIAEoAgQgASgCACIEa0EGdUkNAAsLQRgQIyIBQbSaAjYCACABQgA3AgQgA0HQAGohBCABQQxqIgIgA0E4aiIFEFsgAyABNgIgIAMgAjYCHCADIAMpAhw3AwAgACADEGoLIAMgBTYCUCAEECkgAygCSCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADQYACaiQAC+EDAQV/IwBB4AFrIgQkACAEQRxqIAEQTSAEKAIcIQEgBEEUaiACEE0gBEEANgIsIARCADcCJCAEKAIUIQIgBEHIAGpBAEHoAPwLACAEQgA3A0AgBEECNgI8IARCADcCNCAEQcwAakEAQTD8CwAgBEGAAWpBAEEk/AsAIARBADYCuAEgBEIANwOwASAEQQE6AK0BIARBAToApAEgBEKAgICAgICAoD43A8gBIARCgICAgICAgNDBADcDwAEgBEH8mgI2AjAgBEEwaiIFIAEQmwEgBSACEOEBIARBADYC2AEgBEIANwLQASAFQQFBA0ECIANBAUYbIANBAkYbQQIgBEEkaiAEQdABaiIBEOIBIAQgATYC3AEgBEHcAWoQKSAFEGkaAkAgBCgCGCIBRQ0AIAEgASgCBCICQQFrNgIEIAINACABIAEoAgAoAggRAAAgARAkCwJAIAQoAiAiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAtBGBAjIgF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AyAEIAUgBhDHAiALIQQgDCEDIAkhAiAHCyEBIAQNAQwCCwsgASACRg0AIAUhAyABIQcDQCADIAcpAxA3AxAgAyAHKQMINwMIIAMgBykDADcDACADQRhqIQMgB0EYaiIHIAJHDQALA0AgACABRwRAIAJBGGsiAiABQRhrIgcgA0EYayIIIANBEGsrAwAgAUEQaysDAGMiBBsiBigCEDYCECACIAYpAwg3AwggAiAGKQMANwMAIAcgASAEGyEBIAUgAyAIIAQbIgNHDQEMAgsLA0AgAkEYayICIANBGGsiAygCEDYCECACIAMpAwg3AwggAiADKQMANwMAIAMgBUcNAAsLIApBIGokAAvdBwIHfwF8IwBBIGsiCiQAAkAgBEUNAANAAkACQCAEIAZMIAMgBkxyRQRAIANFDQQgASsDACEOA0AgDiAAKwMAYw0CIABBGGohACADQQFrIgMNAAsMBAsgAyAESg0BIAAgAUYNAyAFIQMgACEHA0AgAyAHKQMQNwMQIAMgBykDCDcDCCADIAcpAwA3AwAgA0EYaiEDIAdBGGoiByABRw0ACwNAIAEgAkYEQCADIAVrQQRrIgFFDQUgACAFIAH8CgAADAULAkAgASsDACAFKwMAYwRAIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAFBGGohAQwBCyAAIAUoAhA2AhAgACAFKQMINwMIIAAgBSkDADcDACAFQRhqIQULIABBGGohACADIAVHDQALDAMLAkAgAyAESARAIAEgBEECbSILQRhsaiEIAkAgACABRgRAIAAhBwwBCyABIABrQRhtIQkgCCsDACEOIAAhBwNAIAcgByAJQQF2IgxBGGxqIgdBGGogDiAHKwMAYyINGyEHIAwgCSAMQX9zaiANGyIJDQALCyAHIABrQRhtIQwMAQsgA0EBRgRAIAogACkDEDcDGCAKIAApAwg3AxAgCiAAKQMANwMIIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAEgCigCGDYCECABIAopAxA3AwggASAKKQMINwMADAQLIAAgA0ECbSIMQRhsaiEHAkAgASACRgRAIAEhCAwBCyACIAFrQRhtIQkgBysDACEOIA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AQgBCkDqAY3A5AEIAQgBCkDoAY3A4gEIAQgBCkDmAY3A4AEIAQgBCkD0AU3A7gEIAQgBCkDyAU3A7AEIAQgBCkDwAU3A6gEIAQgBCkDuAU3A6AEIAQgBCkD8AY3A9gCIAQgBCkD6AY3A9ACIAQgBCkD4AY3A8gCIAQgBCkD2AY3A8ACIAQgBCkDkAc3A/gCIAQgBCkDiAc3A/ACIAQgBCkDgAc3A+gCIAQgBCkD+AY3A+ACIAQgBCkDsAc3A5gDIAQgBCkDqAc3A5ADIAQgBCkDoAc3A4gDIAQgBCkDmAc3A4ADIAQgBCkD0AY3A7gDIAQgBCkDyAY3A7ADIAQgBCkDwAY3A6gDIAQgBCkDuAY3A6ADIARBoAVqIARBwARqIARBwANqIARBwAJqIBxEAAAAAAAA8D8gGKEiFyABEOYDIBggF6IiGEQAAAAAAAAAAKAgHEQAAAAAAADwPyAcoaIiF6AhIiAYIAQrA/gHokQAAAAAAAAAAKAgFyAEKwOwBaKgISMgGCAEKwPwB6JEAAAAAAAAAACgIBcgBCsDqAWioCEkIBggBCsD6AeiRAAAAAAAAAAAoCAXIAQrA6AFoqAhIAsgIkQAAAAAAAAAAGIEQCAjICKjISMgJCAioyEkICAgIqMhIAsgCiAjOQMQIAogJDkDCCAKICA5AwAgIL1C////////////AINC//////////f/AFYgJL1C////////////AINC//////////f/AFZyRSAjvUL///////////8Ag0L/////////9/8AWHENACAKIAQpA5AINwMQIAogBCkDiAg3AwggCiAEKQOACDcDAAsgFkEBaiIWIA9HDQALCyAAQQA2ArwBIABBuAFqEJMBAkAgDSgCvAEgDSgCXEYEQCAAEFogABBYDAELIAAQlAILIAAgAxBUIABBfzYCyAELIAQoAhgiAARAIAAQIgsgDRA6GgsgBEHwCGokAAsfACABBEAgACABKAIAENICIAAgASgCBBDSAiABECILCzoAIAEEQCAAIAEoAgAQ0wIgACABKAIEENMCIAEoAhQiAARAIAEgADYCGCABKAIcGiAAECILIAEQIgsLghMCCn8afCMAQYABayICJAAgASg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IgAigCACICQQFrNgIAIAJBAUoNACAAKAIMIgIEQCACECILIABBADYCDCAAKAIAIgIEQCACECILIABBADYCCCAAQgA3AgALIAEoAgwiAiACKAIAQQFqNgIAIAAgASgCDDYCDCAAIAEoAgA2AgAgACABKAIENgIEIAAgASgCCDYCCAsLcgEDfyAAKALUAUUEQEEADwsgACgCzAEiASAAQdABaiICRgRAQQEPCwNAIAEtAIEBIgNBAUYEQAJAIAEoAgQiAARAA0AgACIBKAIAIgANAAwCCwALA0AgASABKAIIIgEoAgBHDQALCyABIAJHDQELCyADCykAIABBADYCBCAAEC0gAEEANgIUIABBEGoQLSAAQQA2AiQgAEEgahAtC8UCAQN/IAAoAgggACgCACIEa0EMbSADTwRAIAAoAgQiBSAEayIGQQxtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMoAgg2AgggASADKQIANwIAIAFBDGohASADQQxqIgMgAkcNAAsLIAAgBSABIAVrajYCBA8LIAIgAWsiA0UgASACRnJFBEAgBCABIAP8CgAACyAAIAMgBGo2AgQPCyAAEEUgA0HWqtWqAUkEQCAAQdWq1aoBIAAoAgggACgCAGtBDG0iBUEBdCIEIAMgAyAESRsgBUGq1arVAE8bEKMCIAAoAgQhAyABIAJHBEADQCADIAEoAgg2AgggAyABKQIANwIAIANBDGohAyABQQxqIgEgAkcNAAsLIAAgAzYCBA8LECYAC9gCAQN/IAAoAgggACgCACIEa0EYbSADTwRAIAAoAgQiBSAEayIGQRhtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACABQRhqIQEgA0EYaiIDIAJHDQALCyAAIAUgASAFa2o2AgQPCyACIAFrIgNFIAEgAkZyRQRAIAQgASAD/AoAAAsgACADIARqNgIEDwsgABBFIANBq9Wq1QBJBEAgAEGq1arVACAAKAIIIAAoAgBrQRhtIgV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CAFIARBAnRqKAIAIghBf0YNACAAKAJYIgYgCUECdCIBaigCACAGIAdBAnRqKAIARw0AIAEgBWooAgAhAQJAIAcgCEYEQCABIAJGBEAgA0ECNgIUIANCgICAgBA3AgwgACgCSCEKQQAhAQNAIAogBiADQSRqQQRBCCADQQxqIAFqKAIAIgRBAUYbQQAgBBtqKAIAQQJ0aigCAEEYbGoiBEKAgICAgICA/P8ANwMQIARCgICAgICAgPz/ADcDCCAEQoCAgICAgID8/wA3AwAgAUEEaiIBQQxHDQALDAILIAAoAkggBiAEQQJ0aigCAEEYbGoiAUKAgICAgICA/P8ANwMQIAFCgICAgICAgPz/ADcDCCABQoCAgICAgID8/wA3AwAMAQsgASACRw0AIAAoAkggBiACQQJ0aigCAEEYbGoiAUKAgICAgICA/P8ANwMQIAFCgICAgICAgPz/ADcDCCABQoCAgICAgID8/wA3AwALIAUgCEECdGogBSAHQQJ0aigCACIBNgIAIAUgAUECdGogCDYCACAFIAUgCUECdGooAgAiAUECdGogBSACQQJ0aigCACICNgIAIAUgAkECdGogATYCACADQQI2AhQgA0KAgICAEDcCDCAAKAJ4IQBBACEBA0AgBkEEQQggA0EMaiABaigCACICQQFGG0EAIAIbIgQgA0EkamooAgBBAnQiAmpBfzYCACACIAVqQX82AgAgACACakF/NgIAIAYgA0EYaiAEaigCAEECdCICakF/NgIAIAIgBWpBfzYCACAAIAJqQX82AgAgAUEEaiIBQQxHDQALCws6ACAAKAJcBEAgAEHYAGoQOCAAQegAahA4IABB+ABqEDggABDtASAAQQAQzwQgAEEAEM4EIAAQlAILC/8PAhh/GHwjAEEgayIKJAACQCAAKAJoIgsgAUECdCIGaigCACIMQQBIDQAgACsDMCEnIAogATYCFCAKQX5BASABIAFBA20iByIXQQNsa0ECRhsgAWoiDzYCGCAKQX5BASAPQQNvQQJGGyAPaiINNgIcIAogDDYCCCAKQX5BASAMIAxBA24iASIYQQNsa0ECRhsgDGoiCTYCDCAKQX5BASAJQQNvQQJGGyAJaiIQNgIQIAs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ARBBGohBCAIQQRqIgggAkcNAAsgAygCBCELIAMoAgAhCQNAIAAgASIDRgRAA0AgAkEEayICIARBBGsiBCgCADYCACAEIAZHDQAMAwsACwJAIAkoAgAiCiAEQQRrIgcoAgAiCEEDdGoiDCALKAIAIg1BAnQiAWooAgAiDiABIAogA0EEayIBKAIAIgVBA3RqIgpqKAIAIg9IDQAgDiAPRgRAIAxBASANa0ECdCINaigCACAKIA1qKAIASA0BCyAIIQUgAyEBIAchBAsgAkEEayICIAU2AgAgBCAGRw0ACwsgEUEQaiQAC5YHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCiAOKAJIIAJqIhQrAwAhBiABKAIEIhEoApgBIRUgESgCSCEWQQAhAUEAIQIDQAJ/IAogFSAEIA9BBGogAmooAgBBBHRqIhAoAgRBGGwiDmorAwCaZCAOIBZqIg4rAwAiCCAGYyAGIAhhGyAKIBUgECgCCEEYbCITaisDAJpkIBMgFmoiEysDACIJIAZjIAYgCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBAoAgAhGCAOKwMQIQcgDisDCCEFAkAgBiAIoSILIAYgCaEiDCALmSAMmWMiDhsgCSAIoaMiCL1C////////////AINC//////////f/AFYNACATKwMIIgkgBaEiC71C////////////AINCgICAgICAgPj/AFoNACATKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgDhsgCCANoqAhByAFIAkgDhsgCCALoqAhBQsgGUEAIBEoAqgBIg4gGEEDbUEYbGorAwggDiARKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAUgFCsDCCIIYyAFIAhhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AIA5BACAOayAQLQAMGyASaiESIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIQIAc5AxAgECAHOQMIIBAgBT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EEYbCITaisDACAKYyATIBZqIhMrAwAiCSAGYyAGIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyAQKAIAIRggDisDECEHIA4rAwghBQJAIAYgCKEiCyAGIAmhIgwgC5kgDJljIg4bIAkgCKGjIgi9Qv///////////wCDQv/////////3/wBWDQAgEysDCCIJIAWhIgu9Qv///////////wCDQoCAgICAgID4/wBaDQAgEysDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIA4bIAggDaKgIQcgBSAJIA4bIAggC6KgIQULIBlBACARKAKoASIOIBhBA21BGGxqKwMIIA4gESgCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAFIBQrAwgiCGMgBSAIYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNACAOQQAgDmsgEC0ADBsgEmohEiABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiECAHOQMQIBAgBzkDCCAQIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gEkUEQEQAAAAAAAD4fyEFQQAMAQsgEkEAIBEoAqgBIANBGGxqKwMQRAAAAAAAAAAAYyAPKwMgIgUgDysDOCIGIBQrAwgiByAPKwMQIgihIgmZIAcgDysDKCIHoSIKmWMiARsgBiAFoSIGIAkgCiABGyAHIAihoyIHoqAgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsiBSAUKwMQIgZjIAUgBmEbGwshASAAIAU5AwggACABNgIAC7IJAQ5/IwBBEGsiESQAAkAgBUUNAANAAkACQCAFIAdMIAQgB0xyRQRAIARFDQQgAygCACgCACINIAEoAgAiC0EDdGoiCEEBIAMoAgQoAgAiCWtBAnQiDmohCiAIIAlBAnQiD2ooAgAhCANAIAggDSAAKAIAIglBA3RqIgwgD2ooAg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AJGDQAgBiEEIAEhCANAIAQgCCgCADYCACAEQQRqIQQgCEEEaiIIIAJHDQALIAMoAgQhCyADKAIAIQkDQCAAIAEiA0YEQANAIAJBBGsiAiAEQQRrIgQoAgA2AgAgBCAGRw0ADAMLAAsCQCAJKAIAIgogBEEEayIHKAIAIghBA3RqIgwgCygCACINQQJ0IgFqKAIAIg4gASAKIANBBGsiASgCACIFQQN0aiIKaigCACIPSA0AIA4gD0YEQCAMQQEgDWtBAnQiDWooAgAgCiANaigCAEgNAQsgCCEFIAMhASAHIQQLIAJBBGsiAiAFNgIAIAQgBkcNAAsLIBFBEGokAAuVBwIJfAx/IwBBQGoiD0EQakEAQTD8CwAgD0ECNgIMIA9CgICAgBA3AgQgAkEYbCICIAEoAgAiDigCSGoiFCsDACEIIA4oApgBIAJqKwMAmiELIAEoAgQiEigCmAEhFSASKAJIIRZBACEBQQAhAgNAAn8gFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwAgC2QgCCAOIBZqIg4rAwAiBmMgBiAIYRsgFSARKAIEQRhsIhBqKwMAIAtkIAggECAWaiIQKwMAIgljIAggCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBEoAgAhGCAQKwMQIQcgECsDCCEFAkAgCCAJoSIKIAggBqEiDCAKmSAMmWMiEBsgBiAJoaMiBr1C////////////AINC//////////f/AFYNACAOKwMIIgkgBaEiCr1C////////////AINCgICAgICAgPj/AFoNACAOKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgEBsgBiANoqAhByAFIAkgEBsgBiAKoqAhBQsgGUEAIBIoAqgBIg4gGEEDbUEYbGorAwggDiASKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIBQrAwgiBiAFYyAFIAZhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AQQAgDmsgDiARLQAMGyATaiETIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIRIAc5AxAgESAHOQMIIBEgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyATRQRARAAAAAAAAPh/IQVBAAwBCyATQQAgEigCqAEgA0EYbGorAxBEAAAAAAAAAABkIBQrAxAiCCAPKwMgIgUgDysDOCIHIBQrAwgiBiAPKwMQIgmhIguZIAYgDysDKCIGoSIKmWMiARsgByAFoSIHIAsgCiABGyAGIAmhoyIGoqAgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsiBWMgBSAIYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0wgBCAHTHJFBEAgBEUNBCADKAIAKAIAIg0gASgCACILQQN0aiIIQQEgAygCBCgCACIJa0ECdCIOaiEKIAggCUECdCIPaigCACEIA0AgCCANIAAoAgAiCUEDdGoiDCAPaigCACIQSA0CIAggEEYEQCAKKAIAIAwgDmooAgBIDQMLIABBBGohACAEQQFrIgQNAAsMBAsgBCAFSg0BIAAgAUYNAyAGIQQgACEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAUcNAAsgAygCBCEFIAMoAgAhAwNAIAEgAkYEQCAEIAZrIgFFDQUgACAGIAH8CgAADAULAkACQCADKAIAIgcgASgCACIIQQN0aiILIAUoAgAiCUECdCIKaigCACIMIAogByAGKAIAIgpBA3RqIgdqKAIAIg1OBEAgDCANRw0BIAtBASAJa0ECdCIJaigCACAHIAlqKAIATg0BCyAAIAg2AgAgAUEEaiEBDAELIAAgCjYCACAGQQRqIQYLIABBBGohACAEIAZHDQALDAMLAkAgBCAFSARAIAEgBUECbSIKQQJ0aiELAkAgACABRgRAIAAhCQwBCyANIAsoAgBBA3RqIgggDmohEiAIIA9qKAIAIRAgASAAa0ECdSEIIAAhCQNAAn8CQCAQIA0g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IAggDiAWaiIOKwMAIgZjIAYgCGEbIAsgFSARKAIEQRhsIhBqKwMAYyAIIBAgFmoiECsDACIJYyAIIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyARKAIAIRggECsDECEHIBArAwghBQJAIAggCaEiCiAIIAahIgwgCpkgDJljIhAbIAYgCaGjIga9Qv///////////wCDQv/////////3/wBWDQAgDisDCCIJIAWhIgq9Qv///////////wCDQoCAgICAgID4/wBaDQAgDisDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIBAbIAYgDaKgIQcgBSAJIBAbIAYgCqKgIQULIBlBACASKAKoASIOIBhBA21BGGxqKwMIIA4gEigCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAUKwMIIgYgBWMgBSAGYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNAEEAIA5rIA4gES0ADBsgE2ohEyABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiESAHOQMQIBEgBzkDCCARIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gE0UEQEQAAAAAAAD4fyEFQQAMAQsgE0EAIBIoAqgBIANBGGxqKwMQRAAAAAAAAAAAZCAUKwMQIgggDysDICIFIA8rAzgiByAUKwMIIgYgDysDECIJoSILmSAGIA8rAygiBqEiCpljIgEbIAcgBaEiByALIAogARsgBiAJoaMiBqKgIAUgB71C////////////AINCgICAgICAgPj/AFQbIAUgDysDMCAPKwMYob1C////////////AINCgICAgICAgPj/AFQbIAUgBr1C////////////AINCgICAgICAgPj/AFQbIgVjIAUgCGEbGwshASAAIAU5AwggACABNgIAC/wHAw9/A3wDfiMAQdABayIEJAAgBEGgAWpBAEEw/AsAIARB8ABqQQBBMPwLACABKAIAIhAoAlggAkECdGoiBUF4QQQgAkEDb0ECRhtqKAIAIQ8gBSgCACEMIAEoAgQhBSAEQQI2AhAgBEKAgICAEDcCCC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ARogAigCACAFaigCAAwBCyAEQQh1IAZFDQAaIAEgACgCACgCBDYCOEEAIQJBAAshBSAAKAIAIgAgASACIAVqIANBAiAEQQJxGyAAKAIAKAIcEQUACwsAIAEgAiAAEQEACw0AIAAoAgQgASgCBEYLQAECfyMAQRBrIgIkACMAQRBrIgEkACABIAA2AgwgAUEMakEEEPcBIAFBEGokACACQRBqJABBH3FBAnRB0JwCagtoAQN/IwBBEGsiAyQAIANBADoADiABIABrQQJ1IQEgAigCACEEA0AgAQRAIAEgAUEBdiICQX9zaiACIAAgAkECdGoiAigCACAESSIFGyEBIAJBBGogACAFGyEADAELCyADQRBqJAAgAAvsBAMEfwV+AXwgAkEANgIAAkAgAb1C////////////AINCgICAgICAgPj/AFYgAUQAAAAAAAAAAGFyRQRAIAC9IglCNIinQf8PcSIDQf8PRw0BCyAAIAGiIgAgAKMPCwJAIABEAAAAAAAAAABhDQAgAb0iCkI0iKdB/w9xIQQCfiADRQRAQQAhAyAJQgyGIgdCAFkEQANAIANBAWshAyAHQgGGIgdCAFkNAAsLIAlBASADa62GDAELIAlC/////////weDQoCAgICAgIAIhAshBwJ+IARFBEBBACEEIApCDIYiCEIAWQRAA0AgBEEBayEEIAhCAYYiCEIAWQ0ACwsgCkEBIARrrYYMAQsgCkL/////////B4NCgICAgICAgAiECyEIAn4CQAJAIAMgBE4EQCADIARKBEADQCAHIAh9IgsgByALQgBZIgYbQgGGIQcgBSAGckEBdCEFIANBAWsiAyAESg0ACyAEIQMLIAUgByAIfSIIQgBZIgZyIQUgCCAHIAYbIgdQBEBBRCEDQgAhBwwDCyAHQv////////8HVg0BA0AgA0EBayEDIAciCEIBhiEHIAhCgICAgICAgARUDQALDAELIANBAWogBEcNAwsgA0EATA0AIAdCgICAgICAgAh9IAOtQjSGhAwBCyAHQQEgA2utiAsgAZkhAL8hAQJAAkAgAyAERg0AIANBAWogBEcNASABIAGgIgwgAGQNACAFQQFxRSAAIAxicg0BCyAFQQFqIQUgASAAoSEBCyACQQAg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IAEQIAIggbIQQgAyAGIAgbIQYLIAUhAyAEIAdBCGogASgCABECAEUNAQsLIAUgBykDGDcDECAFIAcpAxA3AwggBSAHKQMINwMACyAHQSBqJAALwRIBBn8jAEEgayIDJABBASEHAkACQAJAAkACQAJAIAEgAGtBGG0OBgUFAAECAwQLIAFBGGsiASAAIAIoAgARAgBFDQQgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMBAsgAEEYaiIEIAAgAigCABECACABQRhrIgEgBCACKAIAEQIAIQVFBEAgBUUNBCADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAEpAxA3AxAgBCABKQMINwMIIAQgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDACAEIAAgAigCABECAEUNBCADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAQpAxA3AxAgACAEKQMINwMIIAAgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDAAwECyAFBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMBAsgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAEIAIoAgARAgBFDQMgAyAEKQMQNwMYIAMgBCkDCDcDECADIAQpAwA3AwggBCABKQMQNwMQIAQgASkDCDcDCCAEIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAwsgAUEYayEFIABBGGoiASAAIAIoAgARAgAhCCAAQTBqIgQgASACKAIAEQIAIQYCQCAIRQRAIAZFDQEgAyABKQMQNwMYIAMgASkDCDcDECADIAEpAwA3AwggASAEKQMQNwMQIAEgBCkDCDcDCCABIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAAIAIoAgARAgBFDQEgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAQsgBgRAIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgBCkDEDcDECAAIAQpAwg3AwggACAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMADAELIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgAykDGDcDECABIAMpAxA3AwggASADKQMINwMAIAQgASACKAIAEQIARQ0AIAMgASkDEDcDGCADIAEpAwg3AxAgAyABKQMANwMIIAEgBCkDEDcDECABIAQpAwg3AwggASAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMACyAFIAQgAigCABECAEUNAiADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAUpAxA3AxAgBCAFKQMINwMIIAQgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDACAEIAEgAigCABECAEUNAiADIAEpAxA3AxggAyABKQMINwMQIAMgASkDADcDCCABIAQpAxA3AxAgASAEKQMINwMIIAEgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACABIAAgAigCABECAEUNAiADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDAAwCCyAAIABBGGogAEEwaiAAQcgAaiABQRhrIAIQsgMMAQsgAEEYaiIFIAAgAigCABECACEIIABBMGoiBCAFIAIoAgARA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fyMAQSBrIgYkACABIAAgBSgCABECACEIIAIgASAFKAIAEQIAIQcCQCAIRQRAIAdFDQEgBiABKQMQNwMYIAYgASkDCDcDECAGIAEpAwA3AwggASACKQMQNwMQIAEgAikDCDcDCCABIAIpAwA3AwAgAiAGKQMYNwMQIAIgBikDEDcDCCACIAYpAwg3AwAgASAAIAUoAgARAgBFDQEgBiAAKQMQNwMYIAYgACkDCDcDECAGIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAGKQMYNwMQIAEgBikDEDcDCCABIAYpAwg3AwAMAQsgBwRAIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMADAELIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMACwJAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACwJAIAQgAyAFKAIAEQIARQ0AIAYgAykDEDcDGCAGIAMpAwg3AxAgBiADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBikDGDcDECAEIAYpAxA3AwggBCAGKQMINwMAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACyAGQSBqJAALqAYBA38CQAJAAkACQAJAIAMOAwMAAQILIAQgACgCCDYCCCAEIAApAgA3AgAPCyABQQxrIQICQAJAIAFBCGsoAgAiAUUNACAAKAIERQ0AIAAoAgApAwAgAigCACkDAFUNAQwECyABRQ0DCyAEIAIoAgg2AgggBCACKQIANwIAIAQgACkCADcCDCAEIAAoAgg2AhQPCyADQQhMBEAgBCEDAkAgACABRg0AIAQgACgCCDYCCCAEIAApAgA3AgAgAEEMaiIGIAFGDQADQCAEQQxqIQUCQAJAAkACQCAAKAIQIgJFDQAgBCgCBEUNACAEKAIAKQMAIAYoAgApAwBVDQEMAgsgAkUNAQsgBSAEKAIINgIIIAUgBCkCADcCAAJ/IAMgAyAERg0AGgJAA0AgBEEMayECAkACQCAAKAIQIgdFDQAgBEEIaygCAEUNACACKAIAKQMAIAYoAgApAwBVDQEMAwsgB0UNAgsgBCACLQAIOgAIIAQgAikCADcCACACIgQgA0cNAAsgAwwBCyAECyIAIAYtAAg6AAggACAGKQIANw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IAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMADAULIAQEQCAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAMgAigCABECAEUNBCAFIAMpAxA3AxggBSADKQMINwMQIAUgAykDADcDCCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwECyABQRhrIQQgAEEYaiIBIAAgAigCABECACEIIABBMGoiAyABIAIoAgARAgAhBgJAIAhFBEAgBkUNASAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAAgAigCABECAEUNASAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCyAGBEAgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACADKQMQNwMQIAAgAykDCDcDCCAAIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwAMAQsgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKQMYNwMQIAEgBSkDEDcDCCABIAUpAwg3AwAgAyABIAIoAgARAgBFDQAgBSABKQMQNwMYIAUgASkDCDcDECAFIAEpAwA3AwggASADKQMQNwMQIAEgAykDCDcDCCABIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwALIAQgAyACKAIAEQIARQ0DIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBSkDGDcDECAEIAUpAxA3AwggBCAFKQMINwMAIAMgASACKAIAEQIARQ0DIAUgASkDEDcDGCAFIAEpAwg3AxAgBSABKQMANwMIIAEgAykDEDcDECABIAMpAwg3AwggASADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMAIAEgACACKAIAEQIARQ0DIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMADAMLIAAgAEEYaiAAQTBqIABByABqIAFBGGsgAhCyAwwCCyAIQb8ETARAIARBAXEEQCACIQYjAEEgayIHJAACQCAAIgIgASIIRg0AIAEgAEEYaiIBRg0AA0AgASIDIAAgBigCABECAARAIAcgASkDEDcDGCAHIAEpAwg3AxAgByABKQMANwMIIAEhBANAAkAgBCAAIgEpAxA3AxAgBCAAKQMINwMIIAQgACkDADcDACAAIAJGBEAgAiEBDAELIAEhBCAHQQhqIAFBGGsiACAGKAIAEQIADQELCyABIAcpAxg3AxAgASAHKQMQNwMIIAEgBykDCDcDAAsgAyIAQRhqIgEgCEcNAAsLIAdBIGokAAwDCyACIQMjAEEgayIIJAACQCABIgYgAEYNACAAQRhqIgEgBkYNAANAIAEiAiAAIAMoAgARAgAEQCAIIAEpAxA3AxggCCABKQMINwMQIAggASkDADcDCANAIAEiBCAAIgEpAxA3AxAgBCAAKQMINwMIIAQgACkDADcDACAIQQhqIABBGGsiACADKAIAEQIADQALIAEgCCkDGDcDECABIAgpAxA3AwggASAIKQMINwMACyACIgBBGGoiASAGRw0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EQANAIAkgBikDEDcDKCAJIAYpAwg3AyAgCSAGKQMANwMYIAYgBykDEDcDECAGIAcpAwg3AwggBiAHKQMANwMAIAcgCSkDKDcDECAHIAkpAyA3AwggByAJKQMYNwMAA0AgBiIIQRhqIgYgCSACKAIAEQIADQALA0AgB0EYayIHIAkgAigCABECAEUNAAsgBiAHSQ0ACwsgACAIRwRAIAAgCCkDEDcDECAAIAgpAwg3AwggACAIKQMANwMACyAIIAkpAxA3AxAgCCAJKQMINwMIIAggCSkDADcDACAFIAo6AAwgBSAINgIIIAlBMGokACAFKAIIIQgCQCAFLQAMQQFHDQAgACAIIAIQsAMhByAIQRhqIgYgASACELADBEAgCCEBIAdFDQMMAgsgB0UNACAGIQAMAgsgACAIIAIgAyALELcDIAhBGGohAEEAIQQMAQsLIAVBIGokAAubFgIOfwZ+IwBBMGsiBiQAIAZCADcDECAGQgA3AwggASgCMCEDIAEoAlQiAikDCCEQAkAgASgCWC0ACCIOQQFGBEAgA0EASgRAA0AgAiIDKAIQIgIpAwggEFINAyADLQAYQQZxRQ0ADAMLAAsDQCACIgMoAhQiAikDCCAQUg0CIAMtABhBBnFFDQALDAELIANBAEoEQANAIAIiAygCECICKQMIIBBRDQAMAgsACwNAIAIiAygCFCICKQMIIBBRDQALCyADKAIYQR10QR91IANxIQkgASkDICEQAn4CQCABKQMQIhIgASkDAFEEQCABIQIDQCACKAJEIgJBAEchAyACRQ0CIAIoAlQgCUcNAAsMAQsgECASIBAgElUbIRUgECASIBAgElMiAxsMAQsgECEVIBALIRICQAJAIAEoAjxFDQAgBiABKQMINwMgIAYgEDcDGCABIAZBGGoQYyIHKAIYLQBMDQACQCAAKAJgIgIgACgCZCIFSQRAIAJBAToACCACQQA2AgQgAiAHNgIAIAJBDGohBQwBCyACIABB3ABqIgQoAgAiCmtBDG0iDEEBaiICQdaq1aoBTw0CIAZBGGpB1arVqgEgBSAKa0EMbSIFQQF0IgogAiACIApJGyAFQarVqtUATxsgDCAEEGEiAigCCCIFQQE6AAggBUEANgIEIAUgBzYCACACIAVBDGo2AgggAigCBCAAKAJgIAAoAlwiB2siBUF0bUEMbGohBCAFBEAgBCAHIAX8CgAACyAAKAJcIQcgACAENgJcIAIgBzYCBCAAIAIoAggiBTYCYCACIAc2AgggACgCZCEEIAAgAigCDDYCZCACIAc2AgAgAiAENgIMIAIQ1gELIAAgBTYCYAsgAUEQaiEHIABB3ABqIQogAUFAayEMIAFBxABqIQ0DQAJAAkACQCANIAwgAxsoAgAiAkUNAANAIAkgAigCVEYEQAJAIAEoAjxFDQAgAigCYARAIAAgAiACQRBqEH4gASgCPEUNAQsgCSABKAJURwRAA0AgASAHEGMaIAAgARD+ASABKAJUIAlHDQALCyADBEAgACABIAIgBxCGAQwBCyAAIAIgASAHEIYBCwJAIAIoAkQiAyACKAJAIgVyRQRAIAIgACgCHCIHRw0BCwJAIAUEQCAFIAM2AkQMAQsgACADNgIcCyADBEAgAyAFNgJACyACECIgACgCHCEHCyABKAJEIgIgASgCQCIDckUgASAHR3ENAwJAIAMEQCADIAI2AkQMAQsgACACNgIcCyACBEAgAiADNgJACyABECIMAwsCfwJAAkACQAJAIAkgASgCVCIERw0AIAQtABhBA3ENACACKQMgIRQMAQsgAikDICEUAkAgAwRAIBQgFVcNAQwHCyASIBRVDQYLIBQgBykDAFINACACKQMYIhEgAikDCFENACACQSBqIQUgBiAEQRBBFCABKAIwQQBKG2ooAgAiBCkDCDcDECAGIAQpAwA3AwggAigCWCIELQAIIQgCQCADBEACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFUNCAwCCyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIUw0BDAcLAkACQCAIQQFxRQ0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KAAALIAAoAgAhBSAAIAY2AgAgByAFNgIQIAAgBygCFCIINgIEIAcgBTYCFCAAKAIIIQIgACAHKAIYNgIIIAcgAjYCGCAEIAU2AgAgBBA2CyAAIAg2AgQgAygCECEGIAMhAgsgASAGRw0ACwsgB0EgaiQADwsQJgALcAIEfgN8IAIpAwghBCABKQMIIQMCfCACKQMAIgYgASkDACIFUQRARAAAAAAAAAAAIAMgBFENARoLIAApAwAgBX25IAQgA325IgeiIAYgBX25IgggACkDCCADfbmioSIJIAmiIAggCKIgByAHoqCjCws+AQJ/IAAoAgQiAiABRwRAA0AgAkEEayICKAIAIQMgAkEANgIAIAMEQCADECILIAEgAkcNAAsLIAAgATYCBAuhAwEEfyMAQSBrIgYkAAJAIAEoAhgiA0EIcUUEQCABIANBCHI2AhhBDBAjIgNBADoACCADIAI2AgQgAyABNgIAAkAgACgCBCIBIAAoAggiAkkEQCABIAM2AgAgAUEEaiEDDAELIAEgACgCACIEa0ECdSIFQQFqIgFBgICAgARPDQIgBkEMakH/////AyACIARrIgJBAXUiBCABIAEgBEkbIAJB/P///wdPGyAFIAAQSiIBKAIIIgIgAzYCACABIAJBBGo2AgggASgCBCAAKAIEIAAoAgAiBGsiAmshAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAggiAzYCBCABIAI2AgggACgCCCEEIAAgASgCDDYCCCABIAI2AgAgASAENgIMIAEoAgQiBSABKAIIIgJHBEADQCABIAJBBGsiAjYCCCACKAIAIQQgAkEANgIAIAQEQCAEECIgASgCCCECCyACIAVHDQALCyABKAIAIgIEQCABKAIMGiACECILCyAAIAM2AgQLIAZBIGokAA8LECYAC3gBAn8gACgCPCICIAEoAjwiA0YEQCACIAIpAwhCIIk3AwgPCwJAIAJFDQAgAigCCCAARgRAIAIgATYCCAwBCyACIAE2AgwLAkAgA0UNACADKAIIIAFGBEAgAyAANgIIDAELIAMgADYCDAsgACADNgI8IAEgAjYCPAtqAQJ/IwBBEGsiBC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kDiAE3AwggBiAEKQOAATcDAAsgBEGQAWokAAv8FQEHfyMAQeAEayIDJABBASEGAkACQAJAAkACQAJAIAEgAGtBBHUOBgUFAAECAwQLIAIoAgAhAiADIAFBEGsiASkDCDcD2AEgAyABKQMANwPQASADIAApAwA3A8ABIAMgACkDCDcDyAEgA0HQAWogA0HAAWogAhECAEUNBCADIAApAwg3A9gEIAMgACkDADcD0AQgACABKQMINwMIIAAgASkDADcDACABIAMpA9gENwMIIAEgAykD0AQ3AwAMBAsgAigCACEEIAMgACkDGDcD2AIgAyAAKQMQNwPQAiADIAApAwA3A8ACIAMgACkDCDcDyAIgA0HQAmogA0HAAmogBBECACACKAIAIQQgAyABQRBrIgEpAwg3A7gCIAMgASkDADcDsAIgAyAAKQMQNwOgAiADIAApAxg3A6gCIANBsAJqIANBoAJqIAQRAgAhBEUEQCAERQ0EIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDACACKAIAIQEgAyAAKQMYNwOYAiADIAApAxA3A5ACIAMgACkDADcDgAIgAyAAKQMINwOIAiADQZACaiADQYACaiABEQIARQ0EIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDEAwECyAEBEAgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQPYBDcDCCABIAMpA9AENwMADAQLIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDECACKAIAIQIgAyABKQMINwP4ASADIAEpAwA3A/ABIAMgACkDEDcD4AEgAyAAKQMYNwPoASADQfABaiADQeABaiACEQIARQ0DIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDAAwDCyACKAIAIQQgAyAAKQMYNwO4BCADIAApAxA3A7AEIAMgACkDADcDoAQgAyAAKQMINwOoBCADQbAEaiADQaAEaiAEEQIAIQUgAigCACEEIAMgACkDKDcDmAQgAyAAKQMgNwOQBCADIAApAxA3A4AEIAMgACkDGDcDiAQgAUEQayEBIANBkARqIANBgARqIAQRAgAhBAJAIAVFBEAgBEUNASADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyAgAigCACEEIAMgACkDGDcD+AMgAyAAKQMQNwPwAyADIAApAwA3A+ADIAMgACkDCDcD6AMgA0HwA2ogA0HgA2ogBBECAEUNASADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAMAQsgBARAIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAyg3AwggACAAKQMgNwMAIAAgAykD2AQ3AyggACADKQPQBDcDIAwBCyADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAgAigCACEEIAMgACkDKDcD2AMgAyAAKQMgNwPQAyADIAApAxA3A8ADIAMgACkDGDcDyAMgA0HQA2ogA0HAA2ogBBECAEUNACADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyALIAIoAgAhBCADIAEpAwg3A7gDIAMgASkDADcDsAMgAyAAKQMgNwOgAyADIAApAyg3A6gDIANBsANqIANBoANqIAQRAgBFDQIgAyAAKQMoNwPYBCADIAApAyA3A9AEIAAgASkDCDcDKCAAIAEpAwA3AyAgASADKQPYBDcDCCABIAMpA9AENwMAIAIoAgAhASADIAApAyg3A5gDIAMgACkDIDcDkAMgAyAAKQMQNwOAAyADIAApAxg3A4gDIANBkANqIANBgANqIAERAgBFDQIgAyAAKQMYNwPYBCADIAApAxA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AFGDQADQCACKAIAIQYgAyAFKQMINwM4IAMgBSkDADcDMCADIAQpAwA3AyAgAyAEKQMINwMoAkAgA0EwaiADQSBqIAYRAgBFDQAgAyAFKQMINwPIBCADIAUpAwA3A8AEIAUhBwNAAkAgByAEIgYpAwg3AwggByAEKQMANwMAIAAgBEYEQCAAIQYMAQsgAigCACEJIAMgAykDyAQ3AxggAyADKQPABDcDECADIAZBEGsiBCkDADcDACADIAQpAwg3AwggBiEHIANBEGogAyAJEQIADQELCyAGIAMpA8gENwMIIAYgAykDwAQ3AwAgCEEBaiIIQQhHDQAgBUEQaiABRiEGDAILIAUiBEEQaiIGIQUgASAGRw0AC0EBIQYLIANB4ARqJAAgBgumDAEDfyMAQfACayIGJAAgBSgCACEHIAYgASkDCDcD2AIgBiABKQMANwPQAiAGIAApAwA3A8ACIAYgACkDCDcDyAIgBkHQAmogBkHAAmogBxECACEIIAUoAgAhByAGIAIpAwg3A7gCIAYgAikDADcDsAIgBiABKQMANwOgAiAGIAEpAwg3A6gCIAZBsAJqIAZBoAJqIAcRAgAhBwJAIAhFBEAgB0UNASAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACEHIAYgASkDCDcDmAIgBiABKQMANwOQAiAGIAApAwA3A4ACIAYgACkDCDcDiAIgBkGQAmogBkGAAmogBxECAEUNASAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwAMAQsgBwRAIAYgACkDCDcD6AIgBiAAKQMANwPgAiAAIAIpAwg3AwggACACKQMANwMAIAIgBikD6AI3AwggAiAGKQPgAjcDAAwBCyAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwAgBSgCACEHIAYgAikDCDcD+AEgBiACKQMANwPwASAGIAEpAwA3A+ABIAYgASkDCDcD6AEgBkHwAWogBkHgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwALIAUoAgAhByAGIAMpAwg3A9gBIAYgAykDADcD0AEgBiACKQMANwPAASAGIAIpAwg3A8gBAkAgBkHQAWogBkHAAWogBxECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEHIAYgAikDCDcDuAEgBiACKQMANwOwASAGIAEpAwA3A6ABIAYgASkDCDcDqAEgBkGwAWogBkGgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACEHIAYgASkDCDcDmAEgBiABKQMANwOQASAGIAApAwA3A4ABIAYgACkDCDcDiAEgBkGQAWogBkGAAWogBxECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAUoAgAhByAGIAQpAwg3A3ggBiAEKQMANwNwIAYgAykDADcDYCAGIAMpAwg3A2gCQCAGQfAAaiAGQeAAaiAHEQIARQ0AIAYgAykDCDcD6AIgBiADKQMANwPgAiADIAQpAwg3AwggAyAEKQMANwMAIAQgBikD6AI3AwggBCAGKQPgAjcDACAFKAIAIQQgBiADKQMINwNYIAYgAykDADcDUCAGIAIpAwA3A0AgBiACKQMINwNIIAZB0ABqIAZBQGsgBBECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEDIAYgAikDCDcDOCAGIAIpAwA3AzAgBiABKQMANwMgIAYgASkDCDcDKCAGQTBqIAZBIGogAxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACECIAYgASkDCDcDGCAGIAEpAwA3AxAgBiAAKQMANwMAIAYgACkDCDcDCCAGQRBqIAYgAhECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAZB8AJqJAALCAAgABBpECILhAMCBX8BfCMAQUBqIgIkACAAQQA2AgggAEIANwIAIAJBCGogARBNIAJBADYCPCACQgA3AjQgAkE0aiACKAIIIgEoAgAiAyABKAIEIgEgASADa0EMbRBHAkAgAigCDCIBRQ0AIAEgASgCBCIDQQFrNgIEIAMNACABIAEoAgAoAggRAAAgARAkCyAAIAIoAjggAigCNGtBDG0QViACKAI0IgMgAigCOCIFRwRAA0AgAkEoaiADEDwhBCACQQA2AiQgAkIANwIcIAJBHGogAigCLCAEKAIAa0EEdRBcIAQoAgAiASACKAIsIgZHBEADQCABKwMAIQcgAiABKwMIOQMQIAIgBzkDCCACQRxqIAJBCGoQTCABQRBqIgEgBkcNAAsLIAAgAkEcahB2IAIoAhwiAQRAIAIgATYCICACKAIkGiABECILIAQoAgAiAQRAIAIgATYCLCACKAIwGiABECILIANBDGoiAyAFRw0ACwsgAiACQTRqNgIIIAJBCGoQKSACQUBrJAAL5QECBXwDf0T////////vfyEFRP///////+//IQYCQCABKAIAIgcgASgCBCIIRgRARP///////+//IQNE////////738hBAwBC0T////////vfyEERP///////+//IQMDQCAHKAIAIgEgBygCBCIJRwRAA0AgASsDCCICIAMgAiADZBshAyACIAQgAiAEYxshBCABKwMAIgIgBiACIAZkGyEGIAIgBSACIAVjGyEFIAFBEGoiASAJRw0ACwsgB0EMaiIHIAhHDQALCyAAIAM5AxggACAGOQMQIAAgBDkDCCAAIAU5AwAL1QECB3wDfwJAIAEoAgQiCSABKAIAIgprIgtBEUkNACAAKwMIIQcgACsDACEIA0AgCiALaiIAQRBrKwMAIABBIGsrAwAiAqEiAyAHIABBGGs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gBUGQB2ogBUGAB2ogAxECAEUNAyAFIAApAyg3A8gIIAUgACkDIDcDwAggACABKQMINwMoIAAgASkDADcDICABIAUpA8gINwMIIAEgBSkDwAg3AwAgAigCACEBIAUgACkDKDcD+AYgBSAAKQMgNwPwBiAFIAApAxA3A+AGIAUgACkDGDcD6AYgBUHwBmogBUHgBmogARECAEUNAyAFIAApAxg3A8gIIAUgACkDEDcDwAggACAAKQMoNwMYIAAgACkDIDcDECAAIAUpA8gINwMoIAAgBSkDwAg3AyAgAigCACEBIAUgACkDGDcD2AYgBSAAKQMQNwPQBiAFIAApAwA3A8AGIAUgACkDCDcDyAYgBUHQBmogBUHABmogARECAEUNAyAFIAApAwg3A8gIIAUgACkDADcDwAggACAAKQMYNwMIIAAgACkDEDcDACAAIAUpA8gINwMYIAAgBSkDwAg3AxAMAwsgACAAQRBqIABBIGogAEEwaiABQRBrIAIQxAMMAgsgCEEXTARAIARBAXEEQCACIQYjAEHQAGsiByQAAkAgACICIAEiCEYNACAAQRBqIgEgCEYNAANAIAYoAgAhBCAHIAEiAykDCDcDOCAHIAEpAwA3AzAgByAAKQMANwMgIAcgACkDCDcDKCAHQTBqIAdBIGogBBECAARAIAcgASkDCDcDSCAHIAEpAwA3A0AgASEEA0ACQCAEIAAiASkDCDcDCCAEIAApAwA3AwAgACACRgRAIAIhAQwBCyAGKAIAIQkgByAHKQNINwMYIAcgBykDQDcDECAHIAFBEGsiACkDADcDACAHIAApAwg3AwggASEEIAdBEGogByAJEQIADQELCyABIAcpA0g3AwggASAHKQNANwMACyADIgBBEGoiASAIRw0ACwsgB0HQAGokAAwDCyACIQMjAEHQAGsiCCQAAkAgASIEIABGDQAgASAAQRBqIgFGDQADQCADKAIAIQYgCCABIgIpAwg3AzggCCABKQMANwMwIAggACkDADcDICAIIAApAwg3AyggCEEwaiAIQSBqIAYRAgAEQCAIIAEpAwg3A0ggCCABKQMANwNAA0AgASIGIAAiASkDCDcDCCAGIAApAwA3AwAgAygCACEGIAggCCkD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AwA3AwAgA0EYaiEDIABBGGoiACAERw0ACwwECwJAIAIrAwggACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAERw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwudBQEIfyMAQSBrIgUkACADIQQCQCABIAJGDQAgAiAERgRAIAEhBAwBCyACIAFBGGoiBEYEQCAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCADIAJrIgJBBGsiBwRAIAEgBCAH/AoAAAsgASACaiIEIAUoAhg2AhAgBCAFKQMQNwMIIAQgBSkDCDcDAAwBCyADIAJBGGpGBEAgBSADQRhrIgIpAxA3AxggBSACKQMINwMQIAUgAikDADcDCCADIAIgAWsiB0FobUEYbGohBAJAIAEgAkYNACAHQQRrIgJFDQAgBCABIAL8CgAACyABIAUoAhg2AhAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCwJ/IwBBIGshBiACIAEiBGsiCUEYbSIHIAMgAmsiC0EYbSIBRwRAIAchAgNAIAIgASICbyIBDQALIAQgAkEYbGohAgNAIAYgAkEYayICKQMQNwMYIAYgAikDCDcDECAGIAIpAwA3AwggAiAJaiEIIAIhAQNAIAEiCiAIIgEoAhA2AhAgCiABKQMINwMIIAogASkDADcDACABIAlqIAQgByADIAFrQRhtIghrQRhsaiAHIAhIGyIIIAJHDQALIAEgBigCGDYCECABIAYpAxA3AwggASAGKQMINwMAIAIgBEcNAAsgBCALagwBCwJAIAIgBEYgAiADRnINACACIQEDQCAGIAQpAxA3AxggBiAEKQMINwMQIAYgBCkDADcDCCAEIAEoAhA2AhAgBCABKQMINwMIIAQgASkDADcDACABIAYoAhg2AhAgASAGKQMQNwMIIAEgBikDCDcDACAEQRhqIgQgAkYNASABQRhqIgEgA0cNAAsLIAILIQQLIAAgAzYCBCAAIAQ2AgAgBUEgaiQAC4IGAQN/AkACQAJAAkACQCACDgMEAgABCyABQRhrIgErAwAgACsDAGMEQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgASkDEDcDKCADIAEpAwg3AyAgAyABKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQADQCAAQRhqIQUCQCAEKwMAIAArAwBjBEAgBSAAKQMQNwMQIAUgACkDCDcDCCAFIAApAwA3AwACfyADIAAgA0YNABoDQCAAIAQrAwAgAEEYayICKwMAY0UNARogACACKAIQNgIQIAAgAikDCDcDCCAAIAIpAwA3AwAgAiIAIANHDQALIAMLIgIgBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMADAELIAUgBCkDEDcDECAFIAQpAwg3AwggBSAEKQMANwMACyAFIQAgBEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgRBGGwiBmoiBSAEIAMgBBC2ASAFIAEgAiAEayICIAMgBmogAhC2ASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAFRw0ACwwECwJAIAIrAwAgACsDAGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAFRw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwuLCwEQfyMAQSBrIgckACAHQQA2AhggB0IANwIQI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SAwJAIAQoAvQGIgJFDQAgAkEMbCICRQ0AIAQoArgDIAQoArgGIABqKAIAQQxsaiAEKALwBiAC/AoAAAsgBCgC8AYiAEUNACAAECILIBdBAWoiFyAcRw0ACwsgCyAEQcgDahCSAiABIARBuANqIARBgAZqEJ4BIAQoArgDIgAEQCAAECILIAQoAsgDIgBFDQQgABAiDAQLEHIACxAmAAsQZgALIARBADYC+AYgBEIANwLwBiABIARBgAZqIARB8AZqEJ4BIAQoAvAGIgBFDQAgABAiCyAEKAKIBSIABEAgABAiCyAEKALYAyIABEAgABAiCyAEKALYBiIABEAgABAiCyAEKAKABiIABEAgABAiCyAEKAKYBiIABEAgABAiCyAEKAK4BiIABEAgABAiCyAVBEAgFSAaRwRAA0AgGkEQayIAKAIAIgEEQCABECILIABBADYCACAaQQxrQgA3AgAgGkEgaygCACIABEAgABAiCyAVIBpBQGoiGkcNAAsLIBUQIgsgBCgCkAQiAARAIAAQIgsgBCgCyAQiAARAIAAQIgsgBCgC2AQiAARAIAAQIgsgBCgC6AQiAARAIAAQIgsgBCgC+AQiAARAIAAQIgsgBEGACGokAAvHAQECfyACIAJBA20iAkEDbGsiAyABIAIQ2AMiBEYEQCAAQX82AgggAEJ/NwIADwsgBEEASARAIAAgAzYCBCAAIAI2AgAgAEEEQQggA0EBRhtBACADG0GUlQFqKAIANgIIDwsgACABKAJoIAJBDGxqIARBAnRqKAIAQQNtIgEgAiABIAJIIgEbNgIAIABBBEEIIARBAUYbQQAgBBtBlJUBaigCACICIANHQQJBAyACIANGGyABGyIBNgIEIAAgAUEBakEDcTYCCAufAwEGfyMAQSBrIgMkACADQX82AhwgA0F/NgIYIANBfzYCFCADQX82AhAgA0ECNgIMIANCgICAgBA3AgQgAkEDbCEGA0AgA0EEaiAFaigCACIHIAZqIQggA0EcaiEEAkACQAJAAkAgBw4DAwABAgsgA0EYaiEEDAILIANBFGohBAwBCyADQRBqIQQLIAQgCDYCACAFQQRqIgVBDEcNAAsCQCAAAn8gASACENgDIg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FqIAAgDiAAKAJYIARBAnRqKAIAQRhsaiAEEOcBCyAGIARBBXRqIgUgAykDsAE3AxggBSADKQOoATcDECAFIAMpA6ABNwMIIAUgAykDmAE3AwAgBEEBaiIEIApHDQALCyAPIANBiAFqRwRAIA8oAgAiBARAIAQQIgsgACADKAKIATYCuAEgACADKAKMATYCvAEgACADKAKQATYCwAEgA0EANgKQASADQgA3AogBCyACBEAgAi0AEEEBRgRAIABBDhAsDAILIAIgAigCDEEBajYCDAsgACgCXCIEQQNPBEBBACEFA0AgAygCWCAFai0AAEEBRgRAIANBAjYCECADQoCAgIAQNwIIIAVBA2whB0EAIQQDQAJAAkAgACgCaCADQQhqIARqKAIAIAdqIghBAnRqKAIAQQNtIgYgAygCWGotAABBAUcNACAAKALYASIJIAVBBHRqIgooAgAgCSAGQQR0aiIGKAIARw0AIAooAgwgBigCDEcNACAKKAIIIAYoAghGDQELIANCADcDoAEgAyAINgKYASABIANBmAFqEEwLIARBBGoiBEEMRw0ACyAAKAJcIQQLIAVBAWoiBSAEQQNuSQ0ACwsgAgRAIAItABAEQCAAQQ4QLAwCCyACIAIoAgxBAWo2AgwLIANCADcCQCADIANBQGsiCjYCPAJAAkAgASgCACIHIAEoAgQiD0cEQANAAkAgBysDCCIWRAAAAAAAAPA/Zg0AIAcoAgQhDCADIAcoAgAiCCAIQQJ0IgEgACgCaGooAgAiDSAAKAJYIAFqIgEoAgAiECABQXhBBCAIQQNvQQJGG2ooAgAiEUgiEhsiCTYCMCAKIQECQAJAIAMoAkAiBUUNAANAIAEiBCAFIgYgBSgCECAJSCILGyEBIAVBBEEAIAsbaigCACIFDQALIAEgCkYNACAJIAQgBiALGygCEE4NAQsgAyADQTBqIgE2AgggA0GYAWoiBSADQTxqIgYgASADQQhqIgkQ5AEgAygCmAEiBEKAgICAgICA+D83AzAgBCANNgIoIAQgFjkDICAEIAw2AhwgBCAINgIYIBINASADIAE2AgggBSAGIAEgCRDkASADKAKYASEEIAMgATYCCCAFIAYgASAJEO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gCECACSCIJGyEFIARBBEEAIAkbaigCACIEDQALIAUgCEYNACACIAUoAhBODQELIAMgA0HMAGoiBTYCWCADIAdBzAFqIAUgA0HYAGoiBhB5IAMoAgAhBCMAQaACayICJAAgAiAEKQNINwNwIAIgBCkDQDcDaCACIAQpAzg3A2AgAiAEKQNQNwN4IAIgBCkDWDcDgAEgAiAEKQNgNwOIASACIAQpAyA3A0ggAiAEKQMoNwNQIAIgBCkDMDcDWCACQZABaiACQcgAahCQASACIAIrA9ABOQOYAiACIAIrA7gBOQOQAiACIAIrA6ABOQOIAiACIAIrA8gBOQOAAiACIAIrA7ABOQP4ASACIAIrA5gBOQPwASACIAIrA8ABOQPoASACIAIrA6gBOQPgASACIAIrA5ABOQPYASACIAJB2AFqEJABIAIrAwAhCyACKwMIIQwgAisDECENIAIrAxghDiACKwMgIQ8gAisDKCEQIAIrAzAhESACKwM4IRIgA0QAAAAAAADwv0QAAAAAAADwPyAELQCAARsiCiACKwNAojkDQCADIAogEqI5AzggAyAKIBGiOQMwIAMgCiAQojkDKCADIAogD6I5AyAgAyAKIA6iOQMYIAMgCiANojkDECADIAogDKI5AwggAyAKIAuiOQMAIAJBoAJqJAAgASgCACECIAMgBTYCVCAGIAIgBSADQdQAahDtAyADKAJYQRhqIANByAD8CgAAIAEoAgAhBgsgAyADQcwAaiIBNgJYIAMgBiABIANB2ABqEO0DIAAgAygCAEEYakHIAPwKAAAgA0HgAGokAAuzAQEGfyMAQRBrIgIkACABKAJMIQMgAEEANgIIIABCADcCACAAIAMQJSAAIAM2AgQgASgCTCEDIAJBADYCCCACQgA3AgAgAiADQQAQgQEgASgCXCIDBEADQCABKAJYIARBAnRqKAIAIgUgAigCAGoiBi0AACAGQQE6AABBAUcEQCAAKAIAIAVBAnRqIAQ2AgALIARBAWoiBCADRw0ACwsgAigCACIABEAgABAiCyACQRBqJAALkwQCBn8CfSACKAIAIQYgAAJ/AkAgASgCBCIERQ0AIAEoAgACfyAEQQFrIAZxIARpIgVBAU0N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cCLCADQQA2AiQgA0IANwIcIAMgCigCSDYCLCADIAooAkw2AjAgA0IANwJEIANCADcCPCADQgA3AjRBBBAjIgFBATYCACADQQA2AogBIANCADcCgAEgA0EANgJ4IANCADcCcCADQQA2AmggA0IANwJgIANBADYCWCADQgA3AlAgAyABNgJMIANBADYC9AEgA0IANwLsASADQQA2AuQBIANCADcC3AEgA0EANgLUASADQgA3AswBIANBADYCxAEgA0IANwK8ASADQgA3A6gBIANCADcDsAEgA0H8AWpBAEEw/AsAIApBADYCQCAKQgA3AjhBACEFIwBBkAFrIgYkAAJAIAMoAjBFBEBBBBAjIgFBATYCACAKIAE2AgwgBkEANgKEASAKQQA2AgggCkIANwIAIAZBADYCgAEgBkIANwJ4IApBADYCGCAKQgA3AhAMAQsgBkEANgKMASAGQgA3AoQBIAZCADcCfCADKAIwIhRBAk8EQEEBIQEgAygCLCIJKwMQIiMhJiAJKwMAIiQhJSAJKwMIIichIQNAAkAgJCAJIAFBGGxqIg8rAwAiImMEQCABIQggIiEkDAELICIgJWNFDQAgASEFICIhJQsCQCAnIA8rAwgiImMEQCABIQQgIiEnDAELICEgImRFDQAgASELICIhIQsCQCAmIA8rAxAiImMEQCABIQwgIiEmDAELICIgI2NFDQAgASEHICIhIwsgAUEBaiIBIBRHDQALIAYgCzYChAEgBiAFNgJ8IAYgBzYCjAEgBiAENgKAASAGIAw2AogBCyAGIAg2AnggAyAGKQKIATcCoAEgAyAGKQKAATcCmAEgAyAGKQJ4NwKQASADQZABaiEBIAMoAiwhBQNAIAUgASANQQJ0IgRqKAIAQRhsaiAEQXhxaisDAJkiISAoICEgKGQbISggDUEBaiINQQZHDQALQQAhDSADQQA6ABggAyAoOQMQIAMgKERIr7ya8td6PqIiITkDACADICEgIaI5AwgjAEEQayIPJAAgA0EANgLQASADQcwBaiIcEC0gA0EANgLgASADQdwBaiIXEC0gA0EANgLwASADQewBaiIUEJQBQQAhBEEAIQFBACELQQAhDCMAQSBrIgckAAJAIAMoAjAiBUEETQR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KAIANgIAIAUgC2ogBCgCCDYCACAFIAhqIAQoAgw2AgAgAUEBaiIBIAdHDQALCyAAQdgAaiAKEP0DIApBIGoQSSAKQRBqEEkgChBJAkACQCACBEAgAi0AEEEBRgRAIABBDhAsDAMLIAAQWCAAQQAQjQEgABCOASAAIAIQVCACLQAQQQFHDQEgAEEOECwMAgsgABBYIABBABCNASAAEI4BIABBABBUCyAAEFoLIAooAjgiAARAIAAQIgsjAEEQayIAJAAgACADQaACajYCBCAAQQRqEPwDIANBiAJqIgJBADYCFCACKAIIIgUgAigCBCIBa0ECdSIEQQNPBEADQCABKAIAECIgAiACKAIEQQRqIgE2AgQgAigCCCIFIAFrQQJ1IgRBAksNAAsLQYAEIQcCQAJAAkAgBEEBaw4CAQACC0GACCEHCyACIAc2AhALIAEgBUcEQANAIAEoAgAQIiABQQRqIgEgBUcNAAsLIAIQUyAAIANB/AFqNgIIIABBCGoQ/AMgAygC7AEiAQRAIAEQIgsgA0EANgL0ASADQgA3AuwBIAMoAtwBIgEEQCABECILIANBADYC5AEgA0IANwLcASADKALMASIBBEAgARAiCyADQQA2AtQBIANCADcCzAEgAygCvAEiAQRAIAEQIgsgA0EANgLEASADQgA3ArwBIAMoAqwBIgEEQCABECILIANBADYCtAEgA0IANwKsASADKAKAASIBBEAgARAiCyADQQA2AogBIANCADcDgAEgAygCcCIBBEAgARAiCyADQQA2AnggA0IANwNwIAMoAmAiAQRAIAEQIgsgA0EANgJoIANCADcDYCADKAJQIgEEQCABECILIANBADYCWCADQgA3A1AgA0FAaxBJIAAgA0E0ajYCDCAAKAIMIgEoAgAiAgRAIAEgAhCBBCAAKAIMIgEoAgAgASgCCBoQIgsgAygCHCIBBEAgARAiCyAAQRBqJAALIApBgANqJAALwAMCB38BfAJAIAErAyAgASsDCCAAKAIsIAJBGGxqIgQrAwCiRAAAAAAAAAAAoCABKwMQIAQrAwiioCABKwMYIAQrAxCioKAiCkQAAAAAAAAAAGRFDQAgCiAKoiAAKwMIIAErAyiiZE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AAAAAAAAAAAY0Vycg0CIAogCSAHIAcgCWMiGRtkDQAgGUUMAQtBAgshGUEBIRogECAEoiAMIAaioSAAIBlBGGxqIgArAwAiByASoaJEAAAAAAAAAACgIA0gBqIgECAIoqEgACsDCCIJIBOhoqAgDCAIoiANIASioSAAKwMQIgogFKGioEQAAAAAAAAAAGRFDQAgDyAEoiALIAaioSAHIAErAxihokQAAAAAAAAAAKAgDiAGoiAPIAiioSAJIAErAyChoqAgCyAIoiAOIASioSAKIAErAyihoqBEAAAAAAAAAABkRQ0AIAogASsDQKEgCCACKwNoIguiIAQgAisDYCINoqGiIAcgASsDMKEgBCACKwNwIgyiIAYgC6KhokQAAAAAAAAAAKAgCSABKwM4oSAGIA2iIAggDKKhoqCgRAAAAAAAAAAAZEUNACAKIAogBiACQRhqQQhBECAZQQFGG0EAIBkbaisDACIFoiARo6ChIgYgBqIgByAHIAggBaIgEaOgoSIGIAaiIAkgCSAEIAWiIBGjoKEiBSAFoqCgIQUMAQsgBUQAAAAAAAAAACAaQQFxGyEFCyACQcABaiQAIAMgBSADKwMAIgYgBSAGYxs5AwAgHkGgAWokAAuQAQECf0EBIQEgACgCTCICBEAgACgCSCIAIAJBGGxqIQIDQCABIAApAwBC////////////AINCgICAgICAgPj/AFQgACkDCEL///////////8Ag0KAgICAgICA+P8AVHEgACkDEEL///////////8Ag0KAgICAgICA+P8AVHFxIQEgAEEYaiIAIAJHDQALCyABC7ICAgt8Bn8gACgCXCIOQQNPBHwgDkEDbiESIAAoAkghDyAAKAJYIQ5BACEAIAFBAUchAQNAIA8gDiAAQQxsaiINKAIEQRhsaiIQKwMAIA8gDSgCAEEYbGoiESsDACIHoSIEIA8gDSgCCEEYbGoiDSsDCCARKwMIIgihIgqiIBArAwggCKEiCyANKwMAIAehIgKioSEGIBArAxAgESsDECIJoSIMIAKiIAQgDSsDECAJoSICoqEhBCALIAKiIAwgCqKhIQIgBSABBHwgCSAGoiAIIASiIAcgAqJEAAAAAAAAAACgoKBEAAAA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IAQoAiAiAQRAIAQgATYCJCAEKAIoGiABECILIAQoAhgQ3gIgBCgCCCIBRQ0AIAQgATYCDCAEKAIQGiABECILIAAgAjkDECASEIkEIBJBABBwIARBkAJqJAALiwEBA38jAEEQayICJABBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQahA7IQMgAUEONgJUIAIgATYCDCACIAM2AgggASABKAIEQQFqNgIEIAIgAikCCDcDACAAIAIQSBogASABKAIEIgBBAWs2AgQgAEUEQCABIAEoAgAoAggRAAAgARAkCyACQRBqJAALwgEBA38jAEEgayIEJAACQCAAKAIIIAAoAgAiAmtBGG0gAUkEQCABQavVqtUATw0BIARBDGogASAAKAIEIAJrQRhtIAAQZCEBIAAoAgAiAiAAKAIEIgMgASgCBCADIAJrQWhtQRhsaiIDEKUCIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQpAILIARBIGokAA8LECYAC4whAxJ/FXwBfiMAQZADayIFJAACQAJAAkAgBEUNACAELQAQQQFHDQBBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQahA7IQIgAUEONgJUIAUgATYCjAEgBSACNgKIASABIAEoAgRBAWo2AgQgBSAFKQKIATcDKCAAIAVBKGoQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgARCFBCEHAn8gAhCFBCILIAdFckUEQCABIQZBAQwBCyACIQYgASECIAchCSALCyEMIAYoAlxBAk0EQEGoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAIQNyECIAUgATYChAEgBSACNgKAASABIAEoAgRBAWo2AgQgBSAFKQKAATcDACAAIAUQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgAigCXCEIQagCECMiD0GgkAI2AgAgD0IANwIEIA9BEGohAQJAIAhBAk0EQCABIAYQNyEBIAUgDzYCfCAFIAE2AnggDyAPKAIEQQFqNgIEIAUgBSkC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IAIANBBEEAIAIbaiEDIARBBGohBCAAQQBBBCACG2oiACAFRw0ACyABIANGDQIDQCAEIAMoAgA2AgAgBEEEaiEEIANBBGoiAyABRw0ACwwCCyAAIAVGDQEDQCAEIAAoAgA2AgAgBEEEaiEEIABBBGoiACAFRw0ACwwBCyAEIAAoAgA2AgALC+QEAQN/AkACQAJAAkACQCACDgMEAgABCyABQRBrIgErAwAgACsDAGQEQCADIAEpAwg3AwggAyABKQMANwMAIAMgACkDCDcDGCADIAApAwA3AxAPCyADIAApAwg3AwggAyAAKQMANwMAIAMgASkDCDcDGCADIAEpAwA3AxAPCyACQQhMBEAgACABRg0DIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiIEIAFGDQMgAyEFA0AgBSICQRBqIgUhAAJAIAQrAwAgAisDAGRFDQAgBSACKQMINwMIIAUgAikDADcDACADIQAgAiADRg0AA0AgBCsDACACQRBrIgArAwBkRQRAIAIhAAwCCyACIAApAwg3AwggAiAAKQMANwMAIAAiAiADRw0ACyADIQALIAAgBCkDCDcDCCAAIAQpAwA3AwAgBEEQaiIEIAFHDQALDAMLIAAgACACQQF2IgRBBHQiBmoiBSAEIAMgBBDFASAFIAEgAiAEayICIAMgBmogAhDFASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMINwMIIAMgACkDADcDACADQRBqIQMgAEEQaiIAIAVHDQALDAQLAkAgAisDACAAKwMAZARAIAMgAikDCDcDCCADIAIpAwA3AwAgAkEQaiECDAELIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiEACyADQRBqIQMgACAFRw0ACwwBCyADIAApAwg3AwggAyAAKQMANwMADAELIAEgAkYNAANAIAMgAikDCDcDCCADIAIpAwA3AwAgA0EQaiEDIAJBEGoiAiABRw0ACwsLbAEBfyAAKAIIIgFFBEBBAA8LAkAgACABKAIAIgBGBEAgAUEANgIAA0AgASgCBCIARQ0CA0AgACIBKAIAIgANAAsMAAsACyABQQA2AgQgAEUNAANAIAAiASgCACIADQAgASgCBCI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gICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASADQQA2AuwBIANCADcC5AEgA0EANgLgASADQgA3AtgBAkACQAJAAkAgAQ4DAAECAwsgA0EYaiIBQYD5AEHgAPwKAAAgA0HkAWogASADQfgAakEEEPECIAFB4PkAQTD8CgAAIANB2AFqIAEgA0HIAGpBBBDwAgwCCyADQRhqIgFBkPoAQcAB/AoAACADQeQBaiABIANB2AFqIgVBCBDxAiABQdD7AEGQAfwKAAAgBSABIANBqAFqQQwQ8AIMAQsgA0EYaiIBQeD8AEGQAfwKAAAgA0HkAWogASADQagBakEGEPECIAFB8P0AQeAA/AoAACADQdgBaiABIANB+ABqQQgQ8AILIAMoAugBIgYgAygC5AEiBWsiAUEYbSEHAkAgBSAGRiIGDQAgARAnIQQgAUUNACAEIAUgAfwKAAALIAAoAkgiBQRAIAUQIgsgACAHNgJQIAAgBzYCTCAAIAQ2AkggBkUEQCABIARqIQEDQCADIAQrAwA5AxggAyAEKwMIOQMgIAQrAxAhCCADQoCAgICAgID4PzcDMCADIAg5AyggAyACIANBGGoQoQEgBCADKQMQNwMQIAQgAykDCDcDCCAEIAMpAwA3AwAgBEEYaiIEIAFHDQALCyADQQA2AhggAyADKALcASIFIAMoAtgBIgJrIgFBDG0iBDYCICADIAQ2AhxBACEEAkAgAiAFRg0AIAMgARAnIgQ2AhggAUUNACAEIAIgAfwKAA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AyAgASsDKCEFIANCgICAgICAgPg/NwMwIAMgBTkDKCADIAIgBBChASADKwM4IQUgAysDACEGIAMrA0AhByADKwMIIQggACADKwMQIgkgAysDSCIKIAkgCmQiARs5AyggACAIIAcgByAIYyICGzkDICAAIAYgBSAFIAZjIgQbOQMYIAAgCiAJIAEbOQMQIAAgByAIIAIbOQMIIAAgBSAGIAQbOQMAIANB0ABqJAALdAECfyMAQRBrIgIkAEGgARAjIgNBgJQCNgIAIANCADcCBCACIAEoAgA2AgggAiABKAIENgIMIAFCADcCACACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgACADNgIEIAAgATYCACAAIANBFGogARCPASACQRBqJAAL9AQCDn8GfCMAQYABayICJAAgASgCDCEDIAJCADcDICACQoCAgICAgID4PzcDGCACQgA3AyggAkIANwMwIAJCADcDQCACQoCAgICAgID4PzcDOCACQgA3A0ggAkIANwNQIAJCADcDYCACQoCAgICAgID4PzcDWCACQgA3A2ggAkIANwNwIAIgAUEYaiIHIAJBGGoQygECQCACKwMAIAIrAwhhBEAgACADQTD8CgAADAELIAIgASkDcDcDKCACIAEpA2g3AyAgAiABKQNgNwMYIAIgASkDcDcDECACIAEpA2g3AwggAiABKQNgNwMAIAFByABqIQggAUEwaiEJIANBGGohCgNAIAhBCEEQIAVBAUYbQQAgBRsiBGohCyAEIAdqIQwgBCAJaiENIAIgBGoiDisDACERIAJBGGogBGoiDysDACESQQAhAQNAIBECfwJAAkACQCABDgIAAQILIAwrAwAgAysDAKIhEEEAIQYgBwwCCyANKwMAIAMrAwiiIRBBCCEGIAkMAQsgCysDACADKwMQoiEQQRAhBiAICyAEaisDACAGIApqKwMAoiITIBAgECATYxugIREgEiATIBAgECATZBugIRIgAUEBaiIBQQNHDQALIA8gEjkDACAOIBE5AwAgBUEBaiIFQQNHDQALIAIrAwAhECACKwMYIREgAisDCCESIAIrAyAhEyAAIAIrAxAiFCACKwMoIhUgFCAVZCIBGzkDKCAAIBIgEyASIBNkIgMbOQMgIAAgECARIBAgEWQiBBs5AxggACAVIBQgARs5AxAgACATIBIgAxs5AwggACARIBAgBBs5AwALIAJBgAFqJAAL/AMCBX8MfCMAQfABayIDJAAgASsDGCEIIAErAyAhCSABKwMoIQogASsDMCELIAErAzghDCABKwNAIQ0gASsDSCEOIAErA1AhDyABKwNYIRAgASsDYCERIAErA2ghEiABKwNwIRMgA0KAgICAgICA+D83A3ggAyATOQNwIAMgEjkDaCADIBE5A2AgA0IANwNYIAMgEDkDUCADIA85A0ggAyAOOQNAIANCADcDOCADIA05AzAgAyAMOQMoIAMgCzkDICADQgA3AxggAyAKOQMQIAMgCTkDCCADIAg5AwAgA0GAAWoiBCACIAMQ8AEjAEHwAGsiAiQAQaABECMiBUGAlAI2AgAgBUIANwIEIAIgASgCDDYCaCACIAEoAhAiATYCbCABBEAgASABKAIEQQFqNgIECyADQeQBaiEGIAIgAikCaDcDYCACIARB4AD8CgAAIAVBEGoiAUIANwIEIAFBmJICNgIAIAEgAkHgAGoiBygCADYCDCABIAcoAgQiBDYCECAEBEAgBCAEKAIEQQFqNgIECyABQRhqIAJB4AD8CgAAIAFCADcDiAEgAUIANwOAASABQgA3A3ggBxAvGiAGIAU2AgQgBiABNgIAIAYgBUEUaiABEI8BIAJB8ABqJAAgACADKALkATYCACAAIAMoAugBNgIEIANB8AFqJAAL2QIBBH8jAEEwayIEJAAgBCADOgAbIARBADYCFCAEQgA3AgwgBEEEaiABQQRqEJsCIQMgBEEcakEBQQAgBEEMahBLIgEoAggiBSADKAIANgIAIAUgAygCBDYCBCADQgA3AgAgASAFQQhqNgIIIAEoAgQgBCgCECAEKAIMIgdrIgVrIQYgBQRAIAYgByAF/AoAAAsgBCgCDCEFIAQgBjYCDCABIAU2AgQgBCABKAIIIgY2AhAgASAFNgIIIAQoAhQhByAEIAEoAgw2AhQgASAFNgIAIAEgBzYCDCABEG4gAygCBCEBIAQgBjYCEAJAIAFFDQAgASABKAIEIgNBAWs2AgQgAw0AIAEgASgCACgCCBEAACABECQLIARBDGoiASACEP8CIARBHGoiAiABIARBG2oQgAMgACAEKAIcNgIAIAAgBCgCIDYCBCAEIAE2AhwgAhBlIARBMGokAAvgBgIDfwJ8AkACQAJAAkACQCACDgMEAgABCwJAIAFBGGsiAisDACIHIAArAwAiCGNFBEAgByAIYg0BIAFBDGsoAgAgACgCDE4NAQsgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgAyAAKQMANwMYIAMgACkDCDcDICADIAApAxA3AygPCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACADIAIpAwA3AxggAyACKQMINwMgIAMgAikDEDcDKA8LIAJBCEoNASAAIAFGDQIgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiICIAFGDQIgAyEFA0AgACEGIAIhACAFIgJBGGohBQJ/IAYrAxgiByACKwMAIghjRQRAIAUiBCAHIAhiDQEaIAQgBigCJCACKAIMTg0BGgsgBSACKQMQNwMQIAUgAikDCDcDCCAFIAIpAwA3AwAgAyACIANGDQAaAkADQCAAKwMAIgcgAkEYayIEKwMAIghjRQRAIAcgCGINAiAGKAIkIAJBDGsoAgBODQILIAIgBCkDEDcDECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADDAELIAILIgQgACkDEDcDECAEIAApAwg3AwggBCAAKQMANwMAIABBGGoiAiABRw0ACwwCCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyAAIAAgAkEBdiIFQRhsIgZqIgQgBSADIAUQywEgBCABIAIgBWsiAiADIAZqIAIQywEgBCECA0AgASACRgRAIAAgBEYNAgNAIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIANBGGohAyAAQRhqIgAgBEcNAAsMAgsCQAJAIAIrAwAiByAAKwMAIghjRQRAIAcgCGINASACKAIMIAAoAgxODQELIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAJBGGohAgwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIQALI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cDECADIAEpAwg3AwggAyABKQMANwMAIAIoAgQgACgCBCAAKAIAIgRrIgFBaG1BGGxqIQUgAQRAIAUgBCAB/AoAAAsgACgCACEEIAAgBTYCACACIAQ2AgQgACADQRhqIgE2AgQgAiAENgIIIAAoAgghAyAAIAIoAgw2AgggAiAENgIAIAIgAzYCDCACEIwBCyAAIAE2AgQgBkEgaiQADwsQJgALkwEBA38gACgCGCgCACABQQN0aiICKAIEIQMgACgCCCACKAIAQQJ0aiICIAAoAhAgAUECdGooAgAiASABQR91IgFzIAFrIgEgAigCAGo2AgAgACgCACICIANBA21BAnRqIgQgBCgCACABajYCACACIAAoAhwoAhAgA0ECdGooAgBBA21BAnRqIgAgACgCACABajYCAAuTAQEDfyAAKAIYKAIAIAFBA3RqIgIoAgAhAyAAKAIIIAIoAgRBAnRqIgIgACgCECABQQJ0aigCACIBIAFBH3UiAXMgAWsiASACKAIAajYCACAAKAIAIgIgA0EDbUECdGoiBCAEKAIAIAFqNgIAIAIgACgCHCgCECADQQJ0aigCAEEDbUECdGoiACAAKAIAIAFqNgIAC6gBAQN/IwBBIGsiAyQAAkAgAQRAIAEtABAgAEVyDQEDQCAFQQFqIgVBgAhGBEBBACEFIAEtABANAwsgAiAEEOEEIARBAWoiBCAARw0ACwwBCyADIAIoAgA2AgwgAyACKAIENgIQIAMgAigCCDYCFCADIAIoAgw2AhggAyACKAIQNgIcIABFDQADQCADQQxqIAQQ4QQgBEEBaiIEIABHDQALCyADQSBqJAAL7gECBX8BfgJAAkAgACgCBCICRQRAIABBBGoiBCEDDAELIAEoAgQhBSABKAIAIQYDQAJAAkAgAiIDKAIQIgQgBkwEQCAEIAZIDQIgBSACKAIUIgJODQELIAMhBCADKAIAIgINAgwDCyACIAVIDQAgAyECDAMLIAMoAgQiAg0ACyADQQRqIQQLQSQQIyECIAEpAgAhByACQQA2AiAgAkIANwIYIAIgBzcCECACIAM2AgggAkIANwIAIAQgAjYCACAAKAIAKAIAIgEEQCAAIAE2AgALIAAoA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IAUrAxghFSAFKwMICyIUvUL///////////8Ag0L/////////9/8AVg0AAkAgBCgCBCIBIAQoAggiBk8EQCAEIAZBAXRBgAEgBhsQRCAEIAQoAgQiAUEBajYCBAwBCyAEIAFBAWo2AgQLIAQoAgAgAUEDdGogDq0gA61CIIaENwIAIARBEGohAwJAIAQoAhQiASAEKAIYIgZPBEAgAyAGQQF0QYABIAYbECUgBCgCECAEKAIUIgFBAnRqIAA2AgAMAQsgAygCACABQQJ0aiAANgIACyAEIAFBAWo2AhQgBEEgaiEAAn8gBCgCJCIIIAQoAigiAU8EQCAAIAFBAXRBgAEgARsQMyAEKAIgIAQoAiQiCEEYbGoMAQsgACgCACAIQRhsagsiASAUOQMAIAQgCEEBajYCJCABIBY5AxAgASAVOQMICyACQYGAgIB4cUEBRiEGCyAFQdABaiQAIAYLwwYBCX8CQAJAAkACQAJAIAMOAwQCAAELAkAgAigCACgCACIDIAFBBGsiASgCACIGQQN0aiIHIAIoAgQoAgAiAkECdCIFaigCACILIAUgAyAAKAIAIgVBA3RqIgNqKAIAIglOBEAgCSALRw0BIAdBASACa0ECdCICaigCACACIANqKAIATg0BCyAEIAY2AgAgBCAAKAIANgIEDwsgBCAFNgIAIAQgASgCADYCBA8LIANBCEoNASAAIAFGDQIgBCAAKAIANgIAIABBBGoiBiABRg0CQQEgAigCBCgCACIAayELIAIoAgAoAgAhByAAQQJ0IQUgBCEAA0AgAEEEaiECAkACfwJAAkAgByAGKAIAIgNBA3RqIgkgBWooAgAiCCAHIAAoAgAiCkEDdGoiDCAFaigCACINTgRAIAggDUcNASAJIAtBAnQiCGooAgAgCCAMaigCAE4NAQsgACAKNgIEIAQgACAERg0CGgNAIAcgBigCAEEDdGoiCSAFaigCACIIIAcgAEEEayIDKAIAIgpBA3RqIgwgBWooAgAiDU4EQCAIIA1HDQMgCSALQQJ0IghqKAIAIAggDGooAgBODQMLIAAgCjYCACADIgAgBEcNAAsgBAwCCyACIAM2AgAMAgsgAAsgBigCADYCAAsgAiEAIAZBBGoiBiABRw0ACwwCCyAEIAAoAgA2AgAMAQsgACAAIANBAXYiB0ECdCIFaiIGIAIgByAEIAcQ0gEgBiABIAIgAyAHayIDIAQgBWogAxDSASACKAIEIQcgAigCACECIAYhAwNAIAEgA0YEQCAAIAZGDQIDQCAEIAAoAgA2AgAgBEEEaiEEIABBBGoiACAGRw0ACwwCCwJAAkAgAigCACIFIAMoAgAiC0EDdGoiCSAHKAIAIghBAnQiCmooAgAiDCAKIAUgACgCACIKQQN0aiIFaigCACINTgRAIAwgDUcNASAJQQEgCGtBAnQiCGooAgAgBSAIaigCAE4NAQsgBCALNgIAIANBBGohAwwBCyAEIAo2AgAgAEEEaiEACyAEQQRqIQQgACAGRw0ACyABIANGDQADQCAEIAMoAgA2AgAgBEEEaiEEIANBBGoiAyABRw0ACwsL6gwDDHwRfwF+IwBBkAFrIhQkACAUQeAAakEAQTD8CwAgFEEwakEAQTD8CwAgFCAENgIsIBQgAzYCKCAUQoCAgIAQNwIAIAEoAgQiGigCSCIfIAdBGGwiFWoiICsDACILIB8gBkEYbCIXaiIhKwMAIgyhIQ4gBUEDbSEiIBooApgBIiMgFWorAwAhDyAXICNqKwMAIRAgASgCACIbKAKYASEcIBsoAkghHUEAIQFBACEXA0ACfyAPIBwgFEEoaiAUIBdqKAIAIh5BAnRqKAIAQRhsIhVqKwMAmiIJZCAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAmiEPIAMgHGorAwCaIRBBACEXA0ACfyAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJIBBkIAwgAyAfaiIDKwMAIghjIAggDGEbIAkgD2QgCCALZCAIIAthG2siHEUEQEQAAAAAAAD4fyEJRAAAAAAAAPh/IQpBAAwBCyAGKwMQIQogBisDCCEJAkAgCCAMoSINIAggC6EiCCANmSAImWMiFRsgDqMiCL1C////////////AINC//////////f/AFYNACAEKwMIIg0gCaEiEb1C////////////AINCgICAgICAgPj/AFoNACAEKwMQIhIgCqEiE71C////////////AINCgICAgICAgPj/AFoNACAKIBIgFRsgCCAToqAhCiAJIA0gFRsgCCARoqAhCQsgHEEAIBsoAqgBIhUgB0EYbGorAwggFSAbKAJoIAJBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAkgAysDCCIIYyAIIAlhGxsLIRUCQCAJvUL///////////8Ag0L/////////9/8AVg0AIBVBACAVayAYGyAZaiEZIAFBAUoEQEECIQEMAQsgAUUgFUUgFnNFckUEQEEBIQEMAQsgAUEYbCIYIBRBMGpqIhYgAykDACIlNwMAIBYgAykDEDcDECAWIAMpAwg3AwggFEHgAGogGGoiAyAJOQMIIAMgCjkDECADICU3AwAgAUEBaiEBIBVBAEchFgsgF0E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FEKAgICAEDcCACABKAIEIhooAkgiHyAHQRhsIhVqIiArAwAiCyAfIAZBGGwiF2oiISsDACIMoSEOIAVBA20hIiAaKAKYASIjIBVqKwMAIQ8gFyAjaisDACEQIAEoAgAiGygCmAEhHCAbKAJIIR1BACEBQQAhFwNAAn8gHCAUQShqIBQgF2ooAgAiHkECdGooAgBBGGwiFWorAwAiCSAPYyAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAIQ8gAyAcaisDACEQQQAhFwNAAn8gECAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJYyAMIAMgH2oiAysDACIIYyAIIAxhGyAJIA9kIAggC2QgCCALYRtrIhxFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgBisDECEKIAYrAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgBCsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgBCsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLIBxBACAbKAKoASIVIAdBGGxqKwMIIBUgGygCaCACQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAJIAMrAwgiCGMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgGBsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiGCAUQTBqaiIWIAMpAwAiJTcDACAWIAMpAxA3AxAgFiADKQMINwMIIBRB4ABqIBhqIgMgCTkDCCADIAo5AxAgAyAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACwJ/IBlFBEBEAAAAAAAA+H8hCEQAAAAAAAD4fyELRAAAAAAAAPh/IQpEAAAAAAAA+H8hCUEADAELIBQgFEHgAGogFEH4AGogFEEwaiAUQcgAahDOASAUKwMIIQsgFCsDACEIIBlBACAbKAKoASIBIAdBGGxqKwMQIAEgGygCaCACQQJ0aigCAEEDbUEYbGorAxCgIBooAqgBIgEgIkEYbGorAxAgASAaKAJoIAVBAnRqKAIAQQNtQRhsaisDEKBjIBQrAxAiCiAUKwMYIgljIAkgCmEbGwshASAAIAk5AyAgACAKOQMYIAAgCzkDECAAIAg5AwggACABNgIAIBRBkAFqJAALoAsDD38DfAN+IwBB0AFrIgUkAAJAIAAoAgQgAkEwbGoiCCsDACABKwMYZUUNACAIKwMIIAErAyBlRQ0AIAgrAxAgASsDKGVFDQAgCCsDGCABKwMAZkUNACAIKwMgIAErAwhmRQ0AIAgrAyggASsDEGZFDQACQCACQQFxDQAgACgCFCgC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EaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQiAMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAms2AgALIApBgYCAgHhxQQFGCyEHAkAgGSAWIAVBMGxqIgArAxhlRQ0AIBkgACsDAGZFDQAgGCAAKwMgZUUNACAYIAArAwhmRQ0AAkAgBUEBcQ0AIAgoAgQoAgAgFWooAgAhCyAIKAIAIg4oAgQhACACQQI2AogCIAJCgICAgBA3AoACIAAoAlgiDyAFQQF1IhAgBWoiEUECdGohEiAAKAJoIRNBACEBA0BBASEMAkAgDyACQYACaiABaigCACIGIBFqIg1BAnQiBGooAgAiACASQQRBCCAGQQFGG0EAIAYbQYzpAGooAgBBAnRqKAIAIgNIBEAgACEEIAMhAAwBCyAEIBNqKAIAIQ1BACEMIAMhBAsgAkGQAmoiFCAGQQR0aiIDIAw6AAwgAyAANgIIIAMgBDYCBCADIA02AgAgAUEEaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQiAMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAms2AgALIAVBgYCAgHhxQQFGIQYLAkAgBiAHckUEQCAJQQBIDQEgAiAJQQJ0aigCACEAIAlBAWshCQwCCyAKIAUgBxshACAHRSAGRXINASACIAlBAWoiCUECdGogBTYCAAwBCwsgAkHAAmokAAuQCAIWfwJ8IwBBwAJrIgIkACAAKAIAIgQoAgAoAkggAUECdCIVIAQoAgQoAgBqKAIAQRhsaiIBKwMIIRggASsDACEZIAAoAgQhFiAAKAIMIRcgACgCFCgCACEIQQEhAEF/IQkDQCAXIABBAWtBAm1BA3RqIgAoAgQhBUEAIQYCf0EAIBkgFiAAKAIAIgpBMGxqIgArAxhlRQ0AGkEAIBkgACsDAGZFDQAaQQAgGCAAKwMgZUUNABpBACAYIAArAwhmRQ0AGgJAIApBAXENACAIKAIEKAIAIBVqKAIAIQsgCCgCACIOKAIEIQAgAkECNgKIAiACQo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ANByBk2AgggA0HnAzYCBCADQccONgIAEK4CAAsFAEHkDQsrAQF/IwBBQGoiAiQAIAIgASAAEQEAQcAAECMgAhBAIAIQQRogAkFAayQACwUAQZsQCy0BAX8jAEFAaiIDJAAgAyABIAIgABEWAEHAABAjIAMQQCADEEEaIANBQGskAAsEAEEAC0gBAX8jAEHQAGsiAyQAIAMgASkDADcDACADIAEpAwg3AwggA0EQaiIBIAMgAiAAEQMAQcAAECMgARBAIAEQQRogA0HQAGokAAsEAEEAC1UBAn8jAEFAaiICJAAgASAAKAIEIgNBAXVqIQEgACgCACEAIAIgASADQQFxBH8gASgCACAAaigCAAUgAAsRAQBBwAAQIyACEEAgAhBBGiACQUBrJAALdQECfyMAQSBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEgECMiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBIGokACAAC7oBAQN/IwBBEGsiAyQAIAAoAgAhAiADIAEgACgCBCIAQQF1aiIBIABBAXEEfyABKAIAIAJqKAIABSACCxEBAEEMECMiAEEANgIIIABCADcCACADKAIEIgIhBCACIAMoAgAiAWtBBnUiAgRAIAAgAhCVAyAAKAIEIQIgASAERwRAA0AgAiABEEBBQGshAiABQUBrIgEgBEcNAAsLIAAgAjYCBAsgAyADNgIMIANBDGoQmAMgA0EQaiQAIAALVwECfyMAQUBqIgMkACABIAAoAgQiBEEBdWohASAAKAIAIQAgAyABIAIgBEEBcQR/IAEoAgAgAGooAgAFIAALEQsAQcAAECMgAxBAIAMQQRogA0FAayQACwsAIAAQaRogABAiC3MBAn8jAEHQAGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACAEQQFxBEAgASgCACAAaigCACEACyADIAIpAwg3AwggAyACKQMANwMAIANBEGoiAiABIAMgABEDAEHAABAjIAIQQCACEEEaIANB0ABqJAALJAECfiAAKQMAIAEpAwBTIAApAwgiAiABKQMIIgNVIAIgA1EbCwYAQYCcAgsUACAAQQRqQQAgASgCBEGhmAFGGwtPAQJ/AkAgASgCBCICBEAgASgCACIBIAJBBHRqIQMDQCAAKAIEKAIQIgJFDQIgAiABIAIoAgAoAhgRAQAgAUEQaiIBIANHDQALCw8LEGYACxUAIAFByJsCNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQcibAjYCACABIAAoAgQ2AgQgAQsQACAAKAIMIAAoAghrQQJ1CwoAIABBCGoQhAILZwEDfyAAKAIEIgMgACgCCCIBRwRAA0AgACABQQRrIgE2AgggASgCACECIAFBADYCACACBEAgAiACKAIAKAIEEQAAIAAoAgghAQsgASADRw0ACwsgACgCACIBBEAgACgCDBogARAiCwviBAMGfwF8AX4jAEEgayIGJAACf0EwECMhAyMAQSBrIgIkACADQQA2AiggA0IANwMgIANBADYCECADQgA3AwggAyAANgIEIANBmJsCNgIAAkACQCAARQRAIANCgICAgICAgPg/NwMYIAJBADYCDCACQgA3AgREAAAAAAAA8D8hCAwBCyADIAArAxgiCDkDGCACQQA2AgwgAkIANwIEIAhEAAAAAAAAAABhDQELIAJBBGogASgCBCABKAIAa0EEdRBcIAEoAgAiBCABKAIEIgFHBEADQCAEKQMAIQkgAiAIIAQpAwi5ojkDGCACIAggCbmiOQMQIAJBBGogAkEQahBMIARBEGoiBCABRw0ACwsgA0EgahBFIAMgAigCBDYCICADIAIoAgg2AiQgAyACKAIMNgIoIAJBIGokACADDAELQQIQggIACyEDAkACQCAAKAIMIgEgACgCECICSQRAIAEgAzYCACABQQRqIQMMAQsgASAAQQhqIgQoAgAiBWtBAnUiB0EBaiIBQYCAgIAETw0BIAZBDGpB/////wMgAiAFayICQQF1IgUgASABIAVJGyACQfz///8HTxsgByAEEEoiASgCCCICIAM2AgAgASACQQRqNgIIIAEoAgQgACgCDCAAKAIIIgJrIgNrIQQgAwRAIAQgAiAD/AoAAAsgACgCCCECIAAgBDYCCCABIAI2AgQgACABKAIIIgM2AgwgASACNgIIIAAoAhAhBCAAIAEoAg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4DQQFNBEAgAkHYAGoiAyABEEAaIABBwAAQIyIBNgIAIAAgAUFAayIENgIIIAEgAxBAGiAAIAQ2AgQgAxBBGgwBCyACQQA2AlAgAkIANwNIIAJCADcCNCACQgA3AiwgAkKAgICAgICA+D83A0AgAkGYmwI2AiggAkEgaiABEE0gAigCICEDIAJBADYCHCACQgA3AhQgAkEwahCEAiACQfAAakEAQegA/AsAIAJCADcDaCACQQI2AmQgAkIANwJcIAJB9ABqQQBBMPwLACACQagBakEAQST8CwAgAkEANgLgASACQgA3A9gBIAJBAToA1QEgAkEBOgDMASACQoCAgICAgICgPjcD8AEgAkKAgICAgICA0MEANwPoASACQfyaAjYCWCACQdgAaiIBIAMQmwEgASACQRRqIgMQ4QEgAkEANgKEAiACQgA3AvwBIAEgAkEoaiACQfwBaiIEEM0DIAIgBDYC+AEgAkH4AWoQKSABEGkaIAIgAzYCWCABECkCQCACKAIkIgFFDQAgASABKAIEIgNBAWs2AgQgAw0AIAEgASgCACgCCBEAACABECQLIAJBADYCHCACQgA3AhQgAkEoaiACQRRqQQAQxAIgAEEANgIIIABCADcCACACKAIYIAIoAhRrQQxtIQEjAEEgayIDJAACQAJAIAAoAgggACgCACIEa0EGdSABSQRAIAFBgICAIE8NASAAIANBDGogASAAKAIEIARrQQZ1IAAQqQEiARCnAiABEKYCCyADQSBqJAAMAQsQJgALIAIoAhgiAyACKAIURwRAA0BBGBAjIgFBtJoCNgIAIAFCADcCBCABQQxqIgQgA0EMayIDEFsgAiABNgIQIAIgBDYCDCACIAIpAgw3AwAgAkHYAGoiBCACEGoCQCAAKAIEIgEgACgCCCIFSQRAIAEgBBC0ARogAUFAayEBDAELIAEgACgCACIEa0EGdSIGQQFqIgFBgICAIE8NBCACQfwBakH///8fIAUgBGsiBEEFdSIFIAEgASAFSRsgBEHA////B08bIAYgABCpASEEIAIoAoQCIAJB2ABqELQBGiACIAIoAoQCQUBrNgKEAiAAIAQQpwIgACgCBCEBIAQQpgILIAAgATYCBCACQdgAahB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ASoaMiEqIgBCsDCEQAAAAAAADwPyASoSIVoqA5AzggASATIBKiIBQgFaKgOQMwIAFBsAJqIgUgAUEwahBMIAEgBigCaCAJaigCACIEQQNtIgM2ArwCQQRBCCAEIANBA2xrIgRBAUYbQQAgBBtB8PgAaigCACEEIAMgCEcNAAsgACAFEHYgASgCsAIiAwRAIAEgAzYCtAIgASgCuAIaIAMQIgsgASgCFA0ACwwBCyAAQQA2AgggAEIANwIACyABQQhqEJUBIAEoAiAiAARAIAAQIgsgAUHAAmokAAJAIAsoAgwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgC0EQaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBASADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBACADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC3EBA38jAEGQAWsiBCQAIARByABqIgUgARDkAiAEQRhqIgYgBUEw/AoAACAEIAIpAxA3AxAgBCACKQMINwMIIAQgAikDADcDACAEQfgAaiICIAYgBCADEJYEIAAgASACQQIQ6AEgAhAoGiAEQZABaiQAC8oDAgN/AX4jAEHQAGsiAyQAIANBxABqIAFBEGoQfyADQTxqIAEgAygCRBArECoCQCADKAI8IgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEIAFBEGogBBA3IQQgAyABNgI4IAMgBDYCNAJAIAEoAswBRQ0AIAMgApk5AyAgA0GslwI2AhggAyADQRhqIgU2AiggBCAFQQEgAygCRBDRAiAFIAMoAigiAUYEf0EQBSABRQ0BQRQLIQQgASABKAIAIARqKAIAEQAACyADQQhqIANBNGoQWSADIAMpAggiBjcCECADQgA3AgggAyAGNwMAIAAgAxBDAkAgAygCDCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADKAI4IgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCQCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAkgiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0HQAGokAAvCAwIEfwF+IwBB0ABrIgMkAEEQIQUgA0HEAGogAUEQahB/IANBPGogASADKAJEECsQKgJAIAMoAjwiBCgCRCIBBEAgACABEEYMAQtBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQaiAEEDchBCADIAE2AjggAyAENgI0IAMgApk5AyAgA0HslgI2AhggAyADQRhqIgY2AiggBCAGQQAgAygCRBDRAgJAIAYgAygCKCIBRwRAQRQhBSABRQ0BCyABIAEoAgAgBWooAgARAAALIANBCGogA0E0ahBZIAMgAykCCCIHNwIQIANCADcCCCADIAc3AwAgACADEEMCQCADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgC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gAkKAgICAEDcCiAEgBigCFCANQRhsaiEFIAgoAlggCkEMbGohCkEAIQMDQCAFIAJBiAFqIANqKAIAIgxBA3RqIAogDEECdGo0AgA3AwAgA0EEaiIDQQxHDQALIAEgCUcEQCACQoCAgICAgID4PzcDkAEgAkF/NgKIASACQgA3A6gBIAJCADcDoAEgAkIANwOYASACQoCAgICAgID4PzcDsAEgAkIANwPIASACQgA3A8ABIAJCADcDuAEgAkKAgICAgICA+D83A9ABIAJBADsB8AEgAkIANwPoASACQgA3A+ABIAJCADcD2AEgByEBAkAgAigCgAIiBUUNAANAIAEiAyAFIgogBSgCECAJSCIMGyEBIAVBBEEAIAwbaigCACIFDQALIAEgB0YNACAJIAMgCiAMGygCEEgNACACQYgBaiABQRhqQeoA/AoAAAsgAkGLAmogBiANIAJBiAFqELQEIAJB/AFqIAIQswQgAigCACEBCyANQQFqIg0gEEcNAAsLIAcgAigC/AEiA0cEQANAIAJBiwJqIAYgECADQRhqELQEAkAgAygCBCIBBEADQCABIgMoAgAiAQ0ADAILAAsDQCADIAMoAggiAygCAEcNAAsLIAMgB0cNAAsLIAIgFa03A4gBIAZBOGogAkGIAWoQkgECQCASRQRAIAsgDkEDbBDUASAOQQBMDQEgCygCACEHIAgoAkghCkEAIQMDQCAKIANBGGwiBWoiASsDACEeIAErAwghHyAFIAdqIgUgASsDEDkDECAFIB85AwggBSAeOQMAIANBAWoiAyAORw0ACwwBCyAIKAJMIQEgAkF/NgKIASACQfwAaiABIAJBiAFqELIEIQ0gAkHwAGogCCgCTBCcAiEQIA4gBigCAGwhASMAQSBrIgUkAAJAAkAgCygCCCALKAIAIgNrQQN1IAFJBEAgAUGAgICAAk8NASAFQQxqIAEgCygCBCADa0EDdSALEEsiASgCBCALKAIEIAsoAgAiCmsiA2shByADBEAgByAKIAP8CgAACyALKAIAIQMgCyAHNgIAIAEgAzYCBCALIAEoAgg2AgQgASADNgIIIAsoAgghByALIAEoAgw2AgggASADNgIAIAEgBzYCDCABEJkBCyAF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gIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAGECgaIARB0ABqECgaIARBgAFqJAALDwAgAEH4lAI2AgAgABAiCw0AIABB+JQCNgIAIAALKAEBfyAAKAIAIgAoAggiAUUEQEQAAAAAAADwPw8LIAAoAgy3IAG3owsXACAAKAIAIgAEfyAALQAQBUEAC0EBcQsMACAAKAIAQQE6ABALdgECfyMAQeAAayIDJAAgA0EwaiIEIAEgAhCYBCADIAQQLiIBQRhqIANByABqIgQQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAEECgaIANBMGoQKBogA0HgAGokAAu1AQEDfyAAIwBBEGsiACQAIAAgAUEQahB/IABBCGogASAAKAIAECsQKiAAKAIIKAJEAkAgACgCDCIBRQ0AIAEgASgCBCICQQFrNgIEIAINACABIAEoAgAoAggRAAAgARAkCwJAIAAoAgQiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgAEEQaiQAIgBBDksEf0GWDgUgAEECdEHcjwJqKAIACxDRBAsPACAAQdCUAjYCACAAECILDQAgAEHQlAI2AgAgAAslAQF/IwBBEGsiASQAIAEgAEEMajYCDCABQQxqEGUgAUEQaiQACw8AIABBqJQCNgIAIAAQIgsNACAAQaiUAjYCACAACyoBAX8jAEEQayIBJAAgAEEcahAvGiAAKAIYIgAEQCAAECQLIAFBEGokAAsPACAAQYCUAjYCACAAECILDQAgAEGAlAI2AgAgAAsPACAAQdiTAjYCACAAECILDQAgAEHYkwI2AgAgAAuwAgEFfyMAQRBrIgEkACAAQRBqIgNBDGoCQCADKAIQIgBFDQAgACgCBA0AIAMoAgwhACADKAIUGiABQQA2AgggAUIANwIAIAEgATYCDCABQQxqIAAQ0gQgASgCBCICIAEoAgBHBEADQCACQQRrKAIAIQAgAkEIayIEKAIAIQIgBEIANwIAIAEgBBAvNgIEAkAgAEUNAAJAIAAoAgQNACACKAIQIgRFDQAgBCgCBA0AIAIoAhQaIAFBDGogAigCDBDSBAsgACAAKAIEIgJBAWs2AgQgAg0AIAAgACgCACgCCBEAACAAECQLIAEoAgQiAiABKAIARw0ACwsgASABNgIMIAFBDGoQZQsgA0GAAWoQLxogA0EUahAvGhAvGiADKAIIIgAEQCAAECQLIAFBEGokAAsPACAAQbCTAjYCACAAECILDQAgAEGwkwI2AgAgAAv0AgEHfyMAQdAAayIHJAAgB0EANgJIIAIEQCAHIAI2AjwgB0GMjwI2AjggByAHQThqNgJICyAHQQhqIgsgA0Ew/AoAACMAQeAAayIDJAAgASgCACICQgA3AgAgAkIFNwIIQagCECMiAkGgkAI2AgAgAkIANwIEQRAhCSACQRBqEDshCiADQcgAaiAHQThqIgwQVyEIIAEoAgAhASADQRBqIg0gC0Ew/AoAACAKIAggDSAEIAUgBiABEPsDAkAgCCgCECIBIAhHBEBBFCEJIAFFDQELIAEgASgCACAJaigCABEAAAsgAyACNgJEIAMgCjYCQCACIAIoAgRBAWo2AgQgAyADKQJANwMIIAAgA0EIahDmAiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANB4ABqJAACQCAMIAcoAkgiAEYEf0EQBSAARQ0BQRQLIQEgACAAKAIAIAFqKAIAEQAACyAHQdAAaiQAC1YBAn8jAEEQayICJAAjAEEQayIBJAAgASAAQRBqIgBBhAFqNgIIIAFBCGoQZSABIABB+ABqNgIMIAFBDGoQZSAAQfAAahAvGiABQRBqJAAgAkEQaiQACw8AIABBiJMCNgIAIAAQIgsNACAAQYiTAjYCACAACwQAQQELkgIBBH8jAEEQayIBJABBASEDAkAgACgCgAENAEEAIQMgAUEANgIMIAFCADcCBCABIAA2AgAgAUEEaiABED0gASgCBCICIAEoAggiAEcEQANAIABBBGsiACgCACEEIAEgADYCCAJAIAQoAoABBEAgA0EBaiEDDAELIAQoAhQaIAQoAgwiAigCACIAIAIoAgQiAkcEQANAAkAgACgCACIEIAQoAgAoAggRBABBA0YEQCADQQFqIQMMAQsg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AFBkJECNgIACxEAQQgQIyIAQZCRAjYCACAAC5sDAgl/AXwjAEGQAWsiAyQAIANBhAFqIAIQlgUgA0EgakEAQeAA/AsAIANCgoCAgDA3AhggA0KAgICAEDcCECADQThqIQggAygChAEhCQNAIANBEGogBmooAgAhBCADQoCAgIAQNwIEIAkgBEEFdGohCiADQQI2AgwgA0EgakEwQcgAIARBAkYbaiELQQAhAgNAIAogA0EEaiACaigCACIHQQN0aisDACEMIANBIGohBQJAAkACQCAEDgICAAELIAghBQwBCyALIQULIAVBCEEQIAdBAUYbQQAgBxtqIAw5AwAgAkEEaiICQQxHDQALIAZBBGoiBkEQRw0ACyMAQSBrIgIkACACQRBqIAEQigEgAkEYaiACKAIQIgEgA0EgaiABKAIAKAIEEQMAIAIgAikCGDcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkEgaiQAIAMoAoQBIgAEQCADIAA2AogBIAMoAowBGiAAECILIANBkAFqJAALCwAgACABQQIQiAELCwAgACABQQEQiAELCwAgACABQQAQiAELDQAgACABIAJBAhDoAQsNACAAIAEgAkEBEOgBCw0AIAAgASACQQAQ6AELBgBBgJECCxQAIABBBGpBACABKAIEQefoAEYbC/0BAQN/IwBBgAFrIgMkACADIAEQ3wEjAEEgayIBJABBJBAjIgJCADcCDCACQYSWAjYCACACQgA3AgQgAkIANwIUIAJCADcCHCAAIAI2AgQgACACQQxqNgIAQagCECMiAkGgkAI2AgAgAkIANwIEIAJBEGogA0EAEJMDIQQgASACNgIQIAEgBDYCDCABQRRqIAFBDGoQ3AQgACABKAIUNgIIIAAgASgCGDYCDCABQgA3AhQCQCABKAIQIgJFDQAgAiACKAIEIgRBAWs2AgQgBA0AIAIgAigCACgCCBEAACACECQLIABCADcCECABQSBqJAAgAxCqASADQYABaiQACxUAIAFByJACNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQciQAjYCACABIAAoAgQ2AgQgAQsPACAAQaCQAjYCACAAECILDQAgAEGgkAI2AgAgAAvwEAITfwJ+IwBB0AFrIgMkACADQcgBaiICIAFBABArECoCQCADKALIASgCRCIEBEAgA0GwAWoiASAEEEYgAEEANgIIIABCADcCACAAIAEgAkEBEJYCIAEQKBoMAQsgA0GkAWogARCQAiICEJYBIQ0gAgRAIAKtIRYDQCANKAIAIBWnQQN0aiAVNwMAIBVCAXwiFSAWUg0ACwsgAygCyAEiBCgCXARAQQAhAgNAIAQoAlggAkECdGoiBSgCACIGIAVBeEEEIAJBA29BAkYbaigCACIFSARAIA0gBiAFEF8gAygCyAEhBAsgAkEBaiICIAQoAlxJDQALCyADQQA2AqABIANCADcCmAECQCANIANBmAFqEIwFIhNBAUYEQCAAQQEQkQMoAgAgARCjBAwBCwJAIAMoApwBIgQgAygCmAEiAkYNACAEIAJrIgQQJyEOIARFDQAgDiACIAT8CgAACyABEJACIQ8gAEEANgIIIABCADcCACATQQBKBEADQEGoAhAjIghBoJACNgIAIAhCADcCBCAIQRBqEDshBiAIIAMoAsgBIgIrAzA5A0AgCCACKwM4OQNIQQAhAiADQQA2ApABIANCADcCiAEgA0GIAWogDxAlIAMgDzYCjAEgAygCiAEiBSEEIA8EQANAIBAgDiACQQJ0aigCAEYEQCAEIAI2AgAgBEEEaiEECyACQQFqIgIgD0cNAAsLIANCADcDgAEgA0IANwN4IANCADcDcCADQgA3AyggA0IANwMwIANCADcDOCAIQdgAaiAEIAVrQQJ1IgQgA0EoahBnIANCADcDaCADQgA3A2AgA0IANwNYIANCADcDECADQgA3AxggA0IANwMgIAhBqAFqIAQgA0EQahBnQQAhAiADQYgBaiAEQQAQMSADKAKMASIEBEAgCCgCWCEKIAMoAsgBIgsoAkghDCADKAKIASEFA0AgCiACQRhsaiIHIAwgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACyAIKAKoASEKIAsoApgBIQtBACECA0AgCiACQRhsaiIHIAsgBSACQQ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pAwA3AwAgB0EQaiEHIAJBEGoiAiAFRw0ACyADIAU2AgggAygCBBogACgCBCAEayICBEAgBSAEIAL8CgAACyADIAMoAgggACgCBCAEa2o2AgggACAENgIEIAMoAgQgBCAAKAIAIgVrIgJrIQQgAgRAIAQgBSAC/AoAAAsgACgCACECIAAgBDYCACADIAI2AgQgACADKAIINgIEIAMgAjYCCCAAKAIIIQQgACADKAIMNgIIIAMgAjYCACADIAQ2AgwgAxA2DAELECYACyALQSBqJAAgCigCACICBEAgCCACNgIMIAgoAhAaIAIQIgsgAUEMaiIBIA1HDQALCyAIIAhBFGo2AgggCEEIahApIAhBIGokAAvMBAICfwN8IwBB0ABrIgMkAAJAIAFEAAAAAAAAAABlBEAgABDqAQwBCyACQQBKBH8gAkEDakECdgUgARDCAUEEbQshAiADQQI2AkAgA0HEAGogA0FAaxCSBSADIAI2AhwgA0HIkAI2AhggAyADQRhqIgI2AiggA0EwaiADKAJEIAJBABDVAyADKAIwIgIEQCACECILIANBADYCOCADQgA3AjACQCADKAIoIgIgA0EYakYEf0EQBSACRQ0BQRQLIQQgAiACKAIAIARqKAIAEQAACyADKAJEIgIoAkwiBAR/IAIoAkgiAiAEQRhsaiEEA0BEAAAAAAAA8D8gAisDAKFEGC1EVPsh+T+iEJcBIQVEAAAAAAAA8D8gAisDCKFEGC1EVPsh+T+iEJcBIQcgAiABRAAAAAAAAPA/IAIrAxChRBgtRFT7Ifk/ohCXASIGIAUgBaIgByAHoqAgBiAGoqCfIgajojkDECACIAEgByAGo6I5AwggAiABIAUgBqOiIgU5AwAgBSAFYgRAIAJCADcDECACQgA3AwggAkIANwMACyACQRhqIgIgBEcNAAsgAygCRAUgAgsQjgEgAygCRBBYIAMoAkRBABCNASADKAJEQQAQVCADKAJEEFogAyADKAJENgIQIAMgAygCSCICNgIUIAIEQCACIAIoAgRBAWo2AgQLIAMgAykCEDcDCCAAIANBCGoQSBogAygCSCIARQ0AIAAgACgCBCICQQFrNgIEIAINACAAIAAoAgAoAgg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Awg3AwggASADKQMANwMAIAFBEGohAwwBCyABIAdBxABqIggoAgAiEWtBBHUiD0EBaiIBQYCAgIABTw0MIAlBDGpB/////wAgBiARayIGQQN1IhEgASABIBFJGyAGQfD///8HTxsgDyAIEDIiASgCCCIGIAMpAwg3AwggBiADKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIGayIDayEIIAMEQCAIIAYgA/wKAAALIAcoAkQhBiAHIAg2AkQgASAGNgIEIAcgASgCCCIDNgJIIAEgBjYCCCAHKAJMIQggByABKAIMNgJMIAEgBjYCACABIAg2AgwgARA2CyAHIAM2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANQQBBABC3AgwCCyAHIA1BAEEARBgtRFT7IQlAELUCDAELIAcgDUEAQQAQtgILQQEhASANKAIEIA0oAgBrQQR1IhFBAWsiA0EBSwRAQQAhBgNAIAcgCiANIAEgBhC0AiABIgZBAWoiASADRw0ACwsgBygCOCEIIAMEQCADIQEDQCAIIAFBAWsiBkEEdGoiDysDACECIAggAUEEdGoiASAPKwMImjkDCCABIAKaOQMAIAYiAQ0ACwsgCCAIIANBBHRqIgEpAwg3AwggCCABKQMANwMAAkAgBygCmAFFBEAgBysDECECDAELIAcgCyANIAdBOGogAyADEPsBIgI5AxALAkAgAplEEeotgZmXcT1lBEAgDSgCACADQQR0aiEGAkAgBygCSCIBIAcoAkwiCEkEQCABIAYpAwg3AwggASAGKQMANwMAIAFBEGohBgwBCyABIAdBxABqIgsoAgAiD2tBBHUiFEEBaiIBQYCAgIABTw0MIAlBDGpB/////wAgCCAPayIIQQN1Ig8gASABIA9JGyAIQfD///8HTxsgFCALEDIiASgCCCIIIAYpAwg3AwggCCAGKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIIayIGayELIAYEQCALIAggBvwKAAALIAcoAkQhCCAHIAs2AkQgASAINgIEIAcgASgCCCIGNgJIIAEgCDYCCCAHKAJMIQsgByABKAIMNgJMIAEgCDYCACABIAs2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kAgAigCRCIBRQ0AIAEgASgCBCIDQQFrNgIEIAMNACABIAEoAgAoAggRAAAgARAkCyACKAIoIgEgAigCLCIERwRAA0AgASgCACIDIAEoAgQiB0cEQANAIAMrAwAhCyACIAMrAwg5A0ggAiALOQNAIAJBNGogAkFAaxBMIANBEGoiAyAHRw0ACwsgAUEMaiIBIARHDQALCyACIAIoAjQiATYCICACIAIoAjggAWtBBHU2AiQCQCAJKAIQIgEEQCABIAJBIGogASgCACgCGBEBACACKAIoIgQgAigCLCIHRwRAIAIoAjQhAQNAIAQoAgAiAyAEKAIEIghHBEADQCABKwMAIQsgAyABKwMIOQMIIAMgCzkDACABQRBqIQEgA0EQaiIDIAhHDQALCyAEQQxqIgQgB0cNAAsLIAJBADYCFCACQgA3AgwgAkHYAGpBAEHoAPwLACACQgA3A1AgAkECNgJMIAJCADcCRCACQdwAakEAQTD8CwAgAkGQAWpBAEEk/AsAIAJBADYCyAEgAkIANwPAASACQQE6AL0BIAJBAToAtAEgAkKAgICAgICAoD43A9gBIAJCgICAgICAgNDBADcD0AEgAkH8mgI2AkAgAkFAayIBIAJBKGoiBxCbASACQQA2AugBIAJCADcC4AEgAUECQQIgAkEMaiIEIAJB4AFqIgMQ4gEgAiADNgLsASACQewBahApIAEQaRpBGBAjIgNBtJoCNgIAIANCADcCBCADQQxqIgggBBBbIAIgAzYCHCACIAg2AhggAiACKQIYNwMAIAAgAhBqIAIgBDYCQCABECkgAiAHNgJAIAEQKSACKAI0IgAEQCACIAA2AjggAigCPBogABAiCyACQfABaiQADAELEGYACwJAIAkgBigCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAZBIGokAAJAIAogBSgCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAVBIGokAAsMACABIAAoAgQREAALFQAgAUGMjwI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBjI8CNgIAIAEgACgCBDYCBCABCwYAQeyOAgsUACAAQQRqQQAgASgCBEGL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QgATYCOCAEKAI8GiABECILIARBQGskACAAC3kBBX8jAEEQayICJAAgAkEEaiIFIAEgACgCABEBACACKAIIIAIsAA8iASABQQBIIgYbIgBBBGoQJyIDIAA2AgAgAigCBCEEIAAEQCADQQRqIAQgBSAGGyAA/AoAAAsgAUEASARAIAIoAgwaIAQQIgsgAkEQaiQAIAML6wEBBn8jAEHgAGsiAyQAIANB1ABqIAIQlgUgA0EgakEAQTD8CwAgA0ECNgIcIANCgICAgBA3AhQgAygCVCEFA0AgA0EUaiAEaigCACECIANCgICAgBA3AgwgBSACQRhsaiEGIANBIGpBEEEgIAJBAUYbQQAgAhtqIQdBACECA0AgB0EIQQAgA0EMaiACaigCACIIG2ogBiAIQQN0aisDADkDACACQQRqIgJBCEcNAAsgBEEEaiIEQQxHDQALIAAgASADQSBqEOABIAMoAlQiAARAIAMgADYCWCADKAJcGiAAECILIANB4ABqJAALNgECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgACgCABEFAEEYECMgBRAuIAUQKBogBEEgaiQACyoBAX8jAEEQayIDJAAgA0EIaiABIAIgACgCABEDACADKAIMIANBEGokAAthAQF/IwBBMGsiBCQAIAAoAgAhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQSBqIgIgASAEQQhqIAMgABEPACACEJQDIAQgAjYCLCAEQSxqEHogBEEwaiQACzUBAX8jAEEQayIDJAAgAyABIAIgACgCABEDACADEJQDIAMgAzYCDCADQQxqEHogA0EQaiQACzYBAX8jAEFAaiIGJAAgBiABIAIgAyAEIAUgACgCABEqAEHAABAjIAYQQCAGEEEaIAZBQGskAAsLACAAIAFBAhDFAgtfAQF/IwBB0ABrIgMkACAAKAIAIQAgAyACNgIMIANBnKACNgIIIANBEGoiAiABIANBCGogABEDAEHAABAjIAIQQCACEEEaIAMoAgwiAEEJTwRAIAAQAQsgA0HQAGokAAuBAgICfwF8IwBB4ABrIgMkACADQQhqIgQgASACIAAoAgARAwAgA0EwaiAEQSj8CgAAQQIhACADLQBQQQFGBEAjAEEQayIAJABB2J4CLQAAQQFxRQRAQQJBmIQCQQMQBiEBQdieAkEBOgAAQdSeAiABNgIAC0EgECMiASADKQNINwMYIAEgAykDQDcDECABIAMpAzg3AwggASADKQMwNwMAIAAgATYCCCAAQQA2AgRB1J4CKAIAQQBBACAAQQRqIABBCGoQBSEFIAAoAgQhASADIAX8AzYCXCADQZygAjYCWCABBEAgARAECyAAQRBqJAAgAygCXCEACyADQeAAaiQAIAALTAEBfyMAQSBrIgMkACAAKAIAIQAgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAEgAyAAEQEAIANBIGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQcyeAi0AAEEBcUUEQEECQaiCAkEDEAYhAUHMngJBAToAAEHIngIgATYCAAtBEBAjIgEgAykDKDcDCCABIAMpAyA3AwAgACABNgIIIABBADYCBEHIngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgI8IANBnKACNgI4IAEEQCABEAQLIABBEGokACADKAI8IQALIANBQGskACAACwsAIAAgAUEBEMUCC90BAgJ/AXwjAEEwayIDJAAgA0EMaiIEIAEgAiAAKAIAEQMAQQIhAAJAIAMtACRBAUcNACMAQRBrIgAkAEHAngItAABBAXFFBEBBAkHIgAJBAxAGIQFBwJ4CQQE6AABBvJ4CIAE2AgALIABBGBAjIAQQLjYCCCAAQQA2AgRBvJ4CKAIAQQBBACAAQQRqIABBCGoQBSEFIAAoAgQhASADIAX8AzYCLCADQZygAjYCKCABBEAgARAECyAAQRBqJAAgAygCLCEAIAMtACRBAUcNACAEECgaCyADQTBqJAAgAAsyAQF/IwBBIGsiAyQAIAAoAgAhACABIANBCGogAhAuIgEgABEBACABECgaIANBIGokAAvbAQIBfwF8IwBB0ABrIgMkACADIAEgAiAAKAIAEQMA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ogARAiCyADQSBqJAAgAAsNACAAIAEgAkECEMYCC0gBAX8jAEEQayIDJAAgACgCACEAIAEgA0EEaiACEDwiASAAEQEAIAEoAgAiAARAIAEgADYCBCABKAIIGiAAECILIANBEGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQZCeAi0AAEEBcUUEQEECQYj5AUEDEAYhAUGQngJBAToAAEGMngIgATYCAAtBEBAjIgEgAykDKDcDCCABIAMpAyA3AwAgACABNgIIIABBADYCBEGMngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgI8IANBnKACNgI4IAEEQCABEAQLIABBEGokACADKAI8IQALIANBQGskACAAC5ICAwF/AX4BfCMAQdAAayIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAyAiBDcDQCADIAMpAxg3AzggAyADKQMQNwMwIAMgAykDCDcDKEECIQAgBKdBAXEEQCMAQRBrIgAkAEGEngItAABBAXFFBEBBAkGY9wFBAxAGIQFBhJ4CQQE6AABBgJ4CIAE2AgALQRgQIyIBIAMpAzg3AxAgASADKQMwNwMIIAEgAykDKDcDACAAIAE2AgggAEEANgIEQYCeAigCAEEAQQAgAEEEaiAAQQhqEAUhBSAAKAIEIQEgAyAF/AM2AkwgA0GcoAI2AkggAQRAIAEQBAsgAEEQaiQAIAMoAkwhAAsgA0HQAGokACAACw0AIAAgASACQQEQxgILRQEBfyMAQSBrIgMkACAAKAIAIQAgAyACKQMQNwMYIAMgAikDCDcDECADIAIpAwA3AwggASADQQhqIAARAQAgA0EgaiQAC/ABAgF/AXwjAEEwayIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAhA3AyAgAyADKQIINwMYQQIhACADLQAkQQFGBEAjAEEQayIAJABB+J0CLQAAQQFxRQRAQQJBqPUBQQMQBiEBQfidAkEBOgAAQfSdAiABNgIAC0EMECMiASADKAIgNgI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xAmAAsgASAESQRAIAMgBSABQRhsaiIBRwRAA0AgASADQRhrECgiA0cNAAsLIAAgATYCBAsLCwkAIAAgARCYAQtRAQF/IwBBgAFrIgMkACADIAEQ3wEjAEEQayIBJAAgAUEIaiADIAJBABCTBSABIAEpAgg3AwAgACABEEgaIAFBEGokACADEKoBIANBgAFqJAALKwEBfyMAQRBrIgEkACAABEAgASAANgIMIAFBDGoQeiAAECILIAFBEGokAAsGAEHs/wELPwAgAiAAKAIAIAFBBnRqIgBHBEAgACgCABogAigCABogAEEIaiACQQhqEF4gAEEQaiACQRBqQTD8CgAAC0EBCzoAIAACfyABKAIEIAEoAgAiAWtBBnUgAksEQCAAIAEgAkEGdGoQQBpBAQwBCyAAQQA6AABBAAs6AEALtwIBBX8CQCAAKAIEIgMgACgCACIFa0EGdSIEIAFJBEAjAEEgayIFJAACQAJAIAEgBGsiASAAKAIIIgYgACgCBCIDa0EGdU0EQCAAIAEEfyADIAFBBnRqIQADQCADIAIQQEFAayIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIEa0EGdSIHIAFqIgNBgICAIE8NASAFQQxqQf///x8gBiAEayIEQQV1IgYgAyADIAZJGyAEQcD///8HTxsgByAAEKkBIgQoAggiAyABQQZ0aiEBA0AgAyACEEBBQGsiAyABRw0ACyAEIAE2AgggACAEEKcCIAQQpgILIAVBIGokAAwCCxAmAAsgASAESQRAIAMgBSABQQZ0aiIBRwRAA0AgASADQUBqEEEiA0cNAAsLIAAgATYCBAsLC78BAQV/AkAjAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABELQBQUBrIQEMAQsgAiAAKAIAIgRrQQZ1IgZBAWoiAkGAgIAgTw0BIAVBDGpB////HyADIARrIgNBBXUiBCACIAIgBEkbIANBwP///wdPGyAGIAAQqQEiAigCCCABELQBGiACIAIoAghBQGs2AgggACACEKcCIAAoAgQhASACEKYCCyAAIAE2AgQgBUEgaiQADAELECYACwssAQF/IwBBEGsiASQAIAAEQCABIAA2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IANwIAQQELSQAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsaiIBKAIINgIIIAAgASkCADcCAEEBDAELIABBADoAAEEACzoADAuoAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBDG0iByAEaiIBQdaq1aoBTw0BIAZBDGpB1arVqgEgBSADa0EMbSIDQQF0IgUgASABIAVJGyADQarVqtUATxsgByAAEGEiASgCCCIDIARBDGxqIQQDQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAkF0bUEMbGohAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABENYBCyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEMbGo2AgQLCwsJACAAIAEQnQULBgBBzPQBCxgAIAAoAgAgAUEGdGogAkHAAPwKAABBAQs+ACAAAn8gASgCBCABKAIAIgFrQQZ1IAJLBEAgACABIAJBBnRqQcAA/AoAAEEBDAELIABBADoAAEEACzoAQAuMAwEFfwJAIAAoAgQgACgCACIDa0EGdSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EGdU0EQCAAIAQEfyADIARBBnRqIQADQCADIAJBwAD8CgAAIANBQGsiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBBnUiByAEaiIBQYCAgCBPDQEgBkEMakH///8fIAUgA2siA0EFdSIFIAEgASAFSRsgA0HA////B08bIAcgABCpASIBKAIIIgMgBEEGdGohBANAIAMgAkHAAPwKAAAgA0FAayIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQqQILIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQZ0ajYCBAsLCwkAIAAgARCaAwsGAEHo8gELDwAgASAAKAIAaiACNwMACw0AIAEgACgCAGopAwALHgAgASAAKAIAaiIAIAIpAwg3AwggACACKQMANwMACyoBAX8gACgCACECQRAQIyIAIAEgAmoiASkDCDcDCCAAIAEpAwA3AwAgAAsHACAAEQwACwkAIAEgABEZAAsJACABIAARAAALCQAgASAAERsACwkAIAEgABEEAAtNAQF/IwBBEGsiAiQAIAIgATYCBCACQZygAjYCACACQQhqIAIgABEBACACKAIMIAJBADYCDCACKAIEIgFBCU8EQCABEAELIAJBEGokAAtIAQJ/IwBB0ABrIgYkACAGQQhqIgcgAkEw/AoAACAGQThqIgIgASAHIAMgBCAFIAARKQBBGBAjIAIQLiACECgaIAZB0ABqJAALMwECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgABEPAEEYECMgBRAuIAUQKBogBEEgaiQAC5QBAQJ/IwBBEGsiBCQAIARBBGogASACIAMgABEVAEEMECMiAEEANgIIIABCADcCACAEKAIIIgEgBCgCBCIDRwRAIAAgASADayIBQQxtEKMCIAAoAgQhBSABBEAgBSADIAH8CgAACyAAIAEgBWo2AgQLIAQoAgQiAQRAIAQgATYCCCAEKAIMGiABECILIARBEGokACAAC04BAX8jAEEwayIGJAAgBiAFKQMANwMIIAYgBSkDCDcDECAGQRhqIgUgASACIAMgBCAGQQhqIAARIwBBGBAjIAUQLiAFECgaIAZBMGokAAtSAQF/IwBBIGsiAyQAIAMgATYCBCADQZygAjYCACADQQhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIAMoAgQiAUEJTwRAIAEQAQsgA0EgaiQACy0BAn8jAEEgayIBJAAgAUEIaiICIAARAABBGBAjIAIQLiACECgaIAFBIGokAAsxAQJ/IwBBIGsiAyQAIANBCGoiBCABIAIgABEWAEEYECMgBBAuIAQQKBogA0EgaiQACzcBAn8jAEEgayIGJAAgBkEIaiIHIAEgAiADIAQgBSAAESQAQRgQIyAHEC4gBxAoGiAGQSBqJAALTwEBfyMAQTBrIgMkACADIAEpAwA3AwAgAyABKQMINwMIIAMgASkDEDcDECADQRhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIANBMGokAAtdAQN/IwBBIGsiBCQAIAEgACgCBCIGQQF1aiEBIAAoAgAhACAEQQhqIgUgASACIAMgBkEBcQR/IAEoAgAgAGooAgAFIAALEQ8AQRgQIyAFEC4gBRAoGiAEQSBqJAALXQEDfyMAQSBrIgQkACABIAAoAgQiBkEBdWohASAAKAIAIQAgBEEIaiIFIAEgAiADIAZBAXEEfyABKAIAIABqKAIABSAACxEFAEEYECMgBRAuIAUQKBogBEEgaiQACzkBAX8gASAAKAIEIgRBAXVqIQEgACgCACEAIAEgAiADIARBAXEEfyABKAIAIABqKAIABSAACxEmAAtXAQJ/IwBBMGsiAiQAIAEgACgCBCIDQQF1aiEBIAAoAgAhACACIAEgA0EBcQR/IAEoAgAgAGooAgAFIAALEQEAQTAQIyIAIAJBMPwKAAAgAkEwaiQAIAALWgECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBACACEJQDIAIgAjYCDCACQQxqEHogAkEQaiQAC18BA38jAEEgayIFJAAgASAAKAIEIgdBAXVqIQEgACgCACEAIAVBCGoiBiABIAIgAyAEIAdBAXEEfyABKAIAIABqKAIABSAACxEiAEEYECMgBhAuIAYQKBogBUEgaiQAC3oBAn8jAEEwayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIARBAXEEQCABKAIAIABqKAIAIQALIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGoiAiABIAMgABEDAEEYEC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Cxz/////AQAAAP///////////////wEAAAD/////AEH0hwELBP////8AQYiIAQtJ/////wAAAAAAAAAA//////////8BAAAA/////wAAAAD/////AQAAAP//////////AAAAAAEAAAACAAAAAAAAAAEAAAABAAAAAgBB4IgBC7AR////////////////AAAAAAMAAAAEAAAAAAAAAAEAAAAFAAAAAQAAAAUAAAADAAAAAQAAAAQAAAACAAAAAQAAAAAAAAADAAAAAgAAAAUAAAAAAAAABQAAAAMAAAACAAAAAgAAAAMAAAAFAAAAAAAAAAUAAAACAAAAAwAAAAAAAAABAAAAAgAAAAQAAAABAAAAAwAAAAUAAAABAAAABQAAAAEAAAAAAAAABAAAAAMAAAAAAAAA////////////////////////////////////////////////////////////////AwAAAAQAAAABAAAA////////////////AwAAAAIAAAABAAAAAAAAAAQAAAACAAAA////////////////////////////////AgAAAAQAAAAAAAAAAQAAAAIAAAADAAAA////////////////AQAAAAQAAAADAAAA////////////////////////////////////////////////TlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEUzJF8wRlpOUzRfMTBTZXROb3JtYWxzRWlkRThGYWNlRWRnZWlFRUUATlN0M19fMjEwX19mdW5jdGlvbjZfX2Jhc2VJRlpOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGwxMFNldE5vcm1hbHNFaWRFOEZhY2VFZGdlaUVFRQBaTjhtYW5pZm9sZDhNYW5pZm9sZDRJbXBsMTBTZXROb3JtYWxzRWlkRTMkXzAATlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEUzJF8xRnZpUktaTlM0XzEwU2V0Tm9ybWFsc0VpZEU4RmFjZUVkZ2VSUzZfRUVFAE5TdDNfXzIxMF9fZnVuY3Rpb242X19iYXNlSUZ2aVJLWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2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kmo=()=\u003e{const t=globalThis.atob(Tmo),e=new Uint8Array(t.length);for(let n=0;n\u003ct.length;n++)e[n]=t.charCodeAt(n);return e},Fmo=async()=\u003e{const e=!!(globalThis.process?.versions?.node\u0026\u0026globalThis.process?.type!==\"renderer\")?void 0:{locateFile:()=\u003e\"manifold.wasm\",wasmBinary:kmo()},n=await Rmo(e);return n.setup(),n},Lmo=async()=\u003eJce||(nve??=Fmo().then(t=\u003e(Jce=t,t)).catch(t=\u003e{throw nve=null,t}),nve),xbt=()=\u003eJce;var tE=1e6,qW=t=\u003e{let e=0;for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];e+=o.x*i.y-i.x*o.y}return e/2},Hmo=t=\u003e{let e=0;const n={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};for(const o of t){e+=o.length;for(const[i,r]of o)n.minX=Math.min(n.minX,i),n.minY=Math.min(n.minY,r),n.maxX=Math.max(n.maxX,i),n.maxY=Math.max(n.maxY,r)}return{polygonCount:t.length,pointCount:e,bbox:e\u003e0?n:null,scale:tE}},Omo=(t,e)=\u003e{if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw new Error(`${e} received non-finite point (${t.x}, ${t.y})`)},Ebt=(t,e)=\u003et.x===e.x\u0026\u0026t.y===e.y,TN=(t,e=\"normalizeRing\")=\u003e{const n=[];for(const i of t){Omo(i,e);const r={x:Math.round(i.x*tE)/tE,y:Math.round(i.y*tE)/tE},s=n[n.length-1];(!s||!Ebt(s,r))\u0026\u0026n.push(r)}return n.length\u003e1\u0026\u0026Ebt(n[0],n[n.length-1])\u0026\u0026n.pop(),new Set(n.map(i=\u003e`${i.x},${i.y}`)).size\u003c3||Math.abs(qW(n))\u003c1e-18?[]:n},XW=(t,e=\"toScaledManifoldPolygons\")=\u003e{const n=[];for(const o of t){const i=TN(o,e);if(i.length\u003c3)continue;const r=qW(i)\u003c0?[...i].reverse():i;n.push(r.map(s=\u003e[Math.round(s.x*tE),Math.round(s.y*tE)]))}return n},Bbt=t=\u003et.map(e=\u003eTN(e.map(([n,o])=\u003e({x:n/tE,y:o/tE})),\"fromScaledManifoldPolygons\")).filter(e=\u003ee.length\u003e=3),bbt=(t,e)=\u003e{const n=qW(t);return e===\"positive\"\u0026\u0026n\u003c0||e===\"negative\"\u0026\u0026n\u003e0?[...t].reverse():t},Sbt=t=\u003et.map(e=\u003e({x:e.x,y:e.y})),Gmo=t=\u003e{const e=[];for(const n of t){if(n.outerRing.length\u003c3)continue;const o=bbt(n.outerRing,\"negative\"),i=n.innerRings.filter(r=\u003er.length\u003e=3).map(r=\u003ebbt(r,\"positive\"));e.push({outer_ring:{vertices:Sbt(o)},inner_rings:i.map(r=\u003e({vertices:Sbt(r)}))})}return e},Ymo=t=\u003e{const e=t.board_edge_margin??0;if(t.outline\u0026\u0026t.outline.length\u003e0)return TN(t.outline,\"getBoardPolygon.outline\");const{bounds:n}=t,o={minX:n.minX+e,minY:n.minY+e,maxX:n.maxX-e,maxY:n.maxY-e};return o.minX\u003e=o.maxX||o.minY\u003e=o.maxY?[]:[{x:o.minX,y:o.minY},{x:o.maxX,y:o.minY},{x:o.maxX,y:o.maxY},{x:o.minX,y:o.maxY}]},Umo=async()=\u003e{await Lmo()},Kmo=()=\u003e!!xbt(),ZW=()=\u003e{const t=xbt();if(!t)throw new Error(\"Manifold geometry has not been initialized. Call initializeManifoldGeometry() before solving copper pours.\");return t.CrossSection},Wv=(t,e,n)=\u003e{try{return n()}catch(o){const i=Hmo(e),r=o instanceof Error?o.message:String(o);throw new Error(`${t} failed: ${r}; details=${JSON.stringify(i)}`)}},Vmo=1e-8,ove=()=\u003eZW().square([0,0]),zmo=(t,e=\"Positive\")=\u003e{const n=XW([t],\"crossSectionFromPolygon\"),o=ZW();return n.length===0?ove():Wv(\"crossSectionFromPolygon\",n,()=\u003eo.ofPolygons(n,e))},ive=(t,e=\"Positive\")=\u003e{const n=XW(t,\"crossSectionFromPolygons\"),o=ZW();return n.length===0?ove():Wv(\"crossSectionFromPolygons\",n,()=\u003eo.ofPolygons(n,e))},Qbt=t=\u003e{const e=t.filter(o=\u003e!o.isEmpty()),n=ZW();return e.length===0?ove():Wv(\"composeCrossSections\",[],()=\u003en.compose(e))},Wce=(t,e,n=\"Miter\")=\u003e{const o=XW([t],\"offsetPolygon\");if(o.length===0||e\u003c=0)return o.length===0?[]:[TN(t)];const i=e*tE,r=ZW(),s=Wv(\"offsetPolygon.input\",o,()=\u003er.ofPolygons(o,\"Positive\")),a=Wv(\"offsetPolygon.offset\",o,()=\u003es.offset(i,n,2,32));return Bbt(a.toPolygons())},Jmo=(t,e,n=\"Miter\")=\u003e{if(t.isEmpty()||e\u003c=0)return t;const o=e*tE,i=t.toPolygons();return Wv(\"offsetCrossSection\",i,()=\u003et.offset(o,n,2,32))},vbt=(t,e)=\u003e{const n=Qbt(e);return t.isEmpty()||n.isEmpty()?t:Wv(\"subtractCrossSectionBlockers\",[...t.toPolygons(),...n.toPolygons()],()=\u003et.subtract(n))},Wmo=(t,e)=\u003e{const n=zmo(t),o=ive(e);if(n.isEmpty()||o.isEmpty())return n;const i=[...XW([t],\"subtractBlockersFromPour.pour\"),...XW(e,\"subtractBlockersFromPour.blockers\")];return Wv(\"subtractBlockersFromPour\",i,()=\u003en.subtract(o))},jmo=(t,e=Vmo)=\u003e{if(t.isEmpty())return t;const n=e*tE*tE,o=t.decompose().filter(i=\u003eMath.abs(i.area())\u003e=n);return Qbt(o)},wbt=t=\u003e{const e=[];for(const n of t.decompose()){const o=Bbt(n.toPolygons());if(o.length===0)continue;const i=o.reduce((s,a)=\u003eMath.abs(qW(a))\u003eMath.abs(qW(s))?a:s),r=o.filter(s=\u003es!==i);e.push({outerRing:i,innerRings:r})}return e},ej=(t,e,n=32)=\u003e{const o=[];for(let i=0;i\u003cn;i++){const r=i/n*2*Math.PI;o.push({x:t.x+e*Math.cos(r),y:t.y+e*Math.sin(r)})}return o},Pbt=(t,e,n,o=0,i=32)=\u003e{if(e\u003c=0||n\u003c=0)return[];const r=e/2,s=n/2,a=o*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[];for(let u=0;u\u003ci;u++){const g=u/i*2*Math.PI,h=r*Math.cos(g),d=s*Math.sin(g);l.push({x:t.x+h*A-d*c,y:t.y+h*c+d*A})}return l},rve=(t,e,n,o)=\u003e[{x:t,y:e},{x:n,y:e},{x:n,y:o},{x:t,y:o}],Mbt=(t,e,n,o)=\u003e{const i=e/2,r=n/2,s=o*Math.PI/180,a=Math.cos(s),A=Math.sin(s);return[{x:-i,y:-r},{x:i,y:-r},{x:i,y:r},{x:-i,y:r}].map(c=\u003e({x:t.x+c.x*a-c.y*A,y:t.y+c.x*A+c.y*a}))},sve=(t,e,n)=\u003e{const o=Math.hypot(t.x-e.x,t.y-e.y);if(o===0)return[];const i=(t.x+e.x)/2,r=(t.y+e.y)/2,s=Math.atan2(e.y-t.y,e.x-t.x),a=Math.cos(s),A=Math.sin(s),c=o/2,l=n/2;return[{x:-c,y:-l},{x:c,y:-l},{x:c,y:l},{x:-c,y:l}].map(u=\u003e({x:i+u.x*a-u.y*A,y:r+u.x*A+u.y*a}))},Dbt=(t,e,n,o,i=0,r=32)=\u003e{if(o\u003c=0)return[];const s=n\u003e=e,a=Math.max(e,n)-2*o,A=Math.max(0,a/2),l=(s?Math.PI/2:0)+i*Math.PI/180,u=Math.cos(l),g=Math.sin(l),h={x:t.x-A*u,y:t.y-A*g},d={x:t.x+A*u,y:t.y+A*g};if(A===0)return ej(t,o,r);const p=[],m=Math.max(4,Math.floor(r/2));for(let _=0;_\u003c=m;_++){const f=l-Math.PI/2+_/m*Math.PI;p.push({x:d.x+o*Math.cos(f),y:d.y+o*Math.sin(f)})}for(let _=0;_\u003c=m;_++){const f=l+Math.PI/2+_/m*Math.PI;p.push({x:h.x+o*Math.cos(f),y:h.y+o*Math.sin(f)})}return p},$mo=t=\u003e{if(t.shape===\"rect\")return{x:(t.bounds.minX+t.bounds.maxX)/2,y:(t.bounds.minY+t.bounds.maxY)/2};if(t.shape===\"polygon\"){const e=t.points.reduce((n,o)=\u003e({minX:Math.min(n.minX,o.x),minY:Math.min(n.minY,o.y),maxX:Math.max(n.maxX,o.x),maxY:Math.max(n.maxY,o.y)}),{minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY});return{x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2}}return{x:t.x,y:t.y}},qmo=t=\u003et.shape===\"rotated_rect\"||t.shape===\"pill\"||t.shape===\"oval\"?t.ccwRotation:0,Nbt=(t,e)=\u003e{if(t.shape===\"circle\")return[ej({x:t.x,y:t.y},t.radius+e)];if(t.shape===\"pill\")return[Dbt({x:t.x,y:t.y},t.width+e*2,t.height+e*2,t.radius+e,t.ccwRotation)];if(t.shape===\"oval\"){const n=Pbt({x:t.x,y:t.y},t.width,t.height,t.ccwRotation);return e\u003e0?Wce(n,e,\"Round\"):[n]}if(t.shape===\"rect\")return[rve(t.bounds.minX-e,t.bounds.minY-e,t.bounds.maxX+e,t.bounds.maxY+e)];if(t.shape===\"polygon\"){const n=TN(t.points,\"generateThermalReliefClearances.polygonPad\");return e\u003e0?Wce(n,e,\"Round\"):[n]}return[Mbt({x:t.x,y:t.y},t.width+e*2,t.height+e*2,t.ccwRotation)]},Xmo=t=\u003et.shape===\"circle\"||t.shape===\"oval\"||t.shape===\"pill\"||t.shape===\"polygon\"||t.shape===\"rect\"||t.shape===\"rotated_rect\",Zmo=(t,e,n,o=4)=\u003e{if(!Xmo(t)||e\u003c=0)return[];if(typeof n!=\"number\"||!Number.isFinite(n)||n\u003c=0)throw new Error(\"thermal_relief_spoke_width must be greater than 0\");if(!Number.isInteger(o)||o\u003c1)throw new Error(\"thermal_relief_spoke_count must be a positive integer\");const i=Nbt(t,0),r=Nbt(t,e),s=$mo(t),a=Math.max(...r.flatMap(h=\u003eh).map(h=\u003eMath.hypot(h.x-s.x,h.y-s.y)))+n,A=qmo(t)*Math.PI/180,c=[];for(let h=0;h\u003co;h++){const d=A+h/o*Math.PI*2;c.push(sve(s,{x:s.x+Math.cos(d)*a,y:s.y+Math.sin(d)*a},n))}const l=ive(r),u=ive([...i,...c]),g=vbt(l,[u]);return wbt(g).map(({outerRing:h})=\u003eh)},e_o=t=\u003et.shape===\"rect\",t_o=t=\u003et.shape===\"rotated_rect\",n_o=t=\u003et.shape===\"trace\",o_o=t=\u003et.shape===\"circle\",i_o=t=\u003et.shape===\"pill\",r_o=t=\u003et.shape===\"oval\",s_o=t=\u003et.shape===\"polygon\",a_o=(t,e,n,o)=\u003e{const i=[],{padMargin:r,traceMargin:s,board_edge_margin:a,cutoutMargin:A,use_thermal_reliefs:c,thermal_relief_spoke_width:l,thermal_relief_spoke_count:u}=n;if(o\u0026\u0026o.length\u003e0\u0026\u0026a\u0026\u0026a\u003e0){const g=TN(o,\"processObstacles.boardOutline\");for(let h=0;h\u003cg.length;h++){const d=g[h===0?g.length-1:h-1],p=g[h],m=g[(h+1)%g.length];if(!d||!p||!m)continue;const _={x:p.x-d.x,y:p.y-d.y},f={x:m.x-p.x,y:m.y-p.y},I=_.x*f.y-_.y*f.x;i.push(ej(p,a)),I\u003c0\u0026\u0026i.push(rve(p.x-a,p.y-a,p.x+a,p.y+a))}for(let h=0;h\u003cg.length;h++){const d=g[h],p=g[(h+1)%g.length];if(!d||!p)continue;const m=sve(d,p,a*2);m.length\u003e0\u0026\u0026i.push(m)}}for(const g of t){if(g.connectivityKey===e){(g.isPlatedHole||g.isSmtPad)\u0026\u0026c\u0026\u0026i.push(...Zmo(g,r,l,u));continue}const d=g.connectivityKey.startsWith(\"hole:\")||g.connectivityKey.startsWith(\"cutout:\"),p=g.connectivityKey.startsWith(\"keepout:\"),m=_=\u003ep?0:d?A??0:_;if(o_o(g)){const _=m(r);i.push(ej({x:g.x,y:g.y},g.radius+_));continue}if(i_o(g)){const _=m(r);i.push(Dbt({x:g.x,y:g.y},g.width+_*2,g.height+_*2,g.radius+_,g.ccwRotation));continue}if(r_o(g)){const _=m(r),f=Pbt({x:g.x,y:g.y},g.width,g.height,g.ccwRotation);i.push(..._\u003e0?Wce(f,_,\"Round\"):[f]);continue}if(e_o(g)){const _=m(r),{bounds:f}=g;i.push(rve(f.minX-_,f.minY-_,f.maxX+_,f.maxY+_));continue}if(t_o(g)){const _=m(r);i.push(Mbt({x:g.x,y:g.y},g.width+_*2,g.height+_*2,g.ccwRotation));continue}if(s_o(g)){const _=m(r),f=new Set,I=g.points.filter(y=\u003e{const x=`${y.x},${y.y}`;return f.has(x)?!1:(f.add(x),!0)});if(I.length\u003c3)continue;const C=TN(I,\"processObstacles.polygonPad\");if(C.length\u003c3)continue;if(_\u003c=0){i.push(C);continue}i.push(...Wce(C,_));continue}if(n_o(g)){for(const _ of g.segments)i.push(ej(_,g.width/2+s));for(let _=0;_\u003cg.segments.length-1;_++){const f=g.segments[_],I=g.segments[_+1];if(!f||!I)continue;const C=sve(f,I,g.width+s*2);C.length\u003e0\u0026\u0026i.push(C)}}}return{polygonsToSubtract:i}},Rbt=class extends eve{constructor(t){super(t),this.input=t}input;pipelineDef=[];getSolverName(){return\"CopperPourPipelineSolver\"}getOutput(){if(!Kmo())throw new Error(\"Manifold geometry has not been initialized. Call initializeManifoldGeometry() before solving copper pours.\");const t=this.input.regionsForPour.map(()=\u003e[]),e=[];for(let n=this.input.regionsForPour.length-1;n\u003e=0;n--){const o=this.input.regionsForPour[n],i=Ymo(o),r=this.input.pads.filter(g=\u003eg.layer===o.layer),{polygonsToSubtract:s}=a_o(r,o.connectivityKey,{padMargin:o.padMargin,traceMargin:o.traceMargin,board_edge_margin:o.board_edge_margin,cutoutMargin:o.cutout_margin,use_thermal_reliefs:o.use_thermal_reliefs,thermal_relief_spoke_width:o.thermal_relief_spoke_width,thermal_relief_spoke_count:o.thermal_relief_spoke_count},o.boardEdgeOutline??o.outline),a=o.pourMargin??Math.max(o.padMargin,o.traceMargin),A=e.filter(g=\u003eg.layer===o.layer\u0026\u0026g.connectivityKey!==o.connectivityKey).map(g=\u003eJmo(g.section,Math.max(a,g.pourMargin))),c=Wmo(i,s),l=jmo(vbt(c,A)),u=wbt(l);t[n]=Gmo(u),e.push({layer:o.layer,connectivityKey:o.connectivityKey,pourMargin:a,section:l})}return{brep_shapes:t.flat(),brep_shapes_by_region:t}}},A_o=t=\u003e{const e=t.subcircuit_connectivity_map_key;return typeof e==\"string\"\u0026\u0026e.length\u003e0?e:void 0},jce=t=\u003e{const e=t.subcircuit_id;return typeof e==\"string\"\u0026\u0026e.length\u003e0?e:void 0},$ce=(t,e)=\u003et?`subcircuit:${t}:connectivity:${e}`:e,c_o=(t,e)=\u003e{if(!e)return;const n={};for(const r of t){if(r.type!==\"source_group\")continue;const s=r.source_group_id,a=jce(r);typeof s==\"string\"\u0026\u0026a\u0026\u0026(n[s]=a)}const o=new Set([e]);let i=!0;for(;i;){i=!1;for(const r of t){if(r.type!==\"source_group\")continue;const s=jce(r);if(!s||o.has(s))continue;const a=r.parent_subcircuit_id,A=r.parent_source_group_id,c=typeof A==\"string\"?n[A]:void 0;(typeof a==\"string\"\u0026\u0026o.has(a)||c\u0026\u0026o.has(c))\u0026\u0026(o.add(s),i=!0)}}return o},l_o=(t,e,n)=\u003e{const o=c_o(t,n),i={},r={},s={},a=new Set;for(const l of t){const u=hz(l),g=A_o(l),h=jce(l);if(u\u0026\u0026(r[u]=h),!(o\u0026\u0026(!h||!o.has(h)))\u0026\u0026u\u0026\u0026g){const d=$ce(h,g);i[u]=d,a.add(g),s[d]??=[],s[d].push(u)}}const A={};for(const[l,u]of Object.entries(e.netMap)){const g=new Set(u.map(d=\u003ei[d]).filter(d=\u003e!!d)),h=Array.from(g).sort()[0];h\u0026\u0026(A[l]=h)}const c={};for(const[l,u]of Object.entries(s)){const g=new Set;for(const d of u){const p=e.getNetConnectedToId(d),m=p?A[p]:void 0;g.add(m??l)}if(g.size\u003e1)throw new Error(`subcircuit_connectivity_map_key \"${l}\" maps to multiple global connectivity keys: ${Array.from(g).join(\", \")}`);const h=g.values().next().value;h\u0026\u0026(c[l]=h)}return{knownSubcircuitConnectivityKeys:new Set([...Object.keys(s),...a]),descendantSubcircuitIds:o,getScopedSubcircuitConnectivityKey:$ce,getElementSubcircuitId:jce,resolveSubcircuitConnectivityKey(l,u){const g=Object.keys(s).filter(d=\u003ed===$ce(u,l));u\u0026\u0026g.length===0\u0026\u0026o\u0026\u0026g.push(...Object.keys(s).filter(d=\u003ed.endsWith(`:connectivity:${l}`))),u||g.push(...Object.keys(s).filter(d=\u003ed.endsWith(`:connectivity:${l}`)));const h=Array.from(new Set(g));if(h.length===0){if(u\u0026\u0026o)throw new Error(`No subcircuit_connectivity_map_key \"${l}\" found in subcircuit \"${u}\" or its child subcircuits.`);return $ce(u,l)}if(h.length\u003e1)throw new Error(`subcircuit_connectivity_map_key \"${l}\" exists in multiple subcircuits. Pass subcircuit_id to disambiguate.`);return c[h[0]]??h[0]},getSubcircuitConnectivityKeyForId(l){if(o){const h=r[l];if(!h||!o.has(h))return}const u=i[l],g=e.getNetConnectedToId(l);return g?A[g]??(u?c[u]:void 0)??u:u?c[u]??u:void 0}}},u_o=(t,e,n)=\u003e{if(e.subcircuit_connectivity_map_key)return n.resolveSubcircuitConnectivityKey(e.subcircuit_connectivity_map_key,e.subcircuit_id);if(e.source_net_id){const o=t.find(i=\u003ei.type===\"source_net\"\u0026\u0026i.source_net_id===e.source_net_id);if(!o)throw new Error(`No source_net found with id \"${e.source_net_id}\"`);if(!o.subcircuit_connectivity_map_key)throw new Error(`source_net \"${e.source_net_id}\" has no subcircuit_connectivity_map_key`);return n.resolveSubcircuitConnectivityKey(o.subcircuit_connectivity_map_key,o.subcircuit_id??e.subcircuit_id)}if(e.source_net_name){const o=t.find(i=\u003ei.type===\"source_net\"\u0026\u0026i.name===e.source_net_name\u0026\u0026(!e.subcircuit_id||!!n.descendantSubcircuitIds?.has(i.subcircuit_id??\"\")));if(!o)throw new Error(`No source_net found with name \"${e.source_net_name}\"`);if(!o.subcircuit_connectivity_map_key)throw new Error(`source_net \"${e.source_net_name}\" has no subcircuit_connectivity_map_key`);return n.resolveSubcircuitConnectivityKey(o.subcircuit_connectivity_map_key,o.subcircuit_id??e.subcircuit_id)}if(e.pour_connectivity_key){if(!n.knownSubcircuitConnectivityKeys.has(e.pour_connectivity_key))throw new Error(\"pour_connectivity_key must be a subcircuit_connectivity_map_key. Use subcircuit_connectivity_map_key, source_net_id, or source_net_name instead of a generated connectivity-map id.\");return n.resolveSubcircuitConnectivityKey(e.pour_connectivity_key,e.subcircuit_id)}throw new Error(\"Copper pour requires source_net_id, source_net_name, or subcircuit_connectivity_map_key\")},Tbt=(t,e)=\u003e{if(Array.isArray(e)){if(e.length===0)return{pads:[],regionsForPour:[]};const d=e[0].subcircuit_id;if(e.some(_=\u003e_.subcircuit_id!==d))throw new Error(\"All copper pours in one input problem must use the same subcircuit_id\");const p=e.map(_=\u003eTbt(t,_)),m=new Map;for(const _ of p)for(const f of _.pads)m.set(`${f.layer}:${f.padId}`,f);return{pads:[...m.values()],regionsForPour:p.flatMap(_=\u003e_.regionsForPour)}}const n=e,o=t.find(d=\u003ed.type===\"pcb_board\");if(!o)throw new Error(\"No pcb_board found in circuit json\");const i=Vf(t),r=l_o(t,i,n.subcircuit_id),s=u_o(t,n,r),{getSubcircuitConnectivityKeyForId:a}=r,A=[];for(const d of t)if(d.type===\"pcb_smtpad\"){const p=d;if(p.layer!==n.layer)continue;let m;m=a(p.pcb_smtpad_id),m||(m=`unconnected:${p.pcb_smtpad_id}`),p.shape===\"rect\"?A.push({shape:\"rect\",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,bounds:{minX:p.x-p.width/2,minY:p.y-p.height/2,maxX:p.x+p.width/2,maxY:p.y+p.height/2}}):p.shape===\"rotated_rect\"?A.push({shape:\"rotated_rect\",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,x:p.x,y:p.y,width:p.width,height:p.height,ccwRotation:p.ccw_rotation}):p.shape===\"circle\"?A.push({shape:\"circle\",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,x:p.x,y:p.y,radius:p.radius}):p.shape===\"pill\"||p.shape===\"rotated_pill\"?A.push({shape:\"pill\",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,x:p.x,y:p.y,width:p.width,height:p.height,radius:p.radius,ccwRotation:p.shape===\"rotated_pill\"?p.ccw_rotation:0}):p.shape===\"polygon\"\u0026\u0026A.push({shape:\"polygon\",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,points:p.points})}else if(d.type===\"pcb_plated_hole\"){const p=d;if(!p.layers.includes(n.layer))continue;let m=a(p.pcb_plated_hole_id);if(m||(m=`unconnected-plated-hole:${p.pcb_plated_hole_id}`),p.shape===\"circle\")A.push({shape:\"circle\",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,radius:p.outer_diameter/2});else if(p.shape===\"pill\")A.push({shape:\"pill\",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,width:p.outer_width,height:p.outer_height,radius:Math.min(p.outer_width,p.outer_height)/2,ccwRotation:p.ccw_rotation});else if(p.shape===\"oval\")A.push({shape:\"oval\",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,width:p.outer_width,height:p.outer_height,ccwRotation:p.ccw_rotation});else if(p.shape===\"circular_hole_with_rect_pad\"||p.shape===\"pill_hole_with_rect_pad\"||p.shape===\"rotated_pill_hole_with_rect_pad\"){const _=p.rect_pad_width,f=p.rect_pad_height;if(typeof _!=\"number\"||typeof f!=\"number\")continue;const I=p.shape===\"pill_hole_with_rect_pad\"?0:p.rect_ccw_rotation??0;I===0?A.push({shape:\"rect\",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,bounds:{minX:p.x-_/2,minY:p.y-f/2,maxX:p.x+_/2,maxY:p.y+f/2}}):A.push({shape:\"rotated_rect\",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,width:_,height:f,ccwRotation:I})}}else if(d.type===\"pcb_hole\"){const p=d;if(p.hole_shape!==\"circle\")continue;A.push({shape:\"circle\",padId:p.pcb_hole_id,layer:n.layer,connectivityKey:`hole:${p.pcb_hole_id}`,x:p.x,y:p.y,radius:p.hole_diameter/2})}else if(d.type===\"pcb_cutout\"){const p=d;p.shape===\"rect\"?A.push({shape:\"rect\",padId:p.pcb_cutout_id,layer:n.layer,connectivityKey:`cutout:${p.pcb_cutout_id}`,bounds:{minX:p.center.x-p.width/2,minY:p.center.y-p.height/2,maxX:p.center.x+p.width/2,maxY:p.center.y+p.height/2}}):p.shape===\"circle\"?A.push({shape:\"circle\",padId:p.pcb_cutout_id,layer:n.layer,connectivityKey:`cutout:${p.pcb_cutout_id}`,x:p.center.x,y:p.center.y,radius:p.radius}):p.shape===\"polygon\"\u0026\u0026A.push({shape:\"polygon\",padId:p.pcb_cutout_id,layer:n.layer,connectivityKey:`cutout:${p.pcb_cutout_id}`,points:p.points})}else if(d.type===\"pcb_keepout\"){const p=d;if(!p.layers.includes(n.layer))continue;p.shape===\"rect\"?A.push({shape:\"rect\",padId:p.pcb_keepout_id,layer:n.layer,connectivityKey:`keepout:${p.pcb_keepout_id}`,bounds:{minX:p.center.x-p.width/2,minY:p.center.y-p.height/2,maxX:p.center.x+p.width/2,maxY:p.center.y+p.height/2}}):p.shape===\"circle\"\u0026\u0026A.push({shape:\"circle\",padId:p.pcb_keepout_id,layer:n.layer,connectivityKey:`keepout:${p.pcb_keepout_id}`,x:p.center.x,y:p.center.y,radius:p.radius})}else if(d.type===\"pcb_via\"){const p=d;if(!p.layers.includes(n.layer))continue;const m=a(p.pcb_via_id)??`unconnected-via:${p.pcb_via_id}`;A.push({shape:\"circle\",padId:p.pcb_via_id,layer:n.layer,connectivityKey:m,x:p.x,y:p.y,radius:p.outer_diameter/2})}else if(d.type===\"pcb_trace\"){const p=d,m=a(p.pcb_trace_id);if(!m)continue;let _=[],f=null;const I=()=\u003e{_.length\u003e1\u0026\u0026A.push({shape:\"trace\",padId:`${p.pcb_trace_id}-${A.length}`,layer:n.layer,connectivityKey:m,segments:_,width:f}),_=[],f=null};for(const C of p.route){const y=C;if(y.route_type===\"wire\"\u0026\u0026y.layer===n.layer){const E={x:y.x,y:y.y};f===null?f=y.width:y.width!==f\u0026\u0026(_.push(E),I(),f=y.width),_.push(E)}else I()}I()}const{width:c,height:l}=o,u=n.outline??o.outline;let g;if(u\u0026\u0026u.length\u003e0){const d=u.map(m=\u003em.x),p=u.map(m=\u003em.y);g={minX:Math.min(...d),minY:Math.min(...p),maxX:Math.max(...d),maxY:Math.max(...p)}}else g={minX:-c/2,minY:-l/2,maxX:c/2,maxY:l/2};const h=[{shape:\"rect\",layer:n.layer,bounds:g,boardEdgeOutline:n.board_edge_outline,outline:u,connectivityKey:s,padMargin:n.pad_margin,traceMargin:n.trace_margin,pourMargin:n.pour_margin??Math.max(n.pad_margin,n.trace_margin),board_edge_margin:n.board_edge_margin??0,cutout_margin:n.cutout_margin,use_thermal_reliefs:n.use_thermal_reliefs,thermal_relief_spoke_width:n.thermal_relief_spoke_width,thermal_relief_spoke_count:n.thermal_relief_spoke_count}];return{pads:A,regionsForPour:h}};function ave(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;if(t.arrows)for(const n of t.arrows)n.step=e;return t}var tj=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function qce(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var g_o=class extends tj{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e){this.solved=!0;return}if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null\u0026\u0026(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()\u0026\u0026(this.step(),!(this.failed||this.solved)););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??\"none\"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex\u003ethis.pipelineDef.findIndex(A=\u003eA.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n\u0026\u0026(ave(n,0),e=1);let o=null;this.solved\u0026\u0026(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=\u003e{const A=this[r.solverName]?.visualize();return A?(ave(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved\u0026\u0026o\u0026\u0026(ave(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=\u003er.points||[]),rects:i.flatMap(r=\u003er.rects||[]),lines:i.flatMap(r=\u003er.lines||[]),circles:i.flatMap(r=\u003er.circles||[]),texts:i.flatMap(r=\u003er.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},kbt=[\"x_pos\",\"x_neg\",\"y_pos\",\"y_neg\",\"z_pos\",\"z_neg\"],d_o=t=\u003etypeof t==\"string\"\u0026\u0026kbt.includes(t),h_o=(t,e=\"face\")=\u003e{if(!d_o(t))throw new Error(`${e} must be one of ${kbt.join(\", \")}, got ${JSON.stringify(t)}. The named directions (front/back/left/right/top/bottom) were retired: faces are named for the axis their outward normal points along, so the old \\`top\\` (+Z) is \\`z_pos\\` and the old \\`front\\` (+Y) is \\`y_pos\\`.`);return t},hb=t=\u003et.slice(0,1),kH=t=\u003et.endsWith(\"_pos\")?1:-1,Fbt=t=\u003e{const e=hb(t);return e===\"x\"?[\"y\",\"z\"]:e===\"y\"?[\"x\",\"z\"]:[\"x\",\"y\"]},z5=t=\u003ehb(t)===\"z\",Lbt=t=\u003et===\"x\"?0:t===\"y\"?1:2,Xce=(t,e)=\u003e[t.width,t.height,t.depth][Lbt(e)],p_o=(t,e,n,o)=\u003e{const i=n*Math.PI/180,r=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i));return o===\"x\"?t*r+e*s:t*s+e*r},m_o=({body:t,face:e})=\u003e{if(!t)return;if(z5(e))return t.aboveBoardHeight??t.size?.z;const n=hb(e)===\"y\"?\"y\":\"x\",o=t.footprint\u0026\u0026(n===\"y\"?t.footprint.height:t.footprint.width);if(!t.size)return o;const i=p_o(t.size.x,t.size.y,t.rotation??0,n);return o===void 0?i:Math.max(i,o)},__o=t=\u003et?.aboveBoardHeight,f_o=t=\u003e({type:\"cuboid\",size:t}),I_o=(t,e)=\u003e({type:\"cylinder\",radius:t,height:e,resolution:32}),Ave=(t,e)=\u003e({type:\"translate\",vector:t,shape:e}),C_o={x:[Math.PI/2,0,Math.PI/2],y:[Math.PI/2,0,0]},y_o=(t,e)=\u003e{const n=hb(t);return n===\"z\"?e:{type:\"rotate\",angles:C_o[n],shape:e}},Hbt=({width:t,height:e,cutDepth:n})=\u003ef_o([t,e,n]),cve=({diameter:t,cutDepth:e})=\u003eI_o(t/2,e),x_o=({width:t,height:e,cutDepth:n})=\u003e{if(Math.abs(t-e)\u003cNumber.EPSILON)return cve({diameter:t,cutDepth:n});const o=t\u003ee,i=Math.min(t,e)/2,r=Math.abs(t-e),s=Hbt({width:o?r:t,height:o?e:r,cutDepth:n}),a=cve({diameter:i*2,cutDepth:n}),A=c=\u003eo?[c,0,0]:[0,c,0];return{type:\"union\",shapes:[s,Ave(A(-r/2),a),Ave(A(r/2),a)]}},E_o=({placement:t,faceThickness:e,booleanTolerance:n})=\u003e{const{aperture:o,face:i,center:r,width:s,height:a,inwardProjection:A}=t,l=(t.incidenceDegrees??0)*Math.PI/180,u=Math.abs(Math.cos(l)),g=Math.abs(Math.tan(l)),h=(e+n*2)/u+s*g+A;let d;switch(o.shape){case\"rect\":d=Hbt({width:s,height:a,cutDepth:h});break;case\"circle\":d=cve({diameter:s,cutDepth:h});break;case\"pill\":d=x_o({width:s,height:a,cutDepth:h});break}const p=t.rotation===0?d:{type:\"rotate\",angles:[0,0,t.rotation*Math.PI/180],shape:d},m=hb(i),_=kH(i),f=[r.x,r.y,r.z];if(m===\"z\")f[Lbt(m)]-=_*A/2;else{const y=m===\"x\"?_:0,x=m===\"y\"?_:0,E=Math.cos(l),B=Math.sin(l),S=y*E-x*B,Q=y*B+x*E;f[0]-=S*A/2,f[1]-=Q*A/2}const I=y_o(i,p),C=t.incidenceDegrees===void 0||t.incidenceDegrees===0?I:{type:\"rotate\",angles:[0,0,t.incidenceDegrees*Math.PI/180],shape:I};return{aperture:o,width:s,height:a,cutDepth:h,jscadPlan:Ave(f,C)}},lve=t=\u003e{const e=t.margin??0;if(t.shape===\"circle\"){const n=2*(t.radius+e);return{width:n,height:n}}return{width:t.width+e*2,height:t.height+e*2}},Obt=t=\u003e{const e=__o(t.componentBody);return e!==void 0?e/2:lve(t).height/2},Xm=t=\u003e`${Number(t.toFixed(3))}mm`,FH=(t,e)=\u003e{if(!Number.isFinite(t))throw new Error(`${e} must be finite, but is ${t}`)},F7=(t,e)=\u003e{if(FH(t,e),t\u003c=0)throw new Error(`${e} must be greater than 0, but is ${Xm(t)}`)},LH=(t,e)=\u003e{if(FH(t,e),t\u003c0)throw new Error(`${e} must not be negative, but is ${Xm(t)}`)},B_o=(t,e)=\u003e{const n=`apertures[${e}]`;h_o(t.face,`${n}.face`),FH(t.center.x,`${n}.center.x`),FH(t.center.y,`${n}.center.y`),LH(t.margin??0,`${n}.margin`),t.shape===\"circle\"?F7(t.radius,`${n}.radius`):(F7(t.width,`${n}.width`),F7(t.height,`${n}.height`)),t.depth!==void 0\u0026\u0026LH(t.depth,`${n}.depth`),t.widthDimensionOffset!==void 0\u0026\u0026FH(t.widthDimensionOffset,`${n}.widthDimensionOffset`),t.heightDimensionOffset!==void 0\u0026\u0026FH(t.heightDimensionOffset,`${n}.heightDimensionOffset`)},Gbt=({floorThickness:t,standoffHeight:e,boardThickness:n})=\u003e{const o=t,i=o+e;return{floorTopZ:o,boardBottomZ:i,boardTopZ:i+n}},b_o=({seamOffsetFromTop:t,totalHeight:e,...n})=\u003e({...Gbt(n),seamZ:e-t,totalHeight:e}),Zce=[\"y_pos\",\"x_pos\",\"y_neg\",\"x_neg\"],uve=5,gve=(t,e)=\u003eXce(e,Fbt(t)[0]),S_o=t=\u003e{const e=new Map;let o=-Zce.reduce((i,r)=\u003ei+gve(r,t),uve*(Zce.length-1))/2;for(const i of Zce){const r=gve(i,t);e.set(i,o+r/2),o+=r+uve}return e},Ybt=(t,e)=\u003e{const n=t.get(e);if(n===void 0)throw new Error(`Missing ${e} wall panel`);return n},Q_o=({graphics:t,placement:e,panelCenterX:n,planViewY:o,isProcessed:i})=\u003e{const{aperture:r,width:s,height:a}=e,A=e.face===\"y_pos\"||e.face===\"y_neg\"?e.center.x:e.center.y,c=e.face===\"y_pos\"||e.face===\"x_neg\"?-1:1,l=z5(e.face)?{x:e.center.x,y:o+e.center.y}:{x:n+c*A,y:e.center.z},u=i?\"rgba(239, 68, 68, 0.4)\":\"rgba(148, 163, 184, 0.12)\",g=i?\"#dc2626\":\"#94a3b8\",d=`${z5(e.face)?`${e.face} `:\"\"}${r.shape} ${s.toFixed(1)}×${a.toFixed(1)}`;if(r.shape===\"rect\"){t.rects?.push({center:l,width:s,height:a,fill:u,stroke:g,label:d});return}if(r.shape===\"circle\"){t.circles?.push({center:l,radius:s/2,fill:u,stroke:g,label:d});return}const p=s\u003e=a,m=Math.min(s,a)/2,_=Math.abs(s-a);t.rects?.push({center:l,width:p?_:s,height:p?a:_,fill:u,stroke:g,label:d}),t.circles?.push({center:{x:l.x+(p?-_/2:0),y:l.y+(p?0:-_/2)},radius:m,fill:u,stroke:g},{center:{x:l.x+(p?_/2:0),y:l.y+(p?0:_/2)},radius:m,fill:u,stroke:g})},nj=({title:t,resolved:e,processedApertureCount:n=0})=\u003e{const{board:o,dimensions:i}=e,r={title:t,coordinateSystem:\"cartesian\",rects:[],circles:[],lines:[],points:[],texts:[]},s=S_o(i),a=-i.height/2-uve;for(const A of Zce){const c=Ybt(s,A);r.rects?.push({center:{x:c,y:i.depth/2},width:gve(A,i),height:i.depth,fill:\"rgba(59, 130, 246, 0.08)\",stroke:\"#2563eb\",label:A}),r.texts?.push({x:c,y:i.depth+1.5,text:A,anchorSide:\"bottom_center\",color:\"#1e3a8a\",fontSize:1.5})}for(const[A,c]of e.apertures.entries())Q_o({graphics:r,placement:c,panelCenterX:z5(c.face)?0:Ybt(s,c.face),planViewY:a,isProcessed:A\u003cn});return r.rects?.push({center:{x:0,y:a},width:i.width,height:i.height,fill:\"rgba(59, 130, 246, 0.05)\",stroke:\"#1d4ed8\",label:\"enclosure top view\"},{center:{x:0,y:a},width:o.width,height:o.height,fill:\"rgba(34, 197, 94, 0.18)\",stroke:\"#15803d\",label:\"board\"}),r},v_o=class extends tj{constructor(t){super(),this.params=t}params;enclosurePlans;_step(){const t=this.params.apertureCutouts.map(i=\u003ei.jscadPlan),e=i=\u003et.length===0?i:{type:\"subtract\",shapes:[i,...t]},n=e(this.params.shellPlans.basePlan),o=e(this.params.shellPlans.lidPlan);this.enclosurePlans={parts:[{id:\"base\",jscadPlan:n},{id:\"lid\",jscadPlan:o}],assembledPlan:{type:\"union\",shapes:[n,o]}},this.solved=!0}getOutput(){if(!this.enclosurePlans)throw new Error(\"Enclosure plan has not been composed\");return this.enclosurePlans}getConstructorParams(){return[this.params]}visualize(){return nj({title:\"Composed enclosure\",resolved:this.params.resolved,processedApertureCount:this.params.apertureCutouts.length})}},w_o=(t,e)=\u003et===\"z_pos\"?e.lidThickness:t===\"z_neg\"?e.floorThickness:e.wallThickness,P_o=class extends tj{constructor(t){super(),this.params=t,this.MAX_ITERATIONS=t.resolved.apertures.length+1}params;apertureCutouts=[];_step(){const t=this.params.resolved.apertures,e=t[this.apertureCutouts.length];if(!e){this.solved=!0;return}this.apertureCutouts.push(E_o({placement:e,faceThickness:w_o(e.face,this.params.resolved.dimensions),booleanTolerance:this.params.resolved.rules.booleanTolerance})),this.apertureCutouts.length===t.length\u0026\u0026(this.solved=!0)}computeProgress(){const t=this.params.resolved.apertures.length;return t===0?this.solved?1:0:this.apertureCutouts.length/t}getOutput(){return this.apertureCutouts}getConstructorParams(){return[this.params]}visualize(){return nj({title:`Aperture cutouts (${this.apertureCutouts.length}/${this.params.resolved.apertures.length})`,resolved:this.params.resolved,processedApertureCount:this.apertureCutouts.length})}},M_o=class extends tj{constructor(t){super(),this.params=t}params;shellPlans;_step(){const{dimensions:t,rules:e,frame:n}=this.params.resolved,{width:o,height:i,wallThickness:r,floorThickness:s,lidThickness:a,lidLipDepth:A}=t,c=o-2*r,l=i-2*r,u=n.seamZ,g=u-s+e.booleanTolerance*2,h={type:\"subtract\",shapes:[{type:\"translate\",vector:[0,0,u/2],shape:{type:\"cuboid\",size:[o,i,u]}},{type:\"translate\",vector:[0,0,s+g/2],shape:{type:\"cuboid\",size:[c,l,g]}}]},d={type:\"translate\",vector:[0,0,n.seamZ+a/2],shape:{type:\"cuboid\",size:[o,i,a]}},p=A;let m=d;if(p\u003e0){const _=c-e.slidingFitClearance,f=l-e.slidingFitClearance,I=Math.min(r*e.lipWallThicknessRatio,e.lipWallThicknessMax),C=_-2*I,y=f-2*I,x={type:\"subtract\",shapes:[{type:\"translate\",vector:[0,0,n.seamZ-p/2],shape:{type:\"cuboid\",size:[_,f,p]}},{type:\"translate\",vector:[0,0,n.seamZ-p/2],shape:{type:\"cuboid\",size:[C,y,p+e.booleanTolerance*2]}}]};m={type:\"union\",shapes:[d,x]}}this.shellPlans={basePlan:h,lidPlan:m},this.solved=!0}getOutput(){if(!this.shellPlans)throw new Error(\"Enclosure shell has not been created\");return this.shellPlans}getConstructorParams(){return[this.params]}visualize(){return nj({title:\"Base and lid blanks\",resolved:this.params.resolved})}},D_o=({axis:t,offset:e,extent:n,dimensions:o,face:i,prefix:r})=\u003e{const s=Xce(o,t)/2,a=n/2,A=e-a,c=e+a,l=`the opening spans ${Xm(A)} to ${Xm(c)} but the enclosure only spans ${Xm(-s)} to ${Xm(s)}`;if(Math.abs(e)-a\u003es)throw new Error(`${r} misses the ${i} face along ${t.toUpperCase()}: ${l}`);if(a-Math.abs(e)\u003es)throw new Error(`${r} engulfs the ${i} face along ${t.toUpperCase()}: ${l}`)},N_o=({centerZ:t,extent:e,dimensions:n,prefix:o})=\u003e{const i=t-e/2;if(i\u003cn.floorThickness)throw new Error(`${o} intersects the enclosure floor: its lowest edge is at ${Xm(i)} but the floor top is at ${Xm(n.floorThickness)}. Raise heightDimensionOffset, or reduce the opening height.`);if(i\u003en.depth)throw new Error(`${o} sits entirely above the enclosure: its lowest edge is at ${Xm(i)} but the enclosure is only ${Xm(n.depth)} tall`)},R_o=({face:t,center:e,width:n,height:o,dimensions:i,prefix:r})=\u003e{const s=Fbt(t),a=[n,o];s.forEach((A,c)=\u003e{const l=a[c];if(A===\"z\"){N_o({centerZ:e.z,extent:l,dimensions:i,prefix:r});return}D_o({axis:A,offset:A===\"x\"?e.x:e.y,extent:l,dimensions:i,face:t,prefix:r})})},T_o={wallThickness:2,boardClearance:1,lidThickness:2,standoffHeight:4,topHeadroom:6,lidLipDepth:4,booleanTolerance:.5,slidingFitClearance:.3,lipWallThicknessRatio:.7,lipWallThicknessMax:1.5},k_o=({face:t,boardSide:e=\"top\",componentBody:n,frame:o})=\u003e{const i=m_o({body:n,face:t});if(i===void 0)return;if(!z5(t))return i;const r=e===\"bottom\"?o.boardBottomZ:o.boardTopZ,s=t===\"z_pos\"?o.seamZ:o.floorTopZ;return Math.max(0,Math.abs(s-r))},F_o=({face:t,depth:e=0,dimensions:n,rules:o})=\u003e{if(z5(t))return t===\"z_neg\"?e:Math.max(e,n.lidLipDepth);const i=Math.min(n.wallThickness*o.lipWallThicknessRatio,o.lipWallThicknessMax),r=o.slidingFitClearance/2+i+o.booleanTolerance;return Math.max(e,r)},L_o=[\"x_pos\",\"x_neg\",\"y_pos\",\"y_neg\"],H_o=({face:t,origin:e,apertureAxisDirection:n,dimensions:o})=\u003e{if(z5(t)||!n)return t;const i=Math.hypot(n.x,n.y);if(!Number.isFinite(i)||i===0)return t;const r={x:n.x/i,y:n.y/i},s=L_o.flatMap(a=\u003e{const A=hb(a),c=kH(a);if(r[A]*c\u003c=0)return[];const g=(c*(Xce(o,A)/2-o.wallThickness)-e[A])/r[A];return Number.isFinite(g)\u0026\u0026g\u003e=0?[{face:a,distance:g}]:[]});return s.length===0?t:(s.sort((a,A)=\u003e{const c=a.distance-A.distance;return Math.abs(c)\u003e1e-9?c:a.face===t?-1:A.face===t?1:0}),s[0].face)},O_o=({face:t,apertureAxisDirection:e})=\u003e{if(z5(t)||!e)return 0;const n=hb(t),o=kH(t),i={x:n===\"x\"?o:0,y:n===\"y\"?o:0},r=Math.hypot(e.x,e.y);if(!Number.isFinite(r)||r===0)throw new Error(`apertureAxisDirection must have a finite, non-zero XY projection for side face ${t}`);const s={x:e.x/r,y:e.y/r},a=i.x*s.y-i.y*s.x,A=i.x*s.x+i.y*s.y;return Math.atan2(a,A)*180/Math.PI},G_o=({face:t,incidenceDegrees:e,distanceToWall:n})=\u003e{if(z5(t))return 0;const o=n*Math.tan(e*Math.PI/180),i=hb(t),r=kH(t),s=i===\"x\"?r:-r;return o*s},Ubt=({boardSide:t,heightDatum:e,heightDimensionOffset:n,boardTopZ:o,boardBottomZ:i})=\u003e{const r=e+n;return t===\"bottom\"?i-r:o+r},Y_o=({face:t,boardCenter:e,centerZ:n,widthDimensionOffset:o,heightDimensionOffset:i,rotation:r,incidenceDegrees:s=0,dimensions:a,frame:A})=\u003e{const c=hb(t);if(c===\"z\"){const g=r*Math.PI/180,h=Math.cos(g),d=Math.sin(g);return{x:e.x+o*h-i*d,y:e.y+o*d+i*h,z:t===\"z_pos\"?A.seamZ+a.lidThickness/2:a.floorThickness/2}}const l=kH(t)*(Xce(a,c)/2-a.wallThickness/2),u=G_o({face:t,incidenceDegrees:s,distanceToWall:(l-e[c===\"x\"?\"x\":\"y\"])*kH(t)});return c===\"x\"?{x:l,y:e.y+o+u,z:n}:{x:e.x+o+u,y:l,z:n}},U_o=({apertures:t,floorThickness:e,standoffHeight:n,boardThickness:o,lidThickness:i,lidLipDepth:r})=\u003e{const{boardTopZ:s,boardBottomZ:a}=Gbt({floorThickness:e,standoffHeight:n,boardThickness:o});let A=0;for(const c of t){if(z5(c.face))continue;const u=Ubt({boardSide:c.boardSide??\"top\",heightDatum:Obt(c),heightDimensionOffset:c.heightDimensionOffset??0,boardTopZ:s,boardBottomZ:a})+lve(c).height/2+r;A=Math.max(A,u+i)}return A},Kbt=[\"width\",\"height\",\"depth\"],K_o=({board:t,wallThickness:e,boardClearance:n,floorThickness:o,standoffHeight:i,topHeadroom:r,lidThickness:s})=\u003e{const a=e+n,A=c=\u003e`to fit the ${Xm(c)} board inside ${Xm(e)} walls with ${Xm(n)} clearance on each side`;return{width:{value:t.width+2*a,because:A(t.width)},height:{value:t.height+2*a,because:A(t.height)},depth:{value:o+i+t.thickness+r+s,because:`to stack ${Xm(o)} floor + ${Xm(i)} standoffs + ${Xm(t.thickness)} board + ${Xm(r)} headroom + ${Xm(s)} lid`}}},V_o=({input:t,rules:e})=\u003e{F7(t.board.width,\"board.width\"),F7(t.board.height,\"board.height\"),F7(t.board.thickness,\"board.thickness\");const n=t.wallThickness??e.wallThickness,o=t.floorThickness??n,i=t.lidThickness??e.lidThickness,r=t.boardClearance??e.boardClearance,s=t.standoffHeight??e.standoffHeight,a=t.topHeadroom??e.topHeadroom,A=t.lidLipDepth??e.lidLipDepth;F7(n,\"wallThickness\"),F7(o,\"floorThickness\"),F7(i,\"lidThickness\"),LH(r,\"boardClearance\"),LH(s,\"standoffHeight\"),LH(a,\"topHeadroom\"),LH(A,\"lidLipDepth\");const c=K_o({board:t.board,wallThickness:n,boardClearance:r,floorThickness:o,standoffHeight:s,topHeadroom:a,lidThickness:i}),l=t.topHeadroom===void 0?Math.max(c.depth.value,U_o({apertures:t.apertures??[],floorThickness:o,standoffHeight:s,boardThickness:t.board.thickness,lidThickness:i,lidLipDepth:A})):c.depth.value,u={width:t.width??c.width.value,height:t.height??c.height.value,depth:t.depth??l,wallThickness:n,floorThickness:o,lidThickness:i,boardClearance:r,standoffHeight:s,topHeadroom:a,lidLipDepth:A};for(const g of Kbt)F7(u[g],g);for(const g of Kbt){const{value:h,because:d}=c[g];if(u[g]\u003ch)throw new Error(`${g} must be at least ${Xm(h)} ${d}, but is ${Xm(u[g])}`)}return u},z_o=({board:t,dimensions:e})=\u003eb_o({floorThickness:e.floorThickness,standoffHeight:e.standoffHeight,boardThickness:t.thickness,seamOffsetFromTop:e.lidThickness,totalHeight:e.depth}),J_o=t=\u003e{const e={...T_o,...t.fdmRules},n=t.apertures??[];for(const[s,a]of n.entries())B_o(a,s);const o=V_o({input:t,rules:e}),i=z_o({board:t.board,dimensions:o});o.lidLipDepth=Math.min(o.lidLipDepth,Math.max(0,i.seamZ-o.floorThickness));const r=n.map((s,a)=\u003e{const A=H_o({face:s.face,origin:s.center,apertureAxisDirection:s.apertureAxisDirection,dimensions:o}),c=`apertures[${a}]`,{width:l,height:u}=lve(s),g=O_o({face:A,apertureAxisDirection:s.apertureAxisDirection}),h=s.widthDimensionOffset??0,d=s.heightDimensionOffset??0,p=z5(A)?s.rotation??0:0,m=Y_o({face:A,boardCenter:s.center,widthDimensionOffset:h,heightDimensionOffset:d,rotation:p,incidenceDegrees:g,centerZ:Ubt({boardSide:s.boardSide??\"top\",heightDatum:Obt(s),heightDimensionOffset:d,boardTopZ:i.boardTopZ,boardBottomZ:i.boardBottomZ}),dimensions:o,frame:i}),_=z5(A)?l:l/Math.abs(Math.cos(g*Math.PI/180));R_o({face:A,center:m,width:_,height:u,dimensions:o,prefix:c});const f=s.depth??k_o({face:A,boardSide:s.boardSide,componentBody:s.componentBody,frame:i})??0;return{aperture:s,face:A,center:m,width:l,height:u,rotation:p,incidenceDegrees:g,inwardProjection:F_o({face:A,depth:f,dimensions:o,rules:e})}});return{construction:\"fdm_box\",board:t.board,apertures:r,dimensions:o,rules:e,frame:i}},W_o=class extends tj{constructor(t){super(),this.input=t}input;resolved;_step(){this.resolved=J_o(this.input),this.solved=!0}getOutput(){if(!this.resolved)throw new Error(\"FDM enclosure problem is not resolved\");return this.resolved}getConstructorParams(){return[this.input]}visualize(){return this.resolved?nj({title:\"Resolved FDM enclosure problem\",resolved:this.resolved}):super.visualize()}},oj=(t,e)=\u003e{if(!t)throw new Error(`${e} has not completed`);return t},Vbt=class extends g_o{resolveFdmEnclosureProblemSolver;createFdmEnclosureShellSolver;createFdmApertureCutoutsSolver;composeFdmEnclosureSolver;getResolvedProblem(){return oj(this.resolveFdmEnclosureProblemSolver,\"resolveFdmEnclosureProblemSolver\").getOutput()}pipelineDef=[qce(\"resolveFdmEnclosureProblemSolver\",W_o,t=\u003e[t.inputProblem]),qce(\"createFdmEnclosureShellSolver\",M_o,t=\u003e[{resolved:t.getResolvedProblem()}]),qce(\"createFdmApertureCutoutsSolver\",P_o,t=\u003e[{resolved:t.getResolvedProblem()}]),qce(\"composeFdmEnclosureSolver\",v_o,t=\u003e[{resolved:t.getResolvedProblem(),shellPlans:oj(t.createFdmEnclosureShellSolver,\"createFdmEnclosureShellSolver\").getOutput(),apertureCutouts:oj(t.createFdmApertureCutoutsSolver,\"createFdmApertureCutoutsSolver\").getOutput()}])];getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error(\"FDM enclosure solver has not completed\");const t=this.getResolvedProblem(),e=oj(this.composeFdmEnclosureSolver,\"composeFdmEnclosureSolver\").getOutput();return{dimensions:t.dimensions,frame:t.frame,parts:e.parts,apertures:oj(this.createFdmApertureCutoutsSolver,\"createFdmApertureCutoutsSolver\").getOutput(),jscadPlan:e.assembledPlan}}initialVisualize(){return null}finalVisualize(){const t=this.getResolvedProblem();return nj({title:\"Final FDM enclosure\",resolved:t,processedApertureCount:t.apertures.length})}},jv=(t,e,n={x:0,y:0})=\u003e{const o=Math.cos(e),i=Math.sin(e),r=t.x-n.x,s=t.y-n.y;return{x:n.x+r*o-s*i,y:n.y+r*i+s*o}},ele=t=\u003e{t.pads=t.pads.map(e=\u003e{const n=jv(e.offset,t.ccwRotationOffset*Math.PI/180),o=(t.ccwRotationOffset%360+360)%360;return{...e,size:o===90||o===270?{x:e.size.y,y:e.size.x}:e.size,absoluteCenter:{x:t.center.x+n.x,y:t.center.y+n.y}}})};function j_o({components:t,packOrderStrategy:e,packFirst:n=[]}){const o=new Map;return n.forEach((i,r)=\u003e{o.set(i,r)}),[...t].sort((i,r)=\u003e{const s=o.get(i.componentId),a=o.get(r.componentId);return s!==void 0\u0026\u0026a!==void 0?s-a:s!==void 0?-1:a!==void 0?1:e===\"largest_to_smallest\"?r.pads.length-i.pads.length:i.pads.length-r.pads.length})}var $_o=t=\u003e{const e=Math.min(...t.map(r=\u003er.minX)),n=Math.min(...t.map(r=\u003er.minY)),o=Math.max(...t.map(r=\u003er.maxX)),i=Math.max(...t.map(r=\u003er.maxY));return{minX:e,minY:n,maxX:o,maxY:i}};function dve(t){const{bounds:e,center:n,width:o,height:i,angleRad:r}=t,s=t.translate?.x??0,a=t.translate?.y??0,A=o/2,c=i/2,l=[{x:n.x-A,y:n.y-c},{x:n.x+A,y:n.y-c},{x:n.x+A,y:n.y+c},{x:n.x-A,y:n.y+c}];for(const u of l){const g=jv(u,r),h=g.x+s,d=g.y+a;e.minX=Math.min(e.minX,h),e.maxX=Math.max(e.maxX,h),e.minY=Math.min(e.minY,d),e.maxY=Math.max(e.maxY,d)}}var kN=(t,e=0)=\u003e{const n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},o=t.ccwRotationOffset*Math.PI/180;for(const i of t.pads){const r=jv(i.offset,o),s=t.center.x+r.x,a=t.center.y+r.y,A=i.size.x/2,c=i.size.y/2;n.minX=Math.min(n.minX,s-A),n.maxX=Math.max(n.maxX,s+A),n.minY=Math.min(n.minY,a-c),n.maxY=Math.max(n.maxY,a+c)}return t.courtyard\u0026\u0026dve({bounds:n,center:t.courtyard.offsetFromCenter,width:t.courtyard.width,height:t.courtyard.height,angleRad:o,translate:t.center}),{minX:n.minX-e,maxX:n.maxX+e,minY:n.minY-e,maxY:n.maxY+e}},zbt=(t,e,n)=\u003e(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x);function Jbt(t,e=1e-10){if(t.length\u003c=1)return t;const n=[];let o=t[0][0],i=t[0][1];for(let r=1;r\u003ct.length;r++){const s=t[r],[a,A]=s,c=1e-9;if(!(Math.abs(i.x-a.x)\u003cc\u0026\u0026Math.abs(i.y-a.y)\u003cc)){n.push([o,i]),o=a,i=A;continue}const u=zbt(o,i,A),g=Math.hypot(i.x-o.x,i.y-o.y),h=Math.hypot(A.x-i.x,A.y-i.y),d=Math.max(e,e*g*h);Math.abs(u)\u003cd||(n.push([o,i]),o=a),i=A}if(t.length\u003e2){const r=n[0],s=[o,i];if(r\u0026\u0026n.length\u003e0)if(Math.abs(i.x-r[0].x)\u003c1e-9\u0026\u0026Math.abs(i.y-r[0].y)\u003c1e-9){const c=zbt(o,i,r[1]),l=Math.hypot(i.x-o.x,i.y-o.y),u=Math.hypot(r[1].x-i.x,r[1].y-i.y),g=Math.max(e,e*l*u);Math.abs(c)\u003cg?n[0]=[o,r[1]]:n.push(s)}else n.push(s);else n.push(s)}else n.push([o,i]);return n}function q_o(t){let e=0;for(let n=0;n\u003ct.length;n++){const o=(n+1)%t.length,i=t[n],r=t[o];e+=i.x*r.y,e-=r.x*i.y}return e/2}function X_o(t){const e=[];let n=t.first;if(!n)return e;do{const o=n.shape,i=o.start??o.ps;e.push({x:i.x,y:i.y}),n=n.next}while(n!==t.first);return e}function Z_o(t){const e=[],n=[],o=Array.from(t.faces);for(const i of o){const r=X_o(i);if(r.length\u003c3)continue;const s=q_o(r);s\u003e0?e.push(r):s\u003c0\u0026\u0026n.push(r)}return{obstacleFreeLoops:e,obstacleContainingLoops:n}}function Wbt(t){const e=[];for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];e.push([o,i])}return e}function efo(t){const e=Z_o(t);return{obstacleFreeLoops:e.obstacleFreeLoops.map(Wbt),obstacleContainingLoops:e.obstacleContainingLoops.map(Wbt)}}var tfo=t=\u003e{const{component:e,courtyard:n,minGap:o}=t,i=n.width/2+o,r=n.height/2+o,a=[{x:n.offsetFromCenter.x-i,y:n.offsetFromCenter.y-r},{x:n.offsetFromCenter.x+i,y:n.offsetFromCenter.y-r},{x:n.offsetFromCenter.x+i,y:n.offsetFromCenter.y+r},{x:n.offsetFromCenter.x-i,y:n.offsetFromCenter.y+r}].map(h=\u003e{const d=jv(h,e.ccwRotationOffset*Math.PI/180);return{x:d.x+e.center.x,y:d.y+e.center.y}}),A=a.map(({x:h,y:d})=\u003e[h,d]),c=new Ge.Polygon(A),l=a.map(h=\u003eh.x),u=a.map(h=\u003eh.y),g={minX:Math.min(...l),minY:Math.min(...u),maxX:Math.max(...l),maxY:Math.max(...u)};return{poly:c,bbox:g}},nfo=(t,e)=\u003et.pads.map(n=\u003e{const o=n.size.x/2+e,i=n.size.y/2+e,s=[{x:n.offset.x-o,y:n.offset.y-i},{x:n.offset.x+o,y:n.offset.y-i},{x:n.offset.x+o,y:n.offset.y+i},{x:n.offset.x-o,y:n.offset.y+i}].map(g=\u003e{const h=jv(g,t.ccwRotationOffset*Math.PI/180);return{x:h.x+t.center.x,y:h.y+t.center.y}}),a=s.map(({x:g,y:h})=\u003e[g,h]),A=new Ge.Polygon(a),c=s.map(g=\u003eg.x),l=s.map(g=\u003eg.y),u={minX:Math.min(...c),minY:Math.min(...l),maxX:Math.max(...c),maxY:Math.max(...l)};return{poly:A,bbox:u}}),ofo=(t,e)=\u003et.map(n=\u003e{const o=n.width/2+e,i=n.height/2+e,r=n.absoluteCenter.x,s=n.absoluteCenter.y,a=[{x:r-o,y:s-i},{x:r+o,y:s-i},{x:r+o,y:s+i},{x:r-o,y:s+i}],A=a.map(({x:h,y:d})=\u003e[h,d]),c=new Ge.Polygon(A),l=a.map(h=\u003eh.x),u=a.map(h=\u003eh.y),g={minX:Math.min(...l),minY:Math.min(...u),maxX:Math.max(...l),maxY:Math.max(...u)};return{poly:c,bbox:g}}),ifo=(t,e={})=\u003e{const{minGap:n=0,obstacles:o=[]}=e;if(t.length===0\u0026\u0026o.length===0)return[];const i=t.map(m=\u003ekN(m,n)),r=o.map(m=\u003e({minX:m.absoluteCenter.x-m.width/2-n,minY:m.absoluteCenter.y-m.height/2-n,maxX:m.absoluteCenter.x+m.width/2+n,maxY:m.absoluteCenter.y+m.height/2+n})),s=$_o([...i,...r]),a=[];for(const m of t)if(m.courtyard)a.push(tfo({component:m,courtyard:m.courtyard,minGap:n}));else{const _=nfo(m,n);a.push(..._)}const A=ofo(o,n);if(a.push(...A),a.length===0)return[];const l=rfo(a).map(m=\u003em.poly);let u=new Ge.Polygon(new Ge.Box(s.minX,s.minY,s.maxX,s.maxY));const g=u.clone();for(const m of l)try{u=Ge.BooleanOperations.subtract(u,m)}catch{}let h=null;try{h=Ge.BooleanOperations.subtract(g,u)}catch{try{if(l.length\u003e0){let m=l[0];for(let _=1;_\u003cl.length;_++)try{m=Ge.BooleanOperations.unify(m,l[_])}catch{}h=m}}catch{h=null}}if(!h)return[];const d=efo(h);return[...d.obstacleFreeLoops.map(m=\u003eJbt(m)),...d.obstacleContainingLoops.map(m=\u003eJbt(m))].filter(m=\u003em.length\u003e=3)};function rfo(t){const e=r=\u003eMath.max(0,r.maxX-r.minX)*Math.max(0,r.maxY-r.minY),n=(r,s,a=1e-9)=\u003er.minX-a\u003c=s.minX\u0026\u0026r.minY-a\u003c=s.minY\u0026\u0026r.maxX+a\u003e=s.maxX\u0026\u0026r.maxY+a\u003e=s.maxY,o=[...t].sort((r,s)=\u003ee(s.bbox)-e(r.bbox)),i=[];for(const r of o){const s=r.bbox.maxX-r.bbox.minX,a=r.bbox.maxY-r.bbox.minY;if(!(s\u003e1e-12\u0026\u0026a\u003e1e-12))continue;let A=!1;for(const c of i)if(n(c.bbox,r.bbox)){A=!0;break}A||i.push(r)}return i}var jbt=t=\u003etypeof t==\"number\"?Math.round(t*100)/100:typeof t==\"object\"?Object.fromEntries(Object.entries(t).map(([e,n])=\u003e[e,jbt(n)])):t,$bt=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,console.error(this.error),this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations`,console.error(this.error),this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_setup(){}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}getOutput(){return null}preview(){return{lines:[],points:[],rects:[],circles:[]}}noisySolve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step(),console.log(JSON.stringify(jbt(this.visualize())));const n=Date.now();this.timeToSolve=n-e}},hve=class extends $bt{offsetPadPoints;targetPointMap;currentPosition;constraintFn;epsilon;useSquaredDistance;optimalPosition;initialPosition;getSolverName(){return\"MultiOffsetIrlsSolver\"}constructor(t){super(),this.offsetPadPoints=[...t.offsetPadPoints],this.targetPointMap=new Map(t.targetPointMap),this.initialPosition={...t.initialPosition},this.currentPosition={...t.initialPosition},this.constraintFn=t.constraintFn,this.epsilon=t.epsilon??1e-6,this.useSquaredDistance=t.useSquaredDistance??!1,this.MAX_ITERATIONS=t.maxIterations??100}getConstructorParams(){return{offsetPadPoints:this.offsetPadPoints.map(t=\u003e({...t})),targetPointMap:new Map(this.targetPointMap),initialPosition:this.initialPosition,constraintFn:this.constraintFn,epsilon:this.epsilon,useSquaredDistance:this.useSquaredDistance,maxIterations:this.MAX_ITERATIONS}}_setup(){this.currentPosition={...this.initialPosition},this.optimalPosition=void 0,(!Array.from(this.targetPointMap.values()).some(e=\u003ee.length\u003e0)||this.offsetPadPoints.length===0)\u0026\u0026(this.optimalPosition={...this.currentPosition},this.solved=!0)}_step(){if(this.offsetPadPoints.length===0)return;const{x:t,y:e}=this.currentPosition;let n=0,o=0,i=0;for(const l of this.offsetPadPoints){const u=this.targetPointMap.get(l.id)||[];if(u.length===0)continue;const g=t+l.offsetX,h=e+l.offsetY;for(const d of u){const p=g-d.x,m=h-d.y,_=Math.sqrt(p*p+m*m);let f;this.useSquaredDistance?f=1:f=_\u003cthis.epsilon?1e6:1/_;const I={x:d.x-l.offsetX,y:d.y-l.offsetY};n+=f*I.x,o+=f*I.y,i+=f}}const r={x:i\u003e0?n/i:t,y:i\u003e0?o/i:e},s=this.constraintFn?this.constraintFn(r):r,a=s.x-t,A=s.y-e;if(Math.sqrt(a*a+A*A)\u003cthis.epsilon){this.optimalPosition={...s},this.solved=!0;return}this.currentPosition=s}getBestPosition(){return this.optimalPosition||this.currentPosition}getOffsetPadPositions(){const t=this.getBestPosition(),e=new Map;for(const n of this.offsetPadPoints)e.set(n.id,{x:t.x+n.offsetX,y:t.y+n.offsetY});return e}getOffsetPadPosition(t){return this.getOffsetPadPositions().get(t)}getTotalDistance(t){const e=t||this.getBestPosition();let n=0;for(const o of this.offsetPadPoints){const i={x:e.x+o.offsetX,y:e.y+o.offsetY},r=this.targetPointMap.get(o.id)||[];for(const s of r){const a=i.x-s.x,A=i.y-s.y;this.useSquaredDistance?n+=a*a+A*A:n+=Math.sqrt(a*a+A*A)}}return n}getDistanceForPad(t,e){const n=e||this.getBestPosition(),o=this.offsetPadPoints.find(s=\u003es.id===t);if(!o)return 0;const i={x:n.x+o.offsetX,y:n.y+o.offsetY};return(this.targetPointMap.get(t)||[]).reduce((s,a)=\u003e{const A=i.x-a.x,c=i.y-a.y;return this.useSquaredDistance?s+(A*A+c*c):s+Math.sqrt(A*A+c*c)},0)}computeProgress(){if(this.offsetPadPoints.length===0)return 1;const t=this.getTotalDistance(this.initialPosition),e=this.getTotalDistance();if(t===0)return 1;const n=Math.max(0,t-e);return Math.min(1,n/t)}visualize(){const t={lines:[],points:[],rects:[],circles:[]},e=[\"#4CAF50\",\"#2196F3\",\"#FF9800\",\"#9C27B0\",\"#F44336\",\"#607D8B\"],n=this.getBestPosition();for(let o=0;o\u003cthis.offsetPadPoints.length;o++){const i=this.offsetPadPoints[o];if(!i)continue;const r=e[o%e.length],s=this.targetPointMap.get(i.id)||[],a={x:n.x+i.offsetX,y:n.y+i.offsetY};for(const A of s)t.points.push({...A,color:r});for(const A of s)t.lines.push({points:[a,A],strokeColor:r});t.points.push({x:a.x,y:a.y,color:r})}return t.points.push({...this.currentPosition,color:\"#f44336\"}),this.optimalPosition\u0026\u0026t.points.push({...this.optimalPosition,color:\"rgba(76, 175, 80, 0.3)\"}),t}getOutput(){return this.optimalPosition??this.currentPosition}},sfo=class extends $bt{offsetPadPoints;targetPointMap;constraintFn;currentPosition;optimalPosition;initialPosition;phase1Epsilon;phase2Epsilon;maxIterations;getSolverName(){return\"TwoPhaseIrlsSolver\"}phase1Solver;phase2Solver;currentPhase=1;phase1Position;closestTargetPadId;closestTargetPoint;constructor(t){super(),this.offsetPadPoints=[...t.offsetPadPoints],this.targetPointMap=new Map(t.targetPointMap),this.initialPosition={...t.initialPosition},this.currentPosition={...t.initialPosition},this.constraintFn=t.constraintFn,this.phase1Epsilon=t.phase1Epsilon??t.epsilon??1e-6,this.phase2Epsilon=t.phase2Epsilon??t.epsilon??1e-6,this.maxIterations=t.maxIterations??100}getConstructorParams(){return{offsetPadPoints:this.offsetPadPoints.map(t=\u003e({...t})),targetPointMap:new Map(this.targetPointMap),initialPosition:this.initialPosition,constraintFn:this.constraintFn,phase1Epsilon:this.phase1Epsilon,phase2Epsilon:this.phase2Epsilon,maxIterations:this.maxIterations}}_setup(){if(this.currentPosition={...this.initialPosition},this.optimalPosition=void 0,this.currentPhase=1,this.phase1Position=void 0,this.closestTargetPadId=void 0,this.closestTargetPoint=void 0,!Array.from(this.targetPointMap.values()).some(e=\u003ee.length\u003e0)||this.offsetPadPoints.length===0){this.optimalPosition={...this.currentPosition},this.solved=!0;return}this.phase1Solver=new hve({offsetPadPoints:this.offsetPadPoints,targetPointMap:this.targetPointMap,initialPosition:this.initialPosition,constraintFn:this.constraintFn,epsilon:this.phase1Epsilon,maxIterations:this.maxIterations,useSquaredDistance:!0}),this.phase1Solver.setup()}_step(){this.currentPhase===1?this.stepPhase1():this.stepPhase2()}stepPhase1(){this.phase1Solver\u0026\u0026(this.phase1Solver.step(),this.currentPosition=this.phase1Solver.getBestPosition(),this.phase1Solver.solved?(this.phase1Position=this.phase1Solver.getBestPosition(),this.setupPhase2()):this.phase1Solver.failed\u0026\u0026(this.failed=!0,this.error=`Phase 1 failed: ${this.phase1Solver.error}`))}setupPhase2(){if(!this.phase1Position)return;let t=1/0,e,n;for(const i of this.offsetPadPoints){const r=this.targetPointMap.get(i.id)||[];if(r.length===0)continue;const s=this.phase1Position.x+i.offsetX,a=this.phase1Position.y+i.offsetY;for(const A of r){const c=s-A.x,l=a-A.y,u=Math.sqrt(c*c+l*l);u\u003ct\u0026\u0026(t=u,e=i.id,n=A)}}if(this.closestTargetPadId=e,this.closestTargetPoint=n,!e||!n){this.optimalPosition=this.phase1Position,this.solved=!0;return}const o=new Map;o.set(e,[n]),this.phase2Solver=new hve({offsetPadPoints:this.offsetPadPoints,targetPointMap:o,initialPosition:this.phase1Position,constraintFn:this.constraintFn,epsilon:this.phase2Epsilon,maxIterations:this.maxIterations,useSquaredDistance:!1}),this.phase2Solver.setup(),this.currentPhase=2}stepPhase2(){this.phase2Solver\u0026\u0026(this.phase2Solver.step(),this.currentPosition=this.phase2Solver.getBestPosition(),this.phase2Solver.solved?(this.optimalPosition=this.phase2Solver.getBestPosition(),this.solved=!0):this.phase2Solver.failed\u0026\u0026(this.failed=!0,this.error=`Phase 2 failed: ${this.phase2Solver.error}`))}getBestPosition(){return this.optimalPosition||this.currentPosition}getOffsetPadPositions(){const t=this.getBestPosition(),e=new Map;for(const n of this.offsetPadPoints)e.set(n.id,{x:t.x+n.offsetX,y:t.y+n.offsetY});return e}getTotalDistance(t){const e=t||this.getBestPosition();let n=0;for(const o of this.offsetPadPoints){const i={x:e.x+o.offsetX,y:e.y+o.offsetY},r=this.targetPointMap.get(o.id)||[];for(const s of r){const a=i.x-s.x,A=i.y-s.y;n+=a*a+A*A}}return n}visualize(){const t={lines:[],points:[],rects:[],circles:[]};if(t.points.push({...this.currentPosition,color:this.currentPhase===1?\"#FF6B6B\":\"#4ECDC4\",label:`Phase ${this.currentPhase}`}),this.phase1Position\u0026\u0026this.currentPhase===2\u0026\u0026t.points.push({...this.phase1Position,color:\"rgba(255, 107, 107, 0.5)\",label:\"Phase 1 result\"}),this.closestTargetPoint\u0026\u0026this.closestTargetPadId){t.points.push({...this.closestTargetPoint,color:\"#FFA500\",label:`Closest target (${this.closestTargetPadId})`});const n=this.offsetPadPoints.find(o=\u003eo.id===this.closestTargetPadId);if(n){const o=this.getBestPosition(),i={x:o.x+n.offsetX,y:o.y+n.offsetY};t.lines.push({points:[i,this.closestTargetPoint],strokeColor:\"#FFA500\"})}}const e=this.currentPhase===1?this.phase1Solver:this.phase2Solver;if(e){const n=e.visualize(),o=this.currentPhase===1?\"rgba(255, 107, 107, 0.7)\":\"rgba(76, 205, 196, 0.7)\";if(n.lines){const i=n.lines.map(r=\u003e({...r,strokeColor:o}));t.lines.push(...i)}n.points\u0026\u0026t.points.push(...n.points),n.rects\u0026\u0026t.rects.push(...n.rects),n.circles\u0026\u0026t.circles.push(...n.circles)}return this.optimalPosition\u0026\u0026t.points.push({...this.optimalPosition,color:\"rgba(76, 175, 80, 0.8)\",label:\"Final optimal position\"}),t}getOutput(){return this.optimalPosition??this.currentPosition}};function afo(t){const e=new Map,n=new Set;for(const{padIds:o,ignoreWeakConnections:i}of t)for(const r of o){let s=e.get(r);s||(s=new Set,e.set(r,s));for(const a of o)s.add(a);i===!0\u0026\u0026n.add(r)}return{explicitlyConnectedPadIdsByPadId:e,padIdsRejectingWeakConnections:n}}var qbt=new WeakMap;function Afo(t){const e=qbt.get(t);if(e)return e;const n=afo(t);return qbt.set(t,n),n}function tle(t,e,n){if(!n?.length)return!0;const o=Afo(n);return o.explicitlyConnectedPadIdsByPadId.get(t)?.has(e)?!0:!(o.padIdsRejectingWeakConnections.has(t)||o.padIdsRejectingWeakConnections.has(e))}var cfo=t=\u003e{const e={};for(let n=0;n\u003ct.length;n++)e[t[n]]=`hsl(${n*300/t.length}, 100%, 50%)`;return e},pve=(t,e=1)=\u003e`hsl(${t.split(\"\").reduce((o,i)=\u003eo*31+i.charCodeAt(0),0)%360}, 100%, 50%, ${e})`;function Xbt(t,e){const[n,o]=t,i=o.x-n.x,r=o.y-n.y,s=Math.hypot(i,r);if(s===0)return{x:0,y:1};const a=i/s,A=r/s,c={x:-A,y:a},l={x:A,y:-a},u=[];if(e.length\u003e0){u.push(e[0][0]);for(const p of e)u.push(p[1])}const g=(()=\u003e{let p=0;for(let m=0;m\u003cu.length;m++){const _=u[m],f=u[(m+1)%u.length];p+=_.x*f.y-f.x*_.y}return p/2})(),h=g\u003e0?l:c;return g\u003c0?{x:-h.x,y:-h.y}:h}var lfo=class extends fC{ccwFullOutline;origin;globalBounds;largestRect=null;mode;getSolverName(){return\"LargestRectOutsideOutlineFromPointSolver\"}constructor(t){super(),this.ccwFullOutline=t.ccwFullOutline,this.origin=t.origin,this.globalBounds=t.globalBounds,this.mode=t.mode??\"outside\"}getConstructorParams(){return{ccwFullOutline:this.ccwFullOutline,origin:this.origin,globalBounds:this.globalBounds,mode:this.mode}}_setup(){}_step(){this.largestRect=this.computeLargestRect(),this.solved=!0}computeLargestRect(){const t=this.makeEdges(this.ccwFullOutline),e={x:this.globalBounds.minX,y:this.globalBounds.minY,w:this.globalBounds.maxX-this.globalBounds.minX,h:this.globalBounds.maxY-this.globalBounds.minY};return this.largestRectContainingPointRegion(t,this.origin,e,this.mode)}almostEqual(t,e,n=1e-9){return Math.abs(t-e)\u003c=n}makeEdges(t){const e=[];for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];!o||!i||this.almostEqual(o.x,i.x)\u0026\u0026this.almostEqual(o.y,i.y)||e.push([o,i])}return e}isVertical(t){return this.almostEqual(t[0].x,t[1].x)}isHorizontal(t){return this.almostEqual(t[0].y,t[1].y)}scanlineIntervalsAtY(t,e){const n=[];for(const i of t){if(!this.isVertical(i))continue;const r=i[0].y,s=i[1].y,a=i[0].x,A=Math.min(r,s),c=Math.max(r,s);A\u003c=e\u0026\u0026e\u003cc\u0026\u0026n.push(a)}n.sort((i,r)=\u003ei-r);const o=[];for(let i=0;i+1\u003cn.length;i+=2){const r=n[i],s=n[i+1];r!==void 0\u0026\u0026s!==void 0\u0026\u0026o.push([r,s])}return o}clipIntervals(t,e,n){const o=[];for(const[i,r]of t){const s=Math.max(e,i),a=Math.min(n,r);a\u003es\u0026\u0026o.push([s,a])}return o}regionIntervalsAtY(t,e,n,o,i){const r=this.clipIntervals(this.scanlineIntervalsAtY(t,e),n,o);if(i===\"inside\")return r;const s=[];let a=n;for(const[A,c]of r)A\u003ea\u0026\u0026s.push([a,A]),a=Math.max(a,c);return a\u003co\u0026\u0026s.push([a,o]),s}largestRectContainingPointRegion(t,e,n,o){const i=n.x,r=n.x+n.w,s=n.y,a=n.y+n.h,c=this.regionIntervalsAtY(t,e.y,i,r,o).find(([C,y])=\u003eC-1e-9\u003c=e.x\u0026\u0026e.x\u003c=y+1e-9);if(!c)return null;let[l,u]=c;const g=new Set([l,u]);for(const C of t){if(!this.isVertical(C))continue;const y=C[0].x;l\u003cy\u0026\u0026y\u003cu\u0026\u0026g.add(y)}const h=Array.from(g).sort((C,y)=\u003eC-y),d=h.length-1;if(d\u003c=0)return null;const p=Array(d).fill(-1/0),m=Array(d).fill(1/0);for(let C=0;C\u003cd;C++){const y=h[C],x=h[C+1];if(y===void 0||x===void 0)continue;let E=.5*(y+x);g.has(E)\u0026\u0026(E+=1e-6);let B=a,S=s;for(const Q of t){if(!this.isHorizontal(Q))continue;const w=Q[0].y,M=Math.min(Q[0].x,Q[1].x),k=Math.max(Q[0].x,Q[1].x);M-1e-9\u003c=E\u0026\u0026E\u003c=k+1e-9\u0026\u0026(w\u003ee.y\u0026\u0026(B=Math.min(B,w)),w\u003ce.y\u0026\u0026(S=Math.max(S,w)))}S\u003cB?(p[C]=B,m[C]=S):(p[C]=-1/0,m[C]=1/0)}let _=-1;for(let C=0;C\u003cd;C++){const y=h[C],x=h[C+1];if(!(y===void 0||x===void 0)\u0026\u0026y-1e-9\u003c=e.x\u0026\u0026e.x\u003c=x+1e-9){_=C;break}}if(_===-1)return null;let f=null,I=-1;for(let C=0;C\u003c=_;C++){let y=1/0,x=-1/0;for(let E=C;E\u003cd;E++){const B=p[E],S=m[E];if(B===void 0||S===void 0||(y=Math.min(y,B),x=Math.max(x,S),E\u003c_))continue;const Q=Math.max(0,y-x);if(Q\u003c=0)continue;const w=h[C],M=h[E+1];if(w===void 0||M===void 0)continue;const k=M-w,R=k*Q;R\u003eI\u0026\u0026(I=R,f={x:w,y:x,w:k,h:Q})}}return f}getLargestRect(){return this.solved||this.solve(),this.largestRect}getLargestRectBounds(){return this.solved||this.solve(),this.largestRect?{minX:this.largestRect.x,minY:this.largestRect.y,maxX:this.largestRect.x+this.largestRect.w,maxY:this.largestRect.y+this.largestRect.h}:{minX:0,minY:0,maxX:0,maxY:0}}visualize(){const t={lines:[],points:[],rects:[],circles:[]};for(let e=0;e\u003cthis.ccwFullOutline.length;e++){const n=this.ccwFullOutline[e],o=this.ccwFullOutline[(e+1)%this.ccwFullOutline.length];n\u0026\u0026o\u0026\u0026t.lines.push({points:[n,o],strokeColor:\"rgba(0,0,0,0.5)\"})}return t.lines.push({points:[...this.ccwFullOutline,this.ccwFullOutline[0]],strokeColor:\"rgba(200, 200, 200, 0.5)\",strokeDash:[10,5]}),t.circles.push({center:this.origin,radius:.05,fill:\"#f44336\",label:\"Origin\"}),this.largestRect\u0026\u0026t.rects.push({center:{x:this.largestRect.x+this.largestRect.w/2,y:this.largestRect.y+this.largestRect.h/2},width:this.largestRect.w,height:this.largestRect.h,fill:\"rgba(0, 255, 0, 0.3)\",stroke:\"#4CAF50\",label:`Largest Rectangle (Area: ${(this.largestRect.w*this.largestRect.h).toFixed(3)})`}),t}getOutput(){return this.largestRect??null}},ufo=(t,{rotationDegrees:e=0})=\u003e{const n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},o=e*Math.PI/180;for(const i of t.pads)dve({bounds:n,center:i.offset,width:i.size.x,height:i.size.y,angleRad:o});return t.courtyard\u0026\u0026dve({bounds:n,center:t.courtyard.offsetFromCenter,width:t.courtyard.width,height:t.courtyard.height,angleRad:o}),n},gfo=(t,e)=\u003e{const[n,o]=t,i={x:o.x-n.x,y:o.y-n.y},r=dfo(i);return[{x:n.x-r.x*e,y:n.y-r.y*e},{x:o.x+r.x*e,y:o.y+r.y*e}]};function dfo(t){const e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e}}function HH(t,e){if(e.length\u003c3)return!1;let n=!1;const o=e.length,i=[...e];(i[0].x!==i[o-1].x||i[0].y!==i[o-1].y)\u0026\u0026i.push({...i[0]});for(let r=0,s=i.length-1;r\u003ci.length;s=r++){const a=i[r].x,A=i[r].y,c=i[s].x,l=i[s].y;A\u003et.y!=l\u003et.y\u0026\u0026t.x\u003c(c-a)*(t.y-A)/(l-A)+a\u0026\u0026(n=!n)}return n}var hfo=class extends fC{outlineSegment;viableOutlineSegment=null;ccwFullOutline;componentRotationDegrees;packStrategy;minGap;obstacles;packedComponents;componentToPack;viableBounds;globalBounds;boundaryOutline;weightedConnections;networkTargetPointMappingsCache;optimalPosition;irlsSolver;twoPhaseIrlsSolver;getSolverName(){return\"OutlineSegmentCandidatePointSolver\"}largestRectBounds;largestRectMidPoint;largestRectOrigin;constructor(t){super(),this.outlineSegment=t.outlineSegment,this.ccwFullOutline=t.ccwFullOutline,this.componentRotationDegrees=t.componentRotationDegrees,this.packStrategy=t.packStrategy,this.minGap=t.minGap,this.packedComponents=t.packedComponents,this.componentToPack=t.componentToPack,this.obstacles=t.obstacles??[],this.globalBounds=t.globalBounds,this.boundaryOutline=t.boundaryOutline,this.weightedConnections=t.weightedConnections,this.networkTargetPointMappingsCache=t.networkTargetPointMappingsCache}getConstructorParams(){return{outlineSegment:this.outlineSegment,ccwFullOutline:this.ccwFullOutline,componentRotationDegrees:this.componentRotationDegrees,packStrategy:this.packStrategy,minGap:this.minGap,packedComponents:this.packedComponents,componentToPack:this.componentToPack,obstacles:this.obstacles,globalBounds:this.globalBounds,boundaryOutline:this.boundaryOutline,weightedConnections:this.weightedConnections,networkTargetPointMappingsCache:this.networkTargetPointMappingsCache}}_getOutlineBoundsWithMargin(t={}){let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const[s,a]of this.ccwFullOutline)e=Math.min(e,s.x,a.x),n=Math.min(n,s.y,a.y),o=Math.max(o,s.x,a.x),i=Math.max(i,s.y,a.y);const r=t.margin??0;return{minX:e-r,minY:n-r,maxX:o+r,maxY:i+r}}_setup(){const[t,e]=this.outlineSegment,n=M=\u003e{const k=this.projectPointOntoSegment(M,this.viableOutlineSegment);return this.adjustPositionForOutlineCollision(k)},o=Xbt(this.outlineSegment,this.ccwFullOutline),i=ufo(this.componentToPack,{rotationDegrees:this.componentRotationDegrees}),r=this._getOutlineBoundsWithMargin({margin:Math.max(i.maxX-i.minX,i.maxY-i.minY)*2+this.minGap*2});this.largestRectMidPoint={x:(t.x+e.x)/2,y:(t.y+e.y)/2},this.largestRectOrigin={x:this.largestRectMidPoint.x+o.x*1e-4,y:this.largestRectMidPoint.y+o.y*1e-4};const s=this.ccwFullOutline.flatMap(([M])=\u003eM);let a=0;for(let M=0;M\u003cs.length;M++){const k=s[M],R=s[(M+1)%s.length];a+=k.x*R.y-R.x*k.y}a/=2;const c=a\u003c0?\"inside\":\"outside\",l={ccwFullOutline:s,globalBounds:r,origin:this.largestRectOrigin,mode:c},u=new lfo(l);u.solve();const g=u.getLargestRectBounds();this.largestRectBounds=g;const h={x:Math.abs(Math.sign(this.outlineSegment[1].x-this.outlineSegment[0].x)),y:Math.abs(Math.sign(this.outlineSegment[1].y-this.outlineSegment[0].y))};let d={minX:g.minX-i.minX*h.x,minY:g.minY-i.minY*h.y,maxX:g.maxX-i.maxX*h.x,maxY:g.maxY-i.maxY*h.y};if(this.boundaryOutline\u0026\u0026this.boundaryOutline.length\u003e=3){let M=1/0,k=1/0,R=-1/0,F=-1/0;for(const O of this.boundaryOutline)M=Math.min(M,O.x),k=Math.min(k,O.y),R=Math.max(R,O.x),F=Math.max(F,O.y);d={minX:Math.max(d.minX,M-i.minX),minY:Math.max(d.minY,k-i.minY),maxX:Math.min(d.maxX,R-i.maxX),maxY:Math.min(d.maxY,F-i.maxY)}}this.viableBounds=d;const p=d.maxX-d.minX,m=d.maxY-d.minY,_=i.maxX-i.minX,f=i.maxY-i.minY;if(p\u003c_||m\u003cf){this.failed=!0,this.error=\"There is nowhere for the component to fit along this outline section\";return}const I=Math.hypot(e.x-t.x,e.y-t.y),C=gfo(this.outlineSegment,I),[y,x]=C;this.viableOutlineSegment=[{x:fp(y.x,d.minX,d.maxX),y:fp(y.y,d.minY,d.maxY)},{x:fp(x.x,d.minX,d.maxX),y:fp(x.y,d.minY,d.maxY)}];const[E,B]=this.viableOutlineSegment,S=this.adjustPositionForOutlineCollision({x:(E.x+B.x)/2,y:(E.y+B.y)/2}),{offsetPadPoints:Q,targetPointMap:w}=this.getNetworkTargetPointMappings();this.packStrategy===\"minimum_closest_sum_squared_distance\"?this.twoPhaseIrlsSolver=new sfo({offsetPadPoints:Q,targetPointMap:w,initialPosition:S,constraintFn:n,epsilon:1e-6,maxIterations:50}):this.irlsSolver=new hve({offsetPadPoints:Q,targetPointMap:w,initialPosition:S,constraintFn:n,epsilon:1e-6,maxIterations:50,useSquaredDistance:this.packStrategy===\"minimum_sum_squared_distance_to_network\"})}_step(){const t=this.irlsSolver||this.twoPhaseIrlsSolver;if(!t){this.solved=!0;return}if(t.step(),t.solved){const e=t.getBestPosition();this.optimalPosition=e,this.solved=!0}else t.failed\u0026\u0026(this.failed=!0,this.error=t.error)}getNetworkTargetPointMappings(){const t=this.networkTargetPointMappingsCache?.get(this.componentRotationDegrees);if(t)return t;const e=this.getRotatedComponentPads(),n=e.map(r=\u003e({id:r.padId,offsetX:r.offset.x,offsetY:r.offset.y})),o=new Map;for(const r of e){const s=[];for(const a of this.packedComponents)for(const A of a.pads)if(A.networkId===r.networkId){if(!tle(r.padId,A.padId,this.weightedConnections))continue;s.push({...A.absoluteCenter,networkId:A.networkId})}o.set(r.padId,s)}const i={offsetPadPoints:n,targetPointMap:o};return this.networkTargetPointMappingsCache?.set(this.componentRotationDegrees,i),i}projectPointOntoSegment(t,e){const[n,o]=e,i=o.x-n.x,r=o.y-n.y,s=t.x-n.x,a=t.y-n.y,A=i*i+r*r;if(A===0)return{x:n.x,y:n.y};const c=Math.max(0,Math.min(1,(s*i+a*r)/A));return{x:n.x+c*i,y:n.y+c*r}}getRotatedComponentPads(){const t=this.componentRotationDegrees*Math.PI/180;return this.componentToPack.pads.map(e=\u003e({...e,size:(this.componentRotationDegrees+90)%180===0?{x:e.size.y,y:e.size.x}:e.size,offset:jv(e.offset,t)}))}createTemporaryPackedComponent(t){const e=this.componentRotationDegrees*Math.PI/180,n=(this.componentRotationDegrees+90)%180===0;return{componentId:this.componentToPack.componentId,center:t,ccwRotationOffset:this.componentRotationDegrees,pads:this.componentToPack.pads.map(o=\u003e{const i=jv(o.offset,e);return{...o,size:{x:n?o.size.y:o.size.x,y:n?o.size.x:o.size.y},absoluteCenter:{x:t.x+i.x,y:t.y+i.y}}}),courtyard:this.componentToPack.courtyard}}adjustPositionForOutlineCollision(t){const e=this.createTemporaryPackedComponent(t),n=kN(e,0),o=Xbt(this.outlineSegment,this.ccwFullOutline),i=Math.abs(o.x)\u003eMath.abs(o.y),r=!i;let s=t;if(i){const a=o.x\u003e0;a?s={x:n.maxX,y:t.y}:!a\u0026\u0026(s={x:n.minX,y:t.y})}else if(r){const a=o.y\u003e0;a?s={x:t.x,y:n.maxY}:!a\u0026\u0026(s={x:t.x,y:n.minY})}if(this.boundaryOutline\u0026\u0026this.boundaryOutline.length\u003e=3){const a=this.createTemporaryPackedComponent(s),A=kN(a,0),c=a.pads.every(u=\u003eHH(u.absoluteCenter,this.boundaryOutline)),l=[{x:A.minX,y:A.minY},{x:A.minX,y:A.maxY},{x:A.maxX,y:A.minY},{x:A.maxX,y:A.maxY}].every(u=\u003eHH(u,this.boundaryOutline));(!c||!l)\u0026\u0026this.viableBounds\u0026\u0026(s={x:fp(s.x,this.viableBounds.minX,this.viableBounds.maxX),y:fp(s.y,this.viableBounds.minY,this.viableBounds.maxY)})}return s}visualize(){const t={lines:[],points:[],rects:[],circles:[]};if(this.obstacles\u0026\u0026this.obstacles.length\u003e0)for(const s of this.obstacles)t.rects.push({center:s.absoluteCenter,width:s.width,height:s.height,fill:\"rgba(0,0,0,0.1)\",stroke:\"#555\",label:s.obstacleId});if(this.globalBounds\u0026\u0026t.lines.push({points:[{x:this.globalBounds.minX,y:this.globalBounds.minY},{x:this.globalBounds.minX,y:this.globalBounds.maxY},{x:this.globalBounds.maxX,y:this.globalBounds.maxY},{x:this.globalBounds.maxX,y:this.globalBounds.minY},{x:this.globalBounds.minX,y:this.globalBounds.minY}],strokeColor:\"rgba(255,0,255,0.5)\",strokeDash:\"2 2\"}),this.boundaryOutline\u0026\u0026this.boundaryOutline.length){const s=[...this.boundaryOutline];s.length\u003e0\u0026\u0026(s[0].x!==s[s.length-1].x||s[0].y!==s[s.length-1].y)\u0026\u0026s.push({...s[0]}),t.lines.push({points:s,strokeColor:\"rgba(0, 0, 255, 0.5)\",strokeDash:\"4 2\"})}if(this.viableBounds\u0026\u0026t.rects.push({center:{x:(this.viableBounds.minX+this.viableBounds.maxX)/2,y:(this.viableBounds.minY+this.viableBounds.maxY)/2},width:this.viableBounds.maxX-this.viableBounds.minX,height:this.viableBounds.maxY-this.viableBounds.minY,fill:\"rgba(0,255,0,0.1)\",label:\"Viable Bounds\"}),this.largestRectBounds\u0026\u0026t.rects.push({center:{x:(this.largestRectBounds.minX+this.largestRectBounds.maxX)/2,y:(this.largestRectBounds.minY+this.largestRectBounds.maxY)/2},width:this.largestRectBounds.maxX-this.largestRectBounds.minX,height:this.largestRectBounds.maxY-this.largestRectBounds.minY,fill:\"rgba(255,0,255,0.4)\"}),this.largestRectMidPoint\u0026\u0026t.points.push({...this.largestRectMidPoint,label:\"Largest Rect Mid Point\",color:\"rgba(128,0,255,1)\"}),this.largestRectOrigin\u0026\u0026t.points.push({...this.largestRectOrigin,label:\"Largest Rect Origin\",color:\"rgba(255,0,128,1)\"}),this.viableOutlineSegment){const[s,a]=this.viableOutlineSegment;t.lines.push({points:[s,a],strokeColor:\"#2196F3\"})}const[e,n]=this.outlineSegment;t.lines.push({points:[e,n],strokeColor:\"rgba(255,0,0,1)\",strokeDash:\"3 3\"});for(const[s,a]of this.ccwFullOutline)t.lines.push({points:[s,a],strokeColor:\"rgba(0,0,0,0.5)\",strokeDash:\"4 4\"});for(const s of this.packedComponents)for(const a of s.pads)t.rects.push({center:a.absoluteCenter,width:a.size.x,height:a.size.y,fill:pve(a.networkId,.5),stroke:\"#333\",label:`${a.padId} (${a.networkId})`});const o=this.optimalPosition??this.irlsSolver?.currentPosition??this.twoPhaseIrlsSolver?.currentPosition??{x:0,y:0},i=this.getRotatedComponentPads();for(const s of i){const a={x:o.x+s.offset.x,y:o.y+s.offset.y};t.rects.push({center:a,width:s.size.x,height:s.size.y,fill:this.failed?\"rgba(255,0,0,0.5)\":pve(s.networkId,.5),label:`${s.padId} (${s.networkId})`});for(const A of this.packedComponents)for(const c of A.pads)if(c.networkId===s.networkId){const l=tle(s.padId,c.padId,this.weightedConnections);t.lines.push({points:[a,c.absoluteCenter],strokeColor:s.networkId===\"VCC\"?\"#FF6B6B\":\"#4ECDC4\",strokeDash:l?void 0:\"4 2\",label:`${s.networkId} ${l?\"strong\":\"weak\"}`})}}const r=this.irlsSolver||this.twoPhaseIrlsSolver;if(r){const s=r.currentPosition;t.points.push({...s,color:\"#f44336\"});const a=r.visualize();a.lines\u0026\u0026t.lines.push(...a.lines),a.circles\u0026\u0026t.circles.push(...a.circles),a.rects\u0026\u0026t.rects.push(...a.rects),a.points\u0026\u0026t.points.push(...a.points)}return this.optimalPosition\u0026\u0026t.points.push({...this.optimalPosition,color:\"rgba(76, 175, 80, 0.3)\"}),t}getOutput(){return this.optimalPosition??null}},Zbt=t=\u003e{const e=[],n=[];if(t.boundaryOutline\u0026\u0026t.boundaryOutline.length){const r=[...t.boundaryOutline];r.length\u003e0\u0026\u0026(r[0].x!==r[r.length-1].x||r[0].y!==r[r.length-1].y)\u0026\u0026r.push({...r[0]}),n.push({points:r,strokeColor:\"rgba(0, 0, 255, 0.5)\",strokeDash:\"4 2\"})}const o=Array.from(new Set(t.components.flatMap(r=\u003er.pads.map(s=\u003es.networkId)))),i=cfo(o);if(t.obstacles\u0026\u0026t.obstacles.length\u003e0)for(const r of t.obstacles)e.push({center:{x:r.absoluteCenter.x,y:r.absoluteCenter.y},width:r.width,height:r.height,fill:\"rgba(0,0,0,0.1)\",stroke:\"#555\",label:r.obstacleId});for(const r of t.components){const s=kN(r),a=s.maxX-s.minX,A=s.maxY-s.minY,c=!!r.isStatic,g={center:{x:r.center.x,y:r.center.y},width:a,height:A,fill:c?\"rgba(33, 150, 243, 0.25)\":\"rgba(0,0,0,0.25)\",stroke:c?\"rgba(33, 150, 243, 0.6)\":void 0,label:[r.componentId,`ccwRotationOffset: ${r.ccwRotationOffset.toFixed(1)}°`].join(`\n`)};e.push(g);for(const h of r.pads){const{absoluteCenter:d,size:p,padId:m,networkId:_}=h,f={center:{x:d.x,y:d.y},width:p.x,height:p.y,label:`${m} ${_}`,fill:\"rgba(255,0,0,0.8)\"};e.push(f)}}for(const r of o){const s=t.components.flatMap(a=\u003ea.pads.filter(A=\u003eA.networkId===r));for(let a=0;a\u003cs.length;a++)for(let A=a+1;A\u003cs.length;A++){const c=s[a],l=s[A],u=tle(c.padId,l.padId,t.weightedConnections);n.push({points:[c.absoluteCenter,l.absoluteCenter],strokeColor:i[r],strokeDash:u?void 0:\"4 2\"})}}return{coordinateSystem:\"cartesian\",rects:e,lines:n}};function ij(t){if(t.courtyard){const e=t.courtyard,n=t.ccwRotationOffset*Math.PI/180,o=jv(e.offsetFromCenter,n),i=(t.ccwRotationOffset%360+360)%360,r=i===90||i===270;let s=e.width,a=e.height;return r\u0026\u0026(s=e.height,a=e.width),[{center:{x:t.center.x+o.x,y:t.center.y+o.y},width:s,height:a}]}return t.pads.map(e=\u003e({center:{x:e.absoluteCenter.x,y:e.absoluteCenter.y},width:e.size.x,height:e.size.y}))}function pfo({component:t,packedComponents:e,minGap:n}){const o=e.flatMap(r=\u003eij(r)),i=ij(t);for(const r of i)for(const s of o){const{distance:a}=Kne(r,s);if(a+1e-6\u003cn)return{hasOverlap:!0,gapDistance:a}}return{hasOverlap:!1}}var eSt=class extends fC{componentToPack;packedComponents;packPlacementStrategy;minGap;obstacles;boundaryOutline;weightedConnections;getSolverName(){return\"SingleComponentPackSolver\"}currentPhase=\"outline\";outlines=[];queuedOutlineSegments=[];currentSegmentIndex=0;currentRotationIndex=0;activeSubSolver=null;candidateResults=[];rejectedCandidates=[];bestCandidate;outputPackedComponent;bounds;networkTargetPointMappingsCache=new Map;constructor(t){super(),this.componentToPack=t.componentToPack,this.packedComponents=t.packedComponents,this.packPlacementStrategy=t.packPlacementStrategy,this.minGap=t.minGap??0,this.obstacles=t.obstacles??[],this.bounds=t.bounds,this.boundaryOutline=t.boundaryOutline,this.weightedConnections=t.weightedConnections}_setup(){super._setup(),this.currentPhase=\"outline\",this.outlines=[],this.queuedOutlineSegments=[],this.candidateResults=[],this.activeSubSolver=void 0,this.currentSegmentIndex=0,this.currentRotationIndex=0,this.networkTargetPointMappingsCache.clear()}_step(){if(!(this.solved||this.failed))switch(this.currentPhase){case\"outline\":this.executeOutlinePhase();break;case\"segment_candidate\":this.executeSegmentCandidatePhase();break;case\"evaluate\":this.executeEvaluatePhase();break}}executeOutlinePhase(){if(this.packedComponents.length===0){const n=this.componentToPack.availableRotationDegrees??[0,90,180,270],o={x:0,y:0},i=n[0]??0,r=this.createPackedComponent(o,i),s=ij(r);if(!(this.obstacles??[]).some(A=\u003e{const c={center:{x:A.absoluteCenter.x,y:A.absoluteCenter.y},width:A.width,height:A.height};return s.some(l=\u003e{const{distance:u}=Kne(l,c);return u+1e-6\u003cthis.minGap})})){this.outputPackedComponent=r,this.solved=!0;return}}this.outlines=ifo(this.packedComponents,{minGap:this.minGap,obstacles:this.obstacles});const t=this.componentToPack.availableRotationDegrees??[0,90,180,270];for(let n=0;n\u003cthis.outlines.length;n++){const o=this.outlines[n];for(let i=0;i\u003co.length;i++){const r=o[i];this.queuedOutlineSegments.push({segment:r,availableRotations:[...t],segmentIndex:n*1e3+i,ccwFullOutline:o})}}if(this.boundaryOutline\u0026\u0026this.boundaryOutline.length\u003e=3){const n=[];for(let i=0;i\u003cthis.boundaryOutline.length;i++){const r=this.boundaryOutline[i],s=this.boundaryOutline[(i+1)%this.boundaryOutline.length];n.push([r,s])}const o=this.outlines.length;for(let i=0;i\u003cn.length;i++){const r=n[i];this.queuedOutlineSegments.push({segment:r,availableRotations:[...t],segmentIndex:o*1e3+i,ccwFullOutline:n})}}let e=this.outlines.length+1;for(const n of this.obstacles){const o=n.width/2+this.minGap,i=n.height/2+this.minGap,r=n.absoluteCenter.x,s=n.absoluteCenter.y,a=[{x:r-o,y:s-i},{x:r+o,y:s-i},{x:r+o,y:s+i},{x:r-o,y:s+i}],A=[[a[0],a[1]],[a[1],a[2]],[a[2],a[3]],[a[3],a[0]]];for(let c=0;c\u003cA.length;c++){const l=A[c];this.queuedOutlineSegments.push({segment:l,availableRotations:[...t],segmentIndex:e*1e3+c,ccwFullOutline:A})}e++}this.currentPhase=\"segment_candidate\",this.currentSegmentIndex=0,this.currentRotationIndex=0}executeSegmentCandidatePhase(){if(this.activeSubSolver?.solved||this.activeSubSolver?.failed){const t=this.queuedOutlineSegments[this.currentSegmentIndex],e=t.availableRotations[this.currentRotationIndex];let n=1/0,o;if(this.activeSubSolver.solved\u0026\u0026this.activeSubSolver.optimalPosition){o=this.activeSubSolver.optimalPosition;const i=this.createPackedComponent(o,e),{hasOverlap:r,gapDistance:s}=pfo({component:i,packedComponents:this.packedComponents,minGap:this.minGap});let a=1/0;const A=ij(i),c=(this.obstacles??[]).some(g=\u003e{const h={center:{x:g.absoluteCenter.x,y:g.absoluteCenter.y},width:g.width,height:g.height};return A.some(d=\u003e{const{distance:p}=Kne(d,h);return a=Math.min(a,p),p+1e-6\u003cthis.minGap})});let l=!1;if(this.bounds){const g=kN(i,0);l=g.minX\u003cthis.bounds.minX||g.maxX\u003ethis.bounds.maxX||g.minY\u003cthis.bounds.minY||g.maxY\u003ethis.bounds.maxY}let u=!1;if(this.boundaryOutline\u0026\u0026this.boundaryOutline.length\u003e=3){const g=kN(i,0),h=i.pads.every(p=\u003eHH(p.absoluteCenter,this.boundaryOutline)),d=[{x:g.minX,y:g.minY},{x:g.minX,y:g.maxY},{x:g.maxX,y:g.minY},{x:g.maxX,y:g.maxY}].every(p=\u003eHH(p,this.boundaryOutline));u=!h||!d}n=this.calculateDistance(o,e),r?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:s}):c?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:a}):l?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:-1}):u?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:-1}):this.candidateResults.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex})}this.currentRotationIndex++,this.activeSubSolver=void 0}for(;!this.activeSubSolver;){if(this.currentSegmentIndex\u003e=this.queuedOutlineSegments.length){this.currentPhase=\"evaluate\";return}const t=this.queuedOutlineSegments[this.currentSegmentIndex];if(this.currentRotationIndex\u003e=t.availableRotations.length){this.currentSegmentIndex++,this.currentRotationIndex=0;continue}const e=t.availableRotations[this.currentRotationIndex];this.activeSubSolver=new hfo({outlineSegment:t.segment,ccwFullOutline:t.ccwFullOutline,componentRotationDegrees:e,packStrategy:this.packPlacementStrategy,minGap:this.minGap,packedComponents:this.packedComponents,componentToPack:this.componentToPack,obstacles:this.obstacles,globalBounds:this.bounds,boundaryOutline:this.boundaryOutline,weightedConnections:this.weightedConnections,networkTargetPointMappingsCache:this.networkTargetPointMappingsCache}),this.activeSubSolver.setup();break}this.activeSubSolver.step()}executeEvaluatePhase(){if(this.candidateResults.length===0){this.failed=!0,this.error=\"No valid candidates found\";return}this.candidateResults.sort((t,e)=\u003et.distance-e.distance),this.bestCandidate=this.candidateResults[0],this.bestCandidate.optimalPosition\u0026\u0026(this.outputPackedComponent=this.createPackedComponent(this.bestCandidate.optimalPosition,this.bestCandidate.rotation)),this.solved=!0}calculateDistance(t,e){const n=this.createPackedComponent(t,e);let o=0;const i=this.packPlacementStrategy===\"minimum_sum_squared_distance_to_network\"||this.packPlacementStrategy===\"minimum_closest_sum_squared_distance\";for(const r of n.pads){let s=1/0;for(const a of this.packedComponents)for(const A of a.pads)if(A.networkId===r.networkId){if(!tle(r.padId,A.padId,this.weightedConnections))continue;const c=r.absoluteCenter.x-A.absoluteCenter.x,l=r.absoluteCenter.y-A.absoluteCenter.y,u=Math.sqrt(c*c+l*l);s=Math.min(s,u)}s\u003c1/0\u0026\u0026(o+=i?s*s:s)}return o}createPackedComponent(t,e){const n={...this.componentToPack,center:t,ccwRotationOffset:e,pads:this.componentToPack.pads.map(o=\u003e({...o,absoluteCenter:{x:0,y:0}}))};return ele(n),n}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=Zbt({components:this.packedComponents,minGap:this.minGap,packPlacementStrategy:this.packPlacementStrategy});if(t.points??=[],t.lines??=[],t.rects??=[],t.texts??=[],t.circles??=[],this.obstacles\u0026\u0026this.obstacles.length\u003e0)for(const e of this.obstacles)t.rects.push({center:e.absoluteCenter,width:e.width,height:e.height,fill:\"rgba(0,0,0,0.1)\",stroke:\"#555\",label:e.obstacleId});if(this.bounds\u0026\u0026t.lines.push({points:[{x:this.bounds.minX,y:this.bounds.minY},{x:this.bounds.minX,y:this.bounds.maxY},{x:this.bounds.maxX,y:this.bounds.maxY},{x:this.bounds.maxX,y:this.bounds.minY},{x:this.bounds.minX,y:this.bounds.minY}],strokeColor:\"rgba(0,0,0,0.5)\",strokeDash:\"2 2\"}),this.boundaryOutline\u0026\u0026this.boundaryOutline.length){const e=[...this.boundaryOutline];e.length\u003e0\u0026\u0026(e[0].x!==e[e.length-1].x||e[0].y!==e[e.length-1].y)\u0026\u0026e.push({...e[0]}),t.lines.push({points:e,strokeColor:\"rgba(0, 0, 255, 0.5)\",strokeDash:\"4 2\"})}switch(this.currentPhase){case\"outline\":this.visualizeOutlinePhase(t);break;case\"segment_candidate\":this.visualizeSegmentCandidatePhase(t);break;case\"evaluate\":this.visualizeEvaluatePhase(t);break}return t}visualizeOutlinePhase(t){for(const e of this.outlines)for(const n of e){const[o,i]=n;t.lines.push({points:[o,i],strokeColor:\"#ff4444\"})}for(let e=0;e\u003cthis.outlines.length;e++){const n=this.outlines[e];for(let o=0;o\u003cn.length;o++){const[i,r]=n[o];t.points.push({x:i.x,y:i.y,label:`outlines [${e}] [${o}]`,color:\"#ff4444\"})}}}visualizeSegmentCandidatePhase(t){if(this.visualizeOutlinePhase(t),this.activeSubSolver){const e=this.activeSubSolver.visualize();e.lines\u0026\u0026t.lines.push(...e.lines),e.points\u0026\u0026t.points.push(...e.points),e.rects\u0026\u0026t.rects.push(...e.rects),e.circles\u0026\u0026t.circles.push(...e.circles??[])}else for(let e=0;e\u003cthis.candidateResults.length;e++){const n=this.candidateResults[e];if(n.optimalPosition){const o=this.createPackedComponent(n.optimalPosition,n.rotation);for(const i of o.pads)t.rects.push({center:i.absoluteCenter,width:i.size.x,height:i.size.y,fill:\"rgba(255,165,0,0.3)\",stroke:\"rgba(255,165,0,0.8)\",strokeWidth:1});t.points.push({x:n.optimalPosition.x,y:n.optimalPosition.y,label:`c${e}, d=${n.distance.toFixed(3)}`,color:\"rgba(255,165,0,0.8)\"})}}}visualizeEvaluatePhase(t){this.visualizeOutlinePhase(t);for(let e=0;e\u003cthis.candidateResults.length;e++){const n=this.candidateResults[e];if(!n.optimalPosition)continue;const o=e,i=o===0;t.points.push({x:n.optimalPosition.x,y:n.optimalPosition.y,label:`step=${o}, d=${n.distance.toFixed(3)}`,color:i?\"rgba(0,255,0,0.8)\":\"rgba(255,165,0,0.6)\"})}for(let e=0;e\u003cthis.rejectedCandidates.length;e++){const n=this.rejectedCandidates[e];n.optimalPosition\u0026\u0026t.points.push({x:n.optimalPosition.x,y:n.optimalPosition.y,label:`rejected, d=${n.distance.toFixed(3)}\ngap_distance=${n.gapDistance}`,color:\"rgba(255,0,0,0.8)\"})}if(this.outputPackedComponent)for(const e of this.outputPackedComponent.pads)t.rects.push({center:e.absoluteCenter,width:e.size.x,height:e.size.y,fill:\"rgba(0,255,0,0.7)\"})}getResult(){return this.outputPackedComponent}getOutput(){return this.getResult()}getConstructorParams(){return{componentToPack:this.componentToPack,packedComponents:this.packedComponents,packPlacementStrategy:this.packPlacementStrategy,minGap:this.minGap,obstacles:this.obstacles,bounds:this.bounds,boundaryOutline:this.boundaryOutline,weightedConnections:this.weightedConnections}}};function mfo(t){if(t.length\u003c3){const r=t.reduce((a,A)=\u003ea+A.x,0),s=t.reduce((a,A)=\u003ea+A.y,0);return{x:r/t.length,y:s/t.length}}let e=0,n=0,o=0;for(let r=0;r\u003ct.length;r++){const s=t[r],a=t[(r+1)%t.length],A=s.x*a.y-a.x*s.y;e+=A,n+=(s.x+a.x)*A,o+=(s.y+a.y)*A}if(e*=.5,Math.abs(e)\u003c1e-10){const r=t.reduce((a,A)=\u003ea+A.x,0),s=t.reduce((a,A)=\u003ea+A.y,0);return{x:r/t.length,y:s/t.length}}return n/=6*e,o/=6*e,{x:n,y:o}}var rj=class extends fC{packInput;getSolverName(){return\"PackSolver2\"}unpackedComponentQueue=[];packedComponents=[];componentToPack;constructor(t){super(),this.MAX_ITERATIONS=3e5,this.packInput=t}getConstructorParams(){return this.packInput}_setup(){const{components:t,packOrderStrategy:e,packFirst:n=[]}=this.packInput,o=t.filter(s=\u003es.pads.length===0?!1:s.pads.every(a=\u003eNumber.isFinite(a.size.x)\u0026\u0026Number.isFinite(a.size.y)\u0026\u0026a.size.x\u003e0\u0026\u0026a.size.y\u003e0)),i=o.filter(s=\u003es.isStatic),r=o.filter(s=\u003e!s.isStatic);this.packedComponents=i.map(s=\u003e{const a={...s,center:s.center??{x:0,y:0},ccwRotationOffset:s.ccwRotationOffset??s.availableRotationDegrees?.[0]??0,pads:s.pads.map(A=\u003e({...A,absoluteCenter:A.absoluteCenter??{x:0,y:0}}))};return ele(a),a}),this.unpackedComponentQueue=j_o({components:r,packOrderStrategy:e,packFirst:n})}packFirstComponent(){const t=this.unpackedComponentQueue.shift();let e={x:0,y:0};this.packInput.boundaryOutline\u0026\u0026this.packInput.boundaryOutline.length\u003e=3\u0026\u0026(e=mfo(this.packInput.boundaryOutline));const n={...t,center:e,ccwRotationOffset:t.ccwRotationOffset??t.availableRotationDegrees?.[0]??0,pads:t.pads.map(c=\u003e({...c,absoluteCenter:{x:0,y:0}}))};ele(n);const o=this.packInput.obstacles??[],i=ij(n),r=o.some(c=\u003e{const l={center:{x:c.absoluteCenter.x,y:c.absoluteCenter.y},width:c.width,height:c.height};return i.some(u=\u003e{const{distance:g}=Kne(u,l);return g+1e-6\u003cthis.packInput.minGap})});let s=!1;if(this.packInput.boundaryOutline\u0026\u0026this.packInput.boundaryOutline.length\u003e=3){const c=kN(n,0),l=n.pads.every(g=\u003eHH(g.absoluteCenter,this.packInput.boundaryOutline)),u=[{x:c.minX,y:c.minY},{x:c.minX,y:c.maxY},{x:c.maxX,y:c.minY},{x:c.maxX,y:c.maxY}].every(g=\u003eHH(g,this.packInput.boundaryOutline));s=!l||!u}if(!r\u0026\u0026!s){this.packedComponents.push(n);return}const a=new eSt({packedComponents:[],componentToPack:t,packPlacementStrategy:this.packInput.packPlacementStrategy,minGap:this.packInput.minGap,obstacles:o,bounds:this.packInput.bounds,boundaryOutline:this.packInput.boundaryOutline,weightedConnections:this.packInput.weightedConnections});a.solve();const A=a.getResult();A?this.packedComponents.push(A):this.packedComponents.push(n)}_step(){if(!(this.solved||this.failed)){if(this.packedComponents.length===0){if(this.unpackedComponentQueue.length===0){this.solved=!0;return}this.packFirstComponent();return}if(!this.activeSubSolver){if(this.unpackedComponentQueue.length===0){this.solved=!0;return}if(this.componentToPack=this.unpackedComponentQueue.shift(),!this.componentToPack){this.solved=!0;return}this.activeSubSolver=new eSt({packedComponents:this.packedComponents,componentToPack:this.componentToPack,packPlacementStrategy:this.packInput.packPlacementStrategy,minGap:this.packInput.minGap,obstacles:this.packInput.obstacles??[],bounds:this.packInput.bounds,boundaryOutline:this.packInput.boundaryOutline,weightedConnections:this.packInput.weightedConnections}),this.activeSubSolver.setup()}if(this.activeSubSolver.step(),this.activeSubSolver.failed){this.failed=!0;return}if(this.activeSubSolver.solved){const t=this.activeSubSolver.getResult();if(t)this.packedComponents.push(t);else{const e={...this.componentToPack,center:{x:0,y:0},ccwRotationOffset:this.componentToPack?.ccwRotationOffset??this.componentToPack?.availableRotationDegrees?.[0]??0,pads:this.componentToPack.pads.map(n=\u003e({...n,absoluteCenter:{x:0,y:0}}))};ele(e),this.packedComponents.push(e)}this.componentToPack=void 0,this.activeSubSolver=void 0}}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t={coordinateSystem:\"cartesian\",title:\"Pack Solver 2\",points:[],lines:[],rects:[],circles:[],texts:[],arrows:[]};if(this.packInput.obstacles\u0026\u0026this.packInput.obstacles.length\u003e0)for(const o of this.packInput.obstacles)t.rects.push({center:o.absoluteCenter,width:o.width,height:o.height,fill:\"rgba(0,0,0,0.1)\",stroke:\"#555\",label:o.obstacleId});if(this.packInput.bounds\u0026\u0026t.lines.push({points:[{x:this.packInput.bounds.minX,y:this.packInput.bounds.minY},{x:this.packInput.bounds.minX,y:this.packInput.bounds.maxY},{x:this.packInput.bounds.maxX,y:this.packInput.bounds.maxY},{x:this.packInput.bounds.maxX,y:this.packInput.bounds.minY},{x:this.packInput.bounds.minX,y:this.packInput.bounds.minY}],strokeColor:\"rgba(0,0,0,0.5)\",strokeDash:\"2 2\"}),this.packInput.boundaryOutline\u0026\u0026this.packInput.boundaryOutline.length){const o=[...this.packInput.boundaryOutline];o.length\u003e0\u0026\u0026(o[0].x!==o[o.length-1].x||o[0].y!==o[o.length-1].y)\u0026\u0026o.push({...o[0]}),t.lines.push({points:o,strokeColor:\"rgba(0, 0, 255, 0.5)\",strokeDash:\"4 2\"})}if(this.packedComponents.length===0)for(const o of this.unpackedComponentQueue)for(const i of o.pads)t.rects.push({center:{x:0,y:0},width:i.size.x,height:i.size.y,fill:\"rgba(0,0,0,0.1)\"});const e=this.packedComponents.flatMap(o=\u003eo.pads),n=new Map;for(const o of e)o.networkId\u0026\u0026n.set(o.networkId,[...n.get(o.networkId)||[],o]);for(const o of e)t.rects.push({center:o.absoluteCenter,width:o.size.x,height:o.size.y,fill:\"rgba(255,0,0,0.5)\"});for(const[o,i]of n.entries())for(let r=0;r\u003ci.length;r++)for(let s=r+1;s\u003ci.length;s++){const a=i[r],A=i[s];t.lines.push({points:[a.absoluteCenter,A.absoluteCenter],strokeColor:pve(o,.5)})}return t}getOutput(){return{packedComponents:this.packedComponents,unpackedComponents:this.unpackedComponentQueue}}},_fo=t=\u003e{const e=new rj(t);return e.solve(),{...t,components:e.packedComponents}},ffo=t=\u003e{if(!t||t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t)e=Math.min(e,r.x),o=Math.max(o,r.x),n=Math.min(n,r.y),i=Math.max(i,r.y);return{minX:e,maxX:o,minY:n,maxY:i}},tSt=t=\u003e{const{width:e,height:n,ccwRotationDegrees:o}=t,i=o*Math.PI/180,r=A=\u003e{const c=Math.abs(A);return c\u003c1e-12?0:Math.abs(c-1)\u003c1e-12?1:c},s=r(Math.cos(i)),a=r(Math.sin(i));return{width:e*s+n*a,height:e*a+n*s}},nSt=(t,e,n)=\u003e{const o=[],i=({padId:r,pcbPortId:s,sx:a,sy:A,x:c,y:l})=\u003eo.push({padId:r,networkId:n(s),size:{x:a,y:A},absoluteCenter:{x:c,y:l},pcbPortId:s});for(const r of e.pcb_via.list({pcb_component_id:t.pcb_component_id}))i({padId:r.pcb_via_id,pcbPortId:r.pcb_port_id,sx:r.outer_diameter??r.hole_diameter??0,sy:r.outer_diameter??r.hole_diameter??0,x:r.x,y:r.y});for(const r of e.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id}))switch(r.shape){case\"circle\":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.outer_diameter??r.hole_diameter??0,sy:r.outer_diameter??r.hole_diameter??0,x:r.x,y:r.y});break}case\"oval\":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.outer_width,sy:r.outer_height,x:r.x,y:r.y});break}case\"circular_hole_with_rect_pad\":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.rect_pad_width,sy:r.rect_pad_height,x:r.x,y:r.y});break}case\"pill\":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.outer_width,sy:r.outer_height,x:r.x,y:r.y});break}case\"pill_hole_with_rect_pad\":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.rect_pad_width,sy:r.rect_pad_height,x:r.x,y:r.y});break}case\"rotated_pill_hole_with_rect_pad\":{const s=tSt({width:r.rect_pad_width,height:r.rect_pad_height,ccwRotationDegrees:r.rect_ccw_rotation});i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:s.width,sy:s.height,x:r.x,y:r.y});break}default:{console.warn(`Unsupported plated hole shape ${r.shape}`);break}}for(const r of e.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}))switch(r.shape){case\"rect\":{i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:r.width??0,sy:r.height??0,x:r.x,y:r.y});break}case\"pill\":{i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:r.width,sy:r.height,x:r.x,y:r.y});break}case\"rotated_rect\":case\"rotated_pill\":{const s=tSt({width:r.width,height:r.height,ccwRotationDegrees:r.ccw_rotation});i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:s.width,sy:s.height,x:r.x,y:r.y});break}case\"circle\":{i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:r.radius*2,sy:r.radius*2,x:r.x,y:r.y});break}case\"polygon\":{if(r.points\u0026\u0026r.points.length\u003e0){const{minX:s,maxX:a,minY:A,maxY:c}=ffo(r.points),l=a-s,u=c-A,g=(s+a)/2,h=(A+c)/2;i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:l,sy:u,x:g,y:h})}else console.warn(`Polygon pad ${r.pcb_smtpad_id} has no points`);break}}return o},Ifo=(t,e)=\u003e{const n=new Set,o=r=\u003e{if(r){if(r.nodeType===\"component\"){const s=r.otherChildElements?.[0]?.pcb_component_id;s\u0026\u0026n.add(s)}for(const s of r.childNodes??[])o(s)}};o(e);const i=[];for(const r of t.pcb_plated_hole.list({})){if(!(\"pcb_component_id\"in r)||!r.pcb_component_id){i.push(r);continue}n.has(r.pcb_component_id)||i.push(r)}for(const r of t.pcb_hole.list({}))i.push(r);return i},Cfo=(t,e,n)=\u003e{const o=n*Math.PI/180,i=Math.abs(Math.cos(o)),r=Math.abs(Math.sin(o));return{width:t*i+e*r,height:t*r+e*i}},yfo=t=\u003e{if(t.type===\"pcb_plated_hole\"\u0026\u0026t.shape===\"circular_hole_with_rect_pad\"){const{rect_pad_height:e,rect_pad_width:n,x:o,y:i}=t;return{obstacleId:t.pcb_plated_hole_id,absoluteCenter:{x:o,y:i},width:n,height:e}}if(t.type===\"pcb_plated_hole\"\u0026\u0026t.shape===\"rotated_pill_hole_with_rect_pad\"){const{rect_pad_height:e,rect_pad_width:n,rect_ccw_rotation:o,x:i,y:r}=t,s=Cfo(n,e,o);return{obstacleId:t.pcb_plated_hole_id,absoluteCenter:{x:i,y:r},width:s.width,height:s.height}}if(t.type===\"pcb_hole\"){const{x:e,y:n,pcb_hole_id:o}=t,i=\"hole_diameter\"in t?t.hole_diameter:t.hole_width,r=\"hole_diameter\"in t?t.hole_diameter:t.hole_height;return{obstacleId:o,absoluteCenter:{x:e,y:n},width:i,height:r}}},oSt=t=\u003e{const{db:e,pcbComponentIds:n,componentCenter:o}=t;if(Array.from(new Set(n)).length!==1)return;const r=new Set(n);let s=1/0,a=1/0,A=-1/0,c=-1/0,l=!1;for(const h of e.pcb_courtyard_rect.list())r.has(h.pcb_component_id)\u0026\u0026(s=Math.min(s,h.center.x-h.width/2),A=Math.max(A,h.center.x+h.width/2),a=Math.min(a,h.center.y-h.height/2),c=Math.max(c,h.center.y+h.height/2),l=!0);for(const h of e.pcb_courtyard_polygon.list())if(r.has(h.pcb_component_id)){for(const d of h.points)s=Math.min(s,d.x),A=Math.max(A,d.x),a=Math.min(a,d.y),c=Math.max(c,d.y);l=!0}for(const h of e.pcb_courtyard_outline.list())if(r.has(h.pcb_component_id)){for(const d of h.outline)s=Math.min(s,d.x),A=Math.max(A,d.x),a=Math.min(a,d.y),c=Math.max(c,d.y);l=!0}for(const h of e.pcb_courtyard_circle.list())r.has(h.pcb_component_id)\u0026\u0026(s=Math.min(s,h.center.x-h.radius),A=Math.max(A,h.center.x+h.radius),a=Math.min(a,h.center.y-h.radius),c=Math.max(c,h.center.y+h.radius),l=!0);if(!l)return;const u=(s+A)/2,g=(a+c)/2;return{offsetFromCenter:{x:u-o.x,y:g-o.y},width:A-s,height:c-a}},iSt=(t,e,n,o,i,r=new Map,s={},a=!1)=\u003e{const A=t.flatMap(m=\u003e{const _=nSt(m,n,o),f=s[m.pcb_component_id];return f?_.map(I=\u003e({...I,size:{x:I.size.x+f.left+f.right,y:I.size.y+f.top+f.bottom},absoluteCenter:{x:I.absoluteCenter.x+(f.right-f.left)/2,y:I.absoluteCenter.y+(f.top-f.bottom)/2}})):_});let c=1/0,l=1/0,u=-1/0,g=-1/0;for(const m of A)c=Math.min(c,m.absoluteCenter.x-m.size.x/2),u=Math.max(u,m.absoluteCenter.x+m.size.x/2),l=Math.min(l,m.absoluteCenter.y-m.size.y/2),g=Math.max(g,m.absoluteCenter.y+m.size.y/2);const h={x:(c+u)/2,y:(l+g)/2},d=A.map(m=\u003e({padId:m.padId,networkId:m.networkId,type:\"rect\",size:m.size,absoluteCenter:m.absoluteCenter,offset:{x:m.absoluteCenter.x-h.x,y:m.absoluteCenter.y-h.y}}));for(const m of A){if(!m.pcbPortId)continue;const _=n.pcb_port.get(m.pcbPortId)?.source_port_id;if(!_)continue;const f=r.get(_)??[];f.push(m.padId),r.set(_,f)}if(i){const m={padId:`${e}-inner`,networkId:`${e}-inner`,type:\"rect\",size:{x:u-c,y:g-l},absoluteCenter:h,offset:{x:0,y:0}};d.push(m)}const p=oSt({db:n,pcbComponentIds:t.map(m=\u003em.pcb_component_id),componentCenter:h});return{componentId:e,isStatic:a,center:h,ccwRotationOffset:0,pads:d,courtyard:p}},rSt=(t,e)=\u003e{if(t.nodeType===\"component\"){const n=t.otherChildElements[0]?.pcb_component_id;return n?[e.pcb_component.get(n)]:[]}return t.childNodes.flatMap(n=\u003erSt(n,e))},xfo=(t,e={})=\u003e{const n={components:[],minGap:0,packOrderStrategy:\"largest_to_smallest\",packPlacementStrategy:\"shortest_connection_along_outline\",obstacles:e.obstacles??[]},o=mz(t,{source_group_id:e.source_group_id}),i=Xc(t);let r=0;const s=new Map,a=Ifo(i,o),A=t.find(f=\u003ef.type===\"pcb_board\");A?.outline\u0026\u0026(n.boundaryOutline=A.outline);const c=f=\u003e{if(f){const I=i.pcb_port.get(f);if(I){const C=i.source_port.get(I.source_port_id);if(C?.subcircuit_connectivity_map_key)return C.subcircuit_connectivity_map_key}}return`unnamed${r++}`},l=o.childNodes??[],u=f=\u003e{const I=[];if(f.nodeType===\"component\"){const C=f.otherChildElements.find(y=\u003ey.type===\"pcb_component\");C\u0026\u0026C.position_mode===\"relative_to_group_anchor\"\u0026\u0026I.push(C)}for(const C of f.childNodes??[])I.push(...u(C));return I},g=new Set(e.staticPcbComponentIds??[]),h=new Set;for(const f of l)if(f.nodeType===\"component\"){const I=f.otherChildElements.find(y=\u003ey.type===\"pcb_component\");if(!I||I.position_mode===\"relative_to_group_anchor\"\u0026\u0026!g.has(I.pcb_component_id))continue;let C=e.shouldAddInnerObstacles??!1;I.obstructs_within_bounds===!0?C=!0:I.obstructs_within_bounds===!1\u0026\u0026(C=!1),n.components.push(iSt([I],I.pcb_component_id,i,c,C,s,e.chipMarginsMap,g.has(I.pcb_component_id)))}else if(f.nodeType===\"group\"){const I=rSt(f,i);if(!I.length)continue;for(const y of I)h.add(y.pcb_component_id);const C=f.sourceGroup?.source_group_id??f.sourceGroup?.name??`group_${n.components.length}`;n.components.push(iSt(I,C,i,c,void 0,s,e.chipMarginsMap,g.has(C)))}const d=l.flatMap(f=\u003eu(f));for(const f of d){if(g.has(f.pcb_component_id)||h.has(f.pcb_component_id))continue;const I=oSt({db:i,pcbComponentIds:[f.pcb_component_id],componentCenter:f.center});if(I){n.obstacles.push({obstacleId:f.pcb_component_id,absoluteCenter:{x:f.center.x+I.offsetFromCenter.x,y:f.center.y+I.offsetFromCenter.y},width:I.width,height:I.height});continue}const C=nSt(f,i,c);if(C.length===0)continue;let y=1/0,x=1/0,E=-1/0,B=-1/0;for(const M of C)y=Math.min(y,M.absoluteCenter.x-M.size.x/2),E=Math.max(E,M.absoluteCenter.x+M.size.x/2),x=Math.min(x,M.absoluteCenter.y-M.size.y/2),B=Math.max(B,M.absoluteCenter.y+M.size.y/2);const S={x:(y+E)/2,y:(x+B)/2},Q=E-y,w=B-x;n.obstacles.push({obstacleId:f.pcb_component_id,absoluteCenter:S,width:Q,height:w})}for(const f of a){const I=yfo(f);I\u0026\u0026n.obstacles.push(I)}const p=[],m=new Set,_=typeof i.source_trace.list==\"function\"?i.source_trace.list():t.filter(f=\u003ef.type===\"source_trace\");for(const f of _){const I=f.connected_source_port_ids||[],C=f.connected_source_net_ids||[];if(!(I.length===2\u0026\u0026C.length===0))continue;const[x,E]=I,B=x?s.get(x)??[]:[],S=E?s.get(E)??[]:[];for(const Q of B)for(const w of S){const M=[Q,w].sort().join(\"--\");m.has(M)||(p.push({padIds:[Q,w],weight:1,ignoreWeakConnections:!0}),m.add(M))}}return p.length\u003e0\u0026\u0026(n.weightedConnections=p),n},Efo=t=\u003e{const e=t.components.map(n=\u003e({...n.isStatic?{...n,pads:n.pads.map(o=\u003e({...o}))}:{componentId:n.componentId,availableRotationDegrees:n.availableRotationDegrees,pads:n.pads.map(({absoluteCenter:o,...i})=\u003ei),courtyard:n.courtyard}}));return{...t,components:e}},Zf=class{MAX_ITERATIONS=2e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};step(){if(!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.constructor.name} error: ${e}`,this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026(this.error=`${this.constructor.name} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function mve(t,e){const n=e*Math.PI/180,o=Math.cos(n),i=Math.sin(n);return{x:t.x*o-t.y*i,y:t.x*i+t.y*o}}function Bfo(t,e,n){const o=(n%360+360)%360;return Math.round((o+90)%180)===0?{width:e,height:t}:{width:t,height:e}}function bfo(t,e){const n=Math.min(t,e);return Math.min(.35,Math.max(.08,n*.22))}function Sfo(t,e=!1){const n=t.charAt(0).toUpperCase();if(e){if(n===\"C\")return\"rgba(30, 64, 175, 0.35)\";if(n===\"R\")return\"rgba(5, 150, 105, 0.35)\";if(n===\"L\")return\"rgba(126, 34, 206, 0.35)\";if(n===\"U\")return\"rgba(180, 83, 9, 0.35)\"}return n===\"C\"?\"rgba(59, 130, 246, 0.18)\":n===\"R\"?\"rgba(16, 185, 129, 0.18)\":n===\"L\"?\"rgba(168, 85, 247, 0.18)\":n===\"U\"?\"rgba(245, 158, 11, 0.18)\":\"rgba(59, 130, 246, 0.12)\"}function Vh(t,e){const n={points:[],rects:[],lines:[],circles:[],texts:[]},o={};for(const a of Object.keys(t.netConnMap)){const[A,c]=a.split(\"-\");o[A]=c}for(const[a,A]of Object.entries(t.chipMap)){const c=A.pins.map(_=\u003et.chipPinMap[_]),l=e.chipPlacements[a];if(!l)continue;let u,g;if(A.size\u0026\u0026Number.isFinite(A.size.x)\u0026\u0026Number.isFinite(A.size.y))u=A.size.x,g=A.size.y;else{const _=c.map(E=\u003eE.offset.x),f=c.map(E=\u003eE.offset.y),I=_.length?Math.min(..._):-5,C=_.length?Math.max(..._):5,y=f.length?Math.min(...f):-5,x=f.length?Math.max(...f):5;u=Math.max(10,C-I+6),g=Math.max(10,x-y+6)}const h=l.x,d=l.y,p=Bfo(u,g,l.ccwRotationDegrees),m=A.fixedPosition?`${a} [fixed]`:a;n.rects.push({center:{x:h,y:d},width:p.width,height:p.height,label:m,fill:Sfo(a,!!A.fixedPosition),stroke:\"none\"}),n.texts.push({x:h,y:d,text:m,fontSize:bfo(p.width,p.height)});for(const _ of c){const f=mve(_.offset,l.ccwRotationDegrees),I=l.x+f.x,C=l.y+f.y,y=o[_.pinId],x=y?`${_.pinId} (${y})`:_.pinId;n.points.push({x:I,y:C,label:x})}}const i={};for(const[a,A]of Object.entries(o))i[A]||(i[A]=[]),i[A].push(a);for(const[,a]of Object.entries(i)){const A=a.map(c=\u003e{const l=t.chipPinMap[c];if(l){for(const[u,g]of Object.entries(t.chipMap))if(g.pins.includes(c)){const h=e.chipPlacements[u];if(h){const d=mve(l.offset,h.ccwRotationDegrees);return{x:h.x+d.x,y:h.y+d.y}}}return l.offset}return null}).filter(Boolean);for(let c=0;c\u003cA.length;c++)for(let l=c+1;l\u003cA.length;l++)n.lines.push({points:[A[c],A[l]],strokeColor:\"rgba(0,0,0,0.1)\"})}const r=a=\u003e{const A=t.chipPinMap[a];if(A){for(const[c,l]of Object.entries(t.chipMap))if(l.pins.includes(a)){const u=e.chipPlacements[c];if(u){const g=mve(A.offset,u.ccwRotationDegrees);return{x:u.x+g.x,y:u.y+g.y}}}return A.offset}return null},s=new Set;for(const[a,A]of Object.entries(t.pinStrongConnMap)){if(!A)continue;const[c,l]=a.split(\"-\"),u=c\u003cl?`${c}-${l}`:`${l}-${c}`;if(s.has(u))continue;s.add(u);const g=r(c),h=r(l);!g||!h||n.lines.push({points:[g,h]})}return n}var Qfo=t=\u003eJSON.stringify(t),_ve=new Map;function pb(t){const e=Qfo(t);if(_ve.has(e))return structuredClone(_ve.get(e));const n=Object.entries(t.chipMap).map(([s,a])=\u003e{const c=a.pins.map(u=\u003et.chipPinMap[u]).map(u=\u003e{let g=u.pinId;for(const[h,d]of Object.entries(t.pinStrongConnMap))if(d\u0026\u0026h.includes(u.pinId)){const[p,m]=h.split(\"-\");if(p===u.pinId||m===u.pinId){g=[p,m].sort().join(\"_\");break}}return{padId:u.pinId,networkId:g,type:\"rect\",offset:u.offset,size:{x:.001,y:.001}}});c.push({padId:`${s}-body`,networkId:s,type:\"rect\",offset:{x:0,y:0},size:{x:a.size.x,y:a.size.y}});const l=a.availableRotations?.[0]??0;return{componentId:s,pads:c,availableRotationDegrees:a.availableRotations??[0,90,180,270],...a.fixedPosition\u0026\u0026{isStatic:!0,center:a.fixedPosition,ccwRotationOffset:l}}}),o=_fo({components:n,minGap:.4,packOrderStrategy:\"largest_to_smallest\",packPlacementStrategy:\"shortest_connection_along_outline\"}),i={};for(const s of o.components)i[s.componentId]={x:s.center.x,y:s.center.y,ccwRotationDegrees:s.ccwRotationOffset};const r={chipPlacements:i,groupPlacements:{}};return _ve.set(e,r),structuredClone(r)}var FN=t=\u003e{const e=new Map;for(const n of Object.values(t.chipMap))for(const o of n.pins)e.set(o,n);return e},vfo=class extends Zf{inputProblem;partitions=[];decouplingCapGroups;crystalCircuitGroups;constructor({inputProblem:t,decouplingCapGroups:e,crystalCircuitGroups:n}){super(),this.inputProblem=t,this.decouplingCapGroups=e,this.crystalCircuitGroups=n}_step(){this.partitions=this.createPartitions(this.inputProblem),this.solved=!0}createPartitions(t){const e=Object.keys(t.chipMap),n=new Set,o=[];for(const u of this.crystalCircuitGroups??[]){const g=[u.crystalChipId,...u.loadCaps.map(h=\u003eh.chipId),...u.seriesResistors.map(h=\u003eh.chipId)].filter(h=\u003et.chipMap[h]);if(!(g.length\u003c3)){o.push({chipIds:g,group:u});for(const h of g)n.add(h)}}const i=new Set,r=[];if(this.decouplingCapGroups\u0026\u0026this.decouplingCapGroups.length\u003e0)for(const u of this.decouplingCapGroups){const g=[];for(const h of u.decouplingCapChipIds)t.chipMap[h]\u0026\u0026!n.has(h)\u0026\u0026g.push(h);if(g.length\u003e=2){r.push(g);for(const h of g)i.add(h)}}const s=e.filter(u=\u003e!i.has(u)\u0026\u0026!n.has(u)),a=new Map,A=FN(t);for(const u of s)a.set(u,new Set);for(const[u,g]of Object.entries(t.pinStrongConnMap)){if(!g)continue;const[h,d]=u.split(\"-\"),p=A.get(h)?.chipId,m=A.get(d)?.chipId;p\u0026\u0026m\u0026\u0026p!==m\u0026\u0026!i.has(p)\u0026\u0026!i.has(m)\u0026\u0026!n.has(p)\u0026\u0026!n.has(m)\u0026\u0026(a.get(p).add(m),a.get(m).add(p))}const c=new Set,l=[];for(const u of s)if(!c.has(u)){const g=this.dfs(u,a,c);g.length\u003e0\u0026\u0026l.push(g)}return[...o.map(({chipIds:u,group:g})=\u003ethis.createInputProblemFromPartition(u,t,{partitionType:\"crystal_circuit\",crystalCircuitGroup:g})),...r.map(u=\u003e{const g=this.decouplingCapGroups?.find(h=\u003eh.decouplingCapChipIds.some(d=\u003eu.includes(d)));return this.createInputProblemFromPartition(u,t,{partitionType:\"decoupling_caps\",decouplingMainChipId:g?.mainChipId,decouplingMainChipSide:g?.mainChipSide})}),...l.map(u=\u003ethis.createInputProblemFromPartition(u,t))]}dfs(t,e,n){const o=[],i=[t];for(;i.length\u003e0;){const r=i.pop();if(n.has(r))continue;n.add(r),o.push(r);const s=e.get(r)||new Set;for(const a of s)n.has(a)||i.push(a)}return o}createInputProblemFromPartition(t,e,n){const o=t,i=new Set;for(const u of o){const g=e.chipMap[u];for(const h of g.pins)i.add(h)}const r={},s={},a={},A={},c={};for(const u of o)r[u]=e.chipMap[u];for(const u of i)e.chipPinMap[u]\u0026\u0026(s[u]=e.chipPinMap[u]);for(const[u,g]of Object.entries(e.pinStrongConnMap)){const[h,d]=u.split(\"-\");i.has(h)\u0026\u0026i.has(d)\u0026\u0026(A[u]=g)}const l=new Set;for(const[u,g]of Object.entries(e.netConnMap)){if(!g)continue;const[h,d]=u.split(\"-\");i.has(h)\u0026\u0026(l.add(d),c[u]=g)}for(const u of l)e.netMap[u]\u0026\u0026(a[u]=e.netMap[u]);return{...e,chipMap:r,chipPinMap:s,netMap:a,pinStrongConnMap:A,netConnMap:c,isPartition:!0,partitionType:n?.partitionType,decouplingMainChipId:n?.decouplingMainChipId,decouplingMainChipSide:n?.decouplingMainChipSide,crystalCircuitGroup:n?.crystalCircuitGroup}}visualize(){if(this.partitions.length===0){const n=pb(this.inputProblem);return Vh(this.inputProblem,n)}const t=this.partitions.map(n=\u003e{const o=pb(n);return Vh(n,o)}),e=this.partitions.map((n,o)=\u003e`partition${o}`);return zce(t,{titles:e})}},wfo=(t,e=1)=\u003e{let n=0;for(let o=0;o\u003ct.length;o++){const i=t.charCodeAt(o);n=(n\u003c\u003c5)-n+i,n=n\u0026n}return`hsl(${Math.abs(n)%360}, 70%, 50%, ${e})`},sSt=t=\u003e(Math.round(t/90)*90%360+360)%360,ta=(t,e)=\u003e{switch(sSt(e)){case 90:return{x:-t.y,y:t.x};case 180:return{x:-t.x,y:-t.y};case 270:return{x:t.y,y:-t.x};default:return{x:t.x,y:t.y}}},dd=(t,e)=\u003e{const n=sSt(e);return n===90||n===270?{x:t.y,y:t.x}:{x:t.x,y:t.y}},aSt=({inputProblem:t,netIds:e})=\u003e{const n=e.filter(r=\u003et.netMap[r]?.isPositiveVoltageSource);if(n.length===1)return n[0];const o=e.filter(r=\u003et.netMap[r]?.isGround),i=e.filter(r=\u003e{const s=t.netMap[r];return s?!s.isGround:!1});return o.length!==1||i.length!==1?null:i[0]},Pfo=2,Mfo=(t,e)=\u003et[0]===e[0]\u0026\u0026t[1]===e[1],Dfo=({groundedCapacitorsWithoutPowerMetadata:t})=\u003e{const e=[];for(const n of t){const o=e.find(i=\u003eMfo(i.netPair,n.netPair));if(o){o.capacitorChipIds.push(n.capacitorChipId);continue}e.push({capacitorChipIds:[n.capacitorChipId],netPair:n.netPair})}return e.filter(n=\u003en.capacitorChipIds.length\u003e=Pfo)},Nfo=class extends Zf{inputProblem;queuedChips;outputDecouplingCapGroups=[];groundedCapacitorsWithoutPowerMetadata=[];groupsByMainChipId=new Map;constructor(t){super(),this.inputProblem=t,this.queuedChips=Object.values(t.chipMap)}isTwoPinRestrictedRotation(t){if(t.pins.length!==2||!t.availableRotations)return!1;const e=new Set([0,180]);return t.availableRotations.length\u003e0\u0026\u0026(t.availableRotations.length===1||t.availableRotations.every(n=\u003ee.has(n)))}pinsOnOppositeYSidesAfterRotation(t){if(t.pins.length!==2)return!1;const[e,n]=t.pins,o=this.inputProblem.chipPinMap[e],i=this.inputProblem.chipPinMap[n];if(!o||!i)return!1;const r=t.availableRotations?.[0]??0,s=ta(o.offset,r),a=ta(i.offset,r),A=Math.abs(s.y-a.y);return A\u003e0\u0026\u0026A\u003e=Math.abs(s.x-a.x)}getStronglyConnectedNeighborChips(t){const e=new Set;for(const[n,o]of Object.entries(this.inputProblem.pinStrongConnMap)){if(!o)continue;const[i,r]=n.split(\"-\");if(i===t){const s=r.split(\".\")[0];e.add(s)}else if(r===t){const s=i.split(\".\")[0];e.add(s)}}return e}findMainChipIdForCap(t,e){return this.findStronglyConnectedMainChipId(t)??this.findRailSharingMainChipId(t,e)??this.findUniqueMainChipSharingNetPair(e)}findUniqueMainChipSharingNetPair(t){const e=Object.values(this.inputProblem.chipMap).filter(n=\u003e!n.isCapacitor\u0026\u0026t.every(o=\u003en.pins.some(i=\u003ethis.getNetIdsForPin(i).has(o))));return e.length===1?e[0].chipId:null}findStronglyConnectedMainChipId(t){const e=new Map;for(const i of t.pins){const r=this.getStronglyConnectedNeighborChips(i);for(const s of r){if(s===t.chipId)continue;const a=e.get(s)||0;e.set(s,a+1)}}let n=null,o=0;for(const[i,r]of e)r\u003co||n!==null\u0026\u0026r===o\u0026\u0026i\u003en||(n=i,o=r);return n}findRailSharingMainChipId(t,e){for(const n of Object.values(this.inputProblem.chipMap)){if(n.chipId===t.chipId||!n.isCapacitor)continue;const o=this.getNormalizedNetPair(n);if(!o||o[0]!==e[0]||o[1]!==e[1])continue;const i=this.findStronglyConnectedMainChipId(n);if(i)return i}return null}getNetIdsForPin(t){const e=new Set;for(const[n,o]of Object.entries(this.inputProblem.netConnMap)){if(!o)continue;const[i,r]=n.split(\"-\");i===t\u0026\u0026e.add(r)}return e}getNormalizedNetPair(t){if(t.pins.length!==2)return null;const e=new Set;for(const i of t.pins){const r=this.getNetIdsForPin(i);for(const s of r)e.add(s)}if(e.size!==2)return null;const[n,o]=Array.from(e).sort();return[n,o]}addToGroup(t,e,n){const[o,i]=e,r=`${t}__${o}__${i}`;let s=this.groupsByMainChipId.get(r);s||(s={decouplingCapGroupId:`decap_group_${t}__${o}__${i}`,mainChipId:t,mainChipSide:this.getMainChipSide(t,e),netPair:[o,i],decouplingCapChipIds:[]},this.groupsByMainChipId.set(r,s),this.outputDecouplingCapGroups.push(s)),s.decouplingCapChipIds.includes(n)||s.decouplingCapChipIds.push(n)}getMainChipSide(t,e){const n=this.inputProblem.chipMap[t];if(!n)return null;const o=aSt({inputProblem:this.inputProblem,netIds:e});if(!o)return null;const i=new Map;for(const a of n.pins){const A=this.inputProblem.chipPinMap[a];!A||!this.getNetIdsForPin(a).has(o)||i.set(A.side,(i.get(A.side)??0)+1)}let r=null,s=0;for(const[a,A]of i)A\u003c=s||(r=a,s=A);return r}lastChip=null;addGroundedCapacitorGroupsWithoutPowerMetadata(){const t=Dfo({groundedCapacitorsWithoutPowerMetadata:this.groundedCapacitorsWithoutPowerMetadata});for(const e of t){const n=this.findUniqueMainChipSharingNetPair(e.netPair);if(n)for(const o of e.capacitorChipIds)this.addToGroup(n,e.netPair,o)}}_step(){const t=this.queuedChips.shift();if(this.lastChip=t??null,!t){this.addGroundedCapacitorGroupsWithoutPowerMetadata(),this.solved=!0;return}if(!t.isCapacitor||!(this.isTwoPinRestrictedRotation(t)\u0026\u0026this.pinsOnOppositeYSidesAfterRotation(t)))return;const n=this.getNormalizedNetPair(t);if(!n)return;const[o,i]=n,r=this.inputProblem.netMap[o],s=this.inputProblem.netMap[i];if(!(r?.isGround\u0026\u0026s?.isPositiveVoltageSource||s?.isGround\u0026\u0026r?.isPositiveVoltageSource)){n.filter(l=\u003ethis.inputProblem.netMap[l]?.isGround).length===1\u0026\u0026this.groundedCapacitorsWithoutPowerMetadata.push({capacitorChipId:t.chipId,netPair:n});return}const A=this.findMainChipIdForCap(t,n);A\u0026\u0026this.addToGroup(A,n,t.chipId)}visualize(){const t=pb(this.inputProblem),e=Vh(this.inputProblem,t),n=new Map;for(const o of this.outputDecouplingCapGroups){n.set(o.mainChipId,o);for(const i of o.decouplingCapChipIds)n.set(i,o)}for(const o of e.rects||[])o.label!==this.lastChip?.chipId\u0026\u0026(o.fill=\"rgba(0,0,0,0.5)\");for(const o of e.rects||[]){const i=o.label,r=n.get(i);r\u0026\u0026(o.label=`${o.label}\n${r.decouplingCapGroupId}`,o.fill=wfo(r.decouplingCapGroupId,.8))}return e}getConstructorParams(){return[this.inputProblem]}computeProgress(){const t=Object.keys(this.inputProblem.chipMap).length||1,e=t-this.queuedChips.length;return Math.min(1,Math.max(0,e/t))}},Rfo=class extends Zf{inputProblem;queuedCrystals;outputCrystalCircuitGroups=[];constructor(t){super(),this.inputProblem=t,this.queuedCrystals=Object.values(t.chipMap).filter(e=\u003ee.isCrystal)}getNetIdsForPin(t){const e=new Set;for(const n of Object.keys(this.inputProblem.netMap))this.inputProblem.netConnMap[`${t}-${n}`]\u0026\u0026e.add(n);return e}pinsAreConnected(t,e){if(this.inputProblem.pinStrongConnMap[`${t}-${e}`]||this.inputProblem.pinStrongConnMap[`${e}-${t}`])return!0;const n=this.getNetIdsForPin(t);return Array.from(this.getNetIdsForPin(e)).some(o=\u003en.has(o))}getGroundNetId(t){for(const e of this.getNetIdsForPin(t))if(this.inputProblem.netMap[e]?.isGround)return e;return null}findLoadCapsForCrystalPin(t){const e=[];for(const n of Object.values(this.inputProblem.chipMap))if(!(!n.isCapacitor||n.pins.length!==2))for(const o of n.pins){if(!this.pinsAreConnected(t,o))continue;const i=n.pins.find(s=\u003es!==o);if(!i)continue;const r=this.getGroundNetId(i);r\u0026\u0026e.push({chipId:n.chipId,signalPinId:o,groundPinId:i,groundNetId:r})}return e}findSeriesResistors(t,e){const n=[];for(const o of Object.values(this.inputProblem.chipMap)){if(!o.isResistor||o.pins.length!==2||e.has(o.chipId))continue;const i=t.flatMap(a=\u003eo.pins.filter(A=\u003ethis.pinsAreConnected(a,A)).map(A=\u003e({crystalPinId:a,connectedPinId:A})));if(i.length!==1)continue;const r=i[0],s=o.pins.find(a=\u003ea!==r.connectedPinId);!s||this.getGroundNetId(s)||n.push({chipId:o.chipId,crystalPinId:r.crystalPinId,connectedPinId:r.connectedPinId})}return n}identifyCrystal(t){const e=t.pins.filter(A=\u003e!this.getGroundNetId(A));if(e.length!==2)return null;const[n,o]=e,i=this.findLoadCapsForCrystalPin(n),r=this.findLoadCapsForCrystalPin(o);if(i.length!==1||r.length!==1||i[0].chipId===r[0].chipId||i[0].groundNetId!==r[0].groundNetId)return null;const s=[{chipId:i[0].chipId,signalPinId:i[0].signalPinId,groundPinId:i[0].groundPinId},{chipId:r[0].chipId,signalPinId:r[0].signalPinId,groundPinId:r[0].groundPinId}],a=new Set(s.map(A=\u003eA.chipId));return{crystalCircuitGroupId:`crystal_circuit_${t.chipId}`,crystalChipId:t.chipId,activeCrystalPinIds:[n,o],loadCaps:s,groundNetId:i[0].groundNetId,seriesResistors:this.findSeriesResistors([n,o],a)}}_step(){const t=this.queuedCrystals.shift();if(!t){this.solved=!0;return}const e=this.identifyCrystal(t);e\u0026\u0026this.outputCrystalCircuitGroups.push(e)}visualize(){return Vh(this.inputProblem,pb(this.inputProblem))}getConstructorParams(){return[this.inputProblem]}computeProgress(){const t=Object.values(this.inputProblem.chipMap).filter(e=\u003ee.isCrystal).length;return t===0?1:(t-this.queuedCrystals.length)/t}},Tfo=({firstChipId:t,secondChipId:e},n)=\u003e{const o=n.chipMap[t],i=n.chipMap[e];return o?.isCapacitor\u0026\u0026i?.isCapacitor?n.decouplingCapsGap??n.chipGap:n.partitionGap},kfo=class extends Zf{inputProblem;inputLayout;outputLayout=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputLayout=t.inputLayout}_step(){this.outputLayout=this.createAlignedLayout()??this.inputLayout,this.solved=!0}isPowerGroundNet(t){const e=this.inputProblem.netMap[t];return e?.isPositiveVoltageSource===!0||e?.isGround===!0}getPinNetIds(t){const e=[];for(const[n,o]of Object.entries(this.inputProblem.netConnMap))o\u0026\u0026n.startsWith(`${t}-`)\u0026\u0026e.push(n.slice(t.length+1));return e}pinHasStrongConnection(t){for(const[e,n]of Object.entries(this.inputProblem.pinStrongConnMap))if(n\u0026\u0026(e.startsWith(`${t}-`)||e.endsWith(`-${t}`)))return!0;return!1}getAlignmentGroupId(t){if(t.fixedPosition||t.pins.length!==2)return null;const e=new Set;let n=0;for(const o of t.pins){const i=this.getPinNetIds(o);if(i.length===0){if(this.pinHasStrongConnection(o))return null;continue}let r=!1;for(const s of i)this.isPowerGroundNet(s)?r=!0:e.add(s);r\u0026\u0026n++}return n===0?null:e.size===0?\"power-ground\":e.size===1?`signal:${[...e][0]}`:null}getAlignmentGroups(){const t=Object.keys(this.inputProblem.chipMap);if(t.length\u003c2)return null;const e=new Map;for(const n of t){const o=this.inputProblem.chipMap[n];if(!o||!this.inputLayout.chipPlacements[n])continue;const i=this.getAlignmentGroupId(o);if(!i)continue;const r=e.get(i)??[];r.push(n),e.set(i,r)}return[...e.values()].filter(n=\u003en.length\u003e1).map(n=\u003e({chipIds:n}))}alignGroup(t,e){if(e.length\u003c2)return;let n=0;const o=e.reduce((s,a)=\u003es+this.inputLayout.chipPlacements[a].y,0)/e.length,i=e.reduce((s,a)=\u003es+this.inputLayout.chipPlacements[a].x,0)/e.length;for(const[s,a]of e.entries()){const A=e[s-1];A\u0026\u0026(n+=Tfo({firstChipId:A,secondChipId:a},this.inputProblem));const c=this.inputProblem.chipMap[a],l=this.inputLayout.chipPlacements[a],u=l.ccwRotationDegrees===90||l.ccwRotationDegrees===270;let g=c.size.x;u\u0026\u0026(g=c.size.y);const h=n+g/2;t[a]={x:h,y:o,ccwRotationDegrees:l.ccwRotationDegrees},n+=g}const r=n;for(const s of e)t[s].x+=i-r/2}hasChipOverlap(t){const e=Object.keys(this.inputProblem.chipMap);for(let n=0;n\u003ce.length;n++){const o=e[n],i=this.inputProblem.chipMap[o],r=t[o];if(!r)continue;const s=r.ccwRotationDegrees===90||r.ccwRotationDegrees===270;let a=i.size.x,A=i.size.y;s\u0026\u0026(a=i.size.y,A=i.size.x);for(let c=n+1;c\u003ce.length;c++){const l=e[c],u=this.inputProblem.chipMap[l],g=t[l];if(!g)continue;const h=g.ccwRotationDegrees===90||g.ccwRotationDegrees===270;let d=u.size.x,p=u.size.y;h\u0026\u0026(d=u.size.y,p=u.size.x);const m=Math.abs(r.x-g.x)\u003c(a+d)/2,_=Math.abs(r.y-g.y)\u003c(A+p)/2;if(m\u0026\u0026_)return!0}}return!1}createAlignedLayout(){const t=this.getAlignmentGroups();if(!t)return null;const e={...this.inputLayout.chipPlacements};for(const n of t)this.alignGroup(e,n.chipIds);return this.hasChipOverlap(e)?null:{chipPlacements:e,groupPlacements:{...this.inputLayout.groupPlacements}}}visualize(){return Vh(this.inputProblem,this.outputLayout??this.inputLayout)}getConstructorParams(){return[{inputProblem:this.inputProblem,inputLayout:this.inputLayout}]}},sj=t=\u003e{const e={},n=Object.keys(t.chipPinMap);for(let o=0;o\u003cn.length;o++)for(let i=o+1;i\u003cn.length;i++){const r=n[o],s=n[i];(t.pinStrongConnMap[`${r}-${s}`]||t.pinStrongConnMap[`${s}-${r}`])\u0026\u0026(e[r]??=[],e[s]??=[],e[r].push(t.chipPinMap[s]),e[s].push(t.chipPinMap[r]))}return e},mb=({placement:t,size:e,margin:n=0})=\u003e{const o=dd(e,t.ccwRotationDegrees);return Ey({center:t,width:o.x+n*2,height:o.y+n*2})},ASt=({inputProblem:t,chipIdA:e,placementA:n,chipIdB:o,placementB:i})=\u003e{const r=mb({placement:n,size:t.chipMap[e].size,margin:t.chipGap}),s=mb({placement:i,size:t.chipMap[o].size});return bQn(r,s)\u003e0},Ffo=.2,Lfo=({looseTestPointChipIds:t},e)=\u003e{const n=t.map(s=\u003ee.chipPlacements[s].x),o=t.map(s=\u003ee.chipPlacements[s].y),i=Math.max(...n)-Math.min(...n),r=Math.max(...o)-Math.min(...o);return i\u003e=r?{perpendicularAxis:\"y\",tangentAxis:\"x\"}:{perpendicularAxis:\"x\",tangentAxis:\"y\"}},Hfo=({looseTestPointChipIds:t,perpendicularAxis:e,tangentAxis:n},o)=\u003e{const i=t.reduce((A,c)=\u003eA+o.chipPlacements[c][e],0)/t.length,r=[...t].sort((A,c)=\u003eo.chipPlacements[A][n]-o.chipPlacements[c][n]),s={};let a;for(const A of r){const c={...o.chipPlacements[A],[e]:i};if(a){const l=s[a],u=dd(o.inputProblem.chipMap[a].size,l.ccwRotationDegrees),g=dd(o.inputProblem.chipMap[A].size,c.ccwRotationDegrees),h=l[n]+u[n]/2+o.inputProblem.chipGap+g[n]/2;c[n]\u003ch\u0026\u0026(c[n]=h)}s[A]=c,a=A}return s},Ofo=({looseTestPointChipIds:t,testPointRow:e},n)=\u003e{const o=new Set(t);return t.some(i=\u003eObject.entries(n.chipPlacements).some(([r,s])=\u003e!o.has(r)\u0026\u0026ASt({inputProblem:n.inputProblem,chipIdA:i,placementA:e[i],chipIdB:r,placementB:s})))},Gfo=({looseTestPointChipIds:t,perpendicularAxis:e,testPointRow:n},o)=\u003e{const i=Math.max(o.inputProblem.chipGap,Ffo);let r=0;for(;;){const s=[0];r\u003e0\u0026\u0026(s.length=0,s.push(-r*i,r*i));for(const a of s){const A=structuredClone(n);for(const c of t)A[c][e]+=a;if(!Ofo({looseTestPointChipIds:t,testPointRow:A},o))return A}r++}},Yfo=({anchoredTestPointChipIds:t},e)=\u003e{const n=Object.values(e.inputProblem.chipMap).filter(a=\u003ea.isTestPoint\u0026\u0026!a.fixedPosition\u0026\u0026a.pins.length===1\u0026\u0026e.chipPlacements[a.chipId]\u0026\u0026!t.has(a.chipId)).map(a=\u003ea.chipId);if(n.length\u003c2)return;const{perpendicularAxis:o,tangentAxis:i}=Lfo({looseTestPointChipIds:n},e),r=Hfo({looseTestPointChipIds:n,perpendicularAxis:o,tangentAxis:i},e),s=Gfo({looseTestPointChipIds:n,perpendicularAxis:o,testPointRow:r},e);for(const[a,A]of Object.entries(s))e.chipPlacements[a]=A},Ufo=1.5,cSt=.2,lSt=1e-6,Kfo=2,Vfo=.5,zfo={\"x-\":{x:-1,y:0},\"x+\":{x:1,y:0},\"y-\":{x:0,y:-1},\"y+\":{x:0,y:1}},nle={\"x-\":{normalAxis:\"x\",tangentAxis:\"y\",direction:-1},\"x+\":{normalAxis:\"x\",tangentAxis:\"y\",direction:1},\"y-\":{normalAxis:\"y\",tangentAxis:\"x\",direction:-1},\"y+\":{normalAxis:\"y\",tangentAxis:\"x\",direction:1}},Jfo={\"x-\":\"x+\",\"x+\":\"x-\",\"y-\":\"y+\",\"y+\":\"y-\"},Wfo=t=\u003eMath.abs(t.x)\u003eMath.abs(t.y)?t.x\u003c0?\"x-\":\"x+\":t.y\u003c0?\"y-\":\"y+\",fve=(t,e)=\u003eWfo(ta(zfo[t],e)),ole=({anchorChipId:t,anchorPinId:e,side:n},o)=\u003e{const i=o.inputLayout.chipPlacements[t],r=o.inputProblem.chipPinMap[e],s=ta(r.offset,i.ccwRotationDegrees),a=nle[n].tangentAxis;return i[a]+s[a]},jfo=({group:t},e)=\u003e{if(t.members.length\u003c2)return[t];const n=e.inputProblem.chipMap[t.anchorChipId],o=e.inputLayout.chipPlacements[t.anchorChipId],i=n.pins.filter(l=\u003e{const u=e.inputProblem.chipPinMap[l];return u\u0026\u0026fve(u.side,o.ccwRotationDegrees)===t.side}).map(l=\u003eole({anchorChipId:t.anchorChipId,anchorPinId:l,side:t.side},e)).sort((l,u)=\u003el-u),r=i.slice(1).map((l,u)=\u003el-i[u]).filter(l=\u003el\u003elSt);if(r.length===0)return[t];const s=Math.min(...r)*Ufo,a=[];let A=[],c;for(const l of t.members){const u=ole({anchorChipId:l.anchorChipId,anchorPinId:l.anchorPinId,side:l.side},e);c!==void 0\u0026\u0026u-c\u003es+lSt\u0026\u0026(a.push({...t,members:A}),A=[]),A.push(l),c=u}return A.length\u003e0\u0026\u0026a.push({...t,members:A}),a},$fo=t=\u003e{const e=FN(t.inputProblem),n=sj(t.inputProblem),o=[];for(const i of Object.values(t.inputProblem.chipMap)){if(!i.isTestPoint||i.fixedPosition||i.pins.length!==1)continue;const r=i.pins[0],s=n[r]?.[0];if(!s)continue;const a=s.pinId,A=e.get(a)?.chipId;if(!A||A===i.chipId||t.inputProblem.chipMap[A]?.isTestPoint)continue;const c=t.inputLayout.chipPlacements[A];if(!c)continue;const l=fve(s.side,c.ccwRotationDegrees);let u=o.find(g=\u003eg.anchorChipId===A\u0026\u0026g.side===l);u||(u={anchorChipId:A,side:l,members:[]},o.push(u)),u.members.push({testPointChipId:i.chipId,testPointPinId:r,anchorChipId:A,anchorPinId:a,side:l})}for(const i of o)i.members.sort((r,s)=\u003eole({anchorChipId:r.anchorChipId,anchorPinId:r.anchorPinId,side:r.side},t)-ole({anchorChipId:s.anchorChipId,anchorPinId:s.anchorPinId,side:s.side},t));return o.flatMap(i=\u003ejfo({group:i},t))},qfo=({member:t},e)=\u003e{const n=e.inputProblem.chipMap[t.testPointChipId],o=e.inputProblem.chipPinMap[t.testPointPinId],i=n.availableRotations??[0,90,180,270],r=Jfo[t.side];return i.find(s=\u003efve(o.side,s)===r)??i[0]},Xfo=({group:t},e)=\u003e{const{inputProblem:n,chipPlacements:o}=e,i=o[t.anchorChipId],r=n.chipMap[t.anchorChipId],s=mb({placement:i,size:r.size}),{normalAxis:a,tangentAxis:A,direction:c}=nle[t.side],l=t.members.map(g=\u003e{const h=n.chipPinMap[g.anchorPinId],d=ta(h.offset,i.ccwRotationDegrees),p={x:i.x+d.x,y:i.y+d.y},m=qfo({member:g},e),_=dd(n.chipMap[g.testPointChipId].size,m);return{member:g,anchorPinPosition:p,ccwRotationDegrees:m,size:_}}).sort((g,h)=\u003eg.anchorPinPosition[A]-h.anchorPinPosition[A]);let u=-1/0;for(const g of l){const h=g.size[A],d=g.anchorPinPosition[A],p=Math.max(d,u+n.chipGap+h/2);u=p+h/2;const m=g.anchorPinPosition[a];let _=s.minX;a===\"y\"\u0026\u0026(_=s.minY),a===\"x\"\u0026\u0026c\u003e0\u0026\u0026(_=s.maxX),a===\"y\"\u0026\u0026c\u003e0\u0026\u0026(_=s.maxY);let f=Math.min(_,m);c\u003e0\u0026\u0026(f=Math.max(_,m));const I=f+c*(n.chipGap+g.size[a]/2);let C=I,y=p;a===\"y\"\u0026\u0026(C=p,y=I),o[g.member.testPointChipId]={x:C,y,ccwRotationDegrees:g.ccwRotationDegrees}}},uSt=({group:t},e)=\u003e{const n=new Set(t.members.map(o=\u003eo.testPointChipId));return t.members.some(o=\u003e{const i=e.chipPlacements[o.testPointChipId];return Object.entries(e.chipPlacements).some(([r,s])=\u003er!==t.anchorChipId\u0026\u0026!n.has(r)\u0026\u0026ASt({inputProblem:e.inputProblem,chipIdA:o.testPointChipId,placementA:i,chipIdB:r,placementB:s}))})},Zfo=({group:t},e)=\u003e{const{normalAxis:n,direction:o}=nle[t.side],i=Math.max(e.inputProblem.chipGap,cSt);for(;uSt({group:t},e);)for(const r of t.members)e.chipPlacements[r.testPointChipId][n]+=o*i},gSt=({inputProblem:t,pinId:e,placement:n})=\u003e{const o=t.chipPinMap[e],i=ta(o.offset,n.ccwRotationDegrees);return{x:n.x+i.x,y:n.y+i.y}},dSt=({group:t},e)=\u003e{const n=new Set(t.members.map(i=\u003ei.testPointChipId));let o=0;for(const i of t.members){const r=gSt({inputProblem:e.inputProblem,pinId:i.testPointPinId,placement:e.chipPlacements[i.testPointChipId]}),s=gSt({inputProblem:e.inputProblem,pinId:i.anchorPinId,placement:e.chipPlacements[i.anchorChipId]});for(const[a,A]of Object.entries(e.chipPlacements)){if(a===i.anchorChipId||n.has(a))continue;const c=mb({placement:A,size:e.inputProblem.chipMap[a].size});Exe(r,s,c)\u0026\u0026o++}}return o},e1o=({group:t,tangentAxis:e,searchStep:n},o)=\u003e{const i=new Set(t.members.map(A=\u003eA.testPointChipId)),r=t.members.reduce((A,c)=\u003eA+o.chipPlacements[c.testPointChipId][e],0)/t.members.length,s=Math.max(...t.members.map(A=\u003e{const c=o.chipPlacements[A.testPointChipId];return dd(o.inputProblem.chipMap[A.testPointChipId].size,c.ccwRotationDegrees)[e]})),a=Object.entries(o.chipPlacements).reduce((A,[c,l])=\u003e{if(i.has(c))return A;const u=dd(o.inputProblem.chipMap[c].size,l.ccwRotationDegrees)[e];return Math.max(A,Math.abs(l[e]-r)+u+s)},0)+o.inputProblem.partitionGap;return Math.ceil(a/n)+Kfo},t1o=({group:t},e)=\u003e{const{tangentAxis:n}=nle[t.side],o=new Map(t.members.map(A=\u003e[A.testPointChipId,{...e.chipPlacements[A.testPointChipId]}])),i=Math.max(e.inputProblem.partitionGap*Vfo,e.inputProblem.chipGap,cSt),r=e1o({group:t,tangentAxis:n,searchStep:i},e);let s=0,a=Number.POSITIVE_INFINITY;for(let A=0;A\u003c=r;A++){const c=[0];A\u003e0\u0026\u0026(c.length=0,c.push(-A*i,A*i));for(const l of c){for(const g of t.members){const h=o.get(g.testPointChipId);e.chipPlacements[g.testPointChipId]={...h,[n]:h[n]+l}}if(uSt({group:t},e))continue;const u=dSt({group:t},e);if(u\u003ca\u0026\u0026(a=u,s=l),u===0)break}if(a===0)break}for(const A of t.members){const c=o.get(A.testPointChipId);e.chipPlacements[A.testPointChipId]={...c,[n]:c[n]+s}}},n1o=class extends Zf{inputProblem;inputLayout;outputLayout=null;testPointSideGroups=[];connectionBodyCrossingCount=0;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputLayout=t.inputLayout}_step(){const t=structuredClone(this.inputLayout.chipPlacements),e={inputProblem:this.inputProblem,chipPlacements:t};this.testPointSideGroups=$fo({inputProblem:this.inputProblem,inputLayout:this.inputLayout});for(const o of this.testPointSideGroups)Xfo({group:o},e);for(const o of this.testPointSideGroups)Zfo({group:o},e),t1o({group:o},e);this.connectionBodyCrossingCount=this.testPointSideGroups.reduce((o,i)=\u003eo+dSt({group:i},e),0);const n=new Set(this.testPointSideGroups.flatMap(o=\u003eo.members.map(i=\u003ei.testPointChipId)));Yfo({anchoredTestPointChipIds:n},e),this.outputLayout={chipPlacements:t,groupPlacements:{...this.inputLayout.groupPlacements}},this.solved=!0}visualize(){return Vh(this.inputProblem,this.outputLayout??this.inputLayout)}};function o1o(t){const{inputProblem:e}=t,n=new Map,o=new Set;let i=!1;const r=new Map;for(const[s,a]of Object.entries(e.pinStrongConnMap)){if(!a)continue;i=!0;const A=s.split(\"-\");if(A.length===2\u0026\u0026A[0]\u0026\u0026A[1]){const c=e.chipPinMap[A[0]],l=e.chipPinMap[A[1]];if(c\u0026\u0026l){const u=A[0].split(\".\")[0],g=A[1].split(\".\")[0];if(u\u0026\u0026g\u0026\u0026u!==g){const h=`${u}-${g}`,d=`${g}-${u}`;r.has(h)||r.set(h,new Set),r.has(d)||r.set(d,new Set),r.get(h).add(c.side),r.get(d).add(l.side)}}}}if(i)for(const[s,a]of Object.entries(e.netConnMap)){if(!a)continue;const[A,c]=s.split(\"-\");A\u0026\u0026c\u0026\u0026o.add(A)}else for(const[s,a]of Object.entries(e.netConnMap)){if(!a)continue;const[A,c]=s.split(\"-\");if(A\u0026\u0026c){if(!e.chipPinMap[A])continue;const u=A.split(\".\")[0];let g=!0;for(const[h,d]of r.entries()){const[p,m]=h.split(\"-\");if(p===u)for(const[_,f]of Object.entries(e.netConnMap)){if(!f)continue;const[I,C]=_.split(\"-\");if(C===c\u0026\u0026I\u0026\u0026I!==A){const y=e.chipPinMap[I];if(!y)continue;if(I.split(\".\")[0]===m\u0026\u0026!d.has(y.side)){g=!1;break}}}}if(g)n.set(A,c);else{const h=`${A}_opposite-strong-side-disconnected`;n.set(A,h),o.add(A)}}}for(const[s,a]of Object.entries(e.pinStrongConnMap)){if(!a)continue;const A=s.split(\"-\");if(A.length===2\u0026\u0026A[0]\u0026\u0026A[1]){const c=n.get(A[0])||n.get(A[1]);c?(n.set(A[0],c),n.set(A[1],c)):(n.set(A[0],s),n.set(A[1],s))}}return{pinToNetworkMap:n,filteredPins:o}}var i1o=t=\u003e{const e=t.flatMap(a=\u003e[a.offset.x-a.size.x/2,a.offset.x+a.size.x/2]),n=t.flatMap(a=\u003e[a.offset.y-a.size.y/2,a.offset.y+a.size.y/2]),o=e.length?Math.min(...e):0,i=e.length?Math.max(...e):0,r=n.length?Math.min(...n):0,s=n.length?Math.max(...n):0;return{minX:o,maxX:i,minY:r,maxY:s}},ile=.2,aj=1e-6,Ive=2,OH=(t,e)=\u003e{const n=ta(t.offset,e.ccwRotationDegrees);return{x:e.x+n.x,y:e.y+n.y}},r1o=(t,e)=\u003e{for(const[n,o]of Object.entries(t.netMap))if(o.isGround\u0026\u0026t.netConnMap[`${e}-${n}`])return!0;return!1},s1o=({chip:t,inputProblem:e,placement:n})=\u003e{const[o,i]=t.pins,r=o\u0026\u0026e.chipPinMap[o],s=i\u0026\u0026e.chipPinMap[i];if(!r||!s)return!1;const a=ta(r.offset,n.ccwRotationDegrees),A=ta(s.offset,n.ccwRotationDegrees);return Math.abs(a.y-A.y)\u003eMath.abs(a.x-A.x)},a1o=({chipId:t,chipPlacements:e,ignoredChipIds:n,inputProblem:o,minimumGap:i})=\u003e{const r=o.chipMap[t],s=e[t];if(!r||!s)return!1;const a=dd(r.size,s.ccwRotationDegrees),A=Ey({center:s,width:a.x,height:a.y});for(const[c,l]of Object.entries(e)){if(n.has(c))continue;const u=o.chipMap[c];if(!u)continue;const g=dd(u.size,l.ccwRotationDegrees),h=Ey({center:l,width:g.x,height:g.y});if(EV(A,h)\u003ci-aj)return!1}return!0},LN=({chipIds:t,clearanceGroupChipIds:e,dx:n,dy:o,chipPlacements:i,inputProblem:r,minimumOutsideGap:s})=\u003e{const a=t.map(l=\u003ei[l]).filter(l=\u003e!!l);if(a.length!==t.length)return!1;for(const l of a)l.x+=n,l.y+=o;const A=new Set(e??t);if(t.every(l=\u003ea1o({chipId:l,chipPlacements:i,ignoredChipIds:A,inputProblem:r,minimumGap:s??r.chipGap})))return!0;for(const l of a)l.x-=n,l.y-=o;return!1},hSt=({inputProblem:t,connectedPinsByPinId:e,chipPlacements:n,rigidChipGroups:o=[]})=\u003e{const i=FN(t),r=Object.keys(t.chipMap).length;for(const s of Object.values(t.chipMap))if(!(s.pins.length\u003c=Ive))for(const a of s.pins)for(const A of e[a]??[]){const c=i.get(A.pinId);if(!c||c.fixedPosition||c.pins.length!==Ive)continue;const l=t.chipPinMap[a],u=n[s.chipId],g=n[c.chipId];if(!l||!u||!g)continue;const h=OH(l,u),d=OH(A,g),p=Math.abs(h.x-d.x)\u003c=aj,m=Math.abs(h.y-d.y)\u003c=aj,_=s1o({chip:c,inputProblem:t,placement:g}),f=o.find(E=\u003eE.includes(c.chipId)),I=f??[c.chipId];if(p\u0026\u0026_){if(f)continue;LN({chipIds:[c.chipId],dx:-ile,dy:0,chipPlacements:n,inputProblem:t});continue}const C=r===Ive\u0026\u0026_\u0026\u0026(c.isCapacitor||c.isResistor),y=c.pins.find(E=\u003eE!==A.pinId),x=y\u0026\u0026r1o(t,y);m\u0026\u0026(C||x)\u0026\u0026LN({chipIds:I,dx:0,dy:-ile,chipPlacements:n,inputProblem:t})}},A1o=({groundedLoadPairs:t,inputProblem:e,chipPlacements:n})=\u003e{for(const o of t){if(!o.mainPinId||!o.upperChip.isResistor)continue;const i=e.chipPinMap[o.upperInnerPinId],r=e.chipPinMap[o.lowerInnerPinId],s=n[o.upperChip.chipId],a=n[o.lowerChip.chipId];if(!i||!r||!s||!a)continue;const A=OH(i,s),c=OH(r,a);Math.abs(A.x-c.x)\u003eaj||LN({chipIds:[o.upperChip.chipId],dx:-ile,dy:0,chipPlacements:n,inputProblem:e})}},c1o=({railLoadPairs:t,inputProblem:e,chipPlacements:n})=\u003e{for(const o of t){const i=e.chipPinMap[o.mainPinId],r=e.chipPinMap[o.resistorMainPinId],s=n[o.mainChipId],a=n[o.resistor.chipId];if(!i||!r||!s||!a)continue;const A=OH(i,s),c=OH(r,a);Math.abs(A.y-c.y)\u003eaj||LN({chipIds:[o.railComponent.chipId,o.resistor.chipId],dx:0,dy:ile,chipPlacements:n,inputProblem:e})}},pSt=.1,Cve=class extends Zf{partitionInputProblem;layout=null;pinIdToStronglyConnectedPins;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(!this.activeSubSolver){const t=o1o({inputProblem:this.partitionInputProblem,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}).pinToNetworkMap,e=this.createPackInput(t);this.activeSubSolver=new rj(e),this.activeSubSolver.MAX_ITERATIONS=this.MAX_ITERATIONS}if(this.activeSubSolver.step(),this.activeSubSolver.failed){this.failed=!0,this.error=`PackSolver2 failed: ${this.activeSubSolver.error}`;return}this.activeSubSolver.solved\u0026\u0026(this.layout=this.createLayoutFromPackingResult(this.activeSubSolver.packedComponents),this.solved=!0,this.activeSubSolver=null)}createPackInput(t){const e=Object.entries(this.partitionInputProblem.chipMap).map(([o,i])=\u003e{const r=[];for(const c of i.pins){const l=this.partitionInputProblem.chipPinMap[c];if(!l)continue;const u=t.get(c)||`${c}_isolated`;r.push({padId:c,networkId:u,type:\"rect\",offset:{x:l.offset.x,y:l.offset.y},size:{x:pSt,y:pSt}})}const s=i1o(r),a={x:s.maxX-s.minX,y:s.maxY-s.minY};r.push({padId:`${o}_body`,networkId:`${o}_body_disconnected`,type:\"rect\",offset:{x:0,y:0},size:{x:Math.max(a.x,i.size.x),y:Math.max(a.y,i.size.y)}});const A=i.availableRotations?.[0]??0;return{componentId:o,pads:r,availableRotationDegrees:i.availableRotations??[0,90,180,270],...i.fixedPosition\u0026\u0026{isStatic:!0,center:i.fixedPosition,ccwRotationOffset:A}}});let n=this.partitionInputProblem.chipGap;return this.partitionInputProblem.partitionType===\"decoupling_caps\"\u0026\u0026(n=this.partitionInputProblem.decouplingCapsGap??n),{components:e,minGap:n,packOrderStrategy:\"largest_to_smallest\",packPlacementStrategy:\"minimum_closest_sum_squared_distance\"}}createLayoutFromPackingResult(t){const e={};for(const n of t){const o=n.componentId;e[o]={x:n.center.x,y:n.center.y,ccwRotationDegrees:n.ccwRotationDegrees??n.ccwRotationOffset??0}}return hSt({inputProblem:this.partitionInputProblem,connectedPinsByPinId:this.pinIdToStronglyConnectedPins,chipPlacements:e}),{chipPlacements:e,groupPlacements:{}}}visualize(){if(this.activeSubSolver\u0026\u0026!this.solved)return this.activeSubSolver.visualize();if(!this.layout){const t=pb(this.partitionInputProblem);return Vh(this.partitionInputProblem,t)}return Vh(this.partitionInputProblem,this.layout)}getConstructorParams(){return[this.partitionInputProblem]}},l1o=2,u1o=4,g1o=3,mSt=2,d1o=t=\u003e{const e={};for(const[n,o]of Object.entries(t.chipMap))for(const i of o.pins)e[i]=n;return e},h1o=t=\u003e{const e=[],n=new Set;for(const[o,i]of Object.entries(t.pinStrongConnMap)){if(!i)continue;const[r,s]=o.split(\"-\");let a=`${r}|${s}`;s\u003cr\u0026\u0026(a=`${s}|${r}`),!n.has(a)\u0026\u0026(n.add(a),e.push([r,s]))}return e},_St=(t,e)=\u003e{for(const[n,o]of Object.entries(t.netConnMap))if(o\u0026\u0026n.startsWith(`${e}-`))return n.slice(e.length+1);return null},fSt=(t,e)=\u003e{const n=ta(t,e);return Math.abs(n.x)\u003e=Math.abs(n.y)?n.x\u003e=0?\"x+\":\"x-\":n.y\u003e=0?\"y+\":\"y-\"},p1o=(t,e)=\u003ee===\"x-\"||e===\"x+\"?t.y:t.x,ISt=t=\u003e{const e=d1o(t),n=h1o(t),o=new Set(n.flat()),i=new Map;for(const[l,u]of n){const g=e[l],h=e[u];!g||!h||g===h||(i.has(g)||i.set(g,[]),i.has(h)||i.set(h,[]),i.get(g).push({selfPin:l,otherPin:u,otherChip:h}),i.get(h).push({selfPin:u,otherPin:l,otherChip:g}))}const r=[];for(const l of i.values()){const u=new Map;for(const g of l){const h=u.get(g.selfPin)??[];h.push(g),u.set(g.selfPin,h)}for(const[g,h]of u){if(h.length\u003cmSt)continue;const d=[g,...h.map(m=\u003em.otherPin)],p=new Map;for(const m of d){const _=e[m],f=t.chipMap[_];if(!_||f?.fixedPosition||f?.pins.length!==2)continue;const I=f.pins.find(y=\u003ey!==m);if(!I||o.has(I))continue;const C=_St(t,I);C\u0026\u0026p.set(C,[...p.get(C)??[],_])}for(const m of p.values()){if(m.length\u003cmSt)continue;const _=d.filter(x=\u003e!m.includes(e[x]));if(_.length!==1)continue;const f=_[0],I=e[f];if(!I)continue;const C=t.chipMap[I],y=t.chipPinMap[f];!C||!y||r.push({mainChipId:I,side:fSt(y.offset,C.availableRotations?.[0]??0),passiveChipIds:m,mainChipPinIds:m.map(()=\u003ef)})}}}const s=new Set(r.flatMap(l=\u003el.passiveChipIds)),a=[];for(const[l,u]of Object.entries(t.chipMap)){if(s.has(l)||u.pins.length!==l1o)continue;const g=i.get(l)??[];if(g.length!==1)continue;const{selfPin:h,otherPin:d,otherChip:p}=g[0],m=t.chipMap[p];if(!m||m.pins.length\u003cu1o)continue;const _=u.pins.find(x=\u003ex!==h);if(!_)continue;const f=_St(t,_);if(!f)continue;const I=m.availableRotations?.[0]??0,C=ta(t.chipPinMap[d].offset,I),y=fSt(t.chipPinMap[d].offset,I);a.push({passiveChipId:l,mainChipId:p,mainChipPinId:d,side:y,sharedNetId:f,edgeCoord:p1o(C,y)})}const A=new Map;for(const l of a){const u=`${l.mainChipId}|${l.side}|${l.sharedNetId}`,g=A.get(u)??[];g.push(l),A.set(u,g)}const c=[...r];for(const l of A.values())l.length\u003cg1o||(l.sort((u,g)=\u003eu.edgeCoord-g.edgeCoord),c.push({mainChipId:l[0].mainChipId,side:l[0].side,passiveChipIds:l.map(u=\u003eu.passiveChipId),mainChipPinIds:l.map(u=\u003eu.mainChipPinId)}));return c},GH=1e-6,m1o=16,_1o={\"x-\":{x:-1,y:0},\"x+\":{x:1,y:0},\"y-\":{x:0,y:-1},\"y+\":{x:0,y:1}},CSt=(t,e,n)=\u003en===\"x\"?Math.max(0,t.minX-e.maxX,e.minX-t.maxX):Math.max(0,t.minY-e.maxY,e.minY-t.maxY),f1o=class extends Zf{partitionInputProblem;layout=null;pinIdToStronglyConnectedPins;packingSolver=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(this.packingSolver||(this.packingSolver=new Cve({partitionInputProblem:this.partitionInputProblem,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}),this.activeSubSolver=this.packingSolver),this.packingSolver.step(),this.packingSolver.failed){this.failed=!0,this.error=this.packingSolver.error;return}this.packingSolver.solved\u0026\u0026this.packingSolver.layout\u0026\u0026(this.layout=this.alignPassiveGroups(this.packingSolver.layout),this.activeSubSolver=null,this.solved=!0)}alignPassiveGroups(t){const e={};for(const[o,i]of Object.entries(t.chipPlacements))e[o]={...i};const n=ISt(this.partitionInputProblem);for(const o of n)this.reflowPassiveGroup(e,o);return hSt({inputProblem:this.partitionInputProblem,connectedPinsByPinId:this.pinIdToStronglyConnectedPins,chipPlacements:e,rigidChipGroups:n.map(o=\u003eo.passiveChipIds)}),{chipPlacements:e,groupPlacements:t.groupPlacements}}reflowPassiveGroup(t,e){const n=this.partitionInputProblem,o=n.chipGap,i=t[e.mainChipId];if(!i)return;const r=_1o[e.side],s=r.x!==0,a=this.boxFor(e.mainChipId,i),A=oD(a),c=e.mainChipPinIds.map(I=\u003e{const C=ta(n.chipPinMap[I].offset,i.ccwRotationDegrees);return{x:i.x+C.x,y:i.y+C.y}});let l=A;if(c.length\u003e0){const I=c.reduce((y,x)=\u003ey+x.x,0),C=c.reduce((y,x)=\u003ey+x.y,0);l={x:I/c.length,y:C/c.length}}const u=e.passiveChipIds.map(I=\u003edd(n.chipMap[I].size,t[I].ccwRotationDegrees)),g=[];let h=0;for(let I=0;I\u003cu.length;I++)g[I]=h+u[I].x/2,h+=u[I].x+o;const d=Math.max(0,h-o);for(let I=0;I\u003cg.length;I++)g[I]-=d/2;const p=Math.max(...u.map(I=\u003eI.y)),m=new Set(e.passiveChipIds),_=[];if(s){const I=(a.maxX-a.minX)/2+o+d/2,C=A.x+r.x*I;let y=l.y;c.length\u003e0\u0026\u0026(y=Math.min(...c.map(x=\u003ex.y))),_.push({x:C,y:y-p/2}),_.push({x:C,y:l.y})}else{const I=(a.maxY-a.minY)/2+o+p/2;_.push({x:l.x,y:A.y+r.y*I})}const f=a.maxX-a.minX+d;for(const I of _){let C=0;for(let y=0;y\u003cm1o;y++){const x={};for(let S=0;S\u003ce.passiveChipIds.length;S++){const Q=e.passiveChipIds[S];x[Q]={x:I.x+C+g[S],y:I.y,ccwRotationDegrees:t[Q].ccwRotationDegrees}}const E=this.clearanceAdjustment(x,t,m,o);if(E===0){for(const S of e.passiveChipIds)t[S]=x[S];return}if(E===null)break;const B=C+E;if(Math.abs(B)\u003ef)break;C=B}}}clearanceAdjustment(t,e,n,o){let i=0,r=0;for(const[s,a]of Object.entries(t)){const A=this.boxFor(s,a);for(const[c,l]of Object.entries(e)){if(n.has(c))continue;const u=this.boxFor(c,l);if(EV(A,u)\u003e=o-GH)continue;const g=CSt(A,u,\"y\"),h=CSt(A,u,\"x\"),p=Math.sqrt(Math.max(0,o*o-g*g))-h;p\u003c=GH||(oD(A).x\u003e=oD(u).x?i=Math.max(i,p):r=Math.max(r,p))}}return i\u003eGH\u0026\u0026r\u003eGH?null:i\u003eGH?i:r\u003eGH?-r:0}boxFor(t,e){const n=this.partitionInputProblem.chipMap[t],o=dd(n.size,e.ccwRotationDegrees),i=[{x:e.x-o.x/2,y:e.y-o.y/2},{x:e.x+o.x/2,y:e.y+o.y/2}];for(const r of n.pins){const s=this.partitionInputProblem.chipPinMap[r];if(!s)continue;const a=ta(s.offset,e.ccwRotationDegrees);i.push({x:e.x+a.x,y:e.y+a.y})}return Oh(i)}visualize(){if(this.activeSubSolver\u0026\u0026!this.solved)return this.activeSubSolver.visualize();if(!this.layout){const t=pb(this.partitionInputProblem);return Vh(this.partitionInputProblem,t)}return Vh(this.partitionInputProblem,this.layout)}getConstructorParams(){return[this.partitionInputProblem]}},ySt=(t,e)=\u003e{if(t.pins.length!==2)return null;const[n,o]=t.pins.map(a=\u003ee.chipPinMap[a]);if(!n||!o)return null;const i=t.availableRotations?.[0]??0,r=ta(n.offset,i),s=ta(o.offset,i);return Math.abs(r.y-s.y)\u003e=Math.abs(r.x-s.x)?\"y\":\"x\"},I1o=t=\u003e{if(t.partitionType!==\"decoupling_caps\")return!1;const e=Object.values(t.chipMap);if(e.length\u003c2)return!1;let n=null;for(const o of e){if(o.fixedPosition)return!1;const i=ySt(o,t);if(!i||n\u0026\u0026n!==i)return!1;n=i}return n!==null},C1o=class extends Zf{partitionInputProblem;layout=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem}getRotation(t){return t.availableRotations?.[0]??0}isOnRailNet(t){const e=this.partitionInputProblem,n=aSt({inputProblem:e,netIds:Object.keys(e.netMap)});return n?e.netConnMap[`${t}-${n}`]===!0:!1}getRailOffset(t,e){const n=t.pins.find(i=\u003ethis.isOnRailNet(i));if(!n)return 0;const o=this.partitionInputProblem.chipPinMap[n];return o?-ta(o.offset,this.getRotation(t))[e]:0}_step(){const t=this.partitionInputProblem,e=Object.values(t.chipMap),n=ySt(e[0],t);let o=\"y\";n===\"y\"\u0026\u0026(o=\"x\");const i=t.decouplingCapsGap??t.chipGap,r=e.map(g=\u003edd(g.size,this.getRotation(g))[o]),s=r.reduce((g,h)=\u003eg+h,0)+i*(e.length-1),a={};let A=-s/2,c=1;const l=t.decouplingMainChipSide;(o===\"x\"\u0026\u0026l===\"x-\"||o===\"y\"\u0026\u0026l===\"y-\")\u0026\u0026(A=s/2,c=-1),e.forEach((g,h)=\u003e{const d=r[h],p={x:0,y:0,ccwRotationDegrees:this.getRotation(g)};p[o]=A+c*d/2,p[n]=this.getRailOffset(g,n),a[g.chipId]=p,A+=c*(d+i)}),this.layout={chipPlacements:a,groupPlacements:{}},this.solved=!0}visualize(){return Vh(this.partitionInputProblem,this.layout??{chipPlacements:{}})}getConstructorParams(){return[{partitionInputProblem:this.partitionInputProblem}]}},YH=t=\u003et.availableRotations?.length?t.availableRotations:[0],y1o=(t,e,n)=\u003e{let o=YH(t)[0],i=-1/0;for(const r of YH(t)){const s=n.chipPinMap[e[0]],a=n.chipPinMap[e[1]];if(!s||!a)continue;const A=ta(s.offset,r),c=ta(a.offset,r),l=Math.abs(A.x-c.x)-Math.abs(A.y-c.y);l\u003ei\u0026\u0026(i=l,o=r)}return o},x1o=(t,e,n,o)=\u003e{let i=YH(t)[0],r=-1/0;for(const s of YH(t)){const a=o.chipPinMap[e],A=o.chipPinMap[n];if(!a||!A)continue;const c=ta(a.offset,s),l=ta(A.offset,s),u=c.y-l.y-Math.abs(c.x-l.x);u\u003er\u0026\u0026(r=u,i=s)}return i},E1o=(t,e,n)=\u003e{const o=t.pins.find(s=\u003es!==e);let i=YH(t)[0],r=-1/0;for(const s of YH(t)){const a=n.chipPinMap[e],A=o\u0026\u0026n.chipPinMap[o];if(!a||!A)continue;const c=ta(a.offset,s),l=ta(A.offset,s),u=l.y-c.y-Math.abs(l.x-c.x);u\u003er\u0026\u0026(r=u,i=s)}return i},B1o=t=\u003et.partitionType!==\"crystal_circuit\"||!t.crystalCircuitGroup?!1:Object.values(t.chipMap).every(e=\u003ee.fixedPosition===void 0),b1o=class extends Zf{partitionInputProblem;layout=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem}_step(){const t=this.partitionInputProblem,e=t.crystalCircuitGroup,n=t.chipMap[e.crystalChipId],o=y1o(n,e.activeCrystalPinIds,t),i=dd(n.size,o),r=t.chipGap,s={[n.chipId]:{x:0,y:0,ccwRotationDegrees:o}},a=new Map;for(const g of e.activeCrystalPinIds){const h=t.chipPinMap[g];a.set(g,ta(h.offset,o))}const A=a.get(e.activeCrystalPinIds[0]),c=a.get(e.activeCrystalPinIds[1]);let l;Math.abs(A.x-c.x)\u003e=Math.abs(A.y-c.y)?l=\"x\":l=\"y\";const u=e.loadCaps.map((g,h)=\u003e{const d=t.chipMap[g.chipId],p=x1o(d,g.signalPinId,g.groundPinId,t),m=dd(d.size,p),_=ta(t.chipPinMap[g.signalPinId].offset,p),f=ta(t.chipPinMap[g.groundPinId].offset,p),I=e.activeCrystalPinIds[h],C=a.get(I),y=-i.y/2-r-m.y/2;return{chip:d,rotation:p,size:m,signalOffset:_,groundOffset:f,crystalPinOffset:C,highestGroundY:y+f.y}});if(l===\"x\"){const g=Math.min(...u.map(I=\u003eI.highestGroundY));for(const I of u)s[I.chip.chipId]={x:I.crystalPinOffset.x-I.signalOffset.x,y:g-I.groundOffset.y,ccwRotationDegrees:I.rotation};const[h,d]=[...u].sort((I,C)=\u003es[I.chip.chipId].x-s[C.chip.chipId].x),p=s[h.chip.chipId],m=s[d.chip.chipId],_=m.x-d.size.x/2-(p.x+h.size.x/2),f=Math.max(0,(r*2-_)/2);p.x-=f,m.x+=f}else u.forEach((g,h)=\u003e{let d;h===0?d=-1:d=1,s[g.chip.chipId]={x:d*(i.x/2+r+g.size.x/2),y:g.crystalPinOffset.y-g.signalOffset.y,ccwRotationDegrees:g.rotation}});for(const g of e.seriesResistors){const h=t.chipMap[g.chipId],d=E1o(h,g.connectedPinId,t),p=dd(h.size,d),m=ta(t.chipPinMap[g.connectedPinId].offset,d),_=a.get(g.crystalPinId);s[h.chipId]={x:_.x-m.x,y:i.y/2+r+p.y/2,ccwRotationDegrees:d}}this.layout={chipPlacements:s,groupPlacements:{}},this.solved=!0}visualize(){return Vh(this.partitionInputProblem,this.layout??{chipPlacements:{}})}getConstructorParams(){return[{partitionInputProblem:this.partitionInputProblem}]}},Aj=2,S1o=t=\u003e{const e=new Map;for(const i of Object.values(t.chipMap))for(const r of i.pins)e.set(r,i.chipId);const n=sj(t),o=new Map;for(const[i,r]of Object.entries(n)){const s=e.get(i);if(s)for(const a of r){const A=e.get(a.pinId);if(!A||A===s)continue;const c=o.get(s)??[];c.push({selfPinId:i,otherPinId:a.pinId,otherChipId:A}),o.set(s,c)}}return o},Q1o=({inputProblem:t,connectionsByChip:e,mainChipId:n,startChipId:o,endChipId:i})=\u003e{if(o===i)return null;const r=A=\u003e{const c=t.chipMap[A];return A!==n\u0026\u0026c?.pins.length===Aj\u0026\u0026!c.fixedPosition};if(!r(o)||!r(i))return null;const s=[[o]],a=new Set([o]);for(;s.length\u003e0;){const A=s.shift(),c=A[A.length-1];if(c===i)return A;for(const l of e.get(c)??[]){const u=l.otherChipId;!r(u)||a.has(u)||(a.add(u),s.push([...A,u]))}}return null},v1o=({inputProblem:t,connectionsByChip:e,mainChipId:n,mainPinIds:o,pathChipIds:i})=\u003e{const r=[];for(let s=0;s\u003ci.length;s++){const a=i[s],A=t.chipMap[a],c=e.get(a)??[];if(!A||c.length!==Aj||new Set(c.map(d=\u003ed.selfPinId)).size!==Aj)return null;const l=s===0?n:i[s-1],u=s===i.length-1?n:i[s+1],g=c.find(d=\u003ed.otherChipId===l),h=c.find(d=\u003ed.otherChipId===u);if(!g||!h||g.selfPinId===h.selfPinId||s===0\u0026\u0026g.otherPinId!==o[0]||s===i.length-1\u0026\u0026h.otherPinId!==o[1])return null;r.push({chipId:a,nearPinId:g.selfPinId,farPinId:h.selfPinId})}return r},xSt=t=\u003e{const e=S1o(t),n=[],o=new Set;for(const i of Object.values(t.chipMap)){if(i.pins.length\u003c=Aj)continue;const r=e.get(i.chipId)??[];for(let s=0;s\u003cr.length;s++){const a=r[s],A=t.chipPinMap[a.selfPinId];if(A)for(let c=s+1;c\u003cr.length;c++){const l=r[c],u=t.chipPinMap[l.selfPinId];if(!u||A.side!==u.side||a.selfPinId===l.selfPinId)continue;const g=Q1o({inputProblem:t,connectionsByChip:e,mainChipId:i.chipId,startChipId:a.otherChipId,endChipId:l.otherChipId});if(!g||g.length\u003cAj||g.length%2!==0||g.some(f=\u003eo.has(f)))continue;const h=[a.selfPinId,l.selfPinId],d=v1o({inputProblem:t,connectionsByChip:e,mainChipId:i.chipId,mainPinIds:h,pathChipIds:g});if(!d)continue;const p=d.length/2,m=d.slice(0,p),_=d.slice(p).reverse().map(f=\u003e({chipId:f.chipId,nearPinId:f.farPinId,farPinId:f.nearPinId}));n.push({mainChipId:i.chipId,mainPinIds:h,branches:[m,_]});for(const f of g)o.add(f)}}}return n},w1o=[0,90,180,270],ESt=1e-6,$v=(t,e)=\u003et.x*e.x+t.y*e.y,P1o=({outwardCoordinate:t,tangentCoordinate:e,axes:n})=\u003e({x:n.outward.x*t+n.tangent.x*e,y:n.outward.y*t+n.tangent.y*e}),M1o=({pinOffset:t})=\u003eMath.abs(t.x)\u003e=Math.abs(t.y)?{outward:Jk(t.x\u003e=0?\"right\":\"left\"),tangent:Jk(\"up\")}:{outward:Jk(t.y\u003e=0?\"up\":\"down\"),tangent:Jk(\"right\")},BSt=({size:t,axis:e})=\u003e(Math.abs(e.x)*t.x+Math.abs(e.y)*t.y)/2,D1o=({chip:t,nearPinId:e,farPinId:n,inputProblem:o,outward:i,originalRotation:r})=\u003e{const s=o.chipPinMap[e],a=o.chipPinMap[n];if(!s||!a)return r;const A=t.availableRotations??w1o;let c=A[0]??0,l=Number.NEGATIVE_INFINITY;for(const u of A){const g=ta(s.offset,u),h=ta(a.offset,u),d=$v({x:h.x-g.x,y:h.y-g.y},i);(d\u003el||d===l\u0026\u0026u===r)\u0026\u0026(l=d,c=u)}return c},rle=({chip:t,placement:e})=\u003e{const n=dd(t.size,e.ccwRotationDegrees);return Ey({center:e,width:n.x,height:n.y})},bSt=({branch:t,mainPinId:e,mainChip:n,mainPlacement:o,inputProblem:i,axes:r,originalPlacements:s,extraGap:a})=\u003e{const A=i.chipPinMap[e];if(!A)return null;const c=dd(n.size,o.ccwRotationDegrees),l=ta(A.offset,o.ccwRotationDegrees),u={x:o.x+l.x,y:o.y+l.y};let g=$v(o,r.outward)+BSt({size:c,axis:r.outward});g=Math.max(g,$v(u,r.outward));let h=$v(u,r.tangent);const d={};let p=g;for(const m of t){const _=i.chipMap[m.chipId],f=s[m.chipId],I=i.chipPinMap[m.nearPinId],C=i.chipPinMap[m.farPinId];if(!_||!f||!I||!C)return null;const y=D1o({chip:_,nearPinId:m.nearPinId,farPinId:m.farPinId,inputProblem:i,outward:r.outward,originalRotation:f.ccwRotationDegrees}),x=dd(_.size,y),E=BSt({size:x,axis:r.outward}),B=ta(I.offset,y),S=ta(C.offset,y),Q=g+i.chipGap+a+E,w=h-$v(B,r.tangent),M=P1o({outwardCoordinate:Q,tangentCoordinate:w,axes:r});d[_.chipId]={...M,ccwRotationDegrees:y},g=Q+E,h=w+$v(S,r.tangent),p=Q+$v(S,r.outward)}return{placements:d,terminalOutwardCoordinate:p}},SSt=({branchLayout:t,shift:e,tangent:n})=\u003e{for(const o of Object.values(t.placements))o.x+=n.x*e,o.y+=n.y*e},QSt=({branchLayout:t,inputProblem:e,tangent:n})=\u003e{const o=Oh(Object.entries(t.placements).flatMap(([i,r])=\u003e{const s=rle({chip:e.chipMap[i],placement:r});return[{x:s.minX,y:s.minY},{x:s.maxX,y:s.maxY}]}));return o?Math.abs(n.x)\u003e=Math.abs(n.y)?{min:o.minX,max:o.maxX}:{min:o.minY,max:o.maxY}:{min:0,max:0}},N1o=({candidatePlacements:t,originalPlacements:e,inputProblem:n})=\u003e{const o=new Set(Object.keys(t)),i=Object.entries(t);for(let r=0;r\u003ci.length;r++){const[s,a]=i[r],A=n.chipMap[s];if(!A)return!1;const c=rle({chip:A,placement:a});for(let l=r+1;l\u003ci.length;l++){const[u,g]=i[l],h=n.chipMap[u];if(!h||EV(c,rle({chip:h,placement:g}))\u003cn.chipGap-ESt)return!1}for(const[l,u]of Object.entries(e)){if(o.has(l))continue;const g=n.chipMap[l];if(!g||EV(c,rle({chip:g,placement:u}))\u003cn.chipGap-ESt)return!1}}return!0},R1o=({group:t,chipPlacements:e,inputProblem:n})=\u003e{const o=n.chipMap[t.mainChipId],i=e[t.mainChipId],r=n.chipPinMap[t.mainPinIds[0]];if(!o||!i||!r)return null;const s=ta(r.offset,i.ccwRotationDegrees),a=M1o({pinOffset:s}),A=t.branches.map((p,m)=\u003e({branch:p,mainPinId:t.mainPinIds[m]})).sort((p,m)=\u003e{const _=f=\u003e{const I=n.chipPinMap[f],C=ta(I.offset,i.ccwRotationDegrees);return $v({x:i.x+C.x,y:i.y+C.y},a.tangent)};return _(p.mainPinId)-_(m.mainPinId)});let c=A.map(({branch:p,mainPinId:m})=\u003ebSt({branch:p,mainPinId:m,mainChip:o,mainPlacement:i,inputProblem:n,axes:a,originalPlacements:e,extraGap:0}));if(c.some(p=\u003e!p))return null;const l=Math.max(...c.map(p=\u003ep.terminalOutwardCoordinate));if(c=A.map(({branch:p,mainPinId:m},_)=\u003e{const f=c[_],I=(l-f.terminalOutwardCoordinate)/p.length;return bSt({branch:p,mainPinId:m,mainChip:o,mainPlacement:i,inputProblem:n,axes:a,originalPlacements:e,extraGap:I})}),c.some(p=\u003e!p))return null;const u=QSt({branchLayout:c[0],inputProblem:n,tangent:a.tangent}),g=QSt({branchLayout:c[1],inputProblem:n,tangent:a.tangent}),h=Math.max(0,u.max+n.chipGap-g.min);SSt({branchLayout:c[0],shift:-h/2,tangent:a.tangent}),SSt({branchLayout:c[1],shift:h/2,tangent:a.tangent});const d=Object.assign({},c[0].placements,c[1].placements);return N1o({candidatePlacements:d,originalPlacements:e,inputProblem:n})?d:null},T1o=t=\u003exSt(t).length\u003e0,k1o=class extends Zf{partitionInputProblem;layout=null;pinIdToStronglyConnectedPins;packingSolver=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(this.packingSolver||(this.packingSolver=new Cve({partitionInputProblem:this.partitionInputProblem,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}),this.activeSubSolver=this.packingSolver),this.packingSolver.step(),this.packingSolver.failed){this.failed=!0,this.error=this.packingSolver.error;return}this.packingSolver.solved\u0026\u0026this.packingSolver.layout\u0026\u0026(this.layout=this.refinePackedLayout(this.packingSolver.layout),this.activeSubSolver=null,this.solved=!0)}refinePackedLayout(t){const e={};for(const[n,o]of Object.entries(t.chipPlacements))e[n]={...o};for(const n of xSt(this.partitionInputProblem)){const o=R1o({group:n,chipPlacements:e,inputProblem:this.partitionInputProblem});o\u0026\u0026Object.assign(e,o)}return{chipPlacements:e,groupPlacements:t.groupPlacements}}visualize(){if(this.activeSubSolver\u0026\u0026!this.solved)return this.activeSubSolver.visualize();if(!this.layout){const t=pb(this.partitionInputProblem);return Vh(this.partitionInputProblem,t)}return Vh(this.partitionInputProblem,this.layout)}getConstructorParams(){return[this.partitionInputProblem]}};function cj(t,e,n,o){return{solverName:t,solverClass:e,appliesTo:n,getConstructorParams:o}}var F1o=[cj(\"crystalCircuitLayoutSolver\",b1o,B1o,t=\u003e[{partitionInputProblem:t.partitions[t.currentPartitionIndex]}]),cj(\"decouplingCapRowSolver\",C1o,I1o,t=\u003e[{partitionInputProblem:t.partitions[t.currentPartitionIndex]}]),cj(\"parallelAlignedPassiveSolver\",f1o,t=\u003eISt(t).length\u003e0,t=\u003e[{partitionInputProblem:t.partitions[t.currentPartitionIndex],pinIdToStronglyConnectedPins:t.pinIdToStronglyConnectedPins}]),cj(\"parallelSeriesBranchSolver\",k1o,T1o,t=\u003e[{partitionInputProblem:t.partitions[t.currentPartitionIndex],pinIdToStronglyConnectedPins:t.pinIdToStronglyConnectedPins}]),cj(\"singleInnerPartitionPackingSolver\",Cve,()=\u003e!0,t=\u003e[{partitionInputProblem:t.partitions[t.currentPartitionIndex],pinIdToStronglyConnectedPins:t.pinIdToStronglyConnectedPins}])],L1o=class extends Zf{partitions;packedPartitions=[];completedSolvers=[];activeSolver=null;currentPartitionIndex=0;pinIdToStronglyConnectedPins;constructor(t){super(),this.partitions=t.partitions,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(this.currentPartitionIndex\u003e=this.partitions.length){this.solved=!0;return}if(!this.activeSolver){const t=this.partitions[this.currentPartitionIndex],e=F1o.find(o=\u003eo.appliesTo(t)),n=e.getConstructorParams(this);this.activeSolver=new e.solverClass(...n),this.activeSubSolver=this.activeSolver}if(this.activeSolver.step(),this.activeSolver.failed){this.failed=!0,this.error=`Partition ${this.currentPartitionIndex} failed: ${this.activeSolver.error}`;return}if(this.activeSolver.solved){if(this.completedSolvers.push(this.activeSolver),this.activeSolver.layout)this.packedPartitions.push({inputProblem:this.partitions[this.currentPartitionIndex],layout:this.activeSolver.layout});else{this.failed=!0,this.error=`Partition ${this.currentPartitionIndex} completed but has no layout`;return}this.activeSolver=null,this.activeSubSolver=null,this.currentPartitionIndex++}}visualize(){if(this.activeSolver)return this.activeSolver.visualize();if(this.completedSolvers.length===0){const n=this.partitions.map(i=\u003e{const r=pb(i);return Vh(i,r)}),o=this.partitions.map((i,r)=\u003e`partition${r}`);return zce(n,{titles:o})}const t=this.completedSolvers.map(n=\u003en.visualize()),e=this.completedSolvers.map((n,o)=\u003e`packed_partition_${o}`);return zce(t,{titles:e})}getConstructorParams(){return[this.partitions]}},yve=1e-6,vSt=2,wSt=[\"x+\",\"y+\",\"x-\",\"y-\"],sle=(t,e)=\u003et===e?0:t\u003ce?-1:1,PSt=(t,e)=\u003e{const n=(Math.round(e/90)%4+4)%4,o=wSt.indexOf(t);return wSt[(o+n)%4]},ale=(t,e,n)=\u003e{const o=t.chipPinMap[e],i=ta(o.offset,n.ccwRotationDegrees);return{x:n.x+i.x,y:n.y+i.y}},H1o=(t,e)=\u003et.distanceSquared-e.distanceSquared||Math.abs(t.yDelta)-Math.abs(e.yDelta)||sle(t.anchorChipId,e.anchorChipId)||sle(t.anchorPinId,e.anchorPinId)||sle(t.resistorPinId,e.resistorPinId),O1o=(t,e,n,o)=\u003e{const i=o[e],r=o[t.anchorChipId];if(!i||!r)return!0;const s=ale(n,t.resistorPinId,i),a=ale(n,t.anchorPinId,r);return Object.entries(o).some(([A,c])=\u003e{if(A===e||A===t.anchorChipId)return!1;const l=n.chipMap[A];if(!l)return!1;const u=dd(l.size,c.ccwRotationDegrees);return Exe(s,a,Ey({center:c,width:u.x,height:u.y}))})},G1o=({inputProblem:t,chipPlacements:e,pinToNetworkMap:n})=\u003e{const o=FN(t),i=new Map;for(const[s,a]of n){const A=i.get(a)??[];A.push(s),i.set(a,A)}const r=Object.values(t.chipMap).filter(s=\u003es.isResistor\u0026\u0026!s.fixedPosition\u0026\u0026s.pins.length===vSt).sort((s,a)=\u003esle(s.chipId,a.chipId));for(const s of r){const a=e[s.chipId];if(!a)continue;const A=[];for(const u of s.pins){const g=t.chipPinMap[u],h=n.get(u);if(!g||!h)continue;const d=PSt(g.side,a.ccwRotationDegrees);if(d!==\"x-\"\u0026\u0026d!==\"x+\")continue;const p=d===\"x+\"?1:-1,m=ale(t,u,a);for(const _ of i.get(h)??[]){const f=o.get(_);if(!f||f.chipId===s.chipId||f.pins.length!==vSt)continue;const I=t.chipPinMap[_],C=e[f.chipId];if(!I||!C)continue;const y=PSt(I.side,C.ccwRotationDegrees);if(d===\"x-\"\u0026\u0026y!==\"x+\"||d===\"x+\"\u0026\u0026y!==\"x-\")continue;const x=ale(t,_,C),E=x.x-m.x,B=x.y-m.y,S=E*p;S\u003c=yve||Math.abs(B)\u003c=yve||Math.abs(B)\u003eS+yve||A.push({anchorChipId:f.chipId,anchorPinId:_,resistorPinId:u,yDelta:B,distanceSquared:E*E+B*B})}}A.sort(H1o);const c=A[0];if(!c)continue;const l=a.y;LN({chipIds:[s.chipId],dx:0,dy:c.yDelta,chipPlacements:e,inputProblem:t})\u0026\u0026O1o(c,s.chipId,t,e)\u0026\u0026(a.y=l)}},Y1o=class extends Zf{packedPartitions;inputProblem;finalLayout=null;packSolver2=null;pinToNetworkMap=null;constructor(t){super(),this.packedPartitions=t.packedPartitions,this.inputProblem=t.inputProblem}partitionHasFixedChip(t){const e=this.packedPartitions[t];return e?Object.values(e.inputProblem.chipMap).some(n=\u003en.fixedPosition!==void 0):!1}_step(){try{if(this.packedPartitions.length===0){this.finalLayout={chipPlacements:{},groupPlacements:{}},this.solved=!0;return}if(this.packedPartitions.length===1){this.finalLayout=this.packedPartitions[0].layout,this.solved=!0;return}const t=this.organizePackedPartitions();if(!this.packSolver2){const e=this.createPackInput(t);this.packSolver2=new rj(e),this.activeSubSolver=this.packSolver2}if(this.packSolver2.step(),this.packSolver2.failed){this.failed=!0,this.error=`PackSolver2 failed: ${this.packSolver2.error}`;return}if(this.packSolver2.solved){const e=this.applyPackingResult(this.packSolver2.packedComponents,t);this.finalLayout=e,this.solved=!0,this.activeSubSolver=null}}catch(t){this.failed=!0,this.error=`Failed to pack partitions: ${t}`}}buildConnectivityMap(){const t=new Map;for(const e of this.packedPartitions){for(const[n,o]of Object.entries(e.inputProblem.netConnMap)){if(!o)continue;const[i,r]=n.split(\"-\");i\u0026\u0026r\u0026\u0026t.set(i,r)}for(const[n,o]of Object.entries(e.inputProblem.pinStrongConnMap)){if(!o)continue;const i=n.split(\"-\");if(i.length===2\u0026\u0026i[0]\u0026\u0026i[1]){const r=t.get(i[0])||t.get(i[1]);r?(t.set(i[0],r),t.set(i[1],r)):(t.set(i[0],n),t.set(i[1],n))}}}return t}getConnectivityMap(){return this.pinToNetworkMap??=this.buildConnectivityMap(),this.pinToNetworkMap}organizePackedPartitions(){const t=[];for(let e=0;e\u003cthis.packedPartitions.length;e++){const n=this.packedPartitions[e],o=Object.keys(n.layout.chipPlacements);if(o.length\u003e0){let i=1/0,r=-1/0,s=1/0,a=-1/0;for(const A of o){const c=n.layout.chipPlacements[A],l=n.inputProblem.chipMap[A];let u=l.size.x,g=l.size.y;(c.ccwRotationDegrees===90||c.ccwRotationDegrees===270)\u0026\u0026([u,g]=[g,u]);const h=c.x-u/2,d=c.x+u/2,p=c.y-g/2,m=c.y+g/2;i=Math.min(i,h),r=Math.max(r,d),s=Math.min(s,p),a=Math.max(a,m)}t.push({partitionIndex:e,chipIds:o,bounds:{minX:i,maxX:r,minY:s,maxY:a}})}}return t}createPackInput(t){const e=this.getConnectivityMap();return{components:t.map(o=\u003e{const i=this.packedPartitions[o.partitionIndex],r=this.partitionHasFixedChip(o.partitionIndex),s=o.bounds.maxX-o.bounds.minX,a=o.bounds.maxY-o.bounds.minY,A=(o.bounds.minX+o.bounds.maxX)/2,c=(o.bounds.minY+o.bounds.maxY)/2,l=[{padId:`partition_${o.partitionIndex}_body`,networkId:`partition_${o.partitionIndex}_disconnected`,type:\"rect\",offset:{x:0,y:0},size:{x:Math.max(s,.1),y:Math.max(a,.1)}}],u=new Set;for(const g of o.chipIds){const h=i.layout.chipPlacements[g],d=i.inputProblem.chipMap[g];for(const p of d.pins){const m=i.inputProblem.chipPinMap[p];if(!m)continue;let _={x:m.offset.x,y:m.offset.y};const f=h.ccwRotationDegrees??0;f===90?_={x:-m.offset.y,y:m.offset.x}:f===180?_={x:-m.offset.x,y:-m.offset.y}:f===270\u0026\u0026(_={x:m.offset.y,y:-m.offset.x});const I=h.x+_.x,C=h.y+_.y,y=e.get(p)??`${p}_disconnected`;u.has(y)||(u.add(y),l.push({padId:`${o.partitionIndex}_pin_${p}`,networkId:y,type:\"rect\",offset:{x:I-A,y:C-c},size:{x:.01,y:.01}}))}}return{componentId:`partition_${o.partitionIndex}`,pads:l,availableRotationDegrees:[0],...r\u0026\u0026{isStatic:!0,center:{x:A,y:c},ccwRotationOffset:0}}}),minGap:this.inputProblem.partitionGap,packOrderStrategy:\"largest_to_smallest\",packPlacementStrategy:\"minimum_sum_squared_distance_to_network\"}}applyPackingResult(t,e){const n={};for(const i of t){const r=parseInt(i.componentId.replace(\"partition_\",\"\")),s=e.find(A=\u003eA.partitionIndex===r),a=this.packedPartitions[r];if(s\u0026\u0026a){const A=(s.bounds.minX+s.bounds.maxX)/2,c=(s.bounds.minY+s.bounds.maxY)/2,l=i.center.x,u=i.center.y,g=l-A,h=u-c;for(const d of s.chipIds){const p=a.layout.chipPlacements[d];n[d]={x:p.x+g,y:p.y+h,ccwRotationDegrees:p.ccwRotationDegrees}}}}const o={chipPlacements:n,groupPlacements:{}};return G1o({inputProblem:this.inputProblem,chipPlacements:o.chipPlacements,pinToNetworkMap:this.getConnectivityMap()}),o}getCombinedPackedPartitionsProblem(){const t={chipMap:{},chipPinMap:{},pinStrongConnMap:{},netMap:{},netConnMap:{},chipGap:this.inputProblem.chipGap,partitionGap:this.inputProblem.partitionGap};for(const e of this.packedPartitions)Object.assign(t.chipMap,e.inputProblem.chipMap),Object.assign(t.chipPinMap,e.inputProblem.chipPinMap),Object.assign(t.pinStrongConnMap,e.inputProblem.pinStrongConnMap),Object.assign(t.netMap,e.inputProblem.netMap),Object.assign(t.netConnMap,e.inputProblem.netConnMap);return t}getCombinedPackedPartitionsLayout(){const t={};for(const e of this.packedPartitions)Object.assign(t,e.layout.chipPlacements);return{chipPlacements:t,groupPlacements:{}}}visualize(){return this.packSolver2\u0026\u0026!this.solved?this.packSolver2.visualize():this.finalLayout?Vh(this.getCombinedPackedPartitionsProblem(),this.finalLayout):this.packedPartitions.length===0?super.visualize():Vh(this.getCombinedPackedPartitionsProblem(),this.getCombinedPackedPartitionsLayout())}getConstructorParams(){return{packedPartitions:this.packedPartitions,inputProblem:this.inputProblem}}},U1o=.2,MSt=(t,e)=\u003ee.y+ta(t.offset,e.ccwRotationDegrees).y,Ale=({upperPin:t,upperPlacement:e,lowerPin:n,lowerPlacement:o})=\u003eMSt(t,e)-MSt(n,o)-U1o,DSt=({chipId:t,side:e},n)=\u003en.chipMap[t]?.pins.filter(i=\u003e!e||n.chipPinMap[i]?.side===e).map(i=\u003en.chipPinMap[i]).find(i=\u003ei\u0026\u0026Object.values(n.netMap).some(r=\u003er.isPositiveVoltageSource\u0026\u0026n.netConnMap[`${i.pinId}-${r.netId}`])),xve=(t,{inputProblem:e,layout:n})=\u003e{const o=n.chipPlacements[t],i=e.chipMap[t];if(!o||!i)return null;const r=dd(i.size,o.ccwRotationDegrees);return Ey({center:o,width:r.x,height:r.y})},NSt=(t,e)=\u003e{const n=t.flatMap(o=\u003e{const i=xve(o,e);return i?[{x:i.minX,y:i.minY},{x:i.maxX,y:i.maxY}]:[]});return Oh(n)},K1o=({mainPartition:t,mainChipId:e,side:n},o)=\u003e{const i=new Set(o.chipMap[e]?.pins.filter(s=\u003eo.chipPinMap[s]?.side===n)),r=FN(t.inputProblem);for(const[s,a]of Object.entries(o.pinStrongConnMap)){if(!a)continue;const[A,c]=s.split(\"-\"),l=i.has(A)?c:i.has(c)?A:null;if(!l)continue;const u=r.get(l);if(u?.chipId!==e\u0026\u0026u)return u.chipId}return null},V1o=({partitionA:t,partitionB:e},n)=\u003e{const o=new Set(Object.keys(t.inputProblem.chipPinMap)),i=new Set(Object.keys(e.inputProblem.chipPinMap));return Object.entries(n.pinStrongConnMap).some(([r,s])=\u003e{if(!s)return!1;const[a,A]=r.split(\"-\");return o.has(a)\u0026\u0026i.has(A)||o.has(A)\u0026\u0026i.has(a)})},z1o=(t,e)=\u003e{const n=new Set(t);return t.some(o=\u003e{const i=xve(o,e);return Object.keys(e.layout.chipPlacements).some(r=\u003e{if(!i||n.has(r))return!1;const s=xve(r,e);return s?z4(i,s):!1})})},J1o=({side:t,chipGap:e,mainBounds:n,rowBounds:o,neighbor:i})=\u003e{const r=oD(o),s={x:i.x-r.x,y:i.y-r.y};return t===\"x+\"\u0026\u0026(s.x=n.maxX+e-o.minX),t===\"x-\"\u0026\u0026(s.x=n.minX-e-o.maxX),t===\"y+\"\u0026\u0026(s.y=n.maxY+e-o.minY),t===\"y-\"\u0026\u0026(s.y=n.minY-e-o.maxY),s},W1o=({layout:t,decouplingPartition:e},{inputProblem:n,packedPartitions:o})=\u003e{const i=e.inputProblem,r=i.decouplingMainChipId,s=i.decouplingMainChipSide;if(i.partitionType!==\"decoupling_caps\"||!r||!s)return;const a=o.find(f=\u003ef!==e\u0026\u0026f.inputProblem.chipMap[r]);if(!a||V1o({partitionA:e,partitionB:a},n))return;const A=K1o({mainPartition:a,mainChipId:r,side:s},n);let c=t.chipPlacements[r];A\u0026\u0026(c=t.chipPlacements[A]);const l=Object.keys(i.chipMap),u={inputProblem:n,layout:t},g=NSt(Object.keys(a.inputProblem.chipMap),u),h=NSt(l,u);if(!c||!g||!h)return;if(!A){const f=l[0],I=DSt({chipId:r,side:s},n),C=f\u0026\u0026DSt({chipId:f},n),y=f\u0026\u0026t.chipPlacements[f];if(!I||!C||!y)return;c={...c,y:c.y+Ale({upperPin:I,upperPlacement:c,lowerPin:C,lowerPlacement:{...y,y:c.y}})}}let d=n.chipGap;A||(d=n.partitionGap);const p=J1o({side:s,chipGap:d,mainBounds:g,rowBounds:h,neighbor:c}),m=pA(p.x,p.y),_=new Map;for(const f of l){const I=t.chipPlacements[f];I\u0026\u0026(_.set(f,I),t.chipPlacements[f]={...I,...Bn(m,I)})}if(z1o(l,u))for(const[f,I]of _)t.chipPlacements[f]=I},j1o=class extends Zf{constructor(t){super(),this.options=t}options;outputLayout=null;_step(){this.outputLayout=structuredClone(this.options.inputLayout);for(const t of this.options.packedPartitions)W1o({layout:this.outputLayout,decouplingPartition:t},this.options);this.solved=!0}visualize(){return Vh(this.options.inputProblem,this.outputLayout??this.options.inputLayout)}getConstructorParams(){return[this.options]}},$1o=[0,90,180,270],RSt=0,cle=.5,TSt=({chip:t,upperPinId:e,lowerPinId:n,inputProblem:o})=\u003e{const i=o.chipPinMap[e],r=o.chipPinMap[n];if(!i||!r)return RSt;const s=t.availableRotations??$1o;let a=RSt,A=Number.NEGATIVE_INFINITY;for(const c of s){const l=ta(i.offset,c),u=ta(r.offset,c),g=l.y-u.y;g\u003c=A||(A=g,a=c)}return a},q1o=({railLoadPairs:t,inputProblem:e,inputLayout:n})=\u003e{const o=structuredClone(n),{chipPlacements:i}=o,r=new Map;for(const s of t){const a=r.get(s.mainChipId)??[];a.push(s),r.set(s.mainChipId,a)}for(const s of r.values()){let a;for(const A of s){const c=i[A.railComponent.chipId],l=i[A.resistor.chipId],u=i[A.mainChipId],g=e.chipPinMap[A.mainPinId];if(!c||!l||!u||!g)continue;const h=TSt({chip:A.railComponent,upperPinId:A.railPinId,lowerPinId:A.railComponentResistorPinId,inputProblem:e}),d=TSt({chip:A.resistor,upperPinId:A.resistorRailComponentPinId,lowerPinId:A.resistorMainPinId,inputProblem:e}),p=dd(A.railComponent.size,h),m=dd(A.resistor.size,d),_=p.y*cle+e.chipGap+m.y*cle,f=ta(g.offset,u.ccwRotationDegrees),I=e.chipPinMap[A.resistorMainPinId];if(!I)continue;const C=ta(I.offset,d);let y=(c.x+l.x)*cle;const x=u.y+f.y-C.y,E=x+_;i[A.railComponent.chipId]={x:y,y:E,ccwRotationDegrees:h},i[A.resistor.chipId]={x:y,y:x,ccwRotationDegrees:d};const B=Math.max(p.x,m.x)*cle,S=y-B,Q=y+B;if(a!==void 0){const w=a+e.partitionGap-S;y+=w,i[A.railComponent.chipId].x=y,i[A.resistor.chipId].x=y,a=Q+w;continue}a=Q}}return c1o({railLoadPairs:t,inputProblem:e,chipPlacements:i}),o},kSt=2,FSt=({connectedPinsByPinId:t,pinId:e})=\u003e(t[e]??[]).map(n=\u003en.pinId),X1o=({inputProblem:t,pinId:e})=\u003e{for(const[n,o]of Object.entries(t.netMap))if(o.isPositiveVoltageSource\u0026\u0026t.netConnMap[`${e}-${n}`])return!0;return!1},Z1o=(t,e)=\u003e{const{inputProblem:n,pinOwnerMap:o,connectedPinsByPinId:i}=e;for(const r of t.pins){const s=FSt({connectedPinsByPinId:i,pinId:r}).find(g=\u003e{const h=o.get(g);return h?h.pins.length\u003ekSt\u0026\u0026!h.isCrystal:!1});if(!s)continue;const a=o.get(s);if(!a)continue;const A=t.pins.find(g=\u003eg!==r);if(!A)continue;const c=FSt({connectedPinsByPinId:i,pinId:A}).find(g=\u003e{const h=o.get(g);return!h||h.pins.length!==kSt?!1:!h.isResistor\u0026\u0026!h.isCapacitor\u0026\u0026!h.fixedPosition});if(!c)continue;const l=o.get(c);if(!l)continue;const u=l.pins.find(g=\u003eg!==c\u0026\u0026X1o({inputProblem:n,pinId:g}));if(u)return{railComponent:l,resistor:t,railPinId:u,railComponentResistorPinId:c,resistorRailComponentPinId:A,resistorMainPinId:r,mainChipId:a.chipId,mainPinId:s}}return null},eIo=t=\u003e{const e={inputProblem:t,pinOwnerMap:FN(t),connectedPinsByPinId:sj(t)},n=[];for(const o of Object.values(t.chipMap)){if(!o.isResistor||o.fixedPosition)continue;const i=Z1o(o,e);i\u0026\u0026n.push(i)}return n},tIo=class extends Zf{constructor(t){super(),this.params=t}params;outputLayout=null;_step(){const t=eIo(this.params.inputProblem);this.outputLayout=q1o({railLoadPairs:t,inputProblem:this.params.inputProblem,inputLayout:this.params.inputLayout}),this.solved=!0}visualize(){let t=this.params.inputLayout;return this.outputLayout\u0026\u0026(t=this.outputLayout),Vh(this.params.inputProblem,t)}getConstructorParams(){return[this.params]}},qv=2,lle=({connectedPinsByPinId:t,pinId:e})=\u003e(t[e]??[]).map(n=\u003en.pinId),ule=({inputProblem:t,pinId:e})=\u003e{const n=[];for(const o of Object.keys(t.netMap))t.netConnMap[`${e}-${o}`]\u0026\u0026n.push(o);return n},LSt=({inputProblem:t,netId:e})=\u003e{const n=[];for(const o of Object.keys(t.chipPinMap))t.netConnMap[`${o}-${e}`]\u0026\u0026n.push(o);return n},Eve=({lowerChip:t,lowerInnerPinId:e,inputProblem:n})=\u003e{for(const o of t.pins){if(o===e)continue;const i=ule({inputProblem:n,pinId:o}).find(r=\u003en.netMap[r]?.isGround===!0);if(i)return{groundPinId:o,groundNetId:i}}return null},nIo=({inputProblem:t,pinId:e})=\u003eule({inputProblem:t,pinId:e}).some(n=\u003et.netMap[n]?.isPositiveVoltageSource===!0),HSt=({upperInnerPinId:t},e)=\u003e{const{inputProblem:n,pinOwnerMap:o,connectedPinsByPinId:i,pairedChipIds:r}=e;for(const s of lle({connectedPinsByPinId:i,pinId:t})){const a=o.get(s);if(!a||a.pins.length!==qv||a.fixedPosition||r.has(a.chipId))continue;const A=Eve({lowerChip:a,lowerInnerPinId:s,inputProblem:n});if(A)return{lowerChip:a,lowerInnerPinId:s,...A}}return null},oIo=(t,e)=\u003e{const{inputProblem:n,pinOwnerMap:o,connectedPinsByPinId:i,pairedChipIds:r}=e;for(const s of t.pins){const a=lle({connectedPinsByPinId:i,pinId:s}).find(h=\u003e{const d=o.get(h);return d?d.pins.length\u003eqv\u0026\u0026!d.isCrystal:!1});if(!a)continue;const A=o.get(a);if(!A)continue;const c=t.pins.find(h=\u003eh!==s);if(!c)continue;const l=lle({connectedPinsByPinId:i,pinId:c}).map(h=\u003eo.get(h)).find(h=\u003e!h||h.pins.length!==qv||h.chipId===t.chipId||h.fixedPosition?!1:!r.has(h.chipId));if(!l)continue;const u=l.pins.find(h=\u003elle({connectedPinsByPinId:i,pinId:h}).some(d=\u003eo.get(d)?.chipId===t.chipId));if(!u)continue;const g=Eve({lowerChip:l,lowerInnerPinId:u,inputProblem:n});if(g)return{upperChip:t,lowerChip:l,mainChipId:A.chipId,mainPinId:a,upperOuterPinId:s,upperInnerPinId:c,lowerInnerPinId:u,...g}}return null},iIo=(t,e)=\u003e{const{inputProblem:n,pinOwnerMap:o,pairedChipIds:i}=e,r=t.pins.find(h=\u003enIo({inputProblem:n,pinId:h}));if(!r)return null;const s=t.pins.find(h=\u003eh!==r);if(!s)return null;const a=HSt({upperInnerPinId:s},e);if(a)return{upperChip:t,upperOuterPinId:r,upperInnerPinId:s,...a};const A=ule({inputProblem:n,pinId:s}).find(h=\u003e{const d=n.netMap[h];return!d?.isGround\u0026\u0026!d?.isPositiveVoltageSource});if(!A)return null;const c=LSt({inputProblem:n,netId:A});if(c.length!==qv)return null;const l=c.find(h=\u003eh!==s);if(!l)return null;const u=o.get(l);if(!u||u.pins.length!==qv||u.fixedPosition||i.has(u.chipId))return null;const g=Eve({lowerChip:u,lowerInnerPinId:l,inputProblem:n});return g?{upperChip:t,lowerChip:u,upperOuterPinId:r,upperInnerPinId:s,lowerInnerPinId:l,...g}:null},rIo=(t,e)=\u003e{const{inputProblem:n}=e;for(const o of t.pins){if(!ule({inputProblem:n,pinId:o}).some(a=\u003e{const A=n.netMap[a];return A?.isGround||A?.isPositiveVoltageSource?!1:LSt({inputProblem:n,netId:a}).length===1}))continue;const r=t.pins.find(a=\u003ea!==o);if(!r)continue;const s=HSt({upperInnerPinId:r},e);if(s)return{upperChip:t,upperOuterPinId:o,upperInnerPinId:r,...s,isStandaloneSignalChain:!0}}return null},sIo=t=\u003e{const e=FN(t),n=[],o=new Set,i=sj(t),r={inputProblem:t,pinOwnerMap:e,connectedPinsByPinId:i,pairedChipIds:o};for(const s of Object.values(t.chipMap)){if(s.pins.length!==qv||s.isCrystal||s.fixedPosition||o.has(s.chipId))continue;const a=oIo(s,r);a\u0026\u0026(n.push(a),o.add(a.upperChip.chipId),o.add(a.lowerChip.chipId))}for(const s of Object.values(t.chipMap)){if(s.pins.length!==qv||s.isCrystal||s.fixedPosition||o.has(s.chipId))continue;const a=rIo(s,r);a\u0026\u0026(n.push(a),o.add(a.upperChip.chipId),o.add(a.lowerChip.chipId))}for(const s of Object.values(t.chipMap)){if(s.pins.length!==qv||s.isCrystal||s.fixedPosition||o.has(s.chipId))continue;const a=iIo(s,r);a\u0026\u0026(n.push(a),o.add(a.upperChip.chipId),o.add(a.lowerChip.chipId))}return n},aIo=[0,90,180,270],OSt=0,Bve=.5,GSt=({chip:t,upperPinId:e,lowerPinId:n,inputProblem:o})=\u003e{const i=o.chipPinMap[e],r=o.chipPinMap[n];if(!i||!r)return OSt;let s=aIo;t.availableRotations\u0026\u0026(s=t.availableRotations);let a=OSt,A=Number.NEGATIVE_INFINITY;for(const c of s){const l=ta(i.offset,c),u=ta(r.offset,c),g=l.y-u.y;g\u003c=A||(A=g,a=c)}return a},bve=({chip:t,placement:e})=\u003e{const n=dd(t.size,e.ccwRotationDegrees);return Ey({center:e,width:n.x,height:n.y})},AIo=({groundedLoadPair:t,chipPlacements:e,inputProblem:n})=\u003e{const o=e[t.upperChip.chipId],i=e[t.lowerChip.chipId];if(!o||!i)return;const r=bve({chip:t.upperChip,placement:o}),s=bve({chip:t.lowerChip,placement:i}),a=Oh([{x:r.minX,y:r.minY},{x:r.maxX,y:r.maxY},{x:s.minX,y:s.minY},{x:s.maxX,y:s.maxY}]);if(!a)return;let A=0;for(const[c,l]of Object.entries(e)){if(c===t.upperChip.chipId||c===t.lowerChip.chipId)continue;const u=n.chipMap[c];if(!u)continue;const g=bve({chip:u,placement:l});if(a.maxX+n.chipGap\u003c=g.minX||a.minX-n.chipGap\u003e=g.maxX||g.maxY\u003c=a.maxY)continue;const d=a.maxY+n.chipGap-g.minY;A=Math.max(A,d)}o.y-=A,i.y-=A},cIo=({groundedLoadPair:t,chipPlacements:e,inputProblem:n})=\u003e{const o=e[t.upperChip.chipId],i=e[t.lowerChip.chipId];if(!o||!i)return;const r=GSt({chip:t.upperChip,upperPinId:t.upperOuterPinId,lowerPinId:t.upperInnerPinId,inputProblem:n}),s=GSt({chip:t.lowerChip,upperPinId:t.lowerInnerPinId,lowerPinId:t.groundPinId,inputProblem:n}),a=dd(t.upperChip.size,r),A=dd(t.lowerChip.size,s),c=a.y*Bve+n.chipGap+A.y*Bve,l=n.chipPinMap[t.upperInnerPinId],u=n.chipPinMap[t.lowerInnerPinId];if(!l||!u)return;const g=ta(l.offset,r),h=ta(u.offset,s),d=Oh([o,i]);if(!d)return;const p=oD(d),m={x:p.x-g.x,y:p.y+c*Bve,ccwRotationDegrees:r},_=t.mainPinId;if(_){const f=t.mainChipId;if(!f)return;const I=e[f];if(!I)return;const C=n.chipPinMap[t.upperOuterPinId],y=n.chipPinMap[_];if(!C||!y)return;const x=ta(C.offset,o.ccwRotationDegrees),E=ta(C.offset,r);m.x=o.x+x.x-E.x,m.y=o.y+x.y-E.y,m.y+=Ale({upperPin:y,upperPlacement:I,lowerPin:C,lowerPlacement:m})}e[t.upperChip.chipId]=m,e[t.lowerChip.chipId]={x:m.x+g.x-h.x,y:m.y-c,ccwRotationDegrees:s},AIo({groundedLoadPair:t,chipPlacements:e,inputProblem:n})},YSt=2,Xv=(t,e)=\u003e{const{chipPlacements:n}=e,o=n[t.upperChip.chipId],i=n[t.lowerChip.chipId],r=mb({placement:o,size:t.upperChip.size}),s=mb({placement:i,size:t.lowerChip.size});return{minX:Math.min(r.minX,s.minX),maxX:Math.max(r.maxX,s.maxX),minY:Math.min(r.minY,s.minY),maxY:Math.max(r.maxY,s.maxY)}},USt=(t,e)=\u003e{const{chipPlacements:n,inputProblem:o}=e,i=n[t.lowerChip.chipId],r=o.chipPinMap[t.groundPinId],s=ta(r.offset,i.ccwRotationDegrees);return i.y+s.y},gle=({groundedLoadPair:t,dx:e,dy:n},o)=\u003e{const{chipPlacements:i}=o;for(const r of[t.upperChip.chipId,t.lowerChip.chipId]){const s=i[r];s.x+=e,s.y+=n}},dle=(t,e)=\u003eXv(t,e).minX,KSt=(t,e)=\u003e{const n=t.map(o=\u003eXv(o,e));return{minX:Math.min(...n.map(o=\u003eo.minX)),maxX:Math.max(...n.map(o=\u003eo.maxX)),minY:Math.min(...n.map(o=\u003eo.minY)),maxY:Math.max(...n.map(o=\u003eo.maxY))}},VSt=(t,e,n)=\u003et.maxY+n\u003c=e.minY||e.maxY+n\u003c=t.minY,lIo=(t,e,n)=\u003e{const{inputProblem:o}=n,i=Xv(t,n),r=Xv(e,n),s=i.maxX+o.chipGap\u003c=r.minX||r.maxX+o.chipGap\u003c=i.minX,a=VSt(i,r,o.chipGap);return!s\u0026\u0026!a},uIo=(t,e)=\u003e{const n=new Set(t),o=[];for(;n.size\u003e0;){const i=n.values().next().value;if(!i)break;n.delete(i);const r=[i];for(let s=0;s\u003cr.length;s++){const a=r[s];for(const A of[...n])lIo(a,A,e)\u0026\u0026(n.delete(A),r.push(A))}r.length\u003e=YSt\u0026\u0026o.push(r)}return o},gIo=(t,e)=\u003e{const{inputProblem:n}=e,o=[...t].sort((a,A)=\u003edle(a,e)-dle(A,e)),i=o.map(a=\u003eUSt(a,e)),r=Math.min(...i);for(const a of o){const A=USt(a,e);gle({groundedLoadPair:a,dx:0,dy:r-A},e)}let s;for(const a of o){const A=Xv(a,e);if(s===void 0){s=A.maxX;continue}const c=s+n.partitionGap-A.minX;gle({groundedLoadPair:a,dx:c,dy:0},e),s=A.maxX+c}},dIo=(t,e)=\u003e{const{inputProblem:n}=e,o=[...t].sort((A,c)=\u003edle(A,e)-dle(c,e)),i=KSt(o,e),r=[];for(const A of o){const c=Xv(A,e);let l=c.minX;for(const u of r){const g=Xv(u,e);VSt(g,c,n.chipGap)||(l=Math.max(l,g.maxX+n.chipGap))}gle({groundedLoadPair:A,dx:l-c.minX,dy:0},e),r.push(A)}const s=KSt(o,e),a=(i.minX+i.maxX-s.minX-s.maxX)/2;for(const A of o)gle({groundedLoadPair:A,dx:a,dy:0},e)},hIo=({groundedLoadPairs:t,chipPlacements:e,inputProblem:n})=\u003e{const o={chipPlacements:e,inputProblem:n},i=new Map;for(const s of t){if(!e[s.upperChip.chipId]||!e[s.lowerChip.chipId]||!n.chipPinMap[s.groundPinId])continue;const a=i.get(s.groundNetId)??new Map,A=a.get(s.mainChipId)??[];A.push(s),a.set(s.mainChipId,A),i.set(s.groundNetId,a)}for(const s of i.values())for(const a of s.values()){if(a.length\u003cYSt)continue;if(!(a[0].mainChipId!==void 0)){gIo(a,o);continue}for(const c of uIo(a,o))dIo(c,o)}const r=_Io({groundedLoadPairs:t,chipPlacements:e,inputProblem:n});A1o({groundedLoadPairs:t.filter(s=\u003e!r.has(s)),chipPlacements:e,inputProblem:n})},pIo={\"x-\":{x:-1,y:0},\"x+\":{x:1,y:0},\"y-\":{x:0,y:-1},\"y+\":{x:0,y:1}},mIo=2,_Io=({inputProblem:t,chipPlacements:e,groundedLoadPairs:n})=\u003e{const o=new Set,i=new Set(n);for(const r of i){if(!r.mainChipId||!r.mainPinId)continue;const s=t.chipPinMap[r.mainPinId],a=n.filter(g=\u003eg.mainChipId===r.mainChipId\u0026\u0026g.mainPinId\u0026\u0026t.chipPinMap[g.mainPinId].side===s.side);if(a.length\u003cmIo)continue;const A=e[r.mainChipId],c=ta(pIo[s.side],A.ccwRotationDegrees);if(c.x===0)continue;a.sort((g,h)=\u003e{const d=ta(t.chipPinMap[g.mainPinId].offset,A.ccwRotationDegrees);return(ta(t.chipPinMap[h.mainPinId].offset,A.ccwRotationDegrees).y-d.y)*c.x});const l=mb({placement:A,size:t.chipMap[r.mainChipId].size});let u;for(const g of a){i.delete(g);const h=t.chipPinMap[g.mainPinId],d=[g.upperChip.chipId,g.lowerChip.chipId],p=a.filter(x=\u003ex===g||i.has(x)).flatMap(x=\u003e[x.upperChip.chipId,x.lowerChip.chipId]),m=e[g.upperChip.chipId],_=Ale({upperPin:h,upperPlacement:A,lowerPin:t.chipPinMap[g.upperOuterPinId],lowerPlacement:m}),{minX:f,maxX:I}=Xv(g,{chipPlacements:e});let C=Math.max(0,l.maxX+t.chipGap-f);c.x\u003c0\u0026\u0026(C=Math.min(0,l.minX-t.chipGap-I)),u!==void 0\u0026\u0026(c.x\u003c0?C=Math.min(C,u-t.chipGap-I):C=Math.max(C,u+t.chipGap-f));const y=[C];for(const[x,E]of Object.entries(e)){if(p.includes(x))continue;const B=mb({placement:E,size:t.chipMap[x].size});let S=B.maxX+t.chipGap-f;c.x\u003c0\u0026\u0026(S=B.minX-t.chipGap-I),!(S*c.x\u003cC*c.x)\u0026\u0026y.push(S)}y.sort((x,E)=\u003eMath.abs(x)-Math.abs(E));for(const x of y)if(LN({chipIds:d,clearanceGroupChipIds:p,dx:x,dy:_,chipPlacements:e,inputProblem:t})){o.add(g),u=I+x,c.x\u003c0\u0026\u0026(u=f+x);break}}}return o},fIo=class extends Zf{constructor(t){super(),this.params=t}params;outputLayout=null;groundedLoadPairs=[];_step(){const t={};for(const[e,n]of Object.entries(this.params.inputLayout.chipPlacements))t[e]={...n};this.groundedLoadPairs=sIo(this.params.inputProblem);for(const e of this.groundedLoadPairs)cIo({groundedLoadPair:e,chipPlacements:t,inputProblem:this.params.inputProblem});hIo({groundedLoadPairs:this.groundedLoadPairs,chipPlacements:t,inputProblem:this.params.inputProblem}),this.outputLayout={chipPlacements:t,groupPlacements:{...this.params.inputLayout.groupPlacements}},this.solved=!0}visualize(){let t=this.params.inputLayout;return this.outputLayout\u0026\u0026(t=this.outputLayout),Vh(this.params.inputProblem,t)}getConstructorParams(){return[this.params]}},IIo=t=\u003e{const e=Object.values(t.inputProblem.chipMap);return e.length\u003e1\u0026\u0026e.every(n=\u003en.pins.length===2\u0026\u0026!n.isCapacitor\u0026\u0026!n.fixedPosition)},CIo=({groundedLoadPairs:t,packedPartitions:e})=\u003e{const o=e.filter(IIo).map(r=\u003e({chipIds:Object.keys(r.inputProblem.chipMap)})),i=new Set(o.flatMap(r=\u003er.chipIds));for(const r of t){if(r.mainChipId||r.isStandaloneSignalChain)continue;const s=[r.upperChip.chipId,r.lowerChip.chipId];if(!s.some(a=\u003ei.has(a))){o.push({chipIds:s});for(const a of s)i.add(a)}}return o},hle=({chipId:t},e)=\u003e{const n=e.inputProblem.chipMap[t],o=e.layout.chipPlacements[t];if(!n||!o)return null;const i=dd(n.size,o.ccwRotationDegrees);return Ey({center:o,width:i.x,height:i.y})},Sve=({chipIds:t},e)=\u003eOh(t.flatMap(n=\u003e{const o=hle({chipId:n},e);return o?[{x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY}]:[]})),zSt=({chipIds:t,railNetIds:e},n)=\u003e{let o=null;for(const i of t){const r=n.inputProblem.chipMap[i];if(!r)continue;const s=n.layout.chipPlacements[r.chipId];if(s)for(const a of r.pins){if(![...e].some(g=\u003en.inputProblem.netConnMap[`${a}-${g}`]))continue;const c=n.inputProblem.chipPinMap[a];if(!c)continue;const l=ta(c.offset,s.ccwRotationDegrees),u=s.y+l.y;(o===null||u\u003eo.y)\u0026\u0026(o={chipId:r.chipId,y:u})}}return o},JSt=({chipIds:t},{inputProblem:e})=\u003e{const n=new Set;for(const o of t){const i=e.chipMap[o];if(i)for(const r of i.pins)for(const[s,a]of Object.entries(e.netMap))!a.isGround\u0026\u0026!a.isPositiveVoltageSource||e.netConnMap[`${r}-${s}`]\u0026\u0026n.add(s)}return n},yIo=(t,e)=\u003et.size\u003e=2\u0026\u0026t.size===e.size\u0026\u0026[...t].every(n=\u003ee.has(n)),xIo=({chipIds:t,offset:e},{layout:n})=\u003e{const o=new Map;for(const i of t){const r=n.chipPlacements[i];r\u0026\u0026(o.set(i,r),n.chipPlacements[i]={...r,x:r.x+e.x,y:r.y+e.y})}return o},EIo=({movedChipIds:t},e)=\u003e{const n=new Set(t);return t.some(o=\u003e{const i=hle({chipId:o},e);return i?Object.keys(e.layout.chipPlacements).some(r=\u003e{if(n.has(r))return!1;const s=hle({chipId:r},e);return s?z4(i,s):!1}):!1})},BIo=t=\u003e{const{groundedLoadPairs:e,inputProblem:n,packedPartitions:o}=t,i=structuredClone(t.inputLayout),r={inputProblem:n,layout:i},s=o.filter(c=\u003ec.inputProblem.partitionType===\"decoupling_caps\"),a=CIo({groundedLoadPairs:e,packedPartitions:o}),A=new Set;for(const c of s){const l=JSt({chipIds:Object.keys(c.inputProblem.chipMap)},r),u=Object.keys(c.inputProblem.chipMap),g=Sve({chipIds:u},r);if(!g)continue;const h=zSt({chipIds:u,railNetIds:l},r);if(!h)continue;let d=g.maxX;for(const p of a){if(A.has(p))continue;const m=JSt({chipIds:p.chipIds},r);if(!yIo(l,m))continue;const _=p.chipIds;if(!Sve({chipIds:_},r))continue;const I=zSt({chipIds:_,railNetIds:m},r);if(!I)continue;const C=hle({chipId:I.chipId},r);if(!C)continue;const y=xIo({chipIds:_,offset:{x:d+n.partitionGap-C.minX,y:h.y-I.y}},r);if(EIo({movedChipIds:_},r)){for(const[E,B]of y)i.chipPlacements[E]=B;continue}const x=Sve({chipIds:_},r);x\u0026\u0026(d=x.maxX),A.add(p)}}return i},bIo=class extends Zf{constructor(t){super(),this.options=t}options;outputLayout=null;_step(){this.outputLayout=BIo(this.options),this.solved=!0}visualize(){return Vh(this.options.inputProblem,this.outputLayout??this.options.inputLayout)}getConstructorParams(){return[this.options]}},WSt=(t,e)=\u003eObject.keys(e.netMap).filter(n=\u003ee.netConnMap[`${t}-${n}`]),jSt=(t,e)=\u003enew Set(t.pins.flatMap(n=\u003eWSt(n,e))),$St=({chipId:t,railNetId:e},n)=\u003e{const o=n.chipMap[t]?.pins.find(i=\u003eWSt(i,n).includes(e));return o?n.chipPinMap[o]??null:null},ple=(t,{inputProblem:e,layout:n})=\u003e{const o=e.chipMap[t],i=n.chipPlacements[t];return!o||!i?null:mb({placement:i,size:o.size})},qSt=(t,e)=\u003et.reduce((n,o)=\u003en+e.chipPlacements[o].x,0)/t.length,SIo=({groundNetId:t,railNetId:e},{inputProblem:n,layout:o})=\u003eObject.values(n.chipMap).filter(i=\u003e{if(!i.isCapacitor||i.fixedPosition||i.pins.length!==2||!o.chipPlacements[i.chipId])return!1;const r=jSt(i,n);return r.size===2\u0026\u0026r.has(t)\u0026\u0026r.has(e)}).map(i=\u003ei.chipId),QIo=(t,e)=\u003e{const{inputProblem:n,layout:o}=e;if(t.fixedPosition||t.pins.length!==3)return null;const i=o.chipPlacements[t.chipId];if(!i)return null;const r=[...jSt(t,n)],s=r.filter(u=\u003en.netMap[u]?.isGround),a=r.filter(u=\u003en.netMap[u]?.isPositiveVoltageSource);if(s.length!==1||a.length!==2)return null;const A=a.map(u=\u003e({railNetId:u,capacitorChipIds:SIo({groundNetId:s[0],railNetId:u},e)}));if(A.some(u=\u003eu.capacitorChipIds.length===0))return null;const c=A.find(u=\u003eqSt(u.capacitorChipIds,o)\u003ci.x),l=A.find(u=\u003eqSt(u.capacitorChipIds,o)\u003ei.x);return!c||!l?null:(c.capacitorChipIds.sort((u,g)=\u003eo.chipPlacements[u].x-o.chipPlacements[g].x),l.capacitorChipIds.sort((u,g)=\u003eo.chipPlacements[u].x-o.chipPlacements[g].x),{regulatorChipId:t.chipId,left:c,right:l})},XSt=({group:t,regulatorChipId:e,startX:n,xDirection:o},i)=\u003e{const{inputProblem:r,layout:s}=i,a=s.chipPlacements[e],A=$St({chipId:e,railNetId:t.railNetId},r);if(!a||!A)return!1;const c=[...t.capacitorChipIds];o\u003c0\u0026\u0026c.reverse();const l=r.decouplingCapsGap??r.chipGap;let u=n;for(const g of c){const h=s.chipPlacements[g],d=ple(g,i),p=$St({chipId:g,railNetId:t.railNetId},r);if(!h||!d||!p)return!1;const m=d.maxX-d.minX;s.chipPlacements[g]={...h,x:u+o*m/2,y:h.y+Ale({upperPin:A,upperPlacement:a,lowerPin:p,lowerPlacement:h})},u+=o*(m+l)}return!0},vIo=(t,e)=\u003e{const n=ple(t.regulatorChipId,e);return!n||!XSt({group:t.left,regulatorChipId:t.regulatorChipId,startX:n.minX-e.inputProblem.chipGap,xDirection:-1},e)?!1:XSt({group:t.right,regulatorChipId:t.regulatorChipId,startX:n.maxX+e.inputProblem.chipGap,xDirection:1},e)},wIo=(t,e)=\u003e{const{inputProblem:n,layout:o}=e,i=new Set(t),r=t.map(g=\u003eple(g,e)),s=Math.min(...r.map(g=\u003eg.minX)),a=Math.min(...r.map(g=\u003eg.minY)),A=Math.max(...r.map(g=\u003eg.maxX)),c=Math.max(...r.map(g=\u003eg.maxY)),l=(s+A)/2;let u=0;for(const g of Object.keys(o.chipPlacements)){if(i.has(g))continue;const h=ple(g,e);!h||(h.minX+h.maxX)/2\u003c=l||Math.max(h.minY-c,a-h.maxY,0)\u003e=n.partitionGap||(u=Math.min(u,h.minX-n.partitionGap-A))}return u},PIo=(t,e)=\u003e{const n=structuredClone(e),o={inputProblem:t,layout:n},i=Object.values(t.chipMap).map(A=\u003eQIo(A,o)).find(A=\u003eA!==null);if(!i)return n;const r=[...i.left.capacitorChipIds,i.regulatorChipId,...i.right.capacitorChipIds];if(!vIo(i,o))return e;const a=wIo(r,o);return LN({chipIds:r,clearanceGroupChipIds:r,dx:a,dy:0,chipPlacements:n.chipPlacements,inputProblem:t,minimumOutsideGap:t.partitionGap})?n:e},MIo=class extends Zf{constructor(t){super(),this.params=t}params;outputLayout=null;_step(){this.outputLayout=PIo(this.params.inputProblem,this.params.inputLayout),this.solved=!0}visualize(){let t=this.params.inputLayout;return this.outputLayout\u0026\u0026(t=this.outputLayout),Vh(this.params.inputProblem,t)}getConstructorParams(){return[this.params]}};function J5(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var ZSt=class extends Zf{getSolverName(){return\"LayoutPipelineSolver\"}identifyCrystalCircuitsSolver;identifyDecouplingCapsSolver;chipPartitionsSolver;packInnerPartitionsSolver;partitionPackingSolver;groundedLoadPairSolver;alignPowerGroundRowsSolver;alignTestPointsSolver;placeNetOnlyDecouplingRowsSolver;placeRailConnectedLoadsSolver;alignChipConnectedRailLoadsSolver;alignRegulatorCapacitorRowSolver;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;firstIterationOfPhase;pinIdToStronglyConnectedPins;inputProblem;chipPartitions;packedPartitions;pipelineDef=[J5(\"identifyCrystalCircuitsSolver\",Rfo,()=\u003e[this.inputProblem]),J5(\"identifyDecouplingCapsSolver\",Nfo,()=\u003e[this.inputProblem],{onSolved:t=\u003e{}}),J5(\"chipPartitionsSolver\",vfo,()=\u003e[{inputProblem:this.inputProblem,decouplingCapGroups:this.identifyDecouplingCapsSolver?.outputDecouplingCapGroups,crystalCircuitGroups:this.identifyCrystalCircuitsSolver?.outputCrystalCircuitGroups}],{onSolved:t=\u003e{this.chipPartitions=this.chipPartitionsSolver.partitions}}),J5(\"packInnerPartitionsSolver\",L1o,()=\u003e[{partitions:this.chipPartitions,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}],{onSolved:t=\u003e{this.packedPartitions=this.packInnerPartitionsSolver.packedPartitions}}),J5(\"partitionPackingSolver\",Y1o,()=\u003e[{packedPartitions:this.packedPartitions||[],inputProblem:this.inputProblem}],{onSolved:t=\u003e{}}),J5(\"alignPowerGroundRowsSolver\",kfo,()=\u003e[{inputProblem:this.inputProblem,inputLayout:this.partitionPackingSolver.finalLayout}]),J5(\"placeNetOnlyDecouplingRowsSolver\",j1o,()=\u003e[{inputProblem:this.inputProblem,packedPartitions:this.packedPartitions,inputLayout:this.alignPowerGroundRowsSolver.outputLayout}]),J5(\"groundedLoadPairSolver\",fIo,()=\u003e[{inputProblem:this.inputProblem,inputLayout:this.placeNetOnlyDecouplingRowsSolver.outputLayout}]),J5(\"placeRailConnectedLoadsSolver\",bIo,()=\u003e[{inputProblem:this.inputProblem,groundedLoadPairs:this.groundedLoadPairSolver.groundedLoadPairs,packedPartitions:this.packedPartitions,inputLayout:this.groundedLoadPairSolver.outputLayout}]),J5(\"alignChipConnectedRailLoadsSolver\",tIo,()=\u003e[{inputProblem:this.inputProblem,inputLayout:this.placeRailConnectedLoadsSolver.outputLayout}]),J5(\"alignRegulatorCapacitorRowSolver\",MIo,()=\u003e[{inputProblem:this.inputProblem,inputLayout:this.alignChipConnectedRailLoadsSolver.outputLayout??this.placeRailConnectedLoadsSolver.outputLayout}]),J5(\"alignTestPointsSolver\",n1o,()=\u003e[{inputProblem:this.inputProblem,inputLayout:this.alignRegulatorCapacitorRowSolver.outputLayout??this.alignChipConnectedRailLoadsSolver.outputLayout??this.placeRailConnectedLoadsSolver.outputLayout??this.groundedLoadPairSolver.outputLayout??this.placeNetOnlyDecouplingRowsSolver.outputLayout??this.alignPowerGroundRowsSolver.outputLayout??this.partitionPackingSolver.finalLayout}])];constructor(t){super(),this.inputProblem=t,this.MAX_ITERATIONS=1e6,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={},this.firstIterationOfPhase={},this.pinIdToStronglyConnectedPins=sj(t)}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t){this.solved=!0;return}if(this.activeSubSolver){this.activeSubSolver.step(),this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now(),this.firstIterationOfPhase[t.solverName]=this.iterations}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();if(this.solved\u0026\u0026this.alignTestPointsSolver?.solved)return this.alignTestPointsSolver.visualize();if(this.solved\u0026\u0026this.placeNetOnlyDecouplingRowsSolver?.solved)return this.placeNetOnlyDecouplingRowsSolver.visualize();if(this.solved\u0026\u0026this.alignPowerGroundRowsSolver?.solved)return this.alignPowerGroundRowsSolver.visualize();if(this.solved\u0026\u0026this.groundedLoadPairSolver?.solved)return this.groundedLoadPairSolver.visualize();if(this.solved\u0026\u0026this.partitionPackingSolver?.solved)return this.partitionPackingSolver.visualize();const t=this.identifyCrystalCircuitsSolver?.visualize(),e=this.identifyDecouplingCapsSolver?.visualize(),n=this.chipPartitionsSolver?.visualize(),o=this.packInnerPartitionsSolver?.visualize(),i=this.partitionPackingSolver?.visualize(),r=this.groundedLoadPairSolver?.visualize(),s=this.alignPowerGroundRowsSolver?.visualize(),a=this.alignTestPointsSolver?.visualize(),A=this.placeNetOnlyDecouplingRowsSolver?.visualize(),c=pb(this.inputProblem),u=[Vh(this.inputProblem,c),t,e,n,o,i,r,s,A,a].filter(Boolean).map((g,h)=\u003e{for(const d of g.rects??[])d.step=h;for(const d of g.points??[])d.step=h;for(const d of g.circles??[])d.step=h;for(const d of g.texts??[])d.step=h;for(const d of g.lines??[])d.step=h;return g});return u.length===1?u[0]:{points:u.flatMap(g=\u003eg.points||[]),rects:u.flatMap(g=\u003eg.rects||[]),lines:u.flatMap(g=\u003eg.lines||[]),circles:u.flatMap(g=\u003eg.circles||[]),texts:u.flatMap(g=\u003eg.texts||[])}}preview(){return this.activeSubSolver?this.activeSubSolver.preview():this.alignTestPointsSolver?.solved?this.alignTestPointsSolver.visualize():this.placeNetOnlyDecouplingRowsSolver?.solved?this.placeNetOnlyDecouplingRowsSolver.visualize():this.alignPowerGroundRowsSolver?.solved?this.alignPowerGroundRowsSolver.visualize():this.partitionPackingSolver?.solved?this.partitionPackingSolver.visualize():this.packInnerPartitionsSolver?.solved?this.packInnerPartitionsSolver.visualize():this.chipPartitionsSolver?.solved?this.chipPartitionsSolver.visualize():this.identifyDecouplingCapsSolver?.solved?this.identifyDecouplingCapsSolver.visualize():this.identifyCrystalCircuitsSolver?.solved?this.identifyCrystalCircuitsSolver.visualize():super.preview()}checkForOverlaps(t){const e=[],n=Object.keys(t.chipPlacements);for(let o=0;o\u003cn.length;o++)for(let i=o+1;i\u003cn.length;i++){const r=n[o],s=n[i],a=t.chipPlacements[r],A=t.chipPlacements[s],c=this.inputProblem.chipMap[r],l=this.inputProblem.chipMap[s];if(!c||!l)continue;const u=this.getRotatedBounds(a,c.size),g=this.getRotatedBounds(A,l.size),h=this.calculateOverlapArea(u,g);h\u003e0\u0026\u0026e.push({chip1:r,chip2:s,overlapArea:h})}return e}getRotatedBounds(t,e){const n=e.x/2,o=e.y/2,i=t.ccwRotationDegrees*Math.PI/180,r=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i)),a=n*r+o*s,A=n*s+o*r;return{minX:t.x-a,maxX:t.x+a,minY:t.y-A,maxY:t.y+A}}calculateOverlapArea(t,e){if(t.maxX\u003c=e.minX||t.minX\u003e=e.maxX||t.maxY\u003c=e.minY||t.minY\u003e=e.maxY)return 0;const n=Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX),o=Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY);return n*o}getOutputLayout(){if(!this.solved)throw new Error(\"Pipeline not solved yet. Call solve() or step() until solved.\");let t;if(this.alignTestPointsSolver?.solved\u0026\u0026this.alignTestPointsSolver.outputLayout)t=this.alignTestPointsSolver.outputLayout;else if(this.placeNetOnlyDecouplingRowsSolver?.solved\u0026\u0026this.placeNetOnlyDecouplingRowsSolver.outputLayout)t=this.placeNetOnlyDecouplingRowsSolver.outputLayout;else if(this.alignPowerGroundRowsSolver?.solved\u0026\u0026this.alignPowerGroundRowsSolver.outputLayout)t=this.alignPowerGroundRowsSolver.outputLayout;else if(this.partitionPackingSolver?.solved\u0026\u0026this.partitionPackingSolver.finalLayout)t=this.partitionPackingSolver.finalLayout;else throw new Error(\"No layout available. Pipeline may have failed or not progressed far enough.\");const e=this.checkForOverlaps(t);if(e.length\u003e0){const n=e.map(o=\u003e`${o.chip1} overlaps ${o.chip2} (area: ${o.overlapArea.toFixed(4)})`).join(\", \");console.warn(`Warning: ${e.length} chip overlaps detected in final layout: ${n}`)}return t}},mle=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s\u0026\u0026o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){const s=this.netMap[i],a=this.netMap[r];if(s\u0026\u0026a){s.push(...a),this.netMap[r]=s;for(const A of s)this.idToNetMap[A]=i}}}for(const r of n){const s=this.netMap[i];s\u0026\u0026!s.includes(r)\u0026\u0026s.push(r),this.idToNetMap[r]=i}}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return i?o===i||i===e||i===e:!1}areAllIdsConnected(e){if(e.length===0)return!0;const n=this.getNetConnectedToId(e[0]);if(!n)return!1;for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}};class DIo{constructor(e=1/0,n=Float64Array,o=Uint32Array){const i=e!==1/0;this.ids=i?new o(e):[],this.values=i?new n(e):[],this.capacity=e,this.length=0}clear(){this.length=0}push(e,n){if(this.length===this.capacity)throw new RangeError(\"Queue is at capacity.\");let o=this.length++;for(;o\u003e0;){const i=o-1\u003e\u003e1,r=this.values[i];if(n\u003e=r)break;this.ids[o]=this.ids[i],this.values[o]=r,o=i}this.ids[o]=e,this.values[o]=n}pop(){if(this.length===0)return;const e=this.ids,n=this.values,o=e[0],i=--this.length;if(i\u003e0){const r=e[i],s=n[i];let a=0;const A=i\u003e\u003e1;for(;a\u003cA;){const c=(a\u003c\u003c1)+1,l=c+1,u=c+(+(l\u003ci)\u0026+(n[l]\u003cn[c]));if(n[u]\u003e=s)break;e[a]=e[u],n[a]=n[u],a=u}e[a]=r,n[a]=s}return o}peek(){return this.length\u003e0?this.ids[0]:void 0}peekValue(){return this.length\u003e0?this.values[0]:void 0}shrink(){Array.isArray(this.ids)\u0026\u0026(this.ids.length=this.length),Array.isArray(this.values)\u0026\u0026(this.values.length=this.length)}}const eQt=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Qve=3;class UH{static from(e,n=0){if(n%8!==0)throw new Error(\"byteOffset must be 8-byte aligned.\");if(!e||e.byteLength===void 0||\"buffer\"in e)throw new Error(\"Data must be an instance of ArrayBuffer or SharedArrayBuffer.\");const[o,i]=new Uint8Array(e,n+0,2);if(o!==251)throw new Error(\"Data does not appear to be in a Flatbush format.\");const r=i\u003e\u003e4;if(r!==Qve)throw new Error(`Got v${r} data when expected v${Qve}.`);const s=eQt[i\u002615];if(!s)throw new Error(\"Unrecognized array type.\");const[a]=new Uint16Array(e,n+2,1),[A]=new Uint32Array(e,n+4,1);return new UH(A,a,s,void 0,e,n)}constructor(e,n=16,o=Float64Array,i=ArrayBuffer,r,s=0){if(e===void 0)throw new Error(\"Missing required argument: numItems.\");if(isNaN(e)||e\u003c=0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.byteOffset=s;let a=e,A=a;this._levelBounds=[a*4];do a=Math.ceil(a/this.nodeSize),A+=a,this._levelBounds.push(A*4);while(a!==1);this.ArrayType=o,this.IndexArrayType=A\u003c16384?Uint16Array:Uint32Array;const c=eQt.indexOf(o),l=A*4*o.BYTES_PER_ELEMENT;if(c\u003c0)throw new Error(`Unexpected typed array class: ${o}.`);const u=o,g=this.IndexArrayType;if(r)this.data=r,this._boxes=new u(r,s+8,A*4),this._indices=new g(r,s+8+l,A),this._pos=A*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const h=this.data=new i(8+l+A*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new u(h,8,A*4),this._indices=new g(h,8+l,A),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(h,0,2).set([251,(Qve\u003c\u003c4)+c]),new Uint16Array(h,2,1)[0]=n,new Uint32Array(h,4,1)[0]=e}this._queue=new DIo}add(e,n,o=e,i=n){const r=this._pos,s=r\u003e\u003e2,a=this._boxes;return this._indices[s]=s,a[r]=e,a[r+1]=n,a[r+2]=o,a[r+3]=i,this._pos=r+4,e\u003cthis.minX\u0026\u0026(this.minX=e),n\u003cthis.minY\u0026\u0026(this.minY=n),o\u003ethis.maxX\u0026\u0026(this.maxX=o),i\u003ethis.maxY\u0026\u0026(this.maxY=i),s}finish(){if(this._pos\u003e\u003e2!==this.numItems)throw new Error(`Added ${this._pos\u003e\u003e2} items when expected ${this.numItems}.`);const e=this._boxes;if(this.numItems\u003c=this.nodeSize){e[this._pos++]=this.minX,e[this._pos++]=this.minY,e[this._pos++]=this.maxX,e[this._pos++]=this.maxY;return}const{numItems:n,minX:o,minY:i,nodeSize:r,_indices:s,_levelBounds:a}=this,A=this.maxX-o||1,c=this.maxY-i||1,l=new Int32Array(n),u=65535,g=u/A,h=u/c;for(let p=0,m=0;p\u003cn;p++){const _=e[m++],f=e[m++],I=e[m++],C=e[m++],y=g*((_+I)/2-o)|0,x=h*((f+C)/2-i)|0;l[p]=kIo(y,x)}RIo(l,e,s,0,n-1,r);let d=n*4;for(let p=0,m=0;p\u003ca.length-1;p++){const _=a[p];for(;m\u003c_;){const f=m;let I=e[m++],C=e[m++],y=e[m++],x=e[m++];for(let E=1;E\u003cr\u0026\u0026m\u003c_;E++)I=Math.min(I,e[m++]),C=Math.min(C,e[m++]),y=Math.max(y,e[m++]),x=Math.max(x,e[m++]);s[d\u003e\u003e2]=f,e[d++]=I,e[d++]=C,e[d++]=y,e[d++]=x}}this._pos=d}search(e,n,o,i,r){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");const{_boxes:s,_levelBounds:a,_indices:A,nodeSize:c}=this,l=this.numItems*4;let u=s.length-4,g=a.length-1;const h=[],d=[];let p=!1;for(;u!==void 0;){const m=Math.min(u+c*4,a[g]),_=u\u003e=l;if(p)this._collectContained(u,m,g,l,d,r);else for(let f=u;f\u003cm;f+=4){const I=s[f];if(o\u003cI)continue;const C=s[f+1];if(i\u003cC)continue;const y=s[f+2];if(e\u003ey)continue;const x=s[f+3];if(n\u003ex)continue;const E=A[f\u003e\u003e2]|0;if(_){const B=+(e\u003c=I\u0026\u0026n\u003c=C\u0026\u0026o\u003e=y\u0026\u0026i\u003e=x);h.push(E|B,g-1)}else(r===void 0||r(E,I,C,y,x))\u0026\u0026d.push(E)}g=h.pop(),u=h.pop(),u!==void 0\u0026\u0026(p=(u\u00261)===1,u\u0026=-2)}return d}_collectContained(e,n,o,i,r,s){const a=this._boxes,A=this._indices;let c=e;for(let u=o;u\u003e0;u--)c=A[c\u003e\u003e2];const l=Math.min(c+(n-e)*this.nodeSize**o,i);if(s===void 0)for(;c\u003cl;c+=4)r.push(A[c\u003e\u003e2]|0);else for(;c\u003cl;c+=4){const u=A[c\u003e\u003e2]|0;s(u,a[c],a[c+1],a[c+2],a[c+3])\u0026\u0026r.push(u)}}neighbors(e,n,o=1/0,i=1/0,r){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");const{_boxes:s,_levelBounds:a,_indices:A,_queue:c,nodeSize:l}=this,u=this.numItems*4,g=l*4,h=[],d=i*i,p=o===1;let m=d;for(c.push(s.length-4\u003c\u003c1,0);c.length;){const _=c.ids[0];if(_\u00261){if(c.pop(),h.push(_\u003e\u003e1),h.length===o)break;continue}c.pop();const f=_\u003e\u003e1,I=f\u003cu,C=Math.min(f+g,NIo(f,a));for(let y=f;y\u003cC;y+=4){const x=s[y],E=s[y+1],B=s[y+2],S=s[y+3],Q=Math.max(Math.max(x-e,e-B),0),w=Math.max(Math.max(E-n,n-S),0),M=Q*Q+w*w;if(M\u003em)continue;const k=A[y\u003e\u003e2]|0;I?(r===void 0||r(k))\u0026\u0026(c.push(k\u003c\u003c1|1,M),p\u0026\u0026M\u003cm\u0026\u0026(m=M)):c.push(k\u003c\u003c1,M)}}return c.clear(),h}}function NIo(t,e){let n=0,o=e.length-1;for(;n\u003co;){const i=n+o\u003e\u003e1;e[i]\u003et?o=i:n=i+1}return e[n]}function RIo(t,e,n,o,i,r){const s=[o,i];for(;s.length;){const a=s.pop()||0,A=s.pop()||0;if(a-A\u003c=r\u0026\u0026Math.floor(A/r)\u003e=Math.floor(a/r))continue;const c=t[A],l=t[A+a\u003e\u003e1],u=t[a],g=c\u003el!=c\u003eu?c:l\u003cc!=l\u003cu?l:u;let h=A-1,d=a+1;for(;;){do h++;while(t[h]\u003cg);do d--;while(t[d]\u003eg);if(h\u003e=d)break;TIo(t,e,n,h,d)}s.push(A,d,d+1,a)}}function TIo(t,e,n,o,i){const r=t[o];t[o]=t[i],t[i]=r;const s=4*o,a=4*i,A=e[s],c=e[s+1],l=e[s+2],u=e[s+3];e[s]=e[a],e[s+1]=e[a+1],e[s+2]=e[a+2],e[s+3]=e[a+3],e[a]=A,e[a+1]=c,e[a+2]=l,e[a+3]=u;const g=n[o];n[o]=n[i],n[i]=g}function kIo(t,e){let n=t^e,o=65535^n,i=65535^(t|e),r=t\u0026(e^65535),s=n|o\u003e\u003e1,a=n\u003e\u003e1^n,A=i^(i\u003e\u003e1^o\u0026r\u003e\u003e1),c=r^(n\u0026i\u003e\u003e1^r\u003e\u003e1);return n=s\u0026s\u003e\u003e2^a\u0026a\u003e\u003e2,o=s\u0026a\u003e\u003e2^a\u0026(s^a)\u003e\u003e2,i=A^(s\u0026A\u003e\u003e2^a\u0026c\u003e\u003e2),r=c^(a\u0026A\u003e\u003e2^(s^a)\u0026c\u003e\u003e2),s=n\u0026n\u003e\u003e4^o\u0026o\u003e\u003e4,a=n\u0026o\u003e\u003e4^o\u0026(n^o)\u003e\u003e4,A=i^(n\u0026i\u003e\u003e4^o\u0026r\u003e\u003e4),c=r^(o\u0026i\u003e\u003e4^(n^o)\u0026r\u003e\u003e4),i=A^(s\u0026A\u003e\u003e8^a\u0026c\u003e\u003e8),r=c^(a\u0026A\u003e\u003e8^(s^a)\u0026c\u003e\u003e8),i^=i\u003e\u003e1,r^=r\u003e\u003e1,n=t^e,o=r|65535^(n|i),n=(n|n\u003c\u003c8)\u002616711935,n=(n|n\u003c\u003c4)\u0026252645135,n=(n|n\u003c\u003c2)\u0026858993459,n=(n|n\u003c\u003c1)\u00261431655765,o=(o|o\u003c\u003c8)\u002616711935,o=(o|o\u003c\u003c4)\u0026252645135,o=(o|o\u003c\u003c2)\u0026858993459,o=(o|o\u003c\u003c1)\u00261431655765,((o\u003c\u003c1|n)\u003e\u003e\u003e0)-2147483648}var Ng=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};step(){if(!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.constructor.name} error: ${e}`,this.failed=!0,e}!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003ethis.MAX_ITERATIONS\u0026\u0026(this.error=`${this.constructor.name} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}solve(){const e=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}},Mc=(t,e=1)=\u003e`hsl(${t.split(\"\").reduce((o,i)=\u003eo*31+i.charCodeAt(0),0)%360}, 100%, 50%, ${e})`,tQt=(t,e,n)=\u003e{if(n.chipId){const o=t.get(n.chipId);if(o)return o}return e.get(n.pinId)},Zv=(t,e,n)=\u003e{const o=new Map,i=new Map;for(const a of t.chips)if(a.sectionId){o.set(a.chipId,a.sectionId);for(const A of a.pins)i.set(A.pinId,a.sectionId)}if(o.size===0)return!1;const r=tQt(o,i,e),s=tQt(o,i,n);return r!==s},vve=(t,e,n)=\u003e{const{x:o,y:i}=t,{center:r,width:s,height:a}=e,A=r.y+a/2,c=r.y-a/2,l=r.x+s/2,u=r.x-s/2,g=A-i,h=i-c,d=l-o,p=o-u,m=Math.min(g,h,d,p),_=m===g?\"y+\":m===h?\"y-\":m===d?\"x+\":\"x-\",f=[{direction:\"y+\",distance:g},{direction:\"y-\",distance:h},{direction:\"x+\",distance:d},{direction:\"x-\",distance:p}].filter(({distance:E})=\u003eMath.abs(E-m)\u003c=1e-9).map(({direction:E})=\u003eE),I=[_,...f.filter(E=\u003eE!==_)];if(!n||I.length\u003c=1)return I;const C=n.x-t.x,y=n.y-t.y,x=Math.abs(C)\u003e=Math.abs(y)?C\u003e=0?\"x+\":\"x-\":y\u003e=0?\"y+\":\"y-\";return I.includes(x)?[x,...I.filter(E=\u003eE!==x)]:I},W5=(t,e,n)=\u003evve(t,e,n)[0],zh=(t,e={})=\u003e{const{connectionAlpha:n=.8,chipAlpha:o=.8,hideRatsNet:i=t._hideRatsNet??!1}=e,r={lines:[],points:[],rects:[]},s=new Map;for(const a of t.chips)for(const A of a.pins)s.set(A.pinId,A);for(const a of t.chips){r.rects.push({label:a.chipId,center:a.center,width:a.width,height:a.height,fill:Mc(a.chipId,o)});for(const A of a.pins)r.points.push({label:`${A.displayName??A.pinId}\n${A._facingDirection??W5(A,a)}`,x:A.x,y:A.y,color:Mc(A.pinId,.8)})}for(const a of t.textBoxes??[])r.rects.push({label:a.text??\"schematic_text\",center:a.center,width:a.width,height:a.height,fill:\"rgba(160, 0, 220, 0.14)\",strokeColor:\"rgba(160, 0, 220, 0.9)\"});if(!i){for(const a of t.directConnections){const[A,c]=a.pinIds,l=s.get(A),u=s.get(c);Zv(t,l,u)||r.lines.push({points:[{x:l.x,y:l.y},{x:u.x,y:u.y}],strokeColor:Mc(a.netId??`${A}-${c}`,n)})}for(const a of t.netConnections){const A=a.pinIds.map(c=\u003es.get(c));for(let c=0;c\u003cA.length-1;c++)for(let l=c+1;l\u003cA.length;l++){const u=A[c],g=A[l];Zv(t,u,g)||r.lines.push({points:[{x:u.x,y:u.y},{x:g.x,y:g.y}],strokeColor:Mc(a.netId,n),strokeDash:\"4 2\"})}}}return r},FIo=t=\u003e{const{pins:e,inputProblem:n,pinIdMap:o,chipMap:i}=t,r=g=\u003e{const h=new Set,d=[g];h.add(g);const p=n.directConnections||[];for(;d.length;){const m=d.shift();for(const _ of p)if(_.pinIds.includes(m))for(const f of _.pinIds)h.has(f)||(h.add(f),d.push(f))}return h},s=e[0].pinId,a=e[1].pinId,A=new Set([...r(s),...r(a)]),c=new Map,l=new Map,u=new Set(e.map(g=\u003eg.chipId));for(const g of A){const h=o.get(g);if(!h)continue;const d=i[h.chipId];if(!d)continue;const p=h._facingDirection??W5(h,d);let m=l.get(d.chipId);if(!m){m={center:d.center};const _={xPos:0,xNeg:0,yPos:0,yNeg:0};for(const f of d.pins){const I=f._facingDirection??W5(f,d);I===\"x+\"\u0026\u0026_.xPos++,I===\"x-\"\u0026\u0026_.xNeg++,I===\"y+\"\u0026\u0026_.yPos++,I===\"y-\"\u0026\u0026_.yNeg++}m.counts=_,l.set(d.chipId,m)}p===\"x+\"\u0026\u0026(m.hasXPos=!0),p===\"x-\"\u0026\u0026(m.hasXNeg=!0),p===\"y+\"\u0026\u0026(m.hasYPos=!0),p===\"y-\"\u0026\u0026(m.hasYNeg=!0)}for(const[g,h]of l){const d=new Set,p={axes:d},m=h.counts;!(m\u0026\u0026(m.xPos\u003e1||m.xNeg\u003e1||m.yPos\u003e1||m.yNeg\u003e1))\u0026\u0026u.has(g)||(h.hasXPos\u0026\u0026h.hasXNeg\u0026\u0026(p.x=h.center.x,d.add(\"x\")),h.hasYPos\u0026\u0026h.hasYNeg\u0026\u0026(p.y=h.center.y,d.add(\"y\"))),d.size\u003e0\u0026\u0026c.set(g,p)}return c},lj=t=\u003e{const{inputProblem:e,chipMap:n,pinIdMap:o,p1:i,p2:r}=t,s=FIo({pins:[i,r],inputProblem:e,pinIdMap:o,chipMap:n});if(s.size===0)return!1;const a=1e-9,A=(h,d)=\u003e{for(const[,p]of s)if(p.axes.has(\"x\")\u0026\u0026typeof p.x==\"number\"\u0026\u0026(h.x-p.x)*(d.x-p.x)\u003c-a||p.axes.has(\"y\")\u0026\u0026typeof p.y==\"number\"\u0026\u0026(h.y-p.y)*(d.y-p.y)\u003c-a)return!0;return!1};if(Math.abs(i.x-r.x)\u003ca||Math.abs(i.y-r.y)\u003ca)return A({x:i.x,y:i.y},{x:r.x,y:r.y});const c={x:r.x,y:i.y},l={x:i.x,y:r.y},u=A({x:i.x,y:i.y},c)||A(c,{x:r.x,y:r.y}),g=A({x:i.x,y:i.y},l)||A(l,{x:r.x,y:r.y});return u\u0026\u0026g},mB=t=\u003e{const e=new mle({});for(const o of t.directConnections)e.addConnections([o.netId?[o.netId,...o.pinIds]:o.pinIds]);const n=new mle(e.netMap);for(const o of t.netConnections)n.addConnections([[o.netId,...o.pinIds]]);return{directConnMap:e,netConnMap:n}},LIo=1,nQt=t=\u003e{const{netConnMap:e}=mB(t),n=e.getNetConnectedToId(\"GND\"),o=new mle({}),i=new Set;for(const l of t.directConnections){o.addConnections([l.pinIds]);const u=e.getNetConnectedToId(l.pinIds[0]),g=t.netConnections.some(h=\u003eh.isGround\u0026\u0026e.getNetConnectedToId(h.netId)===u);u\u0026\u0026g\u0026\u0026i.add(u)}const r=new Map(t.chips.flatMap(l=\u003el.pins.map(u=\u003e[u.pinId,{pin:u,chip:l}]))),s=[...r.values()].filter(({pin:l,chip:u})=\u003eu.pins.length===2\u0026\u0026e.getNetConnectedToId(l.pinId)===n\u0026\u0026(l._facingDirection??W5(l,u))===\"y-\"),a=s.some(({pin:l})=\u003e{const u=o.getNetConnectedToId(l.pinId);return u!==void 0\u0026\u0026s.some(({pin:g})=\u003el.pinId!==g.pinId\u0026\u0026Math.abs(l.y-g.y)\u003c1e-6\u0026\u0026Math.abs(l.x-g.x)\u003e1e-6\u0026\u0026o.getNetConnectedToId(g.pinId)===u)}),A=(l,u)=\u003e{const g=r.get(l)?.chip.chipId,h=r.get(u)?.chip.chipId;if(g!==void 0\u0026\u0026g===h\u0026\u0026!o.getNetConnectedToId(l)\u0026\u0026!o.getNetConnectedToId(u))return!1;const p=e.getNetConnectedToId(l),m=e.getNetConnectedToId(u);if(!p||p!==m||!i.has(p))return!1;const _=o.getNetConnectedToId(l)??`pin:${l}`,f=o.getNetConnectedToId(u)??`pin:${u}`;return _!==f};if(!a)return(l,u)=\u003e!A(l,u);const c=l=\u003e{const u=r.get(l);return u?.chip.pins.length===2\u0026\u0026!o.getNetConnectedToId(l)\u0026\u0026(u.pin._facingDirection??W5(u.pin,u.chip))===\"y-\"};return(l,u)=\u003e{const g=e.getNetConnectedToId(l),h=e.getNetConnectedToId(u);if(A(l,u))return!1;if(!n||g!==n||h!==n||!c(l)\u0026\u0026!c(u))return!0;const d=r.get(l)?.pin,p=r.get(u)?.pin;return!d||!p||Math.abs(d.y-p.y)\u003c=LIo+1e-6}};function HIo(t,e={}){const n=t.length,o=e?.maxDistance??Number.POSITIVE_INFINITY;if(n\u003c=1)return[];{const l=new Set;for(const u of t){if(l.has(u.pinId))throw new Error(`Duplicate pinId detected: \"${u.pinId}\"`);l.add(u.pinId)}}const i=(l,u)=\u003eMath.abs(l.x-u.x)+Math.abs(l.y-u.y),r=new Array(n).fill(!1),s=new Array(n).fill(Number.POSITIVE_INFINITY),a=new Array(n).fill(-1);let A=0;for(let l=1;l\u003cn;l++)t[l].pinId\u003ct[A].pinId\u0026\u0026(A=l);s[A]=0;const c=[];for(let l=0;l\u003cn;l++){let u=-1,g=Number.POSITIVE_INFINITY,h=\"\";for(let d=0;d\u003cn;d++)if(!r[d]){const p=s[d];(p\u003cg||p===g\u0026\u0026(h===\"\"||t[d].pinId\u003ch))\u0026\u0026(g=p,h=t[d].pinId,u=d)}r[u]=!0,a[u]!==-1\u0026\u0026c.push([t[u].pinId,t[a[u]].pinId]);for(let d=0;d\u003cn;d++)if(!r[d]){const p=i(t[u],t[d]),m=e?.forbidEdge?.(t[u],t[d])??!1,_=p\u003eo||m?Number.POSITIVE_INFINITY:p;(_\u003cs[d]||_===s[d]\u0026\u0026t[u].pinId\u003ct[a[d]]?.pinId)\u0026\u0026(s[d]=_,a[d]=u)}}return c}var OIo=.45,wve=.2;function _B(t){const{orientation:e,netLabelWidth:n,netLabelHeight:o}=t,i=typeof n==\"number\"?n:OIo,r=typeof o==\"number\"?o:wve;return e===\"y+\"||e===\"y-\"?{width:r,height:i}:{width:i,height:r}}function IC(t,e,n,o){switch(e){case\"x+\":return{x:t.x+n/2,y:t.y};case\"x-\":return{x:t.x-n/2,y:t.y};case\"y+\":return{x:t.x,y:t.y+o/2};case\"y-\":return{x:t.x,y:t.y-o/2}}}function Ls(t,e,n){return{minX:t.x-e/2,minY:t.y-n/2,maxX:t.x+e/2,maxY:t.y+n/2}}var oQt=({inputProblem:t,chipMap:e,pins:n})=\u003e{const[o,i]=n,r=t.directConnections.find(f=\u003ef.pinIds.includes(o.pinId)\u0026\u0026f.pinIds.includes(i.pinId));if(r?.netLabelWidth===void 0)return null;const s=e[o.chipId],a=e[i.chipId];if(!s||!a)return null;let A=o._facingDirection;A||(A=W5(o,s));let c=i._facingDirection;if(c||(c=W5(i,a)),!(A===\"x-\"\u0026\u0026c===\"x+\"||A===\"x+\"\u0026\u0026c===\"x-\"))return null;if(s.pins.length===1||a.pins.length===1)return\"single-pin-peripheral\";if(!(s.sectionId\u0026\u0026s.sectionId===a.sectionId?s.sectionId:null))return null;const d=o.x\u003c=i.x?A===\"x+\"\u0026\u0026c===\"x-\":A===\"x-\"\u0026\u0026c===\"x+\",p=Math.abs(o.x-i.x)\u003cr.netLabelWidth*2,m=Math.abs(o.y-i.y)\u003cwve;return d\u0026\u0026p\u0026\u0026m?\"overlapping-fallback-labels\":null},GIo=t=\u003eoQt(t)!==null,iQt=1e-6,YIo=3;function rQt({pin:t,netPins:e}){const n=e.filter(i=\u003eMath.abs(i.y-t.y)\u003c=iQt);return new Set(n.map(i=\u003ei.chipId)).size\u003e=YIo}function UIo({netConnection:t,netPins:e,pin1:n,pin2:o}){return!t?.isGround||n.chipId===o.chipId||Math.abs(n.y-o.y)\u003c=iQt?!1:rQt({pin:n,netPins:e})\u0026\u0026rQt({pin:o,netPins:e})}var _b=1e-6,KIo=4,sQt=2,_le=(t,e)=\u003eJSON.stringify([t,e].sort()),aQt=(t,e,n)=\u003e{const o=new Set,i=new Set,r=new Set;for(const l of t.netConnections){for(const g of l.pinIds)i.add(g);const u=e.getNetConnectedToId(l.netId);u\u0026\u0026l.isGround\u0026\u0026o.add(u)}for(const l of t.directConnections){const u=l.netLabelWidth===void 0?r:i;for(const g of l.pinIds)u.add(g)}const s=[];for(const l of t.chips){if(l.pins.length!==2||l.symbolName\u0026\u0026!l.symbolName.startsWith(\"capacitor\")||!l.pins.every(p=\u003ei.has(p.pinId))||l.pins.some(p=\u003er.has(p.pinId)))continue;const u=l.pins.map(p=\u003ee.getNetConnectedToId(p.pinId));if(!u[0]||!u[1]||u[0]===u[1]||o.has(u[0])===o.has(u[1]))continue;const g=l.pins.map(p=\u003ep._facingDirection??W5(p,l));if(g[0][0]!==g[1][0]||g[0]===g[1])continue;const h=g[0][0],d=h===\"x\"?\"y\":\"x\";if(!(Math.abs(l.pins[0][d]-l.pins[1][d])\u003e_b))for(const[p,m]of l.pins.entries()){const _=g[p];let f=s.find(I=\u003eI.sectionId===l.sectionId\u0026\u0026I.direction===_\u0026\u0026Math.abs(I.coordinate-m[h])\u003c=_b);f||(f={sectionId:l.sectionId,direction:_,coordinate:m[h],axis:h,pins:[]},s.push(f)),f.pins.push({...m,chipId:l.chipId,oppositeCoordinate:l.pins[1-p][h]})}}const a=new Set,A=new Set,c=new Set;for(const l of s){const u=l.axis===\"x\"?\"y\":\"x\";l.pins.sort((g,h)=\u003eg[u]-h[u]||g.pinId.localeCompare(h.pinId));for(let g=1;g\u003cl.pins.length;g++){const h=l.pins[g-1],d=l.pins[g],p=d[u]-h[u],m=[h[u]-(l.pins[g-2]?.[u]??h[u]),(l.pins[g+1]?.[u]??d[u])-d[u]].filter(C=\u003eC\u003e_b),_=Math.max(sQt*n,sQt*(m.length?Math.min(...m):0),KIo*Math.max(Math.abs(h[l.axis]-h.oppositeCoordinate),Math.abs(d[l.axis]-d.oppositeCoordinate)));if(p\u003c=_b||e.getNetConnectedToId(h.pinId)!==e.getNetConnectedToId(d.pinId))continue;if(p\u003e_+_b){c.add(h.pinId),c.add(d.pinId);continue}const f=Math.min(h[l.axis],d[l.axis],h.oppositeCoordinate,d.oppositeCoordinate),I=Math.max(h[l.axis],d[l.axis],h.oppositeCoordinate,d.oppositeCoordinate);t.chips.some(C=\u003e{if(C.chipId===h.chipId||C.chipId===d.chipId)return!1;const y=l.axis===\"x\"?C.width:C.height,x=u===\"x\"?C.width:C.height;return C.center[l.axis]+y/2\u003e=f-_b\u0026\u0026C.center[l.axis]-y/2\u003c=I+_b\u0026\u0026C.center[u]+x/2\u003eh[u]+_b\u0026\u0026C.center[u]-x/2\u003cd[u]-_b})||(a.add(_le(h.pinId,d.pinId)),p\u003en\u0026\u0026(A.add(h.pinId),A.add(d.pinId)))}}return{pairKeys:a,extendedRailPinIds:A,separatedRailPinIds:c}},uj=1,AQt=t=\u003e[...t].sort().join(\"::\"),VIo=class extends Ng{inputProblem;mspConnectionPairs=[];mspConnectionPairIds=new Set;dcConnMap;globalConnMap;queuedDcNetIds;chipMap;maxMspPairDistance;pinMap;userNetIdByPinId;directConnectionPinPairKeys;canRouteGroundPair;parallelRailPairKeys;constructor({inputProblem:t}){super(),this.inputProblem=t,this.canRouteGroundPair=nQt(t),this.maxMspPairDistance=t.maxMspPairDistance??uj;const{directConnMap:e,netConnMap:n}=mB(t);this.dcConnMap=e,this.globalConnMap=n,this.parallelRailPairKeys=aQt(t,n,this.maxMspPairDistance).pairKeys,this.pinMap={};for(const o of t.chips)for(const i of o.pins)this.pinMap[i.pinId]={...i,chipId:o.chipId};this.chipMap={};for(const o of t.chips)this.chipMap[o.chipId]=o;this.userNetIdByPinId={},this.directConnectionPinPairKeys=new Set;for(const o of t.directConnections)if(this.directConnectionPinPairKeys.add(AQt(o.pinIds)),o.netId){const[i,r]=o.pinIds;this.userNetIdByPinId[i]=o.netId,this.userNetIdByPinId[r]=o.netId}for(const o of t.netConnections)for(const i of o.pinIds)this.userNetIdByPinId[i]=o.netId;this.queuedDcNetIds=Object.keys(n.netMap)}getConstructorParams(){return{inputProblem:this.inputProblem}}addMspConnectionPair(t){this.mspConnectionPairIds.has(t.mspPairId)||(this.mspConnectionPairIds.add(t.mspPairId),this.mspConnectionPairs.push(t))}_step(){if(this.queuedDcNetIds.length===0){this.solved=!0;return}const t=this.queuedDcNetIds.shift(),n=this.globalConnMap.getIdsConnectedToNet(t).filter(A=\u003e!!this.pinMap[A]);if(n.length\u003c=1)return;if(n.length===2){const[A,c]=n,l=this.pinMap[A],u=this.pinMap[c];if(!this.canRouteGroundPair(A,c))return;const g=AQt([A,c]);let h=Math.abs(l.x-u.x)+Math.abs(l.y-u.y);this.directConnectionPinPairKeys.has(g)\u0026\u0026(h=ad(l,u));const d=oQt({inputProblem:this.inputProblem,chipMap:this.chipMap,pins:[l,u]});if(h\u003ethis.maxMspPairDistance\u0026\u0026!this.parallelRailPairKeys.has(_le(A,c))\u0026\u0026!d||Zv(this.inputProblem,l,u))return;const p=new Map(Object.entries(this.pinMap));if(lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:p,p1:l,p2:u}))return;const m=this.globalConnMap.getNetConnectedToId(A),_=this.userNetIdByPinId[A]??this.userNetIdByPinId[c],f=h\u003ethis.maxMspPairDistance\u0026\u0026d===\"overlapping-fallback-labels\";this.addMspConnectionPair({mspPairId:`${A}-${c}`,dcConnNetId:t,globalConnNetId:m,userNetId:_,suppressNetLabel:f,pins:[l,u]});return}const o=new Map(Object.entries(this.pinMap)),i=this.userNetIdByPinId[n[0]],r=this.inputProblem.netConnections.find(A=\u003eA.netId===i),s=n.map(A=\u003ethis.pinMap[A]),a=HIo(s,{forbidEdge:(A,c)=\u003eMath.abs(A.x-c.x)+Math.abs(A.y-c.y)\u003ethis.maxMspPairDistance\u0026\u0026!this.parallelRailPairKeys.has(_le(A.pinId,c.pinId))||!this.canRouteGroundPair(A.pinId,c.pinId)||UIo({netConnection:r,netPins:s,pin1:A,pin2:c})||Zv(this.inputProblem,A,c)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:o,p1:A,p2:c})});for(let[A,c]of a){this.parallelRailPairKeys.has(_le(A,c))\u0026\u0026Math.abs(this.pinMap[A].x-this.pinMap[c].x)+Math.abs(this.pinMap[A].y-this.pinMap[c].y)\u003ethis.maxMspPairDistance\u0026\u0026n.indexOf(A)\u003en.indexOf(c)\u0026\u0026([A,c]=[c,A]);const l=this.pinMap[A],u=this.pinMap[c];if(Zv(this.inputProblem,l,u)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:o,p1:l,p2:u}))continue;const g=this.globalConnMap.getNetConnectedToId(A),h=this.userNetIdByPinId[A]??this.userNetIdByPinId[c];this.addMspConnectionPair({mspPairId:`${A}-${c}`,dcConnNetId:t,globalConnNetId:g,userNetId:h,pins:[l,u]})}}visualize(){const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});for(const e of this.mspConnectionPairs)t.lines.push({points:[{x:e.pins[0].x,y:e.pins[0].y},{x:e.pins[1].x,y:e.pins[1].y}],strokeColor:Mc(e.mspPairId,.75)});return t}},cQt=(t,e)=\u003e{const n=t.find(o=\u003eo?.netLabelWidth!==void 0)?.netLabelWidth;return n!==void 0||!e?n:t.find(o=\u003eo?.anchoredNetLabelWidth!==void 0)?.anchoredNetLabelWidth},L7=({inputProblem:t,netId:e,pinIds:n,isPortOnlyLabel:o})=\u003e{if(e){const i=cQt([t.netConnections.find(r=\u003er.netId===e),t.directConnections.find(r=\u003er.netId===e)],o);if(i!==void 0)return i}return cQt([t.directConnections.find(i=\u003ei.pinIds.some(r=\u003en.includes(r))),t.netConnections.find(i=\u003ei.pinIds.some(r=\u003en.includes(r)))],o)};function fB(t,e={}){return{minX:t.center.x-t.width/2-(e.minX??0),minY:t.center.y-t.height/2-(e.minY??0),maxX:t.center.x+t.width/2+(e.maxX??0),maxY:t.center.y+t.height/2+(e.maxY??0)}}function Dc(t,e,n=1e-9){return t.minX\u003ce.maxX-n\u0026\u0026t.maxX\u003ee.minX+n\u0026\u0026t.minY\u003ce.maxY-n\u0026\u0026t.maxY\u003ee.minY+n}function KH(t,e){for(const n of e.textBoxes??[])if(Dc(t,fB(n)))return!0;return!1}var lQt=.15,gj=lQt/7.5,zIo=.2;function fle(t,e){return e.x\u003et.x?\"x+\":e.x\u003ct.x?\"x-\":e.y\u003et.y?\"y+\":e.y\u003ct.y?\"y-\":null}function Pve({path:t,pin1:e,pin2:n}){const o=fle(t[0],t[1]),i=fle(t[t.length-1],t[t.length-2]);return o===e._facingDirection\u0026\u0026i===n._facingDirection}function JIo(t,e){if(t.x===e.x||t.y===e.y)return null;const n=t._facingDirection,o=e._facingDirection,i={x:t.x,y:t.y},r={x:e.x,y:e.y};let s=null;if(n?.startsWith(\"y\")\u0026\u0026o?.startsWith(\"x\")){let a=-gj;n===\"y+\"\u0026\u0026(a=gj);const A=i.y+a,c=(i.x+r.x)/2;s=[i,{x:i.x,y:A},{x:c,y:A},{x:c,y:r.y},r]}else if(n?.startsWith(\"x\")\u0026\u0026o?.startsWith(\"y\")){let a=-gj;n===\"x+\"\u0026\u0026(a=gj);const A=i.x+a,c=(i.y+r.y)/2;s=[i,{x:A,y:i.y},{x:A,y:c},{x:r.x,y:c},r]}return s\u0026\u0026Pve({path:s,pin1:t,pin2:e})?s:null}function WIo(t,e){const n=Math.abs(t.x-e.x)+Math.abs(t.y-e.y);if(n\u003elQt)return null;const o={x:t.x,y:t.y},i={x:e.x,y:e.y},r=JIo(t,e);if(r)return r;let s=[];t.x!==e.x\u0026\u0026t.y!==e.y?s=[[o,{x:e.x,y:t.y},i],[o,{x:t.x,y:e.y},i]]:s=[[o,i]];for(const a of s)if(Pve({path:a,pin1:t,pin2:e}))return a;return wF({x:t.x,y:t.y,facingDirection:t._facingDirection},{x:e.x,y:e.y,facingDirection:e._facingDirection},{overshoot:Math.min(zIo,Math.max(gj,n/4))})}var Ile=1e-9,e1=(t,e,n=Ile)=\u003eMath.abs(t.x-e.x)\u003cn,X_=(t,e,n=Ile)=\u003eMath.abs(t.y-e.y)\u003cn,CC=(t,e,n,o=Ile)=\u003e{const i=e1(t,e,o),r=X_(t,e,o);if(!i\u0026\u0026!r)return!1;if(i){const s=t.x;if(s\u003cn.minX-o||s\u003en.maxX+o)return!1;const a=Math.min(t.y,e.y),A=Math.max(t.y,e.y);return Math.min(A,n.maxY)-Math.max(a,n.minY)\u003eo}else{const s=t.y;if(s\u003cn.minY-o||s\u003en.maxY+o)return!1;const a=Math.min(t.x,e.x),A=Math.max(t.x,e.x);return Math.min(A,n.maxX)-Math.max(a,n.minX)\u003eo}},Mve=(t,e,n,o=Ile)=\u003ee1(t,e,o)?Math.abs(t.x-n.minX)\u003c=o||Math.abs(t.x-n.maxX)\u003c=o?Math.min(Math.max(t.y,e.y),n.maxY)-Math.max(Math.min(t.y,e.y),n.minY)\u003eo:!1:X_(t,e,o)\u0026\u0026(Math.abs(t.y-n.minY)\u003c=o||Math.abs(t.y-n.maxY)\u003c=o)?Math.min(Math.max(t.x,e.x),n.maxX)-Math.max(Math.min(t.x,e.x),n.minX)\u003eo:!1,HN=(t,e,n={})=\u003e{for(let o=0;o\u003ct.length-1;o++){const i=t[o],r=t[o+1],s=n.excludeRectsForSegment?.(o)??new Set;for(const a of e)if(!s.has(a)\u0026\u0026CC(i,r,a))return{segIndex:o,rect:a}}return null},ON=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++)for(const o of e)if(CC(t[n],t[n+1],o))return!0;return!1},uQt=1e-9,ew=.2,jIo=(t,e)=\u003e({minX:Math.min(t.x,e.x),maxX:Math.max(t.x,e.x),minY:Math.min(t.y,e.y),maxY:Math.max(t.y,e.y)}),tw=(t,e,n,o=uQt)=\u003et===\"x\"?e.x\u003cn.minX-o?[(e.x+n.minX)/2]:e.x\u003en.maxX+o?[(e.x+n.maxX)/2]:[n.minX-ew,n.maxX+ew]:e.y\u003cn.minY-o?[(e.y+n.minY)/2]:e.y\u003en.maxY+o?[(e.y+n.maxY)/2]:[n.minY-ew,n.maxY+ew],gQt=(t,e,n,o,i={})=\u003e{const{allowOpenSideCandidates:r=!1,eps:s=uQt}=i,a=[...n];if(t===\"x\"){const A=[o.minX,...a.map(h=\u003eh.maxX)].filter(h=\u003eh\u003ce.minX-s),c=[o.maxX,...a.map(h=\u003eh.minX)].filter(h=\u003eh\u003ee.maxX+s),l=A.length\u003e0?Math.max(...A):void 0,u=c.length\u003e0?Math.min(...c):void 0,g=[];return l!==void 0?g.push((l+e.minX)/2):r\u0026\u0026g.push(e.minX-ew),u!==void 0?g.push((e.maxX+u)/2):r\u0026\u0026g.push(e.maxX+ew),g}else{const A=[o.minY,...a.map(h=\u003eh.maxY)].filter(h=\u003eh\u003ce.minY-s),c=[o.maxY,...a.map(h=\u003eh.minY)].filter(h=\u003eh\u003ee.maxY+s),l=A.length\u003e0?Math.max(...A):void 0,u=c.length\u003e0?Math.min(...c):void 0,g=[];return l!==void 0?g.push((l+e.minY)/2):r\u0026\u0026g.push(e.minY-ew),u!==void 0?g.push((e.maxY+u)/2):r\u0026\u0026g.push(e.maxY+ew),g}},$Io=1e-9,dQt=t=\u003et.every((e,n)=\u003e{const o=t[n+1];return o?!X_(e,o)\u0026\u0026!e1(e,o)?!1:Math.abs(e.x-o.x)+Math.abs(e.y-o.y)\u003e0:!0}),Dve=(t,e,n,o,i=$Io)=\u003e{if(e\u003c0||e\u003e=t.length-1)return null;const r=t[e],s=t[e+1],a=e1(r,s,i),A=X_(r,s,i);if(!a\u0026\u0026!A||a\u0026\u0026n!==\"x\"||A\u0026\u0026n!==\"y\")return null;const c=t.map(l=\u003e({...l}));if(n===\"x\"){if(Math.abs(r.x-o)\u003ci\u0026\u0026Math.abs(s.x-o)\u003ci)return null;c[e]={...c[e],x:o},c[e+1]={...c[e+1],x:o}}else{if(Math.abs(r.y-o)\u003ci\u0026\u0026Math.abs(s.y-o)\u003ci)return null;c[e]={...c[e],y:o},c[e+1]={...c[e+1],y:o}}if(e-1\u003e=0){const l=c[e-1],u=c[e];if(Math.abs(l.x-u.x)+Math.abs(l.y-u.y)\u003ci)return null}if(e+2\u003c=c.length-1){const l=c[e+1],u=c[e+2];if(Math.abs(l.x-u.x)+Math.abs(l.y-u.y)\u003ci)return null}for(let l=0;l\u003cc.length-1;l++){const u=c[l],g=c[l+1];if(!X_(u,g,i)\u0026\u0026!e1(u,g,i))return null}return c},Nve=(t,e=6)=\u003et.map(o=\u003e`${o.x.toFixed(e)},${o.y.toFixed(e)}`).join(\"|\"),hQt=(t,e)=\u003ee1(t,e)?\"x\":X_(t,e)?\"y\":null,qIo=({path:t,collidingSegmentIndex:e,obstacle:n})=\u003e{if(t.length\u003c3||t.length\u003e4)return[];const o=t.length-2;if(e!==0\u0026\u0026e!==o)return[];const i=e===o,r=i?[...t].reverse():t,[s,a,A]=r,c=hQt(s,a),l=hQt(a,A);if(!c||!l)return[];if(c===l)return[];const u=[...tw(l,s,n),...tw(l,A,n)],g=[...tw(c,s,n),...tw(c,A,n)],h=[];for(const d of[...new Set(u)])for(const p of[...new Set(g)]){const _=[...c===\"y\"?[s,{x:d,y:s.y},{x:d,y:p},{x:A.x,y:p},A]:[s,{x:s.x,y:d},{x:p,y:d},{x:p,y:A.y},A],...r.slice(3)],f=i?_.reverse():_;dQt(f)\u0026\u0026h.push(f)}return h},pQt=1e-9,XIo=.2,Cle=(t,e,n)=\u003et\u003eMath.min(e,n)+pQt\u0026\u0026t\u003cMath.max(e,n)-pQt,ZIo=({path:t,collidingSegmentIndex:e,obstacle:n,clearance:o=XIo})=\u003e{if(e\u003c=0||e\u003e=t.length-2)return[];const i=t[e],r=t[e+1],s=[];if(X_(i,r)){const a=i.x\u003cr.x,A=a?n.minX-o:n.maxX+o,c=a?n.maxX+o:n.minX-o;if(!Cle(A,i.x,r.x)||!Cle(c,i.x,r.x))return[];for(const l of[n.minY-o,n.maxY+o])s.push([{x:A,y:i.y},{x:A,y:l},{x:c,y:l},{x:c,y:r.y}])}else if(e1(i,r)){const a=i.y\u003cr.y,A=a?n.minY-o:n.maxY+o,c=a?n.maxY+o:n.minY-o;if(!Cle(A,i.y,r.y)||!Cle(c,i.y,r.y))return[];for(const l of[n.minX-o,n.maxX+o])s.push([{x:i.x,y:A},{x:l,y:A},{x:l,y:c},{x:r.x,y:c}])}return s.map(a=\u003e[...t.slice(0,e+1),...a,...t.slice(e+1)]).filter(dQt)};function Rve(t){const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,maxX:t.center.x+e,minY:t.center.y-n,maxY:t.center.y+n}}var eCo=.05,mQt=t=\u003et.kind===\"text_box\",tCo=t=\u003e{const e=Rve(t);return{kind:\"chip\",chipId:t.chipId,...e}},Hy=(t,e={})=\u003e{const n=t.chips.map(tCo),o=(t.textBoxes??[]).map(i=\u003e{const r=fB(i,e.textBoxPadding),s=n.find(c=\u003ec.chipId===i.chipId),a=s?EV(r,s):Number.POSITIVE_INFINITY,A=s\u0026\u0026a\u003e0\u0026\u0026a\u003ceCo?{minX:Math.min(r.minX,s.maxX),maxX:Math.max(r.maxX,s.minX),minY:Math.min(r.minY,s.maxY),maxY:Math.max(r.maxY,s.minY)}:r;return{kind:\"text_box\",textBox:i,...A}});return[...n,...o]},_Qt=({pin1:t,pin2:e,overshoot:n})=\u003ewF({x:t.x,y:t.y,facingDirection:t._facingDirection},{x:e.x,y:e.y,facingDirection:e._facingDirection},{overshoot:n}),nCo=({pin1:t,pin2:e})=\u003e{const n=e.x-t.x,o=e.y-t.y;return Math.abs(n)\u003e=Math.abs(o)?n\u003e0?t._facingDirection===\"x+\"\u0026\u0026e._facingDirection===\"x-\":t._facingDirection===\"x-\"\u0026\u0026e._facingDirection===\"x+\":o\u003e0?t._facingDirection===\"y+\"\u0026\u0026e._facingDirection===\"y-\":t._facingDirection===\"y-\"\u0026\u0026e._facingDirection===\"y+\"},dj=t=\u003e{let e=0;for(let n=0;n\u003ct.length-1;n++)e+=Math.abs(t[n+1].x-t[n].x)+Math.abs(t[n+1].y-t[n].y);return e},oCo=({pins:t,obstacles:e})=\u003e{const[n,o]=t,i=WIo(n,o),r=_Qt({pin1:n,pin2:o,overshoot:.2}),s=Math.abs(n.x-o.x)+Math.abs(n.y-o.y),a=_Qt({pin1:n,pin2:o,overshoot:Math.min(.2,Math.max(.02,s/4))}),A=dj(a)\u003cdj(r),c=dj(r)\u003es+1e-9,l=HN(a,e)===null\u0026\u0026(nCo({pin1:n,pin2:o})\u0026\u0026c\u0026\u0026A||HN(r,e)!==null);return{path:i??(l?a:r),isDirectShortPath:i!==null}},VH=class extends Ng{pins;connectionPair;inputProblem;chipMap;obstacles;textObstacles;endpointTextObstacles;aabb;baseElbow;preferExteriorDetours;reserveNetLabelClearance;solvedTracePath=null;queue=[];visited=new Set;inferredPinIndexes=new Set;hasAmbiguousPinDirections=!1;constructor(t){super(),this.pins=t.pins,this.connectionPair=t.connectionPair,this.inputProblem=t.inputProblem,this.chipMap=t.chipMap,this.preferExteriorDetours=t.preferExteriorDetours??!0,this.reserveNetLabelClearance=t.reserveNetLabelClearance??!0,this.obstacles=Hy(this.inputProblem,{textBoxPadding:this.reserveNetLabelClearance?this.getTextBoxPaddingForConnectionPair():void 0}),this.textObstacles=new Set(this.obstacles.filter(mQt));const e=new Set(this.pins.map(A=\u003eA.chipId));this.endpointTextObstacles=new Set(this.obstacles.filter(mQt).filter(A=\u003eA.textBox.chipId!==void 0\u0026\u0026e.has(A.textBox.chipId)));const n=this.pins.map((A,c)=\u003e{if(A._facingDirection)return[A._facingDirection];this.inferredPinIndexes.add(c);const l=this.pins[c===0?1:0];return vve(A,this.chipMap[A.chipId],l)}),o=n[0].flatMap((A,c)=\u003en[1].map((l,u)=\u003e({directions:[A,l],preferenceIndex:c+u})));this.hasAmbiguousPinDirections=n.some(A=\u003eA.length\u003e1);const i=o.map(({directions:A,preferenceIndex:c})=\u003e{const l=this.pins.map((g,h)=\u003e({...g,_facingDirection:A[h]})),u=oCo({pins:l,obstacles:this.obstacles});return{directions:A,baseElbow:u.path,isDirectShortPath:u.isDirectShortPath,preferenceIndex:c,collisionCount:HN(u.path,this.obstacles)===null?0:1,pathLength:dj(u.path)}}).sort((A,c)=\u003eA.collisionCount-c.collisionCount||A.pathLength-c.pathLength||A.preferenceIndex-c.preferenceIndex),r=i[0];for(const[A,c]of this.pins.entries())c._facingDirection=r.directions[A];const[s,a]=this.pins;this.baseElbow=r.baseElbow,r.isDirectShortPath\u0026\u0026(this.solvedTracePath=r.baseElbow),this.aabb=jIo({x:s.x,y:s.y},{x:a.x,y:a.y});for(const A of i){const c=Nve(A.baseElbow);this.visited.has(c)||(this.visited.add(c),this.queue.push({path:A.baseElbow,collisionRects:new Set,directions:A.directions}))}}getConstructorParams(){return{chipMap:this.chipMap,pins:this.pins,connectionPair:this.connectionPair,inputProblem:this.inputProblem,preferExteriorDetours:this.preferExteriorDetours,reserveNetLabelClearance:this.reserveNetLabelClearance}}getTextBoxPaddingForConnectionPair(){if(!this.inputProblem.textBoxes?.length)return{};const t=this.connectionPair?.userNetId;if(!t)return{};const e=this.inputProblem.availableNetLabelOrientations[t]??[\"x+\",\"x-\",\"y+\",\"y-\"],n=L7({inputProblem:this.inputProblem,netId:t,pinIds:this.pins.map(r=\u003er.pinId),isPortOnlyLabel:!1}),o=this.getNetLabelHeightForConnectionPair(t),i={minX:0,minY:0,maxX:0,maxY:0};for(const r of e){const{width:s,height:a}=_B({orientation:r,netLabelWidth:n,netLabelHeight:o});r===\"y+\"||r===\"y-\"?(i.minX=Math.max(i.minX,s/2),i.maxX=Math.max(i.maxX,s/2),r===\"y+\"?i.minY=Math.max(i.minY,a):i.maxY=Math.max(i.maxY,a)):(i.minY=Math.max(i.minY,a/2),i.maxY=Math.max(i.maxY,a/2),r===\"x+\"?i.minX=Math.max(i.minX,s):i.maxX=Math.max(i.maxX,s))}return i}getNetLabelHeightForConnectionPair(t){const e=this.inputProblem.netConnections.find(o=\u003eo.netId===t)?.netLabelHeight;if(e!==void 0)return e;const n=this.pins.map(o=\u003eo.pinId);return this.inputProblem.netConnections.find(o=\u003eo.pinIds.some(i=\u003en.includes(i)))?.netLabelHeight}axisOfSegment(t,e){return e1(t,e)?\"x\":X_(t,e)?\"y\":null}pathLength(t){return dj(t)}getPinBandPenalty(t){let e=0;for(let n=1;n\u003ct.length-2;n++){const o=t[n],i=t[n+1];(X_(o,i)\u0026\u0026o.y\u003ethis.aabb.minY\u0026\u0026o.y\u003cthis.aabb.maxY||e1(o,i)\u0026\u0026o.x\u003ethis.aabb.minX\u0026\u0026o.x\u003cthis.aabb.maxX)\u0026\u0026(e+=10)}return e}isSegmentOutsidePinBand(t,e){return X_(t,e)?t.y\u003c=this.aabb.minY||t.y\u003e=this.aabb.maxY:e1(t,e)?t.x\u003c=this.aabb.minX||t.x\u003e=this.aabb.maxX:!1}_step(){if(this.solvedTracePath){this.solved=!0;return}const t=this.queue.shift();if(!t){this.failed=!0,this.error=\"No collision-free path found\";return}const{path:e,collisionRects:n,directions:o}=t,[i,r]=this.pins,s=HN(e,this.obstacles,{excludeRectsForSegment:B=\u003e{const S=e.length-2,Q=new Set,w=e[B],M=e[B+1],k=B===0?r:B===S?i:null;if(k)for(const U of this.textObstacles){const Y=fB(U.textBox);(U.textBox.chipId!==k.chipId||!CC(w,M,Y))\u0026\u0026Q.add(U)}const R=1e-9,F=U=\u003e[w,M].some(Y=\u003eMath.abs(Y.x-U.x)\u003c=R\u0026\u0026Math.abs(Y.y-U.y)\u003c=R);for(const U of this.pins){if(!F(U))continue;const Y=this.obstacles.find(W=\u003eW.kind===\"chip\"\u0026\u0026W.chipId===U.chipId);Y\u0026\u0026Mve(w,M,Y)\u0026\u0026Q.add(Y)}const O=B===1?2:B===S-1?S-2:null;if(O!==null\u0026\u0026O\u003e=0\u0026\u0026O\u003cS\u0026\u0026this.isSegmentOutsidePinBand(e[O],e[O+1]))for(const U of this.endpointTextObstacles){const Y=fB(U.textBox);CC(w,M,Y)||Q.add(U)}return Q}});if(!s){const B=e[0],S=e[e.length-1],Q=1e-9,w=(M,k)=\u003eMath.abs(M.x-k.x)\u003cQ\u0026\u0026Math.abs(M.y-k.y)\u003cQ;if(w(B,{x:i.x,y:i.y})\u0026\u0026w(S,{x:r.x,y:r.y})\u0026\u0026(!this.hasAmbiguousPinDirections||Pve({path:e,pin1:{...i,_facingDirection:o[0]},pin2:{...r,_facingDirection:o[1]}}))){for(const M of this.inferredPinIndexes){const k=M===0?fle(e[0],e[1]):fle(e.at(-1),e.at(-2));k\u0026\u0026(this.pins[M]._facingDirection=k)}this.solvedTracePath=e,this.solved=!0}return}const a=s.segIndex;let{segIndex:A,rect:c}=s;const l=A===0,u=A===e.length-2,g=c.kind===\"chip\"\u0026\u0026this.pins.some(B=\u003eB.chipId===c.chipId);if((e.length===3||e.length===4\u0026\u0026this.connectionPair!==void 0\u0026\u0026!g)\u0026\u0026(l||u)){const B=qIo({path:e,collidingSegmentIndex:A,obstacle:c}).filter(S=\u003e{const Q=Nve(S);return this.visited.has(Q)?!1:(this.visited.add(Q),!0)}).sort((S,Q)=\u003ee.length===4\u0026\u0026this.preferExteriorDetours?this.getPinBandPenalty(S)-this.getPinBandPenalty(Q)||this.pathLength(S)-this.pathLength(Q):this.pathLength(S)-this.pathLength(Q)||this.getPinBandPenalty(S)-this.getPinBandPenalty(Q));for(const S of B){const Q=new Set(n);Q.add(c),this.queue.push({path:S,collisionRects:Q,directions:o})}return}if(l){if(e.length\u003c3)return;A=1}else if(u){if(e.length\u003c3)return;A=e.length-3}const d=e[A],p=e[A+1],m=this.axisOfSegment(d,p);if(!m)return;const _=[],f={allowOpenSideCandidates:this.connectionPair!==void 0};if(n.size===0){const B=tw(m,{x:i.x,y:i.y},c),S=tw(m,{x:r.x,y:r.y},c),Q=[...B,...S],w=[...new Set(Q)];_.push(...w)}else{const B=gQt(m,c,n,this.aabb,f);_.push(...B)}const I=[],C=B=\u003e{const S=Nve(B);if(this.visited.has(S))return;this.visited.add(S);const Q=new Set(n);Q.add(c),I.push({path:B,collisionRects:Q,length:this.pathLength(B),pinBandPenalty:this.getPinBandPenalty(B)})},y=(B,S,Q)=\u003e{const w=Dve(e,B,S,Q);w\u0026\u0026C(w)},x=e.length-2;if(this.connectionPair===void 0\u0026\u0026c.kind===\"text_box\"\u0026\u0026this.endpointTextObstacles.has(c)\u0026\u0026!n.has(c)\u0026\u0026a\u003e0\u0026\u0026a\u003cx)for(const B of ZIo({path:e,collidingSegmentIndex:a,obstacle:c}))C(B);for(const B of _)y(A,m,B);const E=a===1?[2]:a===x-1?[x-2]:[];for(const B of E){if(B\u003c0||B\u003e=x)continue;const S=this.axisOfSegment(e[B],e[B+1]);if(!S||S===m)continue;const Q=[...tw(S,{x:i.x,y:i.y},c),...tw(S,{x:r.x,y:r.y},c)];n.size\u003e0\u0026\u0026Q.push(...gQt(S,c,n,this.aabb,f));for(const w of[...new Set(Q)])y(B,S,w)}I.sort((B,S)=\u003eB.length-S.length||B.pinBandPenalty-S.pinBandPenalty);for(const B of I)this.queue.push({path:B.path,collisionRects:B.collisionRects,directions:o})}visualize(){const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});t.lines.push({points:this.baseElbow,strokeColor:\"red\",strokeDash:\"4 4\"});const[e,n]=this.pins;t.lines.push({points:[{x:e.x,y:e.y},{x:n.x,y:n.y}],strokeColor:\"blue\",strokeDash:\"5 5\"});for(const{path:o}of this.queue)t.lines.push({points:o,strokeColor:\"teal\",strokeDash:\"2 2\"});return this.solvedTracePath?t.lines.push({points:this.solvedTracePath,strokeColor:\"green\"}):this.queue.length\u003e0\u0026\u0026t.lines.push({points:this.queue[0].path,strokeColor:\"orange\"}),t}},fQt=({connectionPair:t,allConnectionPairs:e,inputProblem:n})=\u003e{const[o,i]=t.pins;return n.netConnections.some(s=\u003es.pinIds.includes(o.pinId)\u0026\u0026s.pinIds.includes(i.pinId))?!0:e.some(s=\u003e{if(s===t)return!1;const[a,A]=s.pins;return o.chipId===a.chipId\u0026\u0026i.chipId===A.chipId?!0:o.chipId===A.chipId\u0026\u0026i.chipId===a.chipId})},iCo=class extends Ng{inputProblem;mspConnectionPairs;dcConnMap;globalConnMap;queuedConnectionPairs;chipMap;currentConnectionPair=null;retryingWithoutNetLabelClearance=!1;solvedTracePaths=[];failedConnectionPairs=[];constructor(t){super(),this.inputProblem=t.inputProblem,this.mspConnectionPairs=t.mspConnectionPairs,this.dcConnMap=t.dcConnMap,this.globalConnMap=t.globalConnMap,this.chipMap=t.chipMap,this.queuedConnectionPairs=[...this.mspConnectionPairs]}getConstructorParams(){return{inputProblem:this.inputProblem,chipMap:this.chipMap,mspConnectionPairs:this.mspConnectionPairs,dcConnMap:this.dcConnMap,globalConnMap:this.globalConnMap}}_step(){if(this.activeSubSolver?.solved\u0026\u0026(this.solvedTracePaths.push({...this.currentConnectionPair,pins:this.activeSubSolver.pins,tracePath:this.activeSubSolver.solvedTracePath,mspConnectionPairIds:[this.currentConnectionPair.mspPairId],pinIds:[this.currentConnectionPair.pins[0].pinId,this.currentConnectionPair.pins[1].pinId]}),this.activeSubSolver=null,this.currentConnectionPair=null,this.retryingWithoutNetLabelClearance=!1),this.activeSubSolver?.failed){if(this.currentConnectionPair\u0026\u0026!this.retryingWithoutNetLabelClearance\u0026\u0026this.activeSubSolver.hasAmbiguousPinDirections){const o=this.currentConnectionPair;this.retryingWithoutNetLabelClearance=!0,this.activeSubSolver=new VH({inputProblem:this.inputProblem,pins:o.pins.map(i=\u003e({...i})),connectionPair:o,chipMap:this.chipMap,preferExteriorDetours:fQt({connectionPair:o,allConnectionPairs:this.mspConnectionPairs,inputProblem:this.inputProblem}),reserveNetLabelClearance:!1});return}this.currentConnectionPair\u0026\u0026this.failedConnectionPairs.push({...this.currentConnectionPair,error:this.activeSubSolver.error||void 0}),this.activeSubSolver=null,this.currentConnectionPair=null,this.retryingWithoutNetLabelClearance=!1}if(this.activeSubSolver){this.activeSubSolver.step();return}const t=this.queuedConnectionPairs.shift();if(!t){this.solved=!0;return}this.currentConnectionPair=t,this.retryingWithoutNetLabelClearance=!1;const n=t.pins.some(o=\u003e{if(o._facingDirection)return!1;const i=this.chipMap[o.chipId];return i\u0026\u0026vve(o,i).length\u003e1})?t.pins.map(o=\u003e({...o})):t.pins;this.activeSubSolver=new VH({inputProblem:this.inputProblem,pins:n,connectionPair:t,chipMap:this.chipMap,preferExteriorDetours:fQt({connectionPair:t,allConnectionPairs:this.mspConnectionPairs,inputProblem:this.inputProblem})})}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});for(const{mspPairId:e,tracePath:n}of this.solvedTracePaths)t.lines.push({points:n,strokeColor:\"green\"});for(const e of this.failedConnectionPairs)t.lines.push({points:[{x:e.pins[0].x,y:e.pins[0].y},{x:e.pins[1].x,y:e.pins[1].y}],strokeColor:\"red\",strokeDash:\"4 2\"});return t}},rCo=({pts:t,segmentIndex:e,offset:n,JOG_SIZE:o,EPS:i=1e-6})=\u003e{if(e!==0\u0026\u0026e!==t.length-2)return;const r=t[e],s=t[e+1],a=Math.abs(r.x-s.x)\u003ci,A=Math.abs(r.y-s.y)\u003ci;if(!a\u0026\u0026!A)return;const c=a?s.y\u003er.y?1:-1:s.x\u003er.x?1:-1;if(t.length===2){if(a){const l=r.y+c*o,u=s.y-c*o;t.splice(1,0,{x:r.x,y:l},{x:r.x+n,y:l},{x:s.x+n,y:u},{x:s.x,y:u})}else{const l=r.x+c*o,u=s.x-c*o;t.splice(1,0,{x:l,y:r.y},{x:l,y:r.y+n},{x:u,y:s.y+n},{x:u,y:s.y})}return}if(e===0)if(a){const l=r.y+c*o;t.splice(1,1,{x:r.x,y:l},{x:r.x+n,y:l},{x:s.x+n,y:s.y})}else{const l=r.x+c*o;t.splice(1,1,{x:l,y:r.y},{x:l,y:r.y+n},{x:s.x,y:s.y+n})}else if(a){const l=s.y-c*o;t.splice(e,1,{x:r.x+n,y:r.y},{x:s.x+n,y:l},{x:s.x,y:l})}else{const l=s.x-c*o;t.splice(e,1,{x:r.x,y:r.y+n},{x:l,y:s.y+n},{x:l,y:s.y})}},H7=1e-6,sCo=class extends Ng{overlappingTraceSegments;interactionKind;traceNetIslands;traceIdsToShift;obstacleRects;SHIFT_DISTANCE=.1;correctedTraceMap={};constructor(t){super(),this.overlappingTraceSegments=t.overlappingTraceSegments,this.interactionKind=t.interactionKind,this.traceNetIslands=t.traceNetIslands,this.traceIdsToShift=t.traceIdsToShift,this.obstacleRects=Hy(t.inputProblem);for(const{connNetId:e,pathsWithOverlap:n}of this.overlappingTraceSegments)for(const{solvedTracePathIndex:o,traceSegmentIndex:i}of n){const r=this.traceNetIslands[e][o].mspPairId;this.correctedTraceMap[r]=this.traceNetIslands[e][o]}}_step(){const t=A=\u003eA.pathsWithOverlap.some(({solvedTracePathIndex:c})=\u003ethis.traceNetIslands[A.connNetId][c].tracePath.length===2),e=this.overlappingTraceSegments.map(A=\u003ethis.traceIdsToShift?A.pathsWithOverlap.every(({solvedTracePathIndex:c})=\u003e{const l=this.traceNetIslands[A.connNetId][c];return!this.traceIdsToShift.has(l.mspPairId)}):t(A)),n=e.some(A=\u003e!A),o=A=\u003ethis.overlappingTraceSegments.map((c,l)=\u003e{if(n\u0026\u0026e[l])return 0;const u=Math.floor(l/2)+1,g=l%2===0?A:-A;return this.getObstacleAwareOffset({group:c,offset:g*u*this.SHIFT_DISTANCE})}),i=o(-1);if(this.interactionKind===\"overlap\"\u0026\u0026this.overlappingTraceSegments.some(A=\u003eA.pathsWithOverlap.length\u003e1)){this.correctedTraceMap=this.applyOffsets(i),this.solved=!0;return}const s=this.interactionKind===\"overlap\"?[i,o(1)]:[];if(this.interactionKind===\"point_contact\"){const A=this.overlappingTraceSegments.map((c,l)=\u003el).filter(c=\u003e!n||!e[c]).reverse();for(const c of A){const l=this.overlappingTraceSegments[c];for(const u of[-1,1]){const g=this.overlappingTraceSegments.map(()=\u003e0);g[c]=this.getObstacleAwareOffset({group:l,offset:u*this.SHIFT_DISTANCE}),s.push(g)}}}const a=s.map(A=\u003e{const c=this.applyOffsets(A);return{correctedTraceMap:c,intersectionCount:this.countDifferentNetIntersections(c),totalDisplacement:A.reduce((l,u)=\u003el+Math.abs(u),0)}});a.sort((A,c)=\u003eA.intersectionCount-c.intersectionCount||A.totalDisplacement-c.totalDisplacement),this.correctedTraceMap=a[0].correctedTraceMap,this.solved=!0}applyOffsets(t){const e={...this.correctedTraceMap},n=(i,r)=\u003eMath.abs(i-r)\u003cH7,o=(i,r)=\u003e!!i\u0026\u0026!!r\u0026\u0026n(i.x,r.x)\u0026\u0026n(i.y,r.y);return this.overlappingTraceSegments.forEach((i,r)=\u003e{const s=t[r];if(s===0)return;const a=new Map;for(const A of i.pathsWithOverlap)a.has(A.solvedTracePathIndex)||a.set(A.solvedTracePathIndex,new Set),a.get(A.solvedTracePathIndex).add(A.traceSegmentIndex);for(const[A,c]of a){const l=this.traceNetIslands[i.connNetId][A],u=e[l.mspPairId]??l,g=u.tracePath.map(I=\u003e({...I})),h=Array.from(c).sort((I,C)=\u003eI-C).reverse(),d=new Map;for(const I of h){const C=g[I],y=g[I+1];!C||!y||(Math.abs(C.x-y.x)\u003cH7?d.set(I,\"vertical\"):Math.abs(C.y-y.y)\u003cH7\u0026\u0026d.set(I,\"horizontal\"))}const p=new Set,m=new Set,_=this.SHIFT_DISTANCE;for(const I of h)if(!(I\u003c0||I\u003e=g.length-1))if(I===0||I===g.length-2)rCo({pts:g,segmentIndex:I,offset:s,JOG_SIZE:_,EPS:H7});else{const C=g[I],y=g[I+1],x=d.get(I);x===\"vertical\"?(p.has(I)||(C.x+=s,p.add(I)),p.has(I+1)||(y.x+=s,p.add(I+1))):x===\"horizontal\"\u0026\u0026(m.has(I)||(C.y+=s,m.add(I)),m.has(I+1)||(y.y+=s,m.add(I+1)))}const f=[];for(const I of g)(f.length===0||!o(f[f.length-1],I))\u0026\u0026f.push(I);e[l.mspPairId]={...u,tracePath:f}}}),e}countDifferentNetIntersections(t){const e=Object.values(this.traceNetIslands).flatMap(o=\u003eo.map(i=\u003et[i.mspPairId]??i));let n=0;for(let o=0;o\u003ce.length;o++){const i=e[o];for(let r=o+1;r\u003ce.length;r++){const s=e[r];if(i.globalConnNetId!==s.globalConnNetId)for(let a=0;a\u003ci.tracePath.length-1;a++)for(let A=0;A\u003cs.tracePath.length-1;A++)X1(i.tracePath[a],i.tracePath[a+1],s.tracePath[A],s.tracePath[A+1])\u0026\u0026n++}}return n}getObstacleAwareOffset({group:t,offset:e}){const n=this.getBlockingCollisions({group:t,offset:e});if(n.length===0)return e;const o=a=\u003en.some(({start:A,isVertical:c,obstacle:l})=\u003e{let u,g,h;c?(u=A.x,g=l.minX,h=l.maxX):(u=A.y,g=l.minY,h=l.maxY);const d=u+a;return u\u003c=g+H7\u0026\u0026d\u003e=h-H7||u\u003e=h-H7\u0026\u0026d\u003c=g+H7}),i=n.map(({start:a,isVertical:A,obstacle:c})=\u003eA?{coord:a.x,lowEdge:c.minX,highEdge:c.maxX}:{coord:a.y,lowEdge:c.minY,highEdge:c.maxY}),r=a=\u003ei.flatMap(({coord:c,lowEdge:l,highEdge:u})=\u003e[l-c-a,u-c+a]).filter(c=\u003e!o(c)).filter(c=\u003ethis.getBlockingCollisions({group:t,offset:c}).length===0).sort((c,l)=\u003eMath.abs(c-e)-Math.abs(l-e))[0],s=this.SHIFT_DISTANCE/10;return r(this.SHIFT_DISTANCE)??r(s)??e}getBlockingCollisions({group:t,offset:e}){const n=[];for(const{solvedTracePathIndex:o,traceSegmentIndex:i}of t.pathsWithOverlap){const r=this.traceNetIslands[t.connNetId][o],s=r.tracePath[i],a=r.tracePath[i+1];if(!s||!a)continue;const A=Math.abs(s.x-a.x)\u003cH7,c=Math.abs(s.y-a.y)\u003cH7;if(!A\u0026\u0026!c)continue;const l=A?[{...s,x:s.x+e},{...a,x:a.x+e}]:[{...s,y:s.y+e},{...a,y:a.y+e}],u=HN(l,this.obstacleRects);u\u0026\u0026n.push({start:s,isVertical:A,obstacle:u.rect})}return n}visualize(){const t={lines:[],points:[],rects:[],circles:[]};for(const e of this.overlappingTraceSegments)for(const{solvedTracePathIndex:n,traceSegmentIndex:o}of e.pathsWithOverlap){const i=this.traceNetIslands[e.connNetId][n],r=i.tracePath[o],s=i.tracePath[o+1];t.lines.push({points:[r,s],strokeColor:\"red\"})}for(const e of Object.values(this.correctedTraceMap))t.lines.push({points:e.tracePath,strokeColor:\"blue\",strokeDash:\"4 2\"});return t}},IQt=1e-6,CQt=class extends Ng{inputProblem;inputTracePaths;globalConnMap;traceIdsToShift;traceNetIslands={};correctedTraceMap={};recentTraceStates=[];cleanupPhase=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputTracePaths=t.inputTracePaths,this.globalConnMap=t.globalConnMap,this.traceIdsToShift=t.traceIdsToShift;for(const e of this.inputTracePaths){const{mspPairId:n}=e;this.correctedTraceMap[n]=e}this.rememberTraceState(this.correctedTraceMap),this.traceNetIslands=this.computeTraceNetIslands()}getConstructorParams(){return{inputProblem:this.inputProblem,inputTracePaths:this.inputTracePaths,globalConnMap:this.globalConnMap,traceIdsToShift:this.traceIdsToShift}}computeTraceNetIslands(){const t={};for(const e of this.inputTracePaths){const n=this.correctedTraceMap[e.mspPairId]??e,o=n.globalConnNetId;t[o]||(t[o]=[]),t[o].push(n)}return t}findNextOverlapIssue(){const e=Object.keys(this.traceNetIslands);for(let n=0;n\u003ce.length;n++)for(let o=n+1;o\u003ce.length;o++){const i=e[n],r=e[o],s=this.traceNetIslands[i]||[],a=this.traceNetIslands[r]||[],A=[],c=[],l=[],u=new Set,g=new Set,h=(m,_,f,I)=\u003e{const C=Math.min(m,_),y=Math.max(m,_),x=Math.min(f,I),E=Math.max(f,I);return Math.min(y,E)-Math.max(C,x)},d=({pathAIndex:m,segmentAIndex:_,pathBIndex:f,segmentBIndex:I,rangeOverlap:C})=\u003e{if(C\u003e.002){const M=`${m}:${_}`,k=`${f}:${I}`;u.has(M)||(A.push({solvedTracePathIndex:m,traceSegmentIndex:_}),u.add(M)),g.has(k)||(c.push({solvedTracePathIndex:f,traceSegmentIndex:I}),g.add(k));return}if(C\u003c-.002)return;const y=s[m].tracePath,x=a[f].tracePath,E=y[_],B=y[_+1],S=x[I],Q=x[I+1];_===0||_===y.length-2||I===0||I===x.length-2||l.push({pathAIndex:m,segmentAIndex:_,pathBIndex:f,segmentBIndex:I,combinedLength:Math.abs(E.x-B.x)+Math.abs(E.y-B.y)+Math.abs(S.x-Q.x)+Math.abs(S.y-Q.y)})};for(let m=0;m\u003cs.length;m++){const _=s[m],f=_.tracePath;for(let I=0;I\u003cf.length-1;I++){const C=f[I],y=f[I+1],x=Math.abs(C.x-y.x)\u003c.002,E=Math.abs(C.y-y.y)\u003c.002;if(!(!x\u0026\u0026!E))for(let B=0;B\u003ca.length;B++){const S=a[B];if(this.traceIdsToShift\u0026\u0026!this.traceIdsToShift.has(_.mspPairId)\u0026\u0026!this.traceIdsToShift.has(S.mspPairId))continue;const Q=S.tracePath;for(let w=0;w\u003cQ.length-1;w++){const M=Q[w],k=Q[w+1],R=Math.abs(M.x-k.x)\u003c.002,F=Math.abs(M.y-k.y)\u003c.002;!R\u0026\u0026!F||(x\u0026\u0026R?Math.abs(C.x-M.x)\u003c.002\u0026\u0026d({pathAIndex:m,segmentAIndex:I,pathBIndex:B,segmentBIndex:w,rangeOverlap:h(C.y,y.y,M.y,k.y)}):E\u0026\u0026F\u0026\u0026Math.abs(C.y-M.y)\u003c.002\u0026\u0026d({pathAIndex:m,segmentAIndex:I,pathBIndex:B,segmentBIndex:w,rangeOverlap:h(C.x,y.x,M.x,k.x)}))}}}}if(A.length\u003e0\u0026\u0026c.length\u003e0)return{interactionKind:\"overlap\",overlappingTraceSegments:[{connNetId:i,pathsWithOverlap:A},{connNetId:r,pathsWithOverlap:c}]};const p=l.sort((m,_)=\u003e_.combinedLength-m.combinedLength)[0];if(p)return{interactionKind:\"point_contact\",overlappingTraceSegments:[{connNetId:i,pathsWithOverlap:[{solvedTracePathIndex:p.pathAIndex,traceSegmentIndex:p.segmentAIndex}]},{connNetId:r,pathsWithOverlap:[{solvedTracePathIndex:p.pathBIndex,traceSegmentIndex:p.segmentBIndex}]}]}}return null}findNextDiagonalSegment(){for(const e in this.correctedTraceMap){const n=this.correctedTraceMap[e].tracePath;for(let o=0;o\u003cn.length-1;o++){const i=n[o],r=n[o+1],s=Math.abs(i.y-r.y)\u003c.002,a=Math.abs(i.x-r.x)\u003c.002;if(!s\u0026\u0026!a)return{mspPairId:e,tracePath:n,i:o,p1:i,p2:r}}}return null}findAndFixNextDiagonalSegment(){const t=this.findNextDiagonalSegment();if(!t)return!1;const{mspPairId:e,tracePath:n,i:o,p1:i,p2:r}=t,s=.002,a=o\u003e0?n[o-1]:null,A=o+2\u003cn.length?n[o+2]:null,c=a?Math.abs(a.x-i.x)\u003cs:!1,l=a?Math.abs(a.y-i.y)\u003cs:!1,u=A?Math.abs(r.x-A.x)\u003cs:!1,g=A?Math.abs(r.y-A.y)\u003cs:!1,h={x:i.x,y:r.y},d={x:r.x,y:i.y};let p=0;c\u0026\u0026p++,g\u0026\u0026p++;let m=0;l\u0026\u0026m++,u\u0026\u0026m++;const _=p\u003cm?h:d;return n.splice(o+1,0,_),!0}_step(){if(this.activeSubSolver?.solved){const o={...this.correctedTraceMap,...this.activeSubSolver.correctedTraceMap};if(this.returnsToPreviousTraceState(o)){this.activeSubSolver=null,this.solved=!0;return}this.correctedTraceMap=o,this.rememberTraceState(o),this.activeSubSolver=null,this.traceNetIslands=this.computeTraceNetIslands()}if(this.activeSubSolver){this.activeSubSolver.step();return}const t=this.findNextOverlapIssue();if(t===null){if(this.cleanupPhase===null\u0026\u0026(this.cleanupPhase=\"diagonals\"),this.cleanupPhase===\"diagonals\"){this.findAndFixNextDiagonalSegment()||(this.cleanupPhase=\"done\",this.solved=!0);return}this.solved=!0;return}const{interactionKind:e,overlappingTraceSegments:n}=t;this.activeSubSolver=new sCo({inputProblem:this.inputProblem,interactionKind:e,overlappingTraceSegments:n,traceNetIslands:this.traceNetIslands,traceIdsToShift:this.traceIdsToShift})}rememberTraceState(t){this.recentTraceStates.push({...t}),this.recentTraceStates.length\u003e2\u0026\u0026this.recentTraceStates.shift()}returnsToPreviousTraceState(t){if(this.recentTraceStates.length\u003c2)return!1;const e=this.recentTraceStates[0],n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(const o of n){const i=t[o],r=e[o];if(!i||!r||i.tracePath.length!==r.tracePath.length)return!1;for(let s=0;s\u003ci.tracePath.length;s++){const a=i.tracePath[s],A=r.tracePath[s];if(Math.abs(a.x-A.x)\u003eIQt||Math.abs(a.y-A.y)\u003eIQt)return!1}}return!0}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);t.circles=t.circles||[];for(const e of Object.values(this.correctedTraceMap))t.lines.push({points:e.tracePath,strokeColor:\"purple\"});if(this.cleanupPhase===\"diagonals\"){const e=this.findNextDiagonalSegment();e\u0026\u0026t.lines.push({points:[e.p1,e.p2],strokeColor:\"red\",strokeWidth:.05})}return t}},yle=class{chips;spatialIndex;spatialIndexIdToChip;constructor(t){this.chips=t.map(e=\u003e({...e,bounds:Rve(e),spatialIndexId:null})),this.spatialIndexIdToChip=new Map,this.spatialIndex=new UH(t.length);for(const e of this.chips)e.spatialIndexId=this.spatialIndex.add(e.bounds.minX,e.bounds.minY,e.bounds.maxX,e.bounds.maxY),this.spatialIndexIdToChip.set(e.spatialIndexId,e);this.spatialIndex.finish()}getChipsInBounds(t){return this.spatialIndex.search(t.minX,t.minY,t.maxX,t.maxY).map(n=\u003ethis.spatialIndexIdToChip.get(n))}doesOrthogonalLineIntersectChip(t,e={}){const n=e.excludeChipIds??[],[o,i]=t,{x:r,y:s}=o,{x:a,y:A}=i;return this.getChipsInBounds({minX:Math.min(r,a),minY:Math.min(s,A),maxX:Math.max(r,a),maxY:Math.max(s,A)}).filter(l=\u003e!n.includes(l.chipId)).length\u003e0}};function O7(t,e,n,o=1e-9){const i=Math.abs(t.x-e.x)\u003co,r=Math.abs(t.y-e.y)\u003co;if(!i\u0026\u0026!r)return!1;if(i){const s=t.x;if(s\u003cn.minX-o||s\u003en.maxX+o)return!1;const a=Math.min(t.y,e.y),A=Math.max(t.y,e.y);return Math.min(A,n.maxY)-Math.max(a,n.minY)\u003eo}else{const s=t.y;if(s\u003cn.minY-o||s\u003en.maxY+o)return!1;const a=Math.min(t.x,e.x),A=Math.max(t.x,e.x);return Math.min(A,n.maxX)-Math.max(a,n.minX)\u003eo}}function Tve(t,e,n,o){for(const[i,r]of Object.entries(e)){const s=r.tracePath;for(let a=0;a\u003cs.length-1;a++)if(!(i===n\u0026\u0026a===o)\u0026\u0026O7(s[a],s[a+1],t))return{hasIntersection:!0,mspPairId:i,segIndex:a}}return{hasIntersection:!1}}function yQt(t){let e=0;const n=t.tracePath;for(let o=0;o\u003cn.length-1;o++)e+=Math.abs(n[o+1].x-n[o].x)+Math.abs(n[o+1].y-n[o].y);return e}function xQt(t){const{inputProblem:e,inputTraceMap:n,globalConnNetId:o,fallbackTrace:i,mspConnectionPairIds:r}=t,s=Object.fromEntries(e.chips.map(g=\u003e[g.chipId,g]));let a=Object.values(n).filter(g=\u003eg.globalConnNetId===o);if(r\u0026\u0026r.length\u003e0){const g=new Set(r);a=a.filter(h=\u003eh.mspConnectionPairIds.some(d=\u003eg.has(d)))}const A=new Set;for(const g of a)A.add(g.pins[0].chipId),A.add(g.pins[1].chipId);let c=null,l=-1;for(const g of A){const d=s[g]?.pins?.length??0;d\u003el\u0026\u0026(l=d,c=g)}const u=c==null?[]:a.filter(g=\u003eg.pins[0].chipId===c||g.pins[1].chipId===c);return u.length\u003e0?u.reduce((g,h)=\u003eyQt(g)\u003e=yQt(h)?g:h):i}function aCo(t,e){return[{x:t.x,y:t.y},{x:(t.x+e.x)/2,y:(t.y+e.y)/2},{x:e.x,y:e.y}]}function ACo(t){const{inputProblem:e,inputTraceMap:n,chipObstacleSpatialIndex:o,overlappingSameNetTraceGroup:i,availableOrientations:r,netLabelWidth:s,netLabelHeight:a}=t,A=i.portOnlyPinId;if(!A)return{placement:null,testedCandidates:[],error:\"No portOnlyPinId provided\"};let c=null,l=null;for(const E of e.chips){const B=E.pins.find(S=\u003eS.pinId===A);if(B){c={x:B.x,y:B.y},l=B._facingDirection||W5(B,E);break}}if(!c||!l)return{placement:null,testedCandidates:[],error:`Port-only pin not found: ${A}`};const u=r.length\u003e0?r:[\"x+\",\"x-\",\"y+\",\"y-\"],g={x:c.x,y:c.y},h=E=\u003eE===\"x+\"?{x:1,y:0}:E===\"x-\"?{x:-1,y:0}:E===\"y+\"?{x:0,y:1}:{x:0,y:-1},d=[];for(const E of u){const{width:B,height:S}=_B({orientation:E,netLabelWidth:s,netLabelHeight:a}),Q=IC(g,E,B,S),w=h(E),M=.001,k={x:Q.x+w.x*M,y:Q.y+w.y*M},R=Ls(k,B,S);if(o.getChipsInBounds(R).length\u003e0){d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:\"chip-collision\",hostSegIndex:-1});continue}if(KH(R,e)){d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:\"text-collision\",hostSegIndex:-1});continue}if(Tve(R,n,\"\",-1).hasIntersection){d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:\"trace-collision\",hostSegIndex:-1});continue}return d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:\"ok\",hostSegIndex:-1}),{placement:{globalConnNetId:i.globalConnNetId,dcConnNetId:void 0,netId:i.netId,netLabelText:i.netLabelText,mspConnectionPairIds:[],pinIds:[A],orientation:E,anchorPoint:g,width:B,height:S,center:k},testedCandidates:d}}const p=l,{width:m,height:_}=_B({orientation:p,netLabelWidth:s}),f=IC(g,p,m,_),I=h(p),C=.001,y={x:f.x+I.x*C,y:f.y+I.y*C};return{placement:{globalConnNetId:i.globalConnNetId,dcConnNetId:void 0,netId:i.netId,netLabelText:i.netLabelText,mspConnectionPairIds:[],pinIds:[A],orientation:p,anchorPoint:g,width:m,height:_,center:y},testedCandidates:d}}function cCo(t){const e=zh(t.inputProblem),n=t.overlappingSameNetTraceGroup.globalConnNetId,o=xQt({inputProblem:t.inputProblem,inputTraceMap:t.inputTraceMap,globalConnNetId:n,fallbackTrace:t.overlappingSameNetTraceGroup.overlappingTraces});Mc(n,.9),Mc(n,.5);for(const i of Object.values(t.inputTraceMap))o\u0026\u0026(i.mspPairId,o.mspPairId),e.lines.push({points:i.tracePath});for(const i of t.testedCandidates){const r=i.status===\"ok\"?\"rgba(0, 180, 0, 0.25)\":i.status===\"chip-collision\"?\"rgba(220, 0, 0, 0.25)\":i.status===\"trace-collision\"?\"rgba(220, 140, 0, 0.25)\":i.status===\"text-collision\"?\"rgba(160, 0, 220, 0.2)\":\"rgba(120, 120, 120, 0.15)\",s=i.status===\"ok\"?\"green\":i.status===\"chip-collision\"?\"red\":i.status===\"trace-collision\"?\"orange\":i.status===\"text-collision\"?\"purple\":\"gray\",a=i.status===\"ok\"?\"status: ok(valid net label candidate)\":i.status===\"chip-collision\"?\"status: chip-collision\":i.status===\"trace-collision\"?\"status: trace-collision\":i.status===\"text-collision\"?\"status: text-collision\":\"status: parallel-to-segment\";e.rects.push({center:{x:(i.bounds.minX+i.bounds.maxX)/2,y:(i.bounds.minY+i.bounds.maxY)/2},width:i.width,height:i.height,fill:r,strokeColor:s,label:`${a}\norientation: ${i.orientation}`}),e.points.push({x:i.anchor.x,y:i.anchor.y,color:s,label:`anchor\norientation: ${i.orientation}`})}if(t.netLabelPlacement){const i=t.netLabelPlacement;e.rects.push({center:i.center,width:i.width,height:i.height,fill:\"rgba(0, 128, 255, 0.35)\",strokeColor:\"blue\",label:`netId: ${i.netId}\nglobalConnNetId: ${i.globalConnNetId}`}),e.points.push({x:i.anchorPoint.x,y:i.anchorPoint.y,color:\"blue\",label:`anchor\norientation: ${i.orientation}`})}return e}var EQt=class extends Ng{inputProblem;inputTraceMap;overlappingSameNetTraceGroup;availableOrientations;chipObstacleSpatialIndex;netLabelWidth;netLabelHeight;netLabelPlacement=null;testedCandidates=[];constructor(t){super(),this.inputProblem=t.inputProblem,this.inputTraceMap=t.inputTraceMap,this.overlappingSameNetTraceGroup=t.overlappingSameNetTraceGroup,this.availableOrientations=t.availableOrientations,this.netLabelWidth=t.netLabelWidth,this.netLabelHeight=t.netLabelHeight,this.chipObstacleSpatialIndex=t.inputProblem._chipObstacleSpatialIndex??new yle(t.inputProblem.chips)}getConstructorParams(){return{inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,overlappingSameNetTraceGroup:this.overlappingSameNetTraceGroup,availableOrientations:this.availableOrientations,netLabelWidth:this.netLabelWidth,netLabelHeight:this.netLabelHeight}}_step(){if(this.netLabelPlacement){this.solved=!0;return}if(this.overlappingSameNetTraceGroup.portOnlyPinId){const u=ACo({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,chipObstacleSpatialIndex:this.chipObstacleSpatialIndex,overlappingSameNetTraceGroup:this.overlappingSameNetTraceGroup,availableOrientations:this.availableOrientations,netLabelWidth:this.netLabelWidth,netLabelHeight:this.netLabelHeight});if(this.testedCandidates.push(...u.testedCandidates),u.placement){this.netLabelPlacement=u.placement,this.solved=!0;return}this.failed=!0,this.error=u.error??\"Could not place net label at port without collisions\";return}const t=this.overlappingSameNetTraceGroup.globalConnNetId;let e=xQt({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,globalConnNetId:t,fallbackTrace:this.overlappingSameNetTraceGroup.overlappingTraces,mspConnectionPairIds:this.overlappingSameNetTraceGroup.mspConnectionPairIds});if(!e){this.failed=!0,this.error=\"No host trace found for net label placement\";return}const n=new Set(this.overlappingSameNetTraceGroup.mspConnectionPairIds??[]),o=Object.values(this.inputTraceMap).filter(u=\u003eu.globalConnNetId===t\u0026\u0026(n.size===0||u.mspConnectionPairIds.some(g=\u003en.has(g)))),i=this.availableOrientations.length===1?[e,...o.filter(u=\u003eu.mspPairId!==e.mspPairId)]:[e],r=this.availableOrientations.length\u003e0?this.availableOrientations:[\"x+\",\"x-\",\"y+\",\"y-\"],s=this.availableOrientations.length===1,a=(u,g)=\u003e{switch(u){case\"y+\":return g.y;case\"y-\":return-g.y;case\"x+\":return g.x;case\"x-\":return-g.x}};let A=null,c=-1/0;const l=1e-6;for(const u of i){const g=u.tracePath.slice();for(let h=0;h\u003cg.length-1;h++){const d=g[h],p=g[h+1],m=Math.abs(d.y-p.y)\u003cl,_=Math.abs(d.x-p.x)\u003cl;if(!m\u0026\u0026!_)continue;const f=m?[\"y+\",\"y-\"]:[\"x+\",\"x-\"],I=r.filter(y=\u003ef.includes(y));if(I.length===0)continue;const C=aCo(d,p);for(const y of C)for(const x of I){const{width:E,height:B}=_B({orientation:x,netLabelWidth:this.netLabelWidth,netLabelHeight:this.netLabelHeight}),S=IC(y,x,E,B),Q=x===\"x+\"?{x:1,y:0}:x===\"x-\"?{x:-1,y:0}:x===\"y+\"?{x:0,y:1}:{x:0,y:-1},w=1e-4,M={x:S.x+Q.x*w,y:S.y+Q.y*w},k=Ls(M,E,B);if(this.chipObstacleSpatialIndex.getChipsInBounds(k).length\u003e0){this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:\"chip-collision\",hostSegIndex:h});continue}if(KH(k,this.inputProblem)){this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:\"text-collision\",hostSegIndex:h});continue}if(Tve(k,this.inputTraceMap,u.mspPairId,h).hasIntersection){this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:\"trace-collision\",hostSegIndex:h});continue}if(this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:\"ok\",hostSegIndex:h}),s){const O=a(x,y);O\u003ec+1e-9\u0026\u0026(c=O,A={anchor:y,orientation:x,width:E,height:B,center:S,hostSegIndex:h,dcConnNetId:u.dcConnNetId,mspPairId:u.mspPairId,pinIds:[u.pins[0].pinId,u.pins[1].pinId]});continue}this.netLabelPlacement={globalConnNetId:this.overlappingSameNetTraceGroup.globalConnNetId,dcConnNetId:u.dcConnNetId,netId:this.overlappingSameNetTraceGroup.netId,netLabelText:this.overlappingSameNetTraceGroup.netLabelText,mspConnectionPairIds:[u.mspPairId],pinIds:[u.pins[0].pinId,u.pins[1].pinId],orientation:x,anchorPoint:y,width:E,height:B,center:S},this.solved=!0;return}}}if(s\u0026\u0026A){this.netLabelPlacement={globalConnNetId:this.overlappingSameNetTraceGroup.globalConnNetId,dcConnNetId:A.dcConnNetId,netId:this.overlappingSameNetTraceGroup.netId,netLabelText:this.overlappingSameNetTraceGroup.netLabelText,mspConnectionPairIds:[A.mspPairId],pinIds:A.pinIds,orientation:A.orientation,anchorPoint:A.anchor,width:A.width,height:A.height,center:A.center},this.solved=!0;return}this.failed=!0,this.error=\"Could not place net label without collisions\"}visualize(){return cCo(this)}},xle=({pinIds:t,traces:e})=\u003e{const n=new Map;for(const s of t)n.set(s,new Set);const o=e.filter(s=\u003e{if(s.pins.length!==2)return!1;const[a,A]=s.pins;return n.has(a.pinId)\u0026\u0026n.has(A.pinId)});for(const s of o){const[a,A]=s.pins;n.get(a.pinId).add(A.pinId),n.get(A.pinId).add(a.pinId)}const i=[],r=new Set;for(const s of t){if(r.has(s))continue;const a=[],A=[s];for(r.add(s);A.length\u003e0;){const l=A.pop();a.push(l);for(const u of n.get(l)??[])r.has(u)||(r.add(u),A.push(u))}const c=new Set(a);i.push({pinIds:a,traces:o.filter(l=\u003el.pins.every(u=\u003ec.has(u.pinId)))})}return i},BQt=class extends Ng{inputProblem;inputTraceMap;overlappingSameNetTraceGroups;queuedOverlappingSameNetTraceGroups;netLabelPlacements=[];failedGroups=[];currentGroup=null;triedAnyOrientationFallbackForCurrentGroup=!1;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputTraceMap=t.inputTraceMap,this.overlappingSameNetTraceGroups=this.computeOverlappingSameNetTraceGroups(),this.queuedOverlappingSameNetTraceGroups=[...this.overlappingSameNetTraceGroups]}computeOverlappingSameNetTraceGroups(){const t={};for(const A of Object.values(this.inputTraceMap)){const c=A.globalConnNetId;t[c]||(t[c]=[]),t[c].push(A)}const{netConnMap:e}=mB(this.inputProblem),n=new Map;for(const A of this.inputProblem.chips)for(const c of A.pins)n.set(c.pinId,c);const o={},i={};for(const A of this.inputProblem.directConnections){if(A.netId){const[l,u]=A.pinIds;o[l]=A.netId,o[u]=A.netId}const c=A.netLabelText?.trim();if(c){const[l,u]=A.pinIds;i[l]=c,i[u]=c}}for(const A of this.inputProblem.netConnections)for(const c of A.pinIds){o[c]=A.netId;const l=A.netLabelText?.trim();l\u0026\u0026(i[c]=l)}const r=[],s=this.inputProblem.chips.flatMap(A=\u003eA.pins.map(c=\u003ec.pinId)),a=new Set;for(const A of s){const c=e.getNetConnectedToId(A);c\u0026\u0026a.add(c)}for(const A of a){const l=e.getIdsConnectedToNet(A).filter(u=\u003en.has(u));for(const u of xle({pinIds:l,traces:t[A]??[]})){const g=new Set(u.pinIds),h=u.traces;if(h.length\u003e0){if(h.some(C=\u003eC.suppressNetLabel))continue;const d=C=\u003e{let y=0;const x=C.tracePath;for(let E=0;E\u003cx.length-1;E++)y+=Math.abs(x[E+1].x-x[E].x)+Math.abs(x[E+1].y-x[E].y);return y};let p=h[0],m=d(p);for(let C=1;C\u003ch.length;C++){const y=d(h[C]);y\u003em\u0026\u0026(p=h[C],m=y)}let _=h.find(C=\u003eC.userNetId!=null)?.userNetId;if(!_){for(const C of g)if(o[C]){_=o[C];break}}const f=Array.from(new Set(h.flatMap(C=\u003eC.mspConnectionPairIds??[C.mspPairId]))),I={globalConnNetId:A,netId:_,netLabelText:[...g].map(C=\u003ei[C]).find(C=\u003e!!C),overlappingTraces:p,mspConnectionPairIds:f};r.push(I)}else for(const d of g){const p=o[d];p\u0026\u0026r.push({globalConnNetId:A,netId:p,netLabelText:i[d],portOnlyPinId:d})}}}return r}getNetLabelWidthForGroup(t){const e=t.overlappingTraces?.pins.map(n=\u003en.pinId)??[];return t.portOnlyPinId\u0026\u0026e.push(t.portOnlyPinId),L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:e,isPortOnlyLabel:t.portOnlyPinId!==void 0})}getNetLabelHeightForGroup(t){if(t.netId){const n=this.inputProblem.netConnections.find(o=\u003eo.netId===t.netId)?.netLabelHeight;if(n!==void 0)return n}const e=t.overlappingTraces?.pins.map(n=\u003en.pinId)??[];return t.portOnlyPinId\u0026\u0026e.push(t.portOnlyPinId),this.inputProblem.netConnections.find(n=\u003en.pinIds.some(o=\u003ee.includes(o)))?.netLabelHeight}_step(){if(this.activeSubSolver?.solved){this.netLabelPlacements.push(this.activeSubSolver.netLabelPlacement),this.activeSubSolver=null,this.currentGroup=null,this.triedAnyOrientationFallbackForCurrentGroup=!1;return}if(this.activeSubSolver?.failed){const i=[\"x+\",\"x-\",\"y+\",\"y-\"],r=this.activeSubSolver.availableOrientations,s=r.length===4\u0026\u0026i.every(a=\u003er.includes(a));if(!this.triedAnyOrientationFallbackForCurrentGroup\u0026\u0026!s\u0026\u0026this.currentGroup){this.triedAnyOrientationFallbackForCurrentGroup=!0;const a=this.getNetLabelWidthForGroup(this.currentGroup),A=this.getNetLabelHeightForGroup(this.currentGroup);this.activeSubSolver=new EQt({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,overlappingSameNetTraceGroup:this.currentGroup,availableOrientations:i,netLabelWidth:a,netLabelHeight:A});return}this.currentGroup\u0026\u0026this.failedGroups.push(this.currentGroup),this.activeSubSolver=null,this.currentGroup=null,this.triedAnyOrientationFallbackForCurrentGroup=!1;return}if(this.activeSubSolver){this.activeSubSolver.step();return}const t=this.queuedOverlappingSameNetTraceGroups.shift();if(!t){this.solved=!0;return}const e=t.netId??t.globalConnNetId;this.currentGroup=t,this.triedAnyOrientationFallbackForCurrentGroup=!1;const n=this.getNetLabelWidthForGroup(this.currentGroup),o=this.getNetLabelHeightForGroup(this.currentGroup);this.activeSubSolver=new EQt({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,overlappingSameNetTraceGroup:t,availableOrientations:this.inputProblem.availableNetLabelOrientations[e]??[\"x+\",\"x-\",\"y+\",\"y-\"],netLabelWidth:n,netLabelHeight:o})}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);for(const e of Object.values(this.inputTraceMap))t.lines.push({points:e.tracePath,strokeColor:\"purple\"});for(const e of this.netLabelPlacements)t.rects.push({center:e.center,width:e.width,height:e.height,fill:Mc(e.globalConnNetId,.35),strokeColor:Mc(e.globalConnNetId,.9),label:`netId: ${e.netId}\nglobalConnNetId: ${e.globalConnNetId}`}),t.points.push({x:e.anchorPoint.x,y:e.anchorPoint.y,color:Mc(e.globalConnNetId,.9),label:`anchorPoint\norientation: ${e.orientation}`});return t}},lCo=\"#ef4444\",uCo=\"#000000\",gCo=\"66\",dCo=(t,e)=\u003e{const n=e.availableNetLabelOrientations;if(n)for(const o of t.rects??[]){const i=hCo(o.label,n);if(!i)continue;const r=i.includes(\"y+\"),s=i.includes(\"y-\");if(r===s)continue;const a=r?lCo:uCo;o.fill=`${a}${gCo}`,o.stroke=a,o.color=a}},hCo=(t,e)=\u003e{for(const n of pCo(t))if(Object.hasOwn(e,n))return e[n]},pCo=t=\u003et?[t.match(/^netId: (.+)$/m)?.[1],t.match(/^globalConnNetId: (.+)$/m)?.[1]].filter(e=\u003e!!(e\u0026\u0026e!==\"undefined\")):[],mCo=({labels:t,chips:e})=\u003e{const n={},o=new Map(e.flatMap(i=\u003ei.pins.map(r=\u003e[r.pinId,i.chipId])));for(const i of t){if(i.pinIds.length===0)continue;const r=i.pinIds[0],a=(r.includes(\".\")?r.split(\".\")[0]:void 0)??o.get(r);if(!a)continue;const A=`${a}-${i.orientation}`;n[A]||(n[A]=[]),n[A].push(i)}return n},_Co=(t,e)=\u003e{if(t.length===0)throw new Error(\"Cannot merge an empty group of labels.\");let n=1/0,o=1/0,i=-1/0,r=-1/0;const s=new Set,a=new Set,A=new Set;for(const p of t){const m=Ls(p.center,p.width,p.height);n=Math.min(n,m.minX),o=Math.min(o,m.minY),i=Math.max(i,m.maxX),r=Math.max(r,m.maxY),p.pinIds.forEach(_=\u003es.add(_)),p.mspConnectionPairIds.forEach(_=\u003ea.add(_)),A.add(p.globalConnNetId)}const c=i-n,l=r-o,u={x:n+c/2,y:o+l/2},g=t[0],h=`merged-group-${e}`;return{mergedLabel:{...g,globalConnNetId:h,center:u,width:c,height:l,pinIds:Array.from(s),mspConnectionPairIds:Array.from(a)},originalNetIds:A}},fCo=({labels:t,traces:e,distanceThreshold:n=.5})=\u003e{const o=new Map;if(!e)throw new Error(\"No traces provided to filterLabelsAtTraceEdges\");for(const r of e)r.globalConnNetId\u0026\u0026(o.has(r.globalConnNetId)||o.set(r.globalConnNetId,[]),o.get(r.globalConnNetId).push(r));const i=[];for(const r of t){if(r.mspConnectionPairIds.length===0){i.push(r);continue}const s=o.get(r.globalConnNetId);let a=!1;if(!(!s||s.length===0)){for(const A of s){if(A.tracePath.length===0)continue;const c=A.tracePath[0],l=A.tracePath[A.tracePath.length-1],u=ad(r.center,c),g=ad(r.center,l);if(u\u003c=n||g\u003c=n){a=!0;break}}a\u0026\u0026i.push(r)}}return i},bQt=class extends Ng{input;output;inputProblem;traces;pipelineStep=\"filtering_labels\";filteredLabels=[];labelGroups={};groupKeysToProcess=[];finalPlacements=[];mergedLabelNetIdMap={};activeMergingGroupKey=null;constructor(t){super(),this.input=t,this.inputProblem=t.inputProblem,this.traces=t.traces,this.output={netLabelPlacements:t.netLabelPlacements,mergedLabelNetIdMap:{}}}_step(){switch(this.pipelineStep){case\"filtering_labels\":this.filteredLabels=fCo({labels:this.input.netLabelPlacements,traces:this.traces}),this.pipelineStep=\"grouping_labels\";break;case\"grouping_labels\":this.labelGroups=mCo({labels:this.filteredLabels,chips:this.inputProblem.chips}),this.groupKeysToProcess=Object.keys(this.labelGroups),this.pipelineStep=\"merging_groups\";break;case\"merging_groups\":if(this.groupKeysToProcess.length===0){this.pipelineStep=\"finalizing\",this.activeMergingGroupKey=null;break}const t=this.groupKeysToProcess.pop();this.activeMergingGroupKey=t;const e=this.labelGroups[t];if(e.length\u003e1){const{mergedLabel:i,originalNetIds:r}=_Co(e,t);this.finalPlacements.push(i),this.mergedLabelNetIdMap[i.globalConnNetId]=r}else this.finalPlacements.push(...e);break;case\"finalizing\":const n=new Set(this.finalPlacements.flatMap(i=\u003ethis.mergedLabelNetIdMap[i.globalConnNetId]?[...this.mergedLabelNetIdMap[i.globalConnNetId]]:[i.globalConnNetId])),o=this.input.netLabelPlacements.filter(i=\u003e!n.has(i.globalConnNetId));this.output={netLabelPlacements:[...this.finalPlacements,...o],mergedLabelNetIdMap:this.mergedLabelNetIdMap},this.solved=!0;break}}getOutput(){return this.output}visualize(){const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});t.rects||(t.rects=[]),t.lines||(t.lines=[]),t.points||(t.points=[]),t.texts||(t.texts=[]);const e=new Map;for(const n of this.input.netLabelPlacements)e.set(n.globalConnNetId,n);for(const n of this.traces){const o={points:n.tracePath.map(i=\u003e({x:i.x,y:i.y})),strokeColor:\"blue\"};t.lines.push(o)}if(this.activeMergingGroupKey\u0026\u0026this.labelGroups[this.activeMergingGroupKey]){const n=this.labelGroups[this.activeMergingGroupKey];for(const o of n)t.rects.push({center:o.center,width:o.width,height:o.height,fill:\"rgba(255, 165, 0, 0.5)\",stroke:\"orange\"})}for(const n of this.output.netLabelPlacements){const o=n.globalConnNetId.startsWith(\"merged-group-\"),i=Mc(n.globalConnNetId);if(o){t.rects.push({center:n.center,width:n.width,height:n.height,fill:i.replace(/, 1\\)/,\", 0.2)\"),stroke:i,label:n.globalConnNetId});const r=this.output.mergedLabelNetIdMap[n.globalConnNetId];if(r)for(const s of r){const a=e.get(s);if(a){const A=Ls(a.center,a.width,a.height),c={x:A.minX,y:A.minY},l={x:A.maxX,y:A.minY},u={x:A.maxX,y:A.maxY},g={x:A.minX,y:A.maxY};t.lines.push({points:[c,l,u,g,c],strokeColor:i,strokeDash:\"4 4\"}),t.lines.push({points:[a.center,n.center],strokeColor:i,strokeDash:\"2 2\"})}}}else t.rects.push({center:n.center,width:n.width,height:n.height,stroke:i,label:n.globalConnNetId})}return t}},Jh=({traces:t,netLabels:e=[]})=\u003e{const n=[];for(const o of t)for(const i of e){const r=Ls(i.center,i.width,i.height);for(let s=0;s\u003co.tracePath.length-1;s++){const a=o.tracePath[s],A=o.tracePath[s+1];if(O7(a,A,r)){if(o.globalConnNetId===i.globalConnNetId)break;n.push({trace:o,label:i});break}}}return n},ICo=({path:t,labelBounds:e,paddedBounds:n=e})=\u003e{let o=-1,i=-1;for(let A=0;A\u003ct.length-1;A++)O7(t[A],t[A+1],e)\u0026\u0026(o===-1\u0026\u0026(o=A),i=A);if(o===-1)return{firstInsideIndex:-1,lastInsideIndex:-1};const r=A=\u003eA.x\u003en.minX\u0026\u0026A.x\u003cn.maxX\u0026\u0026A.y\u003en.minY\u0026\u0026A.y\u003cn.maxY;let s=o;for(;s\u003e0\u0026\u0026r(t[s]);)s--;let a=i+1;for(;a\u003ct.length-1\u0026\u0026r(t[a]);)a++;return{firstInsideIndex:s+1,lastInsideIndex:a-1}},CCo=({initialTrace:t,firstInsideIndex:e,lastInsideIndex:n,labelBounds:o,paddingBuffer:i,detourCount:r})=\u003e{if(e\u003c=0||n\u003e=t.tracePath.length-1)return[];const s=t.tracePath[e-1],a=t.tracePath[n+1],A=t.tracePath.slice(0,e),c=t.tracePath.slice(n+1),l=[];s.x!==a.x\u0026\u0026s.y!==a.y?(l.push([{x:a.x,y:s.y}]),l.push([{x:s.x,y:a.y}])):(s.x===a.x||s.y===a.y)\u0026\u0026l.push([]);const u=i+r*i,g=o.minX-u,h=o.maxX+u,d=o.maxY+u,p=o.minY-u;return(s.x\u003c=o.minX||a.x\u003c=o.minX)\u0026\u0026s.x\u003co.maxX\u0026\u0026a.x\u003co.maxX\u0026\u0026l.push([{x:g,y:s.y},{x:g,y:a.y}]),(s.x\u003e=o.maxX||a.x\u003e=o.maxX)\u0026\u0026s.x\u003eo.minX\u0026\u0026a.x\u003eo.minX\u0026\u0026l.push([{x:h,y:s.y},{x:h,y:a.y}]),(s.y\u003e=o.maxY||a.y\u003e=o.maxY)\u0026\u0026s.y\u003eo.minY\u0026\u0026a.y\u003eo.minY\u0026\u0026l.push([{x:s.x,y:d},{x:a.x,y:d}]),(s.y\u003c=o.minY||a.y\u003c=o.minY)\u0026\u0026s.y\u003co.maxY\u0026\u0026a.y\u003co.maxY\u0026\u0026l.push([{x:s.x,y:p},{x:a.x,y:p}]),l.map(m=\u003e[...A,...m,...c])},yCo=({initialTrace:t,label:e,labelBounds:n,paddingBuffer:o,detourCount:i})=\u003e{const r=e.globalConnNetId.startsWith(\"merged-group-\"),s=o+i*o,a={minX:n.minX-s,maxX:n.maxX+s,minY:n.minY-s,maxY:n.maxY+s};let A,c,l,u;const g=m=\u003em.x\u003e=a.minX\u0026\u0026m.x\u003c=a.maxX\u0026\u0026m.y\u003e=a.minY\u0026\u0026m.y\u003c=a.maxY;if(r){let m=-1;for(let f=0;f\u003ct.tracePath.length;f++)if(g(t.tracePath[f])){m=f;break}if(m===-1)return[];l=Math.max(0,m-1),A=t.tracePath[l];let _=-1;for(let f=m;f\u003ct.tracePath.length;f++)if(!g(t.tracePath[f])){_=f;break}_===-1?u=t.tracePath.length-1:u=_,c=t.tracePath[u]}else{let m=-1,_=-1;for(let f=0;f\u003ct.tracePath.length-1;f++)CC(t.tracePath[f],t.tracePath[f+1],{...n})\u0026\u0026(m===-1\u0026\u0026(m=f),_=f);if(m===-1)return[];l=m,u=_+1,A=t.tracePath[l],c=t.tracePath[u]}if(!A||!c||l\u003e=u)return[];const h=[],d=c.x-A.x,p=c.y-A.y;if(Math.abs(d)\u003eMath.abs(p)){const m=[a.maxY,a.minY];for(const _ of m)h.push(d\u003e0?[{x:a.minX,y:A.y},{x:a.minX,y:_},{x:a.maxX,y:_},{x:a.maxX,y:c.y}]:[{x:a.maxX,y:A.y},{x:a.maxX,y:_},{x:a.minX,y:_},{x:a.minX,y:c.y}])}else{const m=[a.maxX,a.minX];for(const _ of m)h.push(p\u003e0?[{x:A.x,y:a.minY},{x:_,y:a.minY},{x:_,y:a.maxY},{x:c.x,y:a.maxY}]:[{x:A.x,y:a.maxY},{x:_,y:a.maxY},{x:_,y:a.minY},{x:c.x,y:a.minY}])}return h.map(m=\u003e[...t.tracePath.slice(0,l),A,...m,c,...t.tracePath.slice(u+1)])},Qa=t=\u003e{if(t.length\u003c3)return t;const e=[t[0]];for(let o=1;o\u003ct.length-1;o++){const i=e[e.length-1],r=t[o],s=t[o+1];e1(i,r)\u0026\u0026e1(r,s)||X_(i,r)\u0026\u0026X_(r,s)||e.push(r)}if(e.push(t[t.length-1]),e.length\u003c3)return e;const n=[e[0]];for(let o=1;o\u003ce.length-1;o++){const i=n[n.length-1],r=e[o],s=e[o+1];e1(i,r)\u0026\u0026e1(r,s)||X_(i,r)\u0026\u0026X_(r,s)||n.push(r)}return n.push(e[e.length-1]),n},SQt=({trace:t,label:e,paddingBuffer:n,detourCount:o})=\u003e{const i={...t,tracePath:Qa(t.tracePath)};if(t.globalConnNetId===e.globalConnNetId)return[i.tracePath];const r=Ls(e.center,e.width,e.height),s={minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY,chipId:`netlabel-${e.netId}`},a=yCo({initialTrace:i,label:e,labelBounds:s,paddingBuffer:n,detourCount:o}),A=n+o*n,c={minX:s.minX-A,maxX:s.maxX+A,minY:s.minY-A,maxY:s.maxY+A},{firstInsideIndex:l,lastInsideIndex:u}=ICo({path:i.tracePath,labelBounds:s,paddedBounds:c}),g=CCo({initialTrace:i,firstInsideIndex:l,lastInsideIndex:u,labelBounds:s,paddingBuffer:n,detourCount:o});return[...a,...g]},G7=.002,xCo=1e-6,QQt=.02,vQt=QQt+xCo,ECo=QQt*3,nw=(t,e)=\u003ewQt(t,e.map(n=\u003en.tracePath)),wQt=(t,e)=\u003e{const n=(o,i,r,s)=\u003eMath.min(Math.max(o,i),Math.max(r,s))-Math.max(Math.min(o,i),Math.min(r,s))\u003eG7;for(let o=0;o\u003ct.length-1;o++){const i=t[o],r=t[o+1],s=Math.abs(i.x-r.x)\u003cG7,a=Math.abs(i.y-r.y)\u003cG7;if(!s\u0026\u0026!a)continue;const A=s?\"x\":\"y\",c=s?\"y\":\"x\";for(const l of e)for(let u=0;u\u003cl.length-1;u++){const g=l[u],h=l[u+1];if(!(!(Math.abs(g[A]-h[A])\u003cG7)||!(Math.abs(i[A]-g[A])\u003cG7))\u0026\u0026n(i[c],r[c],g[c],h[c]))return!0}}return!1},PQt=(t,e)=\u003e{const n=vQt/2,o=(i,r,s)=\u003es?{minX:i.x-n,maxX:i.x+n,minY:Math.min(i.y,r.y),maxY:Math.max(i.y,r.y)}:{minX:Math.min(i.x,r.x),maxX:Math.max(i.x,r.x),minY:i.y-n,maxY:i.y+n};for(let i=0;i\u003ct.length-1;i++){const r=t[i],s=t[i+1],a=Math.abs(r.x-s.x)\u003cG7,A=Math.abs(r.y-s.y)\u003cG7;if(!a\u0026\u0026!A)continue;const c=o(r,s,a);for(const l of e)for(let u=0;u\u003cl.tracePath.length-1;u++){const g=l.tracePath[u],h=l.tracePath[u+1];if(!(a?Math.abs(g.x-h.x)\u003cG7:Math.abs(g.y-h.y)\u003cG7))continue;const p=fct(c,o(g,h,a));if(!p)continue;if((a?p.maxY-p.minY:p.maxX-p.minX)\u003eG7)return!0}}return!1},BCo=5,bCo=1e-9,MQt=t=\u003e{let e=0;for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},Ele=class extends Ng{queuedCandidatePaths;solvedTracePath=null;initialTrace;problem;obstacles;label;tracesToAvoidOverlapping;netLabelPlacements;detourCount;_tried=0;constructor(t){super(),this.initialTrace=t.trace,this.problem=t.problem,this.label=t.label,this.detourCount=t.detourCount,this.tracesToAvoidOverlapping=(t.tracesToAvoidOverlapping??[]).filter(r=\u003er.globalConnNetId!==t.trace.globalConnNetId),this.netLabelPlacements=t.netLabelPlacements??[t.label],this.obstacles=Hy(this.problem);const e=t.paddingBuffer+t.detourCount*t.paddingBuffer,n=SQt({...t,paddingBuffer:e}),o=r=\u003eJh({traces:[{...this.initialTrace,tracePath:r}],netLabels:this.netLabelPlacements}).length,i=new Map;for(const r of n){const s=Qa(r);i.set(s.map(a=\u003e`${a.x},${a.y}`).join(\";\"),s)}this.queuedCandidatePaths=[...i.values()].sort((r,s)=\u003e{const a=MQt(r)-MQt(s);if(Math.abs(a)\u003e=bCo)return a;const A=o(r)-o(s);return A!==0?A:r.length-s.length})}_step(){if(this.queuedCandidatePaths.length===0||this._tried\u003e=BCo){this.failed=!0;return}this._tried++;const t=this.queuedCandidatePaths.shift(),e=Qa(t),n=Jh({traces:[{...this.initialTrace,tracePath:e}],netLabels:[this.label]}).length\u003e0,o=Qa(this.initialTrace.tracePath),i=Jh({traces:[{...this.initialTrace,tracePath:o}],netLabels:this.netLabelPlacements}),r=Jh({traces:[{...this.initialTrace,tracePath:e}],netLabels:this.netLabelPlacements});!n\u0026\u0026r.length\u003c=i.length\u0026\u0026!ON(e,this.obstacles)\u0026\u0026!nw(e,this.tracesToAvoidOverlapping)\u0026\u0026(this.solvedTracePath=e,this.solved=!0)}visualize(){const t=zh(this.problem,{chipAlpha:.1,connectionAlpha:.1});return t.lines||(t.lines=[]),t.rects||(t.rects=[]),t.lines.push({points:this.initialTrace.tracePath,strokeColor:\"red\",strokeDash:\"4 4\"}),t.rects.push({center:this.label.center,width:this.label.width,height:this.label.height,fill:\"rgba(255, 0, 0, 0.2)\"}),!this.solvedTracePath\u0026\u0026this.queuedCandidatePaths.length\u003e0\u0026\u0026t.lines.push({points:this.queuedCandidatePaths[0],strokeColor:\"orange\"}),this.solvedTracePath\u0026\u0026t.lines.push({points:this.solvedTracePath,strokeColor:\"green\"}),t}},SCo=({trace:t,label:e})=\u003e{if(t.tracePath.length\u003c2)return!1;const n={...t,tracePath:[t.tracePath[0],t.tracePath[1]]};if(Jh({traces:[n],netLabels:[e]}).length\u003e0)return!0;if(t.tracePath.length\u003e2){const i=t.tracePath[t.tracePath.length-1],r=t.tracePath[t.tracePath.length-2],s={...t,tracePath:[r,i]};if(Jh({traces:[s],netLabels:[e]}).length\u003e0)return!0}return!1},QCo=t=\u003e{const{decomposedChildLabels:e,collidingTrace:n,mergedLabel:o,graphics:i}=t;i.rects||(i.rects=[]),i.texts||(i.texts=[]);for(const r of e){const s=r.globalConnNetId===n.globalConnNetId;i.rects.push({center:r.center,width:r.width,height:r.height,fill:s?\"green\":\"red\"})}return i.texts.push({x:o.center.x,y:o.center.y+o.height/2+.5,text:`DECOMPOSITION: Trace ${n.mspPairId} vs Merged Label ${o.globalConnNetId}`,fontSize:.3,color:\"blue\"}),i},vCo=class extends Ng{inputProblem;initialNetLabelPlacements;mergedNetLabelPlacements;mergedLabelNetIdMap;allTraces;tracesToAvoidOverlapping;modifiedTraces=[];completedReroutes=[];PADDING_BUFFER=.1;detourCounts=new Map;activeSubSolver=null;overlapQueue=[];activeOverlap=null;recentlyFailed=new Set;currentlyProcessingOverlap=null;decomposedChildLabels=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.initialNetLabelPlacements=t.initialNetLabelPlacements,this.mergedNetLabelPlacements=t.mergedNetLabelPlacements,this.mergedLabelNetIdMap=t.mergedLabelNetIdMap,this.allTraces=[...t.traces],this.tracesToAvoidOverlapping=t.tracesToAvoidOverlapping??[],this.detourCounts=t.detourCounts}_step(){if(this.currentlyProcessingOverlap=null,this.decomposedChildLabels=null,this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const o=this.activeSubSolver.solvedTracePath;if(o){this.completedReroutes.push({initialTrace:{...this.activeSubSolver.initialTrace,tracePath:this.activeSubSolver.initialTrace.tracePath.map(r=\u003e({...r}))},reroutedTracePath:o.map(r=\u003e({...r})),label:this.activeSubSolver.label,detourCount:this.activeSubSolver.detourCount});const i=this.allTraces.findIndex(r=\u003er.mspPairId===this.activeSubSolver.initialTrace.mspPairId);i!==-1\u0026\u0026(this.allTraces[i].tracePath=o,this.modifiedTraces.push(this.allTraces[i]))}this.activeSubSolver=null,this.activeOverlap=null,this.recentlyFailed.clear()}else if(this.activeSubSolver.failed){const o=`${this.activeOverlap.trace.mspPairId}-${this.activeOverlap.label.globalConnNetId}`;this.recentlyFailed.add(o),this.activeSubSolver=null,this.activeOverlap=null}return}const t=Jh({traces:this.allTraces,netLabels:this.mergedNetLabelPlacements});if(t.length===0){this.solved=!0;return}const e=t.filter(o=\u003e{const i=`${o.trace.mspPairId}-${o.label.globalConnNetId}`;return!this.recentlyFailed.has(i)});if(e.length===0){this.solved=!0;return}this.overlapQueue=e;const n=this.overlapQueue.shift();if(this.currentlyProcessingOverlap=n??null,n){const o=this.allTraces.find(A=\u003eA.mspPairId===n.trace.mspPairId),i=n.label,r=this.mergedLabelNetIdMap[i.globalConnNetId];if(r?.has(o.globalConnNetId)){const A=this.initialNetLabelPlacements.filter(l=\u003er.has(l.globalConnNetId));this.decomposedChildLabels=A;let c=null;for(const l of A)if(Jh({traces:[o],netLabels:[l]}).length\u003e0){c=l;break}if(c){const l=this.detourCounts.get(c.globalConnNetId)??0;this.detourCounts.set(c.globalConnNetId,l+1),this.activeOverlap=n,this.activeSubSolver=new Ele({trace:o,label:c,problem:this.inputProblem,paddingBuffer:this.PADDING_BUFFER,detourCount:l,tracesToAvoidOverlapping:this.tracesToAvoidOverlapping,netLabelPlacements:this.initialNetLabelPlacements})}else{const l=`${o.mspPairId}-${i.globalConnNetId}`;this.recentlyFailed.add(l)}return}if(r\u0026\u0026SCo({trace:o,label:i})){const A=this.initialNetLabelPlacements.filter(l=\u003er.has(l.globalConnNetId));this.decomposedChildLabels=A;let c=null;for(const l of A)if(Jh({traces:[o],netLabels:[l]}).length\u003e0){c=l;break}if(c){const l=this.detourCounts.get(c.globalConnNetId)??0;this.detourCounts.set(c.globalConnNetId,l+1),this.activeOverlap=n,this.activeSubSolver=new Ele({trace:o,label:c,problem:this.inputProblem,paddingBuffer:this.PADDING_BUFFER,detourCount:l,tracesToAvoidOverlapping:this.tracesToAvoidOverlapping,netLabelPlacements:this.initialNetLabelPlacements})}else{const l=`${o.mspPairId}-${i.globalConnNetId}`;this.recentlyFailed.add(l)}return}const a=this.detourCounts.get(i.globalConnNetId)??0;this.detourCounts.set(i.globalConnNetId,a+1),this.activeOverlap=n,this.activeSubSolver=new Ele({trace:o,label:i,problem:this.inputProblem,paddingBuffer:this.PADDING_BUFFER,detourCount:a,tracesToAvoidOverlapping:this.tracesToAvoidOverlapping,netLabelPlacements:this.initialNetLabelPlacements})}}getOutput(){return{allTraces:this.allTraces,modifiedTraces:this.modifiedTraces,detourCounts:this.detourCounts}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);t.lines||(t.lines=[]);for(const e of this.allTraces)t.lines.push({points:e.tracePath,strokeColor:\"purple\"});if(this.currentlyProcessingOverlap){const{trace:e,label:n}=this.currentlyProcessingOverlap;t.lines.push({points:e.tracePath,strokeColor:\"red\"}),this.decomposedChildLabels?QCo({decomposedChildLabels:this.decomposedChildLabels,collidingTrace:e,mergedLabel:n,graphics:t}):(t.rects||(t.rects=[]),t.rects.push({center:n.center,width:n.width,height:n.height,fill:\"yellow\"}),t.texts||(t.texts=[]),t.texts.push({x:n.center.x,y:n.center.y+n.height/2+.5,text:`COLLISION: Trace ${e.mspPairId} vs Label ${n.globalConnNetId}`,fontSize:.3,color:\"red\"}))}return t}},wCo=class extends Ng{inputProblem;netLabelPlacements;unprocessedTraces=[];cleanTraces=[];subSolvers=[];phase=\"searching_for_overlaps\";detourCounts=new Map;labelMergingSolver;allInputTraces;constructor(t){super(),this.inputProblem=t.inputProblem,this.unprocessedTraces=[...t.traces],this.allInputTraces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.cleanTraces=[],this.subSolvers=[]}_step(){if(this.phase===\"searching_for_overlaps\"){if(this.unprocessedTraces.length===0){this.phase=\"fixing_overlaps\";return}const t=this.unprocessedTraces.shift(),e=Jh({traces:[t],netLabels:this.netLabelPlacements});if(e.length===0)this.cleanTraces.push(t);else{const n=e.map(s=\u003es.label),o=new bQt({netLabelPlacements:n,inputProblem:this.inputProblem,traces:[t]});o.solve();const i=o.getOutput(),r=new vCo({inputProblem:this.inputProblem,traces:[t],initialNetLabelPlacements:this.netLabelPlacements,mergedNetLabelPlacements:i.netLabelPlacements,mergedLabelNetIdMap:i.mergedLabelNetIdMap,detourCounts:this.detourCounts,tracesToAvoidOverlapping:this.allInputTraces.filter(s=\u003es.mspPairId!==t.mspPairId)});this.subSolvers.push(r)}}else if(this.phase===\"fixing_overlaps\"){if(this.subSolvers.every(t=\u003et.solved||t.failed)){this.labelMergingSolver||(this.labelMergingSolver=new bQt({netLabelPlacements:this.netLabelPlacements,inputProblem:this.inputProblem,traces:this.getOutput().traces}),this.labelMergingSolver.solve()),this.solved=!0;return}for(const t of this.subSolvers)!t.solved\u0026\u0026!t.failed\u0026\u0026t.step()}}getOutput(){const t=this.subSolvers.flatMap(e=\u003ee.getOutput().allTraces);return{traces:[...this.cleanTraces,...t],completedReroutes:this.subSolvers.flatMap(e=\u003ee.completedReroutes),netLabelPlacements:this.labelMergingSolver?.getOutput().netLabelPlacements??this.netLabelPlacements}}visualize(){const t=zh(this.inputProblem);t.lines||(t.lines=[]),t.rects||(t.rects=[]);for(const e of this.cleanTraces)t.lines.push({points:e.tracePath,strokeColor:\"purple\"});for(const e of this.subSolvers){const n=e.visualize();t.lines.push(...n.lines??[]),t.rects.push(...n.rects??[]),t.points.push(...n.points??[])}for(const e of this.netLabelPlacements){const n=Mc(e.globalConnNetId,.3);t.rects.push({center:e.center,width:e.width,height:e.height,fill:n,stroke:n.replace(\"0.3\",\"1\"),label:e.globalConnNetId})}return t}},PCo=t=\u003e{for(const e of t.chips){const n=Rve(e);for(const o of e.pins){if(!(o.x\u003en.minX\u0026\u0026o.x\u003cn.maxX\u0026\u0026o.y\u003en.minY\u0026\u0026o.y\u003cn.maxY))continue;if(o._facingDirection){o._facingDirection===\"x-\"?o.x=n.minX:o._facingDirection===\"x+\"?o.x=n.maxX:o._facingDirection===\"y-\"?o.y=n.minY:o.y=n.maxY;continue}const r=o.x-n.minX,s=n.maxX-o.x,a=o.y-n.minY,A=n.maxY-o.y,c=Math.min(r,s,a,A);c===r?o.x=n.minX:c===s?o.x=n.maxX:c===a?o.y=n.minY:o.y=n.maxY,o._facingDirection=void 0}}},MCo=t=\u003e{for(const e of t.chips){const n=e.width/2,o=e.height/2;let i=0,r=0;for(const A of e.pins){const c=Math.abs(A.x-e.center.x),l=Math.abs(A.y-e.center.y);c\u003ei\u0026\u0026(i=c),l\u003er\u0026\u0026(r=l)}const s=Math.max(n,i),a=Math.max(o,r);if(s\u003en||a\u003eo){e.width=s*2,e.height=a*2;for(const A of e.pins)A._facingDirection=void 0}}};function DCo(t,e){for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)for(let s=0;s\u003cr.tracePath.length-1;s++){const a=r.tracePath[s],A=r.tracePath[s+1];if(X1(o,i,a,A))return!0}}return!1}var DQt=(t,e,n)=\u003e{const o=t.maxMspPairDistance??uj,{extendedRailPinIds:i,separatedRailPinIds:r}=aQt(t,e,o),s=new Set,a=new Set;for(const u of t.netConnections){const g=e.getNetConnectedToId(u.netId);if(g){for(const h of u.pinIds)a.add(h);u.isGround\u0026\u0026s.add(g)}}const A=new Map;for(const u of t.chips){if(u.pins.length!==2||!u.pins.every(m=\u003ea.has(m.pinId))||u.pins.some(m=\u003en.has(m.pinId)\u0026\u0026!i.has(m.pinId)))continue;const[g,h]=u.pins.map(m=\u003ee.getNetConnectedToId(m.pinId));if(!g||!h||g===h||s.has(g)===s.has(h))continue;const d=JSON.stringify([u.sectionId??null,...[g,h].sort()]),p=A.get(d)??[];p.push(u.pins.map(m=\u003em.pinId)),A.set(d,p)}const c=new Set([...A.values()].filter(u=\u003eu.length\u003e1).flat(2));for(const u of[...i,...r])c.add(u);const l=new mle({});for(const u of t.directConnections)u.netLabelWidth===void 0\u0026\u0026l.addConnections([u.pinIds]);return(u,g)=\u003e{if(!c.has(u.pinId)\u0026\u0026!c.has(g.pinId)||Math.abs(u.x-g.x)+Math.abs(u.y-g.y)\u003c=o)return!0;const h=l.getNetConnectedToId(u.pinId);return h!==void 0\u0026\u0026h===l.getNetConnectedToId(g.pinId)}},NCo=3,Ble=(t,e)=\u003eMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),RCo=(t,e)=\u003eMath.abs(t.x-e.x)+Math.abs(t.y-e.y),IB=1e-9,ble=(t,e,n)=\u003et\u003e=Math.min(e,n)-IB\u0026\u0026t\u003c=Math.max(e,n)+IB,TCo=(t,e,n,o)=\u003e{const i=Math.abs(t.y-e.y)\u003c=IB,r=Math.abs(t.x-e.x)\u003c=IB,s=Math.abs(n.y-o.y)\u003c=IB,a=Math.abs(n.x-o.x)\u003c=IB;if(i\u0026\u0026a){const A={x:n.x,y:t.y};return ble(A.x,t.x,e.x)\u0026\u0026ble(A.y,n.y,o.y)?A:null}if(r\u0026\u0026s){const A={x:t.x,y:n.y};return ble(A.y,t.y,e.y)\u0026\u0026ble(A.x,n.x,o.x)?A:null}if(i\u0026\u0026s\u0026\u0026Math.abs(t.y-n.y)\u003c=IB){const A=Math.max(Math.min(t.x,e.x),Math.min(n.x,o.x)),c=Math.min(Math.max(t.x,e.x),Math.max(n.x,o.x));return A\u003ec+IB?null:{x:Math.max(A,Math.min(t.x,c)),y:t.y}}if(r\u0026\u0026a\u0026\u0026Math.abs(t.x-n.x)\u003c=IB){const A=Math.max(Math.min(t.y,e.y),Math.min(n.y,o.y)),c=Math.min(Math.max(t.y,e.y),Math.max(n.y,o.y));return A\u003ec+IB?null:{x:t.x,y:Math.max(A,Math.min(t.y,c))}}return null},kCo=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1],r=e.flatMap(A=\u003eA.tracePath.slice(0,-1).flatMap((c,l)=\u003e{const u=TCo(o,i,c,A.tracePath[l+1]);return u?[u]:[]}));r.sort((A,c)=\u003eBle(o,A)-Ble(o,c));const s=r[0];if(!s)continue;const a=t.slice(0,n+1);return Ble(a.at(-1),s)\u003eIB\u0026\u0026a.push(s),a}return null},FCo=class extends Ng{constructor(t){super(),this.params=t;const{inputProblem:e,primaryMspConnectionPairs:n,alreadySolvedTraces:o}=this.params,i=nQt(e);this.inputProblem=e,this.allSolvedTraces=[...o],this.maxMspPairDistance=e.maxMspPairDistance??uj;const r=new Set;for(const u of n)r.add(u.pins[0].pinId),r.add(u.pins[1].pinId);const{netConnMap:s}=mB(e);this.netConnMap=s;const a=DQt(e,s,r),A=new Map;for(const u of e.chips){this.chipMap[u.chipId]=u;for(const g of u.pins)A.set(g.pinId,{...g,chipId:u.chipId})}this.queuedFailedConnectionPairs=this.params.failedConnectionPairs.filter(u=\u003ei(u.pins[0].pinId,u.pins[1].pinId)\u0026\u0026GIo({inputProblem:this.inputProblem,chipMap:this.chipMap,pins:u.pins}));const c=[],l=new Set;for(const u of Object.keys(s.netMap)){const g=s.getIdsConnectedToNet(u);if(g.length\u003c2)continue;const h=g.filter(d=\u003e!r.has(d));for(const d of h){const p=A.get(d);if(!p)continue;const m=g.filter(_=\u003e_!==d).flatMap(_=\u003e{const f=A.get(_);return f?i(p.pinId,f.pinId)?a(p,f)?e.netConnections.some(C=\u003eC.pinIds.length===2\u0026\u0026C.pinIds.includes(p.pinId)\u0026\u0026C.pinIds.includes(f.pinId))\u0026\u0026RCo(p,f)\u003ethis.maxMspPairDistance?[]:[{pin:f,distance:Ble(p,f)}]:[]:[]:[]}).sort((_,f)=\u003e_.distance-f.distance).slice(0,NCo);for(const _ of m){const f=[p,_.pin];if(Zv(e,f[0],f[1]))continue;const I=f.map(C=\u003eC.pinId).sort().join(\"--\");l.has(I)||(c.push(f),l.add(I))}}}this.queuedCandidatePairs=c}params;solvedLongDistanceTraces=[];queuedCandidatePairs=[];currentCandidatePair=null;queuedFailedConnectionPairs=[];currentFailedConnectionPair=null;subSolver=null;chipMap={};inputProblem;netConnMap;newlyConnectedPinIds=new Set;allSolvedTraces=[];maxMspPairDistance;getConstructorParams(){return this.params}acceptFailedConnectionPair(t){const e=this.currentFailedConnectionPair;if(!e)return;const n={...e,tracePath:t,mspConnectionPairIds:[e.mspPairId],pinIds:e.pins.map(o=\u003eo.pinId)};this.solvedLongDistanceTraces.push(n),this.allSolvedTraces.push(n);for(const o of e.pins)this.newlyConnectedPinIds.add(o.pinId)}_step(){if(this.subSolver?.solved\u0026\u0026this.currentFailedConnectionPair){const e=this.subSolver.solvedTracePath;e\u0026\u0026this.acceptFailedConnectionPair(e),this.subSolver=null,this.currentCandidatePair=null,this.currentFailedConnectionPair=null}else if(this.subSolver?.solved){const e=this.subSolver.solvedTracePath;if(e\u0026\u0026this.currentCandidatePair){const[n,o]=this.currentCandidatePair,i=this.netConnMap.getNetConnectedToId(n.pinId),r=this.allSolvedTraces.filter(d=\u003ed.globalConnNetId===i),s=this.inputProblem.netConnections.find(d=\u003ed.pinIds.length===3\u0026\u0026d.pinIds.includes(n.pinId)\u0026\u0026d.pinIds.includes(o.pinId)),a=this.chipMap[n.chipId],A=r.find(d=\u003ed.pinIds.includes(o.pinId)\u0026\u0026d.pins.every(p=\u003ep.chipId===o.chipId)),l=s!==void 0\u0026\u0026a?.pins.length===2\u0026\u0026A!==void 0?kCo(e,r):null,u=l??e,g=l?this.allSolvedTraces.filter(d=\u003ed.globalConnNetId!==i):this.allSolvedTraces;if(!DCo(u,g)){const d=`${n.pinId}-${o.pinId}`,p={mspPairId:d,dcConnNetId:i,globalConnNetId:i,pins:[n,o],tracePath:u,mspConnectionPairIds:[d],pinIds:[n.pinId,o.pinId]};this.solvedLongDistanceTraces.push(p),this.allSolvedTraces.push(p),this.newlyConnectedPinIds.add(n.pinId),this.newlyConnectedPinIds.add(o.pinId)}}this.subSolver=null,this.currentCandidatePair=null}else this.subSolver?.failed\u0026\u0026(this.subSolver=null,this.currentCandidatePair=null,this.currentFailedConnectionPair=null);if(this.subSolver){this.subSolver.step();return}const t=this.queuedFailedConnectionPairs.shift();if(t){this.currentFailedConnectionPair=t,this.currentCandidatePair=t.pins,this.subSolver=new VH({inputProblem:this.params.inputProblem,pins:t.pins,chipMap:this.chipMap});return}for(;this.queuedCandidatePairs.length\u003e0;){const e=this.queuedCandidatePairs.shift(),[n,o]=e;if(!(this.newlyConnectedPinIds.has(n.pinId)||this.newlyConnectedPinIds.has(o.pinId))){this.currentCandidatePair=e,this.subSolver=new VH({inputProblem:this.params.inputProblem,pins:this.currentCandidatePair,chipMap:this.chipMap});return}}this.solved=!0}visualize(){if(this.subSolver)return this.subSolver.visualize();const t=zh(this.inputProblem);for(const e of this.solvedLongDistanceTraces)t.lines.push({points:e.tracePath,strokeColor:\"purple\"});for(const[e,n]of this.queuedCandidatePairs)t.lines.push({points:[e,n],strokeColor:\"gray\",strokeDash:\"4 4\"});return t}getOutput(){return this.solved?{newTraces:this.solvedLongDistanceTraces,allTracesMerged:[...this.params.alreadySolvedTraces,...this.solvedLongDistanceTraces]}:{newTraces:[],allTracesMerged:this.params.alreadySolvedTraces}}},kve=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];for(const r of e){const s={center:{x:r.minX+(r.maxX-r.minX)/2,y:r.minY+(r.maxY-r.minY)/2},width:r.maxX-r.minX,height:r.maxY-r.minY};if(yQn(o,i,s)\u003c=0)return!0}}return!1},j5=t=\u003e{let e=0;for(let n=1;n\u003ct.length-1;n++){const o=t[n-1],i=t[n],r=t[n+1],s=o.x===i.x,a=i.x===r.x;s!==a\u0026\u0026e++}return e},NQt=(t,e)=\u003e{const n=[];return t.x===e.x||t.y===e.y?n.push([t,e]):(n.push([t,{x:e.x,y:t.y},e]),n.push([t,{x:t.x,y:e.y},e])),n},Oy=1e-9,RQt=(t,e,n,o)=\u003ee\u003e=n-Oy\u0026\u0026o\u003e=t-Oy\u0026\u0026Math.min(e,o)-Math.max(t,n)\u003c=Oy,TQt=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=Oy\u0026\u0026Math.abs(t.y-e.y)\u003c=Oy,LCo=({start:t,end:e,label:n,originalPath:o})=\u003e{const i=Math.abs(t.x-e.x)\u003c=Oy,r=Math.abs(t.y-e.y)\u003c=Oy;if(!(i?Math.abs(t.x-n.minX)\u003c=Oy||Math.abs(t.x-n.maxX)\u003c=Oy:r?Math.abs(t.y-n.minY)\u003c=Oy||Math.abs(t.y-n.maxY)\u003c=Oy:!1))return!1;for(let a=0;a\u003co.length-1;a++){if(!(a===0||a===o.length-2))continue;const c=o[a],l=o[a+1],u=a===0?l:c;if(!(!TQt(t,u)\u0026\u0026!TQt(e,u))\u0026\u0026CC(c,l,n)\u0026\u0026(i\u0026\u0026Math.abs(c.x-l.x)\u003c=Oy\u0026\u0026Math.abs(c.x-t.x)\u003c=Oy\u0026\u0026RQt(Math.min(t.y,e.y),Math.max(t.y,e.y),Math.min(c.y,l.y),Math.max(c.y,l.y))||r\u0026\u0026Math.abs(c.y-l.y)\u003c=Oy\u0026\u0026Math.abs(c.y-t.y)\u003c=Oy\u0026\u0026RQt(Math.min(t.x,e.x),Math.max(t.x,e.x),Math.min(c.x,l.x),Math.max(c.x,l.x))))return!0}return!1},Sle=(t,e,n={})=\u003e{for(let o=0;o\u003ct.length-1;o++){const i=t[o],r=t[o+1];for(const s of e)if(CC(i,r,s)){if(n.originalPath\u0026\u0026LCo({start:i,end:r,label:s,originalPath:n.originalPath}))continue;return!0}}return!1},HCo=(t,e)=\u003e{if(e\u003e=t.length-3)return-1;let n=e,o=!0;for(let i=e;i\u003ct.length-2\u0026\u0026i\u003ce+10\u0026\u0026!(i+2\u003e=t.length);i++){const r=t[i],s=t[i+1],a=t[i+2],A=r.x===s.x,c=s.x===a.x;if(A===c)break;const l=Math.sign(A?s.y-r.y:s.x-r.x);if(i\u003ee){const u=t[i-1],g=u.x===r.x,h=Math.sign(g?r.y-u.y:r.x-u.x);if(A\u0026\u0026g\u0026\u0026l!==h||!A\u0026\u0026!g\u0026\u0026l!==h){o=!1;break}}n=i+2}return o\u0026\u0026n-e\u003e=3?n:-1},zH=(t,e,n)=\u003e{if(n.length\u003c2)return!1;const o=n[0],i=n[n.length-1];return t.x===o.x\u0026\u0026t.y===o.y\u0026\u0026e.x===n[1].x\u0026\u0026e.y===n[1].y||t.x===n[n.length-2].x\u0026\u0026t.y===n[n.length-2].y\u0026\u0026e.x===i.x\u0026\u0026e.y===i.y},kQt=({path:t,obstacles:e,labelBounds:n,originalPath:o,allowLabelBoundaryExtension:i=!1})=\u003e{if(t.length\u003c=2)return t;let r=[...t],s=j5(r),a=!0;for(;a;){a=!1;for(let c=0;c\u003cr.length-3;c++){const l=HCo(r,c);if(l\u003e0){if(zH(r[c],r[c+1],o)||zH(r[l-1],r[l],o))continue;const u=r[c],g=r[l],h=NQt(u,g);for(const d of h){const p=[...r.slice(0,c+1),...d.slice(1,-1),...r.slice(l)],m=kve(d,e),_=Sle(d,n,i?{originalPath:o}:{});if(!m\u0026\u0026!_){const f=j5(p);r=p,s=f,a=!0;break}}if(a)break}}if(!a)for(let c=0;c\u003cr.length-2;c++){const l=Math.min(r.length-c-2,r.length-2);for(let u=1;u\u003c=l;u++){const g=c+u+1;if(g\u003e=r.length||zH(r[c],r[c+1],o)||zH(r[g-1],r[g],o))continue;const h=r[c],d=r[g],p=NQt(h,d);for(const m of p){const _=[...r.slice(0,c+1),...m.slice(1,-1),...r.slice(g)],f=m,I=kve(f,e),C=Sle(f,n,i?{originalPath:o}:{});if(!I\u0026\u0026!C){const y=j5(_);if(y\u003cs||y===s\u0026\u0026_.length\u003cr.length){r=_,s=y,a=!0;break}}}if(a)break}if(a)break}if(!a)for(let c=0;c\u003cr.length-2;c++){const l=r[c],u=r[c+1],g=r[c+2];if(zH(l,u,o)||zH(u,g,o))continue;const h=l.x===u.x\u0026\u0026u.x===g.x,d=l.y===u.y\u0026\u0026u.y===g.y;if(h||d){const p=[...r.slice(0,c+1),...r.slice(c+2)],m=kve([l,g],e),_=Sle([l,g],n,i?{originalPath:o}:{});if(!m\u0026\u0026!_){r=p,a=!0;break}}}}return Qa(r)},Gy=.002,Uc=(t,e)=\u003eMath.abs(t-e)\u003cGy,CB=(t,e)=\u003eUc(t.y,e.y),Yy=(t,e)=\u003eUc(t.x,e.x),OCo=(t,e)=\u003eMath.abs(t.x-e.x)\u003e=Gy||Math.abs(t.y-e.y)\u003e=Gy,JH=(t,e)=\u003eOCo(t,e)?Yy(t,e)?\"vertical\":CB(t,e)?\"horizontal\":null:null,FQt=(t,e)=\u003eMath.min(t.maxAlong,e.maxAlong)-Math.max(t.minAlong,e.minAlong)\u003e=-Gy,fb=(t,e)=\u003eUc(t.x,e.x)\u0026\u0026Uc(t.y,e.y),Fve=t=\u003e{const e=[];for(const n of t)e.some(o=\u003eUc(o,n))||e.push(n);return e},LQt=t=\u003e{const e=[];for(const n of t){const o=e.find(i=\u003eUc(i[0].coordinate,n.coordinate));o?o.push(n):e.push([n])}return e.reduce((n,o)=\u003e{const i=[...o].sort((c,l)=\u003ec.min-l.min);let r=0,s=1,a=i[0].min,A=i[0].max;for(const c of i.slice(1))c.min\u003c=A+Gy?A=Math.max(A,c.max):(r+=A-a,s++,a=c.min,A=c.max);return{length:n.length+r+A-a,segmentCount:n.segmentCount+s}},{length:0,segmentCount:0})},HQt=t=\u003e{const e=[],n=[];for(const r of t)for(let s=0;s\u003cr.tracePath.length-1;s++){const a=r.tracePath[s],A=r.tracePath[s+1];CB(a,A)?e.push({coordinate:a.y,min:Math.min(a.x,A.x),max:Math.max(a.x,A.x)}):Yy(a,A)\u0026\u0026n.push({coordinate:a.x,min:Math.min(a.y,A.y),max:Math.max(a.y,A.y)})}const o=LQt(e),i=LQt(n);return{length:o.length+i.length,segmentCount:o.segmentCount+i.segmentCount}},Y7=t=\u003eHQt(t).length,Qle=t=\u003eHQt(t).segmentCount,GCo=2.5,OQt=t=\u003e{let e=0;for(let n=1;n\u003ct.length;n++){const o=t[n-1],i=t[n];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},YCo=({inputProblem:t,trace:e})=\u003e{const n=t.directConnections.find(a=\u003ea.pinIds.every(A=\u003ee.pinIds.includes(A)));if(!n)return e;const o={};for(const a of t.chips)o[a.chipId]=a;const i=new VH({pins:e.pins,connectionPair:e,inputProblem:{...t,directConnections:[n,...t.directConnections.filter(a=\u003ea!==n)]},chipMap:o});if(i.solve(),!i.solvedTracePath)return e;const r=OQt(e.tracePath),s=OQt(i.solvedTracePath);return r\u003c=s*GCo?e:{...e,tracePath:i.solvedTracePath}},UCo=1e-9,GQt=t=\u003et.slice(1).reduce((e,n,o)=\u003e{const i=t[o];return e+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),KCo=({strictPath:t,boundaryPath:e})=\u003e{const n=j5(e)\u003c=j5(t),o=Math.abs(GQt(e)-GQt(t))\u003c=UCo;return n\u0026\u0026o?e:t},YQt=({targetMspConnectionPairId:t,traces:e,inputProblem:n,allLabelPlacements:o,mergedLabelNetIdMap:i,paddingBuffer:r})=\u003e{const s=e.find(w=\u003ew.mspPairId===t);if(!s)throw new Error(`Target trace ${t} not found`);const a=YCo({inputProblem:n,trace:s}),A=new Set(a.pinIds),c=e.filter(w=\u003ew.mspPairId!==t),l=c.filter(w=\u003e{const M=w.pinIds.some(k=\u003eA.has(k));return w.globalConnNetId!==a.globalConnNetId||!M}),u=.01,g=w=\u003ew.flatMap((M,k)=\u003eM.tracePath.slice(0,-1).map((R,F)=\u003e{const O=M.tracePath[F+1];return{chipId:`trace-obstacle-${k}-${F}`,minX:Math.min(R.x,O.x)-u/2,minY:Math.min(R.y,O.y)-u/2,maxX:Math.max(R.x,O.x)+u/2,maxY:Math.max(R.y,O.y)+u/2}})),h=Hy(n),d=.01,p=h.map(w=\u003e({...w,minX:w.minX-d,minY:w.minY-d,maxX:w.maxX+d,maxY:w.maxY+d})),m=a.tracePath,f=o.filter(w=\u003e{const M=i[w.globalConnNetId];return M?!M.has(a.globalConnNetId):w.globalConnNetId!==a.globalConnNetId}).map(w=\u003e({minX:w.center.x-w.width/2-r,maxX:w.center.x+w.width/2+r,minY:w.center.y-w.height/2-r,maxY:w.center.y+w.height/2+r})),I=w=\u003e{const M=kQt({path:m,obstacles:w,labelBounds:f,originalPath:m}),k=kQt({path:m,obstacles:w,labelBounds:f,originalPath:m,allowLabelBoundaryExtension:!0});return KCo({strictPath:M,boundaryPath:k})},C=I([...p,...g(c)]),y=I([...p,...g(l)]),x=c.filter(w=\u003ew.globalConnNetId===a.globalConnNetId),E=w=\u003e{const M=[...x,{...a,tracePath:w}];return{segmentCount:Qle(M),visibleLength:Y7(M)}},B=j5(C),S=j5(y);let Q=C;if(S\u003cB)Q=y;else if(S===B){const w=E(C),M=E(y);(M.segmentCount\u003cw.segmentCount||M.segmentCount===w.segmentCount\u0026\u0026M.visibleLength\u003cw.visibleLength-Gy)\u0026\u0026(Q=y)}return{...a,tracePath:Q}},VCo=({targetMspConnectionPairId:t,traces:e,inputProblem:n,allLabelPlacements:o,mergedLabelNetIdMap:i,paddingBuffer:r})=\u003e{const s=e.find(I=\u003eI.mspPairId===t);if(!s)throw new Error(`Target trace ${t} not found`);const a=1e-5,A=(I,C)=\u003eMath.abs(I-C)\u003ca,c=e.filter(I=\u003eI.mspPairId!==t),l=.01,u=c.flatMap((I,C)=\u003eI.tracePath.slice(0,-1).map((y,x)=\u003e{const E=I.tracePath[x+1];return{chipId:`trace-obstacle-${C}-${x}`,minX:Math.min(y.x,E.x)-l/2,minY:Math.min(y.y,E.y)-l/2,maxX:Math.max(y.x,E.x)+l/2,maxY:Math.max(y.y,E.y)+l/2}})),h=[...Hy(n).map(I=\u003e({...I,minX:I.minX+a,maxX:I.maxX-a,minY:I.minY+a,maxY:I.maxY-a})),...u],d=(I,C,y)=\u003e{for(const x of y)if(CC(I,C,x))return!0;return!1},m=o.filter(I=\u003e{const C=i[I.globalConnNetId];return C?!C.has(s.globalConnNetId):I.globalConnNetId!==s.globalConnNetId}).map(I=\u003e({minX:I.center.x-I.width/2+a,maxX:I.center.x+I.width/2-a,minY:I.center.y-I.height/2+a,maxY:I.center.y+I.height/2-a})),_=[...s.tracePath];if(_.length\u003c4)return{...s};if(_.length===4){const[I,C,y,x]=_;let E,B;if(A(I.y,C.y)\u0026\u0026A(C.x,y.x)\u0026\u0026A(y.y,x.y)){const w=(I.x+x.x)/2;E={x:w,y:C.y},B={x:w,y:y.y}}else{const w=(I.y+x.y)/2;E={x:C.x,y:w},B={x:y.x,y:w}}return d(I,E,h)||d(E,B,h)||d(B,x,h)||d(I,E,m)||d(E,B,m)||d(B,x,m)||(_[1]=E,_[2]=B),{...s,tracePath:Qa(_)}}for(let I=1;I\u003c_.length-4;I++){const C=_[I],y=_[I+1],x=_[I+2],E=_[I+3],B=A(C.y,y.y)\u0026\u0026A(y.x,x.x)\u0026\u0026A(x.y,E.y),S=A(C.x,y.x)\u0026\u0026A(y.y,x.y)\u0026\u0026A(x.x,E.x),Q=A(C.y,y.y)\u0026\u0026A(y.y,x.y)\u0026\u0026A(x.y,E.y),w=A(C.x,y.x)\u0026\u0026A(y.x,x.x)\u0026\u0026A(x.x,E.x),M=Q||w;let k=!1;if(B?k=Math.sign(y.x-C.x)===Math.sign(E.x-x.x):S\u0026\u0026(k=Math.sign(y.y-C.y)===Math.sign(E.y-x.y)),!((B||S)\u0026\u0026!M\u0026\u0026k))continue;let F,O;const U=Math.abs(B?C.x-y.x:C.y-y.y),Y=Math.abs(B?x.x-E.x:x.y-E.y);if(Math.abs(U-Y)\u003c.001)continue;if(B){const te=(C.x+E.x)/2;F={x:te,y:y.y},O={x:te,y:x.y}}else{const te=(C.y+E.y)/2;F={x:y.x,y:te},O={x:x.x,y:te}}d(C,F,h)||d(F,O,h)||d(O,E,h)||d(C,F,m)||d(F,O,m)||d(O,E,m)||(_[I+1]=F,_[I+2]=O,I=0)}const f=Qa(_);return{...s,tracePath:f}},UQt=(t,e,n)=\u003et===\"vertical\"?{minX:0,maxX:0,minY:e,maxY:n}:{minX:e,maxX:n,minY:0,maxY:0},zCo=(t,e,n)=\u003e{const o=fct(e,n);return o?(t===\"vertical\"?o.maxY-o.minY:o.maxX-o.minX)\u003eGy:!1},JCo=({group:t,originalCoordinates:e,otherNetTraces:n})=\u003e{const o=t[0].orientation,i=t.map(a=\u003eUQt(o,a.minAlong,a.maxAlong)),r=ECo,s=[];for(const a of n)for(let A=0;A\u003ca.tracePath.length-1;A++){const c=a.tracePath[A],l=a.tracePath[A+1];if(JH(c,l)!==o)continue;const u=o===\"vertical\"?Math.min(c.y,l.y):Math.min(c.x,l.x),g=o===\"vertical\"?Math.max(c.y,l.y):Math.max(c.x,l.x),h=UQt(o,u,g);if(!i.some(m=\u003ezCo(o,m,h)))continue;const d=o===\"vertical\"?c.x:c.y;e.some(m=\u003eMath.abs(m-d)\u003c=vQt)\u0026\u0026s.push(d-r,d+r)}return Fve(s)},yC=1e-6,WCo=t=\u003ejCo(t.pinIds)\u003e=2,yB=(t,e)=\u003eMath.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)\u003eyC\u0026\u0026Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)\u003eyC,Lve=t=\u003e{const e=[];for(let n=1;n\u003ct.length-1;n++){const o=t[n-1],i=t[n],r=t[n+1];$Co(o,i,r)\u0026\u0026e.push(i)}return e},jl=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++)if(qCo(e,t[n],t[n+1]))return!0;return!1},KQt=(t,e)=\u003eMath.abs(t.x-e.x)+Math.abs(t.y-e.y),jCo=t=\u003enew Set(t).size,$Co=(t,e,n)=\u003eHve(t,e)!==Hve(e,n),qCo=(t,e,n)=\u003eHve(e,n)===\"horizontal\"?Math.abs(t.y-e.y)\u003c=yC\u0026\u0026t.x\u003e=Math.min(e.x,n.x)-yC\u0026\u0026t.x\u003c=Math.max(e.x,n.x)+yC:Math.abs(t.x-e.x)\u003c=yC\u0026\u0026t.y\u003e=Math.min(e.y,n.y)-yC\u0026\u0026t.y\u003c=Math.max(e.y,n.y)+yC,Hve=(t,e)=\u003eMath.abs(t.y-e.y)\u003c=yC?\"horizontal\":\"vertical\",XCo=(t,e)=\u003e{const n=t[0].globalConnNetId,o=e.filter(s=\u003es.globalConnNetId===n),i=new Set(t.map(s=\u003es.traceId)),r=new Set(o.filter(s=\u003ei.has(s.mspPairId)).flatMap(s=\u003es.pinIds));for(let s=!0;s;){s=!1;for(const a of o)if(!i.has(a.mspPairId)\u0026\u0026a.pinIds.some(A=\u003er.has(A))){i.add(a.mspPairId);for(const A of a.pinIds)r.add(A);s=!0}}return i},ZCo=(t,e,n)=\u003e{const o=XCo(t,n);return e.filter(i=\u003ei.mspConnectionPairIds.some(r=\u003eo.has(r)))},VQt=(t,e,n)=\u003e{const o=new Map(n.map(m=\u003e[m.mspPairId,m])),i=new Set(t.map(m=\u003em.traceId)),r=[...i].every(m=\u003eo.get(m)?.pins.every(_=\u003e_.chipId===t[0].componentId)===!0);if(![...i].every(m=\u003eo.get(m)?.tracePath.length===4))return null;const a=t[0].orientation,A=ZCo(t,e,n),c=new Set(A.filter(m=\u003ea===\"vertical\"\u0026\u0026(m.orientation===\"y+\"||m.orientation===\"y-\")||a===\"horizontal\"\u0026\u0026(m.orientation===\"x+\"||m.orientation===\"x-\"))),l=A.filter(m=\u003em.orientation!==t[0].componentFacingDirection\u0026\u0026(!r||!c.has(m))?!1:m.mspConnectionPairIds.some(_=\u003e{const f=o.get(_);return f\u0026\u0026jl(f.tracePath,m.anchorPoint)})),u=Fve(l.map(m=\u003ea===\"vertical\"?m.anchorPoint.x:m.anchorPoint.y));if(u.length!==1)return null;const g=u[0],h=t.find(m=\u003eMath.abs(m.coordinate-g)\u003c=Gy)?.coordinate??g;if(l.some(m=\u003em.mspConnectionPairIds.some(_=\u003e(o.get(_)?.tracePath.length??0)\u003e4)))return h;if(l.some(m=\u003ec.has(m))){const m=Math.max(...t.map(f=\u003ef.maxAlong))-Math.min(...t.map(f=\u003ef.minAlong));return t.every(f=\u003eMath.abs(f.coordinate-h)\u003c=m+Gy)?h:null}return t.every(m=\u003e{const _=o.get(m.traceId);return _?Math.abs(m.coordinate-h)\u003c=ad(_.pins[0],_.pins[1])+Gy:!1})?h:null},eyo=(t,e,n)=\u003e{const o=new Set;for(const s of e)Uc(s.coordinate,n)||(o.add(s.segmentIndex),o.add(s.segmentIndex+1));const i=e[0].orientation,r=Qa(t.tracePath.map((s,a)=\u003eo.has(a)?i===\"vertical\"?{...s,x:n}:{...s,y:n}:s));return{...t,tracePath:r}},zQt=(t,e)=\u003enew Set(e.filter(n=\u003en.globalConnNetId===t.globalConnNetId\u0026\u0026jl(n.tracePath,t.anchorPoint)).map(n=\u003en.mspPairId)),hj=(t,e,n)=\u003et.every(o=\u003e{const i=zQt(o,e);if(i.size===0)return!0;const r=zQt(o,n);return[...i].every(s=\u003er.has(s))}),Rg=1e-9,Ove=(t,e,n)=\u003e{const o=Math.abs(t.x-e.x)\u003cRg,i=Math.abs(t.y-e.y)\u003cRg;return o?Math.abs(t.x-n.minX)\u003cRg||Math.abs(t.x-n.maxX)\u003cRg:i?Math.abs(t.y-n.minY)\u003cRg||Math.abs(t.y-n.maxY)\u003cRg:!1},tyo=t=\u003et.map(e=\u003e`${e.x},${e.y}`).join(\";\"),U7=t=\u003e{let e=0;for(let n=0;n\u003ct.length-1;n++)e+=Math.abs(t[n+1].x-t[n].x)+Math.abs(t[n+1].y-t[n].y);return e},JQt=(t,e)=\u003eMath.abs(t.x-e.x)+Math.abs(t.y-e.y),WQt=(t,e)=\u003eMath.abs(t.x-e.x)\u003cRg||Math.abs(t.y-e.y)\u003cRg,jQt=(t,e)=\u003eMath.abs(t.y-e.y)\u003cRg?\"horizontal\":\"vertical\",Gve=(t,e,n)=\u003eMath.abs(e.x-n.x)\u003cRg?{x:e.x,y:Math.min(Math.max(t.y,Math.min(e.y,n.y)),Math.max(e.y,n.y))}:Math.abs(e.y-n.y)\u003cRg?{x:Math.min(Math.max(t.x,Math.min(e.x,n.x)),Math.max(e.x,n.x)),y:e.y}:e,nyo=(t,e,n)=\u003eJQt(t,Gve(t,e,n)),oyo=t=\u003e{const e=[];for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];WQt(o,i)\u0026\u0026e.push({start:o,end:i,orientation:jQt(o,i)})}return e},iyo=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];if(WQt(o,i)\u0026\u0026!(nyo(e,o,i)\u003e1e-6))return{index:n,start:o,end:i,orientation:jQt(o,i)}}return null},ryo=(t,e)=\u003ee.orientation===\"horizontal\"?t.x\u003e=Math.min(e.start.x,e.end.x)-Rg\u0026\u0026t.x\u003c=Math.max(e.start.x,e.end.x)+Rg:t.y\u003e=Math.min(e.start.y,e.end.y)-Rg\u0026\u0026t.y\u003c=Math.max(e.start.y,e.end.y)+Rg,syo=(t,e,n,o,i)=\u003e{const r=oyo(t).filter(c=\u003ec.orientation===o);if(r.length===0)return null;const s=r.filter(c=\u003eryo(i,c)),a=s.length\u003e0?s:r;return e\u003cn/2?a[0]:a[a.length-1]},ayo=(t,e)=\u003e{let n=null,o=Number.POSITIVE_INFINITY;for(let i=0;i\u003ce.length-1;i++){const r=Gve(t,e[i],e[i+1]),s=JQt(t,r);s\u003co\u0026\u0026(n=r,o=s)}return n},$Qt=(t,e,n,o)=\u003e{const i=Math.abs(t.x-e.x)\u003cRg,r=Math.abs(n.x-o.x)\u003cRg,s=(u,g,h)=\u003eu\u003e=Math.min(g,h)-Rg\u0026\u0026u\u003c=Math.max(g,h)+Rg;if(i\u0026\u0026r)return Math.abs(t.x-n.x)\u003eRg?!1:Math.min(Math.max(t.y,e.y),Math.max(n.y,o.y))-Math.max(Math.min(t.y,e.y),Math.min(n.y,o.y))\u003eRg;if(!i\u0026\u0026!r)return Math.abs(t.y-n.y)\u003eRg?!1:Math.min(Math.max(t.x,e.x),Math.max(n.x,o.x))-Math.max(Math.min(t.x,e.x),Math.min(n.x,o.x))\u003eRg;const a=i?t:n,A=i?e:o,c=i?n:t,l=i?o:e;return s(a.x,c.x,l.x)\u0026\u0026s(c.y,a.y,A.y)},vle=(t,e)=\u003e{let n=0;for(let o=0;o\u003ct.length-1;o++)for(let i=0;i\u003ce.length-1;i++)$Qt(t[o],t[o+1],e[i],e[i+1])\u0026\u0026n++;return n},qQt=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)if(CC(o,i,r)\u0026\u0026!Ove(o,i,r))return!0}return!1},Ayo=(t,e)=\u003e{let n=0;for(const o of t)for(const i of e)o.globalConnNetId!==i.globalConnNetId\u0026\u0026(n+=vle(o.tracePath,i.tracePath));return n},XQt=(t,e)=\u003e({turnCount:t.reduce((n,o)=\u003en+j5(o.tracePath),0),visibleLength:Y7(t),pathLength:t.reduce((n,o)=\u003en+U7(o.tracePath),0),otherNetCrossings:Ayo(t,e)}),cyo=(t,e)=\u003et.turnCount!==e.turnCount?t.turnCount\u003ce.turnCount:Uc(t.visibleLength,e.visibleLength)?Uc(t.pathLength,e.pathLength)?t.otherNetCrossings!==e.otherNetCrossings?t.otherNetCrossings\u003ce.otherNetCrossings:Uc(t.displacement,e.displacement)?t.coordinate\u003ce.coordinate:t.displacement\u003ce.displacement:t.pathLength\u003ce.pathLength:t.visibleLength\u003ce.visibleLength,lyo=(t,e)=\u003et.turnCount\u003c=e.turnCount\u0026\u0026(t.turnCount\u003ce.turnCount||t.visibleLength\u003c=e.visibleLength+Gy),uyo=(t,e)=\u003et.tracePath.length!==e.tracePath.length||e.tracePath.some((n,o)=\u003e!fb(n,t.tracePath[o])),gyo=({group:t,traces:e,netLabelPlacements:n,obstacles:o,eligibleTraceIds:i})=\u003e{const r=new Set(t.map(d=\u003ed.traceId)),s=e.filter(d=\u003er.has(d.mspPairId)),a=XQt(s,e),A=Fve(t.map(d=\u003ed.coordinate)),c=VQt(t,n,e),l=e.filter(d=\u003ed.globalConnNetId!==t[0].globalConnNetId),u=e.filter(d=\u003ed.globalConnNetId===t[0].globalConnNetId\u0026\u0026!i.has(d.mspPairId)),g=(d,p)=\u003e{let m=null;for(const _ of d){const f=new Map;for(const Q of s){const w=eyo(Q,t.filter(M=\u003eM.traceId===Q.mspPairId),_);f.set(Q.mspPairId,w)}const I=[...f.values()],C=e.map(Q=\u003ef.get(Q.mspPairId)??Q);if(!I.every(Q=\u003e!ON(Q.tracePath,o)\u0026\u0026Jh({traces:[Q],netLabels:n}).length===0\u0026\u0026!PQt(Q.tracePath,l)\u0026\u0026!nw(Q.tracePath,u.filter(w=\u003ew.mspPairId!==Q.mspPairId)))||!hj(n,e,C))continue;const x=XQt(I,C);if(x.otherNetCrossings\u003ea.otherNetCrossings||(p?.coordinateIsFixedByLabel?x.turnCount\u003ea.turnCount:!lyo(x,a)))continue;const E={...x,displacement:t.reduce((Q,w)=\u003eQ+Math.abs(w.coordinate-_),0),coordinate:_},B=I.filter(Q=\u003e{const w=e.find(M=\u003eM.mspPairId===Q.mspPairId);return uyo(w,Q)}).map(Q=\u003eQ.mspPairId);if(B.length===0)continue;const S={traces:C,changedTraceIds:B,score:E};(!m||cyo(S.score,m.score))\u0026\u0026(m=S)}return m},h=g(c===null?A:[c],{coordinateIsFixedByLabel:c!==null});return h||(c!==null?null:g(JCo({group:t,originalCoordinates:A,otherNetTraces:l})))},dyo=t=\u003e{const e=[],n=t.tracePath;for(let o=1;o\u003cn.length-2;o++){const i=n[o-1],r=n[o],s=n[o+1],a=n[o+2],A=JH(r,s);if(!A)continue;const c=JH(i,r),l=JH(s,a);if(!c||!l||c===A||l===A)continue;const u=A===\"vertical\"?[r.y,s.y]:[r.x,s.x];e.push({traceId:t.mspPairId,segmentIndex:o,globalConnNetId:t.globalConnNetId,orientation:A,coordinate:A===\"vertical\"?r.x:r.y,minAlong:Math.min(...u),maxAlong:Math.max(...u)})}return e},hyo=(t,e,n)=\u003e{const o=e.center.x-e.width/2,i=e.center.x+e.width/2,r=e.center.y-e.height/2,s=e.center.y+e.height/2;switch(n){case\"x-\":return t.orientation===\"vertical\"\u0026\u0026t.coordinate\u003c=o+Gy;case\"x+\":return t.orientation===\"vertical\"\u0026\u0026t.coordinate\u003e=i-Gy;case\"y+\":return t.orientation===\"horizontal\"\u0026\u0026t.coordinate\u003e=s-Gy;case\"y-\":return t.orientation===\"horizontal\"\u0026\u0026t.coordinate\u003c=r+Gy}},ZQt=(t,e,n)=\u003e{const o=[],i=ad(t.pins[0],t.pins[1])\u003c=(n?.maxMspPairDistance??uj);for(const r of dyo(t)){const s=t.pins.flatMap((c,l)=\u003e{const u=e.get(c.chipId);if(!u)return[];const g=c._facingDirection??W5(c,u);return hyo(r,u,g)?[{componentId:u.chipId,componentFacingDirection:g,distanceFromEndpoint:l===0?r.segmentIndex:t.tracePath.length-2-r.segmentIndex}]:[]});s.sort((c,l)=\u003ec.distanceFromEndpoint-l.distanceFromEndpoint);const a=s[0]?.distanceFromEndpoint,A=new Set;for(const c of s){if(A.size\u003e0\u0026\u0026(!n?.includeTiedEndpointAssociations||!i))break;if(c.distanceFromEndpoint!==a)continue;const l=`${c.componentId}:${c.componentFacingDirection}`;A.has(l)||(A.add(l),o.push({...r,...c}))}}return o},pyo=(t,e)=\u003e{const n=Math.max(t.minAlong,e.minAlong),o=Math.min(t.maxAlong,e.maxAlong),i=(n+o)/2;return t.orientation===\"vertical\"?[{x:t.coordinate,y:i},{x:e.coordinate,y:i}]:[{x:i,y:t.coordinate},{x:i,y:e.coordinate}]},myo=(t,e,n)=\u003e{if(!FQt(t,e))return!0;const[o,i]=pyo(t,e);return!n.some(r=\u003eCC(o,i,r))},_yo=(t,e,n)=\u003e{if(t.traceId===e.traceId)return!0;const o=new Set(n.get(t.traceId).pins.map(i=\u003ei.pinId));return n.get(e.traceId).pins.some(i=\u003eo.has(i.pinId))},fyo=(t,e,n,o,i)=\u003en.globalConnNetId===t.globalConnNetId\u0026\u0026n.orientation===t.orientation\u0026\u0026n.componentId===t.componentId\u0026\u0026n.componentFacingDirection===t.componentFacingDirection\u0026\u0026(FQt(e,n)||_yo(e,n,o))\u0026\u0026myo(e,n,i),Iyo=(t,e,n,o,i)=\u003e{const r=new Map(n.chips.map(p=\u003e[p.chipId,p])),s=new Map(t.map(p=\u003e[p.mspPairId,p])),a=t.filter(p=\u003ee.has(p.mspPairId)),A=p=\u003e{const m=new Set,_=[];for(let f=0;f\u003cp.length;f++){if(m.has(f))continue;const I=p[f],C=[f],y=[];m.add(f);for(let x=0;x\u003cC.length;x++){const E=p[C[x]];y.push(E);for(let B=0;B\u003cp.length;B++){if(m.has(B))continue;const S=p[B];fyo(I,E,S,s,o)\u0026\u0026(m.add(B),C.push(B))}}_.push(y)}return _},c=p=\u003e[p[0].componentId,p[0].componentFacingDirection,p[0].orientation,...p.map(m=\u003e`${m.traceId}:${m.segmentIndex}`).sort()].join(\"|\"),l=[],u=new Set,g=(p,m)=\u003e{if(new Set(p.map(x=\u003ex.traceId)).size\u003c2)return;const f=VQt(p,i,t);if(m?.requireFixedLabel\u0026\u0026f===null)return;const I=p.some(x=\u003e!Uc(x.coordinate,p[0].coordinate)),C=f!==null\u0026\u0026!Uc(f,p[0].coordinate);if(!I\u0026\u0026!C)return;const y=c(p);u.has(y)||(u.add(y),l.push(p))},h=a.flatMap(p=\u003eZQt(p,r));for(const p of A(h))g(p);const d=a.flatMap(p=\u003eZQt(p,r,{includeTiedEndpointAssociations:!0,maxMspPairDistance:n.maxMspPairDistance}));for(const p of A(d))g(p,{requireFixedLabel:!0});return l},evt=t=\u003eJSON.stringify(t.map(e=\u003e({mspPairId:e.mspPairId,tracePath:e.tracePath}))),Cyo=({inputProblem:t,traces:e,netLabelPlacements:n,eligibleTraceIds:o})=\u003e{let i=[...e];const r=new Set([evt(i)]),s=Hy(t),a=new Set;let A=0;const c=Math.max(1,e.reduce((l,u)=\u003el+u.tracePath.length,0));for(let l=0;l\u003cc;l++){const u=Iyo(i,o,t,s,n);let g=null;for(const p of u)if(g=gyo({group:p,traces:i,netLabelPlacements:n,obstacles:s,eligibleTraceIds:o}),g)break;if(!g)break;const h=evt(g.traces),d=r.has(h);d||r.add(h),i=g.traces,A++;for(const p of g.changedTraceIds)a.add(p);if(d)break}return{traces:i,alignedRailGroupCount:A,alignedTraceCount:a.size}},yyo=t=\u003e{const e=[];if(t.length\u003c3)return e;for(let n=0;n\u003ct.length-2;n++){const o=t[n],i=t[n+1],r=t[n+2],s=i.x-o.x,a=i.y-o.y,A=r.x-i.x,c=r.y-i.y;(s===0\u0026\u0026c===0\u0026\u0026a!==0\u0026\u0026A!==0||a===0\u0026\u0026A===0\u0026\u0026s!==0\u0026\u0026c!==0)\u0026\u0026s*s+a*a\u003e=.25\u0026\u0026A*A+c*c\u003e=.25\u0026\u0026e.push({p1:o,p2:i,p3:r})}return e},xyo=(t,e)=\u003e{const n=[];for(const o of t)o.mspPairId!==e\u0026\u0026n.push({points:o.tracePath});return n},wle=1e-6,tvt=(t,e,n)=\u003e{const o=[];for(const i of n){const r=i.points;for(let s=0;s\u003cr.length-1;s++){const a=r[s],A=r[s+1];if(!a||!A)continue;const c=V4(t,e,a,A);c\u0026\u0026o.push(c)}}return o},Eyo=(t,e)=\u003eMath.abs(t.x-e.x)\u003cwle\u0026\u0026Math.abs(t.y-e.y)\u003cwle,WH=(t,e,n={})=\u003e{const o=[],i=n.includeTerminalSegments?0:1,r=n.includeTerminalSegments?t.length-1:t.length-2,s=n.includeTerminalSegments?0:1,a=n.includeTerminalSegments?e.length-1:e.length-2;for(let A=i;A\u003cr;A++){const c=t[A],l=t[A+1],u=Math.abs(c.x-l.x)\u003cwle;for(let g=s;g\u003ca;g++){const h=e[g],d=e[g+1],p=Math.abs(h.x-d.x)\u003cwle;if(u===p)continue;const m=V4(c,l,h,d);!m||[c,l,h,d].some(_=\u003eEyo(_,m))||o.push({pathSegmentIndex:A,otherPathSegmentIndex:g})}}return o},K7=1e-6,ow=(t,e,n=K7)=\u003eMath.abs(t.x-e.x)\u003cn,Byo=({lShape:t,rectangle:e,padding:n=.5,interactionPoint1:o,interactionPoint2:i})=\u003e{const{p1:r,p2:s,p3:a}=t,{x:A,y:c,width:l,height:u}=e;let g,h=o,d=i;if(Math.abs(s.x-A)\u003cK7\u0026\u0026Math.abs(s.y-(c+u))\u003cK7)g={x:A+l+n,y:c-n},ow(r,s)?h={x:o.x,y:o.y-n}:h={x:o.x+n,y:o.y},ow(s,a)?d={x:i.x,y:i.y-n}:d={x:i.x+n,y:i.y};else if(Math.abs(s.x-(A+l))\u003cK7\u0026\u0026Math.abs(s.y-(c+u))\u003cK7)g={x:A-n,y:c-n},ow(r,s)?h={x:o.x,y:o.y-n}:h={x:o.x-n,y:o.y},ow(s,a)?d={x:i.x,y:i.y-n}:d={x:i.x-n,y:i.y};else if(Math.abs(s.x-A)\u003cK7\u0026\u0026Math.abs(s.y-c)\u003cK7)g={x:A+l+n,y:c+u+n},ow(r,s)?h={x:o.x,y:o.y+n}:h={x:o.x+n,y:o.y},ow(s,a)?d={x:i.x,y:i.y+n}:d={x:i.x+n,y:i.y};else if(Math.abs(s.x-(A+l))\u003cK7\u0026\u0026Math.abs(s.y-c)\u003cK7)g={x:A-n,y:c+u+n},ow(r,s)?h={x:o.x,y:o.y+n}:h={x:o.x-n,y:o.y},ow(s,a)?d={x:i.x,y:i.y+n}:d={x:i.x-n,y:i.y};else return[];return[[h,g,d]]},nvt=({trace:t,chipBounds:e,clearance:n})=\u003e{if(t.tracePath.length\u003c4||e.length===0)return[];const o=t.tracePath[0],i=t.tracePath[1],r=t.tracePath.at(-2),s=t.tracePath.at(-1),a=Math.min(...e.map(g=\u003eg.minX))-n,A=Math.max(...e.map(g=\u003eg.maxX))+n,c=Math.min(...e.map(g=\u003eg.minY))-n,l=Math.max(...e.map(g=\u003eg.maxY))+n,u=[];for(const g of[a,A])for(const h of[c,l])u.push({traceId:t.mspPairId,path:Qa([o,i,{x:i.x,y:h},{x:g,y:h},{x:g,y:r.y},r,s])}),u.push({traceId:t.mspPairId,path:Qa([o,i,{x:g,y:i.y},{x:g,y:h},{x:r.x,y:h},r,s])});return u},Yve=({trace:t,segmentIndex:e,obstacleStart:n,obstacleEnd:o,obstacleBounds:i,chipBounds:r,clearance:s})=\u003e{const a=(l,u)=\u003e{const g=l[u],h=l[u+1],d=Math.abs(g.x-h.x)\u003cK7?\"y\":\"x\",p=d===\"x\"?\"y\":\"x\",m=i??{minX:Math.min(n.x,o.x),minY:Math.min(n.y,o.y),maxX:Math.max(n.x,o.x),maxY:Math.max(n.y,o.y)},_=d===\"x\"?\"minX\":\"minY\",f=d===\"x\"?\"maxX\":\"maxY\";let I=n[d]+Math.sign(g[d]-n[d])*s;if(i){const M=g[d]\u003c(m[_]+m[f])/2?-1:1;I=m[M\u003c0?_:f]+M*s}const C=p===\"x\"?\"minX\":\"minY\",y=p===\"x\"?\"maxX\":\"maxY\",x=m[C]-s,E=m[y]+s,B=i?l[u+2]:void 0,Q=[B?B[p]\u003cx?(B[p]+x)/2:B[p]\u003eE?(B[p]+E)/2:void 0:void 0,x,E,...r.flatMap(M=\u003e[M[C]-s,M[y]+s])].filter(M=\u003eM!==void 0),w=l.slice(u+2);return w.length===0\u0026\u0026w.push(h),[...new Set(Q)].map(M=\u003eQa([...l.slice(0,u+1),{...g,[d]:I},{...g,[d]:I,[p]:M},{...h,[p]:M},...w]))},A=[...t.tracePath].reverse(),c=t.tracePath.length-2-e;return[...a(t.tracePath,e),...a(A,c).map(l=\u003el.reverse())].map(l=\u003e({traceId:t.mspPairId,path:l}))},Ple=(t,e,n)=\u003e{if(t.length\u003c2)return{isColliding:!1};for(let o=0;o\u003ct.length-1;o++){const i=t[o],r=t[o+1];for(const s of e)if(s.mspPairId!==n)for(let a=0;a\u003cs.tracePath.length-1;a++){const A=s.tracePath[a],c=s.tracePath[a+1],l=V4(i,r,A,c);if(l)return{isColliding:!0,collidingTraceId:s.mspPairId,collisionPoint:l}}}return{isColliding:!1}},byo=(t,e)=\u003e{const n=[];for(const o of t)for(const i of e){const r=Math.min(o.x,i.x),s=Math.min(o.y,i.y),a=Math.max(o.x,i.x),A=Math.max(o.y,i.y),c=a-r,l=A-s;c\u003e1e-6\u0026\u0026l\u003e1e-6\u0026\u0026n.push({rect:{x:r,y:s,width:c,height:l},i1:o,i2:i})}return n},Mle=t=\u003e{const e={circles:[],lines:[]},n=Array.isArray(t)?t:[t];for(const o of n)e.circles.push({center:{x:o.p2.x,y:o.p2.y},radius:.01,fill:\"blue\"}),e.lines.push({points:[o.p1,o.p2,o.p3],strokeColor:\"lightblue\"});return e},ovt=(t,e=\"red\")=\u003e{const n={circles:[]};for(const o of t)n.circles.push({center:{x:o.x,y:o.y},radius:.01,fill:e});return n},ivt=t=\u003e{const e={rects:[]};return e.rects.push({center:{x:t.x+t.width/2,y:t.y+t.height/2},width:t.width,height:t.height,stroke:\"green\"}),e},Syo=(t,e=\"gray\",n=[])=\u003e{const o={lines:[],circles:[]};for(const i of t)o.lines.push({points:i,strokeColor:e});for(const i of n)o.circles.push({center:i,radius:.01,fill:\"green\"});return o},Uve=t=\u003e{const e={lines:[],points:[],rects:[],circles:[],texts:[]};for(const n of t)n\u0026\u0026(n.lines\u0026\u0026e.lines.push(...n.lines),n.points\u0026\u0026e.points.push(...n.points),n.rects\u0026\u0026e.rects.push(...n.rects),n.circles\u0026\u0026e.circles.push(...n.circles),n.texts\u0026\u0026e.texts.push(...n.texts));return e},Qyo=t=\u003e{const e={circles:[]};return t?.isColliding\u0026\u0026t.collisionPoint\u0026\u0026e.circles.push({center:t.collisionPoint,radius:.01,fill:\"red\"}),e},vyo=class extends Ng{input;chipObstacleSpatialIndex;lShapesToProcess=[];ignoredCrossings=new Set;reroutedTraceIds=new Set;processingCrossings=!0;visualizationMode=\"l_shapes\";currentLShape=null;intersectionPoints=[];tightRectangle=null;candidates=[];bestRoute=null;lastCollision=null;collidingCandidate=null;rectangleCandidates=[];currentRectangleIndex=0;isInitialStep=!0;currentCandidateIndex=0;lShapeProcessingStep=\"idle\";lShapeJustProcessed=!1;bestRouteFound=null;constructor(t){super(),this.input=t,this.visualizationMode=\"l_shapes\",this.chipObstacleSpatialIndex=this.input.inputProblem._chipObstacleSpatialIndex??new yle(this.input.inputProblem.chips),this.input.inputProblem._chipObstacleSpatialIndex||(this.input.inputProblem._chipObstacleSpatialIndex=this.chipObstacleSpatialIndex)}_step(){if(this.isInitialStep){this.isInitialStep=!1;return}if(this.processingCrossings){const t=this._findCrossing();if(t){this._resolveCrossing(t)||this.ignoredCrossings.add(this._crossingKey(t));return}this.processingCrossings=!1,this._initializeLShapes();return}if(this.lShapeJustProcessed){this._resetAfterLShapProcessing();return}if(this.lShapesToProcess.length===0\u0026\u0026this.currentLShape===null){this.solved=!0;return}switch(this.lShapeProcessingStep){case\"idle\":this._handleIdleStep();break;case\"intersections\":this._handleIntersectionsStep();break;case\"rectangle_selection\":this._handleRectangleSelectionStep();break;case\"candidate_evaluation\":this._handleCandidateEvaluationStep();break}}_initializeLShapes(){for(const t of this.input.allTraces)this.lShapesToProcess.push(...yyo(t.tracePath).map(e=\u003e({...e,traceId:t.mspPairId})))}_crossingKey(t){return`${t.trace.mspPairId}:${t.segmentIndex}:${t.otherTrace.mspPairId}:${t.otherSegmentIndex}`}_isTraceBundle(t,e){const n=o=\u003eo.pins.map(i=\u003ei.chipId).sort().join(\":\");return n(t)!==n(e)?!1:Object.values(this.input.mergedLabelNetIdMap).some(o=\u003eo.has(t.globalConnNetId)\u0026\u0026o.has(e.globalConnNetId))}_findCrossing(){const t=this.input.allTraces;for(let e=0;e\u003ct.length;e++){const n=t[e];for(let o=e+1;o\u003ct.length;o++){const i=t[o];if(n.globalConnNetId===i.globalConnNetId)continue;const r=this._isTraceBundle(n,i),s=this.input.eligibleTraceIds?.has(n.mspPairId)===!0||this.input.eligibleTraceIds?.has(i.mspPairId)===!0;if(!r\u0026\u0026!s\u0026\u0026!this.reroutedTraceIds.has(n.mspPairId)\u0026\u0026!this.reroutedTraceIds.has(i.mspPairId))continue;const a=WH(n.tracePath,i.tracePath);for(const{pathSegmentIndex:A,otherPathSegmentIndex:c}of a){const l={trace:n,segmentIndex:A,otherTrace:i,otherSegmentIndex:c,isInitialBundleCrossing:r};if(!this.ignoredCrossings.has(this._crossingKey(l)))return l}}}return null}_resolveCrossing(t){const e=this.chipObstacleSpatialIndex.chips.map(a=\u003ea.bounds),n=[...Yve({trace:t.trace,segmentIndex:t.segmentIndex,obstacleStart:t.otherTrace.tracePath[t.otherSegmentIndex],obstacleEnd:t.otherTrace.tracePath[t.otherSegmentIndex+1],chipBounds:e,clearance:this.input.paddingBuffer}),...Yve({trace:t.otherTrace,segmentIndex:t.otherSegmentIndex,obstacleStart:t.trace.tracePath[t.segmentIndex],obstacleEnd:t.trace.tracePath[t.segmentIndex+1],chipBounds:e,clearance:this.input.paddingBuffer}),...nvt({trace:t.trace,chipBounds:e,clearance:this.input.paddingBuffer}),...nvt({trace:t.otherTrace,chipBounds:e,clearance:this.input.paddingBuffer})],o=Hy(this.input.inputProblem).filter(a=\u003ea.kind===\"chip\"),r=n.map(a=\u003e({...a,collision:Ple(a.path,this.input.allTraces,a.traceId)})).filter(a=\u003e!qQt(a.path,o)\u0026\u0026!Ple(a.path,[t.trace,t.otherTrace],a.traceId).isColliding\u0026\u0026(t.isInitialBundleCrossing||!a.collision.isColliding)).sort((a,A)=\u003eNumber(a.collision.isColliding)-Number(A.collision.isColliding)||U7(a.path)-U7(A.path))[0];if(!r)return!1;const s=this.input.allTraces.findIndex(a=\u003ea.mspPairId===r.traceId);return this.input.allTraces[s]={...this.input.allTraces[s],tracePath:r.path},this.reroutedTraceIds.add(r.traceId),!0}_resetAfterLShapProcessing(){this.lShapeProcessingStep=\"idle\",this.currentLShape=null,this.currentCandidateIndex=0,this.lShapeJustProcessed=!1,this.visualizationMode=\"l_shapes\",this.intersectionPoints=[],this.tightRectangle=null,this.candidates=[],this.bestRoute=null,this.lastCollision=null,this.collidingCandidate=null}_handleIdleStep(){if(this.currentLShape=this.lShapesToProcess.shift(),!this.currentLShape){this.solved=!0;return}this.lShapeProcessingStep=\"intersections\",this.visualizationMode=\"l_shapes\"}_handleIntersectionsStep(){if(!this.currentLShape.traceId){this.lShapeProcessingStep=\"idle\";return}const t=xyo(this.input.allTraces,this.currentLShape.traceId),e=tvt(this.currentLShape.p1,this.currentLShape.p2,t),n=tvt(this.currentLShape.p2,this.currentLShape.p3,t);if(this.intersectionPoints=[...e,...n],e.length===0||n.length===0){this.lShapeProcessingStep=\"idle\";return}this.rectangleCandidates=byo(e,n),this.currentRectangleIndex=0,this.lShapeProcessingStep=\"rectangle_selection\"}_handleRectangleSelectionStep(){if(this.currentRectangleIndex\u003e=this.rectangleCandidates.length){this.lShapeProcessingStep=\"idle\";return}const{rect:t,i1:e,i2:n}=this.rectangleCandidates[this.currentRectangleIndex];this.tightRectangle=t,this.candidates=Byo({lShape:this.currentLShape,rectangle:this.tightRectangle,padding:2*this.input.paddingBuffer,interactionPoint1:e,interactionPoint2:n}),this.currentCandidateIndex=0,this.lastCollision=null,this.collidingCandidate=null,this.visualizationMode=\"candidates\",this.lShapeProcessingStep=\"candidate_evaluation\"}_handleCandidateEvaluationStep(){if(this.visualizationMode=\"candidates\",this.bestRouteFound){this._applyBestRoute(this.bestRouteFound),this.bestRouteFound=null;return}if(this.currentCandidateIndex\u003e=this.candidates.length){this.currentRectangleIndex++,this.lShapeProcessingStep=\"rectangle_selection\";return}const t=this.candidates[this.currentCandidateIndex],e=Ple(t,this.input.allTraces,this.currentLShape.traceId);if(!e?.isColliding\u0026\u0026this._doesCandidateCrossChip(t)){this.lastCollision=null,this.collidingCandidate=t,this.currentCandidateIndex++;return}e?.isColliding?(this.lastCollision=e,this.collidingCandidate=t,this.currentCandidateIndex++):(this.bestRouteFound=t,this.lastCollision=null,this.collidingCandidate=null)}_doesCandidateCrossChip(t){for(let e=0;e\u003ct.length-1;e++)if(this.chipObstacleSpatialIndex.doesOrthogonalLineIntersectChip([t[e],t[e+1]]))return!0;return!1}_applyBestRoute(t){this.bestRoute=t,this.collidingCandidate=null,this.lastCollision=null;const e=this.input.allTraces.findIndex(n=\u003en.mspPairId===this.currentLShape.traceId);if(e!==-1){const n=this.input.allTraces[e],o=n.tracePath.findIndex(i=\u003ei.x===this.currentLShape.p2.x\u0026\u0026i.y===this.currentLShape.p2.y);if(o!==-1){const i=[...n.tracePath.slice(0,o),...t,...n.tracePath.slice(o+1)];this.input.allTraces[e]={...n,tracePath:i},this.lShapesToProcess=this.lShapesToProcess.filter(r=\u003er.traceId!==this.currentLShape.traceId)}}this.lShapeJustProcessed=!0}getOutput(){return{traces:this.input.allTraces}}visualize(){switch(this.visualizationMode){case\"l_shapes\":return Mle(this.lShapesToProcess);case\"intersection_points\":return Uve([this.currentLShape?Mle(this.currentLShape):void 0,ovt(this.intersectionPoints)]);case\"tight_rectangle\":return Uve([this.currentLShape?Mle(this.currentLShape):void 0,ovt(this.intersectionPoints),this.tightRectangle?ivt(this.tightRectangle):void 0]);case\"candidates\":{if(this.lShapeJustProcessed){const n={lines:[]};for(const o of this.input.allTraces){const i=o.mspPairId===this.currentLShape?.traceId;for(let r=0;r\u003co.tracePath.length-1;r++)n.lines.push({points:[o.tracePath[r],o.tracePath[r+1]],strokeColor:i?\"green\":\"#ccc\"})}return n}const t={lines:[]};for(const n of this.input.allTraces)for(let o=0;o\u003cn.tracePath.length-1;o++)t.lines.push({points:[n.tracePath[o],n.tracePath[o+1]],strokeColor:\"#ccc\"});let e;return this.bestRouteFound?e=this.bestRouteFound:this.lastCollision?.isColliding?e=this.collidingCandidate??void 0:this.currentCandidateIndex\u003cthis.candidates.length\u0026\u0026(e=this.candidates[this.currentCandidateIndex]),Uve([t,this.currentLShape?Mle(this.currentLShape):void 0,this.tightRectangle?ivt(this.tightRectangle):void 0,e?Syo([e],this.bestRouteFound?\"green\":\"blue\",this.intersectionPoints):void 0,this.lastCollision?Qyo(this.lastCollision):void 0])}default:return{}}}},rvt=1e-6,Dle=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=rvt,Nle=(t,e)=\u003eMath.abs(t.y-e.y)\u003c=rvt,wyo=t=\u003e{if(t.length!==4)return!1;const[e,n,o,i]=t,r=Nle(e,n)\u0026\u0026Dle(n,o)\u0026\u0026Nle(o,i)\u0026\u0026Dle(e,i),s=Dle(e,n)\u0026\u0026Nle(n,o)\u0026\u0026Dle(o,i)\u0026\u0026Nle(e,i);return r||s},svt=1e-6,Pyo=(t,e,n)=\u003e{const o=t.tracePath[e],i=t.tracePath[e+1],r={minX:Math.min(o.x,i.x),minY:Math.min(o.y,i.y),maxX:Math.max(o.x,i.x),maxY:Math.max(o.y,i.y)};for(const s of n){if(s.globalConnNetId!==t.globalConnNetId||!s.pinIds.every(A=\u003et.pinIds.includes(A))||!jl(t.tracePath,s.anchorPoint))continue;const a=Ls(s.center,s.width,s.height);r.minX=Math.min(r.minX,a.minX),r.minY=Math.min(r.minY,a.minY),r.maxX=Math.max(r.maxX,a.maxX),r.maxY=Math.max(r.maxY,a.maxY)}return r},Myo=(t,e,n)=\u003e{const o=[];for(const i of t)if(e.has(i.mspPairId))for(let r=0;r\u003ct.length;r++){const s=t[r];if(s.mspPairId!==i.mspPairId\u0026\u0026!e.has(s.mspPairId)\u0026\u0026s.globalConnNetId!==i.globalConnNetId\u0026\u0026!(n\u0026\u0026!n.has(s.mspPairId)))for(const a of WH(s.tracePath,i.tracePath,{includeTerminalSegments:!0}))o.push({traceIndex:r,connector:i,connectorSegmentIndex:a.otherPathSegmentIndex,traceSegmentIndex:a.pathSegmentIndex})}return o},Dyo=({inputProblem:t,traces:e,netLabelPlacements:n,mergedLabelNetIdMap:o,clearance:i,eligibleTraceIds:r,connectorTraceIds:s})=\u003e{const a=[...e],A=Hy(t).filter(l=\u003el.kind===\"chip\"||l.kind===\"text_box\");let c=0;for(;;){const l=Myo(a,s,r).flatMap(g=\u003e{const h=a[g.traceIndex],d=Pyo(g.connector,g.connectorSegmentIndex,n),p=a.filter(_=\u003e_.mspPairId!==h.mspPairId\u0026\u0026_.globalConnNetId!==h.globalConnNetId),m=n.filter(_=\u003e{const f=o[_.globalConnNetId];return f?!f.has(h.globalConnNetId):_.globalConnNetId!==h.globalConnNetId}).map(_=\u003eLs(_.center,_.width,_.height));return Yve({trace:h,segmentIndex:g.traceSegmentIndex,obstacleStart:g.connector.tracePath[g.connectorSegmentIndex],obstacleEnd:g.connector.tracePath[g.connectorSegmentIndex+1],obstacleBounds:d,chipBounds:[],clearance:i}).filter(_=\u003eU7(_.path)\u003c=U7(h.tracePath)+svt\u0026\u0026j5(_.path)\u003c=j5(h.tracePath)+2\u0026\u0026!ON(_.path,A)\u0026\u0026!Sle(_.path,m)\u0026\u0026!Ple(_.path,p,h.mspPairId).isColliding\u0026\u0026!nw(_.path,p)).map(_=\u003e({..._,traceIndex:g.traceIndex}))});l.sort((g,h)=\u003e{const d=U7(g.path)-U7(h.path);return Math.abs(d)\u003esvt?d:j5(g.path)-j5(h.path)});const u=l[0];if(!u)break;a[u.traceIndex]={...a[u.traceIndex],tracePath:u.path},c++}return{traces:a,reroutedTraceCount:c}},Nyo=[\"untangling_traces\",\"minimizing_turns\",\"balancing_l_shapes\"],avt=class extends Ng{input;outputTraces;traceIdQueue;tracesMap;operations;operationIndex=0;pipelineStep;activeTraceId=null;activeSubSolver=null;constructor(t){super(),this.input=t,this.outputTraces=[...t.allTraces],this.tracesMap=new Map(this.outputTraces.map(e=\u003e[e.mspPairId,e])),this.operations=t.operations??Nyo,this.pipelineStep=this.operations[0]??null,this.traceIdQueue=Array.from(t.allTraces.map(e=\u003ee.mspPairId))}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const t=this.activeSubSolver.getOutput();this.outputTraces=t.traces,this.tracesMap=new Map(this.outputTraces.map(e=\u003e[e.mspPairId,e])),this.activeSubSolver=null,this._advancePipeline()}else this.activeSubSolver.failed\u0026\u0026(this.activeSubSolver=null,this._advancePipeline());return}if(!this.pipelineStep){this.solved=!0;return}switch(this.pipelineStep){case\"untangling_traces\":this._runUntangleTracesStep();break;case\"rerouting_generated_net_label_connector_crossings\":this._runGeneratedNetLabelConnectorCrossingRerouteStep();break;case\"minimizing_turns\":this._runMinimizeTurnsStep();break;case\"balancing_l_shapes\":this._runBalanceLShapesStep();break;case\"aligning_same_net_rails\":this._runAlignSameNetRailsStep();break}}_advancePipeline(){this.operationIndex++,this.pipelineStep=this.operations[this.operationIndex]??null,this.traceIdQueue=this.outputTraces.map(t=\u003et.mspPairId),this.pipelineStep\u0026\u0026(this.activeTraceId=null)}_runUntangleTracesStep(){this.activeSubSolver=new vyo({...this.input,allTraces:Array.from(this.tracesMap.values())})}_runGeneratedNetLabelConnectorCrossingRerouteStep(){const t=Dyo({inputProblem:this.input.inputProblem,traces:this.outputTraces,netLabelPlacements:this.input.allLabelPlacements,mergedLabelNetIdMap:this.input.mergedLabelNetIdMap,clearance:this.input.paddingBuffer,eligibleTraceIds:this.input.eligibleTraceIds,connectorTraceIds:this.input.netLabelConnectorTraceIds??new Set});this.outputTraces=t.traces,this.tracesMap=new Map(this.outputTraces.map(e=\u003e[e.mspPairId,e])),this.stats.reroutedGeneratedConnectorCrossingTraceCount=t.reroutedTraceCount,this._advancePipeline()}_runMinimizeTurnsStep(){if(this.traceIdQueue.length===0){this._advancePipeline();return}this._processTrace(\"minimizing_turns\")}_runBalanceLShapesStep(){if(this.traceIdQueue.length===0){this._advancePipeline();return}this._processTrace(\"balancing_l_shapes\")}_processTrace(t){const e=this.traceIdQueue.shift();this.activeTraceId=e;const n=this.tracesMap.get(e);if(wyo(n.tracePath))return;const o=Array.from(this.tracesMap.values());let i;t===\"minimizing_turns\"?i=YQt({...this.input,targetMspConnectionPairId:e,traces:o}):i=VCo({...this.input,targetMspConnectionPairId:e,traces:o}),this.tracesMap.set(e,i),this.outputTraces=Array.from(this.tracesMap.values())}_runAlignSameNetRailsStep(){const t=Cyo({inputProblem:this.input.inputProblem,traces:this.outputTraces,netLabelPlacements:this.input.allLabelPlacements,eligibleTraceIds:this.input.eligibleTraceIds??new Set(this.outputTraces.map(e=\u003ee.mspPairId))});this.outputTraces=t.traces,this.tracesMap=new Map(this.outputTraces.map(e=\u003e[e.mspPairId,e])),this.stats.alignedRailGroupCount=t.alignedRailGroupCount,this.stats.alignedTraceCount=t.alignedTraceCount,this._advancePipeline()}getOutput(){return{traces:this.outputTraces}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.input.inputProblem,{chipAlpha:.1,connectionAlpha:.1});t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[]);for(const e of this.outputTraces){const n={points:e.tracePath.map(o=\u003e({x:o.x,y:o.y})),strokeColor:e.mspPairId===this.activeTraceId?\"red\":\"blue\"};t.lines.push(n)}return t}},Ryo=({tracePath:t,sourcePoint:e,extensionEndPoint:n})=\u003e{const o=t.findIndex(s=\u003efb(s,e));if(o\u003c=0||o\u003e=t.length-1)return null;const i=n.y-e.y,r=[o-1,o+1].find(s=\u003e{const a=t[s];return Yy(a,e)\u0026\u0026(a.y-e.y)*i\u003c0});return r===void 0?null:t.toSpliced(Math.max(o,r),0,n)},Kve=t=\u003e{const e={};for(const n of t.chips)for(const o of n.pins)e[o.pinId]={...o,chipId:n.chipId};return e},Vve=(t,e)=\u003e{const n=t.pinIds.flatMap(i=\u003e{const r=e[i];return r?[r]:[]});if(n.length\u003e=2)return[n[0],n[1]];if(n.length===1)return[n[0],n[0]];const o={pinId:`${t.globalConnNetId}-netlabel-anchor`,x:t.anchorPoint.x,y:t.anchorPoint.y,chipId:\"available-net-orientation\"};return[o,o]},Tyo=t=\u003e({orientation:t.orientation,anchorPoint:t.anchorPoint,center:t.center,width:t.width,height:t.height}),sm=t=\u003e{switch(t){case\"x+\":return{x:1,y:0};case\"x-\":return{x:-1,y:0};case\"y+\":return{x:0,y:1};case\"y-\":return{x:0,y:-1}}throw new Error(`Invalid facing direction: ${t}`)},zve=(t,e,n)=\u003e{const o=iyo(e,t);if(!o)return null;const i=syo(n,o.index,e.length-1,o.orientation,t);return i?Gve(t,i.start,i.end):ayo(t,n)},Avt=(t,e)=\u003et.globalConnNetId===e.globalConnNetId||t.mspConnectionPairIds.includes(e.mspPairId),jH=({trace:t,originalTracePath:e,reroutedTracePath:n,netLabelPlacements:o})=\u003eo.map(i=\u003e{if(!Avt(i,t))return i;const r=zve(i.anchorPoint,e,n);if(!r)return i;const s={x:r.x-i.anchorPoint.x,y:r.y-i.anchorPoint.y};return{...i,anchorPoint:r,center:{x:i.center.x+s.x,y:i.center.y+s.y}}}),kyo=({originalTraces:t,reroutedTraces:e,netLabelPlacements:n})=\u003e{const o=[...e],i=new Map(e.map(s=\u003e[s.mspPairId,s])),r=n.map(s=\u003e{const a=t.find(p=\u003e{if(!s.mspConnectionPairIds.includes(p.mspPairId))return!1;const m=i.get(p.mspPairId);return m?m.tracePath!==p.tracePath:!1});if(!a)return s;const A=i.get(a.mspPairId),c=t.findIndex(p=\u003ep.mspPairId===a.mspPairId||p.globalConnNetId!==s.globalConnNetId||!jl(p.tracePath,s.anchorPoint)?!1:s.pinIds.every(m=\u003ep.pinIds.includes(m)));if(c\u003c0)return s;const l=t[c],u=l.tracePath.find(p=\u003ejl(a.tracePath,p));if(!u)return s;const g=zve(u,a.tracePath,A.tracePath);if(!g)return s;const h={x:g.x-u.x,y:g.y-u.y},d={...l,tracePath:l.tracePath.map(p=\u003e({x:p.x+h.x,y:p.y+h.y}))};return o[c]=d,jH({trace:l,originalTracePath:l.tracePath,reroutedTracePath:d.tracePath,netLabelPlacements:[s]})[0]});return{traces:o,netLabelPlacements:r}},Fyo=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)if(Ove(o,i,r)\u0026\u0026cvt(o,i,r)\u003eRg)return!0}return!1},Lyo=(t,e)=\u003e{let n=0;for(let o=0;o\u003ct.length-1;o++){const i=t[o],r=t[o+1];for(const s of e){if(!Ove(i,r,s))continue;const a=cvt(i,r,s);a\u003eRg\u0026\u0026(n+=a)}}return n},cvt=(t,e,n)=\u003eMath.abs(t.x-e.x)\u003cRg?Math.min(Math.max(t.y,e.y),n.maxY)-Math.max(Math.min(t.y,e.y),n.minY):Math.min(Math.max(t.x,e.x),n.maxX)-Math.max(Math.min(t.x,e.x),n.minX),nE=.1,Hyo=16,Oyo=({x:t,lowY:e,highY:n,outputTraces:o,netId:i})=\u003e{for(const r of o){if(r.globalConnNetId===i)continue;const s=r.tracePath;for(let a=0;a+1\u003cs.length;a++){const A=s[a],c=s[a+1];if(Math.abs(A.x-c.x)\u003e=1e-9||Math.abs(A.x-t)\u003e=nE/2)continue;const l=Math.min(A.y,c.y),u=Math.max(A.y,c.y);if(Math.min(n,u)-Math.max(e,l)\u003e1e-6)return!0}}return!1},Gyo=({trace:t,obstacleLabel:e,inputProblem:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r})=\u003e{const s=Yyo({trace:t,label:e,inputProblem:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r}),a=Vyo({trace:t,obstacleLabel:e,outputTraces:o,outputNetLabelPlacements:i,candidateResults:s,chipObstacles:r});return Jyo(s,a),{bestPath:a,candidateResults:s}},Yyo=({trace:t,label:e,inputProblem:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r})=\u003e{const s=new Set,a=[],A=zyo({trace:t,label:e,outputTraces:o});A\u0026\u0026a.push(lvt({trace:t,obstacleLabel:e,path:A,seen:s,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r,usesHorizontalSegmentPush:!0}));const c=[...Kyo(t,e),...SQt({trace:t,label:e,paddingBuffer:nE,detourCount:0}),...Uyo(t,e)];for(const l of c)a.push(lvt({trace:t,obstacleLabel:e,path:Qa(l),seen:s,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r}));return a},lvt=({trace:t,obstacleLabel:e,path:n,seen:o,outputTraces:i,outputNetLabelPlacements:r,chipObstacles:s,usesHorizontalSegmentPush:a})=\u003e{const A=tyo(n);return o.has(A)?{path:n,status:\"duplicate\",usesHorizontalSegmentPush:a,selected:!1}:(o.add(A),qQt(n,s)?{path:n,status:\"chip-collision\",usesHorizontalSegmentPush:a,selected:!1}:{path:n,score:gvt({trace:t,tracePath:n,obstacleLabel:e,outputTraces:i,outputNetLabelPlacements:r,chipObstacles:s}),status:\"valid\",usesHorizontalSegmentPush:a,selected:!1})},Uyo=(t,e)=\u003e{const n=t.tracePath[0],o=t.tracePath[t.tracePath.length-1];if(!n||!o)return[];const i=t.tracePath[1]??n,r=t.tracePath[t.tracePath.length-2]??o,s=Ls(e.center,e.width,e.height),a=nE,A=sm(e.orientation),c=A.x\u003c0?s.minX-a:s.maxX+a,l=A.x\u003c0?s.maxX+a:s.minX-a,u=s.maxY+a,g=s.minY-a,h=[];for(const d of[c,l])h.push([n,i,{x:i.x,y:u},{x:d,y:u},{x:d,y:g},{x:r.x,y:g},r,o],[n,i,{x:i.x,y:g},{x:d,y:g},{x:d,y:u},{x:r.x,y:u},r,o]);return h},Kyo=(t,e)=\u003e{const n=t.tracePath[0],o=t.tracePath[t.tracePath.length-1];if(!n||!o)return[];const i=t.tracePath[1]??n,r=t.tracePath[t.tracePath.length-2]??o,s=sm(e.orientation);if(s.x===0)return[];const a=Ls(e.center,e.width,e.height),A=s.x\u003c0?a.minX-nE:a.maxX+nE,c=a.maxY+nE,l=a.minY-nE,u=i.y\u003e=r.y,g=u?c:l,h=u?l:c;return[[n,i,{x:i.x,y:g},{x:A,y:g},{x:A,y:h},{x:r.x,y:h},r,o],[n,i,{x:i.x,y:h},{x:A,y:h},{x:A,y:g},{x:r.x,y:g},r,o]]},Vyo=({trace:t,obstacleLabel:e,outputTraces:n,outputNetLabelPlacements:o,candidateResults:i,chipObstacles:r})=\u003e{for(const A of i)if(A.usesHorizontalSegmentPush\u0026\u0026A.status===\"valid\"\u0026\u0026A.score)return A.path;let s=null,a=gvt({trace:t,tracePath:t.tracePath,obstacleLabel:e,outputTraces:n,outputNetLabelPlacements:o,chipObstacles:r});for(const A of i)A.status!==\"valid\"||!A.score||jyo(A.score,a)\u0026\u0026(a=A.score,s=A.path);return s},zyo=({trace:t,label:e,outputTraces:n})=\u003e{const o=sm(e.orientation);if(o.x===0)return null;const i=t.tracePath,r=Ls(e.center,e.width,e.height),s=i.findIndex((f,I)=\u003e{const C=i[I+1];return!C||Math.abs(f.x-C.x)\u003e=1e-9?!1:O7(f,C,r)});if(s\u003c=0||s\u003e=i.length-2)return null;const a=i[s-1],A=i[s],c=i[s+1],l=i[s+2];if(Math.abs(a.y-A.y)\u003e=1e-9||Math.abs(c.y-l.y)\u003e=1e-9)return null;let u=r.minX-nE;o.x\u003e0\u0026\u0026(u=r.maxX+nE);const g=o.x\u003e0?nE:-nE,h=Math.min(A.y,c.y),d=Math.max(A.y,c.y);for(let f=0;f\u003cHyo\u0026\u0026Oyo({x:u,lowY:h,highY:d,outputTraces:n,netId:t.globalConnNetId});f++)u+=g;const p=uvt({start:a,end:{x:u,y:A.y},labelBounds:r}),m=uvt({start:{x:u,y:c.y},end:l,labelBounds:r}),_=[...i.slice(0,s-1),a];return Math.abs(a.y-p)\u003e=1e-9\u0026\u0026_.push({x:a.x,y:p}),_.push({x:u,y:p}),_.push({x:u,y:m}),Math.abs(l.y-m)\u003e=1e-9\u0026\u0026_.push({x:l.x,y:m}),_.push(l,...i.slice(s+3)),Qa(_)},uvt=({start:t,end:e,labelBounds:n})=\u003e{if(!O7(t,e,n))return t.y;const o=(n.minY+n.maxY)/2;return t.y\u003e=o?n.maxY+nE:n.minY-nE},Jyo=(t,e)=\u003e{if(e)for(const n of t)n.selected=n.path===e},gvt=({trace:t,tracePath:e,obstacleLabel:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r})=\u003e{const s={...t,tracePath:e};return{labelIntersections:Jh({traces:[s],netLabels:i}).length,labelHugDistance:$yo(e,n),traceIntersections:Wyo(s,o),chipBoundaryOverlap:Lyo(e,r),pathLength:U7(e)}},Wyo=(t,e)=\u003e{let n=0;for(const o of e)o.mspPairId!==t.mspPairId\u0026\u0026(n+=vle(t.tracePath,o.tracePath));return n},jyo=(t,e)=\u003e{const n=t.labelIntersections\u003e0,o=e.labelIntersections\u003e0;return n!==o?!n:t.chipBoundaryOverlap!==e.chipBoundaryOverlap?t.chipBoundaryOverlap\u003ce.chipBoundaryOverlap:t.labelIntersections!==e.labelIntersections?t.labelIntersections\u003ce.labelIntersections:t.labelHugDistance!==e.labelHugDistance?t.labelHugDistance\u003ce.labelHugDistance:t.traceIntersections!==e.traceIntersections?t.traceIntersections\u003ce.traceIntersections:t.pathLength\u003ce.pathLength},$yo=(t,e)=\u003e{const n=Ls(e.center,e.width,e.height);let o=0;for(const i of t)o+=qyo(i,n);return o},qyo=(t,e)=\u003e{const n=Math.max(e.minX-t.x,0,t.x-e.maxX),o=Math.max(e.minY-t.y,0,t.y-e.maxY);return n+o},Xyo=t=\u003e{const{trace:e,outputTraces:n}=t;let o=0;for(const i of n)i.mspPairId!==e.mspPairId\u0026\u0026i.globalConnNetId!==e.globalConnNetId\u0026\u0026(o+=vle(e.tracePath,i.tracePath));return o},dvt=t=\u003e{const{traces:e,outputTraces:n,chipObstacles:o}=t;let i=0,r=0;for(const s of e)Fyo(s.tracePath,o)\u0026\u0026(i+=1),r+=Xyo({trace:s,outputTraces:n});return{chipEdgeRuns:i,traceCrossings:r}},Zyo=\"blue\",hvt=\"red\",e2o=t=\u003e{const e=zh(t.inputProblem);return t2o(e,t),n2o(e,t),t.solved||(o2o(e,t.currentCandidateResults),i2o(e,t)),e},t2o=(t,e)=\u003e{for(const n of e.outputTraces)t.lines.push({points:n.tracePath,strokeColor:\"purple\"})},n2o=(t,e)=\u003e{for(const n of e.outputNetLabelPlacements){const o=Mc(n.globalConnNetId,.35);t.rects.push({center:n.center,width:n.width,height:n.height,fill:o,strokeColor:Mc(n.globalConnNetId,.9),label:`netId: ${n.netId}\nglobalConnNetId: ${n.globalConnNetId}`}),t.points.push({...n.anchorPoint,color:Mc(n.globalConnNetId,.9),label:`anchorPoint\norientation: ${n.orientation}`})}},o2o=(t,e)=\u003e{for(const n of e){const o=n.score?`\nlabel intersections: ${n.score.labelIntersections}\ntrace intersections: ${n.score.traceIntersections}`:\"\";t.lines.push({points:n.path,strokeColor:n.selected?Zyo:hvt,strokeDash:n.selected?void 0:\"4 2\",label:`${n.selected?\"selected\":n.status} reroute${o}`})}},i2o=(t,e)=\u003e{if(!e.currentOverlap)return;const n=e.currentOverlap.label;t.rects.push({center:n.center,width:n.width,height:n.height,fill:\"rgba(255, 0, 0, 0.2)\",strokeColor:hvt,label:`overlap target\n${n.netId??n.globalConnNetId}`})},r2o=.1,s2o=10,pvt=.1,a2o=(t,e)=\u003et?t.chipEdgeRuns!==e.chipEdgeRuns?t.chipEdgeRuns\u003ce.chipEdgeRuns:t.traceCrossings\u003ce.traceCrossings:!1,A2o=class extends Ng{inputProblem;traces;netLabelPlacements;outputTraces;outputNetLabelPlacements;queuedOverlaps=[];currentOverlap=null;currentCandidateResults=[];chipObstacles;pinMap;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputTraces=[...t.traces],this.outputNetLabelPlacements=[...t.netLabelPlacements],this.chipObstacles=Hy(t.inputProblem),this.pinMap=Kve(t.inputProblem),this.initializeQueuedOverlaps(),this.currentOverlap=this.queuedOverlaps[0]??null}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){const t=this.queuedOverlaps.shift();if(!t){this.finish();return}if(!this.isOverlapStillPresent(t)){this.currentOverlap=t,this.currentCandidateResults=[];return}this.rerouteOverlappingTrace(t)}finish(){this.currentOverlap=null,this.currentCandidateResults=[],this.solved=!0}initializeQueuedOverlaps(){const t=[],e=new Set;for(const n of this.getTraceLabelOverlaps()){if(!this.shouldRerouteOverlap(n))continue;const o=this.getOverlapKey(n);e.has(o)||(e.add(o),t.push(n))}this.queuedOverlaps=t}getTraceLabelOverlaps(){return Jh({traces:this.outputTraces,netLabels:this.outputNetLabelPlacements})}shouldRerouteOverlap(t){return this.isXFacingLabel(t.label)\u0026\u0026!this.hasExplicitOrientationConstraint(t.label)}isXFacingLabel(t){return t.orientation===\"x+\"||t.orientation===\"x-\"}hasExplicitOrientationConstraint(t){const e=t.netId??t.globalConnNetId;return Object.hasOwn(this.inputProblem.availableNetLabelOrientations,e)}getOverlapKey(t){const e=t.label.netId??t.label.globalConnNetId;return`${t.trace.mspPairId}:${e}:${t.label.anchorPoint.x}:${t.label.anchorPoint.y}`}isOverlapStillPresent(t){const e=this.getCurrentTrace(t.trace);return e?Jh({traces:[e],netLabels:[t.label]}).length\u003e0:!1}getCurrentTrace(t){return this.outputTraces.find(e=\u003ee.mspPairId===t.mspPairId)}rerouteOverlappingTrace(t){this.currentOverlap=t,this.currentCandidateResults=[];const e=this.outputTraces.findIndex(a=\u003ea.mspPairId===t.trace.mspPairId);if(e===-1)return;const n=this.outputTraces[e],o=this.tryMoveLabelOutward(t.label),i=Gyo({trace:n,obstacleLabel:t.label,inputProblem:this.inputProblem,outputTraces:this.outputTraces,outputNetLabelPlacements:this.outputNetLabelPlacements,chipObstacles:this.chipObstacles});this.currentCandidateResults=i.candidateResults;let r=null;if(i.bestPath\u0026\u0026(r=dvt({traces:[{...n,tracePath:i.bestPath}],outputTraces:this.outputTraces,chipObstacles:this.chipObstacles})),o){const a=dvt({traces:[o.connectorTrace,n],outputTraces:this.outputTraces,chipObstacles:this.chipObstacles});if(!a2o(r,a)){this.outputNetLabelPlacements[o.labelIndex]=o.movedLabel,this.outputTraces.push(o.connectorTrace);return}}if(!i.bestPath)return;const s=n.tracePath;this.outputTraces[e]={...n,tracePath:i.bestPath},this.outputNetLabelPlacements=jH({trace:n,originalTracePath:s,reroutedTracePath:i.bestPath,netLabelPlacements:this.outputNetLabelPlacements})}tryMoveLabelOutward(t){const e=this.outputNetLabelPlacements.findIndex(i=\u003ei.globalConnNetId===t.globalConnNetId\u0026\u0026i.anchorPoint.x===t.anchorPoint.x\u0026\u0026i.anchorPoint.y===t.anchorPoint.y\u0026\u0026i.pinIds.join(\",\")===t.pinIds.join(\",\"));if(e===-1)return null;const n=this.outputNetLabelPlacements[e];if(n.mspConnectionPairIds.length\u003e0||n.pinIds.length!==1||this.outputNetLabelPlacements.filter(i=\u003ei.globalConnNetId===n.globalConnNetId).length!==1)return null;const o=sm(n.orientation);if(o.x===0\u0026\u0026o.y===0)return null;for(let i=1;i\u003c=s2o;i++){const r=i*r2o,s={...n,anchorPoint:{x:n.anchorPoint.x+o.x*r,y:n.anchorPoint.y+o.y*r},center:{x:n.center.x+o.x*r,y:n.center.y+o.y*r}},a={...s,width:s.width+pvt*2,height:s.height+pvt*2};if(Jh({traces:this.outputTraces,netLabels:[a]}).length\u003e0)continue;const A=l2o({label:n,movedLabel:s,pinMap:this.pinMap});if(!(Jh({traces:[A],netLabels:this.outputNetLabelPlacements}).length\u003e0))return{labelIndex:e,movedLabel:s,connectorTrace:A}}return null}visualize(){return e2o({inputProblem:this.inputProblem,outputTraces:this.outputTraces,outputNetLabelPlacements:this.outputNetLabelPlacements,solved:this.solved,currentOverlap:this.currentOverlap,currentCandidateResults:this.currentCandidateResults})}},c2o=t=\u003e`port-only-label-connector-${t.globalConnNetId}-${t.pinIds[0]}`,l2o=({label:t,movedLabel:e,pinMap:n})=\u003e{const o=c2o(t);return{mspPairId:o,dcConnNetId:t.dcConnNetId??t.globalConnNetId,globalConnNetId:t.globalConnNetId,userNetId:t.netId,pins:Vve(t,n),tracePath:[t.anchorPoint,e.anchorPoint],mspConnectionPairIds:[o],pinIds:t.pinIds}},Z_=.05,mvt=2e3,$5=.001,lr=1e-9,Rle=$5+lr,u2o=\"blue\",_vt=\"red\",ju=t=\u003et===\"y+\"||t===\"y-\",$H=t=\u003et===\"x+\"||t===\"x-\",pj=(t,e)=\u003eMath.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)\u003elr\u0026\u0026Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)\u003elr,Tle=(t,e,n,o)=\u003eMath.min(e,o)-Math.max(t,n)\u003elr,mj=(t,e)=\u003e{for(const n of Object.values(e)){const o=n.tracePath;for(let i=0;i\u003co.length-1;i++)if(kle(o[i],o[i+1],t))return!0}return!1},kle=(t,e,n)=\u003e{const o={minX:n.minX+Rle,minY:n.minY+Rle,maxX:n.maxX-Rle,maxY:n.maxY-Rle};return o.minX\u003e=o.maxX||o.minY\u003e=o.maxY?!1:Fle(t,e)?t.x\u003c=o.minX+lr||t.x\u003e=o.maxX-lr?!1:Tle(Math.min(t.y,e.y),Math.max(t.y,e.y),o.minY,o.maxY):Lle(t,e)?t.y\u003c=o.minY+lr||t.y\u003e=o.maxY-lr?!1:Tle(Math.min(t.x,e.x),Math.max(t.x,e.x),o.minX,o.maxX):!1},Jve=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++)if(O7(t[n],t[n+1],e))return!0;return!1},fvt=(t,e)=\u003e[[\"left\",Math.abs(t.x-e.minX)],[\"right\",Math.abs(t.x-e.maxX)],[\"bottom\",Math.abs(t.y-e.minY)],[\"top\",Math.abs(t.y-e.maxY)]],Wve=(t,e,n)=\u003ejve(ju(n)?[t,{x:e.x,y:t.y},e]:[t,{x:t.x,y:e.y},e]),jve=t=\u003e{const e=t.filter((o,i)=\u003ei===0||!g2o(o,t[i-1]));if(e.length\u003c3)return e;const n=[e[0]];for(let o=1;o\u003ce.length-1;o++){const i=n[n.length-1],r=e[o],s=e[o+1];Fle(i,r)\u0026\u0026Fle(r,s)||Lle(i,r)\u0026\u0026Lle(r,s)||n.push(r)}return n.push(e[e.length-1]),n},g2o=(t,e)=\u003eFle(t,e)\u0026\u0026Lle(t,e),Fle=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=lr,Lle=(t,e)=\u003eMath.abs(t.y-e.y)\u003c=lr,d2o=t=\u003eMath.max(...t.chips.map(n=\u003en.width),1)*3,Ivt=t=\u003et.mspConnectionPairIds.length===0,h2o=({labelIndices:t,netLabelPlacements:e})=\u003e{const n=[...t];for(const o of t){const i=e[o];if(Ivt(i))continue;const r=Ls(i.center,i.width,i.height),s=n.findIndex(A=\u003e{const c=e[A];if(!Ivt(c)||c.globalConnNetId===i.globalConnNetId)return!1;const l=Ls(c.center,c.width,c.height);return pj(r,l)}),a=n.indexOf(o);s===-1||s\u003ea||(n.splice(a,1),n.splice(s,0,o))}return n},p2o=t=\u003e{const e=zh(t.inputProblem);return C2o(e),m2o(e,t.traces),_2o(e,t.outputNetLabelPlacements),f2o(e,t.currentLabel,t.solved),I2o(e,t.currentCandidateResults,t.solved),e},m2o=(t,e)=\u003e{for(const n of e)t.lines.push({points:n.tracePath,strokeColor:\"purple\"})},_2o=(t,e)=\u003e{for(const n of e)t.rects.push({center:n.center,width:n.width,height:n.height,fill:Mc(n.globalConnNetId,.35),strokeColor:Mc(n.globalConnNetId,.9),label:`netId: ${n.netId}\nglobalConnNetId: ${n.globalConnNetId}`}),t.points.push({x:n.anchorPoint.x,y:n.anchorPoint.y,color:Mc(n.globalConnNetId,.9),label:`anchorPoint\norientation: ${n.orientation}`})},f2o=(t,e,n)=\u003e{!e||n||t.rects.push({center:e.center,width:e.width,height:e.height,fill:\"rgba(255, 0, 0, 0.2)\",strokeColor:_vt,label:`available orientation target\n${e.netId??e.globalConnNetId}`})},I2o=(t,e,n)=\u003e{if(!n)for(const o of e){const i=o.selected?u2o:_vt,r=o.distance===void 0?\"\":`\ndistance: ${o.distance.toFixed(3)}`,s=o.outwardDistance===void 0||o.outwardDistance===0?\"\":`\noutward distance: ${o.outwardDistance.toFixed(3)}`;t.rects.push({center:o.center,width:o.width,height:o.height,fill:o.selected?\"rgba(0, 0, 255, 0.2)\":\"rgba(255, 0, 0, 0.15)\",strokeColor:i,strokeDash:o.selected?void 0:\"4 2\",label:`${o.selected?\"selected\":o.status} available orientation\nphase: ${o.phase}\norientation: ${o.orientation}${r}${s}`}),t.points.push({x:o.anchorPoint.x,y:o.anchorPoint.y,color:i,label:`candidate anchor\n${o.phase}\n${o.orientation}`})}},C2o=t=\u003e{t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[])},y2o=class{chipObstacleSpatialIndex;labelIndex=null;traceSegmentIndex=null;traceSegments=[];constructor(t){this.chipObstacleSpatialIndex=t.chipObstacleSpatialIndex,this.rebuild(t)}rebuild(t){this.labelIndex=this.buildLabelIndex(t.netLabelPlacements),this.traceSegments=this.getTraceSegments(t.traces),this.traceSegmentIndex=this.buildTraceSegmentIndex(this.traceSegments)}getLabelIndicesInBounds(t){return this.labelIndex?this.labelIndex.search(t.minX,t.minY,t.maxX,t.maxY):[]}getTraceSegmentsInBounds(t){if(!this.traceSegmentIndex)return[];const e=$ve(t,lr);return this.traceSegmentIndex.search(e.minX,e.minY,e.maxX,e.maxY).map(n=\u003ethis.traceSegments[n])}getLabelIndicesNearTracePath(t){const e=new Set;for(let n=0;n\u003ct.length-1;n++){const o=$ve(Cvt(t[n],t[n+1]),lr);for(const i of this.getLabelIndicesInBounds(o))e.add(i)}return[...e].sort((n,o)=\u003en-o)}doesTracePathCrossChip(t){for(let e=0;e\u003ct.length-1;e++){const n=t[e],o=t[e+1],i=this.chipObstacleSpatialIndex.getChipsInBounds($ve(Cvt(n,o),lr));for(const r of i)if(kle(n,o,r.bounds))return!0}return!1}doesTraceCrossBoundsInterior(t){for(const e of this.getTraceSegmentsInBounds(t))if(kle(e.start,e.end,t))return!0;return!1}doesTraceIntersectBounds(t){for(const e of this.getTraceSegmentsInBounds(t.bounds))if(e.trace.globalConnNetId!==t.excludedGlobalConnNetId\u0026\u0026O7(e.start,e.end,t.bounds))return!0;return!1}buildLabelIndex(t){if(t.length===0)return null;const e=new UH(t.length);for(const n of t)e.add(n.center.x-n.width/2,n.center.y-n.height/2,n.center.x+n.width/2,n.center.y+n.height/2);return e.finish(),e}getTraceSegments(t){const e=[];for(const n of t)for(let o=0;o\u003cn.tracePath.length-1;o++)e.push({trace:n,start:n.tracePath[o],end:n.tracePath[o+1]});return e}buildTraceSegmentIndex(t){if(t.length===0)return null;const e=new UH(t.length);for(const n of t)e.add(Math.min(n.start.x,n.end.x),Math.min(n.start.y,n.end.y),Math.max(n.start.x,n.end.x),Math.max(n.start.y,n.end.y));return e.finish(),e}};function Cvt(t,e){return{minX:Math.min(t.x,e.x),minY:Math.min(t.y,e.y),maxX:Math.max(t.x,e.x),maxY:Math.max(t.y,e.y)}}function $ve(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}var _j=.1,x2o=.2,yvt=.1,E2o=class extends Ng{inputProblem;traces;netLabelPlacements;netLabelConnectorTraceIds=new Set;outputNetLabelPlacements;queuedLabelIndices=[];currentLabelIndex=null;currentLabel=null;currentCandidateResults=[];crowdedPortOnlyLabelIndices=new Set;blockedStandaloneLabelIndex=null;blockedStandaloneLabelTargetAnchorX=null;traceMap;chipObstacleSpatialIndex;maxSearchDistance;pinMap;obstacleIndex;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=[...t.traces],this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements],this.traceMap=Object.fromEntries(this.traces.map(e=\u003e[e.mspPairId,e])),this.pinMap=Kve(t.inputProblem),this.chipObstacleSpatialIndex=t.inputProblem._chipObstacleSpatialIndex??new yle(t.inputProblem.chips),this.maxSearchDistance=d2o(t.inputProblem),this.obstacleIndex=new y2o({chipObstacleSpatialIndex:this.chipObstacleSpatialIndex,netLabelPlacements:this.outputNetLabelPlacements,traces:this.traces}),this.crowdedPortOnlyLabelIndices=this.getCrowdedPortOnlyLabelIndices(),this.queuedLabelIndices=this.getProcessableLabelIndices(),this.setCurrentLabel(this.queuedLabelIndices[0]??null)}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){const t=this.queuedLabelIndices.shift();if(t===void 0){this.finish();return}this.processLabel(t)}getOutput(){return{traces:this.traces,netLabelPlacements:this.outputNetLabelPlacements,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds}}getProcessableLabelIndices(){const t=[];for(let l=0;l\u003cthis.outputNetLabelPlacements.length;l++)this.shouldProcessLabel(this.outputNetLabelPlacements[l],l)\u0026\u0026t.push(l);this.sortCrowdedTopBankByPin(t);const e=h2o({labelIndices:t,netLabelPlacements:this.outputNetLabelPlacements}),n=e.find(l=\u003e{const u=this.outputNetLabelPlacements[l],g=this.getAvailableOrientations(u);return this.isPortOnlyLabel(u)\u0026\u0026this.isStandaloneSinglePinNetLabel(u)\u0026\u0026g.length===1\u0026\u0026ju(g[0])\u0026\u0026this.labelIntersectsDifferentNetTrace(u)});if(n===void 0)return e;this.blockedStandaloneLabelIndex=n,this.blockedStandaloneLabelTargetAnchorX=null;const o=this.outputNetLabelPlacements[n],i=this.getAvailableOrientations(o)[0],r=this.getChipSideForPoint(o.anchorPoint),s=[],a=[];for(let l=0;l\u003ce.length;l++){const u=e[l],g=this.outputNetLabelPlacements[u],h=this.getAvailableOrientations(g);this.getChipSideForPoint(g.anchorPoint)===r\u0026\u0026h.length===1\u0026\u0026h[0]===i\u0026\u0026(s.push(l),a.push(u))}a.sort((l,u)=\u003e{const g=this.outputNetLabelPlacements[l].anchorPoint.y,h=this.outputNetLabelPlacements[u].anchorPoint.y;return i===\"y+\"?h-g:g-h});const A=L7({inputProblem:this.inputProblem,netId:o.netId,pinIds:o.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(o)});let c;if(A!==void 0\u0026\u0026(c=a.find(l=\u003e{if(l===n)return!1;const u=this.outputNetLabelPlacements[l];return L7({inputProblem:this.inputProblem,netId:u.netId,pinIds:u.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(u)})===A})),c!==void 0){const l=this.outputNetLabelPlacements[c];this.blockedStandaloneLabelTargetAnchorX=this.getSearchStartAnchor(l,i).x}for(let l=0;l\u003cs.length;l++)e[s[l]]=a[l];return e}sortCrowdedTopBankByPin(t){const e=new Map;for(let n=0;n\u003ct.length;n++){const o=t[n];if(!this.crowdedPortOnlyLabelIndices.has(o))continue;const i=this.outputNetLabelPlacements[o];if(this.getChipSideForPoint(i.anchorPoint)!==\"top\")continue;const r=this.pinMap[i.pinIds[0]];if(!r)continue;const s=e.get(r.chipId)??[];s.push(n),e.set(r.chipId,s)}for(const n of e.values()){const o=n.map(i=\u003et[i]).sort((i,r)=\u003e{const s=this.pinMap[this.outputNetLabelPlacements[i].pinIds[0]],a=this.pinMap[this.outputNetLabelPlacements[r].pinIds[0]];return s.x-a.x});for(let i=0;i\u003cn.length;i++)t[n[i]]=o[i]}}shouldProcessLabel(t,e){const n=this.getAvailableOrientations(t);if(n.length===0)return!1;if(!n.includes(t.orientation)||this.getTextBlockedMultiPinRailTraces(t,n[0]))return!0;if(n.length===1\u0026\u0026ju(n[0])\u0026\u0026this.isGroundLabel(t)){const r=Ls(t.center,t.width,t.height);if(this.outputNetLabelPlacements.some((a,A)=\u003e{if(A===e||a.globalConnNetId===t.globalConnNetId)return!1;const c=this.getHorizontalConstraintMismatchBounds(a);return c?pj(r,c):!1}))return!0}if(!this.crowdedPortOnlyLabelIndices.has(e))return!1;const i=Ls(t.center,t.width,t.height);return this.outputNetLabelPlacements.some((r,s)=\u003es===e||r.globalConnNetId===t.globalConnNetId?!1:pj(i,Ls(r.center,r.width,r.height)))}getCrowdedPortOnlyLabelIndices(){const t=new Map;for(let n=0;n\u003cthis.outputNetLabelPlacements.length;n++){const o=this.outputNetLabelPlacements[n];if(!this.isPortOnlyLabel(o)||!this.isStandaloneSinglePinNetLabel(o)||this.getAvailableOrientations(o).length===0)continue;const i=this.pinMap[o.pinIds[0]];if(!i)continue;const r=this.getChipSideForPoint(o.anchorPoint);if(!r)continue;const s=t.get(i.chipId)??new Map,a=s.get(r)??[];a.push(n),s.set(r,a),t.set(i.chipId,s)}const e=new Set;for(const n of t.values())for(const o of n.values()){const i=o.some(s=\u003e{const a=this.outputNetLabelPlacements[s];return!this.getAvailableOrientations(a).includes(a.orientation)}),r=o.some((s,a)=\u003e{const A=this.outputNetLabelPlacements[s],c=Ls(A.center,A.width,A.height);return o.slice(a+1).some(l=\u003e{const u=this.outputNetLabelPlacements[l];return pj(c,Ls(u.center,u.width,u.height))})});if(!(!i||!r))for(const s of o)e.add(s)}return e}processLabel(t){const e=this.outputNetLabelPlacements[t];this.setCurrentLabel(t),this.currentCandidateResults=[];const n=this.findCorrectedCandidate(e,t);n\u0026\u0026this.applyCandidate(e,n,t)}applyCandidate(t,e,n){this.outputNetLabelPlacements[n]={...t,...Tyo(e)},this.addConnectorTrace(t,e,n),this.obstacleIndex.rebuild({netLabelPlacements:this.outputNetLabelPlacements,traces:this.traces})}addConnectorTrace(t,e,n){if(e.phase===\"trace-anchor\")return;if(e.phase===\"downward-ground-rail-extension\")for(const s of t.mspConnectionPairIds){const a=this.traceMap[s];if(!a)continue;const A=Ryo({tracePath:a.tracePath,sourcePoint:t.anchorPoint,extensionEndPoint:e.anchorPoint});if(A){a.tracePath=A;return}}const o=this.getCandidateConnectorTrace(t,e,n);if(o.length\u003c2)return;const i=`available-net-orientation-${n}-${t.netId??t.globalConnNetId}`,r={mspPairId:i,dcConnNetId:t.dcConnNetId??t.globalConnNetId,globalConnNetId:t.globalConnNetId,userNetId:t.netId,pins:Vve(t,this.pinMap),tracePath:o,mspConnectionPairIds:[i],pinIds:t.pinIds};this.traces.push(r),this.traceMap[i]=r,this.netLabelConnectorTraceIds.add(i)}finish(){this.currentLabelIndex=null,this.currentLabel=null,this.currentCandidateResults=[],this.solved=!0}setCurrentLabel(t){this.currentLabelIndex=t,this.currentLabel=t===null?null:this.outputNetLabelPlacements[t]}findCorrectedCandidate(t,e){const n=this.getAvailableOrientations(t),o=n[0];if(this.crowdedPortOnlyLabelIndices.has(e)\u0026\u0026this.getChipSideForPoint(t.anchorPoint)===\"top\"\u0026\u0026ju(o)){const d=this.findValidCrowdedTopVerticalFanoutCandidate(t,e,o);if(d)return d}const i=this.inputProblem.netConnections.find(d=\u003ed.netId===t.netId),r=i?.pinIds.length===2,s=i?.isGround\u0026\u0026$H(t.orientation)\u0026\u0026n.length===1\u0026\u0026o===\"y-\"\u0026\u0026this.hasTraceContinuingInOrientation(t,\"y+\"),a=(i?.pinIds.length??0)\u003e2\u0026\u0026ju(o)\u0026\u0026this.hasPortOnlyLabelOnSameNet(t),A=this.getTextBlockedMultiPinRailTraces(t,o),c=ju(o)\u0026\u0026this.hasOppositeVerticalRailOnSameChipSide(t,o);if(A){const d=this.findValidNearbyRailCandidate(t,o,e,A);if(d)return d}if(n.length===1\u0026\u0026ju(o)\u0026\u0026this.isOutwardHorizontalFallback(t)\u0026\u0026this.hasTraceContinuingInOrientation(t,o)\u0026\u0026(a||c)){const d=this.findValidTraceAnchorCandidate(t,o,e);if(d){if(this.canPlaceVerticalLabelOnHostRail(d,t))return d;d.selected=!1}const p=this.findValidOutwardTraceAnchorCandidate(t,o,e);if(p)return p}if(r\u0026\u0026n.length===1\u0026\u0026ju(o)\u0026\u0026this.hasTraceContinuingInOrientation(t,o)){const d=this.findValidCandidateInShiftColumn({label:t,labelIndex:e,orientation:o,direction:sm(o),baseAnchor:this.getWickOffsetAnchor(t.anchorPoint,o),maxSearchDistance:this.maxSearchDistance,outwardDistance:0,stopOnTraceCollision:!1});if(d)return d}const l=this.findValidRotatedCandidate(t,e,n),u=l!==null\u0026\u0026Math.abs(l.anchorPoint.x-t.anchorPoint.x)\u003elr;if(s\u0026\u0026u){const d=this.findValidCandidateInShiftColumn({label:t,labelIndex:e,orientation:o,direction:sm(o),baseAnchor:t.anchorPoint,maxSearchDistance:this.getSearchDistanceLimit(t,o),outwardDistance:0,phase:\"downward-ground-rail-extension\",stopOnTraceCollision:!1,connectorSource:t.anchorPoint,startDistance:x2o});if(d)return d}if(l)return l;const g=this.findValidTraceAnchorCandidate(t,n[0],e);if(g)return g;const h=this.findValidShiftedCandidate(t,n[0],e);return h||this.findValidLateralShiftedCandidate(t,n[0],e)}findValidCrowdedTopVerticalFanoutCandidate(t,e,n){const o=this.pinMap[t.pinIds[0]],i=o?this.chipObstacleSpatialIndex.chips.find(m=\u003em.chipId===o.chipId):void 0;if(!i)return null;const{width:r,height:s}=_B({orientation:n,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),a=this.outputNetLabelPlacements.map((m,_)=\u003e({index:_,pin:this.pinMap[m.pinIds[0]]})).filter(({index:m,pin:_})=\u003ethis.crowdedPortOnlyLabelIndices.has(m)\u0026\u0026_?.chipId===o.chipId\u0026\u0026_.x\u003eo.x+lr).sort((m,_)=\u003em.pin.x-_.pin.x)[0]?.pin;if(n===\"y-\"\u0026\u0026a)return null;const A=n===\"y-\"?Math.max(t.anchorPoint.x+Z_,i.bounds.maxX+r/2+_j):Math.min(t.anchorPoint.x,(a?.x??i.bounds.maxX)-Z_-r/2);let c=i.bounds.maxY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let m=0;m\u003cthis.outputNetLabelPlacements.length;m++){if(m===e||!this.crowdedPortOnlyLabelIndices.has(m)||this.queuedLabelIndices.includes(m))continue;const _=this.outputNetLabelPlacements[m],f=Ls(_.center,_.width,_.height);c=Math.max(c,f.maxY),_.orientation===\"y+\"\u0026\u0026(l=Math.min(l,f.minY),u=Math.max(u,f.maxY))}const g=c+Z_+(n===\"y-\"?s:0),d=Number.isFinite(l)\u0026\u0026Number.isFinite(u)?(l+u)/2:g,p=n===\"y-\"?[d,g]:[g];for(const m of p){if(m-t.anchorPoint.y\u003ethis.maxSearchDistance+lr)continue;const _=this.createCandidate(t,{x:A,y:m},n),f=this.evaluateCandidate(_,t,e,\"lateral-shift\",m-t.anchorPoint.y,A-t.anchorPoint.x);if(this.recordCandidateResult(f),f.status===\"valid\")return f.selected=!0,f}return null}hasTraceContinuingInOrientation(t,e){const n=sm(e);return Object.values(this.traceMap).some(o=\u003e{if(o.globalConnNetId!==t.globalConnNetId)return!1;const i=o.tracePath;return i.some((r,s)=\u003eMath.abs(r.x-t.anchorPoint.x)\u003elr||Math.abs(r.y-t.anchorPoint.y)\u003elr?!1:[i[s-1],i[s+1]].some(a=\u003ea\u0026\u0026Math.abs(a.x-r.x)\u003c=lr\u0026\u0026(a.y-r.y)*n.y\u003elr))})}findValidRotatedCandidate(t,e,n){for(const o of n){const i=this.createCandidate(t,this.getSearchStartAnchor(t,o),o),r=this.evaluateCandidate(i,t,e,\"rotate\");if(this.recordCandidateResult(r),r.status===\"valid\")return r.selected=!0,r}return null}findValidTraceAnchorCandidate(t,e,n){const o=sm(e),{points:i}=this.getTraceAnchorCandidates(t,e),r=i.sort((s,a)=\u003e{const A=s.x*o.x+s.y*o.y;return a.x*o.x+a.y*o.y-A});for(const s of r){const a=this.createCandidate(t,s,e),A=this.evaluateCandidate(a,t,n,\"trace-anchor\");if(this.recordCandidateResult(A),A.status===\"valid\")return A.selected=!0,A}return null}findValidOutwardTraceAnchorCandidate(t,e,n){const o=sm(e),i=this.getSearchStartAnchor(t,e),{points:r,preferNearestBendOnOutwardRow:s}=this.getTraceAnchorCandidates(t,e),a=r.sort((A,c)=\u003e{const l=A.x*o.x+A.y*o.y,u=c.x*o.x+c.y*o.y;if(!s)return u-l;const g=ju(e)?Math.abs(A.x-i.x):Math.abs(A.y-i.y),h=ju(e)?Math.abs(c.x-i.x):Math.abs(c.y-i.y);return u-l||g-h});for(const A of a){const c=this.createCandidate(t,{x:i.x,y:A.y},e,A),l=this.evaluateCandidate(c,t,n,\"outward-trace-anchor\");if(this.recordCandidateResult(l),l.status===\"valid\")return l.selected=!0,l;const u=this.getPerpendicularOutwardDirection(A,e);if(!(u.x===0\u0026\u0026u.y===0))for(let g=Z_;g\u003c=this.maxSearchDistance+lr;g+=Z_){const h={x:A.x+u.x*g,y:A.y+u.y*g},d=this.createCandidate(t,h,e,A),p=this.evaluateCandidate(d,t,n,\"outward-trace-anchor\",g);if(this.recordCandidateResult(p),p.status===\"valid\")return p.selected=!0,p}}return null}getTraceAnchorCandidates(t,e){const n=new Set,o=[],i=new Set(t.mspConnectionPairIds??[]),r=new Set(i);if(ju(e)){const u=new Set;for(const h of r)for(const d of this.traceMap[h]?.pinIds??[])u.add(d);let g=!0;for(;g;){g=!1;for(const h of Object.values(this.traceMap)){if(r.has(h.mspPairId)||this.netLabelConnectorTraceIds.has(h.mspPairId)||h.globalConnNetId!==t.globalConnNetId||!h.pinIds.some(p=\u003eu.has(p)))continue;const d=[...r].flatMap(p=\u003e{const m=this.traceMap[p];return m?[m]:[]});if(this.sharesVerticalRailWithAny(h,d)){r.add(h.mspPairId);for(const p of h.pinIds)u.add(p);g=!0}}}}for(const u of r){const g=this.traceMap[u];if(g)for(const h of g.tracePath){const d=`${h.x.toFixed(9)},${h.y.toFixed(9)}`;n.has(d)||(n.add(d),o.push(h))}}const s=sm(e),a=Math.max(...o.map(u=\u003eu.x*s.x+u.y*s.y)),A=o.filter(u=\u003eMath.abs(u.x*s.x+u.y*s.y-a)\u003c=lr),c=new Set([...i].flatMap(u=\u003ethis.traceMap[u]?.pinIds??[])),l=[...r].flatMap(u=\u003e{if(i.has(u))return[];const g=this.traceMap[u];return g?.pinIds.some(h=\u003ec.has(h))?[g]:[]});return{points:o,preferNearestBendOnOutwardRow:l.some(u=\u003eA.some(g=\u003eu.tracePath.some(h=\u003eMath.abs(h.x-g.x)\u003c=lr\u0026\u0026Math.abs(h.y-g.y)\u003c=lr)))}}sharesVerticalRailWithAny(t,e){const n=new Set;for(const o of e)for(let i=0;i\u003co.tracePath.length-1;i++){const r=o.tracePath[i],s=o.tracePath[i+1];Math.abs(r.x-s.x)\u003c=lr\u0026\u0026Math.abs(r.y-s.y)\u003elr\u0026\u0026n.add(r.x)}for(let o=0;o\u003ct.tracePath.length-1;o++){const i=t.tracePath[o],r=t.tracePath[o+1];if(Math.abs(i.x-r.x)\u003c=lr\u0026\u0026Math.abs(i.y-r.y)\u003elr\u0026\u0026[...n].some(s=\u003eMath.abs(s-i.x)\u003c=lr))return!0}return!1}getAvailableOrientations(t){const e=t.netId??t.globalConnNetId;return this.inputProblem.availableNetLabelOrientations[e]??[]}findValidShiftedCandidate(t,e,n){const o=sm(e),i=this.getSearchStartAnchor(t,e),r=this.getPerpendicularOutwardDirection(t.anchorPoint,e),s=this.getSearchDistanceLimit(t,e),a=r.x===0\u0026\u0026r.y===0?0:this.maxSearchDistance;for(let A=0;A\u003c=a+lr;A+=Z_){const c={x:i.x+r.x*A,y:i.y+r.y*A},l=this.findValidCandidateInShiftColumn({label:t,labelIndex:n,orientation:e,direction:o,baseAnchor:c,maxSearchDistance:s,outwardDistance:A});if(l)return l}return null}findValidLateralShiftedCandidate(t,e,n){const o=sm(e),i=this.getSearchStartAnchor(t,e),r={x:ju(e)?1:0,y:$H(e)?1:0},s=Math.ceil(this.maxSearchDistance/Z_);for(let a=1;a\u003c=s;a++)for(const A of[-1,1]){const c=A*a*Z_,l={x:i.x+r.x*c,y:i.y+r.y*c},u=this.getLateralColumnMaxDistance(t,e,l),g=this.findValidCandidateInShiftColumn({label:t,labelIndex:n,orientation:e,direction:o,baseAnchor:l,maxSearchDistance:u,outwardDistance:c,phase:\"lateral-shift\"});if(g)return g}return null}findValidCandidateInShiftColumn(t){const{label:e,labelIndex:n,orientation:o,direction:i,baseAnchor:r,maxSearchDistance:s,outwardDistance:a,phase:A=\"shift\",stopOnTraceCollision:c=!0,connectorSource:l,startDistance:u=Z_}=t;for(let g=u;g\u003c=s+lr;g+=Z_){const h={x:r.x+i.x*g,y:r.y+i.y*g},d=l??(A===\"lateral-shift\"?this.findProjectedConnectorSourceOnHostTrace(e,h,o):void 0),p=this.createCandidate(e,h,o,d),m=this.evaluateCandidate(p,e,n,A,g,a);if(this.recordCandidateResult(m),m.status===\"valid\")return m.selected=!0,m;if(c\u0026\u0026m.status===\"trace-collision\")break}return null}evaluateCandidate(t,e,n,o,i,r){return{...t,phase:o,distance:i,outwardDistance:r,selected:!1,status:this.getCandidateStatus({candidate:t,label:e,labelIndex:n,phase:o})}}recordCandidateResult(t){this.stats.candidateEvaluations=(this.stats.candidateEvaluations??0)+1,this.currentCandidateResults.length\u003cmvt?this.currentCandidateResults.push(t):t.status===\"valid\"\u0026\u0026(this.currentCandidateResults[mvt-1]=t),this.stats.maxRecordedCandidates=Math.max(this.stats.maxRecordedCandidates??0,this.currentCandidateResults.length)}getCandidateConnectorTrace(t,e,n){if(this.crowdedPortOnlyLabelIndices.has(n)\u0026\u0026this.getChipSideForPoint(t.anchorPoint)===\"top\"\u0026\u0026ju(e.orientation))return jve([t.anchorPoint,{x:t.anchorPoint.x,y:e.anchorPoint.y},e.anchorPoint]);if(e.connectorSource)return Wve(e.connectorSource,e.anchorPoint,e.orientation);if(e.phase===\"lateral-shift\"){const o=this.crowdedPortOnlyLabelIndices.has(n)?this.getChipOutwardDirection(t.anchorPoint):(()=\u003e{const r=sm(e.orientation);return{x:-r.x,y:-r.y}})(),i={x:t.anchorPoint.x+o.x*Z_,y:t.anchorPoint.y+o.y*Z_};return jve([t.anchorPoint,...Wve(i,e.anchorPoint,e.orientation)])}return Wve(t.anchorPoint,e.anchorPoint,e.orientation)}findProjectedConnectorSourceOnHostTrace(t,e,n){const o=sm(n),i=[];for(const r of t.mspConnectionPairIds){const s=this.traceMap[r];if(s)for(let a=0;a\u003cs.tracePath.length-1;a++){const A=s.tracePath[a],c=s.tracePath[a+1];if(!(ju(n)?Math.abs(A.y-c.y)\u003c=lr:Math.abs(A.x-c.x)\u003c=lr))continue;const u=ju(n)?{x:e.x,y:A.y}:{x:A.x,y:e.y};if(!jl([A,c],t.anchorPoint)||!jl([A,c],u))continue;(e.x-u.x)*o.x+(e.y-u.y)*o.y\u003e=-lr\u0026\u0026i.push(u)}}return i.sort((r,s)=\u003eMath.abs(r.x-e.x)+Math.abs(r.y-e.y)-(Math.abs(s.x-e.x)+Math.abs(s.y-e.y)))[0]}isStandaloneSinglePinNetLabel(t){return this.inputProblem.netConnections.some(e=\u003ee.netId===t.netId\u0026\u0026e.pinIds.length===1\u0026\u0026e.pinIds[0]===t.pinIds[0])}labelIntersectsDifferentNetTrace(t){const{width:e,height:n}=_B({orientation:t.orientation,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),o=IC(t.anchorPoint,t.orientation,e,n),i=Ls(o,e,n);return Object.values(this.traceMap).some(r=\u003er.globalConnNetId!==t.globalConnNetId\u0026\u0026Jve(r.tracePath,i))}getSearchStartAnchor(t,e){const n=this.getWickOffsetAnchor(t.anchorPoint,e),{width:o,height:i}=_B({orientation:e,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),r=this.getSideOffsetAnchor({anchorPoint:n,labelAnchorPoint:t.anchorPoint,orientation:e,width:o,height:i});return this.blockedStandaloneLabelIndex!==null\u0026\u0026t===this.outputNetLabelPlacements[this.blockedStandaloneLabelIndex]\u0026\u0026ju(e)\u0026\u0026this.blockedStandaloneLabelTargetAnchorX!==null\u0026\u0026(r.x=this.blockedStandaloneLabelTargetAnchorX),r}getWickOffsetAnchor(t,e){const n=sm(e);return{x:t.x+n.x*$5,y:t.y+n.y*$5}}getSideOffsetAnchor(t){const{anchorPoint:e,labelAnchorPoint:n,orientation:o,width:i,height:r}=t,s=this.getChipSideForPoint(n),a=this.getContainingChipSide(n)?$5:Z_;return ju(o)\u0026\u0026s===\"left\"?{x:e.x-i/2-a,y:e.y}:ju(o)\u0026\u0026s===\"right\"?{x:e.x+i/2+a,y:e.y}:$H(o)\u0026\u0026s===\"bottom\"?{x:e.x,y:e.y-r/2-a}:$H(o)\u0026\u0026s===\"top\"?{x:e.x,y:e.y+r/2+a}:e}getSearchDistanceLimit(t,e){const{width:n,height:o}=_B({orientation:e,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),i=e===\"y+\"||e===\"y-\"?o:n;return Math.min(this.maxSearchDistance,i*2)}getLateralColumnMaxDistance(t,e,n){const o=this.getAvailableOrientations(t),i=o.length===1\u0026\u0026ju(o[0]),r=new Set(t.pinIds.map(l=\u003ethis.pinMap[l]?.chipId).filter(l=\u003e!!l)),s=this.chipObstacleSpatialIndex.chips.filter(l=\u003er.has(l.chipId)),a=t.pinIds.map(l=\u003ethis.pinMap[l]?.chipId).find(Boolean),A=s.find(l=\u003el.chipId===a),c=i?s:A?[A]:[];if(c.length\u003e0){if(e===\"y-\")return Math.max(0,...c.map(l=\u003en.y-l.bounds.minY));if(e===\"y+\")return Math.max(0,...c.map(l=\u003el.bounds.maxY-n.y));if(e===\"x-\")return Math.max(0,...c.map(l=\u003en.x-l.bounds.minX));if(e===\"x+\")return Math.max(0,...c.map(l=\u003el.bounds.maxX-n.x))}return this.getSearchDistanceLimit(t,e)}createCandidate(t,e,n,o){const{width:i,height:r}=_B({orientation:n,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)});return{orientation:n,anchorPoint:e,connectorSource:o,width:i,height:r,center:IC(e,n,i,r)}}getNetLabelHeight(t){if(t.netId){const e=this.inputProblem.netConnections.find(n=\u003en.netId===t.netId)?.netLabelHeight;if(e!==void 0)return e}return this.inputProblem.netConnections.find(e=\u003ee.pinIds.some(n=\u003et.pinIds.includes(n)))?.netLabelHeight}getCandidateStatus(t){const{candidate:e,label:n,labelIndex:o,phase:i}=t,r=Ls(e.center,e.width,e.height),s=this.getBoundsStatus({bounds:r,labelIndex:o,label:n});if(s!==\"valid\"){if(!(i===\"trace-anchor\"||i===\"connected-rail-shift\"||i===\"downward-ground-rail-extension\")||s!==\"chip-collision\"||!this.isAcceptableConnectedChipBoundaryOverlap(e,n,r)||i===\"connected-rail-shift\"\u0026\u0026!this.staysOutsideConnectedPinRow({candidate:e,label:n,bounds:r}))return s;const l=this.getBoundsStatus({bounds:r,labelIndex:o,label:n,ignoreChipCollisions:!0});if(l!==\"valid\")return l}const a=this.getCandidateConnectorTrace(n,{anchorPoint:e.anchorPoint,connectorSource:i===\"lateral-shift\"?e.connectorSource:void 0,orientation:e.orientation,phase:i},o);if(this.obstacleIndex.doesTracePathCrossChip(a))return\"chip-collision\";for(const c of this.inputProblem.textBoxes??[])if(Jve(a,fB(c)))return\"text-collision\";const A=this.includeHorizontalConstraintMismatches(this.obstacleIndex.getLabelIndicesNearTracePath(a),this.isGroundLabel(n));for(const c of A){if(c===o||this.shouldIgnorePendingCrowdedLabel(o,c))continue;const l=this.outputNetLabelPlacements[c];if(Jve(a,this.getLabelBoundsForCollisionWithGround(l,n)))return\"netlabel-collision\"}return\"valid\"}isAcceptableConnectedChipBoundaryOverlap(t,e,n){const o=this.chipObstacleSpatialIndex.getChipsInBounds(n);if(o.length===0)return!1;const i=new Set(e.pinIds.map(r=\u003ethis.pinMap[r]?.chipId).filter(r=\u003e!!r));return o.every(r=\u003e{if(!i.has(r.chipId))return!1;const{anchorPoint:s,orientation:a}=t,A=r.bounds;return ju(a)?s.x\u003cA.minX-lr||s.x\u003eA.maxX+lr:s.y\u003cA.minY-lr||s.y\u003eA.maxY+lr})}staysOutsideConnectedPinRow(t){const{candidate:e,label:n,bounds:o}=t,i=this.pinMap[n.pinIds[0]];return!i||!ju(e.orientation)?!1:e.anchorPoint.x\u003ci.x?o.maxX\u003c=i.x+yvt+lr:o.minX\u003e=i.x-yvt-lr}getBoundsStatus(t){const{bounds:e,labelIndex:n,label:o,ignoreChipCollisions:i}=t;return!i\u0026\u0026(this.chipObstacleSpatialIndex.getChipsInBounds(e).length\u003e0||this.sharesChipBoundary(e))?\"chip-collision\":KH(e,this.inputProblem)?\"text-collision\":this.obstacleIndex.doesTraceCrossBoundsInterior(e)?\"trace-collision\":this.isTraceTooCloseToLabel(e,o)?\"trace-clearance-violation\":this.intersectsAnyOtherNetLabel(e,n,o)?\"netlabel-collision\":\"valid\"}isTraceTooCloseToLabel(t,e){if(!this.shouldCheckTraceClearanceForLabel(e))return!1;const n=this.getLabelTraceClearanceBounds(t);return this.obstacleIndex.doesTraceIntersectBounds({bounds:n,excludedGlobalConnNetId:e.globalConnNetId})}getLabelTraceClearanceBounds(t){return{minX:t.minX-_j,minY:t.minY-_j,maxX:t.maxX+_j,maxY:t.maxY+_j}}shouldCheckTraceClearanceForLabel(t){return!this.isPortOnlyLabel(t)||!this.hasRoutedLabelOnSameNet(t)?!1:this.getAvailableOrientations(t).length===1}hasRoutedLabelOnSameNet(t){for(const e of this.outputNetLabelPlacements)if(e.globalConnNetId===t.globalConnNetId\u0026\u0026e.mspConnectionPairIds.length\u003e0)return!0;return!1}isOutwardHorizontalFallback(t){const e=this.getChipSideForPoint(t.anchorPoint);return e===\"left\"\u0026\u0026t.orientation===\"x-\"||e===\"right\"\u0026\u0026t.orientation===\"x+\"}canPlaceVerticalLabelOnHostRail(t,e){if(!e.mspConnectionPairIds.some(s=\u003e{const a=this.traceMap[s];return a\u0026\u0026jl(a.tracePath,t.anchorPoint)}))return!1;const o=this.pinMap[e.pinIds[0]];if(!o||e.pinIds.some(s=\u003ethis.pinMap[s]?.chipId!==o.chipId))return!1;const i=this.chipObstacleSpatialIndex.chips.find(s=\u003es.chipId===o.chipId);if(!i)return!1;const r=Ls(t.center,t.width,t.height);return r.minY\u003ci.bounds.minY-lr||r.maxY\u003ei.bounds.maxY+lr||t.anchorPoint.x\u003e=i.bounds.minX-lr\u0026\u0026t.anchorPoint.x\u003c=i.bounds.maxX+lr?!1:i.pins.every(s=\u003ee.pinIds.includes(s.pinId)||s.y\u003c=r.minY+lr||s.y\u003e=r.maxY-lr)}getTextBlockedMultiPinRailTraces(t,e){if(!ju(e))return null;const n=this.pinMap[t.pinIds[0]]?.chipId,o=Object.values(this.traceMap).filter(d=\u003ed.globalConnNetId===t.globalConnNetId\u0026\u0026d.pins.every(p=\u003ep.chipId===n)),i=new Set(t.pinIds),r=new Set;for(let d=!0;d;){d=!1;for(const p of o)if(!r.has(p)\u0026\u0026p.pinIds.some(m=\u003ei.has(m))){r.add(p);for(const m of p.pinIds)i.add(m);d=!0}}if(i.size\u003c3||i.size===3\u0026\u0026!this.hasPortOnlyLabelOnSameNet(t))return null;const s=[...i].map(d=\u003ethis.pinMap[d]),a=sm(e),A=s[0].x;if(s.some(d=\u003eMath.abs(d.x-A)\u003elr))return null;const c=this.inputProblem.chips.find(d=\u003ed.chipId===n).pins.filter(d=\u003eMath.abs(d.x-A)\u003c=lr),l=Math.min(...s.map(d=\u003ed.y)),u=Math.max(...s.map(d=\u003ed.y));if(c.some(d=\u003ed.y\u003e=l-lr\u0026\u0026d.y\u003c=u+lr\u0026\u0026!i.has(d.pinId))||e===\"y-\"\u0026\u0026l\u003eMath.min(...c.map(d=\u003ed.y))+lr||e===\"y+\"\u0026\u0026u\u003cMath.max(...c.map(d=\u003ed.y))-lr)return null;const g=Math.max(...s.map(d=\u003ed.x*a.x+d.y*a.y));return(this.inputProblem.textBoxes??[]).some(d=\u003ed.chipId===n\u0026\u0026d.center.x*a.x+d.center.y*a.y\u003eg+lr)?[...r]:null}findValidNearbyRailCandidate(t,e,n,o){if(!ju(e))return null;const i=sm(e),r=[...new Set(o.flatMap(A=\u003eA.pinIds))].map(A=\u003ethis.pinMap[A]).sort((A,c)=\u003ec.y*i.y-A.y*i.y)[0]?.y;if(r===void 0)return null;const s=this.pinMap[t.pinIds[0]].x,a=[...new Set(o.flatMap(A=\u003eA.tracePath.map(c=\u003ec.x)))].filter(A=\u003eMath.abs(A-s)\u003elr).sort((A,c)=\u003eMath.abs(A-s)-Math.abs(c-s));for(const A of a){const c={x:A,y:r};if(!Object.values(this.traceMap).some(u=\u003eu.globalConnNetId===t.globalConnNetId\u0026\u0026jl(u.tracePath,c)))continue;const l=this.findValidCandidateInShiftColumn({label:t,labelIndex:n,orientation:e,direction:i,baseAnchor:c,maxSearchDistance:this.getSearchDistanceLimit(t,e),outwardDistance:0,phase:\"connected-rail-shift\",stopOnTraceCollision:!1,connectorSource:c,startDistance:0});if(l)return l}return null}hasPortOnlyLabelOnSameNet(t){return this.outputNetLabelPlacements.some(e=\u003ee!==t\u0026\u0026e.globalConnNetId===t.globalConnNetId\u0026\u0026this.isPortOnlyLabel(e))}hasOppositeVerticalRailOnSameChipSide(t,e){const n=this.inputProblem.netConnections.find(r=\u003er.netId===t.netId);if(!n)return!1;const o=this.getSingleChipSideForNetConnection(n);if(!o)return!1;const i=e===\"y+\"?\"y-\":\"y+\";return this.inputProblem.netConnections.some(r=\u003e{if(r===n||r.pinIds.length\u003c2)return!1;const s=this.inputProblem.availableNetLabelOrientations[r.netId]??[];if(s.length!==1||s[0]!==i)return!1;const a=this.getSingleChipSideForNetConnection(r);return a?.chipId===o.chipId\u0026\u0026a.side===o.side})}getSingleChipSideForNetConnection(t){if(t.pinIds.length\u003c2)return null;const e=t.pinIds.map(s=\u003ethis.pinMap[s]);if(e.some(s=\u003e!s)||new Set(e.map(s=\u003es.chipId)).size!==1)return null;const o=e[0].chipId,i=this.chipObstacleSpatialIndex.chips.find(s=\u003es.chipId===o);if(!i)return null;const r=new Set(e.map(s=\u003eMath.abs(s.x-i.bounds.minX)\u003c=lr?\"left\":Math.abs(s.x-i.bounds.maxX)\u003c=lr?\"right\":null));return r.size!==1||r.has(null)?null:{chipId:o,side:[...r][0]}}isPortOnlyLabel(t){return t.mspConnectionPairIds.length===0}getNetConnectionForLabel(t){return t.netId?this.inputProblem.netConnections.find(e=\u003ee.netId===t.netId):this.inputProblem.netConnections.find(e=\u003ee.pinIds.some(n=\u003et.pinIds.includes(n)))}isGroundLabel(t){return this.getNetConnectionForLabel(t)?.isGround===!0}getHorizontalConstraintMismatchBounds(t){if(!this.isPortOnlyLabel(t)||t.orientation!==\"x+\"\u0026\u0026t.orientation!==\"x-\")return null;const e=t.netId??t.globalConnNetId,n=this.inputProblem.availableNetLabelOrientations[e]??[];if(n.length===0||n.some(s=\u003e!ju(s)))return null;const o=this.getNetConnectionForLabel(t)?.netLabelHeight;if(o===void 0||o\u003c=t.width+t.height+lr)return null;const i=IC(t.anchorPoint,t.orientation,t.width,t.height),r=IC(t.anchorPoint,t.orientation,o,t.height);return Ls({x:r.x+t.center.x-i.x,y:r.y+t.center.y-i.y},o,t.height)}includeHorizontalConstraintMismatches(t,e){if(!e)return[...t].sort((o,i)=\u003eo-i);const n=new Set(t);for(let o=0;o\u003cthis.outputNetLabelPlacements.length;o++)this.getHorizontalConstraintMismatchBounds(this.outputNetLabelPlacements[o])\u0026\u0026n.add(o);return[...n].sort((o,i)=\u003eo-i)}getLabelBoundsForCollisionWithGround(t,e){if(this.isGroundLabel(e)){const n=this.getHorizontalConstraintMismatchBounds(t);if(n)return n}return Ls(t.center,t.width,t.height)}shouldIgnorePendingCrowdedLabel(t,e){return this.crowdedPortOnlyLabelIndices.has(t)\u0026\u0026this.crowdedPortOnlyLabelIndices.has(e)\u0026\u0026this.queuedLabelIndices.includes(e)}intersectsAnyOtherNetLabel(t,e,n){const o={minX:t.minX-Z_,minY:t.minY-Z_,maxX:t.maxX+Z_,maxY:t.maxY+Z_},i=this.includeHorizontalConstraintMismatches(this.obstacleIndex.getLabelIndicesInBounds(o),this.isGroundLabel(n));for(const r of i){if(r===e||this.shouldIgnorePendingCrowdedLabel(e,r))continue;const s=this.outputNetLabelPlacements[r],a=this.getLabelBoundsForCollisionWithGround(s,n);if(r===this.blockedStandaloneLabelIndex\u0026\u0026ju(s.orientation)\u0026\u0026(a.minX-=Z_,a.maxX+=Z_),pj(t,a))return!0}return!1}sharesChipBoundary(t){const e={minX:t.minX-$5-lr,minY:t.minY-$5-lr,maxX:t.maxX+$5+lr,maxY:t.maxY+$5+lr},n=this.chipObstacleSpatialIndex.getChipsInBounds(e);for(const o of n){const i=o.bounds,r=Math.abs(t.minX-i.maxX)\u003c=$5+lr||Math.abs(t.maxX-i.minX)\u003c=$5+lr,s=Math.abs(t.minY-i.maxY)\u003c=$5+lr||Math.abs(t.maxY-i.minY)\u003c=$5+lr;if(r\u0026\u0026Tle(t.minY,t.maxY,i.minY,i.maxY)||s\u0026\u0026Tle(t.minX,t.maxX,i.minX,i.maxX))return!0}return!1}getChipSideForPoint(t){const e=this.getContainingChipSide(t);if(e)return e;const n=this.getOutsideChipSide(t);return n||this.getNearestChipSide(t)}getPerpendicularOutwardDirection(t,e){const n=this.getChipSideForPoint(t);return ju(e)\u0026\u0026n===\"left\"?{x:-1,y:0}:ju(e)\u0026\u0026n===\"right\"?{x:1,y:0}:$H(e)\u0026\u0026n===\"bottom\"?{x:0,y:-1}:$H(e)\u0026\u0026n===\"top\"?{x:0,y:1}:{x:0,y:0}}getChipOutwardDirection(t){switch(this.getChipSideForPoint(t)){case\"left\":return{x:-1,y:0};case\"right\":return{x:1,y:0};case\"bottom\":return{x:0,y:-1};case\"top\":return{x:0,y:1};default:return{x:0,y:0}}}getContainingChipSide(t){let e=null,n=Number.POSITIVE_INFINITY;for(const o of this.chipObstacleSpatialIndex.chips){const i=o.bounds;if(!(t.x\u003ci.minX-lr||t.x\u003ei.maxX+lr||t.y\u003ci.minY-lr||t.y\u003ei.maxY+lr))for(const[r,s]of fvt(t,i))s\u003cn\u0026\u0026(e=r,n=s)}return e}getOutsideChipSide(t){let e=null,n=Number.POSITIVE_INFINITY;for(const o of this.chipObstacleSpatialIndex.chips){const i=o.bounds,r=t.x\u003ci.minX-lr?i.minX-t.x:t.x\u003ei.maxX+lr?t.x-i.maxX:0,s=t.y\u003ci.minY-lr?i.minY-t.y:t.y\u003ei.maxY+lr?t.y-i.maxY:0;if(r===0\u0026\u0026s===0)continue;const a=r**2+s**2;a\u003e=n||(n=a,r\u003e0?e=t.x\u003ci.minX?\"left\":\"right\":e=t.y\u003ci.minY?\"bottom\":\"top\")}return e}getNearestChipSide(t){let e=null,n=Number.POSITIVE_INFINITY;for(const o of this.chipObstacleSpatialIndex.chips)for(const[i,r]of fvt(t,o.bounds))r\u003cn\u0026\u0026(e=i,n=r);return e}visualize(){return p2o({inputProblem:this.inputProblem,traces:this.traces,outputNetLabelPlacements:this.outputNetLabelPlacements,currentLabel:this.currentLabel,currentCandidateResults:this.currentCandidateResults,solved:this.solved})}},B2o=\"blue\",xvt=\"red\",b2o=t=\u003e{const e=zh(t.inputProblem);return P2o(e),S2o(e,t.traces),Q2o(e,t.outputNetLabelPlacements),t.solved||(v2o(e,t.currentLabel),w2o(e,t.currentCandidateResults)),e},S2o=(t,e)=\u003e{for(const n of e)t.lines.push({points:n.tracePath,strokeColor:\"purple\"})},Q2o=(t,e)=\u003e{for(const n of e)t.rects.push({center:n.center,width:n.width,height:n.height,fill:Mc(n.globalConnNetId,.35),strokeColor:Mc(n.globalConnNetId,.9),label:`netId: ${n.netId}\nglobalConnNetId: ${n.globalConnNetId}`}),t.points.push({x:n.anchorPoint.x,y:n.anchorPoint.y,color:Mc(n.globalConnNetId,.9),label:`anchorPoint\norientation: ${n.orientation}`})},v2o=(t,e)=\u003e{e\u0026\u0026t.rects.push({center:e.center,width:e.width,height:e.height,fill:\"rgba(255, 0, 0, 0.2)\",strokeColor:xvt,label:`trace-line VCC target\n${e.netId??e.globalConnNetId}`})},w2o=(t,e)=\u003e{for(const n of e){const o=n.selected?B2o:xvt;t.rects.push({center:n.center,width:n.width,height:n.height,fill:n.selected?\"rgba(0, 0, 255, 0.2)\":\"rgba(255, 0, 0, 0.15)\",strokeColor:o,strokeDash:n.selected?void 0:\"4 2\",label:`${n.selected?\"selected\":n.status} trace corner\ntrace: ${n.traceId}\ndistance: ${n.distance.toFixed(3)}`}),t.points.push({...n.anchorPoint,color:o,label:`candidate anchor\n${n.status}`})}},P2o=t=\u003e{t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[])},Hle=.1,M2o=class extends Ng{inputProblem;traces;netLabelPlacements;outputNetLabelPlacements;queuedLabelIndices=[];currentLabelIndex=null;currentLabel=null;currentCandidateResults=[];queuedCornerCandidates=[];shouldAdvanceToNextLabel=!1;traceMap;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements],this.traceMap=Object.fromEntries(t.traces.map(e=\u003e[e.mspPairId,e])),this.queuedLabelIndices=this.getProcessableLabelIndices(),this.prepareNextLabel()}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){if(this.shouldAdvanceToNextLabel){this.advanceToNextLabel();return}const t=this.currentLabel,e=this.currentLabelIndex;if(t===null||e===null){this.finish();return}const n=this.queuedCornerCandidates.shift();if(!n){this.shouldAdvanceToNextLabel=!0;return}const o=this.evaluateCornerCandidate(t,e,n);this.currentCandidateResults.push(o),o.status===\"valid\"\u0026\u0026(o.selected=!0,this.applyCandidate(e,t,o),this.shouldAdvanceToNextLabel=!0)}getOutput(){return{traces:this.traces,netLabelPlacements:this.outputNetLabelPlacements}}getProcessableLabelIndices(){const t=[];for(let e=0;e\u003cthis.outputNetLabelPlacements.length;e++){const n=this.outputNetLabelPlacements[e];this.shouldProcessLabel(n)\u0026\u0026t.push(e)}return t}prepareNextLabel(){const t=this.queuedLabelIndices.shift();if(t===void 0)return this.clearCurrentLabel(),!1;const e=this.outputNetLabelPlacements[t];return this.currentLabelIndex=t,this.currentLabel=e,this.currentCandidateResults=[],this.queuedCornerCandidates=this.getCornerCandidatesForLabel(e),!0}advanceToNextLabel(){this.shouldAdvanceToNextLabel=!1,this.prepareNextLabel()||this.finish()}clearCurrentLabel(){this.currentLabelIndex=null,this.currentLabel=null,this.currentCandidateResults=[],this.queuedCornerCandidates=[]}finish(){this.clearCurrentLabel(),this.solved=!0}evaluateCornerCandidate(t,e,n){const o=IC(n.anchorPoint,t.orientation,t.width,t.height),i=Ls(o,t.width,t.height);return{...n,center:o,width:t.width,height:t.height,status:this.getCandidateStatus(i,e,n),selected:!1}}getCandidateStatus(t,e,n){if(this.intersectsAnyChip(t))return\"chip-collision\";if(KH(t,this.inputProblem))return\"text-collision\";const o=n.reroutedTracePath?{...this.traceMap,[n.traceId]:{...this.traceMap[n.traceId],tracePath:n.reroutedTracePath}}:this.traceMap;return mj(t,o)||n.reroutedTracePath\u0026\u0026!this.isReroutedTraceClear(n,e)?\"trace-collision\":this.intersectsAnyOtherNetLabel(t,e)?\"netlabel-collision\":\"valid\"}applyCandidate(t,e,n){if(n.reroutedTracePath){const o=this.traceMap[n.traceId],i={...o,tracePath:n.reroutedTracePath};this.traces=this.traces.map(r=\u003er.mspPairId===n.traceId?i:r),this.traceMap[n.traceId]=i,this.outputNetLabelPlacements=jH({trace:o,originalTracePath:o.tracePath,reroutedTracePath:n.reroutedTracePath,netLabelPlacements:this.outputNetLabelPlacements})}this.outputNetLabelPlacements[t]={...e,anchorPoint:n.anchorPoint,center:n.center}}shouldProcessLabel(t){return(t.orientation===\"y+\"||t.orientation===\"y-\")\u0026\u0026this.getCornerCandidatesForLabel(t).length\u003e0}intersectsAnyChip(t){return this.inputProblem.chips.some(e=\u003eyB(t,Ls(e.center,e.width,e.height)))}intersectsAnyOtherNetLabel(t,e){return this.outputNetLabelPlacements.some((n,o)=\u003eo===e?!1:yB(t,Ls(n.center,n.width,n.height)))}getCornerCandidatesForLabel(t){const e=[],n=[],o=this.getTraceLinesForLabel(t),i=this.isConfiguredRailLabel(t)\u0026\u0026(this.isLabelCrossedByOtherNetTrace(t)||!o.some(r=\u003eLve(r.tracePath).some(s=\u003ethis.pointsEqual(s,t.anchorPoint))));for(const r of o){const s=r.tracePath,a=[s[0],s[s.length-1]];for(const A of Lve(s)){const c=s.indexOf(A),l=a.some(h=\u003eMath.abs(h.x-A.x)\u003c=yC),u=l||i\u0026\u0026this.isPinAlignedCorner(s,c);if(!u)continue;(l?e:n).push({anchorPoint:A,traceId:r.mspPairId,distance:KQt(A,t.anchorPoint),pinAligned:u},...this.getClearanceShiftedCornerCandidates({label:t,trace:r,cornerIndex:c,pinAligned:u}))}}return[...e.sort((r,s)=\u003er.distance-s.distance),...n.sort((r,s)=\u003er.distance-s.distance)]}isConfiguredRailLabel(t){return t.netId?this.inputProblem.availableNetLabelOrientations[t.netId]?.some(e=\u003ee===\"y+\"||e===\"y-\"):!1}isLabelCrossedByOtherNetTrace(t){const e=Ls(t.center,t.width,t.height),n=Object.fromEntries(this.traces.filter(o=\u003eo.globalConnNetId!==t.globalConnNetId).map(o=\u003e[o.mspPairId,o]));return mj(e,n)}pointsEqual(t,e){return Math.abs(t.x-e.x)\u003c=yC\u0026\u0026Math.abs(t.y-e.y)\u003c=yC}getVerticalSegmentPointIndices(t,e){const n=t[e],o=Math.abs(t[e-1].x-n.x)\u003c=yC,i=Math.abs(t[e+1].x-n.x)\u003c=yC;return o===i?null:o?[e-1,e]:[e,e+1]}isPinAlignedCorner(t,e){const n=this.getVerticalSegmentPointIndices(t,e);if(!n)return!1;const[o,i]=n;return o\u003c=1||i\u003e=t.length-2}getClearanceShiftedCornerCandidates({label:t,trace:e,cornerIndex:n,pinAligned:o}){if(t.orientation!==\"y+\"\u0026\u0026t.orientation!==\"y-\")return[];const i=e.tracePath,r=i[n],s=this.getVerticalSegmentPointIndices(i,n);if(!s||s.includes(0)||s.includes(i.length-1))return[];const a=IC(r,t.orientation,t.width,t.height),A=Ls(a,t.width,t.height),c=this.inputProblem.chips.map(u=\u003eLs(u.center,u.width,u.height)).filter(u=\u003eyB(A,u)),l=new Set;for(const u of c)l.add(u.minX-t.width/2),l.add(u.maxX+t.width/2);for(const u of this.traces)if(u.globalConnNetId!==t.globalConnNetId)for(let g=0;g\u003cu.tracePath.length-1;g++){const h=u.tracePath[g],d=u.tracePath[g+1];if(!kle(h,d,A))continue;const p=t.width/2;Math.abs(h.x-d.x)\u003c=yC?(l.add(h.x-p-Hle),l.add(h.x+p+Hle)):(l.add(Math.min(h.x,d.x)-p-Hle),l.add(Math.max(h.x,d.x)+p+Hle))}return[...l].flatMap(u=\u003e{if(Math.abs(u-r.x)\u003c=yC)return[];const g=Qa(i.map((p,m)=\u003es.includes(m)?{...p,x:u}:p)),h={x:u,y:r.y};return Lve(g).some(p=\u003ethis.pointsEqual(p,h))?[{anchorPoint:h,traceId:e.mspPairId,distance:KQt(h,t.anchorPoint),pinAligned:o,reroutedTracePath:g}]:[]})}isReroutedTraceClear(t,e){const n=t.reroutedTracePath;if(ON(n,Hy(this.inputProblem)))return!1;const o=this.traceMap[t.traceId],i=this.traces.filter(s=\u003es.mspPairId!==t.traceId\u0026\u0026s.globalConnNetId!==o.globalConnNetId);if(PQt(n,i))return!1;const r={[t.traceId]:{...o,tracePath:n}};return this.outputNetLabelPlacements.every((s,a)=\u003ea===e?!0:!mj(Ls(s.center,s.width,s.height),r))}getTraceLinesForLabel(t){return this.traces.filter(e=\u003eWCo(e)\u0026\u0026this.isTraceForLabel(e,t))}isTraceForLabel(t,e){if(!jl(t.tracePath,e.anchorPoint))return!1;const n=new Set(e.mspConnectionPairIds);return n.size\u003e0?n.has(t.mspPairId):t.globalConnNetId===e.globalConnNetId}visualize(){return b2o({inputProblem:this.inputProblem,traces:this.traces,outputNetLabelPlacements:this.outputNetLabelPlacements,currentLabel:this.currentLabel,currentCandidateResults:this.currentCandidateResults,solved:this.solved})}},qve=t=\u003e[...new Set(t)],D2o=t=\u003e[...new Set(t.filter(e=\u003ee!==void 0))],N2o=(t,e)=\u003eD2o([e.netId,e.globalConnNetId,...t.netConnections.filter(n=\u003ee.pinIds.some(o=\u003en.pinIds.includes(o))).map(n=\u003en.netId)]),R2o=t=\u003e{switch(t){case\"x+\":case\"+x\":return\"x+\";case\"x-\":case\"-x\":return\"x-\";case\"y+\":case\"+y\":return\"y+\";case\"y-\":case\"-y\":return\"y-\"}},T2o=(t,e)=\u003e{const n=t.availableNetLabelOrientations??{};for(const o of N2o(t,e))if(Object.hasOwn(n,o))return qve((n[o]??[]).map(R2o).filter(i=\u003ei!==void 0));return null},hd=1e-6,Ole=1e-6,Gle=t=\u003eLs(t.center,t.width,t.height),Evt=(t,e)=\u003eMath.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)\u003ehd\u0026\u0026Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)\u003ehd,k2o=(t,e)=\u003eMath.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)\u003e=-hd\u0026\u0026Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)\u003e=-hd,F2o=(t,e)=\u003e{for(const n of e){const o=n.tracePath;for(let i=0;i\u003co.length-1;i++)if(G2o(o[i],o[i+1],t))return!0}return!1},Bvt=(t,e)=\u003e{const n=[];for(const o of e){if(K2o(o.pinIds)\u003c2)continue;let i=0;for(let r=0;r\u003co.tracePath.length-1;r++){const s=o.tracePath[r],a=o.tracePath[r+1],A=qH(s,a);Y2o(t,s,a)\u0026\u0026n.push({trace:o,distance:i+qH(s,t)}),i+=A}}return n},L2o=t=\u003e{let e=0;for(let n=0;n\u003ct.tracePath.length-1;n++)e+=qH(t.tracePath[n],t.tracePath[n+1]);return e},H2o=(t,e)=\u003e{let n=0;for(let o=0;o\u003ct.tracePath.length-1;o++){const i=t.tracePath[o],r=t.tracePath[o+1],s=qH(i,r),a=n+s;if(e\u003c=a+hd){const A=Math.max(0,Math.min(s,e-n)),c=U2o(i,r);return{x:i.x+c.x*A,y:i.y+c.y*A}}n=a}return t.tracePath[t.tracePath.length-1]},O2o=t=\u003e{const e=[];let n=0;for(let o=0;o\u003ct.tracePath.length;o++){e.push(n);const i=t.tracePath[o+1];i\u0026\u0026(n+=qH(t.tracePath[o],i))}return e},qH=(t,e)=\u003eMath.abs(t.x-e.x)+Math.abs(t.y-e.y),G2o=(t,e,n)=\u003e{const o={minX:n.minX+Ole,minY:n.minY+Ole,maxX:n.maxX-Ole,maxY:n.maxY-Ole};return o.minX\u003e=o.maxX||o.minY\u003e=o.maxY?!1:Zve(t,e)?t.x\u003c=o.minX+hd||t.x\u003e=o.maxX-hd?!1:bvt(Math.min(t.y,e.y),Math.max(t.y,e.y),o.minY,o.maxY):Xve(t,e)?t.y\u003c=o.minY+hd||t.y\u003e=o.maxY-hd?!1:bvt(Math.min(t.x,e.x),Math.max(t.x,e.x),o.minX,o.maxX):!1},Y2o=(t,e,n)=\u003eXve(e,n)?Math.abs(t.y-e.y)\u003c=hd\u0026\u0026t.x\u003e=Math.min(e.x,n.x)-hd\u0026\u0026t.x\u003c=Math.max(e.x,n.x)+hd:Zve(e,n)?Math.abs(t.x-e.x)\u003c=hd\u0026\u0026t.y\u003e=Math.min(e.y,n.y)-hd\u0026\u0026t.y\u003c=Math.max(e.y,n.y)+hd:!1,U2o=(t,e)=\u003e({x:Zve(t,e)?0:Math.sign(e.x-t.x),y:Xve(t,e)?0:Math.sign(e.y-t.y)}),Xve=(t,e)=\u003eMath.abs(t.y-e.y)\u003c=hd,Zve=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=hd,bvt=(t,e,n,o)=\u003eMath.min(e,o)-Math.max(t,n)\u003ehd,K2o=t=\u003enew Set(t).size,Svt=.1,V2o=t=\u003e{const{inputProblem:e,label:n,traceLocation:o}=t,i=L2o(o.trace),r=T2o(e,n),s=z2o(i,O2o(o.trace)),a=oxo(e,n),A=ixo(e,n),c=[],l=new Set;for(const u of s){const g=H2o(o.trace,u),h=J2o({inputProblem:e,label:n,point:g,orientationConstraint:r});for(const d of h){if(rxo(n,g,d))continue;const p=[g.x.toFixed(6),g.y.toFixed(6),d].join(\":\");l.has(p)||(l.add(p),c.push(W2o({point:g,orientation:d,netLabelWidth:a,netLabelHeight:A,traceLocation:o,pathDistance:u,label:n})))}}return c},z2o=(t,e)=\u003e{const n=new Set,o=Math.ceil(t/Svt);for(let i=0;i\u003c=o;i++){const r=Math.min(t,i*Svt);n.add(vvt(r))}for(const i of e)n.add(vvt(i));return[...n].filter(i=\u003ei\u003e=-hd\u0026\u0026i\u003c=t+hd).sort((i,r)=\u003ei-r)},J2o=t=\u003e{const{inputProblem:e,label:n,point:o,orientationConstraint:i}=t;return i||j2o({label:n,inputProblem:e,point:o})},W2o=t=\u003e{const{point:e,orientation:n,netLabelWidth:o,netLabelHeight:i,traceLocation:r,pathDistance:s,label:a}=t,{width:A,height:c}=_B({orientation:n,netLabelWidth:o,netLabelHeight:i});return{anchorPoint:e,center:IC(e,n,A,c),width:A,height:c,orientation:n,traceId:r.trace.mspPairId,pathDistance:s,distanceFromOriginal:qH(e,a.anchorPoint),status:\"valid\",selected:!1}},j2o=t=\u003e{const{label:e,inputProblem:n,point:o}=t;return qve([...$2o(e),...q2o({inputProblem:n,point:o}),...exo])},$2o=t=\u003e[t.orientation,txo(t.orientation)],q2o=t=\u003e{const{inputProblem:e,point:n}=t,o=nxo(e);return qve(X2o(n,o).sort((i,r)=\u003er.outwardScore-i.outwardScore).map(({orientation:i})=\u003ei))},X2o=(t,e)=\u003e{const n=[];return n.push(Qvt({value:t.y,min:e.minY,max:e.maxY,center:e.centerY,positiveOrientation:\"y+\",negativeOrientation:\"y-\"})),n.push(Qvt({value:t.x,min:e.minX,max:e.maxX,center:e.centerX,positiveOrientation:\"x+\",negativeOrientation:\"x-\"})),n},Qvt=t=\u003e{const{value:e,min:n,max:o,center:i,positiveOrientation:r,negativeOrientation:s}=t;return e\u003eo+hd?{orientation:r,outwardScore:1+e-o}:e\u003cn-hd?{orientation:s,outwardScore:1+n-e}:{orientation:e\u003e=i?r:s,outwardScore:Z2o(e,i,o-n)}},Z2o=(t,e,n)=\u003eMath.abs(t-e)/Math.max(hd,n/2),exo=[\"x+\",\"x-\",\"y+\",\"y-\"],txo=t=\u003e{switch(t){case\"x+\":return\"x-\";case\"x-\":return\"x+\";case\"y+\":return\"y-\";case\"y-\":return\"y+\"}},nxo=t=\u003e{if(t.chips.length===0)return{minX:0,minY:0,maxX:0,maxY:0,centerX:0,centerY:0};const e=t.chips.reduce((n,o)=\u003e({minX:Math.min(n.minX,o.center.x-o.width/2),minY:Math.min(n.minY,o.center.y-o.height/2),maxX:Math.max(n.maxX,o.center.x+o.width/2),maxY:Math.max(n.maxY,o.center.y+o.height/2)}),{minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY});return{...e,centerX:(e.minX+e.maxX)/2,centerY:(e.minY+e.maxY)/2}},oxo=(t,e)=\u003e{const n=L7({inputProblem:t,netId:e.netId,pinIds:e.pinIds,isPortOnlyLabel:e.mspConnectionPairIds.length===0});return n!==void 0?n:e.orientation===\"y+\"||e.orientation===\"y-\"?e.height:e.width},ixo=(t,e)=\u003e{const n=t.netConnections.find(o=\u003eo.netId===e.netId)?.netLabelHeight;return n!==void 0?n:t.netConnections.find(o=\u003eo.pinIds.some(i=\u003ee.pinIds.includes(i)))?.netLabelHeight},vvt=t=\u003eNumber(t.toFixed(6)),rxo=(t,e,n)=\u003eMath.abs(e.x-t.anchorPoint.x)\u003c=hd\u0026\u0026Math.abs(e.y-t.anchorPoint.y)\u003c=hd\u0026\u0026n===t.orientation,sxo=\"blue\",wvt=\"red\",axo=t=\u003e{const e=zh(t.inputProblem);return gxo(e),Axo(e,t.traces),cxo(e,t.inputProblem,t.outputNetLabelPlacements),t.solved||(lxo(e,t),uxo(e,t.currentCandidateResults)),e},Axo=(t,e)=\u003e{for(const n of e)t.lines.push({points:n.tracePath,strokeColor:\"purple\"})},cxo=(t,e,n)=\u003e{for(const o of n)t.rects.push({center:o.center,width:o.width,height:o.height,fill:Mc(o.globalConnNetId,.35),strokeColor:Mc(o.globalConnNetId,.9),label:dxo(e,o)}),t.points.push({x:o.anchorPoint.x,y:o.anchorPoint.y,color:Mc(o.globalConnNetId,.9),label:`anchorPoint\norientation: ${o.orientation}`})},lxo=(t,e)=\u003e{if(e.currentOverlap)for(const n of[e.currentOverlap.firstLabelIndex,e.currentOverlap.secondLabelIndex]){const o=e.outputNetLabelPlacements[n];o\u0026\u0026t.rects.push({center:o.center,width:o.width,height:o.height,fill:\"rgba(255, 0, 0, 0.2)\",strokeColor:wvt,label:`netlabel overlap target\n${o.netId??o.globalConnNetId}\n${Pvt(e.inputProblem,o)}`})}},uxo=(t,e)=\u003e{for(const n of e){const o=n.selected?sxo:wvt;t.rects.push({center:n.center,width:n.width,height:n.height,fill:n.selected?\"rgba(0, 0, 255, 0.2)\":\"rgba(255, 0, 0, 0.15)\",strokeColor:o,strokeDash:n.selected?void 0:\"4 2\",label:`${n.selected?\"selected\":n.status} netlabel overlap candidate\ntrace: ${n.traceId}\npath distance: ${n.pathDistance.toFixed(3)}\norientation: ${n.orientation}\ndistance from original: ${n.distanceFromOriginal.toFixed(3)}`}),t.points.push({...n.anchorPoint,color:o,label:`candidate anchor\n${n.status}`})}},gxo=t=\u003e{t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[])},Pvt=(t,e)=\u003e`available orientations: ${hxo(t,e)?.join(\", \")??\"any\"}`,dxo=(t,e)=\u003e[`netId: ${e.netId}`,`globalConnNetId: ${e.globalConnNetId}`,Pvt(t,e)].join(`\n`),hxo=(t,e)=\u003e{const n=t.availableNetLabelOrientations??{};for(const o of[e.netId,e.globalConnNetId])if(o\u0026\u0026Object.hasOwn(n,o))return n[o]},pxo=class extends Ng{inputProblem;traces;netLabelPlacements;outputNetLabelPlacements;currentOverlap=null;currentCandidateResults=[];activeSearch=null;skippedOverlapKeys=new Set;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements]}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){this.activeSearch?.completed\u0026\u0026this.clearActiveSearch();const t=this.getNextSearchWithCandidates();if(!t){this.finish();return}this.evaluateNextCandidate(t)}getOutput(){return{netLabelPlacements:this.outputNetLabelPlacements}}findNextOverlap(){for(let t=0;t\u003cthis.outputNetLabelPlacements.length;t++)for(let e=t+1;e\u003cthis.outputNetLabelPlacements.length;e++){if(!this.isLabelEligible(t)\u0026\u0026!this.isLabelEligible(e))continue;const n={firstLabelIndex:t,secondLabelIndex:e};if(!this.skippedOverlapKeys.has(this.getOverlapKey(n))\u0026\u0026this.labelsOverlap(n))return n}return null}isLabelEligible(t){return this.getTraceLocationsForLabel(t).length\u003e0}labelsOverlap(t){const e=this.outputNetLabelPlacements[t.firstLabelIndex],n=this.outputNetLabelPlacements[t.secondLabelIndex];return!e||!n?!1:Evt(Gle(e),Gle(n))}startNextOverlapSearch(){const t=this.findNextOverlap();if(!t)return null;const e={overlap:t,queuedLabelIndices:this.getMoveLabelIndices(t),labelIndex:null,candidates:[],candidateIndex:0,candidateResults:[],completed:!1};return this.setActiveSearch(e),e}getMoveLabelIndices(t){const e=[];return this.isLabelEligible(t.secondLabelIndex)\u0026\u0026e.push(t.secondLabelIndex),this.isLabelEligible(t.firstLabelIndex)\u0026\u0026e.push(t.firstLabelIndex),e}getNextSearchWithCandidates(){for(;;){const t=this.activeSearch??this.startNextOverlapSearch();if(!t)return null;if(this.activateNextLabelSearch(t))return t;this.skipSearch(t)}}activateNextLabelSearch(t){if(t.labelIndex!==null\u0026\u0026t.candidateIndex\u003ct.candidates.length)return!0;for(;t.queuedLabelIndices.length\u003e0;){const e=t.queuedLabelIndices.shift(),n=this.outputNetLabelPlacements[e];if(n\u0026\u0026(t.labelIndex=e,t.candidates=this.getCandidatesForLabel(n),t.candidateIndex=0,t.candidates.length\u003e0))return!0}return t.labelIndex=null,t.candidates=[],t.candidateIndex=0,!1}skipSearch(t){this.skippedOverlapKeys.add(this.getOverlapKey(t.overlap)),this.clearActiveSearch()}evaluateNextCandidate(t){const e=t.labelIndex;if(e===null)return;const n=this.outputNetLabelPlacements[e],o=t.candidates[t.candidateIndex];if(!n||!o)return;t.candidateIndex+=1;const i={...o,status:this.getCandidateStatus(o,e)};t.candidateResults.push(i),i.status===\"valid\"\u0026\u0026(i.selected=!0,this.applyCandidate(e,n,i),t.completed=!0)}getCandidatesForLabel(t){const e=[];for(const n of Bvt(t.anchorPoint,this.traces).filter(({trace:o})=\u003ethis.isTraceAssociatedWithLabel(o,t)))e.push(...V2o({inputProblem:this.inputProblem,label:t,traceLocation:n}));return e}getCandidateStatus(t,e){const n=Gle(t);return this.intersectsAnyChip(n)?\"chip-collision\":KH(n,this.inputProblem)?\"text-collision\":F2o(n,this.traces)?\"trace-collision\":this.intersectsAnyOtherLabel(n,e)?\"netlabel-collision\":\"valid\"}applyCandidate(t,e,n){this.outputNetLabelPlacements[t]={...e,anchorPoint:n.anchorPoint,center:n.center,width:n.width,height:n.height,orientation:n.orientation}}intersectsAnyChip(t){return this.inputProblem.chips.some(e=\u003ek2o(t,Ls(e.center,e.width,e.height)))}intersectsAnyOtherLabel(t,e){return this.outputNetLabelPlacements.some((n,o)=\u003eo===e?!1:Evt(t,Gle(n)))}getTraceLocationsForLabel(t){const e=this.outputNetLabelPlacements[t];return e?Bvt(e.anchorPoint,this.traces).filter(({trace:n})=\u003ethis.isTraceAssociatedWithLabel(n,e)):[]}isTraceAssociatedWithLabel(t,e){return e.mspConnectionPairIds.includes(t.mspPairId)||e.netId!==void 0\u0026\u0026e.netId===t.userNetId?!0:e.globalConnNetId===t.globalConnNetId}getOverlapKey(t){const e=this.outputNetLabelPlacements[t.firstLabelIndex],n=this.outputNetLabelPlacements[t.secondLabelIndex];return[t.firstLabelIndex,t.secondLabelIndex,e?.anchorPoint.x,e?.anchorPoint.y,n?.anchorPoint.x,n?.anchorPoint.y].join(\":\")}finish(){this.clearActiveSearch(),this.solved=!0}setActiveSearch(t){this.activeSearch=t,this.currentOverlap=t.overlap,this.currentCandidateResults=t.candidateResults}clearActiveSearch(){this.activeSearch=null,this.currentOverlap=null,this.currentCandidateResults=[]}visualize(){return axo({inputProblem:this.inputProblem,traces:this.traces,outputNetLabelPlacements:this.outputNetLabelPlacements,currentOverlap:this.currentOverlap,currentCandidateResults:this.currentCandidateResults,solved:this.solved})}},mxo=1e-6;function _xo(t){const{point:e,segmentStart:n,segmentEnd:o}=t,i=o.x-n.x,r=o.y-n.y,s=i*i+r*r;if(s===0)return{x:n.x,y:n.y};const a=((e.x-n.x)*i+(e.y-n.y)*r)/s,A=Math.max(0,Math.min(1,a));return{x:n.x+A*i,y:n.y+A*r}}function Mvt(t,e){let n=e[0],o=1/0;for(let i=0;i\u003ce.length-1;i++){const r=_xo({point:t,segmentStart:e[i],segmentEnd:e[i+1]}),s=r.x-t.x,a=r.y-t.y,A=s*s+a*a;A\u003co\u0026\u0026(o=A,n=r)}return n}function Dvt(t,e){const n=Mvt(t,e);return Math.hypot(n.x-t.x,n.y-t.y)\u003cmxo}function fxo(t,e){const o=p=\u003eLs(p.center,p.width,p.height),i=(p,m)=\u003e{const _=o(p),f=o(m);return _.minX\u003c=f.maxX+.01\u0026\u0026_.maxX\u003e=f.minX-.01\u0026\u0026_.minY\u003c=f.maxY+.01\u0026\u0026_.maxY\u003e=f.minY-.01},r=new Set([t]);let s=!0;for(;s;){s=!1;for(const p of e)r.has(p)||[...r].some(m=\u003ei(m,p))\u0026\u0026(r.add(p),s=!0)}let a=1/0,A=1/0,c=-1/0,l=-1/0;for(const p of r){const m=o(p);m.minX\u003ca\u0026\u0026(a=m.minX),m.minY\u003cA\u0026\u0026(A=m.minY),m.maxX\u003ec\u0026\u0026(c=m.maxX),m.maxY\u003el\u0026\u0026(l=m.maxY)}const u=(a+c)/2,g=(A+l)/2,h=c-a,d=l-A;return{...t,center:{x:u,y:g},width:h,height:d}}function Ixo(t,e){const n=[];for(const o of t)for(const i of e){if(o.globalConnNetId===i.globalConnNetId)continue;const r=Ls(i.center,i.width,i.height),s=o.tracePath;for(let a=0;a\u003cs.length-1;a++)if(O7(s[a],s[a+1],r)){n.push({trace:o,label:i});break}}return n}var Cxo=.1,yxo=3,Nvt=class extends Ng{inputProblem;traces;netLabelPlacements;outputTraces;outputNetLabelPlacements;completedReroutes=[];activeSubSolver=null;recentlyFailed=new Set;detourCounts=new Map;currentOverlap=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputTraces=[...t.traces],this.outputNetLabelPlacements=[...t.netLabelPlacements]}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const a=this.activeSubSolver.solvedTracePath;if(a){this.completedReroutes.push({initialTrace:{...this.activeSubSolver.initialTrace,tracePath:this.activeSubSolver.initialTrace.tracePath.map(c=\u003e({...c}))},reroutedTracePath:a.map(c=\u003e({...c})),label:this.activeSubSolver.label,detourCount:this.activeSubSolver.detourCount});const A=this.outputTraces.findIndex(c=\u003ec.mspPairId===this.activeSubSolver.initialTrace.mspPairId);if(A!==-1){const c=this.outputTraces[A].tracePath;this.outputTraces[A]={...this.outputTraces[A],tracePath:a},this.reanchorLabelsOnMovedTrace(this.outputTraces[A],c)}}this.activeSubSolver=null,this.currentOverlap=null}else if(this.activeSubSolver.failed){const a=this.getOverlapKey(this.activeSubSolver.initialTrace,this.activeSubSolver.label);this.recentlyFailed.add(a),this.activeSubSolver=null,this.currentOverlap=null}return}const e=Ixo(this.outputTraces,this.outputNetLabelPlacements).filter(a=\u003e{const A=this.getOverlapKey(a.trace,a.label);return!this.recentlyFailed.has(A)});if(e.length===0){this.solved=!0;return}const n=e[0],o=this.outputTraces.find(a=\u003ea.mspPairId===n.trace.mspPairId);this.currentOverlap=n;const i=fxo(n.label,this.outputNetLabelPlacements.filter(a=\u003ea.globalConnNetId!==o.globalConnNetId)),r=`${n.trace.mspPairId}::merged::${i.center.x},${i.center.y},${i.width},${i.height}`,s=this.detourCounts.get(r)??0;if(s\u003e=yxo){this.recentlyFailed.add(this.getOverlapKey(n.trace,n.label)),this.currentOverlap=null;return}this.detourCounts.set(r,s+1),this.activeSubSolver=new Ele({trace:o,label:i,problem:this.inputProblem,paddingBuffer:Cxo,detourCount:s,tracesToAvoidOverlapping:this.outputTraces,netLabelPlacements:this.outputNetLabelPlacements})}reanchorLabelsOnMovedTrace(t,e){for(let n=0;n\u003cthis.outputNetLabelPlacements.length;n++){const o=this.outputNetLabelPlacements[n];if(o.globalConnNetId!==t.globalConnNetId||Dvt(o.anchorPoint,t.tracePath)||!Dvt(o.anchorPoint,e))continue;const i=Mvt(o.anchorPoint,t.tracePath);this.outputNetLabelPlacements[n]={...o,anchorPoint:i,center:IC(i,o.orientation,o.width,o.height)}}}getOutput(){return{traces:this.outputTraces,completedReroutes:this.completedReroutes,netLabelPlacements:this.outputNetLabelPlacements}}getOverlapKey(t,e){return`${t.mspPairId}::${e.globalConnNetId}`}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);t.lines||(t.lines=[]),t.rects||(t.rects=[]),t.points||(t.points=[]);for(const e of this.outputTraces)t.lines.push({points:e.tracePath,strokeColor:\"purple\"});for(const e of this.outputNetLabelPlacements)t.rects.push({center:e.center,width:e.width,height:e.height,fill:Mc(e.globalConnNetId,.35),strokeColor:Mc(e.globalConnNetId,.9),label:`netId: ${e.netId}\nglobalConnNetId: ${e.globalConnNetId}`}),t.points.push({x:e.anchorPoint.x,y:e.anchorPoint.y,color:Mc(e.globalConnNetId,.9)});return this.currentOverlap\u0026\u0026(t.lines.push({points:this.currentOverlap.trace.tracePath,strokeColor:\"red\"}),t.rects.push({center:this.currentOverlap.label.center,width:this.currentOverlap.label.width,height:this.currentOverlap.label.height,fill:\"rgba(255,0,0,0.3)\",strokeColor:\"red\"})),t}},yp=t=\u003e{if(t.orientation!==\"x-\"\u0026\u0026t.orientation!==\"x+\"){if(t.netLabelText\u0026\u0026t.width\u003et.height){const i=t.height,r=t.width,s=IC(t.anchorPoint,t.orientation,i,r);return Ls(s,i,r)}return Ls(t.center,t.width,t.height)}const e=Math.max(t.width,t.height),n=wve,o=IC(t.anchorPoint,t.orientation,e,n);return Ls(o,e,n)},Rvt=1e-4,Tvt=1e-6,xxo=.1,Exo={\"x+\":{x:1,y:0},\"x-\":{x:-1,y:0},\"y+\":{x:0,y:1},\"y-\":{x:0,y:-1}},Bxo={ok:\"green\",\"label-collision\":\"orange\",\"trace-collision\":\"darkorange\",\"chip-collision\":\"red\",\"text-collision\":\"purple\"},bxo={ok:\"rgba(0, 200, 0, 0.25)\",\"label-collision\":\"rgba(255, 160, 0, 0.2)\",\"trace-collision\":\"rgba(200, 80, 0, 0.2)\",\"chip-collision\":\"rgba(220, 0, 0, 0.15)\",\"text-collision\":\"rgba(128, 0, 128, 0.15)\"};function kvt(t,e){return t.minX\u003ce.maxX-1e-9\u0026\u0026t.maxX\u003ee.minX+1e-9\u0026\u0026t.minY\u003ce.maxY-1e-9\u0026\u0026t.maxY\u003ee.minY+1e-9}function Sxo(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o),r=Math.max(1,Math.round(i/xxo)),s=[];for(let a=0;a\u003c=r;a++){const A=a/r;s.push({x:t.x+A*n,y:t.y+A*o})}return s}var ewe=class extends Ng{constructor(t){super(),this.params=t,this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements],this.chipIndex=t.inputProblem._chipObstacleSpatialIndex??(t.inputProblem.chips.length\u003e0?new yle(t.inputProblem.chips):void 0),this.traceMap=Object.fromEntries(t.traces.map(e=\u003e[e.mspPairId,e]))}params;inputProblem;traces;netLabelPlacements;outputNetLabelPlacements;currentCollision=null;currentLabelToMove=null;candidateResults=[];chipIndex;traceMap;skippedCollisionKeys=new Set;labelsToTry=[];candidateQueue=[];candidateIndex=0;getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements,fixedNetLabelPlacements:this.params.fixedNetLabelPlacements,useRenderedLabelBounds:this.params.useRenderedLabelBounds}}getOutput(){return{netLabelPlacements:this.outputNetLabelPlacements}}labelBounds(t){return!this.params.useRenderedLabelBounds||this.params.fixedNetLabelPlacements?.includes(t)?Ls(t.center,t.width,t.height):yp(t)}collisionKey(t,e){return[t.globalConnNetId,e.globalConnNetId].sort().join(\"::\")}findNextCollidingPair(){const t=[...this.outputNetLabelPlacements,...this.params.fixedNetLabelPlacements??[]];for(let e=0;e\u003cthis.outputNetLabelPlacements.length;e++)for(let n=e+1;n\u003ct.length;n++){const o=t[e],i=t[n];if(!(o.globalConnNetId===i.globalConnNetId\u0026\u0026!this.params.fixedNetLabelPlacements?.includes(i))\u0026\u0026!this.skippedCollisionKeys.has(this.collisionKey(o,i))\u0026\u0026kvt(this.labelBounds(o),this.labelBounds(i)))return[o,i]}return null}netLabelWidthOf(t){return t.orientation===\"x+\"||t.orientation===\"x-\"?t.width:t.height}netLabelHeightOf(t){return t.orientation===\"x+\"||t.orientation===\"x-\"?t.height:t.width}buildCandidatesForLabel(t){const e=this.netLabelWidthOf(t),n=this.netLabelHeightOf(t),o=[],i=(s,a,A,c)=\u003e{const{width:l,height:u}=_B({orientation:s,netLabelWidth:e,netLabelHeight:n}),g=IC(a,s,l,u),h=Exo[s],d={x:g.x+h.x*Rvt,y:g.y+h.y*Rvt};return{orientation:s,anchor:a,center:d,width:l,height:u,bounds:this.params.useRenderedLabelBounds?yp({...t,orientation:s,anchorPoint:a,center:d,width:l,height:u}):Ls(d,l,u),hostPairId:A,hostSegIndex:c,status:null}},r=this.traces.some(s=\u003ethis.params.netLabelConnectorTraceIds?.has(s.mspPairId)\u0026\u0026s.globalConnNetId===t.globalConnNetId\u0026\u0026jl(s.tracePath,t.anchorPoint));if(t.mspConnectionPairIds.length===0||r){const s=[\"x+\",\"x-\",\"y+\",\"y-\"],a=[t.orientation,...s.filter(A=\u003eA!==t.orientation)];for(const A of a)o.push(i(A,t.anchorPoint))}else for(const s of t.mspConnectionPairIds){const a=this.traceMap[s];if(!a)continue;const A=a.tracePath;for(let c=0;c\u003cA.length-1;c++){const l=A[c],u=A[c+1],g=Math.abs(l.y-u.y)\u003cTvt,h=Math.abs(l.x-u.x)\u003cTvt;if(!g\u0026\u0026!h)continue;let d;g?d=[\"y+\",\"y-\"]:d=[\"x+\",\"x-\"];for(const p of Sxo(l,u))for(const m of d)o.push(i(m,p,s,c))}}return o}checkCandidate(t,e,n){const{bounds:o,hostPairId:i,hostSegIndex:r}=t;if((this.chipIndex?.getChipsInBounds(o).length??0)\u003e0)return\"chip-collision\";if(KH(o,this.inputProblem))return\"text-collision\";if(Tve(o,this.traceMap,i,r).hasIntersection)return\"trace-collision\";for(const s of n)if(!(s.globalConnNetId===e\u0026\u0026!this.params.fixedNetLabelPlacements?.includes(s))\u0026\u0026kvt(o,this.labelBounds(s)))return\"label-collision\";return\"ok\"}beginSearchForLabel(t){this.currentLabelToMove=t,this.candidateQueue=this.buildCandidatesForLabel(t),this.candidateIndex=0,this.candidateResults=[]}getNearbyValidPlacements(t,e){const n=i=\u003eMath.hypot(i.anchor.x-t.anchorPoint.x,i.anchor.y-t.anchorPoint.y),o=[...this.outputNetLabelPlacements.filter(i=\u003ei!==t),...this.params.fixedNetLabelPlacements??[]];return this.buildCandidatesForLabel(t).filter(i=\u003en(i)\u003c=e\u0026\u0026this.checkCandidate(i,t.globalConnNetId,o)===\"ok\").sort((i,r)=\u003en(i)-n(r)).map(i=\u003e({...t,orientation:i.orientation,anchorPoint:i.anchor,center:i.center,width:i.width,height:i.height}))}clearActiveSearch(){this.currentCollision=null,this.currentLabelToMove=null,this.labelsToTry=[],this.candidateQueue=[],this.candidateIndex=0,this.candidateResults=[]}_step(){if(!this.currentCollision){const s=this.findNextCollidingPair();if(!s){this.solved=!0;return}this.currentCollision=s,this.labelsToTry=[s[1],s[0]].filter(a=\u003e!(this.params.fixedNetLabelPlacements??[]).includes(a)),this.beginSearchForLabel(this.labelsToTry.shift());return}if(this.candidateIndex\u003e=this.candidateQueue.length){this.labelsToTry.length\u003e0?this.beginSearchForLabel(this.labelsToTry.shift()):(this.skippedCollisionKeys.add(this.collisionKey(this.currentCollision[0],this.currentCollision[1])),this.clearActiveSearch());return}const t=this.candidateQueue[this.candidateIndex++],[e,n]=this.currentCollision;let o;this.currentLabelToMove===n?o=e:o=n;const i=[...[...this.outputNetLabelPlacements,...this.params.fixedNetLabelPlacements??[]].filter(s=\u003es!==e\u0026\u0026s!==n),o],r=this.checkCandidate(t,this.currentLabelToMove.globalConnNetId,i);if(t.status=r,this.candidateResults.push({...t}),r===\"ok\"){const s=this.outputNetLabelPlacements.indexOf(this.currentLabelToMove);s!==-1\u0026\u0026(this.outputNetLabelPlacements[s]={...this.currentLabelToMove,orientation:t.orientation,anchorPoint:t.anchor,width:t.width,height:t.height,center:t.center}),this.clearActiveSearch()}}visualize(){const t=zh(this.inputProblem);t.lines||(t.lines=[]),t.rects||(t.rects=[]),t.points||(t.points=[]);for(const n of this.traces)t.lines.push({points:n.tracePath,strokeColor:\"purple\"});for(const n of this.outputNetLabelPlacements){const o=this.currentCollision!=null\u0026\u0026(n===this.currentCollision[0]||n===this.currentCollision[1]);let i,r,s,a;o?(i=\"rgba(255, 0, 0, 0.2)\",r=\"red\",s=`netId: ${n.netId}\nglobalConnNetId: ${n.globalConnNetId}\n⚠ COLLIDING`,a=\"red\"):(i=Mc(n.globalConnNetId,.35),r=Mc(n.globalConnNetId,.9),s=`netId: ${n.netId}\nglobalConnNetId: ${n.globalConnNetId}`,a=Mc(n.globalConnNetId,.9)),t.rects.push({center:n.center,width:n.width,height:n.height,fill:i,strokeColor:r,label:s}),t.points.push({x:n.anchorPoint.x,y:n.anchorPoint.y,color:a,label:`anchorPoint\norientation: ${n.orientation}`})}const e=this.currentLabelToMove?this.currentLabelToMove.netId:\"?\";for(const n of this.candidateResults){const o=Bxo[n.status],i=bxo[n.status];let r;n.status!==\"ok\"\u0026\u0026(r=\"4 2\"),t.rects.push({center:n.center,width:n.width,height:n.height,fill:i,strokeColor:o,strokeDash:r,label:`candidate: ${n.status}\norientation: ${n.orientation}\nmoving: ${e}`}),t.points.push({x:n.anchor.x,y:n.anchor.y,color:o,label:`candidate anchor\n${n.status}`})}return t}},rI=.2,fj=1e-9,Qxo=\"GND\",GN=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=fj\u0026\u0026Math.abs(t.y-e.y)\u003c=fj,XH=t=\u003e{const e=[];for(const n of t){const o=e.at(-1);(!o||!GN(o,n))\u0026\u0026e.push(n)}return e},iw=t=\u003e{let e=0;for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},twe=({pin:t,facingDirection:e})=\u003e{const n={x:t.x,y:t.y};return e===\"x+\"\u0026\u0026(n.x+=rI),e===\"x-\"\u0026\u0026(n.x-=rI),e===\"y+\"\u0026\u0026(n.y+=rI),e===\"y-\"\u0026\u0026(n.y-=rI),n},Fvt=t=\u003e({minX:Math.min(...t.map(e=\u003ee.minX)),minY:Math.min(...t.map(e=\u003ee.minY)),maxX:Math.max(...t.map(e=\u003ee.maxX)),maxY:Math.max(...t.map(e=\u003ee.maxY))}),Lvt=({connectionPair:t,obstacles:e,channelObstacles:n=e})=\u003e{const[o,i]=t.pins,r=twe({pin:o,facingDirection:o._facingDirection}),s=twe({pin:i,facingDirection:i._facingDirection}),a=Fvt(e),A=[a.minY-rI,a.maxY+rI,...n.flatMap(u=\u003e[u.minY-rI,u.maxY+rI])],c=[a.minX-rI,a.maxX+rI,...n.flatMap(u=\u003e[u.minX-rI,u.maxX+rI])],l=[wF({...o,facingDirection:o._facingDirection},{...i,facingDirection:i._facingDirection},{overshoot:rI})];for(const u of new Set(A))l.push(XH([o,r,{x:r.x,y:u},{x:s.x,y:u},s,i]));for(const u of new Set(c))l.push(XH([o,r,{x:u,y:r.y},{x:u,y:s.y},s,i]));return l.sort((u,g)=\u003eiw(u)-iw(g))},vxo=(t,e)=\u003e({x:(t.x+e.x)/2,y:(t.y+e.y)/2}),wxo=t=\u003e{const e=[];for(const n of t){for(let i=0;i\u003cn.tracePath.length-1;i++){const r=n.tracePath[i],s=n.tracePath[i+1];e.push(r),e.push(vxo(r,s))}const o=n.tracePath.at(-1);o\u0026\u0026e.push(o)}return e},Pxo=({connectionPair:t,sameNetTraces:e})=\u003e{const n=new Set(e.flatMap(o=\u003eo.pinIds));return t.pins.filter(o=\u003e!n.has(o.pinId))},Mxo=({connectionPair:t,sameNetTraces:e,obstacles:n,maxConnectionDistance:o})=\u003e{const i=Fvt(n),r=[i.minY-rI,i.maxY+rI],s=[i.minX-rI,i.maxX+rI],a=[],A=wxo(e),c=Pxo({connectionPair:t,sameNetTraces:e});for(const l of c){const u=twe({pin:l,facingDirection:l._facingDirection});for(const g of A)if(!(ad(l,g)\u003eo)){a.push(XH([l,u,{x:u.x,y:g.y},g])),a.push(XH([l,u,{x:g.x,y:u.y},g]));for(const h of r)a.push(XH([l,u,{x:u.x,y:h},{x:g.x,y:h},g]));for(const h of s)a.push(XH([l,u,{x:h,y:u.y},{x:h,y:g.y},g]))}}return a.sort((l,u)=\u003eiw(l)-iw(u))},Dxo=({path:t,obstacles:e,connectionPair:n,rejectComponentBoundaryTravel:o})=\u003e{const i=t[0],r=t.at(-1),s=n.pins.find(g=\u003eGN(g,i)),a=n.pins.find(g=\u003eGN(g,r));for(const[g,h]of[[s,t[1]],[a,t[t.length-2]]]){if(!g?._facingDirection)continue;const d=sm(g._facingDirection);if((h.x-g.x)*d.x+(h.y-g.y)*d.y\u003c-fj)return!0}const A=s!==void 0\u0026\u0026a!==void 0,c=e.find(g=\u003eg.kind===\"chip\"\u0026\u0026g.chipId===s?.chipId),l=e.find(g=\u003eg.kind===\"chip\"\u0026\u0026g.chipId===a?.chipId);return o\u0026\u0026c\u0026\u0026Mve(t[0],t[1],c)||o\u0026\u0026l\u0026\u0026Mve(t[t.length-2],t[t.length-1],l)?!0:HN(t,e,{excludeRectsForSegment:g=\u003e{const h=new Set;return g===0\u0026\u0026c\u0026\u0026h.add(c),A\u0026\u0026g===t.length-2\u0026\u0026l\u0026\u0026h.add(l),h}})!==null},Nxo=({connectionPair:t,failedConnectionPairs:e})=\u003e{const n=new Set(t.pins.map(o=\u003eo.chipId));return e.some(o=\u003eo.mspPairId===t.mspPairId?!1:o.pins.every(i=\u003en.has(i.chipId)))},Rxo=({firstStart:t,firstEnd:e,secondStart:n,secondEnd:o})=\u003eX_(t,e)\u0026\u0026X_(n,o)?Math.min(Math.max(t.x,e.x),Math.max(n.x,o.x))-Math.max(Math.min(t.x,e.x),Math.min(n.x,o.x))\u003efj:e1(t,e)\u0026\u0026e1(n,o)?Math.min(Math.max(t.y,e.y),Math.max(n.y,o.y))-Math.max(Math.min(t.y,e.y),Math.min(n.y,o.y))\u003efj:!1,Txo=({connectionPair:t,existingTrace:e})=\u003e{const n=new Set(e.pinIds);return t.pins.filter(o=\u003en.has(o.pinId))},kxo=({path:t,connectionPair:e,existingTraces:n})=\u003e{for(const o of n){if(o.globalConnNetId===e.globalConnNetId)continue;const i=Txo({connectionPair:e,existingTrace:o});for(let r=0;r\u003ct.length-1;r++){const s=t[r],a=t[r+1];for(let A=0;A\u003co.tracePath.length-1;A++){const c=o.tracePath[A],l=o.tracePath[A+1];if(!(!X1(s,a,c,l)||i.some(g=\u003e(GN(s,g)||GN(a,g))\u0026\u0026(GN(c,g)||GN(l,g)))\u0026\u0026!Rxo({firstStart:s,firstEnd:a,secondStart:c,secondEnd:l})))return!0}}}return!1},Fxo=class extends Ng{constructor(t){super(),this.params=t,this.inputProblem=t.inputProblem,this.alreadySolvedTraces=t.alreadySolvedTraces,this.failedConnectionPairs=t.failedConnectionPairs,this.queuedConnectionPairs=[...t.failedConnectionPairs],this.maxConnectionDistance=this.inputProblem.maxMspPairDistance??uj;const{netConnMap:e}=mB(this.inputProblem);this.groundGlobalConnNetId=e.getNetConnectedToId(Qxo)??void 0}params;inputProblem;alreadySolvedTraces;failedConnectionPairs;queuedConnectionPairs;maxConnectionDistance;groundGlobalConnNetId;solvedUnroutedTraces=[];getConstructorParams(){return this.params}_step(){const t=this.queuedConnectionPairs.shift();if(!t){this.solved=!0;return}if(t.globalConnNetId===this.groundGlobalConnNetId||ad(t.pins[0],t.pins[1])\u003ethis.maxConnectionDistance)return;const e=Hy(this.inputProblem),n=[...this.alreadySolvedTraces,...this.solvedUnroutedTraces],o=n.filter(c=\u003ec.globalConnNetId===t.globalConnNetId),i=Mxo({connectionPair:t,sameNetTraces:o,obstacles:e,maxConnectionDistance:this.maxConnectionDistance}),r=Lvt({connectionPair:t,obstacles:e,channelObstacles:[]}),s=[...i,...r].sort((c,l)=\u003eiw(c)-iw(l)),a=Nxo({connectionPair:t,failedConnectionPairs:this.failedConnectionPairs});let A;for(const c of s)A\u0026\u0026iw(c)\u003e=iw(A)||Dxo({path:c,obstacles:e,connectionPair:t,rejectComponentBoundaryTravel:a})||kxo({path:c,connectionPair:t,existingTraces:n})||(A||s.push(...Lvt({connectionPair:t,obstacles:e})),A=c);A\u0026\u0026this.solvedUnroutedTraces.push({...t,tracePath:A,mspConnectionPairIds:[t.mspPairId],pinIds:t.pins.map(c=\u003ec.pinId)})}getOutput(){return{newTraces:this.solvedUnroutedTraces,allTracesMerged:[...this.alreadySolvedTraces,...this.solvedUnroutedTraces]}}visualize(){const t=zh(this.inputProblem);for(const e of this.solvedUnroutedTraces)t.lines.push({points:e.tracePath,strokeColor:\"blue\"});return t}},Yle=1e-6,Ule=({path:t,netLabelPlacements:e})=\u003e{for(const n of e){const o=Ls(n.center,n.width,n.height);for(let i=0;i\u003ct.length-1;i++)if(O7(t[i],t[i+1],o))return!0}return!1},Hvt=({path:t,netLabelPlacements:e})=\u003e{for(const n of e){const o=Ls(n.center,n.width,n.height),i={minX:o.minX+Yle,minY:o.minY+Yle,maxX:o.maxX-Yle,maxY:o.maxY-Yle};for(let r=0;r\u003ct.length-1;r++)if(O7(t[r],t[r+1],i))return!0}return!1},nwe=t=\u003et._facingDirection?sm(t._facingDirection).x===0?\"y\":\"x\":null,Ovt=({coordinate:t,axis:e,pin:n})=\u003e{if(!n._facingDirection)return!1;const o=sm(n._facingDirection);return(t-n[e])*o[e]\u003e0},Lxo=(t,e)=\u003eCB(t,e)?\"x\":Yy(t,e)?\"y\":null,Gvt=t=\u003e{const e=[];for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1],r=Lxo(o,i);if(!r)continue;const s=r===\"x\"?\"y\":\"x\";e.push({start:o,end:i,axis:r,coordinate:o[s]})}return e},Yvt=({pin:t,departureAxis:e,railCoordinate:n})=\u003ee===\"x\"?{x:n,y:t.y}:{x:t.x,y:n},Hxo=({donorPath:t,branchDepartureSegment:e,sharedPin:n,adjacentPin:o})=\u003e{const i=nwe(n);if(!i)return null;const r=i===\"x\"?\"y\":\"x\",s=Gvt(e)[0];if(!s||s.axis!==i)return null;let a=null,A=Number.POSITIVE_INFINITY;for(const c of Gvt(t)){if(c.axis!==r||!Ovt({coordinate:c.coordinate,axis:i,pin:n}))continue;const l=Yvt({pin:n,departureAxis:i,railCoordinate:c.coordinate}),u=Yvt({pin:o,departureAxis:i,railCoordinate:c.coordinate});if(!jl([c.start,c.end],l)||!jl([c.start,c.end],u)||!jl([s.start,s.end],l))continue;const g=Math.abs(c.coordinate-n[i]);g\u003e=A||(a={segment:c,sharedPinExit:l},A=g)}return a},YN=({donorTrace:t,branchTrace:e})=\u003e{const n=new Set(e.pins.map(o=\u003eo.pinId));return t.pins.find(o=\u003en.has(o.pinId))??null},Kle=(t,e)=\u003eUc(t.x,e.x)?\"y\":Uc(t.y,e.y)?\"x\":null,Uvt=({trace:t,sharedPinId:e})=\u003e{const n=Qa(t.tracePath),o=t.pins.find(r=\u003er.pinId===e);if(!o)return null;const i=t.pins[0]?.pinId===e?n:n.reverse();return fb(i[0],o)?i:null},Vle=({trace:t,sharedPrefix:e,netLabelPlacements:n})=\u003e!n.some(o=\u003eo.mspConnectionPairIds.includes(t.mspPairId)\u0026\u0026jl(e,o.anchorPoint)),Kvt=({trace:t,pathFromSharedPin:e,sharedPinId:n,branchPoint:o})=\u003e{const i=e.findIndex((a,A)=\u003e{const c=e[A+1];return c?jl([a,c],o):!1});if(i\u003c0)return null;const r=Qa([o,...e.slice(i+1)]);let s=r;return t.pins[0]?.pinId!==n\u0026\u0026(s=r.reverse()),{...t,tracePath:s}},Oxo=({traces:t,netLabelPlacements:e,netLabelConnectorTraceIds:n,multiPinNetPinIds:o})=\u003e{const i=[...t];for(let r=0;r\u003ci.length;r++)if(!n.has(i[r].mspPairId))for(let s=r+1;s\u003ci.length;s++){const a=i[r],A=i[s];if(n.has(A.mspPairId)||a.globalConnNetId!==A.globalConnNetId)continue;const c=YN({donorTrace:a,branchTrace:A});if(!c||!o.has(c.pinId))continue;const l=Uvt({trace:a,sharedPinId:c.pinId}),u=Uvt({trace:A,sharedPinId:c.pinId});if(!l||!u||l.length\u003c2||u.length\u003c2)continue;const g=Kle(l[0],l[1]),h=Kle(u[0],u[1]);if(!g||g!==h)continue;const d=l[1][g]-l[0][g],p=u[1][g]-u[0][g];if(!fb(l[1],u[1])\u0026\u0026Math.sign(d)===Math.sign(p)){let M=s,k=A,R=u;Math.abs(d)\u003cMath.abs(p)\u0026\u0026(M=r,k=a,R=l);const F=R[1];if(Vle({trace:k,sharedPrefix:[R[0],F],netLabelPlacements:e})||(M===r?(M=s,k=A,R=u):(M=r,k=a,R=l)),!Vle({trace:k,sharedPrefix:[R[0],F],netLabelPlacements:e}))continue;const O=Kvt({trace:k,pathFromSharedPin:R,sharedPinId:c.pinId,branchPoint:F});if(!O)continue;i[M]=O;continue}if(l.length\u003c3||u.length\u003c3||!fb(l[1],u[1]))continue;const m=Kle(l[1],l[2]),_=Kle(u[1],u[2]);if(!m||m!==_||m===g)continue;const f=l[2][m]-l[1][m],I=u[2][m]-u[1][m],C=Math.sign(f)===Math.sign(I),y=l.slice(0,2);if(!C\u0026\u0026!Uc(Math.abs(f),Math.abs(I))\u0026\u0026e.some(M=\u003eM.globalConnNetId===a.globalConnNetId\u0026\u0026jl(y,M.anchorPoint)))continue;let x=s,E=A,B=u,S=l[1];C\u0026\u0026Math.abs(f)\u003cMath.abs(I)?(x=r,E=a,B=l,S=l[2]):C\u0026\u0026(S=u[2]);const Q=[B[0],B[1],S];if(Vle({trace:E,sharedPrefix:Q,netLabelPlacements:e})||(x===r?(x=s,E=A,B=u):(x=r,E=a,B=l)),!Vle({trace:E,sharedPrefix:[B[0],B[1],S],netLabelPlacements:e}))continue;const w=Kvt({trace:E,pathFromSharedPin:B,sharedPinId:c.pinId,branchPoint:S});w\u0026\u0026(i[x]=w)}return i},owe=1e-6,Vvt=(t,e)=\u003e{const n=t.tracePath[0],o=t.tracePath.at(-1);return!n||!o?null:fb(n,e)?t.tracePath:fb(o,e)?[...t.tracePath].reverse():null},Gxo=(t,e)=\u003e{const n=[],o=t[0];for(let i=0;i\u003ct.length-1;i++){const r=t[i],s=t[i+1],a=JH(r,s);if(a)for(let A=0;A\u003ce.length-1;A++){const c=e[A],l=e[A+1],u=JH(c,l);if(!u||u===a)continue;const g=V4(r,s,c,l);!g||fb(g,o)||n.push({intersectionPoint:g,targetSegmentIndex:i,donorSegmentIndex:A})}}return n},Yxo=(t,e,n)=\u003e{const o=V4(t[e],t[e+1],t[n],t[n+1]);return o?Qa([...t.slice(0,e+1),o,...t.slice(n+1)]):t},Uxo=({targetTrace:t,targetPath:e,donorPath:n,crossing:o})=\u003e{const i=Qa([...n.slice(0,o.donorSegmentIndex+1),o.intersectionPoint,...e.slice(o.targetSegmentIndex+1)]);return fb(t.tracePath[0],e[0])?i:i.reverse()},Kxo=({targetTrace:t,tracePath:e,netLabelPlacements:n})=\u003e{const o=jH({trace:t,originalTracePath:t.tracePath,reroutedTracePath:e,netLabelPlacements:n});for(let s=0;s\u003cn.length;s++){const a=n[s];if(a.globalConnNetId!==t.globalConnNetId||!jl(t.tracePath,a.anchorPoint))continue;const A=o[s];if(!jl(e,A.anchorPoint))return null}const i=o.filter(s=\u003es.globalConnNetId!==t.globalConnNetId);if(Ule({path:e,netLabelPlacements:i}))return null;const r=o.filter(s=\u003es.globalConnNetId===t.globalConnNetId);return Hvt({path:e,netLabelPlacements:r})?null:o},Vxo=(t,e)=\u003e{if(!e)return!0;const n=t.netVisibleLength-e.netVisibleLength;return Math.abs(n)\u003eowe?n\u003c0:t.netVisibleSegmentCount\u003ce.netVisibleSegmentCount},zxo=({targetTrace:t,traces:e,netLabelPlacements:n})=\u003e{const o=e.filter(c=\u003ec.globalConnNetId===t.globalConnNetId),i=Y7(o),r=Y7([t]);let s=null;const a=c=\u003e{const l={...t,tracePath:c};if(Y7([l])\u003er+owe)return;const g=Kxo({targetTrace:t,tracePath:c,netLabelPlacements:n});if(!g)return;const h=o.map(m=\u003em.mspPairId===t.mspPairId?l:m),d=Y7(h);if(d\u003e=i-owe)return;const p={tracePath:c,netLabelPlacements:g,netVisibleLength:d,netVisibleSegmentCount:Qle(h)};Vxo(p,s)\u0026\u0026(s=p)},A=WH(t.tracePath,t.tracePath,{includeTerminalSegments:!0}).filter(({pathSegmentIndex:c,otherPathSegmentIndex:l})=\u003ec\u003cl);for(const c of A)a(Yxo(t.tracePath,c.pathSegmentIndex,c.otherPathSegmentIndex));for(const c of o){if(c.mspPairId===t.mspPairId)continue;const l=YN({donorTrace:c,branchTrace:t});if(!l)continue;const u=Vvt(t,l),g=Vvt(c,l);if(!u||!g)continue;const h=Gxo(u,g);for(const d of h){const p=Uxo({targetTrace:t,targetPath:u,donorPath:g,crossing:d});a(p)}}return s},Jxo=({traces:t,netLabelPlacements:e})=\u003e{const n=[...t];let o=[...e],i=0,r=0;for(;r\u003cn.length;){const s=n[r],a=zxo({targetTrace:s,traces:n,netLabelPlacements:o});if(!a){r++;continue}n[r]={...s,tracePath:a.tracePath},o=a.netLabelPlacements,i++,r=0}return{traces:n,netLabelPlacements:o,collapsedCycleCount:i}},iwe=.2,Wxo=.2,jxo=.05,zvt=.8,$xo=.05,qxo=t=\u003e{const{netConnMap:e}=mB(t),n=new Set(t.chips.flatMap(o=\u003eo.pins.map(i=\u003ei.pinId)));return new Set([...n].filter(o=\u003e{const i=e.getNetConnectedToId(o);return i?e.getIdsConnectedToNet(i).filter(r=\u003en.has(r)).length\u003e2:!1}))},oE=(t,e)=\u003eCB(t,e)?\"x\":Yy(t,e)?\"y\":null,rw=({trace:t,sharedPin:e})=\u003et.pins.find(n=\u003en.pinId!==e.pinId)??null,Ij=t=\u003e{let e=null;for(let n=0;n\u003ct.tracePath.length-1;n++){const o=t.tracePath[n],i=t.tracePath[n+1];CB(o,i)\u0026\u0026(!e||Math.abs(i.x-o.x)\u003eMath.abs(e.end.x-e.start.x))\u0026\u0026(e={start:o,end:i})}return e},Xxo=({segment:t,sharedPin:e})=\u003e{const n=Math.abs(t.start.x-e.x),o=Math.abs(t.end.x-e.x);return n\u003c=o?t.start:t.end},Cj=({railY:t,pin:e})=\u003ee._facingDirection===\"y+\"?t\u003ee.y:e._facingDirection===\"y-\"?t\u003ce.y:!1,Zxo=({railY:t,pin:e})=\u003ee._facingDirection===\"y+\"?t\u003ee.y:e._facingDirection===\"y-\"?t\u003ce.y:!1,e3o=({branchTrace:t,sharedPin:e,otherPin:n})=\u003e{if(n._facingDirection!==\"x-\"\u0026\u0026n._facingDirection!==\"x+\")return null;const i=(t.pins[0].pinId===e.pinId?t.tracePath:[...t.tracePath].reverse()).at(-2);return!i||!Uc(i.y,n.y)?null:(n._facingDirection===\"x-\"?i.x\u003cn.x:i.x\u003en.x)?i:null},Jvt=(t,e)=\u003ee.flatMap((n,o)=\u003eAvt(n,t)\u0026\u0026jl(t.tracePath,n.anchorPoint)?[o]:[]),t3o=({trace:t,reroutedTracePath:e,netLabelPlacements:n,attachedLabelIndexes:o})=\u003e{const i=o.map(a=\u003en[a]),r=jH({trace:t,originalTracePath:t.tracePath,reroutedTracePath:e,netLabelPlacements:i}),s=new Map(o.map((a,A)=\u003e[a,r[A]]));return n.map((a,A)=\u003es.get(A)??a)},n3o=({donorTrace:t,branchTrace:e})=\u003e{const n=YN({donorTrace:t,branchTrace:e});if(!n)return null;const o=rw({trace:t,sharedPin:n});if(!o)return null;const i=rw({trace:e,sharedPin:n});if(!i||Math.abs(n.y-i.y)\u003eiwe)return null;const r=Ij(t);if(!r)return null;const s=Ij(e);if(s\u0026\u0026Uc(s.start.y,r.start.y))return null;const a=Cj({railY:r.start.y,pin:i}),A=Zxo({railY:r.start.y,pin:n})\u0026\u0026Math.abs(r.start.y-n.y)\u003c=jxo;if(!a\u0026\u0026!A)return null;const c=Xxo({segment:r,sharedPin:n});if(!(o.x\u003cc.x\u0026\u0026i.x\u003ec.x||o.x\u003ec.x\u0026\u0026i.x\u003cc.x))return null;let u;if(!a\u0026\u0026A){const g=e3o({branchTrace:e,sharedPin:n,otherPin:i});if(!g)return null;u=Qa([{x:n.x,y:n.y},{x:c.x,y:n.y},{x:c.x,y:c.y},{x:g.x,y:c.y},{x:g.x,y:i.y},{x:i.x,y:i.y}])}else u=Qa([{x:n.x,y:n.y},{x:c.x,y:n.y},{x:c.x,y:c.y},{x:i.x,y:c.y},{x:i.x,y:i.y}]);return e.pins[0].pinId===n.pinId?u:[...u].reverse()},o3o=({donorTrace:t,branchTrace:e})=\u003e{const n=YN({donorTrace:t,branchTrace:e});if(!n)return null;const o=rw({trace:t,sharedPin:n}),i=rw({trace:e,sharedPin:n});if(!o||!i)return null;const r=n._facingDirection,s=nwe(n);if(!r||!s)return null;const a=s===\"x\"?\"y\":\"x\";if(o.chipId!==n.chipId||o._facingDirection!==r||!Uc(o[s],n[s])||nwe(i)!==a)return null;const A=Math.abs(o[a]-n[a]);if(A\u003eiwe\u0026\u0026!Uc(A,iwe))return null;const c=e.pins[0].pinId===n.pinId;let l=Qa(e.tracePath);if(c||l.reverse(),l.length\u003c2)return null;const u=[l[0],l[1]],g=Hxo({donorPath:t.tracePath,branchDepartureSegment:u,sharedPin:n,adjacentPin:o});if(!g)return null;const h=o[a];if(!Ovt({coordinate:h,axis:a,pin:i}))return null;const d={...g.sharedPinExit,[a]:h},p={x:i.x,y:i.y,[a]:h},m=Qa([{x:n.x,y:n.y},g.sharedPinExit,d,p,{x:i.x,y:i.y}]);return c?m:m.reverse()},i3o=({donorTrace:t,branchTrace:e,netLabelConnectorTraceIds:n})=\u003e{if(n.has(t.mspPairId)||n.has(e.mspPairId))return null;const o=YN({donorTrace:t,branchTrace:e});if(!o)return null;const i=B=\u003e{const S=Qa(B.tracePath);return B.pins[0].pinId===o.pinId?S:[...S].reverse()},r=i(t),s=i(e);if(r.length\u003c3||s.length\u003c4)return null;const a=oE(r[0],r[1]),A=oE(s[0],s[1]);if(!a||a!==A)return null;const c=r[1][a]-r[0][a],l=s[1][A]-s[0][A];if(Math.sign(c)!==Math.sign(l))return null;let u=1,g=oE(r[1],r[2]),h=oE(s[1],s[2]);if(!g||g!==h||g===a||(g===\"x\"\u0026\u0026Uc(r[1].y,s[1].y)||g===\"y\"\u0026\u0026Uc(r[1].x,s[1].x))\u0026\u0026(u++,!r[u+2]||!s[u+2]||(g=oE(r[u],r[u+1]),h=oE(s[u],s[u+1]),!g||g!==h)))return null;let p=0;for(let B=1;B\u003cs.length-2;B++)oE(s[B],s[B+1])===h\u0026\u0026p++;if(p!==1)return null;const m=g===\"x\"?\"y\":\"x\",_=r[u][m],f=s[u][m],I=Math.abs(_-f);if(Uc(_,f)||I\u003ezvt)return null;const C=[r[u][g],r[u+1][g]].sort((B,S)=\u003eB-S),y=[s[u][h],s[u+1][h]].sort((B,S)=\u003eB-S);if(!(Math.min(C[1],y[1])\u003e=Math.max(C[0],y[0])-1e-6))return null;const E=Qa(s.map((B,S)=\u003eS===u||S===u+1?{...B,[m]:_}:B));return e.pins[0].pinId===o.pinId?E:E.reverse()},r3o=({donorTrace:t,connectorTrace:e,netLabelConnectorTraceIds:n})=\u003e{if(n.has(t.mspPairId)||!n.has(e.mspPairId))return null;const o=a=\u003e{if(a.length\u003c3)return null;const A=a[0],c=a[1],l=a[2],u=oE(A,c),g=oE(c,l);if(!u||!g||u===g)return null;const h=t.tracePath.findIndex((y,x,E)=\u003e{const B=E[x+1];return B\u0026\u0026oE(y,B)===u\u0026\u0026jl([y,B],A)\u0026\u0026jl([y,B],c)});if(h\u003c0)return null;const d=t.tracePath[h],p=t.tracePath[h+1];if(Uc(A.x,d.x)\u0026\u0026Uc(A.y,d.y)||Uc(A.x,p.x)\u0026\u0026Uc(A.y,p.y))return null;const m=[h\u003e0?[t.tracePath[h-1],d]:null,h+2\u003ct.tracePath.length?[p,t.tracePath[h+2]]:null].flatMap(y=\u003ey\u0026\u0026oE(y[0],y[1])===g?[y]:[]);if(m.length===0)return null;const _=g===\"x\"?\"y\":\"x\",f=c[_],I=[c[g],l[g]].sort((y,x)=\u003ey-x),C=m.map(y=\u003e({segment:y,coordinate:y[0][_],offset:Math.abs(y[0][_]-f)})).filter(({segment:y,offset:x})=\u003e{if(x\u003ezvt)return!1;const E=[y[0][g],y[1][g]].sort((Q,w)=\u003eQ-w),B=Math.max(E[0],I[0]),S=Math.min(E[1],I[1]);return S\u003e=B-1e-6\u0026\u0026Math.abs(S-B)\u003c=1e-6}).sort((y,x)=\u003ey.offset-x.offset)[0];return!C||Uc(C.offset,0)?null:Qa(a.map((y,x)=\u003ex===1||x===2?{...y,[_]:C.coordinate}:y))},i=Qa(e.tracePath),r=o(i);if(r)return r;const s=o([...i].reverse());return s?s.reverse():null},rwe=(t,e)=\u003e{if(t.some(n=\u003ejl(e,n))||e.some(n=\u003ejl(t,n)))return!0;for(let n=1;n\u003ct.length;n++)for(let o=1;o\u003ce.length;o++)if(V4(t[n-1],t[n],e[o-1],e[o]))return!0;return!1},s3o=({originalTrace:t,candidateTrace:e,traces:n})=\u003e{let o=n.map(i=\u003ei.mspPairId===t.mspPairId?e:i);for(const i of n){if(i.mspPairId===t.mspPairId||i.globalConnNetId!==t.globalConnNetId||!rwe(t.tracePath,i.tracePath)||rwe(e.tracePath,i.tracePath))continue;const r=[0,i.tracePath.length-1].find(u=\u003ejl(t.tracePath,i.tracePath[u]));if(r===void 0)return null;const s=i.tracePath[r];if(i.pins.some(u=\u003eUc(u.x,s.x)\u0026\u0026Uc(u.y,s.y)))return null;const a=zve(s,t.tracePath,e.tracePath);if(!a)return null;const A=r===0?1:r-1,c=i.tracePath[A];if(!c||oE(s,c)!==oE(a,c))return null;const l={...i,tracePath:i.tracePath.map((u,g)=\u003eg===r?a:u)};if(!rwe(e.tracePath,l.tracePath))return null;o=o.map(u=\u003eu.mspPairId===i.mspPairId?l:u)}return o},Wvt=({trace:t,endpointPin:e})=\u003e{const n=rw({trace:t,sharedPin:e});if(!n)return null;const o=t.pins[0].pinId===e.pinId;let i=Qa(t.tracePath);if(o||i.reverse(),i.length!==3)return null;const[r,s,a]=i,A=e._facingDirection;if(A===\"y+\"||A===\"y-\")return n._facingDirection!==\"x+\"\u0026\u0026n._facingDirection!==\"x-\"||!Yy(r,s)||!CB(s,a)||!Cj({railY:s.y,pin:e})?null:(n._facingDirection===\"x-\"?s.x\u003cn.x:s.x\u003en.x)?{railCoordinate:s.y}:null;if(A!==\"x+\"\u0026\u0026A!==\"x-\"||n._facingDirection!==\"y+\"\u0026\u0026n._facingDirection!==\"y-\"||!CB(r,s)||!Yy(s,a))return null;const c=A===\"x+\"?s.x\u003ee.x:s.x\u003ce.x,l=n._facingDirection===\"y+\"?s.y\u003en.y:s.y\u003cn.y;return c\u0026\u0026l?{railCoordinate:s.x}:null},a3o=({donorTrace:t,branchTrace:e,traces:n})=\u003e{const o=YN({donorTrace:t,branchTrace:e});if(!o)return null;const i=rw({trace:e,sharedPin:o});if(!i)return null;const r=f=\u003en.filter(I=\u003eI.mspPairId!==e.mspPairId\u0026\u0026I.globalConnNetId===e.globalConnNetId\u0026\u0026I.pinIds.includes(f.pinId)),s=r(o),a=r(i);if(s.length!==1||s[0].mspPairId!==t.mspPairId||a.length!==1)return null;const A=Wvt({trace:t,endpointPin:o});if(!A)return null;const c=o._facingDirection,l=c===\"y+\"||c===\"y-\";if(!l\u0026\u0026!(c===\"x+\"||c===\"x-\")||l!==(i._facingDirection===\"y+\"||i._facingDirection===\"y-\"))return null;const g=e.pins[0].pinId===o.pinId;let h=Qa(e.tracePath);if(g||h.reverse(),h.length!==6)return null;const d=l?[\"V\",\"H\",\"V\",\"H\",\"V\"]:[\"H\",\"V\",\"H\",\"V\",\"H\"];if(h.slice(1).map((f,I)=\u003eCB(h[I],f)?\"H\":Yy(h[I],f)?\"V\":\"D\").some((f,I)=\u003ef!==d[I]))return null;const m=Wvt({trace:a[0],endpointPin:i});if(!m)return null;const _=Qa(l?[{x:o.x,y:o.y},{x:o.x,y:A.railCoordinate},{x:h[2].x,y:A.railCoordinate},{x:h[3].x,y:m.railCoordinate},{x:i.x,y:m.railCoordinate},{x:i.x,y:i.y}]:[{x:o.x,y:o.y},{x:A.railCoordinate,y:o.y},{x:A.railCoordinate,y:h[2].y},{x:m.railCoordinate,y:h[3].y},{x:m.railCoordinate,y:i.y},{x:i.x,y:i.y}]);return g?_:_.reverse()},jvt=({candidateTrace:t,originalTrace:e,traces:n,inputProblem:o,originalNetLabelPlacements:i,candidateNetLabelPlacements:r,attachedLabelIndexes:s})=\u003e{const a=Hy(o);if(ON(t.tracePath,a))return!1;const A=n.filter(d=\u003ed.globalConnNetId!==t.globalConnNetId);if(nw(t.tracePath,A))return!1;for(const d of A){const p=m=\u003e{const _=new Set;for(let f=1;f\u003cm.length;f++)for(let I=1;I\u003cd.tracePath.length;I++){const C=V4(m[f-1],m[f],d.tracePath[I-1],d.tracePath[I]);C\u0026\u0026_.add(`${C.x.toFixed(6)},${C.y.toFixed(6)}`)}return _.size};if(p(t.tracePath)\u003ep(e.tracePath))return!1}if(!s.every(d=\u003ejl(t.tracePath,r[d].anchorPoint)))return!1;const c=(d,p)=\u003eUle({path:p.tracePath,netLabelPlacements:[d]});for(const d of s){const p=i[d],m=r[d],_=Ls(p.center,p.width,p.height),f=Ls(m.center,m.width,m.height);for(const I of n)if(I.globalConnNetId!==m.globalConnNetId\u0026\u0026c(m,I)\u0026\u0026!c(p,I))return!1;for(const I of a)if(yB(f,I)\u0026\u0026!yB(_,I))return!1;for(let I=0;I\u003cr.length;I++){if(I===d)continue;const C=i[I],y=r[I],x=Ls(C.center,C.width,C.height),E=Ls(y.center,y.width,y.height);if(yB(f,E)\u0026\u0026!yB(_,x))return!1}}const l=r.filter(d=\u003ed.globalConnNetId!==t.globalConnNetId);if(Ule({path:t.tracePath,netLabelPlacements:l}))return!1;const u=r.filter(d=\u003ed.globalConnNetId===t.globalConnNetId);if(!Ule({path:t.tracePath,netLabelPlacements:u}))return!0;if(Hvt({path:t.tracePath,netLabelPlacements:u}))return!1;const g=Ij(e),h=Ij(t);return!g||!h?!1:Math.abs(g.start.y-h.start.y)\u003c=Wxo},A3o=({donorTrace:t,branchTrace:e,returnStemScale:n=1})=\u003e{const o=YN({donorTrace:t,branchTrace:e});if(!o)return null;const i=rw({trace:t,sharedPin:o}),r=rw({trace:e,sharedPin:o});if(!i||!r)return null;const s=o._facingDirection;if(s!==\"y+\"\u0026\u0026s!==\"y-\"||i._facingDirection!==s||r._facingDirection!==s||!Uc(o.y,i.y))return null;const a=Qa(t.tracePath);if(a.length!==4)return null;const A=Ij(t);if(!A||!Cj({railY:A.start.y,pin:o})||!Yy(a[0],a[1])||!Yy(a[2],a[3]))return null;const c=e.pins[0].pinId===o.pinId,l=Qa(c?e.tracePath:[...e.tracePath].reverse());if(l.length!==6||!Yy(l[0],l[1])||!CB(l[1],l[2])||!Yy(l[2],l[3])||!CB(l[3],l[4])||!Yy(l[4],l[5])||!Cj({railY:l[1].y,pin:o})||!Cj({railY:l[4].y,pin:r})||(s===\"y+\"?1:-1)*(r.y-A.start.y)\u003c=0)return null;const g=Math.min(o.x,i.x),h=Math.max(o.x,i.x);if(l[2].x\u003cg||l[2].x\u003eh||Uc(l[2].x,i.x)\u0026\u0026Uc(l[1].y,A.start.y))return null;const d=r.y+(l[4].y-r.y)*n;if(Math.abs(d-r.y)\u003c$xo-1e-6)return null;const p=Qa([{x:o.x,y:o.y},{x:o.x,y:A.start.y},{x:i.x,y:A.start.y},{x:i.x,y:d},{x:r.x,y:d},{x:r.x,y:r.y}]);return c?p:p.reverse()},c3o=({inputProblem:t,traces:e,netLabelPlacements:n,netLabelConnectorTraceIds:o})=\u003e{let i=[...e],r=[...n],s=0;const a=new Set;for(const c of[!1,!0]){const l=e.map(g=\u003eg.mspPairId),u=new Set(l);for(let g=0;g\u003cl.length;g++){const h=l[g];u.delete(h);const d=i.find(p=\u003ep.mspPairId===h);for(const p of i){if(a.has(p.mspPairId)||d.mspPairId===p.mspPairId||d.globalConnNetId!==p.globalConnNetId)continue;const m=o.has(d.mspPairId),f=o.has(p.mspPairId)?c\u0026\u0026!m?[r3o({donorTrace:d,connectorTrace:p,netLabelConnectorTraceIds:o})]:[]:m?[]:c?[...[1,.5,.25].map(I=\u003eA3o({donorTrace:d,branchTrace:p,returnStemScale:I})),a3o({donorTrace:d,branchTrace:p,traces:i}),i3o({donorTrace:d,branchTrace:p,netLabelConnectorTraceIds:o})]:[n3o({donorTrace:d,branchTrace:p}),o3o({donorTrace:d,branchTrace:p})];for(const I of f){if(!I)continue;const C={...p,tracePath:I},y=[d,p],x=[d,C],E=Qle(x)\u003cQle(y),B=Y7(x)\u003cY7(y)\u0026\u0026!Uc(Y7(x),Y7(y));if(!E\u0026\u0026!B)continue;const S=Jvt(p,r),Q=t3o({trace:p,reroutedTracePath:I,netLabelPlacements:r,attachedLabelIndexes:S}),w=s3o({originalTrace:p,candidateTrace:C,traces:i});if(!(!w||!jvt({candidateTrace:C,originalTrace:p,traces:w,inputProblem:t,originalNetLabelPlacements:r,candidateNetLabelPlacements:Q,attachedLabelIndexes:S})||!w.every(k=\u003e{if(k.mspPairId===p.mspPairId)return!0;const R=i.find(F=\u003eF.mspPairId===k.mspPairId);return R.tracePath===k.tracePath?!0:jvt({candidateTrace:k,originalTrace:R,traces:w,inputProblem:t,originalNetLabelPlacements:r,candidateNetLabelPlacements:Q,attachedLabelIndexes:Jvt(R,r)})}))){i=w,r=Q,a.add(p.mspPairId),s++,u.has(p.mspPairId)||(l.push(p.mspPairId),u.add(p.mspPairId));break}}}}}const A=Jxo({traces:i,netLabelPlacements:r});return i=Oxo({traces:A.traces,netLabelPlacements:A.netLabelPlacements,netLabelConnectorTraceIds:o,multiPinNetPinIds:qxo(t)}),r=A.netLabelPlacements,{traces:i,netLabelPlacements:r,alignedJunctionCount:s,collapsedCycleCount:A.collapsedCycleCount}},l3o=({inputProblem:t,traces:e,netLabelPlacements:n})=\u003e{const{netConnMap:o}=mB(t),i=o.getNetConnectedToId(\"GND\");if(!i)return n;const r=new Map(t.chips.map(c=\u003e[c.chipId,c])),s=Object.fromEntries(e.map(c=\u003e[c.mspPairId,c])),a=Hy(t),A=[...n];for(const c of e){if(c.globalConnNetId!==i)continue;const[l,u]=c.pins;if(l.chipId===u.chipId||!Uc(l.y,u.y)||![l,u].every(h=\u003eh._facingDirection===\"y-\"\u0026\u0026r.get(h.chipId)?.pins.length===2))continue;const g=Qa(c.tracePath);if(!(g.length!==4||!Yy(g[0],g[1])||!CB(g[1],g[2])||!Yy(g[2],g[3])||g[1].y\u003e=l.y))for(const h of e){if(h.globalConnNetId!==i)continue;const d=h.pins.find(f=\u003ec.pinIds.includes(f.pinId)),p=h.pins.find(f=\u003e!c.pinIds.includes(f.pinId)\u0026\u0026(r.get(f.chipId)?.pins.length??0)\u003e2);if(!d||!p||!Uc(p.y,g[1].y))continue;const m=d.pinId===l.pinId?u:l;if(Math.abs(m.x-p.x)\u003c=Math.abs(d.x-p.x))continue;const _={x:m.x,y:g[1].y};if(jl(c.tracePath,_))for(let f=0;f\u003cA.length;f++){const I=A[f];if(I.globalConnNetId!==i||I.orientation!==\"y-\"||!I.mspConnectionPairIds.some(x=\u003ex===h.mspPairId||x===c.mspPairId)||!jl(h.tracePath,I.anchorPoint)\u0026\u0026!jl(c.tracePath,I.anchorPoint))continue;const C=IC(_,I.orientation,I.width,I.height),y=Ls(C,I.width,I.height);a.some(x=\u003eyB(y,x))||mj(y,s)||A.some((x,E)=\u003eE!==f\u0026\u0026yB(y,Ls(x.center,x.width,x.height)))||(A[f]={...I,anchorPoint:_,center:C,mspConnectionPairIds:[c.mspPairId],pinIds:[...c.pinIds]})}}}for(let c=0;c\u003cA.length;c++){const l=A[c];if(l.orientation!==\"y-\"||!t.netConnections.find(p=\u003ep.isGround\u0026\u0026p.netId===l.netId\u0026\u0026p.pinIds.length\u003e2))continue;const g=e.filter(p=\u003ep.globalConnNetId===l.globalConnNetId).flatMap(p=\u003ep.tracePath).filter(p=\u003eUc(p.x,l.anchorPoint.x)\u0026\u0026p.y\u003cl.anchorPoint.y).sort((p,m)=\u003ep.y-m.y)[0];if(!g)continue;const h=IC(g,l.orientation,l.width,l.height),d=Ls(h,l.width,l.height);a.some(p=\u003eyB(d,p))||mj(d,s)||A.some((p,m)=\u003em!==c\u0026\u0026yB(d,Ls(p.center,p.width,p.height)))||(A[c]={...l,anchorPoint:g,center:h})}return A},u3o=class extends Ng{input;outputTraces;outputNetLabelPlacements;constructor(t){super(),this.input=t,this.outputTraces=t.traces,this.outputNetLabelPlacements=t.netLabelPlacements}_step(){const t=c3o(this.input);this.outputTraces=t.traces,this.outputNetLabelPlacements=l3o({inputProblem:this.input.inputProblem,traces:t.traces,netLabelPlacements:t.netLabelPlacements}),this.stats.alignedJunctionCount=t.alignedJunctionCount,this.stats.collapsedCycleCount=t.collapsedCycleCount,this.solved=!0}getOutput(){return{traces:this.outputTraces,netLabelPlacements:this.outputNetLabelPlacements}}visualize(){const t=zh(this.input.inputProblem);t.lines??=[],t.rects??=[],t.points??=[];for(const e of this.outputTraces)t.lines.push({points:e.tracePath,strokeColor:\"purple\"});for(const e of this.outputNetLabelPlacements){const n={center:e.center,width:e.width,height:e.height,fill:Mc(e.globalConnNetId,.35),strokeColor:Mc(e.globalConnNetId,.9),label:`netId: ${e.netId}\nglobalConnNetId: ${e.globalConnNetId}`};t.rects.push(n),t.points.push({x:e.anchorPoint.x,y:e.anchorPoint.y,color:Mc(e.globalConnNetId,.9),label:`anchorPoint\norientation: ${e.orientation}`})}return t}},$vt=t=\u003e{const e=Qa(t);if(e.length!==6)return!1;const n=e.slice(0,-1).map((o,i)=\u003eX_(o,e[i+1]));return n.every((o,i)=\u003ei===0||o!==n[i-1])},g3o=({trace:t,label:e,paddingBuffer:n,detourCount:o})=\u003e{if(t.globalConnNetId===e.globalConnNetId)return[];const i=Qa(t.tracePath);if(!$vt(i))return[];const r=Ls(e.center,e.width,e.height),s=n+o*n,a={minX:r.minX-s,maxX:r.maxX+s,minY:r.minY-s,maxY:r.maxY+s},A=[];for(let c=1;c\u003ci.length-2;c++){const l=i[c],u=i[c+1];if(!CC(l,u,r))continue;const g=X_(l,u),h=e1(l,u);if(!g\u0026\u0026!h)continue;const d=g?\"y\":\"x\",p=g?[a.minY,a.maxY]:[a.minX,a.maxX];for(const m of p){const _=Dve(i,c,d,m);_\u0026\u0026A.push(_)}}return A},d3o=({trace:t,label:e,paddingBuffer:n,detourCount:o})=\u003e{const i=Qa(t.tracePath);if(!$vt(i))return[];const r=Ls(e.center,e.width,e.height),s=n+o*n,a={minX:r.minX-s,maxX:r.maxX+s,minY:r.minY-s,maxY:r.maxY+s},A=i[0],c=i[i.length-1],l=2,u=[];for(let g=0;g\u003ci.length-1;g++){const h=i[g],d=i[g+1];if(!CC(h,d,r)||Math.abs(g-l)!==1)continue;const p=X_(h,d),m=e1(h,d);if(!p\u0026\u0026!m)continue;const _=p?\"x\":\"y\",f=p?a.minX:a.minY,I=p?a.maxX:a.maxY,C=p?A.x:A.y,y=p?c.x:c.y,x=[];C\u003cf?x.push((C+f)/2):C\u003eI\u0026\u0026x.push((C+I)/2),y\u003cf?x.push((y+f)/2):y\u003eI\u0026\u0026x.push((y+I)/2);for(const E of new Set(x)){const B=Dve(i,l,_,E);B\u0026\u0026u.push(B)}}return u},h3o=({trace:t,label:e,netLabelPlacements:n,paddingBuffer:o,detourCount:i})=\u003ed3o({trace:t,label:e,paddingBuffer:o,detourCount:i}).flatMap(s=\u003e{const a={...t,tracePath:s};return Jh({traces:[a],netLabels:n}).flatMap(({label:c})=\u003eg3o({trace:a,label:c,paddingBuffer:o,detourCount:i}))}),qvt=1e-9,ZH=t=\u003et.slice(1).reduce((e,n,o)=\u003e{const i=t[o];return e+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),swe=class extends Ng{input;outputTraces;traceIdQueue;obstacles;constructor(t){super(),this.input=t,this.outputTraces=[...t.traces];const e=new Set(t.completedReroutes.map(n=\u003en.initialTrace.mspPairId));this.traceIdQueue=t.traces.map(n=\u003en.mspPairId).filter(n=\u003ee.has(n)),this.obstacles=Hy(t.inputProblem)}_step(){const t=this.traceIdQueue.shift();if(!t){this.solved=!0;return}const e=this.outputTraces.findIndex(h=\u003eh.mspPairId===t),n=this.outputTraces[e],o=Qa(n.tracePath),i=Jh({traces:[{...n,tracePath:o}],netLabels:this.input.netLabelPlacements}),r=this.outputTraces.filter(h=\u003eh.mspPairId!==n.mspPairId\u0026\u0026h.globalConnNetId!==n.globalConnNetId),s=new Map,a=this.input.completedReroutes.filter(h=\u003eh.initialTrace.mspPairId===n.mspPairId);for(const h of a){const d=Qa(h.initialTrace.tracePath),p=Qa(h.reroutedTracePath),m=Jh({traces:[{...h.initialTrace,tracePath:d}],netLabels:this.input.netLabelPlacements}).length,_=h3o({trace:h.initialTrace,label:h.label,netLabelPlacements:this.input.netLabelPlacements,paddingBuffer:this.input.paddingBuffer,detourCount:h.detourCount});for(const f of _){const I=Qa(f),C={...h.initialTrace,tracePath:I};Jh({traces:[C],netLabels:this.input.netLabelPlacements}).length\u003cm\u0026\u0026Math.abs(ZH(I)-ZH(p))\u003cqvt\u0026\u0026I.length\u003cp.length\u0026\u0026hj(this.input.netLabelPlacements,[h.initialTrace],[C])\u0026\u0026s.set(I.map(E=\u003e`${E.x},${E.y}`).join(\";\"),I)}}const A=new Set(i.map(({label:h})=\u003e`${h.globalConnNetId}:${h.netId}`)),c=ZH(o),l=[...s.values()].filter(h=\u003e{const d={...n,tracePath:h},p=Jh({traces:[d],netLabels:this.input.netLabelPlacements}),m=p.every(({label:I})=\u003eA.has(`${I.globalConnNetId}:${I.netId}`)),_=p.length\u003ci.length,f=p.length===i.length\u0026\u0026ZH(h)\u003c=c+qvt\u0026\u0026h.length\u003co.length;return m\u0026\u0026(_||f)\u0026\u0026hj(this.input.netLabelPlacements,[n],[d])\u0026\u0026!ON(h,this.obstacles)\u0026\u0026!nw(h,r)}),u=h=\u003eJh({traces:[{...n,tracePath:h}],netLabels:this.input.netLabelPlacements}).length;l.sort((h,d)=\u003e{const p=u(h)-u(d);return p!==0?p:ZH(h)-ZH(d)||h.length-d.length});const g=l[0];g\u0026\u0026(this.outputTraces[e]={...n,tracePath:g},this.stats.simplifiedTraceCount=(this.stats.simplifiedTraceCount??0)+1)}getOutput(){return{traces:this.outputTraces,netLabelPlacements:this.input.netLabelPlacements}}visualize(){const t=zh(this.input.inputProblem);t.lines??=[];for(const e of this.outputTraces)t.lines.push({points:e.tracePath,strokeColor:\"purple\"});return t}},Xvt=t=\u003e{if(!t.stubTracePath)return null;const e=1e-6;return{minX:Math.min(...t.stubTracePath.map(n=\u003en.x))-e,maxX:Math.max(...t.stubTracePath.map(n=\u003en.x))+e,minY:Math.min(...t.stubTracePath.map(n=\u003en.y))-e,maxY:Math.max(...t.stubTracePath.map(n=\u003en.y))+e}},awe=(t,e)=\u003e{const n=e.map(i=\u003e({globalConnNetId:i.globalConnNetId,netId:i.netId,pinIds:i.pinIds,mspConnectionPairIds:[],anchorPoint:i.anchorPoint,orientation:\"y+\",center:i.center,width:i.axis===\"x\"?i.width:i.height,height:i.axis===\"x\"?i.height:i.width})),o=e.flatMap(i=\u003e{if(!i.stubTracePath)return[];const r=t.chips.find(A=\u003eA.pins.some(c=\u003ei.pinIds.includes(c.pinId))),s=r?.pins.find(A=\u003ei.pinIds.includes(A.pinId));if(!r||!s)return[];const a=JSON.stringify([\"inline-terminal\",i.globalConnNetId,[...i.pinIds].sort()]);return[{mspPairId:a,mspConnectionPairIds:[a],globalConnNetId:i.globalConnNetId,dcConnNetId:i.globalConnNetId,pinIds:i.pinIds,pins:[{...s,chipId:r.chipId},{...s,...i.stubTracePath[1],chipId:r.chipId}],tracePath:i.stubTracePath}]});return{fixedLabels:n,terminalTraces:o}},xC=1e-6,iE=.05,UN=(t,e)=\u003et.slice(1).some((n,o)=\u003eCC(t[o],n,e)),Zvt=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y)\u003cxC,KN=(t,e,n)=\u003e({...t,[e]:t[e]+n}),Awe=(t,e)=\u003et.slice(1).flatMap((n,o)=\u003ee.slice(1).flatMap((i,r)=\u003e{const s=V4(t[o],n,e[r],i);return s?[s]:[]}));function*ewt(t,e,n=[]){const o=[...e.inlineNetLabelPlacements,...n],{fixedLabels:i,terminalTraces:r}=awe(t,o),s=o.flatMap(l=\u003e{const u=Xvt(l);return u?[{label:l,bounds:u}]:[]}),a=[...t.chips.map(l=\u003e({minX:l.center.x-l.width/2,maxX:l.center.x+l.width/2,minY:l.center.y-l.height/2,maxY:l.center.y+l.height/2})),...(t.textBoxes??[]).map(l=\u003efB(l))],A=i.map(l=\u003e({minX:l.center.x-l.width/2,maxX:l.center.x+l.width/2,minY:l.center.y-l.height/2,maxY:l.center.y+l.height/2})),c=[...t.chips.flatMap(l=\u003el.pins),...e.traces.flatMap(l=\u003el.pins)];for(const l of e.traces){const u=Qa(l.tracePath);for(let g=0;g\u003cu.length-1;g++){const h=u[g],d=u[g+1],p=Math.abs(h.x-d.x)\u003cxC?\"x\":\"y\",m=p===\"x\"?\"y\":\"x\";if(Math.abs(h[p]-d[p])\u003exC||Zvt(h,d))continue;const _=[...e.netLabelPlacements.filter(w=\u003ew.globalConnNetId!==l.globalConnNetId).map(yp),...A,...s.filter(({label:w})=\u003e!l.pinIds.some(M=\u003ew.pinIds.includes(M))).map(({bounds:w})=\u003ew)].filter(w=\u003eCC(h,d,w));if(!_.length)continue;let f=Math.min(h[m],d[m]),I=Math.max(h[m],d[m]),C=!0;for(;C;){C=!1;for(const w of e.traces)if(w.globalConnNetId===l.globalConnNetId)for(let M=1;M\u003cw.tracePath.length;M++){const k=w.tracePath[M-1],R=w.tracePath[M];if(Math.abs(k[p]-h[p])\u003exC||Math.abs(R[p]-h[p])\u003exC)continue;const F=Math.min(k[m],R[m]),O=Math.max(k[m],R[m]);O\u003cf-xC||F\u003eI+xC||((F\u003cf||O\u003eI)\u0026\u0026(C=!0),f=Math.min(f,F),I=Math.max(I,O))}}const y=w=\u003eMath.abs(w[p]-h[p])\u003cxC\u0026\u0026w[m]\u003e=f-xC\u0026\u0026w[m]\u003c=I+xC;if(c.some(y))continue;const x=p===\"x\"?\"minX\":\"minY\",E=p===\"x\"?\"maxX\":\"maxY\",B=Math.max(..._.map(w=\u003ew[E]-w[x])),S=e.netLabelPlacements.filter(w=\u003ew.globalConnNetId===l.globalConnNetId\u0026\u0026y(w.anchorPoint)).map(yp),Q=[...new Set(_.flatMap(w=\u003e[w[x]-iE,w[E]+iE,...S.filter(M=\u003eDc(M,w)).flatMap(M=\u003e[h[p]+w[x]-iE-M[E],h[p]+w[E]+iE-M[x]])]))].sort((w,M)=\u003eMath.abs(w-h[p])-Math.abs(M-h[p]));for(const w of Q){const M=w-h[p];if(Math.abs(M)\u003eB+2*iE)continue;const k=e.traces.map(Y=\u003eY.globalConnNetId!==l.globalConnNetId||!Y.tracePath.some(y)?Y:{...Y,tracePath:Y.tracePath.map(W=\u003ey(W)?KN(W,p,M):W)}),R=k.filter((Y,W)=\u003eY!==e.traces[W]).map(Y=\u003eY.tracePath);let F=e.netLabelPlacements.map(Y=\u003eY.globalConnNetId!==l.globalConnNetId||!y(Y.anchorPoint)?Y:{...Y,anchorPoint:KN(Y.anchorPoint,p,M),center:KN(Y.center,p,M)}),O=!1;const U=F.flatMap((Y,W)=\u003eY!==e.netLabelPlacements[W]?[yp(Y)]:[]);for(const[Y,W]of F.entries()){if(W.globalConnNetId===l.globalConnNetId)continue;const te=yp(W),j=U.filter(ue=\u003eDc(ue,te)).map(ue=\u003eue[M\u003e0?E:x]);if(R.some(ue=\u003eUN(ue,te))\u0026\u0026!e.traces.some(ue=\u003eue.globalConnNetId===l.globalConnNetId\u0026\u0026UN(ue.tracePath,te))\u0026\u0026j.push(w),!j.length)continue;const J=k.findIndex(ue=\u003eue.globalConnNetId===W.globalConnNetId\u0026\u0026ue.pinIds.length===1\u0026\u0026ue.tracePath.length===3\u0026\u0026Zvt(ue.tracePath.at(-1),W.anchorPoint)),oe=k[J];if(!oe){const fe=new ewe({inputProblem:t,traces:[...k,...r],netLabelPlacements:F,fixedNetLabelPlacements:i,useRenderedLabelBounds:!0}).getNearbyValidPlacements(W,B+Math.max(W.width,W.height))[0];if(!fe){O=!0;break}F[Y]=fe;continue}const[ie,ne,le]=oe.tracePath;if(Math.abs(ne[p]-le[p])\u003exC||Math.abs(ie[m]-ne[m])\u003exC){O=!0;break}const ge=M\u003e0?Math.max(...j)+iE-te[x]:Math.min(...j)-iE-te[E];if(Math.abs(ge)\u003eB+te[E]-te[x]+2*iE){O=!0;break}const _e={...W,anchorPoint:KN(W.anchorPoint,p,ge),center:KN(W.center,p,ge)};F[Y]=_e,k[J]={...oe,tracePath:[ie,KN(ne,p,ge),_e.anchorPoint]}}if(!O){for(const[Y,W]of k.entries()){if(W.globalConnNetId===l.globalConnNetId||Qa(W.tracePath).length\u003c=4||!R.some(j=\u003enw(j,[W])))continue;const te=YQt({inputProblem:t,traces:[...k,...r],targetMspConnectionPairId:W.mspPairId,allLabelPlacements:[...F,...i],mergedLabelNetIdMap:{},paddingBuffer:iE});Qa(te.tracePath).length\u003cQa(W.tracePath).length\u0026\u0026hj(F,[W],[te])\u0026\u0026(k[Y]=te)}for(const[Y,W]of k.entries()){const te=e.traces[Y];if(W===te)continue;const j=W.tracePath,J=te.tracePath;if(j.slice(1).some((le,ge)=\u003eMath.abs(le.x-j[ge].x)\u003exC\u0026\u0026Math.abs(le.y-j[ge].y)\u003exC)){O=!0;break}const oe=(le,ge,_e,ue)=\u003e(ge.x-le.x)*(ue.x-_e.x)+(ge.y-le.y)*(ue.y-_e.y);if(oe(J[0],J[1],j[0],j[1])\u003c=xC||oe(J.at(-1),J.at(-2),j.at(-1),j.at(-2))\u003c=xC){O=!0;break}const ie=e.traces.filter(le=\u003ele!==te\u0026\u0026le.globalConnNetId===te.globalConnNetId).flatMap(le=\u003e[...le.tracePath,...Awe(J,le.tracePath)]).filter(le=\u003ejl(J,le)).map(le=\u003ete.globalConnNetId===l.globalConnNetId\u0026\u0026y(le)?KN(le,p,M):le);if([...c.filter(le=\u003ejl(J,le)),...ie].some(le=\u003e!jl(j,le))||c.some(le=\u003e{const ge={minX:le.x-iE,maxX:le.x+iE,minY:le.y-iE,maxY:le.y+iE};return UN(j,ge)\u0026\u0026!UN(J,ge)})||a.some(le=\u003eUN(j,le)\u0026\u0026!UN(J,le))){O=!0;break}for(const le of[...k,...r]){if(le.mspPairId===W.mspPairId||le.globalConnNetId===W.globalConnNetId)continue;const ge=e.traces.find(_e=\u003e_e.mspPairId===le.mspPairId)??le;if(nw(j,[le])||Awe(j,le.tracePath).length\u003eAwe(J,ge.tracePath).length){O=!0;break}}if(O)break}if(!O){for(const[Y,W]of F.entries()){if(W===e.netLabelPlacements[Y])continue;const te=yp(W);if(a.some(j=\u003eDc(te,j))||A.some(j=\u003eDc(te,j))){O=!0;break}if(F.some((j,J)=\u003eY!==J\u0026\u0026Dc(te,yp(j)))){O=!0;break}if([...k,...r].some(j=\u003ej.globalConnNetId!==W.globalConnNetId\u0026\u0026UN(j.tracePath,te))){O=!0;break}}O||(yield{...e,traces:k,netLabelPlacements:F})}}}}}}var eO=(t,e)=\u003e{const n=[...t.pinIds].sort(),o=[...e.pinIds].sort();return t.globalConnNetId===e.globalConnNetId\u0026\u0026n.length===o.length\u0026\u0026n.every((i,r)=\u003ei===o[r])},twt=(t,e)=\u003et.kind===\"label-label\"\u0026\u0026e.kind===\"label-label\"?eO(t.labels[0],e.labels[0])\u0026\u0026eO(t.labels[1],e.labels[1])||eO(t.labels[0],e.labels[1])\u0026\u0026eO(t.labels[1],e.labels[0]):t.kind!==\"trace-label\"||e.kind!==\"trace-label\"?!1:(t.trace.kind===\"routed\"\u0026\u0026e.trace.kind===\"routed\"?t.trace.id===e.trace.id:t.trace.kind===\"terminal\"\u0026\u0026e.trace.kind===\"terminal\"\u0026\u0026eO(t.trace.label,e.trace.label))\u0026\u0026t.target===e.target\u0026\u0026eO(t.label,e.label),nwt=t=\u003e{const e=[...t.netLabelPlacements,...t.inlineNetLabelPlacements].map(r=\u003e({label:r,bounds:\"axis\"in r?{minX:r.center.x-(r.axis===\"x\"?r.width:r.height)/2,maxX:r.center.x+(r.axis===\"x\"?r.width:r.height)/2,minY:r.center.y-(r.axis===\"x\"?r.height:r.width)/2,maxY:r.center.y+(r.axis===\"x\"?r.height:r.width)/2}:yp(r)})),n=[],o=r=\u003e{n.some(s=\u003etwt(r,s))||n.push(r)};for(let r=0;r\u003ce.length;r++)for(const s of e.slice(r+1))Dc(e[r].bounds,s.bounds)\u0026\u0026o({kind:\"label-label\",labels:[e[r].label,s.label]});const i=[...t.traces.map(r=\u003e({...r,identity:{kind:\"routed\",id:r.mspPairId}})),...t.inlineNetLabelPlacements.flatMap(r=\u003er.stubTracePath?[{identity:{kind:\"terminal\",label:r},globalConnNetId:r.globalConnNetId,tracePath:r.stubTracePath}]:[])];for(const r of i)for(const{label:s,bounds:a}of e)(\"axis\"in s||s.globalConnNetId!==r.globalConnNetId)\u0026\u0026r.tracePath.slice(1).some((A,c)=\u003eCC(r.tracePath[c],A,a))\u0026\u0026o({kind:\"trace-label\",trace:r.identity,label:s,target:\"text\"});for(const r of t.inlineNetLabelPlacements){const s=Xvt(r);if(s)for(const a of t.traces)a.pinIds.some(A=\u003er.pinIds.includes(A))||a.tracePath.slice(1).some((A,c)=\u003eCC(a.tracePath[c],A,s))\u0026\u0026o({kind:\"trace-label\",trace:{kind:\"routed\",id:a.mspPairId},label:r,target:\"terminal\"})}return n},cwe=(t,e)=\u003et.pinIds.length\u003e0\u0026\u0026t.pinIds.every(n=\u003ee.some(o=\u003eo.globalConnNetId===t.globalConnNetId\u0026\u0026o.pinIds.includes(n))),p3o=t=\u003e{const[e,n]=t;return Math.abs(n.x-e.x)\u003e=Math.abs(n.y-e.y)?n.x\u003e=e.x?\"x+\":\"x-\":n.y\u003e=e.y?\"y+\":\"y-\"},m3o=t=\u003e{const[e,n]=t;return Math.abs(n.x-e.x)+Math.abs(n.y-e.y)},zle=t=\u003e{const e=t.axis===\"y\",n=e?t.height:t.width,o=e?t.width:t.height;return{minX:t.center.x-n/2,maxX:t.center.x+n/2,minY:t.center.y-o/2,maxY:t.center.y+o/2}},owt=t=\u003e({minX:Math.min(...t.map(e=\u003ee.x)),maxX:Math.max(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxY:Math.max(...t.map(e=\u003ee.y))}),yj=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=owt([t[n],t[n+1]]);if(Dc(o,e))return!0}return!1},_3o=(t,e,n)=\u003e{const[o]=t.stubTracePath,i=e===\"x+\"?{x:o.x+n,y:o.y}:e===\"x-\"?{x:o.x-n,y:o.y}:e===\"y+\"?{x:o.x,y:o.y+n}:{x:o.x,y:o.y-n},r={x:(o.x+i.x)/2,y:(o.y+i.y)/2};return{...t,stubTracePath:[o,i],anchorPoint:r,center:t.center}},f3o=({placements:t,inputProblem:e,traces:n,netLabelPlacements:o})=\u003e{const i=new Map;for(const A of e.chips)for(const c of A.pins)i.set(c.pinId,A.chipId);const r=new Map;for(const[A,c]of t.entries()){if(!c.stubTracePath||c.pinIds.length!==1)continue;const l=p3o(c.stubTracePath);if(!l)continue;const u=i.get(c.pinIds[0]),g=`${u??c.pinIds[0]}::${l}`,h=r.get(g)??[];h.push({placementIndex:A,placement:c,direction:l,ownerChipId:u}),r.set(g,h)}const s=[...t],a=o.filter(A=\u003e!cwe(A,t)).map(zle);for(const A of r.values()){if(A.length\u003c2)continue;const c=Math.max(...A.map(({placement:d})=\u003em3o(d.stubTracePath))),l=A.map(({placement:d,direction:p})=\u003e_3o(d,p,c)),u=new Set(A.map(({placementIndex:d})=\u003ed)),g=t.filter((d,p)=\u003e!u.has(p));if(!l.some((d,p)=\u003e{const m=zle(d),_=d.stubTracePath,f=owt(_),I=A[p].ownerChipId;for(const C of e.chips){const y={minX:C.center.x-C.width/2,maxX:C.center.x+C.width/2,minY:C.center.y-C.height/2,maxY:C.center.y+C.height/2};if(Dc(m,y)||C.chipId!==I\u0026\u0026Dc(f,y))return!0}for(const C of e.textBoxes??[]){const y=fB(C);if(Dc(m,y)||Dc(f,y))return!0}for(const C of n)if(C.globalConnNetId!==d.globalConnNetId\u0026\u0026(yj(C.tracePath,m)||yj(C.tracePath,f)))return!0;if(a.some(C=\u003eDc(m,C)||Dc(f,C)))return!0;for(const C of g){const y=zle(C);if(Dc(m,y)||Dc(f,y)||C.stubTracePath\u0026\u0026(yj(C.stubTracePath,m)||yj(_,y)))return!0}for(const[C,y]of l.entries()){if(C===p)continue;const x=zle(y);if(Dc(m,x)||yj(_,x))return!0}return!1}))for(const[d,{placementIndex:p}]of A.entries())s[p]=l[d]}return s},iwt=(t,e=1e-6)=\u003e{const n=[];let o=null,i=null,r=0;const s=a=\u003e{if(o\u0026\u0026i){const A=Math.abs(i===\"x\"?a.x-o.x:a.y-o.y);A\u003ee\u0026\u0026n.push({start:o,end:a,axis:i,length:A})}o=null,i=null,r=0};for(let a=0;a\u003ct.length-1;a++){const A=t[a],c=t[a+1],l=c.x-A.x,u=c.y-A.y;if(Math.abs(l)\u003c=e\u0026\u0026Math.abs(u)\u003c=e)continue;const g=Math.abs(u)\u003c=e?\"x\":Math.abs(l)\u003c=e?\"y\":null;if(!g){s(A);continue}const h=Math.sign(g===\"x\"?l:u);o\u0026\u0026i===g\u0026\u0026r===h||(s(A),o=A,i=g,r=h)}return t.length\u003e=2\u0026\u0026s(t[t.length-1]),n.sort((a,A)=\u003eA.length-a.length)},q5=.05,X5=1e-6,I3o=.01,rwt=5,C3o=t=\u003e{const e=t.axis===\"y\"?t.height:t.width,n=t.axis===\"y\"?t.width:t.height;return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},xj=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=X5\u0026\u0026Math.abs(t.y-e.y)\u003c=X5,Ej=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1],r={minX:Math.min(o.x,i.x),maxX:Math.max(o.x,i.x),minY:Math.min(o.y,i.y),maxY:Math.max(o.y,i.y)};if(Dc(r,e))return!0}return!1},y3o=(t,e)=\u003e{for(let n=0;n\u003ce.length-1;n++){const o=e[n],i=e[n+1],r=Math.min(o.x,i.x)-X5,s=Math.max(o.x,i.x)+X5,a=Math.min(o.y,i.y)-X5,A=Math.max(o.y,i.y)+X5,c=Math.abs(o.y-i.y)\u003c=X5,l=Math.abs(o.x-i.x)\u003c=X5;if((c\u0026\u0026Math.abs(t.y-o.y)\u003c=X5||l\u0026\u0026Math.abs(t.x-o.x)\u003c=X5)\u0026\u0026t.x\u003e=r\u0026\u0026t.x\u003c=s\u0026\u0026t.y\u003e=a\u0026\u0026t.y\u003c=A)return!0}return!1},x3o=(t,e)=\u003e{let n=0;for(let o=0;o\u003ce.length;o++){const i=yp(Jle(t,t.orientation,n)),r=t.orientation===\"x-\"||t.orientation===\"x+\",s=e.filter(a=\u003eDc(i,{minX:a.minX-(r?q5:0),maxX:a.maxX+(r?q5:0),minY:a.minY-(r?0:q5),maxY:a.maxY+(r?0:q5)}));if(s.length===0)break;switch(t.orientation){case\"x-\":n+=i.maxX-Math.min(...s.map(a=\u003ea.minX))+q5;break;case\"x+\":n+=Math.max(...s.map(a=\u003ea.maxX))-i.minX+q5;break;case\"y-\":n+=i.maxY-Math.min(...s.map(a=\u003ea.minY))+q5;break;case\"y+\":n+=Math.max(...s.map(a=\u003ea.maxY))-i.minY+q5;break}}return n},Jle=(t,e,n)=\u003e{const o=sm(e);return{...t,anchorPoint:{x:t.anchorPoint.x+o.x*n,y:t.anchorPoint.y+o.y*n},center:{x:t.center.x+o.x*n,y:t.center.y+o.y*n}}},E3o=(t,e,n)=\u003e{switch(n){case\"x-\":return t.maxX-e.minX+q5;case\"x+\":return e.maxX-t.minX+q5;case\"y-\":return t.maxY-e.minY+q5;case\"y+\":return e.maxY-t.minY+q5}},B3o=(t,e,n)=\u003en===\"x-\"||n===\"x+\"?Math.max(0,t.minY-e.maxY,e.minY-t.maxY):Math.max(0,t.minX-e.maxX,e.minX-t.maxX),swt=(t,e,n)=\u003et.pinIds.some(o=\u003ee.has(n.get(o)??\"\")),awt=(t,e,n)=\u003ee.findIndex(o=\u003e{if(o.globalConnNetId!==t.globalConnNetId||!n.has(o.mspPairId))return!1;const i=o.tracePath[0],r=o.tracePath.at(-1);return!!(i\u0026\u0026xj(i,t.anchorPoint)||r\u0026\u0026xj(r,t.anchorPoint))}),Awt=(t,e,n)=\u003et.pinIds.some(o=\u003e{const i=n[o];return i\u0026\u0026xj(i,t.anchorPoint)})?!0:e.some(o=\u003eo.globalConnNetId===t.globalConnNetId\u0026\u0026y3o(t.anchorPoint,o.tracePath)),b3o=(t,e,n)=\u003e{const o=t.tracePath.map(i=\u003e({...i}));return xj(o[0],e)\u0026\u0026(o[0]=n),xj(o.at(-1),e)\u0026\u0026(o[o.length-1]=n),{...t,tracePath:o}},S3o=({label:t,labelIndex:e,newAnchor:n,pinMap:o})=\u003e{const i=`inline-net-label-clearance-${e}-${t.netId??t.globalConnNetId}`;return{mspPairId:i,dcConnNetId:t.dcConnNetId??t.globalConnNetId,globalConnNetId:t.globalConnNetId,userNetId:t.netId,pins:Vve(t,o),tracePath:[t.anchorPoint,n],mspConnectionPairIds:[i],pinIds:t.pinIds}},Q3o=({triggerIndex:t,labels:e,chipIdByPinId:n})=\u003e{const o=e[t],i=new Set(o.pinIds.flatMap(A=\u003e{const c=n.get(A);return c?[c]:[]})),r=e.map((A,c)=\u003e({label:A,labelIndex:c})).filter(({label:A})=\u003eA.orientation===o.orientation\u0026\u0026A.mspConnectionPairIds.length===0\u0026\u0026swt(A,i,n)),s=new Set([t]);let a=!0;for(;a;){a=!1;for(const{label:A,labelIndex:c}of r)s.has(c)||[...s].some(l=\u003eB3o(yp(e[l]),yp(A),o.orientation)\u003c=I3o)\u0026\u0026(s.add(c),a=!0)}return{group:s,ownerChipIds:i}},v3o=({inputProblem:t,traces:e,netLabelPlacements:n,inlineNetLabelPlacements:o,netLabelConnectorTraceIds:i=new Set})=\u003e{const r=new Set(i),s=e.map(g=\u003e({...g,tracePath:g.tracePath.map(h=\u003e({...h}))})),a=n.map(g=\u003e({...g})),A=o.map(C3o),c=Kve(t),l=new Map;for(const g of t.chips)for(const h of g.pins)l.set(h.pinId,g.chipId);const u=new Set;for(let g=0;g\u003ca.length;g++){const h=a[g],d=x3o(h,A);if(d\u003c=X5||d\u003erwt)continue;const{group:p,ownerChipIds:m}=Q3o({triggerIndex:g,labels:a,chipIdByPinId:l}),_=new Map([...p].map(x=\u003e[x,d]));let f=!1;for(let x=0;x\u003ca.length;x++){let E=!1;for(const[B,S]of _){const Q=yp(Jle(a[B],h.orientation,S));for(let w=0;w\u003ca.length;w++){if(p.has(w))continue;const M=a[w],k=_.get(w)??0,R=yp(Jle(M,h.orientation,k));if(!Dc(Q,R))continue;if(!swt(M,m,l)||awt(M,s,r)===-1\u0026\u0026!Awt(M,s,c)){f=!0;break}const F=E3o(yp(M),Q,h.orientation);if(F\u003erwt||F\u003c=k+X5){f=!0;break}_.set(w,F),E=!0}if(f)break}if(f||!E)break}if(f)continue;const I=new Map;for(const[x,E]of _)I.set(x,Jle(a[x],h.orientation,E));const C=x=\u003eI.get(x)??a[x];for(const[x,E]of I){const B=yp(E);if(A.some(S=\u003eDc(B,S))){f=!0;break}if(t.chips.some(S=\u003eDc(B,{minX:S.center.x-S.width/2,maxX:S.center.x+S.width/2,minY:S.center.y-S.height/2,maxY:S.center.y+S.height/2}))||(t.textBoxes??[]).some(S=\u003eDc(B,fB(S)))){f=!0;break}if(a.some((S,Q)=\u003eQ!==x\u0026\u0026Dc(B,yp(C(Q))))){f=!0;break}if(s.some(S=\u003eS.globalConnNetId!==E.globalConnNetId\u0026\u0026Ej(S.tracePath,B))){f=!0;break}}if(f)continue;const y=[];for(const[x,E]of I){const B=a[x],S=awt(B,s,r);if(S===-1\u0026\u0026!Awt(B,s,c)){f=!0;break}const Q=S===-1?S3o({label:B,labelIndex:x,newAnchor:E.anchorPoint,pinMap:c}):b3o(s[S],B.anchorPoint,E.anchorPoint);if(s.some(M=\u003eM.globalConnNetId!==Q.globalConnNetId\u0026\u0026WH(Q.tracePath,M.tracePath,{includeTerminalSegments:!0}).length\u003e0)||A.some(M=\u003eEj(Q.tracePath,M))||t.chips.some(M=\u003e!m.has(M.chipId)\u0026\u0026Ej(Q.tracePath,{minX:M.center.x-M.width/2,maxX:M.center.x+M.width/2,minY:M.center.y-M.height/2,maxY:M.center.y+M.height/2}))||(t.textBoxes??[]).some(M=\u003eEj(Q.tracePath,fB(M)))||a.some((M,k)=\u003ek!==x\u0026\u0026Ej(Q.tracePath,yp(C(k))))){f=!0;break}y.push({labelIndex:x,connectorIndex:S,trace:Q})}if(!f){for(const[x,E]of I)a[x]=E,u.add(x);for(const x of y)r.add(x.trace.mspPairId),x.connectorIndex===-1?s.push(x.trace):s[x.connectorIndex]=x.trace}}return{traces:s,netLabelPlacements:a,movedLabelCount:u.size,netLabelConnectorTraceIds:r}},Wle=.05,w3o=5,P3o=t=\u003e{const[e,n]=t;return Math.abs(n.x-e.x)\u003e=Math.abs(n.y-e.y)?n.x\u003e=e.x?\"x+\":\"x-\":n.y\u003e=e.y?\"y+\":\"y-\"},lwe=t=\u003e{const e=t.axis===\"y\"?t.height:t.width,n=t.axis===\"y\"?t.width:t.height;return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},cwt=t=\u003e({minX:Math.min(...t.map(e=\u003ee.x)),maxX:Math.max(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxY:Math.max(...t.map(e=\u003ee.y))}),VN=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++)if(Dc(cwt([t[n],t[n+1]]),e))return!0;return!1},uwe=(t,e,n)=\u003e{switch(e){case\"x+\":return{x:t.x+n,y:t.y};case\"x-\":return{x:t.x-n,y:t.y};case\"y+\":return{x:t.x,y:t.y+n};case\"y-\":return{x:t.x,y:t.y-n}}},lwt=(t,e,n)=\u003e{const[o,i]=t.stubTracePath,r=uwe(i,e,n);return{...t,stubTracePath:[o,r],anchorPoint:uwe(t.anchorPoint,e,n),center:uwe(t.center,e,n)}},M3o=(t,e,n)=\u003e{switch(n){case\"x+\":return e.maxX-t.minX+Wle;case\"x-\":return t.maxX-e.minX+Wle;case\"y+\":return e.maxY-t.minY+Wle;case\"y-\":return t.maxY-e.minY+Wle}},D3o=({inputProblem:t,traces:e,anchoredNetLabelPlacements:n,inlineNetLabelPlacements:o})=\u003e{const i=new Map;for(const A of t.chips)for(const c of A.pins)i.set(c.pinId,A.chipId);const r=new Map;for(const[A,c]of o.entries()){if(!c.stubTracePath||c.pinIds.length!==1)continue;const l=P3o(c.stubTracePath),u=i.get(c.pinIds[0]),g=`${u??c.pinIds[0]}::${l}`,h=r.get(g)??[];h.push({placementIndex:A,placement:c,direction:l,ownerChipId:u}),r.set(g,h)}const s=[...o];let a=0;for(const A of r.values()){const c=new Set(A.map(({placementIndex:p})=\u003ep)),l=s.filter((p,m)=\u003e!c.has(m)),u=A[0].direction;let g=0;for(let p=0;p\u003c=n.length;p++){let m=0;for(const{placement:_}of A){const f=lwt(_,u,g),I=lwe(f);for(const C of n){if(C.globalConnNetId===_.globalConnNetId)continue;const y=yp(C);Dc(I,y)\u0026\u0026(m=Math.max(m,M3o(I,y,u)))}}if(m\u003c=0)break;g+=m}if(g\u003c=0||g\u003ew3o)continue;const h=A.map(({placement:p})=\u003elwt(p,u,g));if(!h.some((p,m)=\u003e{const f=A[m].placement.stubTracePath[1],I=p.stubTracePath[1],C=[f,I],y=lwe(p),x=A[m].ownerChipId;if(n.some(E=\u003e{if(E.globalConnNetId===p.globalConnNetId)return!1;const B=yp(E);return Dc(y,B)||VN(C,B)}))return!0;for(const E of t.chips){if(E.chipId===x)continue;const B={minX:E.center.x-E.width/2,maxX:E.center.x+E.width/2,minY:E.center.y-E.height/2,maxY:E.center.y+E.height/2};if(Dc(y,B)||VN(C,B))return!0}for(const E of t.textBoxes??[]){const B=fB(E);if(Dc(y,B)||VN(C,B))return!0}for(const E of e)if(E.globalConnNetId!==p.globalConnNetId\u0026\u0026(VN(E.tracePath,y)||VN(E.tracePath,cwt(C))))return!0;for(const E of l){const B=lwe(E);if(Dc(y,B)||VN(C,B)||E.stubTracePath\u0026\u0026VN(E.stubTracePath,y))return!0}return!1})){for(const[p,{placementIndex:m}]of A.entries())s[m]=h[p];a++}}return{inlineNetLabelPlacements:s,movedGroupCount:a}},gwe=(t,e)=\u003e{let n=e.width,o=e.height;\"axis\"in e\u0026\u0026e.axis===\"y\"\u0026\u0026(n=e.height,o=e.width);const i=Ey({center:e.center,width:n,height:o});for(let r=0;r\u003ct.length-1;r++)if(Exe(t[r],t[r+1],i))return!0;return!1},dwe=1e-6,uwt=t=\u003et.slice(1).reduce((e,n,o)=\u003e{const i=t[o];return e+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),N3o=(t,e)=\u003et.length===e.length\u0026\u0026t.every((n,o)=\u003eMath.abs(n.x-e[o].x)\u003c=dwe\u0026\u0026Math.abs(n.y-e[o].y)\u003c=dwe),R3o=(t,e)=\u003et.length\u003ce.length\u0026\u0026uwt(t)\u003c=uwt(e)+dwe,gwt=(t,e)=\u003e{const n=new Set;for(let o=0;o\u003ct.length-1;o++)for(let i=0;i\u003ce.length-1;i++){const r=V4(t[o],t[o+1],e[i],e[i+1]);r\u0026\u0026n.add(`${r.x.toFixed(6)},${r.y.toFixed(6)}`)}return n},dwt=(t,e,n)=\u003en.some(o=\u003e{const i=gwt(e,o);return[...gwt(t,o)].some(s=\u003e!i.has(s))}),T3o=({inputProblem:t,traces:e,netLabelPlacements:n,inlineNetLabelPlacements:o,completedReroutes:i})=\u003e{const r=[...e],s=new Set(o.map(c=\u003ec.globalConnNetId)),a=Hy(t);let A=0;for(const c of[...i].reverse()){if(!s.has(c.label.globalConnNetId))continue;const l=r.findIndex(I=\u003eI.mspPairId===c.initialTrace.mspPairId);if(l\u003c0)continue;const u=r[l],g=Qa(u.tracePath),h=Qa(c.reroutedTracePath);if(!N3o(g,h))continue;const d=Qa(c.initialTrace.tracePath);if(!R3o(d,g))continue;const p={...u,tracePath:d},m=r.filter(I=\u003eI.mspPairId!==u.mspPairId\u0026\u0026I.globalConnNetId!==u.globalConnNetId),_=o.filter(I=\u003eI.globalConnNetId!==u.globalConnNetId),f=_.flatMap(I=\u003eI.stubTracePath?[[...I.stubTracePath]]:[]);ON(d,a)||Jh({traces:[p],netLabels:n}).length\u003e0||_.some(I=\u003egwe(d,I))||nw(d,m)||wQt(d,f)||dwt(d,g,m.map(I=\u003eI.tracePath))||dwt(d,g,f)||!hj(n,[u],[p])||(r[l]=p,A++)}return{traces:r,restoredTraceCount:A}},hwe=.18,pwe=.05,jle=.05,k3o=.4,hwt=t=\u003eJSON.stringify([...t].sort()),pwt=t=\u003e{let e=0;for(let n=0;n\u003ct.tracePath.length-1;n++){const o=t.tracePath[n],i=t.tracePath[n+1];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},F3o=(t,e)=\u003et.size===e.size\u0026\u0026[...t].every(n=\u003ee.has(n)),mwe=t=\u003e{const e=t.axis===\"y\"?t.height:t.width,n=t.axis===\"y\"?t.width:t.height;return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},V7=t=\u003eJSON.stringify([t.globalConnNetId,[...t.pinIds].sort(),t.mspPairId??null]),L3o=(t,e)=\u003e{const n=jle-Qx,o={minX:Math.min(t[0].x,t[1].x)-n,maxX:Math.max(t[0].x,t[1].x)+n,minY:Math.min(t[0].y,t[1].y)-n,maxY:Math.max(t[0].y,t[1].y)+n};return tO(e.tracePath,o)},H3o=class E5n extends Ng{constructor(e){super(),this.input=e,this.netLabelConnectorTraceIds=e.netLabelConnectorTraceIds??new Set,this.inputProblem=e.inputProblem,this.traces=e.traces,this.inputNetLabelPlacements=e.netLabelPlacements,this.completedReroutes=e.completedReroutes??[],this.globalConnMap=mB(this.inputProblem).netConnMap,this.queuedConnections=[...this.inputProblem.directConnections.filter(n=\u003en.allowInlineNetLabel\u0026\u0026n.netId\u0026\u0026!this.inputProblem.netConnections.some(o=\u003eo.allowInlineNetLabel\u0026\u0026o.netId\u0026\u0026n.pinIds.every(i=\u003eo.pinIds.includes(i)))).map(n=\u003e({kind:\"direct_connection\",connection:n})),...this.inputProblem.netConnections.filter(n=\u003en.allowInlineNetLabel\u0026\u0026n.pinIds.length\u003e=1\u0026\u0026n.netId).map(n=\u003e({kind:\"net_connection\",connection:n}))],this.tracesByPinPairKey=new Map;for(const n of this.traces){if(this.netLabelConnectorTraceIds.has(n.mspPairId))continue;const o=hwt(n.pins.map(r=\u003er.pinId)),i=this.tracesByPinPairKey.get(o);i?i.push(n):this.tracesByPinPairKey.set(o,[n])}}input;inputProblem;traces;inputNetLabelPlacements;completedReroutes;inlineNetLabelPlacements=[];queuedConnections;netLabelConnectorTraceIds;tracesByPinPairKey;globalConnMap;inlineConversions=[];hasAlignedPortOnlyStubs=!1;postProcessedOutput;refinementComplete=!1;refinement;currentProposal;getConstructorParams(){return[{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.inputNetLabelPlacements,completedReroutes:this.completedReroutes,resolveTraceCollisions:this.input.resolveTraceCollisions,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds}]}_step(){const e=this.queuedConnections.shift();if(e){if(e.kind===\"net_connection\"\u0026\u0026e.connection.pinIds.length\u003e2){const i=[e.connection,...this.queuedConnections.filter(r=\u003er.kind===\"net_connection\"\u0026\u0026r.connection.pinIds.length\u003e2).map(r=\u003er.connection)];this.queuedConnections=this.queuedConnections.filter(r=\u003er.kind!==\"net_connection\"||r.connection.pinIds.length\u003c=2);for(const r of this.computeNetConnectionInlineConversions(i))this.inlineNetLabelPlacements.push(...r.placements),this.inlineConversions.push(r);return}const{connection:n}=e,o=n.pinIds.length===2?this.tracesByPinPairKey.get(hwt(n.pinIds))??[]:[];if(o.length\u003e0){const i=this.computeInlinePlacement({connection:n,trace:o[0],pinIds:n.pinIds});i\u0026\u0026this.inlineNetLabelPlacements.push(i)}else for(const i of n.pinIds){const r=this.computeTerminalInlinePlacement(n,i);r\u0026\u0026this.inlineNetLabelPlacements.push(r)}return}if(!this.hasAlignedPortOnlyStubs){this.inlineNetLabelPlacements=f3o({placements:this.inlineNetLabelPlacements,inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.inputNetLabelPlacements}),this.hasAlignedPortOnlyStubs=!0;return}if(!this.postProcessedOutput){this.postProcessedOutput=this.buildPostProcessedOutput();return}if(this.input.resolveTraceCollisions\u0026\u0026!this.refinementComplete){this.stepTraceRefinement();return}this.solved=!0,this.stats.inlineNetLabelCount=this.inlineNetLabelPlacements.length}computeNetConnectionInlineConversions(e){const n=new Map;for(const i of e){const r=new Set;for(const s of this.getNetConnectionComponents(i)){if(s.traces.length===0)continue;if(!s.traces.some(A=\u003e!!this.computeInlinePlacement({connection:i,trace:A,pinIds:s.pinIds})))for(const A of s.traces)r.add(A.mspPairId)}n.set(i,r)}let o=new Set([...n.values()].flatMap(i=\u003e[...i]));for(;;){const i=e.map(s=\u003e({connection:s,conversion:this.computeNetConnectionInlinePlacements(s,o,n.get(s)??new Set)})),r=new Set(i.flatMap(({conversion:s})=\u003es.flatMap(a=\u003e[...a.supersededTraceIds])));if(F3o(o,r))return i.flatMap(({conversion:s})=\u003es);o=r}}getNetConnectionComponents(e){const n=e.pinIds[0];if(!n)return[];const o=this.globalConnMap.getNetConnectedToId(n);if(!o)return[];const i=new Set(this.inputProblem.chips.flatMap(a=\u003ea.pins.map(A=\u003eA.pinId))),r=this.globalConnMap.getIdsConnectedToNet(o).filter(a=\u003ei.has(a)),s=new Set(e.pinIds);return xle({pinIds:r,traces:this.traces.filter(a=\u003e!this.netLabelConnectorTraceIds.has(a.mspPairId))}).map(a=\u003e({pinIds:a.pinIds,labeledPinIds:a.pinIds.filter(A=\u003es.has(A)),traces:a.traces.sort((A,c)=\u003epwt(c)-pwt(A))})).filter(a=\u003ea.labeledPinIds.length\u003e0)}getGlobalConnNetId(e){const n=e.pinIds[0];if(!n)return;const o=new Set(e.pinIds);return this.traces.find(i=\u003ei.pins.some(r=\u003eo.has(r.pinId)))?.globalConnNetId??this.inputNetLabelPlacements.find(i=\u003ei.netId===e.netId)?.globalConnNetId??this.globalConnMap.getNetConnectedToId(n)??void 0}computeNetConnectionInlinePlacements(e,n,o){const i=this.getNetConnectionComponents(e),r=this.getGlobalConnNetId(e);if(!r)return[];const s=[];for(const a of i){const A=a.traces.some(u=\u003eo.has(u.mspPairId));let c=null;if(!A){for(const u of a.traces)if(c=this.computeInlinePlacement({connection:e,trace:u,pinIds:a.pinIds,ignoredTraceIds:n}),c)break}if(c){s.push({globalConnNetId:r,placements:[c],supersededTraceIds:new Set});continue}if(a.traces.length\u003e0\u0026\u0026!A||a.labeledPinIds.length!==a.pinIds.length)continue;const l=a.pinIds.map(u=\u003ethis.computeTerminalInlinePlacement(e,u,r,n));l.some(u=\u003eu===null)||s.push({globalConnNetId:r,placements:l,supersededTraceIds:new Set(a.traces.map(u=\u003eu.mspPairId))})}return s}getInlineOffsets(e,n,o,i,r,s,a){const A=r/2+pwe,c=n===\"x\"?\"y\":\"x\",l=o===\"x+\"||o===\"y+\"?1:-1;let u=1/0;for(const g of s)if(!a.has(g.mspPairId))for(const h of iwt(g.tracePath)){if(h.axis!==n||Math.max(h.start[n],h.end[n])\u003c=e[n]-i/2||Math.min(h.start[n],h.end[n])\u003e=e[n]+i/2)continue;const d=l*(h.start[c]-e[c]);d\u003eQx\u0026\u0026(u=Math.min(u,d))}return u\u003er+Qx\u0026\u0026u/2\u003cA-Qx?[A,u/2]:[A]}computeTerminalInlinePlacement(e,n,o,i=new Set,r){if(!e.netId)return null;const s=this.inputNetLabelPlacements.find(y=\u003ey.netId===e.netId\u0026\u0026y.pinIds.length===1\u0026\u0026y.pinIds[0]===n),a=o??s?.globalConnNetId;if(!a)return null;const A=this.inputProblem.chips.find(y=\u003ey.pins.some(x=\u003ex.pinId===n)),c=A?.pins.find(y=\u003ey.pinId===n),l=e.inlineNetLabelHeight??hwe,u=e.netLabelText?.trim()||void 0,g=e.inlineNetLabelWidth??e.netLabelWidth??_wt(u??e.netId,l),h=Math.max(g+.2,.6);if(!c\u0026\u0026!s)return null;const d=c?{x:c.x,y:c.y}:s.anchorPoint,p=c\u0026\u0026A?c._facingDirection??W5(c,A):s.orientation,m=p===\"x+\"?{x:d.x+h,y:d.y}:p===\"x-\"?{x:d.x-h,y:d.y}:p===\"y+\"?{x:d.x,y:d.y+h}:{x:d.x,y:d.y-h},_=G3o({start:d,intendedEnd:m,minimumLength:g+2*pwe,traces:r?.traces??this.traces,ownGlobalConnNetId:a,ignoredTraceIds:i});if(!_)return null;const f=p===\"x+\"||p===\"x-\"?\"x\":\"y\",I={x:(d.x+_.x)/2,y:(d.y+_.y)/2},C=f===\"x\"?[\"y+\",\"y-\"]:[\"x-\",\"x+\"];for(const y of C)for(const x of this.getInlineOffsets(I,f,y,g,l,r?.traces??this.traces,i)){const E=y===\"y+\"?{x:I.x,y:I.y+x}:y===\"y-\"?{x:I.x,y:I.y-x}:y===\"x-\"?{x:I.x-x,y:I.y}:{x:I.x+x,y:I.y},B=g/2,S=l/2,Q=f===\"x\"?{minX:E.x-B,maxX:E.x+B,minY:E.y-S,maxY:E.y+S}:{minX:E.x-S,maxX:E.x+S,minY:E.y-B,maxY:E.y+B};if(!this.isObstructed(Q,{ownGlobalConnNetId:a,ignoredTraceIds:i,obstacles:r}))return{globalConnNetId:a,netId:e.netId,netLabelText:u,pinIds:[n],stubTracePath:[d,_],axis:f,anchorPoint:I,center:E,width:g,height:l,side:y}}return null}computeInlinePlacement({connection:e,trace:n,pinIds:o,ignoredTraceIds:i=new Set}){const r=iwt(n.tracePath);if(r.length===0)return null;const s=e.inlineNetLabelHeight??hwe,a=e.netLabelText?.trim()||void 0,A=e.inlineNetLabelWidth??e.netLabelWidth??_wt(a??e.netId,s),c=s/2+pwe,l=r.filter(g=\u003eg.length\u003e=A).sort((g,h)=\u003eh.length-g.length);for(const g of l){const h=g.axis===\"x\"?[\"y+\",\"y-\"]:[\"x-\",\"x+\"];for(const d of h)for(const p of O3o(g,A))for(const m of this.getInlineOffsets(p,g.axis,d,A,s,this.traces,i)){const _=d===\"y+\"?{x:p.x,y:p.y+m}:d===\"y-\"?{x:p.x,y:p.y-m}:d===\"x-\"?{x:p.x-m,y:p.y}:{x:p.x+m,y:p.y},f=A/2,I=s/2,C=g.axis===\"x\"?{minX:_.x-f,maxX:_.x+f,minY:_.y-I,maxY:_.y+I}:{minX:_.x-I,maxX:_.x+I,minY:_.y-f,maxY:_.y+f};if(!this.isObstructed(C,{ownTrace:n,ownGlobalConnNetId:n.globalConnNetId,ignoredTraceIds:i}))return{globalConnNetId:n.globalConnNetId,netId:e.netId,netLabelText:a,mspPairId:n.mspPairId,pinIds:[...o],axis:g.axis,anchorPoint:p,center:_,width:A,height:s,side:d}}}const u=this.computeSpanPlacement({trace:n,connection:e,netLabelText:a,width:A,height:s,offset:c,pinIds:o,ignoredTraceIds:i});return u||null}computeSpanPlacement({trace:e,connection:n,netLabelText:o,width:i,height:r,offset:s,pinIds:a,ignoredTraceIds:A}){const c=e.tracePath;if(c.length\u003c2)return null;let l=1/0,u=-1/0,g=1/0,h=-1/0;for(const S of c)l=Math.min(l,S.x),u=Math.max(u,S.x),g=Math.min(g,S.y),h=Math.max(h,S.y);const d=u-l,p=h-g,m=d\u003e=p?\"x\":\"y\",_=m===\"x\"?d:p;if((m===\"x\"?p:d)\u003ek3o||_\u003ci)return null;const y=((m===\"x\"?l:g)+(m===\"x\"?u:h))/2,x=(_-i)/2,E=[0];for(let S=.1;S\u003c=x+1e-9;S+=.1)E.push(S,-S);E.push(x,-x);const B=m===\"x\"?[\"y+\",\"y-\"]:[\"x-\",\"x+\"];for(const S of B)for(const Q of E){const w=y+Q,M=S===\"y+\"?{x:w,y:h+s}:S===\"y-\"?{x:w,y:g-s}:S===\"x-\"?{x:l-s,y:w}:{x:u+s,y:w},k=i/2,R=r/2,F=m===\"x\"?{minX:M.x-k,maxX:M.x+k,minY:M.y-R,maxY:M.y+R}:{minX:M.x-R,maxX:M.x+R,minY:M.y-k,maxY:M.y+k};if(this.isObstructed(F,{ownTrace:e,ownGlobalConnNetId:e.globalConnNetId,ignoredTraceIds:A}))continue;const O=m===\"x\"?{x:w,y:S===\"y+\"?h:g}:{x:S===\"x-\"?l:u,y:w};return{globalConnNetId:e.globalConnNetId,netId:n.netId,netLabelText:o,mspPairId:e.mspPairId,pinIds:[...a],axis:m,anchorPoint:O,center:M,width:i,height:r,side:S}}return null}isObstructed(e,{ownTrace:n,ownGlobalConnNetId:o,ignoredTraceIds:i=new Set,obstacles:r}){for(const s of this.inputProblem.chips){const a={minX:s.center.x-s.width/2,maxX:s.center.x+s.width/2,minY:s.center.y-s.height/2,maxY:s.center.y+s.height/2};if(Dc(e,a))return!0}for(const s of this.inputProblem.textBoxes??[])if(Dc(e,fB(s)))return!0;for(const s of r?.traces??this.traces)if(!i.has(s.mspPairId)\u0026\u0026!(n\u0026\u0026s.mspPairId===n.mspPairId)\u0026\u0026s.globalConnNetId!==o\u0026\u0026tO(s.tracePath,e))return!0;return!!(r?.anchored.some(s=\u003eDc(e,yp(s)))||r?.inline.some(s=\u003eDc(e,mwe(s))||s.stubTracePath\u0026\u0026s.globalConnNetId!==o\u0026\u0026tO(s.stubTracePath,e)))}getOutputTraces(e){const n=new Set(e.map(V7)),o=new Set(this.inlineConversions.filter(i=\u003ei.placements.every(r=\u003en.has(V7(r)))).flatMap(i=\u003e[...i.supersededTraceIds]));return this.traces.filter(i=\u003e!o.has(i.mspPairId)\u0026\u0026!(this.netLabelConnectorTraceIds.has(i.mspPairId)\u0026\u0026cwe(i,e)))}getBlockedInlinePlacements({inlineNetLabelPlacements:e,anchoredNetLabelPlacements:n,traces:o}){const i=new Set;for(const r of e){const s=mwe(r),a=n.some(u=\u003e{const g=yp(u);return Dc(s,g)||r.stubTracePath\u0026\u0026tO(r.stubTracePath,g)}),A=o.some(u=\u003eu.globalConnNetId!==r.globalConnNetId\u0026\u0026(tO(u.tracePath,s)||r.stubTracePath\u0026\u0026L3o(r.stubTracePath,u))),c=e.some(u=\u003eu!==r\u0026\u0026u.globalConnNetId!==r.globalConnNetId\u0026\u0026u.stubTracePath\u0026\u0026tO(u.stubTracePath,s)),l=e.some(u=\u003eu!==r\u0026\u0026Dc(s,mwe(u)));(a||A||c||l)\u0026\u0026i.add(V7(r))}for(const r of this.inlineConversions)if(r.placements.some(s=\u003ei.has(V7(s))))for(const s of r.placements)i.add(V7(s));return i}buildPostProcessedOutput(){let e=this.inlineNetLabelPlacements;for(;;){const n=this.inputNetLabelPlacements.filter(c=\u003e!cwe(c,e)),o=this.getOutputTraces(e),{fixedLabels:i,terminalTraces:r}=awe(this.inputProblem,e),s=new ewe({inputProblem:this.inputProblem,traces:[...o,...r],netLabelPlacements:n,fixedNetLabelPlacements:i,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds,useRenderedLabelBounds:e.length\u003e0});e.length\u003e0\u0026\u0026s.solve();const a=v3o({inputProblem:this.inputProblem,traces:o,netLabelPlacements:s.solved\u0026\u0026!s.failed?s.getOutput().netLabelPlacements:n,inlineNetLabelPlacements:e,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds});let A=this.getBlockedInlinePlacements({inlineNetLabelPlacements:e,anchoredNetLabelPlacements:a.netLabelPlacements,traces:a.traces});if(A.size\u003e0){const c=D3o({inputProblem:this.inputProblem,traces:a.traces,anchoredNetLabelPlacements:a.netLabelPlacements,inlineNetLabelPlacements:e});if(c.movedGroupCount\u003e0){e=c.inlineNetLabelPlacements;continue}const{terminalTraces:l}=awe(this.inputProblem,e),u=e.filter(d=\u003e!d.stubTracePath),g=e.filter(d=\u003ed.stubTracePath).sort((d,p)=\u003eNumber(A.has(V7(p)))-Number(A.has(V7(d))));for(const d of g){const p=[...this.inputProblem.netConnections,...this.inputProblem.directConnections].find(_=\u003e_.netId===d.netId\u0026\u0026_.allowInlineNetLabel),m=p?this.computeTerminalInlinePlacement(p,d.pinIds[0],d.globalConnNetId,new Set,{traces:[...a.traces,...l],anchored:a.netLabelPlacements,inline:u}):null;u.push(m??d)}const h=new Map(u.map(d=\u003e[V7(d),d]));e=e.map(d=\u003eh.get(V7(d))??d),A=this.getBlockedInlinePlacements({inlineNetLabelPlacements:e,anchoredNetLabelPlacements:a.netLabelPlacements,traces:a.traces})}if(A.size===0){this.inlineNetLabelPlacements=e,this.stats.pushedAnchoredNetLabelCount=a.movedLabelCount;const c=T3o({inputProblem:this.inputProblem,traces:a.traces,netLabelPlacements:a.netLabelPlacements,inlineNetLabelPlacements:e,completedReroutes:this.completedReroutes});this.stats.restoredSupersededLabelRerouteCount=c.restoredTraceCount;const l={traces:c.traces,netLabelConnectorTraceIds:a.netLabelConnectorTraceIds,netLabelPlacements:a.netLabelPlacements,inlineNetLabelPlacements:e};return this.inlineNetLabelPlacements=l.inlineNetLabelPlacements,l}e=e.filter(c=\u003e!A.has(V7(c)))}}*getTraceRefinementProposals(e){yield*ewt(this.inputProblem,e);for(const n of e.netLabelPlacements){if(n.pinIds.length!==1)continue;const o=[...this.inputProblem.netConnections,...this.inputProblem.directConnections].find(r=\u003er.allowInlineNetLabel\u0026\u0026r.netId===n.netId\u0026\u0026r.pinIds.includes(n.pinIds[0]));if(!o)continue;const i=this.computeTerminalInlinePlacement(o,n.pinIds[0],n.globalConnNetId,new Set,{traces:[],anchored:[],inline:[]});i\u0026\u0026(yield*ewt(this.inputProblem,e,[i]))}}createRefinementCandidate(e){const n=new Map(e.traces.map(s=\u003e[s.mspPairId,s])),o=s=\u003eJSON.stringify([s.globalConnNetId,[...s.pinIds].sort()]),i=new Map(e.netLabelPlacements.map(s=\u003e[o(s),s])),r=new Set(this.traces.map(s=\u003es.mspPairId));return new E5n({inputProblem:this.inputProblem,traces:[...this.traces.map(s=\u003en.get(s.mspPairId)??s),...e.traces.filter(s=\u003e!r.has(s.mspPairId))],netLabelPlacements:this.inputNetLabelPlacements.map(s=\u003ei.get(o(s))??s),completedReroutes:this.completedReroutes,netLabelConnectorTraceIds:e.netLabelConnectorTraceIds})}acceptRefinementCandidate(e,n){const o=this.postProcessedOutput,i=this.refinement.before,r=nwt(n);if(r.some(a=\u003e!i.some(A=\u003etwt(a,A))))return!1;const s=new Set(e.traces.filter((a,A)=\u003ea!==o.traces[A]).map(a=\u003ea.mspPairId));return r.some(a=\u003ea.kind===\"trace-label\"\u0026\u0026a.trace.kind===\"routed\"\u0026\u0026s.has(a.trace.id))||r.length\u003e=i.length\u0026\u0026n.inlineNetLabelPlacements.length\u003c=o.inlineNetLabelPlacements.length?!1:(this.postProcessedOutput=n,this.inlineNetLabelPlacements=n.inlineNetLabelPlacements,!0)}stepTraceRefinement(){if(this.activeSubSolver){if(this.activeSubSolver.step(),!this.activeSubSolver.solved\u0026\u0026!this.activeSubSolver.failed)return;this.activeSubSolver.solved\u0026\u0026!this.activeSubSolver.failed\u0026\u0026this.acceptRefinementCandidate(this.currentProposal,this.activeSubSolver.getOutput())\u0026\u0026(this.refinement=void 0),this.activeSubSolver=null,this.currentProposal=void 0;return}const e=this.postProcessedOutput;this.refinement||(this.refinement={proposals:this.getTraceRefinementProposals(e),queue:[],collecting:!0,before:nwt(e)});const n=this.refinement;if(n.collecting){const i=n.proposals.next();if(i.done)n.queue.sort((r,s)=\u003er.distance-s.distance),n.collecting=!1;else{const r=i.value.traces.reduce((s,a,A)=\u003es+a.tracePath.reduce((c,l,u)=\u003e{const g=e.traces[A].tracePath[u];return c+Math.abs(l.x-g.x)+Math.abs(l.y-g.y)},0),0);n.queue.push({output:i.value,distance:r})}return}const o=n.queue.shift();if(!o){this.refinementComplete=!0;return}this.currentProposal=o.output,this.activeSubSolver=this.createRefinementCandidate(o.output)}getOutput(){return this.postProcessedOutput?this.postProcessedOutput:this.buildPostProcessedOutput()}visualize(){return mwt({inputProblem:this.inputProblem,...this.getOutput()})}},mwt=({inputProblem:t,traces:e,netLabelPlacements:n,inlineNetLabelPlacements:o})=\u003e{const i=zh(t);i.lines??=[],i.rects??=[],i.points??=[],i.texts??=[];for(const r of e)i.lines.push({points:r.tracePath,strokeColor:\"purple\"});for(const r of n)i.rects.push({center:r.center,width:r.width,height:r.height,fill:Mc(r.globalConnNetId,.35),strokeColor:Mc(r.globalConnNetId,.9),label:`netId: ${r.netId}\nglobalConnNetId: ${r.globalConnNetId}`}),i.points.push({x:r.anchorPoint.x,y:r.anchorPoint.y,color:Mc(r.globalConnNetId,.9),label:`anchorPoint\norientation: ${r.orientation}`});for(const r of o){r.stubTracePath\u0026\u0026i.lines.push({points:r.stubTracePath,strokeColor:\"purple\"});const s=r.axis===\"x\";let a=r.width,A=r.height;s||(a=r.height,A=r.width),i.rects.push({center:r.center,width:a,height:A,fill:Mc(r.globalConnNetId,.35),strokeColor:\"green\",label:[`INLINE netId: ${r.netId}`,`axis: ${r.axis}`,`side: ${r.side}`].join(`\n`)});let c=r.center.x,l=r.center.y,u=\"center\",g;if(r.stubTracePath){const h=r.stubTracePath[0],d=r.stubTracePath[1];let p=r.width/2;d[r.axis]\u003eh[r.axis]?(p=-r.width/2,u=\"center_left\"):u=\"center_right\",r.axis===\"x\"?c+=p:l+=p}r.axis===\"y\"\u0026\u0026(g=90),i.texts.push({x:c,y:l,text:r.netLabelText??r.netId??\"\",color:\"green\",fontSize:r.height,anchorSide:u,rotation:g}),i.points.push({x:r.anchorPoint.x,y:r.anchorPoint.y,color:\"green\",label:`inline anchor\n${r.netLabelText??r.netId}`})}return i},_wt=(t,e=hwe)=\u003e{const n=e/.18;return t.length*.12*n+.12*n},O3o=(t,e,n=.1)=\u003e{const o=t.axis===\"x\"?\"x\":\"y\",i=t.start[o],r=t.end[o],s=(i+r)/2,a=Math.sign(r-i)||1,A=u=\u003et.axis===\"x\"?{x:u,y:t.start.y}:{x:t.start.x,y:t.start.y+(u-i)},c=t.length-e;if(c\u003c=0)return[A(s)];const l=[0];for(let u=n;u\u003c=c/2+1e-9;u+=n)l.push(u,-u);return l.push(c/2,-c/2),l.map(u=\u003eA(s+u*a))},tO=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1],r={minX:Math.min(o.x,i.x),maxX:Math.max(o.x,i.x),minY:Math.min(o.y,i.y),maxY:Math.max(o.y,i.y)};if(Dc(r,e))return!0}return!1},Qx=1e-6,G3o=({start:t,intendedEnd:e,minimumLength:n,traces:o,ownGlobalConnNetId:i,ignoredTraceIds:r})=\u003e{const s=Math.abs(e.x-t.x)\u003e=Math.abs(e.y-t.y),a=s?\"x\":\"y\",A=s?\"y\":\"x\",c=Math.sign(e[a]-t[a])||1,l=Math.abs(e[a]-t[a]);let u=l;for(const g of o)if(!r.has(g.mspPairId)\u0026\u0026g.globalConnNetId!==i)for(let h=0;h\u003cg.tracePath.length-1;h++){const d=g.tracePath[h],p=g.tracePath[h+1],m=(d[a]-t[a])*c,_=(p[a]-t[a])*c,f=d[A]-t[A],I=p[A]-t[A],C=Math.min(m,_),y=Math.max(m,_),x=Math.min(f,I),E=Math.max(f,I);let B;if(Math.abs(f)\u003c=Qx\u0026\u0026Math.abs(I)\u003c=Qx\u0026\u0026y\u003e=-Qx\u0026\u0026C\u003c=l+jle+Qx)B=Math.max(0,C);else{const Q=x\u003c=Qx\u0026\u0026E\u003e=-Qx,w=(m+_)/2;Q\u0026\u0026Math.abs(m-_)\u003c=Qx\u0026\u0026w\u003e=-Qx\u0026\u0026w\u003c=l+jle+Qx\u0026\u0026(B=Math.max(0,w))}B!==void 0\u0026\u0026(u=Math.min(u,B-jle))}return u+Qx\u003cn?null:s?{x:t.x+c*u,y:t.y}:{x:t.x,y:t.y+c*u}},nO=1e-6,fwt=({coordinate:t,segmentStartCoordinate:e,segmentEndCoordinate:n})=\u003et\u003eMath.min(e,n)+nO\u0026\u0026t\u003cMath.max(e,n)-nO,Y3o=({firstSegmentStart:t,firstSegmentEnd:e,secondSegmentStart:n,secondSegmentEnd:o})=\u003e{const i=Math.abs(t.y-e.y)\u003c=nO,r=Math.abs(t.x-e.x)\u003c=nO,s=Math.abs(n.y-o.y)\u003c=nO,a=Math.abs(n.x-o.x)\u003c=nO;let A,c;if(i)A=t,c=e;else if(s)A=n,c=o;else return!1;let l,u;if(r)l=t,u=e;else if(a)l=n,u=o;else return!1;return fwt({coordinate:l.x,segmentStartCoordinate:A.x,segmentEndCoordinate:c.x})\u0026\u0026fwt({coordinate:A.y,segmentStartCoordinate:l.y,segmentEndCoordinate:u.y})},Iwt=(t,e)=\u003e{for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)for(let s=0;s\u003cr.tracePath.length-1;s++){const a=r.tracePath[s],A=r.tracePath[s+1];if(X1(o,i,a,A)\u0026\u0026!Y3o({firstSegmentStart:o,firstSegmentEnd:i,secondSegmentStart:a,secondSegmentEnd:A}))return!0}}return!1},U3o=t=\u003e{const e={},n=new Map;for(const o of t.chips){e[o.chipId]=o;for(const i of o.pins)n.set(i.pinId,{...i,chipId:o.chipId,_facingDirection:i._facingDirection??W5(i,o)})}return{chipMap:e,pinMap:n}},Bj=1e-9,$le=(t,e)=\u003eMath.abs(t.y-e.y)\u003cBj,qle=(t,e)=\u003eMath.abs(t.x-e.x)\u003cBj,K3o=t=\u003et.filter((e,n)=\u003e{const o=t[n-1];return!o||Math.abs(e.x-o.x)\u003e=Bj||Math.abs(e.y-o.y)\u003e=Bj}),V3o=t=\u003e{if(t.length\u003c2||!t.every((e,n)=\u003e{const o=t[n+1];return o?$le(e,o)||qle(e,o):!0}))return!1;for(let e=0;e\u003ct.length-1;e++)for(let n=e+2;n\u003ct.length-1;n++)if($Qt(t[e],t[e+1],t[n],t[n+1]))return!1;return!0},z3o=t=\u003e{const e=[];for(let n=2;n\u003c=t.length-4;n++){const o=t[n-1],i=t[n],r=t[n+1],s=t[n+2],a=qle(i,r),A=$le(i,r);if(!a\u0026\u0026!A||a\u0026\u0026(!$le(o,i)||!$le(r,s))||A\u0026\u0026(!qle(o,i)||!qle(r,s)))continue;const c=a?[o.x,s.x]:[o.y,s.y];for(const l of c){if(Math.abs(l-(a?i.x:i.y))\u003cBj)continue;const u=t.map(h=\u003e({...h}));a?(u[n].x=l,u[n+1].x=l):(u[n].y=l,u[n+1].y=l);const g=K3o(u);V3o(g)\u0026\u0026e.push(g)}}return e},Cwt=({tracePath:t,globalConnNetId:e,otherTraces:n})=\u003en.reduce((o,i)=\u003eo+(i.globalConnNetId===e?0:vle(t,i.tracePath)),0),J3o=({tracePath:t,globalConnNetId:e,otherTraces:n,isCandidateValid:o})=\u003e{let i=t,r=Cwt({tracePath:t,globalConnNetId:e,otherTraces:n}),s=U7(t);for(const a of z3o(t)){if(!o(a))continue;const A=Cwt({tracePath:a,globalConnNetId:e,otherTraces:n}),c=U7(a);(A\u003cr||A===r\u0026\u0026c\u003cs)\u0026\u0026(i=a,r=A,s=c)}return i},W3o=\"net-label-to-trace-\",j3o=.05,ywt=.25,xwt=(t,e)=\u003e[t,e].sort().join(\"--\"),_we=(t,e)=\u003e{const n=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y);return n\u003e=o?o:n},$3o=(t,e)=\u003e{if(t._facingDirection!==e._facingDirection)return!1;const n=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y);return n\u003e=o?t._facingDirection===\"x+\"||t._facingDirection===\"x-\":t._facingDirection===\"y+\"||t._facingDirection===\"y-\"},q3o=class extends Ng{constructor(t){super(),this.input=t,this.inputProblem=t.inputProblem,this.outputTraces=[...t.traces],this.outputNetLabelPlacements=[...t.netLabelPlacements];const{chipMap:e,pinMap:n}=U3o(this.inputProblem);this.chipMap=e,this.pinMap=n,this.canRecoverParallelPair=DQt(this.inputProblem,mB(this.inputProblem).netConnMap,new Set(t.traces.filter(o=\u003eo.pinIds.length\u003e1).flatMap(o=\u003eo.pinIds))),this.queuedCandidates=this.buildCandidatePairs(),this.stats.candidateCount=this.queuedCandidates.length,this.stats.recoveredTraceCount=0}input;inputProblem;outputTraces;outputNetLabelPlacements;recoveredTraceIds=new Set;chipMap;pinMap;canRecoverParallelPair;queuedCandidates;currentCandidate=null;getConstructorParams(){return[this.input]}isPortOnlyFallbackLabel(t,e){return!(t.pinIds.length!==1||t.mspConnectionPairIds.length!==0||!t.netId||e.has(t.globalConnNetId))}isDirectConnectionLabel(t){if(!t.netId||t.pinIds.length!==1)return!1;const e=t.pinIds[0];return this.inputProblem.directConnections.some(n=\u003en.netId===t.netId\u0026\u0026n.pinIds.includes(e))}getMultiPinNetConnection(t){if(!t.netId||t.pinIds.length!==1)return;const e=t.pinIds[0];return this.inputProblem.netConnections.find(n=\u003en.isGround===!1\u0026\u0026n.pinIds.length\u003e2\u0026\u0026n.netId===t.netId\u0026\u0026n.pinIds.includes(e))}buildCandidatePairs(){const{netConnMap:t}=mB(this.inputProblem),e=new Set;for(const i of this.inputProblem.netConnections){if(!i.isGround)continue;const r=t.getNetConnectedToId(i.netId);r\u0026\u0026e.add(r)}const n=new Map;for(const i of this.input.netLabelPlacements){if(!this.isPortOnlyFallbackLabel(i,e)||!this.isDirectConnectionLabel(i)\u0026\u0026!this.getMultiPinNetConnection(i))continue;const r=n.get(i.globalConnNetId)??[];r.push(i),n.set(i.globalConnNetId,r)}const o=[];for(const i of n.values())for(let r=0;r\u003ci.length;r++)for(let s=r+1;s\u003ci.length;s++){const a=i[r],A=i[s],c=this.pinMap.get(a.pinIds[0]),l=this.pinMap.get(A.pinIds[0]);if(!c||!l||!this.canRecoverParallelPair(c,l))continue;const u=_we(c,l),g=this.isDirectConnectionLabel(a)\u0026\u0026this.isDirectConnectionLabel(A),h=this.getMultiPinNetConnection(a),d=this.getMultiPinNetConnection(A);!g\u0026\u0026(!h||h!==d||u\u003ej3o)||Zv(this.inputProblem,c,l)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:this.pinMap,p1:c,p2:l})||o.push({firstLabel:a,secondLabel:A,pins:[c,l],perpendicularOffset:u,routeDistance:Math.abs(c.x-l.x)+Math.abs(c.y-l.y),key:xwt(c.pinId,l.pinId),recoveryMode:\"fallback_labels\"})}return o.push(...this.buildRoutedComponentCandidates(e)),o.sort((i,r)=\u003ei.perpendicularOffset-r.perpendicularOffset||i.routeDistance-r.routeDistance||i.key.localeCompare(r.key)),o}buildRoutedComponentCandidates(t){const{netConnMap:e}=mB(this.inputProblem),n=[],o=new Set(this.inputProblem.directConnections);for(const i of[...this.inputProblem.netConnections.filter(r=\u003er.pinIds.length\u003e2\u0026\u0026r.isGround===!1),...this.inputProblem.directConnections]){const r=o.has(i),s=e.getNetConnectedToId(i.pinIds[0]);if(!s||r\u0026\u0026t.has(s))continue;let a=i.pinIds;r\u0026\u0026(a=[...this.pinMap.keys()].filter(c=\u003ee.getNetConnectedToId(c)===s));const A=xle({pinIds:a,traces:this.outputTraces.filter(c=\u003ec.globalConnNetId===s)}).filter(c=\u003ec.traces.length\u003e0);for(let c=0;c\u003cA.length;c++)for(let l=c+1;l\u003cA.length;l++){const u=A[c],g=A[l];if(r\u0026\u0026!(u.pinIds.includes(i.pinIds[0])\u0026\u0026g.pinIds.includes(i.pinIds[1])||u.pinIds.includes(i.pinIds[1])\u0026\u0026g.pinIds.includes(i.pinIds[0])))continue;const h=this.input.netLabelPlacements.find(f=\u003ef.globalConnNetId===s\u0026\u0026f.mspConnectionPairIds.length\u003e0\u0026\u0026f.pinIds.some(I=\u003eu.pinIds.includes(I))),d=this.input.netLabelPlacements.find(f=\u003ef.globalConnNetId===s\u0026\u0026f.mspConnectionPairIds.length\u003e0\u0026\u0026f.pinIds.some(I=\u003eg.pinIds.includes(I)));if(!h||!d||h===d||_we(h.anchorPoint,d.anchorPoint)\u003eywt)continue;let p,m=u.pinIds,_=g.pinIds;r\u0026\u0026(m=i.pinIds.filter(f=\u003eu.pinIds.includes(f)),_=i.pinIds.filter(f=\u003eg.pinIds.includes(f)));for(const f of m)for(const I of _){const C=this.pinMap.get(f),y=this.pinMap.get(I);if(!C||!y||!this.canRecoverParallelPair(C,y)||r\u0026\u0026C.chipId===y.chipId)continue;const x=_we(C,y);if(x\u003eywt||$3o(C,y)||Zv(this.inputProblem,C,y)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:this.pinMap,p1:C,p2:y}))continue;const E=Math.abs(C.x-y.x)+Math.abs(C.y-y.y);let B=\"routed_components\";r\u0026\u0026(B=\"routed_direct_connection\");const S={firstLabel:h,secondLabel:d,pins:[C,y],perpendicularOffset:x,routeDistance:E,key:xwt(C.pinId,y.pinId),recoveryMode:B,netConnectionPinIds:a};(!p||S.routeDistance\u003cp.routeDistance||S.routeDistance===p.routeDistance\u0026\u0026(S.perpendicularOffset\u003cp.perpendicularOffset||S.perpendicularOffset===p.perpendicularOffset\u0026\u0026S.key.localeCompare(p.key)\u003c0))\u0026\u0026(p=S)}p\u0026\u0026n.push(p)}}return n}isSupersededConnectorTrace(t,e){return!this.input.netLabelConnectorTraceIds?.has(t.mspPairId)||t.pinIds.length!==1?!1:e.pins.some(n=\u003en.pinId===t.pinIds[0])}routeIntersectsRemainingLabels(t,e){for(const n of this.outputNetLabelPlacements)if(!(n===e.firstLabel||n===e.secondLabel)\u0026\u0026gwe(t,n))return!0;return this.input.inlineNetLabelPlacements.some(n=\u003egwe(t,n))}tryAcceptCurrentRoute(){const t=this.currentCandidate;let e=this.activeSubSolver?.solvedTracePath;if(!t||!e)return;const n=this.outputTraces.filter(A=\u003e!this.isSupersededConnectorTrace(A,t));let o=n;if(t.recoveryMode!==\"fallback_labels\"\u0026\u0026(o=n.filter(A=\u003eA.globalConnNetId!==t.firstLabel.globalConnNetId)),Iwt(e,o)||this.routeIntersectsRemainingLabels(e,t))return;e=J3o({tracePath:e,globalConnNetId:t.firstLabel.globalConnNetId,otherTraces:o,isCandidateValid:A=\u003eHN(A,this.activeSubSolver.obstacles)===null\u0026\u0026!Iwt(A,o)\u0026\u0026!this.routeIntersectsRemainingLabels(A,t)});const[i,r]=t.pins,s=`${W3o}${t.key}`,a={mspPairId:s,dcConnNetId:t.firstLabel.globalConnNetId,globalConnNetId:t.firstLabel.globalConnNetId,pins:[i,r],tracePath:e,mspConnectionPairIds:[s],pinIds:[i.pinId,r.pinId]};this.recoveredTraceIds.add(s),this.outputTraces=[...n,a],t.recoveryMode!==\"routed_components\"\u0026\u0026(this.outputNetLabelPlacements=this.outputNetLabelPlacements.filter(A=\u003eA!==t.firstLabel\u0026\u0026A!==t.secondLabel)),this.stats.recoveredTraceCount++}areCandidatePinsAlreadyConnected(t){return t.netConnectionPinIds?xle({pinIds:t.netConnectionPinIds,traces:this.outputTraces}).some(e=\u003ee.pinIds.includes(t.pins[0].pinId)\u0026\u0026e.pinIds.includes(t.pins[1].pinId)):!1}_step(){if(this.activeSubSolver){this.activeSubSolver.step(),this.activeSubSolver.solved?(this.tryAcceptCurrentRoute(),this.activeSubSolver=null,this.currentCandidate=null):this.activeSubSolver.failed\u0026\u0026(this.activeSubSolver=null,this.currentCandidate=null);return}let t=this.queuedCandidates.shift();for(;t\u0026\u0026(!this.outputNetLabelPlacements.includes(t.firstLabel)||!this.outputNetLabelPlacements.includes(t.secondLabel)||this.areCandidatePinsAlreadyConnected(t));)t=this.queuedCandidates.shift();if(!t){this.solved=!0;return}this.currentCandidate=t,this.activeSubSolver=new VH({inputProblem:this.inputProblem,pins:t.pins,chipMap:this.chipMap})}getOutput(){return{traces:this.outputTraces,netLabelPlacements:this.outputNetLabelPlacements,inlineNetLabelPlacements:this.input.inlineNetLabelPlacements}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=mwt({inputProblem:this.inputProblem,...this.getOutput()});for(const e of this.outputTraces)this.recoveredTraceIds.has(e.mspPairId)\u0026\u0026t.lines.push({points:e.tracePath,strokeColor:\"green\",label:`recovered from net labels: ${e.pinIds.join(\" -\u003e \")}`});return t}};function sh(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved,shouldSkip:o.shouldSkip}}var Ewt=class extends Ng{getSolverName(){return\"SchematicTracePipelineSolver\"}mspConnectionPairSolver;schematicTraceLinesSolver;longDistancePairSolver;unroutedTraceRecoverySolver;traceOverlapShiftSolver;netLabelPlacementSolver;labelMergingSolver;traceLabelOverlapAvoidanceSolver;traceCleanupSolver;example28Solver;availableNetOrientationSolver;postLabelTraceOverlapShiftSolver;railNetLabelCornerPlacementSolver;traceAnchoredNetLabelOverlapSolver;preAlignmentNetLabelTraceCollisionSolver;netLabelTraceCollisionSolver;traceCleanupSolver2;netLabelNetLabelCollisionSolver;traceElbowTransitionSimplificationSolver;preAlignmentTraceElbowTransitionSimplificationSolver;finalTraceElbowTransitionSimplificationSolver;sameNetJunctionAlignmentSolver;inlineNetLabelSolver;netLabelToTraceSolver;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;firstIterationOfPhase;inputProblem;hideRatsNet;pipelineDef=[sh(\"mspConnectionPairSolver\",VIo,()=\u003e[{inputProblem:this.inputProblem}],{onSolved:t=\u003e{}}),sh(\"schematicTraceLinesSolver\",iCo,()=\u003e[{mspConnectionPairs:this.mspConnectionPairSolver.mspConnectionPairs,dcConnMap:this.mspConnectionPairSolver.dcConnMap,globalConnMap:this.mspConnectionPairSolver.globalConnMap,inputProblem:this.inputProblem,chipMap:this.mspConnectionPairSolver.chipMap}]),sh(\"longDistancePairSolver\",FCo,t=\u003e[{inputProblem:t.inputProblem,primaryMspConnectionPairs:t.mspConnectionPairSolver.mspConnectionPairs,alreadySolvedTraces:t.schematicTraceLinesSolver.solvedTracePaths,failedConnectionPairs:t.schematicTraceLinesSolver.failedConnectionPairs}],{onSolved:t=\u003e{}}),sh(\"unroutedTraceRecoverySolver\",Fxo,t=\u003e[{inputProblem:t.inputProblem,failedConnectionPairs:t.schematicTraceLinesSolver.failedConnectionPairs,alreadySolvedTraces:t.longDistancePairSolver.getOutput().allTracesMerged}]),sh(\"traceOverlapShiftSolver\",CQt,()=\u003e[{inputProblem:this.inputProblem,inputTracePaths:this.unroutedTraceRecoverySolver?.getOutput().allTracesMerged,globalConnMap:this.mspConnectionPairSolver.globalConnMap}],{onSolved:t=\u003e{}}),sh(\"netLabelPlacementSolver\",BQt,()=\u003e[{inputProblem:this.inputProblem,inputTraceMap:this.traceOverlapShiftSolver?.correctedTraceMap??Object.fromEntries(this.unroutedTraceRecoverySolver.getOutput().allTracesMerged.map(t=\u003e[t.mspPairId,t]))}],{onSolved:t=\u003e{}}),sh(\"traceLabelOverlapAvoidanceSolver\",wCo,t=\u003e{const e=t.traceOverlapShiftSolver?.correctedTraceMap??Object.fromEntries(t.unroutedTraceRecoverySolver.getOutput().allTracesMerged.map(i=\u003e[i.mspPairId,i])),n=Object.values(e),o=t.netLabelPlacementSolver.netLabelPlacements;return[{inputProblem:t.inputProblem,traces:n,netLabelPlacements:o}]}),sh(\"traceElbowTransitionSimplificationSolver\",swe,t=\u003e{const e=t.traceLabelOverlapAvoidanceSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,completedReroutes:e.completedReroutes,netLabelPlacements:t.traceLabelOverlapAvoidanceSolver.netLabelPlacements,paddingBuffer:.1}]}),sh(\"traceCleanupSolver\",avt,t=\u003e{const n=t.traceElbowTransitionSimplificationSolver.getOutput().traces,o=t.traceOverlapShiftSolver,i=new Set([...t.inputProblem.directConnections,...t.inputProblem.netConnections].filter(a=\u003ea.allowInlineNetLabel).map(a=\u003ea.netId)),r=new Set;for(let a=0;a\u003co.inputTracePaths.length;a++){const A=o.inputTracePaths[a],c=o.correctedTraceMap[A.mspPairId];for(let l=a+1;l\u003co.inputTracePaths.length;l++){const u=o.inputTracePaths[l];if(A.globalConnNetId===u.globalConnNetId||!i.has(A.userNetId??\"\")\u0026\u0026!i.has(u.userNetId??\"\"))continue;const g=o.correctedTraceMap[u.mspPairId],h=WH(A.tracePath,u.tracePath).length;WH(c.tracePath,g.tracePath).length\u003eh\u0026\u0026(r.add(A.mspPairId),r.add(u.mspPairId))}}const s=t.traceLabelOverlapAvoidanceSolver.labelMergingSolver.getOutput();return[{inputProblem:t.inputProblem,allTraces:n,allLabelPlacements:s.netLabelPlacements,mergedLabelNetIdMap:s.mergedLabelNetIdMap,paddingBuffer:.1,eligibleTraceIds:r}]}),sh(\"netLabelPlacementSolver\",BQt,t=\u003e{const e=t.traceCleanupSolver?.getOutput().traces??t.traceLabelOverlapAvoidanceSolver.getOutput().traces;return[{inputProblem:t.inputProblem,inputTraceMap:Object.fromEntries(e.map(n=\u003e[n.mspPairId,n]))}]}),sh(\"example28Solver\",A2o,t=\u003e{const e=t.traceCleanupSolver?.getOutput().traces??t.traceLabelOverlapAvoidanceSolver.getOutput().traces;return[{inputProblem:t.inputProblem,traces:e,netLabelPlacements:t.netLabelPlacementSolver.netLabelPlacements}]}),sh(\"availableNetOrientationSolver\",E2o,t=\u003e[{inputProblem:t.inputProblem,traces:t.example28Solver.outputTraces,netLabelPlacements:t.example28Solver.outputNetLabelPlacements}]),sh(\"postLabelTraceOverlapShiftSolver\",CQt,t=\u003e[{inputProblem:t.inputProblem,inputTracePaths:t.availableNetOrientationSolver.traces,globalConnMap:t.mspConnectionPairSolver.globalConnMap,traceIdsToShift:new Set(t.availableNetOrientationSolver.netLabelConnectorTraceIds)}]),sh(\"railNetLabelCornerPlacementSolver\",M2o,t=\u003e[{inputProblem:t.inputProblem,traces:Object.values(t.postLabelTraceOverlapShiftSolver.correctedTraceMap),netLabelPlacements:t.availableNetOrientationSolver.outputNetLabelPlacements}]),sh(\"traceAnchoredNetLabelOverlapSolver\",pxo,t=\u003e[{inputProblem:t.inputProblem,traces:t.railNetLabelCornerPlacementSolver.getOutput().traces,netLabelPlacements:t.railNetLabelCornerPlacementSolver.outputNetLabelPlacements}]),sh(\"preAlignmentNetLabelTraceCollisionSolver\",Nvt,t=\u003e[{inputProblem:t.inputProblem,traces:t.railNetLabelCornerPlacementSolver.getOutput().traces,netLabelPlacements:t.traceAnchoredNetLabelOverlapSolver.outputNetLabelPlacements}]),sh(\"preAlignmentTraceElbowTransitionSimplificationSolver\",swe,t=\u003e{const e=t.preAlignmentNetLabelTraceCollisionSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,completedReroutes:e.completedReroutes,netLabelPlacements:e.netLabelPlacements,paddingBuffer:.1}]}),sh(\"traceCleanupSolver2\",avt,t=\u003e{const e=t.preAlignmentTraceElbowTransitionSimplificationSolver.getOutput(),n=t.traceLabelOverlapAvoidanceSolver.labelMergingSolver.getOutput();return[{inputProblem:t.inputProblem,allTraces:e.traces,allLabelPlacements:e.netLabelPlacements,mergedLabelNetIdMap:n.mergedLabelNetIdMap,paddingBuffer:.1,operations:[\"rerouting_generated_net_label_connector_crossings\",\"aligning_same_net_rails\"],eligibleTraceIds:new Set(t.traceCleanupSolver.getOutput().traces.map(o=\u003eo.mspPairId)),netLabelConnectorTraceIds:t.availableNetOrientationSolver.netLabelConnectorTraceIds}]}),sh(\"netLabelTraceCollisionSolver\",Nvt,t=\u003e{const e=t.preAlignmentNetLabelTraceCollisionSolver.getOutput(),n=t.traceCleanupSolver2.getOutput(),o=kyo({originalTraces:e.traces,reroutedTraces:n.traces,netLabelPlacements:e.netLabelPlacements}),i=new Map(e.traces.map(s=\u003e[s.mspPairId,s]));let r=o.netLabelPlacements;for(const s of o.traces){const a=i.get(s.mspPairId);if(!a||a.tracePath===s.tracePath)continue;const A=r;r=jH({trace:a,originalTracePath:a.tracePath,reroutedTracePath:s.tracePath,netLabelPlacements:A}).map((l,u)=\u003e{const g=A[u];return g.orientation===\"y+\"||g.orientation===\"y-\"?l:g})}return[{inputProblem:t.inputProblem,traces:o.traces,netLabelPlacements:r}]}),sh(\"finalTraceElbowTransitionSimplificationSolver\",swe,t=\u003e{const e=t.netLabelTraceCollisionSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,completedReroutes:e.completedReroutes,netLabelPlacements:e.netLabelPlacements,paddingBuffer:.1}]}),sh(\"netLabelNetLabelCollisionSolver\",ewe,t=\u003e{const e=t.finalTraceElbowTransitionSimplificationSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,netLabelPlacements:e.netLabelPlacements}]}),sh(\"sameNetJunctionAlignmentSolver\",u3o,t=\u003e{const e=t.netLabelNetLabelCollisionSolver.getOutput();return[{inputProblem:t.inputProblem,traces:t.netLabelNetLabelCollisionSolver.traces,netLabelPlacements:e.netLabelPlacements,netLabelConnectorTraceIds:t.availableNetOrientationSolver.netLabelConnectorTraceIds}]}),sh(\"inlineNetLabelSolver\",H3o,t=\u003e{const e=t.sameNetJunctionAlignmentSolver.getOutput(),n=[...t.traceLabelOverlapAvoidanceSolver.getOutput().completedReroutes,...t.preAlignmentNetLabelTraceCollisionSolver.getOutput().completedReroutes,...t.netLabelTraceCollisionSolver.getOutput().completedReroutes];return[{inputProblem:t.inputProblem,traces:e.traces,netLabelPlacements:e.netLabelPlacements,completedReroutes:n,resolveTraceCollisions:!0,netLabelConnectorTraceIds:t.availableNetOrientationSolver.netLabelConnectorTraceIds}]}),sh(\"netLabelToTraceSolver\",q3o,t=\u003e{const e=t.inlineNetLabelSolver.getOutput();return[{inputProblem:t.inputProblem,...e}]})];constructor(t,e){super(),this.hideRatsNet=e?.hideRatsNet??!1,this.inputProblem=this.cloneAndCorrectInputProblem(t),this.MAX_ITERATIONS=1e6,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={},this.firstIterationOfPhase={}}getConstructorParams(){return[this.inputProblem,{hideRatsNet:this.hideRatsNet}]}currentPipelineStepIndex=0;cloneAndCorrectInputProblem(t){const e=structuredClone({...t,_chipObstacleSpatialIndex:void 0,_hideRatsNet:this.hideRatsNet});return MCo(e),PCo(e),e}_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t){this.solved=!0;return}if(this.activeSubSolver){this.activeSubSolver.step(),this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now(),this.firstIterationOfPhase[t.solverName]=this.iterations}solveUntilPhase(t){for(;this.getCurrentPhase().toLowerCase()!==t.toLowerCase();)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??\"none\"}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();const t=[zh(this.inputProblem,{hideRatsNet:this.hideRatsNet}),...this.pipelineDef.map(n=\u003ethis[n.solverName]?.visualize()).filter(Boolean).map((n,o)=\u003e{for(const i of n.rects??[])i.step=o;for(const i of n.points??[])i.step=o;for(const i of n.circles??[])i.step=o;for(const i of n.texts??[])i.step=o;for(const i of n.lines??[])i.step=o;return n})];if(t.length===1)return t[0];const e={points:t.flatMap(n=\u003en.points||[]),rects:t.flatMap(n=\u003en.rects||[]),lines:t.flatMap(n=\u003en.lines||[]),circles:t.flatMap(n=\u003en.circles||[]),texts:t.flatMap(n=\u003en.texts||[])};return dCo(e,this.inputProblem),e}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}},Bwt={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:\"auto\",width:void 0,height:void 0},bwt=class{id;metadata;size={width:0,height:0};position={x:0,y:0};style;constructor(t={}){this.style={...Bwt,...t},this.id=t.id,this.metadata=t.metadata}},X3o=class extends bwt{build(){}},Swt=class Cit extends bwt{children=[];direction=\"row\";columnGap=0;rowGap=0;justifyContent=\"flex-start\";alignItems=\"stretch\";constructor(e,n,o={}){super({}),this.size.width=e,this.size.height=n,this.id=o.id,Object.assign(this,o)}addChild(e,n){if(e instanceof Cit){const i=e;return n\u0026\u0026(i.style={...Bwt,...n}),this.children.push(i),i}const o=new X3o(e);return this.children.push(o),o}build(){const e=this.direction.startsWith(\"row\"),n=e?\"width\":\"height\",o=e?\"height\":\"width\",i=e?this.columnGap:this.rowGap;e?this.rowGap:this.columnGap;const r=i*Math.max(0,this.children.length-1),s=this.size[n],a=this.size[o];let A=0,c=0,l=0;for(const C of this.children)A+=C.style.flexBasis,c+=C.style.flexGrow,l+=C.style.flexShrink;const u=s-A-r;for(const C of this.children){let y=C.style.flexBasis;u\u003e0\u0026\u0026c\u003e0?y+=u*C.style.flexGrow/c:u\u003c0\u0026\u0026l\u003e0\u0026\u0026(y+=u*C.style.flexShrink/l,y\u003c0\u0026\u0026(y=0)),C.size[n]=y;const x=C.style.alignSelf!==\"auto\"?C.style.alignSelf:this.alignItems,E=e?C.style.height:C.style.width;E!==void 0?C.size[o]=E:x===\"stretch\"\u0026\u0026(C.size[o]=a)}const g=this.children.reduce((C,y)=\u003eC+y.size[n],0)+r,h=s-g;let d=0,p=i;const m=this.children.length;switch(this.justifyContent){case\"flex-start\":break;case\"flex-end\":d=h;break;case\"center\":d=h/2;break;case\"space-between\":p=m\u003e1?i+h/(m-1):0;break;case\"space-around\":p=i+h/m,d=p/2;break;case\"space-evenly\":p=i+h/(m+1),d=p;break}const _=this.direction.endsWith(\"reverse\")?[...this.children].reverse():this.children;let f=d;for(const C of _)e?(C.position.x=this.direction===\"row\"?f:s-f-C.size.width,C.position.y=I(C,o,a,this.alignItems)):(C.position.y=this.direction===\"column\"?f:s-f-C.size.height,C.position.x=I(C,o,a,this.alignItems)),f+=C.size[n]+p;for(const C of this.children)C instanceof Cit\u0026\u0026C.build();function I(C,y,x,E){switch(C.style.alignSelf!==\"auto\"?C.style.alignSelf:E){case\"flex-start\":return 0;case\"flex-end\":return x-C.size[y];case\"center\":return(x-C.size[y])/2;default:return 0}}}},Qwt=class extends Swt{constructor(t,e,n={}){super(t,e,n)}getLayout(){this.build();const t={};return this._collectLayout(this,t),t}_collectLayout(t,e,n={counter:0}){for(const o of t.children){const i=o.id??`_$${n.counter++}`;e[i]={position:o.position,size:o.size},o instanceof Swt\u0026\u0026this._collectLayout(o,e,n)}}},vwt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20].map(t=\u003e`hsl(${t*360/21}deg, 100%, 50%)`),Z3o=t=\u003e{let e=0;for(let n=0;n\u003ct.length;n++)e=(e\u003c\u003c5)-e+t.charCodeAt(n);return e},wwt=t=\u003evwt[Math.abs(Z3o(t))%vwt.length],eEo=t=\u003e{const e=d=\u003ed?typeof d==\"string\"?d:d.join(\" \"):void 0,n=[\"display:grid\",\"background-color:gray\"],{gridTemplateRows:o,gridTemplateColumns:i,gap:r,justifyItems:s,alignItems:a,containerWidth:A,containerHeight:c}=t.opts,l=e(o);l\u0026\u0026n.push(`grid-template-rows:${l}`);const u=e(i);if(u\u0026\u0026n.push(`grid-template-columns:${u}`),r!==void 0)if(typeof r==\"number\")n.push(`gap:${r}px`);else{const[d,p]=r;n.push(`row-gap:${d}px`,`column-gap:${p}px`)}s\u0026\u0026n.push(`justify-items:${s}`),a\u0026\u0026n.push(`align-items:${a}`),A!=null\u0026\u0026n.push(`width:${A}px`),c!=null\u0026\u0026n.push(`height:${c}px`);const g=n.join(\";\"),h=t.opts.children.map(d=\u003e{const p=[\"display:flex\",`background-color:${wwt(d.key)}`];if(d.area)p.push(`grid-area:${d.area}`);else{if(typeof d.row==\"string\"\u0026\u0026d.row.includes(\"/\"))p.push(`grid-row:${d.row}`);else{const I=d.rowStart??d.row,C=d.rowEnd,y=d.rowSpan;I!==void 0||C!==void 0?I!==void 0\u0026\u0026C!==void 0?p.push(`grid-row:${I} / ${C}`):I!==void 0?y!==void 0?p.push(`grid-row:${I} / span ${y}`):p.push(`grid-row-start:${I}`):p.push(`grid-row-end:${C}`):y!==void 0\u0026\u0026p.push(`grid-row:auto / span ${y}`)}if(typeof d.column==\"string\"\u0026\u0026d.column.includes(\"/\"))p.push(`grid-column:${d.column}`);else{const I=d.columnStart??d.column,C=d.columnEnd,y=d.columnSpan;I!==void 0||C!==void 0?I!==void 0\u0026\u0026C!==void 0?p.push(`grid-column:${I} / ${C}`):I!==void 0?y!==void 0?p.push(`grid-column:${I} / span ${y}`):p.push(`grid-column-start:${I}`):p.push(`grid-column-end:${C}`):y!==void 0\u0026\u0026p.push(`grid-column:auto / span ${y}`)}}const m=p.join(\";\"),_=[\"font-size: 7px\"];if(d.contentWidth!==void 0){const I=typeof d.contentWidth==\"string\"?d.contentWidth:`${d.contentWidth}px`;_.push(`width:${I}`)}else _.push(`width:${d.key.length*5}px`);if(d.contentHeight!==void 0){const I=typeof d.contentHeight==\"string\"?d.contentHeight:`${d.contentHeight}px`;_.push(`height:${I}`)}const f=_.join(\";\");return` \u003cdiv id=\"${d.key}\" style=\"${m}\"\u003e\u003cdiv style=\"${f}\"\u003e${d.key}\u003c/div\u003e\u003c/div\u003e`});return`\u003cdiv style=\"${g}\"\u003e\n${h.join(`\n`)}\n\u003c/div\u003e`},tEo=t=\u003e{const e=t.layout(),n={title:\"CssGrid\",coordinateSystem:\"screen\",lines:[],circles:[],points:[],rects:[],texts:[]},{cells:o}=e;for(const i of o){const{x:r,y:s,width:a,height:A,key:c}=i;n.rects.push({center:{x:r+a/2,y:s+A/2},width:a,height:A,fill:wwt(c),label:c})}return n};function Xle(t){return t.replace(/repeat\\((\\d+),\\s*([^)]+)\\)/g,(e,n,o)=\u003eArray(Number(n)).fill(o.trim()).join(\" \"))}function Zle(t){return t.trim().split(/\\s+/).filter(Boolean)}function Pwt(t){return t?Zle(Xle(t)).length:0}function Mwt(t,e){if(t===\"auto\")return{fr:1};if(t.endsWith(\"%\")){const o=parseFloat(t);return e!=null?e*o/100:0}if(t.endsWith(\"px\"))return parseFloat(t);if(t.endsWith(\"em\"))return parseFloat(t)*16;if(t.endsWith(\"fr\"))return{fr:parseFloat(t)};const n=parseFloat(t);return Number.isNaN(n)?0:n}function Dwt(t,e){return t\u003e0?t:e+2+t}var nEo=t=\u003e{const e=t.opts,n=e.children;let o,i;if(\"gridTemplate\"in e\u0026\u0026typeof e.gridTemplate==\"string\"){const[x,E]=e.gridTemplate.split(\"/\");o=x?.trim(),i=E?.trim()}else o=typeof e.gridTemplateRows==\"string\"?e.gridTemplateRows:void 0,i=typeof e.gridTemplateColumns==\"string\"?e.gridTemplateColumns:void 0;const r=Pwt(i),s=Pwt(o);function a(x,E,B,S){if(!x)return 0;const Q=Xle(x),w=Zle(Q),M=w.length;let k=0;for(let F=0;F\u003cw.length;F++){const O=w[F];if(O.endsWith(\"px\"))k+=parseFloat(O);else if(O.endsWith(\"em\"))k+=parseFloat(O)*16;else if(O.endsWith(\"fr\")||O===\"auto\"){let U=0;for(const Y of E){const W=B?Y.columnStart||Y.column:Y.rowStart||Y.row,te=B?Y.columnSpan||1:Y.rowSpan||1,j=B?Y.contentWidth:Y.contentHeight,J=(typeof W==\"number\"?W:parseInt(W||\"1\"))-1,oe=typeof te==\"number\"?te:parseInt(te.toString());if(J\u003c=F\u0026\u0026F\u003cJ+oe\u0026\u0026j){const ie=typeof j==\"string\"\u0026\u0026j.endsWith(\"px\")?parseFloat(j):typeof j==\"number\"?j:0;U=Math.max(U,ie/oe)}}k+=U}}const R=S*(M-1);return k+R}function A(x,E,B,S=!0,Q=1){if(!x)return[];if(E==null){const j=Xle(x),J=Zle(j),oe=J.length,ie=ge=\u003ege===void 0?0:typeof ge==\"number\"?ge:(ge.endsWith(\"px\"),parseFloat(ge)),ne=new Array(oe).fill(0);let le=0;for(const ge of n){const _e=S?typeof ge.columnSpan==\"number\"?ge.columnSpan:ge.columnSpan?parseInt(ge.columnSpan.toString()):1:typeof ge.rowSpan==\"number\"?ge.rowSpan:ge.rowSpan?parseInt(ge.rowSpan.toString()):1,ue=S?ge.contentWidth:ge.contentHeight,fe=ie(ue)/_e;let pe;S?(ge.columnStart!==void 0||ge.column!==void 0)\u0026\u0026(pe=parseInt(ge.columnStart??ge.column)-1):(ge.rowStart!==void 0||ge.row!==void 0)\u0026\u0026(pe=parseInt(ge.rowStart??ge.row)-1),(pe===void 0||Number.isNaN(pe))\u0026\u0026(S?pe=le%oe:pe=Math.floor(le/Q),le+=_e);for(let ye=0;ye\u003c_e\u0026\u0026pe+ye\u003coe;ye++)ne[pe+ye]=Math.max(ne[pe+ye],fe)}return J.forEach((ge,_e)=\u003e{const ue=Mwt(ge,void 0);typeof ue==\"number\"\u0026\u0026(ne[_e]=ue)}),ne}const w=Xle(x),M=Zle(w),k=M.length;let R=E;R==null\u0026\u0026(R=a(x,n,S,B));const F=R-B*(k-1);let O=0,U=0;const Y=[],W=[];M.forEach((j,J)=\u003e{const oe=Mwt(j,F);typeof oe==\"number\"?(W.push(oe),O+=oe):oe\u0026\u0026typeof oe==\"object\"\u0026\u0026\"fr\"in oe?(W.push(oe),U+=oe.fr,Y.push({idx:J,fr:oe.fr})):(W.push(0),O+=0)});const te=Math.max(F-O,0);return W.map(j=\u003etypeof j==\"number\"?j:U\u003e0?te/U*j.fr:0)}const c=typeof e.gap==\"number\"?e.gap:Array.isArray(e.gap)?e.gap[0]:0,l=typeof e.gap==\"number\"?e.gap:Array.isArray(e.gap)?e.gap[1]:0,u=A(o,e.containerHeight,c,!1,r||1),g=A(i,e.containerWidth,l,!0,s||1),h=u.length;let d=g.length;d===0\u0026\u0026n.length\u003e0\u0026\u0026(d=1);const p=[];let m=0;for(const x of n){let E=x.rowStart!==void 0?x.rowStart:x.row,B=x.columnStart!==void 0?x.columnStart:x.column,S=x.rowSpan!==void 0?typeof x.rowSpan==\"string\"?parseInt(x.rowSpan):x.rowSpan:1,Q=x.columnSpan!==void 0?typeof x.columnSpan==\"string\"?parseInt(x.columnSpan):x.columnSpan:1;if(x.rowEnd!==void 0){const k=typeof x.rowEnd==\"string\"?parseInt(x.rowEnd):x.rowEnd;E!==void 0?S=k-(typeof E==\"string\"?parseInt(E):E):E=k-S}if(x.columnEnd!==void 0){const k=typeof x.columnEnd==\"string\"?parseInt(x.columnEnd):x.columnEnd;B!==void 0?Q=k-(typeof B==\"string\"?parseInt(B):B):B=k-Q}if(typeof E==\"string\"\u0026\u0026(E=parseInt(E)),typeof B==\"string\"\u0026\u0026(B=parseInt(B)),typeof E==\"number\"\u0026\u0026E\u003c0\u0026\u0026(E=Dwt(E,h)),typeof B==\"number\"\u0026\u0026B\u003c0\u0026\u0026(B=Dwt(B,d)),E===void 0\u0026\u0026B!==void 0)E=1;else if(B===void 0\u0026\u0026E!==void 0)B=1;else if(E===void 0\u0026\u0026B===void 0){const k=m;E=Math.floor(k/d)+1,B=k%d+1}const w=E-1,M=B-1;S=Math.max(1,S),Q=Math.max(1,Q),p.push({key:x.key,row:w,column:M,rowSpan:S,columnSpan:Q,x:0,y:0,width:0,height:0}),m+=Q}let _=u.length,f=g.length;for(const x of p)x.row+x.rowSpan\u003e_\u0026\u0026(_=x.row+x.rowSpan),x.column+x.columnSpan\u003ef\u0026\u0026(f=x.column+x.columnSpan);if(u.length===0\u0026\u0026_\u003e0\u0026\u0026e.containerHeight){const x=_,B=(e.containerHeight-c*(x-1))/x;for(let S=0;S\u003cx;S++)u.push(B)}else for(;u.length\u003c_;)u.push(0);if(g.length===0\u0026\u0026f\u003e0\u0026\u0026e.containerWidth){const x=f,B=(e.containerWidth-l*(x-1))/x;for(let S=0;S\u003cx;S++)g.push(B)}else if(g.length===0\u0026\u0026n.length\u003e0\u0026\u0026e.containerWidth)g.push(e.containerWidth);else for(;g.length\u003cf;)g.push(0);const I=(x,E,B)=\u003e{let S=0;for(let Q=0;Q\u003cx;Q++)S+=E[Q]||0,S+=B;return S},C=(x,E,B,S)=\u003e{let Q=0;for(let w=x;w\u003cx+E;w++)Q+=B[w]||0,w\u003ex\u0026\u0026(Q+=S);return Q},y={};for(const x of p){const E=n.find(W=\u003eW.key===x.key),B=I(x.column,g,l),S=I(x.row,u,c),Q=C(x.column,x.columnSpan,g,l),w=C(x.row,x.rowSpan,u,c),M=W=\u003eW===void 0?0:typeof W==\"string\"?W.endsWith(\"px\")?parseFloat(W):W.endsWith(\"%\")?0:parseFloat(W):W,k=M(E?.contentWidth),R=M(E?.contentHeight);let F=Q,O=w,U=B,Y=S;if(k\u003e0)switch(F=k,e.justifyItems||\"stretch\"){case\"start\":U=B;break;case\"end\":U=B+Q-F;break;case\"center\":U=B+(Q-F)/2;break;case\"stretch\":F=Q,U=B;break}if(R\u003e0)switch(O=R,e.alignItems||\"stretch\"){case\"start\":Y=S;break;case\"end\":Y=S+w-O;break;case\"center\":Y=S+(w-O)/2;break;case\"stretch\":O=w,Y=S;break}x.x=U,x.y=Y,x.width=F,x.height=O,y[x.key]={x:U,y:Y,width:F,height:O}}return{cells:p,rowSizes:u,columnSizes:g,rowGap:c,columnGap:l,itemCoordinates:y}},oEo=class{opts;constructor(t){this.opts=t}layout(){return nEo(this)}convertToHtml(){return eEo(this)}visualize(){return tEo(this)}},iEo=Object.defineProperty,Nwt=Object.getOwnPropertySymbols,rEo=Object.prototype.hasOwnProperty,sEo=Object.prototype.propertyIsEnumerable,Rwt=(t,e,n)=\u003ee in t?iEo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Twt=(t,e)=\u003e{for(var n in e||(e={}))rEo.call(e,n)\u0026\u0026Rwt(t,n,e[n]);if(Nwt)for(var n of Nwt(e))sEo.call(e,n)\u0026\u0026Rwt(t,n,e[n]);return t},aEo=t=\u003e{switch(t){case\"left\":return{x:-1,y:0};case\"right\":return{x:1,y:0};case\"top\":return{x:0,y:1};case\"bottom\":return{x:0,y:-1}}},AEo=t=\u003e{var e,n;const o=Xc(t).schematic_component.list(),i=Xc(t).schematic_net_label.list(),r=Xc(t).schematic_port.list(),s={};for(const a of o){const A=Xc(t).source_component.get(a.source_component_id);s[a.schematic_component_id]=A?.name}for(const a of i){const A=Xc(t).source_net.get(a.source_net_id);if(!A?.name)continue;let c=0;for(;Object.values(s).includes(`NL_${A.name}${c}`);)c++;s[a.schematic_net_label_id]=`NL_${A.name}${c}`}for(const a of r){const A=Xc(t).source_port.get(a.source_port_id);if(!A)continue;const c=Xc(t).source_component.get(A.source_component_id);if(!c?.name)continue;const l=`${c.name}_${(n=(e=A?.name)!=null?e:A?.pin_number)!=null?n:\"\"}`;s[a.schematic_port_id]=l}return s},cEo=t=\u003e{var e;const n=Xc(t),o=new Set(n.schematic_net_label.list().map(r=\u003e{var s,a,A,c;return`${(a=(s=r.anchor_position)==null?void 0:s.x)!=null?a:r.center.x},${(c=(A=r.anchor_position)==null?void 0:A.y)!=null?c:r.center.y}`})),i=[];for(const r of n.schematic_port.list()){const s=`${r.center.x},${r.center.y}`;if(o.has(s))continue;const a=n.source_port.get(r.source_port_id);if(!a)continue;const A=n.source_net.getWhere({subcircuit_connectivity_map_key:a.subcircuit_connectivity_map_key});if(!A)continue;const c=n.source_trace.list().find(h=\u003e{var d;return(d=h.connected_source_port_ids)==null?void 0:d.includes(r.source_port_id)}),l=n.schematic_trace.getWhere({source_trace_id:c?.source_trace_id}),g={type:\"schematic_net_label\",schematic_net_label_id:`netlabel_for_${r.schematic_port_id}`,schematic_port_id:r.schematic_port_id,text:A.name,source_net_id:A.source_net_id,source_trace_id:c?.source_trace_id,schematic_trace_id:l?.schematic_trace_id,anchor_position:Twt({},r.center),center:Twt({},r.center),anchor_side:dWn((e=r.facing_direction)!=null?e:\"right\")};i.push(g)}return i},lEo=(t,e={})=\u003e{const n={boxes:[],pins:[]},o=Xc(t).schematic_component.list();let i=Xc(t).schematic_net_label.list();e.inferNetLabels\u0026\u0026(i=i.concat(cEo(t)));const r=e.useReadableIds?AEo(t):{},s=A=\u003ee.useReadableIds\u0026\u0026r[A]?r[A]:A;let a=0;for(const A of o){const c={boxId:s(A.schematic_component_id),kind:\"floating\",center:A.center};n.boxes.push(c);const l={pinId:`${s(A.schematic_component_id)}_center`,color:\"component_center\",networkId:`center_${A.schematic_component_id}`,offset:{x:0,y:0},boxId:s(A.schematic_component_id)};n.pins.push(l);const u=Xc(t).schematic_port.list({schematic_component_id:A.schematic_component_id});for(const g of u){const h=Xc(t).source_port.get(g.source_port_id);let d=h?.subcircuit_connectivity_map_key,p=\"normal\";if(d){const _=Xc(t).source_net.getWhere({subcircuit_connectivity_map_key:h?.subcircuit_connectivity_map_key});_\u0026\u0026(_.is_power||_.name.startsWith(\"V\"))\u0026\u0026(p=\"vcc\"),_\u0026\u0026(_.is_ground||_.name.startsWith(\"GND\"))\u0026\u0026(p=\"gnd\")}else d=`disconnected-${a++}`,p=\"not_connected\";const m={pinId:s(g.schematic_port_id),color:p,networkId:d,offset:{x:g.center.x-c.center.x,y:g.center.y-c.center.y},boxId:s(A.schematic_component_id)};n.pins.push(m)}}for(const A of i){const c=Xc(t).source_net.get(A.source_net_id);let l=c?.subcircuit_connectivity_map_key,u=\"normal\";l?(c\u0026\u0026(c.is_power||c.name.startsWith(\"V\"))\u0026\u0026(u=\"vcc\"),c\u0026\u0026(c.is_ground||c.name.startsWith(\"GND\"))\u0026\u0026(u=\"gnd\")):(l=`disconnected-${a++}`,u=\"not_connected\");const g=aEo(A.anchor_side),h={x:A.anchor_position.x-g.x*A.text.length*.18*.5,y:A.anchor_position.y-g.y*.18};let d={x:0,y:0};A.anchor_position\u0026\u0026(d={x:A.anchor_position.x-h.x,y:A.anchor_position.y-h.y});const p={boxId:s(A.schematic_net_label_id),kind:\"fixed\",center:h,boxAttributes:{is_net_label:!0,source_net_id:A.source_net_id,source_trace_id:A.source_trace_id}};n.boxes.push(p);const m={pinId:`${s(A.schematic_net_label_id)}_pin`,boxId:s(A.schematic_net_label_id),networkId:l,color:u,offset:d};n.pins.push(m),n.pins.push({pinId:`${s(A.schematic_net_label_id)}_center`,boxId:s(A.schematic_net_label_id),networkId:`${s(A.schematic_net_label_id)}_center`,color:\"netlabel_center\",offset:{x:0,y:0}})}return n},uEo=t=\u003et?\"x\"in t\u0026\u0026\"y\"in t?t:\"center\"in t?t.center:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}:{x:0,y:0},e0e=(t,e)=\u003e{const n=t.boxes.find(c=\u003ec.boxId===e),o=t.pins.filter(c=\u003ec.boxId===e);if(!n)throw new Error(`Box \"${e}\" not found`);const i=n.center??{x:0,y:0};let r=1/0,s=1/0,a=-1/0,A=-1/0;for(const c of o)r=Math.min(r,c.offset.x+i.x),s=Math.min(s,c.offset.y+i.y),a=Math.max(a,c.offset.x+i.x),A=Math.max(A,c.offset.y+i.y);return{minX:r,minY:s,maxX:a,maxY:A}},oO=(t,e,n)=\u003e`hsl(${t*360/e}, 100%, 50%, ${n??1})`,gEo=t=\u003e{const e=new Set;for(const n of t.pins)e.add(n.networkId);return Array.from(e)},kwt={not_connected:\"rgba(0, 0, 0, 0.2)\",normal:\"blue\",vcc:\"orange\",gnd:\"purple\",component_center:\"gray\"},dEo=[\"red\",\"green\",\"blue\",\"yellow\",\"purple\",\"orange\",\"brown\",\"gray\",\"black\",\"white\"];function hEo(t){let e=0;for(let n=0;n\u003ct.length;n++)e=(e\u003c\u003c5)-e+t.charCodeAt(n);return e}var Fwt=t=\u003et.startsWith(\"rgb\")||t.startsWith(\"hsl\")||t.startsWith(\"#\")||dEo.includes(t)?t:t in kwt?kwt[t]:oO(hEo(t)%50,50),zN=(t,e)=\u003e{const n={points:[],lines:[],rects:[],circles:[],texts:[],coordinateSystem:\"cartesian\",title:\"BPC Graph Graphics\"},o=new Map,i=new Map;for(const a of t.boxes){const A=e0e(t,a.boxId),c=uEo(A);n.rects.push({label:a.boxId,center:c,width:A.maxX-A.minX+.1,height:A.maxY-A.minY+.1,fill:\"rgba(0, 0, 0, 0.2)\"});const l=t.pins.filter(g=\u003eg.boxId===a.boxId),u=a.center??{x:0,y:0};for(const g of l){const h={x:g.offset.x+u.x,y:g.offset.y+u.y},d=`${h.x.toFixed(6)},${h.y.toFixed(6)}`;i.has(d)||i.set(d,[]),i.get(d).push({box:a,pin:g}),o.set(`${a.boxId}.${g.pinId}`,h)}}for(const[a,A]of i){const c=a.split(\",\").map(Number),l=c[0],u=c[1];for(let g=0;g\u003cA.length;g++){const h=A[g],{box:d,pin:p}=h;let m={x:l,y:u};if(A.length\u003e1){const _=d.center??{x:0,y:0},f=_.x-l,I=_.y-u,C=Math.sqrt(f*f+I*I);let y=0,x=0;if(C\u003e0)y=f/C,x=I/C;else{const E=g*2*Math.PI/A.length;y=Math.cos(E),x=Math.sin(E)}m={x:l+.01*y,y:u+.01*x}}o.set(`${d.boxId}.${p.pinId}`,m),n.points.push({...m,label:[p.pinId,p.color,p.networkId].join(`\n`),color:Fwt(p.color)})}}const r=gEo(t);for(let a=0;a\u003cr.length;a++){const A=r[a],c=oO(a,r.length,.5),u=t.pins.filter(g=\u003eg.networkId===A).map(g=\u003e({pin:g,position:o.get(`${g.boxId}.${g.pinId}`)}));for(let g=0;g\u003cu.length;g++){const{position:h}=u[g];for(let d=g+1;d\u003cu.length;d++){const{position:p}=u[d];n.lines.push({points:[h,p],strokeColor:e?.grayNetworks?\"rgba(0, 0, 0, 0.05)\":c})}}}const s=V5(n);return e?.title\u0026\u0026(n.title=e.title,n.texts.push({text:e.title,x:s.minX,y:s.maxY,fontSize:(s.maxY-s.minY)*.05,anchorSide:\"bottom_left\"})),e?.caption\u0026\u0026n.texts.push({text:e.caption,x:s.minX,y:s.minY,fontSize:(s.maxY-s.minY)*.05,anchorSide:\"top_left\"}),n},t0e=(t,e,n)=\u003e{const o=t.pins.find(s=\u003es.pinId===n\u0026\u0026s.boxId===e);if(!o)throw new Error(`Pin \"${n}\" not found`);const i=t.boxes.find(s=\u003es.boxId===o.boxId);if(!i)throw new Error(`Box \"${o.boxId}\" not found`);const r=i.center??{x:0,y:0};return{x:o.offset.x+r.x,y:o.offset.y+r.y}},pEo=(t,e,n)=\u003e{const o=typeof n==\"string\"?t.pins.find(h=\u003eh.pinId===n\u0026\u0026h.boxId===e):n;if(!o)throw new Error(`Pin not found \"${n}\"`);if(!(typeof e==\"string\"?t.boxes.find(h=\u003eh.boxId===e):e))throw new Error(`Box not found for pin \"${n}\" (looked for \"${o.boxId}\")`);const r=e0e(t,o.boxId),s=t0e(t,o.boxId,o.pinId),a=r.maxX-r.minX,A=r.maxY-r.minY;if(a===0\u0026\u0026A===0)return Math.abs(o.offset.x)\u003eMath.abs(o.offset.y)?o.offset.x\u003e0?\"x+\":\"x-\":o.offset.y\u003e0?\"y+\":\"y-\";if(a===0){if(Math.abs(s.y-r.minY)\u003c1e-4)return\"y-\";if(Math.abs(s.y-r.maxY)\u003c1e-4)return\"y+\"}if(A===0){if(Math.abs(s.x-r.minX)\u003c1e-4)return\"x-\";if(Math.abs(s.x-r.maxX)\u003c1e-4)return\"x+\"}const c=Math.abs(s.x-r.minX)\u003c1e-4,l=Math.abs(s.x-r.maxX)\u003c1e-4,u=Math.abs(s.y-r.minY)\u003c1e-4,g=Math.abs(s.y-r.maxY)\u003c1e-4;if((c||l)\u0026\u0026(u||g))return o.offset.x\u003e0?\"x+\":\"x-\";if(c)return\"x-\";if(l)return\"x+\";if(u)return\"y-\";if(g)return\"y+\";throw new Error(`Pin \"${o.pinId}\" not on the edge of the box \"${o.boxId}\" so we couldn't determine the direction`)},iO=(t,e,n)=\u003e{try{return pEo(t,e,n)}catch{return null}},mEo=t=\u003e{const e=new Map,n=[];t.nodes.forEach((r,s)=\u003e{e.set(r.id,s),n.push(r.id)});const o=t.nodes.length,i=Array.from({length:o},()=\u003eArray.from({length:o},()=\u003e0));for(const[r,s]of t.undirectedEdges){const a=e.get(r),A=e.get(s);a!==void 0\u0026\u0026A!==void 0\u0026\u0026a!==A\u0026\u0026(i[a][A]=1,i[A][a]=1)}for(let r=0;r\u003co;++r)i[r][r]=1;return{matrix:i,mapping:e,indexMapping:n}},n0e=t=\u003e{const e=[],n=[],o=new Map;for(const r of t.boxes)r.kind,o.set(r.boxId,r.center),e.push({id:r.boxId,boxId:r.boxId,color:\"box\",x:r.center?.x,y:r.center?.y});const i={};for(const r of t.pins){const s=`${r.boxId}-${r.pinId}`,a=o.get(r.boxId);e.push({id:s,boxId:r.boxId,pinId:r.pinId,color:r.color,x:a?a.x+r.offset.x:void 0,y:a?a.y+r.offset.y:void 0}),i[r.networkId]??=[],i[r.networkId].push(s)}for(const r of Object.values(i))for(let s=0;s\u003cr.length;s++)for(let a=s+1;a\u003cr.length;a++)n.push([r[s],r[a]]);for(const r of t.boxes)for(const s of t.pins)s.boxId===r.boxId\u0026\u0026n.push([r.boxId,`${r.boxId}-${s.pinId}`]);return{nodes:e,undirectedEdges:n}},_Eo=(t,e,n={})=\u003e{const o=t.length;if(t.some(a=\u003ea.length!==o))throw new Error(\"adjMatrix must be square\");let i=(n.nodeInitialColors??Array.from({length:o},()=\u003e\"_\")).slice();const r=a=\u003e{const A={};for(const c of a)A[c]=(A[c]??0)+1;return A},s=[];s.push(r(i));for(let a=0;a\u003ce;a++){const A=Array(o);for(let c=0;c\u003co;c++){const l=[];for(let u=0;u\u003co;u++)t[c][u]\u0026\u0026l.push(i[u]);l.sort(),A[c]=`${i[c]}|${l.join(\",\")}`}i=A,s.push(r(i))}return s},fEo=(t,e)=\u003e{let n=0;const o=Math.min(t.length,e.length);for(let i=0;i\u003co;i++){const r=t[i],s=e[i],a=new Set([...Object.keys(r),...Object.keys(s)]);let A=0,c=0;for(const l of a){const u=r[l]??0,g=s[l]??0;A+=Math.min(u,g),c+=Math.max(u,g)}n+=c===0?0:A/c}return n},IEo=fEo,o0e=2,i0e=(t,e=o0e)=\u003e{const n=n0e(t),{matrix:o,indexMapping:i}=mEo(n);return _Eo(o,e,{nodeInitialColors:i.map(r=\u003en.nodes.find(s=\u003es.id===r)?.color??\"_\")})},fwe=(t,e,{wlDegrees:n=o0e}={})=\u003e{const o=i0e(t,n),i=i0e(e,n);return(o0e+1-IEo(o,i))/(o0e+1)},CEo=t=\u003e{let e=0;for(let n=0;n\u003ct.length;n++)e=(e\u003c\u003c5)-e+t.charCodeAt(n);return Math.abs(e)},Iwe=(t,e={})=\u003e{const n={points:[],lines:[],rects:[],circles:[],texts:[],coordinateSystem:\"cartesian\",title:\"Flat-BPC Graphics\"},o=new Map;for(const r of t.nodes){if(r.x===void 0||r.y===void 0)continue;const s={x:r.x,y:r.y};o.set(r.id,s),n.points.push({...s,color:Fwt(r.color),label:r.id})}for(const[r,s]of t.undirectedEdges){const a=o.get(r),A=o.get(s);a\u0026\u0026A\u0026\u0026n.lines.push({points:[a,A],strokeColor:\"rgba(0,0,0,0.3)\"})}const i=V5(n);return e.title\u0026\u0026n.texts.push({text:e.title,x:i.minX,y:i.maxY,fontSize:(i.maxY-i.minY)*.05,anchorSide:\"bottom_left\"}),e.caption\u0026\u0026n.texts.push({text:e.caption,x:i.minX,y:i.minY,fontSize:(i.maxY-i.minY)*.05,anchorSide:\"top_left\"}),n},yEo=t=\u003e{const e=new Map;for(const i of t.pins){const r=t.boxes.find(a=\u003ea.boxId===i.boxId);if(!r||!r.center)throw new Error(`Expected fixed graph – box \"${i.boxId}\" missing or has no center`);const s={x:r.center.x+i.offset.x,y:r.center.y+i.offset.y};e.has(i.networkId)||e.set(i.networkId,[]),e.get(i.networkId).push(s)}const n=new Map;let o=0;for(const[i,r]of e){if(r.length===0){n.set(i,0);continue}const s=r.reduce((A,c)=\u003e({x:A.x+c.x,y:A.y+c.y}),{x:0,y:0});s.x/=r.length,s.y/=r.length;const a=r.reduce((A,c)=\u003e{const l=c.x-s.x,u=c.y-s.y;return A+Math.sqrt(l*l+u*u)},0);n.set(i,a),o+=a}return{totalNetworkLength:o,networkLengths:n}},xEo=(t,e)=\u003e{const n=t.pins.filter(i=\u003ei.networkId===e),o=[];for(const i of n){const r=Math.atan2(i.offset.y,i.offset.x);o.push(r)}return o},Lwt=t=\u003e{const e=new Map,n=Array.from(new Set(t.pins.map(o=\u003eo.networkId)));for(const o of n){const i=xEo(t,o);e.set(o,i)}return e},EEo=(t,e)=\u003e{const n=2*Math.PI,o=(t%n+n)%n,i=(e%n+n)%n,r=Math.abs(o-i);return Math.min(r,n-r)},BEo=(t,e)=\u003e{if(t.length===0\u0026\u0026e.length===0)return 0;if(t.length===0||e.length===0)return Math.PI;const n=(o,i)=\u003e{let r=0;for(const s of o){let a=1/0;for(const A of i){const c=EEo(s,A);c\u003ca\u0026\u0026(a=c)}r+=a}return r/o.length};return(n(t,e)+n(e,t))/2},bEo=(t,e)=\u003e{const n=new Map,o=Array.from(t.entries()),i=Array.from(e.entries()),r=o.length,s=i.length,a=Array.from({length:r},()=\u003enew Array(s).fill(0));for(let g=0;g\u003cr;g++){const[,h]=o[g];for(let d=0;d\u003cs;d++){const[,p]=i[d];a[g][d]=BEo(h,p)}}const A=new Set(Array.from({length:r},(g,h)=\u003eh)),c=new Set(Array.from({length:s},(g,h)=\u003eh));let l=0;for(;A.size\u0026\u0026c.size;){let g=-1,h=-1,d=1/0;for(const _ of A)for(const f of c){const I=a[_][f];I\u003cd\u0026\u0026(d=I,g=_,h=f)}const[p]=o[g],[m]=i[h];n.set(p,m),l+=d,A.delete(g),c.delete(h)}const u=Math.PI;return l+=(A.size+c.size)*u,{networkMapping:n,distance:l}},Hwt=t=\u003e{const e=Math.min(...t.map(r=\u003er.offset.x)),n=Math.max(...t.map(r=\u003er.offset.x)),o=Math.min(...t.map(r=\u003er.offset.y)),i=Math.max(...t.map(r=\u003er.offset.y));return{minX:e,maxX:n,minY:o,maxY:i}},SEo=(t,e)=\u003e{const n=A=\u003e{switch(A.side){case\"x+\":return A.cwDistanceFromCorner;case\"y-\":return 1+A.cwDistanceFromCorner;case\"x-\":return 2+A.cwDistanceFromCorner;case\"y+\":return 3+A.cwDistanceFromCorner}},o=n(t)%4,i=n(e)%4,r=(i-o+4)%4,s=(o-i+4)%4,a=Math.min(r,s);return{cwDistance:r,ccwDistance:s,minDistance:a}},Ib=1e-6,Owt=(t,e)=\u003e{const{minX:n,minY:o,maxX:i,maxY:r}=t,s=(c,l)=\u003eMath.abs(c-l)\u003cIb;let a,A;if(s(e.x,i)\u0026\u0026e.y\u003e=o-Ib\u0026\u0026e.y\u003c=r+Ib)a=\"x+\",A=(r-e.y)/(r-o);else if(s(e.y,r)\u0026\u0026e.x\u003c=i+Ib\u0026\u0026e.x\u003e=n-Ib)a=\"y+\",A=(e.x-n)/(i-n);else if(s(e.x,n)\u0026\u0026e.y\u003c=r+Ib\u0026\u0026e.y\u003e=o-Ib)a=\"x-\",A=(e.y-o)/(r-o);else if(s(e.y,o)\u0026\u0026e.x\u003e=n-Ib\u0026\u0026e.x\u003c=i+Ib)a=\"y-\",A=(i-e.x)/(i-n);else return null;return A=Math.min(1,Math.max(0,A)),{side:a,cwDistanceFromCorner:A}},QEo=(t,e)=\u003e{const n=[],o=new Set,i=new Set,r=new Set,s=new Set,a=Hwt(t),A=Hwt(e);for(const c of t){const l=e.filter(d=\u003ed.color===c.color).filter(d=\u003e!s.has(d.pinId));if(l.length===0){o.add(c.pinId);continue}const u=Owt(a,c.offset);if(u===null){o.add(c.pinId);continue}let g=1/0,h=l[0];for(const d of l){const p=Owt(A,d.offset);if(p===null)continue;const{minDistance:m}=SEo(u,p);m\u003cg\u0026\u0026(g=m,h=d)}n.push([c,h]),r.add(c.pinId),s.add(h.pinId)}for(const c of e)s.has(c.pinId)||i.add(c.pinId);return{matchedPins:n,unmatchedPin1Ids:o,unmatchedPin2Ids:i}},vEo=class{constructor(t,e){this.floatingGraph=t,this.fixedGraph=e,this.wipGraph={pins:[],boxes:[]},this.fixedToFloatingNetworkMap=this.computeFixedToFloatingNetworkMap(),this.floatingToFixedNetworkMap=new Map(Array.from(this.fixedToFloatingNetworkMap.entries()).map(([n,o])=\u003e[o,n]))}wipGraph;iterations=0;solved=!1;acceptedFloatingBoxIds=new Set;rejectedFloatingBoxIds=new Set;acceptedFixedBoxIds=new Set;assignment=new Map;lastAcceptedEvaluation=null;fixedToFloatingNetworkMap;floatingToFixedNetworkMap;lastComputedEvaluations=[];computeFixedToFloatingNetworkMap(){const t=Lwt(this.floatingGraph),e=Lwt(this.fixedGraph),{networkMapping:n}=bEo(e,t);return n}getNextFloatingBoxId(){const t=this.floatingGraph.boxes.map(o=\u003eo.boxId).filter(o=\u003e!this.acceptedFloatingBoxIds.has(o)\u0026\u0026!this.rejectedFloatingBoxIds.has(o));if(!t.length)throw new Error(\"No remaining floating box ids\");let e=t[0],n=0;for(const o of t){const i=this.floatingGraph.pins.filter(r=\u003er.boxId===o);i.length\u003en\u0026\u0026(e=o,n=i.length)}return e}getRemainingFloatingBoxIds(){return this.floatingGraph.boxes.map(t=\u003et.boxId).filter(t=\u003e!this.acceptedFloatingBoxIds.has(t)\u0026\u0026!this.rejectedFloatingBoxIds.has(t))}getPartialFloatingGraph(t){const e={pins:[],boxes:[]};for(const n of this.floatingGraph.boxes)(this.acceptedFloatingBoxIds.has(n.boxId)||n.boxId===t)\u0026\u0026(e.boxes.push(n),e.pins.push(...this.floatingGraph.pins.filter(o=\u003eo.boxId===n.boxId)));return e}evaluateFloatingBoxAssignment(t){const e=this.getPartialFloatingGraph(t),n=fwe(e,this.wipGraph);let o=null,i=null;const r={floatingBoxId:t,originalWipGraph:this.wipGraph,partialFloatingGraph:e,currentWlDist:n,networkLengths:new Map,wlDistances:new Map,wlVecs:new Map,wipGraphsWithAddedFixedBoxId:new Map};let s=n,a=n,A=1/0;const c=i0e(e);for(const l of this.fixedGraph.boxes.map(u=\u003eu.boxId)){if(this.acceptedFixedBoxIds.has(l))continue;const u=this.getWipGraphWithAddedFixedBoxIdForFloatingAssignment(l,t),g=fwe(e,u),h=i0e(u),{totalNetworkLength:d}=yEo(u);r.wipGraphsWithAddedFixedBoxId.set(l,u),r.wlVecs.set(l,h),r.wlDistances.set(l,g),r.networkLengths.set(l,d);const p=g+d/100;p\u003cs\u0026\u0026(s=p,a=g,A=d,i=u,o=l)}return{bestFixedBoxId:o,bestNewWipGraph:i,bestDist:s,bestWlDist:a,bestTotalNetworkLength:A,lastDistanceEvaluation:r,nextFloatingBoxId:t,partialFloatingGraph:e,floatingBoxWlVec:c}}getPinAssignment(){const t={},e={};for(const[n,o]of this.assignment)t[n]={},e[o]=n;for(const n of this.wipGraph.pins){const o=n.boxId,i=e[o],r=n._floatingPinId,s=n._fixedPinId;t[i][r]=s}return t}step(){if(this.solved)return;if(this.iterations\u003e1e3)throw new Error(\"Too many iterations\");if(this.iterations++,this.iterations===1){const o=this.getNextFloatingBoxId(),i=this.evaluateFloatingBoxAssignment(o);this.lastComputedEvaluations=[i],this.acceptEvaluationResult(i);return}const t=this.getRemainingFloatingBoxIds();if(t.length===0){this.solved=!0;return}let e=1/0,n=null;this.lastComputedEvaluations=[];for(const o of t){const i=this.evaluateFloatingBoxAssignment(o);this.lastComputedEvaluations.push(i),i.bestDist\u003ce\u0026\u0026(e=i.bestDist,n=i)}n\u0026\u0026this.acceptEvaluationResult(n)}acceptEvaluationResult(t){const{bestFixedBoxId:e,bestNewWipGraph:n,nextFloatingBoxId:o}=t;if(e===null){this.rejectedFloatingBoxIds.add(o);return}this.acceptedFloatingBoxIds.add(o),this.assignment.set(o,e),this.acceptedFixedBoxIds.add(e),this.wipGraph=n,this.lastAcceptedEvaluation=t.lastDistanceEvaluation}getWipGraphWithAddedFixedBoxIdForFloatingAssignment(t,e){const n=structuredClone(this.wipGraph),o=this.fixedGraph.boxes.find(a=\u003ea.boxId===t);n.boxes.push(o);const i=this.floatingGraph.pins.filter(a=\u003ea.boxId===e),r=this.fixedGraph.pins.filter(a=\u003ea.boxId===t),{matchedPins:s}=QEo(i,r);return n.pins.push(...s.map(a=\u003e{const[A,c]=a;return{...c,networkId:this.floatingToFixedNetworkMap.get(A.networkId),_floatingPinId:A.pinId,_fixedPinId:c.pinId}})),n}visualize(){const t=zN(this.floatingGraph,{title:\"Floating\"}),e=zN(this.wipGraph,{title:\"WIP\"}),n=zN(this.fixedGraph,{title:\"Fixed\"}),o=zN(this.getPartialFloatingGraph(),{title:\"Partial Floating\"}),i=new Map,r=new Map;for(const[p,m]of this.assignment){const _=oO(CEo(p)*47%100,100,.5);i.set(p,_),r.set(m,p)}function s(p,m,_){const f=i.get(m);p.fill=f,p.label=`${m}→${_}`}for(const p of t.rects??[]){const m=p.label;if(!m)continue;const _=this.assignment.get(m);_\u0026\u0026s(p,m,_)}for(const p of o.rects??[]){const m=p.label;if(!m)continue;const _=this.assignment.get(m);_\u0026\u0026s(p,m,_)}const a=[e,n];for(const p of a)for(const m of p.rects??[]){const _=m.label;if(!_)continue;const f=r.get(_);f\u0026\u0026s(m,f,_)}const A=n0e(this.floatingGraph),c=n0e(this.wipGraph),l=n0e(this.fixedGraph),u=Iwe(A,{title:\"Floating Flat\"}),g=Iwe(c,{title:\"WIP Flat\"}),h=Iwe(l,{title:\"Fixed Flat\"});return zce([ZQe([t,u,o]),ZQe([e,g]),ZQe([n,h])])}},wEo=(t,e)=\u003e{const n=new vEo(t,e);for(;!n.solved\u0026\u0026n.iterations\u003c1e3;)n.step();const o={};for(const[s,a]of n.assignment.entries())o[s]=a;const i={};for(const[s,a]of n.floatingToFixedNetworkMap.entries())i[s]=a;const r=n.getPinAssignment();return{floatingToFixedBoxAssignment:o,floatingToFixedNetworkAssignment:i,floatingToFixedPinAssignment:r}},PEo=(t,{renetworkedNetworkIdMap:e}={})=\u003e{if(e??={},t.length===1)return t[0];const n={boxes:[],pins:[]},o=new Map,i=new Map,r=Object.entries(t.flatMap(a=\u003eArray.from(new Set(a.boxes.map(A=\u003eA.boxId)))).reduce((a,A)=\u003e(a[A]=(a[A]||0)+1,a),{})).filter(([a,A])=\u003eA===t.length).map(([a])=\u003ea);if(r.length\u003e1)throw new Error(`Expected at most one shared box across all partitions, the following box ids are shared across all graphs: ${r.join(\", \")}`);const s=r[0];for(const a of t){const A=a.boxes.find(c=\u003ec.boxId===s)?.center;for(const c of a.boxes){if(o.has(c.boxId))continue;const l=structuredClone(c);l.center\u0026\u0026A\u0026\u0026(l.center={x:l.center.x-A.x,y:l.center.y-A.y}),o.set(c.boxId,l)}for(const c of a.pins)i.has(`${c.boxId}-${c.pinId}`)||i.set(`${c.boxId}-${c.pinId}`,structuredClone(c))}return n.boxes=Array.from(o.values()),n.pins=Array.from(i.values()),n},Gwt=({graph:t,axis:e,centerBoxId:n})=\u003e{const o=structuredClone(t),i=o.boxes.find(a=\u003ea.boxId===n);if(!i||!i.center)throw new Error(`Center box \"${n}\" not found or has no center`);const{x:r,y:s}=i.center;for(const a of o.boxes)a.center\u0026\u0026(a.center.x=2*r-a.center.x);for(const a of o.pins)a.offset.x=-a.offset.x;return o},MEo=t=\u003e{let e=null,n=-1/0;for(const r of t.boxes){const s=t.pins.filter(a=\u003ea.boxId===r.boxId).filter(a=\u003e[\"x-\",\"x+\"].includes(iO(t,r,a)??\"none\"));s.length\u003en\u0026\u0026s.length\u003e1\u0026\u0026(e=r,n=s.length)}if(!e)return{g:t,reflected:!1,centerBoxId:null};const o=t.pins.filter(r=\u003er.boxId===e.boxId).map(r=\u003eiO(t,e,r)),i={\"x+\":0,\"x-\":0,\"y+\":0,\"y-\":0};for(const r of o)r\u0026\u0026i[r]++;return i[\"x+\"]\u003e=i[\"x-\"]?{g:t,reflected:!1,centerBoxId:e.boxId}:{g:Gwt({graph:t,axis:\"x\",centerBoxId:e.boxId}),reflected:!0,centerBoxId:e.boxId}},sw=vc(\"schematic-partition-processor\"),DEo=class{constructor(t,e={}){this.initialGraph=t,this.lastGraph=t,this.singletonKeys=e.singletonKeys??[],this.centerPinColors=e.centerPinColors??[];const n=this.initializeWipPartitions();this.wipPartitions=n.wipPartitions,this.splitBoxIds=n.splitBoxIds,this.addedPins=n.addedPins,this.exploredPins=new Set,this.unexploredPins=this.wipPartitions.flatMap(r=\u003er.pins.map(s=\u003e({...s,partitionId:r.partitionId}))),this.boxSingletonKeys=this.initializeBoxSingletonKeys(),this.pinConnectionCount=(()=\u003e{const r={};for(const s of this.initialGraph.pins)r[`${s.boxId}:${s.pinId}`]=this.getNeighbors(s).length;return r})();const o={};for(const r of this.initialGraph.pins)o[r.networkId]=(o[r.networkId]??0)+1;this.networkSize=o;const i={};for(const r of this.initialGraph.pins)i[`${r.boxId}:${r.pinId}`]=o[r.networkId];this.pinNetworkSize=i}lastGraph;lastExploredPin;solved=!1;iteration=0;wipPartitions;unexploredPins=[];boxSingletonKeys;exploredPins;addedPins;allAcceptedPins=new Set;pinConnectionCount;networkSize;pinNetworkSize;splitBoxIds;acceptedBoxPartitionMap=new Map;singletonKeys;centerPinColors;initializeBoxSingletonKeys(){const t={};for(const e of this.initialGraph.boxes){const n=this.initialGraph.pins.filter(r=\u003er.boxId===e.boxId),o=n.length,i=n.map(r=\u003e`${r.color}/${o}`).filter(r=\u003ethis.singletonKeys.includes(r));t[e.boxId]=new Set(i)}return t}initializeWipPartitions(){const t=[],e=new Set,n=new Set;let o=0;for(const i of this.initialGraph.boxes){const r=this.initialGraph.pins.filter(a=\u003ea.boxId===i.boxId).filter(a=\u003eiO(this.initialGraph,i,a)).filter(a=\u003e!this.centerPinColors.includes(a.color));if(r.length\u003c4)continue;const s=new Set(r.map(a=\u003eiO(this.initialGraph,i,a)));s.size\u003e1\u0026\u0026n.add(i.boxId);for(const a of s){const A={partitionId:`partition${o++}`,filledSingletonSlots:new Set,pins:[]};for(const c of r)iO(this.initialGraph,i,c)===a\u0026\u0026(A.pins.push({boxId:i.boxId,pinId:c.pinId}),e.add(`${i.boxId}:${c.pinId}`));t.push(A)}}return t.length===0\u0026\u0026(t.push(this.createWipPartitionFromEntireGraph()),this.solved=!0),sw(`splitBoxIds = ${Array.from(n).join(\", \")}`),sw(`wipPartitions = ${t.map(i=\u003ei.partitionId).join(\", \")}`),{wipPartitions:t,splitBoxIds:n,addedPins:e}}createWipPartitionFromEntireGraph(){return{partitionId:\"entire-graph\",filledSingletonSlots:new Set,pins:this.initialGraph.pins.map(t=\u003e({boxId:t.boxId,pinId:t.pinId}))}}step(){if(this.solved)return;if(this.iteration++,sw(`\n── Iteration ${this.iteration} ── unexplored=${this.unexploredPins.length} explored=${this.exploredPins.size}`),this.unexploredPins.sort((c,l)=\u003e{const u=`${c.boxId}:${c.pinId}`,g=`${l.boxId}:${l.pinId}`,h=this.pinNetworkSize[u]-this.pinNetworkSize[g];return h!==0?h:this.pinConnectionCount[u]-this.pinConnectionCount[g]}),this.unexploredPins.length===0){this.solved=!0;return}const t=this.unexploredPins.shift(),e=`${t.boxId}:${t.pinId}`;sw(`Exploring pin ${t.boxId}:${t.pinId} for partition \"${t.partitionId}\"`),this.lastExploredPin={...t,partitionId:t.partitionId};const n=`${t.partitionId}[${e}]`,o=this.initialGraph.pins.find(c=\u003ec.boxId===t.boxId\u0026\u0026c.pinId===t.pinId);if(!o||this.exploredPins.has(n))return;const i=this.wipPartitions.find(c=\u003ec.partitionId===t.partitionId);if(!i)return;const r=this.acceptedBoxPartitionMap.get(t.boxId);if(r\u0026\u0026r!==t.partitionId\u0026\u0026!this.splitBoxIds.has(t.boxId)){sw(` ↳ rejected (box ${t.boxId} for partition ${t.partitionId} already in partition ${this.acceptedBoxPartitionMap.get(t.boxId)})`),this.exploredPins.add(n);return}const s=this.boxSingletonKeys[t.boxId];if(Array.from(s).some(c=\u003ei.filledSingletonSlots.has(c))){sw(` ↳ rejected (singleton already in partition \"${t.partitionId}\")`),this.exploredPins.add(n);return}for(const c of s)i.filledSingletonSlots.add(c);i.pins.push({boxId:t.boxId,pinId:t.pinId}),this.allAcceptedPins.add(e),this.addedPins.add(e),this.splitBoxIds.has(t.boxId)||this.acceptedBoxPartitionMap.set(t.boxId,t.partitionId),this.exploredPins.add(n),sw(` ↳ accepted → pins in partition now = ${i.pins.length}`);const A=this.getNeighbors(o);for(const c of A){const l=`${c.boxId}:${c.pinId}`;this.addedPins.has(l)||this.centerPinColors.includes(c.color)||this.exploredPins.has(`${t.partitionId}[${l}]`)||this.unexploredPins.push({boxId:c.boxId,pinId:c.pinId,partitionId:t.partitionId})}this.unexploredPins.length===0\u0026\u0026(this.solved=!0),this.solved\u0026\u0026sw(`Solver finished in ${this.iteration} iterations, partitions=${this.getPartitions().length}`)}getNeighbors(t){const e=[];for(const n of this.initialGraph.pins)n.networkId===t.networkId\u0026\u0026(t.boxId===n.boxId\u0026\u0026n.pinId===t.pinId||e.push(n));for(const n of this.initialGraph.pins)n.boxId===t.boxId\u0026\u0026e.push(n);return e}solve(){for(;!this.solved\u0026\u0026this.iteration\u003c1e3;)this.step()}getPartitions(){if(!this.solved)throw new Error(\"Graph not solved\");const t=[];for(const e of this.wipPartitions){if(e.pins.length===0)continue;const n=new Set(e.pins.map(i=\u003ei.boxId)),o=this.initialGraph.boxes.filter(i=\u003en.has(i.boxId));t.push({boxes:o,pins:this.initialGraph.pins.filter(i=\u003ee.pins.some(r=\u003er.pinId===i.pinId\u0026\u0026r.boxId===i.boxId)||this.centerPinColors.includes(i.color)\u0026\u0026n.has(i.boxId))})}return t}getGraphicsForLastGraph(){const t=zN(this.lastGraph,{title:`Iteration ${this.iteration}`}),e=this.wipPartitions.length,n=.4;if(this.wipPartitions.forEach((i,r)=\u003e{if(i.pins.length===0)return;const s=oO(r,e,.25);for(const{boxId:a,pinId:A}of i.pins){const{x:c,y:l}=t0e(this.lastGraph,a,A);t.rects.push({center:{x:c,y:l},width:n,height:n,fill:s})}}),this.lastExploredPin){const{boxId:i,pinId:r,color:s}=this.lastExploredPin,a=t0e(this.lastGraph,i,r),A=.25;t.rects.push({center:{x:a.x,y:a.y},width:A,height:A,fill:this.lastExploredPin.partitionId?oO(this.wipPartitions.findIndex(c=\u003ec.partitionId===this.lastExploredPin.partitionId),this.wipPartitions.length,1):\"black\"}),t.texts.push({x:a.x,y:a.y,text:`${i}:${r}-${Array.from(this.boxSingletonKeys[i]??[]).join(\",\")}`,fontSize:.1})}const o=n;for(const i of this.unexploredPins){const{boxId:r,pinId:s,partitionId:a}=i,A=this.wipPartitions.findIndex(h=\u003eh.partitionId===a);if(A===-1)continue;const c=oO(A,this.wipPartitions.length,1),{x:l,y:u}=t0e(this.lastGraph,r,s),g=1+.1*A;t.rects.push({center:{x:l,y:u},width:o*g,height:o*g,fill:\"none\",stroke:c})}return t}},NEo=(t,e,n={})=\u003e{n.similarityMethod??=\"wl-distance\";const o=fwe,i=Object.fromEntries(Object.entries(e).map(([s,a])=\u003e[s,o(t,a)])),r=Object.entries(i).reduce((s,[a,A])=\u003eA\u003cs[1]?[a,A]:s);return{graphName:r[0],graph:e[r[0]],distance:r[1],corpusScores:i}},REo=t=\u003et.x\u003e0?\"x+\":t.x\u003c0?\"x-\":t.y\u003e0?\"y+\":t.y\u003c0?\"y-\":null,TEo=t=\u003e{switch(t){case\"x+\":return{x:1,y:0};case\"x-\":return{x:-1,y:0};case\"y+\":return{x:0,y:1};case\"y-\":return{x:0,y:-1}}},Ywt=(t,e)=\u003e{const n=t.boxes.find(a=\u003ea.boxId===e);if(!n)throw new Error(`Box ${e} not found`);const i=t.pins.filter(a=\u003ea.boxId===e).map(a=\u003eiO(t,n,a)),r={\"x-\":0,\"x+\":0,\"y-\":0,\"y+\":0};for(const a of i)a\u0026\u0026r[a]++;const s=Math.max(...Object.values(r));for(const a of Object.keys(r))if(r[a]===s)return a;return null},kEo=(t,e,{floatingToFixedBoxAssignment:n,floatingBoxIdsWithMutablePinOffsets:o})=\u003e{for(const i of t.boxes){const r=n[i.boxId];if(!r||!i.center||o?.has(i.boxId))continue;const s=e0e(e,r),a=e0e(t,i.boxId),A=Ywt(e,r),c=Ywt(t,i.boxId);if(A===null||c===null||A!==c)continue;const l=TEo(A),u=s.maxX-s.minX,g=a.maxX-a.minX,h=s.maxY-s.minY,d=a.maxY-a.minY,p=g-u,m=d-h;if(!(p\u003c.001\u0026\u0026m\u003c.001))for(const _ of t.boxes){if(_.boxId===i.boxId||!_.center)continue;const f={x:_.center.x-i.center.x,y:_.center.y-i.center.y};REo({x:f.x*Math.abs(l.x),y:f.y*Math.abs(l.y)})===A\u0026\u0026(_.center.x+=l.x*p,_.center.y+=l.y*m)}}},FEo=(t,e,n={})=\u003e{const{floatingBoxIdsWithMutablePinOffsets:o=new Set}=n,{floatingToFixedBoxAssignment:i,floatingToFixedPinAssignment:r}=wEo(t,e),s=structuredClone(t);for(const a of s.pins)if(o.has(a.boxId)\u0026\u0026r[a.boxId]?.[a.pinId]){const A=r[a.boxId]?.[a.pinId],c=i[a.boxId],l=e.pins.find(u=\u003eu.boxId===c\u0026\u0026u.pinId===A);l\u0026\u0026(a.offset=l.offset)}for(const a of s.boxes)if(i[a.boxId]){const A=i[a.boxId],c=e.boxes.find(l=\u003el.boxId===A);c\u0026\u0026(a.center=c.center,a.kind=\"fixed\")}return n.pushBoxesAsBoxesChangeSize\u0026\u0026kEo(s,e,{floatingToFixedBoxAssignment:i,floatingBoxIdsWithMutablePinOffsets:o}),s},LEo=(t,{corpus:e,singletonKeys:n,centerPinColors:o,floatingBoxIdsWithMutablePinOffsets:i})=\u003e{const r=new DEo(t,{singletonKeys:n,centerPinColors:o});for(;!r.solved\u0026\u0026r.iteration\u003c1e3;)r.step();const A=r.getPartitions().map(MEo).map(g=\u003e{const{graph:h,distance:d}=NEo(g.g,e);return{adaptedBpcGraph:FEo(structuredClone(g.g),h,{floatingBoxIdsWithMutablePinOffsets:i,pushBoxesAsBoxesChangeSize:!0}),reflected:g.reflected,centerBoxId:g.centerBoxId,distance:d}}),c=A.map(({adaptedBpcGraph:g,reflected:h,centerBoxId:d})=\u003eh?Gwt({graph:g,axis:\"x\",centerBoxId:d}):g),l=PEo(c),u=A.reduce((g,h)=\u003eg+(h.distance||0),0);return{fixedGraph:l,distance:u}},HEo=(t,{corpus:e,singletonKeys:n,centerPinColors:o,floatingBoxIdsWithMutablePinOffsets:i})=\u003e{const r=[];let s=null;for(const a of t){const{fixedGraph:A,distance:c}=LEo(a.floatingGraph,{corpus:e,singletonKeys:n,centerPinColors:o,floatingBoxIdsWithMutablePinOffsets:i});r.push({variantName:a.variantName,distance:c}),(!s||c\u003cs.distance)\u0026\u0026(s={variantName:a.variantName,result:A,distance:c})}return{result:s.result,selectedVariantName:s.variantName,variantResults:r}},xp=1e-15,OEo=class{map;rev;constructor(){this.map=new Map([[\"0\",0]]),this.rev=[\"0\"]}getOrCreate(t){const e=String(t),n=e.toUpperCase();if(this.map.has(n))return this.map.get(n);const o=this.rev.length;return this.map.set(n,o),this.rev.push(e),o}get(t){return this.map.get(String(t).toUpperCase())}count(){return this.rev.length}matrixIndexOfNode(t){return t===0?-1:t-1}};function EC(t){if(t==null)return NaN;let e=String(t).trim();if(e===\"\")return NaN;if(/^[+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?$/.test(e))return parseFloat(e);const n={t:1e12,g:1e9,meg:1e6,k:1e3,m:.001,u:1e-6,n:1e-9,p:1e-12,f:1e-15},o=e.match(/^([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)([a-zA-Z]+)$/);if(!o)return parseFloat(e);const[,i,r]=o;if(i==null)return parseFloat(e);let s=parseFloat(i),a=(r??\"\").toLowerCase();return a=a.replace(/(ohm|v|a|s|h|f)$/g,\"\"),a===\"meg\"?s*n.meg:a.length===1\u0026\u0026a in n?s*n[a]:s}function GEo(t){const o=t.trim().replace(/^pulse\\s*\\(/i,\"(\").replace(/^\\(/,\"\").replace(/\\)$/,\"\").trim().split(/[\\s,]+/).filter(r=\u003er.length);if(o.length\u003c7)throw new Error(\"PULSE(...) requires 7 or 8 args\");const i=o.map(r=\u003eEC(r));if(i.some(r=\u003eNumber.isNaN(r)))throw new Error(\"Invalid PULSE() numeric value\");return{v1:i[0],v2:i[1],td:i[2],tr:i[3],tf:i[4],ton:i[5],period:i[6],ncycles:o[7]!=null?i[7]:1/0}}function YEo(t){const o=t.trim().replace(/^pwl\\s*\\(/i,\"(\").replace(/^\\(/,\"\").replace(/\\)$/,\"\").trim().split(/[\\s,]+/).filter(r=\u003er.length);if(o.length===0||o.length%2!==0)throw new Error(\"PWL(...) requires an even number of time/value pairs\");const i=[];for(let r=0;r\u003co.length;r+=2){const s=EC(o[r]),a=EC(o[r+1]);if(Number.isNaN(s)||Number.isNaN(a))throw new Error(\"Invalid PWL() numeric value\");i.push({t:s,v:a})}return i}function UEo(t,e){if(e\u003ct.td)return t.v1;const n=e-t.td,o=Math.floor(n/t.period);if(o\u003e=t.ncycles)return t.v1;const i=n-o*t.period;if(i\u003ct.tr){const r=i/Math.max(t.tr,xp);return t.v1+(t.v2-t.v1)*r}if(i\u003ct.tr+t.ton)return t.v2;if(i\u003ct.tr+t.ton+t.tf){const r=(i-(t.tr+t.ton))/Math.max(t.tf,xp);return t.v2+(t.v1-t.v2)*r}return t.v1}function KEo(t,e){if(t.length===0)return 0;if(e\u003c=t[0].t)return t[0].v;for(let n=1;n\u003ct.length;n++){const o=t[n-1],i=t[n];if(e\u003c=i.t){const r=Math.max(i.t-o.t,xp),s=(e-o.t)/r;return o.v+(i.v-o.v)*s}}return t[t.length-1].v}function VEo(t){const e=/\"[^\"]*\"|\\w+\\s*\\([^)]*\\)|\\([^()]*\\)|\\S+/g,n=[];let o;for(;(o=e.exec(t))!==null;)n.push(o[0]);return n}function $l(t,e,n){const o=t[e];if(o==null)throw new Error(n);return o}function zEo(t){const e=new Map,n=new Map,o={nodes:new OEo,R:[],C:[],L:[],V:[],S:[],D:[],analyses:{ac:null,tran:null},probes:{tran:[]},skipped:[],models:{vswitch:e,diode:n}},i=t.split(/\\r?\\n/);let r=!1;for(const a of i){let A=a.trim();if(!A||/^\\*/.test(A))continue;if(/^\\s*\\.end\\b/i.test(A))break;A=A.replace(/\\/\\/.*$/,\"\"),A=A.replace(/;.*$/,\"\");const c=VEo(A);if(c.length===0)continue;const l=c[0];if(l.length===0)continue;if(!r\u0026\u0026!/^[rclvgsmiqd]\\w*$/i.test(l)\u0026\u0026!/^\\./.test(l)){r=!0;continue}if(/^\\./.test(l)){const h=l.toLowerCase();if(h===\".ac\"){const d=$l(c,1,\".ac missing mode\").toLowerCase();if(d!==\"dec\"\u0026\u0026d!==\"lin\")throw new Error(\".ac supports 'dec' or 'lin'\");const p=parseInt($l(c,2,\".ac missing point count\"),10),m=EC($l(c,3,\".ac missing start frequency\")),_=EC($l(c,4,\".ac missing stop frequency\"));o.analyses.ac={mode:d,N:p,f1:m,f2:_}}else if(h===\".tran\"){const d=EC($l(c,1,\".tran missing timestep\")),p=EC($l(c,2,\".tran missing stop time\"));o.analyses.tran={dt:d,tstop:p}}else if(h===\".print\")if($l(c,1,\".print missing analysis type\").toLowerCase()===\"tran\"){const p=c.slice(2);for(const m of p){const _=m.match(/^v\\(([^)]+)\\)$/i);if(_\u0026\u0026_[1]){const f=_[1];o.probes.tran.some(I=\u003eI.toUpperCase()===f.toUpperCase())||o.probes.tran.push(f)}}}else o.skipped.push(A);else if(h===\".model\"){const d=$l(c,1,\".model missing name\");let m=$l(c,2,\".model missing type\"),_=\"\";if(m.includes(\"(\")){const I=m.indexOf(\"(\");_=m.slice(I+1),m=m.slice(0,I)}if(!_)_=c.slice(3).join(\" \").replace(/^\\(/,\"\").replace(/\\)$/,\"\");else{const I=c.slice(3).join(\" \").replace(/\\)$/,\"\");_=`${_} ${I}`.trim()}_=_.replace(/^\\(/,\"\").replace(/\\)$/,\"\").trim();const f=m.toLowerCase();if(f===\"vswitch\"||f===\"sw\"){const I={name:d,Ron:1,Roff:1e12,Von:0,Voff:0};let C,y;if(_.length\u003e0){const x=_.split(/[\\s,]+/).filter(Boolean);for(const E of x){const[B,S]=E.split(\"=\");if(!B||S==null)continue;const Q=B.toLowerCase(),w=EC(S);Number.isNaN(w)||(Q===\"ron\"?I.Ron=w:Q===\"roff\"?I.Roff=w:Q===\"von\"?I.Von=w:Q===\"voff\"?I.Voff=w:Q===\"vt\"?C=w:Q===\"vh\"\u0026\u0026(y=w))}}if(C!==void 0){const x=y??0;I.Von=C+x/2,I.Voff=C-x/2}e.set(d.toLowerCase(),I)}else if(f===\"d\"){const I={name:d,Is:1e-14,N:1};if(_.length\u003e0){const C=_.split(/[\\s,]+/).filter(Boolean);for(const y of C){const[x,E]=y.split(\"=\");if(!x||E==null)continue;const B=x.toLowerCase(),S=EC(E);Number.isNaN(S)||(B===\"is\"?I.Is=S:B===\"n\"\u0026\u0026(I.N=S))}}n.set(d.toLowerCase(),I)}else o.skipped.push(A)}else o.skipped.push(A);continue}const u=l.charAt(0).toLowerCase(),g=l;try{if(u===\"r\"){const h=o.nodes.getOrCreate($l(c,1,\"Resistor missing node\")),d=o.nodes.getOrCreate($l(c,2,\"Resistor missing node\")),p=EC($l(c,3,\"Resistor missing value\"));o.R.push({name:g,n1:h,n2:d,R:p})}else if(u===\"c\"){const h=o.nodes.getOrCreate($l(c,1,\"Capacitor missing node\")),d=o.nodes.getOrCreate($l(c,2,\"Capacitor missing node\")),p=EC($l(c,3,\"Capacitor missing value\"));o.C.push({name:g,n1:h,n2:d,C:p,vPrev:0})}else if(u===\"l\"){const h=o.nodes.getOrCreate($l(c,1,\"Inductor missing node\")),d=o.nodes.getOrCreate($l(c,2,\"Inductor missing node\")),p=EC($l(c,3,\"Inductor missing value\"));o.L.push({name:g,n1:h,n2:d,L:p,iPrev:0})}else if(u===\"v\"){const h=o.nodes.getOrCreate($l(c,1,\"Voltage source missing node\")),d=o.nodes.getOrCreate($l(c,2,\"Voltage source missing node\")),p={dc:0,acMag:0,acPhaseDeg:0,waveform:null,index:-1};let m=3;for(m\u003cc.length\u0026\u0026!/^[a-zA-Z]/.test(c[m])\u0026\u0026(p.dc=EC(c[m]),m++);m\u003cc.length;){const _=c[m].toLowerCase();if(_===\"dc\"){const f=$l(c,m+1,\"DC value missing\");p.dc=EC(f),m+=2}else if(_===\"ac\"){const f=$l(c,m+1,\"AC magnitude missing\");p.acMag=EC(f);const I=c[m+2];I!=null\u0026\u0026/^[+-]?\\d/.test(I)?(p.acPhaseDeg=EC(I),m+=3):m+=2}else if(_.startsWith(\"pulse\")){const f=_.includes(\"(\")?_:$l(c,m+1,\"PULSE() missing arguments\");if(!f||!/\\(.*\\)/.test(f))throw new Error(\"Malformed PULSE() specification\");const I=GEo(f);p.waveform=C=\u003eUEo(I,C),m+=_.includes(\"(\")?1:2}else if(_.startsWith(\"pwl\")){const f=_.includes(\"(\")?_:$l(c,m+1,\"PWL() missing arguments\");if(!f||!/\\(.*\\)/.test(f))throw new Error(\"Malformed PWL() specification\");const I=YEo(f);p.waveform=C=\u003eKEo(I,C),m+=_.includes(\"(\")?1:2}else/^\\(.*\\)$/.test(_),m++}o.V.push({name:g,n1:h,n2:d,dc:p.dc,acMag:p.acMag,acPhaseDeg:p.acPhaseDeg,waveform:p.waveform,index:p.index??-1})}else if(u===\"s\"){const h=o.nodes.getOrCreate($l(c,1,\"Switch missing node\")),d=o.nodes.getOrCreate($l(c,2,\"Switch missing node\")),p=o.nodes.getOrCreate($l(c,3,\"Switch missing control node\")),m=o.nodes.getOrCreate($l(c,4,\"Switch missing control node\")),_=$l(c,5,\"Switch missing model\");o.S.push({name:g,n1:h,n2:d,ncPos:p,ncNeg:m,modelName:_.toLowerCase(),model:null,isOn:!1})}else if(u===\"d\")if(c.length===4){const h=o.nodes.getOrCreate($l(c,1,\"Diode missing node\")),d=o.nodes.getOrCreate($l(c,2,\"Diode missing node\")),p=$l(c,3,\"Diode missing model\");o.D.push({name:g,nPlus:h,nMinus:d,modelName:p.toLowerCase(),model:null,vdPrev:0})}else o.skipped.push(A);else o.skipped.push(A)}catch(h){throw h instanceof Error?new Error(`Parse error on line: \"${A}\"\n${h.message}`):h}}const s=o.nodes.count()-1;for(let a=0;a\u003co.V.length;a++){const A=o.V[a];A\u0026\u0026(A.index=s+a)}for(const a of o.S){const A=e.get(a.modelName);if(!A)throw new Error(`Unknown .model ${a.modelName} referenced by switch ${a.name}`);a.model=A,a.isOn=!1}for(const a of o.D){const A=n.get(a.modelName);if(!A)throw new Error(`Unknown .model ${a.modelName} referenced by diode ${a.name}`);a.model=A}return o}var ql=class dQ{re;im;constructor(e=0,n=0){this.re=e,this.im=n}static from(e,n=0){return new dQ(e,n)}static fromPolar(e,n=0){const o=n*Math.PI/180;return new dQ(e*Math.cos(o),e*Math.sin(o))}clone(){return new dQ(this.re,this.im)}add(e){return new dQ(this.re+e.re,this.im+e.im)}sub(e){return new dQ(this.re-e.re,this.im-e.im)}mul(e){return new dQ(this.re*e.re-this.im*e.im,this.re*e.im+this.im*e.re)}div(e){const n=e.re*e.re+e.im*e.im;if(n\u003cxp)throw new Error(\"Complex divide by ~0\");return new dQ((this.re*e.re+this.im*e.im)/n,(this.im*e.re-this.re*e.im)/n)}inv(){const e=this.re*this.re+this.im*this.im;if(e\u003cxp)throw new Error(\"Complex invert by ~0\");return new dQ(this.re/e,-this.im/e)}abs(){return Math.hypot(this.re,this.im)}phaseDeg(){return Math.atan2(this.im,this.re)*180/Math.PI}};function JEo(t,e){const n=t.length;for(let i=0;i\u003cn;i++){const r=t[i],s=e[i];if(!r||!s)throw new Error(\"Matrix dimensions mismatch\");const a=r.map(A=\u003eA.clone());a.push(s.clone()),t[i]=a}for(let i=0;i\u003cn;i++){let r=i;const s=t[i];if(!s)throw new Error(\"Matrix row missing\");let a=s[i]?.abs()??0;for(let l=i+1;l\u003cn;l++){const u=t[l];if(!u)throw new Error(\"Matrix row missing\");const g=u[i]?.abs()??0;g\u003ea\u0026\u0026(a=g,r=l)}if(a\u003cxp)throw new Error(\"Singular matrix (complex)\");if(r!==i){const l=t[i];t[i]=t[r],t[r]=l}const A=t[i];if(!A)throw new Error(\"Pivot row missing\");const c=A[i];if(!c)throw new Error(\"Zero pivot encountered\");for(let l=i+1;l\u003cn;l++){const u=t[l];if(!u)throw new Error(\"Matrix row missing\");const g=u[i];if(!g)continue;const h=g.div(c);if(!(h.abs()\u003cxp))for(let d=i;d\u003c=n;d++){const p=u[d],m=A[d];!p||!m||(u[d]=p.sub(h.mul(m)))}}}const o=new Array(n);for(let i=n-1;i\u003e=0;i--){const r=t[i];if(!r)throw new Error(\"Matrix row missing\");let s=r[n];if(!s)throw new Error(\"Augmented column missing\");for(let A=i+1;A\u003cn;A++){const c=r[A],l=o[A];!c||!l||(s=s.sub(c.mul(l)))}const a=r[i];if(!a)throw new Error(\"Zero pivot on back-substitution\");o[i]=s.div(a)}return o}function WEo(t,e,n){if(t\u003c=0||e\u003c=0)throw new Error(\".ac frequencies must be \u003e 0\");e\u003ct\u0026\u0026([t,e]=[e,t]);const o=Math.log10(e/t),i=Math.max(1,Math.ceil(o*n)),r=[];for(let a=0;a\u003c=i;a++)r.push(t*Math.pow(10,a/n));const s=r[r.length-1];return(s==null||s\u003ce*(1-xp))\u0026\u0026r.push(e),r}function Cwe(t,e,n,o,i){const r=e.matrixIndexOfNode(n),s=e.matrixIndexOfNode(o);if(r\u003e=0){const a=t[r];if(!a)throw new Error(\"Matrix row missing while stamping\");a[r]=a[r]?.add(i)??i}if(s\u003e=0){const a=t[s];if(!a)throw new Error(\"Matrix row missing while stamping\");a[s]=a[s]?.add(i)??i}if(r\u003e=0\u0026\u0026s\u003e=0){const a=t[r],A=t[s];if(!a||!A)throw new Error(\"Matrix row missing while stamping\");a[s]=a[s]?.sub(i)??ql.from(0,0).sub(i),A[r]=A[r]?.sub(i)??ql.from(0,0).sub(i)}}function jEo(t,e,n,o,i){const r=n.matrixIndexOfNode(o.n1),s=n.matrixIndexOfNode(o.n2),a=o.index,A=ql.from(1,0),c=ql.from(-1,0);if(r\u003e=0){const u=t[r];if(!u)throw new Error(\"Matrix row missing while stamping voltage source\");u[a]=u[a]?.add(A)??A}if(s\u003e=0){const u=t[s];if(!u)throw new Error(\"Matrix row missing while stamping voltage source\");u[a]=u[a]?.sub(A)??c}const l=t[a];if(!l)throw new Error(\"Branch row missing while stamping voltage source\");r\u003e=0\u0026\u0026(l[r]=l[r]?.add(A)??A),s\u003e=0\u0026\u0026(l[s]=l[s]?.sub(A)??c),e[a]=(e[a]??ql.from(0,0)).add(i)}function $Eo(t){const{mode:e,N:n,f1:o,f2:i}=t;if(e===\"dec\")return WEo(o,i,n);const r=[],s=Math.max(2,n),a=(i-o)/(s-1);for(let A=0;A\u003cs;A++)r.push(o+A*a);return r}function qEo(t,e,n){const o=Array.from({length:n},()=\u003eArray.from({length:n},()=\u003eql.from(0,0))),i=Array.from({length:n},()=\u003eql.from(0,0)),r=2*Math.PI;for(const s of t.R){if(s.R\u003c=0)throw new Error(`R ${s.name} must be \u003e 0`);const a=ql.from(1/s.R,0);Cwe(o,t.nodes,s.n1,s.n2,a)}for(const s of t.C){const a=ql.from(0,r*e*s.C);Cwe(o,t.nodes,s.n1,s.n2,a)}for(const s of t.L){const a=ql.from(0,r*e*s.L),A=a.abs()\u003cxp?ql.from(0,0):ql.from(1,0).div(a);Cwe(o,t.nodes,s.n1,s.n2,A)}for(const s of t.V){const a=ql.fromPolar(s.acMag||0,s.acPhaseDeg||0);jEo(o,i,t.nodes,s,a)}return{A:o,b:i}}function XEo(t){if(!t.analyses.ac)return null;const{mode:e,N:n,f1:o,f2:i}=t.analyses.ac,r=t.nodes.count()-1,s=t.V.length,a=r+s,A=$Eo({mode:e,N:n,f1:o,f2:i}),c={};t.nodes.rev.forEach((g,h)=\u003e{h!==0\u0026\u0026(c[g]=[])});const l={},u=2*Math.PI;for(const g of A){const{A:h,b:d}=qEo(t,g,a),p=JEo(h,d);for(let m=1;m\u003ct.nodes.count();m++){const _=m-1,f=t.nodes.rev[m];if(!f)continue;const I=c[f];I\u0026\u0026I.push(p[_]??ql.from(0,0))}for(const m of t.R){const _=m.n1===0?ql.from(0,0):p[m.n1-1]??ql.from(0,0),f=m.n2===0?ql.from(0,0):p[m.n2-1]??ql.from(0,0),C=ql.from(1/m.R,0).mul(_.sub(f));(l[m.name]||=[]).push(C)}for(const m of t.C){const _=m.n1===0?ql.from(0,0):p[m.n1-1]??ql.from(0,0),f=m.n2===0?ql.from(0,0):p[m.n2-1]??ql.from(0,0),C=ql.from(0,u*g*m.C).mul(_.sub(f));(l[m.name]||=[]).push(C)}for(const m of t.L){const _=m.n1===0?ql.from(0,0):p[m.n1-1]??ql.from(0,0),f=m.n2===0?ql.from(0,0):p[m.n2-1]??ql.from(0,0),I=ql.from(0,u*g*m.L),y=(I.abs()\u003cxp?ql.from(0,0):ql.from(1,0).div(I)).mul(_.sub(f));(l[m.name]||=[]).push(y)}for(const m of t.V){const _=p[m.index]??ql.from(0,0);(l[m.name]||=[]).push(_)}}return{freqs:A,nodeVoltages:c,elementCurrents:l}}var Uwt=.02585;function ZEo(t,e){const n=t.length;for(let i=0;i\u003cn;i++){const r=t[i],s=e[i];if(!r||s==null)throw new Error(\"Matrix dimensions mismatch\");const a=r.slice();a.push(s),t[i]=a}for(let i=0;i\u003cn;i++){let r=i;const s=t[i];if(!s)throw new Error(\"Matrix row missing\");let a=Math.abs(s[i]??0);for(let l=i+1;l\u003cn;l++){const u=t[l];if(!u)throw new Error(\"Matrix row missing\");const g=Math.abs(u[i]??0);g\u003ea\u0026\u0026(a=g,r=l)}if(a\u003cxp)throw new Error(\"Singular matrix (real)\");if(r!==i){const l=t[i];t[i]=t[r],t[r]=l}const A=t[i];if(!A)throw new Error(\"Pivot row missing\");const c=A[i];if(c==null)throw new Error(\"Zero pivot encountered\");for(let l=i+1;l\u003cn;l++){const u=t[l];if(!u)throw new Error(\"Matrix row missing\");const g=u[i];if(g==null)continue;const h=g/c;if(!(Math.abs(h)\u003cxp))for(let d=i;d\u003c=n;d++){const p=u[d],m=A[d];p==null||m==null||(u[d]=p-h*m)}}}const o=new Array(n).fill(0);for(let i=n-1;i\u003e=0;i--){const r=t[i];if(!r)throw new Error(\"Matrix row missing\");let s=r[n];if(s==null)throw new Error(\"Augmented column missing\");for(let A=i+1;A\u003cn;A++){const c=r[A],l=o[A];c==null||l==null||(s-=c*l)}const a=r[i];if(a==null)throw new Error(\"Zero pivot on back-substitution\");o[i]=s/a}return o}function bj(t,e,n,o,i){const r=e.matrixIndexOfNode(n),s=e.matrixIndexOfNode(o);if(r\u003e=0){const a=t[r];if(!a)throw new Error(\"Matrix row missing while stamping\");a[r]=(a[r]??0)+i}if(s\u003e=0){const a=t[s];if(!a)throw new Error(\"Matrix row missing while stamping\");a[s]=(a[s]??0)+i}if(r\u003e=0\u0026\u0026s\u003e=0){const a=t[r],A=t[s];if(!a||!A)throw new Error(\"Matrix row missing while stamping\");a[s]=(a[s]??0)-i,A[r]=(A[r]??0)-i}}function ywe(t,e,n,o,i){const r=e.matrixIndexOfNode(n),s=e.matrixIndexOfNode(o);r\u003e=0\u0026\u0026(t[r]=(t[r]??0)-i),s\u003e=0\u0026\u0026(t[s]=(t[s]??0)+i)}function e5o(t,e,n,o,i){const r=n.matrixIndexOfNode(o.n1),s=n.matrixIndexOfNode(o.n2),a=o.index;if(r\u003e=0){const c=t[r];if(!c)throw new Error(\"Matrix row missing while stamping voltage source\");c[a]=(c[a]??0)+1}if(s\u003e=0){const c=t[s];if(!c)throw new Error(\"Matrix row missing while stamping voltage source\");c[a]=(c[a]??0)-1}const A=t[a];if(!A)throw new Error(\"Branch row missing while stamping voltage source\");r\u003e=0\u0026\u0026(A[r]=(A[r]??0)+1),s\u003e=0\u0026\u0026(A[s]=(A[s]??0)-1),e[a]=(e[a]??0)+i}function t5o(t,e){const n=t\u003exp?t:Math.max(e/1e3,xp),o=Math.max(1,Math.ceil(e/Math.max(n,xp)));return{dt:o\u003e0?e/o:e,steps:o}}function n5o(t,e,n,o,i,r,s){for(const a of n.R){const A=1/a.R;bj(t,n.nodes,a.n1,a.n2,A)}for(const a of n.C){const A=a.C/Math.max(i,xp);bj(t,n.nodes,a.n1,a.n2,A);const c=-A*a.vPrev;ywe(e,n.nodes,a.n1,a.n2,c)}for(const a of n.L){const A=Math.max(i,xp)/a.L;bj(t,n.nodes,a.n1,a.n2,A),ywe(e,n.nodes,a.n1,a.n2,a.iPrev)}for(const a of n.S){const A=a.model;if(!A)continue;const c=a.isOn?A.Ron:A.Roff,u=1/Math.max(Math.abs(c),xp);bj(t,n.nodes,a.n1,a.n2,u)}for(const a of n.V){const A=a.waveform?a.waveform(o):a.dc||0;e5o(t,e,n.nodes,a,A)}for(const a of n.D){const A=a.model;if(!A)continue;const{nPlus:c,nMinus:l}=a,u=n.nodes.matrixIndexOfNode(c),g=n.nodes.matrixIndexOfNode(l),h=c===0?0:r[u]??0,d=l===0?0:r[g]??0,p=h-d,m=s===0?a.vdPrev:p,_=A.N*Uwt;let f=m;m\u003e.8\u0026\u0026(f=.8),m\u003c-1\u0026\u0026(f=-1);const I=Math.exp(f/_),C=A.Is*(I-1),y=Math.max(A.Is/_*I,1e-12),x=C-y*f;bj(t,n.nodes,c,l,y),ywe(e,n.nodes,c,l,x)}}function o5o(t,e){let n=!1;for(const o of t.S){const i=o.model;if(!i)continue;const r=o.ncPos===0?0:e[o.ncPos-1]??0,s=o.ncNeg===0?0:e[o.ncNeg-1]??0,a=r-s;let A=o.isOn;o.isOn?a\u003ci.Voff\u0026\u0026(A=!1):a\u003ei.Von\u0026\u0026(A=!0),A!==o.isOn\u0026\u0026(o.isOn=A,n=!0)}return n}function i5o(t){if(!t.analyses.tran)return null;const{dt:e,tstop:n}=t.analyses.tran,{dt:o,steps:i}=t5o(e,n),r=t.nodes.count()-1,s=t.V.length,a=r+s,A=[],c={};t.nodes.rev.forEach((g,h)=\u003e{h!==0\u0026\u0026(c[g]=[])});const l={};let u=0;for(let g=0;g\u003c=i;g++,u=g*o){A.push(u);let h=new Array(a).fill(0);for(let d=0;d\u003c20;d++){const p=Array.from({length:a},()=\u003enew Array(a).fill(0)),m=new Array(a).fill(0);if(n5o(p,m,t,u,o,h,d),h=ZEo(p,m),!o5o(t,h)||d===19)break}for(let d=1;d\u003ct.nodes.count();d++){const p=d-1,m=t.nodes.rev[d];if(!m)continue;const _=c[m];_\u0026\u0026_.push(h[p]??0)}for(const d of t.R){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,_=(p-m)/d.R;(l[d.name]||=[]).push(_)}for(const d of t.C){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,_=d.C*(p-m-d.vPrev)/Math.max(o,xp);(l[d.name]||=[]).push(_)}for(const d of t.L){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,f=Math.max(o,xp)/d.L*(p-m)+d.iPrev;(l[d.name]||=[]).push(f)}for(const d of t.V){const p=h[d.index]??0;(l[d.name]||=[]).push(p)}for(const d of t.S){const p=d.model;if(!p)continue;const m=d.n1===0?0:h[d.n1-1]??0,_=d.n2===0?0:h[d.n2-1]??0,f=d.isOn?p.Ron:p.Roff,I=Math.max(Math.abs(f),xp),C=(m-_)/I;(l[d.name]||=[]).push(C)}for(const d of t.D){if(!d.model)continue;const{nPlus:p,nMinus:m,model:_}=d,f=p===0?0:h[p-1]??0,I=m===0?0:h[m-1]??0,C=f-I,y=_.N*Uwt,x=Math.exp(C/y),E=_.Is*(x-1);(l[d.name]||=[]).push(E)}for(const d of t.C){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0;d.vPrev=p-m}for(const d of t.L){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,_=Math.max(o,xp)/d.L;d.iPrev=_*(p-m)+d.iPrev}for(const d of t.D){const p=d.nPlus===0?0:h[d.nPlus-1]??0,m=d.nMinus===0?0:h[d.nMinus-1]??0;d.vdPrev=p-m}}if(t.probes.tran.length\u003e0){const g={},h=t.probes.tran.map(d=\u003ed.toUpperCase());for(const d in c)h.includes(d.toUpperCase())\u0026\u0026(g[d]=c[d]);return{times:A,nodeVoltages:g,elementCurrents:l}}return{times:A,nodeVoltages:c,elementCurrents:l}}function r5o(t){const e=zEo(t),n=XEo(e),o=i5o(e);return{circuit:e,ac:n,tran:o}}function s5o(t,e,n){if(!t||!e.analyses.tran)return[];const{dt:o,tstop:i}=e.analyses.tran,{times:r,nodeVoltages:s}=t,a=[];for(const A in s){const c=s[A];a.push({type:\"simulation_transient_voltage_graph\",simulation_transient_voltage_graph_id:`stvg_${n}_${A}`,simulation_experiment_id:n,timestamps_ms:r.map(l=\u003el*1e3),voltage_levels:c,time_per_step:o*1e3,start_time_ms:0,end_time_ms:i*1e3,name:`${A}`})}return a}var xwe=class{sourceSpan;leadingTrivia=[];trailingComment;constructor(t={}){this.sourceSpan=t.sourceSpan,this.trailingComment=t.trailingComment}getString(t){return this.toSource(t)}},Kwt=\"__default__\",Cb=class Zte extends xwe{originalSource;constructor(e={}){super(e),this.originalSource=e.originalSource}static classes={};static register(e){if(!e.spiceTokenKeys||e.spiceTokenKeys.length===0)throw new Error(\"Class must declare static spiceTokenKeys\");for(const n of e.spiceTokenKeys)Zte.classes[n.toLowerCase()]=e}static parseSpiceTokens(e){const n=e.tokens.find(r=\u003er.type!==\"whitespace\"),o=n===void 0?\"blank\":n.type===\"directive\"?`.${n.value}`:n.type===\"comment\"?\"comment\":n.type===\"identifier\"?n.raw[0]?.toUpperCase()??Kwt:n.type,i=Zte.classes[o.toLowerCase()]??(n?.type===\"identifier\"?Zte.classes.__unknown_element__:void 0)??Zte.classes[Kwt];if(i===void 0)throw new Error(`No SPICE card class registered for \"${o}\"`);return i.fromSpiceTokens(e)}},Zc=class extends Cb{cardKind=\"directive\"},yb=class extends Zc{},Vwt=class extends xwe{};function Sj(t,e){const n=t?.dialect??\"generic\";if(n!==\"pspice\")throw new Error(`PSpice-only construct ${e} cannot be serialized to target dialect \"${n}\". Serialize with { dialect: \"pspice\" } or translate/remove the construct before exporting.`)}function a5o(t){const e=[];let n=[],o,i;const r=a=\u003e{e.push({tokens:[],originalSource:\"\",range:{start:a.range.end,end:a.range.end},leadingNewlineRaw:a.raw})},s=()=\u003e{if(n.length===0)return;const a={start:n[0].range.start,end:n.at(-1).range.end};e.push({tokens:n,originalSource:n.map(A=\u003eA.raw).join(\"\"),range:a,leadingNewlineRaw:i}),n=[],o=void 0,i=void 0};for(const a of t){if(a.type===\"newline\"){if(o!==void 0){const A=o;s(),r(A),o=a;continue}n.length===0?r(a):o=a;continue}if(o!==void 0){if(a.type===\"continuation\")n.push(o,a),o=void 0;else{const A=o.raw;s(),i=A,o=void 0,n.push(a)}continue}if(a.type===\"continuation\"){n.push(a);continue}n.push(a)}return s(),e}function Ewe(t){return t.filter(e=\u003ee.type!==\"whitespace\"\u0026\u0026e.type!==\"newline\"\u0026\u0026e.type!==\"continuation\")}function zwt(t){if(t!==void 0)return\"value\"in t\u0026\u0026typeof t.value==\"string\"?t.value:t.raw}function A5o(t){const e=[];for(let n=0;n\u003ct.length;n+=1){const o=t[n];if(o===void 0)continue;const i=Bwe(o);if(i===\".control\"){const r=[];let s,a=o.originalSource;for(n+=1;n\u003ct.length;n+=1){const A=t[n];if(A!==void 0){if(a=`${a}${A.leadingNewlineRaw??`\n`}${A.originalSource}`,Bwe(A)===\".endc\"){s=A;break}r.push(A)}}e.push({...o,childCards:r,endCard:s,originalSource:a});continue}if(i===\".subckt\"){const r=[];let s,a=o.originalSource;for(n+=1;n\u003ct.length;n+=1){const A=t[n];if(A!==void 0){if(a=`${a}${A.leadingNewlineRaw??`\n`}${A.originalSource}`,Bwe(A)===\".ends\"){s=A;break}r.push(A)}}e.push({...o,childCards:r,endCard:s,originalSource:a});continue}e.push(o)}return e}function Bwe(t){const[e]=Ewe(t.tokens);if(e!==void 0)return e.type===\"directive\"?`.${e.value}`:zwt(e)}function aw(t){return zwt(t)}function Jwt(t){return t.type===\"punctuation\"\u0026\u0026(t.value===\"(\"||t.value===\")\"||t.value===\",\")}var kA=class B5n{constructor(e){this.card=e,this.tokens=Ewe(e.tokens),this.originalSource=e.originalSource}card;tokens;originalSource;static from(e){return new B5n(e)}head(){return aw(this.tokens[0])??\"\"}headRaw(){return this.tokens[0]?.raw??\"\"}headDesignator(){return this.tokens[0]?.raw[0]?.toUpperCase()??\"\"}arg(e){return aw(this.tokens[e+1])}args(){return this.tokens.slice(1).map(e=\u003eaw(e)??e.raw)}argsAfter(e){return this.args().slice(e)}argsUntilLast(){return this.args().slice(0,-1)}lastArg(){return this.args().at(-1)}keywordIndex(e){return this.findKeyword(e)?.argIndex??-1}argAfterKeyword(e){const n=this.findKeyword(e);return n===void 0?void 0:aw(this.tokens[n.tokenIndex+n.tokenCount])}hasKeyword(e){return this.findKeyword(e)!==void 0}sweepArg(e,n){const o=this.arg(e)?.toLowerCase();return o===\"oct\"||o===\"lin\"||o===\"dec\"?o:n}paramsAfter(e){return this.readParamsFrom(1+e)}paramAfter(e,n){const o=n.toLowerCase();return this.paramsAfter(e).find(([i])=\u003ei.toLowerCase()===o)?.[1]}paramsAfterExcept(e,n){const o=new Set(n.map(i=\u003ei.toLowerCase()));return this.paramsAfter(e).filter(([i])=\u003e!o.has(i.toLowerCase()))}paramsAfterKeyword(e){const n=this.findKeyword(e);if(n!==void 0)return this.readParamsFrom(n.tokenIndex+n.tokenCount)}argsBeforeKeyword(e,n=0){const i=this.findKeyword(e,n)?.tokenIndex??this.tokens.length;return this.tokens.slice(1+n,i).map(r=\u003eaw(r)??r.raw)}restJoined(e){return this.argsAfter(e).join(\" \")}findKeyword(e,n=0){const o=e.endsWith(\":\"),i=o?e.slice(0,-1):e;for(let r=1+n;r\u003cthis.tokens.length;r+=1){const s=this.tokens[r],a=aw(s);if(a!==void 0\u0026\u0026a.toLowerCase()===i.toLowerCase()){if(o){const A=this.tokens[r+1];if(A?.type!==\"punctuation\"||A.value!==\":\")continue;return{argIndex:r-1,tokenIndex:r,tokenCount:2}}return{argIndex:r-1,tokenIndex:r,tokenCount:1}}}}readParamsFrom(e){const n=[];let o=e;for(;o\u003cthis.tokens.length;){const i=this.tokens[o];if(i===void 0)break;if(Jwt(i)){o+=1;continue}const r=this.tokens[o+1],s=this.tokens[o+2];if(r?.type===\"operator\"\u0026\u0026r.value===\"=\"\u0026\u0026s!==void 0\u0026\u0026!Jwt(s)){const a=aw(i),A=aw(s);a!==void 0\u0026\u0026A!==void 0\u0026\u0026n.push([a,A]),o+=3;continue}o+=1}return n}},Wwt=class b5n{name;constructor(e){this.name=e}static ground(){return new b5n(\"0\")}getString(){return this.name}},jwt=class{raw;constructor(t){this.raw=t}getString(){return this.raw}},r0e=class{raw;constructor(t){this.raw=String(t)}getString(){return this.raw}};function $wt(t){return t instanceof Wwt?t:new Wwt(t)}function Tg(t){return t instanceof r0e?t:t instanceof jwt?new r0e(t.getString()):new r0e(t)}function c5o(t){return typeof t==\"object\"\u0026\u0026!(t instanceof r0e)\u0026\u0026!(t instanceof jwt)?{magnitude:t.magnitude===void 0?void 0:Tg(t.magnitude),phase:t.phase===void 0?void 0:Tg(t.phase)}:{magnitude:Tg(t)}}var Qj=class S5n{values;constructor(e=[]){e instanceof S5n?this.values=e.entries():Array.isArray(e)?this.values=e.map(([n,o])=\u003e[n,Tg(o)]):this.values=Object.entries(e).map(([n,o])=\u003e[n,Tg(o)])}get(e){return this.values.find(([n])=\u003en.toLowerCase()===e.toLowerCase())?.[1]}set(e,n){const o=this.values.findIndex(([r])=\u003er.toLowerCase()===e.toLowerCase()),i=[e,Tg(n)];o===-1?this.values.push(i):this.values[o]=i}delete(e){const n=this.values.findIndex(([o])=\u003eo.toLowerCase()===e.toLowerCase());return n===-1?!1:(this.values.splice(n,1),!0)}entries(){return this.values.map(([e,n])=\u003e[e,n])}getString(e){return this.values.map(([n,o])=\u003e`${n}=${o.getString()}`).join(\" \")}get isEmpty(){return this.values.length===0}},qwt=class Q5n extends yb{static spiceTokenKeys=[\".ac\"];type=\"ac\";command=\".ac\";sweep;points;start;stop;constructor(e){super(e),this.sweep=e.sweep,this.points=e.points,this.start=Tg(e.start),this.stop=Tg(e.stop)}static fromSpiceTokens(e){const n=kA.from(e);return new Q5n({sweep:n.sweepArg(0,\"dec\"),points:Number(n.arg(1)??0),start:n.arg(2)??\"\",stop:n.arg(3)??\"\",originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:`${this.command} ${this.sweep} ${this.points} ${this.start.getString()} ${this.stop.getString()}`}};yb.register(qwt);var l5o=class v5n extends Zc{static spiceTokenKeys=[\".control\"];type=\"control\";command=\".control\";lines;constructor(e){super(e),this.lines=e.lines}static fromSpiceTokens(e){const n=kA.from(e);return new v5n({lines:e.childCards?.map(o=\u003eo.originalSource)??[],originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.lines,\".endc\"].join(`\n`)}};Zc.register(l5o);var Xwt=class w5n extends yb{static spiceTokenKeys=[\".dc\"];type=\"dc\";command=\".dc\";sweeps;constructor(e){super(e);const n=\"sweeps\"in e?e.sweeps:[e];this.sweeps=n.map(o=\u003e({source:o.source,start:Tg(o.start),stop:Tg(o.stop),step:Tg(o.step)}))}static fromSpiceTokens(e){const n=kA.from(e);return new w5n({source:n.arg(0)??\"\",start:n.arg(1)??\"\",stop:n.arg(2)??\"\",step:n.arg(3)??\"\",originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.sweeps.flatMap(n=\u003e[n.source,n.start.getString(),n.stop.getString(),n.step.getString()])].join(\" \")}};yb.register(Xwt);var vj=class P5n extends Zc{static spiceTokenKeys=[\".end\"];type=\"end\";command=\".end\";static fromSpiceTokens(e){return new P5n({originalSource:kA.from(e).originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:this.command}};Zc.register(vj);var u5o=class M5n extends Zc{static spiceTokenKeys=[\".include\"];type=\"include\";command=\".include\";path;constructor(e,n={}){super(n),this.path=typeof e==\"string\"?e:e.path}static fromSpiceTokens(e){const n=kA.from(e);return new M5n(n.restJoined(0),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:`${this.command} ${this.path}`}};Zc.register(u5o);var g5o=class D5n extends Zc{static spiceTokenKeys=[\".lib\"];type=\"lib\";command=\".lib\";path;section;constructor(e={}){super(e),this.path=e.path,this.section=e.section}static fromSpiceTokens(e){const n=kA.from(e);return new D5n({path:n.arg(0),section:n.arg(1),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,this.path,this.section].filter(Boolean).join(\" \")}};Zc.register(g5o);var d5o=class N5n extends Zc{static spiceTokenKeys=[\".measure\"];type=\"measure\";command=\".measure\";analysis;name;expression;constructor(e){super(e),this.analysis=e.analysis,this.name=e.name,this.expression=e.expression}static fromSpiceTokens(e){const n=kA.from(e);return new N5n({analysis:n.arg(0),name:n.arg(1)??\"\",expression:n.restJoined(2),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,this.analysis,this.name,this.expression].filter(Boolean).join(\" \")}};Zc.register(d5o);var Zwt=class R5n extends Zc{static spiceTokenKeys=[\".model\"];type=\"model\";command=\".model\";name;modelType;params;constructor(e){super(e),this.name=e.name,this.modelType=e.type,this.params=new Qj(e.params)}static fromSpiceTokens(e){const n=kA.from(e);return new R5n({name:n.arg(0)??\"\",type:n.arg(1)??\"\",params:n.paramsAfter(2),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){if(e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0)return this.originalSource;const n=this.params.getString(e);return[this.command,this.name,this.modelType,n\u0026\u0026`(${n})`].filter(Boolean).join(\" \")}};Zc.register(Zwt);var ePt=class T5n extends yb{static spiceTokenKeys=[\".op\"];type=\"op\";command=\".op\";static fromSpiceTokens(e){return new T5n({originalSource:kA.from(e).originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:this.command}};yb.register(ePt);var tPt=class k5n extends Zc{static spiceTokenKeys=[\".options\"];type=\"options\";command=\".options\";values;constructor(e,n={}){super(n),this.values=new Qj(e)}static fromSpiceTokens(e){const n=kA.from(e);return new k5n(n.paramsAfter(0),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:`${this.command} ${this.values.getString(e)}`.trimEnd()}};Zc.register(tPt);var h5o=class F5n extends Zc{static spiceTokenKeys=[\".param\"];type=\"param\";command=\".param\";values;constructor(e,n={}){super(n),this.values=new Qj(e)}static fromSpiceTokens(e){const n=kA.from(e);return new F5n(n.paramsAfter(0),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:`${this.command} ${this.values.getString(e)}`.trimEnd()}};Zc.register(h5o);function p5o(t){const e=t.trim().replace(/^\\.print\\s+/i,\"\"),[n,...o]=e.split(/\\s+/),i=o.join(\" \");return{analysis:n,expressions:i.length===0?[]:i.split(\",\").map(r=\u003er.trim())}}var nPt=class L5n extends Zc{static spiceTokenKeys=[\".print\"];type=\"print\";command=\".print\";analysis;expressions;constructor(e={}){super(e),this.analysis=e.analysis,this.expressions=e.expressions??[]}static fromSpiceTokens(e){const n=kA.from(e);return new L5n({...p5o(n.originalSource),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,this.analysis,this.expressions.length\u003e0?this.expressions.join(\", \"):void 0].filter(Boolean).join(\" \")}};Zc.register(nPt);var m5o=class H5n extends Zc{static spiceTokenKeys=[\".probe\"];type=\"probe\";command=\".probe\";expressions;constructor(e=[],n={}){super(n),this.expressions=e}static fromSpiceTokens(e){const n=kA.from(e);return new H5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.expressions].join(\" \")}};Zc.register(m5o);var _5o=class O5n extends Zc{static spiceTokenKeys=[\".text\"];type=\"pspice_text\";command=\".TEXT\";args;constructor(e,n={}){super(n),this.args=e}static fromSpiceTokens(e){const n=kA.from(e);return new O5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return Sj(e,\".TEXT\"),e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(\" \")}};Zc.register(_5o);var f5o=class G5n extends Zc{static spiceTokenKeys=[\".vector\"];type=\"pspice_vector\";command=\".VECTOR\";args;constructor(e,n={}){super(n),this.args=e}static fromSpiceTokens(e){const n=kA.from(e);return new G5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return Sj(e,\".VECTOR\"),e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(\" \")}};Zc.register(f5o);var I5o=class Y5n extends Zc{static spiceTokenKeys=[\".watch\"];type=\"pspice_watch\";command=\".WATCH\";args;constructor(e,n={}){super(n),this.args=e}static fromSpiceTokens(e){const n=kA.from(e);return new Y5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return Sj(e,\".WATCH\"),e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(\" \")}};Zc.register(I5o);var oPt=class U5n extends Zc{static spiceTokenKeys=[\".save\"];type=\"save\";command=\".save\";expressions;constructor(e,n={}){super(n),this.expressions=e}static fromSpiceTokens(e){const n=kA.from(e);return new U5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.expressions].join(\" \")}};Zc.register(oPt);var iPt=class K5n extends Zc{static spiceTokenKeys=[\".subckt\"];type=\"subckt\";command=\".subckt\";name;pins;params;cards;endsName;constructor(e){super(e),this.name=e.name,this.pins=(e.pins??[]).map($wt),this.params=new Qj(e.params),this.cards=e.cards??[],this.endsName=e.endsName}static fromSpiceTokens(e){const n=kA.from(e),o=e.endCard===void 0?void 0:kA.from(e.endCard);return new K5n({name:n.arg(0)??\"\",pins:n.argsBeforeKeyword(\"params:\",1),params:n.paramsAfterKeyword(\"params:\"),cards:e.childCards?.map(i=\u003eCb.parseSpiceTokens(i)),endsName:o?.arg(0),originalSource:n.originalSource})}add(e){this.cards.push(e)}getChildren(){return this.cards}toSource(e){if(e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0)return this.originalSource;const n=this.params.getString(e);return[[this.command,this.name,...this.pins.map(o=\u003eo.getString()),n?\"params:\":void 0,n||void 0].filter(o=\u003eo!==void 0).join(\" \"),...this.cards.map(o=\u003eo.toSource(e)),[\".ends\",this.endsName??this.name].join(\" \")].join(`\n`)}};Zc.register(iPt);var C5o=class V5n extends Zc{static spiceTokenKeys=[\".temp\"];type=\"temp\";command=\".temp\";values;constructor(e,n={}){super(n),this.values=e.map(Tg)}static fromSpiceTokens(e){const n=kA.from(e);return new V5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.values.map(n=\u003en.getString())].join(\" \")}};Zc.register(C5o);var rPt=class z5n extends yb{static spiceTokenKeys=[\".tran\"];type=\"tran\";command=\".tran\";step;stop;start;maxStep;uic;pspiceOp;constructor(e){super(e),this.step=e.step===void 0?void 0:Tg(e.step),this.stop=Tg(e.stop),this.start=e.start===void 0?void 0:Tg(e.start),this.maxStep=e.maxStep===void 0?void 0:Tg(e.maxStep),this.uic=e.uic,this.pspiceOp=e.pspiceOp??!1}static fromSpiceTokens(e){const n=kA.from(e);return new z5n({step:n.arg(0),stop:n.arg(1)??\"\",start:n.arg(2),maxStep:n.arg(3),uic:n.hasKeyword(\"uic\"),pspiceOp:n.originalSource.trimStart().toLowerCase().startsWith(\".tran/op\"),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return this.pspiceOp\u0026\u0026Sj(e,\".TRAN/OP\"),e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,this.step?.getString(),this.stop.getString(),this.start?.getString(),this.maxStep?.getString(),this.uic?\"UIC\":void 0].filter(Boolean).join(\" \")}};yb.register(rPt);var y5o=class J5n extends Zc{static spiceTokenKeys=[\"__default__\"];type=\"unknown_dot_command\";command;args;constructor(e){super(e),this.command=e.command,this.args=e.args}static fromSpiceTokens(e){const n=kA.from(e);return new J5n({command:n.headRaw(),args:n.args(),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(\" \")}};Zc.register(y5o);var wu=class extends Cb{cardKind=\"element\";name;nodes;params;constructor(t){super(t),this.name=t.name,this.nodes=(t.nodes??[]).map($wt),this.params=new Qj(t.params)}renameNode(t,e){for(const n of this.nodes)n.name===t\u0026\u0026(n.name=e)}getChildren(){return[]}formatParts(t,e){if(e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0)return this.originalSource;const n=this.params.getString(e);return[...t,n||void 0].filter(o=\u003eo!==void 0\u0026\u0026o.length\u003e0).join(\" \")}},x5o=class W5n extends wu{static spiceTokenKeys=[\"Q\"];type=\"bjt\";model;constructor(e){super({...e,nodes:e.nodes.filter(n=\u003en!==void 0)}),this.model=e.model}static fromSpiceTokens(e){const n=kA.from(e),o=n.args().length\u003e4,i=o?[n.arg(0)??\"\",n.arg(1)??\"\",n.arg(2)??\"\",n.arg(3)??\"\"]:[n.arg(0)??\"\",n.arg(1)??\"\",n.arg(2)??\"\"],r=o?4:3;return new W5n({name:n.head(),nodes:i,model:n.arg(r)??\"\",params:n.paramsAfter(r+1),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.model],e)}};wu.register(x5o);var E5o=class j5n extends wu{static spiceTokenKeys=[\"C\"];type=\"capacitor\";capacitance;initialCondition;constructor(e){super(e),this.capacitance=Tg(e.capacitance),this.initialCondition=e.ic===void 0?void 0:Tg(e.ic)}static fromSpiceTokens(e){const n=kA.from(e);return new j5n({name:n.head(),nodes:[n.arg(0)??\"\",n.arg(1)??\"\"],capacitance:n.arg(2)??\"\",ic:n.paramAfter(3,\"ic\"),params:n.paramsAfterExcept(3,[\"ic\"]),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.capacitance.getString(),this.initialCondition===void 0?void 0:`IC=${this.initialCondition.getString()}`],e)}};wu.register(E5o);var B5o=class $5n extends wu{static spiceTokenKeys=[\"F\"];type=\"cccs\";source;gain;constructor(e){super({...e,nodes:e.output}),this.source=e.source,this.gain=Tg(e.gain)}static fromSpiceTokens(e){const n=kA.from(e);return new $5n({name:n.head(),output:[n.arg(0)??\"\",n.arg(1)??\"\"],source:n.arg(2)??\"\",gain:n.arg(3)??\"\",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.source,this.gain.getString()],e)}};wu.register(B5o);var b5o=class q5n extends wu{static spiceTokenKeys=[\"H\"];type=\"ccvs\";source;transresistance;constructor(e){super({...e,nodes:e.output}),this.source=e.source,this.transresistance=Tg(e.transresistance)}static fromSpiceTokens(e){const n=kA.from(e);return new q5n({name:n.head(),output:[n.arg(0)??\"\",n.arg(1)??\"\"],source:n.arg(2)??\"\",transresistance:n.arg(3)??\"\",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.source,this.transresistance.getString()],e)}};wu.register(b5o);function sPt(t){const e={},n=t.argAfterKeyword(\"dc\"),o=t.keywordIndex(\"ac\");return n!==void 0?e.dc=n:o===-1\u0026\u0026(e.dc=t.arg(2)),o!==-1\u0026\u0026(e.ac={magnitude:t.arg(o+1),phase:t.arg(o+2)}),e}var s0e=class extends wu{dc;ac;transient;constructor(t){super(t),this.dc=t.dc===void 0?void 0:Tg(t.dc),this.ac=t.ac===void 0?void 0:c5o(t.ac),this.transient=t.transient}getChildren(){return this.transient===void 0?[]:[this.transient]}sourceParts(){const t=[this.name,...this.nodes.map(e=\u003ee.getString())];return this.dc!==void 0\u0026\u0026t.push(\"DC\",this.dc.getString()),this.ac!==void 0\u0026\u0026(t.push(\"AC\"),this.ac.magnitude!==void 0\u0026\u0026t.push(this.ac.magnitude.getString()),this.ac.phase!==void 0\u0026\u0026t.push(this.ac.phase.getString())),this.transient!==void 0\u0026\u0026t.push(this.transient.toSource()),t}},S5o=class X5n extends s0e{static spiceTokenKeys=[\"I\"];type=\"current_source\";static fromSpiceTokens(e){const n=kA.from(e),o=sPt(n);return new X5n({name:n.head(),nodes:[n.arg(0)??\"\",n.arg(1)??\"\"],dc:o.dc,ac:o.ac,originalSource:n.originalSource})}toSource(e){return this.formatParts(this.sourceParts(),e)}};s0e.register(S5o);var Q5o=class Z5n extends wu{static spiceTokenKeys=[\"D\"];type=\"diode\";model;constructor(e){super(e),this.model=e.model}static fromSpiceTokens(e){const n=kA.from(e);return new Z5n({name:n.head(),nodes:[n.arg(0)??\"\",n.arg(1)??\"\"],model:n.arg(2)??\"\",params:n.paramsAfter(3),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.model],e)}};wu.register(Q5o);var v5o=class e4n extends wu{static spiceTokenKeys=[\"L\"];type=\"inductor\";inductance;initialCondition;constructor(e){super(e),this.inductance=Tg(e.inductance),this.initialCondition=e.ic===void 0?void 0:Tg(e.ic)}static fromSpiceTokens(e){const n=kA.from(e);return new e4n({name:n.head(),nodes:[n.arg(0)??\"\",n.arg(1)??\"\"],inductance:n.arg(2)??\"\",ic:n.paramAfter(3,\"ic\"),params:n.paramsAfterExcept(3,[\"ic\"]),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.inductance.getString(),this.initialCondition===void 0?void 0:`IC=${this.initialCondition.getString()}`],e)}};wu.register(v5o);var w5o=class t4n extends wu{static spiceTokenKeys=[\"M\"];type=\"mosfet\";model;constructor(e){super(e),this.model=e.model}static fromSpiceTokens(e){const n=kA.from(e);return new t4n({name:n.head(),nodes:[n.arg(0)??\"\",n.arg(1)??\"\",n.arg(2)??\"\",n.arg(3)??\"\"],model:n.arg(4)??\"\",params:n.paramsAfter(5),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.model],e)}};wu.register(w5o);var P5o=new Set([\"VALUE\",\"TABLE\",\"LAPLACE\",\"FREQ\",\"CHEBYSHEV\"]);function aPt(t){return t!==void 0\u0026\u0026P5o.has(t.toUpperCase())}function APt(t,e,n){const o=t?.dialect??\"generic\";o===\"pspice\"||o===\"ngspice\"\u0026\u0026(e===\"VALUE\"||e===\"TABLE\")||Sj(t,n)}var M5o=class n4n extends wu{type=\"pspice_abm_voltage_source\";form;args;constructor(e){super({...e,nodes:e.output}),this.form=e.form,this.args=e.args}static fromTokenCard(e){return new n4n({name:e.head(),output:[e.arg(0)??\"\",e.arg(1)??\"\"],form:e.arg(2)?.toUpperCase(),args:e.argsAfter(3),originalSource:e.originalSource})}toSource(e){return APt(e,this.form,`${this.form} behavioral voltage source`),this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.form,...this.args],e)}},D5o=class o4n extends wu{type=\"pspice_abm_current_source\";form;args;constructor(e){super({...e,nodes:e.output}),this.form=e.form,this.args=e.args}static fromTokenCard(e){return new o4n({name:e.head(),output:[e.arg(0)??\"\",e.arg(1)??\"\"],form:e.arg(2)?.toUpperCase(),args:e.argsAfter(3),originalSource:e.originalSource})}toSource(e){return APt(e,this.form,`${this.form} behavioral current source`),this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.form,...this.args],e)}};function N5o(t){return M5o.fromTokenCard(kA.from(t))}function R5o(t){return D5o.fromTokenCard(kA.from(t))}var T5o=class i4n extends wu{static spiceTokenKeys=[\"R\"];type=\"resistor\";resistance;constructor(e){super({...e,nodes:e.nodes.filter(n=\u003en!==void 0)}),this.resistance=Tg(e.resistance)}static fromSpiceTokens(e){const n=kA.from(e);return new i4n({name:n.head(),nodes:[n.arg(0)??\"\",n.arg(1)??\"\"],resistance:n.arg(2)??\"\",params:n.paramsAfter(3),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.resistance.getString()],e)}};wu.register(T5o);var k5o=class r4n extends wu{static spiceTokenKeys=[\"X\"];type=\"subckt_instance\";subckt;constructor(e){super(e),this.subckt=e.subckt}static fromSpiceTokens(e){const n=kA.from(e);return new r4n({name:n.head(),nodes:n.argsUntilLast(),subckt:n.lastArg()??\"\",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.subckt],e)}};wu.register(k5o);var F5o=class s4n extends wu{static spiceTokenKeys=[\"__unknown_element__\"];type=\"unknown_element\";designator;tokens;constructor(e){super(e),this.designator=e.designator,this.tokens=e.tokens}static fromSpiceTokens(e){const n=kA.from(e),o=n.head();return new s4n({name:o,designator:n.headDesignator(),tokens:n.args(),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.tokens],e)}};wu.register(F5o);var L5o=class a4n extends wu{static spiceTokenKeys=[\"G\"];type=\"vccs\";transconductance;constructor(e){super({...e,nodes:[...e.output,...e.control]}),this.transconductance=Tg(e.transconductance)}static fromSpiceTokens(e){const n=kA.from(e);return aPt(n.arg(2))?R5o(e):new a4n({name:n.head(),output:[n.arg(0)??\"\",n.arg(1)??\"\"],control:[n.arg(2)??\"\",n.arg(3)??\"\"],transconductance:n.arg(4)??\"\",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.transconductance.getString()],e)}};wu.register(L5o);var H5o=class A4n extends wu{static spiceTokenKeys=[\"E\"];type=\"vcvs\";gain;constructor(e){super({...e,nodes:[...e.output,...e.control]}),this.gain=Tg(e.gain)}static fromSpiceTokens(e){const n=kA.from(e);return aPt(n.arg(2))?N5o(e):new A4n({name:n.head(),output:[n.arg(0)??\"\",n.arg(1)??\"\"],control:[n.arg(2)??\"\",n.arg(3)??\"\"],gain:n.arg(4)??\"\",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=\u003en.getString()),this.gain.getString()],e)}};wu.register(H5o);var O5o=class c4n extends s0e{static spiceTokenKeys=[\"V\"];type=\"voltage_source\";static fromSpiceTokens(e){const n=kA.from(e),o=sPt(n);return new c4n({name:n.head(),nodes:[n.arg(0)??\"\",n.arg(1)??\"\"],dc:o.dc,ac:o.ac,originalSource:n.originalSource})}toSource(e){return this.formatParts(this.sourceParts(),e)}};s0e.register(O5o);var G5o=class extends xwe{type=\"netlist\";title;cards;end;dialect;trailingNewline;lineEnding;constructor(e={}){super(),this.title=e.title,this.cards=e.cards??[],this.end=e.end instanceof vj?e.end:e.end===!1?void 0:new vj,this.dialect=e.dialect??\"generic\",this.trailingNewline=e.trailingNewline??!0,this.lineEnding=e.lineEnding??`\n`}get elements(){return this.cards.filter(e=\u003ee.cardKind===\"element\")}get directives(){return this.cards.filter(e=\u003ee.cardKind===\"directive\")}get subckts(){return this.cards.filter(e=\u003ee instanceof iPt)}get models(){return this.cards.filter(e=\u003ee instanceof Zwt)}get analyses(){return this.cards.filter(e=\u003ee instanceof yb)}add(e){this.cards.push(e)}addAll(e){this.cards.push(...e)}findElement(e){return this.elements.find(n=\u003en.name.toLowerCase()===e.toLowerCase())}findModel(e){return this.models.find(n=\u003en.name.toLowerCase()===e.toLowerCase())}findSubckt(e){return this.subckts.find(n=\u003en.name.toLowerCase()===e.toLowerCase())}renameNode(e,n){for(const o of this.elements)o.renameNode(e,n);for(const o of this.subckts)for(const i of o.cards)i instanceof wu\u0026\u0026i.renameNode(e,n)}getChildren(){return[...this.cards,...this.end===void 0?[]:[this.end]]}getString(e={}){return this.toSource(e)}toSource(e={}){const n=e.end??\"auto\",i=[this.title,...this.cards.map(r=\u003er.toSource(e)),n===\"never\"?void 0:n===\"always\"?(this.end??new vj).toSource(e):this.end?.toSource(e)].filter(r=\u003er!==void 0).join(this.lineEnding);return this.trailingNewline?`${i}${this.lineEnding}`:i}},Y5o=class l4n extends Vwt{static spiceTokenKeys=[\"blank\"];type=\"blank\";cardKind=\"blank\";originalSource;constructor(e={}){super(),this.originalSource=e.originalSource}static fromSpiceTokens(e){return new l4n({originalSource:kA.from(e).originalSource})}getChildren(){return[]}toSource(){return this.originalSource??\"\"}};Cb.register(Y5o);var U5o=class yit extends Vwt{static spiceTokenKeys=[\"comment\"];type=\"comment\";cardKind=\"comment\";text;marker;originalSource;constructor(e,n={}){super(),this.text=e,this.marker=n.marker??\"*\",this.originalSource=n.originalSource}static fromSpiceTokens(e){const n=kA.from(e),[o]=n.tokens;return o?.type===\"comment\"?new yit(o.value,{marker:o.marker,originalSource:n.originalSource}):new yit(n.originalSource,{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!==\"pretty\"\u0026\u0026this.originalSource!==void 0?this.originalSource:`${this.marker} ${this.text}`.trimEnd()}};Cb.register(U5o);var K5o=class u4n extends Cb{static spiceTokenKeys=[\"raw\",\"error\",\"number\",\"operator\",\"punctuation\"];type=\"raw_card\";cardKind=\"raw\";source;constructor(e){super({originalSource:e}),this.source=e}static fromSpiceTokens(e){return new u4n(kA.from(e).originalSource)}getChildren(){return[]}toSource(){return this.source}};Cb.register(K5o);var V5o=/^[+-]?(?:(?:\\d+(?:\\.\\d*)?)|(?:\\.\\d+))(?:[eE][+-]?\\d+)?([a-zA-Z]+)?$/,cPt=new Set([\"=\",\"+\",\"-\",\"*\",\"/\",\"^\"]),lPt=new Set([\"(\",\")\",\",\",\":\"]),z5o={f:1e-15,p:1e-12,n:1e-9,u:1e-6,m:.001,k:1e3,meg:1e6,g:1e9,t:1e12};function J5o(t,e={}){const n=e.preserveWhitespace??!1,o=e.preserveComments??!0,i=e.normalizeNumbers??!0,r=[],s=[];let a=0,A=1,c=1,l=!0;const u=()=\u003e({offset:a,line:A,column:c}),g=C=\u003e({start:C,end:u()}),h=C=\u003e{for(let y=0;y\u003cC.length;y+=1){const x=C[y];a+=1,x===`\n`?(A+=1,c=1,l=!0):c+=1}},d=C=\u003e{C.type===\"whitespace\"\u0026\u0026!n||C.type===\"comment\"\u0026\u0026!o||r.push(C)},p=C=\u003eC!==void 0\u0026\u0026C\u003e=\"0\"\u0026\u0026C\u003c=\"9\",m=C=\u003e{const y=t[C],x=t[C+1];return p(y)||y===\".\"\u0026\u0026p(x)?!0:(y===\"+\"||y===\"-\")\u0026\u0026!_()?!1:(y===\"+\"||y===\"-\")\u0026\u0026p(x)?!0:(y===\"+\"||y===\"-\")\u0026\u0026x===\".\"\u0026\u0026p(t[C+2])},_=()=\u003e{const C=r.at(-1);return C===void 0||C.type===\"whitespace\"||C.type===\"newline\"||C.type===\"continuation\"||C.type===\"operator\"||C.type===\"punctuation\"},f=()=\u003e{let C=\"\";for((t[a]===\"+\"||t[a]===\"-\")\u0026\u0026(C+=t[a],h(t[a]));p(t[a]);)C+=t[a],h(t[a]);if(t[a]===\".\")for(C+=t[a],h(t[a]);p(t[a]);)C+=t[a],h(t[a]);if(t[a]===\"e\"||t[a]===\"E\")for(C+=t[a],h(t[a]),(t[a]===\"+\"||t[a]===\"-\")\u0026\u0026(C+=t[a],h(t[a]));p(t[a]);)C+=t[a],h(t[a]);for(;t[a]!==void 0\u0026\u0026t[a]\u003e=\"a\"\u0026\u0026t[a]\u003c=\"z\"||t[a]!==void 0\u0026\u0026t[a]\u003e=\"A\"\u0026\u0026t[a]\u003c=\"Z\";)C+=t[a],h(t[a]);return C},I=(C,y)=\u003e{const x=C.match(V5o);if(!x)return!1;const E=x[1],B=E?.toLowerCase(),S=E===void 0?C:C.slice(0,-E.length),Q=Number(S),w=i\u0026\u0026!Number.isNaN(Q)?Q*(B===void 0?1:z5o[B]??1):null;return d({type:\"number\",raw:C,value:w,unitSuffix:E,range:y}),!0};for(;a\u003ct.length;){const C=u(),y=t[a],x=t[a+1];if(y===\"\\r\"||y===`\n`){const S=y===\"\\r\"\u0026\u0026x===`\n`?`\\r\n`:y;h(S),d({type:\"newline\",raw:S,range:g(C)});continue}if(y===\" \"||y===\"\t\"){let S=\"\";for(;t[a]===\" \"||t[a]===\"\t\";)S+=t[a],h(t[a]);d({type:\"whitespace\",raw:S,range:g(C)});continue}if(l\u0026\u0026y===\"+\"){h(y),l=!1,d({type:\"continuation\",raw:y,range:g(C)});continue}if(l\u0026\u0026y===\"*\"||y===\";\"||y===\"$\"){const S=y;let Q=\"\";for(;a\u003ct.length\u0026\u0026t[a]!==`\n`\u0026\u0026t[a]!==\"\\r\";)Q+=t[a],h(t[a]);l=!1,d({type:\"comment\",marker:S,raw:Q,value:Q.slice(1).trimStart(),range:g(C)});continue}if(y===\"#\"){let S=\"\";for(;a\u003ct.length\u0026\u0026t[a]!==`\n`\u0026\u0026t[a]!==\"\\r\";)S+=t[a],h(t[a]);const Q=g(C),w={message:\"Unsupported preprocessor-style line\",raw:S,range:Q};s.push(w),l=!1,d({type:\"error\",raw:S,message:w.message,range:Q});continue}if(y==='\"'||y===\"'\"){const S=y;let Q=\"\",w=\"\";for(h(y),Q+=y;a\u003ct.length\u0026\u0026t[a]!==S\u0026\u0026!(t[a]===`\n`||t[a]===\"\\r\");)w+=t[a],Q+=t[a],h(t[a]);if(t[a]===S)Q+=S,h(S),d({type:\"string\",quote:S,raw:Q,value:w,range:g(C)});else{const M=g(C),k={message:\"Unterminated string\",raw:Q,range:M};s.push(k),d({type:\"error\",raw:Q,message:k.message,range:M})}l=!1;continue}if(m(a)){const S=f();if(l=!1,I(S,g(C)))continue}if(cPt.has(y)){h(y),l=!1,d({type:\"operator\",raw:y,value:y,range:g(C)});continue}if(lPt.has(y)){h(y),l=!1,d({type:\"punctuation\",raw:y,value:y,range:g(C)});continue}let E=\"\";for(;a\u003ct.length\u0026\u0026![\" \",\"\t\",\"\\r\",`\n`,'\"',\"'\",\";\",\"$\"].includes(t[a])\u0026\u0026!cPt.has(t[a])\u0026\u0026!lPt.has(t[a]);)E+=t[a],h(t[a]);if(E.length===0){h(y);const S=g(C),Q={message:`Unexpected character \"${y}\"`,raw:y,range:S};s.push(Q),d({type:\"error\",raw:y,message:Q.message,range:S});continue}l=!1;const B=g(C);if(E.startsWith(\".\")){d({type:\"directive\",raw:E,value:E.slice(1).toLowerCase(),range:B});continue}I(E,B)||d({type:\"identifier\",raw:E,value:E,range:B})}return{tokens:r,errors:s,source:{text:t,lineCount:A}}}function W5o(t,e={}){const n=X5o(t),o=$5o(t),i=o[0],r=i!==void 0\u0026\u0026q5o(i)?i.originalSource:void 0,s=r===void 0?o:o.slice(1),a=j5o(s),A=a.findIndex(l=\u003el instanceof vj),c=A===-1?void 0:a.splice(A,1)[0];return new G5o({title:r,cards:a,end:c??!1,dialect:e.dialect,trailingNewline:n.trailingNewline,lineEnding:n.lineEnding})}function j5o(t,e){return t.map(n=\u003eCb.parseSpiceTokens(n))}function $5o(t){const e=J5o(t,{preserveWhitespace:!0,preserveComments:!0,normalizeNumbers:!0});return A5o(a5o(e.tokens))}function q5o(t){const e=Ewe(t.tokens),[n]=e;return n===void 0||n.type===\"directive\"||n.type===\"comment\"||n.type!==\"identifier\"?!1:e.length===1?!0:Cb.classes[n.raw[0]?.toLowerCase()??\"\"]===void 0}function X5o(t){const e=t.includes(`\\r\n`)?`\\r\n`:t.includes(\"\\r\")?\"\\r\":`\n`;return{trailingNewline:e===`\\r\n`?t.endsWith(`\\r\n`):t.endsWith(e),lineEnding:e}}var Z5o=t=\u003e{const e=[];e.push(t.title),t.models.size\u003e0\u0026\u0026e.push(...Array.from(t.models.values()));for(const n of t.components)e.push(n.toSpiceString());t.optionStatements.length\u003e0\u0026\u0026e.push(...t.optionStatements),t.metadataComments.length\u003e0\u0026\u0026e.push(...t.metadataComments);for(const n of t.subcircuits)e.push(n.toSpiceString());if(t.printStatements.length\u003e0\u0026\u0026e.push(...t.printStatements),t.saveStatements.length\u003e0\u0026\u0026e.push(...t.saveStatements),t.controls.length\u003e0\u0026\u0026(e.push(\".control\"),e.push(...t.controls),e.push(\".endc\")),t.analysisCommand){const n=t.analysisCommand.trim().toLowerCase().split(/\\s+/)[0];e.some(i=\u003ei.trim().toLowerCase().split(/\\s+/)[0]===n)||e.push(t.analysisCommand)}return e.push(\".END\"),e.join(`\n`)},e4o=class{title;components;nodes;controls;subcircuits;models;optionStatements;metadataComments;analysisCommand;printStatements;saveStatements;constructor(t=\"Circuit Netlist\"){this.title=t,this.components=[],this.nodes=new Set,this.controls=[],this.subcircuits=[],this.models=new Map,this.optionStatements=[],this.metadataComments=[],this.analysisCommand=null,this.printStatements=[],this.saveStatements=[]}addComponent(t){this.components.push(t);for(const e of t.nodes)this.nodes.add(e)}addSubcircuit(t){this.subcircuits.find(e=\u003ee.name===t.name)||this.subcircuits.push(t)}get tranCommand(){return this.analysisCommand?.trim().toLowerCase().startsWith(\".tran\")?this.analysisCommand:null}set tranCommand(t){this.analysisCommand=t}toSpiceString(){return Z5o(this)}},Uy=class{name;command;nodes;constructor(t,e,n){this.name=t,this.command=e,this.nodes=n}toSpiceString(){return this.command.toSpiceString()}},t4o=class{commandName=\"bjt\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,collector:e,base:n,emitter:o,substrate:i,model:r,area:s}=this.props;let a=`Q${t} ${e} ${n} ${o}`;return i\u0026\u0026(a+=` ${i}`),a+=` ${r}`,s\u0026\u0026(a+=` ${s}`),a}},n4o=class{commandName=\"capacitor\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,modelName:o,value:i,initialCondition:r}=this.props;let s=`C${t} ${e} ${n}`;return o\u0026\u0026(s+=` ${o}`),s+=` ${i}`,r\u0026\u0026(s+=` IC=${r}`),s}},uPt=class{commandName=\"current_source\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,value:o,acMagnitude:i,acPhase:r}=this.props;let s=`I${t} ${e} ${n}`;return o\u0026\u0026(s+=` ${o}`),i\u0026\u0026(s+=` AC ${i}`,r\u0026\u0026(s+=` ${r}`)),s}},o4o=class{commandName=\"diode\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,model:o,area:i}=this.props;let r=`D${t} ${e} ${n} ${o}`;return i\u0026\u0026(r+=` ${i}`),r}},i4o=class{commandName=\"inductor\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,model:o,value:i,initialCondition:r}=this.props;let s=`L${t} ${e} ${n}`;return o\u0026\u0026(s+=` ${o}`),s+=` ${i}`,r\u0026\u0026(s+=` IC=${r}`),s}},r4o=class{commandName=\"mosfet\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,drain:e,gate:n,source:o,substrate:i,model:r,length:s,width:a,drainArea:A,sourceArea:c,drainPerimeter:l,sourcePerimeter:u,drainResistance:g,sourceResistance:h}=this.props;let d=`M${t} ${e} ${n} ${o} ${i} ${r}`;return Object.entries({L:s,W:a,AD:A,AS:c,PD:l,PS:u,NRD:g,NRS:h}).forEach(([m,_])=\u003e{_\u0026\u0026(d+=` ${m}=${_}`)}),d}},s4o=class{commandName=\"resistor\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,model:o,value:i}=this.props;let r=`R${t} ${e} ${n}`;return o\u0026\u0026(r+=` ${o}`),r+=` ${i}`,r}},gPt=class{commandName=\"subcircuit_call\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,nodes:e,subcircuitName:n}=this.props;return`X${t} ${e.join(\" \")} ${n}`}},a4o=class{commandName=\"voltage_controlled_switch\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,positiveControl:o,negativeControl:i,model:r}=this.props;return`S${t} ${e} ${n} ${o} ${i} ${r}`}},a0e=class{commandName=\"voltage_source\";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,value:o,acMagnitude:i,acPhase:r}=this.props;let s=`V${t} ${e} ${n}`;return o\u0026\u0026(s+=` ${o}`),i\u0026\u0026(s+=` AC ${i}`,r\u0026\u0026(s+=` ${r}`)),s}};function A4o(t){return t\u003e=1e6?`${t/1e6}MEG`:t\u003e=1e3?`${t/1e3}K`:t.toString()}function c4o(t){return t\u003e=.001?`${t*1e3}M`:t\u003e=1e-6?`${t*1e6}U`:t\u003e=1e-9?`${t*1e9}N`:t\u003e=1e-12?`${t*1e12}P`:t.toString()}function l4o(t){return t\u003e=1?t.toString():t\u003e=.001?`${t*1e3}m`:t\u003e=1e-6?`${t*1e6}u`:t\u003e=1e-9?`${t*1e9}n`:t\u003e=1e-12?`${t*1e12}p`:t.toString()}function dPt(t,e){if(!t)return e;const n=t.replace(/[^A-Za-z0-9_]/g,\"_\");return n?/^[0-9]/.test(n)?`${e}_${n}`:n:e}function u4o(t){if(!t)return\"DC 0\";const r=t.starts_closed??!1,s=t.closes_at??0,a=t.opens_at,A=t.switching_frequency,[c,l]=r?[5,0]:[0,5];if(A\u0026\u0026A\u003e0){const u=1/A,g=a\u0026\u0026a\u003es?Math.min(a-s,u):0,h=g\u003e0?g:Math.max(u/2,1e-9);return`PULSE(${Xl(c)} ${Xl(l)} ${Xl(s)} 1n 1n ${Xl(h)} ${Xl(u)})`}if(a!==void 0\u0026\u0026a\u003es){const u=Math.max(a-s,1e-9),g=s+u*2;return`PULSE(${Xl(c)} ${Xl(l)} ${Xl(s)} 1n 1n ${Xl(u)} ${Xl(g)})`}if(s\u003e0){const u=s*2,g=Math.max(u/2,1e-9);return`PULSE(${Xl(c)} ${Xl(l)} ${Xl(s)} 1n 1n ${Xl(g)} ${Xl(u)})`}return`DC ${r?5:0}`}function Xl(t){if(!Number.isFinite(t))return`${t}`;if(t===0)return\"0\";const e=Math.abs(t);return e\u003e=1e3||e\u003c=.001?Number(t.toExponential(6)).toString():Number(t.toPrecision(6)).toString()}function rO(t){if(!Number.isFinite(t))return`${t}`;if(t===0)return\"0\";const e=[[\"T\",1e12],[\"G\",1e9],[\"MEG\",1e6],[\"k\",1e3],[\"m\",.001],[\"u\",1e-6],[\"n\",1e-9],[\"p\",1e-12]];for(const[n,o]of e){const i=t/o;if(Math.abs(i)\u003e=.999999\u0026\u0026Math.abs(i)\u003c999.999999){const r=Number(i.toPrecision(6));if(Math.abs(r*o-t)\u003c=Math.abs(t)*1e-9)return`${r}${n}`}}return Xl(t)}var g4o=1e-12,d4o=({component:t,nodes:e})=\u003e{if(\"resistance\"in t\u0026\u0026\"name\"in t){const n=t.resistance,o=new s4o({name:t.name,positiveNode:e[0]||\"0\",negativeNode:e[1]||\"0\",value:A4o(n===0?g4o:n)});return new Uy(t.name,o,e)}return null},h4o=({netlist:t,component:e,nodes:n,simulationSwitchMap:o})=\u003e{const i=dPt(e.name??e.source_component_id,\"SW\"),r=n[0]||\"0\",s=n[1]||\"0\",a=`NCTRL_${i}`,A=`SW_${i}`,c=o.get(e.source_component_id),l=u4o(c),u=new a4o({name:i,positiveNode:r,negativeNode:s,positiveControl:a,negativeControl:\"0\",model:A});t.models.has(A)||t.models.set(A,`.MODEL ${A} SW(Ron=0.1 Roff=1e9 Vt=2.5 Vh=0.1)`);const g=`CTRL_${i}`,h=new a0e({name:g,positiveNode:a,negativeNode:\"0\",value:l}),d=new Uy(g,h,[a,\"0\"]);return t.addComponent(d),new Uy(i,u,[r,s,a,\"0\"])},p4o=({component:t,nodes:e})=\u003e{if(\"capacitance\"in t\u0026\u0026\"name\"in t){const n=new n4o({name:t.name,positiveNode:e[0]||\"0\",negativeNode:e[1]||\"0\",value:c4o(t.capacitance)});return new Uy(t.name,n,e)}return null},m4o=(t,e)=\u003e{const n=t.find(i=\u003ei.name?.toLowerCase()===\"anode\"||i.port_hints?.includes(\"anode\")),o=t.find(i=\u003ei.name?.toLowerCase()===\"cathode\"||i.port_hints?.includes(\"cathode\"));return{positiveNode:e.get(n?.source_port_id??\"\")||\"0\",negativeNode:e.get(o?.source_port_id??\"\")||\"0\"}},hPt=({netlist:t,component:e,componentPorts:n,nodeMap:o,modelName:i,modelDefinition:r})=\u003e{if(\"name\"in e){const{positiveNode:s,negativeNode:a}=m4o(n,o),A=new o4o({name:e.name,positiveNode:s,negativeNode:a,model:i});return t.models.set(i,r),new Uy(e.name,A,[s,a])}return null},_4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=\u003ehPt({netlist:t,component:e,componentPorts:n,nodeMap:o,modelName:\"D\",modelDefinition:\".MODEL D D\"}),f4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=\u003ehPt({netlist:t,component:e,componentPorts:n,nodeMap:o,modelName:\"LED\",modelDefinition:\".MODEL LED D(IS=1e-20 N=2 RS=10 CJO=2p EG=2.1 BV=5 IBV=10u)\"}),I4o=({component:t,nodes:e})=\u003e{if(\"inductance\"in t\u0026\u0026\"name\"in t){const n=new i4o({name:t.name,positiveNode:e[0]||\"0\",negativeNode:e[1]||\"0\",value:l4o(t.inductance)});return new Uy(t.name,n,e)}return null},C4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=\u003e{if(\"name\"in e){const i=n.find(m=\u003em.name?.toLowerCase()===\"drain\"||m.port_hints?.includes(\"drain\")),r=n.find(m=\u003em.name?.toLowerCase()===\"gate\"||m.port_hints?.includes(\"gate\")),s=n.find(m=\u003em.name?.toLowerCase()===\"source\"||m.port_hints?.includes(\"source\")),a=o.get(i?.source_port_id??\"\")||\"0\",A=o.get(r?.source_port_id??\"\")||\"0\",c=o.get(s?.source_port_id??\"\")||\"0\",l=c,u=e.channel_type??\"n\",g=e.mosfet_mode??\"enhancement\",h=`${u.toUpperCase()}MOS`,d=`${h}_${g.toUpperCase()}`;if(!t.models.has(d))if(g===\"enhancement\"){const m=u===\"p\"?-1:1;t.models.set(d,`.MODEL ${d} ${h} (VTO=${m} KP=0.1)`)}else t.models.set(d,`.MODEL ${d} ${h} (KP=0.1)`);const p=new r4o({name:e.name,drain:a,gate:A,source:c,substrate:l,model:d});return new Uy(e.name,p,[a,A,c])}return null},y4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=\u003e{if(\"name\"in e){const i=n.find(h=\u003eh.name?.toLowerCase()===\"collector\"||h.port_hints?.includes(\"collector\")),r=n.find(h=\u003eh.name?.toLowerCase()===\"base\"||h.port_hints?.includes(\"base\")),s=n.find(h=\u003eh.name?.toLowerCase()===\"emitter\"||h.port_hints?.includes(\"emitter\"));if(!i||!r||!s)throw new Error(`Transistor ${e.name} is missing required ports (collector, base, emitter)`);const a=o.get(i.source_port_id)||\"0\",A=o.get(r.source_port_id)||\"0\",c=o.get(s.source_port_id)||\"0\",l=e.transistor_type??\"npn\",u=l.toUpperCase();t.models.has(u)||t.models.set(u,`.MODEL ${u} ${l.toUpperCase()}`);const g=new t4o({name:e.name,collector:a,base:A,emitter:c,model:u});return new Uy(e.name,g,[a,A,c])}return null},x4o=({netlist:t,simulationVoltageSources:e,nodeMap:n})=\u003e{for(const o of e)if(o.type===\"simulation_voltage_source\")if(o.is_dc_source===!1){const i=o.terminal1_source_port_id??o.terminal1_source_net_id,r=o.terminal2_source_port_id??o.terminal2_source_net_id;if(i\u0026\u0026r){const s=n.get(i)||\"0\",a=n.get(r)||\"0\";let A=\"\";if(o.wave_shape===\"sinewave\"){const l=o.voltage??(o.peak_to_peak_voltage??0)/2,u=o.frequency??0,g=0,h=0,d=o.phase??0;u\u003e0?A=`SIN(0 ${l} ${u} ${g} ${h} ${d})`:A=`DC ${o.voltage??0}`}else if(o.wave_shape===\"square\"){const l=o.voltage??o.peak_to_peak_voltage??0,u=o.frequency??0,g=u===0?1/0:1/u,h=o.period===void 0?g:o.period/1e3,d=o.duty_cycle??.5,p=h*d,m=o.pulse_delay!==void 0?o.pulse_delay/1e3:0,_=o.rise_time!==void 0?rO(o.rise_time/1e3):\"1n\",f=o.fall_time!==void 0?rO(o.fall_time/1e3):\"1n\",I=o.pulse_width===void 0?rO(p):rO(o.pulse_width/1e3),C=rO(h);A=`PULSE(0 ${l} ${rO(m)} ${_} ${f} ${I} ${C})`}else o.voltage!==void 0\u0026\u0026(A=`DC ${o.voltage}`);if(A||o.ac_magnitude!==void 0){const c=new a0e({name:o.simulation_voltage_source_id,positiveNode:s,negativeNode:a,value:A,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),l=new Uy(o.simulation_voltage_source_id,c,[s,a]);t.addComponent(l)}}}else{const i=\"terminal1_source_port_id\"in o\u0026\u0026typeof o.terminal1_source_port_id==\"string\"?o.terminal1_source_port_id:void 0,r=\"terminal2_source_port_id\"in o\u0026\u0026typeof o.terminal2_source_port_id==\"string\"?o.terminal2_source_port_id:void 0,s=o.positive_source_port_id??o.positive_source_net_id??i,a=o.negative_source_port_id??o.negative_source_net_id??r;if(s\u0026\u0026a){const A=n.get(s)||\"0\",c=n.get(a)||\"0\",l=new a0e({name:o.simulation_voltage_source_id,positiveNode:A,negativeNode:c,value:`DC ${o.voltage}`,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),u=new Uy(o.simulation_voltage_source_id,l,[A,c]);t.addComponent(u)}}},E4o=({netlist:t,simulationCurrentSources:e,nodeMap:n})=\u003e{for(const o of e)if(o.type===\"simulation_current_source\")if(o.is_dc_source===!1){const i=o.terminal1_source_port_id??o.terminal1_source_net_id,r=o.terminal2_source_port_id??o.terminal2_source_net_id;if(i\u0026\u0026r){const s=n.get(i)||\"0\",a=n.get(r)||\"0\";let A=\"\";if(o.wave_shape===\"sinewave\"){const l=(o.peak_to_peak_current??0)/2,u=o.frequency??0,g=0,h=0,d=o.phase??0;u\u003e0?A=`SIN(0 ${l} ${u} ${g} ${h} ${d})`:A=`DC ${l}`}else if(o.wave_shape===\"square\"){const l=o.peak_to_peak_current??0,u=o.frequency??0,g=u===0?1/0:1/u,h=o.duty_cycle??.5,d=g*h;A=`PULSE(0 ${l} 0 1n 1n ${d} ${g})`}if(A||o.ac_magnitude!==void 0){const c=new uPt({name:o.simulation_current_source_id,positiveNode:s,negativeNode:a,value:A,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),l=new Uy(o.simulation_current_source_id,c,[s,a]);t.addComponent(l)}}}else{const i=\"terminal1_source_port_id\"in o\u0026\u0026typeof o.terminal1_source_port_id==\"string\"?o.terminal1_source_port_id:void 0,r=\"terminal2_source_port_id\"in o\u0026\u0026typeof o.terminal2_source_port_id==\"string\"?o.terminal2_source_port_id:void 0,s=o.positive_source_port_id??o.positive_source_net_id??i,a=o.negative_source_port_id??o.negative_source_net_id??r;if(s\u0026\u0026a){const A=n.get(s)||\"0\",c=n.get(a)||\"0\",l=new uPt({name:o.simulation_current_source_id,positiveNode:A,negativeNode:c,value:`DC ${o.current}`,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),u=new Uy(o.simulation_current_source_id,l,[A,c]);t.addComponent(u)}}},B4o=[\"method\",\"reltol\",\"abstol\",\"vntol\"],b4o=(t,e)=\u003et.find(o=\u003eo.connected_source_net_ids.includes(e))?.connected_source_port_ids[0],A0e=({sourcePortId:t,sourceNetId:e,sourceTraces:n,nodeMap:o})=\u003e{if(t)return o.get(t);if(!e)return;const i=b4o(n,e);if(i)return o.get(i)},S4o=t=\u003edPt(`sense_${t.simulation_current_probe_id}`,\"sense_current_probe\"),Q4o=t=\u003e{switch(t){case\"spice_transient_analysis\":return\"TRAN\";case\"spice_dc_operating_point\":return\"OP\";case\"spice_dc_sweep\":return\"DC\";case\"spice_ac_analysis\":return\"AC\"}},v4o=t=\u003e{switch(t){case\"linear\":return\"lin\";case\"decade\":return\"dec\";case\"octave\":return\"oct\"}},w4o=t=\u003e{if(t.experiment_type===\"spice_transient_analysis\"){const A=t.time_per_step,c=t.end_time_ms,l=t.start_time_ms;if(A===void 0||c===void 0)return null;const u=(l??0)/1e3;return new rPt({step:Xl(A/1e3),stop:Xl(c/1e3),...u\u003e0?{start:Xl(u)}:{},uic:!0})}if(t.experiment_type===\"spice_dc_operating_point\")return new ePt;if(t.experiment_type===\"spice_dc_sweep\"){const{dc_sweep_voltage_source_id:A,dc_sweep_current_source_id:c,dc_sweep_start:l,dc_sweep_stop:u,dc_sweep_step:g}=t;if(l===void 0||u===void 0||g===void 0)return null;let h;if(A!==void 0)h=`V${A}`;else if(c!==void 0)h=`I${c}`;else return null;return new Xwt({source:h,start:Xl(l),stop:Xl(u),step:Xl(g)})}const{ac_sweep_type:e,ac_samples_per_interval:n,ac_sample_count:o,ac_start_frequency_hz:i,ac_stop_frequency_hz:r}=t;if(e===void 0||i===void 0||r===void 0)return null;const s=e===\"linear\"?o:n;if(s===void 0)return null;const a=v4o(e);return new qwt({sweep:a,points:s,start:Xl(i),stop:Xl(r)})},P4o=({netlist:t,simulationExperiment:e,simulationVoltageProbes:n,simulationCurrentProbes:o,sourceTraces:i,nodeMap:r})=\u003e{const s=Q4o(e.experiment_type),a=new Set,A=e.spice_options;if(A){const c={};for(const l of B4o){const u=A[l];u!==void 0\u0026\u0026(c[l]=u)}Object.keys(c).length\u003e0\u0026\u0026t.optionStatements.push(new tPt(c).getString())}if(n.length\u003e0){const c=[];for(const l of n){const u=A0e({sourcePortId:l.signal_input_source_port_id,sourceNetId:l.signal_input_source_net_id,sourceTraces:i,nodeMap:r});if(!u)continue;if(l.reference_input_source_port_id||l.reference_input_source_net_id){const h=A0e({sourcePortId:l.reference_input_source_port_id,sourceNetId:l.reference_input_source_net_id,sourceTraces:i,nodeMap:r});if(h\u0026\u0026h!==\"0\"){const d=`V(${u},${h})`;a.add(d),c.push({simulation_voltage_probe_id:l.simulation_voltage_probe_id,name:l.name,spice_vector:d,source_node_name:u,reference_node_name:h})}else if(u!==\"0\"){const d=`V(${u})`;a.add(d),c.push({simulation_voltage_probe_id:l.simulation_voltage_probe_id,name:l.name,spice_vector:d,source_node_name:u,reference_node_name:h})}}else if(u!==\"0\"){const h=`V(${u})`;a.add(h),c.push({simulation_voltage_probe_id:l.simulation_voltage_probe_id,name:l.name,spice_vector:h,source_node_name:u})}}if(c.length\u003e0)for(const l of c)t.metadataComments.push(`* tscircuit_probe ${JSON.stringify(l)}`)}if(o.length\u003e0){const c=new Set,l=[];for(const u of o){const g=A0e({sourcePortId:u.positive_source_port_id,sourceNetId:u.positive_source_net_id,sourceTraces:i,nodeMap:r}),h=A0e({sourcePortId:u.negative_source_port_id,sourceNetId:u.negative_source_net_id,sourceTraces:i,nodeMap:r});if(!g||!h)continue;const d=S4o(u);let p=d,m=2;for(;c.has(p);)p=`${d}_${m++}`;c.add(p);const _=`V${p}`,f=`I(${_})`,I=new a0e({name:p,positiveNode:g,negativeNode:h,value:\"DC 0\"});t.addComponent(new Uy(p,I,[g,h])),a.add(f),l.push({simulation_current_probe_id:u.simulation_current_probe_id,name:u.name,spice_vector:f,sense_voltage_source_name:_,positive_node_name:g,negative_node_name:h})}if(l.length\u003e0)for(const u of l)t.metadataComments.push(`* tscircuit_current_probe ${JSON.stringify(u)}`)}if(a.size\u003e0){const c=[...a].join(\" \"),l=new nPt({analysis:s,expressions:[c]});l.command=\".PRINT\",t.printStatements.push(l.getString());const u=new oPt([c]);u.command=\".SAVE\",t.saveStatements.push(u.getString())}t.analysisCommand=w4o(e)?.getString()??null},wj=\"GENERIC_OPAMP\",M4o=`\n.SUBCKT ${wj} non_inverting_input inverting_input positive_supply negative_supply output\n* Generic Op-Amp Model\nE1 internal_output 0 non_inverting_input inverting_input 100k\nRin non_inverting_input inverting_input 10Meg\nRout internal_output output 75\nD1 output positive_supply opamp_diode\nD2 negative_supply output opamp_diode\n.model opamp_diode D\n.ENDS ${wj}\n`.trim(),D4o=(t,e,n)=\u003e{if(e.length!==0){t.models.has(wj)||t.models.set(wj,M4o);for(const o of e){if(o.type!==\"simulation_op_amp\")continue;const i=n.get(o.non_inverting_input_source_port_id)??\"0\",r=n.get(o.inverting_input_source_port_id)??\"0\",s=n.get(o.output_source_port_id)??\"0\",a=n.get(o.positive_supply_source_port_id)??\"0\",A=n.get(o.negative_supply_source_port_id)??\"0\",c=[i,r,a,A,s],l=new gPt({name:o.simulation_op_amp_id,nodes:c,subcircuitName:wj}),u=new Uy(o.simulation_op_amp_id,l,c);t.addComponent(u)}}};function N4o(t){const e=[];for(const s of t.split(/\\r?\\n/)){const a=s.trim();if(/^\\+/.test(a)\u0026\u0026e.length\u003e0){e[e.length-1]+=` ${a.slice(1).trim()}`;continue}e.push(a)}const n=e.find(s=\u003e/^\\.subckt\\s+/i.test(s));if(!n)return null;const o=n.split(/\\s+/),i=o[1],r=o.slice(2);return!i||r.length===0?null:{modelName:i,pinNames:r}}function R4o(t,e,n){if(e.length!==0)for(const o of e){const i=N4o(o.subcircuit_source);if(!i)continue;const{modelName:r,pinNames:s}=i;t.models.has(r)||t.models.set(r,o.subcircuit_source);const a=s.map(c=\u003e{const l=o.spice_pin_to_source_port_map[c];return n.get(l)??\"0\"}),A=new gPt({name:o.simulation_spice_subcircuit_id,nodes:a,subcircuitName:r});t.addComponent(new Uy(o.simulation_spice_subcircuit_id,A,a))}}function T4o(t){const e=new e4o(\"* Circuit JSON to SPICE Netlist\"),n=Mr(t).source_component.list(),o=Mr(t).source_port.list(),i=Mr(t).source_trace.list(),r=t.filter(y=\u003ey.type===\"simulation_voltage_probe\"),s=t.filter(y=\u003ey.type===\"simulation_current_probe\"),a=t.filter(y=\u003ey.type===\"simulation_switch\").map(y=\u003ey),A=t.filter(y=\u003ey.type===\"simulation_op_amp\"),c=t.filter(y=\u003ey.type===\"simulation_spice_subcircuit\"),l=new Map;for(const y of a)y.source_component_id\u0026\u0026l.set(y.source_component_id,y);const u=Mxe(t),g=new Map,h=new Map;let d=1;const p=new Set;if(r.length\u003e0)for(const y of r)y.name\u0026\u0026p.add(y.name);const m=[...p].map(y=\u003e/^N(\\d+)$/i.exec(y)).filter(y=\u003ey!==null).map(y=\u003eparseInt(y[1],10));m.length\u003e0\u0026\u0026(d=Math.max(...m)+1);const _=new Set,f=new Set(Mr(t).source_net.list().filter(y=\u003ey.name?.toLowerCase().includes(\"gnd\")).map(y=\u003ey.source_net_id));if(f.size\u003e0){for(const y of Mr(t).source_trace.list())if(y.connected_source_port_ids.length\u003e0\u0026\u0026y.connected_source_net_ids.some(E=\u003ef.has(E))){const E=y.connected_source_port_ids[0],B=u.getNetConnectedToId(E);B\u0026\u0026_.add(B)}}const I=o.filter(y=\u003ey.name?.toLowerCase()===\"gnd\");for(const y of I){const x=u.getNetConnectedToId(y.source_port_id);x\u0026\u0026_.add(x)}for(const y of Mr(t).simulation_voltage_source.list()){const x=y.negative_source_port_id??y.terminal2_source_port_id;if(x){const E=u.getNetConnectedToId(x);E\u0026\u0026_.add(E)}}for(const y of _)h.set(y,\"0\");if(r.length\u003e0)for(const y of r){if(!y.name||y.reference_input_source_port_id||y.reference_input_source_net_id)continue;let x;const E=y.signal_input_source_port_id,B=y.signal_input_source_net_id;if(E)x=u.getNetConnectedToId(E);else if(B){const S=i.find(Q=\u003eQ.connected_source_net_ids.includes(B));if(S\u0026\u0026S.connected_source_port_ids.length\u003e0){const Q=S.connected_source_port_ids[0];x=u.getNetConnectedToId(Q)}}x?h.has(x)||h.set(x,y.name):E\u0026\u0026y.name\u0026\u0026g.set(E,y.name)}for(const y of o){const x=y.source_port_id,E=u.getNetConnectedToId(x);E\u0026\u0026(h.has(E)||h.set(E,`N${d++}`),g.set(x,h.get(E)))}for(const y of i){const x=y.connected_source_port_ids.map(E=\u003eg.get(E)).find(E=\u003eE!==void 0);if(x)for(const E of y.connected_source_net_ids)g.set(E,x)}for(const y of o){const x=y.source_port_id;g.has(x)||g.set(x,`N${d++}`)}for(const y of n){if(y.type!==\"source_component\")continue;const x=Mr(t).source_port.list({source_component_id:y.source_component_id}).sort((B,S)=\u003e(B.pin_number??0)-(S.pin_number??0)),E=x.map(B=\u003eg.get(B.source_port_id)||\"0\");if(\"ftype\"in y){let B=null;switch(y.ftype){case\"simple_resistor\":{B=d4o({component:y,nodes:E});break}case\"simple_switch\":{B=h4o({netlist:e,component:y,nodes:E,simulationSwitchMap:l});break}case\"simple_capacitor\":{B=p4o({component:y,nodes:E});break}case\"simple_diode\":{B=_4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}case\"simple_led\":{B=f4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}case\"simple_inductor\":{B=I4o({component:y,nodes:E});break}case\"simple_mosfet\":{B=C4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}case\"simple_transistor\":{B=y4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}}B\u0026\u0026e.addComponent(B)}}x4o({netlist:e,simulationVoltageSources:Mr(t).simulation_voltage_source.list(),nodeMap:g}),E4o({netlist:e,simulationCurrentSources:Mr(t).simulation_current_source.list(),nodeMap:g}),D4o(e,A,g),R4o(e,c,g);const C=t.find(y=\u003ey.type===\"simulation_experiment\");return C\u0026\u0026P4o({netlist:e,simulationExperiment:C,simulationVoltageProbes:r,simulationCurrentProbes:s,sourceTraces:i,nodeMap:g}),e}function bwe(t,e){e=pPt(e||{R:255,G:255,B:255}),t=pPt(t);let n=t;return t.A!==void 0\u0026\u0026(n={R:e.R+(t.R-e.R)*t.A,G:e.G+(t.G-e.G)*t.A,B:e.B+(t.B-e.B)*t.A}),F4o(k4o(n))}function k4o(t){let e=t.R/255,n=t.G/255,o=t.B/255;e\u003e.04045?e=Math.pow((e+.055)/1.055,2.4):e=e/12.92,n\u003e.04045?n=Math.pow((n+.055)/1.055,2.4):n=n/12.92,o\u003e.04045?o=Math.pow((o+.055)/1.055,2.4):o=o/12.92,e*=100,n*=100,o*=100;const i=e*.4124+n*.3576+o*.1805,r=e*.2126+n*.7152+o*.0722,s=e*.0193+n*.1192+o*.9505;return{X:i,Y:r,Z:s}}function F4o(t){let i=t.Y/100,r=t.Z/108.883,s=t.X/95.047;s\u003e.008856?s=Math.pow(s,1/3):s=7.787*s+16/116,i\u003e.008856?i=Math.pow(i,1/3):i=7.787*i+16/116,r\u003e.008856?r=Math.pow(r,1/3):r=7.787*r+16/116;const a=116*i-16,A=500*(s-i),c=200*(i-r);return{L:a,a:A,b:c}}function pPt(t){let e,n,o,i;\"R\"in t?(e=t.R,n=t.G,o=t.B,i=t.A):(e=t.r,n=t.g,o=t.b,i=t.a);const r={R:e,G:n,B:o};return i!==void 0\u0026\u0026(r.A=i),r}function L4o(t,e,n){(\"R\"in t||\"r\"in t)\u0026\u0026(t=bwe(t,n)),(\"R\"in e||\"r\"in e)\u0026\u0026(e=bwe(e,n));const o=t.L,i=t.a,r=t.b,s=e.L,a=e.a,A=e.b,c=1,l=1,u=1,g=Math.sqrt(Math.pow(i,2)+Math.pow(r,2)),h=Math.sqrt(Math.pow(a,2)+Math.pow(A,2)),d=(g+h)/2,p=.5*(1-Math.sqrt(Math.pow(d,7)/(Math.pow(d,7)+Math.pow(25,7)))),m=(1+p)*i,_=(1+p)*a,f=Math.sqrt(Math.pow(m,2)+Math.pow(r,2)),I=Math.sqrt(Math.pow(_,2)+Math.pow(A,2)),C=mPt(r,m),y=mPt(A,_),x=s-o,E=I-f,B=O4o(g,h,C,y),S=2*Math.sqrt(f*I)*Math.sin(sO(B)/2),Q=(o+s)/2,w=(f+I)/2,M=G4o(g,h,C,y),k=1-.17*Math.cos(sO(M-30))+.24*Math.cos(sO(2*M))+.32*Math.cos(sO(3*M+6))-.2*Math.cos(sO(4*M-63)),R=30*Math.exp(-Math.pow((M-275)/25,2)),F=Math.sqrt(Math.pow(w,7)/(Math.pow(w,7)+Math.pow(25,7))),O=1+.015*Math.pow(Q-50,2)/Math.sqrt(20+Math.pow(Q-50,2)),U=1+.045*w,Y=1+.015*w*k,W=-2*F*Math.sin(sO(2*R));return Math.sqrt(Math.pow(x/(O*c),2)+Math.pow(E/(U*l),2)+Math.pow(S/(Y*u),2)+W*(E/(U*l))*(S/(Y*u)))}function H4o(t){return t*(180/Math.PI)}function sO(t){return t*(Math.PI/180)}function mPt(t,e){if(t===0\u0026\u0026e===0)return 0;{const n=H4o(Math.atan2(t,e));return n\u003e=0?n:n+360}}function O4o(t,e,n,o){if(t*e===0)return 0;if(Math.abs(o-n)\u003c=180)return o-n;if(o-n\u003e180)return o-n-360;if(o-n\u003c-180)return o-n+360;throw new Error}function G4o(t,e,n,o){if(t*e===0)return n+o;if(Math.abs(n-o)\u003c=180)return(n+o)/2;if(Math.abs(n-o)\u003e180\u0026\u0026n+o\u003c360)return(n+o+360)/2;if(Math.abs(n-o)\u003e180\u0026\u0026n+o\u003e=360)return(n+o-360)/2;throw new Error}function _Pt(t){return bwe(t)}var Y4o=2.3,fPt={R:255,G:0,B:255},xb=({color1:t,color2:e})=\u003et.R===e.R\u0026\u0026t.G===e.G\u0026\u0026t.B===e.B,c0e=t=\u003e{try{const e=Cpo(t);if(e.depth!==8)return null;const n=e.channels,o=e.data,i=new Uint8Array(e.width*e.height*4);if(n===4)i.set(o);else if(n===3)for(let r=0,s=0;r\u003co.length;r+=3,s+=4)i[s]=o[r],i[s+1]=o[r+1],i[s+2]=o[r+2],i[s+3]=255;else return null;return{width:e.width,height:e.height,data:i,getPixel:(r,s)=\u003e{const a=(s*e.width+r)*4;return{R:i[a],G:i[a+1],B:i[a+2]}}}}catch{return null}},l0e=async t=\u003et instanceof Uint8Array?t:new Uint8Array(t),U4o=(t,e)=\u003e{if(t.byteLength!==e.byteLength)return!1;for(let n=0;n\u003ct.byteLength;n+=1)if(t[n]!==e[n])return!1;return!0},K4o=t=\u003e{if(!t)return fPt;const e=/^#?([0-9a-fA-F]{6})$/.exec(t.trim());if(!e)return fPt;const n=e[1];return{R:Number.parseInt(n.slice(0,2),16),G:Number.parseInt(n.slice(2,4),16),B:Number.parseInt(n.slice(4,6),16)}},V4o=t=\u003e{const e=t*6.2,n=t*.695;let o=null,i=null,r=null,s=null;return a=\u003e{if(xb(a))return!0;let A=null,c=null;o\u0026\u0026xb({color1:a.color1,color2:o})?A=r:i\u0026\u0026xb({color1:a.color1,color2:i})\u0026\u0026(A=s),o\u0026\u0026xb({color1:a.color2,color2:o})?c=r:i\u0026\u0026xb({color1:a.color2,color2:i})\u0026\u0026(c=s),A||(A=_Pt(a.color1),o=a.color1,r=A),c||(c=_Pt(a.color2),i=a.color2,s=c);const l=Math.sqrt((A.L-c.L)*(A.L-c.L)+(A.a-c.a)*(A.a-c.a)+(A.b-c.b)*(A.b-c.b));return l\u003e=e?!1:l\u003c=n?!0:L4o(A,c)\u003ct}},z4o=class{_baseComparator;_img1;_img2;_brightnessTolerance;constructor(t,e,n,{antialiasingTolerance:o=0}){this._baseComparator=t,this._img1=e,this._img2=n,this._brightnessTolerance=o}compare(t){return this._baseComparator(t)||this._checkIsAntialiased(t)}_checkIsAntialiased(t){return this._isAntialiased(this._img2,t.x,t.y,t,this._img1)||this._isAntialiased(this._img1,t.x,t.y,t,this._img2)}_isAntialiased(t,e,n,o,i){const r=t.getPixel(e,n),s=Math.max(e-1,0),a=Math.max(n-1,0),A=Math.min(e+1,o.width-1),c=Math.min(n+1,o.height-1),l=!i,u=l?this._brightnessTolerance:0;let g=0,h=0,d=0,p=0,m=0,_=0,f=0,I=0,C=0;for(let y=a;y\u003c=c;y+=1)for(let x=s;x\u003c=A;x+=1){if(x===e\u0026\u0026y===n)continue;const E=this._brightnessDelta(t.getPixel(x,y),r);if(Math.abs(E)\u003c=u?g+=1:E\u003eu?h+=1:d+=1,g\u003e2)return!1;l||(E\u003cp\u0026\u0026(p=E,_=x,f=y),E\u003em\u0026\u0026(m=E,I=x,C=y))}return l?!0:d===0||h===0?!1:!this._isAntialiased(t,_,f,o)\u0026\u0026!this._isAntialiased(i,_,f,o)||!this._isAntialiased(t,I,C,o)\u0026\u0026!this._isAntialiased(i,I,C,o)}_brightnessDelta(t,e){return t.R*.29889531+t.G*.58662247+t.B*.11448223-(e.R*.29889531+e.G*.58662247+e.B*.11448223)}},J4o=class{pixelRatio;caretTopLeft=null;caretBottomRight=null;_baseComparator;_state=\"init\";constructor(t,e){this.pixelRatio=e?Math.floor(e):1,this._baseComparator=t}compare(t){return this._baseComparator(t)||this._checkIsCaret(t)}_checkIsCaret(t){if(this._state===\"caretDetected\")return this.caretTopLeft!==null\u0026\u0026this.caretBottomRight!==null\u0026\u0026t.x\u003e=this.caretTopLeft.x\u0026\u0026t.x\u003c=this.caretBottomRight.x\u0026\u0026t.y\u003e=this.caretTopLeft.y\u0026\u0026t.y\u003c=this.caretBottomRight.y;if(this.caretTopLeft\u0026\u0026this.caretBottomRight\u0026\u0026t.x\u003e=this.caretTopLeft.x\u0026\u0026t.x\u003c=this.caretBottomRight.x\u0026\u0026t.y\u003e=this.caretTopLeft.y\u0026\u0026t.y\u003c=this.caretBottomRight.y)return!0;const e=this._getLastCaretPoint(t);return this._looksLikeCaret({x:t.x,y:t.y},e)?(this.caretTopLeft={x:t.x,y:t.y},this.caretBottomRight=e,this._state=\"caretDetected\",!0):!1}_getLastCaretPoint(t){let e={x:t.x,y:t.y};for(;;){const n=this._getNextCaretPoint({x:t.x,y:t.y},e);if(this._isPointOutsideImages(n,t)||this._areColorsSame(n,t))return e;e=n}}_isPointOutsideImages(t,e){return t.x\u003e=e.minWidth||t.y\u003e=e.minHeight}_areColorsSame(t,e){const n=e.img1.getPixel(t.x,t.y),o=e.img2.getPixel(t.x,t.y);return xb({color1:n,color2:o})}_getNextCaretPoint(t,e){const n=e.x+1;return n\u003ct.x+this.pixelRatio?{x:n,y:e.y}:{x:t.x,y:e.y+1}}_looksLikeCaret(t,e){return this._caretHeight(t,e)\u003e1\u0026\u0026this._caretWidth(t,e)===this.pixelRatio}_caretHeight(t,e){return e.y-t.y+1}_caretWidth(t,e){return e.x-t.x+1}},IPt=(t={})=\u003e{if(t.strict\u0026\u0026t.tolerance!==void 0)throw new TypeError('Unable to use \"strict\" and \"tolerance\" options together');if(t.percentThreshold!==void 0\u0026\u0026(!Number.isFinite(t.percentThreshold)||t.percentThreshold\u003c0))throw new TypeError('Expected \"percentThreshold\" to be a non-negative number');return{strict:!!t.strict,tolerance:t.tolerance??Y4o,ignoreCaret:t.ignoreCaret??!0,ignoreAntialiasing:t.ignoreAntialiasing??!0,antialiasingTolerance:t.antialiasingTolerance??0,pixelRatio:t.pixelRatio}},CPt=(t,e,n)=\u003e{let o=n.strict?i=\u003exb(i):V4o(n.tolerance);if(n.ignoreAntialiasing){const i=new z4o(o,t,e,n);o=r=\u003ei.compare(r)}if(n.ignoreCaret){const i=new J4o(o,n.pixelRatio);o=r=\u003ei.compare(r)}return o},W4o=async(t,e,n)=\u003e{const o=c0e(t),i=c0e(e);if(!o||!i)return{equal:U4o(t,e)};const r=CPt(o,i,n),s=Math.max(o.width,i.width),a=Math.max(o.height,i.height),A=Math.min(o.width,i.width),c=Math.min(o.height,i.height),l=s*a;let u=0;for(let g=0;g\u003ca;g+=1)for(let h=0;h\u003cs;h+=1){if(h\u003e=A||g\u003e=c){u+=1;continue}const d=o.getPixel(h,g),p=i.getPixel(h,g);xb({color1:d,color2:p})||r({color1:d,color2:p,img1:o,img2:i,x:h,y:g,width:s,height:a,minWidth:A,minHeight:c})||(u+=1)}return{equal:u===0,differentPixels:u,totalPixels:l}},j4o=async(t,e,n={})=\u003e{const o=IPt(n),i=await l0e(t),r=await l0e(e);return W4o(i,r,o)},$4o=async({reference:t,current:e,highlightColor:n,...o})=\u003e{const i=IPt(o),r=await l0e(t),s=await l0e(e),a=c0e(r),A=c0e(s);if(!(a\u0026\u0026A))return s;const c=CPt(a,A,i),l=Math.max(a.width,A.width),u=Math.max(a.height,A.height),g=Math.min(a.width,A.width),h=Math.min(a.height,A.height),d=K4o(n),p=new Uint8Array(l*u*4);for(let _=0;_\u003cu;_+=1)for(let f=0;f\u003cl;f+=1){const I=(_*l+f)*4;if(f\u003e=g||_\u003e=h){p[I]=d.R,p[I+1]=d.G,p[I+2]=d.B,p[I+3]=255;continue}const C=a.getPixel(f,_),y=A.getPixel(f,_);xb({color1:C,color2:y})||c({color1:C,color2:y,img1:a,img2:A,x:f,y:_,width:l,height:u,minWidth:g,minHeight:h})?(p[I]=C.R,p[I+1]=C.G,p[I+2]=C.B,p[I+3]=255):(p[I]=d.R,p[I+1]=d.G,p[I+2]=d.B,p[I+3]=255)}return ypo({width:l,height:u,data:p,channels:4,depth:8})};Object.assign(j4o,{createDiff:$4o});function q4o(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function X4o(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function u0e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(i,u0e.prototype),i.expected=e,i.found=n,i.location=o,i.name=\"SyntaxError\",i}X4o(u0e,Error);function Swe(t,e,n){return n=n||\" \",t.length\u003ee?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}u0e.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var n=null,o;for(o=0;o\u003ct.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\\r\\n|\\n|\\r/g);break}var i=this.location.start,r=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(i):i,s=this.location.source+\":\"+r.line+\":\"+r.column;if(n){var a=this.location.end,A=Swe(\"\",r.line.toString().length,\" \"),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`\n --\u003e `+s+`\n`+A+` |\n`+r.line+\" | \"+c+`\n`+A+\" | \"+Swe(\"\",i.column-1,\" \")+Swe(\"\",u,\"^\")}else e+=`\n at `+s}return e},u0e.buildMessage=function(t,e){var n={literal:function(c){return'\"'+i(c.text)+'\"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+\"-\"+r(u[1]):r(u)});return\"[\"+(c.inverted?\"^\":\"\")+l.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function r(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length\u003e0){for(u=1,g=1;u\u003cl.length;u++)l[u-1]!==l[u]\u0026\u0026(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+\" or \"+l[1];default:return l.slice(0,-1).join(\", \")+\", or \"+l[l.length-1]}}function A(c){return c?'\"'+i(c)+'\"':\"end of input\"}return\"Expected \"+a(t)+\" but \"+A(e)+\" found.\"};function Pj(t,e){const n=new lse(t),o=n.getTotalLength(),i=Math.max(2,Math.ceil(o*e)),r=[];for(let s=1;s\u003c=i;s++){const a=s/i*o,A=n.getPointAtLength(a);r.push({x:A.x,y:A.y})}return r}function Z4o(t,e=10){const n=new lse(t);n.toAbsolute();const o=n.segments,i=[];let r=[],s=0,a=0,A=0,c=0;for(const l of o)switch(l[0]){case\"M\":{r.length\u003e0\u0026\u0026i.push(r),s=l[1],a=l[2],A=s,c=a,r=[{x:s,y:a}];break}case\"L\":{s=l[1],a=l[2],r.push({x:s,y:a});break}case\"H\":{s=l[1],r.push({x:s,y:a});break}case\"V\":{a=l[1],r.push({x:s,y:a});break}case\"Z\":{(s!==A||a!==c)\u0026\u0026r.push({x:A,y:c}),s=A,a=c;break}case\"C\":{const g=l[5],h=l[6],d=`M ${s} ${a} C ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case\"S\":{const g=l[3],h=l[4],d=`M ${s} ${a} S ${l[1]} ${l[2]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case\"Q\":{const g=l[3],h=l[4],d=`M ${s} ${a} Q ${l[1]} ${l[2]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case\"T\":{const g=l[1],h=l[2],d=`M ${s} ${a} T ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case\"A\":{const g=l[6],h=l[7],d=`M ${s} ${a} A ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${l[5]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}}return r.length\u003e0\u0026\u0026i.push(r),i.map(l=\u003e{const u=[];for(const g of l)(u.length===0||Math.abs(u[u.length-1].x-g.x)\u003e1e-9||Math.abs(u[u.length-1].y-g.y)\u003e1e-9)\u0026\u0026u.push(g);return u})}var Eb=\"image/svg+xml\",yPt=\"image/png\";async function xPt(t){if(t.startsWith(\"data:\"))return tBo(t);let e;try{e=await fetch(t)}catch(i){throw new Error(`Failed to fetch image \"${t}\". Pass a data URL or a fetchable URL.`,{cause:i})}if(!e.ok)throw new Error(`Failed to fetch image \"${t}\": ${e.status} ${e.statusText}`);const n=e.headers.get(\"content-type\")?.split(\";\")[0],o=n\u0026\u0026n!==\"application/octet-stream\"?n:nBo(t);return{mimetype:o,text:o===Eb?await e.text():\"\",dataUrl:t,projectRelativePath:t}}function eBo({svg:t,width:e,height:n,transform:o}){const i=EPt({svg:t,width:e,height:n,transform:o}).map(oBo).filter(s=\u003es.length\u003e=3).map(s=\u003e({vertices:s,polygon:bPt(s),samplePoint:rBo(s)})).map(s=\u003e({...s,area:s.polygon.area()})).filter(s=\u003es.area\u003e1e-9),r=i.filter(s=\u003ei.filter(A=\u003eA!==s\u0026\u0026A.area\u003es.area\u0026\u0026A.polygon.contains(by(s.samplePoint.x,s.samplePoint.y))).length%2===0);return r.map(s=\u003e{const a=i.filter(A=\u003eA!==s\u0026\u0026A.area\u003cs.area\u0026\u0026s.polygon.contains(by(A.samplePoint.x,A.samplePoint.y))\u0026\u0026!r.some(c=\u003ec!==s\u0026\u0026c.area\u003cs.area\u0026\u0026c.area\u003eA.area\u0026\u0026c.polygon.contains(by(A.samplePoint.x,A.samplePoint.y)))).map(A=\u003e({vertices:iBo(A.vertices)}));return{outer_ring:{vertices:BPt(s.vertices)},inner_rings:a}})}function EPt({svg:t,width:e,height:n,transform:o}){const i=sBo(t),r=e/i.width,s=n/i.height;return aBo(t).flatMap(a=\u003eZ4o(a,.03).map(A=\u003eA.map(c=\u003eq4o(o,{x:(c.x-i.x-i.width/2)*r,y:-(c.y-i.y-i.height/2)*s})).filter((c,l,u)=\u003el===0||Math.abs(c.x-u[l-1].x)\u003e1e-6||Math.abs(c.y-u[l-1].y)\u003e1e-6)))}function BPt(t){return SPt(t)\u003e0?[...t].reverse():t}function tBo(t){const e=t.indexOf(\",\");if(!t.startsWith(\"data:\")||e===-1)throw new Error(\"Invalid data URL for image source\");const n=t.slice(5,e),o=t.slice(e+1),i=n.split(\";\")[0]||Eb,r=n.includes(\";base64\")?new TextDecoder().decode(Uint8Array.from(atob(o),s=\u003es.charCodeAt(0))):decodeURIComponent(o);return{mimetype:i,text:r,dataUrl:t,projectRelativePath:\"inline\"}}function nBo(t){const e=t.toLowerCase();return e.endsWith(\".svg\")?Eb:e.endsWith(\".png\")?yPt:\"application/octet-stream\"}function oBo(t){if(t.length\u003c2)return t;const e=t[0],n=t[t.length-1];return Math.abs(e.x-n.x)\u003c1e-6\u0026\u0026Math.abs(e.y-n.y)\u003c1e-6?t.slice(0,-1):t}function iBo(t){return SPt(t)\u003c0?[...t].reverse():t}function rBo(t){let e=0,n=0;for(const o of t)e+=o.x,n+=o.y;return{x:e/t.length,y:n/t.length}}function bPt(t){const e=new Ip;return e.addFace(t.map(n=\u003eby(n.x,n.y))),e}function SPt(t){return[...bPt(t).faces][0].signedArea()}function sBo(t){const n=t.match(/\\bviewBox\\s*=\\s*[\"']([^\"']+)[\"']/i)?.[1]?.trim().split(/[\\s,]+/).map(Number);return n?.length===4\u0026\u0026n.every(Number.isFinite)?{x:n[0],y:n[1],width:n[2],height:n[3]}:{x:0,y:0,width:1,height:1}}function aBo(t){const e=[],n=/\u003cpath\\b[^\u003e]*\u003e/gi;for(const o of t.match(n)??[]){const i=o.match(/\\bd\\s*=\\s*([\"'])(.*?)\\1/i);i?.[2]\u0026\u0026e.push(i[2])}return e}var z7=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved\u0026\u0026!this.failed){this.iterations++;try{this._step()}catch(t){throw this.error=`${this.getSolverName()} error: ${t}`,this.failed=!0,t}!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026this.tryFinalAcceptance(),!this.solved\u0026\u0026this.iterations\u003e=this.MAX_ITERATIONS\u0026\u0026(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),\"computeProgress\"in this\u0026\u0026(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error(\"getConstructorParams not implemented\")}getOutput(){return null}solve(){const t=Date.now();for(;!this.solved\u0026\u0026!this.failed;)this.step();const e=Date.now();this.timeToSolve=e-t}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function Bb(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var ABo=class extends z7{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(t){super(),this.inputProblem=t,this.MAX_ITERATIONS=1e6}_step(){const t=this.pipelineDef[this.currentPipelineStageIndex];if(!t){this.solved=!0;return}if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[t.solverName]=performance.now(),this.timeSpentOnStage[t.solverName]=this.endTimeOfStage[t.solverName]-this.startTimeOfStage[t.solverName];const n=this.activeSubSolver.getOutput();n!==null\u0026\u0026(this.pipelineOutputs[t.solverName]=n),t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed\u0026\u0026(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnStage[t.solverName]=0,this.startTimeOfStage[t.solverName]=performance.now(),this.firstIterationOfStage[t.solverName]=this.iterations}solveUntilStage(t){for(;this.getCurrentStageName().toLowerCase()!==t.toLowerCase()\u0026\u0026(this.step(),!(this.failed||this.solved)););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??\"none\"}getStageProgress(){const t=this.pipelineDef.length;if(t===0)return 1;const e=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+e)/t}getStageStats(){const t={};for(const e of this.pipelineDef){const n=this.timeSpentOnStage[e.solverName]||0,o=this.firstIterationOfStage[e.solverName]||0,i=this.iterations,r=e.solverName===this.getCurrentStageName()?i-o:0,s=this.currentPipelineStageIndex\u003ethis.pipelineDef.findIndex(a=\u003ea.solverName===e.solverName);t[e.solverName]={timeSpent:n,iterations:r,completed:s}}return t}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved\u0026\u0026this.activeSubSolver)return this.activeSubSolver.visualize();let t=0;const e=this.initialVisualize();e\u0026\u0026(RH(e,0),t=1);let n=null;this.solved\u0026\u0026(n=this.finalVisualize());const o=[e].filter(Boolean).concat(this.pipelineDef.map((i,r)=\u003e{const a=this[i.solverName]?.visualize();return a?(RH(a,r+t),a):null}).filter(Boolean));return o.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved\u0026\u0026n\u0026\u0026(RH(n,o.length+t+1),o.push(n)),o.length===1?o[0]:{points:o.flatMap(i=\u003ei.points||[]),rects:o.flatMap(i=\u003ei.rects||[]),lines:o.flatMap(i=\u003ei.lines||[]),circles:o.flatMap(i=\u003ei.circles||[]),texts:o.flatMap(i=\u003ei.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(t){return this.pipelineOutputs[t]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(t){return t in this.pipelineOutputs}getSolver(t){return this[t]}},cBo=class extends z7{constructor(t){super(),this.params=t;const{cellContents:e}=t;for(let n=0;n\u003ce.length;n++)for(let o=n+1;o\u003ce.length;o++)this._allPairs.push([n,o])}params;midlines=[];_pairIdx=0;_allPairs=[];_step(){const{cellContents:t,containerWidth:e,containerHeight:n}=this.params;if(this._pairIdx\u003e=this._allPairs.length){this.solved=!0;return}const[o,i]=this._allPairs[this._pairIdx],r=t[o],s=t[i],a=r.x+r.width,A=s.x+s.width,c=r.y+r.height,l=s.y+s.height;if(a\u003cs.x||A\u003cr.x){const u=a\u003cs.x?(a+s.x)/2:(A+r.x)/2;this.midlines.push({id:`midline-${this.midlines.length}`,start:{x:u,y:0},end:{x:u,y:n},cellIds:[r.cellId,s.cellId],type:\"vertical\"})}if(c\u003cs.y||l\u003cr.y){const u=c\u003cs.y?(c+s.y)/2:(l+r.y)/2;this.midlines.push({id:`midline-${this.midlines.length}`,start:{x:0,y:u},end:{x:e,y:u},cellIds:[r.cellId,s.cellId],type:\"horizontal\"})}this._pairIdx++,this._pairIdx\u003e=this._allPairs.length\u0026\u0026(this.solved=!0)}getOutput(){return this.midlines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t}=this.params,e=this._allPairs[this._pairIdx],n=e?new Set([t[e[0]]?.cellId,t[e[1]]?.cellId]):new Set;return{rects:t.map(o=\u003e({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:n.has(o.cellId)?\"rgba(255, 80, 80, 0.45)\":\"rgba(255, 165, 0, 0.3)\",stroke:n.has(o.cellId)?\"#ff2020\":\"#c87000\",label:o.cellId})),lines:this.midlines.map(o=\u003e({points:[o.start,o.end],strokeColor:\"#888888\",strokeDash:[4,4],label:o.id}))}}},lBo=(t,e)=\u003e{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y,s=e.start.x,a=e.start.y,A=e.end.x,c=e.end.y,l=(n-i)*(a-c)-(o-r)*(s-A);if(Math.abs(l)\u003c1e-4)return null;const u=((n-s)*(a-c)-(o-a)*(s-A))/l,g=-((n-i)*(o-a)-(o-r)*(n-s))/l;return u\u003e=0\u0026\u0026u\u003c=1\u0026\u0026g\u003e=0\u0026\u0026g\u003c=1?{x:n+u*(i-n),y:o+u*(r-o)}:null},uBo=class extends z7{constructor(t){super(),this.params=t}params;intersections=[];_outerIdx=0;_step(){const{midlines:t}=this.params;if(t.length\u003c=1){this.solved=!0;return}if(this._outerIdx\u003e=t.length-1){this.solved=!0;return}const e=t[this._outerIdx];for(const n of t.slice(this._outerIdx+1)){const o=lBo(e,n);o\u0026\u0026this.intersections.push({point:o,midlineIds:[e.id,n.id]})}this._outerIdx++,this._outerIdx\u003e=t.length-1\u0026\u0026(this.solved=!0)}getOutput(){return this.intersections}getConstructorParams(){return[this.params]}visualize(){const{midlines:t}=this.params,e=t[this._outerIdx];return{lines:t.map(n=\u003e({points:[n.start,n.end],strokeColor:n===e?\"#2196f3\":\"#cccccc\",strokeWidth:n===e?2.5:1,strokeDash:n===e?void 0:[4,4]})),points:this.intersections.map(n=\u003e({x:n.point.x,y:n.point.y,color:\"#e63946\",label:`(${n.point.x.toFixed(1)}, ${n.point.y.toFixed(1)})`}))}}},gBo=t=\u003e{const e=[];for(let n=0;n+1\u003ct.length;n++){const o=t[n],i=t[n+1];o!==void 0\u0026\u0026i!==void 0\u0026\u0026e.push([o,i])}return e},dBo=(t,e)=\u003e{const n=Math.max(e.x,Math.min(t.x,e.x+e.width)),o=Math.max(e.y,Math.min(t.y,e.y+e.height)),i=t.x-n,r=t.y-o;return Math.sqrt(i*i+r*r)},hBo=(t,e,n)=\u003e{let i=1/0;for(let r=0;r\u003c=10;r++){const s=r/10,a={x:t.x+s*(e.x-t.x),y:t.y+s*(e.y-t.y)};i=Math.min(i,dBo(a,n))}return i},pBo=(t,e,n)=\u003eMath.min(...n.map(o=\u003ehBo(t,e,o))),mBo=class extends z7{constructor(t){super(),this.params=t}params;allSegments=[];_midlineIdx=0;_segmentId=0;_step(){const{midlines:t,intersections:e,cellContents:n}=this.params;if(this._midlineIdx\u003e=t.length){this.solved=!0;return}const o=t[this._midlineIdx],i=e.filter(r=\u003er.midlineIds.includes(o.id)).map(r=\u003er.point).sort((r,s)=\u003eo.type===\"vertical\"?r.y-s.y:r.x-s.x);for(const[r,s]of gBo([o.start,...i,o.end]))this.allSegments.push({id:`segment-${this._segmentId++}`,start:r,end:s,fromCellIds:o.cellIds,distanceToAnyCell:pBo(r,s,n)});this._midlineIdx++,this._midlineIdx\u003e=t.length\u0026\u0026(this.solved=!0)}getOutput(){return this.allSegments}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,midlines:e}=this.params,n=e[this._midlineIdx],o=Math.max(...this.allSegments.map(i=\u003ei.distanceToAnyCell??0),1);return{rects:t.map(i=\u003e({center:{x:i.x+i.width/2,y:i.y+i.height/2},width:i.width,height:i.height,fill:\"rgba(255, 165, 0, 0.2)\",stroke:\"#c87000\"})),lines:[...this.allSegments.map(i=\u003e{const r=(i.distanceToAnyCell??0)/o,s=Math.round(255*(1-r)),a=Math.round(200*r);return{points:[i.start,i.end],strokeColor:`rgb(${s}, ${a}, 80)`,strokeWidth:1.5}}),...n?[{points:[n.start,n.end],strokeColor:\"#2196f3\",strokeWidth:2,strokeDash:[8,4]}]:[]]}}},QPt=t=\u003e{const e=[];for(let n=0;n+1\u003ct.length;n++){const o=t[n],i=t[n+1];o!==void 0\u0026\u0026i!==void 0\u0026\u0026e.push([o,i])}return e},_Bo=(t,e,n,o)=\u003e{const i=t.x,r=t.y,s=e.x,a=e.y,A=n.x,c=n.y,l=o.x,u=o.y,g=(i-s)*(c-u)-(r-a)*(A-l);if(Math.abs(g)\u003c1e-4)return!1;const h=((i-A)*(c-u)-(r-c)*(A-l))/g,d=-((i-s)*(r-c)-(r-a)*(i-A))/g;return h\u003e=0\u0026\u0026h\u003c=1\u0026\u0026d\u003e=0\u0026\u0026d\u003c=1},fBo=(t,e,n)=\u003e{const{x:o,y:i,width:r,height:s}=n,a=t.x\u003e=o\u0026\u0026t.x\u003c=o+r\u0026\u0026t.y\u003e=i\u0026\u0026t.y\u003c=i+s,A=e.x\u003e=o\u0026\u0026e.x\u003c=o+r\u0026\u0026e.y\u003e=i\u0026\u0026e.y\u003c=i+s;if(a||A)return!0;const c=[{start:{x:o,y:i},end:{x:o+r,y:i}},{start:{x:o+r,y:i},end:{x:o+r,y:i+s}},{start:{x:o+r,y:i+s},end:{x:o,y:i+s}},{start:{x:o,y:i+s},end:{x:o,y:i}}];for(const l of c)if(_Bo(t,e,l.start,l.end))return!0;return!1},IBo=(t,e)=\u003et.x\u003ce.x+e.width\u0026\u0026t.x+t.width\u003ee.x\u0026\u0026t.y\u003ce.y+e.height\u0026\u0026t.y+t.height\u003ee.y,vPt=[\"rgba(100, 149, 237, 0.25)\",\"rgba(144, 238, 144, 0.25)\",\"rgba(255, 182, 193, 0.25)\",\"rgba(221, 160, 221, 0.25)\",\"rgba(255, 218, 185, 0.25)\",\"rgba(175, 238, 238, 0.25)\"],CBo=class extends z7{constructor(t){super(),this.params=t}params;validSegments=[];cellContainingRects=[];gridRects=[];_phase=0;_segIdx=0;_acceptedSegs=[];_rejectedSegs=[];_step(){const{allSegments:t,cellContents:e,containerWidth:n,containerHeight:o}=this.params;if(this._phase===0){if(this._segIdx\u003e=t.length){this._phase=1;return}const u=t[this._segIdx];!e.some(h=\u003efBo(u.start,u.end,h))?this._acceptedSegs.push(u):this._rejectedSegs.push(u),this._segIdx++;return}const i=new Set([0,n]),r=new Set([0,o]);this._acceptedSegs.forEach(u=\u003e{Math.abs(u.start.x-u.end.x)\u003c.001?i.add(u.start.x):r.add(u.start.y)});const s=Array.from(i).sort((u,g)=\u003eu-g),a=Array.from(r).sort((u,g)=\u003eu-g),A=[];e.forEach(u=\u003e{const g=s.filter(m=\u003em\u003c=u.x).pop()??s[0],h=s.find(m=\u003em\u003e=u.x+u.width)??s[s.length-1],d=a.filter(m=\u003em\u003c=u.y).pop()??a[0],p=a.find(m=\u003em\u003e=u.y+u.height)??a[a.length-1];A.push({cellId:`contain-${u.cellId}`,x:g,y:d,width:Math.max(0,h-g),height:Math.max(0,p-d)})});const c=[];let l=0;for(const[u,g]of QPt(s))if(!(g-u\u003c=0))for(const[h,d]of QPt(a)){if(d-h\u003c=0)continue;const p={cellId:`gridRect-${l++}`,x:u,y:h,width:g-u,height:d-h};e.some(m=\u003eIBo(p,m))||c.push(p)}A.forEach(u=\u003e{const g=`${u.x},${u.y},${u.width},${u.height}`;c.some(h=\u003e`${h.x},${h.y},${h.width},${h.height}`===g)||c.push(u)}),this.validSegments=this._acceptedSegs,this.cellContainingRects=A,this.gridRects=c,this.solved=!0}getOutput(){return{validSegments:this.validSegments,cellContainingRects:this.cellContainingRects,gridRects:this.gridRects}}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,allSegments:e}=this.params,n=e[this._segIdx];return{rects:[...this.gridRects.map((o,i)=\u003e({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:vPt[i%vPt.length],stroke:\"#999999\"})),...t.map(o=\u003e({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:\"rgba(255, 165, 0, 0.4)\",stroke:\"#c87000\",label:o.cellId}))],lines:[...this._rejectedSegs.map(o=\u003e({points:[o.start,o.end],strokeColor:\"rgba(220, 50, 50, 0.35)\",strokeDash:[3,3],strokeWidth:1})),...this._acceptedSegs.map(o=\u003e({points:[o.start,o.end],strokeColor:\"#2196f3\",strokeWidth:1.5})),...n\u0026\u0026this._phase===0?[{points:[n.start,n.end],strokeColor:\"#ff9800\",strokeWidth:3}]:[],...this.validSegments.map(o=\u003e({points:[o.start,o.end],strokeColor:\"#2196f3\",strokeWidth:2}))]}}},Ky=.001,yBo=(t,e,n=Ky)=\u003eMath.abs(t.x-e.x)\u003cn\u0026\u0026Math.abs(t.y-e.y)\u003cn,xBo=(t,e)=\u003e{const n=Math.max(t.x-(e.x+e.width),e.x-(t.x+t.width),0),o=Math.max(t.y-(e.y+e.height),e.y-(t.y+t.height),0);return n+o},EBo=(t,e,n=.5)=\u003e{const o=(Math.abs(t.x+t.width-e.x)\u003cn||Math.abs(e.x+e.width-t.x)\u003cn)\u0026\u0026!(t.y+t.height\u003c=e.y||e.y+e.height\u003c=t.y),i=(Math.abs(t.y+t.height-e.y)\u003cn||Math.abs(e.y+e.height-t.y)\u003cn)\u0026\u0026!(t.x+t.width\u003c=e.x||e.x+e.width\u003c=t.x);return o||i},wPt=[\"rgba(100, 149, 237, 0.35)\",\"rgba(144, 238, 144, 0.35)\",\"rgba(255, 182, 193, 0.35)\",\"rgba(221, 160, 221, 0.35)\",\"rgba(255, 218, 185, 0.35)\",\"rgba(175, 238, 238, 0.35)\",\"rgba(250, 200, 100, 0.35)\",\"rgba(180, 220, 180, 0.35)\"],PPt=[\"#6495ed\",\"#3cb371\",\"#ff69b4\",\"#9370db\",\"#ffa07a\",\"#20b2aa\",\"#daa520\",\"#5f9e5f\"],BBo=class extends z7{constructor(t){super(),this.params=t}params;mergedRectGroups=[];groupedRects=[];_phase=0;_workRects=[];_unmergedQueue=[];_step(){const{validSegments:t,gridRects:e,cellContainingRects:n,cellContents:o}=this.params;if(this._phase===0){this._workRects=e.map(s=\u003e{let a=1/0;const{x:A,y:c,width:l,height:u}=s;return t.forEach(g=\u003e{const h=Math.min(g.start.x,g.end.x),d=Math.max(g.start.x,g.end.x),p=Math.min(g.start.y,g.end.y),m=Math.max(g.start.y,g.end.y),_=Math.abs(g.start.y-g.end.y)\u003cKy,f=Math.abs(g.start.x-g.end.x)\u003cKy;let I=!1;_?(Math.abs(p-c)\u003cKy||Math.abs(p-(c+u))\u003cKy)\u0026\u0026h\u003cA+l-Ky\u0026\u0026d\u003eA+Ky\u0026\u0026Math.max(h,A)+Ky\u003cMath.min(d,A+l)\u0026\u0026(I=!0):f\u0026\u0026(Math.abs(h-A)\u003cKy||Math.abs(h-(A+l))\u003cKy)\u0026\u0026p\u003cc+u-Ky\u0026\u0026m\u003ec+Ky\u0026\u0026Math.max(p,c)+Ky\u003cMath.min(m,c+u)\u0026\u0026(I=!0),I\u0026\u0026g.distanceToAnyCell!==void 0\u0026\u0026(a=Math.min(a,g.distanceToAnyCell))}),{...s,merged:!1,groupId:null,minBoundingSegmentDistance:a}}),n.forEach((s,a)=\u003e{const A=this._workRects.find(c=\u003eyBo({x:c.x,y:c.y},{x:s.x,y:s.y})\u0026\u0026Math.abs(c.width-s.width)\u003cKy\u0026\u0026Math.abs(c.height-s.height)\u003cKy);A\u0026\u0026(A.merged=!0,A.groupId=a)}),this._unmergedQueue=this._workRects.filter(s=\u003e!s.merged).sort((s,a)=\u003es.minBoundingSegmentDistance-a.minBoundingSegmentDistance),this._updateOutput(),this._phase=1;return}if(this._unmergedQueue.length===0){this._finalize(),this.solved=!0;return}let i=!1;const r=[];for(const s of this._unmergedQueue){const a=this._workRects.find(c=\u003ec.cellId===s.cellId);if(!a||a.merged)continue;const A=this._workRects.filter(c=\u003ec.merged\u0026\u0026EBo(a,c));if(A.length\u003e0\u0026\u0026!i){if(a.merged=!0,A.length===1)a.groupId=A[0].groupId;else{let c=null,l=1/0;for(const u of A){if(u.groupId===null)continue;const g=o[u.groupId];if(!g)continue;const h=xBo(a,g);(h\u003cl||h===l\u0026\u0026(c===null||u.groupId!==null\u0026\u0026u.groupId\u003cc))\u0026\u0026(l=h,c=u.groupId)}a.groupId=c}i=!0}else r.push(s)}this._unmergedQueue=r.sort((s,a)=\u003es.minBoundingSegmentDistance-a.minBoundingSegmentDistance),i||(this._finalize(),this.solved=!0),this._updateOutput()}_updateOutput(){this.groupedRects=this._workRects.filter(t=\u003et.groupId!==null)}_finalize(){const{cellContainingRects:t,cellContents:e}=this.params;this.mergedRectGroups=[],t.forEach((n,o)=\u003e{const i=this._workRects.filter(s=\u003es.merged\u0026\u0026s.groupId===o).map(({merged:s,groupId:a,minBoundingSegmentDistance:A,...c})=\u003ec),r=e[o];r\u0026\u0026this.mergedRectGroups.push([n,r,...i.filter(s=\u003es.cellId!==n.cellId)])})}getOutput(){return{mergedRectGroups:this.mergedRectGroups,groupedRects:this.groupedRects}}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t}=this.params;return{rects:[...this.groupedRects.map(e=\u003e({center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,fill:wPt[e.groupId%wPt.length],stroke:PPt[e.groupId%PPt.length]})),...this._workRects.filter(e=\u003e!e.merged).map(e=\u003e({center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,fill:\"rgba(200, 200, 200, 0.2)\",stroke:\"#aaaaaa\",strokeDash:[3,3]})),...t.map(e=\u003e({center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,fill:\"rgba(255, 165, 0, 0.5)\",stroke:\"#c87000\",label:e.cellId}))]}}},bBo=.001,MPt=(t,e)=\u003e{const n=parseFloat(t.x.toFixed(4)),o=parseFloat(t.y.toFixed(4)),i=parseFloat(e.x.toFixed(4)),r=parseFloat(e.y.toFixed(4));return n\u003ci||n===i\u0026\u0026o\u003cr?`${n},${o}_${i},${r}`:`${i},${r}_${n},${o}`},DPt=[\"rgba(100, 149, 237, 0.25)\",\"rgba(144, 238, 144, 0.25)\",\"rgba(255, 182, 193, 0.25)\",\"rgba(221, 160, 221, 0.25)\",\"rgba(255, 218, 185, 0.25)\",\"rgba(175, 238, 238, 0.25)\",\"rgba(250, 200, 100, 0.25)\",\"rgba(180, 220, 180, 0.25)\"],SBo=class extends z7{constructor(t){super(),this.params=t}params;outlineLines=[];_outerIdx=0;_segMap=new Map;_step(){const{groupedRects:t}=this.params,e=bBo;if(this._outerIdx\u003e=t.length){this._rebuildLines(),this.solved=!0;return}const n=t[this._outerIdx];for(const o of t.slice(this._outerIdx+1)){if(n.groupId===o.groupId)continue;const i=n.x+n.width,r=o.x+o.width;if(Math.abs(i-o.x)\u003ce||Math.abs(r-n.x)\u003ce){const A=Math.abs(i-o.x)\u003ce?i:r,c=Math.max(n.y,o.y),l=Math.min(n.y+n.height,o.y+o.height);if(l-c\u003ee){const u={x:A,y:c},g={x:A,y:l};this._segMap.set(MPt(u,g),{start:u,end:g})}}const s=n.y+n.height,a=o.y+o.height;if(Math.abs(s-o.y)\u003ce||Math.abs(a-n.y)\u003ce){const A=Math.abs(s-o.y)\u003ce?s:a,c=Math.max(n.x,o.x),l=Math.min(n.x+n.width,o.x+o.width);if(l-c\u003ee){const u={x:c,y:A},g={x:l,y:A};this._segMap.set(MPt(u,g),{start:u,end:g})}}}this._outerIdx++,this._rebuildLines(),this._outerIdx\u003e=t.length\u0026\u0026(this.solved=!0)}_rebuildLines(){let t=0;this.outlineLines=[],this._segMap.forEach(({start:e,end:n})=\u003e{this.outlineLines.push({id:`outline-${t++}`,start:e,end:n})})}getOutput(){return this.outlineLines}getConstructorParams(){return[this.params]}visualize(){const{groupedRects:t}=this.params,e=t[this._outerIdx];return{rects:t.map(n=\u003e({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:n===e?\"rgba(255, 152, 0, 0.45)\":DPt[n.groupId%DPt.length],stroke:n===e?\"#ff6600\":\"#cccccc\"})),lines:this.outlineLines.map(n=\u003e({points:[n.start,n.end],strokeColor:\"#000000\",strokeWidth:3}))}}},Zi=.001,Aw=(t,e,n=Zi)=\u003eMath.abs(t.x-e.x)\u003cn\u0026\u0026Math.abs(t.y-e.y)\u003cn,Z5=t=\u003e`${t.x.toFixed(4)},${t.y.toFixed(4)}`,g0e=(t,e)=\u003e{const n=Z5(t),o=Z5(e);return n\u003co?`${n}_${o}`:`${o}_${n}`},Mj=t=\u003eAw(t.start,t.end),QBo=t=\u003eMath.abs(t.start.x-t.end.x)\u003cZi||Math.abs(t.start.y-t.end.y)\u003cZi,cw=(t,e,n,o)=\u003eMath.min(e,o)-Math.max(t,n)\u003eZi,aO=t=\u003et.reduce((e,n)=\u003ee+Math.abs(n.start.x-n.end.x)+Math.abs(n.start.y-n.end.y),0),am=(t,e)=\u003eMath.abs(t.start.x-t.end.x)\u003cZi?Math.abs(e.x-t.start.x)\u003cZi\u0026\u0026e.y\u003e=Math.min(t.start.y,t.end.y)-Zi\u0026\u0026e.y\u003c=Math.max(t.start.y,t.end.y)+Zi:Math.abs(t.start.y-t.end.y)\u003cZi?Math.abs(e.y-t.start.y)\u003cZi\u0026\u0026e.x\u003e=Math.min(t.start.x,t.end.x)-Zi\u0026\u0026e.x\u003c=Math.max(t.start.x,t.end.x)+Zi:!1,d0e=(t,e,n)=\u003ee===\"start\"?{start:n,end:t.end}:{start:t.start,end:n},NPt=t=\u003e{const e=new Map;for(const n of t)e.set(Z5(n.start),(e.get(Z5(n.start))??0)+1),e.set(Z5(n.end),(e.get(Z5(n.end))??0)+1);return e},vBo=(t,e)=\u003ee.some(n=\u003e{const o=(Math.abs(t.x-n.minX)\u003cZi||Math.abs(t.x-n.maxX)\u003cZi)\u0026\u0026t.y\u003e=n.minY-Zi\u0026\u0026t.y\u003c=n.maxY+Zi,i=(Math.abs(t.y-n.minY)\u003cZi||Math.abs(t.y-n.maxY)\u003cZi)\u0026\u0026t.x\u003e=n.minX-Zi\u0026\u0026t.x\u003c=n.maxX+Zi;return o||i}),wBo=(t,e)=\u003e{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)\u003cZi){const s=Math.min(o,r),a=Math.max(o,r);return n\u003ee.minX+Zi\u0026\u0026n\u003ce.maxX-Zi\u0026\u0026a\u003ee.minY-Zi\u0026\u0026s\u003ce.maxY+Zi}if(Math.abs(o-r)\u003cZi){const s=Math.min(n,i),a=Math.max(n,i);return o\u003ee.minY+Zi\u0026\u0026o\u003ce.maxY-Zi\u0026\u0026a\u003ee.minX+Zi\u0026\u0026s\u003ce.maxX-Zi}return!0},PBo=(t,e)=\u003e{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)\u003cZi){const s=Math.min(o,r),a=Math.max(o,r);return(Math.abs(n-e.minX)\u003cZi||Math.abs(n-e.maxX)\u003cZi)\u0026\u0026cw(s,a,e.minY,e.maxY)}if(Math.abs(o-r)\u003cZi){const s=Math.min(n,i),a=Math.max(n,i);return(Math.abs(o-e.minY)\u003cZi||Math.abs(o-e.maxY)\u003cZi)\u0026\u0026cw(s,a,e.minX,e.maxX)}return!1},Dj=(t,e)=\u003et.length\u003e0\u0026\u0026t.every(n=\u003e!Mj(n)\u0026\u0026QBo(n)\u0026\u0026!e.some(o=\u003ewBo(n,o)||PBo(n,o))),MBo=(t,e)=\u003e{if(Math.abs(t.start.x-t.end.x)\u003cZi){const n=t.start.x,o=Math.min(t.start.y,t.end.y),i=Math.max(t.start.y,t.end.y);return e.some(r=\u003er.maxX\u003c=n+Zi\u0026\u0026cw(o,i,r.minY,r.maxY)\u0026\u0026e.some(s=\u003es.minX\u003e=n-Zi\u0026\u0026cw(o,i,s.minY,s.maxY)\u0026\u0026cw(r.minY,r.maxY,s.minY,s.maxY)))}if(Math.abs(t.start.y-t.end.y)\u003cZi){const n=t.start.y,o=Math.min(t.start.x,t.end.x),i=Math.max(t.start.x,t.end.x);return e.some(r=\u003er.maxY\u003c=n+Zi\u0026\u0026cw(o,i,r.minX,r.maxX)\u0026\u0026e.some(s=\u003es.minY\u003e=n-Zi\u0026\u0026cw(o,i,s.minX,s.maxX)\u0026\u0026cw(r.minX,r.maxX,s.minX,s.maxX)))}return!1},AO=t=\u003e{const e=new Map,n=t.map(s=\u003e[s.start,s.end]),o=(s,a)=\u003e{const A=Z5(s),c=Z5(a);e.has(A)||e.set(A,new Set),e.has(c)||e.set(c,new Set),e.get(A)?.add(c),e.get(c)?.add(A)};for(let s=0;s\u003ct.length;s++){const a=t[s];if(!(!a||Mj(a)))for(let A=s+1;A\u003ct.length;A++){const c=t[A];if(!c||Mj(c))continue;const l=Math.abs(a.start.x-a.end.x)\u003cZi,u=Math.abs(a.start.y-a.end.y)\u003cZi,g=Math.abs(c.start.x-c.end.x)\u003cZi,h=Math.abs(c.start.y-c.end.y)\u003cZi;if(l\u0026\u0026h){const d={x:a.start.x,y:c.start.y};am(a,d)\u0026\u0026am(c,d)\u0026\u0026(n[s]?.push(d),n[A]?.push(d))}if(u\u0026\u0026g){const d={x:c.start.x,y:a.start.y};am(a,d)\u0026\u0026am(c,d)\u0026\u0026(n[s]?.push(d),n[A]?.push(d))}}}for(let s=0;s\u003ct.length;s++){const a=t[s];if(!a||Mj(a))continue;const A=[...new Map(n[s]?.map(c=\u003e[Z5(c),c]))].map(([,c])=\u003ec).sort((c,l)=\u003eMath.abs(a.start.x-a.end.x)\u003cZi?c.y-l.y:c.x-l.x);for(let c=0;c+1\u003cA.length;c++){const l=A[c],u=A[c+1];l\u0026\u0026u\u0026\u0026!Aw(l,u)\u0026\u0026o(l,u)}}let i=0;const r=new Set;for(const s of e.keys()){if(r.has(s))continue;i++;const a=[s];for(r.add(s);a.length\u003e0;){const A=a.pop();if(A)for(const c of e.get(A)??[])r.has(c)||(r.add(c),a.push(c))}}return i},DBo=(t,e,n)=\u003e{let o=t,i=!0;for(;i;){i=!1;const r=NPt(o);for(let s=0;s\u003co.length;s++){const a=o[s];if(a){for(const A of[\"start\",\"end\"]){const c=a[A];if(r.get(Z5(c))!==1)continue;const l=[],u=Math.abs(a.start.x-a.end.x)\u003cZi,g=Math.abs(a.start.y-a.end.y)\u003cZi;for(let d=0;d\u003co.length;d++){if(s===d)continue;const p=o[d];if(p){if(u\u0026\u0026Math.abs(p.start.y-p.end.y)\u003cZi){const m={x:a.start.x,y:p.start.y};am(p,m)\u0026\u0026l.push(m)}if(g\u0026\u0026Math.abs(p.start.x-p.end.x)\u003cZi){const m={x:p.start.x,y:a.start.y};am(p,m)\u0026\u0026l.push(m)}}}const h=l.filter(d=\u003e!Aw(d,c)).map(d=\u003e({point:d,line:d0e(a,A,d)})).filter(({line:d})=\u003eaO([d])\u003eaO([a])+Zi).filter(({line:d})=\u003e!0).filter(({line:d})=\u003eDj([d],e)).sort((d,p)=\u003eaO([d.line])-aO([p.line])||JSON.stringify(d.point).localeCompare(JSON.stringify(p.point))).at(0);if(h){o=o.map((d,p)=\u003ep===s?h.line:d),i=!0;break}}if(i)break}}}return o},NBo=(t,e)=\u003e{const n=[],o=Math.abs(t.start.x-t.end.x)\u003cZi,i=Math.abs(t.start.y-t.end.y)\u003cZi;for(const r of e){if(r===t)continue;const s=Math.abs(r.start.x-r.end.x)\u003cZi,a=Math.abs(r.start.y-r.end.y)\u003cZi;if(o\u0026\u0026a){const A={x:t.start.x,y:r.start.y};am(t,A)\u0026\u0026am(r,A)\u0026\u0026n.push(A)}if(i\u0026\u0026s){const A={x:r.start.x,y:t.start.y};am(t,A)\u0026\u0026am(r,A)\u0026\u0026n.push(A)}}return n},RBo=(t,e,n)=\u003e{let o=t,i=!0;for(;i;){i=!1;const r=NPt(o),s=AO(o);for(let a=0;a\u003co.length;a++){const A=o[a];if(!A)continue;const c=NBo(A,o).filter(l=\u003e!Aw(l,A.start)\u0026\u0026!Aw(l,A.end));if(c.length!==0){for(const l of[\"start\",\"end\"]){const u=A[l];if(r.get(Z5(u))!==1||vBo(u,e))continue;const g=c.map(m=\u003e({point:m,distance:Math.abs(m.x-u.x)+Math.abs(m.y-u.y)})).sort((m,_)=\u003em.distance-_.distance).at(0);if(!g)continue;const h={start:u,end:g.point};if(MBo(h,e))continue;const d=d0e(A,l,g.point);if(!Dj([d],e))continue;const p=o.map((m,_)=\u003e_===a?d:m);if(!(AO(p)\u003es)){o=p,i=!0;break}}if(i)break}}}return o},TBo=t=\u003e{let{start:e,end:n}=t;return e.y===n.y\u0026\u0026e.x\u003en.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x\u0026\u0026e.y\u003en.y\u0026\u0026([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{start:e,end:n}},Qwe=t=\u003e{if(!t||t.length===0)return[];const e=t.map(TBo),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x\u0026\u0026o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=\u003ec.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x\u003c=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=\u003ec.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y\u003c=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}return i},Nj=t=\u003e{const e=[];for(let n=0;n+1\u003ct.length;n++){const o=t[n],i=t[n+1];!o||!i||Aw(o,i)||e.push({start:o,end:i})}return e},kBo=(t,e)=\u003e{const n=Nj(t),o=t.at(0),i=t.at(-1);if(!o||!i||n.length\u003c2)return n;const r=[];Math.abs(o.x-i.x)\u003cZi||Math.abs(o.y-i.y)\u003cZi?r.push([{start:o,end:i}]):r.push(Nj([o,{x:o.x,y:i.y},i]),Nj([o,{x:i.x,y:o.y},i]));const s=[...new Set(t.map(c=\u003ec.x))],a=[...new Set(t.map(c=\u003ec.y))];for(const c of s)Math.abs(c-o.x)\u003cZi||Math.abs(c-i.x)\u003cZi||r.push(Nj([o,{x:c,y:o.y},{x:c,y:i.y},i]));for(const c of a)Math.abs(c-o.y)\u003cZi||Math.abs(c-i.y)\u003cZi||r.push(Nj([o,{x:o.x,y:c},{x:i.x,y:c},i]));return r.filter(c=\u003ec.length\u003cn.length).filter(c=\u003eDj(c,e)).sort((c,l)=\u003ec.length-l.length||aO(c)-aO(l)||JSON.stringify(c).localeCompare(JSON.stringify(l))).at(0)??n},FBo=(t,e)=\u003e{const n=new Map,o=new Map,i=a=\u003e{const A=Z5(a);return n.set(A,a),o.has(A)||o.set(A,new Set),A};for(const a of t){if(Mj(a))continue;const A=i(a.start),c=i(a.end);o.get(A)?.add(c),o.get(c)?.add(A)}const r=new Set,s=[];for(const[a,A]of o)if(A.size!==2)for(const c of A){const l=g0e(n.get(a),n.get(c));if(r.has(l))continue;const u=[n.get(a)];let g=a,h=c;for(;;){r.add(g0e(n.get(g),n.get(h))),u.push(n.get(h));const d=o.get(h);if(!d||d.size!==2)break;const p=[...d].find(_=\u003e_!==g);if(!p)break;const m=g0e(n.get(h),n.get(p));if(r.has(m))break;g=h,h=p}s.push(...kBo(u,e))}for(const[a,A]of o)for(const c of A){const l=g0e(n.get(a),n.get(c));r.has(l)||(r.add(l),s.push({start:n.get(a),end:n.get(c)}))}return s},LBo=(t,e)=\u003e{let n=t,o=!0;for(;o;){o=!1;const i=AO(n),r=Qwe(n).length;for(let s=0;s\u003cn.length;s++){const a=n[s];if(!a)continue;const A=Math.abs(a.start.x-a.end.x)\u003cZi,c=Math.abs(a.start.y-a.end.y)\u003cZi;if(!(!A\u0026\u0026!c)){for(let l=0;l\u003cn.length;l++){if(s===l)continue;const u=n[l];if(!u)continue;const g=Math.abs(u.start.x-u.end.x)\u003cZi,h=Math.abs(u.start.y-u.end.y)\u003cZi;if(A!==g||c!==h||A\u0026\u0026Math.abs(a.start.x-u.start.x)\u003cZi||c\u0026\u0026Math.abs(a.start.y-u.start.y)\u003cZi||!n.some((f,I)=\u003eI===s||I===l?!1:A\u0026\u0026Math.abs(f.start.y-f.end.y)\u003cZi?am(f,{x:a.start.x,y:f.start.y})\u0026\u0026am(a,{x:a.start.x,y:f.start.y})\u0026\u0026am(f,{x:u.start.x,y:f.start.y})\u0026\u0026am(u,{x:u.start.x,y:f.start.y}):c\u0026\u0026Math.abs(f.start.x-f.end.x)\u003cZi?am(f,{x:f.start.x,y:a.start.y})\u0026\u0026am(a,{x:f.start.x,y:a.start.y})\u0026\u0026am(f,{x:f.start.x,y:u.start.y})\u0026\u0026am(u,{x:f.start.x,y:u.start.y}):!1))continue;let p;if(A?p={start:{x:u.start.x,y:a.start.y},end:{x:u.start.x,y:a.end.y}}:p={start:{x:a.start.x,y:u.start.y},end:{x:a.end.x,y:u.start.y}},!Dj([p],e))continue;const m=n.map((f,I)=\u003eI===s?p:f);if(AO(m)\u003ei)continue;const _=Qwe(m);if(!(_.length\u003e=r)){n=_,o=!0;break}}if(o)break}}}return n},HBo=(t,e)=\u003e{let n=t,o=!0;for(;o;){o=!1;const i=AO(n);for(let r=0;r\u003cn.length;r++){const s=n[r];if(!s)continue;const a=Math.abs(s.start.y-s.end.y)\u003cZi,A=Math.abs(s.start.x-s.end.x)\u003cZi;if(!(!a\u0026\u0026!A)){for(let c=0;c\u003cn.length;c++){if(r===c)continue;const l=n[c];if(!l)continue;const u=Math.abs(l.start.y-l.end.y)\u003cZi,g=Math.abs(l.start.x-l.end.x)\u003cZi;if(a!==u||A!==g)continue;const h=[s.start,s.end];let d;if(a?d=h.map(f=\u003e({x:f.x,y:l.start.y})):d=h.map(f=\u003e({x:l.start.x,y:f.y})),!d.every(f=\u003eam(l,f)))continue;const p=new Map;let m=!0;for(let f=0;f\u003ch.length;f++){const I=h[f],C=d[f];if(!I||!C){m=!1;break}const y=n.findIndex((Q,w)=\u003e{if(w===r||w===c)return!1;const M=Math.abs(Q.start.y-Q.end.y)\u003cZi,k=Math.abs(Q.start.x-Q.end.x)\u003cZi;return(a\u0026\u0026k||A\u0026\u0026M)\u0026\u0026am(Q,I)});if(y===-1)continue;const x=n[y];if(!x){m=!1;break}const E=Aw(x.start,I),B=Aw(x.end,I);if(!E\u0026\u0026!B\u0026\u0026am(x,C))continue;if(!E\u0026\u0026!B){m=!1;break}let S;if(E?S=d0e(x,\"start\",C):S=d0e(x,\"end\",C),!Dj([S],e)){m=!1;break}p.set(y,S)}if(!m)continue;const _=n.map((f,I)=\u003ep.get(I)??f).filter((f,I)=\u003eI!==r);if(!(AO(_)\u003ei)){n=_,o=!0;break}}if(o)break}}}return n},RPt=(t=\u003e(t[t.MergeAlignedSegments=0]=\"MergeAlignedSegments\",t[t.SimplifyChains=1]=\"SimplifyChains\",t[t.ConnectDanglingEndpoints=2]=\"ConnectDanglingEndpoints\",t[t.AlignParallelLinesAcrossConnectors=3]=\"AlignParallelLinesAcrossConnectors\",t[t.RemoveRedundantParallelBridges=4]=\"RemoveRedundantParallelBridges\",t[t.TrimDanglingOverhangs=5]=\"TrimDanglingOverhangs\",t))(RPt||{}),OBo=class extends z7{constructor(t){super(),this.params=t;const e=t.offsetX??0,n=t.offsetY??0;this._inputRects=t.cellContents.map(o=\u003e({minX:o.x+e,minY:o.y+n,maxX:o.x+o.width+e,maxY:o.y+o.height+n}))}params;mergedOriginalLines=[];reducedLines=[];_stage=0;_currentLines=[];_inputRects;_step(){const{outlineLines:t}=this.params,e=this.params.offsetX??0,n=this.params.offsetY??0,o=this._inputRects;switch(this._stage){case 0:{const r=Qwe(t.map(s=\u003e({start:{x:s.start.x+e,y:s.start.y+n},end:{x:s.end.x+e,y:s.end.y+n}})));this._currentLines=r,this.mergedOriginalLines=r.map(s=\u003e({start:{x:s.start.x,y:s.start.y},end:{x:s.end.x,y:s.end.y}}));break}case 1:this._currentLines=FBo(this._currentLines,o);break;case 2:this._currentLines=DBo(this._currentLines,o);break;case 3:this._currentLines=LBo(this._currentLines,o);break;case 4:this._currentLines=HBo(this._currentLines,o);break;case 5:this._currentLines=RBo(this._currentLines,o),this.reducedLines=this._currentLines.map(r=\u003e({start:{x:r.start.x-e,y:r.start.y-n},end:{x:r.end.x-e,y:r.end.y-n}})),this.mergedOriginalLines=this.mergedOriginalLines.map(r=\u003e({start:{x:r.start.x-e,y:r.start.y-n},end:{x:r.end.x-e,y:r.end.y-n}})),this.solved=!0;break}const i=this.getNextStage(this._stage);i\u0026\u0026(this._stage=i)}getNextStage(t){const e=Object.values(RPt);return e[e.indexOf(t)+1]}getOutput(){return this.reducedLines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,outlineLines:e}=this.params;return{rects:t.map(n=\u003e({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:\"rgba(255, 165, 0, 0.2)\",stroke:\"#c87000\"})),lines:[...e.map(n=\u003e({points:[n.start,n.end],strokeColor:\"rgba(180, 180, 180, 0.4)\",strokeWidth:1,strokeDash:[4,4]})),...this._currentLines.map(n=\u003e({points:[n.start,n.end],strokeColor:\"#0055cc\",strokeWidth:2}))]}}},vs=.001,TPt=(t,e,n=vs)=\u003eMath.abs(t.x-e.x)\u003cn\u0026\u0026Math.abs(t.y-e.y)\u003cn,vwe=t=\u003e`${t.x.toFixed(4)},${t.y.toFixed(4)}`,h0e=t=\u003eTPt(t.start,t.end),GBo=t=\u003eMath.abs(t.start.x-t.end.x)\u003cvs||Math.abs(t.start.y-t.end.y)\u003cvs,cO=(t,e,n,o)=\u003eMath.min(e,o)-Math.max(t,n)\u003evs,p0e=t=\u003et.reduce((e,n)=\u003ee+Math.abs(n.start.x-n.end.x)+Math.abs(n.start.y-n.end.y),0),m0e=(t,e)=\u003eMath.abs(t.start.x-t.end.x)\u003cvs?Math.abs(e.x-t.start.x)\u003cvs\u0026\u0026e.y\u003e=Math.min(t.start.y,t.end.y)-vs\u0026\u0026e.y\u003c=Math.max(t.start.y,t.end.y)+vs:Math.abs(t.start.y-t.end.y)\u003cvs?Math.abs(e.y-t.start.y)\u003cvs\u0026\u0026e.x\u003e=Math.min(t.start.x,t.end.x)-vs\u0026\u0026e.x\u003c=Math.max(t.start.x,t.end.x)+vs:!1,Rj=t=\u003e({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),kPt=(t,e,n)=\u003et\u003eMath.min(e,n)+vs\u0026\u0026t\u003cMath.max(e,n)-vs,YBo=(t,e)=\u003e{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)\u003cvs){const s=Math.min(o,r),a=Math.max(o,r);return n\u003ee.minX+vs\u0026\u0026n\u003ce.maxX-vs\u0026\u0026a\u003ee.minY-vs\u0026\u0026s\u003ce.maxY+vs}if(Math.abs(o-r)\u003cvs){const s=Math.min(n,i),a=Math.max(n,i);return o\u003ee.minY+vs\u0026\u0026o\u003ce.maxY-vs\u0026\u0026a\u003ee.minX+vs\u0026\u0026s\u003ce.maxX-vs}return!0},UBo=(t,e)=\u003e{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)\u003cvs){const s=Math.min(o,r),a=Math.max(o,r);return(Math.abs(n-e.minX)\u003cvs||Math.abs(n-e.maxX)\u003cvs)\u0026\u0026cO(s,a,e.minY,e.maxY)}if(Math.abs(o-r)\u003cvs){const s=Math.min(n,i),a=Math.max(n,i);return(Math.abs(o-e.minY)\u003cvs||Math.abs(o-e.maxY)\u003cvs)\u0026\u0026cO(s,a,e.minX,e.maxX)}return!1},wwe=(t,e)=\u003et.length\u003e0\u0026\u0026t.every(n=\u003e!h0e(n)\u0026\u0026GBo(n)\u0026\u0026!e.some(o=\u003eYBo(n,o)||UBo(n,o))),FPt=(t,e,n)=\u003e{const o=Rj(e),i=Rj(n);if(Math.abs(t.start.x-t.end.x)\u003cvs){const r=t.start.x,s=Math.min(t.start.y,t.end.y),a=Math.max(t.start.y,t.end.y);return kPt(r,o.x,i.x)\u0026\u0026cO(s,a,e.minY,e.maxY)\u0026\u0026cO(s,a,n.minY,n.maxY)}if(Math.abs(t.start.y-t.end.y)\u003cvs){const r=t.start.y,s=Math.min(t.start.x,t.end.x),a=Math.max(t.start.x,t.end.x);return kPt(r,o.y,i.y)\u0026\u0026cO(s,a,e.minX,e.maxX)\u0026\u0026cO(s,a,n.minX,n.maxX)}return!1},_0e=(t,e)=\u003e{const n=new Set;for(let o=0;o\u003ce.length;o++){const i=e[o];if(i)for(let r=o+1;r\u003ce.length;r++){const s=e[r];s\u0026\u0026t.some(a=\u003eFPt(a,i,s))\u0026\u0026n.add(`${o}:${r}`)}}return n},KBo=(t,e,n)=\u003e{const o=_0e(t,e);return[...n].every(i=\u003eo.has(i))},LPt=(t,e)=\u003e{const n=new Set,o=new Set;for(const i of e)n.add(i.minX),n.add(i.maxX),n.add(Rj(i).x),o.add(i.minY),o.add(i.maxY),o.add(Rj(i).y);for(const i of t)n.add(i.start.x),n.add(i.end.x),o.add(i.start.y),o.add(i.end.y);return{xs:[...n].sort((i,r)=\u003ei-r),ys:[...o].sort((i,r)=\u003ei-r)}},VBo=(t,e,n,o)=\u003et.some(i=\u003e{if(Math.abs(i.start.x-i.end.x)\u003e=vs||Math.abs(i.start.x-e)\u003e=vs)return!1;const r=Math.min(i.start.y,i.end.y),s=Math.max(i.start.y,i.end.y);return n\u003e=r-vs\u0026\u0026o\u003c=s+vs}),zBo=(t,e,n,o)=\u003et.some(i=\u003e{if(Math.abs(i.start.y-i.end.y)\u003e=vs||Math.abs(i.start.y-e)\u003e=vs)return!1;const r=Math.min(i.start.x,i.end.x),s=Math.max(i.start.x,i.end.x);return n\u003e=r-vs\u0026\u0026o\u003c=s+vs}),JBo=(t,e)=\u003e{const{xs:n,ys:o}=LPt(t,e),i=n.length-1,r=o.length-1,s=new Map,a=(c,l)=\u003e`${c}:${l}`;let A=0;for(let c=0;c\u003ci;c++)for(let l=0;l\u003cr;l++){const u=a(c,l);if(s.has(u))continue;const g=[{x:c,y:l}];for(s.set(u,A);g.length\u003e0;){const h=g.pop();if(!h)continue;const d=[{x:h.x-1,y:h.y},{x:h.x+1,y:h.y},{x:h.x,y:h.y-1},{x:h.x,y:h.y+1}];for(const p of d){if(p.x\u003c0||p.x\u003e=i||p.y\u003c0||p.y\u003e=r)continue;const m=a(p.x,p.y);if(s.has(m))continue;let _=!1;if(p.x!==h.x){const f=n[Math.max(p.x,h.x)],I=o[h.y],C=o[h.y+1];if(f===void 0||I===void 0||C===void 0)continue;_=VBo(t,f,I,C)}else{const f=o[Math.max(p.y,h.y)],I=n[h.x],C=n[h.x+1];if(f===void 0||I===void 0||C===void 0)continue;_=zBo(t,f,I,C)}_||(s.set(m,A),g.push(p))}}A++}return e.map(c=\u003e{const l=Rj(c),u=n.findIndex((h,d)=\u003ed+1\u003cn.length\u0026\u0026l.x\u003e=h-vs\u0026\u0026l.x\u003c=(n[d+1]??h)+vs),g=o.findIndex((h,d)=\u003ed+1\u003co.length\u0026\u0026l.y\u003e=h-vs\u0026\u0026l.y\u003c=(o[d+1]??h)+vs);return s.get(a(u,g))??-1})},f0e=(t,e)=\u003e{const n=JBo(t,e);let o=0;for(let i=0;i\u003cn.length;i++)for(let r=i+1;r\u003cn.length;r++)n[i]===n[r]\u0026\u0026o++;return o},HPt=t=\u003e{const e=new Map,n=t.map(s=\u003e[s.start,s.end]),o=(s,a)=\u003e{const A=vwe(s),c=vwe(a);e.has(A)||e.set(A,new Set),e.has(c)||e.set(c,new Set),e.get(A)?.add(c),e.get(c)?.add(A)};for(let s=0;s\u003ct.length;s++){const a=t[s];if(!(!a||h0e(a)))for(let A=s+1;A\u003ct.length;A++){const c=t[A];if(!c||h0e(c))continue;const l=Math.abs(a.start.x-a.end.x)\u003cvs,u=Math.abs(a.start.y-a.end.y)\u003cvs,g=Math.abs(c.start.x-c.end.x)\u003cvs,h=Math.abs(c.start.y-c.end.y)\u003cvs;if(l\u0026\u0026h){const d={x:a.start.x,y:c.start.y};m0e(a,d)\u0026\u0026m0e(c,d)\u0026\u0026(n[s]?.push(d),n[A]?.push(d))}if(u\u0026\u0026g){const d={x:c.start.x,y:a.start.y};m0e(a,d)\u0026\u0026m0e(c,d)\u0026\u0026(n[s]?.push(d),n[A]?.push(d))}}}for(let s=0;s\u003ct.length;s++){const a=t[s];if(!a||h0e(a))continue;const A=[...new Map(n[s]?.map(c=\u003e[vwe(c),c]))].map(([,c])=\u003ec).sort((c,l)=\u003eMath.abs(a.start.x-a.end.x)\u003cvs?c.y-l.y:c.x-l.x);for(let c=0;c+1\u003cA.length;c++){const l=A[c],u=A[c+1];l\u0026\u0026u\u0026\u0026!TPt(l,u)\u0026\u0026o(l,u)}}let i=0;const r=new Set;for(const s of e.keys()){if(r.has(s))continue;i++;const a=[s];for(r.add(s);a.length\u003e0;){const A=a.pop();if(A)for(const c of e.get(A)??[])r.has(c)||(r.add(c),a.push(c))}}return i},WBo=t=\u003e{let{start:e,end:n}=t;return e.y===n.y\u0026\u0026e.x\u003en.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x\u0026\u0026e.y\u003en.y\u0026\u0026([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{start:e,end:n}},OPt=t=\u003e{if(!t||t.length===0)return[];const e=t.map(WBo),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x\u0026\u0026o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=\u003ec.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x\u003c=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=\u003ec.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y\u003c=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}return i},jBo=(t,e,n,o)=\u003e{let i=t;for(;;){const r=_0e(i,n),s=[...o].find(g=\u003e!r.has(g));if(!s)break;const[a,A]=s.split(\":\"),c=n[Number(a)],l=n[Number(A)];if(!c||!l)break;const u=e.filter(g=\u003eFPt(g,c,l)).sort((g,h)=\u003ep0e([g])-p0e([h])||JSON.stringify(g).localeCompare(JSON.stringify(h))).at(0);if(!u)break;i=OPt([...i,u])}return i},$Bo=(t,e,n)=\u003e{let o=t;for(;;){const i=f0e(o,n);if(i===0)break;const{xs:r,ys:s}=LPt(o,n),a=[];for(let c=0;c\u003co.length;c++){const l=o[c];if(l){if(Math.abs(l.start.y-l.end.y)\u003cvs){const u=Math.min(l.start.x,l.end.x),g=Math.max(l.start.x,l.end.x);for(const h of r){if(h\u003e=u-vs\u0026\u0026h\u003c=g+vs)continue;const d={start:{x:Math.min(h,u),y:l.start.y},end:{x:Math.max(h,g),y:l.start.y}};wwe([d],n)\u0026\u0026a.push(o.map((p,m)=\u003em===c?d:p))}}if(Math.abs(l.start.x-l.end.x)\u003cvs){const u=Math.min(l.start.y,l.end.y),g=Math.max(l.start.y,l.end.y);for(const h of s){if(h\u003e=u-vs\u0026\u0026h\u003c=g+vs)continue;const d={start:{x:l.start.x,y:Math.min(h,u)},end:{x:l.start.x,y:Math.max(h,g)}};wwe([d],n)\u0026\u0026a.push(o.map((p,m)=\u003em===c?d:p))}}}}for(const c of e)a.push([...o,c]);const A=a.map(c=\u003e({lines:OPt(c),shared:f0e(c,n)})).filter(c=\u003ec.shared\u003ci).sort((c,l)=\u003ec.shared-l.shared||c.lines.length-l.lines.length||p0e(c.lines)-p0e(l.lines)).at(0);if(!A)break;o=A.lines}return o},qBo=(t,e)=\u003e{let n=t,o=!0;for(;o;){o=!1;const i=_0e(n,e),r=f0e(n,e),s=HPt(n);for(let a=0;a\u003cn.length;a++){const A=n.filter((c,l)=\u003el!==a);if(wwe(A,e)\u0026\u0026KBo(A,e,i)\u0026\u0026!(f0e(A,e)\u003er)\u0026\u0026!(HPt(A)\u003es)){n=A,o=!0;break}}}return n},GPt=(t=\u003e(t[t.RestoreMissingSeparators=0]=\"RestoreMissingSeparators\",t[t.FixSharedCellRegions=1]=\"FixSharedCellRegions\",t[t.RemoveRedundantSeparators=2]=\"RemoveRedundantSeparators\",t))(GPt||{}),XBo=class extends z7{constructor(t){super(),this.params=t,this._inputRects=t.cellContents.map(e=\u003e({minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height})),this._currentLines=t.reducedLines}params;repairedLines=[];_stage=0;_currentLines=[];_inputRects;_step(){const{originalLines:t}=this.params,e=this._inputRects;switch(this._stage){case 0:{const o=_0e(t,e);this._currentLines=jBo(this._currentLines,t,e,o);break}case 1:this._currentLines=$Bo(this._currentLines,t,e);break;case 2:this._currentLines=qBo(this._currentLines,e),this.repairedLines=this._currentLines,this.solved=!0;break}const n=this.getNextStage(this._stage);n\u0026\u0026(this._stage=n)}getNextStage(t){const e=Object.values(GPt);return e[e.indexOf(t)+1]}getOutput(){return this.repairedLines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,reducedLines:e}=this.params;return{rects:t.map(n=\u003e({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:\"rgba(255, 165, 0, 0.2)\",stroke:\"#c87000\"})),lines:[...e.map(n=\u003e({points:[n.start,n.end],strokeColor:\"rgba(180, 180, 180, 0.4)\",strokeWidth:1,strokeDash:[4,4]})),...this._currentLines.map(n=\u003e({points:[n.start,n.end],strokeColor:\"#cc5500\",strokeWidth:2}))]}}},ri=.001,JN=(t,e,n=ri)=\u003eMath.abs(t.x-e.x)\u003cn\u0026\u0026Math.abs(t.y-e.y)\u003cn,bb=t=\u003e`${t.x.toFixed(4)},${t.y.toFixed(4)}`,Tj=t=\u003eJN(t.start,t.end),ZBo=t=\u003eMath.abs(t.start.x-t.end.x)\u003cri||Math.abs(t.start.y-t.end.y)\u003cri,lO=(t,e,n,o)=\u003eMath.min(e,o)-Math.max(t,n)\u003eri,I0e=t=\u003et.reduce((e,n)=\u003ee+Math.abs(n.start.x-n.end.x)+Math.abs(n.start.y-n.end.y),0),$u=(t,e)=\u003eMath.abs(t.start.x-t.end.x)\u003cri?Math.abs(e.x-t.start.x)\u003cri\u0026\u0026e.y\u003e=Math.min(t.start.y,t.end.y)-ri\u0026\u0026e.y\u003c=Math.max(t.start.y,t.end.y)+ri:Math.abs(t.start.y-t.end.y)\u003cri?Math.abs(e.y-t.start.y)\u003cri\u0026\u0026e.x\u003e=Math.min(t.start.x,t.end.x)-ri\u0026\u0026e.x\u003c=Math.max(t.start.x,t.end.x)+ri:!1,C0e=(t,e,n)=\u003ee===\"start\"?{start:n,end:t.end}:{start:t.start,end:n},y0e=(t,e)=\u003ee===\"start\"?t.end:t.start,kj=t=\u003e({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),YPt=(t,e,n)=\u003et\u003eMath.min(e,n)+ri\u0026\u0026t\u003cMath.max(e,n)-ri,UPt=t=\u003e{const e=new Map;for(const n of t)e.set(bb(n.start),(e.get(bb(n.start))??0)+1),e.set(bb(n.end),(e.get(bb(n.end))??0)+1);return e},e9o=(t,e)=\u003ee.some(n=\u003e{const o=(Math.abs(t.x-n.minX)\u003cri||Math.abs(t.x-n.maxX)\u003cri)\u0026\u0026t.y\u003e=n.minY-ri\u0026\u0026t.y\u003c=n.maxY+ri,i=(Math.abs(t.y-n.minY)\u003cri||Math.abs(t.y-n.maxY)\u003cri)\u0026\u0026t.x\u003e=n.minX-ri\u0026\u0026t.x\u003c=n.maxX+ri;return o||i}),Pwe=(t,e)=\u003e{if(!(Math.abs(t.start.x-t.end.x)\u003e=ri)){if(Math.abs(t.start.y-e)\u003cri)return\"start\";if(Math.abs(t.end.y-e)\u003cri)return\"end\"}},KPt=(t,e)=\u003e{if(!(Math.abs(t.start.y-t.end.y)\u003e=ri)){if(Math.abs(t.start.x-e)\u003cri)return\"start\";if(Math.abs(t.end.x-e)\u003cri)return\"end\"}},t9o=(t,e)=\u003e{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)\u003cri){const s=Math.min(o,r),a=Math.max(o,r);return n\u003ee.minX+ri\u0026\u0026n\u003ce.maxX-ri\u0026\u0026a\u003ee.minY-ri\u0026\u0026s\u003ce.maxY+ri}if(Math.abs(o-r)\u003cri){const s=Math.min(n,i),a=Math.max(n,i);return o\u003ee.minY+ri\u0026\u0026o\u003ce.maxY-ri\u0026\u0026a\u003ee.minX+ri\u0026\u0026s\u003ce.maxX-ri}return!0},n9o=(t,e)=\u003e{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)\u003cri){const s=Math.min(o,r),a=Math.max(o,r);return(Math.abs(n-e.minX)\u003cri||Math.abs(n-e.maxX)\u003cri)\u0026\u0026lO(s,a,e.minY,e.maxY)}if(Math.abs(o-r)\u003cri){const s=Math.min(n,i),a=Math.max(n,i);return(Math.abs(o-e.minY)\u003cri||Math.abs(o-e.maxY)\u003cri)\u0026\u0026lO(s,a,e.minX,e.maxX)}return!1},vx=(t,e)=\u003et.length\u003e0\u0026\u0026t.every(n=\u003e!Tj(n)\u0026\u0026ZBo(n)\u0026\u0026!e.some(o=\u003et9o(n,o)||n9o(n,o))),o9o=(t,e,n)=\u003e{const o=kj(e),i=kj(n);if(Math.abs(t.start.x-t.end.x)\u003cri){const r=t.start.x,s=Math.min(t.start.y,t.end.y),a=Math.max(t.start.y,t.end.y);return YPt(r,o.x,i.x)\u0026\u0026lO(s,a,e.minY,e.maxY)\u0026\u0026lO(s,a,n.minY,n.maxY)}if(Math.abs(t.start.y-t.end.y)\u003cri){const r=t.start.y,s=Math.min(t.start.x,t.end.x),a=Math.max(t.start.x,t.end.x);return YPt(r,o.y,i.y)\u0026\u0026lO(s,a,e.minX,e.maxX)\u0026\u0026lO(s,a,n.minX,n.maxX)}return!1},Sb=(t,e)=\u003e{const n=new Set;for(let o=0;o\u003ce.length;o++){const i=e[o];if(i)for(let r=o+1;r\u003ce.length;r++){const s=e[r];s\u0026\u0026t.some(a=\u003eo9o(a,i,s))\u0026\u0026n.add(`${o}:${r}`)}}return n},Fj=(t,e,n)=\u003e{const o=Sb(t,e);return[...n].every(i=\u003eo.has(i))},i9o=(t,e)=\u003e{const n=new Set,o=new Set;for(const i of e)n.add(i.minX),n.add(i.maxX),n.add(kj(i).x),o.add(i.minY),o.add(i.maxY),o.add(kj(i).y);for(const i of t)n.add(i.start.x),n.add(i.end.x),o.add(i.start.y),o.add(i.end.y);return{xs:[...n].sort((i,r)=\u003ei-r),ys:[...o].sort((i,r)=\u003ei-r)}},r9o=(t,e,n,o)=\u003et.some(i=\u003e{if(Math.abs(i.start.x-i.end.x)\u003e=ri||Math.abs(i.start.x-e)\u003e=ri)return!1;const r=Math.min(i.start.y,i.end.y),s=Math.max(i.start.y,i.end.y);return n\u003e=r-ri\u0026\u0026o\u003c=s+ri}),s9o=(t,e,n,o)=\u003et.some(i=\u003e{if(Math.abs(i.start.y-i.end.y)\u003e=ri||Math.abs(i.start.y-e)\u003e=ri)return!1;const r=Math.min(i.start.x,i.end.x),s=Math.max(i.start.x,i.end.x);return n\u003e=r-ri\u0026\u0026o\u003c=s+ri}),a9o=(t,e)=\u003e{const{xs:n,ys:o}=i9o(t,e),i=n.length-1,r=o.length-1,s=new Map,a=(c,l)=\u003e`${c}:${l}`;let A=0;for(let c=0;c\u003ci;c++)for(let l=0;l\u003cr;l++){const u=a(c,l);if(s.has(u))continue;const g=[{x:c,y:l}];for(s.set(u,A);g.length\u003e0;){const h=g.pop();if(!h)continue;const d=[{x:h.x-1,y:h.y},{x:h.x+1,y:h.y},{x:h.x,y:h.y-1},{x:h.x,y:h.y+1}];for(const p of d){if(p.x\u003c0||p.x\u003e=i||p.y\u003c0||p.y\u003e=r)continue;const m=a(p.x,p.y);if(s.has(m))continue;let _=!1;if(p.x!==h.x){const f=n[Math.max(p.x,h.x)],I=o[h.y],C=o[h.y+1];if(f===void 0||I===void 0||C===void 0)continue;_=r9o(t,f,I,C)}else{const f=o[Math.max(p.y,h.y)],I=n[h.x],C=n[h.x+1];if(f===void 0||I===void 0||C===void 0)continue;_=s9o(t,f,I,C)}_||(s.set(m,A),g.push(p))}}A++}return e.map(c=\u003e{const l=kj(c),u=n.findIndex((h,d)=\u003ed+1\u003cn.length\u0026\u0026l.x\u003e=h-ri\u0026\u0026l.x\u003c=(n[d+1]??h)+ri),g=o.findIndex((h,d)=\u003ed+1\u003co.length\u0026\u0026l.y\u003e=h-ri\u0026\u0026l.y\u003c=(o[d+1]??h)+ri);return s.get(a(u,g))??-1})},J7=(t,e)=\u003e{const n=a9o(t,e);let o=0;for(let i=0;i\u003cn.length;i++)for(let r=i+1;r\u003cn.length;r++)n[i]===n[r]\u0026\u0026o++;return o},xB=t=\u003e{const e=new Map,n=t.map(s=\u003e[s.start,s.end]),o=(s,a)=\u003e{const A=bb(s),c=bb(a);e.has(A)||e.set(A,new Set),e.has(c)||e.set(c,new Set),e.get(A)?.add(c),e.get(c)?.add(A)};for(let s=0;s\u003ct.length;s++){const a=t[s];if(!(!a||Tj(a)))for(let A=s+1;A\u003ct.length;A++){const c=t[A];if(!c||Tj(c))continue;const l=Math.abs(a.start.x-a.end.x)\u003cri,u=Math.abs(a.start.y-a.end.y)\u003cri,g=Math.abs(c.start.x-c.end.x)\u003cri,h=Math.abs(c.start.y-c.end.y)\u003cri;if(l\u0026\u0026h){const d={x:a.start.x,y:c.start.y};$u(a,d)\u0026\u0026$u(c,d)\u0026\u0026(n[s]?.push(d),n[A]?.push(d))}if(u\u0026\u0026g){const d={x:c.start.x,y:a.start.y};$u(a,d)\u0026\u0026$u(c,d)\u0026\u0026(n[s]?.push(d),n[A]?.push(d))}}}for(let s=0;s\u003ct.length;s++){const a=t[s];if(!a||Tj(a))continue;const A=[...new Map(n[s]?.map(c=\u003e[bb(c),c]))].map(([,c])=\u003ec).sort((c,l)=\u003eMath.abs(a.start.x-a.end.x)\u003cri?c.y-l.y:c.x-l.x);for(let c=0;c+1\u003cA.length;c++){const l=A[c],u=A[c+1];l\u0026\u0026u\u0026\u0026!JN(l,u)\u0026\u0026o(l,u)}}let i=0;const r=new Set;for(const s of e.keys()){if(r.has(s))continue;i++;const a=[s];for(r.add(s);a.length\u003e0;){const A=a.pop();if(A)for(const c of e.get(A)??[])r.has(c)||(r.add(c),a.push(c))}}return i},Mwe=(t,e,n)=\u003e{let o=t,i=!0;for(;i;){i=!1;const r=UPt(o);for(let s=0;s\u003co.length;s++){const a=o[s];if(a){for(const A of[\"start\",\"end\"]){const c=a[A];if(r.get(bb(c))!==1)continue;const l=[],u=Math.abs(a.start.x-a.end.x)\u003cri,g=Math.abs(a.start.y-a.end.y)\u003cri;for(let d=0;d\u003co.length;d++){if(s===d)continue;const p=o[d];if(p){if(u\u0026\u0026Math.abs(p.start.y-p.end.y)\u003cri){const m={x:a.start.x,y:p.start.y};$u(p,m)\u0026\u0026l.push(m)}if(g\u0026\u0026Math.abs(p.start.x-p.end.x)\u003cri){const m={x:p.start.x,y:a.start.y};$u(p,m)\u0026\u0026l.push(m)}}}const h=l.filter(d=\u003e!JN(d,c)).map(d=\u003e({point:d,line:C0e(a,A,d)})).filter(({line:d})=\u003eI0e([d])\u003eI0e([a])+ri).filter(({line:d})=\u003e!n?.preserveOriginalSpan||$u(d,c)).filter(({line:d})=\u003evx([d],e)).sort((d,p)=\u003eI0e([d.line])-I0e([p.line])||JSON.stringify(d.point).localeCompare(JSON.stringify(p.point))).at(0);if(h){o=o.map((d,p)=\u003ep===s?h.line:d),i=!0;break}}if(i)break}}}return o},A9o=(t,e)=\u003e{const n=[],o=Math.abs(t.start.x-t.end.x)\u003cri,i=Math.abs(t.start.y-t.end.y)\u003cri;for(const r of e){if(r===t)continue;const s=Math.abs(r.start.x-r.end.x)\u003cri,a=Math.abs(r.start.y-r.end.y)\u003cri;if(o\u0026\u0026a){const A={x:t.start.x,y:r.start.y};$u(t,A)\u0026\u0026$u(r,A)\u0026\u0026n.push(A)}if(i\u0026\u0026s){const A={x:r.start.x,y:t.start.y};$u(t,A)\u0026\u0026$u(r,A)\u0026\u0026n.push(A)}}return n},VPt=(t,e,n)=\u003e{let o=t,i=!0;for(;i;){i=!1;const r=UPt(o),s=xB(o);for(let a=0;a\u003co.length;a++){const A=o[a];if(!A)continue;const c=A9o(A,o).filter(l=\u003e!JN(l,A.start)\u0026\u0026!JN(l,A.end));if(c.length!==0){for(const l of[\"start\",\"end\"]){const u=A[l];if(r.get(bb(u))!==1||e9o(u,e))continue;const g=c.map(p=\u003e({point:p,distance:Math.abs(p.x-u.x)+Math.abs(p.y-u.y)})).sort((p,m)=\u003ep.distance-m.distance).at(0);if(!g)continue;const h=C0e(A,l,g.point);if(!vx([h],e))continue;const d=o.map((p,m)=\u003em===a?h:p);if(!(xB(d)\u003es)\u0026\u0026!(n\u0026\u0026!Fj(d,e,n))){o=d,i=!0;break}}if(i)break}}}return o},c9o=t=\u003e{let{start:e,end:n}=t;return e.y===n.y\u0026\u0026e.x\u003en.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x\u0026\u0026e.y\u003en.y\u0026\u0026([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{start:e,end:n}},Lj=t=\u003e{if(!t||t.length===0)return[];const e=t.map(c9o),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x\u0026\u0026o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=\u003ec.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x\u003c=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=\u003ec.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y\u003c=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}return i},l9o=(t,e)=\u003e{let n=t,o=!0;const i=r=\u003e{const s=Sb(n,e),a=Sb(r,e);return[...s].every(A=\u003ea.has(A))};for(;o;){o=!1;const r=J7(n,e);for(let a=0;a\u003cn.length;a++){const A=n[a];if(!A||Math.abs(A.start.y-A.end.y)\u003e=ri)continue;const c=A.start.y;for(let l=0;l\u003cn.length;l++){if(l===a)continue;const u=n[l];if(!u)continue;const g=Pwe(u,c);if(g\u0026\u0026$u(A,{x:u.start.x,y:c})){for(let h=l+1;h\u003cn.length;h++){if(h===a)continue;const d=n[h];if(!d)continue;const p=Pwe(d,c);if(!p||!$u(A,{x:d.start.x,y:c}))continue;const m=y0e(u,g),_=y0e(d,p);if((m.y-c)*(_.y-c)\u003e=-ri)continue;const f=(u.start.x+d.start.x)/2,I={start:{x:f,y:Math.min(m.y,_.y)},end:{x:f,y:Math.max(m.y,_.y)}};if(!vx([I],e))continue;const C=n.filter((y,x)=\u003ex!==l\u0026\u0026x!==h).concat(I);if(vx(C,e)\u0026\u0026i(C)\u0026\u0026!(J7(C,e)\u003er)){n=Lj(C),o=!0;break}}if(o)break}}if(o)break}if(o)continue;const s=xB(n);for(let a=0;a\u003cn.length;a++){const A=n[a];if(!(!A||Math.abs(A.start.x-A.end.x)\u003e=ri)){for(let c=a+1;c\u003cn.length;c++){const l=n[c];if(!l||Math.abs(l.start.x-l.end.x)\u003e=ri||Math.abs(A.start.x-l.start.x)\u003cri)continue;const u=Math.max(Math.min(A.start.y,A.end.y),Math.min(l.start.y,l.end.y)),g=Math.min(Math.max(A.start.y,A.end.y),Math.max(l.start.y,l.end.y));if(g-u\u003c-ri||!n.some((_,f)=\u003e{if(f===a||f===c||Math.abs(_.start.y-_.end.y)\u003e=ri)return!1;const I=_.start.y;return I\u003cu-ri||I\u003eg+ri?!1:$u(_,{x:A.start.x,y:I})\u0026\u0026$u(_,{x:l.start.x,y:I})}))continue;const d=Math.min(A.start.y,A.end.y,l.start.y,l.end.y),p=Math.max(A.start.y,A.end.y,l.start.y,l.end.y),m=[A.start.x,l.start.x].map(_=\u003e({start:{x:_,y:d},end:{x:_,y:p}})).filter(_=\u003evx([_],e));for(const _ of m){let f=n.filter((I,C)=\u003eC!==a\u0026\u0026C!==c).concat(_);if(vx(f,e)\u0026\u0026i(f)\u0026\u0026!(xB(f)\u003es)\u0026\u0026!(J7(f,e)\u003er)){for(let I=0;I\u003cf.length;){const C=f[I];if(!C||Math.abs(C.start.y-C.end.y)\u003e=ri||C.start.y\u003cu-ri||C.start.y\u003eg+ri||!$u(C,{x:A.start.x,y:C.start.y})||!$u(C,{x:l.start.x,y:C.start.y})){I++;continue}const y=f.filter((x,E)=\u003eE!==I);if(vx(y,e)\u0026\u0026i(y)\u0026\u0026xB(y)\u003c=s\u0026\u0026J7(y,e)\u003c=r){f=y;continue}I++}n=Lj(f),o=!0;break}}if(o)break}if(o)break}}}return n},zPt=(t,e)=\u003e{let n=t,o=!0;for(;o;){o=!1;const i=J7(n,e),r=Sb(n,e);for(let s=0;s\u003cn.length;s++){const a=n[s];if(!a||Math.abs(a.start.x-a.end.x)\u003e=ri)continue;const A=a.start.x;for(let c=0;c\u003cn.length;c++){if(c===s)continue;const l=n[c];if(l\u0026\u0026KPt(l,A)\u0026\u0026$u(a,{x:A,y:l.start.y})){for(let u=c+1;u\u003cn.length;u++){if(u===s)continue;const g=n[u];if(g\u0026\u0026$u(g,{x:A,y:g.start.y})\u0026\u0026$u(a,{x:A,y:g.start.y})\u0026\u0026!(Math.abs(l.start.y-g.start.y)\u003cri)){for(const[h,d]of[[l,g],[g,l]]){const p=Pwe(a,h.start.y);if(!p)continue;const m=KPt(h,A);if(!m)continue;const _=y0e(h,m),f=Math.min(d.start.x,d.end.x),I=Math.max(d.start.x,d.end.x);if(_.x\u003cA-ri\u0026\u0026I\u003c=A+ri||_.x\u003eA+ri\u0026\u0026f\u003e=A-ri)continue;const C=y0e(a,p);for(const y of[h.start.y,d.start.y]){const x={start:{x:Math.min(_.x,f),y},end:{x:Math.max(_.x,I),y}};if(!vx([x],e))continue;const E={start:C,end:{x:A,y}};if(Tj(E)||!vx([E],e))continue;let B=n.filter((S,Q)=\u003eQ!==c\u0026\u0026Q!==u\u0026\u0026Q!==s).concat(x,E);if(B=Mwe(B,e,{preserveOriginalSpan:!0}),!!vx(B,e)\u0026\u0026Fj(B,e,r)\u0026\u0026!(J7(B,e)\u003ei)){n=Lj(B),o=!0;break}}if(o)break}if(o)break}}if(o)break}}if(o)break}}return n},JPt=t=\u003eMath.abs(t.start.y-t.end.y)\u003cri,WPt=t=\u003eMath.abs(t.start.x-t.end.x)\u003cri,jPt=(t,e)=\u003e{const n=Sb(t,e),o=J7(t,e),i=xB(t);for(let r=0;r\u003ct.length;r++){const s=t[r];if(!(!s||!JPt(s)))for(let a=r+1;a\u003ct.length;a++){const A=t[a];if(!A||!JPt(A))continue;const c=Math.min(s.start.y,A.start.y),l=Math.max(s.start.y,A.start.y);if(l-c\u003cri)continue;const u=Math.min(s.start.x,s.end.x),g=Math.max(s.start.x,s.end.x),h=Math.min(A.start.x,A.end.x),d=Math.max(A.start.x,A.end.x),p=Math.max(u,h),m=Math.min(g,d);if(m-p\u003cri||!t.some(x=\u003e{if(!WPt(x))return!1;const E=x.start.x;return E\u003e=p-ri\u0026\u0026E\u003c=m+ri\u0026\u0026$u(x,{x:E,y:c})\u0026\u0026$u(x,{x:E,y:l})}))continue;const f=Math.min(u,h),I=Math.max(g,d),C=new Set([c,l]);for(const x of e)x.maxX\u003c=f+ri||x.minX\u003e=I-ri||(x.minY\u003ec\u0026\u0026x.minY\u003cl\u0026\u0026C.add(x.minY),x.maxY\u003ec\u0026\u0026x.maxY\u003cl\u0026\u0026C.add(x.maxY));const y=[...C].sort((x,E)=\u003ex-E);for(let x=1;x\u003cy.length;x++){const E=y[x-1],B=y[x];if(E===void 0||B===void 0)continue;const S=(E+B)/2,Q={start:{x:f,y:S},end:{x:I,y:S}};if(!vx([Q],e))continue;const w=[];for(let M=0;M\u003ct.length;M++){if(M===r||M===a)continue;const k=t[M];if(!k)continue;if(!WPt(k)||k.start.x\u003cf||k.start.x\u003eI){w.push(k);continue}const R=k.start.x;if(!($u(k,{x:R,y:c})||$u(k,{x:R,y:l}))){w.push(k);continue}const O=k.start.y\u003e=c\u0026\u0026k.start.y\u003c=l,U=k.end.y\u003e=c\u0026\u0026k.end.y\u003c=l;O\u0026\u0026U||(O?w.push({start:{x:R,y:S},end:k.end}):U?w.push({start:k.start,end:{x:R,y:S}}):w.push(k))}if(w.push(Q),!!vx(w,e)\u0026\u0026Fj(w,e,n)\u0026\u0026!(J7(w,e)\u003eo)\u0026\u0026!(xB(w)\u003ei))return jPt(Lj(w),e)}}}return t},u9o=(t,e)=\u003e{let n=t,o=!0;for(;o;){o=!1;const i=xB(n),r=Sb(n,e);for(let s=0;s\u003cn.length;s++){const a=n[s];if(!a)continue;const A=Math.abs(a.start.y-a.end.y)\u003cri,c=Math.abs(a.start.x-a.end.x)\u003cri;if(!(!A\u0026\u0026!c)){for(let l=0;l\u003cn.length;l++){if(s===l)continue;const u=n[l];if(!u)continue;const g=Math.abs(u.start.y-u.end.y)\u003cri,h=Math.abs(u.start.x-u.end.x)\u003cri;if(A!==g||c!==h)continue;const d=[a.start,a.end];let p;if(A?p=d.map(I=\u003e({x:I.x,y:u.start.y})):p=d.map(I=\u003e({x:u.start.x,y:I.y})),!p.every(I=\u003e$u(u,I)))continue;const m=new Map;let _=!0;for(let I=0;I\u003cd.length;I++){const C=d[I],y=p[I];if(!C||!y){_=!1;break}const x=n.findIndex((w,M)=\u003e{if(M===s||M===l)return!1;const k=Math.abs(w.start.y-w.end.y)\u003cri,R=Math.abs(w.start.x-w.end.x)\u003cri;return(A\u0026\u0026R||c\u0026\u0026k)\u0026\u0026$u(w,C)});if(x===-1)continue;const E=n[x];if(!E){_=!1;break}const B=JN(E.start,C),S=JN(E.end,C);if(!B\u0026\u0026!S\u0026\u0026$u(E,y))continue;if(!B\u0026\u0026!S){_=!1;break}let Q;if(B?Q=C0e(E,\"start\",y):Q=C0e(E,\"end\",y),!vx([Q],e)){_=!1;break}m.set(x,Q)}if(!_)continue;const f=n.map((I,C)=\u003em.get(C)??I).filter((I,C)=\u003eC!==s);if(!(xB(f)\u003ei)\u0026\u0026Fj(f,e,r)){n=f,o=!0;break}}if(o)break}}}return n},g9o=(t,e)=\u003e{let n=t,o=!0;for(;o;){o=!1;const i=Sb(n,e),r=J7(n,e),s=xB(n);for(let a=0;a\u003cn.length;a++){const A=n.filter((c,l)=\u003el!==a);if(vx(A,e)\u0026\u0026Fj(A,e,i)\u0026\u0026!(J7(A,e)\u003er)\u0026\u0026!(xB(A)\u003es)){n=A,o=!0;break}}}return n},$Pt=(t=\u003e(t[t.ConnectDanglingEndpoints=0]=\"ConnectDanglingEndpoints\",t[t.CollapseVerticalDoglegs=1]=\"CollapseVerticalDoglegs\",t[t.CollapseHorizontalSteps=2]=\"CollapseHorizontalSteps\",t[t.RemoveRedundantParallelBridges=3]=\"RemoveRedundantParallelBridges\",t[t.ReconnectDanglingEndpoints=4]=\"ReconnectDanglingEndpoints\",t[t.TrimDanglingOverhangs=5]=\"TrimDanglingOverhangs\",t[t.RemoveRedundantSeparators=6]=\"RemoveRedundantSeparators\",t[t.MergeAlignedSegments=7]=\"MergeAlignedSegments\",t))($Pt||{}),d9o=class extends z7{constructor(t){super(),this.params=t,this._inputRects=t.cellContents.map(e=\u003e({minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height})),this._currentLines=t.repairedLines}params;refinedLines=[];_stage=0;_currentLines=[];_inputRects;_step(){const t=this._inputRects;switch(this._stage){case 0:this._currentLines=Mwe(this._currentLines,t,{preserveOriginalSpan:!0});break;case 1:this._currentLines=l9o(this._currentLines,t);break;case 2:this._currentLines=zPt(this._currentLines,t);break;case 3:this._currentLines=u9o(this._currentLines,t);break;case 4:this._currentLines=Mwe(this._currentLines,t,{preserveOriginalSpan:!0});break;case 5:this._currentLines=VPt(this._currentLines,t,Sb(this._currentLines,t));break;case 6:this._currentLines=g9o(this._currentLines,t);break;case 7:this._currentLines=Lj(this._currentLines),this._currentLines=zPt(this._currentLines,t),this._currentLines=jPt(this._currentLines,t),this._currentLines=VPt(this._currentLines,t,Sb(this._currentLines,t)),this.refinedLines=this._currentLines,this.solved=!0;break}const e=this.getNextStage(this._stage);e\u0026\u0026(this._stage=e)}getNextStage(t){const e=Object.values($Pt);return e[e.indexOf(t)+1]}getOutput(){return this.refinedLines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,repairedLines:e}=this.params;return{rects:t.map(n=\u003e({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:\"rgba(255, 165, 0, 0.2)\",stroke:\"#c87000\"})),lines:[...e.map(n=\u003e({points:[n.start,n.end],strokeColor:\"rgba(180, 180, 180, 0.4)\",strokeWidth:1,strokeDash:[4,4]})),...this._currentLines.map(n=\u003e({points:[n.start,n.end],strokeColor:\"#000000\",strokeWidth:3}))]}}},h9o=class extends ABo{computeMidlinesSolver;computeIntersectionsSolver;computeSegmentsSolver;buildGridSolver;mergeGridSolver;buildOutlineSolver;reduceBoundaryLinesSolver;repairBoundaryLinesSolver;refineBoundaryLinesSolver;pipelineDef=[Bb(\"computeMidlinesSolver\",cBo,t=\u003e[{cellContents:t.inputProblem.cellContents,containerWidth:t.inputProblem.containerWidth,containerHeight:t.inputProblem.containerHeight}]),Bb(\"computeIntersectionsSolver\",uBo,t=\u003e[{midlines:t.getSolver(\"computeMidlinesSolver\").midlines}]),Bb(\"computeSegmentsSolver\",mBo,t=\u003e[{midlines:t.getSolver(\"computeMidlinesSolver\").midlines,intersections:t.getSolver(\"computeIntersectionsSolver\").intersections,cellContents:t.inputProblem.cellContents}]),Bb(\"buildGridSolver\",CBo,t=\u003e[{allSegments:t.getSolver(\"computeSegmentsSolver\").allSegments,cellContents:t.inputProblem.cellContents,containerWidth:t.inputProblem.containerWidth,containerHeight:t.inputProblem.containerHeight}]),Bb(\"mergeGridSolver\",BBo,t=\u003e[{validSegments:t.getSolver(\"buildGridSolver\").validSegments,gridRects:t.getSolver(\"buildGridSolver\").gridRects,cellContainingRects:t.getSolver(\"buildGridSolver\").cellContainingRects,cellContents:t.inputProblem.cellContents}]),Bb(\"buildOutlineSolver\",SBo,t=\u003e[{groupedRects:t.getSolver(\"mergeGridSolver\").groupedRects}]),Bb(\"reduceBoundaryLinesSolver\",OBo,t=\u003e[{outlineLines:t.getSolver(\"buildOutlineSolver\").outlineLines,cellContents:t.inputProblem.cellContents,offsetX:t.inputProblem.offsetX,offsetY:t.inputProblem.offsetY}]),Bb(\"repairBoundaryLinesSolver\",XBo,t=\u003e[{reducedLines:t.getSolver(\"reduceBoundaryLinesSolver\").reducedLines,originalLines:t.getSolver(\"reduceBoundaryLinesSolver\").mergedOriginalLines,cellContents:t.inputProblem.cellContents}]),Bb(\"refineBoundaryLinesSolver\",d9o,t=\u003e[{repairedLines:t.getSolver(\"repairBoundaryLinesSolver\").repairedLines,cellContents:t.inputProblem.cellContents}])];finalVisualize(){const t=this.getSolver(\"refineBoundaryLinesSolver\"),e=this.getSolver(\"buildOutlineSolver\"),n=t?.refinedLines??e?.outlineLines;return n?{rects:this.inputProblem.cellContents.map(o=\u003e({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:\"rgba(255, 165, 0, 0.3)\",stroke:\"#c87000\",label:o.cellId})),lines:n.map(o=\u003e({points:[o.start,o.end],strokeColor:\"#000000\",strokeWidth:3}))}:null}initialVisualize(){return{rects:this.inputProblem.cellContents.map(t=\u003e({center:{x:t.x+t.width/2,y:t.y+t.height/2},width:t.width,height:t.height,fill:\"rgba(255, 165, 0, 0.3)\",stroke:\"#c87000\",label:t.cellId}))}}getConstructorParams(){return[this.inputProblem]}getOutput(){return{midlines:this.getSolver(\"computeMidlinesSolver\")?.midlines??[],allSegments:this.getSolver(\"computeSegmentsSolver\")?.allSegments??[],validSegments:this.getSolver(\"buildGridSolver\")?.validSegments??[],mergedRectGroups:this.getSolver(\"mergeGridSolver\")?.mergedRectGroups??[],cellRects:this.inputProblem.cellContents,gridRects:this.getSolver(\"buildGridSolver\")?.gridRects??[],outlineLines:this.getSolver(\"refineBoundaryLinesSolver\")?.refinedLines??this.getSolver(\"buildOutlineSolver\")?.outlineLines??[]}}},p9o=(t,e,n)=\u003e({...t,start:{x:t.start.x+e,y:t.start.y+n},end:{x:t.end.x+e,y:t.end.y+n}}),Dwe=t=\u003e{let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t)e=Math.min(e,r.minX),n=Math.min(n,r.minY),o=Math.max(o,r.maxX),i=Math.max(i,r.maxY);return{minX:e,minY:n,maxX:o,maxY:i}},m9o=t=\u003e{let{start:e,end:n}=t;return e.y===n.y\u0026\u0026e.x\u003en.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x\u0026\u0026e.y\u003en.y\u0026\u0026([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{...t,start:e,end:n}},_9o=t=\u003e{if(!t||t.length===0)return[];const e=t.map(m9o),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x\u0026\u0026o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=\u003ec.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x\u003c=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=\u003ec.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y\u003c=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A\u0026\u0026i.push(A)}return i},x0e=(t,e)=\u003et.x!==e.x?t.x-e.x:t.y-e.y,f9o=(t,e,n)=\u003e{const o=t.map((h,d)=\u003e({...h,cellId:`cell-${d}`})),i=Dwe(o.map(h=\u003e({minX:h.x,minY:h.y,maxX:h.x+h.width,maxY:h.y+h.height}))),r=i.minX,s=i.minY;e??=i.maxX-i.minX,n??=i.maxY-i.minY;const a=o.map(h=\u003e({...h,x:h.x-r,y:h.y-s})),A=new h9o({cellContents:a,containerWidth:e,containerHeight:n,offsetX:r,offsetY:s});A.solve();const c=A.getOutput(),l=h=\u003ep9o(h,r,s),u=c.outlineLines.map(l);return _9o(u).map(h=\u003e({start:x0e(h.start,h.end)\u003c0?h.start:h.end,end:x0e(h.start,h.end)\u003c0?h.end:h.start})).sort((h,d)=\u003ex0e(h.start,d.start)||x0e(h.end,d.end))};function I9o(t,e){if(!Number.isFinite(e)||e\u003c0)throw new Error(\"cellMargin must be finite and nonnegative\");if(e===0||t.length\u003c2)return t;const n=t.map(r=\u003e({...r,minX:r.minX-e,maxX:r.maxX+e,minY:r.minY-e,maxY:r.maxY+e})),o=[n[0]],i=n.slice(1);for(;i.length\u003e0;){const r=i.findIndex(s=\u003eo.some(a=\u003ea.minX\u003c=s.maxX\u0026\u0026a.maxX\u003e=s.minX\u0026\u0026a.minY\u003c=s.maxY\u0026\u0026a.maxY\u003e=s.minY));if(r\u003c0)return n;o.push(...i.splice(r,1))}return t}var C9o=(t,e={})=\u003ef9o(I9o(t,e.cellMargin??0).map(n=\u003e({x:n.minX,y:n.minY,width:n.maxX-n.minX,height:n.maxY-n.minY}))),y9o=Object.defineProperty,x9o=(t,e)=\u003e{for(var n in e)y9o(t,n,{get:e[n],enumerable:!0})},qPt={};x9o(qPt,{Ammeter:()=\u003eDTo,AnalogAcSweepSimulation:()=\u003egFo,AnalogAnalysisSimulation:()=\u003eHO,AnalogDcOperatingPointSimulation:()=\u003elFo,AnalogDcSweepSimulation:()=\u003euFo,AnalogSimulation:()=\u003eAFo,AnalogSweepParameter:()=\u003efFo,AnalogTransientSimulation:()=\u003ecFo,Antenna:()=\u003eITo,AssemblyDevice:()=\u003eqkt,AutoroutingPhase:()=\u003eTTo,Battery:()=\u003eLko,Board:()=\u003ewB,Breakout:()=\u003eJMe,BreakoutPoint:()=\u003edR,Bus:()=\u003eFPo,CadAssembly:()=\u003ed6o,CadModel:()=\u003ep6o,Capacitor:()=\u003eMDt,Chip:()=\u003ezj,Connector:()=\u003eLDt,Constraint:()=\u003eRTo,CopperPour:()=\u003eQkt,CopperText:()=\u003eFMt,CourtyardCircle:()=\u003eLMt,CourtyardOutline:()=\u003eHMt,CourtyardRect:()=\u003eOMt,Crystal:()=\u003eVko,CurrentSource:()=\u003eLkt,Cutout:()=\u003eT0e,DifferentialPair:()=\u003eUPo,Diode:()=\u003eODt,DrcCheck:()=\u003eRRo,EnclosureCutoutAperture:()=\u003eWMe,EnclosureFdmBox:()=\u003eZkt,FabricationNoteDimension:()=\u003ekTo,FabricationNotePath:()=\u003eGMt,FabricationNoteRect:()=\u003eYMt,FabricationNoteText:()=\u003eKMt,Fanout:()=\u003eJMe,FanoutPoint:()=\u003edR,Fiducial:()=\u003ePko,Footprint:()=\u003eY0e,Fuse:()=\u003eyTo,Group:()=\u003eA6,Hole:()=\u003emO,Inductor:()=\u003eukt,Interconnect:()=\u003eETo,Jumper:()=\u003exTo,Keepout:()=\u003ek0e,Led:()=\u003edkt,Mosfet:()=\u003ehkt,MountedBoard:()=\u003elTo,Net:()=\u003eQb,NetLabel:()=\u003epDo,NormalComponent:()=\u003eg0,OpAmp:()=\u003ezko,Panel:()=\u003epTo,PcbNoteDimension:()=\u003eFTo,PcbNoteLine:()=\u003eVMt,PcbNotePath:()=\u003ezMt,PcbNoteRect:()=\u003eJMt,PcbNoteText:()=\u003eWMt,PcbTrace:()=\u003etPe,PcbVia:()=\u003ejMt,PinHeader:()=\u003eHko,Pinout:()=\u003eCTo,PlatedHole:()=\u003ePb,Port:()=\u003ePu,Potentiometer:()=\u003eUko,PowerSource:()=\u003ebTo,PrimitiveComponent:()=\u003eIr,PushButton:()=\u003epkt,Renderable:()=\u003etMt,Resistor:()=\u003emkt,Resonator:()=\u003eGko,SchematicArc:()=\u003eqMt,SchematicBox:()=\u003eZRt,SchematicCell:()=\u003eaFo,SchematicCircle:()=\u003eXMt,SchematicGraphic:()=\u003eiFo,SchematicLine:()=\u003enPe,SchematicPath:()=\u003eZMt,SchematicRect:()=\u003eeDt,SchematicRow:()=\u003esFo,SchematicSection:()=\u003eXko,SchematicSheet:()=\u003eoFo,SchematicSymbol:()=\u003eqko,SchematicTable:()=\u003erFo,SchematicText:()=\u003etDt,SilkscreenCircle:()=\u003enDt,SilkscreenGraphic:()=\u003ewko,SilkscreenLine:()=\u003eoDt,SilkscreenPath:()=\u003eiDt,SilkscreenRect:()=\u003erDt,SilkscreenText:()=\u003eoPe,SmtPad:()=\u003eMb,SolderJumper:()=\u003eBTo,SpiceModel:()=\u003eBFo,Subcircuit:()=\u003eDkt,Subpanel:()=\u003eTkt,Switch:()=\u003e_kt,Symbol:()=\u003eiPe,TestPoint:()=\u003eJko,Trace:()=\u003et1,TraceHint:()=\u003eqRt,Transistor:()=\u003efkt,Via:()=\u003eBMt,VoltageProbe:()=\u003eEFo,VoltageSource:()=\u003eFkt});var XPt=class{input;constructor({input:t}){this.input=t}solveAndMapToTraces(){const t=[];for(const e of this.input.connections){if(e.pointsToConnect.length!==2)continue;const[n,o]=e.pointsToConnect,i={type:\"pcb_trace\",pcb_trace_id:\"\",connection_name:e.name,route:[{route_type:\"wire\",x:n.x,y:n.y,layer:\"top\",width:.1},{route_type:\"wire\",x:o.x,y:o.y,layer:\"top\",width:.1}]};t.push(i)}return t}},E9o=t=\u003e{const e=Math.min(...t.map(r=\u003er.center.x)),n=Math.max(...t.map(r=\u003er.center.x)),o=Math.min(...t.map(r=\u003er.center.y)),i=Math.max(...t.map(r=\u003er.center.y));return{minX:e,maxX:n,minY:o,maxY:i}},B9o=[\"top\",\"bottom\",\"inner1\",\"inner2\"],E0e=(t,e,n)=\u003e{const o=[];if(n.length===0){const A=t[0].layers;for(const c of A)o.push(...E0e(t.slice(1),e,[c]));return o}if(t.length===0)return[];const i=t[0],r=i.via||i.optional_via,s=n[n.length-1];if(t.length===1){const A=i;return A.layers\u0026\u0026r?A.layers.map(c=\u003e({layer_path:[...n,c]})):A.layers?.includes(s)?[{layer_path:[...n,s]}]:[]}if(!r)return i.layers\u0026\u0026!i.layers.includes(s)?[]:E0e(t.slice(1),e,n.concat([s]));const a=(i.optional_via?e:e.filter(A=\u003eA!==s)).filter(A=\u003e!i.layers||i.layers?.includes(A));for(const A of a)o.push(...E0e(t.slice(1),e,n.concat(A)));return o},b9o=(t,e={})=\u003eE0e(t,e.layerSelectionPreference??B9o,[]);function ZPt(t){const e={x:t.to.x-t.from.x,y:t.to.y-t.from.y},n=Math.abs(e.x),o=Math.abs(e.y);return n\u003eo?e.x\u003e0?\"right\":\"left\":e.y\u003e0?\"down\":\"up\"}var W7=t=\u003et.route_type===\"through_pad\"?t.start:{x:t.x,y:t.y},S9o=t=\u003et.route_type===\"through_pad\"?[t.start,t.end]:[{x:t.x,y:t.y}],B0e=(t,e=\"constant\")=\u003e{const n=t.slice().reverse().map(o=\u003eo.route_type!==\"through_pad\"?{...o}:{...o,start:o.end,end:o.start,start_layer:o.end_layer,end_layer:o.start_layer});if(e===\"interpolated\")return n;for(let o=0;o\u003cn.length-1;o++){const i=n[o],r=n[o+1];if(i?.route_type!==\"wire\"||r?.route_type!==\"wire\"||i.layer!==r.layer)continue;const s=t[t.length-o-2];s?.route_type===\"wire\"\u0026\u0026(i.width=s.width)}for(let o=0;o\u003cn.length;o++){const i=n[o];if(i?.route_type!==\"wire\")continue;const r=n[o+1];if(r?.route_type===\"wire\"\u0026\u0026r.layer===i.layer)continue;let s=t.length-o-1;for(;s\u003ct.length-1;){const A=t[s],c=t[s+1];if(A?.route_type!==\"wire\"||c?.route_type!==\"wire\"||A.layer!==c.layer)break;s++}const a=t[s];a?.route_type===\"wire\"\u0026\u0026(i.width=a.width)}return n};function uO(t,e){const n=W7(t),o=W7(e);return Math.hypot(n.x-o.x,n.y-o.y)}var Q9o=t=\u003e{if(t.length===1)return t[0];if(t.some(A=\u003eA.length===0))throw new Error(\"Cannot merge routes with zero length\");const e=[],n=t[0][0],o=t[0][t[0].length-1],i=t[1][0],r=t[1][t[1].length-1],s=Math.min(uO(n,i),uO(n,r)),a=Math.min(uO(o,i),uO(o,r));s\u003ca?e.push(...B0e(t[0])):e.push(...t[0]);for(let A=1;A\u003ct.length;A++){const c=e[e.length-1],l=t[A],u=l[0],g=l[l.length-1],h=uO(c,u),d=uO(c,g);h\u003cd?e.push(...l):e.push(...B0e(l))}for(let A=1;A\u003ce.length-1;A++){const c=e[A-1],l=e[A];c.route_type===\"wire\"\u0026\u0026l.route_type===\"wire\"\u0026\u0026c.layer!==l.layer\u0026\u0026e.splice(A,0,{x:c.x,y:c.y,from_layer:c.layer,to_layer:l.layer,route_type:\"via\"})}return e},v9o=vc(\"tscircuit:renderable\"),rE=[\"ReactSubtreesRender\",\"RenderIsolatedSubcircuits\",\"InflateSubcircuitCircuitJson\",\"SourceNameDuplicateComponentRemoval\",\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"ResolveFootprintPinLabels\",\"InitializePortsFromChildren\",\"CreateNetsFromProps\",\"AssignFallbackProps\",\"CreateTracesFromProps\",\"CreateTracesFromNetLabels\",\"CreateTraceHintsFromProps\",\"CreateAutoplacedBreakoutPoints\",\"SourceGroupRender\",\"AssignNameToUnnamedComponents\",\"SourceRender\",\"CheckRefDesConvention\",\"SourceComponentPropertyValidation\",\"SourceParentAttachment\",\"PortMatching\",\"OptimizeSelectorCache\",\"SourceTraceRender\",\"SourceAddConnectivityMapKey\",\"SourceDesignRuleChecks\",\"SimulationRender\",\"SchematicComponentRender\",\"SchematicPortRender\",\"SymbolContainerRender\",\"SchematicPrimitiveRender\",\"SchematicSymbolResize\",\"SchematicComponentSizeCalculation\",\"SchematicLayout\",\"SchematicSectionRender\",\"SchematicTraceRender\",\"SchematicSheetRender\",\"SchematicReplaceNetLabelsWithSymbols\",\"SchematicLabelNetsWithConflictingNames\",\"PanelBoardLayout\",\"ValidatePcbCoordinates\",\"PcbComponentRender\",\"PcbPrimitiveRender\",\"PcbFootprintLayout\",\"PcbPortRender\",\"PcbPortAttachment\",\"PcbComponentSizeCalculation\",\"PcbComponentAnchorAlignment\",\"PcbCalcPlacementResolution\",\"PcbLayout\",\"PcbBoardAutoSize\",\"PanelLayout\",\"PcbAutoplaceBreakoutPoints\",\"PcbTraceHintRender\",\"PcbManualTraceRender\",\"PcbPlacementDesignRuleChecks\",\"PcbTraceRender\",\"PcbRouteNetIslands\",\"PcbImplicitCopperPourRender\",\"PcbCopperPourRender\",\"PcbViaStitchRender\",\"PcbCopperPourCleanup\",\"PcbDesignRuleChecks\",\"SilkscreenOverlapAdjustment\",\"CadModelRender\",\"PartsEngineRender\",\"PartOrientationAnalysis\",\"SupplierFootprintMismatchWarning\",\"SimulationSpiceEngineRender\"],eMt=new Map(rE.map((t,e)=\u003e[t,e])),w9o={InflateSubcircuitCircuitJson:[\"RenderIsolatedSubcircuits\"],ResolveFootprintPinLabels:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicComponentRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicPortRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SymbolContainerRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicPrimitiveRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicSymbolResize:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicComponentSizeCalculation:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicLayout:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicSectionRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicTraceRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicSheetRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicReplaceNetLabelsWithSymbols:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SchematicLabelNetsWithConflictingNames:[\"RenderIsolatedSubcircuits\",\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"SchematicTraceRender\"],PcbFootprintLayout:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbComponentSizeCalculation:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbLayout:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbBoardAutoSize:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbTraceHintRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbManualTraceRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbCopperPourRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PcbPlacementDesignRuleChecks\",\"PcbTraceRender\",\"PcbRouteNetIslands\",\"PcbImplicitCopperPourRender\"],PcbImplicitCopperPourRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PcbPlacementDesignRuleChecks\",\"PcbTraceRender\",\"PcbRouteNetIslands\"],PcbViaStitchRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PcbPlacementDesignRuleChecks\",\"PcbTraceRender\",\"PcbRouteNetIslands\",\"PcbImplicitCopperPourRender\",\"PcbCopperPourRender\"],PcbPlacementDesignRuleChecks:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbCopperPourCleanup:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PcbPlacementDesignRuleChecks\",\"PcbTraceRender\",\"PcbRouteNetIslands\",\"PcbImplicitCopperPourRender\",\"PcbCopperPourRender\",\"PcbViaStitchRender\"],PcbTraceRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbRouteNetIslands:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PcbPlacementDesignRuleChecks\"],PcbDesignRuleChecks:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PcbPlacementDesignRuleChecks\",\"PcbTraceRender\",\"PcbImplicitCopperPourRender\",\"PcbCopperPourRender\",\"PcbViaStitchRender\",\"PcbCopperPourCleanup\"],SilkscreenOverlapAdjustment:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],CadModelRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PartsEngineRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PartOrientationAnalysis:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PartsEngineRender\"],SupplierFootprintMismatchWarning:[\"PcbFootprintStringRender\",\"FetchPartFootprint\",\"PartsEngineRender\"],SourceAddConnectivityMapKey:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbComponentAnchorAlignment:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],PcbCalcPlacementResolution:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],ValidatePcbCoordinates:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"],SourceTraceRender:[\"PcbFootprintStringRender\",\"FetchPartFootprint\"]},P9o=0,M9o=0,tMt=class g4n{renderPhaseStates;shouldBeRemoved=!1;children;isPcbPrimitive=!1;isSchematicPrimitive=!1;_renderId;_currentRenderPhase=null;_pcbTraceRenderWaitingForPlacementChecks=!1;_asyncEffects=[];parent=null;constructor(e){this._renderId=`${P9o++}`,this.children=[],this.renderPhaseStates={};for(const n of rE)this.renderPhaseStates[n]={initialized:!1,dirty:!1}}_markDirty(e){this.renderPhaseStates[e].dirty=!0;const n=eMt.get(e);for(let o=n+1;o\u003crE.length;o++)this.renderPhaseStates[rE[o]].dirty=!0;this.parent?._markDirty\u0026\u0026this.parent._markDirty(e)}_queueAsyncEffect(e,n){const o=`${this._renderId}:${M9o++}`,i={asyncEffectId:o,promise:n(),phase:this._currentRenderPhase,effectName:e,complete:!1};this._asyncEffects.push(i);const r=this._getRootCircuit();r\u0026\u0026r.emit(\"asyncEffect:start\",{asyncEffectId:o,effectName:e,componentDisplayName:this.getString(),phase:i.phase}),i.promise.then(()=\u003e{i.complete=!0;const s=this._getRootCircuit();s\u0026\u0026s.emit(\"asyncEffect:end\",{asyncEffectId:o,effectName:e,componentDisplayName:this.getString(),phase:i.phase})}).catch(s=\u003e{console.error(`Async effect error in ${i.phase} \"${e}\":\n${s.stack}`),i.complete=!0;const a=this._getRootCircuit();a\u0026\u0026a.emit(\"asyncEffect:end\",{asyncEffectId:o,effectName:e,componentDisplayName:this.getString(),phase:i.phase,error:s.toString()})})}_emitRenderLifecycleEvent(e,n){v9o(`${e}:${n} ${this.getString()}`);const o=`renderable:renderLifecycle:${e}:${n}`,i={renderId:this._renderId,componentDisplayName:this.getString(),type:o},r=this._getRootCircuit();r\u0026\u0026(r.emit(o,i),r.emit(\"renderable:renderLifecycle:anyEvent\",{...i,type:o}))}getString(){return this.constructor.name}_hasIncompleteAsyncEffects(){return this._asyncEffects.some(e=\u003e!e.complete)?!0:this.children.some(e=\u003etypeof e._hasIncompleteAsyncEffects==\"function\"?e._hasIncompleteAsyncEffects():!1)}_hasIncompleteAsyncEffectsInSubtreeForPhase(e){for(const n of this._asyncEffects)if(!n.complete\u0026\u0026n.phase===e)return!0;for(const n of this.children)if(n._hasIncompleteAsyncEffectsInSubtreeForPhase(e))return!0;return!1}_hasIncompleteAsyncEffectsForPhase(e){const n=this._getRootCircuit();return n?._hasIncompleteAsyncEffectsForPhase?n._hasIncompleteAsyncEffectsForPhase(e):this._hasIncompleteAsyncEffectsInSubtreeForPhase(e)}getCurrentRenderPhase(){return this._currentRenderPhase}getRenderGraph(){return{id:this._renderId,currentPhase:this._currentRenderPhase,renderPhaseStates:this.renderPhaseStates,shouldBeRemoved:this.shouldBeRemoved,children:this.children.map(e=\u003ee.getRenderGraph())}}getTopLevelRenderable(){let e=this;for(;e.parent\u0026\u0026e.parent instanceof g4n;)e=e.parent;return e}runRenderCycle(){for(const e of rE)this.runRenderPhaseForChildren(e),this.runRenderPhase(e)}runRenderPhase(e){this._currentRenderPhase=e;const n=this.renderPhaseStates[e],o=n.initialized,i=n.dirty;if(!o\u0026\u0026this.shouldBeRemoved)return;if(this.shouldBeRemoved\u0026\u0026o){this._emitRenderLifecycleEvent(e,\"start\"),this?.[`remove${e}`]?.(),n.initialized=!1,n.dirty=!1,this._emitRenderLifecycleEvent(e,\"end\");return}const r=eMt.get(e)-1;if(r\u003e=0){const a=rE[r];if(this._asyncEffects.filter(c=\u003ec.phase===a).some(c=\u003e!c.complete))return}const s=w9o[e]||[];if(s.length\u003e0){for(const a of s)if(this._hasIncompleteAsyncEffectsForPhase(a))return}if(this._emitRenderLifecycleEvent(e,\"start\"),o){i\u0026\u0026(this?.[`update${e}`]?.(),n.dirty=!1),this._emitRenderLifecycleEvent(e,\"end\");return}n.dirty=!1,this?.[`doInitial${e}`]?.(),n.initialized=!0,this._emitRenderLifecycleEvent(e,\"end\")}runRenderPhaseForChildren(e){for(const n of this.children)\"_isIsolatedSubcircuit\"in this\u0026\u0026this._isIsolatedSubcircuit\u0026\u0026\"doInitialRenderIsolatedSubcircuits\"in this\u0026\u0026e===\"RenderIsolatedSubcircuits\"||(n.runRenderPhaseForChildren(e),n.runRenderPhase(e))}_getRootCircuit(){return\"root\"in this?this.root??null:null}renderError(e){throw typeof e==\"string\"?new Error(e):new Error(JSON.stringify(e,null,2))}},nMt=class extends Error{constructor(t,e,n){let o;const i=Object.keys(n).filter(A=\u003eA!==\"_errors\"),r=[],s=e.pinLabels;if(s)for(const[A,c]of Object.entries(s)){const l=Array.isArray(c)?c:[c];for(const u of l)typeof u==\"string\"\u0026\u0026(u.startsWith(\" \")||u.endsWith(\" \"))\u0026\u0026r.push(`pinLabels.${A} (\"${u}\" has leading or trailing spaces)`)}const a=i.map(A=\u003eA===\"pinLabels\"\u0026\u0026r.length\u003e0?r.join(\", \"):n[A]._errors[0]?`${A} (${n[A]._errors[0]})`:`${A} (${JSON.stringify(n[A])})`).join(\", \");\"name\"in e?o=`Invalid props for ${t} \"${e.name}\": ${a}`:\"footprint\"in e\u0026\u0026typeof e.footprint==\"string\"?o=`Invalid props for ${t} (unnamed ${e.footprint} component): ${a}`:o=`Invalid props for ${t} (unnamed): ${a}`,super(o),this.componentName=t,this.originalProps=e,this.formattedError=n}componentName;originalProps;formattedError},oMt={mm:1};function D9o(t,e){const{knownVariables:n,units:o}=e,i={...oMt,...o??{}},r=iMt(rMt(t)),s=sMt(r,i);return N9o(s,n)}function Nwe(t){const e=iMt(rMt(t));return sMt(e,oMt).filter(o=\u003eo.type===\"identifier\").map(o=\u003eo.value)}function iMt(t){const e={minx:\"minX\",maxx:\"maxX\",miny:\"minY\",maxy:\"maxY\"};return t.replace(/\\.(minx|maxx|miny|maxy)\\b/gi,(n,o)=\u003e`.${e[String(o).toLowerCase()]??n.slice(1)}`)}function rMt(t){const e=t.trim();if(!e.toLowerCase().startsWith(\"calc\"))return e;const n=e.match(/^calc\\s*\\((.*)\\)$/is);if(!n)throw new Error(`Invalid calc() expression: \"${t}\"`);return n[1].trim()}function sMt(t,e){const n=[];let o=0;const i=a=\u003ea\u003e=\"0\"\u0026\u0026a\u003c=\"9\",r=a=\u003ea\u003e=\"A\"\u0026\u0026a\u003c=\"Z\"||a\u003e=\"a\"\u0026\u0026a\u003c=\"z\"||a===\"_\",s=a=\u003er(a)||i(a)||a===\".\";for(;o\u003ct.length;){const a=t[o];if(a===\" \"||a===\"\t\"||a===`\n`||a===\"\\r\"){o++;continue}if(i(a)||a===\".\"\u0026\u0026o+1\u003ct.length\u0026\u0026i(t[o+1])){const A=o;for(o++;o\u003ct.length;){const g=t[o];if(i(g)||g===\".\")o++;else break}const c=t.slice(A,o);let l=Number(c);if(Number.isNaN(l))throw new Error(`Invalid number: \"${c}\"`);const u=o;for(;o\u003ct.length\u0026\u0026/[A-Za-z]/.test(t[o]);)o++;if(o\u003eu){const g=t.slice(u,o),h=e[g];if(h==null)throw new Error(`Unknown unit: \"${g}\"`);l*=h}n.push({type:\"number\",value:l});continue}if(r(a)){const A=o;for(o++;o\u003ct.length\u0026\u0026s(t[o]);)o++;const c=t.slice(A,o);n.push({type:\"identifier\",value:c});continue}if(a===\"(\"||a===\")\"){n.push({type:\"paren\",value:a}),o++;continue}if(a===\"+\"||a===\"-\"||a===\"*\"||a===\"/\"){n.push({type:\"operator\",value:a}),o++;continue}throw new Error(`Unexpected character \"${a}\" in expression \"${t}\"`)}return n}function N9o(t,e){let n=0;const o=()=\u003et[n],i=()=\u003et[n++],r=()=\u003e{const l=o();if(!l)throw new Error(\"Unexpected end of expression\");if(l.type===\"number\")return i(),l.value;if(l.type===\"identifier\"){i();const u=e[l.value];if(u==null)throw new Error(`Unknown variable: \"${l.value}\"`);return u}if(l.type===\"paren\"\u0026\u0026l.value===\"(\"){i();const u=A(),g=o();if(!g||g.type!==\"paren\"||g.value!==\")\")throw new Error('Expected \")\"');return i(),u}throw new Error(`Unexpected token \"${l.value}\"`)},s=()=\u003e{const l=o();if(l\u0026\u0026l.type===\"operator\"\u0026\u0026(l.value===\"+\"||l.value===\"-\")){i();const u=s();return l.value===\"+\"?u:-u}return r()},a=()=\u003e{let l=s();for(;;){const u=o();if(!u||u.type!==\"operator\"||u.value!==\"*\"\u0026\u0026u.value!==\"/\")break;i();const g=s();u.value===\"*\"?l*=g:l/=g}return l},A=()=\u003e{let l=a();for(;;){const u=o();if(!u||u.type!==\"operator\"||u.value!==\"+\"\u0026\u0026u.value!==\"-\")break;i();const g=a();u.value===\"+\"?l+=g:l-=g}return l},c=A();if(n\u003ct.length){const l=t.slice(n).map(u=\u003e\"value\"in u?u.value:\"?\").join(\" \");throw new Error(`Unexpected tokens at end of expression: ${l}`)}return c}function aMt(t){const{vars:e,componentName:n,position:o,size:i}=t;e[`${n}.x`]=o.x,e[`${n}.y`]=o.y,e[`${n}.width`]=i.width,e[`${n}.height`]=i.height,e[`${n}.minX`]=o.x-i.width/2,e[`${n}.maxX`]=o.x+i.width/2,e[`${n}.minY`]=o.y-i.height/2,e[`${n}.maxY`]=o.y+i.height/2}function R9o(t){const e={};for(const n of t.source_component.list()){if(!n.name)continue;const o=t.pcb_component.getWhere({source_component_id:n.source_component_id});o\u0026\u0026aMt({vars:e,componentName:n.name,position:{x:o.center.x,y:o.center.y},size:{width:o.width??0,height:o.height??0}})}return e}var T9o={from_left:{x:-1,y:0,z:0},from_right:{x:1,y:0,z:0},from_top:{x:0,y:1,z:0},from_bottom:{x:0,y:-1,z:0},from_above:{x:0,y:0,z:1},from_below:{x:0,y:0,z:-1}},b0e=t=\u003e{const{componentLayer:e,originalLayer:n}=t;return e===\"bottom\"!=(n===\"bottom\")},AMt=t=\u003e{const{insertionDirection:e,rotationDegrees:n=0,isFlipped:o=!1}=t;if(!e)return;const i=G2e[e],r=T9o[i],s=D0(W4(k9(n)*Math.PI/180),o?g3e():hC()),a=ts(s,r);return{x:a.x,y:a.y,z:o?-r.z:r.z}},k9o=t=\u003e{const e=AMt(t);if(e)return e.z!==0?e.z\u003e0?\"from_above\":\"from_below\":Math.abs(e.x)\u003e=Math.abs(e.y)?e.x\u003e=0?\"from_right\":\"from_left\":e.y\u003e=0?\"from_top\":\"from_bottom\"};function F9o(t){if(!t)return;const e={},n={};if(t.silkscreenFontSize!==void 0\u0026\u0026(n.fontSize=t.silkscreenFontSize),t.silkscreenTextVisibility!==void 0\u0026\u0026(n.visibility=t.silkscreenTextVisibility),Object.keys(n).length\u003e0\u0026\u0026(e[\"\u0026 silkscreentext\"]=n),Object.keys(e).length!==0)return e}function L9o({parentResolvedPcbSx:t,pcbStyle:e,ownPcbSx:n}){const o=F9o(e),i={},r=new Set;if(t)for(const s of Object.keys(t))r.add(s);if(o)for(const s of Object.keys(o))r.add(s);if(n)for(const s of Object.keys(n))r.add(s);for(const s of r)i[s]={...t?.[s],...o?.[s],...n?.[s]};return i}function cMt(t,e){const n=[\"right\",\"up\",\"left\",\"down\"],o=n.indexOf(t);if(o===-1)return t;const i=Math.round(e/90),r=(o+i)%4;return n[r\u003c0?r+4:r]}function Rwe(t,e){if(!t)return t;let n=t;const o=n.match(/_(right|left|up|down)$/);o\u0026\u0026(n=n.replace(o[0],`_${cMt(o[1],e)}`));const i=n.match(/_(horz|vert)$/);return i\u0026\u0026Twe(e)\u0026\u0026(n=n.replace(i[0],i[1]===\"horz\"?\"_vert\":\"_horz\")),n}function Twe(t){const e=(Math.round(t)%360+360)%360;return e===90||e===270}function kwe(t,e){return Twe(e)?{width:t.height,height:t.width}:t}function Fwe(t,e){const n=e.match(/^#(\\w+)/);if(n)return t.props.id===n[1];const o=e.match(/^\\.(\\w+)/);if(o)return t.isMatchingNameOrAlias(o[1]);let[i,...r]=e.split(/(?=[#.[])/);return i===\"pin\"\u0026\u0026(i=\"port\"),i\u0026\u0026i!==\"*\"\u0026\u0026t.lowercaseComponentName!==i.toLowerCase()?!1:r.every(s=\u003e{if(s.startsWith(\"#\"))return t.props.id===s.slice(1);if(s.startsWith(\".\"))return t.isMatchingNameOrAlias(s.slice(1));const a=s.match(/\\[(\\w+)=['\"]?(.+?)['\"]?\\]/);if(!a)return!0;const[,A,c]=a;return t.props[A].toString()===c})}var S0e={isTag:t=\u003e!0,getParent:t=\u003et.parent,getChildren:t=\u003et.children,getName:t=\u003et.lowercaseComponentName,getAttributeValue:(t,e)=\u003e{if(e===\"class\"\u0026\u0026\"getNameAndAliases\"in t)return t.getNameAndAliases().join(\" \");if(e===\"name\"\u0026\u0026t._parsedProps?.name)return t._parsedProps.name;if(t._parsedProps\u0026\u0026e in t._parsedProps){const i=t._parsedProps[e];return typeof i==\"string\"?i:i!=null?String(i):null}const n=Object.keys(t._parsedProps??{}).find(i=\u003ei.toLowerCase()===e);if(n){const i=t._parsedProps[n];return typeof i==\"string\"?i:i!=null?String(i):null}if(e in t){const i=t[e];return typeof i==\"string\"?i:i!=null?String(i):null}const o=t._attributeLowerToCamelNameMap;if(o){const i=o[e];if(i\u0026\u0026i in t){const r=t[i];return typeof r==\"string\"?r:r!=null?String(r):null}}return null},hasAttrib:(t,e)=\u003e{if(e===\"class\")return!!t._parsedProps?.name;if(t._parsedProps\u0026\u0026e in t._parsedProps||Object.keys(t._parsedProps??{}).some(o=\u003eo.toLowerCase()===e)||e in t)return!0;const n=t._attributeLowerToCamelNameMap;if(n){const o=n[e];if(o\u0026\u0026o in t)return!0}return!1},getSiblings:t=\u003et.parent?t.parent.children:[],prevElementSibling:t=\u003e{if(!t.parent)return null;const e=t.parent.children,n=e.indexOf(t);return n\u003e0?e[n-1]:null},getText:()=\u003e\"\",removeSubsets:t=\u003et.filter((e,n)=\u003e!t.some((o,i)=\u003en!==i\u0026\u0026o!==e\u0026\u0026o.getDescendants().includes(e))),existsOne:(t,e)=\u003ee.some(t),findAll:(t,e)=\u003e{const n=[],o=i=\u003e{t(i)\u0026\u0026n.push(i);for(const r of i.children)o(r)};for(const i of e)o(i);return n},findOne:(t,e)=\u003e{for(const n of e){if(t(n))return n;const o=n.children;if(o.length\u003e0){const i=S0e.findOne(t,o);if(i)return i}}return null},equals:(t,e)=\u003et._renderId===e._renderId,isHovered:t=\u003e!1,isVisited:t=\u003e!1,isActive:t=\u003e!1},H9o={...S0e,getChildren:t=\u003et.children.filter(e=\u003e!e.isSubcircuit)},lMt={...S0e,getChildren:t=\u003et.children.filter(e=\u003ee.isSubcircuit)},O9o=(t,e)=\u003e{const n=t.split(\"net.\")[1]?.split(/[ \u003e]/)[0]??t;return`Net names cannot contain \"+\" or \"-\" (component \"${e?.componentName??\"Unknown component\"}\" received \"${n}\" via \"${t}\"). Try using underscores instead, e.g. VCC_P`},uMt=(t,e)=\u003e{if(/net\\.[^\\s\u003e]*\\./.test(t))throw new Error('Net names cannot contain a period, try using \"sel.net...\" to autocomplete with conventional net names, e.g. V3_3');if(/net\\.[^\\s\u003e]*[+-]/.test(t))throw new Error(O9o(t,e));if(/net\\.[0-9]/.test(t)){const n=t.match(/net\\.([^ \u003e]+)/),o=n?n[1]:\"\";throw new Error(`Net name \"${o}\" cannot start with a number, try using a prefix like \"VBUS1\"`)}return t.replace(/ pin(?=[\\d.])/g,\" port\").replace(/ subcircuit\\./g,\" group[isSubcircuit=true]\").replace(/([^ ])\\\u003e([^ ])/g,\"$1 \u003e $2\").replace(/(^|[ \u003e])(?!pin\\.)(?!port\\.)(?!net\\.)([A-Z][A-Za-z0-9_-]*)\\.([A-Za-z0-9_-]+)/g,(n,o,i,r)=\u003e{const s=/^\\d+$/.test(r)?`pin${r}`:r;return`${o}.${i} \u003e .${s}`}).trim()},Lwe={adapter:H9o,cacheResults:!0},G9o={componentName:\"\",zodProps:Pt({}).passthrough()},Ir=class extends tMt{parent=null;children;childrenPendingRemoval;get config(){return G9o}props;_parsedProps;get componentName(){return this.config.componentName}getInheritedProperty(t){let e=this;for(;e;){if(e._parsedProps\u0026\u0026t in e._parsedProps)return e._parsedProps[t];e=e.parent}if(this.root?.platform\u0026\u0026t in this.root.platform)return this.root.platform[t]}getInheritedMergedProperty(t){const e=this.parent?.getInheritedMergedProperty?.(t),n=this._parsedProps?.[t];return{...e,...n}}getResolvedPcbSx(){return L9o({parentResolvedPcbSx:this.parent?.getResolvedPcbSx?.(),pcbStyle:this._parsedProps?.pcbStyle,ownPcbSx:this._parsedProps?.pcbSx})}getSchematicSectionName(){return this._parsedProps?.schSectionName??null}get lowercaseComponentName(){return this.componentName.toLowerCase()}externallyAddedAliases;get isSubcircuit(){return!!this.props.subcircuit||this.lowercaseComponentName===\"group\"\u0026\u0026this?.parent?.isRootCircuit}get isGroup(){return this.lowercaseComponentName===\"group\"}get isRoutingDirective(){return!1}get name(){return this._parsedProps.name??this.fallbackUnassignedName}isPrimitiveContainer=!1;canHaveTextChildren=!1;source_group_id=null;source_component_id=null;schematic_component_id=null;schematic_sheet_id=null;pcb_component_id=null;cad_component_id=null;_reportedInvalidPcbCalcWarnings=new Set;_reportInvalidComponentPropertyError(t,e){!this.root||this._reportedInvalidPcbCalcWarnings.has(t)||(this.root.db.source_invalid_component_property_error.insert({source_component_id:this.source_component_id||\"\",property_name:t,message:e,error_type:\"source_invalid_component_property_error\"}),this._reportedInvalidPcbCalcWarnings.add(t))}fallbackUnassignedName;constructor(t){super(t),this.children=[],this.childrenPendingRemoval=[],this.props=t??{},this.externallyAddedAliases=[];const n=(\"partial\"in this.config.zodProps?this.config.zodProps.partial({name:!0}):this.config.zodProps).safeParse(t??{});if(n.success)this._parsedProps=n.data;else throw new nMt(this.lowercaseComponentName,this.props,n.error.format())}setProps(t){const e=this.config.zodProps.parse({...this.props,...t}),n=this.props;this.props=e,this._parsedProps=this.config.zodProps.parse(t),this.onPropsChange({oldProps:n,newProps:e,changedProps:Object.keys(t)}),this.parent?.onChildChanged?.(this)}_getPcbRotationBeforeLayout(){const{pcbRotation:t}=this.props;return typeof t==\"string\"?parseFloat(t):t??null}getResolvedPcbPositionProp(){return{pcbX:this._resolvePcbCoordinate(this._parsedProps.pcbX,\"pcbX\"),pcbY:this._resolvePcbCoordinate(this._parsedProps.pcbY,\"pcbY\")}}doInitialValidatePcbCoordinates(){if(this.root?.pcbDisabled)return;const t=this.props,e=t.pcbX,n=t.pcbY;this._validatePcbCoordinateReferences({rawValue:e,axis:\"pcbX\",propertyName:\"pcbX\"}),this._validatePcbCoordinateReferences({rawValue:n,axis:\"pcbY\",propertyName:\"pcbY\"})}_validatePcbCoordinateReferences(t){const{rawValue:e,axis:n,propertyName:o=n}=t;if(typeof e!=\"string\")return;const r=!(this._isNormalComponent===!0)\u0026\u0026!this._isInsideFootprint();let s=[];try{s=Nwe(e)}catch{this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: Invalid calc() expression. expression=\"${e}\"`);return}s.some(A=\u003e!A.startsWith(\"board.\"))\u0026\u0026!r\u0026\u0026this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: component-relative calc references are not supported for footprint elements (${this.componentName}); ${o} will be ignored. expression=\"${e}\"`)}_resolvePcbCoordinate(t,e,n={}){if(t==null)return 0;const o=n.propertyName??e;if(typeof t==\"number\")return Number.isFinite(t)?t:0;if(typeof t!=\"string\")throw new Error(`Invalid ${e} value for ${this.componentName}: ${String(t)}`);const i=n.allowBoardVariables??this._shouldAllowBoardVariablesByDefault(),r=this._isNormalComponent===!0,s=n.allowComponentVariables??(!r\u0026\u0026!this._isInsideFootprint()),a=t.includes(\"board.\"),A={};if(i){const c=this._getBoard(),l=c?._getBoardCalcVariables()??{};if(a\u0026\u0026!c)return this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: no board found for board.* variables. expression=\"${t}\"`),0;if(a\u0026\u0026c\u0026\u0026Object.keys(l).length===0)return this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: Cannot do calculations based on board size when the board is auto-sized. expression=\"${t}\"`),0;Object.assign(A,l)}if(s){const c=this.root?.db;c\u0026\u0026Object.assign(A,R9o(c)),Object.assign(A,n.componentVariables??{})}try{return Nwe(t).some(u=\u003e!u.startsWith(\"board.\"))\u0026\u0026!s?(this._isInsideFootprint()\u0026\u0026this.root\u0026\u0026!this._reportedInvalidPcbCalcWarnings.has(e)\u0026\u0026(this.root.db.source_invalid_component_property_error.insert({source_component_id:this.source_component_id||\"\",property_name:e,message:`component-relative calc references are not supported for footprint elements (${this.componentName}); ${e} will be ignored. expression=\"${t}\"`,error_type:\"source_invalid_component_property_error\"}),this._reportedInvalidPcbCalcWarnings.add(e)),0):D9o(t,{knownVariables:A})}catch(c){const l=c instanceof Error?c.message:String(c);return this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: ${l}. expression=\"${t}\"`),0}}_shouldAllowBoardVariablesByDefault(){return this._isNormalComponent===!0?!0:!this._isInsideFootprint()\u0026\u0026!this._isInsideNonBoardSubcircuit()}_isInsideFootprint(){let t=this.parent;for(;t;){if(t.componentName===\"Footprint\")return!0;t=t.parent}return!1}_isInsideNonBoardSubcircuit(){let t=this.parent;for(;t;){const e=t.componentName;if(e===\"Board\"||e===\"MountedBoard\")return!1;if(t.isSubcircuit)return!0;t=t.parent}return!1}_hasUserDefinedPcbPosition(){const t=this._parsedProps;return t.pcbX!==void 0||t.pcbY!==void 0||t.pcbLeftEdgeX!==void 0||t.pcbRightEdgeX!==void 0||t.pcbTopEdgeY!==void 0||t.pcbBottomEdgeY!==void 0}resolvePcbCoordinate(t){const{rawValue:e,axis:n,allowBoardVariables:o,allowComponentVariables:i,componentVariables:r,propertyName:s}=t;return this._resolvePcbCoordinate(e,n,{allowBoardVariables:o,allowComponentVariables:i,componentVariables:r,propertyName:s})}computePcbPropsTransform(){const t=this._getPcbRotationBeforeLayout()??0,{pcbX:e,pcbY:n}=this.getResolvedPcbPositionProp();return D0(M0(e,n),W4(t*Math.PI/180))}_computePcbGlobalTransformBeforeLayout(){const t=this.getSubcircuit()._getPcbManualPlacementForComponent(this);if(t\u0026\u0026this.props.pcbX===void 0\u0026\u0026this.props.pcbY===void 0){const e=this._getPcbRotationBeforeLayout()??0;return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),D0(M0(t.x,t.y),W4(e*Math.PI/180)))}if(this.isPcbPrimitive){const{isFlipped:e}=this._getPcbPrimitiveFlippedHelpers();if(e)return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),g3e(),this.computePcbPropsTransform())}return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),this.computePcbPropsTransform())}_getEnclosingFootprint(){let t=this.parent;for(;t;){if(t.componentName===\"Footprint\")return t;t=t.parent}return null}getPrimitiveContainer(){return this.isPrimitiveContainer?this:this.parent?.getPrimitiveContainer?.()??null}_getSymbolAncestor(){const t=this.getPrimitiveContainer();return t?.componentName===\"Symbol\"?t:null}getParentNormalComponent(){let t=this.parent;for(;t;){if(t.isPrimitiveContainer\u0026\u0026t.doInitialPcbComponentRender)return t;t=t.parent}return null}getCollapsedSchematicBoxAncestor(){let t=this.parent;for(;t;){if(t.componentName===\"Group\"\u0026\u0026t._parsedProps?.showAsSchematicBox)return t;t=t.parent}return null}_resolveText(){const t=this._parsedProps.text;if(!t)return\"\";if(!t.includes(\"{NAME}\")\u0026\u0026!t.includes(\"{REF}\")\u0026\u0026!t.includes(\"{REFERENCE}\"))return t;const n=this.getParentNormalComponent()?.name;return n?t.replace(/\\{NAME\\}/g,n).replace(/\\{REF\\}/g,n).replace(/\\{REFERENCE\\}/g,n):t}emitSolderMaskMarginWarning(t,e){if(t\u0026\u0026e!==void 0){const n=this.getParentNormalComponent();n?.source_component_id\u0026\u0026this.root.db.source_property_ignored_warning.insert({source_component_id:n.source_component_id,property_name:\"solderMaskMargin\",message:\"solderMaskMargin is set but coveredWithSolderMask is true. When a component is fully covered with solder mask, a margin doesn't apply.\",error_type:\"source_property_ignored_warning\"})}}_getPcbCircuitJsonBounds(){return{center:{x:0,y:0},bounds:{left:0,top:0,right:0,bottom:0},width:0,height:0}}_getPcbLocalBoundsBeforeLayout(){const{width:t,height:e}=this.getPcbSize();return{left:-t/2,right:t/2,top:e/2,bottom:-e/2}}_getPcbComponentLayer(){return this._parsedProps.layer}_getPcbPrimitiveFlippedHelpers(){const t=this.getPrimitiveContainer(),e=this.componentName===\"Footprint\"?this:this._getEnclosingFootprint(),n=t?._getPcbComponentLayer(),o=t?b0e({componentLayer:n,originalLayer:e?._parsedProps.originalLayer}):!1;return{isFlipped:o,maybeFlipLayer:r=\u003eo?r===\"top\"?\"bottom\":\"top\":r}}_setPositionFromLayout(t){throw new Error(`_setPositionFromLayout not implemented for ${this.componentName}`)}computeSchematicPropsTransform(){const{_parsedProps:t}=this;return D0(M0(t.schX??0,t.schY??0))}computeSchematicGlobalTransform(){const t=this._getSchematicGlobalManualPlacementTransform(this);return t||D0(this.parent?.computeSchematicGlobalTransform?.()??hC(),this.computeSchematicPropsTransform())}_getSchematicSymbolName(){const{_parsedProps:t}=this,e=this.config.schematicSymbolName,n={horizontal:0,pos_left:0,neg_right:0,pos_right:180,neg_left:180,pos_top:270,neg_bottom:90,vertical:270,pos_bottom:90,neg_top:90};let o=t.schOrientation!==void 0?n[t.schOrientation]:t.schRotation;if(o===void 0\u0026\u0026(o=0),o=o%360,o\u003c0\u0026\u0026(o+=360),t.schRotation!==void 0\u0026\u0026o%90!==0)throw new Error(`Schematic rotation ${t.schRotation} is not supported for ${this.componentName}`);if(/_(horz|vert|up|down|left|right)$/.test(e)\u0026\u0026e in Su){const u=Rwe(e,o);return u\u0026\u0026u in Su?u:e}const r=`${e}_horz`,s=`${e}_vert`,a=`${e}_up`,A=`${e}_down`,c=`${e}_left`,l=`${e}_right`;if(l in Su\u0026\u0026o===0)return l;if(a in Su\u0026\u0026o===90)return a;if(c in Su\u0026\u0026o===180)return c;if(A in Su\u0026\u0026o===270)return A;if(r in Su\u0026\u0026(o===0||o===180))return r;if(s in Su\u0026\u0026(o===90||o===270))return s;if(e in Su)return e}_getSchematicSymbolNameOrThrow(){const t=this._getSchematicSymbolName();if(!t)throw new Error(`No schematic symbol found (given: \"${this.config.schematicSymbolName}\")`);return t}getSchematicSymbol(){const t=this._getSchematicSymbolName();return t?Su[t]??null:null}_getPcbManualPlacementForComponent(t){if(!this.isSubcircuit)return null;const e=this.props.manualEdits;if(!e)return null;const n=e?.pcb_placements;if(!n)return null;for(const o of n)if(Fwe(t,o.selector)||t.props.name===o.selector)return ts(this._computePcbGlobalTransformBeforeLayout(),o.center);return null}_getSchematicManualPlacementForComponent(t){if(!this.isSubcircuit)return null;const e=this.props.manualEdits;if(!e)return null;const n=e.schematic_placements;if(!n)return null;for(const o of n)if(Fwe(t,o.selector)||t.props.name===o.selector)return ts(this.computeSchematicGlobalTransform(),o.center);return null}_getSchematicGlobalManualPlacementTransform(t){const e=this.getSubcircuit()?._parsedProps.manualEdits;if(!e)return null;for(const n of e.schematic_placements??[])if((Fwe(t,n.selector)||t.props.name===n.selector)\u0026\u0026n.relative_to===\"group_center\")return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),M0(n.center.x,n.center.y));return null}_getGlobalPcbPositionBeforeLayout(){return ts(this._computePcbGlobalTransformBeforeLayout(),{x:0,y:0})}_getGlobalSchematicPositionBeforeLayout(){return ts(this.computeSchematicGlobalTransform(),{x:0,y:0})}_getBoard(){let t=this;for(;t;){const e=t,n=e.componentName;if(n===\"Board\"||n===\"MountedBoard\")return e;t=t.parent??null}return this.root?._getBoard()}get root(){return this.parent?.root??null}onAddToParent(t){this.parent=t}onPropsChange(t){}onChildChanged(t){this.parent?.onChildChanged?.(t)}add(t){const e=t.__text;if(typeof e==\"string\"){if(this.canHaveTextChildren||e.trim()===\"\")return;const n=this._parsedProps?.name,o=n?`\u003c${this.componentName} name=\"${n}\"\u003e`:`\u003c${this.componentName}\u003e`,r=/^NaN/.test(e.trim())?` This looks like a numeric expression that evaluated to NaN (e.g. \\`\\${value}${e.trim().replace(/^NaN/,\"\")}\\` where \\`value\\` is NaN) — check the computation that produces this value.`:\"\";throw new Error(`Invalid JSX Element: ${o} received stray text \"${e}\" as a child, but it cannot hold text children. Remove the text or wrap it in an appropriate component.${r}`)}if(Object.keys(t).length!==0){if(t.lowercaseComponentName===\"panel\")throw new Error(\"\u003cpanel\u003e must be a root-level element\");if(!t.onAddToParent)throw new Error(`Invalid JSX Element: Expected a React component but received \"${JSON.stringify(t)}\"`);t.onAddToParent(this),t.parent=this,this.children.push(t),this._clearSelectorCachesUpTree()}}addAll(t){for(const e of t)this.add(e)}remove(t){this.children=this.children.filter(e=\u003ee!==t),this.childrenPendingRemoval.push(t),t.shouldBeRemoved=!0,this._clearSelectorCachesUpTree()}_clearSelectorCachesUpTree(){let t=this;for(;t;)t._cachedSelectAllQueries?.clear(),t._cachedSelectOneQueries?.clear(),t=t.parent}getSubcircuitSelector(){const t=this.name,e=t?`${this.lowercaseComponentName}.${t}`:this.lowercaseComponentName;return!this.parent||this.parent.isSubcircuit?e:`${this.parent.getSubcircuitSelector()} \u003e ${e}`}getFullPathSelector(){const t=this.name,e=t?`${this.lowercaseComponentName}.${t}`:this.lowercaseComponentName,n=this.parent?.getFullPathSelector?.();return n?`${n} \u003e ${e}`:e}getNameAndAliases(){return[this.name,...this._parsedProps.portHints??[]].filter(Boolean)}isMatchingNameOrAlias(t){return this.getNameAndAliases().includes(t)}isMatchingAnyOf(t){return this.getNameAndAliases().some(e=\u003et.map(n=\u003en.toString()).includes(e))}getPcbSize(){throw new Error(`getPcbSize not implemented for ${this.componentName}`)}doesSelectorMatch(t){const e=[this.componentName,this.lowercaseComponentName],n=[this.name].filter(Boolean),o=t.trim().split(/\\\u003e /)[0],i=o[0];return o.length\u003e1?!1:!!(t===\"*\"||t[0]===\"#\"\u0026\u0026t.slice(1)===this.props.id||t[0]===\".\"\u0026\u0026n.includes(t.slice(1))||/^[a-zA-Z0-9_]/.test(i)\u0026\u0026e.includes(i))}getSubcircuit(){if(this.isSubcircuit)return this;const t=this.parent?.getSubcircuit?.();if(!t)throw new Error(\"Component is not inside an opaque group (no board?)\");return t}getGroup(){return this.isGroup?this:this.parent?.getGroup?.()??null}_resolveSchematicSheetId(){const t=this._parsedProps?.schSheetName??this.props.schSheetName;if(t){const e=this.root?.db.schematic_sheet.list().find(n=\u003en.name===t);if(e)return e.schematic_sheet_id}return this.schematic_sheet_id?this.schematic_sheet_id:this.parent?._resolveSchematicSheetId?.()}doInitialAssignNameToUnnamedComponents(){this._parsedProps.name||(this.fallbackUnassignedName=this.getSubcircuit().getNextAvailableName(this))}doInitialOptimizeSelectorCache(){if(!this.isSubcircuit)return;const t=this.selectAll(\"port\"),e=n=\u003e/^[A-Za-z_][A-Za-z0-9_-]*$/.test(n);for(const n of t){const i=(n.getParentNormalComponent?.()??n.parent)?.getNameAndAliases(),r=n.getNameAndAliases();if(i)for(const s of i)for(const a of r){const A=[`.${s} \u003e .${a}`,`.${s} .${a}`];e(s)\u0026\u0026e(a)\u0026\u0026A.push(`${s}.${a}`);for(const c of A){const l=this._cachedSelectAllQueries.get(c);l?l.push(n):this._cachedSelectAllQueries.set(c,[n])}}}for(const[n,o]of this._cachedSelectAllQueries.entries())o.length===1\u0026\u0026this._cachedSelectOneQueries.set(n,o[0])}updateOptimizeSelectorCache(){this._cachedSelectAllQueries.clear(),this._cachedSelectOneQueries.clear(),this.doInitialOptimizeSelectorCache()}_cachedSelectAllQueries=new Map;selectAll(t){if(this._cachedSelectAllQueries.has(t))return this._cachedSelectAllQueries.get(t);const e=uMt(t,this),n=t0t(e,this,Lwe);if(n.length\u003e0)return this._cachedSelectAllQueries.set(t,n),n;const[o,...i]=e.split(\" \"),r=poe(o,this,{adapter:lMt});if(!r)return[];const s=r.selectAll(i.join(\" \"));return this._cachedSelectAllQueries.set(t,s),s}_cachedSelectOneQueries=new Map;selectOne(t,e){if(this._cachedSelectOneQueries.has(t))return this._cachedSelectOneQueries.get(t);const n=uMt(t,this);e?.port\u0026\u0026(e.type=\"port\");let o=null;if(e?.type\u0026\u0026(o=t0t(n,this,Lwe).find(A=\u003eA.lowercaseComponentName===e.type)),e?.type||(o??=poe(n,this,Lwe)),o)return this._cachedSelectOneQueries.set(t,o),o;const[i,...r]=n.split(\" \"),s=poe(i,this,{adapter:lMt});return s?(o=s.selectOne(r.join(\" \"),e),this._cachedSelectOneQueries.set(t,o),o):null}getAvailablePcbLayers(){if(this.isPcbPrimitive){const{maybeFlipLayer:t}=this._getPcbPrimitiveFlippedHelpers();return\"layer\"in this._parsedProps||this.componentName===\"SmtPad\"?[t(this._parsedProps.layer??\"top\")]:\"layers\"in this._parsedProps?this._parsedProps.layers:this.componentName===\"PlatedHole\"?[...this.root?._getBoard()?.allLayers??[\"top\",\"bottom\"]]:[]}return[]}getDescendants(){const t=[];for(const e of this.children)t.push(e),t.push(...e.getDescendants());return t}getSelectableDescendants(){const t=[];for(const e of this.children)e.isSubcircuit?t.push(e):(t.push(e),t.push(...e.getSelectableDescendants()));return t}_getPrimaryPinCount(){return 0}_getSchematicBoxDimensions(){return null}_getSchematicBoxComponentDimensions(){if(this.getSchematicSymbol()||!this.config.shouldRenderAsSchematicBox)return null;const{_parsedProps:t}=this;return{schWidth:t.schWidth,schHeight:t.schHeight}}renderError(t){if(typeof t==\"string\")return super.renderError(t);switch(t.type){case\"pcb_placement_error\":this.root?.db.pcb_placement_error.insert(t);break;case\"pcb_via_clearance_error\":this.root?.db.pcb_via_clearance_error.insert(t);break;case\"pcb_trace_error\":this.root?.db.pcb_trace_error.insert(t);break;case\"pcb_manual_edit_conflict_warning\":this.root?.db.pcb_manual_edit_conflict_warning.insert(t);break;default:this.root?.db.pcb_placement_error.insert(t)}}getString(){const{lowercaseComponentName:t,_parsedProps:e,parent:n}=this;return e?.pinNumber!==void 0\u0026\u0026n?.props?.name\u0026\u0026e?.name?`\u003c${t}#${this._renderId}(pin:${e.pinNumber} .${n?.props.name}\u003e.${e.name}) /\u003e`:n?.props?.name\u0026\u0026e?.name?`\u003c${t}#${this._renderId}(.${n?.props.name}\u003e.${e?.name}) /\u003e`:e?.from\u0026\u0026e?.to?`\u003c${t}#${this._renderId}(from:${e.from} to:${e?.to}) /\u003e`:e?.name?`\u003c${t}#${this._renderId} name=\".${e?.name}\" /\u003e`:e?.portHints?`\u003c${t}#${this._renderId}(${e.portHints.map(o=\u003e`.${o}`).join(\", \")}) /\u003e`:`\u003c${t}#${this._renderId} /\u003e`}getDisplayName(){return this.name?`${this.lowercaseComponentName} \"${this.name}\"`:`${this.lowercaseComponentName} (unnamed)`}get[Symbol.toStringTag](){return this.getString()}[Symbol.for(\"nodejs.util.inspect.custom\")](){return this.getString()}};function gMt(t){const e=[];for(let n=0;n\u003ct.length-1;n++)e.push([t[n],t[n+1]]);return e}var Q0e=/(?:^|_)(?:GND|AGND|DGND|PGND|VSS)/i,Hwe=/(?:^|_)(?:V(?!SS)|\\d+(?:[_.]\\d+)?V)/i,Qb=class extends Ir{source_net_id;subcircuit_connectivity_map_key=null;get config(){return{componentName:\"Net\",zodProps:Xwn}}getPortSelector(){return`net.${this.props.name}`}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=e.isGroundNet??Q0e.test(e.name),o=e.isPowerNet??Hwe.test(e.name),i=t.source_net.insert({name:e.name,member_source_group_ids:[],is_ground:n,is_power:o,is_positive_voltage_source:o});this.source_net_id=i.source_net_id}doInitialSourceParentAttachment(){const t=this.getSubcircuit();if(!t)return;const{db:e}=this.root;e.source_net.update(this.source_net_id,{subcircuit_id:t.subcircuit_id})}getAllConnectedPorts(){const t=this.getSubcircuit().selectAll(\"port\"),e=[];for(const n of t){const o=n._getDirectlyConnectedTraces();for(const i of o)if(i._isExplicitlyConnectedToNet(this)){e.push(n);break}}return e}_getAllDirectlyConnectedTraces(){const t=this.getSubcircuit().selectAll(\"trace\"),e=[];for(const n of t)n._isExplicitlyConnectedToNet(this)\u0026\u0026e.push(n);return e}doInitialPcbRouteNetIslands(){if(this.root?.pcbDisabled)return;const t=this.getSubcircuit();if(this.root?.pcbRoutingDisabled||t.getInheritedProperty(\"routingDisabled\")||t._isInflatedFromCircuitJson||t._getAutorouterConfig().groupMode!==\"sequential-trace\")return;const{db:e}=this.root,{_parsedProps:n}=this,o=this._getAllDirectlyConnectedTraces().filter(s=\u003e(s._portsRoutedOnPcb?.length??0)\u003e0),i=[];for(const s of o){const a=s._portsRoutedOnPcb,A=i.find(c=\u003ea.some(l=\u003ec.ports.includes(l)));if(!A){i.push({ports:[...a],traces:[s]});continue}A.traces.push(s),A.ports.push(...a)}if(i.length===0)return;const r=gMt(i);for(const[s,a]of r){const A=s.ports.map(_=\u003e_._getGlobalPcbPositionBeforeLayout()),c=a.ports.map(_=\u003e_._getGlobalPcbPositionBeforeLayout());let l=1/0,u=[-1,-1];for(let _=0;_\u003cA.length;_++){const f=A[_];for(let I=0;I\u003cc.length;I++){const C=c[I],y=Math.sqrt((f.x-C.x)**2+(f.y-C.y)**2);y\u003cl\u0026\u0026(l=y,u=[_,I])}}const g=s.ports[u[0]],h=a.ports[u[1]],d=e.toArray().filter(_=\u003e_.type===\"pcb_smtpad\"||_.type===\"pcb_trace\"||_.type===\"pcb_plated_hole\"||_.type===\"pcb_hole\"||_.type===\"source_port\"||_.type===\"pcb_port\"),{solution:p}=dvn(d.concat([{type:\"source_trace\",source_trace_id:\"__net_trace_tmp\",connected_source_port_ids:[g.source_port_id,h.source_port_id]}])),m=p[0];if(!m){this.renderError({pcb_trace_error_id:\"\",pcb_trace_id:\"__net_trace_tmp\",pcb_component_ids:[g.pcb_component_id,h.pcb_component_id].filter(Boolean),pcb_port_ids:[g.pcb_port_id,h.pcb_port_id].filter(Boolean),type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",message:`Failed to route net islands for \"${this.getString()}\"`,source_trace_id:\"__net_trace_tmp\"});return}e.pcb_trace.insert(m)}}renderError(t){if(typeof t==\"string\")return super.renderError(t);this.root?.db.pcb_trace_error.insert(t)}},Hj=(t,e)=\u003e{for(const n of e)if(typeof n==\"string\"\u0026\u0026n.startsWith(\"net.\")){if(/net\\.[^\\s\u003e]*\\./.test(n))throw new Error('Net names cannot contain a period, try using \"sel.net...\" to autocomplete with conventional net names, e.g. V3_3');if(/net\\.[^\\s\u003e]*[+-]/.test(n)){const i=n.split(\"net.\")[1],r=`Net names cannot contain \"+\" or \"-\" (component \"${t.componentName}\" received \"${i}\" via \"${n}\"). Try using underscores instead, e.g. VCC_P`;throw new Error(r)}if(/net\\.[0-9]/.test(n)){const i=n.split(\"net.\")[1];throw new Error(`Net name \"${i}\" cannot start with a number, try using a prefix like \"VBUS1\"`)}const o=t.getSubcircuit();if(!o.selectOne(n)){const i=new Qb({name:n.split(\"net.\")[1]});o.add(i)}}},Y9o=(t,e)=\u003e{const n=\"_getGlobalPcbPositionBeforeLayout\"in t?t._getGlobalPcbPositionBeforeLayout():t,o=\"_getGlobalPcbPositionBeforeLayout\"in e?e._getGlobalPcbPositionBeforeLayout():e;return Math.sqrt((n.x-o.x)**2+(n.y-o.y)**2)};function dMt(t,e){if(e.length===0)throw new Error(\"No candidates given to getClosest method\");let n=e[0],o=1/0;for(const i of e){const r=Y9o(t,i);r\u003co\u0026\u0026(n=i,o=r)}return n}var U9o=t=\u003et.outline\u0026\u0026t.outline.length\u003e0?new Ip(t.outline.map(e=\u003eby(e.x,e.y))):new Ip(new VBe(t.center.x-t.width/2,t.center.y-t.height/2,t.center.x+t.width/2,t.center.y+t.height/2).toPoints()),K9o=({mergedRoute:t,db:e,pcbBoardId:n})=\u003e{const o=e.pcb_board.get(n);if(!o)return!1;const i=U9o(o);return!t.flatMap(S9o).every(r=\u003ei.contains(by(r.x,r.y)))},lw=({fromLayer:t,toLayer:e,layerCount:n})=\u003e{if(t===e)return[t];const o=[\"top\"];for(let s=1;s\u003c=n-2;s++)o.push(`inner${s}`);o.push(\"bottom\");const i=o.indexOf(t),r=o.indexOf(e);return i===-1||r===-1?[t,e]:i\u003c=r?o.slice(i,r+1):o.slice(r,i+1).reverse()},WN=t=\u003et\u003c=1?[\"top\"]:lw({fromLayer:\"top\",toLayer:\"bottom\",layerCount:t}),hMt=({fromLayer:t,toLayer:e,layerCount:n,allowBlindAndBuriedVias:o=!1,physicalLayers:i})=\u003e{const r=WN(n);if(!o)return r;if(i?.length){const s=new Set(i),a=r.filter(u=\u003es.has(u)),A=r.indexOf(a[0]),c=r.indexOf(a[a.length-1]),l=r.slice(A,c+1);if(s.has(t)\u0026\u0026s.has(e)\u0026\u0026s.size===l.length\u0026\u0026l.every(u=\u003es.has(u)))return l}return lw({fromLayer:t,toLayer:e,layerCount:n})},Owe=t=\u003e{const e=WN(t);return e.length\u003c=1?e:[e[0],e[e.length-1],...e.slice(1,-1)]};function V9o(t,e={}){const{center:n,radius:o}=t,{rectHeight:i=.1}=e,r=[],s=Math.ceil(o*2/i);for(let a=0;a\u003cs;a++){const A=n.y-o+(a+.5)*i,c=A-n.y,l=Math.sqrt(o*o-c*c);l\u003e0\u0026\u0026r.push({center:{x:n.x,y:A},width:l*2,height:i})}return r}function Gwe(t,e={}){if(t.length\u003c3)return[];const{rectHeight:n=.1}=e,o=[],i=t.map(a=\u003ea.y),r=Math.min(...i),s=Math.max(...i);for(let a=r;a\u003cs;a+=n){const A=a+n/2,c=[];for(let l=0;l\u003ct.length;l++){const u=t[l],g=t[(l+1)%t.length];if(u.y\u003c=A\u0026\u0026g.y\u003eA||g.y\u003c=A\u0026\u0026u.y\u003eA){const h=(A-u.y)*(g.x-u.x)/(g.y-u.y)+u.x;c.push(h)}}c.sort((l,u)=\u003el-u);for(let l=0;l\u003cc.length;l+=2)if(l+1\u003cc.length){const u=c[l],h=c[l+1]-u;h\u003e1e-6\u0026\u0026o.push({center:{x:u+h/2,y:A},width:h,height:n})}}return o}var z9o=.001,J9o=t=\u003e{const e=(A,c)=\u003eMath.abs(A-c)\u003c=z9o,n=t.filter((A,c)=\u003ec===0||!e(A.x,t[c-1].x)||!e(A.y,t[c-1].y));if(n.length\u003e1\u0026\u0026e(n[0].x,n.at(-1).x)\u0026\u0026e(n[0].y,n.at(-1).y)\u0026\u0026n.pop(),n.length\u003c4)return null;const o=Math.min(...n.map(A=\u003eA.x)),i=Math.max(...n.map(A=\u003eA.x)),r=Math.min(...n.map(A=\u003eA.y)),s=Math.max(...n.map(A=\u003eA.y)),a=[{x:o,y:r},{x:o,y:s},{x:i,y:r},{x:i,y:s}];return!n.every(A=\u003ee(A.x,o)||e(A.x,i)||e(A.y,r)||e(A.y,s))||!a.every(A=\u003en.some(c=\u003ee(c.x,A.x)\u0026\u0026e(c.y,A.y)))?null:{center:{x:(o+i)/2,y:(r+s)/2},width:i-o,height:s-r}},pMt=(t,e)=\u003eMath.abs(t-e)\u003c1e-4,W9o=(t,e,{viaDiameter:n=.5}={})=\u003e{const o=[];for(let i=0;i\u003ct.length-1;i++){const[r,s]=[t[i],t[i+1]],a=i-1\u003e=0?t[i-1]:null,A=pMt(r.y,s.y),c=pMt(r.x,s.x);if(!A\u0026\u0026!c)throw new Error(`getObstaclesFromTrace currently only supports horizontal and vertical traces (not diagonals) Conflicting trace: ${e}, start: (${r.x}, ${r.y}), end: (${s.x}, ${s.y})`);const l={type:\"rect\",layers:[r.layer],center:{x:(r.x+s.x)/2,y:(r.y+s.y)/2},width:A?Math.abs(r.x-s.x):.1,height:c?Math.abs(r.y-s.y):.1,connectedTo:[e]};if(o.push(l),a\u0026\u0026a.layer===r.layer\u0026\u0026r.layer!==s.layer){const u={type:\"rect\",layers:[r.layer,s.layer],center:{x:r.x,y:r.y},connectedTo:[e],width:n,height:n};o.push(u)}}return o},j9o=.01,mMt=t=\u003e{const e=(t.rotation%360+360)%360,n=[0,90,180,270];for(const o of n){if(Math.min(Math.abs(e-o),360-Math.abs(e-o))\u003ej9o)continue;const r=o===90||o===270;return{center:t.center,width:r?t.height:t.width,height:r?t.width:t.height}}return null},_Mt=(t,e)=\u003e{const n=t.find(u=\u003eu.type===\"pcb_board\"),o=WN(n?.num_layers??4),i=new Map(t.flatMap(u=\u003eu.type===\"pcb_component\"?[[u.pcb_component_id,u]]:[])),r=new Map(t.flatMap(u=\u003eu.type===\"pcb_port\"?[[u.pcb_port_id,u]]:[])),s=new Map(t.flatMap(u=\u003eu.type===\"source_component\"?[[u.source_component_id,u]]:[])),a=new Map(t.flatMap(u=\u003eu.type===\"source_port\"?[[u.source_port_id,u]]:[])),A=({pcbComponentId:u,pcbPortId:g})=\u003e{const h=g?r.get(g):void 0,d=h?a.get(h.source_port_id):void 0,p=(u?i.get(u)?.source_component_id:void 0)??d?.source_component_id,m=p?s.get(p):void 0;return{...m?.name?{source_component_name:m.name}:{},...d?.name?{source_port_name:d.name}:{}}},c=u=\u003ee?u.concat(u.map(g=\u003ee?.getNetConnectedToId(g)).filter(Boolean)):u,l=[];for(const u of t){const g=u.pcb_component_id??void 0;if(u.type===\"pcb_smtpad\"){const h={pcb_smtpad_id:u.pcb_smtpad_id,pcb_port_id:u.pcb_port_id,...A({pcbComponentId:g,pcbPortId:u.pcb_port_id})};if(u.shape===\"circle\")l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",shape:\"circle\",layers:[u.layer],center:{x:u.x,y:u.y},width:u.radius*2,height:u.radius*2,connectedTo:c([u.pcb_smtpad_id])});else if(u.shape===\"rect\")l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:[u.layer],center:{x:u.x,y:u.y},width:u.width,height:u.height,connectedTo:c([u.pcb_smtpad_id])});else if(u.shape===\"rotated_rect\"){const d={center:{x:u.x,y:u.y},width:u.width,height:u.height,rotation:u.ccw_rotation},p=mMt(d),m=p??d;l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:[u.layer],center:m.center,width:m.width,height:m.height,ccwRotationDegrees:p?void 0:u.ccw_rotation,connectedTo:c([u.pcb_smtpad_id])})}else if(u.shape===\"pill\"||u.shape===\"rotated_pill\")l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:[u.layer],center:{x:u.x,y:u.y},width:u.width,height:u.height,...u.shape===\"rotated_pill\"?{ccwRotationDegrees:u.ccw_rotation}:{},connectedTo:c([u.pcb_smtpad_id])});else if(u.shape===\"polygon\"){const d=J9o(u.points);if(d){l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:[u.layer],...d,connectedTo:c([u.pcb_smtpad_id])});continue}const p=Gwe(u.points,{rectHeight:.1});for(const m of p)l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:[u.layer],center:m.center,width:m.width,height:m.height,connectedTo:c([u.pcb_smtpad_id])})}}else if(u.type===\"pcb_keepout\")u.shape===\"circle\"?l.push({componentId:g,type:\"oval\",layers:u.layers,center:{x:u.center.x,y:u.center.y},width:u.radius*2,height:u.radius*2,connectedTo:[]}):u.shape===\"rect\"\u0026\u0026l.push({componentId:g,type:\"rect\",layers:u.layers,center:{x:u.center.x,y:u.center.y},width:u.width,height:u.height,connectedTo:[]});else if(u.type===\"pcb_cutout\"){if(u.shape===\"rect\")l.push({componentId:g,type:\"rect\",layers:o,center:{x:u.center.x,y:u.center.y},width:u.width,height:u.height,connectedTo:[]});else if(u.shape===\"circle\"){const h=V9o({center:u.center,radius:u.radius},{rectHeight:.6});for(const d of h)l.push({componentId:g,type:\"rect\",layers:o,center:d.center,width:d.width,height:d.height,connectedTo:[]})}else if(u.shape===\"polygon\"){const h=Gwe(u.points,{rectHeight:.6});for(const d of h)l.push({componentId:g,type:\"rect\",layers:o,center:d.center,width:d.width,height:d.height,connectedTo:[]})}}else if(u.type===\"pcb_hole\")u.hole_shape===\"oval\"?l.push({componentId:g,type:\"oval\",layers:o,center:{x:u.x,y:u.y},width:u.hole_width,height:u.hole_height,connectedTo:[]}):u.hole_shape===\"pill\"||u.hole_shape===\"rotated_pill\"?l.push({componentId:g,type:\"rect\",layers:o,center:{x:u.x,y:u.y},width:u.hole_width,height:u.hole_height,...u.hole_shape===\"rotated_pill\"?{ccwRotationDegrees:u.ccw_rotation}:{},connectedTo:[]}):u.hole_shape===\"rect\"?l.push({componentId:g,type:\"rect\",layers:o,center:{x:u.x,y:u.y},width:u.hole_width,height:u.hole_height,connectedTo:[]}):u.hole_shape===\"square\"?l.push({componentId:g,type:\"rect\",layers:o,center:{x:u.x,y:u.y},width:u.hole_diameter,height:u.hole_diameter,connectedTo:[]}):(u.hole_shape===\"round\"||u.hole_shape===\"circle\")\u0026\u0026l.push({componentId:g,type:\"rect\",layers:o,center:{x:u.x,y:u.y},width:u.hole_diameter,height:u.hole_diameter,connectedTo:[]});else if(u.type===\"pcb_plated_hole\"){const h={pcb_plated_hole_id:u.pcb_plated_hole_id,pcb_port_id:u.pcb_port_id,...A({pcbComponentId:g,pcbPortId:u.pcb_port_id})};if(u.shape===\"circle\")l.push({circuitJsonMetadata:h,componentId:g,type:\"oval\",layers:o,center:{x:u.x,y:u.y},width:u.outer_diameter,height:u.outer_diameter,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape===\"pill_hole_with_rect_pad\"||u.shape===\"rotated_pill_hole_with_rect_pad\"){const d={center:{x:u.x,y:u.y},width:u.rect_pad_width,height:u.rect_pad_height,rotation:u.shape===\"rotated_pill_hole_with_rect_pad\"?u.rect_ccw_rotation:0},p=mMt(d),m=p??d;l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:o,center:m.center,width:m.width,height:m.height,ccwRotationDegrees:p?void 0:d.rotation,connectedTo:c([u.pcb_plated_hole_id])})}else if(u.shape===\"circular_hole_with_rect_pad\")l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:o,center:{x:u.x,y:u.y},width:u.rect_pad_width,height:u.rect_pad_height,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape===\"oval\")l.push({circuitJsonMetadata:h,componentId:g,type:\"oval\",layers:o,center:{x:u.x,y:u.y},width:u.outer_width,height:u.outer_height,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape===\"pill\")l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:o,center:{x:u.x,y:u.y},width:u.outer_width,height:u.outer_height,ccwRotationDegrees:u.ccw_rotation,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape===\"hole_with_polygon_pad\"\u0026\u0026\"pad_outline\"in u\u0026\u0026u.pad_outline\u0026\u0026u.pad_outline.length\u003e0){const d=u.pad_outline.map(x=\u003eu.x+x.x),p=u.pad_outline.map(x=\u003eu.y+x.y),m=Math.min(...d),_=Math.max(...d),f=Math.min(...p),I=Math.max(...p),C=(m+_)/2,y=(f+I)/2;l.push({circuitJsonMetadata:h,componentId:g,type:\"rect\",layers:o,center:{x:C,y},width:_-m,height:I-f,connectedTo:c([u.pcb_plated_hole_id])})}}else if(u.type===\"pcb_trace\"){const h=W9o(u.route.flatMap(d=\u003ed.route_type===\"through_pad\"?[{x:d.start.x,y:d.start.y,layer:d.start_layer},{x:d.end.x,y:d.end.y,layer:d.end_layer}]:[{x:d.x,y:d.y,layer:d.route_type===\"wire\"?d.layer:d.from_layer}]),u.source_trace_id??u.pcb_trace_id);l.push(...h.map(d=\u003e({...d,componentId:g})))}else if(u.type===\"pcb_via\"){const h=!!(u.net_is_assignable??u.netIsAssignable);l.push({circuitJsonMetadata:{pcb_via_id:u.pcb_via_id,...A({pcbComponentId:g})},componentId:g,type:\"rect\",shape:\"circle\",layers:u.layers,center:{x:u.x,y:u.y},connectedTo:c([u.pcb_via_id]),width:u.outer_diameter,height:u.outer_diameter,netIsAssignable:h||void 0})}}return l},vb=({text:t,font_size:e=.18})=\u003e{const n=e/.18,o=.12*n,i=.12*n;return t.length*o+i},j7=({anchor_position:t,anchor_side:e,text:n,font_size:o=.18})=\u003e{const i=vb({text:n,font_size:o}),r=o,s={...t};switch(e){case\"right\":s.x-=i/2;break;case\"left\":s.x+=i/2;break;case\"top\":s.y-=r/2;break;case\"bottom\":s.y+=r/2;break}return s},$9o=(t,e)=\u003e{let n=0;n+=t.length??0,n+=e.filter(o=\u003eo.is_crossing).length;for(let o=1;o\u003ce.length;o++){const i=e[o-1],r=e[o],s=Math.abs(i.from.x-i.to.x)\u003c.01,a=Math.abs(r.from.x-r.to.x)\u003c.01;s!==a\u0026\u0026n++}return n},gO=t=\u003e({up:\"bottom\",down:\"top\",left:\"right\",right:\"left\"})[t]??null,Ywe=({firstEdge:t,firstEdgePort:e,firstDominantDirection:n,lastEdge:o,lastEdgePort:i,lastDominantDirection:r})=\u003e{if(t\u0026\u0026e)return Ywe({lastEdge:{from:t.to,to:t.from},lastEdgePort:e,lastDominantDirection:n}).reverse().map(a=\u003e({from:a.to,to:a.from}));let s=[];if(o\u0026\u0026i){const a={x:o.to.x,y:o.to.y};r===\"left\"||r===\"right\"?(a.x=i.position.x,s.push({from:o.to,to:{...a}}),s.push({from:a,to:{...i.position}})):(a.y=i.position.y,s.push({from:o.to,to:{...a}}),s.push({from:a,to:{...i.position}}))}return s=s.filter(a=\u003ead(a.from,a.to)\u003e.01),s};function q9o(t){try{return[t(),null]}catch(e){return[null,e]}}var X9o=tJn.version,Oj=class extends Error{constructor(t){super(`${t} (capacity-autorouter@${X9o})`),this.name=\"AutorouterError\"}},jN=class extends Error{constructor(t){super(t.message),this.errorData=t,this.name=\"TraceConnectionError\"}errorData},Z9o=.2,e7o=.3,fMt=(t,e)=\u003e{if(t===void 0)return e;if(typeof t==\"number\")return t;const n=parseFloat(t);return Number.isFinite(n)?n:e},$N=t=\u003e({holeDiameter:fMt(t?.viaHoleDiameter,Z9o),padDiameter:fMt(t?.viaPadDiameter,e7o)}),t7o=(t,e)=\u003e{const n=$N(e);return{holeDiameter:t.holeDiameter??n.holeDiameter,padDiameter:t.padDiameter??n.padDiameter}};function IMt(t,e){const n=e.x-t.x,o=e.y-t.y;return Math.abs(n)\u003eMath.abs(o)?n\u003e=0?\"right\":\"left\":o\u003e=0?\"up\":\"down\"}var n7o=new Proxy({},{get:(t,e)=\u003ee}),$7=n7o,wb=\"rgba(132, 0, 0)\",v0e=.12,w0e=t=\u003e{if(t.length\u003c=1)return!0;const e=t.map(r=\u003e{const s=r._getPcbCircuitJsonBounds();return{left:s.bounds.left,right:s.bounds.right,top:s.bounds.top,bottom:s.bounds.bottom}}),n=Array(e.length).fill(!1).map(()=\u003eArray(e.length).fill(!1));for(let r=0;r\u003ce.length;r++)for(let s=r+1;s\u003ce.length;s++){const a=e[r],A=e[s];n[r][s]=n[s][r]=!(a.right\u003cA.left||a.left\u003eA.right||a.bottom\u003eA.top||a.top\u003cA.bottom)}const o=new Set,i=r=\u003e{o.add(r);for(let s=0;s\u003ce.length;s++)n[r][s]\u0026\u0026!o.has(s)\u0026\u0026i(s)};return i(0),o.size===e.length},Uwe=t=\u003e{if(t.length===0)throw new Error(\"Cannot get center of empty PCB primitives array\");const e=t.map(i=\u003ei._getPcbCircuitJsonBounds().center).filter(Boolean),n=e.reduce((i,r)=\u003ei+r.x,0),o=e.reduce((i,r)=\u003ei+r.y,0);return{x:n/e.length,y:o/e.length}},o7o=(t,e)=\u003e{switch(e){case\"i2c_sda\":t.supports_i2c_sda=!0;return;case\"i2c_scl\":t.supports_i2c_scl=!0;return;case\"spi_cs\":t.supports_spi_cs=!0;return;case\"spi_sck\":t.supports_spi_sck=!0;return;case\"spi_mosi\":t.supports_spi_mosi=!0;return;case\"spi_miso\":t.supports_spi_miso=!0;return;case\"uart_tx\":t.supports_uart_tx=!0;return;case\"uart_rx\":t.supports_uart_rx=!0;return;default:{const n=e;throw new Error(`Unhandled pin capability: ${n}`)}}},i7o=(t,e)=\u003e{switch(e){case\"i2c_sda\":t.is_configured_for_i2c_sda=!0;return;case\"i2c_scl\":t.is_configured_for_i2c_scl=!0;return;case\"spi_cs\":t.is_configured_for_spi_cs=!0;return;case\"spi_sck\":t.is_configured_for_spi_sck=!0;return;case\"spi_mosi\":t.is_configured_for_spi_mosi=!0;return;case\"spi_miso\":t.is_configured_for_spi_miso=!0;return;case\"uart_tx\":t.is_configured_for_uart_tx=!0;return;case\"uart_rx\":t.is_configured_for_uart_rx=!0;return;default:{const n=e;throw new Error(`Unhandled configured pin capability: ${n}`)}}},r7o=(t,e)=\u003e{for(const o of e.capabilities??[])o7o(t,o);const n=new Set([...e.activeCapabilities??[],...e.activeCapability?[e.activeCapability]:[]]);for(const o of n)i7o(t,o);e.mustBeConnected!==void 0\u0026\u0026(t.must_be_connected=e.mustBeConnected),e.providesPower!==void 0\u0026\u0026(t.provides_power=e.providesPower),e.requiresPower!==void 0\u0026\u0026(t.requires_power=e.requiresPower),e.providesGround!==void 0\u0026\u0026(t.provides_ground=e.providesGround),e.requiresGround!==void 0\u0026\u0026(t.requires_ground=e.requiresGround),e.providesVoltage!==void 0\u0026\u0026(t.provides_voltage=e.providesVoltage),e.requiresVoltage!==void 0\u0026\u0026(t.requires_voltage=e.requiresVoltage),e.doNotConnect!==void 0\u0026\u0026(t.do_not_connect=e.doNotConnect),e.includeInBoardPinout!==void 0\u0026\u0026(t.include_in_board_pinout=e.includeInBoardPinout),e.canUseInternalPullup!==void 0\u0026\u0026(t.can_use_internal_pullup=e.canUseInternalPullup),e.isUsingInternalPullup!==void 0\u0026\u0026(t.is_using_internal_pullup=e.isUsingInternalPullup),e.needsExternalPullup!==void 0\u0026\u0026(t.needs_external_pullup=e.needsExternalPullup),e.canUseInternalPulldown!==void 0\u0026\u0026(t.can_use_internal_pulldown=e.canUseInternalPulldown),e.isUsingInternalPulldown!==void 0\u0026\u0026(t.is_using_internal_pulldown=e.isUsingInternalPulldown),e.needsExternalPulldown!==void 0\u0026\u0026(t.needs_external_pulldown=e.needsExternalPulldown),e.canUseOpenDrain!==void 0\u0026\u0026(t.can_use_open_drain=e.canUseOpenDrain),e.isUsingOpenDrain!==void 0\u0026\u0026(t.is_using_open_drain=e.isUsingOpenDrain),e.canUsePushPull!==void 0\u0026\u0026(t.can_use_push_pull=e.canUsePushPull),e.isUsingPushPull!==void 0\u0026\u0026(t.is_using_push_pull=e.isUsingPushPull),e.shouldHaveDecouplingCapacitor!==void 0\u0026\u0026(t.should_have_decoupling_capacitor=e.shouldHaveDecouplingCapacitor),e.recommendedDecouplingCapacitorCapacitance!==void 0\u0026\u0026(t.recommended_decoupling_capacitor_capacitance=e.recommendedDecouplingCapacitorCapacitance)},s7o=t=\u003et?typeof t==\"string\"?[t]:[...t]:[];function a7o(t){if(!t.isGroupPort())return;const e=t._parsedProps.connectsTo;if(!e)return;const n=t.parent;if(!n)return;const o=n._parsedProps?.connections;if(Object.keys(o??{}).some(A=\u003et.isMatchingAnyOf([A])))return;const r=n.name,s=t.name;if(!r||!s)return;const a=`.${r} \u003e .${s}`;for(const A of s7o(e))n.children.some(l=\u003e{if(!(l instanceof t1))return!1;const u=l._parsedProps;return!(\"from\"in u)||!(\"to\"in u)?!1:u.from===a\u0026\u0026u.to===A||u.from===A\u0026\u0026u.to===a})||n.add(new t1({from:a,to:A}))}function A7o(t){for(const e of t._getMatchingPinAttributes())if(e.requiresGround===!0||e.providesGround===!0)return!0;for(const e of t.getNameAndAliases())if(Q0e.test(e))return!0;return!1}function c7o(t){return t._parsedProps.isGroundNet??Q0e.test(t._parsedProps.name)}function l7o(t){for(const e of t._getDirectlyConnectedTraces()){const n=e._findConnectedPorts().ports??[];for(const o of n)if(o!==t\u0026\u0026A7o(o))return!0;for(const o of e._findConnectedNets().nets)if(o\u0026\u0026c7o(o))return!0}return!1}function u7o(t){if(t.getParentNormalComponent()?.config.componentName!==\"Chip\")return!1;let e,n,o;for(const i of t._getMatchingPinAttributes())i.shouldHaveDecouplingCapacitor!==void 0\u0026\u0026(e=i.shouldHaveDecouplingCapacitor),i.requiresPower!==void 0\u0026\u0026(n=i.requiresPower),i.providesPower!==void 0\u0026\u0026(o=i.providesPower);if(e!==void 0)return e;if(n!==void 0)return n;if(o===!0)return!1;for(const i of t.getNameAndAliases())if(Hwe.test(i))return!0;return!1}function g7o(t){for(const e of t._getDirectlyConnectedTraces()){const n=e._findConnectedPorts().ports??[];for(const o of n)if(o!==t\u0026\u0026u7o(o))return!0}return!1}function Kwe(t){if(t.root?.pcbDisabled)return!1;if(t.pcb_port_id)return!0;const{db:e}=t.root,n=t.matchedComponents.filter(A=\u003eA.isPcbPrimitive),o=n.length===1?n[0]._getPcbCircuitJsonBounds().center:n.length\u003e1\u0026\u0026w0e(n)?Uwe(n):null;if(o){const A=e.pcb_port.insert({pcb_component_id:void 0,layers:t.getAvailablePcbLayers(),subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,...o,source_port_id:t.source_port_id,is_board_pinout:t.parent?.componentName===\"Board\"});return t.pcb_port_id=A.pcb_port_id,!0}const i=t._getConnectedPortsFromConnectsTo()[0];if(!i?.pcb_port_id)return!1;const r=e.pcb_port.get(i.pcb_port_id);if(!r)return!1;const s=t.getSubcircuit(),a=e.pcb_port.insert({pcb_component_id:void 0,layers:i.getAvailablePcbLayers(),subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,x:r.x,y:r.y,source_port_id:t.source_port_id,is_board_pinout:!1});return t.pcb_port_id=a.pcb_port_id,!0}var CMt=(t,e)=\u003et.localeCompare(e,void 0,{numeric:!0,sensitivity:\"base\"}),yMt=(t,e)=\u003e{const n=e.source_component_id?t.source_component.get(e.source_component_id):void 0,o=n?void 0:t.source_group.list().find(i=\u003ei.subcircuit_id===e.subcircuit_id);return n?.name??o?.name},xMt=(t,e)=\u003e{const n=t.source_port.get(e);if(!n?.name)return;const o=yMt(t,n);if(o)return`${o}_${n.name}`},Vwe=(t,e)=\u003e{const n=e.map(r=\u003et.source_port.get(r)).filter(r=\u003e!!r);if(n.length===0)return;const o=new Map;for(const r of t.source_port.list())r.source_component_id\u0026\u0026o.set(r.source_component_id,(o.get(r.source_component_id)??0)+1);const i=n.map(r=\u003e{const s=yMt(t,r);return!s||!r.name?null:{sourcePort:r,ownerName:s,label:`${s}_${r.name}`,ownerPinCount:r.source_component_id?o.get(r.source_component_id)??0:0}}).filter(r=\u003e!!r);return i.sort((r,s)=\u003e{const a=s.ownerPinCount-r.ownerPinCount;if(a!==0)return a;const A=CMt(r.ownerName,s.ownerName);if(A!==0)return A;const c=r.sourcePort.pin_number??Number.POSITIVE_INFINITY,l=s.sourcePort.pin_number??Number.POSITIVE_INFINITY,u=c-l;return u!==0?u:CMt(r.sourcePort.name,s.sourcePort.name)}),i[0]?.label},d7o=.12,Pu=class extends Ir{source_port_id=null;pcb_port_id=null;schematic_port_id=null;schematic_stem_line_id=null;shouldCreateSourcePort;schematicSymbolPortDef=null;matchedComponents;_isPrimaryPort=!0;_primaryPinNumber=null;facingDirection=null;originDescription=null;get config(){return{componentName:\"Port\",zodProps:xDn}}constructor(t,e={}){if(!t.name\u0026\u0026t.pinNumber!==void 0\u0026\u0026(t.name=`pin${t.pinNumber}`),!t.name)throw new Error(\"Port must have a name or a pinNumber\");super(t),e.originDescription\u0026\u0026(this.originDescription=e.originDescription),this.shouldCreateSourcePort=e.shouldCreateSourcePort??!0,this.matchedComponents=[]}isGroupPort(){return this.parent?.isGroup===!0}isComponentPort(){return!this.isGroupPort()}_getConnectedPortsFromConnectsTo(){const{_parsedProps:t}=this,e=t.connectsTo;if(!e)return[];const n=[],o=Array.isArray(e)?e:[e];for(const i of o){const r=this.getSubcircuit().selectOne(i,{type:\"port\"});r\u0026\u0026n.push(r)}return n}_isBoardPinoutFromAttributes(){const t=this.parent;if(t?._parsedProps?.pinAttributes){const e=t._parsedProps.pinAttributes;for(const n of this.getNameAndAliases())if(e[n]?.includeInBoardPinout)return!0}}_getGlobalPcbPositionBeforeLayout(){if(this.pcb_port_id){const n=this.root?.db.pcb_port.get(this.pcb_port_id);if(n?.pcb_component_id)return{x:n.x,y:n.y}}const t=this.matchedComponents.find(n=\u003en.isPcbPrimitive),e=this.parent;if(e\u0026\u0026!e.props.footprint)throw new Error(`${e.componentName} \"${e.props.name}\" does not have a footprint. Add a footprint prop, e.g. \u003c${e.componentName.toLowerCase()} footprint=\"...\" /\u003e`);if(!t)throw new Error(`Port ${this} has no matching PCB primitives. This often means the footprint's pads lack matching port hints.`);return t?._getGlobalPcbPositionBeforeLayout()??{x:0,y:0}}_getPcbCircuitJsonBounds(){if(!this.pcb_port_id)return super._getPcbCircuitJsonBounds();const{db:t}=this.root,e=t.pcb_port.get(this.pcb_port_id);return{center:{x:e.x,y:e.y},bounds:{left:0,top:0,right:0,bottom:0},width:0,height:0}}_getGlobalPcbPositionAfterLayout(){return this._getPcbCircuitJsonBounds().center}_getPortsInternallyConnectedToThisPort(){const t=this.parent;if(!t||!t._getInternallyConnectedPins)return[];const e=t._getInternallyConnectedPins();for(const n of e)if(n.some(o=\u003eo===this))return n;return[]}_hasSchematicPort(){const t=this.getParentNormalComponent();if(t?._parsedProps?.noSchematicRepresentation===!0)return!1;const{schX:e,schY:n}=this._parsedProps;if(e!==void 0\u0026\u0026n!==void 0)return!0;if(t?.getSchematicSymbol())return!!(this.schematicSymbolPortDef||this._getPortsInternallyConnectedToThisPort().some(s=\u003es.schematicSymbolPortDef));const i=t?._getSchematicBoxDimensions();return!!(i\u0026\u0026this._parsedProps.pinNumber!==void 0\u0026\u0026i.getPortPositionByPinNumber(this._parsedProps.pinNumber))}_getGlobalSchematicPositionBeforeLayout(){const{schX:t,schY:e}=this._parsedProps;if(t!==void 0\u0026\u0026e!==void 0)return this._getSymbolAncestor()?ts(this.computeSchematicGlobalTransform(),{x:0,y:0}):{x:t,y:e};const n=this.getParentNormalComponent(),o=n?.getSchematicSymbol();if(o){let r=this.schematicSymbolPortDef;if(!r\u0026\u0026(r=this._getPortsInternallyConnectedToThisPort().find(a=\u003ea.schematicSymbolPortDef)?.schematicSymbolPortDef??null,!r))throw new Error(`Couldn't find schematicSymbolPortDef for port ${this.getString()}, searched internally connected ports and none had a schematicSymbolPortDef. Why are we trying to get the schematic position of this port?`);const s=D0(n.computeSchematicGlobalTransform(),M0(-o.center.x,-o.center.y));return ts(s,r)}const i=n?._getSchematicBoxDimensions();if(i\u0026\u0026this._parsedProps.pinNumber!==void 0){const r=i.getPortPositionByPinNumber(this._parsedProps.pinNumber);if(!r)throw new Error(`Couldn't find position for schematic_port for port ${this.getString()} inside of the schematic box`);return ts(n.computeSchematicGlobalTransform(),r)}throw new Error(`Couldn't find position for schematic_port for port ${this.getString()}`)}_getGlobalSchematicPositionAfterLayout(){const{db:t}=this.root;if(!this.schematic_port_id)throw new Error(`Can't get schematic port position after layout for \"${this.getString()}\", no schematic_port_id`);const e=t.schematic_port.get(this.schematic_port_id);if(!e)throw new Error(`Schematic port not found when trying to get post-layout position: ${this.schematic_port_id}`);return e.center}registerMatch(t){this.matchedComponents.push(t)}getNameAndAliases(){const{_parsedProps:t}=this;return Array.from(new Set([...t.name?[t.name]:[],...t.aliases??[],...typeof t.pinNumber==\"number\"?[`pin${t.pinNumber}`,t.pinNumber.toString()]:[],...this.externallyAddedAliases??[]]))}_getMatchingPinAttributes(){const e=(this.getParentNormalComponent()??this.parent)?._parsedProps,n=e?.pinAttributes,o=e?.noConnect,i=[];for(const r of this.getNameAndAliases()){if(n){const s=n[r];s\u0026\u0026i.push(s)}o?.includes(r)\u0026\u0026i.push({doNotConnect:!0})}return i.length===0?[]:i}_shouldIncludeInBoardPinout(){return this._getMatchingPinAttributes().some(t=\u003et.includeInBoardPinout===!0)}isMatchingPort(t){return this.isMatchingAnyOf(t.getNameAndAliases())}getPortSelector(){return`.${(this.getParentNormalComponent()??this.parent)?.props.name} \u003e port.${this.props.name}`}getAvailablePcbLayers(){const{layer:t,layers:e}=this._parsedProps;if(e)return e;if(t)return[t];if(this.pcb_port_id){const n=this.root?.db.pcb_port.get(this.pcb_port_id);if(n?.pcb_component_id)return n.layers}return Array.from(new Set(this.matchedComponents.flatMap(n=\u003en.getAvailablePcbLayers())))}_getDirectlyConnectedTraces(){const t=this.getSubcircuit().selectAll(\"trace\"),e=[];for(const n of t)if(!n._couldNotFindPort)try{n._isExplicitlyConnectedToPort(this)\u0026\u0026e.push(n)}catch(o){if(o instanceof jN)continue;throw o}return e}isConnectedToPower(){return g7o(this)}isConnectedToGround(){return l7o(this)}doInitialCreateTracesFromProps(){a7o(this)}doInitialSourceRender(){if(!this.shouldCreateSourcePort)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getNameAndAliases(),o=this.getParentNormalComponent(),r=(this.parent?.source_component_id?this.parent:o)?.source_component_id??null,s=this._getMatchingPinAttributes(),a={};for(const c of s)r7o(a,c);const A=t.source_port.insert({name:e.name,pin_number:e.pinNumber,port_hints:n,source_component_id:r,subcircuit_id:this.getSubcircuit()?.subcircuit_id,...a});this.source_port_id=A.source_port_id}doInitialSourceParentAttachment(){if(!this.shouldCreateSourcePort)return;const{db:t}=this.root,e=this.getParentNormalComponent(),n=this.parent?.source_component_id?this.parent:e;if(this.isGroupPort()){t.source_port.update(this.source_port_id,{source_component_id:null,subcircuit_id:this.getSubcircuit()?.subcircuit_id});return}if(!n?.source_component_id)throw new Error(`${this.getString()} has no parent source component (parent: ${this.parent?.getString()})`);t.source_port.update(this.source_port_id,{source_component_id:n.source_component_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id}),this.source_component_id=n.source_component_id}doInitialPcbPortRender(){if(this.root?.pcbDisabled||this.getPrimitiveContainer()?.isSchematicPrimitive)return;const{db:t}=this.root,{matchedComponents:e}=this;if(this.isGroupPort()){Kwe(this);return}const n=this.getParentNormalComponent(),o=this.parent?.pcb_component_id?this.parent:n;if(!o?.pcb_component_id)throw new Error(`${this.getString()} has no parent pcb component, cannot render pcb_port (parent: ${this.parent?.getString()}, parentNormalComponent: ${n?.getString()})`);const i=e.filter(s=\u003es.isPcbPrimitive);if(i.length===0)return;let r=null;if(i.length===1\u0026\u0026(r=i[0]._getPcbCircuitJsonBounds().center),i.length\u003e1){if(!w0e(i)){const s=this.props.name,a=this.getParentNormalComponent()?.props.name??\"unknown\",A=this.getNameAndAliases().filter(l=\u003el!==s),c=A.length\u003e0?` (consider using alternate aliases: ${A.join(\", \")})`:\"\";t.source_ambiguous_port_reference.insert({error_type:\"source_ambiguous_port_reference\",message:`${a}.${s} is ambiguous: ${a}.${s} references multiple non-overlapping pads: ${i.map(l=\u003el.getString()).join(\", \")}${c}`,source_port_id:this.source_port_id??void 0,source_component_id:this.getParentNormalComponent()?.source_component_id??void 0});return}r=Uwe(i)}if(r){const s=this.getSubcircuit(),a=this._shouldIncludeInBoardPinout(),A=t.pcb_port.insert({pcb_component_id:o.pcb_component_id,layers:this.getAvailablePcbLayers(),subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,...a?{is_board_pinout:!0}:{},...r,source_port_id:this.source_port_id,is_board_pinout:this._isBoardPinoutFromAttributes()});this.pcb_port_id=A.pcb_port_id}else{const s=i[0];throw new Error(`${s.getString()} does not have a center or _getGlobalPcbPositionBeforeLayout method (needed for pcb_port placement)`)}}updatePcbPortRender(){if(this.root?.pcbDisabled||this.getPrimitiveContainer()?.isSchematicPrimitive)return;const{db:t}=this.root;if(this.pcb_port_id)return;if(this.isGroupPort()){Kwe(this);return}const e=this.matchedComponents.filter(A=\u003eA.isPcbPrimitive);if(e.length===0)return;let n=null;if(e.length===1\u0026\u0026(n=e[0]._getPcbCircuitJsonBounds().center),e.length\u003e1)try{w0e(e)\u0026\u0026(n=Uwe(e))}catch{}if(!n)return;const o=this.getParentNormalComponent(),i=this.parent?.pcb_component_id?this.parent:o,r=this.getSubcircuit(),s=this._shouldIncludeInBoardPinout(),a=t.pcb_port.insert({pcb_component_id:i?.pcb_component_id,layers:this.getAvailablePcbLayers(),subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,...s?{is_board_pinout:!0}:{},...n,source_port_id:this.source_port_id,is_board_pinout:this._isBoardPinoutFromAttributes()});this.pcb_port_id=a.pcb_port_id}doInitialPcbPortAttachment(){if(!this.pcb_port_id\u0026\u0026this.source_port_id){const t=this.root?.db.pcb_port.list({source_port_id:this.source_port_id}).find(e=\u003e!!e.pcb_component_id);if(t){this.pcb_port_id=t.pcb_port_id;return}}!this.isGroupPort()||this.pcb_port_id||Kwe(this)}_getBestDisplayPinLabel(){const{db:t}=this.root,e=t.source_port.get(this.source_port_id),n=[];for(const r of e?.port_hints??[])r.match(/^(pin)?\\d+$/)||r.match(/^(left|right)/)\u0026\u0026!e?.name.match(/^(left|right)/)||n.push(r);if(this.getParentNormalComponent()?.props?.showPinAliases\u0026\u0026n.length\u003e0)return n.join(\"/\");if(n.length\u003e0)return n[0]}doInitialSchematicPortRender(){if(this.root?.schematicDisabled)return;const t=this.getCollapsedSchematicBoxAncestor();if(t\u0026\u0026this.parent!==t)return;const{db:e}=this.root,{_parsedProps:n}=this,{schX:o,schY:i}=n,r=o!==void 0\u0026\u0026i!==void 0?this.getParentNormalComponent():this.getPrimitiveContainer();if(!r||!this._hasSchematicPort())return;const s=r._getGlobalSchematicPositionBeforeLayout(),a=this._getGlobalSchematicPositionBeforeLayout();let A=null;const c=r._getSchematicBoxDimensions();c\u0026\u0026n.pinNumber!==void 0\u0026\u0026(A=c.getPortPositionByPinNumber(n.pinNumber)),this.getSubcircuit().props._schDebugObjectsEnabled\u0026\u0026e.schematic_debug_object.insert({shape:\"rect\",center:a,size:{width:.1,height:.1},label:\"obstacle\"});const l=o!==void 0\u0026\u0026i!==void 0\u0026\u0026!!this._getSymbolAncestor();l\u0026\u0026n.direction?this.facingDirection=n.direction:A?.side?this.facingDirection={left:\"left\",right:\"right\",top:\"up\",bottom:\"down\"}[A.side]:this.facingDirection=IMt(s,a);const u=this._getBestDisplayPinLabel(),g=this.getParentNormalComponent(),h=n.direction===\"up\"?\"top\":n.direction===\"down\"?\"bottom\":n.direction,p=(l\u0026\u0026n.direction?h:void 0)??A?.side??h,m=n.schPinLabelFontSize===\"sm\"?d7o:n.schPinLabelFontSize===\"default\"?void 0:n.schPinLabelFontSize,_={type:\"schematic_port\",schematic_component_id:g?.schematic_component_id,center:a,source_port_id:this.source_port_id,facing_direction:this.facingDirection,distance_from_component_edge:n.schStemLength??.4,side_of_component:p,pin_number:n.pinNumber,true_ccw_index:A?.trueIndex,display_pin_label:u,display_pin_label_font_size:m,is_connected:!1,schematic_sheet_id:this._resolveSchematicSheetId()};for(const I of this._getMatchingPinAttributes())I.requiresPower\u0026\u0026(_.has_input_arrow=!0),I.providesPower\u0026\u0026(_.has_output_arrow=!0);const f=e.schematic_port.insert(_);if(this.schematic_port_id=f.schematic_port_id,n.schStemLength!==void 0\u0026\u0026n.schStemLength!==0){const{schStemLength:I,direction:C}=n;let y=a.x,x=a.y;C===\"right\"?y-=I:C===\"left\"?y+=I:C===\"up\"?x-=I:C===\"down\"\u0026\u0026(x+=I);const E=e.schematic_line.insert({schematic_component_id:g?.schematic_component_id,x1:a.x,y1:a.y,x2:y,y2:x,stroke_width:.02,color:wb,is_dashed:!1,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_stem_line_id=E.schematic_line_id}}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_port_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_port.get(this.schematic_port_id);if(o){const i=ts(e,o.center);if(n.schematic_port.update(this.schematic_port_id,{center:i}),this.schematic_stem_line_id){const r=n.schematic_line.get(this.schematic_stem_line_id);if(r){const s=ts(e,{x:r.x1,y:r.y1}),a=ts(e,{x:r.x2,y:r.y2});n.schematic_line.update(this.schematic_stem_line_id,{x1:s.x,y1:s.y,x2:a.x,y2:a.y});const A=Math.sqrt((s.x-a.x)**2+(s.y-a.y)**2);n.schematic_port.update(this.schematic_port_id,{distance_from_component_edge:A})}}}}_getSubcircuitConnectivityKey(){return this.root?.db.source_port.get(this.source_port_id)?.subcircuit_connectivity_map_key}_setPositionFromLayout(t){const{db:e}=this.root;this.pcb_port_id\u0026\u0026e.pcb_port.update(this.pcb_port_id,{x:t.x,y:t.y})}_hasMatchedPcbPrimitive(){return!!(this.pcb_port_id?this.root?.db.pcb_port.get(this.pcb_port_id):null)?.pcb_component_id||this.matchedComponents.some(e=\u003ee.isPcbPrimitive)}_getNetLabelText(){if(!(!this.root||!this.source_port_id))return xMt(this.root.db,this.source_port_id)}};function P0e(t){try{const e=t._getGlobalPcbPositionBeforeLayout(),n=t.getPcbSize();return{left:e.x-n.width/2,right:e.x+n.width/2,top:e.y+n.height/2,bottom:e.y-n.height/2}}catch{return null}}function EMt(t,e){const n=P0e(t),o=P0e(e);return!n||!o?!1:!(n.right\u003co.left||n.left\u003eo.right||n.bottom\u003eo.top||n.top\u003co.bottom)}function h7o(t,e){const n=P0e(t),o=P0e(e);return!n||!o?!1:n.left\u003e=o.left\u0026\u0026n.right\u003c=o.right\u0026\u0026n.bottom\u003e=o.bottom\u0026\u0026n.top\u003c=o.top}function p7o(t){const e=[],n=new Set;for(const o of t){if(n.has(o))continue;const i=[],r=[o];for(n.add(o);r.length\u003e0;){const s=r.pop();i.push(s);for(const a of t)n.has(a)||EMt(s,a)\u0026\u0026(n.add(a),r.push(a))}e.push(i)}return e}var BMt=class extends Ir{pcb_via_id=null;matchedPort=null;isPcbPrimitive=!0;source_manually_placed_via_id=null;source_trace_id=null;subcircuit_connectivity_map_key=null;constructor(t){super(t);const e=this._getLayers();this._parsedProps.layers=e,this.initPorts()}get config(){return{componentName:\"Via\",zodProps:_lt}}getAvailablePcbLayers(){return this._getLayers()}_getResolvedViaDiameters(t){return t7o({holeDiameter:this._parsedProps.holeDiameter,padDiameter:this._parsedProps.outerDiameter},t)}getPcbSize(){const t=this.getInheritedMergedProperty(\"pcbStyle\"),{padDiameter:e}=this._getResolvedViaDiameters(t);return{width:e,height:e}}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_via.get(this.pcb_via_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y-n.height/2,right:e.x+n.width/2,bottom:e.y+n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_via.update(this.pcb_via_id,{x:t.x,y:t.y})}_getLayers(){const{fromLayer:t=\"top\",toLayer:e=\"bottom\"}=this._parsedProps,n=this.parent?this.getSubcircuit()._getSubcircuitLayerCount():2;return lw({fromLayer:t,toLayer:e,layerCount:n})}initPorts(){const t=this._parsedProps.layers;for(const n of t){const o=new Pu({name:n,layer:n});o.registerMatch(this),this.add(o)}const e=new Pu({name:\"pin1\"});e.registerMatch(this),this.add(e)}_getConnectedNetOrTrace(){const t=this._parsedProps.connectsTo;if(!t)return this._getPortFromContainingPad()?._getDirectlyConnectedTraces()[0]??null;const e=this.getSubcircuit(),n=Array.isArray(t)?t:[t];for(const o of n)if(o.startsWith(\"net.\")){const i=e.selectOne(o,{type:\"net\"});if(i)return i}return null}doInitialCreateNetsFromProps(){const t=this._parsedProps.connectsTo;t\u0026\u0026Hj(this,Array.isArray(t)?t:[t])}_getPortFromContainingPad(){if(this.parent?.componentName!==\"Footprint\")return null;const t=new Set(this.parent.children.filter(e=\u003ee.componentName===\"SmtPad\").filter(e=\u003eh7o(this,e)).map(e=\u003ee.matchedPort).filter(e=\u003ee!==null));return t.size===1?[...t][0]:null}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,e=this.getInheritedMergedProperty(\"pcbStyle\"),{padDiameter:n}=this._getResolvedViaDiameters(e),o=this._getGlobalPcbPositionBeforeLayout(),i=this.getSubcircuit(),r=t.pcb_component.insert({center:o,width:n,height:n,layer:this._parsedProps.fromLayer??\"top\",rotation:0,source_component_id:this.source_component_id,subcircuit_id:i?.subcircuit_id??void 0,obstructs_within_bounds:!0});this.pcb_component_id=r.pcb_component_id}doInitialSourceRender(){const{db:t}=this.root,e=this.getGroup(),n=this.getSubcircuit(),o=t.source_manually_placed_via.insert({source_group_id:e?.source_group_id,subcircuit_id:n?.subcircuit_id??void 0});this.source_manually_placed_via_id=o.source_manually_placed_via_id,this.source_component_id=o.source_manually_placed_via_id}doInitialSourceTraceRender(){const t=this._parsedProps.connectsTo;if(!t)return;const{db:e}=this.root,n=this.getSubcircuit(),o=Array.isArray(t)?t:[t],i=[],r=[];for(const s of o){if(s.startsWith(\"net.\")){const A=n.selectOne(s,{type:\"net\"});if(!A?.source_net_id){this.renderError(`Could not find net for via selector \"${s}\"`);return}r.push(A);continue}const a=n.selectOne(s,{type:\"port\"})??this.getParentNormalComponent()?.children.find(A=\u003eA instanceof Pu\u0026\u0026A.isMatchingAnyOf([s]))??null;if(!a?.source_port_id){this.renderError(`Could not find port for via selector \"${s}\"`);return}i.push(a)}if(i.length\u003e0){const s=e.source_trace.insert({connected_source_port_ids:i.map(a=\u003ea.source_port_id),connected_source_net_ids:r.map(a=\u003ea.source_net_id),subcircuit_id:n.subcircuit_id??void 0,display_name:this._parsedProps.name?`${this._parsedProps.name} connectivity`:\"Manually placed via connectivity\"});this.source_trace_id=s.source_trace_id}e.source_manually_placed_via.update(this.source_manually_placed_via_id,{source_net_id:r[0]?.source_net_id,source_trace_id:this.source_trace_id??void 0})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,e=this.getInheritedMergedProperty(\"pcbStyle\"),{holeDiameter:n,padDiameter:o}=this._getResolvedViaDiameters(e),i=this._getGlobalPcbPositionBeforeLayout(),r=this.getSubcircuit(),s=this._getConnectedNetOrTrace(),a=this.source_trace_id??(s instanceof Qb?void 0:s?.source_trace_id),A=!a\u0026\u0026s instanceof Qb?s.source_net_id:void 0,c=t.pcb_via.insert({x:i.x,y:i.y,hole_diameter:n,outer_diameter:o,layers:this._getLayers(),from_layer:this._parsedProps.fromLayer||\"bottom\",to_layer:this._parsedProps.toLayer||\"top\",subcircuit_id:r?.subcircuit_id??void 0,subcircuit_connectivity_map_key:this.subcircuit_connectivity_map_key??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,net_is_assignable:this._parsedProps.netIsAssignable??void 0,...a?{source_trace_id:a}:{},...A?{source_net_id:A}:{}});this.pcb_via_id=c.pcb_via_id}};function m7o(t){if(t.root?.schematicDisabled)return;const{db:e}=t.root,{_parsedProps:n,parent:o}=t;if(!o)throw new Error(\"Trace has no parent\");const{allPortsFound:i,portsWithSelectors:r}=t._findConnectedPorts();if(!i)return;const s=r.map(({port:C})=\u003e({port:C,position:C._getGlobalSchematicPositionAfterLayout(),schematic_port_id:C.schematic_port_id,facingDirection:C.facingDirection}));if(s.length\u003c2)throw new Error(\"Expected at least two ports in portsWithPosition.\");let a,A;const c=s[0].position,l=s[0].port;if(\"path\"in t.props){if(t.props.path.length!==2)throw new Error(\"Invalid 'path': Must contain exactly two elements.\");[a,A]=t.props.path}else{if(!(\"from\"in t.props\u0026\u0026\"to\"in t.props))throw new Error(\"Missing 'from' or 'to' properties in props.\");a=t.props.from,A=t.props.to}if(!l.source_port_id)throw new Error(`Missing source_port_id for the 'from' port (${a}).`);const u=s[1].position,g=s[1].port;if(!g.source_port_id)throw new Error(`Missing source_port_id for the 'to' port (${A}).`);const h=e.schematic_net_label.list().find(C=\u003eC.source_net_id===l.source_port_id),d=e.schematic_net_label.list().find(C=\u003eC.source_net_id===g.source_port_id),[p,m]=r.map(({port:C})=\u003eC),f=p.parent?.config.shouldRenderAsSchematicBox?`${p?.parent?.props.name}_${p?.props.name}`:`${m?.parent?.props.name}_${m?.props.name}`,I=t._getSchematicNetLabelText()??f;if(h\u0026\u0026h.text!==I\u0026\u0026(h.text=`${I} / ${h.text}`),d\u0026\u0026d?.text!==I\u0026\u0026(d.text=`${I} / ${d.text}`),!d){const C=gO(g.facingDirection)??\"bottom\";e.schematic_net_label.insert({text:I,source_net_id:g.source_port_id,anchor_position:u,center:j7({anchor_position:u,anchor_side:C,text:I}),anchor_side:C,schematic_sheet_id:t._resolveSchematicSheetId()})}if(!h){const C=gO(l.facingDirection)??\"bottom\";e.schematic_net_label.insert({text:I,source_net_id:l.source_port_id,anchor_position:c,center:j7({anchor_position:c,anchor_side:C,text:I}),anchor_side:C,schematic_sheet_id:t._resolveSchematicSheetId()})}}function _7o(t){const{_parsedProps:e,parent:n}=t;if(!n)throw new Error(\"Trace has no parent\");const o=t.getTracePortPathSelectors(),i=s=\u003e{if(s.lastIndexOf(\".\")\u003es.lastIndexOf(\" \"))return null;let A=t.getSubcircuit().selectOne(s);if(!A\u0026\u0026!/[.#\\[]/.test(s)\u0026\u0026(A=t.getSubcircuit().selectOne(`.${s}`)),!A)return null;const c=A.children.filter(l=\u003el.componentName===\"Port\");return c.length===1?c[0]:null},r=o.map(s=\u003e({selector:s,port:t.getSubcircuit().selectOne(s,{type:\"port\"})??i(s)}));for(const{selector:s,port:a}of r)if(!a){let A,c;const l=s.lastIndexOf(\".\");if(l!==-1\u0026\u0026l\u003es.lastIndexOf(\" \"))A=s.slice(0,l),c=s.slice(l+1);else{const y=s.match(/^(.*[ \u003e])?([^ \u003e]+)$/);A=y?.[1]?.trim()??\"\",c=y?.[2]??s}let u=A?t.getSubcircuit().selectOne(A):null;if(!u\u0026\u0026A\u0026\u0026!/[.#\\[]/.test(A)\u0026\u0026(u=t.getSubcircuit().selectOne(`.${A}`)),!u){const y=A?`Could not find port for selector \"${s}\". Component \"${A}\" not found`:`Could not find port for selector \"${s}\"`,x=t.getSubcircuit(),E=x.getGroup();throw new jN({error_type:\"source_trace_not_connected_error\",message:y,subcircuit_id:x.subcircuit_id??void 0,source_group_id:E?.source_group_id??void 0,source_trace_id:t.source_trace_id??void 0,selectors_not_found:[s]})}const g=u.children.filter(y=\u003ey.componentName===\"Port\"),h=c.includes(\".\")?c.split(\".\").pop()??\"\":c,d=g.flatMap(y=\u003ey.getNameAndAliases()),p=d.some(y=\u003e!/^(pin\\d+|\\d+)$/.test(y)),m=Array.from(new Set(d)).join(\", \");let _;g.length===0?_=\"It has no ports\":p?_=`It has [${m}]`:_=`It has ${g.length} pins and no pinLabels (consider adding pinLabels)`;const f=`Could not find port for selector \"${s}\". Component \"${u.props.name??A}\" found, but does not have pin \"${h}\". ${_}`,I=t.getSubcircuit(),C=I.getGroup();throw new jN({error_type:\"source_trace_not_connected_error\",message:f,subcircuit_id:I.subcircuit_id??void 0,source_group_id:C?.source_group_id??void 0,source_trace_id:t.source_trace_id??void 0,selectors_not_found:[s]})}return r.some(s=\u003e!s.port)?{allPortsFound:!1}:{allPortsFound:!0,portsWithSelectors:r,ports:r.map(({port:s})=\u003es)}}function zwe(t){let e=0;for(let n=0;n\u003ct.length;n++){const o=t[n];if(o.route_type===\"wire\"){const i=t[n+1];if(i){const r=W7(i),s=W7(o),a=r.x-s.x,A=r.y-s.y;e+=Math.sqrt(a*a+A*A)}}else o.route_type===\"via\"\u0026\u0026(e+=1.6)}return e}function bMt(t){const{lineStart:e,lineEnd:n,rectCenter:o,rectWidth:i,rectHeight:r}=t,s=o.x-i/2,a=o.x+i/2,A=o.y+r/2,c=o.y-r/2,l=n.x-e.x,u=n.y-e.y,g=[];if(l!==0){const h=(s-e.x)/l;if(h\u003e=0\u0026\u0026h\u003c=1){const d=e.y+h*u;d\u003e=c\u0026\u0026d\u003c=A\u0026\u0026g.push({x:s,y:d,t:h})}}if(l!==0){const h=(a-e.x)/l;if(h\u003e=0\u0026\u0026h\u003c=1){const d=e.y+h*u;d\u003e=c\u0026\u0026d\u003c=A\u0026\u0026g.push({x:a,y:d,t:h})}}if(u!==0){const h=(c-e.y)/u;if(h\u003e=0\u0026\u0026h\u003c=1){const d=e.x+h*l;d\u003e=s\u0026\u0026d\u003c=a\u0026\u0026g.push({x:d,y:c,t:h})}}if(u!==0){const h=(A-e.y)/u;if(h\u003e=0\u0026\u0026h\u003c=1){const d=e.x+h*l;d\u003e=s\u0026\u0026d\u003c=a\u0026\u0026g.push({x:d,y:A,t:h})}}return g.length===0?null:(g.sort((h,d)=\u003eh.t-d.t),{x:g[0].x,y:g[0].y})}function SMt(t){const{lineStart:e,lineEnd:n,circleCenter:o,circleRadius:i}=t,r=e.x-o.x,s=e.y-o.y,a=n.x-o.x,A=n.y-o.y,c=a-r,l=A-s,u=c*c+l*l,g=2*(r*c+s*l),h=r*r+s*s-i*i,d=g*g-4*u*h;if(d\u003c0)return null;const p=Math.sqrt(d),m=(-g-p)/(2*u),_=(-g+p)/(2*u);let f=null;return m\u003e=0\u0026\u0026m\u003c=1?f=m:_\u003e=0\u0026\u0026_\u003c=1\u0026\u0026(f=_),f===null?null:{x:e.x+f*c,y:e.y+f*l}}function QMt(t){const{traceStart:e,traceEnd:n,traceWidth:o,port:i}=t,r=i.matchedComponents.find(g=\u003eg.isPcbPrimitive);if(!r)return n;const s=r._getPcbCircuitJsonBounds(),a=s.width,A=s.height,c=s.center,l=Math.min(a,A);if(o\u003c=l/2)return n;let u=null;if(r.componentName===\"SmtPad\"){const g=r,h=g._parsedProps.shape;if(h===\"circle\"){const d=g._parsedProps.radius;u=SMt({lineStart:e,lineEnd:n,circleCenter:c,circleRadius:d})}else(h===\"rect\"||h===\"rotated_rect\"||h===\"pill\"||h===\"polygon\")\u0026\u0026(u=bMt({lineStart:e,lineEnd:n,rectCenter:c,rectWidth:a,rectHeight:A}))}else if(r.componentName===\"PlatedHole\"){const g=r;if(g._parsedProps.shape===\"circle\"){const d=g._parsedProps.outerDiameter;u=SMt({lineStart:e,lineEnd:n,circleCenter:c,circleRadius:d/2})}else u=bMt({lineStart:e,lineEnd:n,rectCenter:c,rectWidth:a,rectHeight:A})}return u??n}function vMt(t){const n=(t._parsedProps?.portHints??[]).filter(Boolean);return n.length\u003e0?`\u003c${t.lowercaseComponentName}(${n.map(o=\u003e`.${o}`).join(\", \")}) /\u003e`:`\u003c${t.lowercaseComponentName} /\u003e`}function Jwe(t,e){const n=e.matchedComponents.filter(a=\u003ea.isPcbPrimitive),o=e.getParentNormalComponent()?.props.name??e.parent?.props.name??\"unknown\",i=e.getParentNormalComponent(),r=t.trim().split(/\\s+|\u003e/).filter(Boolean).at(-1)?.replace(/^port\\./,\"\").replace(/^\\./,\"\");if(r\u0026\u0026!/^(pin)?\\d+$/.test(r)){const a=(i?.children??[]).filter(A=\u003eA.componentName===\"Port\"\u0026\u0026A.isMatchingAnyOf([r]));if(a.length\u003e1\u0026\u0026!(i?._getInternallyConnectedPins?.()??[]).some(l=\u003ea.every(u=\u003el.includes(u)))){const l=Array.from(new Set(a.flatMap(h=\u003eh.getNameAndAliases().filter(d=\u003e/^pin\\d+$/.test(d)).map(d=\u003e`${o}.${d}`)))),u=l.length\u003e0?` Use a raw pin selector like ${l.map(h=\u003e`\"${h}\"`).join(\" or \")}.`:\"\",g=a.flatMap(h=\u003eh.matchedComponents.filter(d=\u003ed.isPcbPrimitive));return`Trace selector \"${t}\" resolved to \"${o}.${e.props.name}\", but alias \"${r}\" matches multiple PCB pads: ${g.map(h=\u003evMt(h)).join(\", \")}.${u}`}}if(e.pcb_port_id)return null;const s=Array.from(new Set(e.getNameAndAliases().filter(a=\u003e/^pin\\d+$/.test(a)).map(a=\u003e`${o}.${a}`)));if(n.length\u003e1\u0026\u0026!w0e(n)){const a=s.length\u003e0?` Use a raw pin selector like ${s.map(A=\u003e`\"${A}\"`).join(\" or \")}.`:\"\";return`Trace selector \"${t}\" resolved to \"${o}.${e.props.name}\", but that target maps to multiple non-overlapping PCB pads: ${n.map(A=\u003evMt(A)).join(\", \")}.${a}`}return null}var EB={min_trace_width:.1,min_via_hole_edge_to_via_hole_edge_clearance:.1,min_plated_hole_drill_edge_to_drill_edge_clearance:.15,min_trace_to_pad_edge_clearance:.1,min_pad_edge_to_pad_edge_clearance:.1,min_board_edge_clearance:.2,min_via_hole_diameter:.2,min_via_pad_diameter:.3},f7o=(t,e)=\u003e{if(e.route_type===\"via\")return t?.find(n=\u003eMath.abs(n.x-e.x)\u003c1e-4\u0026\u0026Math.abs(n.y-e.y)\u003c1e-4\u0026\u0026(!n.from_layer||n.from_layer===e.from_layer)\u0026\u0026(!n.to_layer||n.to_layer===e.to_layer))},I7o=t=\u003e{const e=t;return{holeDiameter:e.hole_diameter??e.via_hole_diameter,outerDiameter:e.outer_diameter??e.via_diameter}};function C7o(t){if(t.root?.pcbDisabled)return;const{db:e}=t.root,{_parsedProps:n}=t,o=t.getSubcircuit(),i=n.pcbPath!==void 0,r=!!n.pcbStraightLine,s=t._inflatedPcbTraces??[];if(!i\u0026\u0026!r\u0026\u0026s.length===0)return;let a,A,c;try{const M=t._findConnectedPorts();a=M.allPortsFound,A=M.ports??[],c=M.portsWithSelectors??[]}catch(M){if(M instanceof jN){e.source_trace_not_connected_error.insert({...M.errorData,error_type:\"source_trace_not_connected_error\"}),t._couldNotFindPort=!0;return}throw M}if(!a)return;const l=c.map(({selector:M,port:k})=\u003eJwe(M,k)).find(Boolean);if(l){e.pcb_trace_error.insert({error_type:\"pcb_trace_error\",source_trace_id:t.source_trace_id,message:l,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:A.map(M=\u003eM.pcb_port_id).filter(Boolean)});return}const u=[];for(const M of A)M._hasMatchedPcbPrimitive()||u.push(M);if(u.length\u003e0){e.pcb_trace_error.insert({error_type:\"pcb_trace_error\",source_trace_id:t.source_trace_id,message:`Some ports did not have a matching PCB primitive (e.g. a pad or plated hole), this can happen if a footprint is missing. As a result, ${t} wasn't routed. Missing ports: ${u.map(M=\u003eM.getString()).join(\", \")}`,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:u.map(M=\u003eM.pcb_port_id).filter(Boolean)});return}const g=t._getExplicitTraceThickness()??t.getSubcircuit()._parsedProps.minTraceWidth??EB.min_trace_width;if(s.length\u003e0){const{isFlipped:M,maybeFlipLayer:k}=t._getPcbPrimitiveFlippedHelpers(),R=t._computePcbGlobalTransformBeforeLayout(),F=[],O=t.subcircuit_connectivity_map_key??e.source_trace.get(t.source_trace_id)?.subcircuit_connectivity_map_key;for(const U of s){const Y=U.route.map(oe=\u003e{if(oe.route_type===\"wire\"){const{x:ie,y:ne,...le}=oe,ge=ts(R,{x:ie,y:ne});return{...le,...ge,layer:k(oe.layer)}}if(oe.route_type===\"via\"){const{x:ie,y:ne,...le}=oe,ge=ts(R,{x:ie,y:ne});return{...le,...ge,from_layer:k(oe.from_layer),to_layer:k(oe.to_layer)}}return{...oe,start:ts(R,oe.start),end:ts(R,oe.end),start_layer:k(oe.start_layer),end_layer:k(oe.end_layer)}}),W=e.pcb_trace.insert({...U,route:Y,source_trace_id:t.source_trace_id,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0}),te=t.getInheritedMergedProperty(\"pcbStyle\"),{holeDiameter:j,padDiameter:J}=$N(te);for(let oe=0;oe\u003cY.length;oe++){const ie=Y[oe];if(ie.route_type===\"via\"){const ne=U.route[oe],le=f7o(t._inflatedPcbVias,ne),ge=le?Sne.parse(le):void 0,_e=I7o(ie),ue=k(ge?.from_layer??ie.from_layer),fe=k(ge?.to_layer??ie.to_layer),pe=(ge?.layers??lw({fromLayer:ie.from_layer,toLayer:ie.to_layer,layerCount:o._getSubcircuitLayerCount()})).map(ye=\u003ek(ye));e.pcb_via.insert({pcb_trace_id:W.pcb_trace_id,x:ie.x,y:ie.y,hole_diameter:ge?.hole_diameter??_e.holeDiameter??j,outer_diameter:ge?.outer_diameter??_e.outerDiameter??J,layers:pe,from_layer:ue,to_layer:fe,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_connectivity_map_key:ge?.subcircuit_connectivity_map_key??O,net_is_assignable:ge?.net_is_assignable,net_assigned:ge?.net_assigned,tented_on_top:M?ge?.tented_on_bottom:ge?.tented_on_top,tented_on_bottom:M?ge?.tented_on_top:ge?.tented_on_bottom})}}t.pcb_trace_id||(t.pcb_trace_id=W.pcb_trace_id),F.push(W.route)}for(const U of F)t._insertErrorIfTraceIsOutsideBoard(U,A);t._portsRoutedOnPcb=A;return}if(r\u0026\u0026!i){if(!A||A.length\u003c2){t.renderError(\"pcbStraightLine requires exactly two connected ports\");return}const[M,k]=A,R=M.getAvailablePcbLayers(),F=k.getAvailablePcbLayers(),U=R.find(ne=\u003eF.includes(ne))??R[0]??F[0]??\"top\",Y=M._getGlobalPcbPositionAfterLayout(),W=k._getGlobalPcbPositionAfterLayout(),te=QMt({traceStart:W,traceEnd:Y,traceWidth:g,port:M}),j=QMt({traceStart:Y,traceEnd:W,traceWidth:g,port:k}),J=[{route_type:\"wire\",x:te.x,y:te.y,width:g,layer:U,start_pcb_port_id:M.pcb_port_id},{route_type:\"wire\",x:j.x,y:j.y,width:g,layer:U,end_pcb_port_id:k.pcb_port_id}],oe=zwe(J),ie=e.pcb_trace.insert({route:J,source_trace_id:t.source_trace_id,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,trace_length:oe});t._portsRoutedOnPcb=A,t.pcb_trace_id=ie.pcb_trace_id,t._insertErrorIfTraceIsOutsideBoard(J,A);return}if(!n.pcbPath)return;let h;n.pcbPathRelativeTo\u0026\u0026(h=c.find(M=\u003eM.selector===n.pcbPathRelativeTo)?.port,h||(h=t.getSubcircuit().selectOne(n.pcbPathRelativeTo))),h||(h=A[0]);const d=A.find(M=\u003eM!==h)??A[1];let m=h.getAvailablePcbLayers()[0]||\"top\";const _=h._getGlobalPcbPositionAfterLayout(),f=d?._getGlobalPcbPositionAfterLayout(),I=[];I.push({route_type:\"wire\",x:_.x,y:_.y,width:g,layer:m,start_pcb_port_id:h.pcb_port_id});const C=o._isInflatedFromCircuitJson?t._computePcbGlobalTransformBeforeLayout():h?._computePcbGlobalTransformBeforeLayout?.()||hC(),y=n.pcbPath;for(const M of y){let k,R=!1;const F=typeof M!=\"string\"\u0026\u0026M.via;let O,U;if(typeof M==\"string\"){const W=t.getSubcircuit().selectOne(M,{type:\"port\"});if(!W){e.pcb_trace_error.insert({error_type:\"pcb_trace_error\",source_trace_id:t.source_trace_id,message:`Could not resolve pcbPath selector \"${M}\" for ${t}`,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:[]});continue}const te=Jwe(M,W);if(te){e.pcb_trace_error.insert({error_type:\"pcb_trace_error\",source_trace_id:t.source_trace_id,message:te,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:[]});return}const j=W._getGlobalPcbPositionAfterLayout();k={x:j.x,y:j.y},R=!0}else k={x:M.x,y:M.y},R=!1,M.via\u0026\u0026(O=M.fromLayer??m,U=M.toLayer);const Y=R?k:ts(C,k);F?(I.push({route_type:\"via\",x:Y.x,y:Y.y,from_layer:O??m,to_layer:U??m}),m=U??m):I.push({route_type:\"wire\",x:Y.x,y:Y.y,width:g,layer:m})}d\u0026\u0026f\u0026\u0026I.push({route_type:\"wire\",x:f.x,y:f.y,width:g,layer:m,end_pcb_port_id:d.pcb_port_id});const x=zwe(I),E=e.pcb_trace.insert({route:I,source_trace_id:t.source_trace_id,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,trace_length:x}),B=t.subcircuit_connectivity_map_key??e.source_trace.get(t.source_trace_id)?.subcircuit_connectivity_map_key,S=t.getInheritedMergedProperty(\"pcbStyle\"),{holeDiameter:Q,padDiameter:w}=$N(S);for(const M of I)if(M.route_type===\"via\"){const k=M.from_layer,R=M.to_layer;e.pcb_via.insert({pcb_trace_id:E.pcb_trace_id,x:M.x,y:M.y,hole_diameter:Q,outer_diameter:w,layers:lw({fromLayer:k,toLayer:R,layerCount:o._getSubcircuitLayerCount()}),from_layer:k,to_layer:R,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_connectivity_map_key:B})}t._portsRoutedOnPcb=A,t.pcb_trace_id=E.pcb_trace_id,t._insertErrorIfTraceIsOutsideBoard(I,A)}var Wwe=t=\u003et.map(e=\u003e{const{circuitJsonMetadata:n,...o}=e;if(o.route_type!==\"via\")return o;const{layers:i,...r}=o;return r}),jwe=({component:t,subcircuit:e})=\u003e{t._pcbTraceRenderWaitingForPlacementChecks=!1;let n=t,o=0,i=null,r=!1;for(;n;){if(\"_pcbPlacementDrcErrorCount\"in n){if(\"_pcbPlacementDrcChecksPending\"in n\u0026\u0026n._pcbPlacementDrcChecksPending===!0){r=!0;break}if(typeof n._pcbPlacementDrcErrorCount==\"number\"){o=n._pcbPlacementDrcErrorCount;break}if(\"_pcbPlacementDrcCheckError\"in n\u0026\u0026typeof n._pcbPlacementDrcCheckError==\"string\"){i=n._pcbPlacementDrcCheckError;break}}n=n.parent}if(r)return t._pcbTraceRenderWaitingForPlacementChecks=!0,!0;if(o===0\u0026\u0026!i)return!1;const{db:s}=t.root,a=`pcb_autorouting_skipped_placement_errors_${e.subcircuit_id}`;return s.pcb_autorouting_error.list().some(c=\u003ec.pcb_error_id===a)||s.pcb_autorouting_error.insert({pcb_error_id:a,error_type:\"pcb_autorouting_error\",subcircuit_id:e.subcircuit_id??void 0,message:i?`Autorouting was skipped because PCB placement checks could not be completed: ${i}`:`Autorouting was skipped because ${o} PCB placement error${o===1?\" was\":\"s were\"} found. Fix the placement errors or set placementDrcChecksDisabled to true to route anyway.`}),!0},y7o=1e-6,x7o=t=\u003e{let e=0;for(let n=0;n\u003ct.length;n++){const o=t[n];for(let i=n+1;i\u003ct.length;i++){const r=t[i];e=Math.max(e,Math.hypot(r.x-o.x,r.y-o.y))}}return e},E7o=(t,e)=\u003e{let n=Number.POSITIVE_INFINITY;for(const o of t)for(const i of e)n=Math.min(n,Math.hypot(i.x-o.x,i.y-o.y));return n},B7o=({component:t,subcircuit:e})=\u003e{const{db:n}=t.root,o=n.source_trace.list().filter(a=\u003ea.subcircuit_id===e.subcircuit_id),i=new wQ({});i.addConnections(o.map(a=\u003e[a.source_trace_id,...a.connected_source_port_ids,...a.connected_source_net_ids]));const r=new Map;for(const a of n.pcb_port.list())typeof a.source_port_id!=\"string\"||typeof a.x!=\"number\"||typeof a.y!=\"number\"||r.set(a.source_port_id,{pcb_port_id:a.pcb_port_id,source_port_id:a.source_port_id,x:a.x,y:a.y});const s=[];for(const a of o){if(typeof a.max_length!=\"number\")continue;const A=a.connected_source_port_ids.map(l=\u003er.get(l)).filter(l=\u003e!!l);let c;if(A.length\u003e=2)c=x7o(A);else{if(A.length!==1||a.connected_source_net_ids.length===0)continue;const l=i.getNetConnectedToId(a.source_trace_id);if(!l)continue;const g=i.getIdsConnectedToNet(l).filter(d=\u003e!a.connected_source_port_ids.includes(d)\u0026\u0026r.has(d)).map(d=\u003er.get(d)).filter(d=\u003e!!d);if(g.length===0||n.toArray().some(d=\u003e(d.type===\"source_pcb_ground_plane\"||d.type===\"pcb_ground_plane\"||d.type===\"pcb_copper_pour\")\u0026\u0026typeof d.source_net_id==\"string\"\u0026\u0026i.areIdsConnected(a.source_trace_id,d.source_net_id)))continue;c=E7o(A,g)}c\u003c=a.max_length+y7o||s.push({sourceTraceId:a.source_trace_id,traceDisplayName:a.display_name,straightLineDistance:c,maximumTraceLength:a.max_length})}return s},$we=({component:t,subcircuit:e})=\u003e{const n=B7o({component:t,subcircuit:e});if(n.length===0)return!1;const{db:o}=t.root,i=`pcb_autorouting_skipped_trace_length_violations_${e.subcircuit_id}`;if(!o.pcb_autorouting_error.list().some(s=\u003es.pcb_error_id===i)){const s=n[0],a=s.traceDisplayName??s.sourceTraceId,A=n.length-1,c=A\u003e0?` (${A} additional violation${A===1?\"\":\"s\"})`:\"\";o.pcb_autorouting_error.insert({pcb_error_id:i,error_type:\"pcb_autorouting_error\",subcircuit_id:e.subcircuit_id??void 0,message:`Autorouting was skipped because the ${s.maximumTraceLength}mm maximum length for ${a} cannot be satisfied: its endpoints are ${s.straightLineDistance.toFixed(2)}mm apart${c}.`})}return!0},M0e=t=\u003e({...t._getGlobalPcbPositionAfterLayout(),layers:t.getAvailablePcbLayers()}),wMt=(t,e)=\u003e{const n=W7(t);return Math.hypot(n.x-e.x,n.y-e.y)},b7o=(t,e)=\u003e{if(t.length\u003c2)return t;const n=t[0],o=t[t.length-1];return wMt(o,e)\u003cwMt(n,e)?B0e(t):t};function S7o(t){if(t.root?.pcbDisabled)return;const{db:e}=t.root,{_parsedProps:n,parent:o}=t,i=t.getSubcircuit(),r=t._getBoard(),s=r?.pcb_board_id?e.pcb_board.get(r.pcb_board_id):void 0;if(!o)throw new Error(\"Trace has no parent\");if(t.root?.pcbRoutingDisabled||i.getInheritedProperty(\"routingDisabled\")||i._isInflatedFromCircuitJson)return;const a=i._parsedProps.pcbRouteCache?.pcbTraces;if(a){if(i._isLegacyAutorouterDisabled())return;const Y=e.pcb_trace.insert({route:a.flatMap(W=\u003eW.route),source_trace_id:t.source_trace_id,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0});t.pcb_trace_id=Y.pcb_trace_id;return}if(n.pcbPath\u0026\u0026n.pcbPath.length\u003e0||n.pcbStraightLine||!i._shouldUseTraceByTraceRouting())return;let A,c,l;try{const Y=t._findConnectedPorts();A=Y.allPortsFound,c=Y.ports??[],l=Y.portsWithSelectors??[]}catch(Y){if(Y instanceof jN){e.source_trace_not_connected_error.insert({...Y.errorData,error_type:\"source_trace_not_connected_error\"}),t._couldNotFindPort=!0;return}throw Y}if(!A)return;const u=l.map(({selector:Y,port:W})=\u003eJwe(Y,W)).find(Boolean);if(u){e.pcb_trace_error.insert({error_type:\"pcb_trace_error\",source_trace_id:t.source_trace_id,message:u,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:c.map(Y=\u003eY.pcb_port_id).filter(Boolean)});return}const g=[];for(const Y of c)Y._hasMatchedPcbPrimitive()||g.push(Y);if(g.length\u003e0){e.pcb_trace_error.insert({error_type:\"pcb_trace_error\",source_trace_id:t.source_trace_id,message:`Some ports did not have a matching PCB primitive (e.g. a pad or plated hole), this can happen if a footprint is missing. As a result, ${t} wasn't routed. Missing ports: ${g.map(Y=\u003eY.getString()).join(\", \")}`,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:g.map(Y=\u003eY.pcb_port_id).filter(Boolean)});return}const h=jwe({component:t,subcircuit:i}),d=$we({component:t,subcircuit:i});if(h||d)return;const p=t._findConnectedNets().netsWithSelectors;if(c.length===0\u0026\u0026p.length===2){const[Y,W]=p.map(({net:ie})=\u003eie),te=Y.getAllConnectedPorts(),j=W.getAllConnectedPorts();if(te.length===0||j.length===0){console.log(\"Nothing to connect this net to, one of the nets is empty. TODO should emit a warning!\");return}let J=[te[0],j[0]],oe=1/0;for(const ie of te){const ne=dMt(ie,j),le=ie._getGlobalPcbPositionBeforeLayout(),ge=ne._getGlobalPcbPositionBeforeLayout(),_e=Math.sqrt((le.x-ge.x)**2+(le.y-ge.y)**2);_e\u003coe\u0026\u0026(oe=_e,J=[ie,ne])}c.push(...J)}else if(c.length===1\u0026\u0026p.length===1){const Y=c[0],te=p[0].net.getAllConnectedPorts().filter(J=\u003eJ!==Y);if(te.length===0){console.log(\"Nothing to connect this port to, the net is empty. TODO should emit a warning!\");return}const j=dMt(Y,te);c.push(j)}else if(c.length\u003e1\u0026\u0026p.length\u003e=1){t.renderError(\"Trace has more than one port and one or more nets, we don't currently support this type of complex trace routing\");return}const m=c.flatMap(Y=\u003eY.matchedComponents.filter(W=\u003eW.componentName===\"TraceHint\")),_=(t._parsedProps.pcbRouteHints??[]).concat(m.flatMap(Y=\u003eY.getPcbRouteHints()));if(c.length\u003e2){t.renderError(`Trace has more than two ports (${c.map(Y=\u003eY.getString()).join(\", \")}), routing between more than two ports for a single trace is not implemented`);return}if(t.getSubcircuit().selectAll(\"trace\").filter(Y=\u003eY.renderPhaseStates.PcbTraceRender.initialized).some(Y=\u003eY._portsRoutedOnPcb.length===c.length\u0026\u0026Y._portsRoutedOnPcb.every(W=\u003ec.includes(W))))return;let C=[];_.length===0?C=[M0e(c[0]),M0e(c[1])]:C=[M0e(c[0]),..._,M0e(c[1])];const y=b9o(C,{layerSelectionPreference:Owe(i._getSubcircuitLayerCount())}),x=Vf(t.root.db.toArray()),[E,B]=q9o(()=\u003e_Mt(t.root.db.toArray()));if(B){t.renderError({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",pcb_trace_error_id:t.pcb_trace_id,message:`Error getting obstacles for autorouting: ${B.message}`,source_trace_id:t.source_trace_id,center:{x:0,y:0},pcb_port_ids:c.map(Y=\u003eY.pcb_port_id),pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[]});return}for(const Y of E)if(Y.connectedTo.length\u003e0){const te=x.getNetConnectedToId(Y.connectedTo[0]);te\u0026\u0026Y.connectedTo.push(te)}let S=[];if(y.length===0)S=C;else{const Y=y[0].layer_path;S=C.map((W,te)=\u003eW.via?{...W,via_to_layer:Y[te]}:{...W,layers:[Y[te]]})}S[0].pcb_port_id=c[0].pcb_port_id,S[S.length-1].pcb_port_id=c[1].pcb_port_id;const Q=[];for(const[Y,W]of gMt(S)){const te=\"via_to_layer\"in Y?Y.via_to_layer:null,j=2,J=\"layers\"in Y\u0026\u0026Y.layers.length===1?Y.layers[0]:te??\"top\",oe=\"layers\"in W\u0026\u0026W.layers.length===1?W.layers[0]:te??\"top\",ie=\"pcb_port_id\"in Y?Y.pcb_port_id:null,ne=\"pcb_port_id\"in W?W.pcb_port_id:null,le=t._getExplicitTraceThickness()??t.getSubcircuit()._parsedProps.minTraceWidth??EB.min_trace_width,ge=new Vct({OBSTACLE_MARGIN:le*2,isRemovePathLoopsEnabled:!0,optimizeWithGoalBoxes:!!(ie\u0026\u0026ne),connMap:x,input:{obstacles:E,minTraceWidth:le,connections:[{name:t.source_trace_id,pointsToConnect:[{...Y,layer:J,pcb_port_id:ie},{...W,layer:oe,pcb_port_id:ne}]}],layerCount:t.getSubcircuit()._getSubcircuitLayerCount(),bounds:{minX:Math.min(Y.x,W.x)-j,maxX:Math.max(Y.x,W.x)+j,minY:Math.min(Y.y,W.y)-j,maxY:Math.max(Y.y,W.y)+j}}});let _e=null;try{_e=ge.solveAndMapToTraces()}catch(pe){t.renderError({type:\"pcb_trace_error\",pcb_trace_error_id:t.source_trace_id,error_type:\"pcb_trace_error\",message:`error solving route: ${pe.message}`,source_trace_id:t.pcb_trace_id,center:{x:(Y.x+W.x)/2,y:(Y.y+W.y)/2},pcb_port_ids:c.map(ye=\u003eye.pcb_port_id),pcb_trace_id:t.pcb_trace_id,pcb_component_ids:c.map(ye=\u003eye.pcb_component_id)})}if(!_e)return;if(_e.length===0){t.renderError({type:\"pcb_trace_error\",error_type:\"pcb_trace_error\",pcb_trace_error_id:t.pcb_trace_id,message:`Could not find a route for ${t}`,source_trace_id:t.source_trace_id,center:{x:(Y.x+W.x)/2,y:(Y.y+W.y)/2},pcb_port_ids:c.map(pe=\u003epe.pcb_port_id),pcb_trace_id:t.pcb_trace_id,pcb_component_ids:c.map(pe=\u003epe.pcb_component_id)});return}const[ue]=_e;ue.route=b7o(ue.route,Y),te\u0026\u0026(ue.route=ue.route.map(pe=\u003e(pe.route_type===\"wire\"\u0026\u0026!pe.layer\u0026\u0026(pe.layer=te),pe))),ie\u0026\u0026ue.route[0].route_type===\"wire\"\u0026\u0026(ue.route[0].start_pcb_port_id=ie);const fe=ue.route[ue.route.length-1];ne\u0026\u0026fe.route_type===\"wire\"\u0026\u0026(fe.end_pcb_port_id=ne),Q.push(ue.route)}const w=Q9o(Q),M=zwe(w),k=t.getInheritedMergedProperty(\"pcbStyle\"),{holeDiameter:R,padDiameter:F}=$N(k),O=e.pcb_trace.insert({route:Wwe(w),source_trace_id:t.source_trace_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id,trace_length:M}),U=t.subcircuit_connectivity_map_key??e.source_trace.get(t.source_trace_id)?.subcircuit_connectivity_map_key;t._portsRoutedOnPcb=c,t.pcb_trace_id=O.pcb_trace_id;for(const Y of w)if(Y.route_type===\"via\"){const W=Y,te=Y.from_layer,j=Y.to_layer;e.pcb_via.insert({pcb_trace_id:O.pcb_trace_id,x:Y.x,y:Y.y,hole_diameter:R,outer_diameter:F,layers:hMt({fromLayer:te,toLayer:j,layerCount:i._getSubcircuitLayerCount(),allowBlindAndBuriedVias:s?.allow_blind_and_buried_vias??!1,physicalLayers:W.layers}),from_layer:te,to_layer:j,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_connectivity_map_key:U})}t._insertErrorIfTraceIsOutsideBoard(w,c)}var D0e=t=\u003e{switch(t){case\"up\":return\"y+\";case\"down\":return\"y-\";case\"left\":return\"x-\";case\"right\":return\"x+\"}},qwe=({db:t,source_trace_id:e,schematic_sheet_id:n,sameNetOnly:o,differentNetOnly:i})=\u003e{!o\u0026\u0026!i\u0026\u0026(i=!0);const r=t.source_trace.get(e),s=[];for(const a of t.schematic_trace.list()){if(a.source_trace_id===e||n!==void 0\u0026\u0026a.schematic_sheet_id!==n)continue;const c=t.source_trace.get(a.source_trace_id)?.subcircuit_connectivity_map_key===r.subcircuit_connectivity_map_key;i\u0026\u0026c||o\u0026\u0026!c||s.push(a)}return s},Q7o=({edges:t,otherEdges:e})=\u003e{const n=[...t];for(let o=0;o\u003cn.length;o++){if(o\u003e2e3)throw new Error(\"Over 2000 iterations spent inside createSchematicTraceCrossingSegments, you have triggered an infinite loop, please report this!\");const i=n[o],r=Math.abs(i.from.x-i.to.x)\u003c.01?\"vertical\":i.from.y===i.to.y?\"horizontal\":\"not-orthogonal\";if(r===\"not-orthogonal\")continue;const s=[];for(const p of e){const m=p.from.x===p.to.x?\"vertical\":p.from.y===p.to.y?\"horizontal\":\"not-orthogonal\";if(m===\"not-orthogonal\"||r===m)continue;if(xxe([i.from,i.to],[p.from,p.to],{lineThickness:.01})){const f=r===\"vertical\"?i.from.x:p.from.x,I=r===\"vertical\"?p.from.y:i.from.y,C={x:f,y:I};s.push({otherEdge:p,crossingPoint:C,distanceFromEdgeFrom:ad(i.from,C)})}}if(s.length===0)continue;let a=s[0];for(const p of s)p.distanceFromEdgeFrom\u003ca.distanceFromEdgeFrom\u0026\u0026(a=p);const A=a.crossingPoint,c=.075;if(A.x===i.from.x\u0026\u0026A.y===i.from.y)continue;const l=Bxe(i.from,A),u={x:A.x-l.x*c/2,y:A.y-l.y*c/2},g={x:A.x+l.x*c/2,y:A.y+l.y*c/2},h=ad(g,i.to)\u003cc,d=[{from:i.from,to:u},{from:u,to:g,is_crossing:!0},{from:g,to:i.to}];n.splice(o,1,...d),o+=d.length-2,h\u0026\u0026o++}return n},Xwe=.001,dO=(t,e)=\u003e{const n=Math.min(e.from.x,e.to.x),o=Math.max(e.from.x,e.to.x),i=Math.min(e.from.y,e.to.y),r=Math.max(e.from.y,e.to.y);return t.x\u003e=n\u0026\u0026t.x\u003c=o\u0026\u0026t.y\u003e=i\u0026\u0026t.y\u003c=r},PMt=t=\u003e{const e=Math.abs(t.from.x-t.to.x)\u003cXwe,n=Math.abs(t.from.y-t.to.y)\u003cXwe;return e?\"vertical\":n?\"horizontal\":\"diagonal\"},v7o=(t,e)=\u003e{const n=PMt(t),o=PMt(e);if(n===o)return null;if(n===\"vertical\"\u0026\u0026o===\"horizontal\"||n===\"horizontal\"\u0026\u0026o===\"vertical\"){const u=n===\"vertical\"?t:e,g=n===\"horizontal\"?t:e,h=u.from.x,d=g.from.y,p={x:h,y:d};return dO(p,t)\u0026\u0026dO(p,e)?p:null}if(n===\"vertical\"||o===\"vertical\"){const u=n===\"vertical\"?t:e,g=n===\"vertical\"?e:t,h=u.from.x,d=(g.to.y-g.from.y)/(g.to.x-g.from.x),p=g.from.y-d*g.from.x,m=d*h+p,_={x:h,y:m};return dO(_,t)\u0026\u0026dO(_,e)?_:null}const i=(t.to.y-t.from.y)/(t.to.x-t.from.x),r=t.from.y-i*t.from.x,s=(e.to.y-e.from.y)/(e.to.x-e.from.x),a=e.from.y-s*e.from.x;if(Math.abs(i-s)\u003cXwe)return null;const A=(a-r)/(i-s),c=i*A+r,l={x:A,y:c};return dO(l,t)\u0026\u0026dO(l,e)?l:null},MMt=({edges:t,db:e,source_trace_id:n,schematic_sheet_id:o})=\u003e{const i=qwe({db:e,source_trace_id:n,schematic_sheet_id:o,sameNetOnly:!0}).flatMap(s=\u003es.edges),r=new Map;for(const s of t)for(const a of i){const A=v7o(s,a);if(A){const c=`${A.x.toFixed(6)},${A.y.toFixed(6)}`;r.has(c)||r.set(c,A)}}return Array.from(r.values())};function DMt(t){const e=t%360;return e\u003c0?e+360:e}function w7o(t,e,n,o){return o===\"counterclockwise\"?n\u003e=e?t\u003e=e\u0026\u0026t\u003c=n:t\u003e=e||t\u003c=n:n\u003c=e?t\u003c=e\u0026\u0026t\u003e=n:t\u003c=e||t\u003e=n}function P7o(t){const e=t.center,n=t.radius,o=t.start_angle_degrees,i=t.end_angle_degrees,r=t.direction??\"counterclockwise\";if(!e||typeof e.x!=\"number\"||typeof e.y!=\"number\"||typeof n!=\"number\"||typeof o!=\"number\"||typeof i!=\"number\")return null;const s=DMt(o),a=DMt(i),A=new Set([s,a]),c=[0,90,180,270];for(const d of c)w7o(d,s,a,r)\u0026\u0026A.add(d);let l=1/0,u=1/0,g=-1/0,h=-1/0;for(const d of A){const p=d*Math.PI/180,m=e.x+n*Math.cos(p),_=e.y+n*Math.sin(p);l=Math.min(l,m),g=Math.max(g,m),u=Math.min(u,_),h=Math.max(h,_)}return!Number.isFinite(l)||!Number.isFinite(u)?null:{minX:l,maxX:g,minY:u,maxY:h}}function Gj(t){let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t){let s,a,A,c;if(r.type===\"schematic_component\")s=r.center?.x,a=r.center?.y,A=r.size?.width,c=r.size?.height;else if(r.type===\"schematic_box\")s=r.x,a=r.y,A=r.width,c=r.height;else if(r.type===\"schematic_port\")s=r.center?.x,a=r.center?.y,A=.2,c=.2;else if(r.type===\"schematic_text\")s=r.position?.x,a=r.position?.y,A=(r.text?.length??0)*.1,c=.2;else if(r.type===\"schematic_line\"){const l=r.x1??0,u=r.y1??0,g=r.x2??0,h=r.y2??0;s=(l+g)/2,a=(u+h)/2,A=Math.abs(g-l),c=Math.abs(h-u)}else if(r.type===\"schematic_rect\")s=r.center?.x,a=r.center?.y,A=r.width,c=r.height;else if(r.type===\"schematic_circle\"){s=r.center?.x,a=r.center?.y;const l=r.radius;typeof l==\"number\"\u0026\u0026(A=l*2,c=l*2)}else if(r.type===\"schematic_arc\"){const l=P7o(r);l\u0026\u0026(e=Math.min(e,l.minX),o=Math.max(o,l.maxX),n=Math.min(n,l.minY),i=Math.max(i,l.maxY));continue}else if(r.type===\"schematic_path\"){const l=r.points;if(Array.isArray(l))for(const u of l)typeof u.x==\"number\"\u0026\u0026typeof u.y==\"number\"\u0026\u0026(e=Math.min(e,u.x),o=Math.max(o,u.x),n=Math.min(n,u.y),i=Math.max(i,u.y));continue}typeof s==\"number\"\u0026\u0026typeof a==\"number\"\u0026\u0026typeof A==\"number\"\u0026\u0026typeof c==\"number\"\u0026\u0026(e=Math.min(e,s-A/2),o=Math.max(o,s+A/2),n=Math.min(n,a-c/2),i=Math.max(i,a+c/2))}return{minX:e,maxX:o,minY:n,maxY:i}}function M7o(t,e={}){const{minX:n,maxX:o,minY:i,maxY:r}=t,s=e.padding??1;if(!isFinite(n)||!isFinite(o)||!isFinite(i)||!isFinite(r))return[];const a=n-s,A=o+s,c=r+s,l=i-s,u=.01;return[{type:\"rect\",layers:[\"top\"],center:{x:(a+A)/2,y:c},width:A-a,height:u,connectedTo:[]},{type:\"rect\",layers:[\"top\"],center:{x:(a+A)/2,y:l},width:A-a,height:u,connectedTo:[]},{type:\"rect\",layers:[\"top\"],center:{x:a,y:(c+l)/2},width:u,height:c-l,connectedTo:[]},{type:\"rect\",layers:[\"top\"],center:{x:A,y:(c+l)/2},width:u,height:c-l,connectedTo:[]}]}var D7o=t=\u003e{const e=t.root.db,n=t._findConnectedPorts().ports??[],o=new Set(n.map(s=\u003es.schematic_port_id)),i=[];for(const s of e.toArray()){if(s.type===\"schematic_component\"){const a=!!s.symbol_name,A=s.size.width\u003es.size.height?\"horz\":\"vert\";i.push({type:\"rect\",layers:[\"top\"],center:s.center,width:s.size.width+(a\u0026\u0026A===\"horz\"?-.5:0),height:s.size.height+(a\u0026\u0026A===\"vert\"?-.5:0),connectedTo:[]})}if(s.type===\"schematic_port\"){if(o.has(s.schematic_port_id))continue;const a=s.facing_direction?Jk(s.facing_direction):{x:0,y:0};i.push({type:\"rect\",layers:[\"top\"],center:{x:s.center.x-a.x*.1,y:s.center.y-a.y*.1},width:.1+Math.abs(a.x)*.3,height:.1+Math.abs(a.y)*.3,connectedTo:[]})}s.type===\"schematic_text\"\u0026\u0026i.push({type:\"rect\",layers:[\"top\"],center:s.position,width:(s.text?.length??0)*.1,height:.2,connectedTo:[]}),s.type===\"schematic_box\"\u0026\u0026i.push({type:\"rect\",layers:[\"top\"],center:{x:s.x,y:s.y},width:s.width,height:s.height,connectedTo:[]})}const r=Gj(e.toArray());return i.push(...M7o(r,{padding:1})),i},N7o=({edges:t,db:e,source_trace_id:n,schematic_sheet_id:o})=\u003e{const i=qwe({db:e,source_trace_id:n,schematic_sheet_id:o,differentNetOnly:!0}).flatMap(s=\u003es.edges),r=s=\u003e{const{from:a,to:A}=s;return a.x===A.x?\"vertical\":\"horizontal\"};for(const s of t){const a=r(s),A=()=\u003ei.find(l=\u003er(l)===a\u0026\u0026xxe([s.from,s.to],[l.from,l.to],{lineThickness:.05}));let c=A();for(;c;)a===\"horizontal\"?(s.from.y+=.1,s.to.y+=.1):(s.from.x+=.1,s.to.x+=.1),c=A()}},R7o=t=\u003e{if(t.root?._featureMspSchematicTraceRouting||t._couldNotFindPort||t.root?.schematicDisabled||t.getCollapsedSchematicBoxAncestor())return;const{db:e}=t.root,{_parsedProps:n,parent:o}=t,i=t._getSchematicNetLabelText(),r=t._resolveSchematicSheetId();if(!o)throw new Error(\"Trace has no parent\");let s,a;try{const Y=t._findConnectedPorts();s=Y.allPortsFound,a=Y.portsWithSelectors??[]}catch(Y){if(Y instanceof jN){e.source_trace_not_connected_error.insert({...Y.errorData,error_type:\"source_trace_not_connected_error\"});return}throw Y}const{netsWithSelectors:A}=t._findConnectedNets();if(!s)return;const c=Y=\u003e{if(r\u0026\u0026Y.source_port_id){const W=e.schematic_port.getWhere({source_port_id:Y.source_port_id,schematic_sheet_id:r});if(W)return W}if(Y.schematic_port_id)return e.schematic_port.get(Y.schematic_port_id)??null;if(!r\u0026\u0026Y.source_port_id){const W=e.schematic_port.list({source_port_id:Y.source_port_id}).filter(te=\u003e!te.schematic_sheet_id);if(W.length===1)return W[0]}return null},l=a.flatMap(({port:Y})=\u003e{const W=c(Y);return W?[{port:Y,position:W.center,schematic_port_id:W.schematic_port_id,facingDirection:W.facing_direction??null}]:[]}),u=l.map(({schematic_port_id:Y})=\u003eY).sort(),g=l.some(({port:Y,schematic_port_id:W})=\u003eY.schematic_port_id!==W),h=u.join(\",\"),d=t.root?._getBoard();if(d?._connectedSchematicPortPairs\u0026\u0026d._connectedSchematicPortPairs.has(h))return;const p={name:t.source_trace_id,pointsToConnect:[]},m=D7o(t);if(l.length===1\u0026\u0026A.length===1){const Y=A[0].net,{port:W,position:te}=l[0];let j=t.getSubcircuit().selectAll(\"netlabel\").find(oe=\u003e{const ie=oe._parsedProps.connection??oe._parsedProps.connectsTo;return ie?Array.isArray(ie)?ie.some(le=\u003et.getSubcircuit().selectOne(le,{port:!0})===W):t.getSubcircuit().selectOne(ie,{port:!0})===W:!1});if(!j){const oe=e.schematic_net_label.getWhere({source_trace_id:t.source_trace_id});oe\u0026\u0026(j=oe)}if(j){const oe=\"_getGlobalSchematicPositionBeforeLayout\"in j?j._getGlobalSchematicPositionBeforeLayout():j.anchor_position,ie=[];te.x===oe.x||te.y===oe.y?ie.push({from:te,to:oe}):(ie.push({from:te,to:{x:oe.x,y:te.y}}),ie.push({from:{x:oe.x,y:te.y},to:oe}));const ne=MMt({edges:ie,db:e,source_trace_id:t.source_trace_id,schematic_sheet_id:r}),le=e.schematic_trace.insert({source_trace_id:t.source_trace_id,edges:ie,junctions:ne,subcircuit_connectivity_map_key:t.subcircuit_connectivity_map_key??void 0,schematic_sheet_id:r});t.schematic_trace_id=le.schematic_trace_id;return}if(i){const oe=gO(W.facingDirection)??\"bottom\";e.schematic_net_label.insert({text:i,source_net_id:Y.source_net_id,anchor_position:te,center:j7({anchor_position:te,anchor_side:oe,text:i}),anchor_side:oe,schematic_sheet_id:t._resolveSchematicSheetId()});return}const J=gO(W.facingDirection)??\"bottom\";e.schematic_net_label.insert({text:Y._parsedProps.name,source_net_id:Y.source_net_id,anchor_position:te,center:j7({anchor_position:te,anchor_side:J,text:Y._parsedProps.name}),anchor_side:J,schematic_sheet_id:t._resolveSchematicSheetId()});return}if(i\u0026\u0026!g\u0026\u0026(\"from\"in t.props\u0026\u0026\"to\"in t.props||\"path\"in t.props)){t._doInitialSchematicTraceRenderWithDisplayLabel();return}if(l.length\u003c2)return;let I=(()=\u003e{const Y=[];for(let te=0;te\u003cl.length-1;te++){const j=l[te],J=l[te+1],oe=wF({x:j.position.x,y:j.position.y,facingDirection:D0e(j.facingDirection)},{x:J.position.x,y:J.position.y,facingDirection:D0e(J.facingDirection)});for(let ie=0;ie\u003coe.length-1;ie++)Y.push({from:oe[ie],to:oe[ie+1]})}const W=(te,j)=\u003e{const J=j.width/2,oe=j.height/2,ie=j.center.x-J,ne=j.center.x+J,le=j.center.y-oe,ge=j.center.y+oe,_e=fe=\u003efe.x\u003e=ie\u0026\u0026fe.x\u003c=ne\u0026\u0026fe.y\u003e=le\u0026\u0026fe.y\u003c=ge;return _e(te.from)||_e(te.to)?!0:[[{x:ie,y:le},{x:ne,y:le}],[{x:ne,y:le},{x:ne,y:ge}],[{x:ne,y:ge},{x:ie,y:ge}],[{x:ie,y:ge},{x:ie,y:le}]].some(fe=\u003exxe([te.from,te.to],fe,{lineThickness:0}))};for(const te of Y)for(const j of m)if(W(te,j))return null;return Y})();I\u0026\u0026I.length===0\u0026\u0026(I=null),p.pointsToConnect=l.map(({position:Y})=\u003e({...Y,layer:\"top\"}));const C=E9o(m),y=2,x={minTraceWidth:.1,obstacles:m,connections:[p],bounds:{minX:C.minX-y,maxX:C.maxX+y,minY:C.minY-y,maxY:C.maxY+y},layerCount:1};let E=Vct,B=!1;if(t.getSubcircuit().props._schDirectLineRoutingEnabled\u0026\u0026(E=XPt,B=!0),!I){let W=new E({input:x,MAX_ITERATIONS:100,OBSTACLE_MARGIN:.1,isRemovePathLoopsEnabled:!0,isShortenPathWithShortcutsEnabled:!0,marginsWithCosts:[{margin:1,enterCost:0,travelCostFactor:1},{margin:.3,enterCost:0,travelCostFactor:1},{margin:.2,enterCost:0,travelCostFactor:2},{margin:.1,enterCost:0,travelCostFactor:3}]}).solveAndMapToTraces();if(W.length===0){if(!g\u0026\u0026(t._isSymbolToChipConnection()||t._isSymbolToSymbolConnection()||t._isChipToChipConnection())){t._doInitialSchematicTraceRenderWithDisplayLabel();return}W=new XPt({input:x}).solveAndMapToTraces(),B=!0}const[{route:te}]=W;I=[];const j=te.filter(J=\u003eJ.route_type===\"wire\"||J.route_type===\"via\");for(let J=0;J\u003cj.length-1;J++)I.push({from:j[J],to:j[J+1]})}const S=t.source_trace_id;let Q=[];if(!B){N7o({edges:I,db:e,source_trace_id:S,schematic_sheet_id:r});const Y=qwe({db:e,source_trace_id:S,schematic_sheet_id:r,differentNetOnly:!0}).flatMap(W=\u003eW.edges);I=Q7o({edges:I,otherEdges:Y}),Q=MMt({edges:I,db:e,source_trace_id:t.source_trace_id,schematic_sheet_id:r})}if(!I||I.length===0)return;const w=I[I.length-1],M=l[l.length-1],k=ZPt(w);I.push(...Ywe({lastEdge:w,lastEdgePort:M,lastDominantDirection:k}));const R=I[0],F=l[0],O=ZPt(R);if(I.unshift(...Ywe({firstEdge:R,firstEdgePort:F,firstDominantDirection:O})),!t.source_trace_id)throw new Error(\"Missing source_trace_id for schematic trace insertion.\");if(!g\u0026\u0026t.getSubcircuit()._parsedProps.schTraceAutoLabelEnabled\u0026\u0026$9o(Q,I)\u003e=5\u0026\u0026(t._isSymbolToChipConnection()||t._isSymbolToSymbolConnection()||t._isChipToChipConnection())){t._doInitialSchematicTraceRenderWithDisplayLabel();return}const U=e.schematic_trace.insert({source_trace_id:t.source_trace_id,edges:I,junctions:Q,subcircuit_connectivity_map_key:t.subcircuit_connectivity_map_key??void 0,schematic_sheet_id:r});t.schematic_trace_id=U.schematic_trace_id;for(const{schematic_port_id:Y}of l)e.schematic_port.update(Y,{is_connected:!0});d?._connectedSchematicPortPairs\u0026\u0026d._connectedSchematicPortPairs.add(h)},T7o=(t,{db:e})=\u003e{const n=t.map(o=\u003e{const i=e.source_port.get(o.source_port_id);if(!i?.source_component_id)return null;const r=e.source_component.get(i.source_component_id);return r?.ftype===\"simple_capacitor\"?r.max_decoupling_trace_length:null}).filter(o=\u003etypeof o==\"number\");if(n.length!==0)return Math.min(...n)};function k7o({ports:t,nets:e}){if(t.length\u003e=2)return`${t[0]?.selector} to ${t[1]?.selector}`;if(t.length===1\u0026\u0026e.length===1)return`${t[0]?.selector} to net.${e[0]._parsedProps.name}`}function F7o(t){const e=new Set;for(const{port:n}of t){if(!(n.parent instanceof BMt))continue;const o=n.parent._getConnectedNetOrTrace();o instanceof Qb\u0026\u0026e.add(o)}return[...e]}var t1=class extends Ir{source_trace_id=null;pcb_trace_id=null;schematic_trace_id=null;_inflatedPcbTraces;_inflatedPcbVias;_portsRoutedOnPcb;subcircuit_connectivity_map_key=null;_exposesSubcircuitConnection=!1;_traceConnectionHash=null;_couldNotFindPort;constructor(t){super(t),this._portsRoutedOnPcb=[]}_getExplicitTraceThickness(){return this._parsedProps.thickness??this._parsedProps.width}_getSchematicNetLabelText(){return this._parsedProps.schDisplayLabel??this._parsedProps.displayName??this._parsedProps.name}get config(){return{zodProps:vPn,componentName:\"Trace\"}}_getTracePortOrNetSelectorListFromProps(){return\"from\"in this.props\u0026\u0026\"to\"in this.props?[typeof this.props.from==\"string\"?this.props.from:this.props.from.getPortSelector(),typeof this.props.to==\"string\"?this.props.to:this.props.to.getPortSelector()]:\"path\"in this.props?this.props.path.map(t=\u003etypeof t==\"string\"?t:t.getPortSelector()):[]}getTracePortPathSelectors(){return this._getTracePortOrNetSelectorListFromProps().filter(t=\u003e!t.includes(\"net.\"))}getTracePathNetSelectors(){return this._getTracePortOrNetSelectorListFromProps().filter(t=\u003et.includes(\"net.\"))}_findConnectedPorts(){return _7o(this)}_resolveNet(t){const e=this.getSubcircuit().selectOne(t,{type:\"net\"});if(e)return e;const n=t.match(/^net\\.(.+)$/),o=n?n[1]:null;if(!o)return null;const i=this.root?._getBoard();return i?i.getDescendants().find(s=\u003es.componentName===\"Net\"\u0026\u0026s._parsedProps.name===o)||null:(this.renderError(`Could not find a \u003cboard\u003e ancestor for ${this}, so net \"${t}\" cannot be resolved`),null)}_findConnectedNets(){const t=this.getTracePathNetSelectors().map(n=\u003e({selector:n,net:this._resolveNet(n)})),e=t.filter(n=\u003e!n.net);return e.length\u003e0\u0026\u0026this.renderError(`Could not find net for selector \"${e[0].selector}\" inside ${this}`),{netsWithSelectors:t,nets:t.map(n=\u003en.net)}}_getAllTracesConnectedToSameNet(){const t=this.getSubcircuit().selectAll(\"trace\"),e=this._findConnectedNets().nets,n=this._findConnectedPorts().ports??[];return t.filter(o=\u003e{if(o===this)return!1;const i=o._findConnectedNets().nets,r=o._findConnectedPorts().ports??[];return i.some(s=\u003ee.includes(s))||r.some(s=\u003en.includes(s))})}_isExplicitlyConnectedToPort(t){const{allPortsFound:e,portsWithSelectors:n}=this._findConnectedPorts();return e?n.map(i=\u003ei.port).includes(t):!1}_isExplicitlyConnectedToNet(t){return this._findConnectedNets().nets.includes(t)}doInitialCreateNetsFromProps(){Hj(this,this.getTracePathNetSelectors())}_computeTraceConnectionHash(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();return!t||!e?null:[...e].sort((i,r)=\u003e(i.pcb_port_id||\"\").localeCompare(r.pcb_port_id||\"\")).map(i=\u003ei.pcb_port_id).join(\",\")}doInitialSourceTraceRender(){const{db:t}=this.root,{_parsedProps:e,parent:n}=this;if(!n){this.renderError(\"Trace has no parent\");return}let o,i;try{const l=this._findConnectedPorts();o=l.allPortsFound,i=l.portsWithSelectors??[]}catch(l){if(l instanceof jN){t.source_trace_not_connected_error.insert({...l.errorData,error_type:\"source_trace_not_connected_error\"}),this._couldNotFindPort=!0;return}throw l}if(!o)return;this._traceConnectionHash=this._computeTraceConnectionHash();const s=t.source_trace.list().find(l=\u003el.subcircuit_connectivity_map_key===this.subcircuit_connectivity_map_key\u0026\u0026[...l.connected_source_port_ids].sort().join(\",\")===this._traceConnectionHash);if(s){this.source_trace_id=s.source_trace_id;return}const a=this._findConnectedNets().nets;for(const l of F7o(i))a.includes(l)||a.push(l);const A=k7o({ports:i,nets:a}),c=t.source_trace.insert({connected_source_port_ids:i.map(l=\u003el.port.source_port_id),connected_source_net_ids:a.map(l=\u003el.source_net_id),subcircuit_id:this.getSubcircuit()?.subcircuit_id,name:e.name,max_length:e.maxLength??T7o(i.map(l=\u003el.port),{db:t}),max_via_count:e.maxViaCount,display_name:e.displayName??A,min_trace_thickness:this._getExplicitTraceThickness()});this.source_trace_id=c.source_trace_id,!e.name\u0026\u0026a.length===0\u0026\u0026t.source_unnamed_trace_warning.insert({message:`${this.getString()} is missing a name. Add a name prop to make the trace easier to identify.`,source_trace_id:c.source_trace_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,warning_type:\"source_unnamed_trace_warning\"})}_insertErrorIfTraceIsOutsideBoard(t,e){const{db:n}=this.root,o=this._getBoard();if(!o)return;const i=o.pcb_board_id;if(!i)return;K9o({mergedRoute:t,db:n,pcbBoardId:i})\u0026\u0026n.pcb_trace_error.insert({error_type:\"pcb_trace_error\",source_trace_id:this.source_trace_id,message:`Trace ${this.getString()} routed outside the board boundaries.`,pcb_trace_id:this.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:e.map(s=\u003es.pcb_port_id)})}doInitialPcbManualTraceRender(){C7o(this)}doInitialPcbTraceRender(){S7o(this)}_doInitialSchematicTraceRenderWithDisplayLabel(){m7o(this)}_isSymbolToChipConnection(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();if(!t||e.length!==2)return!1;const[n,o]=e;if(!n?.parent||!o?.parent)return!1;const i=n.parent.config.shouldRenderAsSchematicBox,r=o.parent.config.shouldRenderAsSchematicBox;return i\u0026\u0026!r||!i\u0026\u0026r}_isSymbolToSymbolConnection(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();if(!t||e.length!==2)return!1;const[n,o]=e;if(!n?.parent||!o?.parent)return!1;const i=!n.parent.config.shouldRenderAsSchematicBox,r=!o.parent.config.shouldRenderAsSchematicBox;return i\u0026\u0026r}_isChipToChipConnection(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();if(!t||e.length!==2)return!1;const[n,o]=e;if(!n?.parent||!o?.parent)return!1;const i=n.parent.config.shouldRenderAsSchematicBox,r=o.parent.config.shouldRenderAsSchematicBox;return i\u0026\u0026r}doInitialSchematicTraceRender(){R7o(this)}},N0e={},NMt=t=\u003e{const e=Object.fromEntries(Object.entries(t).map(([n,o])=\u003e[n.toLowerCase(),o]));Object.assign(N0e,t),Object.assign(N0e,e)},L7o=class extends Ir{constructor(t,e){super(t);const n=(o,i)=\u003e{if(typeof o==\"number\")return o;if(typeof o==\"string\")try{return this._resolvePcbCoordinate(o,i,{allowBoardVariables:!1})}catch{return 0}return 0};this._parsedProps={...t,error:e,type:t.type||\"unknown\",component_name:t.name,error_type:\"source_failed_to_create_component_error\",message:e instanceof Error?e.message:String(e),pcbX:n(t.pcbX,\"pcbX\"),pcbY:n(t.pcbY,\"pcbY\"),schX:t.schX,schY:t.schY}}formatErrorDetails(){const t=this._parsedProps.selector??this._parsedProps.selectors??this._parsedProps.in??this._parsedProps.within,e=t===void 0?void 0:typeof t==\"string\"?t:this.safeStringify(t),n=this.safeStringify(this._parsedProps);return{selectorText:e,propsText:n}}safeStringify(t){const e=new WeakSet,n=JSON.stringify(t,(o,i)=\u003e{if(typeof i==\"bigint\")return i.toString();if(typeof i==\"function\")return`[Function ${i.name||\"anonymous\"}]`;if(typeof i==\"symbol\")return i.toString();if(typeof i==\"object\"\u0026\u0026i!==null){if(e.has(i))return\"[Circular]\";e.add(i)}return i},2);return n?n.length\u003e2e3?`${n.slice(0,2e3)}…`:n:\"undefined\"}get config(){return{componentName:\"ErrorPlaceholder\",zodProps:Pt({}).passthrough()}}doInitialSourceRender(){if(this.root?.db){const t=this._getGlobalPcbPositionBeforeLayout(),e=this._getGlobalSchematicPositionBeforeLayout(),{selectorText:n,propsText:o}=this.formatErrorDetails(),i=[n?`Within selector: ${n}`:null,`Props: ${o}`].filter(Boolean).join(\" \"),r=`Could not create ${this._parsedProps.componentType??\"component\"}${this._parsedProps.name?` \"${this._parsedProps.name}\"`:\"\"}. ${this._parsedProps.error?.formattedError?._errors?.join(\"; \")||this._parsedProps.message}`;this.root.db.source_failed_to_create_component_error.insert({component_name:this._parsedProps.component_name,error_type:\"source_failed_to_create_component_error\",message:`${r}${i?` Details: ${i}`:\"\"}`,pcb_center:t,schematic_center:e})}}};function H7o(t,e){return new L7o(t,e)}function O7o(t,e){const n=t;return n.__tsci={...e},t}var G7o={supportsMutation:!0,createInstance(t,e){const n=N0e[t];if(!n)throw Object.keys(N0e).length===0?new Error(\"No components registered in catalogue, did you forget to import lib/register-catalogue in your test file?\"):new Error(`Unsupported component type \"${t}\". No element with this name is registered in the @tscircuit/core catalogue. Check for typos or see https://docs.tscircuit.com/category/built-in-elements for a list of valid components. To add your own component, see docs/CREATING_NEW_COMPONENTS.md`);try{return O7o(new n(e),{})}catch(o){return H7o({...e,componentType:t},o)}},createTextInstance(t){return{__text:t}},appendInitialChild(t,e){t.add(e)},appendChild(t,e){t.add(e)},appendChildToContainer(t,e){t.add(e)},finalizeInitialChildren(){return!1},prepareUpdate(){return null},shouldSetTextContent(){return!1},getRootHostContext(){return{}},getChildHostContext(){return{}},prepareForCommit(){return null},resetAfterCommit(){},commitMount(){},commitUpdate(){},removeChild(){},clearContainer(){},supportsPersistence:!1,getPublicInstance(t){return t},preparePortalMount(t){throw new Error(\"Function not implemented.\")},scheduleTimeout(t,e){throw new Error(\"Function not implemented.\")},cancelTimeout(t){throw new Error(\"Function not implemented.\")},noTimeout:void 0,isPrimaryRenderer:!1,getInstanceFromNode(t){throw new Error(\"Function not implemented.\")},beforeActiveInstanceBlur(){throw new Error(\"Function not implemented.\")},afterActiveInstanceBlur(){throw new Error(\"Function not implemented.\")},prepareScopeUpdate:(t,e)=\u003e{throw new Error(\"Function not implemented.\")},getInstanceFromScope:t=\u003e{throw new Error(\"Function not implemented.\")},detachDeletedInstance:t=\u003e{throw new Error(\"Function not implemented.\")},getCurrentEventPriority:()=\u003eXBe.DefaultEventPriority,getCurrentUpdatePriority:()=\u003eXBe.DefaultEventPriority,resolveUpdatePriority:()=\u003eXBe.DefaultEventPriority,setCurrentUpdatePriority:()=\u003e{},maySuspendCommit:()=\u003e!1,supportsHydration:!1},R0e=aJn(G7o),RMt=t=\u003e{const e={children:[],props:{name:\"$root\"},add(r){r.parent=this,this.children.push(r)},computePcbGlobalTransform(){return hC()}},n=[],o=R0e.createContainer(e,0,null,!1,null,\"tsci\",r=\u003e{console.log(\"Error in createContainer\"),console.error(r),n.push(r)},null);if(R0e.updateContainerSync(t,o,null,()=\u003e{}),R0e.flushSyncWork(),n.length\u003e0)throw n[0];const i=R0e.getPublicRootInstance(o);return i||e.children[0]},Y7o=/^(?:pin)?(\\d+)$/,uw=t=\u003e{const e=t.match(Y7o);return e?Number.parseInt(e[1],10):null};function U7o(t){if(!t)return{validPinLabels:t,invalidPinLabelsMessages:[]};const e={},n=[];for(const[o,i]of Object.entries(t)){const r=Array.isArray(i)?i.slice():[i],s=[];for(const a of r)if(K7o(o,a))s.push(a);else{const A=TMt(a),c=A?` Try using \"${A}\" instead.`:\"\";n.push(`Invalid pin label: ${o} = '${a}' - excluding from component. Pin labels can only contain letters, numbers and underscores.${c}`)}s.length\u003e0\u0026\u0026(e[o]=Array.isArray(i)?s:s[0])}return{validPinLabels:Object.keys(e).length\u003e0?e:void 0,invalidPinLabelsMessages:n}}function K7o(t,e){return/^[A-Za-z0-9_]+$/.test(e)}function TMt(t){const e=t.match(/^\\+?(\\d+)\\.(\\d+)V(_\\d+)?$/i);if(e)return`V${e[1]}_${e[2]}${e[3]??\"\"}`;const n=t.match(/^\\+?(\\d+)V(\\d+)(_\\d+)?$/i);if(n)return`V${n[1]}_${n[2]}${n[3]??\"\"}`;const o=t.match(/^\\+?(\\d+)V(_\\d+)?$/i);if(o)return`V${o[1]}${o[2]??\"\"}`}var kMt=t=\u003e{const e=TMt(t),n=e?` Try using \"${e}\" instead.`:\"\";return`No pin labels provided and pin number or label is not a number: \"${t}\".${n}`},hO=(t,e)=\u003e{if(typeof t==\"number\")return t;const n=uw(t);if(n!==null)return n;if(t.startsWith(\"pin\"))throw new Error(`Invalid pinLabels key \"${t}\". Expected \"pin\\${number}\" (e.g. pin1, pin2).`);if(!e)throw new Error(kMt(t));for(const o in e)if((Array.isArray(e[o])?e[o]:[e[o]]).includes(t)){const r=uw(o);if(r===null)throw new Error(`Invalid pinLabels key \"${o}\". Expected \"pin\\${number}\" (e.g. pin1, pin2).`);return r}throw new Error(kMt(t))},Zwe=(t,e)=\u003e{if(!t)return;const n={},o={};for(const[i,r]of Object.entries(t)){const s=hO(i,e);o[s]={...o[s],...r}}for(const[i,r]of Object.entries(o)){const s=`pin${i}`;n[s]={bottom_margin:r.bottomMargin,left_margin:r.leftMargin,right_margin:r.rightMargin,top_margin:r.topMargin}}return n},ePe=t=\u003e{if(t){if(\"leftSide\"in t||\"rightSide\"in t||\"topSide\"in t||\"bottomSide\"in t)return{left_side:t.leftSide,right_side:t.rightSide,top_side:t.topSide,bottom_side:t.bottomSide};if(\"leftPinCount\"in t||\"rightPinCount\"in t||\"topPinCount\"in t||\"bottomPinCount\"in t)return{left_size:t.leftPinCount,right_size:t.rightPinCount,top_size:t.topPinCount,bottom_size:t.bottomPinCount};if(\"leftSize\"in t||\"rightSize\"in t||\"topSize\"in t||\"bottomSize\"in t)return{left_size:t.leftSize,right_size:t.rightSize,top_size:t.topSize,bottom_size:t.bottomSize}}};function Yj(t){return t.replace(/\\\\n/g,`\n`)}var FMt=class extends Ir{isPcbPrimitive=!0;pcb_copper_text_id=null;get config(){return{componentName:\"CopperText\",zodProps:hDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getPrimitiveContainer(),o=this._getGlobalPcbPositionBeforeLayout(),i=this.getSubcircuit(),r=t.pcb_copper_text.insert({anchor_alignment:e.anchorAlignment,anchor_position:{x:o.x,y:o.y},font:\"tscircuit2024\",font_size:e.fontSize,layer:e.layer??\"top\",text:Yj(e.text),ccw_rotation:e.pcbRotation,is_mirrored:e.mirrored,is_knockout:e.knockout,pcb_component_id:n.pcb_component_id,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_copper_text_id=r.pcb_copper_text_id}getPcbSize(){const{_parsedProps:t}=this,e=t.fontSize??1,o=(t.text??\"\").length*e,i=e;return{width:o*e,height:i*e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_copper_text_id)return;const o=n.pcb_copper_text.get(this.pcb_copper_text_id);o\u0026\u0026n.pcb_copper_text.update(this.pcb_copper_text_id,{anchor_position:{x:o.anchor_position.x+t,y:o.anchor_position.y+e}})}},LMt=class extends Ir{pcb_courtyard_circle_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"CourtyardCircle\",zodProps:NMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(e.layer??\"top\");if(i!==\"top\"\u0026\u0026i!==\"bottom\")throw new Error(`Invalid layer \"${i}\" for CourtyardCircle. Must be \"top\" or \"bottom\".`);const r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_courtyard_circle.insert({pcb_component_id:s,layer:i,center:{x:n.x,y:n.y},radius:e.radius,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_courtyard_circle_id=a.pcb_courtyard_circle_id}getPcbSize(){const{_parsedProps:t}=this,e=t.radius*2;return{width:e,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_courtyard_circle_id)return;const o=n.pcb_courtyard_circle.get(this.pcb_courtyard_circle_id);o\u0026\u0026n.pcb_courtyard_circle.update(this.pcb_courtyard_circle_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},HMt=class extends Ir{pcb_courtyard_outline_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"CourtyardOutline\",zodProps:DMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??\"top\");if(o!==\"top\"\u0026\u0026o!==\"bottom\")throw new Error(`Invalid layer \"${o}\" for CourtyardOutline. Must be \"top\" or \"bottom\".`);const i=this._computePcbGlobalTransformBeforeLayout(),r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_courtyard_outline.insert({pcb_component_id:s,layer:o,outline:e.outline.map(A=\u003e{const c=ts(i,{x:A.x,y:A.y});return{x:c.x,y:c.y}}),subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_courtyard_outline_id=a.pcb_courtyard_outline_id}_setPositionFromLayout(t){const{db:e}=this.root,n=e.pcb_courtyard_outline.get(this.pcb_courtyard_outline_id);if(!n)return;let o=0,i=0;for(const A of n.outline)o+=A.x,i+=A.y;o/=n.outline.length,i/=n.outline.length;const r=t.x-o,s=t.y-i,a=n.outline.map(A=\u003e({x:A.x+r,y:A.y+s}));e.pcb_courtyard_outline.update(this.pcb_courtyard_outline_id,{outline:a})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_courtyard_outline_id)return;const o=n.pcb_courtyard_outline.get(this.pcb_courtyard_outline_id);o\u0026\u0026n.pcb_courtyard_outline.update(this.pcb_courtyard_outline_id,{outline:o.outline.map(i=\u003e({x:i.x+t,y:i.y+e}))})}getPcbSize(){const{_parsedProps:t}=this;if(!t.outline||t.outline.length===0)return{width:0,height:0};const e=Oh(t.outline);return e?{width:e.maxX-e.minX,height:e.maxY-e.minY}:{width:0,height:0}}},OMt=class extends Ir{pcb_courtyard_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"CourtyardRect\",zodProps:MMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o,isFlipped:i}=this._getPcbPrimitiveFlippedHelpers(),r=o(e.layer??\"top\");if(r!==\"top\"\u0026\u0026r!==\"bottom\")throw new Error(`Invalid layer \"${r}\" for CourtyardRect. Must be \"top\" or \"bottom\".`);const s=this.getSubcircuit(),a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id;let l=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360;i\u0026\u0026(l=(180-l+360)%360);const u=t.pcb_courtyard_rect.insert({pcb_component_id:a,layer:r,center:{x:n.x,y:n.y},width:e.width,height:e.height,ccw_rotation:l||void 0,subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_courtyard_rect_id=u.pcb_courtyard_rect_id}getPcbSize(){const{_parsedProps:t}=this;return{width:t.width,height:t.height}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_courtyard_rect_id)return;const o=n.pcb_courtyard_rect.get(this.pcb_courtyard_rect_id);o\u0026\u0026n.pcb_courtyard_rect.update(this.pcb_courtyard_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},T0e=class extends Ir{pcb_cutout_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"Cutout\",zodProps:aPn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this.getGroup()?.pcb_group_id??void 0,i=this._getGlobalPcbPositionBeforeLayout(),r=this.getPrimitiveContainer(),s=this.parent?.pcb_component_id??r?.pcb_component_id??void 0,a=r?._parsedProps.pcbRotation??0;let A;if(e.shape===\"rect\"){const c=typeof a==\"string\"?parseInt(a.replace(\"deg\",\"\"),10):a,l=Math.abs(c%180)===90,u={shape:\"rect\",center:i,width:l?e.height:e.width,height:l?e.width:e.height,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o,pcb_component_id:s};A=t.pcb_cutout.insert(u)}else if(e.shape===\"circle\"){const c={shape:\"circle\",center:i,radius:e.radius,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o,pcb_component_id:s};A=t.pcb_cutout.insert(c)}else if(e.shape===\"polygon\"){const c=this._computePcbGlobalTransformBeforeLayout(),u={shape:\"polygon\",points:e.points.map(g=\u003ets(c,g)),subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o,pcb_component_id:s};A=t.pcb_cutout.insert(u)}A\u0026\u0026(this.pcb_cutout_id=A.pcb_cutout_id)}getPcbSize(){const{_parsedProps:t}=this;if(t.shape===\"rect\")return{width:t.width,height:t.height};if(t.shape===\"circle\")return{width:t.radius*2,height:t.radius*2};if(t.shape===\"polygon\"){if(t.points.length===0)return{width:0,height:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t.points)e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y);return{width:n-e,height:i-o}}return{width:0,height:0}}_getPcbCircuitJsonBounds(){if(!this.pcb_cutout_id)return super._getPcbCircuitJsonBounds();const{db:t}=this.root,e=t.pcb_cutout.get(this.pcb_cutout_id);if(!e)return super._getPcbCircuitJsonBounds();if(e.shape===\"rect\")return{center:e.center,bounds:{left:e.center.x-e.width/2,top:e.center.y+e.height/2,right:e.center.x+e.width/2,bottom:e.center.y-e.height/2},width:e.width,height:e.height};if(e.shape===\"circle\")return{center:e.center,bounds:{left:e.center.x-e.radius,top:e.center.y+e.radius,right:e.center.x+e.radius,bottom:e.center.y-e.radius},width:e.radius*2,height:e.radius*2};if(e.shape===\"polygon\"){if(e.points.length===0)return super._getPcbCircuitJsonBounds();let n=1/0,o=-1/0,i=1/0,r=-1/0;for(const s of e.points)n=Math.min(n,s.x),o=Math.max(o,s.x),i=Math.min(i,s.y),r=Math.max(r,s.y);return{center:{x:(n+o)/2,y:(i+r)/2},bounds:{left:n,top:r,right:o,bottom:i},width:o-n,height:r-i}}return super._getPcbCircuitJsonBounds()}_setPositionFromLayout(t){if(!this.pcb_cutout_id)return;const{db:e}=this.root,n=e.pcb_cutout.get(this.pcb_cutout_id);if(n){if(n.shape===\"rect\"||n.shape===\"circle\")e.pcb_cutout.update(this.pcb_cutout_id,{...n,center:t});else if(n.shape===\"polygon\"){const o=this._getPcbCircuitJsonBounds().center,i=t.x-o.x,r=t.y-o.y,s=n.points.map(a=\u003e({x:a.x+i,y:a.y+r}));e.pcb_cutout.update(this.pcb_cutout_id,{...n,points:s})}}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(!this.pcb_cutout_id)return;const{db:n}=this.root,o=n.pcb_cutout.get(this.pcb_cutout_id);o\u0026\u0026(o.shape===\"rect\"||o.shape===\"circle\"?n.pcb_cutout.update(this.pcb_cutout_id,{center:{x:o.center.x+t,y:o.center.y+e}}):o.shape===\"polygon\"\u0026\u0026n.pcb_cutout.update(this.pcb_cutout_id,{points:o.points.map(i=\u003e({x:i.x+t,y:i.y+e}))}))}},GMt=class extends Ir{fabrication_note_path_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"FabricationNotePath\",zodProps:bMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,e=this.getSubcircuit(),{_parsedProps:n}=this,{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(n.layer??\"top\");if(i!==\"top\"\u0026\u0026i!==\"bottom\")throw new Error(`Invalid layer \"${i}\" for FabricationNotePath. Must be \"top\" or \"bottom\".`);const r=this._computePcbGlobalTransformBeforeLayout(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_fabrication_note_path.insert({pcb_component_id:s,layer:i,color:n.color,route:n.route.map(A=\u003e{const c=ts(r,{x:A.x,y:A.y});return{...A,x:c.x,y:c.y}}),stroke_width:n.strokeWidth??.1,subcircuit_id:e?.subcircuit_id??void 0});this.fabrication_note_path_id=a.pcb_fabrication_note_path_id}getPcbSize(){const{_parsedProps:t}=this;if(t.route.length===0)return{width:0,height:0};const e=t.route.map(a=\u003etypeof a.x==\"string\"?parseFloat(a.x):a.x),n=t.route.map(a=\u003etypeof a.y==\"string\"?parseFloat(a.y):a.y),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{width:i-o,height:s-r}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.fabrication_note_path_id)return;const o=n.pcb_fabrication_note_path.get(this.fabrication_note_path_id);o\u0026\u0026n.pcb_fabrication_note_path.update(this.fabrication_note_path_id,{route:o.route.map(i=\u003e({...i,x:i.x+t,y:i.y+e}))})}},YMt=class extends Ir{fabrication_note_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"FabricationNoteRect\",zodProps:BMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(e.layer??\"top\");if(i!==\"top\"\u0026\u0026i!==\"bottom\")throw new Error(`Invalid layer \"${i}\" for FabricationNoteRect. Must be \"top\" or \"bottom\".`);const r=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,s=this.getSubcircuit(),a=e.hasStroke??(e.strokeWidth!==void 0\u0026\u0026e.strokeWidth!==null),A=t.pcb_fabrication_note_rect.insert({pcb_component_id:r,layer:i,color:e.color,center:{x:n.x,y:n.y},width:e.width,height:e.height,stroke_width:e.strokeWidth??1,is_filled:e.isFilled??!1,has_stroke:a,is_stroke_dashed:e.isStrokeDashed??!1,subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,corner_radius:e.cornerRadius??void 0});this.fabrication_note_rect_id=A.pcb_fabrication_note_rect_id}getPcbSize(){const{_parsedProps:t}=this;return{width:t.width,height:t.height}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.fabrication_note_rect_id)return;const o=n.pcb_fabrication_note_rect.get(this.fabrication_note_rect_id);o\u0026\u0026n.pcb_fabrication_note_rect.update(this.fabrication_note_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}};function V7o(t){const e=t.indexOf(\"[\");if(e===-1)return{tag:t};const n=t.slice(0,e),i=t.slice(e+1,t.lastIndexOf(\"]\")).match(/^(\\w+)(\\^=|\\$=|=)['\"]?(.*?)['\"]?$/);return i?{tag:n,attrName:i[1],attrOp:i[2],attrValue:i[3]}:{tag:n}}function UMt(t,e){if(t.lowercaseComponentName!==e.tag)return!1;if(!e.attrName)return!0;const n=t.props?.[e.attrName];if(n===void 0)return!1;const o=String(n);switch(e.attrOp){case\"^=\":return o.startsWith(e.attrValue);case\"$=\":return o.endsWith(e.attrValue);case\"=\":return o===e.attrValue;default:return!1}}function z7o(t,e){if(!UMt(t,e[e.length-1]))return!1;let n=e.length-2,o=t.parent;for(;n\u003e=0\u0026\u0026o;)UMt(o,e[n])\u0026\u0026n--,o=o.parent;return n\u003c0}function pO({propertyName:t,resolvedPcbSx:e,pathFromAmpersand:n,component:o}){if(!e)return;let i,r=0;for(const[s,a]of Object.entries(e)){if(!a||!(t in a))continue;const A=s.startsWith(\"\u0026 \")?s.slice(2):s;if(A===n){1\u003er\u0026\u0026(r=1,i=a[t]);continue}if(!o)continue;const c=A.split(/\\s+/).map(V7o);if(!(c.length\u003c2)\u0026\u0026z7o(o,c)){const l=c.length;l\u003er\u0026\u0026(r=l,i=a[t])}}return i}var KMt=class extends Ir{pcb_fabrication_note_text_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"FabricationNoteText\",zodProps:EMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),r=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360,s=this.getPrimitiveContainer(),a=this.getSubcircuit(),{maybeFlipLayer:A}=this._getPcbPrimitiveFlippedHelpers(),c=A(e.layer??\"top\");if(c!==\"top\"\u0026\u0026c!==\"bottom\")throw new Error(`Invalid layer \"${c}\" for FabricationNoteText. Must be \"top\" or \"bottom\".`);if(pO({propertyName:\"visibility\",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:\"fabricationnotetext\",component:this})===\"hidden\")return;const u=t.pcb_fabrication_note_text.insert({anchor_alignment:e.anchorAlignment,anchor_position:{x:n.x,y:n.y},font:e.font??\"tscircuit2024\",font_size:e.fontSize??1,layer:c,color:e.color,ccw_rotation:r,text:Yj(e.text??\"\"),pcb_component_id:s.pcb_component_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_fabrication_note_text_id=u.pcb_fabrication_note_text_id}getPcbSize(){const{_parsedProps:t}=this,e=typeof t.fontSize==\"string\"?parseFloat(t.fontSize):t.fontSize??1,n=e*.6;return{width:(t.text??\"\").length*n,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(this.pcb_fabrication_note_text_id){const o=n.pcb_fabrication_note_text.get(this.pcb_fabrication_note_text_id);o\u0026\u0026n.pcb_fabrication_note_text.update(this.pcb_fabrication_note_text_id,{anchor_position:{x:o.anchor_position.x+t,y:o.anchor_position.y+e}})}}},mO=class extends Ir{pcb_hole_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"Hole\",zodProps:xPn}}getPcbSize(){const{_parsedProps:t}=this,e=t.shape===\"pill\",n=t.shape===\"oval\",o=t.shape===\"rect\";return e||n?{width:t.width,height:t.height}:o?{width:t.width,height:t.height}:{width:t.diameter,height:t.diameter}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this._getGlobalPcbPositionBeforeLayout(),i=e.solderMaskMargin,r=e.coveredWithSolderMask??!1,s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id;if(this.emitSolderMaskMarginWarning(r,i),e.shape===\"pill\")if(e.pcbRotation\u0026\u0026e.pcbRotation!==0){const a=t.pcb_hole.insert({pcb_component_id:s,type:\"pcb_hole\",hole_shape:\"rotated_pill\",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,ccw_rotation:e.pcbRotation,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else{const a=t.pcb_hole.insert({pcb_component_id:s,type:\"pcb_hole\",hole_shape:\"pill\",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else if(e.shape===\"oval\"){const a=t.pcb_hole.insert({pcb_component_id:s,type:\"pcb_hole\",hole_shape:\"oval\",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else if(e.shape===\"rect\"){const a=t.pcb_hole.insert({pcb_component_id:s,type:\"pcb_hole\",hole_shape:\"rect\",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else{const a=t.pcb_hole.insert({pcb_component_id:s,type:\"pcb_hole\",hole_shape:\"circle\",hole_diameter:e.diameter,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_hole.get(this.pcb_hole_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y-n.height/2,right:e.x+n.width/2,bottom:e.y+n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_hole.update(this.pcb_hole_id,{x:t.x,y:t.y})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_hole_id)return;const o=n.pcb_hole.get(this.pcb_hole_id);o\u0026\u0026n.pcb_hole.update(this.pcb_hole_id,{x:o.x+t,y:o.y+e})}},k0e=class extends Ir{pcb_keepout_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"Keepout\",zodProps:PMn}}getExcludedPcbComponentIds(){const t=this._parsedProps.excludeRefs?.flatMap(e=\u003ethis.getSubcircuit().selectAll(e).map(n=\u003en.pcb_component_id).filter(n=\u003en!==null))??[];return Array.from(new Set(t))}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const t=this.getSubcircuit(),{db:e}=this.root,{_parsedProps:n}=this,o=this._getGlobalPcbPositionBeforeLayout(),i=O9(this._computePcbGlobalTransformBeforeLayout()),r=Math.abs(i.rotation.angle*(180/Math.PI)-90)%180\u003c.01;let s=n.layers;!s\u0026\u0026n.layer\u0026\u0026(s=[n.layer]),s||(s=[\"top\"]);const a=this.getExcludedPcbComponentIds(),A=a.length\u003e0?{excluded_pcb_component_ids:a}:{};let c=null;n.shape===\"circle\"?c=e.pcb_keepout.insert({layers:s,shape:\"circle\",...A,radius:n.radius,center:{x:o.x,y:o.y},subcircuit_id:t?.subcircuit_id??void 0,pcb_group_id:t?.getGroup()?.pcb_group_id??void 0}):n.shape===\"rect\"\u0026\u0026(c=e.pcb_keepout.insert({layers:s,shape:\"rect\",...A,...r?{width:n.height,height:n.width}:{width:n.width,height:n.height},center:{x:o.x,y:o.y},subcircuit_id:t?.subcircuit_id??void 0,pcb_group_id:t?.getGroup()?.pcb_group_id??void 0})),c\u0026\u0026(this.pcb_keepout_id=c.pcb_keepout_id)}getPcbSize(){const{_parsedProps:t}=this;return t.shape===\"circle\"?{width:t.radius*2,height:t.radius*2}:t.shape===\"rect\"?{width:t.width,height:t.height}:{width:0,height:0}}},VMt=class extends Ir{pcb_note_line_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"PcbNoteLine\",zodProps:SDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this.getGroup(),i=this._computePcbGlobalTransformBeforeLayout(),r=ts(i,{x:e.x1,y:e.y1}),s=ts(i,{x:e.x2,y:e.y2}),a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,A=t.pcb_note_line.insert({pcb_component_id:a,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o?.pcb_group_id??void 0,x1:r.x,y1:r.y,x2:s.x,y2:s.y,layer:e.layer===\"bottom\"?\"bottom\":\"top\",stroke_width:e.strokeWidth??.1,color:e.color,is_dashed:e.isDashed});this.pcb_note_line_id=A.pcb_note_line_id}getPcbSize(){const{_parsedProps:t}=this;return{width:Math.abs(t.x2-t.x1),height:Math.abs(t.y2-t.y1)}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_line_id)return;const o=n.pcb_note_line.get(this.pcb_note_line_id);o\u0026\u0026n.pcb_note_line.update(this.pcb_note_line_id,{x1:o.x1+t,y1:o.y1+e,x2:o.x2+t,y2:o.y2+e})}},zMt=class extends Ir{pcb_note_path_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"PcbNotePath\",zodProps:bDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=this.getSubcircuit(),i=this.getGroup(),r=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,s=e.route.map(A=\u003e{const{x:c,y:l,...u}=A,g=typeof c==\"string\"?parseFloat(c):c,h=typeof l==\"string\"?parseFloat(l):l,d=ts(n,{x:g,y:h});return{...u,x:d.x,y:d.y}}),a=t.pcb_note_path.insert({pcb_component_id:r,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:i?.pcb_group_id??void 0,route:s,layer:e.layer===\"bottom\"?\"bottom\":\"top\",stroke_width:e.strokeWidth??.1,color:e.color});this.pcb_note_path_id=a.pcb_note_path_id}getPcbSize(){const{_parsedProps:t}=this;if(t.route.length===0)return{width:0,height:0};const e=t.route.map(a=\u003etypeof a.x==\"string\"?parseFloat(a.x):a.x),n=t.route.map(a=\u003etypeof a.y==\"string\"?parseFloat(a.y):a.y),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{width:i-o,height:s-r}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_path_id)return;const o=n.pcb_note_path.get(this.pcb_note_path_id);o\u0026\u0026n.pcb_note_path.update(this.pcb_note_path_id,{route:o.route.map(i=\u003e({...i,x:i.x+t,y:i.y+e}))})}},JMt=class extends Ir{pcb_note_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"PcbNoteRect\",zodProps:BDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=ts(n,{x:0,y:0}),i=this.getSubcircuit(),r=this.getGroup(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,a=t.pcb_note_rect.insert({pcb_component_id:s,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:r?.pcb_group_id??void 0,center:o,width:e.width,height:e.height,layer:e.layer===\"bottom\"?\"bottom\":\"top\",stroke_width:e.strokeWidth??.1,is_filled:e.isFilled??!1,has_stroke:e.hasStroke??!0,is_stroke_dashed:e.isStrokeDashed??!1,color:e.color,corner_radius:e.cornerRadius??void 0});this.pcb_note_rect_id=a.pcb_note_rect_id}getPcbSize(){const{_parsedProps:t}=this,e=typeof t.width==\"string\"?parseFloat(t.width):t.width,n=typeof t.height==\"string\"?parseFloat(t.height):t.height;return{width:e,height:n}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_rect_id)return;const o=n.pcb_note_rect.get(this.pcb_note_rect_id);o\u0026\u0026n.pcb_note_rect.update(this.pcb_note_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},WMt=class extends Ir{pcb_note_text_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"PcbNoteText\",zodProps:EDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=ts(n,{x:0,y:0}),i=this.getSubcircuit(),r=this.getGroup(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,a=t.pcb_note_text.insert({pcb_component_id:s,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:r?.pcb_group_id??void 0,font:e.font??\"tscircuit2024\",font_size:e.fontSize??1,text:Yj(e.text),anchor_position:o,anchor_alignment:e.anchorAlignment??\"center\",layer:e.layer===\"bottom\"?\"bottom\":\"top\",color:e.color});this.pcb_note_text_id=a.pcb_note_text_id}getPcbSize(){const{_parsedProps:t}=this,e=typeof t.fontSize==\"string\"?parseFloat(t.fontSize):t.fontSize??1,n=e*.6;return{width:t.text.length*n,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_text_id)return;const o=n.pcb_note_text.get(this.pcb_note_text_id);o\u0026\u0026n.pcb_note_text.update(this.pcb_note_text_id,{anchor_position:{x:o.anchor_position.x+t,y:o.anchor_position.y+e}})}},J7o=Pt({route:dn(Y2e),source_trace_id:Z().optional()}),tPe=class extends Ir{pcb_trace_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"PcbTrace\",zodProps:J7o}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getPrimitiveContainer(),o=this.getSubcircuit(),{maybeFlipLayer:i}=this._getPcbPrimitiveFlippedHelpers(),r=this._computePcbGlobalTransformBeforeLayout(),s=e.route.map(A=\u003e{if(A.route_type===\"wire\"){const{x:c,y:l,...u}=A,g=ts(r,{x:c,y:l});return{...u,...g,layer:i(A.layer)}}if(A.route_type===\"via\"){const{x:c,y:l,...u}=A,g=ts(r,{x:c,y:l});return{...u,...g,from_layer:i(A.from_layer),to_layer:i(A.to_layer)}}return{...A,start:ts(r,A.start),end:ts(r,A.end),start_layer:i(A.start_layer),end_layer:i(A.end_layer)}}),a=t.pcb_trace.insert({pcb_component_id:n.pcb_component_id,source_trace_id:e.source_trace_id,route:s,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_trace_id=a.pcb_trace_id}getPcbSize(){const t=this._getPcbLocalBoundsBeforeLayout();return{width:t.right-t.left,height:t.top-t.bottom}}_getPcbLocalBoundsBeforeLayout(){const{_parsedProps:t}=this;if(!t.route||t.route.length===0)return{left:0,right:0,top:0,bottom:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t.route)r.route_type===\"through_pad\"?(e=Math.min(e,r.start.x,r.end.x),n=Math.max(n,r.start.x,r.end.x),o=Math.min(o,r.start.y,r.end.y),i=Math.max(i,r.start.y,r.end.y)):(e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y)),r.route_type===\"wire\"?(e=Math.min(e,r.x-r.width/2),n=Math.max(n,r.x+r.width/2),o=Math.min(o,r.y-r.width/2),i=Math.max(i,r.y+r.width/2)):r.route_type===\"through_pad\"\u0026\u0026(e=Math.min(e,r.start.x-r.width/2,r.end.x-r.width/2),n=Math.max(n,r.start.x+r.width/2,r.end.x+r.width/2),o=Math.min(o,r.start.y-r.width/2,r.end.y-r.width/2),i=Math.max(i,r.start.y+r.width/2,r.end.y+r.width/2));return e===1/0||n===-1/0||o===1/0||i===-1/0?{left:0,right:0,top:0,bottom:0}:{left:e,right:n,top:i,bottom:o}}},W7o=_lt.extend({layers:dn(Pr).optional(),isTented:je().optional(),tentedOnTop:je().optional(),tentedOnBottom:je().optional()}).partial({fromLayer:!0,toLayer:!0}),jMt=class extends Ir{pcb_via_id=null;_importedPcbTraceId;isPcbPrimitive=!0;get config(){return{componentName:\"PcbVia\",zodProps:W7o}}_getLayers(){const{layers:t,fromLayer:e=\"top\",toLayer:n=\"bottom\"}=this._parsedProps;if(t\u0026\u0026t.length\u003e0)return t;const o=this.parent?this.getSubcircuit()._getSubcircuitLayerCount():2;return lw({fromLayer:e,toLayer:n,layerCount:o})}getAvailablePcbLayers(){return this._getLayers()}getPcbSize(){const t=this._parsedProps.outerDiameter??.6;return{width:t,height:t}}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_via.get(this.pcb_via_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y-n.height/2,right:e.x+n.width/2,bottom:e.y+n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_via.update(this.pcb_via_id,{x:t.x,y:t.y})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{holeDiameter:e,outerDiameter:n,netIsAssignable:o,isTented:i,tentedOnTop:r,tentedOnBottom:s}=this._parsedProps,a=this.getSubcircuit(),A=this._getGlobalPcbPositionBeforeLayout(),{isFlipped:c,maybeFlipLayer:l}=this._getPcbPrimitiveFlippedHelpers(),u=this._getLayers().map(p=\u003el(p)),g=this._parsedProps.fromLayer?l(this._parsedProps.fromLayer):u[0],h=this._parsedProps.toLayer?l(this._parsedProps.toLayer):u[u.length-1]??g,d=t.pcb_via.insert({x:A.x,y:A.y,...e!==void 0?{hole_diameter:e}:{},...n!==void 0?{outer_diameter:n}:{},layers:u,from_layer:g,to_layer:h,pcb_trace_id:this._importedPcbTraceId,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,net_is_assignable:o,tented_on_top:(c?s:r)??i,tented_on_bottom:(c?r:s)??i});this.pcb_via_id=d.pcb_via_id}},j7o=t=\u003e{for(const e of t){const n=e.toString();if(/^(pin)?\\d+$/.test(n))return Number.parseInt(n.replace(/^pin/,\"\"))}return null};function $Mt(t,e,n){const o=j7o(n),i=t.filter(c=\u003ec.isMatchingAnyOf(n));if(i.length===0)return null;const r=o===null?i:i.filter(c=\u003ec._parsedProps.pinNumber===o||c._primaryPinNumber===o),s=r.length\u003e0?r:i,a=s.find(c=\u003ec.matchedComponents.some(l=\u003el.isPcbPrimitive\u0026\u0026EMt(l,e)));return a||(s.find(c=\u003e!c.matchedComponents.some(l=\u003el.isPcbPrimitive))??s[0])}var Pb=class extends Ir{pcb_plated_hole_id=null;matchedPort=null;isPcbPrimitive=!0;get config(){return{componentName:\"PlatedHole\",zodProps:Hwn}}getAvailablePcbLayers(){return[...this.root?._getBoard()?.allLayers??[\"top\",\"bottom\"]]}getPcbSize(){const{_parsedProps:t}=this;if(t.shape===\"circle\")return{width:t.outerDiameter,height:t.outerDiameter};if(t.shape===\"oval\"||t.shape===\"pill\")return{width:t.outerWidth,height:t.outerHeight};if(t.shape===\"circular_hole_with_rect_pad\")return{width:t.rectPadWidth,height:t.rectPadHeight};if(t.shape===\"pill_hole_with_rect_pad\")return{width:t.rectPadWidth,height:t.rectPadHeight};if(t.shape===\"hole_with_polygon_pad\"){if(!t.padOutline||t.padOutline.length===0)throw new Error(\"padOutline is required for hole_with_polygon_pad shape\");const e=t.padOutline.map(a=\u003etypeof a.x==\"number\"?a.x:parseFloat(String(a.x))),n=t.padOutline.map(a=\u003etypeof a.y==\"number\"?a.y:parseFloat(String(a.y))),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{width:i-o,height:s-r}}throw new Error(`getPcbSize for shape \"${t.shape}\" not implemented for ${this.componentName}`)}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_plated_hole.get(this.pcb_plated_hole_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y+n.height/2,right:e.x+n.width/2,bottom:e.y-n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_plated_hole.update(this.pcb_plated_hole_id,{x:t.x,y:t.y}),this.matchedPort?._setPositionFromLayout(t)}doInitialPortMatching(){const t=this.getPrimitiveContainer()?.selectAll(\"port\");if(!this._parsedProps.portHints)return;const e=$Mt(t,this,this._parsedProps.portHints);e\u0026\u0026(this.matchedPort=e,e.registerMatch(this))}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),o=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,i=this.getSubcircuit(),r=this.getAvailablePcbLayers(),s=e.solderMaskMargin,a=e.coveredWithSolderMask??!1;this.emitSolderMaskMarginWarning(a,s);const u=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360;if(e.shape===\"circle\"){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,outer_diameter:e.outerDiameter,hole_diameter:e.holeDiameter,shape:\"circle\",port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=g.pcb_plated_hole_id,t.pcb_solder_paste.insert({layer:\"top\",shape:\"circle\",radius:e.outerDiameter/2,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}),t.pcb_solder_paste.insert({layer:\"bottom\",shape:\"circle\",radius:e.outerDiameter/2,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape===\"pill\"\u0026\u0026e.rectPad){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,outer_width:e.outerWidth,outer_height:e.outerHeight,hole_width:e.holeWidth,hole_height:e.holeHeight,shape:\"rotated_pill_hole_with_rect_pad\",type:\"pcb_plated_hole\",port_hints:this.getNameAndAliases(),pcb_plated_hole_id:this.pcb_plated_hole_id,x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,hole_shape:\"rotated_pill\",pad_shape:\"rect\",hole_ccw_rotation:u,rect_ccw_rotation:u,rect_pad_width:e.outerWidth,rect_pad_height:e.outerHeight,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else if(e.shape===\"pill\"||e.shape===\"oval\"){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,outer_width:e.outerWidth,outer_height:e.outerHeight,hole_width:e.holeWidth,hole_height:e.holeHeight,shape:e.shape,port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,ccw_rotation:u});this.pcb_plated_hole_id=g.pcb_plated_hole_id,t.pcb_solder_paste.insert({layer:\"top\",shape:e.shape,width:e.outerWidth,height:e.outerHeight,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}),t.pcb_solder_paste.insert({layer:\"bottom\",shape:e.shape,width:e.outerWidth,height:e.outerHeight,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape===\"circular_hole_with_rect_pad\"){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,hole_diameter:e.holeDiameter,rect_pad_width:e.rectPadWidth,rect_pad_height:e.rectPadHeight,shape:\"circular_hole_with_rect_pad\",port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY,rect_border_radius:e.rectBorderRadius??0,rect_ccw_rotation:u});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else if(e.shape===\"pill_hole_with_rect_pad\")if(u!==0){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,hole_width:e.holeWidth,hole_height:e.holeHeight,rect_pad_width:e.rectPadWidth,rect_pad_height:e.rectPadHeight,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY,shape:\"rotated_pill_hole_with_rect_pad\",type:\"pcb_plated_hole\",hole_shape:\"rotated_pill\",pad_shape:\"rect\",hole_ccw_rotation:u,rect_ccw_rotation:u,rect_border_radius:e.rectBorderRadius,port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else{const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,hole_width:e.holeWidth,hole_height:e.holeHeight,rect_pad_width:e.rectPadWidth,rect_pad_height:e.rectPadHeight,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY,shape:\"pill_hole_with_rect_pad\",rect_border_radius:e.rectBorderRadius,port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else if(e.shape===\"hole_with_polygon_pad\"){const g=(e.padOutline||[]).map(d=\u003e{const p=typeof d.x==\"number\"?d.x:parseFloat(String(d.x)),m=typeof d.y==\"number\"?d.y:parseFloat(String(d.y));return{x:p,y:m}}),h=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,shape:\"hole_with_polygon_pad\",hole_shape:e.holeShape||\"circle\",hole_diameter:e.holeDiameter,hole_width:e.holeWidth,hole_height:e.holeHeight,pad_outline:g,hole_offset_x:typeof e.holeOffsetX==\"number\"?e.holeOffsetX:parseFloat(String(e.holeOffsetX||0)),hole_offset_y:typeof e.holeOffsetY==\"number\"?e.holeOffsetY:parseFloat(String(e.holeOffsetY||0)),port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=h.pcb_plated_hole_id}}doInitialPcbPortAttachment(){if(this.root?.pcbDisabled)return;const{db:t}=this.root;t.pcb_plated_hole.update(this.pcb_plated_hole_id,{pcb_port_id:this.matchedPort?.pcb_port_id})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_plated_hole_id)return;const o=n.pcb_plated_hole.get(this.pcb_plated_hole_id);if(o){const i={x:o.x+t,y:o.y+e};this._setPositionFromLayout(i)}}},qMt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:\"SchematicArc\",zodProps:qMn}}schematic_arc_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_arc.insert({schematic_component_id:o,schematic_symbol_id:i,center:{x:e.center.x+n.x,y:e.center.y+n.y},radius:e.radius,start_angle_degrees:e.startAngleDegrees,end_angle_degrees:e.endAngleDegrees,direction:e.direction,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_dashed:e.isDashed,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_arc_id=r.schematic_arc_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_arc_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_arc.get(this.schematic_arc_id);if(!o)return;const i=ts(e,o.center),r=ts(e,{x:o.center.x+o.radius,y:o.center.y}),s=Math.abs(r.x-i.x);n.schematic_arc.update(this.schematic_arc_id,{center:{x:i.x,y:i.y},radius:s})}},XMt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:\"SchematicCircle\",zodProps:tDn}}schematic_circle_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_circle.insert({schematic_component_id:o,schematic_symbol_id:i,center:{x:e.center.x+n.x,y:e.center.y+n.y},radius:e.radius,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_filled:e.isFilled,fill_color:e.fillColor,is_dashed:e.isDashed,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_circle_id=r.schematic_circle_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_circle_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_circle.get(this.schematic_circle_id);if(!o)return;const i=ts(e,o.center),r=ts(e,{x:o.center.x+o.radius,y:o.center.y}),s=Math.abs(r.x-i.x);n.schematic_circle.update(this.schematic_circle_id,{center:{x:i.x,y:i.y},radius:s})}},nPe=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:\"SchematicLine\",zodProps:oDn}}schematic_line_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_line.insert({schematic_component_id:o,schematic_symbol_id:i,x1:e.x1+n.x,y1:e.y1+n.y,x2:e.x2+n.x,y2:e.y2+n.y,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_dashed:e.isDashed||e.dashLength!==void 0||e.dashGap!==void 0,dash_length:e.dashLength,dash_gap:e.dashGap,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_line_id=r.schematic_line_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_line_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_line.get(this.schematic_line_id);if(!o)return;const i=ts(e,{x:o.x1,y:o.y1}),r=ts(e,{x:o.x2,y:o.y2});n.schematic_line.update(this.schematic_line_id,{x1:i.x,y1:i.y,x2:r.x,y2:r.y})}};function Uj(t,e){const n=new lse(t),o=n.getTotalLength(),i=Math.max(2,Math.ceil(o*e)),r=[];for(let s=1;s\u003c=i;s++){const a=s/i*o,A=n.getPointAtLength(a);r.push({x:A.x,y:A.y})}return r}function $7o(t,e=10){const n=new lse(t);n.toAbsolute();const o=n.segments,i=[];let r=[],s=0,a=0,A=0,c=0;for(const l of o)switch(l[0]){case\"M\":{r.length\u003e0\u0026\u0026i.push(r),s=l[1],a=l[2],A=s,c=a,r=[{x:s,y:a}];break}case\"L\":{s=l[1],a=l[2],r.push({x:s,y:a});break}case\"H\":{s=l[1],r.push({x:s,y:a});break}case\"V\":{a=l[1],r.push({x:s,y:a});break}case\"Z\":{(s!==A||a!==c)\u0026\u0026r.push({x:A,y:c}),s=A,a=c;break}case\"C\":{const g=l[5],h=l[6],d=`M ${s} ${a} C ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case\"S\":{const g=l[3],h=l[4],d=`M ${s} ${a} S ${l[1]} ${l[2]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case\"Q\":{const g=l[3],h=l[4],d=`M ${s} ${a} Q ${l[1]} ${l[2]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case\"T\":{const g=l[1],h=l[2],d=`M ${s} ${a} T ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case\"A\":{const g=l[6],h=l[7],d=`M ${s} ${a} A ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${l[5]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}}return r.length\u003e0\u0026\u0026i.push(r),i.map(l=\u003e{const u=[];for(const g of l)(u.length===0||Math.abs(u[u.length-1].x-g.x)\u003e1e-9||Math.abs(u[u.length-1].y-g.y)\u003e1e-9)\u0026\u0026u.push(g);return u})}var ZMt=class extends Ir{isSchematicPrimitive=!0;schematic_path_ids=[];get config(){return{componentName:\"SchematicPath\",zodProps:sDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=this.getSubcircuit().subcircuit_id??void 0;if(this.schematic_path_ids=[],e.svgPath){const s=$7o(e.svgPath);for(const a of s){const A=t.schematic_path.insert({schematic_component_id:o,schematic_symbol_id:i,points:a.map(c=\u003e({x:c.x+n.x,y:c.y+n.y})),is_filled:e.isFilled,is_dashed:e.dashLength!==void 0||e.dashGap!==void 0,fill_color:e.fillColor,stroke_color:e.strokeColor,stroke_width:e.strokeWidth,dash_length:e.dashLength,dash_gap:e.dashGap,subcircuit_id:r,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_path_ids.push(A.schematic_path_id)}}else if(e.points\u0026\u0026e.points.length\u003e0){const s=t.schematic_path.insert({schematic_component_id:o,schematic_symbol_id:i,points:e.points.map(a=\u003e({x:a.x+n.x,y:a.y+n.y})),is_filled:e.isFilled,is_dashed:e.dashLength!==void 0||e.dashGap!==void 0,fill_color:e.fillColor,stroke_color:e.strokeColor,stroke_width:e.strokeWidth,dash_length:e.dashLength,dash_gap:e.dashGap,subcircuit_id:r,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_path_ids.push(s.schematic_path_id)}}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||this.schematic_path_ids.length===0)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root;for(const o of this.schematic_path_ids){const i=n.schematic_path.get(o);if(!i)continue;const r=i.points.map(s=\u003e{const a=ts(e,s);return{x:a.x,y:a.y}});n.schematic_path.update(o,{points:r})}}},eDt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:\"SchematicRect\",zodProps:nDn}}schematic_rect_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_rect.insert({schematic_symbol_id:i,center:{x:n.x,y:n.y},width:e.width,height:e.height,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_filled:e.isFilled,schematic_component_id:o,is_dashed:e.isDashed,rotation:e.rotation??0,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_rect_id=r.schematic_rect_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_rect_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_rect.get(this.schematic_rect_id);if(!o)return;const i=ts(e,{x:o.center.x-o.width/2,y:o.center.y+o.height/2}),r=ts(e,{x:o.center.x+o.width/2,y:o.center.y-o.height/2}),s=Math.abs(r.x-i.x),a=Math.abs(i.y-r.y),A={x:(i.x+r.x)/2,y:(i.y+r.y)/2};n.schematic_rect.update(this.schematic_rect_id,{center:A,width:s,height:a})}},tDt=class extends Ir{isSchematicPrimitive=!0;schematic_text_id;get config(){return{componentName:\"SchematicText\",zodProps:rDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this._getSymbolAncestor()?.schematic_symbol_id,i=this._resolveText(),r=t.schematic_text.insert({schematic_symbol_id:o,anchor:e.anchor??\"center\",text:Yj(i),font_size:e.fontSize,color:e.color||\"#000000\",position:{x:n.x,y:n.y},rotation:e.schRotation??0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_text_id=r.schematic_text_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_text_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_text.get(this.schematic_text_id);if(!o)return;const i=ts(e,o.position);n.schematic_text.update(this.schematic_text_id,{position:{x:i.x,y:i.y}})}},nDt=class extends Ir{pcb_silkscreen_circle_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"SilkscreenCircle\",zodProps:IDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(e.layer??\"top\");if(i!==\"top\"\u0026\u0026i!==\"bottom\")throw new Error(`Invalid layer \"${i}\" for SilkscreenCircle. Must be \"top\" or \"bottom\".`);const r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_silkscreen_circle.insert({pcb_component_id:s,layer:i,center:{x:n.x,y:n.y},radius:e.radius,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,stroke_width:e.strokeWidth??.1});this.pcb_silkscreen_circle_id=a.pcb_silkscreen_circle_id}getPcbSize(){const{_parsedProps:t}=this,e=t.radius*2;return{width:e,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_circle_id)return;const o=n.pcb_silkscreen_circle.get(this.pcb_silkscreen_circle_id);o\u0026\u0026n.pcb_silkscreen_circle.update(this.pcb_silkscreen_circle_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},oDt=class extends Ir{pcb_silkscreen_line_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"SilkscreenLine\",zodProps:_Dn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??\"top\");if(o!==\"top\"\u0026\u0026o!==\"bottom\")throw new Error(`Invalid layer \"${o}\" for SilkscreenLine. Must be \"top\" or \"bottom\".`);const i=this.getSubcircuit(),r=this._computePcbGlobalTransformBeforeLayout(),s=ts(r,{x:e.x1,y:e.y1}),a=ts(r,{x:e.x2,y:e.y2}),A=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,c=t.pcb_silkscreen_line.insert({pcb_component_id:A,layer:o,x1:s.x,y1:s.y,x2:a.x,y2:a.y,stroke_width:e.strokeWidth??.1,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:i?.getGroup()?.pcb_group_id??void 0});this.pcb_silkscreen_line_id=c.pcb_silkscreen_line_id}getPcbSize(){const{_parsedProps:t}=this,e=Math.abs(t.x2-t.x1),n=Math.abs(t.y2-t.y1);return{width:e,height:n}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_line_id)return;const o=n.pcb_silkscreen_line.get(this.pcb_silkscreen_line_id);o\u0026\u0026n.pcb_silkscreen_line.update(this.pcb_silkscreen_line_id,{x1:o.x1+t,y1:o.y1+e,x2:o.x2+t,y2:o.y2+e})}},iDt=class extends Ir{pcb_silkscreen_path_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"SilkscreenPath\",zodProps:mDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??\"top\");if(o!==\"top\"\u0026\u0026o!==\"bottom\")throw new Error(`Invalid layer \"${o}\" for SilkscreenPath. Must be \"top\" or \"bottom\".`);const i=this._computePcbGlobalTransformBeforeLayout(),r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_silkscreen_path.insert({pcb_component_id:s,layer:o,route:e.route.map(A=\u003e{const c=ts(i,{x:A.x,y:A.y});return{...A,x:c.x,y:c.y}}),stroke_width:e.strokeWidth??.1,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_silkscreen_path_id=a.pcb_silkscreen_path_id}_setPositionFromLayout(t){const{db:e}=this.root,{_parsedProps:n}=this,o=e.pcb_silkscreen_path.get(this.pcb_silkscreen_path_id);if(!o)return;let i=0,r=0;for(const c of o.route)i+=c.x,r+=c.y;i/=o.route.length,r/=o.route.length;const s=t.x-i,a=t.y-r,A=o.route.map(c=\u003e({...c,x:c.x+s,y:c.y+a}));e.pcb_silkscreen_path.update(this.pcb_silkscreen_path_id,{route:A})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_path_id)return;const o=n.pcb_silkscreen_path.get(this.pcb_silkscreen_path_id);o\u0026\u0026n.pcb_silkscreen_path.update(this.pcb_silkscreen_path_id,{route:o.route.map(i=\u003e({...i,x:i.x+t,y:i.y+e}))})}getPcbSize(){const{_parsedProps:t}=this;if(!t.route||t.route.length===0)return{width:0,height:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t.route)e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y);return{width:n-e,height:i-o}}},rDt=class extends Ir{pcb_silkscreen_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"SilkscreenRect\",zodProps:fDn}}_isRotated90Degrees(){const t=this._computePcbGlobalTransformBeforeLayout(),o=(O9(t).rotation.angle*180/Math.PI%360+360)%360,i=.01;return Math.abs(o-90)\u003ci||Math.abs(o-270)\u003ci}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??\"top\");if(o!==\"top\"\u0026\u0026o!==\"bottom\")throw new Error(`Invalid layer \"${o}\" for SilkscreenRect. Must be \"top\" or \"bottom\".`);const i=this.getSubcircuit(),r=this._getGlobalPcbPositionBeforeLayout(),s=this._isRotated90Degrees(),a=s?e.height:e.width,A=s?e.width:e.height,c=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,l=t.pcb_silkscreen_rect.insert({pcb_component_id:c,layer:o,center:{x:r.x,y:r.y},width:a,height:A,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this?.getGroup()?.pcb_group_id??void 0,stroke_width:e.strokeWidth??.1,is_filled:e.filled??!1,corner_radius:e.cornerRadius??void 0});this.pcb_silkscreen_rect_id=l.pcb_silkscreen_rect_id}getPcbSize(){const{_parsedProps:t}=this;return this._isRotated90Degrees()?{width:t.height,height:t.width}:{width:t.width,height:t.height}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_rect_id)return;const o=n.pcb_silkscreen_rect.get(this.pcb_silkscreen_rect_id);o\u0026\u0026n.pcb_silkscreen_rect.update(this.pcb_silkscreen_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},oPe=class extends Ir{pcb_silkscreen_text_ids=[];isPcbPrimitive=!0;_footprinterFontSize;get config(){return{componentName:\"SilkscreenText\",zodProps:pDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getPrimitiveContainer(),{maybeFlipLayer:o,isFlipped:i}=this._getPcbPrimitiveFlippedHelpers(),r=this.getSubcircuit();let s=0;if(e.pcbRotation!==void 0\u0026\u0026e.pcbRotation!==0)s=e.pcbRotation;else{const C=this._computePcbGlobalTransformBeforeLayout();s=O9(C).rotation.angle*180/Math.PI}i\u0026\u0026(s=(s+180)%360);const a=new Set(e.layers);e.layer\u0026\u0026a.add(e.layer);const A=a.size\u003e0?Array.from(a):[\"top\"],c=pO({propertyName:\"fontSize\",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:\"silkscreentext\",component:this}),l=pO({propertyName:\"pcbX\",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:\"silkscreentext\",component:this}),u=pO({propertyName:\"pcbY\",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:\"silkscreentext\",component:this});if(pO({propertyName:\"visibility\",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:\"silkscreentext\",component:this})===\"hidden\")return;const h=e.fontSize??c??this.getInheritedProperty(\"pcbStyle\")?.silkscreenFontSize??this._footprinterFontSize??1,p=(l!==void 0||u!==void 0)\u0026\u0026this._footprinterFontSize!==void 0?ts(D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),i?g3e():hC()),{x:this.resolvePcbCoordinate({rawValue:l??e.pcbX??0,axis:\"pcbX\"}),y:this.resolvePcbCoordinate({rawValue:u??e.pcbY??0,axis:\"pcbY\"})}):this._getGlobalPcbPositionBeforeLayout(),m=e.knockoutPadding??0,f=e.knockoutPadding!==void 0||e.knockoutPaddingLeft!==void 0||e.knockoutPaddingRight!==void 0||e.knockoutPaddingTop!==void 0||e.knockoutPaddingBottom!==void 0?{left:e.knockoutPaddingLeft??m,right:e.knockoutPaddingRight??m,top:e.knockoutPaddingTop??m,bottom:e.knockoutPaddingBottom??m}:void 0,I=this._resolveText();for(const C of A){const y=t.pcb_silkscreen_text.insert({anchor_alignment:e.anchorAlignment,anchor_position:{x:p.x,y:p.y},font:e.font??\"tscircuit2024\",font_size:h,layer:o(C),text:Yj(I),ccw_rotation:s,pcb_component_id:n.pcb_component_id,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,is_knockout:e.isKnockout,knockout_padding:f});this.pcb_silkscreen_text_ids.push(y.pcb_silkscreen_text_id)}}getPcbSize(){const{_parsedProps:t}=this,e=pO({propertyName:\"fontSize\",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:\"silkscreentext\",component:this}),n=t.fontSize??e??this.getInheritedProperty(\"pcbStyle\")?.silkscreenFontSize??this._footprinterFontSize??1,i=this._resolveText().length*n,r=n;return{width:i*n,height:r*n}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;for(const o of this.pcb_silkscreen_text_ids){const i=n.pcb_silkscreen_text.get(o);i\u0026\u0026n.pcb_silkscreen_text.update(o,{anchor_position:{x:i.anchor_position.x+t,y:i.anchor_position.y+e}})}}};function F0e({width:t,height:e,ccwRotationDegrees:n}){const o=n*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=t/2,a=e/2,A=Math.abs(s*i)+Math.abs(a*r),c=Math.abs(s*r)+Math.abs(a*i);return{width:A*2,height:c*2,xExtent:A,yExtent:c}}var Mb=class extends Ir{pcb_smtpad_id=null;matchedPort=null;isPcbPrimitive=!0;get config(){return{componentName:\"SmtPad\",zodProps:pPn}}getPcbSize(){const{_parsedProps:t}=this;if(t.shape===\"circle\")return{width:t.radius*2,height:t.radius*2};if(t.shape===\"rect\")return{width:t.width,height:t.height};if(t.shape===\"rotated_rect\"){const{width:e,height:n}=F0e({width:t.width,height:t.height,ccwRotationDegrees:t.ccwRotation??0});return{width:e,height:n}}if(t.shape===\"polygon\"){const e=t.points,n=e.map(A=\u003eA.x),o=e.map(A=\u003eA.y),i=Math.min(...n),r=Math.max(...n),s=Math.min(...o),a=Math.max(...o);return{width:r-i,height:a-s}}if(t.shape===\"pill\")return{width:t.width,height:t.height};if(t.shape===\"rotated_pill\"){const{width:e,height:n}=F0e({width:t.width,height:t.height,ccwRotationDegrees:t.ccwRotation});return{width:e,height:n}}throw new Error(`getPcbSize for shape \"${t.shape}\" not implemented for ${this.componentName}`)}doInitialPortMatching(){const t=this.getPrimitiveContainer()?.selectAll(\"port\");if(!this.props.portHints)return;const e=$Mt(t,this,this.props.portHints);e\u0026\u0026(this.matchedPort=e,e.registerMatch(this))}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=e.coveredWithSolderMask??!1,o=!n,i=e.solderMaskMargin,r=e.solderPasteMargin,s=(Q,w=2)=\u003er!==void 0?Math.max(Q+w*r,0):Q*.7;this.emitSolderMaskMarginWarning(n,i);const a=this.getSubcircuit(),A=this._getGlobalPcbPositionBeforeLayout(),c=this._computePcbGlobalTransformBeforeLayout(),g=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360,h=.01,d=Math.abs(g)\u003ch||Math.abs(g-180)\u003ch||Math.abs(g-360)\u003ch,p=Math.abs(g-90)\u003ch||Math.abs(g-270)\u003ch;let m=Math.abs(g-360)\u003ch?0:g;const _=m,{maybeFlipLayer:f,isFlipped:I}=this._getPcbPrimitiveFlippedHelpers(),C=this.getPrimitiveContainer(),y=C?.props?.layer!==void 0?C?._parsedProps.layer:void 0,x=Q=\u003ey??f(Q);I\u0026\u0026(m=(360-m+360)%360);const E=e.portHints?.map(Q=\u003eQ.toString())??[];let B=null;const S=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id;if(e.shape===\"circle\"){B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"circle\",radius:e.radius,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,x:A.x,y:A.y,subcircuit_id:a?.subcircuit_id??void 0});const Q=s(B.radius,1);o\u0026\u0026Q\u003e0\u0026\u0026t.pcb_solder_paste.insert({layer:B.layer,shape:\"circle\",radius:Q,x:B.x,y:B.y,pcb_component_id:B.pcb_component_id,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape===\"rect\"){!d\u0026\u0026!p?B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"rotated_rect\",width:e.width,height:e.height,corner_radius:e.cornerRadius??void 0,x:A.x,y:A.y,ccw_rotation:m,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}):B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"rect\",width:p?e.height:e.width,height:p?e.width:e.height,corner_radius:e.cornerRadius??void 0,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,x:A.x,y:A.y,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});const w=s(B.width),M=s(B.height);o\u0026\u0026w\u003e0\u0026\u0026M\u003e0\u0026\u0026(B.shape===\"rect\"?t.pcb_solder_paste.insert({layer:x(e.layer??\"top\"),shape:\"rect\",width:w,height:M,x:B.x,y:B.y,pcb_component_id:B.pcb_component_id,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}):B.shape===\"rotated_rect\"\u0026\u0026t.pcb_solder_paste.insert({layer:x(e.layer??\"top\"),shape:\"rotated_rect\",width:w,height:M,x:B.x,y:B.y,ccw_rotation:B.ccw_rotation,pcb_component_id:B.pcb_component_id,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}))}else if(e.shape===\"rotated_rect\"){const Q=e.ccwRotation??0,w=(_+Q+360)%360,M=I?(360-w+360)%360:w;B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"rotated_rect\",width:e.width,height:e.height,corner_radius:e.cornerRadius??void 0,x:A.x,y:A.y,ccw_rotation:M,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});const k=s(B.width),R=s(B.height);o\u0026\u0026k\u003e0\u0026\u0026R\u003e0\u0026\u0026t.pcb_solder_paste.insert({layer:x(e.layer??\"top\"),shape:\"rotated_rect\",width:k,height:R,x:A.x,y:A.y,ccw_rotation:M,pcb_component_id:S,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape===\"polygon\"){const Q=e.points.map(w=\u003e{const M=ts(c,{x:lt.parse(w.x),y:lt.parse(w.y)});return{x:M.x,y:M.y}});B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"polygon\",points:Q,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape===\"rotated_pill\"){const Q=(_+e.ccwRotation+360)%360,w=I?(360-Q+360)%360:Q;B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"rotated_pill\",x:A.x,y:A.y,radius:e.radius,height:e.height,width:e.width,ccw_rotation:w,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else e.shape===\"pill\"\u0026\u0026(m!==0?B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"rotated_pill\",x:A.x,y:A.y,radius:e.radius,height:e.height,width:e.width,ccw_rotation:m,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}):B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??\"top\"),shape:\"pill\",x:A.x,y:A.y,radius:e.radius,height:e.height,width:e.width,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}));B\u0026\u0026(this.pcb_smtpad_id=B.pcb_smtpad_id)}doInitialPcbPortAttachment(){if(this.root?.pcbDisabled)return;const{db:t}=this.root;t.pcb_smtpad.update(this.pcb_smtpad_id,{pcb_port_id:this.matchedPort?.pcb_port_id})}getAvailablePcbLayers(){const{maybeFlipLayer:t}=this._getPcbPrimitiveFlippedHelpers(),e=this.getPrimitiveContainer();return[(e?.props?.layer!==void 0?e?._parsedProps.layer:void 0)??t(this._parsedProps.layer??\"top\")]}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_smtpad.get(this.pcb_smtpad_id);if(e.shape===\"rect\")return{center:{x:e.x,y:e.y},bounds:{left:e.x-e.width/2,top:e.y+e.height/2,right:e.x+e.width/2,bottom:e.y-e.height/2},width:e.width,height:e.height};if(e.shape===\"rotated_rect\"){const{width:n,height:o,xExtent:i,yExtent:r}=F0e({width:e.width,height:e.height,ccwRotationDegrees:e.ccw_rotation});return{center:{x:e.x,y:e.y},bounds:{left:e.x-i,right:e.x+i,top:e.y-r,bottom:e.y+r},width:n,height:o}}if(e.shape===\"circle\")return{center:{x:e.x,y:e.y},bounds:{left:e.x-e.radius,top:e.y-e.radius,right:e.x+e.radius,bottom:e.y+e.radius},width:e.radius*2,height:e.radius*2};if(e.shape===\"polygon\"){const n=e.points,o=n.map(c=\u003ec.x),i=n.map(c=\u003ec.y),r=Math.min(...o),s=Math.max(...o),a=Math.min(...i),A=Math.max(...i);return{center:{x:(r+s)/2,y:(a+A)/2},bounds:{left:r,top:A,right:s,bottom:a},width:s-r,height:A-a}}if(e.shape===\"pill\"){const n=e.width/2,o=e.height/2;return{center:{x:e.x,y:e.y},bounds:{left:e.x-n,top:e.y-o,right:e.x+n,bottom:e.y+o},width:e.width,height:e.height}}if(e.shape===\"rotated_pill\"){const{width:n,height:o,xExtent:i,yExtent:r}=F0e({width:e.width,height:e.height,ccwRotationDegrees:e.ccw_rotation});return{center:{x:e.x,y:e.y},bounds:{left:e.x-i,right:e.x+i,top:e.y-r,bottom:e.y+r},width:n,height:o}}throw new Error(`circuitJson bounds calculation not implemented for shape \"${e.shape}\"`)}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_smtpad.update(this.pcb_smtpad_id,{x:t.x,y:t.y});const n=e.pcb_solder_paste.list().find(o=\u003eo.pcb_smtpad_id===this.pcb_smtpad_id);n\u0026\u0026e.pcb_solder_paste.update(n.pcb_solder_paste_id,{x:t.x,y:t.y}),this.matchedPort?._setPositionFromLayout(t)}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_smtpad_id)return;const o=n.pcb_smtpad.get(this.pcb_smtpad_id);if(o.shape===\"rect\"||o.shape===\"circle\"||o.shape===\"rotated_rect\"||o.shape===\"pill\"||o.shape===\"rotated_pill\")this._setPositionFromLayout({x:o.x+t,y:o.y+e});else if(o.shape===\"polygon\"){n.pcb_smtpad.update(this.pcb_smtpad_id,{points:o.points.map(r=\u003e({x:r.x+t,y:r.y+e}))});const i={x:this._getPcbCircuitJsonBounds().center.x+t/2,y:this._getPcbCircuitJsonBounds().center.y+e/2};this.matchedPort?._setPositionFromLayout(i)}}},iPe=class extends Ir{isPrimitiveContainer=!0;schematic_symbol_id;userCoordinateToResizedSymbolTransformMat;schematicSymbolBoundsInUserCoordinates;get config(){return{componentName:\"Symbol\",zodProps:DPn}}hasExplicitSize(){const{_parsedProps:t}=this;return t.width!==void 0||t.height!==void 0}doInitialSymbolContainerRender(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,o=this.getParentNormalComponent()?._parsedProps?.kicadSymbolMetadata,i=t.schematic_symbol.insert({name:e.name,metadata:o?{kicad_symbol:o}:void 0});this.schematic_symbol_id=i.schematic_symbol_id}getSchematicSymbolBounds(){return this.schematicSymbolBoundsInUserCoordinates?this.schematicSymbolBoundsInUserCoordinates:(this._computeSchematicSymbolBounds(),this.schematicSymbolBoundsInUserCoordinates??null)}getUserCoordinateToResizedSymbolTransform(){return this.hasExplicitSize()?this.userCoordinateToResizedSymbolTransformMat?this.userCoordinateToResizedSymbolTransformMat:(this._computeUserCoordinateToResizedSymbolTransform(),this.userCoordinateToResizedSymbolTransformMat??null):null}_computeSchematicSymbolBounds(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,e=[];for(const o of this.children){if(o.componentName===\"Port\"){const i=o.schematic_port_id;if(i){const r=t.schematic_port.get(i);r\u0026\u0026e.push(r)}continue}if(o.isSchematicPrimitive){if(o.componentName===\"SchematicLine\"){const i=t.schematic_line.get(o.schematic_line_id);i\u0026\u0026e.push(i)}else if(o.componentName===\"SchematicRect\"){const i=t.schematic_rect.get(o.schematic_rect_id);i\u0026\u0026e.push(i)}else if(o.componentName===\"SchematicCircle\"){const i=t.schematic_circle.get(o.schematic_circle_id);i\u0026\u0026e.push(i)}else if(o.componentName===\"SchematicArc\"){const i=t.schematic_arc.get(o.schematic_arc_id);i\u0026\u0026e.push(i)}else if(o.componentName===\"SchematicText\"){const i=t.schematic_text.get(o.schematic_text_id);i\u0026\u0026e.push(i)}else if(o.componentName===\"SchematicPath\"){const i=o.schematic_path_ids;if(i)for(const r of i){const s=t.schematic_path.get(r);s\u0026\u0026e.push(s)}}}}if(e.length===0)return;const n=Gj(e);this.schematicSymbolBoundsInUserCoordinates=n}_computeUserCoordinateToResizedSymbolTransform(){const t=this.getSchematicSymbolBounds();if(!t)return;const{_parsedProps:e}=this,n=e.width,o=e.height;if(n===void 0\u0026\u0026o===void 0)return;const i=t.maxX-t.minX,r=t.maxY-t.minY;if(i===0\u0026\u0026r===0)return;const s=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2,A=n!==void 0\u0026\u0026i\u003e0?n/i:1,c=o!==void 0\u0026\u0026r\u003e0?o/r:1,l=this._getGlobalSchematicPositionBeforeLayout();this.userCoordinateToResizedSymbolTransformMat=D0(M0(l.x,l.y),FV(A,c),M0(-s,-a))}},q7o=({elm:t,pinLabels:e,layer:n,readableRotation:o,anchorAlignment:i})=\u003e{const r=t.text.replace(/[{}]/g,\"\").toLowerCase();let s=r;if(Array.isArray(e)){const A=parseInt(r.replace(/[^\\d]/g,\"\"),10)-1;s=String(e[A]??r)}else typeof e==\"object\"\u0026\u0026(s=String(e[r]??r));const a=new oPe({anchorAlignment:i||\"center\",text:s??r,layer:n||\"top\",pcbX:isNaN(t.anchor_position.x)?0:t.anchor_position.x,pcbY:t.anchor_position.y,pcbRotation:o??0});return a._footprinterFontSize=t.font_size+.2,a},X7o=(t,e)=\u003e{const n=parseInt(t||\"0\",10);let o;return e!=null?o=e-n:o=n,(o%360+360)%360},_O=t=\u003et??void 0,Z7o=t=\u003e{for(const e of t??[]){if(/^\\d+$/.test(e))return Number(e);const n=/^pin(\\d+)$/i.exec(e);if(n)return Number(n[1])}},e6o=t=\u003e{switch(t){case\"left\":case\"right\":return t;case\"top\":return\"up\";case\"bottom\":return\"down\"}return null},t6o=[\"schematic_line\",\"schematic_rect\",\"schematic_circle\",\"schematic_arc\",\"schematic_path\"],n6o=t=\u003et6o.includes(t.type),sDt=t=\u003e{if(\"schematic_symbol_id\"in t)return typeof t.schematic_symbol_id==\"string\"?t.schematic_symbol_id:void 0},Db=({componentName:t,componentRotation:e,footprinterString:n,pinLabels:o,pcbPinLabels:i},r)=\u003e{const s=[],a=new Map,A=new Map,c=new Map,l=new Map,u=new Map,g=new Map;for(const p of r)if(p.type===\"pcb_component\"\u0026\u0026typeof p.source_component_id==\"string\"\u0026\u0026c.set(p.pcb_component_id,p.source_component_id),p.type===\"source_port\"\u0026\u0026(l.set(p.source_port_id,p),typeof p.pin_number==\"number\"\u0026\u0026typeof p.source_component_id==\"string\")){let m=u.get(p.source_component_id);m||(m=new Map,u.set(p.source_component_id,m)),m.set(p.pin_number,p)}const h=(p,m)=\u003e{const _=Z7o(p),f=typeof m==\"string\"?c.get(m):void 0,I=typeof _==\"number\"\u0026\u0026f?u.get(f)?.get(_):void 0;if(!I)return p;const C=Array.from(new Set([...p??[],...I.port_hints??[],I.name].filter(y=\u003etypeof y==\"string\"\u0026\u0026y.length\u003e0)));return C.length\u003e0?C:p};for(const p of r){if(p.type!==\"schematic_symbol\")continue;const m=new iPe({name:p.name});a.set(p.schematic_symbol_id,m),s.push(m)}for(const p of r){if(!n6o(p))continue;const m=sDt(p),_=p.stroke_width;!m||typeof _!=\"number\"||!Number.isFinite(_)||g.has(m)||g.set(m,_)}for(const p of r)p.type===\"schematic_component\"\u0026\u0026A.set(p.schematic_component_id,p);const d=(p,m)=\u003e{const _=sDt(p)??(\"schematic_component_id\"in p\u0026\u0026typeof p.schematic_component_id==\"string\"?A.get(p.schematic_component_id)?.schematic_symbol_id:void 0),f=typeof _==\"string\"?a.get(_):void 0;f?f.add(m):s.push(m)};for(const p of r){const m=\"port_hints\"in p?h(p.port_hints,\"pcb_component_id\"in p?p.pcb_component_id:void 0):void 0;if(p.type===\"pcb_smtpad\"\u0026\u0026p.shape===\"rect\")s.push(new Mb({pcbX:p.x,pcbY:p.y,layer:p.layer,shape:\"rect\",height:p.height,width:p.width,portHints:m,rectBorderRadius:p.rect_border_radius}));else if(p.type===\"pcb_smtpad\"\u0026\u0026p.shape===\"circle\")s.push(new Mb({pcbX:p.x,pcbY:p.y,layer:p.layer,shape:\"circle\",radius:p.radius,portHints:m}));else if(p.type===\"pcb_smtpad\"\u0026\u0026p.shape===\"pill\")s.push(new Mb({shape:\"pill\",height:p.height,width:p.width,radius:p.radius,portHints:m,pcbX:p.x,pcbY:p.y,layer:p.layer}));else if(p.type===\"pcb_smtpad\"\u0026\u0026p.shape===\"rotated_pill\")s.push(new Mb({shape:\"rotated_pill\",height:p.height,width:p.width,radius:p.radius,portHints:m,pcbX:p.x,pcbY:p.y,layer:p.layer,ccwRotation:p.ccw_rotation}));else if(p.type===\"pcb_smtpad\"\u0026\u0026p.shape===\"rotated_rect\")s.push(new Mb({pcbX:p.x,pcbY:p.y,layer:p.layer,shape:\"rotated_rect\",height:p.height,width:p.width,ccwRotation:p.ccw_rotation,cornerRadius:p.corner_radius,portHints:m}));else if(p.type===\"pcb_smtpad\"\u0026\u0026p.shape===\"polygon\")s.push(new Mb({shape:\"polygon\",points:p.points,portHints:m,layer:p.layer}));else if(p.type===\"pcb_silkscreen_path\")s.push(new iDt({layer:p.layer,route:p.route,strokeWidth:p.stroke_width}));else if(p.type===\"pcb_copper_text\")s.push(new FMt({text:p.text,pcbX:p.anchor_position.x,pcbY:p.anchor_position.y,pcbRotation:p.ccw_rotation,anchorAlignment:p.anchor_alignment,fontSize:p.font_size,layer:p.layer,mirrored:p.is_mirrored,knockout:p.is_knockout}));else if(p.type===\"pcb_plated_hole\")p.shape===\"circle\"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:\"circle\",holeDiameter:p.hole_diameter,outerDiameter:p.outer_diameter,portHints:m})):p.shape===\"circular_hole_with_rect_pad\"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:\"circular_hole_with_rect_pad\",holeDiameter:p.hole_diameter,rectPadHeight:p.rect_pad_height,rectPadWidth:p.rect_pad_width,portHints:m,rectBorderRadius:p.rect_border_radius,holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y})):p.shape===\"pill\"||p.shape===\"oval\"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:p.shape,holeWidth:p.hole_width,holeHeight:p.hole_height,outerWidth:p.outer_width,outerHeight:p.outer_height,portHints:m})):p.shape===\"pill_hole_with_rect_pad\"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:\"pill_hole_with_rect_pad\",holeShape:\"pill\",padShape:\"rect\",holeWidth:p.hole_width,holeHeight:p.hole_height,rectPadWidth:p.rect_pad_width,rectPadHeight:p.rect_pad_height,rectBorderRadius:p.rect_border_radius,portHints:m,holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y})):p.shape===\"rotated_pill_hole_with_rect_pad\"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:\"pill_hole_with_rect_pad\",holeShape:\"pill\",padShape:\"rect\",holeWidth:p.hole_width,holeHeight:p.hole_height,rectPadWidth:p.rect_pad_width,rectPadHeight:p.rect_pad_height,rectBorderRadius:p.rect_border_radius,portHints:m,holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y,pcbRotation:p.hole_ccw_rotation})):p.shape===\"hole_with_polygon_pad\"\u0026\u0026s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:\"hole_with_polygon_pad\",holeShape:p.hole_shape||\"circle\",holeDiameter:p.hole_diameter,holeWidth:p.hole_width,holeHeight:p.hole_height,padOutline:p.pad_outline||[],holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y,portHints:m}));else if(p.type===\"pcb_keepout\"\u0026\u0026p.shape===\"circle\")s.push(new k0e({pcbX:p.center.x,pcbY:p.center.y,shape:\"circle\",radius:p.radius}));else if(p.type===\"pcb_keepout\"\u0026\u0026p.shape===\"rect\")s.push(new k0e({pcbX:p.center.x,pcbY:p.center.y,shape:\"rect\",width:p.width,height:p.height}));else if(p.type===\"pcb_hole\"\u0026\u0026p.hole_shape===\"circle\")s.push(new mO({pcbX:p.x,pcbY:p.y,diameter:p.hole_diameter}));else if(p.type===\"pcb_hole\"\u0026\u0026p.hole_shape===\"rect\")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:\"rect\",width:p.hole_width,height:p.hole_height}));else if(p.type===\"pcb_hole\"\u0026\u0026p.hole_shape===\"pill\")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:\"pill\",width:p.hole_width,height:p.hole_height}));else if(p.type===\"pcb_hole\"\u0026\u0026p.hole_shape===\"oval\")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:\"oval\",width:p.hole_width,height:p.hole_height}));else if(p.type===\"pcb_hole\"\u0026\u0026p.hole_shape===\"rotated_pill\")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:\"pill\",width:p.hole_width,height:p.hole_height,pcbRotation:p.ccw_rotation}));else if(p.type===\"pcb_cutout\")p.shape===\"rect\"?s.push(new T0e({pcbX:p.center.x,pcbY:p.center.y,shape:\"rect\",width:p.width,height:p.height})):p.shape===\"circle\"?s.push(new T0e({pcbX:p.center.x,pcbY:p.center.y,shape:\"circle\",radius:p.radius})):p.shape===\"polygon\"\u0026\u0026s.push(new T0e({shape:\"polygon\",points:p.points}));else if(p.type===\"pcb_silkscreen_text\"){const _=X7o(e,p.ccw_rotation);if((n?.includes(\"pinrow\")||n?.includes(\"headermodule\"))\u0026\u0026p.text.includes(\"PIN\"))s.push(q7o({elm:p,pinLabels:i??o??{},layer:p.layer,readableRotation:_,anchorAlignment:p.anchor_alignment}));else{const f=new oPe({anchorAlignment:p.anchor_alignment||\"center\",text:n?.includes(\"silkscreenlabel(\")\u0026\u0026p.text!==\"{REF}\"\u0026\u0026p.text!==\"{NAME}\"\u0026\u0026p.text!==\"{REFERENCE}\"?p.text:t||p.text,pcbX:Number.isNaN(p.anchor_position.x)?0:p.anchor_position.x,pcbY:p.anchor_position.y,pcbRotation:_??0});f._footprinterFontSize=p.font_size+.2,s.push(f)}}else if(p.type===\"pcb_trace\")s.push(new tPe({route:p.route}));else if(p.type===\"pcb_via\"){const _=Sne.parse(p),f=p.layers??[],I=new jMt({pcbX:p.x,pcbY:p.y,holeDiameter:p.hole_diameter,outerDiameter:p.outer_diameter,fromLayer:p.from_layer??f[0],toLayer:p.to_layer??f[f.length-1],layers:f,netIsAssignable:p.net_is_assignable,tentedOnTop:_.tented_on_top,tentedOnBottom:_.tented_on_bottom});I._importedPcbTraceId=p.pcb_trace_id,s.push(I)}else if(p.type===\"pcb_silkscreen_rect\")s.push(new rDt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,layer:p.layer,strokeWidth:p.stroke_width,filled:p.is_filled,cornerRadius:p.corner_radius}));else if(p.type===\"pcb_silkscreen_circle\")s.push(new nDt({pcbX:p.center.x,pcbY:p.center.y,radius:p.radius,layer:p.layer,strokeWidth:p.stroke_width}));else if(p.type===\"pcb_silkscreen_line\")s.push(new oDt({x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,layer:p.layer,strokeWidth:p.stroke_width}));else if(p.type===\"pcb_fabrication_note_text\")s.push(new KMt({pcbX:p.anchor_position.x,pcbY:p.anchor_position.y,text:p.text,fontSize:p.font_size,anchorAlignment:p.anchor_alignment,color:p.color,font:p.font,layer:p.layer,pcbRotation:p.ccw_rotation}));else if(p.type===\"pcb_fabrication_note_path\")s.push(new GMt({route:p.route,strokeWidth:p.stroke_width,color:p.color,layer:p.layer}));else if(p.type===\"pcb_fabrication_note_rect\")s.push(new YMt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,strokeWidth:p.stroke_width,isFilled:p.is_filled,color:p.color,layer:p.layer,cornerRadius:p.corner_radius,hasStroke:p.has_stroke,isStrokeDashed:p.is_stroke_dashed}));else if(p.type===\"pcb_note_text\")s.push(new WMt({pcbX:p.anchor_position.x,pcbY:p.anchor_position.y,text:p.text??\"\",fontSize:p.font_size,anchorAlignment:p.anchor_alignment,color:p.color,font:p.font}));else if(p.type===\"pcb_note_rect\")s.push(new JMt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,strokeWidth:p.stroke_width,isFilled:p.is_filled,color:p.color,cornerRadius:p.corner_radius,hasStroke:p.has_stroke,isStrokeDashed:p.is_stroke_dashed}));else if(p.type===\"pcb_note_path\")s.push(new zMt({route:p.route,strokeWidth:p.stroke_width,color:p.color}));else if(p.type===\"pcb_note_line\")s.push(new VMt({x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,strokeWidth:p.stroke_width,color:p.color,isDashed:p.is_dashed}));else if(p.type===\"pcb_courtyard_rect\")s.push(new OMt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,pcbRotation:p.ccw_rotation,layer:p.layer}));else if(p.type===\"pcb_courtyard_circle\")s.push(new LMt({pcbX:p.center.x,pcbY:p.center.y,radius:p.radius,layer:p.layer}));else if(p.type===\"pcb_courtyard_outline\")s.push(new HMt({outline:p.outline,layer:p.layer}));else if(p.type===\"schematic_line\")d(p,new nPe({x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,strokeWidth:_O(p.stroke_width),color:p.color,isDashed:p.is_dashed}));else if(p.type===\"schematic_rect\")d(p,new eDt({schX:p.center.x,schY:p.center.y,width:p.width,height:p.height,rotation:p.rotation,strokeWidth:_O(p.stroke_width),color:p.color,isFilled:p.is_filled,fillColor:p.fill_color,isDashed:p.is_dashed}));else if(p.type===\"schematic_circle\")d(p,new XMt({center:p.center,radius:p.radius,strokeWidth:_O(p.stroke_width),color:p.color,isFilled:p.is_filled,fillColor:p.fill_color,isDashed:p.is_dashed}));else if(p.type===\"schematic_arc\")d(p,new qMt({center:p.center,radius:p.radius,startAngleDegrees:p.start_angle_degrees,endAngleDegrees:p.end_angle_degrees,direction:p.direction,strokeWidth:_O(p.stroke_width),color:p.color,isDashed:p.is_dashed}));else if(p.type===\"schematic_text\")d(p,new tDt({schX:p.position.x,schY:p.position.y,text:p.text,fontSize:p.font_size,anchor:p.anchor,color:p.color,schRotation:p.rotation}));else if(p.type===\"schematic_path\")d(p,new ZMt({points:p.points,strokeWidth:_O(p.stroke_width),strokeColor:p.stroke_color,dashLength:p.dash_length,dashGap:p.dash_gap,isFilled:p.is_filled,fillColor:p.fill_color}));else if(p.type===\"schematic_port\"){const _=p.schematic_component_id;if(typeof _!=\"string\")continue;const f=A.get(_),I=f?.schematic_symbol_id,C=typeof I==\"string\"?a.get(I):void 0;if(C\u0026\u0026f?.is_box_with_pins===!0\u0026\u0026p.center\u0026\u0026p.side_of_component){const y=p.distance_from_component_edge,x=e6o(p.side_of_component);if(!x)continue;const E=Jk(x),B=p.facing_direction===x?1:-1,S={x:p.center.x+E.x*y*B,y:p.center.y+E.y*y*B},Q=l.get(p.source_port_id),w=Array.from(new Set([p.display_pin_label,Q?.name,...Q?.port_hints??[]].filter(R=\u003etypeof R==\"string\"\u0026\u0026R.length\u003e0))),M=p.pin_number?`pin${p.pin_number}`:p.schematic_port_id,k=w[0]??p.source_port_id??M;C.add(new Pu({pinNumber:p.pin_number,name:k,aliases:w,schX:p.center.x,schY:p.center.y,direction:x})),C.add(new nPe({x1:p.center.x,y1:p.center.y,x2:S.x,y2:S.y,strokeWidth:typeof I==\"string\"?_O(g.get(I)):void 0,isDashed:!1}))}}}return s},o6o=[\"Silkscreen\",\"PcbNote\",\"Courtyard\",\"FabricationNote\"];function L0e(t){let e=1/0,n=1/0,o=-1/0,i=-1/0,r=!1;for(const A of t)if(A.isPcbPrimitive\u0026\u0026!o6o.some(c=\u003eA.componentName.startsWith(c))){const c=A._getPcbLocalBoundsBeforeLayout(),u=[{x:c.left,y:c.bottom},{x:c.right,y:c.bottom},{x:c.right,y:c.top},{x:c.left,y:c.top}].map(d=\u003ets(A._computePcbGlobalTransformBeforeLayout(),d)),g=u.map(d=\u003ed.x),h=u.map(d=\u003ed.y);e=Math.min(e,...g),n=Math.min(n,...h),o=Math.max(o,...g),i=Math.max(i,...h),r=!0}else if(A.children.length\u003e0){const c=L0e(A.children);(c.width\u003e0||c.height\u003e0)\u0026\u0026(e=Math.min(e,c.minX),n=Math.min(n,c.minY),o=Math.max(o,c.maxX),i=Math.max(i,c.maxY),r=!0)}if(!r)return{minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};let s=o-e,a=i-n;return s\u003c0\u0026\u0026(s=0),a\u003c0\u0026\u0026(a=0),{minX:e,minY:n,maxX:o,maxY:i,width:s,height:a}}var H0e=t=\u003e{const e=t.find(n=\u003e/^(pin)?\\d+$/.test(n));return e?Number.parseInt(e.replace(/^pin/,\"\")):null};function O0e(t,e){const n=H0e(t);if(!n)return null;const i=[...t.filter(r=\u003er.toString()!==n.toString()\u0026\u0026r!==`pin${n}`\u0026\u0026r.trim()!==\"\"),...e?.additionalAliases?.[`pin${n}`]??[]];return new Pu({pinNumber:n,aliases:i})}function gw(t){return t?Array.isArray(t)?t:t.pins??[]:[]}var aDt=t=\u003e{for(const e of[\"leftSide\",\"rightSide\",\"topSide\",\"bottomSide\"])if(e in t\u0026\u0026typeof t[e]==\"number\")throw new Error(`A number was specified for \"${e}\", you probably meant to use \"size\" not \"side\"`);return\"leftSide\"in t||\"rightSide\"in t||\"topSide\"in t||\"bottomSide\"in t},rPe=t=\u003e!t||!aDt(t)?[]:[...gw(t.leftSide),...gw(t.rightSide),...gw(t.topSide),...gw(t.bottomSide)],i6o=t=\u003e{if(aDt(t))return{leftSize:gw(t.leftSide).length,rightSize:gw(t.rightSide).length,topSize:gw(t.topSide).length,bottomSize:gw(t.bottomSide).length};const{leftSize:e=0,rightSize:n=0,topSize:o=0,bottomSize:i=0}=t;return{leftSize:e,rightSize:n,topSize:o,bottomSize:i}},G0e=.4,ADt=.1,cDt=.1,r6o=t=\u003etypeof t==\"string\"?t:t?.[0]??\"\",s6o=t=\u003eArray.from(r6o(t)).length*ADt;function lDt(t){const e=t;return e.leftSide!==void 0||e.rightSide!==void 0||e.topSide!==void 0||e.bottomSide!==void 0}var sPe=t=\u003e{const e=t.portDistanceFromEdge??.4;let n=t.schPortArrangement?i6o(t.schPortArrangement):null;const o={left:0,right:0,top:0,bottom:0};let i=t.pinCount??null;if(i===null)if(n)i=n.leftSize+n.rightSize+n.topSize;else throw new Error(\"Could not determine pin count for the schematic box\");if(i\u0026\u0026!n){const d=Math.floor(i/2);n={leftSize:i-d,rightSize:d,topSize:0,bottomSize:0}}n||(n={leftSize:0,rightSize:0,topSize:0,bottomSize:0});const r=({side:d,sideIndex:p,truePinIndex:m})=\u003e{if(!t.schPortArrangement||!lDt(t.schPortArrangement))return m+1;const _={left:\"top-to-bottom\",bottom:\"left-to-right\",right:\"bottom-to-top\",top:\"right-to-left\"}[d],f=t.schPortArrangement?.[`${d}Side`]?.direction??_,I=t.schPortArrangement?.[`${d}Side`]?.pins;let C=p;return f!==_\u0026\u0026(C=I.length-p-1),hO(I[C],t.pinLabels)},s=[];let a=0,A=0;for(let d=0;d\u003cn.leftSize;d++){const p=r({side:\"left\",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.topMargin\u0026\u0026(a+=m.topMargin),s.push({trueIndex:p-1,pinNumber:p,side:\"left\",distanceFromOrthogonalEdge:a}),m?.bottomMargin\u0026\u0026(a+=m.bottomMargin),d===n.leftSize-1?o.left=a:a+=t.schPinSpacing,A++}a=0;for(let d=0;d\u003cn.bottomSize;d++){const p=r({side:\"bottom\",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.leftMargin\u0026\u0026(a+=m.leftMargin),s.push({trueIndex:p-1,pinNumber:p,side:\"bottom\",distanceFromOrthogonalEdge:a}),m?.rightMargin\u0026\u0026(a+=m.rightMargin),d===n.bottomSize-1?o.bottom=a:a+=t.schPinSpacing,A++}a=0;for(let d=0;d\u003cn.rightSize;d++){const p=r({side:\"right\",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.bottomMargin\u0026\u0026(a+=m.bottomMargin),s.push({trueIndex:p-1,pinNumber:p,side:\"right\",distanceFromOrthogonalEdge:a}),m?.topMargin\u0026\u0026(a+=m.topMargin),d===n.rightSize-1?o.right=a:a+=t.schPinSpacing,A++}a=0;for(let d=0;d\u003cn.topSize;d++){const p=r({side:\"top\",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.rightMargin\u0026\u0026(a+=m.rightMargin),s.push({trueIndex:p-1,pinNumber:p,side:\"top\",distanceFromOrthogonalEdge:a}),m?.leftMargin\u0026\u0026(a+=m.leftMargin),d===n.topSize-1?o.top=a:a+=t.schPinSpacing,A++}let c=t.schWidth;if(c===void 0){c=Math.max(o.top+G0e,o.bottom+G0e),t.pinLabels\u0026\u0026s.filter(I=\u003eI.side===\"left\"||I.side===\"right\").some(I=\u003et.pinLabels?.[`pin${I.pinNumber}`]||t.pinLabels?.[I.pinNumber])\u0026\u0026(c=Math.max(c,.5));const d=t.pinLabels?Math.max(...Object.values(t.pinLabels).map(_=\u003e_.length*ADt)):0,p=d\u003e0?1.1:0;c=Math.max(c,d+p);const m={left:0,right:0};for(const _ of s){if(_.side!==\"left\"\u0026\u0026_.side!==\"right\")continue;const f=t.pinLabels?.[`pin${_.pinNumber}`]??t.pinLabels?.[_.pinNumber];m[_.side]=Math.max(m[_.side],s6o(f))}c=Math.max(c,m.left+m.right+2*cDt)}let l=t.schHeight;if(l||(l=Math.max(o.left+G0e,o.right+G0e)),t.pinLabels){const p=cDt,m=.075,_=w=\u003e{const M=t.pinLabels[`pin${w}`]??t.pinLabels[`${w}`];return M?M.length*.13:0},f=s.filter(w=\u003ew.side===\"left\").map(w=\u003e({y:o.left/2-w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=\u003ew.len\u003e0),I=s.filter(w=\u003ew.side===\"right\").map(w=\u003e({y:-o.right/2+w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=\u003ew.len\u003e0),C=s.filter(w=\u003ew.side===\"top\").map(w=\u003e({x:o.top/2-w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=\u003ew.len\u003e0),y=s.filter(w=\u003ew.side===\"bottom\").map(w=\u003e({x:-o.bottom/2+w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=\u003ew.len\u003e0),x=(w,M)=\u003eMath.min(w.maxX,M.maxX)\u003eMath.max(w.minX,M.minX)\u0026\u0026Math.min(w.maxY,M.maxY)\u003eMath.max(w.minY,M.minY),E=(w,M)=\u003e({minX:-M/2+p,maxX:-M/2+p+w.len,minY:w.y-m,maxY:w.y+m}),B=(w,M)=\u003e({minX:M/2-p-w.len,maxX:M/2-p,minY:w.y-m,maxY:w.y+m}),S=(w,M)=\u003e({minX:w.x-m,maxX:w.x+m,minY:M/2-p-w.len,maxY:M/2-p}),Q=(w,M)=\u003e({minX:w.x-m,maxX:w.x+m,minY:-M/2+p,maxY:-M/2+p+w.len});if(!t.schHeight){let w=!1;for(const M of C)for(const k of y)x(S(M,l),Q(k,l))\u0026\u0026(w=!0,l=Math.max(l,M.len+k.len+2*p));if(w){for(const M of C){const k=S(M,l);for(const R of f){const F=E(R,c);x(k,F)\u0026\u0026(l=Math.max(l,2*(F.maxY+p+M.len)))}for(const R of I){const F=B(R,c);x(k,F)\u0026\u0026(l=Math.max(l,2*(F.maxY+p+M.len)))}}for(const M of y){const k=Q(M,l);for(const R of f){const F=E(R,c);x(k,F)\u0026\u0026(l=Math.max(l,2*(p+M.len-F.minY)))}for(const R of I){const F=B(R,c);x(k,F)\u0026\u0026(l=Math.max(l,2*(p+M.len-F.minY)))}}}}}const u={left:{x:-c/2-e,y:o.left/2},bottom:{x:-o.bottom/2,y:-l/2-e},right:{x:c/2+e,y:-o.right/2},top:{x:o.top/2,y:l/2+e}},g={left:{x:0,y:-1},right:{x:0,y:1},top:{x:-1,y:0},bottom:{x:1,y:0}},h=s.map(d=\u003e{const{distanceFromOrthogonalEdge:p,side:m}=d,_=u[m],f=g[m];return{x:_.x+p*f.x,y:_.y+p*f.y,...d}});return{getPortPositionByPinNumber(d){const p=h.find(m=\u003em.pinNumber.toString()===d.toString());return p||null},getSize(){return{width:c,height:l}},getSizeIncludingPins(){return{width:c+(n.leftSize||n.rightSize?.4:0),height:l+(n.topSize||n.bottomSize?.4:0)}},pinCount:i}},Kj=(t,e)=\u003e{if(!t)return;const n={};for(const[o,i]of Object.entries(t)){const r=hO(o,e),s=i.marginLeft??i.leftMargin,a=i.marginRight??i.rightMargin,A=i.marginTop??i.topMargin,c=i.marginBottom??i.bottomMargin,u={...n[`pin${r}`]??{}};s!==void 0\u0026\u0026(u.leftMargin=lt.parse(s)),a!==void 0\u0026\u0026(u.rightMargin=lt.parse(a)),A!==void 0\u0026\u0026(u.topMargin=lt.parse(A)),c!==void 0\u0026\u0026(u.bottomMargin=lt.parse(c)),n[`pin${r}`]=u}return n},a6o=t=\u003et===\"schematic_symbol\"||t===\"schematic_component\"||t===\"schematic_line\"||t===\"schematic_rect\"||t===\"schematic_circle\"||t===\"schematic_arc\"||t===\"schematic_text\"||t===\"schematic_path\",aPe=t=\u003eArray.isArray(t)\u0026\u0026t.length\u003e0\u0026\u0026t.some(e=\u003ea6o(e.type)),APe=t=\u003etypeof t?.x==\"number\"\u0026\u0026Number.isFinite(t.x)\u0026\u0026typeof t.y==\"number\"\u0026\u0026Number.isFinite(t.y),cPe=(t,e)=\u003e({x:t.x-e.x,y:t.y-e.y}),A6o=t=\u003et.type===\"schematic_component\"||t.type===\"schematic_port\"||t.type===\"schematic_line\"||t.type===\"schematic_rect\"||t.type===\"schematic_circle\"||t.type===\"schematic_arc\"||t.type===\"schematic_text\"||t.type===\"schematic_path\",c6o=t=\u003e{const e=t.find(i=\u003ei.type===\"schematic_component\"\u0026\u0026APe(i.center));if(e)return e.center;const n=t.filter(A6o);if(n.length===0)return null;const o=Gj(n);return!Number.isFinite(o.minX)||!Number.isFinite(o.maxX)||!Number.isFinite(o.minY)||!Number.isFinite(o.maxY)?null:{x:(o.minX+o.maxX)/2,y:(o.minY+o.maxY)/2}},l6o=(t,e)=\u003e{switch(t.type){case\"schematic_component\":case\"schematic_port\":case\"schematic_rect\":case\"schematic_circle\":case\"schematic_arc\":return APe(t.center)?{...t,center:cPe(t.center,e)}:t;case\"schematic_line\":return{...t,x1:t.x1-e.x,y1:t.y1-e.y,x2:t.x2-e.x,y2:t.y2-e.y};case\"schematic_text\":return APe(t.position)?{...t,position:cPe(t.position,e)}:t;case\"schematic_path\":return{...t,points:t.points.map(n=\u003ecPe(n,e))};default:return t}},u6o=t=\u003e{const e=c6o(t);return e?e.x===0\u0026\u0026e.y===0?[...t]:t.map(n=\u003el6o(n,e)):[...t]},uDt=t=\u003et.type===\"schematic_line\"||t.type===\"schematic_rect\"||t.type===\"schematic_circle\"||t.type===\"schematic_arc\"||t.type===\"schematic_text\"||t.type===\"schematic_path\",gDt=(t,e)=\u003e{if(!(e in t))return;const n=t[e];return typeof n==\"string\"?n:void 0},g6o=t=\u003e{const e=t.filter(g=\u003eg.type===\"schematic_symbol\"),n=t.filter(g=\u003eg.type===\"schematic_component\"),o=n.find(g=\u003etypeof g.schematic_symbol_id==\"string\")?.schematic_symbol_id??e[0]?.schematic_symbol_id,i=(o?n.find(g=\u003eg.schematic_symbol_id===o):void 0)??n[0],r=i?.schematic_component_id,s=typeof i?.source_component_id==\"string\"?i.source_component_id:void 0,a=(o?e.find(g=\u003eg.schematic_symbol_id===o):void 0)??e[0],A=new Set,c=new Set,l=[],u=g=\u003e{!g||c.has(g)||(c.add(g),l.push(g))};u(a),u(i);for(const g of t)g.type===\"schematic_port\"\u0026\u0026(!r||g.schematic_component_id!==r||(u(g),typeof g.source_port_id==\"string\"\u0026\u0026A.add(g.source_port_id)));for(const g of t){if(!uDt(g))continue;const h=gDt(g,\"schematic_symbol_id\"),d=gDt(g,\"schematic_component_id\");(o\u0026\u0026h===o||r\u0026\u0026d===r||!o\u0026\u0026!r)\u0026\u0026u(g)}for(const g of t)g.type===\"source_port\"\u0026\u0026(A.has(g.source_port_id)||s\u0026\u0026g.source_component_id===s)\u0026\u0026u(g);return l.length\u003e0?l:t.filter(g=\u003eg.type===\"schematic_symbol\"||g.type===\"schematic_component\"||g.type===\"schematic_port\"||uDt(g))},d6o=class extends Ir{isPrimitiveContainer=!0;get config(){return{componentName:\"CadAssembly\",zodProps:TMn}}},dDt=t=\u003e{if(!t)return null;const e=t.match(/#ext=(\\w+)$/);if(e)return e[1].toLowerCase();const o=t.split(\"?\")[0].split(\"#\")[0],i=o.split(\"/\").pop()??o;return i.includes(\".\")?i.split(\".\").pop()?.toLowerCase()??null:null},h6o=(t,e)=\u003e{const n=t.replace(/\\/+$/,\"\"),o=e.replace(/^\\/+/,\"\");return`${n}/${o}`},hDt=(t,e)=\u003e{if(!e||!t.startsWith(\"/\"))return t;try{const n=new URL(e);return n.pathname!==\"/\"\u0026\u0026t.startsWith(n.pathname)?new URL(t,n.origin).toString():h6o(e,t)}catch{return t}},lPe=xo([_t(),Z()]),pDt=Pt({x:lPe,y:lPe,z:lPe}),p6o=class extends Ir{get config(){return{componentName:\"CadModel\",zodProps:HMn}}doInitialCadModelRender(){const t=this._findParentWithPcbComponent();if(!t||!t.pcb_component_id)return;const{db:e}=this.root,{boardThickness:n=0}=t._getBoard()??{},o=t._getPcbCircuitJsonBounds();e.pcb_component.get(t.pcb_component_id);const i=this._parsedProps;if(!i||typeof i.modelUrl!=\"string\"\u0026\u0026typeof i.stepUrl!=\"string\")return;const r=t._computePcbGlobalTransformBeforeLayout(),a=O9(r).rotation.angle*180/Math.PI,A=i.pcbRotationOffset??i.rotationOffset,c=pDt.parse({x:0,y:0,z:0});if(typeof A==\"number\")c.z=Number(A);else if(typeof A==\"object\"){const I=pDt.parse(A);c.x=Number(I.x),c.y=Number(I.y),c.z=Number(I.z)}const{pcbX:l,pcbY:u}=this.getResolvedPcbPositionProp(),g=L9.parse({x:l,y:u,z:i.pcbZ??0,...typeof i.positionOffset==\"object\"?i.positionOffset:{}}),h=i.zOffsetFromSurface!==void 0?lt.parse(i.zOffsetFromSurface):0,d=t.props.layer===\"bottom\"?\"bottom\":\"top\",p=i.modelUrl?dDt(i.modelUrl):void 0,m=i.modelUrl?.replace(/#ext=\\w+$/,\"\"),_={};if(p===\"stl\"?_.model_stl_url=this._addCachebustToModelUrl(m):p===\"obj\"?_.model_obj_url=this._addCachebustToModelUrl(m):p===\"gltf\"?_.model_gltf_url=this._addCachebustToModelUrl(m):p===\"glb\"?_.model_glb_url=this._addCachebustToModelUrl(m):p===\"step\"||p===\"stp\"?_.model_step_url=this._addCachebustToModelUrl(m):p===\"wrl\"||p===\"vrml\"?_.model_wrl_url=this._addCachebustToModelUrl(m):_.model_stl_url=this._addCachebustToModelUrl(m),i.stepUrl){const I=this._addCachebustToModelUrl(i.stepUrl);I\u0026\u0026(_.model_step_url=I)}const f=e.cad_component.insert({position:{x:o.center.x+Number(g.x),y:o.center.y+Number(g.y),z:(d===\"bottom\"?-n/2:n/2)+(d===\"bottom\"?-h:h)+Number(g.z)},rotation:{x:Number(c.x),y:(d===\"top\"?0:180)+Number(c.y),z:k9(d===\"bottom\"?-(a+Number(c.z)):a+Number(c.z))},pcb_component_id:t.pcb_component_id,model_board_normal_direction:i.modelBoardNormalDirection,model_origin_alignment:\"center_of_component_on_board_surface\",anchor_alignment:\"center_of_component_on_board_surface\",model_origin_position:i.modelOriginPosition,size:i.size?L9.parse(i.size):void 0,source_component_id:t.source_component_id,model_unit_to_mm_scale_factor:typeof i.modelUnitToMmScale==\"number\"?i.modelUnitToMmScale:void 0,show_as_translucent_model:i.showAsTranslucentModel??t._parsedProps.showAsTranslucentModel,..._});this.cad_component_id=f.cad_component_id}_findParentWithPcbComponent(){let t=this.parent;for(;t\u0026\u0026!t.pcb_component_id;)t=t.parent;return t}_addCachebustToModelUrl(t){if(!t)return t;const e=this.root?.platform?.projectBaseUrl,n=hDt(t,e);if(!n.includes(\"modelcdn.tscircuit.com\"))return n;const o=this.root?.getClientOrigin()??\"\";return`${n}${n.includes(\"?\")?\"\u0026\":\"?\"}cachebust_origin=${encodeURIComponent(o)}`}},m6o=vc(\"tscircuit:core:footprint\"),Y0e=class extends Ir{get config(){return{componentName:\"Footprint\",zodProps:MPn}}doInitialPcbFootprintLayout(){if(this.root?.pcbDisabled)return;const t=this.children.filter(u=\u003eu.componentName===\"Constraint\");if(t.length===0)return;const{isFlipped:e}=this._getPcbPrimitiveFlippedHelpers(),n=u=\u003ee\u0026\u0026\"left\"in u\u0026\u0026\"right\"in u?{...u,left:u.right,right:u.left}:u,o=t.flatMap(u=\u003eu._getAllReferencedComponents().componentsWithSelectors).map(({component:u,selector:g,componentSelector:h,edge:d})=\u003e({component:u,selector:g,componentSelector:h,edge:d,bounds:u._getPcbCircuitJsonBounds()}));if(o.some(u=\u003eu.edge))throw new Error(\"edge constraints not implemented yet for footprint layout, contributions welcome!\");function i(u){return o.find(({selector:g})=\u003eg===u)}const r=new qpt,s={};function a(u){return u in s||(s[u]=new gse(u),r.addEditVariable(s[u],wg.weak)),s[u]}for(const{selector:u,bounds:g}of o){const h=a(`${u}_x`),d=a(`${u}_y`);r.suggestValue(h,g.center.x),r.suggestValue(d,g.center.y)}for(const u of t){const g=u._parsedProps;if(\"xDist\"in g){const{xDist:h,left:d,right:p,edgeToEdge:m,centerToCenter:_}=n(g),f=a(`${d}_x`),I=a(`${p}_x`),C=i(d)?.bounds,y=i(p)?.bounds;if(_){const x=new Gh(I,[-1,f]);r.addConstraint(new ux(x,V_.Eq,g.xDist,wg.required))}else if(m){const x=new Gh(I,-y.width/2,[-1,f],-C.width/2);r.addConstraint(new ux(x,V_.Eq,g.xDist,wg.required))}}else if(\"yDist\"in g){const{yDist:h,top:d,bottom:p,edgeToEdge:m,centerToCenter:_}=g,f=a(`${d}_y`),I=a(`${p}_y`),C=i(d)?.bounds,y=i(p)?.bounds;if(_){const x=new Gh(f,[-1,I]);r.addConstraint(new ux(x,V_.Eq,g.yDist,wg.required))}else if(m){const x=new Gh(f,C.height/2,[-1,I],-y.height/2);r.addConstraint(new ux(x,V_.Eq,g.yDist,wg.required))}}else if(\"sameY\"in g){const{for:h}=g;if(h.length\u003c2)continue;const d=h.map(m=\u003ea(`${m}_y`)),p=new Gh(...d.slice(1));r.addConstraint(new ux(p,V_.Eq,d[0],wg.required))}else if(\"sameX\"in g){const{for:h}=g;if(h.length\u003c2)continue;const d=h.map(m=\u003ea(`${m}_x`)),p=new Gh(...d.slice(1));r.addConstraint(new ux(p,V_.Eq,d[0],wg.required))}}r.updateVariables(),m6o.enabled\u0026\u0026(console.log(\"Solution to layout constraints:\"),console.table(Object.entries(s).map(([u,g])=\u003e({var:u,val:g.value()}))));const A={left:1/0,right:-1/0,top:-1/0,bottom:1/0};for(const{selector:u,bounds:{width:g,height:h}}of o){const d=a(`${u}_x`),p=a(`${u}_y`),m=d.value()-g/2,_=d.value()+g/2,f=p.value()+h/2,I=p.value()-h/2;A.left=Math.min(A.left,m),A.right=Math.max(A.right,_),A.top=Math.max(A.top,f),A.bottom=Math.min(A.bottom,I)}const c={x:-(A.right+A.left)/2,y:-(A.top+A.bottom)/2},l=this.getPrimitiveContainer()._getGlobalPcbPositionBeforeLayout();c.x+=l.x,c.y+=l.y;for(const{component:u,selector:g}of o){const h=a(`${g}_x`),d=a(`${g}_y`);u._setPositionFromLayout({x:h.value()+c.x,y:d.value()+c.y})}}},_6o=t=\u003e{const{db:e}=t.root;if(t.pcb_component_id){const n=e.pcb_component.get(t.pcb_component_id);return n?{width:n.width,height:n.height}:null}if(t.pcb_group_id){const n=e.pcb_group.get(t.pcb_group_id);if(!n)return null;if(n.outline\u0026\u0026n.outline.length\u003e0){const o=Oh(n.outline);return o?{width:o.maxX-o.minX,height:o.maxY-o.minY}:null}return{width:n.width??0,height:n.height??0}}return null},f6o=(t,e)=\u003e{const{db:n}=t.root,o=n.toArray();if(t.pcb_component_id){smt(o,t.pcb_component_id,e);return}if(t.source_group_id){Amt(o,t.source_group_id,e);return}throw new Error(`Cannot reposition component ${t.getString()}: no pcb_component_id or source_group_id`)},I6o=\"MARKED INTERNALLY CONNECTED\",C6o=.12,y6o=.05,mDt=.12,x6o=t=\u003e{const{db:e}=t.root,n={pcb_component_id:t.pcb_component_id};return e.pcb_fabrication_note_text.list(n).length\u003e0||e.pcb_fabrication_note_path.list(n).length\u003e0||e.pcb_fabrication_note_rect.list(n).length\u003e0||e.pcb_fabrication_note_dimension.list(n).length\u003e0},E6o=t=\u003e{let e={from:t[0],to:t[1],length:-1/0};for(let s=1;s\u003ct.length;s++){const a=t[s-1],A=t[s],c=Math.hypot(A.x-a.x,A.y-a.y);c\u003ee.length\u0026\u0026(e={from:a,to:A,length:c})}const n=e.to.x-e.from.x,o=e.to.y-e.from.y,i=Math.max(e.length,Number.EPSILON);let r=Math.atan2(o,n)*180/Math.PI;return r\u003e90\u0026\u0026(r-=180),r\u003c-90\u0026\u0026(r+=180),{anchorPosition:{x:(e.from.x+e.to.x)/2-o/i*mDt,y:(e.from.y+e.to.y)/2+n/i*mDt},ccwRotation:(r%360+360)%360}},B6o=t=\u003e{const e=t.root;if(!e||e.pcbDisabled||!t.pcb_component_id||t.componentName===\"SolderJumper\"||x6o(t))return;const{db:n}=e,o=n.pcb_component.get(t.pcb_component_id);if(!o)return;const i=o.layer;if(i!==\"top\"\u0026\u0026i!==\"bottom\")return;const r=t.getSubcircuit()?.subcircuit_id??void 0,s=t.getGroup()?.pcb_group_id??void 0;for(const a of t._getInternallyConnectedPins()){const A=a.flatMap(g=\u003e{if(!g?.pcb_port_id)return[];const h=n.pcb_port.get(g.pcb_port_id);return h?[{x:h.x,y:h.y}]:[]}),c=A.filter((g,h)=\u003eA.findIndex(d=\u003ed.x===g.x\u0026\u0026d.y===g.y)===h);if(c.length\u003c2)continue;const{anchorPosition:l,ccwRotation:u}=E6o(c);n.pcb_fabrication_note_path.insert({pcb_component_id:t.pcb_component_id,subcircuit_id:r,layer:i,route:c,stroke_width:y6o}),n.pcb_fabrication_note_text.insert({pcb_component_id:t.pcb_component_id,pcb_group_id:s,subcircuit_id:r,font:\"tscircuit2024\",font_size:C6o,text:I6o,ccw_rotation:u,layer:i,anchor_position:l,anchor_alignment:\"center\"})}},b6o={simple_ammeter:[\"A\"],simple_battery:[\"B\",\"BT\"],simple_capacitor:[\"C\"],simple_chip:[\"U\",\"IC\"],simple_connector:[\"J\",\"P\",\"CONN\"],simple_crystal:[\"Y\",\"X\"],simple_current_source:[\"I\",\"IS\"],simple_diode:[\"D\"],simple_fuse:[\"F\"],simple_inductor:[\"L\",\"FB\"],simple_interconnect:[\"ICN\"],simple_led:[\"D\",\"LED\"],simple_mosfet:[\"Q\"],simple_op_amp:[\"U\",\"IC\"],simple_pin_header:[\"J\",\"P\",\"JP\"],simple_pinout:[\"J\",\"P\"],simple_potentiometer:[\"RV\",\"RP\"],simple_power_source:[\"B\",\"BT\",\"V\",\"VS\"],simple_push_button:[\"SW\",\"S\"],simple_resistor:[\"R\"],simple_resonator:[\"Y\",\"X\"],simple_switch:[\"SW\",\"S\"],simple_test_point:[\"TP\"],simple_transistor:[\"Q\"],simple_voltage_probe:[\"VP\"],simple_voltage_source:[\"V\",\"VS\"]},_Dt=t=\u003e{if(t)return b6o[t]},S6o=t=\u003et.match(/^[A-Za-z]+/)?.[0]?.toUpperCase(),Q6o=[{prefix:\"J\",recommendation:\"a \u003cconnector /\u003e or \u003cjumper /\u003e\"},{prefix:\"Q\",recommendation:\"a \u003ctransistor /\u003e\"},{prefix:\"C\",recommendation:\"a \u003ccapacitor /\u003e\"},{prefix:\"R\",recommendation:\"a \u003cresistor /\u003e\"},{prefix:\"L\",recommendation:\"an \u003cinductor /\u003e\"},{prefix:\"Y\",recommendation:\"a \u003ccrystal /\u003e\"},{prefix:\"X\",recommendation:\"a \u003ccrystal /\u003e\"},{prefix:\"F\",recommendation:\"a \u003cfuse /\u003e\"},{prefix:\"S\",recommendation:\"a \u003cswitch /\u003e or \u003cpushbutton /\u003e\"},{prefix:\"TP\",recommendation:\"a \u003ctestpoint /\u003e\"}],v6o=t=\u003e{const{db:e}=t.root;if(!t.source_component_id)return;const n=e.source_component.get(t.source_component_id);if(!n?.name||!n.ftype)return;const o=S6o(n.name),i=t.componentName===\"Chip\"\u0026\u0026n.ftype===\"simple_chip\"\u0026\u0026o!==void 0?Q6o.find(({prefix:A})=\u003eo.startsWith(A)):void 0,r=t.getRefDesPrefixes()??(i?_Dt(\"simple_chip\"):void 0);if(!r||r.length===0||o\u0026\u0026r.includes(o))return;const s=r.length===1?r[0]:`one of ${r.join(\", \")}`,a=i?`The \"${i.prefix}\" prefix is being used with a \u003cchip /\u003e, try using it with ${i.recommendation}`:`Component ${n.name} has ftype=\"${n.ftype}\" but reference designator should start with ${s}`;e.insert({type:\"source_refdes_convention_warning\",warning_type:\"source_refdes_convention_warning\",message:a,source_component_id:n.source_component_id,refdes:n.name,source_component_ftype:n.ftype,expected_prefixes:r,actual_prefix:o,subcircuit_id:n.subcircuit_id})},fDt=new WeakMap,w6o=t=\u003e{const e=fDt.get(t);if(e)return e;const n=new Map;return fDt.set(t,n),n},P6o=new Set([\"a\",\"anode\",\"pos\",\"positive\",\"+\"]),M6o=new Set([\"c\",\"k\",\"cathode\",\"neg\",\"negative\",\"-\"]),IDt=t=\u003et.toLowerCase().replace(/[^a-z0-9+-]/g,\"\"),CDt=(t,e)=\u003e{const n=t.filter(o=\u003eo.type===\"source_port\"\u0026\u0026(!e||o.source_component_id===e));return n.find(o=\u003eo.pin_number===1)??n.find(o=\u003e[o.name,...o.port_hints??[]].map(IDt).includes(\"pin1\"))??null},yDt=t=\u003e{if(!t)return null;const e=[t.name,...t.port_hints??[]].map(IDt),n=e.some(i=\u003eP6o.has(i)),o=e.some(i=\u003eM6o.has(i));return n===o?null:n?\"anode\":\"cathode\"},D6o=t=\u003e{if(!t)return[];const e=[];for(const n of Object.keys(t)){const o=t[n]?.[0];o\u0026\u0026e.push({supplierName:n,supplierPartNumber:o})}return e},N6o=t=\u003e{if(typeof t!=\"string\")return null;const e=t.match(/(?:^|_)pin1location\\((leftside|rightside|topside|bottomside),(left|right|top|bottom)\\)(?:_|$)/i);if(!e)return null;const n=pV.safeParse(`${e[1].toLowerCase()}_${e[2].toLowerCase()}`);return n.success?n.data:null},R6o=({component:t,pcbComponent:e,pcbElements:n})=\u003e{const o=-e.rotation*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=b0e({componentLayer:e.layer,originalLayer:t._getFootprintOriginalLayer()}),a=A=\u003e{const c=A.x-e.center.x,l=A.y-e.center.y,u=s?-l:l;return{x:c*i-u*r,y:c*r+u*i}};return n.map(A=\u003e{const c=structuredClone(A);if(typeof c.x==\"number\"\u0026\u0026typeof c.y==\"number\"){const l=a(c);c.x=l.x,c.y=l.y}return c.points\u0026\u0026(c.points=c.points.map(a)),c})},T6o=({supplierName:t,supplierPartNumber:e})=\u003e`part-orientation-analysis:v3:${t}:${e}`,k6o=async({cacheKey:t,component:e})=\u003e{const n=await e.root?.platform?.localCacheEngine?.getItem(t);if(!n)return{cacheHit:!1};try{const o=JSON.parse(n),i=pV.safeParse(o.pin1_location),r=o.pin1_location===null?null:i.success?i.data:void 0,s=o.pin1_polarity===null||o.pin1_polarity===\"anode\"||o.pin1_polarity===\"cathode\"?o.pin1_polarity:void 0;return r===void 0||s===void 0?{cacheHit:!1}:{cacheHit:!0,analysis:{pin1Location:r,pin1Polarity:s}}}catch{return{cacheHit:!1}}},F6o=async({component:t,partsEngine:e,supplierPartCandidate:n})=\u003e{const o=T6o(n),i=await k6o({cacheKey:o,component:t});if(i.cacheHit)return i.analysis;const r=w6o(e),s=r.get(o);if(s)return s;const a=(async()=\u003e{const A=await Promise.resolve(e.fetchPartCircuitJson({supplierPartNumber:n.supplierPartNumber,platformFetch:t.root?.platform?.platformFetch}));if(!A?.length)return{pin1Location:null,pin1Polarity:null};const c=dmt(A),l=yDt(CDt(A));try{await t.root?.platform?.localCacheEngine?.setItem(o,JSON.stringify({pin1_location:c,pin1_polarity:l}))}catch{}return{pin1Location:c,pin1Polarity:l}})().finally(()=\u003e{r.delete(o)});return r.set(o,a),a},L6o=t=\u003e{if(!t.root?.platform?.enablePartOrientationAnalysis||t.root.pcbDisabled||t.props.doNotPlace||!t.pcb_component_id)return;const{db:e}=t.root,n=e.pcb_component.get(t.pcb_component_id);if(!n)return;const o=[...e.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}),...e.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id})],i=N6o(t.resolveFootprint())??dmt(R6o({component:t,pcbComponent:n,pcbElements:o}));if(i\u0026\u0026e.pcb_component.update(t.pcb_component_id,{pin1_location:i}),t.getInheritedProperty(\"bomDisabled\")||t.getInheritedProperty(\"partsEngineDisabled\"))return;const r=t.getInheritedProperty(\"partsEngine\");if(!r?.fetchPartCircuitJson)return;const s=e.source_component.get(t.source_component_id),A=s?.ftype===\"simple_diode\"||s?.ftype===\"simple_led\"?CDt(e.source_port.list(),t.source_component_id??void 0):null,c=yDt(A),l=D6o(s?.supplier_part_numbers);l.length!==0\u0026\u0026(t._hasStartedPartOrientationAnalysis||(t._hasStartedPartOrientationAnalysis=!0,t._queueAsyncEffect(\"analyze-part-orientation\",async()=\u003e{const u={};for(const g of l)try{const{pin1Location:h,pin1Polarity:d}=await F6o({component:t,partsEngine:r,supplierPartCandidate:g});if(h\u0026\u0026(u[g.supplierName]=h),c\u0026\u0026d\u0026\u0026c!==d){const p=dV.parse({type:\"source_component_misconfigured_error\",error_type:\"source_component_misconfigured_error\",message:`${t.getString()} maps pin 1 to the ${c}, but supplier part ${g.supplierName}:${g.supplierPartNumber} maps pin 1 to the ${d}. Update pinLabels or use a supplier part with matching diode polarity.`,source_component_ids:[t.source_component_id],source_port_ids:A?.source_port_id?[A.source_port_id]:void 0});t.root.db.source_component_misconfigured_error.insert(p)}}catch{}t._asyncSupplierPin1LocationMap=u,t._markDirty(\"PartOrientationAnalysis\")})))},H6o=t=\u003e{const e=t._asyncSupplierPin1LocationMap;if(!e||!t.pcb_component_id)return;const{db:n}=t.root,o=n.pcb_component.get(t.pcb_component_id);!o||Object.keys(e).length===0||n.pcb_component.update(t.pcb_component_id,{supplier_pin1_location_map:{...o.supplier_pin1_location_map,...e}})};function O6o(t){if(t.root?.pcbDisabled||!t.pcb_component_id)return;const{pcbX:e,pcbY:n}=t._parsedProps,o=t.props?.pcbPositionAnchor;if(!o||e===void 0\u0026\u0026n===void 0)return;const i=L0e(t.children);if(i.width===0||i.height===0)return;const s={...{x:(i.minX+i.maxX)/2,y:(i.minY+i.maxY)/2}};let a=null;if(new Set([\"center\",\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"]).has(o)){const l={left:i.minX,right:i.maxX,top:i.minY,bottom:i.maxY};switch(o){case\"center\":a=s;break;case\"top_left\":a={x:l.left,y:l.top};break;case\"top_center\":a={x:s.x,y:l.top};break;case\"top_right\":a={x:l.right,y:l.top};break;case\"center_left\":a={x:l.left,y:s.y};break;case\"center_right\":a={x:l.right,y:s.y};break;case\"bottom_left\":a={x:l.left,y:l.bottom};break;case\"bottom_center\":a={x:s.x,y:l.bottom};break;case\"bottom_right\":a={x:l.right,y:l.bottom};break}}else try{const l=t.portMap[o];l\u0026\u0026(a=l._getGlobalPcbPositionBeforeLayout())}catch{}if(!a)return;const c={...s};e!==void 0\u0026\u0026(c.x+=e-a.x),n!==void 0\u0026\u0026(c.y+=n-a.y),(Math.abs(c.x-s.x)\u003e1e-6||Math.abs(c.y-s.y)\u003e1e-6)\u0026\u0026t._repositionOnPcb(c)}var xDt=t=\u003e{const e=t.find(i=\u003ei.type===\"cad_component\");if(!e)return;const n={stlUrl:e.model_stl_url,objUrl:e.model_obj_url,gltfUrl:e.model_gltf_url,glbUrl:e.model_glb_url,stepUrl:e.model_step_url,wrlUrl:e.model_wrl_url,modelOriginPosition:e.model_origin_position??void 0,modelUnitToMmScale:e.model_unit_to_mm_scale_factor,modelBoardNormalDirection:e.model_board_normal_direction,size:e.size??void 0,rotationOffset:e.rotation??void 0,positionOffset:e.position??void 0,showAsTranslucentModel:e.show_as_translucent_model};if(!n.stlUrl\u0026\u0026!n.objUrl\u0026\u0026!n.gltfUrl\u0026\u0026!n.glbUrl\u0026\u0026!n.stepUrl\u0026\u0026!n.wrlUrl\u0026\u0026!e.model_jscad)return;e.model_jscad\u0026\u0026typeof e.model_jscad==\"object\"\u0026\u0026(n.jscad=e.model_jscad);const o=kxe.safeParse(n);return o.success?o.data:void 0},G6o=vc(\"tscircuit:core:resolveStaticFileImport\");async function EDt(t,e){if(!t)return t;const n=t.startsWith(\"./\")?t.slice(1):t,o=e?.resolveProjectStaticFileImportUrl;if(o\u0026\u0026(t.startsWith(\"/\")||t.startsWith(\"./\")))try{const i=await o(n);if(i)return i}catch(i){G6o(\"failed to resolve static file via platform resolver\",i)}return hDt(n,e?.projectBaseUrl)}var dw=t=\u003et.startsWith(\"blob:\"),hw=t=\u003et.startsWith(\"http://\")||t.startsWith(\"https://\"),Vj=t=\u003et.startsWith(\"/\")||t.startsWith(\"./\"),fO=t=\u003e{if(hw(t)||dw(t))return null;const e=t.indexOf(\":\");if(e\u003c=0)return null;const n=t.slice(0,e),o=t.slice(e+1);return!n||!o?null:{footprintLib:n,footprintName:o}},Y6o=Gxe.shape.supplierPartNumbers.unwrap().keySchema.options,U6o=t=\u003et.componentName===\"Symbol\"||t.isSchematicPrimitive,K6o=(t,e,n)=\u003e{if(t.getInheritedProperty(\"partsEngineDisabled\"))return;const o=t.props.supplierPartNumbers,i=Y6o.find(A=\u003eA===e);if(!i||!o?.[i]?.includes(n))return;const a=t.getInheritedProperty(\"partsEngine\")?.fetchPartCircuitJson;if(a)return async A=\u003e({footprintCircuitJson:await a({supplierPartNumber:A,platformFetch:t.root?.platform?.platformFetch})??[]})},V6o=async(t,e,n)=\u003e{if(!t)throw new Error(`No footprint resolver is configured for library \"${e}\".`);return t(n)};function z6o(t,e){const n=t.resolveFootprint();if(!n)return;const{pcbRotation:o,pcbPinLabels:i}=t.props,r=t._resolvePinLabels(),s=dDt(String(n)),a=s?t.root?.platform?.footprintFileParserMap?.[s]:null;if(typeof n==\"string\"\u0026\u0026(hw(n)||dw(n)||Vj(n))\u0026\u0026a){if(t._hasStartedFootprintUrlLoad)return;t._hasStartedFootprintUrlLoad=!0,e(\"load-footprint-from-platform-file-parser\",async()=\u003e{const A=hw(n)||dw(n)?n:await EDt(n,t.root?.platform);try{const c=await a.loadFromUrl(A),l=Db({componentName:t.name,componentRotation:o,footprinterString:A,pinLabels:r,pcbPinLabels:i},c.footprintCircuitJson);t.addAll(l);for(const u of t.children)u.componentName===\"Port\"\u0026\u0026u._markDirty(\"PcbPortRender\");t._markDirty(\"ResolveFootprintPinLabels\"),t._markDirty(\"InitializePortsFromChildren\")}catch(c){const l=t.root?.db;if(l\u0026\u0026t.source_component_id\u0026\u0026t.pcb_component_id){const u=t.getSubcircuit(),g=`${t.getString()} failed to load footprint \"${A}\": `+(c instanceof Error?c.message:String(c)),h=mV.parse({type:\"external_footprint_load_error\",message:g,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:u.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,footprinter_string:A});l.external_footprint_load_error.insert(h)}throw c}});return}if(typeof n==\"string\"\u0026\u0026hw(n)){if(t._hasStartedFootprintUrlLoad)return;t._hasStartedFootprintUrlLoad=!0;const A=n;e(\"load-footprint-url\",async()=\u003e{try{const c=await fetch(A);if(!c.ok)throw new Error(`Failed to fetch footprint: ${c.status}`);const l=await c.json(),u=Db({componentName:t.name,componentRotation:o,footprinterString:A,pinLabels:r,pcbPinLabels:i},l);t.addAll(u),t._markDirty(\"ResolveFootprintPinLabels\"),t._markDirty(\"InitializePortsFromChildren\")}catch(c){const l=t.root?.db;if(l\u0026\u0026t.source_component_id\u0026\u0026t.pcb_component_id){const u=t.getSubcircuit(),g=`${t.getString()} failed to load external footprint \"${A}\": `+(c instanceof Error?c.message:String(c)),h=mV.parse({type:\"external_footprint_load_error\",message:g,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:u.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,footprinter_string:A});l.external_footprint_load_error.insert(h)}throw c}});return}if(!(typeof n==\"string\"\u0026\u0026dw(n))){if(typeof n==\"string\"){const A=fO(n);if(!A||t._hasStartedFootprintUrlLoad)return;t._hasStartedFootprintUrlLoad=!0;const l=t.root?.platform?.footprintLibraryMap?.[A.footprintLib],u=typeof l==\"function\"?l:void 0,g=K6o(t,A.footprintLib,A.footprintName),h=u??g;e(\"load-lib-footprint\",async()=\u003e{try{const d=await V6o(h,A.footprintLib,A.footprintName);let p=null;if(Array.isArray(d)?p=d:Array.isArray(d.footprintCircuitJson)\u0026\u0026(p=d.footprintCircuitJson),!p||p.length===0)throw new Error(`Footprint resolver returned no circuit elements for \"${n}\".`);const m=Db({componentName:t.name,componentRotation:o,footprinterString:n,pinLabels:r,pcbPinLabels:i},p),_=new Y0e({src:n}),f=[];for(const I of m)U6o(I)?f.push(I):_.add(I);t.add(_),t.addAll(f),t._asyncFootprintCadModel=!Array.isArray(d)\u0026\u0026d.cadModel||xDt(p);for(const I of t.children)I.componentName===\"Port\"\u0026\u0026I._markDirty?.(\"PcbPortRender\");t._markDirty(\"ResolveFootprintPinLabels\"),t._markDirty(\"InitializePortsFromChildren\")}catch(d){const p=t.root?.db;if(p\u0026\u0026t.source_component_id\u0026\u0026t.pcb_component_id){const m=t.getSubcircuit(),_=`${t.getString()} failed to load external footprint \"${n}\": `+(d instanceof Error?d.message:String(d)),f=mV.parse({type:\"external_footprint_load_error\",message:_,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:m.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,footprinter_string:n});p.external_footprint_load_error.insert(f)}throw d}});return}if(!ee.isValidElement(n)\u0026\u0026n.componentName===\"Footprint\"\u0026\u0026t.add(n),Array.isArray(n)\u0026\u0026!ee.isValidElement(n)\u0026\u0026n.length\u003e0){try{const A=Db({componentName:t.name,componentRotation:o,footprinterString:\"\",pinLabels:r,pcbPinLabels:i},n);t.addAll(A)}catch(A){const c=t.root?.db;if(c\u0026\u0026t.source_component_id\u0026\u0026t.pcb_component_id){const l=t.getSubcircuit(),u=`${t.getString()} failed to load json footprint: `+(A instanceof Error?A.message:String(A)),g=exe.parse({type:\"circuit_json_footprint_load_error\",message:u,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:l.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0});c.circuit_json_footprint_load_error.insert(g)}throw A}return}}}function J6o(t){const e=t._impliedFootprintPinLabels??{},n={},o=t.getPortsFromFootprint({allowImplicitPinNumbers:!t._parsedProps.pinLabels});for(const r of o){const s=r._parsedProps.pinNumber;if(s===void 0)continue;const a=new Set([`pin${s}`,`${s}`]),A=r.getNameAndAliases().filter(c=\u003e!a.has(c));A.length\u003e0\u0026\u0026(n[`pin${s}`]=A)}const i={...n};for(const[r,s]of Object.entries(e))i[r]=Array.isArray(s)?s:[s];if(t._impliedFootprintPinLabels=i,Object.keys(t._impliedFootprintPinLabels).length!==0)for(const r of t.children){if(r.componentName!==\"Port\")continue;const s=r,a=s._parsedProps.pinNumber;if(a===void 0)continue;const A=`pin${a}`,c=t._impliedFootprintPinLabels[A];if(!c)continue;const l=Array.isArray(c)?c:[c],u=s.getNameAndAliases();for(const g of l)u.includes(g)||s.externallyAddedAliases.push(g)}}function W6o(t){if(t.root?.schematicDisabled||t.getCollapsedSchematicBoxAncestor()||t._parsedProps?.noSchematicRepresentation===!0)return;const{db:e}=t.root;if(t._invalidPinLabelMessages?.length\u0026\u0026t.root?.db)for(const a of t._invalidPinLabelMessages){let A=\"pinLabels\";const c=a.match(/^Invalid pin label:\\s*([^=]+)=\\s*'([^']+)'/);c\u0026\u0026(A=`pinLabels['${c[2]}']`),t.root.db.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:A,message:a,error_type:\"source_property_ignored_warning\"})}t._parsedProps.schPinSpacing!==void 0\u0026\u0026t.root?.db\u0026\u0026t.root.db.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:\"schPinSpacing\",error_type:\"source_property_ignored_warning\",message:\"schPinSpacing is deprecated and will be ignored. Pin spacing is always 0.2.\"});const{schematicSymbolName:n}=t.config,{_parsedProps:o}=t,i=t.children.some(a=\u003ea.componentName===\"Symbol\");if(o.symbol\u0026\u0026ee.isValidElement(o.symbol)||i)t._doInitialSchematicComponentRenderWithReactSymbol(o.symbol);else if(n)t._doInitialSchematicComponentRenderWithSymbol();else{const a=t._getSchematicBoxDimensions();a\u0026\u0026t._doInitialSchematicComponentRenderWithSchematicBoxDimensions(a)}const r=t.getSubcircuit()?._getSchematicManualPlacementForComponent(t);if(t.schematic_component_id\u0026\u0026(t.props.schX!==void 0||t.props.schY!==void 0)\u0026\u0026r){if(!t.schematic_component_id)return;const a=F2e.parse({type:\"schematic_manual_edit_conflict_warning\",schematic_manual_edit_conflict_warning_id:`schematic_manual_edit_conflict_${t.source_component_id}`,message:`${t.getString()} has both manual placement and prop coordinates. schX and schY will be used. Remove schX/schY or clear the manual placement.`,schematic_component_id:t.schematic_component_id,source_component_id:t.source_component_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id});e.schematic_manual_edit_conflict_warning.insert(a)}const s=t._parsedProps?.schSheetName??t.props.schSheetName;s\u0026\u0026t.source_component_id\u0026\u0026!t._resolveSchematicSheetId()\u0026\u0026e.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:\"schSheetName\",error_type:\"source_property_ignored_warning\",subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,message:`${t.getString()} references schSheetName \"${s}\", which does not match any schematic sheet and will be ignored.`})}function j6o(t){const e=t.font_size,n=t.text.length*e*.6,o=e,i=t.anchor_alignment||\"center\";let r=t.anchor_position.x,s=t.anchor_position.y;switch(i){case\"top_left\":r=t.anchor_position.x+n/2,s=t.anchor_position.y+o/2;break;case\"top_center\":r=t.anchor_position.x,s=t.anchor_position.y+o/2;break;case\"top_right\":r=t.anchor_position.x-n/2,s=t.anchor_position.y+o/2;break;case\"center_left\":r=t.anchor_position.x+n/2,s=t.anchor_position.y;break;case\"center\":r=t.anchor_position.x,s=t.anchor_position.y;break;case\"center_right\":r=t.anchor_position.x-n/2,s=t.anchor_position.y;break;case\"bottom_left\":r=t.anchor_position.x+n/2,s=t.anchor_position.y-o/2;break;case\"bottom_center\":r=t.anchor_position.x,s=t.anchor_position.y-o/2;break;case\"bottom_right\":r=t.anchor_position.x-n/2,s=t.anchor_position.y-o/2;break;default:r=t.anchor_position.x,s=t.anchor_position.y;break}return{x:r-n/2,y:s-o/2,width:n,height:o}}function $6o(t){if(!t._adjustSilkscreenTextAutomatically||t.root?.pcbDisabled||!t.pcb_component_id)return;const{db:e}=t.root,o=t._getPcbCircuitJsonBounds().center;let i=e.pcb_silkscreen_text.list({pcb_component_id:t.pcb_component_id}).filter(A=\u003eA.text===t.name);if(i.length===0)return;const a=t.getSubcircuit().selectAll(\"[_isNormalComponent=true]\").filter(A=\u003eA!==t\u0026\u0026A.pcb_component_id).map(A=\u003e{const c=A._getPcbCircuitJsonBounds(),l={center:c.center,width:c.width,height:c.height};return yV(l)});for(const A of i){const c=A.anchor_position,l=j6o(A),u={center:{x:l.x+l.width/2,y:l.y+l.height/2},width:l.width,height:l.height},g=yV(u);if(!a.some(I=\u003ez4(g,I)))continue;const d=2*o.x-c.x,p=2*o.y-c.y,m={center:{x:d,y:p},width:l.width,height:l.height},_=yV(m);a.some(I=\u003ez4(_,I))||e.pcb_silkscreen_text.update(A.pcb_silkscreen_text_id,{anchor_position:{x:d,y:p}})}}var q6o=t=\u003e{const{db:e}=t.root;if(!t.source_component_id)return;const n=t.selectAll(\"port\"),o=e.source_trace.list(),i=new Set;for(const s of o)for(const a of s.connected_source_port_ids)i.add(a);const r=t._getInternallyConnectedPins();for(const s of r)if(s.some(a=\u003ea.source_port_id\u0026\u0026i.has(a.source_port_id)))for(const a of s)a.source_port_id\u0026\u0026i.add(a.source_port_id);for(const s of n)!s.source_port_id||!X6o(t,s)||e.source_port.get(s.source_port_id)?.do_not_connect||i.has(s.source_port_id)||e.source_pin_missing_trace_warning.insert({message:`Port ${s.getNameAndAliases()[0]} on ${t.props.name} is missing a trace`,source_component_id:t.source_component_id,source_port_id:s.source_port_id,subcircuit_id:t.getSubcircuit().subcircuit_id??void 0,warning_type:\"source_pin_missing_trace_warning\"})},X6o=(t,e)=\u003e{if(t.config.componentName===\"Interconnect\")return!1;if(t.config.componentName===\"Chip\"){const n=t.props.pinAttributes;if(!n)return!1;for(const o of e.getNameAndAliases()){const i=n[o];if(i?.requiresPower||i?.requiresGround||i?.requiresVoltage!==void 0)return!0}return!1}return!0},Z6o=.8,e8o=Gxe.shape.supplierPartNumbers.unwrap().keySchema.options,t8o=t=\u003et.type===\"pcb_smtpad\"||t.type===\"pcb_plated_hole\",n8o=t=\u003eNumber.isFinite(t.minX)\u0026\u0026Number.isFinite(t.minY)\u0026\u0026Number.isFinite(t.maxX)\u0026\u0026Number.isFinite(t.maxY)\u0026\u0026t.maxX\u003et.minX\u0026\u0026t.maxY\u003et.minY,BDt=t=\u003e{const e=t.filter(t8o);if(e.length===0)return null;const n=H8(e);return n8o(n)?n:null},bDt=t=\u003e({width:t.maxX-t.minX,height:t.maxY-t.minY}),SDt=(t,e,n)=\u003e{const o=bDt(t),i=bDt(e),r=n?.rotateB?i.height:i.width,s=n?.rotateB?i.width:i.height,a=Math.min(o.width,r),A=Math.min(o.height,s),c=a*A,l=o.width*o.height+r*s-c;return l\u003c=0?0:c/l},o8o=(t,e)=\u003eMath.max(SDt(t,e),SDt(t,e,{rotateB:!0})),i8o=t=\u003e{if(!t)return[];const e=[];for(const n of e8o){const o=t[n];if(Array.isArray(o))for(const i of o)i\u0026\u0026e.push({supplierName:n,supplierPartNumber:i})}return e};function r8o(t){if(t.root?.pcbDisabled||t.props.doNotPlace||t.props.footprint===void 0||t.getInheritedProperty(\"bomDisabled\")||t.getInheritedProperty(\"partsEngineDisabled\"))return;const e=t.getInheritedProperty(\"partsEngine\");if(!e?.fetchPartCircuitJson)return;const{db:n}=t.root,o=n.source_component.get(t.source_component_id);if(!o?.supplier_part_numbers||!t.pcb_component_id||t._hasStartedSupplierFootprintMismatchWarningCheck)return;const i=i8o(o.supplier_part_numbers);if(i.length===0)return;const r=[...n.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}),...n.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id})],s=BDt(r);s\u0026\u0026(t._hasStartedSupplierFootprintMismatchWarningCheck=!0,t._queueAsyncEffect(\"check-supplier-footprint-mismatch\",async()=\u003e{const{db:a}=t.root,A=e.fetchPartCircuitJson;for(const c of i){const{supplierName:l,supplierPartNumber:u}=c;try{const g=await Promise.resolve(A({supplierPartNumber:u}))??null;if(!g?.length)continue;const h=BDt(g);if(!h)continue;const d=o8o(s,h);if(d\u003e=Z6o)return;const p=typeof t.props.footprint==\"string\"?`\"${t.props.footprint}\"`:\"the provided footprint\",m=Number(d.toFixed(4)),_=nxe.parse({type:\"supplier_footprint_mismatch_warning\",message:`${t.getString()} footprint ${p} does not match supplier footprint ${l}:${u} (copper IoU ${m}).`,source_component_id:t.source_component_id,pcb_component_id:t.pcb_component_id,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,supplier_name:l,supplier_part_number:u,footprint_copper_intersection_over_union:m});a.supplier_footprint_mismatch_warning.insert(_);return}catch(g){const h=g instanceof Error?g.message:String(g),d=hV.parse({type:\"source_part_not_found_warning\",message:`Failed to fetch supplier footprint for ${t.getString()} (${l}:${u}): ${h}`,source_component_id:t.source_component_id??void 0,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,supplier_name:l,supplier_part_number:u});a.source_part_not_found_warning.insert(d);return}}}))}var QDt=(t,e)=\u003e{const n=t._parsedProps.pinNumber,o=e._parsedProps.pinNumber;return n!==void 0\u0026\u0026o!==void 0\u0026\u0026n!==o?!1:t.isMatchingAnyOf(e.getNameAndAliases())},s8o=(t,e)=\u003e{const n=t.toSorted(),o=e.toSorted();return n.length===o.length\u0026\u0026n.every((i,r)=\u003ei===o[r])},a8o=t=\u003et.getNameAndAliases().find(e=\u003e/^pin\\d+$/.test(e))??null,A8o=(t,e)=\u003e{if(!t._isPrimaryPort\u0026\u0026t.props.name||t.props.name\u0026\u0026(e.get(t.props.name)??0)\u003c=1)return t.props.name;const n=a8o(t);return n||(t.props.name??null)};function vDt(t,e){const n=new Map;for(const o of t)for(const i of new Set(o.getNameAndAliases()))/^(pin)?\\d+$/.test(i)||!o._isPrimaryPort\u0026\u0026i===o.props.name||(n.has(i)||n.set(i,[]),n.get(i).push(o));for(const o of n.values()){const i=Array.from(new Set(o));if(i.length\u003c2)continue;const r=new Map;for(const A of i)A.props.name\u0026\u0026r.set(A.props.name,(r.get(A.props.name)??0)+1);const s=i.map(A=\u003eA8o(A,r)).filter(A=\u003e!!A),a=Array.from(new Set(s));a.length\u003c2||e.some(A=\u003es8o(A,a))||e.push(a)}}function wDt(t,e){let n=1;const o=new Map;for(const r of t){const s=r.hints.filter(u=\u003eu\u0026\u0026u.trim()!==\"\");if(s.length===0)continue;let a=s;if(!a.some(u=\u003eu.startsWith(\"pin\")||/^(?:pin)?\\d+$/.test(u))){const u=a.map(g=\u003ee?.implicitPinNumberByHint?.get(g)).find(g=\u003eg!==void 0);if(u!==void 0)a=[...a,`pin${u}`];else{if(e?.allowImplicitPinNumbers===!1)continue;a=[...a,`pin${n}`]}}n++;const c=O0e(a,e);if(!c)continue;c.originDescription=r.originDescription;const l=c._parsedProps.pinNumber;l!==void 0\u0026\u0026(o.has(l)||o.set(l,[]),o.get(l).push({port:c,component:r.component}))}const i=[];for(const[r,s]of o){const a=(g,h)=\u003e{const d=h.getNameAndAliases().filter(p=\u003e!g.getNameAndAliases().includes(p));g.externallyAddedAliases.push(...d)},A=s[0].port,c=s.filter(g=\u003e!!g.component);if(c.length!==s.length){for(const g of s.slice(1))a(A,g.port);i.push(A);continue}const l=p7o(c.map(g=\u003eg.component));if(l.length\u003c=1){for(const g of s.slice(1))a(A,g.port);i.push(A);continue}const u=[A.props.name];for(const[g,h]of l.entries()){const d=c.filter(m=\u003eh.includes(m.component));if(g===0){for(const m of d.slice(1))a(A,m.port);i.push(A);continue}const p=new Pu({name:`pin${r}_internal_${g}`,aliases:A.getNameAndAliases()});p._isPrimaryPort=!1,p._primaryPinNumber=r,p.originDescription=`implicitInternalPhysicalPort:pin${r}:${g}`;for(const m of d)a(p,m.port);u.push(p.props.name),i.push(p)}e?.inferredInternallyConnectedPinNames?.push(u)}return e?.inferredInternallyConnectedPinNames\u0026\u0026vDt(i,e.inferredInternallyConnectedPinNames),i}var c8o=vc(\"tscircuit:core\"),l8o=Pt({x:oA,y:oA,z:oA}),g0=class extends Ir{schematicBoxDimensions=null;reactSubtrees=[];_impliedFootprint;_resolvedPcbCalcOffsetX;_resolvedPcbCalcOffsetY;isPrimitiveContainer=!0;_isNormalComponent=!0;_attributeLowerToCamelNameMap={_isnormalcomponent:\"_isNormalComponent\"};_asyncSupplierPartNumbers;_asyncFootprintCadModel;_isCadModelChild;_inferredInternallyConnectedPinNames=[];pcb_missing_footprint_error_id;_hasStartedFootprintUrlLoad=!1;_hasStartedPartOrientationAnalysis=!1;_asyncSupplierPin1LocationMap;_hasStartedSupplierFootprintMismatchWarningCheck=!1;_hasInflatedCircuitJsonSymbol=!1;_invalidFootprintPropMessages=[];_invalidPinLabelMessages=[];_impliedFootprintPinLabels;_adjustSilkscreenTextAutomatically=!1;get defaultInternallyConnectedPinNames(){return[]}get internallyConnectedPinNames(){return[...this._parsedProps.internallyConnectedPins??this.defaultInternallyConnectedPinNames,...this._inferredInternallyConnectedPinNames].map(e=\u003ee.map(n=\u003etypeof n==\"number\"?`pin${n}`:n))}constructor(t){const e={...t};let n=[];if(e.pinLabels\u0026\u0026!Array.isArray(e.pinLabels)){const{validPinLabels:o,invalidPinLabelsMessages:i}=U7o(e.pinLabels);e.pinLabels=o,n=i}if(super(e),e.pinLabels\u0026\u0026!Array.isArray(e.pinLabels)){const o=Object.keys(e.pinLabels).find(i=\u003euw(i)===null);if(o)throw new nMt(this.lowercaseComponentName,this.props,{_errors:[],pinLabels:{_errors:[`Invalid pinLabels key \"${o}\". Expected \"pin\\${number}\" (e.g. pin1, pin2).`]}})}this._invalidPinLabelMessages=n,this._addChildrenFromStringFootprint(),this._addChildrenFromCircuitJsonSymbol(),this.initPorts()}doInitialSourceNameDuplicateComponentRemoval(){if(!this.name)return;const t=this.root;if((this.getSubcircuit().getNormalComponentNameMap?.()?.get(this.props.name)??[]).filter(i=\u003ei!==this\u0026\u0026i.renderPhaseStates.SourceNameDuplicateComponentRemoval.initialized).length\u003e0){const i=this._getGlobalPcbPositionBeforeLayout(),r=this._getGlobalSchematicPositionBeforeLayout();t.db.source_failed_to_create_component_error.insert({component_name:this.name,error_type:\"source_failed_to_create_component_error\",message:`Cannot create component \"${this.name}\": A component with the same name already exists`,pcb_center:i,schematic_center:r}),this.shouldBeRemoved=!0;const s=[...this.children];for(const a of s)this.remove(a)}}initPorts(t={}){if(ee.isValidElement(this.props.symbol)\u0026\u0026!this.children.some(u=\u003eu.componentName===\"Symbol\"))return;this._inferredInternallyConnectedPinNames=[];const{config:n}=this,o=[],i=this._resolvePinLabels(),r=this._parsedProps.pinLabels,s=r\u0026\u0026Array.isArray(r)?Object.fromEntries(r.map((u,g)=\u003e[`pin${g+1}`,u])):r,a=this._getAllPortsFromChildren(),A=u=\u003ea.some(g=\u003eg._parsedProps.pinNumber===u)||o.some(g=\u003eg._parsedProps.pinNumber===u),c=this._getSchematicPortArrangement();if(c\u0026\u0026!i){for(const h in c){const d=c[h].pins;if(Array.isArray(d))for(const p of d){const m=hO(p,i);A(m)||o.push(new Pu({pinNumber:m,aliases:t.additionalAliases?.[`pin${m}`]??[]},{originDescription:`schPortArrangement:${h}`}))}}const u=[\"left\",\"right\",\"top\",\"bottom\"];let g=1;for(const h of u){const d=c[`${h}Size`];for(let p=0;p\u003cd;p++){const m=g++;A(m)||o.push(new Pu({pinNumber:m,aliases:t.additionalAliases?.[`pin${m}`]??[]},{originDescription:`schPortArrangement:${h}`}))}}}if(i)for(const[u,g]of Object.entries(i)){const h=uw(u);if(h===null)throw new Error(`Invalid pinLabels key \"${u}\". Expected \"pin\\${number}\" (e.g. pin1, pin2).`);let d=a.find(C=\u003eC._parsedProps.pinNumber===h)??o.find(C=\u003eC._parsedProps.pinNumber===h);const p=Array.isArray(g)?g:[g],_=s?.[u]!==void 0,f=_?p[0]:`pin${h}`,I=_?p.slice(1):p;d?d.externallyAddedAliases.push(f,...I):(d=new Pu({pinNumber:h,name:f,aliases:[..._?[]:t.additionalAliases?.[`pin${h}`]??[],...I,..._?t.additionalAliases?.[`pin${h}`]??[]:[]]},{originDescription:`pinLabels:pin${h}`}),o.push(d))}if(n.schematicSymbolName\u0026\u0026!t.ignoreSymbolPorts){const u=Su[this._getSchematicSymbolNameOrThrow()];if(!u)return;for(const g of u.ports){const h=H0e(g.labels);if(!h)continue;const d=this._getAllPortsFromChildren().find(p=\u003ep._parsedProps.pinNumber===Number(h))??o.find(p=\u003ep._parsedProps.pinNumber===Number(h));if(d)d.schematicSymbolPortDef=g;else{const p=O0e(g.labels.concat(t.additionalAliases?.[`pin${h}`]??[]));p\u0026\u0026(p.originDescription=`schematicSymbol:labels[0]:${g.labels[0]}`,p.schematicSymbolPortDef=g,o.push(p))}}this.addAll(o)}if(!this._getSchematicPortArrangement()){const u=ee.isValidElement(this.props.symbol),g=aPe(this.props.symbol);if(!(u||g)){const h=this.getPortsFromFootprint({...t,allowImplicitPinNumbers:!s,collectInferredInternallyConnectedPins:!0}),d=this._getAllPortsFromChildren();for(const p of h){if(!p._isPrimaryPort){o.push(p);continue}const m=d.find(_=\u003eQDt(_,p))??o.find(_=\u003eQDt(_,p));if(m){const _=p.getNameAndAliases().filter(f=\u003e!m.getNameAndAliases().includes(f));m.externallyAddedAliases.push(..._)}else o.push(p)}}}const l=t.pinCount??this._getPrimaryPinCount()??0;for(let u=1;u\u003c=l;u++){if(A(u)||!c\u0026\u0026s\u0026\u0026!Array.isArray(r)\u0026\u0026!s[`pin${u}`])continue;if(!c){o.push(new Pu({pinNumber:u,aliases:t.additionalAliases?.[`pin${u}`]??[]}));continue}let g=rPe(c).map(h=\u003ehO(h,i));[\"leftSize\",\"rightSize\",\"topSize\",\"bottomSize\",\"leftPinCount\",\"rightPinCount\",\"topPinCount\",\"bottomPinCount\"].some(h=\u003eh in c)\u0026\u0026(g=Array.from({length:this._getPrimaryPinCount()},(h,d)=\u003ed+1)),g.includes(u)\u0026\u0026o.push(new Pu({pinNumber:u,aliases:t.additionalAliases?.[`pin${u}`]??[]},{originDescription:`notOtherwiseAddedButDeducedFromPinCount:${u}`}))}vDt(Array.from(new Set([...this._getAllPortsFromChildren(),...o])),this._inferredInternallyConnectedPinNames),o.length\u003e0\u0026\u0026this.addAll(o)}_resolvePinLabels(){const t=this._parsedProps.pinLabels,e=t\u0026\u0026Array.isArray(t)?Object.fromEntries(t.map((o,i)=\u003e[`pin${i+1}`,o])):t,n={...this._impliedFootprintPinLabels??{},...e??{}};if(Object.keys(n).length!==0)return n}_getImpliedFootprintString(){return null}resolveFootprint(){return this._parsedProps.footprint??this.props.footprint??this._getImpliedFootprintString?.()}_addChildrenFromStringFootprint(){const{pcbRotation:t,pcbPinLabels:e}=this.props,n=this._resolvePinLabels(),o=this.resolveFootprint();if(o\u0026\u0026typeof o==\"string\"){if(hw(o)||dw(o)||Vj(o)||fO(o))return;let i;try{i=pct.string(o).soup()}catch(s){this._queueInvalidFootprintPropMessage(o,s);return}const r=Db({componentName:this.name??this.componentName,componentRotation:t,footprinterString:o,pinLabels:n,pcbPinLabels:e},i);this.addAll(r)}}_addChildrenFromCircuitJsonSymbol(){if(this._hasInflatedCircuitJsonSymbol)return;const t=this._parsedProps.symbol;if(!aPe(t))return;if(this.children.some(r=\u003er.componentName===\"Symbol\")){this._hasInflatedCircuitJsonSymbol=!0;return}const e=g6o(t);if(e.length===0)return;const n=u6o(e),o=Db({componentName:this.name??this.componentName,componentRotation:String(this.props.schRotation??0)},n);if(o.length===0)return;if(this._hasInflatedCircuitJsonSymbol=!0,!o.some(r=\u003er.componentName===\"Symbol\")){const r=new iPe({name:this.name??this.componentName});r.addAll(o),this.add(r);return}this.addAll(o)}get portMap(){return new Proxy({},{get:(t,e)=\u003e{const n=this.children.find(i=\u003ei.componentName===\"Symbol\"),o=[...this.children,...n?.children??[]].find(i=\u003ei.componentName===\"Port\"\u0026\u0026i.isMatchingNameOrAlias(e));if(!o)throw new Error(`There was an issue finding the port \"${e.toString()}\" inside of a ${this.componentName} component with name: \"${this.props.name}\". This is a bug in @tscircuit/core`);return o}})}getInstanceForReactElement(t){for(const e of this.reactSubtrees)if(e.element===t)return e.component;return null}doInitialSourceRender(){const t=this.config.sourceFtype;if(!t)return;const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({ftype:t,name:this.name,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,display_name:n.displayName});this.source_component_id=o.source_component_id}getRefDesPrefixes(){return _Dt(this.config.sourceFtype)}doInitialCheckRefDesConvention(){v6o(this)}doInitialSourceParentAttachment(){const{db:t}=this.root,e=this._getInternallyConnectedPins().map(n=\u003en.map(o=\u003eo.source_port_id).filter(o=\u003eo!==null)).filter(n=\u003en.length\u003e=2);this.source_component_id\u0026\u0026e.length\u003e0\u0026\u0026t.source_component.update(this.source_component_id,{internally_connected_source_port_ids:e});for(const n of e)t.source_component_internal_connection.insert({source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id,source_port_ids:n})}updateSourceParentAttachment(){const{db:t}=this.root;for(const e of t.source_component_internal_connection.list({source_component_id:this.source_component_id}))t.source_component_internal_connection.delete(e.source_component_internal_connection_id);this.doInitialSourceParentAttachment()}doInitialSchematicComponentRender(){W6o(this)}_getSchematicSymbolDisplayValue(){}_getInternallyConnectedPins(){if(this.internallyConnectedPinNames.length===0)return[];const t=[];for(const e of this.internallyConnectedPinNames){const n=[];for(const o of e)n.push(this.portMap[o]);t.push(n)}return t}_doInitialSchematicComponentRenderWithSymbol(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getSchematicSymbolNameOrThrow(),o=Su[n],i=this._getGlobalSchematicPositionBeforeLayout();if(o){const r=t.schematic_component.insert({center:i,size:{...o.size},source_component_id:this.source_component_id,is_box_with_pins:!0,symbol_name:n,schematic_sheet_id:this._resolveSchematicSheetId(),symbol_display_value:this._getSchematicSymbolDisplayValue()});this.schematic_component_id=r.schematic_component_id}}_doInitialSchematicComponentRenderWithReactSymbol(t){if(this.root?.schematicDisabled)return;const{db:e}=this.root,n=this._getGlobalSchematicPositionBeforeLayout(),o=e.schematic_component.insert({center:n,size:{width:0,height:0},source_component_id:this.source_component_id,symbol_display_value:this._getSchematicSymbolDisplayValue(),is_box_with_pins:!1,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_component_id=o.schematic_component_id}_doInitialSchematicComponentRenderWithSchematicBoxDimensions(t){if(this.root?.schematicDisabled)return;const{db:e}=this.root,{_parsedProps:n}=this;this.schematicBoxDimensions=t;const o={};if(Array.isArray(n.pinLabels))n.pinLabels.forEach((u,g)=\u003e{o[String(g+1)]=u});else for(const[u,g]of Object.entries(n.pinLabels??{}))o[u]=Array.isArray(g)?g[0]:g;const i=this._getGlobalSchematicPositionBeforeLayout(),r=this._getSchematicPortArrangement(),s=e.schematic_component.insert({center:i,rotation:n.schRotation??0,size:t.getSize(),port_arrangement:ePe(r),pin_spacing:.2,pin_styles:Zwe(n.schPinStyle,n.pinLabels),port_labels:o,source_component_id:this.source_component_id,schematic_sheet_id:this._resolveSchematicSheetId()}),a=r?.topSide!==void 0,A=a||r?.bottomSide!==void 0,c=t?.getSize().width,l=t?.getSize().height;e.schematic_text.insert({text:n.manufacturerPartNumber??\"\",schematic_component_id:s.schematic_component_id,anchor:\"left\",rotation:0,position:{x:a?i.x+(c??0)/2+.1:i.x-(c??0)/2,y:A?i.y+(l??0)/2+.35:i.y-(l??0)/2-.13},color:\"#006464\",font_size:.18,schematic_sheet_id:this._resolveSchematicSheetId()}),e.schematic_text.insert({text:n.displayName??n.name??\"\",schematic_component_id:s.schematic_component_id,anchor:\"left\",rotation:0,position:{x:a?i.x+(c??0)/2+.1:i.x-(c??0)/2,y:A?i.y+(l??0)/2+.55:i.y+(l??0)/2+.13},color:\"#006464\",font_size:.18,schematic_sheet_id:this._resolveSchematicSheetId()}),this.schematic_component_id=s.schematic_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this._getPcbComponentLayer();if(o!==\"top\"\u0026\u0026o!==\"bottom\"){const c=vne.parse({type:\"pcb_component_invalid_layer_error\",message:`Component cannot be placed on layer '${o}'. Components can only be placed on 'top' or 'bottom' layers.`,source_component_id:this.source_component_id,layer:o,subcircuit_id:n.subcircuit_id??void 0});t.pcb_component_invalid_layer_error.insert(c)}const i=this.getGlobalTransformRotation(),r=t.pcb_component.insert({center:this._getGlobalPcbPositionBeforeLayout(),width:0,height:0,layer:o===\"top\"||o===\"bottom\"?o:\"top\",rotation:k9(i),insertion_direction:this._getPcbComponentInsertionDirection(o,i),source_component_id:this.source_component_id,subcircuit_id:n.subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0}),s=this.resolveFootprint(),a=this.children.some(c=\u003ec.componentName===\"Footprint\");if(!s\u0026\u0026!a\u0026\u0026!this.isGroup){const c=t.pcb_missing_footprint_error.insert({message:`No footprint specified for component: ${this.getString()}`,source_component_id:`${this.source_component_id}`,error_type:\"pcb_missing_footprint_error\"});this.pcb_missing_footprint_error_id=c.pcb_missing_footprint_error_id}this.pcb_component_id=r.pcb_component_id;const A=this.getSubcircuit()._getPcbManualPlacementForComponent(this);if((this.props.pcbX!==void 0||this.props.pcbY!==void 0)\u0026\u0026A){const c=txe.parse({type:\"pcb_manual_edit_conflict_warning\",pcb_manual_edit_conflict_warning_id:`pcb_manual_edit_conflict_${this.source_component_id}`,message:`${this.getString()} has both manual placement and prop coordinates. pcbX and pcbY will be used. Remove pcbX/pcbY or clear the manual placement.`,pcb_component_id:this.pcb_component_id,source_component_id:this.source_component_id,subcircuit_id:n.subcircuit_id??void 0});t.pcb_manual_edit_conflict_warning.insert(c)}}doInitialPcbComponentSizeCalculation(){if(this.root?.pcbDisabled||!this.pcb_component_id)return;const{db:t}=this.root;B6o(this);const e=L0e(this.children);if(e.width===0||e.height===0)return;const n={x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2};t.pcb_component.update(this.pcb_component_id,{center:n,width:e.width,height:e.height})}updatePcbComponentSizeCalculation(){this.doInitialPcbComponentSizeCalculation()}doInitialSchematicComponentSizeCalculation(){if(this.root?.schematicDisabled||!this.schematic_component_id)return;const{db:t}=this.root;if(!t.schematic_component.get(this.schematic_component_id))return;const n=[],o=c=\u003e{for(const l of c){if(l.isSchematicPrimitive\u0026\u0026l.componentName===\"SchematicLine\"){const u=t.schematic_line.get(l.schematic_line_id);u\u0026\u0026n.push(u)}if(l.isSchematicPrimitive\u0026\u0026l.componentName===\"SchematicRect\"){const u=t.schematic_rect.get(l.schematic_rect_id);u\u0026\u0026n.push(u)}if(l.isSchematicPrimitive\u0026\u0026l.componentName===\"SchematicCircle\"){const u=t.schematic_circle.get(l.schematic_circle_id);u\u0026\u0026n.push(u)}if(l.isSchematicPrimitive\u0026\u0026l.componentName===\"SchematicArc\"){const u=t.schematic_arc.get(l.schematic_arc_id);u\u0026\u0026n.push(u)}if(l.isSchematicPrimitive\u0026\u0026l.componentName===\"SchematicText\"){const u=t.schematic_text.get(l.schematic_text_id);u\u0026\u0026n.push(u)}if(l.isSchematicPrimitive\u0026\u0026l.componentName===\"SchematicPath\"){const u=l.schematic_path_ids;if(u)for(const g of u){const h=t.schematic_path.get(g);h\u0026\u0026n.push(h)}}l.children\u0026\u0026l.children.length\u003e0\u0026\u0026o(l.children)}};if(o(this.children),n.length===0)return;const i=Gj(n),r=Math.abs(i.maxX-i.minX),s=Math.abs(i.maxY-i.minY);if(r===0\u0026\u0026s===0)return;const a=(i.minX+i.maxX)/2,A=(i.minY+i.maxY)/2;t.schematic_component.update(this.schematic_component_id,{center:{x:a,y:A},size:{width:r,height:s}})}updateSchematicComponentSizeCalculation(){this.doInitialSchematicComponentSizeCalculation()}doInitialPcbComponentAnchorAlignment(){O6o(this)}updatePcbComponentAnchorAlignment(){this.doInitialPcbComponentAnchorAlignment()}doInitialResolveFootprintPinLabels(){J6o(this)}updateResolveFootprintPinLabels(){this.doInitialResolveFootprintPinLabels()}_renderReactSubtree(t){const e=RMt(t);return{element:t,component:e}}doInitialInitializePortsFromChildren(){this.initPorts()}updateInitializePortsFromChildren(){this.initPorts()}getGlobalTransformRotation(){const t=this._computePcbGlobalTransformBeforeLayout();return O9(t).rotation.angle*180/Math.PI}_getFootprintMetadataForPcbComponent(){const t=this.children.find(n=\u003en.componentName===\"Footprint\");if(t)return{insertionDirection:t._parsedProps.insertionDirection,cutoutApertureDirection:t._parsedProps.cutoutApertureDirection,originalLayer:t._parsedProps.originalLayer};const e=this.props.footprint;if(ee.isValidElement(e)){const n=e.props;return{insertionDirection:n.insertionDirection,cutoutApertureDirection:n.cutoutApertureDirection,originalLayer:n.originalLayer}}if(e?.componentName===\"Footprint\")return{insertionDirection:e._parsedProps?.insertionDirection??e.props?.insertionDirection,cutoutApertureDirection:e._parsedProps?.cutoutApertureDirection??e.props?.cutoutApertureDirection,originalLayer:e._parsedProps?.originalLayer??e.props?.originalLayer}}_getPcbComponentLayer(){return this._parsedProps.layer??(this._getFootprintOriginalLayer()===\"bottom\"?\"bottom\":\"top\")}_getFootprintOriginalLayer(){return this._getFootprintMetadataForPcbComponent()?.originalLayer}_getPcbComponentInsertionDirection(t,e=this.getGlobalTransformRotation()){const n=this._getFootprintMetadataForPcbComponent();if(n?.insertionDirection)return k9o({insertionDirection:n.insertionDirection,rotationDegrees:e,isFlipped:b0e({componentLayer:t,originalLayer:n.originalLayer})})}_getEnclosureApertureAxisDirection(t,e=this.getGlobalTransformRotation()){const n=this._getFootprintMetadataForPcbComponent(),o=n?.cutoutApertureDirection??n?.insertionDirection;if(o)return AMt({insertionDirection:o,rotationDegrees:e,isFlipped:b0e({componentLayer:t,originalLayer:n?.originalLayer})})}doInitialReactSubtreesRender(){const t=this.props.footprint;ee.isValidElement(t)\u0026\u0026(this.children.some(r=\u003er.componentName===\"Footprint\")||this.add(t));const e=this.props.symbol;ee.isValidElement(e)\u0026\u0026(this.children.some(r=\u003er.componentName===\"Symbol\")||this.add(e));const n=this.props.cadModel;if(ee.isValidElement(n)){this._isCadModelChild=!0;const i=this.children.some(s=\u003es.componentName===\"CadAssembly\"),r=this.children.some(s=\u003es.componentName===\"CadModel\");!i\u0026\u0026!r\u0026\u0026this.add(n)}const o=this.props.spiceModel;ee.isValidElement(o)\u0026\u0026(this.children.some(r=\u003er.componentName===\"SpiceModel\")||this.add(o))}doInitialPcbFootprintStringRender(){z6o(this,(t,e)=\u003ethis._queueAsyncEffect(t,e))}_getAllPortsFromChildren(){const t=[],e=n=\u003e{n.componentName===\"Port\"\u0026\u0026t.push(n);for(const o of n.children)e(o)};for(const n of this.children)e(n);return t}_hasExistingPortExactly(t){return this._getAllPortsFromChildren().some(n=\u003e{const o=t.getNameAndAliases(),i=n.getNameAndAliases();return o.length===i.length\u0026\u0026o.every(r=\u003ei.includes(r))})}_hasMatchingPort(t){const e=this._getAllPortsFromChildren(),n=t._parsedProps.pinNumber;return n===void 0?!1:e.some(o=\u003eo._parsedProps.pinNumber===n)}add(t){let e;if(ee.isValidElement(t)){const n=this._renderReactSubtree(t);this.reactSubtrees.push(n),e=n.component}else e=t;if(e.componentName===\"Port\"){if(this._hasExistingPortExactly(e))return;if(this._hasMatchingPort(e)){c8o(`Skipping port ${e} because a matching port already exists`);return}}super.add(e)}getPortsFromFootprint(t){let e;t?.collectInferredInternallyConnectedPins\u0026\u0026(e=this._inferredInternallyConnectedPinNames);const n=new Map,o=this._parsedProps?.pinLabels??this.props.pinLabels;if(o){const a=Array.isArray(o)?o.map((A,c)=\u003e[`pin${c+1}`,A]):Object.entries(o);for(const[A,c]of a){const l=uw(A);if(l===null)continue;const u=Array.isArray(c)?c:[c];for(const g of u)typeof g==\"string\"\u0026\u0026g.length\u003e0\u0026\u0026n.set(g,l)}}const i={...t,inferredInternallyConnectedPinNames:e,implicitPinNumberByHint:n};let{footprint:r}=this.props;if(typeof r==\"string\"\u0026\u0026fO(r)\u0026\u0026this.children.some(a=\u003ea.componentName===\"Footprint\")?r=this.children.find(a=\u003ea.componentName===\"Footprint\"):(!r||ee.isValidElement(r))\u0026\u0026(r=this.children.find(a=\u003ea.componentName===\"Footprint\")),typeof r==\"string\"){if(hw(r))return[];if(dw(r))return[];if(Vj(r))return[];if(fO(r))return[];let a;try{a=pct.string(r).soup()}catch(A){return this._queueInvalidFootprintPropMessage(r,A),[]}return wDt(a.flatMap(A=\u003e\"port_hints\"in A\u0026\u0026A.port_hints?[{hints:A.port_hints,originDescription:`footprint:string:${r}:port_hints[0]:${A.port_hints[0]}`}]:[]),i)}if(!ee.isValidElement(r)\u0026\u0026r\u0026\u0026r.componentName===\"Footprint\")return wDt(r.children.flatMap(A=\u003eA.props.portHints?[{hints:A.props.portHints,originDescription:`footprint:${r}`,component:A}]:[]),i);const s=[];if(!r){for(const a of this.children)if(a.props.portHints\u0026\u0026a.isPcbPrimitive){const A=O0e(a.props.portHints);A\u0026\u0026s.push(A)}}return s}_queueInvalidFootprintPropMessage(t,e){const n=e instanceof Error?e.message:String(e),o=t.includes(\"/\")\u0026\u0026!t.includes(\":\"),r=/^c\\d+$/i.test(t)?`C${t.replace(/^c/i,\"\")}`:null,s=o?` If this is a KiCad footprint, use \"kicad:${t}\".`:r?` If this is a JLCPCB part number, use \"jlcpcb:${r}\".`:\"\",a=`Invalid footprint prop on ${this.getDisplayName()}: \"${t}\".${s} Parser details: ${n}`;this._invalidFootprintPropMessages.includes(a)||this._invalidFootprintPropMessages.push(a)}_insertInvalidFootprintPropErrors(){for(const t of this._invalidFootprintPropMessages)this.root.db.source_invalid_component_property_error.insert({source_component_id:this.source_component_id||\"\",property_name:\"footprint\",message:t,error_type:\"source_invalid_component_property_error\"});this._invalidFootprintPropMessages=[]}getPortsFromSchematicSymbol(){if(this.root?.schematicDisabled)return[];const{config:t}=this;if(!t.schematicSymbolName)return[];const e=Su[t.schematicSymbolName];if(!e)return[];const n=[];for(const o of e.ports){const i=O0e(o.labels);i\u0026\u0026(i.schematicSymbolPortDef=o,n.push(i))}return n}doInitialCreateNetsFromProps(){this._createNetsFromProps(this._getNetsFromConnectionsProp())}_getNetsFromConnectionsProp(){const{_parsedProps:t}=this,e=[];if(t.connections)for(const[n,o]of Object.entries(t.connections)){const i=Array.isArray(o)?o:[o];for(const r of i)e.push(String(r))}return e}_createNetsFromProps(t){Hj(this,t)}_getPcbCircuitJsonBounds(){const{db:t}=this.root;if(!this.pcb_component_id)return super._getPcbCircuitJsonBounds();const e=t.pcb_component.get(this.pcb_component_id);return{center:{x:e.center.x,y:e.center.y},bounds:{left:e.center.x-e.width/2,top:e.center.y-e.height/2,right:e.center.x+e.width/2,bottom:e.center.y+e.height/2},width:e.width,height:e.height}}_getPinCountFromSchematicPortArrangement(){const t=this._getSchematicPortArrangement();if(!t)return 0;if(!lDt(t))return(t.leftSize??t.leftPinCount??0)+(t.rightSize??t.rightPinCount??0)+(t.topSize??t.topPinCount??0)+(t.bottomSize??t.bottomPinCount??0);const n=rPe(t);let o=0;for(const i of n){if(typeof i==\"number\"){o=Math.max(o,i);continue}const r=uw(i);if(r!==null){o=Math.max(o,r);continue}const s=this._parsedProps.pinLabels;s\u0026\u0026(o=Math.max(o,hO(i,s)))}return Math.max(o,n.length)}_getPrimaryPinCount(){if(this._getSchematicPortArrangement())return this._getPinCountFromSchematicPortArrangement();const e=this.getPortsFromFootprint();if(e.length\u003e0)return e.filter(o=\u003eo._isPrimaryPort).length;const{pinLabels:n}=this._parsedProps;if(n){if(Array.isArray(n))return n.length;const o=Object.keys(n).map(i=\u003euw(i)).filter(i=\u003ei!==null\u0026\u0026!Number.isNaN(i));return o.length\u003e0?Math.max(...o):Object.keys(n).length}return 0}_getSchematicPortArrangement(){return this._parsedProps.schPinArrangement??this._parsedProps.schPortArrangement}_getPinLabelsFromPorts(){const t=this.selectAll(\"port\"),e={};for(const n of t){const o=n.props.pinNumber;if(o!==void 0){const i=n._getBestDisplayPinLabel();i\u0026\u0026(e[`pin${o}`]=i)}}return e}_getImplicitSparseSchematicPortArrangement(t){const e=Array.from(new Set(this._getAllPortsFromChildren().filter(r=\u003er._isPrimaryPort).map(r=\u003er._parsedProps.pinNumber).filter(r=\u003er!==void 0))).sort((r,s)=\u003er-s);if(e.length!==t||!e.some((r,s)=\u003er!==s+1))return;const o=Math.floor(t/2),i=t-o;return{leftSide:{pins:e.slice(0,i)},rightSide:{pins:e.slice(i)}}}_getSchematicBoxDimensions(){return this.schematicBoxDimensions?this.schematicBoxDimensions:this._computeSchematicBoxDimensions()}_computeSchematicBoxDimensions(){if(this.getSchematicSymbol()||!this.config.shouldRenderAsSchematicBox\u0026\u0026!this._parsedProps?.showAsSchematicBox)return null;const{_parsedProps:t}=this,e=this._getPrimaryPinCount(),n=.2,i={...this._getPinLabelsFromPorts(),...t.pinLabels},r=this._getSchematicPortArrangement()??this._getImplicitSparseSchematicPortArrangement(e);return sPe({schWidth:t.schWidth,schHeight:t.schHeight,schPinSpacing:n,numericSchPinStyle:Kj(t.schPinStyle,i),pinCount:e,schPortArrangement:r,pinLabels:i})}getFootprinterString(){const t=this.resolveFootprint();return typeof t==\"string\"?t:null}doInitialCadModelRender(){if(this._isCadModelChild||this.props.doNotPlace)return;const{db:t}=this.root,{boardThickness:e=0}=this._getBoard()??{},n=this._parsedProps.cadModel,o=n===void 0?this._asyncFootprintCadModel:n,i=this.getFootprinterString()??void 0;let r=!1;if(i\u0026\u0026(r=!fO(i)\u0026\u0026!hw(i)\u0026\u0026!dw(i)\u0026\u0026!Vj(i)),!this.pcb_component_id||o===null)return;const s=this._getPcbCircuitJsonBounds();if(typeof o==\"string\")throw new Error(\"String cadModel not yet implemented\");const a=o?.pcbRotationOffset??o?.rotationOffset,A=l8o.parse({x:0,y:0,z:typeof a==\"number\"?a:0,...typeof a==\"object\"?a:{}}),c=D9.parse({x:0,y:0,z:0,...typeof o?.positionOffset==\"object\"?o.positionOffset:{}}),l=o\u0026\u0026typeof o==\"object\"\u0026\u0026\"zOffsetFromSurface\"in o\u0026\u0026o.zOffsetFromSurface!==void 0?lt.parse(o.zOffsetFromSurface):0,u=this.props.layer===\"bottom\"?\"bottom\":\"top\",g=t.pcb_component.get(this.pcb_component_id),h=this._computePcbGlobalTransformBeforeLayout(),p=O9(h).rotation.angle*180/Math.PI,m=g?.position_mode===\"packed\"?g.rotation??p:p,_=u===\"bottom\";if(!o\u0026\u0026!r){const x=t.cad_component.insert({position:{x:s.center.x,y:s.center.y,z:u===\"bottom\"?-e/2:e/2},rotation:{x:0,y:_?180:0,z:k9(_?-m:m)},pcb_component_id:this.pcb_component_id,source_component_id:this.source_component_id,model_origin_alignment:\"center_of_component_on_board_surface\",anchor_alignment:\"center_of_component_on_board_surface\",show_as_bounding_box:!0,show_as_translucent_model:this._parsedProps.showAsTranslucentModel});this.cad_component_id=x.cad_component_id;return}const f=m+(A.z??0),I=k9(f);let C;!o\u0026\u0026r\u0026\u0026(C=i);const y=t.cad_component.insert({position:{x:s.center.x+c.x,y:s.center.y+c.y,z:(u===\"bottom\"?-e/2:e/2)+(u===\"bottom\"?-l:l)+c.z},rotation:{x:A.x,y:A.y+(_?180:0),z:k9(_?-I:I)},pcb_component_id:this.pcb_component_id,source_component_id:this.source_component_id,model_stl_url:\"stlUrl\"in(o??{})?this._addCachebustToModelUrl(o.stlUrl):void 0,model_obj_url:\"objUrl\"in(o??{})?this._addCachebustToModelUrl(o.objUrl):void 0,model_mtl_url:\"mtlUrl\"in(o??{})?this._addCachebustToModelUrl(o.mtlUrl):void 0,model_gltf_url:\"gltfUrl\"in(o??{})?this._addCachebustToModelUrl(o.gltfUrl):void 0,model_glb_url:\"glbUrl\"in(o??{})?this._addCachebustToModelUrl(o.glbUrl):void 0,model_step_url:\"stepUrl\"in(o??{})?this._addCachebustToModelUrl(o.stepUrl):void 0,model_wrl_url:\"wrlUrl\"in(o??{})?this._addCachebustToModelUrl(o.wrlUrl):void 0,model_jscad:\"jscad\"in(o??{})?o.jscad:void 0,model_unit_to_mm_scale_factor:typeof o?.modelUnitToMmScale==\"number\"?o.modelUnitToMmScale:void 0,model_board_normal_direction:o?.modelBoardNormalDirection,model_origin_alignment:\"center_of_component_on_board_surface\",anchor_alignment:\"center_of_component_on_board_surface\",model_origin_position:o?.modelOriginPosition,...o?.size?{size:o.size}:{},footprinter_string:C,show_as_translucent_model:this._parsedProps.showAsTranslucentModel});this.cad_component_id=y.cad_component_id}_addCachebustToModelUrl(t){if(!t||!t.includes(\"modelcdn.tscircuit.com\"))return t;const e=this.root?.getClientOrigin()??\"\";return`${t}${t.includes(\"?\")?\"\u0026\":\"?\"}cachebust_origin=${encodeURIComponent(e)}`}_getPartsEngineCacheKey(t,e){return JSON.stringify({ftype:t.ftype,name:t.name,manufacturer_part_number:t.manufacturer_part_number,standard:t.standard,pin_count:t.pin_count,footprinterString:e})}async _getSupplierPartNumbers(t,e,n){if(this.props.doNotPlace)return{};const o=this.root?.platform?.localCacheEngine,i=this._getPartsEngineCacheKey(e,n);if(o){const a=await o.getItem(i);if(a)try{return JSON.parse(a)}catch{}}const r=await Promise.resolve(t.findPart({sourceComponent:e,footprinterString:n}));if(typeof r==\"string\")throw r.includes(\"\u003c!DOCTYPE\")||r.includes(\"\u003chtml\")?new Error(`Failed to fetch supplier part numbers: Received HTML response instead of JSON. Response starts with: ${r.substring(0,100)}`):r===\"Not found\"?new Error(`Part not found for ${this.getString()}${n?` with footprint \"${n}\"`:\"\"}`):new Error(`Invalid supplier part numbers format: Expected object but got string: \"${r}\"`);if(!r||Array.isArray(r)||typeof r!=\"object\"){const a=r===null?\"null\":Array.isArray(r)?\"array\":typeof r;throw new Error(`Invalid supplier part numbers format: Expected object but got ${a}`)}const s=r;if(o)try{await o.setItem(i,JSON.stringify(s))}catch{}return s}doInitialPartsEngineRender(){if(this.props.doNotPlace||this.getInheritedProperty(\"bomDisabled\")||this.getInheritedProperty(\"partsEngineDisabled\"))return;const t=this.getInheritedProperty(\"partsEngine\");if(!t)return;const{db:e}=this.root,n=e.source_component.get(this.source_component_id);if(!n||n.supplier_part_numbers)return;const o=this.props.footprint??this._getImpliedFootprintString(),i=typeof o==\"string\"?o:void 0,r=this._getSupplierPartNumbers(t,n,i);if(!(r instanceof Promise)){e.source_component.update(this.source_component_id,{supplier_part_numbers:r});return}this._queueAsyncEffect(\"get-supplier-part-numbers\",async()=\u003e{await r.then(s=\u003e{this._asyncSupplierPartNumbers=s,this._markDirty(\"PartsEngineRender\")}).catch(s=\u003e{this._asyncSupplierPartNumbers={};const a=hV.parse({type:\"source_part_not_found_warning\",message:`Failed to fetch supplier part numbers for ${this.getString()}: ${s.message}`,source_component_id:this.source_component_id??void 0,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,manufacturer_part_number:n.manufacturer_part_number??void 0,part_name:n.name??void 0});e.source_part_not_found_warning.insert(a),this._markDirty(\"PartsEngineRender\")})})}updatePartsEngineRender(){if(this.props.doNotPlace||this.getInheritedProperty(\"bomDisabled\")||this.getInheritedProperty(\"partsEngineDisabled\"))return;const{db:t}=this.root,e=t.source_component.get(this.source_component_id);if(e\u0026\u0026!e.supplier_part_numbers\u0026\u0026this._asyncSupplierPartNumbers){t.source_component.update(this.source_component_id,{supplier_part_numbers:this._asyncSupplierPartNumbers});return}}doInitialPartOrientationAnalysis(){L6o(this)}updatePartOrientationAnalysis(){H6o(this)}doInitialSupplierFootprintMismatchWarning(){r8o(this)}updateSupplierFootprintMismatchWarning(){this.doInitialSupplierFootprintMismatchWarning()}doInitialAssignFallbackProps(){const{_parsedProps:t}=this;t.connections\u0026\u0026!this.name\u0026\u0026(this.fallbackUnassignedName=this.getSubcircuit().getNextAvailableName(this))}doInitialCreateTracesFromProps(){this._createTracesFromConnectionsProp()}_createTracesFromConnectionsProp(){const{_parsedProps:t}=this;if(t.connections)for(const[e,n]of Object.entries(t.connections)){const o=Array.isArray(n)?n:[n];for(const i of o)this.add(new t1({from:`.${this.name} \u003e .${e}`,to:String(i)}))}}doInitialSourceDesignRuleChecks(){q6o(this)}doInitialSourceComponentPropertyValidation(){this._insertInvalidFootprintPropErrors()}doInitialValidatePcbCoordinates(){if(super.doInitialValidatePcbCoordinates(),this.root?.pcbDisabled)return;const t=this._parsedProps,e=this.props,n=typeof e.pcbLeftEdgeX==\"string\"?e.pcbLeftEdgeX:t.pcbLeftEdgeX??e.pcbLeftEdgeX,o=typeof e.pcbRightEdgeX==\"string\"?e.pcbRightEdgeX:t.pcbRightEdgeX??e.pcbRightEdgeX,i=typeof e.pcbTopEdgeY==\"string\"?e.pcbTopEdgeY:t.pcbTopEdgeY??e.pcbTopEdgeY,r=typeof e.pcbBottomEdgeY==\"string\"?e.pcbBottomEdgeY:t.pcbBottomEdgeY??e.pcbBottomEdgeY;(t.pcbX!==void 0||t.pcbY!==void 0||n!==void 0||o!==void 0||i!==void 0||r!==void 0)\u0026\u0026(n!==void 0\u0026\u0026this._validatePcbCoordinateReferences({rawValue:n,axis:\"pcbX\",propertyName:\"pcbLeftEdgeX\"}),o!==void 0\u0026\u0026this._validatePcbCoordinateReferences({rawValue:o,axis:\"pcbX\",propertyName:\"pcbRightEdgeX\"}),i!==void 0\u0026\u0026this._validatePcbCoordinateReferences({rawValue:i,axis:\"pcbY\",propertyName:\"pcbTopEdgeY\"}),r!==void 0\u0026\u0026this._validatePcbCoordinateReferences({rawValue:r,axis:\"pcbY\",propertyName:\"pcbBottomEdgeY\"}))}doInitialPcbLayout(){if(this.root?.pcbDisabled||!this.pcb_component_id)return;const{db:t}=this.root,e=this._parsedProps,n=this.props,o=e.pcbLeftEdgeX??n.pcbLeftEdgeX,i=e.pcbRightEdgeX??n.pcbRightEdgeX,r=e.pcbTopEdgeY??n.pcbTopEdgeY,s=e.pcbBottomEdgeY??n.pcbBottomEdgeY;if(!(e.pcbX!==void 0||e.pcbY!==void 0||o!==void 0||i!==void 0||r!==void 0||s!==void 0))return;if(o!==void 0\u0026\u0026i!==void 0)throw new Error(`${this.componentName} cannot set both pcbLeftEdgeX and pcbRightEdgeX`);if(r!==void 0\u0026\u0026s!==void 0)throw new Error(`${this.componentName} cannot set both pcbTopEdgeY and pcbBottomEdgeY`);const A=t.pcb_component.get(this.pcb_component_id),c=A?.width??0,l=A?.height??0,g=this.getGroup()?.pcb_group_id??void 0,h=g?void 0:this._getBoard()?.pcb_board_id??void 0,d=this._resolvedPcbCalcOffsetX??(e.pcbX!==void 0?this._resolvePcbCoordinate(e.pcbX,\"pcbX\"):o!==void 0?this._resolvePcbCoordinate(o,\"pcbX\",{propertyName:\"pcbLeftEdgeX\"})+c/2:i!==void 0?this._resolvePcbCoordinate(i,\"pcbX\",{propertyName:\"pcbRightEdgeX\"})-c/2:void 0),p=this._resolvedPcbCalcOffsetY??(e.pcbY!==void 0?this._resolvePcbCoordinate(e.pcbY,\"pcbY\"):r!==void 0?this._resolvePcbCoordinate(r,\"pcbY\",{propertyName:\"pcbTopEdgeY\"})-l/2:s!==void 0?this._resolvePcbCoordinate(s,\"pcbY\",{propertyName:\"pcbBottomEdgeY\"})+l/2:void 0);t.pcb_component.update(this.pcb_component_id,{position_mode:\"relative_to_group_anchor\",positioned_relative_to_pcb_group_id:g,positioned_relative_to_pcb_board_id:h,display_offset_x:d,display_offset_y:p})}_getMinimumFlexContainerSize(){return _6o(this)}_repositionOnPcb(t){return f6o(this,t)}doInitialSilkscreenOverlapAdjustment(){return $6o(this)}isRelativelyPositioned(){const t=this.props;return this._parsedProps.pcbX!==void 0||this._parsedProps.pcbY!==void 0||this._parsedProps.pcbLeftEdgeX!==void 0||this._parsedProps.pcbRightEdgeX!==void 0||this._parsedProps.pcbTopEdgeY!==void 0||this._parsedProps.pcbBottomEdgeY!==void 0||t.pcbLeftEdgeX!==void 0||t.pcbRightEdgeX!==void 0||t.pcbTopEdgeY!==void 0||t.pcbBottomEdgeY!==void 0}},uPe=(t,e)=\u003e{const n=t.source_group.list(),o=[],i=r=\u003e{const s=n.filter(a=\u003ea.parent_subcircuit_id===r);for(const a of s)a.subcircuit_id\u0026\u0026(o.push(a.subcircuit_id),i(a.subcircuit_id))};return i(e),o},u8o=({boardAnchorPosition:t,boardAnchorAlignment:e,width:n,height:o})=\u003e{const{x:i,y:r}=t;let s=i,a=r;switch(e){case\"top_left\":s=i+n/2,a=r-o/2;break;case\"top_right\":s=i-n/2,a=r-o/2;break;case\"bottom_left\":s=i+n/2,a=r+o/2;break;case\"bottom_right\":s=i-n/2,a=r+o/2;break;case\"top\":s=i,a=r-o/2;break;case\"bottom\":s=i,a=r+o/2;break;case\"left\":s=i+n/2,a=r;break;case\"right\":s=i-n/2,a=r;break}return{x:s,y:a}};function g8o(t,e){const{subcircuit:n}=e;if(n.lowercaseComponentName===\"board\"||n.lowercaseComponentName===\"mountedboard\"||n.parent?.lowercaseComponentName===\"board\")return;const o={name:\"inflated_board\"};t.width\u0026\u0026(o.width=t.width),t.height\u0026\u0026(o.height=t.height),t.center\u0026\u0026(o.pcbX=t.center.x,o.pcbY=t.center.y),t.outline\u0026\u0026(o.outline=t.outline),t.thickness\u0026\u0026(o.thickness=t.thickness),t.material\u0026\u0026(o.material=t.material),t.is_via_in_pad_allowed!==void 0\u0026\u0026(o.isViaInPadAllowed=t.is_via_in_pad_allowed),t.allow_blind_and_buried_vias!==void 0\u0026\u0026(o.allowBlindAndBuriedVias=t.allow_blind_and_buried_vias);const i=new wB(o);return i.pcb_board_id=t.pcb_board_id,n.add(i),i}var gPe=new WeakMap,PDt=t=\u003e{const e=[t.name,...t.port_hints??[]].map(i=\u003ei.toLowerCase().replace(/[^a-z0-9+-]/g,\"\")),n=e.some(i=\u003e[\"a\",\"anode\",\"pos\",\"positive\",\"+\"].includes(i)),o=e.some(i=\u003e[\"k\",\"cathode\",\"neg\",\"negative\",\"-\"].includes(i));return n===o?null:n?\"positive\":\"negative\"},d8o=t=\u003e{const e=t.root;if(!e)return;const{db:n}=e;for(const m of gPe.get(t)??[])n.pcb_fabrication_note_path.delete(m.pcb_fabrication_note_path_id);if(gPe.delete(t),e.pcbDisabled||!t.props.polarized||!t.pcb_component_id)return;const o=n.pcb_component.get(t.pcb_component_id);if(!o||o.layer!==\"top\"\u0026\u0026o.layer!==\"bottom\")return;const i=n.source_port.list({source_component_id:t.source_component_id}),r=i.filter(m=\u003ePDt(m)===\"positive\"),s=i.filter(m=\u003ePDt(m)===\"negative\");if(r.length!==1||s.length!==1)return;const a=n.pcb_port.getWhere({source_port_id:r[0].source_port_id}),A=n.pcb_port.getWhere({source_port_id:s[0].source_port_id});if(!a||!A)return;const c=Math.hypot(A.x-a.x,A.y-a.y);if(c\u003c1e-6)return;const l=D0(M0((a.x+A.x)/2,(a.y+A.y)/2),W4(Math.atan2(A.y-a.y,A.x-a.x))),u=(m,_)=\u003ets(l,{x:m,y:_}),g=c/4,h=Math.min(c*.12,.3),d=[[u(-g-h,0),u(-g+h,0)],[u(-g,-h),u(-g,h)],[u(g-h,0),u(g+h,0)]],p=[];gPe.set(t,p);for(const m of d)p.push(n.pcb_fabrication_note_path.insert({pcb_component_id:o.pcb_component_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,layer:o.layer,route:m,stroke_width:Math.min(.08,h*.4)}))},h8o=1;function p8o(t){const e=[];for(const n of t.children)n instanceof Pu\u0026\u0026e.push(n);return e}function m8o(t){const e=p8o(t);if(e.length!==2)return;const n=e[0].isConnectedToPower(),o=e[0].isConnectedToGround(),i=e[1].isConnectedToPower(),r=e[1].isConnectedToGround();return n\u0026\u0026!o\u0026\u0026r\u0026\u0026!i||i\u0026\u0026!r\u0026\u0026o\u0026\u0026!n?h8o:void 0}var _8o=new Set([\"01005\",\"0201\",\"0402\",\"0603\",\"0805\",\"1206\",\"1210\",\"2010\",\"2512\"]),MDt=class extends g0{_adjustSilkscreenTextAutomatically=!0;get config(){const t=this.props.symbolName??\"capacitor\",e=this.props.schSize===\"sm\"||this.props.schSize===\"xs\"?this.props.schSize:void 0,n=e\u0026\u0026t===\"capacitor\"?`capacitor_${e}`:void 0,o=n\u0026\u0026`${n}_right`in Su?n:t;return{componentName:\"Capacitor\",schematicSymbolName:this.props.polarized?\"capacitor_polarized\":o,zodProps:qwn,sourceFtype:$7.simple_capacitor}}initPorts(){typeof this.props.footprint==\"string\"?super.initPorts({additionalAliases:{pin1:[\"anode\",\"pos\"],pin2:[\"cathode\",\"neg\"]}}):super.initPorts()}_getSchematicSymbolDisplayValue(){const t=this.props.capacitance;let e;return this._parsedProps.capacitance!==void 0\u0026\u0026!isNaN(this._parsedProps.capacitance)?e=typeof t==\"string\"?t:`${H_(this._parsedProps.capacitance)}F`:e=`${H_(this._parsedProps.capacitance)}F`,this._parsedProps.schShowRatings\u0026\u0026this._parsedProps.maxVoltageRating?`${e}/${H_(this._parsedProps.maxVoltageRating)}V`:e}getFootprinterString(){const t=super.getFootprinterString();return t\u0026\u0026_8o.has(t)?`cap${t}`:t}doInitialCreateNetsFromProps(){this._createNetsFromProps([this.props.decouplingFor,this.props.decouplingTo,...this._getNetsFromConnectionsProp()])}doInitialCreateTracesFromProps(){this.props.decouplingFor\u0026\u0026this.props.decouplingTo\u0026\u0026(this.add(new t1({from:`${this.getSubcircuitSelector()} \u003e port.1`,to:this.props.decouplingFor})),this.add(new t1({from:`${this.getSubcircuitSelector()} \u003e port.2`,to:this.props.decouplingTo}))),this._createTracesFromConnectionsProp()}doInitialPcbComponentSizeCalculation(){super.doInitialPcbComponentSizeCalculation(),d8o(this)}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_capacitor\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,capacitance:e.capacitance,max_voltage_rating:e.maxVoltageRating,max_decoupling_trace_length:e.maxDecouplingTraceLength??m8o(this),display_capacitance:this._getSchematicSymbolDisplayValue(),are_pins_interchangeable:!e.polarized,display_name:e.displayName});this.source_component_id=n.source_component_id}},f8o=({pcbComponent:t,db:e,componentName:n})=\u003e{const o=t.center||{x:0,y:0},i=t.rotation||0,r=CRn(D0(M0(o.x,o.y),W4(i*Math.PI/180))),s=e.toArray().filter(c=\u003e\"pcb_component_id\"in c\u0026\u0026c.pcb_component_id===t.pcb_component_id),a=structuredClone(s);return FF(a,r),Db({componentName:n,componentRotation:\"0deg\"},a)},e4=(t,e)=\u003e{const{injectionDb:n,normalComponent:o}=e;if(!o)return null;const i=f8o({pcbComponent:t,db:n,componentName:o.name});if(i.length===0)return null;const r=new Y0e({originalLayer:t.layer});return r.addAll(i),r},t4=({pcbComponent:t,sourceGroupId:e,inflatorContext:n})=\u003e{if(!t?.center)return{pcbX:void 0,pcbY:void 0};if(e){const o=n.injectionDb.pcb_group.getWhere({source_group_id:e});if(o?.anchor_position)return{pcbX:t.center.x-o.anchor_position.x,pcbY:t.center.y-o.anchor_position.y}}return{pcbX:t.center.x,pcbY:t.center.y}};function I8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new MDt({name:t.name,capacitance:t.capacitance,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c\u0026\u0026A.add(c)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var DDt=({circuitJson:t,pcbComponentId:e,sourceComponentId:n})=\u003e{const o=t.filter(r=\u003er.type===\"pcb_component\"?r.pcb_component_id===e:r.type===\"source_component\"?r.source_component_id===n:\"pcb_component_id\"in r\u0026\u0026r.pcb_component_id===e||\"source_component_id\"in r\u0026\u0026r.source_component_id===n);if(o.length===0)return null;const i=P$n(o);return{x:i.x,y:i.y}},C8o=t=\u003e{if(t.root?.pcbDisabled||!t.name.toUpperCase().startsWith(\"J\")||!t.pcb_component_id||!t.source_component_id)return;const e=t.root?.platform?.placementDrcChecksDisabled??t.getInheritedProperty(\"placementDrcChecksDisabled\"),n=t.root?.platform?.drcChecksDisabled??t.getInheritedProperty(\"drcChecksDisabled\");if(e||n)return;const{db:o}=t.root;if(o.source_component.get(t.source_component_id)?.ftype!==\"simple_chip\")return;const r=o.subtree({subcircuit_id:t.getSubcircuit().subcircuit_id}).toArray(),s=DDt({circuitJson:r,pcbComponentId:t.pcb_component_id,sourceComponentId:t.source_component_id});if(!s)return;const a=r.map(l=\u003el.type===\"pcb_component\"\u0026\u0026l.pcb_component_id===t.pcb_component_id?{...l,cable_insertion_center:s}:l),A=Vmt(a).find(l=\u003el.pcb_component_id===t.pcb_component_id);!A||o.toArray().some(l=\u003el.type===A.type\u0026\u0026l.message===A.message)||o.insertAll([A])},zj=class extends g0{get config(){return{componentName:\"Chip\",zodProps:Y3,shouldRenderAsSchematicBox:!0}}initPorts(t={}){super.initPorts(t);const{_parsedProps:e}=this;if(e.externallyConnectedPins){const n=new Set;for(const[o,i]of e.externallyConnectedPins)n.add(o),n.add(i);for(const o of n)if(!this.children.find(r=\u003er instanceof Pu\u0026\u0026r.isMatchingAnyOf([o]))){const r=o.match(/^pin(\\d+)$/);if(r){const s=parseInt(r[1]);this.add(new Pu({pinNumber:s,aliases:[o]}))}else this.add(new Pu({name:o,aliases:[o]}))}}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_chip\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=e.footprint??this._getImpliedFootprintString(),r=this.children.some(c=\u003ec.componentName===\"Footprint\");if(!i\u0026\u0026!r\u0026\u0026!this._hasStartedFootprintUrlLoad){const c=t.pcb_missing_footprint_error.insert({message:`No footprint specified for component: ${this.getString()}`,source_component_id:`${this.source_component_id}`,error_type:\"pcb_missing_footprint_error\"});this.pcb_missing_footprint_error_id=c.pcb_missing_footprint_error_id}const s=this._getPcbComponentLayer();if(s!==\"top\"\u0026\u0026s!==\"bottom\"){const c=this.getSubcircuit(),l=vne.parse({type:\"pcb_component_invalid_layer_error\",message:`Component cannot be placed on layer '${s}'. Components can only be placed on 'top' or 'bottom' layers.`,source_component_id:this.source_component_id,layer:s,subcircuit_id:c.subcircuit_id??void 0});t.pcb_component_invalid_layer_error.insert(l)}const a=this.getGlobalTransformRotation(),A=t.pcb_component.insert({center:{x:n,y:o},width:2,height:3,layer:s===\"top\"||s===\"bottom\"?s:\"top\",rotation:k9(a),insertion_direction:this._getPcbComponentInsertionDirection(s,a),source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0});this.pcb_component_id=A.pcb_component_id}doInitialPcbPlacementDesignRuleChecks(){C8o(this)}doInitialCreateTracesFromProps(){const{_parsedProps:t}=this;if(t.externallyConnectedPins)for(const[e,n]of t.externallyConnectedPins)this.add(new t1({from:`${this.getSubcircuitSelector()} \u003e port.${e}`,to:`${this.getSubcircuitSelector()} \u003e port.${n}`}));this._createTracesFromConnectionsProp()}doInitialSimulationRender(){const{db:t}=this.root,{pinAttributes:e}=this.props;if(!e)return;let n=null,o=null,i;const r=this.selectAll(\"port\");for(const l of r)for(const u of l.getNameAndAliases())if(e[u]){const g=e[u];g.providesPower\u0026\u0026(n=l,i=g.providesVoltage),g.providesGround\u0026\u0026(o=l)}if(!n||!o||i===void 0)return;const s=t.source_port.get(n.source_port_id);if(!s?.subcircuit_connectivity_map_key)return;const a=t.source_port.get(o.source_port_id);if(!a?.subcircuit_connectivity_map_key)return;const A=t.source_net.getWhere({subcircuit_connectivity_map_key:s.subcircuit_connectivity_map_key}),c=t.source_net.getWhere({subcircuit_connectivity_map_key:a.subcircuit_connectivity_map_key});!A||!c||t.simulation_voltage_source.insert({type:\"simulation_voltage_source\",positive_source_port_id:n.source_port_id,positive_source_net_id:A.source_net_id,negative_source_port_id:o.source_port_id,negative_source_net_id:c.source_net_id,voltage:i})}},y8o=(t,e)=\u003e{if(!t||t.length===0)return;const{injectionDb:n}=e,o=t.map(i=\u003ei.map(r=\u003e{const s=n.source_port.get(r);return s?s.pin_number!==void 0\u0026\u0026s.pin_number!==null?`pin${s.pin_number}`:s.name:null}).filter(r=\u003er!==null)).filter(i=\u003ei.length\u003e0);return o.length\u003e0?o:void 0},x8o=(t,e)=\u003e{const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),s=n.schematic_component.getWhere({source_component_id:t.source_component_id}),a=n.cad_component.getWhere({source_component_id:t.source_component_id}),A=y8o(t.internally_connected_source_port_ids,e),c=a?.footprinter_string??null,{pcbX:l,pcbY:u}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),g=new zj({name:t.name,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,pinLabels:s?.port_labels??void 0,schWidth:s?.size?.width,schHeight:s?.size?.height,schPinSpacing:s?.pin_spacing,schX:s?.center?.x,schY:s?.center?.y,layer:r?.layer,pcbX:l,pcbY:u,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds,internallyConnectedPins:A});if(c\u0026\u0026(Object.assign(g.props,{footprint:c}),Object.assign(g._parsedProps,{footprint:c})),r){const h=e4(r,{...e,normalComponent:g});h\u0026\u0026g.add(h)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(g):o.add(g)},E8o=/^(?:pin)?(\\d+)$/i,B8o=t=\u003e{for(const e of t??[]){const n=e.trim().match(E8o);if(n)return Number.parseInt(n[1],10)}},NDt=(t,e)=\u003et!==void 0\u0026\u0026t\u003e=1\u0026\u0026t\u003c=e,b8o=(t,e)=\u003e{const n=new Map;for(const i of t)i.type===\"source_port\"\u0026\u0026typeof i.pin_number==\"number\"\u0026\u0026n.set(i.source_port_id,i.pin_number);const o=new Map;for(const i of t){if(i.type!==\"pcb_port\")continue;const r=n.get(i.source_port_id);r!==void 0\u0026\u0026o.set(i.pcb_port_id,r)}return t.filter(i=\u003e!i.type.startsWith(\"schematic_\")).map(i=\u003e{if(i.type===\"source_port\"){const A=i.pin_number;return{...i,name:typeof A==\"number\"?`pin${A}`:i.name,port_hints:NDt(A,e)?[`pin${A}`]:[]}}if(!(\"port_hints\"in i)\u0026\u0026!(\"pcb_port_id\"in i))return i;const r=\"port_hints\"in i?B8o(i.port_hints):void 0,s=\"pcb_port_id\"in i\u0026\u0026typeof i.pcb_port_id==\"string\"?o.get(i.pcb_port_id):void 0,a=r??s;return{...i,port_hints:NDt(a,e)?[`pin${a}`]:[]}})},RDt=[{label:\"GND1\",aliases:[]},{label:\"VBUS1\",aliases:[]},{label:\"CC1\",aliases:[]},{label:\"DP1\",aliases:[]},{label:\"DM1\",aliases:[\"DN1\"]},{label:\"SBU1\",aliases:[]},{label:\"SBU2\",aliases:[]},{label:\"DM2\",aliases:[\"DN2\"]},{label:\"DP2\",aliases:[]},{label:\"CC2\",aliases:[]},{label:\"VBUS2\",aliases:[]},{label:\"GND2\",aliases:[]},{label:\"SHELL1\",aliases:[\"MH1\",\"EH1\",\"MOUNT1\"]},{label:\"SHELL2\",aliases:[\"MH2\",\"EH2\",\"MOUNT2\"]},{label:\"SHELL3\",aliases:[\"MH3\",\"EH3\",\"MOUNT3\"]},{label:\"SHELL4\",aliases:[\"MH4\",\"EH4\",\"MOUNT4\"]}],S8o=/^(?:pin)?(\\d+)$/i,Q8o=t=\u003eArray.from(new Set(t)),v8o=t=\u003e{const e=[];for(const o of t){if(o.type!==\"source_port\")continue;const i=o.pin_number;if(typeof i!=\"number\")continue;const r=new Set;for(const s of o.port_hints??[])r.add(s.trim().toUpperCase());e.push({pinKey:`pin${i}`,upperCaseHints:r})}const n={};for(const{label:o,aliases:i}of RDt){const r=[o,...i].map(A=\u003eA.toUpperCase()),s=e.findIndex(A=\u003er.some(c=\u003eA.upperCaseHints.has(c)));if(s===-1)continue;const{pinKey:a}=e[s];n[a]=[o],e.splice(s,1)}return Object.keys(n).length===0?t:t.map(o=\u003e{if(!(\"port_hints\"in o)||!Array.isArray(o.port_hints))return o;const i=o.port_hints.filter(a=\u003etypeof a==\"string\").map(a=\u003ea.trim()).filter(a=\u003ea.length\u003e0);if(i.length===0)return o;const r=new Set;o.type===\"source_port\"\u0026\u0026typeof o.pin_number==\"number\"\u0026\u0026r.add(`pin${o.pin_number}`);for(const a of i){const A=a.match(S8o);A\u0026\u0026r.add(`pin${Number.parseInt(A[1],10)}`)}const s=[];for(const a of r)s.push(...n[a]??[]);return s.length===0?o:{...o,port_hints:Q8o([...i,...s])}})},TDt=.5,w8o=.15;function P8o(t,e){if(!t.schematic_component_id||!t.root)return;const{db:n}=t.root,o=n.schematic_component.get(t.schematic_component_id);if(!o||o.symbol_name)return;const i=o.size.width*TDt,r=o.size.height*TDt,s=Math.min(i/e.size.width,r/e.size.height);if(!Number.isFinite(s)||s\u003c=0)return;const a=t.getSubcircuit()?.subcircuit_id??void 0,A=o.center,c=e.center,l=-o.size.width*w8o,u=g=\u003e({x:A.x+l+(g.x-c.x)*s,y:A.y+(g.y-c.y)*s});for(const g of e.primitives)if(g.type===\"path\"){const h=g.points.map(u);if(g.closed\u0026\u0026h.length\u003e1){const d=h[0],p=h[h.length-1];(d.x!==p.x||d.y!==p.y)\u0026\u0026h.push(d)}n.schematic_path.insert({schematic_component_id:t.schematic_component_id,points:h,is_filled:g.fill??!1,is_dashed:!1,fill_color:g.fill?wb:void 0,stroke_width:.02,subcircuit_id:a,schematic_sheet_id:t._resolveSchematicSheetId()})}else if(g.type===\"circle\")n.schematic_circle.insert({schematic_component_id:t.schematic_component_id,center:u({x:g.x,y:g.y}),radius:g.radius*s,stroke_width:.02,color:wb,is_filled:g.fill,fill_color:g.fill?wb:void 0,is_dashed:!1,subcircuit_id:a,schematic_sheet_id:t._resolveSchematicSheetId()});else if(g.type===\"box\"){const h=u({x:g.x,y:g.y}),d=u({x:g.x+g.width,y:g.y+g.height});n.schematic_rect.insert({schematic_component_id:t.schematic_component_id,center:{x:(h.x+d.x)/2,y:(h.y+d.y)/2},width:Math.abs(d.x-h.x),height:Math.abs(d.y-h.y),stroke_width:.02,color:wb,is_filled:!1,is_dashed:!1,rotation:0,subcircuit_id:a,schematic_sheet_id:t._resolveSchematicSheetId()})}}var kDt=[\"VBUS1\",\"VBUS2\",\"CC1\",\"CC2\",\"DP1\",\"DP2\",\"DM1\",\"DM2\",\"SBU1\",\"SBU2\",\"GND1\",\"GND2\"],FDt=[\"SHELL1\",\"SHELL2\",\"SHELL3\",\"SHELL4\"],M8o=[...kDt,...FDt],D8o=new Set([...M8o]),N8o=new Set([\"jst_sh\",\"jst_gh\",\"jst_zh\",\"jst_ph\",\"jst_xh\",\"jst_vh\"]),dPe=t=\u003et!==void 0\u0026\u0026N8o.has(t),R8o=[[\"CC1\",{marginTop:.15}],[\"DP1\",{marginTop:.15}],[\"SBU1\",{marginTop:.15}],[\"GND1\",{marginTop:.15}],[\"SHELL4\",{marginRight:.15}]],LDt=class extends zj{_getConnectorProps(){return this._parsedProps}initPorts(){const t=this._getConnectorProps();super.initPorts({pinCount:dPe(t.standard)?t.pinCount:void 0})}_hasExplicitFootprint(){return this._getConnectorProps().footprint!==void 0||this.children.some(e=\u003ee.componentName===\"Footprint\")}_shouldUseStandardPartsEngineCircuitJsonFlow(){return!(!this._getConnectorProps().standard||this._hasExplicitFootprint()||this.getInheritedProperty(\"partsEngineDisabled\"))}_addUsbCCanonicalFallbackPorts(){this.selectAll(\"port\").length\u003e0||(this.addAll(RDt.map(({label:t,aliases:e},n)=\u003enew Pu({pinNumber:n+1,name:t,aliases:[...e]}))),this._markDirty(\"InitializePortsFromChildren\"))}_handleStandardConnectorCircuitJsonFailure(t,e){const{db:n}=this.root,o=hV.parse({type:\"source_part_not_found_warning\",message:`Failed to fetch circuit JSON for ${this.getString()} (standard=\"${t}\"): ${e}`,source_component_id:this.source_component_id??void 0,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,manufacturer_part_number:this._getConnectorProps().manufacturerPartNumber??this._getConnectorProps().mfn??void 0,part_name:this.name});n.source_part_not_found_warning.insert(o),t===\"usb_c\"\u0026\u0026this._addUsbCCanonicalFallbackPorts()}_getSupplierPartNumbersToTry(t){const e=[];for(const n of Object.keys(t??{})){const o=t?.[n];Array.isArray(o)\u0026\u0026o.length\u003e0\u0026\u0026e.push(o[0])}return e}async _tryFetchPartCircuitJson(t,e){const n=await Promise.resolve(t(e))??null;return Array.isArray(n)\u0026\u0026n.length\u003e0?n:null}async _fetchStandardConnectorCircuitJson(t,e,n){for(const o of this._getSupplierPartNumbersToTry(e)){const i=await this._tryFetchPartCircuitJson(t,{supplierPartNumber:o});if(i)return i}return n?this._tryFetchPartCircuitJson(t,{manufacturerPartNumber:n}):null}_addConnectorFootprintFromCircuitJson(t,e){const n=this._getConnectorProps(),o=t===\"usb_c\"?v8o(e):dPe(t)?b8o(e,n.pinCount??0):e,i=Db({componentName:this.name,componentRotation:String(n.pcbRotation??0),footprinterString:`standard:${t}`,pinLabels:n.pinLabels,pcbPinLabels:n.pcbPinLabels},o),r=xDt(o);r\u0026\u0026(this._asyncFootprintCadModel=r),this.addAll(i),this._markDirty(\"InitializePortsFromChildren\")}_getUsbCCanonicalLabelToPinNumberMap(){const t=new Map,e=this.selectAll(\"port\");for(const n of e){const o=n.props.pinNumber;if(typeof o==\"number\")for(const i of n.getNameAndAliases()){const r=i.trim().toUpperCase();if(!D8o.has(r))continue;const s=r;t.has(s)||t.set(s,o)}}return t}_getSchematicPortArrangement(){const t=super._getSchematicPortArrangement();if(t\u0026\u0026Object.keys(t).length\u003e0)return t;const e=this._getConnectorProps();if(dPe(e.standard))return{leftSize:0,rightSize:e.pinCount??0};if(e.standard!==\"usb_c\")return t;const n=this._getUsbCCanonicalLabelToPinNumberMap(),o=kDt.map(s=\u003en.get(s)).filter(s=\u003etypeof s==\"number\"),i=FDt.map(s=\u003en.get(s)).filter(s=\u003etypeof s==\"number\");if(o.length===0\u0026\u0026i.length===0)return t;const r={};return o.length\u003e0\u0026\u0026(r.rightSide={pins:o,direction:\"top-to-bottom\"}),i.length\u003e0\u0026\u0026(r.bottomSide={pins:i,direction:\"left-to-right\"}),r}_computeSchematicBoxDimensions(){if(this._getConnectorProps().standard!==\"usb_c\")return super._computeSchematicBoxDimensions();if(this.getSchematicSymbol()||!this.config.shouldRenderAsSchematicBox)return null;const{_parsedProps:t}=this,e=this._getPrimaryPinCount(),n=.2,i={...this._getPinLabelsFromPorts()};if(t.pinLabels)for(const[c,l]of Object.entries(t.pinLabels))typeof l==\"string\"\u0026\u0026(i[c]=l);const r=this._getUsbCCanonicalLabelToPinNumberMap(),s={};for(const[c,l]of R8o){const u=r.get(c);typeof u==\"number\"\u0026\u0026(s[`pin${u}`]=l)}const a={...s,...t.schPinStyle??{}},A=this._getSchematicPortArrangement();return sPe({schWidth:t.schWidth,schHeight:t.schHeight,schPinSpacing:n,numericSchPinStyle:Kj(a,i),pinCount:e,schPortArrangement:A??void 0,pinLabels:i})}get config(){return{componentName:\"Connector\",zodProps:Dwn,shouldRenderAsSchematicBox:!0}}doInitialSourceRender(){const{db:t}=this.root,e=this._getConnectorProps(),n=e.manufacturerPartNumber??e.mfn,o=t.source_component.insert({ftype:\"simple_connector\",name:this.name,manufacturer_part_number:n,supplier_part_numbers:e.supplierPartNumbers,display_name:e.displayName,standard:e.standard,pin_count:e.pinCount});this.source_component_id=o.source_component_id,e.standard\u0026\u0026!n\u0026\u0026t.source_missing_manufacturer_part_number_warning.insert({source_component_id:this.source_component_id,standard:e.standard,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,warning_type:\"source_missing_manufacturer_part_number_warning\",message:`${this.getString()} has standard=\"${e.standard}\" but no manufacturerPartNumber (mfn). Add mfn if you do not want the connector part to change in future.`})}_isUsingStandardPartsEngineCircuitJsonFlow(){return this._shouldUseStandardPartsEngineCircuitJsonFlow()?!!this.getInheritedProperty(\"partsEngine\")?.fetchPartCircuitJson:!1}doInitialFetchPartFootprint(){const t=this._getConnectorProps(),e=t.standard;if(!e||!this._shouldUseStandardPartsEngineCircuitJsonFlow()||this._hasStartedFootprintUrlLoad)return;const n=this.getInheritedProperty(\"partsEngine\");if(n\u0026\u0026!n.fetchPartCircuitJson){this._handleStandardConnectorCircuitJsonFailure(e,\"partsEngine.fetchPartCircuitJson is not configured\");return}const o=n?.fetchPartCircuitJson;if(!o)return;this._hasStartedFootprintUrlLoad=!0;const i={type:\"source_component\",ftype:\"simple_connector\",name:this.name,manufacturer_part_number:t.manufacturerPartNumber??t.mfn,standard:e,pin_count:t.pinCount};this._queueAsyncEffect(\"load-standard-connector-circuit-json\",async()=\u003e{const{db:r}=this.root;try{const s=await this._getSupplierPartNumbers(n,i,`standard:${e}`);this.source_component_id\u0026\u0026r.source_component.update(this.source_component_id,{supplier_part_numbers:s});const a=await this._fetchStandardConnectorCircuitJson(o,s,i.manufacturer_part_number);if(!a){this._handleStandardConnectorCircuitJsonFailure(e,\"part circuit JSON was not found\");return}this._addConnectorFootprintFromCircuitJson(e,a)}catch(s){this.source_component_id\u0026\u0026r.source_component.update(this.source_component_id,{supplier_part_numbers:{}}),this._handleStandardConnectorCircuitJsonFailure(e,s.message)}})}doInitialPartsEngineRender(){this._isUsingStandardPartsEngineCircuitJsonFlow()||super.doInitialPartsEngineRender()}updatePartsEngineRender(){this._isUsingStandardPartsEngineCircuitJsonFlow()||super.updatePartsEngineRender()}doInitialSchematicComponentRender(){if(super.doInitialSchematicComponentRender(),!this.root?.schematicDisabled\u0026\u0026this.schematic_component_id\u0026\u0026this._getConnectorProps().standard===\"usb_c\"){const t=Su.usbc;t\u0026\u0026P8o(this,t)}}doInitialPcbComponentSizeCalculation(){if(super.doInitialPcbComponentSizeCalculation(),this.root?.pcbDisabled||!this.pcb_component_id||!this.source_component_id)return;const{db:t}=this.root,e=DDt({circuitJson:t.toArray(),pcbComponentId:this.pcb_component_id,sourceComponentId:this.source_component_id});e\u0026\u0026t.pcb_component.update(this.pcb_component_id,{cable_insertion_center:{x:e.x,y:e.y}})}},T8o=t=\u003e{const e=t?.port_arrangement;if(!e)return;if(\"left_size\"in e)return{leftPinCount:e.left_size,rightPinCount:e.right_size,topPinCount:e.top_size,bottomPinCount:e.bottom_size};const n={};return e.left_side\u0026\u0026(n.leftSide={pins:e.left_side.pins,direction:e.left_side.direction??\"top-to-bottom\"}),e.right_side\u0026\u0026(n.rightSide={pins:e.right_side.pins,direction:e.right_side.direction??\"top-to-bottom\"}),e.top_side\u0026\u0026(n.topSide={pins:e.top_side.pins,direction:e.top_side.direction??\"left-to-right\"}),e.bottom_side\u0026\u0026(n.bottomSide={pins:e.bottom_side.pins,direction:e.bottom_side.direction??\"left-to-right\"}),n},k8o=(t,e)=\u003e{const n=e.injectionDb.source_port.list().filter(i=\u003ei.source_component_id===t.source_component_id),o={};for(const i of n){const r=i.pin_number;if(r==null)continue;const s=Array.from(new Set([i.name,...i.port_hints??[]].filter(a=\u003etypeof a==\"string\"\u0026\u0026a.length\u003e0)));s.length\u003e0\u0026\u0026(o[`pin${r}`]=s)}if(Object.keys(o).length!==0)return o};function F8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),s=n.schematic_component.getWhere({source_component_id:t.source_component_id}),a=n.cad_component.getWhere({source_component_id:t.source_component_id}),{pcbX:A,pcbY:c}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),l={name:t.name,standard:t.standard,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,pinLabels:k8o(t,e)??s?.port_labels??void 0,schPortArrangement:T8o(s),schWidth:s?.size?.width,schHeight:s?.size?.height,schPinSpacing:s?.pin_spacing,schX:s?.center?.x,schY:s?.center?.y,layer:r?.layer,pcbX:A,pcbY:c,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds},u=new LDt(l);if(a?.footprinter_string\u0026\u0026(Object.assign(u.props,{footprint:a.footprinter_string}),Object.assign(u._parsedProps,{footprint:a.footprinter_string})),r){const g=e4(r,{...e,normalComponent:u});g\u0026\u0026u.add(g)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(u):o.add(u)}var HDt=t=\u003etypeof t==\"string\"\u0026\u0026!fO(t)\u0026\u0026!hw(t)\u0026\u0026!dw(t)\u0026\u0026!Vj(t),ODt=class extends g0{get config(){const t={schottky:\"schottky_diode\",avalanche:\"avalanche_diode\",zener:\"zener_diode\",photodiode:\"photodiode\"},e=this.props.schottky?\"schottky\":this.props.avalanche?\"avalanche\":this.props.zener?\"zener\":this.props.photo?\"photodiode\":null;return{schematicSymbolName:e?t[e]:this.props.symbolName??\"diode\",componentName:\"Diode\",zodProps:IMn,sourceFtype:\"simple_diode\"}}initPorts(){const t=this.children.some(i=\u003ei.componentName===\"Footprint\"),e=this.resolveFootprint(),n=!!this._resolvePinLabels(),o=!n\u0026\u0026!t\u0026\u0026(!e||HDt(e));super.initPorts({pinCount:2,ignoreSymbolPorts:!n\u0026\u0026!o,additionalAliases:{pin1:o?[\"anode\",\"pos\",\"left\"]:[],pin2:o?[\"cathode\",\"neg\",\"right\"]:[]}})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_diode\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}getRefDesPrefixes(){return[\"D\"]}get pos(){return this.portMap.pos}get anode(){return this.portMap.anode}get neg(){return this.portMap.neg}get cathode(){return this.portMap.cathode}},L8o=t=\u003eArray.from(new Set([t?.name,...t?.port_hints??[]].filter(e=\u003etypeof e==\"string\"\u0026\u0026e.length\u003e0))),H8o=(t,e)=\u003e{const n=e.injectionDb.source_port.list().filter(i=\u003ei.source_component_id===t.source_component_id),o={};for(const i of n){if(i.pin_number===void 0||i.pin_number===null)continue;const r=L8o(i);r.length!==0\u0026\u0026(o[`pin${i.pin_number}`]=r)}return Object.keys(o).length\u003e0?o:void 0};function O8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=H8o(t,e),c={name:t.name,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,pinLabels:A,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds},l=new ODt(c);if(r){const u=e4(r,{...e,normalComponent:l});u\u0026\u0026l.add(u)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(l):o.add(l)}var G8o=class extends g0{get config(){return{componentName:\"Fiducial\",zodProps:llt,sourceFtype:\"simple_fiducial\"}}doInitialSchematicComponentRender(){}};function Y8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=n.pcb_smtpad.list({pcb_component_id:r?.pcb_component_id}).find(u=\u003eu.shape===\"circle\"),c=A\u0026\u0026\"radius\"in A?A.radius*2:\"1mm\",l=new G8o({name:t.name,padDiameter:c,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const u=e4(r,{...e,normalComponent:l});u\u0026\u0026l.add(u)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(l):o.add(l)}function U8o(t,e){if(e.size===0)return t;const n=(t.traces??[]).filter(i=\u003ee.has(i.pcb_trace_id));if(n.length===0)return t;const o=[];for(const i of n){const r=[i.connection_name??i.pcb_trace_id,...i.connectsTo??[]];for(const[s,a]of i.route.entries()){if(a.route_type===\"via\"){const g=WN(t.layerCount),h=g.findIndex(m=\u003em===a.from_layer),d=g.findIndex(m=\u003em===a.to_layer),p=a.via_diameter??t.minViaPadDiameter??t.minViaDiameter??.6;o.push({type:\"rect\",center:{x:a.x,y:a.y},width:p,height:p,layers:g.slice(Math.min(h,d),Math.max(h,d)+1),connectedTo:r})}const A=i.route[s+1];if(!A||a.route_type!==\"wire\"\u0026\u0026a.route_type!==\"via\"||A.route_type!==\"wire\"\u0026\u0026A.route_type!==\"via\")continue;const c=a.route_type===\"wire\"?a.width:A.route_type===\"wire\"?A.width:t.minTraceWidth,l=a.route_type===\"wire\"?a.layer:a.to_layer,u=a.x===A.x||a.y===A.y?1:Math.max(1,Math.ceil(Math.hypot(A.x-a.x,A.y-a.y)/c));for(let g=0;g\u003cu;g++){const h=a.x+(A.x-a.x)*g/u,d=a.y+(A.y-a.y)*g/u,p=a.x+(A.x-a.x)*(g+1)/u,m=a.y+(A.y-a.y)*(g+1)/u;o.push({type:\"rect\",center:{x:(h+p)/2,y:(d+m)/2},width:Math.abs(p-h)+c,height:Math.abs(m-d)+c,layers:[l],connectedTo:r})}}}return{...t,traces:t.traces?.filter(i=\u003e!e.has(i.pcb_trace_id)),obstacles:[...t.obstacles,...o]}}function K8o(t){const e=[...t.schematic_net_label.list(),...t.schematic_text.list().filter(a=\u003ea.source_trace_id)];if(e.length===0)return;const n=Vf(t.toArray().filter(a=\u003ea.type.startsWith(\"source_\")));n.addConnections([...t.source_net.list().map(a=\u003e[a.source_net_id]),...t.source_component_internal_connection.list().map(a=\u003ea.source_port_ids)]);const o=e.map(a=\u003e{const A=a.type===\"schematic_net_label\",c=a.source_trace_id??(A\u0026\u0026a.schematic_trace_id?t.schematic_trace.get(a.schematic_trace_id)?.source_trace_id:void 0),l=(A?n.getNetConnectedToId(a.source_net_id):void 0)??(c?n.getNetConnectedToId(c):void 0);return{label:a,network:l}}),i=new Map,r=(a,A)=\u003e{if(!a.trim()||A===void 0)return;const c=i.get(a)??[];c.includes(A)||c.push(A),i.set(a,c)};for(const{label:a,network:A}of o)r(a.text,A);const s=a=\u003e[...n.getIdsConnectedToNet(a)].sort()[0];for(const a of i.values())a.sort((A,c)=\u003es(A).localeCompare(s(c),\"en\",{numeric:!0}));for(const{label:a,network:A}of o){const c=i.get(a.text)??[],l=A!==void 0\u0026\u0026c.length\u003e1?String(c.indexOf(A)+1):void 0;a.display_superscript!==l\u0026\u0026(a.type===\"schematic_net_label\"?t.schematic_net_label.update(a.schematic_net_label_id,{display_superscript:l}):t.schematic_text.update(a.schematic_text_id,{display_superscript:l}))}}var U0e=t=\u003etypeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"isAssemblyDeviceContainer\"in t\u0026\u0026t.isAssemblyDeviceContainer===!0;function qN(t){const e=`${t.connectionName}:source-${t.sourcePointIndex}`;return{boundaryExitPointId:`fanout-exit:${e}`,planeExitPointId:`fanout-plane:${e}`,traceId:`fanout:${e}`,viaObstacleId:`fanout-via:${e}`,planeEndpointPointId:`fanout-plane-endpoint-point:${e}`,planeEndpointTraceId:`fanout-plane-endpoint:${e}`,planeEndpointViaObstacleId:`fanout-plane-endpoint-via:${e}`}}function V8o(t){return`fanout-completion:${t.connectionName}:source-${t.sourcePointIndex}:${t.candidateIndex}`}var Nb=1e-9;function K0e(t){return t.shape===\"circle\"}function Jj(t,e){const n=-(e.ccwRotationDegrees??0)*Math.PI/180,o=t.x-e.center.x,i=t.y-e.center.y;return{x:o*Math.cos(n)-i*Math.sin(n),y:o*Math.sin(n)+i*Math.cos(n)}}function tn(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function Cr(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i,s=r\u003cNb?0:((t.x-e.x)*o+(t.y-e.y)*i)/r,a=Math.max(0,Math.min(1,s));return Math.hypot(t.x-(e.x+a*o),t.y-(e.y+a*i))}function V0e(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)}function z8o(t,e,n,o){const i=V0e(n,o,t),r=V0e(n,o,e),s=V0e(t,e,n),a=V0e(t,e,o);return(i\u003e0\u0026\u0026r\u003c0||i\u003c0\u0026\u0026r\u003e0)\u0026\u0026(s\u003e0\u0026\u0026a\u003c0||s\u003c0\u0026\u0026a\u003e0)}function tu(t,e,n,o){return z8o(t,e,n,o)?0:Math.min(Cr(t,n,o),Cr(e,n,o),Cr(n,t,e),Cr(o,t,e))}function IO(t,e,n=Nb){if(K0e(e))return tn(t,e.center)\u003c=e.width/2+n;const o=Jj(t,e);return Math.abs(o.x)\u003c=e.width/2+n\u0026\u0026Math.abs(o.y)\u003c=e.height/2+n}function z0e(t){const{center:e,diameter:n,obstacle:o,tolerance:i=Nb}=t,r=n/2;if(K0e(o))return tn(e,o.center)+r\u003c=o.width/2+i;const s=Jj(e,o);return Math.abs(s.x)+r\u003c=o.width/2+i\u0026\u0026Math.abs(s.y)+r\u003c=o.height/2+i}function wx(t,e){if(K0e(e))return Math.max(0,tn(t,e.center)-e.width/2);const n=Jj(t,e),o=Math.max(Math.abs(n.x)-e.width/2,0),i=Math.max(Math.abs(n.y)-e.height/2,0);return Math.hypot(o,i)}function Tl(t,e){if(K0e(e))return Math.max(0,Cr(e.center,t.start,t.end)-e.width/2);const n=Jj(t.start,e),o=Jj(t.end,e);if(Math.abs(n.x)\u003c=e.width/2+Nb\u0026\u0026Math.abs(n.y)\u003c=e.height/2+Nb||Math.abs(o.x)\u003c=e.width/2+Nb\u0026\u0026Math.abs(o.y)\u003c=e.height/2+Nb)return 0;const i=-e.width/2,r=e.width/2,s=-e.height/2,a=e.height/2,A=[{x:i,y:s},{x:r,y:s},{x:r,y:a},{x:i,y:a}];let c=Number.POSITIVE_INFINITY;for(let l=0;l\u003cA.length;l++)c=Math.min(c,tu(n,o,A[l],A[(l+1)%A.length]));return c}function Zm(t,e,n){if(t.layer!==e.layer)return!0;const o=(t.width+e.width)/2+n,i=o+Nb;return Math.min(t.start.x,t.end.x)-Math.max(e.start.x,e.end.x)\u003ei||Math.min(e.start.x,e.end.x)-Math.max(t.start.x,t.end.x)\u003ei||Math.min(t.start.y,t.end.y)-Math.max(e.start.y,e.end.y)\u003ei||Math.min(e.start.y,e.end.y)-Math.max(t.start.y,t.end.y)\u003ei?!0:tu(t.start,t.end,e.start,e.end)\u003e=o-Nb}var GDt=new WeakMap;function YDt(t){return t.netConnectionName??t.rootConnectionName??t.name}function XN(t,e,n){if(!e)return!1;const o=t.get(e)??new Set,i=o.size;return o.add(n),t.set(e,o),o.size!==i}function hPe(t,e){const n=new Set;for(const o of e)for(const i of t.get(o)??[])n.add(i);return n}function J8o(t){const e=new Map,n=new Map;for(const a of t.connections){const A=YDt(a);e.set(a.name,A),XN(n,a.name,A),XN(n,a.rootConnectionName,A),XN(n,a.netConnectionName,A);for(const c of a.pointsToConnect)XN(n,c.pointId,A),XN(n,c.pcb_port_id,A)}for(const a of t.traces??[]){const A=[a.connection_name,a.pcb_trace_id,...a.connectsTo??[]],c=hPe(n,A);if(c.size!==1)continue;const l=[...c][0];e.set(a.connection_name,l);for(const u of A)XN(n,u,l)}for(let a=0;a\u003c2;a++){let A=!1;for(const c of t.obstacles){const l=hPe(n,c.connectedTo);if(l.size!==1)continue;const u=[...l][0];for(const g of c.connectedTo)A=XN(n,g,u)||A}if(!A)break}const o=new Map,i=a=\u003e{const A=o.get(a)??a;if(o.set(a,A),A===a)return a;const c=i(A);return o.set(a,c),c},r=(a,A)=\u003e{const c=i(a),l=i(A);c!==l\u0026\u0026o.set(l,c)};for(const a of n.values()){const[A,...c]=[...a];if(A)for(const l of c)r(A,l)}for(const a of[...t.obstacles.map(A=\u003eA.connectedTo),...(t.traces??[]).map(A=\u003eA.connectsTo??[])]){const[A,...c]=[...hPe(n,a)];if(A)for(const l of c)r(A,l)}for(const[a,A]of e)e.set(a,i(A));const s=new Map;for(const[a,A]of n){const c=A.values().next().value;c!==void 0\u0026\u0026s.set(a,i(c))}return{connectionNetKeys:e,tokenNetKeys:s}}function UDt(t){const e=GDt.get(t);if(e)return e;const n=J8o(t);return GDt.set(t,n),n}function Px(t,e,n){const o=UDt(t),i=o.connectionNetKeys.get(e),r=o.connectionNetKeys.get(n);return i!==void 0\u0026\u0026i===r}function n4(t,e,n){const o=UDt(t),i=o.connectionNetKeys.get(n);if(!i)return!1;for(const r of e.connectedTo)if(o.tokenNetKeys.get(r)===i)return!0;return!1}function Rb(t){if(!Number.isInteger(t)||t\u003c1)throw new Error(`FanoutSolver: layerCount must be a positive integer, received ${t}`);return t===1?[\"top\"]:t===2?[\"top\",\"bottom\"]:[\"top\",...Array.from({length:t-2},(e,n)=\u003e`inner${n+1}`),\"bottom\"]}function KDt(t,e,n){const o=n.indexOf(t),i=n.indexOf(e);if(o\u003c0||i\u003c0)throw new Error(`FanoutSolver: cannot build via span from \"${t}\" to \"${e}\"`);const r=Math.min(o,i),s=Math.max(o,i);return n.slice(r,s+1)}function Mx(t){const{fromLayer:e,toLayer:n,layerNames:o,allowBlindAndBuriedVias:i}=t,r=KDt(e,n,o);return i?r:[...o]}function VDt(t){const{fromLayer:e,toLayer:n,layers:o,layerNames:i,allowBlindAndBuriedVias:r}=t,s=Mx({fromLayer:e,toLayer:n,layerNames:i,allowBlindAndBuriedVias:r});if(!o)return s;if(o.length===0||!o.includes(e)||!o.includes(n)||o.some(a=\u003e!i.includes(a)))throw new Error(`FanoutSolver: route via from \"${e}\" to \"${n}\" has an invalid physical layer span`);return[...o]}function W8o(t){const{busIds:e,layers:n,layersByBusId:o,maxAssignments:i}=t;if(n.length===0)throw new Error(\"FanoutSolver: no escape layers are available\");if(!Number.isInteger(i)||i\u003c1)throw new Error(`FanoutSolver: maxLayerCombinations must be positive, received ${i}`);const r=e.map(p=\u003eo?.[p]??n),s=r.findIndex(p=\u003ep.length===0);if(s\u003e=0)throw new Error(`FanoutSolver: no escape layers are available for bus \"${e[s]}\"`);const a=r.reduce((p,m)=\u003ep*m.length,1),A=Math.min(i,Number.isFinite(a)?a:i),c=[],l=new Set;function u(p){const m={};for(let f=0;f\u003ce.length;f++)m[e[f]]=r[f][p[f]];const _=JSON.stringify(m);l.has(_)||(l.add(_),c.push(m))}if(a\u003c=i){for(let p=0;p\u003cA;p++){const m=[];let _=p;for(let f=0;f\u003ce.length;f++){const I=r[f].length,C=_%I;_=Math.floor(_/I),m.push((C+f)%I)}u(m)}return c}function g(p){let m=p|0;return m=Math.imul(m^m\u003e\u003e\u003e16,569420461),m=Math.imul(m^m\u003e\u003e\u003e15,1935289751),(m^m\u003e\u003e\u003e15)\u003e\u003e\u003e0}const h=e.map((p,m)=\u003em%r[m].length);u(h);const d=Math.max(...r.map(p=\u003ep.length));for(let p=1;p\u003cd\u0026\u0026c.length\u003cA;p++)u(h.map((m,_)=\u003e(m+p)%r[_].length));for(let p=0;p\u003ce.length\u0026\u0026c.length\u003cA;p++)for(let m=1;m\u003cr[p].length\u0026\u0026c.length\u003cA;m++){const _=[...h];_[p]=(h[p]+m)%r[p].length,u(_)}for(let p=1;c.length\u003cA\u0026\u0026p\u003cA*20;p++)u(e.map((m,_)=\u003eg(p*2654435761+_*2246822507)%r[_].length));return c}var q7=1e-6;function j8o(t){return\"layer\"in t?[t.layer]:t.layers}function Wj(t,e){return t.some(n=\u003ee.includes(n))}function $8o(t,e){const n=[];let o;for(const i of t.route){if(i.route_type===\"via\"){n.push({type:\"via\",center:{x:i.x,y:i.y},diameter:i.via_diameter??0,layers:KDt(i.from_layer,i.to_layer,e)}),o=void 0;continue}i.route_type===\"wire\"\u0026\u0026(o\u0026\u0026o.layer===i.layer\u0026\u0026tn(o,i)\u003eq7\u0026\u0026n.push({type:\"segment\",segment:{start:{x:o.x,y:o.y},end:{x:i.x,y:i.y},width:i.width,layer:i.layer}}),o=i)}return n}function Tb(t,e){return t.type===\"plane\"\u0026\u0026e.type===\"plane\"?t.layer===e.layer:t.type===\"plane\"\u0026\u0026e.type===\"via\"?e.layers.includes(t.layer):t.type===\"via\"\u0026\u0026e.type===\"plane\"?Tb(e,t):t.type===\"plane\"\u0026\u0026e.type===\"segment\"?t.layer===e.segment.layer:t.type===\"segment\"\u0026\u0026e.type===\"plane\"?Tb(e,t):t.type===\"endpoint\"\u0026\u0026e.type===\"endpoint\"?Wj(t.layers,e.layers)\u0026\u0026tn(t.point,e.point)\u003c=q7:t.type===\"endpoint\"\u0026\u0026e.type===\"obstacle\"?Wj(t.layers,e.obstacle.layers)\u0026\u0026IO(t.point,e.obstacle,q7):t.type===\"obstacle\"\u0026\u0026e.type===\"endpoint\"?Tb(e,t):t.type===\"endpoint\"\u0026\u0026e.type===\"segment\"?t.layers.includes(e.segment.layer)\u0026\u0026Cr(t.point,e.segment.start,e.segment.end)\u003c=e.segment.width/2+q7:t.type===\"segment\"\u0026\u0026e.type===\"endpoint\"?Tb(e,t):t.type===\"endpoint\"\u0026\u0026e.type===\"via\"?Wj(t.layers,e.layers)\u0026\u0026tn(t.point,e.center)\u003c=e.diameter/2+q7:t.type===\"via\"\u0026\u0026e.type===\"endpoint\"?Tb(e,t):t.type===\"obstacle\"\u0026\u0026e.type===\"segment\"?t.obstacle.layers.includes(e.segment.layer)\u0026\u0026Tl(e.segment,t.obstacle)\u003c=e.segment.width/2+q7:t.type===\"segment\"\u0026\u0026e.type===\"obstacle\"?Tb(e,t):t.type===\"obstacle\"\u0026\u0026e.type===\"via\"?Wj(t.obstacle.layers,e.layers)\u0026\u0026wx(e.center,t.obstacle)\u003c=e.diameter/2+q7:t.type===\"via\"\u0026\u0026e.type===\"obstacle\"?Tb(e,t):t.type===\"segment\"\u0026\u0026e.type===\"segment\"?t.segment.layer===e.segment.layer\u0026\u0026tu(t.segment.start,t.segment.end,e.segment.start,e.segment.end)\u003c=(t.segment.width+e.segment.width)/2+q7:t.type===\"segment\"\u0026\u0026e.type===\"via\"?e.layers.includes(t.segment.layer)\u0026\u0026Cr(e.center,t.segment.start,t.segment.end)\u003c=e.diameter/2+t.segment.width/2+q7:t.type===\"via\"\u0026\u0026e.type===\"segment\"?Tb(e,t):t.type===\"via\"\u0026\u0026e.type===\"via\"?Wj(t.layers,e.layers)\u0026\u0026tn(t.center,e.center)\u003c=(t.diameter+e.diameter)/2+q7:!1}var q8o=class{parent;constructor(e){this.parent=Array.from({length:e},(n,o)=\u003eo)}find(e){const n=this.parent[e];if(n===e)return e;const o=this.find(n);return this.parent[e]=o,o}union(e,n){const o=this.find(e),i=this.find(n);o!==i\u0026\u0026(this.parent[i]=o)}};function X8o(t,e,n){return!!(e.connection_name\u0026\u0026Px(t,e.connection_name,n.name))}function o4(t){const{inputSrj:e,routedSrj:n}=t,o=n.fanoutPlaneConnectivity,i=Rb(n.layerCount),r=new Map;for(const l of e.connections){const u=YDt(l),g=r.get(u)??[];g.push(l),r.set(u,g)}const s=[];let a=0,A=0;for(const l of r.values()){const u=l[0],g=l.flatMap(I=\u003eI.pointsToConnect.map((C,y)=\u003e({type:\"endpoint\",connectionName:I.name,endpointIndex:y,point:C,layers:j8o(C)}))),h=e.obstacles.filter(I=\u003en4(e,I,u.name)).map(I=\u003e({type:\"obstacle\",obstacle:I})),d=(n.traces??[]).filter(I=\u003eX8o(e,I,u)).flatMap(I=\u003e$8o(I,i)),p=[...new Set((o??[]).flatMap(I=\u003ePx(e,I.connectionName,u.name)?[I.layer]:[]))].map(I=\u003e({type:\"plane\",layer:I})),m=[...g,...h,...d,...p],_=new q8o(m.length);for(let I=0;I\u003cm.length;I++)for(let C=I+1;C\u003cm.length;C++)Tb(m[I],m[C])\u0026\u0026_.union(I,C);const f=new Map;for(let I=0;I\u003cg.length;I++){const C=g[I],y=f.get(C.connectionName)??[];y[C.endpointIndex]=I,f.set(C.connectionName,y)}for(const I of l){const C=f.get(I.name)??[],y=C[0],x=y===void 0?void 0:_.find(y),E=C.flatMap((B,S)=\u003ex===void 0||_.find(B)!==x?[S]:[]);A+=C.length-E.length,E.length===0?a++:s.push({code:\"original-endpoints-disconnected\",connectionName:I.name,disconnectedEndpointIndices:E,message:`Connection ${I.name} has no physical copper path from endpoint 0 to original endpoint${E.length===1?\"\":\"s\"} ${E.join(\", \")}`})}}const c=e.connections.reduce((l,u)=\u003el+u.pointsToConnect.length,0);return{valid:s.length===0,checkedConnectionCount:e.connections.length,connectedConnectionCount:a,checkedEndpointCount:c,connectedEndpointCount:A,issues:s}}var X7=1e-6;function jj(t){const{inputSrj:e,segment:n,bodyObstacle:o,connectionName:i}=t;if(o.connectedTo.length\u003e0||!o.componentId)return!1;const r=e.obstacles.filter(s=\u003es.componentId===o.componentId\u0026\u0026s.layers.includes(n.layer)\u0026\u0026n4(e,s,i));for(const s of r)for(const[a,A]of[[n.start,n.end],[n.end,n.start]]){if(!IO(a,s,X7))continue;const c={x:a.x-o.center.x,y:a.y-o.center.y},l={x:A.x-a.x,y:A.y-a.y};if(c.x*l.x+c.y*l.y\u003eX7)return!0}return!1}function pPe(t,e){return tn(t,e)\u003c=X7}function sE(t,e){t.push(e)}function Z8o(t){const{srj:e,trace:n,connectionName:o,layerNames:i,allowBlindAndBuriedVias:r,issues:s}=t,a=[],A=[];let c,l;for(const u of n.route){if(u.route_type===\"via\"){const g=VDt({fromLayer:u.from_layer,toLayer:u.to_layer,layers:\"layers\"in u\u0026\u0026Array.isArray(u.layers)?u.layers:void 0,layerNames:i,allowBlindAndBuriedVias:r});A.push({center:{x:u.x,y:u.y},diameter:u.via_diameter??e.minViaPadDiameter??e.minTraceWidth,spanLayers:g}),(!c||!pPe(c,u)||c.layer!==u.from_layer)\u0026\u0026sE(s,{code:\"disconnected-trace\",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} reaches a via without a matching ${u.from_layer} wire endpoint`}),l=u;continue}if(u.route_type!==\"wire\"){sE(s,{code:\"unsupported-route-point\",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} contains unsupported ${u.route_type} geometry`}),c=void 0,l=void 0;continue}if(l){(!pPe(u,l)||u.layer!==l.to_layer)\u0026\u0026sE(s,{code:\"disconnected-trace\",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} does not continue from its via on ${l.to_layer}`}),c=u,l=void 0;continue}c\u0026\u0026(c.layer!==u.layer?sE(s,{code:\"disconnected-trace\",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} changes from ${c.layer} to ${u.layer} without a via`}):pPe(c,u)||a.push({start:{x:c.x,y:c.y},end:{x:u.x,y:u.y},width:u.width,layer:u.layer})),c=u}return l\u0026\u0026sE(s,{code:\"disconnected-trace\",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} ends at a via without a wire on ${l.to_layer}`}),{trace:n,connectionName:o,segments:a,vias:A}}function qu(t){const{inputSrj:e,routedSrj:n,clearance:o,allowBlindAndBuriedVias:i=!0}=t,r=[],s=Rb(n.layerCount),a=[],A=[e,n].flatMap(c=\u003ec.connections.flatMap(l=\u003el.pointsToConnect.map(u=\u003e({connectionName:l.name,point:u}))));for(const c of n.traces??[]){const l=c.connection_name;if(!l||!e.connections.some(u=\u003eu.name===l)){sE(r,{code:\"unknown-trace-connection\",traceId:c.pcb_trace_id,...l?{connectionName:l}:{},message:`Trace ${c.pcb_trace_id} does not identify an input connection`});continue}a.push(Z8o({srj:n,trace:c,connectionName:l,layerNames:s,allowBlindAndBuriedVias:i,issues:r}))}for(const c of a){const l=new Set(e.obstacles.filter(g=\u003en4(e,g,c.connectionName))),u=e.obstacles.filter(g=\u003e!l.has(g));for(const g of c.segments)for(const h of u){if(!h.layers.includes(g.layer)||jj({inputSrj:e,segment:g,bodyObstacle:h,connectionName:c.connectionName}))continue;const d=Tl(g,h),p=g.width/2+o;d\u003cp-X7\u0026\u0026sE(r,{code:\"trace-obstacle-clearance\",traceId:c.trace.pcb_trace_id,connectionName:c.connectionName,layer:g.layer,obstacleId:h.obstacleId,message:`Trace ${c.trace.pcb_trace_id} on ${g.layer} is ${d.toFixed(4)}mm from different-net obstacle ${h.obstacleId}; ${p.toFixed(4)}mm is required`})}for(const g of c.vias){const h=A.find(({point:p})=\u003etn(g.center,p)\u003c=X7),d=e.allowViaInPad===!0\u0026\u0026e.obstacles.some(p=\u003ep.layers.some(m=\u003eg.spanLayers.includes(m))\u0026\u0026l.has(p)\u0026\u0026z0e({center:g.center,diameter:g.diameter,obstacle:p,tolerance:X7}));h\u0026\u0026!d\u0026\u0026sE(r,{code:\"via-at-endpoint\",traceId:c.trace.pcb_trace_id,connectionName:c.connectionName,otherConnectionName:h.connectionName,message:`Via in ${c.trace.pcb_trace_id} is placed directly at an original or routed connection endpoint`});for(const p of u){if(!p.layers.some(f=\u003eg.spanLayers.includes(f)))continue;const m=wx(g.center,p),_=g.diameter/2+o;m\u003c_-X7\u0026\u0026sE(r,{code:\"via-obstacle-clearance\",traceId:c.trace.pcb_trace_id,connectionName:c.connectionName,obstacleId:p.obstacleId,message:`Via in ${c.trace.pcb_trace_id} is ${m.toFixed(4)}mm from different-net obstacle ${p.obstacleId} on its layer span; ${_.toFixed(4)}mm is required`})}}}for(let c=0;c\u003ca.length;c++){const l=a[c];for(let u=c+1;u\u003ca.length;u++){const g=a[u];if(!Px(e,l.connectionName,g.connectionName)){for(const h of l.segments){for(const d of g.segments)Zm(h,d,o)||sE(r,{code:\"different-net-trace-clearance\",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,layer:h.layer,message:`Different-net traces ${l.trace.pcb_trace_id} and ${g.trace.pcb_trace_id} intersect or violate clearance on ${h.layer}`});for(const d of g.vias)!d.spanLayers.includes(h.layer)||Cr(d.center,h.start,h.end)\u003e=d.diameter/2+h.width/2+o-X7||sE(r,{code:\"different-net-trace-via-clearance\",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,layer:h.layer,message:`Trace ${l.trace.pcb_trace_id} violates via clearance to ${g.trace.pcb_trace_id} on ${h.layer}`})}for(const h of l.vias){for(const d of g.segments)!h.spanLayers.includes(d.layer)||Cr(h.center,d.start,d.end)\u003e=h.diameter/2+d.width/2+o-X7||sE(r,{code:\"different-net-trace-via-clearance\",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,layer:d.layer,message:`Via in ${l.trace.pcb_trace_id} violates trace clearance to ${g.trace.pcb_trace_id} on ${d.layer}`});for(const d of g.vias)!h.spanLayers.some(p=\u003ed.spanLayers.includes(p))||tn(h.center,d.center)\u003e=(h.diameter+d.diameter)/2+o-X7||sE(r,{code:\"different-net-via-clearance\",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,message:`Different-net vias in ${l.trace.pcb_trace_id} and ${g.trace.pcb_trace_id} violate clearance on an overlapping layer span`})}}}}return{valid:r.length===0,checkedTraceCount:n.traces?.length??0,checkedSegmentCount:a.reduce((c,l)=\u003ec+l.segments.length,0),checkedViaCount:a.reduce((c,l)=\u003ec+l.vias.length,0),issues:r}}var mPe=1e-9;function $j(t,e){if(\"layer\"in t)return t.layer;const n=t.layers[0];if(!n)throw new Error(\"Endpoint completion received a layerless point\");return n}function zDt(t){const e=[];for(const n of t)e.at(-1)\u0026\u0026tn(e.at(-1),n)\u003cmPe||e.push(n);return e}function JDt(t,e){const n=zDt(t);if(n.length\u003c3)return n;const o=[n[0]];for(let i=1;i\u003cn.length-1;i++){const r=n[i-1],s=n[i],a=n[i+1],A=tn(r,s),c=tn(s,a),l={x:(s.x-r.x)/A,y:(s.y-r.y)/A},u={x:(a.x-s.x)/c,y:(a.y-s.y)/c};if(Math.abs(l.x*u.x+l.y*u.y)\u003e1e-6){o.push(s);continue}const g=Math.min(e,A/2,c/2);o.push({x:s.x-l.x*g,y:s.y-l.y*g}),o.push({x:s.x+u.x*g,y:s.y+u.y*g})}return o.push(n.at(-1)),zDt(o)}function ebo(t){const{inputSrj:e,connectionName:n,target:o,targetLayer:i}=t;return e.obstacles.find(r=\u003er.layers.includes(i)\u0026\u0026n4(e,r,n)\u0026\u0026IO(o,r,1e-6))}function tbo(t){const{inputSrj:e,plan:n}=t,o=$j(n.targetPoint),i=ebo({inputSrj:e,connectionName:n.connectionName,target:n.targetPoint,targetLayer:o}),r=e.obstacles.find(c=\u003ec.componentId===i?.componentId\u0026\u0026c.connectedTo.length===0),s=r?{x:n.targetPoint.x-r.center.x,y:n.targetPoint.y-r.center.y}:{x:n.targetPoint.x-n.sourcePoint.x,y:n.targetPoint.y-n.sourcePoint.y},a=Math.hypot(s.x,s.y),A=a\u003emPe?{x:s.x/a,y:s.y/a}:{x:1,y:0};return{outward:A,perpendicular:{x:-A.y,y:A.x}}}function WDt(t){const{plan:e,branchStart:n,viaPoint:o,assignedLayerPath:i,terminalApproach:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,candidateIndex:c,chamfer:l}=t,u=$j(e.targetPoint),g=JDt(i,l),h=JDt([o,...r?[r]:[],e.targetPoint],l),d=g.map(p=\u003e({route_type:\"wire\",x:p.x,y:p.y,width:s,layer:n.layer}));n.layer!==u\u0026\u0026(d.push({route_type:\"via\",x:o.x,y:o.y,from_layer:n.layer,to_layer:u,via_diameter:a,via_hole_diameter:A}),d.push({route_type:\"wire\",x:o.x,y:o.y,width:s,layer:u}));for(const p of h.slice(1))d.push({route_type:\"wire\",x:p.x,y:p.y,width:s,layer:u});return{type:\"pcb_trace\",pcb_trace_id:V8o({connectionName:e.connectionName,sourcePointIndex:e.sourcePointIndex,candidateIndex:c}),connection_name:e.connectionName,route:d}}function ZN(t,e){return!t.issues.some(n=\u003en.connectionName===e)}function _Pe(t){const{trace:e,endpointSrjs:n}=t,o=n.flatMap(i=\u003ei.connections.flatMap(r=\u003er.pointsToConnect));return e.route.some(i=\u003ei.route_type===\"via\"\u0026\u0026o.some(r=\u003etn(i,r)\u003c=1e-6))}function nbo(t){const{inputSrj:e,fanoutSrj:n,plan:o,acceptedTraces:i,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,clearance:A,allowBlindAndBuriedVias:c}=t,{outward:l,perpendicular:u}=tbo({inputSrj:e,plan:o}),g=[...o.via?[{x:o.via.center.x,y:o.via.center.y,layer:o.targetLayer}]:[],{x:o.sourcePoint.x,y:o.sourcePoint.y,layer:o.sourceLayer}];let h=[],d=Number.POSITIVE_INFINITY,p=0;const m=e.connections.length\u003e32?600:Number.POSITIVE_INFINITY,_=o.termination.type===\"plane\"?$Dt({trace:o.trace,endpoint:o.exitPoint,layer:o.sourceLayer,distances:[.2,.3,.4]}):[],f=[...o.termination.type===\"plane\"\u0026\u0026o.via?[{...o.via.center}]:[],..._,...[.4,.8,1.2,1.6].flatMap(I=\u003e[0,.4,-.4,.8,-.8,1.2,-1.2,1.6,-1.6].map(C=\u003e({x:o.sourcePoint.x+l.x*I+u.x*C,y:o.sourcePoint.y+l.y*I+u.y*C})))];for(const I of f){const C=[...o.termination.type===\"plane\"?[{...I,layer:o.targetLayer}]:[],...g,..._.flatMap(y=\u003etn(y,I)\u003c=1e-6?[{...y,layer:o.sourceLayer}]:[])];for(const y of C){const x=tn(y,I)\u003c=1e-6?[[y]]:[[y,I],[y,{x:I.x,y:y.y},I],[y,{x:y.x,y:I.y},I],...[.4,-.4].map(E=\u003e[y,{x:y.x+E,y:y.y},{x:y.x+E,y:I.y},I])];for(const E of x){const B=[void 0,...[.4,.8].map(S=\u003e({x:o.targetPoint.x+l.x*S,y:o.targetPoint.y+l.y*S})),...[.4,-.4].map(S=\u003e({x:o.targetPoint.x+l.x*.4+u.x*S,y:o.targetPoint.y+l.y*.4+u.y*S}))];for(const S of B){if(p\u003e=m)return{blockingConnectionNames:h};const Q=WDt({plan:o,branchStart:y,viaPoint:I,assignedLayerPath:E,terminalApproach:S,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,candidateIndex:p++,chamfer:0});if(_Pe({trace:Q,endpointSrjs:[e,n]}))continue;const w={...n,traces:[...n.traces??[],...i,Q]},M=qu({inputSrj:e,routedSrj:w,clearance:A,allowBlindAndBuriedVias:c});if(!M.valid){M.issues.length\u003cd\u0026\u0026(d=M.issues.length,h=[...new Set(M.issues.flatMap(R=\u003e[R.connectionName,R.otherConnectionName].flatMap(F=\u003eF\u0026\u0026F!==o.connectionName?[F]:[])))]);continue}const k=o4({inputSrj:e,routedSrj:w});if(ZN(k,o.connectionName))return{trace:Q,blockingConnectionNames:[]}}}}}return{blockingConnectionNames:h}}function obo(t){const{inputSrj:e,fanoutSrj:n,plans:o,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A}=t,c=[],l=[],u=new Set;for(const h of o){const d=nbo({inputSrj:e,fanoutSrj:n,plan:h,acceptedTraces:c,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});if(d.trace)c.push(d.trace);else{l.push(h.connectionName);for(const p of d.blockingConnectionNames)u.add(p)}}const g={...n,traces:[...n.traces??[],...c]};return{traces:c,failedConnectionNames:l,blockingConnectionNames:[...u],connectivity:o4({inputSrj:e,routedSrj:g}),drc:qu({inputSrj:e,routedSrj:g,clearance:a,allowBlindAndBuriedVias:A})}}function jDt(t){let e=0,n;for(const o of t.route){if(o.route_type!==\"wire\"){n=void 0;continue}n?.layer===o.layer\u0026\u0026(e+=tn(n,o)),n=o}return e}function ibo(t){const{fanoutSrj:e,completionTraces:n}=t,o=new Map(n.flatMap(r=\u003e{const s=r.route.find(a=\u003ea.route_type===\"wire\");return s?[[r.connection_name,{x:s.x,y:s.y,layer:s.layer}]]:[]})),i=(e.traces??[]).map(r=\u003e{if(!r.pcb_trace_id.startsWith(\"fanout:\"))return r;const s=o.get(r.connection_name);if(!s)return r;let a;for(let A=0;A\u003cr.route.length;A++){const c=r.route[A];if(c?.route_type!==\"wire\"){a=void 0;continue}if(a!==void 0){const l=r.route[a];if(l?.route_type===\"wire\"\u0026\u0026l.layer===s.layer\u0026\u0026c.layer===s.layer\u0026\u0026Cr(s,l,c)\u003c=1e-6){const u=r.route.slice(0,a+1);return tn(l,s)\u003e1e-6\u0026\u0026u.push({route_type:\"wire\",x:s.x,y:s.y,width:c.width,layer:s.layer}),{...r,route:u}}}a=A}return r});return{...e,traces:i}}function rbo(t){const{inputSrj:e,fanoutSrj:n,localTraces:o,candidates:i,clearance:r,allowBlindAndBuriedVias:s}=t,a=[...n.traces??[],...o],A={...n,traces:a},c=o4({inputSrj:e,routedSrj:A}),u=i.filter(d=\u003ed.route.length\u003e1\u0026\u0026d.route.every(p=\u003ep.route_type===\"wire\"||p.route_type===\"via\")\u0026\u0026!_Pe({trace:d,endpointSrjs:[e,n]})).filter(d=\u003e{const p=o4({inputSrj:e,routedSrj:{...n,traces:[...a,d]}});return p.connectedConnectionCount\u003ec.connectedConnectionCount\u0026\u0026ZN(p,d.connection_name)}),g={...n,traces:[...a,...u]};if(qu({inputSrj:e,routedSrj:g,clearance:r,allowBlindAndBuriedVias:s}).valid)return u;const h=[];for(const d of u.toSorted((p,m)=\u003ejDt(p)-jDt(m))){const p={...n,traces:[...a,...h,d]};if(!qu({inputSrj:e,routedSrj:p,clearance:r,allowBlindAndBuriedVias:s}).valid)continue;const _=o4({inputSrj:e,routedSrj:{...n,traces:[...a,...h]}}),f=o4({inputSrj:e,routedSrj:p});f.connectedConnectionCount\u003e_.connectedConnectionCount\u0026\u0026ZN(f,d.connection_name)\u0026\u0026h.push(d)}return h}function $Dt(t){const{trace:e,endpoint:n,layer:o,distances:i}=t,r=e.route.findLastIndex(s=\u003es.route_type===\"wire\"\u0026\u0026s.layer===o\u0026\u0026tn(s,n)\u003c=1e-6);return r\u003c0?[]:i.flatMap(s=\u003e{let a=s,A=n;for(let c=r-1;c\u003e=0;c--){const l=e.route[c];if(l?.route_type!==\"wire\"||l.layer!==o)break;const u=tn(A,l);if(!(u\u003c=mPe)){if(a\u003cu-1e-6)return[{x:A.x+(l.x-A.x)*a/u,y:A.y+(l.y-A.y)*a/u}];a-=u,A=l}}return[]})}function qDt(t){const{inputSrj:e,fanoutSrj:n,plan:o,acceptedTraces:i,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,clearance:A,allowBlindAndBuriedVias:c}=t,l={x:o.exitPoint.x,y:o.exitPoint.y,layer:o.targetLayer},u=o.targetPoint,g=$j(u);let h=0;const d=m=\u003e{const _=WDt({plan:o,branchStart:m.start,viaPoint:m.viaPoint,assignedLayerPath:[m.start,m.viaPoint],terminalApproach:m.terminalApproach,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,candidateIndex:1e4+h++,chamfer:Math.max(r,.1)});if(_Pe({trace:_,endpointSrjs:[e,n]}))return;const f={...n,traces:[...n.traces??[],...i,_]};if(qu({inputSrj:e,routedSrj:f,clearance:A,allowBlindAndBuriedVias:c}).valid\u0026\u0026ZN(o4({inputSrj:e,routedSrj:f}),o.connectionName))return _};if(l.layer!==g){const m=$Dt({trace:o.trace,endpoint:o.exitPoint,layer:o.targetLayer,distances:[.4,.8,1.2,1.6]});for(const _ of m){const f={..._,layer:o.targetLayer};for(const I of[void 0,{x:u.x,y:_.y},{x:_.x,y:u.y}]){const C=d({start:f,viaPoint:_,terminalApproach:I});if(C)return C}}}const p=[[u],[{x:u.x,y:l.y},u],[{x:l.x,y:u.y},u]];for(const m of p){const _=m[0],f=tn(l,_),I=l.layer===g?[0]:[.4,.8,1.2,1.6];for(const C of I){if(l.layer!==g\u0026\u0026(f\u003c=C+.2||C\u003c=1e-6))continue;const y=l.layer===g?{x:l.x,y:l.y}:{x:l.x+(_.x-l.x)*C/f,y:l.y+(_.y-l.y)*C/f},x=d({start:l,viaPoint:y,terminalApproach:m.length\u003e1?_:void 0});if(x)return x}}}function sbo(t){const{inputSrj:e,fanoutSrj:n,plans:o,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A=!0,effort:c=1,routeDownstreamConnections:l}=t,u=[],g=qu({inputSrj:e,routedSrj:n,clearance:a,allowBlindAndBuriedVias:A}),h=o4({inputSrj:e,routedSrj:n}),d=o.filter(k=\u003e{const R=$j(k.sourcePoint),F=$j(k.targetPoint);return R!==F\u0026\u0026tn(k.sourcePoint,k.targetPoint)\u003c=.25\u0026\u0026!ZN(h,k.connectionName)});let p={traces:[],failedConnectionNames:d.map(k=\u003ek.connectionName),blockingConnectionNames:[],connectivity:h,drc:g},m=0;if(!g.valid)u.push(\"Fanout prefix failed emitted-copper DRC; skipped completion\");else{let k=[];const R=new Map(d.map((O,U)=\u003e[O.connectionName,U])),F=e.connections.length\u003e32?1:3;for(let O=0;O\u003cF;O++){const U=new Map(k.map((te,j)=\u003e[te,j])),Y=d.toSorted((te,j)=\u003e(U.get(te.connectionName)??Number.MAX_SAFE_INTEGER)-(U.get(j.connectionName)??Number.MAX_SAFE_INTEGER)||(R.get(te.connectionName)??0)-(R.get(j.connectionName)??0)),W=obo({inputSrj:e,fanoutSrj:n,plans:Y,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});if(m++,W.drc.valid\u0026\u0026(W.connectivity.connectedConnectionCount\u003ep.connectivity.connectedConnectionCount||W.connectivity.connectedConnectionCount===p.connectivity.connectedConnectionCount\u0026\u0026W.traces.length\u003cp.traces.length)\u0026\u0026(p=W),k=[...new Set([...W.failedConnectionNames,...W.blockingConnectionNames,...k])],W.failedConnectionNames.length===0)break}}const _=new Set(d.map(k=\u003ek.connectionName)),f=o.filter(k=\u003e!_.has(k.connectionName)\u0026\u0026!ZN(h,k.connectionName)),I=[];if(g.valid)for(const k of f){const R=qDt({inputSrj:e,fanoutSrj:n,plan:k,acceptedTraces:[...p.traces,...I],traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});R\u0026\u0026I.push(R)}const C={...n,traces:[...n.traces??[],...p.traces,...I]},y=new Set(o4({inputSrj:e,routedSrj:C}).issues.map(k=\u003ek.connectionName)),x=n.connections.filter(k=\u003e!_.has(k.name)\u0026\u0026y.has(k.name));let E=[];if(g.valid\u0026\u0026x.length\u003e0\u0026\u0026x.length\u003c=12\u0026\u0026l){const k=new Set(x.map(F=\u003eF.name)),R={...n,connections:x,buses:n.buses?.map(F=\u003e({...F,connectionNames:F.connectionNames.filter(O=\u003ek.has(O))})).filter(F=\u003eF.connectionNames.length\u003e0),obstacles:n.obstacles,traces:C.traces};try{const F=l(R,{effort:c});E=rbo({inputSrj:e,fanoutSrj:n,localTraces:[...p.traces,...I],candidates:F.filter(O=\u003ek.has(O.connection_name)),clearance:a,allowBlindAndBuriedVias:A})}catch(F){u.push(`Downstream router failed: ${F instanceof Error?F.message:String(F)}`)}}else!g.valid\u0026\u0026x.length\u003e0?u.push(\"Skipped downstream router because the endpoint-completion baseline failed emitted-copper DRC\"):x.length\u003e12?u.push(`Skipped downstream router for ${x.length} unresolved connections (bounded at 12)`):x.length\u003e0\u0026\u0026!l\u0026\u0026u.push(`Skipped downstream router for ${x.length} unresolved connections because no routeDownstreamConnections callback was provided`);const B=[...p.traces,...I,...E];for(const k of f){const R={...n,traces:[...n.traces??[],...B]};if(ZN(o4({inputSrj:e,routedSrj:R}),k.connectionName))continue;const F=qDt({inputSrj:e,fanoutSrj:n,plan:k,acceptedTraces:B,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});F\u0026\u0026B.push(F)}const S={...n,traces:[...n.traces??[],...B]},Q=ibo({fanoutSrj:S,completionTraces:B}),w=o4({inputSrj:e,routedSrj:Q}),M=qu({inputSrj:e,routedSrj:Q,clearance:a,allowBlindAndBuriedVias:A});return M.valid?{simpleRouteJson:Q,traces:B,report:{attemptedLocalConnectionCount:d.length,attemptedDownstreamConnectionCount:f.length,completionTraceCount:B.length,searchPassCount:m,errors:u,connectivity:w,drc:M}}:(u.push(\"Final endpoint-completion output failed emitted-copper DRC\"),{simpleRouteJson:n,traces:[],report:{attemptedLocalConnectionCount:d.length,attemptedDownstreamConnectionCount:f.length,completionTraceCount:0,searchPassCount:m,errors:u,connectivity:o4({inputSrj:e,routedSrj:n}),drc:g}})}var abo={topside_left:{direction:\"left\",preferredExit:\"top-left\",exitEdge:\"top\"},topside_center:{direction:\"up\",preferredExit:\"top\",exitEdge:\"top\"},topside_right:{direction:\"right\",preferredExit:\"top-right\",exitEdge:\"top\"},rightside_top:{direction:\"up\",preferredExit:\"top-right\",exitEdge:\"right\"},rightside_center:{direction:\"right\",preferredExit:\"right\",exitEdge:\"right\"},rightside_bottom:{direction:\"down\",preferredExit:\"bottom-right\",exitEdge:\"right\"},bottomside_right:{direction:\"right\",preferredExit:\"bottom-right\",exitEdge:\"bottom\"},bottomside_center:{direction:\"down\",preferredExit:\"bottom\",exitEdge:\"bottom\"},bottomside_left:{direction:\"left\",preferredExit:\"bottom-left\",exitEdge:\"bottom\"},leftside_bottom:{direction:\"down\",preferredExit:\"bottom-left\",exitEdge:\"left\"},leftside_center:{direction:\"left\",preferredExit:\"left\",exitEdge:\"left\"},leftside_top:{direction:\"up\",preferredExit:\"top-left\",exitEdge:\"left\"},center:{}};function XDt(t){const e=abo[t];if(!e)throw new Error(`Invalid fanout exit position \"${t}\"`);return e}function fPe(t){const e=t.differentialPairs;if(e===void 0)return[];if(!Array.isArray(e))throw new Error(\"Differential pairs must be an array\");const n=new Map;return t.connections.forEach((o,i)=\u003e{const r=n.get(o.name)??[];r.push(i),n.set(o.name,r)}),e.map((o,i)=\u003e{const r=o,s=r?.connectionNames,a=r?.lengthTolerance;if(!Array.isArray(s)||s.length!==2||s.some(c=\u003etypeof c!=\"string\"||c.length===0)||s[0]===s[1]||typeof a!=\"number\"||!Number.isFinite(a)||a\u003c0)throw new Error(`Differential pair ${i} requires two distinct connection names and a finite nonnegative tolerance`);const A=s.map(c=\u003e{const l=n.get(c);if(l?.length!==1)throw new Error(`Differential pair ${i} cannot resolve original connection ${c}`);return l[0]});return{connectionNames:s,connectionIndices:A,lengthTolerance:a}})}function J0e(t,e,n=!0){const o=Rb(t.layerCount),i=[],r=[];let s;for(const a of e.route){if(a.route_type===\"via\"){r.push({center:{x:a.x,y:a.y},diameter:a.via_diameter??t.minViaPadDiameter??t.min_via_pad_diameter??t.minViaDiameter??t.minTraceWidth,spanLayers:VDt({fromLayer:a.from_layer,toLayer:a.to_layer,layers:\"layers\"in a\u0026\u0026Array.isArray(a.layers)?a.layers:void 0,layerNames:o,allowBlindAndBuriedVias:n})}),s=void 0;continue}if(a.route_type!==\"wire\"){s=void 0;continue}s?.layer===a.layer\u0026\u0026(s.x!==a.x||s.y!==a.y)\u0026\u0026i.push({start:{x:s.x,y:s.y},end:{x:a.x,y:a.y},width:Math.max(s.width,a.width),layer:a.layer}),s=a}return{trace:e,connectionName:e.connection_name,segments:i,vias:r}}function Z7(t,e=!0){return(t.traces??[]).map(n=\u003eJ0e(t,n,e))}function*Abo(t){const{plan:e,bus:n,inputSrj:o,layerNames:i,clearance:r,consumeWork:s}=t;if(!e.via||(e.additionalVias?.length??0)\u003e4)return;const a=(n.routableEscapeLayers??n.allowedLayers??i).filter(f=\u003ef!==e.targetLayer\u0026\u0026i.includes(f)\u0026\u0026(n.allowedLayers??i).includes(f));if(!a.length)return;const A=t.plans.filter(f=\u003ef.connectionIndex!==e.connectionIndex),c=Z7(o,!1),l=[...A.flatMap(f=\u003e[...f.segments,...f.planeEndpointSegments??[]]),...c.flatMap(f=\u003ef.segments)],u=[...t.plans.flatMap(f=\u003e[f.via,...f.additionalVias??[],f.planeEndpointVia].filter(I=\u003e!!I)),...c.flatMap(f=\u003ef.vias)],g=e.via.diameter,h=n.sharedBoundary,d=n.componentBounds,p=g/2+r,m=[];for(const[f,I]of e.segments.entries()){if(I.layer!==e.targetLayer||f\u003c(e.sourceEscapeSegmentCount??1))continue;const C=tn(I.start,I.end),y=Math.max(1,Math.ceil(C/(I.width/2)));for(let x=0;x\u003c=y;x++){s();const E=x/y,B={x:I.start.x+(I.end.x-I.start.x)*E,y:I.start.y+(I.end.y-I.start.y)*E};if(!(B.x\u003e=d.minX-p\u0026\u0026B.x\u003c=d.maxX+p\u0026\u0026B.y\u003e=d.minY-p\u0026\u0026B.y\u003c=d.maxY+p)\u0026\u0026!(Math.min(B.x-h.minX,h.maxX-B.x,B.y-h.minY,h.maxY-B.y)\u003cg/2+1e-7)\u0026\u0026!m.some(S=\u003etn(S.point,B)\u003c1e-7)\u0026\u0026!o.obstacles.some(S=\u003ewx(B,S)\u003cp-1e-9)\u0026\u0026!u.some(S=\u003etn(B,S.center)\u003c(g+S.diameter)/2+r-1e-9)\u0026\u0026!l.some(S=\u003eCr(B,S.start,S.end)\u003c(g+S.width)/2+r-1e-9)\u0026\u0026(m.push({index:f,point:B}),m.length===64))break}if(m.length===64)break}const _=m.flatMap((f,I)=\u003em.slice(I+1).flatMap(C=\u003e{if(f.index\u003e=C.index||tn(f.point,C.point)\u003cg+r)return[];const y=e.segments.slice(f.index,C.index+1);return y.some(x=\u003ex.layer!==e.targetLayer)?[]:[{a:f,b:C,length:y.reduce((x,E)=\u003ex+tn(E.start,E.end),0)}]})).sort((f,I)=\u003eI.length-f.length);for(const{a:f,b:I}of _){const C=e.segments[f.index],y=e.segments[I.index],x=[...e.segments.slice(0,f.index),{...C,end:f.point}].filter(R=\u003etn(R.start,R.end)\u003e1e-7),E=[{...y,start:I.point},...e.segments.slice(I.index+1)].filter(R=\u003etn(R.start,R.end)\u003e1e-7),B=[{...C,start:f.point},...e.segments.slice(f.index+1,I.index),{...y,end:I.point}].filter(R=\u003etn(R.start,R.end)\u003e1e-7),S=I.point.x-f.point.x,Q=I.point.y-f.point.y,w=Math.min(Math.abs(S),Math.abs(Q)),M=[{x:f.point.x+Math.sign(S)*w,y:f.point.y+Math.sign(Q)*w},{x:I.point.x-Math.sign(S)*w,y:I.point.y-Math.sign(Q)*w}],k=[B,...M.map(R=\u003e[{...C,start:f.point,end:R},{...C,start:R,end:I.point}].filter(F=\u003etn(F.start,F.end)\u003e1e-7))];for(const R of a){const F=l.filter(W=\u003eW.layer===R),O=u.filter(W=\u003eW.spanLayers.includes(R)),U=o.obstacles.filter(W=\u003eW.layers.includes(R)),Y=[{...e.via,center:f.point,fromLayer:e.targetLayer,toLayer:R,spanLayers:i},{...e.via,center:I.point,fromLayer:R,toLayer:e.targetLayer,spanLayers:i}];for(const W of k){s();const te=W.map(j=\u003e({...j,layer:R}));te.some(j=\u003eF.some(J=\u003e!Zm(j,J,r))||O.some(J=\u003eCr(J.center,j.start,j.end)\u003c(J.diameter+j.width)/2+r-1e-9)||U.some(J=\u003eTl(j,J)\u003cj.width/2+r-1e-9))||(yield{before:x,window:te,after:E,tuningLayer:R,addedVias:Y})}}}}function eR(t){const{points:e,chamfer:n,segmentIsClear:o}=t;if(e.length\u003c2)return null;const i=1e-7;let r=[[e[0]]];for(let s=1;s\u003ce.length;s++){const a=e[s-1],A=e[s],c=A.x-a.x,l=A.y-a.y;if(a.z!==A.z||Math.abs(c)\u003ci||Math.abs(l)\u003ci||Math.abs(Math.abs(c)-Math.abs(l))\u003ci){for(const h of r)h.push(A);continue}const u=Math.min(Math.abs(c),Math.abs(l)),g=[{x:a.x+Math.sign(c)*u,y:a.y+Math.sign(l)*u,z:a.z},{x:A.x-Math.sign(c)*u,y:A.y-Math.sign(l)*u,z:a.z},{x:A.x,y:a.y,z:a.z},{x:a.x,y:A.y,z:a.z}].filter(h=\u003eo(a,h)\u0026\u0026o(h,A));if(r=r.flatMap(h=\u003eg.map(d=\u003e[...h,d,A])).slice(0,16),r.length===0)return null}for(const s of r){const a=[s[0]];let A=!0;for(let c=1;c\u003cs.length-1;c++){const l=s[c-1],u=s[c],g=s[c+1],h=tn(l,u),d=tn(u,g);if(l.z!==u.z||u.z!==g.z||h\u003ci||d\u003ci){a.push(u);continue}const p=(u.x-l.x)/h,m=(u.y-l.y)/h,_=(g.x-u.x)/d,f=(g.y-u.y)/d,I=p*_+m*f,C=t.repairReversingDiagonalCorners===!0\u0026\u0026Math.abs(I+Math.SQRT1_2)\u003ci;if(Math.abs(I)\u003ei\u0026\u0026!C){a.push(u);continue}let y=Math.min(n,h/3,d/3),x=!1;for(;y\u003e=1e-6;){const E={x:u.x-p*y,y:u.y-m*y,z:u.z},B={x:u.x+_*y,y:u.y+f*y,z:u.z},S=Math.sign(p*f-m*_),Q=C?{x:E.x+(p-S*m)*Math.SQRT1_2*y*(Math.SQRT2-1),y:E.y+(m+S*p)*Math.SQRT1_2*y*(Math.SQRT2-1),z:u.z}:void 0;if(Q?o(E,Q)\u0026\u0026o(Q,B):o(E,B)){a.push(E,...Q?[Q]:[],B),x=!0;break}y/=2}if(!x){A=!1;break}}if(A){a.push(s.at(-1));for(let c=1;c\u003ca.length;c++){const l=a[c-1],u=a[c];if(l.z!==u.z){tn(l,u)\u003ei\u0026\u0026(A=!1);continue}if(!o(l,u)){A=!1;break}const g=Math.abs(l.x-u.x),h=Math.abs(l.y-u.y);if(g\u003ei\u0026\u0026h\u003ei\u0026\u0026Math.abs(g-h)\u003ei){A=!1;break}const d=a[c+1];if(d?.z===u.z\u0026\u0026tn(l,u)\u003ei\u0026\u0026tn(u,d)\u003ei\u0026\u0026((u.x-l.x)*(d.x-u.x)+(u.y-l.y)*(d.y-u.y))/(tn(l,u)*tn(u,d))\u003cMath.SQRT1_2-i){A=!1;break}}if(A)return a}}return null}var qj=class{layers=new Map;constructor(t){const e=new Map;for(const n of t){const o=n.width/2,i={segment:n,minX:Math.min(n.start.x,n.end.x)-o,maxX:Math.max(n.start.x,n.end.x)+o,minY:Math.min(n.start.y,n.end.y)-o,maxY:Math.max(n.start.y,n.end.y)+o},r=e.get(n.layer)??[];r.push(i),e.set(n.layer,r)}for(const[n,o]of e)this.layers.set(n,this.build(o))}querySegment(t,e){const n=t.width/2+e+1e-8;return this.query([t.layer],{minX:Math.min(t.start.x,t.end.x)-n,maxX:Math.max(t.start.x,t.end.x)+n,minY:Math.min(t.start.y,t.end.y)-n,maxY:Math.max(t.start.y,t.end.y)+n})}queryVia(t,e){const n=t.diameter/2+e+1e-8;return this.query(t.spanLayers,{minX:t.center.x-n,maxX:t.center.x+n,minY:t.center.y-n,maxY:t.center.y+n})}query(t,e){const n=[],o=r=\u003e!(r.minX\u003ee.maxX||r.maxX\u003ce.minX||r.minY\u003ee.maxY||r.maxY\u003ce.minY),i=r=\u003e{if(o(r))if(r.entries)for(const s of r.entries)o(s)\u0026\u0026n.push(s.segment);else i(r.left),i(r.right)};for(const r of t){const s=this.layers.get(r);s\u0026\u0026i(s)}return n}build(t){const e=t.reduce((i,r)=\u003e({minX:Math.min(i.minX,r.minX),maxX:Math.max(i.maxX,r.maxX),minY:Math.min(i.minY,r.minY),maxY:Math.max(i.maxY,r.maxY)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0});if(t.length\u003c=8)return{...e,entries:t};const n=e.maxX-e.minX\u003e=e.maxY-e.minY;t.sort((i,r)=\u003en?i.minX+i.maxX-r.minX-r.maxX:i.minY+i.maxY-r.minY-r.maxY);const o=Math.floor(t.length/2);return{...e,left:this.build(t.slice(0,o)),right:this.build(t.slice(o))}}};function Xj(t){switch(t){case\"left\":return\"left\";case\"right\":return\"right\";case\"up\":return\"top\";case\"down\":return\"bottom\"}}function e6(t){switch(t){case\"left\":return\"left\";case\"right\":return\"right\";case\"top\":return\"up\";case\"bottom\":return\"down\"}}function ZDt(t,e){return t===e||t.includes(e)}function Ds(t,e){if(!(!t||!e?.includes(\"-\"))\u0026\u0026ZDt(e,t))return t===\"left\"||t===\"right\"?e.startsWith(\"top-\")?\"maximum\":\"minimum\":e.endsWith(\"-right\")?\"maximum\":\"minimum\"}function cbo(t,e){const n=e===\"up\"||e===\"down\"?\"y\":\"x\",o=t.slice(0,32).map(({connectionIndex:i})=\u003e[i]);for(let i=0;i\u003ct.length;i++)for(let r=i+1;r\u003ct.length;r++){if(o.length\u003e=32)return o;const s=t[i],a=t[r];Math.abs(s.sourcePoint[n]-a.sourcePoint[n])\u003c=1e-9\u0026\u0026o.push([s.connectionIndex,a.connectionIndex])}return o}var kg=1e-9,lbo=1e5;function eNt(t){for(const[n,o]of[[\"viaDiameter\",t.viaDiameter],[\"traceWidth\",t.traceWidth]])if(!Number.isFinite(o)||o\u003c=0)throw new Error(`FanoutSolver: dogbone ${n} must be a positive finite number, received ${o}`);if(!Number.isFinite(t.clearance)||t.clearance\u003c0)throw new Error(`FanoutSolver: dogbone clearance must be a non-negative finite number, received ${t.clearance}`);if(t.viaHoleDiameter!==void 0\u0026\u0026(!Number.isFinite(t.viaHoleDiameter)||t.viaHoleDiameter\u003c=0))throw new Error(`FanoutSolver: dogbone viaHoleDiameter must be a positive finite number, received ${t.viaHoleDiameter}`);if(t.holeToHoleClearance!==void 0\u0026\u0026(!Number.isFinite(t.holeToHoleClearance)||t.holeToHoleClearance\u003c0))throw new Error(`FanoutSolver: dogbone holeToHoleClearance must be a non-negative finite number, received ${t.holeToHoleClearance}`);if(t.holeToHoleClearance!==void 0\u0026\u0026t.viaHoleDiameter===void 0)throw new Error(\"FanoutSolver: dogbone holeToHoleClearance requires viaHoleDiameter\");const e=t.maximumSearchStates??lbo;if(!Number.isInteger(e)||e\u003c1)throw new Error(`FanoutSolver: dogbone maximumSearchStates must be a positive integer, received ${e}`);return e}function IPe(t){const e=[];for(const n of t.toSorted((o,i)=\u003eo-i))Number.isFinite(n)\u0026\u0026(e.length===0||Math.abs(e.at(-1)-n)\u003ekg)\u0026\u0026e.push(n);return e}function tNt(t){const e=new Map,n=new Map,o=new Map;for(const i of t){let r=e.get(i.componentId);r||(r={componentId:i.componentId,connections:[],obstacles:[],xCoordinates:[],yCoordinates:[],pitchX:Number.POSITIVE_INFINITY,pitchY:Number.POSITIVE_INFINITY},e.set(i.componentId,r),o.set(i.componentId,new Set)),r.xCoordinates.push(...i.xCoordinates),r.yCoordinates.push(...i.yCoordinates),Number.isFinite(i.pitchX)\u0026\u0026i.pitchX\u003ekg\u0026\u0026(r.pitchX=Math.min(r.pitchX,i.pitchX)),Number.isFinite(i.pitchY)\u0026\u0026i.pitchY\u003ekg\u0026\u0026(r.pitchY=Math.min(r.pitchY,i.pitchY));const s=o.get(i.componentId);for(const a of i.componentObstacles)s.has(a)||(s.add(a),r.obstacles.push(a));for(const a of i.connections){const A=n.get(a.connectionIndex);if(A!==void 0){if(A!==i.componentId)throw new Error(`FanoutSolver: connection index ${a.connectionIndex} belongs to multiple components`);continue}n.set(a.connectionIndex,i.componentId),r.connections.push({preparedConnection:a,busId:i.busId,direction:i.direction,terminationType:i.termination.type})}}return[...e.values()].map(i=\u003e({...i,connections:i.connections.toSorted((r,s)=\u003er.preparedConnection.connectionIndex-s.preparedConnection.connectionIndex),xCoordinates:IPe(i.xCoordinates),yCoordinates:IPe(i.yCoordinates)})).toSorted((i,r)=\u003ei.componentId.localeCompare(r.componentId))}function ubo(t){const{coordinates:e,pitch:n}=t;if(e.length===0||!Number.isFinite(n)||n\u003c=kg)return[];const o=[e[0]-n/2];for(let i=1;i\u003ce.length;i++)o.push((e[i-1]+e[i])/2);return o.push(e.at(-1)+n/2),IPe(o)}function nNt(t){const{sourceCoordinate:e,coordinates:n,pitch:o}=t,i=ubo({coordinates:n,pitch:o}),r=i.filter(a=\u003ea\u003ce-kg).at(-1),s=i.find(a=\u003ea\u003ee+kg);return[r,s].filter(a=\u003ea!==void 0)}function gbo(t,e){const n=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return n\u003c=kg||o\u003c=kg||Math.abs(n-o)\u003c=kg}function dbo(t){const{source:e,site:n,direction:o}=t,i=o===\"right\"?n.x-e.x:o===\"left\"?e.x-n.x:o===\"up\"?n.y-e.y:e.y-n.y;return i\u003ekg?0:Math.abs(i)\u003c=kg?1:2}function hbo(t){const{point:e,obstacles:n,viaDiameter:o,clearance:i}=t,r=o/2+i;return n.every(s=\u003ewx(e,s)\u003e=r-kg)}function pbo(t){const{segment:e,sourceObstacle:n,obstacles:o,clearance:i}=t,r=e.width/2+i;return o.every(s=\u003es===n||Tl(e,s)\u003e=r-kg)}function oNt(t){const{connection:e,component:n,rules:o}=t,{preparedConnection:i,direction:r}=e,s=o.additionalObstacles?[...new Set([...n.obstacles,...o.additionalObstacles])]:n.obstacles,a={x:i.sourcePoint.x,y:i.sourcePoint.y},A=nNt({sourceCoordinate:a.x,coordinates:n.xCoordinates,pitch:n.pitchX}),c=nNt({sourceCoordinate:a.y,coordinates:n.yCoordinates,pitch:n.pitchY}),l=[...A.map(E=\u003e({x:E,y:a.y})),...c.map(E=\u003e({x:a.x,y:E})),...A.flatMap(E=\u003ec.map(B=\u003e({x:E,y:B})))],u=[];for(const E of l)u.some(B=\u003etn(B,E)\u003c=kg)||u.push(E);const g=o.fixedViaPointsByConnectionIndex?.get(i.connectionIndex),h=g?[g]:u,d=[];for(const E of h){if(e.terminationType===\"plane\"\u0026\u0026!gbo(a,E)||!hbo({point:E,obstacles:s,viaDiameter:o.viaDiameter,clearance:o.clearance}))continue;const B={start:a,end:E,width:o.traceWidth,layer:i.sourceLayer};!pbo({segment:B,sourceObstacle:i.sourceObstacle,obstacles:s,clearance:o.clearance})||!(o.blockingSegments??[]).every(w=\u003e{if(w.connectionIndex===i.connectionIndex||o.canShareCopper?.(i.connectionIndex,w.connectionIndex))return!0;const M=o.viaDiameter/2+w.segment.width/2+o.clearance;return Cr(E,w.segment.start,w.segment.end)\u003cM-kg?!1:w.segment.layer!==B.layer||Zm(B,w.segment,o.clearance)})||!(o.blockingVias??[]).every(w=\u003ew.connectionIndex===i.connectionIndex?!0:!(tn(E,w.center)\u003c(o.viaDiameter+w.diameter)/2+o.clearance-kg||w.spanLayers.includes(B.layer)\u0026\u0026Cr(w.center,B.start,B.end)\u003cw.diameter/2+B.width/2+o.clearance-kg))||d.push({connectionIndex:i.connectionIndex,point:E,sourceSegment:B,outwardRank:dbo({source:a,site:E,direction:r})})}const p=r===\"left\"||r===\"right\"?n.yCoordinates:n.xCoordinates,m=r===\"left\"||r===\"right\"?a.y:a.x,_=p.findIndex(E=\u003eMath.abs(E-m)\u003c=kg),f=_\u003e=0?_%2===0?1:-1:void 0,I=e.terminationType===\"boundary\"?o.preferredBoundaryPerpendicularSideByBusId?.get(e.busId):o.preferPlaneCheckerboardSites\u0026\u0026e.terminationType===\"plane\"\u0026\u0026(r===\"left\"||r===\"right\")?f:void 0,C=e.terminationType===\"boundary\"?o.preferBoundaryOutwardByBusId?.get(e.busId)??!0:!0,y=o.preferredViaPointsByConnectionIndex?.get(i.connectionIndex),x=E=\u003e{if(I===void 0)return 0;const B=r===\"left\"||r===\"right\"?E.point.y-a.y:E.point.x-a.x;return B*I\u003ekg?0:Math.abs(B)\u003c=kg?1:2};return d.toSorted((E,B)=\u003e(y?+(tn(E.point,y)\u003ekg)-+(tn(B.point,y)\u003ekg):0)||(C?E.outwardRank-B.outwardRank:B.outwardRank-E.outwardRank)||x(E)-x(B)||tn(a,E.point)-tn(a,B.point)||E.point.x-B.point.x||E.point.y-B.point.y)}function mbo(t){const{first:e,second:n,rules:o}=t,i=o.canShareCopper?.(e.connectionIndex,n.connectionIndex)??!1,r=o.viaHoleDiameter?o.viaHoleDiameter+(o.holeToHoleClearance??o.clearance):0,s=i?r:Math.max(o.viaDiameter+o.clearance,r);if(tn(e.point,n.point)\u003cs-kg)return!1;const a=o.viaDiameter/2+o.traceWidth/2+o.clearance;return!i\u0026\u0026(Cr(e.point,n.sourceSegment.start,n.sourceSegment.end)\u003ca-kg||Cr(n.point,e.sourceSegment.start,e.sourceSegment.end)\u003ca-kg)?!1:i?!0:Zm(e.sourceSegment,n.sourceSegment,o.clearance)}function _bo(t){const{component:e,rules:n,consumeSearchState:o}=t,i=e.connections.map(h=\u003e({connection:h,candidates:oNt({connection:h,component:e,rules:n})}));if(i.some(h=\u003eh.candidates.length===0))return null;const r=new Map,s=(h,d)=\u003e{const p=r.get(h)?.get(d);if(p!==void 0)return p;const m=mbo({first:h,second:d,rules:n}),_=r.get(h)??new Map;_.set(d,m),r.set(h,_);const f=r.get(d)??new Map;return f.set(h,m),r.set(d,f),m},a=i.flatMap(h=\u003eh.candidates.length===1?[h.candidates[0]]:[]);for(let h=0;h\u003ca.length;h++){const d=a[h];for(let p=0;p\u003ch;p++)if(!s(d,a[p]))return null}const A=new Map(a.map(h=\u003e[h.connectionIndex,h])),c=new Set(i.flatMap(h=\u003eh.candidates.length\u003e1?[h.connection.preparedConnection.connectionIndex]:[])),l=new Map(i.map(h=\u003e[h.connection.preparedConnection.connectionIndex,h]));if(c.size===0)return new Map([...A.entries()].map(([h,d])=\u003e[h,{...d.point}]));const u=h=\u003eh.candidates.filter(d=\u003e[...A.values()].every(p=\u003es(d,p))),g=()=\u003e{if(!o())return!1;if(c.size===0)return!0;let h,d=[];for(const m of[...c].toSorted((_,f)=\u003e_-f)){const _=l.get(m),f=u(_);if(f.length===0)return!1;(!h||f.length\u003cd.length||f.length===d.length\u0026\u0026m\u003ch.connection.preparedConnection.connectionIndex)\u0026\u0026(h=_,d=f)}const p=h.connection.preparedConnection.connectionIndex;c.delete(p);for(const m of d){if(A.set(p,m),g())return!0;A.delete(p)}return c.add(p),!1};return g()?new Map([...A.entries()].toSorted(([h],[d])=\u003eh-d).map(([h,d])=\u003e[h,{...d.point}])):null}function pd(t,e){const n=eNt(e);if(t.length===0)return new Map;let o=0;const i=()=\u003e(o++,o\u003c=n),r=new Map;for(const s of tNt(t)){const a=_bo({component:s,rules:e,consumeSearchState:i});if(!a)return null;for(const[A,c]of a)r.set(A,c)}return r}function pw(t,e){return eNt(e),tNt(t).flatMap(n=\u003en.connections.flatMap(o=\u003eoNt({connection:o,component:n,rules:e}).map(i=\u003e({connectionIndex:i.connectionIndex,point:{...i.point}}))))}function*fbo(t,e,n){const o=pw([t],e);let i=24;for(const r of t.connections.toReversed()){const s=n.get(r.connectionIndex);if(s)for(const a of o){if(a.connectionIndex!==r.connectionIndex||tn(a.point,s)\u003c=kg)continue;if(i--\u003c=0)return;const A=new Map(n);A.set(r.connectionIndex,a.point),yield A}}}var d0=1e-7,Ibo=16e4,Cbo=24e4,ybo=5e3,xbo=24,iNt=3.25,Ebo=class{constructor(t,e,n,o,i,r,s,a){this.minX=e,this.minY=n,this.cellSize=r,this.columnCount=Math.max(1,Math.ceil((o-e)/r)),this.rowCount=Math.max(1,Math.ceil((i-n)/r)),this.cells=new Array(this.columnCount*this.rowCount);for(const A of t){const c={...A,minX:Math.min(A.segment.start.x,A.segment.end.x),maxX:Math.max(A.segment.start.x,A.segment.end.x),minY:Math.min(A.segment.start.y,A.segment.end.y),maxY:Math.max(A.segment.start.y,A.segment.end.y)},l=(A.segment.width+s)/2+a,u=this.column(c.minX-l),g=this.column(c.maxX+l),h=this.row(c.minY-l),d=this.row(c.maxY+l);for(let p=h;p\u003c=d;p++)for(let m=u;m\u003c=g;m++){const _=p*this.columnCount+m;(this.cells[_]??=[]).push(c)}}}minX;minY;cellSize;cells;columnCount;rowCount;seen=new Map;queryCount=0;column(t){return Math.max(0,Math.min(this.columnCount-1,Math.floor((t-this.minX)/this.cellSize)))}row(t){return Math.max(0,Math.min(this.rowCount-1,Math.floor((t-this.minY)/this.cellSize)))}querySegment(t){const e=this.column(Math.min(t.start.x,t.end.x)),n=this.column(Math.max(t.start.x,t.end.x)),o=this.row(Math.min(t.start.y,t.end.y)),i=this.row(Math.max(t.start.y,t.end.y));if(e===n\u0026\u0026o===i)return this.cells[o*this.columnCount+e]??[];const r=[],s=++this.queryCount;for(let a=o;a\u003c=i;a++)for(let A=e;A\u003c=n;A++)for(const c of this.cells[a*this.columnCount+A]??[])this.seen.get(c)!==s\u0026\u0026(this.seen.set(c,s),r.push(c));return r}};function Bbo(t){const e=t;if(e.shape===\"circle\"){const c=t.width/2;return{minX:t.center.x-c,maxX:t.center.x+c,minY:t.center.y-c,maxY:t.center.y+c,xRadius:c}}const n=(e.ccwRotationDegrees??0)*Math.PI/180,o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=t.width/2,s=t.height/2,a=o*r+i*s,A=i*r+o*s;return{minX:t.center.x-a,maxX:t.center.x+a,minY:t.center.y-A,maxY:t.center.y+A,xRadius:a}}var bbo=class{obstaclesByCenterX;maximumXRadius;constructor(t){this.obstaclesByCenterX=t.map(e=\u003e({obstacle:e,...Bbo(e)})).toSorted((e,n)=\u003ee.obstacle.center.x-n.obstacle.center.x),this.maximumXRadius=this.obstaclesByCenterX.reduce((e,n)=\u003eMath.max(e,n.xRadius),0)}querySegment(t,e){const n=Math.min(t.start.x,t.end.x),o=Math.max(t.start.x,t.end.x),i=Math.min(t.start.y,t.end.y),r=Math.max(t.start.y,t.end.y),s=n-e-this.maximumXRadius,a=o+e+this.maximumXRadius;let A=0,c=this.obstaclesByCenterX.length;for(;A\u003cc;){const u=Math.floor((A+c)/2);this.obstaclesByCenterX[u].obstacle.center.x\u003cs?A=u+1:c=u}const l=[];for(let u=A;u\u003cthis.obstaclesByCenterX.length;u++){const g=this.obstaclesByCenterX[u];if(g.obstacle.center.x\u003ea)break;g.maxX\u003cn-e||g.minX\u003eo+e||g.maxY\u003ci-e||g.minY\u003er+e||l.push(g.obstacle)}return l}};function*Sbo(t){const{initialOrderFactories:e,rotationBase:n,getItemKey:o,maximumOrderCount:i=Number.POSITIVE_INFINITY}=t,r=new Set;let s=0;const a=A=\u003eA.map(o).join(\"\\0\");for(const A of e){if(s\u003e=i)return;const c=A(),l=a(c);r.has(l)||(r.add(l),s++,yield c)}for(let A=1;A\u003cn.length;A++){if(s\u003e=i)return;const c=[...n.slice(A),...n.slice(0,A)],l=a(c);r.has(l)||(r.add(l),s++,yield c)}}var Qbo=class{values=[];get size(){return this.values.length}sampleEntries(t){if(this.values.length\u003c=t)return this.values;const e=Math.ceil(this.values.length/t);return this.values.filter((n,o)=\u003eo%e===0)}push(t){this.values.push(t);let e=this.values.length-1;for(;e\u003e0;){const n=Math.floor((e-1)/2);if(this.values[n].score\u003c=t.score)break;this.values[e]=this.values[n],e=n}this.values[e]=t}pop(){const t=this.values[0],e=this.values.pop();if(!t||!e||this.values.length===0)return t;let n=0;for(;;){const o=n*2+1,i=o+1;if(o\u003e=this.values.length)break;const r=i\u003cthis.values.length\u0026\u0026this.values[i].score\u003cthis.values[o].score?i:o;if(this.values[r].score\u003e=e.score)break;this.values[n]=this.values[r],n=r}return this.values[n]=e,t}};function CO(t,e){return e===\"left\"||e===\"right\"?t.y:t.x}function vbo(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o);return i\u003cd0||r\u003cd0||Math.abs(i-r)\u003cd0?[[t,e]]:i\u003er?[[t,{x:t.x+Math.sign(n)*r,y:e.y},e],[t,{x:e.x-Math.sign(n)*r,y:t.y},e]]:[[t,{x:e.x,y:t.y+Math.sign(o)*i},e],[t,{x:t.x,y:e.y-Math.sign(o)*i},e]]}function wbo(t){if(t.length\u003c3)return t;const e=[t[0]];for(let n=1;n\u003ct.length-1;n++){const o=e.at(-1),i=t[n],r=t[n+1],s=Math.sign(i.x-o.x),a=Math.sign(i.y-o.y),A=Math.sign(r.x-i.x),c=Math.sign(r.y-i.y);(s!==A||a!==c)\u0026\u0026e.push(i)}return e.push(t.at(-1)),e}function Zj(t,e,n){return t.slice(1).flatMap((o,i)=\u003e{const r=t[i];return tn(r,o)\u003cd0?[]:[{start:r,end:o,width:e,layer:n}]})}function Pbo(t){const e=Math.abs(t.end.x-t.start.x),n=Math.abs(t.end.y-t.start.y);return e\u003cd0||n\u003cd0||Math.abs(e-n)\u003cd0}function Mbo(t){for(let e=0;e\u003ct.length;e++)for(let n=e+2;n\u003ct.length;n++)if(!(e===0\u0026\u0026n===t.length-1\u0026\u0026tn(t[e].start,t[n].end)\u003cd0)\u0026\u0026tu(t[e].start,t[e].end,t[n].start,t[n].end)\u003cd0)return!1;return!0}function Dbo(t){return[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(e=\u003e!!e)}function Nbo(t){const{srj:e,acceptedPlans:n,allowBlindAndBuriedVias:o}=t,i=Z7(e,o);return{segments:[...i.flatMap(r=\u003er.segments.map(s=\u003e({connectionName:r.connectionName,segment:s}))),...n.flatMap(r=\u003e[...r.segments,...r.planeEndpointSegments??[]].map(s=\u003e({connectionName:r.connectionName,segment:s})))],vias:[...i.flatMap(r=\u003er.vias.map(s=\u003e({connectionName:r.connectionName,via:s}))),...n.flatMap(r=\u003eDbo(r).map(s=\u003e({connectionName:r.connectionName,via:s})))]}}function i4(t){const{bus:e,terminal:n,targetLayer:o,targetLayerPoints:i,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:c}=t,l=n.connection,u={x:l.sourcePoint.x,y:l.sourcePoint.y},g=t.sourceEscapePoints??[u,n.viaPoint];if(g.length\u003c2||tn(g[0],u)\u003ed0||tn(g.at(-1),n.viaPoint)\u003ed0)throw new Error(\"FanoutSolver: source escape must connect the source pad to its first via\");const h=Zj([...g],s,l.sourceLayer),d=tn(u,n.viaPoint)\u003ed0,p=l.sourceLayer!==o,m=Zj(i,s,o),_=Mx({fromLayer:l.sourceLayer,toLayer:o,layerNames:r,allowBlindAndBuriedVias:c}),f={center:n.viaPoint,diameter:a,holeDiameter:A,fromLayer:l.sourceLayer,toLayer:o,spanLayers:_},I=[{route_type:\"wire\",...u,width:s,layer:l.sourceLayer,...l.sourcePoint.pcb_port_id?{start_pcb_port_id:l.sourcePoint.pcb_port_id}:{}},...d?[...g.slice(1).map(E=\u003e({route_type:\"wire\",...E,width:s,layer:l.sourceLayer}))]:[],...p?[{route_type:\"via\",...n.viaPoint,from_layer:l.sourceLayer,to_layer:o,via_diameter:a,via_hole_diameter:A},{route_type:\"wire\",...n.viaPoint,width:s,layer:o}]:[],...i.slice(1).map(E=\u003e({route_type:\"wire\",...E,width:s,layer:o}))],C=qN({connectionName:l.connection.name,sourcePointIndex:l.sourcePointIndex}),y=[...d?h:[],...m],x=Ds(e.exitEdge,e.preferredExit);return{busId:e.busId,connectionName:l.connection.name,connectionIndex:l.connectionIndex,sourcePointIndex:l.sourcePointIndex,sourcePoint:l.sourcePoint,sourceObstacle:l.sourceObstacle,sourceLayer:l.sourceLayer,targetPoint:l.targetPoint,targetLayer:o,termination:e.termination,direction:e.direction,...e.exitEdge?{exitEdge:e.exitEdge}:{},...x?{cornerBandSide:x}:{},exitPoint:n.exitPoint,trace:{type:\"pcb_trace\",pcb_trace_id:C.traceId,connection_name:l.connection.name,connectsTo:[...l.sourcePoint.pointId?[l.sourcePoint.pointId]:[],...l.sourcePoint.pcb_port_id?[l.sourcePoint.pcb_port_id]:[],C.boundaryExitPointId],route:I},segments:y,...h.length\u003e1?{sourceEscapeSegmentCount:h.length}:{},via:p?f:void 0,length:y.reduce((E,B)=\u003eE+tn(B.start,B.end),0)}}function*BC(t,e=1,n=!1){if(!Number.isInteger(e)||e\u003c1)throw new Error(`FanoutSolver: maximum winding alternatives must be a positive integer, received ${e}`);const{srj:o,bus:i,targetLayer:r,terminals:s,acceptedPlans:a,layerNames:A,traceWidth:c,viaDiameter:l,viaHoleDiameter:u,clearance:g,allowBlindAndBuriedVias:h=!0,allowSameNetMerges:d=!1,maximumRouteOrderAttempts:p,maximumSearchStates:m=Cbo,reservedVias:_=[],softReservedVias:f=[],gridStepDivisor:I=1,heuristicWeight:C=1,preferTargetDirectedLaneBias:y=!1,allowSourceLayerRouting:x=!1,adaptiveRouteOrder:E=!1,alignGridToPads:B=!1,includeReverseTargetRotation:S=!1,reserveTerminalExitPoints:Q=!1,forbidEarlyExitBoundaryContact:w=!1}=t;if(p!==void 0\u0026\u0026(!Number.isInteger(p)||p\u003c1))throw new Error(`FanoutSolver: maximumRouteOrderAttempts must be a positive integer, received ${p}`);if(!Number.isSafeInteger(m)||m\u003c1)throw new Error(`FanoutSolver: maximumSearchStates must be a positive safe integer, received ${m}`);if(!Number.isFinite(C)||C\u003c=0)throw new Error(`FanoutSolver: heuristicWeight must be a positive finite number, received ${C}`);if(I!==1\u0026\u0026I!==2)throw new Error(`FanoutSolver: gridStepDivisor must be 1 or 2, received ${I}`);if(s.length===0||!i.exitEdge||!x\u0026\u0026s.some(Ze=\u003eZe.connection.sourceLayer===r))return[];const M=(c+g)/I,k=Math.min(i.pitchX,i.pitchY),R=B\u0026\u0026I===2\u0026\u0026Number.isFinite(k),F=t.gridStep??(R?k/(2*Math.ceil(k/(2*M))):M);if(!Number.isFinite(F)||F\u003c=0)return[];const{minX:O,maxX:U,minY:Y,maxY:W}=i.sharedBoundary,te=t.gridOrigin?.x??i.xCoordinates[0]??O,j=t.gridOrigin?.y??i.yCoordinates[0]??Y,J=R?te+Math.ceil((O-te)/F)*F:O,oe=R?j+Math.ceil((Y-j)/F)*F:Y,ie=Math.floor((U-J)/F)+1,ne=Math.floor((W-oe)/F)+1,le=ie*ne;if(ie\u003c2||ne\u003c2||le\u003eIbo)return[];const ge=Array.from({length:le},(Ze,dt)=\u003e{const Ut=dt%ie,Wt=Math.floor(dt/ie);return{column:Ut,row:Wt,point:{x:J+Ut*F,y:oe+Wt*F}}}),_e=f.length?new Float32Array(le):void 0;if(_e)for(const{via:Ze}of f){if(!Ze.spanLayers.includes(r))continue;const dt=Ze.diameter/2+c/2+g,Ut=Math.max(0,Math.ceil((Ze.center.x-dt-J)/F)),Wt=Math.min(ie-1,Math.floor((Ze.center.x+dt-J)/F)),Xt=Math.max(0,Math.ceil((Ze.center.y-dt-oe)/F)),Jt=Math.min(ne-1,Math.floor((Ze.center.y+dt-oe)/F));for(let yn=Xt;yn\u003c=Jt;yn++)for(let An=Ut;An\u003c=Wt;An++){const kn=yn*ie+An;tn(ge[kn].point,Ze.center)\u003cdt\u0026\u0026(_e[kn]=_e[kn]+25*F)}}const ue=n?ge.filter((Ze,dt)=\u003edt%Math.max(1,Math.ceil(ge.length/1e3))===0).map(Ze=\u003eZe.point):[],fe=o.obstacles.filter(Ze=\u003eZe.layers.includes(r)),pe=new bbo(fe),ye=Nbo({srj:o,acceptedPlans:a,allowBlindAndBuriedVias:h}),Me=ye.segments.filter(({segment:Ze})=\u003e{if(Ze.layer!==r)return!1;const dt=(Ze.width+c)/2+g;return!(Math.max(Ze.start.x,Ze.end.x)\u003cO-dt||Math.min(Ze.start.x,Ze.end.x)\u003eU+dt||Math.max(Ze.start.y,Ze.end.y)\u003cY-dt||Math.min(Ze.start.y,Ze.end.y)\u003eW+dt)});x\u0026\u0026Me.push(..._.flatMap(Ze=\u003eZe.sourceEscapeSegment?.layer===r?[{connectionName:Ze.connectionName,segment:Ze.sourceEscapeSegment}]:[]));const ve=ye.vias.filter(({via:Ze})=\u003e{if(!Ze.spanLayers.includes(r))return!1;const dt=Ze.diameter/2+c/2+g;return!(Ze.center.x\u003cO-dt||Ze.center.x\u003eU+dt||Ze.center.y\u003cY-dt||Ze.center.y\u003eW+dt)});ve.push(..._.filter(({via:Ze})=\u003e{if(!Ze.spanLayers.includes(r))return!1;const dt=Ze.diameter/2+c/2+g;return!(Ze.center.x\u003cO-dt||Ze.center.x\u003eU+dt||Ze.center.y\u003cY-dt||Ze.center.y\u003eW+dt)}));const he=s.filter(Ze=\u003eZe.connection.sourceLayer!==r).map(Ze=\u003e({connectionName:Ze.connection.connection.name,via:{center:Ze.viaPoint,diameter:l,spanLayers:Mx({fromLayer:Ze.connection.sourceLayer,toLayer:r,layerNames:A,allowBlindAndBuriedVias:h})}})),Qe=e6(i.exitEdge),Pe=(Ze,dt)=\u003eZe===dt||d\u0026\u0026Px(o,Ze,dt),we=Ze=\u003enew Ebo(Ze,O,Y,U,W,F*8,c,g),Te=we(Me),Re=[...ve,...he],Ee=Re.reduce((Ze,{via:dt})=\u003eMath.max(Ze,dt.diameter/2+c/2+g),c/2+g),ke=Re.toSorted((Ze,dt)=\u003eZe.via.center.x-dt.via.center.x),Ce=Ze=\u003e{let dt=0,Ut=ke.length;for(;dt\u003cUt;){const Wt=Math.floor((dt+Ut)/2);ke[Wt].via.center.x\u003cZe?dt=Wt+1:Ut=Wt}return dt},Le=Ze=\u003e{const{segment:dt,terminal:Ut,acceptedAttemptSegmentIndex:Wt}=Ze;if(w){const ht=i.sharedBoundary;for(const Kt of[dt.start,dt.end])if((Math.abs(Kt.x-ht.minX)\u003cd0||Math.abs(Kt.x-ht.maxX)\u003cd0||Math.abs(Kt.y-ht.minY)\u003cd0||Math.abs(Kt.y-ht.maxY)\u003cd0)\u0026\u0026tn(Kt,Ut.exitPoint)\u003ed0)return!1}const Xt=Ut.connection.connection.name,Jt=Math.min(dt.start.x,dt.end.x),yn=Math.max(dt.start.x,dt.end.x),An=Math.min(dt.start.y,dt.end.y),kn=Math.max(dt.start.y,dt.end.y),$n=dt.width/2+g;for(const ht of pe.querySegment(dt,$n))if(!(ht.connectedTo.includes(Xt)||d\u0026\u0026n4(o,ht,Xt))\u0026\u0026Tl(dt,ht)\u003c$n-d0)return!1;for(const ht of Te.querySegment(dt)){if(Pe(Xt,ht.connectionName))continue;const Kt=(dt.width+ht.segment.width)/2+g;if(!(yn+Kt\u003cht.minX||Jt-Kt\u003eht.maxX||kn+Kt\u003cht.minY||An-Kt\u003eht.maxY)\u0026\u0026tu(dt.start,dt.end,ht.segment.start,ht.segment.end)\u003cKt-d0)return!1}for(const ht of Wt.querySegment(dt)){if(Pe(Xt,ht.connectionName))continue;const Kt=(dt.width+ht.segment.width)/2+g;if(!(yn+Kt\u003cht.minX||Jt-Kt\u003eht.maxX||kn+Kt\u003cht.minY||An-Kt\u003eht.maxY)\u0026\u0026tu(dt.start,dt.end,ht.segment.start,ht.segment.end)\u003c(dt.width+ht.segment.width)/2+g-d0)return!1}for(const ht of Q?s:[])if(!Pe(Xt,ht.connection.connection.name)\u0026\u0026Cr(ht.exitPoint,dt.start,dt.end)\u003cc+g-d0)return!1;for(let ht=Ce(Jt-Ee);ht\u003cke.length;ht++){const Kt=ke[ht];if(Kt.via.center.x\u003eyn+Ee)break;if(Pe(Xt,Kt.connectionName))continue;const rn=Kt.via.diameter/2+dt.width/2+g;if(!(Kt.via.center.x\u003cJt-rn||Kt.via.center.x\u003eyn+rn||Kt.via.center.y\u003cAn-rn||Kt.via.center.y\u003ekn+rn)\u0026\u0026Cr(Kt.via.center,dt.start,dt.end)\u003crn-d0)return!1}return!0},Ye=Ze=\u003e{const{terminal:dt,endpoint:Ut,acceptedAttemptSegmentIndex:Wt}=Ze,Xt=[],Jt=F*iNt,yn=Math.max(0,Math.ceil((Ut.x-Jt-J)/F)-1),An=Math.min(ie-1,Math.floor((Ut.x+Jt-J)/F)+1),kn=Math.max(0,Math.ceil((Ut.y-Jt-oe)/F)-1),$n=Math.min(ne-1,Math.floor((Ut.y+Jt-oe)/F)+1);for(let ht=kn;ht\u003c=$n;ht++)for(let Kt=yn;Kt\u003c=An;Kt++){const rn=ht*ie+Kt,Lt=ge[rn],Ho=tn(Ut,Lt.point);if(!(Ho\u003eF*iNt))for(const Ao of vbo(Ut,Lt.point)){const qe=Zj(Ao,c,r);qe.every(vt=\u003eLe({segment:vt,terminal:dt,acceptedAttemptSegmentIndex:Wt}))\u0026\u0026Xt.push({nodeIndex:rn,points:Ao,radialDistance:Ho,length:qe.reduce((vt,qt)=\u003evt+tn(qt.start,qt.end),0)})}}return Xt.toSorted((ht,Kt)=\u003eht.radialDistance-Kt.radialDistance||ht.length-Kt.length||ht.nodeIndex-Kt.nodeIndex).slice(0,xbo)},tt=Ze=\u003e{const{terminal:dt,acceptedAttemptSegments:Ut,expandedPoints:Wt,frontierPoints:Xt,bestPath:Jt,expandedStateCount:yn,searchBatch:An,connectionComplete:kn}=Ze;return{title:`Winding ${i.busId}: ${dt.connection.connection.name}`,rects:[{center:{x:(O+U)/2,y:(Y+W)/2},width:U-O,height:W-Y,fill:\"rgba(0, 0, 0, 0)\",stroke:\"rgba(14, 165, 233, 0.9)\",label:\"A* search boundary\"}],points:[...ue.map($n=\u003e({...$n,color:\"rgba(148, 163, 184, 0.22)\"})),...Xt.map($n=\u003e({...$n,color:\"rgba(6, 182, 212, 0.75)\",label:\"open frontier\"})),...Wt.map($n=\u003e({...$n,color:\"rgba(244, 63, 94, 0.8)\",label:\"expanded in current step\"})),{...dt.connection.sourcePoint,color:\"#f97316\",label:`source: ${dt.connection.connection.name}`},{...dt.exitPoint,color:\"#a855f7\",label:\"target exit\"}],circles:s.map($n=\u003e({center:$n.viaPoint,radius:l/2,fill:$n===dt?\"rgba(250, 204, 21, 0.85)\":\"rgba(250, 204, 21, 0.25)\",stroke:$n===dt?\"#ca8a04\":\"#a16207\",label:$n===dt?\"active via\":`reserved via: ${$n.connection.connection.name}`})),lines:[...Ut.map(({segment:$n,connectionName:ht})=\u003e({points:[$n.start,$n.end],strokeColor:\"rgba(34, 197, 94, 0.9)\",strokeWidth:Math.max(c,F*.35),label:`accepted: ${ht}`})),{points:[dt.viaPoint,dt.exitPoint],strokeColor:\"rgba(168, 85, 247, 0.45)\",strokeWidth:Math.max(c*.5,F*.15),strokeDash:[F,F],label:\"active via-to-exit search\"},...Jt?[{points:[...Jt],strokeColor:\"#facc15\",strokeWidth:Math.max(c,F*.45),label:\"best path so far\"}]:[]],texts:[{x:O,y:W+F*2,text:kn?`connection complete · ${yn.toLocaleString()} states`:`A* batch ${An} · ${yn.toLocaleString()} states`,color:\"#0f172a\",fontSize:Math.max(F*2.5,.5),anchorSide:\"bottom_left\"}]}},At=function*(Ze){const{terminal:dt,acceptedAttemptSegments:Ut,laneBias:Wt}=Ze,Xt=we(Ut),Jt=Ye({terminal:dt,endpoint:dt.viaPoint,acceptedAttemptSegmentIndex:Xt}),yn=Ye({terminal:dt,endpoint:dt.exitPoint,acceptedAttemptSegmentIndex:Xt});if(Jt.length===0||yn.length===0)return{points:null,expandedStateCount:0};const An=new Map;for(const To of yn){const yo=An.get(To.nodeIndex)??[];yo.push(To),An.set(To.nodeIndex,yo)}const kn=le*9,$n=new Uint8Array(le*8),ht=C\u003e1?new Uint8Array(kn):void 0,Kt=new Float64Array(kn).fill(Number.POSITIVE_INFINITY),rn=new Int32Array(kn).fill(-1),Lt=new Qbo,Ho=new Float64Array(le),Ao=new Float64Array(le),qe=CO(dt.exitPoint,Qe);for(let To=0;To\u003cle;To++){const yo=ge[To].point,Ro=Math.abs(yo.x-dt.exitPoint.x),On=Math.abs(yo.y-dt.exitPoint.y);Ho[To]=Math.max(Ro,On)+(Math.SQRT2-1)*Math.min(Ro,On);const uo=CO(yo,Qe);Ao[To]=Wt===0?0:Wt\u003e0?Math.max(0,qe-uo)*.2:Math.max(0,uo-qe)*.2}for(const To of Jt){const yo=To.nodeIndex*9+8;if(To.length\u003e=Kt[yo])continue;Kt[yo]=To.length;const Ro=Ho[To.nodeIndex];Lt.push({node:To.nodeIndex,direction:8,score:To.length+C*Ro})}const vt=[[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1]],qt=Array.from({length:9},(To,yo)=\u003evt.flatMap((Ro,On)=\u003e{const uo=Math.abs(yo-On);return yo===8||Math.min(uo,8-uo)\u003c=1?[On]:[]})),Zt=new Map;for(const To of Jt){const yo=Zt.get(To.nodeIndex)??[];yo.push(To),Zt.set(To.nodeIndex,yo)}let nn=Number.POSITIVE_INFINITY,zn=null,Nn=0,Co=0,ei=0,ro=[];for(;Lt.size\u003e0\u0026\u0026Nn\u003cm;){const To=Lt.pop();if(To.score\u003e=nn-d0)break;const yo=To.node*9+To.direction;if(ht?.[yo])continue;const Ro=Kt[yo];if(To.score\u003eRo+C*Ho[To.node]+d0)continue;ht\u0026\u0026(ht[yo]=1),Nn++,Co++,n\u0026\u0026Co%50===0\u0026\u0026ro.push(ge[To.node].point);const On=An.get(To.node);if(On){const Oo=[];let ko=yo;for(;ko\u003e=0;)Oo.push(ge[Math.floor(ko/9)].point),ko=rn[ko];Oo.reverse();let Ko=yo;for(;rn[Ko]\u003e=0;)Ko=rn[Ko];const mi=Math.floor(Ko/9),Fo=Zt.get(mi)??[],Nr=Math.min(...Fo.map(Rs=\u003eRs.length));for(const Rs of Fo)for(const ur of On){const zi=Ro-Nr+Rs.length+ur.length;if(zi\u003e=nn-d0)continue;const bi=wbo([...Rs.points,...Oo.slice(1),...ur.points.toReversed().slice(1)]),Ar=Zj(bi,c,r);!Ar.every(Pbo)||!Mbo(Ar)||!Ar.every(ws=\u003eLe({segment:ws,terminal:dt,acceptedAttemptSegmentIndex:Xt}))||(nn=zi,zn=bi)}}if(C\u003e1\u0026\u0026zn)return{points:zn,expandedStateCount:Nn};const uo=ge[To.node];for(const Oo of qt[To.direction]){const[ko,Ko]=vt[Oo],mi=uo.column+ko,Fo=uo.row+Ko;if(mi\u003c0||mi\u003e=ie||Fo\u003c0||Fo\u003e=ne)continue;const Nr=Fo*ie+mi,Rs=ge[Nr].point,ur=To.direction!==8\u0026\u0026To.direction!==Oo,zi=Ao[Nr],bi=Ro+(ko!==0\u0026\u0026Ko!==0?F*Math.SQRT2:F)+(ur?F*.2:0)+zi+(_e?.[Nr]??0),Ar=Nr*9+Oo;if(ht?.[Ar]||bi\u003e=Kt[Ar]-d0)continue;const ws=To.node*8+Oo;if($n[ws]===0){const Et=Le({segment:{start:uo.point,end:Rs,width:c,layer:r},terminal:dt,acceptedAttemptSegmentIndex:Xt});$n[ws]=Et?1:2,$n[Nr*8+(Oo+4)%8]=Et?1:2}if($n[ws]===2)continue;Kt[Ar]=bi,rn[Ar]=yo;const ds=Ho[Nr];Lt.push({node:Nr,direction:Oo,score:bi+C*ds})}Co\u003e=ybo\u0026\u0026(Co=0,ei++,yield{expandedStateCount:Nn,...n?{visualization:tt({terminal:dt,acceptedAttemptSegments:Ut,expandedPoints:ro,frontierPoints:Lt.sampleEntries(120).map(Oo=\u003ege[Oo.node].point),bestPath:zn,expandedStateCount:Nn,searchBatch:ei,connectionComplete:!1})}:{}},ro=[])}return{points:zn,expandedStateCount:Nn}},at=s.toSorted((Ze,dt)=\u003eCO(Ze.exitPoint,Qe)-CO(dt.exitPoint,Qe)||Ze.connection.connection.name.localeCompare(dt.connection.connection.name)),nt=s.map(Ze=\u003eCO(Ze.viaPoint,Qe)),gt=at.map(Ze=\u003eCO(Ze.exitPoint,Qe)),bt=nt.reduce((Ze,dt)=\u003eZe+dt,0)/nt.length,Ct=gt.reduce((Ze,dt)=\u003eZe+dt,0)/gt.length,Dt=Math.max(...nt)\u003cMath.min(...gt)-d0,kt=Math.min(...nt)\u003eMath.max(...gt)+d0,it=t.routeOrder?[t.laneBias??0]:y?Dt?[0,1,-1]:kt?[0,-1,1]:i.direction===Qe\u0026\u0026Ct\u003ebt+d0?[1,0,-1]:i.direction===Qe\u0026\u0026Ct\u003cbt-d0?[-1,0,1]:[0,1,-1]:Dt?[1,0,-1]:kt?[-1,0,1]:[0,1,-1],Yt=[];if(t.routeOrder){if(t.routeOrder.length!==s.length||new Set(t.routeOrder).size!==s.length||t.routeOrder.some(Ze=\u003e!Number.isInteger(Ze)||Ze\u003c0||Ze\u003e=s.length))throw new Error(\"FanoutSolver: routeOrder must contain every terminal index exactly once\");Yt.push(()=\u003et.routeOrder.map(Ze=\u003es[Ze]))}B\u0026\u0026y\u0026\u0026Dt\u0026\u0026Yt.push(()=\u003eat),Dt?Yt.push(()=\u003e[...at.slice(1),at[0]]):kt\u0026\u0026(Yt.push(()=\u003e[...at].reverse()),S\u0026\u0026at.length\u003e2\u0026\u0026Yt.push(()=\u003e[...at.slice(0,-1).toReversed(),at.at(-1)])),Yt.push(...y\u0026\u0026i.direction===Qe\u0026\u0026Ct\u003cbt-d0\u0026\u0026!Dt\u0026\u0026!kt?[()=\u003e[...at].reverse(),()=\u003eat]:[()=\u003eat,()=\u003e[...at].reverse()],()=\u003es.toSorted((Ze,dt)=\u003eZe.viaPoint.x-dt.viaPoint.x||Ze.viaPoint.y-dt.viaPoint.y),()=\u003es.toSorted((Ze,dt)=\u003edt.viaPoint.x-Ze.viaPoint.x||dt.viaPoint.y-Ze.viaPoint.y),()=\u003es.toSorted((Ze,dt)=\u003eZe.viaPoint.y-dt.viaPoint.y||Ze.viaPoint.x-dt.viaPoint.x),()=\u003es.toSorted((Ze,dt)=\u003edt.viaPoint.y-Ze.viaPoint.y||dt.viaPoint.x-Ze.viaPoint.x));const pn=p===void 0?void 0:Math.ceil(p/it.length),be=Sbo({initialOrderFactories:Yt,rotationBase:at,getItemKey:Ze=\u003eZe.connection.connection.name,maximumOrderCount:pn}),et=[],It=new Set,Bt=function*(){for(;;){const Ze=et.shift(),dt=Ze?{done:!1,value:Ze}:be.next();if(dt.done)return;const Ut=dt.value.map(Wt=\u003eWt.connection.connection.name).join(\"|\");It.has(Ut)||(It.add(Ut),yield dt.value)}},mt=[],st=new Set,xt=new Map;let Xe=0;for(const Ze of Bt())for(const dt of it){if(p!==void 0\u0026\u0026Xe\u003e=p)return mt;Xe++;const Ut=[],Wt=new Map;let Xt=!1;for(let An=0;An\u003cZe.length;An++){const kn=Ze[An],$n=JSON.stringify([s.indexOf(kn),dt,Ut.map(({connectionName:qt,segment:Zt})=\u003e[qt,Zt.start.x,Zt.start.y,Zt.end.x,Zt.end.y,Zt.width,Zt.layer])]),ht=xt.get($n),Kt=At({terminal:kn,acceptedAttemptSegments:Ut,laneBias:dt});let rn=ht===void 0?Kt.next():{done:!0,value:{points:null,expandedStateCount:ht.expandedStateCount}},Lt=ht?.searchBatch??0,Ho=0;for(;!rn.done;)Ho=rn.value.expandedStateCount,yield{phase:\"route-connection\",routeOrderAttempt:Xe,connectionIndex:An,connectionCount:Ze.length,connectionName:kn.connection.connection.name,searchBatch:++Lt,expandedStateCount:Ho,connectionComplete:!1,...rn.value.visualization?{visualization:rn.value.visualization}:{}},rn=Kt.next();const{points:Ao,expandedStateCount:qe}=rn.value;if(Ho=qe,yield{phase:\"route-connection\",routeOrderAttempt:Xe,connectionIndex:An,connectionCount:Ze.length,connectionName:kn.connection.connection.name,searchBatch:Lt,expandedStateCount:Ho,connectionComplete:!0,...n?{visualization:tt({terminal:kn,acceptedAttemptSegments:Ut,expandedPoints:[],frontierPoints:[],bestPath:Ao,expandedStateCount:Ho,searchBatch:Lt,connectionComplete:!0})}:{}},!Ao){if(xt.set($n,{expandedStateCount:qe,searchBatch:Lt}),E\u0026\u0026p!==void 0\u0026\u0026An\u003e0){const qt=Ze.filter(Zt=\u003eZt!==kn);et.push([kn,...qt])}Xt=!0;break}const vt=kn.connection.connection.name;Wt.set(vt,Ao),Ut.push(...Zj(Ao,c,r).map(qt=\u003e({connectionName:vt,segment:qt})))}if(Xt)continue;const Jt=s.map(An=\u003e{const kn=Wt.get(An.connection.connection.name);if(!kn)throw new Error(`FanoutSolver: via-minimal winding route omitted \"${An.connection.connection.name}\"`);return i4({bus:i,terminal:An,targetLayer:r,targetLayerPoints:kn,sourceEscapePoints:t.sourceEscapePaths?.get(An.connection.connectionIndex),layerNames:A,traceWidth:c,viaDiameter:l,viaHoleDiameter:u,allowBlindAndBuriedVias:h})}),yn=Jt.map(An=\u003eAn.segments.map(kn=\u003e`${kn.start.x},${kn.start.y},${kn.end.x},${kn.end.y},${kn.layer}`).join(\";\")).join(\"|\");if(!st.has(yn)\u0026\u0026(st.add(yn),mt.push(Jt),mt.length\u003e=e))return mt}return mt}function Rbo(t,e=1){const n=BC(t,e);let o=n.next();for(;!o.done;)o=n.next();return o.value}function rNt(t){return Rbo(t,1)[0]??null}function CPe(t){return t.allowViaInPad===!0}function h0(t){return t===\"left\"||t===\"right\"}function t6(t){return t===\"right\"||t===\"up\"?1:-1}function aE(t,e){return h0(e)?t.x:t.y}function Xu(t,e){return h0(e)?t.y:t.x}function r4(t){return Ds(t.exitEdge,t.preferredExit)}function Tbo(t){return Ds(Xj(t.direction),t.preferredExit)}function yO(t){return!!(t.exitEdge\u0026\u0026t.termination.type===\"boundary\"\u0026\u0026t.connections.length\u003e0\u0026\u0026t.connections.every(e=\u003ee.hasExplicitLayeredExitTarget===!0))}function W0e(t){return\"source_trace_id\"in t\u0026\u0026typeof t.source_trace_id==\"string\"?t.source_trace_id:t.name}function sNt(t){const{bus:e,boundaryDirection:n,layerNames:o,targetLayer:i}=t,r=_=\u003e_.exitTargetPoint?.layer??SPe(_.targetPoint),s=(_,f)=\u003e{const I=Xu(_.exitTargetPoint??_.targetPoint,n)-Xu(f.exitTargetPoint??f.targetPoint,n);if(I!==0)return I;const C=W0e(_.connection),y=W0e(f.connection),x=C.localeCompare(y);return x!==0?x:_.connection.name.localeCompare(f.connection.name)||_.connectionIndex-f.connectionIndex},a=e.connections.toSorted((_,f)=\u003e{const I=Xu(_.exitTargetPoint??_.targetPoint,n)-Xu(f.exitTargetPoint??f.targetPoint,n);return I!==0?I:_.connection.name.localeCompare(f.connection.name)||W0e(_.connection).localeCompare(W0e(f.connection))||o.indexOf(r(_))-o.indexOf(r(f))||_.connectionIndex-f.connectionIndex}),A=new Map;for(const _ of e.connections){const f=r(_),I=A.get(f)??[];I.push(_),A.set(f,I)}const c=[...A.keys()].toSorted((_,f)=\u003e+(f===i)-+(_===i)||o.indexOf(_)-o.indexOf(f)||_.localeCompare(f)),l=new Map(c.map((_,f)=\u003e[_,f])),u=new Map;for(const _ of c)for(const[f,I]of A.get(_).toSorted(s).entries())u.set(I.connectionIndex,f);const g=e.connections.toSorted((_,f)=\u003e(u.get(_.connectionIndex)??0)-(u.get(f.connectionIndex)??0)||(l.get(r(_))??0)-(l.get(r(f))??0)||s(_,f)),h=[g];for(let _=0;_+1\u003cg.length;_++){const f=g[_],I=g[_+1];if(r(f)===r(I))continue;const C=[...g];C[_]=I,C[_+1]=f,h.push(C)}h.push(a);const d=new Set(h.map(_=\u003e_.map(f=\u003ef.connectionIndex).join(\",\"))).size;if(!r4(e)\u0026\u0026e.connections.length\u003c=8\u0026\u0026c.length\u003e1){const _=c.map(y=\u003eA.get(y).toSorted(s)),f=_.map(()=\u003e0),I=[],C=()=\u003e{if(!(h.length\u003e=128)){if(I.length===e.connections.length){h.push([...I]);return}for(let y=0;y\u003c_.length;y++){const x=f[y],E=_[y][x];E\u0026\u0026(f[y]=x+1,I.push(E),C(),I.pop(),f[y]=x)}}};C()}const p=new Set;return{orders:h.filter(_=\u003e{const f=_.map(I=\u003eI.connectionIndex).join(\",\");return p.has(f)?!1:(p.add(f),!0)}),legacyOrder:a,ordinaryOrderCount:d}}function aNt(t){const{connection:e,windingOrderIndex:n=0}=t,{orders:o,legacyOrder:i}=sNt(t),r=t.windingOrderIndex===void 0?i:o[n]??o[0]??i,s=r.findIndex(a=\u003ea.connectionIndex===e.connectionIndex);if(s\u003c0)throw new Error(`FanoutSolver: connection \"${e.connection.name}\" is missing from winding order`);return{rank:s,connectionCount:r.length}}function kbo(t){const{bus:e,escapeLayer:n}=t;return(e.routableEscapeLayers??e.allowedLayers)?.find(o=\u003eo!==n)}function yPe(t){const{bus:e,boundaryDirection:n,traceWidth:o,clearance:i}=t;if(r4(e)||!yO(e))return;const r=new Set(e.connections.map(u=\u003eu.exitTargetPoint?.layer??SPe(u.targetPoint))),s=h0(n)?e.sharedBoundary.minY:e.sharedBoundary.minX,a=h0(n)?e.sharedBoundary.maxY:e.sharedBoundary.maxX,A=e.connections.map(u=\u003eMath.max(s,Math.min(a,Xu(u.exitTargetPoint??u.targetPoint,n)))).toSorted((u,g)=\u003eu-g),c=o+i;if((r.size\u003c2||!t.allowLayerInterleaving)\u0026\u0026A.every((u,g)=\u003eg===0||u-A[g-1]\u003e=c-1e-9)||a-s\u003c(A.length-1)*c-1e-9)return;const l=[];for(const[u,g]of A.entries())for(l.push({start:u,count:1,mean:g-u*c});l.length\u003e1\u0026\u0026l.at(-2).mean\u003el.at(-1).mean;){const h=l.pop(),d=l.pop();l.push({start:d.start,count:d.count+h.count,mean:(d.mean*d.count+h.mean*h.count)/(d.count+h.count)})}for(const u of l){const g=Math.max(s,Math.min(a-(A.length-1)*c,u.mean));for(let h=u.start;h\u003cu.start+u.count;h++)A[h]=g+h*c}return A}function tR(t){const e=t.fixedBoundaryTracksByConnectionIndex?.get(t.connection.connectionIndex);if(e!==void 0)return e;const n=Xu(t.connection.exitTargetPoint??t.connection.targetPoint,t.boundaryDirection),o=h0(t.boundaryDirection)?t.bus.sharedBoundary.minY:t.bus.sharedBoundary.minX,i=h0(t.boundaryDirection)?t.bus.sharedBoundary.maxY:t.bus.sharedBoundary.maxX,r=t.traceWidth!==void 0\u0026\u0026t.clearance!==void 0?yPe({...t,traceWidth:t.traceWidth,clearance:t.clearance}):void 0;if(r\u0026\u0026t.layerNames\u0026\u0026t.targetLayer){const{rank:s}=aNt({...t,layerNames:t.layerNames,targetLayer:t.targetLayer});return r[s]}return Math.max(o,Math.min(i,n))}function BB(t){const e=t.fixedBoundaryTracksByConnectionIndex?.get(t.connection.connectionIndex);if(e!==void 0)return e;const{bus:n,connection:o,cornerExitLaneOffset:i,traceWidth:r,viaDiameter:s,clearance:a,layerNames:A,targetLayer:c,windingOrderIndex:l,cornerBandTargetTrackOffset:u=0}=t,g=r4(n);if(!g||!n.exitEdge)return Xu(o.exitTargetPoint??o.targetPoint,n.direction);const h=e6(n.exitEdge),d=h0(h)?n.sharedBoundary.minY:n.sharedBoundary.minX,p=h0(h)?n.sharedBoundary.maxY:n.sharedBoundary.maxX,m=Math.max(r+a,s+a),_=d+(p-d)*(g===\"minimum\"?.25:.75)+u,f=yO(n)?aNt({bus:n,connection:o,boundaryDirection:h,layerNames:A,targetLayer:c,windingOrderIndex:l}):void 0,I=Math.max(n.connections.length,n.cornerBandConnectionCount??n.connections.length,i+(f?.connectionCount??0)),C=_-(I-1)*m/2,y=f?.rank??e$(n,o),x=i+y,B=!f\u0026\u0026g===\"maximum\"==t6(h)\u003e0?I-1-x:x;return C+B*m}function ANt(t,e){const n=r4(t);if(!n||!t.exitEdge)return{exit:0,localChannel:0,boundaryChannel:0};const o=e.filter(s=\u003es.exitEdge\u0026\u0026s.cornerBandSide!==void 0),i=o.filter(s=\u003es.exitEdge===t.exitEdge\u0026\u0026s.cornerBandSide===n),r=o.filter(s=\u003es.direction===t.direction);return{exit:i.length,localChannel:r.length,boundaryChannel:i.length}}function n1(t,e,n){return h0(n)?{x:t,y:e}:{x:e,y:t}}function n6(t,e=t.direction){switch(e){case\"right\":return t.sharedBoundary.maxX;case\"left\":return t.sharedBoundary.minX;case\"up\":return t.sharedBoundary.maxY;case\"down\":return t.sharedBoundary.minY}}function xO(t){return h0(t.direction)?t.pitchX:t.pitchY}function cNt(t){return h0(t.direction)?t.pitchY:t.pitchX}function lNt(t,e){if(t.length\u003c3)return[...t];const n=[t[0]];for(let o=1;o\u003ct.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a={x:r.x-i.x,y:r.y-i.y},A={x:s.x-r.x,y:s.y-r.y},c=Math.hypot(a.x,a.y),l=Math.hypot(A.x,A.y),u=Math.abs(a.x)\u003c=1e-9||Math.abs(a.y)\u003c=1e-9,g=Math.abs(A.x)\u003c=1e-9||Math.abs(A.y)\u003c=1e-9,h=Math.abs(a.x*A.x+a.y*A.y)\u003c=1e-9;if(c\u003c=1e-9||l\u003c=1e-9||!u||!g||!h){n.push(r);continue}const d=Math.min(e,c/3,l/3);n.push({x:r.x-a.x/c*d,y:r.y-a.y/c*d}),n.push({x:r.x+A.x/l*d,y:r.y+A.y/l*d})}return n.push(t.at(-1)),n.filter((o,i)=\u003ei===0||tn(o,n[i-1])\u003e1e-9)}function uNt(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o);return i\u003c=1e-9||r\u003c=1e-9||Math.abs(i-r)\u003c=1e-9?[[t,e]]:i\u003er?[[t,{x:t.x+Math.sign(n)*r,y:e.y},e],[t,{x:e.x-Math.sign(n)*r,y:t.y},e]]:[[t,{x:e.x,y:t.y+Math.sign(o)*i},e],[t,{x:t.x,y:e.y-Math.sign(o)*i},e]]}function Fbo(t){const e=(h0(t.direction)?t.xCoordinates:t.yCoordinates).toSorted((i,r)=\u003ei-r),n=t.connections.reduce((i,r)=\u003ei+aE(r.sourcePoint,t.direction),0)/t.connections.length,o=t6(t.direction)\u003e0?e.at(-1):e[0];return Math.abs(o-n)/xO(t)}function xPe(t){const e=h0(t.direction)?t.xCoordinates:t.yCoordinates,n=t.connections.reduce((i,r)=\u003ei+aE(r.sourcePoint,t.direction),0)/t.connections.length,o=t6(t.direction)\u003e0?Math.max(...e):Math.min(...e);return Math.abs(n-o)\u003c1e-6}function e$(t,e){const n=[...t.connections].sort((o,i)=\u003eXu(o.sourcePoint,t.direction)-Xu(i.sourcePoint,t.direction)).findIndex(o=\u003eo.connectionIndex===e.connectionIndex);if(n\u003c0)throw new Error(`FanoutSolver: connection \"${e.connection.name}\" is missing from bus \"${t.busId}\"`);return n}function Lbo(t,e){return{minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}}function EPe(t,e){return t.x\u003e=e.minX-1e-6\u0026\u0026t.x\u003c=e.maxX+1e-6\u0026\u0026t.y\u003e=e.minY-1e-6\u0026\u0026t.y\u003c=e.maxY+1e-6}function BPe(t,e,n,o,i){const r=e-t,s=Math.floor((r-o)/(n+o)+1e-9);if(s\u003c1)return[];const a=s*n+(s-1)*o,A=t+(r-a)/2+n/2;return Array.from({length:s},(c,l)=\u003e({value:A+l*(n+o),kind:i}))}function Hbo(t){const{bus:e,connection:n,preferredTrack:o,traceWidth:i,clearance:r}=t,s=(h0(e.direction)?e.yCoordinates:e.xCoordinates).toSorted((m,_)=\u003em-_),a=Math.max(...e.componentObstacles.map(m=\u003eh0(e.direction)?m.height/2:m.width/2)),A=h0(e.direction)?e.sharedBoundary.minY:e.sharedBoundary.minX,c=h0(e.direction)?e.sharedBoundary.maxY:e.sharedBoundary.maxX,l=c-A,u=A,g=c,h=[{value:o,kind:\"preferred\"},...BPe(u,s[0]-a,i,r,\"margin\")];for(let m=0;m\u003cs.length;m++)h.push({value:s[m],kind:\"corridor\"}),m\u003cs.length-1\u0026\u0026h.push(...BPe(s[m]+a,s[m+1]-a,i,r,\"gap\"));h.push(...BPe(s.at(-1)+a,g,i,r,\"margin\"));const d=Xu(n.sourcePoint,e.direction),p=(s[0]+s.at(-1))/2;return h.filter(m=\u003eMath.abs(m.value-d)\u003c=l+1e-9).filter((m,_,f)=\u003ef.findIndex(I=\u003eMath.abs(I.value-m.value)\u003c1e-9)===_).sort((m,_)=\u003eMath.abs(m.value-o)-Math.abs(_.value-o)-(Math.abs(m.value-p)-Math.abs(_.value-p))*.001)}function Obo(t){const e=r4(t.bus)||yO(t.bus)?Xu(t.connection.sourcePoint,t.bus.direction):Xu(t.connection.exitTargetPoint??t.connection.targetPoint,t.bus.direction),n=h0(t.bus.direction)?t.bus.sharedBoundary.minY:t.bus.sharedBoundary.minX,o=h0(t.bus.direction)?t.bus.sharedBoundary.maxY:t.bus.sharedBoundary.maxX;return Math.max(n+t.traceWidth/2,Math.min(o-t.traceWidth/2,e))}function Gbo(t){const{bus:e,connection:n,targetUsesVia:o,interstitialEscape:i,compactBusTracks:r,traceWidth:s,viaDiameter:a,clearance:A}=t,c=(h0(e.direction)?e.yCoordinates:e.xCoordinates).toSorted((B,S)=\u003eB-S),l=Xu(n.sourcePoint,e.direction);if(r){const B=e$(e,n);return(c[0]+c.at(-1))/2+(B-(e.connections.length-1)/2)*(s+A)}if(!o||!i)return l;const u=Fbo(e),g=s+A,h=Math.ceil(e.connections.length/2),d=(h-1)*g,p=a/2+s/2+A+.001,m=Math.round(u)+1,_=m*p+(m-1)*d,f=e$(e,n),I=c[0],C=c.at(-1),y=f\u003ch?I-_-(h-f-1)*g:C+_+(f-h)*g,x=h0(e.direction)?e.sharedBoundary.minY:e.sharedBoundary.minX,E=h0(e.direction)?e.sharedBoundary.maxY:e.sharedBoundary.maxX;return Math.max(x+s/2,Math.min(E-s/2,y))}function gNt(t){const e=t6(t.direction),n=[...t.connections].sort((r,s)=\u003e{const a=e*(aE(s.sourcePoint,t.direction)-aE(r.sourcePoint,t.direction));return Math.abs(a)\u003e1e-6?a:Xu(r.sourcePoint,t.direction)-Xu(s.sourcePoint,t.direction)}),o=[...t.connections].sort((r,s)=\u003eXu(r.sourcePoint,t.direction)-Xu(s.sourcePoint,t.direction)||e*(aE(s.sourcePoint,t.direction)-aE(r.sourcePoint,t.direction))),i=[n,[...n].reverse(),o,[...o].reverse()];for(let r=1;r\u003cMath.min(n.length,8);r++)i.push([...n.slice(r),...n.slice(0,r)]);return i}function dNt(t,e,n,o,i){tn(e,n)\u003c1e-9||t.push({start:e,end:n,width:o,layer:i})}function bPe(t,e){if(t.length\u003c3)return t;const n=[t[0]];for(let o=1;o\u003ct.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a=tn(i,r),A=tn(r,s);if(a\u003c1e-9||A\u003c1e-9)continue;const c={x:(r.x-i.x)/a,y:(r.y-i.y)/a},l={x:(s.x-r.x)/A,y:(s.y-r.y)/A},u=c.x*l.x+c.y*l.y;if(Math.abs(u)\u003e1e-6){n.push(r);continue}const g=Math.min(e,a/2,A/2);n.push({x:r.x-c.x*g,y:r.y-c.y*g}),n.push({x:r.x+l.x*g,y:r.y+l.y*g})}return n.push(t.at(-1)),n}function j0e(t){const{preparedConnection:e,bus:n,targetLayer:o,traceWidth:i,viaDiameter:r,clearance:s,viaHandedness:a}=t,A={x:e.sourcePoint.x,y:e.sourcePoint.y},c=o!==e.sourceLayer,l=xO(n),u=cNt(n),g=h0(n.direction)?e.sourceObstacle.width:e.sourceObstacle.height,h=c\u0026\u0026!xPe(n)?g\u003e=l?g/2+r/2+s+.001:l*.5:c?Math.max(l*.5,g/2+(c?r:i)/2+s+.001):g/2+i/2+s+.001,d=aE(A,n.direction)+t6(n.direction)*h,p=Xu(A,n.direction)+a*u*.5;return n1(d,p,n.direction)}function $0e(t){const{preparedConnection:e,bus:n,targetLayer:o,track:i,exitAxis:r,layerNames:s,traceWidth:a,viaDiameter:A,viaHoleDiameter:c,viaHandedness:l,interstitialEscape:u,spreadLaneIndex:g,cornerExitLaneOffset:h,cornerLocalChannelLaneOffset:d,cornerBoundaryChannelLaneOffset:p,clearance:m,terminateAtVia:_,allowBlindAndBuriedVias:f,initialViaPoint:I,sourceEscapePath:C,cornerBandTargetTrackOffset:y,fixedBoundaryTracksByConnectionIndex:x}=t,E=x?.get(e.connectionIndex),B=r4(n),S=n.exitEdge?e6(n.exitEdge):n.direction,Q=E!==void 0\u0026\u0026!B\u0026\u0026n.direction===S?E:i,w={x:e.sourcePoint.x,y:e.sourcePoint.y},M=o,k=yO(n)?kbo({bus:n,escapeLayer:M}):void 0,R=!!k,F=t6(n.direction),O=xO(n),U=C?.at(-1),Y=U!==void 0?{x:U.x,y:U.y}:I===void 0?j0e({preparedConnection:e,bus:n,targetLayer:o,traceWidth:a,viaDiameter:A,clearance:m,viaHandedness:l}):{x:I.x,y:I.y},W=C?C.map(Ct=\u003e({x:Ct.x,y:Ct.y})):[w,Y];if(W.length\u003c2||tn(W[0],w)\u003e1e-9||tn(W.at(-1),Y)\u003e1e-9)throw new Error(`FanoutSolver: source escape path for \"${e.connection.name}\" must run from its source point to its via`);const te=aE(Y,n.direction),j=Xu(Y,n.direction),J=A/2+a/2+m+.001+g*(a+m),oe=u\u0026\u0026O\u003e=J+A/2+m,ie=oe?n1(te+F*J,j,n.direction):Y,ne=oe?aE(ie,n.direction):te+F*Math.abs(Q-j),le=n1(ne,Q,n.direction),ge=t6(S),_e=n6(n,S),ue=E??(B\u0026\u0026n.exitEdge?BB({bus:n,connection:e,cornerExitLaneOffset:h,traceWidth:a,viaDiameter:A,clearance:m,layerNames:s,targetLayer:o,cornerBandTargetTrackOffset:y}):R?tR({bus:n,connection:e,boundaryDirection:S,traceWidth:a,clearance:m,layerNames:s,targetLayer:o}):Q),fe=e$(n,e),ye=Tbo(n)===\"maximum\"?d+fe:d+n.connections.length-1-fe,Me=p+fe,ve=Math.max(n.connections.length,n.cornerBandConnectionCount??n.connections.length),he=ge\u003e0?Me:ve-1-Me,Qe=R?A/2+a/2+m:a+m,Pe=Ct=\u003eA/2+a/2+m+Ct*Qe,we=n6(n,n.direction)-F*Pe(ye),Te=_e-ge*Pe(he),Re=n1(we,Q,n.direction),Ee=n1(Te,we,S),ke=n1(Te,ue,S),Ce=h0(n.direction)!==h0(S)?Ee:n1(Te,Q,S),Le=_?Y:B||R||E!==void 0?n1(_e,ue,S):n1(r,Q,n.direction),Ye=[],tt=[];tt.push({route_type:\"wire\",x:w.x,y:w.y,width:a,layer:e.sourceLayer,start_pcb_port_id:e.sourcePoint.pcb_port_id});for(let Ct=1;Ct\u003cW.length;Ct++){const Dt=W[Ct-1],kt=W[Ct];dNt(Ye,Dt,kt,a,e.sourceLayer),!(tn(Dt,kt)\u003c=1e-9)\u0026\u0026tt.push({route_type:\"wire\",x:kt.x,y:kt.y,width:a,layer:e.sourceLayer})}const At=Ye.length;let at;if(o!==e.sourceLayer){const Ct=Mx({fromLayer:e.sourceLayer,toLayer:o,layerNames:s,allowBlindAndBuriedVias:f});at={center:Y,diameter:A,holeDiameter:c,fromLayer:e.sourceLayer,toLayer:o,spanLayers:Ct},tt.push({route_type:\"via\",x:Y.x,y:Y.y,from_layer:e.sourceLayer,to_layer:o,via_diameter:A,via_hole_diameter:c}),tt.push({route_type:\"wire\",x:Y.x,y:Y.y,width:a,layer:o})}const nt=(Ct,Dt)=\u003e{for(let kt=1;kt\u003cCt.length;kt++){const it=Ct[kt-1],Yt=Ct[kt];dNt(Ye,it,Yt,a,Dt),tt.push({route_type:\"wire\",x:Yt.x,y:Yt.y,width:a,layer:Dt})}},gt=[];if(R\u0026\u0026k){const Ct=bPe([Y,...oe?[ie]:[],le,...h0(n.direction)!==h0(S)?[Re]:[],Ce],Math.max(a+m,a*2));nt(Ct,M);const Dt=(kt,it,Yt)=\u003e{it!==Yt\u0026\u0026(gt.push({center:kt,diameter:A,holeDiameter:c,fromLayer:it,toLayer:Yt,spanLayers:Mx({fromLayer:it,toLayer:Yt,layerNames:s,allowBlindAndBuriedVias:f})}),tt.push({route_type:\"via\",x:kt.x,y:kt.y,from_layer:it,to_layer:Yt,via_diameter:A,via_hole_diameter:c}),tt.push({route_type:\"wire\",x:kt.x,y:kt.y,width:a,layer:Yt}))};Dt(Ce,M,k),nt([Ce,ke],k),Dt(ke,k,M),nt([ke,Le],M)}else{const Ct=_?[Y]:B?bPe([Y,...oe?[ie]:[],le,Re,...h0(n.direction)!==h0(S)?[Ee]:[],ke,Le],Math.max(a+m,a*2)):oe?bPe([Y,ie,le,Le],Math.max(a+m,a*2)):[Y,le,Le];nt(Ct,M)}const bt=qN({connectionName:e.connection.name,sourcePointIndex:e.sourcePointIndex});return{busId:n.busId,connectionName:e.connection.name,connectionIndex:e.connectionIndex,sourcePointIndex:e.sourcePointIndex,sourcePoint:e.sourcePoint,sourceObstacle:e.sourceObstacle,sourceLayer:e.sourceLayer,targetPoint:e.targetPoint,targetLayer:o,termination:n.termination,direction:n.direction,...n.exitEdge?{exitEdge:n.exitEdge}:{},...B?{cornerBandSide:B}:{},exitPoint:Le,trace:{type:\"pcb_trace\",pcb_trace_id:bt.traceId,connection_name:e.connection.name,connectsTo:[...e.sourcePoint.pointId?[e.sourcePoint.pointId]:[],...e.sourcePoint.pcb_port_id?[e.sourcePoint.pcb_port_id]:[],bt.boundaryExitPointId],route:tt},segments:Ye,...At\u003e1?{sourceEscapeSegmentCount:At}:{},via:at,...gt.length\u003e0?{additionalVias:gt}:{},length:Ye.reduce((Ct,Dt)=\u003eCt+tn(Dt.start,Dt.end),0)}}function SPe(t){const e=\"layer\"in t?t.layer:t.layers[0];if(!e)throw new Error(\"FanoutSolver: plane endpoint has no copper layer\");return e}function QPe(t){const{preparedConnection:e,bus:n,viaDiameter:o,clearance:i}=t,{sourcePoint:r,targetPoint:s}=e,a=Math.max(n.pitchX,n.pitchY)*.5;if(tn(r,s)\u003c=1e-6||tn(r,s)\u003ea)return[];const A=(()=\u003e{switch(n.direction){case\"left\":return{x:-1,y:0};case\"right\":return{x:1,y:0};case\"up\":return{x:0,y:1};case\"down\":return{x:0,y:-1}}})(),c=Math.SQRT1_2,l=[A,...[{x:c,y:c},{x:c,y:-c},{x:-c,y:c},{x:-c,y:-c},{x:1,y:0},{x:-1,y:0},{x:0,y:1},{x:0,y:-1}].toSorted((d,p)=\u003ep.x*A.x+p.y*A.y-(d.x*A.x+d.y*A.y))],u=Math.max(o,o/2+i),g=[u,Math.max(u,Math.min(n.pitchX,n.pitchY)*.5),Math.max(u,Math.min(n.pitchX,n.pitchY)*.625),Math.max(u,Math.min(n.pitchX,n.pitchY)*.75)],h=[];for(const d of[r,s])for(const p of g)for(const m of l){const _={x:d.x+m.x*p,y:d.y+m.y*p};tn(_,r)\u003c=1e-6||tn(_,s)\u003c=1e-6||h.some(f=\u003etn(f,_)\u003c=1e-6)||h.push(_)}return h}function vPe(t){const{plan:e,preparedConnection:n,planeLayer:o,viaPoint:i,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:c}=t,l={x:n.targetPoint.x,y:n.targetPoint.y},u=SPe(n.targetPoint),g=Mx({fromLayer:o,toLayer:u,layerNames:r,allowBlindAndBuriedVias:c});if(!g.includes(o))throw new Error(`FanoutSolver: via for \"${n.connection.name}\" does not cross plane ${o}`);const h=[{start:i,end:l,width:s,layer:u}],d={center:i,diameter:a,holeDiameter:A,fromLayer:o,toLayer:u,spanLayers:g},p=qN({connectionName:n.connection.name,sourcePointIndex:n.sourcePointIndex}),m={type:\"pcb_trace\",pcb_trace_id:p.planeEndpointTraceId,connection_name:n.connection.name,connectsTo:[...n.targetPoint.pointId?[n.targetPoint.pointId]:[],...n.targetPoint.pcb_port_id?[n.targetPoint.pcb_port_id]:[],p.planeEndpointPointId],route:[{route_type:\"wire\",...i,width:s,layer:o},{route_type:\"via\",...i,from_layer:o,to_layer:u,via_diameter:a,via_hole_diameter:A},{route_type:\"wire\",...i,width:s,layer:u},{route_type:\"wire\",...l,width:s,layer:u}]};return{...e,planeEndpointTrace:m,planeEndpointSegments:h,planeEndpointVia:d,length:e.length+h.reduce((_,f)=\u003e_+tn(f.start,f.end),0)}}function Ybo(t){const{segment:e,plan:n,segmentIndex:o,srj:i,allowSameNetMerges:r,obstacles:s,clearance:a}=t;for(const A of s)if(A.layers.includes(e.layer)\u0026\u0026!A.connectedTo.includes(n.connectionName)\u0026\u0026!(r\u0026\u0026n4(i,A,n.connectionName))\u0026\u0026!jj({inputSrj:i,segment:e,bodyObstacle:A,connectionName:n.connectionName})\u0026\u0026!(o\u003e=0\u0026\u0026o\u003c(n.sourceEscapeSegmentCount??1)\u0026\u0026A===n.sourceObstacle\u0026\u0026e.layer===n.sourceLayer)\u0026\u0026Tl(e,A)\u003ce.width/2+a-1e-9)return!1;return!0}function kb(t){return t.planeEndpointSegments?.length?[...t.segments,...t.planeEndpointSegments]:t.segments}function EO(t){return[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(e=\u003e!!e)}function Ubo(t,e){return tn(e.center,t.sourcePoint)\u003c=1e-9\u0026\u0026z0e({center:e.center,diameter:e.diameter,obstacle:t.sourceObstacle})}function wPe(t){const{plan:e,srj:n,sharedBoundary:o,clearance:i,allowBlindAndBuriedVias:r,allowSameNetMerges:s}=t,a=Lbo(n.bounds,o);if(!EPe(e.exitPoint,a)||kb(e).some(l=\u003e!EPe(l.start,a)||!EPe(l.end,a)))return!1;const A=kb(e);let c;if(t.segmentCache){let l=t.segmentCache.byConnection.get(e.connectionName);l||(l=new WeakMap,t.segmentCache.byConnection.set(e.connectionName,l)),c=l.get(e.sourceObstacle),c||(c=[new WeakMap,new WeakMap],l.set(e.sourceObstacle,c))}for(let l=0;l\u003cA.length;l++){const u=A[l],g=l\u003ce.segments.length?l:-1,h=g\u003e=0\u0026\u0026g\u003c(e.sourceEscapeSegmentCount??1)\u0026\u0026u.layer===e.sourceLayer,d=c?.[h?1:0];let p=d?.get(u);if(p===void 0\u0026\u0026(p=Ybo({segment:u,plan:e,segmentIndex:g,srj:n,allowSameNetMerges:s,obstacles:t.segmentCache?t.segmentCache.obstaclesByLayer.get(u.layer)??[]:n.obstacles,clearance:i}),d?.set(u,p)),!p)return!1}for(const l of EO(e))for(const u of n.obstacles)if(!(CPe(n)\u0026\u0026u===e.sourceObstacle\u0026\u0026Ubo(e,l))\u0026\u0026u.layers.some(g=\u003el.spanLayers.includes(g))\u0026\u0026!(s\u0026\u0026n4(n,u,e.connectionName))\u0026\u0026wx(l.center,u)\u003cl.diameter/2+i-1e-9)return!1;for(const l of Z7(n,r))if(!(e.connectionName===l.connectionName||s\u0026\u0026Px(n,e.connectionName,l.connectionName))){for(const u of kb(e)){for(const g of l.segments)if(!Zm(u,g,i))return!1;for(const g of l.vias)if(g.spanLayers.includes(u.layer)\u0026\u0026Cr(g.center,u.start,u.end)\u003cg.diameter/2+u.width/2+i-1e-9)return!1}for(const u of EO(e)){for(const g of l.segments)if(u.spanLayers.includes(g.layer)\u0026\u0026Cr(u.center,g.start,g.end)\u003cu.diameter/2+g.width/2+i-1e-9)return!1;for(const g of l.vias)if(u.spanLayers.some(h=\u003eg.spanLayers.includes(h))\u0026\u0026tn(u.center,g.center)\u003c(u.diameter+g.diameter)/2+i-1e-9)return!1}}return!0}function q0e(t){const{plan:e,otherPlans:n,srj:o,allowSameNetMerges:i,clearance:r,blockingBusCounts:s,segmentIndexes:a}=t,A=kb(e),c=EO(e);for(const l of n){if(i\u0026\u0026Px(o,e.connectionName,l.connectionName)||e.sourcePoint.pcb_port_id\u0026\u0026e.sourcePoint.pcb_port_id===l.sourcePoint.pcb_port_id||e.sourcePoint.pointId\u0026\u0026e.sourcePoint.pointId===l.sourcePoint.pointId)continue;const g=()=\u003e{l.busId!==e.busId\u0026\u0026s?.set(l.busId,(s.get(l.busId)??0)+1)},h=kb(l),d=EO(l);let p=a?.get(l);a\u0026\u0026!p\u0026\u0026(p=new qj(h),a.set(l,p));for(const m of A){for(const _ of p?.querySegment(m,r)??h)if(!Zm(m,_,r))return g(),!1;for(const _ of d)if(_.spanLayers.includes(m.layer)\u0026\u0026Cr(_.center,m.start,m.end)\u003c_.diameter/2+m.width/2+r-1e-9)return g(),!1}for(const m of c){for(const _ of p?.queryVia(m,r)??h)if(m.spanLayers.includes(_.layer)\u0026\u0026Cr(m.center,_.start,_.end)\u003cm.diameter/2+_.width/2+r-1e-9)return g(),!1;for(const _ of d)if(m.spanLayers.some(f=\u003e_.spanLayers.includes(f))\u0026\u0026tn(m.center,_.center)\u003c(m.diameter+_.diameter)/2+r-1e-9)return g(),!1}}return!0}function hNt(t){const{plans:e,srj:n,clearance:o,allowSameNetMerges:i=!1}=t;return e.every((r,s)=\u003eq0e({plan:r,otherPlans:e.filter((a,A)=\u003eA!==s),srj:n,allowSameNetMerges:i,clearance:o}))}function X0e(t){const{plan:e,otherPlans:n,staticClearanceCache:o,blockingBusCounts:i,cacheKey:r,srj:s,sharedBoundary:a,clearance:A,allowBlindAndBuriedVias:c,allowSameNetMerges:l}=t;let u=o?.get(r);return u===void 0\u0026\u0026(u=wPe({plan:e,srj:s,sharedBoundary:a,clearance:A,allowBlindAndBuriedVias:c,allowSameNetMerges:l}),o?.set(r,u)),u\u0026\u0026q0e({plan:e,otherPlans:n,srj:s,allowSameNetMerges:l,clearance:A,blockingBusCounts:i})}function Wh(t){const{plans:e,srj:n,sharedBoundary:o,clearance:i,allowBlindAndBuriedVias:r=!0,allowSameNetMerges:s=!1,allowSameNetPlaneMerges:a=!1}=t;for(let A=0;A\u003ce.length;A++){const c=e[A];if(!wPe({plan:c,srj:n,sharedBoundary:o,clearance:i,allowBlindAndBuriedVias:r,allowSameNetMerges:s||a\u0026\u0026c.termination.type===\"plane\"}))return!1;const l=e.filter((u,g)=\u003eg!==A\u0026\u0026!(a\u0026\u0026c.termination.type===\"plane\"\u0026\u0026u.termination.type===\"plane\"\u0026\u0026Px(n,c.connectionName,u.connectionName)));if(!q0e({plan:c,otherPlans:l,srj:n,allowSameNetMerges:s,clearance:i}))return!1}return!0}function Z0e(t){const{srj:e,sharedBoundary:n,clearance:o,allowBlindAndBuriedVias:i=!0,allowSameNetMerges:r=!1,allowSameNetPlaneMerges:s=!1}=t,a={obstaclesByLayer:new Map,byConnection:new Map};for(const m of e.obstacles)for(const _ of m.layers){const f=a.obstaclesByLayer.get(_)??[];f.push(m),a.obstaclesByLayer.set(_,f)}const A=s\u0026\u0026!r?{obstaclesByLayer:a.obstaclesByLayer,byConnection:new Map}:a,c=new WeakMap,l=new WeakMap,u=new WeakMap;let g=new Set;const h=m=\u003e{let _=l.get(m);return _===void 0\u0026\u0026(_=wPe({segmentCache:m.termination.type===\"plane\"?A:a,plan:m,srj:e,sharedBoundary:n,clearance:o,allowBlindAndBuriedVias:i,allowSameNetMerges:r||s\u0026\u0026m.termination.type===\"plane\"}),l.set(m,_)),_},d=(m,_)=\u003e{let f=u.get(m);f||(f=new WeakMap,u.set(m,f));let I=f.get(_);if(I===void 0){const C=kb(m).length\u003ekb(_).length;I=q0e({plan:C?_:m,otherPlans:[C?m:_],segmentIndexes:c,srj:e,clearance:o,allowSameNetMerges:r||s\u0026\u0026m.termination.type===\"plane\"\u0026\u0026_.termination.type===\"plane\"}),f.set(_,I);let y=u.get(_);y||(y=new WeakMap,u.set(_,y)),y.set(m,I)}return I};return Object.assign(m=\u003e{const _=new Set(m);if(_.size===m.length){const f=m.filter(I=\u003e!g.has(I));for(const I of m){const C=g.has(I);if(!C\u0026\u0026!h(I))return!1;for(const y of C?f:m)if(I!==y\u0026\u0026!d(I,y))return!1}}else for(const[f,I]of m.entries()){if(!h(I))return!1;for(const[C,y]of m.entries())if(C!==f\u0026\u0026!d(I,y))return!1}return g=_,!0},{mutuallyClear:m=\u003em.every((_,f)=\u003em.every((I,C)=\u003eC===f?!0:d(_,I)))})}function pNt(t){const{srj:e,bus:n,targetLayer:o,acceptedPlans:i,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,clearance:c,staticClearanceCache:l,blockingBusCounts:u,allowBlindAndBuriedVias:g=!0,allowSameNetMerges:h=!1,fixedViaPointsByConnectionIndex:d,planeCandidateSkipCount:p=0}=t,m=n.connections[0]?.sourceObstacle;if(!m||n.termination.type!==\"plane\")return null;const _=n.connections[0].sourceLayer;if(o===_)return null;let f=p;const I=(x,E)=\u003e{for(const[B,S]of x.entries())if(E(S,B)){if(f\u003e0){f--;continue}if(!(t.collectAlternative\u0026\u0026!t.collectAlternative(S)))return S}};if(d){const x=[];for(const E of n.connections){const B=d.get(E.connectionIndex);if(!B)return null;const S={x:E.sourcePoint.x,y:E.sourcePoint.y},Q=$0e({preparedConnection:E,bus:n,targetLayer:o,track:Xu(S,n.direction),exitAxis:n6(n),layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,viaHandedness:0,interstitialEscape:!1,spreadLaneIndex:0,cornerExitLaneOffset:0,cornerLocalChannelLaneOffset:0,cornerBoundaryChannelLaneOffset:0,clearance:c,terminateAtVia:!0,allowBlindAndBuriedVias:g,initialViaPoint:B,sourceEscapePath:t.sourceEscapePaths?.get(E.connectionIndex)?[...t.sourceEscapePaths.get(E.connectionIndex)]:[S,B]}),M=[...QPe({preparedConnection:E,bus:n,viaDiameter:a,clearance:c}).map(R=\u003evPe({plan:Q,preparedConnection:E,planeLayer:o,viaPoint:R,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:g})),Q],k=I(M,(R,F)=\u003eX0e({plan:R,otherPlans:[...i,...x],staticClearanceCache:l,blockingBusCounts:u,cacheKey:`plane-fixed:${n.busId}:${o}:${E.connectionIndex}:${B.x}:${B.y}:${F}`,srj:e,sharedBoundary:n.sharedBoundary,clearance:c,allowBlindAndBuriedVias:g,allowSameNetMerges:h}));if(!k)return null;x.push(k)}return x}if(CPe(e)\u0026\u0026n.connections.length===1\u0026\u0026z0e({center:n.connections[0].sourcePoint,diameter:a,obstacle:m})){const x=n.connections[0],E=$0e({preparedConnection:x,bus:n,targetLayer:o,track:Xu(x.sourcePoint,n.direction),exitAxis:n6(n),layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,viaHandedness:0,interstitialEscape:!1,spreadLaneIndex:0,cornerExitLaneOffset:0,cornerLocalChannelLaneOffset:0,cornerBoundaryChannelLaneOffset:0,clearance:c,terminateAtVia:!0,allowBlindAndBuriedVias:g,initialViaPoint:x.sourcePoint}),S=[...QPe({preparedConnection:x,bus:n,viaDiameter:a,clearance:c}).map(w=\u003evPe({plan:E,preparedConnection:x,planeLayer:o,viaPoint:w,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:g})),E],Q=I(S,(w,M)=\u003eX0e({plan:w,otherPlans:i,staticClearanceCache:l,blockingBusCounts:u,cacheKey:`plane-via-in-pad:${n.busId}:${o}:${M}`,srj:e,sharedBoundary:n.sharedBoundary,clearance:c,allowBlindAndBuriedVias:g,allowSameNetMerges:h}));if(Q)return[Q]}const C=[n.direction,...[\"left\",\"right\",\"up\",\"down\"].filter(x=\u003ex!==n.direction)],y=[...C.map(x=\u003e({direction:x,centeredOutward:!1})),...C.map(x=\u003e({direction:x,centeredOutward:!0}))];for(const{direction:x,centeredOutward:E}of y){const B=x===n.direction?n:{...n,direction:x},S=h0(x)?m.width:m.height,Q=xO(B)/2-S/2\u003e=a/2+c-1e-9,w=E?!Q\u0026\u0026xPe(B)?[0]:[]:Q?[0]:[1,-1];for(const M of w)for(const k of gNt(B)){const R=[];let F=!0;for(const O of k){const U=Xu(O.sourcePoint,x),Y=j0e({preparedConnection:O,bus:B,targetLayer:o,traceWidth:s,viaDiameter:a,clearance:c,viaHandedness:M}),W=xO(B),te=t6(x),j=n6(B,x),J=te*(j-aE(Y,x))-(a/2+c),oe=Math.max(0,Math.floor(J/W)),ie={x:O.sourcePoint.x,y:O.sourcePoint.y},ne=aE(Y,x),le=Xu(Y,x),ge=cNt(B),_e=[],ue=128;for(let pe=0;pe\u003c=oe\u0026\u0026_e.length\u003cue;pe++){const ye=n1(ne+te*pe*W,le,x);if(pe===0)_e.push([ie,Y]);else{for(const Me of uNt(ie,ye))if(_e.push(Me),_e.length\u003e=ue)break;_e.length\u003cue\u0026\u0026_e.push([ie,Y,ye])}for(let Me=1;Me\u003c=Math.min(3,pe-1)\u0026\u0026_e.length\u003cue;Me++){const ve=pe-Me;if(!(ve\u003c1||ve\u003eoe))for(const he of[-1,1]){const Qe=le+he*Me*ge,Pe=n1(ne,Qe,x),we=n1(ne+te*ve*W,le,x),Te=n1(ne+te*ve*W,Qe,x),Re=Math.min(W,ge)*.2;for(const Ee of uNt(ie,Te))if(_e.push(Ee),_e.length\u003e=ue)break;if(_e.length\u003e=ue||(_e.push(lNt([ie,Y,Pe,Te],Re),lNt([ie,Y,we,Te],Re)),_e.length\u003e=ue))break}}}let fe;for(const[pe,ye]of _e.entries()){const Me=$0e({preparedConnection:O,bus:B,targetLayer:o,track:U,exitAxis:n6(B),layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,viaHandedness:M,interstitialEscape:!Q,spreadLaneIndex:0,cornerExitLaneOffset:0,cornerLocalChannelLaneOffset:0,cornerBoundaryChannelLaneOffset:0,clearance:c,terminateAtVia:!0,allowBlindAndBuriedVias:g,sourceEscapePath:ye}),he=[...QPe({preparedConnection:O,bus:B,viaDiameter:a,clearance:c}).map(Qe=\u003evPe({plan:Me,preparedConnection:O,planeLayer:o,viaPoint:Qe,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:g})),Me];if(fe=I(he,(Qe,Pe)=\u003eX0e({plan:Qe,otherPlans:[...i,...R],staticClearanceCache:l,blockingBusCounts:u,cacheKey:`plane:${n.busId}:${o}:${x}:${O.connectionIndex}:${M}:${pe}:${Pe}`,srj:e,sharedBoundary:n.sharedBoundary,clearance:c,allowBlindAndBuriedVias:g,allowSameNetMerges:h})),fe)break}if(!fe){F=!1;break}R.push(fe)}if(F)return R}}return null}function*eue(t,e=1,n=!1){const{srj:o,bus:i,targetLayer:r,acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,compactBusTracks:g,staticClearanceCache:h,blockingBusCounts:d,allowBlindAndBuriedVias:p=!0,allowSameNetMerges:m=!1,rejectedViaMinimalCandidates:_,stopAfterFirstRejectedViaMinimalCandidate:f=!1,fixedViaPointsByConnectionIndex:I,fixedBoundaryTracksByConnectionIndex:C,reservedVias:y=[],softReservedVias:x=[],viaMinimalOnly:E=!1,allowBoundarySideViaFallback:B=!1,preferCornerBoundaryVia:S=!1,adaptiveWindingRouteOrder:Q=!1,alignWindingGridToPads:w=!1,fixedViaFallbackRouteOrderAttempts:M=24,allowFixedViaReservedExitFallback:k=!1,cornerBandTargetTrackOffset:R,cornerExitLaneOffset:F,forbidEarlyExitBoundaryContact:O=!1}=t;if(!Number.isInteger(e)||e\u003c1)throw new Error(`FanoutSolver: maxAlternatives must be a positive integer, received ${e}`);if(F!==void 0\u0026\u0026(!Number.isSafeInteger(F)||F\u003c0))throw new Error(`FanoutSolver: cornerExitLaneOffset must be a non-negative safe integer, received ${F}`);if(I\u0026\u0026i.connections.some(ye=\u003e!I.has(ye.connectionIndex)))return[];if(i.termination.type===\"plane\"){const ye=[];if(i.connections.length===1\u0026\u0026e\u003e1)return pNt({...t,planeCandidateSkipCount:0,collectAlternative:Me=\u003e(ye.push([Me]),ye.length\u003e=e)}),ye;for(let Me=0;Me\u003ce;Me++){const ve=pNt({...t,planeCandidateSkipCount:Me});if(!ve)break;ye.push(ve)}return ye}if(C){if(!i.exitEdge)throw new Error(\"FanoutSolver: fixed boundary tracks require an exit edge\");const ye=i.exitEdge===\"left\"||i.exitEdge===\"right\",Me=ye?i.sharedBoundary.minY:i.sharedBoundary.minX,ve=ye?i.sharedBoundary.maxY:i.sharedBoundary.maxX;for(const he of i.connections){const Qe=C.get(he.connectionIndex);if(Qe===void 0||!Number.isFinite(Qe)||Qe\u003cMe-1e-9||Qe\u003eve+1e-9)throw new Error(`FanoutSolver: invalid fixed boundary track for ${he.connection.name}`)}}const U=n6(i),Y=i.connections[0]?.sourceObstacle;if(!Y)return[[]];const W=h0(i.direction)?Y.width:Y.height,te=i.connections[0].sourceLayer,j=r!==te,J=xPe(i),oe=xO(i)/2-W/2\u003e=c/2+u-1e-9,ie=j\u0026\u0026!J\u0026\u0026!oe,ne=j?oe||J?[0]:p?[1,-1]:[-1,1]:[0],le=(()=\u003e{if(p||ne.length!==2||!ne.includes(-1)||!ne.includes(1))return ne;const ye=i.connections.reduce((ve,he)=\u003eve+Xu(he.sourcePoint,i.direction),0)/i.connections.length,Me=i.connections.reduce((ve,he)=\u003eve+Xu(he.exitTargetPoint??he.targetPoint,i.direction),0)/i.connections.length;return Me\u003eye+1e-9?[-1,1]:Me\u003cye-1e-9?[1,-1]:ne})(),ge=[],_e=new Set,ue=ANt(i,s);F!==void 0\u0026\u0026(ue.exit=F);const fe=ye=\u003e{if(C\u0026\u0026ye.some(ve=\u003e{const he=C.get(ve.connectionIndex),Qe=i.exitEdge===\"left\"||i.exitEdge===\"right\"?ve.exitPoint.y:ve.exitPoint.x;return Math.abs(Qe-he)\u003e1e-9}))return;const Me=ye.map(ve=\u003e`${ve.connectionIndex}:${ve.targetLayer}:${ve.exitPoint.x}:${ve.exitPoint.y}:${ve.segments.map(he=\u003e`${he.start.x},${he.start.y},${he.end.x},${he.end.y},${he.layer}`).join(\";\")}`).join(\"|\");_e.has(Me)||(_e.add(Me),ge.push(ye))};if(!yO(i)\u0026\u0026i.exitEdge\u0026\u0026i.connections.length===1\u0026\u0026a.includes(r)\u0026\u0026(i.allowedLayers===void 0||i.allowedLayers.includes(r))\u0026\u0026(i.routableEscapeLayers===void 0||i.routableEscapeLayers.includes(r))\u0026\u0026i.connections[0].sourceLayer!==r\u0026\u0026I\u0026\u0026t.sourceEscapePaths?.has(i.connections[0].connectionIndex)){const ye=i.connections[0],Me=e6(i.exitEdge),ve=BC({srj:o,bus:i,targetLayer:r,terminals:[{connection:ye,viaPoint:I.get(ye.connectionIndex),exitPoint:n1(n6(i,Me),tR({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:ye,boundaryDirection:Me}),Me)}],acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:3,reservedVias:y,softReservedVias:x,gridStepDivisor:2,gridStep:t.windingGridStep,alignGridToPads:w,sourceEscapePaths:t.sourceEscapePaths,heuristicWeight:t.windingHeuristicWeight,forbidEarlyExitBoundaryContact:O},e,n);let he=ve.next();for(;!he.done;)yield{phase:\"via-minimal-winding\",busId:i.busId,targetLayer:r,winding:he.value},he=ve.next();for(const Qe of he.value)if(Wh({plans:[...s,...Qe],srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})\u0026\u0026(fe(Qe),ge.length\u003e=e))return ge}if(yO(i)\u0026\u0026i.exitEdge){const ye=e6(i.exitEdge),Me=n6(i,ye),ve=r4(i),he=CPe(o)\u0026\u0026i.connections.every(be=\u003ez0e({center:be.sourcePoint,diameter:c,obstacle:be.sourceObstacle})),Qe=24,Pe=!!(ve||yPe({bus:i,boundaryDirection:ye,traceWidth:A,clearance:u})),we=sNt({bus:i,boundaryDirection:ye,layerNames:a,targetLayer:r}),Te=we.orders.length,Re=Pe?we.ordinaryOrderCount:1,Ee=le.map(be=\u003e({label:`uniform-${be}`,useViaInPad:!1,getViaHandedness:()=\u003ebe,maximumRouteOrderAttempts:p?void 0:Qe})),ke=i.connections.toSorted((be,et)=\u003eXu(be.sourcePoint,i.direction)-Xu(et.sourcePoint,i.direction)||aE(be.sourcePoint,i.direction)-aE(et.sourcePoint,i.direction)||be.connectionIndex-et.connectionIndex),Ce=new Map(ke.map((be,et)=\u003e[be.connectionIndex,et])),Le=be=\u003ebe\u003cke.length/2?1:-1,Ye=Math.floor(ke.length/2),tt=[0,1,Ye,Ye+1,...ke.map((be,et)=\u003eet)].filter((be,et,It)=\u003ebe\u003e=0\u0026\u0026be\u003cke.length\u0026\u0026It.indexOf(be)===et),At=[[Ye],[Ye+1],[0],[1],[0,Ye+1],[1,Ye],[0,Ye],[1,Ye+1],[0,1],[Ye,Ye+1],...tt.map(be=\u003e[be])].map(be=\u003ebe.filter(et=\u003eet\u003e=0\u0026\u0026et\u003cke.length).toSorted((et,It)=\u003eet-It)).filter((be,et,It)=\u003ebe.length\u003e0\u0026\u0026It.findIndex(Bt=\u003eBt.join(\",\")===be.join(\",\"))===et),at=!p\u0026\u0026(y.length\u003e0||s.some(be=\u003ebe.termination.type===\"plane\"))\u0026\u0026le.includes(-1)\u0026\u0026le.includes(1)?[{label:\"toward-source-median\",useViaInPad:!1,maximumRouteOrderAttempts:Qe,getViaHandedness:be=\u003eLe(Ce.get(be.connectionIndex)??0)},...At.slice(0,12).map(be=\u003e({label:`toward-source-median-with-ranks-${be.join(\"-\")}-flipped`,useViaInPad:!1,maximumRouteOrderAttempts:6,getViaHandedness:et=\u003e{const It=Ce.get(et.connectionIndex)??0,Bt=Le(It);return be.includes(It)?-Bt:Bt}})),{label:\"alternating-source-grid-a\",useViaInPad:!1,maximumRouteOrderAttempts:3,getViaHandedness:be=\u003e(Ce.get(be.connectionIndex)??0)%2===0?-1:1},{label:\"alternating-source-grid-b\",useViaInPad:!1,maximumRouteOrderAttempts:3,getViaHandedness:be=\u003e(Ce.get(be.connectionIndex)??0)%2===0?1:-1},{label:\"away-from-source-median\",useViaInPad:!1,maximumRouteOrderAttempts:Qe,getViaHandedness:be=\u003e(Ce.get(be.connectionIndex)??0)\u003cke.length/2?-1:1}]:[],nt={label:\"via-in-pad\",useViaInPad:!0,getViaHandedness:()=\u003e0},gt=I??(!p\u0026\u0026(i.connections.length\u003e=8||yPe({bus:i,boundaryDirection:ye,traceWidth:A,clearance:u}))\u0026\u0026y.length===0?pd([i],{viaDiameter:c,viaHoleDiameter:l,traceWidth:A,clearance:u,additionalObstacles:o.obstacles,blockingSegments:s.flatMap(be=\u003ekb(be).map(et=\u003e({connectionIndex:be.connectionIndex,segment:et}))),blockingVias:s.flatMap(be=\u003eEO(be).map(et=\u003e({connectionIndex:be.connectionIndex,...et.center,center:et.center,diameter:et.diameter,spanLayers:et.spanLayers})))}):null),bt=gt?[...Array.from({length:Re},(be,et)=\u003e({label:`component-matched-vias-winding-${et}`,useViaInPad:!1,getViaHandedness:()=\u003e0,getViaPoint:It=\u003egt.get(It.connectionIndex),maximumRouteOrderAttempts:1,windingOrderIndex:et,preferTargetDirectedLaneBias:!0})),{label:\"component-matched-vias-fallback\",useViaInPad:!1,getViaHandedness:()=\u003e0,getViaPoint:be=\u003egt.get(be.connectionIndex),maximumRouteOrderAttempts:M,windingOrderIndex:0,preferTargetDirectedLaneBias:!0},...!r4(i)\u0026\u0026Te\u003e1?Array.from({length:Te},(be,et)=\u003e[!0,!1].map(It=\u003e({label:`expanded-winding-${et}-${It}`,useViaInPad:!1,getViaHandedness:()=\u003e0,getViaPoint:Bt=\u003egt.get(Bt.connectionIndex),maximumRouteOrderAttempts:1,windingOrderIndex:et,preferTargetDirectedLaneBias:It,reserveTerminalExitPoints:!It,allowLayerInterleaving:!0}))).flat():[],...k\u0026\u0026I\u0026\u0026!r4(i)\u0026\u0026Te===1\u0026\u0026i.connections.length\u003e2?[!0,!1].map(be=\u003e({label:`fixed-vias-reserved-exits-${be}`,useViaInPad:!1,getViaHandedness:()=\u003e0,getViaPoint:et=\u003egt.get(et.connectionIndex),maximumRouteOrderAttempts:Math.min(Qe,M),windingOrderIndex:0,preferTargetDirectedLaneBias:be,reserveTerminalExitPoints:!0})):[]]:[],Ct=s.some(be=\u003ebe.termination.type===\"plane\"),kt=s.some(be=\u003ebe.termination.type===\"boundary\")\u0026\u0026!p?[...at,...Ee]:[...Ee,...at],it=he?Ct?[nt,...kt]:[...kt,nt]:kt,Yt=I?bt:[...bt,...it];if(!I\u0026\u0026!p\u0026\u0026i.connections.length\u003e1\u0026\u0026i.connections.every(be=\u003ebe.sourceLayer!==r)\u0026\u0026le.includes(-1)\u0026\u0026le.includes(1)){const be=cbo(i.connections,i.direction);for(const et of le)for(const It of be)Yt.push({label:`local-dogbone-repair-${et}-${It.join(\"-\")}`,useViaInPad:!1,getViaHandedness:()=\u003eet,maximumRouteOrderAttempts:6,localDogboneRepair:!0,getViaPoint:Bt=\u003e{const mt=j0e({preparedConnection:Bt,bus:i,targetLayer:r,traceWidth:A,viaDiameter:c,clearance:u,viaHandedness:et});return It.includes(Bt.connectionIndex)?i.direction===\"up\"||i.direction===\"down\"?{x:mt.x,y:2*Bt.sourcePoint.y-mt.y}:{x:2*Bt.sourcePoint.x-mt.x,y:mt.y}:mt}})}if(w\u0026\u0026ve\u0026\u0026F===void 0){const be=ANt(i,s.filter(et=\u003eet.targetLayer===r)).exit;be!==ue.exit\u0026\u0026Yt.push(...Yt.map(et=\u003e({...et,label:`${et.label}-layer-local-corner`,cornerExitLaneOffset:be})))}const pn=new Set;for(const be of Yt){const et=i.connections.map(Ze=\u003e{const dt=be.getViaHandedness(Ze),Ut=ve?BB({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:Ze,cornerExitLaneOffset:be.cornerExitLaneOffset??ue.exit,traceWidth:A,viaDiameter:c,clearance:u,layerNames:a,targetLayer:r,windingOrderIndex:be.windingOrderIndex,cornerBandTargetTrackOffset:R}):tR({fixedBoundaryTracksByConnectionIndex:C,allowLayerInterleaving:be.allowLayerInterleaving,bus:i,connection:Ze,boundaryDirection:ye,traceWidth:A,clearance:u,layerNames:a,targetLayer:r,windingOrderIndex:be.windingOrderIndex});return{connection:Ze,viaPoint:be.getViaPoint?be.getViaPoint(Ze):be.useViaInPad?{x:Ze.sourcePoint.x,y:Ze.sourcePoint.y}:j0e({preparedConnection:Ze,bus:i,targetLayer:r,traceWidth:A,viaDiameter:c,clearance:u,viaHandedness:dt}),exitPoint:n1(Me,Ut,ye)}}),It=w||!!(be.getViaPoint\u0026\u0026!I);if(be.localDogboneRepair\u0026\u0026!pd([i],{viaDiameter:c,viaHoleDiameter:l,traceWidth:A,clearance:u,additionalObstacles:o.obstacles,fixedViaPointsByConnectionIndex:new Map(et.map(Ze=\u003e[Ze.connection.connectionIndex,Ze.viaPoint])),blockingSegments:s.flatMap(Ze=\u003ekb(Ze).map(dt=\u003e({connectionIndex:Ze.connectionIndex,segment:dt}))),blockingVias:[...s.flatMap(Ze=\u003eEO(Ze).map(dt=\u003e({connectionIndex:Ze.connectionIndex,center:dt.center,diameter:dt.diameter,spanLayers:dt.spanLayers}))),...y.map(({via:Ze})=\u003e({connectionIndex:-1,...Ze}))]}))continue;const Bt=be.getViaPoint\u0026\u0026Math.min(i.pitchX,i.pitchY)-2*(c/2+A/2+u)\u003cA+u?2:1,mt=`${et.map(Ze=\u003e`${Ze.connection.connectionIndex}:${Ze.viaPoint.x}:${Ze.viaPoint.y}:${Ze.exitPoint.x}:${Ze.exitPoint.y}`).join(\"|\")}:${be.maximumRouteOrderAttempts??\"all\"}:${Bt}:${It}:${!!be.localDogboneRepair}:${!!be.preferTargetDirectedLaneBias}:${!!be.reserveTerminalExitPoints}`;if(pn.has(mt))continue;pn.add(mt);const st=BC({heuristicWeight:t.windingHeuristicWeight,srj:o,bus:i,targetLayer:r,terminals:et,acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:be.maximumRouteOrderAttempts,adaptiveRouteOrder:Q,alignGridToPads:It,includeReverseTargetRotation:be.localDogboneRepair,reservedVias:y,softReservedVias:x,reserveTerminalExitPoints:be.reserveTerminalExitPoints,gridStepDivisor:Bt,gridStep:t.windingGridStep,sourceEscapePaths:t.sourceEscapePaths,preferTargetDirectedLaneBias:be.preferTargetDirectedLaneBias,forbidEarlyExitBoundaryContact:O},I\u0026\u0026E?Math.min(2,Math.max(1,e-ge.length)):be.maximumRouteOrderAttempts===void 0?Math.min(2,e-ge.length):2,n);let xt=st.next();for(;!xt.done;)yield{phase:\"via-minimal-winding\",busId:i.busId,targetLayer:r,winding:xt.value},xt=st.next();const Xe=xt.value;for(const Ze of Xe){if(!Wh({plans:[...s,...Ze],srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})){if(Wh({plans:Ze,srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})\u0026\u0026_\u0026\u0026(_.push(Ze),f))return ge;continue}if(fe(Ze),ge.length\u003e=e)return ge}}}if(ge.length===0\u0026\u0026B\u0026\u0026I\u0026\u0026i.connections.length\u003c=2\u0026\u0026i.exitEdge\u0026\u0026i.connections.every(ye=\u003eye.sourceLayer===i.connections[0].sourceLayer\u0026\u0026ye.sourceLayer!==r)){const ye=i.connections[0].sourceLayer,Me=e6(i.exitEdge),ve=n6(i,Me),he=i.connections.map(at=\u003eS\u0026\u0026r4(i)?BB({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:at,cornerExitLaneOffset:ue.exit,traceWidth:A,viaDiameter:c,clearance:u,layerNames:a,targetLayer:r,cornerBandTargetTrackOffset:R}):tR({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:at,boundaryDirection:Me,traceWidth:A,clearance:u,layerNames:a,targetLayer:r})),Qe=he.map(at=\u003en1(ve,at,Me)),Pe={...o,obstacles:o.obstacles.map(at=\u003e{const nt=i.connections.find(gt=\u003eat===gt.sourceObstacle||tn(at.center,gt.sourcePoint)\u003c=1e-7\u0026\u0026at.layers.includes(gt.sourceLayer));return nt?{...at,connectedTo:[...at.connectedTo,nt.connection.name]}:at})},we=Math.max(c/2+u,Math.min(i.pitchX,i.pitchY)/2),Te=S?r4(i):void 0,Re=[1,2,3,4,5].flatMap(at=\u003e{const nt=at*we,gt=he.map(bt=\u003en1(ve-t6(Me)*nt,bt,Me));return Te?[he.map(bt=\u003en1(ve-t6(Me)*nt,bt+(Te===\"maximum\"?nt:-nt),Me)),gt]:[gt]}),Ee={x:i.connections.reduce((at,nt)=\u003eat+nt.sourcePoint.x,0)/i.connections.length,y:i.connections.reduce((at,nt)=\u003eat+nt.sourcePoint.y,0)/i.connections.length},ke=[{x:-1,y:0,distance:Ee.x-Math.min(...i.xCoordinates)},{x:1,y:0,distance:Math.max(...i.xCoordinates)-Ee.x},{x:0,y:-1,distance:Ee.y-Math.min(...i.yCoordinates)},{x:0,y:1,distance:Math.max(...i.yCoordinates)-Ee.y}].toSorted((at,nt)=\u003eat.distance-nt.distance),Ce=i.connections.length===2?ke.flatMap(at=\u003e[3].map(nt=\u003ei.connections.map(gt=\u003e{const bt=I.get(gt.connectionIndex);return{x:bt.x+at.x*nt*i.pitchX,y:bt.y+at.y*nt*i.pitchY}}))):[],Le=i.connections.map(at=\u003eI.get(at.connectionIndex)),Ye=[{distance:Ee.x-i.componentBounds.minX,axis:\"x\",value:i.componentBounds.minX-2*we},{distance:i.componentBounds.maxX-Ee.x,axis:\"x\",value:i.componentBounds.maxX+2*we},{distance:Ee.y-i.componentBounds.minY,axis:\"y\",value:i.componentBounds.minY-2*we},{distance:i.componentBounds.maxY-Ee.y,axis:\"y\",value:i.componentBounds.maxY+2*we}].toSorted((at,nt)=\u003eat.distance-nt.distance).flatMap(({axis:at,value:nt})=\u003e{const gt=at===\"x\"?\"y\":\"x\",bt=Le.reduce((it,Yt)=\u003eit+Yt[gt],0)/Le.length,Ct=Le.map((it,Yt)=\u003e({index:Yt,track:it[gt]})).toSorted((it,Yt)=\u003eit.track-Yt.track||it.index-Yt.index),Dt=c+u,kt=Le.map((it,Yt)=\u003e({...it,[at]:nt,[gt]:Ct.length===2\u0026\u0026Math.abs(Ct[1].track-Ct[0].track)\u003cDt?bt+(Ct.findIndex(pn=\u003epn.index===Yt)-.5)*Dt:it[gt]}));return kt.length===2?[kt,[kt[1],kt[0]]]:[kt]}),tt=i.connections.length===2\u0026\u0026!!r4(i),At=[...(tt?Ye:[]).map(at=\u003e({points:at,boundarySide:!1})),...Ce.map(at=\u003e({points:at,boundarySide:!1})),...Re.map(at=\u003e({points:at,boundarySide:!0})),...(tt?[]:Ye).map(at=\u003e({points:at,boundarySide:!1}))];for(const{points:at,boundarySide:nt}of At){const gt=i.connections.map((be,et)=\u003e({connectionName:be.connection.name,via:{center:at[et],diameter:c,spanLayers:Mx({fromLayer:ye,toLayer:r,layerNames:a,allowBlindAndBuriedVias:p})}}));if(gt.some((be,et)=\u003egt.some((It,Bt)=\u003eet!==Bt\u0026\u0026(tn(be.via.center,It.via.center)\u003cc+u-1e-9||nt\u0026\u0026Cr(be.via.center,It.via.center,Qe[Bt])\u003cc/2+A/2+u-1e-9)))||gt.some(({via:be})=\u003eo.obstacles.some(et=\u003eet.layers.some(It=\u003ebe.spanLayers.includes(It))\u0026\u0026wx(be.center,et)\u003cbe.diameter/2+u-1e-9)))continue;const bt=BC({heuristicWeight:t.windingHeuristicWeight,srj:Pe,bus:i,targetLayer:ye,terminals:i.connections.map((be,et)=\u003e({connection:be,viaPoint:be.sourcePoint,exitPoint:at[et]})),acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:i.connections.length===1?3:6,softReservedVias:x,reservedVias:i.connections.length\u003e1?[...y,...gt]:y,gridStepDivisor:2,allowSourceLayerRouting:!0,alignGridToPads:!0,forbidEarlyExitBoundaryContact:O},1,n);let Ct=bt.next();for(;!Ct.done;)yield{phase:\"via-minimal-winding\",busId:i.busId,targetLayer:ye,winding:Ct.value},Ct=bt.next();const Dt=Ct.value[0];if(!Dt||Dt.length!==i.connections.length)continue;let kt;if(!nt){const be=BC({heuristicWeight:t.windingHeuristicWeight,srj:o,bus:i,targetLayer:r,terminals:i.connections.map((It,Bt)=\u003e({connection:It,viaPoint:at[Bt],exitPoint:Qe[Bt]})),acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:6,reservedVias:y,softReservedVias:x,gridStepDivisor:2,alignGridToPads:!0,forbidEarlyExitBoundaryContact:O},1,n);let et=be.next();for(;!et.done;)yield{phase:\"via-minimal-winding\",busId:i.busId,targetLayer:r,winding:et.value},et=be.next();if(kt=et.value[0],!kt)continue}const it=Dt.map((be,et)=\u003e{const It=at[et],Bt=Qe[et],st=kt?kt[et].segments.filter(Ze=\u003eZe.layer===r):[{start:It,end:Bt,width:A,layer:r}],xt={center:It,diameter:c,holeDiameter:l,fromLayer:ye,toLayer:r,spanLayers:Mx({fromLayer:ye,toLayer:r,layerNames:a,allowBlindAndBuriedVias:p})},Xe=be.trace.route.filter(Ze=\u003eZe.route_type===\"wire\");return{...be,...S||i.connections.length\u003e1||!nt?{sourceEscapeSegmentCount:be.segments.length}:{},targetLayer:r,exitPoint:Bt,via:xt,segments:[...be.segments,...st],length:be.length+st.reduce((Ze,dt)=\u003eZe+tn(dt.start,dt.end),0),trace:{...be.trace,route:[...Xe,{route_type:\"via\",...It,from_layer:ye,to_layer:r,via_diameter:c,via_hole_diameter:l},{route_type:\"wire\",...It,width:A,layer:r},...st.map(Ze=\u003e({route_type:\"wire\",...Ze.end,width:A,layer:r}))]}}}),Yt=Wh({plans:[...s,...it],srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m}),pn=it.every(be=\u003ey.every(et=\u003e{const It=be.via;return et.connectionName===be.connectionName||m\u0026\u0026Px(o,et.connectionName,be.connectionName)?!0:It.spanLayers.some(Bt=\u003eet.via.spanLayers.includes(Bt))\u0026\u0026tn(It.center,et.via.center)\u003c(It.diameter+et.via.diameter)/2+u-1e-9?!1:be.segments.every(Bt=\u003e!et.via.spanLayers.includes(Bt.layer)||Cr(et.via.center,Bt.start,Bt.end)\u003e=et.via.diameter/2+A/2+u-1e-9)}));if(Yt\u0026\u0026pn)return fe(it),ge}}if(E||I||t.sourceEscapePaths||y.length\u003e0)return ge;const pe=(ye,Me,ve,he)=\u003e{if(ge.length\u003e=e)return;if(ve\u003e=ye.length){fe(he);return}const Qe=ye[ve],Pe=e$(i,Qe),Te=[Obo({bus:i,connection:Qe,traceWidth:A}),Gbo({bus:i,connection:Qe,targetUsesVia:j,interstitialEscape:ie,compactBusTracks:g,traceWidth:A,viaDiameter:c,clearance:u})].filter((Re,Ee,ke)=\u003eke.findIndex(Ce=\u003eMath.abs(Ce-Re)\u003c1e-9)===Ee).flatMap(Re=\u003eHbo({bus:i,connection:Qe,preferredTrack:Re,traceWidth:A,clearance:u})).filter((Re,Ee,ke)=\u003eke.findIndex(Ce=\u003eMath.abs(Ce.value-Re.value)\u003c1e-9)===Ee);for(let Re=0;Re\u003cTe.length;Re++){const Ee=Te[Re],ke=$0e({preparedConnection:Qe,bus:i,targetLayer:r,track:Ee.value,exitAxis:U,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,viaHandedness:Me,interstitialEscape:ie,spreadLaneIndex:Math.min(Pe,i.connections.length-Pe-1),cornerExitLaneOffset:ue.exit,cornerLocalChannelLaneOffset:ue.localChannel,cornerBoundaryChannelLaneOffset:ue.boundaryChannel,clearance:u,terminateAtVia:!1,allowBlindAndBuriedVias:p,cornerBandTargetTrackOffset:R,fixedBoundaryTracksByConnectionIndex:C});if(X0e({plan:ke,otherPlans:[...s,...he],staticClearanceCache:h,blockingBusCounts:d,cacheKey:`boundary:${i.busId}:${r}:${Qe.connectionIndex}:${Me}:${Re}:${i.exitEdge??\"legacy\"}:${ue.exit}:${ue.localChannel}:${ue.boundaryChannel}:${R??0}:${C?.get(Qe.connectionIndex)??\"default\"}`,srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})\u0026\u0026(pe(ye,Me,ve+1,[...he,ke]),ge.length\u003e=e||e===1))return}};for(const ye of le)for(const Me of gNt(i))if(pe(Me,ye,0,[]),ge.length\u003e=e)return ge;return ge}function BO(t,e=1){const n=eue(t,e);let o=n.next();for(;!o.done;)o=n.next();return o.value}function nR(t){return BO(t,1)[0]??null}var Fg=1e-7,t$=(t,e,n)=\u003ee===\"left\"?t.x-n.minX:e===\"right\"?n.maxX-t.x:e===\"top\"?n.maxY-t.y:t.y-n.minY;function Kbo(t,e,n,o){const i=t$(t.start,e,n),r=t$(t.end,e,n);if(Math.min(i,r)\u003eo)return null;if(Math.max(i,r)\u003c=o)return t;const s=(o-i)/(r-i),a={x:t.start.x+(t.end.x-t.start.x)*s,y:t.start.y+(t.end.y-t.start.y)*s};return{...t,...i\u003eo?{start:a}:{end:a}}}function PPe(t){let e=t.segments.length-1;for(;e\u003e0\u0026\u0026t.segments[e-1].layer===t.targetLayer;)e--;const n=t.segments.slice(e);return{first:e,points:n.length?[n[0].start,...n.map(o=\u003eo.end)]:[]}}function mNt(t,e,n){const o=[...t.segments.slice(0,e),...n.slice(1).flatMap((r,s)=\u003etn(n[s],r)\u003eFg?[{start:n[s],end:r,layer:t.targetLayer,width:t.segments.at(-1).width}]:[])];let i=t.trace.route.length;for(;i\u003e0;){const r=t.trace.route[i-1];if(r.route_type!==\"wire\"||r.layer!==t.targetLayer)break;i--}return{...t,segments:o,length:o.reduce((r,s)=\u003er+tn(s.start,s.end),0),trace:{...t.trace,route:[...t.trace.route.slice(0,i),...n.map(r=\u003e({route_type:\"wire\",x:r.x,y:r.y,layer:t.targetLayer,width:t.segments.at(-1).width}))]}}}function Vbo(t,e){const n=[...t],o=(i,r)=\u003e{const s=Math.abs(r.x-i.x),a=Math.abs(r.y-i.y);return s\u003cFg||a\u003cFg||Math.abs(s-a)\u003cFg};for(let i=Math.max(1,e);i\u003cn.length-1;i++){const r=n[i-1],s=n[i],a=n[i+1],A=tn(r,s),c=tn(s,a);if(A\u003cFg||c\u003cFg||((s.x-r.x)*(a.x-s.x)+(s.y-r.y)*(a.y-s.y))/(A*c)\u003e=-Fg)continue;if(o(r,a)){n.splice(i,1),i--;continue}const l=[];for(const g of[\"x\",\"y\"]){const h=(r[g]-s[g])/(a[g]-s[g]);h\u003eFg\u0026\u0026h\u003c1-Fg\u0026\u0026l.push({x:s.x+(a.x-s.x)*h,y:s.y+(a.y-s.y)*h});const d=(a[g]-r[g])/(s[g]-r[g]);d\u003eFg\u0026\u0026d\u003c1-Fg\u0026\u0026l.push({x:r.x+(s.x-r.x)*d,y:r.y+(s.y-r.y)*d})}const u=l.find(g=\u003eo(r,g)\u0026\u0026o(g,a));u\u0026\u0026(n[i]=u)}return n}function zbo(t,e){const n=o=\u003e{const i=new Map;for(const r of t)for(const s of PPe(r).points.slice(0,-1)){const a=(s[o]%e+e)%e,A=a\u003c1e-6||e-a\u003c1e-6?0:Math.round(a*1e6)/1e6;i.set(A,(i.get(A)??0)+1)}return[...i].sort((r,s)=\u003es[1]-r[1]||r[0]-s[0])[0]?.[0]??0};return{x:n(\"x\"),y:n(\"y\")}}function Jbo(t,e,n,o){const i=e===\"left\"||e===\"right\"?\"y\":\"x\",r=t.map(A=\u003eA.exitPoint[i]).sort((A,c)=\u003eA-c),s=[],a=(A,c)=\u003eMath.abs(A-c-Math.round((A-c)/o)*o)\u003c=Fg;r.length===1\u0026\u0026!a(r[0],n[i])\u0026\u0026s.push({coordinate:r[0],count:1});for(let A=1;A\u003cr.length;A++)for(const c of[r[A-1],r[A]]){if(a(c,n[i]))continue;const l=s.find(u=\u003ea(u.coordinate,c));l?l.count++:s.push({coordinate:c,count:1})}return[n,...s.sort((A,c)=\u003ec.count-A.count||A.coordinate-c.coordinate).slice(0,3).map(({coordinate:A})=\u003e({...n,[i]:A}))]}function Wbo(t,e,n,o,i){const r=o+i,s=t.map((l,u)=\u003eu),a=l=\u003e{for(;s[l]!==l;)l=s[l];return l},A=(l,u)=\u003e{const g={x:u.x+(n===\"left\"?2*r:n===\"right\"?-2*r:0),y:u.y+(n===\"bottom\"?2*r:n===\"top\"?-2*r:0)};return l.some(h=\u003etu(h.start,h.end,u,g)\u003c(h.width+o)/2+i-Fg)};for(let l=0;l\u003ct.length;l++)for(let u=l+1;u\u003ct.length;u++){if(a(l)===a(u))continue;(tn(t[l].exitPoint,t[u].exitPoint)\u003c=2*r+Fg||A(e[l],t[u].exitPoint)||A(e[u],t[l].exitPoint)||e[l].some(h=\u003ee[u].some(d=\u003etu(h.start,h.end,d.start,d.end)\u003c(h.width+d.width)/2+i-Fg)))\u0026\u0026(s[a(u)]=a(l))}const c=new Map;return t.forEach((l,u)=\u003e{const g=a(u),h=c.get(g)??[];h.push(l),c.set(g,h)}),[...c.values()]}function MPe(t){const{inputSrj:e,preparedBuses:n,reservedPlans:o=[],traceWidth:i,clearance:r}=t,s=i+r,a=t.gridStep??i;if(!(s\u003e0)||!(a\u003e0)||!Number.isFinite(a))throw new Error(\"FanoutSolver: boundary tail repair requires positive finite trace/grid spacing\");const A=new Map(n.flatMap(d=\u003ed.connections.map(p=\u003e[p.connectionIndex,{bus:d,connection:p}]))),c=[...t.plans],l=new Map;for(const d of c){const p=A.get(d.connectionIndex);if(!p)throw new Error(`FanoutSolver: missing prepared boundary-tail connection ${d.connectionIndex}`);if(d.termination.type!==\"boundary\"||!d.exitEdge||Math.abs(t$(d.exitPoint,d.exitEdge,p.bus.sharedBoundary))\u003eFg)continue;const m=`${d.exitEdge}:${d.targetLayer}`,_=l.get(m)??[];_.push(d),l.set(m,_)}const u=[...l.values()];for(let d=0;d\u003cu.length;d++){const p=u[d],m=p[0].exitEdge,_=p[0].targetLayer,f=A.get(p[0].connectionIndex).bus.sharedBoundary,I=Math.min(24*s,(m===\"left\"||m===\"right\"?f.maxX-f.minX:f.maxY-f.minY)/3),C=p.map(w=\u003ew.segments.filter(M=\u003eM.layer===_).flatMap(M=\u003eKbo(M,m,f,I)??[])),y=Wbo(p,C,m,i,r);if(y.length\u003e1){u.splice(d,1,...y),d--;continue}const x=new Set;for(const w of p)PPe(w).points.slice(0,-1).some(M=\u003eMath.abs(t$(M,m,f))\u003c=Fg\u0026\u0026tn(M,w.exitPoint)\u003eFg)\u0026\u0026x.add(w);for(let w=0;w\u003cp.length;w++)for(let M=w+1;M\u003cp.length;M++)C[w].some(k=\u003eC[M].some(R=\u003etu(k.start,k.end,R.start,R.end)\u003c(k.width+R.width)/2+r-Fg))\u0026\u0026(x.add(p[w]),x.add(p[M]));if(!x.size)continue;let E=!0;for(;E;){E=!1;for(const w of p)!x.has(w)\u0026\u0026[...x].some(M=\u003e{if(tn(w.exitPoint,M.exitPoint)\u003c=2*s+Fg)return!0;const k={x:M.exitPoint.x+(m===\"left\"?2*s:m===\"right\"?-2*s:0),y:M.exitPoint.y+(m===\"bottom\"?2*s:m===\"top\"?-2*s:0)};return w.segments.some(R=\u003eR.layer===_\u0026\u0026tu(R.start,R.end,M.exitPoint,k)\u003c(R.width+i)/2+r-Fg)})\u0026\u0026(x.add(w),E=!0)}const B=p.filter(w=\u003ex.has(w));if(B.length\u003e32)return null;const S=Jbo(B,m,t.gridOrigin??zbo(B,a),a);let Q=null;for(const w of S){for(const M of[8,16,24]){const k=Math.min(M*s,I),R=m===\"left\"||m===\"right\"?\"x\":\"y\",F=m===\"left\"||m===\"bottom\"?1:-1,O=m===\"left\"?f.minX:m===\"right\"?f.maxX:m===\"top\"?f.maxY:f.minY,U=O+F*k,Y=w[R]+(F\u003e0?Math.ceil((U-w[R])/a):Math.floor((U-w[R])/a))*a,W=(Y-O)*F,te=B.map(ve=\u003e{const{first:he,points:Qe}=PPe(ve),Pe=Qe.findLastIndex(Ce=\u003et$(Ce,m,f)\u003e=W-Fg);if(Pe\u003c0){const Ce=ve.additionalVias?.at(-1)??ve.via;return!Ce||Ce.toLayer!==ve.targetLayer||!Qe[0]||tn(Ce.center,Qe[0])\u003eFg||he\u003c(ve.sourceEscapeSegmentCount??1)?null:{plan:ve,first:he,prefix:[Qe[0]],point:Qe[0]}}if(Pe\u003e=Qe.length-1)return null;const we=Qe[Pe],Te=Qe[Pe+1],Re=(Y-we[R])/(Te[R]-we[R]);if(!Number.isFinite(Re)||Re\u003c-Fg||Re\u003e1+Fg)return null;const Ee={x:we.x+(Te.x-we.x)*Re,y:we.y+(Te.y-we.y)*Re},ke=[...Qe.slice(0,Pe+1),...tn(we,Ee)\u003eFg?[Ee]:[]];return he+ke.length-1\u003c(ve.sourceEscapeSegmentCount??1)?null:{plan:ve,first:he,prefix:ke,point:Ee}});if(te.some(ve=\u003e!ve))continue;const j=te.filter(ve=\u003eve!==null),J=[...c.filter(ve=\u003e!x.has(ve)),...o],oe=j.map(ve=\u003e({...mNt(ve.plan,ve.first,ve.prefix),exitPoint:ve.point})),ie=[...J,...oe],ne=j.map(ve=\u003e({connection:{...A.get(ve.plan.connectionIndex).connection,sourcePoint:{...ve.point,layer:_},sourceLayer:_},viaPoint:ve.point,exitPoint:ve.plan.exitPoint})),le={...f};m===\"left\"\u0026\u0026(le.maxX=Math.min(f.maxX,Y+3*s)),m===\"right\"\u0026\u0026(le.minX=Math.max(f.minX,Y-3*s)),m===\"bottom\"\u0026\u0026(le.maxY=Math.min(f.maxY,Y+3*s)),m===\"top\"\u0026\u0026(le.minY=Math.max(f.minY,Y-3*s));const ge=R===\"x\"?\"y\":\"x\",_e=ne.flatMap(ve=\u003e[ve.viaPoint[ge],ve.exitPoint[ge]]);ge===\"x\"?(le.minX=Math.max(le.minX,Math.min(..._e)-3*s),le.maxX=Math.min(le.maxX,Math.max(..._e)+3*s)):(le.minY=Math.max(le.minY,Math.min(..._e)-3*s),le.maxY=Math.min(le.maxY,Math.max(..._e)+3*s));const ue={...A.get(B[0].connectionIndex).bus,connections:ne.map(ve=\u003eve.connection),sharedBoundary:le},fe=BC({...t,srj:e,bus:ue,terminals:ne,targetLayer:_,sourceEscapePaths:void 0,acceptedPlans:ie,reservedVias:ie.flatMap(ve=\u003e[ve.via,...ve.additionalVias??[],ve.planeEndpointVia].filter(he=\u003e!!he).map(he=\u003e({connectionName:ve.connectionName,via:he}))),gridStep:a,gridOrigin:w,gridStepDivisor:2,alignGridToPads:!0,heuristicWeight:2,maximumRouteOrderAttempts:72,reserveTerminalExitPoints:!0,adaptiveRouteOrder:!0,allowSourceLayerRouting:!0,forbidEarlyExitBoundaryContact:!0},1,!1);let pe=fe.next();for(;!pe.done;)pe=fe.next();const ye=pe.value[0];if(!ye)continue;const Me=j.map(ve=\u003e{const he=ye.find(Pe=\u003ePe.connectionIndex===ve.plan.connectionIndex);if(!he||he.via||he.additionalVias?.length)throw new Error(\"FanoutSolver: boundary-tail repair added a physical via\");const Qe=Vbo([...ve.prefix,...he.segments.map(Pe=\u003ePe.end)],ve.prefix.length-1);return mNt(ve.plan,ve.first,Qe)});if(Wh({plans:Me,srj:{...e,traces:[...e.traces??[],...J.flatMap(ve=\u003e[ve.trace,...ve.planeEndpointTrace?[ve.planeEndpointTrace]:[]])]},sharedBoundary:f,clearance:r,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges})){Q=Me;break}}if(Q)break}if(!Q)return null;for(const w of Q)c[c.findIndex(M=\u003eM.connectionIndex===w.connectionIndex)]=w}const g=[...c,...o];if(e.traces?.length\u0026\u0026g.length){const d=n.map(m=\u003em.sharedBoundary);if(!Z0e({srj:e,sharedBoundary:{minX:Math.min(...d.map(m=\u003em.minX)),maxX:Math.max(...d.map(m=\u003em.maxX)),minY:Math.min(...d.map(m=\u003em.minY)),maxY:Math.max(...d.map(m=\u003em.maxY))},clearance:r,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges})(g))return null}return qu({inputSrj:e,routedSrj:{...e,traces:[...g.flatMap(d=\u003e[d.trace,...d.planeEndpointTrace?[d.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias}).valid?c:null}var Da=1e-7;function bO(t,e,n,o){const i=new Float64Array(e.length+1),r=new Int32Array(e.length);for(let A=0;A\u003ce.length;A++){const c=e[A],l=e[A-1];i[A+1]=i[A]+tn(c.start,c.end),r[A]=A===0?0:r[A-1]+ +(l.layer!==c.layer||tn(l.end,c.start)\u003eDa)}const s=[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(A=\u003e!!A),a=(A,c)=\u003e{if(r[A]!==r[c])return!1;let l=0,u=0;for(let g=A;g\u003c=c;g++){const h=e[g],d=h.end.x-h.start.x,p=h.end.y-h.start.y;if(Math.abs(d)\u003eDa){const m=Math.sign(d);if(l\u0026\u0026l!==m)return!1;l=m}if(Math.abs(p)\u003eDa){const m=Math.sign(p);if(u\u0026\u0026u!==m)return!1;u=m}}return!0};for(const[A,c]of e.entries())if(!(o\u0026\u0026!o.has(A))\u0026\u0026!(!o\u0026\u0026t.segments.some(l=\u003el.layer===c.layer\u0026\u0026l.width===c.width\u0026\u0026Cr(c.start,l.start,l.end)\u003c=Da\u0026\u0026Cr(c.end,l.start,l.end)\u003c=Da))){for(const[l,u]of e.entries()){if(u.layer!==c.layer)continue;const g=(c.width+u.width)/2+n,h=Math.min(A,l),d=Math.max(A,l);if(!(r[A]===r[l]\u0026\u0026Math.max(0,i[d]-i[h+1])\u003c=g+Da)\u0026\u0026!Zm(c,u,n)\u0026\u0026!a(h,d))return!1}for(const l of s){if(!l.spanLayers.includes(c.layer))continue;const u=(c.width+l.diameter)/2+n;if(Cr(l.center,c.start,c.end)\u003e=u-Da||[c.start,c.end].some(h=\u003etn(h,l.center)\u003c=Da))continue;const g=h=\u003e{let d=h===-1?c.start:c.end;const p=h===-1?c.end:c.start;if(tn(d,l.center)\u003eu+Da||(d.x-l.center.x)*(p.x-d.x)+(d.y-l.center.y)*(p.y-d.y)\u003c-Da)return!1;for(let m=A+h;m\u003e=0\u0026\u0026m\u003ce.length;m+=h){const _=e[m];if(_.layer!==c.layer||tn(d,h===-1?_.end:_.start)\u003eDa)return!1;const f=h===-1?_.start:_.end;if(tn(f,l.center)\u003eu+Da||(f.x-l.center.x)*(f.x-d.x)+(f.y-l.center.y)*(f.y-d.y)\u003eDa)return!1;if(d=f,tn(d,l.center)\u003c=Da)return!0}return!1};if(!g(-1)\u0026\u0026!g(1))return!1}}return!0}function n$(t,e,n,o,i=!1,r=t.traceWidth/4){const{inputSrj:s,layerNames:a,traceWidth:A,clearance:c}=t,l=e.trace.route.findIndex(y=\u003ey.route_type===\"via\");if(l\u003c0)return null;const u=e.trace.route.slice(l+1).flatMap(y=\u003ey.route_type===\"wire\"?[{x:y.x,y:y.y,z:a.indexOf(y.layer)}]:[]);for(let y=1;i\u0026\u0026y\u003cu.length-1;y++){const x=u[y-1],E=u[y],B=u[y+1];if(x.z!==E.z||E.z!==B.z)continue;((E.x-x.x)*(B.x-E.x)+(E.y-x.y)*(B.y-E.y))/(tn(x,E)*tn(E,B))\u003c-Da\u0026\u0026(u.splice(y,1),y--)}const g=Z7(s,!1),h=new qj([...n.flatMap(y=\u003e[...y.segments,...y.planeEndpointSegments??[]]),...g.flatMap(y=\u003ey.segments)]),d=[...n.flatMap(y=\u003e[y.via,...y.additionalVias??[],y.planeEndpointVia].filter(x=\u003e!!x)),...g.flatMap(y=\u003ey.vias)],p=eR({points:u,chamfer:r,repairReversingDiagonalCorners:!0,segmentIsClear:(y,x)=\u003e{const E={start:y,end:x,layer:a[y.z],width:A};for(const B of[y,x]){const S=o.sharedBoundary;if(B.x\u003cS.minX-Da||B.x\u003eS.maxX+Da||B.y\u003cS.minY-Da||B.y\u003eS.maxY+Da||(Math.abs(B.x-S.minX)\u003cDa||Math.abs(B.x-S.maxX)\u003cDa||Math.abs(B.y-S.minY)\u003cDa||Math.abs(B.y-S.maxY)\u003cDa)\u0026\u0026tn(B,e.exitPoint)\u003eDa)return!1}return s.obstacles.every(B=\u003e!B.layers.includes(E.layer)||Tl(E,B)\u003e=A/2+c-1e-9)\u0026\u0026h.querySegment(E,c).every(B=\u003eZm(E,B,c))\u0026\u0026d.every(B=\u003e!B.spanLayers.includes(E.layer)||Cr(B.center,y,x)\u003e=(A+B.diameter)/2+c-1e-9)}});if(!p)return null;const m=e.trace.route.slice(0,l+1);for(let y=0;y\u003cp.length;y++){const x=p[y],E=p[y-1];if(E\u0026\u0026E.z!==x.z){const B=e.trace.route.find(S=\u003eS.route_type===\"via\"\u0026\u0026tn(S,x)\u003cDa\u0026\u0026S.from_layer===a[E.z]\u0026\u0026S.to_layer===a[x.z]);if(!B)return null;m.push(B)}m.push({route_type:\"wire\",x:x.x,y:x.y,layer:a[x.z],width:A})}m[m.length-1]=e.trace.route.at(-1);const _={...e.trace,route:m},f=J0e(s,_,!1).segments,I=e.sourceEscapeSegmentCount??1,C=[...e.segments.slice(0,I),...f.slice(I)];return bO(e,C,c)?{...e,trace:_,segments:C,length:C.reduce((y,x)=\u003ey+tn(x.start,x.end),0)}:null}function mw(t){for(let e=0;e\u003ct.length;e++){const n=t[e],o=n.end.x-n.start.x,i=n.end.y-n.start.y,r=Math.hypot(o,i);if(Math.min(Math.abs(o),Math.abs(i),Math.abs(Math.abs(o)-Math.abs(i)))\u003eDa)return!1;const s=t[e+1];if(s\u0026\u0026tn(n.end,s.start)\u003eDa)return!1;if(!s||s.layer!==n.layer||r\u003cDa)continue;const a=s.end.x-s.start.x,A=s.end.y-s.start.y,c=Math.hypot(a,A);if(!(c\u003cDa)\u0026\u0026(o*a+i*A)/(r*c)\u003cMath.SQRT1_2-Da)return!1}return!0}function o$(t,e){const n=e.sharedBoundary;return t.segments.every(o=\u003e[o.start,o.end].every(i=\u003ei.x\u003cn.minX-Da||i.x\u003en.maxX+Da||i.y\u003cn.minY-Da||i.y\u003en.maxY+Da?!1:t.termination.type!==\"boundary\"?!0:!(Math.abs(i.x-n.minX)\u003cDa||Math.abs(i.x-n.maxX)\u003cDa||Math.abs(i.y-n.minY)\u003cDa||Math.abs(i.y-n.maxY)\u003cDa)||tn(i,t.exitPoint)\u003cDa))}function jbo(t,e,n,o,i=!1){const r=e.sourceEscapeSegmentCount??1;if(e.termination.type!==(i?\"boundary\":\"plane\")||!e.via||!i\u0026\u0026e.additionalVias?.length||e.planeEndpointTrace||e.planeEndpointSegments?.length||e.planeEndpointVia||!i\u0026\u0026e.segments.length!==r)return null;const s=e.segments.slice(0,r);if(!s.length||s.some(E=\u003eE.layer!==e.sourceLayer)||tn(s[0].start,e.sourcePoint)\u003eDa||tn(s.at(-1).end,e.via.center)\u003eDa)return null;const a=o.connections.find(E=\u003eE.connectionIndex===e.connectionIndex);if(!a?.sourceObstacle)return null;const A=e.trace.route.findIndex(E=\u003eE.route_type===\"via\");if(A\u003c1)return null;const{inputSrj:c,traceWidth:l,clearance:u,layerNames:g}=t,h=E=\u003ee.termination.type===\"plane\"\u0026\u0026Px(c,e.connectionName,E),d=n.filter(E=\u003eE.termination.type!==\"plane\"||!h(E.connectionName)),p=Z7(c,!1).filter(E=\u003e!h(E.connectionName)),m=new qj([...e.segments.slice(r),...d.flatMap(E=\u003e[...E.segments,...E.planeEndpointSegments??[]]),...p.flatMap(E=\u003eE.segments)]),_=[...e.additionalVias??[],...d.flatMap(E=\u003e[E.via,...E.additionalVias??[],E.planeEndpointVia].filter(B=\u003e!!B)),...p.flatMap(E=\u003eE.vias)],f=eR({points:[e.sourcePoint,...s.map(E=\u003eE.end)].map(E=\u003e({...E,z:g.indexOf(e.sourceLayer)})),chamfer:l/4,repairReversingDiagonalCorners:!0,segmentIsClear:(E,B)=\u003e{const S={start:E,end:B,layer:e.sourceLayer,width:l},Q=o.sharedBoundary;return[E,B].some(w=\u003ew.x\u003cQ.minX||w.x\u003eQ.maxX||w.y\u003cQ.minY||w.y\u003eQ.maxY)?!1:c.obstacles.every(w=\u003e!w.layers.includes(e.sourceLayer)||Tl(S,w)\u003e=l/2+u-1e-9||w===a.sourceObstacle\u0026\u0026IO(E,w,l/2+u)\u0026\u0026(E.x-a.sourcePoint.x)*(B.x-E.x)+(E.y-a.sourcePoint.y)*(B.y-E.y)\u003e=-Da||w!==a.sourceObstacle\u0026\u0026e.termination.type===\"plane\"\u0026\u0026n4(c,w,e.connectionName)?!0:jj({inputSrj:c,segment:S,bodyObstacle:w,connectionName:e.connectionName}))\u0026\u0026m.querySegment(S,u).every(w=\u003eZm(S,w,u))\u0026\u0026_.every(w=\u003e!w.spanLayers.includes(S.layer)||Cr(w.center,E,B)\u003e=(l+w.diameter)/2+u-1e-9)}});if(!f)return null;const I={...e.trace,route:[e.trace.route[0],...f.slice(1).map(E=\u003e({route_type:\"wire\",x:E.x,y:E.y,layer:e.sourceLayer,width:l})),...e.trace.route.slice(A)]},C=J0e(c,{...I,route:I.route.slice(0,f.length)},!1).segments,y=[...C,...e.segments.slice(r)];let x=!1;for(const E of C){const B=Tl(E,a.sourceObstacle);if(x\u0026\u0026B\u003cl/2+u-1e-9)return null;wx(E.end,a.sourceObstacle)\u003e=l/2+u-1e-9\u0026\u0026(x=!0)}return!mw(C)||!bO(e,y,u,new Set(C.map((E,B)=\u003eB)))?null:{...e,trace:I,segments:y,sourceEscapeSegmentCount:C.length,length:[...y,...e.planeEndpointSegments??[]].reduce((E,B)=\u003eE+tn(B.start,B.end),0)}}function DPe(t){const e=new Map(t.preparedBuses.map(A=\u003e[A.busId,A]));if(new Set(t.plans.map(A=\u003eA.connectionIndex)).size!==t.plans.length)return null;let n=[...t.plans],o=!1;if(t.repairPlaneSourceCorners||t.repairSignalSourceCorners)for(let A=0;A\u003cn.length;A++){const c=n[A];if(mw(c.segments.slice(0,c.sourceEscapeSegmentCount??1)))continue;const l=e.get(c.busId);if(!l||(c.termination.type===\"plane\"?!t.repairPlaneSourceCorners:!t.repairSignalSourceCorners))return null;const u=jbo(t,c,n.filter((g,h)=\u003eh!==A),l,c.termination.type===\"boundary\");if(!u)return null;n[A]=u,o=!0}if(o\u0026\u0026t.rematchRepairedLengths){const A=t.rematchRepairedLengths(n);if(!A)return null;n=A}const i=[...n],r=fPe(t.inputSrj);for(const A of n){if(!e.has(A.busId))throw new Error(\"Final normalization requires each original prepared bus\");if(!mw(A.segments.slice(0,A.sourceEscapeSegmentCount??1))||!o$({...A,segments:A.segments.slice(0,A.sourceEscapeSegmentCount??1)},e.get(A.busId))||!mw(A.planeEndpointSegments??[]))return null}if(n.some(A=\u003e!o$(A,e.get(A.busId)))){const A=MPe({...t,plans:n,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});if(!A)return null;if(n=A,t.rematchRepairedLengths){const c=t.rematchRepairedLengths(n);if(!c)return null;n=c}}for(let A=0;A\u003cn.length;A++){const c=n[A];if(mw(c.segments)\u0026\u0026o$(c,e.get(c.busId)))continue;const l=e.get(c.busId);let u=null,g=null;for(let h=t.traceWidth/4;h\u003e=1e-6;h=Math.max(1e-6,h/4)){const d=n$(t,c,n.filter((p,m)=\u003em!==A),l,!1,h);if(d){g??=d;const p=n.filter(_=\u003e_.busId===l.busId).map(_=\u003e_===c?d.length:_.length);if(r.every(_=\u003e{if(!_.connectionIndices.includes(c.connectionIndex))return!0;const f=_.connectionIndices.map(C=\u003en.find(y=\u003ey.connectionIndex===C));if(f.some(C=\u003e!C))return!0;const I=f.map(C=\u003eC===c?d.length:C.length);return Math.abs(I[0]-I[1])\u003c=_.lengthTolerance+Da})\u0026\u0026(l.maxLengthSkew===void 0||Math.max(...p)-Math.min(...p)\u003c=l.maxLengthSkew+Da)){u=d;break}}if(h===1e-6)break}if(!u\u0026\u0026g\u0026\u0026t.rematchRepairedLengths){const h=t.rematchRepairedLengths(n.map((p,m)=\u003em===A?g:p)),d=h?.find(p=\u003ep.connectionIndex===c.connectionIndex);h\u0026\u0026d\u0026\u0026mw(d.segments)\u0026\u0026(n=h,u=d)}if(!u)return null;n[A]=u}for(let A=0;A\u003cn.length;A++){const c=n[A],l=i.find(d=\u003ed.connectionIndex===c.connectionIndex);if(!l||c.targetLayer!==l.targetLayer||tn(c.exitPoint,l.exitPoint)\u003eDa||JSON.stringify(c.via)!==JSON.stringify(l.via)||JSON.stringify(c.additionalVias)!==JSON.stringify(l.additionalVias)||!mw(c.segments)||!o$(c,e.get(c.busId)))return null;if(c===l)continue;const u=l.trace.route.findIndex(d=\u003ed.route_type===\"via\"),g=c.trace.route.findIndex(d=\u003ed.route_type===\"via\");if(u\u003c0||g\u003c0)return null;const h=l.sourceEscapeSegmentCount??1;n[A]={...c,sourcePoint:l.sourcePoint,via:l.via,additionalVias:l.additionalVias,exitPoint:l.exitPoint,sourceEscapeSegmentCount:h,segments:[...l.segments.slice(0,h),...c.segments.slice(c.sourceEscapeSegmentCount??1)],trace:{...l.trace,route:[...l.trace.route.slice(0,u+1),...c.trace.route.slice(g+1)]}}}for(const A of t.preparedBuses){const c=n.filter(l=\u003el.busId===A.busId);if(c.length!==A.connections.length||c.some(l=\u003e!mw(l.segments)||!o$(l,A)))return null;if(A.maxLengthSkew!==void 0\u0026\u0026Math.max(...c.map(l=\u003el.length))-Math.min(...c.map(l=\u003el.length))\u003eA.maxLengthSkew+Da)return null}const s=new Map(n.map(A=\u003e[A.connectionIndex,A]));for(const A of r){const c=A.connectionIndices.map(u=\u003es.get(u));if(c.some(u=\u003e!u))continue;const l=c.map(u=\u003e[...u.segments,...u.planeEndpointSegments??[]].reduce((g,h)=\u003eg+tn(h.start,h.end),0));if(l.some(u=\u003e!Number.isFinite(u))||Math.abs(l[0]-l[1])\u003eA.lengthTolerance+Da)return null}if(t.inputSrj.traces?.length\u0026\u0026n.length){const A=t.preparedBuses.map(l=\u003el.sharedBoundary);if(!Z0e({srj:t.inputSrj,sharedBoundary:{minX:Math.min(...A.map(l=\u003el.minX)),maxX:Math.max(...A.map(l=\u003el.maxX)),minY:Math.min(...A.map(l=\u003el.minY)),maxY:Math.max(...A.map(l=\u003el.maxY))},clearance:t.clearance,allowBlindAndBuriedVias:!1,allowSameNetPlaneMerges:!0})(n))return null}return qu({inputSrj:t.inputSrj,routedSrj:{...t.inputSrj,traces:[...n.flatMap(A=\u003e[A.trace,...A.planeEndpointTrace?[A.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?n:null}function $bo(t){const{inputSrj:e,plans:n,unroutedSourceBuses:o,clearance:i}=t,r=new Map(n.map(I=\u003e[I.connectionIndex,I])),s=Rb(e.layerCount),a=o.filter(I=\u003eI.termination.type===\"boundary\"\u0026\u0026I.connections.length\u003e0\u0026\u0026I.connections.every(C=\u003e{const y=r.get(C.connectionIndex),x=y?.segments[0],E=y?.via;return y?.connectionName===C.connection.name\u0026\u0026y.termination.type===\"boundary\"\u0026\u0026y.segments.length===1\u0026\u0026(y.sourceEscapeSegmentCount??1)===1\u0026\u0026!y.additionalVias?.length\u0026\u0026!y.planeEndpointTrace\u0026\u0026!y.planeEndpointVia\u0026\u0026x\u0026\u0026x.layer===C.sourceLayer\u0026\u0026E\u0026\u0026E.fromLayer===C.sourceLayer\u0026\u0026E.toLayer===y.targetLayer\u0026\u0026E.toLayer!==E.fromLayer\u0026\u0026E.spanLayers.length===s.length\u0026\u0026s.every(B=\u003eE.spanLayers.includes(B))\u0026\u0026tn(x.start,C.sourcePoint)\u003c1e-7\u0026\u0026tn(x.end,E.center)\u003c1e-7\u0026\u0026tn(y.exitPoint,E.center)\u003c1e-7})),A=a[0]?.connections[0];if(!A)return null;const c=r.get(A.connectionIndex),l=c.via,u=c.segments[0].width;if(a.some(I=\u003eI.connections.some(C=\u003e{const y=r.get(C.connectionIndex);return y.via.diameter!==l.diameter||y.via.holeDiameter!==l.holeDiameter||y.segments[0].width!==u})))return null;const g=new Set(a.flatMap(I=\u003eI.connections.map(C=\u003eC.connectionIndex))),h=n.filter(I=\u003e!g.has(I.connectionIndex)),d=Z7(e,!1),p=pd(a,{traceWidth:u,clearance:i,viaDiameter:l.diameter,viaHoleDiameter:l.holeDiameter,maximumSearchStates:1e4,preferredViaPointsByConnectionIndex:new Map(n.filter(I=\u003eg.has(I.connectionIndex)).map(I=\u003e[I.connectionIndex,I.via.center])),additionalObstacles:e.obstacles,blockingSegments:[...h.flatMap(I=\u003e[...I.segments,...I.planeEndpointSegments??[]].map(C=\u003e({connectionIndex:I.connectionIndex,segment:C}))),...d.flatMap(I=\u003eI.segments.map(C=\u003e({connectionIndex:-1,segment:C})))],blockingVias:[...h.flatMap(I=\u003e[I.via,...I.additionalVias??[],I.planeEndpointVia].filter(C=\u003eC!==void 0).map(C=\u003e({connectionIndex:I.connectionIndex,...C}))),...d.flatMap(I=\u003eI.vias.map(C=\u003e({connectionIndex:-1,...C})))]});if(!p)return null;const m=new Map;for(const I of a)for(const C of I.connections){const y=r.get(C.connectionIndex),x=p.get(C.connectionIndex);if(tn(x,y.via.center)\u003c1e-7)continue;const E=x.x-C.sourcePoint.x,B=x.y-C.sourcePoint.y;if(Math.min(Math.abs(E),Math.abs(B),Math.abs(Math.abs(E)-Math.abs(B)))\u003e1e-7)return null;m.set(C.connectionIndex,i4({bus:I,terminal:{connection:C,viaPoint:x,exitPoint:x},targetLayer:y.targetLayer,targetLayerPoints:[x],layerNames:s,traceWidth:u,viaDiameter:l.diameter,viaHoleDiameter:l.holeDiameter,allowBlindAndBuriedVias:!1}))}if(!m.size)return null;const _=n.map(I=\u003em.get(I.connectionIndex)??I);return Wh({plans:_,srj:e,sharedBoundary:a[0].sharedBoundary,clearance:i,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1})\u0026\u0026qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],..._.flatMap(I=\u003e[I.trace,...I.planeEndpointTrace?[I.planeEndpointTrace]:[]])]},clearance:i,allowBlindAndBuriedVias:!1}).valid?_:null}var Jr=1e-6;function Vy(t,e){return tn(t,e)\u003c=Jr}function tue(t){return[t.via,...t.additionalVias??[]].filter(e=\u003ee!==void 0)}function qbo(t,e){const n=e[0];if(!n)return null;const o=t.trace.route.find(g=\u003eg.route_type===\"wire\"),i=t.trace.route.findLast(g=\u003eg.route_type===\"wire\"),r=g=\u003e{if(g?.route_type!==\"wire\")return{};const h={...g};return delete h.route_type,delete h.x,delete h.y,delete h.width,delete h.layer,h},s=tue(t),A=Vy(n.start,t.sourcePoint)\u0026\u0026n.layer!==t.sourceLayer\u0026\u0026s.some(g=\u003eVy(g.center,n.start)\u0026\u0026g.spanLayers.includes(t.sourceLayer)\u0026\u0026g.spanLayers.includes(n.layer))?t.sourceLayer:n.layer,c=[{...r(o),route_type:\"wire\",...n.start,width:n.width,layer:A}];let l=n.start,u=A;for(const[g,h]of e.entries()){if(!Vy(l,h.start))return null;if(u!==h.layer){const d=s.find(p=\u003eVy(p.center,h.start)\u0026\u0026p.spanLayers.includes(u)\u0026\u0026p.spanLayers.includes(h.layer));if(!d)return null;c.push({route_type:\"via\",...h.start,from_layer:u,to_layer:h.layer,via_diameter:d.diameter,via_hole_diameter:d.holeDiameter}),c.push({route_type:\"wire\",...h.start,width:h.width,layer:h.layer}),u=h.layer}c.push({...g===e.length-1?r(i):{},route_type:\"wire\",...h.end,width:h.width,layer:h.layer}),l=h.end}return c}function bB(t,e,n=!1){const o=qbo(t,e);if(!o)return null;const i=[...e,...t.planeEndpointSegments??[]].reduce((s,a)=\u003es+tn(a.start,a.end),0),r=e.findIndex(s=\u003es.layer!==t.sourceLayer);return{...t,...n\u0026\u0026t.sourceEscapeSegmentCount!==void 0\u0026\u0026r\u003e=0?{sourceEscapeSegmentCount:r}:{},trace:{...t.trace,route:o},segments:e,length:i}}function nue(t,e,n){const o=[...tue(t),...t.planeEndpointVia?[t.planeEndpointVia]:[]];for(const i of e){for(const a of o)if(a!==i\u0026\u0026i.spanLayers.some(A=\u003ea.spanLayers.includes(A))\u0026\u0026tn(i.center,a.center)\u003c(i.diameter+a.diameter)/2+n-1e-9)return!1;const r=t.segments.flatMap((a,A)=\u003e{const c=t.segments[A+1];return a.layer===i.fromLayer\u0026\u0026c?.layer===i.toLayer\u0026\u0026Vy(a.end,i.center)\u0026\u0026Vy(c.start,i.center)?[A]:[]});if(r.length!==1)return!1;const s=new Set;for(const a of[-1,1]){let A=i.center,c=0;const l=a===-1?i.fromLayer:i.toLayer;for(let u=r[0]+(a===1?1:0);u\u003e=0\u0026\u0026u\u003ct.segments.length;u+=a){const g=t.segments[u],h=a===-1?g.end:g.start,d=a===-1?g.start:g.end,p=(i.diameter+g.width)/2+n;if(g.layer!==l||!Vy(A,h)||c\u003ep+Jr)break;s.add(u),c+=tn(h,d),A=d}}for(const[a,A]of[...t.segments,...t.planeEndpointSegments??[]].entries())if(!(s.has(a)||!i.spanLayers.includes(A.layer))\u0026\u0026Cr(i.center,A.start,A.end)\u003c(i.diameter+A.width)/2+n-1e-9)return!1}return!0}function*Xbo(t){const{plan:e,bus:n,layerNames:o,clearance:i,workBudget:r}=t;if(!e.via||tue(e).length\u003e5)return;const s=n.allowedLayers??o,a=(n.routableEscapeLayers??s).filter(u=\u003es.includes(u)\u0026\u0026o.includes(u)\u0026\u0026u!==e.sourceLayer\u0026\u0026u!==e.targetLayer),A=[];for(const u of e.segments){const g=A.at(-1);if(g?.layer===u.layer\u0026\u0026u.layer===e.targetLayer){const h=g.end.x-g.start.x,d=g.end.y-g.start.y,p=u.end.x-u.start.x,m=u.end.y-u.start.y;if(Math.abs(h*m-d*p)\u003c=Jr*Math.hypot(h,d)*Math.hypot(p,m)\u0026\u0026h*p+d*m\u003e0){g.end=u.end;continue}}A.push({...u})}const c=bB(e,A);if(!c)return;const l=(u,g,h)=\u003e({center:u,fromLayer:g,toLayer:h,diameter:e.via.diameter,holeDiameter:e.via.holeDiameter,spanLayers:o});for(const u of a)for(const g of[!0,!1])if(!(g\u0026\u0026(c.additionalVias?.length||c.via.toLayer!==c.targetLayer))){for(const[h,d]of c.segments.entries())if(d.layer===c.targetLayer\u0026\u0026!(tn(d.start,d.end)\u003c=Jr))for(let p=0;p\u003c37;p++){const m=.05+p*.025;if(!g\u0026\u0026m\u003e=.5)break;oR(r);const _=x=\u003e({x:d.start.x+(d.end.x-d.start.x)*x,y:d.start.y+(d.end.y-d.start.y)*x}),f=_(m),I=_(1-m);if(!g\u0026\u0026tn(f,I)\u003ce.via.diameter+i)continue;const C=g?[l(I,u,d.layer)]:[l(f,d.layer,u),l(I,u,d.layer)],y=g?bB({...c,via:{...c.via,toLayer:u},additionalVias:C},[...c.segments.slice(0,h).map(x=\u003ex.layer===c.targetLayer?{...x,layer:u}:x),{...d,end:I,layer:u},{...d,start:I},...c.segments.slice(h+1)]):bB({...c,additionalVias:[...c.additionalVias??[],...C]},[...c.segments.slice(0,h),{...d,end:f},{...d,start:f,end:I,layer:u},{...d,start:I},...c.segments.slice(h+1)]);y\u0026\u0026nue(y,C,i)\u0026\u0026(yield{plan:y,tuningLayer:u,addedVias:C})}}}function _Nt(t,e,n){return t.x\u003ce.minX-n||t.x\u003ee.maxX+n||t.y\u003ce.minY-n||t.y\u003ee.maxY+n}function Zbo(t){const{segment:e,bounds:n,margin:o}=t,i={minX:n.minX-o,maxX:n.maxX+o,minY:n.minY-o,maxY:n.maxY+o},r=e.end.x-e.start.x,s=e.end.y-e.start.y,a=[0,1],A=l=\u003e{if(l\u003c=Jr||l\u003e=1-Jr)return;const u={x:e.start.x+r*l,y:e.start.y+s*l};u.x\u003ci.minX-Jr||u.x\u003ei.maxX+Jr||u.y\u003ci.minY-Jr||u.y\u003ei.maxY+Jr||a.push(l)};Math.abs(r)\u003eJr\u0026\u0026(A((i.minX-e.start.x)/r),A((i.maxX-e.start.x)/r)),Math.abs(s)\u003eJr\u0026\u0026(A((i.minY-e.start.y)/s),A((i.maxY-e.start.y)/s));const c=a.toSorted((l,u)=\u003el-u).filter((l,u,g)=\u003eu===0||Math.abs(l-g[u-1])\u003eJr);return c.slice(1).map((l,u)=\u003e{const g=c[u];return{...e,start:{x:e.start.x+r*g,y:e.start.y+s*g},end:{x:e.start.x+r*l,y:e.start.y+s*l}}})}function fNt(t){return t.componentObstacles.reduce((e,n)=\u003e({minX:Math.min(e.minX,n.center.x-n.width/2),maxX:Math.max(e.maxX,n.center.x+n.width/2),minY:Math.min(e.minY,n.center.y-n.height/2),maxY:Math.max(e.maxY,n.center.y+n.height/2)}),{minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY})}function NPe(t,e){return t.layer!==e.layer||Math.min(t.start.x,t.end.x)\u003eMath.max(e.start.x,e.end.x)+Jr||Math.min(e.start.x,e.end.x)\u003eMath.max(t.start.x,t.end.x)+Jr||Math.min(t.start.y,t.end.y)\u003eMath.max(e.start.y,e.end.y)+Jr||Math.min(e.start.y,e.end.y)\u003eMath.max(t.start.y,t.end.y)+Jr?!1:tu(t.start,t.end,e.start,e.end)\u003c=Jr}function INt(t){let e;return(n,o,i)=\u003e{if(!e){e=[];for(let a=0;a\u003ct.length;a++)for(let A=a+2;A\u003ct.length;A++)NPe(t[a],t[A])\u0026\u0026e.push([a,A])}const r=o+i-1,s=(a,A)=\u003eA===a+2\u0026\u0026Vy(n[a].end,n[A].start);for(const[a,A]of e){if(a===o||A===o)continue;const c=a\u003eo?a+i-1:a,l=A\u003eo?A+i-1:A;if(!s(c,l))return!0}for(let a=o;a\u003c=r;a++)for(let A=0;A\u003cn.length;A++){if(Math.abs(a-A)\u003c2||A\u003e=o\u0026\u0026A\u003ca)continue;const c=Math.min(a,A),l=Math.max(a,A);if(!s(c,l)\u0026\u0026NPe(n[c],n[l]))return!0}return!1}}function RPe(t){const{plan:e,segments:n,replacementStartIndex:o,replacementSegmentCount:i,clearance:r}=t,s=o+i-1,a=tue(e),A=new Int32Array(n.length),c=new Float64Array(n.length+1);for(let u=0;u\u003cn.length;u++){const g=n[u],h=n[u-1];A[u]=u===0?0:A[u-1]+ +(h.layer!==g.layer||!Vy(h.end,g.start)),c[u+1]=c[u]+tn(g.start,g.end)}const l=(u,g)=\u003e{if(u===g)return 0;if(A[u]!==A[g])return Number.POSITIVE_INFINITY;const h=Math.min(u,g),d=Math.max(u,g);return Math.max(0,c[d]-c[h+1])};for(let u=o;u\u003c=s;u++){const g=n[u],h=e.segments[o];if(!(g.layer===h.layer\u0026\u0026g.width===h.width\u0026\u0026Cr(g.start,h.start,h.end)\u003c=Jr\u0026\u0026Cr(g.end,h.start,h.end)\u003c=Jr)){for(const[d,p]of n.entries()){const m=g.width/2+p.width/2+r;if(!(l(u,d)\u003c=m+Jr)\u0026\u0026!Zm(g,p,r))return!1}for(const d of a){if(!d.spanLayers.includes(g.layer)||Vy(d.center,g.start)||Vy(d.center,g.end))continue;const p=d.diameter/2+g.width/2+r,m=_=\u003e{let f=_===-1?g.start:g.end,I=0;for(let C=u+_;C\u003e=0\u0026\u0026C\u003cn.length;C+=_){const y=n[C];if(y.layer!==g.layer)return!1;const x=_===-1?y.end:y.start;if(!Vy(f,x)||(I+=tn(y.start,y.end),I\u003ep+Jr))return!1;if(f=_===-1?y.start:y.end,Vy(f,d.center))return!0}return!1};if(Cr(d.center,g.start,g.end)\u003cp-Jr\u0026\u0026!m(-1)\u0026\u0026!m(1))return!1}}}return!0}function CNt(t,e){return t.x\u003e=e.minX-Jr\u0026\u0026t.x\u003c=e.maxX+Jr\u0026\u0026t.y\u003e=e.minY-Jr\u0026\u0026t.y\u003c=e.maxY+Jr}function sI(t,e,n){return{x:t.x+e.x*n,y:t.y+e.y*n}}function eSo(t){const{segment:e,toothCount:n,targetAddedLength:o,pitch:i,placementFraction:r,normalSign:s}=t,a=e.end.x-e.start.x,A=e.end.y-e.start.y,c=Math.hypot(a,A);if(c\u003c=Jr)return null;const l=Math.abs(a)\u003c=Jr||Math.abs(A)\u003c=Jr,u=Math.abs(Math.abs(a)-Math.abs(A))\u003c=Jr;if(!l\u0026\u0026!u)return null;const g={x:a/c,y:A/c},h={x:-g.y*s,y:g.x*s},d=Math.min(i/2,o/(8*n*(Math.SQRT2-1)),t.chamferLimit??Number.POSITIVE_INFINITY),p=t.plateauLength??i,m=d*4+p,_=i,f=n*m+Math.max(0,n-1)*_,I=i/4;if(f+I*2\u003ec+Jr)return null;const C=4*d*(Math.SQRT2-1);if(o+Jr\u003cC*n)return null;const y=(o/n-C)/2,x=c-f-I*2,E=I+Math.max(0,x)*r;let B=sI(e.start,g,E);const S=[{...e.start},{...B}];for(let Q=0;Q\u003cn;Q++)B=sI(sI(B,g,d),h,d),S.push(B),B=sI(B,h,y),S.push(B),B=sI(sI(B,g,d),h,d),S.push(B),B=sI(B,g,p),S.push(B),B=sI(sI(B,g,d),h,-d),S.push(B),B=sI(B,h,-y),S.push(B),B=sI(sI(B,g,d),h,-d),S.push(B),Q\u003cn-1\u0026\u0026(B=sI(B,g,_),S.push(B));return S.push({...e.end}),S.filter((Q,w)=\u003ew===0||!Vy(Q,S[w-1]))}var yNt=class extends Error{};function oR(t){if(t\u0026\u0026t.remaining--\u003c=0)throw new yNt}function*_w(t){const{plan:e,bus:n,targetAddedLength:o,clearance:i,sharedBoundary:r,allowInsideDenseBounds:s=!1,allowSourcePrefixMatching:a=!1,denseBoundarySplitApplied:A=!1}=t,c=fNt(n),l=INt(e.segments),u=e.segments[0]?.width?e.segments[0].width/2+i:i,g=e.segments.map((p,m)=\u003e({segment:p,segmentIndex:m})).filter(({segment:p,segmentIndex:m})=\u003ep.layer===e.targetLayer||t.allowTransitLayerMatching\u0026\u0026p.layer!==e.sourceLayer\u0026\u0026(n.allowedLayers??[e.targetLayer]).includes(p.layer)\u0026\u0026(n.routableEscapeLayers??n.allowedLayers??[e.targetLayer]).includes(p.layer)||a\u0026\u0026e.via\u0026\u0026e.sourceLayer!==e.targetLayer\u0026\u0026m\u003e0\u0026\u0026m\u003c(e.sourceEscapeSegmentCount??1)\u0026\u0026p.layer===e.sourceLayer).toSorted((p,m)=\u003etn(m.segment.start,m.segment.end)-tn(p.segment.start,p.segment.end));for(const{segment:p,segmentIndex:m}of g){const _=p.width+i,f=tn(p.start,p.end),I=Math.min(12,Math.max(0,t.chamferLimit===void 0?Math.floor((f/_+.5)/4):Math.floor((f+_/2)/(4*t.chamferLimit+(t.plateauLength??_)+_))));for(let C=1;C\u003c=I;C++)for(const y of t.placementFractions??[.5,0,1,.25,.75])for(const x of[1,-1]){oR(t.workBudget);const E=eSo({segment:p,toothCount:C,targetAddedLength:o,pitch:_,placementFraction:y,normalSign:x,plateauLength:t.plateauLength,chamferLimit:t.chamferLimit});if(!E||E.some(w=\u003e!CNt(w,r))||!s\u0026\u0026E.slice(1,-1).some(w=\u003e!_Nt(w,c,u)))continue;const B=E.slice(1).map((w,M)=\u003e({start:E[M],end:w,width:p.width,layer:p.layer})),S=[...e.segments.slice(0,m),...B,...e.segments.slice(m+1)];if(p.layer===e.sourceLayer\u0026\u0026p.layer!==e.targetLayer\u0026\u0026B.some(w=\u003eTl(w,e.sourceObstacle)\u003cw.width/2+i-Jr)||l(S,m,B.length)||!RPe({plan:e,segments:S,replacementStartIndex:m,replacementSegmentCount:B.length,clearance:i}))continue;const Q=bB(e,S,a);Q\u0026\u0026(yield Q)}}if(A)return;const h=e.segments.flatMap((p,m)=\u003ea\u0026\u0026m===0?[p]:Zbo({segment:p,bounds:c,margin:u})),d=bB(e,h,a);d\u0026\u0026(yield*_w({...t,plan:d,denseBoundarySplitApplied:!0}))}function*oue(t){const{plan:e,bus:n,targetAddedLength:o,clearance:i}=t,r=fNt(n);for(let s=0;s\u003ce.segments.length;s++){const a=e.segments[s],A=a.layer===e.sourceLayer\u0026\u0026a.layer!==e.targetLayer;if(A){if(!t.allowSourcePrefixMatching||!e.via||s===0)continue}else if(a.layer!==e.targetLayer\u0026\u0026(!t.allowTransitLayerMatching||!(n.allowedLayers??[e.targetLayer]).includes(a.layer)||!(n.routableEscapeLayers??n.allowedLayers??[e.targetLayer]).includes(a.layer)))continue;const c=tn(a.start,a.end);if(c\u003c=Jr)continue;const l={x:(a.end.x-a.start.x)/c,y:(a.end.y-a.start.y)/c};for(let u=s+2;u\u003cMath.min(e.segments.length,s+16)\u0026\u0026!e.segments.slice(s,u+1).some(C=\u003eC.layer!==a.layer);u++){const h=e.segments[u],d=tn(h.start,h.end);if(d\u003c=Jr)continue;const p={x:(h.end.x-h.start.x)/d,y:(h.end.y-h.start.y)/d};if(Math.abs(l.x+p.x)\u003eJr||Math.abs(l.y+p.y)\u003eJr)continue;oR(t.workBudget);const m=C=\u003e({...C,x:C.x+l.x*o/2,y:C.y+l.y*o/2}),_=e.segments.map((C,y)=\u003ey\u003cs||y\u003eu?C:y===s?{...C,end:m(C.end)}:y===u?{...C,start:m(C.start)}:{...C,start:m(C.start),end:m(C.end)}),f=_.slice(s,u+1);if(f.some((C,y)=\u003e{const x=s+y;return _.some((E,B)=\u003e{if(Math.abs(x-B)\u003c2)return!1;const S=Math.min(x,B),Q=Math.max(x,B);return Q===S+2\u0026\u0026Vy(_[S].end,_[Q].start)?!1:NPe(C,E)})})||f.some(C=\u003e[C.start,C.end].some(y=\u003e!CNt(y,n.sharedBoundary)||!t.allowInsideDenseBounds\u0026\u0026!_Nt(y,r,C.width/2+i)))||A\u0026\u0026f.some(C=\u003eTl(C,e.sourceObstacle)\u003cC.width/2+i-Jr)||!RPe({plan:e,segments:_,replacementStartIndex:s,replacementSegmentCount:u-s+1,clearance:i}))continue;const I=bB(e,_);I\u0026\u0026(yield I)}}}function o6(t){const e=t.map(n=\u003en.length);return Math.max(...e)-Math.min(...e)}function iR(t,e){return t.filter(n=\u003ee.has(n.connectionIndex))}function*tSo(t,e,n){const o=INt(t.segments);for(const{segment:i,index:r}of t.segments.map((s,a)=\u003e({segment:s,index:a})).filter(({segment:s})=\u003es.layer===t.targetLayer).toSorted((s,a)=\u003etn(a.segment.start,a.segment.end)-tn(s.segment.start,s.segment.end))){const s=tn(i.start,i.end);if(s\u003c=Jr)continue;const a=Math.abs(i.end.x-i.start.x),A=Math.abs(i.end.y-i.start.y);if(a\u003eJr\u0026\u0026A\u003eJr\u0026\u0026Math.abs(a-A)\u003eJr)continue;const c={x:(i.end.x-i.start.x)/s,y:(i.end.y-i.start.y)/s},l=i.width+e;for(const u of[2,3,4,6]){const g=l*u;if(!(s\u003c2*g+l))for(const h of[1,-1]){oR(n);const d={x:-c.y*h,y:c.x*h},p=[i.start,sI(sI(i.start,c,g),d,g),sI(sI(i.end,c,-g),d,g),i.end],m=p.slice(1).map((I,C)=\u003e({...i,start:p[C],end:I})),_=[...t.segments.slice(0,r),...m,...t.segments.slice(r+1)];if(o(_,r,m.length)||!RPe({plan:t,segments:_,replacementStartIndex:r,replacementSegmentCount:m.length,clearance:e}))continue;const f=bB(t,_);f\u0026\u0026(yield f)}}}}function zy(t){if(t.maximumWorkUnits!==void 0\u0026\u0026(!Number.isSafeInteger(t.maximumWorkUnits)||t.maximumWorkUnits\u003c0))throw new Error(\"maximumWorkUnits must be a non-negative safe integer\");const e=t.maximumWorkUnits===void 0?void 0:{remaining:t.maximumWorkUnits},n=fPe(t.inputSrj),o=new Map;for(const r of t.plans){const s=o.get(r.connectionIndex)??[];s.push(r),o.set(r.connectionIndex,s)}t={...t,preparedBuses:t.preparedBuses.filter(r=\u003er.maxLengthSkew!==void 0||r.connections.some(s=\u003eo.has(s.connectionIndex)))};for(const r of t.preparedBuses)if(r.connections.some(s=\u003e{const a=o.get(s.connectionIndex);return a?.length!==1||a[0].busId!==r.busId||a[0].connectionName!==s.connection.name||t.inputSrj.connections[s.connectionIndex]?.name!==s.connection.name}))return{plans:null,failedBus:r};const i=Z0e({srj:t.inputSrj,sharedBoundary:t.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges});try{const r=TPe(t,i,e);return r.plans?nSo(t,r.plans,n,i,e):r}catch(r){if(r instanceof yNt\u0026\u0026e?.activeBus)return{plans:null,failedBus:t.preparedBuses.find(s=\u003es.busId===e.activeBus.busId)??e.activeBus};throw r}}function xNt({plans:t,connectionIndex:e,connectionName:n}){const o=t.filter(s=\u003es.connectionIndex===e),i=o[0];if(o.length!==1||!i||i.connectionName!==n||!Number.isFinite(i.length))throw new Error(`Differential-pair matching cannot resolve exactly one original plan for ${n}`);const r=[...i.segments,...i.planeEndpointSegments??[]].reduce((s,a)=\u003es+tn(a.start,a.end),0);if(!Number.isFinite(r)||Math.abs(r-i.length)\u003eJr)throw new Error(`Differential-pair matching found inconsistent copper length for ${i.connectionName}`);return i}function iue({plans:t,pair:e}){return[xNt({plans:t,connectionIndex:e.connectionIndices[0],connectionName:e.connectionNames[0]}),xNt({plans:t,connectionIndex:e.connectionIndices[1],connectionName:e.connectionNames[1]})]}function nSo(t,e,n,o,i){const r=new Map(t.preparedBuses.flatMap(u=\u003eu.connections.map(g=\u003e[g.connectionIndex,{bus:u,connection:g}]))),s=n.filter(u=\u003eu.connectionIndices.some(g=\u003er.has(g)));if(!s.length)return{plans:e};const a=t.preparedBuses.map(u=\u003e({bus:u,indices:new Set(u.connections.map(g=\u003eg.connectionIndex))}));let A=e;const c=u=\u003ea.every(({bus:g,indices:h})=\u003e{if(g.maxLengthSkew===void 0)return!0;const d=iR(u,h);return d.length===g.connections.length\u0026\u0026o6(d)\u003c=g.maxLengthSkew+Jr});for(let u=0;u\u003c=s.length;u++){for(const g of s){const h=iue({plans:A,pair:g});if(o6(h)\u003c=g.lengthTolerance+Jr)continue;const d=g.connectionIndices.map(y=\u003er.get(y)),p=d.find(y=\u003ey).bus;if(d.some(y=\u003e!y))return{plans:null,failedBus:p};const m=h[0].length\u003c=h[1].length?0:1,_=d[m].bus,f={..._,connections:d.map(y=\u003ey.connection),maxLengthSkew:g.lengthTolerance},I=Math.max(...h.map(y=\u003ey.length)),C=TPe({...t,plans:A,preparedBuses:[f],unroutedSourceBuses:void 0,allowUnconstrainedLaneRerouting:!1,allowPairLaneSpreading:d[0].bus===d[1].bus\u0026\u0026t.allowPairLaneSpreading,candidatePlansAreFeasible:y=\u003ec(y)\u0026\u0026iue({plans:y,pair:g}).every(x=\u003ex.length\u003c=I+Jr)\u0026\u0026(!t.candidatePlansAreFeasible||t.candidatePlansAreFeasible(y))},o,i);if(!C.plans)return{plans:null,failedBus:_};A=C.plans}if(s.every(g=\u003eo6(iue({plans:A,pair:g}))\u003c=g.lengthTolerance+Jr))return c(A)?{plans:A}:{plans:null,failedBus:a.find(({bus:g,indices:h})=\u003eg.maxLengthSkew!==void 0\u0026\u0026o6(iR(A,h))\u003eg.maxLengthSkew+Jr).bus}}return{plans:null,failedBus:s.find(u=\u003eo6(iue({plans:A,pair:u}))\u003eu.lengthTolerance+Jr).connectionIndices.map(u=\u003er.get(u)?.bus).find(u=\u003eu)}}function TPe(t,e,n){const{preparedBuses:o,inputSrj:i,sharedBoundary:r,clearance:s,allowBlindAndBuriedVias:a=!0,allowSameNetMerges:A=!1,allowMatchingInsideDenseBounds:c=!1,candidatePlansAreFeasible:l}=t,u=m=\u003e(oR(n),e(m));let g=[...t.plans],h=0;const d=new Set(t.unroutedSourceBuses?.flatMap(m=\u003em.connections.map(_=\u003e_.connectionIndex))),p=o.filter(m=\u003em.maxLengthSkew!==void 0\u0026\u0026m.connections.length\u003e1);if(p.length===0)return{plans:g};for(const m of p){const _=new Set(m.connections.map(y=\u003ey.connectionIndex));if(n\u0026\u0026(n.activeBus=m),m.termination.type!==\"boundary\")return{plans:null,failedBus:m};const f=m.connections.length*(t.allowDistributedMatching?24:2),I=new Set;for(let y=0;y\u003cf;y++){const x=iR(g,_);if(x.length!==m.connections.length)return{plans:null,failedBus:m};const E=m.maxLengthSkew,B=o6(x);if(B\u003c=E+Jr)break;const S=x.filter(U=\u003e!I.has(U.connectionIndex)).toSorted((U,Y)=\u003eU.length-Y.length||U.connectionName.localeCompare(Y.connectionName))[0],Q=Math.max(...x.map(U=\u003eU.length));if(!S||Q-S.length\u003c=E+Jr)return{plans:null,failedBus:m};const w=Q-S.length,M=Math.max(Jr,w-E+Jr),k=[M,M+E*.1,w-E*.5,w-E*.75,w,w+E].filter((U,Y,W)=\u003eU\u003eJr\u0026\u0026W.findIndex(te=\u003eMath.abs(te-U)\u003cJr)===Y).toSorted((U,Y)=\u003eU-Y);let R=null;const F=U=\u003e{const Y=g.map(te=\u003ete===S?U:te),W=iR(Y,_);return o6(W)\u003eB+Jr||!u(Y)||l\u0026\u0026!l(Y)?null:Y};if(t.allowMultiSegmentTuningWindows){const U=Math.max(S.length+M,...fPe(i).filter(Y=\u003eY.connectionIndices.includes(S.connectionIndex)).flatMap(Y=\u003eY.connectionIndices.filter(W=\u003eW!==S.connectionIndex).flatMap(W=\u003e{const te=g.find(j=\u003ej.connectionIndex===W);return te?[te.length-Y.lengthTolerance+Jr]:[]})));for(const Y of Abo({plan:S,bus:m,inputSrj:i,plans:g,layerNames:Rb(i.layerCount),clearance:s,consumeWork:()=\u003eoR(n)})){const W={...S,additionalVias:[...S.additionalVias??[],...Y.addedVias]},te=_e=\u003ebB(W,[...Y.before,..._e,...Y.after]),j=(_e,ue)=\u003e{const fe=m.sharedBoundary;for(const[ye,Me]of ue.entries()){const ve=Me.end.x-Me.start.x,he=Me.end.y-Me.start.y;if(Math.min(Math.abs(ve),Math.abs(he),Math.abs(Math.abs(ve)-Math.abs(he)))\u003e1e-7||[Me.start,Me.end].some(Pe=\u003ePe.x\u003c=fe.minX+1e-7||Pe.x\u003e=fe.maxX-1e-7||Pe.y\u003c=fe.minY+1e-7||Pe.y\u003e=fe.maxY-1e-7))return!1;const Qe=ue[ye+1];if(Qe){const Pe=Qe.end.x-Qe.start.x,we=Qe.end.y-Qe.start.y;if((ve*Pe+he*we)/(Math.hypot(ve,he)*Math.hypot(Pe,we))\u003cMath.SQRT1_2-1e-7)return!1}if(i.obstacles.some(Pe=\u003ePe.layers.includes(Me.layer)\u0026\u0026Tl(Me,Pe)\u003cMe.width/2+s-1e-9))return!1}const pe=new Set(ue.map((ye,Me)=\u003eY.before.length+Me));return nue(_e,Y.addedVias,s)\u0026\u0026bO(_e,_e.segments,s,pe)},J=te(Y.window);if(!J||!j(J,Y.window)||!u(g.map(_e=\u003e_e===S?J:_e)))continue;const oe={...J,targetLayer:Y.tuningLayer,segments:Y.window},ie=U-J.length,ne={plan:oe,bus:m,targetAddedLength:ie,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,workBudget:n},le=Y.window[0].width+s,ge=[oue(ne),...[1,2,4,8].map(_e=\u003e_w({...ne,plateauLength:le*_e,chamferLimit:le/4,placementFractions:[.5,0,1,.25,.75,.1,.9]}))];for(const _e of ge){for(const ue of _e){const fe=te(ue.segments);if(!(!fe||!j(fe,ue.segments))\u0026\u0026(R=F(fe),R))break}if(R)break}if(R)break}}const O=U=\u003e{let te=0;const j=oe=\u003eoe.length\u003c=48?[...oe]:Array.from({length:48},(ie,ne)=\u003eoe[Math.floor(ne*oe.length/48)]),J=(oe,ie)=\u003e{oR(n);const ne=oe.length-S.length,le=U-ne;if(le\u003c=Jr)return F(oe);if(ie\u003c=0)return null;const ge=le/ie,_e=j([..._w({plan:oe,bus:m,targetAddedLength:ge,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n})]);for(const ue of _e){if(te++,te\u003e320)return null;if(!F(ue))continue;const fe=J(ue,ie-1);if(fe)return fe}return null};for(let oe=2;oe\u003c=8;oe++){const ie=J(S,oe);if(ie)return ie;if(te\u003e320)break}return null};for(const U of k){if(R)break;if(t.allowDistributedMatching){for(const W of oue({plan:S,bus:m,targetAddedLength:U,clearance:s,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n}))if(R=F(W),R)break;if(R)break}const Y=_w({plan:S,bus:m,targetAddedLength:U,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n});for(const W of Y)if(R=F(W),!!R)break;if(!R\u0026\u0026Math.abs(U-M)\u003c=Jr){if(t.allowDistributedMatching)for(const W of[U/2,U/4,Math.min(U,1),Math.min(U,.5),Math.min(U,.25),Math.min(U,.1)]){if(W\u003c=Jr)continue;const te={plan:S,bus:m,targetAddedLength:W,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n};for(const j of[oue(te),_w(te)]){for(const J of j)if(R=F(J),R)break;if(R)break}if(R)break}R||(R=O(U))}if(R)break}if(!R\u0026\u0026t.allowAdditionalMatchingVias)for(const U of Xbo({plan:S,bus:m,layerNames:Rb(i.layerCount),clearance:s,workBudget:n})){if(!u(g.map(W=\u003eW===S?U.plan:W)))continue;const Y={plan:{...U.plan,targetLayer:U.tuningLayer},bus:m,targetAddedLength:M,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,workBudget:n};for(const W of[oue(Y),_w(Y)]){for(const te of W)if(nue(te,U.addedVias,s)\u0026\u0026(R=F({...te,targetLayer:S.targetLayer}),R))break;if(R)break}if(R)break}if(!R\u0026\u0026t.allowPairLaneSpreading\u0026\u0026m.connections.length===2){const U=x.find(W=\u003eW!==S);let Y=0;for(const W of tSo(U,s,n)){const te=g.map(J=\u003eJ===U?W:J);if(!u(te)||l\u0026\u0026!l(te))continue;const j=TPe({...t,plans:te,preparedBuses:[m],allowPairLaneSpreading:!1},e,n);if(j.plans){R=j.plans;break}if(++Y\u003e=4)break}}if(!R\u0026\u0026t.allowUnconstrainedLaneRerouting){let U=0;e:for(const Y of k){const W=_w({plan:S,bus:m,targetAddedLength:Y,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n});for(const te of W){if(!u([te]))continue;const j=g.filter(ne=\u003ene!==S\u0026\u0026!e.mutuallyClear([te,ne]));if(j.length!==1)continue;const J=j[0],oe=o.find(ne=\u003ene.busId===J.busId);if(!oe||oe.termination.type!==\"boundary\"||oe.maxLengthSkew!==void 0||oe.connections.length!==1||!J.via||J.additionalVias?.length||J.planeEndpointVia||J.segments.filter(ne=\u003ene.layer===J.sourceLayer).length!==1)continue;const ie=g.map(ne=\u003ene===S?te:ne);for(const ne of[!0,!1]){if(U++\u003e=4)break e;const le=rNt({srj:i,bus:oe,terminals:[{connection:oe.connections[0],viaPoint:J.via.center,exitPoint:J.exitPoint}],targetLayer:J.targetLayer,acceptedPlans:ie.filter(ue=\u003eue!==J),layerNames:Rb(i.layerCount),traceWidth:J.segments[0].width,viaDiameter:J.via.diameter,viaHoleDiameter:J.via.holeDiameter,clearance:s,allowBlindAndBuriedVias:a,allowSameNetMerges:A,gridStepDivisor:2,alignGridToPads:ne,maximumRouteOrderAttempts:1,preferTargetDirectedLaneBias:!0})?.[0];if(!le)continue;const ge=bB(J,[J.segments[0],...le.segments.slice(1)]);if(!ge)continue;const _e=ie.map(ue=\u003eue===J?ge:ue);if(!(o6(iR(_e,_))\u003eE+Jr||!u(_e)||l\u0026\u0026!l(_e))){R=_e;break e}}}}}if(!R\u0026\u0026t.unroutedSourceBuses?.length)e:for(const U of k)for(const Y of _w({plan:S,bus:m,targetAddedLength:U,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n})){if(h\u003e=4)break e;if(!u([Y]))continue;const W=g.filter(j=\u003ej!==S\u0026\u0026!e.mutuallyClear([Y,j]));if(W.length!==1||!d.has(W[0].connectionIndex))continue;h++;const te=$bo({inputSrj:i,plans:g.map(j=\u003ej===S?Y:j),unroutedSourceBuses:t.unroutedSourceBuses,clearance:s});if(!(!te||o6(iR(te,_))\u003eB+Jr||!u(te)||l\u0026\u0026!l(te))){R=te;break e}}if(!R){if(t.allowDistributedMatching){I.add(S.connectionIndex);continue}return{plans:null,failedBus:m}}g=R}const C=iR(g,_);if(o6(C)\u003em.maxLengthSkew+Jr)return{plans:null,failedBus:m}}return{plans:g}}function ENt(t){const{points:e,topZ:n,traceWidth:o,viaDiameter:i,clearance:r}=t,s=[],a=[];let A=0;for(let l=0;l+1\u003ce.length;l++){const u=e[l],g=e[l+1];if(u.z!==g.z){if(tn(u,g)\u003e1e-7)return!1;a.push({center:u,fromZ:u.z,toZ:g.z,edge:l}),A++}else tn(u,g)\u003e1e-9\u0026\u0026s.push({a:u,b:g,z:u.z,edge:l,run:A})}const c=s.filter(l=\u003el.z===n);for(let l=0;l\u003cc.length;l++)for(let u=l+1;u\u003cc.length;u++){const g=c[l],h=c[u];if(g.run!==h.run\u0026\u0026tu(g.a,g.b,h.a,h.b)\u003co+r-1e-9)return!1}for(let l=0;l\u003ca.length;l++){const u=a[l];for(let d=l+1;d\u003ca.length;d++)if(tn(u.center,a[d].center)\u003ci+r-1e-9)return!1;const g=(i+o)/2+r,h=new Set;for(const d of[-1,1]){let p=u.center,m=0;const _=d===-1?u.fromZ:u.toZ;for(let f=u.edge+d;f\u003e=0\u0026\u0026f+1\u003ce.length;f+=d){const I=e[f],C=e[f+1],y=d===-1?C:I,x=d===-1?I:C;if(I.z!==_||C.z!==_||tn(p,y)\u003e1e-7||m\u003eg+1e-7)break;h.add(f),m+=tn(y,x),p=x}}for(const d of s)if(!h.has(d.edge)\u0026\u0026Cr(u.center,d.a,d.b)\u003cg-1e-9)return!1}return!0}var ef=1e-7,kPe=180;function oSo(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.min(Math.abs(n),Math.abs(o));return Math.abs(n)\u003cef||Math.abs(o)\u003cef||Math.abs(Math.abs(n)-Math.abs(o))\u003cef?[[t,e]]:[[t,{x:t.x+Math.sign(n)*i,y:t.y+Math.sign(o)*i,z:t.z},e],[t,{x:e.x-Math.sign(n)*i,y:e.y-Math.sign(o)*i,z:t.z},e],[t,{x:t.x,y:e.y,z:t.z},e],[t,{x:e.x,y:t.y,z:t.z},e]]}function iSo(t,e,n){if(t.length\u003c3)return t;const o=t.length,i=o\u003c=kPe?t.map((c,l)=\u003el):[...new Set([0,...Array.from({length:kPe-2},(c,l)=\u003eMath.round((l+1)*(o-1)/(kPe-1))),o-1])],r=new Float64Array(o).fill(1/0),s=new Array(o);r[0]=0;for(let c=1;c\u003ci.length;c++){const l=i[c];for(let u=0;u\u003cc;u++){const g=i[u],h=t[g],d=t[l],p=Math.abs(d.x-h.x),m=Math.abs(d.y-h.y),_=Math.max(p,m)+(Math.SQRT2-1)*Math.min(p,m);if(!(r[g]+_\u003e=r[l]-ef))for(const f of oSo(h,d)){const I=f.slice(1).reduce((C,y,x)=\u003eC+tn(f[x],y),0);r[g]+I\u003e=r[l]-ef||!f.slice(1).every((C,y)=\u003en(f[y],C))||(r[l]=r[g]+I,s[l]={previous:g,points:f})}}if(!s[l]){const u=i[c-1],g=t.slice(u,l+1);r[l]=r[u]+g.slice(1).reduce((h,d,p)=\u003eh+tn(g[p],d),0),s[l]={previous:u,points:g}}}const a=[];for(let c=o-1;c\u003e0;){const l=s[c];if(!l)throw new Error(\"FanoutSolver: shortcut graph lost a retained path\");a.unshift(l.points),c=l.previous}const A=a.flatMap((c,l)=\u003el?c.slice(1):c);return eR({points:A,chamfer:e/4,segmentIsClear:n})??t}function BNt(t,e,n){return t.x\u003ce.minX-ef||t.x\u003ee.maxX+ef||t.y\u003ce.minY-ef||t.y\u003ee.maxY+ef?!1:!(Math.abs(t.x-e.minX)\u003cef||Math.abs(t.x-e.maxX)\u003cef||Math.abs(t.y-e.minY)\u003cef||Math.abs(t.y-e.maxY)\u003cef)||tn(t,n)\u003cef}function SO(t){const{inputSrj:e,preparedBuses:n,layerNames:o,clearance:i,allowBlindAndBuriedVias:r=!0,allowSameNetMerges:s=!1}=t,a=new Map(n.map(g=\u003e[g.busId,g])),A=new Map(n.map(g=\u003e[g.busId,Math.min(...t.plans.filter(h=\u003eh.busId===g.busId).map(h=\u003eh.length))])),c=Z7(e,r);let l=[...t.plans];for(let g=0;g\u003c3;g++){let h=!1;for(const d of l.toSorted((p,m)=\u003em.length-p.length)){const p=a.get(d.busId),m=A.get(d.busId);if(!p||m===void 0||!Number.isFinite(m)||p.maxLengthSkew===void 0||d.termination.type!==\"boundary\"||d.length\u003c=m+p.maxLengthSkew+ef||t.selectedBusIds\u0026\u0026!t.selectedBusIds.has(d.busId)||t.selectedConnectionIndices\u0026\u0026!t.selectedConnectionIndices.has(d.connectionIndex))continue;const _=d.trace.route.findIndex(R=\u003eR.route_type===\"via\");if(_\u003c0)continue;const f=R=\u003eR===d.connectionName||s\u0026\u0026Px(e,R,d.connectionName),I=l.filter(R=\u003eR.connectionIndex!==d.connectionIndex\u0026\u0026!f(R.connectionName)),C=c.filter(R=\u003e!f(R.connectionName)),y=new qj([...I.flatMap(R=\u003e[...R.segments,...R.planeEndpointSegments??[]]),...C.flatMap(R=\u003eR.segments)]),x=[...I.flatMap(R=\u003e[R.via,...R.additionalVias??[],R.planeEndpointVia].filter(F=\u003e!!F)),...C.flatMap(R=\u003eR.vias)],E=e.obstacles.filter(R=\u003e!(s\u0026\u0026n4(e,R,d.connectionName)));let B=_+1;if(t.allowSourcePrefixShortcuts)for(B=1;B\u003c_;){const R=d.trace.route[B];if(R.route_type===\"wire\"\u0026\u0026wx(R,d.sourceObstacle)\u003e=R.width/2+i-1e-9)break;B++}const S=d.trace.route.slice(0,B);let Q=B;for(;Q\u003cd.trace.route.length;){const R=d.trace.route[Q];if(R.route_type!==\"wire\"){S.push(R),Q++;continue}let F=Q+1;for(;F\u003cd.trace.route.length;){const ie=d.trace.route[F];if(ie.route_type!==\"wire\"||ie.layer!==R.layer)break;F++}const O=d.trace.route.slice(Q,F),U=o.indexOf(R.layer);if(U\u003c0)throw new Error(`FanoutSolver: shortcut uses unknown layer ${R.layer}`);const Y=O.map(ie=\u003e({x:ie.x,y:ie.y,z:U})),W=Math.max(...O.map(ie=\u003eie.width)),te=S.at(-1),j=(ie,ne)=\u003e{const le={start:ie,end:ne,layer:R.layer,width:W};return BNt(ie,p.sharedBoundary,d.exitPoint)\u0026\u0026BNt(ne,p.sharedBoundary,d.exitPoint)\u0026\u0026E.every(ge=\u003e!ge.layers.includes(R.layer)||Q\u003c_\u0026\u0026ge===d.sourceObstacle\u0026\u0026te?.route_type===\"wire\"\u0026\u0026Cr(ie,te,Y[0])\u003cef\u0026\u0026Cr(ne,te,Y[0])\u003cef||Tl(le,ge)\u003e=W/2+i-1e-9)\u0026\u0026y.querySegment(le,i).every(ge=\u003eZm(le,ge,i))\u0026\u0026x.every(ge=\u003e!ge.spanLayers.includes(R.layer)||Cr(ge.center,ie,ne)\u003e=(W+ge.diameter)/2+i-1e-9)};let J=iSo(Y,W,j),oe;if(Q\u003c_\u0026\u0026te?.route_type===\"wire\"\u0026\u0026te.layer===R.layer){const ie=eR({points:[{x:te.x,y:te.y,z:U},...J],chamfer:W/4,segmentIsClear:j});ie?(S.pop(),oe=te,J=ie):J=Y}S.push(...J.map((ie,ne)=\u003e({...ne===0?oe:void 0,route_type:\"wire\",x:ie.x,y:ie.y,layer:R.layer,width:W}))),Q=F}const w={...d.trace,route:S},M=J0e(e,w,r).segments,k={...d,trace:w,segments:M,...t.allowSourcePrefixShortcuts?{sourceEscapeSegmentCount:M.findIndex(R=\u003eR.layer!==d.sourceLayer)}:{},length:M.reduce((R,F)=\u003eR+tn(F.start,F.end),0)};k.length\u003cm-ef||k.length\u003e=d.length-ef||t.allowSourcePrefixShortcuts\u0026\u0026!ENt({points:w.route.flatMap(R=\u003eR.route_type===\"wire\"?[{x:R.x,y:R.y,z:o.indexOf(R.layer)}]:[]),topZ:o.indexOf(d.sourceLayer),traceWidth:t.traceWidth,viaDiameter:d.via.diameter,clearance:i})||Wh({plans:[k],srj:{...e,traces:[...e.traces??[],...I.flatMap(R=\u003e[R.trace,...R.planeEndpointTrace?[R.planeEndpointTrace]:[]])]},sharedBoundary:p.sharedBoundary,clearance:i,allowBlindAndBuriedVias:r,allowSameNetMerges:s})\u0026\u0026(l=l.map(R=\u003eR===d?k:R),h=!0)}if(!h)break}return qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...l.flatMap(g=\u003e[g.trace,...g.planeEndpointTrace?[g.planeEndpointTrace]:[]])]},clearance:i,allowBlindAndBuriedVias:r}).valid?l:null}function rSo(t,e,n,o,i,r,s){if(s\u0026\u0026n===\"top\"\u0026\u0026Tl({start:t,end:t},r)\u003co/2+i-1e-9\u0026\u0026tn(e,s.sourcePoint)\u003e=tn(t,s.sourcePoint)-1e-9)return s.connectionName}function sSo(t){const e=new Int32Array(t.planeSize+1),n=[],o=[];for(let i=0;i\u003ct.planeSize;i++){e[i]=n.length;const r=new Set;for(let c=t.neighborOffset[i];c\u003ct.neighborOffset[i+1];c++){const l=t.neighborIds[c];r.add(l),n.push(l),o.push(t.neighborCosts[c])}const s=new Set,a=t.cellMaxX[i]-t.cellMinX[i],A=t.cellMaxY[i]-t.cellMinY[i];for(let c=t.neighborOffset[i];c\u003ct.neighborOffset[i+1];c++){const l=t.neighborIds[c];for(let u=t.neighborOffset[l];u\u003ct.neighborOffset[l+1];u++){const g=t.neighborIds[u];if(g===i||r.has(g))continue;const h=Math.abs(t.cellCenterX[g]-t.cellCenterX[i]),d=Math.abs(t.cellCenterY[g]-t.cellCenterY[i]);h\u003c1e-9||Math.abs(h-d)\u003e1e-9||Math.abs(h-a)\u003e1e-9||Math.abs(d-A)\u003e1e-9||Math.abs(t.cellMaxX[g]-t.cellMinX[g]-a)\u003e1e-9||Math.abs(t.cellMaxY[g]-t.cellMinY[g]-A)\u003e1e-9||s.add(g)}}for(const c of[...s].sort((l,u)=\u003el-u))n.push(c),o.push(Math.hypot(t.cellCenterX[c]-t.cellCenterX[i],t.cellCenterY[c]-t.cellCenterY[i]))}return e[t.planeSize]=n.length,{neighborOffset:e,neighborIds:Int32Array.from(n),neighborCosts:Float32Array.from(o)}}function aSo(t){const{edge:e,bounds:n,exit:o,approachLength:i}=t;if(![\"left\",\"right\",\"top\",\"bottom\"].includes(e))throw new Error(\"Terminal approach requires a valid boundary edge\");if(!Number.isFinite(i)||i\u003c=0)throw new Error(\"terminalApproachLength must be finite and positive\");const r=e===\"left\"||e===\"right\",s=e===\"left\"?n.minX:e===\"right\"?n.maxX:e===\"bottom\"?n.minY:n.maxY,a=e===\"left\"||e===\"bottom\"?-1:1,A=r?{x:o.x-a*i,y:o.y}:{x:o.x,y:o.y-a*i};if(![o.x,o.y,A.x,A.y,n.minX,n.maxX,n.minY,n.maxY].every(Number.isFinite)||Math.abs((r?o.x:o.y)-s)\u003e1e-7||A.x\u003c=n.minX||A.x\u003e=n.maxX||A.y\u003c=n.minY||A.y\u003e=n.maxY)throw new Error(\"Terminal approach must end on its shared edge and start inside it\");return{connectionName:t.connectionName,edge:e,layer:t.layer,exit:{...o},goal:A}}function rue(t,e){const{goal:n,edge:o}=e,i=o===\"left\"||o===\"right\",r=o===\"left\"||o===\"bottom\"?-1:1,s=i?n.x-t.x:n.y-t.y,a=i?n.y-t.y:n.x-t.x,A=r*s;if(A\u003cMath.abs(a)-1e-9){if(A\u003c=1e-9)return null;const l=i?{x:t.x,y:n.y-Math.sign(a)*A}:{x:n.x-Math.sign(a)*A,y:t.y};return[t,l,n]}const c=i?{x:t.x+r*Math.abs(a),y:n.y}:{x:n.x,y:t.y+r*Math.abs(a)};return[t,c,n].filter((l,u,g)=\u003eu===0||tn(l,g[u-1])\u003e1e-10)}var ASo=(t,e,n=e)=\u003et.some(o=\u003eMath.max(e.x,n.x)\u003e=o.minX\u0026\u0026Math.min(e.x,n.x)\u003c=o.maxX\u0026\u0026Math.max(e.y,n.y)\u003e=o.minY\u0026\u0026Math.min(e.y,n.y)\u003c=o.maxY);function bNt(t,e,n){const o=[];let i=0;for(const[A,c]of t.entries()){if(c.layer===n\u0026\u0026Cr(e,c.start,c.end)\u003c1e-8){const l=i+tn(c.start,e);o.some(u=\u003eMath.abs(u.offset-l)\u003c1e-8)||o.push({index:A,offset:l})}i+=tn(c.start,c.end)}if(o.length!==1)return null;let r=o[0].index;const s=t[r],a=[...t];return tn(e,s.end)\u003c1e-8?r++:tn(e,s.start)\u003e1e-8\u0026\u0026(a.splice(r,1,{...s,end:e},{...s,start:e}),r++),r\u003e=a.length?null:{segments:a,changed:new Set(a.slice(r).map((A,c)=\u003er+c))}}function FPe(t){const{plan:e,splice:n,clearance:o,maximumJoinLength:i}=t,{rawSegments:r,firstEntrySegmentIndex:s}=n;if(!Number.isInteger(s)||s\u003c0||s\u003e=r.length||!Number.isFinite(i)||i\u003c0)return!1;const a=(g,h,d=g)=\u003e{const p={...e,segments:[...g]},m=[e.via,...e.additionalVias??[],e.planeEndpointVia].filter(_=\u003e!!_).filter(_=\u003e[...h].some(f=\u003e{const I=g[f];return _.spanLayers.includes(I.layer)\u0026\u0026Cr(_.center,I.start,I.end)\u003c(_.diameter+I.width)/2+o+1e-7}));return nue({...p,segments:[...d]},m,o)\u0026\u0026bO(p,g,o,h)};if(!a(r,new Set(r.slice(s).map((g,h)=\u003es+h))))return!1;const A=r[s],c=r[s-1];let l=A.start;if(c?.layer===A.layer\u0026\u0026tn(c.end,l)\u003c1e-8){let g=c.start;for(let p=s-2;p\u003e=0;p--){const m=r[p];if(m.layer!==c.layer||tn(m.end,g)\u003e1e-8)break;const _=g.x-m.start.x,f=g.y-m.start.y,I=l.x-g.x,C=l.y-g.y;if(Math.abs(_*C-f*I)\u003e=1e-10||_*I+f*C\u003c0)break;g=m.start}const h=tn(g,l);if(h\u003c1e-10)return!1;const d=Math.min(i,h/3);l={x:l.x+(g.x-l.x)*d/h,y:l.y+(g.y-l.y)*d/h}}const u=bNt(e.segments,l,A.layer);return!!u\u0026\u0026a(u.segments,u.changed,e.segments)}function*cSo(t){const{splice:e,connector:n,clearance:o}=t,i=e.firstEntrySegmentIndex,r=e.rawSegments[i];if(!r||r.layer!==n.layer)return;const s=4*(r.width+o);let a=0;for(let A=i;A\u003e=Math.max(0,i-16);A--){const c=e.rawSegments[A];if(c.layer!==n.layer||A\u003ci\u0026\u0026tn(c.end,e.rawSegments[A+1].start)\u003e1e-7||(A\u003ci\u0026\u0026(a+=tn(c.start,c.end)),a\u003es+1e-7))break;const l=c.start,{goal:u,exit:g,edge:h}=n,d=h===\"left\"||h===\"right\",p=h===\"left\"||h===\"bottom\"?-1:1,m=p*(d?u.x-l.x:u.y-l.y),_=Math.abs(d?u.y-l.y:u.x-l.x),f=[];if(A\u003ci){const I=rue(l,n);I\u0026\u0026f.push(I)}if(m\u003e=_-1e-9){const I=d?{x:u.x-p*_,y:l.y}:{x:l.x,y:u.y-p*_};f.push([l,I,u])}for(const I of f){const C=[...I,g].filter((y,x,E)=\u003ex===0||tn(y,E[x-1])\u003e1e-10);yield{replacement:C.slice(1).map((y,x)=\u003e({...c,start:C[x],end:y})),firstEntrySegmentIndex:A}}}}function lSo(t){const e=[...t.plans],n=new Map(t.splices);for(const[o,i]of e.entries()){const r=t.connectors.get(i.connectionName);if(!r)continue;const s=n.get(i.connectionName);if(!s)return null;if(FPe({plan:i,splice:s,maximumJoinLength:0,clearance:t.clearance}))continue;const a=e.filter(c=\u003ec.connectionIndex!==i.connectionIndex);let A=!1;for(const{replacement:c,firstEntrySegmentIndex:l}of cSo({splice:s,connector:r,clearance:t.clearance})){const u=c[0],g=bNt(i.segments,u.start,u.layer);if(!g)continue;const h=Math.min(...g.changed),d=[...g.segments.slice(0,h),...c],p=bB(i,d);if(!p)continue;const m={rawSegments:[...s.rawSegments.slice(0,l),...c],firstEntrySegmentIndex:l};if(FPe({plan:p,splice:m,maximumJoinLength:0,clearance:t.clearance})\u0026\u0026!c.some(_=\u003e!t.segmentIsClear(_,i.connectionName)||a.some(f=\u003e[...f.segments,...f.planeEndpointSegments??[]].some(I=\u003e!Zm(_,I,t.clearance))||[f.via,...f.additionalVias??[],f.planeEndpointVia].filter(I=\u003e!!I).some(I=\u003eI.spanLayers.includes(_.layer)\u0026\u0026Cr(I.center,_.start,_.end)\u003c(I.diameter+_.width)/2+t.clearance-1e-9)))){e[o]=p,n.set(i.connectionName,m),A=!0;break}}if(!A)return null}return{plans:e,splices:n}}function uSo(t){const{grid:e}=t;if(!Number.isFinite(t.margin)||t.margin\u003c0)throw new Error(\"Terminal connector margin must be finite and non-negative\");const n=c=\u003e({x:e.cellCenterX[c],y:e.cellCenterY[c]}),o=new Map,i=new Set,r=new Map;for(const{connector:c,cellId:l}of t.terminals){if(!Number.isInteger(l)||l\u003c0||l\u003e=e.planeSize)throw new Error(\"Invalid native terminal cell\");const u=new Set([l]);for(let p=e.neighborOffset[l];p\u003ce.neighborOffset[l+1];p++){const m=e.neighborIds[p];u.add(m);for(let _=e.neighborOffset[m];_\u003ce.neighborOffset[m+1];_++)u.add(e.neighborIds[_])}const g=[c.exit,c.goal,...[...u].map(n)],h={minX:Math.min(...g.map(p=\u003ep.x))-t.margin,maxX:Math.max(...g.map(p=\u003ep.x))+t.margin,minY:Math.min(...g.map(p=\u003ep.y))-t.margin,maxY:Math.max(...g.map(p=\u003ep.y))+t.margin},d=r.get(c.edge);r.set(c.edge,d?{minX:Math.min(d.minX,h.minX),maxX:Math.max(d.maxX,h.maxX),minY:Math.min(d.minY,h.minY),maxY:Math.max(d.maxY,h.maxY)}:h);for(const p of u){if(p===l)continue;let m=!1;for(let I=e.neighborOffset[p];I\u003ce.neighborOffset[p+1];I++)e.neighborIds[I]===l\u0026\u0026(m=!0);if(m)continue;const _=rue(n(p),c);if(!_||_.slice(1).some((I,C)=\u003e!t.segmentIsClear(_[C],I,c)))continue;const f=o.get(p)??new Set;f.add(l),o.set(p,f),i.add(`${p}:${l}`)}}const s=new Int32Array(e.planeSize+1),a=[],A=[];for(let c=0;c\u003ce.planeSize;c++){s[c]=a.length;for(let l=e.neighborOffset[c];l\u003ce.neighborOffset[c+1];l++)a.push(e.neighborIds[l]),A.push(e.neighborCosts[l]);for(const l of o.get(c)??[])a.push(l),A.push(tn(n(c),n(l)))}return s[e.planeSize]=a.length,{neighborOffset:s,neighborIds:Int32Array.from(a),neighborCosts:Float32Array.from(A),extendedEdges:i,regions:[...r.values()]}}function gSo(t,e,n){const o=t.route.at(-2),i=t.route.at(-1);if(!o||!i||tn(i,e.goal)\u003e1e-7)throw new Error(\"Native terminal route does not end at its reserved goal\");let r=t.route.slice(0,-2),s=o;if(o.z!==i.z){if(tn(o,n)\u003e1e-7)throw new Error(\"Native terminal via has a noncoincident departure\");r=[...r,o],s={...n,z:i.z}}const a=rue(s,e);if(!a)throw new Error(\"Native terminal route has no perpendicular entry\");return{...t,route:[...r,...a.map(A=\u003e({...A,z:i.z})),{...e.exit,z:i.z}]}}var dSo=class{constructor(t){this.params=t,this.padding=Math.max(t.traceWidth,t.viaDiameter)+t.clearance,this.cellSize=Math.max(t.traceWidth+t.clearance,t.viaDiameter)}params;dirty=!0;buckets=new Map;cellSize;padding;invalidate(){this.dirty=!0}intersects(t,e=t){return ASo(this.params.regions,t,e)}cells(t,e,n,o){for(let i=Math.floor((Math.min(t.x,e.x)-n)/this.cellSize);i\u003c=Math.floor((Math.max(t.x,e.x)+n)/this.cellSize);i++)for(let r=Math.floor((Math.min(t.y,e.y)-n)/this.cellSize);r\u003c=Math.floor((Math.max(t.y,e.y)+n)/this.cellSize);r++)o(`${i},${r}`)}refresh(){if(!this.dirty)return;this.buckets.clear();const t=(e,n,o=n)=\u003e{this.intersects(n,o)\u0026\u0026this.cells(n,o,this.padding,i=\u003e{const r=this.buckets.get(i)??new Set;r.add(e),this.buckets.set(i,r)})};for(const e of this.params.getRoutes()){for(let n=1;n\u003ce.route.length;n++){const o=e.route[n-1],i=e.route[n];o.z===i.z\u0026\u0026t({kind:\"segment\",owner:e.connectionName,a:o,b:i},o,i)}for(const n of e.vias)t({kind:\"via\",owner:e.connectionName,center:n},n)}this.dirty=!1}nearby(t,e=t){this.refresh();const n=new Set;return this.cells(t,e,0,o=\u003e{for(const i of this.buckets.get(o)??[])n.add(i)}),n}blockingSegmentOwners(t,e,n){const o=new Set;for(let i=1;i\u003ce.length;i++){const r=e[i-1],s=e[i];if(this.intersects(r,s))for(const a of this.nearby(r,s)){if(a.owner===t)continue;const A=a.kind===\"via\"?Cr(a.center,r,s):a.a.z===n?tu(r,s,a.a,a.b):1/0,c=(this.params.traceWidth+(a.kind===\"via\"?this.params.viaDiameter:this.params.traceWidth))/2+this.params.clearance;A\u003cc-1e-9\u0026\u0026o.add(a.owner)}}return o}blockingViaOwners(t,e){const n=new Set;if(!this.intersects(e))return n;for(const o of this.nearby(e)){if(o.owner===t)continue;const i=o.kind===\"via\"?tn(e,o.center):Cr(e,o.a,o.b),r=(this.params.viaDiameter+(o.kind===\"via\"?this.params.viaDiameter:this.params.traceWidth))/2+this.params.clearance;i\u003cr-1e-9\u0026\u0026n.add(o.owner)}return n}};function hSo(t){if(typeof t.fillViaOccupants!=\"function\"||typeof t.pushFlatOccupants!=\"function\")throw new Error(\"FanoutSolver: native via-occupant interface changed\");const e=t.fillViaOccupants.bind(t),n=t.pushFlatOccupants.bind(t),o=new Map;t.fillViaOccupants=(i,r)=\u003e{const s=o.get(i);if(s){const c=t._viaOccs;c.length=0;const l=t.usedCellsFlat,u=t.sharedCellsFlat;for(let g=0;g\u003cs.length;g++){const h=s[g];l\u0026\u0026u\u0026\u0026l[h]===-1\u0026\u0026!u[h]||n(h,r,c)}return}const a=[],A=t.pushFlatOccupants;t.pushFlatOccupants=(c,l,u)=\u003e{a.push(c),n(c,l,u)};try{e(i,r)}finally{t.pushFlatOccupants=A}o.set(i,Int32Array.from(a))}}var pSo=1e-9;function LPe(t){const{vias:e,activeConnectionIndices:n,traceWidth:o,clearance:i,gridStep:r}=t;for(const[g,h]of[[\"traceWidth\",o],[\"gridStep\",r]])if(!Number.isFinite(h)||h\u003c=0)throw new Error(`FanoutSolver: ${g} must be positive and finite`);if(!Number.isFinite(i)||i\u003c0)throw new Error(\"FanoutSolver: clearance must be non-negative and finite\");for(const g of e)if(!Number.isSafeInteger(g.connectionIndex)||g.connectionIndex\u003c0||!Number.isFinite(g.center.x)||!Number.isFinite(g.center.y)||!Number.isFinite(g.diameter)||g.diameter\u003c=0)throw new Error(\"FanoutSolver: invalid via channel grid site\");const s=g=\u003e(g%r+r)%r,a=g=\u003e{const h=s(g+r/2)-r/2;return Math.abs(h)\u003cNumber.EPSILON?0:h},A=(o+i)/r,c=Math.ceil(A-Number.EPSILON*Math.max(1,Math.abs(A))*4),l=Number.EPSILON*Math.max(1,r)*32,u=g=\u003e{const h=g===\"x\"?\"y\":\"x\",d=e.toSorted((y,x)=\u003ey.center[h]-x.center[h]||y.center[g]-x.center[g]||y.connectionIndex-x.connectionIndex),p=[];for(const y of d){const x=p.at(-1);x\u0026\u0026Math.abs(x[0].center[h]-y.center[h])\u003c=pSo?x.push(y):p.push([y])}const m=[];for(const y of p){y.sort((x,E)=\u003ex.center[g]-E.center[g]);for(let x=1;x\u003cy.length;x++){const E=y[x-1],B=y[x],S=E.center[g]+E.diameter/2+o/2+i,Q=B.center[g]-B.diameter/2-o/2-i-c*r;if(!Number.isFinite(S)||!Number.isFinite(Q))throw new Error(\"FanoutSolver: non-finite via channel bounds\");Q\u003cS-l||m.push({start:s(S),length:Math.max(0,Q-S),active:n.has(E.connectionIndex)||n.has(B.connectionIndex)})}}const _=m.filter(y=\u003ey.length\u003cr-l).flatMap(y=\u003e[y.start,s(y.start+y.length)]).sort((y,x)=\u003ey-x).filter((y,x,E)=\u003ex===0||y-E[x-1]\u003el);if(_.length===0)return 0;const f=y=\u003e{let x=0,E=0;for(const B of m)(B.length\u003e=r-l||s(y-B.start)\u003c=B.length+l)\u0026\u0026(E++,B.active\u0026\u0026x++);return[x,E]};let I={active:-1,total:-1,width:0,phase:0};const C=(y,x)=\u003e{y=a(y);const[E,B]=f(y);(E\u003eI.active||E===I.active\u0026\u0026(B\u003eI.total||B===I.total\u0026\u0026(x\u003eI.width+l||Math.abs(x-I.width)\u003c=l\u0026\u0026(Math.abs(y)\u003cMath.abs(I.phase)-l||Math.abs(Math.abs(y)-Math.abs(I.phase))\u003c=l\u0026\u0026y\u003cI.phase))))\u0026\u0026(I={active:E,total:B,width:x,phase:y})};for(let y=0;y\u003c_.length;y++){const x=_[y],E=_[y+1]??_[0]+r;E-x\u003el\u0026\u0026C((x+E)/2,E-x)}if(I.total===0)for(const y of _)C(y,0);return I.phase};return{x:u(\"x\"),y:u(\"y\")}}var mSo=class{constructor(t,e,n,o){this.planeSize=t,this.neighborOffset=n,this.neighborIds=o,this.layerStride=o.length+t,this.classes=new Uint32Array(this.layerStride*e)}planeSize;neighborOffset;neighborIds;classes;layerStride;values=[void 0,!0,!1];ownerIds=new Map;overflow=new Map;getSlot(t,e){const n=t\u003cthis.planeSize?t:t%this.planeSize,o=t\u003cthis.planeSize?0:(t-n)/this.planeSize*this.layerStride;if(e===n)return o+this.neighborIds.length+n;const i=this.neighborOffset[n+1];for(let r=this.neighborOffset[n];r\u003ci;r++)if(this.neighborIds[r]===e)return o+r;return-1}get(t,e,n=!1){if(n)return;const o=this.getSlot(t,e);return o\u003c0?this.overflow.get(t*this.planeSize+e):this.values[this.classes[o]]}set(t,e,n,o=!1){if(o)return;const i=this.getSlot(t,e);if(i\u003c0){this.overflow.set(t*this.planeSize+e,n);return}let r=n===!0?1:n===!1?2:this.ownerIds.get(n);r===void 0\u0026\u0026(r=this.values.length,this.values.push(n),this.ownerIds.set(n,r)),this.classes[i]=r}};function _So(t,e,n,o){const i=t.planeSize*t.layers;t.visitedStamp=new Uint32Array(i*3),t.bestGStamp=new Uint32Array(i*3),t.bestGValue=new Float64Array(i*3);let r=new Uint8Array(1024),s=new Int32Array(1024),a=0,A=-1,c=-1,l=-1,u=0;const g=()=\u003ee[t.activeConnId]===!0,h=(_,f,I,C,y)=\u003e_===0\u0026\u0026f===n\u0026\u0026C!==n?1:_===1\u0026\u0026f!==n\u0026\u0026f===C\u0026\u0026I!==y?2:_,d=t.nodePool.push.bind(t.nodePool);t.nodePool.push=(_,f,I,C,y,x)=\u003e{const E=d(_,f,I,C,y,x);if(E\u003e=r.length){const B=Math.max(E+1,r.length*2),S=new Uint8Array(B),Q=new Int32Array(B);S.set(r),Q.set(s),r=S,s=Q}if(C\u003c0||!g()){r[E]=0,s[E]=-1,u=0;const B=t.activeConnSeg;g()\u0026\u0026B\u0026\u0026B.startCellId===B.endCellId\u0026\u0026B.startZ===B.endZ\u0026\u0026(t.failed=!0)}else{const B=r[C],S=t.nodePool.z[C];r[E]=h(B,S,t.nodePool.cellId[C],_,f),s[E]=B===0\u0026\u0026S===n\u0026\u0026_!==n?f:s[C]}return E};const p=t.heap.pop.bind(t.heap);t.heap.pop=()=\u003e{const _=p();return a=r[_],u=a,A=s[_],c=t.nodePool.cellId[_],l=t.nodePool.z[_],_};const m=t.getSearchStateIdx.bind(t);return t.getSearchStateIdx=(_,f)=\u003em(_,f)+(g()?u*i:0),{beforeFirstVia:()=\u003e!g()||a===0,prepareMove(_,f,I){if(u=g()?h(a,l,c,_,f):0,!g())return!0;if(I\u0026\u0026_===n\u0026\u0026(u!==2||A\u003c0||Math.hypot(t.cellCenterX[f]-t.cellCenterX[A],t.cellCenterY[f]-t.cellCenterY[A])\u003co-1e-9))return!1;const C=t.activeConnSeg;return _!==C.endZ||f!==C.endCellId||u===2}}}function Jy(t,e){return t.targetLayerByBusId?.get(e)??t.targetLayer}var fSo=class extends fC{constructor(t){super(),this.options=t,this.activeSubSolver=t.router,this.MAX_ITERATIONS=Math.ceil(t.router.MAX_ITERATIONS/5e3)+1}options;partialCandidates=[];partialSignatures=new Set;_step(){const{router:t}=this.options;for(let e=0;e\u003c5e3\u0026\u0026!t.solved\u0026\u0026!t.failed;e++)t.step();this.collectPartialCandidate(),this.stats={iterations:t.iterations,routedConnectionCount:t.getSolvedRouteCount(),connectionCount:this.options.connectionCount},(t.solved||t.failed)\u0026\u0026(this.activeSubSolver=null,this.solved=!0)}collectPartialCandidate(){const{router:t,connectionCount:e,sourceOrigin:n,maximumPartialCandidates:o}=this.options;if(o===0||e\u003c(n?2:3)||t.getSolvedRouteCount()!==e-1)return;const i=t.getOutput(),r=i.map(s=\u003e{const a=s.route[Math.floor(s.route.length/2)];return`${s.connectionName}:${s.route.length}:${a.x},${a.y}`}).sort().join(\";\");this.partialSignatures.has(r)||n\u0026\u0026this.partialCandidates.length\u003e=o||(this.partialSignatures.add(r),this.partialCandidates.push(i),this.partialCandidates.length\u003eo\u0026\u0026this.partialCandidates.shift())}computeProgress(){return this.options.router.iterations/this.options.router.MAX_ITERATIONS}getConstructorParams(){return[this.options]}visualize(){return this.activeSubSolver?.visualize()??this.options.router.visualize()}},ISo=class d4n{constructor(e,n){this.cellSize=e,this.margin=n}cellSize;margin;buckets=new Map;add(e){let n,o,i,r;if(e.kind===\"segment\"){const s=e.segment,a=this.margin+s.width/2;n=Math.min(s.start.x,s.end.x)-a,o=Math.max(s.start.x,s.end.x)+a,i=Math.min(s.start.y,s.end.y)-a,r=Math.max(s.start.y,s.end.y)+a}else if(e.kind===\"via\"){const s=this.margin+e.diameter/2;n=e.center.x-s,o=e.center.x+s,i=e.center.y-s,r=e.center.y+s}else{const s=e.obstacle,a=Math.hypot(s.width,s.height)/2+this.margin;n=s.center.x-a,o=s.center.x+a,i=s.center.y-a,r=s.center.y+a}for(let s=this.cell(n);s\u003c=this.cell(o);s++)for(let a=this.cell(i);a\u003c=this.cell(r);a++){const A=`${s},${a}`,c=this.buckets.get(A)??new Set;c.add(e),this.buckets.set(A,c)}}nearby(e,n=e){const o=new Set;for(let i=this.cell(Math.min(e.x,n.x));i\u003c=this.cell(Math.max(e.x,n.x));i++)for(let r=this.cell(Math.min(e.y,n.y));r\u003c=this.cell(Math.max(e.y,n.y));r++)for(const s of this.buckets.get(`${i},${r}`)??[])o.add(s);return[...o]}clone(){const e=new d4n(this.cellSize,this.margin);for(const[n,o]of this.buckets)e.buckets.set(n,new Set(o));return e}cell(e){return Math.floor(e/this.cellSize)}};function sue(t){const e=[];for(const n of t){const o=e.at(-2),i=e.at(-1);if(o\u0026\u0026i\u0026\u0026o.z===i.z\u0026\u0026i.z===n.z){const r=i.x-o.x,s=i.y-o.y,a=n.x-i.x,A=n.y-i.y;Math.abs(r*A-s*a)\u003c1e-10\u0026\u0026r*a+s*A\u003e=0\u0026\u0026e.pop()}e.push(n)}return e}function aue(t,e,n){const o=new Map(t.buses.flatMap(s=\u003es.connections.map(a=\u003e[a.connection.name,{bus:s,connection:a}]))),i=new Map(t.terminals.map(s=\u003e[s.connection.connection.name,s])),r=[];for(const s of e){const a=o.get(s.connectionName),A=i.get(s.connectionName);if(!a||!A)return null;const{bus:c,connection:l}=a,u=sue(s.route),g=n.get(l.connectionIndex);if(!u.length||tn(u[0],A.viaPoint)\u003e1e-7||tn(u.at(-1),A.exitPoint)\u003e1e-7||t.startLayerByBusId!==void 0\u0026\u0026t.layerNames[u[0].z]!==t.startLayerByBusId.get(c.busId)||t.layerNames[u.at(-1).z]!==Jy(t,c.busId)||u.some(f=\u003e!(c.allowedLayers??t.layerNames).includes(t.layerNames[f.z])))return null;const h=i4({...t,bus:c,terminal:A,targetLayer:t.layerNames[u[0].z],targetLayerPoints:[A.viaPoint,A.exitPoint],sourceEscapePoints:g,allowBlindAndBuriedVias:!1}),d=h.trace.route.findIndex(f=\u003ef.route_type===\"via\");if(d\u003c0)return null;const p=h.trace.route.slice(0,d+2),m=g.slice(1).map((f,I)=\u003e({start:g[I],end:f,width:t.traceWidth,layer:l.sourceLayer})),_=[];for(let f=1;f\u003cu.length;f++){const I=u[f],C=u[f-1],y=t.layerNames[C.z],x=t.layerNames[I.z];if(y!==x){if(tn(C,I)\u003e1e-7)return null;_.push({center:{x:I.x,y:I.y},diameter:t.viaDiameter,holeDiameter:t.viaHoleDiameter,fromLayer:y,toLayer:x,spanLayers:[...t.layerNames]}),p.push({route_type:\"via\",x:I.x,y:I.y,from_layer:y,to_layer:x,via_diameter:t.viaDiameter,via_hole_diameter:t.viaHoleDiameter})}else tn(C,I)\u003e1e-9\u0026\u0026m.push({start:{x:C.x,y:C.y},end:{x:I.x,y:I.y},width:t.traceWidth,layer:x});p.push({route_type:\"wire\",x:I.x,y:I.y,layer:x,width:t.traceWidth})}r.push({...h,targetLayer:Jy(t,c.busId),trace:{...h.trace,route:p},segments:m,additionalVias:_,length:m.reduce((f,I)=\u003ef+tn(I.start,I.end),0)})}return r}function AE(t){return HPe(t,new WeakMap)}function*HPe(t,e){const{buses:n,allBuses:o,targetLayer:i,layerNames:r,traceWidth:s,clearance:a,viaDiameter:A,srj:c}=t,l=t.maximumIterations??3e7,u=t.heuristicWeight??1.5;if(!Number.isFinite(u)||u\u003c=0)throw new Error(\"heuristicWeight must be finite and positive\");if(!Number.isSafeInteger(l)||l\u003c1)throw new Error(\"maximumIterations must be a positive safe integer\");const g=t.maximumLocalRepairAttempts??3,h=t.maximumSourceOriginRepairAttempts??0;if(!Number.isSafeInteger(g)||g\u003c0)throw new Error(\"maximumLocalRepairAttempts must be a non-negative safe integer\");if(!Number.isSafeInteger(h)||h\u003c0)throw new Error(\"maximumSourceOriginRepairAttempts must be a non-negative safe integer\");const d=t.ripCost??8;if(!Number.isFinite(d)||d\u003c=0)throw new Error(\"ripCost must be finite and positive\");if(t.maximumRipEvents!==void 0\u0026\u0026(!Number.isSafeInteger(t.maximumRipEvents)||t.maximumRipEvents\u003c1))throw new Error(\"maximumRipEvents must be a positive safe integer\");const p=t.traceMarginExtra??s/2;if(!Number.isFinite(p)||p\u003c0)throw new Error(\"traceMarginExtra must be finite and non-negative\");const m=t.routeFromSourcePads??!1;if(t.terminalApproachLength!==void 0\u0026\u0026(!Number.isFinite(t.terminalApproachLength)||t.terminalApproachLength\u003c=0))throw new Error(\"terminalApproachLength must be finite and positive\");const _=m||t.startLayerByBusId!==void 0||t.terminalApproachLength!==void 0,f=t.sourceLayerTravelCost??1;if(!Number.isFinite(f)||f\u003c1)throw new Error(\"sourceLayerTravelCost must be finite and at least one\");const I=[...new Set(n.map(mt=\u003eJy(t,mt.busId)))],C=t.startLayerByBusId?n.map(mt=\u003et.startLayerByBusId.get(mt.busId)):[],y=m?[...new Set([i,\"top\",...t.transitLayers??[],...I,...C])]:[...new Set([i,...t.transitLayers??[],...I,...C])],x=r.indexOf(i),E=m\u0026\u0026t.allowSourceOriginTopFinal===!0\u0026\u0026I.includes(\"top\"),B=E?n.filter(mt=\u003eJy(t,mt.busId)===\"top\"):[],S=new Map(B.map(mt=\u003e[mt.busId,o.find(st=\u003est.busId===mt.busId)])),Q=new Set((E?o:[]).flatMap(mt=\u003emt.termination.type===\"plane\"?[mt.termination.layer]:[]));if(B.some(mt=\u003e{const st=S.get(mt.busId);if(!st||mt.connections.length!==st.connections.length||mt.connections.some(Xe=\u003e!st.connections.some(Ze=\u003eZe.connectionIndex===Xe.connectionIndex\u0026\u0026Ze.connection.name===Xe.connection.name\u0026\u0026Ze.sourceObstacle===Xe.sourceObstacle)))return!0;const xt=(st.routableEscapeLayers??st.allowedLayers??r).filter(Xe=\u003e(st.allowedLayers??r).includes(Xe));return!xt.includes(\"top\")||!y.some(Xe=\u003eXe!==\"top\"\u0026\u0026!Q.has(Xe)\u0026\u0026xt.includes(Xe)\u0026\u0026(mt.routableEscapeLayers??mt.allowedLayers??r).includes(Xe)\u0026\u0026(mt.allowedLayers??r).includes(Xe))})||n.length===0||x\u003c0||I.some(mt=\u003e!r.includes(mt))||t.targetLayerByBusId\u0026\u0026n.some(mt=\u003e!t.targetLayerByBusId.has(mt.busId))||t.startLayerByBusId\u0026\u0026(m||n.some(mt=\u003e!t.startLayerByBusId.has(mt.busId)))||y.some(mt=\u003e!r.includes(mt)))return null;const w=n.flatMap(mt=\u003emt.connections),M=new Set(w.map(mt=\u003emt.connectionIndex));if(m\u0026\u0026w.some(mt=\u003emt.sourceLayer!==\"top\")||M.size!==w.length||t.terminals.length!==w.length||new Set(t.terminals.map(mt=\u003emt.connection.connectionIndex)).size!==M.size||t.terminals.some(mt=\u003e!M.has(mt.connection.connectionIndex))||n.some(mt=\u003emt.termination.type!==\"boundary\"||!(mt.allowedLayers??r).includes(Jy(t,mt.busId))||!(mt.routableEscapeLayers??mt.allowedLayers??r).includes(Jy(t,mt.busId)))||(t.startLayerByBusId?n.some(mt=\u003e{const st=t.startLayerByBusId.get(mt.busId);return!(mt.allowedLayers??r).includes(st)||!(mt.routableEscapeLayers??mt.allowedLayers??r).includes(st)||mt.connections.some(xt=\u003ext.sourceLayer===st)}):!E\u0026\u0026o.some(mt=\u003emt.connections.some(st=\u003eI.includes(st.sourceLayer)))))return null;const k=n[0].sharedBoundary;if(n.some(mt=\u003eObject.keys(k).some(st=\u003emt.sharedBoundary[st]!==k[st])))return null;const R=new Map,F=new Map,O=new ISo(Math.max(.5,A*2),Math.max(s,A)/2+a+1e-7),U=new Map(w.map(mt=\u003e[mt.connection.name,mt])),Y=new Map(w.map(mt=\u003e[mt.sourceObstacle,mt])),W=m?new Map(w.map(mt=\u003e[mt.sourceObstacle,{connectionName:mt.connection.name,sourcePoint:U.get(mt.connection.name).sourcePoint}])):void 0;for(const mt of c.obstacles)O.add({kind:\"obstacle\",obstacle:mt});for(const mt of o)for(const st of mt.connections){F.set(st.connection.name,mt);const xt=t.fixedViaPointsByConnectionIndex.get(st.connectionIndex);if(!xt)return null;const Xe=t.sourceEscapePaths?.get(st.connectionIndex)??[st.sourcePoint,xt];if(Xe.length\u003c2||tn(Xe[0],st.sourcePoint)\u003e1e-7||tn(Xe.at(-1),xt)\u003e1e-7)return null;if(R.set(st.connectionIndex,Xe),!(m\u0026\u0026M.has(st.connectionIndex))){O.add({kind:\"via\",connectionName:st.connection.name,center:xt,diameter:A,layers:r});for(let Ze=1;Ze\u003cXe.length;Ze++)O.add({kind:\"segment\",connectionName:st.connection.name,segment:{start:Xe[Ze-1],end:Xe[Ze],width:s,layer:st.sourceLayer}})}}for(const mt of t.terminals)if(tn(mt.viaPoint,t.fixedViaPointsByConnectionIndex.get(mt.connection.connectionIndex))\u003e1e-7)return null;for(const mt of t.acceptedPlans){for(const st of[...mt.segments,...mt.planeEndpointSegments??[]])O.add({kind:\"segment\",connectionName:mt.connectionName,segment:st});for(const st of[mt.via,...mt.additionalVias??[],mt.planeEndpointVia])st\u0026\u0026O.add({kind:\"via\",connectionName:mt.connectionName,...st,layers:st.spanLayers})}for(const mt of Z7(c,!1)){for(const st of mt.segments)O.add({kind:\"segment\",connectionName:mt.connectionName,segment:st});for(const st of mt.vias)O.add({kind:\"via\",connectionName:mt.connectionName,...st,layers:st.spanLayers})}const te=new Map;if(t.terminalApproachLength!==void 0)for(const mt of t.terminals){const st=mt.connection.connection.name,xt=F.get(st),Xe=aSo({connectionName:st,edge:xt.exitEdge??Xj(xt.direction),layer:Jy(t,xt.busId),exit:mt.exitPoint,bounds:k,approachLength:t.terminalApproachLength});te.set(st,Xe),O.add({kind:\"segment\",connectionName:st,segment:{start:Xe.goal,end:Xe.exit,width:s,layer:Xe.layer}})}const j={capacityMeshNodeId:\"reserved-via-buses\",center:{x:(k.minX+k.maxX)/2,y:(k.minY+k.maxY)/2},width:k.maxX-k.minX,height:k.maxY-k.minY,availableZ:y.map(mt=\u003er.indexOf(mt)),portPoints:t.terminals.flatMap(mt=\u003e[m?mt.connection.sourcePoint:mt.viaPoint,te.get(mt.connection.connection.name)?.goal??mt.exitPoint].map((st,xt)=\u003e({...st,z:m\u0026\u0026xt===0?r.indexOf(mt.connection.sourceLayer):xt===0\u0026\u0026t.startLayerByBusId?r.indexOf(t.startLayerByBusId.get(F.get(mt.connection.connection.name).busId)):r.indexOf(Jy(t,F.get(mt.connection.connection.name).busId)),connectionName:mt.connection.connection.name,rootConnectionName:mt.connection.connection.name})))};if(t.tightViaChannels){const mt=LPe({vias:[...t.fixedViaPointsByConnectionIndex].filter(([st])=\u003e!m||!t.sourceOriginPhysicalGridPhase||!M.has(st)).map(([st,xt])=\u003e({connectionIndex:st,center:xt,diameter:A})),activeConnectionIndices:M,traceWidth:s,clearance:a,gridStep:s});for(const st of[\"x\",\"y\"]){const xt=(st===\"x\"?k.minX:k.minY)+s/2;j.center[st]+=mt[st]-(xt+Math.round((mt[st]-xt)/s)*s)}}const oe=new Vz({nodeWithPortPoints:j,traceWidth:s,viaDiameter:A}).generateSolver({HIGH_DENSITY_A03:!0});if(typeof oe.computeMoveCostAndRips!=\"function\"||typeof oe.markTraceFootprint!=\"function\"||typeof oe.addSharedOccupant!=\"function\"||typeof oe.getSolvedRouteCount!=\"function\"||te.size\u003e0\u0026\u0026(typeof oe.pointToCell!=\"function\"||typeof oe.finalizeRoute!=\"function\"||typeof oe.ripTrace!=\"function\"))return null;const ie=oe.constructor,ne=new ie({nodeWithPortPoints:j,highResolutionCellSize:s,lowResolutionCellSize:s,traceThickness:s,traceMargin:a+p,viaDiameter:A,maxCellCount:16e4*y.length,effort:20,hyperParameters:{shuffleSeed:t.shuffleSeed??1,greedyMultiplier:u,ripCost:d}}),le=ne._setup.bind(ne),ge=ne.computeMoveCostAndRips.bind(ne);let _e=-1,ue=-1,fe=[],pe=[],ye,Me=[],ve=new Set,he;const Qe=new Map,Pe=new WeakMap,we=new Map;let Te;const Re=mt=\u003e({x:ne.cellCenterX[mt],y:ne.cellCenterY[mt]}),Ee=mt=\u003emt.x\u003e=k.minX-1e-9\u0026\u0026mt.x\u003c=k.maxX+1e-9\u0026\u0026mt.y\u003e=k.minY-1e-9\u0026\u0026mt.y\u003c=k.maxY+1e-9,ke=mt=\u003e{const st=we.get(mt);if(st!==void 0)return st;const xt=Re(mt),Xe=O.nearby(xt).every(Ze=\u003eZe.kind===\"via\"?tn(xt,Ze.center)\u003e=(A+Ze.diameter)/2+a-1e-9:Ze.kind===\"segment\"?Cr(xt,Ze.segment.start,Ze.segment.end)\u003e=(A+Ze.segment.width)/2+a-1e-9:Tl({start:xt,end:xt},Ze.obstacle)\u003e=A/2+a-1e-9);return we.set(mt,Xe),Xe};ne._setup=()=\u003e{if(le(),ne.failed)return;if(t.includeDiagonalNeighbors\u0026\u0026Object.assign(ne,sSo(ne)),te.size\u003e0){if(typeof ne.ripChain?.contains!=\"function\"||typeof ne.ripChain?.append!=\"function\"||!Number.isFinite(ne.hyperParameters.ripTracePenalty)||!Number.isFinite(ne.hyperParameters.ripViaPenalty)){ne.failed=!0;return}for(const Wt of te.values())if(!Le(Wt.goal,Wt.exit,Wt.layer,Wt.connectionName)){ne.failed=!0;return}const st=[...te.values()].map(Wt=\u003e({connector:Wt,cellId:ne.pointToCell(Wt.goal).cellId})),xt=uSo({grid:ne,terminals:st,margin:Math.max(s,A)+a+1e-7,segmentIsClear:(Wt,Xt,Jt)=\u003eEe(Wt)\u0026\u0026Ee(Xt)\u0026\u0026Le(Wt,Xt,Jt.layer,Jt.connectionName)});ne.neighborOffset=xt.neighborOffset,ne.neighborIds=xt.neighborIds,ne.neighborCosts=xt.neighborCosts,ve=xt.extendedEdges;const Xe=new Map(st.map(({connector:Wt,cellId:Xt})=\u003e[Wt.connectionName,Xt])),Ze=ne.getOutput.bind(ne);ne.getOutput=()=\u003eZe().map(Wt=\u003e{const Xt=gSo(Wt,te.get(Wt.connectionName),Re(Xe.get(Wt.connectionName))),Jt=[];if(!m){const ht=U.get(Wt.connectionName),Kt=R.get(ht.connectionIndex);for(let rn=1;rn\u003cKt.length;rn++)Jt.push({start:Kt[rn-1],end:Kt[rn],width:s,layer:ht.sourceLayer})}const yn=Wt.route.at(-2).z!==Wt.route.at(-1).z,An=Wt.route.length-(yn?1:2);let kn=-1;for(let ht=1;ht\u003cXt.route.length;ht++){const Kt=Xt.route[ht-1],rn=Xt.route[ht];Kt.z===rn.z\u0026\u0026(ht-1===An\u0026\u0026(kn=Jt.length),Jt.push({start:Kt,end:rn,width:s,layer:r[Kt.z]}))}const $n={rawSegments:Jt,firstEntrySegmentIndex:kn};return Qe.set(Wt.connectionName,$n),Pe.set(Xt,$n),Xt}),he=new dSo({regions:xt.regions,traceWidth:s,clearance:a,viaDiameter:A,getRoutes:()=\u003ene.getOutput()});const dt=ne.finalizeRoute.bind(ne),Ut=ne.ripTrace.bind(ne);ne.finalizeRoute=Wt=\u003e{dt(Wt),he.invalidate()},ne.ripTrace=Wt=\u003e{Ut(Wt),he.invalidate()}}hSo(ne),Te=new mSo(ne.planeSize,y.length,ne.neighborOffset,ne.neighborIds),fe=Array.from({length:y.length},(st,xt)=\u003er[ne.layerToZ.get(xt)]),pe=ne.connIdToName.map(st=\u003e{const xt=F.get(st),Xe=xt?(xt.routableEscapeLayers??xt.allowedLayers??r).filter(Ut=\u003e(xt.allowedLayers??r).includes(Ut)):[],Ze=xt\u0026\u0026S.get(xt.busId),dt=Ze?(Ze.routableEscapeLayers??Ze.allowedLayers??r).filter(Ut=\u003e(Ze.allowedLayers??r).includes(Ut)\u0026\u0026!Q.has(Ut)):void 0;return fe.map(Ut=\u003e(Xe.includes(Ut)||m\u0026\u0026Ut===\"top\")\u0026\u0026(!dt||dt.includes(Ut)))}),ne.MAX_ITERATIONS=l,t.maximumRipEvents!==void 0\u0026\u0026(ne.MAX_RIPS=t.maximumRipEvents),ne.gridToBoundsTransform={a:1,b:0,c:0,d:0,e:1,f:0};const mt=ne.heap.pop.bind(ne.heap);if(ne.heap.pop=()=\u003e{const st=mt();return _e=ne.nodePool.cellId[st],ue=ne.nodePool.z[st],st},E){const st=ne.layers*ne.planeSize,xt=fe.indexOf(\"top\");if(typeof ne.getSearchStateIdx!=\"function\"||typeof ne.nodePool.push!=\"function\"||!(ne.visitedStamp instanceof Uint32Array)||!(ne.bestGStamp instanceof Uint32Array)||!(ne.bestGValue instanceof Float64Array)||ne.visitedStamp.length!==st||ne.bestGStamp.length!==st||ne.bestGValue.length!==st||ne.getSearchStateIdx(0,0)!==0||ne.getSearchStateIdx(st-1,1)!==st-1||xt\u003c0){ne.failed=!0;return}Me=ne.connIdToName.map(Xe=\u003e{const Ze=F.get(Xe);return!!Ze\u0026\u0026Jy(t,Ze.busId)===\"top\"}),ye=_So(ne,Me,xt,A+a)}},ne.markTraceFootprint=(mt,st,xt,Xe)=\u003e{const Ze=Re(xt),dt=ne.traceKeepoutRadius;ne.forEachCellNearCircle(Ze.x,Ze.y,dt,Ut=\u003e{const Wt=t.tightViaChannels?ne.cellCenterX[Ut]-Ze.x:Math.max(ne.cellMinX[Ut]-Ze.x,0,Ze.x-ne.cellMaxX[Ut]),Xt=t.tightViaChannels?ne.cellCenterY[Ut]-Ze.y:Math.max(ne.cellMinY[Ut]-Ze.y,0,Ze.y-ne.cellMaxY[Ut]),Jt=dt-(t.tightViaChannels?1e-9:0);if(t.tightViaChannels?Wt*Wt+Xt*Xt\u003e=Jt*Jt:Wt*Wt+Xt*Xt\u003eJt*Jt)return;const yn=st*ne.planeSize+Ut;if(Ut!==xt\u0026\u0026ne.shouldSkipFixedPortHalo(yn,mt))return;const An=ne.usedCellsFlat[yn];An!==-1\u0026\u0026An!==mt?ne.addSharedOccupant(yn,mt):ne.usedCellsFlat[yn]=mt,Xe.push(yn)})};const Ce=(mt,st,xt,Xe)=\u003eXe.kind===\"obstacle\"?!Xe.obstacle.layers.includes(xt)||Tl({start:mt,end:st},Xe.obstacle)\u003e=s/2+a-1e-9:Xe.kind===\"via\"?!Xe.layers.includes(xt)||Cr(Xe.center,mt,st)\u003e=(s+Xe.diameter)/2+a-1e-9:Xe.segment.layer!==xt||tu(mt,st,Xe.segment.start,Xe.segment.end)\u003e=(s+Xe.segment.width)/2+a-1e-9,Le=(mt,st,xt,Xe,Ze=O.nearby(mt,st))=\u003eZe.every(dt=\u003edt.kind!==\"obstacle\"\u0026\u0026dt.connectionName===Xe||m\u0026\u0026dt.kind===\"obstacle\"\u0026\u0026xt===\"top\"\u0026\u0026Y.get(dt.obstacle)?.connection.name===Xe\u0026\u0026Tl({start:mt,end:mt},dt.obstacle)\u003cs/2+a-1e-9\u0026\u0026tn(st,U.get(Xe).sourcePoint)\u003e=tn(mt,U.get(Xe).sourcePoint)-1e-9||Ce(mt,st,xt,dt)),Ye=(mt,st,xt)=\u003e{let Xe;for(const Ze of O.nearby(mt,st)){if(Ce(mt,st,xt,Ze))continue;if(Ze.kind===\"obstacle\"\u0026\u0026!m)return!1;const dt=Ze.kind===\"obstacle\"?rSo(mt,st,xt,s,a,Ze.obstacle,W?.get(Ze.obstacle)):Ze.connectionName;if(dt===void 0||Xe!==void 0\u0026\u0026Xe!==dt)return!1;Xe=dt}return Xe??!0};ne.computeMoveCostAndRips=(mt,st,xt,Xe,Ze,dt,Ut)=\u003e{const Wt=ne.connIdToName[mt],Xt=fe[st],Jt=ne.activeConnSeg;if(ye\u0026\u0026!ye.prepareMove(st,xt,Xe)||!pe[mt][st]||Xe\u0026\u0026(m\u0026\u0026Xt===\"top\"\u0026\u0026!Me[mt]||!ke(xt))){ne._moveCost=-1;return}const yn=_e===Jt.startCellId\u0026\u0026(!_||ue===Jt.startZ)\u0026\u0026(!ye||ye.beforeFirstVia());let An,kn,$n;if(he){const Lt=xt===Jt.endCellId\u0026\u0026st===Jt.endZ;if(ve.has(`${_e}:${xt}`)\u0026\u0026!Lt){ne._moveCost=-1;return}const Ho=te.get(Wt);if(An=yn?Jt.startPoint:Re(_e),kn=Lt?Jt.endPoint:Re(xt),$n=Lt?rue(Xe?Re(xt):An,Ho):void 0,Lt\u0026\u0026(!$n||Xe\u0026\u0026tn(An,Re(xt))\u003e1e-7)){ne._moveCost=-1;return}}const ht=st*ne.planeSize+_e,Kt=yn||xt===Jt.endCellId\u0026\u0026(!_||st===Jt.endZ);let rn=Te.get(ht,xt,Kt);if(rn===void 0){if(An??=yn?Jt.startPoint:Re(_e),kn??=xt===Jt.endCellId\u0026\u0026(!_||st===Jt.endZ)?Jt.endPoint:Re(xt),!Ee(An)||!Ee(kn)){ne._moveCost=-1;return}rn=Kt?$n?$n.slice(1).every((Lt,Ho)=\u003eLe($n[Ho],Lt,Xt,Wt)):Le(An,kn,Xt,Wt):Ye(An,kn,Xt),Te.set(ht,xt,rn,Kt)}if(rn!==!0\u0026\u0026rn!==Wt){ne._moveCost=-1;return}if(ge(mt,st,xt,Xe,Ze,dt,Ut),he\u0026\u0026ne._moveCost\u003e=0){const Lt=Xe?he.blockingViaOwners(Wt,Re(xt)):he.blockingSegmentOwners(Wt,$n??[An,kn],ne.layerToZ.get(st));if(Xe\u0026\u0026$n)for(const Ho of he.blockingSegmentOwners(Wt,$n,ne.layerToZ.get(st)))Lt.add(Ho);for(const Ho of Lt){const Ao=ne.connIdToName.indexOf(Ho);if(Ao\u003c0)throw new Error(\"Cannot resolve dynamic terminal copper owner\");ne.ripChain.contains(ne._moveRippedHead,Ao)||(ne._moveRippedHead=ne.ripChain.append(ne._moveRippedHead,Ao),ne._moveRipCount++,ne._moveCost+=d),ne._moveCost+=Xe?ne.hyperParameters.ripViaPenalty:ne.hyperParameters.ripTracePenalty}}m\u0026\u0026!Xe\u0026\u0026Xt===\"top\"\u0026\u0026ne._moveCost\u003e=0\u0026\u0026(!ye||ye.beforeFirstVia())\u0026\u0026(ne._moveCost+=Ut*(f-1))};const tt=m?h:g;ne.setup();const At=new fSo({router:ne,connectionCount:w.length,sourceOrigin:m,maximumPartialCandidates:tt});for(yield{type:\"subsolver\",solver:At,iterations:ne.iterations,routedConnectionCount:ne.getSolvedRouteCount(),connectionCount:w.length};!At.solved\u0026\u0026!At.failed;)At.step(),yield{iterations:ne.iterations,routedConnectionCount:ne.getSolvedRouteCount(),connectionCount:w.length};const{partialCandidates:at}=At,nt=mt=\u003eo.flatMap(st=\u003est.connections.filter(xt=\u003e!mt.has(xt.connectionIndex)).map(xt=\u003e{const Xe=t.fixedViaPointsByConnectionIndex.get(xt.connectionIndex),Ze=st.termination.type===\"plane\"?st.termination.layer:(st.allowedLayers??r).find(dt=\u003edt!==xt.sourceLayer);return i4({...t,bus:st,terminal:{connection:xt,viaPoint:Xe,exitPoint:Xe},targetLayer:Ze,targetLayerPoints:[Xe],sourceEscapePoints:R.get(xt.connectionIndex),allowBlindAndBuriedVias:!1})})),gt=(mt,st=new Set)=\u003e{const xt=nt(new Set([...[...mt,...t.acceptedPlans].map(Xe=\u003eXe.connectionIndex),...st]));return(te.size===0||mt.every(Xe=\u003e{const Ze=te.get(Xe.connectionName);if(!Ze)return!0;const dt=Xe.segments.at(-1);return!!dt\u0026\u0026dt.layer===Ze.layer\u0026\u0026tn(dt.end,Ze.exit)\u003c1e-7\u0026\u0026Cr(Ze.goal,dt.start,dt.end)\u003c1e-7\u0026\u0026FPe({plan:Xe,splice:e.get(Xe)??Qe.get(Xe.connectionName)??{rawSegments:[],firstEntrySegmentIndex:-1},maximumJoinLength:s/4,clearance:a})}))\u0026\u0026Wh({plans:[...mt],srj:c,sharedBoundary:k,clearance:a,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1})\u0026\u0026qu({inputSrj:c,routedSrj:{...c,traces:[...c.traces??[],...[...mt,...t.acceptedPlans,...xt].flatMap(Xe=\u003e[Xe.trace,...Xe.planeEndpointTrace?[Xe.planeEndpointTrace]:[]])]},clearance:a,allowBlindAndBuriedVias:!1}).valid},bt=(mt,st)=\u003e{const xt=mt.findIndex((Ut,Wt)=\u003eWt\u003e0\u0026\u0026Ut.z!==mt[Wt-1].z);if(xt\u003c1||mt.slice(0,xt).some(Ut=\u003er[Ut.z]!==\"top\")||tn(mt[xt-1],mt[xt])\u003e1e-7)return!1;const Xe=F.get(st);if(!S.has(Xe.busId))return!mt.slice(xt).some(Ut=\u003er[Ut.z]===\"top\");let Ze=!1,dt=!1;for(let Ut=xt+1;Ut\u003cmt.length;Ut++){const Wt=mt[Ut-1],Xt=mt[Ut];if(Wt.z===Xt.z\u0026\u0026r[Wt.z]!==\"top\"\u0026\u0026tn(Wt,Xt)\u003e1e-7\u0026\u0026(Ze=!0),Wt.z!==Xt.z\u0026\u0026r[Xt.z]===\"top\"){if(!Ze||tn(Wt,Xt)\u003e1e-7||tn(mt[xt],Xt)\u003cA+a-1e-9)return!1;dt=!0}}return dt\u0026\u0026ENt({points:mt,topZ:r.indexOf(\"top\"),traceWidth:s,viaDiameter:A,clearance:a})},Ct=mt=\u003e{if(Qe.clear(),te.size===0)return!0;for(const st of mt){const xt=Pe.get(st);if(!xt)return!1;Qe.set(st.connectionName,xt)}return!0},Dt=(mt,st=new Set)=\u003e{if(!mt||!gt(mt,st))return null;for(const xt of mt){const Xe=Qe.get(xt.connectionName);Xe\u0026\u0026!e.has(xt)\u0026\u0026e.set(xt,Xe)}return mt},kt=mt=\u003e{if(te.size===0)return mt;const st=lSo({plans:mt,splices:Qe,connectors:te,clearance:a,segmentIsClear:(xt,Xe)=\u003eEe(xt.start)\u0026\u0026Ee(xt.end)\u0026\u0026Le(xt.start,xt.end,xt.layer,Xe)});if(!st)return null;for(const[xt,Xe]of st.splices)Qe.set(xt,Xe);return st.plans},it=(mt,st=new Set)=\u003e{if(!Ct(mt))return null;const xt=new Map(R),Xe=[],Ze=[];for(const ht of mt){const Kt=t.terminals.find(Ho=\u003eHo.connection.connection.name===ht.connectionName),rn=ht.route.findIndex((Ho,Ao)=\u003eAo\u003e0\u0026\u0026Ho.z!==ht.route[Ao-1].z);if(!bt(ht.route,ht.connectionName)||r[ht.route.at(-1).z]!==Jy(t,F.get(ht.connectionName).busId)||tn(ht.route[rn-1],ht.route[rn])\u003e1e-7)return null;const Lt=ht.route[rn];xt.set(Kt.connection.connectionIndex,sue(ht.route.slice(0,rn)).map(({x:Ho,y:Ao})=\u003e({x:Ho,y:Ao}))),Xe.push({...Kt,viaPoint:{x:Lt.x,y:Lt.y}}),Ze.push({...ht,route:ht.route.slice(rn),vias:[]})}const dt=aue({...t,terminals:Xe},Ze,xt);if(!dt)return null;const Ut=kt(dt);if(!Ut)return null;const Wt=MPe({...t,inputSrj:c,plans:Ut,preparedBuses:n,reservedPlans:[...t.acceptedPlans,...nt(M)],allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});if(!Wt)return null;const Xt=Wt.map(ht=\u003e({connectionName:ht.connectionName,route:ht.trace.route.flatMap(Kt=\u003eKt.route_type===\"wire\"?[{x:Kt.x,y:Kt.y,z:r.indexOf(Kt.layer)}]:[]),vias:[ht.via.center]})),Jt=O.clone(),yn=ht=\u003e{for(let Kt=1;Kt\u003cht.route.length;Kt++){const rn=ht.route[Kt-1],Lt=ht.route[Kt];rn.z===Lt.z?Jt.add({kind:\"segment\",connectionName:ht.connectionName,segment:{start:rn,end:Lt,width:s,layer:r[rn.z]}}):Jt.add({kind:\"via\",connectionName:ht.connectionName,center:rn,diameter:A,layers:r})}};Xt.forEach(yn);const An=[],kn=[];for(const ht of Xt){const Kt=t.terminals.find(Ao=\u003eAo.connection.connection.name===ht.connectionName),rn=eR({points:sue(ht.route),chamfer:s/4,segmentIsClear:(Ao,qe)=\u003e{for(const vt of[Ao,qe])if(!Ee(vt)||(Math.abs(vt.x-k.minX)\u003c1e-7||Math.abs(vt.x-k.maxX)\u003c1e-7||Math.abs(vt.y-k.minY)\u003c1e-7||Math.abs(vt.y-k.maxY)\u003c1e-7)\u0026\u0026tn(vt,Kt.exitPoint)\u003e1e-7)return!1;return Le(Ao,qe,r[Ao.z],ht.connectionName,Jt.nearby(Ao,qe))}});if(!rn)return null;const Lt=rn.findIndex((Ao,qe)=\u003eqe\u003e0\u0026\u0026Ao.z!==rn[qe-1].z);if(!bt(rn,ht.connectionName)||r[rn.at(-1).z]!==Jy(t,F.get(ht.connectionName).busId))return null;const Ho=rn[Lt];R.set(Kt.connection.connectionIndex,rn.slice(0,Lt).map(({x:Ao,y:qe})=\u003e({x:Ao,y:qe}))),kn.push({...Kt,viaPoint:{x:Ho.x,y:Ho.y}}),An.push({...ht,route:rn.slice(Lt),vias:[]}),yn({...ht,route:rn})}const $n=aue({...t,terminals:kn},An,R);return Dt($n,st)},Yt=mt=\u003e{if(!Ct(mt))return null;let st=mt;const xt=O.clone(),Xe=new Set([...st.map(yn=\u003et.terminals.find(An=\u003eAn.connection.connection.name===yn.connectionName).connection.connectionIndex),...t.acceptedPlans.map(yn=\u003eyn.connectionIndex)]),Ze=nt(Xe),dt=aue(t,st,R);if(!dt)return null;const Ut=kt(dt);if(!Ut)return null;const Wt=MPe({...t,inputSrj:c,plans:Ut,preparedBuses:n,reservedPlans:[...t.acceptedPlans,...Ze],allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});if(!Wt)return null;st=Wt.map(yn=\u003e{const An=yn.trace.route.findIndex(kn=\u003ekn.route_type===\"via\");return{connectionName:yn.connectionName,route:yn.trace.route.slice(An+1).flatMap(kn=\u003ekn.route_type===\"wire\"?[{x:kn.x,y:kn.y,z:r.indexOf(kn.layer)}]:[]),vias:(yn.additionalVias??[]).map(kn=\u003ekn.center)}});const Xt=yn=\u003e{for(let An=1;An\u003cyn.route.length;An++){const kn=yn.route[An-1],$n=yn.route[An];kn.z===$n.z\u0026\u0026xt.add({kind:\"segment\",connectionName:yn.connectionName,segment:{start:kn,end:$n,width:s,layer:r[kn.z]}})}for(const An of yn.vias)xt.add({kind:\"via\",connectionName:yn.connectionName,center:An,diameter:A,layers:r})};for(const yn of st)Xt(yn);for(const yn of st){const An=t.terminals.find($n=\u003e$n.connection.connection.name===yn.connectionName),kn=eR({points:sue(yn.route),chamfer:s/4,segmentIsClear:($n,ht)=\u003e{for(const Kt of[$n,ht])if(!Ee(Kt)||(Math.abs(Kt.x-k.minX)\u003c1e-7||Math.abs(Kt.x-k.maxX)\u003c1e-7||Math.abs(Kt.y-k.minY)\u003c1e-7||Math.abs(Kt.y-k.maxY)\u003c1e-7)\u0026\u0026tn(Kt,An.exitPoint)\u003e1e-7)return!1;return Le($n,ht,r[$n.z],yn.connectionName,xt.nearby($n,ht))}});if(!kn)return null;yn.route=kn,Xt(yn)}const Jt=aue(t,st,R);return Dt(Jt)};if(ne.solved\u0026\u0026!ne.failed){const mt=ne.getOutput();return mt.length!==w.length||new Set(mt.map(st=\u003est.connectionName)).size!==w.length?null:m?it(mt):Yt(mt)}if(m\u0026\u0026h\u003e0){for(const mt of at){const st=new Set(mt.map(Xt=\u003eXt.connectionName)),xt=t.terminals.filter(Xt=\u003e!st.has(Xt.connection.connection.name));if(xt.length!==1)continue;const Xe=xt[0].connection.connectionIndex,Ze=new Map(R),dt=it(mt,new Set([Xe]));R.clear();for(const[Xt,Jt]of Ze)R.set(Xt,Jt);if(!dt)continue;const Ut=CSo(t,dt,e);let Wt=Ut.next();for(;!Wt.done;)yield{iterations:ne.iterations+Wt.value.iterations,routedConnectionCount:Wt.value.routedConnectionCount,connectionCount:w.length},Wt=Ut.next();if(Wt.value\u0026\u0026gt(Wt.value))return Wt.value}return null}if(m||g===0||at.length===0)return null;const pn=nt(new Set(t.acceptedPlans.map(mt=\u003emt.connectionIndex))),be=new Map(pn.map(mt=\u003e[mt.connectionIndex,mt])),et=pn.flatMap(mt=\u003emt.via?[{connectionName:mt.connectionName,via:mt.via}]:[]),It=LPe({...t,gridStep:s,vias:o.flatMap(mt=\u003emt.connections.map(st=\u003e({connectionIndex:st.connectionIndex,center:t.fixedViaPointsByConnectionIndex.get(st.connectionIndex),diameter:A}))),activeConnectionIndices:M});let Bt=0;for(const mt of at.toReversed()){const st=Yt(mt);if(!st)continue;const xt=new Set(st.map(dt=\u003edt.connectionIndex)),Xe=t.terminals.find(dt=\u003e!xt.has(dt.connection.connectionIndex)),Ze=st.toSorted((dt,Ut)=\u003etn(dt.exitPoint,Xe.exitPoint)-tn(Ut.exitPoint,Xe.exitPoint));for(const dt of Ze.slice(0,16)){const Ut=Xe.connection.connectionIndex,Wt=st.filter($n=\u003e$n!==dt),Xt=[...t.acceptedPlans,...Wt,...pn.filter($n=\u003e!xt.has($n.connectionIndex)\u0026\u0026$n.connectionIndex!==Ut),be.get(dt.connectionIndex)],Jt=F.get(Xe.connection.connection.name),yn=BC({...t,bus:{...Jt,exitEdge:Jt.exitEdge??Xj(Jt.direction),connections:[Xe.connection]},terminals:[Xe],targetLayer:Jy(t,Jt.busId),acceptedPlans:Xt,reservedVias:et.filter($n=\u003e$n.connectionName!==Xe.connection.connection.name),sourceEscapePaths:R,gridStep:s,gridOrigin:It,gridStepDivisor:2,maximumRouteOrderAttempts:1,maximumSearchStates:24e4,heuristicWeight:1,alignGridToPads:!0},1,!1);let An=yn.next();for(;!An.done;)yield{iterations:ne.iterations+An.value.expandedStateCount,routedConnectionCount:st.length,connectionCount:w.length},An=yn.next();if(!An.value[0]?.length)continue;const kn=Wt.toSorted(($n,ht)=\u003e{const Kt=rn=\u003eMath.min(...rn.segments.filter(Lt=\u003eLt.layer===Jy(t,Jt.busId)).map(Lt=\u003eCr(Xe.viaPoint,Lt.start,Lt.end)));return Kt($n)-Kt(ht)});for(const $n of kn.slice(0,1)){if(Bt++\u003e=g)return null;const ht=new Set([Ut,dt.connectionIndex,$n.connectionIndex]),Kt=n.map(qe=\u003e({...qe,connections:qe.connections.filter(vt=\u003eht.has(vt.connectionIndex))})).filter(qe=\u003eqe.connections.length\u003e0),rn=[...t.acceptedPlans,...st.filter(qe=\u003e!ht.has(qe.connectionIndex)),...pn.filter(qe=\u003e!xt.has(qe.connectionIndex)\u0026\u0026!ht.has(qe.connectionIndex))],Lt=HPe({...t,buses:Kt,terminals:t.terminals.filter(qe=\u003eht.has(qe.connection.connectionIndex)),acceptedPlans:rn,maximumLocalRepairAttempts:0,maximumIterations:Math.min(l,2e6)},e);let Ho=Lt.next();for(;!Ho.done;)yield{iterations:ne.iterations+Ho.value.iterations,routedConnectionCount:st.length-2+Ho.value.routedConnectionCount,connectionCount:w.length},Ho=Lt.next();if(!Ho.value)continue;const Ao=[...st.filter(qe=\u003e!ht.has(qe.connectionIndex)),...Ho.value];if(Ao.length===w.length\u0026\u0026new Set(Ao.map(qe=\u003eqe.connectionIndex)).size===M.size\u0026\u0026gt(Ao))return Ao}break}}return null}function*CSo(t,e,n){const{buses:o,layerNames:i}=t;if(!t.routeFromSourcePads)return null;const r=new Map(t.terminals.map(_=\u003e[_.connection.connectionIndex,_])),s=new Set(e.map(_=\u003e_.connectionIndex));if(r.size\u003c2||s.size!==e.length||e.length!==r.size-1||e.some(_=\u003er.get(_.connectionIndex)?.connection.connection.name!==_.connectionName||_.targetLayer!==Jy(t,_.busId)||_.sourceLayer!==r.get(_.connectionIndex).connection.sourceLayer||tn(_.sourcePoint,r.get(_.connectionIndex).connection.sourcePoint)\u003e1e-7||!_.via||tn(_.exitPoint,r.get(_.connectionIndex).exitPoint)\u003e1e-7))return null;const a=t.terminals.filter(_=\u003e!s.has(_.connection.connectionIndex)),A=a[0].connection.connectionIndex,c=new Map(t.fixedViaPointsByConnectionIndex),l=new Map(t.sourceEscapePaths);for(const _ of e)c.set(_.connectionIndex,_.via.center),l.set(_.connectionIndex,[_.sourcePoint,..._.segments.slice(0,_.sourceEscapeSegmentCount??1).map(f=\u003ef.end)]);const u=o.map(_=\u003e({..._,connections:_.connections.filter(f=\u003ef.connectionIndex===A)})).filter(_=\u003e_.connections.length\u003e0),g=Jy(t,u[0].busId),h=i.filter(_=\u003e_!==g\u0026\u0026u.every(f=\u003e(f.routableEscapeLayers??f.allowedLayers??i).includes(_)\u0026\u0026f.connections.every(I=\u003eI.sourceLayer!==_))),d=HPe({...t,buses:u,targetLayer:g,terminals:a,transitLayers:h,fixedViaPointsByConnectionIndex:c,sourceEscapePaths:l,acceptedPlans:[...t.acceptedPlans,...e],includeDiagonalNeighbors:!0,ripCost:256,maximumIterations:Math.min(t.maximumIterations??5e6,5e6),maximumRipEvents:Math.min(t.maximumRipEvents??400,400),maximumLocalRepairAttempts:0,maximumSourceOriginRepairAttempts:0},n);let p=d.next();for(;!p.done;)yield{...p.value,routedConnectionCount:e.length+p.value.routedConnectionCount,connectionCount:r.size},p=d.next();if(!p.value)return null;const m=[...e,...p.value];return m.length===r.size\u0026\u0026new Set(m.map(_=\u003e_.connectionIndex)).size===r.size?m:null}var e_=1e-7,cE=t=\u003eMath.max(...t.map(e=\u003ee.length))-Math.min(...t.map(e=\u003ee.length));function rR(t,e){const n=t.trace.route.findIndex(r=\u003er.route_type===\"via\"),o=e.trace.route.findIndex(r=\u003er.route_type===\"via\");if(n\u003c0||o\u003c0)return null;const i=t.sourceEscapeSegmentCount??1;return{...e,sourcePoint:t.sourcePoint,via:t.via,exitPoint:t.exitPoint,sourceEscapeSegmentCount:i,segments:[...t.segments.slice(0,i),...e.segments.slice(e.sourceEscapeSegmentCount??1)],trace:{...t.trace,route:[...t.trace.route.slice(0,n+1),...e.trace.route.slice(o+1)]}}}function OPe(t,e,n){if(!e.exitEdge||t.termination.type!==\"boundary\")return null;const o=e.sharedBoundary,i=h=\u003ee.exitEdge===\"left\"?h.x-o.minX:e.exitEdge===\"right\"?o.maxX-h.x:e.exitEdge===\"top\"?o.maxY-h.y:h.y-o.minY;if(Math.abs(i(t.exitPoint))\u003ee_)return null;let r=t.segments.length-1;for(;r\u003e0\u0026\u0026t.segments[r-1].layer===t.targetLayer;)r--;if(r\u003c(t.sourceEscapeSegmentCount??1))return null;let s=-1;for(let h=r;h\u003ct.segments.length;h++){const d=t.segments[h];i(d.start)\u003e=n\u0026\u0026i(d.end)\u003c=n\u0026\u0026(s=h)}s\u003c0\u0026\u0026(s=r);const a=t.segments[s],A=i(a.start),c=i(a.end),l=A\u003en\u0026\u0026c\u003cA?(A-n)/(A-c):0,u={x:a.start.x+(a.end.x-a.start.x)*l,y:a.start.y+(a.end.y-a.start.y)*l};if(i(u)\u003c=e_)return null;const g=[{...a,start:u},...t.segments.slice(s+1)].filter(h=\u003etn(h.start,h.end)\u003ee_);return!g.length||g.some(h=\u003eh.layer!==t.targetLayer)?null:{...t,sourcePoint:{...t.sourcePoint,...u},sourceEscapeSegmentCount:0,via:void 0,additionalVias:[],segments:g,length:g.reduce((h,d)=\u003eh+tn(d.start,d.end),0),trace:{...t.trace,pcb_trace_id:`${t.trace.pcb_trace_id}-retained-tail`,route:[u,...g.map(h=\u003eh.end)].map(h=\u003e({route_type:\"wire\",...h,layer:t.targetLayer,width:g[0].width}))}}}function GPe(t){const{inputSrj:e,preparedBuses:n,layerNames:o,viaDiameter:i,viaHoleDiameter:r}=t,s=new Map(t.plans.map(l=\u003e[l.connectionIndex,l])),a=n.flatMap(l=\u003el.connections);if(a.length!==e.connections.length||s.size!==a.length||s.size!==t.plans.length||a.some(l=\u003es.get(l.connectionIndex)?.connectionName!==l.connection.name))throw new Error(\"Retained-tail repair requires every original connection exactly once\");const A=new Map,c=new Map;for(const l of a){const u=s.get(l.connectionIndex),g=u.segments.slice(0,u.sourceEscapeSegmentCount??1);if(!u.via||!g.length||g.some(h=\u003eh.layer!==l.sourceLayer)||tn(g[0].start,l.sourcePoint)\u003ee_||tn(g.at(-1).end,u.via.center)\u003ee_||g.some((h,d)=\u003ed\u003e0\u0026\u0026tn(g[d-1].end,h.start)\u003ee_)||u.via.fromLayer!==l.sourceLayer||u.via.toLayer!==u.targetLayer||u.via.diameter!==i||u.via.holeDiameter!==r||u.via.spanLayers.length!==o.length||!o.every(h=\u003eu.via.spanLayers.includes(h)))return null;A.set(l.connectionIndex,u.via.center),c.set(l.connectionIndex,[g[0].start,...g.map(h=\u003eh.end)])}return{fixed:A,sourcePaths:c}}function*ySo(t,e){const{inputSrj:n,preparedBuses:o,layerNames:i,traceWidth:r,clearance:s,viaDiameter:a,viaHoleDiameter:A}=t,c=t.maximumIterationsPerAttempt??1e7;if(!Number.isSafeInteger(c)||c\u003c1)throw new Error(\"maximumIterationsPerAttempt must be a positive safe integer\");const l=GPe(t);if(!l)return null;const{fixed:u,sourcePaths:g}=l;let h=[...t.plans];const d=o.filter(m=\u003em.termination.type===\"boundary\"\u0026\u0026m.maxLengthSkew!==void 0\u0026\u0026m.connections.length\u003e1\u0026\u0026(!t.busIds||t.busIds.includes(m.busId)));for(const m of d){const _=h.filter(Y=\u003eY.busId===m.busId);if(_.length!==m.connections.length)return null;if(cE(_)\u003c=m.maxLengthSkew+e_)continue;const f=_[0].targetLayer;if(_.some(Y=\u003eY.targetLayer!==f||Y.planeEndpointTrace||Y.planeEndpointSegments||Y.planeEndpointVia)||!m.exitEdge)return null;const I=(m.routableEscapeLayers??m.allowedLayers??i).filter(Y=\u003e(m.allowedLayers??i).includes(Y));if(!I.includes(f))return null;const C=I.filter(Y=\u003eY!==f);if(!C.length)return null;const y=(Y,W,te)=\u003e{const j={srj:n,allBuses:o,buses:[{...m,connections:Y}],targetLayer:f,transitLayers:C,terminals:Y.map(J=\u003e({connection:J,viaPoint:u.get(J.connectionIndex),exitPoint:W.get(J.connectionIndex)})),fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,acceptedPlans:te,layerNames:i,traceWidth:r,clearance:s,viaDiameter:a,viaHoleDiameter:A,tightViaChannels:!0,includeDiagonalNeighbors:!0,heuristicWeight:1,maximumIterations:c,maximumRipEvents:200,maximumLocalRepairAttempts:0,ripCost:256,shuffleSeed:1};return AE(j)},x=_.toSorted((Y,W)=\u003eW.length-Y.length)[0],E=m.connections.find(Y=\u003eY.connectionIndex===x.connectionIndex),B=y([E],new Map([[x.connectionIndex,x.exitPoint]]),h.filter(Y=\u003eY!==x));let S=B.next();for(;!S.done;)yield{...S.value,busId:m.busId,phase:\"lane\"},S=B.next();const Q=S.value?.[0]?rR(x,S.value[0]):null;if(Q\u0026\u0026Q.length\u003cx.length-e_\u0026\u0026cE(_.map(Y=\u003eY===x?Q:Y))\u003ccE(_)-e_\u0026\u0026e.push({busId:m.busId,plan:Q}),Q\u0026\u0026cE(_.map(Y=\u003eY===x?Q:Y))\u003c=m.maxLengthSkew+e_){h=h.map(Y=\u003eY===x?Q:Y);continue}const w=Math.min(12*(r+s),(m.exitEdge===\"left\"||m.exitEdge===\"right\"?m.sharedBoundary.maxX-m.sharedBoundary.minX:m.sharedBoundary.maxY-m.sharedBoundary.minY)/3),M=_.map(Y=\u003eOPe(Y,m,w));if(M.some(Y=\u003e!Y))return null;const k=M,R=h.filter(Y=\u003eY.busId!==m.busId),F=y(m.connections,new Map(k.map(Y=\u003e[Y.connectionIndex,Y.sourcePoint])),[...R,...k]);let O=F.next();for(;!O.done;)yield{...O.value,busId:m.busId,phase:\"bus\"},O=F.next();if(!O.value||O.value.length!==_.length)return null;let U=h.map(Y=\u003e{const W=O.value.find(oe=\u003eoe.connectionIndex===Y.connectionIndex);if(!W)return Y;const te=rR(Y,W);if(!te)throw new Error(\"Retained-tail routing lost its source via\");const j=k.find(oe=\u003eoe.connectionIndex===te.connectionIndex),J=[...te.trace.route,...j.trace.route.slice(1)];return J[J.length-1]=Y.trace.route.at(-1),{...te,exitPoint:Y.exitPoint,trace:{...Y.trace,route:J},segments:[...te.segments,...j.segments],length:te.length+j.length}});for(const Y of _){const W=U.find(j=\u003ej.connectionIndex===Y.connectionIndex),te=n$(t,W,U.filter(j=\u003ej!==W),m,!0);if(!te)return null;U=U.map(j=\u003ej===W?te:j)}if(cE(U.filter(Y=\u003eY.busId===m.busId))\u003em.maxLengthSkew+e_||!Wh({plans:U,srj:n,sharedBoundary:m.sharedBoundary,clearance:s,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;h=U}return qu({inputSrj:n,routedSrj:{...n,traces:[...n.traces??[],...h.flatMap(m=\u003e[m.trace,...m.planeEndpointTrace?[m.planeEndpointTrace]:[]])]},clearance:s,allowBlindAndBuriedVias:!1}).valid?h:null}function*xSo(t,e){const n=yield*ySo(t,e);if(n)return n;const o=GPe(t);if(!o)return null;const{fixed:i,sourcePaths:r}=o,{inputSrj:s,preparedBuses:a,layerNames:A,traceWidth:c,clearance:l}=t,u=a.filter(p=\u003ep.termination.type===\"boundary\"\u0026\u0026p.connections.length\u003e1\u0026\u0026p.maxLengthSkew!==void 0\u0026\u0026(!t.busIds||t.busIds.includes(p.busId))),g=new Map;for(const p of u){const m=t.plans.filter(I=\u003eI.busId===p.busId);if(m.length!==p.connections.length||!p.exitEdge)return null;const _=m[0].targetLayer;if(m.some(I=\u003eI.targetLayer!==_||I.planeEndpointTrace||I.planeEndpointSegments||I.planeEndpointVia))return null;const f=`${_}:${p.exitEdge}`;g.set(f,[...g.get(f)??[],p])}let h=[...t.plans];for(const p of g.values()){const m=new Set(p.map(O=\u003eO.busId)),_=h.filter(O=\u003em.has(O.busId));if(p.every(O=\u003ecE(_.filter(U=\u003eU.busId===O.busId))\u003c=O.maxLengthSkew+e_))continue;if(p.length\u003c2)return null;const f=_[0].targetLayer,I=A.filter(O=\u003ep.every(U=\u003e(U.routableEscapeLayers??U.allowedLayers??A).includes(O)\u0026\u0026(U.allowedLayers??A).includes(O)));if(!I.includes(f))return null;const C=I.filter(O=\u003eO!==f);if(!C.length)return null;const y=p[0].sharedBoundary,x=Math.min(12*(c+l),(p[0].exitEdge===\"left\"||p[0].exitEdge===\"right\"?y.maxX-y.minX:y.maxY-y.minY)/3),E=_.map(O=\u003eOPe(O,p.find(U=\u003eU.busId===O.busId),x));if(E.some(O=\u003e!O))return null;const B=E,S=h.filter(O=\u003e!m.has(O.busId)),Q=AE({...t,srj:s,allBuses:a,buses:p,targetLayer:f,transitLayers:C,terminals:p.flatMap(O=\u003eO.connections.map(U=\u003e({connection:U,viaPoint:i.get(U.connectionIndex),exitPoint:B.find(Y=\u003eY.connectionIndex===U.connectionIndex).sourcePoint}))),fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,acceptedPlans:[...S,...B],tightViaChannels:!0,includeDiagonalNeighbors:!0,heuristicWeight:1,ripCost:8,shuffleSeed:1,maximumIterations:t.maximumIterationsPerAttempt??1e7,maximumRipEvents:200,maximumLocalRepairAttempts:0});let w=Q.next();for(;!w.done;)yield{...w.value,busId:p[0].busId,phase:\"layer\"},w=Q.next();if(!w.value||w.value.length!==_.length)return null;const M=w.value;let k=h.map(O=\u003e{const U=M.find(j=\u003ej.connectionIndex===O.connectionIndex);if(!U)return O;const Y=rR(O,U);if(!Y)throw new Error(\"Joint retained-tail routing lost its source via\");const W=B.find(j=\u003ej.connectionIndex===O.connectionIndex),te=[...Y.trace.route,...W.trace.route.slice(1)];return te[te.length-1]=O.trace.route.at(-1),{...Y,trace:{...O.trace,route:te},segments:[...Y.segments,...W.segments],length:Y.length+W.length}});for(const O of _){const U=k.find(W=\u003eW.connectionIndex===O.connectionIndex),Y=n$(t,U,k.filter(W=\u003eW!==U),p.find(W=\u003eW.busId===O.busId),!0);if(!Y)return null;k=k.map(W=\u003eW===U?Y:W)}if(!Wh({plans:k,srj:s,sharedBoundary:y,clearance:l,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;k=SO({...t,plans:k,preparedBuses:p,selectedBusIds:m,allowBlindAndBuriedVias:!1})??k;const R=zy({...t,plans:k,preparedBuses:p,sharedBoundary:y,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e3});if(!R.plans)return null;const F=R.plans;if(k=h.map(O=\u003e{if(!m.has(O.busId))return O;const U=F.find(W=\u003eW.connectionIndex===O.connectionIndex),Y=rR(O,U);if(!Y)throw new Error(\"Joint retained-tail tuning lost its source via\");return Y}),p.some(O=\u003ecE(k.filter(U=\u003eU.busId===O.busId))\u003eO.maxLengthSkew+e_))return null;h=k}return u.some(p=\u003ecE(h.filter(m=\u003em.busId===p.busId))\u003ep.maxLengthSkew+e_)?null:qu({inputSrj:s,routedSrj:{...s,traces:[...s.traces??[],...h.flatMap(p=\u003e[p.trace,...p.planeEndpointTrace?[p.planeEndpointTrace]:[]])]},clearance:l,allowBlindAndBuriedVias:!1}).valid?h:null}function*ESo(t){const e=[],n=yield*xSo(t,e);if(n)return n;if(!e.length)return null;let o=[...t.plans],i=!1;for(const{busId:s,plan:a}of e){const A=t.preparedBuses.find(p=\u003ep.busId===s),c=o.find(p=\u003ep.connectionIndex===a.connectionIndex),l=n$(t,a,o.filter(p=\u003ep!==c),A,!0);if(!l)continue;const u=o.map(p=\u003ep===c?l:p),g=zy({...t,plans:u,preparedBuses:[A],sharedBoundary:A.sharedBoundary,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e3});if(!g.plans)continue;const h=o.map(p=\u003e{if(p.busId!==s)return p;const m=g.plans.find(_=\u003e_.connectionIndex===p.connectionIndex);return rR(p,m)});if(h.some(p=\u003e!p))continue;const d=h;cE(d.filter(p=\u003ep.busId===s))\u003eA.maxLengthSkew+e_||!Wh({plans:d,srj:t.inputSrj,sharedBoundary:A.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1})||(o=d,i=!0)}return!i||t.preparedBuses.some(s=\u003e(!t.busIds||t.busIds.includes(s.busId))\u0026\u0026s.maxLengthSkew!==void 0\u0026\u0026cE(o.filter(a=\u003ea.busId===s.busId))\u003es.maxLengthSkew+e_)?null:qu({inputSrj:t.inputSrj,routedSrj:{...t.inputSrj,traces:[...t.inputSrj.traces??[],...o.flatMap(s=\u003e[s.trace,...s.planeEndpointTrace?[s.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?o:null}function*BSo(t){const e=GPe(t);if(!e)return null;const{inputSrj:n,preparedBuses:o,layerNames:i}=t,r=t.maximumIterationsPerAttempt??5e6;if(!Number.isSafeInteger(r)||r\u003c1)throw new Error(\"maximumIterationsPerAttempt must be a positive safe integer\");const s=Math.min(r,5e6),a=o.filter(u=\u003eu.termination.type===\"boundary\"\u0026\u0026u.connections.length\u003e2\u0026\u0026u.maxLengthSkew!==void 0\u0026\u0026(!t.busIds||t.busIds.includes(u.busId)));let A=[...t.plans],c=!1;for(const u of a){const g=A.filter(M=\u003eM.busId===u.busId);if(g.length!==u.connections.length)return null;if(cE(g)\u003c=u.maxLengthSkew+e_)continue;const h=Math.min(...g.map(M=\u003eM.length)),d=g.filter(M=\u003eM.length\u003eh+u.maxLengthSkew+e_).toSorted((M,k)=\u003ek.length-M.length||M.connectionIndex-k.connectionIndex).slice(0,2);if(d.length!==2)return null;const p=g[0].targetLayer;if(!u.exitEdge||g.some(M=\u003eM.targetLayer!==p||M.planeEndpointTrace||M.planeEndpointSegments||M.planeEndpointVia))return null;const m=(u.routableEscapeLayers??u.allowedLayers??i).filter(M=\u003e(u.allowedLayers??i).includes(M)),_=m.filter(M=\u003eM!==p);if(!m.includes(p)||!_.length)return null;const f=new Set(d.map(M=\u003eM.connectionIndex)),I=u.connections.filter(M=\u003ef.has(M.connectionIndex)),C=AE({...t,srj:n,allBuses:o,buses:[{...u,connections:I}],targetLayer:p,transitLayers:_,terminals:I.map(M=\u003e({connection:M,viaPoint:e.fixed.get(M.connectionIndex),exitPoint:g.find(k=\u003ek.connectionIndex===M.connectionIndex).exitPoint})),fixedViaPointsByConnectionIndex:e.fixed,sourceEscapePaths:e.sourcePaths,acceptedPlans:A.filter(M=\u003e!f.has(M.connectionIndex)),tightViaChannels:!0,includeDiagonalNeighbors:!0,ripCost:64,shuffleSeed:1,maximumIterations:s,maximumRipEvents:80,maximumLocalRepairAttempts:0});let y=C.next();for(;!y.done;)yield{...y.value,busId:u.busId,phase:\"overlong-pair\"},y=C.next();if(!y.value||y.value.length!==2)return null;const x=new Map(y.value.map(M=\u003e[M.connectionIndex,M])),E=A.map(M=\u003e{const k=x.get(M.connectionIndex);return k?rR(M,k):M});if(E.some(M=\u003e!M))return null;const B=zy({...t,plans:E,preparedBuses:[u],sharedBoundary:u.sharedBoundary,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e3});if(!B.plans)return null;const S=new Map(B.plans.map(M=\u003e[M.connectionIndex,M])),Q=A.map(M=\u003eM.busId===u.busId?rR(M,S.get(M.connectionIndex)):M);if(Q.some(M=\u003e!M))return null;const w=Q;if(cE(w.filter(M=\u003eM.busId===u.busId))\u003eu.maxLengthSkew+e_||!Wh({plans:w,srj:n,sharedBoundary:u.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;A=w,c=!0}return!c||o.some(u=\u003e(!t.busIds||t.busIds.includes(u.busId))\u0026\u0026u.maxLengthSkew!==void 0\u0026\u0026cE(A.filter(g=\u003eg.busId===u.busId))\u003eu.maxLengthSkew+e_)?null:qu({inputSrj:n,routedSrj:{...n,traces:[...n.traces??[],...A.flatMap(u=\u003e[u.trace,...u.planeEndpointTrace?[u.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?A:null}function*bSo(t){const e=yield*ESo(t);return e||(yield*BSo(t))}function Aue(t,e,n){return t.buses.flatMap(o=\u003eo.connections.map(i=\u003e{const r=e.get(i.connectionIndex),s=o.termination.type===\"plane\"?o.termination.layer:(o.allowedLayers??t.layerNames).filter(a=\u003ea!==i.sourceLayer).at(-1);return i4({...t,bus:o,terminal:{connection:i,viaPoint:r,exitPoint:r},targetLayer:s,targetLayerPoints:[r],sourceEscapePoints:n.get(i.connectionIndex),allowBlindAndBuriedVias:!1})}))}function SSo(t){if(!t.buses.length||t.buses.some(i=\u003ei.connections.some(r=\u003er.sourceLayer!==\"top\")))return null;const e=pd(t.buses,{...t,maximumSearchStates:1e4,additionalObstacles:t.srj.obstacles});if(!e)return null;const n=new Map(t.buses.flatMap(i=\u003ei.connections.map(r=\u003e[r.connectionIndex,[r.sourcePoint,e.get(r.connectionIndex)]]))),o=Aue(t,e,n);return qu({inputSrj:t.srj,routedSrj:{...t.srj,traces:[...t.srj.traces??[],...o.map(i=\u003ei.trace)]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?{fixedViaPointsByConnectionIndex:e,sourceEscapePaths:n,sourcePlans:o}:null}function*QSo(t){const e=AE({...t,transitLayers:[],routeFromSourcePads:!0,sourceLayerTravelCost:t.sourceLayerTravelCost??2,maximumRipEvents:1200,maximumIterations:t.maximumSourceIterations??5e7,maximumLocalRepairAttempts:0,shuffleSeed:1});let n=e.next();for(;!n.done;)yield n.value,n=e.next();if(!n.value)return null;let o=n.value;const i=new Map(t.fixedViaPointsByConnectionIndex),r=new Map(t.allBuses.flatMap(c=\u003ec.connections.map(l=\u003e[l.connectionIndex,t.sourceEscapePaths?.get(l.connectionIndex)??[l.sourcePoint,i.get(l.connectionIndex)]]))),s=new Map(t.buses.flatMap(c=\u003ec.connections.map(l=\u003e[l.connectionIndex,{bus:c,connection:l}]))),a=c=\u003e{if(!c.via)throw new Error(\"Source-origin routing lost a required first via\");i.set(c.connectionIndex,c.via.center);const l=c.segments.slice(0,c.sourceEscapeSegmentCount??1);r.set(c.connectionIndex,[c.sourcePoint,...l.map(u=\u003eu.end)])};o.forEach(a);const A=c=\u003e{const l=s.get(c.connectionIndex).bus;if(l.connections.length\u003c=2||l.maxLengthSkew===void 0)return!1;const u=Math.min(...o.filter(g=\u003eg.busId===c.busId).map(g=\u003eg.length));return c.length\u003eu+l.maxLengthSkew+1e-7};for(let c=0;c\u003c2;c++){const l=o.filter(A).toSorted((g,h)=\u003eh.length-g.length).slice(0,8);let u=!1;for(const g of l){const h=o.find(E=\u003eE.connectionIndex===g.connectionIndex);if(!A(h))continue;const{bus:d,connection:p}=s.get(h.connectionIndex),m=t.cleanupRetainedBoundaryTails?OPe(h,d,(c===0?12:6)*(t.traceWidth+t.clearance)):null;if(t.cleanupRetainedBoundaryTails\u0026\u0026!m)continue;const _=AE({...t,buses:[{...d,connections:[p]}],transitLayers:[],routeFromSourcePads:!0,sourceLayerTravelCost:1,includeDiagonalNeighbors:t.cleanupRetainedBoundaryTails||t.includeDiagonalNeighbors,fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,acceptedPlans:[...t.acceptedPlans,...o.filter(E=\u003eE!==h),...m?[m]:[]],terminals:[{connection:p,viaPoint:i.get(p.connectionIndex),exitPoint:m?.sourcePoint??h.exitPoint}],maximumRipEvents:1,maximumIterations:2e6,maximumLocalRepairAttempts:0,shuffleSeed:1});let f=_.next();for(;!f.done;)yield{...f.value,connectionCount:o.length},f=_.next();let I=f.value?.[0];if(I\u0026\u0026m){const E={...I,exitPoint:h.exitPoint,segments:[...I.segments,...m.segments],length:I.length+m.length,trace:{...I.trace,route:[...I.trace.route,...m.trace.route.slice(1)]}};I=n$({...t,inputSrj:t.srj},E,[...t.acceptedPlans,...o.filter(B=\u003eB!==h),...Aue({...t,buses:t.allBuses.filter(B=\u003e!t.buses.some(S=\u003eS.busId===B.busId))},i,r)],d,!0)??void 0}if(!I||I.length\u003e=h.length-1e-7)continue;const C=o.filter(E=\u003eE.busId===h.busId),y=C.map(E=\u003eE.length),x=C.map(E=\u003eE===h?I.length:E.length);Math.max(...x)-Math.min(...x)\u003eMath.max(...y)-Math.min(...y)+1e-7||m\u0026\u0026!qu({inputSrj:t.srj,routedSrj:{...t.srj,traces:[...t.srj.traces??[],...t.acceptedPlans.flatMap(E=\u003e[E.trace,...E.planeEndpointTrace?[E.planeEndpointTrace]:[]]),...o.map(E=\u003e(E===h?I:E).trace),...Aue({...t,buses:t.allBuses.filter(E=\u003e!t.buses.some(B=\u003eB.busId===E.busId)\u0026\u0026!t.acceptedPlans.some(B=\u003eB.busId===E.busId))},i,r).map(E=\u003eE.trace)]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid||(o=o.map(E=\u003eE===h?I:E),a(I),u=!0)}if(!u)break}return{plans:o,fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,sourcePlans:Aue({...t,buses:t.allBuses},i,r)}}function YPe(t){const e=t.filter(n=\u003en.termination.type===\"boundary\"\u0026\u0026n.connections.length\u003e=8\u0026\u0026n.allowedLayers?.length===1\u0026\u0026n.allowedLayers[0]!==\"top\");return e.some(n=\u003en.connections.length\u003e=16)?!1:e.some((n,o)=\u003ee.slice(o+1).some(i=\u003ei.componentId===n.componentId\u0026\u0026i.exitEdge===n.exitEdge\u0026\u0026i.allowedLayers[0]===n.allowedLayers[0]))}function cue(t){return t.some(e=\u003e{if(e.termination.type!==\"boundary\"||e.connections.length\u003c8||e.allowedLayers?.length!==1||e.allowedLayers[0]===\"top\")return!1;const n=e.exitEdge===\"left\"||e.exitEdge===\"right\"?\"x\":\"y\",o=e.exitEdge===\"left\"||e.exitEdge===\"bottom\"?-1:1,i=n===\"x\"?(e.componentBounds.minX+e.componentBounds.maxX)/2:(e.componentBounds.minY+e.componentBounds.maxY)/2;return e.connections.every(r=\u003eo*(r.sourcePoint[n]-i)\u003c-1e-7)})}function vSo(t,e){const n=t[0];if(!n||e||t.some(A=\u003eA.componentId!==n.componentId||A.connections.some(c=\u003ec.sourceLayer!==\"top\")))return!1;const o=t.filter(A=\u003eA.termination.type===\"boundary\"),i=o.filter(A=\u003eA.connections.length\u003e=8),r=i[0]?.exitEdge;if(!r||i.some(A=\u003eA.exitEdge!==r)||!(i.some(A=\u003eA.connections.length\u003e=16\u0026\u0026A.allowedLayers?.length===1\u0026\u0026A.allowedLayers[0]!==\"top\")||YPe(i)))return!1;const s=o.reduce((A,c)=\u003eA+c.connections.length,0);return!(t.filter(A=\u003eA.termination.type===\"plane\").reduce((A,c)=\u003eA+c.connections.length,0)\u003cs)}var QO=1e-7,wSo={left:\"right\",right:\"left\",up:\"down\",down:\"up\"};function UPe(t){const e=t;if(e.shape===\"circle\"||t.type!==\"rect\")return null;const n=(e.ccwRotationDegrees??0)/90;return Math.abs(n-Math.round(n))\u003eQO?null:Math.abs(Math.round(n))%2===0?{x:t.width,y:t.height}:{x:t.height,y:t.width}}function SNt(t,e){const n=UPe(e);if(!n||Math.abs(n.x-n.y)\u003cQO)return null;const{center:o}=e;if(n.x\u003en.y){if(Math.abs(o.x-n.x/2-t.minX)\u003cQO)return\"left\";if(Math.abs(o.x+n.x/2-t.maxX)\u003cQO)return\"right\"}else{if(Math.abs(o.y-n.y/2-t.minY)\u003cQO)return\"down\";if(Math.abs(o.y+n.y/2-t.maxY)\u003cQO)return\"up\"}return null}function KPe(t){const e=t.buses[0];if(!e||t.allowBlindAndBuriedVias||t.buses.some(a=\u003ea.componentId!==e.componentId||a.connections.some(A=\u003eA.sourceLayer!==\"top\")))return null;const n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(const a of e.componentObstacles){const A=UPe(a);if(!A)return null;n.minX=Math.min(n.minX,a.center.x-A.x/2),n.maxX=Math.max(n.maxX,a.center.x+A.x/2),n.minY=Math.min(n.minY,a.center.y-A.y/2),n.maxY=Math.max(n.maxY,a.center.y+A.y/2)}const o=new Set;for(const a of t.buses)if(a.termination.type===\"boundary\")for(const A of a.connections){const c=SNt(n,A.sourceObstacle);if(!c)return null;o.add(c)}if(o.size!==4)return null;const i=new Map,r=new Map,s=[];for(const a of t.buses){const A=a.termination.type===\"plane\"?a.termination.layer:(a.routableEscapeLayers??a.allowedLayers??t.layerNames).filter(c=\u003ec!==\"top\").at(-1);if(!A||!t.layerNames.includes(A))return null;for(const c of a.connections){const l=c.sourceObstacle,u=UPe(l);if(!u)return null;let g=SNt(n,l);if(g)(t.side??\"inward\")===\"inward\"\u0026\u0026(g=wSo[g]);else{if(a.termination.type!==\"plane\")return null;g=a.direction}const h=c.sourcePoint,d=t.viaDiameter/2+t.clearance+.001,p=g===\"left\"?{x:l.center.x-u.x/2-d,y:h.y}:g===\"right\"?{x:l.center.x+u.x/2+d,y:h.y}:g===\"up\"?{x:h.x,y:l.center.y+u.y/2+d}:{x:h.x,y:l.center.y-u.y/2-d},m=a.sharedBoundary,_=t.viaDiameter/2;if(p.x-_\u003cm.minX||p.x+_\u003em.maxX||p.y-_\u003cm.minY||p.y+_\u003em.maxY)return null;if(i.has(c.connectionIndex))throw new Error(\"FanoutSolver: duplicate peripheral source connection\");i.set(c.connectionIndex,p),r.set(c.connectionIndex,[h,p]),s.push(i4({...t,bus:a,terminal:{connection:c,viaPoint:p,exitPoint:p},targetLayer:A,targetLayerPoints:[p],sourceEscapePoints:[h,p],allowBlindAndBuriedVias:!1}))}}return!Wh({...t,plans:s,sharedBoundary:e.sharedBoundary,allowBlindAndBuriedVias:!1})||!qu({inputSrj:t.srj,routedSrj:{...t.srj,traces:[...t.srj.traces??[],...s.map(a=\u003ea.trace)]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?null:{fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,sourcePlans:s}}function QNt(t){const e=new Map;for(const o of t){const i=Ds(o.exitEdge,o.preferredExit);if(o.termination.type!==\"boundary\"||!o.exitEdge||!i)continue;const r=`${o.exitEdge}:${i}`,s=e.get(r)??[];s.push(o),e.set(r,s)}const n=new Map;for(const o of e.values()){const i=o[0].exitEdge===\"left\"||o[0].exitEdge===\"right\"?\"y\":\"x\",r=o.map((A,c)=\u003e({bus:A,index:c,min:Math.min(...A.connections.map(l=\u003el.sourcePoint[i])),max:Math.max(...A.connections.map(l=\u003el.sourcePoint[i]))})).sort((A,c)=\u003eA.min-c.min||A.index-c.index),s=[];for(const A of r){const c=s.at(-1);!c||A.min\u003ec.max+1e-9?s.push({max:A.max,members:[A]}):(c.max=Math.max(c.max,A.max),c.members.push(A))}let a=0;for(const A of s)for(const{bus:c}of A.members.sort((l,u)=\u003el.index-u.index))n.set(c.busId,a),a+=c.connections.length}return n}function VPe(t){const{buses:e,targetLayerByBusId:n,traceWidth:o,clearance:i}=t,r=o+i;if(!(o\u003e0)||!(t.viaDiameter\u003e0)||i\u003c0||![o,t.viaDiameter,i].every(Number.isFinite))throw new Error(\"FanoutSolver: invalid boundary packing dimensions\");const s=QNt(e),a=[],A=new Map;for(const c of e){if(c.termination.type!==\"boundary\")continue;if(c.connections.length===0)throw new Error(`FanoutSolver: bus ${c.busId} has no connections`);if(!c.exitEdge)throw new Error(`FanoutSolver: bus ${c.busId} has no boundary edge`);const l=n.get(c.busId);if(!l||!t.layerNames.includes(l)||!(c.routableEscapeLayers??c.allowedLayers??t.layerNames).includes(l))throw new Error(`FanoutSolver: bus ${c.busId} has no legal assigned layer`);const u=e6(c.exitEdge),g=Ds(c.exitEdge,c.preferredExit),h=c.connections.map(I=\u003eg?BB({...t,bus:c,connection:I,targetLayer:l,cornerExitLaneOffset:s.get(c.busId)??0,windingOrderIndex:0}):tR({...t,bus:c,connection:I,targetLayer:l,boundaryDirection:u,windingOrderIndex:0})),d=h.toSorted((I,C)=\u003eI-C);if(d.some((I,C)=\u003e!Number.isFinite(I)||C\u003e0\u0026\u0026I-d[C-1]\u003cr-1e-8))throw new Error(`FanoutSolver: bus ${c.busId} already contains overlapping desired lanes`);const p=c.exitEdge===\"left\"||c.exitEdge===\"right\",m={busId:c.busId,layer:l,edge:c.exitEdge,minimum:p?c.sharedBoundary.minY:c.sharedBoundary.minX,maximum:p?c.sharedBoundary.maxY:c.sharedBoundary.maxX,connectionIndices:c.connections.map(I=\u003eI.connectionIndex),desiredTracks:h,tracks:[...h],desiredStart:d[0],desiredEnd:d.at(-1),start:d[0],end:d.at(-1),shift:0};if(![m.minimum,m.maximum].every(Number.isFinite)||m.maximum\u003cm.minimum)throw new Error(`FanoutSolver: invalid boundary for ${c.busId}`);a.push(m);const _=`${l}:${c.exitEdge}`,f=A.get(_)??[];f.push(m),A.set(_,f)}for(const c of A.values()){const l=f=\u003eNumber(((f.desiredStart+f.desiredEnd)/2).toFixed(9)),u=c.toSorted((f,I)=\u003el(f)-l(I)),g=Math.max(...u.map(f=\u003ef.minimum)),h=Math.min(...u.map(f=\u003ef.maximum));if(u.every((f,I)=\u003ef.desiredStart\u003e=g\u0026\u0026f.desiredEnd\u003c=h\u0026\u0026(I===0||f.desiredStart-u[I-1].desiredEnd\u003e=r-1e-8)))continue;const d=[];let p=0;for(const[f,I]of u.entries())d.push(p),p+=I.desiredEnd-I.desiredStart+(f\u003cu.length-1?r:0);if(p\u003eh-g+1e-8)throw new Error(`FanoutSolver: bus intervals do not fit ${u[0].layer}/${u[0].edge}`);const m=[];for(const[f,I]of u.entries())for(m.push({first:f,last:f,weight:I.connectionIndices.length,mean:I.desiredStart-d[f]});m.length\u003e1\u0026\u0026m.at(-2).mean\u003em.at(-1).mean;){const C=m.pop(),y=m.pop(),x=y.weight+C.weight;m.push({first:y.first,last:C.last,weight:x,mean:(y.mean*y.weight+C.mean*C.weight)/x})}const _=h-p;for(const f of m){const I=Math.max(g,Math.min(_,f.mean));for(let C=f.first;C\u003c=f.last;C++){const y=u[C];y.start=I+d[C],y.shift=y.start-y.desiredStart,y.end=y.desiredEnd+y.shift,y.tracks=y.desiredTracks.map(x=\u003ex+y.shift)}}}return{tracksByConnectionIndex:new Map(a.flatMap(c=\u003ec.connectionIndices.map((l,u)=\u003e[l,c.tracks[u]]))),intervals:a}}function PSo(t){if(t.exitTargetPoint)return t.exitTargetPoint.layer??\"top\";const e=t.targetPoint;return\"layer\"in e?e.layer??\"top\":e.layers[0]??\"top\"}function vNt(t){const e=t.exitEdge===\"left\"||t.exitEdge===\"right\"?\"y\":\"x\",n=new Map;for(const o of t.connections){const i=PSo(o);n.set(i,[...n.get(i)??[],o])}return[...n.values()].map(o=\u003eo.toSorted((i,r)=\u003e{const s=(i.exitTargetPoint??i.targetPoint)[e]-(r.exitTargetPoint??r.targetPoint)[e];if(s!==0)return s;const a=A=\u003e\"source_trace_id\"in A.connection\u0026\u0026typeof A.connection.source_trace_id==\"string\"?A.connection.source_trace_id:A.connection.name;return a(i).localeCompare(a(r))||i.connection.name.localeCompare(r.connection.name)||i.connectionIndex-r.connectionIndex}))}function MSo(t,e){const n=t.exitEdge===\"left\"||t.exitEdge===\"right\"?\"y\":\"x\";return vNt(t).every(o=\u003eo.every((i,r)=\u003e{const s=e.get(i.connectionIndex);return!s||!Number.isFinite(s.x)||!Number.isFinite(s.y)?!1:r===0||s[n]\u003ee.get(o[r-1].connectionIndex)[n]}))}function zPe(t){const e=t.maximumSearchStates??4096;if(!Number.isSafeInteger(e)||e\u003c1)throw new Error(\"FanoutSolver: invalid boundary merge work bound\");const n=new Map(t.exits);for(const o of t.buses){if(o.termination.type!==\"boundary\"||!o.exitEdge||o.connections.length\u003c3||o.connections.some(p=\u003e!p.hasExplicitLayeredExitTarget))continue;const i=vNt(o);if(i.length\u003c2||i.reduce((p,m)=\u003ep*(m.length+1),1)\u003ee)continue;const s=o.exitEdge===\"left\"||o.exitEdge===\"right\"?\"y\":\"x\",a=s===\"x\"?\"y\":\"x\",A=o.exitEdge===\"left\"||o.exitEdge===\"bottom\"?-1:1,c={x:(o.componentBounds.minX+o.componentBounds.maxX)/2,y:(o.componentBounds.minY+o.componentBounds.maxY)/2},l=new Map(o.connections.map(p=\u003e[p.connectionIndex,Math.atan2(p.sourcePoint[s]-c[s],A*(p.sourcePoint[a]-c[a]))])),u=o.connections.map(p=\u003e{const m=n.get(p.connectionIndex);if(!m||!Number.isFinite(m.x)||!Number.isFinite(m.y))throw new Error(\"FanoutSolver: missing packed boundary target\");return m[s]}).sort((p,m)=\u003ep-m);if(u.some((p,m)=\u003em\u003e0\u0026\u0026p\u003c=u[m-1]))throw new Error(\"FanoutSolver: duplicate packed boundary tracks\");const g=new Map,h=p=\u003e{const m=p.join(\",\"),_=g.get(m);if(_)return _;const f=p.reduce((C,y)=\u003eC+y,0);if(f===u.length)return{inversions:0,length:0,order:[]};let I;for(const[C,y]of i.entries()){const x=y[p[C]];if(!x)continue;const E=i.reduce((M,k,R)=\u003eM+k.slice(0,p[R]).filter(F=\u003el.get(F.connectionIndex)\u003el.get(x.connectionIndex)+1e-9).length,0),B=[...p];B[C]++;const S=h(B),Q={...n.get(x.connectionIndex),[s]:u[f]},w={inversions:E+S.inversions,length:Math.hypot(x.sourcePoint.x-Q.x,x.sourcePoint.y-Q.y)+S.length,order:[x,...S.order]};(!I||w.inversions\u003cI.inversions||w.inversions===I.inversions\u0026\u0026w.length\u003cI.length)\u0026\u0026(I=w)}if(!I)throw new Error(\"FanoutSolver: incomplete boundary merge state\");return g.set(m,I),I},d=new Map(n);for(const[p,m]of h(i.map(()=\u003e0)).order.entries())d.set(m.connectionIndex,{...n.get(m.connectionIndex),[s]:u[p]});if(!MSo(o,d))throw new Error(\"FanoutSolver: boundary merge changed a layer's lane order\");for(const p of o.connections)n.set(p.connectionIndex,d.get(p.connectionIndex))}return n}var JPe=(t,e)=\u003e{const n=t.sharedBoundary;switch(t.exitEdge){case\"left\":return{x:n.minX,y:e};case\"right\":return{x:n.maxX,y:e};case\"top\":return{x:e,y:n.maxY};case\"bottom\":return{x:e,y:n.minY};default:throw new Error(`FanoutSolver: bus ${t.busId} has no boundary edge`)}};function DSo(t,e,n,o){const i=(r,s,a)=\u003e(s.x-r.x)*(a.y-r.y)-(s.y-r.y)*(a.x-r.x);return i(t,e,n)*i(t,e,o)\u003c-1e-12\u0026\u0026i(n,o,t)*i(n,o,e)\u003c-1e-12}function NSo(t){const{buses:e,layerNames:n,traceWidth:o,clearance:i}=t,r=o+i,s=new Map,a=[];for(const u of e){if(u.termination.type===\"plane\"){s.set(u.busId,u.termination.layer);continue}const g=new Set(u.connections.map(_=\u003e_.sourceLayer)),h=(u.routableEscapeLayers??u.allowedLayers??n).filter(_=\u003et.allowSourceLayerTargets||!g.has(_));if(!h.length)return null;const d=h.map(_=\u003eVPe({...t,buses:[u],targetLayerByBusId:new Map([[u.busId,_]])}).intervals[0]),p=u.connections.length,m=u.connections.reduce((_,f)=\u003e({x:_.x+f.sourcePoint.x/p,y:_.y+f.sourcePoint.y/p}),{x:0,y:0});a.push({bus:u,source:m,intervals:d})}a.sort((u,g)=\u003eu.intervals.length-g.intervals.length||Math.max(...g.intervals.map(h=\u003eh.end-h.start))-Math.max(...u.intervals.map(h=\u003eh.end-h.start))||g.bus.connections.length-u.bus.connections.length);const A=[];for(const{bus:u,source:g,intervals:h}of a){let d;for(const p of h){const m=A.filter(Q=\u003eQ.interval.layer===p.layer),_=m.filter(Q=\u003eQ.interval.edge===p.edge),f=Math.max(p.minimum,..._.map(Q=\u003eQ.interval.minimum)),I=Math.min(p.maximum,..._.map(Q=\u003eQ.interval.maximum)),C=p.end-p.start+_.reduce((Q,w)=\u003eQ+w.interval.end-w.interval.start+r,0);if(C\u003eI-f+1e-8)continue;const y=JPe(u,(p.start+p.end)/2),x=m.reduce((Q,w)=\u003eQ+(DSo(g,y,w.source,w.target)?Math.min(u.connections.length,w.bus.connections.length):0),0),E=_.reduce((Q,w)=\u003eQ+w.bus.connections.length,0),B=m.reduce((Q,w)=\u003eQ+w.bus.connections.length,0),S=x*4+E+B/4+10*C/Math.max(r,I-f);(!d||S\u003cd.score||S===d.score\u0026\u0026n.indexOf(p.layer)\u003en.indexOf(d.interval.layer))\u0026\u0026(d={interval:p,score:S})}if(!d)return null;s.set(u.busId,d.interval.layer),A.push({bus:u,source:g,interval:d.interval,target:JPe(u,(d.interval.start+d.interval.end)/2)})}const c=VPe({...t,targetLayerByBusId:s}),l=new Map;for(const{bus:u}of a)for(const g of u.connections)l.set(g.connectionIndex,JPe(u,c.tracksByConnectionIndex.get(g.connectionIndex)));return{targetLayerByBusId:s,exits:zPe({buses:e,exits:l})}}function*RSo(t){const{plans:e,bus:n,preparedBuses:o,inputSrj:i,layerNames:r}=t;if(n.termination.type!==\"boundary\"||n.connections.length!==2||n.maxLengthSkew===void 0||n.connections.some(_=\u003e_.sourceLayer!==\"top\"))return null;const s=o.flatMap(_=\u003e_.connections),a=new Map(e.map(_=\u003e[_.connectionIndex,_]));if(s.length!==i.connections.length||a.size!==s.length||e.length!==a.size||s.some(_=\u003ea.get(_.connectionIndex)?.connectionName!==_.connection.name))throw new Error(\"FanoutSolver: transit pair repair requires every original plan\");const A=n.connections.map(_=\u003ea.get(_.connectionIndex)),c=A[0].targetLayer;if(A.some(_=\u003e_.targetLayer!==c)||Math.abs(A[0].length-A[1].length)\u003c=n.maxLengthSkew+1e-6)return null;const l=(n.routableEscapeLayers??n.allowedLayers??r).filter(_=\u003e_!==\"top\"\u0026\u0026_!==c);if(!l.length)return null;const u=new Map,g=new Map;for(const _ of s){const f=a.get(_.connectionIndex);if(!f.via)return null;const I=f.segments.slice(0,f.sourceEscapeSegmentCount??1);if(!I.length||I.some(C=\u003eC.layer!==_.sourceLayer)||tn(I[0].start,_.sourcePoint)\u003e1e-6||tn(I.at(-1).end,f.via.center)\u003e1e-6||I.some((C,y)=\u003ey\u003e0\u0026\u0026tn(I[y-1].end,C.start)\u003e1e-6))return null;u.set(_.connectionIndex,f.via.center),g.set(_.connectionIndex,[_.sourcePoint,...I.map(C=\u003eC.end)])}const h=new Set(n.connections.map(_=\u003e_.connectionIndex)),d=(n.routableEscapeLayers??n.allowedLayers??r).filter(_=\u003e_!==\"top\");let p=5e6,m;for(const _ of[void 0,...d]){if(p\u003c=0)break;const f=new Map(u),I=new Map(g);if(_!==void 0){if(m??=KPe({...t,srj:i,buses:o,side:\"inward\"}),!m)break;for(const M of h)f.set(M,m.fixedViaPointsByConnectionIndex.get(M)),I.set(M,m.sourceEscapePaths.get(M))}const C=AE({...t,srj:i,allBuses:o,buses:[n],targetLayer:c,startLayerByBusId:_===void 0?void 0:new Map([[n.busId,_]]),transitLayers:l,terminals:n.connections.map(M=\u003e({connection:M,viaPoint:f.get(M.connectionIndex),exitPoint:a.get(M.connectionIndex).exitPoint})),fixedViaPointsByConnectionIndex:f,sourceEscapePaths:I,acceptedPlans:e.filter(M=\u003e!h.has(M.connectionIndex)),routeFromSourcePads:_===void 0,sourceLayerTravelCost:1,sourceOriginPhysicalGridPhase:!0,tightViaChannels:!0,includeDiagonalNeighbors:!0,traceMarginExtra:0,maximumIterations:Math.min(p,_===void 0?5e6:2e6),maximumRipEvents:80,maximumLocalRepairAttempts:0,ripCost:256,shuffleSeed:1});let y=C.next(),x=0;for(;!y.done;)x=y.value.iterations,yield y.value,y=C.next();p-=x;const E=y.value;if(!E||E.length!==2)continue;const B=new Map(E.map(M=\u003e[M.connectionIndex,M])),S=e.map(M=\u003eB.get(M.connectionIndex)??M),Q=zy({...t,plans:S,preparedBuses:[n],sharedBoundary:n.sharedBoundary,maximumWorkUnits:1e5,allowSourcePrefixMatching:!0,allowDistributedMatching:!0,allowTransitLayerMatching:!0,allowMatchingInsideDenseBounds:!0});if(!Q.plans||Q.plans.some(M=\u003e!h.has(M.connectionIndex)\u0026\u0026M!==a.get(M.connectionIndex)))continue;const w=Q.plans.filter(M=\u003eh.has(M.connectionIndex));if(!(w.length!==2||Math.abs(w[0].length-w[1].length)\u003en.maxLengthSkew+1e-6)\u0026\u0026qu({inputSrj:i,routedSrj:{...i,traces:[...i.traces??[],...Q.plans.flatMap(M=\u003e[M.trace,...M.planeEndpointTrace?[M.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid)return Q.plans}return null}var sR=1e-6,WPe=t=\u003eMath.max(...t.map(e=\u003ee.length))-Math.min(...t.map(e=\u003ee.length));function*wNt(t){const{plans:e,bus:n,preparedBuses:o,inputSrj:i}=t,r=o.flatMap(d=\u003ed.connections),s=new Map(e.map(d=\u003e[d.connectionIndex,d]));if(r.length!==i.connections.length||s.size!==e.length||s.size!==r.length||r.some(d=\u003es.get(d.connectionIndex)?.connectionName!==d.connection.name))throw new Error(\"FanoutSolver: source-origin length repair requires every original plan\");const a=n.connections.map(d=\u003es.get(d.connectionIndex));if(n.termination.type!==\"boundary\"||n.maxLengthSkew===void 0||a.length\u003c2||WPe(a)\u003c=n.maxLengthSkew+sR)return null;const A=a[0].targetLayer;if(a.some(d=\u003ed.targetLayer!==A))return null;const c=Math.min(...a.map(d=\u003ed.length)),l=new Set((a.length===2?a:a.filter(d=\u003ed.length\u003ec+n.maxLengthSkew+sR).toSorted((d,p)=\u003ep.length-d.length||d.connectionIndex-p.connectionIndex).slice(0,2)).map(d=\u003ed.connectionIndex));if(!l.size)return null;const u=new Map,g=new Map;for(const d of r){const p=s.get(d.connectionIndex);if(!p.via)return null;const m=p.segments.slice(0,p.sourceEscapeSegmentCount??1);if(!m.length||m.some(_=\u003e_.layer!==d.sourceLayer)||tn(m[0].start,d.sourcePoint)\u003esR||tn(m.at(-1).end,p.via.center)\u003esR||m.some((_,f)=\u003ef\u003e0\u0026\u0026tn(m[f-1].end,_.start)\u003esR))return null;u.set(d.connectionIndex,p.via.center),g.set(d.connectionIndex,[d.sourcePoint,...m.map(_=\u003e_.end)])}const h=n.connections.filter(d=\u003el.has(d.connectionIndex));for(const d of[!1,!0]){const p=yield*AE({...t,srj:i,allBuses:o,buses:[{...n,connections:h}],targetLayer:A,transitLayers:t.transitLayers??[],terminals:h.map(C=\u003e({connection:C,viaPoint:u.get(C.connectionIndex),exitPoint:s.get(C.connectionIndex).exitPoint})),fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,acceptedPlans:e.filter(C=\u003e!l.has(C.connectionIndex)),routeFromSourcePads:!0,includeDiagonalNeighbors:d,sourceLayerTravelCost:1,tightViaChannels:!0,ripCost:256,shuffleSeed:1,maximumRipEvents:40,maximumIterations:5e6,maximumLocalRepairAttempts:0});if(!p||p.length!==l.size)continue;const m=new Map(p.map(C=\u003e[C.connectionIndex,C])),_=e.map(C=\u003em.get(C.connectionIndex)??C),f=a.map(C=\u003em.get(C.connectionIndex)??C);if(WPe(f)\u003e=WPe(a)-sR\u0026\u0026Math.max(...f.map(C=\u003eC.length))\u003e=Math.max(...a.map(C=\u003eC.length))-sR)continue;if(qu({inputSrj:i,routedSrj:{...i,traces:[...i.traces??[],..._.flatMap(C=\u003e[C.trace,...C.planeEndpointTrace?[C.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid)return _}return null}function i$(t){return typeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"type\"in t\u0026\u0026t.type===\"subsolver\"\u0026\u0026\"solver\"in t\u0026\u0026t.solver instanceof fC}function*TSo(t){const{srj:e,buses:n,layerNames:o}=t;yield{phase:\"sources\",routedConnectionCount:0};const i=KPe(t);if(!i)return null;const r=n.filter(y=\u003ey.termination.type===\"boundary\");if(!r.length||r.some(y=\u003e!y.exitEdge))return null;const s=NSo(t);if(!s)return null;const a=zPe({buses:n,exits:s.exits}),A=new Set(r.map(y=\u003es.targetLayerByBusId.get(y.busId))),c=o.findLast(y=\u003eA.has(y)),l=o.filter(y=\u003ey!==c\u0026\u0026r.some(x=\u003e(x.routableEscapeLayers??x.allowedLayers??o).includes(y))),u=i.sourcePlans.filter(y=\u003ey.termination.type===\"plane\"),g=AE({...t,allBuses:n,buses:r,targetLayer:c,targetLayerByBusId:s.targetLayerByBusId,transitLayers:l,terminals:r.flatMap(y=\u003ey.connections.map(x=\u003e({connection:x,viaPoint:i.fixedViaPointsByConnectionIndex.get(x.connectionIndex),exitPoint:a.get(x.connectionIndex)}))),...i,acceptedPlans:u,routeFromSourcePads:!0,sourceLayerTravelCost:2,sourceOriginPhysicalGridPhase:!0,includeDiagonalNeighbors:!0,traceMarginExtra:0,maximumIterations:6e7,maximumRipEvents:1e3,maximumLocalRepairAttempts:0,ripCost:64,shuffleSeed:1});let h=g.next();for(;!h.done;){if(i$(h.value)){const y=yield h.value;h=g.next(y);continue}yield{phase:\"route-layer\",iterations:h.value.iterations,routedConnectionCount:u.length+h.value.routedConnectionCount},h=g.next()}if(!h.value)return null;let d=[...h.value,...u];yield{phase:\"repair-lengths\",routedConnectionCount:d.length};const p=SO({...t,inputSrj:e,plans:d,preparedBuses:n});if(!p)return null;d=p;for(const y of r){if(y.maxLengthSkew===void 0)continue;const x=wNt({...t,inputSrj:e,plans:d,preparedBuses:n,bus:y});let E=x.next();for(;!E.done;)yield{phase:\"repair-lengths\",iterations:E.value.iterations,routedConnectionCount:d.length},E=x.next();E.value\u0026\u0026(d=E.value)}yield{phase:\"match-layer\",routedConnectionCount:d.length};let m=d;const _={...t,inputSrj:e,plans:d,preparedBuses:n,sharedBoundary:r[0].sharedBoundary,maximumWorkUnits:1e3,allowSourcePrefixMatching:!0,candidatePlansAreFeasible:y=\u003e(m=[...y],!0)};let f=zy(_);f.plans||(f=zy({..._,maximumWorkUnits:1e5,allowDistributedMatching:!0,allowTransitLayerMatching:!0,allowMatchingInsideDenseBounds:!0}));const I=new Set;for(;!f.plans;){const y=f.failedBus.busId,x=r.find(S=\u003eS.busId===y);if(!x||x.connections.length!==2||x.maxLengthSkew===void 0||I.has(x.busId))return null;I.add(x.busId);const E=RSo({...t,inputSrj:e,plans:m,preparedBuses:n,bus:x});let B=E.next();for(;!B.done;)yield{phase:\"repair-lengths\",iterations:B.value.iterations,routedConnectionCount:d.length},B=E.next();if(!B.value)return null;m=B.value,f=zy({..._,plans:m,maximumWorkUnits:1e5,allowDistributedMatching:!0,allowTransitLayerMatching:!0,allowMatchingInsideDenseBounds:!0})}if(!f.plans)return null;const C=DPe({...t,inputSrj:e,plans:f.plans,preparedBuses:n});return!C||C.length!==e.connections.length||new Set(C.map(y=\u003ey.connectionIndex)).size!==C.length?null:qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...C.flatMap(y=\u003e[y.trace,...y.planeEndpointTrace?[y.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?C:null}function kSo(t){const e=t.candidateSets.flat(),n=e.length,o=new Uint8Array(n*n),i=new Set,r=new Map;let s=0;const a=t.candidateSets.map(C=\u003eC.map(()=\u003es++));let A=0;const c=(C,y)=\u003e{const x=Math.min(C,y)*n+Math.max(C,y),E=o[x];if(E)return E===1;const B=t.areCompatible(e[C],e[y]);return o[x]=B?1:2,B},l=a.map(()=\u003e[]);for(let C=0;C\u003ca.length;C++)for(let y=C+1;y\u003ca.length;y++)a[C].some(x=\u003ea[y].some(E=\u003e!c(x,E)))\u0026\u0026(l[C].push(y),l[y].push(C));const u=(C,y,x)=\u003e{const E=[];let B=!0;for(const S of y){if(C[S].length===0){i.add(S),B=!1;continue}for(const Q of l[S])y.includes(Q)\u0026\u0026(x===void 0||Q===x)\u0026\u0026E.push([S,Q])}for(let S=0;S\u003cE.length;S++){const[Q,w]=E[S];if(C[Q].length===0||C[w].length===0)continue;const M=C[Q].filter(k=\u003eC[w].some(R=\u003ec(k,R)));if(M.length!==C[Q].length){if(r.set(Q,w),C[Q]=M,M.length===0){i.add(Q),B=!1;continue}for(const k of l[Q])k!==w\u0026\u0026y.includes(k)\u0026\u0026E.push([k,Q])}}return B},g=a.map((C,y)=\u003ey),h=C=\u003e{const y=[...C],x=new Set(y);for(let E=0;E\u003cy.length;E++){const B=r.get(y[E]);B!==void 0\u0026\u0026!x.has(B)\u0026\u0026(x.add(B),y.push(B))}return[...x]},d=a.map(C=\u003e[...C]);if(!u(d,g))return{selection:null,searchStates:A,emptyDomainIndices:[...i],conflictDomainIndices:h([...i])};const m=(()=\u003e{const y=Math.max(1,Math.min(5e3,Math.floor(t.maximumSearchStates/12)));for(let x=0;x\u003c12;x++){const E=d.map((B,S)=\u003eB[(x*17+S*7)%B.length]);for(let B=0;B\u003cy;B++){const S=E.map(()=\u003e0);for(let R=0;R\u003cE.length;R++)for(const F of l[R])F\u003c=R||c(E[R],E[F])||(S[R]=S[R]+1,S[F]=S[F]+1);const Q=Math.max(...S);if(Q===0)return E;const w=S.map((R,F)=\u003e({conflicts:R,index:F})).filter(({conflicts:R})=\u003eR===Q),M=w[(B+x)%w.length].index,k=d[M].map((R,F)=\u003e({candidate:R,index:F,conflicts:l[M].filter(O=\u003e!c(R,E[O])).length})).toSorted((R,F)=\u003eR.conflicts-F.conflicts||(R.index-B-x)%d[M].length-(F.index-B-x)%d[M].length);E[M]=k[0].candidate}}return null})();if(m)return{selection:m.map(C=\u003ee[C]),searchStates:A,emptyDomainIndices:[],conflictDomainIndices:[]};const _=(C,y,x)=\u003e{if(!u(C,y,x))return null;const E=new Set(y.filter(w=\u003eC[w].length\u003e1)),B=[];for(;E.size\u003e0;){const w=[E.values().next().value];E.delete(w[0]);for(let M=0;M\u003cw.length;M++)for(const k of l[w[M]])E.delete(k)\u0026\u0026w.push(k);B.push(w)}if(B.length\u003e1){let w=C;for(const M of B){const k=_(w.slice(),M);if(!k)return null;w=k}return w}let S=-1;for(const w of y)C[w].length\u003e1\u0026\u0026(S\u003c0||C[w].length\u003cC[S].length)\u0026\u0026(S=w);if(S\u003c0)return C;const Q=C[S].map(w=\u003e{const M=l[S].filter(k=\u003ey.includes(k)\u0026\u0026C[k].length\u003e1).map(k=\u003eC[k].filter(R=\u003ec(w,R)).length);return{candidate:w,minimumSupport:Math.min(...M),totalSupport:M.reduce((k,R)=\u003ek+R,0)}}).toSorted((w,M)=\u003eM.minimumSupport-w.minimumSupport||M.totalSupport-w.totalSupport);for(const{candidate:w}of Q){if(A\u003e=t.maximumSearchStates)return null;A++;const M=C.slice();M[S]=[w];const k=_(M,y,S);if(k)return k}return null},f=_(d,g),I=i.size\u003e0||f?[...i]:[g.toSorted((C,y)=\u003el[y].length-l[C].length||d[C].length-d[y].length)[0]];return{selection:f?.map(C=\u003ee[C[0]])??null,searchStates:A,emptyDomainIndices:I,conflictDomainIndices:f?[]:h(I)}}var lue=1e-9;function FSo(t){const e=t.candidateBusIds.filter(d=\u003e!t.activeBusIds.has(d));if(e.length\u003c2)return e;const n=e.length-1,o=t.planeBuses.find(d=\u003ed.busId===e[n]),i=o?.connections[0]?.sourcePoint;if(!o||!i||o.connections.length!==1||o.termination.type!==\"plane\")return e;const r=o.termination.layer,s=o.direction===\"up\"||o.direction===\"down\"?\"x\":\"y\",a=s===\"x\"?\"y\":\"x\",A=s===\"x\"?o.xCoordinates:o.yCoordinates,c=s===\"x\"?o.pitchX:o.pitchY;if(A.length===0||!Number.isFinite(c)||c\u003c=lue)return e;const l=(Math.min(...A)+Math.max(...A))/2,u=Math.sign(l-i[s]);if(u===0)return e;const g=new Set(e),h=t.planeBuses.filter(d=\u003e{const p=d.connections[0]?.sourcePoint;if(d===o||d.componentId!==o.componentId||d.termination.type!==\"plane\"||d.termination.layer!==r||d.direction!==o.direction||d.connections.length!==1||!p||t.activeBusIds.has(d.busId)||g.has(d.busId)||Math.abs(p[a]-i[a])\u003elue)return!1;const m=(p[s]-i[s])*u;return m\u003elue\u0026\u0026m\u003c=c+lue}).toSorted((d,p)=\u003e{const m=d.connections[0].sourcePoint,_=p.connections[0].sourcePoint;return Math.abs(m[s]-i[s])-Math.abs(_[s]-i[s])||d.connections[0].connectionIndex-p.connections[0].connectionIndex})[0];return h?e.map((d,p)=\u003ep===n?h.busId:d):e}function LSo(t){const e=t[0];if(!e||t.some(c=\u003ec.componentId!==e.componentId))return;const n=t.flatMap(c=\u003ec.connections.map(l=\u003el.sourcePoint));if(n.length===0)return;const o=n.reduce((c,l)=\u003e({x:c.x+l.x,y:c.y+l.y}),{x:0,y:0});o.x/=n.length,o.y/=n.length;const{minX:i,maxX:r,minY:s,maxY:a}=e.componentBounds,A=[{edge:\"left\",distance:Math.abs(o.x-i)},{edge:\"right\",distance:Math.abs(r-o.x)},{edge:\"bottom\",distance:Math.abs(o.y-s)},{edge:\"top\",distance:Math.abs(a-o.y)}].toSorted((c,l)=\u003ec.distance-l.distance);if(!(Math.abs(A[0].distance-A[1].distance)\u003c=1e-9))return A[0].edge}function PNt(t,e){if(e)return!1;const n=t.filter(u=\u003eu.termination.type===\"boundary\"),o=n.filter(u=\u003eu.connections.length===1),i=n.filter(u=\u003eu.connections.length===2),r=n.filter(u=\u003eu.connections.length\u003e=8),s=t.filter(u=\u003eu.termination.type===\"plane\"\u0026\u0026u.connections.length===1).length,a=r[0]?.exitEdge;if(n.length!==9||o.length!==3||i.length!==3||r.length!==3||s\u003c64||a===void 0||r.some(u=\u003eu.exitEdge!==a))return!1;const A=LSo(r);return A===void 0?!1:(A===\"left\"||A===\"right\")!==(a===\"left\"||a===\"right\")}function HSo(t){const{trace:e,layerNames:n,allowBlindAndBuriedVias:o}=t;return{...e,route:e.route.map(i=\u003ei.route_type===\"via\"\u0026\u0026!o?{...i,layers:Mx({fromLayer:i.from_layer,toLayer:i.to_layer,layerNames:n,allowBlindAndBuriedVias:o})}:{...i})}}function OSo(t){const{srj:e,layerNames:n,allowBlindAndBuriedVias:o}=t;return{...e,traces:(e.traces??[]).map(i=\u003eHSo({trace:i,layerNames:n,allowBlindAndBuriedVias:o}))}}function jPe(t,e,n,o){const i=n.spanLayers.map(s=\u003e{const a=e.indexOf(s);if(a\u003c0)throw new Error(`FanoutSolver: via for \"${t.connectionName}\" uses unknown layer \"${s}\"`);return a}),r=qN(t);return{obstacleId:o===\"endpoint\"?r.planeEndpointViaObstacleId:o===0?r.viaObstacleId:`${r.viaObstacleId}:${o}`,type:\"rect\",center:n.center,width:n.diameter,height:n.diameter,layers:n.spanLayers,zLayers:i,__zLayers:i,connectedTo:[t.connectionName,t.trace.pcb_trace_id]}}function aR(t){const{inputSrj:e,plans:n,layerNames:o}=t,i=e.connections.map(u=\u003e({...u,pointsToConnect:u.pointsToConnect.map(g=\u003e({...g}))})),r=[],s=new Set;for(const u of n){const g=i[u.connectionIndex];if(!g)throw new Error(`FanoutSolver: output connection index ${u.connectionIndex} is missing`);const h=qN(u);if(g.pointsToConnect[u.sourcePointIndex]={x:u.exitPoint.x,y:u.exitPoint.y,layer:u.targetLayer,pointId:u.termination.type===\"plane\"?h.planeExitPointId:h.boundaryExitPointId},u.termination.type===\"plane\"\u0026\u0026s.add(u.connectionName),u.via){const d=jPe(u,o,u.via,0);d\u0026\u0026r.push(d)}for(const[d,p]of(u.additionalVias??[]).entries()){const m=jPe(u,o,p,d+1);m\u0026\u0026r.push(m)}if(u.planeEndpointVia){const d=jPe(u,o,u.planeEndpointVia,\"endpoint\");d\u0026\u0026r.push(d)}}const a=n.flatMap(u=\u003e[u.trace,...u.planeEndpointTrace?[u.planeEndpointTrace]:[]]),A=a.flatMap(u=\u003eu.route.filter(g=\u003e\"x\"in g\u0026\u0026\"y\"in g)),c=Math.max(e.defaultObstacleMargin??0,e.minTraceWidth),l=A.length===0?{...e.bounds}:{minX:Math.min(e.bounds.minX,...A.map(u=\u003eu.x-c)),maxX:Math.max(e.bounds.maxX,...A.map(u=\u003eu.x+c)),minY:Math.min(e.bounds.minY,...A.map(u=\u003eu.y-c)),maxY:Math.max(e.bounds.maxY,...A.map(u=\u003eu.y+c))};return{...e,fanoutPlaneConnectivity:n.flatMap(u=\u003eu.termination.type===\"plane\"?[{connectionName:u.connectionName,layer:u.termination.layer}]:[]),bounds:l,connections:i.filter(u=\u003e!s.has(u.name)),buses:e.buses?.map(u=\u003e({...u,connectionNames:u.connectionNames.filter(g=\u003e!s.has(g))})).filter(u=\u003eu.connectionNames.length\u003e0),obstacles:[...e.obstacles.map(u=\u003e({...u,center:{...u.center},layers:[...u.layers],connectedTo:[...u.connectedTo]})),...r],traces:[...(e.traces??[]).map(u=\u003e({...u,route:u.route.map(g=\u003e({...g}))})),...a]}}var GSo=5,YSo=40,USo=64,MNt=10,KSo=8;function DNt(t){const e=t.length,n=t.reduce((o,i)=\u003eo+i,0);return e\u003e=GSo\u0026\u0026e\u003c=YSo\u0026\u0026n\u003c=USo||e===4\u0026\u0026new Set(t).size\u003e1}function VSo({boundaryBusConnectionCounts:t,planeBusCount:e}){const n=t.length;return n\u003c=MNt-1\u0026\u0026e\u003e=KSo?\"mixed_with_planes\":n\u003e=MNt\u0026\u0026e===0\u0026\u0026DNt(t)?\"large_boundary_only\":null}function uue(t){if(!t.exitEdge)throw new Error(`Cannot order boundary bus ${t.busId} without an exit edge`);const e=e6(t.exitEdge);return t.connections.reduce((n,o)=\u003en+tR({bus:t,connection:o,boundaryDirection:e}),0)/t.connections.length}function zSo({busesInRoutingOrder:t,busLayerAssignments:e,routingMode:n}){if(n!==\"large_boundary_only\")return[...t];const o=t.filter(s=\u003es.connections.length===1);if(new Set(o.map(s=\u003es.exitEdge)).size!==1)return[...t];const i=[...t.filter(s=\u003es.connections.length\u003e=8).toSorted((s,a)=\u003euue(a)-uue(s)),...t.filter(s=\u003es.connections.length\u003e1\u0026\u0026s.connections.length\u003c8)],r=[];for(const s of o){const a=e[s.busId];if(!a)throw new Error(`Cannot order boundary bus ${s.busId} without a layer`);let A=r.find(c=\u003ec.targetLayer===a);A||(A={targetLayer:a,buses:[]},r.push(A)),A.buses.push(s)}return[...i,...r.flatMap(s=\u003es.buses.toSorted((a,A)=\u003euue(A)-uue(a)))]}var gue=1e-7;function r$(t,e){const n=t.sourceObstacle,o={...n,width:n.width-2e-8,height:n.height-2e-8},i=[];let r=!1,s=!1,a=!1;for(const[A,c]of[...t.segments,...t.planeEndpointSegments??[]].entries()){if(!n.layers.includes(c.layer))continue;const l=Tl(c,n),u=c.width/2;r\u0026\u0026o.width\u003e0\u0026\u0026o.height\u003e0\u0026\u0026Tl(c,o)\u003c1e-10\u0026\u0026i.push({segmentIndex:A,kind:\"outline\"}),s\u0026\u0026l\u003cu-gue\u0026\u0026i.push({segmentIndex:A,kind:\"copper\"}),a\u0026\u0026l\u003cu+e-gue\u0026\u0026i.push({segmentIndex:A,kind:\"clearance\"}),IO(c.end,n,1e-9)||(r=!0);const g=wx(c.end,n);g\u003eu+gue\u0026\u0026(s=!0),g\u003e=u+e-gue\u0026\u0026(a=!0)}return i}function*JSo(t,e){const n=t.sourceEscapeSegmentCount??1,o=t.segments.slice(0,n),i=o.slice(0,64).findIndex((s,a)=\u003e!bO(t,t.segments,e,new Set([a])));if(i\u003c0)return;const r=o[i].width+e;for(let s=i;s\u003e=Math.max(0,i-3);s--){let a=0;for(let A=s;A\u003cMath.min(o.length,i+8);A++){const c=o[A];if(c.layer!==t.sourceLayer||A\u003es\u0026\u0026tn(o[A-1].end,c.start)\u003e1e-7||(a+=tn(c.start,c.end),a\u003e4*r+1e-7))break;if(A\u003c=i)continue;const l=o[s].start,u=c.end,g=u.x-l.x,h=u.y-l.y,d=Math.min(Math.abs(g),Math.abs(h));for(const p of[{x:l.x+Math.sign(g)*d,y:l.y+Math.sign(h)*d},{x:u.x-Math.sign(g)*d,y:u.y-Math.sign(h)*d}])tn(l,p)+tn(p,u)\u003e=a-1e-7||(yield[o[0].start,...o.slice(0,s).map(m=\u003em.end),p,u,...o.slice(A+1).map(m=\u003em.end)].filter((m,_,f)=\u003e_===0||tn(m,f[_-1])\u003e1e-7))}}}var fw=1e-7,WSo=64;function jSo(t,e,n){const o=t,i=(o.ccwRotationDegrees??0)/90;if(t.type!==\"rect\"||o.shape===\"circle\"||Math.abs(i-Math.round(i))\u003efw||Math.abs(t.width-t.height)\u003cfw)return null;const r=Math.abs(Math.round(i))%2===1,s=r?t.height:t.width,a=r?t.width:t.height,A=s\u003ea?\"x\":\"y\",c=(A===\"x\"?s:a)/2;return[-1,1].map(l=\u003e({...e,[A]:t.center[A]+l*(c+n)}))}function $So(t){const{inputSrj:e,preparedBuses:n,layerNames:o,traceWidth:i,clearance:r}=t,s=n[0];if(!s)return t.plans.length?null:[];const a=s.sharedBoundary;if(n.some(g=\u003e[\"minX\",\"maxX\",\"minY\",\"maxY\"].some(h=\u003eg.sharedBoundary[h]!==a[h])))return null;const A=new Map(n.map(g=\u003e[g.busId,g]));if(new Set(t.plans.map(g=\u003eg.connectionIndex)).size!==t.plans.length)return null;let c=[...t.plans];const l=Z7(e,!1),u=Z0e({srj:e,sharedBoundary:a,clearance:r,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});for(const[g,h]of c.entries()){if(!r$(h,r).length)continue;const p=A.get(h.busId)?.connections.find(R=\u003eR.connectionIndex===h.connectionIndex),m=h.sourceEscapeSegmentCount??1,_=h.segments.slice(0,m),f=h.trace.route.findIndex(R=\u003eR.route_type===\"via\"),I=jSo(h.sourceObstacle,h.sourcePoint,i/2+r+1e-6);if(!p||p.sourceObstacle!==h.sourceObstacle||!h.via||f\u003c1||!I||!_.length||_.some(R=\u003eR.layer!==h.sourceLayer||R.width!==i)||tn(_[0].start,h.sourcePoint)\u003efw||tn(_.at(-1).end,h.via.center)\u003efw||!o.includes(h.sourceLayer))return null;const C=c.filter((R,F)=\u003eF!==g),y=new qj([...h.segments.slice(m),...h.planeEndpointSegments??[],...C.flatMap(R=\u003e[...R.segments,...R.planeEndpointSegments??[]]),...l.flatMap(R=\u003eR.segments)]),x=[...h.additionalVias??[],...h.planeEndpointVia?[h.planeEndpointVia]:[],...C.flatMap(R=\u003e[R.via,...R.additionalVias??[],R.planeEndpointVia].filter(F=\u003e!!F)),...l.flatMap(R=\u003eR.vias)],E=[...new Set([...Array.from({length:Math.min(_.length,WSo-1)},(R,F)=\u003eF+1),_.length])],B=[],S=new Set;for(const R of E){const F=_[R-1].end;for(const O of[null,...I]){const U=O??h.sourcePoint,Y=F.x-U.x,W=F.y-U.y,te=Math.min(Math.abs(Y),Math.abs(W));for(const j of[{x:U.x+Math.sign(Y)*te,y:U.y+Math.sign(W)*te},{x:F.x-Math.sign(Y)*te,y:F.y-Math.sign(W)*te}]){const J=[h.sourcePoint,...O?[O]:[],j,F].filter((ne,le,ge)=\u003ele===0||tn(ne,ge[le-1])\u003efw),oe=JSON.stringify([R,J]);if(S.has(oe))continue;S.add(oe);const ie=J.slice(1).reduce((ne,le,ge)=\u003ene+tn(J[ge],le),0)+_.slice(R).reduce((ne,le)=\u003ene+tn(le.start,le.end),0);B.push({anchor:R,points:J,length:ie})}}}B.sort((R,F)=\u003eR.length-F.length||R.anchor-F.anchor);const Q=R=\u003e{const F=eR({points:R.map(W=\u003e({...W,z:o.indexOf(h.sourceLayer)})),chamfer:i/2,segmentIsClear:(W,te)=\u003e{if([W,te].some(J=\u003eJ.x\u003ca.minX||J.x\u003ea.maxX||J.y\u003ca.minY||J.y\u003ea.maxY))return!1;const j={start:W,end:te,width:i,layer:h.sourceLayer};return e.obstacles.every(J=\u003eJ===h.sourceObstacle||!J.layers.includes(j.layer)||Tl(j,J)\u003e=i/2+r-fw||jj({inputSrj:e,segment:j,bodyObstacle:J,connectionName:h.connectionName}))\u0026\u0026y.querySegment(j,r).every(J=\u003eZm(j,J,r))\u0026\u0026x.every(J=\u003e!J.spanLayers.includes(j.layer)||Cr(J.center,W,te)\u003e=(i+J.diameter)/2+r-fw)}});if(!F)return null;const O=F.slice(1).map((W,te)=\u003e({start:{x:F[te].x,y:F[te].y},end:{x:W.x,y:W.y},width:i,layer:h.sourceLayer})).filter(W=\u003etn(W.start,W.end)\u003efw),U=[...O,...h.segments.slice(m)],Y=bB(h,U,!0);return Y?(Y.sourceEscapeSegmentCount=O.length,Y.trace={...h.trace,route:[h.trace.route[0],...O.map(W=\u003e({route_type:\"wire\",...W.end,width:W.width,layer:W.layer})),...h.trace.route.slice(f)]},r$(Y,r).length||!u([...C,Y])?null:Y):null},w=R=\u003ebO(R,R.segments,r,new Set(Array.from({length:R.sourceEscapeSegmentCount??1},(F,O)=\u003eO)));let M=null,k=null;for(const R of B){const F=Q([...R.points,..._.slice(R.anchor).map(O=\u003eO.end)]);if(F){if(!w(F)){k??=F;continue}M=F;break}}if(!M\u0026\u0026k)for(const R of JSo(k,r)){const F=Q(R);if(F\u0026\u0026w(F)){M=F;break}}if(!M)return null;c[g]=M}return c.some(g=\u003er$(g,r).length)||!u(c)?null:qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...c.flatMap(g=\u003e[g.trace,...g.planeEndpointTrace?[g.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:!1}).valid?c:null}var qSo=new Set([\"left\",\"right\",\"top\",\"bottom\",\"top-left\",\"top-right\",\"bottom-left\",\"bottom-right\"]),XSo=new Set([\"left\",\"right\",\"top\",\"bottom\"]),ZSo={top_left:{direction:\"up\",preferredExit:\"top-left\",exitEdge:\"top\"},top_middle:{direction:\"up\",preferredExit:\"top\",exitEdge:\"top\"},top_right:{direction:\"up\",preferredExit:\"top-right\",exitEdge:\"top\"},right_top:{direction:\"right\",preferredExit:\"top-right\",exitEdge:\"right\"},right_middle:{direction:\"right\",preferredExit:\"right\",exitEdge:\"right\"},right_bottom:{direction:\"right\",preferredExit:\"bottom-right\",exitEdge:\"right\"},bottom_right:{direction:\"down\",preferredExit:\"bottom-right\",exitEdge:\"bottom\"},bottom_middle:{direction:\"down\",preferredExit:\"bottom\",exitEdge:\"bottom\"},bottom_left:{direction:\"down\",preferredExit:\"bottom-left\",exitEdge:\"bottom\"},left_bottom:{direction:\"left\",preferredExit:\"bottom-left\",exitEdge:\"left\"},left_middle:{direction:\"left\",preferredExit:\"left\",exitEdge:\"left\"},left_top:{direction:\"left\",preferredExit:\"top-left\",exitEdge:\"left\"},top:{direction:\"up\",preferredExit:\"top\",exitEdge:\"top\"},right:{direction:\"right\",preferredExit:\"right\",exitEdge:\"right\"},bottom:{direction:\"down\",preferredExit:\"bottom\",exitEdge:\"bottom\"},left:{direction:\"left\",preferredExit:\"left\",exitEdge:\"left\"}};function NNt(t){const e=[...t].sort((o,i)=\u003eo-i),n=[];for(const o of e)(n.length===0||Math.abs(n[n.length-1]-o)\u003e1e-6)\u0026\u0026n.push(o);return n}function RNt(t){let e=Number.POSITIVE_INFINITY;for(let n=1;n\u003ct.length;n++){const o=t[n]-t[n-1];o\u003e1e-6\u0026\u0026(e=Math.min(e,o))}return e}function TNt(t,e){const n=e===\"x\"?\"y\":\"x\";let o=Number.POSITIVE_INFINITY;for(let i=0;i\u003ct.length;i++){const r=t[i];for(let s=i+1;s\u003ct.length;s++){const a=t[s];if(Math.abs(r.center[n]-a.center[n])\u003e1e-6)continue;const A=Math.abs(r.center[e]-a.center[e]);A\u003e1e-6\u0026\u0026(o=Math.min(o,A))}}return o}function eQo(t){return{minX:Math.min(...t.map(e=\u003ee.center.x-e.width/2)),maxX:Math.max(...t.map(e=\u003ee.center.x+e.width/2)),minY:Math.min(...t.map(e=\u003ee.center.y-e.height/2)),maxY:Math.max(...t.map(e=\u003ee.center.y+e.height/2))}}function kNt(t,e){const n=e.componentBounds?.[t.componentId];if(!n){const i=t.pitchX*2.25,r=t.pitchY*2.25;return{minX:t.bounds.minX-i,maxX:t.bounds.maxX+i,minY:t.bounds.minY-r,maxY:t.bounds.maxY+r}}if([n.minX,n.maxX,n.minY,n.maxY].some(i=\u003e!Number.isFinite(i))||n.minX\u003e=n.maxX||n.minY\u003e=n.maxY)throw new Error(`FanoutSolver: componentBounds for \"${t.componentId}\" must contain finite, increasing bounds`);if(n.minX\u003et.bounds.minX+1e-6||n.maxX\u003ct.bounds.maxX-1e-6||n.minY\u003et.bounds.minY+1e-6||n.maxY\u003ct.bounds.maxY-1e-6)throw new Error(`FanoutSolver: componentBounds for \"${t.componentId}\" must contain every component pad`);return{...n}}function FNt(t,e){if([t.minX,t.maxX,t.minY,t.maxY].some(o=\u003e!Number.isFinite(o))||t.minX\u003e=t.maxX||t.minY\u003e=t.maxY)throw new Error(\"FanoutSolver: sharedBoundary must contain finite, increasing bounds\");for(const o of e)if(t.minX\u003eo.bounds.minX+1e-6||t.maxX\u003co.bounds.maxX-1e-6||t.minY\u003eo.bounds.minY+1e-6||t.maxY\u003co.bounds.maxY-1e-6)throw new Error(`FanoutSolver: sharedBoundary must contain every pad of component \"${o.componentId}\"`);return{...t}}function tQo(t,e){if(e.sharedBoundary)return FNt(e.sharedBoundary,t);const n=t.map(r=\u003ekNt(r,e)),i=Math.max(...t.flatMap(r=\u003e[r.pitchX,r.pitchY]))*2.25;return FNt({minX:Math.min(...n.map(r=\u003er.minX))-i,maxX:Math.max(...n.map(r=\u003er.maxX))+i,minY:Math.min(...n.map(r=\u003er.minY))-i,maxY:Math.max(...n.map(r=\u003er.maxY))+i},t)}function nQo(t){const e=new Map;for(const o of t){if(!o.componentId||o.isCopperPour)continue;const i=e.get(o.componentId)??[];i.push(o),e.set(o.componentId,i)}const n=[];for(const[o,i]of e){const r=NNt(i.map(m=\u003em.center.x)),s=NNt(i.map(m=\u003em.center.y)),a=TNt(i,\"x\"),A=TNt(i,\"y\"),c=RNt(r),l=RNt(s),u=Math.min(...[a,A,c,l].filter(Number.isFinite)),g=Math.max(...i.flatMap(m=\u003e[m.width,m.height])),h=Number.isFinite(u)?u:g,d=Number.isFinite(a)?a:Number.isFinite(c)?c:h,p=Number.isFinite(A)?A:Number.isFinite(l)?l:h;n.push({componentId:o,obstacles:i,xCoordinates:r,yCoordinates:s,pitchX:d,pitchY:p,bounds:eQo(i)})}return n}function LNt(t){return\"layer\"in t?[t.layer]:t.layers}function HNt(t){const{point:e,connection:n,componentGrids:o}=t,i=LNt(e),r=[];for(const s of o){const a=s.obstacles.filter(A=\u003eA.layers.some(c=\u003ei.includes(c))).filter(A=\u003eIO(e,A,1e-5)).sort((A,c)=\u003e{const l=A.connectedTo.includes(n.name)||A.connectedTo.includes(e.pointId??\"\")||A.connectedTo.includes(e.pcb_port_id??\"\"),u=c.connectedTo.includes(n.name)||c.connectedTo.includes(e.pointId??\"\")||c.connectedTo.includes(e.pcb_port_id??\"\");return l!==u?l?-1:1:A.width*A.height-c.width*c.height});a[0]\u0026\u0026r.push({grid:s,obstacle:a[0]})}return r}function oQo(t){for(const n of t.pointsToConnect)if(\"layers\"in n\u0026\u0026n.busId)return n.busId;return/^BUS[_:-]([^_:-]+)(?:[_:-]\\d+)?$/i.exec(t.name)?.[1]??null}function s$(t,e){if(e!==void 0){if(!qSo.has(e))throw new Error(`FanoutSolver: bus \"${t}\" has invalid preferredExit \"${e}\"`);return e}}function iQo(t,e){if(e!==void 0){if(!XSo.has(e))throw new Error(`FanoutSolver: bus \"${t}\" has invalid exitEdge \"${e}\"`);return e}}function rQo(t,e){if(e!==void 0)try{return XDt(e)}catch{throw new Error(`FanoutSolver: bus \"${t}\" has invalid exitPosition \"${e}\"`)}}function $Pe(t){const{busId:e,exitPosition:n,fieldName:o,expected:i,actual:r,sourceName:s}=t;if(!(r===void 0||r===i))throw new Error(`FanoutSolver: bus \"${e}\" exitPosition \"${n}\" conflicts with ${s} ${o} \"${r}\"`)}function sQo(t){const{busId:e,requestedBus:n,options:o}=t,i=n.exitPosition,r=rQo(e,i),s=s$(e,n.preferredExit),a=s$(e,o.busExitPreferences?.[e]),A=iQo(e,n.exitEdge);if(r\u0026\u0026i){for(const[u,g]of[[n.direction,\"bus\"],[o.busDirections?.[e],\"busDirections\"]])$Pe({busId:e,exitPosition:i,fieldName:\"direction\",expected:r.direction,actual:u,sourceName:g});for(const[u,g]of[[s,\"bus\"],[a,\"busExitPreferences\"]])$Pe({busId:e,exitPosition:i,fieldName:\"preferredExit\",expected:r.preferredExit,actual:u,sourceName:g});return $Pe({busId:e,exitPosition:i,fieldName:\"exitEdge\",expected:r.exitEdge,actual:A,sourceName:\"bus\"}),{exitPosition:i,...r.direction?{direction:r.direction}:{},...r.preferredExit?{preferredExit:r.preferredExit}:{},...r.exitEdge?{exitEdge:r.exitEdge}:{}}}const c=o.busDirections?.[e]??n.direction??o.defaultDirection,l=s$(e,a??s??o.defaultPreferredExit);return{...c?{direction:c}:{},...l?{preferredExit:l}:{},...A?{exitEdge:A}:{}}}function aQo(t,e){if(e!==void 0){if(e.length===0)throw new Error(`FanoutSolver: bus \"${t}\" must allow at least one layer`);for(const n of e)if(typeof n!=\"string\"||n.length===0)throw new Error(`FanoutSolver: bus \"${t}\" has an invalid allowed layer`);return[...new Set(e)]}}function AQo(t,e){if(e!==void 0){if(!Number.isFinite(e)||e\u003c0)throw new Error(`FanoutSolver: bus \"${t}\" maxLengthSkew must be a finite non-negative number`);return e}}function ONt(t){if(t===void 0)return;if(t.length===0)throw new Error(\"FanoutSolver: availableCornersAndSides must contain at least one boundary region\");const e=[],n=new Set;for(const o of t){const i=ZSo[o];if(!i)throw new Error(`FanoutSolver: invalid availableCornersAndSides value \"${o}\"`);const r=`${i.exitEdge}:${i.direction}:${i.preferredExit}`;n.has(r)||(n.add(r),e.push(i))}return e}function cQo(t,e){if(e===void 0||e.type===\"boundary\")return{type:\"boundary\"};if(e.type!==\"plane\"||typeof e.layer!=\"string\"||e.layer.length===0)throw new Error(`FanoutSolver: bus \"${t}\" has an invalid termination target`);return{type:\"plane\",layer:e.layer}}function lQo(t,e){const n=e.buses??t.buses,o=new Map,i=new Set,r=new Set(t.connections.map(s=\u003es.name));for(const s of n??[]){if(o.has(s.busId))throw new Error(`FanoutSolver: duplicate bus id \"${s.busId}\"`);for(const u of s.connectionNames){if(!r.has(u))throw new Error(`FanoutSolver: bus \"${s.busId}\" references unknown connection \"${u}\"`);if(i.has(u))throw new Error(`FanoutSolver: connection \"${u}\" belongs to more than one bus`);i.add(u)}const a=cQo(s.busId,s.termination),A=sQo({busId:s.busId,requestedBus:s,options:e}),c=aQo(s.busId,s.allowedLayers),l=AQo(s.busId,s.maxLengthSkew);if(a.type===\"plane\"\u0026\u0026l!==void 0)throw new Error(`FanoutSolver: plane-terminated bus \"${s.busId}\" cannot specify maxLengthSkew`);if(a.type===\"plane\"\u0026\u0026A.preferredExit!==void 0)throw new Error(`FanoutSolver: plane-terminated bus \"${s.busId}\" cannot also specify preferredExit`);o.set(s.busId,{...s,sourceComponentId:s.sourceComponentId??e.sourceComponentId,...A,...c===void 0?{}:{allowedLayers:c},...l===void 0?{}:{maxLengthSkew:l},termination:a})}for(const s of t.connections){if(i.has(s.name))continue;const a=oQo(s);if(a){const A=o.get(a);A?o.set(a,{...A,connectionNames:[...A.connectionNames,s.name]}):o.set(a,{busId:a,connectionNames:[s.name],direction:e.busDirections?.[a]??e.defaultDirection,sourceComponentId:e.sourceComponentId,preferredExit:s$(a,e.busExitPreferences?.[a]??e.defaultPreferredExit),termination:{type:\"boundary\"}})}else{const A=`connection:${s.name}`;o.set(A,{busId:A,connectionNames:[s.name],sourceComponentId:e.sourceComponentId,direction:e.busDirections?.[A]??e.defaultDirection,preferredExit:s$(A,e.busExitPreferences?.[A]??e.defaultPreferredExit),termination:{type:\"boundary\"}})}}return[...o.values()]}function uQo(t){const{busSpec:e,connections:n,componentGrids:o}=t,i=new Map;for(const c of n){const l=new Set;for(const u of c.pointsToConnect)for(const g of HNt({point:u,connection:c,componentGrids:o}))l.add(g.grid.componentId);for(const u of l)i.set(u,(i.get(u)??0)+1)}const r=[...o].sort((c,l)=\u003e{const u=(i.get(l.componentId)??0)-(i.get(c.componentId)??0);return u!==0?u:l.obstacles.length-c.obstacles.length})[0],s=e.sourceComponentId?o.find(c=\u003ec.componentId===e.sourceComponentId):void 0;if(e.sourceComponentId\u0026\u0026!s)throw new Error(`FanoutSolver: source component \"${e.sourceComponentId}\" for bus \"${e.busId}\" was not found`);const a=s??r,A=a?i.get(a.componentId)??0:0;if(!a||A!==n.length)throw new Error(e.sourceComponentId?`FanoutSolver: source component \"${e.sourceComponentId}\" is not an endpoint on every connection in bus \"${e.busId}\"`:`FanoutSolver: bus \"${e.busId}\" does not have one component endpoint on every connection`);return a}function gQo(t,e,n,o){const r=e.pointsToConnect.filter((s,a)=\u003ea!==n).sort((s,a)=\u003etn(t,a)-tn(t,s))[0];if(!r\u0026\u0026o.type===\"plane\")return t;if(!r)throw new Error(`FanoutSolver: connection \"${e.name}\" has no target beyond its BGA pad`);return r}function dQo(t){const{connection:e,connectionIndex:n,sourceGrid:o,componentGrids:i,termination:r,exitTargetPoint:s}=t;for(let a=0;a\u003ce.pointsToConnect.length;a++){const A=e.pointsToConnect[a],c=HNt({point:A,connection:e,componentGrids:i}).find(g=\u003eg.grid.componentId===o.componentId);if(!c)continue;const l=LNt(A).find(g=\u003ec.obstacle.layers.includes(g));if(!l)throw new Error(`FanoutSolver: connection \"${e.name}\" has no source layer shared with its BGA pad`);const u=gQo(A,e,a,r);return{connection:e,connectionIndex:n,sourcePoint:A,sourcePointIndex:a,sourceLayer:l,sourceObstacle:c.obstacle,targetPoint:u,exitTargetPoint:s??{x:u.x,y:u.y},hasExplicitLayeredExitTarget:s?.layer!==void 0}}throw new Error(`FanoutSolver: connection \"${e.name}\" does not touch component \"${o.componentId}\"`)}function qPe(t,e){let n=0,o=0;for(const i of e){const r=i.exitTargetPoint??i.targetPoint;n+=r.x-i.sourcePoint.x,o+=r.y-i.sourcePoint.y}if(Math.abs(n)\u003c1e-9\u0026\u0026Math.abs(o)\u003c1e-9)throw new Error(`FanoutSolver: cannot infer an escape direction for bus \"${t}\"`);return Math.abs(n)\u003e=Math.abs(o)?n\u003e=0?\"right\":\"left\":o\u003e=0?\"up\":\"down\"}function hQo(t){switch(t){case\"left\":return[\"left\"];case\"right\":return[\"right\"];case\"top\":return[\"up\"];case\"bottom\":return[\"down\"];case\"top-left\":return[\"up\",\"left\"];case\"top-right\":return[\"up\",\"right\"];case\"bottom-left\":return[\"down\",\"left\"];case\"bottom-right\":return[\"down\",\"right\"]}}function GNt(t){return{x:t.reduce((e,n)=\u003ee+n.sourcePoint.x,0)/t.length,y:t.reduce((e,n)=\u003ee+n.sourcePoint.y,0)/t.length}}function due(t,e,n){switch(e){case\"left\":return t.x-n.minX;case\"right\":return n.maxX-t.x;case\"up\":return n.maxY-t.y;case\"down\":return t.y-n.minY}}function hue(t,e){return t.direction===\"up\"||t.direction===\"down\"?t.preferredExit.endsWith(\"left\")?e.minX:t.preferredExit.endsWith(\"right\")?e.maxX:(e.minX+e.maxX)/2:t.preferredExit.startsWith(\"top\")?e.maxY:t.preferredExit.startsWith(\"bottom\")?e.minY:(e.minY+e.maxY)/2}function YNt(t,e){return e===\"up\"||e===\"down\"?t.x:t.y}function pQo(t,e){try{return qPe(t,e)}catch{return}}function mQo(t){const{busId:e,explicitDirection:n,preferredExit:o,connections:i,sharedBoundary:r,availableRegions:s}=t,a=s.filter(g=\u003e(n===void 0||g.direction===n)\u0026\u0026(o===void 0||g.preferredExit===o));if(a.length===0)throw new Error(`FanoutSolver: bus \"${e}\" cannot use its requested exit with availableCornersAndSides`);const A=n?void 0:pQo(e,i),c=A?a.filter(g=\u003eg.direction===A):[],l=c.length\u003e0?c:a,u=GNt(i);return[...l].toSorted((g,h)=\u003edue(u,g.direction,r)-due(u,h.direction,r)||Math.abs(YNt(u,g.direction)-hue(g,r))-Math.abs(YNt(u,h.direction)-hue(h,r))||g.preferredExit.localeCompare(h.preferredExit))[0]}function _Qo(t){const{busId:e,exitEdge:n,preferredExit:o,availableRegions:i}=t,r=Ds(n,o);if(!i.some(a=\u003ea.exitEdge===n\u0026\u0026Ds(a.exitEdge,a.preferredExit)===r))throw new Error(`FanoutSolver: bus \"${e}\" cannot use its requested exit with availableCornersAndSides`)}function fQo(t){const{busId:e,explicitDirection:n,preferredExit:o,connections:i,sharedBoundary:r,availableRegions:s}=t;if(s)return mQo({busId:e,explicitDirection:n,preferredExit:o,connections:i,sharedBoundary:r,availableRegions:s});if(!o)return{direction:n??qPe(e,i)};const a=hQo(o);if(n){if(!a.includes(n))throw new Error(`FanoutSolver: bus \"${e}\" direction \"${n}\" is incompatible with preferredExit \"${o}\"`);return{direction:n,preferredExit:o}}if(a.length===1)return{direction:a[0],preferredExit:o};let A;try{A=qPe(e,i)}catch{A=void 0}if(A\u0026\u0026a.includes(A))return{direction:A,preferredExit:o};const c=GNt(i);return{direction:a.toSorted((l,u)=\u003edue(c,l,r)-due(c,u,r)||l.localeCompare(u))[0],preferredExit:o}}function IQo(t,e){const n=nQo(t.obstacles);if(n.length===0\u0026\u0026t.connections.length\u003e0)throw new Error(\"FanoutSolver: no componentId-tagged pad footprint was found\");const o=new Map(t.connections.map((l,u)=\u003e[l.name,u])),i=lQo(t,e).map(l=\u003e{for(const[d,p]of Object.entries(l.connectionExitTargets??{})){if(!l.connectionNames.includes(d))throw new Error(`FanoutSolver: connectionExitTargets contains connection \"${d}\" outside bus \"${l.busId}\"`);if(!Number.isFinite(p.x)||!Number.isFinite(p.y))throw new Error(`FanoutSolver: connectionExitTargets for connection \"${d}\" must contain finite x and y coordinates`)}const u=l.connectionNames.map(d=\u003e{const p=o.get(d);if(p===void 0)throw new Error(`FanoutSolver: connection \"${d}\" is missing from the input`);return t.connections[p]}),g=uQo({busSpec:l,connections:u,componentGrids:n}),h=u.map(d=\u003edQo({connection:d,connectionIndex:o.get(d.name),sourceGrid:g,componentGrids:n,termination:l.termination??{type:\"boundary\"},exitTargetPoint:l.connectionExitTargets?.[d.name]}));return{busSpec:l,sourceGrid:g,preparedConnections:h}}),r=[...new Map(i.map(({sourceGrid:l})=\u003e[l.componentId,l])).values()],s=tQo(r,e),a=ONt(e.availableCornersAndSides),A=[];for(const{busSpec:l,sourceGrid:u,preparedConnections:g}of i){if(l.exitEdge\u0026\u0026!l.preferredExit)throw new Error(`FanoutSolver: bus \"${l.busId}\" exitEdge requires preferredExit`);if(l.exitEdge\u0026\u0026l.preferredExit\u0026\u0026!ZDt(l.preferredExit,l.exitEdge))throw new Error(`FanoutSolver: bus \"${l.busId}\" exitEdge \"${l.exitEdge}\" is incompatible with preferredExit \"${l.preferredExit}\"`);const h=fQo({busId:l.busId,explicitDirection:l.direction??e.busDirections?.[l.busId],preferredExit:l.preferredExit,connections:g,sharedBoundary:s,availableRegions:l.termination?.type===\"plane\"||l.exitEdge?void 0:a});l.termination?.type!==\"plane\"\u0026\u0026l.exitEdge\u0026\u0026h.preferredExit\u0026\u0026a\u0026\u0026_Qo({busId:l.busId,exitEdge:l.exitEdge,preferredExit:h.preferredExit,availableRegions:a}),A.push({busId:l.busId,...l.maxLengthSkew===void 0?{}:{maxLengthSkew:l.maxLengthSkew},direction:h.direction,preferredExit:h.preferredExit,...l.exitEdge?{exitEdge:l.exitEdge}:{},cornerBandConnectionCount:0,allowedLayers:l.allowedLayers,termination:l.termination??{type:\"boundary\"},connections:g,componentId:u.componentId,componentObstacles:u.obstacles,componentBounds:kNt(u,e),sharedBoundary:s,xCoordinates:[...u.xCoordinates],yCoordinates:[...u.yCoordinates],pitchX:u.pitchX,pitchY:u.pitchY})}const c=new Map;for(const l of A){const u=Ds(l.exitEdge,l.preferredExit);if(!l.exitEdge||!u)continue;const g=`${l.exitEdge}:${u}`;c.set(g,(c.get(g)??0)+l.connections.length)}for(const l of A){const u=Ds(l.exitEdge,l.preferredExit);!l.exitEdge||!u||(l.cornerBandConnectionCount=c.get(`${l.exitEdge}:${u}`)??l.connections.length)}return A}var Iw=1e-9,UNt=Math.PI*2;function CQo(t){const{buses:e,rules:n}=t,o=e.find(M=\u003eM.busId===t.busId);if(!o||o.termination.type!==\"boundary\"||!o.exitEdge||o.connections.length\u003c3)return null;const i=t.maximumOrderingStates??1e4,r=t.maximumCompleteAssignments??16;for(const[M,k]of Object.entries({maximumOrderingStates:i,maximumCompleteAssignments:r}))if(!Number.isSafeInteger(k)||k\u003c1)throw new Error(`FanoutSolver: ${M} must be a positive safe integer`);const s={x:(o.componentBounds.minX+o.componentBounds.maxX)/2,y:(o.componentBounds.minY+o.componentBounds.maxY)/2},a=M=\u003eMath.atan2(M.y-s.y,M.x-s.x),A=M=\u003e{const k=M.exitTargetPoint??M.targetPoint;return o.exitEdge===\"right\"?k.y:o.exitEdge===\"top\"?-k.x:o.exitEdge===\"left\"?-k.y:k.x},c=o.connections.toSorted((M,k)=\u003eA(M)-A(k)||M.connectionIndex-k.connectionIndex),l=[];for(const M of c){if(tn(M.sourcePoint,s)\u003cIw)return null;let k=a(M.sourcePoint);for(;k\u003c(l.at(-1)??k)-Iw;)k+=UNt;l.push(k)}if(l.at(-1)-l[0]\u003e=UNt-Iw)return null;const u=new Map(e.flatMap(M=\u003eM.connections.map(k=\u003e[k.connectionIndex,k]))),g=new Map(c.map((M,k)=\u003e[M.connectionIndex,k])),h=new Map,d=new Map;for(const M of u.values())d.set(M.connectionIndex,[]);for(const M of pw(e,n)){const k=u.get(M.connectionIndex),R=`${M.point.x.toFixed(9)},${M.point.y.toFixed(9)}`;h.has(R)||h.set(R,h.size);const F=g.get(M.connectionIndex),O=a(k.sourcePoint),U=F===void 0?a(M.point):l[F]+Math.atan2(Math.sin(a(M.point)-O),Math.cos(a(M.point)-O));d.get(M.connectionIndex).push({...M,angle:U,siteIndex:h.get(R),sourceSegment:{start:k.sourcePoint,end:M.point,layer:k.sourceLayer,width:n.traceWidth}})}const p=[...d.entries()].map(([M,k])=\u003e({connectionIndex:M,candidates:k}));if(p.some(M=\u003eM.candidates.length===0))return null;const m=c.map((M,k)=\u003ed.get(M.connectionIndex).toSorted((R,F)=\u003eMath.abs(R.angle-l[k])-Math.abs(F.angle-l[k])||tn(F.point,s)-tn(R.point,s))),_=n.viaHoleDiameter?n.viaHoleDiameter+(n.holeToHoleClearance??n.clearance):0,f=n.viaDiameter/2+n.traceWidth/2+n.clearance,I=(M,k)=\u003e{const R=n.canShareCopper?.(M.connectionIndex,k.connectionIndex)??!1,F=R?_:Math.max(_,n.viaDiameter+n.clearance);return tn(M.point,k.point)\u003cF-Iw?!1:R?!0:Cr(M.point,k.sourceSegment.start,k.sourceSegment.end)\u003e=f-Iw\u0026\u0026Cr(k.point,M.sourceSegment.start,M.sourceSegment.end)\u003e=f-Iw\u0026\u0026Zm(M.sourceSegment,k.sourceSegment,n.clearance)},C=new Map;for(const M of m)for(const k of M){const R=new Set;for(const F of p)for(const O of F.candidates)k.connectionIndex!==O.connectionIndex\u0026\u0026!I(k,O)\u0026\u0026R.add(O);C.set(k,R)}const y=[],x=_\u003eIw||!n.canShareCopper,E=()=\u003e{if(!x)return!0;const M=new Map(y.map(O=\u003e[O.connectionIndex,O.siteIndex])),k=p.map(O=\u003eO.candidates.filter(U=\u003e(!M.has(U.connectionIndex)||M.get(U.connectionIndex)===U.siteIndex)\u0026\u0026y.every(Y=\u003e!C.get(Y).has(U))).map(U=\u003eU.siteIndex)).sort((O,U)=\u003eO.length-U.length);if(k.some(O=\u003eO.length===0))return!1;const R=new Int32Array(h.size).fill(-1),F=(O,U)=\u003e{for(const Y of k[O])if(!U[Y]\u0026\u0026(U[Y]=1,R[Y]===-1||F(R[Y],U)))return R[Y]=O,!0;return!1};return k.every((O,U)=\u003eF(U,new Uint8Array(h.size)))};let B=0,S=0,Q=null;const w=M=\u003e{if(++B\u003ei)return!1;if(M===m.length){if(++S\u003er)return!1;const k=new Map(n.fixedViaPointsByConnectionIndex);for(const R of y)k.set(R.connectionIndex,R.point);return Q=pd(e,{...n,fixedViaPointsByConnectionIndex:k}),Q!==null}for(const k of m[M])if(!(k.angle\u003c(y.at(-1)?.angle??-1/0)-Iw||y.some(R=\u003eC.get(R).has(k)))){if(y.push(k),E()\u0026\u0026w(M+1))return!0;if(y.pop(),B\u003ei||S\u003e=r)break}return!1};return w(0),Q}var ah=1e-9,Cw=1,a$=globalThis.process?.env?.FANOUT_FLOW_DEBUG===\"1\";function yQo(t){const{boundary:e,sourcePoints:n,traceWidth:o,update:i}=t,r=e.maxX-e.minX,s=e.maxY-e.minY,a=Math.max(Math.min(r,s)*.02,.2),A=i.grid?Math.max(1,Math.ceil(i.grid.points.length/1200)):1,c=i.grid?i.grid.points.flatMap((u,g)=\u003eg%A===0?[{point:u,index:g}]:[]):[],l=i.grid?.processedNodeCount??i.grid?.points.length??0;return{title:`Adaptive exits: ${i.phase}`,rects:[{center:{x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2},width:r,height:s,fill:\"rgba(0, 0, 0, 0)\",stroke:\"rgba(14, 165, 233, 0.9)\",label:\"adaptive flow grid boundary\"}],points:[...c.map(({point:u,index:g})=\u003e{const h=g\u003cl;return{...u,color:h?i.grid.obstacleFreeNodes[g]?\"rgba(34, 197, 94, 0.38)\":\"rgba(100, 116, 139, 0.28)\":\"rgba(148, 163, 184, 0.18)\",label:h?i.grid.obstacleFreeNodes[g]?\"available flow node\":\"blocked flow node\":\"unprocessed flow node\"}}),...n.map(u=\u003e({...u,color:\"#f97316\",label:\"adaptive route source\"})),...(i.candidatePoints??[]).map(u=\u003e({...u,color:\"#06b6d4\",label:\"selected terminal node\"}))],lines:(i.segments??[]).map(u=\u003e({points:[u.start,u.end],strokeColor:\"rgba(250, 204, 21, 0.9)\",strokeWidth:Math.max(o,a*.4),label:\"current adaptive route\"})),texts:[{x:e.minX,y:e.maxY+a*2,text:`${i.phase}${i.direction?` · ${i.direction}`:\"\"}${i.processed!==void 0\u0026\u0026i.total!==void 0?` · ${i.processed}/${i.total}`:\"\"}`,color:\"#0f172a\",fontSize:a*1.5,anchorSide:\"bottom_left\"}]}}function xQo(t){const e=t.connection;return t.sourceObstacle.connectedTo.find(o=\u003eo.startsWith(\"connectivity_net\"))??e.netConnectionName??t.connection.name.replace(/::fanout:\\d+$/,\"\")}function KNt(t,e){return t===e.connection.sourceObstacle||t.connectedTo.includes(e.connection.connection.name)||t.connectedTo.includes(e.netKey)}function pue(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o);return i\u003cah||r\u003cah||Math.abs(i-r)\u003cah?[t,e]:i\u003er?[t,{x:t.x+Math.sign(n)*r,y:e.y},e]:[t,{x:e.x,y:t.y+Math.sign(o)*i},e]}function VNt(t){if(t.length\u003c2)return t;const e=[t[0]];for(const n of t.slice(1)){const o=e.at(-1),i=Math.abs(n.x-o.x),r=Math.abs(n.y-o.y);if(i\u003cah||r\u003cah||Math.abs(i-r)\u003cah){e.push(n);continue}e.push(...pue(n,o).reverse().slice(1))}return mue(e)}function mue(t){if(t.length\u003c3)return t;const e=[t[0]];for(let n=1;n\u003ct.length-1;n++){const o=e.at(-1),i=t[n],r=t[n+1];(Math.sign(i.x-o.x)!==Math.sign(r.x-i.x)||Math.sign(i.y-o.y)!==Math.sign(r.y-i.y))\u0026\u0026e.push(i)}return e.push(t.at(-1)),e}function EQo(t,e){if(t.length\u003c3)return t;const n=[t[0]];for(let o=1;o\u003ct.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a=tn(i,r),A=tn(r,s);if(a\u003cah||A\u003cah)continue;const c={x:(r.x-i.x)/a,y:(r.y-i.y)/a},l={x:(s.x-r.x)/A,y:(s.y-r.y)/A};if(Math.abs(c.x*l.x+c.y*l.y)\u003e1e-6){n.push(r);continue}const u=Math.min(e,a/2,A/2);n.push({x:r.x-c.x*u,y:r.y-c.y*u}),n.push({x:r.x+l.x*u,y:r.y+l.y*u})}return n.push(t.at(-1)),mue(n)}function vO(t,e){const n=[];for(let o=1;o\u003ct.length;o++)tn(t[o-1],t[o])\u003cah||n.push({start:t[o-1],end:t[o],width:e,layer:\"top\"});return n}var BQo=class{edges;levels;nextEdges;constructor(t){this.edges=Array.from({length:t},()=\u003e[]),this.levels=new Int32Array(t),this.nextEdges=new Int32Array(t)}addEdge(t,e,n,o={}){const i={to:e,reverseIndex:this.edges[e].length,capacity:n,initialCapacity:n,...o},r={to:t,reverseIndex:this.edges[t].length,capacity:0,initialCapacity:0};this.edges[t].push(i),this.edges[e].push(r)}buildLevels(t,e){this.levels.fill(-1);const n=new Int32Array(this.edges.length);let o=0,i=0;for(n[i++]=t,this.levels[t]=0;o\u003ci;){const r=n[o++];for(const s of this.edges[r])s.capacity\u003c=0||this.levels[s.to]\u003e=0||(this.levels[s.to]=this.levels[r]+1,n[i++]=s.to)}return this.levels[e]\u003e=0}sendFlow(t,e){if(t===e)return 1;for(let n=this.nextEdges[t];n\u003cthis.edges[t].length;n++,this.nextEdges[t]=n){const o=this.edges[t][n];if(o.capacity\u003c=0||this.levels[o.to]!==this.levels[t]+1)continue;const i=this.sendFlow(o.to,e);if(i!==0)return o.capacity-=i,this.edges[o.to][o.reverseIndex].capacity+=i,i}return 0}*maximumFlowSteps(t,e,n){let o=0;for(;o\u003cn\u0026\u0026this.buildLevels(t,e);){this.nextEdges.fill(0);let i=0;for(;o\u003cn;){const r=this.sendFlow(t,e);if(r===0)break;o+=r,i+=r,i\u003e=4\u0026\u0026o\u003cn\u0026\u0026(i=0,yield o)}}return o}};function*bQo(t){const{boundary:e,obstacles:n,traceWidth:o,clearance:i,reportProgress:r}=t,s=o+i,a=Math.round((e.maxX-e.minX)/s)+1,A=Math.round((e.maxY-e.minY)/s)+1,c=a*A,l=Array.from({length:c},(m,_)=\u003e({x:e.minX+_%a*s,y:e.minY+Math.floor(_/a)*s})),u=o/2+i,g=new Map;for(let m=0;m\u003cn.length;m++){const _=n[m],f=Math.floor((_.center.x-_.width/2-u)/Cw),I=Math.floor((_.center.x+_.width/2+u)/Cw),C=Math.floor((_.center.y-_.height/2-u)/Cw),y=Math.floor((_.center.y+_.height/2+u)/Cw);for(let x=f;x\u003c=I;x++)for(let E=C;E\u003c=y;E++){const B=`${x}:${E}`,S=g.get(B)??[];S.push(m),g.set(B,S)}(m+1)%128===0\u0026\u0026(r({phase:\"index-obstacles\",processed:m+1,total:n.length}),yield)}const h=(m,_=m)=\u003e{const f=Math.floor(Math.min(m.x,_.x)/Cw),I=Math.floor(Math.max(m.x,_.x)/Cw),C=Math.floor(Math.min(m.y,_.y)/Cw),y=Math.floor(Math.max(m.y,_.y)/Cw),x=new Set;for(let E=f;E\u003c=I;E++)for(let B=C;B\u003c=y;B++)for(const S of g.get(`${E}:${B}`)??[])x.add(S);return[...x].map(E=\u003en[E])},d=new Uint8Array(c);for(let m=0;m\u003cc;m++){const _=l[m];h(_).every(f=\u003ewx(_,f)\u003e=u-ah)\u0026\u0026(d[m]=1),(m+1)%2048===0\u0026\u0026(r({phase:\"classify-flow-grid\",processed:m+1,total:c,grid:{points:l,obstacleFreeNodes:d,processedNodeCount:m+1}}),yield)}const p=Array.from({length:c},()=\u003e[]);for(let m=0;m\u003cc;m++){if(!d[m])continue;const _=m%a,f=Math.floor(m/a);for(const[I,C]of[[1,0],[0,1]]){const y=_+I,x=f+C;if(y\u003e=a||x\u003e=A)continue;const E=x*a+y;if(!d[E])continue;const B={start:l[m],end:l[E]};h(B.start,B.end).some(S=\u003eTl(B,S)\u003cu-ah)||(p[m].push(E),p[E].push(m))}(m+1)%2048===0\u0026\u0026(r({phase:\"connect-flow-grid\",processed:m+1,total:c,grid:{points:l,obstacleFreeNodes:d,processedNodeCount:c}}),yield)}return{boundary:e,step:s,columnCount:a,rowCount:A,nodeCount:c,points:l,obstacleFreeNodes:d,neighbors:p}}function*SQo(t){const{direction:e,availableDirections:n,items:o,grid:i,obstacles:r,traceWidth:s,clearance:a,occupiedNodes:A,acceptedSegments:c,connectorSelectionOffset:l=0,reportProgress:u}=t;if(o.length===0)return{routes:[],usedNodes:[],unmatchedItems:[]};const{boundary:g,step:h,columnCount:d,rowCount:p,nodeCount:m}=i,_=le=\u003ei.points[le],f=s/2+a,I=s+a,C=new Uint8Array(m);for(let le=0;le\u003cm;le++)!A[le]\u0026\u0026i.obstacleFreeNodes[le]\u0026\u0026(C[le]=1);const y=(le,ge)=\u003e{const _e=vO(le,s);return _e.every(ue=\u003er.every(fe=\u003eKNt(fe,ge)||Tl(ue,fe)\u003e=f-ah))\u0026\u0026_e.every(ue=\u003ec.every(fe=\u003etu(ue.start,ue.end,fe.start,fe.end)\u003e=I-ah))},x=new Map;for(const le of o){const ge=`${le.source.x.toFixed(6)}:${le.source.y.toFixed(6)}:${le.netKey}`,_e=x.get(ge)??[];_e.push(le),x.set(ge,_e)}const E=Array.from({length:3721},(le,ge)=\u003e{const _e=ge%61-30,ue=Math.floor(ge/61)-30;return{x:_e,y:ue,distanceSquared:_e*_e+ue*ue}}).sort((le,ge)=\u003ele.distanceSquared-ge.distanceSquared),B=[];let S=0;for(const le of x.values()){const ge=le[0],_e=Math.hypot(ge.connection.sourceObstacle.width/2,ge.connection.sourceObstacle.height/2)+a+h*2,ue=Math.round((ge.source.x-g.minX)/h),fe=Math.round((ge.source.y-g.minY)/h),pe=[],ye=new Set;for(const Me of E){const ve=ue+Me.x,he=fe+Me.y;if(ve\u003c0||ve\u003e=d||he\u003c0||he\u003e=p)continue;const Qe=he*d+ve;if(!C[Qe]||ye.has(Qe)||tn(ge.source,_(Qe))\u003e_e)continue;const Pe=pue(ge.source,_(Qe));if(y(Pe,ge)\u0026\u0026(ye.add(Qe),pe.push({node:Qe,connectorPoints:Pe}),pe.length\u003e=12))break}if(pe.length===0)return null;B.push({item:ge,equivalentItems:le,candidates:pe}),S++,S%8===0\u0026\u0026(u({phase:\"discover-terminal-connectors\",direction:e,processed:S,total:x.size,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.flatMap(Me=\u003eMe.candidates.map(ve=\u003e_(ve.node))),segments:c}),yield)}const Q=[];let w=0;for(const le of[...B].sort((ge,_e)=\u003ege.candidates.length-_e.candidates.length)){const ge=le.candidates.length===0?0:l%le.candidates.length,ue=[...le.candidates.slice(ge),...le.candidates.slice(0,ge)].find(fe=\u003e{const pe=vO(fe.connectorPoints,s);return Q.every(ye=\u003eye.netKey===le.item.netKey||pe.every(Me=\u003eye.segments.every(ve=\u003etu(Me.start,Me.end,ve.start,ve.end)\u003e=I-ah)))});if(!ue)return null;le.candidates=[ue],Q.push({netKey:le.item.netKey,segments:vO(ue.connectorPoints,s)}),w++,w%8===0\u0026\u0026(u({phase:\"select-terminal-connectors\",direction:e,processed:w,total:B.length,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.flatMap(fe=\u003efe.candidates.map(pe=\u003e_(pe.node))),segments:[...c,...Q.flatMap(fe=\u003efe.segments)]}),yield)}const M=new Set(B.map(le=\u003ele.candidates[0].node));for(const le of Q)for(const ge of le.segments){const _e=Math.max(0,Math.floor((Math.min(ge.start.x,ge.end.x)-I-g.minX)/h)),ue=Math.min(d-1,Math.ceil((Math.max(ge.start.x,ge.end.x)+I-g.minX)/h)),fe=Math.max(0,Math.floor((Math.min(ge.start.y,ge.end.y)-I-g.minY)/h)),pe=Math.min(p-1,Math.ceil((Math.max(ge.start.y,ge.end.y)+I-g.minY)/h));for(let ye=fe;ye\u003c=pe;ye++)for(let Me=_e;Me\u003c=ue;Me++){const ve=ye*d+Me;if(!C[ve]||M.has(ve))continue;const he=_(ve);tu(ge.start,ge.end,he,he)\u003cI-ah\u0026\u0026(C[ve]=0)}}const k=0,R=1,F=R+B.length,O=F+m,U=O+m,Y=new BQo(U+1);for(let le=0;le\u003cB.length;le++){const ge=R+le;Y.addEdge(k,ge,1);for(const _e of B[le].candidates)Y.addEdge(ge,F+_e.node,1,{gridNode:_e.node})}for(let le=0;le\u003cm;le++){if(!C[le])continue;Y.addEdge(F+le,O+le,1);const ge=le%d,_e=Math.floor(le/d);for(const fe of i.neighbors[le])C[fe]\u0026\u0026Y.addEdge(O+le,F+fe,1,{gridNode:fe});(e===\"any\"\u0026\u0026((!n||n.has(\"left\"))\u0026\u0026ge===0||(!n||n.has(\"right\"))\u0026\u0026ge===d-1||(!n||n.has(\"down\"))\u0026\u0026_e===0||(!n||n.has(\"up\"))\u0026\u0026_e===p-1)||e===\"left\"\u0026\u0026ge===0||e===\"right\"\u0026\u0026ge===d-1||e===\"down\"\u0026\u0026_e===0||e===\"up\"\u0026\u0026_e===p-1)\u0026\u0026Y.addEdge(O+le,U,1,{isSink:!0}),(le+1)%2048===0\u0026\u0026(u({phase:\"build-flow-network\",direction:e,processed:le+1,total:m,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.map(fe=\u003e_(fe.candidates[0].node)),segments:[...c,...Q.flatMap(fe=\u003efe.segments)]}),yield)}const W=Y.maximumFlowSteps(k,U,B.length);let te=W.next();for(;!te.done;)u({phase:\"augment-terminal-flow\",direction:e,processed:te.value,total:B.length,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.map(le=\u003e_(le.candidates[0].node)),segments:[...c,...Q.flatMap(le=\u003ele.segments)]}),yield,te=W.next();const j=te.value,J=le=\u003e{const ge=R+le;return Y.edges[k].some(_e=\u003e_e.to===ge\u0026\u0026_e.initialCapacity===1\u0026\u0026_e.capacity===0)};if(j!==B.length\u0026\u0026a$){const le=B.flatMap((ge,_e)=\u003eJ(_e)?[]:[ge.item.connection.connection.name]);console.error(\"single-layer flow group failed\",{direction:e,achievedFlow:j,requiredFlow:B.length,unmatchedConnections:le})}const oe=[],ie=[],ne=[];for(let le=0;le\u003cB.length;le++){const ge=B[le];if(!J(le)){ne.push(...ge.equivalentItems);continue}const _e=R+le,ue=Y.edges[_e].find(Pe=\u003ePe.initialCapacity===1\u0026\u0026Pe.capacity===0\u0026\u0026Pe.gridNode!==void 0);if(ue?.gridNode===void 0)return null;const fe=ge.candidates.find(Pe=\u003ePe.node===ue.gridNode);if(!fe)return null;const pe=[_(fe.node)];let ye=fe.node;const Me=[ye];for(let Pe=0;Pe\u003c=m;Pe++){const we=O+ye,Te=Y.edges[we].find(Re=\u003eRe.initialCapacity===1\u0026\u0026Re.capacity===0\u0026\u0026(Re.gridNode!==void 0||Re.isSink));if(!Te)return null;if(Te.isSink)break;if(Te.gridNode===void 0)return null;ye=Te.gridNode,Me.push(ye),pe.push(_(ye))}ie.push(...Me);const ve=mue([...fe.connectorPoints,...pe.slice(1)]),he=VNt(EQo(ve,h/2)),Qe=vO(he,s);for(const Pe of ge.equivalentItems)oe.push({item:Pe,points:he,segments:Qe});(le+1)%8===0\u0026\u0026(u({phase:\"extract-flow-routes\",direction:e,processed:le+1,total:B.length,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},segments:[...c,...oe.flatMap(Pe=\u003ePe.segments)]}),yield)}return{routes:oe,usedNodes:ie,unmatchedItems:ne}}function zNt(t,e){const{item:n,points:o,segments:i}=t,r=o.map((a,A)=\u003e({route_type:\"wire\",x:a.x,y:a.y,width:e,layer:\"top\",...A===0\u0026\u0026n.connection.sourcePoint.pcb_port_id?{start_pcb_port_id:n.connection.sourcePoint.pcb_port_id}:{}})),s=qN({connectionName:n.connection.connection.name,sourcePointIndex:n.connection.sourcePointIndex});return{busId:n.bus.busId,connectionName:n.connection.connection.name,connectionIndex:n.connection.connectionIndex,sourcePointIndex:n.connection.sourcePointIndex,sourcePoint:n.connection.sourcePoint,sourceObstacle:n.connection.sourceObstacle,sourceLayer:n.connection.sourceLayer,targetPoint:n.connection.targetPoint,targetLayer:\"top\",termination:n.bus.termination,direction:n.bus.direction,...n.bus.exitEdge?{exitEdge:n.bus.exitEdge}:{},exitPoint:o.at(-1),trace:{type:\"pcb_trace\",pcb_trace_id:s.traceId,connection_name:n.connection.connection.name,connectsTo:[...n.connection.sourcePoint.pointId?[n.connection.sourcePoint.pointId]:[],...n.connection.sourcePoint.pcb_port_id?[n.connection.sourcePoint.pcb_port_id]:[],s.boundaryExitPointId],route:r},segments:i,length:i.reduce((a,A)=\u003ea+tn(A.start,A.end),0)}}function QQo(t,e){const n=pue(t,e),o=pue(e,t).reverse();return n.length===o.length\u0026\u0026n.every((i,r)=\u003etn(i,o[r])\u003cah)?[n]:[n,o]}function JNt(t){const{plans:e,items:n,obstacles:o,traceWidth:i,clearance:r}=t,s=new Map(n.map(g=\u003e[g.connection.connection.name,g.netKey])),a=new Map,A=new Map;for(const g of e){const h=s.get(g.connectionName),d=a.get(h)??[],p=A.get(h)??new Set;for(const m of g.segments){const f=[m.start,m.end].map(I=\u003e`${I.x.toFixed(6)}:${I.y.toFixed(6)}`).sort().join(\":\");p.has(f)||(p.add(f),d.push(m))}a.set(h,d),A.set(h,p)}const c=i/2+r;for(const[g,h]of a)for(const d of h)for(const p of o)if(!(p.connectedTo.includes(g)||Tl(d,p)\u003e=c-ah))return a$\u0026\u0026console.error(\"single-layer route violates obstacle clearance\",{netKey:g,segment:d,obstacleId:p.obstacleId,distance:Tl(d,p),requiredObstacleDistance:c}),!1;const l=i+r,u=[...a];for(let g=0;g\u003cu.length;g++)for(let h=g+1;h\u003cu.length;h++)for(const d of u[g][1])for(const p of u[h][1])if(tu(d.start,d.end,p.start,p.end)\u003cl-ah)return a$\u0026\u0026console.error(\"single-layer routes violate copper clearance\",{firstNetKey:u[g][0],secondNetKey:u[h][0],first:d,second:p,distance:tu(d.start,d.end,p.start,p.end),requiredRouteDistance:l}),!1;return!0}function vQo(t,e){return Math.abs(t.x-e.minX)\u003cah?\"left\":Math.abs(t.x-e.maxX)\u003cah?\"right\":Math.abs(t.y-e.minY)\u003cah?\"down\":Math.abs(t.y-e.maxY)\u003cah?\"up\":null}function*wQo(t){const{items:e,grid:n,obstacles:o,traceWidth:i,clearance:r,availableBoundaryRegions:s,onPartialRoutes:a,reportProgress:A}=t,c=s?new Set(s.map(_=\u003e_.direction)):void 0,l=new Set(e.filter(_=\u003e_.connection.sourceObstacle.width\u003e2\u0026\u0026_.connection.sourceObstacle.height\u003e2));let u=null;for(let _=0;_\u003c4;_++){const f=e.filter(x=\u003e!l.has(x));let I=null;for(let x=0;x\u003c4;x++){const E=yield*SQo({direction:\"any\",availableDirections:c,items:f,grid:n,obstacles:o,traceWidth:i,clearance:r,occupiedNodes:new Uint8Array(n.nodeCount),acceptedSegments:[],connectorSelectionOffset:x,reportProgress:A});if(E){if(a\u0026\u0026E.routes.length\u003e0\u0026\u0026E.routes.length\u003ce.length){const B=E.routes.map(S=\u003ezNt(S,i));JNt({plans:B,items:e,obstacles:o,traceWidth:i,clearance:r})\u0026\u0026a(B)}if((!I||E.routes.length\u003eI.routes.length)\u0026\u0026(I=E),E.routes.length===f.length)break}}if(!I)return null;if(I.routes.length===f.length){u=I;break}const C=new Map;for(const x of f)C.set(x.netKey,(C.get(x.netKey)??0)+1);let y=!1;for(const x of I.unmatchedItems)(C.get(x.netKey)??0)\u003c2||(l.add(x),y=!0);if(!y)return null}if(!u)return null;const g=[...u.routes],h=i/2+r,d=i+r;for(const _ of l){const f=g.filter(C=\u003eC.item.netKey===_.netKey).flatMap(C=\u003eC.points.map((y,x)=\u003e({route:C,point:y,pointIndex:x}))).sort((C,y)=\u003e+(y.route.item.bus.componentId===_.bus.componentId)-+(C.route.item.bus.componentId===_.bus.componentId)||tn(_.source,C.point)-tn(_.source,y.point));let I=null;for(const C of f){for(const y of QQo(_.source,C.point)){const x=vO(y,i),E=x.every(Q=\u003eo.every(w=\u003eKNt(w,_)||Tl(Q,w)\u003e=h-ah)),B=x.every(Q=\u003eg.every(w=\u003ew.item.netKey===_.netKey||w.segments.every(M=\u003etu(Q.start,Q.end,M.start,M.end)\u003e=d-ah)));if(!E||!B)continue;const S=VNt(mue([...y,...C.route.points.slice(C.pointIndex+1)]));I={item:_,points:S,segments:vO(S,i)};break}if(I)break}if(!I)return null;g.push(I),A({phase:\"merge-same-net-routes\",processed:g.length,total:e.length,grid:{points:n.points,obstacleFreeNodes:n.obstacleFreeNodes,processedNodeCount:n.nodeCount},segments:g.flatMap(C=\u003eC.segments)}),yield}const p=g.map(_=\u003ezNt(_,i));if(!JNt({plans:p,items:e,obstacles:o,traceWidth:i,clearance:r}))return a$\u0026\u0026console.error(\"single-layer adaptive exits failed exact clearance\"),null;for(const _ of p){const f=vQo(_.exitPoint,n.boundary);if(!f||c\u0026\u0026!c.has(f))return null;const I=e.find(x=\u003ex.connection.connection.name===_.connectionName);I.bus.direction=f;const C=s?.filter(x=\u003ex.direction===f),y=f===\"up\"||f===\"down\"?_.exitPoint.x:_.exitPoint.y;I.bus.preferredExit=C?.toSorted((x,E)=\u003eMath.abs(y-hue(x,n.boundary))-Math.abs(y-hue(E,n.boundary)))[0]?.preferredExit??(f===\"up\"?\"top\":f===\"down\"?\"bottom\":f),_.direction=f}const m=new Map(p.map(_=\u003e[_.connectionName,_]));return e.map(_=\u003em.get(_.connection.connection.name))}function*AR(t){const{srj:e,buses:n,traceWidth:o,clearance:i,availableBoundaryRegions:r,onPartialRoutes:s,onProgress:a}=t;if(n.some(p=\u003ep.connections.length!==1))return null;const A=n.flatMap(p=\u003ep.connections.map(m=\u003e({bus:p,connection:m,source:{x:m.sourcePoint.x,y:m.sourcePoint.y},netKey:xQo(m)}))),c=e.obstacles.filter(p=\u003ep.layers.includes(\"top\")),l=n[0]?.sharedBoundary;if(!l)return[];const u=A.map(p=\u003ep.source),g=p=\u003e{a?.(yQo({boundary:l,sourcePoints:u,traceWidth:o,update:p}),{adaptivePhase:p.phase,...p.direction?{adaptiveDirection:p.direction}:{},...p.processed!==void 0?{adaptiveWorkUnit:p.processed}:{},...p.total!==void 0?{adaptiveWorkUnitCount:p.total}:{}})};g({phase:\"prepare-flow-grid\",processed:0,total:c.length});const h=yield*bQo({boundary:l,obstacles:c,traceWidth:o,clearance:i,reportProgress:g});a$\u0026\u0026console.error(\"single-layer adaptive-exit grid ready\",{nodeCount:h.nodeCount});const d=yield*wQo({items:A,grid:h,obstacles:c,traceWidth:o,clearance:i,availableBoundaryRegions:r,onPartialRoutes:s,reportProgress:g});return d||null}var Wy=1e-9;function PQo(t,e){const n=[t[0]];for(let o=1;o\u003ct.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a=r.x-i.x,A=r.y-i.y,c=s.x-r.x,l=s.y-r.y,u=Math.hypot(a,A),g=Math.hypot(c,l);if(!(u\u003cWy||g\u003cWy))if(Math.abs(a*c+A*l)\u003cWy){const h=Math.min(e,u/2,g/2);n.push({x:r.x-a/u*h,y:r.y-A/u*h},{x:r.x+c/g*h,y:r.y+l/g*h})}else n.push(r)}return n.push(t.at(-1)),n.filter((o,i)=\u003ei===0||tn(o,n[i-1])\u003eWy)}function MQo(t,e,n){const o=t.toSorted((a,A)=\u003eMath.atan2(a.exitPoint.y-n.y,a.exitPoint.x-n.x)-Math.atan2(A.exitPoint.y-n.y,A.exitPoint.x-n.x)),i=(a,A)=\u003e{for(let c=0;c\u003cMath.min(a.length,A.length);c++){const l=e.get(a[c].connectionIndex)-e.get(A[c].connectionIndex);if(l)return l\u003c0}return!1},r=(a,A)=\u003ea.length\u003eA.length||a.length===A.length\u0026\u0026i(a,A),s=[];for(let a=o.length-1;a\u003e=0;a--){let A=[];for(let c=a+1;c\u003co.length;c++)e.get(o[c].connectionIndex)\u003ee.get(o[a].connectionIndex)\u0026\u0026r(s[c],A)\u0026\u0026(A=s[c]);s[a]=[o[a],...A]}return s.reduce((a,A)=\u003er(A,a)?A:a,[])}function*DQo(t){const{bus:e,srj:n,traceWidth:o,clearance:i,viaDiameter:r}=t;if(e.termination.type!==\"boundary\"||e.exitEdge!==\"right\"||e.connections.length\u003c6||e.connections.some(ne=\u003ene.sourceLayer!==\"top\")||!(e.allowedLayers??t.layerNames).includes(t.targetLayer)||t.targetLayer===\"top\")return null;const s=e.componentObstacles.filter(ne=\u003ene.layers.includes(\"top\"));if(!s.length)return null;const a={minX:Math.min(...s.map(ne=\u003ene.center.x-ne.width/2)),maxX:Math.max(...s.map(ne=\u003ene.center.x+ne.width/2)),minY:Math.min(...s.map(ne=\u003ene.center.y-ne.height/2)),maxY:Math.max(...s.map(ne=\u003ene.center.y+ne.height/2))},A={x:(a.minX+a.maxX)/2,y:(a.minY+a.maxY)/2},c=o+i,l=Math.max(e.pitchX,e.pitchY);if(!Number.isFinite(l)||l\u003c=0)return null;const u=Math.ceil(((a.maxX-a.minX)/2+l+c)/c)*c,g=Math.ceil(((a.maxY-a.minY)/2+l+c)/c)*c,h={minX:A.x-u,maxX:A.x+u,minY:A.y-g,maxY:A.y+g};if(h.minX\u003c=e.sharedBoundary.minX||h.maxX\u003e=e.sharedBoundary.maxX||h.minY\u003c=e.sharedBoundary.minY||h.maxY\u003e=e.sharedBoundary.maxY)return null;const d=e.connections.map((ne,le)=\u003e({...e,busId:`${e.busId}:source-perimeter:${le}`,sharedBoundary:h,preferredExit:void 0,exitEdge:void 0,connections:[{...ne,exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]})),p=yield*AR({srj:n,buses:d,traceWidth:o,clearance:i});if(!p||p.length!==e.connections.length)return null;const m=ne=\u003et.targetPointsByConnectionIndex?.get(ne.connectionIndex)??{x:e.sharedBoundary.maxX,y:(ne.exitTargetPoint??ne.targetPoint).y},_=e.connections.toSorted((ne,le)=\u003em(ne).y-m(le).y||ne.connectionIndex-le.connectionIndex),f=new Map(_.map((ne,le)=\u003e[ne.connectionIndex,le])),I=MQo(p,f,A);if(I.length\u003c3||I.length\u003e=e.connections.length||I.some(ne=\u003eMath.abs(ne.exitPoint.y-h.maxY)\u003eWy\u0026\u0026(Math.abs(ne.exitPoint.x-h.minX)\u003eWy||ne.exitPoint.y\u003cA.y)))return null;const C=new Map(t.buses.flatMap(ne=\u003ene.connections.map(le=\u003e[le.connectionIndex,{bus:ne,connection:le}]))),y=e.sharedBoundary.maxX-Math.max(l/2,r/2+i),x=r/2+o/2+i,B=y-x-1e-5-(I.length-1)*c,Q=e.sharedBoundary.maxY-c-(I.length-1)*c;if(B\u003c=a.maxX+x||Q\u003c=h.maxY+c)return null;const w=(ne,le)=\u003e{const ge=C.get(ne.connectionIndex).bus,_e=ge.busId===e.busId?t.targetLayer:ge.termination.type===\"plane\"?ge.termination.layer:t.targetLayerByBusId?.get(ge.busId)??(ge.allowedLayers??t.layerNames).find(ue=\u003eue!==ne.sourceLayer);if(!_e)throw new Error(\"FanoutSolver: missing target layer for peripheral via assignment\");return{center:le,diameter:r,holeDiameter:t.viaHoleDiameter,fromLayer:ne.sourceLayer,toLayer:_e,spanLayers:Mx({fromLayer:ne.sourceLayer,toLayer:_e,layerNames:t.layerNames,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias??!1})}},M=(ne,le)=\u003e({connectionIndex:ne.connectionIndex,connectionName:ne.connection.name,segments:le.slice(1).map((ge,_e)=\u003e({start:le[_e],end:ge,width:o,layer:ne.sourceLayer})),via:w(ne,le.at(-1))}),k=I.map((ne,le)=\u003e{const ge=C.get(ne.connectionIndex).connection,_e=m(ge),ue=Q+le*c,fe=B+le*c;return M(ge,PQo([ne.segments[0].start,...ne.segments.map(pe=\u003epe.end),{x:ne.exitPoint.x,y:ue},{x:fe,y:ue},{x:fe,y:_e.y},{x:y,y:_e.y}],o))}),R=new Set(k.map(ne=\u003ene.connectionIndex)),F=(ne,le)=\u003e{const ge=C.get(ne.connectionIndex).connection;if(ne.segments.some(_e=\u003e[_e.start,_e.end].some(ue=\u003eue.x\u003ce.sharedBoundary.minX-Wy||ue.x\u003ee.sharedBoundary.maxX+Wy||ue.y\u003ce.sharedBoundary.minY-Wy||ue.y\u003ee.sharedBoundary.maxY+Wy)))return!1;for(const _e of n.obstacles)if(_e.layers.some(ue=\u003ene.via.spanLayers.includes(ue))\u0026\u0026wx(ne.via.center,_e)\u003cr/2+i-Wy||_e!==ge.sourceObstacle\u0026\u0026ne.segments.some(ue=\u003e_e.layers.includes(ue.layer)\u0026\u0026Tl(ue,_e)\u003co/2+i-Wy))return!1;for(const _e of le)if(ne.connectionIndex!==_e.connectionIndex\u0026\u0026(tn(ne.via.center,_e.via.center)\u003cr+i-Wy||ne.segments.some(ue=\u003eCr(_e.via.center,ue.start,ue.end)\u003cx-Wy)||_e.segments.some(ue=\u003eCr(ne.via.center,ue.start,ue.end)\u003cx-Wy)||ne.segments.some(ue=\u003e_e.segments.some(fe=\u003e!Zm(ue,fe,i)))))return!1;return!0};if(k.some(ne=\u003e!F(ne,k)))return null;const O=()=\u003e{const ne=new Set(k.map(le=\u003ele.connectionIndex));return t.buses.map(le=\u003e({...le,connections:le.connections.filter(ge=\u003e!ne.has(ge.connectionIndex))})).filter(le=\u003ele.connections.length)},U=()=\u003e({viaDiameter:r,viaHoleDiameter:t.viaHoleDiameter,traceWidth:o,clearance:i,additionalObstacles:n.obstacles,maximumSearchStates:3e5,blockingSegments:k.flatMap(ne=\u003ene.segments.map(le=\u003e({connectionIndex:ne.connectionIndex,segment:le}))),blockingVias:k.map(ne=\u003e({connectionIndex:ne.connectionIndex,...ne.via})),preferredViaPointsByConnectionIndex:t.initialViaPoints});let Y=O();const W=new Set(pw(Y,U()).map(ne=\u003ene.connectionIndex));for(const ne of Y)for(const le of ne.connections){if(W.has(le.connectionIndex))continue;if(ne.termination.type!==\"plane\")return null;const ge=le.sourcePoint,_e=le.sourceObstacle,ue=[{x:0,y:1,gap:a.maxY-ge.y},{x:-1,y:0,gap:ge.x-a.minX},{x:0,y:-1,gap:ge.y-a.minY},{x:1,y:0,gap:a.maxX-ge.x}].sort((pe,ye)=\u003epe.gap-ye.gap);let fe=null;for(const pe of ue){for(let ye=0;ye\u003c8;ye++){const Me=(pe.x?_e.width:_e.height)/2+r/2+i+1e-5+ye*o,ve=M(le,[ge,{x:ge.x+pe.x*Me,y:ge.y+pe.y*Me}]);if(F(ve,k)){fe=ve;break}}if(fe)break}if(!fe)return null;k.push(fe)}Y=O();const te=U(),j=pd(Y,te);if(!j)return null;yield;const J=CQo({buses:Y,busId:e.busId,rules:{...te,preferredViaPointsByConnectionIndex:j}});if(!J)return null;const oe=[...k,...Y.flatMap(ne=\u003ene.connections.map(le=\u003eM(le,[le.sourcePoint,J.get(le.connectionIndex)])))];if(oe.some(ne=\u003e!F(ne,oe)))return null;const ie=new Map(oe.map(ne=\u003e[ne.connectionIndex,ne.via.center]));return{sourceEscapes:oe,viaPointsByConnectionIndex:ie,remoteConnectionIndices:R,localBus:Y.find(ne=\u003ene.busId===e.busId),sourceBoundary:h}}function*NQo(t){const{srj:e,bus:n,targetLayer:o,sourceBoundary:i,sourceEscapes:r,remoteConnectionIndices:s,traceWidth:a,clearance:A}=t;if(n.exitEdge!==\"right\"||n.termination.type!==\"boundary\")return null;const c=a+A,l=Math.min(n.pitchX,n.pitchY),u=new Map(r.map(R=\u003e[R.connectionIndex,R])),g=n.connections.map(R=\u003e{const F=u.get(R.connectionIndex);if(!F)throw new Error(`FanoutSolver: missing source escape for ${R.connection.name}`);const O=R.exitTargetPoint??R.targetPoint;return{connection:R,viaPoint:F.via.center,exitPoint:{x:n.sharedBoundary.maxX,y:O.y}}}).sort((R,F)=\u003eR.exitPoint.y-F.exitPoint.y),h=g.filter(R=\u003e!s.has(R.connection.connectionIndex));if(h.length\u003c2||h.length===g.length)return null;const d=Math.min(...n.componentObstacles.map(R=\u003eR.center.x-R.width/2)),p=Math.max(...h.map(R=\u003eR.viaPoint.x))-a/2,m=d+t.viaDiameter/2;if(p-m\u003c(h.length-1)*c)return null;const _=i.maxY,f={minX:d-l,maxX:Math.max(...h.map(R=\u003eR.viaPoint.x))+2*l,minY:Math.min(...h.map(R=\u003eR.viaPoint.y))-3*l,maxY:_},I=new Set(h.map(R=\u003eR.connection.connectionIndex)),C=h.map((R,F)=\u003e({...R,exitPoint:{x:p+(m-p)*F/(h.length-1),y:_}})),y={...n,exitEdge:\"top\",direction:\"up\",preferredExit:void 0,sharedBoundary:f,connections:h.map(R=\u003eR.connection)},x=new Map(r.map(R=\u003e[R.connectionIndex,[R.segments[0].start,...R.segments.map(F=\u003eF.end)]]));let E;for(const R of[-1,0,1]){const F=yield*BC({...t,bus:y,srj:{...e,bounds:f},acceptedPlans:[],terminals:C,sourceEscapePaths:x,reservedVias:r.filter(O=\u003e!I.has(O.connectionIndex)).map(O=\u003e({connectionName:O.connectionName,via:O.via})),allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,gridStepDivisor:2,gridStep:c/4,alignGridToPads:!0,maximumRouteOrderAttempts:1,routeOrder:h.map((O,U)=\u003eh.length-U-1),laneBias:R},1,!1);if(F.length){E=F[0];break}}if(!E)return null;const B=new Map(E.map(R=\u003e[R.connectionIndex,R])),S=_+l,Q=n.sharedBoundary.maxX-(h.length+1)*c-2*t.viaDiameter;if(S+(h.length-1)*c+a/2\u003en.sharedBoundary.maxY)return null;let w=0;const M=[];for(const R of g){const F=u.get(R.connection.connectionIndex),O=B.get(R.connection.connectionIndex);let U;if(O){const Y=O.segments.filter(le=\u003ele.layer===o),W=Y.at(-1),te=W.end.x-W.start.x,j=W.end.y-W.start.y;if(j\u003c=0||Math.abs(te)\u003ej+1e-7)return null;const J=W.end,oe=S+w*c,ie=Q+w*c;w++;const ne=RQo([J,{x:J.x,y:oe},{x:ie,y:oe},{x:ie,y:R.exitPoint.y},R.exitPoint],a);U=[Y[0].start,...Y.map(le=\u003ele.end),...ne.slice(1)]}else U=[F.via.center,R.exitPoint];M.push(i4({...t,bus:n,terminal:R,targetLayerPoints:U,sourceEscapePoints:x.get(R.connection.connectionIndex),allowBlindAndBuriedVias:!1}))}const k=M.map(R=\u003eR.length);if(n.maxLengthSkew!==void 0\u0026\u0026Math.max(...k)-Math.min(...k)\u003en.maxLengthSkew+1e-6||!Wh({plans:M,srj:e,sharedBoundary:n.sharedBoundary,clearance:A,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;for(const R of M)for(const F of r)if(R.connectionIndex!==F.connectionIndex)for(const O of R.segments){if(F.via.spanLayers.includes(O.layer)\u0026\u0026Cr(F.via.center,O.start,O.end)\u003cF.via.diameter/2+O.width/2+A-1e-7)return null;for(const U of F.segments)if(O.layer===U.layer\u0026\u0026tu(O.start,O.end,U.start,U.end)\u003c(O.width+U.width)/2+A-1e-7)return null}return M}function RQo(t,e){const n=t.filter((o,i)=\u003ei===0||tn(o,t[i-1])\u003e1e-9);return n.flatMap((o,i)=\u003e{if(i===0||i===n.length-1)return[o];const r=n[i-1],s=n[i+1],a=Math.min(e,tn(r,o)/3,tn(o,s)/3);return Math.abs((o.x-r.x)*(s.x-o.x)+(o.y-r.y)*(s.y-o.y))\u003e1e-9?[o]:[{x:o.x+(r.x-o.x)*a/tn(r,o),y:o.y+(r.y-o.y)*a/tn(r,o)},{x:o.x+(s.x-o.x)*a/tn(o,s),y:o.y+(s.y-o.y)*a/tn(o,s)}]})}function*TQo(t){const{bus:e,sourceBoundary:n,sourceEscapes:o,traceWidth:i,clearance:r,targetLayer:s}=t,a=Ds(e.exitEdge,e.preferredExit);if(t.allowBlindAndBuriedVias||e.exitEdge!==\"right\"||a!==void 0\u0026\u0026a!==\"minimum\"||e.connections.length\u003c3)return null;const A=e.routableEscapeLayers??e.allowedLayers??[],c=A.find(W=\u003eW!==s);if(!c||!A.includes(s)||e.connections.some(W=\u003eW.sourceLayer===s))return null;const l=new Map(o.map(W=\u003e[W.connectionIndex,W])),u=i+r,g=Math.min(e.pitchX,e.pitchY),h=t.viaDiameter+r,d=e.sharedBoundary.minX+Math.max(g/2,t.viaDiameter/2+r);if(d+(e.connections.length-1)*h\u003e=n.minX)return null;const p=t.acceptedPlans.filter(W=\u003eW.exitEdge===e.exitEdge\u0026\u0026W.cornerBandSide===\"minimum\").length,m=e.connections.map(W=\u003e{const te=l.get(W.connectionIndex);if(!te)throw new Error(`FanoutSolver: missing crossbar source escape for ${W.connection.name}`);return{connection:W,viaPoint:te.via.center,exitPoint:{x:e.sharedBoundary.maxX,y:BB(a?{...t,connection:W,cornerExitLaneOffset:p}:{...t,bus:{...e,preferredExit:\"bottom-right\"},connection:W,cornerExitLaneOffset:p,windingOrderIndex:0})}}}),_=m.toSorted((W,te)=\u003eW.exitPoint.y-te.exitPoint.y);if(!a)for(const[W,te]of _.entries())te.exitPoint.y=n.minY+g+W*h;const f=new Map(_.map(W=\u003e[W.connection.connectionIndex,W.exitPoint.y])),I=Math.min(n.maxY-u,Math.max(...m.map(W=\u003eW.viaPoint.y))+2*g),C=Math.max(n.minY+u,Math.min(...m.map(W=\u003eW.viaPoint.y))-2*g,...a?[]:[Math.max(...f.values())+t.viaDiameter/2+i/2+r+u]);if(I-C\u003c(m.length-1)*h||C\u003c=Math.max(...f.values())+t.viaDiameter/2+i/2+r)return null;const y=new Map(o.map(W=\u003e[W.connectionIndex,[W.segments[0].start,...W.segments.map(te=\u003ete.end)]])),x=[...t.srj.obstacles.filter(W=\u003eW.layers.includes(s)).map(W=\u003e({...W,layers:[\"top\"]})),...o.map(W=\u003e({type:\"rect\",shape:\"circle\",center:W.via.center,width:W.via.diameter,height:W.via.diameter,layers:[\"top\"],connectedTo:[W.connectionName]}))];for(let W=n.minY;W\u003c=n.maxY;W+=u)(W\u003cC||W\u003eI)\u0026\u0026x.push({type:\"rect\",shape:\"circle\",center:{x:n.minX,y:W},width:i/1e3,height:i/1e3,layers:[\"top\"],connectedTo:[\"blocked-port\"]});const E=m.map((W,te)=\u003e({...e,busId:e.busId+\":\"+te,sharedBoundary:n,preferredExit:void 0,exitEdge:void 0,connections:[{...W.connection,sourcePoint:{...W.viaPoint,layer:\"top\"},sourceLayer:\"top\",sourceObstacle:x.find(j=\u003ej.connectedTo.includes(W.connection.connection.name)\u0026\u0026tn(j.center,W.viaPoint)\u003c1e-7),exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]})),B=AR({srj:{...t.srj,obstacles:x},buses:E,traceWidth:i,clearance:r,availableBoundaryRegions:[{exitEdge:\"left\",direction:\"left\",preferredExit:\"left\"}]});let S=B.next();for(;!S.done;)yield{phase:\"route-connection\",routeOrderAttempt:0,connectionIndex:0,connectionCount:m.length,connectionName:m[0].connection.connection.name,searchBatch:0,expandedStateCount:0,connectionComplete:!1},S=B.next();const Q=S.value?.length===m.length?S.value.map(W=\u003e{const te=m.find(j=\u003ej.connection.connectionIndex===W.connectionIndex);return i4({...t,terminal:{...te,exitPoint:W.exitPoint},sourceEscapePoints:y.get(W.connectionIndex),targetLayerPoints:[W.segments[0].start,...W.segments.map(j=\u003ej.end)],allowBlindAndBuriedVias:!1})}):void 0;if(!Q)return null;const w=Q.toSorted((W,te)=\u003ea?W.exitPoint.y-te.exitPoint.y:m.find(j=\u003ej.connection.connectionIndex===W.connectionIndex).exitPoint.y-m.find(j=\u003ej.connection.connectionIndex===te.connectionIndex).exitPoint.y),M=(W,te,j)=\u003e({center:W,diameter:t.viaDiameter,holeDiameter:t.viaHoleDiameter,fromLayer:te,toLayer:j,spanLayers:Mx({fromLayer:te,toLayer:j,layerNames:t.layerNames,allowBlindAndBuriedVias:!1})}),k=new Map;for(const[W,te]of w.entries()){const j=te.segments.at(-1),J=j.end.x-j.start.x,oe=j.end.y-j.start.y;if(J\u003e=0||Math.abs(oe)\u003e-J+1e-7)return null;const ie=m.find(ue=\u003eue.connection.connectionIndex===te.connectionIndex),ne=d+W*h,le={x:ne,y:te.exitPoint.y},ge={x:ne,y:f.get(te.connectionIndex)},_e=[{start:te.exitPoint,end:le,width:i,layer:s},{start:le,end:ge,width:i,layer:c}];k.set(te.connectionIndex,{...te,segments:[...te.segments,..._e],additionalVias:[M(le,s,c),M(ge,c,s)],direction:e.direction,exitEdge:e.exitEdge,cornerBandSide:Ds(e.exitEdge,e.preferredExit),exitPoint:ie.exitPoint})}const R=[...k.values()],F=m.map(W=\u003e({...W.connection,sourcePoint:{...k.get(W.connection.connectionIndex).additionalVias[1].center,layer:s},sourceLayer:s})),O={...t,bus:{...e,connections:F},terminals:F.map((W,te)=\u003e({connection:W,viaPoint:W.sourcePoint,exitPoint:m[te].exitPoint})),acceptedPlans:[...t.acceptedPlans,...R],reservedVias:[...o.map(W=\u003e({connectionName:W.connectionName,via:W.via})),...R.flatMap(W=\u003eW.additionalVias.map(te=\u003e({connectionName:W.connectionName,via:te})))],allowSourceLayerRouting:!0,sourceEscapePaths:void 0,gridStep:u*3/8,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:6,routeOrder:m.map((W,te)=\u003ete).sort((W,te)=\u003em[W].exitPoint.y-m[te].exitPoint.y)},U=yield*BC(O,1,!1);if(!U.length)return null;const Y=Q.map(W=\u003e{const te=k.get(W.connectionIndex),j=U[0].find(ge=\u003ege.connectionIndex===W.connectionIndex),[J,oe]=te.additionalVias,ie=(ge,_e)=\u003e({route_type:\"wire\",...ge,width:i,layer:_e}),ne=ge=\u003e({route_type:\"via\",...ge.center,from_layer:ge.fromLayer,to_layer:ge.toLayer,via_diameter:ge.diameter,via_hole_diameter:ge.holeDiameter}),le=[...te.segments,...j.segments];return{...te,segments:le,trace:{...W.trace,route:[...W.trace.route,ie(J.center,s),ne(J),ie(J.center,c),ie(oe.center,c),ne(oe),...j.trace.route]},length:le.reduce((ge,_e)=\u003ege+tn(_e.start,_e.end),0)}});if(!Wh({...t,plans:[...t.acceptedPlans,...Y],sharedBoundary:e.sharedBoundary}))return null;for(const W of Y)for(const te of o)if(W.connectionIndex!==te.connectionIndex){for(const j of W.segments){if(te.via.spanLayers.includes(j.layer)\u0026\u0026Cr(te.via.center,j.start,j.end)\u003cte.via.diameter/2+i/2+r-1e-7)return null;for(const J of te.segments)if(J.layer===j.layer\u0026\u0026tu(j.start,j.end,J.start,J.end)\u003ci+r-1e-7)return null}for(const j of W.additionalVias){if(tn(j.center,te.via.center)\u003ct.viaDiameter+r-1e-7)return null;for(const J of te.segments)if(j.spanLayers.includes(J.layer)\u0026\u0026Cr(j.center,J.start,J.end)\u003ct.viaDiameter/2+i/2+r-1e-7)return null}}return Y}function _ue(t){const e=new Map,n=o=\u003e{if(o===null||typeof o!=\"object\")return o;if(e.has(o))return e.get(o);if(o instanceof Map){const a=new Map;e.set(o,a);for(const[A,c]of o)a.set(A,n(c));return a}if(o instanceof Set){const a=new Set(o);return e.set(o,a),a}if(Array.isArray(o)){const a=[];e.set(o,a);for(const A of o)a.push(n(A));return a}const i=o,r={};e.set(o,r);for(const[a,A]of Object.entries(i))r[a]=n(A);typeof i.x==\"number\"\u0026\u0026typeof i.y==\"number\"\u0026\u0026(r.x=-i.x),typeof i.minX==\"number\"\u0026\u0026typeof i.maxX==\"number\"\u0026\u0026(r.minX=-i.maxX,r.maxX=-i.minX),Array.isArray(i.xCoordinates)\u0026\u0026(r.xCoordinates=i.xCoordinates.map(a=\u003e-a).sort((a,A)=\u003ea-A)),typeof i.ccwRotationDegrees==\"number\"\u0026\u0026(r.ccwRotationDegrees=-i.ccwRotationDegrees);const s=a=\u003ea===\"left\"?\"right\":a===\"right\"?\"left\":a;for(const a of[\"direction\",\"exitEdge\",\"preferredExit\"])typeof i[a]==\"string\"\u0026\u0026(r[a]=i[a].split(\"-\").map(s).join(\"-\"));return i.cornerBandSide\u0026\u0026(i.exitEdge===\"top\"||i.exitEdge===\"bottom\")\u0026\u0026(r.cornerBandSide=i.cornerBandSide===\"minimum\"?\"maximum\":\"minimum\"),r};return n(t)}function*WNt(t){const{bus:e,srj:n,sourceEscapes:o,sourceBoundary:i,targetLayer:r,acceptedPlans:s,traceWidth:a,clearance:A,viaDiameter:c}=t,l=e.exitEdge===\"left\",u=l?t.oppositeLayout:void 0,g=e.routableEscapeLayers??e.allowedLayers??[],h=e.connections[0].sourceLayer,d=l?g.find(Ce=\u003eCe!==r):h;if(e.termination.type!==\"boundary\"||e.exitEdge!==\"right\"\u0026\u0026!l||!d||!g.includes(r)||d===r||!(e.routableEscapeLayers??e.allowedLayers??[]).includes(d))return null;const p=Ds(e.exitEdge,e.preferredExit)===\"minimum\",m=e.connections.length,_=a+A,f=Math.ceil((c+A)/_)*_,I=new Map(o.map(Ce=\u003e[Ce.connectionIndex,Ce])),C=e.connections.map(Ce=\u003eI.get(Ce.connectionIndex));if(m\u003c2||C.some(Ce=\u003e!Ce))return null;const y=C.map(Ce=\u003eCe.via.center),x=Math.round(((l?(i.minX+i.maxX)/2+(u?.sourcePortOffset??0):Math.min(...y.map(Ce=\u003eCe.x)))+f-i.minX)/_),E=Math.round(f/_),B=new Set(Array.from({length:m},(Ce,Le)=\u003ex+Le*E)),S=Math.round((i.maxX-i.minX)/_);if(x\u003c1||Math.max(...B)\u003e=S)return null;const Q=(Ce,Le,Ye)=\u003e({type:\"rect\",shape:\"circle\",center:Le,width:Ye,height:Ye,layers:[\"top\"],connectedTo:[Ce]}),w=[...n.obstacles.filter(Ce=\u003eCe.layers.includes(r)).map(Ce=\u003e({...Ce,layers:[\"top\"]})),...o.map(Ce=\u003eQ(Ce.connectionName,Ce.via.center,Ce.via.diameter)),...s.flatMap(Ce=\u003e(Ce.additionalVias??[]).map(Le=\u003eQ(Ce.connectionName,Le.center,Le.diameter))),...s.flatMap(Ce=\u003eCe.segments.filter(Le=\u003eLe.layer===r).map(Le=\u003e({type:\"rect\",center:{x:(Le.start.x+Le.end.x)/2,y:(Le.start.y+Le.end.y)/2},width:tn(Le.start,Le.end),height:Le.width,ccwRotationDegrees:Math.atan2(Le.end.y-Le.start.y,Le.end.x-Le.start.x)*180/Math.PI,layers:[\"top\"],connectedTo:[Ce.connectionName]})))];for(let Ce=0;Ce\u003c=S;Ce++)B.has(Ce)||w.push(Q(`reserved-crossbar-port-${Ce}`,{x:i.minX+Ce*_,y:i.minY},a/1e3));const M=e.connections.map((Ce,Le)=\u003e{const Ye=y[Le],tt=w.find(At=\u003eAt.connectedTo.includes(Ce.connection.name)\u0026\u0026tn(At.center,Ye)\u003c1e-7);return{...e,busId:`${e.busId}:source-${Le}`,sharedBoundary:i,preferredExit:void 0,exitEdge:void 0,connections:[{...Ce,sourcePoint:{...Ce.sourcePoint,...Ye,layer:\"top\"},sourceObstacle:tt,sourceLayer:\"top\",exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]}}),k=AR({srj:{...n,bounds:i,obstacles:w},buses:M,traceWidth:a,clearance:A,availableBoundaryRegions:[{direction:\"down\",preferredExit:\"bottom\",exitEdge:\"bottom\"}]});let R=k.next();for(;!R.done;)yield{phase:\"route-connection\",routeOrderAttempt:0,connectionIndex:0,connectionCount:m,connectionName:e.connections[0].connection.name,searchBatch:0,expandedStateCount:0,connectionComplete:!1},R=k.next();if(!R.value||R.value.length!==m)return null;const F=new Map(R.value.map(Ce=\u003e[Ce.connectionIndex,Ce])),O=Ce=\u003eDs(e.exitEdge,e.preferredExit)!==void 0?BB({...t,connection:Ce,cornerExitLaneOffset:0}):tR({...t,connection:Ce,boundaryDirection:l?\"left\":\"right\"}),U=e.connections.toSorted((Ce,Le)=\u003eO(Ce)-O(Le));Math.max(...e.componentObstacles.map(Ce=\u003eCe.center.x+Ce.width/2));const Y=o.filter(Ce=\u003eCe.via.center.x\u003ei.maxX).map(Ce=\u003eCe.via.center.x),W=Y.length?Math.min(...Y):e.sharedBoundary.maxX,te=c/2+a/2+A,j=p||u?.compactRows?Math.max(te,(c+A)/Math.SQRT2)+1e-5:f,J=Math.min(...s.flatMap(Ce=\u003eCe.segments).filter(Ce=\u003eCe.layer!==d).flatMap(Ce=\u003e[Ce.start.y,Ce.end.y])),oe=Math.min(i.minY-c/2-A-(u?.rowOffset??0),p?J-te-1e-5:1/0),ie=oe-(m-1)*j,ne=o.flatMap(Ce=\u003eCe.segments).filter(Ce=\u003eCe.layer===d\u0026\u0026(!p||Math.max(Ce.start.x,Ce.end.x)\u003e=Math.min(...[...F.values()].map(Le=\u003eLe.exitPoint.x))-te)\u0026\u0026Math.min(Ce.start.y,Ce.end.y)\u003c=oe+te\u0026\u0026Math.max(Ce.start.y,Ce.end.y)\u003e=ie-te),le=ne.length?Math.min(...ne.map(Ce=\u003eMath.min(Ce.start.x,Ce.end.x)))-te-1e-5:e.sharedBoundary.maxX,ge=Math.min(e.sharedBoundary.maxX-c-A,W-te-a,le),_e=[...o.map(Ce=\u003eCe.via),...s.flatMap(Ce=\u003eCe.additionalVias??[])].filter(Ce=\u003eCe.spanLayers.includes(r)).map(Ce=\u003e({minimum:Ce.center.x-Ce.diameter/2-a/2-A-1e-5,maximum:Ce.center.x+Ce.diameter/2+a/2+A+1e-5})),ue=Array.from({length:m},(Ce,Le)=\u003ege-Le*j),fe=[];if(ue.every(Ce=\u003e_e.every(Le=\u003eCe\u003cLe.minimum||Ce\u003eLe.maximum)))fe.push(...ue);else{let Ce=ge;for(let Le=0;Le\u003cm;Le++){for(let Ye=0;Ye\u003c=_e.length;Ye++){const tt=_e.filter(At=\u003eCe\u003e=At.minimum\u0026\u0026Ce\u003c=At.maximum);if(!tt.length)break;Ce=Math.min(...tt.map(At=\u003eAt.minimum))-1e-7}fe.push(Ce),Ce-=p?j:c+A}}const pe=fe.at(-1),ye=[...o.map(Ce=\u003eCe.via),...s.flatMap(Ce=\u003eCe.additionalVias??[])].filter(Ce=\u003eCe.spanLayers.includes(r)\u0026\u0026Ce.center.x+Ce.diameter/2+a/2+A\u003e=(l?e.sharedBoundary.minX:pe)\u0026\u0026Ce.center.x-Ce.diameter/2-a/2-A\u003c=e.sharedBoundary.maxX).map(Ce=\u003e({minimum:Ce.center.y-Ce.diameter/2-a/2-A-a/100,maximum:Ce.center.y+Ce.diameter/2+a/2+A+a/100})),Me=[];let ve=e.sharedBoundary.maxY-a/2;for(let Ce=m-1;Ce\u003e=0;Ce--){for(let Le=0;Le\u003c=ye.length;Le++){const Ye=ye.filter(tt=\u003eve\u003e=tt.minimum\u0026\u0026ve\u003c=tt.maximum);if(!Ye.length)break;ve=Math.min(...Ye.map(tt=\u003ett.minimum))-1e-7}Me[Ce]=ve,ve-=c+A}p\u0026\u0026Me.splice(0,Me.length,...U.map(O));const he=Me[0],Qe=oe;if(Qe-(m-1)*j-c/2\u003ce.sharedBoundary.minY||pe\u003c=Math.max(...[...F.values()].map(Ce=\u003eCe.exitPoint.x))+te||!p\u0026\u0026he\u003c=(e.sharedBoundary.minY+e.sharedBoundary.maxY)/2)return null;const Pe=U.map((Ce,Le)=\u003e{const Ye=F.get(Ce.connectionIndex),tt=I.get(Ce.connectionIndex),At=Me[Le];return{connectionIndex:Ce.connectionIndex,length:tt.segments.reduce((at,nt)=\u003eat+tn(nt.start,nt.end),0)+(u?.compactRows?2*fe[m-1-Le]:0)+Ye.length+At-Ye.exitPoint.x}}).sort((Ce,Le)=\u003eLe.length-Ce.length),we=new Map(Pe.map((Ce,Le)=\u003e[Ce.connectionIndex,Le])),Te=(Ce,Le)=\u003eCe.slice(1).flatMap((Ye,tt)=\u003etn(Ce[tt],Ye)\u003c1e-9?[]:[{start:Ce[tt],end:Ye,width:a,layer:Le}]),Re=(Ce,Le)=\u003eCe.map(Ye=\u003e({route_type:\"wire\",...Ye,width:a,layer:Le})),Ee=Ce=\u003e({route_type:\"via\",...Ce.center,from_layer:Ce.fromLayer,to_layer:Ce.toLayer,via_diameter:Ce.diameter,via_hole_diameter:Ce.holeDiameter}),ke=U.map((Ce,Le)=\u003e{const Ye=I.get(Ce.connectionIndex),tt=F.get(Ce.connectionIndex),At=Qe-we.get(Ce.connectionIndex)*j,at={x:tt.exitPoint.x,y:At},nt={x:fe[l?m-1-Le:Le],y:At},gt={x:l?e.sharedBoundary.minX:e.sharedBoundary.maxX,y:Me[Le]},bt=[Ye.segments[0].start,...Ye.segments.map(Yt=\u003eYt.end)],Ct=[tt.segments[0].start,...tt.segments.map(Yt=\u003eYt.end),at],Dt=[nt,{x:nt.x,y:gt.y-Math.sign(gt.y-nt.y)*a},{x:nt.x+(l?-a:a),y:gt.y},gt],kt=i4({...t,terminal:{connection:Ce,viaPoint:Ye.via.center,exitPoint:gt},sourceEscapePoints:bt,targetLayerPoints:[Ye.via.center,gt],allowBlindAndBuriedVias:!1}),it=[{center:at,diameter:c,holeDiameter:t.viaHoleDiameter,spanLayers:t.layerNames,fromLayer:r,toLayer:d},{center:nt,diameter:c,holeDiameter:t.viaHoleDiameter,spanLayers:t.layerNames,fromLayer:d,toLayer:r}];return kt.segments=[...Ye.segments,...Te(Ct,r),...Te([at,nt],d),...Te(Dt,r)],kt.additionalVias=it,kt.sourceEscapeSegmentCount=Ye.segments.length,kt.length=kt.segments.reduce((Yt,pn)=\u003eYt+tn(pn.start,pn.end),0),kt.trace.route=[...Re(bt,h),Ee(kt.via),...Re(Ct,r),Ee(it[0]),...Re([at,nt],d),Ee(it[1]),...Re(Dt,r)],kt});if(e.maxLengthSkew!==void 0\u0026\u0026!u?.compactRows){const Ce=ke.map(Le=\u003eLe.length);if(Math.max(...Ce)-Math.min(...Ce)\u003ee.maxLengthSkew+1e-6)return null}if(!Wh({...t,plans:[...s,...ke],sharedBoundary:e.sharedBoundary}))return null;for(const Ce of ke)for(const Le of o)if(Ce.connectionIndex!==Le.connectionIndex){for(const Ye of Ce.segments){if(Le.via.spanLayers.includes(Ye.layer)\u0026\u0026Cr(Le.via.center,Ye.start,Ye.end)\u003cLe.via.diameter/2+a/2+A-1e-7)return null;for(const tt of Le.segments)if(Ye.layer===tt.layer\u0026\u0026tu(Ye.start,Ye.end,tt.start,tt.end)\u003c(a+tt.width)/2+A-1e-7)return null}for(const Ye of Ce.additionalVias){if(tn(Ye.center,Le.via.center)\u003c(Ye.diameter+Le.via.diameter)/2+A-1e-7)return null;for(const tt of Le.segments)if(Ye.spanLayers.includes(tt.layer)\u0026\u0026Cr(Ye.center,tt.start,tt.end)\u003cYe.diameter/2+tt.width/2+A-1e-7)return null}}return ke}function*kQo(t){if(t.bus.exitEdge!==\"right\")return null;const e=_ue(t),n=Math.min(t.bus.pitchX,t.bus.pitchY),o=t.traceWidth+t.clearance,i=Math.ceil((t.viaDiameter+t.clearance)/o)*o,r=Math.max(0,Math.min(8,Math.floor(((e.sourceBoundary.maxX-e.sourceBoundary.minX)/2-t.bus.connections.length*i-o)/n))),s=[void 0,{sourcePortOffset:-n,rowOffset:0,compactRows:!1},...[0,1,2,3].map(c=\u003e({sourcePortOffset:-n,rowOffset:c*o,compactRows:!0})),...Array.from({length:r},(c,l)=\u003er-l).flatMap(c=\u003e[0,1,2,3].map(l=\u003e({sourcePortOffset:c*n,rowOffset:l*o,compactRows:!0})))];let a=null;for(const c of s)if(a=yield*WNt({...e,oppositeLayout:c}),a)break;if(!a)return null;const A=new Map(t.bus.connections.map(c=\u003e[c.connectionIndex,c]));return _ue(a).map(c=\u003e({...c,sourceObstacle:A.get(c.connectionIndex).sourceObstacle}))}function jNt(t){const{bus:e,targetLayer:n,traceWidth:o,clearance:i}=t;if(!e.exitEdge)return[];const r=e.exitEdge===\"left\"||e.exitEdge===\"right\",s=r?\"y\":\"x\",a=r?\"x\":\"y\",A=e.sharedBoundary,c=e.exitEdge===\"left\"?A.minX:e.exitEdge===\"right\"?A.maxX:e.exitEdge===\"bottom\"?A.minY:A.maxY,l=r?A.minY:A.minX,u=r?A.maxY:A.maxX,g=(l+u)/2,h=Ds(e.exitEdge,e.preferredExit),d=(h===\"maximum\"?g:l)+o/2,p=(h===\"minimum\"?g:u)-o/2,m=[];for(const y of t.acceptedPlans)for(const x of[...y.segments,...y.planeEndpointSegments??[]]){if(x.layer!==n)continue;const E=(x.width+o)/2+i,B=x.start[a],S=x.end[a]-B;let Q=0,w=1;if(Math.abs(S)\u003c1e-9){if(Math.abs(B-c)\u003eE)continue}else{const O=(c-E-B)/S,U=(c+E-B)/S;if(Q=Math.max(0,Math.min(O,U)),w=Math.min(1,Math.max(O,U)),Q\u003ew)continue}const M=x.start[s],k=x.end[s]-M,R=M+Q*k,F=M+w*k;m.push([Math.min(R,F)-E,Math.max(R,F)+E])}const _=[...t.acceptedPlans.flatMap(y=\u003e[...y.via?[y.via]:[],...y.additionalVias??[],...y.planeEndpointVia?[y.planeEndpointVia]:[]]),...(t.reservedVias??[]).map(y=\u003ey.via)];for(const y of _){if(!y.spanLayers.includes(n))continue;const x=y.diameter/2+o/2+i,E=Math.abs(y.center[a]-c);if(E\u003e=x)continue;const B=Math.sqrt(x*x-E*E);m.push([y.center[s]-B,y.center[s]+B])}const f=[];let I=d;for(const[y,x]of m.sort((E,B)=\u003eE[0]-B[0]))if(!(x\u003c=I||y\u003e=p)\u0026\u0026(y\u003eI\u0026\u0026f.push([I,Math.min(y,p)]),I=Math.max(I,x),I\u003e=p))break;I\u003cp\u0026\u0026f.push([I,p]);const C=f.filter(([y,x])=\u003ex-y\u003e1e-6).map(([y,x])=\u003e(y+x)/2);return C.length\u003c=32?C:Array.from({length:32},(y,x)=\u003eC[Math.round(x*(C.length-1)/31)])}function*FQo(t){if(t.buses.some(d=\u003ed.termination.type!==\"boundary\"||d.connections.length\u003e2))return null;let e=0;const n=192,o=t.traceWidth+t.clearance;function*i(d,p,m=d.preferredExit,_=0){return e++\u003e=n?[]:yield*eue({...t,bus:{...d,preferredExit:m},acceptedPlans:p,reservedVias:t.reservedVias?.filter(f=\u003e!d.connections.some(I=\u003eI.connection.name===f.connectionName)),viaMinimalOnly:!0,adaptiveWindingRouteOrder:!0,alignWindingGridToPads:!0,windingGridStep:o/2,fixedViaFallbackRouteOrderAttempts:32,cornerBandTargetTrackOffset:_},1,!1)}const r=d=\u003ed.map(p=\u003e{const m=t.buses.find(_=\u003e_.busId===p.busId);return m?{...p,cornerBandSide:Ds(m.exitEdge,m.preferredExit)}:p});let s=[...t.acceptedPlans];for(const d of t.buses){const p=yield*i(d,s);if(!p.length){s=[];break}s.push(...p[0])}if(s.length)return r(s.slice(t.acceptedPlans.length));const a=(d,p)=\u003ed.connections.reduce((m,_)=\u003em+(t.fixedViaPointsByConnectionIndex?.get(_.connectionIndex)??_.sourcePoint)[p],0)/d.connections.length;if(t.buses.length\u003e1)for(const d of[1,-1]){const p=t.buses.toSorted((_,f)=\u003e{const I=Ds(_.exitEdge,_.preferredExit)!==void 0,C=Ds(f.exitEdge,f.preferredExit)!==void 0;if(I!==C)return Number(C)-Number(I);const y=_.exitEdge===\"left\"||_.exitEdge===\"right\"?\"y\":\"x\";return d*(a(_,y)-a(f,y))});let m=[...t.acceptedPlans];for(const _ of p){const f=yield*i(_,m);if(!f.length){m=[];break}m.push(...f[0])}if(m.length)return r(m.slice(t.acceptedPlans.length))}const A=t.buses.toSorted((d,p)=\u003e{const m=Ds(d.exitEdge,d.preferredExit),_=Ds(p.exitEdge,p.preferredExit),f=m===\"minimum\",I=_===\"minimum\";return f!==I?Number(I)-Number(f):f?a(d,\"y\")-a(p,\"y\"):d.connections.length!==p.connections.length?d.connections.length-p.connections.length:d.connections.length===1?a(d,\"x\")-a(p,\"x\"):m!==_?+(m===\"maximum\")-+(_===\"maximum\"):(m===\"maximum\"?1:-1)*(a(d,\"y\")-a(p,\"y\"))});if(t.buses.length\u003e1){const d=A.toSorted((f,I)=\u003e{const C=y=\u003ey.connections.length===1\u0026\u0026!Ds(y.exitEdge,y.preferredExit);return Number(C(I))-Number(C(f))}),p=Math.min(n,e+48);function*m(f,I){if(f===d.length)return I;if(e\u003e=p)return null;const C=d[f],y=yield*i(C,I);for(const E of y){const B=yield*m(f+1,[...I,...E]);if(B)return B}const x=yield*c(C,I,p);for(const E of x){const B=yield*m(f+1,[...I,...E]);if(B)return B}return null}const _=yield*m(0,[...t.acceptedPlans]);if(_)return r(_.slice(t.acceptedPlans.length))}function*c(d,p,m){if(!d.exitEdge)return[];const _=t.reservedVias?.filter(Q=\u003e!d.connections.some(w=\u003ew.connection.name===Q.connectionName)),f={...t,bus:d,acceptedPlans:p,reservedVias:_},I=Ds(d.exitEdge,d.preferredExit),C=d.exitEdge===\"left\"||d.exitEdge===\"right\",y=d.sharedBoundary,x=C?y.minY:y.minX,E=C?y.maxY:y.maxX,B=(x+E)/2,S=[];for(const Q of jNt(f)){if(e\u003e=m)break;const w=I?d.preferredExit:l(d).find(Y=\u003eDs(d.exitEdge,Y)===(Q\u003eB?\"maximum\":\"minimum\")),M=d.connections.map(Y=\u003eBB({...f,bus:{...d,preferredExit:w},connection:Y,cornerExitLaneOffset:0,windingOrderIndex:0})),k=M.reduce((Y,W)=\u003eY+W,0)/M.length,R=M.map(Y=\u003eY-k+Q);if(R.some(Y=\u003eY\u003c=x+t.traceWidth/2||Y\u003e=E-t.traceWidth/2||I===\"minimum\"\u0026\u0026Y\u003e=B||I===\"maximum\"\u0026\u0026Y\u003c=B))continue;const F=d.connections.map((Y,W)=\u003e{const te=t.fixedViaPointsByConnectionIndex?.get(Y.connectionIndex),j=R[W],J=d.exitEdge===\"left\"?{x:y.minX,y:j}:d.exitEdge===\"right\"?{x:y.maxX,y:j}:d.exitEdge===\"bottom\"?{x:j,y:y.minY}:{x:j,y:y.maxY};return{connection:Y,viaPoint:te,exitPoint:J}});if(F.some(Y=\u003e!Y.viaPoint))return[];e++;const O=BC({...f,terminals:F,gridStep:o/2,alignGridToPads:!0,maximumRouteOrderAttempts:d.connections.length===1?3:16,adaptiveRouteOrder:!0},1,!1);let U=O.next();for(;!U.done;)yield{phase:\"via-minimal-winding\",busId:d.busId,targetLayer:t.targetLayer,winding:U.value},U=O.next();S.push(...U.value)}return S}function l(d){if(Ds(d.exitEdge,d.preferredExit))return[d.preferredExit];switch(d.exitEdge){case\"right\":return[d.preferredExit,\"top-right\",\"bottom-right\"];case\"left\":return[d.preferredExit,\"top-left\",\"bottom-left\"];case\"top\":return[d.preferredExit,\"top-left\",\"top-right\"];case\"bottom\":return[d.preferredExit,\"bottom-left\",\"bottom-right\"];default:return[d.preferredExit]}}function u(d,p,m){const _=Ds(d.exitEdge,m);if(!_||t.buses.length\u003e1)return[0];const f=d.exitEdge===\"left\"||d.exitEdge===\"right\",I=f?d.sharedBoundary.minY:d.sharedBoundary.minX,C=f?d.sharedBoundary.maxY:d.sharedBoundary.maxX,y=(I+C)/2,x=p.filter(k=\u003ek.exitEdge===d.exitEdge\u0026\u0026k.cornerBandSide===_).length,E=d.connections.map(k=\u003eBB({...t,bus:{...d,preferredExit:m},connection:k,cornerExitLaneOffset:x,windingOrderIndex:0})),B=_===\"minimum\"?-1:1,S=Math.min(d.pitchX,d.pitchY),Q=E.reduce((k,R)=\u003ek+R,0)/E.length,w=_===\"minimum\"?I+o:C-o,M=[0,B*2*o,-B*2*o,B*S,B*2*S,B*3*S,B*4*S,w-Q];return M.filter((k,R)=\u003eM.indexOf(k)===R\u0026\u0026E.every(F=\u003eF+k\u003eI+t.traceWidth/2\u0026\u0026F+k\u003cC-t.traceWidth/2\u0026\u0026(_===\"minimum\"?F+k\u003cy:F+k\u003ey)))}function*g(d,p){if(!d.length)return p;if(e\u003e=n)return null;for(const m of d)for(const _ of l(m))for(const f of u(m,p,_)){const I=yield*i(m,p,_,f);if(!I.length)continue;const C=yield*g(d.filter(y=\u003ey!==m),[...p,...I[0]]);if(C)return C;if(e\u003e=n)return null}for(const m of d){if(m.connections.length!==1||!m.exitEdge)continue;const _=m.connections[0],f=t.fixedViaPointsByConnectionIndex?.get(_.connectionIndex);if(!f)continue;const I=t.reservedVias?.filter(y=\u003ey.connectionName!==_.connection.name),C=jNt({...t,bus:m,acceptedPlans:p,reservedVias:I});for(const y of C){if(e++\u003e=n)return null;const x=m.sharedBoundary,E=m.exitEdge===\"left\"?{x:x.minX,y}:m.exitEdge===\"right\"?{x:x.maxX,y}:m.exitEdge===\"bottom\"?{x:y,y:x.minY}:{x:y,y:x.maxY},B=BC({...t,bus:m,acceptedPlans:p,reservedVias:I,terminals:[{connection:_,viaPoint:f,exitPoint:E}],gridStep:o/2,alignGridToPads:!0,maximumRouteOrderAttempts:3},1,!1);let S=B.next();for(;!S.done;)yield{phase:\"via-minimal-winding\",busId:m.busId,targetLayer:t.targetLayer,winding:S.value},S=B.next();if(!S.value.length)continue;const Q=yield*g(d.filter(w=\u003ew!==m),[...p,...S.value[0]]);if(Q)return Q}}return null}const h=yield*g(A,[...t.acceptedPlans]);return h\u0026\u0026r(h.slice(t.acceptedPlans.length))}function*LQo(t){const{bus:e,sourceBoundary:n,sourceEscapes:o,traceWidth:i,clearance:r,targetLayer:s}=t,a=Ds(e.exitEdge,e.preferredExit);if(t.allowBlindAndBuriedVias||e.exitEdge!==\"right\"||a!==void 0\u0026\u0026a!==\"minimum\"||e.connections.length\u003c3)return null;const A=e.routableEscapeLayers??e.allowedLayers??[],c=A.find(j=\u003ej!==s);if(!c||!A.includes(s)||e.connections.some(j=\u003ej.sourceLayer===s))return null;const l=new Map(o.map(j=\u003e[j.connectionIndex,j])),u=i+r,g=Math.min(e.pitchX,e.pitchY),h=t.viaDiameter+r,d={x:(e.componentBounds.minX+e.componentBounds.maxX)/2,y:(e.componentBounds.minY+e.componentBounds.maxY)/2},p=e.sharedBoundary.minX+Math.max(g/2,t.viaDiameter/2+r);if(p+(e.connections.length-1)*h\u003e=n.minX)return null;const m=t.acceptedPlans.filter(j=\u003ej.exitEdge===e.exitEdge\u0026\u0026j.cornerBandSide===\"minimum\").length,_=e.connections.map(j=\u003e{const J=l.get(j.connectionIndex);if(!J)throw new Error(`FanoutSolver: missing crossbar source escape for ${j.connection.name}`);return{connection:j,viaPoint:J.via.center,exitPoint:{x:e.sharedBoundary.maxX,y:BB(a?{...t,connection:j,cornerExitLaneOffset:m}:{...t,bus:{...e,preferredExit:\"bottom-right\"},connection:j,cornerExitLaneOffset:m,windingOrderIndex:0})}}}),f=_.toSorted((j,J)=\u003ej.exitPoint.y-J.exitPoint.y);if(!a)for(const[j,J]of f.entries())J.exitPoint.y=n.minY+g+j*h;const I=new Map(f.map(j=\u003e[j.connection.connectionIndex,j.exitPoint.y])),C=Math.min(n.maxY-u,Math.max(..._.map(j=\u003ej.viaPoint.y))+2*g),y=Math.max(n.minY+u,Math.min(..._.map(j=\u003ej.viaPoint.y))-2*g,...a?[]:[Math.max(...I.values())+t.viaDiameter/2+i/2+r+u]);if(C-y\u003c(_.length-1)*h||y\u003c=Math.max(...I.values())+t.viaDiameter/2+i/2+r)return null;const x=j=\u003e{const J=_[j].viaPoint,oe=Math.atan2(J.y-d.y,J.x-d.x);return oe\u003c0?oe+2*Math.PI:oe},E=_.map((j,J)=\u003eJ).sort((j,J)=\u003ex(j)-x(J)),B=new Map(E.map((j,J)=\u003e[j,{x:n.minX,y:C-(C-y)*J/(_.length-1)}])),S={minX:n.minX,maxX:d.x,minY:Math.min(y-g,Math.min(..._.map(j=\u003ej.viaPoint.y))-2*g),maxY:n.maxY},Q=new Map(o.map(j=\u003e[j.connectionIndex,[j.segments[0].start,...j.segments.map(J=\u003eJ.end)]])),w=new Set(_.map(j=\u003ej.connection.connectionIndex)),M=o.filter(j=\u003e!w.has(j.connectionIndex)).map(j=\u003e({connectionName:j.connectionName,via:j.via}));let k;for(const j of[0,-1,1]){const J=yield*BC({...t,bus:{...e,exitEdge:\"left\",direction:\"left\",preferredExit:void 0,sharedBoundary:S},terminals:_.map((oe,ie)=\u003e({...oe,exitPoint:B.get(ie)})),sourceEscapePaths:Q,reservedVias:M,gridStep:u/4,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:1,routeOrder:E,laneBias:j},1,!1);if(J.length){k=J[0];break}}if(!k)return null;const R=k.toSorted((j,J)=\u003ea?j.exitPoint.y-J.exitPoint.y:_.find(oe=\u003eoe.connection.connectionIndex===j.connectionIndex).exitPoint.y-_.find(oe=\u003eoe.connection.connectionIndex===J.connectionIndex).exitPoint.y),F=(j,J,oe)=\u003e({center:j,diameter:t.viaDiameter,holeDiameter:t.viaHoleDiameter,fromLayer:J,toLayer:oe,spanLayers:Mx({fromLayer:J,toLayer:oe,layerNames:t.layerNames,allowBlindAndBuriedVias:!1})}),O=new Map;for(const[j,J]of R.entries()){const oe=J.segments.at(-1),ie=oe.end.x-oe.start.x,ne=oe.end.y-oe.start.y;if(ie\u003e=0||Math.abs(ne)\u003e-ie+1e-7)return null;const le=_.find(pe=\u003epe.connection.connectionIndex===J.connectionIndex),ge=p+j*h,_e={x:ge,y:J.exitPoint.y},ue={x:ge,y:I.get(J.connectionIndex)},fe=[{start:J.exitPoint,end:_e,width:i,layer:s},{start:_e,end:ue,width:i,layer:c}];O.set(J.connectionIndex,{...J,segments:[...J.segments,...fe],additionalVias:[F(_e,s,c),F(ue,c,s)],direction:e.direction,exitEdge:e.exitEdge,cornerBandSide:Ds(e.exitEdge,e.preferredExit),exitPoint:le.exitPoint})}const U=[...O.values()],Y=_.map(j=\u003e({...j.connection,sourcePoint:{...O.get(j.connection.connectionIndex).additionalVias[1].center,layer:s},sourceLayer:s})),W=yield*BC({...t,bus:{...e,connections:Y},terminals:Y.map((j,J)=\u003e({connection:j,viaPoint:j.sourcePoint,exitPoint:_[J].exitPoint})),acceptedPlans:[...t.acceptedPlans,...U],reservedVias:[...o.map(j=\u003e({connectionName:j.connectionName,via:j.via})),...U.flatMap(j=\u003ej.additionalVias.map(J=\u003e({connectionName:j.connectionName,via:J})))],allowSourceLayerRouting:!0,sourceEscapePaths:void 0,gridStep:u/2,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:12},1,!1);if(!W.length)return null;const te=k.map(j=\u003e{const J=O.get(j.connectionIndex),oe=W[0].find(ue=\u003eue.connectionIndex===j.connectionIndex),[ie,ne]=J.additionalVias,le=(ue,fe)=\u003e({route_type:\"wire\",...ue,width:i,layer:fe}),ge=ue=\u003e({route_type:\"via\",...ue.center,from_layer:ue.fromLayer,to_layer:ue.toLayer,via_diameter:ue.diameter,via_hole_diameter:ue.holeDiameter}),_e=[...J.segments,...oe.segments];return{...J,segments:_e,trace:{...j.trace,route:[...j.trace.route,le(ie.center,s),ge(ie),le(ie.center,c),le(ne.center,c),ge(ne),...oe.trace.route]},length:_e.reduce((ue,fe)=\u003eue+tn(fe.start,fe.end),0)}});if(!Wh({...t,plans:[...t.acceptedPlans,...te],sharedBoundary:e.sharedBoundary}))return null;for(const j of te)for(const J of o)if(j.connectionIndex!==J.connectionIndex){for(const oe of j.segments){if(J.via.spanLayers.includes(oe.layer)\u0026\u0026Cr(J.via.center,oe.start,oe.end)\u003cJ.via.diameter/2+i/2+r-1e-7)return null;for(const ie of J.segments)if(ie.layer===oe.layer\u0026\u0026tu(oe.start,oe.end,ie.start,ie.end)\u003ci+r-1e-7)return null}for(const oe of j.additionalVias){if(tn(oe.center,J.via.center)\u003ct.viaDiameter+r-1e-7)return null;for(const ie of J.segments)if(oe.spanLayers.includes(ie.layer)\u0026\u0026Cr(oe.center,ie.start,ie.end)\u003ct.viaDiameter/2+i/2+r-1e-7)return null}}return te}function*$Nt(t){if(t.buses.some(d=\u003ed.termination.type===\"boundary\")\u0026\u0026t.buses.every(d=\u003ed.termination.type===\"plane\"||d.exitEdge===\"left\")){const d=_ue(t),p=yield*$Nt(d);if(!p)return null;const m=_ue(p),_=new Map(t.buses.flatMap(f=\u003ef.connections.map(I=\u003e[I.connectionIndex,I])));return m.map(f=\u003e({...f,sourceObstacle:_.get(f.connectionIndex).sourceObstacle}))}const{buses:e,sourceEscapes:n,initialPlans:o}=t,i=new Map(n.map(d=\u003e[d.connectionIndex,d])),r=new Set(o.map(d=\u003ed.connectionIndex)),s=e.filter(d=\u003ed.connections.some(p=\u003e!r.has(p.connectionIndex)));if(s.some(d=\u003ed.connections.some(p=\u003er.has(p.connectionIndex))))throw new Error(\"FanoutSolver: a reserved-source continuation cannot start with a partially committed bus\");for(const d of s)for(const p of d.connections)if(!i.has(p.connectionIndex))throw new Error(`FanoutSolver: missing reserved source escape for ${p.connection.name}`);const a=new Map(n.map(d=\u003e[d.connectionIndex,d.via.center])),A=new Map(n.map(d=\u003e[d.connectionIndex,[d.segments[0].start,...d.segments.map(p=\u003ep.end)]])),c=[...o],l=d=\u003e{const p=t.targetLayerByBusId?.get(d.busId)??(d.allowedLayers??t.layerNames).find(m=\u003em!==d.connections[0].sourceLayer);return o.filter(m=\u003em.targetLayer===p).length},u=s.filter(d=\u003ed.termination.type===\"boundary\").sort((d,p)=\u003ep.connections.length-d.connections.length||l(d)-l(p)),g=new Set;for(const d of[...u,...s.filter(p=\u003ep.termination.type===\"plane\")]){if(g.has(d.busId))continue;if(d.termination.type===\"boundary\"\u0026\u0026d.connections.length\u003c=2\u0026\u0026t.targetLayerByBusId){const C=t.targetLayerByBusId.get(d.busId);if(!C)return null;const y=u.filter(E=\u003eE.connections.length\u003c=2\u0026\u0026t.targetLayerByBusId.get(E.busId)===C),x=yield*FQo({...t,buses:y,targetLayer:C,acceptedPlans:c,fixedViaPointsByConnectionIndex:a,sourceEscapePaths:A,reservedVias:n.map(E=\u003e({connectionName:E.connectionName,via:E.via}))});if(!x)return null;c.push(...x);for(const E of y)g.add(E.busId);continue}const p=new Set(d.connections.map(C=\u003eC.connectionIndex)),m=n.filter(C=\u003e!p.has(C.connectionIndex)).map(C=\u003e({connectionName:C.connectionName,via:C.via,...C.segments.length===1?{sourceEscapeSegment:C.segments[0]}:{}})),_=t.targetLayerByBusId?.get(d.busId),f=_?[_]:d.termination.type===\"plane\"?[d.termination.layer]:(d.routableEscapeLayers??d.allowedLayers??t.layerNames).filter(C=\u003eC!==d.connections[0].sourceLayer);let I;for(const C of f){const y={...t,bus:d,targetLayer:C,acceptedPlans:c,fixedViaPointsByConnectionIndex:a,sourceEscapePaths:A,reservedVias:m};if(t.sourceBoundary\u0026\u0026d.termination.type===\"boundary\"\u0026\u0026d.connections.length\u003e2){for(const E of[WNt,LQo,TQo,kQo]){const B=E({...y,sourceBoundary:t.sourceBoundary});let S=B.next();for(;!S.done;)yield{phase:\"via-minimal-winding\",busId:d.busId,targetLayer:C,winding:S.value},S=B.next();if(S.value){I=S.value;break}}if(I)break}const x=yield*eue({...t,bus:d,targetLayer:C,acceptedPlans:c,fixedViaPointsByConnectionIndex:a,sourceEscapePaths:A,reservedVias:m,viaMinimalOnly:!0,adaptiveWindingRouteOrder:!0,alignWindingGridToPads:!0,windingGridStep:(t.traceWidth+t.clearance)/2,fixedViaFallbackRouteOrderAttempts:32},1,!1);if(x.length){I=x[0];break}}if(!I)return null;c.push(...I)}const h=e[0]?.sharedBoundary;return!h||!Wh({...t,plans:c,sharedBoundary:h})?null:c}function*HQo(t,e){const n={reserveFutureApproaches:!0,failedNarrowGroup:!1,failedWideMatching:!1},o=yield*e(n);return o||!t||!n.failedNarrowGroup\u0026\u0026!n.failedWideMatching?o:yield*e({reserveFutureApproaches:!1,failedNarrowGroup:!1,failedWideMatching:!1})}function qNt(t){const{buses:e,fixedViaPointsByConnectionIndex:n,clearance:o}=t,i=e[0];if(!i?.exitEdge||e.some(A=\u003eA.componentId!==i.componentId||A.exitEdge!==i.exitEdge||A.termination.type!==\"boundary\"||A.connections.length\u003e2||A.allowedLayers?.length!==1||A.allowedLayers[0]===\"top\"||A.connections.some(c=\u003ec.sourceLayer!==\"top\")))return!1;const r=i.exitEdge===\"left\"||i.exitEdge===\"right\"?\"x\":\"y\",s=i.exitEdge===\"top\"||i.exitEdge===\"right\"?1:-1;let a=0;for(const A of e){if(A.connections.length!==2||A.maxLengthSkew===void 0||A.maxLengthSkew\u003e=Math.min(A.pitchX,A.pitchY))continue;const c=A.componentBounds,l=r===\"x\"?s\u003e0?c.minX:c.maxX:s\u003e0?c.minY:c.maxY,u=A.connections.map(g=\u003e({source:g.sourcePoint,via:n.get(g.connectionIndex)}));u.some((g,h)=\u003e{const d=u[1-h];return!g.via||!d.via?!1:s*(g.via[r]-l)\u003c-1e-7\u0026\u0026d.via.x\u003e=c.minX\u0026\u0026d.via.x\u003c=c.maxX\u0026\u0026d.via.y\u003e=c.minY\u0026\u0026d.via.y\u003c=c.maxY\u0026\u0026s*(d.via[r]-d.source[r])\u003eo})\u0026\u0026a++}return a\u003e=2}function OQo(t){return t.groups.filter(e=\u003eqNt({...t,buses:e}))}function XNt(t){return t.completedBuses.filter(e=\u003et.selectedBusIds.has(e.busId)\u0026\u0026e.termination.type===\"boundary\"\u0026\u0026e.connections.length\u003e2\u0026\u0026e.allowedLayers?.length===1\u0026\u0026e.maxLengthSkew!==void 0)}function ZNt(t){return XNt(t).some(e=\u003e{const n=t.plans.filter(i=\u003ei.busId===e.busId),o=Math.min(...n.map(i=\u003ei.length))+e.maxLengthSkew;return n.some(i=\u003ei.segments.slice(0,i.sourceEscapeSegmentCount??1).reduce((r,s)=\u003er+tn(s.start,s.end),0)\u003eo+1e-6)})}function*GQo(t){const{inputSrj:e,preparedBuses:n,completedBuses:o,selectedBusIds:i}=t;if(!ZNt(t))return null;const r=XNt(t),s=n.flatMap(p=\u003ep.connections),a=new Map(s.map(p=\u003e[p.connectionIndex,p])),A=p=\u003e{if(a.size!==e.connections.length||p.length!==a.size||new Set(p.map(m=\u003em.connectionIndex)).size!==a.size||p.some(m=\u003e{const _=a.get(m.connectionIndex);return _?.connection.name!==m.connectionName||_.sourceObstacle!==m.sourceObstacle}))throw new Error(\"Wide source length repair requires every original source\")};A(t.plans);const c=new Set(o.map(p=\u003ep.busId)),l=n.filter(p=\u003ep.termination.type===\"boundary\"\u0026\u0026!c.has(p.busId)),u=SO({...t,preparedBuses:o,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowSourcePrefixShortcuts:!0});if(!u)return null;let g=u;const h=()=\u003e{let p=g;const m=zy({...t,plans:g,preparedBuses:o,sharedBoundary:r[0].sharedBoundary,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowSourcePrefixMatching:!0,allowTransitLayerMatching:!0,allowDistributedMatching:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,unroutedSourceBuses:l,maximumWorkUnits:1e5,candidatePlansAreFeasible:_=\u003e(A(_),p=[..._],!0)});return g=m.plans??p,m};let d=h();if(!d.plans){const p=d.failedBus;if(!r.some(x=\u003ex.busId===p.busId))return null;const m=g.filter(x=\u003ex.busId===p.busId),_=Math.max(...m.map(x=\u003ex.length)),f=m.filter(x=\u003e_-x.length\u003ep.maxLengthSkew+1e-6);if(f.length!==1||g.some(x=\u003e!x.via))return null;const I=f[0],C=a.get(I.connectionIndex),y=yield*AE({...t,srj:e,allBuses:n,buses:[{...p,connections:[C]}],targetLayer:I.targetLayer,transitLayers:[],terminals:[{connection:C,viaPoint:I.via.center,exitPoint:I.exitPoint}],fixedViaPointsByConnectionIndex:new Map(g.map(x=\u003e[x.connectionIndex,x.via.center])),sourceEscapePaths:new Map(g.map(x=\u003e[x.connectionIndex,[x.sourcePoint,...x.segments.slice(0,x.sourceEscapeSegmentCount??1).map(E=\u003eE.end)]])),acceptedPlans:g.filter(x=\u003ex!==I),routeFromSourcePads:!0,sourceLayerTravelCost:3,includeDiagonalNeighbors:!0,tightViaChannels:!0,ripCost:64,shuffleSeed:1,maximumIterations:2e6,maximumLocalRepairAttempts:0});if(!y||y.length!==1)return null;g=g.map(x=\u003ex===I?y[0]:x),d=h()}return d.plans?(A(d.plans),qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...d.plans.flatMap(p=\u003e[p.trace,...p.planeEndpointTrace?[p.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?d.plans:null):null}function YQo(t){const{buses:e,targetLayer:n,exits:o,layerNames:i,viaDiameter:r,clearance:s}=t,a=e[0];if(!a?.exitEdge||e.length\u003c2||e.some(_=\u003e_.termination.type!==\"boundary\"||_.connections.length\u003c=2||_.componentId!==a.componentId||_.exitEdge!==a.exitEdge||_.connections.some(f=\u003ef.sourceLayer!==\"top\")))return!1;const A=_=\u003e_.routableEscapeLayers??_.allowedLayers??i;if(n===\"top\"||e.some(_=\u003e!A(_).includes(n))||!i.some(_=\u003e_!==\"top\"\u0026\u0026_!==n\u0026\u0026e.every(f=\u003eA(f).includes(_))))return!1;const c=e.flatMap(_=\u003e_.connections),l=a.exitEdge===\"left\"||a.exitEdge===\"right\"?\"y\":\"x\",u=c.map(_=\u003eo.get(_.connectionIndex)?.[l]);if(u.some(_=\u003e_===void 0||!Number.isFinite(_))||Math.max(...u)-Math.min(...u)\u003e=(c.length-1)*(r+s)-1e-8)return!1;const h=c.reduce((_,f)=\u003e({x:_.x+f.sourcePoint.x/c.length,y:_.y+f.sourcePoint.y/c.length}),{x:0,y:0}),d=a.componentBounds,p=Math.min(Math.abs(h.x-d.minX),Math.abs(h.x-d.maxX)),m=Math.min(Math.abs(h.y-d.minY),Math.abs(h.y-d.maxY));return l===\"x\"?p+1e-8\u003cm:m+1e-8\u003cp}function UQo(t){const e=t.length*(t.length-1)/2;if(e===0)return!1;let n=0;for(let o=0;o\u003ct.length;o++){const i=t[o];for(const r of t.slice(o+1))if(tu(i.source,i.target,r.source,r.target)\u003c1e-7\u0026\u0026++n\u003ee/2)return!0}return!1}var KQo=class{constructor(t){this.options=t,this.pending=[t.preferSourceTransit?{ripCost:t.sourceTransitRipCost??8,shuffleSeed:1,transitLayers:t.allTransitLayers}:{ripCost:t.firstRipCost,shuffleSeed:1,transitLayers:t.transitLayers}],t.preferAlternateOrder\u0026\u0026(this.originalOrder=this.pending[0],this.preferredOrder={...this.originalOrder,shuffleSeed:2},this.pending[0]=this.preferredOrder),t.preferSourceOrigin\u0026\u0026this.pending.unshift({ripCost:t.sourceOriginRipCost??256,shuffleSeed:1,transitLayers:[],routeFromSourcePads:!0})}options;pending;attempted=new Set;preferredOrder;originalOrder;next(){for(;this.pending.length\u003e0;){const t=this.pending.shift(),e=JSON.stringify(t);if(!this.attempted.has(e))return this.attempted.add(e),t}}failed(t,e){if(t.routeFromSourcePads)return;const n=o=\u003e{this.attempted.has(JSON.stringify(o))||this.pending.unshift(o)};if(t===this.preferredOrder){n(this.originalOrder),e===\"lengths\"\u0026\u0026this.pending.push({...this.originalOrder,ripCost:256});return}if(t.sourceLayerTravelCost!==void 0){const{reserveFutureApproaches:o,sourceLayerTravelCost:i,maximumSourceIterations:r,...s}=t;o===!1\u0026\u0026e===\"routing\"?n({...s,sourceLayerTravelCost:4,reserveFutureApproaches:!0}):this.failed(s,\"lengths\");return}if(t.sourceOriginPhysicalGridPhase){const{sourceOriginPhysicalGridPhase:o,...i}=t;n({...i,ripCost:256,shuffleSeed:1});return}if(this.options.preferSourceTransit\u0026\u0026t.ripCost===(this.options.sourceTransitRipCost??8)\u0026\u0026t.transitLayers.length===this.options.allTransitLayers.length)n({ripCost:this.options.firstRipCost,shuffleSeed:1,transitLayers:this.options.transitLayers});else if(this.options.wideSingleLayer){if(e===\"lengths\"\u0026\u0026t.ripCost===64){const o={...t,shuffleSeed:1,sourceLayerTravelCost:3,maximumSourceIterations:2e7,reserveFutureApproaches:!1},i={...t,shuffleSeed:1,sourceOriginPhysicalGridPhase:!0};this.options.retrySourceOriginFreshReservations\u0026\u0026!this.attempted.has(JSON.stringify(o))?n(o):this.options.retrySourceOriginPhysicalGridPhase\u0026\u0026!this.attempted.has(JSON.stringify(i))?n(i):n({...t,ripCost:256,shuffleSeed:1})}e===\"routing\"\u0026\u0026t.shuffleSeed===1\u0026\u0026n({...t,ripCost:64,shuffleSeed:2})}else if(t.transitLayers.length\u003cthis.options.allTransitLayers.length){const o={ripCost:e===\"lengths\"?8:this.options.firstRipCost,shuffleSeed:1,transitLayers:this.options.allTransitLayers};e===\"routing\"\u0026\u0026o.ripCost!==256\u0026\u0026this.attempted.has(JSON.stringify(o))?n({...o,ripCost:256}):n(o)}else e===\"routing\"\u0026\u0026t.ripCost!==256\u0026\u0026n({...t,ripCost:256})}};function VQo(t){const e=t.traceWidth+t.clearance;if(!Number.isFinite(e)||!(t.traceWidth\u003e0)||t.clearance\u003c0)throw new Error(\"Boundary approach reservations require valid trace rules\");return t.buses.filter(n=\u003en.termination.type===\"boundary\"\u0026\u0026!t.excludedBusIds.has(n.busId)).flatMap(n=\u003e{const o=t.targetLayerByBusId.get(n.busId);if(!o||!n.exitEdge)throw new Error(`Missing boundary approach layer or edge for ${n.busId}`);return n.connections.map(i=\u003e{const r=t.exits.get(i.connectionIndex);if(!r)throw new Error(`Missing boundary approach target for ${i.connectionIndex}`);const s={...r};return n.exitEdge===\"bottom\"?s.y+=e:n.exitEdge===\"top\"?s.y-=e:n.exitEdge===\"left\"?s.x+=e:s.x-=e,{type:\"pcb_trace\",pcb_trace_id:`fanout-approach-reservation:${i.connectionIndex}`,connection_name:i.connection.name,route:[s,r].map(a=\u003e({route_type:\"wire\",...a,layer:o,width:t.traceWidth}))}})})}function zQo(t){const e={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(const n of t){const o=n,i=(o.ccwRotationDegrees??0)*Math.PI/180,r=n.width/2,s=n.height/2,a=o.shape===\"circle\"?r:Math.abs(Math.cos(i))*r+Math.abs(Math.sin(i))*s,A=o.shape===\"circle\"?s:Math.abs(Math.sin(i))*r+Math.abs(Math.cos(i))*s;e.minX=Math.min(e.minX,n.center.x-a),e.maxX=Math.max(e.maxX,n.center.x+a),e.minY=Math.min(e.minY,n.center.y-A),e.maxY=Math.max(e.maxY,n.center.y+A)}return e}function JQo(t,e){const n=t.filter(g=\u003eg.termination.type===\"boundary\"),o=n[0]?.exitEdge;if(!o||n.some(g=\u003eg.exitEdge!==o))return[...t];const i=n.flatMap(g=\u003eg.connections),r={x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2},s=i.reduce((g,h)=\u003eg+h.sourcePoint.x-r.x,0),a=i.reduce((g,h)=\u003eg+h.sourcePoint.y-r.y,0);if(Math.hypot(s,a)\u003c1e-9)return[...t];const A=[\"right\",\"up\",\"left\",\"down\"],c=Math.abs(s)\u003e=Math.abs(a)?s\u003e=0?\"right\":\"left\":a\u003e=0?\"up\":\"down\",l=o===\"top\"?\"up\":o===\"bottom\"?\"down\":o,u=A.indexOf(c)-A.indexOf(l);return t.map(g=\u003eg.termination.type===\"plane\"?g:{...g,direction:A[(A.indexOf(g.direction)+u+4)%4]})}function WQo(t){return t.flatMap(e=\u003e{const n=[e.connectionName],o=[e.sourceLayer],i=[];e.via\u0026\u0026i.push({type:\"rect\",shape:\"circle\",center:e.via.center,width:e.via.diameter,height:e.via.diameter,connectedTo:n,layers:o});for(const r of e.segments){const{start:s,end:a,width:A}=r,c=a.x-s.x,l=a.y-s.y;i.push({type:\"rect\",center:{x:(s.x+a.x)/2,y:(s.y+a.y)/2},width:Math.hypot(c,l),height:A,ccwRotationDegrees:Math.atan2(l,c)*180/Math.PI,connectedTo:n,layers:o})}for(const r of[e.sourcePoint,...e.segments.map(s=\u003es.end)])i.push({type:\"rect\",shape:\"circle\",center:r,width:e.segments[0]?.width??0,height:e.segments[0]?.width??0,connectedTo:n,layers:o});return i})}function*jQo(t){const{srj:e,buses:n,layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a}=t,A=n[0];if(!A||n.some(k=\u003ek.componentId!==A.componentId||k.connections.some(R=\u003eR.sourceLayer!==\"top\")))return null;const c=A.componentObstacles.filter(k=\u003ek.layers.includes(\"top\"));if(!c.length)return null;const l=zQo(c),u=Math.max(A.pitchX,A.pitchY),g=i+r;if(!Number.isFinite(u)||u\u003c=0)return null;const h={x:(l.minX+l.maxX)/2,y:(l.minY+l.maxY)/2},d=Math.ceil(((l.maxX-l.minX)/2+u+g)/g)*g,p=Math.ceil(((l.maxY-l.minY)/2+u+g)/g)*g,m={minX:h.x-d,maxX:h.x+d,minY:h.y-p,maxY:h.y+p};if(n.some(k=\u003em.minX\u003c=k.sharedBoundary.minX||m.maxX\u003e=k.sharedBoundary.maxX||m.minY\u003c=k.sharedBoundary.minY||m.maxY\u003e=k.sharedBoundary.maxY))return null;const _=new Map;for(const k of n){if(k.termination.type!==\"boundary\"||k.allowedLayers?.length!==1||k.allowedLayers[0]===\"top\")continue;const R=k.allowedLayers[0];_.set(R,[..._.get(R)??[],k])}const f=[..._].sort(([k,R],[F,O])=\u003eMath.max(...O.map(U=\u003eU.connections.length))-Math.max(...R.map(U=\u003eU.connections.length))||k.localeCompare(F));if(!f.length)return null;const I=new Map(n.flatMap(k=\u003ek.connections.map(R=\u003e[R.connectionIndex,{bus:k,connection:R}])));if(I.size!==n.reduce((k,R)=\u003ek+R.connections.length,0))throw new Error(\"FanoutSolver: source preparation requires unique connection indices\");const C=JQo(n,l),y={traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,maximumSearchStates:t.maximumSearchStates??1e4,additionalObstacles:e.obstacles},x=t.initialViaPointsByConnectionIndex;if(x\u0026\u0026(x.size!==I.size||[...x].some(([k,R])=\u003e!I.has(k)||!Number.isFinite(R.x)||!Number.isFinite(R.y))))throw new Error(\"FanoutSolver: initial source sites must contain every connection exactly once\");const E=pd(C,{...y,fixedViaPointsByConnectionIndex:x});if(!E)return null;const B=(k,R,F)=\u003e{const{bus:O,connection:U}=I.get(k),Y=O.termination.type===\"plane\"?O.termination.layer:(O.allowedLayers??o).filter(W=\u003eW!==U.sourceLayer).at(-1);if(!Y)throw new Error(\"FanoutSolver: source through-via preparation requires a non-source target layer\");return i4({...t,allowBlindAndBuriedVias:!1,bus:O,terminal:{connection:U,viaPoint:R,exitPoint:R},targetLayer:Y,targetLayerPoints:[R],sourceEscapePoints:F})},S=(k,R)=\u003e[...I.keys()].map(F=\u003eB(F,k.get(F),R.get(F))),Q=k=\u003equ({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...k.map(R=\u003eR.trace)]},clearance:r,allowBlindAndBuriedVias:!1}).valid;let w={sourceBoundary:m,fixedViaPointsByConnectionIndex:E,sourceEscapePaths:new Map([...E].map(([k,R])=\u003e[k,[I.get(k).connection.sourcePoint,R]])),sourcePlans:[],prefixPlans:[],remotePlans:[],layerGroups:[]};if(w.sourcePlans=S(E,w.sourceEscapePaths),!Q(w.sourcePlans))return null;const M=Math.max(u,s/2+i/2+r);for(const[k,R]of f){const F=new Set(R.flatMap(ie=\u003eie.connections.map(ne=\u003ene.connectionIndex))),O=new Set(w.remotePlans.map(ie=\u003eie.connectionIndex)),U=new Map([...w.fixedViaPointsByConnectionIndex].filter(([ie])=\u003e!F.has(ie)\u0026\u0026!O.has(ie))),Y={...e,obstacles:[...e.obstacles,...WQo(w.sourcePlans.filter(ie=\u003e!F.has(ie.connectionIndex)))]},W=R.flatMap(ie=\u003eie.connections.map(ne=\u003e({...ie,busId:`${ie.busId}:source-${ne.connectionIndex}`,sharedBoundary:m,preferredExit:void 0,exitEdge:void 0,connections:[{...ne,exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1}]})));let te=null,j=0;const J=ie=\u003e{if(ie.length\u003c=j)return;const ne=ie.map(ve=\u003e({...ve,busId:I.get(ve.connectionIndex).bus.busId,sourceObstacle:I.get(ve.connectionIndex).connection.sourceObstacle,sourceEscapeSegmentCount:ve.segments.length}));if(!Wh({plans:ne,srj:Y,sharedBoundary:m,clearance:r,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return;const le=[],ge=new Map;for(const ve of ne){const he=ve.exitPoint,Qe=Math.abs(he.x-m.maxX)\u003c1e-7?{x:M,y:0}:Math.abs(he.x-m.minX)\u003c1e-7?{x:-M,y:0}:Math.abs(he.y-m.maxY)\u003c1e-7?{x:0,y:M}:Math.abs(he.y-m.minY)\u003c1e-7?{x:0,y:-M}:null;if(!Qe)throw new Error(\"FanoutSolver: source prefix does not end on its source boundary\");const Pe={x:he.x+Qe.x,y:he.y+Qe.y},we=I.get(ve.connectionIndex).bus.sharedBoundary;if(Pe.x\u003cwe.minX||Pe.x\u003ewe.maxX||Pe.y\u003cwe.minY||Pe.y\u003ewe.maxY)return;const Te=[ve.sourcePoint,...ve.segments.map(Re=\u003eRe.end),Pe];ge.set(ve.connectionIndex,Te),le.push(B(ve.connectionIndex,Pe,Te))}const _e=[...w.remotePlans,...le];if(!Q(_e))return;const ue=new Set(_e.map(ve=\u003eve.connectionIndex)),fe=C.map(ve=\u003e({...ve,connections:ve.connections.filter(he=\u003e!ue.has(he.connectionIndex))})).filter(ve=\u003eve.connections.length),pe=pd(fe,{...y,fixedViaPointsByConnectionIndex:U,preferredViaPointsByConnectionIndex:w.fixedViaPointsByConnectionIndex,blockingSegments:_e.flatMap(ve=\u003eve.segments.map(he=\u003e({connectionIndex:ve.connectionIndex,segment:he}))),blockingVias:_e.map(ve=\u003e({connectionIndex:ve.connectionIndex,center:ve.via.center,diameter:ve.via.diameter,spanLayers:ve.via.spanLayers}))});if(!pe)return;const ye=new Map([...pe,..._e.map(ve=\u003e[ve.connectionIndex,ve.via.center])]);if(ye.size!==I.size)throw new Error(\"FanoutSolver: source preparation lost a connection\");for(const ve of O)ge.set(ve,w.sourceEscapePaths.get(ve));for(const[ve,he]of pe)ge.set(ve,[I.get(ve).connection.sourcePoint,he]);const Me=S(ye,ge);Q(Me)\u0026\u0026(j=ie.length,te={sourceBoundary:m,fixedViaPointsByConnectionIndex:ye,sourceEscapePaths:ge,sourcePlans:Me,prefixPlans:[...w.prefixPlans,...ne],remotePlans:_e,layerGroups:[...w.layerGroups,{layer:k,connectionCount:F.size,escapedCount:ie.length}]})},oe=yield*AR({srj:Y,buses:W,traceWidth:i,clearance:r,onPartialRoutes:J});oe\u0026\u0026J(oe),te?w=te:w.layerGroups.push({layer:k,connectionCount:F.size,escapedCount:0})}return w.remotePlans.length?w:null}function $Qo(t,e){return t.some(n=\u003e{if(!cue([n]))return!1;const o=n.exitEdge===\"left\"||n.exitEdge===\"right\"?\"x\":\"y\",i=o===\"x\"?\"y\":\"x\",r=n.exitEdge===\"left\"||n.exitEdge===\"bottom\"?-1:1,s=o===\"x\"?(n.componentBounds.minX+n.componentBounds.maxX)/2:(n.componentBounds.minY+n.componentBounds.maxY)/2,a=n.connections.map(A=\u003ee.get(A.connectionIndex)?.[i]);return a.some(A=\u003eA===void 0||!Number.isFinite(A))?!1:t.some(A=\u003e{if(A.termination.type!==\"boundary\"||A.connections.length!==2||A.componentId!==n.componentId||A.exitEdge!==n.exitEdge||A.allowedLayers?.length!==1||A.allowedLayers[0]===n.allowedLayers[0]||!A.connections.every(u=\u003er*(u.sourcePoint[o]-s)\u003c-1e-7))return!1;const c=A.connections.map(u=\u003ee.get(u.connectionIndex)?.[i]);if(c.some(u=\u003eu===void 0||!Number.isFinite(u)))return!1;const l=A.connections.flatMap(u=\u003e{const g=u.sourceObstacle?.center[i]??u.sourcePoint[i],h=((i===\"x\"?u.sourceObstacle?.width:u.sourceObstacle?.height)??0)/2;return[g-h,g+h]});return Math.max(Math.min(...a),Math.min(...c),Math.min(...l))\u003c=Math.min(Math.max(...a),Math.max(...c),Math.max(...l))})})}function qQo(t,e){return t.some(n=\u003e{if(!cue([n]))return!1;const o=n.exitEdge===\"left\"||n.exitEdge===\"right\"?\"y\":\"x\",i=n.connections.map(a=\u003ee.get(a.connectionIndex)?.[o]);if(i.some(a=\u003ea===void 0||!Number.isFinite(a)))return!1;const r=o===\"x\"?n.componentBounds.minX:n.componentBounds.minY,s=o===\"x\"?n.componentBounds.maxX:n.componentBounds.maxY;return Math.min(...i)\u003c=s+1e-7\u0026\u0026Math.max(...i)\u003e=r-1e-7})}var i6=1e-6,A$=t=\u003eMath.max(...t.map(e=\u003ee.length))-Math.min(...t.map(e=\u003ee.length));function XQo(t,e){const n=t.trace.route.findIndex(r=\u003er.route_type===\"via\"),o=e.trace.route.findIndex(r=\u003er.route_type===\"via\");if(n\u003c0||o\u003c0)return null;const i=[...t.trace.route.slice(0,n+1),...e.trace.route.slice(o+1)];return i[i.length-1]=t.trace.route.at(-1),{...t,trace:{...t.trace,route:i},segments:[...t.segments.slice(0,t.sourceEscapeSegmentCount??1),...e.segments.slice(e.sourceEscapeSegmentCount??1)],length:e.length}}function*ZQo(t){const{inputSrj:e,preparedBuses:n,layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,maximumPasses:A=3,maximumConnectionAttempts:c=24,maximumSearchStates:l=12e5}=t;for(const[B,S]of[[\"maximumPasses\",A],[\"maximumConnectionAttempts\",c],[\"maximumSearchStates\",l]])if(!Number.isSafeInteger(S)||S\u003c1)throw new Error(`FanoutSolver: ${B} must be a positive safe integer`);const u=new Map(t.plans.map(B=\u003e[B.connectionIndex,B])),g=n.flatMap(B=\u003eB.connections);if(u.size!==t.plans.length||u.size!==e.connections.length||g.length!==u.size||g.some(B=\u003eu.get(B.connectionIndex)?.connectionName!==B.connection.name))throw new Error(\"FanoutSolver: overlong-lane rerouting requires every original plan\");const h=n.filter(B=\u003eB.termination.type===\"boundary\"\u0026\u0026(!t.selectedBusIds||t.selectedBusIds.has(B.busId))),d=h.filter(B=\u003eB.maxLengthSkew!==void 0\u0026\u0026B.connections.length\u003e1);let p=[...t.plans];const m=new Map;for(const B of p){if(!B.via)continue;const S=B.segments.slice(0,B.sourceEscapeSegmentCount??1);!S.length||S.some(Q=\u003eQ.layer!==B.sourceLayer)||tn(S[0].start,B.sourcePoint)\u003ei6||tn(S.at(-1).end,B.via.center)\u003ei6||S.some((Q,w)=\u003ew\u003e0\u0026\u0026tn(S[w-1].end,Q.start)\u003ei6)||m.set(B.connectionIndex,[S[0].start,...S.map(Q=\u003eQ.end)])}const _=new Map,f=(i+r)/2;let I=0,C=!1;const y=(B,S)=\u003e{const Q=B.via;return!!(Q\u0026\u0026!(B.additionalVias?.length??0)\u0026\u0026!B.planeEndpointTrace\u0026\u0026!B.planeEndpointVia\u0026\u0026m.has(B.connectionIndex)\u0026\u0026Q.fromLayer===B.sourceLayer\u0026\u0026Q.toLayer===B.targetLayer\u0026\u0026Q.diameter===s\u0026\u0026Q.holeDiameter===a\u0026\u0026Q.spanLayers.length===o.length\u0026\u0026o.every(w=\u003eQ.spanLayers.includes(w))\u0026\u0026(S.routableEscapeLayers??S.allowedLayers??o).includes(B.targetLayer)\u0026\u0026B.segments.slice(B.sourceEscapeSegmentCount??1).every(w=\u003ew.layer===B.targetLayer))};function*x(B,S,Q,w,M){if(I\u003e=c||!y(B,Q))return null;I++;const k=BC({srj:e,bus:Q,targetLayer:B.targetLayer,terminals:[{connection:Q.connections.find(O=\u003eO.connectionIndex===B.connectionIndex),viaPoint:B.via.center,exitPoint:B.exitPoint}],acceptedPlans:S.filter(O=\u003eO.connectionIndex!==B.connectionIndex),layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,allowBlindAndBuriedVias:!1,sourceEscapePaths:m,gridStepDivisor:2,gridStep:f,gridOrigin:w,alignGridToPads:!0,heuristicWeight:1,maximumRouteOrderAttempts:1,maximumSearchStates:l,preferTargetDirectedLaneBias:!0},1,!1);let R=k.next();for(;!R.done;)yield{...R.value,busId:Q.busId,pass:M,connectionAttempt:I},R=k.next();const F=R.value[0]?.[0];return F?XQo(B,F):null}for(const B of d){let S=p.filter(M=\u003eM.busId===B.busId);const Q=A$(S);if(Q\u003c=B.maxLengthSkew+i6)continue;const w=[...p];for(let M=0;M\u003cA;M++){const k=Math.min(...S.map(O=\u003eO.length));let R=!1;const F=S.filter(O=\u003eO.length\u003ek+B.maxLengthSkew+i6).toSorted((O,U)=\u003eU.length-O.length||O.connectionIndex-U.connectionIndex);for(const O of F){if(I\u003e=c)break;const U=O.targetLayer;if(!y(O,B))continue;let Y=_.get(U);Y||(Y=LPe({vias:p.flatMap(J=\u003e[J.via,...J.additionalVias??[],J.planeEndpointVia].filter(oe=\u003eoe?.spanLayers.includes(U)).map(oe=\u003e({connectionIndex:J.connectionIndex,center:oe.center,diameter:oe.diameter}))),activeConnectionIndices:new Set(h.flatMap(J=\u003eJ.connections.filter(oe=\u003eu.get(oe.connectionIndex)?.targetLayer===U).map(oe=\u003eoe.connectionIndex))),traceWidth:i,clearance:r,gridStep:f}),_.set(U,Y));const W=yield*x(O,p,B,Y,M);if(!W||W.length\u003e=O.length-i6)continue;const te=p.filter(J=\u003eJ.busId===B.busId),j=te.map(J=\u003eJ.connectionIndex===O.connectionIndex?W:J);if(A$(j)\u003eA$(te)+i6){if(te.length!==2)continue;const J=te.find(ne=\u003ene!==O);if(J.targetLayer!==U)continue;const oe=p.map(ne=\u003ene===O?W:ne),ie=yield*x(J,oe,B,Y,M);if(!ie||ie.length\u003e=J.length-i6||A$([W,ie])\u003eB.maxLengthSkew+i6)continue;p=oe.map(ne=\u003ene===J?ie:ne)}else p=p.map(J=\u003eJ===O?W:J);R=!0}if(S=p.filter(O=\u003eO.busId===B.busId),!R||I\u003e=c)break}if(A$(S)\u003cQ-i6?C=!0:p=w,I\u003e=c)break}return C?qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...p.flatMap(B=\u003e[B.trace,...B.planeEndpointTrace?[B.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:!1}).valid?p:null:p}var yw=1e-6,fue=t=\u003eMath.max(...t.map(e=\u003ee.length))-Math.min(...t.map(e=\u003ee.length));function*evo(t){const{inputSrj:e,preparedBuses:n,layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,maximumConnectionAttempts:A=8,maximumIterationsPerConnection:c=3e7}=t;for(const[I,C]of[[\"maximumConnectionAttempts\",A],[\"maximumIterationsPerConnection\",c]])if(!Number.isSafeInteger(C)||C\u003c1)throw new Error(`FanoutSolver: ${I} must be a positive safe integer`);const l=new Map(t.plans.map(I=\u003e[I.connectionIndex,I])),u=n.flatMap(I=\u003eI.connections);if(u.length!==e.connections.length||l.size!==t.plans.length||l.size!==u.length||u.some(I=\u003el.get(I.connectionIndex)?.connectionName!==I.connection.name))throw new Error(\"FanoutSolver: transit length repair requires every original plan\");const g=n.filter(I=\u003eI.termination.type===\"boundary\"\u0026\u0026I.maxLengthSkew!==void 0\u0026\u0026I.connections.length\u003e1\u0026\u0026(!t.busIds||t.busIds.includes(I.busId)));let h=[...t.plans];const d=g.filter(I=\u003efue(h.filter(C=\u003eC.busId===I.busId))\u003eI.maxLengthSkew+yw);if(!d.length)return h;const p=new Map,m=new Map;for(const I of u){const C=l.get(I.connectionIndex);if(!C.via)return null;const y=C.segments.slice(0,C.sourceEscapeSegmentCount??1);if(!y.length||y.some(x=\u003ex.layer!==I.sourceLayer)||tn(y[0].start,I.sourcePoint)\u003eyw||tn(y.at(-1).end,C.via.center)\u003eyw||y.some((x,E)=\u003eE\u003e0\u0026\u0026tn(y[E-1].end,x.start)\u003eyw))return null;p.set(I.connectionIndex,C.via.center),m.set(I.connectionIndex,[y[0].start,...y.map(x=\u003ex.end)])}let _=0;for(const I of d){let C=h.filter(S=\u003eS.busId===I.busId);if(C.length!==I.connections.length)return null;const y=C[0].targetLayer,x=I.routableEscapeLayers??I.allowedLayers??o,E=x.filter(S=\u003eS!==y);if(!x.includes(y)||!E.length||C.some(S=\u003eS.targetLayer!==y))return null;const B=new Set;for(;fue(C)\u003eI.maxLengthSkew+yw;){const S=Math.min(...C.map(j=\u003ej.length)),Q=C.filter(j=\u003e!B.has(j.connectionIndex)\u0026\u0026j.length\u003eS+I.maxLengthSkew+yw).toSorted((j,J)=\u003eJ.length-j.length||j.connectionIndex-J.connectionIndex)[0];if(!Q||_\u003e=A)return null;B.add(Q.connectionIndex);const w=Q.via;if(Q.planeEndpointTrace!==void 0||Q.planeEndpointSegments!==void 0||Q.planeEndpointVia!==void 0||w.fromLayer!==Q.sourceLayer||w.toLayer!==y||w.diameter!==s||w.holeDiameter!==a||w.spanLayers.length!==o.length||!o.every(j=\u003ew.spanLayers.includes(j)))continue;const M=I.connections.find(j=\u003ej.connectionIndex===Q.connectionIndex);_++;const k=AE({srj:e,allBuses:n,buses:[{...I,connections:[M]}],targetLayer:y,transitLayers:E,terminals:[{connection:M,viaPoint:w.center,exitPoint:Q.exitPoint}],fixedViaPointsByConnectionIndex:p,sourceEscapePaths:m,acceptedPlans:h.filter(j=\u003ej!==Q),layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,tightViaChannels:!0,ripCost:64,shuffleSeed:1,maximumRipEvents:1,maximumIterations:c});let R=k.next();for(;!R.done;)yield{...R.value,busId:I.busId,connectionName:Q.connectionName,connectionAttempt:_},R=k.next();const F=R.value?.[0];if(!F||F.length\u003e=Q.length-yw)continue;const O=Q.sourceEscapeSegmentCount??1,U=Q.trace.route.findIndex(j=\u003ej.route_type===\"via\"),Y=F.trace.route.findIndex(j=\u003ej.route_type===\"via\");if(U\u003c0||Y\u003c0)return null;const W={...Q,via:w,additionalVias:F.additionalVias,segments:[...Q.segments.slice(0,O),...F.segments.slice(F.sourceEscapeSegmentCount??1)],trace:{...Q.trace,route:[...Q.trace.route.slice(0,U+1),...F.trace.route.slice(Y+1)]},length:F.length},te=C.map(j=\u003ej===Q?W:j);fue(te)\u003efue(C)+yw||(h=h.map(j=\u003ej===Q?W:j),C=te)}}return qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...h.flatMap(I=\u003e[I.trace,...I.planeEndpointTrace?[I.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:!1}).valid?h:null}function eRt(t){const{buses:e,layerNames:n,traceWidth:o,clearance:i}=t,r=e.filter(d=\u003ed.termination.type===\"boundary\"),s=new Map;for(const d of r)if(d.allowedLayers?.length===1){const p=d.allowedLayers[0];s.set(p,(s.get(p)??0)+d.connections.length)}const a=new Map;for(const d of e){const p=new Set(d.connections.map(f=\u003ef.sourceLayer)),m=(d.routableEscapeLayers??d.allowedLayers??n).filter(f=\u003e!p.has(f)).toSorted((f,I)=\u003e(s.get(f)??0)-(s.get(I)??0)||n.indexOf(I)-n.indexOf(f)),_=d.termination.type===\"plane\"?d.termination.layer:m[0];if(!_)return null;a.set(d.busId,_)}const A=VPe({...t,targetLayerByBusId:a}),c=new Map(A.tracksByConnectionIndex),l=QNt(e),u=d=\u003ed.exitEdge===\"left\"||d.exitEdge===\"right\"?\"y\":\"x\",g=o+i;for(const d of r){if(d.allowedLayers?.length!==1)continue;const p=u(d),m=d.sharedBoundary,_=p===\"y\"?m.minY:m.minX,f=p===\"y\"?m.maxY:m.maxX,I=d.connections.map(S=\u003e(S.exitTargetPoint??S.targetPoint)[p]),C=I.toSorted((S,Q)=\u003eS-Q);if(C.some((S,Q)=\u003e!Number.isFinite(S)||Q\u003e0\u0026\u0026S-C[Q-1]\u003cg-1e-8))continue;const y=C.at(-1)-C[0];if(y\u003ef-_)continue;let x;if(l.has(d.busId))if(d.connections.length===2){const S=d.connections.map(M=\u003ec.get(M.connectionIndex)),Q=(S[0]+S[1])/2,w=Math.abs(S[1]-S[0]);x=S.map(M=\u003eQ+(M-Q)*y/w)}else continue;else{const S=Math.max(_-C[0],Math.min(0,f-C.at(-1)));x=I.map(Q=\u003eQ+S)}const E=new Set(d.connections.map(S=\u003eS.connectionIndex)),B=r.filter(S=\u003eS.exitEdge===d.exitEdge\u0026\u0026a.get(S.busId)===a.get(d.busId)).flatMap(S=\u003eS.connections.filter(Q=\u003e!E.has(Q.connectionIndex)).map(Q=\u003ec.get(Q.connectionIndex)));if(!x.some(S=\u003eS\u003c_||S\u003ef||B.some(Q=\u003eMath.abs(S-Q)\u003cg-1e-8)))for(const[S,Q]of d.connections.entries())c.set(Q.connectionIndex,x[S])}const h=new Map;for(const d of r)for(const p of d.connections){const m=c.get(p.connectionIndex),_=d.sharedBoundary,f=d.exitEdge===\"left\"?{x:_.minX,y:m}:d.exitEdge===\"right\"?{x:_.maxX,y:m}:d.exitEdge===\"top\"?{x:m,y:_.maxY}:{x:m,y:_.minY};h.set(p.connectionIndex,f)}return{targetLayerByBusId:a,exits:h}}function*tvo(t){const e=new Set;let n;const o=()=\u003eXPe(t,{reserveFutureApproaches:!1,failedNarrowGroup:!1,failedWideMatching:!1},e,{travelCost:3,maximumIterations:2e7});let i=!1;if(t.sourceOriginRouting\u0026\u0026YPe(t.buses)){const s=eRt(t),a={requested:!!s\u0026\u0026qQo(t.buses,s.exits),reached:!1},A=XPe({...t,sourceOriginRouting:!1},{reserveFutureApproaches:!0,failedNarrowGroup:!1,failedWideMatching:!1},e,void 0,a);let c=A.next();for(;!c.done\u0026\u0026!a.reached;)yield c.value,c=A.next();if(c.done){if(c.value)return c.value}else n=A;if(cue(t.buses)\u0026\u0026(i=!!s\u0026\u0026$Qo(t.buses,s.exits),!i)){const l=yield*o();if(l)return l}}let r=yield*HQo(t.sourceOriginRouting??!1,s=\u003eXPe(t,s,e));return!r\u0026\u0026i\u0026\u0026(r=yield*o()),r||(n?yield*n:null)}function*XPe(t,e,n,o,i){const{buses:r,srj:s,layerNames:a}=t,A=eRt(t);if(!A)return null;const c=t.sourceOriginRouting?(function*(){return SSo(t)})():jQo(t);let l=c.next();for(;!l.done;)yield{phase:\"sources\",routedConnectionCount:0},l=c.next();if(!l.value)return null;const{fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,sourcePlans:h}=l.value;let d=[];const p=new Set(r.filter(x=\u003ex.termination.type===\"plane\").map(x=\u003ex.busId)),m=new Map;for(const x of r)if(x.termination.type===\"boundary\"){const E=A.targetLayerByBusId.get(x.busId);m.set(E,[...m.get(E)??[],x])}const _=[...m].sort(([,x],[,E])=\u003eMath.max(...x.map(B=\u003eB.allowedLayers?.length??a.length))-Math.max(...E.map(B=\u003eB.allowedLayers?.length??a.length))||Math.max(...E.map(B=\u003eB.connections.length))-Math.max(...x.map(B=\u003eB.connections.length))),f=OQo({groups:_.map(([,x])=\u003ex),fixedViaPointsByConnectionIndex:u,clearance:t.clearance}),I=t.sourceOriginRouting\u0026\u0026YPe(r),C=I\u0026\u0026!o\u0026\u0026cue(r);let y=!1;for(const[x,E]of _){if(C\u0026\u0026x===_.at(-1)[0]){const ie=zPe({buses:E,exits:A.exits});for(const[ne,le]of ie)A.exits.set(ne,le)}const B=Math.max(...E.map(ie=\u003eie.connections.length)),S=B\u003e2\u0026\u0026E.every(ie=\u003eie.allowedLayers?.length===1),Q=a.filter(ie=\u003eie!==x\u0026\u0026E.every(ne=\u003e(ne.routableEscapeLayers??ne.allowedLayers??a).includes(ie)\u0026\u0026ne.connections.every(le=\u003ele.sourceLayer!==ie))),w=a.filter(ie=\u003eie!==x\u0026\u0026E.every(ne=\u003e(ne.routableEscapeLayers??ne.allowedLayers??a).includes(ie))),M=qNt({buses:E,fixedViaPointsByConnectionIndex:u,clearance:t.clearance}),k=y\u0026\u0026B\u003e2\u0026\u0026Q.length===0\u0026\u0026w.length\u003e0,R=y\u0026\u0026B\u003e2\u0026\u0026Q.length\u003e0,F=C\u0026\u0026B\u003e2\u0026\u0026Q.length===0\u0026\u0026w.length\u003e0,O=d,U=t.sourceOriginRouting\u0026\u0026x===_[0][0]\u0026\u0026S,Y=new KQo({wideSingleLayer:S,retrySourceOriginPhysicalGridPhase:U\u0026\u0026!o,retrySourceOriginFreshReservations:U\u0026\u0026!o\u0026\u0026e.reserveFutureApproaches,preferAlternateOrder:!t.sourceOriginRouting\u0026\u0026S\u0026\u0026x===_[0][0]\u0026\u0026f.some(ie=\u003eE.every(ne=\u003eie.every(le=\u003ele.componentId===ne.componentId\u0026\u0026le.exitEdge===ne.exitEdge)))||I\u0026\u0026!S\u0026\u0026B\u003e2\u0026\u0026Q.length\u003e0\u0026\u0026x===_.at(-1)[0],firstRipCost:B\u003c=2?256:64,transitLayers:Q,allTransitLayers:w,sourceOriginRipCost:R?64:256,sourceTransitRipCost:k?64:8,preferSourceOrigin:M||I\u0026\u0026B\u003c=2\u0026\u0026O.length\u003e0||R||YQo({...t,buses:E,targetLayer:x,exits:A.exits}),preferSourceTransit:!F\u0026\u0026(k||B\u003e2\u0026\u0026Q.length===0\u0026\u0026w.length\u003e0\u0026\u0026UQo(E.flatMap(ie=\u003eie.connections.map(ne=\u003e({source:u.get(ne.connectionIndex),target:A.exits.get(ne.connectionIndex)})))))});let W=!1,te=!1,j=0;const J={sites:new Map(u),paths:new Map(g),plans:[...h]},oe=ie=\u003e{u.clear();for(const[ne,le]of ie.sites)u.set(ne,le);g.clear();for(const[ne,le]of ie.paths)g.set(ne,le);h.splice(0,h.length,...ie.plans)};for(let ie=Y.next();ie;ie=Y.next()){const ne=j++===0;d=O;for(const Ce of E)p.delete(Ce.busId);const le=ie.sourceOriginPhysicalGridPhase||ie.sourceLayerTravelCost!==void 0?{sites:new Map(u),paths:new Map(g),plans:[...h]}:void 0,ge=()=\u003e{le\u0026\u0026oe(le)};ie.sourceLayerTravelCost!==void 0\u0026\u0026oe(J);const _e=ie.routeFromSourcePads||ie.transitLayers.length\u003cw.length,ue={...t,srj:U\u0026\u0026(ie.reserveFutureApproaches??e.reserveFutureApproaches)?{...s,traces:[...s.traces??[],...VQo({...t,...A,excludedBusIds:new Set(E.map(Ce=\u003eCe.busId))})]}:s,allBuses:r,buses:E,targetLayer:x,transitLayers:ie.transitLayers,fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,acceptedPlans:d,terminals:E.flatMap(Ce=\u003eCe.connections.map(Le=\u003e({connection:Le,viaPoint:u.get(Le.connectionIndex),exitPoint:A.exits.get(Le.connectionIndex)}))),tightViaChannels:!0,heuristicWeight:F?2:void 0,ripCost:ie.ripCost,maximumRipEvents:400,maximumLocalRepairAttempts:_e?0:3,maximumIterations:1e8,shuffleSeed:ie.shuffleSeed,sourceOriginPhysicalGridPhase:ie.sourceOriginPhysicalGridPhase,sourceLayerTravelCost:ie.sourceLayerTravelCost??(U?o?.travelCost:void 0),maximumSourceIterations:ie.maximumSourceIterations??(U?o?.maximumIterations:void 0)},fe=(function*(){if(ie.routeFromSourcePads)return yield*AE({...ue,routeFromSourcePads:!0,sourceLayerTravelCost:2,maximumRipEvents:1200,maximumIterations:5e7,maximumLocalRepairAttempts:0});if(!U)return yield*AE(ue);const Ce=yield*QSo({...ue,cleanupRetainedBoundaryTails:ie.sourceOriginPhysicalGridPhase});if(!Ce)return null;u.clear();for(const[Le,Ye]of Ce.fixedViaPointsByConnectionIndex)u.set(Le,Ye);g.clear();for(const[Le,Ye]of Ce.sourceEscapePaths)g.set(Le,Ye);return h.splice(0,h.length,...Ce.sourcePlans),Ce.plans})();let pe=fe.next();for(;!pe.done;){if(i$(pe.value)){const Ce=yield pe.value;pe=fe.next(Ce);continue}yield{phase:\"route-layer\",layer:x,routedConnectionCount:d.length+pe.value.routedConnectionCount,iterations:pe.value.iterations},pe=fe.next()}const ye=pe.value;if(!ye){if(ge(),U\u0026\u0026!ie.sourceOriginPhysicalGridPhase\u0026\u0026ie.sourceLayerTravelCost===void 0)return e.failedWideMatching=te,null;Y.failed(ie,\"routing\"),i?.requested\u0026\u0026!t.sourceOriginRouting\u0026\u0026S\u0026\u0026x===_[0][0]\u0026\u0026ne\u0026\u0026ie.shuffleSeed===1\u0026\u0026!ie.routeFromSourcePads\u0026\u0026(i.requested=!1,i.reached=!0,yield{phase:\"route-layer\",layer:x,routedConnectionCount:d.length});continue}d=[...d,...ye];for(const Ce of E)p.add(Ce.busId);yield{phase:\"match-layer\",layer:x,routedConnectionCount:d.length};const Me=new Set(d.map(Ce=\u003eCe.connectionIndex));let ve=[...d,...h.filter(Ce=\u003e!Me.has(Ce.connectionIndex))];const he=r.filter(Ce=\u003ep.has(Ce.busId));ve=SO({...t,inputSrj:s,plans:ve,preparedBuses:he,selectedBusIds:new Set(E.map(Ce=\u003eCe.busId)),allowBlindAndBuriedVias:!1})??ve;let Qe=ie.routeFromSourcePads\u0026\u0026R,Pe=ie.routeFromSourcePads??!1;const we=t.sourceOriginRouting===!0\u0026\u0026B\u003c=2\u0026\u0026O.length\u003e0,Te=t.sourceOriginRouting\u0026\u0026S?r.filter(Ce=\u003eCe.termination.type===\"boundary\"\u0026\u0026!p.has(Ce.busId)):void 0,Re=Ce=\u003ezy({...t,inputSrj:s,sharedBoundary:r[0].sharedBoundary,plans:ve,preparedBuses:he,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowSourcePrefixMatching:Qe,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,unroutedSourceBuses:Te,maximumWorkUnits:Ce});function*Ee(){const Ce=ZQo({...t,inputSrj:s,plans:ve,preparedBuses:r,selectedBusIds:new Set(E.map(Ye=\u003eYe.busId))});let Le=Ce.next();for(;!Le.done;)yield{phase:\"repair-lengths\",layer:x,routedConnectionCount:d.length},Le=Ce.next();ve=Le.value??ve}S\u0026\u0026(yield*Ee());let ke=Re(S?void 0:1e3);if(!ke.plans\u0026\u0026C\u0026\u0026B\u003e2\u0026\u0026x===_.at(-1)[0]){const Ce=zy({...t,inputSrj:s,sharedBoundary:r[0].sharedBoundary,plans:ve,preparedBuses:he,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowSourcePrefixMatching:!0,allowTransitLayerMatching:!0,allowDistributedMatching:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e5});Ce.plans\u0026\u0026(ke=Ce,Pe=!0)}if(!ke.plans\u0026\u0026!S\u0026\u0026!we\u0026\u0026(yield*Ee(),ke=Re(_e||(t.sourceOriginRouting||y)\u0026\u0026B\u003e2?1e3:void 0)),!ke.plans\u0026\u0026we\u0026\u0026I\u0026\u0026ie.routeFromSourcePads){const Ce=Qe;Qe=!0;const Le=Re(1e3);Le.plans?ke=Le:Qe=Ce}if(!ke.plans\u0026\u0026(we||ke.failedBus\u0026\u0026ie.routeFromSourcePads\u0026\u0026(M||R))){const Ce=ve,Le=Qe,Ye=Pe,tt=new Set,At=we?E.filter(at=\u003eat.connections.length===2).length:1;for(let at=0;at\u003cAt\u0026\u0026!(!ke.failedBus||ke.plans);at++){const nt=ke.failedBus;if(we){if(nt.connections.length!==2||!E.some(Dt=\u003eDt.busId===nt.busId)||tt.has(nt.busId))break;tt.add(nt.busId)}const gt=wNt({...t,inputSrj:s,plans:ve,preparedBuses:r,bus:nt});let bt=gt.next();for(;!bt.done;)yield{phase:\"repair-lengths\",layer:x,routedConnectionCount:d.length,iterations:bt.value.iterations},bt=gt.next();if(!bt.value)break;ve=bt.value,Pe=!0,we\u0026\u0026(Qe=!0);const Ct=function*(){ve=SO({...t,inputSrj:s,plans:ve,preparedBuses:he,selectedBusIds:new Set(E.map(kt=\u003ekt.busId)),allowBlindAndBuriedVias:!1})??ve;let Dt=Re(1e3);return!Dt.plans\u0026\u0026!we\u0026\u0026(yield*Ee(),Dt=Re(1e3)),Dt};ke=yield*Ct(),!ke.plans\u0026\u0026M\u0026\u0026(Qe=!0,ke=yield*Ct())}we\u0026\u0026!ke.plans\u0026\u0026(ve=Ce,Qe=Le,Pe=Ye,yield*Ee(),ke=Re())}if(!ke.plans\u0026\u0026t.sourceOriginRouting\u0026\u0026!S\u0026\u0026B\u003e2\u0026\u0026x===_.at(-1)[0]){const Ce=ve,Le=ke,Ye=Qe,tt=Pe,At=AE({...ue,routeFromSourcePads:!0,transitLayers:[],sourceLayerTravelCost:2,ripCost:64,shuffleSeed:1,maximumIterations:3e7,maximumRipEvents:400,maximumLocalRepairAttempts:0});let at=At.next();for(;!at.done;){if(i$(at.value)){const nt=yield at.value;at=At.next(nt);continue}yield{phase:\"repair-lengths\",layer:x,routedConnectionCount:d.length,iterations:at.value.iterations},at=At.next()}at.value\u0026\u0026(ve=[...O,...at.value,...h.filter(nt=\u003e!Me.has(nt.connectionIndex))],ve=SO({...t,inputSrj:s,plans:ve,preparedBuses:he,selectedBusIds:new Set(E.map(nt=\u003ent.busId)),allowBlindAndBuriedVias:!1})??ve,Qe=!0,ke=Re(1e3),Pe=!0),ke.plans||(ve=Ce,ke=Le,Qe=Ye,Pe=tt)}if(ke.plans)ve=ke.plans;else{if(o\u0026\u0026U)return null;if(te=!0,_e){ge(),Y.failed(ie,\"lengths\");continue}const Ce=evo({...t,inputSrj:s,plans:ve,preparedBuses:r,busIds:E.map(Ye=\u003eYe.busId)});let Le=Ce.next();for(;!Le.done;)yield{phase:\"repair-lengths\",layer:x,routedConnectionCount:d.length,iterations:Le.value.iterations},Le=Ce.next();if(Le.value)ve=Le.value;else{const Ye=bSo({...t,inputSrj:s,plans:ve,preparedBuses:r,busIds:E.map(At=\u003eAt.busId)});let tt=Ye.next();for(;!tt.done;)yield{phase:\"repair-lengths\",layer:x,routedConnectionCount:d.length,iterations:tt.value.iterations},tt=Ye.next();if(tt.value)ve=tt.value;else{const At=new Set(E.map(bt=\u003ebt.busId)),at=t.sourceOriginRouting\u0026\u0026S\u0026\u0026E.every(bt=\u003e!n.has(bt.busId))\u0026\u0026ZNt({plans:ve,completedBuses:he,selectedBusIds:At});if(at)for(const bt of E)n.add(bt.busId);const nt=at?GQo({...t,inputSrj:s,plans:ve,preparedBuses:r,completedBuses:he,selectedBusIds:At}):void 0;let gt=nt?.next();for(;gt\u0026\u0026!gt.done;)yield{phase:\"repair-lengths\",layer:x,routedConnectionCount:d.length,iterations:gt.value.iterations},gt=nt.next();if(!gt?.value){ge(),Y.failed(ie,\"lengths\");continue}ve=gt.value,Pe=!0}}}if(d=ve.filter(Ce=\u003eMe.has(Ce.connectionIndex)),Pe||Te?.length){const Ce=new Map([...E,...Te??[]].flatMap(Le=\u003eLe.connections.map(Ye=\u003e{const tt=ve.find(nt=\u003ent.connectionIndex===Ye.connectionIndex);if(!tt.via)throw new Error(\"Source-origin routing lost its source reservation\");const At=[Ye.sourcePoint,...tt.segments.slice(0,tt.sourceEscapeSegmentCount??1).map(nt=\u003ent.end)],at=i4({...t,bus:Le,terminal:{connection:Ye,viaPoint:tt.via.center,exitPoint:tt.via.center},targetLayer:tt.via.toLayer,targetLayerPoints:[tt.via.center],sourceEscapePoints:At,allowBlindAndBuriedVias:!1});return[Ye.connectionIndex,{plan:at,path:At}]})));for(const[Le,Ye]of Ce)u.set(Le,Ye.plan.via.center),g.set(Le,Ye.path);for(let Le=0;Le\u003ch.length;Le++)h[Le]=Ce.get(h[Le].connectionIndex)?.plan??h[Le]}M\u0026\u0026ie.routeFromSourcePads\u0026\u0026(y=!0),W=!0;break}if(!W)return e.failedNarrowGroup=B\u003c=2\u0026\u0026O.length\u003e0,e.failedWideMatching=t.sourceOriginRouting===!0\u0026\u0026B\u003e2\u0026\u0026te,null}return DPe({...t,inputSrj:s,preparedBuses:r,plans:[...d,...h.filter(x=\u003ep.has(x.busId)\u0026\u0026x.termination.type===\"plane\")]})}function*nvo(t){const e=(r,s=t.preparedBuses)=\u003ezy({plans:r,preparedBuses:s,inputSrj:t.inputSrj,sharedBoundary:t.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges}),n=r=\u003eMath.max(...r.map(s=\u003es.length))-Math.min(...r.map(s=\u003es.length)),o=new Set;let i=[...t.plans];for(;o.size\u003c3;){const r=e(i);if(r.plans)return r.plans;const s=r.failedBus;if(o.has(s.busId)||s.connections.length!==2||s.termination.type!==\"boundary\"||!s.exitEdge)return null;o.add(s.busId);const a=i.filter(C=\u003eC.busId===s.busId);if(a.length!==2||a.some(C=\u003e!C.via||C.additionalVias?.length)||a[0].targetLayer!==a[1].targetLayer)return null;const A=i.filter(C=\u003eC.busId!==s.busId),c=new Map(a.map(C=\u003e[C.connectionIndex,[C.sourcePoint,...C.segments.slice(0,C.sourceEscapeSegmentCount??1).map(y=\u003ey.end)]])),l=s.exitEdge===\"left\"||s.exitEdge===\"right\",u=l?\"y\":\"x\",g=l?t.sharedBoundary.minY:t.sharedBoundary.minX,h=l?t.sharedBoundary.maxY:t.sharedBoundary.maxX,d=(g+h)/2,p=Ds(s.exitEdge,s.preferredExit),m=t.traceWidth+t.clearance,_=n(a),f=[];let I=null;e:for(const C of[0,1,-1,2,-2,3,-3,4,-4]){const y=C*m;if(!a.some(x=\u003e{const E=x.exitPoint[u]+y;return E\u003cg+t.traceWidth/2||E\u003eh-t.traceWidth/2||p===\"minimum\"\u0026\u0026E\u003e=d||p===\"maximum\"\u0026\u0026E\u003c=d}))for(const x of[0,-1,1])for(const E of[[0,1],[1,0]]){const B=yield*BC({...t,bus:s,targetLayer:a[0].targetLayer,acceptedPlans:A,terminals:s.connections.map(w=\u003e{const M=a.find(k=\u003ek.connectionIndex===w.connectionIndex);return{connection:w,viaPoint:M.via.center,exitPoint:{...M.exitPoint,[u]:M.exitPoint[u]+y}}}),sourceEscapePaths:c,reservedVias:void 0,gridStep:m/2,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:1,routeOrder:E,laneBias:x},1,!1);if(!B.length||n(B[0])\u003e=_)continue;const S=B[0].map(w=\u003e({...w,cornerBandSide:p}));if(f.push(S),n(S)\u003e2*s.maxLengthSkew)continue;const Q=e([...A,...S],[s]);if(Q.plans){I=Q.plans;break e}}}if(!I)for(const C of f.toSorted((y,x)=\u003en(y)-n(x)).slice(0,3)){const y=e([...A,...C],[s]);if(y.plans){I=y.plans;break}}if(!I)return null;i=I}return e(i).plans}var bC=1e-7;function Iue(t,e){const n=t.filter((o,i)=\u003e!i||tn(o,t[i-1])\u003e1e-9);return n.flatMap((o,i)=\u003e{if(!i||i===n.length-1)return[o];const r=n[i-1],s=n[i+1],a=tn(r,o),A=tn(o,s);if(Math.abs((o.x-r.x)*(s.x-o.x)+(o.y-r.y)*(s.y-o.y))\u003e1e-9)return[o];const c=Math.min(e,a/3,A/3);return[{x:o.x+(r.x-o.x)*c/a,y:o.y+(r.y-o.y)*c/a},{x:o.x+(s.x-o.x)*c/A,y:o.y+(s.y-o.y)*c/A}]})}function ovo(t,e,n){if(t.length\u003e28)return null;const{traceWidth:o,clearance:i,viaDiameter:r}=e,s=e.buses.flatMap(_=\u003e_.connections),a=pw(e.buses,{...e,additionalObstacles:e.srj.obstacles}),A=new Map(t.map((_,f)=\u003e[_.connectionIndex,f])),c=s.map(_=\u003e({own:A.get(_.connectionIndex),masks:a.filter(f=\u003ef.connectionIndex===_.connectionIndex).map(f=\u003e{const I={start:_.sourcePoint,end:f.point,width:o,layer:_.sourceLayer};let C=0;return t.forEach((y,x)=\u003e{y.connectionIndex!==_.connectionIndex\u0026\u0026(tn(f.point,y.exitPoint)\u003cr+i-bC||Cr(y.exitPoint,I.start,I.end)\u003cr/2+o/2+i-bC||y.segments.some(E=\u003eCr(f.point,E.start,E.end)\u003cr/2+o/2+i-bC||!Zm(I,E,i)))\u0026\u0026(C|=1\u003c\u003cx)}),C})})),l=_=\u003eMath.atan2(_.y-n.y,_.x-n.x),u=t.map((_,f)=\u003ef).sort((_,f)=\u003el(t[f].exitPoint)-l(t[_].exitPoint)),g=e.bus.connections.toSorted((_,f)=\u003el(f.exitTargetPoint??f.targetPoint)-l(_.exitTargetPoint??_.targetPoint)),h=new Map(g.map((_,f)=\u003e[_.connectionIndex,f])),d=_=\u003ec.every(f=\u003ef.own!==void 0\u0026\u0026_\u00261\u003c\u003cf.own||f.masks.some(I=\u003e!(I\u0026_)));let p=[],m=0;for(let _=0;_\u003ct.length;_++){const f=[...u.slice(_),...u.slice(0,_)],I=(C,y,x,E)=\u003e{if(++m\u003e1e6||E.length+f.length-C\u003cp.length)return;if(C===f.length){E.length\u003ep.length\u0026\u0026d(x)\u0026\u0026(p=[...E]);return}const B=f[C],S=h.get(t[B].connectionIndex);S\u003ey\u0026\u0026I(C+1,S,x|1\u003c\u003cB,[...E,B]),I(C+1,y,x,E)};I(0,-1,0,[])}return p.length\u003e=3?p.map(_=\u003et[_]):null}function*ivo(t){const{bus:e,srj:n,traceWidth:o,clearance:i,viaDiameter:r}=t;if(e.termination.type!==\"boundary\"||e.exitEdge!==\"left\"||e.connections.length\u003c8||e.connections.length\u003e28||t.targetLayer===\"top\"||e.connections.some(ye=\u003eye.sourceLayer!==\"top\"))return null;const s=Math.min(e.pitchX,e.pitchY),a=o+i;if(!Number.isFinite(s)||s\u003c=0)return null;const A=e.componentObstacles.filter(ye=\u003eye.layers.includes(\"top\")),c={minX:Math.min(...A.map(ye=\u003eye.center.x-ye.width/2)),maxX:Math.max(...A.map(ye=\u003eye.center.x+ye.width/2)),minY:Math.min(...A.map(ye=\u003eye.center.y-ye.height/2)),maxY:Math.max(...A.map(ye=\u003eye.center.y+ye.height/2))},l={x:(c.minX+c.maxX)/2,y:(c.minY+c.maxY)/2},u=Math.ceil(((c.maxX-c.minX)/2+s+a)/a)*a,g=Math.ceil(((c.maxY-c.minY)/2+s+a)/a)*a,h={minX:l.x-u,maxX:l.x+u,minY:l.y-g,maxY:l.y+g};if(h.minX\u003c=e.sharedBoundary.minX||h.maxY\u003e=e.sharedBoundary.maxY||h.minY\u003c=e.sharedBoundary.minY)return null;const d=new Map(t.buses.flatMap(ye=\u003eye.connections.map(Me=\u003e[Me.connectionIndex,{owner:ye,connection:Me}]))),p=ye=\u003et.targetPointsByConnectionIndex?.get(ye.connectionIndex)??{x:e.sharedBoundary.minX,y:(ye.exitTargetPoint??ye.targetPoint).y},m=ye=\u003eye.map((Me,ve)=\u003e({...e,busId:`${e.busId}:split-source:${ve}`,sharedBoundary:h,preferredExit:void 0,exitEdge:void 0,connections:[{...Me,exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]})),_=yield*AR({srj:n,buses:m(e.connections),traceWidth:o,clearance:i});if(!_||_.length!==e.connections.length)return null;const f=ovo(_,t,l);if(!f)return null;const I=(ye,Me)=\u003e{const ve=d.get(ye.connectionIndex).owner,he=ve===e?t.targetLayer:ve.termination.type===\"plane\"?ve.termination.layer:t.targetLayerByBusId?.get(ve.busId)??(ve.allowedLayers??t.layerNames).find(Qe=\u003eQe!==ye.sourceLayer);if(!he)throw Error(\"FanoutSolver: split source has no legal target layer\");return{connectionIndex:ye.connectionIndex,connectionName:ye.connection.name,segments:Me.slice(1).map((Qe,Pe)=\u003e({start:Me[Pe],end:Qe,width:o,layer:ye.sourceLayer})),via:{center:Me.at(-1),diameter:r,holeDiameter:t.viaHoleDiameter,fromLayer:ye.sourceLayer,toLayer:he,spanLayers:Mx({fromLayer:ye.sourceLayer,toLayer:he,layerNames:t.layerNames,allowBlindAndBuriedVias:!1})}}},C=(ye,Me)=\u003e{const ve=d.get(ye.connectionIndex).connection;if(ye.segments.some(he=\u003e[he.start,he.end].some(Qe=\u003eQe.x\u003ce.sharedBoundary.minX-bC||Qe.x\u003ee.sharedBoundary.maxX+bC||Qe.y\u003ce.sharedBoundary.minY-bC||Qe.y\u003ee.sharedBoundary.maxY+bC)))return!1;for(const he of n.obstacles)if(he.layers.some(Qe=\u003eye.via.spanLayers.includes(Qe))\u0026\u0026wx(ye.via.center,he)\u003cr/2+i-bC||he!==ve.sourceObstacle\u0026\u0026ye.segments.some(Qe=\u003ehe.layers.includes(Qe.layer)\u0026\u0026Tl(Qe,he)\u003co/2+i-bC))return!1;return Me.every(he=\u003ehe.connectionIndex===ye.connectionIndex||tn(ye.via.center,he.via.center)\u003e=r+i-bC\u0026\u0026ye.segments.every(Qe=\u003eCr(he.via.center,Qe.start,Qe.end)\u003e=r/2+o/2+i-bC\u0026\u0026he.segments.every(Pe=\u003eZm(Qe,Pe,i)))\u0026\u0026he.segments.every(Qe=\u003eCr(ye.via.center,Qe.start,Qe.end)\u003e=r/2+o/2+i-bC))},y=ye=\u003e{const Me=new Set(ye.map(ve=\u003eve.connectionIndex));return t.buses.map(ve=\u003e({...ve,connections:ve.connections.filter(he=\u003e!Me.has(he.connectionIndex))})).filter(ve=\u003eve.connections.length)};let x=t.initialViaPoints;const E=ye=\u003e({...t,additionalObstacles:n.obstacles,maximumSearchStates:3e5,blockingSegments:ye.flatMap(Me=\u003eMe.segments.map(ve=\u003e({connectionIndex:Me.connectionIndex,segment:ve}))),blockingVias:ye.map(Me=\u003e({connectionIndex:Me.connectionIndex,...Me.via})),preferredViaPointsByConnectionIndex:x}),B=f.map(ye=\u003eI(d.get(ye.connectionIndex).connection,[ye.segments[0].start,...ye.segments.map(Me=\u003eMe.end)])),S=pd(y(B),E(B));if(!S)return null;x=new Map([...S,...B.map(ye=\u003e[ye.connectionIndex,ye.via.center])]);const Q=f.toSorted((ye,Me)=\u003ep(d.get(ye.connectionIndex).connection).y-p(d.get(Me.connectionIndex).connection).y);let w=[];for(const ye of Q){const Me=[ye];let ve=ye.exitPoint.x;for(const he of Q.slice(Q.indexOf(ye)+1))he.exitPoint.x\u003eve+a-bC\u0026\u0026(Me.push(he),ve=he.exitPoint.x);Me.length\u003ew.length\u0026\u0026(w=Me)}if(w.length\u003c3)return null;const M=new Map(w.map(ye=\u003e[ye.connectionIndex,[ye.segments[0].start,...ye.segments.map(Me=\u003eMe.end)]])),k=e.sharedBoundary.minX+Math.max(s/2,r/2+i),R=h.maxY+s-a/2,F=h.minX-s+a/2,O=()=\u003e[...M].sort(([ye],[Me])=\u003ep(d.get(ye).connection).y-p(d.get(Me).connection).y).map(([ye,Me],ve)=\u003e{const he=p(d.get(ye).connection),Qe=Me.at(-1);return I(d.get(ye).connection,Iue([...Me,{x:Qe.x,y:R+ve*a},{x:F-ve*a,y:R+ve*a},{x:F-ve*a,y:he.y},{x:k,y:he.y}],o))});let U=O();if(U.some(ye=\u003e!C(ye,U)))return null;for(const ye of e.connections.toSorted((Me,ve)=\u003ep(Me).y-p(ve).y)){if(M.has(ye.connectionIndex))continue;const Me=[...M].filter(([he])=\u003ep(d.get(he).connection).y\u003cp(ye).y).at(-1)?.[1].at(-1)?.x??h.minX,ve=[...M].filter(([he])=\u003ep(d.get(he).connection).y\u003ep(ye).y)[0]?.[1].at(-1)?.x??h.maxX;for(const he of[-1,1]){const Qe={x:ye.sourcePoint.x+he*s/2,y:ye.sourcePoint.y+s/2};if(Qe.x\u003cMe+a-bC||Qe.x\u003eve-a+bC)continue;const Pe=[ye.sourcePoint,Qe,{x:Qe.x,y:h.maxY}];M.set(ye.connectionIndex,Pe);const we=O();if(we.every(Te=\u003eC(Te,we))\u0026\u0026pd(y(we),E(we))){U=we;break}M.delete(ye.connectionIndex)}}const Y=Math.min(...U.map(ye=\u003ep(d.get(ye.connectionIndex).connection).y));for(const ye of _.filter(Me=\u003eMath.abs(Me.exitPoint.x-h.minX)\u003cbC\u0026\u0026p(d.get(Me.connectionIndex).connection).y\u003cY).sort((Me,ve)=\u003ep(d.get(ve.connectionIndex).connection).y-p(d.get(Me.connectionIndex).connection).y)){const Me=d.get(ye.connectionIndex).connection,ve=p(Me),he=h.minX-a,Qe=I(Me,Iue([ye.segments[0].start,...ye.segments.map(Pe=\u003ePe.end),{x:he,y:ye.exitPoint.y},{x:he,y:ve.y},{x:k,y:ve.y}],o));C(Qe,U)\u0026\u0026pd(y([...U,Qe]),E([...U,Qe]))\u0026\u0026U.push(Qe)}const W=new Set(U.map(ye=\u003eye.connectionIndex)),te=e.connections.filter(ye=\u003e!W.has(ye.connectionIndex)).sort((ye,Me)=\u003ep(ye).y-p(Me).y);if(te.length\u003c5)return null;const j=te.slice(0,3),J=j[1],oe=j[2],ie=[...n.obstacles,...U.flatMap(ye=\u003eye.segments.map(Me=\u003e({type:\"rect\",center:{x:(Me.start.x+Me.end.x)/2,y:(Me.start.y+Me.end.y)/2},width:tn(Me.start,Me.end),height:Me.width,ccwRotationDegrees:Math.atan2(Me.end.y-Me.start.y,Me.end.x-Me.start.x)*180/Math.PI,layers:[Me.layer],connectedTo:[ye.connectionName]})))],ne=yield*AR({srj:{...n,obstacles:ie},buses:m([J,oe]),traceWidth:o,clearance:i,availableBoundaryRegions:[{direction:\"down\",preferredExit:\"bottom\",exitEdge:\"bottom\"}]});if(!ne?.length)return null;const le=ne.find(ye=\u003eye.connectionIndex===J.connectionIndex),ge=I(J,[le.segments[0].start,...le.segments.map(ye=\u003eye.end)]);if(!C(ge,U))return null;U.push(ge),W.add(ge.connectionIndex);const _e=y(U),ue=new Map([[oe.connectionIndex,{x:oe.sourcePoint.x-s/2,y:oe.sourcePoint.y-s/2}]]),fe=pd(_e,{...E(U),fixedViaPointsByConnectionIndex:ue});if(!fe)return null;const pe=[...U,..._e.flatMap(ye=\u003eye.connections.map(Me=\u003eI(Me,[Me.sourcePoint,fe.get(Me.connectionIndex)])))];return pe.some(ye=\u003e!C(ye,pe))?null:{sourceEscapes:pe,sourceBoundary:h,remoteConnectionIndices:W,bottomRemoteConnectionIndices:new Set([ge.connectionIndex]),lowerConnectionIndices:j.map(ye=\u003eye.connectionIndex),viaPointsByConnectionIndex:new Map(pe.map(ye=\u003e[ye.connectionIndex,ye.via.center]))}}function*ZPe(t){const e=new Set,n=new Set,o=[];let i=0,r=null;function*s(c,l){const u=c.join(\",\")+\":\"+l;if(e.has(u)||i\u003e=256)return;e.add(u),i++;let g=0;const h=BC({...t,routeOrder:c,laneBias:l,maximumRouteOrderAttempts:1},1,!1);let d=h.next();for(;!d.done;)g=Math.max(g,d.value.connectionIndex),yield d.value,d=h.next();if(d.value.length){r=d.value[0];return}const p=c.slice(0,g+1).join(\",\")+\":\"+l;n.has(p)||(n.add(p),o.push({order:c,bias:l,completed:g}))}const A=t.terminals.map((c,l)=\u003el).toSorted((c,l)=\u003et.terminals[c].exitPoint.x-t.terminals[l].exitPoint.x);for(const c of[0,1,-1])if(yield*s(A,c),r||(yield*s(A.toReversed(),c),r))return r;for(;o.length\u0026\u0026i\u003c256;){o.sort((g,h)=\u003eh.completed-g.completed);const{order:c,bias:l,completed:u}=o.shift();o.length\u003e256\u0026\u0026(o.length=256);for(let g=u-1;g\u003e=0;g--){const h=[...c],[d]=h.splice(u,1);if(h.splice(g,0,d),yield*s(h,l),r)return r;const p=[...c];if([p[u],p[g]]=[p[g],p[u]],yield*s(p,l),r)return r}}return null}function*tRt(t){const{bus:e,srj:n,sourceBoundary:o,sourceEscapes:i,remoteConnectionIndices:r,bottomRemoteConnectionIndices:s,lowerConnectionIndices:a,targetLayer:A,traceWidth:c,clearance:l}=t;if(e.exitEdge!==\"left\"||e.termination.type!==\"boundary\"||a.length!==3)return null;const u=Math.min(e.pitchX,e.pitchY),g=c+l,h=new Map(i.map(pe=\u003e[pe.connectionIndex,pe])),d=e.connections.map(pe=\u003e({connection:pe,viaPoint:h.get(pe.connectionIndex).via.center,exitPoint:{x:e.sharedBoundary.minX,y:(pe.exitTargetPoint??pe.targetPoint).y}})).sort((pe,ye)=\u003epe.exitPoint.y-ye.exitPoint.y),p=new Map(d.map(pe=\u003e[pe.connection.connectionIndex,pe])),m=a.map(pe=\u003ep.get(pe)),_=new Set(a),f=d.filter(pe=\u003e!_.has(pe.connection.connectionIndex)\u0026\u0026!r.has(pe.connection.connectionIndex));if(f.length\u003c2||m.some(pe=\u003e!pe))return null;const I=new Map(i.map(pe=\u003e[pe.connectionIndex,[pe.segments[0].start,...pe.segments.map(ye=\u003eye.end)]])),C=(pe,ye)=\u003ei4({...t,bus:e,terminal:pe,targetLayerPoints:ye,sourceEscapePoints:I.get(pe.connection.connectionIndex),allowBlindAndBuriedVias:!1}),y=Math.min(o.minY-t.viaDiameter/2-c/2-l-1e-5,...m.map((pe,ye)=\u003epe.exitPoint.y+(m.length-1-ye)*g-g-c)),x=(pe,ye,Me)=\u003e{const ve=(Me?f:m).findIndex(Te=\u003eTe.connection.connectionIndex===pe.connection.connectionIndex),he=ye.at(-1),Qe=Me?o.maxY+u-g/2+ve*g:y-(m.length-1-ve)*g,Pe=o.minX-t.viaDiameter/2-c/2-l-1e-5-(Me?ve:m.length-1-ve)*g,we=Iue([he,{x:he.x,y:Qe},{x:Pe,y:Qe},{x:Pe,y:pe.exitPoint.y},pe.exitPoint],c);return C(pe,[...ye,...we.slice(1)])},E=d.filter(pe=\u003er.has(pe.connection.connectionIndex)).map(pe=\u003es.has(pe.connection.connectionIndex)?x(pe,[pe.viaPoint],!1):C(pe,[pe.viaPoint,pe.exitPoint]));let B=!!t.rematchPendingSources;const S=(pe,ye,Me,ve,he=!1)=\u003e{const Qe=new Set(pe.map(we=\u003ewe.connection.connectionIndex)),Pe={...e,connections:pe.map(we=\u003ewe.connection),exitEdge:Me?\"top\":\"bottom\",direction:Me?\"up\":\"down\",preferredExit:void 0,sharedBoundary:he?e.sharedBoundary:{...e.sharedBoundary,maxY:o.maxY,...Me?{}:{minY:o.minY}}};return{...t,bus:Pe,terminals:pe.map((we,Te)=\u003e({...we,exitPoint:ve[Te]})),acceptedPlans:ye,reservedVias:i.filter(we=\u003e!Qe.has(we.connectionIndex)\u0026\u0026(!B||!t.rematchPendingSources?.connectionIndices.has(we.connectionIndex))).map(we=\u003e({connectionName:we.connectionName,via:we.via})),sourceEscapePaths:I,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,gridStepDivisor:2,gridStep:g/2,alignGridToPads:!0,reserveTerminalExitPoints:!0}},Q=m[0],w=m.at(-1),M=f[0],k=w.connection.sourcePoint,R=k.x+u,F=[{x:M.connection.sourcePoint.x,y:M.connection.sourcePoint.y-u},{x:k.x-u,y:k.y},{x:R,y:k.y}];let O=[Q.viaPoint];for(const pe of F){const ye={...Q,viaPoint:O.at(-1)},Me=S([ye],E,!0,[pe],!0);Me.bus={...Me.bus,exitEdge:\"right\",direction:\"right\"},Me.sourceEscapePaths=void 0;const ve=yield*ZPe(Me);if(!ve)return null;O.push(...ve[0].segments.filter(he=\u003ehe.layer===A).map(he=\u003ehe.end))}O=Iue([...O,{x:R,y:o.minY}],c);const U=x(Q,O,!1),W={x:i.find(pe=\u003es.has(pe.connectionIndex)).via.center.x-u,y:o.minY};B=!1;const te=yield*ZPe(S([w],[...E,U],!1,[W]));if(!te)return null;const j=te[0].segments.filter(pe=\u003epe.layer===A),J=x(w,[j[0].start,...j.map(pe=\u003epe.end)],!1);if(t.rematchPendingSources){if(!t.rematchPendingSources.afterLowerStage([...E,U,J]))return null;for(const pe of i)I.set(pe.connectionIndex,[pe.segments[0].start,...pe.segments.map(ye=\u003eye.end)])}const oe=Math.min(...e.componentObstacles.map(pe=\u003epe.center.x-pe.width/2)),ie=oe+t.viaDiameter/2,ne=Math.max(...f.map(pe=\u003epe.connection.sourcePoint.x))-u/2-c/2;if(ne-ie\u003c(f.length-1)*g)return null;const le=f.map((pe,ye)=\u003e({x:ie+(ne-ie)*ye/(f.length-1),y:o.maxY})),ge=yield*ZPe(S(f,[...E,U,J],!0,le));if(!ge)return null;const _e=ge.map(pe=\u003e{const ye=pe.segments.filter(ve=\u003eve.layer===A),Me=ye.at(-1);return Me.end.y\u003c=Me.start.y?null:x(p.get(pe.connectionIndex),[ye[0].start,...ye.map(ve=\u003eve.end)],!0)});if(_e.some(pe=\u003e!pe))return null;const ue=[...E,U,J,..._e];if(ue.length!==e.connections.length)return null;const fe=ue.map(pe=\u003epe.length);if(e.maxLengthSkew!==void 0\u0026\u0026Math.max(...fe)-Math.min(...fe)\u003ee.maxLengthSkew+eMe||!Wh({plans:ue,srj:n,sharedBoundary:e.sharedBoundary,clearance:l,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;for(const pe of ue)for(const ye of i)if(pe.connectionIndex!==ye.connectionIndex)for(const Me of pe.segments){if(ye.via.spanLayers.includes(Me.layer)\u0026\u0026Cr(ye.via.center,Me.start,Me.end)\u003cye.via.diameter/2+Me.width/2+l-eMe)return null;for(const ve of ye.segments)if(Me.layer===ve.layer\u0026\u0026tu(Me.start,Me.end,ve.start,ve.end)\u003c(Me.width+ve.width)/2+l-eMe)return null}return ue}var eMe=1e-7,SB=1e-7;function nRt(t,e){const n=new Map(t.buses.flatMap(i=\u003ei.connections).map(i=\u003e[i.connectionIndex,i])),o=t.bus.sharedBoundary;for(const i of e){const r=n.get(i.connectionIndex),s=i.via.diameter/2;for(const a of t.srj.obstacles)if(a.layers.some(A=\u003ei.via.spanLayers.includes(A))\u0026\u0026wx(i.via.center,a)\u003cs+t.clearance-SB||a!==r.sourceObstacle\u0026\u0026i.segments.some(A=\u003ea.layers.includes(A.layer)\u0026\u0026Tl(A,a)\u003cA.width/2+t.clearance-SB))return!1;for(const a of i.segments)if([a.start,a.end].some(A=\u003eA.x\u003co.minX-SB||A.x\u003eo.maxX+SB||A.y\u003co.minY-SB||A.y\u003eo.maxY+SB))return!1;for(const a of e)if(i.connectionIndex!==a.connectionIndex\u0026\u0026(tn(i.via.center,a.via.center)\u003cs+a.via.diameter/2+t.clearance-SB||i.segments.some(A=\u003ea.via.spanLayers.includes(A.layer)\u0026\u0026Cr(a.via.center,A.start,A.end)\u003ca.via.diameter/2+A.width/2+t.clearance-SB)||i.segments.some(A=\u003ea.segments.some(c=\u003e!Zm(A,c,t.clearance)))))return!1}return!0}function*rvo(t){const{bus:e,traceWidth:n,clearance:o,viaDiameter:i}=t;if(e.exitEdge!==\"left\"||e.termination.type!==\"boundary\"||t.bottomRemoteConnectionIndices.size!==1)return null;const r=[...t.bottomRemoteConnectionIndices][0],s=t.sourceEscapes.find(d=\u003ed.connectionIndex===r),a=s?.segments.at(-1);if(!a||Math.abs(a.start.x-a.end.x)\u003eSB||a.start.y\u003c=a.end.y)return null;const A=Math.min(e.pitchX,e.pitchY);if(!Number.isFinite(A)||A\u003c=0)return null;const c=n+o,l=e.yCoordinates.slice(1).map((d,p)=\u003e(d+e.yCoordinates[p])/2).filter(d=\u003ed\u003ea.end.y+SB\u0026\u0026d\u003ca.start.y-SB).sort((d,p)=\u003ed-p).slice(0,4),u=new Set([...e.connections.map(d=\u003ed.connectionIndex),...t.sourceEscapes.filter(d=\u003ed.segments.length\u003e1).map(d=\u003ed.connectionIndex)]),g=t.buses.map(d=\u003e({...d,connections:d.connections.filter(p=\u003e!u.has(p.connectionIndex))})).filter(d=\u003ed.connections.length),h=new Set(g.flatMap(d=\u003ed.connections).map(d=\u003ed.connectionIndex));for(const d of l){yield{phase:\"route-connection\",routeOrderAttempt:0,connectionIndex:0,connectionCount:e.connections.length,connectionName:s.connectionName,searchBatch:0,expandedStateCount:0,connectionComplete:!1};const p=t.sourceEscapes.map(x=\u003e({...x,segments:x.segments.map(E=\u003e({...E,start:{...E.start},end:{...E.end}})),via:{...x.via,center:{...x.via.center}}})),m=new Map(t.viaPointsByConnectionIndex),_=p.find(x=\u003ex.connectionIndex===r);_.via.center={x:a.end.x,y:d},_.segments.at(-1).end=_.via.center,m.set(r,_.via.center);const f=p.filter(x=\u003eu.has(x.connectionIndex)),I=(x=[])=\u003e{const E=pd(g,{...t,additionalObstacles:t.srj.obstacles,maximumSearchStates:3e5,preferredViaPointsByConnectionIndex:m,blockingSegments:[...f.flatMap(B=\u003eB.segments.map(S=\u003e({connectionIndex:B.connectionIndex,segment:S}))),...x.flatMap(B=\u003eB.segments.filter(S=\u003eS.layer===t.targetLayer).map(S=\u003e({connectionIndex:B.connectionIndex,segment:S})))],blockingVias:f.map(B=\u003e({connectionIndex:B.connectionIndex,...B.via}))});if(!E)return!1;for(const B of p)if(h.has(B.connectionIndex)){const S=E.get(B.connectionIndex);B.via={...B.via,center:S},B.segments=[{...B.segments[0],end:S}],m.set(B.connectionIndex,S)}return nRt(t,p)};if(!I())continue;const C={...t.sourceBoundary,minY:d-A+i/2+n/2+o+1e-5+c},y=yield*tRt({...t,sourceEscapes:p,sourceBoundary:C,viaPointsByConnectionIndex:m,rematchPendingSources:{connectionIndices:h,afterLowerStage:I}});if(y\u0026\u0026nRt(t,p))return{plans:y,sourceEscapes:p,sourceBoundary:{...t.sourceBoundary},viaPointsByConnectionIndex:m,remoteConnectionIndices:new Set(t.remoteConnectionIndices),bottomRemoteConnectionIndices:new Set(t.bottomRemoteConnectionIndices),lowerConnectionIndices:[...t.lowerConnectionIndices]}}return null}function r6(t){return t===\"left\"||t===\"right\"}function Cue(t){return t===\"right\"||t===\"up\"?1:-1}function SC(t,e){return r6(e)?t.x:t.y}function s6(t,e){return r6(e)?t.y:t.x}function Dx(t,e,n){return r6(n)?{x:t,y:e}:{x:e,y:t}}function yue(t){switch(t.direction){case\"right\":return t.sharedBoundary.maxX;case\"left\":return t.sharedBoundary.minX;case\"up\":return t.sharedBoundary.maxY;case\"down\":return t.sharedBoundary.minY}}function xue(t){if(t.length\u003c3)return t;const e=[t[0]];for(let n=1;n\u003ct.length-1;n++){const o=e.at(-1),i=t[n],r=t[n+1],s={x:Math.sign(i.x-o.x),y:Math.sign(i.y-o.y)},a={x:Math.sign(r.x-i.x),y:Math.sign(r.y-i.y)};(s.x!==a.x||s.y!==a.y)\u0026\u0026e.push(i)}return e.push(t.at(-1)),e}function c$(t,e){const n=[];for(let o=1;o\u003ct.length;o++)tn(t[o-1],t[o])\u003c1e-9||n.push({start:t[o-1],end:t[o],width:e,layer:\"top\"});return n}function svo(t){const{srj:e,bus:n,connection:o,traceWidth:i,clearance:r}=t,s=n.direction,a=Cue(s),A={x:o.sourcePoint.x,y:o.sourcePoint.y},c=SC(A,s),l=s6(A,s),u=i/2+r,g=(()=\u003e{switch(s){case\"right\":return n.componentBounds.maxX+u;case\"left\":return n.componentBounds.minX-u;case\"up\":return n.componentBounds.maxY+u;case\"down\":return n.componentBounds.minY-u}})(),h=y=\u003eMath.min(...e.obstacles.filter(x=\u003ex!==o.sourceObstacle\u0026\u0026x.layers.includes(\"top\")).map(x=\u003eTl(y,x))),d={start:A,end:Dx(g,l,s)};if(h(d)\u003e=u-1e-9)return null;const p=r6(s)?{minimum:n.componentBounds.minY,maximum:n.componentBounds.maxY}:{minimum:n.componentBounds.minX,maximum:n.componentBounds.maxX},m=a*(g-c),_=s6(o.exitTargetPoint??o.targetPoint,s),f=i+r,I=yue(n),C=[-1,1].map(y=\u003e{const x=y\u003c0?p.minimum-u:p.maximum+u,E=y*(x-l),B=Math.max(m,E),S=Dx(c+a*B,l+y*B,s);if(a*(I-SC(S,s))\u003cf-1e-9)return null;const Q=[A,S];if(!Q.every(k=\u003ek.x\u003e=n.sharedBoundary.minX-1e-9\u0026\u0026k.x\u003c=n.sharedBoundary.maxX+1e-9\u0026\u0026k.y\u003e=n.sharedBoundary.minY-1e-9\u0026\u0026k.y\u003c=n.sharedBoundary.maxY+1e-9))return null;const M=Math.min(...c$(Q,i).map(h));return M\u003cu-1e-9?null:{points:Q,obstacleDistance:M,targetDistance:Math.abs(s6(S,s)-_)}}).filter(y=\u003ey!==null).toSorted((y,x)=\u003ex.obstacleDistance-y.obstacleDistance||y.targetDistance-x.targetDistance);return C.length\u003e0?C.map(y=\u003ey.points):null}function avo(t){const{item:e,srj:n,acceptedSegments:o,traceWidth:i,clearance:r}=t,s=e.cornerChannelPrefixes;if(!s)return null;const a=e.direction,A=Cue(a),c=yue(e.bus),l=i+r,u=i/2+r,g=r6(a)?e.bus.sharedBoundary.minY:e.bus.sharedBoundary.minX,h=r6(a)?e.bus.sharedBoundary.maxY:e.bus.sharedBoundary.maxX,d=g+i/2,p=h-i/2,m=s6(e.connection.exitTargetPoint??e.connection.targetPoint,a),_=l/2,f=new Set([Math.max(d,Math.min(p,m))]);for(let C=Math.ceil(d/_)*_;C\u003c=p+1e-9;C+=_)f.add(Number(C.toFixed(9)));const I=[...f].toSorted((C,y)=\u003eMath.abs(C-m)-Math.abs(y-m));for(const C of s){const y=C.at(-1),x=s6(y,a);for(const E of I){const B=Math.abs(E-x),S=Dx(SC(y,a)+A*l,x,a),Q=Dx(SC(S,a)+A*B,E,a);if(A*(c-SC(Q,a))\u003c-1e-9)continue;const w=Dx(c,E,a),M=[...C,S,...B\u003e1e-9?[Q]:[]];tn(M.at(-1),w)\u003e1e-9\u0026\u0026M.push(w);const k=xue(M),R=c$(k,i);if(!(!R.every(U=\u003en.obstacles.every(Y=\u003eY===e.connection.sourceObstacle||!Y.layers.includes(\"top\")||Tl(U,Y)\u003e=u-1e-9))||!R.every(U=\u003eo.every(Y=\u003etu(U.start,U.end,Y.start,Y.end)\u003e=i+r-1e-9))))return{item:e,points:k,track:E}}}return null}function Avo(t){const{route:e,direction:n,exitAxis:o,signedShift:i,maximumShift:r,obstacles:s,requiredObstacleDistance:a}=t;if(r\u003c=1e-9||Math.abs(i)\u003c=1e-9)return 0;const A=Math.sign(i),c=g=\u003e{if(g\u003c=1e-9)return!0;const h={start:Dx(o-Cue(n)*g,e.track,n),end:Dx(o,e.track+A*g,n)};return s.every(d=\u003ed===e.item.connection.sourceObstacle||!d.layers.includes(\"top\")||Tl(h,d)\u003e=a-1e-9)};if(c(r))return r;let l=0,u=r;for(let g=0;g\u003c32;g++){const h=(l+u)/2;c(h)?l=h:u=h}return l}function cvo(t){const{requestedTracks:e,currentTracks:n,candidateTracks:o,maximumShifts:i}=t,r=e.length+1,s=o.length+1,a=Array.from({length:r},()=\u003enew Float64Array(s).fill(Number.POSITIVE_INFINITY)),A=Array.from({length:r},()=\u003enew Uint8Array(s));a[0].fill(0);for(let g=1;g\u003cr;g++)for(let h=1;h\u003cs;h++){const d=a[g][h-1],p=Math.abs(e[g-1]-o[h-1]),_=Math.abs(n[g-1]-o[h-1])\u003ei[g-1]+1e-9?Number.POSITIVE_INFINITY:a[g-1][h-1]+p;_\u003cd?(a[g][h]=_,A[g][h]=1):a[g][h]=d}if(!Number.isFinite(a.at(-1).at(-1)))return null;const c=[];let l=e.length,u=o.length;for(;l\u003e0\u0026\u0026u\u003e0;)A[l][u]\u0026\u0026(c.push(o[u-1]),l--),u--;return l\u003e0?null:c.reverse()}function lvo(t){const{direction:e,activeRoutes:n,obstacles:o,boundaryMinimum:i,boundaryMaximum:r,traceWidth:s,clearance:a,requestedTracks:A,maximumShifts:c}=t,l=s+a,u=s/2+a;let g=null,h=Number.POSITIVE_INFINITY;for(const d of Array.from({length:Math.round(l/s)},(p,m)=\u003em*s)){const p=[],m=Math.ceil((i-d)/l)*l+d;for(let I=m;I\u003c=r+1e-9;I+=l){const C=Math.round(I/s)*s;o.every(y=\u003e{const x=s6(y.center,e),E=r6(e)?y.height:y.width;return Math.abs(C-x)\u003e=E/2+u-1e-9})\u0026\u0026p.push(C)}const _=cvo({requestedTracks:A,currentTracks:n.map(I=\u003eI.track),candidateTracks:p,maximumShifts:c});if(!_)continue;const f=_.reduce((I,C,y)=\u003eI+Math.abs(C-A[y]),0);f\u003ch\u0026\u0026(h=f,g=_)}return g}function uvo(t,e){switch(e){case\"up\":return t===\"top-left\"?\"minimum\":t===\"top-right\"?\"maximum\":null;case\"down\":return t===\"bottom-left\"?\"minimum\":t===\"bottom-right\"?\"maximum\":null;case\"left\":return t===\"bottom-left\"?\"minimum\":t===\"top-left\"?\"maximum\":null;case\"right\":return t===\"bottom-right\"?\"minimum\":t===\"top-right\"?\"maximum\":null}}function gvo(t){const{items:e,direction:n,boundaryMinimum:o,boundaryMaximum:i,traceWidth:r,clearance:s,borderDistribution:a,currentTrackByConnectionName:A}=t,c=E=\u003eA.get(E.connection.connection.name)??s6(E.source,n),l=[...e].toSorted((E,B)=\u003ec(E)-c(B)||E.connection.connection.name.localeCompare(B.connection.connection.name)),u=r+s,g=o+r/2,h=i-r/2,d=h-g,p=u*Math.max(l.length-1,0);if(d\u003cp-1e-9)return null;const m=l.map(c);let _=[...m],f=u;const I=new Set;if(a===\"even\"\u0026\u0026l.length\u003e1){const E=m[0],B=m.at(-1),S=Math.max(u,(B-E)/(l.length-1)),Q=M=\u003e{const k=[...m],R=Math.floor(l.length/2),F=l.length%2===0?R-1:R;if(F!==R){const O=k[R]-k[F];if(O\u003cM){const U=(M-O)/2;k[F]=k[F]-U,k[R]=k[R]+U}}for(let O=F-1;O\u003e=0;O--)k[O]=Math.min(k[O],k[O+1]-M);for(let O=R+1;O\u003ck.length;O++)k[O]=Math.max(k[O],k[O-1]+M);return k},w=M=\u003eM[0]\u003e=g-1e-9\u0026\u0026M.at(-1)\u003c=h+1e-9;if(_=Q(S),w(_))f=S;else{let M=u,k=S;if(_=Q(M),!w(_))return null;for(let R=0;R\u003c32;R++){const F=(M+k)/2,O=Q(F);w(O)?(M=F,_=O):k=F}f=M}for(const M of l)I.add(M.connection.connection.name)}const C=[],y=[];for(let E=0;E\u003cl.length;E++){const B=l[E],S=B.bus.preferredExit;if(!S?.includes(\"-\"))continue;const Q=uvo(S,n);if(!Q)return null;I.add(B.connection.connection.name),Q===\"minimum\"?C.push(E):y.push(E)}if(C.some((E,B)=\u003eE!==B)||y.some((E,B)=\u003eE!==l.length-y.length+B))return null;const x=u*2;if(C.length\u003e0){_[0]=g+x;for(let E=1;E\u003cC.length;E++){const B=Math.max(f,m[E]-m[E-1]);_[E]=_[E-1]+B}}if(y.length\u003e0){const E=l.length-1;_[E]=h-x;for(let B=E-1;B\u003e=l.length-y.length;B--){const S=Math.max(f,m[B+1]-m[B]);_[B]=_[B+1]-S}}return{byConnectionName:new Map(l.map((E,B)=\u003e[E.connection.connection.name,_[B]])),enforcedConnectionNames:I}}function dvo(t){const{item:e,points:n,segments:o}=t,i=n.map((s,a)=\u003e({route_type:\"wire\",x:s.x,y:s.y,width:o[0]?.width??.1,layer:\"top\",...a===0\u0026\u0026e.connection.sourcePoint.pcb_port_id?{start_pcb_port_id:e.connection.sourcePoint.pcb_port_id}:{}})),r=qN({connectionName:e.connection.connection.name,sourcePointIndex:e.connection.sourcePointIndex});return{busId:e.bus.busId,connectionName:e.connection.connection.name,connectionIndex:e.connection.connectionIndex,sourcePointIndex:e.connection.sourcePointIndex,sourcePoint:e.connection.sourcePoint,sourceObstacle:e.connection.sourceObstacle,sourceLayer:e.connection.sourceLayer,targetPoint:e.connection.targetPoint,targetLayer:\"top\",termination:e.bus.termination,direction:e.direction,...e.bus.exitEdge?{exitEdge:e.bus.exitEdge}:{},exitPoint:n.at(-1),trace:{type:\"pcb_trace\",pcb_trace_id:r.traceId,connection_name:e.connection.connection.name,connectsTo:[...e.connection.sourcePoint.pointId?[e.connection.sourcePoint.pointId]:[],...e.connection.sourcePoint.pcb_port_id?[e.connection.sourcePoint.pcb_port_id]:[],r.boundaryExitPointId],route:i},segments:o,length:o.reduce((s,a)=\u003es+tn(a.start,a.end),0)}}function hvo(t){const{paths:e,obstacles:n,traceWidth:o,clearance:i}=t,r=o/2+i,s=o+i;for(const a of e){if(Math.abs(SC(a.points.at(-1),a.item.direction)-yue(a.item.bus))\u003e1e-6)return!1;for(const A of a.segments)for(const c of n)if(!(c===a.item.connection.sourceObstacle||!c.layers.includes(\"top\"))\u0026\u0026Tl(A,c)\u003cr-1e-9)return!1}for(let a=0;a\u003ce.length;a++)for(let A=a+1;A\u003ce.length;A++)for(const c of e[a].segments)for(const l of e[A].segments)if(tu(c.start,c.end,l.start,l.end)\u003cs-1e-9)return!1;return!0}function pvo(t){const{srj:e,buses:n,traceWidth:o,clearance:i,borderDistribution:r}=t,s=o/2+i,a=new Map,A=new Map,c=n.flatMap(h=\u003eh.connections.map(d=\u003e{const p={x:d.sourcePoint.x,y:d.sourcePoint.y},m=svo({srj:e,bus:h,connection:d,traceWidth:o,clearance:i});return{bus:h,connection:d,direction:h.direction,source:p,...m?{cornerChannelPrefixes:m}:{}}}));for(const h of[\"left\",\"right\",\"up\",\"down\"]){const d=Cue(h),p=c.filter(R=\u003eR.direction===h\u0026\u0026!R.cornerChannelPrefixes);if(p.length===0)continue;const m=r6(h)?p[0].bus.sharedBoundary.minY:p[0].bus.sharedBoundary.minX,_=r6(h)?p[0].bus.sharedBoundary.maxY:p[0].bus.sharedBoundary.maxX,f=yue(p[0].bus),I=new Map,C=new Map,y=new Map;for(const R of p){const F=SC(R.source,h),O=F.toFixed(6);y.set(O,F);const U=I.get(O)??[];U.push(R),I.set(O,U)}for(const[R,F]of I){const O=y.get(R),U=new Set(F.map(Y=\u003eY.bus.componentId));C.set(R,e.obstacles.filter(Y=\u003eY.layers.includes(\"top\")\u0026\u0026!!Y.componentId\u0026\u0026U.has(Y.componentId)\u0026\u0026Math.abs(SC(Y.center,h)-O)\u003c1e-6))}const x=[...y.values()].toSorted((R,F)=\u003ed*(R-F)),E=new Map;for(let R=0;R\u003cx.length;R++){const F=x[R],O=F.toFixed(6);for(const J of I.get(O)??[]){const oe=r6(h)?J.connection.sourceObstacle.width:J.connection.sourceObstacle.height,ie=Math.max(J.connection.sourceObstacle.width,J.connection.sourceObstacle.height)\u003c1.5?oe/2+s:0,ne=Dx(F+d*ie,s6(J.source,h),h);E.set(J.connection.connection.name,{item:J,points:tn(J.source,ne)\u003e1e-9?[J.source,ne]:[J.source],track:s6(J.source,h)})}const U=x[R+1]??f;if(E.size===0||d*(U-F)\u003c=1e-9)continue;const Y=[...E.values()].toSorted((J,oe)=\u003eJ.track-oe.track||J.item.connection.connection.name.localeCompare(oe.item.connection.connection.name)),W=x.slice(R+1,R+3).flatMap(J=\u003eC.get(J.toFixed(6))??[]),te=Y.map(J=\u003eMath.abs(U-SC(J.points.at(-1),h))),j=lvo({direction:h,activeRoutes:Y,obstacles:W,boundaryMinimum:m,boundaryMaximum:_,traceWidth:o,clearance:i,requestedTracks:Y.map(J=\u003eJ.track),maximumShifts:te});if(!j)return null;for(let J=0;J\u003cY.length;J++){const oe=Y[J],ie=j[J],ne=Math.abs(ie-oe.track),le=SC(oe.points.at(-1),h),ge=Dx(le+d*ne,ie,h);tn(oe.points.at(-1),ge)\u003e1e-9\u0026\u0026oe.points.push(ge);const _e=Dx(U,ie,h);tn(oe.points.at(-1),_e)\u003e1e-9\u0026\u0026oe.points.push(_e),oe.track=ie}}const B=gvo({items:p,direction:h,boundaryMinimum:m,boundaryMaximum:_,traceWidth:o,clearance:i,borderDistribution:r,currentTrackByConnectionName:new Map([...E.values()].map(R=\u003e[R.item.connection.connection.name,R.track]))});if(!B)return null;const S=[...E.values()].toSorted((R,F)=\u003eR.track-F.track||R.item.connection.connection.name.localeCompare(F.item.connection.connection.name)),Q=new Map,w=o+i;let M=w;for(const R of S){const F=R.item.connection.connection.name;!B.enforcedConnectionNames.has(F)||B.byConnectionName.get(F)-R.track\u003e=-1e-9||(Q.set(F,M),M+=w*2)}let k=w;for(let R=S.length-1;R\u003e=0;R--){const F=S[R],O=F.item.connection.connection.name;!B.enforcedConnectionNames.has(O)||B.byConnectionName.get(O)-F.track\u003c=1e-9||(Q.set(O,k),k+=w*2)}for(const R of S){const F=R.item.connection.connection.name,O=B.byConnectionName.get(F)??R.track,U=Q.get(F)??0,Y=R.points.at(-2),W=Y?d*(f-SC(Y,h)):0,te=O-R.track,j=Math.min(Math.abs(te),Math.max(0,W-U)),J=Avo({route:R,direction:h,exitAxis:f,signedShift:te,maximumShift:j,obstacles:e.obstacles,requiredObstacleDistance:s}),oe=Math.sign(te)*J;B.byConnectionName.set(F,R.track+oe)}for(const R of B.enforcedConnectionNames)A.set(R,B.byConnectionName.get(R));for(const R of S){const F=R.item.connection.connection.name,O=B.byConnectionName.get(F)??R.track,U=Math.abs(O-R.track),Y=Q.get(F)??0,W=U\u003e1e-9?Y+U:0,te=f-d*W,j=R.points.at(-1);if(Math.abs(SC(j,h)-f)\u003e1e-6)return null;const J=R.points.at(-2);if(J\u0026\u0026(Math.abs(s6(J,h)-R.track)\u003e1e-6||d*(te-SC(J,h))\u003c-1e-6))return null;const oe=Dx(te,R.track,h);J\u0026\u0026tn(J,oe)\u003c1e-9?R.points.pop():R.points[R.points.length-1]=oe}for(const R of S){const F=R.item.connection.connection.name,O=B.byConnectionName.get(F)??R.track,U=Math.abs(O-R.track),Y=Q.get(F)??0;U\u003e1e-9\u0026\u0026Y\u003e1e-9\u0026\u0026R.points.push(Dx(SC(R.points.at(-1),h)+d*Y,R.track,h)),U\u003e1e-9\u0026\u0026(R.points.push(Dx(SC(R.points.at(-1),h)+d*U,O,h)),R.track=O);const W=Dx(f,R.track,h);if(tn(R.points.at(-1),W)\u003e1e-9){if(d*(f-SC(R.points.at(-1),h))\u003c-1e-6)return null;R.points.push(W)}a.set(F,R)}}const l=[...a.values()].flatMap(h=\u003ec$(xue(h.points),o));for(const h of c){if(!h.cornerChannelPrefixes)continue;const d=avo({item:h,srj:e,acceptedSegments:l,traceWidth:o,clearance:i});if(!d)return null;a.set(h.connection.connection.name,d),l.push(...c$(xue(d.points),o))}if(a.size!==c.length)return null;const u=(o+i)/2+1e-6;for(const[h,d]of A){const p=a.get(h);if(!p||Math.abs(p.track-d)\u003eu)return null}const g=c.map(h=\u003e{const d=a.get(h.connection.connection.name),p=xue(d.points);return{item:h,points:p,segments:c$(p,o)}});return hvo({paths:g,obstacles:e.obstacles,traceWidth:o,clearance:i})?g.map(dvo):null}var mvo=t=\u003et.process??{env:{}};function _vo(t){const{bus:e}=t;let n=[...t.plans];if(e.maxLengthSkew===void 0)return n;const o=n.filter(i=\u003ei.busId===e.busId).toSorted((i,r)=\u003er.length-i.length);for(const i of o){const r=Math.min(...n.filter(a=\u003ea.busId===e.busId).map(a=\u003ea.length));if(i.length-r\u003c=e.maxLengthSkew||!i.via||i.additionalVias?.length||i.planeEndpointVia||i.segments.filter(a=\u003ea.layer===i.sourceLayer).length!==1)continue;const s=e.connections.find(a=\u003ea.connectionIndex===i.connectionIndex);for(const a of[!0,!1]){const A=rNt({...t,bus:{...e,connections:[s],routableEscapeLayers:[i.targetLayer]},terminals:[{connection:s,viaPoint:i.via.center,exitPoint:i.exitPoint}],targetLayer:i.targetLayer,acceptedPlans:n.filter(l=\u003el!==i),allowBlindAndBuriedVias:!1,gridStepDivisor:2,alignGridToPads:a,maximumRouteOrderAttempts:1})?.[0];if(!A||A.length\u003e=i.length-1e-6)continue;const c=n.map(l=\u003el===i?A:l);if(Wh({...t,plans:c,allowBlindAndBuriedVias:!1})){n=c;break}}}return n}var p0=1e-6;function aI(t,e){return tn(t,e)\u003c=p0}function oRt(t){return\"layer\"in t?[t.layer]:t.layers}function cR(t){return[...t.segments,...t.planeEndpointSegments??[]]}function lR(t){return[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(e=\u003e!!e)}function iRt(t,e){return aI(t,e)\u0026\u0026oRt(t).join(\"\\0\")===oRt(e).join(\"\\0\")\u0026\u0026t.pointId===e.pointId\u0026\u0026t.pcb_port_id===e.pcb_port_id}function rRt(t,e){const n=t.x\u003e=e.minX-p0\u0026\u0026t.x\u003c=e.maxX+p0\u0026\u0026t.y\u003e=e.minY-p0\u0026\u0026t.y\u003c=e.maxY+p0,o=Math.abs(t.x-e.minX)\u003c=p0||Math.abs(t.x-e.maxX)\u003c=p0||Math.abs(t.y-e.minY)\u003c=p0||Math.abs(t.y-e.maxY)\u003c=p0;return n\u0026\u0026o}function fvo(t,e,n){if(!(t.x\u003e=n.minX-p0\u0026\u0026t.x\u003c=n.maxX+p0\u0026\u0026t.y\u003e=n.minY-p0\u0026\u0026t.y\u003c=n.maxY+p0))return!1;switch(e){case\"left\":return Math.abs(t.x-n.minX)\u003c=p0;case\"right\":return Math.abs(t.x-n.maxX)\u003c=p0;case\"top\":return Math.abs(t.y-n.maxY)\u003c=p0;case\"bottom\":return Math.abs(t.y-n.minY)\u003c=p0}}function sRt(t,e){return t.x\u003e=e.minX-p0\u0026\u0026t.x\u003c=e.maxX+p0\u0026\u0026t.y\u003e=e.minY-p0\u0026\u0026t.y\u003c=e.maxY+p0}function Oa(t,e,n,o,i){t.push({code:e,message:n,...o?{connectionName:o.connectionName,busId:o.busId}:{},...i?{otherConnectionName:i}:{}})}function aRt(t){const{trace:e,plan:n,issues:o}=t,i=[];let r,s;for(const a of e.route){if(a.route_type===\"via\"){(!r||!aI(r,a)||r.layer!==a.from_layer)\u0026\u0026Oa(o,\"disconnected-trace\",`Trace ${e.pcb_trace_id} reaches a via without a matching ${a.from_layer} wire endpoint`,n),s=a;continue}if(a.route_type!==\"wire\"){Oa(o,\"unsupported-route-point\",`Trace ${e.pcb_trace_id} contains unsupported ${a.route_type} geometry`,n);continue}if(s){(!aI(a,s)||a.layer!==s.to_layer)\u0026\u0026Oa(o,\"disconnected-trace\",`Trace ${e.pcb_trace_id} does not continue from its via on ${s.to_layer}`,n),r=a,s=void 0;continue}r\u0026\u0026(r.layer!==a.layer?Oa(o,\"disconnected-trace\",`Trace ${e.pcb_trace_id} changes from ${r.layer} to ${a.layer} without a via`,n):aI(r,a)||i.push({start:{x:r.x,y:r.y},end:{x:a.x,y:a.y},width:a.width,layer:a.layer})),r=a}return s\u0026\u0026Oa(o,\"disconnected-trace\",`Trace ${e.pcb_trace_id} ends at a via without a wire on ${s.to_layer}`,n),i}function Ivo(t){const{plan:e,preparedBus:n,inputSrj:o,outputSrj:i,sharedBoundary:r,issues:s}=t,a=o.connections[e.connectionIndex];if(!a||a.name!==e.connectionName){Oa(s,\"connection-mismatch\",`Plan index ${e.connectionIndex} does not identify connection ${e.connectionName}`,e);return}const A=n?.connections.find(_=\u003e_.connectionIndex===e.connectionIndex);(!A||A.sourcePointIndex!==e.sourcePointIndex||!iRt(A.sourcePoint,e.sourcePoint)||A.sourceObstacle.obstacleId!==e.sourceObstacle.obstacleId)\u0026\u0026Oa(s,\"source-mismatch\",`Plan ${e.connectionName} does not start at its prepared component endpoint`,e),n?.termination.type!==e.termination.type\u0026\u0026Oa(s,\"termination-mismatch\",`Plan ${e.connectionName} does not use its bus termination`,e);const c=Ds(n?.exitEdge,n?.preferredExit);if(n?.exitEdge!==e.exitEdge||c!==e.cornerBandSide?Oa(s,\"output-exit-mismatch\",`Plan ${e.connectionName} does not retain its prepared boundary edge and band`,e):n?.exitEdge\u0026\u0026!fvo(e.exitPoint,n.exitEdge,r)\u0026\u0026Oa(s,\"output-exit-mismatch\",`Plan ${e.connectionName} does not terminate on its declared ${n.exitEdge} edge`,e),!(o.allowViaInPad===!0\u0026\u0026e.termination.type===\"plane\"\u0026\u0026e.via!==void 0\u0026\u0026aI(e.via.center,e.sourcePoint)\u0026\u0026aI(e.exitPoint,e.sourcePoint))\u0026\u0026(e.segments.length===0||e.length\u003c=p0))Oa(s,\"not-broken-out\",`Plan ${e.connectionName} has no non-zero escape geometry`,e);else{const _={minX:Math.min(o.bounds.minX,r.minX),maxX:Math.max(o.bounds.maxX,r.maxX),minY:Math.min(o.bounds.minY,r.minY),maxY:Math.max(o.bounds.maxY,r.maxY)};e.segments.some(f=\u003e!sRt(f.start,_)||!sRt(f.end,_))\u0026\u0026Oa(s,\"outside-routing-bounds\",`Plan ${e.connectionName} leaves the routable SRJ/shared-boundary area`,e),e.segments[0]\u0026\u0026!aI(e.segments[0].start,e.sourcePoint)\u0026\u0026Oa(s,\"disconnected-trace\",`Plan ${e.connectionName} does not start at its source pad`,e),e.segments.at(-1)\u0026\u0026!aI(e.segments.at(-1).end,e.exitPoint)\u0026\u0026Oa(s,\"disconnected-trace\",`Plan ${e.connectionName} does not end at its declared exit`,e);for(let f=1;f\u003ce.segments.length;f++){const I=e.segments[f-1],C=e.segments[f];aI(I.end,C.start)||Oa(s,\"disconnected-trace\",`Plan ${e.connectionName} has a gap between route segments`,e);const y=lR(e).find(x=\u003eaI(I.end,x.center)\u0026\u0026x.spanLayers.includes(I.layer)\u0026\u0026x.spanLayers.includes(C.layer));I.layer!==C.layer\u0026\u0026!y\u0026\u0026Oa(s,\"disconnected-trace\",`Plan ${e.connectionName} changes layers without a connecting via`,e)}}const u=[...e.segments,...e.planeEndpointSegments??[]].reduce((_,f)=\u003e_+tn(f.start,f.end),0);Math.abs(u-e.length)\u003e1e-6\u0026\u0026Oa(s,\"plan-length-mismatch\",`Plan ${e.connectionName} declares ${e.length.toFixed(6)}mm but contains ${u.toFixed(6)}mm of routed copper`,e);const g=aRt({trace:e.trace,plan:e,issues:s}),h=e.segments.filter(_=\u003etn(_.start,_.end)\u003ep0);if((g.length!==h.length||g.some((_,f)=\u003e{const I=h[f];return!I||_.layer!==I.layer||Math.abs(_.width-I.width)\u003ep0||!aI(_.start,I.start)||!aI(_.end,I.end)}))\u0026\u0026Oa(s,\"trace-plan-mismatch\",`Trace ${e.trace.pcb_trace_id} does not encode its declared route segments`,e),e.planeEndpointTrace||e.planeEndpointSegments||e.planeEndpointVia)if(!e.planeEndpointTrace||!e.planeEndpointSegments||!e.planeEndpointVia)Oa(s,\"trace-plan-mismatch\",`Plane endpoint geometry for ${e.connectionName} is incomplete`,e);else{const _=aRt({trace:e.planeEndpointTrace,plan:e,issues:s});(_.length!==e.planeEndpointSegments.length||_.some((f,I)=\u003e{const C=e.planeEndpointSegments?.[I];return!C||f.layer!==C.layer||Math.abs(f.width-C.width)\u003ep0||!aI(f.start,C.start)||!aI(f.end,C.end)})||tn(e.planeEndpointVia.center,e.targetPoint)\u003c=p0)\u0026\u0026Oa(s,\"trace-plan-mismatch\",`Trace ${e.planeEndpointTrace.pcb_trace_id} does not encode a valid offset plane-to-endpoint dogbone`,e)}const d=e.trace.route.find(_=\u003e\"x\"in _\u0026\u0026\"y\"in _),p=[...e.trace.route].reverse().find(_=\u003e\"x\"in _\u0026\u0026\"y\"in _);(!d||!p||!aI(d,e.sourcePoint)||!aI(p,e.exitPoint))\u0026\u0026Oa(s,\"disconnected-trace\",`Trace ${e.trace.pcb_trace_id} does not span its source and exit`,e);const m=i.connections.find(_=\u003e_.name===e.connectionName);if(e.termination.type===\"boundary\")if(!m)Oa(s,\"output-connection-missing\",`Boundary connection ${e.connectionName} was removed from the output`,e);else{const _=m.pointsToConnect[e.sourcePointIndex];(!_||!aI(_,e.exitPoint)||!(\"layer\"in _)||_.layer!==e.targetLayer)\u0026\u0026Oa(s,\"output-exit-mismatch\",`Output connection ${e.connectionName} is not attached to its fanout exit`,e);for(let f=0;f\u003ca.pointsToConnect.length;f++){if(f===e.sourcePointIndex)continue;const I=a.pointsToConnect[f],C=m.pointsToConnect[f];(!I||!C||!iRt(I,C))\u0026\u0026Oa(s,\"downstream-endpoint-lost\",`Output connection ${e.connectionName} did not retain downstream endpoint ${f}`,e)}}else m\u0026\u0026Oa(s,\"plane-connection-retained\",`Plane-terminated connection ${e.connectionName} remains in the output`,e)}function Cvo(t,e){const n=cR(t),o=cR(e),i=lR(t),r=lR(e);for(const s of n){for(const a of o)if(s.layer===a.layer\u0026\u0026tu(s.start,s.end,a.start,a.end)\u003c=(s.width+a.width)/2+p0)return!0;for(const a of r)if(a.spanLayers.includes(s.layer)\u0026\u0026Cr(a.center,s.start,s.end)\u003c=a.diameter/2+s.width/2+p0)return!0}for(const s of i){for(const a of o)if(s.spanLayers.includes(a.layer)\u0026\u0026Cr(s.center,a.start,a.end)\u003c=s.diameter/2+a.width/2+p0)return!0;for(const a of r)if(s.spanLayers.some(A=\u003ea.spanLayers.includes(A))\u0026\u0026tn(s.center,a.center)\u003c=(s.diameter+a.diameter)/2+p0)return!0}return!1}function yvo(t){const{plans:e,inputSrj:n,sharedBoundary:o,issues:i}=t,r=new Set,s=new Map;for(const A of e)s.set(A,[]);for(let A=0;A\u003ce.length;A++){const c=e[A];(c.termination.type===\"plane\"?c.via:c.segments.some(l=\u003erRt(l.start,o)||rRt(l.end,o)))\u0026\u0026r.add(c);for(let l=A+1;l\u003ce.length;l++){const u=e[l];!Px(n,c.connectionName,u.connectionName)||!Cvo(c,u)||(s.get(c).push(u),s.get(u).push(c))}}const a=[...r];for(;a.length\u003e0;){const A=a.shift();for(const c of s.get(A)??[])r.has(c)||(r.add(c),a.push(c))}for(const A of e)r.has(A)||Oa(i,\"not-broken-out\",A.termination.type===\"boundary\"?`Connection ${A.connectionName} has no continuous same-net copper path to the shared boundary`:`Plane connection ${A.connectionName} has no terminating via`,A);return r}function xvo(t){const{plans:e,inputSrj:n,clearance:o,allowBlindAndBuriedVias:i,issues:r}=t;for(const s of e){r$(s,o).some(A=\u003eA.kind!==\"clearance\")\u0026\u0026Oa(r,\"source-pad-reentry\",`Trace ${s.connectionName} returns into its source pad after leaving it`,s);const a=cR(s);for(let A=0;A\u003ca.length;A++){const c=a[A];for(const l of n.obstacles){if(!l.layers.includes(c.layer)||n4(n,l,s.connectionName)||A===0\u0026\u0026l.obstacleId===s.sourceObstacle.obstacleId\u0026\u0026c.layer===s.sourceLayer||jj({inputSrj:n,segment:c,bodyObstacle:l,connectionName:s.connectionName}))continue;const u=Tl(c,l),g=c.width/2+o;u\u003cg-1e-9\u0026\u0026Oa(r,\"obstacle-clearance\",`Trace ${s.connectionName} on ${c.layer} is ${u.toFixed(4)}mm from different-net obstacle ${l.obstacleId}; ${g.toFixed(4)}mm is required`,s)}}for(const A of lR(s))for(const c of n.obstacles){if(!c.layers.some(g=\u003eA.spanLayers.includes(g))||n4(n,c,s.connectionName))continue;const l=wx(A.center,c),u=A.diameter/2+o;l\u003cu-1e-9\u0026\u0026Oa(r,\"via-obstacle-clearance\",`Via ${s.connectionName} is ${l.toFixed(4)}mm from different-net obstacle ${c.obstacleId} on its layer span; ${u.toFixed(4)}mm is required`,s)}for(const A of Z7(n,i))if(!(s.connectionName===A.connectionName||Px(n,s.connectionName,A.connectionName))){for(const c of cR(s)){for(const l of A.segments)Zm(c,l,o)||Oa(r,\"different-net-trace-clearance\",`Trace ${s.connectionName} violates routed trace ${A.trace.pcb_trace_id} on ${c.layer}`,s,A.connectionName);for(const l of A.vias)l.spanLayers.includes(c.layer)\u0026\u0026Cr(l.center,c.start,c.end)\u003cl.diameter/2+c.width/2+o-1e-9\u0026\u0026Oa(r,\"different-net-trace-via-clearance\",`Trace ${s.connectionName} violates a via in routed trace ${A.trace.pcb_trace_id} on ${c.layer}`,s,A.connectionName)}for(const c of lR(s)){for(const l of A.segments)c.spanLayers.includes(l.layer)\u0026\u0026Cr(c.center,l.start,l.end)\u003cc.diameter/2+l.width/2+o-1e-9\u0026\u0026Oa(r,\"different-net-trace-via-clearance\",`Via ${s.connectionName} violates routed trace ${A.trace.pcb_trace_id} on ${l.layer}`,s,A.connectionName);for(const l of A.vias)c.spanLayers.some(u=\u003el.spanLayers.includes(u))\u0026\u0026tn(c.center,l.center)\u003c(c.diameter+l.diameter)/2+o-1e-9\u0026\u0026Oa(r,\"different-net-via-clearance\",`Via ${s.connectionName} violates a via in routed trace ${A.trace.pcb_trace_id}`,s,A.connectionName)}}}for(let s=0;s\u003ce.length;s++){const a=e[s];for(let A=s+1;A\u003ce.length;A++){const c=e[A];if(Px(n,a.connectionName,c.connectionName))continue;const l=cR(a),u=cR(c),g=lR(a),h=lR(c);for(const d of l){for(const p of u)Zm(d,p,o)||Oa(r,\"different-net-trace-clearance\",`Different-net traces ${a.connectionName} and ${c.connectionName} intersect or violate clearance on ${d.layer}`,a,c.connectionName);for(const p of h)p.spanLayers.includes(d.layer)\u0026\u0026Cr(p.center,d.start,d.end)\u003cp.diameter/2+d.width/2+o-1e-9\u0026\u0026Oa(r,\"different-net-trace-via-clearance\",`Trace ${a.connectionName} violates via clearance to ${c.connectionName} on ${d.layer}`,a,c.connectionName)}for(const d of g){for(const p of u)d.spanLayers.includes(p.layer)\u0026\u0026Cr(d.center,p.start,p.end)\u003cd.diameter/2+p.width/2+o-1e-9\u0026\u0026Oa(r,\"different-net-trace-via-clearance\",`Via ${a.connectionName} violates trace clearance to ${c.connectionName} on ${p.layer}`,a,c.connectionName);for(const p of h)d.spanLayers.some(m=\u003ep.spanLayers.includes(m))\u0026\u0026tn(d.center,p.center)\u003c(d.diameter+p.diameter)/2+o-1e-9\u0026\u0026Oa(r,\"different-net-via-clearance\",`Vias ${a.connectionName} and ${c.connectionName} violate clearance on an overlapping layer span`,a,c.connectionName)}}}}function Evo(t,e,n){const o=t.differentialPairs;if(o===void 0)return;if(!Array.isArray(o)){Oa(n,\"invalid-differential-pair\",\"Differential pairs must be an array\");return}const i=new Map;t.connections.forEach((r,s)=\u003e{const a=i.get(r.name)??[];a.push(s),i.set(r.name,a)}),o.forEach((r,s)=\u003e{const a=r,A=a?.connectionNames,c=a?.lengthTolerance;if(!Array.isArray(A)||A.length!==2||A.some(h=\u003etypeof h!=\"string\"||h.length===0)||A[0]===A[1]||typeof c!=\"number\"||!Number.isFinite(c)||c\u003c0){Oa(n,\"invalid-differential-pair\",`Differential pair ${s} must name two distinct connections and a finite nonnegative length tolerance`);return}const l=[];for(const h of A){const d=i.get(h),p=e.get(h);if(d?.length!==1||p?.length!==1||p[0].connectionIndex!==d[0]){Oa(n,\"invalid-differential-pair\",`Differential pair ${s} cannot resolve exactly one original plan for connection ${h}`);return}l.push(p[0])}const u=l.map(h=\u003ecR(h).reduce((d,p)=\u003ed+tn(p.start,p.end),0));if(u.some(h=\u003e!Number.isFinite(h))){Oa(n,\"invalid-differential-pair\",`Differential pair ${s} has nonfinite routed copper length`,l[0],A[1]);return}const g=Math.abs(u[0]-u[1]);g\u003ec+p0\u0026\u0026Oa(n,\"differential-pair-length-skew\",`Differential pair ${A[0]}/${A[1]} has ${g.toFixed(6)}mm routed-length skew; ${c.toFixed(6)}mm is allowed`,l[0],A[1])})}function Bvo(t){const{inputSrj:e,outputSrj:n,plans:o,preparedBuses:i,sharedBoundary:r,clearance:s,allowBlindAndBuriedVias:a=!0}=t,A=[],c=new Map,l=new Map(i.map(g=\u003e[g.busId,g]));for(const g of o){const h=c.get(g.connectionName)??[];h.push(g),c.set(g.connectionName,h)}Evo(e,c,A);for(const g of i){if(g.maxLengthSkew===void 0)continue;const h=o.filter(m=\u003em.busId===g.busId);if(h.length\u003c2)continue;const d=h.map(m=\u003em.length),p=Math.max(...d)-Math.min(...d);p\u003eg.maxLengthSkew+1e-6\u0026\u0026Oa(A,\"bus-length-skew\",`Bus ${g.busId} has ${p.toFixed(6)}mm routed-length skew; ${g.maxLengthSkew.toFixed(6)}mm is allowed`,h[0])}for(const g of e.connections){const h=c.get(g.name)??[];h.length===0?Oa(A,\"missing-plan\",`Connection ${g.name} has no fanout plan`):h.length\u003e1\u0026\u0026Oa(A,\"duplicate-plan\",`Connection ${g.name} has ${h.length} fanout plans`,h[0])}for(const g of o){if(!e.connections.some(h=\u003eh.name===g.connectionName)){Oa(A,\"unknown-plan\",`Plan ${g.connectionName} is not an input connection`,g);continue}Ivo({plan:g,preparedBus:l.get(g.busId),inputSrj:e,outputSrj:n,sharedBoundary:r,issues:A})}const u=yvo({plans:o,inputSrj:e,sharedBoundary:r,issues:A});return xvo({plans:o,inputSrj:e,clearance:s,allowBlindAndBuriedVias:a,issues:A}),{valid:A.length===0,checkedConnectionCount:e.connections.length,brokenOutConnectionCount:new Set([...u].map(g=\u003eg.connectionName)).size,issues:A}}var ARt=[\"#ef4444\",\"#2563eb\",\"#16a34a\",\"#9333ea\",\"#f59e0b\",\"#0891b2\",\"#db2777\",\"#65a30d\",\"#4f46e5\",\"#ea580c\"];function bvo(t){if(!Number.isInteger(t)||t\u003c0)throw new Error(`FanoutSolver: copper layer index must be a non-negative integer, received ${t}`);return ARt[t%ARt.length]}var Svo=new Set([\"top\",\"bottom\",\"inner1\",\"inner2\",\"inner3\",\"inner4\",\"inner5\",\"inner6\",\"inner7\",\"inner8\"]),Qvo={\"0603\":{padLength:.8,padWidth:.95},1206:{padLength:.6,padWidth:1.6},\"1206x4_pair\":{padLength:.8,padWidth:.5}},l$=(t,e)=\u003e{const n=t.indexOf(e);if(n\u003c0)throw new Error(`FanoutSolver: cannot visualize unknown copper layer \"${e}\"`);return n},u$=(t,e)=\u003e`z${[...new Set(e.map(o=\u003el$(t,o)))].sort((o,i)=\u003eo-i).join(\",\")}`,vvo=t=\u003e{const e=\"layers\"in t?t.layers:void 0;return e\u0026\u0026e.length\u003e0?e:[t.layer]},wvo=(t,e)=\u003et.__zLayers\u0026\u0026t.__zLayers.length\u003e0?[...new Set(t.__zLayers)].filter(n=\u003eNumber.isInteger(n)\u0026\u0026n\u003e=0\u0026\u0026n\u003ce.length).sort((n,o)=\u003en-o):[...new Set(t.layers.map(n=\u003el$(e,n)))].sort((n,o)=\u003en-o),Pvo=(t,e,n)=\u003e{const o=l$(t,e),i=l$(t,n);return t.slice(Math.min(o,i),Math.max(o,i)+1)},cRt=(...t)=\u003et.find(e=\u003etypeof e==\"number\"\u0026\u0026Number.isFinite(e)),Mvo=t=\u003e{const e=cRt(t.min_via_hole_diameter,t.minViaHoleDiameter),n=cRt(t.min_via_pad_diameter,t.minViaPadDiameter,t.minViaDiameter);return Math.max(n??t.minViaDiameter??.3,e??0)},Dvo=t=\u003eObject.fromEntries(t.map((e,n)=\u003e[e.name,`hsl(${n*340/t.length}, 100%, 50%)`])),Nvo=(t,e,n)=\u003e{const o=(1-Math.abs(2*n-1))*e,i=(t%360+360)%360/60,r=o*(1-Math.abs(i%2-1)),[s,a,A]=i\u003c1?[o,r,0]:i\u003c2?[r,o,0]:i\u003c3?[0,o,r]:i\u003c4?[0,r,o]:i\u003c5?[r,0,o]:[o,0,r],c=n-o/2;return[s,a,A].map(l=\u003eMath.round((l+c)*255))},tMe=(t,e)=\u003e{let o={blue:[0,0,255],orange:[255,165,0],purple:[128,0,128],red:[255,0,0]}[t],i=1;const r=/^rgba?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/.exec(t);r\u0026\u0026(o=[Number(r[1]),Number(r[2]),Number(r[3])],i=r[4]===void 0?1:Number(r[4]));const s=/^hsl\\(\\s*([\\d.-]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%\\s*\\)$/.exec(t);if(s\u0026\u0026(o=Nvo(Number(s[1]),Number(s[2])/100,Number(s[3])/100)),!o)return t;const a=+Math.max(0,i*100-e*100).toFixed(2)/100;if(a\u003e=1){const A=o.map(c=\u003eMath.round(c).toString(16).padStart(2,\"0\")).join(\"\");return A[0]===A[1]\u0026\u0026A[2]===A[3]\u0026\u0026A[4]===A[5]?`#${A[0]}${A[2]}${A[4]}`:`#${A}`}return`rgba(${o.join(\",\")},${a})`},Rvo=t=\u003e{const e=new Set;return t.filter(n=\u003ee.has(n)?!1:(e.add(n),!0))},Tvo=t=\u003e{const e=new Map,n=(o,i)=\u003e{if(!o)return;const r=e.get(o)??[];r.includes(i)||r.push(i),e.set(o,r)};for(const o of t.connections){const i=o.__rootConnectionNames??[o.name];for(const r of i){n(o.name,r),n(r,r),n(o.__netConnectionName,r);for(const s of o.pointsToConnect)n(s.pointId,r),n(s.pcb_port_id,r)}}return o=\u003e{const r=Rvo([...o.connectedTo.flatMap(s=\u003ee.get(s)??[]),...(o.offBoardConnectsTo??[]).flatMap(s=\u003ee.get(s)??[])]).join(\", \");return o.layers.map(s=\u003er?`${s}\n${r}`:s).join(`\n`)}};function kvo(t){const e=Rb(t.layerCount),n=(t.traces??[]).some(g=\u003eg.route.some((h,d)=\u003e{const p=g.route[d+1];return h.route_type===\"wire\"\u0026\u0026p?.route_type===\"wire\"\u0026\u0026p.layer===h.layer\u0026\u0026!Svo.has(h.layer)})),o=new Set(t.connections.map(({name:g})=\u003eg)),i=n?[...new Set((t.traces??[]).map(({connection_name:g})=\u003eg).filter(g=\u003eg\u0026\u0026!o.has(g)))].map(g=\u003e({name:g,pointsToConnect:[]})):[],r=[...t.connections,...i],s=Dvo(r),a=Tvo({...t,connections:r}),A=[],c=[],l=[],u=[];for(const g of r)for(const h of g.pointsToConnect){const d=vvo(h),p=g.__rootConnectionNames??[g.name];u.push({x:h.x,y:h.y,color:s[g.name],layer:u$(e,d),label:[g.name,p.join(\", \"),d.join(\",\")].join(`\n`)})}for(const g of t.traces??[]){const h=g.route.filter(p=\u003ep.route_type===\"jumper\"),d=(p,m)=\u003eh.some(_=\u003eMath.abs(p.x-_.start.x)\u003c.01\u0026\u0026Math.abs(p.y-_.start.y)\u003c.01\u0026\u0026Math.abs(m.x-_.end.x)\u003c.01\u0026\u0026Math.abs(m.y-_.end.y)\u003c.01||Math.abs(p.x-_.end.x)\u003c.01\u0026\u0026Math.abs(p.y-_.end.y)\u003c.01\u0026\u0026Math.abs(m.x-_.start.x)\u003c.01\u0026\u0026Math.abs(m.y-_.start.y)\u003c.01);for(const p of g.route)if(p.route_type===\"via\"){const m=Pvo(e,p.from_layer,p.to_layer);c.push({center:{x:p.x,y:p.y},radius:(p.via_diameter??Mvo(t))/2,fill:n?s[g.connection_name]:\"blue\",stroke:\"none\",layer:u$(e,m)})}else p.route_type===\"through_obstacle\"\u0026\u0026A.push({points:[p.start,p.end],strokeColor:tMe(s[g.connection_name]??\"purple\",.35),strokeWidth:p.width,strokeDash:[.1,.1],layer:u$(e,[p.from_layer,p.to_layer]),label:`${g.connection_name} through_obstacle`});for(let p=0;p\u003cg.route.length-1;p++){const m=g.route[p],_=g.route[p+1];if(m.route_type===\"jumper\"){const f=s[g.connection_name]??\"rgba(255, 165, 0, 0.8)\",I=Qvo[m.footprint===\"1206x4_pair\"?\"1206x4_pair\":\"0603\"],C=Math.abs(m.end.x-m.start.x)\u003eMath.abs(m.end.y-m.start.y),y=C?I.padLength:I.padWidth,x=C?I.padWidth:I.padLength,E=u$(e,[m.layer]);for(const B of[m.start,m.end])l.push({center:B,width:y,height:x,fill:tMe(f,.5),stroke:\"rgba(0, 0, 0, 0.5)\",layer:E});A.push({points:[m.start,m.end],strokeColor:\"rgba(100, 100, 100, 0.8)\",strokeWidth:I.padWidth*.3,layer:E})}else if(m.route_type===\"wire\"\u0026\u0026_.route_type===\"wire\"\u0026\u0026_.layer===m.layer\u0026\u0026!d(m,_)){const f=l$(e,m.layer);A.push({points:[{x:m.x,y:m.y},{x:_.x,y:_.y}],layer:`z${f}`,strokeWidth:m.width,strokeColor:bvo(f),...n?{label:g.connection_name}:{}})}}}for(const g of t.obstacles){if(g.isCopperPour)continue;const h=wvo(g,e);if(h.length===0)throw new Error(`FanoutSolver: cannot visualize obstacle \"${g.obstacleId??\"unknown\"}\" without a valid layer`);const d=h.length===1?e[h[0]]:void 0,p=tMe(d===\"bottom\"?\"blue\":\"red\",.5**h.length),m=g.shape,_={center:g.center,fill:p,layer:`z${h.join(\",\")}`,label:a(g)};m===\"circle\"?c.push({..._,radius:Math.min(g.width,g.height)/2}):l.push({..._,width:g.width,height:g.height,ccwRotationDegrees:g.ccwRotationDegrees})}for(const g of t.jumpers??[])for(const h of g.pads)l.push({center:h.center,width:h.width,height:h.height,ccwRotationDegrees:h.ccwRotationDegrees,fill:\"rgba(255, 165, 0, 0.3)\",stroke:\"rgba(255, 165, 0, 0.8)\",layer:u$(e,h.layers)});return{rects:l,circles:c,lines:A,points:u}}var FA=mvo(globalThis),Fvo=class extends fC{constructor(t,e,n,o,i){super(),this.solverName=t,this.generator=e,this.getVisualization=n,this.getStats=o,this.getProgress=i,this.MAX_ITERATIONS=1e6}solverName;generator;getVisualization;getStats;getProgress;output;hasOutput=!1;nextInput;getSolverName(){return this.solverName}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.failed){this.failedSubSolvers=[...this.failedSubSolvers??[],this.activeSubSolver],this.error=this.activeSubSolver.error,this.failed=!0,this.activeSubSolver=null;return}this.activeSubSolver.solved\u0026\u0026(this.nextInput=this.activeSubSolver.getOutput(),this.activeSubSolver=null),this.stats=this.getStats();return}const t=this.generator.next(this.nextInput);if(this.nextInput=void 0,this.stats=this.getStats(),t.done){this.output=t.value,this.hasOutput=!0,this.solved=!0;return}i$(t.value)\u0026\u0026(this.activeSubSolver=t.value.solver)}computeProgress(){return this.getProgress()}getConstructorParams(){return[]}getOutput(){if(!this.solved||!this.hasOutput)throw new Error(`${this.solverName}: output requested before completion`);return this.output}visualize(){return this.activeSubSolver?.visualize()??this.getVisualization()}};function g$(t,e){if(!Number.isFinite(e)||e\u003c=0)throw new Error(`FanoutSolver: ${t} must be a positive number, received ${e}`);return e}function Lvo(t,e){const n=g$(\"traceWidth\",e.traceWidth??t.nominalTraceWidth??t.minTraceWidth),o=g$(\"viaDiameter\",e.viaDiameter??t.minViaPadDiameter??t.min_via_pad_diameter??t.minViaDiameter??Math.max(n*2,.3)),i=g$(\"viaHoleDiameter\",e.viaHoleDiameter??t.minViaHoleDiameter??t.min_via_hole_diameter??o*.5);if(i\u003e=o)throw new Error(`FanoutSolver: viaHoleDiameter ${i} must be smaller than viaDiameter ${o}`);const r=g$(\"clearance\",e.clearance??t.minViaEdgeToPadEdgeClearance??t.minTraceToPadEdgeClearance??t.defaultObstacleMargin??t.minTraceWidth),s=Rb(t.layerCount),a=e.escapeLayers??s;for(const c of a)if(!s.includes(c))throw new Error(`FanoutSolver: escape layer \"${c}\" is not available in a ${t.layerCount}-layer SimpleRouteJson`);if(new Set(a).size!==a.length)throw new Error(\"FanoutSolver: escapeLayers contains duplicates\");const A=e.borderDistribution??\"preserve\";if(A!==\"preserve\"\u0026\u0026A!==\"even\")throw new Error(`FanoutSolver: borderDistribution must be \"preserve\" or \"even\", received \"${A}\"`);return{traceWidth:n,viaDiameter:o,viaHoleDiameter:i,clearance:r,compactBusTracks:e.compactBusTracks??!1,allowBlindAndBuriedVias:e.allowBlindAndBuriedVias??!0,allowSameNetMerges:e.allowSameNetMerges??!1,densePlaneReservationBusIds:e.densePlaneReservationBusIds??[],denseUnrestrictedPlaneRoutingBusIds:e.denseUnrestrictedPlaneRoutingBusIds??[],singleLayerPushAndShove:e.singleLayerPushAndShove??!1,singleLayerAdaptiveExits:e.singleLayerAdaptiveExits??!1,borderDistribution:A,layerNames:s,escapeLayers:a,maxLayerCombinations:e.maxLayerCombinations===void 0?256:g$(\"maxLayerCombinations\",e.maxLayerCombinations),balanceLayerLoadByConnectionCount:e.balanceLayerLoadByConnectionCount??!1}}function Hvo(t,e){const n=new Set,o=Math.max(e.traceWidth+e.clearance,e.viaDiameter+e.clearance),i=Math.max(e.viaDiameter/2+e.clearance,o);for(const r of t){const s=Ds(r.exitEdge,r.preferredExit);if(!r.exitEdge||!s)continue;const a=`${r.exitEdge}:${s}`;if(n.has(a))continue;n.add(a);const A=r.exitEdge===\"left\"||r.exitEdge===\"right\"?r.sharedBoundary.maxY-r.sharedBoundary.minY:r.sharedBoundary.maxX-r.sharedBoundary.minX,c=r.cornerBandConnectionCount??r.connections.length,l=(c-1)*o/2,u=A/4-i;if(l\u003eu+1e-6)throw new Error(`FanoutSolver: ${s} band on the ${r.exitEdge} edge cannot fit ${c} via-safe exits`)}}function Eue(t,e,n){const o=new Map(e.map(r=\u003e[r.busId,r.connections.length])),i=new Map;for(const[r,s]of Object.entries(t))i.set(s,(i.get(s)??0)+(n?o.get(r)??1:1));return[...i.values()].reduce((r,s)=\u003er+s*s,0)}function Bue(t){return t.balanceLayerLoadByConnectionCount?.25:.01}function lRt(t,e,n){const o=+(t.termination.type===\"plane\")-+(e.termination.type===\"plane\");return n?-o:o}function bue(t){return t.reduce((e,n)=\u003ee+ +!!n.via+(n.additionalVias?.length??0)+ +!!n.planeEndpointVia,0)}function wO(t){const e=t.connections.reduce((n,o)=\u003e{const i=t.direction===\"left\"||t.direction===\"right\"?o.sourcePoint.x:o.sourcePoint.y;return n+i},0)/t.connections.length;switch(t.direction){case\"right\":return t.sharedBoundary.maxX-e;case\"left\":return e-t.sharedBoundary.minX;case\"up\":return t.sharedBoundary.maxY-e;case\"down\":return e-t.sharedBoundary.minY}}function nMe(t){const e=t.direction===\"left\"||t.direction===\"right\";return t.connections.some(n=\u003e{const o=n.exitTargetPoint??n.targetPoint,i=e?n.sourcePoint.y:n.sourcePoint.x,r=e?o.y:o.x;return Math.abs(i-r)\u003e1e-6})}function PO(t){if(t.connections.length===0||t.connections.some(o=\u003e!o.hasExplicitLayeredExitTarget||!o.exitTargetPoint?.layer))return;const e=new Set(t.connections.map(o=\u003eo.exitTargetPoint.layer));if(e.size!==1)return;const[n]=e;return n}function Ovo(t){const e=t.direction===\"left\"||t.direction===\"right\",n=e?t.xCoordinates:t.yCoordinates,o=t.connections.reduce((r,s)=\u003er+(e?s.sourcePoint.x:s.sourcePoint.y),0)/t.connections.length,i=t.direction===\"right\"||t.direction===\"up\"?Math.max(...n):Math.min(...n);return Math.abs(o-i)\u003c1e-6}function oMe(t){const e=t.direction===\"left\"||t.direction===\"right\",n=e?t.xCoordinates:t.yCoordinates,o=t.connections.reduce((s,a)=\u003es+(e?a.sourcePoint.x:a.sourcePoint.y),0)/t.connections.length,i=t.direction===\"right\"||t.direction===\"up\"?Math.max(...n):Math.min(...n),r=e?t.pitchX:t.pitchY;return Math.round(Math.abs(o-i)/r)}function Gvo(t){const{buses:e,escapeLayers:n,escapeLayersByBusId:o,preferOrderedCoordinatedWindingLayers:i}=t,r={},s=new Map;let a=0;for(const A of e){const c=s.get(A.componentId)??new Set;c.add(A.direction),s.set(A.componentId,c)}for(const A of e){const c=A.connections[0]?.sourceLayer;if(!c)throw new Error(`FanoutSolver: bus \"${A.busId}\" has no connections`);if(A.termination.type===\"plane\"){r[A.busId]=A.termination.layer;continue}const l=o[A.busId]??n,u=l.filter(h=\u003eh!==c),g=PO(A);if(g\u0026\u0026l.includes(g))r[A.busId]=g;else if(!a6(A)\u0026\u0026l.includes(c)\u0026\u0026(nMe(A)||Ovo(A)))r[A.busId]=c;else if(u.length\u003e0){const h=A.connections.map(I=\u003eI.sourcePoint.x),d=A.connections.map(I=\u003eI.sourcePoint.y),p=I=\u003ee.filter(C=\u003e{const y=C.connections[0]?.sourcePoint;return C.termination.type===\"boundary\"\u0026\u0026y!==void 0\u0026\u0026y.x\u003eMath.min(...h)+1e-9\u0026\u0026y.x\u003cMath.max(...h)-1e-9\u0026\u0026y.y\u003eMath.min(...d)+1e-9\u0026\u0026y.y\u003cMath.max(...d)-1e-9\u0026\u0026PO(C)===I\u0026\u0026uRt({singletonBus:C,singletonTargetLayer:I,wideBuses:[A]})}).length,m=u.toSorted((I,C)=\u003ep(I)-p(C));if(p(m[0])\u003cp(u[0])){r[A.busId]=m[0];continue}if(i\u0026\u0026a6(A)){const I=Ds(A.exitEdge,A.preferredExit),C=y=\u003e{if(!A.exitEdge||A.connections.length\u003c8)return 0;const x=A.exitEdge===\"left\"||A.exitEdge===\"right\",E=x?\"y\":\"x\",B=x?A.sharedBoundary.minY:A.sharedBoundary.minX,S=x?A.sharedBoundary.maxY:A.sharedBoundary.maxX;if(!I){const k=A.connections.map(j=\u003e{const J=j.exitTargetPoint??j.targetPoint;return Math.max(B,Math.min(S,J[E]))}),R=Math.min(...k),F=Math.max(...k),O=x?\"x\":\"y\",U=A.exitEdge===\"right\"||A.exitEdge===\"top\"?1:-1,Y=Math.min(...A.connections.map(j=\u003eU*j.sourcePoint[O])),W=Math.min(...A.connections.map(j=\u003ej.sourcePoint[E])),te=Math.max(...A.connections.map(j=\u003ej.sourcePoint[E]));return e.reduce((j,J)=\u003e{const oe=Ds(J.exitEdge,J.preferredExit);if(J===A||J.termination.type!==\"boundary\"||J.componentId!==A.componentId||J.exitEdge!==A.exitEdge||!oe||PO(J)!==y)return j;const ie=B+(S-B)*(oe===\"minimum\"?.25:.75),ne=(Math.max(J.connections.length,J.cornerBandConnectionCount??0)-1)*Math.max(t.traceWidth+t.clearance,t.viaDiameter+t.clearance)/2,le=t.traceWidth+t.clearance,ge=F+le\u003e=ie-ne\u0026\u0026R-le\u003c=ie+ne,_e=Math.max(...J.connections.map(ue=\u003eU*ue.sourcePoint[O]))\u003cY-1e-9\u0026\u0026Math.min(...J.connections.map(ue=\u003eue.sourcePoint[E]))\u003c=te+le\u0026\u0026Math.max(...J.connections.map(ue=\u003eue.sourcePoint[E]))\u003e=W-le;return j+(ge||_e?J.connections.length:0)},0)}const Q=B+(S-B)*(I===\"minimum\"?.25:.75),w=Math.max(t.traceWidth+t.clearance,t.viaDiameter+t.clearance),M=(Math.max(A.connections.length,A.cornerBandConnectionCount??0)-1)*w/2;return e.reduce((k,R)=\u003eR===A||R.termination.type!==\"boundary\"||R.componentId!==A.componentId||R.exitEdge!==A.exitEdge||Ds(R.exitEdge,R.preferredExit)||PO(R)!==y?k:k+R.connections.filter(F=\u003e{const O=F.exitTargetPoint??F.targetPoint,U=Math.max(B,Math.min(S,O[E]));return Math.abs(U-Q)\u003c=M+t.traceWidth+t.clearance}).length,0)};r[A.busId]=u.toSorted((y,x)=\u003eC(y)-C(x))[0];continue}const _=s.get(A.componentId);if(_.has(\"left\")\u0026\u0026_.has(\"right\")||_.has(\"up\")\u0026\u0026_.has(\"down\")){const I=oMe(A);r[A.busId]=u[Math.max(I-1,0)%u.length]}else r[A.busId]=u[a%u.length],a++}else r[A.busId]=c}return r}function Yvo(t){const{initialAssignment:e,generatedAssignments:n,maxAssignments:o}=t,i=JSON.stringify(e);return[e,...n.filter(r=\u003eJSON.stringify(r)!==i)].slice(0,o)}function a6(t){return!!(t.exitEdge\u0026\u0026t.termination.type===\"boundary\"\u0026\u0026t.connections.length\u003e0\u0026\u0026t.connections.every(e=\u003ee.hasExplicitLayeredExitTarget===!0))}function iMe(t){const e=t.length,n=t.filter(o=\u003eo===1).length;return(e===5||e===6||e===7)\u0026\u0026n===1||e===8\u0026\u0026(n===1||n===2)||e===9\u0026\u0026n\u003e=1\u0026\u0026n\u003c=3}function Uvo(t){if(!iMe(t))return 0;const e=t.filter(n=\u003en===1).length;return Math.max(1,e-1)}function uRt(t){const e=t.singletonBus.connections[0]?.sourcePoint;return t.singletonBus.connections.length!==1||!e?!1:t.wideBuses.some(n=\u003e{const o=n.routableEscapeLayers??n.allowedLayers??[];if(n.connections.length\u003c8||n.componentId!==t.singletonBus.componentId||n.exitEdge!==t.singletonBus.exitEdge||o.length\u003c2||!o.includes(t.singletonTargetLayer))return!1;const i=n.connections.map(s=\u003es.sourcePoint.x),r=n.connections.map(s=\u003es.sourcePoint.y);return e.x\u003e=Math.min(...i)-1e-9\u0026\u0026e.x\u003c=Math.max(...i)+1e-9\u0026\u0026e.y\u003e=Math.min(...r)-1e-9\u0026\u0026e.y\u003c=Math.max(...r)+1e-9})}function Kvo(t){const e=Math.max(t.traceWidth+t.clearance,t.viaDiameter+t.clearance);return-t.leadingLaneCount*e/2}function Vvo(t){return t.boundaryBusCount===5||t.boundaryBusCount\u003e9?!1:t.boundaryBusCount===6||t.boundaryBusCount===7||t.boundaryBusCount===8||t.boundaryBusCount===9?t.connectionCount\u003e2\u0026\u0026t.rawSkew-t.maximumSkew\u003eMath.max(1,t.maximumSkew*.5):t.rawSkew-t.maximumSkew\u003eMath.max(1,t.maximumSkew*.25)}function d$(t){const e=t.connections[0],n=e?.exitTargetPoint;let o=0;if(e\u0026\u0026n){const i=n.x-e.sourcePoint.x,r=n.y-e.sourcePoint.y;o=t.direction===\"right\"?i:t.direction===\"left\"?-i:t.direction===\"up\"?r:-r}return{isCorner:!!Ds(t.exitEdge,t.preferredExit),targetProjection:o}}function zvo(t,e){const n=d$(t),o=d$(e);return Number(n.isCorner)-Number(o.isCorner)||(n.isCorner\u0026\u0026o.isCorner?n.targetProjection-o.targetProjection:0)||t.busId.localeCompare(e.busId)}function Jvo(t,e){const n=d$(t),o=d$(e);return Number(n.isCorner)-Number(o.isCorner)||(n.isCorner\u0026\u0026o.isCorner?+(n.targetProjection\u003e0)-+(o.targetProjection\u003e0):0)||t.busId.localeCompare(e.busId)}function Wvo(t){const{pairBuses:e}=t,n=e[0],o=n?.connections[0]?.sourceLayer;if(t.boundaryBusCount!==7\u0026\u0026t.boundaryBusCount!==8\u0026\u0026t.boundaryBusCount!==9||e.length!==3||n===void 0||n.exitEdge===void 0||n.assignedLayer===void 0||o===void 0||e.some(r=\u003er.connections.length!==2||r.componentId!==n.componentId||r.exitEdge!==n.exitEdge||r.assignedLayer!==n.assignedLayer||r.connections.some(s=\u003e{const a=s.exitTargetPoint;return s.sourceLayer!==o||a?.layer!==n.assignedLayer||!Number.isFinite(s.sourcePoint.x)||!Number.isFinite(s.sourcePoint.y)||!Number.isFinite(a?.x)||!Number.isFinite(a?.y)})))return null;const i=r=\u003eMath.max(...r.connections.map(s=\u003e{const a=s.exitTargetPoint;return Math.hypot(a.x-s.sourcePoint.x,a.y-s.sourcePoint.y)}));return e.map(r=\u003eNumber(i(r).toFixed(9)))}function jvo(t){const{bus:e,srj:n,config:o,staticClearanceCache:i}=t,r=e.allowedLayers,s=r===void 0?o.escapeLayers:o.escapeLayers.filter(c=\u003er.includes(c));if(a6(e))return s;const a=s.filter(c=\u003enR({srj:n,bus:e,targetLayer:c,acceptedPlans:[],layerNames:o.layerNames,traceWidth:o.traceWidth,viaDiameter:o.viaDiameter,viaHoleDiameter:o.viaHoleDiameter,clearance:o.clearance,compactBusTracks:o.compactBusTracks,allowBlindAndBuriedVias:o.allowBlindAndBuriedVias,allowSameNetMerges:o.allowSameNetMerges,staticClearanceCache:i})!==null);return a.length\u003e0?a:s}var Sue=class extends fC{constructor(t,e={}){super(),this.inputSrj=t,this.options=e,this.routingSrj={...t,obstacles:[...t.obstacles]},this.config=Lvo(t,e),this.preparedBuses=IQo(this.routingSrj,e),Hvo(this.preparedBuses,this.config);for(const i of this.preparedBuses){for(const s of i.connections){if(!s.hasExplicitLayeredExitTarget)continue;const a=s.exitTargetPoint?.layer;if(typeof a!=\"string\"||a.length===0||!this.config.layerNames.includes(a))throw new Error(`FanoutSolver: connection exit target for \"${s.connection.name}\" uses unavailable layer \"${String(a)}\"`)}for(const s of i.allowedLayers??[])if(!this.config.layerNames.includes(s))throw new Error(`FanoutSolver: bus \"${i.busId}\" allows unavailable layer \"${s}\"`);if(i.termination.type===\"boundary\"\u0026\u0026i.allowedLayers!==void 0\u0026\u0026!i.allowedLayers.some(s=\u003ethis.config.escapeLayers.includes(s)))throw new Error(`FanoutSolver: bus \"${i.busId}\" has no allowed layer in escapeLayers`);if(i.routableEscapeLayers=this.config.escapeLayers.filter(s=\u003ei.allowedLayers?.includes(s)??!0),i.termination.type!==\"plane\")continue;const r=i.termination.layer;if(!this.config.layerNames.includes(r))throw new Error(`FanoutSolver: plane-terminated bus \"${i.busId}\" targets unavailable layer \"${r}\"`);if(i.allowedLayers!==void 0\u0026\u0026!i.allowedLayers.includes(r))throw new Error(`FanoutSolver: plane-terminated bus \"${i.busId}\" targets disallowed layer \"${r}\"`);if(i.connections.some(s=\u003es.sourceLayer===r))throw new Error(`FanoutSolver: plane-terminated bus \"${i.busId}\" must target a layer below its source pad`)}this.boundaryBuses=this.preparedBuses.filter(i=\u003ei.termination.type===\"boundary\"),this.fixedPlaneAssignments=Object.fromEntries(this.preparedBuses.flatMap(i=\u003ei.termination.type===\"plane\"?[[i.busId,i.termination.layer]]:[]));const n=this.preparedBuses.length*3+8,o=this.boundaryBuses.length+1+this.config.maxLayerCombinations*n+this.preparedBuses.length*2+20;this.MAX_ITERATIONS=Math.max(1e4,o)}inputSrj;options;preparedBuses;attempts=[];layerAssignments=[];config;routingSrj;escapeLayersByBusId={};boundaryBuses;fixedPlaneAssignments;evaluatedAssignmentKeys=new Set;queuedAssignmentKeys=new Set;assignmentRepairDepthByKey=new Map;pendingRepairAssignments=[];routeStaticClearanceCache=new Map;routingPrefixCache=new Map;layerReservedRoutingEvaluated=!1;groupedBeamEvaluated=!1;routingInitialized=!1;nextCandidateLayerBusIndex=0;nextAssignmentIndex=0;nextGeneratedAssignmentIndex=0;activeOperation=null;inProgressPlans=[];activeRoutingVisualization=null;activeAdaptiveVisualization=null;bestAttempt=null;lengthMatchingFailure=null;endpointCompletion=null;getSolverName(){return\"FanoutSolver\"}shouldTryLayerReservedRouting(){if(this.config.allowBlindAndBuriedVias||this.boundaryBuses.length\u003c4||(this.config.compactBusTracks||this.config.borderDistribution===\"even\")\u0026\u0026this.boundaryBuses.some(r=\u003er.connections.length\u003e1\u0026\u0026r.connections.some(s=\u003e!s.hasExplicitLayeredExitTarget)))return!1;const t=this.preparedBuses[0],e=this.boundaryBuses.reduce((r,s)=\u003er+s.connections.length,0);if(this.inputSrj.connections.length-e\u003ce||this.preparedBuses.some(r=\u003er.componentId!==t.componentId||r.connections.some(s=\u003es.sourceLayer!==\"top\"))||this.boundaryBuses.some(r=\u003e!r.exitEdge||r.exitEdge!==this.boundaryBuses[0].exitEdge||r.connections.length\u003e8||!r.allowedLayers?.length||r.allowedLayers.some(s=\u003e!this.config.escapeLayers.includes(s))))return!1;const o=new Map;let i=!1;for(const r of this.boundaryBuses){const s=r.allowedLayers.filter(a=\u003ea!==\"top\");if(!s.length)return!1;if(s.length\u003e1\u0026\u0026(i=!0),s.length===1\u0026\u0026r.connections.length\u003e2){const a=s[0];o.set(a,(o.get(a)??0)+1)}}return i\u0026\u0026[...o.values()].some(r=\u003er\u003e1)}*evaluateLayerReservedRoutingSteps(t=!1,e=!1){const n={...this.config,sourceOriginRouting:t,srj:this.routingSrj,buses:this.preparedBuses},o=e?TSo(n):tvo(n);let i=o.next();for(;!i.done;){if(i$(i.value)){this.stats={...this.stats,phase:\"layer-reserved-route-layer\",workUnit:i.value.routedConnectionCount,workUnitCount:this.inputSrj.connections.length,routedConnections:`${i.value.routedConnectionCount}/${this.inputSrj.connections.length}`,routingIterations:i.value.iterations};const c=yield i.value;i=o.next(c);continue}this.stats={...this.stats,phase:`layer-reserved-${i.value.phase}`,targetLayer:i.value.layer,workUnit:i.value.routedConnectionCount,workUnitCount:this.inputSrj.connections.length,routedConnections:`${i.value.routedConnectionCount}/${this.inputSrj.connections.length}`,routingIterations:i.value.iterations},yield,i=o.next()}if(!i.value||i.value.length!==this.inputSrj.connections.length)return null;const r=this.normalizeCompletePlanCorners(i.value);if(!r)return null;const s=aR({inputSrj:this.inputSrj,plans:r,layerNames:this.config.layerNames});if(!this.validateCompletePlans(r,s).valid)return null;const a=Object.fromEntries(r.map(c=\u003e[c.busId,c.targetLayer])),A=r.reduce((c,l)=\u003ec+l.length,0)+bue(r)*.1+Eue(a,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config);return this.inProgressPlans=[...r],{plans:r,outputSrj:s,stopAfterCompleteValidation:!0,blockingBusIds:[],summary:{assignmentIndex:0,busLayerAssignments:a,routedBusCount:this.preparedBuses.length,routedConnectionCount:r.length,failedBusIds:[],score:A}}}stepRoutingInitialization(){const t=this.boundaryBuses[this.nextCandidateLayerBusIndex];if(t){this.escapeLayersByBusId[t.busId]=jvo({bus:t,srj:this.routingSrj,config:this.config,staticClearanceCache:this.routeStaticClearanceCache}),this.nextCandidateLayerBusIndex++,this.stats={phase:\"discover-candidate-layers\",bus:t.busId,busIndex:this.nextCandidateLayerBusIndex,busCount:this.boundaryBuses.length};return}const e=W8o({busIds:this.boundaryBuses.map(n=\u003en.busId),layers:this.config.escapeLayers,layersByBusId:this.escapeLayersByBusId,maxAssignments:this.config.maxLayerCombinations}).map(n=\u003e({...n,...this.fixedPlaneAssignments}));this.layerAssignments.push(...Yvo({initialAssignment:Gvo({buses:this.preparedBuses,escapeLayers:this.config.escapeLayers,escapeLayersByBusId:this.escapeLayersByBusId,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,clearance:this.config.clearance,preferOrderedCoordinatedWindingLayers:this.config.densePlaneReservationBusIds.length\u003e0||this.config.denseUnrestrictedPlaneRoutingBusIds.length\u003e0||PNt(this.preparedBuses,this.config.allowBlindAndBuriedVias)}),generatedAssignments:e,maxAssignments:this.config.maxLayerCombinations})),this.routingInitialized=!0,this.stats={phase:\"prepare-layer-assignments\",assignmentCount:this.layerAssignments.length}}*initializeRoutingSteps(){for(;!this.routingInitialized;)this.stepRoutingInitialization(),this.routingInitialized||(yield)}setInProgressPlans(t){this.inProgressPlans=[...t.plans],this.stats={...this.stats,phase:t.phase,...t.strategy?{routingStrategy:t.strategy}:{},...t.unitIndex!==void 0?{workUnit:t.unitIndex}:{},...t.unitCount!==void 0?{workUnitCount:t.unitCount}:{},...t.busId?{bus:t.busId}:{},routedConnections:`${t.plans.length}/${this.inputSrj.connections.length}`}}visualizeCurrentState(){const t=this.endpointCompletion?.simpleRouteJson??(!this.solved\u0026\u0026!this.failed\u0026\u0026this.inProgressPlans.length\u003e0?aR({inputSrj:this.inputSrj,plans:this.inProgressPlans,layerNames:this.config.layerNames}):void 0)??this.bestAttempt?.outputSrj??this.inputSrj;return kvo(t)}visualizeWorkState(t){const e=this.visualizeCurrentState(),n=this.preparedBuses[0]?.sharedBoundary??this.inputSrj.bounds,o=typeof this.stats.bus==\"string\"?this.stats.bus:void 0,i=o?this.preparedBuses.find(u=\u003eu.busId===o):void 0,r=n.maxX-n.minX,s=n.maxY-n.minY,a=Math.max(Math.min(r,s)*.025,.25),A=typeof this.stats.phase==\"string\"?this.stats.phase:\"starting\",c=[typeof this.stats.routeConnection==\"string\"?`connection ${this.stats.routeConnection}`:void 0,typeof this.stats.searchBatch==\"number\"?`batch ${this.stats.searchBatch}`:void 0,typeof this.stats.expandedStates==\"number\"?`${this.stats.expandedStates.toLocaleString()} states`:void 0].filter(Boolean).join(\" · \"),l=`${t}: ${A}`;return{...NH(e,{rects:[{center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:r,height:s,fill:\"rgba(0, 0, 0, 0)\",stroke:\"rgba(14, 165, 233, 0.8)\",label:`${t} working boundary`}],circles:(i?.connections??[]).map(u=\u003e({center:u.sourcePoint,radius:Math.max(a,Math.min(u.sourceObstacle.width,u.sourceObstacle.height)*.6),fill:\"rgba(250, 204, 21, 0.25)\",stroke:\"#f59e0b\",label:`active bus ${o}: ${u.connection.name}`})),texts:[{x:n.minX,y:n.maxY+a*2,text:`${t} · ${A}${c?` · ${c}`:\"\"}`,color:\"#0f172a\",fontSize:a*1.5,anchorSide:\"bottom_left\"}]}),title:l}}visualizeBoundaryRoutingState(){return this.activeRoutingVisualization?{...NH(this.visualizeCurrentState(),this.activeRoutingVisualization),title:this.activeRoutingVisualization.title}:this.visualizeWorkState(\"BoundaryBusRoutingSolver\")}visualizeAdaptiveRoutingState(){if(this.activeAdaptiveVisualization)return this.activeAdaptiveVisualization;const t=this.preparedBuses[0]?.sharedBoundary??this.inputSrj.bounds,e=t.maxX-t.minX,n=t.maxY-t.minY,o=Math.max(Math.min(e,n)*.02,.2);return{title:\"SingleLayerAdaptiveExitSolver: preparing flow grid\",rects:[{center:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2},width:e,height:n,fill:\"rgba(0, 0, 0, 0)\",stroke:\"rgba(14, 165, 233, 0.9)\",label:\"adaptive flow grid boundary\"}],points:this.preparedBuses.flatMap(i=\u003ei.connections.map(r=\u003e({...r.sourcePoint,color:\"#f97316\",label:\"adaptive route source\"}))),texts:[{x:t.minX,y:t.maxY+o*2,text:\"preparing adaptive flow grid\",color:\"#0f172a\",fontSize:o*1.5,anchorSide:\"bottom_left\"}]}}startOperation(t){const e=this.createWorkSolver(t.name,t.generator,t.getProgress);this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,this.iterations+e.MAX_ITERATIONS+1),this.activeOperation={solver:e,onSolved:t.onSolved},this.activeSubSolver=e}createWorkSolver(t,e,n,o){return new Fvo(t,e,o??(()=\u003ethis.visualizeWorkState(t)),()=\u003e({...this.stats}),n??(()=\u003e0))}*routeBusAlternativesWorkSteps(t,e){const n=eue(t,e,!0);let o=n.next();for(;!o.done;){const{winding:i}=o.value;i.visualization\u0026\u0026(this.activeRoutingVisualization=i.visualization),this.stats={...this.stats,phase:\"route-boundary-bus-connection\",bus:o.value.busId,targetLayer:o.value.targetLayer,routeOrderAttempt:i.routeOrderAttempt,routeConnection:`${i.connectionIndex+1}/${i.connectionCount}`,connection:i.connectionName,searchBatch:i.searchBatch,expandedStates:i.expandedStateCount,connectionComplete:i.connectionComplete},yield,o=n.next()}return o.value}stepActiveOperation(){const t=this.activeOperation;if(!t)return;if(t.solver.step(),t.solver.failed){this.failedSubSolvers=[...this.failedSubSolvers??[],t.solver],this.error=t.solver.error,this.failed=!0,this.activeOperation=null,this.activeSubSolver=null;return}if(!t.solver.solved)return;const e=t.solver.getOutput();this.activeOperation=null,this.activeSubSolver=null,t.onSolved(e)}completeBestAttemptEndpoints(){!this.options.completeOriginalEndpoints||this.endpointCompletion||!this.bestAttempt||(this.endpointCompletion=sbo({inputSrj:this.routingSrj,fanoutSrj:this.bestAttempt.outputSrj,plans:this.bestAttempt.plans,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,effort:this.options.endpointCompletionEffort,routeDownstreamConnections:this.options.routeDownstreamConnections}))}getValidationBoundary(){if(this.options.sharedBoundary)return this.options.sharedBoundary;const t=this.preparedBuses[0]?.sharedBoundary;return t?this.preparedBuses.slice(1).reduce((e,n)=\u003e({minX:Math.min(e.minX,n.sharedBoundary.minX),maxX:Math.max(e.maxX,n.sharedBoundary.maxX),minY:Math.min(e.minY,n.sharedBoundary.minY),maxY:Math.max(e.maxY,n.sharedBoundary.maxY)}),{...t}):this.inputSrj.bounds}validateCompletePlans(t,e){return Bvo({inputSrj:this.inputSrj,outputSrj:e,plans:t,preparedBuses:this.preparedBuses,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias})}matchCompletePlanLengths(t,e={}){return zy({plans:t,preparedBuses:this.preparedBuses,inputSrj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,allowSameNetMerges:this.config.allowSameNetMerges,...e})}normalizeCompletePlanCorners(t){if(this.config.allowBlindAndBuriedVias)return[...t];const e=DPe({...this.config,inputSrj:this.inputSrj,preparedBuses:this.preparedBuses,plans:t,repairPlaneSourceCorners:!0,repairSignalSourceCorners:!0,rematchRepairedLengths:n=\u003ethis.matchCompletePlanLengths(n,{maximumWorkUnits:1e4,allowMatchingInsideDenseBounds:!0}).plans});return!e||e.every(n=\u003er$(n,this.config.clearance).every(o=\u003eo.kind===\"clearance\"))?e:$So({...this.config,inputSrj:this.inputSrj,preparedBuses:this.preparedBuses,plans:e})}*routePeripheralMixedTerminationSteps(t){if(this.config.allowBlindAndBuriedVias)return null;const e=t.busesInRoutingOrder.find(_=\u003e_.termination.type===\"boundary\"\u0026\u0026(_.exitEdge===\"right\"||_.exitEdge===\"left\")\u0026\u0026_.connections.length\u003e=16\u0026\u0026_.componentObstacles.length\u003e=200);if(!e)return null;const n=t.busLayerAssignments[e.busId];if(!n)return null;const o=new Map(Object.entries(t.busLayerAssignments));this.setInProgressPlans({phase:\"route-peripheral-source-escapes\",plans:[],busId:e.busId});const i=(e.exitEdge===\"left\"?ivo:DQo)({...this.config,srj:this.routingSrj,buses:this.preparedBuses,bus:e,targetLayer:n,targetLayerByBusId:o});let r=i.next();for(;!r.done;)yield,r=i.next();if(!r.value)return null;let s=r.value;const a={...this.config,...s,srj:this.routingSrj,bus:e,targetLayer:n},A=\"lowerConnectionIndices\"in s?tRt({...a,...s}):NQo(a);let c=A.next();for(;!c.done;)yield,c=A.next();let l=c.value;if(!l\u0026\u0026\"lowerConnectionIndices\"in s){const _=rvo({...a,...s,buses:this.preparedBuses});let f=_.next();for(;!f.done;)yield,f=_.next();f.value\u0026\u0026(s=f.value,l=f.value.plans)}if(!l)return null;this.setInProgressPlans({phase:\"route-peripheral-bus-continuations\",plans:l,busId:e.busId});const u=$Nt({...this.config,srj:this.routingSrj,buses:this.preparedBuses,sourceEscapes:s.sourceEscapes,sourceBoundary:s.sourceBoundary,initialPlans:l,targetLayerByBusId:o});let g=u.next();for(;!g.done;)yield,g=u.next();if(!g.value)return null;const h=nvo({...this.config,srj:this.routingSrj,inputSrj:this.inputSrj,plans:g.value,preparedBuses:this.preparedBuses,sharedBoundary:this.getValidationBoundary()});let d=h.next();for(;!d.done;)yield,d=h.next();if(!d.value)return null;const p=this.normalizeCompletePlanCorners(d.value);if(!p)return null;const m=aR({inputSrj:this.inputSrj,plans:p,layerNames:this.config.layerNames});return this.validateCompletePlans(p,m).valid?{plans:p,failedBusIds:[],stopAfterCompleteValidation:!0}:null}*routeDenseThroughAllMixedTerminationSteps(t){if(this.config.allowBlindAndBuriedVias)return null;let e=t.preferredBoundaryViaPoints;const n=t.denseRoutingStrategy!==\"boundary-aligned\",o=(...Xe)=\u003e{if(FA.env.FANOUT_DEBUG_DENSE===\"1\"){if(FA.env.FANOUT_DEBUG_DENSE_SUMMARY===\"1\"\u0026\u0026![\"start\",\"plane-match:preflight-failed\",\"plane-match:incremental-complete\",\"plane-match:incremental-failed\",\"plane-route:alternate-candidate-counts\",\"plane-route:alternate-search\",\"plane-route:csp\",\"plane-reservation-core\",\"plane-route:promote-failed\",\"plane-route:alternate-choice\",\"plane-route:promote-zero-candidates\",\"length-match:complete\",\"length-match:start\",\"plane-route:failed\",\"dense-validation\"].includes(String(Xe[0])))return;console.error(\"dense:\",...Xe)}},i=t.busesInRoutingOrder.filter(Xe=\u003eXe.termination.type===\"boundary\"),r=i.filter(Xe=\u003eXe.connections.length\u003e=8),s=(Xe,Ze)=\u003eZe.componentId!==Xe.componentId\u0026\u0026this.config.layerNames.every(dt=\u003eZe.layers.includes(dt))\u0026\u0026Ze.center.x\u003e=Xe.componentBounds.minX\u0026\u0026Ze.center.x\u003c=Xe.componentBounds.maxX\u0026\u0026Ze.center.y\u003e=Xe.componentBounds.minY\u0026\u0026Ze.center.y\u003c=Xe.componentBounds.maxY,a=r.some(Xe=\u003ethis.routingSrj.obstacles.some(Ze=\u003es(Xe,Ze))),A=this.preparedBuses.flatMap(Xe=\u003eXe.termination.type===\"plane\"?Xe.connections.map(Ze=\u003eZe.connection.name):[]),c=r.some(Xe=\u003ethis.routingSrj.obstacles.some(Ze=\u003es(Xe,Ze)\u0026\u0026A.some(dt=\u003en4(this.routingSrj,Ze,dt)))),l=this.config.densePlaneReservationBusIds.length\u003e0||this.config.denseUnrestrictedPlaneRoutingBusIds.length\u003e0,u=!l\u0026\u0026PNt(this.preparedBuses,this.config.allowBlindAndBuriedVias),g=l||u,h=!l\u0026\u0026!u\u0026\u0026c,d=t.boundaryRecovery!==void 0,p=g||h||d,m=d||(u||h)\u0026\u0026((t.planeReservationRetryCount??0)===0||!!t.preferredBoundaryViaPoints),_=(g||h)\u0026\u0026t.lengthMatchingStage!==\"before-planes\",f=DNt(i.map(Xe=\u003eXe.connections.length)),I=i.filter(Xe=\u003eXe.connections.length===2),C=Wvo({boundaryBusCount:i.length,pairBuses:I.map(Xe=\u003e({...Xe,assignedLayer:t.busLayerAssignments[Xe.busId]}))}),y=C?new Map(I.map((Xe,Ze)=\u003e[Xe.busId,C[Ze]])):null,x=new Map;if(a)for(const Xe of pw(i,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,additionalObstacles:this.routingSrj.obstacles}))x.set(Xe.connectionIndex,(x.get(Xe.connectionIndex)??0)+1);const E=Xe=\u003eXe.connections.reduce((Ze,dt)=\u003eZe+(x.get(dt.connectionIndex)??0),0),B=new Map;if(n\u0026\u0026!l)for(const Xe of r){if(!Ds(Xe.exitEdge,Xe.preferredExit)||new Set(Xe.routableEscapeLayers??Xe.allowedLayers??[]).size!==1)continue;const Ze=Xe.direction===\"up\"||Xe.direction===\"down\"?\"y\":\"x\",dt=Ze===\"x\"?\"y\":\"x\",Ut=Xe.direction===\"up\"||Xe.direction===\"right\"?1:-1,Wt=Math.max(...Xe.connections.map(kn=\u003eUt*kn.sourcePoint[Ze])),Xt=Math.min(...Xe.connections.map(kn=\u003ekn.sourcePoint[dt])),Jt=Math.max(...Xe.connections.map(kn=\u003ekn.sourcePoint[dt])),yn=Ze===\"x\"?Xe.pitchX:Xe.pitchY,An=r.find(kn=\u003e{if(kn===Xe||kn.componentId!==Xe.componentId||kn.exitEdge!==Xe.exitEdge||Ds(kn.exitEdge,kn.preferredExit))return!1;const ht=Math.min(...kn.connections.map(Kt=\u003eUt*Kt.sourcePoint[Ze]))-Wt;return ht\u003e=-1e-9\u0026\u0026ht\u003c=yn+1e-9\u0026\u0026Math.min(...kn.connections.map(Kt=\u003eKt.sourcePoint[dt]))\u003c=Jt+1e-9\u0026\u0026Math.max(...kn.connections.map(Kt=\u003eKt.sourcePoint[dt]))\u003e=Xt-1e-9});An\u0026\u0026B.set(Xe,An)}const S=g\u0026\u0026r.length===3,Q=Xe=\u003e{const Ze=Xe.connections.map(dt=\u003e{const Ut=dt.exitTargetPoint??dt.targetPoint;return Xe.exitEdge===\"top\"||Xe.exitEdge===\"bottom\"?Ut.x:Ut.y});return{minimum:Math.min(...Ze),maximum:Math.max(...Ze)}},w=Xe=\u003e{if(Xe.connections.length\u003e=8)return!1;const Ze=Q(Xe);return r.some(dt=\u003e{if(dt.exitEdge!==Xe.exitEdge)return!1;const Ut=Q(dt);return Ze.maximum\u003e=Ut.minimum-1e-9\u0026\u0026Ze.minimum\u003c=Ut.maximum+1e-9})},M=Xe=\u003e{if(!(Xe.connections.length\u003e=8))return r.find(Ze=\u003e{const dt=Ze.connections.map(An=\u003eAn.sourcePoint.x),Ut=Ze.connections.map(An=\u003eAn.sourcePoint.y),Wt=Math.min(...dt),Xt=Math.max(...dt),Jt=Math.min(...Ut),yn=Math.max(...Ut);return Xe.connections.every(An=\u003eAn.sourcePoint.x\u003e=Wt-1e-9\u0026\u0026An.sourcePoint.x\u003c=Xt+1e-9\u0026\u0026An.sourcePoint.y\u003e=Jt-1e-9\u0026\u0026An.sourcePoint.y\u003c=yn+1e-9)})},k=Xe=\u003e!!M(Xe),R=Xe=\u003ew(Xe)\u0026\u0026!k(Xe)?0:Xe.connections.length\u003e=8?1:Xe.connections.length\u003e1?2:3,F=i.toSorted((Xe,Ze)=\u003e{if(f||r.length\u003e0){if(S){const $n=R(Xe)-R(Ze);if($n!==0)return $n}const kn=i.length===2\u0026\u0026Math.max(...i.map($n=\u003e$n.connections.length))\u003e=8?Xe.connections.length-Ze.connections.length:Ze.connections.length-Xe.connections.length;if(kn!==0)return kn;if(a\u0026\u0026Xe.connections.length\u003e=8\u0026\u0026Ze.connections.length\u003e=8){const $n=E(Xe)-E(Ze);if($n!==0)return $n}}const dt=t.busLayerAssignments[Xe.busId],Ut=t.busLayerAssignments[Ze.busId],Wt=y?.get(Xe.busId),Xt=y?.get(Ze.busId);if(Wt!==void 0\u0026\u0026Xt!==void 0\u0026\u0026Wt!==Xt)return Wt-Xt;const Jt=+!!Ds(Ze.exitEdge,Ze.preferredExit)-+!!Ds(Xe.exitEdge,Xe.preferredExit);if(Jt!==0)return Jt;if(!!!Ds(Xe.exitEdge,Xe.preferredExit)){const kn=ht=\u003e{const Kt=ht.connections.map(Lt=\u003eLt.sourcePoint.x),rn=ht.connections.map(Lt=\u003eLt.sourcePoint.y);return Math.max(...Kt)-Math.min(...Kt)+Math.max(...rn)-Math.min(...rn)},$n=kn(Ze)-kn(Xe);if(Math.abs($n)\u003e1e-9)return $n}const An=this.config.layerNames.indexOf(dt??\"\")-this.config.layerNames.indexOf(Ut??\"\");return An!==0?-An:i.length!==6\u0026\u0026i.length!==7\u0026\u0026i.length!==8\u0026\u0026i.length!==9?0:Xe.busId.localeCompare(Ze.busId)}),O=FA.env.FANOUT_DEBUG_BOUNDARY_ORDER?.split(\",\")??(FA.env.FANOUT_DEBUG_FIRST_BOUNDARY_BUS?[FA.env.FANOUT_DEBUG_FIRST_BOUNDARY_BUS]:t.boundaryRecovery?[t.boundaryRecovery.busId]:[]),U=O.length\u003e0?F.toSorted((Xe,Ze)=\u003e{const dt=O.indexOf(Xe.busId),Ut=O.indexOf(Ze.busId);return(dt\u003c0?Number.POSITIVE_INFINITY:dt)-(Ut\u003c0?Number.POSITIVE_INFINITY:Ut)}):F,Y=this.preparedBuses.filter(Xe=\u003eXe.termination.type===\"plane\"),W=new Set(Y.flatMap(Xe=\u003eXe.connections.map(Ze=\u003eZe.connectionIndex))),te=this.config.allowSameNetMerges||h,j=g||h?this.routingSrj.obstacles:void 0,J=Number.parseInt(FA.env.FANOUT_INITIAL_PLANE_RESERVATIONS??\"8\",10),oe=FA.env.FANOUT_DEBUG_INITIAL_PLANE_INDICES?.split(\",\").map(Xe=\u003eNumber(Xe)-1),ie=FA.env.FANOUT_DEBUG_INITIAL_PLANE_BUS_IDS?.split(\",\");let ne=ie?Y.filter(Xe=\u003eie.includes(Xe.busId)):oe?oe.flatMap(Xe=\u003eY[Xe]?[Y[Xe]]:[]):this.config.densePlaneReservationBusIds.length\u003e0?Y.filter(Xe=\u003ethis.config.densePlaneReservationBusIds.includes(Xe.busId)):g||h?Y.slice(0,Number.isFinite(J)?J:8):Y;t.promotedPlaneReservationBusIds\u0026\u0026(ne=[...new Set([...ne,...Y.filter(Xe=\u003et.promotedPlaneReservationBusIds.includes(Xe.busId))])]);const le=new Set;let ge,_e;const ue=U.map(Xe=\u003eXe.connections.length),fe=VSo({boundaryBusConnectionCounts:ue,planeBusCount:Y.length});if(o(\"start\",U.map(Xe=\u003e`${Xe.busId}:${Xe.connections.length}`),`planes:${Y.length}`,`joint:${f}`),U.length===0||fe===null||U.some(Xe=\u003e!a6(Xe))||Y.some(Xe=\u003eXe.connections.length!==1)||U.length+Y.length!==t.busesInRoutingOrder.length)return null;const pe=new Map(this.preparedBuses.flatMap(Xe=\u003eXe.connections.map(Ze=\u003e[Ze.connectionIndex,Ze.connection.name]))),Me=ue.filter(Xe=\u003eXe===1).length\u003e1\u0026\u0026iMe(ue),ve=new Map(U.map(Xe=\u003e[Xe.busId,S\u0026\u0026Xe.connections.length\u003c8\u0026\u0026k(Xe)?-1:1])),he=new Map(U.map(Xe=\u003e[Xe.busId,Xe.connections.length===1?S\u0026\u0026k(Xe)?!0:Me\u0026\u0026Ds(Xe.exitEdge,Xe.preferredExit)?d$(Xe).targetProjection\u003e0:Xj(Xe.direction)!==Xe.exitEdge:S\u0026\u0026Xe.connections.length\u003e=8?!1:Xj(Xe.direction)!==Xe.exitEdge]));for(const Xe of r){if(g||!Ds(Xe.exitEdge,Xe.preferredExit))continue;r.some(dt=\u003e{if(dt===Xe||dt.componentId!==Xe.componentId)return!1;const Ut=dt.connections.map(kn=\u003ekn.sourcePoint.x),Wt=dt.connections.map(kn=\u003ekn.sourcePoint.y),Xt=Math.min(...Ut),Jt=Math.max(...Ut),yn=Math.min(...Wt),An=Math.max(...Wt);return Xe.connections.some(({sourcePoint:kn})=\u003e{const $n=kn.x+(Xe.direction===\"left\"?-Xe.pitchX/2:Xe.direction===\"right\"?Xe.pitchX/2:0),ht=kn.y+(Xe.direction===\"down\"?-Xe.pitchY/2:Xe.direction===\"up\"?Xe.pitchY/2:0);return $n\u003e=Xt\u0026\u0026$n\u003c=Jt\u0026\u0026ht\u003e=yn\u0026\u0026ht\u003c=An})})\u0026\u0026he.set(Xe.busId,!1)}t.boundaryRecovery\u0026\u0026(ve.set(t.boundaryRecovery.busId,t.boundaryRecovery.perpendicularSide),he.set(t.boundaryRecovery.busId,t.boundaryRecovery.preferOutward));const Qe=FA.env.FANOUT_DEBUG_FLIP_BOUNDARY_BUS;Qe\u0026\u0026ve.set(Qe,-1);const Pe=FA.env.FANOUT_DEBUG_OUTWARD_BOUNDARY_BUS;Pe\u0026\u0026he.set(Pe,!0);const we=(Xe,Ze)=\u003e{const dt=W.has(Xe)\u0026\u0026W.has(Ze);if(!this.config.allowSameNetMerges\u0026\u0026!(te\u0026\u0026dt))return!1;const Ut=pe.get(Xe),Wt=pe.get(Ze);return!!(Ut\u0026\u0026Wt\u0026\u0026Px(this.routingSrj,Ut,Wt))},Te=U.filter(Xe=\u003eXe.connections.length===1),Re=!S\u0026\u0026!h\u0026\u0026iMe(ue)?Te.toSorted(U.length===9?zvo:Jvo).slice(0,Uvo(ue)):[],Ee=U.length===8||U.length===9?Re.filter(Xe=\u003e{const Ze=t.busLayerAssignments[Xe.busId];return!!(Ze\u0026\u0026uRt({singletonBus:Xe,singletonTargetLayer:Ze,wideBuses:U}))}):[],ke=S?Te.filter(Xe=\u003e{const Ze=M(Xe),dt=t.busLayerAssignments[Xe.busId];if(!Ze||!dt)return!1;const Ut=Ze.routableEscapeLayers??Ze.allowedLayers??[],Wt=Xe.exitEdge===\"left\"||Xe.exitEdge===\"right\"?\"x\":\"y\",Xt=Ze.connections.map(An=\u003eAn.sourcePoint[Wt]),Jt=Xe.exitEdge===\"left\"||Xe.exitEdge===\"bottom\"?Math.min(...Xt):Math.max(...Xt),yn=Xe.connections.every(An=\u003eMath.abs(An.sourcePoint[Wt]-Jt)\u003c1e-9);return!!(!Ut.includes(dt)||u\u0026\u0026yn\u0026\u0026Ds(Xe.exitEdge,Xe.preferredExit))}):[],Ce=ke.flatMap(Xe=\u003e{const Ze=M(Xe),dt=t.busLayerAssignments[Xe.busId];return U.filter(Ut=\u003eUt.connections.length\u003e1\u0026\u0026Ut.connections.length\u003c8\u0026\u0026Ut.direction===Xe.direction\u0026\u0026t.busLayerAssignments[Ut.busId]===dt\u0026\u0026M(Ut)===Ze)}),Le=FA.env.FANOUT_DEBUG_DISABLE_LEADING_NARROW===\"1\"?[]:ke.flatMap(Xe=\u003e[Xe,...Ce.filter(Ze=\u003eZe.direction===Xe.direction\u0026\u0026t.busLayerAssignments[Ze.busId]===t.busLayerAssignments[Xe.busId])]),Ye=[...Ee,...Le].filter((Xe,Ze,dt)=\u003edt.indexOf(Xe)===Ze),tt=new Map;if(U.length===9\u0026\u0026Ye.length\u003e0)for(const Xe of Ye){he.set(Xe.busId,!0);const Ze=Ds(Xe.exitEdge,Xe.preferredExit);if(!Xe.exitEdge||!Ze)continue;const dt=`${Xe.exitEdge}:${Ze}`;U.some(Wt=\u003eWt===Xe||Wt.connections.length\u003c8?!1:Wt.exitEdge===Xe.exitEdge\u0026\u0026Ds(Wt.exitEdge,Wt.preferredExit)===Ze)\u0026\u0026tt.set(dt,(tt.get(dt)??0)+Xe.connections.length)}const At=new Set([...FA.env.FANOUT_DEBUG_PROVISIONAL_NARROW===\"1\"?U.filter(Xe=\u003eXe.connections.length\u003c8):[],...Re.filter(Xe=\u003e{const Ze=M(Xe),dt=Xe.connections[0].sourcePoint,Ut={x:(Xe.componentBounds.minX+Xe.componentBounds.maxX)/2,y:(Xe.componentBounds.minY+Xe.componentBounds.maxY)/2},Wt=Xe.exitEdge?e6(Xe.exitEdge):Xe.direction,Xt=Wt===\"right\"?Ut.x-dt.x:Wt===\"left\"?dt.x-Ut.x:Wt===\"up\"?Ut.y-dt.y:dt.y-Ut.y,Jt=n\u0026\u0026!g\u0026\u0026Ze\u0026\u0026(t.busLayerAssignments[Ze.busId]===t.busLayerAssignments[Xe.busId]||Xt\u003e1e-9);return!Ye.includes(Xe)\u0026\u0026!Jt}),...S?U.filter(Xe=\u003eXe.connections.length===2\u0026\u0026!w(Xe)\u0026\u0026!Ye.includes(Xe)):[]]),at=Xe=\u003e{const Ze=Ds(Xe.exitEdge,Xe.preferredExit);if(!Xe.exitEdge||!Ze)return 0;const dt=tt.get(`${Xe.exitEdge}:${Ze}`)??0;return Kvo({leadingLaneCount:dt,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,clearance:this.config.clearance})},nt=U.filter(Xe=\u003e!At.has(Xe)),gt=f?pd([...ne,...nt],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredViaPointsByConnectionIndex:t.preferredBoundaryViaPoints,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}):null;let bt=gt??pd([...ne,U[0]],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:2e4,preferredViaPointsByConnectionIndex:t.preferredBoundaryViaPoints,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});const Ct=FA.env.FANOUT_DEBUG_FIXED_VIAS;if(bt\u0026\u0026Ct){bt=new Map(bt);for(const Xe of Ct.split(\",\")){const Ze=Xe.split(\":\"),dt=Ze.pop(),Ut=Ze.pop(),Wt=Ze.join(\":\"),Xt=[...pe].find(([,An])=\u003eAn===Wt)?.[0],Jt=Number(Ut),yn=Number(dt);Xt!==void 0\u0026\u0026Number.isFinite(Jt)\u0026\u0026Number.isFinite(yn)\u0026\u0026bt.set(Xt,{x:Jt,y:yn})}}const Dt=FA.env.FANOUT_DEBUG_STAGED_PLANE_BUS_IDS?Y.filter(Xe=\u003eFA.env.FANOUT_DEBUG_STAGED_PLANE_BUS_IDS.split(\",\").includes(Xe.busId)):FA.env.FANOUT_DEBUG_STAGED_PLANE_INDICES?.split(\",\").flatMap(Xe=\u003eY[Number(Xe)-1]?[Y[Number(Xe)-1]]:[])??[];if(bt\u0026\u0026Dt.length\u003e0)for(const Xe of Dt){if(ne.includes(Xe))continue;const Ze=pd([...ne,Xe,...nt],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredViaPointsByConnectionIndex:t.preferredBoundaryViaPoints,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:bt,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o(\"plane-reservation:staged\",Xe.busId,Ze?.size??\"failed\"),!Ze)break;bt=new Map([...bt,...Ze]),ne.push(Xe)}o(\"seed\",bt?.size??\"failed\"),bt\u0026\u0026FA.env.FANOUT_DEBUG_DENSE_POINTS===\"1\"\u0026\u0026console.error(\"dense: seed-points\",[...bt].map(([Xe,Ze])=\u003e({connection:pe.get(Xe),point:Ze})));let kt=1;const it=U.length+Y.length+3;if(this.setInProgressPlans({phase:\"reserve-dense-via-sites\",plans:[],strategy:\"default\",unitIndex:kt,unitCount:it}),yield,bt){const Xe=zSo({busesInRoutingOrder:[...a?[]:Ee,...U.filter(qe=\u003e(a||!Ee.includes(qe))\u0026\u0026!Le.includes(qe)).flatMap(qe=\u003e[...Le.filter(vt=\u003eM(vt)===qe),qe])],busLayerAssignments:t.busLayerAssignments,routingMode:fe}),Ze=r.every(qe=\u003eqe.exitEdge\u0026\u0026qe.direction===e6(qe.exitEdge)),dt=h\u0026\u0026Ze?Te.filter(qe=\u003e{const vt=M(qe);return!!(vt\u0026\u0026qe.direction===vt.direction)}):[];if(t.boundaryRecovery\u0026\u0026dt.length\u003e0){const qe=Xe.findIndex(vt=\u003evt.busId===t.boundaryRecovery.busId);if(qe\u003e=0){const vt=Xe[qe],qt=new Set(dt),Zt=Xe.filter(nn=\u003enn!==vt\u0026\u0026!qt.has(nn));Xe.splice(0,Xe.length,vt,...dt,...Zt)}}for(const[qe]of B){const vt=qe.direction===\"up\"||qe.direction===\"down\"?\"y\":\"x\",qt=qe.direction===\"up\"||qe.direction===\"right\"?1:-1,Zt=Math.min(...qe.connections.map(Nn=\u003eqt*Nn.sourcePoint[vt])),nn=Xe.indexOf(qe),zn=Xe.findIndex(Nn=\u003eNn!==qe\u0026\u0026Nn.connections.length\u003e=8\u0026\u0026Nn.componentId===qe.componentId\u0026\u0026Nn.direction===qe.direction\u0026\u0026Math.max(...Nn.connections.map(Co=\u003eqt*Co.sourcePoint[vt]))\u003c=Zt+1e-9\u0026\u0026Nn.exitEdge===qe.exitEdge\u0026\u0026Ds(Nn.exitEdge,Nn.preferredExit)===Ds(qe.exitEdge,qe.preferredExit));zn\u003e=0\u0026\u0026zn\u003cnn\u0026\u0026(Xe.splice(nn,1),Xe.splice(zn,0,qe))}const Ut=(qe,vt)=\u003e{if(!n||qe.componentId!==vt.componentId||qe.exitEdge!==vt.exitEdge||qe.direction!==vt.direction||Ds(qe.exitEdge,qe.preferredExit)!==Ds(vt.exitEdge,vt.preferredExit)||t.busLayerAssignments[qe.busId]!==t.busLayerAssignments[vt.busId]||M(qe)!==M(vt)||!M(qe))return!1;const qt={x:qe.connections.reduce((Nn,Co)=\u003eNn+Co.sourcePoint.x,0)/qe.connections.length,y:qe.connections.reduce((Nn,Co)=\u003eNn+Co.sourcePoint.y,0)/qe.connections.length},Zt={x:vt.connections.reduce((Nn,Co)=\u003eNn+Co.sourcePoint.x,0)/vt.connections.length,y:vt.connections.reduce((Nn,Co)=\u003eNn+Co.sourcePoint.y,0)/vt.connections.length};if(Math.hypot(qt.x-Zt.x,qt.y-Zt.y)\u003e1.5*Math.min(qe.pitchX,qe.pitchY))return!1;const nn=qe.exitEdge===\"left\"||qe.exitEdge===\"right\"?\"y\":\"x\",zn=Nn=\u003eNn.connections.reduce((Co,ei)=\u003eCo+(ei.exitTargetPoint??ei.targetPoint)[nn],0)/Nn.connections.length;return(qt[nn]-Zt[nn])*(zn(qe)-zn(vt))\u003c-1e-9},Wt=new Set;for(const qe of Ye)if(!Ds(qe.exitEdge,qe.preferredExit))for(const vt of U){if(vt.connections.length!==2||!Ut(vt,qe))continue;const qt=Xe.indexOf(vt),Zt=Xe.indexOf(qe);qt\u003eZt\u0026\u0026(Xe.splice(qt,1),Xe.splice(Zt,0,vt),Wt.add(`${vt.componentId}:${vt.exitEdge}`))}for(const qe of U)if(!(!Wt.has(`${qe.componentId}:${qe.exitEdge}`)||qe.connections.length!==2||!Ds(qe.exitEdge,qe.preferredExit)))for(const vt of Te){if(!Ut(vt,qe))continue;const qt=Xe.indexOf(vt),Zt=Xe.indexOf(qe);qt\u003eZt\u0026\u0026(Xe.splice(qt,1),Xe.splice(Zt,0,vt))}for(const qe of B.values())for(const vt of U)if(!(vt.connections.length!==2||M(vt)!==qe))for(const qt of Te){if(!Ut(qt,vt))continue;const Zt=Xe.indexOf(vt),nn=Xe.indexOf(qt);nn\u003eZt\u0026\u0026(Xe.splice(nn,1),Xe.splice(Zt,0,qt))}let Xt=bt,Jt=[],yn=!0;const An=qe=\u003e{const vt=new Set(qe.connections.map(qt=\u003eqt.connection.name));return this.preparedBuses.flatMap(qt=\u003e{const Zt=t.busLayerAssignments[qt.busId];return Zt?qt.connections.flatMap(nn=\u003e{if(vt.has(nn.connection.name))return[];const zn=Xt.get(nn.connectionIndex);return zn?[{connectionName:nn.connection.name,sourceEscapeSegment:Jt.some(Nn=\u003eNn.connectionIndex===nn.connectionIndex)?void 0:{start:nn.sourcePoint,end:zn,layer:nn.sourceLayer,width:this.config.traceWidth},via:{center:zn,diameter:this.config.viaDiameter,spanLayers:Mx({fromLayer:nn.sourceLayer,toLayer:Zt,layerNames:this.config.layerNames,allowBlindAndBuriedVias:!1})}}]:[]}):[]})},kn=(function*(qe){o(\"route:start\",qe.busId,Jt.length),FA.env.FANOUT_DEBUG_DENSE_POINTS===\"1\"\u0026\u0026console.error(\"dense: points\",qe.busId,qe.connections.map(On=\u003e({source:On.sourcePoint,via:Xt.get(On.connectionIndex),target:On.exitTargetPoint??On.targetPoint})));const vt=t.busLayerAssignments[qe.busId];if(!vt)return!1;const qt=!g\u0026\u0026!Ds(qe.exitEdge,qe.preferredExit)\u0026\u0026qe.connections.length\u003e2\u0026\u0026r.some(On=\u003eDs(On.exitEdge,On.preferredExit)),Zt=this.config.traceWidth+this.config.clearance,nn=qe.connections.some(On=\u003e{const uo=On.exitTargetPoint??On.targetPoint,Oo=qe.sharedBoundary;return qe.exitEdge===\"left\"||qe.exitEdge===\"right\"?uo.y-Oo.minY\u003c=Zt+1e-9||Oo.maxY-uo.y\u003c=Zt+1e-9:uo.x-Oo.minX\u003c=Zt+1e-9||Oo.maxX-uo.x\u003c=Zt+1e-9}),zn={srj:this.routingSrj,bus:qe,targetLayer:vt,acceptedPlans:Jt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,fixedViaPointsByConnectionIndex:Xt,reservedVias:An(qe),viaMinimalOnly:FA.env.FANOUT_DEBUG_ALLOW_EXTRA_VIAS!==\"1\",allowBoundarySideViaFallback:qe.connections.length===1,preferCornerBoundaryVia:g,adaptiveWindingRouteOrder:qt,allowFixedViaReservedExitFallback:d,forbidEarlyExitBoundaryContact:nn,alignWindingGridToPads:n\u0026\u0026!l,fixedViaFallbackRouteOrderAttempts:qt?60:g?6:24,cornerBandTargetTrackOffset:at(qe)},Nn=(function*(On,uo){return this.activeRoutingVisualization=null,yield{type:\"subsolver\",solver:this.createWorkSolver(\"BoundaryBusRoutingSolver\",this.routeBusAlternativesWorkSteps(On,uo),void 0,()=\u003ethis.visualizeBoundaryRoutingState())}}).bind(this),ei=(qe.routableEscapeLayers??qe.allowedLayers??[]).some(On=\u003eOn!==vt)?{...qe,routableEscapeLayers:[vt]}:qe,ro=U.some(On=\u003eOn.connections.length\u003c8\u0026\u0026M(On)===qe\u0026\u0026Jt.some(uo=\u003euo.busId===On.busId)),To=g\u0026\u0026ei!==qe\u0026\u0026!ro;let yo=!1,Ro=(yield*Nn(To?{...zn,bus:ei}:zn,1))[0];if(!Ro\u0026\u0026To\u0026\u0026(Ro=(yield*Nn(zn,1))[0]),!Ro){const On=Xt,uo=he.get(qe.busId)??!0,Oo=ve.get(qe.busId)??1;for(const[ko,Ko]of[[!uo,Oo],[uo,-Oo],[!uo,-Oo]]){const mi=pd([...new Set([...ne,...nt,...this.preparedBuses.filter(Fo=\u003eJt.some(Nr=\u003eNr.busId===Fo.busId)),qe])],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:new Map([...ve,[qe.busId,Ko]]),preferBoundaryOutwardByBusId:new Map([...he,[qe.busId,ko]]),fixedViaPointsByConnectionIndex:new Map(Jt.filter(Fo=\u003eFo.via).map(Fo=\u003e[Fo.connectionIndex,Fo.via.center])),preferredViaPointsByConnectionIndex:new Map([...On].filter(([Fo])=\u003e!qe.connections.some(Nr=\u003eNr.connectionIndex===Fo))),blockingSegments:Jt.flatMap(Fo=\u003eFo.segments.map(Nr=\u003e({connectionIndex:Fo.connectionIndex,segment:Nr}))),additionalObstacles:this.routingSrj.obstacles,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o(\"retry-sites\",qe.busId,ko,Ko,mi?.size??\"failed\"),!!mi\u0026\u0026(Xt=mi,Ro=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:mi,reservedVias:An(qe),alignWindingGridToPads:g,fixedViaFallbackRouteOrderAttempts:3},1))[0],Ro))break}Ro||(Xt=On,qe.connections.length===2\u0026\u0026(Ro=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:On,reservedVias:An(qe),allowBoundarySideViaFallback:!0,fixedViaFallbackRouteOrderAttempts:1},1))[0]))}if(!Ro\u0026\u0026u\u0026\u0026qe.connections.length\u003e=8\u0026\u0026Ds(qe.exitEdge,qe.preferredExit)\u0026\u0026new Set(qe.routableEscapeLayers??qe.allowedLayers??[]).size===1\u0026\u0026!Jt.some(On=\u003er.some(uo=\u003euo.busId===On.busId))){const On=An(qe),uo=fbo(qe,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,additionalObstacles:this.routingSrj.obstacles,blockingSegments:[...Jt.flatMap(Oo=\u003eOo.segments.map(ko=\u003e({connectionIndex:Oo.connectionIndex,segment:ko}))),...On.flatMap(Oo=\u003eOo.sourceEscapeSegment?[{connectionIndex:-1,segment:Oo.sourceEscapeSegment}]:[])],blockingVias:[...Jt.flatMap(Oo=\u003eOo.via?[{connectionIndex:Oo.connectionIndex,...Oo.via}]:[]),...On.map(Oo=\u003e({connectionIndex:-1,...Oo.via}))]},Xt);for(const Oo of uo){const ko=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:Oo,reservedVias:On,fixedViaFallbackRouteOrderAttempts:1},1))[0];if(ko){Ro=ko,Xt=Oo,yo=!0;break}}}if(!Ro\u0026\u0026u\u0026\u0026qe.connections.length\u003e=8\u0026\u0026Ds(qe.exitEdge,qe.preferredExit)\u0026\u0026(Ro=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:void 0,reservedVias:An(qe)},1))[0],Ro\u0026\u0026(yo=!0,Xt=new Map([...Xt,...Ro.filter(On=\u003eOn.via).map(On=\u003e[On.connectionIndex,On.via.center])])),o(\"local-sites\",qe.busId,Ro?.length??\"failed\")),!Ro\u0026\u0026qe.connections.length\u003e=8\u0026\u0026(B.has(qe)||U.some(On=\u003eOn.connections.length\u003e=8\u0026\u0026Jt.some(uo=\u003euo.busId===On.busId)))){const On=new Set(Jt.map(ko=\u003eko.connectionName)),uo=new Set(this.preparedBuses.filter(ko=\u003eko.termination.type===\"plane\"||ko===B.get(qe)).flatMap(ko=\u003eko.connections.map(Ko=\u003eKo.connection.name)).filter(ko=\u003e!On.has(ko))),Oo=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:void 0,reservedVias:zn.reservedVias.filter(ko=\u003e!uo.has(ko.connectionName)),softReservedVias:zn.reservedVias.filter(ko=\u003euo.has(ko.connectionName))},1))[0];if(Oo){const ko=[...Jt,...Oo],Ko=pd(this.preparedBuses,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:3e6,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:new Map(ko.filter(mi=\u003emi.via).map(mi=\u003e[mi.connectionIndex,mi.via.center])),preferredViaPointsByConnectionIndex:Xt,blockingSegments:ko.flatMap(mi=\u003emi.segments.map(Fo=\u003e({connectionIndex:mi.connectionIndex,segment:Fo}))),additionalObstacles:this.routingSrj.obstacles,preferPlaneCheckerboardSites:g,canShareCopper:we});o(\"free-sites:rematched\",qe.busId,Ko?.size??\"failed\"),Ko\u0026\u0026(Ro=Oo,Xt=Ko,yo=!0)}}if(Ro\u0026\u0026qe.maxLengthSkew!==void 0){const On=Ro.map(ko=\u003eko.length),uo=Math.max(...On)-Math.min(...On);Vvo({boundaryBusCount:U.length,connectionCount:qe.connections.length,rawSkew:uo,maximumSkew:qe.maxLengthSkew})\u0026\u0026!_\u0026\u0026!yo\u0026\u0026(Ro=(yield*Nn(zn,3)).toSorted((ko,Ko)=\u003e{const mi=ko.map(Nr=\u003eNr.length),Fo=Ko.map(Nr=\u003eNr.length);return Math.max(...mi)-Math.min(...mi)-(Math.max(...Fo)-Math.min(...Fo))})[0])}return Ro?(Jt.push(...Ro),Jt.length===U.reduce((On,uo)=\u003eOn+uo.connections.length,0)\u0026\u0026Jt.some(On=\u003e{const uo=U.find(ko=\u003eko.busId===On.busId);if(uo?.connections.length!==1||!On.via)return!1;const{center:Oo}=On.via;return Oo.x\u003cuo.componentBounds.minX||Oo.x\u003euo.componentBounds.maxX||Oo.y\u003cuo.componentBounds.minY||Oo.y\u003euo.componentBounds.maxY})\u0026\u0026(e=new Map(Jt.filter(On=\u003eOn.via).map(On=\u003e[On.connectionIndex,On.via.center]))),o(\"route:complete\",qe.busId,Ro.length),!0):(ge??=qe,qe.connections.length\u003e=8\u0026\u0026(_e??=qe),o(\"route:failed\",qe.busId),!1)}).bind(this),$n=[],ht=qe=\u003e{qe.connections.length\u003e=8\u0026\u0026!g\u0026\u0026!h\u0026\u0026FA.env.FANOUT_DEBUG_NO_PLANE_EXPANSION!==\"1\"\u0026\u0026ne.length\u003cY.length\u0026\u0026(ne=Y,o(\"plane-reservations:expanded\",Y.length))},Kt=fe===\"large_boundary_only\"?Xe:Xe.slice(0,1);let rn;for(const qe of Kt){const vt=yield*kn(qe);if(this.setInProgressPlans({phase:\"route-dense-boundary-buses\",plans:Jt,strategy:\"default\",unitIndex:++kt,unitCount:it,busId:qe.busId}),yield,!!vt){rn=qe;break}}rn?($n.push(rn),ht(rn)):yn=!1;const Lt=Xe.filter(qe=\u003eqe!==rn);for(;yn\u0026\u0026Lt.length\u003e0;){const qe=Jt.flatMap(qt=\u003eqt.segments.map(Zt=\u003e({connectionIndex:qt.connectionIndex,segment:Zt})));let vt=-1;for(let qt=0;qt\u003cLt.length;qt++){const Zt=Lt[qt];o(\"candidate:start\",Zt.busId);const nn=new Map(Xt),zn=FA.env.FANOUT_DEBUG_LATE_FIXED_VIAS;if(zn){const On=new Set(Zt.connections.map(uo=\u003euo.connectionIndex));for(const uo of zn.split(\",\")){const Oo=uo.split(\":\"),ko=Oo.pop(),Ko=Oo.pop(),mi=Oo.join(\":\"),Fo=[...pe].find(([,ur])=\u003eur===mi)?.[0],Nr=Number(Ko),Rs=Number(ko);Fo!==void 0\u0026\u0026On.has(Fo)\u0026\u0026Number.isFinite(Nr)\u0026\u0026Number.isFinite(Rs)\u0026\u0026nn.set(Fo,{x:Nr,y:Rs})}}const Nn=Zt.connections.every(On=\u003enn.has(On.connectionIndex)),Co=gt\u0026\u0026Nn?new Map(nn):pd([...ne,...$n,Zt],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:nn,blockingSegments:qe,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}),ei=Co?new Map([...nn,...Co]):null;if(o(\"candidate:matched\",Zt.busId,ei?.size??\"failed\"),this.setInProgressPlans({phase:\"reserve-next-dense-boundary-bus\",plans:Jt,strategy:\"default\",unitIndex:kt,unitCount:it,busId:Zt.busId}),yield,!ei)continue;const ro=Xt,To=Jt.length,yo=Lt.filter((On,uo)=\u003euo!==qt);let Ro=ei;if(yo.length===1){const On=yo[0],uo=pd([...ne,...$n,Zt,On],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:ei,blockingSegments:qe,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o(\"future:matched\",On.busId,uo?.size??\"failed\"),uo){const Oo=new Map;for(const mi of pw([On],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,blockingSegments:qe,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}))Oo.set(mi.connectionIndex,(Oo.get(mi.connectionIndex)??0)+1);const ko=On.connections.toSorted((mi,Fo)=\u003e(Oo.get(mi.connectionIndex)??0)-(Oo.get(Fo.connectionIndex)??0)||mi.connectionIndex-Fo.connectionIndex),Ko=new Map(ei);for(const mi of ko){const Fo=uo.get(mi.connectionIndex);Fo\u0026\u0026Ko.set(mi.connectionIndex,Fo)}Ro=Ko}}if(Xt=Ro,yield*kn(Zt)){o(\"lookahead:start\",Zt.busId);const On=yo.length===0||yo.some(uo=\u003e{const Oo=Jt.flatMap(ko=\u003eko.segments.map(Ko=\u003e({connectionIndex:ko.connectionIndex,segment:Ko})));return!!pd([...ne,...$n,Zt,uo],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:Xt,blockingSegments:Oo,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we})});if(o(\"lookahead:complete\",Zt.busId,On),On){vt=qt,$n.push(Zt),ht(Zt),this.setInProgressPlans({phase:\"route-dense-boundary-buses\",plans:Jt,strategy:\"default\",unitIndex:++kt,unitCount:it,busId:Zt.busId}),yield;break}Jt.splice(To)}Xt=ro,this.setInProgressPlans({phase:\"retry-dense-boundary-bus\",plans:Jt,strategy:\"default\",unitIndex:kt,unitCount:it,busId:Zt.busId}),yield}if(vt\u003c0){yn=!1;break}Lt.splice(vt,1)}let Ho=null;if(yn){let qe=null,vt=[];const qt=(nn,zn=new Set)=\u003e{vt=[],Ho=null;const Nn=new Map(nn.flatMap(On=\u003eOn.via?[[On.connectionIndex,On.via.center]]:[])),Co=nn.flatMap(On=\u003eOn.segments.map(uo=\u003e({connectionIndex:On.connectionIndex,segment:uo}))),ei=!g||nn.some(On=\u003eOn.segments.filter(uo=\u003euo.layer===On.sourceLayer).length\u003e1),ro=ei?[]:U,To=ei?nn.flatMap(On=\u003e[On.via,...On.additionalVias??[],On.planeEndpointVia].filter(uo=\u003euo!==void 0).map(uo=\u003e({connectionIndex:On.connectionIndex,center:uo.center,diameter:uo.diameter,spanLayers:uo.spanLayers}))):[],yo=ei?pd(Y,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:new Map([...Xt,...Nn]),blockingSegments:Co,blockingVias:To,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}):null;if(yo)return new Map([...Nn,...yo]);if(p||FA.env.FANOUT_DEBUG_INCREMENTAL_PLANE_MATCH===\"1\"){let On=new Map(Nn);const uo=d?[]:[...ne];for(const Qt of uo)for(const Nt of Qt.connections){const _n=Xt.get(Nt.connectionIndex);_n\u0026\u0026On.set(Nt.connectionIndex,_n)}for(const Qt of uo){const Nt=t.busLayerAssignments[Qt.busId];if(!Nt)return null;const _n=nR({srj:this.routingSrj,bus:Qt,targetLayer:Nt,acceptedPlans:[...nn,...vt],layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache,fixedViaPointsByConnectionIndex:On});if(!_n)return null;vt.push(..._n)}const Oo=Y.filter(Qt=\u003e!uo.includes(Qt)\u0026\u0026!pd([...uo,Qt,...ro],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:On,blockingSegments:Co,blockingVias:To,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we})),ko=Math.min(...Y.map(Qt=\u003ethis.config.layerNames.indexOf(t.busLayerAssignments[Qt.busId]??\"\"))),Ko=g||FA.env.FANOUT_DEBUG_ROUTE_DEEP_PLANES_FIRST===\"1\"?Y.filter(Qt=\u003e!uo.includes(Qt)\u0026\u0026this.config.layerNames.indexOf(t.busLayerAssignments[Qt.busId]??\"\")\u003eko):[],mi=new Set([...zn,...this.config.denseUnrestrictedPlaneRoutingBusIds,...FA.env.FANOUT_DEBUG_ADDITIONAL_ALTERNATE_PLANE_BUS_IDS?.split(\",\")??[]]),Fo=Y.filter(Qt=\u003e!uo.includes(Qt)\u0026\u0026mi.has(Qt.busId)),Nr=[...Ko,...Oo.filter(Qt=\u003e!Ko.includes(Qt)),...Fo.filter(Qt=\u003e!Ko.includes(Qt)\u0026\u0026!Oo.includes(Qt))],Rs=FA.env.FANOUT_DEBUG_ALTERNATE_PLANE_ORDER?.split(\",\")??[],ur=Nr.toSorted((Qt,Nt)=\u003e{const _n=this.config.layerNames.indexOf(t.busLayerAssignments[Qt.busId]??\"\"),qn=this.config.layerNames.indexOf(t.busLayerAssignments[Nt.busId]??\"\");if(_n!==qn\u0026\u0026FA.env.FANOUT_DEBUG_ALTERNATE_IGNORE_LAYERS!==\"1\")return FA.env.FANOUT_DEBUG_ALTERNATE_SHALLOW_FIRST===\"1\"?_n-qn:qn-_n;const En=Rs.indexOf(Qt.busId),Rn=Rs.indexOf(Nt.busId);return(En\u003c0?Rs.length:En)-(Rn\u003c0?Rs.length:Rn)||Qt.connections[0].connectionIndex-Nt.connections[0].connectionIndex});if(Nr.length\u003e0){if(o(\"plane-match:preflight-failed\",Oo.map(Io=\u003eIo.busId)),!p\u0026\u0026FA.env.FANOUT_DEBUG_ROUTE_UNMATCHED_PLANES!==\"1\")return null;let Qt=0;const Nt=Number(FA.env.FANOUT_DEBUG_ALTERNATE_SEARCH_STATES??(u\u0026\u0026(t.planeReservationRetryCount??0)===0?1e4:g?3e6:d?1e4:1e3)),_n=Number(FA.env.FANOUT_DEBUG_ALTERNATE_ROUTE_COUNT??(g?128:8));let qn=0;const En=new Map,Rn=(Io,gi,jo=_n)=\u003e{const oi=t.busLayerAssignments[Io.busId];return oi?BO({srj:this.routingSrj,bus:Io,targetLayer:oi,acceptedPlans:[...nn,...gi],layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache},jo):[]},Hn=(Io,gi)=\u003e{if(Io.length===0)return gi;if(Qt\u003e=Nt)return null;qn=Math.max(qn,ur.length-Io.length);const jo=Io.map(Li=\u003e({planeBus:Li,alternatives:Rn(Li,gi)})),oi=FA.env.FANOUT_DEBUG_DYNAMIC_ALTERNATE_ORDER===\"1\"?jo.toSorted((Li,ys)=\u003eLi.alternatives.length-ys.alternatives.length||ur.indexOf(Li.planeBus)-ur.indexOf(ys.planeBus)):jo,Ji=oi[0],{planeBus:wi,alternatives:Br}=Ji;if(FA.env.FANOUT_DEBUG_ALTERNATE_CHOICES===\"1\"\u0026\u0026Qt\u003c64\u0026\u0026o(\"plane-route:alternate-choice\",`depth:${ur.length-Io.length}`,wi.busId,jo.map(Li=\u003e[Li.planeBus.busId,Li.alternatives.length])),Br.length===0)return En.set(wi.busId,(En.get(wi.busId)??0)+1),null;const oa=(FA.env.FANOUT_DEBUG_BRANCH_ALTERNATE_ORDER===\"1\"?oi:[Ji]).flatMap(Li=\u003eLi.alternatives.map(ys=\u003e({selection:Li,alternative:ys,remaining:Io.filter(dr=\u003edr!==Li.planeBus)}))),hs=FA.env.FANOUT_DEBUG_LEAST_CONSTRAINING_ALTERNATES===\"1\"?oa.map(Li=\u003e{const ys=[...gi,...Li.alternative],dr=Li.remaining.map(cA=\u003eRn(cA,ys,Math.min(4,_n)).length);return{...Li,remainingOptionCounts:dr,minimumRemainingOptions:dr.length===0?Number.POSITIVE_INFINITY:Math.min(...dr),totalRemainingOptions:dr.reduce((cA,vA)=\u003ecA+vA,0)}}).filter(Li=\u003eLi.minimumRemainingOptions!==0).toSorted((Li,ys)=\u003eys.minimumRemainingOptions-Li.minimumRemainingOptions||ys.totalRemainingOptions-Li.totalRemainingOptions):oa;for(const Li of hs){Qt++;const ys=Hn(Li.remaining,[...gi,...Li.alternative]);if(ys)return ys;if(Qt\u003e=Nt)break}return En.set(wi.busId,(En.get(wi.busId)??0)+1),null};let Lo;if(p||FA.env.FANOUT_DEBUG_EXACT_COVER_ALTERNATES===\"1\"){const Io=ur.map(wi=\u003e({planeBus:wi,candidates:Rn(wi,vt).map((Br,gr)=\u003e({key:`${wi.busId}:${gr}`,planeBus:wi,plans:Br}))}));if(m){const wi=[...nn,...vt];for(const Br of Y){if(uo.includes(Br)||Io.some(hs=\u003ehs.planeBus===Br))continue;const gr=[],oa=pw([Br],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,blockingSegments:wi.flatMap(hs=\u003ehs.segments.map(Li=\u003e({connectionIndex:hs.connectionIndex,segment:Li}))),blockingVias:wi.flatMap(hs=\u003e[hs.via,...hs.additionalVias??[],hs.planeEndpointVia].filter(Li=\u003eLi!==void 0).map(Li=\u003e({connectionIndex:hs.connectionIndex,center:Li.center,diameter:Li.diameter,spanLayers:Li.spanLayers}))),additionalObstacles:this.routingSrj.obstacles,preferPlaneCheckerboardSites:!0,canShareCopper:we});for(const hs of oa){const Li=nR({srj:this.routingSrj,bus:Br,targetLayer:t.busLayerAssignments[Br.busId],acceptedPlans:wi,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,fixedViaPointsByConnectionIndex:new Map([[hs.connectionIndex,hs.point]])});Li\u0026\u0026gr.push({key:`${Br.busId}:local:${gr.length}`,planeBus:Br,plans:Li})}Io.push({planeBus:Br,candidates:gr})}}o(\"plane-route:alternate-candidate-counts\",Io.map(wi=\u003e[wi.planeBus.busId,wi.candidates.length]));for(const wi of Io)wi.candidates.length===0\u0026\u0026le.add(wi.planeBus.busId);const gi=new Map,jo=(wi,Br)=\u003e{const gr=[wi.key,Br.key].toSorted().join(\"|\"),oa=gi.get(gr);if(oa!==void 0)return oa;const hs=hNt({plans:[...wi.plans,...Br.plans],srj:this.routingSrj,clearance:this.config.clearance,allowSameNetMerges:te});return gi.set(gr,hs),hs},oi=(wi,Br)=\u003e{if(wi.length===0)return Br;if(Qt\u003e=Nt)return null;qn=Math.max(qn,ur.length-wi.length);const gr=wi.toSorted((Li,ys)=\u003eLi.candidates.length-ys.candidates.length)[0];if(gr.candidates.length===0)return En.set(gr.planeBus.busId,(En.get(gr.planeBus.busId)??0)+1),null;const oa=wi.filter(Li=\u003eLi!==gr),hs=Number(FA.env.FANOUT_DEBUG_ALTERNATE_CANDIDATE_BATCH_SIZE??16);for(let Li=0;Li\u003cgr.candidates.length;Li+=hs){const ys=gr.candidates.slice(Li,Li+hs).map(dr=\u003e{const cA=oa.map(Yl=\u003e({...Yl,candidates:Yl.candidates.filter(H0=\u003ejo(dr,H0))})),vA=cA.map(Yl=\u003eYl.candidates.length);return{candidate:dr,projectedSets:cA,minimumProjectedCount:vA.length===0?Number.POSITIVE_INFINITY:Math.min(...vA),totalProjectedCount:vA.reduce((Yl,H0)=\u003eYl+H0,0)}}).filter(dr=\u003edr.minimumProjectedCount!==0).toSorted((dr,cA)=\u003ecA.minimumProjectedCount-dr.minimumProjectedCount||cA.totalProjectedCount-dr.totalProjectedCount);for(const dr of ys){Qt++;const cA=oi(dr.projectedSets,[...Br,dr.candidate]);if(cA)return cA;if(Qt\u003e=Nt)break}if(Qt\u003e=Nt)break}return En.set(gr.planeBus.busId,(En.get(gr.planeBus.busId)??0)+1),null};let Ji;if(u||h){const wi=oa=\u003eoa.map(hs=\u003e[...new Map(hs.candidates.map(Li=\u003e[JSON.stringify(Li.plans.map(ys=\u003e[ys.segments,ys.via,ys.additionalVias,ys.planeEndpointSegments,ys.planeEndpointVia])),Li])).values()]),gr=((oa,hs=Nt)=\u003ekSo({candidateSets:wi(oa),maximumSearchStates:hs,areCompatible:(Li,ys)=\u003ehNt({plans:[...Li.plans,...ys.plans],srj:this.routingSrj,clearance:this.config.clearance,allowSameNetMerges:te})}))(Io);if(o(\"plane-route:csp\",gr.selection?\"complete\":\"failed\",gr.searchStates,gr.emptyDomainIndices.map(oa=\u003eIo[oa].planeBus.busId)),Ji=gr.selection,Qt=gr.searchStates,!gr.selection\u0026\u0026(u||h)){const oa=gr.emptyDomainIndices.map(hs=\u003eIo[hs].planeBus.busId).filter(hs=\u003e!ur.some(Li=\u003eLi.busId===hs));if(oa.length\u003e0)return o(\"plane-route:expand-domains\",oa),qt(nn,new Set([...zn,...oa]))}if(!gr.selection)for(const oa of(t.planeReservationRetryCount??0)===0?gr.conflictDomainIndices:gr.emptyDomainIndices.slice(0,1))le.add(Io[oa].planeBus.busId)}else Ji=oi(Io,[]);Lo=Ji?[...vt,...Ji.flatMap(wi=\u003ewi.plans)]:null}else Lo=Hn(ur,vt);if(o(\"plane-route:alternate-search\",Lo?\"complete\":\"failed\",Qt,`depth:${qn}/${ur.length}`,[...En].toSorted(([,Io],[,gi])=\u003egi-Io)),!Lo)return null;if(vt=Lo,m)return Ho=[],new Map([...Nn,...Lo.filter(Io=\u003eIo.via).map(Io=\u003e[Io.connectionIndex,Io.via.center])])}let zi=new Set,bi=[...Co],Ar=[],ws=[...Y],ds=new Map,Et=new Map;const Gt=()=\u003e{zi=new Set(vt.map(Nt=\u003eNt.busId));const Qt=vt.flatMap(Nt=\u003e[...Nt.segments,...Nt.planeEndpointSegments??[]].map(_n=\u003e({connectionIndex:Nt.connectionIndex,segment:_n})));bi=[...Co,...Qt],Ar=vt.flatMap(Nt=\u003e[Nt.via,...Nt.additionalVias??[],Nt.planeEndpointVia].flatMap(_n=\u003e_n?[{connectionIndex:Nt.connectionIndex,center:_n.center,diameter:_n.diameter,spanLayers:_n.spanLayers}]:[])),ws=Y.filter(Nt=\u003e!zi.has(Nt.busId)),ds=new Map,Et=new Map;for(const Nt of pw(ws,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,blockingSegments:bi,blockingVias:Ar,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we})){ds.set(Nt.connectionIndex,(ds.get(Nt.connectionIndex)??0)+1);const _n=Et.get(Nt.connectionIndex)??[];_n.push(Nt.point),Et.set(Nt.connectionIndex,_n)}};Gt();for(let Qt=0;Qt\u003cY.length;Qt++){const Nt=ws.filter(_n=\u003e!ds.has(_n.connections[0].connectionIndex));if(Nt.length===0)break;if(o(\"plane-route:promote-zero-candidates\",Nt.map(_n=\u003e_n.busId)),Nt.some(_n=\u003euo.includes(_n)))return null;for(const _n of Nt){const qn=t.busLayerAssignments[_n.busId];if(!qn)return null;const En=BO({srj:this.routingSrj,bus:_n,targetLayer:qn,acceptedPlans:[...nn,...vt],layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache},8)[0];if(!En)return o(\"plane-route:promote-failed\",_n.busId),qt(nn,new Set([...zn,...Nt.map(Rn=\u003eRn.busId)]));vt.push(...En)}Gt()}const Rt=FA.env.FANOUT_DEBUG_PLANE_MATCH_ORDER?.split(\",\")??[],Ht=ws.toSorted((Qt,Nt)=\u003e{const _n=(ds.get(Qt.connections[0].connectionIndex)??0)-(ds.get(Nt.connections[0].connectionIndex)??0);if(_n!==0)return _n;const qn=Rt.indexOf(Qt.busId),En=Rt.indexOf(Nt.busId),Rn=(qn\u003c0?Rt.length:qn)-(En\u003c0?Rt.length:En);return Rn!==0?Rn:Qt.connections[0].connectionIndex-Nt.connections[0].connectionIndex});for(const Qt of Ht){if(uo.includes(Qt))continue;FA.env.FANOUT_DEBUG_PLANE_CANDIDATES?.split(\",\").includes(Qt.busId)\u0026\u0026o(\"plane-match:candidates\",Qt.busId,Et.get(Qt.connections[0].connectionIndex));const Nt=pd([...uo,Qt,...ro],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:On,blockingSegments:bi,blockingVias:[...To,...Ar],additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o(Nt?\"plane-match:incremental\":\"plane-match:incremental-failed\",Qt.busId,ds.get(Qt.connections[0].connectionIndex)??0,Nt?.get(Qt.connections[0].connectionIndex),Nt?.size??\"failed\"),!Nt)return null;On=new Map([...On,...Nt]),uo.push(Qt)}return Ho=uo.filter(Qt=\u003e!zi.has(Qt.busId)),o(\"plane-match:incremental-complete\",On.size),On}const Ro=pd([...Y,...ro],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:Nn,blockingSegments:Co,blockingVias:To,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});return Ro?new Map([...Nn,...Ro]):null};o(\"length-match:start\",Jt.length);const Zt=_?{plans:Jt}:zy({plans:Jt,preparedBuses:this.preparedBuses,inputSrj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,allowMatchingInsideDenseBounds:!0,candidatePlansAreFeasible:nn=\u003e{const zn=qt(nn);return zn?(qe=zn,!0):!1}});if(o(\"length-match:complete\",Zt.plans?.length??\"failed\"),this.setInProgressPlans({phase:\"match-dense-boundary-lengths\",plans:Zt.plans??Jt,strategy:\"default\",unitIndex:++kt,unitCount:it}),yield,Zt.plans){Jt=Zt.plans;const nn=qe??qt(Jt);nn?(Xt=nn,Jt.push(...vt)):yn=!1}else yn=!1;this.setInProgressPlans({phase:\"rematch-dense-via-sites\",plans:Jt,strategy:\"default\",unitIndex:kt,unitCount:it}),yield}if(yn)for(const qe of Ho??Y){o(\"plane-route:start\",qe.busId);const vt=t.busLayerAssignments[qe.busId],qt=new Map;let Zt=vt?nR({srj:this.routingSrj,bus:qe,targetLayer:vt,acceptedPlans:Jt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:qt,fixedViaPointsByConnectionIndex:Xt}):null;if(!Zt\u0026\u0026vt\u0026\u0026a\u0026\u0026(Zt=nR({srj:this.routingSrj,bus:qe,targetLayer:vt,acceptedPlans:Jt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:qt}),Zt\u0026\u0026(Xt=new Map([...Xt,...Zt.flatMap(nn=\u003enn.via?[[nn.connectionIndex,nn.via.center]]:[])]))),!Zt){o(\"plane-route:failed\",qe.busId,Xt.get(qe.connections[0].connectionIndex),[...qt]),yn=!1;break}Jt.push(...Zt),o(\"plane-route:complete\",qe.busId),this.setInProgressPlans({phase:\"route-dense-plane-buses\",plans:Jt,strategy:\"default\",unitIndex:++kt,unitCount:it,busId:qe.busId}),yield}if(yn\u0026\u0026_){const qe={plans:Jt,preparedBuses:this.preparedBuses,inputSrj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0};let vt=zy(qe);const qt=new Set;for(;!vt.plans\u0026\u0026vt.failedBus\u0026\u0026!qt.has(vt.failedBus.busId);){const Zt=vt.failedBus;qt.add(Zt.busId);const nn=_vo({plans:Jt,bus:Zt,srj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,allowSameNetMerges:te});if(nn.every((zn,Nn)=\u003ezn===Jt[Nn]))break;Jt=nn,vt=zy({...qe,plans:Jt})}vt.plans?Jt=vt.plans:yn=!1,this.setInProgressPlans({phase:\"match-dense-complete-lengths\",plans:Jt,strategy:\"default\",unitIndex:++kt,unitCount:it}),yield}const Ao=yn\u0026\u0026Wh({plans:Jt,srj:this.routingSrj,sharedBoundary:U[0].sharedBoundary,clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:te});if(o(\"dense-validation\",yn,Jt.length,Ao),Ao){const qe=this.normalizeCompletePlanCorners(Jt);if(qe){const vt=aR({inputSrj:this.inputSrj,plans:qe,layerNames:this.config.layerNames});if(this.validateCompletePlans(qe,vt).valid)return{plans:qe,failedBusIds:[],stopAfterCompleteValidation:!0}}}}if((u||h)\u0026\u0026le.size\u003e0\u0026\u0026(t.planeReservationRetryCount??0)\u003c5){const Xe=[...le].filter(dt=\u003e!ne.some(Ut=\u003eUt.busId===dt)),Ze=(t.planeReservationRetryCount??0)===0?FSo({candidateBusIds:Xe,activeBusIds:new Set(ne.map(dt=\u003edt.busId)),planeBuses:Y}):Xe;if(Ze.length\u003e0)return o(\"plane-reservation-core\",Ze),o(\"promote-reservations\",Ze),yield*this.routeDenseThroughAllMixedTerminationSteps({...t,preferredBoundaryViaPoints:e,promotedPlaneReservationBusIds:[...t.promotedPlaneReservationBusIds??[],...Ze],planeReservationRetryCount:(t.planeReservationRetryCount??0)+1})}if(_\u0026\u0026!ge)return yield*this.routeDenseThroughAllMixedTerminationSteps({...t,lengthMatchingStage:\"before-planes\"});if(n\u0026\u0026!g){const Xe=yield*this.routeDenseThroughAllMixedTerminationSteps({...t,denseRoutingStrategy:\"boundary-aligned\"});if(Xe)return Xe;if(!d\u0026\u0026_e){const Ze=_e.busId,dt=he.get(Ze)??!0,Ut=ve.get(Ze)??1;for(const[Wt,Xt]of[[!dt,-Ut],[!dt,Ut],[dt,-Ut],[dt,Ut]]){const Jt=yield*this.routeDenseThroughAllMixedTerminationSteps({...t,boundaryRecovery:{busId:Ze,preferOutward:Wt,perpendicularSide:Xt}});if(Jt)return Jt}}}if(!n||FA.env.FANOUT_DEBUG_DENSE_ONLY===\"1\")return null;const Yt=8,pn=(Xe,Ze=[])=\u003e{let dt=[{plans:[...Ze],failedBusIds:[]}];for(const Ut of U){const Wt=t.busLayerAssignments[Ut.busId];if(!Wt)return null;const Xt=[],Jt=dt.map(yn=\u003e({state:yn,alternatives:BO({srj:this.routingSrj,bus:Ut,targetLayer:Wt,acceptedPlans:yn.plans,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache},Xe)}));for(let yn=0;yn\u003cXe;yn++){for(const{state:An,alternatives:kn}of Jt){const $n=kn[yn];if($n\u0026\u0026(Xt.push({plans:[...An.plans,...$n],failedBusIds:[]}),Xt.length\u003e=Yt))break}if(Xt.length\u003e=Yt)break}if(Xt.length===0)return null;dt=Xt}return dt},be=Xe=\u003e{if(U.length!==2)return null;const[Ze,dt]=U;if(!Ze||!dt)return null;const Ut=(ht,Kt,rn)=\u003e{const Lt=t.busLayerAssignments[ht.busId];return Lt?BO({srj:this.routingSrj,bus:ht,targetLayer:Lt,acceptedPlans:Kt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,rejectedViaMinimalCandidates:rn,stopAfterFirstRejectedViaMinimalCandidate:rn!==void 0},1)[0]??null:null},Wt=Ut(Ze,[...Xe]);if(!Wt)return null;const Xt=[],Jt=Ut(dt,[...Xe,...Wt],Xt);if(Jt)return{plans:[...Xe,...Wt,...Jt],failedBusIds:[]};const yn=Xt[0];if(!yn)return null;const An=yn.map(ht=\u003e({...ht,termination:{type:\"plane\",layer:ht.targetLayer}})),kn=Ut(Ze,[...Xe,...An]);if(!kn)return null;const $n=[...Xe,...kn,...yn];return Wh({plans:$n,srj:this.routingSrj,sharedBoundary:Ze.sharedBoundary,clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges})?{plans:$n,failedBusIds:[]}:null},et=new Map(Y.map(Xe=\u003e[Xe.busId,Xe])),It=(Xe,Ze,dt)=\u003e{const Ut=t.busLayerAssignments[Xe.busId];return Ut?nR({srj:this.routingSrj,bus:Xe,targetLayer:Ut,acceptedPlans:Ze,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:dt}):null},Bt=(Xe,Ze)=\u003e{const dt={plans:[...Xe],failedBusIds:[]};for(const Ut of Ze){const Wt=new Map;let Xt=It(Ut,dt.plans,Wt);if(!Xt){const Jt=[...Wt.entries()].filter(([An])=\u003edt.plans.some(kn=\u003ekn.busId===An)).filter(([An])=\u003eet.has(An)).toSorted(([,An],[,kn])=\u003ekn-An).slice(0,8).map(([An])=\u003eAn),yn=[...Jt.map(An=\u003e[An]),...Jt.flatMap((An,kn)=\u003eJt.slice(kn+1).map($n=\u003e[An,$n]))];for(const An of yn){const kn=new Set(An),$n=dt.plans.filter(rn=\u003e!kn.has(rn.busId)),ht=It(Ut,$n);if(!ht)continue;$n.push(...ht);let Kt=!0;for(const rn of An){const Lt=et.get(rn),Ho=Lt?It(Lt,$n):null;if(!Ho){Kt=!1;break}$n.push(...Ho)}if(Kt){dt.plans=$n,Xt=[];break}}}Xt?dt.plans.push(...Xt):dt.failedBusIds.push(Ut.busId)}return dt};let mt=null,st=null;const xt=(Xe,Ze)=\u003e{let dt=null;for(const Ut of Xe){let Wt=[...Ze];const Xt=new Set;for(let Jt=0;Jt\u003c3;Jt++){const yn=Wt.map($n=\u003e$n.busId).join(\"\\0\");if(Xt.has(yn))break;Xt.add(yn);const An=Bt(Ut.plans,Wt);if((!mt||An.plans.length\u003emt.plans.length||An.plans.length===mt.plans.length\u0026\u0026An.failedBusIds.length\u003cmt.failedBusIds.length)\u0026\u0026(mt=An),(!dt||An.plans.length\u003edt.plans.length||An.plans.length===dt.plans.length\u0026\u0026An.failedBusIds.length\u003cdt.failedBusIds.length)\u0026\u0026(dt=An),An.failedBusIds.length===0)return An;const kn=new Set(An.failedBusIds);Wt=[...An.failedBusIds.flatMap($n=\u003e{const ht=et.get($n);return ht?[ht]:[]}),...Wt.filter($n=\u003e!kn.has($n.busId))]}}return st=dt,null};for(const Xe of[1,4]){const Ze=pn(Xe);if(!Ze)continue;const dt=xt(Ze,Y);if(dt)return dt;const Ut=mt?.failedBusIds.slice(0,3);if(Xe===1\u0026\u0026Ut)for(const Wt of Ut){const Xt=[],Jt=new Set;let yn=Wt;for(let $n=0;$n\u003c3\u0026\u0026yn;$n++){const ht=et.get(yn);if(!ht)break;const Kt=It(ht,Xt);if(!Kt)break;Xt.push(...Kt),Jt.add(yn);const rn=be(Xt);if(!rn)break;const Lt=xt([rn],Y.filter(Ao=\u003e!Jt.has(Ao.busId)));if(Lt)return Lt;yn=st?.failedBusIds?.find(Ao=\u003e!Jt.has(Ao))}if(Xt.length===0)continue;const An=pn(1,Xt);if(!An)continue;const kn=xt(An,Y.filter($n=\u003e!Jt.has($n.busId)));if(kn)return kn}}return mt}*evaluateAssignmentWithStrategySteps(t,e,n){let o=[],i=[],r=new Map;const s=this.config.escapeLayers.length===1,a=s\u0026\u0026this.config.singleLayerPushAndShove\u0026\u0026!this.preparedBuses.some(y=\u003ey.exitEdge\u0026\u0026y.preferredExit?.includes(\"-\"));if(a){const y={srj:this.routingSrj,buses:this.preparedBuses,traceWidth:this.config.traceWidth,clearance:this.config.clearance,borderDistribution:this.config.borderDistribution};let x=pvo(y);!x\u0026\u0026this.config.singleLayerAdaptiveExits\u0026\u0026(this.setInProgressPlans({phase:\"prepare-single-layer-adaptive-exits\",plans:o,strategy:n}),yield,this.setInProgressPlans({phase:\"route-single-layer-adaptive-exits\",plans:o,strategy:n}),this.activeAdaptiveVisualization=null,x=yield{type:\"subsolver\",solver:this.createWorkSolver(\"SingleLayerAdaptiveExitSolver\",AR({...y,availableBoundaryRegions:ONt(this.options.availableCornersAndSides),onProgress:(B,S)=\u003e{this.activeAdaptiveVisualization=B,this.stats={...this.stats,...S}}}),void 0,()=\u003ethis.visualizeAdaptiveRoutingState())}),x?o.push(...x):i.push(...this.preparedBuses.map(E=\u003eE.busId)),this.setInProgressPlans({phase:\"route-single-layer\",plans:o,strategy:n,unitIndex:1,unitCount:1}),yield}const A=[...this.preparedBuses].sort((y,x)=\u003e{const E=a6(y),B=a6(x),S=this.config.layerNames.indexOf(e[y.busId]??\"\"),Q=this.config.layerNames.indexOf(e[x.busId]??\"\");return lRt(y,x,this.config.allowBlindAndBuriedVias)||Number(B)-Number(E)||(E\u0026\u0026B?Q-S:0)||(n===\"group-by-layer\"?(e[y.busId]??\"\").localeCompare(e[x.busId]??\"\"):0)||x.componentObstacles.length-y.componentObstacles.length||(s?wO(x)-wO(y):x.connections.length-y.connections.length||(n===\"deep-first\"?wO(x)-wO(y):wO(y)-wO(x)))});let c=null;!a\u0026\u0026n===\"default\"\u0026\u0026(c=yield{type:\"subsolver\",solver:this.createWorkSolver(\"PeripheralMixedTerminationSolver\",this.routePeripheralMixedTerminationSteps({busLayerAssignments:e,busesInRoutingOrder:A}))}),!c\u0026\u0026!a\u0026\u0026n===\"default\"\u0026\u0026(c=yield{type:\"subsolver\",solver:this.createWorkSolver(\"DenseMixedTerminationSolver\",this.routeDenseThroughAllMixedTerminationSteps({busLayerAssignments:e,busesInRoutingOrder:A}),()=\u003e{const x=Number(this.stats.workUnit??0),E=Number(this.stats.workUnitCount??0);return E\u003e0?x/E:0})}),!c\u0026\u0026!a\u0026\u0026n===\"default\"\u0026\u0026FA.env.FANOUT_DEBUG_DENSE_ONLY===\"1\"\u0026\u0026(c={plans:[],failedBusIds:this.preparedBuses.map(y=\u003ey.busId)}),c\u0026\u0026(o=c.plans,i=c.failedBusIds,this.setInProgressPlans({phase:\"route-dense-mixed-terminations\",plans:o,strategy:n,unitIndex:this.preparedBuses.length,unitCount:this.preparedBuses.length}),yield);let l=`${n}|`,u=0;for(const y of a||c?[]:A){u++;const x=e[y.busId];if(!x)throw new Error(`FanoutSolver: assignment ${t} has no layer for bus \"${y.busId}\"`);l+=`${y.busId.length}:${y.busId};${x.length}:${x};`;const E=this.routingPrefixCache.get(l);if(E){o=[...E.plans],i=[...E.failedBusIds],r=new Map(E.blockingBusCounts),this.setInProgressPlans({phase:\"route-assignment\",plans:o,strategy:n,unitIndex:u,unitCount:A.length,busId:y.busId}),yield;continue}const B=new Map,S=nR({srj:this.routingSrj,bus:y,targetLayer:x,acceptedPlans:o,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:B});if(S)o.push(...S);else{i.push(y.busId);for(const[Q,w]of B)r.set(Q,(r.get(Q)??0)+w)}this.routingPrefixCache.set(l,{plans:[...o],failedBusIds:[...i],blockingBusCounts:new Map(r)}),this.setInProgressPlans({phase:\"route-assignment\",plans:o,strategy:n,unitIndex:u,unitCount:A.length,busId:y.busId}),yield}let g;const h=c?.stopAfterCompleteValidation===!0\u0026\u0026o.length===this.inputSrj.connections.length;if(!h\u0026\u0026o.length===this.inputSrj.connections.length){const y=this.matchCompletePlanLengths(o);if(y.plans)o=y.plans;else{const x=y.failedBus,E={code:\"bus-length-skew\",message:`Bus ${x.busId} could not satisfy its ${x.maxLengthSkew.toFixed(6)}mm routed-length skew within the fanout boundary`,busId:x.busId};g=[E],this.lengthMatchingFailure??=E,o=[],i=[x.busId,...this.preparedBuses.map(B=\u003eB.busId).filter(B=\u003eB!==x.busId)],r.clear()}}if(!h\u0026\u0026o.length===this.inputSrj.connections.length){const y=this.normalizeCompletePlanCorners(o);y?o=y:(g=[{code:\"fanout-normalization\",message:\"Completed fanout could not normalize every corner while preserving its original clearance and length constraints\"}],o=[],i=this.preparedBuses.map(x=\u003ex.busId),r.clear())}let d=aR({inputSrj:this.inputSrj,plans:o,layerNames:this.config.layerNames});const p=o.length===this.inputSrj.connections.length?this.validateCompletePlans(o,d):null;p\u0026\u0026!p.valid\u0026\u0026(g=p.issues,o=[],i=this.preparedBuses.map(y=\u003ey.busId),r.clear(),d=aR({inputSrj:this.inputSrj,plans:o,layerNames:this.config.layerNames}));const m=this.preparedBuses.length-i.length,_=o.reduce((y,x)=\u003ey+x.length,0),I=(this.inputSrj.connections.length-o.length)*1e6+i.length*1e5+_+bue(o)*.1+Eue(e,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config),C={assignmentIndex:t,busLayerAssignments:e,routedBusCount:m,routedConnectionCount:o.length,failedBusIds:i,score:I,...g?{validationIssues:g}:{}};return this.setInProgressPlans({phase:\"finalize-assignment-strategy\",plans:o,strategy:n}),{summary:C,plans:o,...c?.stopAfterCompleteValidation\u0026\u0026p?.valid?{stopAfterCompleteValidation:!0}:{},blockingBusIds:[...r.entries()].toSorted(([,y],[,x])=\u003ex-y).map(([y])=\u003ey),outputSrj:d}}*evaluateAssignmentSteps(t,e){let n=yield*this.evaluateAssignmentWithStrategySteps(t,e,\"default\");if(FA.env.FANOUT_DEBUG_DENSE_ONLY===\"1\"||n.summary.routedConnectionCount===this.inputSrj.connections.length\u0026\u0026(n.stopAfterCompleteValidation||this.getCoordinatedAdditionalViaCount(n.plans)===0))return n;for(const o of[\"group-by-layer\",\"deep-first\"]){const i=yield*this.evaluateAssignmentWithStrategySteps(t,e,o);if(this.isAttemptBetter(i,n)\u0026\u0026(n=i),n.summary.routedConnectionCount===this.inputSrj.connections.length\u0026\u0026(n.stopAfterCompleteValidation||this.getCoordinatedAdditionalViaCount(n.plans)===0))return n}return n}*evaluateGroupedBeamSteps(t,e=!1){if(this.config.escapeLayers.length\u003c2||this.preparedBuses.length\u003e56)return null;const n=this.inputSrj.connections.length;if(n\u003e64||new Set(this.preparedBuses.map(C=\u003eC.componentId)).size!==1)return null;const o=C=\u003e{const y=this.config.layerNames.indexOf(C.connections[0]?.sourceLayer??\"\"),x=C.termination.type===\"plane\"?[C.termination.layer]:this.escapeLayersByBusId[C.busId]??this.config.escapeLayers;return Math.max(0,...x.map(E=\u003eMath.abs(this.config.layerNames.indexOf(E)-y)))},i=[...this.preparedBuses].sort((C,y)=\u003e{const x=a6(C),E=a6(y),B=C.termination.type===\"plane\"?1:this.escapeLayersByBusId[C.busId]?.length??this.config.escapeLayers.length,S=y.termination.type===\"plane\"?1:this.escapeLayersByBusId[y.busId]?.length??this.config.escapeLayers.length;return lRt(C,y,this.config.allowBlindAndBuriedVias)||Number(E)-Number(x)||(x\u0026\u0026E?o(y)-o(C):0)||(e?C.direction.localeCompare(y.direction):0)||B-S||y.componentObstacles.length-C.componentObstacles.length||y.connections.length-C.connections.length||oMe(y)-oMe(C)||C.busId.localeCompare(y.busId)}),r=n\u003c=24,s=this.preparedBuses.some(C=\u003eC.connections.length\u003e1),a=r?48:n\u003c=32?24:12,A=r\u0026\u0026!s?4:1;let c=[{assignment:{},plans:[]}];const l=C=\u003e{const y=C.plans.reduce((B,S)=\u003eB+S.length,0),x=bue(C.plans),E=this.preparedBuses.reduce((B,S)=\u003e{if(S.termination.type!==\"boundary\"||!nMe(S))return B;const Q=S.connections[0]?.sourceLayer,w=PO(S)??Q;return C.assignment[S.busId]===w?B:B+S.connections.length},0);return y+x*.1+E*1e4+Eue(C.assignment,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config)};let u=0;for(const C of i){u++;const y=[];for(const E of c){const B=C.termination.type===\"plane\"?[C.termination.layer]:this.escapeLayersByBusId[C.busId]??this.config.escapeLayers,S=new Map;for(const[R,F]of Object.entries(E.assignment)){const O=this.preparedBuses.find(U=\u003eU.busId===R);S.set(F,(S.get(F)??0)+(this.config.balanceLayerLoadByConnectionCount?O?.connections.length??1:1))}const Q=C.connections[0]?.sourceLayer,w=PO(C),M=nMe(C),k=B.toSorted((R,F)=\u003e(S.get(R)??0)-(S.get(F)??0)||+(F===w)-+(R===w)||(M?+(F===Q)-+(R===Q):+(R===Q)-+(F===Q))||R.localeCompare(F));for(const R of k){const F=BO({srj:this.routingSrj,bus:C,targetLayer:R,acceptedPlans:E.plans,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache},A);for(const O of F)y.push({assignment:{...E.assignment,[C.busId]:R},plans:[...E.plans,...O]})}}if(y.length===0)return null;y.sort((E,B)=\u003e{const S=this.getCoordinatedAdditionalViaCount(E.plans)-this.getCoordinatedAdditionalViaCount(B.plans);if(S!==0)return S;const Q=l(E)-l(B);return Math.abs(Q)\u003e1e-9?Q:JSON.stringify(E.assignment).localeCompare(JSON.stringify(B.assignment))});const x=new Map;c=[];for(const E of y){const B=JSON.stringify(E.assignment),S=x.get(B)??0;if(!(S\u003e=2)\u0026\u0026(x.set(B,S+1),c.push(E),c.length\u003e=a))break}this.setInProgressPlans({phase:\"route-grouped-beam\",plans:c[0]?.plans??[],strategy:\"grouped-beam\",unitIndex:u,unitCount:i.length,busId:C.busId}),yield}let g,h,d=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY;const m=C=\u003eC.plans.reduce((y,x)=\u003ey+x.length,0)+bue(C.plans)*.1+Eue(C.assignment,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config),_=this.preparedBuses.some(C=\u003eC.maxLengthSkew!==void 0);for(const C of c){if(C.plans.length!==this.inputSrj.connections.length){yield;continue}const y=this.matchCompletePlanLengths(C.plans);if(!y.plans){yield;continue}const x=this.normalizeCompletePlanCorners(y.plans);if(!x){yield;continue}const E=aR({inputSrj:this.inputSrj,plans:x,layerNames:this.config.layerNames});if(!this.validateCompletePlans(x,E).valid){yield;continue}const B={...C,plans:x},S=this.getCoordinatedAdditionalViaCount(x),Q=m(B);if((!g||S\u003cp||S===p\u0026\u0026Q\u003cd)\u0026\u0026(g=B,h=E,d=Q,p=S),!_)break;this.setInProgressPlans({phase:\"validate-grouped-beam\",plans:x,strategy:\"grouped-beam\"}),yield}if(!g||!h)return null;const f=d;return Number.isFinite(f)?{summary:{assignmentIndex:t,busLayerAssignments:g.assignment,routedBusCount:this.preparedBuses.length,routedConnectionCount:g.plans.length,failedBusIds:[],score:f},plans:g.plans,blockingBusIds:[],outputSrj:h}:null}*evaluateGroupedBeamAlternativesSteps(t){const e=yield*this.evaluateGroupedBeamSteps(t);return e||(yield*this.evaluateGroupedBeamSteps(t,!0))}prioritizeFailedBusRepairs(t,e,n){const o=JSON.stringify(t),i=this.assignmentRepairDepthByKey.get(o)??0;if(i\u003e=2)return;const r=8,s=[],a=new Set,A=l=\u003e{const u=JSON.stringify(l);a.has(u)||this.evaluatedAssignmentKeys.has(u)||this.queuedAssignmentKeys.has(u)||(a.add(u),this.queuedAssignmentKeys.add(u),this.assignmentRepairDepthByKey.set(u,i+1),s.push(l))},c=[];for(let l=0;l\u003cMath.max(e.length,n.length);l++){const u=e[l],g=n[l];u\u0026\u0026!c.includes(u)\u0026\u0026c.push(u),g\u0026\u0026!c.includes(g)\u0026\u0026c.push(g)}for(const l of e){const u=t[l],g=this.escapeLayersByBusId[l];if(!(!u||!g)){for(const h of n.slice(0,4)){const d=t[h],p=this.escapeLayersByBusId[h];if(!(!d||!p||!g.includes(d)||!p.includes(u))\u0026\u0026(A({...t,[l]:d,[h]:u}),s.length\u003e=r))break}if(s.length\u003e=r)break}}for(const l of c){const u=t[l],g=this.escapeLayersByBusId[l];if(!u||!g)continue;const h=g.indexOf(u);for(let d=1;d\u003cg.length;d++){const p=g[(Math.max(h,0)+d)%g.length];if(p!==u\u0026\u0026(A({...t,[l]:p}),s.length\u003e=r))break}if(s.length\u003e=r)break}this.pendingRepairAssignments.push(...s)}hasCompleteBestAttempt(){return this.bestAttempt?.summary.routedConnectionCount===this.inputSrj.connections.length}getCoordinatedAdditionalViaCount(t){const e=new Set(this.preparedBuses.filter(a6).map(n=\u003en.busId));return t.reduce((n,o)=\u003en+(e.has(o.busId)?o.additionalVias?.length??0:0),0)}isAttemptBetter(t,e){if(t.summary.routedConnectionCount!==e.summary.routedConnectionCount)return t.summary.routedConnectionCount\u003ee.summary.routedConnectionCount;if(t.summary.routedBusCount!==e.summary.routedBusCount)return t.summary.routedBusCount\u003ee.summary.routedBusCount;const n=this.getCoordinatedAdditionalViaCount(t.plans),o=this.getCoordinatedAdditionalViaCount(e.plans);return n!==o?n\u003co:t.summary.score\u003ce.summary.score}hasGloballyViaMinimalBestAttempt(){return!this.hasCompleteBestAttempt()||!this.bestAttempt||this.preparedBuses.length===0||!this.preparedBuses.every(a6)?!1:this.bestAttempt.plans.every(t=\u003et.via!==void 0\u0026\u0026(t.additionalVias?.length??0)===0)}shouldEvaluateGroupedBeam(){return this.groupedBeamEvaluated||this.nextAssignmentIndex===0?!1:this.hasCompleteBestAttempt()||this.pendingRepairAssignments.length===0||this.nextAssignmentIndex\u003e=this.config.maxLayerCombinations}commitGroupedBeamAttempt(t){if(!t){this.hasCompleteBestAttempt()\u0026\u0026this.bestAttempt\u0026\u0026this.getCoordinatedAdditionalViaCount(this.bestAttempt.plans)===0\u0026\u0026(this.completeBestAttemptEndpoints(),this.solved=!0);return}this.attempts.push(t.summary),(!this.bestAttempt||this.isAttemptBetter(t,this.bestAttempt))\u0026\u0026(this.bestAttempt=t);const e=this.bestAttempt.summary;this.stats={phase:\"complete-grouped-beam\",assignment:e.assignmentIndex\u003c0?0:e.assignmentIndex+1,assignmentCount:this.config.maxLayerCombinations,routedBuses:`${e.routedBusCount}/${this.preparedBuses.length}`,routedConnections:`${e.routedConnectionCount}/${this.inputSrj.connections.length}`,failedBuses:\"none\",bestScore:e.score},this.getCoordinatedAdditionalViaCount(this.bestAttempt.plans)===0\u0026\u0026(this.completeBestAttemptEndpoints(),this.solved=!0)}commitAssignmentAttempt(t,e){this.nextAssignmentIndex++,this.evaluatedAssignmentKeys.add(JSON.stringify(t)),(!this.bestAttempt||e.summary.routedConnectionCount\u003e=this.bestAttempt.summary.routedConnectionCount)\u0026\u0026this.prioritizeFailedBusRepairs(t,e.summary.failedBusIds,e.blockingBusIds),this.attempts.push(e.summary),(!this.bestAttempt||this.isAttemptBetter(e,this.bestAttempt))\u0026\u0026(this.bestAttempt=e),this.stats={phase:\"complete-assignment\",assignment:e.summary.assignmentIndex+1,assignmentCount:this.config.maxLayerCombinations,routedBuses:`${e.summary.routedBusCount}/${this.preparedBuses.length}`,routedConnections:`${e.summary.routedConnectionCount}/${this.inputSrj.connections.length}`,failedBuses:e.summary.failedBusIds.join(\", \")||\"none\",bestScore:this.bestAttempt.summary.score},(e.stopAfterCompleteValidation\u0026\u0026this.hasCompleteBestAttempt()||this.groupedBeamEvaluated\u0026\u0026e.summary.routedConnectionCount===this.inputSrj.connections.length\u0026\u0026this.getCoordinatedAdditionalViaCount(this.bestAttempt.plans)===0)\u0026\u0026(this.completeBestAttemptEndpoints(),this.solved=!0)}getNextAssignment(){let t;for(;!t\u0026\u0026this.nextAssignmentIndex\u003cthis.config.maxLayerCombinations;){const e=this.nextAssignmentIndex%3===0;let n,o=!1;if(!this.groupedBeamEvaluated\u0026\u0026this.nextAssignmentIndex\u003e0?(n=this.pendingRepairAssignments.pop(),o=n!==void 0):e?n=this.layerAssignments[this.nextGeneratedAssignmentIndex++]:(n=this.pendingRepairAssignments.pop(),o=n!==void 0),!n\u0026\u0026(this.groupedBeamEvaluated||this.nextAssignmentIndex===0)\u0026\u0026(n=e?this.pendingRepairAssignments.pop():this.layerAssignments[this.nextGeneratedAssignmentIndex++],o=e\u0026\u0026n!==void 0),!n)break;const i=JSON.stringify(n);o\u0026\u0026this.queuedAssignmentKeys.delete(i),!this.evaluatedAssignmentKeys.has(i)\u0026\u0026(t=n)}return t}finishWithoutAnotherAssignment(){if(this.hasCompleteBestAttempt()){this.completeBestAttemptEndpoints(),this.solved=!0;return}this.failed=!0;const t=this.lengthMatchingFailure?.message??this.bestAttempt?.summary.validationIssues?.[0]?.message;this.error=t?`FanoutSolver: ${t}`:this.bestAttempt?`FanoutSolver: best layer assignment routed ${this.bestAttempt.summary.routedConnectionCount}/${this.inputSrj.connections.length} connections`:\"FanoutSolver: no layer assignment could be evaluated\"}_step(){if(this.activeOperation){this.stepActiveOperation();return}if(!this.layerReservedRoutingEvaluated){this.layerReservedRoutingEvaluated=!0;const e=vSo(this.preparedBuses,this.config.allowBlindAndBuriedVias),n=!e\u0026\u0026KPe({...this.config,srj:this.routingSrj,buses:this.preparedBuses})!==null;if(n||e||this.shouldTryLayerReservedRouting()){this.startOperation({name:\"FanoutLayerReservedSolver\",generator:this.evaluateLayerReservedRoutingSteps(e,n),onSolved:o=\u003e{if(!o){this.inProgressPlans=[],this.stats={phase:\"layer-reserved-fallback\"};return}const i=o.summary.busLayerAssignments;this.layerAssignments.push(i),this.routingInitialized=!0,this.commitAssignmentAttempt(i,o)},getProgress:()=\u003eNumber(this.stats.workUnit??0)/Math.max(1,this.inputSrj.connections.length)}),this.stats={phase:\"prepare-layer-reserved-routing\"};return}}if(!this.routingInitialized){this.startOperation({name:\"FanoutCandidateLayerSolver\",generator:this.initializeRoutingSteps(),onSolved:()=\u003e{},getProgress:()=\u003ethis.nextCandidateLayerBusIndex/Math.max(1,this.boundaryBuses.length+1)});return}if(this.nextAssignmentIndex\u003e0\u0026\u0026this.hasGloballyViaMinimalBestAttempt()){this.completeBestAttemptEndpoints(),this.solved=!0;return}if(this.shouldEvaluateGroupedBeam()){this.groupedBeamEvaluated=!0,this.startOperation({name:\"FanoutGroupedBeamSolver\",generator:this.evaluateGroupedBeamAlternativesSteps(-1),onSolved:e=\u003ethis.commitGroupedBeamAttempt(e),getProgress:()=\u003e{const e=Number(this.stats.workUnit??0),n=Number(this.stats.workUnitCount??0);return n\u003e0?e/n:0}}),this.stats={...this.stats,phase:\"prepare-grouped-beam\"};return}const t=this.getNextAssignment();if(!(!t\u0026\u0026!this.groupedBeamEvaluated)){if(!t){this.finishWithoutAnotherAssignment();return}this.startOperation({name:\"FanoutAssignmentSolver\",generator:this.evaluateAssignmentSteps(this.nextAssignmentIndex,t),onSolved:e=\u003ethis.commitAssignmentAttempt(t,e),getProgress:()=\u003e{const e=this.stats.routingStrategy===\"group-by-layer\"?1:this.stats.routingStrategy===\"deep-first\"?2:0,n=Number(this.stats.workUnit??0),o=Number(this.stats.workUnitCount??0),i=o\u003e0?Math.min(1,n/o):0;return(e+i)/3}}),this.stats={...this.stats,phase:\"prepare-assignment\",assignment:this.nextAssignmentIndex+1,assignmentCount:this.config.maxLayerCombinations,routedConnections:`0/${this.inputSrj.connections.length}`}}}computeProgress(){if(this.solved||this.failed)return 1;if(this.activeSubSolver?.getSolverName()===\"FanoutLayerReservedSolver\")return Math.min(.99,Number(this.stats.workUnit??0)/Math.max(1,this.inputSrj.connections.length));if(!this.routingInitialized)return .05*(this.nextCandidateLayerBusIndex/Math.max(1,this.boundaryBuses.length+1));let t=0;if(this.activeSubSolver?.getSolverName()===\"FanoutAssignmentSolver\"){const e=this.stats.routingStrategy===\"group-by-layer\"?1:this.stats.routingStrategy===\"deep-first\"?2:0,n=Number(this.stats.workUnit??0),o=Number(this.stats.workUnitCount??0),i=o\u003e0?Math.min(1,n/o):0;t=(e+i)/3}return Math.min(.99,.05+.95*((this.nextAssignmentIndex+t)/this.config.maxLayerCombinations))}getConstructorParams(){return[this.inputSrj,this.options]}getOutput(){if(!this.solved||!this.bestAttempt)throw new Error(\"FanoutSolver: getOutput() called before a complete fanout was solved\");const t=this.validateCompletePlans(this.bestAttempt.plans,this.bestAttempt.outputSrj);if(!t.valid)throw new Error(`FanoutSolver: completed output failed validation: ${t.issues[0]?.message??\"unknown validation error\"}`);const e=OSo({srj:this.endpointCompletion?.simpleRouteJson??this.bestAttempt.outputSrj,layerNames:this.config.layerNames,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias}),n=new Map((e.traces??[]).map(o=\u003e[o.pcb_trace_id,o]));return{simpleRouteJson:e,fanoutTraces:this.bestAttempt.plans.flatMap(o=\u003e[n.get(o.trace.pcb_trace_id)??o.trace,...o.planeEndpointTrace?[n.get(o.planeEndpointTrace.pcb_trace_id)??o.planeEndpointTrace]:[]]),completionTraces:(this.endpointCompletion?.traces??[]).map(o=\u003en.get(o.pcb_trace_id)??o),...this.endpointCompletion?{endpointCompletion:this.endpointCompletion.report}:{},planeTerminations:this.bestAttempt.plans.flatMap(o=\u003eo.termination.type===\"plane\"\u0026\u0026o.via?[{busId:o.busId,connectionName:o.connectionName,layer:o.termination.layer,via:o.via}]:[]),busLayerAssignments:this.bestAttempt.summary.busLayerAssignments,busDirections:Object.fromEntries(this.preparedBuses.map(o=\u003e[o.busId,o.direction])),attempts:[...this.attempts],validation:t}}getOutputSimpleRouteJson(){return this.getOutput().simpleRouteJson}visualize(){return this.activeSubSolver?.visualize()??this.visualizeCurrentState()}},$vo=t=\u003e{if(typeof t!=\"object\"){const e=lt.parse(t);return{top:e,right:e,bottom:e,left:e}}return{top:t.top===void 0?0:lt.parse(t.top),right:t.right===void 0?0:lt.parse(t.right),bottom:t.bottom===void 0?0:lt.parse(t.bottom),left:t.left===void 0?0:lt.parse(t.left)}},qvo=t=\u003e{const e=(t.ccwRotationDegrees??0)*Math.PI/180,n=Math.abs(Math.cos(e)),o=Math.abs(Math.sin(e));return{x:(n*t.width+o*t.height)/2,y:(o*t.width+n*t.height)/2}},Xvo=({preparedBuses:t,padding:e})=\u003e{if(e===void 0)return;const n=new Map;for(const a of t)n.has(a.componentId)||n.set(a.componentId,a.componentObstacles.filter(A=\u003eA.connectedTo.length\u003e0));const o=[...n.values()].flat();if(o.length===0)throw new Error(\"Cannot apply fanout boundary padding without source pad obstacles\");const i=o.map(a=\u003e{const A=qvo(a);return{minX:a.center.x-A.x,maxX:a.center.x+A.x,minY:a.center.y-A.y,maxY:a.center.y+A.y}}),r=$vo(e),s={minX:Math.min(...i.map(a=\u003ea.minX))-r.left,maxX:Math.max(...i.map(a=\u003ea.maxX))+r.right,minY:Math.min(...i.map(a=\u003ea.minY))-r.bottom,maxY:Math.max(...i.map(a=\u003ea.maxY))+r.top};for(const a of t)if(a.termination.type===\"boundary\")for(const A of a.connections)a.direction===\"left\"||a.direction===\"right\"?(s.minY=Math.min(s.minY,A.targetPoint.y),s.maxY=Math.max(s.maxY,A.targetPoint.y)):(s.minX=Math.min(s.minX,A.targetPoint.x),s.maxX=Math.max(s.maxX,A.targetPoint.x));return s},Zvo=t=\u003eMath.round(t*1e3)/1e3,ewo=(t,e)=\u003e{let n;for(const o of t.obstacles){if(!o.componentId||!e.has(o.componentId))continue;const i=o.center.x-o.width/2,r=o.center.x+o.width/2,s=o.center.y-o.height/2,a=o.center.y+o.height/2;n=n?{minX:Math.min(n.minX,i),maxX:Math.max(n.maxX,r),minY:Math.min(n.minY,s),maxY:Math.max(n.maxY,a)}:{minX:i,maxX:r,minY:s,maxY:a}}return n},two=(t,e)=\u003eMath.min(t.minX-e.minX,e.maxX-t.maxX,t.minY-e.minY,e.maxY-t.maxY),nwo=({input:t,solverError:e,componentIds:n,sharedBoundary:o,componentNamesById:i})=\u003e{const r=e?.match(/routed (\\d+)\\/(\\d+) connections/),s=r?Number(r[1]):void 0,a=r?Number(r[2]):t.connections.length,A=[...n].map(g=\u003ei?.get(g)??g).sort(),c=A.length\u003e0?` for ${A.join(\", \")}`:\"\",l=[s===void 0?`Fanout failed${c}: ${e??\"the fanout solver did not report a reason\"}.`:`Fanout failed${c}: only ${s} of ${a} connections could escape to the breakout boundary.`],u=ewo(t,n);if(u\u0026\u0026o){const g=two(u,o);l.push(`The breakout boundary is ${Zvo(g)}mm from the pads at its narrowest point, which all ${a} escapes have to share.`)}return l.push(\"Give the fanout more room by increasing the breakout's padding, or by extending the breakout to include the parts crowding it (decoupling capacitors, series resistors) so their pads sit inside the boundary instead of against it.\"),l.join(\" \")},owo=(t,e)=\u003eMath.abs(t.minX-e.minX)\u003e1e-6||Math.abs(t.maxX-e.maxX)\u003e1e-6||Math.abs(t.minY-e.minY)\u003e1e-6||Math.abs(t.maxY-e.maxY)\u003e1e-6,iwo=(t,e)=\u003e{if(!(!t\u0026\u0026e.length===0))return{minX:Math.min(t?.minX??Number.POSITIVE_INFINITY,...e.map(n=\u003en.x)),maxX:Math.max(t?.maxX??Number.NEGATIVE_INFINITY,...e.map(n=\u003en.x)),minY:Math.min(t?.minY??Number.POSITIVE_INFINITY,...e.map(n=\u003en.y)),maxY:Math.max(t?.maxY??Number.NEGATIVE_INFINITY,...e.map(n=\u003en.y))}},rwo=(t,e)=\u003et?.map(n=\u003e{const{preferredLayer:o,preferredLayers:i,...r}=n,s=e?.[n.busId],a=s===void 0?void 0:rMe(s),A=a\u0026\u0026a!==\"center\"\u0026\u0026sMe(a)?a:void 0,c={...r,...n.termination?.type===\"plane\"?{}:A?{exitPosition:A}:{}},l=[...o===void 0?[]:[o],...i??[]].filter((h,d,p)=\u003ep.indexOf(h)===d);if(l.length===0)return c;const u=n.allowedLayers,g=u===void 0?l:l.filter(h=\u003eu.includes(h));return{...c,allowedLayers:g}}),rMe=t=\u003etypeof t==\"string\"?t:t.direction,swo=new Set(rlt),sMe=t=\u003eswo.has(t),awo=t=\u003e{switch(t){case\"top_left\":return\"top-left\";case\"top_center\":return\"top\";case\"top_right\":return\"top-right\";case\"center_left\":return\"left\";case\"center\":return;case\"center_right\":return\"right\";case\"bottom_left\":return\"bottom-left\";case\"bottom_center\":return\"bottom\";case\"bottom_right\":return\"bottom-right\"}},Awo=t=\u003e{switch(t){case\"top_left\":case\"top_center\":case\"top_right\":return\"up\";case\"center_left\":return\"left\";case\"center\":return;case\"center_right\":return\"right\";case\"bottom_left\":case\"bottom_center\":case\"bottom_right\":return\"down\"}},cwo=t=\u003e{const e=rMe(t);return sMe(e)?XDt(e).direction:Awo(e)},lwo=(t,e)=\u003et.obstacles.find(o=\u003eo.componentId\u0026\u0026o.layers.includes(e.layer)\u0026\u0026(e.pointId\u0026\u0026o.connectedTo.includes(e.pointId)||e.x\u003e=o.center.x-o.width/2\u0026\u0026e.x\u003c=o.center.x+o.width/2\u0026\u0026e.y\u003e=o.center.y-o.height/2\u0026\u0026e.y\u003c=o.center.y+o.height/2))?.componentId,uwo=(t,e)=\u003e{const n=new Set(e.connectionNames),o=new Map;for(const f of t.connections)if(n.has(f.name))for(const I of f.pointsToConnect){const C=lwo(t,I);if(!C)continue;const y=o.get(C)??[];y.push(I),o.set(C,y)}const i=[...o.entries()].sort(([f,I],[C,y])=\u003ey.length-I.length||f.localeCompare(C))[0];if(!i)return;const[r,s]=i,a=t.obstacles.filter(f=\u003ef.componentId===r);if(a.length===0)return;const A=a.map(f=\u003ef.center.x),c=a.map(f=\u003ef.center.y),l=Math.min(...A),u=Math.max(...A),g=Math.min(...c),h=Math.max(...c),d={x:(l+u)/2,y:(g+h)/2},p={x:Math.max((u-l)/2,1e-6),y:Math.max((h-g)/2,1e-6)},m={x:s.reduce((f,I)=\u003ef+I.x,0)/s.length,y:s.reduce((f,I)=\u003ef+I.y,0)/s.length},_={x:(m.x-d.x)/p.x,y:(m.y-d.y)/p.y};return Math.abs(_.x)\u003eMath.abs(_.y)?_.x\u003e=0?\"right\":\"left\":Math.abs(_.y)\u003e1e-9?_.y\u003e=0?\"up\":\"down\":\"right\"},gwo=({fanoutSimpleRouteJson:t,sourceComponentIds:e})=\u003e{const n=new Map;for(const i of t.obstacles){if(!i.componentId||!e.has(i.componentId))continue;const r=n.get(i.componentId)??[];r.push(i),n.set(i.componentId,r)}const o=[];for(const[i,r]of n){const s=Math.min(...r.map(l=\u003el.center.x-l.width/2)),a=Math.max(...r.map(l=\u003el.center.x+l.width/2)),A=Math.min(...r.map(l=\u003el.center.y-l.height/2)),c=Math.max(...r.map(l=\u003el.center.y+l.height/2));o.push({obstacleId:`fanout-source-keepout:${i}`,componentId:i,isFanoutSourceKeepout:!0,type:\"rect\",layers:WN(t.layerCount),center:{x:(s+a)/2,y:(A+c)/2},width:a-s,height:c-A,connectedTo:[]})}return{...t,obstacles:[...t.obstacles.filter(i=\u003e!i.componentId||!e.has(i.componentId)),...o]}},aMe=class xit{constructor(e,n){this.input=e,this.options=n}input;options;isRouting=!1;outputSimpleRouteJson;startTimeoutId;eventHandlers={complete:[],error:[],progress:[]};getLegacyBusExitPreferences(){if(!this.options.busFanoutDirections)return;const e=new Set(this.input.buses?.map(i=\u003ei.busId)??[]),n=new Set(this.input.buses?.filter(i=\u003ei.termination?.type===\"plane\").map(i=\u003ei.busId)??[]),o={};for(const[i,r]of Object.entries(this.options.busFanoutDirections)){if(!e.has(i))throw new Error(`Fanout direction references unknown bus \"${i}\" in this autorouting phase`);if(n.has(i))continue;const s=rMe(r);if(sMe(s))continue;const a=awo(s);a\u0026\u0026(o[i]=a)}return Object.keys(o).length\u003e0?o:void 0}getPlaneBusDirections(){const e=this.input.buses?.filter(i=\u003ei.termination?.type===\"plane\")??[],n=new Set(e.map(i=\u003ei.busId)),o={};for(const[i,r]of Object.entries(this.options.busFanoutDirections??{})){if(!n.has(i))continue;const s=cwo(r);s\u0026\u0026(o[i]=s)}for(const i of e){if(o[i.busId])continue;const r=uwo(this.input,i);r\u0026\u0026(o[i.busId]=r)}return Object.keys(o).length\u003e0?o:void 0}getFanoutSolverOptions(){const e={buses:rwo(this.input.buses,this.options.busFanoutDirections),borderDistribution:\"even\",compactBusTracks:!0,busDirections:this.getPlaneBusDirections(),busExitPreferences:this.getLegacyBusExitPreferences(),escapeLayers:this.options.fanoutRoutingLayers,allowBlindAndBuriedVias:this.options.allowBlindAndBuriedVias??this.input.allowBlindAndBuriedVias};return this.options.mode===\"single_layer_fanout\"?{...e,escapeLayers:[\"top\"],singleLayerPushAndShove:!0}:e}static resolveFanoutBounds(e,n){let o,i;if(n.fanoutBoundaryPadding!==void 0){const r=new xit(e,n),s=new Sue(e,r.getFanoutSolverOptions());o=Xvo({preparedBuses:s.preparedBuses,padding:n.fanoutBoundaryPadding})}else if(n.fanoutBounds===void 0){const r=new xit(e,n);i=new Sue(e,r.getFanoutSolverOptions()).preparedBuses[0]?.sharedBoundary}return n.fanoutBounds\u0026\u0026o\u0026\u0026owo(n.fanoutBounds,o)\u0026\u0026n.onFanoutBoundsConflict?.(),iwo(n.fanoutBounds??o??i,n.breakoutPoints??[])}solveFanout(){const e=this.getFanoutSolverOptions(),n=new Sue(this.input,{...e,...this.options.fanoutBounds?{sharedBoundary:this.options.fanoutBounds}:{}}),o=n.getConstructorParams();if(this.options.onSolverStarted?.({solverName:\"FanoutSolver\",solverParams:o[0],solverConstructorArgs:o}),n.solve(),n.failed)throw new Error(nwo({input:this.input,solverError:n.error,componentIds:new Set(n.preparedBuses.map(a=\u003ea.componentId)),sharedBoundary:this.options.fanoutBounds??e.sharedBoundary,componentNamesById:this.options.componentNamesById}));const i=n.getOutput(),r=i.simpleRouteJson,s=i.fanoutTraces;return{downstreamSimpleRouteJson:gwo({fanoutSimpleRouteJson:r,sourceComponentIds:new Set(n.preparedBuses.map(a=\u003ea.componentId))}),fanoutTraces:s,debugGraphics:n.visualize()}}startFanout(){try{const{downstreamSimpleRouteJson:e,fanoutTraces:n,debugGraphics:o}=this.solveFanout();if(!this.isRouting)return;this.outputSimpleRouteJson=e,this.emitEvent({type:\"progress\",steps:1,progress:1,phase:this.options.mode,debugGraphics:o}),this.isRouting=!1,this.emitEvent({type:\"complete\",traces:n})}catch(e){this.isRouting=!1,this.emitEvent({type:\"error\",error:e instanceof Error?e:new Error(String(e))})}}start(){this.isRouting||(this.isRouting=!0,this.startTimeoutId=setTimeout(()=\u003e{this.startTimeoutId=void 0,this.startFanout()},0))}stop(){this.startTimeoutId!==void 0\u0026\u0026(clearTimeout(this.startTimeoutId),this.startTimeoutId=void 0),this.isRouting=!1}on(e,n){e===\"complete\"?this.eventHandlers.complete.push(n):e===\"error\"?this.eventHandlers.error.push(n):this.eventHandlers.progress.push(n)}emitEvent(e){if(e.type===\"complete\")for(const n of this.eventHandlers.complete)n(e);else if(e.type===\"error\")for(const n of this.eventHandlers.error)n(e);else for(const n of this.eventHandlers.progress)n(e)}solveSync(){const{downstreamSimpleRouteJson:e,fanoutTraces:n}=this.solveFanout();return this.outputSimpleRouteJson=e,n}getOutputSimpleRouteJson(){return this.outputSimpleRouteJson}},Que=1e-6;function dwo(t,e){if(!t.subcircuit_connectivity_map_key||t.subcircuit_connectivity_map_key!==e.subcircuit_connectivity_map_key||t.subcircuit_id!==e.subcircuit_id)return!1;const n=t.layers.toSorted(),o=e.layers.toSorted();return Math.abs(t.x-e.x)\u003c=Que\u0026\u0026Math.abs(t.y-e.y)\u003c=Que\u0026\u0026Math.abs(t.hole_diameter-e.hole_diameter)\u003c=Que\u0026\u0026Math.abs(t.outer_diameter-e.outer_diameter)\u003c=Que\u0026\u0026n.length===o.length\u0026\u0026n.every((i,r)=\u003ei===o[r])}var hwo=({db:t,connectedOffboardObstacles:e,simpleRouteJson:n,subcircuit_id:o})=\u003e{if(Object.keys(e).length===0)return;const i=new Map;for(const a of t.pcb_port.list())if(a.source_port_id){const A=t.pcb_smtpad.getWhere({pcb_port_id:a.pcb_port_id});A\u0026\u0026i.set(A.pcb_smtpad_id,a.source_port_id);const c=t.pcb_plated_hole.getWhere({pcb_port_id:a.pcb_port_id});c\u0026\u0026i.set(c.pcb_plated_hole_id,a.source_port_id)}const r=new Map;for(const a of n.obstacles)a.obstacleId\u0026\u0026r.set(a.obstacleId,a);const s=new Map;for(const[a,A]of Object.entries(e))s.has(A)||s.set(A,[]),s.get(A).push(a);for(const[a,A]of s){const c=new Set;for(const h of A){const d=r.get(h);if(d)for(const p of d.connectedTo){const m=i.get(p);m\u0026\u0026c.add(m)}}if(c.size\u003c2)continue;const l=Array.from(c);t.source_trace.list().some(h=\u003e{const d=new Set(h.connected_source_port_ids);return l.every(p=\u003ed.has(p))})||t.source_trace.insert({connected_source_port_ids:l,connected_source_net_ids:[],subcircuit_id:o??void 0,display_name:`offboard_${a}`})}},gRt=({traceWidth:t,traceToPadClearance:e,viaPadDiameter:n})=\u003e(n??Math.max(t*2,.3))+2*(t+e),pwo=t=\u003e{const e=new Map;for(const n of t.pcb_component.list()){const o=t.source_component.get(n.source_component_id);o?.name\u0026\u0026e.set(n.pcb_component_id,o.name)}return e},AMe=t=\u003et?.replace(/-/g,\"_\");function dRt(t){if(!t)return null;if(typeof t==\"string\"){const n=AMe(t);return n===\"sequential_trace\"||n===\"auto_cloud\"?n:null}const e=AMe(t.preset);return e===\"sequential_trace\"||e===\"auto_cloud\"?e:AMe(t.groupMode)===\"sequential_trace\"?\"sequential_trace\":null}function h$(t,e){const n={serverUrl:\"https://registry-api.tscircuit.com\",serverMode:\"job\",serverCacheEnabled:!0};if(typeof t==\"object\"\u0026\u0026!t.preset)return{local:!(t.serverUrl||t.serverMode||t.serverCacheEnabled),...n,...t};const o=typeof t==\"object\"?t.preset:t,i=typeof t==\"object\"?t:{},r=typeof o==\"string\"?o.replace(/_/g,\"-\"):o,s=r\u0026\u0026typeof r==\"string\"?e?.autorouterMap?.[r]:void 0;if(s)return{local:!0,groupMode:\"subcircuit\",algorithmFn:async a=\u003es.createAutorouter(a)};switch(r){case\"default\":case\"auto\":case\"auto-local\":return{local:!0,groupMode:\"subcircuit\"};case\"sequential-trace\":return{local:!0,groupMode:\"sequential-trace\"};case\"subcircuit\":return{local:!0,groupMode:\"subcircuit\"};case\"beta-pipeline9\":return{local:!0,groupMode:\"subcircuit\",autorouterVersion:\"beta_pipeline9\"};case\"single-layer-fanout\":return{local:!0,groupMode:\"subcircuit\",preset:\"single_layer_fanout\"};case\"fanout\":return{local:!0,groupMode:\"subcircuit\",preset:\"fanout\"};case\"simplify\":return{local:!0,groupMode:\"subcircuit\",preset:\"simplify\"};case\"auto-cloud\":{const{preset:a,local:A,groupMode:c,...l}=i;return{local:!1,groupMode:\"subcircuit\",...n,...l}}case\"laser-prefab\":{const{preset:a,local:A,groupMode:c,...l}=i;return{local:!0,groupMode:\"subcircuit\",preset:\"laser_prefab\",...l}}case\"auto-jumper\":{const{preset:a,local:A,groupMode:c,...l}=i;return{local:!0,groupMode:\"subcircuit\",preset:\"auto_jumper\",...l}}default:return{local:!0,groupMode:\"subcircuit\"}}}var hRt=new WeakMap,pRt=t=\u003e{const e=hRt.get(t);if(e)return e;const n={toLocal:D0(l3e(-t.rotation),M0(-t.x,-t.y)),toWorld:D0(M0(t.x,t.y),l3e(t.rotation))};return hRt.set(t,n),n},mwo=(t,e)=\u003e{if(nD(t,e))return 0;let n=Number.POSITIVE_INFINITY;for(let o=0;o\u003ce.length;o++){const i=e[o],r=e[(o+1)%e.length];n=Math.min(n,Zd(t,i,r))}return n},mRt=(t,e,n)=\u003e{const o={x:e,y:n};if(t.kind===\"circle\")return Math.max(ad(o,t)-t.radius,0);if(t.kind===\"segment\")return Math.max(Zd(o,{x:t.x1,y:t.y1},{x:t.x2,y:t.y2})-t.halfWidth,0);if(t.kind===\"polygon\")return mwo(o,t.points);const{toLocal:i}=pRt(t);return EQn(ts(i,o),{center:{x:0,y:0},width:t.halfWidth*2,height:t.halfHeight*2})},_wo=(t,e)=\u003e{if(mRt(t,e.x,e.y)===0)return e;if(t.kind===\"circle\"){const r={x:t.x,y:t.y},s=Bxe(r,e);return{x:t.x+s.x*t.radius,y:t.y+s.y*t.radius}}if(t.kind===\"segment\"){const r=SQ(e,{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}),s=Bxe(r,e);return{x:r.x+s.x*t.halfWidth,y:r.y+s.y*t.halfWidth}}if(t.kind===\"polygon\"){let r=t.points[0],s=Number.POSITIVE_INFINITY;for(let a=0;a\u003ct.points.length;a++){const A=t.points[a],c=t.points[(a+1)%t.points.length],l=SQ(e,A,c),u=ad(e,l);u\u003cs\u0026\u0026(s=u,r=l)}return r}const{toLocal:n,toWorld:o}=pRt(t),i=ts(n,e);return ts(o,{x:fp(i.x,-t.halfWidth,t.halfWidth),y:fp(i.y,-t.halfHeight,t.halfHeight)})},_Rt=({start:t,end:e,trace:n,clearance:o=0})=\u003e{const i=n.halfWidth+o,r=Oh([t,e]),s={minX:r.minX-i,minY:r.minY-i,maxX:r.maxX+i,maxY:r.maxY+i},a={x:n.x1,y:n.y1},A={x:n.x2,y:n.y2},c=Oh([a,A]);return z4(c,s)?xV(t,e,a,A)\u003c=i:!1},fRt=(t,e)=\u003e{const n=new Set(t),o=new Map,i=(s,a,A,c)=\u003e{const l=`${s},${a}`,u=o.get(l)??[];u.push([A,c]),o.set(l,u)};for(const s of t){const a=s%e,A=Math.floor(s/e);(A===0||!n.has(s-e))\u0026\u0026i(a,A,a+1,A),(a===e-1||!n.has(s+1))\u0026\u0026i(a+1,A,a+1,A+1),n.has(s+e)||i(a+1,A+1,a,A+1),(a===0||!n.has(s-1))\u0026\u0026i(a,A+1,a,A)}const r=[];for(const[s,a]of o)for(;a.length\u003e0;){const[A,c]=s.split(\",\").map(Number),l=[[A,c]];let u=a.pop();for(;u[0]!==A||u[1]!==c;){l.push(u);const h=o.get(`${u[0]},${u[1]}`);if(!h||h.length===0)break;u=h.pop()}const g=l.filter((h,d)=\u003e{const p=l[(d+l.length-1)%l.length],m=l[(d+1)%l.length],_=p[0]===h[0]\u0026\u0026h[0]===m[0],f=p[1]===h[1]\u0026\u0026h[1]===m[1];return!_\u0026\u0026!f});g.length\u003e=3\u0026\u0026r.push(g)}return r},fwo=2,cMe=9,lMe=(t,{nx:e,ny:n})=\u003e{const o=t%e,i=Math.floor(t/e),r=[];return o\u003e0\u0026\u0026r.push(t-1),o\u003ce-1\u0026\u0026r.push(t+1),i\u003e0\u0026\u0026r.push(t-e),i\u003cn-1\u0026\u0026r.push(t+e),r},Iwo=(t,e)=\u003e{const n=new Uint8Array(e.labels.length*2);return(o,i)=\u003e{const r=Math.min(o,i)*2+(Math.abs(o-i)===e.nx?1:0),s=n[r];if(s!==0)return s===1;const a=e.gridCells[o].center,A=e.gridCells[i].center,c=zne(a,A),l=a.y===A.y,u=l?{minX:c.x,minY:c.y-e.gridPitch/2,maxX:c.x,maxY:c.y+e.gridPitch/2}:{minX:c.x-e.gridPitch/2,minY:c.y,maxX:c.x+e.gridPitch/2,maxY:c.y};let g=0;const h=(1\u003c\u003ccMe)-1;for(const d of e.traceBarriers)if(!(d.netIndex===t||d.maxX\u003cu.minX||d.minX\u003eu.maxX||d.maxY\u003cu.minY||d.minY\u003eu.maxY)){for(let p=0;p\u003ccMe;p++){const m=1\u003c\u003cp;if((g\u0026m)!==0)continue;const _=-e.gridPitch/2+e.gridPitch*p/(cMe-1),f=l?{x:c.x,y:c.y+_}:{x:c.x+_,y:c.y},I=SQ(f,d.start,d.end);bxe(f,I)\u003c=d.radiusSquared\u0026\u0026(g|=m)}if(g===h)return n[r]=2,!1}return n[r]=1,!0}},uMe=(t,e)=\u003e{let n=e.canCrossGridEdgeByNetIndex.get(t);return n||(n=Iwo(t,e),e.canCrossGridEdgeByNetIndex.set(t,n)),n},Cwo=({labeledLayer:t,insideCells:e,connectivitySeedNetIndices:n,traceBarriers:o,gridCells:i,traceClearance:r,gridPitch:s})=\u003e{if(r===0)return;const{labels:a,nx:A,ny:c}=t,l=o.map(_=\u003e{const f=_.halfWidth+r,I={x:_.x1,y:_.y1},C={x:_.x2,y:_.y2},y=Oh([I,C]);return{netIndex:_.netIndex,start:I,end:C,radiusSquared:f**2,minX:y.minX-f,minY:y.minY-f,maxX:y.maxX+f,maxY:y.maxY+f}}),u={labels:a,nx:A,traceBarriers:l,gridCells:i,gridPitch:s,canCrossGridEdgeByNetIndex:new Map},g=new Uint8Array(a.length),h=[];for(let _=0;_\u003ca.length;_++)e[_]!==1||n[_]!==a[_]||(g[_]=1,h.push(_));let d=0;for(;d\u003ch.length;){const _=h[d++],f=a[_];for(const I of lMe(_,t))e[I]!==1||g[I]===1||a[I]!==f||!uMe(f,u)(_,I)||(g[I]=1,h.push(I))}const p=new Uint8Array(a.length),m=[];for(let _=0;_\u003ca.length;_++){if(e[_]!==1||a[_]\u003c0||g[_]===1||p[_]===1)continue;const f=a[_],I=[],C=[_];for(p[_]=1;C.length\u003e0;){const E=C.pop();I.push(E);for(const B of lMe(E,t))e[B]!==1||p[B]===1||g[B]===1||a[B]!==f||!uMe(f,u)(E,B)||(p[B]=1,C.push(B))}const y=new Map;for(const E of I)for(const B of lMe(E,t)){const S=a[B];g[B]!==1||S\u003c0||S===f||!uMe(S,u)(E,B)||y.set(S,(y.get(S)??0)+1)}const x=[...y.entries()].sort((E,B)=\u003eB[1]-E[1])[0]?.[0];x!==void 0?m.push({cells:I,netIndex:x}):m.push({cells:I,netIndex:-1})}for(const _ of m)for(const f of _.cells)a[f]=_.netIndex},ywo=({labeledLayer:t,insideCells:e,visibleCells:n,traceBarriers:o,gridCells:i,traceClearance:r})=\u003e{const{labels:s,nx:a,ny:A}=t,c=new Set;for(let g=0;g\u003cs.length;g++)n[g]===1\u0026\u0026s[g]\u003e=0\u0026\u0026c.add(s[g]);const l=new Map;for(const g of c){const h=new Int8Array(s.length).fill(-1),d=[];for(let m=0;m\u003cs.length;m++)n[m]!==1||s[m]!==g||(h[m]=0,d.push(m));let p=0;for(;p\u003cd.length;){const m=d[p++];if(h[m]\u003e=fwo)continue;const _=m%a,f=Math.floor(m/a),I=[];_\u003e0\u0026\u0026I.push(m-1),_\u003ca-1\u0026\u0026I.push(m+1),f\u003e0\u0026\u0026I.push(m-a),f\u003cA-1\u0026\u0026I.push(m+a);const C=i[m].center;for(const y of I){if(e[y]!==1||h[y]\u003e=0||n[y]===1\u0026\u0026s[y]!==g)continue;const x=i[y].center;o.some(B=\u003eB.netIndex!==g\u0026\u0026_Rt({start:C,end:x,trace:B,clearance:r}))||(h[y]=h[m]+1,d.push(y))}}l.set(g,h)}const u=[];for(let g=0;g\u003cs.length;g++){const h=s[g];if(e[g]!==1||h\u003c0||n[g]===1)continue;const d=l.get(h)?.[g]??-1,p=Array.from(l.entries()).map(([m,_])=\u003e({netIndex:m,distance:_[g]})).filter(m=\u003em.netIndex!==h\u0026\u0026m.distance\u003e=0\u0026\u0026(d\u003c0||m.distance\u003cd)).sort((m,_)=\u003em.distance-_.distance)[0];p\u0026\u0026u.push({cell:g,netIndex:p.netIndex})}for(const g of u)s[g.cell]=g.netIndex},xwo=t=\u003e{const{bounds:e,boardOutline:n,gridPitch:o,regionNormalizationArea:i,traceClearance:r}=t,s=Math.max(1,Math.round((e.maxX-e.minX)/o)),a=Math.max(1,Math.round((e.maxY-e.minY)/o)),A=Math.max(1,Math.round(i/o**2)),c=xQn({rows:a,cols:s,xSpacing:o,ySpacing:o,offsetX:e.minX,offsetY:e.minY,yDirection:\"up-is-negative\",centered:!1}),l=[];for(const u of t.layers){const g=t.primitives.filter(y=\u003ey.layers.includes(u)\u0026\u0026t.nets[y.netIndex]?.isPower),h=t.primitives.filter(y=\u003ey.kind===\"segment\"\u0026\u0026y.isTrace===!0\u0026\u0026y.layers.includes(u)),d=new Int32Array(s*a).fill(-1),p=new Uint8Array(s*a),m=new Uint8Array(s*a),_=new Uint8Array(s*a),f=new Int32Array(s*a).fill(-1),I=o*Math.SQRT2/2;for(const{index:y,center:x}of c){if(!nD(x,n))continue;m[y]=1;const E=g.map(M=\u003e({primitive:M,distance:mRt(M,x.x,x.y)})).sort((M,k)=\u003eM.distance-k.distance);let B=E[0]?.primitive.netIndex??-1,S=E[0]?.distance??Number.POSITIVE_INFINITY,Q=!1,w=!1;for(const M of E){if(M.distance===0){B=M.primitive.netIndex,S=M.distance,Q=!0,w=!0;break}const k=_wo(M.primitive,x);if(!h.some(F=\u003eF.netIndex!==M.primitive.netIndex\u0026\u0026_Rt({start:x,end:k,trace:F,clearance:r}))){B=M.primitive.netIndex,S=M.distance,w=!0;break}}d[y]=B,Q\u0026\u0026(p[y]=1),w\u0026\u0026(_[y]=1),w\u0026\u0026S\u003c=I\u0026\u0026(f[y]=B)}const C={layer:u,labels:d,nx:s,ny:a};ywo({labeledLayer:C,insideCells:m,visibleCells:_,traceBarriers:h,gridCells:c,traceClearance:r}),Cwo({labeledLayer:C,insideCells:m,connectivitySeedNetIndices:f,traceBarriers:h,gridCells:c,traceClearance:r,gridPitch:o}),Bwo(C,p,A),l.push(C)}return{...t,labeledLayers:l}},IRt=t=\u003e{const{labels:e,nx:n,ny:o}=t,i=new Int32Array(n*o).fill(-1),r=[],s=[];for(let a=0;a\u003cn*o;a++){if(i[a]!==-1||e[a]\u003c0)continue;const A=e[a],c=[];for(i[a]=r.length,s.push(a);s.length\u003e0;){const l=s.pop();c.push(l);const u=l%n,g=Math.floor(l/n),h=[];u\u003e0\u0026\u0026h.push(l-1),u\u003cn-1\u0026\u0026h.push(l+1),g\u003e0\u0026\u0026h.push(l-n),g\u003co-1\u0026\u0026h.push(l+n);for(const d of h)i[d]===-1\u0026\u0026e[d]===A\u0026\u0026(i[d]=r.length,s.push(d))}r.push({netIndex:A,cells:c})}return{component:i,regions:r}},Ewo=t=\u003eIRt(t).regions,Bwo=(t,e,n)=\u003e{if(!(n\u003c=1))for(;;){const{component:o,regions:i}=IRt(t),r=[];for(const s of i){if(s.cells.length\u003e=n||s.cells.some(c=\u003ee[c]===1))continue;const a=new Map;for(const c of s.cells){const l=c%t.nx,u=Math.floor(c/t.nx),g=[];l\u003e0\u0026\u0026g.push(c-1),l\u003ct.nx-1\u0026\u0026g.push(c+1),u\u003e0\u0026\u0026g.push(c-t.nx),u\u003ct.ny-1\u0026\u0026g.push(c+t.nx);for(const h of g){const d=o[h];d\u003c0||i[d]===s||a.set(d,(a.get(d)??0)+1)}}const A=[...a.entries()].map(([c,l])=\u003e({region:i[c],sharedEdges:l})).filter(c=\u003ec.region.cells.length\u003es.cells.length).sort((c,l)=\u003el.sharedEdges-c.sharedEdges||l.region.cells.length-c.region.cells.length)[0]?.region;A\u0026\u0026r.push({cells:s.cells,netIndex:A.netIndex})}if(r.length===0)return;for(const s of r)for(const a of s.cells)t.labels[a]=s.netIndex}},bwo=(t,e)=\u003e{const n=new Set(t),o=[],i=[];for(;n.size\u003e0;){const r=n.values().next().value,s=[];for(n.delete(r),i.push(r);i.length\u003e0;){const a=i.pop();s.push(a);const A=a%e,c=[a-e,a+e];A\u003e0\u0026\u0026c.push(a-1),A\u003ce-1\u0026\u0026c.push(a+1);for(const l of c)n.has(l)\u0026\u0026(n.delete(l),i.push(l))}o.push(s)}return o},CRt=t=\u003eMath.abs(t.reduce((e,n,o)=\u003e{const i=t[(o+1)%t.length];return e+n[0]*i[1]-i[0]*n[1]},0)/2),Swo=(t,e)=\u003e{const n=[t],o=[];for(;n.length\u003e0;){const i=n.pop(),r=fRt(i,e);if(r.length\u003c=1){o.push(i);continue}const s=r.reduce((h,d,p)=\u003eCRt(d)\u003eCRt(r[h])?p:h,0),A=r.find((h,d)=\u003ed!==s).map(h=\u003eh[1]),c=Math.round((Math.min(...A)+Math.max(...A))/2),l=i.filter(h=\u003eMath.floor(h/e)\u003cc),u=i.filter(h=\u003eMath.floor(h/e)\u003e=c),g=[l,u].filter(h=\u003eh.length\u003e0).flatMap(h=\u003ebwo(h,e));if(g.length\u003c2||g.some(h=\u003eh.length===i.length))throw new Error(\"Unable to split an implicit copper region around a hole\");n.push(...g)}return o},yRt=t=\u003et.replace(/[^a-zA-Z0-9_]+/g,\"_\"),Qwo=t=\u003e{const e=[],n=Math.max(1,Math.round(t.minRegionArea/t.gridPitch**2)),o=D0(M0(t.bounds.minX,t.bounds.minY),FV(t.gridPitch));for(const i of t.labeledLayers){const r=Ewo(i);for(const[s,a]of r.entries()){const A=t.nets[a.netIndex];if(!A?.isPower||a.cells.length\u003cn)continue;const c=Swo(a.cells,i.nx);for(const[l,u]of c.entries()){const g=fRt(u,i.nx);if(g.length!==1)throw new Error(\"Implicit copper region part must have one outline\");const d=g[0].map(([p,m])=\u003e{const _=ts(o,{x:p,y:m});return{x:fp(_.x,t.bounds.minX,t.bounds.maxX),y:fp(_.y,t.bounds.minY,t.bounds.maxY)}});e.push({type:\"pcb_copper_pour\",pcb_copper_pour_id:`pcb_copper_pour_${yRt(i.layer)}_${yRt(A.sourceNet.source_net_id)}_${s}_${l}`,shape:\"polygon\",layer:i.layer,source_net_id:A.sourceNet.source_net_id,covered_with_solder_mask:t.coveredWithSolderMask,subcircuit_id:A.sourceNet.subcircuit_id,points:d})}}}return e},xRt=t=\u003et===\"top\"?\"#c2453a\":t===\"bottom\"?\"#5b7fd8\":\"#c58b43\",vwo=.25,wwo=.2,Pwo=0,Mwo=.5,Dwo=t=\u003e{if(t.outline\u0026\u0026t.outline.length\u003e=3)return t.outline;if(t.width===void 0||t.height===void 0)throw new Error(\"pcb_board must provide an outline or width and height\");const e=Ey({center:t.center,width:t.width,height:t.height});return[{x:e.minX,y:e.minY},{x:e.maxX,y:e.minY},{x:e.maxX,y:e.maxY},{x:e.minX,y:e.maxY}]},ERt=(t,e)=\u003e{const{layers:n,netIndex:o,x:i,y:r,width:s,height:a,rotation:A}=e,c=Math.min(s,a)/2,u=(Math.max(s,a)-c*2)/2,g=D0(M0(i,r),l3e(A+(a\u003es?90:0))),[h,d]=IRn(g,[{x:-u,y:0},{x:u,y:0}]);t.push({kind:\"segment\",layers:n,netIndex:o,x1:h.x,y1:h.y,x2:d.x,y2:d.y,halfWidth:c})},Nwo=(t,e,n)=\u003e{const o=[e.layer];e.shape===\"circle\"?t.push({kind:\"circle\",layers:o,netIndex:n,x:e.x,y:e.y,radius:e.radius}):e.shape===\"rect\"||e.shape===\"rotated_rect\"?t.push({kind:\"rect\",layers:o,netIndex:n,x:e.x,y:e.y,halfWidth:e.width/2,halfHeight:e.height/2,rotation:e.shape===\"rotated_rect\"?e.ccw_rotation:0}):e.shape===\"polygon\"?t.push({kind:\"polygon\",layers:o,netIndex:n,points:e.points}):ERt(t,{layers:o,netIndex:n,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.shape===\"rotated_pill\"?e.ccw_rotation:0})},Rwo=(t,e,n)=\u003e{const o=e.layers;if(e.shape===\"circle\")t.push({kind:\"circle\",layers:o,netIndex:n,x:e.x,y:e.y,radius:e.outer_diameter/2});else if(e.shape===\"oval\"||e.shape===\"pill\")ERt(t,{layers:o,netIndex:n,x:e.x,y:e.y,width:e.outer_width,height:e.outer_height,rotation:e.ccw_rotation});else if(e.shape===\"hole_with_polygon_pad\")t.push({kind:\"polygon\",layers:o,netIndex:n,points:e.pad_outline});else if(\"rect_pad_width\"in e\u0026\u0026\"rect_pad_height\"in e){const i=e.shape===\"circular_hole_with_rect_pad\"?e.rect_ccw_rotation??0:e.shape===\"rotated_pill_hole_with_rect_pad\"?e.rect_ccw_rotation:0;t.push({kind:\"rect\",layers:o,netIndex:n,x:e.x,y:e.y,halfWidth:e.rect_pad_width/2,halfHeight:e.rect_pad_height/2,rotation:i})}},Two=(t,e,n)=\u003e{let o=null;for(const i of e.route){if(i.route_type!==\"wire\"){o=null,i.route_type===\"via\"\u0026\u0026t.push({kind:\"circle\",layers:[i.from_layer,i.to_layer],netIndex:n,x:i.x,y:i.y,radius:.3});continue}o\u0026\u0026o.layer===i.layer\u0026\u0026t.push({kind:\"segment\",layers:[i.layer],netIndex:n,isTrace:!0,x1:o.x,y1:o.y,x2:i.x,y2:i.y,halfWidth:i.width/2}),o=i}},BRt=t=\u003e{const e=t.gridPitch??vwo,n=t.traceClearance??wwo,o=t.edgeSimplificationTolerance??e,i=t.minRegionArea??Pwo,r=t.regionNormalizationArea??Mwo;if(!(e\u003e0))throw new Error(\"gridPitch must be greater than zero\");if(!Number.isFinite(n)||n\u003c0)throw new Error(\"traceClearance must be zero or greater\");if(!Number.isFinite(o)||o\u003c0)throw new Error(\"edgeSimplificationTolerance must be zero or greater\");if(!(i\u003e=0))throw new Error(\"minRegionArea must be zero or greater\");if(!(r\u003e=0))throw new Error(\"regionNormalizationArea must be zero or greater\");const s=t.circuitJson.find(E=\u003eE.type===\"pcb_board\");if(!s)throw new Error(\"No pcb_board found in Circuit JSON\");const a=Dwo(s),A=Oh(a),c=t.circuitJson.filter(E=\u003eE.type===\"source_net\"),l=c.map(E=\u003e({sourceNet:E,isPower:!!(E.is_power||E.is_ground||E.is_positive_voltage_source)})),u=new Map,g=new Map;for(const[E,B]of c.entries())u.set(B.source_net_id,E),B.subcircuit_connectivity_map_key\u0026\u0026g.set(B.subcircuit_connectivity_map_key,E);const h=new Map,d=(E,B=E)=\u003e{const S=h.get(E);if(S!==void 0)return S;const Q=`source_net_implicit_${E.replace(/[^a-zA-Z0-9_]+/g,\"_\")}`;let w=Q,M=1;for(;u.has(w);)w=`${Q}_${M++}`;const k={type:\"source_net\",source_net_id:w,name:B,member_source_group_ids:[],is_ground:!1,is_power:!1,is_positive_voltage_source:!1},R=l.length;return l.push({sourceNet:k,isPower:!1}),u.set(w,R),h.set(E,R),R},p=E=\u003e{const B=E.subcircuit_connectivity_map_key;if(!B)return;const S=g.get(B);if(S!==void 0)return S;const Q=d(`connectivity:${B}`,B);return g.set(B,Q),Q},m=Mxe(t.circuitJson),_=Object.values(m.netMap);for(const E of t.circuitJson){if(E.type===\"source_trace\"){_.push([E.source_trace_id,...E.connected_source_port_ids,...E.connected_source_net_ids]);continue}if(E.type===\"pcb_port\"){_.push([E.pcb_port_id,E.source_port_id]);continue}if(E.type===\"pcb_smtpad\"\u0026\u0026E.pcb_port_id){_.push([E.pcb_smtpad_id,E.pcb_port_id]);continue}if(E.type===\"pcb_plated_hole\"\u0026\u0026E.pcb_port_id){_.push([E.pcb_plated_hole_id,E.pcb_port_id]);continue}if(E.type===\"pcb_trace\"){const B=Array.from(new Set(E.route.flatMap(w=\u003ew.route_type===\"wire\"?[w.start_pcb_port_id,w.end_pcb_port_id].filter(M=\u003e!!M):[]))),S=E.source_net_id,Q=[...S?[S]:[],...B.length\u003e0?B:E.source_trace_id?[E.source_trace_id]:[]];Q.length\u003e0\u0026\u0026_.push([E.pcb_trace_id,...Q]);continue}if(E.type===\"pcb_via\"){const B=E,S=B.source_net_id??B.pcb_trace_id??B.source_trace_id;S\u0026\u0026_.push([B.pcb_via_id,S])}}const f=new wQ($ne(_)),I=new Map,C=E=\u003e{const B=hz(E),S=f.getNetConnectedToId(B);if(S){const Q=c.flatMap((k,R)=\u003ef.areIdsConnected(B,k.source_net_id)?[R]:[]);if(Q.length\u003e1){const k=Q.map(R=\u003ec[R].source_net_id);throw new Error(`Circuit JSON connectivity assigns ${B} to multiple source nets: ${k.join(\", \")}`)}if(Q[0]!==void 0)return I.set(S,Q[0]),Q[0];const w=I.get(S);if(w!==void 0)return w;const M=p(E)??d(`connectivity-network:${S}`,S);return I.set(S,M),M}return p(E)},y=E=\u003e{const B=E.source_net_id;if(B)return u.get(B)??d(`source-net-id:${B}`,B);const S=C(E);if(S!==void 0)return S;const Q=hz(E);return d(`${E.type}:${Q}`,Q)},x=[];for(const E of t.circuitJson){if(E.type!==\"pcb_smtpad\"\u0026\u0026E.type!==\"pcb_plated_hole\"\u0026\u0026E.type!==\"pcb_via\"\u0026\u0026E.type!==\"pcb_trace\")continue;const B=y(E);if(B!==void 0)if(E.type===\"pcb_smtpad\")Nwo(x,E,B);else if(E.type===\"pcb_plated_hole\")Rwo(x,E,B);else if(E.type===\"pcb_via\"){const S=E;x.push({kind:\"circle\",layers:S.layers,netIndex:B,x:S.x,y:S.y,radius:S.outer_diameter/2})}else E.type===\"pcb_trace\"\u0026\u0026Two(x,E,B)}return{bounds:A,boardOutline:a,layers:t.layers??[\"top\",\"bottom\"],nets:l,primitives:x,gridPitch:e,traceClearance:n,minRegionArea:i,regionNormalizationArea:r,coveredWithSolderMask:t.coveredWithSolderMask??!0}},xw=(t,e)=\u003et.x===e.x\u0026\u0026t.y===e.y,kwo=(t,e)=\u003e{if(t.length\u003c=2)return[...t];const n=new Uint8Array(t.length);n[0]=1,n[t.length-1]=1;const o=[[0,t.length-1]];for(;o.length\u003e0;){const[i,r]=o.pop(),s=t[i],a=t[r];let A=-1,c=e;for(let l=i+1;l\u003cr;l++){const u=Zd(t[l],s,a);u\u003ec\u0026\u0026(c=u,A=l)}A!==-1\u0026\u0026(n[A]=1,o.push([i,A],[A,r]))}return t.filter((i,r)=\u003en[r]===1)},bRt=t=\u003e{let e=0;for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];e+=o.x*i.y-i.x*o.y}return e/2},SRt=(t,e,n)=\u003e(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),gMe=(t,e)=\u003e{if(t.length\u003c=2)return[...t];const n=t.map((r,s)=\u003es===0||s===t.length-1?0:Math.sign(SRt(t[s-1],t[s],t[s+1]))),o=[0];for(let r=1;r\u003ct.length-1;r++){const s=n[r];if(s===0)continue;const a=s===n[r-1]||s===n[r+1],A=t[r-1],c=t[r],l=t[r+1],u=Math.min(ad(c,A),ad(l,c));(a||u\u003ee)\u0026\u0026o.push(r)}o.push(t.length-1);const i=[];for(let r=0;r\u003co.length-1;r++){const s=o[r],a=o[r+1],A=kwo(t.slice(s,a+1),e);i.push(...r===0?A:A.slice(1))}return i},Fwo=t=\u003e{for(let e=0;e\u003ct.length;e++){const n=(e+1)%t.length;for(let o=e+1;o\u003ct.length;o++){const i=(o+1)%t.length;if(!(e===o||e===i||n===o||n===i)\u0026\u0026X1(t[e],t[n],t[o],t[i]))return!1}}return!0},QRt=t=\u003e{const e=t.filter((n,o)=\u003eo===0||!xw(n,t[o-1]));return e.length\u003e1\u0026\u0026xw(e[0],e[e.length-1])\u0026\u0026e.pop(),e},Lwo=(t,e,n)=\u003e{if(xw(t,e)||xw(t,n))return!1;const o=SRt(e,n,t);return Math.abs(o)\u003e1e-9?!1:CV(e,t,n)},Hwo=(t,e)=\u003e{const n=[];for(let o=0;o\u003ct.length;o++){const i=t[o],r=t[(o+1)%t.length],s=r.x-i.x,a=r.y-i.y,A=e.filter(c=\u003eLwo(c,i,r)).map(c=\u003e({point:c,position:Math.abs(s)\u003e=Math.abs(a)?(c.x-i.x)/s:(c.y-i.y)/a})).sort((c,l)=\u003ec.position-l.position);n.push(i);for(const{point:c}of A)xw(n[n.length-1],c)||n.push(c)}return n},vRt=(t,e)=\u003e{if(e.length\u003c3)return!1;const n=bRt(t),o=bRt(e);return n!==0\u0026\u0026o!==0\u0026\u0026Math.sign(n)===Math.sign(o)\u0026\u0026Fwo(e)},Owo=(t,e)=\u003e{const n=QRt(t);if(n.length\u003c4||e\u003c=0)return n;const o=[...n,n[0]],i=gMe(o,e);return xw(i[0],i[i.length-1])\u0026\u0026i.pop(),vRt(n,i)?i:n},dMe=t=\u003e`${t.x},${t.y}`,Gwo=(t,e)=\u003e{const n=dMe(t),o=dMe(e);return n\u003co?`${n}|${o}`:`${o}|${n}`},wRt=t=\u003et.map(dMe).join(\"|\"),Ywo=t=\u003e{const e=wRt(t),n=[...t].reverse(),o=wRt(n);return e\u003c=o?{points:[...t],reversed:!1,key:e}:{points:n,reversed:!0,key:o}},Uwo=t=\u003e{const e=new Map;for(const[o,i]of t.entries())for(let r=0;r\u003ci.length;r++){const s=Gwo(i[r],i[(r+1)%i.length]),a=e.get(s)??[];a.push({polygonIndex:o,edgeIndex:r}),e.set(s,a)}const n=t.map((o,i)=\u003eo.map(()=\u003e`outer:${i}`));for(const o of e.values()){if(o.length!==2||o[0].polygonIndex===o[1].polygonIndex)continue;const i=o[0].polygonIndex,r=o[1].polygonIndex,s=i\u003cr?`${i}:${r}`:`${r}:${i}`;for(const a of o)n[a.polygonIndex][a.edgeIndex]=`shared:${s}`}return n},Kwo=(t,e,n)=\u003e{const o=[t[e]];let i=e;for(;i!==n;)o.push(t[(i+1)%t.length]),i=(i+1)%t.length;return o},Vwo=(t,e)=\u003e{const n=[];for(const o of t.chains){const i=e.get(o.arcKey),r=i.disabled?i.original:i.simplified,s=o.reversed?[...r].reverse():r;if(n.length===0)n.push(...s);else if(xw(n[n.length-1],s[0]))n.push(...s.slice(1));else return[]}return n.length\u003e1\u0026\u0026xw(n[0],n[n.length-1])\u0026\u0026n.pop(),n},zwo=(t,e)=\u003e{const n=t.map(QRt),o=n.flat(),i=n.map(c=\u003eHwo(c,o));if(e\u003c=0||i.length===0)return i;const r=Uwo(i),s=new Map,a=[];for(const[c,l]of i.entries()){if(l.length\u003c4){a.push({original:l,mode:\"fixed\"});continue}const u=r[c],g=u.flatMap((d,p)=\u003eu[(p+l.length-1)%l.length]===d?[]:[p]);if(g.length===0){u[0]?.startsWith(\"shared:\")?a.push({original:l,mode:\"fixed\"}):a.push({original:l,mode:\"standalone\",simplified:Owo(l,e)});continue}const h=[];for(let d=0;d\u003cg.length;d++){const p=g[d],m=g[(d+1)%g.length],_=Kwo(l,p,m),f=u[p];if(f.startsWith(\"shared:\")){const I=Ywo(_),C=`${f}:${I.key}`;s.has(C)||s.set(C,{original:I.points,simplified:gMe(I.points,e),disabled:!1}),h.push({arcKey:C,reversed:I.reversed})}else{const I=`outer:${c}:${d}`;s.set(I,{original:_,simplified:gMe(_,e),disabled:!1}),h.push({arcKey:I,reversed:!1})}}a.push({original:l,mode:\"chains\",chains:h})}let A=i;for(let c=0;c\u003c=s.size;c++){A=a.map(g=\u003eg.mode===\"fixed\"?g.original:g.mode===\"standalone\"?g.simplified:Vwo(g,s));const l=A.flatMap((g,h)=\u003evRt(a[h].original,g)?[]:[h]);if(l.length===0)return A;let u=!1;for(const g of l){const h=a[g];if(h.mode===\"chains\")for(const d of h.chains){const p=s.get(d.arcKey);p.disabled||(p.disabled=!0,u=!0)}}if(!u)return A.map((g,h)=\u003el.includes(h)?a[h].original:g)}return i},Jwo=\"#555a66\",Wwo=\"red\",PRt=\"blue\",jwo=\"rgba(255, 0, 0, 0.5)\",$wo=\"rgba(0, 0, 255, 0.5)\",qwo=.35,MRt=[\"#ed9148\",\"#d93bd0\",\"#b6df38\",\"#438bd9\",\"#e5485f\",\"#43d16d\",\"#8b48df\",\"#e6b93f\",\"#43ced2\",\"#cf3d99\"],Xwo=(t,e)=\u003e{const n=Number.parseInt(t.slice(1,3),16),o=Number.parseInt(t.slice(3,5),16),i=Number.parseInt(t.slice(5,7),16);return`rgba(${n}, ${o}, ${i}, ${e})`},DRt=t=\u003e{const e=t.map(n=\u003en===\"top\"?0:n===\"bottom\"?1:null).filter(n=\u003en!==null);return`z${Array.from(new Set(e)).join(\",\")}`},Zwo=t=\u003et.includes(\"top\")?Wwo:PRt,ePo=t=\u003et.includes(\"top\")?jwo:$wo,tPo=(t,e,n)=\u003e{const o=t.nets[e]?.sourceNet;return`${o?.name??o?.source_net_id??\"unknown net\"} ${n}`},nPo=t=\u003e{const e={coordinateSystem:\"cartesian\",title:\"Circuit JSON copper obstacles\",points:[],rects:[],circles:[],lines:[{points:[...t.boardOutline,t.boardOutline[0]],strokeColor:Jwo,strokeWidth:.08,label:\"PCB outline\"}],polygons:[],texts:[]};for(const n of t.primitives){const o=Zwo(n.layers),i=ePo(n.layers),r=DRt(n.layers),s=tPo(t,n.netIndex,n.kind);if(n.kind===\"rect\"){e.rects.push({center:{x:n.x,y:n.y},width:n.halfWidth*2,height:n.halfHeight*2,ccwRotationDegrees:n.rotation,fill:i,layer:r,label:s});continue}if(n.kind===\"segment\"){const A=n.layers.includes(\"top\");e.lines.push({points:[{x:n.x1,y:n.y1},{x:n.x2,y:n.y2}],strokeColor:A?o:\"rgba(0, 0, 255, 0.5)\",strokeWidth:n.halfWidth*2,...A?{}:{strokeDash:[.2,.2]},layer:r,label:s});continue}if(n.kind===\"polygon\"){e.polygons.push({points:n.points,fill:i,stroke:o,strokeWidth:.04,layer:r,label:s});continue}const a=n.layers.includes(\"top\")\u0026\u0026n.layers.includes(\"bottom\");e.circles.push({center:{x:n.x,y:n.y},radius:n.radius,fill:a?PRt:i,stroke:\"none\",layer:r,label:s})}return e},oPo=(t,e)=\u003e({coordinateSystem:\"cartesian\",title:\"Power-net copper pour polygons\",points:[],rects:[],circles:[],lines:[],polygons:e.flatMap(n=\u003e{if(n.shape!==\"polygon\")return[];const o=t.nets.findIndex(({sourceNet:s})=\u003es.source_net_id===n.source_net_id),i=MRt[Math.max(0,o)%MRt.length],r=t.nets[o]?.sourceNet;return[{points:n.points,fill:Xwo(i,qwo),stroke:i,strokeWidth:.06,layer:DRt([n.layer]),label:`${r?.name??n.source_net_id??\"power net\"} ${n.layer} pour`}]}),texts:[]}),iPo=(t,e)=\u003e({coordinateSystem:\"cartesian\",title:e.polygons?.length?e.title:t.title,polygons:[...e.polygons??[],...t.polygons??[]],rects:[...t.rects??[],...e.rects??[]],lines:[...t.lines??[],...e.lines??[]],circles:[...t.circles??[],...e.circles??[]],points:[...t.points??[],...e.points??[]],texts:[...t.texts??[],...e.texts??[]]}),rPo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){this.output=BRt(this.input),this.solved=!0}getOutput(){if(!this.output)throw new Error(\"Circuit JSON has not been prepared\");return this.output}},sPo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){this.output=xwo(this.input),this.stats={layers:this.output.labeledLayers.length,samples:this.output.labeledLayers.reduce((t,e)=\u003et+e.nx*e.ny,0)},this.solved=!0}getOutput(){if(!this.output)throw new Error(\"Grid cells have not been assigned\");return this.output}},aPo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){this.output=Qwo(this.input),this.stats={polygons:this.output.length},this.solved=!0}getOutput(){if(!this.output)throw new Error(\"Power polygons have not been traced\");return this.output}visualize(){return{points:[],rects:[],circles:[],texts:[],lines:(this.output??[]).flatMap(t=\u003et.shape!==\"polygon\"?[]:[{points:[...t.points,t.points[0]],strokeColor:xRt(t.layer),strokeWidth:.08,label:t.source_net_id}])}}},APo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){let t=0,e=0;const n=[...this.input.pours],o=new Map;for(const[i,r]of this.input.pours.entries()){if(r.shape!==\"polygon\")continue;t+=r.points.length;const s=o.get(r.layer)??[];s.push(i),o.set(r.layer,s)}for(const i of o.values()){const r=zwo(i.map(s=\u003e{const a=this.input.pours[s];return a.shape!==\"polygon\"?[]:a.points}),this.input.tolerance);for(const[s,a]of r.entries()){const A=i[s],c=this.input.pours[A];c.shape===\"polygon\"\u0026\u0026(n[A]={...c,points:a},e+=a.length)}}this.output=n,this.stats={polygons:this.output.length,inputPoints:t,outputPoints:e,pointsRemoved:t-e},this.solved=!0}getOutput(){if(!this.output)throw new Error(\"Polygon edges have not been simplified\");return this.output}visualize(){return{points:[],rects:[],circles:[],texts:[],lines:(this.output??[]).flatMap(t=\u003et.shape!==\"polygon\"?[]:[{points:[...t.points,t.points[0]],strokeColor:xRt(t.layer),strokeWidth:.08,label:t.source_net_id}])}}},NRt=class extends eve{initialPreparedProblem;pipelineDef=[TH(\"prepareCircuitJson\",rPo,t=\u003e[t.inputProblem]),TH(\"assignGridCells\",sPo,t=\u003e[t.getStageOutput(\"prepareCircuitJson\")]),TH(\"tracePowerPolygons\",aPo,t=\u003e[t.getStageOutput(\"assignGridCells\")]),TH(\"simplifyPolygonEdges\",APo,t=\u003e{const e=t.getStageOutput(\"prepareCircuitJson\");return[{pours:t.getStageOutput(\"tracePowerPolygons\"),tolerance:t.inputProblem.edgeSimplificationTolerance??e.gridPitch}]})];getSolverName(){return\"ImplicitCopperPourPipelineSolver\"}getConstructorParams(){return[this.inputProblem]}getOutput(){return this.getStageOutput(\"simplifyPolygonEdges\")??[]}visualize(){const t=this.getStageOutput(\"prepareCircuitJson\")??(this.initialPreparedProblem??=BRt(this.inputProblem)),e=nPo(t),n=this.getStageOutput(\"simplifyPolygonEdges\")??this.getStageOutput(\"tracePowerPolygons\")??[];return iPo(e,oPo(t,n))}},hMe=1e-8,cPo=(t,e,n)=\u003e{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)\u003ehMe)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i\u003c-hMe)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return i\u003c=r+hMe},RRt=(t,e)=\u003e{let n=!1;for(let o=0,i=e.vertices.length-1;o\u003ce.vertices.length;i=o++){const r=e.vertices[o],s=e.vertices[i];if(cPo(t,s,r))return!0;r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},lPo=(t,e)=\u003eRRt(t,e.outer_ring)\u0026\u0026!e.inner_rings.some(n=\u003eRRt(t,n)),uPo=(t,e)=\u003ee.some(n=\u003elPo(t,n)),TRt=t=\u003e{const e=t.flatMap(n=\u003en.outer_ring.vertices);if(e.length!==0)return{minX:Math.min(...e.map(n=\u003en.x)),maxX:Math.max(...e.map(n=\u003en.x)),minY:Math.min(...e.map(n=\u003en.y)),maxY:Math.max(...e.map(n=\u003en.y))}},kRt=({center:t,radius:e,shapes:n})=\u003e{const o=[t];for(let i=0;i\u003c32;i++){const r=i/32*Math.PI*2;o.push({x:t.x+Math.cos(r)*e,y:t.y+Math.sin(r)*e})}return o.every(i=\u003euPo(i,n))},pMe=(t,e)=\u003ee.some(n=\u003eString(n)===String(t)),gPo=t=\u003e{if(!(t.do_not_place||!t.obstructs_within_bounds))return{kind:\"rect\",center:t.center,width:t.width,height:t.height,ccwRotation:t.rotation}},dPo=t=\u003et.shape===\"circle\"?{kind:\"circle\",center:{x:t.x,y:t.y},radius:t.radius}:t.shape===\"polygon\"?{kind:\"polygon\",points:t.points}:{kind:\"rect\",center:{x:t.x,y:t.y},width:t.width,height:t.height,ccwRotation:t.shape===\"rotated_rect\"||t.shape===\"rotated_pill\"?t.ccw_rotation:0},hPo=t=\u003e{if(t.shape===\"circle\")return{kind:\"circle\",center:{x:t.x,y:t.y},radius:t.outer_diameter/2};if(\"outer_width\"in t)return{kind:\"rect\",center:{x:t.x,y:t.y},width:t.outer_width,height:t.outer_height,ccwRotation:t.ccw_rotation};if(t.shape===\"hole_with_polygon_pad\"){const e=(t.ccw_rotation??0)*Math.PI/180,n=Math.cos(e),o=Math.sin(e);return{kind:\"polygon\",points:t.pad_outline.map(i=\u003e({x:t.x+i.x*n-i.y*o,y:t.y+i.x*o+i.y*n}))}}return{kind:\"rect\",center:{x:t.x,y:t.y},width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:\"rect_ccw_rotation\"in t?t.rect_ccw_rotation??0:0}},pPo=t=\u003e\"hole_diameter\"in t?t.hole_shape===\"circle\"?{kind:\"circle\",center:{x:t.x,y:t.y},radius:t.hole_diameter/2}:{kind:\"rect\",center:{x:t.x,y:t.y},width:t.hole_diameter,height:t.hole_diameter,ccwRotation:0}:{kind:\"rect\",center:{x:t.x,y:t.y},width:t.hole_width,height:t.hole_height,ccwRotation:t.hole_shape===\"rotated_pill\"?t.ccw_rotation:0},mPo=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o**2+i**2;if(r===0)return Math.hypot(t.x-e.x,t.y-e.y);const s=Math.max(0,Math.min(1,((t.x-e.x)*o+(t.y-e.y)*i)/r));return Math.hypot(t.x-(e.x+s*o),t.y-(e.y+s*i))},_Po=(t,e)=\u003e{let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o],s=e[i];r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},fPo=(t,e,n)=\u003e{if(n.kind===\"circle\")return Math.hypot(t.x-n.center.x,t.y-n.center.y)\u003ce+n.radius;if(n.kind===\"polygon\")return _Po(t,n.points)?!0:n.points.some((l,u)=\u003emPo(t,l,n.points[(u+1)%n.points.length])\u003ce);const o=-n.ccwRotation*Math.PI/180,i=t.x-n.center.x,r=t.y-n.center.y,s=i*Math.cos(o)-r*Math.sin(o),a=i*Math.sin(o)+r*Math.cos(o),A=Math.max(Math.abs(s)-n.width/2,0),c=Math.max(Math.abs(a)-n.height/2,0);return Math.hypot(A,c)\u003ce},IPo=(t,e)=\u003et.flatMap(n=\u003e{if(n.type===\"pcb_component\"\u0026\u0026pMe(n.layer,e)){const o=gPo(n);return o?[o]:[]}return n.type===\"pcb_smtpad\"\u0026\u0026pMe(n.layer,e)?[dPo(n)]:n.type===\"pcb_plated_hole\"\u0026\u0026n.layers.some(o=\u003epMe(o,e))?[hPo(n)]:n.type===\"pcb_hole\"?[pPo(n)]:[]}),CPo=({center:t,radius:e,obstacles:n})=\u003en.some(o=\u003efPo(t,e,o)),yPo=(t={})=\u003e{const e={sourceNetIds:t.sourceNetIds?new Set(t.sourceNetIds):void 0,layers:t.layers??[\"top\",\"bottom\"],viaStitchPitch:t.viaStitchPitch??1,viaHoleDiameter:t.viaHoleDiameter??.3,viaOuterDiameter:t.viaOuterDiameter??.6,pourEdgeClearance:t.pourEdgeClearance??.2,obstacleClearance:t.obstacleClearance??.2,minimumViaSeparation:t.minimumViaSeparation??Math.max(t.viaOuterDiameter??.6,.8),gridOrigin:t.gridOrigin??{x:0,y:0},isTented:t.isTented??!0};for(const[n,o]of[[\"viaStitchPitch\",e.viaStitchPitch],[\"viaHoleDiameter\",e.viaHoleDiameter],[\"viaOuterDiameter\",e.viaOuterDiameter],[\"minimumViaSeparation\",e.minimumViaSeparation]])if(!Number.isFinite(o)||o\u003c=0)throw new Error(`${n} must be a finite number greater than zero`);if(!Number.isFinite(e.pourEdgeClearance)||e.pourEdgeClearance\u003c0)throw new Error(\"pourEdgeClearance must be a finite non-negative number\");if(!Number.isFinite(e.obstacleClearance)||e.obstacleClearance\u003c0)throw new Error(\"obstacleClearance must be a finite non-negative number\");if(!Number.isFinite(e.gridOrigin.x)||!Number.isFinite(e.gridOrigin.y))throw new Error(\"gridOrigin coordinates must be finite numbers\");if(e.viaHoleDiameter\u003e=e.viaOuterDiameter)throw new Error(\"viaHoleDiameter must be smaller than viaOuterDiameter\");if(String(e.layers[0])===String(e.layers[1]))throw new Error(\"layers must contain two distinct PCB layers\");return e},xPo=t=\u003et.type===\"pcb_copper_pour\"\u0026\u0026t.shape===\"brep\",EPo=(t,e)=\u003e{const n=new Map(t.circuitJson.filter(a=\u003ea.type===\"source_net\").map(a=\u003e[a.source_net_id,a])),o=new Map;for(const a of t.circuitJson){if(!xPo(a)||!a.source_net_id||e.sourceNetIds\u0026\u0026!e.sourceNetIds.has(a.source_net_id))continue;const A=o.get(a.source_net_id)??[];A.push(a),o.set(a.source_net_id,A)}const[i,r]=e.layers,s=[];for(const[a,A]of o){const c=A.filter(u=\u003eString(u.layer)===String(i)),l=A.filter(u=\u003eString(u.layer)===String(r));c.length===0||l.length===0||s.push({sourceNetId:a,sourceNet:n.get(a),fromLayerPours:c,toLayerPours:l})}return s},BPo=(t,e)=\u003e(t.outer_diameter??e*2)/2,bPo=({center:t,radius:e,occupiedVias:n,minimumViaSeparation:o})=\u003en.some(i=\u003eMath.hypot(t.x-i.center.x,t.y-i.center.y)\u003cMath.max(o,e+i.radius)),FRt=({minimum:t,maximum:e,origin:n,pitch:o})=\u003e{const i=[],r=Math.ceil((t-n)/o),s=Math.floor((e-n)/o);for(let a=r;a\u003c=s;a++)i.push(n+a*o);return i},LRt=class extends fC{constructor(t){super(),this.input=t,this.options=yPo(t.options),this.copperPourPairContexts=EPo(t,this.options),this.stitchingObstacles=IPo(t.circuitJson,this.options.layers);const e=this.options.viaOuterDiameter/2;for(const n of t.circuitJson)if(n.type===\"pcb_via\"){const o=n;this.existingPcbViaIds.add(o.pcb_via_id),this.occupiedVias.push({center:{x:o.x,y:o.y},radius:o.outer_diameter/2})}else if(n.type===\"pcb_trace\")for(const o of n.route)o.route_type===\"via\"\u0026\u0026this.occupiedVias.push({center:{x:o.x,y:o.y},radius:BPo(o,e)})}input;options;copperPourPairContexts;pcbVias=[];occupiedVias=[];existingPcbViaIds=new Set;stitchingObstacles;nextCopperPourPairIndex=0;nextViaId=0;_step(){const t=this.copperPourPairContexts[this.nextCopperPourPairIndex];if(!t){this.solved=!0,this.progress=1;return}this.processCopperPourPair(t),this.nextCopperPourPairIndex+=1,this.progress=this.copperPourPairContexts.length===0?1:this.nextCopperPourPairIndex/this.copperPourPairContexts.length,this.solved=this.nextCopperPourPairIndex===this.copperPourPairContexts.length}processCopperPourPair(t){const[e,n]=this.options.layers,o=t.fromLayerPours.map(h=\u003eh.brep_shape),i=t.toLayerPours.map(h=\u003eh.brep_shape),r=TRt(o),s=TRt(i);if(!r||!s)return;const a={minX:Math.max(r.minX,s.minX),maxX:Math.min(r.maxX,s.maxX),minY:Math.max(r.minY,s.minY),maxY:Math.min(r.maxY,s.maxY)};if(a.minX\u003ea.maxX||a.minY\u003ea.maxY)return;const A=this.options.viaOuterDiameter/2,c=A+this.options.pourEdgeClearance,l=A+this.options.obstacleClearance,u=FRt({minimum:a.minX+c,maximum:a.maxX-c,origin:this.options.gridOrigin.x,pitch:this.options.viaStitchPitch}),g=FRt({minimum:a.minY+c,maximum:a.maxY-c,origin:this.options.gridOrigin.y,pitch:this.options.viaStitchPitch});for(const h of g)for(const d of u){const p={x:d,y:h};if(bPo({center:p,radius:A,occupiedVias:this.occupiedVias,minimumViaSeparation:this.options.minimumViaSeparation})||CPo({center:p,radius:l,obstacles:this.stitchingObstacles})||!kRt({center:p,radius:c,shapes:o})||!kRt({center:p,radius:c,shapes:i}))continue;let m=`via_stitch_via_${this.nextViaId++}`;for(;this.existingPcbViaIds.has(m);)m=`via_stitch_via_${this.nextViaId++}`;const _=t.fromLayerPours[0],f={type:\"pcb_via\",pcb_via_id:m,x:d,y:h,hole_diameter:this.options.viaHoleDiameter,outer_diameter:this.options.viaOuterDiameter,layers:[e,n],from_layer:e,to_layer:n,source_net_id:t.sourceNetId,subcircuit_id:_.subcircuit_id,pcb_group_id:_.pcb_group_id,subcircuit_connectivity_map_key:t.sourceNet?.subcircuit_connectivity_map_key,is_tented:this.options.isTented};this.pcbVias.push(f),this.existingPcbViaIds.add(m),this.occupiedVias.push({center:p,radius:A})}}getOutput(){return{processedCopperPourPairCount:this.copperPourPairContexts.length,pcbVias:this.pcbVias}}},mMe={PackSolver2:rj,LayoutPipelineSolver:ZSt,AutoroutingPipelineSolver:F7t,AssignableAutoroutingPipeline2:ieo,AssignableAutoroutingPipeline3:Bno,AutoroutingPipeline1_OriginalUnravel:zZn,AutoroutingPipelineSolver3_HgPortPointPathing:Rno,AutoroutingPipelineSolver4:s9t,AutoroutingPipelineSolver5:$0o,AutoroutingPipelineSolver7_MultiGraph:F7t,AutoroutingPipelineSolver8:xgo,AutoroutingPipelineSolver9_PreloadedTraceGraph:X6t,AutoroutingPipelineSolver9_Networked:s8t,AutoroutingPipelineSolver11_Simplification:hho,CopperPourPipelineSolver:Rbt,CreateFdmEnclosureSolver:Vbt,FanoutSolver:Sue,ImplicitCopperPourPipelineSolver:NRt,SchematicTracePipelineSolver:Ewt,ViaStitchSolver:LRt},SPo=\"capacity-autorouter:\",HRt=new WeakMap;function _Me(t){return typeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"then\"in t\u0026\u0026typeof t.then==\"function\"}function ORt(t){return t.constructor.name===\"AsyncFunction\"}var QPo=class{constructor(t){this.localCacheEngine=t,this.isSyncCache=!ORt(t.getItem)\u0026\u0026!ORt(t.setItem)}localCacheEngine;isSyncCache;cacheHits=0;cacheMisses=0;cacheHitsByPrefix={};cacheMissesByPrefix={};knownCacheKeys=new Set;getCachedSolutionSync(t){if(this.isSyncCache){this.knownCacheKeys.add(t);try{const e=this.localCacheEngine.getItem(this.getLocalCacheEngineKey(t));if(_Me(e)){this.isSyncCache=!1,Promise.resolve(e).catch(()=\u003e{}),this.recordCacheMiss(t);return}return this.parseCachedItem(t,e)}catch{this.recordCacheMiss(t);return}}}async getCachedSolution(t){this.knownCacheKeys.add(t);try{const e=await this.localCacheEngine.getItem(this.getLocalCacheEngineKey(t));return this.parseCachedItem(t,e)}catch{this.recordCacheMiss(t);return}}setCachedSolutionSync(t,e){if(this.isSyncCache){this.knownCacheKeys.add(t);try{const n=JSON.stringify(e);if(n===void 0)return;const o=this.localCacheEngine.setItem(this.getLocalCacheEngineKey(t),n);_Me(o)\u0026\u0026(this.isSyncCache=!1,Promise.resolve(o).catch(()=\u003e{}))}catch{}}}async setCachedSolution(t,e){this.knownCacheKeys.add(t);try{const n=JSON.stringify(e);if(n===void 0)return;await this.localCacheEngine.setItem(this.getLocalCacheEngineKey(t),n)}catch{}}getAllCacheKeys(){return[...this.knownCacheKeys]}clearCache(){for(const t of this.knownCacheKeys){const e=this.getLocalCacheEngineKey(t);try{const n=this.localCacheEngine.removeItem?this.localCacheEngine.removeItem(e):this.localCacheEngine.setItem(e,\"null\");_Me(n)\u0026\u0026Promise.resolve(n).catch(()=\u003e{})}catch{}}this.knownCacheKeys.clear(),this.cacheHits=0,this.cacheMisses=0,this.cacheHitsByPrefix={},this.cacheMissesByPrefix={}}getLocalCacheEngineKey(t){return`${SPo}${t}`}parseCachedItem(t,e){if(e===null){this.recordCacheMiss(t);return}try{const n=JSON.parse(e);if(n===null){this.recordCacheMiss(t);return}return this.recordCacheHit(t),n}catch{this.recordCacheMiss(t);return}}recordCacheHit(t){this.cacheHits++;const e=t.split(\":\")[0];this.cacheHitsByPrefix[e]=(this.cacheHitsByPrefix[e]??0)+1}recordCacheMiss(t){this.cacheMisses++;const e=t.split(\":\")[0];this.cacheMissesByPrefix[e]=(this.cacheMissesByPrefix[e]??0)+1}};function vPo(t){let e=HRt.get(t);return e||(e=new QPo(t),HRt.set(t,e)),e}var GRt=({useAssignableSolver:t=!1,useAutoJumperSolver:e=!1,autorouterVersion:n,useLaserPrefabSolver:o=!1,useTraceSimplificationSolver:i=!1,platformConfig:r,effort:s})=\u003e{const a=r?.useCloudAutorouter\u0026\u0026(s===void 0||s===1)?\"AutoroutingPipelineSolver9_Networked\":\"AutoroutingPipelineSolver9_PreloadedTraceGraph\";return i?\"AutoroutingPipelineSolver11_Simplification\":n===\"beta_pipeline1\"?\"AutoroutingPipeline1_OriginalUnravel\":n===\"beta_pipeline3\"?\"AutoroutingPipelineSolver3_HgPortPointPathing\":n===\"beta_pipeline4\"?\"AutoroutingPipelineSolver4\":n===\"beta_pipeline5\"?\"AutoroutingPipelineSolver5\":n===\"beta_pipeline7\"?\"AutoroutingPipelineSolver7_MultiGraph\":n===\"beta_pipeline9\"||n===\"latest\"?a:o?\"AutoroutingPipelineSolver8\":e?\"AssignableAutoroutingPipeline3\":t?\"AssignableAutoroutingPipeline2\":a};function wPo(t){return t?.localCacheEngine?vPo(t.localCacheEngine):null}var PPo=class{input;isRouting=!1;solver;eventHandlers={complete:[],error:[],progress:[]};cycleCount=0;stepDelay;timeoutId;constructor(t,e={}){this.input=t;const{capacityDepth:n,targetMinCapacity:o,stepDelay:i=0,useAssignableSolver:r=!1,useAutoJumperSolver:s=!1,autorouterVersion:a,useLaserPrefabSolver:A=!1,useTraceSimplificationSolver:c=!1,effort:l,platformConfig:u,onSolverStarted:g}=e,h=GRt({useAssignableSolver:r,useAutoJumperSolver:s,autorouterVersion:a,useLaserPrefabSolver:A,useTraceSimplificationSolver:c,platformConfig:u,effort:l}),d=wPo(u),p={capacityDepth:n,targetMinCapacity:o,cacheProvider:d,effort:l};this.solver=h===\"AutoroutingPipelineSolver9_Networked\"?new s8t(t,{...p,effort:1}):new mMe[h](t,p),g?.({solverName:h,solverParams:{input:t,options:{capacityDepth:n,targetMinCapacity:o,cacheProvider:d,effort:l}}}),this.stepDelay=i}start(){this.isRouting||(this.isRouting=!0,this.cycleCount=0,this.runCycleAndQueueNextCycle())}async stepSolver(){if(\"stepAsync\"in this.solver\u0026\u0026typeof this.solver.stepAsync==\"function\"){await this.solver.stepAsync();return}this.solver.step()}async runCycleAndQueueNextCycle(){if(this.isRouting)try{if(this.solver.solved||this.solver.failed){this.solver.failed?this.emitEvent({type:\"error\",error:new Oj(this.solver.error||\"Routing failed\")}):this.emitEvent({type:\"complete\",traces:this.solver.getOutputSimplifiedPcbTraces()}),this.isRouting=!1;return}const t=Date.now(),e=this.solver.iterations;for(;Date.now()-t\u003c250\u0026\u0026!this.solver.failed\u0026\u0026!this.solver.solved;)await this.stepSolver();const n=(this.solver.iterations-e)/(Date.now()-t)*1e3;this.cycleCount++;const o=this.solver?.preview()||void 0,i=this.solver.progress;this.emitEvent({type:\"progress\",steps:this.cycleCount,iterationsPerSecond:n,progress:i,phase:\"getCurrentPhase\"in this.solver?this.solver.getCurrentPhase():this.solver.activeSubSolver?.getSolverName()??this.solver.getSolverName(),debugGraphics:o}),this.stepDelay\u003e0?this.timeoutId=setTimeout(()=\u003e{this.runCycleAndQueueNextCycle()},this.stepDelay):this.timeoutId=setTimeout(()=\u003e{this.runCycleAndQueueNextCycle()},0)}catch(t){this.emitEvent({type:\"error\",error:t instanceof Error?new Oj(t.message):new Oj(String(t))}),this.isRouting=!1}}stop(){this.isRouting\u0026\u0026(this.isRouting=!1,this.timeoutId!==void 0\u0026\u0026(clearTimeout(this.timeoutId),this.timeoutId=void 0))}on(t,e){t===\"complete\"?this.eventHandlers.complete.push(e):t===\"error\"?this.eventHandlers.error.push(e):t===\"progress\"\u0026\u0026this.eventHandlers.progress.push(e)}emitEvent(t){if(t.type===\"complete\")for(const e of this.eventHandlers.complete)e(t);else if(t.type===\"error\")for(const e of this.eventHandlers.error)e(t);else if(t.type===\"progress\")for(const e of this.eventHandlers.progress)e(t)}solveSync(){if(this.solver.solve(),this.solver.failed)throw new Oj(this.solver.error||\"Routing failed\");return this.solver.getOutputSimplifiedPcbTraces()}getConnectedOffboardObstacles(){return\"getConnectedOffboardObstacles\"in this.solver?this.solver.getConnectedOffboardObstacles():{}}},YRt=(t,e)=\u003e({name:t,cacheable:!0,getSolverName:n=\u003eGRt({...n,...e}),create:({simpleRouteJson:n,commonAutorouterOptions:o,onSolverStarted:i})=\u003enew PPo(n,{...o,...e,onSolverStarted:r=\u003ei?.({...r,solverConstructorArgs:[r.solverParams]})})}),MPo=YRt(\"tscircuit\",{}),DPo=YRt(\"tscircuit_simplify\",{useTraceSimplificationSolver:!0}),URt=t=\u003e({name:t,cacheable:!1,followUpAutorouter:\"default\",getSolverName:()=\u003e\"FanoutSolver\",create:({simpleRouteJson:e,busFanoutDirections:n,fanoutBounds:o,fanoutRoutingLayers:i,allowBlindAndBuriedVias:r,componentNamesById:s,onSolverStarted:a})=\u003enew aMe(e,{mode:t,busFanoutDirections:n,fanoutBounds:o,fanoutRoutingLayers:i,allowBlindAndBuriedVias:r,componentNamesById:s,onSolverStarted:a})}),NPo=new Map([[\"single_layer_fanout\",URt(\"single_layer_fanout\")],[\"fanout\",URt(\"fanout\")],[\"simplify\",DPo]]),KRt=t=\u003eNPo.get(t??\"\")??MPo,RPo=(t,e)=\u003e{const n=KRt(t.preset),o=[{autorouterConfig:t,strategy:n,usesPreviousStageOutput:!1}];if(n.followUpAutorouter){const i=h$(n.followUpAutorouter,e);o.push({autorouterConfig:i,strategy:KRt(i.preset),usesPreviousStageOutput:!0})}return o},TPo=({circuitJson:t,editEvents:e,manualEditsFile:n})=\u003e{const o={...n,pcb_placements:[...n.pcb_placements??[]]};for(const i of e)if(i.edit_event_type===\"edit_pcb_component_location\"){const{pcb_component_id:r,new_center:s}=i,a=Mr(t).pcb_component.get(r);if(!a)continue;const A=Mr(t).source_component.get(a.source_component_id);if(!A)continue;const c=o.pcb_placements?.findIndex(u=\u003eu.selector===A.name),l={selector:A.name,center:s,relative_to:\"group_center\"};c\u003e=0?o.pcb_placements[c]=l:o.pcb_placements.push(l)}return o},kPo=({circuitJson:t,editEvents:e,manualEditsFile:n})=\u003e{const o={...n,schematic_placements:[...n.schematic_placements??[]]};for(const i of e)if(i.edit_event_type===\"edit_schematic_component_location\"){const{schematic_component_id:r,new_center:s}=i,a=Mr(t).schematic_component.get(r);if(!a||!a.source_component_id)continue;const A=Mr(t).source_component.get(a.source_component_id);if(!A)continue;const c=o.schematic_placements?.findIndex(u=\u003eu.selector===A.name),l={selector:A.name,center:s,relative_to:\"group_center\"};c\u003e=0?o.schematic_placements[c]=l:o.schematic_placements.push(l)}return o},VRt=({circuitJson:t,editEvents:e,manualEditsFile:n})=\u003e{const o=e.filter(s=\u003es.edit_event_type===\"edit_schematic_component_location\"),i=e.filter(s=\u003es.edit_event_type===\"edit_pcb_component_location\");let r=n;return o.length\u003e0\u0026\u0026(r=kPo({circuitJson:t,editEvents:o,manualEditsFile:r})),i.length\u003e0\u0026\u0026(r=TPo({circuitJson:t,editEvents:i,manualEditsFile:r})),r},FPo=class extends Ir{get config(){return{componentName:\"Bus\",zodProps:wPn}}},LPo=(t,e)=\u003e{const{db:n}=t.root,o=t.getSubcircuit(),r=n.source_trace.list().filter(c=\u003ec.subcircuit_id===o.subcircuit_id).filter(c=\u003ec.name===e),s=new Set;if(r.length\u003e0)for(const c of r)c.subcircuit_connectivity_map_key\u0026\u0026s.add(c.subcircuit_connectivity_map_key);else{const c=o.selectOne(e,{type:\"port\"});if(c?.source_port_id){const l=n.source_port.get(c.source_port_id);l?.subcircuit_connectivity_map_key\u0026\u0026s.add(l.subcircuit_connectivity_map_key)}}if(s.size!==1)return;const a=s.values().next().value;return a?{sourcePorts:n.source_port.list().filter(c=\u003ec.subcircuit_connectivity_map_key===a),sourceTraceName:r.length\u003e0?e:void 0}:void 0},HPo=t=\u003et.length\u003c=1?t.join(\"\"):t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(\", \")}, and ${t.at(-1)}`,OPo=(t,e)=\u003e{let n;if(t.source_component_id\u0026\u0026(n=e.get(t.source_component_id)),!n?.name)return t.source_port_id;const o=t.most_frequently_referenced_by_name??t.name;return`.${n.name} \u003e .${o}`},GPo=({differentialPairName:t,connectionPolarity:e,connectionSelector:n,sourceTraceName:o,terminalPinSelectors:i})=\u003e{const r=HPo(i),s=r?`: ${r}`:\"\";return o\u0026\u0026i.length\u003e2?`Differential pair \"${t}\" ${e}Connection uses the ambiguous trace name \"${o}\": its connection has more than 2 terminal pins${s}.`:`Differential pair \"${t}\" ${e}Connection=\"${n}\" is not point-to-point: expected exactly 2 terminal pins, found ${i.length}${s}.`},YPo=t=\u003e{const{db:e}=t.root,n=new Map;for(const o of e.source_component.list())n.set(o.source_component_id,{name:o.name});for(const o of[\"positive\",\"negative\"]){let i=t._parsedProps.negativeConnection;o===\"positive\"\u0026\u0026(i=t._parsedProps.positiveConnection);const r=LPo(t,i);if(!r)continue;const s=r.sourcePorts;if(s.length===2)continue;let a=\"\";const A=s[0];if(A){if(!A.source_component_id)throw new Error(`Differential pair \"${t.name}\" resolved terminal port \"${A.source_port_id}\" without a source_component_id`);a=A.source_component_id}const c=s.map(l=\u003eOPo(l,n)).sort((l,u)=\u003el.localeCompare(u));e.source_property_ignored_warning.insert({source_component_id:a,property_name:`${o}Connection`,error_type:\"source_property_ignored_warning\",message:GPo({differentialPairName:t.name,connectionPolarity:o,connectionSelector:i,sourceTraceName:r.sourceTraceName,terminalPinSelectors:c}),subcircuit_id:t.getSubcircuit().subcircuit_id??void 0})}},UPo=class extends Ir{get config(){return{componentName:\"DifferentialPair\",zodProps:PPn}}doInitialSourceDesignRuleChecks(){YPo(this)}},zRt=t=\u003e{const e={...t.bounds};for(const n of t.connections)if(!n.isOffBoard)for(const o of n.pointsToConnect)e.minX=Math.min(e.minX,o.x),e.maxX=Math.max(e.maxX,o.x),e.minY=Math.min(e.minY,o.y),e.maxY=Math.max(e.maxY,o.y);return e},KPo=({bus:t,busSourceTraces:e,traceNameOrPortSelector:n})=\u003e{const o=e.filter(A=\u003eA.name===n),r=(o.length===0?t.getSubcircuit().selectOne(n,{type:\"port\"}):null)?.source_port_id??void 0,s=r?e.filter(A=\u003eA.connected_source_port_ids.includes(r)):o;if(s.length===0)throw new Error(`Could not find source trace for trace name or port selector \"${n}\" in bus \"${t.name}\"`);if(s.length\u003e1)throw new Error(`Trace name or port selector \"${n}\" matches multiple source traces in bus \"${t.name}\"`);return s[0].source_trace_id},VPo=({srjConnections:t,bus:e,sourceTraceId:n,traceNameOrPortSelector:o})=\u003e{const i=t.filter(r=\u003er.source_trace_id===n);if(i.length===0)throw new Error(`Could not find an SRJ connection for \"${o}\" in bus \"${e.name}\"`);return i.map(r=\u003er.name)},zPo=t=\u003et.trim().replace(/^net\\./,\"\").replace(/^\\./,\"\"),JPo=({fanoutPourNetMap:t,sourceNets:e,sourceTraces:n,subcircuitId:o})=\u003e{const i=new Map;if(!t)return i;const r=new Map;for(const[s,a]of Object.entries(t)){const A=Array.isArray(a)?a:[a];for(const c of A){const l=zPo(c);for(const u of e){if(u.name!==l)continue;const g=r.get(u.source_net_id);if(g\u0026\u0026g!==s)throw new Error(`Fanout plane net \"${l}\" maps to multiple layers (\"${g}\" and \"${s}\"); use fanoutPourNetMap to select one`);r.set(u.source_net_id,s)}}}for(const s of n){if(o\u0026\u0026s.subcircuit_id!==o||s.connected_source_port_ids.length!==1)continue;const a=new Set((s.connected_source_net_ids??[]).map(c=\u003er.get(c)).filter(c=\u003ec!==void 0));if(a.size\u003e1)throw new Error(`Source trace \"${s.name??s.source_trace_id}\" connects to fanout planes on multiple layers`);const A=a.values().next().value;A\u0026\u0026i.set(s.source_trace_id,A)}return i},WPo=({srjConnections:t,buses:e,sourceTraces:n,subcircuitId:o,planeTerminatedSourceTraceLayers:i})=\u003e{const r=[];for(const A of e){const c=A.getSubcircuit().subcircuit_id;if(o\u0026\u0026c!==o)continue;const l=n.filter(g=\u003eg.subcircuit_id===c),u=A._parsedProps.connections.flatMap(g=\u003e{const h=KPo({bus:A,busSourceTraces:l,traceNameOrPortSelector:g});return VPo({srjConnections:t,bus:A,sourceTraceId:h,traceNameOrPortSelector:g})});if(new Set(u).size!==u.length)throw new Error(`Bus \"${A.name}\" resolves multiple entries to one trace`);r.push({busId:A.name,name:A.name,connectionNames:u,...A._parsedProps.maxLengthSkew!==void 0?{maxLengthSkew:A._parsedProps.maxLengthSkew}:{},...A._parsedProps.pcbTraceWidth!==void 0?{traceWidth:A._parsedProps.pcbTraceWidth}:{},...A._parsedProps.pcbAllowedLayers!==void 0?{allowedLayers:A._parsedProps.pcbAllowedLayers}:{},...A._parsedProps.preferredLayer!==void 0?{preferredLayer:A._parsedProps.preferredLayer}:{},...A._parsedProps.preferredLayers!==void 0?{preferredLayers:A._parsedProps.preferredLayers}:{}})}const s=[];for(const[A,c]of i??[]){const l=n.find(h=\u003eh.source_trace_id===A),u=t.find(h=\u003eh.source_trace_id===A);if(!l||!u)continue;const g=l.name??l.source_trace_id;if([...r,...s].some(h=\u003eh.busId===g))throw new Error(`Fanout plane trace \"${g}\" conflicts with an existing bus name`);s.push({busId:g,name:g,connectionNames:[u.name],termination:{type:\"plane\",layer:c}})}const a=[...s,...r];return a.length\u003e0?a:void 0},jPo=(t,e)=\u003et.filter(n=\u003en.name===e),$Po=(t,e)=\u003et.filter(n=\u003en.connected_source_port_ids.includes(e)),JRt=({differentialPair:t,differentialPairSourceTraces:e,traceNameOrPortSelector:n})=\u003e{const o=t.getSubcircuit(),i=jPo(e,n),s=(i.length===0?o.selectOne(n,{type:\"port\"}):null)?.source_port_id??void 0,a=s?$Po(e,s):i;if(a.length===0)throw new Error(`Could not find source trace for trace name or port selector \"${n}\" in differential pair \"${t.name}\"`);if(a.length\u003e1)throw new Error(`Trace name or port selector \"${n}\" matches multiple source traces for differential pair \"${t.name}\"`);const A=a[0];if(!A)throw new Error(`Expected one source trace for trace name or port selector \"${n}\" in differential pair \"${t.name}\"`);const c=A.subcircuit_connectivity_map_key;if(!c)throw new Error(`Source trace \"${A.source_trace_id}\" does not have a subcircuit connectivity map key for differential pair \"${t.name}\"`);return c},WRt=({srjConnections:t,differentialPairName:e,differentialPairSourceTraces:n,traceSubcircuitConnectivityMapKey:o,traceNameOrPortSelector:i})=\u003e{const r=[],s=new Set;for(const c of n)if(c.subcircuit_connectivity_map_key===o){r.push(c.source_trace_id);for(const l of c.connected_source_net_ids??[])s.add(l)}const a=[];for(const c of t)(s.has(c.name)||c.source_trace_id\u0026\u0026r.includes(c.source_trace_id))\u0026\u0026a.push(c);if(a.length===0)throw new Error(`Could not find an SRJ connection for trace name or port selector \"${i}\" in differential pair \"${e}\"`);const A=new Map;for(const c of a){const l=c.routingPcbGroupId;if(A.has(l)){const u=l===void 0?\"the global routing cohort\":`routing PCB group \"${l}\"`;throw new Error(`Subcircuit connectivity map key \"${o}\" matches multiple SRJ connections in ${u} for differential pair \"${e}\"`)}A.set(l,c.name)}return A},jRt=t=\u003et===void 0?\"the global routing cohort\":`routing PCB group \"${t}\"`,qPo=({srjConnections:t,differentialPairs:e,sourceTraces:n,subcircuitId:o})=\u003e{const i=[];for(const r of e){const s=r.getSubcircuit().subcircuit_id;if(o\u0026\u0026s!==o)continue;const a=n.filter(p=\u003ep.subcircuit_id===s),A=r._parsedProps.positiveConnection,c=r._parsedProps.negativeConnection,l=JRt({differentialPair:r,differentialPairSourceTraces:a,traceNameOrPortSelector:A}),u=JRt({differentialPair:r,differentialPairSourceTraces:a,traceNameOrPortSelector:c}),g=WRt({srjConnections:t,differentialPairName:r.name,differentialPairSourceTraces:a,traceSubcircuitConnectivityMapKey:l,traceNameOrPortSelector:A}),h=WRt({srjConnections:t,differentialPairName:r.name,differentialPairSourceTraces:a,traceSubcircuitConnectivityMapKey:u,traceNameOrPortSelector:c}),d=r._parsedProps.maxLengthSkew??.1;for(const p of g.keys())if(!h.has(p))throw new Error(`Differential pair \"${r.name}\" has a positive SRJ connection in ${jRt(p)} without a matching negative SRJ connection`);for(const p of h.keys())if(!g.has(p))throw new Error(`Differential pair \"${r.name}\" has a negative SRJ connection in ${jRt(p)} without a matching positive SRJ connection`);for(const[p,m]of g){const _=h.get(p);i.push({connectionNames:[m,_],lengthTolerance:d,...r._parsedProps.pcbTraceGap!==void 0?{traceGap:r._parsedProps.pcbTraceGap}:{},...r._parsedProps.maxUncoupledLength!==void 0?{maxUncoupledLength:r._parsedProps.maxUncoupledLength}:{}})}}return i.length\u003e0?i:void 0},p$=t=\u003etypeof t==\"string\"?t:t.name,XPo=t=\u003et.source_trace_id??t.connection_name??t.pcb_trace_id,ZPo=t=\u003e{const e=new Set(t.connectsTo??[]);for(const n of t.route)if(n.route_type===\"wire\")for(const o of[n.start_pcb_port_id,n.end_pcb_port_id])o\u0026\u0026e.add(o);return Array.from(e)},eMo=t=\u003et.route.map(e=\u003e{if(e.route_type===\"wire\")return{route_type:\"wire\",x:e.x,y:e.y,width:e.width,layer:p$(e.layer)};if(e.route_type===\"via\"){const n=e,o=n.outer_diameter??n.via_diameter,i=n.hole_diameter??n.via_hole_diameter;return{route_type:\"via\",x:e.x,y:e.y,from_layer:p$(e.from_layer),to_layer:p$(e.to_layer),...o!==void 0?{via_diameter:o}:{},...i!==void 0?{via_hole_diameter:i}:{}}}return{route_type:\"through_obstacle\",start:e.start,end:e.end,from_layer:p$(e.start_layer),to_layer:p$(e.end_layer),width:e.width}}),tMo=({scopedDb:t,relevantSubcircuitIds:e})=\u003et.pcb_trace.list().filter(n=\u003e!n.subcircuit_id||n.pcb_component_id\u0026\u0026!n.source_trace_id?!1:e===null||e.has(n.subcircuit_id)).map(n=\u003e{const o=n,i=XPo(o);return{type:\"pcb_trace\",pcb_trace_id:n.pcb_trace_id,source_trace_id:n.source_trace_id,connection_name:i,connectsTo:ZPo(o),route:eMo(o)}}).filter(n=\u003en.route.length\u003e=2),nMo=.5,oMo=t=\u003eArray.from(new Set(t.filter(e=\u003e!!e))),iMo=t=\u003etypeof t==\"string\"?t:t.name,$Rt=({layer:t,connectedTo:e,center:n,width:o,height:i})=\u003e({type:\"rect\",layers:[t],center:n,width:o,height:i,connectedTo:e,isCopperPour:!0}),rMo=({outline:t,group:e,board:n})=\u003et\u0026\u0026t.length\u003e=3?t:e?.outline\u0026\u0026e.outline.length\u003e=3?e.outline:n?.outline\u0026\u0026n.outline.length\u003e=3?n.outline:null,sMo=({group:t,board:e})=\u003et?.width\u0026\u0026t.height?{center:t.center,width:t.width,height:t.height}:e?.width\u0026\u0026e.height?{center:e.center,width:e.width,height:e.height}:null,aMo=(t,e)=\u003eoMo([t.source_net_id,t.subcircuit_connectivity_map_key,t.source_net_id?e.getNetConnectedToId(t.source_net_id):null]),AMo=({connMap:t,subcircuitComponent:e,board:n,group:o})=\u003e{if(!e)return[];const i=[],r=e.selectAll(\"copperpour\");for(const s of r){const a=s._parsedProps;if(!a.unbroken)continue;const A=s.getSubcircuit().selectOne(a.connectsTo);if(!A?.source_net_id)continue;const c=iMo(a.layer),l=aMo(A,t);if(l.length===0)continue;const u=rMo({outline:a.outline,group:o,board:n});if(u){const h=Gwe(u,{rectHeight:nMo});if(h.length\u003e0){i.push(...h.map(d=\u003e$Rt({layer:c,connectedTo:l,center:d.center,width:d.width,height:d.height})));continue}}const g=sMo({group:o,board:n});g\u0026\u0026i.push($Rt({layer:c,connectedTo:l,center:g.center,width:g.width,height:g.height}))}return i},cMo=(t,e)=\u003e{const n=new Set;let o=e,i=!0;for(;o\u0026\u0026!n.has(o);){n.add(o);const r=t.source_group.getWhere({subcircuit_id:o}),s=r?t.source_board.getWhere({source_group_id:r.source_group_id}):void 0;if(s)return{board:t.pcb_board.getWhere({source_board_id:s.source_board_id})??null,subcircuitIsBoard:i};o=r?.parent_subcircuit_id??null,i=!1}return{board:null,subcircuitIsBoard:!1}},fMe=({db:t,circuitJson:e,subcircuit_id:n,minTraceWidth:o,minTraceToPadEdgeClearance:i,minViaEdgeToPadEdgeClearance:r,minViaHoleEdgeToViaHoleEdgeClearance:s,minPlatedHoleDrillEdgeToDrillEdgeClearance:a,minPadEdgeToPadEdgeClearance:A,minBoardEdgeClearance:c,minViaHoleDiameter:l,minViaPadDiameter:u,nominalTraceWidth:g,subcircuitComponent:h,routingPcbGroupId:d,fanoutPourNetMap:p,ignoreExistingTopLevelPcbRouteState:m=!1})=\u003e{if(!t\u0026\u0026e\u0026\u0026(t=Mr(e)),!t)throw new Error(\"db or circuitJson is required\");const _=t.pcb_trace_hint.list(),f=n?new Set([n]):null;if(n){const it=uPe(t,n);for(const Yt of it)f.add(Yt)}const I=(e??t.toArray()).filter(it=\u003e!n||\"subcircuit_id\"in it\u0026\u0026f.has(it.subcircuit_id));let C=null,y=!1;if(n){const it=cMo(t,n);C=it.board,y=it.subcircuitIsBoard\u0026\u0026C!==null}C||(C=t.pcb_board.list()[0]),t=Mr(I);const x=it=\u003e{if(!it?.source_component_id)return;const Yt=t.source_component.get(it.source_component_id);if(Yt?.name)return`${Yt.name}.${it.name}`},E=d?t.pcb_group.get(d):n?t.pcb_group.getWhere({subcircuit_id:n}):void 0;let B=h?.pcb_group_id;B==null\u0026\u0026!y\u0026\u0026(B=E?.pcb_group_id);const S=Vf(I),Q=t.pcb_breakout_point.list().filter(it=\u003e!n||f?.has(it.subcircuit_id)),w=it=\u003eit.subcircuit_id===n\u0026\u0026(B?it.pcb_group_id===B:!y),M=tMo({scopedDb:t,relevantSubcircuitIds:f}),k=new Map(M.map(it=\u003e[it.pcb_trace_id,it])),R=it=\u003e{if(!it.pcb_trace_id)return!1;const Yt=k.get(it.pcb_trace_id);if(!Yt)return!1;const pn=new Set(it.layers);return Yt.route.some(be=\u003e{if(be.route_type!==\"via\"||be.x!==it.x||be.y!==it.y)return!1;const et=new Set(lw({fromLayer:be.from_layer,toLayer:be.to_layer,layerCount:C?.num_layers??2}));return et.size===pn.size\u0026\u0026[...et].every(It=\u003epn.has(It))})},F=_Mt([...C?[C]:[],...t.source_component.list(),...t.source_port.list(),...t.pcb_port.list(),...t.pcb_component.list(),...t.pcb_smtpad.list(),...t.pcb_plated_hole.list(),...t.pcb_hole.list(),...t.pcb_trace.list().filter(it=\u003e!it.source_trace_id),...t.pcb_via.list().filter(it=\u003e(!m||!!it.subcircuit_id)\u0026\u0026!R(it)),...t.pcb_keepout.list(),...t.pcb_cutout.list()].filter(it=\u003eit.type===\"pcb_board\"||!n||f?.has(it.subcircuit_id)),S);F.push(...AMo({connMap:S,subcircuitComponent:h,board:C,group:E}));for(const it of F){const Yt=it.connectedTo.flatMap(pn=\u003eS.getIdsConnectedToNet(pn));it.connectedTo=[...new Set([...it.connectedTo,...Yt])]}const O=t.source_component_internal_connection.list(),U=new Map;for(const it of O)for(const Yt of it.source_port_ids)U.set(Yt,it.source_component_internal_connection_id);const Y=new Map;for(const it of t.pcb_port.list())if(it.source_port_id){const Yt=t.pcb_smtpad.getWhere({pcb_port_id:it.pcb_port_id});Yt\u0026\u0026Y.set(Yt.pcb_smtpad_id,it.source_port_id);const pn=t.pcb_plated_hole.getWhere({pcb_port_id:it.pcb_port_id});pn\u0026\u0026Y.set(pn.pcb_plated_hole_id,it.source_port_id)}for(const it of F)for(const Yt of it.connectedTo){const pn=Y.get(Yt);if(pn){const be=U.get(pn);if(be){it.offBoardConnectsTo=[be],it.netIsAssignable=!0;break}}}const W=F.flatMap(it=\u003e[{x:it.center.x-it.width/2,y:it.center.y-it.height/2},{x:it.center.x+it.width/2,y:it.center.y+it.height/2}]).concat(C?.outline??[]);let te;const j=!!(E?.width\u0026\u0026E.height\u0026\u0026n\u0026\u0026!y);if(j?te={minX:E.center.x-E.width/2,maxX:E.center.x+E.width/2,minY:E.center.y-E.height/2,maxY:E.center.y+E.height/2}:C\u0026\u0026!C.outline?te={minX:C.center.x-C.width/2,maxX:C.center.x+C.width/2,minY:C.center.y-C.height/2,maxY:C.center.y+C.height/2}:te={minX:Math.min(...W.map(it=\u003eit.x))-1,maxX:Math.max(...W.map(it=\u003eit.x))+1,minY:Math.min(...W.map(it=\u003eit.y))-1,maxY:Math.max(...W.map(it=\u003eit.y))+1},E?.width\u0026\u0026E.height\u0026\u0026!j){const it={minX:E.center.x-E.width/2,maxX:E.center.x+E.width/2,minY:E.center.y-E.height/2,maxY:E.center.y+E.height/2};te={minX:Math.min(te.minX,it.minX),maxX:Math.max(te.maxX,it.maxX),minY:Math.min(te.minY,it.minY),maxY:Math.max(te.maxY,it.maxY)}}const J=new Set(t.pcb_trace.list().filter(it=\u003eit.source_trace_id?n?it.subcircuit_id===n:it.subcircuit_id?t.source_trace.get(it.source_trace_id)?.subcircuit_id===it.subcircuit_id:!1:!1).map(it=\u003eit.source_trace_id).filter(it=\u003e!!it)),oe=new Map;for(const it of Q){const Yt=it.source_port_id;Yt\u0026\u0026oe.set(Yt,it)}const ie=it=\u003e{const Yt=it.layers?.[0]??\"top\",pn=oe.get(it.source_port_id),be=x(t.source_port.get(it.source_port_id));return pn\u0026\u0026!w(pn)?{x:pn.x,y:pn.y,layer:pn.layer??Yt,pointId:pn.pcb_breakout_point_id,port_selector:be}:{x:it.x,y:it.y,layer:Yt,pointId:it.pcb_port_id,pcb_port_id:it.pcb_port_id,port_selector:be}},ne=t.source_trace.list(),le=JPo({fanoutPourNetMap:p,sourceNets:t.source_net.list(),sourceTraces:ne,subcircuitId:n}),ge=ne.filter(it=\u003e!J.has(it.source_trace_id)).filter(it=\u003e!n||it.subcircuit_id===n).map(it=\u003e{const Yt=it.connected_source_port_ids.map(xt=\u003et.pcb_port.getWhere({source_port_id:xt})).filter(xt=\u003ext!==null),pn=le.has(it.source_trace_id);if(Yt.length\u003c2\u0026\u0026!(pn\u0026\u0026Yt.length===1))return null;for(const xt of Yt)if(xt.x===void 0||xt.y===void 0)return console.error(`(source_port_id: ${xt.source_port_id}) for trace ${it.source_trace_id} does not have x/y coordinates. Skipping this trace.`),null;const be=new Set(Yt.map(xt=\u003ext.pcb_port_id)),et=_.filter(xt=\u003ebe.has(xt.pcb_port_id)),It=[];for(const xt of et){const Ze=t.pcb_port.get(xt.pcb_port_id)?.layers?.[0]??\"top\";for(const dt of xt.route)It.push({x:dt.x,y:dt.y,layer:Ze})}const Bt=Yt.map(xt=\u003eie(xt)),[mt,...st]=Bt;return{name:it.source_trace_id??S.getNetConnectedToId(it.source_trace_id)??\"\",source_trace_id:it.source_trace_id,nominalTraceWidth:it.min_trace_thickness,width:it.min_trace_thickness,pointsToConnect:[mt,...It,...st]}}).filter(it=\u003eit!==null),_e=t.source_net.list().filter(it=\u003e!n||it.subcircuit_id===n),ue=[],fe=new Map,pe=new Set,ye=new Set(_e.map(it=\u003eit.source_net_id)),Me=t.source_trace.list().filter(it=\u003e!n||it.subcircuit_id===n),ve=new Set((h?.selectAll(\"trace\")??[]).flatMap(it=\u003e{const Yt=it;return Yt._exposesSubcircuitConnection\u0026\u0026Yt.source_trace_id?[Yt.source_trace_id]:[]})),he=new Set;for(const it of Me)if(ve.has(it.source_trace_id))for(const Yt of it.connected_source_net_ids??[])ye.has(Yt)||he.add(Yt);const Qe=new Set(n?t.pcb_trace.list().filter(it=\u003eit.subcircuit_id\u0026\u0026it.subcircuit_id!==n\u0026\u0026f?.has(it.subcircuit_id)).map(it=\u003eit.source_trace_id).filter(it=\u003e!!it):[]),Pe=t.source_trace.list().filter(it=\u003e!le.has(it.source_trace_id)).filter(it=\u003e!J.has(it.source_trace_id)||n!=null\u0026\u0026it.subcircuit_id===n).filter(it=\u003e!n||it.subcircuit_id===n||(it.connected_source_net_ids?.some(Yt=\u003eye.has(Yt))??!1)||(it.connected_source_net_ids?.some(Yt=\u003ehe.has(Yt))??!1)\u0026\u0026!Qe.has(it.source_trace_id)),we=it=\u003eit?S.getNetConnectedToId(it)??it:null;for(const it of _e){const Yt=we(it.source_net_id);if(!Yt||pe.has(Yt))continue;pe.add(Yt);const pn=_e.filter(st=\u003ewe(st.source_net_id)===Yt).map(st=\u003est.source_net_id),be=Pe.filter(st=\u003e[st.source_trace_id,...st.connected_source_net_ids??[]].some(xt=\u003ewe(xt)===Yt));let et;for(const st of be)st.min_trace_thickness!==void 0\u0026\u0026(et=Math.max(et??0,st.min_trace_thickness));const It=[],Bt=new Set;for(const st of be){const xt=t.pcb_port.list().filter(Xe=\u003est.connected_source_port_ids.includes(Xe.source_port_id));for(const Xe of xt){const Ze=ie(Xe);Bt.has(Ze.pointId)||(Bt.add(Ze.pointId),It.push(Ze))}}const mt={name:it.source_net_id??S.getNetConnectedToId(it.source_net_id),nominalTraceWidth:et,width:et,pointsToConnect:It};if(It.length!==0){ue.push(mt);for(const st of pn)fe.set(st,mt)}}const Te=[];for(const it of Q){const Yt=it.source_port_id,pn={x:it.x,y:it.y,layer:it.layer??\"top\",pointId:it.pcb_breakout_point_id};if(Yt){const be=t.pcb_port.getWhere({source_port_id:Yt});if(!be)continue;const et={x:be.x,y:be.y,layer:be.layers?.[0]??\"top\",pointId:be.pcb_port_id,pcb_port_id:be.pcb_port_id,port_selector:x(t.source_port.get(be.source_port_id))},It=w(it),Bt=!It\u0026\u0026it.subcircuit_id===n;if(It||Bt){Te.push({name:Bt?`breakout:${it.pcb_breakout_point_id}`:Yt,source_trace_id:it.source_trace_id,routingPcbGroupId:Bt?it.pcb_group_id:void 0,pointsToConnect:[et,pn]});continue}it.source_trace_id||Te.push({name:Yt,pointsToConnect:[et,pn]});continue}if(it.source_net_id){const be=fe.get(it.source_net_id);be?be.pointsToConnect.push(pn):Te.push({name:it.source_net_id,pointsToConnect:[pn]})}}const Re=ue.filter(it=\u003eit.pointsToConnect.length\u003e=2),Ee=[...ge,...Re,...Te],ke=o??C?.min_trace_width??.1;for(const it of Ee)it.nominalTraceWidth??=g??ke,it.width??=g??ke;te=zRt({bounds:te,connections:Ee});const Ce=h?.selectAll(\"differentialpair\")??[],Le=h?.selectAll(\"bus\")??[],Ye=qPo({srjConnections:Ee,differentialPairs:Ce,sourceTraces:t.source_trace.list(),subcircuitId:n}),tt=WPo({srjConnections:Ee,buses:Le,sourceTraces:t.source_trace.list(),subcircuitId:n,planeTerminatedSourceTraceLayers:le});if(n){const it=new Map;for(const pn of Ee)for(const be of pn.pointsToConnect)be.pointId\u0026\u0026it.set(be.pointId,pn);const Yt=t.pcb_trace.list().filter(pn=\u003ef?.has(pn.subcircuit_id));for(const pn of Yt){const be=new Set;for(const Bt of pn.route)Bt.start_pcb_port_id\u0026\u0026be.add(Bt.start_pcb_port_id),Bt.end_pcb_port_id\u0026\u0026be.add(Bt.end_pcb_port_id);if(be.size\u003c2)continue;const et=be.values().next().value;if(!et)continue;const It=it.get(et);It\u0026\u0026[...be].every(Bt=\u003eit.get(Bt)===It)\u0026\u0026(It.externallyConnectedPointIds??=[],It.externallyConnectedPointIds.push([...be]))}}const At=l??C?.min_via_hole_diameter,at=u??C?.min_via_pad_diameter,nt=i??C?.min_trace_to_pad_edge_clearance,gt=r??C?.min_via_edge_to_pad_edge_clearance,bt=s??C?.min_via_hole_edge_to_via_hole_edge_clearance,Ct=a??C?.min_plated_hole_drill_edge_to_drill_edge_clearance,Dt=A??C?.min_pad_edge_to_pad_edge_clearance,kt=c??C?.min_board_edge_clearance;return{simpleRouteJson:{bounds:te,obstacles:F,connections:Ee,differentialPairs:Ye,...tt?{buses:tt}:{},traces:M.length\u003e0?M:void 0,layerCount:C?.num_layers??2,allowBlindAndBuriedVias:C?.allow_blind_and_buried_vias??!1,minTraceWidth:Math.min(ke,...Ee.map(it=\u003eit.width)),minViaDiameter:at,minViaHoleDiameter:At,minViaPadDiameter:at,min_via_hole_diameter:At,min_via_pad_diameter:at,minTraceToPadEdgeClearance:nt,minViaEdgeToPadEdgeClearance:gt,minViaHoleEdgeToViaHoleEdgeClearance:bt,minPlatedHoleDrillEdgeToDrillEdgeClearance:Ct,minPadEdgeToPadEdgeClearance:Dt,minBoardEdgeClearance:kt,nominalTraceWidth:g,outline:C?.outline?.map(it=\u003e({...it}))},connMap:S}},qRt=class extends Ir{matchedPort=null;get config(){return{componentName:\"TraceHint\",zodProps:yDn}}doInitialPortMatching(){const{db:t}=this.root,{_parsedProps:e,parent:n}=this;if(!n)return;if(n.componentName===\"Trace\"){this.renderError(`Port inference inside trace is not yet supported (${this})`);return}if(!n)throw new Error(\"TraceHint has no parent\");if(!e.for){this.renderError(`TraceHint has no for property (${this})`);return}const o=n.selectOne(e.for,{type:\"port\"});o||this.renderError(`${this} could not find port for selector \"${e.for}\"`),this.matchedPort=o,o.registerMatch(this)}getPcbRouteHints(){const{_parsedProps:t}=this,e=t.offset?[t.offset]:t.offsets;if(!e)return[];const n=this._computePcbGlobalTransformBeforeLayout();return e.map(o=\u003e({...ts(n,o),via:o.via,to_layer:o.to_layer,trace_width:o.trace_width}))}doInitialPcbTraceHintRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this;t.pcb_trace_hint.insert({pcb_component_id:this.matchedPort?.pcb_component_id,pcb_port_id:this.matchedPort?.pcb_port_id,route:this.getPcbRouteHints()})}};function lMo({anchor:t,x:e,y:n,width:o,height:i,isInside:r}){switch(t){case\"top_left\":return{x:e,y:n+i,textAnchor:r?\"top_left\":\"bottom_left\"};case\"top_center\":return{x:e+o/2,y:n+i,textAnchor:r?\"top_center\":\"bottom_center\"};case\"top_right\":return{x:e+o,y:n+i,textAnchor:r?\"top_right\":\"bottom_right\"};case\"center_left\":return{x:e,y:n+i/2,textAnchor:r?\"center_left\":\"center_right\"};case\"center\":return{x:e+o/2,y:n+i/2,textAnchor:\"center\"};case\"center_right\":return{x:e+o,y:n+i/2,textAnchor:r?\"center_right\":\"center_left\"};case\"bottom_left\":return{x:e,y:n,textAnchor:r?\"bottom_left\":\"top_left\"};case\"bottom_center\":return{x:e+o/2,y:n,textAnchor:r?\"bottom_center\":\"top_center\"};case\"bottom_right\":return{x:e+o,y:n,textAnchor:r?\"bottom_right\":\"top_right\"};default:return{x:e+o/2,y:n+i,textAnchor:\"center\"}}}var XRt=t=\u003et?Object.entries(t).map(([e,n])=\u003e{const o=uw(e);if(o===null)throw new Error(`Invalid schematicbox pinLabels key \"${e}\". Expected pin\u003cnumber\u003e.`);const i=typeof n==\"string\"?[n]:[...n];return{pinNumber:o,displayPinLabel:i[0]??e,pinAliases:i}}):[],uMo=({referencedChip:t,schematicBoxPins:e})=\u003e{const n=Kj(t._parsedProps.schPinStyle,t._parsedProps.pinLabels);if(!n)return;const o={};for(const{pinNumber:i,referencedSourcePort:r}of e){if(r.pin_number===void 0)continue;const s=n[`pin${r.pin_number}`];s\u0026\u0026(o[`pin${i}`]=s)}return Object.keys(o).length\u003e0?o:void 0},gMo=({inheritedPinStyle:t,overridePinStyle:e})=\u003e{if(!t\u0026\u0026!e)return;const n={...t};for(const[o,i]of Object.entries(e??{}))n[o]={...n[o],...i};return Object.keys(n).length\u003e0?n:void 0},dMo=t=\u003e{if(t.root?.schematicDisabled)return;const{db:e}=t.root,n=t._parsedProps;if(!n.chipRef)return;const o=t.getSubcircuit().selectOne(n.chipRef);if(!o?.source_component_id)throw new Error(`Could not resolve chipRef \"${n.chipRef}\" for ${t.getString()}`);const i=XRt(n.pinLabels),r=Object.fromEntries(i.map(({pinNumber:f,displayPinLabel:I})=\u003e[`pin${f}`,I])),s=e.source_port.list({source_component_id:o.source_component_id}),a=i.map(f=\u003e{const I=s.find(C=\u003ef.pinAliases.some(y=\u003eC.name===y||C.port_hints?.includes(y)));if(!I)throw new Error(`Could not find pin \"${f.displayPinLabel}\" on chipRef \"${n.chipRef}\"`);return{...f,referencedSourcePort:I}}),A=uMo({referencedChip:o,schematicBoxPins:a}),c=gMo({inheritedPinStyle:A,overridePinStyle:Kj(n.schPinStyle,n.pinLabels)}),l=sPe({schWidth:n.width,schHeight:n.height,schPinSpacing:.2,pinCount:i.length,schPortArrangement:n.schPinArrangement,numericSchPinStyle:Kj(c),pinLabels:r}),u=t._getGlobalSchematicPositionBeforeLayout(),g=l.getSize(),h=t._resolveSchematicSheetId(),d=Object.fromEntries(i.map(({pinNumber:f,displayPinLabel:I})=\u003e[String(f),I])),p=e.schematic_component.insert({center:u,size:g,source_component_id:o.source_component_id,is_box_with_pins:!0,port_arrangement:ePe(n.schPinArrangement),port_labels:d,pin_spacing:.2,pin_styles:Zwe(c),schematic_sheet_id:h});t.schematic_component_id=p.schematic_component_id;for(const{pinNumber:f,displayPinLabel:I,referencedSourcePort:C}of a){const y=l.getPortPositionByPinNumber(f);if(!y)throw new Error(`Could not determine schematic position for ${t.getString()} pin${f}`);const x={left:\"left\",right:\"right\",top:\"up\",bottom:\"down\"}[y.side];e.schematic_port.insert({schematic_component_id:p.schematic_component_id,center:{x:u.x+y.x,y:u.y+y.y},source_port_id:C.source_port_id,facing_direction:x,distance_from_component_edge:.4,side_of_component:y.side,pin_number:f,true_ccw_index:y.trueIndex,display_pin_label:I,is_connected:!1,schematic_sheet_id:h})}const m=n.name??n.chipRef;e.schematic_text.insert({text:m,schematic_component_id:p.schematic_component_id,anchor:\"left\",rotation:0,position:{x:u.x-g.width/2,y:u.y+g.height/2+.13},color:\"#006464\",font_size:.18,schematic_sheet_id:h});const _=e.source_component.get(o.source_component_id);e.schematic_text.insert({text:_?.manufacturer_part_number??\"\",schematic_component_id:p.schematic_component_id,anchor:\"left\",rotation:0,position:{x:u.x-g.width/2,y:u.y-g.height/2-.13},color:\"#006464\",font_size:.18,schematic_sheet_id:h})},ZRt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:\"SchematicBox\",zodProps:XMn,shouldRenderAsSchematicBox:!0}}doInitialSchematicComponentRender(){dMo(this)}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this;if(e.chipRef)return;const n=.6,o=typeof e.padding==\"number\"?e.padding:0,i=typeof e.paddingTop==\"number\"?e.paddingTop:o,r=typeof e.paddingBottom==\"number\"?e.paddingBottom:o,s=typeof e.paddingLeft==\"number\"?e.paddingLeft:o,a=typeof e.paddingRight==\"number\"?e.paddingRight:o,A=e.overlay\u0026\u0026e.overlay.length\u003e0,c=typeof e.width==\"number\"\u0026\u0026typeof e.height==\"number\";let l,u,g,h,d,p;if(A){const _=e.overlay.map(te=\u003e({selector:te,port:this.getSubcircuit().selectOne(te,{type:\"port\"})})).filter(({port:te})=\u003ete!=null).map(({port:te})=\u003e({position:te._getGlobalSchematicPositionAfterLayout()}));if(_.length===0)return;const f=_.map(te=\u003ete.position.x),I=_.map(te=\u003ete.position.y),C=Math.min(...f),y=Math.max(...f),x=Math.min(...I),E=Math.max(...I),B=y-C,S=E-x,Q=B===0?n:0,w=S===0?n:0,M=s+Q/2,k=a+Q/2,R=i+w/2,F=r+w/2,O=C-M,U=y+k,Y=x-F,W=E+R;l=U-O,u=W-Y,g=O+(e.schX??0),h=Y+(e.schY??0),d=g+l/2,p=h+u/2}else if(c){l=e.width,u=e.height;const m=this._getGlobalSchematicPositionBeforeLayout();d=m.x,p=m.y,g=d-l/2,h=p-u/2}else return;if(t.schematic_box.insert({height:u,width:l,x:g,y:h,is_dashed:e.strokeStyle===\"dashed\",schematic_sheet_id:this._resolveSchematicSheetId()}),e.title){const m=e.titleInside,_=.1,f=e.titleAlignment,I=lMo({anchor:f,x:g,y:h,width:l,height:u,isInside:m});let C,y;const x=I.textAnchor;m?(C=f.includes(\"top\")?-_:f.includes(\"bottom\")?_:0,y=f.includes(\"left\")?_:f.includes(\"right\")?-_:0):(C=f.includes(\"top\")?_:f.includes(\"bottom\")?-_:0,y=f.includes(\"center_left\")?-_:f.includes(\"center_right\")?_:0);const E=I.x+y,B=I.y+C;t.schematic_text.insert({anchor:x,text:e.title,font_size:e.titleFontSize??.18,color:e.titleColor??\"#000000\",position:{x:E,y:B},rotation:0,schematic_sheet_id:this._resolveSchematicSheetId()})}}},hMo=t=\u003e{if(!t.isSubcircuit||t.root?.schematicDisabled)return;const{db:e}=t.root,n=new Map,o=new Set,i=t.getDescendants().filter(s=\u003es instanceof ZRt\u0026\u0026s.getSubcircuit()===t);for(const s of i){const{chipRef:a,pinLabels:A}=s._parsedProps,c=s._resolveSchematicSheetId();if(!a||!c)continue;const l=s.getSubcircuit().selectOne(a);if(!(l instanceof g0)||!l.source_component_id)continue;o.add(l.source_component_id);const u=e.source_port.list({source_component_id:l.source_component_id});for(const{pinAliases:g}of XRt(A)){const d=u.find(m=\u003eg.some(_=\u003em.name===_||m.port_hints?.includes(_)))?.subcircuit_connectivity_map_key;if(!d)continue;const p=n.get(d)??new Set;p.add(c),n.set(d,p)}}const r=t.getDescendants().filter(s=\u003es instanceof g0\u0026\u0026s.getSubcircuit()===t);for(const s of r){if(!s.source_component_id||o.has(s.source_component_id)||s._resolveSchematicSheetId())continue;const a=new Set,A=e.source_port.list({source_component_id:s.source_component_id});for(const l of A){const u=l.subcircuit_connectivity_map_key;if(!u)continue;const g=n.get(u);if(g)for(const h of g)a.add(h)}if(a.size!==1)continue;const[c]=a;c\u0026\u0026(s.schematic_sheet_id=c)}},pMo=new Set([\"x\",\"y\",\"minx\",\"maxx\",\"miny\",\"maxy\",\"width\",\"height\"]);function mMo(t){if(t.root?.pcbDisabled||!t.isSubcircuit)return;const{db:e}=t.root,n=t.getNormalComponentNameMap?.()??new Map,o=fMo(t),i={};for(const u of o)eTt(u,i);const r=new Map,s=new Map,a=new Map;for(const u of o){if(!_Mo(u))continue;const g=IMo(u);if(!u.name)throw new Error(`Invalid pcb position expression for ${u.getString()}: component-relative calc requires the component to have a name`);r.set(u.name,{component:u,refs:g}),s.set(u.name,0)}for(const[u,g]of r.entries()){const h=new Set;for(const d of g.refs){const{referencePath:p,field:m}=CMo(d);if(!pMo.has(m))throw new Error(`Invalid pcb position expression for ${g.component.getString()}: unsupported component field \"${m}\" in \"${d}\"`);const _=yMo({token:d,referencePath:p,candidate:g,normalComponentNameMap:n});r.has(_)\u0026\u0026_!==u\u0026\u0026h.add(_)}for(const d of h)s.set(u,(s.get(u)??0)+1),a.has(d)||a.set(d,new Set),a.get(d).add(u)}const A=[...s.entries()].filter(([,u])=\u003eu===0).map(([u])=\u003eu);let c=0;for(;A.length\u003e0;){const u=A.shift(),g=r.get(u);if(g){l(g.component,i),c++;for(const h of a.get(u)??[]){const d=(s.get(h)??0)-1;s.set(h,d),d===0\u0026\u0026A.push(h)}}}if(c\u003cr.size){const u=[...r.keys()].filter(g=\u003e(s.get(g)??0)\u003e0);throw new Error(`Circular pcb position calc references detected among: ${u.join(\", \")}`)}function l(u,g){if(!u.pcb_component_id)return;const h=e.pcb_component.get(u.pcb_component_id);if(!h)return;const d=u._parsedProps.pcbX,p=u._parsedProps.pcbY,m=u.props,_=u._parsedProps.pcbLeftEdgeX??m.pcbLeftEdgeX,f=u._parsedProps.pcbRightEdgeX??m.pcbRightEdgeX,I=u._parsedProps.pcbTopEdgeY??m.pcbTopEdgeY,C=u._parsedProps.pcbBottomEdgeY??m.pcbBottomEdgeY;if(_!==void 0\u0026\u0026f!==void 0)throw new Error(`${u.componentName} cannot set both pcbLeftEdgeX and pcbRightEdgeX`);if(I!==void 0\u0026\u0026C!==void 0)throw new Error(`${u.componentName} cannot set both pcbTopEdgeY and pcbBottomEdgeY`);const y=h.width??0,x=h.height??0,E={x:h.center.x,y:h.center.y};if(d!==void 0){const B=u.resolvePcbCoordinate({rawValue:d,axis:\"pcbX\",allowComponentVariables:!0,componentVariables:g});u._resolvedPcbCalcOffsetX=B,E.x=B}else if(_!==void 0){const S=u.resolvePcbCoordinate({rawValue:_,axis:\"pcbX\",allowComponentVariables:!0,componentVariables:g,propertyName:\"pcbLeftEdgeX\"})+y/2;u._resolvedPcbCalcOffsetX=S,E.x=S}else if(f!==void 0){const S=u.resolvePcbCoordinate({rawValue:f,axis:\"pcbX\",allowComponentVariables:!0,componentVariables:g,propertyName:\"pcbRightEdgeX\"})-y/2;u._resolvedPcbCalcOffsetX=S,E.x=S}if(p!==void 0){const B=u.resolvePcbCoordinate({rawValue:p,axis:\"pcbY\",allowComponentVariables:!0,componentVariables:g});u._resolvedPcbCalcOffsetY=B,E.y=B}else if(I!==void 0){const S=u.resolvePcbCoordinate({rawValue:I,axis:\"pcbY\",allowComponentVariables:!0,componentVariables:g,propertyName:\"pcbTopEdgeY\"})-x/2;u._resolvedPcbCalcOffsetY=S,E.y=S}else if(C!==void 0){const S=u.resolvePcbCoordinate({rawValue:C,axis:\"pcbY\",allowComponentVariables:!0,componentVariables:g,propertyName:\"pcbBottomEdgeY\"})+x/2;u._resolvedPcbCalcOffsetY=S,E.y=S}u._repositionOnPcb(E),eTt(u,g)}}function _Mo(t){const e=t._parsedProps,n=t.props,o=e.pcbX,i=e.pcbY,r=e.pcbLeftEdgeX??n.pcbLeftEdgeX,s=e.pcbRightEdgeX??n.pcbRightEdgeX,a=e.pcbTopEdgeY??n.pcbTopEdgeY,A=e.pcbBottomEdgeY??n.pcbBottomEdgeY;return r!==void 0||s!==void 0||a!==void 0||A!==void 0?!0:typeof o==\"string\"||typeof i==\"string\"}function fMo(t){const e=[],n=o=\u003e{o._isNormalComponent\u0026\u0026e.push(o);for(const i of o.children)i.isSubcircuit||n(i)};for(const o of t.children)o.isSubcircuit||n(o);return e}function IMo(t){const e=new Set,n=t._parsedProps.pcbX,o=t._parsedProps.pcbY,i=t.props,r=t._parsedProps.pcbLeftEdgeX??i.pcbLeftEdgeX,s=t._parsedProps.pcbRightEdgeX??i.pcbRightEdgeX,a=t._parsedProps.pcbTopEdgeY??i.pcbTopEdgeY,A=t._parsedProps.pcbBottomEdgeY??i.pcbBottomEdgeY,c=l=\u003e{if(typeof l!=\"string\")return;const u=Nwe(l);for(const g of u)g.startsWith(\"board.\")||e.add(g)};return c(n),c(o),c(r),c(s),c(a),c(A),e}function CMo(t){const e=t.lastIndexOf(\".\");if(e\u003c=0||e===t.length-1)throw new Error(`Invalid component reference token: \"${t}\"`);return{referencePath:t.slice(0,e),field:t.slice(e+1).toLowerCase()}}function yMo(t){const{token:e,referencePath:n,candidate:o,normalComponentNameMap:i}=t,r=i.get(n);if(r\u0026\u0026r.length\u003e0){if(r.length\u003e1)throw new Error(`Invalid pcb position expression for ${o.component.getString()}: ambiguous component reference \"${n}\" in \"${e}\"`);return n}let s=null;for(const a of i.keys())n.startsWith(`${a}.`)\u0026\u0026(!s||a.length\u003es.length)\u0026\u0026(s=a);if(!s)throw new Error(`Invalid pcb position expression for ${o.component.getString()}: unknown component reference \"${n}\" in \"${e}\"`);return s}function eTt(t,e){if(!t.name||!t.pcb_component_id||!t.root)return;const n=t.root.db.pcb_component.get(t.pcb_component_id);if(!n)return;const o=n.width??0,i=n.height??0,r=n.center.x,s=n.center.y;aMt({vars:e,componentName:t.name,position:{x:r,y:s},size:{width:o,height:i}});const a=xMo(t);for(const[A,c]of a.entries()){const l=H8(c),u=l.minX,g=l.maxX,h=l.minY,d=l.maxY;e[`${A}.x`]=(u+g)/2,e[`${A}.y`]=(h+d)/2,e[`${A}.width`]=g-u,e[`${A}.height`]=d-h,e[`${A}.minX`]=u,e[`${A}.maxX`]=g,e[`${A}.minY`]=h,e[`${A}.maxY`]=d}}function xMo(t){const e=new Map;if(!t.name||!t.pcb_component_id||!t.root)return e;const{db:n}=t.root,o=[...n.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}),...n.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id})];for(const i of o){const r=new Set;for(const a of i.port_hints??[])typeof a==\"string\"\u0026\u0026a.length\u003e0\u0026\u0026r.add(a);const s=i.pcb_port_id;if(s){const a=n.pcb_port.get(s),A=a?.source_port_id?n.source_port.get(a.source_port_id):null;A?.name\u0026\u0026r.add(A.name),A?.pin_number!=null\u0026\u0026r.add(`pin${A.pin_number}`)}for(const a of r){const A=`${t.name}.${a}`;e.has(A)||e.set(A,[]),e.get(A).push(i)}}return e}function EMo(t){if(t.root?.pcbDisabled||!t.pcb_group_id)return;const e=t._parsedProps?.pcbPositionAnchor;if(!e)return;const n=t._getGlobalPcbPositionBeforeLayout(),{pcbX:o,pcbY:i}=t._parsedProps;if(o===void 0\u0026\u0026i===void 0)return;const{db:r}=t.root,s=r.pcb_group.get(t.pcb_group_id);if(!s)return;let a=s.width,A=s.height;const{center:c}=s;if(s.outline\u0026\u0026s.outline.length\u003e0){const p=Oh(s.outline);p\u0026\u0026(a=p.maxX-p.minX,A=p.maxY-p.minY)}if(!a||!A)return;const l={left:c.x-a/2,right:c.x+a/2,top:c.y+A/2,bottom:c.y-A/2},u={...c};let g=null;if(new Set([\"center\",\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"]).has(e))switch(e){case\"center\":g=u;break;case\"top_left\":g={x:l.left,y:l.top};break;case\"top_center\":g={x:u.x,y:l.top};break;case\"top_right\":g={x:l.right,y:l.top};break;case\"center_left\":g={x:l.left,y:u.y};break;case\"center_right\":g={x:l.right,y:u.y};break;case\"bottom_left\":g={x:l.left,y:l.bottom};break;case\"bottom_center\":g={x:u.x,y:l.bottom};break;case\"bottom_right\":g={x:l.right,y:l.bottom};break}if(!g)return;const d={...u};n.x!==void 0\u0026\u0026(d.x+=n.x-g.x),n.y!==void 0\u0026\u0026(d.y+=n.y-g.y),(Math.abs(d.x-u.x)\u003e1e-6||Math.abs(d.y-u.y)\u003e1e-6)\u0026\u0026(t._repositionOnPcb(d),r.pcb_group.update(t.pcb_group_id,{center:d})),r.pcb_group.update(t.pcb_group_id,{anchor_position:n,anchor_alignment:e,display_offset_x:o,display_offset_y:i})}var BMo=t=\u003e{const{db:e}=t.root,{_parsedProps:n}=t,o=t.children.filter(y=\u003ey.pcb_component_id||y.pcb_group_id);if(o.some(y=\u003e{const x=y._parsedProps;return x?.pcbX!==void 0||x?.pcbY!==void 0}))return;const r=n.pcbJustifyContent??n.justifyContent,s=n.pcbAlignItems??n.alignItems,a=n.pcbFlexGap??n.pcbGap??n.gap,A=n.pcbFlexDirection??\"row\",c={start:\"flex-start\",end:\"flex-end\",\"flex-start\":\"flex-start\",\"flex-end\":\"flex-end\",stretch:\"space-between\",\"space-between\":\"space-between\",\"space-around\":\"space-around\",\"space-evenly\":\"space-evenly\",center:\"center\"}[r??\"space-between\"],l={start:\"flex-start\",end:\"flex-end\",\"flex-start\":\"flex-start\",\"flex-end\":\"flex-end\",stretch:\"stretch\",center:\"center\"}[s??\"center\"];if(!c)throw new Error(`Invalid justifyContent value: \"${r}\"`);if(!l)throw new Error(`Invalid alignItems value: \"${s}\"`);let u=0,g=0;typeof a==\"object\"?(u=a.y??0,g=a.x??0):typeof a==\"number\"?(u=a,g=a):typeof a==\"string\"\u0026\u0026(u=ce.parse(a),g=ce.parse(a));let h,d=n.width??n.pcbWidth??void 0,p=n.height??n.pcbHeight??void 0;(d===void 0||p===void 0)\u0026\u0026(h=lmt(o.map(y=\u003ey._getMinimumFlexContainerSize()).filter(y=\u003ey!==null),{direction:A,rowGap:u,columnGap:g}),d=h.width,p=h.height);const _=new Qwt(d,p,{alignItems:l,justifyContent:c,direction:A,rowGap:u,columnGap:g});for(const y of o){const x=y._getMinimumFlexContainerSize();_.addChild({metadata:y,width:x?.width??0,height:x?.height??0,flexBasis:x?A===\"row\"?x.width:x.height:void 0})}_.build();const f={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,width:0,height:0};for(const y of _.children)f.minX=Math.min(f.minX,y.position.x),f.minY=Math.min(f.minY,y.position.y),f.maxX=Math.max(f.maxX,y.position.x+y.size.width),f.maxY=Math.max(f.maxY,y.position.y+y.size.height);f.width=f.maxX-f.minX,f.height=f.maxY-f.minY;const I=t._getGlobalPcbPositionBeforeLayout(),C={x:I.x-(f.maxX+f.minX)/2,y:I.y-(f.maxY+f.minY)/2};for(const y of _.children)y.metadata._repositionOnPcb({x:y.position.x+y.size.width/2+C.x,y:y.position.y+y.size.height/2+C.y});e.pcb_group.update(t.pcb_group_id,{width:f.width,height:f.height,center:I})},IMe=1;function bMo(t){const{db:e}=t.root,n=t._parsedProps,o=SMo(t);if(o.length===0)return;const i=QMo({db:e,pcbChildren:o}),r=vMo(n),s=wMo({props:n,pcbChildren:o,childDimensions:i,gridConfig:r}),a=DMo({pcbChildren:o,childDimensions:i,gridLayout:s,gridConfig:r}),{itemCoordinates:A}=a.layout();NMo({db:e,group:t,pcbChildren:o,itemCoordinates:A,gridLayout:s}),RMo({db:e,group:t,props:n,gridLayout:s})}function SMo(t){return t.children.filter(e=\u003ee.pcb_component_id||e.pcb_group_id)}function QMo(t){const{db:e,pcbChildren:n}=t;let o=0,i=0;for(const r of n){let s=0,a=0;if(r.pcb_group_id){const A=e.pcb_group.get(r.pcb_group_id);s=A?.width??0,a=A?.height??0}else if(r.pcb_component_id){const A=e.pcb_component.get(r.pcb_component_id);s=A?.width??0,a=A?.height??0}o=Math.max(o,s),i=Math.max(i,a)}return{width:o,height:i}}function vMo(t){const e=t.pcbGridCols??t.gridCols??t.pcbLayout?.grid?.cols,n=t.pcbGridRows??t.pcbLayout?.grid?.rows,o=t.pcbGridTemplateColumns,i=t.pcbGridTemplateRows,r=u=\u003eu===void 0?IMe:typeof u==\"number\"?u:ce.parse(u),s=t.pcbGridGap??t.gridGap??t.pcbLayout?.gridGap,a=t.pcbGridRowGap??t.gridRowGap??t.pcbLayout?.gridRowGap,A=t.pcbGridColumnGap??t.gridColumnGap??t.pcbLayout?.gridColumnGap;let c=IMe,l=IMe;if(a!==void 0||A!==void 0){const u=typeof s==\"object\"?s?.x:s,g=typeof s==\"object\"?s?.y:s;c=r(A??u),l=r(a??g)}else if(typeof s==\"object\"\u0026\u0026s!==null)c=r(s.x),l=r(s.y);else{const u=r(s);c=u,l=u}return{cols:e,rows:n,gapX:c,gapY:l,templateColumns:o,templateRows:i}}function wMo(t){const{props:e,pcbChildren:n,childDimensions:o,gridConfig:i}=t;return e.pcbGridTemplateColumns||e.pcbGridTemplateRows?PMo({props:e,gridConfig:i,pcbChildren:n,childDimensions:o}):MMo({gridConfig:i,pcbChildren:n,childDimensions:o})}function PMo(t){const{props:e,gridConfig:n,pcbChildren:o,childDimensions:i}=t,r=e.pcbGridTemplateColumns??\"\",s=e.pcbGridTemplateRows??\"\",a=g=\u003e{const h=g.match(/repeat\\((\\d+),/);return h?parseInt(h[1]):Math.ceil(Math.sqrt(o.length))},A=e.pcbGridTemplateColumns?a(r):Math.ceil(Math.sqrt(o.length)),c=e.pcbGridTemplateRows?a(s):Math.ceil(o.length/A),l=A*i.width+Math.max(0,A-1)*n.gapX,u=c*i.height+Math.max(0,c-1)*n.gapY;return{gridTemplateColumns:r,gridTemplateRows:s,containerWidth:l,containerHeight:u}}function MMo(t){const{gridConfig:e,pcbChildren:n,childDimensions:o}=t;let i,r;e.cols!==void 0\u0026\u0026e.rows!==void 0?(i=e.cols,r=e.rows):e.cols!==void 0?(i=e.cols,r=Math.ceil(n.length/i)):e.rows!==void 0?(r=e.rows,i=Math.ceil(n.length/r)):(i=Math.ceil(Math.sqrt(n.length)),r=Math.ceil(n.length/i)),i=Math.max(1,i),r=Math.max(1,r);const s=i*o.width+Math.max(0,i-1)*e.gapX,a=r*o.height+Math.max(0,r-1)*e.gapY,A=`repeat(${i}, ${o.width}px)`,c=`repeat(${r}, ${o.height}px)`;return{gridTemplateColumns:A,gridTemplateRows:c,containerWidth:s,containerHeight:a}}function DMo(t){const{pcbChildren:e,childDimensions:n,gridLayout:o,gridConfig:i}=t,r=e.map((s,a)=\u003e({key:s.getString()||`child-${a}`,contentWidth:n.width,contentHeight:n.height}));return new oEo({containerWidth:o.containerWidth,containerHeight:o.containerHeight,gridTemplateColumns:o.gridTemplateColumns,gridTemplateRows:o.gridTemplateRows,gap:[i.gapY,i.gapX],children:r})}function NMo(t){const{db:e,group:n,pcbChildren:o,itemCoordinates:i,gridLayout:r}=t,s=n._getGlobalPcbPositionBeforeLayout(),a=e.toArray();for(let A=0;A\u003co.length;A++){const c=o[A],l=c.getString()||`child-${A}`,u=i[l];if(!u){console.warn(`PCB grid layout: No coordinates found for child ${l}`);continue}const g=s.x-r.containerWidth/2+u.x+u.width/2,h=s.y+r.containerHeight/2-u.y-u.height/2;if(c.pcb_component_id)smt(a,c.pcb_component_id,{x:g,y:h});else{const d=c;d.pcb_group_id\u0026\u0026d.source_group_id\u0026\u0026Amt(a,d.source_group_id,{x:g,y:h})}}}function RMo(t){const{db:e,group:n,props:o,gridLayout:i}=t;if(n.pcb_group_id){const r=n._getGlobalPcbPositionBeforeLayout();e.pcb_group.update(n.pcb_group_id,{width:o.width??i.containerWidth,height:o.height??i.containerHeight,center:r})}}var TMo=(t,e,n=()=\u003eperformance.now())=\u003e{if(e===void 0||!Number.isFinite(e)||e\u003c=0)return t.solve(),{elapsedMs:0,timedOut:!1};const o=n();let i=0;for(;!t.solved\u0026\u0026!t.failed\u0026\u0026(t.step(),!(t.solved||t.failed));)if(i=n()-o,i\u003e=e)return{elapsedMs:i,timedOut:!0};return{elapsedMs:i,timedOut:!1}},kMo=(t,e)=\u003e{const n=t.children.filter(u=\u003eu.componentName===\"Constraint\"\u0026\u0026u._parsedProps.pcb),o=new Map,i={},r=u=\u003e(i[u]!==u\u0026\u0026(i[u]=r(i[u])),i[u]),s=(u,g)=\u003e{const h=r(u),d=r(g);h!==d\u0026\u0026(i[d]=h)},a=u=\u003e{u in i||(i[u]=u)},A=u=\u003e{const g=u.startsWith(\".\")?u.slice(1):u;return t.children.find(d=\u003ed.name===g)?.pcb_component_id??void 0};for(const u of n){const g=u._parsedProps;if(\"left\"in g\u0026\u0026\"right\"in g){const h=A(g.left),d=A(g.right);h\u0026\u0026d\u0026\u0026(a(h),a(d),s(h,d))}else if(\"top\"in g\u0026\u0026\"bottom\"in g){const h=A(g.top),d=A(g.bottom);h\u0026\u0026d\u0026\u0026(a(h),a(d),s(h,d))}else if(\"for\"in g\u0026\u0026Array.isArray(g.for)){const h=g.for.map(d=\u003eA(d)).filter(d=\u003e!!d);for(const d of h)a(d);for(let d=1;d\u003ch.length;d++)s(h[0],h[d])}}for(const u of Object.keys(i)){const g=r(u);o.has(g)||o.set(g,{componentIds:[],constraints:[]}),o.get(g).componentIds.push(u)}for(const u of n){const g=u._parsedProps;let h;if(\"left\"in g?h=A(g.left):\"top\"in g?h=A(g.top):\"for\"in g\u0026\u0026(h=A(g.for[0])),!h)continue;const d=r(h);o.get(d)?.constraints.push(u)}const c={},l=Object.fromEntries(e.components.map(u=\u003e[u.componentId,u]));for(const[u,g]of o.entries()){if(g.componentIds.length\u003c=1)continue;const h=new qpt,d={},p=(S,Q)=\u003e{const w=`${S}_${Q}`;return d[w]||(d[w]=new gse(w)),d[w]},m=g.componentIds[0];h.addConstraint(new ux(p(m,\"x\"),V_.Eq,0,wg.required)),h.addConstraint(new ux(p(m,\"y\"),V_.Eq,0,wg.required));for(const S of g.constraints){const Q=S._parsedProps;if(\"xDist\"in Q){const w=A(Q.left),M=A(Q.right);w\u0026\u0026M\u0026\u0026h.addConstraint(new ux(new Gh(p(M,\"x\"),[-1,p(w,\"x\")]),V_.Eq,Q.xDist,wg.required))}else if(\"yDist\"in Q){const w=A(Q.top),M=A(Q.bottom);w\u0026\u0026M\u0026\u0026h.addConstraint(new ux(new Gh(p(w,\"y\"),[-1,p(M,\"y\")]),V_.Eq,Q.yDist,wg.required))}else if(\"sameX\"in Q\u0026\u0026Array.isArray(Q.for)){const w=Q.for.map(M=\u003eA(M)).filter(M=\u003e!!M);if(w.length\u003e1){const M=p(w[0],\"x\");for(let k=1;k\u003cw.length;k++)h.addConstraint(new ux(new Gh(p(w[k],\"x\"),[-1,M]),V_.Eq,0,wg.required))}}else if(\"sameY\"in Q\u0026\u0026Array.isArray(Q.for)){const w=Q.for.map(M=\u003eA(M)).filter(M=\u003e!!M);if(w.length\u003e1){const M=p(w[0],\"y\");for(let k=1;k\u003cw.length;k++)h.addConstraint(new ux(new Gh(p(w[k],\"y\"),[-1,M]),V_.Eq,0,wg.required))}}}h.updateVariables();const _={};for(const S of g.componentIds)_[S]={x:p(S,\"x\").value(),y:p(S,\"y\").value()};let f=1/0,I=1/0,C=-1/0,y=-1/0;for(const S of g.componentIds){const Q=l[S],w=_[S];if(Q)for(const M of Q.pads){const k=w.x+M.offset.x,R=w.y+M.offset.y;f=Math.min(f,k-M.size.x/2),C=Math.max(C,k+M.size.x/2),I=Math.min(I,R-M.size.y/2),y=Math.max(y,R+M.size.y/2)}}const x={x:(f+C)/2,y:(I+y)/2},E=[],B={};for(const S of g.componentIds){const Q=l[S],w=_[S];if(Q){B[S]={x:w.x-x.x,y:w.y-x.y};for(const M of Q.pads)E.push({padId:M.padId,networkId:M.networkId,type:M.type,size:M.size,offset:{x:w.x+M.offset.x-x.x,y:w.y+M.offset.y-x.y}})}}e.components=e.components.filter(S=\u003e!g.componentIds.includes(S.componentId)),e.components.push({componentId:g.componentIds[0],pads:E,availableRotationDegrees:[0]}),g.relativeCenters=B,c[g.componentIds[0]]=g}return c},tTt=({db:t,pcbComponentId:e,rotationDegrees:n,layer:o})=\u003e{if(n==null||!t?.cad_component?.list)return;const i=t.cad_component.getWhere({pcb_component_id:e});if(!i)return;const r=o?.toLowerCase?.()===\"bottom\"?-n:n,s=i.rotation?.z??0,a={...i.rotation??{x:0,y:0,z:0},z:k9(s+r)};t.cad_component.update(i.cad_component_id,{rotation:a}),i.rotation=a},m$=(t,e,n)=\u003e{if(e===n)return!0;const o=t.source_group.get(e);return!o||!o.parent_source_group_id?!1:m$(t,o.parent_source_group_id,n)},FMo=(t,e,n,o)=\u003e{const{db:i}=t.root;for(const r of e.components){if(r.isStatic)continue;const{center:s,componentId:a,ccwRotationOffset:A,ccwRotationDegrees:c}=r,l=n[a];if(l){const f=c??A??0,I=f*Math.PI/180;for(const C of l.componentIds){const y=l.relativeCenters[C];if(!y)continue;i.pcb_component.update(C,{position_mode:\"packed\"});const x={x:y.x*Math.cos(I)-y.y*Math.sin(I),y:y.x*Math.sin(I)+y.y*Math.cos(I)},E=i.pcb_component.get(C);if(!E)continue;const B=E.center,S=D0(t._computePcbGlobalTransformBeforeLayout(),M0(s.x+x.x,s.y+x.y),W4(I),M0(-B.x,-B.y)),Q=i.toArray().filter(w=\u003e\"pcb_component_id\"in w\u0026\u0026w.pcb_component_id===C);FF(Q,S),tTt({db:i,pcbComponentId:C,rotationDegrees:f,layer:E.layer})}continue}const u=i.pcb_component.get(a);if(u){i.pcb_component.update(a,{position_mode:\"packed\"});const f=t.source_group_id,C=i.source_component.get(u.source_component_id)?.source_group_id;if(C!==void 0\u0026\u0026!m$(i,C,f))continue;const y=u.center,x=c??A??0,E=D0(t._computePcbGlobalTransformBeforeLayout(),M0(s.x,s.y),W4(x*Math.PI/180),M0(-y.x,-y.y)),B=i.toArray().filter(S=\u003e\"pcb_component_id\"in S\u0026\u0026S.pcb_component_id===a);FF(B,E),tTt({db:i,pcbComponentId:a,rotationDegrees:x,layer:u.layer});continue}const g=i.pcb_group.list().find(f=\u003ef.source_group_id===a);if(!g)continue;const d=o.components.find(f=\u003ef.componentId===a)?.center??g.center,p=c??A??0,m=D0(t._computePcbGlobalTransformBeforeLayout(),M0(s.x,s.y),W4(p*Math.PI/180),M0(-d.x,-d.y)),_=i.toArray().filter(f=\u003e{if(\"source_group_id\"in f\u0026\u0026f.source_group_id\u0026\u0026(f.source_group_id===a||m$(i,f.source_group_id,a)))return!0;if(\"source_component_id\"in f\u0026\u0026f.source_component_id){const I=i.source_component.get(f.source_component_id);if(I?.source_group_id\u0026\u0026(I.source_group_id===a||m$(i,I.source_group_id,a)))return!0}if(\"pcb_component_id\"in f\u0026\u0026f.pcb_component_id){const I=i.pcb_component.get(f.pcb_component_id);if(I?.source_component_id){const C=i.source_component.get(I.source_component_id);if(C?.source_group_id\u0026\u0026(C.source_group_id===a||m$(i,C.source_group_id,a)))return!0}}return!1});for(const f of _)f.type===\"pcb_component\"\u0026\u0026i.pcb_component.update(f.pcb_component_id,{position_mode:\"packed\"});FF(_,m),i.pcb_group.update(g.pcb_group_id,{center:s})}if(t.pcb_group_id){const r=i.pcb_component.list({pcb_group_id:t.pcb_group_id});t.calculatePcbGroupBounds(N9e(r))}},nTt=t=\u003e(t??\"top\").toLowerCase(),LMo=(t,e)=\u003e{const n=new Set,o=e.pcb_component.get(t.componentId);o\u0026\u0026n.add(nTt(o.layer));for(const i of t.pads){const r=e.pcb_via.get(i.padId),s=e.pcb_smtpad.get(i.padId)?.pcb_component_id??e.pcb_plated_hole.get(i.padId)?.pcb_component_id??r?.pcb_component_id;if(!s)continue;const a=e.pcb_component.get(s);a\u0026\u0026n.add(nTt(a.layer))}return n.size===1?n.values().next().value:void 0},HMo=(t,e)=\u003e{const n=new Map;for(const i of t.components){const r=LMo(i,e);if(!r)return[t];const s=n.get(r)??[];s.push(i),n.set(r,s)}if(n.size\u003c=1)return[t];const o=i=\u003ei===\"top\"?0:i===\"bottom\"?1:2;return Array.from(n.entries()).sort(([i],[r])=\u003eo(i)-o(r)||i.localeCompare(r)).map(([,i])=\u003e({...t,components:i}))},OMo=\"1mm\",oTt=vc(\"Group_doInitialPcbLayoutPack\"),iTt=t=\u003e{if(t.courtyard\u0026\u0026t.center)return{obstacleId:t.componentId,absoluteCenter:{x:t.center.x+t.courtyard.offsetFromCenter.x,y:t.center.y+t.courtyard.offsetFromCenter.y},width:t.courtyard.width,height:t.courtyard.height};if(t.pads.length===0)return;let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t.pads){const s=r.absoluteCenter??(t.center?{x:t.center.x+r.offset.x,y:t.center.y+r.offset.y}:r.offset);e=Math.min(e,s.x-r.size.x/2),n=Math.min(n,s.y-r.size.y/2),o=Math.max(o,s.x+r.size.x/2),i=Math.max(i,s.y+r.size.y/2)}return{obstacleId:t.componentId,absoluteCenter:{x:(e+o)/2,y:(n+i)/2},width:o-e,height:i-n}},GMo=t=\u003e{const{db:e}=t.root,{_parsedProps:n}=t;t.root?.emit(\"packing:start\",{subcircuit_id:t.subcircuit_id,componentDisplayName:t.getString()});const{packOrderStrategy:o,packPlacementStrategy:i,gap:r,pcbGap:s,pcbPackGap:a}=n,A=a??s??r,c=ce.parse(A??OMo),l={},u=new Set,g=B=\u003e{if(B?.pcb_component_id\u0026\u0026B?._parsedProps){const S=B._parsedProps,Q=ce.parse(S.pcbMarginLeft??S.pcbMarginX??0),w=ce.parse(S.pcbMarginRight??S.pcbMarginX??0),M=ce.parse(S.pcbMarginTop??S.pcbMarginY??0),k=ce.parse(S.pcbMarginBottom??S.pcbMarginY??0);(Q||w||M||k)\u0026\u0026(l[B.pcb_component_id]={left:Q,right:w,top:M,bottom:k})}B?.children\u0026\u0026B.children.forEach(g)};g(t);const h=new Set;for(const B of t.children){const S=B;S._isNormalComponent\u0026\u0026S.isRelativelyPositioned?.()\u0026\u0026(S.pcb_component_id\u0026\u0026u.add(S.pcb_component_id),S.pcb_group_id\u0026\u0026h.add(S.pcb_group_id))}const d=(B,S,Q)=\u003e{if(S===Q)return!0;const w=B.source_group.get(S);return!w||!w.parent_source_group_id?!1:d(B,w.parent_source_group_id,Q)};if(h.size\u003e0)for(const B of e.toArray()){if(B.type!==\"pcb_component\")continue;const S=e.source_component.get(B.source_component_id);if(S?.source_group_id)for(const Q of h)d(e,S.source_group_id,Q)\u0026\u0026u.add(B.pcb_component_id)}const p=e.toArray();let m;if(n.width!==void 0\u0026\u0026n.height!==void 0){const B=ce.parse(n.width),S=ce.parse(n.height);m={minX:-B/2,maxX:B/2,minY:-S/2,maxY:S/2}}const _=xfo(p,{source_group_id:t.source_group_id,chipMarginsMap:l,staticPcbComponentIds:Array.from(u)}),f={...Efo(_),packOrderStrategy:o??\"largest_to_smallest\",packPlacementStrategy:i??\"minimum_sum_squared_distance_to_network\",minGap:c,bounds:m},I=kMo(t,f);oTt.enabled\u0026\u0026(t.root?.emit(\"debug:logOutput\",{type:\"debug:logOutput\",name:`packInput-circuitjson-${t.name}`,content:JSON.stringify(e.toArray())}),t.root?.emit(\"debug:logOutput\",{type:\"debug:logOutput\",name:`packInput-${t.name}`,content:f}));const C=HMo(f,e),y={...f,components:[]};let x=!1;const E=B=\u003e{const S=`Unable to pack all PCB components within the layout bounds: ${B}`;e.pcb_packing_error.insert({error_type:\"pcb_packing_error\",message:S,pcb_group_id:t.pcb_group_id??void 0,subcircuit_id:t.subcircuit_id??void 0}),t.root?.emit(\"packing:error\",{subcircuit_id:t.subcircuit_id,componentDisplayName:t.getString(),error:{message:S}})};try{for(const B of C){const S=new Set(B.components.map(J=\u003eJ.componentId)),Q=B.components.flatMap(J=\u003e{if(!J.isStatic)return[];const oe=iTt(J);return oe?[oe]:[]}),w=B.components.every(J=\u003e!!e.pcb_component.get(J.componentId)\u0026\u0026!I[J.componentId]),M=f.components.filter(J=\u003eJ.isStatic\u0026\u0026!S.has(J.componentId)),k=w?[]:M.flatMap(J=\u003e{const oe=iTt(J);return oe?[oe]:[]}),R=new Set([...B.components.filter(J=\u003eJ.isStatic),...w?[]:M].flatMap(J=\u003eJ.pads.map(oe=\u003eoe.padId))),F=new Map([...y.components.map(J=\u003e[J.componentId,{component:J,courtyardSize:Number.EPSILON}]),...w?M.map(J=\u003e[J.componentId,{component:J,courtyardSize:1e-6}]):[]]),O=Array.from(F.values(),({component:J,courtyardSize:oe})=\u003e({...J,componentId:`network_reference_${J.componentId}`,isStatic:!0,courtyard:{offsetFromCenter:{x:0,y:0},width:oe,height:oe}})),U={...B,weightedConnections:B.weightedConnections?.filter(J=\u003eJ.padIds.every(oe=\u003e!R.has(oe))),obstacles:[...B.obstacles??[],...Q,...k],components:[...O,...B.components.filter(J=\u003e!J.isStatic)]},Y=new rj(U),W=Y.getConstructorParams();t.root?.emit(\"solver:started\",{type:\"solver:started\",solverName:\"PackSolver2\",solverParams:W,solverConstructorArgs:[W],componentName:t.getString()});const te=t.root?.platform?.pcbPackSolverTimeoutMs,{timedOut:j}=TMo(Y,te);if(j\u0026\u0026(x=!0,E(`PackSolver2 timed out after ${te}ms`)),Y.failed){x=!0;const J=Y.error??Y.activeSubSolver?.error??\"No valid packing solution found\";E(J)}if(y.components.push(...Y.packedComponents.filter(J=\u003eS.has(J.componentId))),j)break}}catch(B){throw E(B instanceof Error?B.message:String(B)),B}if(oTt.enabled\u0026\u0026global?.debugGraphics){const B=Zbt(y);B.title=`packOutput-${t.name}`,global.debugGraphics?.push(B)}FMo(t,y,I,_),!x\u0026\u0026t.root?.emit(\"packing:end\",{subcircuit_id:t.subcircuit_id,componentDisplayName:t.getString()})},YMo=t=\u003e{if(!t)return null;const e=t.match(/^pin(\\d+)$/i)??t.match(/^(\\d+)$/);if(!e)return null;const n=Number(e[1]);return Number.isFinite(n)\u0026\u0026n\u003e0?n:null},rTt=t=\u003et.children.filter(e=\u003ee.componentName===\"Port\"),UMo=t=\u003e{const{db:e}=t.root,n=rTt(t);for(const r of n){if(r._parsedProps.pinNumber!==void 0)continue;const s=YMo(r._parsedProps.name);s!==null\u0026\u0026(r._parsedProps.pinNumber=s)}const o=new Set(n.map(r=\u003er._parsedProps.pinNumber).filter(r=\u003er!==void 0));let i=1;for(const r of n){if(r._parsedProps.pinNumber===void 0){for(;o.has(i);)i++;r._parsedProps.pinNumber=i,o.add(i)}r.source_port_id\u0026\u0026e.source_port.update(r.source_port_id,{pin_number:r._parsedProps.pinNumber,port_hints:r.getNameAndAliases()})}},KMo=t=\u003e{const e={};for(const n of rTt(t)){const o=n._parsedProps.pinNumber,i=n._parsedProps.name;o===void 0||!i||i===`pin${o}`||i===String(o)||(e[`pin${o}`]=i)}return e},VMo=t=\u003e{if(t.root?.schematicDisabled)return;const{db:e}=t.root,n=t._parsedProps;n.schPinSpacing!==void 0\u0026\u0026e.source_property_ignored_warning.insert({source_component_id:t.source_group_id??\"\",property_name:\"schPinSpacing\",error_type:\"source_property_ignored_warning\",message:\"schPinSpacing is deprecated and will be ignored. Pin spacing is always 0.2.\"}),UMo(t);const o=t._getSchematicBoxDimensions();if(!o)return;const i=t._getGlobalSchematicPositionBeforeLayout(),r=o.getSize(),s=t._getPinLabelsFromPorts(),a=t._getSchematicPortArrangement(),A=e.schematic_component.insert({center:i,size:r,source_group_id:t.source_group_id,schematic_group_id:t.schematic_group_id??void 0,subcircuit_id:t.subcircuit_id??t.getSubcircuit()?.subcircuit_id??void 0,is_schematic_group:!0,is_box_with_pins:!0,port_arrangement:ePe(a),pin_spacing:.2,pin_styles:Zwe(n.schPinStyle,s),port_labels:s,schematic_sheet_id:t._resolveSchematicSheetId()});t.schematic_component_id=A.schematic_component_id,t.schematic_group_id\u0026\u0026e.schematic_group.update(t.schematic_group_id,{center:i,width:r.width,height:r.height,schematic_component_ids:[A.schematic_component_id]});const c=n.schTitle??n.name;c\u0026\u0026e.schematic_text.insert({text:c,schematic_component_id:A.schematic_component_id,anchor:\"left\",rotation:0,position:{x:i.x-r.width/2,y:i.y+r.height/2+.13},color:\"#006464\",font_size:.18,schematic_sheet_id:t._resolveSchematicSheetId()})},sTt=(t,e)=\u003e{const{sourceComponent:n,sourceGroup:o}=e;if(e.nodeType===\"component\"){const i=t.schematic_component.getWhere({source_component_id:n?.source_component_id});return i?.size?{width:i.size.width,height:i.size.height}:null}if(e.nodeType===\"group\"){const i=t.schematic_group.getWhere({source_group_id:o?.source_group_id});if(i?.width\u0026\u0026i?.height)return{width:i.width,height:i.height};const r=t.schematic_component.list({schematic_group_id:i?.schematic_group_id});let s=1/0,a=-1/0,A=1/0,c=-1/0;for(const g of r)if(g.center\u0026\u0026g.size){const h=g.size.width/2,d=g.size.height/2;s=Math.min(s,g.center.x-h),a=Math.max(a,g.center.x+h),A=Math.min(A,g.center.y-d),c=Math.max(c,g.center.y+d)}const l=a-s,u=c-A;return{width:l,height:u}}return null},zMo=t=\u003e{const{db:e}=t.root,n=t._parsedProps,o=mz(e.toArray(),{source_group_id:t.source_group_id}),i=n.schJustifyContent??n.justifyContent,r=n.schAlignItems??n.alignItems,s=n.schFlexGap??n.schGap??n.gap,a=n.schFlexDirection??\"row\",A={start:\"flex-start\",end:\"flex-end\",\"flex-start\":\"flex-start\",\"flex-end\":\"flex-end\",stretch:\"space-between\",\"space-between\":\"space-between\",\"space-around\":\"space-around\",\"space-evenly\":\"space-evenly\",center:\"center\"}[i??\"space-between\"],c={start:\"flex-start\",end:\"flex-end\",\"flex-start\":\"flex-start\",\"flex-end\":\"flex-end\",stretch:\"stretch\",center:\"center\"}[r??\"center\"];if(!A)throw new Error(`Invalid justifyContent value: \"${i}\"`);if(!c)throw new Error(`Invalid alignItems value: \"${r}\"`);let l=0,u=0;typeof s==\"object\"?(l=s.y??0,u=s.x??0):typeof s==\"number\"?(l=s,u=s):typeof s==\"string\"\u0026\u0026(l=ce.parse(s),u=ce.parse(s));let g,h=n.width??n.schWidth??void 0,d=n.height??n.schHeight??void 0;(h===void 0||d===void 0)\u0026\u0026(g=lmt(o.childNodes.map(C=\u003esTt(e,C)).filter(C=\u003eC!==null),{direction:a,rowGap:l,columnGap:u}),h=g.width,d=g.height);const m=new Qwt(h,d,{alignItems:c,justifyContent:A,direction:a,rowGap:l,columnGap:u});for(const C of o.childNodes){const y=sTt(e,C);m.addChild({metadata:C,width:y?.width??0,height:y?.height??0,flexBasis:y?a===\"row\"?y.width:y.height:void 0})}m.build();const _={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,width:0,height:0};for(const C of m.children)_.minX=Math.min(_.minX,C.position.x),_.minY=Math.min(_.minY,C.position.y),_.maxX=Math.max(_.maxX,C.position.x+C.size.width),_.maxY=Math.max(_.maxY,C.position.y+C.size.height);_.width=_.maxX-_.minX,_.height=_.maxY-_.minY;const f={x:-(_.maxX+_.minX)/2,y:-(_.maxY+_.minY)/2},I=e.toArray();for(const C of m.children){const{sourceComponent:y,sourceGroup:x}=C.metadata;if(y){const E=e.schematic_component.getWhere({source_component_id:y.source_component_id});if(!E)continue;DWn(I,E.schematic_component_id,{x:C.position.x+C.size.width/2+f.x,y:C.position.y+C.size.height/2+f.y})}if(x){if(!e.schematic_group.getWhere({source_group_id:x.source_group_id}))continue;NWn(I,x.source_group_id,{x:C.position.x+C.size.width/2+f.x,y:C.position.y+C.size.height/2+f.y})}}t.schematic_group_id\u0026\u0026e.schematic_group.update(t.schematic_group_id,{width:_.width,height:_.height})};function MO({db:t,schematicComponentId:e,deltaX:n,deltaY:o}){const i=t.schematic_rect.list({schematic_component_id:e});for(const c of i)c.center.x+=n,c.center.y+=o;const r=t.schematic_line.list({schematic_component_id:e});for(const c of r)c.x1+=n,c.y1+=o,c.x2+=n,c.y2+=o;const s=t.schematic_circle.list({schematic_component_id:e});for(const c of s)c.center.x+=n,c.center.y+=o;const a=t.schematic_arc.list({schematic_component_id:e});for(const c of a)c.center.x+=n,c.center.y+=o;const A=t.schematic_path.list({schematic_component_id:e});for(const c of A)for(const l of c.points)l.x+=n,l.y+=o}function JMo(t){const{db:e}=t.root,n=t._parsedProps,o=t.children.filter(y=\u003e{const x=y._parsedProps?.schX!==void 0||y._parsedProps?.schY!==void 0;return y.schematic_component_id\u0026\u0026!x});if(o.length===0)return;let i=0,r=0;for(const y of o){const x=e.schematic_component.get(y.schematic_component_id);x?.size\u0026\u0026(i=Math.max(i,x.size.width),r=Math.max(r,x.size.height))}i===0\u0026\u0026o.length\u003e0\u0026\u0026(i=1),r===0\u0026\u0026o.length\u003e0\u0026\u0026(r=1);let s=n.gridCols,a,A=n.gridGap,c=n.gridRowGap,l=n.gridColumnGap;n.schLayout?.grid\u0026\u0026(s=n.schLayout.grid.cols??s,a=n.schLayout.grid.rows,A=n.schLayout.gridGap??A,c=n.schLayout.gridRowGap??c,l=n.schLayout.gridColumnGap??l);let u,g;s!==void 0\u0026\u0026a!==void 0?(u=s,g=a):s!==void 0?(u=s,g=Math.ceil(o.length/u)):a!==void 0?(g=a,u=Math.ceil(o.length/g)):(u=Math.ceil(Math.sqrt(o.length)),g=Math.ceil(o.length/u)),u===0\u0026\u0026o.length\u003e0\u0026\u0026(u=1),g===0\u0026\u0026o.length\u003e0\u0026\u0026(g=o.length);let h,d;const p=y=\u003e{if(y!==void 0)return typeof y==\"number\"?y:ce.parse(y)};if(c!==void 0||l!==void 0){const y=typeof A==\"object\"\u0026\u0026A!==null?A.x:A,x=typeof A==\"object\"\u0026\u0026A!==null?A.y:A;h=p(l??y)??1,d=p(c??x)??1}else if(typeof A==\"number\")h=A,d=A;else if(typeof A==\"string\"){const y=ce.parse(A);h=y,d=y}else if(typeof A==\"object\"\u0026\u0026A!==null){const y=A.x,x=A.y;h=typeof y==\"number\"?y:ce.parse(y??\"0mm\"),d=typeof x==\"number\"?x:ce.parse(x??\"0mm\")}else h=1,d=1;const m=u*i+Math.max(0,u-1)*h,_=g*r+Math.max(0,g-1)*d,f=t._getGlobalSchematicPositionBeforeLayout(),I=f.x-m/2+i/2,C=f.y+_/2-r/2;for(let y=0;y\u003co.length;y++){const x=o[y];if(!x.schematic_component_id)continue;const E=Math.floor(y/u),B=y%u;if(E\u003e=g||B\u003e=u){console.warn(`Schematic grid layout: Child ${x.getString()} at index ${y} (row ${E}, col ${B}) exceeds specified grid dimensions (${g}x${u}). Skipping placement.`);continue}const S=I+B*(i+h),Q=C-E*(r+d),w=e.schematic_component.get(x.schematic_component_id);if(w){const M=w.center,k={x:S,y:Q};e.schematic_component.update(x.schematic_component_id,{center:k});const R=k.x-M.x,F=k.y-M.y,O=e.schematic_port.list({schematic_component_id:x.schematic_component_id});for(const Y of O)e.schematic_port.update(Y.schematic_port_id,{center:{x:Y.center.x+R,y:Y.center.y+F}});const U=e.schematic_text.list({schematic_component_id:x.schematic_component_id});for(const Y of U)e.schematic_text.update(Y.schematic_text_id,{position:{x:Y.position.x+R,y:Y.position.y+F}});MO({db:e,schematicComponentId:x.schematic_component_id,deltaX:R,deltaY:F})}}t.schematic_group_id\u0026\u0026e.schematic_group.update(t.schematic_group_id,{width:m,height:_,center:f})}var aTt=vc(\"Group_doInitialSchematicLayoutMatchAdapt\");function WMo(t){const{db:e}=t.root,n=dz(e.toArray(),{source_group_id:t.source_group_id});if(n.filter(A=\u003eA.type===\"source_component\").length\u003c=1)return;const i=lEo(n);aTt.enabled\u0026\u0026global?.debugGraphics\u0026\u0026global.debugGraphics?.push(zN(i,{title:`floatingBpcGraph-${t.name}`}));const r={boxes:i.boxes,pins:i.pins.map(A=\u003e({...A,color:A.color.replace(\"not_connected\",\"normal\")}))},{result:s}=HEo([{variantName:\"default\",floatingGraph:i},{variantName:\"noNotConnected\",floatingGraph:r}],{singletonKeys:[\"vcc/2\",\"gnd/2\"],centerPinColors:[\"netlabel_center\",\"component_center\"],floatingBoxIdsWithMutablePinOffsets:new Set(i.boxes.filter(A=\u003ei.pins.filter(u=\u003eu.boxId===A.boxId).filter(u=\u003e!u.color.includes(\"center\")).length\u003c=2).map(A=\u003eA.boxId)),corpus:{}});aTt.enabled\u0026\u0026global?.debugGraphics\u0026\u0026global.debugGraphics?.push(zN(s,{title:`laidOutBpcGraph-${t.name}`}));const a=t._getGlobalSchematicPositionBeforeLayout();for(const A of s.boxes){if(!A.center)continue;const c=e.schematic_component.get(A.boxId);if(c){const u={x:A.center.x+a.x,y:A.center.y+a.y},g=e.schematic_port.list({schematic_component_id:c.schematic_component_id}),h=e.schematic_text.list({schematic_component_id:c.schematic_component_id}),d={x:u.x-c.center.x,y:u.y-c.center.y};for(const p of g)p.center.x+=d.x,p.center.y+=d.y;for(const p of h)p.position.x+=d.x,p.position.y+=d.y;MO({db:e,schematicComponentId:c.schematic_component_id,deltaX:d.x,deltaY:d.y}),c.center=u;continue}const l=e.schematic_net_label.get(A.boxId);if(l){const u=s.pins.find(h=\u003eh.boxId===A.boxId\u0026\u0026h.color===\"netlabel_center\");if(!u)throw new Error(`No pin found for net label: ${A.boxId}`);const g={x:A.center.x+a.x,y:A.center.y+a.y};l.center=g,l.anchor_position={x:g.x+u.offset.x,y:g.y+u.offset.y};continue}console.error(`No schematic element found for box: ${A.boxId}. This is a bug in the matchAdapt binding with @tscircuit/core`)}}function ATt({text:t,fontSize:e}){const o=.12*(e/.18);return t.length*o}var jMo=.18,$Mo=new Set([\"simple_resistor\",\"simple_capacitor\",\"simple_inductor\",\"simple_crystal\",\"simple_resonator\",\"simple_potentiometer\",\"simple_fuse\",\"simple_diode\",\"simple_led\",\"simple_transistor\",\"simple_mosfet\",\"simple_op_amp\",\"simple_voltage_source\",\"simple_test_point\"]);function cTt({text:t,position:e,anchor:n,fontSize:o}){const i=ATt({text:t,fontSize:o}),r=o;let s,a;n.includes(\"left\")?(s=0,a=i):n.includes(\"right\")?(s=-i,a=0):(s=-i/2,a=i/2);let A,c;return n.includes(\"top\")?(A=-r,c=0):n.includes(\"bottom\")?(A=0,c=r):(A=-r/2,c=r/2),{minX:e.x+s,maxX:e.x+a,minY:e.y+A,maxY:e.y+c}}function qMo({schematicComponent:t,sourceComponent:e}){if(!t.symbol_name)return[];const n=Su[t.symbol_name];if(!n?.primitives||!n.center)return[];const o=[];for(const i of n.primitives){if(i.type!==\"text\")continue;let r;i.text===\"{REF}\"?r=e?.display_name??e?.name??\"\":i.text===\"{VAL}\"?r=t.symbol_display_value??\"\":r=i.text??\"\",r\u0026\u0026o.push(cTt({text:r,position:{x:i.x-n.center.x+t.center.x,y:i.y-n.center.y+t.center.y},anchor:i.anchor??\"center\",fontSize:jMo}))}return o}function lTt(t){return Ey({center:t.center,width:t.size.width,height:t.size.height})}function XMo(t,e){if(!e.center||!e.size)return null;const n=e.source_component_id?t.source_component.get(e.source_component_id):void 0;if(!n||!$Mo.has(n.ftype))return null;const o=qMo({schematicComponent:e,sourceComponent:n});if(o.length===0)return null;const i=lTt(e),r={...i};for(const s of o)r.minX=Math.min(r.minX,s.minX),r.maxX=Math.max(r.maxX,s.maxX),r.minY=Math.min(r.minY,s.minY),r.maxY=Math.max(r.maxY,s.maxY);return r.minX===i.minX\u0026\u0026r.maxX===i.maxX\u0026\u0026r.minY===i.minY\u0026\u0026r.maxY===i.maxY?null:r}function ZMo(t,e){let n=t.size;return n\u0026\u0026(n=kwe(n,e)),{...t,symbol_name:Rwe(t.symbol_name,e),size:n}}function vue({db:t,schematicComponent:e,ccwRotationDegrees:n=0}){const o=ZMo(e,n),i=XMo(t,o);if(!i)return null;const r=lTt(o);if(o.size.height\u003eo.size.width)return i;const a=Math.max(0,r.minX-i.minX),A=Math.max(0,i.maxX-r.maxX),c=Math.max(0,i.maxY-r.maxY),l=Math.max(0,r.minY-i.minY);let u=a,g=A;a\u003e0\u0026\u0026A\u003e0\u0026\u0026(u=Math.max(a,A),g=u);let h=c,d=l;return c\u003e0\u0026\u0026l\u003e0\u0026\u0026(h=Math.max(c,l),d=h),{minX:r.minX-u,maxX:r.maxX+g,minY:r.minY-d,maxY:r.maxY+h}}var js=vc(\"Group_doInitialSchematicLayoutMatchpack\"),uTt=[0,90,180,270],eDo={\"y+\":0,\"x+\":90,\"y-\":180,\"x-\":270};function CMe(t){switch(t){case\"up\":return\"y+\";case\"down\":return\"y-\";case\"left\":return\"x-\";case\"right\":return\"x+\";default:return\"y+\"}}function tDo(t,e){if(e.length!==2)return null;const n=new Set;for(const o of e){const r=t.source_port.get(o.source_port_id)?.subcircuit_connectivity_map_key;if(!r)continue;const s=t.source_net.getWhere({subcircuit_connectivity_map_key:r});if(!s)continue;const a=s.is_ground??!1,A=s.is_power===!0||s.is_positive_voltage_source===!0;if(A===a)continue;const c=eDo[CMe(o.facing_direction)],l=A?c:(c+180)%360;n.add(l)}return n.size===1?n.values().next().value:null}function gTt({db:t,schematicComponent:e,component:n,ccwRotationDegrees:o}){let i=e.size;i\u0026\u0026(i=kwe(i,o));const r=vue({db:t,schematicComponent:e,ccwRotationDegrees:o});let s=0,a=0,A=0,c=0;if(r\u0026\u0026e.center){const m=(i?.width??0)/2,_=(i?.height??0)/2;s=e.center.x-m-r.minX,a=r.maxX-(e.center.x+m),A=r.maxY-(e.center.y+_),c=e.center.y-_-r.minY}const l=(n?._parsedProps?.schMarginLeft??n?._parsedProps?.schMarginX??0)+s,u=(n?._parsedProps?.schMarginRight??n?._parsedProps?.schMarginX??0)+a;let g=(n?._parsedProps?.schMarginTop??n?._parsedProps?.schMarginY??0)+A,h=(n?._parsedProps?.schMarginBottom??n?._parsedProps?.schMarginY??0)+c;n?.config.shouldRenderAsSchematicBox\u0026\u0026(g+=.4,h+=.4);const d={width:(i?.width||1)+l+u,height:(i?.height||1)+g+h},p=kwe(d,o);return{x:p.width,y:p.height}}function nDo({db:t,schematicComponent:e,component:n,ccwRotationDegrees:o,chipGap:i}){const r=gTt({db:t,schematicComponent:e,component:n,ccwRotationDegrees:0});if(!Twe(o))return r;const s=gTt({db:t,schematicComponent:e,component:n,ccwRotationDegrees:o});return s.x-r.x\u003e=i||s.y-r.y\u003e=i?s:r}function oDo({db:t,schematicGroup:e,groupComponents:n,groupInstance:o}){let i=1/0,r=-1/0,s=1/0,a=-1/0,A=!1;for(const d of n){if(!d.center||!d.size)continue;A=!0;const p=vue({db:t,schematicComponent:d})??Ey({center:d.center,width:d.size.width,height:d.size.height});i=Math.min(i,p.minX),r=Math.max(r,p.maxX),s=Math.min(s,p.minY),a=Math.max(a,p.maxY)}const c=o?._parsedProps?.schMarginLeft??o?._parsedProps?.schMarginX??0,l=o?._parsedProps?.schMarginRight??o?._parsedProps?.schMarginX??0,u=o?._parsedProps?.schMarginTop??o?._parsedProps?.schMarginY??0,g=o?._parsedProps?.schMarginBottom??o?._parsedProps?.schMarginY??0,h=A?{x:(i+r)/2,y:(s+a)/2}:e.center??{x:0,y:0};return{center:{x:h.x+(l-c)/2,y:h.y+(u-g)/2},size:{x:(A?r-i:2)+c+l,y:(A?a-s:2)+u+g}}}function iDo(t,e){if(t.nodeType===\"component\"\u0026\u0026t.sourceComponent){const n=e.children.find(o=\u003eo.source_component_id===t.sourceComponent?.source_component_id);return n?._parsedProps?.schX!==void 0||n?._parsedProps?.schY!==void 0}if(t.nodeType===\"group\"\u0026\u0026t.sourceGroup){const n=e.children.find(o=\u003eo.source_group_id===t.sourceGroup?.source_group_id);return n?._parsedProps?.schX!==void 0||n?._parsedProps?.schY!==void 0}return!1}function DO(t,e){return t.nodeType===\"component\"\u0026\u0026t.sourceComponent?t.sourceComponent.name||`chip_${e}`:t.nodeType===\"group\"\u0026\u0026t.sourceGroup?t.sourceGroup.name||`group_${e}`:null}var dTt=({db:t,sourceComponentId:e,schematicSheetId:n})=\u003et.schematic_component.getWhere({source_component_id:e,...n?{schematic_sheet_id:n}:{}});function rDo(t,e,n,o={}){const i={chipMap:{},chipPinMap:{},netMap:{},pinStrongConnMap:{},netConnMap:{},chipGap:.6,decouplingCapsGap:.4,partitionGap:1.2},r={},s=n._getGlobalSchematicPositionBeforeLayout();js(`[${n.name}] Processing ${t.childNodes.length} child nodes for input problem`),t.childNodes.forEach((A,c)=\u003e{const l=iDo(A,n);if(js(l?`[${n.name}] Child ${c} explicitly positioned, including as fixed chip`:`[${n.name}] Processing child ${c}: nodeType=${A.nodeType}`),A.nodeType===\"component\"?js(`[${n.name}] - Component: ${A.sourceComponent?.name}`):A.nodeType===\"group\"\u0026\u0026js(`[${n.name}] - Group: ${A.sourceGroup?.name}`),A.nodeType===\"component\"\u0026\u0026A.sourceComponent){const u=DO(A,c),g=dTt({db:e,sourceComponentId:A.sourceComponent.source_component_id,schematicSheetId:o.schematicSheetId});if(!g)return;const h=n.children.find(_=\u003e_.source_component_id===A.sourceComponent?.source_component_id),d=e.schematic_port.list({schematic_component_id:g.schematic_component_id});let p=[...uTt];if(h?._parsedProps?.schOrientation\u0026\u0026(p=[0]),h?._parsedProps?.schRotation!==void 0\u0026\u0026(p=[0]),h?._parsedProps?.facingDirection\u0026\u0026(p=[0]),h?._parsedProps?.schFacingDirection\u0026\u0026(p=[0]),h?.componentName===\"Chip\"\u0026\u0026(p=[0]),p.length===uTt.length){const _=tDo(e,d);_!==null\u0026\u0026(p=[_])}const m=p.length===1?p[0]:0;i.chipMap[u]={chipId:u,pins:[],size:nDo({db:e,schematicComponent:g,component:h,ccwRotationDegrees:m,chipGap:i.chipGap}),isCapacitor:A.sourceComponent.ftype===\"simple_capacitor\",isCrystal:A.sourceComponent.ftype===\"simple_crystal\",isResistor:A.sourceComponent.ftype===\"simple_resistor\",isTestPoint:A.sourceComponent.ftype===\"simple_test_point\",availableRotations:p,...l\u0026\u0026{fixedPosition:{x:g.center.x-s.x,y:g.center.y-s.y}}};for(const _ of d){const f=e.source_port.get(_.source_port_id);if(!f)continue;const I=`${u}.${f.pin_number||f.name||_.schematic_port_id}`;i.chipMap[u].pins.push(I);const C=CMe(_.facing_direction);i.chipPinMap[I]={pinId:I,offset:{x:(_.center?.x||0)-(g.center.x||0),y:(_.center?.y||0)-(g.center.y||0)},side:C}}}else if(A.nodeType===\"group\"\u0026\u0026A.sourceGroup){const u=DO(A,c);js(`[${n.name}] Processing nested group: ${u}`);const g=e.schematic_group?.getWhere?.({source_group_id:A.sourceGroup.source_group_id}),h=n.children.find(d=\u003ed.source_group_id===A.sourceGroup?.source_group_id);if(js(`[${n.name}] Found schematic_group for ${u}:`,g),g){js(`[${n.name}] Treating group ${u} as composite chip`);const d=e.schematic_component.list({schematic_group_id:g.schematic_group_id});js(`[${n.name}] Group ${u} has ${d.length} components:`,d.map(_=\u003e_.source_component_id));const p=oDo({db:e,schematicGroup:g,groupComponents:d,groupInstance:h});r[u]=p,js(`[${n.name}] Group ${u} computed proxy: ${p.size.x} x ${p.size.y} centered at (${p.center.x}, ${p.center.y})`);const m=[];for(const _ of d){const f=e.schematic_port.list({schematic_component_id:_.schematic_component_id});for(const I of f){const C=e.source_port.get(I.source_port_id);if(!C)continue;const y=`${u}.${C.pin_number||C.name||I.schematic_port_id}`;m.push(y);const x=CMe(I.facing_direction);i.chipPinMap[y]={pinId:y,offset:{x:(I.center?.x||0)-p.center.x,y:(I.center?.y||0)-p.center.y},side:x}}}js(`[${n.name}] Group ${u} has ${m.length} pins:`,m),i.chipMap[u]={chipId:u,pins:m,size:p.size},js(`[${n.name}] Added group ${u} to chipMap`)}else js(`[${n.name}] Warning: No schematic_group found for group ${u}`)}}),js(`[${n.name}] Creating connections using connectivity keys`);const a=new Map;for(const[A,c]of Object.entries(i.chipMap))for(const l of c.pins){const u=l.split(\".\").pop(),g=t.childNodes.find(h=\u003eDO(h,t.childNodes.indexOf(h))===A);if(g?.nodeType===\"group\"\u0026\u0026g.sourceGroup){const h=e.schematic_group?.getWhere?.({source_group_id:g.sourceGroup.source_group_id});if(h){const d=e.schematic_component.list({schematic_group_id:h.schematic_group_id});for(const p of d){const m=e.source_port.list({source_component_id:p.source_component_id});for(const _ of m){const f=_.pin_number||_.name;if(String(f)===String(u))if(_.subcircuit_connectivity_map_key){const I=_.subcircuit_connectivity_map_key;a.has(I)||a.set(I,[]),a.get(I).push(l),js(`[${n.name}] ✓ Pin ${l} has connectivity key: ${I}`)}else js(`[${n.name}] Pin ${l} has no connectivity key`)}}}}else if(g?.nodeType===\"component\"\u0026\u0026g.sourceComponent){const h=e.source_port.list({source_component_id:g.sourceComponent.source_component_id});for(const d of h){const p=d.pin_number||d.name;if(String(p)===String(u)\u0026\u0026d.subcircuit_connectivity_map_key){const m=d.subcircuit_connectivity_map_key;a.has(m)||a.set(m,[]),a.get(m).push(l),js(`[${n.name}] Pin ${l} has connectivity key: ${m}`)}}}}js(`[${n.name}] Found ${a.size} connectivity groups:`,Array.from(a.entries()).map(([A,c])=\u003e({key:A,pins:c})));for(const[A,c]of a){const l=e.source_trace.list().filter(h=\u003eh.subcircuit_connectivity_map_key===A),u=l.some(h=\u003eh.connected_source_net_ids\u0026\u0026h.connected_source_net_ids.length\u003e0),g=l.some(h=\u003eh.connected_source_port_ids\u0026\u0026h.connected_source_port_ids.length\u003e=2);if(js(`[${n.name}] Connectivity ${A}: hasNetConnections=${u}, hasDirectConnections=${g}`),c.length\u003e=2\u0026\u0026g){for(const h of l)if(h.connected_source_port_ids\u0026\u0026h.connected_source_port_ids.length\u003e=2){const d=[];for(const p of h.connected_source_port_ids)for(const m of c){const _=m.split(\".\").pop(),f=e.source_port.get(p);if(f\u0026\u0026String(f.pin_number||f.name)===String(_)){const I=m.split(\".\")[0],C=t.childNodes.find(y=\u003eDO(y,t.childNodes.indexOf(y))===I);C?.nodeType===\"component\"\u0026\u0026C.sourceComponent\u0026\u0026e.source_port.list({source_component_id:C.sourceComponent.source_component_id}).some(x=\u003ex.source_port_id===p)\u0026\u0026d.push(m)}}for(let p=0;p\u003cd.length;p++)for(let m=p+1;m\u003cd.length;m++){const _=d[p],f=d[m];i.pinStrongConnMap[`${_}-${f}`]=!0,i.pinStrongConnMap[`${f}-${_}`]=!0,js(`[${n.name}] Created strong connection: ${_} \u003c-\u003e ${f}`)}}}if(u){const h=e.source_net.getWhere({subcircuit_connectivity_map_key:A}),d=h?.is_ground??!1,p=h?.is_power===!0||h?.is_positive_voltage_source===!0;i.netMap[A]={netId:A,isGround:d,isPositiveVoltageSource:p};for(const m of c)i.netConnMap[`${m}-${A}`]=!0;js(`[${n.name}] Created net ${A} with ${c.length} pins:`,c)}}return{inputProblem:i,nestedGroupMatchpackProxyMap:r}}function hTt(t,e,n={}){const{db:o}=t.root;if(js(`[${t.name}] Starting matchpack layout with ${e.childNodes.length} children`),js(`[${t.name}] Tree structure:`,JSON.stringify(e,null,2)),e.childNodes.length\u003c=1){js(`[${t.name}] Only ${e.childNodes.length} children, skipping layout`);return}js(\"Converting circuit tree to InputProblem...\");const{inputProblem:i,nestedGroupMatchpackProxyMap:r}=rDo(e,o,t,n);js.enabled\u0026\u0026t.root?.emit(\"debug:logOutput\",{type:\"debug:logOutput\",name:`matchpack-input-problem-${t.name}`,content:JSON.stringify(i,null,2)});const s=new ZSt(i);if(t.root?.emit(\"solver:started\",{type:\"solver:started\",solverName:\"LayoutPipelineSolver\",solverParams:i,solverConstructorArgs:[i],componentName:t.getString()}),js(\"Starting LayoutPipelineSolver...\"),js.enabled\u0026\u0026global?.debugGraphics){const l=s.visualize();global.debugGraphics.push({...l,title:`matchpack-initial-${t.name}`})}if(s.solve(),t.root?.emit(\"solver:ended\",{type:\"solver:ended\",solverName:\"LayoutPipelineSolver\",componentName:t.getString(),solved:s.solved,failed:s.failed,iterations:s.iterations,error:s.error}),js(`Solver completed in ${s.iterations} iterations`),js(`Solved: ${s.solved}, Failed: ${s.failed}`),s.failed){const l=s.error??\"Unknown Matchpack failure\";js(`Solver failed with error: ${l}`),o.schematic_layout_error.insert({error_type:\"schematic_layout_error\",message:`Matchpack layout solver failed: ${l}`,is_fatal:!1,source_group_id:t.source_group_id,schematic_group_id:t.schematic_group_id,subcircuit_id:t.subcircuit_id??void 0});return}const a=s.getOutputLayout();if(js(\"OutputLayout:\",JSON.stringify(a,null,2)),js(\"Solver completed successfully:\",!s.failed),js.enabled\u0026\u0026global?.debugGraphics){const l=s.visualize();global.debugGraphics.push({...l,title:`matchpack-final-${t.name}`})}const A=s.checkForOverlaps(a);if(A.length\u003e0){js(`Warning: Found ${A.length} overlapping components:`);for(const l of A)js(` ${l.chip1} overlaps ${l.chip2} (area: ${l.overlapArea})`)}const c=t._getGlobalSchematicPositionBeforeLayout();js(`Group offset: x=${c.x}, y=${c.y}`),js(`Applying layout results for ${Object.keys(a.chipPlacements).length} chip placements`);for(const[l,u]of Object.entries(a.chipPlacements)){js(`Processing placement for chip: ${l} at (${u.x}, ${u.y})`);const g=e.childNodes.find(d=\u003e{const p=DO(d,e.childNodes.indexOf(d)),m=p===l;return js(` Checking child ${p}: matches=${m}`),m});if(!g){js(`Warning: No tree node found for chip: ${l}`),js(\"Available tree nodes:\",e.childNodes.map((d,p)=\u003e({type:d.nodeType,name:d.nodeType===\"component\"?d.sourceComponent?.name:d.sourceGroup?.name,expectedChipId:DO(d,p)})));continue}const h={x:u.x+c.x,y:u.y+c.y};if(g.nodeType===\"component\"\u0026\u0026g.sourceComponent){const d=t.children.find(m=\u003em.source_component_id===g.sourceComponent?.source_component_id);if(d?._parsedProps?.schX!==void 0||d?._parsedProps?.schY!==void 0){js(`Skipping position update for fixed chip ${l}`);continue}const p=dTt({db:o,sourceComponentId:g.sourceComponent.source_component_id,schematicSheetId:n.schematicSheetId});if(p){js(`Moving component ${l} to (${h.x}, ${h.y})`);const m=o.schematic_port.list({schematic_component_id:p.schematic_component_id}),_=o.schematic_text.list({schematic_component_id:p.schematic_component_id}),f={x:h.x-p.center.x,y:h.y-p.center.y};for(const I of m)I.center.x+=f.x,I.center.y+=f.y;for(const I of _)I.position.x+=f.x,I.position.y+=f.y;if(MO({db:o,schematicComponentId:p.schematic_component_id,deltaX:f.x,deltaY:f.y}),p.center=h,u.ccwRotationDegrees!==0){js(`Component ${l} has rotation: ${u.ccwRotationDegrees}°`);const I=(Math.round(u.ccwRotationDegrees)%360+360)%360;if((I===90||I===270)\u0026\u0026p.size){const E=p.size.width;p.size.width=p.size.height,p.size.height=E}const C=u.ccwRotationDegrees*Math.PI/180,y=Math.cos(C),x=Math.sin(C);for(const E of m){const B=E.center.x-h.x,S=E.center.y-h.y,Q=B*y-S*x,w=B*x+S*y;E.center.x=h.x+Q,E.center.y=h.y+w;const M=E.facing_direction||\"right\";E.facing_direction=cMt(M,u.ccwRotationDegrees),E.side_of_component=(E.facing_direction===\"up\"?\"top\":E.facing_direction===\"down\"?\"bottom\":E.facing_direction)||E.side_of_component}for(const E of _){const B=E.position.x-h.x,S=E.position.y-h.y,Q=B*y-S*x,w=B*x+S*y;E.position.x=h.x+Q,E.position.y=h.y+w}p.symbol_name\u0026\u0026(p.symbol_name=Rwe(p.symbol_name,u.ccwRotationDegrees))}}}else if(g.nodeType===\"group\"\u0026\u0026g.sourceGroup){const d=o.schematic_group?.getWhere?.({source_group_id:g.sourceGroup.source_group_id});if(d){js(`Moving group ${l} to (${h.x}, ${h.y}) from (${d.center?.x}, ${d.center?.y})`);const p=o.schematic_component.list({schematic_group_id:d.schematic_group_id});js(`Group ${l} has ${p.length} components to move`);const m=r[l],_=m?.center??d.center??{x:0,y:0},f={x:h.x-_.x,y:h.y-_.y};js(`Position delta for group ${l}: (${f.x}, ${f.y})`);for(const I of p)if(I.center){const C={...I.center};I.center.x+=f.x,I.center.y+=f.y,js(`Moved component ${I.source_component_id} from (${C.x}, ${C.y}) to (${I.center.x}, ${I.center.y})`);const y=o.schematic_port.list({schematic_component_id:I.schematic_component_id}),x=o.schematic_text.list({schematic_component_id:I.schematic_component_id});for(const E of y)E.center\u0026\u0026(E.center.x+=f.x,E.center.y+=f.y);for(const E of x)E.position\u0026\u0026(E.position.x+=f.x,E.position.y+=f.y);MO({db:o,schematicComponentId:I.schematic_component_id,deltaX:f.x,deltaY:f.y})}d.center=h,m\u0026\u0026(d.width=m.size.x,d.height=m.size.y),js(`Updated group ${l} center to (${h.x}, ${h.y})`)}}}js(\"Matchpack layout completed successfully\")}function sDo({circuitJson:t,schematicSheetIdsBySourceComponentId:e}){const n=new Map;for(const i of t)i.type===\"source_group\"\u0026\u0026n.set(i.source_group_id,i.parent_source_group_id);const o=new Map;for(const i of t){if(i.type!==\"source_component\"||!i.source_group_id)continue;const r=e.get(i.source_component_id);if(r!==void 0)for(const s of r){let a=i.source_group_id;const A=new Set;for(;a\u0026\u0026!A.has(a);){A.add(a);const c=o.get(a)??new Set;c.add(s),o.set(a,c),a=n.get(a)}}}return o}function aDo({circuitJson:t,schematicSheetId:e,rootSourceGroupId:n,schematicSheetIdsBySourceComponentId:o,schematicSheetIdsBySourceGroupId:i}){const r=s=\u003es===n||i.get(s)?.has(e)===!0;return t.filter(s=\u003es.type===\"source_group\"?r(s.source_group_id):s.type===\"source_component\"?o.get(s.source_component_id)?.has(e)!==!0?!1:s.source_group_id?r(s.source_group_id):!0:!0)}function ADo(t,e){const{source_group_id:n}=e,o=new Map;for(const s of t){if(s.type!==\"schematic_component\"||!s.source_component_id||!s.schematic_sheet_id)continue;const a=o.get(s.source_component_id)??new Set;a.add(s.schematic_sheet_id),o.set(s.source_component_id,a)}const i=new Set;for(const s of o.values())for(const a of s)i.add(a);if(i.size\u003c=1)return[{tree:mz(t,{source_group_id:n}),schematicSheetId:i.values().next().value}];const r=sDo({circuitJson:t,schematicSheetIdsBySourceComponentId:o});return Array.from(i).map(s=\u003e({tree:mz(aDo({circuitJson:t,schematicSheetId:s,rootSourceGroupId:n,schematicSheetIdsBySourceComponentId:o,schematicSheetIdsBySourceGroupId:r}),{source_group_id:n}),schematicSheetId:s}))}function cDo(t){const{db:e}=t.root,n=ADo(e.toArray(),{source_group_id:t.source_group_id});for(const{tree:o,schematicSheetId:i}of n)hTt(t,o,{schematicSheetId:i})}var yMe=1,wue=1.5;function lDo({sectionBlocks:t,groupSchPositionBeforeLayout:e}){const n=t.reduce((c,l)=\u003e{const u=Math.max(l.size.x,.5)+wue*2,g=Math.max(l.size.y,.5)+wue*2;return c+u*g},0),o=Math.sqrt(n)*2,i=[];let r=[],s=0;for(const c of t){const l=Math.max(c.size.x,.5)+wue*2,u=Math.max(c.size.y,.5)+wue*2,g=s\u003e0?s+yMe+l:l;r.length\u003e0\u0026\u0026g\u003eo\u0026\u0026(i.push(r),r=[],s=0);const h=s\u003e0?s+yMe:0;r.push({sectionName:c.sectionName,rowOffset:h,width:l,height:u}),s=h+l}r.length\u003e0\u0026\u0026i.push(r);const a=new Map;let A=0;for(const c of i){const l=Math.max(...c.map(h=\u003eh.height)),g=-(c[c.length-1].rowOffset+c[c.length-1].width)/2;for(const h of c)a.set(h.sectionName,{x:g+h.rowOffset+h.width/2+e.x,y:A-l/2+e.y});A-=l+yMe}return a}var uDo=vc(\"Group_doInitialSchematicLayoutSections\");function gDo(t){const{db:e}=t.root,n=new Set;let o=!1;for(const c of t.children){if(!c.source_component_id)continue;const l=c.getSchematicSectionName();l!==null?n.add(l):o=!0}const i=Array.from(n);if(o\u0026\u0026i.push(null),i.length===0)return;for(const c of i){const l=mz(e.toArray(),{source_group_id:t.source_group_id});l.childNodes=l.childNodes.filter(u=\u003eu.nodeType!==\"component\"||!u.sourceComponent?!1:(t.children.find(d=\u003ed.source_component_id===u.sourceComponent?.source_component_id)?.getSchematicSectionName()??null)===c),hTt(t,l)}if(i.length\u003c=1)return;const r=new Map;for(const c of i){let l=1/0,u=-1/0,g=1/0,h=-1/0;const d=new Set;for(const p of t.children){const m=p.source_component_id;if(!m||p.getSchematicSectionName()!==c)continue;const f=e.schematic_component.getWhere({source_component_id:m});if(!f)continue;d.add(m);const I=f.size.width/2,C=f.size.height/2;l=Math.min(l,f.center.x-I),u=Math.max(u,f.center.x+I),g=Math.min(g,f.center.y-C),h=Math.max(h,f.center.y+C)}!Number.isFinite(l)||d.size===0||r.set(c,{sectionName:c,center:{x:(l+u)/2,y:(g+h)/2},size:{x:u-l,y:h-g},sourceCompIds:d})}if(r.size\u003c=1)return;const s=new Set;for(const c of t.children){if(!c.source_component_id)continue;const l=c._parsedProps;(l?.schX!==void 0||l?.schY!==void 0)\u0026\u0026s.add(c.getSchematicSectionName())}const a=t._getGlobalSchematicPositionBeforeLayout(),A=lDo({sectionBlocks:Array.from(r.values()).map(c=\u003e({sectionName:c.sectionName,size:c.size})),groupSchPositionBeforeLayout:a});for(const[c,l]of A){const u=r.get(c);if(!u)continue;if(s.has(c)){uDo(`[${t.name}] Section \"${c}\" anchored by manual position, skipping shift`);continue}const g={x:l.x-u.center.x,y:l.y-u.center.y};for(const h of u.sourceCompIds){const d=e.schematic_component.getWhere({source_component_id:h});if(!d)continue;const p=e.schematic_port.list({schematic_component_id:d.schematic_component_id}),m=e.schematic_text.list({schematic_component_id:d.schematic_component_id});for(const _ of p)_.center.x+=g.x,_.center.y+=g.y;for(const _ of m)_.position.x+=g.x,_.position.y+=g.y;MO({db:e,schematicComponentId:d.schematic_component_id,deltaX:g.x,deltaY:g.y}),d.center={x:d.center.x+g.x,y:d.center.y+g.y}}}}var dDo=({db:t,schematicDisabled:e})=\u003e{const n=t.schematic_missing_sheet_warning.list()[0],o=t.schematic_component.list().length\u003e0;if(!(!e\u0026\u0026o\u0026\u0026t.schematic_sheet.list().length===0)){n\u0026\u0026t.schematic_missing_sheet_warning.delete(n.schematic_missing_sheet_warning_id);return}n||t.schematic_missing_sheet_warning.insert({warning_type:\"schematic_missing_sheet_warning\",message:\"No \u003cschematicsheet\u003e was found. Add a \u003cschematicsheet\u003e to define the schematic drawing area.\"})},pTt=t=\u003e{const e=t.root;if(!e?.isRootCircuit)return;const n=e.firstChild===t,o=U0e(e.firstChild)\u0026\u0026t.parent===e.firstChild;!n\u0026\u0026!o||dDo({db:e.db,schematicDisabled:e.schematicDisabled})},hDo=t=\u003e{pTt(t)},pDo=class extends Ir{source_net_label_id;schematic_net_label_id;get config(){return{componentName:\"NetLabel\",zodProps:HPn}}_getAnchorSide(){const{_parsedProps:t}=this;if(t.anchorSide)return t.anchorSide;if(!this._resolveConnectsTo())return\"right\";const n=this.getSubcircuit().selectOne(`net.${this._getNetName()}`);let o;if(n?.source_net_id\u0026\u0026(o=this.root?.db.source_net.get(n.source_net_id)),o?.is_ground)return\"top\";if(o?.is_power)return\"bottom\";const i=this._getGlobalSchematicPositionBeforeLayout(),r=this._getConnectedPorts();if(r.length===0)return\"right\";const s=r[0];if(s.facingDirection)return gO(s.facingDirection);const a=s._getGlobalSchematicPositionBeforeLayout(),A=a.x-i.x,c=a.y-i.y;if(Math.abs(A)\u003eMath.abs(c)){if(A\u003e0)return\"right\";if(A\u003c0)return\"left\"}else{if(c\u003e0)return\"top\";if(c\u003c0)return\"bottom\"}return\"right\"}_getConnectedPorts(){const t=this._resolveConnectsTo();if(!t)return[];const e=[];for(const n of t){const o=this.getSubcircuit().selectOne(n);o\u0026\u0026e.push(o)}return e}computeSchematicPropsTransform(){const{_parsedProps:t}=this;if(t.schX===void 0\u0026\u0026t.schY===void 0){const e=this._getConnectedPorts();if(e.length\u003e0){const n=e[0]._getGlobalSchematicPositionBeforeLayout(),o=ts(this.parent?.computeSchematicGlobalTransform?.()??hC(),{x:0,y:0});return M0(n.x-o.x,n.y-o.y)}}return super.computeSchematicPropsTransform()}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this;if(e.inline\u0026\u0026this.root?._featureMspSchematicTraceRouting\u0026\u0026this._getConnectedPorts().length\u003e0)return;const n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getSubcircuit().selectOne(`net.${this._getNetName()}`),i=this._getAnchorSide(),r=j7({anchor_position:n,anchor_side:i,text:e.net}),s=t.schematic_net_label.insert({text:e.net,source_net_id:o.source_net_id,anchor_position:n,center:r,anchor_side:i,schematic_sheet_id:this._resolveSchematicSheetId()});this.source_net_label_id=s.source_net_id,this.schematic_net_label_id=s.schematic_net_label_id}_resolveConnectsTo(){const{_parsedProps:t}=this,e=t.connectsTo??t.connection;if(Array.isArray(e))return e;if(typeof e==\"string\")return[e]}_getNetName(){const{_parsedProps:t}=this;return t.net}doInitialCreateNetsFromProps(){const{_parsedProps:t}=this;t.net\u0026\u0026Hj(this,[`net.${t.net}`])}doInitialCreateTracesFromNetLabels(){const t=this._resolveConnectsTo();if(t)for(const e of t)this.add(new t1({from:e,to:`net.${this._getNetName()}`}))}doInitialSchematicTraceRender(){if(!this.root?._featureMspSchematicTraceRouting||this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor()||this._parsedProps.inline)return;const{schX:t,schY:e}=this._parsedProps;if(t===void 0\u0026\u0026e===void 0)return;const{db:n}=this.root,o=this._resolveConnectsTo();if(!o||o.length===0)return;const i=this._getGlobalSchematicPositionBeforeLayout(),r=this._getAnchorSide(),a={left:\"x-\",right:\"x+\",top:\"y+\",bottom:\"y-\"}[r],A=this.getSubcircuit().selectOne(`net.${this._getNetName()}`);for(const c of o){const l=this.getSubcircuit().selectOne(c,{type:\"port\"});if(!l||!l.schematic_port_id)continue;let u=!1;if(A?.source_net_id){const f=n.source_trace.list().find(I=\u003eI.connected_source_net_ids?.includes(A.source_net_id)\u0026\u0026I.connected_source_port_ids?.includes(l.source_port_id??\"\"));if(f\u0026\u0026(u=n.schematic_trace.list().some(I=\u003eI.source_trace_id===f.source_trace_id)),u)continue}const g=l._getGlobalSchematicPositionAfterLayout(),h=D0e(l.facingDirection??\"right\")??\"x+\",d=wF({x:g.x,y:g.y,facingDirection:h},{x:i.x,y:i.y,facingDirection:a});if(!Array.isArray(d)||d.length\u003c2)continue;const p=[];for(let f=0;f\u003cd.length-1;f++)p.push({from:{x:d[f].x,y:d[f].y},to:{x:d[f+1].x,y:d[f+1].y}});let m,_;if(A?.source_net_id\u0026\u0026l.source_port_id){const f=n.source_trace.list().find(I=\u003eI.connected_source_net_ids?.includes(A.source_net_id)\u0026\u0026I.connected_source_port_ids?.includes(l.source_port_id));m=f?.source_trace_id,_=f?.subcircuit_connectivity_map_key||n.source_net.get(A.source_net_id)?.subcircuit_connectivity_map_key}n.schematic_trace.insert({source_trace_id:m,edges:p,junctions:[],subcircuit_connectivity_map_key:_,schematic_sheet_id:this._resolveSchematicSheetId()}),n.schematic_port.update(l.schematic_port_id,{is_connected:!0})}}},xMe=t=\u003e{const e=[...new Set(t.flatMap(s=\u003es._getDirectlyConnectedTraces()))],n=e.find(s=\u003es._parsedProps.schDisplayLabel)?._parsedProps.schDisplayLabel??e.find(s=\u003es._parsedProps.displayName)?._parsedProps.displayName??e.find(s=\u003es._parsedProps.name)?._parsedProps.name;if(n)return{name:n,wasAssignedDisplayLabel:!0};const o=t.find(s=\u003es.root)?.root?.db,i=t.map(s=\u003es.source_port_id).filter(s=\u003e!!s);return{name:(o?Vwe(o,i):t.map(s=\u003es._getNetLabelText()).filter(s=\u003e!!s).sort((s,a)=\u003es.localeCompare(a,void 0,{numeric:!0,sensitivity:\"base\"}))[0])??\"\",wasAssignedDisplayLabel:!1}},mTt=(t,e,n)=\u003e{const o=t.get(e);o?o.push(n):t.set(e,[n])},EMe=t=\u003e{const{db:e}=t.root,n=new Map,o=new Map,i=new Map,r=new Map;for(const s of e.source_net.list())s.subcircuit_connectivity_map_key\u0026\u0026n.set(s.subcircuit_connectivity_map_key,s);for(const s of t.selectAll(\"port\")){const a=s._getSubcircuitConnectivityKey();a\u0026\u0026mTt(o,a,s)}for(const s of e.source_port.list())s.subcircuit_connectivity_map_key\u0026\u0026mTt(i,s.subcircuit_connectivity_map_key,s.source_port_id);return({subcircuitConnectivityMapKey:s})=\u003e{const a=r.get(s);if(a)return a;const A=n.get(s);if(A?.name){const u={name:A.name,wasAssignedDisplayLabel:!0};return r.set(s,u),u}const c=xMe(o.get(s)??[]);if(c.name)return r.set(s,c),c;const l={name:Vwe(e,i.get(s)??[])??\"\",wasAssignedDisplayLabel:!1};return r.set(s,l),l}},Am=t=\u003et,NO=t=\u003et,mDo=vc(\"Group_doInitialSchematicTraceRender\"),_Do=\"rgb(132, 0, 0)\",fDo=-90;function IDo(t){const{group:e,solver:n,userNetIdToConnKey:o,sourceTraceIdByPinPairKey:i,crossScopeSourceTraceIdBySchematicPortIdAndNetId:r}=t,{db:s}=e.root,a=n.inlineNetLabelSolver?.getOutput().inlineNetLabelPlacements??[];if(a.length===0)return;const A=EMe(e),c=n.mspConnectionPairSolver.globalConnMap;for(const l of a){const u=l.pinIds.map(Am),g=c.getIdsConnectedToNet(l.globalConnNetId).find(S=\u003eo.has(S)),h=u.length===1?r.get(u[0])?.get(l.netId??l.globalConnNetId):void 0,d=(h?s.source_trace.get(h)?.subcircuit_connectivity_map_key:void 0)??(g?o.get(g):void 0),p=l.netLabelText??(d?A({subcircuitConnectivityMapKey:d}).name:l.netId??l.globalConnNetId);if(!p){mDo(`skipping inline net label for \"${l.netId}\" REASON:no resolvable text`);continue}let m=h??i.get([...u].sort().join(\"::\"));if(!m\u0026\u0026d){const S=u.flatMap(Q=\u003e{const w=s.schematic_port.get(Q)?.source_port_id;return w?[w]:[]});m=s.source_trace.list().find(Q=\u003eQ.subcircuit_connectivity_map_key===d\u0026\u0026S.some(w=\u003eQ.connected_source_port_ids.includes(w)))?.source_trace_id}let _=e._resolveSchematicSheetId();const f=s.schematic_port.get(u[0]);f?.schematic_sheet_id\u0026\u0026(_=f.schematic_sheet_id);let I={x:0,y:0},C=l.stubTracePath?.map(S=\u003e({...S}));if(C\u0026\u0026u.length===1){const S=s.schematic_port.get(u[0])?.center;S\u0026\u0026(I={x:S.x-C[0].x,y:S.y-C[0].y},C=C.map(Q=\u003e({x:Q.x+I.x,y:Q.y+I.y})))}const y={x:l.anchorPoint.x+I.x,y:l.anchorPoint.y+I.y},x={x:l.center.x+I.x,y:l.center.y+I.y};let E=\"center\";const B=l.height/2;switch(l.side){case\"y+\":x.y=y.y+B;break;case\"y-\":x.y=y.y-B;break;case\"x+\":x.x=y.x+B;break;case\"x-\":x.x=y.x-B;break}if(C\u0026\u0026C.length===2){const[S,Q]=C;if(l.axis===\"x\"){const w=Q.x\u003eS.x;E=w?\"left\":\"right\",x.x+=w?-l.width/2:l.width/2}else{const w=Q.y\u003eS.y;E=w?\"left\":\"right\",x.y+=w?-l.width/2:l.width/2}}C\u0026\u0026C.length===2\u0026\u0026(s.schematic_trace.insert({source_trace_id:m,edges:[{from:C[0],to:C[1]}],junctions:[],subcircuit_connectivity_map_key:d,schematic_sheet_id:_}),s.schematic_port.update(u[0],{is_connected:!0})),s.schematic_text.insert({text:p,source_trace_id:m,anchor:E,position:x,rotation:l.axis===\"y\"?fDo:0,font_size:l.height,color:_Do,schematic_sheet_id:_})}}var CDo=.18,_Tt=({center:t,text:e})=\u003e{const o=vb({text:e})/2,i=CDo/2;return{minX:t.x-o,maxX:t.x+o,minY:t.y-i,maxY:t.y+i}},yDo=t=\u003e{switch(t){case\"x+\":return\"left\";case\"x-\":return\"right\";case\"y+\":return\"bottom\";case\"y-\":return\"top\";case\"left\":return\"right\";case\"top\":return\"bottom\";case\"right\":return\"left\";case\"bottom\":return\"top\"}},_$=vc(\"Group_doInitialSchematicTraceRender\"),fTt=(t,e)=\u003et.schematicNetLabel.source_net_id!=null\u0026\u0026t.schematicNetLabel.source_net_id===e.source_net_id,xDo=(t,e)=\u003efTt(t,e.sourceNet)?t.schematicPortIds.some(n=\u003ee.schematicPortIds.has(n))?!0:t.schematicNetLabel.center?z4(_Tt({center:t.schematicNetLabel.center,text:t.schematicNetLabel.text}),e.bounds):!1:!1;function EDo(t){const{group:e,routedSchematicPortIdBySchematicPortId:n,solver:o,connKeyToSourceNet:i,userNetIdToConnKey:r,crossScopeSourceTraceIdBySchematicPortIdAndNetId:s,sourceTraceIdByPortOnlyLabelSchematicPortId:a,connKeysWithExplicitPortNetTraces:A,schematicPortIdsWithPreExistingNetLabels:c,schematicPortIdsWithRoutedTraces:l,netLabels:u}=t,{db:g}=e.root,h=EMe(e),d=o.inlineNetLabelSolver?.getOutput().netLabelPlacements??o.netLabelNetLabelCollisionSolver?.getOutput().netLabelPlacements??o.netLabelTraceCollisionSolver?.getOutput().netLabelPlacements??o.netLabelPlacementSolver?.netLabelPlacements??o.traceLabelOverlapAvoidanceSolver?.getOutput().netLabelPlacements??[],p=[],m=new Set;for(const x of d){const E=[...x.pinIds??[]].sort(),B=`${x.globalConnNetId}|${E.join(\"::\")}|${x.netId??\"\"}`;if(m.has(B)){_$(`skipping duplicate placement for \"${x.netId}\" REASON:identical net label placement`);continue}m.add(B),p.push(x)}const _=new Map,f=new Map,I=new Set;for(const x of p)_.set(x.globalConnNetId,(_.get(x.globalConnNetId)??0)+1),(x.pinIds?.length??0)\u003e1\u0026\u0026(f.has(x.globalConnNetId)||f.set(x.globalConnNetId,new Set),f.get(x.globalConnNetId).add(x.pinIds.slice().sort().join(\"::\"))),(x.pinIds?.length??0)\u003c=1\u0026\u0026I.add(x.globalConnNetId);const C=o.mspConnectionPairSolver.globalConnMap,y=u.map(x=\u003e{if(!x.schematic_net_label_id)return null;const E=g.schematic_net_label.get(x.schematic_net_label_id);return E?{schematicNetLabel:E,schematicPortIds:x._getConnectedPorts().map(B=\u003eB.schematic_port_id).filter(B=\u003e!!B).map(B=\u003en.get(B)??B),shouldUseSchematicTraceSolver:x._parsedProps.schX===void 0\u0026\u0026x._parsedProps.schY===void 0}:null}).filter(x=\u003ex!==null);for(const x of p){_$(`processing placement: ${x.netId}`);const E=x.pinIds.map(Am),S=(E.length===1?s.get(E[0])?.get(x.netId??x.globalConnNetId):void 0)??(E.length===1?a.get(E[0]):void 0),Q=S?g.source_trace.get(S):void 0,w=C.getIdsConnectedToNet(x.globalConnNetId).find(ge=\u003er.get(ge)),M=Q?.subcircuit_connectivity_map_key??r.get(w),k=x.orientation,R=yDo(k);let F;M\u0026\u0026(F=i.get(M));const O=M?h({subcircuitConnectivityMapKey:M}):{name:x.netId??x.globalConnNetId,wasAssignedDisplayLabel:!1},U=x.netLabelText?{name:x.netLabelText,wasAssignedDisplayLabel:!0}:O;let Y=e._resolveSchematicSheetId();const W=g.schematic_port.get(E[0]);W?.schematic_sheet_id\u0026\u0026(Y=W.schematic_sheet_id);let te=x.anchorPoint;if(E.length===1\u0026\u0026E[0]){const ge=g.schematic_port.get(E[0]);ge?.center\u0026\u0026!ge.is_connected\u0026\u0026(te=ge.center)}if(E.some(ge=\u003ec.has(ge))){_$(`skipping net label placement for \"${x.netId}\" REASON:schematic port has pre-existing net label`);continue}if(F){const ge=F.is_ground||F.is_power,_e=A.has(M),ue=E.some(Qe=\u003el.has(Qe)),fe=(_.get(x.globalConnNetId)??0)\u003c=1;if(!_e\u0026\u0026!ge\u0026\u0026ue\u0026\u0026fe){_$(`skipping net label placement for \"${x.netId}\" REASON:schematic port has routed trace`);continue}const ye=U.name,Me=j7({anchor_position:te,anchor_side:R,text:ye}),ve=y.find(Qe=\u003eQe.shouldUseSchematicTraceSolver\u0026\u0026fTt(Qe,F)\u0026\u0026Qe.schematicPortIds.some(Pe=\u003eE.includes(Pe)));if(ve){g.schematic_net_label.update(ve.schematicNetLabel.schematic_net_label_id,{anchor_position:te,center:Me,anchor_side:R,schematic_sheet_id:Y,source_trace_id:S});continue}if(!ge){const Qe={sourceNet:F,schematicPortIds:new Set(E),bounds:_Tt({center:Me,text:ye})};if(y.some(Pe=\u003exDo(Pe,Qe)))continue}const he={text:ye,source_net_id:F.source_net_id,anchor_position:te,center:Me,anchor_side:R,schematic_sheet_id:Y,source_trace_id:S};g.schematic_net_label.insert(he);continue}const{name:j,wasAssignedDisplayLabel:J}=U,ie=(x.pinIds?.length??0)\u003e1\u0026\u0026(I.has(x.globalConnNetId)||(f.get(x.globalConnNetId)?.size??0)\u003e1);if(!J\u0026\u0026!ie\u0026\u0026E.some(ge=\u003el.has(ge))){_$(`skipping net label placement for \"${x.netId}\" REASON:schematic port has routed traces and no display label`);continue}const ne=j7({anchor_position:te,anchor_side:R,text:j}),le={text:j,source_net_id:M??x.netId??x.globalConnNetId,anchor_position:te,center:ne,anchor_side:R,schematic_sheet_id:Y,source_trace_id:S};g.schematic_net_label.insert(le)}}var Pue=(t,e,n,o)=\u003et*o-e*n;function ITt(t,e,n,o,i){const r={x:e.x-t.x,y:e.y-t.y},s={x:o.x-n.x,y:o.y-n.y},a=Pue(r.x,r.y,s.x,s.y),A={x:n.x-t.x,y:n.y-t.y},c=Pue(A.x,A.y,r.x,r.y);if(Math.abs(a)\u003ci\u0026\u0026Math.abs(c)\u003ci||Math.abs(a)\u003ci\u0026\u0026Math.abs(c)\u003e=i)return null;const l=Pue(A.x,A.y,s.x,s.y)/a,u=Pue(A.x,A.y,r.x,r.y)/a;return l\u003c-i||l\u003e1+i||u\u003c-i||u\u003e1+i?null:{x:t.x+l*r.x,y:t.y+l*r.y}}var Ew=1e-6;function CTt(t){const e=Math.abs(t.to.x-t.from.x),n=Math.abs(t.to.y-t.from.y);return e\u003e=n}function uR(t,e){return Math.hypot(e.x-t.x,e.y-t.y)}function gR(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}}function RO(t,e,n){const o=uR(t,e);if(o\u003cEw)return 0;const i=((n.x-t.x)*(e.x-t.x)+(n.y-t.y)*(e.y-t.y))/((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y));return Math.max(0,Math.min(1,i))*o}function yTt(t,e=Ew){if(t.length===0)return t;t.sort((i,r)=\u003ei.start-r.start);const n=[];let o={...t[0]};for(let i=1;i\u003ct.length;i++){const r=t[i];r.start\u003c=o.end+e?o.end=Math.max(o.end,r.end):(n.push(o),o={...r})}return n.push(o),n}function BDo(t,e,n){const o=uR(t.from,t.to);if(o\u003cEw||e.length===0)return[t];const i=n/2,r=e.map(l=\u003e({start:Math.max(0,l-i),end:Math.min(o,l+i)})).filter(l=\u003el.end-l.start\u003eEw),s=yTt(r),a=[];let A=0;t.to.x-t.from.x,t.to.y-t.from.y;const c=(l,u,g)=\u003e{if(u-l\u003c=Ew)return;const h=l/o,d=u/o;a.push({from:gR(t.from,t.to,h),to:gR(t.from,t.to,d),...g?{is_crossing:!0}:{}})};for(const l of s)l.start-A\u003eEw\u0026\u0026c(A,l.start,!1),c(l.start,l.end,!0),A=l.end;return o-A\u003eEw\u0026\u0026c(A,o,!1),a.length\u003e0?a:[t]}function bDo(t,e={}){const n=e.crossSegmentLength??.075,o=e.tolerance??Ew,i=new Map,r=a=\u003e`${a.traceIdx}:${a.edgeIdx}`;for(let a=0;a\u003ct.length;a++){const A=t[a];for(let c=0;c\u003cA.edges.length;c++){const l=A.edges[c];for(let u=a;u\u003ct.length;u++){const g=t[u];for(let h=u===a?c+1:0;h\u003cg.edges.length;h++){const d=g.edges[h];if(A.connectivity_key!==void 0\u0026\u0026A.connectivity_key===g.connectivity_key)continue;const p=ITt(l.from,l.to,d.from,d.to,o);if(!p)continue;const m=uR(l.from,l.to),_=uR(d.from,d.to);if(m\u003co||_\u003co)continue;const f=RO(l.from,l.to,p),I=RO(d.from,d.to,p),C=f\u003c=o||Math.abs(m-f)\u003c=o||Number.isNaN(f),y=I\u003c=o||Math.abs(_-I)\u003c=o||Number.isNaN(I);if(!C\u0026\u0026!y){const x=CTt(l),E=CTt(d);let B;if(x!==E)B=x;else{const w=Math.abs(l.to.x-l.from.x),M=Math.abs(l.to.y-l.from.y),k=Math.abs(d.to.x-d.from.x),R=Math.abs(d.to.y-d.from.y),F=w-M,O=k-R;B=F===O?!0:F\u003eO}const S=r({traceIdx:B?a:u,edgeIdx:B?c:h}),Q=i.get(S)??[];Q.push(B?f:I),i.set(S,Q)}}}}}const s=t.map(a=\u003e({source_trace_id:a.source_trace_id,connectivity_key:a.connectivity_key,edges:[]}));for(let a=0;a\u003ct.length;a++){const A=t[a];for(let c=0;c\u003cA.edges.length;c++){const l=r({traceIdx:a,edgeIdx:c}),u=i.get(l)??[];if(u.length===0){s[a].edges.push(A.edges[c]);continue}const g=Array.from(new Set(u.map(d=\u003eNumber(d.toFixed(6))))).sort((d,p)=\u003ed-p),h=BDo(A.edges[c],g,n);s[a].edges.push(...h)}}return s}var QB=1e-6;function Mue(t,e,n=QB){return Math.abs(t-e)\u003c=n}function Bw(t,e,n=QB){return Mue(t.x,e.x,n)\u0026\u0026Mue(t.y,e.y,n)}function xTt(t,e,n,o=QB){const i=Math.min(e.x,n.x)-o,r=Math.max(e.x,n.x)+o,s=Math.min(e.y,n.y)-o,a=Math.max(e.y,n.y)+o;return t.x\u003ci||t.x\u003er||t.y\u003cs||t.y\u003ea?!1:Math.abs((n.x-e.x)*(t.y-e.y)-(n.y-e.y)*(t.x-e.x))\u003c=o}function ETt(t,e=QB){const n=new Map;for(const o of t){const i=`${o.x.toFixed(6)},${o.y.toFixed(6)}`;n.has(i)||n.set(i,o)}return Array.from(n.values())}function BTt(t){return{x:t.to.x-t.from.x,y:t.to.y-t.from.y}}function bTt(t,e,n=QB){return Bw(t,e.from,n)||Bw(t,e.to,n)}function BMe(t,e,n=QB){const o=BTt(t),i=BTt(e),r=Math.hypot(o.x,o.y),s=Math.hypot(i.x,i.y);if(r\u003cn||s\u003cn)return!0;const a=o.x*i.y-o.y*i.x;return Math.abs(a)\u003c=n*r*s}function f$(t,e,n=QB){return t.edges.filter(o=\u003eBw(o.from,e,n)||Bw(o.to,e,n))}function STt(t,e,n=QB){for(const o of t.edges){if(Bw(o.from,e,n))return o.from;if(Bw(o.to,e,n))return o.to}return null}function SDo(t,e,n=QB){const o=Bw(t.from,e,n)||Mue(t.from.x,e.x,n)\u0026\u0026Mue(t.from.y,e.y,n)?t.to:t.from,i=o.x-e.x,r=o.y-e.y;return Math.abs(i)\u003cn\u0026\u0026Math.abs(r)\u003cn?null:Math.abs(i)\u003e=Math.abs(r)?i\u003e=0?\"right\":\"left\":r\u003e=0?\"up\":\"down\"}function TO(t,e,n=QB){const o=f$(t,e,n);if(o.length\u003c2)return null;const i=o.map(u=\u003eSDo(u,e,n)),r=i.includes(\"up\"),s=i.includes(\"down\"),a=i.includes(\"left\"),A=i.includes(\"right\"),c=r?\"up\":s?\"down\":null,l=A?\"right\":a?\"left\":null;return c\u0026\u0026l?`${c}-${l}`:null}function QDo(t,e={}){const n=e.tolerance??QB,o={};for(const r of t)o[r.source_trace_id]=[];const i=t.map(r=\u003e{const s=[];for(const a of r.edges)s.push(a.from,a.to);return ETt(s,n)});for(let r=0;r\u003ct.length;r++){const s=t[r],a=i[r];for(let A=r+1;A\u003ct.length;A++){const c=t[A],l=i[A];if(s.connectivity_key!==void 0\u0026\u0026s.connectivity_key===c.connectivity_key){for(const g of s.edges)for(const h of c.edges){const d=ITt(g.from,g.to,h.from,h.to,n);d\u0026\u0026(bTt(d,g,n)||bTt(d,h,n)||(o[s.source_trace_id].push(d),s.source_trace_id!==c.source_trace_id\u0026\u0026o[c.source_trace_id].push(d)))}for(const g of a)for(const h of l)if(Bw(g,h,n)){const d=f$(s,g,n),p=f$(c,h,n),m=d.some(C=\u003ep.some(y=\u003e!BMe(C,y,n))),_=TO(s,g,n),f=TO(c,h,n);m\u0026\u0026!(_!==null\u0026\u0026f!==null\u0026\u0026_===f)\u0026\u0026(o[s.source_trace_id].push(g),s.source_trace_id!==c.source_trace_id\u0026\u0026o[c.source_trace_id].push(h))}for(const g of a)for(const h of c.edges)if(xTt(g,h.from,h.to,n)){const p=f$(s,g,n).some(C=\u003e!BMe(C,h,n)),m=TO(s,g,n),_=STt(c,g,n*1e3),f=_?TO(c,_,n):null;p\u0026\u0026!(m!==null\u0026\u0026f!==null\u0026\u0026m===f)\u0026\u0026(o[s.source_trace_id].push(g),s.source_trace_id!==c.source_trace_id\u0026\u0026o[c.source_trace_id].push(g))}for(const g of l)for(const h of s.edges)if(xTt(g,h.from,h.to,n)){const p=f$(c,g,n).some(C=\u003e!BMe(h,C,n)),m=TO(c,g,n),_=STt(s,g,n*1e3),f=_?TO(s,_,n):null;p\u0026\u0026!(f!==null\u0026\u0026m!==null\u0026\u0026f===m)\u0026\u0026(o[c.source_trace_id].push(g),s.source_trace_id!==c.source_trace_id\u0026\u0026o[s.source_trace_id].push(g))}}}}for(const r of Object.keys(o))o[r]=ETt(o[r],n);return o}var bw=1e-6;function vDo(t,e,n=bw){const o=t.to.x-t.from.x,i=t.to.y-t.from.y,r=e.to.x-e.from.x,s=e.to.y-e.from.y,a=Math.hypot(o,i),A=Math.hypot(r,s);if(a\u003c=n||A\u003c=n)return!1;const c=o*s-i*r;if(Math.abs(c)\u003en*a*A)return!1;const l=o*(e.from.y-t.from.y)-i*(e.from.x-t.from.x);return Math.abs(l)\u003c=n*a}function wDo(t,e){const n=yTt(e);if(n.length===0)return[t];const o=uR(t.from,t.to);if(o\u003c=bw)return[t];const i=[];let r=0;for(const s of n)s.start-r\u003ebw\u0026\u0026i.push({from:gR(t.from,t.to,r/o),to:gR(t.from,t.to,s.start/o)}),s.end-s.start\u003ebw\u0026\u0026i.push({from:gR(t.from,t.to,s.start/o),to:gR(t.from,t.to,s.end/o),is_crossing:!0}),r=Math.max(r,s.end);return o-r\u003ebw\u0026\u0026i.push({from:gR(t.from,t.to,r/o),to:t.to}),i}function PDo(t){const e=new Map;for(let n=0;n\u003ct.length;n++){const o=t[n];if(o.connectivity_key){for(const i of o.edges)if(!(!i.is_crossing||uR(i.from,i.to)\u003c=bw))for(let r=0;r\u003ct.length;r++){const s=t[r];if(!(r===n||s.connectivity_key!==o.connectivity_key))for(let a=0;a\u003cs.edges.length;a++){const A=s.edges[a],c=uR(A.from,A.to);if(A.is_crossing||c\u003c=bw||!vDo(A,i))continue;const l=Math.max(0,Math.min(RO(A.from,A.to,i.from),RO(A.from,A.to,i.to))),u=Math.min(c,Math.max(RO(A.from,A.to,i.from),RO(A.from,A.to,i.to)));if(u-l\u003c=bw)continue;const g=`${r}:${a}`,h=e.get(g)??[];h.push({start:l,end:u}),e.set(g,h)}}}}return e.size===0?t:t.map((n,o)=\u003e({...n,edges:n.edges.flatMap((i,r)=\u003e{const s=e.get(`${o}:${r}`);return s?wDo(i,s):[i]})}))}var Due=vc(\"Group_doInitialSchematicTraceRender\"),MDo=1.5;function DDo(t,e){const{points:n,schematicPortIds:o,componentBoundsByPortId:i}=t,r=o.map(h=\u003e{const d=e.schematic_port.get(h)?.center,p=i.get(h);return!d||!p?null:{center:d,bounds:p}}).filter(h=\u003e!!h);if(r.length===0)return n;const s=n.map(h=\u003e({x:h.x,y:h.y})),a=(h,d)=\u003e(h.x-d.x)**2+(h.y-d.y)**2,A=new Set;for(let h=0;h\u003cr.length;h++)s.some(d=\u003ea(r[h].center,d)\u003c=1e-12)\u0026\u0026A.add(h);const c=.001,l=[\"start\",\"end\"],u=[];for(const h of l){const d=h===\"start\"?s[0]:s[s.length-1];for(let p=0;p\u003cr.length;p++){if(A.has(p))continue;const{center:m,bounds:_}=r[p],f=a(m,d);Math.abs(m.x-d.x)\u003ec\u0026\u0026Math.abs(m.y-d.y)\u003ec||f\u003eMDo**2\u0026\u0026BQn(d,_)\u003ec||u.push({endpoint:h,centerIndex:p,dist:f})}}u.sort((h,d)=\u003eh.dist-d.dist);const g=new Set;for(const{endpoint:h,centerIndex:d,dist:p}of u){if(g.has(h)||A.has(d)||(A.add(d),g.add(h),p\u003c=1e-12))continue;const m=r[d].center;h===\"start\"?s.unshift({x:m.x,y:m.y}):s.push({x:m.x,y:m.y})}return s}function NDo(t){const{group:e,solver:n,userNetIdToConnKey:o,schematicPortIdsWithPreExistingNetLabels:i}=t,{db:r}=e.root,s=new Set(e.selectAll(\"port\").filter(_=\u003e{if(!_._getSymbolAncestor())return!1;const f=_.getParentNormalComponent()?._parsedProps.symbol;return ee.isValidElement(f)||aPe(f)}).map(_=\u003e_.schematic_port_id).filter(_=\u003e_!=null).map(Am)),a=new Map;for(const _ of r.schematic_component.list()){const f=vue({db:r,schematicComponent:_}),I=Ey({center:_.center,width:_.size.width,height:_.size.height});for(const C of r.schematic_port.list({schematic_component_id:_.schematic_component_id})){const y=C.center.x\u003eI.minX\u0026\u0026C.center.x\u003cI.maxX\u0026\u0026C.center.y\u003eI.minY\u0026\u0026C.center.y\u003cI.maxY,x=Am(C.schematic_port_id);!f\u0026\u0026!s.has(x)||!f\u0026\u0026y||a.set(x,f??I)}}const A=n.inlineNetLabelSolver?.getOutput().traces??n.sameNetJunctionAlignmentSolver?.getOutput().traces??n.netLabelTraceCollisionSolver?.getOutput().traces??n.traceCleanupSolver?.getOutput().traces??n.traceLabelOverlapAvoidanceSolver?.getOutput().traces??n.schematicTraceLinesSolver?.solvedTracePaths,c=[];Due(`Traces inside SchematicTraceSolver output: ${(A??[]).length}`);for(const _ of A??[]){const I=Array.from(new Set(_.pinIds??[])).map(Am);if(I.length\u003e0\u0026\u0026I.every(M=\u003ei.has(M))){Due(`Skipping solver netlabel-covered trace ${_?.mspPairId} because all schematic ports already have netlabels`);continue}const y=_?.tracePath;if(!Array.isArray(y)||y.length\u003c2){Due(`Skipping trace ${_?.pinIds.join(\",\")} because it has less than 2 points`);continue}const x=DDo({points:y,schematicPortIds:I,componentBoundsByPortId:a},r),E=[];for(let M=0;M\u003cx.length-1;M++)E.push({from:{x:x[M].x,y:x[M].y},to:{x:x[M+1].x,y:x[M+1].y}});const B=String(_?.mspPairId);let S;if(Array.isArray(_?.pins)\u0026\u0026_.pins.length===2){const M=_.pins[0]?.pinId,k=_.pins[1]?.pinId,R=M?Am(M):void 0,F=k?Am(k):void 0;if(R\u0026\u0026F){const O=new Set([R,F]);for(const U of O)r.schematic_port.update(U,{is_connected:!0});S=o.get(String(_.userNetId))}}if(S||(S=o.get(String(_.userNetId))),!S){const M=I.map(R=\u003e{const O=r.schematic_port.get(R)?.source_port_id;if(O)return r.source_port.get(O)?.subcircuit_connectivity_map_key}).filter(R=\u003e!!R);new Set(M).size===1\u0026\u0026(S=M[0])}const Q=new Set(I.map(M=\u003er.schematic_port.get(M)?.schematic_sheet_id).filter(M=\u003e!!M));let w;Q.size===1?w=Q.values().next().value:Q.size===0\u0026\u0026(w=e._resolveSchematicSheetId()),c.push({source_trace_id:B,edges:E,subcircuit_connectivity_map_key:S,schematic_sheet_id:w})}Due(`Applying ${c.length} traces from SchematicTraceSolver output`);const l=bDo(c.map(_=\u003e({source_trace_id:_.source_trace_id,edges:_.edges,connectivity_key:_.subcircuit_connectivity_map_key}))),u=[],g=e._resolveSchematicSheetId();for(const _ of r.schematic_trace.list()){if(_.edges.length===0||_.schematic_sheet_id!==g)continue;const f=_.source_trace_id?r.source_trace.get(_.source_trace_id):void 0;u.push({schematic_trace_id:_.schematic_trace_id,source_trace_id:_.source_trace_id??_.schematic_trace_id,edges:_.edges,connectivity_key:_.subcircuit_connectivity_map_key??f?.subcircuit_connectivity_map_key})}const h=PDo([...l,...u]),d=h.slice(0,l.length),p=h.slice(l.length);for(const _ of p)_.schematic_trace_id\u0026\u0026r.schematic_trace.update(_.schematic_trace_id,{edges:_.edges});const m=QDo([...d,...p]);for(const _ of d){const f=c.find(C=\u003eC.source_trace_id===_.source_trace_id);let I=g;f?.schematic_sheet_id\u0026\u0026(I=f.schematic_sheet_id),r.schematic_trace.insert({source_trace_id:_.source_trace_id,edges:_.edges,junctions:m[_.source_trace_id]??[],subcircuit_connectivity_map_key:f?.subcircuit_connectivity_map_key,schematic_sheet_id:I})}}var QTt=.12,vTt=(t,e)=\u003e{t.anchoredNetLabelWidth??=Number(vb({text:e}).toFixed(2)),t.allowInlineNetLabel=!0,t.inlineNetLabelHeight=QTt,t.inlineNetLabelWidth=Number(vb({text:e,font_size:QTt}).toFixed(2))},RDo=({directConnections:t,netConnections:e,connKeyToSchematicPortIds:n,connKeyToSourceNet:o,connKeysWithExplicitPortNetTraces:i,schematicPortIdsWithExplicitNetLabels:r,schematicPortIdsWithInlineNetLabels:s,areSchematicPortsOnDifferentComponents:a,resolveCanonicalNetLabelText:A})=\u003e{for(const c of t){const{connKey:l}=c;if(!l||n.get(l)?.length!==2)continue;const g=o.get(l);if(g?.is_power||g?.is_ground)continue;const{name:h,wasAssignedDisplayLabel:d}=A({subcircuitConnectivityMapKey:l});!h||!d||vTt(c,h)}for(const c of e){const{schematicPortIds:l}=c,{isSameSheetCrossSectionConnection:u}=c,g=l.some(C=\u003es.has(C)),h=l.length===1,d=l[0],p=d!==void 0\u0026\u0026l.slice(1).some(C=\u003ea([d,C]));if(!g\u0026\u0026!u\u0026\u0026!h\u0026\u0026!p||!g\u0026\u0026l.some(C=\u003er.has(C)))continue;const{connKey:m}=c;if(!m\u0026\u0026!u||m\u0026\u0026!u\u0026\u0026!i.has(m))continue;const _=m?o.get(m):void 0;if(!g\u0026\u0026(c.isPowerOrGroundConnection||_?.is_power||_?.is_ground))continue;let f=c.netLabelText??\"\",I=!!f;if(!u){if(!m)continue;const C=A({subcircuitConnectivityMapKey:m});f=C.name,I=C.wasAssignedDisplayLabel}!f||!g\u0026\u0026!I||vTt(c,f)}},TDo=t=\u003e{const{schX:e,schY:n}=t._parsedProps;if(e!==void 0\u0026\u0026n!==void 0||!t.getParentNormalComponent()?.getSchematicSymbol())return t;const o=t._getPortsInternallyConnectedToThisPort(),i=t.schematicSymbolPortDef??o.find(r=\u003er.schematicSymbolPortDef)?.schematicSymbolPortDef;return i?o.find(r=\u003er.schematicSymbolPortDef===i)??t:t};function kDo(t){const{db:e}=t.root,n=new Map;for(const o of t.selectAll(\"port\")){if(!o.schematic_port_id)continue;const i=e.schematic_port.get(o.schematic_port_id),r=TDo(o),s=r.schematic_port_id?e.schematic_port.get(r.schematic_port_id):void 0;!i||!s||i.schematic_component_id!==s.schematic_component_id||i.schematic_sheet_id!==s.schematic_sheet_id||n.set(Am(i.schematic_port_id),Am(s.schematic_port_id))}return n}var wTt=({db:t,sourcePortId:e,otherSourcePortId:n,sourcePortIdsInSchematicScope:o,schematicSheetId:i})=\u003e{if(o.has(n))return!1;const r=t.source_port.get(e),s=t.source_port.get(n);if(!r||!s)return!1;if(r.subcircuit_id!==s.subcircuit_id)return!0;if(!i)return!1;const a=t.schematic_port.list({source_port_id:n});return a.some(c=\u003ec.schematic_sheet_id===i)?!1:a.some(c=\u003ec.schematic_sheet_id!==void 0)},PTt=({db:t,sourcePortId:e,sourcePortIdsInSchematicScope:n,schematicSheetId:o})=\u003e{if(t.source_port.get(e))for(const i of t.source_trace.list()){const r=(i.connected_source_port_ids??[]).map(NO);if(r.length!==2||(i.connected_source_net_ids??[]).length\u003e0||!r.includes(e))continue;const s=r.find(a=\u003ea!==e);if(s\u0026\u0026wTt({db:t,sourcePortId:e,otherSourcePortId:s,sourcePortIdsInSchematicScope:n,schematicSheetId:o}))return s}},MTt=({group:t,sourcePortId:e,connectedSourcePortIdsForKey:n,sourcePortIdsInSchematicScope:o,schematicSheetId:i,connKey:r,sourceNet:s})=\u003e{const{db:a}=t.root,A=t.selectAll(\"port\").filter(m=\u003em._getSubcircuitConnectivityKey()===r),{name:c,wasAssignedDisplayLabel:l}=xMe(A),u=l?c:void 0,g=l?void 0:c||void 0,h=Vwe(a,n),d=PTt({db:a,sourcePortId:e,sourcePortIdsInSchematicScope:o,schematicSheetId:i}),p=d?xMt(a,d):void 0;return{text:s?.name||s?.source_net_id||u||p||g||h||r,wasAssignedDisplayLabel:l,directConnectionOutsideSchematicScopeSourcePortId:d}},FDo=.18;function LDo(t){const e=t.font_size??FDo,n=ATt({text:t.text??\"\",fontSize:e}),o=e,i=t.anchor??\"center\";let r,s;i.includes(\"left\")?(r=0,s=n):i.includes(\"right\")?(r=-n,s=0):(r=-n/2,s=n/2);let a,A;i.includes(\"top\")?(a=-o,A=0):i.includes(\"bottom\")?(a=0,A=o):(a=-o/2,A=o/2);const c=(t.rotation??0)*Math.PI/180,l=Math.cos(c),u=Math.sin(c),g=[{x:r,y:a},{x:r,y:A},{x:s,y:a},{x:s,y:A}].map(h=\u003e({x:t.position.x+h.x*l-h.y*u,y:t.position.y+h.x*u+h.y*l}));return Oh(g)}var HDo=.01,bMe=.06;function ODo(t,e){return e?t.text===e.display_name||t.text===e.name:!1}function GDo(t,e={}){if(!t.text)return null;const n=LDo(t);if(ODo(t,e.sourceComponent)\u0026\u0026e.schematicComponent?.center\u0026\u0026e.schematicComponent?.size){const o=Ey({center:e.schematicComponent.center,width:e.schematicComponent.size.width,height:e.schematicComponent.size.height}),i=n.maxY-n.minY;n.minY\u003eo.maxY\u0026\u0026(n.minX-=bMe,n.maxX+=bMe,n.minY=o.maxY-HDo,n.maxY=o.maxY+i+bMe)}return{chipId:t.schematic_component_id,center:oD(n),width:n.maxX-n.minX,height:n.maxY-n.minY,text:t.text}}var DTt=2.4,YDo=.42;function UDo(t,e={}){const{db:n}=t.root,o=kDo(t),i=Qe=\u003eo.get(Qe)??Qe,r=Mxe(n.toArray()),s=Qe=\u003e{const Pe=[...r.getIdsConnectedToNet(Qe)].sort()[0];return Pe?`source_connectivity_${Pe}`:`source_${Qe}`},a=Qe=\u003e{const Pe=[...Qe.connected_source_port_ids,...Qe.connected_source_net_ids].map(we=\u003er.getNetConnectedToId(we)).find(we=\u003e!!we);return Pe?s(Pe):Qe.subcircuit_connectivity_map_key??Qe.source_trace_id},A=new Set;for(const Qe of n.source_net.list()){if(!Qe.is_power\u0026\u0026!Qe.is_ground)continue;const Pe=r.getNetConnectedToId(Qe.source_net_id);Pe\u0026\u0026A.add(s(Pe))}const c=new Map,l=[],u=[...t.children].reverse();for(;u.length\u003e0;){const Qe=u.pop();if(Qe instanceof A6){if(Qe.isSubcircuit){Qe._parsedProps.showAsSchematicBox\u0026\u0026l.push(Qe);continue}l.push(Qe)}u.push(...[...Qe.children].reverse())}const g=[t.schematic_group_id,...l.map(Qe=\u003eQe.schematic_group_id)],h=n.schematic_component.list().filter(Qe=\u003eg.includes(Qe.schematic_group_id)).filter(Qe=\u003ee.schematicSheetId===void 0||Qe.schematic_sheet_id===e.schematicSheetId),d=new Set(h.map(Qe=\u003eQe.schematic_component_id)),p=new Map(h.map(Qe=\u003e[Qe.schematic_component_id,Qe])),m=n.schematic_text.list().filter(Qe=\u003eQe.schematic_component_id\u0026\u0026d.has(Qe.schematic_component_id)).map(Qe=\u003e{const Pe=p.get(Qe.schematic_component_id);if(!Pe)return;const we=n.source_component.get(Pe.source_component_id);return GDo(Qe,{schematicComponent:Pe,sourceComponent:we})}).filter(Qe=\u003e!!Qe),_=new Map,f=t._getBoard()?.getDescendants()??[];for(const Qe of f){const Pe=Qe.schematic_component_id,we=Qe.getSchematicSectionName();Pe\u0026\u0026we\u0026\u0026_.set(Pe,we)}const I=[];for(const Qe of h){const Pe=Qe.schematic_component_id,Te=n.schematic_port.list({schematic_component_id:Qe.schematic_component_id}).filter(ke=\u003e{const Ce=Am(ke.schematic_port_id);return i(Ce)===Ce}).map(ke=\u003e{const Ce=Am(ke.schematic_port_id),Le=ke.source_port_id?n.source_port.get(ke.source_port_id):void 0;return{pinId:Ce,displayName:ke.display_pin_label??ke.pin_number?.toString()??Le?.name,x:ke.center.x,y:ke.center.y,_facingDirection:D0e(ke.facing_direction??null)}}),Re=_.get(Qe.schematic_component_id),Ee=vue({db:n,schematicComponent:Qe})??Ey({center:Qe.center,width:Qe.size.width,height:Qe.size.height});I.push({chipId:Pe,center:oD(Ee),width:Ee.maxX-Ee.minX,height:Ee.maxY-Ee.minY,pins:Te,sectionId:Re})}const C=new Set,y=new Map,x=new Map,E=new Map,B=new Map(t.selectAll(\"port\").filter(Qe=\u003eQe.schematic_port_id).map(Qe=\u003e[Am(Qe.schematic_port_id),Qe])),S=EMe(t);for(const Qe of h){const Pe=n.schematic_port.list({schematic_component_id:Qe.schematic_component_id});for(const we of Pe){const Te=Am(we.schematic_port_id);if(C.add(Te),we.source_port_id){const Re=NO(we.source_port_id);y.set(Te,Re),x.set(Re,Te)}}}const Q=new Set(x.keys()),w=(e.netLabels??[]).filter(Qe=\u003eQe._getConnectedPorts().some(Pe=\u003ePe.schematic_port_id?C.has(Am(Pe.schematic_port_id)):!1)),M=new Set(w.filter(Qe=\u003e!Qe._parsedProps.inline).flatMap(Qe=\u003eQe._getConnectedPorts()).map(Qe=\u003eQe.schematic_port_id).filter(Qe=\u003eQe!=null).map(Am).map(i)),k=new Set(w.filter(Qe=\u003eQe._parsedProps.inline||Qe._parsedProps.schX===void 0\u0026\u0026Qe._parsedProps.schY===void 0).flatMap(Qe=\u003eQe._getConnectedPorts()).map(Qe=\u003eQe.schematic_port_id).filter(Qe=\u003eQe!=null).map(Am).map(i)),R=new Set(w.filter(Qe=\u003eQe._parsedProps.inline).flatMap(Qe=\u003eQe._getConnectedPorts()).map(Qe=\u003eQe.schematic_port_id).filter(Qe=\u003eQe!=null).map(Am).map(i)),F=new Set;t.subcircuit_id\u0026\u0026F.add(t.subcircuit_id);for(const Qe of l)Qe.subcircuit_id\u0026\u0026F.add(Qe.subcircuit_id);const O=n.source_trace.list().filter(Qe=\u003e{if(Qe.subcircuit_id===t.subcircuit_id)return!0;for(const Pe of Qe.connected_source_port_ids)if(x.has(NO(Pe)))return!0;return!1}),U=new Set;for(const Qe of O)if(Qe.subcircuit_id!==t.subcircuit_id\u0026\u0026Qe.connected_source_net_ids.length!==0)for(const Pe of Qe.connected_source_port_ids){const we=NO(Pe),Te=x.get(we);!Te||k.has(Te)||!n.schematic_port.list({source_port_id:Pe}).some(Ee=\u003eEe.schematic_port_id===Te?!1:(Ee.schematic_component_id?n.schematic_component.get(Ee.schematic_component_id):void 0)?.schematic_sheet_id===e.schematicSheetId)||U.add(Te)}const Y=O.flatMap(Qe=\u003eQe.connected_source_net_ids);for(const Qe of Y){const Pe=n.source_net.get(Qe);Pe?.subcircuit_id\u0026\u0026F.add(Pe.subcircuit_id)}for(const Qe of n.source_net.list().filter(Pe=\u003e!Pe.subcircuit_id||F.has(Pe.subcircuit_id)))Qe.subcircuit_connectivity_map_key\u0026\u0026c.set(Qe.subcircuit_connectivity_map_key,Qe);const W=[],te=[],j=new Set,J=new Map,oe=new Map,ie=({schematicPortId:Qe,netId:Pe,sourceTraceId:we,replaceExisting:Te=!1})=\u003e{const Re=J.get(Qe)??new Map;return Re.has(Pe)\u0026\u0026!Te?!1:(Re.set(Pe,we),J.set(Qe,Re),!0)},ne=({sourceConnectivityNetId:Qe,schematicPortId:Pe,text:we,sourceTraceId:Te,connKey:Re,preferInScopeTraceMetadata:Ee=!1})=\u003e{const ke=Qe;if(ie({schematicPortId:Pe,netId:ke,sourceTraceId:Te,replaceExisting:Ee}),M.has(Pe))return;let Ce=oe.get(Qe);Ce?Ee\u0026\u0026(Ce.netLabelText=we,Ce.netLabelWidth=Number(vb({text:we}).toFixed(2)),Ce.connKey=Re??Ce.connKey):(Ce={netId:ke,netLabelText:we,schematicPortIds:[],netLabelWidth:Number(vb({text:we}).toFixed(2)),connKey:Re,isSameSheetCrossSectionConnection:!0,isPowerOrGroundConnection:A.has(ke)},oe.set(Qe,Ce),te.push(Ce)),Ce.schematicPortIds.includes(Pe)||Ce.schematicPortIds.push(Pe)},le=new Map,ge=new Map,_e=new Set;for(const Qe of O)Qe?.subcircuit_connectivity_map_key\u0026\u0026(Qe.connected_source_port_ids?.length??0)\u003e0\u0026\u0026(Qe.connected_source_net_ids?.length??0)\u003e0\u0026\u0026_e.add(Qe.subcircuit_connectivity_map_key);const ue=(Qe,Pe)=\u003e{const we=n.schematic_port.get(Qe),Te=n.schematic_port.get(Pe);if(!we||!Te||!(we.schematic_sheet_id===Te.schematic_sheet_id))return!1;const Ee=we.schematic_component_id?_.get(we.schematic_component_id):void 0,ke=Te.schematic_component_id?_.get(Te.schematic_component_id):void 0;return Ee!==ke\u0026\u0026(Ee!==void 0||ke!==void 0)},fe=({schematicPortId:Qe,otherSourcePortId:Pe})=\u003en.schematic_port.list({source_port_id:Pe}).some(we=\u003eue(Qe,Am(we.schematic_port_id)));for(const Qe of O){const Pe=Array.from(new Set((Qe.connected_source_port_ids??[]).map(ke=\u003ex.get(NO(ke))).filter(ke=\u003e!!ke\u0026\u0026C.has(ke)).map(i))),we=Pe.length===1?y.get(Pe[0]):void 0,Te=we?Qe.connected_source_port_ids.map(NO).find(ke=\u003eke!==we):void 0,Re=!!(we\u0026\u0026Te\u0026\u0026wTt({db:n,sourcePortId:we,otherSourcePortId:Te,sourcePortIdsInSchematicScope:Q,schematicSheetId:e.schematicSheetId})),Ee=!!(Pe.length===1\u0026\u0026Te\u0026\u0026fe({schematicPortId:Pe[0],otherSourcePortId:Te}));if(Pe.length===1\u0026\u0026Qe.connected_source_port_ids.length===2\u0026\u0026Re\u0026\u0026Qe.connected_source_net_ids.length===0\u0026\u0026Qe.subcircuit_connectivity_map_key){const ke=Pe[0],Ce=y.get(ke);if(Ce){const Le=Qe.subcircuit_connectivity_map_key,Ye=n.source_port.get(Ce)?.subcircuit_connectivity_map_key,tt=n.source_net.list().find(gt=\u003egt.subcircuit_id===t.subcircuit_id\u0026\u0026r.areIdsConnected(gt.source_net_id,Ce)),At=c.get(Le)??(Ye?c.get(Ye):void 0)??tt,at=Array.from(C).map(gt=\u003ey.get(gt)).filter(gt=\u003egt?n.source_port.get(gt)?.subcircuit_connectivity_map_key===Le:!1),{text:nt}=MTt({group:t,sourcePortId:Ce,connectedSourcePortIdsForKey:at,sourcePortIdsInSchematicScope:Q,schematicSheetId:e.schematicSheetId,connKey:Le,sourceNet:At});if(nt){const gt=a(Qe);E.has(gt)||E.set(gt,Le),Ee?ne({sourceConnectivityNetId:gt,schematicPortId:ke,text:nt,sourceTraceId:Qe.source_trace_id,connKey:Le}):ie({schematicPortId:ke,netId:gt,sourceTraceId:Qe.source_trace_id})\u0026\u0026te.push({netId:gt,netLabelText:nt,schematicPortIds:[ke],netLabelWidth:Number(vb({text:nt}).toFixed(2)),connKey:Le})}}}else if(Pe.length\u003e=2){for(const gt of Pe){const bt=le.get(gt)??new Set;bt.add(Qe.source_trace_id),le.set(gt,bt)}const ke=Qe.name??Qe.display_name,Ce=ke??Qe.source_trace_id;Qe.subcircuit_connectivity_map_key\u0026\u0026E.set(Ce,Qe.subcircuit_connectivity_map_key);const Le=t._parsedProps.schMaxTraceDistance??DTt,Ye=Pe.map(gt=\u003eB.get(gt)).filter(gt=\u003e!!gt),tt=Qe.subcircuit_connectivity_map_key?S({subcircuitConnectivityMapKey:Qe.subcircuit_connectivity_map_key}).name:xMe(Ye).name||ke,At=Pe.slice(1).some((gt,bt)=\u003e{const Ct=Pe[bt],Dt=n.schematic_port.get(Ct),kt=n.schematic_port.get(gt);return!Dt||!kt?!1:Math.sqrt((Dt.center.x-kt.center.x)**2+(Dt.center.y-kt.center.y)**2)\u003eLe}),at=tt\u0026\u0026At?Number(vb({text:tt}).toFixed(2)):void 0,nt=tt;for(let gt=0;gt\u003cPe.length-1;gt++){const bt=Pe[gt],Ct=Pe[gt+1],Dt=[bt,Ct].sort().join(\"::\");if(!j.has(Dt)){if(j.add(Dt),nt\u0026\u0026ue(bt,Ct)){const kt=a(Qe);Qe.subcircuit_connectivity_map_key\u0026\u0026E.set(kt,Qe.subcircuit_connectivity_map_key),ne({sourceConnectivityNetId:kt,schematicPortId:bt,text:nt,sourceTraceId:Qe.source_trace_id,connKey:Qe.subcircuit_connectivity_map_key,preferInScopeTraceMetadata:!0}),ne({sourceConnectivityNetId:kt,schematicPortId:Ct,text:nt,sourceTraceId:Qe.source_trace_id,connKey:Qe.subcircuit_connectivity_map_key,preferInScopeTraceMetadata:!0});continue}ge.set(Dt,Qe.source_trace_id),W.push({schematicPortIds:[bt,Ct],netId:Ce,netLabelWidth:at,connKey:Qe.subcircuit_connectivity_map_key})}}}}const pe=[...te],ye=new Map;for(const[Qe,Pe]of y){if(U.has(Qe))continue;const we=n.source_port.get(Pe);if(!we?.subcircuit_connectivity_map_key)continue;const Te=we.subcircuit_connectivity_map_key;ye.has(Te)||ye.set(Te,[]);const Re=i(Qe),Ee=ye.get(Te);Ee.includes(Re)||Ee.push(Re)}for(const[Qe,Pe]of ye){const we=c.get(Qe);if(we\u0026\u0026Pe.length\u003e=1){const Te=String(we.name||we.source_net_id||Qe);E.set(Te,Qe);const Re=Number(vb({text:String(Te)}).toFixed(2));let Ee=Re,ke;(we.is_ground||we.is_power)\u0026\u0026(Ee=YDo,ke=Re),pe.push({netId:Te,schematicPortIds:Pe,isGround:we.is_ground,netLabelWidth:Ee,netLabelHeight:ke,connKey:Qe})}}RDo({directConnections:W,netConnections:pe,connKeyToSchematicPortIds:ye,connKeyToSourceNet:c,connKeysWithExplicitPortNetTraces:_e,schematicPortIdsWithExplicitNetLabels:M,schematicPortIdsWithInlineNetLabels:R,areSchematicPortsOnDifferentComponents:Qe=\u003e{const Pe=Qe.map(we=\u003en.schematic_port.get(we)?.schematic_component_id);return Pe.every(we=\u003e!!we)\u0026\u0026Pe[0]!==Pe[1]},resolveCanonicalNetLabelText:S});const Me=(()=\u003e{const Qe={},Pe=new Set(pe.map(we=\u003ewe.netId));for(const we of n.source_net.list().filter(Te=\u003e!Te.subcircuit_id||F.has(Te.subcircuit_id)))we.name\u0026\u0026Pe.has(we.name)\u0026\u0026(we.is_ground?Qe[we.name]=[\"y-\"]:we.is_power?Qe[we.name]=[\"y+\"]:Qe[we.name]=[\"x-\",\"x+\"]);for(const{netId:we}of te)Qe[we]??=[\"x-\",\"x+\"];return Qe})(),ve={chips:I,directConnections:W.map(({schematicPortIds:Qe,connKey:Pe,...we})=\u003e({...we,pinIds:Qe})),netConnections:pe.map(({schematicPortIds:Qe,connKey:Pe,isSameSheetCrossSectionConnection:we,isPowerOrGroundConnection:Te,...Re})=\u003e({...Re,pinIds:Qe})),textBoxes:m,availableNetLabelOrientations:Me,maxMspPairDistance:t._parsedProps.schMaxTraceDistance??DTt},he=new Map(Array.from(le).flatMap(([Qe,Pe])=\u003ePe.size!==1?[]:[[Qe,Pe.values().next().value]]));return{inputProblem:ve,routedSchematicPortIdBySchematicPortId:o,connKeyToSourceNet:c,userNetIdToConnKey:E,crossScopeSourceTraceIdBySchematicPortIdAndNetId:J,sourceTraceIdByPortOnlyLabelSchematicPortId:he,connKeysWithExplicitPortNetTraces:_e,schematicPortIdsInScope:C,schematicPortIdsWithExternallyRoutedRepresentations:U,schPortIdToSourcePortId:y,netLabelsInScope:w,sourceTraceIdByPinPairKey:ge}}var KDo=(t,e)=\u003e{const n=new Set;for(const o of t){const{inline:i,schX:r,schY:s}=o._parsedProps;if(i||r===void 0\u0026\u0026s===void 0)continue;const a=o._getConnectedPorts();for(const A of a)A.schematic_port_id\u0026\u0026n.add(e.get(Am(A.schematic_port_id))??Am(A.schematic_port_id))}return n},VDo=({solver:t})=\u003e{const e=t.traceCleanupSolver?.getOutput().traces??t.traceLabelOverlapAvoidanceSolver?.getOutput().traces??t.schematicTraceLinesSolver?.solvedTracePaths??[],n=new Set;for(const o of e){const i=o?.tracePath;if(!Array.isArray(i)||i.length\u003c2)continue;const r=Array.isArray(o.pins)?o.pins.map(s=\u003es.pinId):o.pinIds;for(const s of r){const a=Am(s);a\u0026\u0026n.add(a)}}return n},NTt=.5,Nue=.1,RTt=t=\u003e{const{nl:e,connKey:n,sourceNet:o,text:i}=t;return o?.source_net_id\u0026\u0026e.source_net_id?e.source_net_id===o.source_net_id:e.source_net_id?e.source_net_id===n:e.text===i},TTt=({schematicPortIdsInScope:t,schematicPortIdsWithExternallyRoutedRepresentations:e,group:n,schPortIdToSourcePortId:o,connKeyToSourceNet:i})=\u003e{const{db:r}=n.root,s=new Set(Array.from(t).map(a=\u003eo.get(a)).filter(a=\u003ea!==void 0));for(const a of t){if(e.has(a))continue;const A=r.schematic_port.get(a);if(!A||A.is_connected)continue;const c=o.get(a);if(!c)continue;const l=r.source_port.get(c);if(n._parsedProps.showAsSchematicBox\u0026\u0026l?.subcircuit_id===n.subcircuit_id\u0026\u0026!l.source_component_id\u0026\u0026PTt({db:r,sourcePortId:c,sourcePortIdsInSchematicScope:s,schematicSheetId:A.schematic_sheet_id}))continue;const u=l?.subcircuit_connectivity_map_key;if(!u)continue;const g=i.get(u),h=A.schematic_component_id?r.schematic_component.get(A.schematic_component_id):void 0,d=h?.schematic_sheet_id??n._resolveSchematicSheetId(),p=Array.from(t).map(F=\u003eo.get(F)).filter(F=\u003eF?r.source_port.get(F)?.subcircuit_connectivity_map_key===u:!1),{text:m,wasAssignedDisplayLabel:_,directConnectionOutsideSchematicScopeSourcePortId:f}=MTt({group:n,sourcePortId:c,connectedSourcePortIdsForKey:p,sourcePortIdsInSchematicScope:s,schematicSheetId:A.schematic_sheet_id,connKey:u,sourceNet:g}),C=f?r.schematic_port.list({source_port_id:f}).some(F=\u003e!F.is_connected):!1,y=h?.is_box_with_pins\u0026\u0026l\u0026\u0026!l.source_component_id,x=r.source_trace.list().some(F=\u003eF.connected_source_port_ids.includes(c)\u0026\u0026F.subcircuit_id!==l?.subcircuit_id);if(y\u0026\u0026!x\u0026\u0026!!!(g||_))continue;const B=Array.from(t).filter(F=\u003e{const O=o.get(F);return O?r.source_port.get(O)?.subcircuit_connectivity_map_key===u:!1}).length,S=g?.is_ground??!1,Q=!S\u0026\u0026(g?.is_power??!1);let w;S?w=\"top\":Q?w=\"bottom\":w=gO(A.facing_direction||\"right\")||\"right\";const M=j7({anchor_position:A.center,anchor_side:w,text:m}),k=r.schematic_net_label.list().find(F=\u003eF.schematic_sheet_id!==d?!1:RTt({nl:F,connKey:u,sourceNet:g,text:m}));if(k\u0026\u0026B\u003c=1\u0026\u0026!C){r.schematic_net_label.update(k.schematic_net_label_id,{text:m,anchor_position:A.center,center:M,anchor_side:w});continue}if(k){const F=k.anchor_position.x-A.center.x,O=k.anchor_position.y-A.center.y;if(F*F+O*O\u003cNTt*NTt){if(S){const W=k.anchor_side??w;r.schematic_net_label.update(k.schematic_net_label_id,{text:m,anchor_position:A.center,center:j7({anchor_position:A.center,anchor_side:W,text:m}),anchor_side:W})}else if(!Q\u0026\u0026k.text===m){const W=k.anchor_side??w;r.schematic_net_label.update(k.schematic_net_label_id,{text:m,anchor_position:A.center,center:j7({anchor_position:A.center,anchor_side:W,text:m}),anchor_side:W})}continue}if(r.schematic_net_label.list().some(W=\u003e{if(W.schematic_sheet_id!==d)return!1;const te=W.anchor_position.x-A.center.x,j=W.anchor_position.y-A.center.y;return te*te+j*j\u003e=Nue*Nue?!1:RTt({nl:W,connKey:u,sourceNet:g,text:m})}))continue}if(!g\u0026\u0026!C)for(const F of r.schematic_net_label.list()){if(F.source_net_id!==u||F.schematic_sheet_id!==d)continue;p.some(U=\u003e{const Y=Array.from(o.entries()).find(([,J])=\u003eJ===U)?.[0];let W;if(Y\u0026\u0026(W=r.schematic_port.get(Y)),!W?.center||!F.anchor_position)return!1;const te=F.anchor_position.x-W.center.x,j=F.anchor_position.y-W.center.y;return te*te+j*j\u003cNue*Nue})||r.schematic_net_label.delete(F.schematic_net_label_id)}const R={text:m,source_net_id:g?.source_net_id??u,anchor_position:A.center,center:M,anchor_side:w,schematic_sheet_id:d};r.schematic_net_label.insert(R)}},zDo=vc(\"Group_doInitialSchematicTraceRender\"),kTt=({group:t,schematicSheetId:e,netLabels:n})=\u003e{const{inputProblem:o,routedSchematicPortIdBySchematicPortId:i,connKeyToSourceNet:r,schematicPortIdsInScope:s,schematicPortIdsWithExternallyRoutedRepresentations:a,schPortIdToSourcePortId:A,userNetIdToConnKey:c,crossScopeSourceTraceIdBySchematicPortIdAndNetId:l,sourceTraceIdByPortOnlyLabelSchematicPortId:u,connKeysWithExplicitPortNetTraces:g,netLabelsInScope:h,sourceTraceIdByPinPairKey:d}=UDo(t,{schematicSheetId:e,netLabels:n});if(o.chips.length===0)return;const p=KDo(h,i);if(!(o.directConnections.length\u003e0||o.netConnections.length\u003e0)){TTt({group:t,schematicPortIdsInScope:s,schematicPortIdsWithExternallyRoutedRepresentations:a,schPortIdToSourcePortId:A,connKeyToSourceNet:r});return}zDo.enabled\u0026\u0026t.root?.emit(\"debug:logOutput\",{type:\"debug:logOutput\",name:\"group-trace-render-input-problem\",content:JSON.stringify(o,null,2)});const _=new Ewt(o),f=_.getConstructorParams();t.root?.emit(\"solver:started\",{type:\"solver:started\",solverName:\"SchematicTracePipelineSolver\",solverParams:f[0],solverConstructorArgs:f,componentName:t.getString()}),_.solve();const I=VDo({solver:_});NDo({group:t,solver:_,userNetIdToConnKey:c,schematicPortIdsWithPreExistingNetLabels:p}),EDo({group:t,routedSchematicPortIdBySchematicPortId:i,solver:_,connKeyToSourceNet:r,userNetIdToConnKey:c,crossScopeSourceTraceIdBySchematicPortIdAndNetId:l,sourceTraceIdByPortOnlyLabelSchematicPortId:u,connKeysWithExplicitPortNetTraces:g,schematicPortIdsWithPreExistingNetLabels:p,schematicPortIdsWithRoutedTraces:I,netLabels:h}),IDo({group:t,solver:_,userNetIdToConnKey:c,sourceTraceIdByPinPairKey:d,crossScopeSourceTraceIdBySchematicPortIdAndNetId:l});const{db:C}=t.root;for(const[y,x]of i)C.schematic_port.get(x)?.is_connected\u0026\u0026C.schematic_port.update(y,{is_connected:!0});TTt({group:t,schematicPortIdsInScope:s,schematicPortIdsWithExternallyRoutedRepresentations:a,schPortIdToSourcePortId:A,connKeyToSourceNet:r})},JDo=t=\u003e{if(!t.root?._featureMspSchematicTraceRouting||!t.isSubcircuit||t.root?.schematicDisabled)return;const e=new Set,n=t._getBoard();let o=t;for(;o;){if(o instanceof A6)for(const a of o.selectAll(\"netlabel\"))e.add(a);if(o===n)break;o=o.parent}const i=[...e],r=new Set([t,...t.getDescendants().filter(a=\u003ea instanceof A6)].map(a=\u003ea.schematic_group_id).filter(a=\u003e!!a)),s=new Set(t.root.db.schematic_component.list().filter(a=\u003er.has(a.schematic_group_id)).map(a=\u003ea.schematic_sheet_id).filter(a=\u003e!!a));if(s.size===0){kTt({group:t,netLabels:i});return}for(const a of s)kTt({group:t,schematicSheetId:a,netLabels:i})};function WDo(t){const e=[];for(const n of t.printStatements){const o=n.match(/^\\.PRINT\\s+TRAN\\s+(.+)$/i);if(o)for(const i of o[1].match(/V\\(([^)]+)\\)/g)??[]){const r=i.slice(2,-1);e.push(r.replace(\",\",\"-\"))}}return e}var FTt=[\"rgb(0, 150, 0)\",\"rgb(0, 0, 220)\",\"rgb(220, 0, 0)\",\"rgb(0, 160, 160)\",\"rgb(180, 0, 180)\",\"rgb(170, 140, 0)\",\"rgb(220, 120, 0)\",\"rgb(128, 128, 128)\",\"rgb(100, 0, 180)\",\"rgb(140, 70, 0)\",\"rgb(220, 80, 120)\",\"rgb(0, 120, 220)\",\"rgb(0, 120, 120)\",\"rgb(120, 0, 0)\",\"rgb(0, 0, 132)\",\"rgb(80, 80, 80)\"],Rue=new Map,Tue=0;function jDo(t){if(Rue.has(t))return Rue.get(t);const e=FTt[Tue];return Tue=(Tue+1)%FTt.length,Rue.set(t,e),e}function $Do(){Rue.clear(),Tue=0}var qDo=()=\u003e({async simulate(t){const e=\"spice-experiment-1\",{circuit:n,tran:o}=r5o(t);return{simulationResultCircuitJson:s5o(o,n,e)}}}),SMe=t=\u003et.type===\"simulation_transient_current_graph\",LTt=t=\u003et.type===\"simulation_dc_operating_point_current\"||t.type===\"simulation_dc_sweep_current_graph\"||t.type===\"simulation_ac_sweep_current_graph\",HTt=t=\u003et.type===\"simulation_dc_operating_point_voltage\"||t.type===\"simulation_dc_sweep_voltage_graph\"||t.type===\"simulation_ac_sweep_voltage_graph\",QMe=t=\u003et.type===\"simulation_transient_voltage_graph\",XDo=t=\u003eQMe(t)||SMe(t)||HTt(t)||LTt(t),ZDo=({simulationResult:t,simulationParameterSweepCoordinate:e})=\u003e{if(!e||!XDo(t))return t;const n={...t},o=`${n.type}_id`;return Reflect.deleteProperty(n,o),n.simulation_parameter_sweep_coordinate=e,n},vMe=({circuitJson:t,sourceComponentId:e,isMatchingSourceComponent:n})=\u003e{const o=t.find(i=\u003en(i)\u0026\u0026i.source_component_id===e);if(!o)throw new Error(`Parameter sweep target ${e} was not found`);return o},eNo=({circuitJson:t,parameterSweep:e,simulationParameterSweepCoordinate:n})=\u003e{const o=structuredClone(t),i=n.parameter_value;if(e.parameter_type===\"resistance\"){const r=vMe({circuitJson:o,sourceComponentId:e.resistor_source_component_id,isMatchingSourceComponent:s=\u003es.type===\"source_component\"\u0026\u0026s.ftype===\"simple_resistor\"});return r.resistance=i,o}if(e.parameter_type===\"capacitance\"){const r=vMe({circuitJson:o,sourceComponentId:e.capacitor_source_component_id,isMatchingSourceComponent:s=\u003es.type===\"source_component\"\u0026\u0026s.ftype===\"simple_capacitor\"});return r.capacitance=i,o}if(e.parameter_type===\"inductance\"){const r=vMe({circuitJson:o,sourceComponentId:e.inductor_source_component_id,isMatchingSourceComponent:s=\u003es.type===\"source_component\"\u0026\u0026s.ftype===\"simple_inductor\"});return r.inductance=i,o}if(e.parameter_type===\"voltage\"){const r=o.find(a=\u003ea.type===\"source_net\"\u0026\u0026a.name.toUpperCase()===\"GND\");if(!r||r.type!==\"source_net\")throw new Error(\"A voltage parameter sweep requires a GND net\");const s={type:\"simulation_voltage_source\",simulation_voltage_source_id:`simulation_voltage_source_${n.simulation_parameter_sweep_id}_${n.sweep_index}`,is_dc_source:!0,positive_source_net_id:e.source_net_id,negative_source_net_id:r.source_net_id,voltage:i};return o.push(s),o}if(e.parameter_type===\"current\"){const r=new Set(o.filter(a=\u003ea.type===\"source_port\"\u0026\u0026a.source_component_id===e.current_source_component_id).map(a=\u003ea.source_port_id)),s=o.find(a=\u003ea.type===\"simulation_current_source\"\u0026\u0026(a.is_dc_source?!!(a.positive_source_port_id\u0026\u0026r.has(a.positive_source_port_id)):!!(a.terminal1_source_port_id\u0026\u0026r.has(a.terminal1_source_port_id))));if(!s)throw new Error(`Current sweep target ${e.current_source_component_id} has no simulation source`);return s.current=i,o}throw new Error(\"Parameter sweep target is incomplete\")},OTt=({circuitJson:t,simulationParameterSweepCoordinate:e})=\u003e{const n=T4o(t);return{spiceNetlist:n,spiceString:n.toSpiceString(),simulationParameterSweepCoordinate:e}},tNo=({circuitJson:t,simulationExperimentId:e})=\u003e{const n=t.find(o=\u003eo.type===\"simulation_parameter_sweep\"\u0026\u0026o.simulation_experiment_id===e);return n?n.parameter_values.map((o,i)=\u003e{const r={simulation_parameter_sweep_id:n.simulation_parameter_sweep_id,sweep_index:i,parameter_value:o,parameter_unit:n.parameter_unit};return OTt({circuitJson:eNo({circuitJson:t,parameterSweep:n,simulationParameterSweepCoordinate:r}),simulationParameterSweepCoordinate:r})}):[OTt({circuitJson:t})]},nNo={p:1e-12,n:1e-9,u:1e-6,µ:1e-6,m:.001,\"\":1,k:1e3,K:1e3,M:1e6,G:1e9},Sw=t=\u003e{if(t===void 0)return;if(typeof t==\"number\")return t;const n=t.trim().match(/^([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+))\\s*([pnumµkKMG]?)/);if(!n)return;const o=Number(n[1]);if(Number.isFinite(o))return o*(nNo[n[2]??\"\"]??1)},oNo=t=\u003e{const{graphDisplayName:e,graphCenter:n,graphVerticalOffset:o,graphVoltagePerDiv:i}=t._parsedProps;return{displayName:e,color:t.color??void 0,center:n,verticalOffset:Sw(o),valuePerDiv:Sw(i)}},iNo=t=\u003e{const{color:e,graphDisplayName:n,graphCenter:o,graphVerticalOffset:i,graphCurrentPerDiv:r}=t._parsedProps;return{displayName:n,color:e,center:o,verticalOffset:Sw(i),valuePerDiv:Sw(r)}},rNo=t=\u003e{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;for(const o of t)Number.isFinite(o)\u0026\u0026(e=Math.min(e,o),n=Math.max(n,o));return e===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY?null:{min:e,max:n}},sNo=t=\u003et.type===\"simulation_transient_current_graph\"?t.current_levels:t.voltage_levels,GTt=2,aNo=.8,ANo=({graph:t,index:e,graphCount:n})=\u003e{const o=rNo(sNo(t));if(!o)return null;const i=(o.min+o.max)/2,r=o.max-o.min,s=r\u003e0?r/(GTt*aNo):Math.max(Math.abs(i)/10,Number.EPSILON);return{display_center_value:i,display_center_offset_divs:((n-1)/2-e)*GTt,value_per_div:s}},cNo=t=\u003et!==void 0,lNo=t=\u003e{const e=new Map;for(const n of t)n.simulation_voltage_probe_id\u0026\u0026e.set(n.simulation_voltage_probe_id,n);return e},uNo=t=\u003e{const e=new Map;for(const n of t)n.simulation_current_probe_id\u0026\u0026e.set(n.simulation_current_probe_id,n);return e},gNo=({db:t,graphs:e,graphDisplayOverridesByProbeId:n})=\u003e{if(e.length===0)return;const o=t.simulation_oscilloscope_trace.list(),i=lNo(o),r=uNo(o),s=new Set(o.flatMap(a=\u003e[a.simulation_transient_voltage_graph_id,a.simulation_transient_current_graph_id]).filter(cNo));for(const[a,{type:A,graph:c}]of e.entries()){const l=ANo({graph:c,index:a,graphCount:e.length});if(!l)continue;const u=A===\"voltage\"?c.simulation_transient_voltage_graph_id:c.simulation_transient_current_graph_id;if(s.has(u))continue;const g=c.source_probe_id??void 0,h=g===void 0?void 0:A===\"voltage\"?i.get(g):r.get(g),d=g===void 0?void 0:n?.get(g),p=d?.valuePerDiv??l.value_per_div,m=d?.center??l.display_center_value,_=d?.verticalOffset!==void 0\u0026\u0026p!==0?d.verticalOffset/p:h?.display_center_offset_divs??l.display_center_offset_divs;t.simulation_oscilloscope_trace.insert({...A===\"voltage\"?{simulation_transient_voltage_graph_id:c.simulation_transient_voltage_graph_id,volts_per_div:p}:{simulation_transient_current_graph_id:c.simulation_transient_current_graph_id,amps_per_div:p},display_name:d?.displayName??h?.display_name,color:d?.color??h?.color??c.color,display_center_value:m,display_center_offset_divs:_})}},dNo=t=\u003e!!(t\u0026\u0026typeof t==\"object\"\u0026\u0026\"type\"in t),vB=vc(\"tscircuit:core:Group_doInitialSimulationSpiceEngineRender\"),hNo=({circuitJson:t,simulationExperimentId:e,voltageProbes:n,ammeters:o})=\u003e{const i=new Set(n.map(s=\u003es.simulation_voltage_probe_id).filter(s=\u003e!!s)),r=new Set(o.map(s=\u003es.simulation_current_probe_id).filter(s=\u003e!!s));return t.filter(s=\u003e{if(s.type===\"simulation_experiment\")return s.simulation_experiment_id===e;if(s.type===\"simulation_voltage_probe\")return i.has(s.simulation_voltage_probe_id);if(s.type===\"simulation_current_probe\")return r.has(s.simulation_current_probe_id);if(s.type===\"simulation_parameter_sweep\")return s.simulation_experiment_id===e;if(s.type===\"simulation_oscilloscope_trace\"){if(s.simulation_voltage_probe_id)return i.has(s.simulation_voltage_probe_id);if(s.simulation_current_probe_id)return r.has(s.simulation_current_probe_id)}return!(s.type===\"simulation_transient_voltage_graph\"||s.type===\"simulation_transient_current_graph\"||s.type===\"simulation_dc_operating_point_voltage\"||s.type===\"simulation_dc_operating_point_current\"||s.type===\"simulation_dc_sweep_voltage_graph\"||s.type===\"simulation_dc_sweep_current_graph\"||s.type===\"simulation_ac_sweep_voltage_graph\"||s.type===\"simulation_ac_sweep_current_graph\"||s.type===\"simulation_unknown_experiment_error\")})};function pNo(t){if(t.getInheritedProperty(\"analogSimulationDisabled\")||!t.isSubcircuit)return;const{root:e}=t;if(!e)return;const n=[...t.selectAll(\"analogsimulation\"),...t.selectAll(\"analogtransientsimulation\"),...t.selectAll(\"analogdcoperatingpointsimulation\"),...t.selectAll(\"analogdcsweepsimulation\"),...t.selectAll(\"analogacsweepsimulation\")];if(n.length===0)return;$Do();const o={...e.platform?.spiceEngineMap};o.spicey||(o.spicey=qDo());for(const i of n){const r=i.simulation_experiment_id;if(!r){vB(\"No simulation experiment id found, skipping simulation\");continue}const s=e.db.simulation_experiment.get(r);if(!s){vB(\"No simulation experiment found, skipping simulation\");continue}const a=i.getGroup()??t,A=a.selectAll(\"voltageprobe\"),c=a.selectAll(\"ammeter\"),l=hNo({circuitJson:e.db.toArray(),simulationExperimentId:r,voltageProbes:A,ammeters:c});let u;try{u=tNo({circuitJson:l,simulationExperimentId:r}),vB(`Generated ${u.length} SPICE run(s):\n${u.map(B=\u003eB.spiceString).join(`\n`)}`)}catch(B){vB(`Failed to convert circuit JSON to SPICE: ${B}`),e.db.simulation_unknown_experiment_error.insert({simulation_experiment_id:r,error_type:\"simulation_unknown_experiment_error\",message:B instanceof Error?B.message:String(B)});continue}const g=new Map,h=new Map,d=new Map;for(const B of A)B.finalProbeName\u0026\u0026g.set(B.finalProbeName,B),B.simulation_voltage_probe_id\u0026\u0026(h.set(B.simulation_voltage_probe_id,B),d.set(B.simulation_voltage_probe_id,oNo(B)));for(const B of c)B.simulation_current_probe_id\u0026\u0026d.set(B.simulation_current_probe_id,iNo(B));const p=new Set(c.map(B=\u003eB.simulation_current_probe_id).filter(B=\u003e!!B)),m=new Map,_=new Map;for(const B of e.db.simulation_current_probe.list().filter(S=\u003ep.has(S.simulation_current_probe_id)))m.set(B.simulation_current_probe_id,B),B.name!==void 0\u0026\u0026_.set(B.name,B);const f=e.db.simulation_voltage_probe.list().filter(B=\u003eh.has(B.simulation_voltage_probe_id)),I=u[0]?.spiceNetlist,C=I?WDo(I):[];if(C.length===f.length)for(const[B,S]of f.entries()){const Q=h.get(S.simulation_voltage_probe_id),w=C[B];Q\u0026\u0026w\u0026\u0026g.set(w,Q)}else vB(`Skipping probe-to-graph order mapping because counts differ: probes=${f.length} graphNames=${C.length}`);const y=i.getSpiceEngineName()??\"spicey\",x=o[y];if(!x)throw new Error(`SPICE engine \"${y}\" not found in platform config. Available engines: ${JSON.stringify(Object.keys(o).filter(B=\u003eB!==\"spicey\"))}`);const E=`spice-simulation-${y}-${r}`;vB(`Queueing simulation for spice engine: ${y} (id: ${E})`),t._queueAsyncEffect(E,async()=\u003e{try{const B=[],S=[];for(const Q of u){vB(`Running simulation with engine: ${y}`);const w=await x.simulate(Q.spiceString);vB(`Simulation completed, received ${w.simulationResultCircuitJson.length} elements`);for(const M of w.simulationResultCircuitJson){if(!dNo(M)){vB(\"Skipping invalid simulation result element\");continue}const k=ZDo({simulationResult:M,simulationParameterSweepCoordinate:Q.simulationParameterSweepCoordinate});if(QMe(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=k.name?g.get(k.name):void 0;F\u0026\u0026(k.color=F.color??void 0,k.source_probe_id=F.simulation_voltage_probe_id??void 0)}else if(HTt(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=h.get(k.simulation_voltage_probe_id)??(k.name?g.get(k.name):void 0);F?.simulation_voltage_probe_id\u0026\u0026(k.color=F.color??void 0,k.simulation_voltage_probe_id=F.simulation_voltage_probe_id)}if(SMe(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=(k.source_probe_id?m.get(k.source_probe_id):void 0)??(k.name?_.get(k.name):void 0);F\u0026\u0026(k.color=F.color,k.source_probe_id=F.simulation_current_probe_id)}else if(LTt(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=m.get(k.simulation_current_probe_id)??(k.name?_.get(k.name):void 0);F\u0026\u0026(k.color=F.color,k.simulation_current_probe_id=F.simulation_current_probe_id)}const R=e.db.insert(k);QMe(R)\u0026\u0026B.push({type:\"voltage\",graph:R}),SMe(R)\u0026\u0026S.push({type:\"current\",graph:R}),vB(`Inserted ${k.type} into database`)}}i.usesIndependentGraphAxes()\u0026\u0026gNo({db:e.db,graphs:[...B,...S],graphDisplayOverridesByProbeId:d}),t._markDirty(\"SimulationSpiceEngineRender\")}catch(B){vB(`Simulation failed for engine ${y}: ${B}`),e.db.simulation_unknown_experiment_error.insert({simulation_experiment_id:r,error_type:\"simulation_unknown_experiment_error\",message:B instanceof Error?B.message:String(B)})}})}}function mNo(t){if(!t.isSubcircuit)return;const{db:e}=t.root,n=t.selectAll(\"trace\"),o=t.selectAll(\"via\"),i=t.selectAll(\"net\"),r=new wQ({});r.addConnections(n.map(l=\u003e{const u=e.source_trace.get(l.source_trace_id);return u?[u.source_trace_id,...u.connected_source_port_ids,...u.connected_source_net_ids]:null}).filter(l=\u003el!==null));const s=e.source_net.list().filter(l=\u003el.subcircuit_id===t.subcircuit_id);for(const l of s)r.addConnections([[l.source_net_id]]);const{name:a}=t._parsedProps;for(const l of n){if(!l.source_trace_id)continue;const u=r.getNetConnectedToId(l.source_trace_id);u\u0026\u0026(l.subcircuit_connectivity_map_key=`${a??`unnamedsubcircuit${t.subcircuit_id??t.source_group_id??t._renderId}`}_${u}`,e.source_trace.update(l.source_trace_id,{subcircuit_connectivity_map_key:l.subcircuit_connectivity_map_key}))}const A=new Set;for(const l of n){if(!l.source_trace_id)continue;const u=e.source_trace.get(l.source_trace_id);if(u)for(const g of u.connected_source_port_ids)A.add(g)}for(const l of A){const u=r.getNetConnectedToId(l);if(!u)continue;const g=`${a??`unnamedsubcircuit${t.subcircuit_id??t.source_group_id??t._renderId}`}_${u}`;e.source_port.update(l,{subcircuit_connectivity_map_key:g})}const c=new Set;for(const l of n){if(!l.source_trace_id)continue;const u=e.source_trace.get(l.source_trace_id);if(u)for(const g of u.connected_source_net_ids)c.add(g)}for(const l of s)c.add(l.source_net_id);for(const l of c){const u=r.getNetConnectedToId(l);if(!u)continue;const g=`${a??`unnamedsubcircuit${t.subcircuit_id??t.source_group_id??t._renderId}`}_${u}`;e.source_net.update(l,{subcircuit_connectivity_map_key:g});const h=i.find(d=\u003ed.source_net_id===l);h\u0026\u0026(h.subcircuit_connectivity_map_key=g)}for(const l of o){const u=l._getConnectedNetOrTrace();u\u0026\u0026u.subcircuit_connectivity_map_key\u0026\u0026(l.subcircuit_connectivity_map_key=u.subcircuit_connectivity_map_key)}}var _No=t=\u003e{const e=t.root?.firstChild===t;if(!t.isSubcircuit||!e||t._getBoard())return;const n=t.root?.pcbRoutingDisabled||t.getInheritedProperty(\"routingDisabled\"),o=t.root?.platform?.drcChecksDisabled??t.getInheritedProperty(\"drcChecksDisabled\"),i=t.root?.platform?.routingDrcChecksDisabled??t.getInheritedProperty(\"routingDrcChecksDisabled\");if(t.root?.pcbDisabled||n||o||i||t._hasIncompleteAsyncEffectsInSubtreeForPhase(\"PcbTraceRender\")||t._hasTracesToRoute()\u0026\u0026!t._areChildSubcircuitsRouted()||t._standaloneSubcircuitDrcChecksComplete||t._standaloneSubcircuitDrcChecksInProgress)return;const{db:r}=t.root,s=r.subtree({subcircuit_id:t.subcircuit_id}).toArray();t._standaloneSubcircuitDrcChecksInProgress=!0,t._queueAsyncEffect(\"standalone-subcircuit:routing-drc-checks\",async()=\u003e{try{const a=await jmt(s);r.insertAll(Ymt(a)),t._standaloneSubcircuitDrcChecksComplete=!0}finally{t._standaloneSubcircuitDrcChecksInProgress=!1}})},YTt=(t,e)=\u003e{for(const[n,o]of Object.entries(e)){if(!o)continue;const i=Array.isArray(o)?o:[o],r=t.get(n)??new Set;for(const s of i)r.add(s);t.set(n,r)}},UTt=t=\u003eObject.fromEntries(Array.from(t,([e,n])=\u003e[e,n.size===1?Array.from(n)[0]:Array.from(n)])),fNo=(t,e)=\u003e{const n=e.map(r=\u003er.fanoutPourNetMap).filter(r=\u003er!==void 0),o=new Map;if(n.length\u003e0){for(const r of n)YTt(o,r);return UTt(o)}let i=t;for(;i;){if(i.isSubcircuit){const r=i,s=r.selectAll(\"copperpour\");for(const a of s){if(a.getSubcircuit()!==r)continue;const{layer:A,connectsTo:c}=a._parsedProps;YTt(o,{[A]:c})}}i=i.parent}return o.size\u003e0?UTt(o):void 0},KTt=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y)\u003c1e-4\u0026\u0026t.layer===e.layer;function INo(t,e,n){const o=t.getGroup(),i=o._computePcbGlobalTransformBeforeLayout(),r=WN(e.layerCount),s=new Map(e.connections.map(g=\u003e[g,[...g.pointsToConnect]])),a=new Set,A=new Set,c=[];for(const[g,h]of(t._parsedProps.pcbTracePaths??[]).entries()){const d=t.getSubcircuit().selectOne(h.connection,{type:\"port\"});if(!d)throw new Error(`Saved phase path \"${h.connection}\" must select a PCB port`);if(A.has(d))throw new Error(`Duplicate saved phase path for \"${h.connection}\"`);A.add(d);const p=e.connections.filter(F=\u003eF.pointsToConnect.some(O=\u003eO.pcb_port_id===d.pcb_port_id));if(p.length!==1)throw new Error(`Saved phase path \"${h.connection}\" must select exactly one connection in this phase`);const m=p[0],_=s.get(m),f=_.findIndex(F=\u003eF.pcb_port_id===d.pcb_port_id);if(f\u003c0)throw new Error(`Saved phase path \"${h.connection}\" starts at an endpoint already joined by another path`);const I=d._getGlobalPcbPositionBeforeLayout(),C=d._getGlobalPcbPositionAfterLayout(),y=D0(M0(C.x-I.x,C.y-I.y),i),x=h.route.map(F=\u003e({...F,...ts(y,F)}));for(const F of x)if((F.route_type===\"wire\"?[F.layer]:[F.from_layer,F.to_layer]).some(U=\u003e!r.includes(U)))throw new Error(`Saved phase path \"${h.connection}\" uses a layer unavailable on this board`);const E=x[0],B=x.at(-1),S=E.route_type===\"wire\"?E.layer:E.from_layer,Q=B.route_type===\"wire\"?B.layer:B.to_layer;if(!KTt(_[f],{...E,layer:S}))throw new Error(`Saved phase path \"${h.connection}\" must start at its PCB port on an available layer`);const w=_.findIndex((F,O)=\u003eO!==f\u0026\u0026KTt(F,{...B,layer:Q}));if(!e.allowViaInPad\u0026\u0026(E.route_type===\"via\"||B.route_type===\"via\"\u0026\u0026w\u003e=0))throw new Error(`Saved phase path \"${h.connection}\" has a via at a pad; enable allowViaInPad`);const M=`saved_phase_${o.pcb_group_id}_${t._parsedProps.phaseIndex??\"default\"}_${g}`;if(w\u003c0\u0026\u0026!n)throw new Error(`Saved phase path \"${h.connection}\" must end at another connection endpoint; use autorouter=\"fanout\" for saved escapes`);w\u003e=0?_.splice(f,1):_[f]={x:B.x,y:B.y,layer:Q,pointId:`${M}_exit`};const k=x.find(F=\u003eF.route_type===\"wire\")?.width??e.minTraceWidth,R=x.flatMap(F=\u003eF.route_type===\"via\"?[{route_type:\"wire\",x:F.x,y:F.y,layer:F.from_layer,width:k},F,{route_type:\"wire\",x:F.x,y:F.y,layer:F.to_layer,width:k}]:[F]);B.route_type===\"via\"\u0026\u0026R.push({route_type:\"wire\",x:B.x,y:B.y,layer:B.to_layer,width:k}),a.add(m),c.push({type:\"pcb_trace\",pcb_trace_id:M,connection_name:m.name,connectsTo:[m.source_trace_id,...m.pointsToConnect.map(F=\u003eF.pointId)].filter(F=\u003e!!F),route:R})}for(const g of e.connections){if(!a.has(g))throw new Error(`pcbTracePaths must cover every connection in the phase; missing: ${g.name}`);if(!n\u0026\u0026s.get(g).length\u003e1)throw new Error(`Saved phase paths for \"${g.name}\" must connect every endpoint; use autorouter=\"fanout\" for saved escapes`)}const l=e.connections.flatMap(g=\u003e{const h=s.get(g);return h.length\u003e1?[{...g,pointsToConnect:h}]:[]}),u=new Set(l.map(g=\u003eg.name));return{traces:c,outputSimpleRouteJson:n?{...e,connections:l,buses:e.buses?.map(g=\u003e({...g,connectionNames:g.connectionNames.filter(h=\u003eu.has(h))})).filter(g=\u003eg.connectionNames.length\u003e0),differentialPairs:e.differentialPairs?.filter(g=\u003eg.connectionNames.every(h=\u003eu.has(h))),traces:[...e.traces??[],...c]}:void 0}}var CNo=qa.omit({pcbRotation:!0,layer:!0}),VTt=class extends Ir{pcb_breakout_point_id=null;matchedPort=null;matchedNet=null;matchedSourceTraceId=null;isPcbPrimitive=!0;_getSourceTraceIdForPort(t){const{db:e}=this.root;return e.source_trace.list().find(o=\u003eo.connected_source_port_ids.includes(t.source_port_id))?.source_trace_id}_getSourceNetIdForPort(t){const{db:e}=this.root;return e.source_trace.list().find(o=\u003eo.connected_source_port_ids.includes(t.source_port_id))?.connected_source_net_ids[0]}_renderPcbBreakoutPoint({layer:t}={}){if(this.pcb_breakout_point_id||this.root?.pcbDisabled)return;const{db:e}=this.root,n=this._getGlobalPcbPositionBeforeLayout(),o=this.parent?.getGroup(),i=this.getSubcircuit();if(!o||!o.pcb_group_id)return;const r=e.pcb_breakout_point.insert({pcb_group_id:o.pcb_group_id,subcircuit_id:i?.subcircuit_id??void 0,source_port_id:this.matchedPort?.source_port_id??void 0,source_trace_id:this.matchedPort?this.matchedSourceTraceId??this._getSourceTraceIdForPort(this.matchedPort):void 0,source_net_id:this.matchedNet?this.matchedNet.source_net_id:this.matchedPort?this._getSourceNetIdForPort(this.matchedPort):void 0,layer:t,x:n.x,y:n.y});this.pcb_breakout_point_id=r.pcb_breakout_point_id}_getPcbCircuitJsonBounds(){const t=this._getGlobalPcbPositionBeforeLayout();return{center:{x:t.x,y:t.y},bounds:{left:t.x,top:t.y,right:t.x,bottom:t.y},width:0,height:0}}_setPositionFromLayout(t){const{db:e}=this.root;if(!this.pcb_breakout_point_id)return;const n={x:t.x,y:t.y};this.matchedSourceTraceId\u0026\u0026(n.source_trace_id=this.matchedSourceTraceId),e.pcb_breakout_point.update(this.pcb_breakout_point_id,n)}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_breakout_point_id)return;const o=n.pcb_breakout_point.get(this.pcb_breakout_point_id);o\u0026\u0026n.pcb_breakout_point.update(this.pcb_breakout_point_id,{x:o.x+t,y:o.y+e})}getPcbSize(){return{width:0,height:0}}},dR=class extends VTt{get config(){return{componentName:\"BreakoutPoint\",zodProps:wMn}}_matchConnection(){if(this.matchedPort)return;const{connection:t}=this._parsedProps,e=this.getSubcircuit();e\u0026\u0026(this.matchedPort=e.selectOne(t,{type:\"port\"}),this.matchedPort||(this.matchedNet=e.selectOne(t,{type:\"net\"})),!this.matchedPort\u0026\u0026!this.matchedNet\u0026\u0026this.renderError(`Could not find connection target \"${t}\"`))}doInitialPcbPrimitiveRender(){this._matchConnection(),this._renderPcbBreakoutPoint()}},zTt=class extends dR{exitLayer=\"top\";doInitialPcbPrimitiveRender(){this._matchConnection(),this._renderPcbBreakoutPoint({layer:this.exitLayer})}};function yNo(t,e){const{db:n}=t.root,o=WN(e.layerCount),i=new Set,r=t.children.filter(A=\u003eA instanceof zTt),s=(t._parsedProps.pcbTracePaths??[]).map((A,c)=\u003e{for(const S of A.route)if((S.route_type===\"wire\"?[S.layer]:[S.from_layer,S.to_layer]).some(w=\u003e!o.includes(w)))throw new Error(`Saved fanout path \"${A.connection}\" uses a layer unavailable on this board`);const l=r[c],u=l.matchedPort,g=e.connections.find(S=\u003eS.pointsToConnect.some(Q=\u003eQ.pcb_port_id===u.pcb_port_id));if(!g)throw new Error(`No fanout connection for saved path \"${A.connection}\"`);const h=n.pcb_breakout_point.get(l.pcb_breakout_point_id),d=A.route.at(-1),p=D0(l._computePcbGlobalTransformBeforeLayout(),M0(-d.x,-d.y)),m=ts(p,d),_=A.route.map(S=\u003e{const Q=ts(p,S);return{...S,x:Q.x+h.x-m.x,y:Q.y+h.y-m.y}}),f=_[0],I=f.route_type===\"wire\"?f.layer:f.from_layer,C=u._getGlobalPcbPositionAfterLayout();if(Math.hypot(f.x-C.x,f.y-C.y)\u003e1e-4||!u.getAvailablePcbLayers().includes(I))throw new Error(`Saved fanout path \"${A.connection}\" must start at its PCB port on an available layer`);if(f.route_type===\"via\"\u0026\u0026!e.allowViaInPad)throw new Error(`Saved fanout path \"${A.connection}\" starts with a via at a pad; enable allowViaInPad`);const y=_.at(-1),x=y.route_type===\"wire\"?y.layer:y.to_layer,E=[{...f,layer:I},{...y,layer:x}];if(g.pointsToConnect.some(S=\u003e!E.some(Q=\u003eMath.hypot(S.x-Q.x,S.y-Q.y)\u003c1e-4\u0026\u0026S.layer===Q.layer)))throw new Error(`Saved fanout path \"${A.connection}\" does not cover its connection endpoints`);const B=_.find(S=\u003eS.route_type===\"wire\")?.width??e.minTraceWidth;return f.route_type===\"via\"\u0026\u0026(_.splice(1,0,{route_type:\"wire\",x:f.x,y:f.y,layer:f.to_layer,width:B}),_.unshift({route_type:\"wire\",x:f.x,y:f.y,layer:f.from_layer,width:B})),y.route_type===\"via\"\u0026\u0026(_.splice(_.length-1,0,{route_type:\"wire\",x:y.x,y:y.y,layer:y.from_layer,width:B}),_.push({route_type:\"wire\",x:y.x,y:y.y,layer:y.to_layer,width:B})),y.route_type===\"via\"\u0026\u0026_.push({route_type:\"wire\",x:y.x,y:y.y,layer:y.to_layer,width:B}),i.add(g),{type:\"pcb_trace\",pcb_trace_id:`saved_fanout_${t.pcb_group_id}_${c}`,connection_name:g.name,source_trace_id:g.source_trace_id,connectsTo:[g.source_trace_id,...g.pointsToConnect.map(S=\u003eS.pointId)].filter(S=\u003e!!S),route:_}}),a=e.connections.filter(A=\u003e!i.has(A));if(a.length)throw new Error(`pcbTracePaths must cover every fanout connection; missing: ${a.map(A=\u003eA.name).join(\", \")}`);return s}function JTt(t){return t===null?Number.POSITIVE_INFINITY:t}function xNo(t,e){return JTt(t.routingPhaseIndex)-JTt(e.routingPhaseIndex)}function kue(t,e){let n=t.get(e);return n||(n={routingPhaseIndex:e,nets:[],traces:[]},t.set(e,n)),n}function WTt(t){return t.props.routingPhaseIndex??null}function ENo(t,e=[]){const n=new Set;for(const a of e){if(a._parsedProps.routingPhaseIndex===void 0)continue;a._parsedProps.connections.some(c=\u003ec===t.name||PMe(t,Fue(c)))\u0026\u0026n.add(a._parsedProps.routingPhaseIndex)}if(n.size\u003e1)throw new Error(`Trace \"${t.name}\" belongs to buses with different routing phases`);const o=n.values().next().value;if(o!==void 0)return o;const i=t.props.routingPhaseIndex;if(i!==void 0)return i;let r=null;const s=t._findConnectedNets().nets;for(const a of s){const A=WTt(a);typeof A==\"number\"\u0026\u0026(r===null||A\u003cr)\u0026\u0026(r=A)}return r}function Fue(t){return t.trim().replace(/\\s*\u003e\\s*/g,\".\").replace(/\\s+/g,\".\").replace(/^\\./,\"\").replace(/\\.\\./g,\".\")}function wMe(t){return t.connection===void 0\u0026\u0026t.connections===void 0?t.pcbTracePaths?.map(e=\u003ee.connection)??[]:[...t.connection?[t.connection]:[],...t.connections??[]]}function PMe(t,e){if(t.getTracePortPathSelectors().some(o=\u003eFue(o)===e))return!0;const n=t.getSubcircuit().selectOne(e,{type:\"port\"});return n!==null\u0026\u0026(t._findConnectedPorts().ports?.includes(n)??!1)}function BNo(t){const e=t.selectAll(\"autoroutingphase\"),n=new Map;for(const o of e){const{phaseIndex:i,autorouter:r}=o._parsedProps;r!==void 0\u0026\u0026n.set(i??null,r)}return n}function bNo(t){const e=t.selectAll(\"autoroutingphase\"),n=new Map;for(const o of e){const i=o._parsedProps;n.set(i.phaseIndex??null,i)}return n}function Fb(t){if(t!==void 0)return Number(t)}function SNo(t){const{minTraceWidth:e,minViaHoleEdgeToViaHoleEdgeClearance:n,minPlatedHoleDrillEdgeToDrillEdgeClearance:o,minTraceToPadEdgeClearance:i,minPadEdgeToPadEdgeClearance:r,minBoardEdgeClearance:s,minViaEdgeToPadEdgeClearance:a,minViaHoleDiameter:A,minViaPadDiameter:c}=t;if(!(e===void 0\u0026\u0026n===void 0\u0026\u0026o===void 0\u0026\u0026i===void 0\u0026\u0026r===void 0\u0026\u0026s===void 0\u0026\u0026a===void 0\u0026\u0026A===void 0\u0026\u0026c===void 0))return{minTraceWidth:Fb(e),minViaHoleEdgeToViaHoleEdgeClearance:Fb(n),minPlatedHoleDrillEdgeToDrillEdgeClearance:Fb(o),minTraceToPadEdgeClearance:Fb(i),minPadEdgeToPadEdgeClearance:Fb(r),minBoardEdgeClearance:Fb(s),minViaEdgeToPadEdgeClearance:Fb(a),minViaHoleDiameter:Fb(A),minViaPadDiameter:Fb(c)}}function QNo(t){const e=t.selectAll(\"trace\"),n=t.selectAll(\"net\"),o=t.selectAll(\"bus\"),i=t.selectAll(\"group\").filter(_=\u003e_.isRoutingDirective),r=new Map,s=new Map;for(const _ of e){let f=_.parent;for(;f\u0026\u0026f!==t;){if(f.isRoutingDirective){r.set(_,f);break}f=f.parent}}for(const _ of n)_.parent?.isRoutingDirective\u0026\u0026i.includes(_.parent)\u0026\u0026s.set(_,_.parent);const a=new Map,A=BNo(t),c=bNo(t),l=t._parsedProps,u=e.length\u003e0||n.length\u003e0,g=Array.from(c.values()).some(_=\u003e_.reroute),h=Array.from(c.values()).some(_=\u003ewMe(_).length\u003e0);if(!u\u0026\u0026!g\u0026\u0026!h\u0026\u0026i.length===0)return[];for(const _ of n){if(s.has(_))continue;const f=WTt(_);kue(a,f).nets.push(_)}for(const _ of e){if(r.has(_))continue;const f=ENo(_,o);kue(a,f).traces.push(_)}for(const[_,f]of c){const I=wMe(f);if(I.length\u003e0){const C=kue(a,_),y=I.map(Fue);C.connectionSelectors=I;for(const x of e)if(!r.has(x)\u0026\u0026y.some(E=\u003ePMe(x,E))){if(!f.reroute)for(const E of a.values())E!==C\u0026\u0026(E.traces=E.traces.filter(B=\u003eB!==x));if(C.traces.includes(x))continue;C.traces.push(x)}}(f.reroute||f.pcbTracePaths!==void 0)\u0026\u0026kue(a,_)}const d=Array.from(a.values()).sort(xNo);for(const _ of d){_.autorouter=A.get(_.routingPhaseIndex);const f=c.get(_.routingPhaseIndex);_.phaseName=f?.name,_.reroute=f?.reroute,_.region=f?.region,_.connectionSelectors=f?wMe(f):void 0,_.busFanoutDirections=f?.busFanoutDirections??l.busFanoutDirections,_.fanoutBoundaryPadding=f?.fanoutBoundaryPadding??l.fanoutBoundaryPadding;const I=f?.fanoutRoutingLayers??l.fanoutRoutingLayers;_.fanoutRoutingLayers=I?.map(C=\u003etypeof C==\"string\"?C:C.name),_.fanoutPourNetMap=f?.fanoutPourNetMap??l.fanoutPourNetMap,_.drcTolerances=f?SNo(f):void 0}for(const _ of t.selectAll(\"autoroutingphase\")){if(_._parsedProps.pcbTracePaths===void 0)continue;const f=a.get(_._parsedProps.phaseIndex??null);if(!f)continue;const I=f.autorouter!==void 0?h$(f.autorouter,t.root?.platform):t._getAutorouterConfig(),C=[\"fanout\",\"single_layer_fanout\"].includes(I.preset??\"\");f.getPrecomputedRoutingResult=y=\u003eINo(_,y,C)}const p=[];for(const _ of i){const f=_._parsedProps,C=_.children.some(O=\u003eO instanceof dR)\u0026\u0026_.props.autorouter===void 0,y=e.filter(O=\u003er.get(O)===_),x=y.filter(O=\u003e!O.pcb_trace_id),E=_.pcb_group_id?_.root?.db.pcb_group.get(_.pcb_group_id):null,B=E?.outline?Oh(E.outline):null,S=E?.width??(B?B.maxX-B.minX:void 0),Q=E?.height??(B?B.maxY-B.minY:void 0),w=E\u0026\u0026S\u0026\u0026Q?{minX:E.center.x-S/2,maxX:E.center.x+S/2,minY:E.center.y-Q/2,maxY:E.center.y+Q/2}:void 0,M=_.props,k=M.width!==void 0||M.height!==void 0||!!M.outline?.length,R=M.fanoutBoundaryPadding!==void 0,F={routingPhaseIndex:null,routingPcbGroupId:_.pcb_group_id??void 0,fanoutRegionPcbGroupId:_.pcb_group_id??void 0,routingBounds:w,fanoutBounds:k?w:R?void 0:w,autorouter:f.autorouter??\"fanout\",busFanoutDirections:f.busFanoutDirections,fanoutBoundaryPadding:f.fanoutBoundaryPadding,fanoutRoutingLayers:f.fanoutRoutingLayers?.map(O=\u003etypeof O==\"string\"?O:O.name),fanoutPourNetMap:f.fanoutPourNetMap,nets:n.filter(O=\u003es.get(O)===_),traces:y};if(_._parsedProps.pcbTracePaths!==void 0){p.push({...F,autorouter:{local:!0,groupMode:\"subcircuit\",allowViaInPad:(typeof f.autorouter==\"object\"?f.autorouter.allowViaInPad:void 0)??t._getAutorouterConfig().allowViaInPad},getPrecomputedRoutingResult:O=\u003e({traces:yNo(_,O)})});continue}if(!C){p.push(F);continue}if(p.push({...F,autorouter:\"default\",traces:[]}),x.length\u003e0){const O=new Set(o.filter(Y=\u003ex.some(W=\u003eY._parsedProps.connections.some(te=\u003ete===W.name||PMe(W,Fue(te))))).map(Y=\u003eY.name));for(const Y of x)Y.name\u0026\u0026O.add(Y.name);const U=f.busFanoutDirections?Object.fromEntries(Object.entries(f.busFanoutDirections).filter(([Y])=\u003eO.has(Y))):void 0;p.push({...F,routingPcbGroupId:void 0,busFanoutDirections:U,traces:x})}}const m=c.get(null);if(u\u0026\u0026c.size===1\u0026\u0026m?.reroute\u0026\u0026d.length===1\u0026\u0026d[0]?.routingPhaseIndex===null){const _=d[0];return[...p,{routingPhaseIndex:null,nets:[..._.nets],traces:[..._.traces]},_]}return[...p,...d]}var jTt={version:\"0.0.1910\"},$Tt=t=\u003e{let e=2166136261;for(let n=0;n\u003ct.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e\u003e\u003e\u003e0},qTt=t=\u003e{const e=JSON.stringify(t),n=$Tt(e),o=$Tt(`${e}${n}`);return`${n.toString(16).padStart(8,\"0\")}${o.toString(16).padStart(8,\"0\")}`},vNo=(t,e)=\u003e`routes:core@${jTt.version}:solver:${qTt(e)}:srj:${qTt(t)}`,wNo=async({cacheEngine:t,cacheKey:e})=\u003e{if(!t)return null;try{const n=await t.getItem(e);if(!n)return null;const o=JSON.parse(n);return!o||!Array.isArray(o.traces)?null:o}catch{return null}},PNo=async({cacheEngine:t,cacheKey:e,result:n})=\u003e{if(t)try{await t.setItem(e,JSON.stringify(n))}catch{}},XTt=1e-6,ZTt=(t,e)=\u003et.pointId!==void 0\u0026\u0026e.pointId!==void 0\u0026\u0026t.pointId===e.pointId,ekt=(t,e)=\u003eMath.abs(t.x-e.x)\u003c=XTt\u0026\u0026Math.abs(t.y-e.y)\u003c=XTt\u0026\u0026t.layer===e.layer,I$=(t,e)=\u003et.pointId!==void 0\u0026\u0026e.pointId!==void 0?ZTt(t,e):ekt(t,e),MNo=(t,e)=\u003e{const n=t.connections.find(i=\u003ei.routingPcbGroupId!==e.routingPcbGroupId\u0026\u0026i.source_trace_id===e.source_trace_id\u0026\u0026i.pointsToConnect.some(r=\u003ee.pointsToConnect.some(s=\u003eI$(r,s))));if(!n)return;const o=n.pointsToConnect.filter(i=\u003e!e.pointsToConnect.some(r=\u003eI$(i,r)));return o.length===1?o[0]:void 0},DNo=(t,e)=\u003e{if(!e.routingPcbGroupId||!e.source_trace_id)return;const n=MNo(t,e);if(!(!n||!t.connections.some(i=\u003ei.routingPcbGroupId!==void 0\u0026\u0026i.routingPcbGroupId!==e.routingPcbGroupId\u0026\u0026i.source_trace_id===e.source_trace_id\u0026\u0026i.pointsToConnect.some(r=\u003eI$(r,n)))))return{x:n.x,y:n.y,layer:n.layer}};function tkt(t,e){if(t.routingPcbGroupId)return t.routingPcbGroupId===e.routingPcbGroupId;for(const n of e.traces)if(n.source_trace_id\u0026\u0026(t.source_trace_id===n.source_trace_id||t.name===n.source_trace_id||t.rootConnectionName===n.source_trace_id||t.mergedConnectionNames?.includes(n.source_trace_id)))return!0;for(const n of e.nets)if(n.source_net_id\u0026\u0026t.name===n.source_net_id)return!0;return!1}function NNo(t){for(const e of t)if(e.routingPcbGroupId||e.routingPhaseIndex!==null)return!0;return!1}function Lue(t,e){const n=[];for(const A of t.connections)tkt(A,e)\u0026\u0026n.push(A);const o=new Set;for(const A of n)o.add(A.name);const i=[];for(const A of t.differentialPairs??[]){const c=o.has(A.connectionNames[0]),l=o.has(A.connectionNames[1]);if(c!==l)throw new Error(`Differential pair \"${A.connectionNames.join(\"/\")}\" cannot be split across autorouting phases`);c\u0026\u0026i.push(A)}const r=new Map(n.map(A=\u003e[A.name,A])),s=(t.buses??[]).map(A=\u003e{const c=A.connectionNames.filter(u=\u003eo.has(u)),l=Object.fromEntries(c.flatMap(u=\u003e{const g=r.get(u);if(!g)return[];const h=DNo(t,g);return h?[[u,h]]:[]}));return{...A,connectionNames:c,...Object.keys(l).length\u003e0?{connectionExitTargets:l}:{}}}).filter(A=\u003eA.connectionNames.length\u003e0),a=zRt({bounds:e.routingBounds??t.bounds,connections:n});return{...t,bounds:a,connections:n,differentialPairs:i.length\u003e0?i:void 0,buses:s.length\u003e0?s:void 0}}function RNo(t){return t?Object.values(t).some(e=\u003ee!==void 0):!1}function TNo(t,e){return e===void 0?t:t.map(n=\u003e({...n,nominalTraceWidth:Math.max(n.nominalTraceWidth??e,e),width:Math.max(n.width??e,e)}))}function nkt(t,e){if(!RNo(e))return t;const n=e.minTraceWidth??t.minTraceWidth,o=e.minViaHoleDiameter??t.minViaHoleDiameter,i=e.minViaPadDiameter??t.minViaPadDiameter,r=e.minTraceToPadEdgeClearance??t.minTraceToPadEdgeClearance,s=e.minViaEdgeToPadEdgeClearance??t.minViaEdgeToPadEdgeClearance,a=e.minViaHoleEdgeToViaHoleEdgeClearance??t.minViaHoleEdgeToViaHoleEdgeClearance,A=e.minPlatedHoleDrillEdgeToDrillEdgeClearance??t.minPlatedHoleDrillEdgeToDrillEdgeClearance,c=e.minPadEdgeToPadEdgeClearance??t.minPadEdgeToPadEdgeClearance,l=e.minBoardEdgeClearance??t.minBoardEdgeClearance;return{...t,connections:TNo(t.connections,e.minTraceWidth),minTraceWidth:n,minViaDiameter:i,minViaHoleDiameter:o,minViaPadDiameter:i,min_via_hole_diameter:o,min_via_pad_diameter:i,minTraceToPadEdgeClearance:r,minViaEdgeToPadEdgeClearance:s,minViaHoleEdgeToViaHoleEdgeClearance:a,minPlatedHoleDrillEdgeToDrillEdgeClearance:A,minPadEdgeToPadEdgeClearance:c,minBoardEdgeClearance:l}}var kNo=(t,e)=\u003e{const n=t.connections.filter(s=\u003es.routingPcbGroupId!==e),o=new Set(n.map(s=\u003es.name)),i=[];for(const s of t.differentialPairs??[]){const a=o.has(s.connectionNames[0]),A=o.has(s.connectionNames[1]);if(a!==A)throw new Error(`Differential pair \"${s.connectionNames.join(\"/\")}\" cannot be split at a breakout boundary`);a\u0026\u0026i.push(s)}const r=(t.buses??[]).map(s=\u003e({...s,connectionNames:s.connectionNames.filter(a=\u003eo.has(a))})).filter(s=\u003es.connectionNames.length\u003e0);return{...t,connections:n,differentialPairs:i.length\u003e0?i:void 0,buses:r.length\u003e0?r:void 0}},FNo=(t,e)=\u003e({...t,traces:t.traces?.map(n=\u003e{const o=e.get(n.connection_name??\"\");return o?{...n,connectsTo:[...new Set([...n.connectsTo??[],o])]}:n})});function LNo({fanoutInputSimpleRouteJson:t,fanoutOutputSimpleRouteJson:e,baseSimpleRouteJson:n,routingPhasePlan:o}){const i=o.routingPcbGroupId;if(!i)return{downstreamSimpleRouteJson:e,baseSimpleRouteJson:n,synchronizedBreakoutPoints:[]};const r=new Map(e.connections.map(g=\u003e[g.name,g])),s=n.connections.map(g=\u003e({...g,pointsToConnect:g.pointsToConnect.map(h=\u003e({...h}))})),a=[],A=new Map;for(const g of t.connections){if(g.routingPcbGroupId!==i||!g.source_trace_id)continue;const h=r.get(g.name);if(!h)continue;const p=s.filter(f=\u003e{if(f.routingPcbGroupId===i)return!1;const I=f.source_trace_id===g.source_trace_id,C=f.pointsToConnect.some(y=\u003eg.pointsToConnect.some(x=\u003eZTt(y,x)));return!I\u0026\u0026!C?!1:f.pointsToConnect.some(y=\u003eg.pointsToConnect.some(x=\u003eI$(y,x)))}).flatMap(f=\u003ef.pointsToConnect.flatMap((I,C)=\u003eg.pointsToConnect.some(y=\u003eI$(I,y))?[{globalConnection:f,pointIndex:C,previousPoint:I}]:[]));if(p.length===0)continue;const m=h.pointsToConnect.findIndex((f,I)=\u003e{const C=g.pointsToConnect[I];return C!==void 0\u0026\u0026!ekt(f,C)});if(m\u003c0)continue;const _=h.pointsToConnect[m];for(const{globalConnection:f,pointIndex:I,previousPoint:C}of p){const{terminalVia:y,...x}=C,E={...x,x:_.x,y:_.y,layer:_.layer,..._.terminalVia?{terminalVia:{..._.terminalVia}}:{}};f.pointsToConnect[I]=E,C.pointId\u0026\u0026A.set(g.name,C.pointId),a.push({sourceTraceId:g.source_trace_id,routingPcbGroupId:i,previousPoint:C,fanoutExitPoint:_})}}const c=e.obstacles.filter(g=\u003eg.isFanoutSourceKeepout===!0\u0026\u0026g.componentId!==void 0),l=new Set(c.flatMap(g=\u003eg.componentId===void 0?[]:[g.componentId])),u=n.obstacles.filter(g=\u003e!g.componentId||!l.has(g.componentId));return{downstreamSimpleRouteJson:kNo(FNo(e,A),i),baseSimpleRouteJson:{...n,connections:s,obstacles:[...u,...c]},synchronizedBreakoutPoints:a}}function HNo(t){const e=[],o=t.pcb_smtpad.list().filter(i=\u003e{const r=t.pcb_component.get(i.pcb_component_id);return r?t.source_component.get(r.source_component_id)?.name?.startsWith(\"__autoplaced_jumper\"):!1});for(const i of o)if(i.shape!==\"polygon\"\u0026\u0026i.pcb_port_id){if(i.shape===\"rect\"||i.shape===\"rotated_rect\"){const r=i.width/2,s=i.height/2;e.push({pcb_port_id:i.pcb_port_id,x:i.x,y:i.y,minX:i.x-r,maxX:i.x+r,minY:i.y-s,maxY:i.y+s})}else if(i.shape===\"circle\"){const r=i.radius;e.push({pcb_port_id:i.pcb_port_id,x:i.x,y:i.y,minX:i.x-r,maxX:i.x+r,minY:i.y-r,maxY:i.y+r})}}return e}function okt(t,e,n,o=.01){for(const i of t)if(Math.abs(i.x-e)\u003co\u0026\u0026Math.abs(i.y-n)\u003co)return i.pcb_port_id}function ONo(t,e,n){for(const o of t)if(e\u003e=o.minX\u0026\u0026e\u003c=o.maxX\u0026\u0026n\u003e=o.minY\u0026\u0026n\u003c=o.maxY)return o}function GNo(t,e){if(t.length===0||e.length===0)return[t];const n=[];let o=[];for(let i=0;i\u003ct.length;i++){const r=t[i];if(o.push(r),r.route_type===\"wire\"\u0026\u0026i\u003e0\u0026\u0026i\u003ct.length-1){const s=ONo(e,r.x,r.y);if(s){r.end_pcb_port_id||(r.end_pcb_port_id=s.pcb_port_id),n.push(o);const a={...r};delete a.end_pcb_port_id,a.start_pcb_port_id||(a.start_pcb_port_id=s.pcb_port_id),o=[a]}}}return o.length\u003e0\u0026\u0026n.push(o),n}function YNo(t,e){const n=HNo(e);if(n.length===0)return t;const o=[];for(const i of t){const r=GNo(i,n);for(const s of r)if(s.length\u003e0){const a=s[0],A=s[s.length-1];if(a.route_type===\"wire\"\u0026\u0026!a.start_pcb_port_id){const c=okt(n,a.x,a.y);c\u0026\u0026(a.start_pcb_port_id=c)}if(A.route_type===\"wire\"\u0026\u0026!A.end_pcb_port_id){const c=okt(n,A.x,A.y);c\u0026\u0026(A.end_pcb_port_id=c)}o.push(s)}}return o}var ikt=({db:t,pcbTrace:e,routeWithSrjMetadata:n})=\u003e{for(const o of n){if(o.route_type!==\"through_pad\")continue;const i=o.circuitJsonMetadata?.pcb_via_id;if(!i)continue;const r=t.pcb_via.get(i);!r?.net_is_assignable||r.net_assigned\u0026\u0026r.pcb_trace_id!==e.pcb_trace_id||t.pcb_via.update(r.pcb_via_id,{pcb_trace_id:e.pcb_trace_id,net_assigned:!0})}},rkt=(t,e,n,o)=\u003eMath.max(n-e,t-o),UNo=t=\u003e{for(let e=0;e\u003ct.length;e++){const n=t[e];for(let o=e+1;o\u003ct.length;o++){const i=t[o];if(n.regionId\u0026\u0026n.regionId===i.regionId)continue;const r=rkt(n.bounds.minX,n.bounds.maxX,i.bounds.minX,i.bounds.maxX),s=rkt(n.bounds.minY,n.bounds.maxY,i.bounds.minY,i.bounds.maxY),a=Math.max(r,s),A=n.boundaryKeepaway+i.boundaryKeepaway;if(a+1e-6\u003cA)return{firstRegion:n,secondRegion:i,availableGap:a,requiredGap:A}}}};function kO({accumulatedPcbTraces:t,stageOutputPcbTraces:e}){const n=new Set(e.flatMap(o=\u003e[o.pcb_trace_id,...o.__replaces_pcb_trace_id?[o.__replaces_pcb_trace_id]:[]]));return[...t.filter(o=\u003e!n.has(o.pcb_trace_id)),...e]}var KNo=1e-6;function VNo({point:t,segmentStart:e,segmentEnd:n}){return t.layer\u0026\u0026(e.layer!==t.layer||n.layer!==t.layer)?!1:Zd(t,e,n)\u003c=KNo}function zNo({point:t,pad:e,traceWidth:n=0}){return e.shape===\"rect\"||e.shape===\"rotated_rect\"?Math.abs(t.x-e.x)\u003c=e.width/2+n/2\u0026\u0026Math.abs(t.y-e.y)\u003c=e.height/2+n/2:e.shape===\"circle\"?ad(t,e)\u003c=e.radius+n/2:!1}function JNo({point:t,hole:e,traceWidth:n=0}){return ad(t,e)\u003c=(e.outer_diameter??e.hole_diameter??0)/2+n/2}function WNo(t,e){const n=new Set,o=e.route,i=[o[0],o[o.length-1]].filter(r=\u003e!!r\u0026\u0026r.route_type===\"wire\"\u0026\u0026r.x!==void 0\u0026\u0026r.y!==void 0);for(const r of i){for(const s of t.pcb_port.list())s.source_port_id\u0026\u0026(r.layer\u0026\u0026s.layers\u0026\u0026!s.layers.includes(r.layer)||ad(r,s)\u003c=.01\u0026\u0026n.add(s.source_port_id));for(const s of t.pcb_smtpad.list()){if(!s.pcb_port_id||r.layer\u0026\u0026s.layer!==r.layer||!zNo({point:r,pad:s,traceWidth:r.width}))continue;const a=t.pcb_port.get(s.pcb_port_id)?.source_port_id;a\u0026\u0026n.add(a)}for(const s of t.pcb_plated_hole.list()){if(!s.pcb_port_id||!JNo({point:r,hole:s,traceWidth:r.width}))continue;const a=t.pcb_port.get(s.pcb_port_id)?.source_port_id;a\u0026\u0026n.add(a)}}return[...n]}function jNo(t){const e=t.route.filter(n=\u003en.route_type===\"wire\"\u0026\u0026n.x!==void 0\u0026\u0026n.y!==void 0);return[e[0],e[e.length-1]].filter(n=\u003e!!n)}function $No(t,e){const n=new Set,o=jNo(e);if(o.length===0)return[];for(const i of t.pcb_trace.list()){if(!i.source_trace_id||i.pcb_trace_id===e.pcb_trace_id||!t.source_trace.get(i.source_trace_id)\u0026\u0026!t.source_net.get(i.source_trace_id))continue;const r=i.route.filter(s=\u003es.route_type===\"wire\");for(let s=0;s\u003cr.length-1;s++){const a=r[s],A=r[s+1];if(!(!a||!A))for(const c of o)VNo({point:c,segmentStart:a,segmentEnd:A})\u0026\u0026n.add(i.source_trace_id)}}return[...n]}function qNo(t,e){const n=new Set;for(const o of e.route)for(const i of[o.start_pcb_port_id,o.end_pcb_port_id]){if(!i)continue;const r=t.pcb_port.get(i)?.source_port_id;r\u0026\u0026n.add(r)}return n.size\u003e0?[...n]:WNo(t,e)}function XNo(t){const e=new wQ({});return e.addConnections(t.map(n=\u003e[n.source_trace_id,...n.connected_source_port_ids,...n.connected_source_net_ids])),e}function MMe({db:t,trace:e,subcircuit_id:n}){if(e.source_trace_id\u0026\u0026(t.source_trace.get(e.source_trace_id)??t.source_net.get(e.source_trace_id)))return e.source_trace_id;const o=qNo(t,e);if(o.length===0)return $No(t,e)[0];const i=t.source_trace.list(),r=XNo(i),s=o.map(u=\u003er.getNetConnectedToId(u)).filter(u=\u003e!!u),a=o.length\u003e=2?i.find(u=\u003eo.every(g=\u003eu.connected_source_port_ids.includes(g))):void 0;if(a)return a.source_trace_id;const A=i.filter(u=\u003e{const g=r.getNetConnectedToId(u.source_trace_id);return s.some(h=\u003eh===g)}),c=A.filter(u=\u003eu.connected_source_port_ids.some(g=\u003eo.includes(g))),l=c.length\u003e0?c:A;if(l.length!==0)return(l.find(u=\u003eu.subcircuit_id===n)??l[0])?.source_trace_id}function ZNo(t,e){const o=[];for(const i of t){const r=e===\"vertical\"?i.center.y:i.center.x;let s=!1;for(const a of o){const A=e===\"vertical\"?a[0].center.y:a[0].center.x;if(Math.abs(r-A)\u003c.01){a.push(i),s=!0;break}}s||o.push([i])}return o.filter(i=\u003ei.length\u003e=2)}function eRo(t){const{db:e,output_jumpers:n,subcircuit_id:o}=t;for(let i=0;i\u003cn.length;i++){const r=n[i],s=e.source_component.insert({ftype:\"simple_chip\",name:`__autoplaced_jumper_${i}`,supplier_part_numbers:{}}),a=r.orientation===\"horizontal\"?0:90,A=r.pads[0]?.layer||r.pads[0]?.layers?.[0]||\"top\",c=e.pcb_component.insert({source_component_id:s.source_component_id,center:r.center,rotation:a,layer:A,width:r.width||0,height:r.height||0,obstructs_within_bounds:!1}),l=[];for(let g=0;g\u003cr.pads.length;g++){const h=r.pads[g],d=g+1,p=e.source_port.insert({source_component_id:s.source_component_id,name:`pin${d}`,pin_number:d}),m=h.layer||h.layers?.[0]||\"top\",_=e.pcb_port.insert({pcb_component_id:c.pcb_component_id,source_port_id:p.source_port_id,x:h.center.x,y:h.center.y,layers:[m]}),f=e.pcb_smtpad.insert({pcb_component_id:c.pcb_component_id,pcb_port_id:_.pcb_port_id,shape:\"rect\",x:h.center.x,y:h.center.y,width:h.width,height:h.height,layer:m});l.push({pad:h,sourcePortId:p.source_port_id,pcbSmtpadId:f.pcb_smtpad_id})}const u=ZNo(r.pads,r.orientation);for(const g of u){const h=[];for(const d of g){const p=l.find(m=\u003eMath.abs(m.pad.center.x-d.center.x)\u003c.01\u0026\u0026Math.abs(m.pad.center.y-d.center.y)\u003c.01);p\u0026\u0026h.push(p.sourcePortId)}h.length\u003e=2\u0026\u0026e.source_component_internal_connection.insert({source_component_id:s.source_component_id,subcircuit_id:o??void 0,source_port_ids:h})}}}function tRo(t){return{...t,type:\"pcb_trace\",pcb_trace_id:t.pcb_trace_id,connection_name:t.connection_name??t.source_trace_id??t.pcb_trace_id,route:t.route.map(e=\u003e({...e}))}}function nRo(t){const e=new Set;if(!t.subcircuit_id)return e;e.add(t.subcircuit_id);const n=t.root?.db;if(!n)return e;for(const o of uPe(n,t.subcircuit_id))e.add(o);return e}function DMe(t){const e=t.root?.db;if(!e)return[];const n=nRo(t);return e.pcb_trace.list().filter(o=\u003e!o.route||o.route.length\u003c2?!1:t.subcircuit_id?!!(o.subcircuit_id\u0026\u0026n.has(o.subcircuit_id)):!0)}function NMe(t){return typeof t!=\"string\"||t.length===0?[]:t.split(\"__\").flatMap(e=\u003e{if(e.length===0)return[];const n=[e],o=e.indexOf(\"_reroute_\");return o\u003e0\u0026\u0026n.push(e.slice(0,o)),n})}function RMe(t,e){if(!(typeof e!=\"string\"||e.length===0)){t.add(e);for(const n of NMe(e))t.add(n)}}function oRo({group:t,outputPcbTraces:e,pcbTraceIdsToReplace:n=[]}){const o=t.root?.db;if(!o)return;const i=new Set(n),r=new Set;for(const A of e){if(A.type!==\"pcb_trace\")continue;const c=A;i.add(c.pcb_trace_id),RMe(r,c.source_trace_id),RMe(r,c.connection_name),RMe(r,c.rootConnectionName)}if(i.size===0\u0026\u0026r.size===0)return;const s=DMe(t).filter(A=\u003ei.has(A.pcb_trace_id)||!!(A.source_trace_id\u0026\u0026A.subcircuit_id===t.subcircuit_id\u0026\u0026r.has(A.source_trace_id)));if(s.length===0)return;const a=new Set(s.map(A=\u003eA.pcb_trace_id));for(const A of o.pcb_via.list())A.pcb_trace_id\u0026\u0026a.has(A.pcb_trace_id)\u0026\u0026o.pcb_via.delete(A.pcb_via_id);for(const A of s)o.pcb_trace.delete(A.pcb_trace_id)}function iRo(t){return DMe(t).map(tRo)}function rRo(t){const e=t.filter(s=\u003es.route_type===\"jumper\"),n=t.filter(s=\u003es.route_type!==\"jumper\");if(e.length===0)return null;const o=[];for(const s of e){const a=s.start,A=s.end;let c=-1,l=-1,u=1/0,g=1/0;for(let h=0;h\u003cn.length;h++){const d=n[h];if(d.route_type!==\"wire\")continue;const p=Math.hypot(d.x-a.x,d.y-a.y),m=Math.hypot(d.x-A.x,d.y-A.y);p\u003cu\u0026\u0026(u=p,c=h),m\u003cg\u0026\u0026(g=m,l=h)}c\u003el\u0026\u0026([c,l]=[l,c]),c\u003e=0\u0026\u0026l\u003e=0\u0026\u0026c!==l\u0026\u0026o.push({startIdx:c,endIdx:l})}o.sort((s,a)=\u003es.startIdx-a.startIdx);const i=[];let r=0;for(const s of o)r\u003cs.startIdx\u0026\u0026i.push(n.slice(r,s.startIdx+1)),r=s.endIdx;return r\u003cn.length\u0026\u0026i.push(n.slice(r)),i}function skt(t,e){const{width:n,height:o,pcbAnchorAlignment:i}=e;if(!i)return t;const r=i;if(typeof n!=\"number\"||typeof o!=\"number\")return t;const s=t.x,a=t.y;switch(r){case\"top_left\":return{x:s+n/2,y:a-o/2};case\"top_center\":return{x:s,y:a-o/2};case\"top_right\":return{x:s-n/2,y:a-o/2};case\"center_left\":return{x:s+n/2,y:a};case\"center_right\":return{x:s-n/2,y:a};case\"bottom_left\":return{x:s+n/2,y:a+o/2};case\"bottom_center\":return{x:s,y:a+o/2};case\"bottom_right\":return{x:s-n/2,y:a+o/2};default:return t}}var akt=(t,e)=\u003e{const n=W7(t);return Math.hypot(n.x-e.x,n.y-e.y)},Akt=t=\u003e{const e=t.root?.platform;return e!==void 0\u0026\u0026\"allowLegacyAutorouters\"in e\u0026\u0026e.allowLegacyAutorouters===!0},ckt=t=\u003e{if(Akt(t))return null;const e=t._parsedProps.autorouter??t.getInheritedProperty(\"autorouter\");return dRt(e)},lkt=t=\u003e{if(Akt(t))return null;const e=ckt(t);if(e)return e;const n=t.selectAll(\"autoroutingphase\").map(o=\u003eo._parsedProps.autorouter);for(const o of n){const i=dRt(o);if(i)return i}return null},sRo=({db:t,route:e,routeThicknessMode:n,sourceTraceId:o})=\u003e{if(!o||e.length\u003c2)return e;const r=t.source_trace.get(o)?.connected_source_port_ids[0];if(!r)return e;const s=t.pcb_port.list().find(c=\u003ec.source_port_id===r);if(!s)return e;const a=e[0],A=e[e.length-1];return akt(A,s)\u003cakt(a,s)?B0e(e,n):e},A6=class extends g0{pcb_group_id=null;schematic_group_id=null;subcircuit_id=null;_hasStartedAsyncAutorouting=!1;_pcbPlacementDrcErrorCount=null;_pcbPlacementDrcCheckError=null;_pcbPlacementDrcChecksPending=!1;_standaloneSubcircuitDrcChecksComplete=!1;_standaloneSubcircuitDrcChecksInProgress=!1;_isInflatedFromCircuitJson=!1;_isolatedCircuitJson=null;get _isIsolatedSubcircuit(){return!!this.getInheritedProperty(\"_subcircuitCachingEnabled\")}_normalComponentNameMap=null;getNormalComponentNameMap(){if(this._normalComponentNameMap)return this._normalComponentNameMap;const t=new Map,e=n=\u003e{if(n._isNormalComponent\u0026\u0026n.name){const o=t.get(n.name);o?o.push(n):t.set(n.name,[n])}for(const o of n.children)o.isSubcircuit||e(o)};for(const n of this.children)n.isSubcircuit||e(n);return this._normalComponentNameMap=t,t}_asyncAutoroutingResult=null;get config(){return{zodProps:mwn,componentName:\"Group\"}}initPorts(t={}){const e=this._getSchematicPortArrangement();this._parsedProps?.showAsSchematicBox\u0026\u0026!this._parsedProps.pinLabels\u0026\u0026e\u0026\u0026rPe(e).some(o=\u003etypeof o==\"string\")||super.initPorts(t)}_getSchematicPortArrangementFromPortDirections(){if(!this._parsedProps?.showAsSchematicBox)return null;const t={leftSide:[],rightSide:[],topSide:[],bottomSide:[]};for(const n of this.children){if(n.componentName!==\"Port\")continue;const o=n._parsedProps.direction;if(!o)continue;const i=n._parsedProps.pinNumber??n._parsedProps.name??void 0;if(i===void 0)continue;t[o===\"left\"?\"leftSide\":o===\"right\"?\"rightSide\":o===\"up\"?\"topSide\":\"bottomSide\"].push(i)}if(t.leftSide.length===0\u0026\u0026t.rightSide.length===0\u0026\u0026t.topSide.length===0\u0026\u0026t.bottomSide.length===0)return null;const e={};return t.leftSide.length\u003e0\u0026\u0026(e.leftSide={pins:t.leftSide,direction:\"top-to-bottom\"}),t.rightSide.length\u003e0\u0026\u0026(e.rightSide={pins:t.rightSide,direction:\"top-to-bottom\"}),t.topSide.length\u003e0\u0026\u0026(e.topSide={pins:t.topSide,direction:\"left-to-right\"}),t.bottomSide.length\u003e0\u0026\u0026(e.bottomSide={pins:t.bottomSide,direction:\"left-to-right\"}),e}_getSchematicPortArrangement(){return super._getSchematicPortArrangement()??this._getSchematicPortArrangementFromPortDirections()}_ensureSchematicBoxPortsFromConnections(){if(this._parsedProps?.showAsSchematicBox\u0026\u0026this._parsedProps?.connections)for(const[t,e]of Object.entries(this._parsedProps.connections)){if(this.children.find(r=\u003er.componentName===\"Port\"\u0026\u0026r.isMatchingAnyOf([t])))continue;const o=t.match(/^pin(\\d+)$/i)??t.match(/^(\\d+)$/),i=o?Number(o[1]):void 0;this.add(new Pu({name:t,pinNumber:i,connectsTo:e}))}}doInitialInitializePortsFromChildren(){super.doInitialInitializePortsFromChildren(),this._ensureSchematicBoxPortsFromConnections()}updateInitializePortsFromChildren(){super.updateInitializePortsFromChildren(),this._ensureSchematicBoxPortsFromConnections()}_getPrimaryPinCount(){const t=super._getPrimaryPinCount();if(!this._parsedProps?.showAsSchematicBox)return t;const e=this.children.filter(n=\u003en.componentName===\"Port\").map(n=\u003en._parsedProps.pinNumber).filter(n=\u003en!==void 0);return e.length===0?t:Math.max(t,...e)}_getPinLabelsFromPorts(){return this._parsedProps?.showAsSchematicBox?KMo(this):super._getPinLabelsFromPorts()}doInitialSourceGroupRender(){const{db:t}=this.root,e=typeof this._parsedProps.name==\"string\"\u0026\u0026this._parsedProps.name.length\u003e0,n=t.source_group.insert({name:this.name,is_subcircuit:this.isSubcircuit,was_automatically_named:!e});this.source_group_id=n.source_group_id,this.isSubcircuit\u0026\u0026(this.subcircuit_id=`subcircuit_${n.source_group_id}`,t.source_group.update(n.source_group_id,{subcircuit_id:this.subcircuit_id}))}doInitialSourceRender(){const{db:t}=this.root;for(const n of this.getDescendants())n.getGroup()?.source_group_id===this.source_group_id\u0026\u0026t.source_component.update(n.source_component_id,{source_group_id:this.source_group_id});if(!this.isSubcircuit)return;const e=lkt(this);e\u0026\u0026t.source_property_ignored_warning.insert({source_component_id:this.source_component_id??\"\",property_name:\"autorouter\",subcircuit_id:this.subcircuit_id??void 0,error_type:\"source_property_ignored_warning\",message:`The \"${e}\" autorouter is deprecated, so autorouting has been disabled for this subcircuit. Use the default autorouter and introduce \u003cautoroutingphase /\u003e or \u003cfanout /\u003e elements as needed.`})}doInitialSourceParentAttachment(){const{db:t}=this.root,e=this.parent?.getGroup?.();if(e?.source_group_id\u0026\u0026t.source_group.update(this.source_group_id,{parent_source_group_id:e.source_group_id}),!this.isSubcircuit||U0e(this.parent))return;const n=this.parent?.getSubcircuit?.()?.subcircuit_id;n\u0026\u0026t.source_group.update(this.source_group_id,{parent_subcircuit_id:n})}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=e,o=n.outline\u0026\u0026n.outline.length\u003e0,i=o?n.outline.map(c=\u003e({x:lt.parse(c.x),y:lt.parse(c.y)})):void 0,r=this.props,s=this._getGlobalPcbPositionBeforeLayout(),a=skt(s,r),A=t.pcb_group.insert({is_subcircuit:this.isSubcircuit,subcircuit_id:this.subcircuit_id??this.getSubcircuit()?.subcircuit_id,name:this.name,anchor_position:s,center:a,...o?{outline:i}:{width:0,height:0},pcb_component_ids:[],source_group_id:this.source_group_id,autorouter_configuration:e.autorouter?{trace_clearance:e.autorouter.traceClearance}:void 0,anchor_alignment:e.pcbAnchorAlignment??null});this.pcb_group_id=A.pcb_group_id;for(const c of this.children)t.pcb_component.update(c.pcb_component_id,{pcb_group_id:A.pcb_group_id})}doInitialPcbPrimitiveRender(){this.calculatePcbGroupBounds()}calculatePcbGroupBounds(t){if(!this.pcb_group_id||this.root?.pcbDisabled)return;const{db:e}=this.root,n=this._parsedProps,o=n.outline\u0026\u0026n.outline.length\u003e0,i=this._parsedProps.pcbX!==void 0||this._parsedProps.pcbY!==void 0;if(o){const m=n.outline.map(y=\u003e({x:lt.parse(y.x),y:lt.parse(y.y)})),_=Oh(m);if(!_)return;const f=(_.minX+_.maxX)/2,I=(_.minY+_.maxY)/2,C=i?e.pcb_group.get(this.pcb_group_id)?.center??{x:f,y:I}:{x:f,y:I};e.pcb_group.update(this.pcb_group_id,{center:C});return}let r=t;if(!r){const m=L0e(this.children);r={center:{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2},width:m.width,height:m.height}}let{width:s,height:a}=r,{x:A,y:c}=r.center;if(this.isSubcircuit||this.isRoutingDirective){const{padLeft:m,padRight:_,padTop:f,padBottom:I}=this._resolvePcbPadding();s+=m+_,a+=f+I,A+=(_-m)/2,c+=(f-I)/2}const l=Number(n.width??s),u=Number(n.height??a),h=e.pcb_group.get(this.pcb_group_id)?.center??{x:A,y:c},d=this.isSubcircuit||t!==void 0;let p=i?d?{x:n.width===void 0?A:h.x,y:n.height===void 0?c:h.y}:h:{x:A,y:c};if(i\u0026\u0026n.pcbAnchorAlignment){const m=this._getGlobalPcbPositionBeforeLayout(),_=skt(m,{...this.props,width:l,height:u});(Math.abs(_.x-p.x)\u003e1e-6||Math.abs(_.y-p.y)\u003e1e-6)\u0026\u0026this._repositionOnPcb(_),p=_}e.pcb_group.update(this.pcb_group_id,{width:l,height:u,center:p})}updatePcbPrimitiveRender(){this.calculatePcbGroupBounds()}unnamedElementCounter={};getNextAvailableName(t){return this.unnamedElementCounter[t.lowercaseComponentName]??=1,`unnamed_${t.lowercaseComponentName}${this.unnamedElementCounter[t.lowercaseComponentName]++}`}_resolvePcbPadding(){const t=this._parsedProps,e=t.pcbLayout,n=l=\u003e{const u=e?.[l],g=t[l];if(typeof u==\"number\")return u;if(typeof g==\"number\")return g},o=n(\"padding\")??0,i=n(\"paddingX\"),r=n(\"paddingY\"),s=n(\"paddingLeft\")??i??o,a=n(\"paddingRight\")??i??o,A=n(\"paddingTop\")??r??o,c=n(\"paddingBottom\")??r??o;return{padLeft:s,padRight:a,padTop:A,padBottom:c}}doInitialCreateTraceHintsFromProps(){const{_parsedProps:t}=this,{db:e}=this.root,n=t;if(!this.isSubcircuit)return;const o=n.manualEdits?.manual_trace_hints;if(o)for(const i of o)this.add(new qRt({for:i.pcb_port_selector,offsets:i.offsets}))}doInitialSourceAddConnectivityMapKey(){mNo(this),hMo(this)}_areChildSubcircuitsRouted(){const t=this._findDirectChildSubcircuits();for(const e of t)if(!e._isInflatedFromCircuitJson\u0026\u0026e._hasTracesToRoute()\u0026\u0026e._shouldRouteAsync()\u0026\u0026!e._asyncAutoroutingResult)return!1;return!0}_findDirectChildSubcircuits(){const t=[],e=n=\u003e{for(const o of n)o.isSubcircuit\u0026\u0026o!==this?t.push(o):e(o.children)};return e(this.children),t}_shouldRouteAsync(){if(this._isLegacyAutorouterDisabled())return!1;const t=this._getAutorouterConfig();return t.groupMode===\"sequential-trace\"?!1:!!(t.local\u0026\u0026t.groupMode===\"subcircuit\"||!t.local)}_getRoutingPhasePlans(){return QNo(this)}_hasTracesToRoute(){const t=vc(\"tscircuit:core:_hasTracesToRoute\"),e=this._getRoutingPhasePlans();let n=0,o=!1;for(const i of e){n+=i.traces.length;const r=i.autorouter?h$(i.autorouter,this.root?.platform):void 0;o||=!!(i.reroute\u0026\u0026(i.region||r?.preset===\"simplify\"))}if(t(`[${this.getString()}] has ${n} traces to route`),n\u003e0)return!0;if(o){const i=DMe(this).length;return t(`[${this.getString()}] has ${i} existing pcb traces available for reroute`),i\u003e0}return!1}async _runEffectMakeHttpAutoroutingRequest(){const{db:t}=this.root,e=vc(\"tscircuit:core:_runEffectMakeHttpAutoroutingRequest\"),n=this._parsedProps,o=this._getAutorouterConfig(),i=o.serverUrl,r=o.serverMode,s=(c,l)=\u003e(e(\"fetching\",c),l.headers\u0026\u0026(l.headers[\"Tscircuit-Core-Version\"]=this.root?.getCoreVersion()),fetch(c,l)),a=this.root.db.toArray().filter(c=\u003ec.type.startsWith(\"source_\")||c.type.startsWith(\"pcb_\"));if(r===\"solve-endpoint\"){if(this.props.autorouter?.inputFormat===\"simplified\"){const l=n.defaultTraceWidth??n.nominalTraceWidth,{simpleRouteJson:u}=fMe({db:t,minTraceWidth:Number(n.minTraceWidth??.15),nominalTraceWidth:l!=null?Number(l):void 0,subcircuit_id:this.subcircuit_id,subcircuitComponent:this});u.allowViaInPad=o.allowViaInPad;const{autorouting_result:g}=await s(`${i}/autorouting/solve`,{method:\"POST\",body:JSON.stringify({input_simple_route_json:u,subcircuit_id:this.subcircuit_id}),headers:{\"Content-Type\":\"application/json\"}}).then(h=\u003eh.json());this._asyncAutoroutingResult=g,this._markDirty(\"PcbTraceRender\");return}const{autorouting_result:c}=await s(`${i}/autorouting/solve`,{method:\"POST\",body:JSON.stringify({input_circuit_json:a,subcircuit_id:this.subcircuit_id}),headers:{\"Content-Type\":\"application/json\"}}).then(l=\u003el.json());this._asyncAutoroutingResult=c,this._markDirty(\"PcbTraceRender\");return}const{autorouting_job:A}=await s(`${i}/autorouting/jobs/create`,{method:\"POST\",body:JSON.stringify({input_circuit_json:a,provider:\"freerouting\",autostart:!0,display_name:this.root?.name,subcircuit_id:this.subcircuit_id,server_cache_enabled:o.serverCacheEnabled}),headers:{\"Content-Type\":\"application/json\"}}).then(c=\u003ec.json());for(;;){const{autorouting_job:c}=await s(`${i}/autorouting/jobs/get`,{method:\"POST\",body:JSON.stringify({autorouting_job_id:A.autorouting_job_id}),headers:{\"Content-Type\":\"application/json\"}}).then(l=\u003el.json());if(c.is_finished){const{autorouting_job_output:l}=await s(`${i}/autorouting/jobs/get_output`,{method:\"POST\",body:JSON.stringify({autorouting_job_id:A.autorouting_job_id}),headers:{\"Content-Type\":\"application/json\"}}).then(u=\u003eu.json());this._asyncAutoroutingResult={output_pcb_traces:l.output_pcb_traces},this._markDirty(\"PcbTraceRender\");break}if(c.has_error){const l=new Oj(`Autorouting job failed: ${JSON.stringify(c.error)}`);throw t.pcb_autorouting_error.insert({pcb_error_id:A.autorouting_job_id,error_type:\"pcb_autorouting_error\",message:l.message}),l}await new Promise(l=\u003esetTimeout(l,100))}}async _runLocalAutorouting(){const{db:t}=this.root,e=this._parsedProps,n=vc(\"tscircuit:core:_runLocalAutorouting\");n(`[${this.getString()}] starting local autorouting`);const o=this._getAutorouterConfig(),i=this._isLaserPrefabAutorouter(o),r=this._isAutoJumperAutorouter(o),s=this._getSubcircuitLayerCount()===1,a=Number(e.minTraceWidth??.15),A=Number(e.defaultTraceWidth??e.nominalTraceWidth??a),c=this._getRoutingPhasePlans(),l=NNo(c),u=c.length\u003e1,g=new Map(c.map((k,R)=\u003e[k,R]));if(u)for(const k of t.pcb_debug_object.list())k.subcircuit_id===this.subcircuit_id\u0026\u0026(k.label?.startsWith(\"Autorouting phase: \")||/^autorouting phase \\d+(?: |$)/.test(k.label??\"\"))\u0026\u0026t.pcb_debug_object.delete(k.pcb_debug_object_id);const h=(k,R)=\u003e{if(!u)return;const F=g.get(k);if(F===void 0)return;const O=k.phaseName?.trim();t.pcb_debug_object.insert({shape:\"rect\",center:{x:(R.minX+R.maxX)/2,y:(R.minY+R.maxY)/2},size:{width:R.maxX-R.minX,height:R.maxY-R.minY},label:`autorouting phase ${F}${O?` ${O}`:\"\"}`,subcircuit_id:this.subcircuit_id??void 0})},d=c.flatMap(k=\u003e{const R=k.autorouter?h$(k.autorouter,this.root?.platform):o,F=k.getPrecomputedRoutingResult?{...R,allowViaInPad:(typeof k.autorouter==\"object\"?k.autorouter.allowViaInPad:void 0)??o.allowViaInPad}:R,O=RPo(F,this.root?.platform);return O.map((U,Y)=\u003e({...U,routingPhasePlan:k,phaseStageIndex:Y,phaseStageCount:O.length}))}),m=d.some(({autorouterConfig:k})=\u003e[\"fanout\",\"single_layer_fanout\"].includes(k.preset??\"\"))?fNo(this,c):void 0;let{simpleRouteJson:_}=fMe({db:t,minTraceWidth:a,nominalTraceWidth:A,subcircuit_id:this.subcircuit_id,subcircuitComponent:this,fanoutPourNetMap:m});const f=k=\u003e{const R=k.fanoutRegionPcbGroupId;if(!R)return;const F=t.pcb_group.get(R),O=t.pcb_component.list().find(W=\u003eW.pcb_group_id===R)?.source_component_id;if(!O)return;const U=`${F?.name??\"Breakout\"} defines conflicting fanout bounds with explicit breakout geometry and fanoutBoundaryPadding. Explicit breakout geometry takes precedence, so fanoutBoundaryPadding is ignored.`;t.source_property_ignored_warning.list().some(W=\u003eW.source_component_id===O\u0026\u0026W.property_name===\"fanoutBoundaryPadding\"\u0026\u0026W.message===U)||t.source_property_ignored_warning.insert({source_component_id:O,property_name:\"fanoutBoundaryPadding\",message:U,error_type:\"source_property_ignored_warning\",subcircuit_id:F?.subcircuit_id})},I=new Map;for(const k of d){const R=k.autorouterConfig.preset;(R===\"fanout\"||R===\"single_layer_fanout\")\u0026\u0026!I.has(k.routingPhasePlan)\u0026\u0026I.set(k.routingPhasePlan,k.autorouterConfig)}const C=[];for(const[k,R]of I){const F=k.fanoutRegionPcbGroupId;if(!F)continue;let O=Lue(_,k);if(O.connections.length===0)continue;O=nkt(O,k.drcTolerances);const U=t.pcb_breakout_point.list().filter(ie=\u003eie.pcb_group_id===F).map(ie=\u003e({x:ie.x,y:ie.y})),Y=R.preset,W=aMe.resolveFanoutBounds(O,{mode:Y,busFanoutDirections:k.busFanoutDirections,fanoutBounds:k.fanoutBounds,fanoutBoundaryPadding:k.fanoutBoundaryPadding,fanoutRoutingLayers:k.fanoutRoutingLayers,allowBlindAndBuriedVias:O.allowBlindAndBuriedVias,breakoutPoints:U,onFanoutBoundsConflict:()=\u003ef(k)});if(k.fanoutBounds=W,!W)continue;const te=t.pcb_group.get(F),j=Math.max(O.minTraceWidth,...O.connections.map(ie=\u003eie.nominalTraceWidth??ie.width??O.minTraceWidth)),J=O.minViaPadDiameter??O.min_via_pad_diameter??O.minViaDiameter,oe=O.minTraceToPadEdgeClearance??O.defaultObstacleMargin??j;C.push({regionId:F,name:te?.name??k.phaseName??F,bounds:W,boundaryKeepaway:gRt({traceWidth:j,traceToPadClearance:oe,viaPadDiameter:J})/2})}const y=UNo(C);if(y){const{firstRegion:k,secondRegion:R,availableGap:F,requiredGap:O}=y,U=F\u003c0?`overlap by ${Math.abs(F).toFixed(3)}mm`:`are only ${F.toFixed(3)}mm apart`,Y=`Fanout regions \"${k.name}\" and \"${R.name}\" ${U}, but at least ${O.toFixed(3)}mm of separation is required for a via-safe routing channel. Move the components farther apart or reduce their facing fanout padding.`;throw t.pcb_autorouting_error.insert({pcb_error_id:`pcb_autorouter_error_subcircuit_${this.subcircuit_id}`,error_type:\"pcb_autorouting_error\",message:Y}),this.root?.emit(\"autorouting:error\",{subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),error:{message:Y},simpleRouteJson:_}),new Error(Y)}for(const{regionId:k,bounds:R}of C)t.pcb_group.update(k,{center:{x:(R.minX+R.maxX)/2,y:(R.minY+R.maxY)/2},width:R.maxX-R.minX,height:R.maxY-R.minY});const x=[],E=[],B=new Set,S=iRo(this),Q=(k,R)=\u003e{const F=k.connection_name??k.pcb_trace_id,O=new Set([F,k.pcb_trace_id,...NMe(F),...NMe(k.pcb_trace_id)]);return _.connections.some(U=\u003etkt(U,R)?O.has(U.name)||(U.source_trace_id?O.has(U.source_trace_id):!1)||(U.rootConnectionName?O.has(U.rootConnectionName):!1)||U.mergedConnectionNames?.some(Y=\u003eO.has(Y)):!1)},w=new Set;let M;for(const[k,{routingPhasePlan:R,autorouterConfig:F,strategy:O,usesPreviousStageOutput:U,phaseStageIndex:Y,phaseStageCount:W}]of d.entries()){if(U||(M=void 0),U\u0026\u0026M===void 0)throw new Error(\"Autorouting follow-up stage is missing the preceding stage output\");let te=M??_;const j=!!(R.reroute\u0026\u0026F.preset===\"simplify\"),J=!!(R.reroute\u0026\u0026R.region\u0026\u0026!j),oe=!!(R.reroute\u0026\u0026!j\u0026\u0026!R.region\u0026\u0026R.traces.length\u003e0),ie=J||oe||j,ne=J?{..._,traces:[...S,...x]}:null;if(!U\u0026\u0026j)te={...Lue(_,R),traces:kO({accumulatedPcbTraces:S,stageOutputPcbTraces:x})};else if(!U\u0026\u0026J\u0026\u0026ne)te=Iho(ne,{...R.region});else if(!U\u0026\u0026oe){const Le=Lue(_,R);te={...Le,traces:[...Le.traces??[],...x.filter(Ye=\u003e!Q(Ye,R))]}}else if(!U\u0026\u0026l){const Le=Lue(_,R),Ye=R.routingPcbGroupId;if(Ye){const At=fMe({db:t,minTraceWidth:a,nominalTraceWidth:A,subcircuit_id:this.subcircuit_id,subcircuitComponent:this,routingPcbGroupId:Ye,fanoutPourNetMap:m}).simpleRouteJson.obstacles.filter(nt=\u003ent.isCopperPour),at=Le.obstacles.filter(nt=\u003e!nt.isCopperPour);Le.obstacles=at.concat(At)}te={...Le,traces:kO({accumulatedPcbTraces:Le.traces??[],stageOutputPcbTraces:x})}}te=U8o(te,w),te=nkt(te,R.drcTolerances),te.allowViaInPad=F.allowViaInPad;const le=U?void 0:R.getPrecomputedRoutingResult,ge=!!(j\u0026\u0026te.traces?.length===0);if((l||ie||U)\u0026\u0026(te.connections.length===0\u0026\u0026!j\u0026\u0026!le||ge)){Y===0\u0026\u0026h(R,te.bounds),M=te;continue}const _e=R.autorouter!==void 0?this._isAutoJumperAutorouter(F):r,ue=R.autorouter!==void 0?this._isLaserPrefabAutorouter(F):i;_e\u0026\u0026(te.allowJumpers=!0,F.availableJumperTypes\u0026\u0026(te.availableJumperTypes=F.availableJumperTypes));const fe=F.preset;if((fe===\"fanout\"||fe===\"single_layer_fanout\")\u0026\u0026!R.fanoutRegionPcbGroupId\u0026\u0026!le\u0026\u0026(R.fanoutBounds=aMe.resolveFanoutBounds(te,{mode:fe,busFanoutDirections:R.busFanoutDirections,fanoutBounds:R.fanoutBounds,fanoutBoundaryPadding:R.fanoutBoundaryPadding,fanoutRoutingLayers:R.fanoutRoutingLayers,allowBlindAndBuriedVias:te.allowBlindAndBuriedVias})),Y===0\u0026\u0026h(R,R.fanoutBounds??te.bounds),n.enabled\u0026\u0026global.debugOutputArray?.push({name:`simpleroutejson-${this.props.name}.json`,obj:te}),n.enabled){const Le=mx(te);Le.title=`autorouting-${this.props.name}`,global.debugGraphics?.push(Le)}const pe=F.autorouterVersion??this.props.autorouterVersion,ye=this.props.autorouterEffortLevel,Me=ye?Number.parseInt(ye.replace(\"x\",\"\"),10):void 0,ve={capacityDepth:F.capacityDepth,targetMinCapacity:F.targetMinCapacity,platformConfig:this.root?.platform,useAssignableSolver:ue||s,useAutoJumperSolver:_e,useLaserPrefabSolver:ue,autorouterVersion:pe,effort:Me},he=le?\"precomputed\":F.algorithmFn?\"custom\":O.name,Qe=le||F.algorithmFn?void 0:O.getSolverName(ve),Pe={autorouterName:he,solverName:Qe,capacityDepth:ve.capacityDepth,targetMinCapacity:ve.targetMinCapacity,useAssignableSolver:ve.useAssignableSolver,useAutoJumperSolver:ve.useAutoJumperSolver,useLaserPrefabSolver:ve.useLaserPrefabSolver,useTraceSimplificationSolver:F.preset===\"simplify\",autorouterVersion:ve.autorouterVersion,effort:ve.effort},we=le||F.algorithmFn||!O.cacheable?void 0:this.root?.platform?.localCacheEngine,Te=we?vNo(te,Pe):void 0,Re=Te?await wNo({cacheEngine:we,cacheKey:Te}):null,Ee=le?\"precomputed\":F.algorithmFn?\"custom_algorithm\":O.cacheable?we?void 0:\"no_cache_engine\":\"strategy_not_cacheable\",ke={routingPhaseIndex:k,phaseOrdinal:k+1,phaseCount:d.length,connectionCount:te.connections.length,obstacleCount:te.obstacles.length,previousTraceCount:te.traces?.length??0,isReroutePhase:ie,autorouterName:he,autorouterVersion:pe,solverName:Qe,effort:Me,cacheStatus:we?Re?\"hit\":\"miss\":\"disabled\",cacheKey:Te,cacheDisabledReason:Ee};this.root?.emit(\"autorouting:start\",{type:\"autorouting:start\",subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,simpleRouteJson:te});let Ce;try{let Le,Ye;if(le){const bt=le(te);Le=bt.traces,Ye=bt.outputSimpleRouteJson;for(const Ct of Le)w.add(Ct.pcb_trace_id)}else if(Re)n(`[${this.getString()}] using cached local autorouting result`),Le=Re.traces;else{if(F.algorithmFn?Ce=await F.algorithmFn(te):Ce=O.create({simpleRouteJson:te,commonAutorouterOptions:ve,busFanoutDirections:R.busFanoutDirections,fanoutBounds:R.fanoutBounds,fanoutRoutingLayers:R.fanoutRoutingLayers,allowBlindAndBuriedVias:te.allowBlindAndBuriedVias,componentNamesById:pwo(t),onSolverStarted:({solverName:Dt,solverParams:kt,solverConstructorArgs:it})=\u003ethis.root?.emit(\"solver:started\",{type:\"solver:started\",solverName:Dt,solverParams:kt,solverConstructorArgs:it,componentName:this.getString()})}),!Ce)throw new Error(\"Failed to create local autorouter\");const bt=Ce,Ct=new Promise((Dt,kt)=\u003e{bt.on(\"complete\",it=\u003e{n(`[${this.getString()}] local autorouting complete`),Dt(it.traces)}),bt.on(\"error\",it=\u003e{n(`[${this.getString()}] local autorouting error: ${it.error.message}`),kt(it.error)})});bt.on(\"progress\",Dt=\u003e{this.root?.emit(\"autorouting:progress\",{subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,...Dt,type:\"autorouting:progress\"})}),bt.start(),Le=await Ct}let tt=Ye??Ce?.getOutputSimpleRouteJson?.();if(tt\u0026\u0026!U\u0026\u0026[\"fanout\",\"single_layer_fanout\"].includes(F.preset??\"\")\u0026\u0026R.routingPcbGroupId){const bt=LNo({fanoutInputSimpleRouteJson:te,fanoutOutputSimpleRouteJson:tt,baseSimpleRouteJson:_,routingPhasePlan:R});_=bt.baseSimpleRouteJson,tt=bt.downstreamSimpleRouteJson;for(const Ct of bt.synchronizedBreakoutPoints){const Dt=t.pcb_breakout_point.list().find(kt=\u003ekt.pcb_group_id===Ct.routingPcbGroupId\u0026\u0026kt.source_trace_id===Ct.sourceTraceId\u0026\u0026Math.abs(kt.x-Ct.previousPoint.x)\u003c=1e-6\u0026\u0026Math.abs(kt.y-Ct.previousPoint.y)\u003c=1e-6);Dt\u0026\u0026t.pcb_breakout_point.update(Dt.pcb_breakout_point_id,{x:Ct.fanoutExitPoint.x,y:Ct.fanoutExitPoint.y})}}let At=Le;tt?.traces?At=tt.traces:U\u0026\u0026(At=kO({accumulatedPcbTraces:te.traces??[],stageOutputPcbTraces:Le}));let at=At;!tt\u0026\u0026!U\u0026\u0026R.routingPhaseIndex!==null\u0026\u0026(at=kO({accumulatedPcbTraces:te.traces??[],stageOutputPcbTraces:Le}));const nt={...tt??te,traces:at};if(M=tt?nt:void 0,!Re\u0026\u0026Te\u0026\u0026await PNo({cacheEngine:we,cacheKey:Te,result:{...te,traces:Le}}),this.root?.emit(\"autorouting:end\",{type:\"autorouting:end\",subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,simpleRouteJson:nt}),Ce?.getConnectedOffboardObstacles){const bt=Ce.getConnectedOffboardObstacles();hwo({db:t,connectedOffboardObstacles:bt,simpleRouteJson:te,subcircuit_id:this.subcircuit_id})}const gt=Ce?.solver;if(gt?.getOutputJumpers\u0026\u0026E.push(...gt.getOutputJumpers()||[]),J\u0026\u0026ne){for(const Ct of ne.traces??[])Ct.type===\"pcb_trace\"\u0026\u0026B.add(Ct.pcb_trace_id);const bt=Cho(ne,{...te,traces:[...te.traces??[],...Le]});x.splice(0,x.length,...bt.traces??[])}else if(oe){const bt=x.filter(Ct=\u003e!Q(Ct,R));x.splice(0,x.length,...kO({accumulatedPcbTraces:bt,stageOutputPcbTraces:At}))}else{if(j)for(const bt of S)B.add(bt.pcb_trace_id);x.splice(0,x.length,...kO({accumulatedPcbTraces:x,stageOutputPcbTraces:At}))}}catch(Le){const{db:Ye}=this.root;throw Ye.pcb_autorouting_error.insert({pcb_error_id:`pcb_autorouter_error_subcircuit_${this.subcircuit_id}`,error_type:\"pcb_autorouting_error\",message:Le instanceof Error?Le.message:String(Le)}),this.root?.emit(\"autorouting:error\",{type:\"autorouting:error\",subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,error:{message:Le instanceof Error?Le.message:String(Le)},simpleRouteJson:te}),Le}finally{Ce?.stop()}}this._asyncAutoroutingResult={output_pcb_traces:x,output_jumpers:E,pcb_trace_ids_to_be_replaced:[...B]},this._markDirty(\"PcbTraceRender\")}_startAsyncAutorouting(){this._hasStartedAsyncAutorouting||(this._hasStartedAsyncAutorouting=!0,this._getAutorouterConfig().local?this._queueAsyncEffect(\"autorouting\",async()=\u003ethis._runLocalAutorouting()):this._queueAsyncEffect(\"make-http-autorouting-request\",async()=\u003ethis._runEffectMakeHttpAutoroutingRequest()))}doInitialPcbTraceRender(){const t=vc(\"tscircuit:core:doInitialPcbTraceRender\");if(!this.isSubcircuit||this.root?.pcbDisabled||this.root?.pcbRoutingDisabled||this.getInheritedProperty(\"routingDisabled\")||this._isInflatedFromCircuitJson||this._isLegacyAutorouterDisabled()||this._shouldUseTraceByTraceRouting())return;if(!this._areChildSubcircuitsRouted()){t(`[${this.getString()}] child subcircuits are not routed, skipping async autorouting until subcircuits routed`);return}if(t(`[${this.getString()}] no child subcircuits to wait for, initiating async routing`),!this._hasTracesToRoute())return;const e=jwe({component:this,subcircuit:this}),n=$we({component:this,subcircuit:this});e||n||this._startAsyncAutorouting()}doInitialSchematicTraceRender(){this._parsedProps.showAsSchematicBox||JDo(this)}doInitialSchematicSheetRender(){pTt(this)}updateSchematicSheetRender(){hDo(this)}updatePcbTraceRender(){const t=vc(\"tscircuit:core:updatePcbTraceRender\");if(t(`[${this.getString()}] updating...`),!this.isSubcircuit||this._isInflatedFromCircuitJson||this._isLegacyAutorouterDisabled())return;if(this._shouldRouteAsync()\u0026\u0026this._hasTracesToRoute()\u0026\u0026!this._hasStartedAsyncAutorouting){if(this._areChildSubcircuitsRouted()){const n=jwe({component:this,subcircuit:this}),o=$we({component:this,subcircuit:this});if(n||o)return;t(`[${this.getString()}] child subcircuits are now routed, starting async autorouting`),this._startAsyncAutorouting()}return}if(!this._asyncAutoroutingResult||this._shouldUseTraceByTraceRouting())return;const{db:e}=this.root;if(this._asyncAutoroutingResult.output_simple_route_json){t(`[${this.getString()}] updating PCB traces from simple route json (${this._asyncAutoroutingResult.output_simple_route_json.traces?.length} traces)`),this._updatePcbTraceRenderFromSimpleRouteJson();return}if(this._asyncAutoroutingResult.output_pcb_traces){t(`[${this.getString()}] updating PCB traces from ${this._asyncAutoroutingResult.output_pcb_traces.length} traces`),this._updatePcbTraceRenderFromPcbTraces();return}}_updatePcbTraceRenderFromSimpleRouteJson(){const{db:t}=this.root,{traces:e}=this._asyncAutoroutingResult.output_simple_route_json;if(e)for(const n of e){const o=n.route.map(r=\u003er.route_type!==\"through_obstacle\"?r:{route_type:\"through_pad\",start:r.start,end:r.end,start_layer:r.from_layer,end_layer:r.to_layer,width:r.width,circuitJsonMetadata:r.circuitJsonMetadata}),i=t.pcb_trace.insert({subcircuit_id:this.subcircuit_id,route:Wwe(o)});ikt({db:t,pcbTrace:i,routeWithSrjMetadata:o})}}_updatePcbTraceRenderFromPcbTraces(){const{output_pcb_traces:t,output_jumpers:e,pcb_trace_ids_to_be_replaced:n}=this._asyncAutoroutingResult;if(!t)return;const{db:o}=this.root,i=this.getInheritedMergedProperty(\"pcbStyle\"),{holeDiameter:r,padDiameter:s}=$N(i),a=this._getBoard(),A=a?.pcb_board_id?o.pcb_board.get(a.pcb_board_id):o.pcb_board.list()[0],c=A?.min_via_hole_diameter??r,l=A?.min_via_pad_diameter??s;e\u0026\u0026e.length\u003e0\u0026\u0026eRo({db:o,output_jumpers:e,subcircuit_id:this.subcircuit_id}),oRo({group:this,outputPcbTraces:t,pcbTraceIdsToReplace:n});const u=o.pcb_via.list();for(const g of t){if(g.type!==\"pcb_trace\")continue;g.subcircuit_id??=this.subcircuit_id;let h=g.route.map(_=\u003e_.route_type!==\"through_obstacle\"?_:{route_type:\"through_pad\",start:_.start,end:_.end,start_layer:_.from_layer,end_layer:_.to_layer,width:_.width,circuitJsonMetadata:_.circuitJsonMetadata});const d=MMe({db:o,trace:{...g,route:h},subcircuit_id:this.subcircuit_id});h=sRo({db:o,route:h,routeThicknessMode:g.route_thickness_mode,sourceTraceId:d}),g.route=h;let p=rRo(h);p===null\u0026\u0026(p=[h]);const m=YNo(p,o);for(const _ of m)if(_.length\u003e0){const f=Wwe(_),I=MMe({db:o,trace:{...g,route:f},subcircuit_id:this.subcircuit_id}),C=o.pcb_trace.insert({...g,source_trace_id:I,route:f});ikt({db:o,pcbTrace:C,routeWithSrjMetadata:_})}}for(const g of t)if(g.type!==\"pcb_via\"\u0026\u0026g.type===\"pcb_trace\"){const h=MMe({db:o,trace:g,subcircuit_id:this.subcircuit_id}),{connection_name:d}=g;let p;if(h\u0026\u0026(p=o.source_trace.get(h)?.subcircuit_connectivity_map_key),!p\u0026\u0026d){const m=o.source_net.get(d);m\u0026\u0026(p=m.subcircuit_connectivity_map_key)}for(const m of g.route)if(m.route_type===\"via\"){const _=m,f=m.from_layer,I=m.to_layer,C={pcb_trace_id:g.pcb_trace_id,x:m.x,y:m.y,hole_diameter:_.via_hole_diameter??_.hole_diameter??c,outer_diameter:_.via_diameter??_.outer_diameter??l,layers:hMt({fromLayer:f,toLayer:I,layerCount:this._getSubcircuitLayerCount(),allowBlindAndBuriedVias:A?.allow_blind_and_buried_vias??!1,physicalLayers:_.layers}),from_layer:f,to_layer:I,subcircuit_id:this.subcircuit_id,pcb_group_id:this.pcb_group_id??void 0,subcircuit_connectivity_map_key:p};if(u.some(y=\u003edwo(y,C)))continue;u.push(o.pcb_via.insert(C))}}}doInitialSchematicComponentRender(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=t.schematic_group.insert({is_subcircuit:this.isSubcircuit,subcircuit_id:this.subcircuit_id,name:this.name,center:this._getGlobalSchematicPositionBeforeLayout(),width:0,height:0,schematic_component_ids:[],source_group_id:this.source_group_id,show_as_schematic_box:e.showAsSchematicBox??!1});this.schematic_group_id=n.schematic_group_id,e.showAsSchematicBox\u0026\u0026VMo(this);for(const o of this.getDescendants())o.getGroup()?.source_group_id===this.source_group_id\u0026\u0026(o._parsedProps?.showAsSchematicBox||o.schematic_component_id\u0026\u0026t.schematic_component.update(o.schematic_component_id,{schematic_group_id:n.schematic_group_id}))}_getSchematicLayoutMode(){const t=this._parsedProps,e=t.schAutoLayoutEnabled??!1;if(t.schLayout?.layoutMode===\"none\"||t.schLayout?.layoutMode===\"relative\")return\"relative\";if(t.schLayout?.matchAdapt)return\"match-adapt\";if(t.schLayout?.flex)return\"flex\";if(t.schLayout?.grid)return\"grid\";if(t.schMatchAdapt)return\"match-adapt\";if(t.schFlex)return\"flex\";if(t.schGrid)return\"grid\";if(t.matchAdapt)return\"match-adapt\";if(t.flex)return\"flex\";if(t.grid)return\"grid\";if(t.relative||t.schRelative)return\"relative\";const n=this.children.some(i=\u003e{const r=i._parsedProps;return(i.source_component_id!==null||i.source_group_id!==null)\u0026\u0026(r?.schX!==void 0||r?.schY!==void 0)}),o=(t.manualEdits?.schematic_placements?.length??0)\u003e0;return e\u0026\u0026!o||!n\u0026\u0026!o?\"match-adapt\":\"relative\"}doInitialSchematicLayout(){if(this._parsedProps.showAsSchematicBox){this._insertSchematicBorder();return}if(this.children.some(o=\u003eo.source_component_id!==null\u0026\u0026o._parsedProps?.schSectionName!==void 0)){this._doInitialSchematicLayoutSections(),this._insertSchematicBorder();return}const n=this._getSchematicLayoutMode();n===\"match-adapt\"\u0026\u0026this._doInitialSchematicLayoutMatchpack(),n===\"grid\"\u0026\u0026this._doInitialSchematicLayoutGrid(),n===\"flex\"\u0026\u0026this._doInitialSchematicLayoutFlex(),this._insertSchematicBorder()}_doInitialSchematicLayoutSections(){gDo(this)}_doInitialSchematicLayoutMatchAdapt(){WMo(this)}_doInitialSchematicLayoutMatchpack(){cDo(this)}_doInitialSchematicLayoutGrid(){JMo(this)}_doInitialSchematicLayoutFlex(){zMo(this)}_getPcbLayoutMode(){const t=this._parsedProps,e=this.props;if(this._isInflatedFromCircuitJson||t.pcbRelative)return\"none\";if(t.pcbLayout?.matchAdapt)return\"match-adapt\";if(t.pcbLayout?.flex)return\"flex\";if(t.pcbLayout?.grid)return\"grid\";if(t.pcbLayout?.pack)return\"pack\";if(t.pcbFlex)return\"flex\";if(t.pcbGrid)return\"grid\";if(t.pcbPack||t.pack)return\"pack\";if(t.matchAdapt)return\"match-adapt\";if(t.flex)return\"flex\";if(t.grid)return\"grid\";t.pcbX!==void 0||t.pcbY!==void 0||t.pcbLeftEdgeX!==void 0||t.pcbRightEdgeX!==void 0||t.pcbTopEdgeY!==void 0||t.pcbBottomEdgeY!==void 0||e.pcbLeftEdgeX!==void 0||e.pcbRightEdgeX!==void 0||e.pcbTopEdgeY!==void 0||e.pcbBottomEdgeY;const n=(t.manualEdits?.pcb_placements?.length??0)\u003e0,o=this.children.reduce((i,r)=\u003e{if(!r.pcb_component_id\u0026\u0026!r.pcb_group_id)return i;const s=r._parsedProps,a=r.props,A=s?.pcbX!==void 0||s?.pcbY!==void 0||s?.pcbLeftEdgeX!==void 0||s?.pcbRightEdgeX!==void 0||s?.pcbTopEdgeY!==void 0||s?.pcbBottomEdgeY!==void 0||a?.pcbLeftEdgeX!==void 0||a?.pcbRightEdgeX!==void 0||a?.pcbTopEdgeY!==void 0||a?.pcbBottomEdgeY!==void 0;return i+(A?0:1)},0);return!n\u0026\u0026o\u003e1?\"pack\":\"none\"}doInitialPcbLayout(){if(this.root?.pcbDisabled)return;if(this.pcb_group_id){const{db:e}=this.root,n=this._parsedProps;if(n.pcbX!==void 0||n.pcbY!==void 0){const i=this.parent?.getGroup?.(),r=i?.pcb_group_id?e.pcb_group.get(i.pcb_group_id)?.pcb_group_id:void 0,s=r?void 0:this._getBoard()?.pcb_board_id??void 0;e.pcb_group.update(this.pcb_group_id,{position_mode:\"relative_to_group_anchor\",positioned_relative_to_pcb_group_id:r,positioned_relative_to_pcb_board_id:s,display_offset_x:n.pcbX,display_offset_y:n.pcbY})}}const t=this._getPcbLayoutMode();t===\"grid\"?this._doInitialPcbLayoutGrid():t===\"pack\"?this._doInitialPcbLayoutPack():t===\"flex\"\u0026\u0026this._doInitialPcbLayoutFlex()}_doInitialPcbLayoutGrid(){bMo(this)}_doInitialPcbLayoutPack(){GMo(this)}_doInitialPcbLayoutFlex(){BMo(this)}_insertSchematicBorder(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,e=this._parsedProps;if(!e.border)return;let n=typeof e.schWidth==\"number\"?e.schWidth:void 0,o=typeof e.schHeight==\"number\"?e.schHeight:void 0;const i=typeof e.schPadding==\"number\"?e.schPadding:0,r=typeof e.schPaddingLeft==\"number\"?e.schPaddingLeft:i,s=typeof e.schPaddingRight==\"number\"?e.schPaddingRight:i,a=typeof e.schPaddingTop==\"number\"?e.schPaddingTop:i,A=typeof e.schPaddingBottom==\"number\"?e.schPaddingBottom:i,c=this.schematic_group_id?t.schematic_group.get(this.schematic_group_id):null;if(c\u0026\u0026(n===void 0\u0026\u0026typeof c.width==\"number\"\u0026\u0026(n=c.width),o===void 0\u0026\u0026typeof c.height==\"number\"\u0026\u0026(o=c.height)),n===void 0||o===void 0)return;const l=c?.center??this._getGlobalSchematicPositionBeforeLayout(),u=l.x-n/2-r,g=l.y-o/2-A,h=n+r+s,d=o+a+A;t.schematic_box.insert({width:h,height:d,x:u,y:g,is_dashed:e.border?.dashed??!1})}_determineSideFromPosition(t,e){if(!t.center||!e.center)return\"left\";const n=t.center.x-e.center.x,o=t.center.y-e.center.y;return Math.abs(n)\u003eMath.abs(o)?n\u003e0?\"right\":\"left\":o\u003e0?\"bottom\":\"top\"}_calculateSchematicBounds(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const s of t)e=Math.min(e,s.centerX),n=Math.max(n,s.centerX),o=Math.min(o,s.centerY),i=Math.max(i,s.centerY);const r=2;return{minX:e-r,maxX:n+r,minY:o-r,maxY:i+r}}_getAutorouterConfig(){const t=this._parsedProps.autorouter||this.getInheritedProperty(\"autorouter\");return h$(t,this.root?.platform)}_isLegacyAutorouterDisabled(){return lkt(this)!==null}_isLaserPrefabAutorouter(t=this._getAutorouterConfig()){const e=this.props.autorouter,n=o=\u003eo?.replace(/-/g,\"_\")??o;return t.preset===\"laser_prefab\"?!0:typeof e==\"string\"?n(e)===\"laser_prefab\":typeof e==\"object\"\u0026\u0026e?n(e.preset)===\"laser_prefab\":!1}_isAutoJumperAutorouter(t=this._getAutorouterConfig()){const e=this.props.autorouter,n=o=\u003eo?.replace(/-/g,\"_\")??o;return t.preset===\"auto_jumper\"?!0:typeof e==\"string\"?n(e)===\"auto_jumper\":typeof e==\"object\"\u0026\u0026e?n(e.preset)===\"auto_jumper\":!1}_getSubcircuitLayerCount(){const t=this.getInheritedProperty(\"layers\");return typeof t==\"number\"?t:2}_shouldUseTraceByTraceRouting(){return ckt(this)?!1:this._getAutorouterConfig().groupMode===\"sequential-trace\"}doInitialPcbDesignRuleChecks(){if(this.root?.pcbDisabled||this._isLegacyAutorouterDisabled()||this.root?.pcbRoutingDisabled||this.getInheritedProperty(\"routingDisabled\"))return;const{db:t}=this.root;if(this.isSubcircuit){const e=new Map;for(const n of this.children)if(!n.isSubcircuit\u0026\u0026n._parsedProps.name){const o=e.get(n._parsedProps.name)||[];o.push(n),e.set(n._parsedProps.name,o)}for(const[n,o]of e.entries()){if(o.length\u003c=1)continue;const i=o.filter(A=\u003eA instanceof t1),r=i.length===o.length,s=i.map(A=\u003eA.subcircuit_connectivity_map_key),a=r\u0026\u0026s.every(Boolean)\u0026\u0026new Set(s).size===1;if(!r||!a){const A=this.name||\"unnamed\",c=r?`Trace \"${n}\" in subcircuit \"${A}\" shares a name with another trace, but the traces are not mutually connected. Same-named traces must have the same subcircuit connectivity map key.`:`Multiple immediate children found with name \"${n}\" in subcircuit \"${A}\". Names must be unique.`;t.pcb_trace_error.insert({error_type:\"pcb_trace_error\",message:c,source_trace_id:\"\",pcb_trace_id:\"\",pcb_component_ids:o.map(l=\u003el.pcb_component_id).filter(Boolean),pcb_port_ids:[]})}}}_No(this)}doInitialSchematicLabelNetsWithConflictingNames(){this.root?.schematicDisabled||this.getTopLevelRenderable()===this\u0026\u0026K8o(this.root.db)}updateSchematicLabelNetsWithConflictingNames(){this.doInitialSchematicLabelNetsWithConflictingNames()}doInitialSchematicReplaceNetLabelsWithSymbols(){if(this.root?.schematicDisabled||!this.isSubcircuit)return;const{db:t}=this.root,e=t;for(const n of e.schematic_net_label.list()){const o=e.source_net.get(n.source_net_id),i=n.text||o?.name||\"\",r=o?.is_ground||Q0e.test(i),s=o?.is_power||Hwe.test(i);if(n.anchor_side===\"top\"\u0026\u0026r){e.schematic_net_label.update(n.schematic_net_label_id,{symbol_name:\"rail_down\"});continue}n.anchor_side===\"bottom\"\u0026\u0026s\u0026\u0026e.schematic_net_label.update(n.schematic_net_label_id,{symbol_name:\"rail_up\"})}}doInitialSimulationSpiceEngineRender(){pNo(this)}doInitialPcbComponentAnchorAlignment(){EMo(this)}updatePcbComponentAnchorAlignment(){this.doInitialPcbComponentAnchorAlignment()}doInitialPcbCalcPlacementResolution(){mMo(this)}updatePcbCalcPlacementResolution(){this.doInitialPcbCalcPlacementResolution()}_getMinimumFlexContainerSize(){return super._getMinimumFlexContainerSize()}_repositionOnPcb(t){return super._repositionOnPcb(t)}};function aRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_group.getWhere({source_group_id:t.source_group_id}),s={name:t.name??`inflated_group_${t.source_group_id}`};if(r?.position_mode===\"relative_to_group_anchor\"\u0026\u0026r.anchor_position){let A={x:0,y:0};if(t.parent_source_group_id){const c=n.pcb_group.getWhere({source_group_id:t.parent_source_group_id});c?.anchor_position\u0026\u0026(A=c.anchor_position)}s.pcbX=r.anchor_position.x-A.x,s.pcbY=r.anchor_position.y-A.y}r?.anchor_alignment\u0026\u0026(s.pcbAnchorAlignment=r.anchor_alignment);const a=new A6(s);return a._isInflatedFromCircuitJson=!0,a.source_group_id=t.source_group_id,i\u0026\u0026i.set(t.source_group_id,a),t.parent_source_group_id\u0026\u0026i?.has(t.parent_source_group_id)?i.get(t.parent_source_group_id).add(a):o.add(a),a}var ukt=class extends g0{_adjustSilkscreenTextAutomatically=!0;get config(){return{componentName:\"Inductor\",schematicSymbolName:this.props.symbolName??\"inductor\",zodProps:dMn,sourceFtype:$7.simple_inductor}}_getSchematicSymbolDisplayValue(){return`${H_(this._parsedProps.inductance)}H`}initPorts(){super.initPorts({additionalAliases:{pin1:[\"anode\",\"pos\",\"left\"],pin2:[\"cathode\",\"neg\",\"right\"]}})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({name:this.name,ftype:$7.simple_inductor,inductance:this.props.inductance,max_current_rating:e.maxCurrentRating===void 0?void 0:q1(e.maxCurrentRating,\"A\").value,display_inductance:this._getSchematicSymbolDisplayValue(),supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}};function ARo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new ukt({name:t.name,inductance:t.inductance,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c\u0026\u0026A.add(c)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var TMe=new WeakMap,gkt=t=\u003e{const e=[t.name,...t.port_hints??[]].map(i=\u003ei.toLowerCase().replace(/[^a-z0-9+-]/g,\"\")),n=e.some(i=\u003e[\"a\",\"anode\",\"pos\",\"positive\",\"+\"].includes(i)),o=e.some(i=\u003e[\"k\",\"c\",\"cathode\",\"neg\",\"negative\",\"-\"].includes(i));return n===o?null:n?\"anode\":\"cathode\"},cRo=t=\u003e{const e=t.root;if(!e)return;const{db:n}=e,o=TMe.get(t);for(const y of o??[])n.pcb_fabrication_note_path.delete(y.pcb_fabrication_note_path_id);if(TMe.delete(t),e.pcbDisabled||!t.pcb_component_id)return;const i=n.pcb_component.get(t.pcb_component_id);if(!i||i.layer!==\"top\"\u0026\u0026i.layer!==\"bottom\")return;const r=n.source_port.list({source_component_id:t.source_component_id}),s=r.filter(y=\u003egkt(y)===\"anode\"),a=r.filter(y=\u003egkt(y)===\"cathode\");if(s.length!==1||a.length!==1)return;const A=s[0],c=a[0],l=n.pcb_port.getWhere({source_port_id:A.source_port_id}),u=n.pcb_port.getWhere({source_port_id:c.source_port_id});if(!l||!u)return;const g=Math.hypot(u.x-l.x,u.y-l.y);if(g\u003c1e-6)return;const h=Math.atan2(u.y-l.y,u.x-l.x),d=D0(M0((l.x+u.x)/2,(l.y+u.y)/2),W4(h)),p=(y,x)=\u003ets(d,{x:y,y:x}),m={pcb_component_id:i.pcb_component_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,layer:i.layer},_=[];TMe.set(t,_);const f=Math.min(g*.2,.4),I=f*.75,C=[[p(-g/2,0),p(-f,0)],[p(-f,-I),p(f,0),p(-f,I),p(-f,-I)],[p(f,-I),p(f,I)],[p(f,0),p(g/2,0)]];for(const y of C)_.push(n.pcb_fabrication_note_path.insert({...m,route:y,stroke_width:.08}))},dkt=class extends g0{get config(){const t={laser:\"laser_diode\"},e=this.props.laser?\"laser\":null;return{schematicSymbolName:e?t[e]:this.props.symbolName??\"led\",componentName:\"Led\",zodProps:yMn,sourceFtype:\"simple_led\"}}initPorts(){const t=this.children.some(i=\u003ei.componentName===\"Footprint\"),e=this.resolveFootprint(),n=!!this._resolvePinLabels(),o=!n\u0026\u0026!t\u0026\u0026(!e||HDt(e));super.initPorts({pinCount:2,ignoreSymbolPorts:!n\u0026\u0026!o,additionalAliases:{pin1:o?[\"anode\",\"pos\",\"left\"]:[],pin2:o?[\"cathode\",\"neg\",\"right\"]:[]}})}_getSchematicSymbolDisplayValue(){return this._parsedProps.schDisplayValue||this._parsedProps.color||void 0}getFootprinterString(){const t=super.getFootprinterString();return t\u0026\u0026this.props.color?`${t}_color(${this.props.color})`:t}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_led\",name:this.name,wave_length:e.wavelength,color:e.color,symbol_display_value:this._getSchematicSymbolDisplayValue(),manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}get pos(){return this.portMap.pos}doInitialPcbComponentSizeCalculation(){super.doInitialPcbComponentSizeCalculation(),cRo(this)}get anode(){return this.portMap.anode}get neg(){return this.portMap.neg}get cathode(){return this.portMap.cathode}};function lRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new dkt({name:t.name,color:t.color,wavelength:t.wavelength??t.wave_length,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c\u0026\u0026A.add(c)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var uRo=[{gate:\"left\",drain:\"top\",source:\"bottom\"},{gate:\"left\",drain:\"bottom\",source:\"top\"},{gate:\"right\",drain:\"top\",source:\"bottom\"},{gate:\"right\",drain:\"bottom\",source:\"top\"},{gate:\"top\",drain:\"left\",source:\"right\"},{gate:\"top\",drain:\"right\",source:\"left\"},{gate:\"bottom\",drain:\"left\",source:\"right\"},{gate:\"bottom\",drain:\"right\",source:\"left\"}],gRo=t=\u003e{const e=(t%360+360)%360;if(e%90!==0)throw new Error(`Schematic rotation ${t} is not supported for Mosfet`);return[{gate:\"left\",drain:\"top\",source:\"bottom\"},{gate:\"top\",drain:\"right\",source:\"left\"},{gate:\"right\",drain:\"bottom\",source:\"top\"},{gate:\"bottom\",drain:\"left\",source:\"right\"}][e/90]},dRo=t=\u003e{const e={drain:t.symbolDrainSide,source:t.symbolSourceSide,gate:t.symbolGateSide},n=gRo(Number(t.schRotation??0)),o=uRo.filter(i=\u003eObject.keys(e).every(r=\u003ee[r]===void 0||e[r]===i[r]));if(o.length===0){const i=Object.entries(e).filter(([,r])=\u003er!==void 0).map(([r,s])=\u003e`${r}=${s}`).join(\", \");throw new Error(`Invalid MOSFET symbol port side combination (${i}). The gate must be perpendicular to the drain and source, and the drain and source must be opposite.`)}return o.sort((i,r)=\u003e{const s=a=\u003eObject.keys(n).filter(A=\u003ea[A]!==n[A]).length;return s(i)-s(r)})[0]},hRo=t=\u003e{const e=t.mosfetMode===\"depletion\"?\"d\":\"e\",n=`${t.channelType}_channel_${e}_mosfet_transistor`;if(!(t.symbolDrainSide!==void 0||t.symbolSourceSide!==void 0||t.symbolGateSide!==void 0))return n;const{gate:i,drain:r}=dRo(t);return`${n}_gate_${i}_drain_${r}`},hkt=class extends g0{get config(){return{componentName:\"Mosfet\",schematicSymbolName:this.props.symbolName??hRo(this.props),zodProps:cMn,shouldRenderAsSchematicBox:!1}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_mosfet\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,mosfet_mode:e.mosfetMode,channel_type:e.channelType,display_name:e.displayName});this.source_component_id=n.source_component_id}};function pRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new hkt({name:t.name,channelType:t.channel_type,mosfetMode:t.mosfet_mode,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,displayName:t.display_name,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c\u0026\u0026A.add(c)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}function mRo(t,e){const{injectionDb:n,subcircuit:o}=e;if(t.source_component_id!==null)return;const i=n.pcb_port.getWhere({source_port_id:t.source_port_id}),r=new Pu({name:t.name,pinNumber:t.pin_number});o.add(r),r.source_port_id=t.source_port_id;const s=o.root;if(s\u0026\u0026i){const{db:a}=s,A=a.pcb_port.insert({pcb_component_id:void 0,layers:i.layers,subcircuit_id:o.subcircuit_id??void 0,pcb_group_id:o.getGroup()?.pcb_group_id??void 0,x:i.x,y:i.y,source_port_id:t.source_port_id,is_board_pinout:!1});r.pcb_port_id=A.pcb_port_id}}var pkt=class extends g0{get config(){return{componentName:\"PushButton\",schematicSymbolName:this.props.symbolName??\"push_button_normally_open_momentary\",zodProps:OPn,sourceFtype:$7.simple_push_button}}get defaultInternallyConnectedPinNames(){return[]}initPorts(){super.initPorts({pinCount:2,ignoreSymbolPorts:!0});const e=Su[this._getSchematicSymbolNameOrThrow()],n=e.ports.find(A=\u003eA.labels.includes(\"1\")),o=e.ports.find(A=\u003eA.labels.includes(\"2\")),i=this.selectAll(\"port\"),r=i.find(A=\u003eA.props.pinNumber===1);r.schematicSymbolPortDef=n;const s=new Set(r._getPortsInternallyConnectedToThisPort()),a=i.filter(A=\u003eA!==r\u0026\u0026!s.has(A)).sort((A,c)=\u003e(A.props.pinNumber??0)-(c.props.pinNumber??0))[0];a\u0026\u0026(a.schematicSymbolPortDef=o)}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({name:this.name,ftype:$7.simple_push_button,supplier_part_numbers:n.supplierPartNumbers,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,are_pins_interchangeable:!0,display_name:n.displayName});this.source_component_id=o.source_component_id}};function _Ro(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new pkt({name:t.name,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c\u0026\u0026A.add(c)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var mkt=class extends g0{_adjustSilkscreenTextAutomatically=!0;get config(){const t=this.props.symbolName??\"boxresistor\",e=this.props.schSize===\"sm\"||this.props.schSize===\"xs\"?this.props.schSize:void 0,n=e\u0026\u0026(t===\"boxresistor\"||t===\"resistor\")?`${t}_${e}`:void 0;return{componentName:\"Resistor\",schematicSymbolName:n\u0026\u0026`${n}_right`in Su?n:t,zodProps:Kwn,sourceFtype:\"simple_resistor\"}}initPorts(){super.initPorts({additionalAliases:{pin1:[\"anode\",\"pos\",\"left\"],pin2:[\"cathode\",\"neg\",\"right\"]}})}_getSchematicSymbolDisplayValue(){return`${H_(this._parsedProps.resistance)}Ω`}doInitialCreateNetsFromProps(){this._createNetsFromProps([this.props.pullupFor,this.props.pullupTo,this.props.pulldownFor,this.props.pulldownTo,...this._getNetsFromConnectionsProp()])}doInitialCreateTracesFromProps(){this.props.pullupFor\u0026\u0026this.props.pullupTo\u0026\u0026(this.add(new t1({from:`${this.getSubcircuitSelector()} \u003e port.1`,to:this.props.pullupFor})),this.add(new t1({from:`${this.getSubcircuitSelector()} \u003e port.2`,to:this.props.pullupTo}))),this.props.pulldownFor\u0026\u0026this.props.pulldownTo\u0026\u0026(this.add(new t1({from:`${this.getSubcircuitSelector()} \u003e port.1`,to:this.props.pulldownFor})),this.add(new t1({from:`${this.getSubcircuitSelector()} \u003e port.2`,to:this.props.pulldownTo}))),this._createTracesFromConnectionsProp()}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_resistor\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,resistance:e.resistance,display_resistance:this._getSchematicSymbolDisplayValue(),are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}};function fRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new mkt({name:t.name,resistance:t.resistance,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c\u0026\u0026A.add(c)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}function IRo(t){return t.simSwitchFrequency!==void 0||t.simCloseAt!==void 0||t.simOpenAt!==void 0||t.simStartClosed!==void 0||t.simStartOpen!==void 0}var _kt=class extends g0{_getSwitchType(){const t=this._parsedProps;return t?t.dpdt?\"dpdt\":t.spst?\"spst\":t.spdt?\"spdt\":t.dpst?\"dpst\":t.type??\"spst\":\"spst\"}get config(){const t=this._getSwitchType(),e=this._parsedProps?.isNormallyClosed??!1,n={spst:e?\"spst_normally_closed_switch\":\"spst_switch\",spdt:e?\"spdt_normally_closed_switch\":\"spdt_switch\",dpst:e?\"dpst_normally_closed_switch\":\"dpst_switch\",dpdt:e?\"dpdt_normally_closed_switch\":\"dpdt_switch\"};return{componentName:\"Switch\",schematicSymbolName:this.props.symbolName??n[t],zodProps:xMn,shouldRenderAsSchematicBox:!1}}doInitialSourceRender(){const{db:t}=this.root,e=this._parsedProps??{},n=t.source_component.insert({ftype:\"simple_switch\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:this._getSwitchType()===\"spst\",display_name:e?.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{_parsedProps:t}=this;if(!IRo(t))return;const{db:e}=this.root,n={type:\"simulation_switch\",source_component_id:this.source_component_id||\"\"};t.simSwitchFrequency!==void 0\u0026\u0026(n.switching_frequency=Cy.parse(t.simSwitchFrequency)),t.simCloseAt!==void 0\u0026\u0026(n.closes_at=Ml.parse(t.simCloseAt)),t.simOpenAt!==void 0\u0026\u0026(n.opens_at=Ml.parse(t.simOpenAt)),t.simStartOpen!==void 0\u0026\u0026(n.starts_closed=!t.simStartOpen),t.simStartClosed!==void 0\u0026\u0026(n.starts_closed=t.simStartClosed),e.simulation_switch.insert(n)}},CRo=(t,e)=\u003e{const n=e.injectionDb.source_port.list().filter(s=\u003es.source_component_id===t.source_component_id),o={};let i=0;for(const s of n){const a=s.pin_number;if(a==null)continue;i=Math.max(i,a);const A=Array.from(new Set([s.name,...s.port_hints??[]].filter(c=\u003etypeof c==\"string\"\u0026\u0026c.length\u003e0)));A.length\u003e0\u0026\u0026(o[`pin${a}`]=A)}let r=\"spst\";return i\u003e=5?r=\"dpdt\":i===4?r=\"dpst\":i===3\u0026\u0026(r=\"spdt\"),{type:r,pinLabels:Object.keys(o).length\u003e0?o:void 0}};function yRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=CRo(t,e),c=new _kt({name:t.name,displayName:t.display_name,...A,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const l=e4(r,{...e,normalComponent:c});l\u0026\u0026c.add(l)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(c):o.add(c)}function xRo(t){if(t.length\u003c=2)return[];const e=t[0],n=t[t.length-1];return t.slice(1,-1).filter(o=\u003e{const i=W7(o),r=W7(e),s=W7(n),a=i.x===r.x\u0026\u0026i.y===r.y,A=i.x===s.x\u0026\u0026i.y===s.y;return!a\u0026\u0026!A}).map(o=\u003e{if(o.route_type===\"via\")return{x:o.x,y:o.y,via:!0,fromLayer:o.from_layer,toLayer:o.to_layer};const i=W7(o);return{x:i.x,y:i.y}})}var ERo=(t,e)=\u003e{const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=[];let s=t.source_group_id;for(;s\u0026\u0026s!==o.source_group_id;){const a=n.source_group.get(s),A=i?.get(s);if(!a||!A)break;const c=A.props.name??A.fallbackUnassignedName;r.unshift(`.${c}`),s=a.parent_source_group_id}return r.push(`.${t.name}`),r.join(\" \u003e \")};function BRo(t,e){const{injectionDb:n,subcircuit:o}=e,i=[];for(const u of t.connected_source_port_ids){const g=n.source_port.get(u);if(!g)continue;let h;if(g.source_component_id){const d=n.source_component.get(g.source_component_id);d\u0026\u0026(h=`${ERo({name:d.name,source_group_id:d.source_group_id},e)} \u003e .${g.name}`)}else h=`.${g.name}`;h\u0026\u0026i.push(h)}for(const u of t.connected_source_net_ids){const g=n.source_net.get(u);g\u0026\u0026i.push(`net.${g.name}`)}if(i.length\u003c2)return;const r=n.pcb_trace.list().filter(u=\u003eu.source_trace_id===t.source_trace_id),s=r[0];let a;s\u0026\u0026(a=xRo(s.route));let A=t.min_trace_thickness;if(!A\u0026\u0026s?.route){const u=s.route.find(g=\u003eg.route_type===\"wire\");u\u0026\u0026u.route_type===\"wire\"\u0026\u0026(A=u.width)}const c={path:i};A!==void 0\u0026\u0026(c.thickness=A),a\u0026\u0026a.length\u003e0?c.pcbPath=a:!s\u0026\u0026t.connected_source_port_ids.length===2\u0026\u0026t.connected_source_net_ids.length===0\u0026\u0026(c.pcbStraightLine=!0);const l=new t1(c);l._inflatedPcbTraces=r.length\u003e0?r:void 0,l._inflatedPcbVias=s?n.pcb_via.list().filter(u=\u003er.some(g=\u003eu.pcb_trace_id===g.pcb_trace_id)):void 0,o.add(l)}var bRo={collector:[\"c\"],base:[\"b\"],emitter:[\"e\"]},fkt=class extends g0{get config(){const t=this.props.type===\"npn\"?\"npn_bipolar_transistor\":\"pnp_bipolar_transistor\";return{componentName:\"Transistor\",schematicSymbolName:this.props.symbolName??t,zodProps:aMn,sourceFtype:\"simple_transistor\",shouldRenderAsSchematicBox:!1}}initPorts(){const t={},e=this.getSchematicSymbol();for(const n of e?.ports??[]){const o=H0e(n.labels);if(o)for(const i of n.labels){const r=bRo[i];r\u0026\u0026(t[`pin${o}`]=r)}}super.initPorts({pinCount:3,additionalAliases:t})}get collector(){return this.portMap.collector}get base(){return this.portMap.base}get emitter(){return this.portMap.emitter}doInitialCreateNetsFromProps(){this._createNetsFromProps([...this._getNetsFromConnectionsProp()])}doInitialCreateTracesFromProps(){this._createTracesFromConnectionsProp()}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_transistor\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,transistor_type:e.type,display_name:e.displayName});this.source_component_id=n.source_component_id}};function SRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new fkt({name:t.name,type:t.transistor_type,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c\u0026\u0026A.add(c)}t.source_group_id\u0026\u0026i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}function QRo(t){const{injectionDb:e,subcircuit:n,groupsMap:o}=t,i=[\"pcb_silkscreen_rect\",\"pcb_silkscreen_circle\",\"pcb_silkscreen_line\",\"pcb_silkscreen_path\",\"pcb_silkscreen_text\",\"pcb_fabrication_note_text\",\"pcb_fabrication_note_path\",\"pcb_fabrication_note_rect\",\"pcb_note_text\",\"pcb_note_rect\",\"pcb_note_path\",\"pcb_note_line\",\"pcb_via\",\"pcb_hole\",\"pcb_plated_hole\",\"pcb_cutout\"],r=e.toArray().filter(a=\u003e{if(!i.includes(a.type))return!1;if(a.type===\"pcb_via\"){if(!a.pcb_trace_id)return!0;const A=e.pcb_trace.get(a.pcb_trace_id),c=A?.source_trace_id;return!(c\u0026\u0026e.source_trace.get(c)\u0026\u0026A?.route.some(u=\u003eu.route_type===\"via\"\u0026\u0026Math.abs(u.x-a.x)\u003c1e-4\u0026\u0026Math.abs(u.y-a.y)\u003c1e-4))}return a.type===\"pcb_cutout\"?!0:\"pcb_component_id\"in a\u0026\u0026(a.pcb_component_id===null||a.pcb_component_id===void 0)});if(r.length===0)return;const s=Db({componentName:\"\",componentRotation:\"0deg\"},r);for(const a of s)n.add(a)}var Hue=(t,e,n)=\u003e{if(!e)return;const o=Xc(e);if(e\u0026\u0026n?.length\u003e0)throw new Error(\"Component cannot have both circuitJson and children\");const r={injectionDb:o,subcircuit:t,groupsMap:new Map},s=o.source_group.list(),a=new Set,A=[...s];for(;A.length\u003e0;){const h=A.findIndex(p=\u003e!p.parent_source_group_id||a.has(p.parent_source_group_id));if(h===-1){const p=A.map(m=\u003em.source_group_id).join(\", \");throw new Error(`Cannot inflate source_groups: cyclic dependency or missing parent detected. Remaining groups: ${p}`)}const d=A[h];aRo(d,r),a.add(d.source_group_id),A.splice(h,1)}const c=o.pcb_board.list();for(const h of c)g8o(h,r);const l=o.source_component.list();for(const h of l)switch(h.ftype){case\"simple_resistor\":fRo(h,r);break;case\"simple_capacitor\":I8o(h,r);break;case\"simple_inductor\":ARo(h,r);break;case\"simple_diode\":O8o(h,r);break;case\"simple_fiducial\":Y8o(h,r);break;case\"simple_led\":lRo(h,r);break;case\"simple_chip\":x8o(h,r);break;case\"simple_connector\":F8o(h,r);break;case\"simple_transistor\":SRo(h,r);break;case\"simple_mosfet\":pRo(h,r);break;case\"simple_push_button\":_Ro(h,r);break;case\"simple_switch\":yRo(h,r);break;default:throw new Error(`No inflator implemented for source component ftype: \"${h.ftype}\"`)}const u=o.source_port.list();for(const h of u)mRo(h,r);const g=o.source_trace.list();for(const h of g)BRo(h,r);QRo(r)},vRo=t=\u003e!t||typeof t!=\"object\"?!1:typeof t.getSourcePort==\"function\",wRo=t=\u003e!t||typeof t!=\"object\"?!1:typeof t.getSourceNet==\"function\",PRo=t=\u003e!t||typeof t!=\"object\"?!1:typeof t.getPorts==\"function\",MRo=t=\u003e!t||typeof t!=\"object\"?!1:typeof t.type==\"string\",C$=t=\u003etypeof t==\"string\"\u0026\u0026t.length\u003e0,kMe=class{constructor(t){this.port=t}port;getPcbPort(){const t=this.port.pcb_port_id;return t?this.port.root?.db.pcb_port.get(t)??null:null}getSourcePort(){const t=this.port.source_port_id;return t?this.port.root?.db.source_port.get(t)??null:null}},DRo=class{constructor(t){this.net=t}net;getSourceNet(){const t=this.net.source_net_id;return t?this.net.root?.db.source_net.get(t)??null:null}},NRo=class{constructor(t){this.component=t}component;getPort(t){const e=this.component.selectOne(`port.${t}`,{type:\"port\"})??this.component.selectOne(`.${t}`,{type:\"port\"});return e?new kMe(e):null}getPorts(){return this.component.selectAll(\"port\").map(t=\u003enew kMe(t))}getPcbComponent(){const t=this.component.pcb_component_id;return t?this.component.root?.db.pcb_component.get(t)??null:null}getSourceComponent(){const t=this.component.source_component_id;return t?this.component.root?.db.source_component.get(t)??null:null}},RRo=class extends Ir{get config(){return{componentName:\"DrcCheck\",zodProps:APn}}constructor(t){super(t)}async runCustomDrcCheck(t){const e=await this._parsedProps.checkFn(this.createCustomDrcCheckContext(t));let n=[];return Array.isArray(e)?n=e:e\u0026\u0026(n=[e]),n.map((o,i)=\u003ethis.createCircuitJsonDiagnostic(o,i)).filter(o=\u003e!!o)}createCustomDrcCheckContext(t){return{select:this.selectCustomDrcElement.bind(this),selectAll:this.selectAllCustomDrcElements.bind(this),isConnected:(e,n)=\u003ethis.isConnected(e,n,t),isPulledUp:e=\u003ethis.isConnected(e,\"net.VCC\",t)||this.isConnected(e,\"net.VDD\",t)||this.getResistanceBetween(e,\"net.VCC\",t)!==null||this.getResistanceBetween(e,\"net.VDD\",t)!==null,isPulledDown:e=\u003ethis.isConnected(e,\"net.GND\",t)||this.getResistanceBetween(e,\"net.GND\",t)!==null,getResistanceBetween:(e,n)=\u003ethis.getResistanceBetween(e,n,t)}}selectCustomDrcElement(t){return this.wrapSelectionResult(this.getSubcircuit().selectOne(t))}selectAllCustomDrcElements(t){const e=[];for(const n of this.getSubcircuit().selectAll(t)){const o=this.wrapSelectionResult(n);o\u0026\u0026e.push(o)}return e}wrapSelectionResult(t){return t?t instanceof Pu?new kMe(t):t instanceof Qb?new DRo(t):new NRo(t):null}createCircuitJsonDiagnostic(t,e){const n=t;let o=\"source_component_misconfigured_error\";typeof n.error_type==\"string\"?o=n.error_type:typeof n.warning_type==\"string\"\u0026\u0026(o=n.warning_type);const i={...t};typeof n.type==\"string\"?i.type=n.type:i.type=o,typeof n.warning_type!=\"string\"\u0026\u0026(typeof n.error_type==\"string\"?i.error_type=n.error_type:i.error_type=o);const r=`${o}_id`;return n[r]?i[r]=n[r]:i[r]=`${o}_${this._renderId}_${e}`,dxe.parse(i)}isConnected(t,e,n){const o=this.getConnectivityKeys(t,n),i=this.getConnectivityKeys(e,n);return o.some(r=\u003ei.includes(r))}getResistanceBetween(t,e,n){if(this.isConnected(t,e,n))return 0;const o=this.getConnectivityKeys(t,n),i=this.getConnectivityKeys(e,n);if(o.length===0||i.length===0)return null;const r=n.filter(a=\u003ea.type===\"source_component\"\u0026\u0026a.ftype===\"simple_resistor\"),s=this.root;if(!s)return null;for(const a of r){const A=s.db.source_port.list({source_component_id:a.source_component_id});if(A.length!==2)continue;const c=A.map(g=\u003eg.subcircuit_connectivity_map_key),l=c.some(g=\u003eg\u0026\u0026o.includes(g)),u=c.some(g=\u003eg\u0026\u0026i.includes(g));if(l\u0026\u0026u)return a.resistance}return null}getConnectivityKeys(t,e){if(!t)return[];if(typeof t==\"string\"){const n=this.selectCustomDrcElement(t);return n?this.getConnectivityKeys(n,e):[]}return vRo(t)?[t.getSourcePort()?.subcircuit_connectivity_map_key].filter(C$):wRo(t)?[t.getSourceNet()?.subcircuit_connectivity_map_key].filter(C$):PRo(t)?t.getPorts().flatMap(n=\u003ethis.getConnectivityKeys(n,e)):MRo(t)?this.getCircuitJsonElementConnectivityKeys(t,e):[]}getCircuitJsonElementConnectivityKeys(t,e){if(!t)return[];if(t.type===\"source_port\")return[t.subcircuit_connectivity_map_key].filter(C$);if(t.type===\"source_net\")return[t.subcircuit_connectivity_map_key].filter(C$);if(t.type===\"pcb_port\")return this.getConnectivityKeys(t.source_port_id,e);if(t.type===\"source_component\"){const n=this.root;return n?n.db.source_port.list({source_component_id:t.source_component_id}).map(o=\u003eo.subcircuit_connectivity_map_key).filter(C$):[]}return[]}},Ikt=class{firstChild=null;children;db;root=null;isRootCircuit=!1;cachedSubcircuits;pendingSubcircuitRenders;_schematicDisabledOverride;get schematicDisabled(){return this._schematicDisabledOverride!==void 0?this._schematicDisabledOverride:this.platform?.schematicDisabled!==void 0?this.platform.schematicDisabled:this._getBoard()?._parsedProps?.schematicDisabled??!1}set schematicDisabled(t){this._schematicDisabledOverride=t}pcbDisabled=!1;pcbRoutingDisabled=!1;_featureMspSchematicTraceRouting=!0;_featurePcbViaStitching=!0;name;platform;projectUrl;_hasRenderedAtleastOnce=!1;_asyncEffectIdsByPhase=new Map;_asyncEffectPhaseById=new Map;_hasUnrenderedUpdatesFromAsyncEffects=!1;_runningAsyncEffectsById=new Map;constructor({platform:t,projectUrl:e,cachedSubcircuits:n,pendingSubcircuitRenders:o}={}){this.children=[],this.db=Mr([]),this.platform=t,this.projectUrl=e,this.pcbDisabled=t?.pcbDisabled??!1,this.pcbRoutingDisabled=t?.routingDisabled??!1,this.cachedSubcircuits=n,this.pendingSubcircuitRenders=o,this.root=this}add(t){let e;ee.isValidElement(t)?e=RMt(t):e=t,this.children.push(e)}setPlatform(t){this.platform={...this.platform,...t},t.pcbDisabled!==void 0\u0026\u0026(this.pcbDisabled=t.pcbDisabled),t.routingDisabled!==void 0\u0026\u0026(this.pcbRoutingDisabled=t.routingDisabled)}_getBoard(){const t=e=\u003e{for(const n of e){if(n.componentName===\"Board\")return n;if(U0e(n)){const o=t(n.children);if(o)return o}}};return t(this.children)}_guessRootComponent(){if(this.firstChild)return;if(this.children.length===0)throw new Error(\"Not able to guess root component: IsolatedCircuit has no children (use circuit.add(...))\");const t=this.children.filter(n=\u003en.lowercaseComponentName===\"panel\");if(t.length\u003e1)throw new Error(\"Only one \u003cpanel\u003e is allowed per circuit\");if(t.length===1){if(this.children.length!==1)throw new Error(\"\u003cpanel\u003e must be the root element of the circuit\");this.firstChild=t[0];return}if(this.children.length===1\u0026\u0026(this.children[0].isGroup||U0e(this.children[0]))){this.firstChild=this.children[0];return}const e=new A6({subcircuit:!0});e.parent=this,e.addAll(this.children),this.children=[e],this.firstChild=e}render(){this.firstChild||this._guessRootComponent();const{firstChild:t,db:e}=this;if(!t)throw new Error(\"IsolatedCircuit has no root component\");t.parent=this,t.runRenderCycle(),this._hasUnrenderedUpdatesFromAsyncEffects=!1,this._hasRenderedAtleastOnce=!0}async renderUntilSettled(){for(this.db.source_project_metadata.list()?.[0]||this.db.source_project_metadata.insert({software_used_string:`@tscircuit/core@${this.getCoreVersion()}`,...this.projectUrl?{project_url:this.projectUrl}:{}}),this.render();!this.isDoneRendering();)await new Promise(e=\u003esetTimeout(e,100)),this.render();this.emit(\"renderComplete\")}isDoneRendering(){return this._hasRenderedAtleastOnce\u0026\u0026!this._hasIncompleteAsyncEffects()}_hasIncompleteAsyncEffects(){return this._asyncEffectPhaseById.size\u003e0||this._hasUnrenderedUpdatesFromAsyncEffects?!0:this.children.some(t=\u003et._hasIncompleteAsyncEffects())}_hasIncompleteAsyncEffectsForPhase(t){return(this._asyncEffectIdsByPhase.get(t)?.size??0)\u003e0}getRunningAsyncEffects(){return Array.from(this._runningAsyncEffectsById.values())}getCircuitJson(){return this._hasRenderedAtleastOnce||this.render(),this.db.toArray()}toJson(){return this.getCircuitJson()}async getSvg(t){const e=await Promise.resolve().then(()=\u003enjo).catch(n=\u003e{throw new Error(`To use circuit.getSvg, you must install the \"circuit-to-svg\" package.\n\n\"${n.message}\"`)});if(t.view===\"pcb\")return e.convertCircuitJsonToPcbSvg(this.getCircuitJson());if(t.view===\"schematic\")return e.convertCircuitJsonToSchematicSvg(this.getCircuitJson());throw new Error(`Invalid view: ${t.view}`)}getCoreVersion(){const[t,e,n]=jTt.version.split(\".\").map(Number);return`${t}.${e}.${n+1}`}async preview(t){throw new Error(\"project.preview is not yet implemented\")}computeSchematicGlobalTransform(){return hC()}_computePcbGlobalTransformBeforeLayout(){return hC()}selectAll(t){return this._guessRootComponent(),this.firstChild?.selectAll(t)??[]}selectOne(t,e){return this._guessRootComponent(),this.firstChild?.selectOne(t,e)??null}_eventListeners={};emit(t,...e){if(t===\"asyncEffect:start\"?this._registerAsyncEffectStart(e[0]):t===\"asyncEffect:end\"\u0026\u0026this._registerAsyncEffectEnd(e[0]),!!this._eventListeners[t])for(const n of this._eventListeners[t])n(...e)}on(t,e){this._eventListeners[t]||(this._eventListeners[t]=[]),this._eventListeners[t].push(e)}removeListener(t,e){this._eventListeners[t]\u0026\u0026(this._eventListeners[t]=this._eventListeners[t].filter(n=\u003en!==e))}enableDebug(t){typeof t==\"string\"?vc.enable(t):(t===null||t===!1)\u0026\u0026vc.disable()}getClientOrigin(){return typeof window\u003c\"u\"\u0026\u0026window.location?window.location.origin:typeof self\u003c\"u\"\u0026\u0026self.location?self.location.origin:\"\"}_registerAsyncEffectStart(t){if(!t?.asyncEffectId||!t.phase)return;const{asyncEffectId:e,phase:n}=t,o=this._asyncEffectPhaseById.get(e);o\u0026\u0026o!==n\u0026\u0026this._asyncEffectIdsByPhase.get(o)?.delete(e),this._asyncEffectIdsByPhase.has(n)||this._asyncEffectIdsByPhase.set(n,new Set),this._asyncEffectIdsByPhase.get(n).add(e),this._asyncEffectPhaseById.set(e,n),this._runningAsyncEffectsById.set(e,{asyncEffectId:e,effectName:t.effectName,componentDisplayName:t.componentDisplayName,phase:n,error:t.error})}_registerAsyncEffectEnd(t){if(!t?.asyncEffectId)return;const{asyncEffectId:e}=t,n=this._asyncEffectPhaseById.get(e)??t.phase;if(n){const o=this._asyncEffectIdsByPhase.get(n);o?.delete(e),o\u0026\u0026o.size===0\u0026\u0026this._asyncEffectIdsByPhase.delete(n)}this._asyncEffectPhaseById.delete(e),this._runningAsyncEffectsById.delete(e),this._hasUnrenderedUpdatesFromAsyncEffects=!0}};function Ckt(t){if(!t._isIsolatedSubcircuit||t._isolatedCircuitJson||!t.getSubcircuitPropHash)return;const e=t.getSubcircuitPropHash(),n=t.root?.cachedSubcircuits,o=t.root?.pendingSubcircuitRenders,i=n?.get(e);if(i){t._isolatedCircuitJson=i,t.children=[],t._normalComponentNameMap=null;return}const r=[...t.children];t.children=[],t._normalComponentNameMap=null;const s=t.root;t._queueAsyncEffect(\"render-isolated-subcircuit\",async()=\u003e{const a=n?.get(e);if(a){t._isolatedCircuitJson=a;return}const A=o?.get(e);if(A){t._isolatedCircuitJson=await A;return}let c,l;const u=new Promise((g,h)=\u003e{c=g,l=h});o?.set(e,u);try{const g=new Ikt({platform:{...s.platform,pcbDisabled:s.pcbDisabled,schematicDisabled:s.schematicDisabled},cachedSubcircuits:n,pendingSubcircuitRenders:o});for(const d of r)g.add(d);await g.renderUntilSettled();const h=g.getCircuitJson();n?.set(e,h),t._isolatedCircuitJson=h,c(h)}catch(g){throw l(g instanceof Error?g:new Error(String(g))),g}finally{o?.delete(e)}})}var TRo=new Set([\"name\",\"key\",\"pcbX\",\"pcbY\",\"schX\",\"schY\",\"pcbLeftEdgeX\",\"pcbRightEdgeX\",\"pcbTopEdgeY\",\"pcbBottomEdgeY\",\"pcbRotation\",\"schRotation\"]);function Oue(t,e=new WeakSet){if(t===null)return\"null\";if(t===void 0)return\"undefined\";const n=typeof t;if(n===\"string\")return`\"${t}\"`;if(n===\"number\"||n===\"boolean\")return String(t);if(n===\"function\")return\"[function]\";if(n===\"symbol\")return\"[symbol]\";if(n===\"object\"){if(e.has(t))return\"[circular]\";if(e.add(t),t.$typeof!==void 0){const r=typeof t.type==\"string\"?t.type:t.type?.name||\"[component]\",s=t.props?Oue(t.props,e):\"{}\";return`ReactElement(${r},${s})`}return Array.isArray(t)?`[${t.map(s=\u003eOue(s,e)).join(\",\")}]`:`{${Object.keys(t).sort().map(r=\u003e`${r}:${Oue(t[r],e)}`).join(\",\")}}`}return String(t)}function ykt(t){const e={},n=Object.keys(t).sort();for(const o of n)!TRo.has(o)\u0026\u0026t[o]!==void 0\u0026\u0026(e[o]=t[o]);return e}function xkt(t){return t.map(e=\u003e({componentName:e.componentName,props:ykt(e.props??{}),children:xkt(e.children)}))}function Ekt(t){let e=2166136261;for(let n=0;n\u003ct.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e\u003e\u003e\u003e0}function kRo(t){const e=Oue(t),n=Ekt(e),o=Ekt(e+n.toString());return n.toString(16).padStart(8,\"0\")+o.toString(16).padStart(8,\"0\")}function Bkt(t){const e={props:ykt(t.props??{}),children:xkt(t.children)};return kRo(e)}var FO=1e-9,bkt=t=\u003et.route_type===\"wire\",FRo=(t,e,n)=\u003e{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)\u003eFO)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i\u003c-FO)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return!(i-r\u003eFO)},Skt=(t,e)=\u003e{if(e.length\u003c3)return!1;let n=!1,o=e[e.length-1];for(const i of e){if(FRo(t,o,i))return!0;i.y\u003et.y!=o.y\u003et.y\u0026\u0026t.x\u003c(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x\u0026\u0026(n=!n),o=i}return n},LRo=(t,e)=\u003e{const{center:n,width:o,height:i}=e,r=(e.rotation??0)*Math.PI/180,s=Math.cos(-r),a=Math.sin(-r),A=t.x-n.x,c=t.y-n.y,l=A*s-c*a,u=A*a+c*s;return Math.abs(l)\u003c=o/2+FO\u0026\u0026Math.abs(u)\u003c=i/2+FO},HRo=(t,e)=\u003e{const n=e.brep_shape.outer_ring.vertices.map(o=\u003e({x:o.x,y:o.y}));if(!Skt(t,n))return!1;for(const o of e.brep_shape.inner_rings){const i=o.vertices.map(r=\u003e({x:r.x,y:r.y}));if(Skt(t,i))return!1}return!0},ORo=(t,e)=\u003ee.shape===\"rect\"?LRo(t,e):e.shape===\"brep\"?HRo(t,e):!1,GRo=(t,e,n)=\u003e{if(t.source_trace_id===e)return!0;if(!t.source_trace_id)return!1;const o=n.get(t.source_trace_id);return o?o.connected_source_net_ids.includes(e):!1},YRo=(t,e,n)=\u003e{const o=e.x-t.x,i=e.y-t.y;return Math.hypot(o,i)\u003c=FO?!1:[0,.25,.5,.75,1].every(a=\u003eORo({x:t.x+o*a,y:t.y+i*a},n))},URo=({db:t,copperPour:e})=\u003e{if(!e.source_net_id)return;const n=new Map(t.source_trace.list().map(o=\u003e[o.source_trace_id,o]));for(const o of t.pcb_trace.list()){if(!GRo(o,e.source_net_id,n))continue;let i=!1;const r=o.route.map(s=\u003e({...s}));for(let s=0;s\u003cr.length-1;s++){const a=r[s],A=r[s+1];!a||!A||!bkt(a)||!bkt(A)||a.layer!==e.layer||A.layer!==e.layer||YRo({x:a.x,y:a.y},{x:A.x,y:A.y},e)\u0026\u0026(a.is_inside_copper_pour=!0,a.copper_pour_id=e.pcb_copper_pour_id,A.is_inside_copper_pour=!0,A.copper_pour_id=e.pcb_copper_pour_id,i=!0)}i\u0026\u0026t.pcb_trace.update(o.pcb_trace_id,{route:r})}},FMe=new WeakMap,KRo=.3,VRo=async t=\u003e{if(!t.root)return;const{db:e}=t.root,n=t.selectAll(\"copperpour\").filter(u=\u003eu.getSubcircuit()===t),o=[];for(const u of n){const{_parsedProps:g}=u,d=t.selectOne(g.connectsTo)?.source_net_id;if(!d){u.renderError(`Net \"${g.connectsTo}\" not found for copper pour`);continue}o.push({copperPour:u,sourceNetId:d})}if(o.length===0)return;const i=e.toArray(),r=t._getBoard(),s=r?.pcb_board_id?e.pcb_board.get(r.pcb_board_id):void 0;let a=s?.outline?.length?s.outline:void 0;if(!a\u0026\u0026s?.width!==void 0\u0026\u0026s.height!==void 0){const{center:u,width:g,height:h}=s;a=[{x:u.x-g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y+h/2},{x:u.x-g/2,y:u.y+h/2}]}const A=Tbt(i,o.map(({copperPour:u,sourceNetId:g})=\u003e{const{_parsedProps:h}=u,d=h.clearance??.2;return{layer:h.layer,subcircuit_id:t.subcircuit_id??void 0,source_net_id:g,pad_margin:h.padMargin??d,trace_margin:h.traceMargin??d,pour_margin:d,board_edge_margin:h.boardEdgeMargin??d,board_edge_outline:u._isImplicitCopperPour?a:void 0,cutout_margin:h.cutoutMargin??d,...h.useThermalReliefs?{use_thermal_reliefs:!0,thermal_relief_spoke_width:KRo}:{},outline:h.outline??a}}));await Umo();const c=new Rbt(A);t.root.emit(\"solver:started\",{type:\"solver:started\",solverName:\"CopperPourPipelineSolver\",solverParams:A,solverConstructorArgs:[A],componentName:t.getString()});const{brep_shapes_by_region:l}=c.getOutput();for(const[u,{copperPour:g,sourceNetId:h}]of o.entries()){const{_parsedProps:d}=g,p=d.coveredWithSolderMask??!1;for(const m of l[u]??[]){const _=e.pcb_copper_pour.insert({shape:\"brep\",layer:d.layer,brep_shape:m,source_net_id:h,subcircuit_id:t.subcircuit_id??void 0,covered_with_solder_mask:p});URo({db:e,copperPour:_})}}};function zRo(t){t.root?.pcbDisabled||t._queueAsyncEffect(\"PcbCopperPourRender\",async()=\u003e{const e=t.getSubcircuit(),n=FMe.get(e);if(n){await n;return}const o=VRo(e);FMe.set(e,o);try{await o}finally{FMe.delete(e)}})}var JRo=t=\u003e{const e=t.getSubcircuit();if(!e.root)return;const n=e.selectAll(\"copperpour\").filter(g=\u003eg.getSubcircuit()===e);if(n[0]!==t)return;const o=n.flatMap(g=\u003e{const h=e.selectOne(g._parsedProps.connectsTo);return h?.source_net_id?[h.source_net_id]:[]});if(o.length===0)return;const{db:i}=e.root,r=t.getInheritedMergedProperty(\"pcbStyle\"),{holeDiameter:s,padDiameter:a}=$N(r),A=t._getBoard(),c=A?.pcb_board_id?i.pcb_board.get(A.pcb_board_id):void 0,l={circuitJson:i.toArray(),options:{sourceNetIds:[...new Set(o)],viaHoleDiameter:c?.min_via_hole_diameter??s,viaOuterDiameter:c?.min_via_pad_diameter??a,viaStitchPitch:A?._parsedProps.viaStitchPitch}},u=new LRt(l);if(e.root.emit(\"solver:started\",{type:\"solver:started\",solverName:\"ViaStitchSolver\",solverParams:l,solverConstructorArgs:[l],componentName:e.getString()}),u.solve(),u.failed)throw new Error(u.error??\"Via stitching solver failed\");for(const g of u.getOutput().pcbVias){const{pcb_via_id:h,...d}=g,p=i.pcb_via.insert(d);A?._generatedStitchingViaIds?.add(p.pcb_via_id)}};function WRo(t){t.root?.pcbDisabled||!t.root?._featurePcbViaStitching||t._getBoard()?._parsedProps.enableViaStitching\u0026\u0026t._queueAsyncEffect(\"PcbViaStitchRender\",async()=\u003e{JRo(t)})}var Qkt=class extends Ir{isPcbPrimitive=!0;_isImplicitCopperPour=!1;get config(){return{componentName:\"CopperPour\",zodProps:RMn}}getPcbSize(){return{width:0,height:0}}doInitialCreateNetsFromProps(){const{_parsedProps:t}=this;Hj(this,[t.connectsTo])}doInitialPcbCopperPourRender(){zRo(this)}doInitialPcbViaStitchRender(){WRo(this)}},jRo=t=\u003e{const{root:e}=t;if(!e||e.pcbDisabled||!t._parsedProps.automaticPoursEnabled||e.pcbRoutingDisabled||t.getInheritedProperty(\"routingDisabled\"))return;const{db:n}=e,o=n.subtree({subcircuit_id:t.subcircuit_id}).toArray();if(!o.some(c=\u003ec.type===\"source_net\"\u0026\u0026(c.is_power||c.is_ground||c.is_positive_voltage_source)))return;const r={circuitJson:o,layers:[...t.allLayers]},s=new NRt(r),a=s.getConstructorParams();e.emit(\"solver:started\",{type:\"solver:started\",solverName:\"ImplicitCopperPourPipelineSolver\",solverParams:a[0],solverConstructorArgs:a,componentName:t.getString()}),s.solve();const A=t.selectAll(\"net\");for(const c of s.getOutput()){if(c.shape!==\"polygon\")continue;const l=A.find(g=\u003eg.source_net_id===c.source_net_id);if(!l)throw new Error(`Unable to find the power net for implicit copper region ${c.pcb_copper_pour_id}`);const u=new Qkt({layer:c.layer,connectsTo:l.getPortSelector(),outline:c.points,coveredWithSolderMask:c.covered_with_solder_mask});u._isImplicitCopperPour=!0,l.getSubcircuit().add(u)}},LMe=(t,e,n=0)=\u003e{const{a:o,b:i,c:r,d:s,e:a,f:A}=D0(M0(e.x,e.y),W4(n*Math.PI/180));return t.transform(new QF(o,i,r,s,a,A))},Qw=t=\u003et.orientation()===mF.CCW?t:t.reverse(),y$=(t,e)=\u003eQw(new Ip(new fD(new Gc(t.x,t.y),e))),LO=(t,e,n,o=0,i=0)=\u003e{const r=e/2,s=n/2,a=Math.max(0,Math.min(o,r,s));if(a===0)return LMe(Qw(new Ip(new VBe(-r,-s,r,s))),t,i);const A=[new T8(new Gc(r-a,-s+a),a,-Math.PI/2,0,!0),new T8(new Gc(r-a,s-a),a,0,Math.PI/2,!0),new T8(new Gc(-r+a,s-a),a,Math.PI/2,Math.PI,!0),new T8(new Gc(-r+a,-s+a),a,Math.PI,Math.PI*1.5,!0)],c=[];for(let l=0;l\u003cA.length;l++){const u=A[l],g=A[(l+1)%A.length];c.push(u),u.end.distanceTo(g.start)[0]\u003e1e-12\u0026\u0026c.push(new _D(u.end,g.start))}return LMe(Qw(new Ip(c)),t,i)},vkt=t=\u003e{const e=[];for(let n=0;n\u003ct.vertices.length;n++){const o=t.vertices[n],i=t.vertices[(n+1)%t.vertices.length],r=i.x-o.x,s=i.y-o.y;if(r===0\u0026\u0026s===0)continue;const a=o.bulge??0;if(a===0)e.push(new _D(new Gc(o.x,o.y),new Gc(i.x,i.y)));else{const A=(1-a*a)/(4*a),c=new Gc((o.x+i.x)/2-s*A,(o.y+i.y)/2+r*A);e.push(new T8(c,Math.hypot(r,s)*(1+a*a)/(4*Math.abs(a)),Math.atan2(o.y-c.y,o.x-c.x),Math.atan2(i.y-c.y,i.x-c.x),a\u003e0))}}return Qw(new Ip(e))},x$=(t,e)=\u003e{for(const n of e.reverse().faces)t.addFace(n.shapes);return t},$Ro=t=\u003e{if(t.shape===\"rect\")return LO(t.center,t.width,t.height,0,t.rotation);if(t.shape===\"polygon\")return Qw(new Ip(t.points.map(n=\u003enew Gc(n.x,n.y))));const e=vkt(t.brep_shape.outer_ring);for(const n of t.brep_shape.inner_rings)x$(e,vkt(n));return e},qRo=t=\u003e{if(t.shape===\"polygon\")return Qw(new Ip(t.points.map(n=\u003enew Gc(n.x,n.y))));if(t.shape===\"circle\")return y$(t,t.radius);const e=t.shape===\"pill\"||t.shape===\"rotated_pill\"?t.radius:t.corner_radius??t.rect_border_radius??0;return LO(t,t.width,t.height,e,\"ccw_rotation\"in t?t.ccw_rotation:0)},HMe=(t,e,n)=\u003ex$(y$(t,e/2),y$(t,n/2)),XRo=(t,e=0)=\u003e{if(t.shape===\"circle\")return HMe(t,t.outer_diameter,t.hole_diameter);if(\"outer_width\"in t)return x$(LO(t,t.outer_width,t.outer_height,Math.min(t.outer_width,t.outer_height)/2,t.ccw_rotation),LO(t,t.hole_width,t.hole_height,Math.min(t.hole_width,t.hole_height)/2,t.ccw_rotation));const n={x:t.x+t.hole_offset_x,y:t.y+t.hole_offset_y},o=t.shape===\"hole_with_polygon_pad\"?LMe(Qw(new Ip(t.pad_outline.map(i=\u003enew Gc(i.x,i.y)))),t,t.ccw_rotation??e):LO(t,t.rect_pad_width,t.rect_pad_height,t.rect_border_radius,\"rect_ccw_rotation\"in t?t.rect_ccw_rotation:0);if(t.shape===\"circular_hole_with_rect_pad\"||t.shape===\"hole_with_polygon_pad\"\u0026\u0026t.hole_shape===\"circle\"){if(t.hole_diameter===void 0)throw new Error(\"Circular plated hole requires hole_diameter\");return x$(o,y$(n,t.hole_diameter/2))}if(!(\"hole_width\"in t)||t.hole_width===void 0||t.hole_height===void 0)throw new Error(\"Slotted plated hole requires hole_width and hole_height\");return x$(o,LO(n,t.hole_width,t.hole_height,Math.min(t.hole_width,t.hole_height)/2,\"hole_ccw_rotation\"in t?t.hole_ccw_rotation:t.shape===\"hole_with_polygon_pad\"?t.ccw_rotation??e:0))},ZRo=(t,e,n,o=n)=\u003e{const i=Math.hypot(e.x-t.x,e.y-t.y),r=n/2,s=o/2;if(i\u003c=Math.abs(s-r))return y$(r\u003e=s?t:e,Math.max(r,s));const a=Math.atan2(e.y-t.y,e.x-t.x),A=Math.acos((r-s)/i),c=new T8(new Gc(t.x,t.y),r,a+A,a-A,!0),l=new T8(new Gc(e.x,e.y),s,a-A,a+A,!0);return Qw(new Ip([c,new _D(c.end,l.start),l,new _D(l.end,c.start)]))},eTo=(t,e,n=1e-7)=\u003et.vertices.some(o=\u003ee.contains(o))||e.vertices.some(o=\u003et.contains(o))||t.distanceTo(e)[0]\u003c=n,OMe=1e6,E$=1e-7*OMe,wkt=(t,e)=\u003et.route_type===\"wire\"?{point:t,layer:t.layer}:t.route_type===\"via\"?{point:t,layer:e===\"start\"?t.from_layer:t.to_layer}:{point:t[e],layer:e===\"start\"?t.start_layer:t.end_layer},tTo=(t,e=new Set)=\u003e{const n=Vf(t),o=t.filter(f=\u003ef.type===\"pcb_copper_pour\"),i=new Set(o.flatMap(f=\u003ef.source_net_id?[n.getNetConnectedToId(f.source_net_id)??f.source_net_id]:[])),r=[],s=f=\u003e{i.has(f.netId)\u0026\u0026!f.polygon.isEmpty()\u0026\u0026r.push({...f,polygon:f.polygon.scale(OMe,OMe)})},a=new Map(t.filter(f=\u003ef.type===\"pcb_component\").map(f=\u003e[f.pcb_component_id,f])),A=t.filter(f=\u003ef.type===\"pcb_via\"),c=t.find(f=\u003ef.type===\"pcb_board\");for(const f of o)f.source_net_id\u0026\u0026s({polygon:$Ro(f),layers:[f.layer],netId:n.getNetConnectedToId(f.source_net_id)??f.source_net_id,isTerminal:!1,pourId:f.pcb_copper_pour_id});for(const f of t)if(f.type===\"pcb_smtpad\"){const I=n.getNetConnectedToId(f.pcb_smtpad_id);I\u0026\u0026i.has(I)\u0026\u0026s({polygon:qRo(f),layers:[f.layer],netId:I,isTerminal:!!f.pcb_port_id})}else if(f.type===\"pcb_plated_hole\"){const I=n.getNetConnectedToId(f.pcb_plated_hole_id);I\u0026\u0026i.has(I)\u0026\u0026s({polygon:XRo(f,f.pcb_component_id?a.get(f.pcb_component_id)?.rotation:0),layers:f.layers,netId:I,isTerminal:!!f.pcb_port_id})}else if(f.type===\"pcb_via\"){const I=n.getNetConnectedToId(f.pcb_via_id);I\u0026\u0026i.has(I)\u0026\u0026s({polygon:HMe(f,f.outer_diameter,f.hole_diameter),layers:f.layers,netId:I,isTerminal:!e.has(f.pcb_via_id),viaId:f.pcb_via_id})}else if(f.type===\"pcb_trace\"){const I=n.getNetConnectedToId(f.pcb_trace_id);if(!I||!i.has(I))continue;for(let C=0;C\u003cf.route.length;C++){const y=f.route[C];if(y.route_type===\"via\"){const w=A.find(M=\u003eM.x===y.x\u0026\u0026M.y===y.y\u0026\u0026M.layers.includes(y.from_layer)\u0026\u0026M.layers.includes(y.to_layer));s({polygon:HMe(y,w?.outer_diameter??y.outer_diameter??c?.min_via_pad_diameter??.3,w?.hole_diameter??y.hole_diameter??c?.min_via_hole_diameter??.2),layers:w?.layers??lw({fromLayer:y.from_layer,toLayer:y.to_layer,layerCount:c?.num_layers??2}),netId:I,isTerminal:!1})}const x=f.route[C+1];if(!x)continue;const E=wkt(y,\"end\"),B=wkt(x,\"start\");if(E.layer!==B.layer)continue;const S=y.route_type===\"via\"?x.route_type===\"via\"?void 0:x.width:y.width;if(S===void 0)continue;const Q=f.route_thickness_mode===\"interpolated\"\u0026\u0026x.route_type!==\"via\"?x.width:S;s({polygon:ZRo(E.point,B.point,S,Q),layers:[E.layer],netId:I,isTerminal:!1})}}const l=new Set,u=new Set;if(r.length===0)return{floatingPourIds:l,floatingViaIds:u};const g=r.map((f,I)=\u003eI),h=f=\u003e{for(;g[f]!==f;)g[f]=g[g[f]],f=g[f];return f},d=r.map(f=\u003ef.polygon.box),p=new UH(r.length);for(const f of d)p.add(f.xmin,f.ymin,f.xmax,f.ymax);p.finish();for(const[f,I]of r.entries()){const C=d[f];for(const y of p.search(C.xmin-E$,C.ymin-E$,C.xmax+E$,C.ymax+E$)){if(y\u003c=f||h(f)===h(y))continue;const x=r[y];I.netId!==x.netId||!I.layers.some(E=\u003ex.layers.includes(E))||eTo(I.polygon,x.polygon,E$)\u0026\u0026(g[h(y)]=h(f))}}const m=new Set(r.flatMap(f=\u003ef.isTerminal?[f.netId]:[])),_=new Set(r.flatMap((f,I)=\u003ef.isTerminal?[h(I)]:[]));for(const[f,I]of r.entries())!m.has(I.netId)||_.has(h(f))||(I.pourId\u0026\u0026l.add(I.pourId),I.viaId\u0026\u0026u.add(I.viaId));return{floatingPourIds:l,floatingViaIds:u}},nTo=t=\u003e{if(!t.root||t.root.pcbDisabled)return;const{db:e}=t.root,n=e.subtree({subcircuit_id:t.subcircuit_id}).toArray();if(e.pcb_autorouting_error.list().length\u003e0||!n.some(r=\u003er.type===\"pcb_copper_pour\"))return;const{floatingPourIds:o,floatingViaIds:i}=tTo(n,t._generatedStitchingViaIds);for(const r of o)e.pcb_copper_pour.delete(r);for(const r of i)t._generatedStitchingViaIds.has(r)\u0026\u0026e.pcb_via.delete(r);for(const r of e.pcb_trace.list())r.route.some(s=\u003e\"copper_pour_id\"in s\u0026\u0026s.copper_pour_id\u0026\u0026o.has(s.copper_pour_id))\u0026\u0026e.pcb_trace.update(r.pcb_trace_id,{route:r.route.map(s=\u003e{if(!(\"copper_pour_id\"in s)||!s.copper_pour_id||!o.has(s.copper_pour_id))return s;const{copper_pour_id:a,is_inside_copper_pour:A,...c}=s;return c})})},Pkt=t=\u003e{t._pcbTraceRenderWaitingForPlacementChecks\u0026\u0026(t.renderPhaseStates.PcbTraceRender.initialized=!1,t.renderPhaseStates.PcbTraceRender.dirty=!1,t._pcbTraceRenderWaitingForPlacementChecks=!1);for(const e of t.children)Pkt(e)},oTo=t=\u003e{if(t.root?.pcbDisabled)return;const e=t.root?.platform?.placementDrcChecksDisabled??t.getInheritedProperty(\"placementDrcChecksDisabled\"),n=t.root?.platform?.drcChecksDisabled??t.getInheritedProperty(\"drcChecksDisabled\");if(t._pcbPlacementDrcErrorCount=null,t._pcbPlacementDrcCheckError=null,t._pcbPlacementDrcChecksPending=!1,e||n){t._pcbPlacementDrcErrorCount=0;return}const{db:o}=t.root,i=o.subtree({subcircuit_id:t.subcircuit_id}).toArray(),r=o.toArray();t._pcbPlacementDrcChecksPending=!0,t._queueAsyncEffect(\"board:pre-route-placement-checks\",async()=\u003e{try{const s=await Wmt(i,{consolidateOverlaps:!1}),a=Bse(i,s.filter(c=\u003e!t._isExpectedCastellatedHoleDrcError(c))),A=a.filter(c=\u003e!r.some(l=\u003el.type===c.type\u0026\u0026\"message\"in l\u0026\u0026l.message===c.message));o.insertAll(A),t._pcbPlacementDrcErrorCount=a.filter(c=\u003ec.type.endsWith(\"_error\")).length}catch(s){t._pcbPlacementDrcCheckError=s instanceof Error?s.message:String(s)}finally{t._pcbPlacementDrcChecksPending=!1,Pkt(t)}})},iTo=1e-6,rTo=t=\u003et?Array.isArray(t)?t:[t]:[],sTo=class h4n extends Pb{outlinePointIndex;holeDiameter;padDiameter;port;trace;static fromBoardOutline(e){return(e??[]).flatMap((n,o)=\u003en.isCastellatedHole?[new h4n(n,o)]:[])}constructor(e,n){const o=`castellated_hole_${n+1}`,i=rTo(e.connectsTo),r=lt.parse(e.holeDiameter),s=lt.parse(e.padDiameter);super({shape:\"circle\",holeDiameter:r,outerDiameter:s,portHints:[o]}),this.outlinePointIndex=n,this.holeDiameter=r,this.padDiameter=s,this.port=i.length\u003e0?new Pu({name:o}):null,this.trace=this.port?new t1({path:[`port.${o}`,...i],displayName:`Castellated hole ${n+1} connectivity`}):null}_getParentBoard(){if(this.parent?.componentName!==\"Board\")throw new Error(\"A board castellated hole must be a direct board child\");return this.parent}_getPositionFromBoardOutline(){const e=this._getParentBoard(),o=(e.pcb_board_id?e.root?.db.pcb_board.get(e.pcb_board_id):null)?.outline?.[this.outlinePointIndex];if(!o)throw new Error(`Missing emitted board outline point ${this.outlinePointIndex}`);return o}_getGlobalPcbPositionBeforeLayout(){return this._getPositionFromBoardOutline()}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:e}=this.root,n=this._getPositionFromBoardOutline(),o=e.pcb_plated_hole.insert({shape:\"circle\",outer_diameter:this.padDiameter,hole_diameter:this.holeDiameter,...n,layers:this.getAvailablePcbLayers(),port_hints:this.getNameAndAliases(),subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0});this.pcb_plated_hole_id=o.pcb_plated_hole_id}syncPositionToBoardOutline(){this.pcb_plated_hole_id\u0026\u0026this._setPositionFromLayout(this._getPositionFromBoardOutline())}removePcbPrimitiveRender(){const{db:e}=this.root;this.pcb_plated_hole_id\u0026\u0026(e.pcb_plated_hole.delete(this.pcb_plated_hole_id),this.pcb_plated_hole_id=null),this.matchedPort?.pcb_port_id\u0026\u0026(e.pcb_port.delete(this.matchedPort.pcb_port_id),this.matchedPort.pcb_port_id=null)}isExpectedBoardEdgeDrcError(e){if(!this.pcb_plated_hole_id)return!1;if(e.type===\"pcb_placement_error\")return e.pcb_placement_error_id===`copper_too_close_to_board_edge_${this.pcb_plated_hole_id}`;if(e.type!==\"pcb_trace_error\"||!e.pcb_trace_error_id.startsWith(\"trace_too_close_to_board_\"))return!1;const n=e.pcb_trace_error_id.match(/_segment_(\\d+)$/);if(!n)return!1;const o=this.root?.db.pcb_trace.get(e.pcb_trace_id),i=Number(n[1]),r=[o?.route[i],o?.route[i+1]].flatMap(a=\u003ea\u0026\u0026\"x\"in a\u0026\u0026\"y\"in a?[{x:a.x,y:a.y}]:[]),s=this.root?.db.pcb_plated_hole.get(this.pcb_plated_hole_id);return s?r.some(a=\u003eMath.hypot(a.x-s.x,a.y-s.y)\u003c=iTo):!1}},aTo=.01,ATo=.15,Mkt=(t,e,n)=\u003e{const o=t/2,i=e/2,r=Math.min(n,o,i);if(r\u003caTo)return[{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];const a=Math.max(1,Math.ceil(Math.PI/2*r/.1)),A=Math.PI/2/a,c=[];c.push({x:-o+r,y:-i}),c.push({x:o-r,y:-i});for(let l=1;l\u003c=a;l++){const u=-Math.PI/2+l*A;c.push({x:o-r+r*Math.cos(u),y:-i+r+r*Math.sin(u)})}c.push({x:o,y:i-r});for(let l=1;l\u003c=a;l++){const u=0+l*A;c.push({x:o-r+r*Math.cos(u),y:i-r+r*Math.sin(u)})}c.push({x:-o+r,y:i});for(let l=1;l\u003c=a;l++){const u=Math.PI/2+l*A;c.push({x:-o+r+r*Math.cos(u),y:i-r+r*Math.sin(u)})}c.push({x:-o,y:-i+r});for(let l=1;l\u003c=a;l++){const u=Math.PI+l*A;c.push({x:-o+r+r*Math.cos(u),y:-i+r+r*Math.sin(u)})}return c},wB=class extends A6{pcb_board_id=null;source_board_id=null;_drcChecksComplete=!1;_drcChecksInProgress=!1;_connectedSchematicPortPairs=new Set;_panelPositionOffset=null;_castellatedHoles;constructor(t){super(t),this._castellatedHoles=sTo.fromBoardOutline(this._parsedProps.outline);for(const e of this._castellatedHoles)e.port\u0026\u0026this.add(e.port),this.add(e),e.trace\u0026\u0026this.add(e.trace)}get isSubcircuit(){return!0}get isGroup(){return!0}get config(){return{componentName:\"Board\",zodProps:nlt}}get boardThickness(){return this._parsedProps.thickness??1.4}get allLayers(){return Owe(this._parsedProps.layers??2)}_getSubcircuitLayerCount(){return this._parsedProps.layers??2}_computePcbGlobalTransformBeforeLayout(){if(this._panelPositionOffset){const t=this.parent?._computePcbGlobalTransformBeforeLayout?.()??{a:1,b:0,c:0,d:1,e:0,f:0};return D0(t,M0(this._panelPositionOffset.x,this._panelPositionOffset.y))}return super._computePcbGlobalTransformBeforeLayout()}_getBoardCalcVariables(){const{_parsedProps:t}=this;if((t.width==null||t.height==null)\u0026\u0026!t.outline)return{};const n=this.pcb_board_id?this.root?.db.pcb_board.get(this.pcb_board_id):null;let o=n?.width??t.width,i=n?.height??t.height;if((o==null||i==null)\u0026\u0026t.outline?.length){const l=Oh(t.outline);l\u0026\u0026(o??=l.maxX-l.minX,i??=l.maxY-l.minY)}const{pcbX:r,pcbY:s}=this.getResolvedPcbPositionProp(),a=n?.center??{x:r+(t.outlineOffsetX??0),y:s+(t.outlineOffsetY??0)},A=o??0,c=i??0;return{\"board.minX\":a.x-A/2,\"board.maxX\":a.x+A/2,\"board.minY\":a.y-c/2,\"board.maxY\":a.y+c/2}}doInitialPcbBoardAutoSize(){if(this.root?.pcbDisabled||!this.pcb_board_id)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),o=t.pcb_board.get(this.pcb_board_id);if(o?.width\u0026\u0026o?.height||o?.outline\u0026\u0026o.outline.length\u003e0)return;let i=1/0,r=1/0,s=-1/0,a=-1/0;const A=uPe(t,this.subcircuit_id),c=new Set([this.subcircuit_id,...A]),l=t.pcb_component.list().filter(x=\u003ex.subcircuit_id\u0026\u0026c.has(x.subcircuit_id)),u=t.pcb_group.list().filter(x=\u003ex.subcircuit_id\u0026\u0026c.has(x.subcircuit_id));let g=!1;const h=(x,E,B)=\u003e{E===0||B===0||(g=!0,i=Math.min(i,x.x-E/2),r=Math.min(r,x.y-B/2),s=Math.max(s,x.x+E/2),a=Math.max(a,x.y+B/2))};for(const x of l)h(x.center,x.width,x.height);for(const x of u){let E=x.width??0,B=x.height??0;if(x.outline\u0026\u0026x.outline.length\u003e0){const S=Oh(x.outline);S\u0026\u0026(E=S.maxX-S.minX,B=S.maxY-S.minY)}h(x.center,E,B)}if(e.boardAnchorPosition){const{x,y:E}=e.boardAnchorPosition;i=Math.min(i,x),r=Math.min(r,E),s=Math.max(s,x),a=Math.max(a,E)}const d=2,p=g?s-i+d*2:0,m=g?a-r+d*2:0,_={x:g?(i+s)/2+(e.outlineOffsetX??0):(e.outlineOffsetX??0)+n.x,y:g?(r+a)/2+(e.outlineOffsetY??0):(e.outlineOffsetY??0)+n.y},f=e.width??p,I=e.height??m;let C=e.outline;!C\u0026\u0026e.borderRadius!=null\u0026\u0026f\u003e0\u0026\u0026I\u003e0\u0026\u0026(C=Mkt(f,I,e.borderRadius));const y={width:f,height:I,center:_};C\u0026\u0026(y.outline=C.map(x=\u003e({x:x.x+(e.outlineOffsetX??0),y:x.y+(e.outlineOffsetY??0)}))),t.pcb_board.update(this.pcb_board_id,y)}updatePcbBoardAutoSize(){this.doInitialPcbBoardAutoSize()}_addBoardInformationToSilkscreen(){const t=this.root?.platform;if(!t?.printBoardInformationToSilkscreen)return;const e=this.root.db.pcb_board.get(this.pcb_board_id);if(!e)return;const n=[];if(t.projectName\u0026\u0026n.push(t.projectName),t.version\u0026\u0026n.push(`v${t.version}`),t.url\u0026\u0026n.push(t.url),n.length===0)return;const o=n.join(`\n`),s={x:e.center.x+e.width/2-.25,y:e.center.y-e.height/2+1};this.root.db.pcb_silkscreen_text.insert({pcb_component_id:this.pcb_board_id,layer:\"top\",font:\"tscircuit2024\",font_size:.45,text:o,ccw_rotation:0,anchor_alignment:\"bottom_right\",anchor_position:s})}doInitialSourceRender(){const t=this.getDescendants().find(o=\u003eo.lowercaseComponentName===\"board\");if(t)throw new Error(`Nested boards are not supported: found board \"${t.name}\" inside board \"${this.name}\"`);super.doInitialSourceRender();const{db:e}=this.root,n=e.source_board.insert({source_group_id:this.source_group_id,title:this.props.title||this.props.name});this.source_board_id=n.source_board_id}getSubcircuitPropHash(){return Bkt(this)}doInitialRenderIsolatedSubcircuits(){Ckt(this)}doInitialInflateSubcircuitCircuitJson(){const t=this._isolatedCircuitJson;if(t){this._isInflatedFromCircuitJson=!0,this._isolatedCircuitJson=null,Hue(this,t,[]);return}const{circuitJson:e,children:n}=this._parsedProps;e\u0026\u0026(this._isInflatedFromCircuitJson=!0),Hue(this,e,n)}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,o=e.circuitJson?.find(x=\u003ex.type===\"pcb_board\"),i=this.props,r=i.isViaInPadAllowed??o?.is_via_in_pad_allowed,s=i.allowBlindAndBuriedVias??o?.allow_blind_and_buried_vias;let a=e.width??o?.width??0,A=e.height??o?.height??0;const c=this._getGlobalPcbPositionBeforeLayout();let l={x:c.x+(e.outlineOffsetX??0),y:c.y+(e.outlineOffsetY??0)};const{boardAnchorPosition:u,boardAnchorAlignment:g}=e;if(u\u0026\u0026(l=u8o({boardAnchorPosition:u,boardAnchorAlignment:g??\"center\",width:a,height:A})),e.outline){const x=e.outline.map(M=\u003eM.x),E=e.outline.map(M=\u003eM.y),B=Math.min(...x),S=Math.max(...x),Q=Math.min(...E),w=Math.max(...E);a=S-B,A=w-Q}let h=e.outline;!h\u0026\u0026e.borderRadius!=null\u0026\u0026a\u003e0\u0026\u0026A\u003e0\u0026\u0026(h=Mkt(a,A,e.borderRadius));let d={x:0,y:0};if(h\u0026\u0026h.length\u003e0\u0026\u0026(this.parent?.lowercaseComponentName===\"panel\"||this.parent?.lowercaseComponentName===\"subpanel\")){const x=Oh(h);if(x){const E=(x.minX+x.maxX)/2,B=(x.minY+x.maxY)/2;d={x:l.x-E,y:l.y-B}}}const p=this.getSubcircuit()._parsedProps,m=this.getInheritedMergedProperty(\"pcbStyle\"),_=$N(m),f=p.minViaHoleDiameter??(m?.viaHoleDiameter!==void 0?_.holeDiameter:void 0),I=f??EB.min_via_hole_diameter,C=p.minViaPadDiameter??(m?.viaPadDiameter!==void 0?_.padDiameter:f!==void 0?f+ATo:EB.min_via_pad_diameter),y=t.pcb_board.insert({source_board_id:this.source_board_id,center:l,thickness:this.boardThickness,num_layers:this.allLayers.length,width:a,height:A,outline:h?.map(x=\u003e({x:x.x+(e.outlineOffsetX??0)+d.x,y:x.y+(e.outlineOffsetY??0)+d.y})),material:e.material,...r!==void 0\u0026\u0026{is_via_in_pad_allowed:r},...s!==void 0\u0026\u0026{allow_blind_and_buried_vias:s},...e.solderMaskColor!==void 0\u0026\u0026{solder_mask_color:e.solderMaskColor},...e.silkscreenColor!==void 0\u0026\u0026{silkscreen_color:e.silkscreenColor},min_trace_width:p.minTraceWidth??EB.min_trace_width,min_via_hole_diameter:I,min_via_pad_diameter:C,min_via_hole_edge_to_via_hole_edge_clearance:p.minViaHoleEdgeToViaHoleEdgeClearance??EB.min_via_hole_edge_to_via_hole_edge_clearance,min_via_edge_to_pad_edge_clearance:p.minViaEdgeToPadEdgeClearance??EB.min_via_edge_to_pad_edge_clearance,min_trace_to_pad_edge_clearance:p.minTraceToPadEdgeClearance??EB.min_trace_to_pad_edge_clearance,min_pad_edge_to_pad_edge_clearance:p.minPadEdgeToPadEdgeClearance??EB.min_pad_edge_to_pad_edge_clearance,min_plated_hole_drill_edge_to_drill_edge_clearance:p.minPlatedHoleDrillEdgeToDrillEdgeClearance??EB.min_plated_hole_drill_edge_to_drill_edge_clearance,min_board_edge_clearance:p.minBoardEdgeClearance??EB.min_board_edge_clearance});this.pcb_board_id=y.pcb_board_id,this._addBoardInformationToSilkscreen()}removePcbComponentRender(){const{db:t}=this.root;this.pcb_board_id\u0026\u0026(t.pcb_board.delete(this.pcb_board_id),this.pcb_board_id=null)}doInitialPcbDesignRuleChecks(){super.doInitialPcbDesignRuleChecks(),this.updatePcbDesignRuleChecks()}doInitialPcbPlacementDesignRuleChecks(){oTo(this)}doInitialPcbImplicitCopperPourRender(){jRo(this)}_generatedStitchingViaIds=new Set;doInitialPcbCopperPourCleanup(){nTo(this)}updatePcbDesignRuleChecks(){const{db:t}=this.root,e=this.root?.pcbRoutingDisabled||this.getInheritedProperty(\"routingDisabled\"),n=this.root?.pcbDisabled,o=this.root?.schematicDisabled,i=this.root?.platform?.drcChecksDisabled??this.getInheritedProperty(\"drcChecksDisabled\"),r=this.root?.platform?.netlistDrcChecksDisabled??this.getInheritedProperty(\"netlistDrcChecksDisabled\"),s=this.getInheritedProperty(\"pinSpecificationDrcChecksDisabled\"),a=this.root?.platform?.placementDrcChecksDisabled??this.getInheritedProperty(\"placementDrcChecksDisabled\"),A=this.root?.platform?.routingDrcChecksDisabled??this.getInheritedProperty(\"routingDrcChecksDisabled\"),c=!i\u0026\u0026!r,l=!i\u0026\u0026!s,u=!i\u0026\u0026!o,g=!i\u0026\u0026!n\u0026\u0026!a,h=!i\u0026\u0026!n\u0026\u0026!e\u0026\u0026!A,d=this.root?.platform?.fabricatorEngine,p=this._parsedProps.fabricatorPreset,m=!i\u0026\u0026!n\u0026\u0026!!d\u0026\u0026!!p;if((h||m)\u0026\u0026this._hasIncompleteAsyncEffectsInSubtreeForPhase(\"PcbTraceRender\"))return;const _=this._hasTracesToRoute();if((h||m)\u0026\u0026_\u0026\u0026!this._areChildSubcircuitsRouted()||this._drcChecksComplete||this._drcChecksInProgress)return;const f=async y=\u003e{const x=[];if(m\u0026\u0026d\u0026\u0026p\u0026\u0026this.pcb_board_id\u0026\u0026x.push(Promise.resolve(d.runDrcChecks({circuitJson:y,fabricatorPreset:p,pcbBoardId:this.pcb_board_id}))),h\u0026\u0026x.push(jmt(y).then(B=\u003eB.filter(S=\u003e!this._isExpectedCastellatedHoleDrcError(S)))),g){const B=t.toArray();x.push(Wmt(y,{consolidateOverlaps:!1}).then(S=\u003eBse(y,S.filter(Q=\u003e!this._isExpectedCastellatedHoleDrcError(Q))).filter(Q=\u003e!B.some(w=\u003ew.type===Q.type\u0026\u0026\"message\"in w\u0026\u0026w.message===Q.message))))}if(c\u0026\u0026x.push(y$n(y)),l\u0026\u0026x.push(E$n(y)),u\u0026\u0026x.push(x$n(y)),!i)for(const B of this.selectAll(\"drccheck\"))x.push(B.runCustomDrcCheck(y));const E=await Promise.all(x);t.insertAll(Bse(y,Ymt(E.flat())))},C=t.subtree({subcircuit_id:this.subcircuit_id}).toArray();this._drcChecksInProgress=!0,this._queueAsyncEffect(\"board:drc-checks\",async()=\u003e{try{await f(C),this._drcChecksComplete=!0}finally{this._drcChecksInProgress=!1}})}runRenderPhaseForChildren(t){this.root?.emit(\"board:renderPhaseStarted\",{renderId:this._renderId,phase:t}),super.runRenderPhaseForChildren(t)}_repositionOnPcb(t){const{db:e}=this.root,n=this.pcb_board_id?e.pcb_board.get(this.pcb_board_id):null,o=n?.center;if(!o){this.pcb_board_id\u0026\u0026e.pcb_board.update(this.pcb_board_id,{center:t});return}const i=t.x-o.x,r=t.y-o.y;if(!(Math.abs(i)\u003c1e-6\u0026\u0026Math.abs(r)\u003c1e-6)\u0026\u0026this.pcb_board_id\u0026\u0026(e.pcb_board.update(this.pcb_board_id,{center:t}),n?.outline)){const s=Oh(n.outline);if(s){const a={x:(s.minX+s.maxX)/2,y:(s.minY+s.maxY)/2},A=t.x-a.x,c=t.y-a.y,l=n.outline.map(u=\u003e({x:u.x+A,y:u.y+c}));e.pcb_board.update(this.pcb_board_id,{outline:l});for(const u of this._castellatedHoles)u.syncPositionToBoardOutline()}}}_isExpectedCastellatedHoleDrcError(t){return this._castellatedHoles.some(e=\u003ee.isExpectedBoardEdgeDrcError(t))}},Dkt=class extends A6{constructor(t){super({...t,subcircuit:!0})}getSubcircuitPropHash(){return Bkt(this)}doInitialRenderIsolatedSubcircuits(){Ckt(this)}doInitialCreateNetsFromProps(){super.doInitialCreateNetsFromProps(),this._createTracesForExposedConnections()}_createTracesForExposedConnections(){const t=this._getNetNamesToExpose();if(!t?.length)return;const e=this.parent?.getSubcircuit?.();if(e\u0026\u0026this.name)for(const n of t){const o=cTo(n),i=`\u003e net.${o}`,r=`.${this.name} \u003e net.${o}`;if(e.children.find(c=\u003ec instanceof Qb\u0026\u0026c._parsedProps.name===o)||e.add(new Qb({name:o})),e.children.find(c=\u003e{if(!(c instanceof t1)||!c._exposesSubcircuitConnection)return!1;const l=c._parsedProps;return l.from===r\u0026\u0026l.to===i}))continue;const A=new t1({from:r,to:i,displayName:o});A._exposesSubcircuitConnection=!0,e.add(A)}}_getNetNamesToExpose(){const t=this._parsedProps.exposedNets??[];if(!this._parsedProps.exposeNets)return t;const e=this.selectAll(\"net\").filter(n=\u003en instanceof Qb\u0026\u0026n.getSubcircuit()===this).map(n=\u003en._parsedProps.name);return Array.from(new Set([...t,...e]))}doInitialInflateSubcircuitCircuitJson(){const t=this._isolatedCircuitJson;if(t){this._isInflatedFromCircuitJson=!0,this._isolatedCircuitJson=null,Hue(this,t,[]);return}const{circuitJson:e,children:n}=this._parsedProps;e\u0026\u0026(this._isInflatedFromCircuitJson=!0),Hue(this,e,n)}},cTo=t=\u003et.startsWith(\"net.\")?t.slice(4):t,lTo=class extends Dkt{pcb_board_id=null;get config(){return{componentName:\"MountedBoard\",zodProps:kPn}}get boardThickness(){return 1.4}get allLayers(){return[\"top\",\"bottom\"]}_connectedSchematicPortPairs=new Set;_getBoardCalcVariables(){return this._findCarrierBoard()?._getBoardCalcVariables()??{}}_findCarrierBoard(){let t=this.parent;for(;t;){if(t instanceof wB)return t;t=t.parent}return null}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),o=t.pcb_board.insert({center:{x:n.x,y:n.y},width:e.width??0,height:e.height??0,is_mounted_to_carrier_board:!0});this.pcb_board_id=o.pcb_board_id}doInitialPcbBoardAutoSize(){if(!this.pcb_board_id||!this.root)return;const t=this._findCarrierBoard();t?.pcb_board_id\u0026\u0026this.root.db.pcb_board.update(this.pcb_board_id,{carrier_pcb_board_id:t.pcb_board_id})}},Nkt=5,GMe=2,Rkt=(t,e)=\u003e{const{gapLength:n,cutoutWidth:o,mouseBites:i,mouseBiteHoleDiameter:r,mouseBiteHoleSpacing:s}=e,a=[],A=[];if(t.length\u003c2)return{tabCutouts:a,mouseBiteHoles:A};const c=new Ip(t.map(u=\u003eby(u.x,u.y)));let l;if(t.length\u003e2){const u=by(t[0].x,t[0].y),g=by(t[1].x,t[1].y),h=vF(u,g).normalize(),d=h.rotate(Math.PI/2),m=u.translate(h.multiply(KBe(u,g).length/2)).translate(d.multiply(.01));l=c.contains(m)}else l=c.area()\u003e0;for(let u=0;u\u003ct.length;u++){const g=t[u],h=t[(u+1)%t.length];if(!g||!h)continue;const d=by(g.x,g.y),p=by(h.x,h.y),m=KBe(d,p),_=m.length;if(_\u003c1e-6)continue;const f=vF(d,p),I=f.normalize();let C=I.rotate(Math.PI/2);const x=m.middle().translate(C.multiply(.01));c.contains(x)\u0026\u0026(C=C.multiply(-1));const E=2,B=E*r+(E-1)*s;let S;i?S=B:S=n,S=Math.min(S,_*.9);const Q=(_-S)/2,w=Q+S;if(i){const Y=r+s;if(S\u003e=B\u0026\u0026Y\u003e0){const W=(S-B)/2+r/2,te=Q+W;for(let j=0;j\u003cE;j++){const J=te+j*Y,oe=d.translate(I.multiply(J));A.push({x:oe.x,y:oe.y})}}}const M=t[(u-1+t.length)%t.length],k=t[(u+2)%t.length];let R=0,F=0;if(M\u0026\u0026k){const Y=vF(by(M.x,M.y),d),W=Y.cross(f),te=l?W\u003e1e-9:W\u003c-1e-9,j=vF(p,by(k.x,k.y)),J=f.cross(j),oe=l?J\u003e1e-9:J\u003c-1e-9;if(te){let ie=Y.angleTo(f);ie\u003eMath.PI\u0026\u0026(ie=2*Math.PI-ie),R=o*Math.tan(ie/2)}else R=0;if(oe){let ie=f.angleTo(j);ie\u003eMath.PI\u0026\u0026(ie=2*Math.PI-ie),F=o*Math.tan(ie/2)}else F=0}const O=S\u003c1e-6?[{start:0-R,end:_+F}]:[{start:0-R,end:Q},{start:w,end:_+F}],U=C.multiply(o);for(const Y of O){const W=Y.end-Y.start;if(W\u003c1e-6)continue;const j=d.translate(I.multiply(Y.start+W/2)).translate(U.multiply(.5)),J=W,oe=o,ie=I.slope*180/Math.PI;a.push({type:\"pcb_cutout\",shape:\"rect\",center:{x:j.x,y:j.y},width:J,height:oe,rotation:ie,corner_radius:o/2})}}return{tabCutouts:a,mouseBiteHoles:A}};function uTo(t,e){const n=[],o=[];let{tabWidth:i,tabLength:r,mouseBites:s}=e;const a=[];for(const g of t)if(g.width\u0026\u0026g.height)a.push(Math.min(g.width,g.height));else if(g.outline\u0026\u0026g.outline.length\u003e0){const h=new Ip(g.outline.map(p=\u003eby(p.x,p.y))),d=Math.abs(h.area());d\u003e0\u0026\u0026a.push(Math.sqrt(d))}if(a.length\u003e0){const h=Math.min(...a)/20;i=Math.min(i,GMe*Math.max(h,.3)),r=Math.min(r,Nkt*Math.max(h,.3))}const A=t.map(g=\u003e{if((!g.outline||g.outline.length===0)\u0026\u0026g.width\u0026\u0026g.height){const h=g.width/2,d=g.height/2;return{...g,outline:[{x:g.center.x-h,y:g.center.y-d},{x:g.center.x+h,y:g.center.y-d},{x:g.center.x+h,y:g.center.y+d},{x:g.center.x-h,y:g.center.y+d}]}}return g});for(const g of A)if(g.outline\u0026\u0026g.outline.length\u003e0){const h=i*.45,d=h*.1,p=Rkt(g.outline,{gapLength:r,cutoutWidth:i,mouseBites:s,mouseBiteHoleDiameter:h,mouseBiteHoleSpacing:d});n.push(...p.tabCutouts),o.push(...p.mouseBiteHoles)}const c=n.map((g,h)=\u003e({...g,pcb_cutout_id:`panel_tab_${h}`})),l=i*.45,u=o.map((g,h)=\u003e({type:\"pcb_hole\",pcb_hole_id:`panel_mouse_bite_${h}`,hole_shape:\"circle\",hole_diameter:l,x:g.x,y:g.y}));return{tabCutouts:c,mouseBiteHoles:u}}function gTo(t,e){return t.map(i=\u003e{if((!i.outline||i.outline.length===0)\u0026\u0026i.width\u0026\u0026i.height){const r=i.width/2,s=i.height/2;return{...i,outline:[{x:i.center.x-r,y:i.center.y-s},{x:i.center.x+r,y:i.center.y-s},{x:i.center.x+r,y:i.center.y+s},{x:i.center.x-r,y:i.center.y+s}]}}return i}).flatMap(i=\u003e{if(!i.outline||i.outline.length===0)return[];const{tabCutouts:r}=Rkt(i.outline,{gapLength:0,cutoutWidth:e.cutoutWidth,mouseBites:!1,mouseBiteHoleDiameter:0,mouseBiteHoleSpacing:0});return r.map(s=\u003e({...s,pcb_board_id:i.pcb_board_id}))}).map((i,r)=\u003e({...i,pcb_cutout_id:`panel_outline_routing_cutout_${r}`}))}var Gue=t=\u003e{const e=t._parsedProps;let n=e.width!=null?lt.parse(e.width):void 0,o=e.height!=null?lt.parse(e.height):void 0;if((n===void 0||o===void 0)\u0026\u0026e.outline?.length){const i=Oh(e.outline);i\u0026\u0026(n??=i.maxX-i.minX,o??=i.maxY-i.minY)}if((n===void 0||o===void 0)\u0026\u0026e.circuitJson?.length){const i=e.circuitJson.find(r=\u003er.type===\"pcb_board\");i\u0026\u0026(n??=i.width,o??=i.height)}return{width:n??0,height:o??0}};function dTo({items:t,db:e,row:n,col:o,cellWidth:i,cellHeight:r,boardGap:s,availablePanelWidth:a,availablePanelHeight:A}){const c=t.map(E=\u003e{const B=hTo(E,e);return{item:E,width:B.width,height:B.height}}).filter(E=\u003e!(E.width===0\u0026\u0026E.height===0));if(c.length===0)return{positions:[],gridWidth:0,gridHeight:0};let l,u;const g=i?lt.parse(i):0,h=r?lt.parse(r):0;if(o!==void 0)l=o,u=n??Math.ceil(c.length/l);else if(n!==void 0)u=n,l=Math.ceil(c.length/u);else if(a!==void 0\u0026\u0026A!==void 0){const E=Math.max(...c.map(w=\u003ew.width),g),B=Math.max(...c.map(w=\u003ew.height),h),S=Math.max(1,Math.floor((a+s)/(E+s))),Q=Math.max(1,Math.floor((A+s)/(B+s)));l=S,u=Math.ceil(c.length/l),u\u003eQ\u0026\u0026(u=Q,l=Math.ceil(c.length/u),l\u003eS\u0026\u0026(l=S,u=Math.ceil(c.length/l))),l=Math.max(1,l),u=Math.max(1,u)}else l=Math.ceil(Math.sqrt(c.length)),u=Math.ceil(c.length/l);const d=Array(l).fill(0),p=Array(u).fill(0);c.forEach((E,B)=\u003e{const S=B%l,Q=Math.floor(B/l);Q\u003cp.length\u0026\u0026E.height\u003ep[Q]\u0026\u0026(p[Q]=E.height),S\u003cd.length\u0026\u0026E.width\u003ed[S]\u0026\u0026(d[S]=E.width)});for(let E=0;E\u003cd.length;E++)d[E]=Math.max(d[E],g);for(let E=0;E\u003cp.length;E++)p[E]=Math.max(p[E],h);const m=d.reduce((E,B)=\u003eE+B,0)+(l\u003e1?(l-1)*s:0),_=p.reduce((E,B)=\u003eE+B,0)+(u\u003e1?(u-1)*s:0),f=-m/2,I=-_/2,C=[f];for(let E=1;E\u003cl;E++)C.push(C[E-1]+d[E-1]+s);const y=[I];for(let E=1;E\u003cu;E++)y.push(y[E-1]+p[E-1]+s);const x=[];return c.forEach((E,B)=\u003e{const S=B%l,Q=Math.floor(B/l);if(Q\u003e=y.length||S\u003e=C.length)return;const w=C[S]+d[S]/2,M=y[Q]+p[Q]/2;x.push({item:E.item,pos:{x:w,y:M}})}),{positions:x,gridWidth:m,gridHeight:_}}function hTo(t,e){if(t.componentName===\"Board\"){const n=t;if(e\u0026\u0026n.pcb_board_id){const o=e.pcb_board.get(n.pcb_board_id);if(o?.width!==void 0\u0026\u0026o?.height!==void 0)return{width:o.width,height:o.height}}return Gue(n)}if(t.componentName===\"Subpanel\"){const n=t,o=n._parsedProps;if(o.width!==void 0\u0026\u0026o.height!==void 0)return{width:lt.parse(o.width),height:lt.parse(o.height)};const i=n._getDirectBoardChildren();if(i.length===0){const a=n._getAllBoardInstances();if(a.length===0)return{width:0,height:0};let A=1/0,c=1/0,l=-1/0,u=-1/0;for(const g of a){const h=Gue(g);if(h.width===0||h.height===0)continue;const d=g._panelPositionOffset??{x:0,y:0};A=Math.min(A,d.x-h.width/2),l=Math.max(l,d.x+h.width/2),c=Math.min(c,d.y-h.height/2),u=Math.max(u,d.y+h.height/2)}return A===1/0?{width:0,height:0}:{width:l-A,height:u-c}}if(i.length===1)return Gue(i[0]);if(n._cachedGridWidth\u003e0\u0026\u0026n._cachedGridHeight\u003e0){const a=lt.parse(o.edgePadding??5);return{width:n._cachedGridWidth+a*2,height:n._cachedGridHeight+a*2}}let r=0,s=0;for(const a of i){const A=Gue(a);r=Math.max(r,A.width),s=Math.max(s,A.height)}return{width:r,height:s}}return{width:0,height:0}}var Tkt=class Wye extends A6{pcb_panel_id=null;_panelizationFeaturesGenerated=!1;get config(){return{componentName:\"Subpanel\",zodProps:fwn}}get _errorComponentName(){return this.componentName.toLowerCase()}get isGroup(){return!0}get isSubcircuit(){return!0}_getPcbLayoutMode(){return\"none\"}doInitialSchematicComponentRender(){}doInitialSchematicLayout(){}doInitialSchematicTraceRender(){}add(e){if(e.lowercaseComponentName!==\"board\"\u0026\u0026e.lowercaseComponentName!==\"subpanel\")throw new Error(`\u003c${this._errorComponentName}\u003e can only contain \u003cboard\u003e or \u003csubpanel\u003e elements`);super.add(e)}_cachedGridWidth=0;_cachedGridHeight=0;_panelPositionOffset=null;_computePcbGlobalTransformBeforeLayout(){if(this._panelPositionOffset){const e=this.parent?._computePcbGlobalTransformBeforeLayout?.()??hC();return D0(e,M0(this._panelPositionOffset.x,this._panelPositionOffset.y))}return super._computePcbGlobalTransformBeforeLayout()}_getAllBoardInstances(){const e=[];for(const n of this.children)n instanceof wB?e.push(n):n instanceof Wye\u0026\u0026e.push(...n._getAllBoardInstances());return e}_containsBoards(){for(const e of this.children)if(e.componentName===\"Board\"||e.componentName===\"Subpanel\"\u0026\u0026\"_containsBoards\"in e\u0026\u0026e._containsBoards())return!0;return!1}_getDirectBoardChildren(){return this.children.filter(e=\u003ee instanceof wB)}doInitialPanelBoardLayout(){if(this.root?.pcbDisabled)return;const e=this._parsedProps.layoutMode??\"none\",n=this.children.filter(h=\u003eh instanceof wB||h instanceof Wye);if(e!==\"none\")for(const h of n)h instanceof wB\u0026\u0026h._hasUserDefinedPcbPosition()\u0026\u0026this.root.db.source_property_ignored_warning.insert({source_component_id:h.source_component_id,property_name:\"pcbX/pcbY\",message:`Board has manual positioning but ${this._errorComponentName} layout mode is \"${e}\". Manual positioning will be ignored.`,error_type:\"source_property_ignored_warning\"});if(e===\"none\"\u0026\u0026n.length\u003e1\u0026\u0026n.filter(d=\u003e!d._hasUserDefinedPcbPosition()).length\u003e1\u0026\u0026this.root.db.pcb_placement_error.insert({error_type:\"pcb_placement_error\",message:`Multiple boards/subpanels in ${this._errorComponentName} without positions. When layoutMode=\"none\", each item must have explicit positioning. Use layoutMode=\"grid\" for automatic positioning.`}),e!==\"grid\")return;const o=this._parsedProps.tabWidth??GMe,i=this._parsedProps.boardGap??o;let r,s;const a=this._parsedProps.row!==void 0||this._parsedProps.col!==void 0,A=this._parsedProps.width!==void 0,c=this._parsedProps.height!==void 0;if(!a\u0026\u0026A\u0026\u0026c){const{edgePadding:h,edgePaddingLeft:d,edgePaddingRight:p,edgePaddingTop:m,edgePaddingBottom:_}=this._parsedProps,f=lt.parse(h??5),I=lt.parse(d??f),C=lt.parse(p??f),y=lt.parse(m??f),x=lt.parse(_??f),E=lt.parse(this._parsedProps.width),B=lt.parse(this._parsedProps.height);r=E-I-C,s=B-y-x}const{positions:l,gridWidth:u,gridHeight:g}=dTo({items:n,row:this._parsedProps.row,col:this._parsedProps.col,cellWidth:this._parsedProps.cellWidth,cellHeight:this._parsedProps.cellHeight,boardGap:i,availablePanelHeight:s,availablePanelWidth:r});this._cachedGridWidth=u,this._cachedGridHeight=g;for(const{item:h,pos:d}of l)h._panelPositionOffset=d}doInitialPanelLayout(){if(this.root?.pcbDisabled)return;const{db:e}=this.root;if((this._parsedProps.layoutMode??\"none\")===\"grid\"){for(const o of this.children)if(o instanceof wB){if(!o.pcb_board_id||!o._panelPositionOffset)continue;e.pcb_board.update(o.pcb_board_id,{position_mode:\"relative_to_panel_anchor\",display_offset_x:`${o._panelPositionOffset.x}mm`,display_offset_y:`${o._panelPositionOffset.y}mm`})}else if(o instanceof Wye\u0026\u0026o._panelPositionOffset)for(const i of o._getAllBoardInstances()){if(!i.pcb_board_id)continue;const r=i._panelPositionOffset??{x:0,y:0};e.pcb_board.update(i.pcb_board_id,{position_mode:\"relative_to_panel_anchor\",display_offset_x:`${o._panelPositionOffset.x+r.x}mm`,display_offset_y:`${o._panelPositionOffset.y+r.y}mm`})}this._updatePanelDimensions()}else{const o=this._getGlobalPcbPositionBeforeLayout();for(const i of this._getDirectBoardChildren()){if(!i.pcb_board_id)continue;const r=e.pcb_board.get(i.pcb_board_id);if(!r)continue;const s=r.center.x-o.x,a=r.center.y-o.y;e.pcb_board.update(i.pcb_board_id,{position_mode:\"relative_to_panel_anchor\",display_offset_x:`${s}mm`,display_offset_y:`${a}mm`})}}this._generatePanelizationFeatures()}_updatePanelDimensions(){const{db:e}=this.root,n=this._parsedProps.width!==void 0,o=this._parsedProps.height!==void 0,i=this._cachedGridWidth,r=this._cachedGridHeight;if(this.pcb_group_id){if(n\u0026\u0026o)e.pcb_group.update(this.pcb_group_id,{width:lt.parse(this._parsedProps.width),height:lt.parse(this._parsedProps.height)});else if(i\u003e0||r\u003e0){const{edgePadding:s,edgePaddingLeft:a,edgePaddingRight:A,edgePaddingTop:c,edgePaddingBottom:l}=this._parsedProps,u=lt.parse(s??5),g=lt.parse(a??u),h=lt.parse(A??u),d=lt.parse(c??u),p=lt.parse(l??u);e.pcb_group.update(this.pcb_group_id,{width:n?lt.parse(this._parsedProps.width):i+g+h,height:o?lt.parse(this._parsedProps.height):r+d+p})}}}_generatePanelizationFeatures(){if(this._panelizationFeaturesGenerated)return;const{db:e}=this.root,n=this._parsedProps,o=n.panelizationMethod??\"none\",i=this._getAllBoardInstances();if(o!==\"none\"){const r=i.map(A=\u003eA.pcb_board_id).filter(A=\u003e!!A),s=e.pcb_board.list().filter(A=\u003er.includes(A.pcb_board_id));if(s.length===0)return;const a=n.tabWidth??GMe;if(o===\"outline_routing\"){const A=gTo(s,{cutoutWidth:a});for(const c of A)e.pcb_cutout.insert({...c,pcb_group_id:this.pcb_group_id??void 0,pcb_panel_id:this.pcb_panel_id??void 0})}else{n.boardGap;const{tabCutouts:A,mouseBiteHoles:c}=uTo(s,{tabWidth:a,tabLength:n.tabLength??Nkt,mouseBites:n.mouseBites??!0});for(const l of A)e.pcb_cutout.insert(l);for(const l of c)e.pcb_hole.insert(l)}}this._panelizationFeaturesGenerated=!0}doInitialPcbComponentRender(){if(!this.root?.pcbDisabled){if(!this._containsBoards())throw new Error(`\u003c${this._errorComponentName}\u003e must contain at least one \u003cboard\u003e`);super.doInitialPcbComponentRender()}}},pTo=class extends Tkt{get config(){return{componentName:\"Panel\",zodProps:olt}}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;if(!this._containsBoards())throw new Error(`\u003c${this._errorComponentName}\u003e must contain at least one \u003cboard\u003e`);const{db:t}=this.root,e=this._parsedProps,n=t.pcb_panel.insert({width:e.width!==void 0?lt.parse(e.width):0,height:e.height!==void 0?lt.parse(e.height):0,thickness:1.6,center:this._getGlobalPcbPositionBeforeLayout(),covered_with_solder_mask:!(e.noSolderMask??!1)});this.pcb_panel_id=n.pcb_panel_id}_updatePanelDimensions(){const{db:t}=this.root,e=this._parsedProps.width!==void 0,n=this._parsedProps.height!==void 0,o=this._cachedGridWidth,i=this._cachedGridHeight;if(this.pcb_panel_id){if(e\u0026\u0026n)t.pcb_panel.update(this.pcb_panel_id,{width:lt.parse(this._parsedProps.width),height:lt.parse(this._parsedProps.height)});else if(o\u003e0||i\u003e0){const{edgePadding:r,edgePaddingLeft:s,edgePaddingRight:a,edgePaddingTop:A,edgePaddingBottom:c}=this._parsedProps,l=lt.parse(r??5),u=lt.parse(s??l),g=lt.parse(a??l),h=lt.parse(A??l),d=lt.parse(c??l);t.pcb_panel.update(this.pcb_panel_id,{width:e?lt.parse(this._parsedProps.width):o+u+g,height:n?lt.parse(this._parsedProps.height):i+h+d})}}}updatePcbComponentRender(){if(this.root?.pcbDisabled||!this.pcb_panel_id)return;const{db:t}=this.root,e=this._parsedProps,n=t.pcb_panel.get(this.pcb_panel_id);t.pcb_panel.update(this.pcb_panel_id,{width:e.width!==void 0?lt.parse(e.width):n?.width,height:e.height!==void 0?lt.parse(e.height):n?.height,center:this._getGlobalPcbPositionBeforeLayout(),covered_with_solder_mask:!(e.noSolderMask??!1)})}removePcbComponentRender(){this.pcb_panel_id\u0026\u0026(this.root?.db.pcb_panel.delete(this.pcb_panel_id),this.pcb_panel_id=null)}},mTo=1,Yue=1,_To=t=\u003e{const e=t.route.map(p=\u003ep.x),n=t.route.map(p=\u003ep.y),o=t.traceWidth/2+mTo,i=Math.min(...e)-o,r=Math.max(...e)+o,s=Math.min(...n)-o,a=Math.max(...n)+o,A=[t.feedPoint,...t.secondaryPort?[t.secondaryPort.point]:[]],c=Math.min(...A.map(p=\u003ep.x))-Yue,l=Math.max(...A.map(p=\u003ep.x))+Yue,u=Math.min(...A.map(p=\u003ep.y))-Yue,g=Math.max(...A.map(p=\u003ep.y))+Yue,h=[],d=(p,m,_,f)=\u003e{m\u003c=p||f\u003c=_||h.push({center:{x:(p+m)/2,y:(_+f)/2},width:m-p,height:f-_})};return t.feedKeepoutOpeningDirection===\"left\"?(d(i,r,g,a),d(i,r,s,u),d(l,r,u,g)):(d(i,c,s,g),d(l,r,s,g),d(i,r,g,a)),h},fTo=t=\u003e{switch(t){case\"2.4ghz_quarter_wave_monopole\":return{traceWidth:.6,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:\"left\",route:[{x:0,y:0},{x:31,y:0}]};case\"2.4ghz_meandered_monopole\":return{traceWidth:.5,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:\"bottom\",route:[{x:0,y:0},{x:0,y:6},{x:3,y:6},{x:3,y:1.5},{x:6,y:1.5},{x:6,y:6},{x:9,y:6},{x:9,y:1.5},{x:12,y:1.5},{x:12,y:6},{x:15,y:6}]};case\"2.4ghz_inverted_f\":return{traceWidth:.8,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:\"bottom\",secondaryPort:{point:{x:-4,y:0},role:\"ground\"},groundViaPoint:{x:-4,y:0},route:[{x:-4,y:0},{x:-4,y:3},{x:0,y:3},{x:0,y:0},{x:0,y:3},{x:-4,y:3},{x:-4,y:8},{x:22,y:8}]};case\"2.4ghz_meandered_inverted_f\":return{traceWidth:.5,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:\"bottom\",secondaryPort:{point:{x:-1.7,y:0},role:\"ground\"},groundViaPoint:{x:-1.7,y:0},route:[{x:-1.7,y:0},{x:-1.7,y:4.9},{x:0,y:4.9},{x:0,y:0},{x:0,y:4.9},{x:-1.7,y:4.9},{x:2.3,y:4.9},{x:2.3,y:1.4},{x:5.3,y:1.4},{x:5.3,y:4.9},{x:8.3,y:4.9},{x:8.3,y:1.4},{x:11.3,y:1.4},{x:11.3,y:4.9},{x:13.3,y:4.9}]};case\"2.4ghz_folded_dipole\":return{traceWidth:.9,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:\"bottom\",secondaryPort:{point:{x:1.2,y:0},role:\"feed2\"},route:[{x:0,y:0},{x:-22.4,y:0},{x:-22.4,y:9},{x:23.6,y:9},{x:23.6,y:0},{x:1.2,y:0}]}}},ITo=class extends g0{get config(){return{componentName:\"Antenna\",zodProps:QPn,sourceFtype:$7.simple_chip,shouldRenderAsSchematicBox:!0}}getRefDesPrefixes(){return[\"ANT\"]}initPorts(){const{antennaShape:t,pcbPath:e}=this._parsedProps,n=e?void 0:t===\"2.4ghz_inverted_f\"||t===\"2.4ghz_meandered_inverted_f\"?\"ground\":t===\"2.4ghz_folded_dipole\"?\"feed2\":void 0;super.initPorts({pinCount:n?2:1,additionalAliases:{pin1:n===\"feed2\"?[\"feed\",\"feed1\"]:[\"feed\"],...n===\"ground\"?{pin2:[\"ground\",\"gnd\"]}:n===\"feed2\"?{pin2:[\"feed2\"]}:{}}})}doInitialReactSubtreesRender(){super.doInitialReactSubtreesRender();const{antennaShape:t,pcbPath:e}=this._parsedProps;if(!t)return;const n=this.children.some(r=\u003er.componentName===\"Footprint\");if(e\u0026\u0026n)return;const o=e?void 0:fTo(t),i=new Y0e({name:`${this.name}_generated_antenna`});if(n||i.add(new Mb({shape:\"rect\",width:.8,height:.8,pcbX:o?.feedPoint.x??0,pcbY:o?.feedPoint.y??0,layer:\"top\",portHints:[\"pin1\"],coveredWithSolderMask:!0})),o){const r=_To(o);for(const s of r)i.add(new k0e({shape:\"rect\",pcbX:s.center.x,pcbY:s.center.y,width:s.width,height:s.height,layers:[...this.root?._getBoard()?.allLayers??[\"top\",\"bottom\"]],excludeRefs:[this.getSubcircuitSelector()]}));i.add(new tPe({route:o.route.map(s=\u003e({route_type:\"wire\",...s,width:o.traceWidth,layer:\"top\"}))})),o.secondaryPort\u0026\u0026!o.groundViaPoint\u0026\u0026!n\u0026\u0026i.add(new Mb({shape:\"rect\",width:.8,height:.8,pcbX:o.secondaryPort.point.x,pcbY:o.secondaryPort.point.y,layer:\"top\",portHints:[\"pin2\"],coveredWithSolderMask:!0})),o.groundViaPoint\u0026\u0026i.add(new Pb({shape:\"circle\",pcbX:o.groundViaPoint.x,pcbY:o.groundViaPoint.y,holeDiameter:.3,outerDiameter:.7,portHints:[\"pin2\"],coveredWithSolderMask:!0}))}this.add(i)}doInitialCreateTracesFromProps(){super.doInitialCreateTracesFromProps();const{pcbPath:t}=this._parsedProps;t\u0026\u0026this.add(new t1({name:`${this.name}_pcb_path`,path:[`${this.getSubcircuitSelector()} \u003e port.pin1`],pcbPath:t}))}},CTo=class extends zj{constructor(t){super(t)}get config(){return{...super.config,componentName:\"Pinout\",zodProps:wwn}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_pinout\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,display_name:e.displayName});this.source_component_id=n.source_component_id}},yTo=class extends g0{get config(){return{componentName:\"fuse\",schematicSymbolName:this.props.symbolName??\"fuse\",zodProps:Rwn,sourceFtype:$7.simple_fuse}}_getSchematicSymbolDisplayValue(){if(this._parsedProps.schShowRatings===!1)return\"\";const e=this._parsedProps.currentRating,n=this._parsedProps.voltageRating,o=q1(e,\"A\").value,i=q1(n,\"V\").value;return`${H_(o)}A / ${H_(i)}V`}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=q1(n.currentRating,\"A\").value,i=q1(n.voltageRating,\"V\").value;let r,s;n.schShowRatings!==!1\u0026\u0026(r=`${H_(o)}A`,s=`${H_(i)}V`);const a=e.source_component.insert({name:this.name,ftype:$7.simple_fuse,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,...o!=null?{current_rating_amps:o}:{},...i!=null?{voltage_rating_volts:i}:{},display_current_rating:r,display_voltage_rating:s,display_name:n.displayName});this.source_component_id=a.source_component_id}},xTo=class extends g0{schematicDimensions=null;get config(){return{schematicSymbolName:void 0,componentName:\"Jumper\",zodProps:clt,shouldRenderAsSchematicBox:!0}}_getSchematicPortArrangement(){const t=super._getSchematicPortArrangement();if(t\u0026\u0026Object.keys(t).length\u003e0)return t;const e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:this.getPortsFromFootprint().length),n=this._parsedProps.schDirection??\"right\";return{leftSize:n===\"left\"?e:0,rightSize:n===\"right\"?e:0}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=t.source_component.insert({ftype:\"simple_chip\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=i.source_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=this.getGlobalTransformRotation(),r=t.pcb_component.insert({center:{x:n,y:o},width:2,height:3,layer:e.layer??\"top\",rotation:k9(i),insertion_direction:this._getPcbComponentInsertionDirection(e.layer??\"top\",i),source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0});this.pcb_component_id=r.pcb_component_id}doInitialPcbPortAttachment(){const{db:t}=this.root,e=t.pcb_port.list({pcb_component_id:this.pcb_component_id}),n={};for(let r=0;r\u003ce.length;r++){const s=e[r],a=t.source_port.get(s.source_port_id);let A=\"\";if(typeof a?.pin_number==\"number\")A=a.pin_number.toString();else if(Array.isArray(a?.port_hints)){let c=a.port_hints.find(l=\u003e/^(pin)?\\d+$/.test(l));c\u0026\u0026(/^pin\\d+$/.test(c)?A=c.replace(/^pin/,\"\"):A=c)}n[A]=s.pcb_port_id}const o=t.pcb_trace.list({pcb_component_id:this.pcb_component_id}),i=r=\u003e{if(r\u0026\u0026typeof r==\"string\"\u0026\u0026r.startsWith(\"{PIN\")){const s=r.replace(\"{PIN\",\"\").replace(\"}\",\"\");return n[s]||r}return r};for(const r of o)if(r.route)for(const s of r.route)s.route_type===\"wire\"\u0026\u0026(s.start_pcb_port_id=i(s.start_pcb_port_id),s.end_pcb_port_id=i(s.end_pcb_port_id))}},kkt={\"0402\":\"0402\",\"0603\":\"0603\",\"0805\":\"0805\",1206:\"1206\"},ETo=class extends g0{get config(){return{componentName:\"Interconnect\",zodProps:Nwn,shouldRenderAsSchematicBox:!0,sourceFtype:\"interconnect\"}}get defaultInternallyConnectedPinNames(){const{standard:t}=this._parsedProps;return t\u0026\u0026kkt[t]?[[\"pin1\",\"pin2\"]]:[]}_getImpliedFootprintString(){const{standard:t}=this._parsedProps;return t?kkt[t]??null:null}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"interconnect\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSourceParentAttachment(){const{db:t}=this.root,e=this._getInternallyConnectedPins();for(const n of e){const o=n.map(i=\u003ei.source_port_id).filter(i=\u003ei!==null);o.length\u003e=2\u0026\u0026t.source_component_internal_connection.insert({source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id,source_port_ids:o})}}},BTo=class extends g0{schematicDimensions=null;_getPinCountFromFootprintString(t){const e=t.match(/^solderjumper([23])(?:_|$)/);return e?Number(e[1]):null}_getPinNumberFromBridgedPinsProp(t){const e=t.match(/^(?:pin)?(\\d+)$/i);if(e)return Number(e[1]);const n=this._parsedProps.pinLabels??this.props.pinLabels;if(Array.isArray(n)){const o=n.findIndex(i=\u003ei===t);return o\u003e=0?o+1:null}if(n\u0026\u0026typeof n==\"object\")for(const[o,i]of Object.entries(n)){if(!(Array.isArray(i)?i:[i]).includes(t))continue;const s=o.match(/^(?:pin)?(\\d+)$/i);return s?Number(s[1]):null}return null}_getBridgedPinNumbersForFootprint(t){const e=this._parsedProps??this.props;return Array.isArray(e.bridgedPins)\u0026\u0026e.bridgedPins.length\u003e0?Array.from(new Set(e.bridgedPins.flat().map(n=\u003ethis._getPinNumberFromBridgedPinsProp(n)).filter(n=\u003en!==null\u0026\u0026n\u003e=1\u0026\u0026n\u003c=t))).sort((n,o)=\u003en-o):e.bridged?Array.from({length:t},(n,o)=\u003eo+1):[]}resolveFootprint(){const t=super.resolveFootprint();if(typeof t!=\"string\")return t;const e=this._getPinCountFromFootprintString(t);if(!e||/_bridged\\d+/.test(t))return t;const n=this._getBridgedPinNumbersForFootprint(e);return n.length===0?t:t.replace(/^solderjumper[23]/,`solderjumper${e}_bridged${n.join(\"\")}`)}_getPinNumberFromBridgedPinName(t){return this.selectOne(`port.${t}`,{type:\"port\"})?._parsedProps.pinNumber??null}get defaultInternallyConnectedPinNames(){if(this._parsedProps.bridged){const t=this.children.filter(e=\u003ee.componentName===\"Port\").map(e=\u003ee.name);return t.length\u003e0?[t]:[]}return this._parsedProps.bridgedPins??[]}get config(){const t=this._parsedProps??this.props;let e=t.pinCount;if(t.pinCount==null\u0026\u0026!t.footprint\u0026\u0026(e=2),t.pinCount==null){const i=(t.bridgedPins??[]).flat().map(A=\u003ethis._getPinNumberFromBridgedPinName(A)).filter(A=\u003eA!==null),r=i.length\u003e0?Math.max(...i):0,s=t.pinLabels?Object.keys(t.pinLabels).length:0,a=Math.max(r,s);(a===2||a===3)\u0026\u0026(e=a),e==null\u0026\u0026t.footprint\u0026\u0026[2,3].includes(this.getPortsFromFootprint().length)\u0026\u0026(e=this.getPortsFromFootprint().length)}let n=\"\";e?n+=`solderjumper${e}`:n=\"solderjumper\";let o=[];return Array.isArray(t.bridgedPins)\u0026\u0026t.bridgedPins.length\u003e0?o=Array.from(new Set(t.bridgedPins.flat().map(i=\u003ethis._getPinNumberFromBridgedPinName(i)).filter(i=\u003ei!==null))).sort((i,r)=\u003ei-r):t.bridged\u0026\u0026e\u0026\u0026(o=Array.from({length:e},(i,r)=\u003er+1)),o.length\u003e0\u0026\u0026(n+=`_bridged${o.join(\"\")}`),{schematicSymbolName:t.symbolName??n,componentName:\"SolderJumper\",zodProps:Pwn,shouldRenderAsSchematicBox:!0}}_getSchematicPortArrangement(){const t=super._getSchematicPortArrangement();if(t\u0026\u0026Object.keys(t).length\u003e0)return t;let e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:this.getPortsFromFootprint().length);e==null\u0026\u0026!this._parsedProps.footprint\u0026\u0026(e=2);const n=this._parsedProps.schDirection??\"right\";return{leftSize:n===\"left\"?e:0,rightSize:n===\"right\"?e:0}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=t.source_component.insert({ftype:\"simple_chip\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=i.source_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=this.getGlobalTransformRotation(),r=t.pcb_component.insert({center:{x:n,y:o},width:2,height:3,layer:e.layer??\"top\",rotation:k9(i),insertion_direction:this._getPcbComponentInsertionDirection(e.layer??\"top\",i),source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0});this.pcb_component_id=r.pcb_component_id}doInitialPcbPortAttachment(){const{db:t}=this.root,e=t.pcb_port.list({pcb_component_id:this.pcb_component_id}),n={};for(let r=0;r\u003ce.length;r++){const s=e[r],a=t.source_port.get(s.source_port_id);let A=\"\";if(typeof a?.pin_number==\"number\")A=a.pin_number.toString();else if(Array.isArray(a?.port_hints)){let c=a.port_hints.find(l=\u003e/^(pin)?\\d+$/.test(l));c\u0026\u0026(/^pin\\d+$/.test(c)?A=c.replace(/^pin/,\"\"):A=c)}n[A]=s.pcb_port_id}const o=t.pcb_trace.list({pcb_component_id:this.pcb_component_id}),i=r=\u003e{if(r\u0026\u0026typeof r==\"string\"\u0026\u0026r.startsWith(\"{PIN\")){const s=r.replace(\"{PIN\",\"\").replace(\"}\",\"\");return n[s]||r}return r};for(const r of o)if(r.route)for(const s of r.route)s.route_type===\"wire\"\u0026\u0026(s.start_pcb_port_id=i(s.start_pcb_port_id),s.end_pcb_port_id=i(s.end_pcb_port_id))}},bTo=class extends g0{get config(){return{schematicSymbolName:this.props.symbolName??\"power_factor_meter_horz\",componentName:\"PowerSource\",zodProps:OMn,sourceFtype:\"simple_power_source\"}}initPorts(){this.add(new Pu({name:\"pin1\",pinNumber:1,aliases:[\"positive\",\"pos\"]})),this.add(new Pu({name:\"pin2\",pinNumber:2,aliases:[\"negative\",\"neg\"]}))}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_power_source\",name:this.name,voltage:e.voltage,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}pos=this.portMap.pin1;positive=this.portMap.pin1;neg=this.portMap.pin2;negative=this.portMap.pin2},Fkt=class extends g0{simulation_voltage_source_id=null;get config(){return{componentName:\"VoltageSource\",schematicSymbolName:this.props.waveShape===\"square\"?\"square_wave\":\"ac_voltmeter\",zodProps:UMn,sourceFtype:\"simple_voltage_source\"}}runRenderPhaseForChildren(t){if(!t.startsWith(\"Pcb\"))for(const e of this.children)e.runRenderPhaseForChildren(t),e.runRenderPhase(t)}doInitialPcbComponentRender(){const t=this._hasUserDefinedPcbPosition();if(!this._parsedProps.footprint){if(!t)return;throw new Error(\"VoltageSource requires a footprint when pcbX/pcbY or pcb edge position props are used\")}super.doInitialPcbComponentRender()}initPorts(){super.initPorts({additionalAliases:{pin1:[\"terminal1\"],pin2:[\"terminal2\"]}})}_getSchematicSymbolDisplayValue(){const{voltage:t,frequency:e}=this._parsedProps,n=[];return t!==void 0\u0026\u0026n.push(`${H_(t)}V`),e!==void 0\u0026\u0026n.push(`${H_(e)}Hz`),n.length\u003e0?n.join(\" \"):void 0}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_voltage_source\",name:this.name,voltage:e.voltage,frequency:e.frequency,peak_to_peak_voltage:e.peakToPeakVoltage,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,pulse_delay:e.pulseDelay,rise_time:e.riseTime,fall_time:e.fallTime,pulse_width:e.pulseWidth,period:e.period,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=this.portMap.terminal1,o=this.portMap.terminal2,i=t.simulation_voltage_source.insert({is_dc_source:!1,terminal1_source_port_id:n.source_port_id??void 0,terminal2_source_port_id:o.source_port_id??void 0,voltage:e.voltage,frequency:e.frequency,peak_to_peak_voltage:e.peakToPeakVoltage,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,pulse_delay:e.pulseDelay,rise_time:e.riseTime,fall_time:e.fallTime,pulse_width:e.pulseWidth,period:e.period,ac_magnitude:e.acMagnitude,ac_phase:e.acPhase});this.simulation_voltage_source_id=i.simulation_voltage_source_id}terminal1=this.portMap.terminal1;terminal2=this.portMap.terminal2},Lkt=class extends g0{simulation_current_source_id=null;get config(){return{componentName:\"CurrentSource\",schematicSymbolName:\"current_source\",zodProps:zMn,sourceFtype:\"simple_current_source\"}}runRenderPhaseForChildren(t){if(!t.startsWith(\"Pcb\"))for(const e of this.children)e.runRenderPhaseForChildren(t),e.runRenderPhase(t)}doInitialPcbComponentRender(){const t=this._hasUserDefinedPcbPosition();if(!this._parsedProps.footprint){if(!t)return;throw new Error(\"CurrentSource requires a footprint when pcbX/pcbY or pcb edge position props are used\")}super.doInitialPcbComponentRender()}initPorts(){super.initPorts({additionalAliases:{pin1:[\"pos\"],pin2:[\"neg\"]}})}_getSchematicSymbolDisplayValue(){const{current:t,frequency:e,peakToPeakCurrent:n}=this._parsedProps,o=[];return t!==void 0\u0026\u0026o.push(`${H_(t)}A`),n!==void 0\u0026\u0026o.push(`${H_(n)}A p-p`),e!==void 0\u0026\u0026o.push(`${H_(e)}Hz`),o.length\u003e0?o.join(\" \"):void 0}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_current_source\",name:this.name,current:e.current,frequency:e.frequency,peak_to_peak_current:e.peakToPeakCurrent,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=e.frequency!==void 0||e.peakToPeakCurrent!==void 0||e.waveShape!==void 0||e.acMagnitude!==void 0||e.acPhase!==void 0,o=this.portMap.pos,i=this.portMap.neg;if(n){const r=t.simulation_current_source.insert({is_dc_source:!1,terminal1_source_port_id:o.source_port_id??void 0,terminal2_source_port_id:i.source_port_id??void 0,current:e.current,frequency:e.frequency,peak_to_peak_current:e.peakToPeakCurrent,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,ac_magnitude:e.acMagnitude,ac_phase:e.acPhase});this.simulation_current_source_id=r.simulation_current_source_id}else{if(e.current===void 0)return;const r=t.simulation_current_source.insert({is_dc_source:!0,positive_source_port_id:o.source_port_id??void 0,negative_source_port_id:i.source_port_id??void 0,current:e.current,ac_magnitude:e.acMagnitude,ac_phase:e.acPhase});this.simulation_current_source_id=r.simulation_current_source_id}}pos=this.portMap.pos;neg=this.portMap.neg},Uue=.25,Hkt=(t,e)=\u003e({left:t.center.x-t.size.width/2-e,right:t.center.x+t.size.width/2+e,bottom:t.center.y-t.size.height/2-e,top:t.center.y+t.size.height/2+e}),STo=(t,e)=\u003et.left\u003ce.right\u0026\u0026t.right\u003ee.left\u0026\u0026t.bottom\u003ce.top\u0026\u0026t.top\u003ee.bottom,QTo=({baseCenter:t,size:e})=\u003e{const n=e.width+Uue*2,o=e.height+Uue*2;return[t,{x:t.x,y:t.y+o},{x:t.x,y:t.y-o},{x:t.x+n,y:t.y},{x:t.x-n,y:t.y},{x:t.x+n,y:t.y+o},{x:t.x-n,y:t.y+o},{x:t.x+n,y:t.y-o},{x:t.x-n,y:t.y-o},{x:t.x,y:t.y+o*2},{x:t.x,y:t.y-o*2}]},vTo=({ammeterSourcePortId:t,schematicPorts:e,sourceTraces:n})=\u003e{for(const o of n){if(!o.connected_source_port_ids.includes(t))continue;const i=o.connected_source_port_ids.find(s=\u003es!==t);if(i===void 0)continue;const r=e.find(s=\u003es.source_port_id===i);if(r)return r}return null},wTo=t=\u003e({x:t.reduce((e,n)=\u003ee+n.center.x,0)/t.length,y:t.reduce((e,n)=\u003ee+n.center.y,0)/t.length}),PTo=({ammeter:t,db:e,oldCenter:n,newCenter:o})=\u003e{const i=t.schematic_component_id;if(!i)return;const r=o.x-n.x,s=o.y-n.y;if(!(r===0\u0026\u0026s===0)){e.schematic_component.update(i,{center:o});for(const a of e.schematic_port.list({schematic_component_id:i}))e.schematic_port.update(a.schematic_port_id,{center:{x:a.center.x+r,y:a.center.y+s}});for(const a of e.schematic_text.list({schematic_component_id:i}))e.schematic_text.update(a.schematic_text_id,{position:{x:a.position.x+r,y:a.position.y+s}});MO({db:e,schematicComponentId:i,deltaX:r,deltaY:s})}},MTo=t=\u003e{const{root:e}=t;if(!e||e.schematicDisabled||!t.schematic_component_id||t._parsedProps.schX!==void 0||t._parsedProps.schY!==void 0||t.getGroup()?._getSchematicLayoutMode()!==\"relative\")return;const{db:n}=e,o=n.schematic_component.get(t.schematic_component_id);if(!o)return;const i=[t.portMap.pos.source_port_id,t.portMap.neg.source_port_id].filter(u=\u003etypeof u==\"string\");if(i.length===0)return;const r=n.schematic_port.list(),s=n.source_trace.list(),a=i.map(u=\u003evTo({ammeterSourcePortId:u,schematicPorts:r,sourceTraces:s})).filter(u=\u003eu!==null);if(a.length===0)return;const A=wTo(a),c=n.schematic_component.list().filter(u=\u003eu.schematic_component_id!==o.schematic_component_id\u0026\u0026!u.is_schematic_group\u0026\u0026u.schematic_sheet_id===o.schematic_sheet_id).map(u=\u003eHkt(u,Uue)),l=QTo({baseCenter:A,size:o.size}).find(u=\u003e{const g=Hkt({...o,center:u},Uue);return!c.some(h=\u003eSTo(g,h))})??A;PTo({ammeter:t,db:n,oldCenter:o.center,newCenter:l})},DTo=class extends g0{simulation_current_probe_id=null;get config(){return{componentName:\"Ammeter\",schematicSymbolName:\"dc_ammeter\",zodProps:$Mn,sourceFtype:\"simple_ammeter\"}}runRenderPhaseForChildren(t){if(!t.startsWith(\"Pcb\"))for(const e of this.children)e.runRenderPhaseForChildren(t),e.runRenderPhase(t)}doInitialPcbComponentRender(){const t=this._hasUserDefinedPcbPosition();if(!this._parsedProps.footprint){if(!t)return;throw new Error(\"Ammeter requires a footprint when pcbX/pcbY or pcb edge position props are used\")}super.doInitialPcbComponentRender()}initPorts(){super.initPorts({ignoreSymbolPorts:!0,pinCount:2,additionalAliases:{pin1:[\"pos\"],pin2:[\"neg\"]}});const t=Su[this._getSchematicSymbolNameOrThrow()];this.portMap.pos.schematicSymbolPortDef=t.ports.find(e=\u003ee.labels.includes(\"1\"))??null,this.portMap.neg.schematicSymbolPortDef=t.ports.find(e=\u003ee.labels.includes(\"2\"))??null}doInitialSourceRender(){const{db:t}=this.root,{supplierPartNumbers:e,displayName:n}=this._parsedProps,o=t.source_component.insert({ftype:\"simple_ammeter\",name:this.name,supplier_part_numbers:e,manufacturer_part_number:this._parsedProps.manufacturerPartNumber??this._parsedProps.mfn,display_name:n});this.source_component_id=o.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,{color:e,graphDisplayName:n,graphCenter:o,graphVerticalOffset:i,graphCurrentPerDiv:r}=this._parsedProps,s=this.portMap.pos,a=this.portMap.neg,{simulation_current_probe_id:A}=t.simulation_current_probe.insert({type:\"simulation_current_probe\",name:this.name,source_component_id:this.source_component_id,positive_source_port_id:s.source_port_id,negative_source_port_id:a.source_port_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,color:e});if(this.simulation_current_probe_id=A,n!==void 0||o!==void 0||i!==void 0||r!==void 0){const l=Sw(r),u=Sw(i);t.simulation_oscilloscope_trace.insert({simulation_current_probe_id:A,display_name:n,color:e,display_center_value:o,amps_per_div:l,display_center_offset_divs:u!==void 0\u0026\u0026l!==void 0\u0026\u0026l!==0?u/l:void 0})}}doInitialSchematicLayout(){MTo(this)}pos=this.portMap.pos;neg=this.portMap.neg},NTo=[\"leftedge\",\"rightedge\",\"topedge\",\"bottomedge\",\"center\"],RTo=class extends Ir{get config(){return{componentName:\"Constraint\",zodProps:oPn}}constructor(t){if(super(t),(\"xdist\"in t||\"ydist\"in t)\u0026\u0026!(\"edgeToEdge\"in t)\u0026\u0026!(\"centerToCenter\"in t))throw new Error(`edgeToEdge, centerToCenter must be set for xDist or yDist for ${this}`);if(\"for\"in t\u0026\u0026t.for.length\u003c2)throw new Error(`\"for\" must have at least two selectors for ${this}`)}_getAllReferencedComponents(){const t=[],e=this.getPrimitiveContainer();function n(o){const i=o.split(\" \").pop(),r=NTo.includes(i)?i:void 0,s=r?o.replace(` ${r}`,\"\"):o,a=e.selectOne(s,{pcbPrimitive:!0});a\u0026\u0026t.push({selector:o,component:a,componentSelector:s,edge:r})}for(const o of[\"left\",\"right\",\"top\",\"bottom\"])o in this._parsedProps\u0026\u0026n(this._parsedProps[o]);if(\"for\"in this._parsedProps)for(const o of this._parsedProps.for)n(o);return{componentsWithSelectors:t}}},TTo=class extends Ir{get config(){return{componentName:\"AutoroutingPhase\",zodProps:iMn}}add(t){throw new Error(\"\u003cautoroutingphase\u003e cannot contain children\")}},kTo=class extends Ir{fabrication_note_dimension_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"FabricationNoteDimension\",zodProps:SMn}}_resolvePoint(t,e){if(typeof t==\"string\"){const i=this.getSubcircuit().selectOne(t);return i?i._getGlobalPcbPositionBeforeLayout():(this.renderError(`FabricationNoteDimension could not find selector \"${t}\"`),ts(e,{x:0,y:0}))}const n=typeof t.x==\"string\"?parseFloat(t.x):t.x,o=typeof t.y==\"string\"?parseFloat(t.y):t.y;return ts(e,{x:n,y:o})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=this._resolvePoint(e.from,n),i=this._resolvePoint(e.to,n),r=this.getSubcircuit(),s=this.getGroup(),{maybeFlipLayer:a}=this._getPcbPrimitiveFlippedHelpers(),A=a(e.layer??\"top\");if(A!==\"top\"\u0026\u0026A!==\"bottom\")throw new Error(`Invalid layer \"${A}\" for FabricationNoteDimension. Must be \"top\" or \"bottom\".`);const c=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,l=e.text??this._formatDistanceText({from:o,to:i,units:e.units??\"mm\"}),u=t.pcb_fabrication_note_dimension.insert({pcb_component_id:c,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:s?.pcb_group_id??void 0,layer:A,from:o,to:i,text:l,offset:e.offset,font:e.font??\"tscircuit2024\",font_size:e.fontSize??1,color:e.color,arrow_size:e.arrowSize??1});this.fabrication_note_dimension_id=u.pcb_fabrication_note_dimension_id}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.fabrication_note_dimension_id)return;const o=n.pcb_fabrication_note_dimension.get(this.fabrication_note_dimension_id);o\u0026\u0026n.pcb_fabrication_note_dimension.update(this.fabrication_note_dimension_id,{from:{x:o.from.x+t,y:o.from.y+e},to:{x:o.to.x+t,y:o.to.y+e}})}getPcbSize(){const t=this._computePcbGlobalTransformBeforeLayout(),e=this._resolvePoint(this._parsedProps.from,t),n=this._resolvePoint(this._parsedProps.to,t);return{width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}}_formatDistanceText({from:t,to:e,units:n}){const o=e.x-t.x,i=e.y-t.y,r=Math.sqrt(o*o+i*i),s=n===\"in\"?r/25.4:r,a=Math.round(s);if(Math.abs(s-a)\u003c1e-9)return`${a}${n}`;const c=n===\"in\"?3:2;return`${n===\"in\"?Number(s.toFixed(c)).toString():s.toFixed(c)}${n}`}},FTo=class extends Ir{pcb_note_dimension_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"PcbNoteDimension\",zodProps:QDn}}_resolvePoint(t,e){if(typeof t==\"string\"){const i=this.getSubcircuit().selectOne(`.${t}`);if(!i)return this.renderError(`PcbNoteDimension could not find selector \"${t}\"`),ts(e,{x:0,y:0});const r=i.pcb_component_id,s=this.root;if(r\u0026\u0026s){const a=s.db.pcb_component.get(r);if(a?.center)return{x:a.center.x,y:a.center.y}}return i._getGlobalPcbPositionBeforeLayout()}const n=typeof t.x==\"string\"?parseFloat(t.x):t.x,o=typeof t.y==\"string\"?parseFloat(t.y):t.y;return ts(e,{x:n,y:o})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=this._resolvePoint(e.from,n),i=this._resolvePoint(e.to,n),r=this.getSubcircuit(),s=this.getGroup(),a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,A=e.text??this._formatDistanceText({from:o,to:i,units:e.units??\"mm\"}),c=t.pcb_note_dimension.insert({pcb_component_id:a,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:s?.pcb_group_id??void 0,from:o,to:i,text:A,font:e.font??\"tscircuit2024\",font_size:e.fontSize??1,layer:e.layer===\"bottom\"?\"bottom\":\"top\",color:e.color,arrow_size:e.arrowSize??1});this.pcb_note_dimension_id=c.pcb_note_dimension_id}doInitialPcbLayout(){const t=this.root;if(!t||t.pcbDisabled||!this.pcb_note_dimension_id)return;const{db:e}=t,n=this._computePcbGlobalTransformBeforeLayout(),o=this._resolvePoint(this._parsedProps.from,n),i=this._resolvePoint(this._parsedProps.to,n);e.pcb_note_dimension.update(this.pcb_note_dimension_id,{from:o,to:i})}getPcbSize(){const t=this._computePcbGlobalTransformBeforeLayout(),e=this._resolvePoint(this._parsedProps.from,t),n=this._resolvePoint(this._parsedProps.to,t);return{width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}}_formatDistanceText({from:t,to:e,units:n}){const o=e.x-t.x,i=e.y-t.y,r=Math.sqrt(o*o+i*i),s=n===\"in\"?r/25.4:r,a=Math.round(s);if(Math.abs(s-a)\u003c1e-9)return`${a}${n}`;const c=n===\"in\"?3:2;return`${n===\"in\"?Number(s.toFixed(c)).toString():s.toFixed(c)}${n}`}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_dimension_id)return;const o=n.pcb_note_dimension.get(this.pcb_note_dimension_id);o\u0026\u0026n.pcb_note_dimension.update(this.pcb_note_dimension_id,{from:{x:o.from.x+t,y:o.from.y+e},to:{x:o.to.x+t,y:o.to.y+e}})}},Kue=class extends VTt{get config(){return{componentName:\"AutoplacedBreakoutPoint\",zodProps:CNo}}_applySolvedBreakoutPoint({sourceTraceId:t,layer:e,position:n}){this.matchedSourceTraceId=t,this._renderPcbBreakoutPoint({layer:Pr.parse(e)}),this._setPositionFromLayout(n)}},Okt=[{id:\"DQ0\",layer:\"inner3\",soc:{x:-6,y:-3},ram:{x:3.941917,y:-3.650917}},{id:\"DQ1\",layer:\"inner6\",fullLayer:\"inner2\",soc:{x:-5.5,y:-3},ram:{x:4.591917,y:-3.650917}},{id:\"DQ2\",layer:\"inner5\",fullLayer:\"inner4\",soc:{x:-4.5,y:-3},ram:{x:5.891917,y:-3.650917}},{id:\"DQ3\",layer:\"inner2\",fullLayer:\"inner6\",soc:{x:-4.5,y:-3.5},ram:{x:6.541917,y:-3.650917}},{id:\"DQ4\",layer:\"inner3\",fullLayer:\"inner2\",soc:{x:-6,y:-2.5},ram:{x:6.541917,y:-2.050917}},{id:\"DQ5\",layer:\"inner2\",fullLayer:\"inner5\",soc:{x:-6,y:-2},ram:{x:5.891917,y:-2.050917}},{id:\"DQ6\",layer:\"inner5\",fullLayer:\"inner4\",soc:{x:-5,y:-2},ram:{x:4.591917,y:-2.050917}},{id:\"DQ7\",layer:\"inner4\",fullLayer:\"inner6\",soc:{x:-5.5,y:-2},ram:{x:3.941917,y:-2.050917}},{id:\"DM0\",layer:\"inner4\",fullLayer:\"inner5\",soc:{x:-5,y:-3},ram:{x:4.591917,y:-2.850917}},{id:\"DQS0\",layer:\"inner1\",differentialPairId:\"DQS0\",soc:{x:-4.5,y:-2.5},ram:{x:5.241917,y:-2.850917}},{id:\"DQS0_n\",layer:\"inner1\",differentialPairId:\"DQS0\",soc:{x:-5,y:-2.5},ram:{x:5.891917,y:-2.850917}}],Gkt=[{id:\"DQ8\",layer:\"inner6\",fullLayer:\"inner4\",soc:{x:-6,y:3},ram:{x:3.941917,y:3.549083}},{id:\"DQ9\",layer:\"inner3\",fullLayer:\"inner4\",soc:{x:-5.5,y:2},ram:{x:4.591917,y:3.549083}},{id:\"DQ10\",layer:\"inner3\",fullLayer:\"inner2\",soc:{x:-4.5,y:2},ram:{x:5.891917,y:3.549083}},{id:\"DQ11\",layer:\"inner6\",fullLayer:\"inner5\",soc:{x:-4.5,y:2.5},ram:{x:6.541917,y:3.549083}},{id:\"DQ12\",layer:\"inner5\",fullLayer:\"inner1\",soc:{x:-6,y:2.5},ram:{x:6.541917,y:1.949083}},{id:\"DQ13\",layer:\"inner2\",fullLayer:\"inner3\",soc:{x:-6.5,y:3},ram:{x:5.891917,y:1.949083}},{id:\"DQ14\",layer:\"inner5\",fullLayer:\"inner6\",soc:{x:-5,y:2.5},ram:{x:4.591917,y:1.949083}},{id:\"DQ15\",layer:\"inner4\",fullLayer:\"inner1\",soc:{x:-4.5,y:3.5},ram:{x:3.941917,y:1.949083}},{id:\"DM1\",layer:\"inner4\",fullLayer:\"inner5\",soc:{x:-5,y:3.5},ram:{x:4.591917,y:2.749083}},{id:\"DQS1\",layer:\"inner1\",fullLayer:\"bottom\",differentialPairId:\"DQS1\",soc:{x:-4.5,y:3},ram:{x:5.241917,y:2.749083}},{id:\"DQS1_n\",layer:\"inner1\",fullLayer:\"bottom\",differentialPairId:\"DQS1\",soc:{x:-5,y:3},ram:{x:5.891917,y:2.749083}}],Ykt=[{id:\"A0\",layer:\"bottom\",soc:{x:-6.5,y:-.5},ram:{x:7.841917,y:-3.650917}},{id:\"A1\",layer:\"inner3\",soc:{x:-7,y:-2},ram:{x:8.491917,y:-3.650917}},{id:\"A2\",layer:\"inner3\",soc:{x:-7,y:-.5},ram:{x:7.841917,y:1.949083}},{id:\"A3\",layer:\"inner6\",soc:{x:-5,y:-1},ram:{x:7.841917,y:2.749083}},{id:\"A4\",layer:\"inner4\",soc:{x:-4.5,y:-1.5},ram:{x:7.841917,y:3.549083}},{id:\"A5\",layer:\"inner2\",soc:{x:-6.5,y:-2},ram:{x:8.491917,y:3.549083}},{id:\"CS0_n\",layer:\"inner5\",soc:{x:-5.5,y:-.5},ram:{x:7.841917,y:-2.050917}},{id:\"CKE0\",layer:\"inner1\",soc:{x:-4.5,y:-1},ram:{x:8.491917,y:-2.050917}},{id:\"CK0\",layer:\"bottom\",differentialPairId:\"CK0\",soc:{x:-4.5,y:1},ram:{x:8.491917,y:1.149083}},{id:\"CK0_n\",layer:\"bottom\",differentialPairId:\"CK0\",soc:{x:-5,y:1},ram:{x:8.491917,y:1.949083}},{id:\"DDR_LINK_RESET0_n\",layer:\"inner6\",soc:{x:-5,y:-1.5},ram:{x:13.041917,y:3.549083}}],Vue=t=\u003e{const e=t.buses.flatMap(s=\u003es.ports),n=new Set,o=s=\u003e[{regionId:\"soc\",position:s.soc},{regionId:\"ram\",position:s.ram}],i=[];for(const s of e){if(!s.differentialPairId){i.push({id:s.id,endpoints:o(s)});continue}if(n.has(s.differentialPairId))continue;n.add(s.differentialPairId);const a=e.filter(l=\u003el.differentialPairId===s.differentialPairId);if(a.length!==2)throw new Error(`Differential pair ${s.differentialPairId} must have two members`);const[A,c]=a;i.push({type:\"differential\",connections:[{id:A.id,endpoints:o(A)},{id:c.id,endpoints:o(c)}]})}const r=t.buses.map(s=\u003e{let a={id:s.id,connectionIds:s.ports.map(A=\u003eA.id)};return s.preferredLayer!==void 0\u0026\u0026(a={...a,preferredLayer:s.preferredLayer}),s.preferredLayers!==void 0\u0026\u0026(a={...a,preferredLayers:s.preferredLayers}),a});return{regions:[{id:\"soc\",bounds:{minX:-16.62808,maxX:-2.37192,minY:-10.62808,maxY:10.62808},edge:\"right\"},{id:\"ram\",bounds:{minX:1.091917,maxX:18.141917,minY:-9.650917,maxY:9.549083},edge:\"left\"}],connections:i,buses:r,boundaryPointSpacing:.48}};Vue({buses:[{id:\"DDR_BYTE0\",ports:Okt,preferredLayers:[\"inner1\",\"inner4\"]}]}),Vue({buses:[{id:\"DDR_BYTE1\",ports:Gkt,preferredLayers:[\"inner2\",\"inner5\"]}]}),Vue({buses:[{id:\"DDR_BYTE0\",ports:Okt,preferredLayers:[\"inner1\",\"inner4\"]},{id:\"DDR_BYTE1\",ports:Gkt,preferredLayers:[\"inner2\",\"inner5\"]},{id:\"DDR_ADDR_CTRL\",ports:Ykt,preferredLayers:[\"inner3\",\"inner6\"]}]}),Vue({buses:[{id:\"DDR_ADDR_CTRL\",ports:Ykt,preferredLayers:[\"inner3\",\"inner6\"]}]});var LTo=class extends Error{name=\"WindingBreakoutInputError\"},Ukt=class extends Error{name=\"WindingBreakoutInfeasibleError\"},YMe=class extends Error{name=\"WindingBreakoutInvariantError\"},HTo=class extends Error{name=\"WindingBreakoutOutputUnavailableError\"},zue=t=\u003e{const e=[];for(const n of t.connections)\"type\"in n?e.push(...n.connections):e.push(n);return e},UMe=t=\u003et.preferredLayer!==void 0?[t.preferredLayer]:t.preferredLayers!==void 0?[...new Set(t.preferredLayers)]:[\"top\"],KMe=t=\u003e{const e=new Map;for(const n of t.buses){const o=UMe(n);for(const i of n.connectionIds)e.set(i,o)}return Object.fromEntries(zue(t).map(n=\u003e[n.id,e.get(n.id)??[\"top\"]]))},R0=t=\u003e{throw new LTo(`WindingBreakoutSolver: ${t}`)},OTo=t=\u003etypeof t==\"object\"\u0026\u0026t!==null\u0026\u0026!Array.isArray(t),hR=(t,e)=\u003e{OTo(t)||R0(`${e} must be an object`)},pR=(t,e)=\u003e{(typeof t!=\"string\"||t.trim().length===0)\u0026\u0026R0(`${e} must be a non-empty string`)},mR=(t,e)=\u003e{(typeof t!=\"number\"||!Number.isFinite(t))\u0026\u0026R0(`${e} must be finite`)},GTo=(t,e)=\u003e{mR(t,e),t\u003c=0\u0026\u0026R0(`${e} must be positive`)},B$=(t,e)=\u003eArray.isArray(t)?t:R0(e),YTo=(t,e)=\u003e(hR(t,e),mR(t.x,`${e}.x`),mR(t.y,`${e}.y`),t),UTo=(t,e)=\u003e(hR(t,e),mR(t.minX,`${e}.minX`),mR(t.maxX,`${e}.maxX`),mR(t.minY,`${e}.minY`),mR(t.maxY,`${e}.maxY`),(t.minX\u003e=t.maxX||t.minY\u003e=t.maxY)\u0026\u0026R0(`${e} must have positive width and height`),{minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.maxY}),KTo=(t,e)=\u003et.x\u003e=e.minX\u0026\u0026t.x\u003c=e.maxX\u0026\u0026t.y\u003e=e.minY\u0026\u0026t.y\u003c=e.maxY,VTo=t=\u003e{(!Array.isArray(t.regions)||t.regions.length===0)\u0026\u0026R0(\"at least one region is required\"),GTo(t.boundaryPointSpacing,\"boundaryPointSpacing\");const e=new Set,n=t.regions.map((d,p)=\u003e{hR(d,`regions[${p}]`),pR(d.id,`regions[${p}].id`),e.has(d.id)\u0026\u0026R0(`duplicate region id \"${d.id}\"`),e.add(d.id);const m=UTo(d.bounds,`region \"${d.id}\" bounds`);return(typeof d.edge!=\"string\"||!new Set([\"left\",\"right\",\"bottom\",\"top\"]).has(d.edge))\u0026\u0026R0(`region \"${d.id}\" has invalid edge`),{id:d.id,bounds:m,edge:d.edge,center:{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2}}}),o=n.every(d=\u003ed.edge===\"left\"||d.edge===\"right\"),i=n.every(d=\u003ed.edge===\"bottom\"||d.edge===\"top\");!o\u0026\u0026!i\u0026\u0026R0(\"all coordinated region edges must be parallel\"),(!Array.isArray(t.connections)||t.connections.length===0)\u0026\u0026R0(\"at least one connection is required\");const r=[],s=new Set,a=[],A=(d,p)=\u003e{hR(d,p),pR(d.id,`${p}.id`),s.has(d.id)\u0026\u0026R0(`duplicate connection id \"${d.id}\"`),\"layer\"in d\u0026\u0026R0(`${p}.layer is not accepted; declare layer preferences on a bus`);const m=B$(d.endpoints,`${p}.endpoints must be an array`),_=new Set,f=m.map((I,C)=\u003e{const y=`${p}.endpoints[${C}]`;hR(I,y),pR(I.regionId,`${y}.regionId`),e.has(I.regionId)||R0(`${y} references unknown region \"${I.regionId}\"`),_.has(I.regionId)\u0026\u0026R0(`${p} has duplicate endpoint for region \"${I.regionId}\"`),_.add(I.regionId);const x=YTo(I.position,`${y}.position`),E=n.find(B=\u003eB.id===I.regionId);return KTo(x,E.bounds)||R0(`${p} endpoint for region \"${E.id}\" is outside its bounds`),{regionId:I.regionId,position:x}});for(const I of n)_.has(I.id)||R0(`${p} is missing endpoint for region \"${I.id}\"`);return f.length!==n.length\u0026\u0026R0(`${p} must contain exactly one endpoint for every region`),s.add(d.id),{id:d.id,endpoints:f}};for(const[d,p]of t.connections.entries()){const m=`connections[${d}]`;if(hR(p,m),\"type\"in p||\"connections\"in p){p.type!==\"differential\"\u0026\u0026R0(`${m} has invalid differential-pair type`),\"layer\"in p\u0026\u0026R0(`${m}.layer is not accepted; declare layer preferences on a bus`);const _=B$(p.connections,`${m}.connections must contain exactly two members`);_.length!==2\u0026\u0026R0(`${m}.connections must contain exactly two members`);const f=A(_[0],`${m}.connections[0]`),I=A(_[1],`${m}.connections[1]`);f.id===I.id\u0026\u0026R0(`${m} members must have distinct connection ids`),r.push(f,I),a.push([f.id,I.id])}else r.push(A(p,m))}const c=B$(t.buses,\"buses must be an array\"),l=new Set,u=new Map,g=c.map((d,p)=\u003e{const m=`buses[${p}]`;hR(d,m),pR(d.id,`${m}.id`);const _=d.id;l.has(_)\u0026\u0026R0(`duplicate bus id \"${_}\"`),l.add(_);const f=B$(d.connectionIds,`${m}.connectionIds must be a non-empty array`);f.length===0\u0026\u0026R0(`${m}.connectionIds must be a non-empty array`);const I=new Set,C=f.map((B,S)=\u003e{pR(B,`${m}.connectionIds[${S}]`),s.has(B)||R0(`${m} references unknown connection \"${B}\"`),I.has(B)\u0026\u0026R0(`${m} contains duplicate connection \"${B}\"`),I.add(B);const Q=u.get(B);return Q!==void 0\u0026\u0026R0(`connection \"${B}\" belongs to multiple buses \"${Q}\" and \"${d.id}\"`),u.set(B,_),B});let y;d.preferredLayer!==void 0\u0026\u0026(pR(d.preferredLayer,`${m}.preferredLayer`),y=d.preferredLayer);let x;if(d.preferredLayers!==void 0){const B=B$(d.preferredLayers,`${m}.preferredLayers must be a non-empty array`);B.length===0\u0026\u0026R0(`${m}.preferredLayers must be a non-empty array`);const S=new Set;x=B.map((Q,w)=\u003e(pR(Q,`${m}.preferredLayers[${w}]`),S.has(Q)\u0026\u0026R0(`${m}.preferredLayers contains duplicate layer \"${Q}\"`),S.add(Q),Q))}let E={id:_,connectionIds:C};return y!==void 0\u0026\u0026(E={...E,preferredLayer:y}),x!==void 0\u0026\u0026(E={...E,preferredLayers:x}),E});for(const[d,p]of a){const m=u.get(d),_=u.get(p);m!==_\u0026\u0026R0(`differential pair \"${d}/${p}\" must belong to the same bus`)}const h=[...new Set([...g.flatMap(d=\u003eUMe(d)),...r.filter(d=\u003e!u.has(d.id)).map(()=\u003e\"top\")])].sort((d,p)=\u003ed.localeCompare(p));return{regions:n,connections:r,buses:g,layerNames:h,atomicConnectionGroups:a}},zTo=1e-9,JTo=t=\u003et===\"left\"||t===\"right\",WTo=(t,e)=\u003ee?t.bounds.minY:t.bounds.minX,jTo=(t,e)=\u003ee?t.bounds.maxY:t.bounds.maxX,$To=(t,e)=\u003ee?t.y:t.x,qTo=(t,e)=\u003e{const n=e/2;return Object.fromEntries(t.map((o,i)=\u003e[o,(i-(t.length-1)/2)*n]))},XTo=({referenceOrder:t,layer:e,layerByConnection:n,atomicGroups:o})=\u003e{const i=t.filter(A=\u003en[A]===e),r=new Map(o.flatMap(A=\u003eA.map(c=\u003e[c,A]))),s=new Set,a=[];for(const A of i){const c=r.get(A);if(!c){a.push(A);continue}s.has(c)||(s.add(c),a.push(...i.filter(l=\u003ec.includes(l))))}return a},ZTo=({regions:t,connections:e,spacing:n,count:o,layerOffsets:i})=\u003e{const r=t.every(h=\u003eJTo(h.edge)),s=Math.max(...t.map(h=\u003eWTo(h,r))),a=Math.min(...t.map(h=\u003ejTo(h,r))),A=Math.min(...Object.values(i)),c=Math.max(...Object.values(i)),l=n*Math.max(0,o-1)+c-A;if(a-s+zTo\u003cl)throw new Ukt(`WindingBreakoutSolver: declared breakout edges need ${l.toFixed(2)}mm but expose only ${(a-s).toFixed(2)}mm`);const u=t.reduce((h,d)=\u003e{const p=e.map(m=\u003em.endpoints.find(_=\u003e_.regionId===d.id).position);return h+p.reduce((m,_)=\u003em+$To(_,r),0)/p.length},0)/t.length,g=Math.max(s-A,Math.min(a-n*Math.max(0,o-1)-c,u-n*Math.max(0,o-1)/2));return{vertical:r,axes:Array.from({length:o},(h,d)=\u003eg+d*n)}},eko=(t,e,n)=\u003e{if(n){let i=t.bounds.maxX;return t.edge===\"left\"\u0026\u0026(i=t.bounds.minX),{x:i,y:e}}let o=t.bounds.maxY;return t.edge===\"bottom\"\u0026\u0026(o=t.bounds.minY),{x:e,y:o}},tko=({regions:t,connections:e,referenceOrder:n,layerNames:o,layerByConnection:i,boundaryPointSpacing:r,atomicGroups:s})=\u003e{const a=qTo(o,r),A=Object.fromEntries(o.map(h=\u003e[h,XTo({referenceOrder:n,layer:h,layerByConnection:i,atomicGroups:s})])),c=Math.max(...o.map(h=\u003ee.filter(d=\u003ei[d.id]===h).length)),{vertical:l,axes:u}=ZTo({regions:t,connections:e,spacing:r,count:c,layerOffsets:a});return{breakoutPoints:t.flatMap(h=\u003eo.flatMap(d=\u003eA[d].map((p,m)=\u003e({regionId:h.id,connectionId:p,layer:d,...eko(h,u[m]+a[d],l)}))))}},nko=(t,e)=\u003e{const n=new Set(t),o=new Map(e.flatMap(s=\u003es.map(a=\u003e[a,s]))),i=new Set,r=[];for(const s of t){const a=o.get(s);if(!a){r.push([s]);continue}i.has(a)||(i.add(a),r.push(a.filter(A=\u003en.has(A))))}return r},oko=({validated:t,referenceOrder:e})=\u003e{const n=new Map;for(const r of t.buses){const s=new Set(r.connectionIds),a=e.filter(l=\u003es.has(l)),A=UMe(r),c=nko(a,t.atomicConnectionGroups);for(const[l,u]of c.entries()){const g=A[l%A.length];for(const h of u)n.set(h,g)}}for(const r of e)n.has(r)||n.set(r,\"top\");const o=Object.fromEntries(e.map(r=\u003e[r,n.get(r)])),i=[...new Set(Object.values(o))].sort((r,s)=\u003er.localeCompare(s));return{layerByConnection:o,layerNames:i}},VMe=t=\u003e[...new Set(Object.values(KMe(t)).flat())].sort((e,n)=\u003ee.localeCompare(n)),Kkt=[\"#2563eb\",\"#dc2626\",\"#059669\",\"#7c3aed\",\"#d97706\",\"#0891b2\",\"#db2777\",\"#4f46e5\",\"#65a30d\",\"#c2410c\",\"#0f766e\",\"#9333ea\"],Jue=t=\u003e{let e=2166136261;for(const n of t)e^=n.charCodeAt(0),e=Math.imul(e,16777619);return Kkt[(e\u003e\u003e\u003e0)%Kkt.length]},vw=(t,e)=\u003e{const n=VMe(t),o=[...new Set(e)].map(i=\u003e{const r=n.indexOf(i);if(r\u003c0)throw new Error(`Cannot visualize unknown signal layer \"${i}\"`);return r});if(o.length===0)throw new Error(\"Cannot create graphics metadata without a signal layer\");return o.sort((i,r)=\u003ei-r),`z${o.join(\",\")}`},iko=(t,e)=\u003e{const n={circles:[],rects:[],texts:[]};let i=VMe(t);e\u0026\u0026(i=[e]);const r=vw(t,i),s=zue(t),a=KMe(t),A=Math.min(.12,t.boundaryPointSpacing/4);for(const c of t.regions){const l={x:(c.bounds.minX+c.bounds.maxX)/2,y:(c.bounds.minY+c.bounds.maxY)/2};n.rects.push({center:l,width:c.bounds.maxX-c.bounds.minX,height:c.bounds.maxY-c.bounds.minY,fill:\"rgba(226, 232, 240, 0.035)\",stroke:\"rgba(71, 85, 105, 0.55)\",layer:r});for(const u of s){const g=a[u.id];if(e\u0026\u0026!g.includes(e))continue;const h=u.endpoints.find(p=\u003ep.regionId===c.id);if(!h)continue;const d=Jue(u.id);n.circles.push({center:h.position,radius:A,fill:`${d}70`,stroke:d,layer:vw(t,g)})}n.texts.push({x:l.x,y:c.bounds.maxY+.35,text:c.id,anchorSide:\"bottom_center\",color:\"#334155\",fontSize:.34,layer:r})}return n},rko=(t,e,n)=\u003e{const o=zue(t),i=e.breakoutPoints.filter(a=\u003e!n||a.layer===n),r=new Map;for(const a of e.breakoutPoints){const A=`${a.regionId}:${a.x.toFixed(9)}:${a.y.toFixed(9)}`,c=r.get(A)??{x:a.x,y:a.y,layers:new Set};c.layers.add(a.layer),r.set(A,c)}return{lines:e.referenceOrder.flatMap(a=\u003e{const A=o.find(g=\u003eg.id===a);if(!A)return[];const c=i.filter(g=\u003eg.connectionId===a),l=c[0]?.layer;if(!l||n\u0026\u0026l!==n)return[];if(c.length!==t.regions.length)return[];const u=t.regions.flatMap((g,h)=\u003e{const d=A.endpoints.find(m=\u003em.regionId===g.id),p=c.find(m=\u003em.regionId===g.id);return!d||!p?[]:h===0?[d.position,p]:[p,d.position]});return u.length\u003c2?[]:[{points:u,strokeColor:`${Jue(a)}55`,strokeWidth:.012,strokeDash:[.025,.07],layer:vw(t,[l])}]}),circles:[...r.values()].flatMap(a=\u003e{const A=[...a.layers].filter(c=\u003e!n||c===n);return A.length===0?[]:[{center:a,radius:.11,fill:\"rgba(15, 23, 42, 0.06)\",stroke:\"#475569\",layer:vw(t,A)}]}),points:i.map(a=\u003e({x:a.x,y:a.y,color:Jue(a.connectionId),label:`${a.connectionId} · ${a.layer}`,layer:vw(t,[a.layer])}))}},Wue=({input:t,phase:e,detail:n,activeLayer:o,referenceOrder:i,referenceRegionId:r,showReferenceNumbers:s=!1,state:a})=\u003e{const A=iko(t,o);let c;a\u0026\u0026(c=rko(t,a,o));let l=VMe(t);o\u0026\u0026(l=[o]);const u=vw(t,l),g=Math.max(...t.regions.map(_=\u003e_.bounds.maxY)),h=Math.min(...t.regions.map(_=\u003e_.bounds.minX)),d=[...A.texts??[],...c?.texts??[],{x:h,y:g+1.05,text:e,anchorSide:\"bottom_left\",color:\"#0f172a\",fontSize:.42,layer:u},{x:h,y:g+.68,text:n,anchorSide:\"bottom_left\",color:\"#475569\",fontSize:.25,layer:u}],p=[],m=[];if(s\u0026\u0026i){const _=t.regions.find(x=\u003ex.id===r)??t.regions[0],f=zue(t),I=KMe(t),C=[];for(const[x,E]of i.entries()){const B=f.find(w=\u003ew.id===E),S=I[E];if(!B||!S||o\u0026\u0026!S.includes(o))continue;const Q=B.endpoints.find(w=\u003ew.regionId===_.id);Q\u0026\u0026(C.push(Q.position),d.push({x:Q.position.x+.18,y:Q.position.y+.18,text:`${x+1} · ${E}`,anchorSide:\"bottom_left\",color:Jue(E),fontSize:.21,layer:vw(t,S)}))}const y={x:(_.bounds.minX+_.bounds.maxX)/2,y:(_.bounds.minY+_.bounds.maxY)/2};p.push(...C.map(x=\u003e({points:[y,x],strokeColor:\"rgba(100, 116, 139, 0.35)\",strokeWidth:.01,strokeDash:[.03,.05],layer:u}))),C.length\u003e1\u0026\u0026p.push({points:C,strokeColor:\"rgba(15, 23, 42, 0.65)\",strokeWidth:.018,strokeDash:[.04,.04],label:`${_.id} angular winding order`,layer:u}),m.push({center:y,radius:.07,fill:\"#0f172a\",stroke:\"#ffffff\",label:`${_.id} angular reference center`,layer:u})}return{title:e,coordinateSystem:\"cartesian\",rects:A.rects,polygons:A.polygons,lines:[...c?.lines??[],...p],circles:[...A.circles??[],...c?.circles??[],...m],points:c?.points,texts:d}},Vkt=t=\u003enew Set(t.map(e=\u003e`${e.regionId}:${e.x.toFixed(9)}:${e.y.toFixed(9)}`)).size,sko=class extends fC{constructor(t){super(),this.params=t,this.visualizationLayer=t.visualizationLayer;const e=oko({validated:t.validated,referenceOrder:t.ordering.referenceOrder});this.layerByConnection=e.layerByConnection,this.placementBatches=t.validated.regions.flatMap(n=\u003ee.layerNames.map(o=\u003e({regionId:n.id,layer:o}))),this.MAX_ITERATIONS=this.placementBatches.length+2}params;batchIndex=0;output;plannedPlacement;placementBatches;visibleBreakoutPoints=[];layerByConnection;visualizationLayer;setVisualizationLayer(t){this.visualizationLayer=t}_step(){if(!this.plannedPlacement){this.plannedPlacement=tko({regions:this.params.validated.regions,connections:this.params.validated.connections,referenceOrder:this.params.ordering.referenceOrder,layerNames:[...new Set(Object.values(this.layerByConnection))].sort((e,n)=\u003ee.localeCompare(n)),layerByConnection:this.layerByConnection,boundaryPointSpacing:this.params.input.boundaryPointSpacing,atomicGroups:this.params.validated.atomicConnectionGroups}),this.stats={phase:\"plan-gate-grid\",regionLayerBatches:this.placementBatches.length,placedBreakpoints:0};return}const t=this.placementBatches[this.batchIndex];if(t){this.visibleBreakoutPoints.push(...this.plannedPlacement.breakoutPoints.filter(e=\u003ee.regionId===t.regionId\u0026\u0026e.layer===t.layer)),this.batchIndex+=1,this.stats={phase:\"place-region-layer-batch\",regionId:t.regionId,layer:t.layer,completedBatches:this.batchIndex,totalBatches:this.placementBatches.length,placedBreakpoints:this.visibleBreakoutPoints.length};return}this.output=this.plannedPlacement,this.stats={phase:\"finalize-shared-gate-slots\",placedBreakpoints:this.output.breakoutPoints.length,sharedGateSlots:Vkt(this.output.breakoutPoints)},this.solved=!0}computeProgress(){let t=this.batchIndex;return this.plannedPlacement\u0026\u0026(t+=1),this.output\u0026\u0026(t+=1),t/this.MAX_ITERATIONS}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved||!this.output)throw new YMe(\"WindingBreakoutSolver: gate placement requested before placement completed\");return this.output}visualize(){let t=\"Next microstep: derive layer offsets, atomic gate orders, and the common boundary slot grid\";if(this.plannedPlacement\u0026\u0026this.batchIndex===0)t=`Gate grid planned · ${this.placementBatches.length} region/layer batches remain`;else if(this.plannedPlacement\u0026\u0026!this.output){const i=this.placementBatches[this.batchIndex-1];t=`Placed region “${i.regionId}” on layer “${i.layer}” · ${this.batchIndex}/${this.placementBatches.length} batches`}else if(this.output){const i=Vkt(this.output.breakoutPoints);t=`${this.output.breakoutPoints.length} gates placed; coincident layer positions form ${i} shared slots`}let e;if(this.plannedPlacement){let i=this.visibleBreakoutPoints;this.output\u0026\u0026(i=this.output.breakoutPoints),e={referenceOrder:this.params.ordering.referenceOrder,breakoutPoints:i}}const n=Wue({input:this.params.input,activeLayer:this.visualizationLayer,phase:\"Step 2 · Place boundary gates\",detail:t,state:e}),o=(this.plannedPlacement?.breakoutPoints??[]).filter(i=\u003e!this.visualizationLayer||i.layer===this.visualizationLayer).map(i=\u003e({center:i,radius:.065,fill:\"rgba(255, 255, 255, 0.75)\",stroke:\"rgba(100, 116, 139, 0.5)\",label:`planned slot ${i.regionId} · ${i.layer}`,layer:vw(this.params.input,[i.layer])}));return{...n,circles:[...n.circles??[],...o]}}},ako=(t,e)=\u003ee.map(n=\u003e{const o=n.endpoints.find(i=\u003ei.regionId===t.id).position;return{id:n.id,angle:Math.atan2(o.y-t.center.y,o.x-t.center.x),radius:Math.hypot(o.x-t.center.x,o.y-t.center.y)}}).sort((n,o)=\u003en.angle-o.angle||o.radius-n.radius||n.id.localeCompare(o.id)).map(n=\u003en.id),Ako=(t,e,n)=\u003e{const o=new Map(e.flatMap(c=\u003ec.map(l=\u003e[l,c]))),i=new Set,r=[];for(const c of t){const l=o.get(c);if(!l){r.push(c);continue}i.has(l)||(i.add(l),r.push(...t.filter(u=\u003el.includes(u))))}const s=new Map(n.flatMap(c=\u003ec.connectionIds.map(l=\u003e[l,c]))),a=new Set,A=[];for(const c of r){const l=s.get(c);if(!l){A.push(c);continue}if(a.has(l))continue;a.add(l);const u=new Set(l.connectionIds);A.push(...r.filter(g=\u003eu.has(g)))}return A},cko=class extends fC{constructor(t){super(),this.params=t,this.visualizationLayer=t.visualizationLayer,this.MAX_ITERATIONS=t.validated.regions.length+1}params;naturalOrderByRegion={};currentRegionIndex=0;output;visualizedOrder;visualizedRegionId;visualizationLayer;setVisualizationLayer(t){this.visualizationLayer=t}_step(){const t=this.params.validated.regions[this.currentRegionIndex];if(t){const o=ako(t,this.params.validated.connections);this.naturalOrderByRegion[t.id]=o,this.visualizedRegionId=t.id,this.visualizedOrder=o,this.currentRegionIndex+=1,this.stats={phase:\"derive-natural-order\",regionId:t.id,completedRegions:this.currentRegionIndex,totalRegions:this.params.validated.regions.length,naturalOrder:o};return}const e=this.params.validated.regions[0],n=Ako(this.naturalOrderByRegion[e.id],this.params.validated.atomicConnectionGroups,this.params.validated.buses);this.output={naturalOrderByRegion:this.naturalOrderByRegion,referenceOrder:n},this.visualizedRegionId=e.id,this.visualizedOrder=n,this.stats={phase:\"atomicize-reference-order\",referenceRegion:e.id,referenceOrder:n},this.solved=!0}computeProgress(){let t=this.currentRegionIndex;return this.output\u0026\u0026(t+=1),t/this.MAX_ITERATIONS}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved||!this.output)throw new YMe(\"WindingBreakoutSolver: reference order requested before ordering completed\");return this.output}visualize(){const t=this.params.validated.regions[0].id;let e=`Next microstep: derive natural order for region “${t}”`;return this.visualizedRegionId\u0026\u0026!this.output\u0026\u0026(e=`Natural order for region “${this.visualizedRegionId}” · ${this.currentRegionIndex}/${this.params.validated.regions.length} regions processed`),this.output\u0026\u0026(e=`Reference region “${t}” finalized; buses are contiguous and differential pairs are atomic`),Wue({input:this.params.input,activeLayer:this.visualizationLayer,phase:\"Step 1 · Derive reference order\",detail:e,referenceOrder:this.visualizedOrder,referenceRegionId:this.visualizedRegionId,showReferenceNumbers:!0})}},lko=({points:t,connectionIds:e,regions:n,atomicGroups:o})=\u003e{const i=n.map(u=\u003eu.id),r=new Map,s=new Map;let a=!0;for(const u of t){const g=`${u.regionId}:${u.connectionId}`;r.set(g,(r.get(g)??0)+1);const h=s.get(u.connectionId);h!==void 0\u0026\u0026h!==u.layer\u0026\u0026(a=!1),s.set(u.connectionId,u.layer)}const A=i.flatMap(u=\u003ee.map(g=\u003e`${u}:${g}`)),c=r.size===A.length\u0026\u0026A.every(u=\u003er.get(u)===1),l=o.every(u=\u003e{const g=s.get(u[0]);return!g||u.some(h=\u003es.get(h)!==g)?!1:n.every(h=\u003e{const d=t.filter(I=\u003eI.regionId===h.id\u0026\u0026I.layer===g),p=h.edge===\"left\"||h.edge===\"right\",m=[...d].sort((I,C)=\u003ep?I.y-C.y:I.x-C.x).map(I=\u003eI.connectionId),_=m.indexOf(u[0]),f=m.indexOf(u[1]);return _!==-1\u0026\u0026f!==-1\u0026\u0026Math.abs(_-f)===1})});return c\u0026\u0026a\u0026\u0026l},uko=({validated:t,placement:e})=\u003e{if(!lko({points:e.breakoutPoints,connectionIds:t.connections.map(o=\u003eo.id),regions:t.regions,atomicGroups:t.atomicConnectionGroups}))throw new YMe(\"WindingBreakoutSolver: generated invalid breakout points\");return{breakoutPoints:e.breakoutPoints}},gko=[\"referenceOrdering\",\"gatePlacement\"],dko=class extends eve{validatedInput;output;visualizationLayer;pipelineDef=[TH(\"referenceOrdering\",cko,t=\u003e[{input:t.inputProblem,validated:t.getValidatedInput(),visualizationLayer:t.visualizationLayer}]),TH(\"gatePlacement\",sko,t=\u003e[{input:t.inputProblem,validated:t.getValidatedInput(),ordering:t.getRequiredStageOutput(\"referenceOrdering\"),visualizationLayer:t.visualizationLayer}])];constructor(t){super(t)}_setup(){this.validatedInput=VTo(this.inputProblem),this.stats={phase:\"setup-input-validation\",regionCount:this.validatedInput.regions.length,connectionCount:this.validatedInput.connections.length,layerCount:this.validatedInput.layerNames.length}}getValidatedInput(){if(!this.validatedInput)throw new Error(\"WindingBreakoutSolver: input has not been validated\");return this.validatedInput}_step(){super._step(),!this.output\u0026\u0026!this.activeSubSolver\u0026\u0026this.currentPipelineStageIndex\u003e=this.pipelineDef.length\u0026\u0026(this.output=uko({validated:this.getValidatedInput(),placement:this.getRequiredStageOutput(\"gatePlacement\")}),this.solved=!0),this.stats={phase:this.getCurrentStageName(),completedStages:this.currentPipelineStageIndex,totalStages:this.pipelineDef.length},this.solved\u0026\u0026(this.stats.phase=\"finalize-output-validation\"),this.output\u0026\u0026(this.stats.valid=!0,this.stats.breakoutPointCount=this.output.breakoutPoints.length)}getRequiredStageOutput(t){const e=this.getStageOutput(t);if(e===void 0)throw new Error(`WindingBreakoutSolver: pipeline stage “${t}” has no output`);return e}setVisualizationLayer(t){this.visualizationLayer=t;for(const e of gko){const n=this.getSolver(e);n\u0026\u0026\"setVisualizationLayer\"in n\u0026\u0026n.setVisualizationLayer(t)}}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved||!this.output)throw new HTo(\"WindingBreakoutSolver: getOutput() called before successful completion\");return this.output}initialVisualize(){return Wue({input:this.inputProblem,activeLayer:this.visualizationLayer,phase:\"Input · Validated during setup\",detail:\"Region bounds, breakout edges, bus layer preferences, and canonical endpoints\"})}finalVisualize(){if(!this.output)return null;const t=this.getRequiredStageOutput(\"referenceOrdering\");return Wue({input:this.inputProblem,activeLayer:this.visualizationLayer,phase:\"Output · Validated after gate placement\",detail:\"Valid: one bus-constrained breakout point per connection and region; pairs are adjacent\",state:{referenceOrder:t.referenceOrder,breakoutPoints:this.output.breakoutPoints}})}visualize(){return{...super.visualize(),title:\"Winding breakout solver · step-by-step pipeline\",coordinateSystem:\"cartesian\"}}},zkt=t=\u003e({id:t.connectionId,endpoints:t.endpoints}),hko=t=\u003e{const e={regions:t.regions.map(o=\u003e({id:o.regionId,bounds:o.bounds,edge:o.edge})),connections:t.connections.map(o=\u003e\"type\"in o?{type:\"differential\",connections:o.connections.map(zkt)}:zkt(o)),buses:t.buses.map(o=\u003e({id:o.busId,connectionIds:o.connectionIds,preferredLayers:o.targetLayers})),boundaryPointSpacing:t.boundaryPointSpacing},n=new dko(e);return n.solve(),n.getOutput()},Jkt=t=\u003e{const e=t.outline?Oh(t.outline):null,n=t.width??(e?e.maxX-e.minX:void 0),o=t.height??(e?e.maxY-e.minY:void 0);return n===void 0||o===void 0?null:{minX:t.center.x-n/2,maxX:t.center.x+n/2,minY:t.center.y-o/2,maxY:t.center.y+o/2}},Wkt=(t,e,n,o)=\u003eMath.max(t-o,n-e,0),pko=t=\u003e{if(t.root?.pcbDisabled||!t.pcb_group_id)return;const e=t.root;if(!e)return;const n=t.parent?.children.filter(a=\u003ea instanceof t.constructor);if(!n)return;const o=n.indexOf(t);if(o\u003c0)return;const{db:i}=e,r=i.pcb_group.get(t.pcb_group_id);if(!r)return;const s=Jkt(r);if(s)for(const a of n.slice(o+1)){if(!a.pcb_group_id)continue;const A=i.pcb_group.get(a.pcb_group_id);if(!A)continue;const c=Jkt(A);if(!c)continue;const l=t._parsedProps.fanoutMargin,u=a._parsedProps.fanoutMargin,g=Math.max(typeof l==\"number\"?l:0,typeof u==\"number\"?u:0),h=Wkt(s.minX,s.maxX,c.minX,c.maxX),d=Wkt(s.minY,s.maxY,c.minY,c.maxY),p=Math.min(s.maxX,c.maxX)-Math.max(s.minX,c.minX),m=Math.min(s.maxY,c.maxY)-Math.max(s.minY,c.minY),_=p\u003e0\u0026\u0026m\u003e0,f=g\u003e0\u0026\u0026h\u003cg\u0026\u0026d\u003cg;if(!_\u0026\u0026!f)continue;const I=_?`Fanout boundaries \"${t.name}\" and \"${a.name}\" overlap. Fanout boundaries may not overlap.`:`Fanout boundaries \"${t.name}\" and \"${a.name}\" do not maintain the required ${g}mm fanoutMargin.`;i.pcb_placement_error.list().some(y=\u003ey.message===I)||i.pcb_placement_error.insert({error_type:\"pcb_placement_error\",message:I,subcircuit_id:t.subcircuit_id??void 0})}},mko=(t,e)=\u003e{if(!(e instanceof Ukt)||!t.root||!t.pcb_group_id)return!1;const n=t.root.db.pcb_component.list().filter(o=\u003eo.pcb_group_id===t.pcb_group_id).map(o=\u003eo.source_component_id?t.root.db.source_component.get(o.source_component_id)?.name:void 0).filter(o=\u003e!!o);return t.root.db.pcb_autorouting_error.insert({pcb_error_id:`pcb_autorouting_error_winding_breakout_${t.pcb_group_id}`,error_type:\"pcb_autorouting_error\",message:`Winding fanout failed for ${n.join(\", \")||t.name}: ${e.message}. The connections could not escape to the breakout boundary. Give the fanout more room by increasing the breakout's padding, or by extending the breakout to include the parts crowding it (decoupling capacitors, series resistors).`}),!0},_ko=t=\u003e{const e=t.parent;if(!e?.selectAll)throw new Error(`Automatic breakout \"${t.name}\" has no coordinated routing scope`);return e},fko=(t,e)=\u003e{const n=[];for(const r of t.selectAll(\"group\")){if(!r.isRoutingDirective||r.parent!==t)continue;const s=r;s.children.some(A=\u003eA instanceof Kue)\u0026\u0026n.push(s)}const o=r=\u003enew Set(jkt(r).endpointBySourceTraceId.keys()),i=o(e);return n.filter(r=\u003e{const s=o(r);return s.size===i.size\u0026\u0026[...i].every(a=\u003es.has(a))})},jkt=t=\u003e{if(!t.root||!t.pcb_group_id)throw new Error(`Automatic breakout \"${t.name}\" has no PCB region`);const e=t.root.db.pcb_group.get(t.pcb_group_id);if(!e||!e.width||!e.height)throw new Error(`Automatic breakout \"${t.name}\" has invalid PCB region bounds`);const n={minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2},o={x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},i=new Map,r=new Map;for(const s of t.children.filter(a=\u003ea instanceof Kue)){const a=s.matchedPort;if(!a?.pcb_port_id||!a.source_port_id)throw new Error(`Automatic breakout \"${t.name}\" is missing a PCB endpoint`);let A=s.matchedSourceTraceId;if(!A){const l=t.root.db.source_trace.list().filter(h=\u003eh.connected_source_port_ids.includes(a.source_port_id));if(l.length===0)throw new Error(`Automatic breakout \"${t.name}\" has a point without a source trace identity`);const u=l.filter(h=\u003eh.connected_source_port_ids.some(d=\u003e{if(d===a.source_port_id)return!1;const p=t.root.db.pcb_port.getWhere({source_port_id:d});return!p||p.pcb_group_id===t.pcb_group_id?!1:!(p.x\u003e=n.minX\u0026\u0026p.x\u003c=n.maxX\u0026\u0026p.y\u003e=n.minY\u0026\u0026p.y\u003c=n.maxY)}));A=(u.length\u003e0?u:l).slice().sort((h,d)=\u003eh.source_trace_id.localeCompare(d.source_trace_id))[0].source_trace_id,s.matchedSourceTraceId=A}if(i.has(A))throw new Error(`Connection \"${A}\" has duplicate endpoint for region \"${t.pcb_group_id}\"`);const c=t.root.db.pcb_port.get(a.pcb_port_id);if(!c)throw new Error(`Connection \"${A}\" references unknown PCB endpoint \"${a.pcb_port_id}\"`);if(c.pcb_group_id!==t.pcb_group_id)throw new Error(`Connection \"${A}\" endpoint references unknown region \"${c.pcb_group_id??\"unassigned\"}\" instead of \"${t.pcb_group_id}\"`);if(c.x===void 0||c.y===void 0)throw new Error(`Connection \"${A}\" is missing endpoint coordinates for region \"${t.pcb_group_id}\"`);i.set(A,{regionId:t.pcb_group_id,position:{x:c.x,y:c.y}}),r.set(A,a.source_port_id)}return{breakout:t,pcbGroupId:t.pcb_group_id,bounds:n,center:o,endpointBySourceTraceId:i,sourcePortIdBySourceTraceId:r}},Iko=t=\u003e{const e=t.map(s=\u003es.center.x),n=t.map(s=\u003es.center.y),o=Math.max(...e)-Math.min(...e),i=Math.max(...n)-Math.min(...n),r=o\u003e=i;return t.sort((s,a)=\u003e{if(r){const A=s.center.x-a.center.x;if(A!==0)return A;const c=s.center.y-a.center.y;if(c!==0)return c}else{const A=s.center.y-a.center.y;if(A!==0)return A;const c=s.center.x-a.center.x;if(c!==0)return c}return s.breakout.name.localeCompare(a.breakout.name)}),{regions:t,horizontalPlacement:r}},Cko=({region:t,regionIndex:e,regions:n,horizontalPlacement:o,singleRegionPreferredEdge:i})=\u003e{if(n.length===1\u0026\u0026i)return i;const r=n.filter(a=\u003ea!==t),s=r.reduce((a,A)=\u003e({x:a.x+A.center.x/r.length,y:a.y+A.center.y/r.length}),{x:0,y:0});return o?s.x\u003et.center.x?\"right\":s.x\u003ct.center.x?\"left\":e\u003cn.length/2?\"right\":\"left\":s.y\u003et.center.y?\"top\":s.y\u003ct.center.y?\"bottom\":e\u003cn.length/2?\"top\":\"bottom\"},yko=({region:t,sourceTraces:e})=\u003e{const n=t.breakout.root;if(!n)return;const o=new Set(t.sourcePortIdBySourceTraceId.values()),i=new Map;for(const a of e)if(a.connected_source_port_ids.some(A=\u003eo.has(A)))for(const A of a.connected_source_port_ids){if(o.has(A))continue;const c=n.db.pcb_port.getWhere({source_port_id:A});!c?.pcb_port_id||c.x===void 0||c.y===void 0||c.x\u003e=t.bounds.minX\u0026\u0026c.x\u003c=t.bounds.maxX\u0026\u0026c.y\u003e=t.bounds.minY\u0026\u0026c.y\u003c=t.bounds.maxY||i.set(c.pcb_port_id,{x:c.x,y:c.y})}if(i.size===0)return;const r=(a,A)=\u003e{const c=A===\"left\"||A===\"right\"?{x:A===\"left\"?t.bounds.minX:t.bounds.maxX,y:Math.max(t.bounds.minY,Math.min(t.bounds.maxY,a.y))}:{x:Math.max(t.bounds.minX,Math.min(t.bounds.maxX,a.x)),y:A===\"bottom\"?t.bounds.minY:t.bounds.maxY};return Math.hypot(a.x-c.x,a.y-c.y)},s=[\"right\",\"left\",\"top\",\"bottom\"];return s.reduce((a,A)=\u003e{const c=[...i.values()].reduce((u,g)=\u003eu+r(g,a),0);return[...i.values()].reduce((u,g)=\u003eu+r(g,A),0)\u003cc?A:a},s[0])},zMe=({connectionOwner:t,connectionOwnerLabel:e,connectionSelector:n,sourceTraces:o})=\u003e{let r=o.filter(s=\u003es.name===n);if(r.length===0){const s=t.getSubcircuit().selectOne(n,{type:\"port\"});s?.source_port_id\u0026\u0026(r=o.filter(a=\u003ea.connected_source_port_ids.includes(s.source_port_id)))}if(r.length===0)throw new Error(`Could not resolve \"${n}\" in ${e}`);if(r.length\u003e1)throw new Error(`Connection \"${n}\" resolves to multiple source traces in ${e}`);return r[0]},xko=({routingScope:t,sourceTraces:e,coordinatedSourceTraceIds:n,availableLayers:o})=\u003e{const i=[],r=t.getSubcircuit().subcircuit_id;for(const s of t.selectAll(\"bus\")){if(s.getSubcircuit().subcircuit_id!==r)continue;const a=[];for(const c of s._parsedProps.connections){const l=zMe({connectionOwner:s,connectionOwnerLabel:`bus \"${s.name}\"`,connectionSelector:c,sourceTraces:e});n.has(l.source_trace_id)\u0026\u0026a.push(l.source_trace_id)}if(a.length===0)continue;let A={busId:s.name,connectionIds:a};if(s._parsedProps.preferredLayer!==void 0)A={...A,targetLayers:[s._parsedProps.preferredLayer]};else if(s._parsedProps.preferredLayers!==void 0)A={...A,targetLayers:s._parsedProps.preferredLayers};else{const c=s._parsedProps.pcbAllowedLayers??o;A={...A,targetLayers:[...new Set(c)]}}i.push(A)}return i},Eko=({routingScope:t,sourceTraces:e})=\u003e{const n=t.getSubcircuit().subcircuit_id,o=[];for(const i of t.selectAll(\"differentialpair\")){if(i.getSubcircuit().subcircuit_id!==n)continue;const r=zMe({connectionOwner:i,connectionOwnerLabel:`differential pair \"${i.name}\"`,connectionSelector:i._parsedProps.positiveConnection,sourceTraces:e}),s=zMe({connectionOwner:i,connectionOwnerLabel:`differential pair \"${i.name}\"`,connectionSelector:i._parsedProps.negativeConnection,sourceTraces:e});o.push({differentialPair:i,positiveSourceTraceId:r.source_trace_id,negativeSourceTraceId:s.source_trace_id})}return o},Bko=t=\u003e{const e=t.root?.db.pcb_board.list()[0],n=e?.min_trace_width??.15,o=e?.min_trace_to_pad_edge_clearance??.2,i=e?.min_via_pad_diameter??.3;return gRt({traceWidth:n,traceToPadClearance:o,viaPadDiameter:i})},bko=({routingScope:t,automaticBreakouts:e})=\u003e{let n=Owe(t._getSubcircuitLayerCount());for(const o of e){const i=o._parsedProps.fanoutRoutingLayers?.map(String);if(!i)continue;const r=new Set(i);n=n.filter(s=\u003er.has(s))}if(n.length===0)throw new Error(`Automatic breakouts in routing scope \"${t.name}\" have no shared fanout routing layer`);return n},Sko=t=\u003e{if(!t.root)throw new Error(`Automatic breakout \"${t.name}\" has no circuit root`);const e=_ko(t),n=fko(e,t),o=new Set,i=n.map(I=\u003e{const C=jkt(I);if(o.has(C.pcbGroupId))throw new Error(`Duplicate automatic breakout region \"${C.pcbGroupId}\"`);return o.add(C.pcbGroupId),C}),{regions:r,horizontalPlacement:s}=Iko(i),a=new Set;for(const I of r)for(const C of I.endpointBySourceTraceId.keys())a.add(C);const A=t.root.db.source_trace.list().filter(I=\u003eI.subcircuit_id===e.getSubcircuit().subcircuit_id),c=new Map;for(const I of A){if(c.has(I.source_trace_id))throw new Error(`Duplicate connection identity \"${I.source_trace_id}\"`);c.set(I.source_trace_id,I)}const l=[...a].sort((I,C)=\u003e{const y=c.get(I)?.name??I,x=c.get(C)?.name??C,E=y.localeCompare(x);return E!==0?E:I.localeCompare(C)});for(const I of l){if(!c.has(I))throw new Error(`Unknown connection identity \"${I}\"`);for(const C of r)if(!C.endpointBySourceTraceId.has(I))throw new Error(`Connection \"${I}\" is missing endpoint for region \"${C.pcbGroupId}\"`)}const u=xko({routingScope:e,sourceTraces:A,coordinatedSourceTraceIds:a,availableLayers:bko({routingScope:e,automaticBreakouts:n})}),g=new Map;for(const I of l)g.set(I,r.map(C=\u003eC.endpointBySourceTraceId.get(I)));const h=new Map;for(const I of Eko({routingScope:e,sourceTraces:A})){const C=a.has(I.positiveSourceTraceId),y=a.has(I.negativeSourceTraceId);if(C!==y)throw new Error(`Differential pair \"${I.differentialPair.name}\" is missing one coordinated member`);if(C){if(h.has(I.positiveSourceTraceId)||h.has(I.negativeSourceTraceId))throw new Error(\"A connection belongs to multiple differential pairs\");h.set(I.positiveSourceTraceId,I),h.set(I.negativeSourceTraceId,I)}}const d=[],p=new Set;for(const I of l){const C=h.get(I);if(!C){d.push({connectionId:I,endpoints:g.get(I)});continue}p.has(C.differentialPair)||(p.add(C.differentialPair),d.push({type:\"differential\",connections:[{connectionId:C.positiveSourceTraceId,endpoints:g.get(C.positiveSourceTraceId)},{connectionId:C.negativeSourceTraceId,endpoints:g.get(C.negativeSourceTraceId)}]}))}const m=new Map,_=r.length===1?yko({region:r[0],sourceTraces:A}):void 0;return{input:{regions:r.map((I,C)=\u003e(m.set(I.pcbGroupId,I.sourcePortIdBySourceTraceId),{regionId:I.pcbGroupId,bounds:I.bounds,edge:Cko({region:I,regionIndex:C,regions:r,horizontalPlacement:s,singleRegionPreferredEdge:_})})),connections:d,buses:u,boundaryPointSpacing:Bko(t)},sourcePortIdByConnectionIdByRegionId:m}},$kt=new WeakMap,Qko=(t,e)=\u003e{const n=Sko(t),o=e(n.input);if(o instanceof Promise)throw new Error(\"Implicit breakout point solvers must return synchronously during PCB layout\");let i=0;for(const a of n.input.connections){if(\"type\"in a){i+=a.connections.length;continue}i+=1}const r=new Map,s=new Set;for(const a of n.input.regions)r.set(a.regionId,[]);for(const a of o.breakoutPoints){const A=r.get(a.regionId);if(!A)throw new Error(`Implicit breakout point solver returned unknown region \"${a.regionId}\"`);const c=`${a.regionId}:${a.connectionId}`;if(s.has(c))throw new Error(`Implicit breakout point solver returned duplicate endpoint for connection \"${a.connectionId}\" in region \"${a.regionId}\"`);s.add(c);const l=n.sourcePortIdByConnectionIdByRegionId.get(a.regionId)?.get(a.connectionId);if(!l)throw new Error(`Implicit breakout point solver returned unknown connection \"${a.connectionId}\" for region \"${a.regionId}\"`);A.push({sourcePortId:l,sourceTraceId:a.connectionId,layer:a.layer,x:a.x,y:a.y})}for(const[a,A]of r)if(A.length!==i)throw new Error(`Implicit breakout point solver output is missing endpoints for region \"${a}\"`);return{breakoutPointsByRegionId:r}},vko=(t,e)=\u003e{const n=t.parent;if(!n||!t.pcb_group_id)throw new Error(`Automatic breakout \"${t.name}\" has no coordinated PCB region`);let o=$kt.get(n);(!o||o.solverFn!==e)\u0026\u0026(o={solverFn:e,solutions:[]},$kt.set(n,o));let i=o.solutions.find(s=\u003es.breakoutPointsByRegionId.has(t.pcb_group_id));i||(i=Qko(t,e),o.solutions.push(i));const r=i.breakoutPointsByRegionId.get(t.pcb_group_id);if(!r)throw new Error(`Automatic breakout \"${t.name}\" references unknown implicit-breakout region \"${t.pcb_group_id}\"`);return r},JMe=class extends A6{get isRoutingDirective(){return!0}get config(){return{...super.config,zodProps:Ewn}}doInitialCreateAutoplacedBreakoutPoints(){for(const s of this._parsedProps.pcbTracePaths??[]){const a=s.route.at(-1),A=new zTt({connection:s.connection,pcbX:a.x,pcbY:a.y});if(A.exitLayer=a.route_type===\"wire\"?a.layer:a.to_layer,this.add(A),A._matchConnection(),!A.matchedPort||!this.selectAll(\"port\").includes(A.matchedPort))throw new Error(`Fanout trace path \"${s.connection}\" must select a port inside the fanout`);if(this.children.some(l=\u003e!(l instanceof dR)||l===A?!1:(l._matchConnection(),l.matchedPort===A.matchedPort)))throw new Error(`Duplicate fanout exit for \"${s.connection}\"`)}const t=this.selectAll(\"port\"),e=new Set(t),n=this.children.filter(s=\u003es instanceof dR),o=new Set(n.map(s=\u003e(s._matchConnection(),s.matchedPort)).filter(Boolean)),i=this.getSubcircuit().selectAll(\"trace\"),r=new Set;for(const s of i){const a=s._findConnectedPorts();if(!(!a.allPortsFound||!a.ports))for(const A of a.ports){const c=e.has(A),l=a.ports.some(g=\u003e!e.has(g));if(!c||!l||o.has(A)||r.has(A))continue;r.add(A);const u=new Kue({});u.matchedPort=A,u.matchedSourceTraceId=s.source_trace_id,this.add(u)}}}doInitialPcbAutoplaceBreakoutPoints(){if(this.root?.pcbDisabled)return;const t=this.props.autorouter,e=t===void 0?this.parent?.getInheritedProperty(\"autorouter\"):void 0,n=typeof t==\"object\"?t.implicitBreakoutPointSolverFn:typeof e==\"object\"?e.implicitBreakoutPointSolverFn:void 0,o=this.children.filter(c=\u003ec instanceof Kue);if(o.length===0||!this.root||!this.pcb_group_id)return;const i=this.root.db.pcb_group.get(this.pcb_group_id);if(!i?.width||!i.height)return;const r={minX:i.center.x-i.width/2,maxX:i.center.x+i.width/2,minY:i.center.y-i.height/2,maxY:i.center.y+i.height/2};let s;try{s=vko(this,n??hko)}catch(c){if(n||!mko(this,c))throw c;return}const a=1e-4,A=(c,l)=\u003e({x:Math.max(r.minX+a,Math.min(r.maxX-a,c)),y:Math.max(r.minY+a,Math.min(r.maxY-a,l))});for(const c of s){const l=o.find(u=\u003eu.matchedPort?.source_port_id===c.sourcePortId);if(l){const u=A(c.x,c.y);l._applySolvedBreakoutPoint({sourceTraceId:c.sourceTraceId,layer:c.layer,position:u})}}}doInitialPcbPrimitiveRender(){super.doInitialPcbPrimitiveRender()}doInitialPcbPlacementDesignRuleChecks(){pko(this)}},wko=class extends Ir{pcb_silkscreen_graphic_id=null;pcb_silkscreen_graphic_ids=[];pcb_silkscreen_path_ids=[];isPcbPrimitive=!0;get config(){return{componentName:\"SilkscreenGraphic\",zodProps:CDn}}doInitialPcbPrimitiveRender(){this.root?.pcbDisabled||this._queueAsyncEffect(\"SilkscreenGraphicRender\",async()=\u003e{if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??\"top\");if(o!==\"top\"\u0026\u0026o!==\"bottom\")throw new Error(`Invalid layer \"${o}\" for SilkscreenGraphic. Must be \"top\" or \"bottom\".`);const i=await xPt(e.imageUrl);if(i.mimetype!==Eb\u0026\u0026i.mimetype!==yPt)throw new Error(`Unsupported imageUrl for SilkscreenGraphic: \"${e.imageUrl}\". Expected an SVG or PNG image.`);const r={project_relative_path:i.projectRelativePath,url:i.dataUrl,mimetype:i.mimetype},s=i.mimetype===Eb?eBo({svg:i.text,width:e.width,height:e.height,transform:this._computePcbGlobalTransformBeforeLayout()}):[this.getPlacementBoxBRepShape()],a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??\"\";for(const A of s){const c=t.insert({type:\"pcb_silkscreen_graphic\",pcb_component_id:a,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,layer:o,shape:\"brep\",brep_shape:A,image_asset:r});this.pcb_silkscreen_graphic_ids.push(c.pcb_silkscreen_graphic_id)}this.pcb_silkscreen_graphic_id=this.pcb_silkscreen_graphic_ids[0]??null,i.mimetype===Eb\u0026\u0026this.insertRenderableSilkscreenPaths(i.text,o)})}insertRenderableSilkscreenPaths(t,e){const{db:n}=this.root,{_parsedProps:o}=this,i=this._computePcbGlobalTransformBeforeLayout(),r=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??\"\";for(const s of EPt({svg:t,width:o.width,height:o.height,transform:i})){if(s.length\u003c2)continue;const a=n.pcb_silkscreen_path.insert({pcb_component_id:r,layer:e,route:s,stroke_width:Math.max(Math.min(o.width,o.height)/60,.05),subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_silkscreen_path_ids.push(a.pcb_silkscreen_path_id)}}getPcbSize(){const{_parsedProps:t}=this;return{width:t.width,height:t.height}}getPlacementBoxBRepShape(){const{_parsedProps:t}=this,e=t.width/2,n=t.height/2,o=this._computePcbGlobalTransformBeforeLayout();return{outer_ring:{vertices:BPt([{x:-e,y:n},{x:e,y:n},{x:e,y:-n},{x:-e,y:-n}]).map(i=\u003ets(o,i))},inner_rings:[]}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root,o=i=\u003e({...i,x:i.x+t,y:i.y+e});for(const i of this.pcb_silkscreen_graphic_ids){const r=n.pcb_silkscreen_graphic.get(i);r\u0026\u0026n.pcb_silkscreen_graphic.update(i,{brep_shape:{outer_ring:{vertices:r.brep_shape.outer_ring.vertices.map(o)},inner_rings:r.brep_shape.inner_rings.map(s=\u003e({vertices:s.vertices.map(o)}))}})}for(const i of this.pcb_silkscreen_path_ids){const r=n.pcb_silkscreen_path.get(i);r\u0026\u0026n.pcb_silkscreen_path.update(i,{route:r.route.map(s=\u003e({...s,x:s.x+t,y:s.y+e}))})}}},Pko=class extends Ir{pcb_smtpad_id=null;isPcbPrimitive=!0;get config(){return{componentName:\"Fiducial\",zodProps:llt,sourceFtype:\"simple_fiducial\"}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,r=t.pcb_smtpad.insert({pcb_component_id:i,layer:o(e.layer||\"top\"),shape:\"circle\",x:n.x,y:n.y,radius:lt.parse(e.padDiameter)/2,soldermask_margin:e.soldermaskPullback?lt.parse(e.soldermaskPullback):lt.parse(e.padDiameter)/2,is_covered_with_solder_mask:!0});this.pcb_smtpad_id=r.pcb_smtpad_id}getPcbSize(){const{_parsedProps:t}=this,e=lt.parse(t.padDiameter);return{width:e,height:e}}_setPositionFromLayout(t){if(!this.pcb_smtpad_id)return;const{db:e}=this.root;e.pcb_smtpad.update(this.pcb_smtpad_id,{x:t.x,y:t.y})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_smtpad_id)return;const o=n.pcb_smtpad.get(this.pcb_smtpad_id);o\u0026\u0026(o.shape===\"rect\"||o.shape===\"circle\"||o.shape===\"rotated_rect\"||o.shape===\"pill\"?this._setPositionFromLayout({x:o.x+t,y:o.y+e}):o.shape===\"polygon\"\u0026\u0026n.pcb_smtpad.update(this.pcb_smtpad_id,{points:o.points.map(i=\u003e({x:i.x+t,y:i.y+e}))}))}},qkt=class extends Ir{isAssemblyDeviceContainer=!0;get config(){return{componentName:\"AssemblyDevice\",zodProps:mvn}}doInitialAssignNameToUnnamedComponents(){}computeSchematicGlobalTransform(){return hC()}_computePcbGlobalTransformBeforeLayout(){return hC()}},Mko=({cad:t,authoredModel:e})=\u003e{const n=t.model_bounds??e?.modelBounds,o=t.model_origin_position??e?.modelOriginPosition;if(!n?.min||!n?.max||!o)return;const i=t.model_board_normal_direction??e?.modelBoardNormalDirection??\"z+\",r=i[0];if(r!==\"x\"\u0026\u0026r!==\"y\"\u0026\u0026r!==\"z\")return;const s=n.min[r],a=n.max[r],A=o[r];if(s===void 0||a===void 0||A===void 0)return;const c=i.endsWith(\"-\")?A-s:a-A;return Number.isFinite(c)\u0026\u0026c\u003e=0?c:void 0},Dko=({owner:t,pcbComponent:e,cadComponent:n,boardSurfaceZ:o})=\u003e{const i=t?._parsedProps?.cadModel,r=i\u0026\u0026typeof i==\"object\"?i:void 0,s=n?.size??r?.size,a=s?.x,A=s?.y,c=s?.z,l=n?Mko({cad:n,authoredModel:r}):void 0,u=n?.position?.z,g=l!==void 0\u0026\u0026u!==void 0?l+Math.abs(u-o):void 0;return{size:a!==void 0\u0026\u0026A!==void 0?{x:a,y:A,z:c}:void 0,aboveBoardHeight:g,rotation:n?.rotation?.z??e.rotation??0,footprint:{width:e.width,height:e.height}}},Nko=({point:t,board:e})=\u003e{const n=(e.width??0)/2,o=(e.height??0)/2,i=[[\"x_neg\",Math.abs(t.x-(e.center.x-n))],[\"x_pos\",Math.abs(t.x-(e.center.x+n))],[\"y_neg\",Math.abs(t.y-(e.center.y-o))],[\"y_pos\",Math.abs(t.y-(e.center.y+o))]];return i.sort((r,s)=\u003er[1]-s[1]),i[0][0]},Rko=t=\u003et,Tko={from_top:\"y_pos\",from_bottom:\"y_neg\",from_left:\"x_neg\",from_right:\"x_pos\"},kko=(t,{board:e,pcbBoard:n})=\u003e{let o=t.parent;for(;o\u0026\u0026o!==e\u0026\u0026!o.pcb_component_id;)o=o.parent;const i=o?.pcb_component_id?t.root?.db.pcb_component.get(o.pcb_component_id):null;if(!i)throw new Error(\"\u003cenclosure.cutoutaperture /\u003e must be nested inside a component with a PCB footprint\");const r=t._parsedProps,a=o?._getEnclosureApertureAxisDirection?.(i.layer,i.rotation??0),A=a?a.z!==0?a.z\u003e0?\"from_above\":\"from_below\":Math.abs(a.x)\u003e=Math.abs(a.y)?a.x\u003e=0?\"from_right\":\"from_left\":a.y\u003e=0?\"from_top\":\"from_bottom\":i.insertion_direction,c=A===\"from_above\"?\"z_pos\":A===\"from_below\"?\"z_neg\":void 0,l=i.layer===\"bottom\"?\"bottom\":\"top\";let u,g;if(c)u=c,g={x:i.center.x-n.center.x,y:i.center.y-n.center.y};else{const _=i.cable_insertion_center??i.center,f=Tko[A]??Nko({point:_,board:n}),I=i.cable_insertion_center?{x:i.cable_insertion_center.x-i.center.x,y:i.cable_insertion_center.y-i.center.y}:null,C=I!=null\u0026\u0026(f===\"x_neg\"||f===\"x_pos\"?Math.abs(I.x)\u003e=Math.abs(I.y):Math.abs(I.y)\u003e=Math.abs(I.x)),y=a?i.center:C?_:i.center;u=Rko(f),g={x:y.x-n.center.x,y:y.y-n.center.y}}const h=t.root?.db.cad_component.getWhere({pcb_component_id:i.pcb_component_id})??null,d=(l===\"bottom\"?-1:1)*((n.thickness??e.boardThickness)/2),p=Dko({owner:o,pcbComponent:i,cadComponent:h,boardSurfaceZ:d}),m={face:u,center:g,boardSide:l,apertureAxisDirection:a,rotation:i.rotation??void 0,depth:r.depth,componentBody:p,widthDimensionOffset:r.widthDimensionOffset,heightDimensionOffset:r.heightDimensionOffset,margin:r.margin};switch(r.shape){case\"pill\":case\"rect\":return{...m,shape:r.shape,width:r.width,height:r.height};case\"circle\":return{...m,shape:\"circle\",radius:r.radius}}},WMe=class extends Ir{get config(){return{componentName:\"EnclosureCutoutAperture\",zodProps:fvn}}getFdmEnclosureSolverInput(t){return kko(this,t)}},Xkt=(t,e)=\u003e{const n=t.root?.firstChild,o=n?poe(e,n,{adapter:S0e}):null,i=o instanceof wB?o:[n,...n?.getDescendants()??[]].find(r=\u003er instanceof wB\u0026\u0026r.isMatchingNameOrAlias(e));if(!(i instanceof wB))throw new Error(`Could not find a \u003cboard /\u003e matching enclosure boardRef \"${e}\"`);return i},Fko=t=\u003e{const e=t.root;if(!e||e.pcbDisabled||!t.source_component_id||!t.pcb_component_id)return;const{db:n}=e,o=t._parsedProps,i=Xkt(t,o.boardRef),r=i.pcb_board_id?n.pcb_board.get(i.pcb_board_id):null;if(!r?.width||!r.height)throw new Error(`Could not resolve dimensions for boardRef \"${o.boardRef}\"`);const s=r.thickness??i.boardThickness,a={board:{width:r.width,height:r.height,thickness:s},width:o.width,height:o.height,depth:o.depth,wallThickness:o.wallThickness,floorThickness:o.floorThickness,lidThickness:o.lidThickness,boardClearance:o.boardClearance,standoffHeight:o.standoffHeight,topHeadroom:o.topHeadroom,lidLipDepth:o.lidLipDepth,apertures:o.disableCutouts?[]:i.getDescendants().filter(h=\u003eh instanceof WMe).map(h=\u003eh.getFdmEnclosureSolverInput({board:i,pcbBoard:r}))},A=new Vbt(a),c=A.getConstructorParams();if(e.emit(\"solver:started\",{type:\"solver:started\",solverName:\"CreateFdmEnclosureSolver\",solverParams:c[0],solverConstructorArgs:c,componentName:t.getString()}),A.solve(),A.failed)throw new Error(A.error??\"Failed to create FDM enclosure\");const l=A.getOutput();n.pcb_component.update(t.pcb_component_id,{center:r.center,width:l.dimensions.width,height:l.dimensions.height});const u={x:r.center.x,y:r.center.y,z:-s/2-l.dimensions.floorThickness-l.dimensions.standoffHeight},g=l.parts.map(h=\u003en.cad_component.insert({position:u,rotation:{x:0,y:0,z:0},pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,model_jscad:h.jscadPlan,model_unit_to_mm_scale_factor:1,model_object_fit:\"contain_within_bounds\",model_origin_alignment:\"bottom_center_of_component\",anchor_alignment:\"center\",show_as_translucent_model:!1,show_hidden_edges:o.showHiddenEdges}));t.cad_component_id=g[0]?.cad_component_id??null},Zkt=class p4n extends Ir{get config(){return{componentName:\"EnclosureFdmBox\",zodProps:Ivn}}doInitialAssignNameToUnnamedComponents(){if(this._parsedProps.name)return;let e=this;for(;e.parent instanceof Ir;)e=e.parent;const o=[e,...e.getDescendants()].filter(i=\u003ei instanceof p4n).indexOf(this);this.fallbackUnassignedName=`unnamed_enclosure_fdm_box_${o===-1?0:o+1}`}doInitialSourceRender(){const e=this.root.db.source_component.insert({ftype:\"simple_chip\",name:this.name});this.source_component_id=e.source_component_id}doInitialPcbComponentRender(){const e=this.root;if(!e||e.pcbDisabled||!this.source_component_id)return;const n=Xkt(this,this._parsedProps.boardRef),i=(n.pcb_board_id?e.db.pcb_board.get(n.pcb_board_id):null)?.center??n._getGlobalPcbPositionBeforeLayout(),r=e.db.pcb_component.insert({center:i,width:0,height:0,layer:\"top\",rotation:0,source_component_id:this.source_component_id,obstructs_within_bounds:!1,do_not_place:!0,is_allowed_to_be_off_board:!0});this.pcb_component_id=r.pcb_component_id}doInitialCadModelRender(){Fko(this)}},Lko=class extends g0{get config(){return{componentName:\"Battery\",schematicSymbolName:this.props.symbolName??\"battery\",zodProps:TPn,sourceFtype:\"simple_power_source\"}}initPorts(){super.initPorts({additionalAliases:{pin1:[\"anode\",\"pos\",\"left\"],pin2:[\"cathode\",\"neg\",\"right\"]}})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({name:this.name,ftype:\"simple_power_source\",capacity:e.capacity,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}},Hko=class extends g0{_getPcbRotationBeforeLayout(){const e=this.props.pcbOrientation===\"vertical\"?-90:0;return(super._getPcbRotationBeforeLayout()??0)+e}get config(){return{componentName:\"PinHeader\",zodProps:LPn,shouldRenderAsSchematicBox:!0}}_getImpliedFootprintString(){const e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:0),n=this._parsedProps.holeDiameter,o=this._parsedProps.platedDiameter,i=this._parsedProps.pitch,r=this._parsedProps.showSilkscreenPinLabels,s=this._parsedProps.doubleRow?2:1,a=this._parsedProps.gender;if(e\u003e0){let A;if(i)!n\u0026\u0026!o?A=`pinrow${e}_p${i}`:A=`pinrow${e}_p${i}_id${n}_od${o}`;else if(!n\u0026\u0026!o)A=`pinrow${e}`;else return null;return r!==!0\u0026\u0026(A+=\"_nopinlabels\"),a===\"female\"\u0026\u0026(A+=\"_female\"),s\u003e1\u0026\u0026(A+=`_rows${s}`),A}return null}initPorts(){const e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:1);for(let n=1;n\u003c=e;n++){const o=Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels[n-1]:this._parsedProps.pinLabels?.[`pin${n}`];if(o){const i=Array.isArray(o)?o[0]:o,r=Array.isArray(o)?o.slice(1):[];this.add(new Pu({pinNumber:n,name:i,aliases:[`pin${n}`,...r]}))}else this.add(new Pu({pinNumber:n,name:`pin${n}`}))}}_getSchematicPortArrangement(){const e=this._parsedProps.pinCount??1,n=this._parsedProps.schFacingDirection??this._parsedProps.facingDirection??\"right\",o=this._parsedProps.schPinArrangement,i=Array.from({length:e},(r,s)=\u003e`pin${s+1}`);return n===\"left\"?{leftSide:{direction:o?.leftSide?.direction??\"top-to-bottom\",pins:o?.leftSide?.pins??i}}:n===\"up\"?{topSide:{direction:o?.topSide?.direction??\"left-to-right\",pins:o?.topSide?.pins??i}}:n===\"down\"?{bottomSide:{direction:o?.bottomSide?.direction??\"left-to-right\",pins:o?.bottomSide?.pins??i}}:{rightSide:{direction:o?.rightSide?.direction??\"top-to-bottom\",pins:o?.rightSide?.pins??i}}}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({ftype:\"simple_pin_header\",name:this.name,supplier_part_numbers:n.supplierPartNumbers,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,pin_count:n.pinCount,gender:n.gender,are_pins_interchangeable:!0,display_name:n.displayName});this.source_component_id=o.source_component_id}};function Oko(t){switch(t){case\"two_ground_pins\":return\"crystal_4pin\";case\"ground_pin\":return\"resonator\";case\"no_ground\":return\"crystal\";default:return\"crystal\"}}var Gko=class extends g0{get config(){return{componentName:\"Resonator\",schematicSymbolName:this.props.symbolName??Oko(this.props.pinVariant),zodProps:jwn,shouldRenderAsSchematicBox:!1}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=e.pinVariant||\"no_ground\",o=t.source_component.insert({ftype:\"simple_resonator\",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,frequency:e.frequency,load_capacitance:e.loadCapacitance,supplier_part_numbers:e.supplierPartNumbers,pin_variant:n,are_pins_interchangeable:n===\"no_ground\"||n===\"ground_pin\",display_name:e.displayName});this.source_component_id=o.source_component_id}_getSchematicSymbolDisplayValue(){const t=`${H_(this._parsedProps.frequency)}Hz`;return this._parsedProps.loadCapacitance?`${t} / ${H_(this._parsedProps.loadCapacitance)}F`:t}};function Yko(t){switch(t){case\"three_pin\":return\"potentiometer3\";case\"two_pin\":return\"potentiometer2\";default:return\"potentiometer2\"}}var Uko=class extends g0{get config(){return{componentName:\"Potentiometer\",schematicSymbolName:this.props.symbolName??Yko(this.props.pinVariant),zodProps:zwn,shouldRenderAsSchematicBox:!1}}_getSchematicSymbolDisplayValue(){return`${H_(this._parsedProps.maxResistance)}Ω`}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=n.pinVariant||\"two_pin\",i=e.source_component.insert({ftype:\"simple_potentiometer\",name:this.name,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,max_resistance:n.maxResistance,pin_variant:o,are_pins_interchangeable:o===\"two_pin\",display_name:n.displayName,display_max_resistance:this._getSchematicSymbolDisplayValue()});this.source_component_id=i.source_component_id}},Kko=10,eFt=0,Vko=class extends g0{get config(){return{schematicSymbolName:this.props.symbolName??(this.props.pinVariant===\"four_pin\"?\"crystal_4pin\":\"crystal\"),componentName:\"Crystal\",zodProps:Wwn,sourceFtype:\"simple_crystal\"}}initPorts(){const e=this.props.pinVariant===\"four_pin\"?{pin1:[\"left1\",\"1\",\"X1\"],pin2:[\"top1\",\"2\",\"gnd1\"],pin3:[\"right1\",\"3\",\"X2\"],pin4:[\"bottom1\",\"4\",\"gnd2\"]}:{pin1:[\"pos\",\"left\",\"X1\"],pin2:[\"neg\",\"right\",\"X2\"]};super.initPorts({additionalAliases:e})}_getSchematicSymbolDisplayValue(){const e=`${H_(this._parsedProps.frequency)}Hz`;return this._parsedProps.loadCapacitance?`${e} / ${H_(this._parsedProps.loadCapacitance)}F`:e}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({name:this.name,ftype:\"simple_crystal\",manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,frequency:n.frequency,load_capacitance:n.loadCapacitance,pin_variant:n.pinVariant||\"two_pin\",are_pins_interchangeable:(n.pinVariant||\"two_pin\")===\"two_pin\",display_name:n.displayName});this.source_component_id=o.source_component_id}doInitialSourceDesignRuleChecks(){if(super.doInitialSourceDesignRuleChecks(),!this.source_component_id)return;const{db:e}=this.root,n=this._parsedProps.maxTraceLength??Kko,o=new Set,i=new Set;for(const r of[this.portMap.X1,this.portMap.X2]){if(!r.source_port_id)continue;const s=e.source_port.get(r.source_port_id);s\u0026\u0026(o.add(r.source_port_id),s.subcircuit_connectivity_map_key\u0026\u0026i.add(s.subcircuit_connectivity_map_key))}for(const r of e.source_trace.list()){const s=r.connected_source_port_ids.some(l=\u003eo.has(l)),a=r.subcircuit_connectivity_map_key!==void 0\u0026\u0026i.has(r.subcircuit_connectivity_map_key);if(!s\u0026\u0026!a)continue;const A=typeof r.max_length!=\"number\"||r.max_length\u003en,c=r.max_via_count!==eFt;!A\u0026\u0026!c||e.source_trace.update(r.source_trace_id,{...A?{max_length:n}:{},...c?{max_via_count:eFt}:{}})}}},zko=class extends g0{getSchematicSymbolName(){return this.props.symbolName?this.props.symbolName:this.props.connections?.positive_supply||this.props.connections?.negative_supply?\"opamp_with_power\":\"opamp_no_power\"}get config(){return{componentName:\"OpAmp\",schematicSymbolName:this.getSchematicSymbolName(),zodProps:uMn,sourceFtype:\"simple_op_amp\"}}initPorts(){const t={pin1:[\"non_inverting_input\"],pin2:[\"inverting_input\"]};this.getSchematicSymbolName()===\"opamp_with_power\"?Object.assign(t,{pin4:[\"output\"],pin5:[\"positive_supply\",\"vcc\",\"vdd\"],pin3:[\"negative_supply\",\"vee\",\"vss\",\"gnd\"]}):Object.assign(t,{pin3:[\"output\"],pin4:[\"positive_supply\",\"vcc\",\"vdd\"],pin5:[\"negative_supply\",\"vee\",\"vss\",\"gnd\"]}),super.initPorts({pinCount:5,additionalAliases:t})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:\"simple_op_amp\",name:this.name,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,e=this.portMap.inverting_input,n=this.portMap.non_inverting_input,o=this.portMap.output,i=this.portMap.positive_supply,r=this.portMap.negative_supply;!e?.source_port_id||!n?.source_port_id||!o?.source_port_id||!i?.source_port_id||!r?.source_port_id||t.simulation_op_amp.insert({type:\"simulation_op_amp\",source_component_id:this.source_component_id,inverting_input_source_port_id:e.source_port_id,non_inverting_input_source_port_id:n.source_port_id,output_source_port_id:o.source_port_id,positive_supply_source_port_id:i.source_port_id,negative_supply_source_port_id:r.source_port_id})}inverting_input=this.portMap.inverting_input;non_inverting_input=this.portMap.non_inverting_input;output=this.portMap.output;positive_supply=this.portMap.positive_supply;negative_supply=this.portMap.negative_supply},jMe={HOLE_DIAMETER:.5,SMT_CIRCLE_DIAMETER:1.2,SMT_RECT_SIZE:2},Jko=class extends g0{get config(){return{componentName:\"TestPoint\",schematicSymbolName:this.props.symbolName??\"testpoint\",zodProps:vMn,sourceFtype:$7.simple_test_point}}_getPropsWithDefaults(){let{padShape:t,holeDiameter:e,footprintVariant:n,padDiameter:o,width:i,height:r}=this._parsedProps;return!n\u0026\u0026e\u0026\u0026(n=\"through_hole\"),n??=\"through_hole\",t??=\"circle\",n===\"pad\"?t===\"circle\"?o??=jMe.SMT_CIRCLE_DIAMETER:t===\"rect\"\u0026\u0026(i??=jMe.SMT_RECT_SIZE,r??=i):n===\"through_hole\"\u0026\u0026(e??=jMe.HOLE_DIAMETER),{padShape:t,holeDiameter:e,footprintVariant:n,padDiameter:o,width:i,height:r}}_getImpliedFootprintString(){const{padShape:t,holeDiameter:e,footprintVariant:n,padDiameter:o,width:i,height:r}=this._getPropsWithDefaults();if(n===\"through_hole\")return`platedhole_d${e}`;if(n===\"pad\"){if(t===\"circle\")return`smtpad_circle_d${o}`;if(t===\"rect\")return`smtpad_rect_w${i}_h${r}`}throw new Error(`Footprint variant \"${n}\" with pad shape \"${t}\" not implemented`)}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,{padShape:n,holeDiameter:o,footprintVariant:i,padDiameter:r,width:s,height:a}=this._getPropsWithDefaults(),A=t.source_component.insert({ftype:$7.simple_test_point,name:this.name,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,footprint_variant:i,pad_shape:n,pad_diameter:r,hole_diameter:o,width:s,height:a,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=A.source_component_id}},Wko=t=\u003e{if(t.root?.schematicDisabled||t.getCollapsedSchematicBoxAncestor())return;const{db:e}=t.root,n=t._getSchematicSymbolNameOrThrow(),o=Su[n];if(!o)throw new Error(`No schematic symbol found for \"${n}\"`);const i=t._getGlobalSchematicPositionBeforeLayout(),r=t._resolveSchematicSheetId(),s=t.getSubcircuit().subcircuit_id??void 0,a=e.schematic_component.insert({center:i,size:{...o.size},is_box_with_pins:!0,symbol_name:n,source_component_id:t.source_component_id??void 0,schematic_sheet_id:r});t.schematic_component_id=a.schematic_component_id;for(const A of o.ports){const c=t.getPortForSymbolPort(A);if(!c?.source_port_id)throw new Error(`Missing source port for schematic symbol port \"${A.labels.join(\"/\")}\" on ${t.getString()}`);const l={x:i.x+A.x-o.center.x,y:i.y+A.y-o.center.y},u=e.schematic_port.insert({schematic_component_id:a.schematic_component_id,center:l,source_port_id:c.source_port_id,facing_direction:IMt(i,l),distance_from_component_edge:.4,pin_number:c._parsedProps.pinNumber,display_pin_label:c._parsedProps.aliases?.[0],is_connected:!1,schematic_sheet_id:r,subcircuit_id:s});c.schematic_port_id=u.schematic_port_id}},jko=(t,e)=\u003e{const n=Array.isArray(e)?e:[e];if(n.length!==1)throw new Error(`SchematicSymbol connection \"${t}\" must select exactly one physical port`);return n[0]},$ko=t=\u003e{const{db:e}=t.root,{chipRef:n,connections:o}=t._parsedProps;if(n\u0026\u0026!o){e.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:\"chipRef\",message:`${t.getString()} has chipRef \"${n}\" without connections. chipRef will be ignored.`,error_type:\"source_property_ignored_warning\",subcircuit_id:t.getSubcircuit().subcircuit_id??void 0});return}if(o\u0026\u0026!n){e.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:\"connections\",message:`${t.getString()} has connections without chipRef. connections will be ignored.`,error_type:\"source_property_ignored_warning\",subcircuit_id:t.getSubcircuit().subcircuit_id??void 0});return}if(!n||!o)return;const i=t.getSubcircuit().selectOne(n);if(!i?.source_component_id)throw new Error(`Could not resolve chipRef \"${n}\" for ${t.getString()}`);const r=new Set;for(const a of t.ports){const A=a.schematicSymbolPortDef,c=Object.entries(o).filter(([p])=\u003ea.isMatchingAnyOf([p]));if(c.length===0)throw new Error(`${t.getString()} is missing an explicit connection for symbol port \"${A.labels.join(\"/\")}\"`);if(c.length\u003e1)throw new Error(`${t.getString()} has multiple connections for symbol port \"${A.labels.join(\"/\")}\"`);const[l,u]=c[0];r.add(l);const g=jko(l,u),h=t.getSubcircuit().selectOne(g,{type:\"port\"});if(!h?.source_port_id)throw new Error(`Could not resolve connection \"${l}\" target \"${g}\" for ${t.getString()}`);if(e.source_port.get(h.source_port_id)?.source_component_id!==i.source_component_id)throw new Error(`Connection \"${l}\" target \"${g}\" does not belong to chipRef \"${n}\"`);a.source_port_id=h.source_port_id,a.source_component_id=h.source_component_id}const s=Object.keys(o).filter(a=\u003e!r.has(a));if(s.length\u003e0)throw new Error(`${t.getString()} has connections that do not match symbol ports: ${s.join(\", \")}`)},qko=class extends Ir{isSchematicPrimitive=!0;isPrimitiveContainer=!0;get config(){return{componentName:\"SchematicSymbol\",schematicSymbolName:this.props.symbolName,zodProps:eDn}}initPorts(){const t=Su[this._getSchematicSymbolNameOrThrow()],e=!(this._parsedProps.chipRef\u0026\u0026this._parsedProps.connections);for(const n of t.ports){const o=H0e(n.labels);if(!o)throw new Error(`Schematic symbol port must have a numeric pin label: ${n.labels.join(\"/\")}`);const i=this.ports.find(a=\u003ea._parsedProps.pinNumber===o);if(i){i.schematicSymbolPortDef=n;continue}const r=n.labels.filter(a=\u003ea!==o.toString()\u0026\u0026a!==`pin${o}`),s=new Pu({pinNumber:o,aliases:r},{shouldCreateSourcePort:e});s.schematicSymbolPortDef=n,this.add(s)}}doInitialInitializePortsFromChildren(){this.initPorts()}updateInitializePortsFromChildren(){this.initPorts()}get ports(){return this.children.filter(t=\u003et instanceof Pu)}getPortForSymbolPort(t){return this.ports.find(e=\u003ee.schematicSymbolPortDef===t)??null}doInitialSourceRender(){const t=this.root.db.source_component.insert({ftype:\"simple_chip\",name:this.name,display_name:this._parsedProps.displayName,are_pins_interchangeable:!1});this.source_component_id=t.source_component_id}doInitialPortMatching(){$ko(this)}doInitialSchematicComponentRender(){Wko(this)}},Xko=class m4n extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:\"SchematicSection\",zodProps:lDn}}_computeSectionBounds(e,n,o){const{db:i}=this.root,r=e.getDescendants().filter(a=\u003ea.getSchematicSectionName()===n);if(r.length===0)return null;const s=[];for(const a of r){const A=a.schematic_component_id;if(!A)continue;const c=i.schematic_component.get(A);if(!c||c.schematic_sheet_id!==o)continue;const l=c.size.width/2,u=c.size.height/2;s.push({minX:c.center.x-l,maxX:c.center.x+l,minY:c.center.y-u,maxY:c.center.y+u});for(const g of i.schematic_text.list({schematic_component_id:A}))s.push(cTt({text:g.text,position:g.position,anchor:g.anchor,fontSize:g.font_size}))}return s.length===0?null:Dwe(s)}doInitialSchematicSectionRender(){if(this.root?.schematicDisabled)return;const e=this.root?._getBoard();if(!e)return;const n=this._resolveSchematicSheetId(),o=e.getDescendants().filter(_=\u003e_ instanceof m4n\u0026\u0026_._resolveSchematicSheetId()===n);if(o[0]!==this)return;const{db:i}=this.root,r=.5,s=.2,a=.02,A=.001,c=o.map(_=\u003e{const f=_._computeSectionBounds(e,_._parsedProps.name,n);return f?{displayName:_._parsedProps.displayName,sectionTitleFontSize:_._parsedProps.sectionTitleFontSize,rawBounds:f,cell:{minX:f.minX-r,maxX:f.maxX+r,minY:f.minY-r,maxY:f.maxY+r}}:null}).filter(_=\u003e_!==null),l=this._computeSectionBounds(e,null,n),u=[...c];if(l\u0026\u0026u.push({displayName:void 0,sectionTitleFontSize:void 0,rawBounds:l,cell:{minX:l.minX-r,maxX:l.maxX+r,minY:l.minY-r,maxY:l.maxY+r}}),u.length===0)return;const g=u.map(_=\u003e_.cell),h=Dwe(g),d=C9o(u.map(_=\u003e_.rawBounds),{cellMargin:1});for(const _ of d)i.schematic_line.insert({x1:_.start.x,y1:_.start.y,x2:_.end.x,y2:_.end.y,stroke_width:a,color:\"#000000\",is_dashed:!0,schematic_sheet_id:n});const p=d.filter(_=\u003eMath.abs(_.start.y-_.end.y)\u003cA),m=d.filter(_=\u003eMath.abs(_.start.x-_.end.x)\u003cA);for(const _ of u){const{displayName:f,sectionTitleFontSize:I,rawBounds:C,cell:y}=_;if(!f)continue;const x=u.some(M=\u003eM!==_\u0026\u0026z4(M.rawBounds,C)),E=p.map(M=\u003eM.start.y).filter(M=\u003eM\u003eC.maxY),B=E.length\u003e0?Math.min(...E):h.maxY,S=m.map(M=\u003eM.start.x).filter(M=\u003eM\u003cC.minX);let Q=h.minX;x\u0026\u0026(Q=y.minX),S.length\u003e0\u0026\u0026(Q=Math.max(...S));const w=I??.18;i.schematic_text.insert({anchor:\"top_left\",text:f,font_size:w,color:\"#000000\",position:{x:Q+s,y:Math.max(B-s,C.maxY+s+w)},rotation:0,schematic_sheet_id:n})}}},Zko=t=\u003eL2e.parse(t.toLowerCase()),eFo={a4:{width:297,height:210},ansi_b:{width:431.8,height:279.4}},tFt=({sheetSize:t,sheetWidth:e,sheetHeight:n})=\u003e{const o=Zko(t),i=eFo[o];return{sheetSize:o,sheetWidth:e??i.width,sheetHeight:n??i.height}},$Me=10.16/1.1,jue=5/$Me,$ue=1e-6,tFo=t=\u003e{switch(t.type){case\"schematic_component\":return t.schematic_component_id;case\"schematic_net_label\":return t.schematic_net_label_id;case\"schematic_trace\":return t.schematic_trace_id}},nFo=({db:t,schematicSheetId:e,schematicSheetName:n,schematicSheetCenter:o,sheetWidth:i,sheetHeight:r})=\u003e{const s=i/$Me,a=r/$Me,A={minX:o.x-s/2+jue,maxX:o.x+s/2-jue,minY:o.y-a/2+jue,maxY:o.y+a/2-jue},c=[...t.schematic_component.list(),...t.schematic_net_label.list(),...t.schematic_trace.list()].filter(l=\u003el.schematic_sheet_id===e);for(const l of c){const u=vWn(l);if(!u||!(u.minX\u003cA.minX-$ue||u.maxX\u003eA.maxX+$ue||u.minY\u003cA.minY-$ue||u.maxY\u003eA.maxY+$ue))continue;const h=tFo(l);t.schematic_element_outside_sheet_warning.insert({warning_type:\"schematic_element_outside_sheet_warning\",message:`${l.type} ${h} extends outside the drawing area of schematic sheet \"${n}\"`,schematic_sheet_id:e,schematic_element_type:l.type,schematic_element_id:h})}},oFo=class extends Ir{isSchematicPrimitive=!0;resolvedSchematicSheetDisplayName=\"Schematic Sheet\";get config(){return{componentName:\"SchematicSheet\",zodProps:uDn}}doInitialSourceGroupRender(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=new Set(this.root.children.flatMap(l=\u003e[l,...l.getDescendants()]).filter(l=\u003el.componentName===\"SchematicSheet\").map(l=\u003el._parsedProps.sheetIndex).filter(l=\u003el!==void 0)),o=new Set([...n,...t.schematic_sheet.list().map(l=\u003el.sheet_index).filter(l=\u003el!==void 0)]);let i=0;for(;o.has(i);)i+=1;const r=e.sheetIndex??i,s=e.name??e.displayName??`Sheet ${r+1}`,a=e.displayName??s;this.resolvedSchematicSheetDisplayName=a;const A=tFt(e),c=t.schematic_sheet.insert({name:s,display_name:a,sheet_index:r,sheet_size:A.sheetSize,sheet_width:A.sheetWidth,sheet_height:A.sheetHeight,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0});this.schematic_sheet_id=c.schematic_sheet_id}doInitialSchematicSheetRender(){if(this.root?.schematicDisabled||!this.schematic_sheet_id)return;const{db:t}=this.root,e=tFt(this._parsedProps),n=[...t.schematic_component.list(),...t.schematic_port.list(),...t.schematic_text.list(),...t.schematic_line.list(),...t.schematic_rect.list(),...t.schematic_circle.list(),...t.schematic_arc.list(),...t.schematic_path.list()].filter(i=\u003ei.schematic_sheet_id===this.schematic_sheet_id);let o={x:0,y:0};if(n.length\u003e0){const i=Gj(n);Number.isFinite(i.minX)\u0026\u0026Number.isFinite(i.maxX)\u0026\u0026Number.isFinite(i.minY)\u0026\u0026Number.isFinite(i.maxY)\u0026\u0026(o={x:(i.minX+i.maxX)/2,y:(i.minY+i.maxY)/2},t.schematic_sheet.update(this.schematic_sheet_id,{center:o}))}nFo({db:t,schematicSheetId:this.schematic_sheet_id,schematicSheetName:this.resolvedSchematicSheetDisplayName,schematicSheetCenter:o,sheetWidth:e.sheetWidth,sheetHeight:e.sheetHeight})}},iFo=class extends Ir{isSchematicPrimitive=!0;schematic_graphic_id;get config(){return{componentName:\"SchematicGraphic\",zodProps:dDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{imageUrl:e,svgContent:n,width:o,height:i}=this._parsedProps;if(e!==void 0){this._queueAsyncEffect(\"SchematicGraphicRender\",async()=\u003e{if(this.root?.schematicDisabled)return;const r=await EDt(e,this.root?.platform),s=await xPt(r).catch(l=\u003e{if(n===void 0||r.startsWith(\"data:\"))throw l;return null});if(s===null){const l={project_relative_path:e.startsWith(\"data:\")?\"inline\":e,url:r,mimetype:Eb},u=this.root.db.schematic_graphic.insert({asset:l,schematic_sheet_id:this._resolveSchematicSheetId(),svg_content:n,...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}});this.schematic_graphic_id=u.schematic_graphic_id;return}if(s.mimetype!==Eb)throw new Error(`Unsupported imageUrl for SchematicGraphic: \"${e}\". Expected an SVG image.`);const a={project_relative_path:e.startsWith(\"data:\")?s.projectRelativePath:e,url:s.dataUrl,mimetype:s.mimetype},A=s.dataUrl.startsWith(\"data:\")?n:s.text,c=this.root.db.schematic_graphic.insert({asset:a,schematic_sheet_id:this._resolveSchematicSheetId(),...A===void 0?{}:{svg_content:A},...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}});this.schematic_graphic_id=c.schematic_graphic_id});return}if(n!==void 0){const r={project_relative_path:\"inline\",url:`data:image/svg+xml,${encodeURIComponent(n)}`,mimetype:Eb},s=t.schematic_graphic.insert({asset:r,schematic_sheet_id:this._resolveSchematicSheetId(),...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}});this.schematic_graphic_id=s.schematic_graphic_id}}},rFo=class extends Ir{isSchematicPrimitive=!0;schematic_table_id=null;get config(){return{componentName:\"SchematicTable\",zodProps:aDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.children.filter(u=\u003eu.componentName===\"SchematicRow\");if(n.length===0)return;const o=[];let i=0;for(const u of n){const g=u.children.filter(h=\u003eh.componentName===\"SchematicCell\");i=Math.max(i,g.length)}for(let u=0;u\u003cn.length;u++)o[u]=[];for(let u=0;u\u003cn.length;u++){const h=n[u].children.filter(p=\u003ep.componentName===\"SchematicCell\");let d=0;for(let p=0;p\u003ch.length;p++){for(;o[u][d];)d++;const m=h[p],_=m._parsedProps.colSpan??1,f=m._parsedProps.rowSpan??1;for(let I=0;I\u003cf;I++)for(let C=0;C\u003c_;C++)o[u+I]||(o[u+I]=[]),o[u+I][d+C]=m;d+=_}}i=Math.max(0,...o.map(u=\u003eu.length));const r=n.map((u,g)=\u003eu._parsedProps.height??1),s=Array.from({length:i},(u,g)=\u003e{let h=0;for(let d=0;d\u003cn.length;d++){const p=o[d]?.[g];if(p){const m=p._parsedProps.text??p._parsedProps.children,_=p._parsedProps.width??(m?.length??2)*.5;_\u003eh\u0026\u0026(h=_)}}return h||10}),a=this._getGlobalSchematicPositionBeforeLayout(),A=t.schematic_table.insert({anchor_position:a,column_widths:s,row_heights:r,cell_padding:e.cellPadding,border_width:e.borderWidth,anchor:e.anchor,subcircuit_id:this.getSubcircuit()?.subcircuit_id||\"\",schematic_component_id:this.parent?.schematic_component_id||\"\",schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_table_id=A.schematic_table_id;const c=new Set;let l=0;for(let u=0;u\u003cn.length;u++){let g=0;for(let h=0;h\u003ci;h++){const d=o[u]?.[h];if(d\u0026\u0026!c.has(d)){c.add(d);const p=d._parsedProps,m=p.rowSpan??1,_=p.colSpan??1;let f=0;for(let C=0;C\u003c_;C++)f+=s[h+C];let I=0;for(let C=0;C\u003cm;C++)I+=r[u+C];t.schematic_table_cell.insert({schematic_table_id:this.schematic_table_id,start_row_index:u,end_row_index:u+m-1,start_column_index:h,end_column_index:h+_-1,text:p.text??p.children,center:{x:a.x+g+f/2,y:a.y-l-I/2},width:f,height:I,horizontal_align:p.horizontalAlign,vertical_align:p.verticalAlign,font_size:p.fontSize??e.fontSize,subcircuit_id:this.getSubcircuit()?.subcircuit_id||\"\"})}s[h]\u0026\u0026(g+=s[h])}l+=r[u]}}},sFo=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:\"SchematicRow\",zodProps:ADn}}},aFo=class extends Ir{isSchematicPrimitive=!0;canHaveTextChildren=!0;get config(){return{componentName:\"SchematicCell\",zodProps:cDn}}},AFo=class extends Ir{simulation_experiment_id=null;get config(){return{componentName:\"AnalogSimulation\",zodProps:GPn}}getSpiceEngineName(){return this._parsedProps.spiceEngine}usesIndependentGraphAxes(){return this._parsedProps.graphIndependentAxes===!0}doInitialSimulationRender(){const{db:t}=this.root,{duration:e,name:n,startTime:o,timePerStep:i,spiceOptions:r}=this._parsedProps,s=e||10,a=i||.01,A=t.simulation_experiment.insert({name:n??\"spice_transient_analysis\",experiment_type:\"spice_transient_analysis\",end_time_ms:s,start_time_ms:o,time_per_step:a,spice_options:r});this.simulation_experiment_id=A.simulation_experiment_id}},HO=class extends Ir{simulation_experiment_id=null;getSpiceEngineName(){return typeof this.props.spiceEngine==\"string\"?this.props.spiceEngine:void 0}usesIndependentGraphAxes(){return this.props.graphIndependentAxes===!0}getOrCreateSimulationExperiment(){if(this.simulation_experiment_id)return this.root?.db.simulation_experiment.get(this.simulation_experiment_id)??null;if(this.children.filter(n=\u003en.componentName===\"AnalogSweepParameter\").length\u003e1)return this.renderError(\"An analog simulation can contain at most one sweep parameter.\"),null;const e=this.insertSimulationExperiment();return this.simulation_experiment_id=e?.simulation_experiment_id??null,e}doInitialSimulationRender(){this.getOrCreateSimulationExperiment()}},cFo=class extends HO{get config(){return{componentName:\"AnalogTransientSimulation\",zodProps:YPn}}insertSimulationExperiment(){const{db:t}=this.root,{duration:e,name:n,startTime:o,timePerStep:i,spiceOptions:r}=this._parsedProps;return t.simulation_experiment.insert({name:n??\"spice_transient_analysis\",experiment_type:\"spice_transient_analysis\",end_time_ms:e,start_time_ms:o,time_per_step:i,spice_options:r})}},lFo=class extends HO{get config(){return{componentName:\"AnalogDcOperatingPointSimulation\",zodProps:UPn}}insertSimulationExperiment(){const{name:t,spiceOptions:e}=this._parsedProps;return this.root.db.simulation_experiment.insert({name:t??\"spice_dc_operating_point\",experiment_type:\"spice_dc_operating_point\",spice_options:e})}},uFo=class extends HO{get config(){return{componentName:\"AnalogDcSweepSimulation\",zodProps:KPn}}insertSimulationExperiment(){const{name:t,spiceOptions:e,sweepSource:n,sweepStart:o,sweepStop:i,sweepStep:r}=this._parsedProps,a=(this.getGroup()??this.getSubcircuit())?.selectOne(n);let A;if(a instanceof Fkt){a.runRenderPhase(\"SimulationRender\");const c=a.simulation_voltage_source_id;if(!c)return this.renderError(`DC sweep source \"${n}\" must resolve to one voltage or current source.`),null;A={dc_sweep_voltage_source_id:c,dc_sweep_unit:\"V\"}}else if(a instanceof Lkt){a.runRenderPhase(\"SimulationRender\");const c=a.simulation_current_source_id;if(!c)return this.renderError(`DC sweep source \"${n}\" must resolve to one voltage or current source.`),null;A={dc_sweep_current_source_id:c,dc_sweep_unit:\"A\"}}else return this.renderError(`DC sweep source \"${n}\" must resolve to one voltage or current source.`),null;return this.root.db.simulation_experiment.insert({name:t??\"spice_dc_sweep\",experiment_type:\"spice_dc_sweep\",spice_options:e,...A,dc_sweep_start:o,dc_sweep_stop:i,dc_sweep_step:r})}},gFo=class extends HO{get config(){return{componentName:\"AnalogAcSweepSimulation\",zodProps:VPn}}insertSimulationExperiment(){const{name:t,spiceOptions:e,sweepType:n,samplesPerInterval:o,sampleCount:i,startFrequency:r,stopFrequency:s}=this._parsedProps;return this.root.db.simulation_experiment.insert({name:t??\"spice_ac_analysis\",experiment_type:\"spice_ac_analysis\",spice_options:e,ac_sweep_type:n,ac_samples_per_interval:o,ac_sample_count:i,ac_start_frequency_hz:r,ac_stop_frequency_hz:s})}},dFo={resistance:\"Ω\",capacitance:\"F\",inductance:\"H\",voltage:\"V\",current:\"A\"},hFo=({parameterSweepCoordinate:t,stop:e,step:n})=\u003e{const o=Math.abs(n)*1e-9;return n\u003e0?t\u003c=e+o:t\u003e=e-o},pFo=({start:t,stop:e,step:n})=\u003e{const o=[];for(let i=t;hFo({parameterSweepCoordinate:i,stop:e,step:n});i=t+o.length*n)if(o.push(i),o.length\u003e1e6)throw new Error(\"Parameter sweep exceeds 1,000,000 points\");return o},mFo=t=\u003et.parameterType===\"resistance\"?t.resistorRef:t.parameterType===\"capacitance\"?t.capacitorRef:t.parameterType===\"inductance\"?t.inductorRef:t.parameterType===\"voltage\"?t.net:t.currentSourceRef,_Fo=t=\u003e{if(!(t.parent instanceof HO)){t.renderError(\"analog.sweepparameter must be nested directly in an analog simulation.\");return}const e=t.parent.getOrCreateSimulationExperiment();if(!e)return;const n=t._parsedProps,o=n.values??pFo({start:n.start,stop:n.stop,step:n.step}),i=t.parent.getGroup()??t.parent.getSubcircuit(),r=mFo(n),s=dFo[n.parameterType],a=t.root.db.simulation_parameter_sweep,A={simulation_experiment_id:e.simulation_experiment_id,name:n.name,parameter_type:n.parameterType,parameter_values:o,parameter_unit:s};let c;if(n.parameterType===\"voltage\"){const l=i?.selectOne(r,{type:\"net\"});if(!l?.source_net_id){t.renderError(`Voltage sweep net \"${r}\" could not be resolved.`);return}c=a.insert({...A,parameter_type:\"voltage\",source_net_id:l.source_net_id}).simulation_parameter_sweep_id}else{const u=i?.selectOne(r)?.source_component_id;if(!u){t.renderError(`Parameter sweep target \"${r}\" could not be resolved.`);return}n.parameterType===\"resistance\"?c=a.insert({...A,parameter_type:\"resistance\",resistor_source_component_id:u}).simulation_parameter_sweep_id:n.parameterType===\"capacitance\"?c=a.insert({...A,parameter_type:\"capacitance\",capacitor_source_component_id:u}).simulation_parameter_sweep_id:n.parameterType===\"inductance\"?c=a.insert({...A,parameter_type:\"inductance\",inductor_source_component_id:u}).simulation_parameter_sweep_id:c=a.insert({...A,parameter_type:\"current\",current_source_component_id:u}).simulation_parameter_sweep_id}t.simulation_parameter_sweep_id=c},fFo=class extends Ir{simulation_parameter_sweep_id=null;get config(){return{componentName:\"AnalogSweepParameter\",zodProps:oMn}}doInitialSimulationRender(){_Fo(this)}};function IFo(t,e,n,o=.3){const r=Math.max(e.length*.1,.3),a=.25+.2;let A=t.x,c=t.y;const l=o+r/2;n.includes(\"top\")?c+=l:n.includes(\"bottom\")\u0026\u0026(c-=l),n.includes(\"right\")?A+=l:n.includes(\"left\")\u0026\u0026(A-=l);let u,g,h,d;return n.includes(\"left\")?(u=A,g=A+r):n.includes(\"right\")?(u=A-r,g=A):(u=A-r/2,g=A+r/2),n.includes(\"top\")?(h=c-a,d=c):n.includes(\"bottom\")?(h=c,d=c+a):(h=c-a/2,d=c+a/2),{minX:u,maxX:g,minY:h,maxY:d}}function CFo(t){let e,n,o,i;if(t.type===\"schematic_component\")e=t.center?.x,n=t.center?.y,o=t.size?.width,i=t.size?.height;else if(t.type===\"schematic_text\")e=t.position?.x,n=t.position?.y,o=(t.text?.length??0)*.1,i=.2;else return null;return typeof e==\"number\"\u0026\u0026typeof n==\"number\"\u0026\u0026typeof o==\"number\"\u0026\u0026typeof i==\"number\"?{minX:e-o/2,maxX:e+o/2,minY:n-i/2,maxY:n+i/2}:null}function yFo(t,e){if(!z4(t,e))return 0;const n=Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX),o=Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY);return n*o}function xFo({probePosition:t,labelText:e,schematicElements:n,defaultAlignment:o=\"top_right\"}){const r=[o,...[\"top_right\",\"top_left\",\"bottom_right\",\"bottom_left\",\"top_center\",\"bottom_center\",\"center_right\",\"center_left\"].filter(A=\u003eA!==o)];let s=o,a=1/0;for(const A of r){const c=IFo(t,e,A);let l=0;for(const u of n){const g=CFo(u);g\u0026\u0026(l+=yFo(c,g))}if(l===0)return A;l\u003ca\u0026\u0026(a=l,s=A)}return s}var EFo=class extends Ir{simulation_voltage_probe_id=null;schematic_voltage_probe_id=null;finalProbeName=null;color=null;get config(){return{componentName:\"VoltageProbe\",zodProps:JMn}}doInitialSimulationRender(){const{db:t}=this.root,{connectsTo:e,name:n,referenceTo:o,color:i,graphDisplayName:r,graphCenter:s,graphVerticalOffset:a,graphVoltagePerDiv:A}=this._parsedProps,c=this.getSubcircuit();if(!c){this.renderError(\"VoltageProbe must be inside a subcircuit\");return}const l=Array.isArray(e)?e:[e];if(l.length!==1){this.renderError(\"VoltageProbe must connect to exactly one port or net\");return}const u=l[0],g=c.selectOne(u,{type:\"port\"}),h=g?null:c.selectOne(u,{type:\"net\"});if(h\u0026\u0026h.componentName!==\"Net\"){this.renderError(`VoltageProbe connection target \"${u}\" resolved to a non-net component \"${h.componentName}\".`);return}if(!g\u0026\u0026!h){this.renderError(`VoltageProbe could not find connection target \"${u}\"`);return}const d=g?.source_port_id??h?.source_net_id;if(!d){this.renderError(\"Could not identify connected source for VoltageProbe\");return}let p=null,m=null;if(o){const C=Array.isArray(o)?o:[o];if(C.length!==1){this.renderError(\"VoltageProbe must reference exactly one port or net\");return}const y=C[0];if(p=c.selectOne(y,{type:\"port\"}),m=p?null:c.selectOne(y,{type:\"net\"}),m\u0026\u0026m.componentName!==\"Net\"){this.renderError(`VoltageProbe reference target \"${y}\" resolved to a non-net component \"${m.componentName}\".`);return}if(!p\u0026\u0026!m){this.renderError(`VoltageProbe could not find reference target \"${y}\"`);return}}this.color=i??jDo(d);let _=n;_||(_=l[0].split(\" \u003e \").map(C=\u003eC.replace(/^\\./,\"\")).join(\".\")),this.finalProbeName=_??null;const{simulation_voltage_probe_id:f}=t.simulation_voltage_probe.insert({name:_,signal_input_source_port_id:g?.source_port_id??void 0,signal_input_source_net_id:h?.source_net_id??void 0,reference_input_source_port_id:p?.source_port_id??void 0,reference_input_source_net_id:m?.source_net_id??void 0,subcircuit_id:c.subcircuit_id||void 0,color:this.color});if(this.simulation_voltage_probe_id=f,r!==void 0||s!==void 0||a!==void 0||A!==void 0){const C=Sw(A),y=Sw(a);t.simulation_oscilloscope_trace.insert({simulation_voltage_probe_id:f,display_name:r,color:i??void 0,display_center_value:s,volts_per_div:C,display_center_offset_divs:y!==void 0\u0026\u0026C!==void 0\u0026\u0026C!==0?y/C:void 0})}}doInitialSchematicReplaceNetLabelsWithSymbols(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{connectsTo:e,name:n}=this._parsedProps,o=this.getSubcircuit();if(!o)return;const i=Array.isArray(e)?e:[e];if(i.length!==1)return;const r=i[0],s=o.selectOne(r,{type:\"port\"});if(!s||!s.schematic_port_id)return;const a=s._getGlobalSchematicPositionAfterLayout();let A=null;for(const g of t.schematic_trace.list()){for(const h of g.edges)if(Math.abs(h.from.x-a.x)\u003c1e-6\u0026\u0026Math.abs(h.from.y-a.y)\u003c1e-6||Math.abs(h.to.x-a.x)\u003c1e-6\u0026\u0026Math.abs(h.to.y-a.y)\u003c1e-6){A=g.schematic_trace_id;break}if(A)break}if(!A)return;const c=this.finalProbeName,l=xFo({probePosition:a,labelText:c,schematicElements:[...t.schematic_component.list(),...t.schematic_text.list()],defaultAlignment:\"top_right\"}),u=t.schematic_voltage_probe.insert({name:c,position:a,schematic_trace_id:A,subcircuit_id:o.subcircuit_id||void 0,color:this.color??void 0,label_alignment:l});this.schematic_voltage_probe_id=u.schematic_voltage_probe_id}},BFo=class extends Ir{get config(){return{componentName:\"SpiceModel\",zodProps:rMn}}doInitialSimulationRender(){if(this.getInheritedProperty(\"analogSimulationDisabled\"))return;const t=this.parent;if(!t)return;const e=t.source_component_id;if(!e){this._insertSpiceModelError(\"spicemodel must be attached to a source component.\",this._parsedProps);return}const{source:n,spicePinMapping:o}=this._parsedProps,i=W5o(n).subckts[0]??null,r=i?.pins.map(c=\u003ec.name);if(!i||!r||r.length===0){this._insertSpiceModelError(\"spicemodel source must contain a .subckt declaration with a model name and pins.\",n);return}const s=o??{};for(const c of Object.keys(s))if(!r.includes(c)){this._insertSpiceModelError(`spicePinMapping references SPICE pin \"${c}\", but it is not present in .subckt ${i.name}.`,s);return}const a={},A=new Set;for(const c of r){const l=s[c]??c,u=t.selectAll(\"port\").filter(h=\u003eh instanceof Pu\u0026\u0026h.isMatchingAnyOf([l]));if(u.length!==1||!u[0].source_port_id){this._insertSpiceModelError(`Could not resolve SPICE pin \"${c}\" to exactly one component port using \"${l}\".`,s);return}const g=u[0].source_port_id;if(A.has(g)){this._insertSpiceModelError(`spicePinMapping maps more than one SPICE pin to component port \"${l}\".`,s);return}A.add(g),a[c]=g}this.root.db.simulation_spice_subcircuit.insert({source_component_id:e,spice_pin_to_source_port_map:a,subcircuit_source:n})}_insertSpiceModelError(t,e){this.root.db.source_invalid_component_property_error.insert({source_component_id:this.parent?.source_component_id||\"\",property_name:\"spiceModel\",property_value:e,message:t,error_type:\"source_invalid_component_property_error\"})}},bFo=class extends Ikt{isRootCircuit=!0;constructor({platform:t,projectUrl:e}={}){super({platform:t,projectUrl:e,cachedSubcircuits:new Map,pendingSubcircuitRenders:new Map}),this.root=this}},SFo=bFo;new Proxy(t=\u003enew Proxy({},{get:(e,n)=\u003e`.${t} \u003e .${n}`}),{get:(t,e)=\u003e{const n=(...o)=\u003e(o[0],new Proxy({},{get:(i,r)=\u003e`.${e} \u003e .${r}`}));return new Proxy(n,{get:(o,i)=\u003ee===\"net\"?`net.${i}`:e===\"subcircuit\"?new Proxy({},{get:(r,s)=\u003enew Proxy({},{get:(a,A)=\u003e`subcircuit.${i} \u003e .${s} \u003e .${A}`})}):`.${e} \u003e .${i}`,apply:(o,i,r)=\u003ee===\"net\"?new Proxy({},{get:(s,a)=\u003e`net.${a}`}):new Proxy({},{get:(s,a)=\u003e{const A=`.${e} \u003e .${a}`;return[\"U\",\"J\",\"CN\"].some(l=\u003ee.startsWith(l))?A:new Proxy(new String(A),{get:(l,u)=\u003etypeof u==\"symbol\"||u===\"toString\"?()=\u003eA:`.${e} \u003e .${a} \u003e .${u}`})}})})}}),NMt(qPt),NMt({\"assembly.device\":qkt,Bug:zj,\"enclosure.cutoutaperture\":WMe,\"enclosure.fdm.box\":Zkt,Fanout:JMe,FanoutPoint:dR});const nFt=vc(\"run-frame\"),QFo={},oFt=t=\u003e{let e;const n=new Set,o=(l,u)=\u003e{const g=typeof l==\"function\"?l(e):l;if(!Object.is(g,e)){const h=e;e=u??(typeof g!=\"object\"||g===null)?g:Object.assign({},e,g),n.forEach(d=\u003ed(e,h))}},i=()=\u003ee,A={setState:o,getState:i,getInitialState:()=\u003ec,subscribe:l=\u003e(n.add(l),()=\u003en.delete(l)),destroy:()=\u003e{(QFo?\"production\":void 0)!==\"production\"\u0026\u0026console.warn(\"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.\"),n.clear()}},c=e=t(o,i,A);return A},iFt=t=\u003et?oFt(t):oFt;var que={exports:{}},qMe={},Xue={exports:{}},XMe={};var rFt;function vFo(){if(rFt)return XMe;rFt=1;var t=L3();function e(u,g){return u===g\u0026\u0026(u!==0||1/u===1/g)||u!==u\u0026\u0026g!==g}var n=typeof Object.is==\"function\"?Object.is:e,o=t.useState,i=t.useEffect,r=t.useLayoutEffect,s=t.useDebugValue;function a(u,g){var h=g(),d=o({inst:{value:h,getSnapshot:g}}),p=d[0].inst,m=d[1];return r(function(){p.value=h,p.getSnapshot=g,A(p)\u0026\u0026m({inst:p})},[u,h,g]),i(function(){return A(p)\u0026\u0026m({inst:p}),u(function(){A(p)\u0026\u0026m({inst:p})})},[u]),s(h),h}function A(u){var g=u.getSnapshot;u=u.value;try{var h=g();return!n(u,h)}catch{return!0}}function c(u,g){return g()}var l=typeof window\u003e\"u\"||typeof window.document\u003e\"u\"||typeof window.document.createElement\u003e\"u\"?c:a;return XMe.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:l,XMe}var ZMe={},sFt;function wFo(){if(sFt)return ZMe;sFt=1;var t={env:{}};return t.env.NODE_ENV!==\"production\"\u0026\u0026(function(){function e(d,p){return d===p\u0026\u0026(d!==0||1/d===1/p)||d!==d\u0026\u0026p!==p}function n(d,p){u||r.startTransition===void 0||(u=!0,console.error(\"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"));var m=p();if(!g){var _=p();s(m,_)||(console.error(\"The result of getSnapshot should be cached to avoid an infinite loop\"),g=!0)}_=a({inst:{value:m,getSnapshot:p}});var f=_[0].inst,I=_[1];return c(function(){f.value=m,f.getSnapshot=p,o(f)\u0026\u0026I({inst:f})},[d,m,p]),A(function(){return o(f)\u0026\u0026I({inst:f}),d(function(){o(f)\u0026\u0026I({inst:f})})},[d]),l(m),m}function o(d){var p=d.getSnapshot;d=d.value;try{var m=p();return!s(d,m)}catch{return!0}}function i(d,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__\u003c\"u\"\u0026\u0026typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==\"function\"\u0026\u0026__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=L3(),s=typeof Object.is==\"function\"?Object.is:e,a=r.useState,A=r.useEffect,c=r.useLayoutEffect,l=r.useDebugValue,u=!1,g=!1,h=typeof window\u003e\"u\"||typeof window.document\u003e\"u\"||typeof window.document.createElement\u003e\"u\"?i:n;ZMe.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__\u003c\"u\"\u0026\u0026typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==\"function\"\u0026\u0026__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),ZMe}var aFt;function AFt(){if(aFt)return Xue.exports;aFt=1;var t={env:{}};return t.env.NODE_ENV===\"production\"?Xue.exports=vFo():Xue.exports=wFo(),Xue.exports}var cFt;function PFo(){if(cFt)return qMe;cFt=1;var t=L3(),e=AFt();function n(c,l){return c===l\u0026\u0026(c!==0||1/c===1/l)||c!==c\u0026\u0026l!==l}var o=typeof Object.is==\"function\"?Object.is:n,i=e.useSyncExternalStore,r=t.useRef,s=t.useEffect,a=t.useMemo,A=t.useDebugValue;return qMe.useSyncExternalStoreWithSelector=function(c,l,u,g,h){var d=r(null);if(d.current===null){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=a(function(){function _(x){if(!f){if(f=!0,I=x,x=g(x),h!==void 0\u0026\u0026p.hasValue){var E=p.value;if(h(E,x))return C=E}return C=x}if(E=C,o(I,x))return E;var B=g(x);return h!==void 0\u0026\u0026h(E,B)?(I=x,E):(I=x,C=B)}var f=!1,I,C,y=u===void 0?null:u;return[function(){return _(l())},y===null?void 0:function(){return _(y())}]},[l,u,g,h]);var m=i(c,d[0],d[1]);return s(function(){p.hasValue=!0,p.value=m},[m]),A(m),m},qMe}var eDe={},lFt;function MFo(){if(lFt)return eDe;lFt=1;var t={env:{}};return t.env.NODE_ENV!==\"production\"\u0026\u0026(function(){function e(l,u){return l===u\u0026\u0026(l!==0||1/l===1/u)||l!==l\u0026\u0026u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__\u003c\"u\"\u0026\u0026typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==\"function\"\u0026\u0026__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=L3(),o=AFt(),i=typeof Object.is==\"function\"?Object.is:e,r=o.useSyncExternalStore,s=n.useRef,a=n.useEffect,A=n.useMemo,c=n.useDebugValue;eDe.useSyncExternalStoreWithSelector=function(l,u,g,h,d){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=A(function(){function f(E){if(!I){if(I=!0,C=E,E=h(E),d!==void 0\u0026\u0026m.hasValue){var B=m.value;if(d(B,E))return y=B}return y=E}if(B=y,i(C,E))return B;var S=h(E);return d!==void 0\u0026\u0026d(B,S)?(C=E,B):(C=E,y=S)}var I=!1,C,y,x=g===void 0?null:g;return[function(){return f(u())},x===null?void 0:function(){return f(x())}]},[u,g,h,d]);var _=r(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.value=_},[_]),c(_),_},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__\u003c\"u\"\u0026\u0026typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==\"function\"\u0026\u0026__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),eDe}var uFt;function DFo(){if(uFt)return que.exports;uFt=1;var t={env:{}};return t.env.NODE_ENV===\"production\"?que.exports=PFo():que.exports=MFo(),que.exports}var NFo=DFo();const RFo=_y(NFo),gFt={},{useDebugValue:TFo}=Fs,{useSyncExternalStoreWithSelector:kFo}=RFo;let dFt=!1;const FFo=t=\u003et;function hFt(t,e=FFo,n){(gFt?\"production\":void 0)!==\"production\"\u0026\u0026n\u0026\u0026!dFt\u0026\u0026(console.warn(\"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937\"),dFt=!0);const o=kFo(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return TFo(o),o}const LFo=t=\u003e{(gFt?\"production\":void 0)!==\"production\"\u0026\u0026typeof t!=\"function\"\u0026\u0026console.warn(\"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.\");const e=typeof t==\"function\"?iFt(t):t,n=(o,i)=\u003ehFt(e,o,i);return Object.assign(n,e),n},pFt=t=\u003eLFo,tDe={BASE_URL:\"/\",DEV:!1,MODE:\"production\",PROD:!0,SSR:!1},nDe=new Map,Zue=t=\u003e{const e=nDe.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,o])=\u003e[n,o.getState()])):{}},HFo=(t,e,n)=\u003e{if(t===void 0)return{type:\"untracked\",connection:e.connect(n)};const o=nDe.get(n.name);if(o)return{type:\"tracked\",store:t,...o};const i={connection:e.connect(n),stores:{}};return nDe.set(n.name,i),{type:\"tracked\",store:t,...i}},mFt=(t,e={})=\u003e(n,o,i)=\u003e{const{enabled:r,anonymousActionType:s,store:a,...A}=e;let c;try{c=(r??(tDe?\"production\":void 0)!==\"production\")\u0026\u0026window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(tDe?\"production\":void 0)!==\"production\"\u0026\u0026r\u0026\u0026console.warn(\"[zustand devtools middleware] Please install/enable Redux devtools extension\"),t(n,o,i);const{connection:l,...u}=HFo(a,c,A);let g=!0;i.setState=(p,m,_)=\u003e{const f=n(p,m);if(!g)return f;const I=_===void 0?{type:s||\"anonymous\"}:typeof _==\"string\"?{type:_}:_;return a===void 0?(l?.send(I,o()),f):(l?.send({...I,type:`${a}/${I.type}`},{...Zue(A.name),[a]:i.getState()}),f)};const h=(...p)=\u003e{const m=g;g=!1,n(...p),g=m},d=t(i.setState,o,i);if(u.type===\"untracked\"?l?.init(d):(u.stores[u.store]=i,l?.init(Object.fromEntries(Object.entries(u.stores).map(([p,m])=\u003e[p,p===u.store?d:m.getState()])))),i.dispatchFromDevtools\u0026\u0026typeof i.dispatch==\"function\"){let p=!1;const m=i.dispatch;i.dispatch=(..._)=\u003e{(tDe?\"production\":void 0)!==\"production\"\u0026\u0026_[0].type===\"__setState\"\u0026\u0026!p\u0026\u0026(console.warn('[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'),p=!0),m(..._)}}return l.subscribe(p=\u003e{var m;switch(p.type){case\"ACTION\":if(typeof p.payload!=\"string\"){console.error(\"[zustand devtools middleware] Unsupported action format\");return}return oDe(p.payload,_=\u003e{if(_.type===\"__setState\"){if(a===void 0){h(_.state);return}Object.keys(_.state).length!==1\u0026\u0026console.error(`\n [zustand devtools middleware] Unsupported __setState action format. \n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `);const f=_.state[a];if(f==null)return;JSON.stringify(i.getState())!==JSON.stringify(f)\u0026\u0026h(f);return}i.dispatchFromDevtools\u0026\u0026typeof i.dispatch==\"function\"\u0026\u0026i.dispatch(_)});case\"DISPATCH\":switch(p.payload.type){case\"RESET\":return h(d),a===void 0?l?.init(i.getState()):l?.init(Zue(A.name));case\"COMMIT\":if(a===void 0){l?.init(i.getState());return}return l?.init(Zue(A.name));case\"ROLLBACK\":return oDe(p.state,_=\u003e{if(a===void 0){h(_),l?.init(i.getState());return}h(_[a]),l?.init(Zue(A.name))});case\"JUMP_TO_STATE\":case\"JUMP_TO_ACTION\":return oDe(p.state,_=\u003e{if(a===void 0){h(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[a])\u0026\u0026h(_[a])});case\"IMPORT_STATE\":{const{nextLiftedState:_}=p.payload,f=(m=_.computedStates.slice(-1)[0])==null?void 0:m.state;if(!f)return;h(a===void 0?f:f[a]),l?.send(null,_);return}case\"PAUSE_RECORDING\":return g=!g}return}}),d},oDe=(t,e)=\u003e{let n;try{n=JSON.parse(t)}catch(o){console.error(\"[zustand devtools middleware] Could not parse the received json\",o)}n!==void 0\u0026\u0026e(n)},QC=window.TSCIRCUIT_FILESERVER_API_BASE_URL??\"/api\",OFo=[\".tsx\",\".ts\",\".jsx\",\".js\",\".mjs\",\".json\",\".kicad_pcb\",\".kicad_sym\",\".kicad_sch\",\".kicad_prl\",\".kicad_pro\"],iDe=t=\u003eOFo.some(e=\u003et.endsWith(e)),b$=nFt.extend(\"store\");async function _Ft(t,e){return(await(await fetch(`${QC}/files/upsert`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({file_path:t,text_content:e})})).json()).file}async function rDe(t){return(await(await fetch(`${QC}/files/get?file_path=${encodeURIComponent(t)}`)).json()).file}async function GFo(t){const e=t?`${QC}/events/list?since=${encodeURIComponent(t)}`:`${QC}/events/list`;return(await(await fetch(e)).json()).event_list}async function YFo(){const t=await fetch(`${QC}/files/list`),{file_list:e}=await t.json(),n=new Map;for(const o of e){if(iDe(o.file_path)){const i=await rDe(o.file_path);n.set(o.file_path,i.text_content);continue}n.set(o.file_path,\"__STATIC_ASSET__\")}return n}const UFo=[\"manual-edits.json\",\"manual_edits.json\"],md=pFt()(mFt((t,e)=\u003e({fsMap:new Map,lastEventTime:new Date().toISOString(),isPolling:!1,error:null,circuitJson:null,lastManualEditsChangeSentAt:0,recentEvents:[],simulateScenarioOrder:void 0,currentMainComponentPath:null,recentlySavedFiles:[],loadInitialFiles:async()=\u003e{const n=await YFo();b$(\"loaded initial files\",{fsMap:n}),t({fsMap:n})},upsertFile:async(n,o)=\u003e{try{const i=await _Ft(n,o);t(r=\u003e({fsMap:new Map(r.fsMap).set(i.file_path,i.text_content)}))}catch(i){t({error:i})}},getFile:async n=\u003e{try{const o=await rDe(n);t(i=\u003e({fsMap:new Map(i.fsMap).set(o.file_path,o.text_content)}))}catch(o){t({error:o})}},setCircuitJson:n=\u003e{n!==e().circuitJson\u0026\u0026t({circuitJson:n})},addRecentlySavedFile:n=\u003e{t(o=\u003e{if(UFo.includes(n)||!iDe(n))return o;const i=o.recentlySavedFiles.filter(r=\u003er!==n);return{recentlySavedFiles:[n,...i].slice(0,10)}})},startPolling:()=\u003e{const n=async()=\u003e{const o=e();if(o.isPolling){try{const i=await GFo(o.lastEventTime);if(i.length\u003e0){const r=i[i.length-1].created_at;b$(\"received events\",i.map(A=\u003eA.event_type)),t(A=\u003e({recentEvents:[...A.recentEvents,...i].slice(0,100),lastEventTime:r}));let s=0;const a=new Map(o.fsMap);for(const A of i)if(A.event_type===\"FILE_UPDATED\"){s++;const c=await rDe(A.file_path);if(A.file_path===\"manual_edits.json\"\u0026\u0026Date.now()-o.lastManualEditsChangeSentAt\u003c1e3)continue;iDe(c.file_path)?a.set(c.file_path,c.text_content??\"\"):a.set(c.file_path,\"__STATIC_ASSET__\"),e().addRecentlySavedFile(A.file_path)}else A.event_type===\"FILE_DELETED\"\u0026\u0026(s++,a.delete(A.file_path));s\u003e0\u0026\u0026(b$(\"updating fsMap, fsUpdateCount:\",s),t({fsMap:a}))}}catch(i){t({error:i})}setTimeout(n,1e3)}};t({isPolling:!0}),n()},stopPolling:()=\u003e{t({isPolling:!1})},pushEvent:async n=\u003e{await fetch(`${QC}/events/create`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(n)})},applyEditEventsAndUpdateManualEditsJson:async n=\u003e{b$(\"applyEditEventsAndUpdateManualEditsJson\",{editEvents:n});const o=e();if(!o.circuitJson)return;const i=o.fsMap.get(\"manual-edits.json\"),r=i?JSON.parse(i):{},s=VRt({circuitJson:o.circuitJson,editEvents:n,manualEditsFile:r});b$(\"updatedManualEditsFileContent\",s),t(a=\u003e({lastManualEditsChangeSentAt:Date.now(),fsMap:new Map(a.fsMap).set(\"manual-edits.json\",JSON.stringify(s))})),await _Ft(\"manual-edits.json\",JSON.stringify(s,null,2))},setSimulateScenarioOrder:n=\u003et({simulateScenarioOrder:n}),setCurrentMainComponentPath:n=\u003et({currentMainComponentPath:n})}),{name:\"run-frame-store\"})),KFo=nFt.extend(\"useEditEventController\"),VFo=()=\u003e{const t=md(h=\u003eh.applyEditEventsAndUpdateManualEditsJson),[e,n]=ee.useState([]),[o,i]=ee.useState(!1),r=e.filter(h=\u003e!h._applied),s=e.filter(h=\u003eh._applied),a=o?e:r,A=ee.useCallback(h=\u003e{n(d=\u003e[...d,{...h,_applied:!1}])},[]),c=ee.useCallback(h=\u003e{n(d=\u003ed.map(p=\u003ep===h?{...p,_applied:!0}:p))},[]),l=ee.useCallback(()=\u003e{n(h=\u003eh.map(d=\u003e({...d,_applied:!0})))},[]),u=ee.useCallback(()=\u003e{i(!0),e.length!==0\u0026\u0026(KFo(\"removing edit events that are applied\"),n(h=\u003eh.filter(d=\u003e!d._applied)))},[e]),g=ee.useCallback(()=\u003e{i(!1)},[]);return ee.useEffect(()=\u003e{if(e.filter(d=\u003e!d._applied).length===0)return;const h=setTimeout(()=\u003e{l(),t(e)},1e3);return()=\u003eclearTimeout(h)},[e]),{unappliedEditEvents:r,appliedEditEvents:s,editEventsForRender:a,pushEditEvent:A,markEditEventApplied:c,markRenderStarted:u,markRenderComplete:g,markAllEditEventsApplied:l}},sDe=vc(\"run-frame:useHasReceivedInitialFilesLoaded\"),zFo=()=\u003e{const[t,e]=ee.useState(!1),n=md(i=\u003ei.recentEvents),o=md(i=\u003ei.loadInitialFiles);return ee.useEffect(()=\u003e{(async()=\u003e{await o();try{const r=await fetch(`${QC}/events/list?event_type=INITIAL_FILES_UPLOADED`);if(r.ok){const{event_list:s}=await r.json();if(s.length\u003e0){sDe(\"INITIAL_FILES_UPLOADED found in history. Assuming ready.\"),e(!0);return}}}catch(r){console.error(\"Failed to check for event history\",r)}sDe(\"No INITIAL_FILES_UPLOADED in history, waiting for polling.\")})()},[o]),ee.useEffect(()=\u003e{t||n.some(i=\u003ei.event_type===\"INITIAL_FILES_UPLOADED\")\u0026\u0026(sDe(\"INITIAL_FILES_UPLOADED received via polling. Assuming ready.\"),e(!0))},[n,t]),t};function OO(t,e,n){const[o,i]=ee.useState(()=\u003e{if(n!==void 0)return n;try{const r=window.localStorage.getItem(t);return r?JSON.parse(r):e}catch(r){return console.error(\"Error reading from localStorage:\",r),e}});return ee.useEffect(()=\u003e{try{window.localStorage.setItem(t,JSON.stringify(o))}catch(r){console.error(\"Error writing to localStorage:\",r)}},[t,o]),[o,i]}var JFo=Object.defineProperty,GO=(t,e)=\u003eJFo(t,\"name\",{value:e,configurable:!0}),fFt=!!(typeof window\u003c\"u\"\u0026\u0026window.document\u0026\u0026window.document.createElement);function ar(t,e,{checkForDefaultPrevented:n=!0}={}){return GO(function(i){if(t?.(i),n===!1||!i||!i.defaultPrevented)return e?.(i)},\"handleEvent\")}GO(ar,\"composeEventHandlers\");function WFo(t){if(!fFt)throw new Error(\"Cannot access window outside of the DOM\");return t?.ownerDocument?.defaultView??window}GO(WFo,\"getOwnerWindow\");function aDe(t){if(!fFt)throw new Error(\"Cannot access document outside of the DOM\");return t?.ownerDocument??document}GO(aDe,\"getOwnerDocument\");function IFt(t,e=!1){const{activeElement:n}=aDe(t);if(!n?.nodeName)return null;if(CFt(n)\u0026\u0026n.contentDocument)return IFt(n.contentDocument.body,e);if(e){const o=n.getAttribute(\"aria-activedescendant\");if(o){const i=aDe(n).getElementById(o);if(i)return i}}return n}GO(IFt,\"getActiveElement\");function CFt(t){return t.tagName===\"IFRAME\"}GO(CFt,\"isFrame\");var jFo=Object.defineProperty,s4=(t,e)=\u003ejFo(t,\"name\",{value:e,configurable:!0});function $Fo(t,e){const n=ee.createContext(e);n.displayName=t+\"Context\";const o=s4(r=\u003e{const{children:s,...a}=r,A=ee.useMemo(()=\u003ea,Object.values(a));return K.jsx(n.Provider,{value:A,children:s})},\"Provider\");o.displayName=t+\"Provider\";function i(r,s={}){const{optional:a=!1}=s,A=ee.useContext(n);if(A)return A;if(e!==void 0)return e;if(!a)throw new Error(`\\`${r}\\` must be used within \\`${t}\\``)}return s4(i,\"useContext\"),[o,i]}s4($Fo,\"createContext\");function Nx(t,e=[]){let n=[];function o(r,s){const a=ee.createContext(s);a.displayName=r+\"Context\";const A=n.length;n=[...n,s];const c=s4(u=\u003e{const{scope:g,children:h,...d}=u,p=g?.[t]?.[A]||a,m=ee.useMemo(()=\u003ed,Object.values(d));return K.jsx(p.Provider,{value:m,children:h})},\"Provider\");c.displayName=r+\"Provider\";function l(u,g,h={}){const{optional:d=!1}=h,p=g?.[t]?.[A]||a,m=ee.useContext(p);if(m)return m;if(s!==void 0)return s;if(!d)throw new Error(`\\`${u}\\` must be used within \\`${r}\\``)}return s4(l,\"useContext\"),[c,l]}s4(o,\"createContext\");const i=s4(()=\u003e{const r=n.map(s=\u003eee.createContext(s));return s4(function(a){const A=a?.[t]||r;return ee.useMemo(()=\u003e({[`__scope${t}`]:{...a,[t]:A}}),[a,A])},\"useScope\")},\"createScope\");return i.scopeName=t,[o,yFt(i,...e)]}s4(Nx,\"createContextScope\");function yFt(...t){const e=t[0];if(t.length===1)return e;const n=s4(()=\u003e{const o=t.map(i=\u003e({useScope:i(),scopeName:i.scopeName}));return s4(function(r){const s=o.reduce((a,{useScope:A,scopeName:c})=\u003e{const u=A(r)[`__scope${c}`];return{...a,...u}},{});return ee.useMemo(()=\u003e({[`__scope${e.scopeName}`]:s}),[s])},\"useComposedScopes\")},\"createScope\");return n.scopeName=e.scopeName,n}s4(yFt,\"composeContextScopes\");var qFo=Object.defineProperty,ADe=(t,e)=\u003eqFo(t,\"name\",{value:e,configurable:!0});function cDe(t,e){if(typeof t==\"function\")return t(e);t!=null\u0026\u0026(t.current=e)}ADe(cDe,\"setRef\");function _R(...t){return e=\u003e{let n=!1;const o=t.map(i=\u003e{const r=cDe(i,e);return!n\u0026\u0026typeof r==\"function\"\u0026\u0026(n=!0),r});if(n)return()=\u003e{for(let i=0;i\u003co.length;i++){const r=o[i];typeof r==\"function\"?r():cDe(t[i],null)}}}}ADe(_R,\"composeRefs\");function $A(...t){return ee.useCallback(_R(...t),t)}ADe($A,\"useComposedRefs\");var XFo=Object.defineProperty,PB=(t,e)=\u003eXFo(t,\"name\",{value:e,configurable:!0});function MB(t){const e=ee.forwardRef((n,o)=\u003e{let{children:i,...r}=n,s=null,a=!1;const A=[];lDe(i)\u0026\u0026typeof ege==\"function\"\u0026\u0026(i=ege(i._payload)),ee.Children.forEach(i,g=\u003e{if(SFt(g)){a=!0;const h=g;let d=\"child\"in h.props?h.props.child:h.props.children;lDe(d)\u0026\u0026typeof ege==\"function\"\u0026\u0026(d=ege(d._payload)),s=eLo(h,d),A.push(s?.props?.children)}else A.push(g)}),s?s=ee.cloneElement(s,void 0,A):!a\u0026\u0026ee.Children.count(i)===1\u0026\u0026ee.isValidElement(i)\u0026\u0026(s=i);const c=s?bFt(s):void 0,l=$A(o,c);if(!s){if(i||i===0)throw new Error(a?oLo(t):nLo(t));return i}const u=BFt(r,s.props??{});return s.type!==ee.Fragment\u0026\u0026(u.ref=o?l:c),ee.cloneElement(s,u)});return e.displayName=`${t}.Slot`,e}PB(MB,\"createSlot\");var ZFo=MB(\"Slot\"),xFt=Symbol.for(\"radix.slottable\");function EFt(t){const e=PB(n=\u003e\"child\"in n?n.children(n.child):n.children,\"Slottable\");return e.displayName=`${t}.Slottable`,e.__radixId=xFt,e}PB(EFt,\"createSlottable\");var eLo=PB((t,e)=\u003e{if(\"child\"in t.props){const n=t.props.child;return ee.isValidElement(n)?ee.cloneElement(n,void 0,t.props.children(n.props.children)):null}return ee.isValidElement(e)?e:null},\"getSlottableElementFromSlottable\");function BFt(t,e){const n={...e};for(const o in e){const i=t[o],r=e[o];/^on[A-Z]/.test(o)?i\u0026\u0026r?n[o]=(...a)=\u003e{const A=r(...a);return i(...a),A}:i\u0026\u0026(n[o]=i):o===\"style\"?n[o]={...i,...r}:o===\"className\"\u0026\u0026(n[o]=[i,r].filter(Boolean).join(\" \"))}return{...t,...n}}PB(BFt,\"mergeProps\");function bFt(t){let e=Object.getOwnPropertyDescriptor(t.props,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}PB(bFt,\"getElementRef\");function SFt(t){return ee.isValidElement(t)\u0026\u0026typeof t.type==\"function\"\u0026\u0026\"__radixId\"in t.type\u0026\u0026t.type.__radixId===xFt}PB(SFt,\"isSlottable\");var tLo=Symbol.for(\"react.lazy\");function lDe(t){return t!=null\u0026\u0026typeof t==\"object\"\u0026\u0026\"$typeof\"in t\u0026\u0026t.$typeof===tLo\u0026\u0026\"_payload\"in t\u0026\u0026QFt(t._payload)}PB(lDe,\"isLazyComponent\");function QFt(t){return typeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"then\"in t}PB(QFt,\"isPromiseLike\");var nLo=PB(t=\u003e`${t} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`,\"createSlotError\"),oLo=PB(t=\u003e`${t} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`,\"createSlottableError\"),ege=Q5[\" use \".trim().toString()],iLo=Object.defineProperty,o1=(t,e)=\u003eiLo(t,\"name\",{value:e,configurable:!0});function tge(t){const e=t+\"CollectionProvider\",[n,o]=Nx(e),[i,r]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=o1(p=\u003e{const{scope:m,children:_}=p,f=ee.useRef(null),I=ee.useRef(new Map).current;return K.jsx(i,{scope:m,itemMap:I,collectionRef:f,children:_})},\"CollectionProvider\");s.displayName=e;const a=t+\"CollectionSlot\",A=MB(a),c=ee.forwardRef((p,m)=\u003e{const{scope:_,children:f}=p,I=r(a,_),C=$A(m,I.collectionRef);return K.jsx(A,{ref:C,children:f})});c.displayName=a;const l=t+\"CollectionItemSlot\",u=\"data-radix-collection-item\",g=MB(l),h=ee.forwardRef((p,m)=\u003e{const{scope:_,children:f,...I}=p,C=ee.useRef(null),y=$A(m,C),x=r(l,_);return ee.useEffect(()=\u003e(x.itemMap.set(C,{ref:C,...I}),()=\u003e{x.itemMap.delete(C)})),K.jsx(g,{[u]:\"\",ref:y,children:f})});h.displayName=l;function d(p){const m=r(t+\"CollectionConsumer\",p);return ee.useCallback(()=\u003e{const f=m.collectionRef.current;if(!f)return[];const I=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((x,E)=\u003eI.indexOf(x.ref.current)-I.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return o1(d,\"useCollection\"),[{Provider:s,Slot:c,ItemSlot:h},d,o]}o1(tge,\"createCollection\");var vFt=new WeakMap,uDe=(YE=class extends Map{constructor(n){super(n);uit(this,h_);Yte(this,h_,[...super.keys()]),vFt.set(this,!0)}set(n,o){return vFt.get(this)\u0026\u0026(this.has(n)?w0(this,h_)[w0(this,h_).indexOf(n)]=n:w0(this,h_).push(n)),super.set(n,o),this}insert(n,o,i){const r=this.has(o),s=w0(this,h_).length,a=gDe(n);let A=a\u003e=0?a:s+a;const c=A\u003c0||A\u003e=s?-1:A;if(c===this.size||r\u0026\u0026c===this.size-1||c===-1)return this.set(o,i),this;const l=this.size+(r?0:1);a\u003c0\u0026\u0026A++;const u=[...w0(this,h_)];let g,h=!1;for(let d=A;d\u003cl;d++)if(A===d){let p=u[d];u[d]===o\u0026\u0026(p=u[d+1]),r\u0026\u0026this.delete(o),g=this.get(p),this.set(o,i)}else{!h\u0026\u0026u[d-1]===o\u0026\u0026(h=!0);const p=u[h?d:d-1],m=g;g=this.get(p),this.delete(p),this.set(p,m)}return this}with(n,o,i){const r=new YE(this);return r.insert(n,o,i),r}before(n){const o=w0(this,h_).indexOf(n)-1;if(!(o\u003c0))return this.entryAt(o)}setBefore(n,o,i){const r=w0(this,h_).indexOf(n);return r===-1?this:this.insert(r,o,i)}after(n){let o=w0(this,h_).indexOf(n);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(n,o,i){const r=w0(this,h_).indexOf(n);return r===-1?this:this.insert(r+1,o,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Yte(this,h_,[]),super.clear()}delete(n){const o=super.delete(n);return o\u0026\u0026w0(this,h_).splice(w0(this,h_).indexOf(n),1),o}deleteAt(n){const o=this.keyAt(n);return o!==void 0?this.delete(o):!1}at(n){const o=nge(w0(this,h_),n);if(o!==void 0)return this.get(o)}entryAt(n){const o=nge(w0(this,h_),n);if(o!==void 0)return[o,this.get(o)]}indexOf(n){return w0(this,h_).indexOf(n)}keyAt(n){return nge(w0(this,h_),n)}from(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r\u003c0\u0026\u0026(r=0),r\u003e=this.size\u0026\u0026(r=this.size-1),this.at(r)}keyFrom(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r\u003c0\u0026\u0026(r=0),r\u003e=this.size\u0026\u0026(r=this.size-1),this.keyAt(r)}find(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return r;i++}}findIndex(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return i;i++}return-1}filter(n,o){const i=[];let r=0;for(const s of this)Reflect.apply(n,o,[s,r,this])\u0026\u0026i.push(s),r++;return new YE(i)}map(n,o){const i=[];let r=0;for(const s of this)i.push([s[0],Reflect.apply(n,o,[s,r,this])]),r++;return new YE(i)}reduce(...n){const[o,i]=n;let r=0,s=i??this.at(0);for(const a of this)r===0\u0026\u0026n.length===1?s=a:s=Reflect.apply(o,this,[s,a,r,this]),r++;return s}reduceRight(...n){const[o,i]=n;let r=i??this.at(-1);for(let s=this.size-1;s\u003e=0;s--){const a=this.at(s);s===this.size-1\u0026\u0026n.length===1?r=a:r=Reflect.apply(o,this,[r,a,s,this])}return r}toSorted(n){const o=[...this.entries()].sort(n);return new YE(o)}toReversed(){const n=new YE;for(let o=this.size-1;o\u003e=0;o--){const i=this.keyAt(o),r=this.get(i);n.set(i,r)}return n}toSpliced(...n){const o=[...this.entries()];return o.splice(...n),new YE(o)}slice(n,o){const i=new YE;let r=this.size-1;if(n===void 0)return i;n\u003c0\u0026\u0026(n=n+this.size),o!==void 0\u0026\u0026o\u003e0\u0026\u0026(r=o-1);for(let s=n;s\u003c=r;s++){const a=this.keyAt(s),A=this.get(a);i.set(a,A)}return i}every(n,o){let i=0;for(const r of this){if(!Reflect.apply(n,o,[r,i,this]))return!1;i++}return!0}some(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return!0;i++}return!1}},h_=new WeakMap,o1(YE,\"OrderedDict\"),YE);function nge(t,e){if(\"at\"in Array.prototype)return Array.prototype.at.call(t,e);const n=wFt(t,e);return n===-1?void 0:t[n]}o1(nge,\"at\");function wFt(t,e){const n=t.length,o=gDe(e),i=o\u003e=0?o:n+o;return i\u003c0||i\u003e=n?-1:i}o1(wFt,\"toSafeIndex\");function gDe(t){return t!==t||t===0?0:Math.trunc(t)}o1(gDe,\"toSafeInteger\");function rLo(t){const e=t+\"CollectionProvider\",[n,o]=Nx(e),[i,r]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new uDe,setItemMap:o1(()=\u003e{},\"setItemMap\")}),s=o1(({state:I,...C})=\u003eI?K.jsx(A,{...C,state:I}):K.jsx(a,{...C}),\"CollectionProvider\");s.displayName=e;const a=o1(I=\u003e{const C=m();return K.jsx(A,{...I,state:C})},\"CollectionInit\");a.displayName=e+\"Init\";const A=o1(I=\u003e{const{scope:C,children:y,state:x}=I,E=ee.useRef(null),[B,S]=ee.useState(null),Q=$A(E,S),[w,M]=x;return ee.useEffect(()=\u003e{if(!B)return;const k=DFt(()=\u003e{});return k.observe(B,{childList:!0,subtree:!0}),()=\u003e{k.disconnect()}},[B]),K.jsx(i,{scope:C,itemMap:w,setItemMap:M,collectionRef:Q,collectionRefObject:E,collectionElement:B,children:y})},\"CollectionProviderImpl\");A.displayName=e+\"Impl\";const c=t+\"CollectionSlot\",l=MB(c),u=ee.forwardRef((I,C)=\u003e{const{scope:y,children:x}=I,E=r(c,y),B=$A(C,E.collectionRef);return K.jsx(l,{ref:B,children:x})});u.displayName=c;const g=t+\"CollectionItemSlot\",h=\"data-radix-collection-item\",d=MB(g),p=ee.forwardRef((I,C)=\u003e{const{scope:y,children:x,...E}=I,B=ee.useRef(null),[S,Q]=ee.useState(null),w=$A(C,B,Q),M=r(g,y),{setItemMap:k}=M,R=ee.useRef(E);PFt(R.current,E)||(R.current=E);const F=R.current;return ee.useEffect(()=\u003e{const O=F;return k(U=\u003eS?U.has(S)?U.set(S,{...O,element:S}).toSorted(dDe):(U.set(S,{...O,element:S}),U.toSorted(dDe)):U),()=\u003e{k(U=\u003e!S||!U.has(S)?U:(U.delete(S),new uDe(U)))}},[S,F,k]),K.jsx(d,{[h]:\"\",ref:w,children:x})});p.displayName=g;function m(){return ee.useState(new uDe)}o1(m,\"useInitCollection\");function _(I){const{itemMap:C}=r(t+\"CollectionConsumer\",I);return C}return o1(_,\"useCollection\"),[{Provider:s,Slot:u,ItemSlot:p},{createCollectionScope:o,useCollection:_,useInitCollection:m}]}o1(rLo,\"createCollection\");function PFt(t,e){if(t===e)return!0;if(typeof t!=\"object\"||typeof e!=\"object\"||t==null||e==null)return!1;const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(e,i)||t[i]!==e[i])return!1;return!0}o1(PFt,\"shallowEqual\");function MFt(t,e){return!!(e.compareDocumentPosition(t)\u0026Node.DOCUMENT_POSITION_PRECEDING)}o1(MFt,\"isElementPreceding\");function dDe(t,e){return!t[1].element||!e[1].element?0:MFt(t[1].element,e[1].element)?-1:1}o1(dDe,\"sortByDocumentPosition\");function DFt(t){return new MutationObserver(n=\u003e{for(const o of n)if(o.type===\"childList\"){t();return}})}o1(DFt,\"getChildListObserver\");var Ep=globalThis?.document?ee.useLayoutEffect:()=\u003e{},sLo=Object.defineProperty,aLo=(t,e)=\u003esLo(t,\"name\",{value:e,configurable:!0}),ALo=Q5[\" useId \".trim().toString()]||(()=\u003e{}),cLo=0;function t_(t){const[e,n]=ee.useState(ALo());return Ep(()=\u003e{t||n(o=\u003eo??String(cLo++))},[t]),t||(e?`radix-${e}`:\"\")}aLo(t_,\"useId\");var c6=Xye();const NFt=_y(c6);var lLo=Object.defineProperty,uLo=(t,e)=\u003elLo(t,\"name\",{value:e,configurable:!0}),gLo=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],Na=gLo.reduce((t,e)=\u003e{const n=MB(`Primitive.${e}`),o=ee.forwardRef((i,r)=\u003e{const{asChild:s,...a}=i,A=s?n:e;return typeof window\u003c\"u\"\u0026\u0026(window[Symbol.for(\"radix-ui\")]=!0),K.jsx(A,{...a,ref:r})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function hDe(t,e){t\u0026\u0026c6.flushSync(()=\u003et.dispatchEvent(e))}uLo(hDe,\"dispatchDiscreteCustomEvent\");var dLo=Object.defineProperty,hLo=(t,e)=\u003edLo(t,\"name\",{value:e,configurable:!0});function lE(t){const e=ee.useRef(t);return ee.useEffect(()=\u003e{e.current=t}),ee.useMemo(()=\u003e((...n)=\u003ee.current?.(...n)),[])}hLo(lE,\"useCallbackRef\");var pLo=Object.defineProperty,mLo=(t,e)=\u003epLo(t,\"name\",{value:e,configurable:!0}),RFt=Q5[\" useEffectEvent \".trim().toString()],TFt=Q5[\" useInsertionEffect \".trim().toString()];function kFt(t){if(typeof RFt==\"function\")return RFt(t);const e=ee.useRef(()=\u003e{throw new Error(\"Cannot call an event handler while rendering.\")});return typeof TFt==\"function\"?TFt(()=\u003e{e.current=t}):Ep(()=\u003e{e.current=t}),ee.useMemo(()=\u003e((...n)=\u003ee.current?.(...n)),[])}mLo(kFt,\"useEffectEvent\");var _Lo=Object.defineProperty,S$=(t,e)=\u003e_Lo(t,\"name\",{value:e,configurable:!0}),fLo=Q5[\" useInsertionEffect \".trim().toString()]||Ep;function DB({prop:t,defaultProp:e,onChange:n=S$(()=\u003e{},\"onChange\"),caller:o}){const[i,r,s]=FFt({defaultProp:e,onChange:n}),a=t!==void 0,A=a?t:i,c=ee.useCallback(l=\u003e{if(a){const u=LFt(l)?l(t):l;u!==t\u0026\u0026s.current?.(u)}else r(l)},[a,t,r,s]);return[A,c]}S$(DB,\"useControllableState\");function FFt({defaultProp:t,onChange:e}){const[n,o]=ee.useState(t),i=ee.useRef(n),r=ee.useRef(e);return fLo(()=\u003e{r.current=e},[e]),ee.useEffect(()=\u003e{i.current!==n\u0026\u0026(r.current?.(n),i.current=n)},[n,i]),[n,o,r]}S$(FFt,\"useUncontrolledState\");function LFt(t){return typeof t==\"function\"}S$(LFt,\"isFunction\");var HFt=Symbol(\"RADIX:SYNC_STATE\");function ILo(t,e,n,o){const{prop:i,defaultProp:r,onChange:s,caller:a}=e,A=i!==void 0,c=kFt(s),l=[{...n,state:r}];o\u0026\u0026l.push(o);const[u,g]=ee.useReducer((m,_)=\u003e{if(_.type===HFt)return{...m,state:_.state};const f=t(m,_);return A\u0026\u0026!Object.is(f.state,m.state)\u0026\u0026c(f.state),f},...l),h=u.state,d=ee.useRef(h);ee.useEffect(()=\u003e{d.current!==h\u0026\u0026(d.current=h,A||c(h))},[h,d,A]);const p=ee.useMemo(()=\u003ei!==void 0?{...u,state:i}:u,[u,i]);return ee.useEffect(()=\u003e{A\u0026\u0026!Object.is(i,u.state)\u0026\u0026g({type:HFt,state:i})},[i,u.state,A]),[p,g]}S$(ILo,\"useControllableStateReducer\");var CLo=Object.defineProperty,yLo=(t,e)=\u003eCLo(t,\"name\",{value:e,configurable:!0}),xLo=ee.createContext(void 0);function Q$(t){const e=ee.useContext(xLo);return t||e||\"ltr\"}yLo(Q$,\"useDirection\");var ELo=Object.defineProperty,pDe=(t,e)=\u003eELo(t,\"name\",{value:e,configurable:!0}),mDe=!1;function OFt(){const[t,e]=ee.useState(mDe);return ee.useEffect(()=\u003e{mDe||(mDe=!0,e(!0))},[]),t}pDe(OFt,\"useIsHydrated\");var GFt=Q5[\" useSyncExternalStore \".trim().toString()];function YFt(){return()=\u003e{}}pDe(YFt,\"subscribe\");function UFt(){return GFt(YFt,()=\u003e!0,()=\u003e!1)}pDe(UFt,\"useIsHydratedModern\");var BLo=typeof GFt==\"function\"?UFt:OFt,bLo=Object.defineProperty,fR=(t,e)=\u003ebLo(t,\"name\",{value:e,configurable:!0}),_De=\"rovingFocusGroup.onEntryFocus\",SLo={bubbles:!1,cancelable:!0},oge=\"RovingFocusGroup\",[fDe,KFt,QLo]=tge(oge),[vLo,ige]=Nx(oge,[QLo]),[wLo,PLo]=vLo(oge),MLo=ee.forwardRef(fR(function(e,n){return K.jsx(fDe.Provider,{scope:e.__scopeRovingFocusGroup,children:K.jsx(fDe.Slot,{scope:e.__scopeRovingFocusGroup,children:K.jsx(DLo,{...e,ref:n})})})},\"RovingFocusGroup\")),DLo=ee.forwardRef(fR(function(e,n){const{__scopeRovingFocusGroup:o,orientation:i,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:A,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...g}=e,h=ee.useRef(null),d=$A(n,h),p=Q$(s),[m,_]=DB({prop:a,defaultProp:A??null,onChange:c,caller:oge}),[f,I]=ee.useState(!1),C=lE(l),y=KFt(o),x=ee.useRef(!1),[E,B]=ee.useState(0);return ee.useEffect(()=\u003e{const S=h.current;if(S)return S.addEventListener(_De,C),()=\u003eS.removeEventListener(_De,C)},[C]),K.jsx(wLo,{scope:o,orientation:i,dir:p,loop:r,currentTabStopId:m,onItemFocus:ee.useCallback(S=\u003e_(S),[_]),onItemShiftTab:ee.useCallback(()=\u003eI(!0),[]),onFocusableItemAdd:ee.useCallback(()=\u003eB(S=\u003eS+1),[]),onFocusableItemRemove:ee.useCallback(()=\u003eB(S=\u003eS-1),[]),children:K.jsx(Na.div,{tabIndex:f||E===0?-1:0,\"data-orientation\":i,...g,ref:d,style:{outline:\"none\",...e.style},onMouseDown:ar(e.onMouseDown,()=\u003e{x.current=!0}),onFocus:ar(e.onFocus,S=\u003e{const Q=!x.current;if(S.target===S.currentTarget\u0026\u0026Q\u0026\u0026!f){const w=new CustomEvent(_De,SLo);if(S.currentTarget.dispatchEvent(w),!w.defaultPrevented){const M=y().filter(U=\u003eU.focusable),k=M.find(U=\u003eU.active),R=M.find(U=\u003eU.id===m),O=[k,R,...M].filter(Boolean).map(U=\u003eU.ref.current);IDe(O,u)}}x.current=!1}),onBlur:ar(e.onBlur,()=\u003eI(!1))})})},\"RovingFocusGroupImpl\")),NLo=\"RovingFocusGroupItem\",RLo=ee.forwardRef(fR(function(e,n){const{__scopeRovingFocusGroup:o,focusable:i=!0,active:r=!1,tabStopId:s,children:a,...A}=e,c=t_(),l=s||c,u=PLo(NLo,o),g=u.currentTabStopId===l,h=KFt(o),{onFocusableItemAdd:d,onFocusableItemRemove:p,currentTabStopId:m}=u,_=BLo();return Ep(()=\u003e{if(!(!_||!i))return d(),()=\u003ep()},[_,i,d,p]),ee.useEffect(()=\u003e{if(!(_||!i))return d(),()=\u003ep()},[_,i,d,p]),K.jsx(fDe.ItemSlot,{scope:o,id:l,focusable:i,active:r,children:K.jsx(Na.span,{tabIndex:g?0:-1,\"data-orientation\":u.orientation,...A,ref:n,onMouseDown:ar(e.onMouseDown,f=\u003e{i?u.onItemFocus(l):f.preventDefault()}),onFocus:ar(e.onFocus,()=\u003eu.onItemFocus(l)),onKeyDown:ar(e.onKeyDown,f=\u003e{if(f.key===\"Tab\"\u0026\u0026f.shiftKey){u.onItemShiftTab();return}if(f.target!==f.currentTarget)return;const I=zFt(f,u.orientation,u.dir);if(I!==void 0){if(f.metaKey||f.ctrlKey||f.altKey||f.shiftKey)return;f.preventDefault();let y=h().filter(x=\u003ex.focusable).map(x=\u003ex.ref.current);if(I===\"last\")y.reverse();else if(I===\"prev\"||I===\"next\"){I===\"prev\"\u0026\u0026y.reverse();const x=y.indexOf(f.currentTarget);y=u.loop?JFt(y,x+1):y.slice(x+1)}setTimeout(()=\u003eIDe(y))}}),children:typeof a==\"function\"?a({isCurrentTabStop:g,hasTabStop:m!=null}):a})})},\"RovingFocusGroupItem\")),TLo={ArrowLeft:\"prev\",ArrowUp:\"prev\",ArrowRight:\"next\",ArrowDown:\"next\",PageUp:\"first\",Home:\"first\",PageDown:\"last\",End:\"last\"};function VFt(t,e){return e!==\"rtl\"?t:t===\"ArrowLeft\"?\"ArrowRight\":t===\"ArrowRight\"?\"ArrowLeft\":t}fR(VFt,\"getDirectionAwareKey\");function zFt(t,e,n){const o=VFt(t.key,n);if(!(e===\"vertical\"\u0026\u0026[\"ArrowLeft\",\"ArrowRight\"].includes(o))\u0026\u0026!(e===\"horizontal\"\u0026\u0026[\"ArrowUp\",\"ArrowDown\"].includes(o)))return TLo[o]}fR(zFt,\"getFocusIntent\");function IDe(t,e=!1){const n=document.activeElement;for(const o of t)if(o===n||(o.focus({preventScroll:e}),document.activeElement!==n))return}fR(IDe,\"focusFirst\");function JFt(t,e){return t.map((n,o)=\u003et[(e+o)%t.length])}fR(JFt,\"wrapArray\");var WFt=MLo,jFt=RLo,kLo=Object.defineProperty,Lb=(t,e)=\u003ekLo(t,\"name\",{value:e,configurable:!0});function $Ft(t,e){return ee.useReducer((n,o)=\u003ee[n][o]??n,t)}Lb($Ft,\"useStateMachine\");var uE=Lb(t=\u003e{const{present:e,children:n}=t,o=qFt(e),i=typeof n==\"function\"?n({present:o.isPresent}):ee.Children.only(n),r=XFt(o.ref,ZFt(i));return typeof n==\"function\"||o.isPresent?ee.cloneElement(i,{ref:r}):null},\"Presence\");function qFt(t){const[e,n]=ee.useState(),o=ee.useRef(null),i=ee.useRef(t),r=ee.useRef(\"none\"),s=ee.useRef(void 0),a=t?\"mounted\":\"unmounted\",[A,c]=$Ft(a,{mounted:{UNMOUNT:\"unmounted\",ANIMATION_OUT:\"unmountSuspended\"},unmountSuspended:{MOUNT:\"mounted\",ANIMATION_END:\"unmounted\"},unmounted:{MOUNT:\"mounted\"}});return ee.useEffect(()=\u003e{A===\"mounted\"?(r.current=s.current??YO(o.current),s.current=void 0):r.current=\"none\"},[A]),Ep(()=\u003e{const l=o.current,u=i.current;if(u!==t){const h=r.current,d=YO(l);t?(s.current=d,c(\"MOUNT\")):d===\"none\"||l?.display===\"none\"?c(\"UNMOUNT\"):c(u\u0026\u0026h!==d?\"ANIMATION_OUT\":\"UNMOUNT\"),i.current=t}},[t,c]),Ep(()=\u003e{if(e){let l;const u=e.ownerDocument.defaultView??window,g=Lb(d=\u003e{const m=YO(o.current).includes(CSS.escape(d.animationName));if(d.target===e\u0026\u0026m\u0026\u0026(c(\"ANIMATION_END\"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode=\"forwards\",l=u.setTimeout(()=\u003e{e.style.animationFillMode===\"forwards\"\u0026\u0026(e.style.animationFillMode=_)})}},\"handleAnimationEnd\"),h=Lb(d=\u003e{d.target===e\u0026\u0026(r.current=YO(o.current))},\"handleAnimationStart\");return e.addEventListener(\"animationstart\",h),e.addEventListener(\"animationcancel\",g),e.addEventListener(\"animationend\",g),()=\u003e{u.clearTimeout(l),e.removeEventListener(\"animationstart\",h),e.removeEventListener(\"animationcancel\",g),e.removeEventListener(\"animationend\",g)}}else c(\"ANIMATION_END\")},[e,c]),{isPresent:[\"mounted\",\"unmountSuspended\"].includes(A),ref:ee.useCallback(l=\u003e{if(l){const u=getComputedStyle(l);o.current=u,s.current=YO(u)}else o.current=null;n(l)},[])}}Lb(qFt,\"usePresence\");function CDe(t,e){if(typeof t==\"function\")return t(e);t!=null\u0026\u0026(t.current=e)}Lb(CDe,\"setRef\");function XFt(...t){const e=ee.useRef(t);return e.current=t,ee.useCallback(n=\u003e{const o=e.current;let i=!1;const r=o.map(s=\u003e{const a=CDe(s,n);return!i\u0026\u0026typeof a==\"function\"\u0026\u0026(i=!0),a});if(i)return()=\u003e{for(let s=0;s\u003cr.length;s++){const a=r[s];typeof a==\"function\"?a():CDe(o[s],null)}}},[])}Lb(XFt,\"useStableComposedRefs\");function YO(t){return t?.animationName||\"none\"}Lb(YO,\"getAnimationName\");function ZFt(t){let e=Object.getOwnPropertyDescriptor(t.props,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Lb(ZFt,\"getElementRef\");var FLo=Object.defineProperty,UO=(t,e)=\u003eFLo(t,\"name\",{value:e,configurable:!0}),yDe=\"Tabs\",[LLo,zhr]=Nx(yDe,[ige]),eLt=ige(),[HLo,xDe]=LLo(yDe),OLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,value:i,onValueChange:r,defaultValue:s,orientation:a=\"horizontal\",dir:A,activationMode:c=\"automatic\",...l}=e,u=Q$(A),[g,h]=DB({prop:i,onChange:r,defaultProp:s??\"\",caller:yDe});return K.jsx(HLo,{scope:o,baseId:t_(),value:g,onValueChange:h,orientation:a,dir:u,activationMode:c,children:K.jsx(Na.div,{dir:u,\"data-orientation\":a,...l,ref:n})})},\"Tabs\")),GLo=\"TabsList\",YLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,loop:i=!0,...r}=e,s=xDe(GLo,o),a=eLt(o);return K.jsx(WFt,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:i,children:K.jsx(Na.div,{role:\"tablist\",\"aria-orientation\":s.orientation,...r,ref:n})})},\"TabsList\")),ULo=\"TabsTrigger\",KLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,value:i,disabled:r=!1,...s}=e,a=xDe(ULo,o),A=eLt(o),c=EDe(a.baseId,i),l=BDe(a.baseId,i),u=i===a.value;return K.jsx(jFt,{asChild:!0,...A,focusable:!r,active:u,children:K.jsx(Na.button,{type:\"button\",role:\"tab\",\"aria-selected\":u,\"aria-controls\":l,\"data-state\":u?\"active\":\"inactive\",\"data-disabled\":r?\"\":void 0,disabled:r,id:c,...s,ref:n,onMouseDown:ar(e.onMouseDown,g=\u003e{!r\u0026\u0026g.button===0\u0026\u0026g.ctrlKey===!1?a.onValueChange(i):g.preventDefault()}),onKeyDown:ar(e.onKeyDown,g=\u003e{r||g.target!==g.currentTarget||[\" \",\"Enter\"].includes(g.key)\u0026\u0026a.onValueChange(i)}),onFocus:ar(e.onFocus,()=\u003e{const g=a.activationMode!==\"manual\";!u\u0026\u0026!r\u0026\u0026g\u0026\u0026a.onValueChange(i)})})})},\"TabsTrigger\")),VLo=\"TabsContent\",zLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,value:i,forceMount:r,children:s,...a}=e,A=xDe(VLo,o),c=EDe(A.baseId,i),l=BDe(A.baseId,i),u=i===A.value,g=ee.useRef(u);return ee.useEffect(()=\u003e{const h=requestAnimationFrame(()=\u003eg.current=!1);return()=\u003ecancelAnimationFrame(h)},[]),K.jsx(uE,{present:r||u,children:({present:h})=\u003eK.jsx(Na.div,{\"data-state\":u?\"active\":\"inactive\",\"data-orientation\":A.orientation,role:\"tabpanel\",\"aria-labelledby\":c,hidden:!h,id:l,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:g.current?\"0s\":void 0},children:h\u0026\u0026s})})},\"TabsContent\"));function EDe(t,e){return`${t}-trigger-${e}`}UO(EDe,\"makeTriggerId\");function BDe(t,e){return`${t}-content-${e}`}UO(BDe,\"makeContentId\");var JLo=OLo,tLt=YLo,nLt=KLo,oLt=zLo;function iLt(t){var e,n,o=\"\";if(typeof t==\"string\"||typeof t==\"number\")o+=t;else if(typeof t==\"object\")if(Array.isArray(t)){var i=t.length;for(e=0;e\u003ci;e++)t[e]\u0026\u0026(n=iLt(t[e]))\u0026\u0026(o\u0026\u0026(o+=\" \"),o+=n)}else for(n in t)t[n]\u0026\u0026(o\u0026\u0026(o+=\" \"),o+=n);return o}function NB(){for(var t,e,n=0,o=\"\",i=arguments.length;n\u003ci;n++)(t=arguments[n])\u0026\u0026(e=iLt(t))\u0026\u0026(o\u0026\u0026(o+=\" \"),o+=e);return o}const bDe=\"-\",WLo=t=\u003e{const e=$Lo(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:s=\u003e{const a=s.split(bDe);return a[0]===\"\"\u0026\u0026a.length!==1\u0026\u0026a.shift(),rLt(a,e)||jLo(s)},getConflictingClassGroupIds:(s,a)=\u003e{const A=n[s]||[];return a\u0026\u0026o[s]?[...A,...o[s]]:A}}},rLt=(t,e)=\u003e{if(t.length===0)return e.classGroupId;const n=t[0],o=e.nextPart.get(n),i=o?rLt(t.slice(1),o):void 0;if(i)return i;if(e.validators.length===0)return;const r=t.join(bDe);return e.validators.find(({validator:s})=\u003es(r))?.classGroupId},sLt=/^\\[(.+)\\]$/,jLo=t=\u003e{if(sLt.test(t)){const e=sLt.exec(t)[1],n=e?.substring(0,e.indexOf(\":\"));if(n)return\"arbitrary..\"+n}},$Lo=t=\u003e{const{theme:e,prefix:n}=t,o={nextPart:new Map,validators:[]};return XLo(Object.entries(t.classGroups),n).forEach(([r,s])=\u003e{SDe(s,o,r,e)}),o},SDe=(t,e,n,o)=\u003e{t.forEach(i=\u003e{if(typeof i==\"string\"){const r=i===\"\"?e:aLt(e,i);r.classGroupId=n;return}if(typeof i==\"function\"){if(qLo(i)){SDe(i(o),e,n,o);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([r,s])=\u003e{SDe(s,aLt(e,r),n,o)})})},aLt=(t,e)=\u003e{let n=t;return e.split(bDe).forEach(o=\u003e{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},qLo=t=\u003et.isThemeGetter,XLo=(t,e)=\u003ee?t.map(([n,o])=\u003e{const i=o.map(r=\u003etypeof r==\"string\"?e+r:typeof r==\"object\"?Object.fromEntries(Object.entries(r).map(([s,a])=\u003e[e+s,a])):r);return[n,i]}):t,ZLo=t=\u003e{if(t\u003c1)return{get:()=\u003e{},set:()=\u003e{}};let e=0,n=new Map,o=new Map;const i=(r,s)=\u003e{n.set(r,s),e++,e\u003et\u0026\u0026(e=0,o=n,n=new Map)};return{get(r){let s=n.get(r);if(s!==void 0)return s;if((s=o.get(r))!==void 0)return i(r,s),s},set(r,s){n.has(r)?n.set(r,s):i(r,s)}}},ALt=\"!\",eHo=t=\u003e{const{separator:e,experimentalParseClassName:n}=t,o=e.length===1,i=e[0],r=e.length,s=a=\u003e{const A=[];let c=0,l=0,u;for(let m=0;m\u003ca.length;m++){let _=a[m];if(c===0){if(_===i\u0026\u0026(o||a.slice(m,m+r)===e)){A.push(a.slice(l,m)),l=m+r;continue}if(_===\"/\"){u=m;continue}}_===\"[\"?c++:_===\"]\"\u0026\u0026c--}const g=A.length===0?a:a.substring(l),h=g.startsWith(ALt),d=h?g.substring(1):g,p=u\u0026\u0026u\u003el?u-l:void 0;return{modifiers:A,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:p}};return n?a=\u003en({className:a,parseClassName:s}):s},tHo=t=\u003e{if(t.length\u003c=1)return t;const e=[];let n=[];return t.forEach(o=\u003e{o[0]===\"[\"?(e.push(...n.sort(),o),n=[]):n.push(o)}),e.push(...n.sort()),e},nHo=t=\u003e({cache:ZLo(t.cacheSize),parseClassName:eHo(t),...WLo(t)}),oHo=/\\s+/,iHo=(t,e)=\u003e{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=e,r=[],s=t.trim().split(oHo);let a=\"\";for(let A=s.length-1;A\u003e=0;A-=1){const c=s[A],{modifiers:l,hasImportantModifier:u,baseClassName:g,maybePostfixModifierPosition:h}=n(c);let d=!!h,p=o(d?g.substring(0,h):g);if(!p){if(!d){a=c+(a.length\u003e0?\" \"+a:a);continue}if(p=o(g),!p){a=c+(a.length\u003e0?\" \"+a:a);continue}d=!1}const m=tHo(l).join(\":\"),_=u?m+ALt:m,f=_+p;if(r.includes(f))continue;r.push(f);const I=i(p,d);for(let C=0;C\u003cI.length;++C){const y=I[C];r.push(_+y)}a=c+(a.length\u003e0?\" \"+a:a)}return a};function rHo(){let t=0,e,n,o=\"\";for(;t\u003carguments.length;)(e=arguments[t++])\u0026\u0026(n=cLt(e))\u0026\u0026(o\u0026\u0026(o+=\" \"),o+=n);return o}const cLt=t=\u003e{if(typeof t==\"string\")return t;let e,n=\"\";for(let o=0;o\u003ct.length;o++)t[o]\u0026\u0026(e=cLt(t[o]))\u0026\u0026(n\u0026\u0026(n+=\" \"),n+=e);return n};function sHo(t,...e){let n,o,i,r=s;function s(A){const c=e.reduce((l,u)=\u003eu(l),t());return n=nHo(c),o=n.cache.get,i=n.cache.set,r=a,a(A)}function a(A){const c=o(A);if(c)return c;const l=iHo(A,n);return i(A,l),l}return function(){return r(rHo.apply(null,arguments))}}const _d=t=\u003e{const e=n=\u003en[t]||[];return e.isThemeGetter=!0,e},lLt=/^\\[(?:([a-z-]+):)?(.+)\\]$/i,aHo=/^\\d+\\/\\d+$/,AHo=new Set([\"px\",\"full\",\"screen\"]),cHo=/^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/,lHo=/\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/,uHo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/,gHo=/^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/,dHo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/,Hb=t=\u003eKO(t)||AHo.has(t)||aHo.test(t),ww=t=\u003eVO(t,\"length\",yHo),KO=t=\u003e!!t\u0026\u0026!Number.isNaN(Number(t)),QDe=t=\u003eVO(t,\"number\",KO),v$=t=\u003e!!t\u0026\u0026Number.isInteger(Number(t)),hHo=t=\u003et.endsWith(\"%\")\u0026\u0026KO(t.slice(0,-1)),LA=t=\u003elLt.test(t),Pw=t=\u003ecHo.test(t),pHo=new Set([\"length\",\"size\",\"percentage\"]),mHo=t=\u003eVO(t,pHo,uLt),_Ho=t=\u003eVO(t,\"position\",uLt),fHo=new Set([\"image\",\"url\"]),IHo=t=\u003eVO(t,fHo,EHo),CHo=t=\u003eVO(t,\"\",xHo),w$=()=\u003e!0,VO=(t,e,n)=\u003e{const o=lLt.exec(t);return o?o[1]?typeof e==\"string\"?o[1]===e:e.has(o[1]):n(o[2]):!1},yHo=t=\u003elHo.test(t)\u0026\u0026!uHo.test(t),uLt=()=\u003e!1,xHo=t=\u003egHo.test(t),EHo=t=\u003edHo.test(t),BHo=sHo(()=\u003e{const t=_d(\"colors\"),e=_d(\"spacing\"),n=_d(\"blur\"),o=_d(\"brightness\"),i=_d(\"borderColor\"),r=_d(\"borderRadius\"),s=_d(\"borderSpacing\"),a=_d(\"borderWidth\"),A=_d(\"contrast\"),c=_d(\"grayscale\"),l=_d(\"hueRotate\"),u=_d(\"invert\"),g=_d(\"gap\"),h=_d(\"gradientColorStops\"),d=_d(\"gradientColorStopPositions\"),p=_d(\"inset\"),m=_d(\"margin\"),_=_d(\"opacity\"),f=_d(\"padding\"),I=_d(\"saturate\"),C=_d(\"scale\"),y=_d(\"sepia\"),x=_d(\"skew\"),E=_d(\"space\"),B=_d(\"translate\"),S=()=\u003e[\"auto\",\"contain\",\"none\"],Q=()=\u003e[\"auto\",\"hidden\",\"clip\",\"visible\",\"scroll\"],w=()=\u003e[\"auto\",LA,e],M=()=\u003e[LA,e],k=()=\u003e[\"\",Hb,ww],R=()=\u003e[\"auto\",KO,LA],F=()=\u003e[\"bottom\",\"center\",\"left\",\"left-bottom\",\"left-top\",\"right\",\"right-bottom\",\"right-top\",\"top\"],O=()=\u003e[\"solid\",\"dashed\",\"dotted\",\"double\",\"none\"],U=()=\u003e[\"normal\",\"multiply\",\"screen\",\"overlay\",\"darken\",\"lighten\",\"color-dodge\",\"color-burn\",\"hard-light\",\"soft-light\",\"difference\",\"exclusion\",\"hue\",\"saturation\",\"color\",\"luminosity\"],Y=()=\u003e[\"start\",\"end\",\"center\",\"between\",\"around\",\"evenly\",\"stretch\"],W=()=\u003e[\"\",\"0\",LA],te=()=\u003e[\"auto\",\"avoid\",\"all\",\"avoid-page\",\"page\",\"left\",\"right\",\"column\"],j=()=\u003e[KO,LA];return{cacheSize:500,separator:\":\",theme:{colors:[w$],spacing:[Hb,ww],blur:[\"none\",\"\",Pw,LA],brightness:j(),borderColor:[t],borderRadius:[\"none\",\"\",\"full\",Pw,LA],borderSpacing:M(),borderWidth:k(),contrast:j(),grayscale:W(),hueRotate:j(),invert:W(),gap:M(),gradientColorStops:[t],gradientColorStopPositions:[hHo,ww],inset:w(),margin:w(),opacity:j(),padding:M(),saturate:j(),scale:j(),sepia:W(),skew:j(),space:M(),translate:M()},classGroups:{aspect:[{aspect:[\"auto\",\"square\",\"video\",LA]}],container:[\"container\"],columns:[{columns:[Pw]}],\"break-after\":[{\"break-after\":te()}],\"break-before\":[{\"break-before\":te()}],\"break-inside\":[{\"break-inside\":[\"auto\",\"avoid\",\"avoid-page\",\"avoid-column\"]}],\"box-decoration\":[{\"box-decoration\":[\"slice\",\"clone\"]}],box:[{box:[\"border\",\"content\"]}],display:[\"block\",\"inline-block\",\"inline\",\"flex\",\"inline-flex\",\"table\",\"inline-table\",\"table-caption\",\"table-cell\",\"table-column\",\"table-column-group\",\"table-footer-group\",\"table-header-group\",\"table-row-group\",\"table-row\",\"flow-root\",\"grid\",\"inline-grid\",\"contents\",\"list-item\",\"hidden\"],float:[{float:[\"right\",\"left\",\"none\",\"start\",\"end\"]}],clear:[{clear:[\"left\",\"right\",\"both\",\"none\",\"start\",\"end\"]}],isolation:[\"isolate\",\"isolation-auto\"],\"object-fit\":[{object:[\"contain\",\"cover\",\"fill\",\"none\",\"scale-down\"]}],\"object-position\":[{object:[...F(),LA]}],overflow:[{overflow:Q()}],\"overflow-x\":[{\"overflow-x\":Q()}],\"overflow-y\":[{\"overflow-y\":Q()}],overscroll:[{overscroll:S()}],\"overscroll-x\":[{\"overscroll-x\":S()}],\"overscroll-y\":[{\"overscroll-y\":S()}],position:[\"static\",\"fixed\",\"absolute\",\"relative\",\"sticky\"],inset:[{inset:[p]}],\"inset-x\":[{\"inset-x\":[p]}],\"inset-y\":[{\"inset-y\":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:[\"visible\",\"invisible\",\"collapse\"],z:[{z:[\"auto\",v$,LA]}],basis:[{basis:w()}],\"flex-direction\":[{flex:[\"row\",\"row-reverse\",\"col\",\"col-reverse\"]}],\"flex-wrap\":[{flex:[\"wrap\",\"wrap-reverse\",\"nowrap\"]}],flex:[{flex:[\"1\",\"auto\",\"initial\",\"none\",LA]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:[\"first\",\"last\",\"none\",v$,LA]}],\"grid-cols\":[{\"grid-cols\":[w$]}],\"col-start-end\":[{col:[\"auto\",{span:[\"full\",v$,LA]},LA]}],\"col-start\":[{\"col-start\":R()}],\"col-end\":[{\"col-end\":R()}],\"grid-rows\":[{\"grid-rows\":[w$]}],\"row-start-end\":[{row:[\"auto\",{span:[v$,LA]},LA]}],\"row-start\":[{\"row-start\":R()}],\"row-end\":[{\"row-end\":R()}],\"grid-flow\":[{\"grid-flow\":[\"row\",\"col\",\"dense\",\"row-dense\",\"col-dense\"]}],\"auto-cols\":[{\"auto-cols\":[\"auto\",\"min\",\"max\",\"fr\",LA]}],\"auto-rows\":[{\"auto-rows\":[\"auto\",\"min\",\"max\",\"fr\",LA]}],gap:[{gap:[g]}],\"gap-x\":[{\"gap-x\":[g]}],\"gap-y\":[{\"gap-y\":[g]}],\"justify-content\":[{justify:[\"normal\",...Y()]}],\"justify-items\":[{\"justify-items\":[\"start\",\"end\",\"center\",\"stretch\"]}],\"justify-self\":[{\"justify-self\":[\"auto\",\"start\",\"end\",\"center\",\"stretch\"]}],\"align-content\":[{content:[\"normal\",...Y(),\"baseline\"]}],\"align-items\":[{items:[\"start\",\"end\",\"center\",\"baseline\",\"stretch\"]}],\"align-self\":[{self:[\"auto\",\"start\",\"end\",\"center\",\"stretch\",\"baseline\"]}],\"place-content\":[{\"place-content\":[...Y(),\"baseline\"]}],\"place-items\":[{\"place-items\":[\"start\",\"end\",\"center\",\"baseline\",\"stretch\"]}],\"place-self\":[{\"place-self\":[\"auto\",\"start\",\"end\",\"center\",\"stretch\"]}],p:[{p:[f]}],px:[{px:[f]}],py:[{py:[f]}],ps:[{ps:[f]}],pe:[{pe:[f]}],pt:[{pt:[f]}],pr:[{pr:[f]}],pb:[{pb:[f]}],pl:[{pl:[f]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],\"space-x\":[{\"space-x\":[E]}],\"space-x-reverse\":[\"space-x-reverse\"],\"space-y\":[{\"space-y\":[E]}],\"space-y-reverse\":[\"space-y-reverse\"],w:[{w:[\"auto\",\"min\",\"max\",\"fit\",\"svw\",\"lvw\",\"dvw\",LA,e]}],\"min-w\":[{\"min-w\":[LA,e,\"min\",\"max\",\"fit\"]}],\"max-w\":[{\"max-w\":[LA,e,\"none\",\"full\",\"min\",\"max\",\"fit\",\"prose\",{screen:[Pw]},Pw]}],h:[{h:[LA,e,\"auto\",\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],\"min-h\":[{\"min-h\":[LA,e,\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],\"max-h\":[{\"max-h\":[LA,e,\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],size:[{size:[LA,e,\"auto\",\"min\",\"max\",\"fit\"]}],\"font-size\":[{text:[\"base\",Pw,ww]}],\"font-smoothing\":[\"antialiased\",\"subpixel-antialiased\"],\"font-style\":[\"italic\",\"not-italic\"],\"font-weight\":[{font:[\"thin\",\"extralight\",\"light\",\"normal\",\"medium\",\"semibold\",\"bold\",\"extrabold\",\"black\",QDe]}],\"font-family\":[{font:[w$]}],\"fvn-normal\":[\"normal-nums\"],\"fvn-ordinal\":[\"ordinal\"],\"fvn-slashed-zero\":[\"slashed-zero\"],\"fvn-figure\":[\"lining-nums\",\"oldstyle-nums\"],\"fvn-spacing\":[\"proportional-nums\",\"tabular-nums\"],\"fvn-fraction\":[\"diagonal-fractions\",\"stacked-fractions\"],tracking:[{tracking:[\"tighter\",\"tight\",\"normal\",\"wide\",\"wider\",\"widest\",LA]}],\"line-clamp\":[{\"line-clamp\":[\"none\",KO,QDe]}],leading:[{leading:[\"none\",\"tight\",\"snug\",\"normal\",\"relaxed\",\"loose\",Hb,LA]}],\"list-image\":[{\"list-image\":[\"none\",LA]}],\"list-style-type\":[{list:[\"none\",\"disc\",\"decimal\",LA]}],\"list-style-position\":[{list:[\"inside\",\"outside\"]}],\"placeholder-color\":[{placeholder:[t]}],\"placeholder-opacity\":[{\"placeholder-opacity\":[_]}],\"text-alignment\":[{text:[\"left\",\"center\",\"right\",\"justify\",\"start\",\"end\"]}],\"text-color\":[{text:[t]}],\"text-opacity\":[{\"text-opacity\":[_]}],\"text-decoration\":[\"underline\",\"overline\",\"line-through\",\"no-underline\"],\"text-decoration-style\":[{decoration:[...O(),\"wavy\"]}],\"text-decoration-thickness\":[{decoration:[\"auto\",\"from-font\",Hb,ww]}],\"underline-offset\":[{\"underline-offset\":[\"auto\",Hb,LA]}],\"text-decoration-color\":[{decoration:[t]}],\"text-transform\":[\"uppercase\",\"lowercase\",\"capitalize\",\"normal-case\"],\"text-overflow\":[\"truncate\",\"text-ellipsis\",\"text-clip\"],\"text-wrap\":[{text:[\"wrap\",\"nowrap\",\"balance\",\"pretty\"]}],indent:[{indent:M()}],\"vertical-align\":[{align:[\"baseline\",\"top\",\"middle\",\"bottom\",\"text-top\",\"text-bottom\",\"sub\",\"super\",LA]}],whitespace:[{whitespace:[\"normal\",\"nowrap\",\"pre\",\"pre-line\",\"pre-wrap\",\"break-spaces\"]}],break:[{break:[\"normal\",\"words\",\"all\",\"keep\"]}],hyphens:[{hyphens:[\"none\",\"manual\",\"auto\"]}],content:[{content:[\"none\",LA]}],\"bg-attachment\":[{bg:[\"fixed\",\"local\",\"scroll\"]}],\"bg-clip\":[{\"bg-clip\":[\"border\",\"padding\",\"content\",\"text\"]}],\"bg-opacity\":[{\"bg-opacity\":[_]}],\"bg-origin\":[{\"bg-origin\":[\"border\",\"padding\",\"content\"]}],\"bg-position\":[{bg:[...F(),_Ho]}],\"bg-repeat\":[{bg:[\"no-repeat\",{repeat:[\"\",\"x\",\"y\",\"round\",\"space\"]}]}],\"bg-size\":[{bg:[\"auto\",\"cover\",\"contain\",mHo]}],\"bg-image\":[{bg:[\"none\",{\"gradient-to\":[\"t\",\"tr\",\"r\",\"br\",\"b\",\"bl\",\"l\",\"tl\"]},IHo]}],\"bg-color\":[{bg:[t]}],\"gradient-from-pos\":[{from:[d]}],\"gradient-via-pos\":[{via:[d]}],\"gradient-to-pos\":[{to:[d]}],\"gradient-from\":[{from:[h]}],\"gradient-via\":[{via:[h]}],\"gradient-to\":[{to:[h]}],rounded:[{rounded:[r]}],\"rounded-s\":[{\"rounded-s\":[r]}],\"rounded-e\":[{\"rounded-e\":[r]}],\"rounded-t\":[{\"rounded-t\":[r]}],\"rounded-r\":[{\"rounded-r\":[r]}],\"rounded-b\":[{\"rounded-b\":[r]}],\"rounded-l\":[{\"rounded-l\":[r]}],\"rounded-ss\":[{\"rounded-ss\":[r]}],\"rounded-se\":[{\"rounded-se\":[r]}],\"rounded-ee\":[{\"rounded-ee\":[r]}],\"rounded-es\":[{\"rounded-es\":[r]}],\"rounded-tl\":[{\"rounded-tl\":[r]}],\"rounded-tr\":[{\"rounded-tr\":[r]}],\"rounded-br\":[{\"rounded-br\":[r]}],\"rounded-bl\":[{\"rounded-bl\":[r]}],\"border-w\":[{border:[a]}],\"border-w-x\":[{\"border-x\":[a]}],\"border-w-y\":[{\"border-y\":[a]}],\"border-w-s\":[{\"border-s\":[a]}],\"border-w-e\":[{\"border-e\":[a]}],\"border-w-t\":[{\"border-t\":[a]}],\"border-w-r\":[{\"border-r\":[a]}],\"border-w-b\":[{\"border-b\":[a]}],\"border-w-l\":[{\"border-l\":[a]}],\"border-opacity\":[{\"border-opacity\":[_]}],\"border-style\":[{border:[...O(),\"hidden\"]}],\"divide-x\":[{\"divide-x\":[a]}],\"divide-x-reverse\":[\"divide-x-reverse\"],\"divide-y\":[{\"divide-y\":[a]}],\"divide-y-reverse\":[\"divide-y-reverse\"],\"divide-opacity\":[{\"divide-opacity\":[_]}],\"divide-style\":[{divide:O()}],\"border-color\":[{border:[i]}],\"border-color-x\":[{\"border-x\":[i]}],\"border-color-y\":[{\"border-y\":[i]}],\"border-color-s\":[{\"border-s\":[i]}],\"border-color-e\":[{\"border-e\":[i]}],\"border-color-t\":[{\"border-t\":[i]}],\"border-color-r\":[{\"border-r\":[i]}],\"border-color-b\":[{\"border-b\":[i]}],\"border-color-l\":[{\"border-l\":[i]}],\"divide-color\":[{divide:[i]}],\"outline-style\":[{outline:[\"\",...O()]}],\"outline-offset\":[{\"outline-offset\":[Hb,LA]}],\"outline-w\":[{outline:[Hb,ww]}],\"outline-color\":[{outline:[t]}],\"ring-w\":[{ring:k()}],\"ring-w-inset\":[\"ring-inset\"],\"ring-color\":[{ring:[t]}],\"ring-opacity\":[{\"ring-opacity\":[_]}],\"ring-offset-w\":[{\"ring-offset\":[Hb,ww]}],\"ring-offset-color\":[{\"ring-offset\":[t]}],shadow:[{shadow:[\"\",\"inner\",\"none\",Pw,CHo]}],\"shadow-color\":[{shadow:[w$]}],opacity:[{opacity:[_]}],\"mix-blend\":[{\"mix-blend\":[...U(),\"plus-lighter\",\"plus-darker\"]}],\"bg-blend\":[{\"bg-blend\":U()}],filter:[{filter:[\"\",\"none\"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[A]}],\"drop-shadow\":[{\"drop-shadow\":[\"\",\"none\",Pw,LA]}],grayscale:[{grayscale:[c]}],\"hue-rotate\":[{\"hue-rotate\":[l]}],invert:[{invert:[u]}],saturate:[{saturate:[I]}],sepia:[{sepia:[y]}],\"backdrop-filter\":[{\"backdrop-filter\":[\"\",\"none\"]}],\"backdrop-blur\":[{\"backdrop-blur\":[n]}],\"backdrop-brightness\":[{\"backdrop-brightness\":[o]}],\"backdrop-contrast\":[{\"backdrop-contrast\":[A]}],\"backdrop-grayscale\":[{\"backdrop-grayscale\":[c]}],\"backdrop-hue-rotate\":[{\"backdrop-hue-rotate\":[l]}],\"backdrop-invert\":[{\"backdrop-invert\":[u]}],\"backdrop-opacity\":[{\"backdrop-opacity\":[_]}],\"backdrop-saturate\":[{\"backdrop-saturate\":[I]}],\"backdrop-sepia\":[{\"backdrop-sepia\":[y]}],\"border-collapse\":[{border:[\"collapse\",\"separate\"]}],\"border-spacing\":[{\"border-spacing\":[s]}],\"border-spacing-x\":[{\"border-spacing-x\":[s]}],\"border-spacing-y\":[{\"border-spacing-y\":[s]}],\"table-layout\":[{table:[\"auto\",\"fixed\"]}],caption:[{caption:[\"top\",\"bottom\"]}],transition:[{transition:[\"none\",\"all\",\"\",\"colors\",\"opacity\",\"shadow\",\"transform\",LA]}],duration:[{duration:j()}],ease:[{ease:[\"linear\",\"in\",\"out\",\"in-out\",LA]}],delay:[{delay:j()}],animate:[{animate:[\"none\",\"spin\",\"ping\",\"pulse\",\"bounce\",LA]}],transform:[{transform:[\"\",\"gpu\",\"none\"]}],scale:[{scale:[C]}],\"scale-x\":[{\"scale-x\":[C]}],\"scale-y\":[{\"scale-y\":[C]}],rotate:[{rotate:[v$,LA]}],\"translate-x\":[{\"translate-x\":[B]}],\"translate-y\":[{\"translate-y\":[B]}],\"skew-x\":[{\"skew-x\":[x]}],\"skew-y\":[{\"skew-y\":[x]}],\"transform-origin\":[{origin:[\"center\",\"top\",\"top-right\",\"right\",\"bottom-right\",\"bottom\",\"bottom-left\",\"left\",\"top-left\",LA]}],accent:[{accent:[\"auto\",t]}],appearance:[{appearance:[\"none\",\"auto\"]}],cursor:[{cursor:[\"auto\",\"default\",\"pointer\",\"wait\",\"text\",\"move\",\"help\",\"not-allowed\",\"none\",\"context-menu\",\"progress\",\"cell\",\"crosshair\",\"vertical-text\",\"alias\",\"copy\",\"no-drop\",\"grab\",\"grabbing\",\"all-scroll\",\"col-resize\",\"row-resize\",\"n-resize\",\"e-resize\",\"s-resize\",\"w-resize\",\"ne-resize\",\"nw-resize\",\"se-resize\",\"sw-resize\",\"ew-resize\",\"ns-resize\",\"nesw-resize\",\"nwse-resize\",\"zoom-in\",\"zoom-out\",LA]}],\"caret-color\":[{caret:[t]}],\"pointer-events\":[{\"pointer-events\":[\"none\",\"auto\"]}],resize:[{resize:[\"none\",\"y\",\"x\",\"\"]}],\"scroll-behavior\":[{scroll:[\"auto\",\"smooth\"]}],\"scroll-m\":[{\"scroll-m\":M()}],\"scroll-mx\":[{\"scroll-mx\":M()}],\"scroll-my\":[{\"scroll-my\":M()}],\"scroll-ms\":[{\"scroll-ms\":M()}],\"scroll-me\":[{\"scroll-me\":M()}],\"scroll-mt\":[{\"scroll-mt\":M()}],\"scroll-mr\":[{\"scroll-mr\":M()}],\"scroll-mb\":[{\"scroll-mb\":M()}],\"scroll-ml\":[{\"scroll-ml\":M()}],\"scroll-p\":[{\"scroll-p\":M()}],\"scroll-px\":[{\"scroll-px\":M()}],\"scroll-py\":[{\"scroll-py\":M()}],\"scroll-ps\":[{\"scroll-ps\":M()}],\"scroll-pe\":[{\"scroll-pe\":M()}],\"scroll-pt\":[{\"scroll-pt\":M()}],\"scroll-pr\":[{\"scroll-pr\":M()}],\"scroll-pb\":[{\"scroll-pb\":M()}],\"scroll-pl\":[{\"scroll-pl\":M()}],\"snap-align\":[{snap:[\"start\",\"end\",\"center\",\"align-none\"]}],\"snap-stop\":[{snap:[\"normal\",\"always\"]}],\"snap-type\":[{snap:[\"none\",\"x\",\"y\",\"both\"]}],\"snap-strictness\":[{snap:[\"mandatory\",\"proximity\"]}],touch:[{touch:[\"auto\",\"none\",\"manipulation\"]}],\"touch-x\":[{\"touch-pan\":[\"x\",\"left\",\"right\"]}],\"touch-y\":[{\"touch-pan\":[\"y\",\"up\",\"down\"]}],\"touch-pz\":[\"touch-pinch-zoom\"],select:[{select:[\"none\",\"text\",\"all\",\"auto\"]}],\"will-change\":[{\"will-change\":[\"auto\",\"scroll\",\"contents\",\"transform\",LA]}],fill:[{fill:[t,\"none\"]}],\"stroke-w\":[{stroke:[Hb,ww,QDe]}],stroke:[{stroke:[t,\"none\"]}],sr:[\"sr-only\",\"not-sr-only\"],\"forced-color-adjust\":[{\"forced-color-adjust\":[\"auto\",\"none\"]}]},conflictingClassGroups:{overflow:[\"overflow-x\",\"overflow-y\"],overscroll:[\"overscroll-x\",\"overscroll-y\"],inset:[\"inset-x\",\"inset-y\",\"start\",\"end\",\"top\",\"right\",\"bottom\",\"left\"],\"inset-x\":[\"right\",\"left\"],\"inset-y\":[\"top\",\"bottom\"],flex:[\"basis\",\"grow\",\"shrink\"],gap:[\"gap-x\",\"gap-y\"],p:[\"px\",\"py\",\"ps\",\"pe\",\"pt\",\"pr\",\"pb\",\"pl\"],px:[\"pr\",\"pl\"],py:[\"pt\",\"pb\"],m:[\"mx\",\"my\",\"ms\",\"me\",\"mt\",\"mr\",\"mb\",\"ml\"],mx:[\"mr\",\"ml\"],my:[\"mt\",\"mb\"],size:[\"w\",\"h\"],\"font-size\":[\"leading\"],\"fvn-normal\":[\"fvn-ordinal\",\"fvn-slashed-zero\",\"fvn-figure\",\"fvn-spacing\",\"fvn-fraction\"],\"fvn-ordinal\":[\"fvn-normal\"],\"fvn-slashed-zero\":[\"fvn-normal\"],\"fvn-figure\":[\"fvn-normal\"],\"fvn-spacing\":[\"fvn-normal\"],\"fvn-fraction\":[\"fvn-normal\"],\"line-clamp\":[\"display\",\"overflow\"],rounded:[\"rounded-s\",\"rounded-e\",\"rounded-t\",\"rounded-r\",\"rounded-b\",\"rounded-l\",\"rounded-ss\",\"rounded-se\",\"rounded-ee\",\"rounded-es\",\"rounded-tl\",\"rounded-tr\",\"rounded-br\",\"rounded-bl\"],\"rounded-s\":[\"rounded-ss\",\"rounded-es\"],\"rounded-e\":[\"rounded-se\",\"rounded-ee\"],\"rounded-t\":[\"rounded-tl\",\"rounded-tr\"],\"rounded-r\":[\"rounded-tr\",\"rounded-br\"],\"rounded-b\":[\"rounded-br\",\"rounded-bl\"],\"rounded-l\":[\"rounded-tl\",\"rounded-bl\"],\"border-spacing\":[\"border-spacing-x\",\"border-spacing-y\"],\"border-w\":[\"border-w-s\",\"border-w-e\",\"border-w-t\",\"border-w-r\",\"border-w-b\",\"border-w-l\"],\"border-w-x\":[\"border-w-r\",\"border-w-l\"],\"border-w-y\":[\"border-w-t\",\"border-w-b\"],\"border-color\":[\"border-color-s\",\"border-color-e\",\"border-color-t\",\"border-color-r\",\"border-color-b\",\"border-color-l\"],\"border-color-x\":[\"border-color-r\",\"border-color-l\"],\"border-color-y\":[\"border-color-t\",\"border-color-b\"],\"scroll-m\":[\"scroll-mx\",\"scroll-my\",\"scroll-ms\",\"scroll-me\",\"scroll-mt\",\"scroll-mr\",\"scroll-mb\",\"scroll-ml\"],\"scroll-mx\":[\"scroll-mr\",\"scroll-ml\"],\"scroll-my\":[\"scroll-mt\",\"scroll-mb\"],\"scroll-p\":[\"scroll-px\",\"scroll-py\",\"scroll-ps\",\"scroll-pe\",\"scroll-pt\",\"scroll-pr\",\"scroll-pb\",\"scroll-pl\"],\"scroll-px\":[\"scroll-pr\",\"scroll-pl\"],\"scroll-py\":[\"scroll-pt\",\"scroll-pb\"],touch:[\"touch-x\",\"touch-y\",\"touch-pz\"],\"touch-x\":[\"touch\"],\"touch-y\":[\"touch\"],\"touch-pz\":[\"touch\"]},conflictingClassGroupModifiers:{\"font-size\":[\"leading\"]}}}),Fn=\"u\"\u003etypeof window?window:void 0,vC=\"u\"\u003etypeof globalThis?globalThis:Fn,tf=vC?.navigator,No=vC?.document,fd=vC?.location,P$=vC?.fetch,vDe=vC?.XMLHttpRequest\u0026\u0026\"withCredentials\"in new vC.XMLHttpRequest?vC.XMLHttpRequest:void 0,gLt=vC?.AbortController,bHo=vC?.CompressionStream,jy=tf?.userAgent;function dLt(){return!(!Fn||Fn.navigator.onLine===!1)}const M$=typeof globalThis\u003c\"u\"?globalThis:Fn;M$\u0026\u0026typeof self\u003e\"u\"\u0026\u0026(M$.self=M$),M$\u0026\u0026typeof File\u003e\"u\"\u0026\u0026(M$.File=function(){});const Vr=Fn??{},SHo=\"0.9.1\",Ob={DEBUG:!1,LIB_VERSION:SHo,LIB_NAME:\"browser-common\"};var l6=(function(t){return t.AnonymousId=\"anonymous_id\",t.DistinctId=\"distinct_id\",t.Props=\"props\",t.EnablePersonProcessing=\"enable_person_processing\",t.PersonMode=\"person_mode\",t.FeatureFlagDetails=\"feature_flag_details\",t.FeatureFlags=\"feature_flags\",t.FeatureFlagPayloads=\"feature_flag_payloads\",t.BootstrapFeatureFlagDetails=\"bootstrap_feature_flag_details\",t.BootstrapFeatureFlags=\"bootstrap_feature_flags\",t.BootstrapFeatureFlagPayloads=\"bootstrap_feature_flag_payloads\",t.OverrideFeatureFlags=\"override_feature_flags\",t.Queue=\"queue\",t.AiQueue=\"ai_queue\",t.AiCaptureQueue=\"ai_capture_queue\",t.LogsQueue=\"logs_queue\",t.OptedOut=\"opted_out\",t.SessionId=\"session_id\",t.SessionStartTimestamp=\"session_start_timestamp\",t.SessionLastTimestamp=\"session_timestamp\",t.PersonProperties=\"person_properties\",t.GroupProperties=\"group_properties\",t.InstalledAppBuild=\"installed_app_build\",t.InstalledAppVersion=\"installed_app_version\",t.SessionReplay=\"session_replay\",t.PushRegistered=\"push_registered\",t.SessionReplayEventTriggerActivatedSession=\"session_replay_event_trigger_activated_session\",t.SurveyLastSeenDate=\"survey_last_seen_date\",t.SurveysInProgress=\"surveys_in_progress\",t.SurveysSeen=\"surveys_seen\",t.Surveys=\"surveys\",t.RemoteConfig=\"remote_config\",t.FlagsEndpointWasHit=\"flags_endpoint_was_hit\",t.DeviceId=\"device_id\",t})({}),wDe=(function(t){return t.GZipJS=\"gzip-js\",t.Base64=\"base64\",t})({});const QHo=[\"$snapshot\",\"$pageview\",\"$pageleave\",\"$set\",\"survey dismissed\",\"survey sent\",\"survey shown\",\"$identify\",\"$groupidentify\",\"$create_alias\",\"$client_ingestion_warning\",\"$web_experiment_applied\",\"$feature_enrollment_update\",\"$feature_flag_called\"],vHo=[\"token\"];function as(t,e){return t.indexOf(e)!==-1}const rge=function(t){return t.trim()},PDe=function(t){return t.replace(/^\\$/,\"\")};function hLt(t){var e;const n=[];return(e=JSON.stringify(t,function(o,i){if(typeof i==\"bigint\")return i.toString();if(typeof i!=\"function\"\u0026\u0026typeof i!=\"symbol\"){if(i instanceof Error)return{name:i.name,message:i.message,stack:i.stack};if(i\u0026\u0026typeof i==\"object\"){for(;n.length\u003e0\u0026\u0026n[n.length-1]!==this;)n.pop();if(n.includes(i))return\"[Circular]\";n.push(i)}return i}}))!==null\u0026\u0026e!==void 0?e:\"null\"}const pLt=Object.prototype,MDe=pLt.hasOwnProperty,sge=pLt.toString,As=Array.isArray||function(t){return sge.call(t)===\"[object Array]\"},nf=t=\u003etypeof t==\"function\",QA=t=\u003et===Object(t)\u0026\u0026!As(t),Rx=t=\u003e{if(QA(t)){for(const e in t)if(MDe.call(t,e))return!1;return!0}return!1},Eo=t=\u003et===void 0,rA=t=\u003esge.call(t)==\"[object String]\",D$=t=\u003erA(t)\u0026\u0026t.trim().length===0,Id=t=\u003et===null,Hs=t=\u003eEo(t)||Id(t),Ah=t=\u003esge.call(t)==\"[object Number]\"\u0026\u0026t==t,Gb=t=\u003eAh(t)\u0026\u0026t\u003e0,$y=t=\u003esge.call(t)===\"[object Boolean]\",wHo=t=\u003eas(QHo,t),PHo=t=\u003eas(vHo,t);function mLt(t){return t===null||typeof t!=\"object\"}function age(t,e){return{}.toString.call(t)===`[object ${e}]`}function zO(t){switch({}.toString.call(t)){case\"[object Error]\":case\"[object Exception]\":case\"[object DOMException]\":case\"[object DOMError]\":case\"[object WebAssembly.Exception]\":return!0;default:return _Lt(t,Error)}}function DDe(t){return\"u\"\u003etypeof Event\u0026\u0026_Lt(t,Event)}function _Lt(t,e){try{return t instanceof e}catch{return!1}}const MHo=[!0,\"true\",1,\"1\",\"yes\"],NDe=t=\u003eas(MHo,t),DHo=[!1,\"false\",0,\"0\",\"no\"];function fLt(t,e,n,o,i,r,s){try{var a=t[r](s),A=a.value}catch(c){return void n(c)}a.done?e(A):Promise.resolve(A).then(o,i)}function Zu(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var r=t.apply(e,n);function s(A){fLt(r,o,i,s,a,\"next\",A)}function a(A){fLt(r,o,i,s,a,\"throw\",A)}s(void 0)})}}const NHo=[\"amazonbot\",\"amazonproductbot\",\"app.hypefactors.com\",\"applebot\",\"archive.org_bot\",\"awariobot\",\"backlinksextendedbot\",\"baiduspider\",\"bingbot\",\"bingpreview\",\"chrome-lighthouse\",\"dataforseobot\",\"deepscan\",\"duckduckbot\",\"facebookexternal\",\"facebookcatalog\",\"http://yandex.com/bots\",\"hubspot\",\"ia_archiver\",\"leikibot\",\"linkedinbot\",\"meta-externalagent\",\"mj12bot\",\"msnbot\",\"nessus\",\"petalbot\",\"pinterestbot\",\"prerender\",\"rogerbot\",\"screaming frog\",\"sebot-wa\",\"sitebulb\",\"slackbot\",\"slurp\",\"trendictionbot\",\"turnitin\",\"twitterbot\",\"vercel-screenshot\",\"vercelbot\",\"yahoo! slurp\",\"yandexbot\",\"zoombot\",\"bot.htm\",\"bot.php\",\"(bot;\",\"bot/\",\"crawler\",\"ahrefsbot\",\"ahrefssiteaudit\",\"semrushbot\",\"siteauditbot\",\"splitsignalbot\",\"gptbot\",\"oai-searchbot\",\"chatgpt-user\",\"perplexitybot\",\"better uptime bot\",\"sentryuptimebot\",\"uptimerobot\",\"headlesschrome\",\"cypress\",\"google-hoteladsverifier\",\"adsbot-google\",\"apis-google\",\"duplexweb-google\",\"feedfetcher-google\",\"google favicon\",\"google web preview\",\"google-read-aloud\",\"googlebot\",\"googleother\",\"google-cloudvertexbot\",\"googleweblight\",\"mediapartners-google\",\"storebot-google\",\"google-inspectiontool\",\"bytespider\"],ILt=function(t,e=[]){if(!t)return!1;const n=t.toLowerCase();return NHo.concat(e).some(o=\u003e{const i=o.toLowerCase();return n.indexOf(i)!==-1})};function u6(t,e,n,o,i){return e\u003en\u0026\u0026(o.warn(\"min cannot be greater than max.\"),e=n),Ah(t)?t\u003en?(o.warn(\" cannot be greater than max: \"+n+\". Using max value instead.\"),n):e\u003et?(o.warn(\" cannot be less than min: \"+e+\". Using min value instead.\"),e):t:(o.warn(\" must be a number. using max or fallback. max: \"+n+\", fallback: \"+i),u6(i??n,e,n,o))}var RHo=class{constructor(e){this.C={},this.I=e.I,this.R=u6(e.bucketSize,0,100,e.A),this.$=u6(e.refillRate,0,this.R,e.A),this.O=u6(e.refillInterval,0,864e5,e.A)}F(e,n){const o=Math.floor((n-e.lastAccess)/this.O);o\u003e0\u0026\u0026(e.tokens=Math.min(e.tokens+o*this.$,this.R),e.lastAccess=e.lastAccess+o*this.O)}consumeRateLimit(e){var n;const o=Date.now(),i=String(e);let r=this.C[i];return r?this.F(r,o):(r={tokens:this.R,lastAccess:o},this.C[i]=r),r.tokens===0||(r.tokens--,r.tokens===0\u0026\u0026((n=this.I)===null||n===void 0||n.call(this,e)),r.tokens===0)}stop(){this.C={}}};const JO=\"Mobile\",N$=\"Android\",Age=\"Tablet\",CLt=\"Android Tablet\",yLt=\"iPad\",xLt=\"Apple Watch\",cge=\"Safari\",lge=\"BlackBerry\",ELt=\"Samsung Internet\",uge=\"Chrome\",BLt=\"Chrome iOS\",bLt=\"Internet Explorer\",SLt=\"Internet Explorer Mobile\",QLt=\"Opera\",vLt=\"Microsoft Edge\",gge=\"Firefox\",wLt=\"Firefox iOS\",dge=\"Nintendo\",hge=\"PlayStation\",pge=\"Xbox\",PLt=\"Android Mobile\",MLt=\"Mobile Safari\",RDe=\"Windows\",DLt=\"Windows Phone\",NLt=\"Nokia\",TDe=\"Ouya\",THo=\"Generic \"+JO.toLowerCase(),RLt=\"Generic \"+Age.toLowerCase(),kDe=\"Konqueror\",TLt=\"Oculus Browser\",kLt=\"Vivaldi\",FLt=\"Yandex\",LLt=\"Whale\",HLt=\"DuckDuckGo\",OLt=\"Pale Moon\",GLt=\"Waterfox\",FDe=\"Brave\",YLt=\"Claude\",ULt=\"Codex\",KLt=\"ChatGPT\",VLt=\"Google Search App\",LDe=new RegExp(\"Version/(\\\\d+(\\\\.\\\\d+)?)\"),HDe=new RegExp(\"(Claude|Codex|ChatGPT)\\\\/(\\\\d+(\\\\.\\\\d+)?)\"),kHo=new RegExp(pge,\"i\"),FHo=new RegExp(\"PlayStation \\\\w+\",\"i\"),LHo=new RegExp(\"Nintendo \\\\w+\",\"i\"),ODe=new RegExp(\"BlackBerry|PlayBook|BB10\",\"i\"),HHo={\"NT3.51\":\"NT 3.11\",\"NT4.0\":\"NT 4.0\",\"5.0\":\"2000\",5.1:\"XP\",5.2:\"XP\",\"6.0\":\"Vista\",6.1:\"7\",6.2:\"8\",6.3:\"8.1\",6.4:\"10\",\"10.0\":\"10\"},zLt=function(t,e,n,o){return e=e||\"\",(function(r){return r?.brave?FDe:null})(n)||(o?.detectGoogleSearchApp\u0026\u0026as(t,\"GSA/\")?VLt:as(t,\" OPR/\")\u0026\u0026as(t,\"Mini\")?\"Opera Mini\":as(t,\" OPR/\")?QLt:ODe.test(t)?lge:as(t,\"IEMobile\")||as(t,\"WPDesktop\")?SLt:as(t,\"OculusBrowser\")?TLt:as(t,\"SamsungBrowser\")?ELt:as(t,\"Edge\")||as(t,\"Edg/\")?vLt:as(t,\"Vivaldi/\")?kLt:as(t,\"YaBrowser/\")?FLt:as(t,\"Whale/\")?LLt:as(t,\"DuckDuckGo/\")||as(t,\"Ddg/\")?HLt:as(t,\"Claude/\")?YLt:as(t,\"Codex/\")?ULt:as(t,\"ChatGPT/\")?KLt:as(t,\"FBIOS\")?\"Facebook Mobile\":as(t,\"UCWEB\")||as(t,\"UCBrowser\")?\"UC Browser\":as(t,\"CriOS\")?BLt:as(t,\"CrMo\")||as(t,uge)?uge:as(t,N$)\u0026\u0026as(t,cge)?PLt:as(t,\"FxiOS\")?wLt:as(t.toLowerCase(),kDe.toLowerCase())?kDe:as(t,\"Brave/\")?FDe:((r,s)=\u003es\u0026\u0026as(s,\"Apple\")||(function(a){return as(a,cge)\u0026\u0026!as(a,uge)\u0026\u0026!as(a,N$)})(r))(t,e)?as(t,JO)?MLt:cge:as(t,\"PaleMoon/\")?OLt:as(t,\"Waterfox/\")?GLt:as(t,gge)?gge:as(t,\"MSIE\")||as(t,\"Trident/\")?bLt:as(t,\"Gecko\")?gge:\"\")},OHo={[SLt]:[new RegExp(\"rv:(\\\\d+(\\\\.\\\\d+)?)\")],[vLt]:[new RegExp(\"Edge?\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[uge]:[new RegExp(\"(Chrome|CrMo)\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[BLt]:[new RegExp(\"CriOS\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],\"UC Browser\":[new RegExp(\"(UCBrowser|UCWEB)\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[cge]:[LDe],[MLt]:[LDe],[QLt]:[new RegExp(\"(Opera|OPR)\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[gge]:[new RegExp(\"Firefox\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[wLt]:[new RegExp(\"FxiOS\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[kDe]:[new RegExp(\"Konqueror[:/]?(\\\\d+(\\\\.\\\\d+)?)\",\"i\")],[lge]:[new RegExp(\"BlackBerry (\\\\d+(\\\\.\\\\d+)?)\"),LDe],[PLt]:[new RegExp(\"android\\\\s(\\\\d+(\\\\.\\\\d+)?)\",\"i\")],[ELt]:[new RegExp(\"SamsungBrowser\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[TLt]:[new RegExp(\"OculusBrowser\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[kLt]:[new RegExp(\"Vivaldi\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[FLt]:[new RegExp(\"YaBrowser\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[LLt]:[new RegExp(\"Whale\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[FDe]:[new RegExp(\"Brave\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[YLt]:[HDe],[ULt]:[HDe],[KLt]:[HDe],[HLt]:[new RegExp(\"(DuckDuckGo|Ddg)\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[OLt]:[new RegExp(\"PaleMoon\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[GLt]:[new RegExp(\"Waterfox\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[VLt]:[new RegExp(\"GSA\\\\/(\\\\d+(\\\\.\\\\d+)?)\")],[bLt]:[new RegExp(\"(rv:|MSIE )(\\\\d+(\\\\.\\\\d+)?)\")],Mozilla:[new RegExp(\"rv:(\\\\d+(\\\\.\\\\d+)?)\")]},GHo=function(t,e,n,o){const i=zLt(t,e,n,o),r=OHo[i];if(Eo(r))return null;for(let s=0;r.length\u003es;s++){const a=t.match(r[s]);if(a)return parseFloat(a[a.length-2])}return null},JLt=[[new RegExp(\"Xbox; Xbox (.*?)[);]\",\"i\"),t=\u003e[pge,t\u0026\u0026t[1]||\"\"]],[new RegExp(dge,\"i\"),[dge,\"\"]],[new RegExp(hge,\"i\"),[hge,\"\"]],[ODe,[lge,\"\"]],[new RegExp(RDe,\"i\"),(t,e)=\u003e{if(/Phone/.test(e)||/WPDesktop/.test(e))return[DLt,\"\"];if(new RegExp(JO).test(e)\u0026\u0026!/IEMobile\\b/.test(e))return[\"Windows Mobile\",\"\"];const n=/Windows NT ([0-9.]+)/i.exec(e);if(n\u0026\u0026n[1]){let o=HHo[n[1]]||\"\";return/arm/i.test(e)\u0026\u0026(o=\"RT\"),[RDe,o]}return[RDe,\"\"]}],[/((iPhone|iPad|iPod).*?OS (\\d+)_(\\d+)_?(\\d+)?|iPhone)/,t=\u003et\u0026\u0026t[3]?[\"iOS\",[t[3],t[4],t[5]||\"0\"].join(\".\")]:[\"iOS\",\"\"]],[/(watch.*\\/(\\d+\\.\\d+\\.\\d+)|watch os,(\\d+\\.\\d+),)/i,t=\u003e{let e=\"\";return t\u0026\u0026t.length\u003e=3\u0026\u0026(e=Eo(t[2])?t[3]:t[2]),[\"watchOS\",e]}],[new RegExp(\"(Android (\\\\d+)\\\\.(\\\\d+)\\\\.?(\\\\d+)?|Android)\",\"i\"),t=\u003et\u0026\u0026t[2]?[N$,[t[2],t[3],t[4]||\"0\"].join(\".\")]:[N$,\"\"]],[/Mac OS X (\\d+)[_.](\\d+)[_.]?(\\d+)?/i,t=\u003e{const e=[\"Mac OS X\",\"\"];return t\u0026\u0026t[1]\u0026\u0026(e[1]=[t[1],t[2],t[3]||\"0\"].join(\".\")),e}],[/Mac/i,[\"Mac OS X\",\"\"]],[/CrOS/,[\"Chrome OS\",\"\"]],[/Linux|debian/i,[\"Linux\",\"\"]]],WLt=function(t){for(let e=0;JLt.length\u003ee;e++){const[n,o]=JLt[e],i=n.exec(t),r=i\u0026\u0026(nf(o)?o(i,t):o);if(r)return r}return[\"\",\"\"]},jLt=function(t){return LHo.test(t)?dge:FHo.test(t)?hge:kHo.test(t)?pge:new RegExp(TDe,\"i\").test(t)?TDe:new RegExp(\"(Windows Phone|WPDesktop)\",\"i\").test(t)?DLt:/iPad/.test(t)?yLt:/iPod/.test(t)?\"iPod Touch\":/iPhone/.test(t)?\"iPhone\":/(watch)(?: ?os[,/]|\\d,\\d\\/)[\\d.]+/i.test(t)?xLt:ODe.test(t)?lge:/(kobo)\\s(ereader|touch)/i.test(t)?\"Kobo\":new RegExp(NLt,\"i\").test(t)?NLt:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\\))/i.test(t)||/(kf[a-z]+)( bui|\\)).+silk\\//i.test(t)?\"Kindle Fire\":/(Android|ZTE)/i.test(t)?new RegExp(JO).test(t)\u0026\u0026!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\\daxl ]{1,6}/i.test(t)\u0026\u0026!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)\u0026\u0026!/QTAQZ3/i.test(t)?N$:CLt:new RegExp(\"(pda|Mobile)\",\"i\").test(t)?THo:new RegExp(Age,\"i\").test(t)\u0026\u0026!new RegExp(\"Tablet pc\",\"i\").test(t)?RLt:\"\"},YHo=function(t,e){var n;const o=jLt(t);return o===yLt||o===CLt||o===\"Kobo\"||o===\"Kindle Fire\"||o===RLt?Age:o===dge||o===pge||o===hge||o===TDe?\"Console\":o===xLt?\"Wearable\":o?JO:e?.userAgentDataPlatform===\"Android\"\u0026\u0026((n=e?.maxTouchPoints)!==null\u0026\u0026n!==void 0?n:0)\u003e0?600\u003eMath.min((i=e?.screenWidth)!==null\u0026\u0026i!==void 0?i:0,(r=e?.screenHeight)!==null\u0026\u0026r!==void 0?r:0)/((s=e?.devicePixelRatio)!==null\u0026\u0026s!==void 0?s:1)?JO:Age:\"Desktop\";var i,r,s},GDe=/\\bFBAV\\/(\\d+(?:\\.\\d+)*)/i,$Lt=[[/\\bInstagram(?:[ /](\\d+(?:\\.\\d+)*))?\\b/i,\"Instagram\"],[/\\bBarcelona[ /](\\d+(?:\\.\\d+)*)?/i,\"Threads\"],[/\\b(?:MessengerForiOS|(?:FBAN|FB_IAB)\\/Orca-Android)\\b/i,\"Messenger\",GDe],[/\\bFBAN\\/EMA\\b/i,\"Facebook Lite\",GDe],[/\\b(?:FBIOS|(?:FBAN|FB_IAB)\\/(?:FB4A|FBIOS))\\b/i,\"Facebook\",GDe],[/\\bLinkedInApp(?:\\]?\\/(\\d+(?:\\.\\d+)*))?\\b/i,\"LinkedIn\"],[/\\bTwitter(?:Android| for (?:iPhone|iPad|Android))(?:\\/(\\d+(?:\\.\\d+)*))?\\b/i,\"Twitter\"],[/\\b(?:musical_ly|trill)(?:[_/](\\d+\\.\\d+(?:\\.\\d+)*))?(?=\\b|_)/i,\"TikTok\",/\\bapp_version\\/(\\d+(?:\\.\\d+)*)/i],[/\\b(?:MicroMessenger|WeChat)\\/(\\d+(?:\\.\\d+)*)?/i,\"WeChat\"],[/\\bLine\\/(\\d+(?:\\.\\d+)*)?/i,\"Line\"],[/\\bGSA\\/(\\d+(?:\\.\\d+)*)?/i,\"Google\"],[/\\[Pinterest\\/(?:iOS|Android)\\b|\\bPinterest(?: for (?:Android(?: Tablet)?|iOS))?\\/(\\d+(?:\\.\\d+)*)/i,\"Pinterest\"],[/\\b(?:WA4A|WAiOS)\\/(\\d+(?:\\.\\d+)*)?/i,\"WhatsApp\"],[/\\bSnapchat[ /](\\d+(?:\\.\\d+)*)?/i,\"Snapchat\"],[/\\bBing(?:Web|Sapphire)\\/(\\d+(?:\\.\\d+)*)?/i,\"Bing\"],[/\\bNAVER\\(inapp; search;/i,\"Naver\",/\\bNAVER\\(inapp; search;[^;)]*; (\\d+(?:\\.\\d+)*)/i],[/\\bKAKAOTALK[ /](\\d+\\.\\d+(?:\\.\\d+)*)?/i,\"KakaoTalk\"]],YDe=\"[Truncated]\",R$=\"[Unserializable]\";function WO(t){let e=\"\";for(let n=0;t.length\u003en;n++){const o=t.charCodeAt(n);if(55296\u003eo||o\u003e56319)e+=56320\u003eo||o\u003e57343?t[n]:\"�\";else{const i=t.charCodeAt(n+1);56320\u003ei||i\u003e57343?e+=\"�\":(e+=t[n]+t[n+1],n++)}}return e}function qLt(t,e){if(!e)return t;let n=[];try{n=Object.keys(e)}catch{n=[]}for(const o of n){let i;try{i=e[o]}catch{i=R$}Object.defineProperty(t,o,{value:i,enumerable:!0,writable:!0,configurable:!0})}return t}const mge=3e5;var XLt=class{record(e){if(e.kind===\"too-large\")return;if(e.kind!==\"retry-later\")return void this.reset();if(!e.retryAfterMs)return;const n=this.isOpen(),o=Date.now(),i=Math.min(e.retryAfterMs,mge);if(!n)return this.ts=o,void(this.es=o+i);this.es=Math.max(this.es,Math.min(o+i,this.ts+mge))}remainingMs(){const e=Date.now();if(this.ts-5e3\u003ee)return this.reset(),0;const n=Math.min(mge,Math.max(0,this.es-e));return n===0\u0026\u0026this.reset(),n}isOpen(){return this.remainingMs()\u003e0}reset(){this.es=0,this.ts=0}constructor(){this.es=0,this.ts=0}};const UHo=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ZLt(t,e){return typeof(n=t)==\"string\"\u0026\u0026UHo.test(n)?t:e();var n}function eHt(t,e){const n=new Error(e);try{Object.defineProperty(n,\"name\",{value:t,writable:!0,enumerable:!0,configurable:!0})}catch{}return n}function Mw(t){return t\u0026\u0026t.split(\"#\")[0]}function tHt(t){try{return t()}catch{return}}function nHt(t,e){const n=setTimeout(t,e);return n!=null\u0026\u0026n.unref\u0026\u0026n?.unref(),n}function oHt(t,e,n){return iHt.apply(this,arguments)}function iHt(){return(iHt=Zu(function*(t,e,n){let o;try{return yield Promise.race([t,new Promise((i,r)=\u003e{o=nHt(()=\u003e{try{n?.(),i()}catch(s){r(s)}},e)})])}finally{clearTimeout(o)}})).apply(this,arguments)}let _ge,rHt,UDe;function KHo(t){const e=globalThis._posthogChunkIds;if(!e)return;const n=Object.keys(e);return UDe\u0026\u0026n.length===rHt||(rHt=n.length,UDe=n.reduce((o,i)=\u003e{_ge||(_ge={});const r=_ge[i];if(r)o[r[0]]=r[1];else{const s=t(i);for(let a=s.length-1;a\u003e=0;a--){const A=s[a],c=A?.filename,l=e[i];if(c\u0026\u0026l){o[c]=l,_ge[i]=[c,l];break}}}return o},{})),UDe}function T$(t){return T$=typeof Symbol==\"function\"\u0026\u0026typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e\u0026\u0026typeof Symbol==\"function\"\u0026\u0026e.constructor===Symbol\u0026\u0026e!==Symbol.prototype?\"symbol\":typeof e},T$(t)}function VHo(t,e,n){return(e=(function(o){var i=(function(r){if(T$(r)!=\"object\"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var a=s.call(r,\"string\");if(T$(a)!=\"object\")return a;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(r)})(o);return T$(i)==\"symbol\"?i:i+\"\"})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sHt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e\u0026\u0026(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function sn(t){for(var e=1;arguments.length\u003ee;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sHt(Object(n),!0).forEach(function(o){VHo(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sHt(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}var zHo=class{constructor(e,n,o=[]){this.coercers=e,this.stackParser=n,this.modifiers=o}buildFromUnknown(e,n={}){const o=n\u0026\u0026n.mechanism||{handled:!0,type:\"generic\"},i=this.buildCoercingContext(o,n,0).apply(e),r=this.buildParsingContext(n),s=this.parseStacktrace(i,r);return{$exception_list:this.convertToExceptionList(s,o),$exception_level:\"error\"}}modifyFrames(e){var n=this;return Zu(function*(){for(const o of e)o.stacktrace\u0026\u0026o.stacktrace.frames\u0026\u0026As(o.stacktrace.frames)\u0026\u0026(o.stacktrace.frames=yield n.applyModifiers(o.stacktrace.frames));return e})()}coerceFallback(e){var n;return{type:\"Error\",value:\"Unknown error\",stack:(n=e.syntheticException)===null||n===void 0?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var o;let i,r;if(e.cause!=null\u0026\u0026(i=this.parseStacktrace(e.cause,n)),e.stack!=\"\"\u0026\u0026e.stack!=null)try{r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)}catch{}return sn(sn({},e),{},{cause:i,stack:r,errors:(o=e.errors)===null||o===void 0?void 0:o.map(s=\u003ethis.parseStacktrace(s,n))})}applyChunkIds(e,n){return e.map(o=\u003e(o.filename\u0026\u0026n\u0026\u0026(o.chunk_id=n[o.filename]),o))}applyCoercers(e,n){for(const o of this.coercers)if(o.match(e))return o.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return Zu(function*(){let o=e;for(const i of n.modifiers)o=yield i(o);return o})()}convertToExceptionList(e,n){const o=[],i=(r,s,a)=\u003e{var A;const c=o.length,l=s===void 0?sn(sn({type:typeof n.type==\"string\"\u0026\u0026n.type.length\u003e0?n.type:\"generic\"},typeof n.handled==\"boolean\"?{handled:n.handled}:n.handled===void 0?{handled:!0}:{}),{},{synthetic:typeof n.synthetic==\"boolean\"?n.synthetic:r.synthetic,exception_id:c}):{type:\"chained\",source:a,synthetic:r.synthetic,exception_id:c,parent_id:s},u={type:r.type,value:r.value,mechanism:l};r.stack\u0026\u0026(u.stacktrace={type:\"raw\",frames:r.stack}),o.push(u),r.cause\u0026\u0026i(r.cause,c,\"cause\");for(const g of(A=r.errors)!==null\u0026\u0026A!==void 0?A:[])i(g,c,\"member\")};return i(e),o}buildParsingContext(e){var n;return{chunkIdMap:KHo(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null\u0026\u0026n!==void 0?n:1}}getAggregateErrors(e){try{if(zO(e)){let o=Object.getPrototypeOf(e);for(let i=0;o\u0026\u0026100\u003ei;i++){var n;const r=(n=Object.getOwnPropertyDescriptor(o,\"constructor\"))===null||n===void 0?void 0:n.value;if(typeof r==\"function\"\u0026\u0026r.name===\"AggregateError\"){const s=e.errors;return As(s)?s:void 0}o=Object.getPrototypeOf(o)}}}catch{}}buildCoercingContext(e,n,o=0){let i=0,r=0,s=!1;const a=new Set,A=[],c={},l=(h,d,p=0)=\u003e{const m=u(d,p),_=m.apply;if(m.apply=E=\u003e{A.push(h);try{return _(E)}finally{A.pop()}},p\u003e4||p\u003e0\u0026\u0026A.indexOf(h)!==-1)return this.coerceFallback(m);const f=typeof h==\"object\"\u0026\u0026h!==null||typeof h==\"function\";if(p===0\u0026\u0026i\u003e=50||f\u0026\u0026a.has(h))return;f\u0026\u0026a.add(h),p===0\u0026\u0026i++;const I=this.getAggregateErrors(h);let C,y;s||(s=!!I);try{if(C=this.applyCoercers(h,m),!C)throw c}catch(E){if(E===c)return void(p===0\u0026\u0026i--);if(!s)throw E;C=this.coerceFallback(m)}if(!I||i\u003e=50)return C;try{y=I.length}catch{return C}if(!Number.isInteger(y)||0\u003ey||y\u003e4294967295)return C;const x=[];for(let E=0;50\u003ei\u0026\u00261e3\u003er\u0026\u0026y\u003eE;E++){let B;r++;try{B=m.next(I[E])}catch{i++,B=this.coerceFallback(u(d+1))}B\u0026\u0026x.push(B)}return sn(sn({},C),{},{errors:x})},u=(h,d=0)=\u003esn(sn({},n),{},{syntheticException:h==0?n.syntheticException:void 0,mechanism:h==0?e:{},apply(p){const m=l(p,h,d+1);if(!m)throw c;return m},next:p=\u003el(p,h+1)}),g=u(o);return sn(sn({},g),{},{apply:h=\u003e{var d;return(d=l(h,o))!==null\u0026\u0026d!==void 0?d:this.coerceFallback(g)}})}};const JHo=/^([a-z][a-z0-9.+-]+):/i,WHo=[\"http\",\"https\",\"file\",\"blob\",\"app\",\"capacitor\",\"ionic\",\"webpack\",\"webpack-internal\",\"ng\"];function jHo(t){if(!t||t===\"\u003canonymous\u003e\")return!1;const e=JHo.exec(t);return!e||WHo.includes(e[1].toLowerCase())}function KDe(t,e,n,o,i){const r={platform:t,filename:e,function:n===\"\u003canonymous\u003e\"?\"?\":n,in_app:jHo(e)};return Eo(o)||(r.lineno=o),Eo(i)||(r.colno=i),r}const aHt=(t,e)=\u003e{const n=t.indexOf(\"safari-extension\")!==-1,o=t.indexOf(\"safari-web-extension\")!==-1;return n||o?[t.indexOf(\"@\")!==-1?t.split(\"@\")[0]:\"?\",n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},$Ho=/^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i,qHo=/^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:\u003canonymous\u003e|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,XHo=/\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/,ZHo=(t,e)=\u003e{const n=$Ho.exec(t);if(n){const[,i,r,s]=n;return KDe(e,i,\"?\",+r,+s)}const o=qHo.exec(t);if(o){if(o[2]\u0026\u0026o[2].indexOf(\"eval\")===0){const s=XHo.exec(o[2]);s\u0026\u0026(o[2]=s[1],o[3]=s[2],o[4]=s[3])}const[i,r]=aHt(o[1]||\"?\",o[2]);return KDe(e,r,i,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},eOo=/^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i,tOo=/(\\S+) line (\\d+)(?: \u003e eval line \\d+)* \u003e eval/i,nOo=(t,e)=\u003e{const n=eOo.exec(t);if(n){if(n[3]\u0026\u0026n[3].indexOf(\" \u003e eval\")\u003e-1){const r=tOo.exec(n[3]);r\u0026\u0026(n[1]=n[1]||\"eval\",n[3]=r[1],n[4]=r[2],n[5]=\"\")}let o=n[3],i=n[1]||\"?\";return[i,o]=aHt(i,o),KDe(e,o,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},AHt=/\\(error: (.*)\\)/;function VDe(t,e){return t.filename===e.filename\u0026\u0026t.function===e.function\u0026\u0026t.module===e.module\u0026\u0026t.lineno===e.lineno\u0026\u0026t.colno===e.colno}function oOo(t){for(let e=1;10\u003e=e;e++){const n=t.length-2*e;if(0\u003en)break;let o=!0;for(let i=0;e\u003ei;i++)if(!VDe(t[n+i],t[n+e+i])){o=!1;break}if(o){for(let i=0;e\u003ei;i++)t[n+i]=t[n+e+i];return t.length=n+e,{start:n,length:e}}}}function iOo(t,e){const n=e.start+e.length,o=lHt(t,e);o\u0026\u0026t.splice(n+o===t.length?n:e.start,o)}function cHt(t,e){let n=e.start;for(;n\u003e0\u0026\u0026VDe(t[n-1],t[n-1+e.length]);)n--;return e.start-n}function lHt(t,e){const n=e.start+e.length;let o=n;for(;t.length\u003eo\u0026\u0026VDe(t[o],t[o-e.length]);)o++;return o-n}function rOo(t,e){const n=e[0];let o=t.length-(n?cHt(t,n):0);for(const i of e)o-=lHt(t,i);return o}function sOo(t,e,n){for(let o=0;t.length\u003eo;o++){const i=t[(e+o)%t.length],r=t[(n+o)%t.length];if(i!==r)return r\u003ei}return!1}var aOo=class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){const o=rA(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:o?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?\"DOMError\":\"DOMException\"}getValue(e){const n=e.name||(this.isDOMError(e)?\"DOMError\":\"DOMException\");return e.message?`${n}: ${e.message}`:n}isDOMException(e){return age(e,\"DOMException\")}isDOMError(e){return age(e,\"DOMError\")}},AOo=class{match(e){return zO(e)}coerce(e,n){var o;const i=this.getStack(e),r=i===void 0?(o=n.syntheticException)===null||o===void 0?void 0:o.stack:void 0,s=!!r;return{type:this.getType(e),value:this.getMessage(e,n),stack:i??r,cause:e.cause?n.next(e.cause):void 0,synthetic:s}}getType(e){return e.name||e.constructor.name}getMessage(e,n){const o=e.message;return String(o.error\u0026\u0026typeof o.error.message==\"string\"?o.error.message:o)}getStack(e){try{const n=e.stacktrace;if(typeof n==\"string\"\u0026\u0026n.length\u003e0)return n;const o=e.stack;return typeof o==\"string\"\u0026\u0026o.length\u003e0?o:void 0}catch{return}}},cOo=class{match(e){return!!age(e,\"ErrorEvent\")\u0026\u0026(e.error!=null||this.ar(e))}coerce(e,n){var o;if(e.error!=null)return n.apply(e.error);const i=n.apply(e.message);return sn(sn({},i),{},{stack:(o=this.lr(e))!==null\u0026\u0026o!==void 0?o:i.stack,synthetic:!0})}ar(e){return rA(e.message)\u0026\u0026e.message.length\u003e0}lr(e){var n,o;const i=e,r=(n=i.lineno)!==null\u0026\u0026n!==void 0?n:0,s=(o=i.colno)!==null\u0026\u0026o!==void 0?o:0;if(rA(i.filename)\u0026\u0026i.filename.length!==0\u0026\u0026r!==0)return`Error\n at ${i.filename}:${r}:${s}`}};const lOo=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;var uOo=class{match(e){return typeof e==\"string\"}coerce(e,n){var o;const[i,r]=this.getInfos(e);return{type:i??\"Error\",value:r??e,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}}getInfos(e){let n=\"Error\",o=e;const i=e.match(lOo);return i\u0026\u0026(n=i[1],o=i[2]),[n,o]}};const gOo=[\"fatal\",\"error\",\"warning\",\"log\",\"info\",\"debug\"];function uHt(t,e=40){const n=Object.keys(t);if(n.sort(),!n.length)return\"[object has no keys]\";for(let o=n.length;o\u003e0;o--){const i=n.slice(0,o).join(\", \");if(e\u003e=i.length)return o===n.length?i:i.length\u003ee?`${i.slice(0,e)}...`:i}return\"\"}var dOo=class{match(e){return typeof e==\"object\"\u0026\u0026e!==null}coerce(e,n){var o,i;const r=this.getErrorPropertyFromObject(e);return r?n.apply(r):{type:this.getType(e),value:this.getValue(e),stack:(o=this.getStack(e))!==null\u0026\u0026o!==void 0?o:(i=n.syntheticException)===null||i===void 0?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:\"error\",synthetic:!0}}getType(e){if(DDe(e))return e.constructor.name;const n=\"name\"in e?e.name:void 0;return rA(n)\u0026\u0026!D$(n)?n:\"Error\"}getValue(e){if(\"name\"in e\u0026\u0026typeof e.name==\"string\"){let o=`'${e.name}' captured as exception`;return\"message\"in e\u0026\u0026typeof e.message==\"string\"\u0026\u0026(o+=` with message: '${e.message}'`),o}if(\"message\"in e\u0026\u0026typeof e.message==\"string\")return e.message;const n=this.getObjectClassName(e);return`${n\u0026\u0026n!==\"Object\"?`'${n}'`:\"Object\"} captured as exception with keys: ${uHt(e)}`}isSeverityLevel(e){return rA(e)\u0026\u0026!D$(e)\u0026\u0026gOo.indexOf(e)\u003e=0}getStack(e){try{return rA(e.stacktrace)\u0026\u0026e.stacktrace.length\u003e0?e.stacktrace:rA(e.stack)\u0026\u0026e.stack.length\u003e0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(const n in e)if({}.hasOwnProperty.call(e,n)){const o=e[n];if(zO(o))return o}}getObjectClassName(e){try{const n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}},hOo=class{match(e){return DDe(e)}coerce(e,n){var o;const i=e.constructor.name;return{type:i,value:`${i} captured as exception with keys: ${uHt(e)}`,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}}},pOo=class{match(e){return mLt(e)}coerce(e,n){var o;return{type:\"Error\",value:`Primitive value captured as exception: ${String(e)}`,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}}},mOo=class{match(e){return age(e,\"PromiseRejectionEvent\")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!DDe(e))return!1;try{const n=e.detail;return n!=null\u0026\u0026typeof n==\"object\"\u0026\u0026\"reason\"in n}catch{return!1}}coerce(e,n){var o;const i=this.getUnhandledRejectionReason(e);return mLt(i)?{type:\"UnhandledRejection\",value:`Non-Error promise rejection captured with value: ${String(i)}`,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}:n.apply(i)}getUnhandledRejectionReason(e){try{if(\"reason\"in e)return e.reason;if(\"detail\"in e\u0026\u0026e.detail!=null\u0026\u0026typeof e.detail==\"object\"\u0026\u0026\"reason\"in e.detail)return e.detail.reason}catch{}return e}};const fge=\"$message\",Ige=\"$timestamp\",_Oo=new Set([fge,Ige]),zDe={enabled:!0,max_bytes:32768};function Cge(t){var e;return t?{enabled:(e=t.enabled)!==null\u0026\u0026e!==void 0?e:zDe.enabled,max_bytes:IOo(t.max_bytes,zDe.max_bytes)}:sn({},zDe)}var fOo=class{constructor(e){this.ns=[],this.ss=0,this.Mr=Cge(e)}setConfig(e){this.Mr=Cge(e),this.rs()}add(e){const n=(function(i){let r;try{r=hLt(i)}catch{return}try{const s=JSON.parse(r);if(!QA(s))return;const a=s,A=a[fge],c=a[Ige];return!rA(A)||A.trim().length===0||!rA(c)\u0026\u0026!Ah(c)?void 0:{step:a,json:r}}catch{return}})(e);if(!n)return;const o=(function(i){if(\"u\"\u003etypeof TextEncoder)return new TextEncoder().encode(i).length;const r=encodeURIComponent(i);let s=0;for(let a=0;r.length\u003ea;a++)r[a]===\"%\"?(s+=1,a+=2):s+=1;return s})(n.json);o\u003ethis.Mr.max_bytes||(this.ns.push({step:n.step,bytes:o}),this.ss+=o,this.rs())}getAttachable(){return this.ns.map(e=\u003ee.step)}clear(){this.ns=[],this.ss=0}size(){return this.ns.length}rs(){for(;this.ss\u003ethis.Mr.max_bytes\u0026\u0026this.ns.length\u003e0;){const e=this.ns.shift();e\u0026\u0026(this.ss-=e.bytes)}}};function IOo(t,e){if(!Ah(t)||t===1/0||t===-1/0)return e;const n=Math.floor(t);return 0\u003en?e:n}const gHt=t=\u003e{if(typeof t!=\"string\")return t;try{return JSON.parse(t)}catch{return t}};function dHt(t){return typeof t==\"string\"||t}function hHt(t){return typeof t==\"string\"?t:void 0}const COo=[\"$feature_flag\",\"$feature_flag_response\",\"$feature_flag_has_experiment\",\"$feature_flag_id\",\"$feature_flag_version\",\"$feature_flag_reason\",\"$feature_flag_request_id\",\"$feature_flag_evaluated_at\",\"$feature_flag_error\",\"locally_evaluated\",\"$groups\",\"$process_person_profile\",\"$geoip_disable\",\"$current_url\",\"$pathname\",\"$referring_domain\",\"utm_source\",\"utm_medium\",\"utm_campaign\",\"utm_content\",\"utm_term\",\"gad_source\",\"mc_cid\",\"gclid\",\"gclsrc\",\"dclid\",\"gbraid\",\"wbraid\",\"fbclid\",\"msclkid\",\"twclid\",\"li_fat_id\",\"igshid\",\"ttclid\",\"rdt_cid\",\"epik\",\"qclid\",\"sccid\",\"oppref\",\"irclid\",\"_kx\",\"$session_id\",\"$window_id\",\"$lib\",\"$lib_version\",\"$device_id\",\"$is_server\"],pHt=\"NativeGzipValidationError\",JDe=t=\u003et.length\u003e=2\u0026\u0026t[0]===31\u0026\u0026t[1]===139,mHt=(t,e)=\u003et===wDe.GZipJS||e===wDe.GZipJS||e===\"gzip\",_Ht=t=\u003e!(!t||typeof t!=\"object\")\u0026\u0026(\"name\"in t?String(t.name):\"\")===\"NotReadableError\";let k$;const yge=t=\u003e{throw eHt(pHt,`Native gzip produced invalid output: ${t}`)},yOo=(fHt=Zu(function*(t,e){18\u003et.size\u0026\u0026yge(\"too-short\");const n=new Uint8Array(yield t.slice(0,10).arrayBuffer());JDe(n)\u0026\u0026n[2]===8||yge(\"invalid-header\");const o=new DataView(yield t.slice(t.size-8).arrayBuffer());o.getUint32(0,!0)!==(r=\u003e{const s=(()=\u003e{if(k$)return k$;k$=[];for(let A=0;256\u003eA;A++){let c=A;for(let l=0;8\u003el;l++)c=1\u0026c?3988292384^c\u003e\u003e\u003e1:c\u003e\u003e\u003e1;k$[A]=c\u003e\u003e\u003e0}return k$})();let a=4294967295;for(let A=0;r.length\u003eA;A++)a=s[255\u0026(a^r[A])]^a\u003e\u003e\u003e8;return(4294967295^a)\u003e\u003e\u003e0})(e)\u0026\u0026yge(\"invalid-crc\");const i=e.length\u003e\u003e\u003e0;o.getUint32(4,!0)!==i\u0026\u0026yge(\"invalid-size\")}),function(t,e){return fHt.apply(this,arguments)});var fHt;function WDe(){return WDe=Zu(function*(t,e=!0,n){try{const i=new TextEncoder().encode(t),r=new globalThis.CompressionStream(\"gzip\"),s=r.writable.getWriter(),a=s.write(i).then(()=\u003es.close()).catch((o=Zu(function*(l){try{yield s.abort(l)}catch{}throw l}),function(l){return o.apply(this,arguments)})),A=new Response(r.readable).blob(),[c]=yield Promise.all([A,a]);return yield yOo(c,i),c}catch(i){if(n?.rethrow)throw i;return e\u0026\u0026console.error(\"Failed to gzip compress data\",i),null}var o}),WDe.apply(this,arguments)}function IHt(t,e){if(t==null)return{};var n,o,i=(function(s,a){if(s==null)return{};var A={};for(var c in s)if({}.hasOwnProperty.call(s,c)){if(a.includes(c))continue;A[c]=s[c]}return A})(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;r.length\u003eo;o++)e.includes(n=r[o])||{}.propertyIsEnumerable.call(t,n)\u0026\u0026(i[n]=t[n])}return i}const xOo={}.propertyIsEnumerable;function xge(t,e){try{return CHt(t,e,{ancestors:new WeakSet,remainingNodes:1e4},0)}catch{return[]}}function jDe(t,e,n,o){if(0\u003e=n.remainingNodes)return{stringValue:YDe};if(n.remainingNodes--,$y(t))return{boolValue:t};if(typeof t==\"bigint\")return(function(i,r){const s=i.toString(),a=BigInt(\"9223372036854775808\");return i\u003e=a||-a\u003ei?(r?.debug(`Attribute ${s} is outside the int64 range; encoding it as a string`),{stringValue:s}):{intValue:s}})(t,e);if(typeof t==\"number\"){if(!Number.isFinite(t))return{stringValue:String(t)};if(Number.isInteger(t)){if(Number.isSafeInteger(t))return{intValue:String(t)};if(typeof BigInt\u003e\"u\")return{stringValue:String(t)};const i=BigInt(t).toString();return t\u003e=9223372036854776e3||-9223372036854776e3\u003et?(e?.debug(`Attribute ${i} is outside the int64 range; encoding it as a string`),{stringValue:i}):{intValue:i}}return{doubleValue:t}}if(typeof t==\"string\")return{stringValue:WO(t)};if(typeof t==\"function\")return{stringValue:\"[Function]\"};if(typeof t==\"symbol\")return{stringValue:String(t)};if(typeof t==\"object\"\u0026\u0026t!==null){if(n.ancestors.has(t))return{stringValue:\"[Circular]\"};if(o\u003e=20)return{stringValue:YDe};if(t instanceof Date){const i=t.getTime(),r=Number.isFinite(i)?t.toISOString():String(t);return{stringValue:typeof r==\"string\"?WO(r):String(r)}}n.ancestors.add(t);try{try{const i=t.toJSON;if(typeof i==\"function\")return jDe(i.call(t),e,n,o+1)}catch{}return As(t)?{arrayValue:{values:EOo(t,e,n,o+1)}}:{kvlistValue:{values:CHt(t,e,n,o+1)}}}finally{n.ancestors.delete(t)}}return{stringValue:WO(String(t))}}function EOo(t,e,n,o){const i=[],r=Math.min(t.length,1e3);let s=0;for(;r\u003es\u0026\u0026n.remainingNodes\u003e0;s++)try{const a=s in t?t[s]:void 0;if(Hs(a))continue;i.push(jDe(a,e,n,o))}catch{i.push({stringValue:R$})}return t.length\u003es\u0026\u0026i.push({stringValue:YDe}),i}function CHt(t,e,n,o){const i=[];for(const r in t)if(xOo.call(t,r)){if(!r){e?.debug(\"Dropping an attribute with an empty key\");continue}if(i.length\u003e=1e3||0\u003e=n.remainingNodes){e?.debug(\"Attributes truncated: the value exceeds the OTLP encoder budget\");break}try{const s=t[r];if(Id(s)||Eo(s))continue;i.push({key:WO(r),value:jDe(s,e,n,o)})}catch{i.push({key:WO(r),value:{stringValue:R$}})}}return i}function yHt(t,e,n){return sn(sn(sn(sn({},qLt({},t.resourceAttributes)),{},{\"service.name\":t.serviceName||\"unknown_service\"},t.environment\u0026\u0026{\"deployment.environment\":t.environment}),t.serviceVersion\u0026\u0026{\"service.version\":t.serviceVersion}),{},{\"telemetry.sdk.name\":e,\"telemetry.sdk.version\":n})}const BOo=[\"service.name\",\"deployment.environment\",\"service.version\",\"telemetry.sdk.name\",\"telemetry.sdk.version\"];function xHt(t,e){const n=qLt({},t),o={};for(const i of BOo)({}).hasOwnProperty.call(n,i)\u0026\u0026(o[i]=n[i],delete n[i]);return[...xge(n,e),...xge(o,e)]}const EHt={darwin:\"macOS\",win32:\"Windows\",cygwin:\"Windows\",linux:\"Linux\",android:\"Android\",freebsd:\"FreeBSD\",openbsd:\"OpenBSD\",netbsd:\"NetBSD\",sunos:\"SunOS\",aix:\"AIX\",haiku:\"Haiku\",\"Mac OS X\":\"macOS\"},BHt={trace:{text:\"TRACE\",number:1},debug:{text:\"DEBUG\",number:5},info:{text:\"INFO\",number:9},warn:{text:\"WARN\",number:13},error:{text:\"ERROR\",number:17},fatal:{text:\"FATAL\",number:21}},bOo=BHt.info;function SOo(t){try{return WO(String(t))}catch{return R$}}function QOo(t,e,n,o){const i=t.level||\"info\",{text:r,number:s}=BHt[i]||bOo,a=(function(g=Date.now()){return String(g)+\"000000\"})(Ah(o)?o:void 0),A={};e.distinctId\u0026\u0026(A.posthogDistinctId=e.distinctId),e.sessionId\u0026\u0026(A.sessionId=e.sessionId),e.windowId\u0026\u0026(A[\"window.id\"]=e.windowId),Hs(e.sessionStartTimestamp)||(A.sessionStartTimestamp=String(e.sessionStartTimestamp)),Hs(e.lastActivityTimestamp)||(A.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl\u0026\u0026(A[\"url.full\"]=e.currentUrl),e.screenName\u0026\u0026(A[\"screen.name\"]=e.screenName),e.appState\u0026\u0026(A[\"app.state\"]=e.appState),e.activeFeatureFlags\u0026\u0026e.activeFeatureFlags.length\u003e0\u0026\u0026(A.feature_flags=e.activeFeatureFlags);const c=sn({},A),l=t.attributes;if(l){let g=[];try{g=Object.keys(l)}catch{g=[]}for(const h of g){let d;try{d=l[h]}catch{d=R$}Object.defineProperty(c,h,{value:d,enumerable:!0,writable:!0,configurable:!0})}}const u={timeUnixNano:a,observedTimeUnixNano:a,severityNumber:s,severityText:r,body:{stringValue:SOo(t.body)},attributes:xge(c,n)};return t.trace_id\u0026\u0026(u.traceId=t.trace_id),t.span_id\u0026\u0026(u.spanId=t.span_id),Eo(t.trace_flags)||(u.flags=t.trace_flags),u}function bHt(t,e,n){return yHt(t,e,n)}function SHt(t,e,n,o){return{resourceLogs:[{resource:{attributes:xHt(e)},scopeLogs:[{scope:{name:n,version:o},logRecords:t}]}]}}var QHt=class{constructor(e){this.ls=e,this.us=0}get pending(){return!!this.hs}arm(e){this.clear(),this.us=Date.now()+e,this.hs=nHt(()=\u003e{this.hs=void 0,this.ls()},e)}armNoEarlierThan(e){this.hs\u0026\u0026Date.now()+e\u003c=this.us||this.arm(e)}clear(){this.hs\u0026\u0026(clearTimeout(this.hs),this.hs=void 0)}};function vHt(){return .75+.5*Math.random()}function wHt(t,e,n,o){const i=Math.min(Math.max(0,e-1),6),r=t*Math.pow(2,i);return Math.round(Math.min(r,Math.max(o,t))*n)}var vOo=class{constructor(e,n,o,i,r,s=()=\u003ePromise.resolve(),a){var A;this._instance=e,this.Mr=n,this.A=o,this.cs=i,this.ds=r,this.vs=s,this.fs=a,this.ps=new QHt(()=\u003ethis.gs()),this.ys=null,this.bs=0,this._s=0,this.ws=new XLt,this.ks=0,this.Ss=1,this.xs=0,this.$s=0,this.Cs=!1,this.Ts=n.maxBufferSize,this.Is=Math.max((A=n.maxQueueSize)!==null\u0026\u0026A!==void 0?A:n.maxBufferSize,n.maxBufferSize),this.Ms=n.flushIntervalMs,this.Es=n.maxBatchRecordsPerPost,this.Ps=n.rateCapWindowMs,this.Rs=n.maxLogsPerInterval}clearQueue(){this._s++,this._instance.setPersistedProperty(l6.LogsQueue,[])}reset(){this.ps.clear(),this.xs=0,this.$s=0,this.Cs=!1,this.ks=0,this.Ss=1,this.ws.reset(),this.Es=this.Mr.maxBatchRecordsPerPost}onReconnect(){this.ks=0,this.Ss=1,this.ws.isOpen()?this.As()\u0026\u0026this.Os():this.gs()}captureLog(e,n){var o;if(this._instance.isDisabled||this._instance.optedOut||!e?.body)return;const i=this.Fs(e);if(i===null)return;if(!i.body)return void this.A.info(\"Log was rejected in beforeSend function\");if(!this.Ds())return;const r={record:QOo(i,(o=n?.context)!==null\u0026\u0026o!==void 0?o:this.cs(),this.A,n?.occurredAtMs)};this.ds(()=\u003ethis.Ls(r))}Fs(e){const n=this.Mr.beforeSend;if(!n)return e;const o=As(n)?n:[n];let i=e;for(const r of o)try{const s=r(i);if(!s)return this.A.info(\"Log was rejected in beforeSend function\"),null;i=s}catch(s){return this.A.error(\"Error in beforeSend function for log:\",s),null}return i}Ds(){if(this.Rs===void 0)return!0;const e=Date.now(),n=e-this.xs;return this.Ps\u003en\u0026\u0026n\u003e=0||(this.xs=e,this.$s=0,this.Cs=!1),this.Rs\u003ethis.$s?(this.$s++,!0):(this.Cs||(this.A.warn(`captureLog dropping logs: exceeded ${this.Rs} logs per ${this.Ps}ms`),this.Cs=!0),!1)}flush(){var e=this;return Zu(function*(){if(!e._instance.isDisabled)return e.ys||(e.ys=e.Ns().finally(()=\u003e{e.ys=null})),e.ys})()}Ns(){var e=this;return Zu(function*(){var n;e.ps.clear();let o=(n=e._instance.getPersistedProperty(l6.LogsQueue))!==null\u0026\u0026n!==void 0?n:[];if(o.length===0)return;const i=o.length;let r=0;for(;o.length\u003e0\u0026\u0026i\u003er;){var s,a;const A=e._s;e.bs=0;const c=Math.min(o.length,e.Es),l=o.slice(0,c),u=SHt(l.map(h=\u003eh.record),e.qs(),(s=e.fs)!==null\u0026\u0026s!==void 0?s:e._instance.getLibraryId(),e._instance.getLibraryVersion()),g=yield e._instance.js(u);if(e._s!==A)return;if(g.kind===\"too-large\"\u0026\u0026l.length\u003e1)e.Es=Math.max(1,Math.floor(l.length/2)),e.A.warn(`Logs batch of size ${l.length} was too large for the ingestion endpoint, reducing batch size to ${e.Es}`);else if(e.ws.record(g),e.ps.pending\u0026\u0026e.ps.arm(Math.max(e.Ms,e.ws.remainingMs())),g.kind===\"retry-later\"||(g.kind===\"too-large\"?e.A.warn(\"Dropping a single log record with batch size 1 — the record is larger than the server cap and cannot be split further.\"):g.kind===\"ok\"\u0026\u0026e.Mr.maxBatchRecordsPerPost\u003ee.Es\u0026\u0026(e.Es=Math.min(e.Mr.maxBatchRecordsPerPost,e.Es+1)),yield e.Bs(l.length),o=(a=e._instance.getPersistedProperty(l6.LogsQueue))!==null\u0026\u0026a!==void 0?a:[],r+=l.length,g.kind===\"fatal\"))throw g.error}})()}Bs(e){var n=this;return Zu(function*(){var o;const i=Math.max(0,e-n.bs),r=(o=n._instance.getPersistedProperty(l6.LogsQueue))!==null\u0026\u0026o!==void 0?o:[];n._instance.setPersistedProperty(l6.LogsQueue,r.slice(i)),yield n.vs()})()}qs(){return bHt(this.Mr,this._instance.getLibraryId(),this._instance.getLibraryVersion())}Ls(e){var n;if(this._instance.optedOut)return;const o=(n=this._instance.getPersistedProperty(l6.LogsQueue))!==null\u0026\u0026n!==void 0?n:[];this.Is\u003eo.length||(o.shift(),this.bs++,this.A.info(\"Logs queue is full, dropping oldest record.\")),o.push(e),this._instance.setPersistedProperty(l6.LogsQueue,o),this.Ts\u003eo.length||this.ws.isOpen()?this.Os():this.gs()}Os(){this.ps.pending||this.ps.arm(Math.max(this.Ms,this.ws.remainingMs()))}Hs(){return Math.max(wHt(this.Ms,this.ks,this.Ss,3e4),this.ws.remainingMs())}As(){const e=this._instance.getPersistedProperty(l6.LogsQueue);return!!e\u0026\u0026e.length\u003e0}shutdown(e){var n=this;return Zu(function*(){n.ps.clear();const o=n.flush().catch(()=\u003e{});e!==void 0?yield oHt(o,e):yield o})()}flushWithTimeout(e){var n=this;return Zu(function*(){const o=n.flush();yield oHt(o,e,()=\u003e{o.catch(()=\u003e{})})})()}gs(){this.flush().then(()=\u003e{this.ks=0,this.Ss=1},e=\u003e{this.ks++,this.Ss=vHt(),this.A.error(\"PostHog logs flush failed:\",e)}).finally(()=\u003e{!this._instance.isDisabled\u0026\u0026this.As()\u0026\u0026this.ps.armNoEarlierThan(this.Hs())})}};const $De=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function PHt(t){return String(t)+\"000000\"}function MHt(t,e,n,o){let i=\"\";return o\u0026\u0026(i=Object.keys(o).sort().map(r=\u003e`${JSON.stringify(r)}:${JSON.stringify(o[r])}`).join(\",\")),`${t}\\0${e}\\0${n??\"\"}\\0${i}`}var wOo=class{constructor(e,n,o){this._instance=e,this.Mr=n,this.A=o,this.zs=new Map,this.ps=new QHt(()=\u003ethis.flush().catch(i=\u003e{this.A.error(\"Metrics flush failed:\",i)})),this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.ws=new XLt,this.ks=0,this.Ss=1,this.Gs=0}count(e,n=1,o){this.Qs({name:e,type:\"count\",value:n,unit:o?.unit,attributes:o?.attributes})}gauge(e,n,o){this.Qs({name:e,type:\"gauge\",value:n,unit:o?.unit,attributes:o?.attributes})}histogram(e,n,o){this.Qs({name:e,type:\"histogram\",value:n,unit:o?.unit,attributes:o?.attributes})}flush(){var e=this;const n=this.ys,o=(function(){var i=Zu(function*(){n\u0026\u0026(yield n.catch(()=\u003e{})),yield e.Js()});return function(){return i.apply(this,arguments)}})()().finally(()=\u003e{this.ys===o\u0026\u0026(this.ys=null)});return this.ys=o,o}drainWindow(){if(this.zs.size===0)return null;const e=this.zs;return this.zs=new Map,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.Zs(e)}reset(){this.Gs++,this.ws.reset(),this.ks=0,this.Ss=1,this.ps.clear(),this.zs=new Map,this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set}Qs(e){if(this._instance.isDisabled||this._instance.optedOut)return;const n=this.Fs(e);if(n===null)return;if(!n.name||typeof n.name!=\"string\")return void this.A.warn(\"Dropping metric with empty name\");if(typeof n.value!=\"number\"||!Number.isFinite(n.value))return void this.A.warn(`Dropping metric '${n.name}': value must be a finite number`);if(n.type===\"count\"\u0026\u00260\u003en.value)return void this.A.warn(`Dropping count '${n.name}': counters are monotonic, value must be \u003e= 0`);let o,i;try{o=n.attributes?sn({},n.attributes):void 0,i=MHt(n.type,n.name,n.unit,o)}catch(a){return void this.A.warn(`Dropping metric '${n.name}': attributes could not be serialized`,a)}let r=this.zs.get(i);if(!r){if(!this.Ks())return;r={name:n.name,type:n.type,unit:n.unit,attributes:o,windowStartMs:Date.now()},this.zs.set(i,r)}const s=this.Ws.get(n.name);s===void 0?this.Ws.set(n.name,n.type):s===n.type||this.Vs.has(n.name)||(this.Vs.add(n.name),this.A.warn(`Metric name '${n.name}' is already used as a ${s}; recording it as a ${n.type} too will blend both series in charts. Use a distinct name.`)),this.Xs(r,n.value),this.Os()}Ks(){return this.Mr.maxSeriesPerFlush\u003ethis.zs.size||(this.Us||(this.Us=!0,this.A.warn(`Metric series cap reached (${this.Mr.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}Xs(e,n){switch(e.type){case\"count\":var o;e.total=((o=e.total)!==null\u0026\u0026o!==void 0?o:0)+n;break;case\"gauge\":e.last=n;break;case\"histogram\":{e.hist||(e.hist={count:0,sum:0,min:n,max:n,bucketCounts:new Array($De.length+1).fill(0)});const i=e.hist;i.count+=1,i.sum+=n,i.min=Math.min(i.min,n),i.max=Math.max(i.max,n),i.bucketCounts[(function(r,s){for(let a=0;s.length\u003ea;a++)if(s[a]\u003e=r)return a;return s.length})(n,$De)]+=1;break}}}Fs(e){const n=this.Mr.beforeSend;if(!n)return e;const o=As(n)?n:[n];let i=e;for(const r of o)try{const s=r(i);if(!s)return this.A.info(\"Metric was rejected in beforeSend function\"),null;i=s}catch(s){return this.A.error(\"Error in beforeSend function for metric:\",s),null}return i}Os(){this.ps.pending||this.ps.arm(this.Hs())}Hs(){return Math.max(wHt(this.Mr.flushIntervalMs,this.ks,this.Ss,3e4),this.ws.remainingMs())}Js(){var e=this;return Zu(function*(){if(e.ps.clear(),e.zs.size===0)return;const n=e.zs;e.zs=new Map,e.Us=!1,e.Ws=new Map,e.Vs=new Set;const o=e.Gs,i=yield e._instance.Ys(e.Zs(n));if(o===e.Gs)switch(e.ws.record(i),i.kind===\"retry-later\"?(e.ks++,e.Ss=vHt()):(e.ks=0,e.Ss=1),e.ps.pending\u0026\u0026e.ps.arm(e.Hs()),i.kind){case\"ok\":return;case\"retry-later\":return e.ho(n),void e.ps.armNoEarlierThan(e.Hs());case\"too-large\":return void e.A.warn(\"Metrics batch exceeded the server size limit and was dropped\");case\"fatal\":return void e.A.error(\"Failed to send metrics batch:\",i.error)}})()}Zs(e){return n=this.co(e),o=(function(s,a,A){return yHt(s,a,A)})(this.Mr,this._instance.getLibraryId(),this._instance.getLibraryVersion()),i=this._instance.getLibraryId(),r=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:xHt(o)},scopeMetrics:[{scope:{name:i,version:r},metrics:n}]}]};var n,o,i,r}co(e){const n=PHt(Date.now()),o=new Map;for(const a of e.values()){var i;const A=MHt(a.type,a.name,a.unit,void 0);let c=o.get(A);c||(c=sn({name:a.name},a.unit\u0026\u0026{unit:a.unit}),a.type===\"count\"?c.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:a.type===\"gauge\"?c.gauge={dataPoints:[]}:c.histogram={aggregationTemporality:1,dataPoints:[]},o.set(A,c));const l=xge((i=a.attributes)!==null\u0026\u0026i!==void 0?i:{},this.A),u=PHt(a.windowStartMs);if(a.type===\"count\"){var r;const g={attributes:l,startTimeUnixNano:u,timeUnixNano:n,asDouble:(r=a.total)!==null\u0026\u0026r!==void 0?r:0};c.sum.dataPoints.push(g)}else if(a.type===\"gauge\"){var s;const g={attributes:l,timeUnixNano:n,asDouble:(s=a.last)!==null\u0026\u0026s!==void 0?s:0};c.gauge.dataPoints.push(g)}else a.hist\u0026\u0026c.histogram.dataPoints.push({attributes:l,startTimeUnixNano:u,timeUnixNano:n,count:a.hist.count,sum:a.hist.sum,min:a.hist.min,max:a.hist.max,bucketCounts:a.hist.bucketCounts,explicitBounds:$De})}return Array.from(o.values())}ho(e){for(const[i,r]of e){const s=this.zs.get(i);if(s)switch(s.windowStartMs=Math.min(s.windowStartMs,r.windowStartMs),s.type){case\"count\":var n,o;s.total=((n=s.total)!==null\u0026\u0026n!==void 0?n:0)+((o=r.total)!==null\u0026\u0026o!==void 0?o:0);break;case\"gauge\":break;case\"histogram\":if(r.hist)if(s.hist){s.hist.count+=r.hist.count,s.hist.sum+=r.hist.sum,s.hist.min=Math.min(s.hist.min,r.hist.min),s.hist.max=Math.max(s.hist.max,r.hist.max);for(let a=0;s.hist.bucketCounts.length\u003ea;a++)s.hist.bucketCounts[a]+=r.hist.bucketCounts[a]}else s.hist=r.hist}else this.Ks()\u0026\u0026this.zs.set(i,r)}}};const DHt=(t,{debugEnabled:e}={})=\u003e{const n={N(o,...i){Fn\u0026\u0026(Ob.DEBUG||Fn.POSTHOG_DEBUG||e)\u0026\u0026!Eo(Fn.console)\u0026\u0026Fn.console\u0026\u0026(\"__rrweb_original__\"in Fn.console[o]?Fn.console[o].__rrweb_original__:Fn.console[o])(t,...i)},debug(...o){n.N(\"debug\",...o)},info(...o){n.N(\"log\",...o)},warn(...o){n.N(\"warn\",...o)},error(...o){n.N(\"error\",...o)},critical(...o){console.error(t,...o)},uninitializedWarning(o){n.error(`You must initialize PostHog before calling ${o}`)},createLogger:(o,i)=\u003eDHt(`${t} ${o}`,i)};return n},ui=DHt(\"[PostHog.js]\"),Cd=ui.createLogger,POo=Cd(\"[ExternalScriptsLoader]\"),Ege=t=\u003e{const e=No?.querySelectorAll(\"script\");if(e){for(let n=0;e.length\u003en;n++)if(e[n].src===t||e[n].getAttribute(\"src\")===t)return e[n]}},IR=(t,e,n)=\u003e{if(t.config.disable_external_dependency_loading)return POo.warn(`${e} was requested but loading of external scripts is disabled.`),n(\"Loading of external scripts is disabled\");const o=Ege(e);if(o){if(o.__posthog_loading_callback_fired)return n();const r=o.__posthog_loading_error;return r?n(r):(o.addEventListener(\"load\",s=\u003e{o.__posthog_loading_callback_fired=!0,n(void 0,s)}),void o.addEventListener(\"error\",s=\u003e{o.__posthog_loading_error=s,n(s)}))}const i=()=\u003e{if(!No)return n(\"document not found\");if(Ege(e))return IR(t,e,n);let r=No.createElement(\"script\");if(r.type=\"text/javascript\",r.crossOrigin=\"anonymous\",r.src=e,r.onload=a=\u003e{r.__posthog_loading_callback_fired=!0,n(void 0,a)},r.onerror=a=\u003e{r.__posthog_loading_error=a,n(a)},t.config.prepare_external_dependency_script\u0026\u0026(r=t.config.prepare_external_dependency_script(r)),!r)return n(\"prepare_external_dependency_script returned null\");if(t.config.external_scripts_inject_target===\"head\")No.head.appendChild(r);else{const a=No.querySelectorAll(\"body \u003e script\");var s;a.length\u003e0?(s=a[0].parentNode)===null||s===void 0||s.insertBefore(r,a[0]):No.body.appendChild(r)}};No?.body?i():No?.addEventListener(\"DOMContentLoaded\",i)},qDe={},NHt=(t,e)=\u003e{let n=`/static/${e}.js?v=${t.version}`;return e===\"toolbar\"\u0026\u0026(n=`${n}\u0026t=${Math.floor(Date.now()/3e5)*3e5}`),t.requestRouter.endpointFor(\"assets\",n)};Vr.__PosthogExtensions__=Vr.__PosthogExtensions__||{},Vr.__PosthogExtensions__.loadExternalDependency=(t,e,n)=\u003e{if(e===\"remote-config\"){const i=t.requestRouter.endpointFor(\"assets\",`/array/${t.config.token}/config.js`);return void IR(t,i,n)}const o=t.config.strict_script_versioning;if(o){const i=t.requestRouter.endpointFor(\"assets\",`/static/${t.version}/${e}.js`),r=qDe[i];if(o===\"fallback\"\u0026\u0026r){if(Ege(r))return void IR(t,r,n);delete qDe[i]}return void IR(t,i,o===\"fallback\"?(s,a)=\u003e{if(s)if(typeof s==\"string\")n(s);else{var A;const c=NHt(t,e);qDe[i]=c;const l=Ege(i);l==null||(A=l.parentNode)===null||A===void 0||A.removeChild(l),IR(t,c,n)}else n(void 0,a)}:n)}IR(t,NHt(t,e),n)},Vr.__PosthogExtensions__.loadSiteApp=(t,e,n)=\u003e{const o=t.requestRouter.endpointFor(\"api\",e);IR(t,o,n)},Ob.DEBUG=!1,Ob.LIB_VERSION=\"1.435.8\",Ob.LIB_NAME=\"web\";var n_=Ob;const MOo=\"$people_distinct_id\",RB=\"distinct_id\",XDe=\"$device_id\",ZDe=\"$device_model\",Bge=\"__alias\",DOo=\"__cmpns\",RHt=\"$fbc\",jO=\"$fbc_persistence\",THt=\"$fbp\",F$=\"$fbp_persistence\",eNe=\"__timers\",kHt=\"$autocapture_disabled_server_side\",tNe=\"$heatmaps_enabled_server_side\",nNe=\"$exception_capture_enabled_server_side\",FHt=\"$error_tracking_suppression_rules\",oNe=\"$error_tracking_capture_extension_exceptions\",iNe=\"$web_vitals_enabled_server_side\",rNe=\"$dead_clicks_enabled_server_side\",sNe=\"$product_tours_enabled_server_side\",LHt=\"$logs_capture_enabled_server_side\",HHt=\"$web_vitals_allowed_metrics\",L$=\"$session_recording_remote_config\",NOo=\"$session_recording_enabled_server_side\",ROo=\"$replay_sample_rate\",TOo=\"$replay_override_sampling\",kOo=\"$replay_override_linked_flag\",FOo=\"$replay_override_url_trigger\",LOo=\"$replay_override_event_trigger\",$O=\"$sesid\",OHt=\"$session_is_sampled\",HOo=\"$session_past_minimum_duration\",OOo=\"$session_recording_url_trigger_activated_session\",GOo=\"$session_recording_event_trigger_activated_session\",YOo=\"$debug_first_full_snapshot_timestamp\",UOo=\"$sess_rec_flush_size\",TB=\"$enabled_feature_flags\",Yb=\"$active_feature_flags\",aNe=\"$early_access_features\",CR=\"$feature_flag_details\",Dw=\"$feature_flag_payloads\",yR=\"$feature_flag_request_id\",H$=\"$minimal_flag_called_events\",g6=\"$override_feature_flags\",xR=\"$override_feature_flag_payloads\",Nw=\"$stored_person_properties\",Rw=\"$stored_group_properties\",GHt=\"$groups\",O$=\"$surveys\",bge=\"$surveys_loaded_at\",YHt=\"$surveys_activated\",UHt=\"$surveys_activated_session\",KHt=\"$surveys_activated_timestamps\",ANe=\"ph_product_tours\",KOo=\"$product_tours_activated\",VOo=\"$product_tours_activated_session\",zOo=\"$conversations_widget_session_id\",JOo=\"$conversations_ticket_id\",WOo=\"$conversations_widget_state\",jOo=\"$conversations_user_traits\",Tw=\"$flag_call_reported\",G$=\"$flag_call_reported_session_id\",Y$=\"$feature_flag_errors\",kw=\"$feature_flag_evaluated_at\",qy=\"$user_state\",cNe=\"$client_session_props\",$Oo=\"$capture_rate_limit\",VHt=\"$initial_campaign_params\",zHt=\"$initial_referrer_info\",qO=\"$initial_person_info\",lNe=\"$epp\",uNe=\"$posthog_cookieless\",JHt=\"$cookieless_mode\",WHt=\"$sdk_debug_extensions_init_method\",jHt=\"$sdk_debug_extensions_init_time_ms\",gNe=\"$sdk_debug_recording_script_not_loaded\",dNe=\"$sdk_debug_replay_stale_config\",$Ht=\"$sdk_debug_replay_event_trigger_status\",qHt=\"$sdk_debug_replay_linked_flag_trigger_status\",XHt=\"$sdk_debug_replay_matched_recording_trigger_groups\",ZHt=\"$sdk_debug_replay_pending_trigger_conditions\",eOt=\"$sdk_debug_replay_remote_trigger_matching_config\",tOt=\"$sdk_debug_replay_trigger_groups_count\",nOt=\"$sdk_debug_replay_url_trigger_status\",qOo=\"$session_recording_start_reason\",hNe=\"PostHog loadExternalDependency extension not found.\",Ub=\"anonymous\",Sge=\"identified\",oOt=\"identified_only\",U$=\"visibilitychange\",Qge=\"beforeunload\",pNe=\"$pageview\",iOt=\"$pageleave\",rOt=\"$identify\",sOt=\"$groupidentify\";function XO(t,e){As(t)\u0026\u0026t.forEach(e)}function kl(t,e){if(!Hs(t))if(As(t))t.forEach(e);else if((n=\u003en instanceof FormData)(t))t.forEach((n,o)=\u003ee(n,o));else for(const n in t)MDe.call(t,n)\u0026\u0026e(t[n],n)}const eg=function(t,...e){for(const n of e)for(const o in n)n[o]!==void 0\u0026\u0026(t[o]=n[o]);return t};function vge(t){const e=Object.keys(t);let n=e.length;const o=new Array(n);for(;n--;)o[n]=[e[n],t[e[n]]];return o}const XOo=function(t){return function(...e){try{return t.apply(this,e)}catch(n){ui.critical(\"Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A.\"),ui.critical(n)}}},mNe=function(t){const e={};return kl(t,function(n,o){(rA(n)\u0026\u0026n.length\u003e0||Ah(n))\u0026\u0026(e[o]=n)}),e};function aOt(t){const e=sn({},t);for(const n of[\"name\",\"message\",\"stack\",\"cause\",\"errors\"])try{n in t\u0026\u0026(e[n]=t[n])}catch{}return e}const ZOo=[\"herokuapp.com\",\"vercel.app\",\"netlify.app\"];function eGo(t){const e=t?.hostname;if(!rA(e))return!1;const n=e.split(\".\").slice(-2).join(\".\");for(const o of ZOo)if(n===o)return!1;return!0}function el(t,e,n,o){const{capture:i=!1,passive:r=!0}=o??{};t?.addEventListener(e,n,{capture:i,passive:r})}function _Ne(t){return t.name===\"ph_toolbar_internal\"}const K$=t=\u003e{if(No){try{const e=t+\"=\",n=No.cookie.split(\";\").filter(o=\u003eo.length);for(let o=0;n.length\u003eo;o++){let i=n[o];for(;i.charAt(0)==\" \";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(t){return 0\u003et?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Ah(t)\u0026\u0026isFinite(t)\u0026\u0026Math.floor(t)===t});var tGo=class Eit{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError(\"not 128-bit length\")}static fromFieldsV7(e,n,o,i){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(o)||!Number.isInteger(i)||0\u003ee||0\u003en||0\u003eo||0\u003ei||e\u003e0xffffffffffff||n\u003e4095||o\u003e1073741823||i\u003e4294967295)throw new RangeError(\"invalid field value\");const r=new Uint8Array(16);return r[0]=e/Math.pow(2,40),r[1]=e/Math.pow(2,32),r[2]=e/Math.pow(2,24),r[3]=e/Math.pow(2,16),r[4]=e/256,r[5]=e,r[6]=112|n\u003e\u003e\u003e8,r[7]=n,r[8]=128|o\u003e\u003e\u003e24,r[9]=o\u003e\u003e\u003e16,r[10]=o\u003e\u003e\u003e8,r[11]=o,r[12]=i\u003e\u003e\u003e24,r[13]=i\u003e\u003e\u003e16,r[14]=i\u003e\u003e\u003e8,r[15]=i,new Eit(r)}toString(){let e=\"\";for(let n=0;this.bytes.length\u003en;n++)e=e+(this.bytes[n]\u003e\u003e\u003e4).toString(16)+(15\u0026this.bytes[n]).toString(16),n!==3\u0026\u0026n!==5\u0026\u0026n!==7\u0026\u0026n!==9||(e+=\"-\");if(e.length!==36)throw new Error(\"Invalid UUIDv7 was generated\");return e}clone(){return new Eit(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(let n=0;16\u003en;n++){const o=this.bytes[n]-e.bytes[n];if(o!==0)return Math.sign(o)}return 0}},nGo=class{generate(){const e=this.generateOrAbort();if(!Eo(e))return e;{this.Ct=0;const n=this.generateOrAbort();if(Eo(n))throw new Error(\"Could not generate UUID after timestamp reset\");return n}}generateOrAbort(){const e=(()=\u003e{const n=Date.now();return Ah(n)\u0026\u0026isFinite(n)?Math.min(Math.max(Math.floor(n),0),0xffffffffffff):0})();if(e\u003ethis.Ct)this.Ct=e,this.It();else{if(this.Ct\u003e=e+1e4)return;this.Mt++,this.Mt\u003e4398046511103\u0026\u0026(this.Ct++,this.It())}return tGo.fromFieldsV7(this.Ct,Math.trunc(this.Mt/Math.pow(2,30)),this.Mt\u0026Math.pow(2,30)-1,this.Tt.nextUint32())}It(){this.Mt=1024*this.Tt.nextUint32()+(1023\u0026this.Tt.nextUint32())}constructor(){this.Ct=0,this.Mt=0,this.Tt=new oGo}};let AOt=t=\u003e{if(\"u\"\u003etypeof UUIDV7_DENY_WEAK_RNG\u0026\u0026UUIDV7_DENY_WEAK_RNG)throw new Error(\"no cryptographically strong RNG available\");for(let e=0;t.length\u003ee;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};Fn\u0026\u0026!Eo(Fn.crypto)\u0026\u0026crypto.getRandomValues\u0026\u0026(AOt=t=\u003ecrypto.getRandomValues(t));var oGo=class{nextUint32(){return this.Rt.length\u003ethis.At||(AOt(this.Rt),this.At=0),this.Rt[this.At++]}constructor(){this.Rt=new Uint32Array(8),this.At=1/0}};let cOt;const kB=()=\u003eiGo().toString(),iGo=()=\u003e(cOt||(cOt=new nGo)).generate();let V$=\"\";const rGo=/[a-z0-9][a-z0-9-]+\\.[a-z]{2,}$/i;let ZO=null;const yd={Et(){if(!Id(ZO))return ZO;if(ZO=!1,No)try{const t=`__ph_cookie_support_${kB()}`;yd.$t(t,\"xyz\"),ZO=K$(t)==='\"xyz\"',yd.Pt(t)}catch{ZO=!1}return ZO},Dt(t){ui.error(\"cookieStore error: \"+t)},Ot:K$,Lt(t){let e;try{e=JSON.parse(yd.Ot(t))||{}}catch{}return e},$t(t,e,n,o,i){if(!No)return!1;try{let r=\"\",s=\"\";const a=(function(c,l){if(l){let u=(function(g,h=No){if(V$)return V$;if(!h||[\"localhost\",\"127.0.0.1\"].includes(g))return\"\";const d=g.split(\".\");let p=Math.min(d.length,8);const m=\"dmn_chk_\"+kB();for(;!V$\u0026\u0026p--;){const _=d.slice(p).join(\".\"),f=m+\"=1;domain=.\"+_+\";path=/\";h.cookie=f+\";max-age=3\",h.cookie.includes(m)\u0026\u0026(h.cookie=f+\";max-age=0\",V$=_)}return V$})(c);if(!u){const g=(h=\u003e{const d=h.match(rGo);return d?d[0]:\"\"})(c);g!==u\u0026\u0026ui.info(\"Warning: cookie subdomain discovery mismatch\",g,u),u=g}return u?\"; domain=.\"+u:\"\"}return\"\"})(No.location.hostname,o);if(n){const c=new Date;c.setTime(c.getTime()+864e5*n),r=\"; expires=\"+c.toUTCString()}i\u0026\u0026(s=\"; secure\");const A=t+\"=\"+encodeURIComponent(JSON.stringify(e))+r+\"; SameSite=Lax; path=/\"+a+s;return A.length\u003e3686.4\u0026\u0026ui.warn(\"cookieStore warning: large cookie, len=\"+A.length),No.cookie=A,!0}catch{return!1}},Pt(t,e){if(No?.cookie\u0026\u0026(!e||!Id(K$(t))))try{yd.$t(t,\"\",-1,e)}catch{return}}};let fNe=null;const hc={Et(){if(!Id(fNe))return fNe;let t=!0;if(Eo(Fn))t=!1;else try{const e=\"__mplssupport__\";hc.$t(e,\"xyz\"),hc.Ot(e)!=='\"xyz\"'\u0026\u0026(t=!1),hc.Pt(e)}catch{t=!1}return t||ui.error(\"localStorage unsupported; falling back to cookie store\"),fNe=t,t},Dt(t){ui.error(\"localStorage error: \"+t)},Ot(t){try{return Fn?.localStorage.getItem(t)}catch(e){hc.Dt(e)}return null},Lt(t){try{return JSON.parse(hc.Ot(t))||{}}catch{}return null},$t(t,e){try{return Fn?.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){hc.Dt(n)}return!1},Pt(t){try{Fn?.localStorage.removeItem(t)}catch(e){hc.Dt(e)}}},INe=[Nw,Yb,TB,CR,Dw,yR,kw,Y$,Tw],ER=[XDe,RB,$O,OHt,lNe,qO,jO,qy],wge=t=\u003et+\"_cpm\",sGo=[\"__proto__\",\"constructor\",\"prototype\"],CNe=t=\u003e{if(!QA(t))return{};const e={};return Object.keys(t).forEach(n=\u003e{sGo.indexOf(n)===-1\u0026\u0026(e[n]=t[n])}),e},yNe=(t,e=[])=\u003e{const n={};return[...ER,...e].forEach(o=\u003e{const i=t[o];Eo(i)||Id(i)||i===\"\"||(n[o]=i)}),n},lOt=t=\u003e{let e=5381,n=2166136261;for(let o=0;t.length\u003eo;o++){const i=t.charCodeAt(o);e=33*e^i,n=Math.imul(n^i,16777619)}return t.length.toString(36)+\".\"+(e\u003e\u003e\u003e0).toString(36)+\".\"+(n\u003e\u003e\u003e0).toString(36)},uOt=(t,e)=\u003e({p:e,f:lOt(JSON.stringify(t))}),gOt=(t,e)=\u003e{if(!e)return{properties:[],isValid:!1};try{const n=yd.Lt(wge(t)),o=n?.f===lOt(e)\u0026\u0026As(n.p);return{properties:o?n.p:[],isValid:o}}catch{return{properties:[],isValid:!1}}},xNe=(t,e)=\u003ee+\"|\"+(yd.Ot(wge(t))||\"\"),eG={},ENe={Et:()=\u003e!0,Dt(t){ui.error(\"memoryStorage error: \"+t)},Ot:t=\u003et in eG?eG[t]:null,Lt:t=\u003et in eG?eG[t]:null,$t:(t,e)=\u003e(eG[t]=e,!0),Pt(t){delete eG[t]}};let BR=null;const nu={Et(){if(!Id(BR))return BR;if(BR=!0,Eo(Fn))BR=!1;else try{const t=\"__support__\";nu.$t(t,\"xyz\"),nu.Ot(t)!=='\"xyz\"'\u0026\u0026(BR=!1),nu.Pt(t)}catch{BR=!1}return BR},Dt(t){ui.error(\"sessionStorage error: \",t)},Ot(t){try{return Fn?.sessionStorage.getItem(t)}catch(e){nu.Dt(e)}return null},Lt(t){try{return JSON.parse(nu.Ot(t))||null}catch{}return null},$t(t,e){try{return Fn?.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){nu.Dt(n)}return!1},Pt(t){try{Fn?.sessionStorage.removeItem(t)}catch(e){nu.Dt(e)}}};var aGo=class{constructor(e){this._instance=e}get Mr(){return this._instance.config}get consent(){return this.Do()?0:this.Lo}isOptedOut(){return this.Mr.cookieless_mode===\"always\"||this.isRejected()||this.consent===-1\u0026\u0026this.Mr.cookieless_mode===\"on_reject\"}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1\u0026\u0026this.Mr.opt_out_capturing_by_default}optInOut(e){this.No.$t(this.qo,e?1:0,this.Mr.cookie_expiration,this.Mr.cross_subdomain_cookie,this.Mr.secure_cookie)}reset(){this.No.Pt(this.qo,this.Mr.cross_subdomain_cookie)}get qo(){const{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:o}=this._instance.config;return o||(n?n+e:\"__ph_opt_in_out_\"+e)}get Lo(){const e=this.No.Ot(this.qo);return NDe(e)?1:as(DHo,e)?0:-1}get No(){const e=this.Mr.opt_out_capturing_persistence_type,n=e===\"localStorage\"?hc:yd,o=n.Et()?n:ENe;if(!this.jo||this.jo!==o){this.jo=o;const i=e===\"localStorage\"?yd:hc;i.Ot(this.qo)\u0026\u0026(this.jo.Ot(this.qo)||this.optInOut(NDe(i.Ot(this.qo))),i.Pt(this.qo,this.Mr.cross_subdomain_cookie))}return this.jo}Do(){return!!this.Mr.respect_dnt\u0026\u0026[tf?.doNotTrack,tf?.msDoNotTrack,Vr.doNotTrack,tf?.globalPrivacyControl].some(e=\u003eNDe(e))}};function dOt(t,e){var n;const o=t==null||(n=t.config)===null||n===void 0?void 0:n.get_current_url;if(!nf(o))return e;try{const i=o(e);return rA(i)\u0026\u0026i?i:e}catch(i){return ui.error(\"Error in get_current_url, falling back to window.location.href\",i),e}}function hOt(t){var e;return t instanceof Element\u0026\u0026(t.id===\"__POSTHOG_TOOLBAR__\"||!!(!((e=t.closest)===null||e===void 0)\u0026\u0026e.call(t,\".toolbar-global-fade-container\")))}function d6(t){return!!t\u0026\u0026t.nodeType===1}function AI(t,e){return!!t\u0026\u0026!!t.tagName\u0026\u0026t.tagName.toLowerCase()===e.toLowerCase()}function pOt(t){return!!t\u0026\u0026t.nodeType===3}function BNe(t){return!!t\u0026\u0026t.nodeType===11\u0026\u0026d6(t.host)}function bNe(t){return t?rge(t).split(/\\s+/):[]}function mOt(t,e){const n=(function(o){var i;const r=Fn==null||(i=Fn.location)===null||i===void 0?void 0:i.href;return Eo(r)?void 0:dOt(o,r)})(e);return!!(n\u0026\u0026t\u0026\u0026t.some(o=\u003en.match(o)))}function tG(t){let e=\"\";switch(typeof t.className){case\"string\":e=t.className;break;case\"object\":e=(t.className\u0026\u0026\"baseVal\"in t.className?t.className.baseVal:null)||t.getAttribute(\"class\")||\"\";break;default:e=\"\"}return bNe(e)}function _Ot(t){return Hs(t)?null:rge(t).split(/(\\s+)/).filter(e=\u003ej$(e)).join(\"\").replace(/[\\r\\n]/g,\" \").replace(/[ ]+/g,\" \").substring(0,255)}function z$(t){let e=\"\";return nG(t)\u0026\u0026!W$(t)\u0026\u0026t.childNodes\u0026\u0026t.childNodes.length\u0026\u0026kl(t.childNodes,function(n){var o;pOt(n)\u0026\u0026n.textContent\u0026\u0026(e+=(o=_Ot(n.textContent))!==null\u0026\u0026o!==void 0?o:\"\")}),rge(e)}function J$(t){var e;return Eo(t.target)?t.srcElement||null:!((e=t.target)===null||e===void 0)\u0026\u0026e.shadowRoot?t.composedPath()[0]||null:t.target||null}const SNe=[\"a\",\"button\",\"form\",\"input\",\"select\",\"textarea\",\"label\"];function QNe(t,e){const n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector;try{return!!n\u0026\u0026n.call(t,e)}catch{return!1}}function vNe(t,e){if(Eo(e))return!0;for(const n of t)if(e.some(o=\u003eQNe(n,o)))return!0;return!1}function fOt(t){const e=t.parentNode;return!(!e||!d6(e))\u0026\u0026e}const wNe=[\".ph-no-autocapture\",\"[data-ph-no-autocapture]\"],IOt=[\"next\",\"previous\",\"prev\",\"\u003e\",\"\u003c\"],AGo=[...IOt,\"+\",\"-\",\"−\",\"–\"],COt=(t,e)=\u003e/[a-z0-9]/i.test(e)?t.includes(e):t===e,yOt=[\".ph-no-rageclick\",\".ph-no-capture\"],cGo=[\"\",\"text\",\"search\",\"email\",\"password\",\"url\",\"tel\",\"number\"];function xOt(t,e){if(!Fn||PNe(t))return!1;let n,o,i;var r,s;if($y(e)?(n=!!e\u0026\u0026yOt,o=void 0,i=!1):(n=(r=e?.css_selector_ignorelist)!==null\u0026\u0026r!==void 0?r:yOt,o=e?.content_ignorelist,i=(s=e?.ignore_text_selection)!==null\u0026\u0026s!==void 0\u0026\u0026s),n===!1||i\u0026\u0026(function(A){return!(!A||!d6(A))\u0026\u0026(!!AI(A,\"textarea\")||(AI(A,\"input\")?as(cGo,(A.getAttribute(\"type\")||\"\").toLowerCase()):(function(c){var l;if(c.isContentEditable)return!0;const u=(l=c.getAttribute)===null||l===void 0?void 0:l.call(c,\"contenteditable\");return u===\"true\"||u===\"\"})(A)))})(t))return!1;const{targetElementList:a}=EOt(t,!1);return!(function(A,c){if(A===!1||Eo(A))return!1;let l;if(A===!0)l=IOt;else{if(!As(A))return!1;if(A.length\u003e10)return ui.error(\"[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching.\"),!1;l=A.map(u=\u003eu.toLowerCase())}return c.some(({safeText:u,ariaLabel:g})=\u003el.some(h=\u003eCOt(u,h)||COt(g,h)))})(o,a.map(A=\u003e{var c;return{safeText:z$(A).toLowerCase(),ariaLabel:((c=A.getAttribute(\"aria-label\"))===null||c===void 0?void 0:c.toLowerCase().trim())||\"\"}}))\u0026\u0026!vNe(a,n)}const PNe=t=\u003e!t||AI(t,\"html\")||!d6(t),EOt=(t,e)=\u003e{if(!Fn||PNe(t))return{parentIsUsefulElement:!1,targetElementList:[]};let n=!1;const o=[t];let i=t;for(;i.parentNode\u0026\u0026!AI(i,\"body\");){if(BNe(i.parentNode)){o.push(i.parentNode.host),i=i.parentNode.host;continue}const r=fOt(i);if(!r)break;if(e||SNe.indexOf(r.tagName.toLowerCase())\u003e-1)n=!0;else try{const s=Fn.getComputedStyle(r);s\u0026\u0026s.getPropertyValue(\"cursor\")===\"pointer\"\u0026\u0026(n=!0)}catch{}o.push(r),i=r}return{parentIsUsefulElement:n,targetElementList:o}};function nG(t){const e=new Set;let n=0;for(let r=t;r.parentNode\u0026\u0026!AI(r,\"body\");r=r.parentNode){if(n++\u003e=1e3||e.has(r))return!1;e.add(r);const s=tG(r);if(as(s,\"ph-sensitive\")||as(s,\"ph-no-capture\"))return!1}if(as(tG(t),\"ph-include\"))return!0;const o=t.type||\"\";if(rA(o))switch(o.toLowerCase()){case\"hidden\":case\"password\":return!1}const i=t.name||t.id||\"\";return!rA(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,\"\"))}function W$(t){return!!(AI(t,\"input\")\u0026\u0026![\"button\",\"checkbox\",\"submit\",\"reset\"].includes(t.type)||AI(t,\"select\")||AI(t,\"textarea\")||t.getAttribute(\"contenteditable\")===\"true\")}const BOt=new RegExp(\"^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$\"),bOt=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,lGo=[16,15,14,13],uGo=new RegExp(\"^(\\\\d{3}-?\\\\d{2}-?\\\\d{4})$\"),SOt=new RegExp(\"(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))\",\"g\"),QOt=/[0-9A-Za-z_]/;function gGo(t){let e=0,n=!1;for(let o=t.length-1;o\u003e=0;o--){let i=t.charCodeAt(o)-48;n\u0026\u0026(i*=2,i\u003e9\u0026\u0026(i-=9)),e+=i,n=!n}return e%10==0}function j$(t,e=!0){return!(Hs(t)||rA(t)\u0026\u0026(t=rge(t),(e?BOt.test((t||\"\").replace(/[- ]/g,\"\")):(function(n){let o;for(bOt.lastIndex=0;o=bOt.exec(n);){const i=o[2];if(!i)continue;const r=i.replace(/[- ]/g,\"\");for(let s=0;r.length\u003es;s++)for(const a of lGo){const A=s+a;if(r.length\u003e=A){const c=r.slice(s,A);if(BOt.test(c)\u0026\u0026gGo(c))return!0}}}return!1})(t))||(e?uGo.test(t):(function(n){let o;for(SOt.lastIndex=0;o=SOt.exec(n);){const i=o[1],r=o[3];if(!(i\u0026\u0026r\u0026\u0026QOt.test(i)\u0026\u0026QOt.test(r)))return!0}return!1})(t))))}function vOt(t){let e=z$(t);return e=`${e} ${wOt(t)}`.trim(),j$(e)?e:\"\"}function wOt(t){let e=\"\";return t\u0026\u0026t.childNodes\u0026\u0026t.childNodes.length\u0026\u0026kl(t.childNodes,function(n){var o;if(n\u0026\u0026((o=n.tagName)===null||o===void 0?void 0:o.toLowerCase())===\"span\")try{const i=z$(n);e=`${e} ${i}`.trim(),n.childNodes\u0026\u0026n.childNodes.length\u0026\u0026(e=`${e} ${wOt(n)}`.trim())}catch(i){ui.error(\"[AutoCapture]\",i)}}),e}function POt(t){return t.replace(/\"|\\\\\"/g,'\\\\\"')}function dGo(t){const e=t.attr__class;if(e)return As(e)?e:bNe(e)}const Pge=Cd(\"[Dead Clicks]\"),hGo=()=\u003e!0,pGo=t=\u003e{var e;const n=!!(!((e=t.instance.persistence)===null||e===void 0)\u0026\u0026e.get_property(rNe)),o=t.instance.config.capture_dead_clicks;return $y(o)?o:!!QA(o)||n};var MOt=class{get lazyLoadedDeadClicksAutocapture(){return this.Bo}constructor(e,n,o){this.instance=e,this.isEnabled=n,this.onCapture=o,this.startIfEnabledOrStop()}onRemoteConfig(e){if(!e.ok)return;const n=e.config;\"captureDeadClicks\"in n\u0026\u0026(this.instance.persistence\u0026\u0026this.instance.persistence.register({[rNe]:n.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Ho(()=\u003e{this.zo()}):this.stop()}Ho(e){var n,o,i;!((n=Vr.__PosthogExtensions__)===null||n===void 0)\u0026\u0026n.initDeadClicksAutocapture?e():(o=Vr.__PosthogExtensions__)===null||o===void 0||(i=o.loadExternalDependency)===null||i===void 0||i.call(o,this.instance,\"dead-clicks-autocapture\",r=\u003e{r?Pge.error(\"failed to load script\",r):e()})}zo(){var e;if(No){if(!this.Bo\u0026\u0026(!((e=Vr.__PosthogExtensions__)===null||e===void 0)\u0026\u0026e.initDeadClicksAutocapture)){const n=QA(this.instance.config.capture_dead_clicks)?sn({},this.instance.config.capture_dead_clicks):{};n.__onCapture=this.onCapture,this.onCapture\u0026\u0026(n.capture_dead_swipes=!1),this.Bo=Vr.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Bo.start(No),Pge.info(\"starting...\")}}else Pge.error(\"`document` not found. Cannot start.\")}stop(){this.Bo\u0026\u0026(this.Bo.stop(),this.Bo=void 0,Pge.info(\"stopping...\"))}};const $=Cd(\"[SegmentIntegration]\");function DOt(t,e,n=!0){const o=t.config.segment;if(!o)return e();const{analytics:i,filterProperties:r}=(a=\u003enf(a.register))(s=o)?{analytics:s}:s;var s;(function(a,A,c,l){const u=h=\u003e{const d=()=\u003eh.anonymousId()||kB();a.config.get_device_id=d,l\u0026\u0026h.id()\u0026\u0026(a.register({distinct_id:h.id(),$device_id:d()}),a.persistence.set_property(qy,Sge)),c(l?void 0:h.anonymousId()||void 0)},g=A.user();\"then\"in g\u0026\u0026nf(g.then)?g.then(u):u(g)})(t,i,a=\u003e{i.register(((A,c,{filterProperties:l}={})=\u003e{typeof Promise\u003c\"u\"\u0026\u0026Promise.resolve||$.warn(\"This browser does not have Promise support, and can not use the segment integration\");const u=(g,h)=\u003e{if(!h)return g;const d=!!c\u0026\u0026g.event.anonymousId===c\u0026\u0026!g.event.userId;d||g.event.userId||g.event.anonymousId===A.get_distinct_id()||($.info(\"No userId set, resetting PostHog\"),A.reset()),d||(c=void 0),g.event.userId\u0026\u0026g.event.userId!==A.get_distinct_id()\u0026\u0026($.info(\"UserId set, identifying with PostHog\"),A.identify(g.event.userId));let p=A.calculateEventProperties(h,g.event.properties);if(!Hs(l)){const m=g.event.properties||{},_={};for(const I of Object.keys(p))MDe.call(m,I)||(_[I]=p[I]);const f=((I,C)=\u003e{const y=As(I)?I:[I];let x=sn({},C);for(const E of y)try{if(x=E(x),Hs(x))return null}catch(B){return $.error(\"Error in Segment filterProperties:\",B),null}return x})(l,_);if(Hs(f))return g;p=f}return g.event.properties=Object.assign({},p,g.event.properties),g};return{name:\"PostHog JS\",type:\"enrichment\",version:\"1.0.0\",isLoaded(){return!0},load(){return Promise.resolve()},track(g){return u(g,g.event.event)},page(g){return u(g,pNe)},identify(g){return u(g,rOt)},screen(g){return u(g,\"$screen\")}}})(t,a,{filterProperties:r})).then(()=\u003e{e()},A=\u003e{$.error(\"Failed to register the Segment integration\",A),e()})},n)}const NOt=\"posthog-js\";function ROt(t,{organization:e,projectId:n,prefix:o,severityAllowList:i=[\"error\"],sendExceptionsToPostHog:r=!0}={}){return s=\u003e{var a,A,c,l,u;if(i!==\"*\"\u0026\u0026!i.includes(s.level)||!t.__loaded)return s;s.tags||(s.tags={});const g=t.requestRouter.endpointFor(\"ui\",`/project/${t.config.token}/person/${t.get_distinct_id()}`);s.tags[\"PostHog Person URL\"]=g,t.sessionRecordingStarted()\u0026\u0026(s.tags[\"PostHog Recording URL\"]=t.get_session_replay_url({withTimestamp:!0}));const h=((a=s.exception)===null||a===void 0?void 0:a.values)||[],d=h.map(_=\u003esn(sn({},_),{},{stacktrace:_.stacktrace?sn(sn({},_.stacktrace),{},{type:\"raw\",frames:(_.stacktrace.frames||[]).map(f=\u003esn(sn({},f),{},{platform:\"web:javascript\"}))}):void 0})),p={$exception_message:((A=h[0])===null||A===void 0?void 0:A.value)||s.message,$exception_type:(c=h[0])===null||c===void 0?void 0:c.type,$exception_level:s.level,$exception_list:d,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:((l=h[0])===null||l===void 0?void 0:l.value)||s.message,$sentry_exception_type:(u=h[0])===null||u===void 0?void 0:u.type,$sentry_tags:s.tags};var m;return e\u0026\u0026n\u0026\u0026(p.$sentry_url=(o||\"https://sentry.io/organizations/\")+e+\"/issues/?project=\"+n+\"\u0026query=\"+s.event_id),r\u0026\u0026((m=t.exceptions)===null||m===void 0||m.sendExceptionEvent(p)),s}}var mGo=class{constructor(e,n,o,i,r,s){this.name=NOt,this.setupOnce=function(a){a(ROt(e,{organization:n,projectId:o,prefix:i,severityAllowList:r,sendExceptionsToPostHog:s==null||s}))}}},TOt=class{constructor(e){this.Uo=(n,o,i)=\u003e{i\u0026\u0026(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength||i.crossTabAdoption)\u0026\u0026(ui.info(\"[PageViewManager] Session rotated, clearing pageview state\",{sessionId:n,changeReason:i}),this.Wo=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Vo()}Vo(){var e;this.Go=(e=this._instance.sessionManager)===null||e===void 0?void 0:e.onSessionId(this.Uo)}destroy(){var e;(e=this.Go)===null||e===void 0||e.call(this),this.Go=void 0}doPageView(e,n){var o;const i=this.Qo(e,n);return this.Wo={pathname:(o=Fn?.location.pathname)!==null\u0026\u0026o!==void 0?o:\"\",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),i}doPageLeave(e){var n;return this.Qo(e,(n=this.Wo)===null||n===void 0?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.Wo)===null||e===void 0?void 0:e.pageViewId}}Qo(e,n){const o=this.Wo;if(!o)return{$pageview_id:n};let i={$pageview_id:n,$prev_pageview_id:o.pageViewId};const r=this._instance.scrollManager.getContext();if(r\u0026\u0026!this._instance.config.disable_scroll_properties){let{maxScrollHeight:s,lastScrollY:a,maxScrollY:A,maxContentHeight:c,lastContentY:l,maxContentY:u}=r;if(!(Eo(s)||Eo(a)||Eo(A)||Eo(c)||Eo(l)||Eo(u))){s=Math.ceil(s),a=Math.ceil(a),A=Math.ceil(A),c=Math.ceil(c),l=Math.ceil(l),u=Math.ceil(u);const g=s\u003e1?u6(a/s,0,1,ui):1,h=s\u003e1?u6(A/s,0,1,ui):1,d=c\u003e1?u6(l/c,0,1,ui):1,p=c\u003e1?u6(u/c,0,1,ui):1;i=eg(i,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:g,$prev_pageview_max_scroll:A,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:d,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:p})}}return o.pathname\u0026\u0026(i.$prev_pageview_pathname=o.pathname),o.timestamp\u0026\u0026(i.$prev_pageview_duration=(e.getTime()-o.timestamp.getTime())/1e3),i}};const q$=[\"flags\",\"surveys\"],_Go={[MOo]:{exposure:\"hidden\"},[Bge]:{exposure:\"hidden\"},[DOo]:{exposure:\"hidden\"},[eNe]:{exposure:\"hidden\"},[jO]:{exposure:\"hidden\"},[F$]:{exposure:\"hidden\"},[kHt]:{exposure:\"event\"},[tNe]:{exposure:\"hidden\"},[LHt]:{exposure:\"hidden\"},[nNe]:{exposure:\"event\"},[FHt]:{exposure:\"hidden\"},[oNe]:{exposure:\"event\"},[iNe]:{exposure:\"event\"},[rNe]:{exposure:\"event\"},[sNe]:{exposure:\"hidden\"},[HHt]:{exposure:\"event\"},[L$]:{exposure:\"hidden\"},[NOo]:{exposure:\"hidden\"},[$O]:{exposure:\"hidden\"},[OHt]:{exposure:\"event\"},[ROo]:{exposure:\"event\",shouldSkipFromEventProperties:t=\u003eId(t)},[HOo]:{exposure:\"event\"},[OOo]:{exposure:\"event\"},[GOo]:{exposure:\"event\"},[YOo]:{exposure:\"event\"},[UOo]:{exposure:\"hidden\"},[TB]:{exposure:\"hidden\",storageGroup:\"flags\"},[Yb]:{exposure:\"hidden\",storageGroup:\"flags\"},[aNe]:{exposure:\"hidden\"},[CR]:{exposure:\"hidden\",storageGroup:\"flags\"},[Dw]:{exposure:\"hidden\",storageGroup:\"flags\"},[yR]:{exposure:\"hidden\",storageGroup:\"flags\",volatile:!0},[H$]:{exposure:\"hidden\",storageGroup:\"flags\"},[g6]:{exposure:\"hidden\"},[xR]:{exposure:\"hidden\"},[Nw]:{exposure:\"hidden\"},[Rw]:{exposure:\"hidden\"},[O$]:{exposure:\"hidden\",storageGroup:\"surveys\"},[bge]:{exposure:\"hidden\",storageGroup:\"surveys\",volatile:!0},[YHt]:{exposure:\"event\"},[UHt]:{exposure:\"hidden\"},[KHt]:{exposure:\"hidden\"},[ANe]:{exposure:\"hidden\"},[KOo]:{exposure:\"hidden\"},[VOo]:{exposure:\"hidden\"},[zOo]:{exposure:\"event\"},[JOo]:{exposure:\"event\"},[WOo]:{exposure:\"event\"},[jOo]:{exposure:\"event\"},[Tw]:{exposure:\"hidden\"},[G$]:{exposure:\"hidden\"},[GHt]:{exposure:\"event\"},[Y$]:{exposure:\"hidden\"},[kw]:{exposure:\"hidden\",storageGroup:\"flags\",volatile:!0},[qy]:{exposure:\"hidden\"},[cNe]:{exposure:\"hidden\"},[$Oo]:{exposure:\"hidden\"},[VHt]:{exposure:\"hidden\"},[zHt]:{exposure:\"hidden\"},[qO]:{exposure:\"hidden\"},[lNe]:{exposure:\"hidden\"},[TOo]:{exposure:\"event\"},[kOo]:{exposure:\"event\"},[FOo]:{exposure:\"event\"},[LOo]:{exposure:\"event\"},[WHt]:{exposure:\"event\"},[jHt]:{exposure:\"event\"},[gNe]:{exposure:\"hidden\"},[dNe]:{exposure:\"hidden\"},[$Ht]:{exposure:\"hidden\"},[qHt]:{exposure:\"hidden\"},[XHt]:{exposure:\"hidden\"},[ZHt]:{exposure:\"hidden\"},[eOt]:{exposure:\"hidden\"},[tOt]:{exposure:\"hidden\"},[nOt]:{exposure:\"hidden\"},[qOo]:{exposure:\"event\"}},fGo=[[\"$posthog_sr_group_event_trigger_\",{exposure:\"hidden\"}],[\"$posthog_sr_group_url_trigger_\",{exposure:\"hidden\"}],[\"$posthog_sr_group_sampling_\",{exposure:\"hidden\"}]],i1=t=\u003e{const e=_Go[t];if(e)return e;for(const[n,o]of fGo)if(t.indexOf(n)===0)return o},oG=(t,e)=\u003e{try{let n;return JSON.stringify(t,(o,i)=\u003e{var r;return zO(i)?((r=n)!==null\u0026\u0026r!==void 0||(n=new WeakMap),n.has(i)||n.set(i,aOt(i)),n.get(i)):typeof i==\"bigint\"?i.toString():i},e)}catch{return hLt(t)}},Kb=t=\u003e{const e=No?.createElement(\"a\");return Eo(e)?null:(e.href=t,e)},iG=function(t,e){const n=((t.split(\"#\")[0]||\"\").split(/\\?(.*)/)[1]||\"\").replace(/^\\?+/g,\"\").split(\"\u0026\");let o;for(let i=0;n.length\u003ei;i++){const r=n[i].split(\"=\");if(r[0]===e){o=r;break}}if(!As(o)||2\u003eo.length)return\"\";{let i=o[1];try{i=decodeURIComponent(i)}catch{ui.error(\"Skipping decoding for malformed query param: \"+i)}return i.replace(/\\+/g,\" \")}},X$=function(t,e,n){if(!t||!e||!e.length)return t;const o=t.split(\"#\"),i=o[1],r=(o[0]||\"\").split(\"?\"),s=r[1],a=r[0],A=(s||\"\").split(\"\u0026\"),c=[];for(let u=0;A.length\u003eu;u++){const g=A[u].split(\"=\");As(g)\u0026\u0026(e.includes(g[0])?c.push(g[0]+\"=\"+n):c.push(A[u]))}let l=a;return s!=null\u0026\u0026(l+=\"?\"+c.join(\"\u0026\")),i!=null\u0026\u0026(l+=\"#\"+i),l},Mge=function(t,e){const n=t.match(new RegExp(e+\"=([^\u0026]*)\"));return n?n[1]:null},kOt=(t,e)=\u003et\u003e=e\u0026\u0026dLt(),FOt=(t,e,n,o)=\u003e{if(t===0){if(dLt()){const i=e+1;return i===n\u0026\u0026o(),i}return e}return 0},rG=[\"gclid\",\"gclsrc\",\"dclid\",\"gbraid\",\"wbraid\",\"fbclid\",\"msclkid\",\"twclid\",\"li_fat_id\",\"igshid\",\"ttclid\",\"rdt_cid\",\"epik\",\"qclid\",\"sccid\",\"oppref\",\"irclid\",\"_kx\"],IGo=[\"utm_source\",\"utm_medium\",\"utm_campaign\",\"utm_content\",\"utm_term\",\"gad_source\",\"mc_cid\",...rG],Z$=\"\u003cmasked\u003e\",CGo=[\"li_fat_id\"];function LOt(t,e,n){if(!No)return{};const o=e?[...rG,...n||[]]:[],i=HOt(X$(No.URL,o,Z$),t),r=(function(){const s={};return kl(CGo,function(a){const A=K$(a);s[a]=A||null}),s})();return eg(r,i)}function HOt(t,e){const n=IGo.concat(e||[]),o={};return kl(n,function(i){const r=iG(t,i);o[i]=r||null}),o}function OOt(t){const e=(function(i){return i?i.search(\"https?://(.*)google.([^/?]*)\")===0?\"google\":i.search(\"https?://(.*)bing.com\")===0?\"bing\":i.search(\"https?://(.*)yahoo.com\")===0?\"yahoo\":i.search(\"https?://(.*)duckduckgo.com\")===0?\"duckduckgo\":null:null})(t),n=e!=\"yahoo\"?\"q\":\"p\",o={};if(!Id(e)){o.$search_engine=e;const i=No?iG(No.referrer,n):\"\";i.length\u0026\u0026(o.ph_keyword=i)}return o}function GOt(){return navigator.language||navigator.userLanguage}function yGo(){const t=GOt();return typeof t==\"string\"?t.split(\"-\")[0]:void 0}const Dge=\"$direct\";function YOt(){return No?.referrer||Dge}function UOt(t,e,n=!1){const o=t?[...rG,...e||[]]:[],i=n?Mw(fd?.href):fd?.href,r=i?.substring(0,1e3);return{r:YOt().substring(0,1e3),u:r?X$(r,o,Z$):void 0}}function KOt(t,e=!1){var n;const{r:o,u:i}=t,r=e?Mw(i):i,s={$referrer:o,$referring_domain:o==null?void 0:o==Dge?Dge:(n=Kb(o))===null||n===void 0?void 0:n.host};if(r){s.$current_url=r;const a=Kb(r);s.$host=a?.host,s.$pathname=a?.pathname;const A=HOt(r);eg(s,A)}if(o){const a=OOt(o);eg(s,a)}return s}function VOt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function xGo(){try{return new Date().getTimezoneOffset()}catch{return}}const EGo={flags:kw,surveys:bge},BGo=[\"cookie\",\"localstorage\",\"localstorage+cookie\",\"sessionstorage\",\"memory\"],Nge=t=\u003e`${t}_cookie_identity_change_pending`,Rge=t=\u003e{let e=\"\",n=0;for(const o of t){const i=encodeURIComponent(JSON.stringify(o).slice(1,-1)).length;if(n+i\u003e1e3)break;e+=o,n+=i}return e},o_=\"main\",Vb=[TB,Yb,CR,Dw,yR,kw,H$,Nw],MNe=t=\u003eVb.indexOf(t)!==-1,zOt=[jO,F$],JOt=t=\u003ezOt.indexOf(t)!==-1,Fw=(t,e)=\u003e{try{return JSON.stringify(t)===JSON.stringify(e)}catch{return t===e}},sG=t=\u003e{if(!t)return{};const e=JSON.parse(t);return QA(e)?e:{}},WOt=(t,e)=\u003e{kl(t,(n,o)=\u003e{const i=i1(o);i\u0026\u0026i.exposure!==\"event\"||{}.hasOwnProperty.call(e,o)||delete t[o]})};var DNe=class{constructor(e,n,o=!0,i=!e.cookieless_mode){if(this.Jo={},this.Zo=!1,this.Ko=!1,this.Xo=!1,this.Yo=!1,this.ta=!1,this.ea=new Map,this.ia=!1,this.na=!1,this.sa=!1,this.ra=new Set,this.oa=new Set,this.Mr=e,this.aa=o,this.props={},this.la=void 0,this.ua=(r=\u003e{let s=\"\";return r.token\u0026\u0026(s=r.token.replace(/\\+/g,\"PL\").replace(/\\//g,\"SL\").replace(/=/g,\"EQ\")),r.persistence_name?\"ph_\"+r.persistence_name:\"ph_\"+s+\"_posthog\"})(e),this.hi=e.disable_persistence||!!n,this.No=this.ha(e),this.Xo=this.ca(e),this.load(i),this.da(),e.debug\u0026\u0026ui.info(\"Persistence loaded\",e.persistence,sn({},this.props)),this.update_config(e,e,n),this.save(),Fn){const r=()=\u003ethis.flush();el(Fn,\"beforeunload\",r,{capture:!1}),el(Fn,\"pagehide\",r,{capture:!1}),this.va=s=\u003e{if(this.Zo\u0026\u0026(!s.storageArea||s.storageArea===Fn?.localStorage)\u0026\u0026s.key)if(s.key!==this.ua){if(this.Xo){const a=q$.find(A=\u003es.key===this.fa(A));a\u0026\u0026this.pa(s.key,a)}}else this.pa(s.key,o_)},el(Fn,\"storage\",this.va)}}markCrossTabFeatureFlagChanges(e){Object.entries(e).forEach(([n,o])=\u003e{const i=this.ea.get(n);if(!MNe(n)||i===!0)return;if(o===!0)return void this.ga(n,!0);const r=new Set(i||[]);o.forEach(s=\u003er.add(s)),r.size\u0026\u0026this.ga(n,r)})}onCrossTabFeatureFlagChange(e){return this.oa.add(e),()=\u003ethis.oa.delete(e)}destroy(){this.va\u0026\u0026Fn\u0026\u0026(Fn.removeEventListener(\"storage\",this.va),this.va=void 0),this.oa.clear()}pa(e,n,o=!0){if(this.hi)return!1;let i,r;try{if(r=hc.Ot(e),Id(r)){const A=this.ma(n);return A.storageValue=null,n!==o_\u0026\u0026(A.persisted=!1),!1}i=sG(r)}catch{return!1}const s=n===o_?i:hc.Lt(this.ua);if(s\u0026\u0026this.ya(s))return!1;const a=this.ba(i,n,o);return n===o_\u0026\u0026this.Xo\u0026\u0026!Fw(this._a().main,i)||this.wa(i,n,!0,r),a}ya(e){const n=this.props[RB],o=e[RB];return!Eo(n)\u0026\u0026!Eo(o)\u0026\u0026n!==o}wa(e,n,o,i){const r=this.ma(n);r.storageValue=i,n!==o_\u0026\u0026(r.persisted=o);try{r.fingerprint=this.ka(e,n)}catch{r.fingerprint=void 0}}ba(e,n,o){let i=!1;return Vb.forEach(r=\u003e{var s;const a=(s=i1(r))===null||s===void 0?void 0:s.storageGroup;if(n===o_\u0026\u0026this.Xo\u0026\u0026a||n!==o_\u0026\u0026a!==n)return;const A=r in e,c=this.Sa(r,A?e[r]:void 0),l=this.ea.has(r)?r in this.props:A;l===r in this.props\u0026\u0026Fw(c,this.props[r])||(l?this.xa(r,c,!1):this.$a(r,!1),i=!0)}),i\u0026\u0026o\u0026\u0026this.oa.forEach(r=\u003er()),i}Ca(){if(!this.Zo)return!1;try{this.sa=!1;const e=hc.Ot(this.ua),n=this.ma(o_);let o,i=!1,r=!1;if(e!==n.storageValue)if(Id(e))n.storageValue=null;else{if(o=sG(e),this.sa=!this.na\u0026\u0026this.ya(o),this.sa)return!1;r=this.ba(o,o_,!1),!this.Xo||Fw(this._a().main,o)?this.wa(o,o_,!0,e):n.storageValue=e,i=!0}return this.Xo\u0026\u0026q$.forEach(s=\u003e{const a=hc.Ot(this.fa(s)),A=this.ma(s),c=o||{},l=i\u0026\u0026Vb.some(g=\u003e{var h;return((h=i1(g))===null||h===void 0?void 0:h.storageGroup)===s\u0026\u0026g in c});if(a===A.storageValue\u0026\u0026!l)return;if(Id(a))return A.storageValue=null,A.persisted=!1,void(l\u0026\u0026(r=this.ba(c,s,!1)||r));const u=sG(a);r=this.ba(u,s,!1)||r,this.wa(u,s,!0,a)}),r}catch{return!1}}ga(e,n){this.ea.set(e,n);const o=i1(e);o?.volatile||(this.ma((this.Xo?o?.storageGroup:void 0)||o_).fingerprint=void 0,this.Ta(e))}Ia(){Vb.forEach(e=\u003ethis.ea.set(e,!0))}da(){if(this.Zo)try{const e=hc.Ot(this.ua),n=sG(e);this.ma(o_).storageValue=e,Vb.forEach(o=\u003e{var i;const r=this.Xo?(i=i1(o))===null||i===void 0?void 0:i.storageGroup:void 0,s=r?hc.Ot(this.fa(r)):null;if(r){const A=this.ma(r);A.storageValue=s,A.persisted=!Id(s)}const a=r\u0026\u0026!Id(s)?sG(s):n;o in this.props?this.Ma(o,a[o],this.props[o]):o in a\u0026\u0026this.ga(o,!0)})}catch{}}Sa(e,n){const o=this.ea.get(e);if(!o)return n;if(o===!0)return this.props[e];if(e===\"$active_feature_flags\"){const s=new Set(As(n)?n:[]),a=new Set(As(this.props[e])?this.props[e]:[]);return o.forEach(A=\u003ea.has(A)?s.add(A):s.delete(A)),Array.from(s)}const i=QA(n)?sn({},n):{},r=QA(this.props[e])?this.props[e]:{};return o.forEach(s=\u003e{s in r?i[s]=r[s]:delete i[s]}),i}Ma(e,n,o){if(!MNe(e))return;const i=this.ea.get(e);if(i===!0)return;let r=n;if(this.Zo)try{var s;const A=this.Xo?(s=i1(e))===null||s===void 0?void 0:s.storageGroup:void 0,c=A?this.fa(A):this.ua;r=sG(hc.Ot(c))[e]}catch{}const a=new Set(i||[]);if(e===\"$active_feature_flags\"){if(!Eo(n)\u0026\u0026!As(n)||!Eo(r)\u0026\u0026!As(r)||!As(o))return void this.ga(e,!0);const A=new Set(n||[]),c=new Set(r||[]),l=new Set(o);new Set([...A,...l]).forEach(u=\u003e{A.has(u)!==l.has(u)\u0026\u0026a.add(u)}),a.forEach(u=\u003e{c.has(u)===l.has(u)\u0026\u0026a.delete(u)})}else{if(!QA(o))return void(Fw(r,o)?this.ea.delete(e):this.ga(e,!0));{if(!Eo(n)\u0026\u0026!QA(n)||Eo(n)\u0026\u0026Rx(o)\u0026\u0026Eo(r))return void this.ga(e,!0);const A=QA(n)?n:{},c=QA(r)?r:{};new Set([...Object.keys(A),...Object.keys(o)]).forEach(l=\u003e{l in A==l in o\u0026\u0026Fw(A[l],o[l])||a.add(l)}),a.forEach(l=\u003e{l in c==l in o\u0026\u0026Fw(c[l],o[l])\u0026\u0026a.delete(l)})}}a.size?this.ga(e,a):this.ea.delete(e)}Ea(){var e;const n=(e=this.Mr)===null||e===void 0?void 0:e.persistence_save_debounce_ms;return Ah(n)\u0026\u0026n\u003e0?n:0}Pa(e){if(this.Mr.cookieWinsOnConflict\u0026\u0026this.Mr.persistence.toLowerCase()===\"localstorage+cookie\")if(e)try{const n=yNe(e,this.Mr.cookie_persisted_properties||[]),o=uOt(n,this.Mr.cookie_persisted_properties||[]),i=JSON.stringify(n)+\"|\"+JSON.stringify(o),r=yd.Ot(this.ua)||void 0;r\u0026\u0026xNe(this.ua,r)===i\u0026\u0026(this.Ra=i,this.Aa=r)}catch{}else try{const n=yd.Ot(this.ua)||void 0;this.Ra=n?xNe(this.ua,n):void 0,this.Aa=n}catch{}}syncCookieProperties(){return this.Oa(this.Mr)}Oa(e,n=!1){if(this.hi\u0026\u0026!n||this.ta||!e.cookieWinsOnConflict||e.persistence.toLowerCase()!==\"localstorage+cookie\")return!1;let o;try{o=yd.Ot(this.ua)||void 0}catch{}if(!o||o===this.Aa)return!1;const i=xNe(this.ua,o);let r;try{r=CNe(JSON.parse(o))}catch{return!1}if((yd.Ot(this.ua)||void 0)!==o)return!1;this.Ra=i,this.Aa=o;const s=gOt(this.ua,o),a=[...ER,...s.properties],A={};if(Object.keys(r).forEach(m=\u003e{const _=r[m];(Eo(_)||Id(_)||_===\"\"||m===\"$user_state\"\u0026\u0026_!==\"anonymous\"\u0026\u0026_!==\"identified\")\u0026\u0026(A[m]=!0,delete r[m])}),Rx(r))return!1;const c=\"distinct_id\"in r||r.$user_state===\"anonymous\"||r.$user_state===\"identified\",l=this.props,u=l[RB],g=l[qy],h=eg({},l);[...ER,...e.cookie_persisted_properties||[]].forEach(m=\u003e{if(a.indexOf(m)!==-1\u0026\u0026!(m in r)\u0026\u0026!A[m]\u0026\u0026(c||m!==\"distinct_id\"\u0026\u0026m!==\"$user_state\")){const _=h[m];(s.isValid||ER.indexOf(m)===-1||_!==!1\u0026\u0026_!==0)\u0026\u0026delete h[m]}}),this.props=eg(h,r),Vb.forEach(m=\u003e{const _=m in this.props;m in l===_\u0026\u0026Fw(l[m],this.props[m])||(_?this.Ma(m,l[m],this.props[m]):this.ga(m,!0))}),!c||\"$user_state\"in r||\"$user_state\"in this.props||this.xa(qy,Ub);const d=this.props[RB],p=this.props[qy];return!c||d===u\u0026\u0026p===g||(this.na=!0,this.Yo=!0,nu.$t(Nge(this.ua),!0),this.$a(Nw),this.$a(Yb),this.$a(TB),this.$a(CR),this.$a(Dw),this.$a(yR),this.$a(kw),this.$a(Y$),this.$a(Tw),p!==\"anonymous\"||g!==\"identified\"\u0026\u0026r.$user_state!==\"anonymous\"\u0026\u0026(Eo(u)||d===u)||(WOt(this.props,r),this.$a(Rw)),p===\"identified\"?this.props.$user_id=d:delete this.props.$user_id,this.$a(Bge)),!0}consumeCookieIdentityChange(){const e=Nge(this.ua),n=this.Yo||!!nu.Ot(e);return this.Yo=!1,n\u0026\u0026nu.Pt(e),n}Fa(e=!1){return!(this.ta||this.hi\u0026\u0026!e||!this.Mr.cookieWinsOnConflict||this.Mr.persistence.toLowerCase()!==\"localstorage+cookie\"||(this.ta=!0,0))}Da(){this.ta\u0026\u0026(Eo(this.La)||(clearTimeout(this.La),this.La=void 0),delete this.Jo[o_],this.Na(!0))}qa(e=!0){if(this.ta)try{e?this.Da():Eo(this.La)||(clearTimeout(this.La),this.La=void 0)}finally{this.ta=!1}}isDisabled(){return!!this.hi}ha(e){BGo.indexOf(e.persistence.toLowerCase())===-1\u0026\u0026(ui.critical(\"Unknown persistence type \"+e.persistence+\"; falling back to localStorage+cookie\"),e.persistence=\"localStorage+cookie\");const n=((a=[],A=!1,c=()=\u003e!1)=\u003e{const l=[...ER,...a];return sn(sn({},hc),{},{Lt(u){try{let h,d={};try{h=yd.Ot(u)||void 0,d=h?CNe(JSON.parse(h)):{}}catch{}const p=JSON.parse(hc.Ot(u)||\"{}\");let m;if(A){const _=gOt(u,h),f=[...ER,..._.properties],I={};Object.keys(d).forEach(y=\u003e{const x=d[y];Id(x)||x===\"\"||y===\"$user_state\"\u0026\u0026x!==\"anonymous\"\u0026\u0026x!==\"identified\"||(I[y]=x)});const C=\"distinct_id\"in I||I.$user_state===\"anonymous\"||I.$user_state===\"identified\";if(Object.keys(I).length\u003e0){var g;const y=p[RB],x=(g=p.$user_state)!==null\u0026\u0026g!==void 0?g:Ub;l.forEach(E=\u003e{if(f.indexOf(E)!==-1\u0026\u0026!(E in d)\u0026\u0026(C||E!==\"distinct_id\"\u0026\u0026E!==\"$user_state\")){const B=p[E];(_.isValid||ER.indexOf(E)===-1||B!==!1\u0026\u0026B!==0)\u0026\u0026delete p[E]}}),!C||\"$user_state\"in d||\"$user_state\"in p||(p[qy]=Ub),!C||(\"distinct_id\"in I?I[RB]:p[RB])===y\u0026\u0026(\"$user_state\"in I?I[qy]:p[qy])===x||(INe.forEach(E=\u003edelete p[E]),I.$user_state===\"identified\"\u0026\u0026\"distinct_id\"in I?p.$user_id=I[RB]:delete p.$user_id,I.$user_state!==\"identified\"\u0026\u0026(delete p[GHt],delete p[Rw]),delete p.__alias)}m=eg(p,I)}else m=eg(d,p);return c()||hc.$t(u,m),m}catch{}return null},$t(u,g,h,d,p,m){const _=hc.$t(u,g,void 0,void 0,m);try{const f=yNe(g,a);if(Object.keys(f).length){if(A){const I=wge(u),C=uOt(f,a);if(yd.$t(I,C,h,d,p,m),yd.Ot(I)!==JSON.stringify(C)){yd.Pt(I,d);const y=yNe(g);return yd.$t(u,y,h,d,p,m),_}}yd.$t(u,f,h,d,p,m)}}catch(f){hc.Dt(f)}return _},Pt(u,g){try{Fn?.localStorage.removeItem(u),yd.Pt(u,g),yd.Pt(wge(u),g)}catch(h){hc.Dt(h)}}})})(e.cookie_persisted_properties||[],e.cookieWinsOnConflict,()=\u003e!!this.hi);let o,i=!1,r=!1;const s=e.persistence.toLowerCase();return s===\"localstorage\"\u0026\u0026hc.Et()?(o=hc,r=!0):s===\"localstorage+cookie\"\u0026\u0026n.Et()?(o=n,r=!0,i=!0):s===\"sessionstorage\"\u0026\u0026nu.Et()?o=nu:s===\"memory\"?o=ENe:s===\"cookie\"\u0026\u0026yd.Et()?(o=yd,i=!0):n.Et()?(o=n,r=!0,i=!0):yd.Et()?(o=yd,i=!0):o=ENe,this.Zo=r,this.Ko=i,o}fa(e){return`${this.ua}__${e}`}ca(e){return this.Zo\u0026\u0026!!e.split_storage}properties(){const e={};return kl(this.props,(n,o)=\u003e{const i=i1(o);if(!i||i.exposure===\"event\"){var r;if(!(i==null||(r=i.shouldSkipFromEventProperties)===null||r===void 0)\u0026\u0026r.call(i,n))return;e[o]=n}}),e}load(e=!1){if(this.hi\u0026\u0026!e)return;const n=this.Mr.cookieWinsOnConflict\u0026\u0026this.Mr.persistence.toLowerCase()===\"localstorage+cookie\",o=n?hc.Lt(this.ua):null;let i={};if(n)try{i=CNe(yd.Lt(this.ua)),kl(i,(A,c)=\u003e{(Eo(A)||Id(A)||A===\"\")\u0026\u0026delete i[c]})}catch{}const r=this.No.Lt(this.ua);if(r\u0026\u0026(this.props=eg({},r)),this.Xo\u0026\u0026this.ja(),n\u0026\u0026r){var s,a;const A=o?.[RB],c=(s=o?.$user_state)!==null\u0026\u0026s!==void 0?s:Ub,l=r[RB],u=(a=r.$user_state)!==null\u0026\u0026a!==void 0?a:Ub;if(l!==A||u!==c){this.Yo=!0,this.hi||nu.$t(Nge(this.ua),!0);const g=eg({},this.props);INe.forEach(d=\u003edelete g[d]),u!==\"anonymous\"||c!==\"identified\"\u0026\u0026i.$user_state!==\"anonymous\"\u0026\u0026(Eo(A)||l===A)||(WOt(g,i),delete g[Rw]),this.props=g;const h=new Set;INe.forEach(d=\u003e{var p;const m=(p=i1(d))===null||p===void 0?void 0:p.storageGroup;m\u0026\u0026h.add(m)}),h.forEach(d=\u003e{if(this.hi)return;const p={};kl(this.props,(m,_)=\u003e{var f;((f=i1(_))===null||f===void 0?void 0:f.storageGroup)===d\u0026\u0026(p[_]=m)}),Rx(p)?(hc.Pt(this.fa(d)),this.Jo[d]={}):hc.$t(this.fa(d),p)\u0026\u0026(this.Jo[d]={persisted:!0,fingerprint:this.ka(p,d)})})}}nu.Ot(Nge(this.ua))\u0026\u0026(this.Yo=!0)}ja(){for(const e of q$){const n=hc.Lt(this.fa(e));if(n\u0026\u0026!Rx(n)){const o=this.ma(e);o.persisted=!0,this.Ba(e)||(o.fingerprint=this.ka(n,e)),this.Ha(e,n)||eg(this.props,n)}}}Ba(e){return Object.keys(this.props).some(n=\u003e{var o;return((o=i1(n))===null||o===void 0?void 0:o.storageGroup)===e})}Ha(e,n){const o=EGo[e];if(!o)return!1;const i=n[o],r=this.props[o];return Ah(i)\u0026\u0026Ah(r)\u0026\u0026r\u003ei}refreshKey(e){var n;if(this.hi||this.ra.has(e))return;const o=this.Xo?(n=i1(e))===null||n===void 0?void 0:n.storageGroup:void 0,i=o?hc.Lt(this.fa(o)):this.No.Lt(this.ua);if(i\u0026\u0026e in i)this.xa(e,i[e],!1);else{if(o){const r=this.No.Lt(this.ua);if(r\u0026\u0026e in r)return void this.xa(e,r[e],!1)}this.$a(e,!1)}}save(){if(this.hi)return;const e=this.Ea();e\u003e0?Eo(this.La)\u0026\u0026(this.La=setTimeout(()=\u003e{this.La=void 0,this.Na()},e)):this.Na()}flush(){Eo(this.La)||(clearTimeout(this.La),this.La=void 0,this.Na())}Na(e=!1){if(this.hi||this.ta\u0026\u0026!e)return;e||(this.syncCookieProperties(),this.Mr.cookieWinsOnConflict\u0026\u0026this.Mr.persistence.toLowerCase()===\"localstorage+cookie\"||zOt.forEach(r=\u003ethis.refreshKey(r)));const n=!e\u0026\u0026!this.ia;n||(this.sa=!1);const o=!!n\u0026\u0026this.Ca();if(this.sa)return void(this.Mr.debug\u0026\u0026ui.warn(\"skipping persistence write because storage belongs to a different distinct ID\"));if(this.Xo)return this.za(),void(o\u0026\u0026this.oa.forEach(r=\u003er()));const i=this.Ua(this.No,this.ua,this.props,o_);i===\"written\"\u0026\u0026this.Pa(this.props),i!==\"failed\"\u0026\u0026(this.ea.clear(),this.na=!1,this.ra.clear()),o\u0026\u0026this.oa.forEach(r=\u003er())}za(){const{main:e,groups:n}=this._a(),o=this.Ua(this.No,this.ua,e,o_);o===\"written\"\u0026\u0026this.Pa(e),o!==\"failed\"\u0026\u0026(this.na=!1,this.ra.clear(),Vb.forEach(r=\u003e{var s;!((s=i1(r))===null||s===void 0)\u0026\u0026s.storageGroup||this.ea.delete(r)}));for(const r of q$){var i;const s=n[r];if(Rx(s)\u0026\u0026!(!((i=this.Jo[r])===null||i===void 0)\u0026\u0026i.persisted)){Vb.forEach(A=\u003e{var c;((c=i1(A))===null||c===void 0?void 0:c.storageGroup)===r\u0026\u0026this.ea.delete(A)});continue}const a=this.Ua(hc,this.fa(r),s,r);a!==\"failed\"\u0026\u0026Vb.forEach(A=\u003e{const c=i1(A);c?.storageGroup!==r||a!==\"written\"\u0026\u0026c.volatile||this.ea.delete(A)})}}_a(){const e={},n={flags:{},surveys:{}};return kl(this.props,(o,i)=\u003e{var r;const s=(r=i1(i))===null||r===void 0?void 0:r.storageGroup;s?n[s][i]=o:e[i]=o}),{main:e,groups:n}}ka(e,n){if(n===o_)return JSON.stringify(e)+\"|\"+this.Wa+\"|\"+this.Va+\"|\"+this.Ga;const o={};return kl(e,(i,r)=\u003e{var s;o[r]=!((s=i1(r))===null||s===void 0)\u0026\u0026s.volatile?\"__volatile__\":i}),JSON.stringify(o)}Ua(e,n,o,i){const r=this.ma(i);if(i!==o_\u0026\u0026!r.dirty\u0026\u0026!Eo(r.fingerprint))return\"skipped\";let s;try{if(s=this.ka(o,i),s===r.fingerprint)return r.dirty=!1,\"skipped\"}catch{s=void 0}return e.$t(n,o,this.Wa,this.Va,this.Ga,this.Mr.debug)?(r.dirty=!1,i!==o_\u0026\u0026(r.persisted=!0),Eo(s)||(r.fingerprint=s),this.Zo\u0026\u0026(r.storageValue=hc.Ot(n)),\"written\"):(this.Mr.debug\u0026\u0026ui.warn(`failed to persist storage entry \"${n}\"; will retry on next save`),\"failed\")}remove({keepGroupEntries:e=!1}={}){if(this.Ia(),Eo(this.La)||(clearTimeout(this.La),this.La=void 0),this.No.Pt(this.ua,!1),this.No.Pt(this.ua,!0),!e\u0026\u0026this.aa)for(const n of q$)hc.Pt(this.fa(n));e?delete this.Jo[o_]:this.Jo={},this.Ra=void 0,this.Aa=void 0}clear(){this.remove(),this.props={}}register_once(e,n,o){if(QA(e)){this.syncCookieProperties(),Eo(n)\u0026\u0026(n=\"None\"),this.Wa=Eo(o)?this.Qa:o;let i=!1;if(kl(e,(r,s)=\u003e{this.props.hasOwnProperty(s)\u0026\u0026this.props[s]!==n||(this.xa(s,r),i=!0)}),i)return this.save(),!0}return!1}register(e,n){if(QA(e)){this.syncCookieProperties(),this.Wa=Eo(n)?this.Qa:n;let o=!1;if(kl(e,(i,r)=\u003e{e.hasOwnProperty(r)\u0026\u0026(this.props[r]!==i||QA(i)||As(i))\u0026\u0026(this.xa(r,i),o=!0)}),o)return this.save(),!0}return!1}unregister(e){this.syncCookieProperties();const n=typeof e==\"string\"?[e]:e;let o=!1;for(const i of n)i in this.props\u0026\u0026(this.$a(i),o=!0);o\u0026\u0026this.save()}update_campaign_params(){const e=No?.URL;if(e===this.la)return;const n=LOt(this.Mr.custom_campaign_params,this.Mr.mask_personal_data_properties,this.Mr.custom_personal_data_properties),o=!Rx(mNe(n));return o\u0026\u0026this.register(n),this.la=e,o?n:void 0}update_search_keyword(){this.register((function(){const e=No?.referrer;return e?OOt(e):{}})())}update_referrer_info(){var e;this.register_once({$referrer:YOt(),$referring_domain:No?.referrer\u0026\u0026((e=Kb(No.referrer))===null||e===void 0?void 0:e.host)||Dge},void 0)}set_initial_person_info(){if(this.props.$initial_campaign_params||this.props.$initial_referrer_info)return;const e=UOt(this.Mr.mask_personal_data_properties,this.Mr.custom_personal_data_properties,this.Mr.disable_capture_url_hashes);this.register_once({[qO]:this.Ko?{r:Rge(e.r),u:e.u?Rge(e.u):void 0}:e},void 0)}get_initial_props(){const e={};kl([zHt,VHt],o=\u003e{const i=this.props[o];i\u0026\u0026kl(i,function(r,s){e[\"$initial_\"+PDe(s)]=r})});const n=this.props[qO];if(n){const o=(function(i,r=!1){const s=KOt(i,r),a={};return kl(s,function(A,c){a[`$initial_${PDe(c)}`]=A}),a})(n,this.Mr.disable_capture_url_hashes);eg(e,o)}return e}safe_merge(e){return kl(this.props,function(n,o){o in e||(e[o]=n)}),e}update_config(e,n,o){const i=e.persistence!==n.persistence,r=!((d,p)=\u003e{if(d.length!==p.length)return!1;const m=[...d].sort(),_=[...p].sort();return m.every((f,I)=\u003ef===_[I])})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),s=i||r,a=e.cookieWinsOnConflict!==n.cookieWinsOnConflict,A=e.disable_persistence||!!o,c=!!this.hi\u0026\u0026!A;A||this.Oa(n,c),this.Mr=e,!A\u0026\u0026(i||r||a)\u0026\u0026(this.Ra=void 0,this.Aa=void 0,this.Oa(sn(sn({},e),{},{cookie_persisted_properties:n.cookie_persisted_properties}),c));const l=s||a?this.ha(e):this.No;this.Ja();const u=this.ca(e),g=s||u!==this.Xo,h=!A\u0026\u0026(g||e.cross_subdomain_cookie!==this.Va||e.secure_cookie!==this.Ga)\u0026\u0026this.Fa(c);this.ia=g;try{if(this.Qa=this.Wa=e.cookie_expiration,this.set_disabled(A),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),g){const d=this.props;this.clear(),this.No=l,this.Xo=u,this.props=d,this.save()}else a\u0026\u0026(this.No=l,A||(delete this.Jo[o_],this.Na()))}finally{this.ia=!1,h\u0026\u0026this.qa()}}Ja(){const e=this.props[qO];if(!this.Ko||!QA(e)||typeof e.r!=\"string\")return;const n=Rge(e.r),o=typeof e.u==\"string\"?Rge(e.u):e.u;n===e.r\u0026\u0026o===e.u||this.xa(qO,sn(sn({},e),{},{r:n,u:o}))}set_disabled(e){this.hi=e,this.hi?this.remove():this.save()}set_cross_subdomain(e){e!==this.Va\u0026\u0026(this.Va=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.Ga\u0026\u0026(this.Ga=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){const o=this.props.__timers||{};o[e]=n,this.xa(eNe,o),this.save()}remove_event_timer(e){const n=this.props.__timers||{},o=n[e];return Eo(o)||(delete n[e],this.xa(eNe,n),this.save()),o}get_property(e){return this.props[e]}set_property(e,n){this.xa(e,n),this.save()}xa(e,n,o=!0){var i;const r=this.props[e];this.props[e]=n,o\u0026\u0026(e!==\"distinct_id\"\u0026\u0026e!==\"$user_state\"||r===n||(this.na=!0),JOt(e)\u0026\u0026!Fw(r,n)\u0026\u0026this.ra.add(e),this.Ma(e,r,n),!((i=i1(e))===null||i===void 0)\u0026\u0026i.volatile||this.Ta(e))}$a(e,n=!0){delete this.props[e],n\u0026\u0026(MNe(e)\u0026\u0026this.ga(e,!0),JOt(e)\u0026\u0026this.ra.add(e),this.Ta(e))}Ta(e){var n;const o=(n=i1(e))===null||n===void 0?void 0:n.storageGroup;o\u0026\u0026(this.ma(o).dirty=!0)}ma(e){return this.Jo[e]||(this.Jo[e]={})}};const gE={GZipJS:\"gzip-js\",Base64:\"base64\"},eq={Activation:\"events\",Cancellation:\"cancelEvents\"},NNe={Popover:\"popover\",API:\"api\",Widget:\"widget\"},dE={SHOWN:\"survey shown\",DISMISSED:\"survey dismissed\",SENT:\"survey sent\"},RNe={SURVEY_ID:\"$survey_id\",SURVEY_ITERATION:\"$survey_iteration\",SURVEY_LAST_SEEN_DATE:\"$survey_last_seen_date\"},TNe={Popover:\"popover\",Inline:\"inline\"};function Tge(t){let e=!0;return{dispose(){if(e){e=!1;const n=t();n\u0026\u0026nf(n.then)\u0026\u0026n.then(void 0,()=\u003e{})}}}}const bGo={SHOWN:\"product tour shown\"},jOt={TOUR_LAST_SEEN_DATE:\"$product_tour_last_seen_date\",TOUR_TYPE:\"$product_tour_type\"},$Ot=Cd(\"[RateLimiter]\");var SGo=class{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=\u003e{const o=n.text;if(o\u0026\u0026o.length)try{(JSON.parse(o).quota_limited||[]).forEach(i=\u003e{$Ot.info(`${i||\"events\"} is quota limited.`),this.serverLimits[i]=new Date().getTime()+6e4})}catch(i){return void $Ot.warn(`could not rate limit - continuing. Error: \"${i?.message}\"`,{text:o})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)===null||e===void 0?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)===null||e===void 0?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e=!1){var n,o,i;const{captureEventsBurstLimit:r,captureEventsPerSecond:s}=this,a=new Date().getTime(),A=(n=(o=this.instance.persistence)===null||o===void 0?void 0:o.get_property(\"$capture_rate_limit\"))!==null\u0026\u0026n!==void 0?n:{tokens:r,last:a};A.tokens+=(a-A.last)/1e3*s,A.last=a,A.tokens\u003er\u0026\u0026(A.tokens=r);const c=1\u003eA.tokens;if(c||e||(A.tokens=Math.max(0,A.tokens-1)),c\u0026\u0026!e){const l=(Ah(A.dropped)?A.dropped:0)+1;A.dropped=l,!this.lastEventRateLimited\u0026\u0026this.Za(l)\u0026\u0026(A.dropped=0)}return this.lastEventRateLimited=c,(i=this.instance.persistence)===null||i===void 0||i.set_property(\"$capture_rate_limit\",A),{isRateLimited:c,remainingTokens:A.tokens}}Ka(e){const n=this.instance.config.property_denylist;return!As(n)||!n.includes(e)}Xa(){var e;if(this.Ka(\"$current_url\")\u0026\u0026this.Ka(\"$pathname\")\u0026\u0026fd?.pathname)return`${(e=fd.origin)!==null\u0026\u0026e!==void 0?e:\"\"}${fd.pathname}`}Za(e){var n,o;const{captureEventsBurstLimit:i,captureEventsPerSecond:r}=this,s=this.Xa(),a=this.Ka(\"$session_id\")?(n=(o=this.instance).get_session_id)===null||n===void 0?void 0:n.call(o):void 0,A=[`${e} event(s) dropped since the last warning`,s?`triggered on ${s}`:void 0,a?`session ${a}`:void 0].filter(Boolean).join(\", \");return!!this.instance.capture(\"$client_ingestion_warning\",{$client_ingestion_warning_message:`posthog-js client rate limited: ${A}. Config is set to ${r} events per second and ${i} events burst limit.`},{skip_client_rate_limiting:!0})}isServerRateLimited(e){const n=this.serverLimits[e||\"events\"]||!1;return n!==!1\u0026\u0026new Date().getTime()\u003cn}};const Lw=Cd(\"[RemoteConfig]\");var qOt=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Vr._POSTHOG_REMOTE_CONFIG)===null||e===void 0||(e=e[this._instance.config.token])===null||e===void 0?void 0:e.config}Ya(e){var n,o,i;!((n=Vr.__PosthogExtensions__)===null||n===void 0)\u0026\u0026n.loadExternalDependency?(o=Vr.__PosthogExtensions__)===null||o===void 0||(i=o.loadExternalDependency)===null||i===void 0||i.call(o,this._instance,\"remote-config\",()=\u003ee(this.remoteConfig)):e()}tl(e){this._instance._send_request({method:\"GET\",url:this._instance.requestRouter.endpointFor(\"assets\",`/array/${this._instance.config.token}/config`),callback:e})}load(){try{if(this.remoteConfig)return Lw.info(\"Using preloaded remote config\",this.remoteConfig),void this.el(this.remoteConfig);if(this._instance.il())return void Lw.warn(\"Remote config is disabled. Falling back to local config.\");this.Ya(e=\u003e{if(!e)return Lw.info(\"No config found after loading remote JS config. Falling back to JSON.\"),void this.tl(n=\u003e{this.el(n.json,n)});this.el(e)})}catch(e){Lw.error(\"Error loading remote config\",e),this.el()}}el(e,n){!e\u0026\u0026n\u0026\u0026(n.statusCode===0?n.error||Lw.warn(\"Failed to fetch remote config from PostHog.\"):Lw.error(\"Failed to fetch remote config from PostHog.\"));try{this._instance.el(e?{ok:!0,config:e}:{ok:!1})}catch(i){Lw.error(\"Error applying remote config\",i)}if(e?.hasFeatureFlags!==!1\u0026\u0026!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var o;(o=this._instance.featureFlags)===null||o===void 0||o.ensureFlagsLoaded()}catch(i){Lw.error(\"Error loading feature flags\",i)}}},a4=Uint8Array,Tx=Uint16Array,aG=Uint32Array,kNe=new a4([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),FNe=new a4([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),XOt=new a4([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ZOt=function(t,e){for(var n=new Tx(31),o=0;31\u003eo;++o)n[o]=e+=1\u003c\u003ct[o-1];var i=new aG(n[30]);for(o=1;30\u003eo;++o)for(var r=n[o];n[o+1]\u003er;++r)i[r]=r-n[o]\u003c\u003c5|o;return[n,i]},eGt=ZOt(kNe,2),LNe=eGt[1];eGt[0][28]=258,LNe[258]=28;for(var tGt=ZOt(FNe,0)[1],nGt=new Tx(32768),xd=0;32768\u003exd;++xd){var AG=(43690\u0026xd)\u003e\u003e\u003e1|(21845\u0026xd)\u003c\u003c1;nGt[xd]=((65280\u0026(AG=(61680\u0026(AG=(52428\u0026AG)\u003e\u003e\u003e2|(13107\u0026AG)\u003c\u003c2))\u003e\u003e\u003e4|(3855\u0026AG)\u003c\u003c4))\u003e\u003e\u003e8|(255\u0026AG)\u003c\u003c8)\u003e\u003e\u003e1}var tq=function(t,e,n){for(var o=t.length,i=0,r=new Tx(e);o\u003ei;++i)++r[t[i]-1];var s,a=new Tx(e);for(i=0;e\u003ei;++i)a[i]=a[i-1]+r[i-1]\u003c\u003c1;for(s=new Tx(o),i=0;o\u003ei;++i)s[i]=nGt[a[t[i]-1]++]\u003e\u003e\u003e15-t[i];return s},bR=new a4(288);for(xd=0;144\u003exd;++xd)bR[xd]=8;for(xd=144;256\u003exd;++xd)bR[xd]=9;for(xd=256;280\u003exd;++xd)bR[xd]=7;for(xd=280;288\u003exd;++xd)bR[xd]=8;var kge=new a4(32);for(xd=0;32\u003exd;++xd)kge[xd]=5;var QGo=tq(bR,9),vGo=tq(kge,5),oGt=function(t){return(t/8|0)+(7\u0026t\u0026\u00261)},iGt=function(t,e,n){(n==null||n\u003et.length)\u0026\u0026(n=t.length);var o=new(t instanceof Tx?Tx:t instanceof aG?aG:a4)(n-e);return o.set(t.subarray(e,n)),o},zb=function(t,e,n){var o=e/8|0;t[o]|=n\u003c\u003c=7\u0026e,t[o+1]|=n\u003e\u003e\u003e8},nq=function(t,e,n){var o=e/8|0;t[o]|=n\u003c\u003c=7\u0026e,t[o+1]|=n\u003e\u003e\u003e8,t[o+2]|=n\u003e\u003e\u003e16},HNe=function(t,e){for(var n=[],o=0;t.length\u003eo;++o)t[o]\u0026\u0026n.push({s:o,f:t[o]});var i=n.length,r=n.slice();if(!i)return[new a4(0),0];if(i==1){var s=new a4(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(y,x){return y.f-x.f}),n.push({s:-1,f:25001});var a=n[0],A=n[1],c=0,l=1,u=2;for(n[0]={s:-1,f:a.f+A.f,l:a,r:A};l!=i-1;)a=n[n[u].f\u003en[c].f?c++:u++],A=n[c!=l\u0026\u0026n[u].f\u003en[c].f?c++:u++],n[l++]={s:-1,f:a.f+A.f,l:a,r:A};var g=r[0].s;for(o=1;i\u003eo;++o)r[o].s\u003eg\u0026\u0026(g=r[o].s);var h=new Tx(g+1),d=ONe(n[l-1],h,0);if(d\u003ee){o=0;var p=0,m=d-e,_=1\u003c\u003cm;for(r.sort(function(y,x){return h[x.s]-h[y.s]||y.f-x.f});i\u003eo;++o){var f=r[o].s;if(e\u003e=h[f])break;p+=_-(1\u003c\u003cd-h[f]),h[f]=e}for(p\u003e\u003e\u003e=m;p\u003e0;){var I=r[o].s;e\u003eh[I]?p-=1\u003c\u003ce-h[I]++-1:++o}for(;o\u003e=0\u0026\u0026p;--o){var C=r[o].s;h[C]==e\u0026\u0026(--h[C],++p)}d=e}return[new a4(h),d]},ONe=function(t,e,n){return t.s==-1?Math.max(ONe(t.l,e,n+1),ONe(t.r,e,n+1)):e[t.s]=n},rGt=function(t){for(var e=t.length;e\u0026\u0026!t[--e];);for(var n=new Tx(++e),o=0,i=t[0],r=1,s=function(A){n[o++]=A},a=1;e\u003e=a;++a)if(t[a]==i\u0026\u0026a!=e)++r;else{if(!i\u0026\u0026r\u003e2){for(;r\u003e138;r-=138)s(32754);r\u003e2\u0026\u0026(s(r\u003e10?r-11\u003c\u003c5|28690:r-3\u003c\u003c5|12305),r=0)}else if(r\u003e3){for(s(i),--r;r\u003e6;r-=6)s(8304);r\u003e2\u0026\u0026(s(r-3\u003c\u003c5|8208),r=0)}for(;r--;)s(i);r=1,i=t[a]}return[n.subarray(0,o),e]},oq=function(t,e){for(var n=0,o=0;e.length\u003eo;++o)n+=t[o]*e[o];return n},GNe=function(t,e,n){var o=n.length,i=oGt(e+2);t[i]=255\u0026o,t[i+1]=o\u003e\u003e\u003e8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var r=0;o\u003er;++r)t[i+r+4]=n[r];return 8*(i+4+o)},sGt=function(t,e,n,o,i,r,s,a,A,c,l){zb(e,l++,n),++i[256];for(var u=HNe(i,15),g=u[0],h=u[1],d=HNe(r,15),p=d[0],m=d[1],_=rGt(g),f=_[0],I=_[1],C=rGt(p),y=C[0],x=C[1],E=new Tx(19),B=0;f.length\u003eB;++B)E[31\u0026f[B]]++;for(B=0;y.length\u003eB;++B)E[31\u0026y[B]]++;for(var S=HNe(E,7),Q=S[0],w=S[1],M=19;M\u003e4\u0026\u0026!Q[XOt[M-1]];--M);var k,R,F,O,U=c+5\u003c\u003c3,Y=oq(i,bR)+oq(r,kge)+s,W=oq(i,g)+oq(r,p)+s+14+3*M+oq(E,Q)+(2*E[16]+3*E[17]+7*E[18]);if(Y\u003e=U\u0026\u0026W\u003e=U)return GNe(e,l,t.subarray(A,A+c));if(zb(e,l,1+(Y\u003eW)),l+=2,Y\u003eW){k=tq(g,h),R=g,F=tq(p,m),O=p;var te=tq(Q,w);for(zb(e,l,I-257),zb(e,l+5,x-1),zb(e,l+10,M-4),l+=14,B=0;M\u003eB;++B)zb(e,l+3*B,Q[XOt[B]]);l+=3*M;for(var j=[f,y],J=0;2\u003eJ;++J){var oe=j[J];for(B=0;oe.length\u003eB;++B)zb(e,l,te[ie=31\u0026oe[B]]),l+=Q[ie],ie\u003e15\u0026\u0026(zb(e,l,oe[B]\u003e\u003e\u003e5\u0026127),l+=oe[B]\u003e\u003e\u003e12)}}else k=QGo,R=bR,F=vGo,O=kge;for(B=0;a\u003eB;++B)if(o[B]\u003e255){var ie;nq(e,l,k[257+(ie=o[B]\u003e\u003e\u003e18\u002631)]),l+=R[ie+257],ie\u003e7\u0026\u0026(zb(e,l,o[B]\u003e\u003e\u003e23\u002631),l+=kNe[ie]);var ne=31\u0026o[B];nq(e,l,F[ne]),l+=O[ne],ne\u003e3\u0026\u0026(nq(e,l,o[B]\u003e\u003e\u003e5\u00268191),l+=FNe[ne])}else nq(e,l,k[o[B]]),l+=R[o[B]];return nq(e,l,k[256]),l+R[256]},wGo=new aG([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),PGo=(function(){for(var t=new aG(256),e=0;256\u003ee;++e){for(var n=e,o=9;--o;)n=(1\u0026n\u0026\u00263988292384)^n\u003e\u003e\u003e1;t[e]=n}return t})(),YNe=function(t,e,n){for(;n;++e)t[e]=n,n\u003e\u003e\u003e=8};function MGo(t,e){e===void 0\u0026\u0026(e={});var n=(function(){var u=4294967295;return{p(g){for(var h=u,d=0;g.length\u003ed;++d)h=PGo[255\u0026h^g[d]]^h\u003e\u003e\u003e8;u=h},d(){return 4294967295^u}}})(),o=t.length;n.p(t);var i,r,s,a,A,c=(a=10+((i=e).filename\u0026\u0026i.filename.length+1||0),A=8,(function(u,g,h,d,p,m){var _=u.length,f=new a4(d+_+5*(1+Math.floor(_/7e3))+p),I=f.subarray(d,f.length-p),C=0;if(!g||8\u003e_)for(var y=0;_\u003e=y;y+=65535){var x=y+65535;_\u003ex?C=GNe(I,C,u.subarray(y,x)):(I[y]=m,C=GNe(I,C,u.subarray(y,_)))}else{for(var E=wGo[g-1],B=E\u003e\u003e\u003e13,S=8191\u0026E,Q=(1\u003c\u003ch)-1,w=new Tx(32768),M=new Tx(Q+1),k=Math.ceil(h/3),R=2*k,F=function(Ce){return(u[Ce]^u[Ce+1]\u003c\u003ck^u[Ce+2]\u003c\u003cR)\u0026Q},O=new aG(25e3),U=new Tx(288),Y=new Tx(32),W=0,te=0,j=(y=0,0),J=0,oe=0;_\u003ey;++y){var ie=F(y),ne=32767\u0026y,le=M[ie];if(w[ne]=le,M[ie]=ne,y\u003e=J){var ge=_-y;if((W\u003e7e3||j\u003e24576)\u0026\u0026ge\u003e423){C=sGt(u,I,0,O,U,Y,te,j,oe,y-oe,C),j=W=te=0,oe=y;for(var _e=0;286\u003e_e;++_e)U[_e]=0;for(_e=0;30\u003e_e;++_e)Y[_e]=0}var ue=2,fe=0,pe=S,ye=ne-le\u002632767;if(ge\u003e2\u0026\u0026ie==F(y-ye))for(var Me=Math.min(B,ge)-1,ve=Math.min(32767,y),he=Math.min(258,ge);ve\u003e=ye\u0026\u0026--pe\u0026\u0026ne!=le;){if(u[y+ue]==u[y+ue-ye]){for(var Qe=0;he\u003eQe\u0026\u0026u[y+Qe]==u[y+Qe-ye];++Qe);if(Qe\u003eue){if(ue=Qe,fe=ye,Qe\u003eMe)break;var Pe=Math.min(ye,Qe-2),we=0;for(_e=0;Pe\u003e_e;++_e){var Te=y-ye+_e+32768\u002632767,Re=Te-w[Te]+32768\u002632767;Re\u003ewe\u0026\u0026(we=Re,le=Te)}}}ye+=(ne=le)-(le=w[ne])+32768\u002632767}if(fe){O[j++]=268435456|LNe[ue]\u003c\u003c18|tGt[fe];var Ee=31\u0026LNe[ue],ke=31\u0026tGt[fe];te+=kNe[Ee]+FNe[ke],++U[257+Ee],++Y[ke],J=y+ue,++W}else O[j++]=u[y],++U[u[y]]}}C=sGt(u,I,m,O,U,Y,te,j,oe,y-oe,C)}return iGt(f,0,d+oGt(C)+p)})(r=t,(s=e).level==null?6:s.level,s.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+s.mem,a,A,!0)),l=c.length;return(function(u,g){var h=g.filename;if(u[0]=31,u[1]=139,u[2]=8,u[8]=2\u003eg.level?4:g.level==9?2:0,u[9]=3,g.mtime!=0\u0026\u0026YNe(u,4,Math.floor(new Date(g.mtime||Date.now())/1e3)),h){u[3]=8;for(var d=0;h.length\u003e=d;++d)u[d+10]=h.charCodeAt(d)}})(c,e),YNe(c,l-8,n.d()),YNe(c,l-4,o),c}const DGo=!!vDe||!!P$,aGt=new WeakMap,AGt=\"text/plain\";let UNe=0,Fge=!1;const cGt=(t,e)=\u003e{const[n,o]=t.split(\"#\"),[i,r]=n.split(\"?\");if(!r)return t;const s=r.split(\"\u0026\").filter(a=\u003ea.split(\"=\")[0]!==e).join(\"\u0026\");return`${i}${s?`?${s}`:\"\"}${o?`#${o}`:\"\"}`},iq=(t,e,n=!0)=\u003e{var o;const[i,r]=t.split(\"?\"),s=sn({},e),a=(o=r?.split(\"\u0026\").map(c=\u003e{var l;const[u,g]=c.split(\"=\"),h=n\u0026\u0026(l=s[u])!==null\u0026\u0026l!==void 0?l:g;return delete s[u],`${u}=${h}`}))!==null\u0026\u0026o!==void 0?o:[],A=(function(c,l=\"\u0026\"){let u,g;const h=[];return kl(c,function(d,p){Eo(d)||Eo(p)||p===\"undefined\"||(u=encodeURIComponent((m=\u003em instanceof File)(d)?d.name:d.toString()),g=encodeURIComponent(p),h[h.length]=g+\"=\"+u)}),h.join(l)})(s);return A\u0026\u0026a.push(A),a.length\u003e0?`${i}?${a.join(\"\u0026\")}`:i},KNe=t=\u003e{if(t.nl)return t.nl;const{data:e,compression:n}=t;if(!e)return;if(n===gE.GZipJS){const i=MGo((function(r){var s=r.length;if(typeof TextEncoder\u003c\"u\")return new TextEncoder().encode(r);for(var a=new a4(r.length+(r.length\u003e\u003e\u003e1)),A=0,c=function(h){a[A++]=h},l=0;s\u003el;++l){if(A+5\u003ea.length){var u=new a4(A+8+(s-l\u003c\u003c1));u.set(a),a=u}var g=r.charCodeAt(l);128\u003eg?c(g):2048\u003eg?(c(192|g\u003e\u003e\u003e6),c(128|63\u0026g)):g\u003e55295\u0026\u002657344\u003eg?(c(240|(g=65536+(1047552\u0026g)|1023\u0026r.charCodeAt(++l))\u003e\u003e\u003e18),c(128|g\u003e\u003e\u003e12\u002663),c(128|g\u003e\u003e\u003e6\u002663),c(128|63\u0026g)):(c(224|g\u003e\u003e\u003e12),c(128|g\u003e\u003e\u003e6\u002663),c(128|63\u0026g))}return iGt(a,0,A)})(oG(e)),{mtime:0});return{contentType:AGt,body:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength),estimatedSize:i.byteLength}}if(n===gE.Base64){const i=(function(s){return s\u0026\u0026btoa(encodeURIComponent(s).replace(/%([0-9A-F]{2})/g,(a,A)=\u003eString.fromCharCode(parseInt(A,16))))})(oG(e)),r=(s=\u003e\"data=\"+encodeURIComponent(typeof s==\"string\"?s:oG(s)))(i);return{contentType:\"application/x-www-form-urlencoded\",body:r,estimatedSize:new Blob([r]).size}}const o=oG(e);return{contentType:\"application/json\",body:o,estimatedSize:new Blob([o]).size}},lGt=t=\u003e{const e=()=\u003et.transport===\"sendBeacon\"?{url:iq(t.url,{compression:gE.Base64}),encodedBody:KNe(sn(sn({},t),{},{compression:gE.Base64,nl:void 0}))}:{url:cGt(t.url,\"compression\"),encodedBody:KNe(sn(sn({},t),{},{compression:void 0,nl:void 0}))};let n;try{n=KNe(t)}catch(i){if(mHt(t.compression,iG(t.url,\"compression\")))return ui.error(\"Failed to gzip request body, sending uncompressed payload\",i),e();throw i}return n\u0026\u0026mHt(t.compression,iG(t.url,\"compression\"))\u0026\u0026!((o=n.body)instanceof ArrayBuffer?JDe(new Uint8Array(o)):ArrayBuffer.isView(o)\u0026\u0026JDe(new Uint8Array(o.buffer,o.byteOffset,o.byteLength)))?(Fge=!0,e()):{url:t.url,encodedBody:n};var o},uGt=t=\u003e{try{return lGt(t)}catch(n){var e;return ui.error(n),void((e=t.callback)===null||e===void 0||e.call(t,{statusCode:0,error:n}))}},NGo=(function(){var t=Zu(function*(e){const n=yield(function(i){return WDe.apply(this,arguments)})(oG(e.data),n_.DEBUG,{rethrow:!0});if(!n)return e;const o=yield n.arrayBuffer();return sn(sn({},e),{},{nl:{contentType:AGt,body:o,estimatedSize:o.byteLength}})});return function(e){return t.apply(this,arguments)}})(),RGo=/Failed to fetch|NetworkError|Load failed/i,gGt=t=\u003et?.name===\"TypeError\"\u0026\u0026RGo.test(t?.message||\"\"),dGt=t=\u003e{try{const e=(function(n,o=Date.now()){if(typeof n!=\"string\"||!n)return;const i=n.trim(),r=/^\\d+\\s*,/.test(i)?i.slice(0,i.indexOf(\",\")).trim():i;if(/^\\d+$/.test(r)){const A=1e3*Math.min(Number(r),300);return A\u003e0?A:void 0}if(!/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*[ ,]/.test(r))return;const s=/^\\w{3} \\w{3} /.test(r)?r+\" GMT\":r,a=Date.parse(s)-o;return Number.isFinite(a)\u0026\u0026a\u003e0?Math.min(a,mge):void 0})(t());return Eo(e)?void 0:Math.min(e,3e4)}catch{return}},hGt=t=\u003e{const e=uGt(t);if(!e)return;const n=new vDe;aGt.set(n,!0);const{url:o,encodedBody:i}=e;n.open(t.method||\"GET\",o,!0);const{contentType:r,body:s}=i??{};kl(t.headers,function(a,A){n.setRequestHeader(A,a)}),r\u0026\u0026n.setRequestHeader(\"Content-Type\",r),t.timeout\u0026\u0026(n.timeout=t.timeout),n.onreadystatechange=()=\u003e{if(n.readyState===4){var a;const A={statusCode:n.status,text:n.responseText};if(n.status===200)try{A.json=JSON.parse(n.responseText)}catch{}(a=t.callback)===null||a===void 0||a.call(t,A,dGt(()=\u003en.getResponseHeader(\"Retry-After\")))}},n.send(s)},pGt=t=\u003e{const e=uGt(t);if(!e)return;const{url:n,encodedBody:o}=e,{contentType:i,body:r,estimatedSize:s}=o??{},a=new Headers;kl(t.headers,function(d,p){a.append(p,d)}),i\u0026\u0026a.append(\"Content-Type\",i);let A=null,c=!1;if(gLt){const d=new gLt;A={signal:d.signal,timeout:setTimeout(()=\u003e{c=!0;try{d.abort(eHt(\"AbortError\",\"PostHog request timed out\"+((p=t.timeout)?` after ${p}ms`:\"\")))}catch(m){u(m)}var p},t.timeout)}}let l=!1;const u=d=\u003e{var p;l||(l=!0,c\u0026\u0026d?.name===\"AbortError\"||gGt(d)?ui.warn(d):ui.error(d),(p=t.callback)===null||p===void 0||p.call(t,{statusCode:0,error:d}))};let g=0;const h=()=\u003e{UNe-=g,g=0,A\u0026\u0026clearTimeout(A.timeout)};try{const d=sn({method:t?.method||\"GET\",headers:a,referrerPolicy:\"strict-origin\",body:r,signal:A?.signal},t.fetchOptions),p=s??(Eo(r)?0:void 0);d.keepalive=d.method===\"POST\"\u0026\u0026!t.sl\u0026\u0026d.keepalive!==!1\u0026\u0026d.body===r\u0026\u0026!Eo(p)\u0026\u0026p\u003e=0\u0026\u002652428.8\u003eUNe+p,d.keepalive\u0026\u0026(g=p,UNe+=g),P$(n,d).then(m=\u003em.text().then(_=\u003e{var f;if(l)return;const I={statusCode:m.status,text:_};if(m.status===200)try{I.json=JSON.parse(_)}catch(C){ui.error(C)}l=!0,h(),(f=t.callback)===null||f===void 0||f.call(t,I,dGt(()=\u003em.headers.get(\"Retry-After\")))})).catch(m=\u003e{h(),u(m)}).finally(h)}catch(d){h(),u(d)}},VNe=t=\u003e{try{var e;const{url:n,encodedBody:o}=lGt(t),{contentType:i,body:r,estimatedSize:s}=o??{};if(!r)return;const a=r instanceof Blob?r:new Blob([r],{type:i});if(tf.sendBeacon(n,a))return;const A=As(t.data)?t.data:(e=t.data)===null||e===void 0?void 0:e.batch;if(As(A)\u0026\u0026A.length\u003e1\u0026\u0026(s??0)\u003e16384){const c=Math.ceil(A.length/2),l=u=\u003eAs(t.data)?u:sn(sn({},t.data),{},{batch:u});return VNe(sn(sn({},t),{},{data:l(A.slice(0,c))})),void VNe(sn(sn({},t),{},{data:l(A.slice(c))}))}ui.warn(`Beacon of ~${s??0} bytes was rejected by the browser, falling back to ${P$?\"fetch\":\"XHR\"}`),P$?pGt(sn(sn({},t),{},{sl:!0})):hGt(t)}catch(n){ui.warn(\"Beacon send failed\",n)}},mGt=(t,e,n,o)=\u003e{const i=o===\"query\"?e===\"POST\"?\"sent_at\":\"_\":void 0;return iq(n===gE.GZipJS?cGt(t,\"compression\"):t,sn(sn({},i?{[i]:Date.now().toString()}:{}),n===gE.GZipJS?{}:{compression:n}))},TGo=(()=\u003e{const t=[];return P$\u0026\u0026t.push({transport:\"fetch\",method:pGt}),vDe\u0026\u0026t.push({transport:\"XHR\",method:hGt}),tf?.sendBeacon\u0026\u0026t.push({transport:\"sendBeacon\",method:VNe}),t})();let _Gt=!DGo\u0026\u0026jy?.indexOf(\"MSIE\")===-1\u0026\u0026jy?.indexOf(\"Mozilla\")===-1;function fGt(t,e,n){var o,i,r;n\u0026\u0026(e=sn(sn({},e),{},{callback:s=\u003en(s)})),t.__loaded?_Gt?t.__request_queue.push(e):t.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop\u0026\u0026((i=e.callback)===null||i===void 0||i.call(e,{statusCode:429})):(e.transport=e.transport||t.config.api_transport,e.headers=sn(sn({},t.config.request_headers),e.headers),e.compression=e.compression===\"best-available\"?(o=t.compression)!==null\u0026\u0026o!==void 0?o:e.compressionFallback:e.compression,(Eo(t.config.disable_beacon)?t.config.__preview_disable_beacon:t.config.disable_beacon)\u0026\u0026(e.disableTransport=[\"sendBeacon\"]),e.fetchOptions=e.fetchOptions||t.config.fetch_options,((s,a)=\u003e{var A,c,l;const u=sn(sn({},s),{},{callback:a??(m=\u003e{var _;return(_=s.callback)===null||_===void 0?void 0:_.call(s,m)})});u.timeout=u.timeout||6e4;const g=(A=u.transport)!==null\u0026\u0026A!==void 0?A:\"fetch\";g===\"sendBeacon\"\u0026\u0026Eo(u.compression)\u0026\u0026u.data\u0026\u0026(u.compression=gE.Base64),u.method===\"POST\"\u0026\u0026u.data\u0026\u0026(u.timestampMode===\"capture-body\"?u.data=(m=\u003e{var _,f;const I=(As(m)?m:[m]).map(y=\u003esn(sn({},y),y.timestamp instanceof Date\u0026\u0026!isNaN(y.timestamp.getTime())?{timestamp:y.timestamp.toISOString()}:{})),C=I[0];return{api_key:(_=C==null||(f=C.properties)===null||f===void 0?void 0:f.token)!==null\u0026\u0026_!==void 0?_:C?.token,batch:I,sent_at:new Date().toISOString()}})(u.data):u.timestampMode===\"body\"\u0026\u0026(u.data=((m,_=new Date().toISOString())=\u003eAs(m)?m.map(f=\u003esn(sn({},f),{},{sent_at:_})):sn(sn({},m),{},{sent_at:_}))(u.data))),u.url=mGt(u.url,u.method,u.compression,u.timestampMode);const h=TGo.filter(m=\u003e!u.disableTransport||!m.transport||!u.disableTransport.includes(m.transport)),d=(c=(l=(function(m,_){for(let f=0;m.length\u003ef;f++)if(_(m[f]))return m[f]})(h,m=\u003em.transport===g))===null||l===void 0?void 0:l.method)!==null\u0026\u0026c!==void 0?c:h[0].method;if(!d)throw new Error(\"No available transport method\");const p=m=\u003e{try{d(m)}catch(f){var _;gGt(f)?ui.warn(f):ui.error(f),(_=u.callback)===null||_===void 0||_.call(u,{statusCode:0,error:f})}};g!==\"sendBeacon\"\u0026\u0026!u.preferSyncCompression\u0026\u0026u.data\u0026\u0026u.compression===gE.GZipJS\u0026\u0026bHo\u0026\u0026typeof Promise\u003c\"u\"\u0026\u0026!Fge?NGo(u).then(m=\u003e{p(m)}).catch(m=\u003e{if(_Ht(m))return Fge=!0,void p(sn(sn({},u),{},{compression:void 0,url:mGt(s.url,s.method,void 0,s.timestampMode)}));(_=\u003e{if(!_||typeof _!=\"object\")return!1;const f=\"name\"in _?String(_.name):\"\";return _Ht(_)||f===pHt})(m)\u0026\u0026(Fge=!0),p(u)}):p(u)})(e,(s,a)=\u003e{var A,c,l;t.rateLimiter.checkForLimiting(s),400\u003es.statusCode||(A=(c=t.config).on_request_error)===null||A===void 0||A.call(c,s),n?n(s,a):(l=e.callback)===null||l===void 0||l.call(e,s)})):e.fireCallbackOnDrop\u0026\u0026((r=e.callback)===null||r===void 0||r.call(e,{statusCode:0}))}var kGo=class{constructor(e,n){this.rl=!0,this.ol=[],this.al=u6(n?.flush_interval_ms||3e3,250,5e3,ui.createLogger(\"flush interval\"),3e3),this.ll=e}enqueue(e){this.ol.push(e),this.ul||this.hl()}unload(){this.cl();const e=this.ol.length\u003e0?this.dl():{},n=Object.values(e);[...n.filter(o=\u003eo.url.indexOf(\"/e\")===0),...n.filter(o=\u003eo.url.indexOf(\"/e\")!==0)].map(o=\u003e{this.vl(o,\"sendBeacon\")})}enable(){this.rl=!1,this.hl()}hl(){this.rl||(this.ul=setTimeout(()=\u003e{if(this.cl(),this.ol.length\u003e0){const e=this.dl();for(const n in e)this.vl(e[n])}},this.al))}vl(e,n){try{this.ll(e,n)}catch(o){ui.error(o)}}cl(){clearTimeout(this.ul),this.ul=void 0}dl(){const e={};return kl(this.ol,n=\u003e{var o;const i=n,r=((i?i.batchKey:null)||i.url)+(i.batchGroup?`:${i.batchGroup}`:\"\");Eo(e[r])\u0026\u0026(e[r]=sn(sn({},i),{},{data:[]})),(o=e[r].data)===null||o===void 0||o.push(i.data)}),this.ol=[],e}};const FGo=[\"retriesPerformedSoFar\"];var LGo=class{constructor(e){this._instance=e,this.fl=!1,this.pl=3e3,this.ol=[],this.ol=[],this.gl=!0,this.resume()}resume(){if(!Eo(Fn)\u0026\u0026\"onLine\"in Fn.navigator){if(this.gl=Fn.navigator.onLine,this.ml)return;this.ml=()=\u003e{this.gl=!0,this.yl()},this.bl=()=\u003e{this.gl=!1},el(Fn,\"online\",this.ml),el(Fn,\"offline\",this.bl)}}get length(){return this.ol.length}retriableRequest(e,n){let{retriesPerformedSoFar:o}=e,i=IHt(e,FGo);Gb(o)\u0026\u0026(i.url=iq(i.url,{retry_count:o})),fGt(this._instance,n?sn(sn({},i),{},{transport:n}):i,(r,s)=\u003e{var a;if(r.statusCode!==200\u0026\u0026(400\u003er.statusCode||r.statusCode\u003e=500)){if((r.statusCode===0?3:10)\u003e(o??0))return void this.Ls(sn({retriesPerformedSoFar:o},i),s);r.statusCode===0\u0026\u0026ui.warn(`Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after ${o??0} retries.`)}(a=i.callback)===null||a===void 0||a.call(i,r)})}Ls(e,n){const o=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=o+1;const i=Math.max((function(a){const A=3e3*Math.pow(2,a),c=A/2,l=Math.min(18e5,A),u=(Math.random()-.5)*(l-c);return Math.ceil(l+u)})(o),n??0),r=Date.now()+i;this.ol.push({retryAt:r,requestOptions:e});let s=`Enqueued failed request for retry in ${i}`;navigator.onLine||(s+=\" (Browser is offline)\"),ui.warn(s),this.fl||(this.fl=!0,this._l())}_l(){if(this.wl\u0026\u0026clearTimeout(this.wl),this.ol.length===0)return this.fl=!1,void(this.wl=void 0);this.wl=setTimeout(()=\u003e{this.gl\u0026\u0026this.ol.length\u003e0\u0026\u0026this.yl(),this._l()},this.pl)}yl(){const e=Date.now(),n=[],o=this.ol.filter(i=\u003ee\u003ei.retryAt||(n.push(i),!1));if(this.ol=n,o.length\u003e0)for(const{requestOptions:i}of o)this.retriableRequest(i)}unload(){this.wl\u0026\u0026(clearTimeout(this.wl),this.wl=void 0),this.fl=!1,Eo(Fn)||(this.ml\u0026\u0026(Fn.removeEventListener(\"online\",this.ml),this.ml=void 0),this.bl\u0026\u0026(Fn.removeEventListener(\"offline\",this.bl),this.bl=void 0));for(const{requestOptions:e}of this.ol)try{this._instance._send_request(sn(sn({},e),{},{transport:\"sendBeacon\"}))}catch(n){ui.error(n)}this.ol=[]}},HGo=class{constructor(e){this._instance=e,this.kl=()=\u003e{var n,o,i,r;this.Sl||(this.Sl={});const s=this.scrollElement(),a=this.scrollY(),A=s?Math.max(0,s.scrollHeight-s.clientHeight):0,c=a+(s?.clientHeight||0),l=s?.scrollHeight||0;this.Sl.lastScrollY=Math.ceil(a),this.Sl.maxScrollY=Math.max(a,(n=this.Sl.maxScrollY)!==null\u0026\u0026n!==void 0?n:0),this.Sl.maxScrollHeight=Math.max(A,(o=this.Sl.maxScrollHeight)!==null\u0026\u0026o!==void 0?o:0),this.Sl.lastContentY=c,this.Sl.maxContentY=Math.max(c,(i=this.Sl.maxContentY)!==null\u0026\u0026i!==void 0?i:0),this.Sl.maxContentHeight=Math.max(l,(r=this.Sl.maxContentHeight)!==null\u0026\u0026r!==void 0?r:0)}}get xl(){return this._instance.config.scroll_root_selector}getContext(){return this.Sl}resetContext(){const e=this.Sl;return this.Sl=void 0,setTimeout(this.kl,0),e}startMeasuringScrollPosition(){el(Fn,\"scroll\",this.kl,{capture:!0}),el(Fn,\"scrollend\",this.kl,{capture:!0}),el(Fn,\"resize\",this.kl)}scrollElement(){if(this.xl){const o=As(this.xl)?this.xl:[this.xl];for(const i of o){var e;const r=Fn==null||(e=Fn.document)===null||e===void 0?void 0:e.querySelector(i);if(r)return r}return}var n;return Fn==null||(n=Fn.document)===null||n===void 0?void 0:n.documentElement}$l(e){var n,o;const i=e===\"y\"?\"scrollTop\":\"scrollLeft\";if(this.xl){const r=this.scrollElement();return r\u0026\u0026r[i]||0}return Fn?e===\"y\"?Fn.scrollY||Fn.pageYOffset||((n=Fn.document)===null||n===void 0||(n=n.documentElement)===null||n===void 0?void 0:n.scrollTop)||0:Fn.scrollX||Fn.pageXOffset||((o=Fn.document)===null||o===void 0||(o=o.documentElement)===null||o===void 0?void 0:o.scrollLeft)||0:0}scrollY(){return this.$l(\"y\")}scrollX(){return this.$l(\"x\")}};const OGo=t=\u003eUOt(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties,t?.config.disable_capture_url_hashes);var IGt=class{constructor(e,n,o,i){this.qe=r=\u003e{const s=this.Cl();if(s\u0026\u0026s.sessionId===r)return;const a={sessionId:r,props:this.Tl(this._instance)};this.Il.register({[cNe]:a})},this._instance=e,this.Ml=n,this.Il=o,this.Tl=i||OGo,this.Ml.onSessionId(this.qe)}Cl(){return this.Il.props[cNe]}getSetOnceProps(){var e;const n=(e=this.Cl())===null||e===void 0?void 0:e.props;return n?\"r\"in n?KOt(n,this._instance.config.disable_capture_url_hashes):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){const e={};return kl(mNe(this.getSetOnceProps()),(n,o)=\u003e{o===\"$current_url\"\u0026\u0026(o=\"url\"),e[`$session_entry_${PDe(o)}`]=n}),e}},Lge=class{on(t,e){return this.El[t]||(this.El[t]=[]),this.El[t].push(e),()=\u003e{this.El[t]=this.El[t].filter(n=\u003en!==e)}}emit(t,e){for(const n of this.El[t]||[])n(e);for(const n of this.El[\"*\"]||[])n(t,e)}constructor(){this.El={}}};const cG=Cd(\"[SessionId]\"),CGt=864e5;var yGt=class{on(e,n){return this.Pl.on(e,n)}constructor(e,n,o){var i;if(this.Rl=null,this.Al=null,this.Ol=[],this.Fl=void 0,this.Dl=!1,this.Pl=new Lge,this.Ll=(s,a)=\u003e!(!Gb(s)||!Gb(a))\u0026\u0026Math.abs(s-a)\u003ethis.sessionTimeoutMs,!e.persistence)throw new Error(\"SessionIdManager requires a PostHogPersistence instance\");if(e.config.cookieless_mode===\"always\")throw new Error('SessionIdManager cannot be used with cookieless_mode=\"always\"');this.Mr=e.config,this.Il=e.persistence,this.je=void 0,this.Xt=void 0,this._sessionStartTimestamp=null,this.Nl=void 0,this._sessionActivityTimestamp=null,this.ql=n||kB,this.jl=o||kB;const r=this.Mr.persistence_name||this.Mr.token;if(this._sessionTimeoutMs=1e3*u6(this.Mr.session_idle_timeout_seconds||1800,60,36e3,cG.createLogger(\"session_idle_timeout_seconds\"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Bl(),this.Hl=\"ph_\"+r+\"_window_id\",this.zl=\"ph_\"+r+\"_primary_window_exists\",this.Ul()){const s=nu.Lt(this.Hl),a=nu.Lt(this.zl);s\u0026\u0026!a?this.je=s:nu.Pt(this.Hl),nu.$t(this.zl,!0)}!((i=this.Mr.bootstrap)===null||i===void 0)\u0026\u0026i.sessionID\u0026\u0026this.setBootstrapSessionId(this.Mr.bootstrap.sessionID),this.Wl()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return Eo(this.Ol)\u0026\u0026(this.Ol=[]),this.Ol.push(e),this.Xt\u0026\u0026e(this.Xt,this.je),()=\u003e{this.Ol=this.Ol.filter(n=\u003en!==e)}}Ul(){return this.Mr.persistence!==\"memory\"\u0026\u0026!this.Il.hi\u0026\u0026nu.Et()}Vl(e){e!==this.je\u0026\u0026(this.je=e,this.Ul()\u0026\u0026nu.$t(this.Hl,e))}Gl(){return this.je?this.je:this.Ul()?nu.Lt(this.Hl):null}Ql(e){const n=this.Rl;return!Id(n)\u0026\u0026!Id(e)\u0026\u00265e3\u003eMath.abs(e-n)}Jl(e,n,o){const i=n!==this._sessionActivityTimestamp,r=!(e!==this.Xt||o!==this._sessionStartTimestamp);this._sessionStartTimestamp=o,this._sessionActivityTimestamp=n,this.Xt=e,r\u0026\u0026!i||r\u0026\u0026this.Ql(n)||(this.Rl=n,this.Il.register({[$O]:[n,e,o]}))}Zl(){var e;const n=(e=this.Mr)===null||e===void 0?void 0:e.persistence_save_debounce_ms;return Gb(n)\u0026\u0026n\u003e0}Kl(){this.Zl()?this.Il.refreshKey($O):(this.Il.flush(),this.Il.load())}Xl(){var e;if(Id(this._sessionActivityTimestamp)||this._sessionActivityTimestamp===this.Rl)return;this.Kl();const[,n,o]=this.Yl();n===this.Xt\u0026\u0026o===this._sessionStartTimestamp\u0026\u0026(this.Rl=this._sessionActivityTimestamp,this.Il.register({[$O]:[this._sessionActivityTimestamp,(e=this.Xt)!==null\u0026\u0026e!==void 0?e:null,this._sessionStartTimestamp]}),this.Il.flush())}tu(){const[e]=this.Yl(),n=Gb(e)?e:0,o=Gb(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,o)}eu(e){return this.Kl(),this.Ll(e,this.tu())}Yl(){const e=this.Il.props[$O];return As(e)\u0026\u0026e.length===2\u0026\u0026e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Rl=null,this.Nl=void 0,clearTimeout(this.iu),this.iu=void 0,this.Jl(null,null,null)}setBootstrapSessionId(e,n=!1){const o=((i,r=new Date().getTime())=\u003e{try{const s=(a=\u003e{const A=a.replace(/-/g,\"\");if(A.length!==32)throw new Error(\"Not a valid UUID\");if(A[12]!==\"7\")throw new Error(\"Not a UUIDv7\");return parseInt(A.substring(0,12),16)})(i);return s\u003er+6e4?void cG.error(\"Bootstrap sessionID cannot be in the future\"):s}catch(s){return void cG.error(\"Invalid sessionID in bootstrap\",s)}})(e);return!Eo(o)\u0026\u0026(n?this.Nl={sessionId:e,sessionStartTimestamp:o}:this.Jl(e,new Date().getTime(),o),!0)}destroy(){this.Dl=!0,this.Xl(),clearTimeout(this.iu),this.iu=void 0,this.Fl\u0026\u0026Fn\u0026\u0026(Fn.removeEventListener(Qge,this.Fl,{capture:!1}),this.Fl=void 0),this.Ol=[]}Wl(){this.Fl=()=\u003e{this.Xl(),this.Ul()\u0026\u0026nu.Pt(this.zl)},el(Fn,Qge,this.Fl,{capture:!1})}checkAndGetSessionAndWindowId(e=!1,n=null,o=!1){if(this.Mr.cookieless_mode===\"always\")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode=\"always\"');const i=n||new Date().getTime(),r=this.Xt;if(o)this.Al=i;else if(Id(this.Al)||this.Al\u003ei||i-this.Al\u003e=1e3){var s,a;(s=(a=this.Il).syncCookieProperties)===null||s===void 0||s.call(a),this.Al=i}let[,A,c]=this.Yl();const l=!Eo(r)\u0026\u0026A!==r,u=this.tu();let g=this.Gl();const h=this.Nl,d=!!h\u0026\u0026(h.sessionStartTimestamp\u003ei+6e4||i-h.sessionStartTimestamp\u003eCGt),p=h?d:Gb(c)\u0026\u0026Math.abs(i-c)\u003eCGt;let m=!1,_=l,f=!A||!!h;const I=A;let C=!f\u0026\u0026!e\u0026\u0026this.Ll(i,u);if(C\u0026\u0026(C=this.eu(i),C||cG.info(\"cross-tab refresh kept the session alive\",{sessionId:A}),[,A,c]=this.Yl(),C||(f=!A||!!h)),f||C||p){_=!1;const B=h\u0026\u0026!d;A=B?h.sessionId:this.ql(),g=this.jl(),cG.info(\"new session ID assigned\",{sessionId:A,windowId:g,bootstrapped:!!B,changeReason:{noSessionId:f,activityTimeout:C,sessionPastMaximumLength:p}}),c=B?h.sessionStartTimestamp:i,this.Nl=void 0,m=!0}else g||(g=this.jl(),m=!0),_=_||A!==I,_\u0026\u0026(cG.info(\"adopted cross-tab session id\",{sessionId:A,windowId:g}),m=!0);const y=Gb(u)\u0026\u0026e\u0026\u0026!p?u:i,x=Gb(c)?c:new Date().getTime();this.Vl(g),this.Jl(A,y,x),e||this.Bl();const E={noSessionId:f,activityTimeout:C,sessionPastMaximumLength:p,crossTabAdoption:_};return m\u0026\u0026this.Ol.forEach(B=\u003eB(A,g,E)),{sessionId:A,windowId:g,sessionStartTimestamp:x,changeReason:m?E:void 0,lastActivityTimestamp:u}}Bl(){this.Dl||(clearTimeout(this.iu),this.iu=setTimeout(()=\u003e{if(!this.Dl)if(this.eu(new Date().getTime())){const e=this.Xt;this.resetSessionId(),this.Pl.emit(\"forcedIdleReset\",{idleSessionId:e})}else this.Bl()},1.1*this.sessionTimeoutMs))}};const xGt=function(t,e){if(!t)return!1;const n=t.userAgent;if(n\u0026\u0026ILt(n,e))return!0;try{const o=t?.userAgentData;if(o?.brands\u0026\u0026o.brands.some(i=\u003eILt(i?.brand,e)))return!0}catch{}return!!t.webdriver};function EGt(){return(EGt=Zu(function*(){const t=tf?.userAgentData;if(t?.getHighEntropyValues)try{const e=yield t.getHighEntropyValues([\"model\"]),n=e?.model;return rA(n)\u0026\u0026n.length\u003e0?n:void 0}catch(e){return void ui.info(\"Unable to resolve $device_model from userAgentData.getHighEntropyValues\",e)}})).apply(this,arguments)}function GGo(t,e){let n=`$survey_${e}/${t.id}`;return t.current_iteration\u0026\u0026t.current_iteration\u003e0\u0026\u0026(n=`$survey_${e}/${t.id}/${t.current_iteration}`),n}function BGt(t){var e;return!!(!((e=t.conditions)===null||e===void 0||(e=e.events)===null||e===void 0||(e=e.values)===null||e===void 0)\u0026\u0026e.length)}const Hge=(t,e)=\u003e{if(!(n=\u003e{try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}},Oge=t=\u003et.toLowerCase(),bGt={exact:(t,e)=\u003ee.some(n=\u003et.some(o=\u003en===o)),is_not:(t,e)=\u003ee.every(n=\u003et.every(o=\u003en!==o)),regex:(t,e)=\u003ee.some(n=\u003et.some(o=\u003eHge(n,o))),not_regex:(t,e)=\u003ee.every(n=\u003et.every(o=\u003e!Hge(n,o))),icontains:(t,e)=\u003ee.map(Oge).some(n=\u003et.map(Oge).some(o=\u003en.includes(o))),not_icontains:(t,e)=\u003ee.map(Oge).every(n=\u003et.map(Oge).every(o=\u003e!n.includes(o))),gt:(t,e)=\u003ee.some(n=\u003e{const o=parseFloat(n);return!isNaN(o)\u0026\u0026t.some(i=\u003eo\u003eparseFloat(i))}),lt:(t,e)=\u003ee.some(n=\u003e{const o=parseFloat(n);return!isNaN(o)\u0026\u0026t.some(i=\u003eo\u003cparseFloat(i))})};function SGt(t,e){return!t||Object.entries(t).every(([n,o])=\u003e{const i=e?.[n];if(i==null)return!1;const r=bGt[o.operator];return!!r\u0026\u0026r(o.values.map(String),[String(i)])})}function zNe(t,e,n){return oG({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}const JNe=\"custom\",QGt=\"i.posthog.com\",YGo=/^\\/static\\//,UGo=[\"/s/\",\"/e/\",\"/i/\"];var KGo=class{constructor(t){this.nu={},this.instance=t}get apiHost(){const t=this.instance.config.api_host.trim().replace(/\\/$/,\"\");return t===\"https://app.posthog.com\"?\"https://us.i.posthog.com\":t}get flagsApiHost(){const t=this.instance.config.flags_api_host;return t?t.trim().replace(/\\/$/,\"\"):this.apiHost}get uiHost(){var t;let e=(t=this.instance.config.ui_host)===null||t===void 0?void 0:t.replace(/\\/$/,\"\");return e||(e=this.apiHost.replace(`.${QGt}`,\".posthog.com\")),e===\"https://app.posthog.com\"?\"https://us.posthog.com\":e}get region(){return this.nu[this.apiHost]||(this.nu[this.apiHost]=/https:\\/\\/(app|us|us-assets)(\\.i)?\\.posthog\\.com/i.test(this.apiHost)?\"us\":/https:\\/\\/(eu|eu-assets)(\\.i)?\\.posthog\\.com/i.test(this.apiHost)?\"eu\":JNe),this.nu[this.apiHost]}su(t){if(!YGo.test(t))return;const e=this.instance.config.asset_host;return typeof e==\"string\"\u0026\u0026e.trim().replace(/\\/$/,\"\")||void 0}ru(t){const e=Kb(t);return e?e.protocol+\"//\"+e.host+e.pathname:void 0}ou(t,e,n){if(t===\"ui\")return n;let o=n;const i=this.instance.config.rewriteRequestPath;if(i){var r;const s=((r=Kb(n))===null||r===void 0?void 0:r.href)||n;o=i(new URL(s)).toString()}if(i\u0026\u0026t===\"api\"\u0026\u0026UGo.some(s=\u003ee.indexOf(s)===0)){const s=this.ru(o);if(s){const a=this.apiHost;let A=this.au;A?.apiHost===a\u0026\u0026A.rewriteRequestPath===i||(A={apiHost:a,rewriteRequestPath:i,urls:new Set},this.au=A),A.urls.add(s)}}return o}isIngestionEndpoint(t){const e=this.au,n=this.ru(t);return e?.apiHost===this.apiHost\u0026\u0026e.rewriteRequestPath===this.instance.config.rewriteRequestPath\u0026\u0026!!n\u0026\u0026e.urls.has(n)}endpointFor(t,e=\"\"){if(e\u0026\u0026(e=e[0]===\"/\"?e:`/${e}`),t===\"ui\")return this.ou(t,e,this.uiHost+e);if(t===\"flags\")return this.ou(t,e,this.flagsApiHost+e);if(t===\"assets\"){const o=this.su(e);if(o)return this.ou(t,e,`${o}${e}`)}if(this.region===JNe)return this.ou(t,e,this.apiHost+e);const n=QGt+e;switch(t){case\"assets\":return this.ou(t,e,`https://${this.region}-assets.${n}`);case\"api\":return this.ou(t,e,`https://${this.region}.${n}`)}}};const yl=Cd(\"[Surveys]\"),vGt=t=\u003e{try{const e=(n=\u003e((o,i)=\u003e`seenSurvey_${(function(r){return r.current_iteration\u0026\u0026r.current_iteration\u003e0?`${r.id}_${r.current_iteration}`:r.id})(i)}`)(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,\"true\")}catch(e){yl.error(\"Failed to persist survey seen state\",e)}},VGo=[NNe.Popover,NNe.Widget,NNe.API],zGo={ignoreConditions:!1,ignoreDelay:!1,displayType:TNe.Popover},JGo=Cd(\"[PostHog ExternalIntegrations]\"),WGo={intercom:\"intercom-integration\",crispChat:\"crisp-chat-integration\"};var jGo=class{constructor(t){this._instance=t}Ho(t,e){var n,o;(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,t,i=\u003e{if(i)return JGo.error(\"failed to load script\",i);e()})}startIfEnabledOrStop(){var t;for(const[i,r]of Object.entries((t=this._instance.config.integrations)!==null\u0026\u0026t!==void 0?t:{})){var e,n,o;r\u0026\u0026!(!((e=Vr.__PosthogExtensions__)===null||e===void 0||(e=e.integrations)===null||e===void 0)\u0026\u0026e[i])\u0026\u0026this.Ho(WGo[i],()=\u003e{var s;(s=Vr.__PosthogExtensions__)===null||s===void 0||(s=s.integrations)===null||s===void 0||(s=s[i])===null||s===void 0||s.start(this._instance)}),!r\u0026\u0026(!((n=Vr.__PosthogExtensions__)===null||n===void 0||(n=n.integrations)===null||n===void 0)\u0026\u0026n[i])\u0026\u0026((o=Vr.__PosthogExtensions__)===null||o===void 0||(o=o.integrations)===null||o===void 0||(o=o[i])===null||o===void 0||o.stop())}}},$Go=class{constructor(e,n){this.A=e,this.bo=n,this.lu=new Map,this.To=!1}add(e){var n=this;return Zu(function*(){if(n.To)throw new Error(\"Cannot add an extension to a disposed ExtensionRuntime\");if(n.lu.has(e.name))throw new Error(`Browser extension \"${e.name}\" is already registered`);n.lu.set(e.name,e);try{const o=e.setup(n.bo);o\u0026\u0026(yield o)}catch(o){const i=n.lu.get(e.name)===e;i\u0026\u0026n.lu.delete(e.name),n.A.error(`Failed to set up browser extension \"${e.name}\"`,o),i\u0026\u0026n.uu(e)}})()}getExtension(e){return this.lu.get(e)}dispose(){if(this.To)return;this.To=!0;const e=Array.from(this.lu.values()).reverse();this.lu.clear();for(const n of e)this.uu(n)}uu(e){try{var n;const o=(n=e.dispose)===null||n===void 0?void 0:n.call(e);o\u0026\u0026nf(o.then)\u0026\u0026o.then(void 0,i=\u003e{this.A.error(`Failed to dispose browser extension \"${e.name}\"`,i)})}catch(o){this.A.error(`Failed to dispose browser extension \"${e.name}\"`,o)}}},qGo=class{constructor(t){this._instance=t}initialize(){}get(t){const e=this._instance.persistence;if(typeof t==\"string\")return e?.get_property(t);const n={};for(const o of t){const i=e?.get_property(o);Eo(i)||(n[o]=i)}return n}set(t,e){var n;(n=this._instance.persistence)===null||n===void 0||n.register(typeof t==\"string\"?{[t]:e}:t)}remove(t){var e;(e=this._instance.persistence)===null||e===void 0||e.unregister(t)}};const wGt=\"extensionsRemoteConfig\";var XGo=class{constructor(t){this.instance=t,this.To=!1,this.A=ui,this.hu=t.cu,this.kv=new qGo(t),this.onEvent=e=\u003eTge(this.instance.on(\"eventCaptured\",n=\u003e{try{e({event:n.event,properties:n.properties})}catch(o){this.A.error(\"Browser extension event listener failed\",o)}})),this.onRemoteConfig=e=\u003e{if(this.To)return Tge(()=\u003e{});const n=i=\u003e{try{e(i)}catch(r){this.A.error(\"Browser extension remote config listener failed\",r)}},o=this.instance.du.on(wGt,n);return this.hu\u0026\u0026n(this.hu),Tge(o)},this.vu=new $Go(ui.createLogger(\"[BrowserExtensions]\"),this)}get logger(){return this.A}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var t;return(t=this.instance.get_property(\"$device_id\"))!==null\u0026\u0026t!==void 0?t:this.distinctId}get deviceId(){const t=this.instance.get_property(XDe);return typeof t==\"string\"?t:void 0}get library(){return{name:n_.LIB_NAME,version:n_.LIB_VERSION}}get initialPersonProperties(){var t,e;return(t=(e=this.instance.persistence)===null||e===void 0?void 0:e.get_initial_props())!==null\u0026\u0026t!==void 0?t:{}}get groups(){return this.instance.getGroups()}get session(){try{var t,e,n,o;const i=(t=this.instance.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId(!0);return{sessionId:(e=i?.sessionId)!==null\u0026\u0026e!==void 0?e:\"\",windowId:(n=i?.windowId)!==null\u0026\u0026n!==void 0?n:\"\",sessionStartTimestamp:(o=i?.sessionStartTimestamp)!==null\u0026\u0026o!==void 0?o:0}}catch{return{sessionId:\"\",windowId:\"\",sessionStartTimestamp:0}}}get canCapture(){return this.instance.is_capturing()}get projectToken(){return this.instance.config.token}add(t){return this.vu.add(t)}getExtension(t){return this.vu.getExtension(t)}capture(t,e,n){n?this.instance.capture(t,e,{timestamp:n.timestamp,uuid:n.uuid,$set:n.set,$set_once:n.setOnce}):this.instance.capture(t,e)}registerDynamicEventProperties(t){return Tge(this.instance.fu(t))}handleRemoteConfig(t){this.To||(this.hu=t,this.instance.du.emit(wGt,t))}sendRequest(t){var e=this;return Zu(function*(n,o={}){var i;const r=e.instance.requestRouter.endpointFor((i=o.target)!==null\u0026\u0026i!==void 0?i:\"api\",n),s={method:o.method,url:o.query?iq(r,o.query):r,data:o.body,headers:o.headers,timeout:o.timeoutMs,fireCallbackOnDrop:!0,transport:o.transport,compression:o.compression,compressionFallback:o.target===\"flags\"\u0026\u0026o.compression===\"best-available\"?wDe.Base64:void 0,timestampMode:o.sentAt};return o.transport===\"sendBeacon\"?(e.instance._send_request(s),{statusCode:202}):new Promise(a=\u003e{s.callback=a,e.instance._send_request(s)})}).apply(this,arguments)}dispose(){this.To||(this.To=!0,this.vu.dispose())}};const rq={};let WNe=0;const sq=()=\u003e{},PGt='Consent opt in/out is not valid with cookieless_mode=\"always\" and will be ignored',lG=\"Surveys module not available\",MGt=\"sanitize_properties is deprecated. Use before_send instead\",DGt=\"Invalid value for property_denylist config: \",ZGo=[\"$recording_status\",\"$sdk_debug_recording_script_not_loaded\",\"$sdk_debug_replay_url_trigger_status\",\"$sdk_debug_replay_event_trigger_status\",\"$sdk_debug_replay_linked_flag_trigger_status\",\"$sdk_debug_replay_rrweb_error\",\"$sdk_debug_replay_internal_buffer_length\",\"$sdk_debug_replay_flushed_size\"],eYo=[\"$feature_flag_called\",\"$heatmap\",\"$snapshot\"],NGt=t=\u003et.charAt(0)===\"$\"\u0026\u0026!as(eYo,t),tYo=/^[A-Za-z0-9_-]{1,400}$/,RGt=/^fb\\.[0-9]+\\.[0-9]+\\.[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)?$/,TGt=/^fb\\.[0-9]+\\.[0-9]+\\.[0-9]+$/,nYo=[\"token\",\"distinct_id\",JHt],aq=\"posthog\",oYo=t=\u003e{const e={};return t\u0026\u0026t!==\"unset\"\u0026\u0026(\"2025-11-30\"\u003et||(e.strictMinimumDuration=!0),\"2026-05-30\"\u003et||(e.canvasCapture={resolutionScale:.6}),\"2026-06-25\"\u003et||(e.streamNetworkBody=!0),\"2026-08-30\"\u003et||(e.captureJsonLd=!0)),e},jNe=t=\u003e{var e;return sn({api_host:\"https://us.i.posthog.com\",flags_api_host:null,ui_host:null,asset_host:null,token:\"\",autocapture:!0,cross_subdomain_cookie:eGo(No?.location),persistence:\"localStorage+cookie\",persistence_name:\"\",cookie_persisted_properties:[],loaded:sq,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:\"if_capture_pageview\",defaults:t??\"unset\",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:fd\u0026\u0026rA(fd?.search)\u0026\u0026fd.search.indexOf(\"__posthog_debug=true\")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,reuseAnonymousId:!1,disable_external_dependency_loading:!1,strict_script_versioning:\"fallback\",enable_recording_console_log:void 0,secure_cookie:(Fn==null||(e=Fn.location)===null||e===void 0?void 0:e.protocol)===\"https:\",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:\"localStorage\",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,feature_flag_request_max_retries:1,surveys_request_timeout_ms:1e4,on_request_error(n){ui.error(\"Bad HTTP status: \"+n.statusCode+\" \"+n.text)},get_device_id:n=\u003en,capture_performance:void 0,name:\"posthog\",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:oOt,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:sq},(n=\u003e({rageclick:n\u0026\u0026n\u003e=\"2026-05-30\"?{content_ignorelist:AGo,ignore_text_selection:!0}:!n||\"2025-11-30\"\u003en||{content_ignorelist:!0},capture_pageview:!n||\"2025-05-24\"\u003en||\"history_change\",session_recording:oYo(n),external_scripts_inject_target:n\u0026\u0026n\u003e=\"2026-01-30\"?\"head\":\"body\",internal_or_test_user_hostname:n\u0026\u0026n\u003e=\"2026-01-30\"?/^(localhost|127\\.0\\.0\\.1)$/:void 0,persistence_save_debounce_ms:n\u0026\u0026n\u003e=\"2026-05-30\"?250:0,split_storage:!(!n||\"2026-05-30\"\u003en),detect_google_search_app:!(!n||\"2026-05-30\"\u003en),disable_capture_url_hashes:!(!n||\"2026-06-25\"\u003en),cookieWinsOnConflict:!(!n||n===\"unset\"||\"2026-08-29\"\u003en)}))(t))},iYo=[[\"process_person\",\"person_profiles\"],[\"xhr_headers\",\"request_headers\"],[\"cookie_name\",\"persistence_name\"],[\"disable_cookie\",\"disable_persistence\"],[\"__preview_disable_beacon\",\"disable_beacon\"],[\"store_google\",\"save_campaign_params\"],[\"verbose\",\"debug\"],[\"__preview_cookie_wins_on_conflict\",\"cookieWinsOnConflict\"]],kGt=t=\u003e{const e={};for(const[i,r]of iYo)Eo(t[i])||(e[r]=t[i]);const n=eg({},e,t),o=t.__preview_external_dependency_versioned_paths;return Eo(o)||(Eo(t.strict_script_versioning)\u0026\u0026(n.strict_script_versioning=!!o),rA(o)\u0026\u0026Eo(t.asset_host)\u0026\u0026(n.asset_host=o)),As(t.property_blacklist)\u0026\u0026(Eo(t.property_denylist)?n.property_denylist=t.property_blacklist:As(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:ui.error(DGt+t.property_denylist)),n};var rYo=class{constructor(){this.__forceAllowLocalhost=!1}get pu(){return this.__forceAllowLocalhost}set pu(t){ui.error(\"WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`\"),this.__forceAllowLocalhost=t}},Aq=class KM{gu(e){if(!e)return;const n=this.lu.indexOf(e);n!==-1\u0026\u0026this.lu.splice(n,1)}mu(e,n){var o;return this.gu(e),this.lu.push(n),(o=n.initialize)===null||o===void 0||o.call(n),n}yu(){return this.config.cookieless_mode===\"always\"||this.config.cookieless_mode===\"on_reject\"\u0026\u0026this.consent.isRejected()}bu(){if(this._u||this.config.reuseAnonymousId||this.config.segment||this.yu())return;const e=this.config.persistence===\"memory\"||this.config.persistence===\"sessionStorage\";if(!e\u0026\u0026!this.config.disable_persistence||this.wu)return;let n,o,i;e?(n=`persistence is set to '${this.config.persistence}'`,o=this.config.persistence===\"memory\"?\"on every page load\":\"for every new browser tab or window\",i=\"Either set persistence to 'localStorage+cookie', keep this persistence and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId.\"):(n=\"persistence is disabled (disable_persistence is true)\",o=\"on every page load\",i=\"Either set disable_persistence to false, keep persistence disabled and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId.\"),this._u=!0,console.warn(\"[PostHog.js]\",`${n} but no bootstrap.distinctID was provided. PostHog will mint a new distinct ID ${o}, so calling identify() merges a new ID onto the person each time. A person can then pass the distinct-ID limit and its events stop appearing on person pages and the session tab. ${i}`)}ku(){const e=this.persistence;if(!e||this.Su)return;if(this.yu())return void(this.config.cookieless_mode===\"on_reject\"\u0026\u0026this.get_distinct_id()!==\"$posthog_cookieless\"\u0026\u0026(this.xu(),this.$u()));if(this.get_distinct_id()!==\"$posthog_cookieless\")return;this.Cu()||e.load(!0);const n=this.get_distinct_id();if(!n||n===\"$posthog_cookieless\"){const o=this.config.get_device_id(kB());this.register({distinct_id:o,$device_id:o}),e.set_property(qy,Ub)}this.xu()}get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)===null||n===void 0?void 0:n.hasLoadedFlags)!==null\u0026\u0026e!==void 0\u0026\u0026e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)===null||n===void 0?void 0:n.hasLoadedFlags)!==null\u0026\u0026e!==void 0\u0026\u0026e}constructor(){var e;this.Tu=!1,this.Iu=!1,this.webPerformance=new rYo,this.Mu=!1,this.version=n_.LIB_VERSION,this.Eu=new Set,this.Pu=\"\",this.du=new Lge,this.lu=[],this.Ru=[],this.Au=!1,this.wu=!1,this._u=!1,this.Su=!1,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=jNe(),this.SentryIntegration=mGo,this.sentryIntegration=o=\u003e(function(i,r){const s=ROt(i,r);return{name:NOt,processEvent:a=\u003es(a)}})(this,o),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint=\"/e/\",this.Ou=!1,this.Fu=null,this.Du=null,this.Lu=null,this.scrollManager=new HGo(this),this.pageViewManager=new TOt(this),this.rateLimiter=new SGo(this),this.requestRouter=new KGo(this),this.consent=new aGo(this),this.externalIntegrations=new jGo(this);const n=(e=KM.__defaultExtensionClasses)!==null\u0026\u0026e!==void 0?e:{};this.featureFlags=n.featureFlags\u0026\u0026new n.featureFlags(this),this.toolbar=n.toolbar\u0026\u0026new n.toolbar(this),this.surveys=n.surveys\u0026\u0026new n.surveys(this),this.conversations=n.conversations\u0026\u0026new n.conversations(this),this.logs=n.logs\u0026\u0026new n.logs(this),this.metrics=n.metrics\u0026\u0026new n.metrics(this),this.experiments=n.experiments\u0026\u0026new n.experiments(this),this.exceptions=n.exceptions\u0026\u0026new n.exceptions(this),this.people={set:(o,i,r)=\u003e{const s=rA(o)?{[o]:i}:o;this.setPersonProperties(s),r?.({})},set_once:(o,i,r)=\u003e{const s=rA(o)?{[o]:i}:o;this.setPersonProperties(void 0,s),r?.({})}},this.on(\"eventCaptured\",o=\u003eui.info(`send \"${o?.event}\"`,o))}init(e,n,o){if(o\u0026\u0026o!==aq){var i;const r=(i=rq[o])!==null\u0026\u0026i!==void 0?i:new KM;return r._init(e,n,o),rq[o]=r,rq[aq][o]=r,r}return this._init(e,n,o)}_init(e,n={},o){var i,r,s;const a=rA(e)?e.trim():\"\";if(!a)return ui.critical(\"PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()\"),this;var A;if(this.__loaded)return a!==((A=this.config)===null||A===void 0?void 0:A.token)?console.warn(\"[PostHog.js]\",`You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('${a}', { ... }, 'project2')`):console.warn(\"[PostHog.js]\",\"You have already initialized PostHog! Re-initializing is a no-op\"),this;this.__loaded=!0,this.config=jNe(n.defaults),n.debug=this.Nu(n.debug),this.qu=n,this.ju=[],n.person_profiles?this.Du=n.person_profiles:n.process_person\u0026\u0026(this.Du=n.process_person);const c=jNe(n.defaults),l=kGt(n),u=eg({},c,l,{name:o,token:a});QA(c.rageclick)\u0026\u0026QA(l.rageclick)\u0026\u0026(u.rageclick=eg({},c.rageclick,l.rageclick)),QA(c.session_recording)\u0026\u0026QA(l.session_recording)\u0026\u0026(u.session_recording=eg({},c.session_recording,l.session_recording)),this.set_config(u),this.config.on_xhr_error\u0026\u0026ui.error(\"on_xhr_error is deprecated. Use on_request_error instead\"),this.compression=n.disable_compression?void 0:gE.GZipJS;const g=this.Cu(),h=!this.yu();if(this.persistence=new DNe(this.config,g,!0,h),this.sessionPersistence=this.config.persistence===\"sessionStorage\"||this.config.persistence===\"memory\"?this.persistence:new DNe(sn(sn({},this.config),{},{persistence:\"sessionStorage\"}),g,!1,h),this.Pu=\"ph_\"+(this.config.persistence_name||this.config.token)+\"_session_registered_properties\",this.config.persistence!==\"memory\"\u0026\u0026!g\u0026\u0026nu.Et()){const f=nu.Lt(this.Pu);As(f)\u0026\u0026f.forEach(I=\u003e{rA(I)\u0026\u0026this.Eu.add(I)})}else nu.Pt(this.Pu);const d=sn({},this.persistence.props),p=sn({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Bu=new kGo((f,I)=\u003ethis.Hu(f,I),this.config.request_queue_config),this.zu=new LGo(this),this.__request_queue=[];const m=this.yu();m||(this.sessionManager=new yGt(this),this.sessionPropsManager=new IGt(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId((f,I,C)=\u003e{(C?.activityTimeout||C?.sessionPastMaximumLength||C?.crossTabAdoption)\u0026\u0026this.Uu()})),this.Wu(),this.config.__preview_deferred_init_extensions?(ui.info(\"Deferring extension initialization to improve startup performance\"),setTimeout(()=\u003e{this.Vu(m)},0)):(ui.info(\"Initializing extensions synchronously\"),this.Vu(m)),n_.DEBUG=n_.DEBUG||this.config.debug,n_.DEBUG\u0026\u0026ui.info(\"Starting in debug mode\",{this:this,config:n,thisC:sn({},this.config),p:d,s:p}),this.config.identity_distinct_id\u0026\u0026!(!((i=n.bootstrap)===null||i===void 0)\u0026\u0026i.distinctID)\u0026\u0026(n.bootstrap=sn(sn({},n.bootstrap),{},{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}));const _=(r=n.bootstrap)===null||r===void 0?void 0:r.distinctID;if(this.wu=!!_\u0026\u0026!D$(_),(s=n.bootstrap)===null||s===void 0?void 0:s.distinctID){const f=n.bootstrap.distinctID,I=this.get_distinct_id(),C=this.persistence.get_property(qy);if(n.bootstrap.isIdentifiedID\u0026\u0026I!=null\u0026\u0026I!==f\u0026\u0026C===\"anonymous\")this.identify(f);else if(n.bootstrap.isIdentifiedID\u0026\u0026I!=null\u0026\u0026I!==f\u0026\u0026C===\"identified\")ui.warn(\"Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.\");else{const y=this.config.get_device_id(kB()),x=n.bootstrap.isIdentifiedID?y:f;this.persistence.set_property(qy,n.bootstrap.isIdentifiedID?Sge:Ub),this.register({distinct_id:f,$device_id:x})}}if(m)this.register_once({distinct_id:uNe,$device_id:null},\"\");else if(!this.get_distinct_id()){const f=this.config.get_device_id(kB());this.register_once({distinct_id:f,$device_id:f},\"\"),this.persistence.set_property(qy,Ub)}return el(Fn,\"onpagehide\"in self?\"pagehide\":\"unload\",this._handle_unload.bind(this),{passive:!1}),el(Fn,\"pageshow\",()=\u003e{var f;this.Tu=!1,this.Iu||(f=this.zu)===null||f===void 0||f.resume()}),n.segment?DOt(this,()=\u003ethis.Gu()):this.Gu(),nf(this.config._onCapture)\u0026\u0026this.config._onCapture!==sq\u0026\u0026(ui.warn(\"onCapture is deprecated. Please use `before_send` instead\"),this.on(\"eventCaptured\",f=\u003ethis.config._onCapture(f.event,f))),this.config.ip\u0026\u0026ui.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or \"Discard IP data\" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return EGt.apply(this,arguments)})().then(f=\u003e{f\u0026\u0026this.register({[ZDe]:f})}).catch(sq),this}Qu(e){const n=e;return rA(n.name)\u0026\u0026nf(n.setup)}Ju(e,n){this.Qu(e)?n.push(()=\u003e{this.Zu().add(e).catch(()=\u003e{var o;return(o=e.dispose)===null||o===void 0?void 0:o.call(e)}).catch(o=\u003e{ui.error(`Failed to dispose browser extension \"${e.name}\"`,o)})}):this.lu.push(e)}Wu(){var e,n,o;const i=(e=(n=this.config.__extensionClasses)===null||n===void 0?void 0:n.featureFlags)!==null\u0026\u0026e!==void 0?e:(o=KM.__defaultExtensionClasses)===null||o===void 0?void 0:o.featureFlags;var r,s,a;i\u0026\u0026(this.featureFlags\u0026\u0026this.featureFlags instanceof i||((r=this.Ku)===null||r===void 0||r.call(this),this.Ku=void 0,this.featureFlags=new i(this)),nf(this.featureFlags.onReloading)\u0026\u0026nf(this.featureFlags.setup)?this.Ku||(this.Ku=this.featureFlags.onReloading(()=\u003e{this.du.emit(\"featureFlagsReloading\",!0)}),this.Zu().add(this.featureFlags)):(s=(a=this.featureFlags).initialize)===null||s===void 0||s.call(a))}Vu(e){const n=performance.now(),o=sn(sn({},KM.__defaultExtensionClasses),this.config.__extensionClasses),i=[];var r,s,a,A,c,l,u;o.exceptions\u0026\u0026this.lu.push(this.exceptions=(r=this.exceptions)!==null\u0026\u0026r!==void 0?r:new o.exceptions(this)),o.historyAutocapture\u0026\u0026this.lu.push(this.historyAutocapture=new o.historyAutocapture(this)),o.tracingHeaders\u0026\u0026this.lu.push(this.tracingHeaders=new o.tracingHeaders(this)),o.siteApps\u0026\u0026this.lu.push(this.siteApps=new o.siteApps(this)),o.sessionRecording\u0026\u0026!e\u0026\u0026this.lu.push(this.sessionRecording=new o.sessionRecording(this)),this.config.disable_scroll_properties||i.push(()=\u003e{this.scrollManager.startMeasuringScrollPosition()}),o.autocapture\u0026\u0026this.Ju(this.autocapture=new o.autocapture(this),i),o.surveys\u0026\u0026this.Ju(this.surveys=(s=this.surveys)!==null\u0026\u0026s!==void 0?s:new o.surveys(this),i),o.logs\u0026\u0026this.Ju(this.logs=(a=this.logs)!==null\u0026\u0026a!==void 0?a:new o.logs(this),i),o.metrics\u0026\u0026this.lu.push(this.metrics=(A=this.metrics)!==null\u0026\u0026A!==void 0?A:new o.metrics(this)),o.conversations\u0026\u0026this.lu.push(this.conversations=(c=this.conversations)!==null\u0026\u0026c!==void 0?c:new o.conversations(this)),o.productTours\u0026\u0026this.lu.push(this.productTours=new o.productTours(this)),o.heatmaps\u0026\u0026this.lu.push(this.heatmaps=new o.heatmaps(this)),o.webVitalsAutocapture\u0026\u0026this.lu.push(this.webVitalsAutocapture=new o.webVitalsAutocapture(this)),o.exceptionObserver\u0026\u0026this.lu.push(this.exceptionObserver=new o.exceptionObserver(this)),o.deadClicksAutocapture\u0026\u0026this.lu.push(this.deadClicksAutocapture=new o.deadClicksAutocapture(this,pGo)),o.toolbar\u0026\u0026this.lu.push(this.toolbar=(l=this.toolbar)!==null\u0026\u0026l!==void 0?l:new o.toolbar(this)),o.experiments\u0026\u0026this.lu.push(this.experiments=(u=this.experiments)!==null\u0026\u0026u!==void 0?u:new o.experiments(this)),this.lu.forEach(g=\u003e{g.initialize\u0026\u0026i.push(()=\u003e{var h;(h=g.initialize)===null||h===void 0||h.call(g)})}),i.push(()=\u003e{if(this.Xu){const g=this.Xu;this.Xu=void 0,this.lu.forEach(h=\u003e{var d;return(d=h.onRemoteConfig)===null||d===void 0?void 0:d.call(h,g)})}}),this.Yu(i,n)}Yu(e,n){for(;e.length\u003e0;){if(this.config.__preview_deferred_init_extensions\u0026\u0026performance.now()-n\u003e=30\u0026\u0026e.length\u003e0)return void setTimeout(()=\u003e{this.Yu(e,n)},0);const i=e.shift();if(i)try{i()}catch(r){ui.error(\"Error initializing extension:\",r)}}const o=Math.round(performance.now()-n);this.register_for_session({[WHt]:this.config.__preview_deferred_init_extensions?\"deferred\":\"synchronous\",[jHt]:o}),this.config.__preview_deferred_init_extensions\u0026\u0026ui.info(`PostHog extensions initialized (${o}ms)`)}el(e){var n;if(!No||!No.body)return ui.info(\"document not ready yet, trying again in 500 milliseconds...\"),void setTimeout(()=\u003e{this.el(e)},500);if(this.config.__preview_deferred_init_extensions\u0026\u0026(this.Xu=e),this.cu=e,this.compression=void 0,e.ok){var o;const i=e.config;i.supportedCompression\u0026\u0026!this.config.disable_compression\u0026\u0026(this.compression=as(i.supportedCompression,gE.GZipJS)?gE.GZipJS:as(i.supportedCompression,gE.Base64)?gE.Base64:void 0),!((o=i.analytics)===null||o===void 0)\u0026\u0026o.endpoint\u0026\u0026(this.analyticsDefaultEndpoint=i.analytics.endpoint)}this.set_config({person_profiles:this.Du?this.Du:oOt}),(n=this.th)===null||n===void 0||n.handleRemoteConfig(e),this.lu.forEach(i=\u003e{var r;return(r=i.onRemoteConfig)===null||r===void 0?void 0:r.call(i,e)})}Gu(){try{this.config.loaded(this)}catch(e){ui.critical(\"`loaded` function failed\",e)}if(this.eh(),this.config.internal_or_test_user_hostname\u0026\u0026fd?.hostname){const e=fd.hostname,n=this.config.internal_or_test_user_hostname;(typeof n==\"string\"?e===n:n.test(e))\u0026\u0026this.setInternalOrTestUser()}this.config.capture_pageview\u0026\u0026setTimeout(()=\u003e{(this.consent.isOptedIn()||this.yu())\u0026\u0026this.ih()},1),this.nh=new qOt(this),this.nh.load()}eh(){var e;this.is_capturing()\u0026\u0026this.config.request_batching\u0026\u0026((e=this.Bu)===null||e===void 0||e.enable())}_dom_loaded(){this.is_capturing()\u0026\u0026XO(this.__request_queue,e=\u003ethis.Hu(e)),this.__request_queue=[],this.eh()}_handle_unload(){var e,n,o,i,r,s;this.Tu=!0,(e=this.surveys)===null||e===void 0||(n=e.handlePageUnload)===null||n===void 0||n.call(e),(o=this.metrics)===null||o===void 0||o.flush(\"sendBeacon\"),this.config.request_batching?(this.sh()\u0026\u0026this.capture(iOt),(i=this.logs)===null||i===void 0||i.flushLogs(\"sendBeacon\"),(r=this.Bu)===null||r===void 0||r.unload(),(s=this.zu)===null||s===void 0||s.unload()):this.sh()\u0026\u0026this.capture(iOt,null,{transport:\"sendBeacon\"})}_send_request(e){fGt(this,e)}Hu(e,n){this.zu?this.zu.retriableRequest(e,n):this._send_request(n?sn(sn({},e),{},{transport:n}):e)}_execute_array(e){WNe++;try{let n;const o=[],i=[],r=[];XO(e,a=\u003e{if(a)if(n=a[0],As(n))r.push(a);else if(nf(a))try{a.call(this)}catch(A){ui.error(\"Error executing queued PostHog call\",a,A)}else As(a)\u0026\u0026n===\"alias\"?o.push(a):As(a)\u0026\u0026n.indexOf(\"capture\")!==-1\u0026\u0026nf(this[n])?r.push(a):i.push(a)});const s=function(a,A){XO(a,function(c){try{if(As(c[0])){let l=A;kl(c,function(u){l=l[u[0]].apply(l,u.slice(1))})}else A[c[0]].apply(A,c.slice(1))}catch(l){ui.error(\"Error executing queued PostHog call\",c,l)}})};s(o,this),s(i,this),s(r,this)}finally{WNe--}}push(e){if(WNe\u003e0\u0026\u0026As(e)\u0026\u0026rA(e[0])){const n=KM.prototype[e[0]];return void(nf(n)\u0026\u0026n.apply(this,e.slice(1)))}this._execute_array([e])}get rh(){return{property:RHt,persistenceKey:jO,cookieName:\"_fbc\",pattern:RGt,register:(e,n)=\u003e{var o;return(o=this.persistence)===null||o===void 0?void 0:o.register({[jO]:{value:e,delivered:n}})},unregister:()=\u003e{var e;return(e=this.persistence)===null||e===void 0?void 0:e.unregister(jO)}}}get oh(){return{property:THt,persistenceKey:F$,cookieName:\"_fbp\",pattern:TGt,register:(e,n)=\u003e{var o;return(o=this.persistence)===null||o===void 0?void 0:o.register({[F$]:{value:e,delivered:n}})},unregister:()=\u003e{var e;return(e=this.persistence)===null||e===void 0?void 0:e.unregister(F$)}}}ah(e){var n;const o=(n=this.persistence)===null||n===void 0?void 0:n.get_property(e.persistenceKey);return rA(o)\u0026\u0026e.pattern.test(o)?{value:o,delivered:!1}:QA(o)\u0026\u0026rA(o.value)\u0026\u0026e.pattern.test(o.value)?{value:o.value,delivered:o.delivered===!0}:void 0}uh(e,n,o){return n===o?.value?{value:n,pending:!o.delivered}:(e.register(n,!1),{value:n,pending:!0})}hh(e){if(!this.config.save_campaign_params||this.yu())return;const n=K$(e.cookieName);return rA(n)\u0026\u0026e.pattern.test(n)?n:void 0}dh(e,n,o,i){if(!this.persistence)return;const r=this.rh;this.persistence.refreshKey(r.persistenceKey);const s=this.ah(r);if(i)return void r.unregister();if(o)return rA(n)\u0026\u0026RGt.test(n)?this.uh(r,n,s):void r.unregister();const a=rA(e)\u0026\u0026tYo.test(e)?e:void 0,A=this.hh(r);return A\u0026\u0026((c,l,u)=\u003e{const g=c.split(\".\");if(l)return g[3]===l;if(!u)return!0;const h=u.value.split(\".\");return g[3]===h[3]||Number(g[2])\u003eNumber(h[2])})(A,a,s)?this.uh(r,A,s):a?s?.value.split(\".\")[3]===a?{value:s.value,pending:!s.delivered}:this.uh(r,`fb.1.${Date.now()}.${a}`,s):s?{value:s.value,pending:!s.delivered}:void 0}fh(e,n,o){if(!this.persistence)return;const i=this.oh;this.persistence.refreshKey(i.persistenceKey);const r=this.ah(i);if(o)return void i.unregister();if(n)return rA(e)\u0026\u0026TGt.test(e)?this.uh(i,e,r):void i.unregister();const s=this.hh(i);return s?this.uh(i,s,r):r?{value:r.value,pending:!r.delivered}:void 0}ph(e,n){if(!this.persistence)return;this.persistence.refreshKey(e.persistenceKey);const o=this.ah(e);o?.value!==n||o.delivered||e.register(n,!0)}capture(e,n,o){var i,r;if(!(this.__loaded\u0026\u0026this.persistence\u0026\u0026this.sessionPersistence\u0026\u0026this.Bu))return void ui.uninitializedWarning(\"posthog.capture\");if(!this.is_capturing())return;if(Eo(e)||!rA(e))return void ui.error(\"No event name provided to posthog.capture\");if(this.ku(),e===\"$snapshot\"\u0026\u0026this.yu())return;const s=!this.config.opt_out_useragent_filter\u0026\u0026this._is_bot();if(s\u0026\u0026!this.config.__preview_capture_bot_pageviews)return;const a=o?.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(a?.isRateLimited)return void ui.critical(\"This capture call is ignored due to client rate limiting.\");let A;n?.$current_url\u0026\u0026!rA(n?.$current_url)\u0026\u0026(ui.error(\"Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value.\"),n==null||delete n.$current_url),e!==\"$exception\"||o?.gh||ui.warn(\"Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically.\"),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params\u0026\u0026(A=this.sessionPersistence.update_campaign_params()),this.config.save_referrer\u0026\u0026this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)\u0026\u0026this.persistence.set_initial_person_info();const c=new Date,l=o?.timestamp||c,u=ZLt(o?.uuid,kB);let g={uuid:u,event:e,properties:this.calculateEventProperties(e,n||{},l,u)};e===\"$pageview\"\u0026\u0026this.config.__preview_capture_bot_pageviews\u0026\u0026s\u0026\u0026(g.event=\"$bot_pageview\",g.properties.$browser_type=\"bot\"),a\u0026\u0026(g.properties.$lib_rate_limit_remaining_tokens=a.remainingTokens);const h=e===\"$feature_flag_called\"\u0026\u0026g.properties.$feature_flag_has_experiment===!1\u0026\u0026this.get_property(\"$minimal_flag_called_events\")===!0;o?.$set\u0026\u0026!h\u0026\u0026(g.$set=o?.$set);const d=QA(n?.$set)?n.$set:void 0,p=As(n?.$unset)?n.$unset:[],m=o?.$unset||[],_=R=\u003e{var F;const O=!!o?.$set\u0026\u0026R in o.$set;return{hasProvided:O||!!d\u0026\u0026R in d,provided:O?o==null||(F=o.$set)===null||F===void 0?void 0:F[R]:d?.[R],unset:p.indexOf(R)!==-1||m.indexOf(R)!==-1}},f=_(RHt),I=_(THt),C=[{channel:this.rh,hasProvided:f.hasProvided,update:this.dh(A?.fbclid,f.provided,f.hasProvided,f.unset)},{channel:this.oh,hasProvided:I.hasProvided,update:this.fh(I.provided,I.hasProvided,I.unset)}];for(const{channel:R,hasProvided:F,update:O}of C)O\u0026\u0026g.properties.$process_person_profile===!0\u0026\u0026O.pending\u0026\u0026!F\u0026\u0026!h\u0026\u0026(g.$set=sn({[R.property]:O.value},g.$set));const y=o?.$unset;y\u0026\u0026(g.$unset=y);const x=h?void 0:this.mh(o?.$set_once,e!==sOt,e===rOt);if(x\u0026\u0026(g.$set_once=x),o?._noTruncate||(E=this.config.properties_string_max_length,g=(function(R,F){const O=new Set;return(function U(Y,W){if(Y!==Object(Y))return F?F(Y):Y;if(O.has(Y))return;let te;if(O.add(Y),As(Y))te=[],XO(Y,j=\u003e{te.push(U(j))});else{const j={};kl(zO(Y)?aOt(Y):Y,(J,oe)=\u003e{O.has(J)||(j[oe]=U(J))}),te=j}return te})(R)})(g,R=\u003erA(R)?R.slice(0,E):R)),g.timestamp=l,Eo(o?.timestamp)||(g.properties.$event_time_override_provided=!0,g.properties.$event_time_override_system_time=c),h\u0026\u0026(g.properties=((R,F=[])=\u003e{const O={},U=Y=\u003e{R[Y]!==void 0\u0026\u0026(O[Y]=R[Y])};return COo.forEach(U),F.forEach(U),O})(g.properties,nYo)),e===dE.DISMISSED||e===dE.SENT){const R=n?.[RNe.SURVEY_ID],F=n?.[RNe.SURVEY_ITERATION];vGt({id:R,current_iteration:F}),g.$set=sn(sn({},g.$set),{},{[GGo({id:R,current_iteration:F},e===dE.SENT?\"responded\":\"dismissed\")]:!0})}else e===dE.SHOWN\u0026\u0026(g.$set=sn(sn({},g.$set),{},{[RNe.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));var E;if(e===bGo.SHOWN){const R=n?.[jOt.TOUR_TYPE];R\u0026\u0026(g.$set=sn(sn({},g.$set),{},{[`${jOt.TOUR_LAST_SEEN_DATE}/${R}`]:new Date().toISOString()}))}const B=sn(sn({},g.properties.$set),g.$set);if(Rx(B)||this.setPersonPropertiesForFlags(B),!Hs(this.config.before_send)){const R=this.Fs(g);if(!R)return;g=R,g.uuid=ZLt(g.uuid,kB)}this.sessionRecording\u0026\u0026!this.Au\u0026\u0026NGt(e)\u0026\u0026(this.Au=!0,setTimeout(()=\u003ethis.Au=!1,3e4));const S=C.filter(({channel:R,update:F})=\u003e{var O,U,Y;const W=(O=(U=g.$set)===null||U===void 0?void 0:U[R.property])!==null\u0026\u0026O!==void 0?O:QA((Y=g.properties)===null||Y===void 0?void 0:Y.$set)?g.properties.$set[R.property]:void 0;return F?.pending\u0026\u0026W===F.value});this.du.emit(\"eventCaptured\",g);const Q=(i=o?._url)!==null\u0026\u0026i!==void 0?i:this.requestRouter.endpointFor(\"api\",this.analyticsDefaultEndpoint),w=o?._batchKey===\"recordings\"||/\\/s\\/(?:\\?|$)/.test(Q),M=sn(sn(sn({method:\"POST\",url:Q,data:g,compression:\"best-available\",preferSyncCompression:o?.send_instantly,timestampMode:w?\"body\":\"capture-body\",batchKey:o?._batchKey},w\u0026\u0026(!((r=g.properties)===null||r===void 0)\u0026\u0026r.$session_id)?{batchGroup:g.properties.$session_id+(g.properties.$window_id?`-${g.properties.$window_id}`:\"\")}:{}),o?.transport?{transport:o.transport}:{}),S.length?{fireCallbackOnDrop:!0,callback:R=\u003e{if(R.statusCode\u003e=200\u0026\u0026300\u003eR.statusCode)for(const{channel:F,update:O}of S)this.ph(F,O.value)}}:{});if(!this.config.request_batching||o\u0026\u0026!o?._batchKey||o?.send_instantly||S.length){var k;let R;!M.transport\u0026\u0026!M.callback\u0026\u0026Rx((k=this.config.request_headers)!==null\u0026\u0026k!==void 0?k:{})\u0026\u0026this.Tu\u0026\u0026(R=\"sendBeacon\"),this.Hu(M,R)}else this.Bu.enqueue(M);return g}_addCaptureHook(e){return this.on(\"eventCaptured\",n=\u003ee(n.event,n))}getExtension(e){var n;return(n=this.th)===null||n===void 0?void 0:n.getExtension(e)}Zu(){var e;return(e=this.th)!==null\u0026\u0026e!==void 0?e:this.th=new XGo(this)}fu(e){this.Ru.push(e);let n=!0;return()=\u003e{if(!n)return;n=!1;const o=this.Ru.indexOf(e);o!==-1\u0026\u0026this.Ru.splice(o,1)}}yh(e=!0){var n,o,i;return!!(!((n=this.persistence)===null||n===void 0)\u0026\u0026n.consumeCookieIdentityChange())\u0026\u0026(this.Lu=null,this.persistence.get_property(\"$user_state\")===\"anonymous\"\u0026\u0026((i=this.sessionPersistence)===null||i===void 0||i.clear(),this.Eu.clear(),this.bh()),(o=this.featureFlags)===null||o===void 0||o.reset(),e\u0026\u0026this.reloadFeatureFlags(),!0)}calculateEventProperties(e,n,o,i,r){if(o=o||new Date,!this.persistence||!this.sessionPersistence)return n;this.ku(),this.persistence.syncCookieProperties(),this.yh();const s=r?void 0:this.persistence.remove_event_timer(e);let a=sn({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,this.yu()\u0026\u0026(a[JHt]=!0),e===\"$snapshot\"){const f=sn(sn({},this.persistence.properties()),this.sessionPersistence.properties());return a.distinct_id=f.distinct_id,(!rA(a.distinct_id)\u0026\u0026!Ah(a.distinct_id)||D$(a.distinct_id))\u0026\u0026ui.error(\"Invalid distinct_id for replay event. This indicates a bug in your implementation\"),a}const A=(function(f,I,C,y=!1){var x,E,B,S;if(!jy)return{};const Q=f?[...rG,...I||[]]:[],[w,M]=WLt(jy),[k,R]=(function(ie){for(let ne=0;$Lt.length\u003ene;ne++){const[le,ge,_e]=$Lt[ne],ue=ie.match(le);if(ue){const fe=_e\u0026\u0026ie.match(_e)||ue;return[ge,fe?.[1]||\"\"]}}return[\"\",\"\"]})(jy),F=(function(){const ie=\"u\"\u003etypeof navigator?navigator:void 0;return ie?.brave?{brave:!0}:{}})(),O={};Eo(C)||(O.detectGoogleSearchApp=C);const U={},Y=(x=navigator)===null||x===void 0||(x=x.userAgentData)===null||x===void 0?void 0:x.platform,W=(E=navigator)===null||E===void 0?void 0:E.maxTouchPoints,te=Fn==null||(B=Fn.screen)===null||B===void 0?void 0:B.width,j=Fn==null||(S=Fn.screen)===null||S===void 0?void 0:S.height,J=Fn?.devicePixelRatio;Eo(Y)||(U.userAgentDataPlatform=Y),Eo(W)||(U.maxTouchPoints=W),Eo(te)||(U.screenWidth=te),Eo(j)||(U.screenHeight=j),Eo(J)||(U.devicePixelRatio=J);const oe=eg(mNe({$os:w,$os_version:M,$browser:zLt(jy,navigator.vendor,F,O),$webview_app:k,$webview_app_version:R,$device:jLt(jy),$device_type:YHo(jy,U),$timezone:VOt(),$timezone_offset:xGo()}),{$current_url:X$(y?Mw(fd?.href):fd?.href,Q,Z$),$host:fd?.host,$pathname:fd?.pathname,$raw_user_agent:jy.length\u003e1e3?jy.substring(0,997)+\"...\":jy,$browser_version:GHo(jy,navigator.vendor,F,O),$browser_language:GOt(),$browser_language_prefix:yGo(),$screen_height:Fn?.screen.height,$screen_width:Fn?.screen.width,$viewport_height:Fn?.innerHeight,$viewport_width:Fn?.innerWidth,$lib:Ob.LIB_NAME,$lib_version:Ob.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return Ob.SDK_DIST_CHANNEL\u0026\u0026(oe.$sdk_dist_channel=Ob.SDK_DIST_CHANNEL),oe})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){const{sessionId:f,windowId:I}=this.sessionManager.checkAndGetSessionAndWindowId(r,o.getTime(),!0);a.$session_id=f,a.$window_id=I}this.sessionPropsManager\u0026\u0026eg(a,this.sessionPropsManager.getSessionProps());try{var c;if(this.sessionRecording){const f=this.sessionRecording.sdkDebugProperties,I=!this.Au\u0026\u0026NGt(e);for(const C in f)(I||as(ZGo,C))\u0026\u0026(a[C]=f[C])}a.$sdk_debug_retry_queue_size=(c=this.zu)===null||c===void 0?void 0:c.length}catch(f){a.$sdk_debug_error_capturing_properties=String(f)}let l;if(this.requestRouter.region===JNe\u0026\u0026(a.$lib_custom_api_host=this.config.api_host),l=e!==\"$pageview\"||r?e!==\"$pageleave\"||r?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(o):this.pageViewManager.doPageView(o,i),a=eg(a,l),e===\"$pageview\"\u0026\u0026No\u0026\u0026(a.title=No.title),!Eo(s)){const f=o.getTime()-s;a.$duration=parseFloat((f/1e3).toFixed(3))}jy\u0026\u0026this.config.opt_out_useragent_filter\u0026\u0026(a.$browser_type=this._is_bot()?\"bot\":\"browser\");const u=this.persistence.properties(),g=this.sessionPersistence.properties(),h=a.$groups,d=u.$groups;QA(h)\u0026\u0026!Rx(h)\u0026\u0026(a.$groups=sn(sn({},QA(d)?d:{}),h)),kl([\"$referrer\",\"$referring_domain\"],f=\u003e{f in u\u0026\u0026delete g[f]});const p={};if(this.Ru.length\u003e0)for(const f of this.Ru.slice())try{eg(p,f())}catch(I){ui.error(\"Failed to produce browser extension event properties\",I)}a=eg({},A,u,g,sn(sn({},p),a)),a.$is_identified=this._isIdentified(),As(this.config.property_denylist)?kl(this.config.property_denylist,function(f){delete a[f]}):ui.error(DGt+this.config.property_denylist+\" or property_blacklist config: \"+this.config.property_blacklist);const m=this.config.sanitize_properties;m\u0026\u0026(ui.error(MGt),a=m(a,e));const _=this._h();return a.$process_person_profile=_,_\u0026\u0026!r\u0026\u0026this.wh(\"_calculate_event_properties\"),a}mh(e,n=!0,o=!1){var i;if(!this.persistence||!this._h()||this.Mu\u0026\u0026!o)return e;const r=this.persistence.get_initial_props(),s=(i=this.sessionPropsManager)===null||i===void 0?void 0:i.getSetOnceProps();let a=eg({},r,s||{},e||{});const A=this.config.sanitize_properties;return A\u0026\u0026(ui.error(MGt),a=A(a,\"$set_once\")),n\u0026\u0026(this.Mu=!0),Rx(a)?void 0:a}register(e,n){var o;(o=this.persistence)===null||o===void 0||o.register(e,n)}register_once(e,n,o){var i;(i=this.persistence)===null||i===void 0||i.register_once(e,n,o)}register_for_session(e){var n,o;(n=this.persistence)===null||n===void 0||n.syncCookieProperties(),this.yh(),(o=this.sessionPersistence)===null||o===void 0||o.register(e),Object.keys(e).forEach(i=\u003ethis.Eu.add(i)),this.bh()}unregister(e){var n;(n=this.persistence)===null||n===void 0||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)===null||n===void 0||n.unregister(e),this.Eu.delete(e),this.bh()}kh(e,n){this.register({[e]:n})}Uu(){this.Eu.forEach(e=\u003e{var n;(n=this.sessionPersistence)===null||n===void 0||n.unregister(e)}),this.Eu.clear(),this.bh()}bh(){var e;if(!this.Pu)return;if(this.config.persistence===\"memory\"||!((e=this.sessionPersistence)===null||e===void 0)\u0026\u0026e.hi||!nu.Et())return void nu.Pt(this.Pu);const n=[];this.Eu.forEach(o=\u003en.push(o)),n.length\u003e0?nu.$t(this.Pu,n):nu.Pt(this.Pu)}getFeatureFlag(e,n){var o;return(o=this.featureFlags)===null||o===void 0?void 0:o.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)===null||n===void 0?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var o;return(o=this.featureFlags)===null||o===void 0?void 0:o.getFeatureFlagResult(e,n)}getAllFeatureFlags(){var e,n;return(e=(n=this.featureFlags)===null||n===void 0?void 0:n.getAllFeatureFlags())!==null\u0026\u0026e!==void 0?e:[]}isFeatureEnabled(e,n){var o,i;return(o=(i=this.featureFlags)===null||i===void 0?void 0:i.isFeatureEnabled(e,n))!==null\u0026\u0026o!==void 0?o:n?.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)===null||e===void 0||e.reloadFeatureFlags()}updateFlags(e,n,o){var i;(i=this.featureFlags)===null||i===void 0||i.updateFlags(e,n,o)}updateEarlyAccessFeatureEnrollment(e,n,o){var i;(i=this.featureFlags)===null||i===void 0||i.updateEarlyAccessFeatureEnrollment(e,n,o)}getEarlyAccessFeatures(e,n=!1,o){var i;return(i=this.featureFlags)===null||i===void 0?void 0:i.getEarlyAccessFeatures(e,n,o)}on(e,n){return this.du.on(e,n)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=\u003e{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:lG}),()=\u003e{})}onSessionId(e){var n,o;return(n=(o=this.sessionManager)===null||o===void 0?void 0:o.onSessionId(e))!==null\u0026\u0026n!==void 0?n:()=\u003e{}}getSurveys(e,n=!1){this.surveys?this.surveys.getSurveys(e,n):e([],{isLoaded:!1,error:lG})}getActiveMatchingSurveys(e,n=!1){this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:lG})}onActiveMatchingSurveysChanged(e){return this.surveys?this.surveys.onActiveMatchingSurveysChanged(e):(e([],{isLoaded:!1,error:lG}),()=\u003e{})}renderSurvey(e,n){var o;(o=this.surveys)===null||o===void 0||o.renderSurvey(e,n)}displaySurvey(e,n=zGo){var o;(o=this.surveys)===null||o===void 0||o.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)===null||n===void 0||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,o;return(n=(o=this.surveys)===null||o===void 0?void 0:o.canRenderSurvey(e))!==null\u0026\u0026n!==void 0?n:{visible:!1,disabledReason:lG}}canRenderSurveyAsync(e,n=!1){var o,i;return(o=(i=this.surveys)===null||i===void 0?void 0:i.canRenderSurveyAsync(e,n))!==null\u0026\u0026o!==void 0?o:Promise.resolve({visible:!1,disabledReason:lG})}Sh(e){return!e||D$(e)?(ui.critical(\"Unique user id has not been set in posthog.identify\"),!1):e===\"$posthog_cookieless\"?(ui.critical(`The string \"${e}\" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.`),!1):![\"distinct_id\",\"distinctid\"].includes(e.toLowerCase())\u0026\u0026![\"undefined\",\"null\"].includes(e.toLowerCase())||(ui.critical(`The string \"${e}\" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.`),!1)}identify(e,n,o){if(!this.__loaded||!this.persistence)return ui.uninitializedWarning(\"posthog.identify\");if(Ah(e)\u0026\u0026(e=e.toString(),ui.warn(\"The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.\")),!this.Sh(e)||!this.wh(\"posthog.identify\"))return;this.ku();const i=this.get_distinct_id(),r=this.persistence.syncCookieProperties()\u0026\u0026this.get_distinct_id()!==i,s=this.yh(!1),a=this.persistence.Fa();let A=!1;try{const l=this.get_distinct_id();this.register({$user_id:e}),this.get_property(\"$device_id\")||this.register_once({$had_persisted_distinct_id:!0,$device_id:l},\"\"),e!==l\u0026\u0026e!==this.get_property(\"__alias\")\u0026\u0026(this.unregister(Bge),this.register({distinct_id:e}));const u=(this.persistence.get_property(\"$user_state\")||\"anonymous\")===Ub,g=e!==l,h=!g\u0026\u0026u;if(g\u0026\u0026u){var c;const d=this.config.reuseAnonymousId?{distinct_id:e}:{distinct_id:e,$anon_distinct_id:l};this.persistence.set_property(qy,Sge),this.setPersonPropertiesForFlags({$set:n||{},$set_once:o||{}},!1),this.config.cookieWinsOnConflict\u0026\u0026this.persistence.Da(),this.capture(\"$identify\",d,{$set:n||{},$set_once:o||{}})\u0026\u0026(this.Lu=zNe(e,n,o)),(c=this.featureFlags)===null||c===void 0||c.setAnonymousDistinctId(this.config.reuseAnonymousId?void 0:l)}else if(h){this.persistence.set_property(qy,Sge);const d=n||{},p=o||{};this.setPersonPropertiesForFlags({$set:d,$set_once:p},!1),this.config.cookieWinsOnConflict\u0026\u0026this.persistence.Da(),this.capture(\"$set\",{$set:d,$set_once:p})\u0026\u0026(this.Lu=zNe(e,n,o))}else(n||o)\u0026\u0026this.setPersonProperties(n,o);g||r||s?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(Tw)):h\u0026\u0026(n||o)\u0026\u0026this.reloadFeatureFlags(),A=!0}finally{a\u0026\u0026this.persistence.qa(A)}}setPersonProperties(e,n){if(!e\u0026\u0026!n||!this.wh(\"posthog.setPersonProperties\"))return;const o=zNe(this.get_distinct_id(),e,n);this.Lu!==o?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture(\"$set\",{$set:e||{},$set_once:n||{}})\u0026\u0026(this.Lu=o)):ui.info(\"A duplicate setPersonProperties call was made with the same properties. It has been ignored.\")}unsetPersonProperties(e){var n;const o=(As(e)?e:[e]).filter(i=\u003erA(i)\u0026\u0026i.length\u003e0);o.length!==0\u0026\u0026this.wh(\"posthog.unsetPersonProperties\")\u0026\u0026((n=this.featureFlags)===null||n===void 0||n.unsetPersonPropertiesForFlags(o,!0),this.capture(\"$set\",{$unset:o}),this.Lu=null)}group(e,n,o){var i;if(!e||!n)return void ui.error(\"posthog.group requires a group type and group key\");(i=this.persistence)===null||i===void 0||i.syncCookieProperties(),this.yh();const r=this.getGroups(),s=r[e]!==n;if(s\u0026\u0026this.resetGroupPropertiesForFlags(e),this.register({$groups:sn(sn({},r),{},{[e]:n})}),(s||o)\u0026\u0026this._h()){const a={$group_type:e,$group_key:n};o\u0026\u0026(a.$group_set=o),this.capture(sOt,a)}o\u0026\u0026this.setGroupPropertiesForFlags({[e]:o}),s\u0026\u0026!o\u0026\u0026this.reloadFeatureFlags()}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n=!0){var o;(o=this.featureFlags)===null||o===void 0||o.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e=!0){var n;(n=this.featureFlags)===null||n===void 0||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n=!0){var o;this.wh(\"posthog.setGroupPropertiesForFlags\")\u0026\u0026((o=this.featureFlags)===null||o===void 0||o.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)===null||n===void 0||n.resetGroupPropertiesForFlags(e)}reset(e){const n=$y(e)?e:e?.resetDeviceID,o=$y(e)||e==null?void 0:e.bootstrap;this.xh(n,!1,o)}xh(e,n=!1,o){var i,r,s,a,A,c;if(ui.info(\"reset\"),!this.__loaded)return ui.uninitializedWarning(\"posthog.reset\");const l=o?.sessionID;this.config.bootstrap=o||((i=this.qu)===null||i===void 0?void 0:i.bootstrap)||{},(r=this.featureFlags)===null||r===void 0||(s=r.updateConfig)===null||s===void 0||s.call(r,this.config,this.il());const u=this.get_property(XDe),g=this.get_property(ZDe),h=this.get_property(L$);(a=this.sessionRecording)===null||a===void 0||a.flushBeforeIdentityReset();const d=this.is_capturing();n||this.consent.reset(),n||!d||this.is_capturing()||console.warn(\"[PostHog.js]\",\"reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.\");const p=(A=this.persistence)===null||A===void 0||(c=A.Fa)===null||c===void 0?void 0:c.call(A),m=this.Su;this.Su=m||n;let _=!1;try{var f,I,C,y,x,E,B,S,Q,w,M,k,R;if((f=this.persistence)===null||f===void 0||f.clear(),(I=this.sessionPersistence)===null||I===void 0||I.clear(),this.Eu.clear(),this.bh(),Eo(h)||(w=this.persistence)===null||w===void 0||w.register({$session_recording_remote_config:h}),(C=this.surveys)===null||C===void 0||C.reset(),(y=this.featureFlags)===null||y===void 0||y.reset(),(x=this.conversations)===null||x===void 0||x.reset(),(E=this.logs)===null||E===void 0||E.reset(),(B=this.metrics)===null||B===void 0||B.reset(),(S=this.persistence)===null||S===void 0||S.set_property(\"$user_state\",\"anonymous\"),(Q=this.sessionManager)===null||Q===void 0||Q.resetSessionId(),this.Lu=null,this.config.cookieless_mode===\"always\")this.register_once({distinct_id:uNe,$device_id:null},\"\");else{const U=this.config.get_device_id(kB());this.register_once({distinct_id:U,$device_id:e?U:u},\"\"),e||Eo(g)||this.register({[ZDe]:g})}if(this.register({$last_posthog_reset:new Date().toISOString()},1),o\u0026\u0026(o.distinctID\u0026\u0026!this.yu()\u0026\u0026((R=this.persistence)===null||R===void 0||R.set_property(\"$user_state\",o.isIdentifiedID?\"identified\":\"anonymous\"),this.register({distinct_id:o.distinctID})),(M=this.featureFlags)===null||M===void 0||M.initialize(),!Hs(l)\u0026\u0026!(!((k=this.sessionManager)===null||k===void 0)\u0026\u0026k.setBootstrapSessionId(l,!0)))){const U=sn({},o);delete U.sessionID,this.config.bootstrap=U}delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,_=!0}finally{var F,O;this.Su=m,p\u0026\u0026((F=this.persistence)===null||F===void 0||(O=F.qa)===null||O===void 0||O.call(F,_))}this.reloadFeatureFlags()}shutdown(e){var n=this;return Zu(function*(){var o,i,r,s,a,A,c,l;if(n.__loaded){n.Iu=!0,n.Zu().dispose(),(o=n.sessionRecording)===null||o===void 0||o.dispose(),(i=n.logs)===null||i===void 0||i.flushLogs(\"sendBeacon\"),(r=n.metrics)===null||r===void 0||r.flush(\"sendBeacon\"),(s=n.metrics)===null||s===void 0||s.dispose(),(a=n.Bu)===null||a===void 0||a.unload(),(A=n.zu)===null||A===void 0||A.unload();try{var u;(u=n.featureFlags)===null||u===void 0||u.destroy()}catch(g){ui.error(\"Error while destroying feature flags\",g)}(c=n.persistence)===null||c===void 0||c.destroy(),(l=n.sessionPersistence)===null||l===void 0||l.destroy()}else ui.uninitializedWarning(\"posthog.shutdown\")})()}setIdentity(e,n){var o;delete this.config.identity_claims,this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(o=this.conversations)===null||o===void 0||o.$h()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,(e=this.conversations)===null||e===void 0||e.Ch()}get_distinct_id(){return this.get_property(\"distinct_id\")}getGroups(){return this.get_property(\"$groups\")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)===null||n===void 0?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null\u0026\u0026e!==void 0?e:\"\"}get_session_replay_url(e){if(!this.sessionManager)return\"\";const{sessionId:n,sessionStartTimestamp:o}=this.sessionManager.checkAndGetSessionAndWindowId(!0);let i=this.requestRouter.endpointFor(\"ui\",`/project/${this.config.token}/replay/${n}`);if(e?.withTimestamp\u0026\u0026o){var r;const s=(r=e.timestampLookBack)!==null\u0026\u0026r!==void 0?r:10;if(!o)return i;i+=`?t=${Math.max(Math.floor((new Date().getTime()-o)/1e3)-s,0)}`}return i}alias(e,n){return e===this.get_property(\"$people_distinct_id\")?(ui.critical(\"Attempting to create alias for existing People user - aborting.\"),-2):this.wh(\"posthog.alias\")?(Eo(n)\u0026\u0026(n=this.get_distinct_id()),e!==n?(this.kh(Bge,e),this.capture(\"$create_alias\",{alias:e,distinct_id:n})):(ui.warn(\"alias matches current distinct_id - skipping api call.\"),this.identify(e),-1)):void 0}set_config(e){const n=sn({},this.config);if(QA(e)){var o,i,r,s,a,A,c,l,u,g,h,d,p;eg(this.config,kGt(e));const C=this.Cu();if(this.persistence){const x=this.config.persistence===\"sessionStorage\"||this.config.persistence===\"memory\";var m,_;if(x\u0026\u0026this.sessionPersistence!==this.persistence\u0026\u0026((m=this.sessionPersistence)===null||m===void 0||m.remove(),(_=this.sessionPersistence)===null||_===void 0||_.destroy()),this.persistence.update_config(this.config,n,C),x)this.sessionPersistence=this.persistence;else if(this.sessionPersistence===this.persistence)this.sessionPersistence=new DNe(sn(sn({},this.config),{},{persistence:\"sessionStorage\"}),C,!1);else{var f;(f=this.sessionPersistence)===null||f===void 0||f.update_config(sn(sn({},this.config),{},{persistence:\"sessionStorage\"}),sn(sn({},n),{},{persistence:\"sessionStorage\"}),C)}}const y=this.Nu(this.config.debug);var I;$y(y)\u0026\u0026(this.config.debug=y),$y(this.config.debug)\u0026\u0026(this.config.debug?(n_.DEBUG=!0,hc.Et()\u0026\u0026hc.$t(\"ph_debug\",!0),ui.info(\"set_config\",{config:e,oldConfig:n,newConfig:sn({},this.config)})):(n_.DEBUG=!1,hc.Et()\u0026\u0026hc.Pt(\"ph_debug\"))),(o=this.featureFlags)===null||o===void 0||(i=o.updateConfig)===null||i===void 0||i.call(o,this.config,this.il()),(r=this.exceptionObserver)===null||r===void 0||r.onConfigChange(),(s=this.exceptions)===null||s===void 0||s.onConfigChange(),(a=this.metrics)===null||a===void 0||a.onConfigChange(),(A=this.sessionRecording)===null||A===void 0||A.startIfEnabledOrStop(),(c=this.tracingHeaders)===null||c===void 0||c.startIfEnabledOrStop(),(l=this.autocapture)===null||l===void 0||l.startIfEnabled(),(u=this.heatmaps)===null||u===void 0||u.startIfEnabled(),(\"capture_pageview\"in e||\"disable_capture_url_hashes\"in e)\u0026\u0026((I=this.historyAutocapture)===null||I===void 0||I.startIfEnabledOrStop()),(g=this.exceptionObserver)===null||g===void 0||g.startIfEnabledOrStop(),(h=this.deadClicksAutocapture)===null||h===void 0||h.startIfEnabledOrStop(),(d=this.surveys)===null||d===void 0||d.loadIfEnabled(),this.xu(),(p=this.externalIntegrations)===null||p===void 0||p.startIfEnabledOrStop(),!n.segment\u0026\u0026this.config.segment\u0026\u0026this.persistence\u0026\u0026DOt(this,sq,!1)}}_overrideSDKInfo(e,n){n_.LIB_NAME=e,n_.LIB_VERSION=n}startSessionRecording(e){const n=e===!0,o={sampling:n||!!e?.sampling,linked_flag:n||!!e?.linked_flag,url_trigger:n||!!e?.url_trigger,event_trigger:n||!!e?.event_trigger};var i,r,s,a,A;Object.values(o).some(Boolean)\u0026\u0026((i=this.sessionManager)===null||i===void 0||i.checkAndGetSessionAndWindowId(),o.sampling\u0026\u0026((r=this.sessionRecording)===null||r===void 0||r.overrideSampling()),o.linked_flag\u0026\u0026((s=this.sessionRecording)===null||s===void 0||s.overrideLinkedFlag()),o.url_trigger\u0026\u0026((a=this.sessionRecording)===null||a===void 0||a.overrideTrigger(\"url\")),o.event_trigger\u0026\u0026((A=this.sessionRecording)===null||A===void 0||A.overrideTrigger(\"event\"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!!(!((e=this.sessionRecording)===null||e===void 0)\u0026\u0026e.started)}captureException(e,n){try{if(!this.exceptions)return;const o=this.exceptions.buildProperties(e,{handled:!0,syntheticException:new Error(\"PostHog syntheticException\")});return this.exceptions.sendExceptionEvent(sn(sn({},o),n))}catch{return}}addExceptionStep(e,n){var o;(o=this.exceptions)===null||o===void 0||o.addExceptionStep(e,n)}captureLog(e){var n;(n=this.logs)===null||n===void 0||n.captureLog(e)}get logger(){var e,n;return(e=(n=this.logs)===null||n===void 0?void 0:n.logger)!==null\u0026\u0026e!==void 0?e:KM.Th}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,o;return(n=(o=this.toolbar)===null||o===void 0?void 0:o.loadToolbar(e))!==null\u0026\u0026n!==void 0\u0026\u0026n}get_property(e){var n;return(n=this.persistence)===null||n===void 0?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)===null||n===void 0?void 0:n.props[e]}toString(){var e;let n=(e=this.config.name)!==null\u0026\u0026e!==void 0?e:aq;return n!==aq\u0026\u0026(n=\"posthog.\"+n),n}_isIdentified(){var e,n;return((e=this.persistence)===null||e===void 0?void 0:e.get_property(\"$user_state\"))===\"identified\"||((n=this.sessionPersistence)===null||n===void 0?void 0:n.get_property(\"$user_state\"))===\"identified\"}_h(){var e,n;return!(this.config.person_profiles===\"never\"||this.config.person_profiles===\"identified_only\"\u0026\u0026!this._isIdentified()\u0026\u0026Rx(this.getGroups())\u0026\u0026!(!((e=this.persistence)===null||e===void 0||(e=e.props)===null||e===void 0)\u0026\u0026e.__alias)\u0026\u0026!(!((n=this.persistence)===null||n===void 0||(n=n.props)===null||n===void 0)\u0026\u0026n.$epp))}sh(){return this.config.capture_pageleave===!0||this.config.capture_pageleave===\"if_capture_pageview\"\u0026\u0026!!this.config.capture_pageview}createPersonProfile(){this._h()||this.wh(\"posthog.createPersonProfile\")\u0026\u0026this.setPersonProperties({},{})}setInternalOrTestUser(){this.wh(\"posthog.setInternalOrTestUser\")\u0026\u0026this.setPersonProperties({$internal_or_test_user:!0})}wh(e){return this.config.person_profiles===\"never\"?(ui.error(e+' was called, but process_person is set to \"never\". This call will be ignored.'),!1):(this.bu(),this.kh(lNe,!0),!0)}Cu(){if(this.config.cookieless_mode===\"always\")return!0;const e=this.consent.isOptedOut();return this.config.disable_persistence||e\u0026\u0026!(!this.config.opt_out_persistence_by_default\u0026\u0026this.config.cookieless_mode!==\"on_reject\")}xu(){var e,n;const o=this.Cu();var i,r,s;return this.is_capturing()||(i=this.logs)===null||i===void 0||i.Ih(),((e=this.persistence)===null||e===void 0?void 0:e.hi)!==o\u0026\u0026((r=this.persistence)===null||r===void 0||r.set_disabled(o)),((n=this.sessionPersistence)===null||n===void 0?void 0:n.hi)!==o\u0026\u0026((s=this.sessionPersistence)===null||s===void 0||s.set_disabled(o)),this.bh(),o}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==\"always\"){if(this.yu()){var o,i,r,s,a,A;(o=this.sessionRecording)===null||o===void 0||o.dispose({discardBufferedEvents:!0}),this.xh(!0,!0),(i=this.sessionManager)===null||i===void 0||i.destroy(),(r=this.pageViewManager)===null||r===void 0||r.destroy(),this.sessionManager=new yGt(this),this.pageViewManager=new TOt(this),this.persistence\u0026\u0026(this.sessionPropsManager=new IGt(this,this.sessionManager,this.persistence));const h=(s=(a=this.config.__extensionClasses)===null||a===void 0?void 0:a.sessionRecording)!==null\u0026\u0026s!==void 0?s:(A=KM.__defaultExtensionClasses)===null||A===void 0?void 0:A.sessionRecording;var c,l;h\u0026\u0026(this.sessionRecording=this.mu(this.sessionRecording,new h(this)),this.cu\u0026\u0026((c=this.sessionRecording)===null||c===void 0||(l=c.onRemoteConfig)===null||l===void 0||l.call(c,this.cu)))}var u,g;this.consent.optInOut(!0),this.xu(),this.eh(),(n=this.sessionRecording)===null||n===void 0||n.startIfEnabledOrStop(),this.config.cookieless_mode==\"on_reject\"\u0026\u0026((u=this.surveys)===null||u===void 0||u.loadIfEnabled()),(Eo(e?.captureEventName)||e?.captureEventName)\u0026\u0026this.capture((g=e?.captureEventName)!==null\u0026\u0026g!==void 0?g:\"$opt_in\",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview\u0026\u0026this.ih()}else ui.warn(PGt)}opt_out_capturing(){this.config.cookieless_mode!==\"always\"?(this.consent.optInOut(!1),this.xu(),this.config.cookieless_mode===\"on_reject\"\u0026\u0026this.$u()):ui.warn(PGt)}$u(){var e,n;const o=this.sessionRecording;o?.dispose({discardBufferedEvents:!0}),this.get_distinct_id()!==\"$posthog_cookieless\"\u0026\u0026this.xh(!0,!0),this.register({distinct_id:uNe,$device_id:null}),this.gu(o),this.sessionRecording=void 0,(e=this.sessionManager)===null||e===void 0||e.destroy(),(n=this.pageViewManager)===null||n===void 0||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview\u0026\u0026this.ih(),this.eh()}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){const e=this.consent.consent;return e===1?\"granted\":e===0?\"denied\":\"pending\"}is_capturing(){return!this.Su\u0026\u0026(this.config.cookieless_mode===\"always\"||(this.config.cookieless_mode===\"on_reject\"?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing()))}clear_opt_in_out_capturing(){this.consent.reset(),this.xu()}_is_bot(){return tf?xGt(tf,this.config.custom_blocked_useragents):void 0}ih(){No\u0026\u0026(No.visibilityState===\"visible\"?this.Ou||(this.Ou=!0,this.capture(pNe,{title:No.title},{send_instantly:!0}),this.Fu\u0026\u0026(No.removeEventListener(U$,this.Fu),this.Fu=null)):this.Fu||(this.Fu=this.ih.bind(this),el(No,U$,this.Fu)))}debug(e){e===!1?(Fn?.console.log(\"You've disabled debug mode.\"),this.set_config({debug:!1})):(Fn?.console.log(\"You're now in debug mode. All calls to PostHog will be logged in your console.\\nYou can disable this with `posthog.debug(false)`.\"),this.set_config({debug:!0}))}il(){const e=this.qu||{};return\"advanced_disable_flags\"in e?!!e.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(ui.warn(\"Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version.\"),!0):(function(n,o,i,r,s){const a=o in n\u0026\u0026!Hs(n[o]),A=i in n\u0026\u0026!Hs(n[i]);return a?n[o]:!!A\u0026\u0026(s\u0026\u0026s.warn(`Config field '${i}' is deprecated. Please use '${o}' instead. The old field will be removed in a future major version.`),n[i])})(e,\"advanced_disable_flags\",\"advanced_disable_decide\",0,ui)}Fs(e){var n;if(Hs(this.config.before_send))return e;const o=Object.keys((n=e.properties)!==null\u0026\u0026n!==void 0?n:{}).filter(PHo),i=As(this.config.before_send)?this.config.before_send:[this.config.before_send];let r=e;for(const s of i)try{if(r=s(r),Hs(r)){const a=`Event '${e.event}' was rejected in beforeSend function`;return wHo(e.event)?ui.warn(`${a}. This can cause unexpected behavior.`):ui.info(a),null}r.properties\u0026\u0026!Rx(r.properties)||ui.warn(`Event '${e.event}' has no properties after beforeSend function, this is likely an error.`)}catch(a){return ui.error(`Error in beforeSend function for event '${e.event}':`,a),null}for(const s of o)if(r.properties\u0026\u0026Hs(r.properties[s]))return ui.warn(`Event '${e.event}' had its '${s}' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped.`),null;return r}getPageViewId(){var e;return(e=this.pageViewManager.Wo)===null||e===void 0?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture(\"$ai_feedback\",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,o){this.capture(\"$ai_metric\",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(o)})}Nu(e){const n=$y(e)\u0026\u0026!e,o=hc.Et()\u0026\u0026hc.Ot(\"ph_debug\")===\"true\";return!n\u0026\u0026(!!o||e)}};Aq.__defaultExtensionClasses={},Aq.Th=(()=\u003e{const t=()=\u003e{};return{trace:t,debug:t,info:t,warn:t,error:t,fatal:t}})(),(function(t,e){for(let n=0;e.length\u003en;n++)t.prototype[e[n]]=XOo(t.prototype[e[n]])})(Aq,[\"identify\"]);var FGt=class{constructor(t){this.disabled=t===!1;const e=QA(t)?t:{};this.thresholdPx=e.threshold_px||30,this.timeoutMs=e.timeout_ms||1e3,this.clickCount=e.click_count||3,this.clicks=[]}isRageClick(t,e,n){if(this.disabled)return!1;const o=this.clicks[this.clicks.length-1];if(o\u0026\u0026Math.abs(t-o.x)+Math.abs(e-o.y)\u003cthis.thresholdPx\u0026\u0026this.timeoutMs\u003en-o.timestamp){if(this.clicks.push({x:t,y:e,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:e,timestamp:n}];return!1}};const $Ne=\"$copy_autocapture\",qNe=Cd(\"[AutoCapture]\");function XNe(t,e){return e.length\u003et?e.slice(0,t)+\"...\":e}function sYo(t){if(t.previousElementSibling)return t.previousElementSibling;let e=t;do e=e.previousSibling;while(e\u0026\u0026!d6(e));return e}function aYo(t,{e,maskAllElementAttributes:n,maskAllText:o,elementAttributeIgnoreList:i,elementsChainAsString:r,disableCaptureUrlHashes:s}){var a,A;if(!d6(t))return{props:{}};const c=[t],l=new Set([t]);let u=t;for(;u.parentNode\u0026\u0026!AI(u,\"body\")\u0026\u00261e3\u003ec.length;){if(BNe(u.parentNode)){const x=u.parentNode.host;if(l.has(x))break;l.add(x),c.push(x),u=x;continue}if(!d6(u.parentNode)||l.has(u.parentNode))break;l.add(u.parentNode),c.push(u.parentNode),u=u.parentNode}const g=e.type===\"click\"\u0026\u0026t.namespaceURI===\"http://www.w3.org/2000/svg\"?c.findIndex(x=\u003eAI(x,\"button\")||AI(x,\"a\")):-1;g\u003e0\u0026\u0026(o=o||c.slice(0,g+1).some(x=\u003e!nG(x)||W$(x)));const h=[],d={};let p,m=!1,_=!1;if(kl(c,x=\u003e{const E=nG(x);if(AI(x,\"a\")\u0026\u0026!n\u0026\u0026!i?.includes(\"href\")){const B=x.getAttribute(\"href\");m=!!(E\u0026\u0026B\u0026\u0026j$(B))\u0026\u0026(s?Mw(B):B)}as(tG(x),\"ph-no-capture\")\u0026\u0026(_=!0),h.push((function(B,S,Q,w,M=!1){const k=B.tagName.toLowerCase(),R={tag_name:k};SNe.indexOf(k)\u003e-1\u0026\u0026!Q\u0026\u0026(R.$el_text=k.toLowerCase()===\"a\"||k.toLowerCase()===\"button\"?XNe(1024,vOt(B)):XNe(1024,z$(B)));const F=tG(B);S||w?.includes(\"class\")||0\u003e=F.length||(R.classes=F.filter(function(W){return W!==\"\"})),kl(B.attributes,function(W){var te;if((!W$(B)||[\"name\",\"id\",\"class\",\"aria-label\"].indexOf(W.name)!==-1)\u0026\u0026!w?.includes(W.name)\u0026\u0026!S\u0026\u0026j$(W.value)\u0026\u0026(!rA(te=W.name)||te.substring(0,10)!==\"_ngcontent\"\u0026\u0026te.substring(0,7)!==\"_nghost\")){let j=W.value;W.name===\"class\"\u0026\u0026(j=bNe(j).join(\" \")),R[\"attr__\"+W.name]=XNe(1024,W.name===\"href\"\u0026\u0026M?Mw(j):j)}});let O=1,U=1,Y=B;for(;Y=sYo(Y);)O++,Y.tagName===B.tagName\u0026\u0026U++;return R.nth_child=O,R.nth_of_type=U,R})(x,n,o,i,s)),kl((function(B){if(!nG(B))return{};const S={};return kl(B.attributes,function(Q){if(Q.name\u0026\u0026Q.name.indexOf(\"data-ph-capture-attribute\")===0){const w=Q.name.replace(\"data-ph-capture-attribute-\",\"\"),M=Q.value;w\u0026\u0026M\u0026\u0026j$(M)\u0026\u0026(S[w]=M)}}),S})(x),(B,S)=\u003e{({}).hasOwnProperty.call(d,S)||(d[S]=B)})}),_)return{props:{},explicitNoCapture:_};if(g\u003e0\u0026\u0026(t=c[g],h.splice(0,g)),o||(h[0].$el_text=AI(t,\"a\")||AI(t,\"button\")?vOt(t):z$(t)),m){var f,I;h[0].attr__href=m;const x=(f=Kb(m))===null||f===void 0?void 0:f.host,E=Fn==null||(I=Fn.location)===null||I===void 0?void 0:I.host;x\u0026\u0026E\u0026\u0026x!==E\u0026\u0026(p=m)}return{props:eg((y=e.type,{$event_type:y,$ce_version:1}),r?{}:{$elements:h},{$elements_chain:(C=h,As(C)?(function(x){return x.map(E=\u003e{var B,S;let Q=\"\";if(E.tag_name\u0026\u0026(Q+=E.tag_name),E.attr_class){E.attr_class.sort();for(const k of E.attr_class)Q+=`.${k.replace(/\"/g,\"\")}`}const w=sn(sn(sn(sn({},E.text?{text:E.text}:{}),{},{\"nth-child\":(B=E.nth_child)!==null\u0026\u0026B!==void 0?B:0,\"nth-of-type\":(S=E.nth_of_type)!==null\u0026\u0026S!==void 0?S:0},E.href?{href:E.href}:{}),E.attr_id?{attr_id:E.attr_id}:{}),E.attributes),M={};return vge(w).sort(([k],[R])=\u003e(function(F,O){return O\u003eF?-1:F\u003eO?1:0})(k,R)).forEach(([k,R])=\u003eM[POt(k.toString())]=POt(R.toString())),Q+=\":\",Q+=vge(M).map(([k,R])=\u003e`${k}=\"${R}\"`).join(\"\"),Q}).join(\";\")})((function(x){return x.map(E=\u003e{var B,S;const Q={text:(B=E.$el_text)===null||B===void 0?void 0:B.slice(0,400),tag_name:E.tag_name,href:(S=E.attr__href)===null||S===void 0?void 0:S.slice(0,2048),attr_class:dGo(E),attr_id:E.attr__id,nth_child:E.nth_child,nth_of_type:E.nth_of_type,attributes:{}};return vge(E).filter(([w])=\u003ew.indexOf(\"attr__\")===0).forEach(([w,M])=\u003eQ.attributes[w]=M),Q})})(C)):\"\")},!((a=h[0])===null||a===void 0)\u0026\u0026a.$el_text?{$el_text:(A=h[0])===null||A===void 0?void 0:A.$el_text}:{},p\u0026\u0026e.type===\"click\"?{$external_click_url:p}:{},d),target:t};var C,y}var AYo=class{do(){this.vo=void 0,clearTimeout(this.fo),this.fo=void 0}po(t){var e;if(!nG(t))return!0;const n=(e=this.mo().css_selector_ignorelist)!==null\u0026\u0026e!==void 0?e:wNe,o=new Set;let i=t;for(;i;){if(o.size\u003e=1e3||o.has(i))return!0;o.add(i);const r=i,s=tG(r);if(as(s,\"ph-no-capture\")||as(s,\"ph-sensitive\")||W$(r)||n.some(A=\u003eQNe(r,A)))return!0;const a=i.parentNode;i=BNe(a)?a.host:a\u0026\u0026d6(a)?a:null}return!1}yo(t){if(!this.isEnabled||t.type===\"pointercancel\")return void this.do();if(t.type===\"pointerdown\"){this.do();const o=J$(t);var e;return void(t.isPrimary\u0026\u0026t.button===0\u0026\u0026!t.ctrlKey\u0026\u0026o\u0026\u0026d6(o)\u0026\u0026(this.vo={target:o,excluded:this.po(o),id:t.pointerId,x:t.clientX,y:t.clientY,released:!1,distinctId:(e=this.bo)===null||e===void 0?void 0:e.distinctId}))}const n=this.vo;n\u0026\u0026(t.pointerId!==n.id||Math.abs(t.clientX-n.x)\u003e5||Math.abs(t.clientY-n.y)\u003e5?this.do():t.type===\"pointerup\"\u0026\u0026(n.released=!0,this.fo=setTimeout(()=\u003ethis.do(),0)))}_o(t){var e;const n=this.vo;this.do();const o=J$(t);if(n?.released\u0026\u0026n.target.isConnected\u0026\u0026n.distinctId===((e=this.bo)===null||e===void 0?void 0:e.distinctId)\u0026\u0026t.pointerId===n.id\u0026\u0026(t.detail\u003e0||t.pointerType===\"touch\"||t.pointerType===\"pen\")\u0026\u0026t.button===0\u0026\u00265\u003e=Math.abs(t.clientX-n.x)\u0026\u00265\u003e=Math.abs(t.clientY-n.y)\u0026\u0026o\u0026\u0026(AI(o,\"html\")||AI(o,\"body\"))){var i;if(n.excluded)return null;const r=(i=this.mo().css_selector_ignorelist)!==null\u0026\u0026i!==void 0?i:wNe;return[o,No?.documentElement,No?.body].some(s=\u003e{if(!s)return!1;const a=tG(s);return as(a,\"ph-no-capture\")||as(a,\"ph-sensitive\")||!nG(s)||W$(s)||r.some(A=\u003eQNe(s,A))})?null:n.target}}constructor(t){this.wo=t,this.name=\"autocapture\",this.ko=!1,this.So=null,this.xo=!1,this.$o=new Map,this.Co=!1,this.Mr={enabled:!1,rageclick:!1,maskAllElementAttributes:!1,maskAllText:!1,disableCaptureUrlHashes:!1,remoteRequestsDisabled:!1},this.To=!1,this.wo.refresh(this.Mr),this.rageclicks=new FGt(this.Mr.rageclick),this.Io=null}setup(t){this.Mo(),this.bo=t;const e=t.onRemoteConfig(this.onRemoteConfig.bind(this));this.To?e.dispose():(this.Eo=e,this.startIfEnabled())}dispose(){var t;this.To||(this.To=!0,this.bo=void 0,(t=this.Eo)===null||t===void 0||t.dispose(),this.Eo=void 0,this.$o.clear(),this.Io=null,this.Po())}mo(){return this.wo.refresh(this.Mr),this.Mr}Mo(){var t,e;return this.mo(),this.Mr.url_allowlist=(t=this.Mr.url_allowlist)===null||t===void 0?void 0:t.map(n=\u003enew RegExp(n)),this.Mr.url_ignorelist=(e=this.Mr.url_ignorelist)===null||e===void 0?void 0:e.map(n=\u003enew RegExp(n)),this.Mr}Ro(){if(!this.isBrowserSupported())return void qNe.info(\"Disabling Automatic Event Collection because this browser is not supported\");if(!Fn||!No)return;const t=this.Ao=e=\u003e{e=e||Fn?.event;try{if(e.type===\"blur\")return void this.do();if(e.type.indexOf(\"pointer\")===0)return void this.yo(e);const n=e.type===\"click\"?this._o(e):void 0;if(Id(n))return;this.Oo(e,\"$autocapture\",n)}catch(n){qNe.error(\"Failed to capture event\",n)}};if(el(Fn,\"blur\",t),el(No,\"submit\",t,{capture:!0}),el(No,\"change\",t,{capture:!0}),el(No,\"click\",t,{capture:!0}),kl([\"pointerdown\",\"pointermove\",\"pointerup\",\"pointercancel\"],e=\u003e{el(No,e,t,{capture:!0})}),this.mo().capture_copied_text){const e=this.Fo=n=\u003e{n=n||Fn?.event;try{this.Oo(n,$Ne)}catch(o){qNe.error(\"Failed to capture clipboard event\",o)}};el(No,\"copy\",e,{capture:!0}),el(No,\"cut\",e,{capture:!0}),el(No,\"paste\",e,{capture:!0})}}Po(){this.do(),this.Ao\u0026\u0026(Fn?.removeEventListener(\"blur\",this.Ao),kl([\"pointerdown\",\"pointermove\",\"pointerup\",\"pointercancel\"],t=\u003e{No?.removeEventListener(t,this.Ao,!0)}),No?.removeEventListener(\"submit\",this.Ao,!0),No?.removeEventListener(\"change\",this.Ao,!0),No?.removeEventListener(\"click\",this.Ao,!0),this.Ao=void 0),this.Fo\u0026\u0026(No?.removeEventListener(\"copy\",this.Fo,!0),No?.removeEventListener(\"cut\",this.Fo,!0),No?.removeEventListener(\"paste\",this.Fo,!0),this.Fo=void 0),this.ko=!1}startIfEnabled(){this.isEnabled||this.do(),!this.To\u0026\u0026this.bo\u0026\u0026this.isEnabled\u0026\u0026!this.ko\u0026\u0026(this.Ro(),this.ko=!0)}onRemoteConfig(t){if(this.To)return;if(this.xo=!0,!t.ok)return void this.startIfEnabled();const e=t.config;e.elementsChainAsString\u0026\u0026(this.Co=e.elementsChainAsString);const n=e.autocapture_opt_out;var o;$y(n)\u0026\u0026((o=this.bo)===null||o===void 0||o.kv.set(\"$autocapture_disabled_server_side\",n),this.So=n),this.startIfEnabled()}setElementSelectors(t,e=this){if(this.To)return;t.size?this.$o.set(e,new Set(t)):this.$o.delete(e);const n=new Set;this.$o.forEach(o=\u003e{o.forEach(i=\u003en.add(i))}),this.Io=n}getElementSelectors(t,e){var n;const o=[];return(n=this.Io)===null||n===void 0||n.forEach(i=\u003e{const r=No?.querySelectorAll(i);r?.forEach(s=\u003e{t!==s\u0026\u0026e!==s||as(o,i)||o.push(i)})}),o}get isEnabled(){var t,e;if(this.To)return!1;const n=(t=this.bo)===null||t===void 0?void 0:t.kv.get(kHt),o=this.So,i=this.mo();if(!i.remoteRequestsDisabled\u0026\u0026!this.xo)return!1;const r=i.remoteRequestsDisabled\u0026\u0026!this.xo;if(Id(o)\u0026\u0026!$y(n)\u0026\u0026!r)return!1;const s=(e=this.So)!==null\u0026\u0026e!==void 0?e:!!n;return!!i.enabled\u0026\u0026!s}Oo(t,e=\"$autocapture\",n){if(!this.isEnabled)return void this.do();let o=n||J$(t);pOt(o)\u0026\u0026(o=o.parentNode||null);const i=this.Mo();var r;e===\"$autocapture\"\u0026\u0026t.type===\"click\"\u0026\u0026t instanceof MouseEvent\u0026\u0026i.rageclick\u0026\u0026(!((r=this.rageclicks)===null||r===void 0)\u0026\u0026r.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime()))\u0026\u0026xOt(o,i.rageclick)\u0026\u0026this.Oo(t,\"$rageclick\",n);const s=e===$Ne,a=s?sn(sn({},i),{},{dom_event_allowlist:void 0}):i;if(o\u0026\u0026(function(u,g,h,d,p,m){var _;if(!Fn||PNe(u)||h?.url_allowlist\u0026\u0026!mOt(h.url_allowlist,m)||h?.url_ignorelist\u0026\u0026mOt(h.url_ignorelist,m))return!1;if(h?.dom_event_allowlist){const y=h.dom_event_allowlist;if(y\u0026\u0026!y.some(x=\u003eg.type===x))return!1}const{parentIsUsefulElement:f,targetElementList:I}=EOt(u,d);if(!(function(y,x){const E=x?.element_allowlist;if(Eo(E))return!0;for(const B of y)if(E.some(S=\u003eB.tagName.toLowerCase()===S))return!0;return!1})(I,h)||!vNe(I,h?.css_selector_allowlist)||vNe(I,(_=h?.css_selector_ignorelist)!==null\u0026\u0026_!==void 0?_:wNe))return!1;try{const y=Fn.getComputedStyle(u);if(y\u0026\u0026y.getPropertyValue(\"cursor\")===\"pointer\"\u0026\u0026g.type===\"click\")return!0}catch{}const C=u.tagName.toLowerCase();switch(C){case\"html\":return!1;case\"form\":return(p||[\"submit\"]).indexOf(g.type)\u003e=0;case\"input\":case\"select\":case\"textarea\":return(p||[\"change\",\"click\"]).indexOf(g.type)\u003e=0;default:return f?(p||[\"click\"]).indexOf(g.type)\u003e=0:(p||[\"click\"]).indexOf(g.type)\u003e=0\u0026\u0026(SNe.indexOf(C)\u003e-1||u.getAttribute(\"contenteditable\")===\"true\")}})(o,t,a,s,s?[\"copy\",\"cut\",\"paste\"]:void 0,{config:{get_current_url:i.getCurrentUrl}})){var A;const{props:u,explicitNoCapture:g,target:h}=aYo(o,{e:t,maskAllElementAttributes:i.maskAllElementAttributes,maskAllText:i.maskAllText,elementAttributeIgnoreList:i.element_attribute_ignorelist,elementsChainAsString:this.Co,disableCaptureUrlHashes:i.disableCaptureUrlHashes});if(g)return!1;const d=this.getElementSelectors(o,h);if(d\u0026\u0026d.length\u003e0\u0026\u0026(u.$element_selectors=d),e===$Ne){const p=t.type||\"clipboard\";if(p!==\"paste\"){var c,l;const m=Fn==null||(c=Fn.getSelection())===null||c===void 0?void 0:c.toString(),_=_Ot(m);if(!_)return!1;u.$selected_content=_,u.$clipboard_text_length=(l=m?.length)!==null\u0026\u0026l!==void 0?l:0}u.$copy_type=p}return(A=this.bo)===null||A===void 0||A.capture(e,u),!0}}isBrowserSupported(){return nf(No?.querySelectorAll)}},cYo=class{constructor(t){this._instance=t}refresh(t){const e=this._instance.config,n=QA(e.autocapture)?e.autocapture:void 0;t.enabled=!!e.autocapture,t.rageclick=e.rageclick,t.maskAllElementAttributes=e.mask_all_element_attributes,t.maskAllText=e.mask_all_text,t.disableCaptureUrlHashes=e.disable_capture_url_hashes,t.getCurrentUrl=e.get_current_url,t.remoteRequestsDisabled=this._instance.il(),t.url_allowlist=n?.url_allowlist,t.url_ignorelist=n?.url_ignorelist,t.dom_event_allowlist=n?.dom_event_allowlist,t.element_allowlist=n?.element_allowlist,t.css_selector_allowlist=n?.css_selector_allowlist,t.css_selector_ignorelist=n?.css_selector_ignorelist,t.element_attribute_ignorelist=n?.element_attribute_ignorelist,t.capture_copied_text=n?.capture_copied_text}};const cq=Cd(\"[ExceptionAutocapture]\"),LGt=()=\u003e{},HGt=t=\u003e{var e;if(nf(t))return(e=t.__posthog_layer__)!==null\u0026\u0026e!==void 0?e:t.__rrweb_layer__};function lq(t,e,n){try{if(!(e in t))return LGt;const o={next:t[e]},i=n(function(...r){return o.next.apply(this,r)});return nf(i)\u0026\u0026(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:o}})),t[e]=i,()=\u003e{if(t[e]===i)return void(t[e]=o.next);let r=t[e],s=HGt(r);for(;s;){if(s.next===i)return void(s.next=o.next);r=s.next,s=HGt(r)}}}catch{return LGt}}const lYo=Cd(\"[TracingHeaders]\"),SR=Cd(\"[Web Vitals]\"),OGt=9e5,GGt=[\"CLS\",\"FCP\",\"INP\",\"LCP\"],uYo=[\"INP\",\"LCP\"],gYo=[\"interactionTarget\",\"interactionType\",\"inputDelay\",\"processingDuration\",\"presentationDelay\",\"loadState\",\"target\",\"url\",\"timeToFirstByte\",\"resourceLoadDelay\",\"resourceLoadDuration\",\"elementRenderDelay\",\"largestShiftTarget\",\"largestShiftTime\",\"largestShiftValue\",\"firstByteToFCP\"],ZNe=\"disabled\",YGt=\"lazy_loading\",Jb=Cd(\"[SessionRecording]\"),dYo=[gNe,dNe,$Ht,qHt,XHt,ZHt,eOt,tOt,nOt],hYo=Cd(\"[Heatmaps]\");function eRe(t){return QA(t)\u0026\u0026\"clientX\"in t\u0026\u0026\"clientY\"in t\u0026\u0026Ah(t.clientX)\u0026\u0026Ah(t.clientY)}const Gge=Cd(\"[Product Tours]\"),tRe=t=\u003e{var e;return!t.config.disable_product_tours\u0026\u0026!!(!((e=t.persistence)===null||e===void 0)\u0026\u0026e.get_property(sNe))},pYo=[\"$set_once\",\"$set\"],h6=Cd(\"[SiteApps]\"),UGt=\"Error while initializing PostHog app with config id \",KGt=(t,e)=\u003et?.then?t.then(e):e(t),uG=\"SDK is not enabled or survey functionality is not yet loaded\",VGt=\"Disabled. Not loading surveys.\";var mYo=class{constructor(t,e){this.wo=t,this.Mh=e,this.name=\"surveys\",this._surveyEventReceiver=null,this._surveyManager=null,this.Eh=!1,this.Ph=!1,this.Rh=[],this.Ah=[],this.Oh=null,this.Fh=null,this.To=!1,this.Dh=new Set,this.onRemoteConfig=n=\u003e{if(this.To||this.Mr.disableSurveys)return;if(!n.ok)return this.Ph=!0,this.Lh({isLoaded:!1,error:\"Remote config unavailable. Not loading surveys.\"}),yl.warn(\"Remote config unavailable. Not loading surveys.\");const o=n.config.surveys;if(Hs(o))return yl.warn(\"Flags not loaded yet. Not loading surveys.\");this.Nh=$y(o)?o:o.length\u003e0,yl.info(`flags response received, isSurveysEnabled: ${this.Nh}`),this.loadIfEnabled()},this.Lh=n=\u003e{this.Ah.slice().forEach(o=\u003ethis.qh(o,n))}}setup(t){if(!this.To)return this.jh=t,KGt(t.kv.initialize(),()=\u003e{if(this.jh!==t||this.To)return;this.jh=void 0,this.bo=t;const e=t.onRemoteConfig(this.onRemoteConfig);this.To?e.dispose():(this.Eo=e,this.loadIfEnabled())})}dispose(){var t,e,n,o,i;this.To||(this.To=!0,this.jh=void 0,this.bo=void 0,(t=this.Eo)===null||t===void 0||t.dispose(),this.Eo=void 0,(e=this._surveyEventReceiver)===null||e===void 0||e.dispose(),this._surveyEventReceiver=null,(n=this._surveyManager)===null||n===void 0||(o=n.dispose)===null||o===void 0||o.call(n),this._surveyManager=null,this.Rh=[],this.Ah.forEach(r=\u003e{r.active=!1}),this.Ah=[],(i=this.Bh)===null||i===void 0||i.call(this),this.Bh=void 0,this.Oh=null,this.Dh.forEach(r=\u003eclearTimeout(r)),this.Dh.clear())}get Mr(){return this.wo.get()}initialize(){this.loadIfEnabled()}reset(){var t,e;(t=this._surveyManager)===null||t===void 0||(e=t.clearInMemoryInProgressSurveyState)===null||e===void 0||e.call(t);try{var n;(n=this._surveyEventReceiver)===null||n===void 0||n.reset(),localStorage.removeItem(\"lastSeenSurveyDate\");const o=[];for(let i=0;i\u003clocalStorage.length;i++){const r=localStorage.key(i);(r?.startsWith(\"seenSurvey_\")||r?.startsWith(\"inProgressSurvey_\"))\u0026\u0026o.push(r)}o.forEach(i=\u003elocalStorage.removeItem(i))}catch{}this.Lh()}loadIfEnabled(){if(this.To||!this.bo)return;const t=this.Mr;if(this._surveyManager)return;if(this.Eh)return void yl.info(\"Already initializing surveys, skipping...\");if(t.disableSurveys)return void yl.info(VGt);if(t.cookielessMode\u0026\u0026this.wo.isOptedOut())return void yl.info(\"Not loading surveys in cookieless mode without consent.\");const e=this.wo.getExtensions();if(!e)return void this.Hh(\"PostHog Extensions not found.\");if(Eo(this.Nh)\u0026\u0026!t.advancedEnableSurveys)return;const n=this.Nh||t.advancedEnableSurveys;this.Eh=!0,this.Ph=!1;try{const o=e.generateSurveys;if(o)return this.zh(o,n),void(this.Eh=!1);const i=e.loadExternalDependency;if(!i)return this.Hh(hNe),void(this.Eh=!1);i(r=\u003e{try{if(this.To)return;const s=this.wo.getExtensions();r||!s?.generateSurveys?this.Hh(\"Could not load surveys script\",r):this.zh(s.generateSurveys,n)}finally{this.Eh=!1}})}catch(o){throw this.Eh=!1,this.Hh(\"Error initializing surveys\",o),o}}zh(t,e){var n,o;if(this.To)return;this._surveyManager=t(e),this._surveyEventReceiver=this.wo.createEventReceiver(this.Lh);const i=(n=(o=this.bo)!==null\u0026\u0026o!==void 0?o:this.Mh)===null||n===void 0?void 0:n.kv.get(O$);i\u0026\u0026this.Uh(i),yl.info(\"Surveys loaded successfully\"),this.Wh(),this.Lh(),this.Vh({isLoaded:!0})}Hh(t,e){this.Ph=!0,yl.error(t,e),this.Lh({isLoaded:!1,error:t}),this.Vh({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.Rh.push(t),this._surveyManager\u0026\u0026this.Vh({isLoaded:!0}),()=\u003e{this.Rh=this.Rh.filter(e=\u003ee!==t)}}getSurveys(t,e=!1){var n;const o=(n=this.bo)!==null\u0026\u0026n!==void 0?n:this.Mh;if(!o||this.To)return;if(this.Mr.disableSurveys)return yl.info(VGt),t([]);const i=o.kv.get(O$);if(i\u0026\u0026!e)return t(i,{isLoaded:!0}),void(this.Gh()\u0026\u0026this.getSurveys(()=\u003e{},!0));if(this.Oh)return void this.Oh.then(({surveys:a,context:A})=\u003e{this.To||t(a,A)}).catch(a=\u003eyl.error(\"Error in survey callback\",a));const r=this.Qh(\"/api/surveys/\",{method:\"GET\",query:{token:o.projectToken},sentAt:\"query\",timeoutMs:this.Mr.requestTimeoutMs}).then(a=\u003e{try{return this.Jh(o,a)}catch(A){return yl.error(\"Error processing surveys response\",A),this.Jh(o,{statusCode:0,error:A})}},a=\u003ethis.Jh(o,{statusCode:0,error:a}));this.Oh=r;const s=()=\u003e{this.Oh===r\u0026\u0026(this.Oh=null)};r.then(a=\u003e{s(),this.To||(this.Lh(a.context),t(a.surveys,a.context))},s).catch(a=\u003eyl.error(\"Error in survey callback\",a))}Qh(t,e){const n=this.bo;return n?n.sendRequest(t,e):new Promise(o=\u003eo({statusCode:0,error:new Error(uG)}))}Jh(t,e){if(this.To)return{surveys:[],context:{isLoaded:!1,error:uG}};const n=e.statusCode;if(n!==200||!e.json){const i=`Surveys API could not be loaded, status: ${n}`;return n!==0?yl.error(i):e.error||yl.warn(i),this.Fh=Date.now(),{surveys:[],context:{isLoaded:!1,error:i}}}this.Fh=null;const o=e.json.surveys||[];return t.kv.set({[O$]:o,[bge]:Date.now()}),this.Uh(o),{surveys:o,context:{isLoaded:!0}}}Uh(t){var e;const n=t.filter(o=\u003e(function(i){return!(!i.start_date||i.end_date)})(o)\u0026\u0026(BGt(o)||(function(i){var r;return!!(!((r=i.conditions)===null||r===void 0||(r=r.actions)===null||r===void 0||(r=r.values)===null||r===void 0)\u0026\u0026r.length)})(o)));(e=this._surveyEventReceiver)===null||e===void 0||e.replace(n)}Gh(){return this.Zh()\u0026\u0026!this.Oh\u0026\u0026!this.Kh()}Zh(){var t,e;const n=(t=(e=this.bo)!==null\u0026\u0026e!==void 0?e:this.Mh)===null||t===void 0?void 0:t.kv.get(bge);return Ah(n)\u0026\u0026Date.now()-n\u003e3e5}Kh(){return Ah(this.Fh)\u0026\u00263e5\u003eDate.now()-this.Fh}markSurveyAsSeen(t,e){var n;const o={id:t,current_iteration:(n=e?.iteration)!==null\u0026\u0026n!==void 0?n:null};vGt(o);try{localStorage.setItem(\"lastSeenSurveyDate\",new Date().toISOString())}catch{}this.Lh()}Vh(t){for(const e of this.Rh)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){yl.error(\"Error in survey callback\",n)}}getActiveMatchingSurveys(t,e=!1){if(!Hs(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);yl.warn(\"init was not called\")}onActiveMatchingSurveysChanged(t){var e,n;if(this.To)return()=\u003e{};const o={callback:t,active:!0,revision:0};this.Ah.push(o),this.Wh();const i=(e=(n=this.bo)!==null\u0026\u0026n!==void 0?n:this.Mh)===null||e===void 0?void 0:e.kv.get(O$);return this.Mr.disableSurveys||!this._surveyManager\u0026\u0026this.Ph\u0026\u0026!this.Eh||!i\u0026\u0026!Hs(this.Fh)\u0026\u0026!this.Oh?this.qh(o,{isLoaded:!1}):this._surveyManager\u0026\u0026this.qh(o),()=\u003e{var r;o.active=!1,this.Ah=this.Ah.filter(s=\u003es!==o),this.Ah.length===0\u0026\u0026((r=this.Bh)===null||r===void 0||r.call(this),this.Bh=void 0)}}Wh(){var t,e,n;this._surveyManager\u0026\u0026this.Ah.length\u003e0\u0026\u0026((t=this.Bh)!==null\u0026\u0026t!==void 0||(this.Bh=(e=(n=this.wo).onMatchingConditionsChanged)===null||e===void 0?void 0:e.call(n,this.Lh)))}qh(t,e){if(this.To||!t.active)return;const n=++t.revision,o=i=\u003e{if(!this.To\u0026\u0026t.active\u0026\u0026n===t.revision)try{const r=e??{isLoaded:!0},s=JSON.stringify([i,r]);if(s===t.lastResult)return;t.lastResult=s,t.callback(i,r)}catch(r){yl.error(\"Error in active matching surveys callback\",r)}};try{e\u0026\u0026!e.isLoaded?o([]):this.getActiveMatchingSurveys(o)}catch(i){yl.error(\"Error in active matching surveys callback\",i)}}Xh(t){let e=null;return this.getSurveys(n=\u003e{var o;e=(o=n.find(i=\u003ei.id===t))!==null\u0026\u0026o!==void 0?o:null}),e}Yh(t){if(Hs(this._surveyManager))return{eligible:!1,reason:uG};const e=typeof t==\"string\"?this.Xh(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:\"Survey not found\"}}tc(t){if(!this.wo.isCapturing())return{eligible:!1,reason:\"PostHog is not capturing, so a survey response cannot be recorded\"};if(Hs(this._surveyManager))return{eligible:!1,reason:uG};const e=typeof t==\"string\"?this.Xh(t):t;return e?this._surveyManager.checkSurveyRenderability(e):{eligible:!1,reason:\"Survey not found\"}}canRenderSurvey(t){if(Hs(this._surveyManager))return yl.warn(\"init was not called\"),{visible:!1,disabledReason:uG};const e=this.tc(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return Hs(this._surveyManager)?(yl.warn(\"init was not called\"),Promise.resolve({visible:!1,disabledReason:uG})):new Promise(n=\u003e{this.getSurveys(o=\u003e{var i;const r=(i=o.find(s=\u003es.id===t))!==null\u0026\u0026i!==void 0?i:null;if(r){const s=this.tc(r);n({visible:s.eligible,disabledReason:s.reason})}else n({visible:!1,disabledReason:\"Survey not found\"})},e)})}renderSurvey(t,e,n){var o;if(!this.wo.isCapturing())return;if(Hs(this._surveyManager))return void yl.warn(\"init was not called\");const i=typeof t==\"string\"?this.Xh(t):t;if(!i?.id)return void yl.warn(\"Survey not found\");if(!VGo.includes(i.type))return void yl.warn(`Surveys of type ${i.type} cannot be rendered in the app`);const r=No?.querySelector(e);if(r){if(!((o=i.appearance)===null||o===void 0)\u0026\u0026o.surveyPopupDelaySeconds){yl.info(`Rendering survey ${i.id} with delay of ${i.appearance.surveyPopupDelaySeconds} seconds`);const s=setTimeout(()=\u003e{var a,A;this.Dh.delete(s),!this.To\u0026\u0026this.wo.isCapturing()\u0026\u0026(yl.info(`Rendering survey ${i.id} with delay of ${(a=i.appearance)===null||a===void 0?void 0:a.surveyPopupDelaySeconds} seconds`),(A=this._surveyManager)===null||A===void 0||A.renderSurvey(i,r,n),yl.info(`Survey ${i.id} rendered`))},1e3*i.appearance.surveyPopupDelaySeconds);return void this.Dh.add(s)}this._surveyManager.renderSurvey(i,r,n)}else yl.warn(\"Survey element not found\")}displaySurvey(t,e){var n;if(!this.wo.isCapturing())return;if(Hs(this._surveyManager))return void yl.warn(\"init was not called\");const o=this.Xh(t);if(!o)return void yl.warn(\"Survey not found\");let i=o;if(!((n=o.appearance)===null||n===void 0)\u0026\u0026n.surveyPopupDelaySeconds\u0026\u0026e.ignoreDelay\u0026\u0026(i=sn(sn({},o),{},{appearance:sn(sn({},o.appearance),{},{surveyPopupDelaySeconds:0})})),e.displayType!==TNe.Popover\u0026\u0026e.initialResponses\u0026\u0026yl.warn(\"initialResponses is only supported for popover surveys. prefill will not be applied.\"),e.ignoreConditions===!1){const r=this.Yh(o);if(!r.eligible)return void yl.warn(\"Survey is not eligible to be displayed: \",r.reason)}e.displayType!==TNe.Inline?this._surveyManager.handlePopoverSurvey(i,e):this.renderSurvey(i,e.selector,e.properties)}cancelPendingSurvey(t){Hs(this._surveyManager)?yl.warn(\"init was not called\"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t,e;(t=this._surveyManager)===null||t===void 0||(e=t.handlePageUnload)===null||e===void 0||e.call(t)}};function gG(t,e,n){if(Hs(t))return!1;switch(n){case\"exact\":return t===e;case\"contains\":{const o=e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$\u0026\").replace(/_/g,\".\").replace(/%/g,\".*\");return new RegExp(o,\"i\").test(t)}case\"regex\":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}var _Yo=class{constructor(e){this._instance=e,this.ec=new Set,this.nc=new Set,this.sc=new Lge,this.rc=(n,o)=\u003ethis.oc(n,o)\u0026\u0026this.ac(n,o)\u0026\u0026this.lc(n,o)\u0026\u0026this.uc(n,o),this.oc=(n,o)=\u003e!o?.event||n?.event===o?.event}init(){var e,n;Eo((e=this._instance)===null||e===void 0?void 0:e._addCaptureHook)||(this.hc=(n=this._instance)===null||n===void 0?void 0:n._addCaptureHook((o,i)=\u003e{this.on(o,i)}))}dispose(){var e,n;(e=this.hc)===null||e===void 0||e.call(this),this.hc=void 0,(n=this._instance)===null||n===void 0||(n=n.autocapture)===null||n===void 0||n.setElementSelectors(new Set,this),this.sc=new Lge}register(e){var n,o;if(!Eo((n=this._instance)===null||n===void 0?void 0:n._addCaptureHook)\u0026\u0026(e.forEach(i=\u003e{var r;this.ec.add(i),(r=i.steps)===null||r===void 0||r.forEach(s=\u003e{this.nc.add(s?.event||\"\")})}),(o=this._instance)===null||o===void 0?void 0:o.autocapture)){const i=new Set;this.ec.forEach(r=\u003e{var s;(s=r.steps)===null||s===void 0||s.forEach(a=\u003e{a?.selector\u0026\u0026i.add(a.selector)})}),this._instance.autocapture.setElementSelectors(i,this)}}replace(e){this.ec.clear(),this.nc.clear(),this.register(e)}on(e,n){n!=null\u0026\u0026e.length!=0\u0026\u0026(this.nc.has(e)||this.nc.has(n.event))\u0026\u0026this.ec.forEach(o=\u003e{this.cc(n,o)\u0026\u0026this.sc.emit(\"actionCaptured\",o.name)})}dc(e){this.onAction(\"actionCaptured\",n=\u003ee(n))}cc(e,n){if(n?.steps==null)return!1;for(const o of n.steps)if(this.rc(e,o))return!0;return!1}onAction(e,n){return this.sc.on(e,n)}ac(e,n){if(n?.url){var o;const i=e==null||(o=e.properties)===null||o===void 0?void 0:o.$current_url;if(!i||typeof i!=\"string\"||!gG(i,n.url,n.url_matching||\"contains\"))return!1}return!0}lc(e,n){return!!this.vc(e,n)\u0026\u0026!!this.fc(e,n)\u0026\u0026!!this.gc(e,n)}vc(e,n){var o;if(!n?.href)return!0;const i=this.mc(e);if(i.length\u003e0)return i.some(s=\u003egG(s.href,n.href,n.href_matching||\"exact\"));const r=(e==null||(o=e.properties)===null||o===void 0?void 0:o.$elements_chain)||\"\";return!!r\u0026\u0026gG((function(s){const a=s.match(/(?::|\")href=\"(.*?)\"/);return a?a[1]:\"\"})(r),n.href,n.href_matching||\"exact\")}fc(e,n){var o;if(!n?.text)return!0;const i=this.mc(e);if(i.length\u003e0)return i.some(c=\u003egG(c.text,n.text,n.text_matching||\"exact\")||gG(c.$el_text,n.text,n.text_matching||\"exact\"));const r=(e==null||(o=e.properties)===null||o===void 0?void 0:o.$elements_chain)||\"\";return!!r\u0026\u0026(s=(function(c){const l=[],u=/(?::|\")text=\"(.*?)\"/g;let g;for(;!Hs(g=u.exec(c));)l.includes(g[1])||l.push(g[1]);return l})(r),a=n.text,A=n.text_matching||\"exact\",s.some(c=\u003egG(c,a,A)));var s,a,A}gc(e,n){var o,i;if(!n?.selector)return!0;const r=e==null||(o=e.properties)===null||o===void 0?void 0:o.$element_selectors;if(r?.includes(n.selector))return!0;const s=(e==null||(i=e.properties)===null||i===void 0?void 0:i.$elements_chain)||\"\";if(n.selector_regex\u0026\u0026s)try{return new RegExp(n.selector_regex).test(s)}catch{return!1}return!1}mc(e){var n;return(e==null||(n=e.properties)===null||n===void 0?void 0:n.$elements)==null?[]:e?.properties.$elements}uc(e,n){return!n?.properties||n.properties.length===0||SGt(n.properties.reduce((o,i)=\u003e{const r=As(i.value)?i.value.map(String):i.value!=null?[String(i.value)]:[];return o[i.key]={values:r,operator:i.operator||\"exact\"},o},{}),e?.properties)}},fYo=class{constructor(e,n){var o,i;this.yc=[],this._instance=e,this.bc=n,this._c=new Map,this.wc=new Map,this.kc=new Map,this.Sc=(o=this._instance)===null||o===void 0||(i=o.onSessionId)===null||i===void 0?void 0:i.call(o,r=\u003ethis.xc(r))}$c(e){return!1}Cc(){return null}Tc(e){}Ic(){}Mc(e,n){return!!e\u0026\u0026SGt(e.propertyFilters,n?.properties)}Ec(e,n){const o=new Map;return e.forEach(i=\u003e{var r;(r=i.conditions)===null||r===void 0||(r=r[n])===null||r===void 0||(r=r.values)===null||r===void 0||r.forEach(s=\u003e{if(s?.name){const a=o.get(s.name)||[];a.push(i.id),o.set(s.name,a)}})}),o}Pc(e,n,o){const i=(o===eq.Activation?this._c:this.wc).get(e);let r=[];return this.Rc(s=\u003e{r=s.filter(a=\u003ei?.includes(a.id))}),r.filter(s=\u003e{var a;const A=(a=s.conditions)===null||a===void 0||(a=a[o])===null||a===void 0||(a=a.values)===null||a===void 0?void 0:a.find(c=\u003ec.name===e);return this.Mc(A,n)})}register(e){this.Ac(e,!1)}replace(e){this.Ac(e,!0)}Ac(e,n){var o;Eo((o=this._instance)===null||o===void 0?void 0:o._addCaptureHook)||(this.Oc(e,n),this.Fc(e,n))}Fc(e,n){const o=e.filter(s=\u003e{var a;return(a=s.conditions)===null||a===void 0||(a=a.actions)===null||a===void 0||(a=a.values)===null||a===void 0?void 0:a.length});var i;if(n\u0026\u0026this.kc.clear(),o.length===0)return void(n\u0026\u0026((i=this.Dc)===null||i===void 0||i.replace([])));this.Dc||(this.Dc=new _Yo(this._instance),this.Dc.init(),this.Dc.dc(s=\u003ethis.onAction(s)));const r=[];o.forEach(s=\u003e{var a;(a=s.conditions)===null||a===void 0||(a=a.actions)===null||a===void 0||a.values.forEach(A=\u003e{if(r.push(A),A.name){var c;const l=(c=this.kc.get(A.name))!==null\u0026\u0026c!==void 0?c:[];l.includes(s.id)||l.push(s.id),this.kc.set(A.name,l)}})}),n?this.Dc.replace(r):this.Dc.register(r)}Lc(e,n){n.forEach((o,i)=\u003e{var r;const s=(r=e.get(i))!==null\u0026\u0026r!==void 0?r:[];o.forEach(a=\u003e{s.includes(a)||s.push(a)}),e.set(i,s)})}Oc(e,n){var o,i;const r=e.filter(c=\u003e{var l,u;return((l=c.conditions)===null||l===void 0?void 0:l.events)\u0026\u0026((u=c.conditions)===null||u===void 0||(u=u.events)===null||u===void 0||(u=u.values)===null||u===void 0?void 0:u.length)\u003e0}),s=e.filter(c=\u003e{var l,u;return((l=c.conditions)===null||l===void 0?void 0:l.cancelEvents)\u0026\u0026((u=c.conditions)===null||u===void 0||(u=u.cancelEvents)===null||u===void 0||(u=u.values)===null||u===void 0?void 0:u.length)\u003e0}),a=this.Ec(e,eq.Activation),A=this.Ec(e,eq.Cancellation);n?(this._c=a,this.wc=A):(this.Lc(this._c,a),this.Lc(this.wc,A)),(r.length!==0||s.length!==0||e.some(c=\u003e{var l;return(l=c.conditions)===null||l===void 0||(l=l.actions)===null||l===void 0||(l=l.values)===null||l===void 0?void 0:l.length}))\u0026\u0026((o=this.hc)!==null\u0026\u0026o!==void 0||(this.hc=(i=this._instance)===null||i===void 0?void 0:i._addCaptureHook((c,l)=\u003e{this.onEvent(c,l)})))}onEvent(e,n){var o,i;const r=this.Nc(),s=(n==null||(o=n.properties)===null||o===void 0?void 0:o.$survey_id)||(n==null||(i=n.properties)===null||i===void 0?void 0:i.$product_tour_id);if(s\u0026\u0026this.getActivatedIds().includes(s)){const A=this.qc(e,s,n);if(A===\"consume\")return r.info(\"event consumed activated item, removing it\",{event:e,itemId:s}),void this.jc([s]);if(A===\"persist\")return r.info(\"shown item promoted to persisted activation\",{event:e,itemId:s}),this.Bc(s),void this.Hc([s])}if(this.wc.has(e)){const A=this.Pc(e,n,eq.Cancellation);A.length\u003e0\u0026\u0026(r.info(\"cancel event matched, cancelling items\",{event:e,itemsToCancel:A.map(c=\u003ec.id)}),this.jc(A.map(c=\u003ec.id)),A.forEach(c=\u003ethis.zc(c.id)))}if(!this._c.has(e))return;r.info(\"event name matched\",{event:e,eventPayload:n,items:this._c.get(e)});const a=this.Pc(e,n,eq.Activation);this.Uc(a.map(A=\u003eA.id))}onAction(e){this.kc.has(e)\u0026\u0026this.Uc(this.kc.get(e)||[])}Uc(e){var n,o;if(e.length===0)return;const i=!!(!((n=this._instance)===null||n===void 0||(o=n.get_session_id)===null||o===void 0)\u0026\u0026o.call(n)),r=[];for(const s of e)i\u0026\u0026this.$c(s)?this.Bc(s)\u0026\u0026this.Wc(s):r.push(s);r.length\u003e0\u0026\u0026(this.yc=[...new Set([...this.yc,...r])]),this.Nc().info(\"updating activated items\",{activatedItems:this.getActivatedIds()}),this.Vc()}Bc(e){this.yc=this.yc.filter(o=\u003eo!==e);const n=this.Gc();return!n.includes(e)\u0026\u0026(this.Qc([...n,e]),this.Jc(),!0)}jc(e){const n=new Set(e);this.yc=this.yc.filter(r=\u003e!n.has(r));const o=this.Zc(),i=o.filter(r=\u003e!n.has(r));i.length!==o.length\u0026\u0026(this.Qc(i),i.length===0\u0026\u0026this.Kc()),this.Hc(e),this.Vc()}Vc(){try{var e;(e=this.bc)===null||e===void 0||e.call(this)}catch(n){this.Nc().error(\"Error while handling activated items change\",n)}}Xc(){var e;const n=this.Cc();if(!n)return{};const o=(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.props[n];return o\u0026\u0026typeof o==\"object\"?o:{}}Wc(e){if(!this.Cc())return;const n=this.Xc();this.Tc(sn(sn({},n),{},{[e]:Date.now()}))}Hc(e){if(!this.Cc())return;const n=this.Xc(),o={};let i=!1;for(const[r,s]of Object.entries(n))e.includes(r)?i=!0:o[r]=s;i\u0026\u0026(Rx(o)?this.Ic():this.Tc(o))}Yc(){this.Cc()\u0026\u0026this.Ic()}getActivationTimestamp(e){if(!this.Gc().includes(e))return;const n=this.Xc()[e];return Ah(n)?n:void 0}Zc(){var e;const n=this.td();return((e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.props[n])||[]}Gc(){var e,n,o;const i=this.Zc();if(i.length===0)return[];const r=(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.props[this.ed()],s=(n=this._instance)===null||n===void 0||(o=n.get_session_id)===null||o===void 0?void 0:o.call(n);return s\u0026\u0026r===s?i:[]}Jc(){var e,n;const o=(e=this._instance)===null||e===void 0||(n=e.get_session_id)===null||n===void 0?void 0:n.call(e);o\u0026\u0026this.nd(o)}Kc(){this.sd()}xc(e){var n;const o=(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0?void 0:n.props[this.ed()];if(o\u0026\u0026o!==e){const i=this.Zc(),r=this.Xc();i.length\u003e0\u0026\u0026(this.Qc([]),i.filter(s=\u003eAh(r[s])).forEach(s=\u003ethis.zc(s))),this.Kc(),this.Yc(),i.length\u003e0\u0026\u0026this.Vc()}}getActivatedIds(){return[...new Set([...this.Gc(),...this.yc])].filter(e=\u003e!this.rd(e))}dispose(){var e,n,o;(e=this.Sc)===null||e===void 0||e.call(this),this.Sc=void 0,(n=this.hc)===null||n===void 0||n.call(this),this.hc=void 0,(o=this.Dc)===null||o===void 0||o.dispose(),this.Dc=void 0}reset(){this.yc=[],this.Zc().length\u003e0\u0026\u0026this.Qc([]),this.Kc(),this.Yc(),this.Vc()}getEventToItemsMap(){return this._c}od(){return this.Dc}},IYo=class extends fYo{constructor(e,n){super(e,n)}td(){return YHt}ed(){return UHt}Cc(){return KHt}Tc(e){var n;(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$surveys_activated_timestamps:e})}Ic(){var e;(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0||e.unregister(\"$surveys_activated_timestamps\")}$c(e){var n;let o;this.Rc(r=\u003e{o=r.find(s=\u003es.id===e)});const i=o==null||(n=o.appearance)===null||n===void 0?void 0:n.surveyPopupDelaySeconds;return Ah(i)\u0026\u0026i\u003e0}ad(){return dE.SHOWN}Rc(e){var n;(n=this._instance)===null||n===void 0||n.getSurveys(e)}zc(e){var n;(n=this._instance)===null||n===void 0||n.cancelPendingSurvey(e)}Nc(){return yl}Qc(e){var n;(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$surveys_activated:e})}nd(e){var n;(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$surveys_activated_session:e})}sd(){var e;(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0||e.unregister(\"$surveys_activated_session\")}rd(){return!1}qc(e,n,o){var i;if(e===dE.SENT\u0026\u0026(o==null||(i=o.properties)===null||i===void 0?void 0:i.$survey_completed)===!1)return\"ignore\";let r;return this.Rc(s=\u003e{r=s.find(a=\u003ea.id===n)}),!r||(function(s){var a;return BGt(s)\u0026\u0026!!(!((a=s.conditions)===null||a===void 0||(a=a.events)===null||a===void 0)\u0026\u0026a.repeatedActivation)||s.schedule===\"always\"})(r)?e===dE.SHOWN?\"consume\":\"ignore\":e===dE.SHOWN?\"persist\":e===dE.DISMISSED||e===dE.SENT?\"consume\":\"ignore\"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}},CYo=class{constructor(e){this._instance=e}initialize(){}get(e){if(typeof e==\"string\")return this._instance.get_property(e);const n={};for(const o of e){const i=this._instance.get_property(o);Eo(i)||(n[o]=i)}return n}set(e,n){this._instance.register(typeof e==\"string\"?{[e]:n}:e)}remove(e){typeof e!=\"string\"?e.forEach(n=\u003ethis._instance.unregister(n)):this._instance.unregister(e)}},yYo=class{constructor(e){this._instance=e}get(){const e=this._instance.config;return{disableSurveys:e.disable_surveys,cookielessMode:!!e.cookieless_mode,advancedEnableSurveys:e.advanced_enable_surveys,requestTimeoutMs:e.surveys_request_timeout_ms}}isOptedOut(){return this._instance.consent.isOptedOut()}isCapturing(){return this._instance.is_capturing()}getExtensions(){const e=Vr?.__PosthogExtensions__;if(!e)return;const{generateSurveys:n,loadExternalDependency:o}=e;return{generateSurveys:n?i=\u003en(this._instance,i):void 0,loadExternalDependency:o?i=\u003eo(this._instance,\"surveys\",i):void 0}}createEventReceiver(e){return new IYo(this._instance,e)}onMatchingConditionsChanged(e){const n=this._instance._addCaptureHook(s=\u003e{s!==\"$pageview\"\u0026\u0026s!==dE.SHOWN\u0026\u0026s!==dE.DISMISSED\u0026\u0026s!==dE.SENT||e()}),o=()=\u003ee();el(Fn,\"PHSurveyShown\",o);let i=!1;const r=this._instance.onFeatureFlags(()=\u003e{i\u0026\u0026e()});return i=!0,()=\u003e{i=!1,n(),r(),Fn?.removeEventListener(\"PHSurveyShown\",o)}}};const xYo=Fn?.location?Mge(Fn.location.hash,\"__posthog\")||Mge(location.hash,\"state\"):null,zGt=\"_postHogToolbarParams\",JGt=Cd(\"[Toolbar]\"),WGt=Cd(\"[FeatureFlags]\");var EYo=class{constructor(e,n=!1){this.ld=!1,this.update(e,n)}update(e,n){this.ud=((o,i)=\u003e{var r,s,a,A,c,l,u,g;return{bootstrap:{featureFlags:(r=(s=o.bootstrap)===null||s===void 0?void 0:s.featureFlags)!==null\u0026\u0026r!==void 0?r:void 0,featureFlagPayloads:(a=(A=o.bootstrap)===null||A===void 0?void 0:A.featureFlagPayloads)!==null\u0026\u0026a!==void 0?a:void 0},remoteRequestsDisabled:i,featureFlagsDisabled:!!o.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!o.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!o.advanced_feature_flags_dedup_per_session,cacheTtlMs:o.feature_flag_cache_ttl_ms,refreshIntervalMs:(c=o.remote_config_refresh_interval_ms)!==null\u0026\u0026c!==void 0?c:3e5,idleRefreshBackoff:Eo(o.remote_config_refresh_interval_ms),requestTimeoutMs:o.feature_flag_request_timeout_ms,requestMaxRetries:Math.max(0,(l=o.feature_flag_request_max_retries)!==null\u0026\u0026l!==void 0?l:1),compression:o.disable_compression?void 0:\"best-available\",evaluationContexts:(u=(g=o.evaluation_contexts)!==null\u0026\u0026g!==void 0?g:o.evaluation_environments)!==null\u0026\u0026u!==void 0?u:[],flagKeys:As(o.flag_keys)?o.flag_keys:void 0}})(e,n),!e.evaluation_environments||e.evaluation_contexts||this.ld||(WGt.warn(\"evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version.\"),this.ld=!0),Eo(e.flag_keys)||As(e.flag_keys)||WGt.error(\"Invalid flag_keys found:\",e.flag_keys,\"Expected array of non-empty strings\")}get(){return this.ud}};const jGt=Cd(\"[FeatureFlags]\"),QR=Cd(\"[FeatureFlags]\",{debugEnabled:!0}),nRe=`\" failed. Feature flags didn't load in time.`,BYo=[502,504],$Gt=[\"click\",\"keydown\",\"wheel\",\"touchstart\",\"pointerdown\"],qGt=\"connection_error\",XGt=t=\u003e{const e={};for(let n=0;t.length\u003en;n++)e[t[n]]=!0;return e},ZGt=t=\u003e{const e={};for(const[n,o]of vge(t||{}))o\u0026\u0026(e[n]=o);return e},eYt=t=\u003ezO(t)\u0026\u0026(t.name===\"RangeError\"\u0026\u0026t.message.indexOf(\"Maximum call stack size exceeded\")===0||t.name===\"InternalError\"\u0026\u0026t.message===\"too much recursion\"),FB=Cd(\"[Error tracking]\"),oRe=\"webkit-masked-url:\",bYo=[{value:\"isolatedAPI.contexts.topHostname\",exact:!1},{value:\"No response from target\",exact:!0}],SYo=[\"chrome-extension://\",\"moz-extension://\",\"safari-extension:\",\"safari-web-extension:\",oRe],QYo=[\"__firefox__\",\"__gCrWeb\"],tYt=\"Refusing to render web experiment since the viewer is a likely bot\",vYo={icontains:(t,e)=\u003ee.toLowerCase().indexOf(t.toLowerCase())\u003e-1,not_icontains:(t,e)=\u003ee.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=\u003eHge(e,t),not_regex:(t,e)=\u003e!Hge(e,t),exact:(t,e)=\u003ee===t,is_not:(t,e)=\u003ee!==t},A4=Cd(\"[Conversations]\"),vR=\"Conversations not available yet.\";function nYt(t,e){var n,o,i,r,s,a,A;const c=(n=t?.flushIntervalMs)!==null\u0026\u0026n!==void 0?n:3e3,l=(o=t?.maxBufferSize)!==null\u0026\u0026o!==void 0?o:100,u=e?.consoleCapture?void 0:(i=t?.maxLogsPerInterval)!==null\u0026\u0026i!==void 0?i:1e3,g=Eo(u)?Math.max(l,2048):Math.max(l,u),h=sn(sn({},(function(){let d=\"\",p=\"\";try{const m=tf?.userAgent;m\u0026\u0026([d,p]=WLt(m))}catch{}return(function(m,_){const f=(function(I){if(I)return{}.hasOwnProperty.call(EHt,I)?EHt[I]:I})(m);return sn(sn({},f?{\"os.name\":f}:{}),_?{\"os.version\":_}:{})})(d,p)})()),t?.resourceAttributes);return{serviceName:(r=(s=h?.[\"service.name\"])!==null\u0026\u0026s!==void 0?s:t?.serviceName)!==null\u0026\u0026r!==void 0?r:e?.serviceNameDefault,serviceVersion:(a=h?.[\"service.version\"])!==null\u0026\u0026a!==void 0?a:t?.serviceVersion,environment:(A=h?.[\"deployment.environment\"])!==null\u0026\u0026A!==void 0?A:t?.environment,resourceAttributes:h,beforeSend:t?.beforeSend,flushIntervalMs:c,maxBufferSize:l,maxQueueSize:g,maxBatchRecordsPerPost:100,rateCapWindowMs:c,maxLogsPerInterval:u,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}const wYo=[\"debug\",\"log\",\"warn\",\"error\",\"info\"],PYo=t=\u003e{for(;t?.__rrweb_original__;)t=t.__rrweb_original__;return t},oYt=\"console\",iYt=\"__posthogHandledLogsRequestError\",iRe=(t,e)=\u003e{const n=t instanceof Error?t:new Error(e);return n[iYt]=!0,n},rYt=t=\u003e!!t\u0026\u0026typeof t==\"object\"\u0026\u0026t[iYt]===!0,Yge=Cd(\"[NetworkMetrics]\"),rRe=()=\u003e{var t;return!(Fn==null||(t=Fn.performance)===null||t===void 0)\u0026\u0026t.now?Fn.performance.now():Date.now()},MYo={\"http:\":80,\"https:\":443},DYo=new Set([\"CONNECT\",\"DELETE\",\"GET\",\"HEAD\",\"OPTIONS\",\"PATCH\",\"POST\",\"PUT\",\"TRACE\"]),sYt=(t,e)=\u003e{var n;const o=String(e);return{method:String(t).toUpperCase(),url:((n=Kb(o))===null||n===void 0?void 0:n.href)||o}},sRe=(t,e,n,o,i,r,s=!1)=\u003e{try{var a,A;const c=i();if(!c)return;const l=n||void 0,u=rRe()-o,g=Kb(e.url);if(g\u0026\u0026g.protocol!==\"http:\"\u0026\u0026g.protocol!==\"https:\")return;const h={url:g?.href||e.url,method:e.method},d=nf(c.name)?c.name(h):rA(c.name)?c.name:\"http.client.request.duration\";if(!d)return;const p=s\u0026\u0026!l?void 0:((_,f)=\u003e_?400\u003e_?void 0:String(_):f?.name||\"_OTHER\")(l,r),m=sn(sn(sn(sn(sn({},(_=\u003e{const f=DYo.has(_)?_:\"_OTHER\";return sn({\"http.request.method\":f},f===\"_OTHER\"\u0026\u0026_!==f?{\"http.request.method_original\":_}:{})})(h.method)),g?(_=\u003e{return{\"server.address\":_.hostname.startsWith(\"[\")\u0026\u0026_.hostname.endsWith(\"]\")?_.hostname.slice(1,-1):_.hostname,\"server.port\":Number(_.port)||MYo[_.protocol],\"url.scheme\":_.protocol.slice(0,-1),\"url.template\":(f=_.pathname,f.split(\"/\").map(I=\u003e(C=\u003e/^\\d+$/.test(C)||C.length\u003e=8\u0026\u0026/^[0-9a-f-]*\\d[0-9a-f-]*$/i.test(C))(I)?\":id\":I).join(\"/\"))};var f})(g):{}),l?{\"http.response.status_code\":l}:{}),p?{\"error.type\":p}:{}),(a=c.attributes)===null||a===void 0?void 0:a.call(c,h,{status:l,durationMs:u}));(A=t.metrics)===null||A===void 0||A.histogram(d,u,{unit:\"ms\",attributes:m})}catch(c){Yge.error(\"Failed to record network metric\",c)}},aYt=()=\u003e{},NYo=(t,e)=\u003enf(Fn?.fetch)?lq(Fn,\"fetch\",n=\u003efunction(...o){const i=rRe(),r=n.apply(this,o);if(!e())return r;try{var s,a,A;const[c,l]=o,u=sYt((s=(a=l?.method)!==null\u0026\u0026a!==void 0?a:c?.method)!==null\u0026\u0026s!==void 0?s:\"GET\",(A=c?.url)!==null\u0026\u0026A!==void 0?A:c);return r.then(g=\u003e(sRe(t,u,g?.status,i,e,void 0,!0),g),g=\u003e{throw sRe(t,u,void 0,i,e,g),g})}catch(c){return Yge.error(\"Failed to observe fetch\",c),r}}):aYt,RYo=(t,e)=\u003e{var n;const o=Fn==null||(n=Fn.XMLHttpRequest)===null||n===void 0?void 0:n.prototype;if(!o)return aYt;const i=new WeakMap,r=lq(o,\"open\",a=\u003efunction(...A){try{aGt.has(this)||i.set(this,sYt(A[0],A[1]))}catch(c){Yge.error(\"Failed to observe XHR open\",c)}return a.apply(this,A)}),s=lq(o,\"send\",a=\u003efunction(...A){let c;try{const l=i.get(this);if(l\u0026\u0026e()){const u=rRe();c=()=\u003e{this.removeEventListener(\"loadend\",c),sRe(t,l,this.status,u,e)},el(this,\"loadend\",c)}}catch(l){Yge.error(\"Failed to observe XHR send\",l)}try{return a.apply(this,A)}catch(l){throw c\u0026\u0026this.removeEventListener(\"loadend\",c),l}});return()=\u003e{r(),s()}},Uge={featureFlags:class{constructor(t){this.name=\"featureFlags\",this.hd=!1,this.featureFlagEventHandlers=[],this.A=jGt,this.dd={},this.vd={},this.fd=[],this.pd=!1,this.gd=!1,this.md=0,this.yd=!1,this.bd=!1,this._d=!1,this.wd=!1,this.kd=0,this.Sd=!1,this.rn=()=\u003e{const e=this.xd();this.kd=0,e\u0026\u0026this.reloadFeatureFlags()},this.$d=()=\u003e{var e,n;const o=this.Cd,i=(e=this.Td)!==null\u0026\u0026e!==void 0?e:o;Eo(o)||Eo(i)||this.Mr.remoteRequestsDisabled||!No||No.visibilityState===\"hidden\"||Date.now()-((n=this.Id)!==null\u0026\u0026n!==void 0?n:0)\u003ci||(this.Td=this.Sd||!this.Mr.idleRefreshBackoff?o:Math.min(2*i,36e5),this.Sd=!1,this.reloadFeatureFlags(),this.Md())},this.Ed=()=\u003e{this.Sd\u0026\u0026this.Td===this.Cd||this.Pd()},this.sn=()=\u003e{No?.visibilityState===\"visible\"\u0026\u0026this.Pd()},\"get\"in t?this.wo=t:(this._instance=t,this.Rd=new EYo(t.config,t.il()),this.wo=this.Rd)}updateConfig(t,e){var n;(n=this.Rd)===null||n===void 0||n.update(t,e),this.bo\u0026\u0026this.Ad()}setup(t){return this.jh=t,this.A=t.logger.createLogger(\"[FeatureFlags]\"),KGt(t.kv.initialize(),()=\u003e{this.jh===t\u0026\u0026(this.jh=void 0,this.bo=t,this.Od(t))})}Od(t){var e;if(this.bo===t)return Fn\u0026\u0026el(Fn,\"online\",this.rn),this.Ad(),this.Fd=t.registerDynamicEventProperties(()=\u003ethis.Dd()?this.dd:this.vd),this.Ld=(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.onCrossTabFeatureFlagChange(()=\u003e{this.Nd(),this.qd(),this.jd()}),this.qd(),this.initialize()}Pd(){this.Sd=!0,this.Td=this.Cd,this.$d()}Ad(){const t=this.Mr.refreshIntervalMs,e=!this.Mr.remoteRequestsDisabled\u0026\u0026No\u0026\u0026!Eo(t)\u0026\u0026t\u003e0?t:void 0;this.Mr.idleRefreshBackoff||(this.Td=e),e!==this.Cd\u0026\u0026(this.Bd(),Eo(e)||(this.Cd=e,this.Td=e,this.Md(),No?.addEventListener\u0026\u0026(el(No,U$,this.sn),XO($Gt,n=\u003e{el(No,n,this.Ed,{capture:!0})}))))}Md(){Eo(this.Cd)||(Eo(this.Hd)||clearInterval(this.Hd),this.Id=Date.now(),this.Hd=setInterval(this.$d,this.Cd))}Bd(){var t;Eo(this.Hd)||(clearInterval(this.Hd),this.Hd=void 0,No==null||(t=No.removeEventListener)===null||t===void 0||t.call(No,\"visibilitychange\",this.sn),XO($Gt,e=\u003e{var n;No==null||(n=No.removeEventListener)===null||n===void 0||n.call(No,e,this.Ed,{capture:!0})})),this.Cd=void 0,this.Td=void 0,this.Sd=!1,this.Id=void 0}destroy(){this.zd()}dispose(){this.zd()}zd(){var t,e;this.Bd(),this.md++,this.bd=!1,this.jh=void 0,this.bo\u0026\u0026(this.Ud(),(t=this.Fd)===null||t===void 0||t.dispose(),this.Fd=void 0,(e=this.Ld)===null||e===void 0||e.call(this),this.Ld=void 0,this.fd=[],Fn?.removeEventListener(\"online\",this.rn),this.bo=void 0)}get Mr(){return this.wo.get()}Wd(t){var e;return this.Vd\u0026\u0026t in this.Vd?this.Vd[t]:(e=this.bo)===null||e===void 0?void 0:e.kv.get(t)}Nd(){return!!this.Vd\u0026\u0026(this.Vd=void 0,!0)}Gd(){var t;return!Eo((t=this.bo)===null||t===void 0?void 0:t.kv.get(\"$enabled_feature_flags\"))\u0026\u0026this.Nd()}$t(t){this.Qd(()=\u003e{var e;return(e=this.bo)===null||e===void 0?void 0:e.kv.set(t)})}Jd(t,e,n){var o;if(!(!((o=this._instance)===null||o===void 0)\u0026\u0026o.persistence)||!t.$enabled_feature_flags)return;const i=this.Wd(\"$enabled_feature_flags\")||{},r=t.$enabled_feature_flags||{},s=e.flags||e.featureFlags,a=e.flags?Object.entries(e.flags).filter(([,_])=\u003e!_?.failed).map(([_])=\u003e_):[],A=!!e.errorsWhileComputingFlags\u0026\u0026!!e.flags,c=A?a:n\u0026\u0026!As(s)?Object.keys(s||{}):Array.from(new Set([...Object.keys(i),...Object.keys(r)])),l=this.Wd(\"$feature_flag_payloads\")||{},u=t.$feature_flag_payloads||{},g=A||n?c:Array.from(new Set([...Object.keys(l),...Object.keys(u)])),h=!A\u0026\u0026!n,d=!!h||c,p=!!h||g,m={[Yb]:d,[TB]:d,[Dw]:p};t.$feature_flag_details\u0026\u0026(m[CR]=d);for(const _ of[yR,kw,H$])Eo(t[_])||(m[_]=!0);this._instance.persistence.markCrossTabFeatureFlagChanges(m)}Pt(t){this.Qd(()=\u003e{var e;return(e=this.bo)===null||e===void 0?void 0:e.kv.remove(t)})}Qd(t){try{t()}catch(e){this.A.error(\"Failed to update feature flag persistence\",e)}}qd(){const t={};for(const o of[Yb,Dw,yR,g6]){const i=this.Wd(o);Eo(i)||(t[o]=i)}this.dd=t;const e=sn({},t),n=this.Wd(TB);if(n)for(const[o,i]of Object.entries(n))e[`$feature/${o}`]=i;this.vd=e}Dd(){const t=this.Mr.cacheTtlMs;if(!t||0\u003e=t)return!1;const e=this.Wd(kw);return typeof e!=\"number\"||Date.now()-e\u003et}Zd(){return!!this.Dd()\u0026\u0026(this.wd||this.gd||(this.wd=!0,this.A.warn(\"Feature flag cache is stale, triggering refresh...\"),this.reloadFeatureFlags()),!0)}Kd(){const t=this.Mr.evaluationContexts;return t?.length?t.filter(e=\u003e{const n=e\u0026\u0026typeof e==\"string\"\u0026\u0026e.trim().length\u003e0;return n||this.A.error(\"Invalid evaluation context found:\",e,\"Expected non-empty string\"),n}):[]}Xd(){const t=this.Mr.flagKeys;if(!Eo(t))return t.filter(e=\u003e{const n=e\u0026\u0026typeof e==\"string\"\u0026\u0026e.trim().length\u003e0;return n||this.A.error(\"Invalid flag key found:\",e,\"Expected non-empty string\"),n})}initialize(){var t,e;const n=this.Mr,o=(t=(e=n.bootstrap)===null||e===void 0?void 0:e.featureFlags)!==null\u0026\u0026t!==void 0?t:{};if(Object.keys(o).length){var i,r;const s=(i=(r=n.bootstrap)===null||r===void 0?void 0:r.featureFlagPayloads)!==null\u0026\u0026i!==void 0?i:{},a=Object.keys(o).filter(c=\u003e!Eo(o[c])).reduce((c,l)=\u003e(c[l]=o[l],c),{}),A=Object.keys(s).filter(c=\u003ea[c]).reduce((c,l)=\u003e(c[l]=s[l],c),{});return this.Yd({featureFlags:a,featureFlagPayloads:A},void 0,{persist:!1})}}updateFlags(t,e,n){var o,i;const r=n?.merge\u0026\u0026(o=this.Wd(\"$enabled_feature_flags\"))!==null\u0026\u0026o!==void 0?o:{},s=n?.merge\u0026\u0026(i=this.Wd(\"$feature_flag_payloads\"))!==null\u0026\u0026i!==void 0?i:{},a=sn(sn({},r),t),A=sn(sn({},s),e),c={};for(const[l,u]of Object.entries(a))c[l]={key:l,enabled:dHt(u),variant:hHt(u),reason:void 0,metadata:Eo(A?.[l])?void 0:{id:0,version:void 0,description:void 0,payload:A[l]}};this.Yd({flags:c})}get hasLoadedFlags(){return this.pd}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){const t=this.Wd(CR),e=this.Wd(g6),n=this.Wd(xR);if(!n\u0026\u0026!e)return t||{};const o=eg({},t||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(const a of i){var r;const A=o[a],c=e?.[a],l=Eo(c)?(r=A?.enabled)!==null\u0026\u0026r!==void 0\u0026\u0026r:!!c,u=Eo(c)?A?.variant:typeof c==\"string\"?c:void 0,g=n?.[a],h=sn(sn({},A),{},{enabled:l,variant:l?u??A?.variant:void 0});var s;l!==A?.enabled\u0026\u0026(h.original_enabled=A?.enabled),u!==A?.variant\u0026\u0026(h.original_variant=A?.variant),g\u0026\u0026(h.metadata=sn(sn({},A?.metadata),{},{payload:g,original_payload:A==null||(s=A.metadata)===null||s===void 0?void 0:s.payload})),o[a]=h}return this.hd||(this.A.warn(\" Overriding feature flag details!\",{flagDetails:t,overriddenPayloads:n,finalDetails:o}),this.hd=!0),o}getAllFeatureFlags(){const t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map(n=\u003e{const o=t[n];return{key:n,enabled:dHt(o),variant:hHt(o),payload:gHt(e[n])}})}getFlagVariants(){const t=this.Wd(TB),e=this.Wd(g6);if(!e)return t||{};const n=eg({},t||{}),o=Object.keys(e);for(let i=0;o.length\u003ei;i++)n[o[i]]=e[o[i]];return this.hd||(this.A.warn(\" Overriding feature flags!\",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.hd=!0),n}getFlagPayloads(){const t=this.Wd(Dw),e=this.Wd(xR);if(!e)return t||{};const n=eg({},t||{}),o=Object.keys(e);for(let i=0;o.length\u003ei;i++)n[o[i]]=e[o[i]];return this.hd||(this.A.warn(\" Overriding feature flag payloads!\",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.hd=!0),n}reloadFeatureFlags(){this.yd||this.Mr.featureFlagsDisabled||this.xd()||(this.gd\u0026\u0026(this.bd=!0),this.tv||(this.fd.slice().forEach(t=\u003e{try{t()}catch(e){this.A.error(\"Error while running feature flags reloading callback\",e)}}),this.tv=setTimeout(()=\u003e{this.ev()},5)))}Ud(){clearTimeout(this.tv),this.tv=void 0}onReloading(t){return this.fd.push(t),()=\u003e{this.fd=this.fd.filter(e=\u003ee!==t)}}ensureFlagsLoaded(){this.pd||this.gd||this.tv||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.yd=t}resetFlagCallReported(){this.Pt(Tw)}ev(t){this.Ud();const e=this.bo;if(!e||this.Mr.remoteRequestsDisabled||this.xd())return;if(this.gd)return void(this.bd=!0);const n={token:e.projectToken,distinct_id:e.distinctId,groups:e.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:sn(sn(sn({},e.initialPersonProperties),this.Wd(\"$stored_person_properties\")||{}),{},{$lib:e.library.name,$lib_version:e.library.version}),group_properties:this.Wd(Rw),timezone:VOt()};Eo(e.deviceId)||(n.$device_id=e.deviceId),(t?.disableFlags||this.Mr.featureFlagsDisabled)\u0026\u0026(n.disable_flags=!0);const o=this.Kd();o.length\u0026\u0026(n.evaluation_contexts=o);const i=this.Xd();Eo(i)||(n.flag_keys=i);const r=this.Mr.onlyEvaluateSurveyFeatureFlags,s=\"/flags/?v=2\"+(r?\"\u0026only_evaluate_survey_feature_flags=true\":\"\"),a=this.md;this.gd=!0;const A=()=\u003e{this.bd\u0026\u0026(this.bd=!1,this.ev())},c=d=\u003e{var p,m;const _=(p=d.json)!==null\u0026\u0026p!==void 0?p:{},f=d.statusCode!==200;if(this.gd=!1,a!==this.md)return void A();if(this.iv(d.statusCode),f||this.bd||(this.$anon_distinct_id=void 0),n.disable_flags\u0026\u0026!this.bd)return;this._d=!f;const I=[];d.error?I.push(d.error instanceof Error\u0026\u0026d.error.name===\"AbortError\"?\"timeout\":d.error instanceof Error?qGt:\"unknown_error\"):d.statusCode!==200\u0026\u0026I.push(`api_error_${d.statusCode}`),_.errorsWhileComputingFlags\u0026\u0026I.push(\"errors_while_computing_flags\");const C=!!(!((m=_.quotaLimited)===null||m===void 0)\u0026\u0026m.includes(\"feature_flags\"));C\u0026\u0026I.push(\"quota_limited\"),this.$t({[Y$]:I}),C?this.A.warn(\"You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.\"):n.disable_flags||this.Yd(_,f,{partialResponse:r}),A()},l=d=\u003e{this.gd=!1,a===this.md\u0026\u0026(this.$t({[Y$]:[qGt]}),this.A.error(\"Feature flag request failed\",d),this.Gd()\u0026\u0026this.jd(!0)),A()};let u=this.Mr.requestMaxRetries;const g=()=\u003eu\u003e0\u0026\u0026a===this.md,h=()=\u003e{if(a!==this.md||!this.bo||this.Mr.remoteRequestsDisabled)return this.gd=!1,void A();try{e.sendRequest(s,{target:\"flags\",method:\"POST\",body:n,compression:this.Mr.compression,sentAt:\"body\",timeoutMs:this.Mr.requestTimeoutMs}).then(d=\u003e{if((p=\u003eBYo.includes(p.statusCode)||(m=\u003em.statusCode===0\u0026\u0026m.error instanceof Error\u0026\u0026m.error.name===\"AbortError\")(p))(d)\u0026\u0026g())return u--,void setTimeout(h,500);c(d)}).catch(l)}catch(d){l(d)}};h()}xd(){return kOt(this.kd,3)}iv(t){this.kd=FOt(t,this.kd,3,()=\u003ethis.A.warn(\"Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.\"))}getFeatureFlag(t,e={}){var n;if(e.fresh\u0026\u0026!this._d)return;if(!(this.pd||this.getFlags()\u0026\u0026this.getFlags().length\u003e0))return void this.A.warn('getFeatureFlag for key \"'+t+nRe);if(this.Zd())return;const o=this.getFeatureFlagResult(t,e);return(n=o?.variant)!==null\u0026\u0026n!==void 0?n:o?.enabled}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){const e=this.getFeatureFlagResult(t,{send_event:!1});return e?.payload}getFeatureFlagResult(t,e={}){if(e.fresh\u0026\u0026!this._d)return;if(!(this.pd||this.getFlags()\u0026\u0026this.getFlags().length\u003e0))return void this.A.warn('getFeatureFlagResult for key \"'+t+nRe);if(this.Zd())return;const n=this.getFlagVariants(),o=t in n,i=n[t],r=this.getFlagPayloads()[t],s=String(i),a=this.Wd(\"$feature_flag_request_id\")||void 0,A=this.Wd(\"$feature_flag_evaluated_at\")||void 0;let c,l=this.Wd(\"$flag_call_reported\")||{};if(this.Mr.deduplicateCallsPerSession){var u;const S=(u=this.bo)===null||u===void 0?void 0:u.session.sessionId,Q=this.Wd(G$);S\u0026\u0026S!==Q\u0026\u0026(l={},c=S)}if(e.send_event||!(\"send_event\"in e))if(t in l\u0026\u0026l[t].includes(s))c\u0026\u0026this.$t({[Tw]:l,[G$]:c});else{var g,h,d,p,m,_,f,I,C,y,x,E;As(l[t])?l[t].push(s):l[t]=[s],this.$t(sn({[Tw]:l},c?{[G$]:c}:{}));const S=this.getFeatureFlagDetails(t),Q=[...(g=this.Wd(\"$feature_flag_errors\"))!==null\u0026\u0026g!==void 0?g:[]];Eo(i)\u0026\u0026Q.push(\"flag_missing\");const w={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:r??null,$feature_flag_request_id:a,$feature_flag_evaluated_at:A,$feature_flag_bootstrapped_response:(h=(d=this.Mr.bootstrap)===null||d===void 0||(d=d.featureFlags)===null||d===void 0?void 0:d[t])!==null\u0026\u0026h!==void 0?h:null,$feature_flag_bootstrapped_payload:(p=(m=this.Mr.bootstrap)===null||m===void 0||(m=m.featureFlagPayloads)===null||m===void 0?void 0:m[t])!==null\u0026\u0026p!==void 0?p:null,$used_bootstrap_value:!this._d};Eo(S==null||(_=S.metadata)===null||_===void 0?void 0:_.has_experiment)||(w.$feature_flag_has_experiment=S.metadata.has_experiment),Eo(S==null||(f=S.metadata)===null||f===void 0?void 0:f.version)||(w.$feature_flag_version=S.metadata.version);const M=(I=S==null||(C=S.reason)===null||C===void 0?void 0:C.description)!==null\u0026\u0026I!==void 0?I:S==null||(y=S.reason)===null||y===void 0?void 0:y.code;var B;M\u0026\u0026(w.$feature_flag_reason=M),!(S==null||(x=S.metadata)===null||x===void 0)\u0026\u0026x.id\u0026\u0026(w.$feature_flag_id=S.metadata.id),Eo(S?.original_variant)\u0026\u0026Eo(S?.original_enabled)||(w.$feature_flag_original_response=Eo(S.original_variant)?S.original_enabled:S.original_variant),!(S==null||(E=S.metadata)===null||E===void 0)\u0026\u0026E.original_payload\u0026\u0026(w.$feature_flag_original_payload=S==null||(B=S.metadata)===null||B===void 0?void 0:B.original_payload),Q.length\u0026\u0026(w.$feature_flag_error=Q.join(\",\")),this.nv(w)}else c\u0026\u0026this.$t({[Tw]:l,[G$]:c});return o?{key:t,enabled:!!i,variant:typeof i==\"string\"?i:void 0,payload:gHt(r)}:void 0}nv(t){try{var e;(e=this.bo)===null||e===void 0||e.capture(\"$feature_flag_called\",t)}catch(n){this.A.error(\"Failed to capture feature flag call\",n)}}getRemoteConfigPayload(t,e){this.sv(t,e)}sv(t,e){var n=this;return Zu(function*(){const o=n.bo;if(!o)return;const i={distinct_id:o.distinctId,token:o.projectToken,person_properties:{$lib:o.library.name,$lib_version:o.library.version}},r=n.Kd();r.length\u0026\u0026(i.evaluation_contexts=r);const s=n.Xd();let a;Eo(s)||(i.flag_keys=s);try{var A;const c=(A=(yield o.sendRequest(\"/flags/?v=2\",{target:\"flags\",method:\"POST\",body:i,compression:n.Mr.compression,sentAt:\"body\",timeoutMs:n.Mr.requestTimeoutMs})).json)===null||A===void 0?void 0:A.featureFlagPayloads;a=c?.[t]||void 0}catch(c){return void n.A.error(\"Remote config feature flag request failed\",c)}try{e(a)}catch(c){n.A.error(\"Remote config feature flag callback failed\",c)}})()}isFeatureEnabled(t,e={}){if(e.fresh\u0026\u0026!this._d)return e.defaultValue;if(!(this.pd||this.getFlags()\u0026\u0026this.getFlags().length\u003e0))return this.A.warn('isFeatureEnabled for key \"'+t+nRe),e.defaultValue;const n=this.getFeatureFlag(t,e);return Eo(n)?e.defaultValue:!!n}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(e=\u003ee!==t)}receivedFeatureFlags(t,e,n){this.Yd(t,e,n)}Yd(t,e,n){if(!this.bo)return;this.pd=!0;const o=((i,r={},s={},a={},A,c=jGt)=\u003e{const l=((I,C)=\u003e{const y=I.flags;if(y){const x=Object.fromEntries(Object.keys(y).map(B=\u003e{var S;return[B,(S=y[B].variant)!==null\u0026\u0026S!==void 0?S:y[B].enabled]})),E=Object.fromEntries(Object.keys(y).filter(B=\u003ey[B].enabled).filter(B=\u003e{var S;return!Eo((S=y[B].metadata)===null||S===void 0?void 0:S.payload)}).map(B=\u003e{var S;return[B,(S=y[B].metadata)===null||S===void 0?void 0:S.payload]}));return sn(sn({},I),{},{featureFlags:x,featureFlagPayloads:E})}return I.featureFlags\u0026\u0026C.warn(\"Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version\"),I})(i,c),u=l.flags,g=l.featureFlags,h=l.featureFlagPayloads;if(!g)return;const d=i.requestId,p=i.evaluatedAt;if(As(g)){c.warn(\"v1 of the feature flags endpoint is deprecated. Please use the latest version.\");const I={};if(g)for(let C=0;g.length\u003eC;C++)I[g[C]]=!0;return{[Yb]:g,[TB]:I,[H$]:!1}}let m=g,_=h,f=u;if(A?.partialResponse){const I=Object.keys(m),C=_||{};m=sn(sn({},r),m),_=sn(sn({},s),C),I.forEach(y=\u003e{y in C||_==null||delete _[y]}),f=sn(sn({},a),f)}else if(i.errorsWhileComputingFlags)if(u){const I=new Set(Object.keys(u).filter(y=\u003e{var x;return!(!((x=u[y])===null||x===void 0)\u0026\u0026x.failed)}));m=sn(sn({},r),Object.fromEntries(Object.entries(m).filter(([y])=\u003eI.has(y))));const C=Object.fromEntries(Object.entries(_||{}).filter(([y])=\u003eI.has(y)));_=sn(sn({},s),C),I.forEach(y=\u003e{y in C||_==null||delete _[y]}),f=sn(sn({},a),Object.fromEntries(Object.entries(f||{}).filter(([y])=\u003eI.has(y))))}else m=sn(sn({},r),m),_=sn(sn({},s),_),f=sn(sn({},a),f);return sn(sn({[Yb]:Object.keys(ZGt(m)),[TB]:m||{},[Dw]:_||{},[CR]:f||{},[H$]:i.minimalFlagCalledEvents===!0},d?{[yR]:d}:{}),p?{[kw]:p}:{})})(t,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),n,this.A);if(o)if(n?.persist===!1){const i=!Eo(this.bo.kv.get(TB));this.Vd=o,i||this.$t(o)}else this.Nd(),this.Jd(o,t,!!n?.partialResponse),this.$t(o);else e\u0026\u0026this.Gd();e||(this.wd=!1),this.jd(e)}override(t,e=!1){this.A.warn(\"override is deprecated. Please use overrideFeatureFlags instead.\"),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){this.rv(t)}rv(t){if(this.bo){if(t===!1)return this.Pt([g6,xR]),this.jd(),void QR.info(\"All overrides cleared\");if(As(t))return this.$t({[g6]:XGt(t)}),this.jd(),void QR.info(\"Flag overrides set\",{flags:t});if(t\u0026\u0026typeof t==\"object\"\u0026\u0026(\"flags\"in t||\"payloads\"in t)){var e;const n=t;this.hd=!!((e=n.suppressWarning)!==null\u0026\u0026e!==void 0\u0026\u0026e);const o={},i=n.flags,r=n.payloads;return i\u0026\u0026(o[g6]=As(i)?XGt(i):i),r\u0026\u0026(o[xR]=r),Object.keys(o).length\u0026\u0026this.$t(o),i===!1\u0026\u0026r===!1?this.Pt([g6,xR]):i===!1?this.Pt(g6):r===!1\u0026\u0026this.Pt(xR),this.jd(),i===!1?QR.info(\"Flag overrides cleared\"):i\u0026\u0026QR.info(\"Flag overrides set\",{flags:i}),void(r===!1?QR.info(\"Payload overrides cleared\"):r\u0026\u0026QR.info(\"Payload overrides set\",{payloads:r}))}if(t\u0026\u0026typeof t==\"object\")return this.$t({[g6]:t}),this.jd(),void QR.info(\"Flag overrides set\",{flags:t});this.A.warn(\"Invalid overrideOptions provided to overrideFeatureFlags\",{overrideOptions:t})}else this.A.warn(\"posthog.featureFlags.overrideFeatureFlags called before feature flags were ready\")}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.pd){const{flags:e,flagVariants:n}=this.ov();try{t(e,n)}catch(o){this.A.error(\"Error while running feature flags callback\",o)}}return()=\u003ethis.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var o;const i=(this.Wd(\"$early_access_features\")||[]).find(c=\u003ec.flagKey===t),r={[`$feature_enrollment/${t}`]:e},s={$feature_flag:t,$feature_enrollment:e,$set:r};i\u0026\u0026(s.$early_access_feature_name=i.name),n\u0026\u0026(s.$feature_enrollment_stage=n);const a=sn(sn({},this.getFlagVariants()),{},{[t]:e});(o=this._instance)===null||o===void 0||(o=o.persistence)===null||o===void 0||o.markCrossTabFeatureFlagChanges({$active_feature_flags:[t],$enabled_feature_flags:[t],$stored_person_properties:Object.keys(r)}),this.$t({[Yb]:Object.keys(ZGt(a)),[TB]:a,[Nw]:sn(sn({},this.Wd(\"$stored_person_properties\")||{}),r)}),this.jd();try{var A;(A=this.bo)===null||A===void 0||A.capture(\"$feature_enrollment_update\",s)}catch(c){this.A.error(\"Failed to capture early access feature enrollment\",c)}}getEarlyAccessFeatures(t,e=!1,n){const o=this.Wd(aNe);!o||e?this.av(t,n):t(o)}av(t,e){var n=this;return Zu(function*(){const o=n.bo;if(!o)return;const i=e?`\u0026${e.map(s=\u003e`stage=${s}`).join(\"\u0026\")}`:\"\";let r;try{const s=yield o.sendRequest(`/api/early_access_features/?token=${o.projectToken}${i}`,{target:\"api\",method:\"GET\",sentAt:\"query\"});if(!s.json)return;r=s.json.earlyAccessFeatures,n.$t({[aNe]:r})}catch(s){return void n.A.error(\"Early access feature request failed\",s)}try{t(r)}catch(s){n.A.error(\"Early access feature callback failed\",s)}})()}ov(){const t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter(n=\u003ee[n]),flagVariants:Object.keys(e).filter(n=\u003ee[n]).reduce((n,o)=\u003e(n[o]=e[o],n),{})}}jd(t){this.qd();const{flags:e,flagVariants:n}=this.ov();this.featureFlagEventHandlers.forEach(o=\u003e{try{o(e,n,{errorsLoading:t})}catch(i){this.A.error(\"Error while running feature flags callback\",i)}})}setPersonPropertiesForFlags(t,e=!0){this.lv(t,e)}lv(t,e=!0){const n=this.Wd(\"$stored_person_properties\")||{},o=t?.$set||(t?.$set_once?{}:t),i=t?.$set_once,r={};if(i)for(const s in i)({}).hasOwnProperty.call(i,s)\u0026\u0026(s in n||(r[s]=i[s]));this.$t({[Nw]:sn(sn(sn({},n),r),o)}),e\u0026\u0026this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e=!0){const n=sn({},this.Wd(\"$stored_person_properties\")||{});t.forEach(o=\u003e{delete n[o]}),this.$t({[Nw]:n}),e\u0026\u0026this.reloadFeatureFlags()}resetPersonPropertiesForFlags(t=!0){this.Pt(Nw),t\u0026\u0026this.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e=!0){const n=this.Wd(\"$stored_group_properties\")||{},o=sn({},n);for(const i of Object.keys(t))o[i]=sn(sn({},n[i]),t[i]);this.$t({[Rw]:o}),e\u0026\u0026this.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){const e=this.Wd(\"$stored_group_properties\")||{};this.$t({[Rw]:sn(sn({},e),{},{[t]:{}})})}else this.Pt(Rw)}reset(){this.md++,this.bd=!1,this.dd={},this.vd={},this.Vd=void 0,this.pd=!1,this.yd=!1,this._d=!1,this.$anon_distinct_id=void 0,this.Ud(),this.hd=!1,this.kd=0}}},TYo={sessionRecording:class{get Mr(){return this._instance.config}get Il(){return this._instance.persistence}get started(){var t;return!!(!((t=this.uv)===null||t===void 0)\u0026\u0026t.isStarted)}get status(){var t,e;return this.hv===\"awaiting_config\"||this.hv===\"missing_config\"?this.hv:(t=(e=this.uv)===null||e===void 0?void 0:e.status)!==null\u0026\u0026t!==void 0?t:this.hv}constructor(t){if(this._instance=t,this._forceAllowLocalhostNetworkCapture=!1,this.hv=ZNe,this.dv=void 0,this.vv=!1,this.Je=(()=\u003e{var e,n;if(!No?.visibilityState||No.visibilityState===\"visible\")return!0;const o=Fn==null||(e=Fn.performance)===null||e===void 0||(n=e.getEntriesByType)===null||n===void 0?void 0:n.call(e,\"visibility-state\");return!o?.length||o.some(i=\u003ei.name===\"visible\")})(),this.sn=()=\u003e{var e,n;No?.visibilityState===\"visible\"\u0026\u0026(this.Je=!0,(e=this.uv)===null||e===void 0||(n=e.setDocumentWasEverVisible)===null||n===void 0||n.call(e,!0))},!this._instance.sessionManager)throw Jb.error(\"started without valid sessionManager\"),new Error(\"[SessionRecording] started without valid sessionManager. This is a bug.\");if(this.Mr.cookieless_mode===\"always\")throw new Error('[SessionRecording] cannot be used with cookieless_mode=\"always\"');No?.addEventListener\u0026\u0026el(No,\"visibilitychange\",this.sn)}initialize(){this.startIfEnabledOrStop()}dispose({discardBufferedEvents:t=!1}={}){var e;this.vv=!0,No==null||(e=No.removeEventListener)===null||e===void 0||e.call(No,\"visibilitychange\",this.sn),t?this.fv(!0):this.stopRecording()}get pv(){var t;const e=!!(!((t=this._instance.get_property(\"$session_recording_remote_config\"))===null||t===void 0)\u0026\u0026t.enabled),n=!this.Mr.disable_session_recording,o=this.Mr.disable_session_recording||this._instance.consent.isOptedOut();return Fn\u0026\u0026e\u0026\u0026n\u0026\u0026!o}startIfEnabledOrStop(t){var e;if(this.vv||this.pv\u0026\u0026(!((e=this.uv)===null||e===void 0)\u0026\u0026e.isStarted))return;const n=!Eo(Object.assign)\u0026\u0026!Eo(Array.from);this.pv\u0026\u0026n?(this.gv(t),Jb.info(\"starting\")):(this.hv=ZNe,this.stopRecording())}gv(t){var e,n;if(this.pv)if(this.hv!==\"awaiting_config\"\u0026\u0026this.hv!==\"missing_config\"\u0026\u0026(this.hv=YGt),(Vr==null||(e=Vr.__PosthogExtensions__)===null||e===void 0||(e=e.rrweb)===null||e===void 0?void 0:e.record)\u0026\u0026((n=Vr.__PosthogExtensions__)===null||n===void 0?void 0:n.initSessionRecording))this.mv(t);else{var o,i;const r=this._instance.sessionManager;(o=Vr.__PosthogExtensions__)===null||o===void 0||(i=o.loadExternalDependency)===null||i===void 0||i.call(o,this._instance,this.yv,s=\u003e{if(!this.vv\u0026\u0026this.pv\u0026\u0026this._instance.sessionManager===r)return s?(this._instance.register_for_session({$sdk_debug_recording_script_not_loaded:!0}),Jb.error(\"could not load recorder\",s)):void this.mv(t);this.hv=\"disabled\"})}}stopRecording(){var t,e;(t=this.dv)===null||t===void 0||t.call(this),this.dv=void 0,(e=this.uv)===null||e===void 0||e.stop()}fv(t=!1){var e,n;(e=this.dv)===null||e===void 0||e.call(this),this.dv=void 0,(n=this.uv)===null||n===void 0||n.discard({discardProducerEvents:t})}bv(){var t,e;(t=this.Il)===null||t===void 0||t.unregister(\"$session_is_sampled\"),(e=this.Il)===null||e===void 0||e.unregister(\"$replay_sample_rate\")}_v(t,e){if(Hs(t))return null;const n=Ah(t)?t:parseFloat(t);return typeof(o=n)!=\"number\"||!Number.isFinite(o)||0\u003eo||o\u003e1?(Jb.warn(`${e} must be between 0 and 1. Ignoring invalid value:`,t),null):n;var o}wv(t){if(this.Il){var e,n;const o=this.Il,i=()=\u003e{var r;const s=t.sessionRecording===!1?void 0:t.sessionRecording,a=this._v((r=this.Mr.session_recording)===null||r===void 0?void 0:r.sampleRate,\"session_recording.sampleRate\"),A=this._v(s?.sampleRate,\"remote config sampleRate\"),c=a??A;Hs(c)\u0026\u0026this.bv();const l=s?.minimumDurationMilliseconds;o.register({[L$]:sn(sn({cache_timestamp:Date.now(),enabled:!!s},s),{},{networkPayloadCapture:sn({capturePerformance:t.capturePerformance},s?.networkPayloadCapture),canvasRecording:{enabled:s?.recordCanvas,fps:s?.canvasFps,quality:s?.canvasQuality},sampleRate:c,minimumDurationMilliseconds:Eo(l)?null:l,endpoint:s?.endpoint,triggerMatchType:s?.triggerMatchType,masking:s?.masking,urlTriggers:s?.urlTriggers,version:s?.version,triggerGroups:s?.triggerGroups})})};i(),(e=this.dv)===null||e===void 0||e.call(this),this.dv=(n=this._instance.sessionManager)===null||n===void 0?void 0:n.onSessionId(i)}}onRemoteConfig(t){const e=t.ok?t.config:void 0;return e\u0026\u0026\"sessionRecording\"in e?e.sessionRecording===!1?(this.wv(e),void this.fv()):(this.wv(e),void this.startIfEnabledOrStop()):(this.hv===\"awaiting_config\"\u0026\u0026(this.hv=\"missing_config\",this._instance.register_for_session({[dNe]:!0}),Jb.warn(\"config refresh failed, recording will not start until page reload\")),void this.startIfEnabledOrStop())}log(t,e=\"log\"){var n;!((n=this.uv)===null||n===void 0)\u0026\u0026n.log?this.uv.log(t,e):Jb.warn(\"log called before recorder was ready\")}get yv(){var t,e;const n=(t=this._instance)===null||t===void 0||(t=t.persistence)===null||t===void 0?void 0:t.get_property(L$);return(n==null||(e=n.scriptConfig)===null||e===void 0?void 0:e.script)||\"lazy-recorder\"}Sv(){const t=this._instance.get_property(L$);if(!t)return!1;let e;try{e=typeof t==\"object\"?t:JSON.parse(t)}catch(n){return Jb.warn(\"persisted remote config for session recording is invalid and will be ignored\",n),!1}return!Hs(e.cache_timestamp)\u0026\u002636e5\u003e=Date.now()-e.cache_timestamp}mv(t){var e,n,o;if(!this.vv\u0026\u0026this.pv\u0026\u0026this._instance.sessionManager){if(!(!((e=Vr.__PosthogExtensions__)===null||e===void 0)\u0026\u0026e.initSessionRecording))return Jb.warn(\"Called on script loaded before session recording is available. This can be caused by adblockers.\"),void this._instance.register_for_session({[gNe]:!0});var i;if(this.uv||(this.uv=(i=Vr.__PosthogExtensions__)===null||i===void 0?void 0:i.initSessionRecording(this._instance,this.Je),this.uv._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Sv())return this.hv===\"missing_config\"||this.hv===\"awaiting_config\"?void 0:(this.hv=\"awaiting_config\",Jb.info(\"persisted remote config is stale, requesting fresh config before starting\"),void new qOt(this._instance).load());this.hv=YGt,(n=(o=this.uv).setDocumentWasEverVisible)===null||n===void 0||n.call(o,this.Je),this.uv.start(t)}else this.hv=ZNe}onRRwebEmit(t){var e,n;(e=this.uv)===null||e===void 0||(n=e.onRRwebEmit)===null||n===void 0||n.call(e,t)}overrideLinkedFlag(){var t,e;this.uv||(e=this.Il)===null||e===void 0||e.register({$replay_override_linked_flag:!0}),(t=this.uv)===null||t===void 0||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.uv||(e=this.Il)===null||e===void 0||e.register({$replay_override_sampling:!0}),(t=this.uv)===null||t===void 0||t.overrideSampling()}overrideTrigger(t){var e,n;this.uv||(n=this.Il)===null||n===void 0||n.register({[t===\"url\"?\"$replay_override_url_trigger\":\"$replay_override_event_trigger\"]:!0}),(e=this.uv)===null||e===void 0||e.overrideTrigger(t)}get sdkDebugProperties(){var t;const e={};for(const o of dYo){var n;const i=(n=this._instance.sessionPersistence)===null||n===void 0?void 0:n.get_property(o);Eo(i)||(e[o]=i)}return sn(sn({},e),((t=this.uv)===null||t===void 0?void 0:t.sdkDebugProperties)||{$recording_status:this.status})}tryAddCustomEvent(t,e){var n;return!!(!((n=this.uv)===null||n===void 0)\u0026\u0026n.tryAddCustomEvent(t,e))}flushBeforeIdentityReset(){var t,e;(t=this.uv)===null||t===void 0||(e=t.flushBeforeIdentityReset)===null||e===void 0||e.call(t)}}},kYo={autocapture:class extends AYo{constructor(t){super(new cYo(t)),this.instance=t}},historyAutocapture:class{constructor(t){this.xv=!1,this._instance=t,this.$v=this.Cv()}initialize(){this.startIfEnabled()}get isEnabled(){const t=this.Tv();return!!(t.path||t.search||this.Iv(t))}startIfEnabled(){this.isEnabled\u0026\u0026(ui.info(\"History API monitoring enabled, starting...\"),this.monitorHistoryChanges())}startIfEnabledOrStop(){this.stop(),this.$v=this.Cv(),this.startIfEnabled()}stop(){this.Mv\u0026\u0026this.Mv(),this.Mv=void 0,this.Ev\u0026\u0026this.Ev(),this.Ev=void 0,ui.info(\"History API monitoring stopped\")}monitorHistoryChanges(){Fn\u0026\u0026Fn.history\u0026\u0026(this.Pv(\"pushState\"),this.Pv(\"replaceState\"),this.Rv(),this.Iv()\u0026\u0026this.Av())}Pv(t){var e;if(!Fn||!((e=Fn.history[t])===null||e===void 0)\u0026\u0026e.__posthog_wrapped__)return;const n=this;lq(Fn.history,t,o=\u003efunction(i,r,s){var a;n.Ov(s)\u0026\u0026n.Fv(),o.call(this,i,r,s),n.Dv(t,!n.xv\u0026\u0026(Fn==null||(a=Fn.event)===null||a===void 0?void 0:a.type)!==\"popstate\")})}Cv(){const t=Fn?.location;if(t?.pathname)return{pathname:t.pathname,search:t.search,hash:t.hash}}Tv(){const t=this._instance.config.capture_pageview;return t===\"history_change\"?{path:!0}:QA(t)?t:{}}Iv(t=this.Tv()){return!!t.hash\u0026\u0026!this._instance.config.disable_capture_url_hashes}Lv(t){const e=this.Tv(),n=this.$v;return!(!n||!(e.path\u0026\u0026t.pathname!==n.pathname||e.search\u0026\u0026t.search!==n.search||this.Iv(e)\u0026\u0026t.hash!==n.hash))}Dv(t,e=!1){try{e||this.Fv();const n=this.Cv();if(!n)return;if(this.Lv(n)){const o=()=\u003ethis._instance.capture(pNe,{navigation_type:t});e?(this.Nv=o,Promise.resolve().then(()=\u003ethis.Fv())):o()}this.$v=n}catch(n){ui.error(`Error capturing ${t} pageview`,n)}}Ov(t){var e,n;return!(Hs(t)||!Fn)\u0026\u0026((e=Kb(String(t)))===null||e===void 0?void 0:e.href)!==((n=Fn.location)===null||n===void 0?void 0:n.href)}Fv(){const t=this.Nv;if(t){this.Nv=void 0,this.xv=!0;try{t()}catch(e){ui.error(\"Error capturing deferred pageview\",e)}finally{this.xv=!1}this.$v=this.Cv()}}Rv(){if(this.Mv)return;const t=()=\u003e{this.Dv(\"popstate\")};el(Fn,\"popstate\",t),this.Mv=()=\u003e{Fn\u0026\u0026Fn.removeEventListener(\"popstate\",t)}}Av(){if(this.Ev)return;const t=()=\u003e{this.Dv(\"hashchange\")};el(Fn,\"hashchange\",t),this.Ev=()=\u003e{Fn\u0026\u0026Fn.removeEventListener(\"hashchange\",t)}}},heatmaps:class{get Mr(){return this.instance.config}constructor(t){var e;this.qv=!1,this.ko=!1,this.jv=null,this.instance=t,this.qv=!!(!((e=this.instance.persistence)===null||e===void 0)\u0026\u0026e.props[tNe]),this.rageclicks=new FGt(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){let t=5e3;return QA(this.Mr.capture_heatmaps)\u0026\u0026this.Mr.capture_heatmaps.flush_interval_milliseconds\u0026\u0026(t=this.Mr.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return Hs(this.Mr.capture_heatmaps)?Hs(this.Mr.enable_heatmaps)?this.qv:this.Mr.enable_heatmaps:this.Mr.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.ko)return;hYo.info(\"starting...\"),this.Bv(),this.sn()}else{var t;clearInterval((t=this.jv)!==null\u0026\u0026t!==void 0?t:void 0),this.Hv(),this.getAndClearBuffer()}}onRemoteConfig(t){if(!t.ok)return;const e=t.config;if(!(\"heatmaps\"in e))return;const n=!!e.heatmaps;this.instance.persistence\u0026\u0026this.instance.persistence.register({[tNe]:n}),this.qv=n,this.startIfEnabled()}getAndClearBuffer(){const t=this.Rt;return this.Rt=void 0,t}zv(t){eRe(t.originalEvent)\u0026\u0026this.Ir(t.originalEvent,\"deadclick\")}sn(){this.jv\u0026\u0026clearInterval(this.jv),this.jv=No?.visibilityState===\"visible\"?setInterval(this.yl.bind(this),this.flushIntervalMilliseconds):null}Bv(){Fn\u0026\u0026No\u0026\u0026(this.Uv=this.yl.bind(this),el(Fn,Qge,this.Uv),this.Wv=t=\u003ethis.Ir(t||Fn?.event),el(No,\"click\",this.Wv,{capture:!0}),this.Vv=t=\u003ethis.Gv(t||Fn?.event),el(No,\"mousemove\",this.Vv,{capture:!0}),this.Qv=new MOt(this.instance,hGo,this.zv.bind(this)),this.Qv.startIfEnabledOrStop(),this.Jv=this.sn.bind(this),el(No,U$,this.Jv),this.ko=!0)}Hv(){var t;Fn\u0026\u0026No\u0026\u0026(this.Uv\u0026\u0026Fn.removeEventListener(Qge,this.Uv),this.Wv\u0026\u0026No.removeEventListener(\"click\",this.Wv,{capture:!0}),this.Vv\u0026\u0026No.removeEventListener(\"mousemove\",this.Vv,{capture:!0}),this.Jv\u0026\u0026No.removeEventListener(U$,this.Jv),clearTimeout(this.Zv),(t=this.Qv)===null||t===void 0||t.stop(),this.ko=!1)}Kv(t,e){const n=this.instance.scrollManager.scrollY(),o=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),r=(function(s,a,A){let c=s;for(;c\u0026\u0026d6(c)\u0026\u0026!AI(c,\"body\");){if(c===A)return!1;let h;try{var l,u,g;h=(l=(u=(g=c.ownerDocument)===null||g===void 0?void 0:g.defaultView)!==null\u0026\u0026u!==void 0?u:Fn)===null||l===void 0?void 0:l.getComputedStyle(c).position}catch{return!1}if(as(a,h))return!0;c=fOt(c)}return!1})(J$(t),[\"fixed\",\"sticky\"],i);return{x:t.clientX+(r?0:o),y:t.clientY+(r?0:n),target_fixed:r,type:e}}Ir(t,e=\"click\"){var n;if(hOt(t.target)||!eRe(t))return;const o=this.Kv(t,e);!((n=this.rageclicks)===null||n===void 0)\u0026\u0026n.isRageClick(t.clientX,t.clientY,new Date().getTime())\u0026\u0026xOt(J$(t),this.instance.config.rageclick)\u0026\u0026this.Qs(sn(sn({},o),{},{type:\"rageclick\"})),this.Qs(o)}Gv(t){!hOt(t.target)\u0026\u0026eRe(t)\u0026\u0026(clearTimeout(this.Zv),this.Zv=setTimeout(()=\u003e{this.Qs(this.Kv(t,\"mousemove\"))},500))}Qs(t){if(!Fn)return;const e=this.Mr.disable_capture_url_hashes?Mw(Fn.location.href):Fn.location.href,n=this.Mr.custom_personal_data_properties,o=this.Mr.mask_personal_data_properties?[...rG,...n||[]]:[],i=X$(e,o,Z$);this.Rt=this.Rt||{},this.Rt[i]||(this.Rt[i]=[]),this.Rt[i].push(t)}yl(){this.Rt\u0026\u0026!Rx(this.Rt)\u0026\u0026this.instance.capture(\"$heatmap\",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:MOt,webVitalsAutocapture:class{constructor(t){var e;this._instance=t,this.qv=!1,this.ko=!1,this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Xv=()=\u003e{clearTimeout(this.Yv),this.Yv=void 0,this.Rt.metrics.length!==0\u0026\u0026(this._instance.capture(\"$web_vitals\",sn({$current_url:this.Rt.url},this.Rt.metrics.reduce((n,o)=\u003esn(sn({},n),{},{[`$web_vitals_${o.name}_event`]:sn({},o),[`$web_vitals_${o.name}_value`]:o.value}),{}))),this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.tf=n=\u003e{var o;if(this.Rt=this.Rt||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},Hs(n?.name)||Hs(n?.value))return void SR.error(\"Invalid metric received\",n);const i=typeof n.navigationURL==\"string\"?n.navigationURL:void 0,r=this.ef(i);if(Eo(r))return;const s=Ah(n.navigationId)||typeof n.navigationId==\"string\"?`navigation:${n.navigationId}`:`url:${r}`;if(this.if\u0026\u0026n.value\u003e=this.if)return void SR.error(\"Ignoring metric with value \u003e= \"+this.if,n);this.Rt.navigationKey!==s\u0026\u0026(this.Xv(),this.Yv=setTimeout(this.Xv,this.flushToCaptureTimeoutMs)),Eo(this.Rt.navigationKey)\u0026\u0026(this.Rt.navigationKey=s,this.Rt.url=r),this.Rt.firstMetricTimestamp=Eo(this.Rt.firstMetricTimestamp)?Date.now():this.Rt.firstMetricTimestamp;const a=(o=this._instance.sessionManager)===null||o===void 0?void 0:o.checkAndGetSessionAndWindowId(!0),A=sn(sn(sn({},n),i?{navigationURL:r}:{}),{},{$current_url:r,timestamp:Date.now()});if(delete A.entries,QA(n.attribution)\u0026\u0026this.attributionMetrics.indexOf(n.name)\u003e-1){const c={};for(const l of gYo){const u=l===\"url\"\u0026\u0026typeof n.attribution[l]==\"string\"?this.ef(n.attribution[l]):n.attribution[l];Eo(u)||(c[l]=u)}A.attribution=c}else delete A.attribution;Eo(a)||(A.$session_id=a.sessionId,A.$window_id=a.windowId),this.Rt.metrics.push(A),this.Rt.metrics.length===this.allowedMetrics.length\u0026\u0026this.Xv()},this.nf=()=\u003e{if(this.ko)return;let n,o,i,r,s=!1;const a=Vr.__PosthogExtensions__,A=a?.postHogWebVitalsCallbacksByFlavor,c=A?.[this.sf]||(this.sf===\"web-vitals\"\u0026\u0026Eo(A)?a?.postHogWebVitalsCallbacks:void 0);if(!Eo(c)){const g=c.withoutAttribution,h=this.attributionMetrics;s=!Eo(g),n=h.indexOf(\"LCP\")\u003e-1?c.onLCP:g?.onLCP||c.onLCP,o=h.indexOf(\"CLS\")\u003e-1?c.onCLS:g?.onCLS||c.onCLS,i=h.indexOf(\"FCP\")\u003e-1?c.onFCP:g?.onFCP||c.onFCP,r=h.indexOf(\"INP\")\u003e-1?c.onINP:g?.onINP||c.onINP}if(!(n\u0026\u0026o\u0026\u0026i\u0026\u0026r))return void SR.error(\"web vitals callbacks not loaded - not starting\");const l={reportSoftNavs:this.useSoftNavs},u=s\u0026\u0026this.attributionMetrics.indexOf(\"INP\")\u003e-1?sn(sn({},l),{},{includeProcessedEventEntries:!1}):l;this.allowedMetrics.indexOf(\"LCP\")\u003e-1\u0026\u0026n(this.tf.bind(this),l),this.allowedMetrics.indexOf(\"CLS\")\u003e-1\u0026\u0026o(this.tf.bind(this),l),this.allowedMetrics.indexOf(\"FCP\")\u003e-1\u0026\u0026i(this.tf.bind(this),l),this.allowedMetrics.indexOf(\"INP\")\u003e-1\u0026\u0026r(this.tf.bind(this),u),this.ko=!0},this.qv=!!(!((e=this._instance.persistence)===null||e===void 0)\u0026\u0026e.props[iNe]),this.startIfEnabled()}get rf(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e;const n=QA(this.rf)?(t=this.rf)===null||t===void 0?void 0:t.web_vitals_allowed_metrics:void 0;return Hs(n)?((e=this._instance.persistence)===null||e===void 0?void 0:e.props.$web_vitals_allowed_metrics)||GGt:n}get flushToCaptureTimeoutMs(){return(QA(this.rf)?this.rf.web_vitals_delayed_flush_ms:void 0)||5e3}get attributionMetrics(){const t=QA(this.rf)?this.rf.web_vitals_attribution:void 0;return $y(t)?t?GGt:[]:As(t)?t:uYo}get useAttribution(){return this.attributionMetrics.length\u003e0}get useSoftNavs(){const t=QA(this.rf)?this.rf.__preview_web_vitals_soft_navs:void 0;return t!=null\u0026\u0026t}get if(){const t=QA(this.rf)\u0026\u0026Ah(this.rf.__web_vitals_max_value)?this.rf.__web_vitals_max_value:OGt;return t\u003e0\u0026\u00266e4\u003e=t?OGt:t}get isEnabled(){const t=fd?.protocol;if(t!==\"http:\"\u0026\u0026t!==\"https:\")return SR.info(\"Web Vitals are disabled on non-http/https protocols\"),!1;const e=QA(this.rf)?this.rf.web_vitals:$y(this.rf)?this.rf:void 0;return $y(e)?e:this.qv}startIfEnabled(){this.isEnabled\u0026\u0026!this.ko\u0026\u0026(SR.info(\"enabled, starting...\"),this.Ho(this.nf))}onRemoteConfig(t){if(!t.ok)return;const e=t.config;if(!(\"capturePerformance\"in e))return;const n=QA(e.capturePerformance)\u0026\u0026!!e.capturePerformance.web_vitals,o=QA(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence\u0026\u0026(this._instance.persistence.register({[iNe]:n}),this._instance.persistence.register({[HHt]:o})),this.qv=n,this.startIfEnabled()}get sf(){return this.useSoftNavs?this.useAttribution?\"web-vitals-with-attribution-soft-navs\":\"web-vitals-soft-navs\":this.useAttribution?\"web-vitals-with-attribution\":\"web-vitals\"}Ho(t){var e;const n=Vr.__PosthogExtensions__,o=this.sf,i=n?.postHogWebVitalsCallbacksByFlavor;i?.[o]||o===\"web-vitals\"\u0026\u0026Eo(i)\u0026\u0026n?.postHogWebVitalsCallbacks?t():n==null||(e=n.loadExternalDependency)===null||e===void 0||e.call(n,this._instance,o,r=\u003e{r?SR.error(\"failed to load script\",r):t()})}ef(t){const e=t||Fn?.location.href;if(!e)return void SR.error(\"Could not determine current URL\");const n=this._instance.config.disable_capture_url_hashes?Mw(e):e,o=this._instance.config.custom_personal_data_properties,i=this._instance.config.mask_personal_data_properties?[...rG,...o||[]]:[];return X$(n,i,Z$)}}},FYo={exceptionObserver:class{constructor(t){var e;this.nf=()=\u003e{var n;if(!Fn||!this.isEnabled||!(!((n=Vr.__PosthogExtensions__)===null||n===void 0)\u0026\u0026n.errorWrappingFunctions))return;const o=Vr.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=Vr.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=Vr.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.af\u0026\u0026this.Mr.capture_unhandled_errors\u0026\u0026(this.af=o(this.captureException.bind(this))),!this.lf\u0026\u0026this.Mr.capture_unhandled_rejections\u0026\u0026(this.lf=i(this.captureException.bind(this))),!this.uf\u0026\u0026this.Mr.capture_console_errors\u0026\u0026(this.uf=r(this.captureException.bind(this)))}catch(s){cq.error(\"failed to start\",s),this.hf()}},this._instance=t,this.cf=!!(!((e=this._instance.persistence)===null||e===void 0)\u0026\u0026e.props[nNe]),this.wt=new RHo(sn(sn({},(function(n={}){var o,i,r,s;return{refillRate:(o=(i=n.exceptionRateLimiterRefillRate)!==null\u0026\u0026i!==void 0?i:n.__exceptionRateLimiterRefillRate)!==null\u0026\u0026o!==void 0?o:1,bucketSize:(r=(s=n.exceptionRateLimiterBucketSize)!==null\u0026\u0026s!==void 0?s:n.__exceptionRateLimiterBucketSize)!==null\u0026\u0026r!==void 0?r:10}})(this._instance.config.error_tracking)),{},{refillInterval:1e4,A:cq})),this.Mr=this.df(),this.startIfEnabledOrStop()}df(){const t=this._instance.config.capture_exceptions;let e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return QA(t)?e=sn(sn({},e),t):(Eo(t)?this.cf:t)\u0026\u0026(e=sn(sn({},e),{},{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Mr.capture_console_errors||this.Mr.capture_unhandled_errors||this.Mr.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(cq.info(\"enabled\"),this.hf(),this.Ho(this.nf)):this.hf()}Ho(t){var e,n,o;!((e=Vr.__PosthogExtensions__)===null||e===void 0)\u0026\u0026e.errorWrappingFunctions?t():(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,\"exception-autocapture\",i=\u003e{if(i)return cq.error(\"failed to load script\",i);t()})}hf(){var t,e,n;(t=this.af)===null||t===void 0||t.call(this),this.af=void 0,(e=this.lf)===null||e===void 0||e.call(this),this.lf=void 0,(n=this.uf)===null||n===void 0||n.call(this),this.uf=void 0}onRemoteConfig(t){if(!t.ok)return;const e=t.config;\"autocaptureExceptions\"in e\u0026\u0026(this.cf=!!e.autocaptureExceptions||!1,this._instance.persistence\u0026\u0026this._instance.persistence.register({[nNe]:this.cf}),this.Mr=this.df(),this.startIfEnabledOrStop())}onConfigChange(){this.Mr=this.df()}captureException(t){try{var e,n,o;const i=(e=t==null||(n=t.$exception_list)===null||n===void 0||(n=n[0])===null||n===void 0?void 0:n.type)!==null\u0026\u0026e!==void 0?e:\"Exception\";if(this.wt.consumeRateLimit(i))return void cq.info(\"Skipping exception capture because of client rate limiting.\",{exception:i});(o=this._instance.exceptions)===null||o===void 0||o.sendExceptionEvent(t)}catch{}}},exceptions:class{constructor(t){var e,n;this.vf=[],this.ff=new zHo([new aOo,new mOo,new cOo,new AOo,new hOo,new dOo,new uOo,new pOo],(function(o,...i){return(r,s=0)=\u003e{const a=[],A=r.split(`\n`),c=Math.min(A.length,s+1e3),l=[];for(let h=s;c\u003eh;h++){const d=A[h];if(d.length\u003e1024)continue;const p=AHt.test(d)?d.replace(AHt,\"$1\"):d;if(!p.match(/\\S*Error: /)){for(const m of i){const _=m(p,o);if(_){a.push(_);const f=oOo(a);if(f){for(let I=l.length-1;I\u003e=0;I--){const C=l[I];if(f.start\u003e=C.start+C.length)break;l.pop()}l.push(f)}break}}if(rOo(a,l)\u003e=50)break}}const u=[...l].sort((h,d)=\u003ed.start-h.start),g=u[u.length-1];if(g){const h=cHt(a,g);a.splice(g.start-h,h);for(const d of u)d.start-=h}for(const h of u)iOo(a,h);return l.some(h=\u003eh.start===0\u0026\u0026a.length===h.length)\u0026\u0026(function(h){const d=h.map(m=\u003e`${m.function}|${m.filename}|${m.lineno}|${m.colno}|${m.module}`);let p=0;for(let m=1;d.length\u003em;m++)sOo(d,m,p)\u0026\u0026(p=m);h.push(...h.splice(0,p))})(a),(function(h){if(!h.length)return[];const d=Array.from(h);return d.reverse(),d.slice(0,50).map(p=\u003e{return sn(sn({},p),{},{filename:p.filename||(m=d,m[m.length-1]||{}).filename,function:p.function||\"?\"});var m})})(a)}})(\"web:javascript\",ZHo,nOo)),this._instance=t,this.vf=(e=(n=this._instance.persistence)===null||n===void 0?void 0:n.get_property(\"$error_tracking_suppression_rules\"))!==null\u0026\u0026e!==void 0?e:[],this.pf=Cge(this.gf()),this.mf=new fOo(this.pf)}onConfigChange(){this.pf=Cge(this.gf()),this.mf.setConfig(this.pf)}onRemoteConfig(t){var e,n,o;if(!t.ok)return;const i=t.config;if(!(\"errorTracking\"in i))return;const r=(e=(n=i.errorTracking)===null||n===void 0?void 0:n.suppressionRules)!==null\u0026\u0026e!==void 0?e:[],s=(o=i.errorTracking)===null||o===void 0?void 0:o.captureExtensionExceptions;this.vf=r,this._instance.persistence\u0026\u0026this._instance.persistence.register({[FHt]:this.vf,[oNe]:s})}get yf(){var t;const e=!!this._instance.get_property(oNe),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null\u0026\u0026t!==void 0\u0026\u0026t}buildProperties(t,e){return this.ff.buildFromUnknown(t,{syntheticException:e?.syntheticException,mechanism:{handled:e?.handled}})}addExceptionStep(t,e){if(this.pf.enabled)try{if(!rA(t)||t.trim().length===0)return void FB.warn(\"Ignoring exception step because message must be a non-empty string\");const{sanitizedProperties:n,droppedKeys:o}=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};const r=[];return{sanitizedProperties:Object.keys(i).reduce((s,a)=\u003e_Oo.has(a)?(r.push(a),s):(s[a]=i[a],s),{}),droppedKeys:r}})(this.bf(e));o.length\u003e0\u0026\u0026FB.warn(\"Ignoring reserved exception step fields\",{droppedKeys:o}),this.mf.add(sn({[fge]:t,[Ige]:new Date().toISOString()},n))}catch(n){FB.error(\"Failed to add exception step. Ignoring breadcrumb.\",n)}}sendExceptionEvent(t){try{const e=t.$exception_list;if(this._f(e)){if(this.wf(e))return this.kf(\"Exception dropped: matched a suppression rule\"),void FB.info(\"Skipping exception capture because a suppression rule matched\");if(!this.yf\u0026\u0026this.Sf(e))return this.kf(\"Exception dropped: thrown by a browser extension\"),void FB.info(\"Skipping exception capture because it was thrown by an extension\");if(!this.yf\u0026\u0026this.xf(e))return this.kf(\"Exception dropped: thrown by an injected browser script\"),void FB.info(\"Skipping exception capture because it was thrown by an injected browser script\");if(!this._instance.config.error_tracking.__capturePostHogExceptions\u0026\u0026this.$f(e))return this.kf(\"Exception dropped: thrown by the PostHog SDK\"),void FB.info(\"Skipping exception capture because it was thrown by the PostHog SDK\")}const n=this.pf.enabled\u0026\u0026Hs(t.$exception_steps)?this.Cf(t):t,o=(function(){const i=globalThis._posthogReleaseId;return typeof i==\"string\"\u0026\u0026i.length\u003e0?i:void 0})();o\u0026\u0026(n.$release_id=o);try{const i=this._instance.capture(\"$exception\",n,{_noTruncate:!0,_batchKey:\"exceptionEvent\",gh:!0});return i\u0026\u0026this.mf.clear(),i}catch(i){return eYt(i)||FB.error(\"Failed to capture exception event. Dropping this exception.\",i),void this.mf.clear()}}catch(e){return void(eYt(e)||FB.error(\"Failed to process exception event. Ignoring this exception.\",e))}}Cf(t){try{const e=this.mf.getAttachable();return e.length===0?t:sn(sn({},t),{},{$exception_steps:e})}catch(e){return FB.error(\"Failed to read buffered exception steps. Capturing exception without steps.\",e),t}}kf(t){this.pf.enabled\u0026\u0026this.mf.add({[fge]:t,[Ige]:new Date().toISOString()})}bf(t){return QA(t)?sn({},t):{}}gf(){var t,e;return(t=(e=this._instance.config.error_tracking)===null||e===void 0?void 0:e.exception_steps)!==null\u0026\u0026t!==void 0?t:{}}wf(t){if(t.length===0)return!1;try{const e=t.reduce((n,{type:o,value:i})=\u003e(rA(o)\u0026\u0026o.length\u003e0\u0026\u0026n.$exception_types.push(o),rA(i)\u0026\u0026i.length\u003e0\u0026\u0026n.$exception_values.push(i),n),{$exception_types:[],$exception_values:[]});return this.vf.some(n=\u003e{const o=n.values.map(i=\u003e{const r=bGt[i.operator],s=e[i.key];if(!r||!s)return!1;const a=As(i.value)?i.value:[i.value];return a.length\u003e0\u0026\u0026r(a,s)});return n.type===\"OR\"?o.some(Boolean):o.every(Boolean)})}catch(e){return FB.warn(\"Failed to evaluate suppression rules. Capturing the exception.\",e),!1}}Sf(t){const e=t.flatMap(o=\u003e{var i,r;return(i=(r=o.stacktrace)===null||r===void 0?void 0:r.frames)!==null\u0026\u0026i!==void 0?i:[]}),n=e.filter(({filename:o})=\u003e!!o\u0026\u0026SYo.some(i=\u003eo.startsWith(i)));return n.length!==0\u0026\u0026(!n.every(({filename:o})=\u003e!!o\u0026\u0026o.startsWith(oRe))||t.some(({type:o,value:i})=\u003eo===\"NoResponse\"||rA(i)\u0026\u0026bYo.some(({value:r,exact:s})=\u003es?i===r:i.includes(r)))\u0026\u0026!e.some(({in_app:o,filename:i})=\u003eo\u0026\u0026!i?.startsWith(oRe)))}xf(t){return t.some(({value:e})=\u003erA(e)\u0026\u0026QYo.some(n=\u003ee.includes(n)))}$f(t){if(t.length\u003e0){var e,n,o,i;const r=(e=(n=t[0].stacktrace)===null||n===void 0?void 0:n.frames)!==null\u0026\u0026e!==void 0?e:[],s=r[r.length-1];return(o=s==null||(i=s.filename)===null||i===void 0?void 0:i.includes(\"posthog.com/static\"))!==null\u0026\u0026o!==void 0\u0026\u0026o}return!1}_f(t){return!Hs(t)\u0026\u0026As(t)}}},LYo=sn({productTours:class{get Il(){return this._instance.persistence}constructor(t){this.Tf=null,this.If=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!t.ok)return;const e=t.config;if(\"productTours\"in e){var n,o;if(this.Il\u0026\u0026this.Il.register({[sNe]:!!e.productTours}),!tRe(this._instance))return!this.Tf\u0026\u0026Hs((n=this.Il)===null||n===void 0?void 0:n.props.ph_product_tours)||Gge.info(\"product tours disabled; stopping and clearing cached tours\"),(o=this.Tf)===null||o===void 0||o.stop(),this.Tf=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Tf\u0026\u0026tRe(this._instance)\u0026\u0026this.Ho(()=\u003ethis.Mf())}Ho(t){var e,n,o;!((e=Vr.__PosthogExtensions__)===null||e===void 0)\u0026\u0026e.generateProductTours?t():(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,\"product-tours\",i=\u003e{i?Gge.error(\"Could not load product tours script\",i):t()})}Mf(){var t;!this.Tf\u0026\u0026(!((t=Vr.__PosthogExtensions__)===null||t===void 0)\u0026\u0026t.generateProductTours)\u0026\u0026(this.Tf=Vr.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e=!1){if(As(this.If)\u0026\u0026!e)return void t(this.If,{isLoaded:!0});const n=this.Il;if(n){const o=n.props[ANe];if(As(o)\u0026\u0026!e)return this.If=o,void t(o,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor(\"api\",`/api/product_tours/?token=${this._instance.config.token}`),method:\"GET\",timestampMode:\"query\",callback:o=\u003e{if(!tRe(this._instance))return void t([],{isLoaded:!0});const i=o.statusCode;if(i!==200||!o.json){const s=`Product Tours API could not be loaded, status: ${i}`;return i===0?o.error||Gge.warn(s):Gge.error(s),void t([],{isLoaded:!1,error:s})}const r=As(o.json.product_tours)?o.json.product_tours:[];this.If=r,n\u0026\u0026n.register({[ANe]:r}),t(r,{isLoaded:!0})}})}getActiveProductTours(t){Hs(this.Tf)?t([],{isLoaded:!1,error:\"Product tours not loaded\"}):this.Tf.getActiveProductTours(t)}showProductTour(t){var e;(e=this.Tf)===null||e===void 0||e.showTourById(t)}previewTour(t){this.Tf?this.Tf.previewTour(t):this.Ho(()=\u003e{var e;this.Mf(),(e=this.Tf)===null||e===void 0||e.previewTour(t)})}dismissProductTour(){var t;(t=this.Tf)===null||t===void 0||t.dismissTour(\"user_clicked_skip\")}nextStep(){var t;(t=this.Tf)===null||t===void 0||t.nextStep()}previousStep(){var t;(t=this.Tf)===null||t===void 0||t.previousStep()}clearCache(){var t;this.If=null,(t=this.Il)===null||t===void 0||t.unregister(\"ph_product_tours\")}resetTour(t){var e;(e=this.Tf)===null||e===void 0||e.resetTour(t)}resetAllTours(){var t;(t=this.Tf)===null||t===void 0||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.Tf)===null||e===void 0||e.cancelPendingTour(t)}}},Uge),HYo={siteApps:class{constructor(t){this._instance=t,this.Ef=0,this.Pf=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Rf(t,e){if(!e)return;const n=this.globalsForEvent(e);this.Pf.push(n),this.Pf.length\u003e1e3\u0026\u0026(this.Pf=this.Pf.slice(10))}get siteAppLoaders(){var t;return(t=Vr._POSTHOG_REMOTE_CONFIG)===null||t===void 0||(t=t[this._instance.config.token])===null||t===void 0?void 0:t.siteApps}initialize(){if(this.isEnabled){const t=this._instance._addCaptureHook(this.Rf.bind(this));this.Af=()=\u003e{t(),this.Pf=[],this.Af=void 0}}}globalsForEvent(t){var e,n,o,i,r,s,a;if(!t)throw new Error(\"Event payload is required\");const A={},c=this._instance.get_property(\"$groups\")||[],l=this._instance.get_property(\"$stored_group_properties\")||{};for(const[h,d]of Object.entries(l))A[h]={id:c[h],type:h,properties:d};const{$set_once:u,$set:g}=t;return{event:sn(sn({},IHt(t,pYo)),{},{properties:sn(sn(sn({},t.properties),g?{$set:sn(sn({},(e=(n=t.properties)===null||n===void 0?void 0:n.$set)!==null\u0026\u0026e!==void 0?e:{}),g)}:{}),u?{$set_once:sn(sn({},(o=(i=t.properties)===null||i===void 0?void 0:i.$set_once)!==null\u0026\u0026o!==void 0?o:{}),u)}:{}),elements_chain:(r=(s=t.properties)===null||s===void 0?void 0:s.$elements_chain)!==null\u0026\u0026r!==void 0?r:\"\",distinct_id:(a=t.properties)===null||a===void 0?void 0:a.distinct_id}),person:{properties:this._instance.get_property(\"$stored_person_properties\")},groups:A}}Of(t){var e;const n=(e=t.tagName)===null||e===void 0?void 0:e.toLowerCase();return n===\"style\"\u0026\u0026this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(t)||(h6.error(\"prepare_external_dependency_stylesheet returned null\"),null):n===\"script\"\u0026\u0026this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(t)||(h6.error(\"prepare_external_dependency_script returned null\"),null):t}Ff(){var t,e,n,o,i,r,s,a;if(!this._instance.config.prepare_external_dependency_stylesheet\u0026\u0026!this._instance.config.prepare_external_dependency_script)return()=\u003e{};const A=No?.defaultView,c=A==null||(t=A.Node)===null||t===void 0?void 0:t.prototype;if(!A||!c)return()=\u003e{};if(this.Ef++,this.Df)return this.Lf();const l=[],u=this,g=new WeakSet,h=(m,_,f)=\u003e{if(!m?.[_])return;const I=m[_];m[_]=f(I),l.push(()=\u003e{m[_]=I})},d=m=\u003e{if(g.has(m))return m;const _=u.Of(m);return _\u0026\u0026g.add(_),_},p=m=\u003em.map(_=\u003etypeof _==\"string\"?_:d(_)).filter(_=\u003e!Id(_));return h(c,\"appendChild\",m=\u003efunction(_){const f=d(_);return f?m.call(this,f):_}),h(c,\"insertBefore\",m=\u003efunction(_,f){const I=d(_);return I?m.call(this,I,f):_}),h(c,\"replaceChild\",m=\u003efunction(_,f){const I=d(_);return I?m.call(this,I,f):f}),[(e=A.Element)===null||e===void 0?void 0:e.prototype,(n=A.Document)===null||n===void 0?void 0:n.prototype,(o=A.DocumentFragment)===null||o===void 0?void 0:o.prototype].forEach(m=\u003e{h(m,\"append\",_=\u003efunction(...f){return _.apply(this,p(f))}),h(m,\"prepend\",_=\u003efunction(...f){return _.apply(this,p(f))})}),[(i=A.Element)===null||i===void 0?void 0:i.prototype,(r=A.CharacterData)===null||r===void 0?void 0:r.prototype,(s=A.DocumentType)===null||s===void 0?void 0:s.prototype].forEach(m=\u003e{h(m,\"before\",_=\u003efunction(...f){return _.apply(this,p(f))}),h(m,\"after\",_=\u003efunction(...f){return _.apply(this,p(f))}),h(m,\"replaceWith\",_=\u003efunction(...f){const I=p(f);return f.length\u0026\u0026!I.length?void 0:_.apply(this,I)})}),h((a=A.Element)===null||a===void 0?void 0:a.prototype,\"insertAdjacentElement\",m=\u003efunction(_,f){const I=d(f);return I?m.call(this,_,I):null}),this.Df=()=\u003e{l.forEach(m=\u003em()),this.Df=void 0},this.Lf()}Lf(){let t=!1;return()=\u003e{var e;t||(t=!0,this.Ef--,this.Ef===0\u0026\u0026((e=this.Df)===null||e===void 0||e.call(this)))}}Nf(t,e=!0){const n=this.Ff();try{const o=t(n);return e\u0026\u0026n(),o}catch(o){throw n(),o}}setupSiteApp(t){const e=this.apps[t.id],n=()=\u003e{var r;!e.errored\u0026\u0026this.Pf.length\u0026\u0026(h6.info(`Processing ${this.Pf.length} events for site app with id ${t.id}`),this.Pf.forEach(s=\u003ethis.Nf(()=\u003e{var a;return(a=e.processEvent)===null||a===void 0?void 0:a.call(e,s)})),e.processedBuffer=!0),Object.values(this.apps).every(s=\u003es.processedBuffer||s.errored)\u0026\u0026((r=this.Af)===null||r===void 0||r.call(this))};let o=!1;const i=r=\u003e{e.errored=!r,e.loaded=!0,h6.info(`Site app with id ${t.id} ${r?\"loaded\":\"errored\"}`),o\u0026\u0026n()};try{const{processEvent:r}=this.Nf(s=\u003et.init({posthog:this._instance,callback(a){s(),i(a)}}),!1);r\u0026\u0026(e.processEvent=r),o=!0}catch(r){h6.error(UGt+t.id,r),i(!1)}if(o\u0026\u0026e.loaded)try{n()}catch(r){h6.error(`Error while processing buffered events PostHog app with config id ${t.id}`,r),e.errored=!0}}qf(){const t=this.siteAppLoaders||[];for(const e of t)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(const e of t)this.setupSiteApp(e)}jf(t){if(Object.keys(this.apps).length===0)return;const e=this.globalsForEvent(t);for(const n of Object.values(this.apps))try{this.Nf(()=\u003e{var o;return(o=n.processEvent)===null||o===void 0?void 0:o.call(n,e)})}catch(o){h6.error(`Error while processing event ${t.event} for site app ${n.id}`,o)}}onRemoteConfig(t){var e,n,o;if(!((e=this.siteAppLoaders)===null||e===void 0)\u0026\u0026e.length)return this.isEnabled?(this.qf(),void this._instance.on(\"eventCaptured\",a=\u003ethis.jf(a))):void h6.error('PostHog site apps are disabled. Enable the \"opt_in_site_apps\" config to proceed.');if((n=this.Af)===null||n===void 0||n.call(this),!t.ok)return;const i=t.config;if(!((o=i.siteApps)===null||o===void 0)\u0026\u0026o.length)if(this.isEnabled)for(const{id:a,url:A}of i.siteApps){var r,s;Vr[`__$ph_site_app_${a}`]=this._instance,(r=Vr.__PosthogExtensions__)===null||r===void 0||(s=r.loadSiteApp)===null||s===void 0||s.call(r,this._instance,A,c=\u003e{if(c)return h6.error(UGt+a,c)})}else h6.error('PostHog site apps are disabled. Enable the \"opt_in_site_apps\" config to proceed.')}}},OYo={tracingHeaders:class{constructor(t){this._instance=t,this.Bf=void 0,this.Hf=void 0,this.zf=void 0,this.nf=()=\u003e{const e=this.Uf();var n,o;e?(Eo(this.Bf)\u0026\u0026(this.Bf=(n=Vr.__PosthogExtensions__)===null||n===void 0||(n=n.tracingHeadersPatchFns)===null||n===void 0?void 0:n._patchXHR(e,()=\u003ethis._instance.get_distinct_id(),this._instance.sessionManager)),Eo(this.Hf)\u0026\u0026(this.Hf=(o=Vr.__PosthogExtensions__)===null||o===void 0||(o=o.tracingHeadersPatchFns)===null||o===void 0?void 0:o._patchFetch(e,()=\u003ethis._instance.get_distinct_id(),this._instance.sessionManager))):this.hf()}}initialize(){this.startIfEnabledOrStop()}Ho(t){var e,n,o;!((e=Vr.__PosthogExtensions__)===null||e===void 0)\u0026\u0026e.tracingHeadersPatchFns?t():(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,\"tracing-headers\",i=\u003e{if(i)return lYo.error(\"failed to load script\",i);t()})}Wf(){var t,e;return(t=(e=this._instance.config.tracing_headers)!==null\u0026\u0026e!==void 0?e:this._instance.config.addTracingHeaders)!==null\u0026\u0026t!==void 0?t:this._instance.config.__add_tracing_headers}Uf(){const t=this.Wf();return As(t)?(As(this.zf)?this.zf.splice(0,this.zf.length,...t):this.zf=[...t],t.length\u003e0?this.zf:void 0):(As(this.zf)\u0026\u0026this.zf.splice(0),this.zf=t||void 0,this.zf)}hf(){var t,e;(t=this.Bf)===null||t===void 0||t.call(this),(e=this.Hf)===null||e===void 0||e.call(this),this.Bf=void 0,this.Hf=void 0}startIfEnabledOrStop(){this.Uf()?this.Ho(this.nf):this.hf()}}},GYo=sn({surveys:class extends mYo{constructor(t){var e;super(new yYo(t),(e=t,{get projectToken(){return e.config.token},kv:new CYo(e)})),this._instance=t}Qh(t,e){const n=e.query?iq(t,e.query):t;return new Promise(o=\u003e{var i;this._instance._send_request({method:e.method,url:this._instance.requestRouter.endpointFor((i=e.target)!==null\u0026\u0026i!==void 0?i:\"api\",n),data:e.body,headers:e.headers,timeout:e.timeoutMs,fireCallbackOnDrop:!0,transport:e.transport,compression:e.compression,timestampMode:e.sentAt,callback:o})})}}},Uge),YYo={toolbar:class{constructor(t){this.instance=t}Vf(t){Vr.ph_toolbar_state=t}Gf(){var t;return(t=Vr.ph_toolbar_state)!==null\u0026\u0026t!==void 0?t:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(t=void 0,e=void 0,n=void 0){var o,i;if(_Ne(this.instance.config)||!Fn||!No)return!1;t=(o=t)!==null\u0026\u0026o!==void 0?o:Fn.location,n=(i=n)!==null\u0026\u0026i!==void 0?i:Fn.history;try{if(!e){try{Fn.localStorage.setItem(\"test\",\"test\"),Fn.localStorage.removeItem(\"test\")}catch{return!1}e=Fn?.localStorage}const r=xYo||Mge(t.hash,\"__posthog\")||Mge(t.hash,\"state\");let s;const a=r?tHt(()=\u003eJSON.parse(atob(decodeURIComponent(r))))||tHt(()=\u003eJSON.parse(decodeURIComponent(r))):null;return a\u0026\u0026a.action===\"ph_authorize\"?(s=a,s.source=\"url\",s\u0026\u0026Object.keys(s).length\u003e0\u0026\u0026(a.desiredHash?t.hash=a.desiredHash:n?n.replaceState(n.state,\"\",t.pathname+t.search):t.hash=\"\")):(s=JSON.parse(e.getItem(zGt)||\"{}\"),s.source=\"localstorage\",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch{return!1}}Qf(t){const e=Vr.ph_load_toolbar||Vr.ph_load_editor;!Hs(e)\u0026\u0026nf(e)?e(t,this.instance):JGt.warn(\"No toolbar load function found\")}loadToolbar(t){const e=!!No?.getElementById(\"__POSTHOG_TOOLBAR__\");if(!Fn||e)return!1;const n=this.instance.requestRouter.region===\"custom\"\u0026\u0026this.instance.config.advanced_disable_toolbar_metrics,o=sn(sn({token:this.instance.config.token},t),{},{apiURL:this.instance.requestRouter.endpointFor(\"ui\")},n?{instrument:!1}:{});if(Fn.localStorage.setItem(zGt,JSON.stringify(sn(sn({},o),{},{source:void 0}))),this.Gf()===2)this.Qf(o);else if(this.Gf()===0){var i,r;this.Vf(1),(i=Vr.__PosthogExtensions__)===null||i===void 0||(r=i.loadExternalDependency)===null||r===void 0||r.call(i,this.instance,\"toolbar\",s=\u003e{if(s)return JGt.error(\"[Toolbar] Failed to load\",s),void this.Vf(0);this.Vf(2),this.Qf(o)}),el(Fn,\"turbolinks:load\",()=\u003e{this.Vf(0),this.loadToolbar(o)})}return!0}Jf(t){return this.loadToolbar(t)}maybeLoadEditor(t=void 0,e=void 0,n=void 0){return this.maybeLoadToolbar(t,e,n)}}},UYo=sn({experiments:class sx{get Mr(){return this._instance.config}constructor(e){this._instance=e,this.getWebExperimentsAndEvaluateDisplayLogic=(n=!1)=\u003e{this.getWebExperiments(o=\u003e{sx.Zf(\"retrieved web experiments from the server\"),this.Kf=new Map,o.forEach(i=\u003e{if(i.feature_flag_key){var r;this.Kf\u0026\u0026(sx.Zf(\"setting flag key \",i.feature_flag_key,\" to web experiment \",i),(r=this.Kf)===null||r===void 0||r.set(i.feature_flag_key,i));const s=this._instance.getFeatureFlag(i.feature_flag_key);rA(s)\u0026\u0026i.variants[s]\u0026\u0026this.Xf(i.name,s,i.variants[s].transforms)}else if(i.variants)for(const s in i.variants){const a=i.variants[s];sx.Yf(a,this._instance)\u0026\u0026this.Xf(i.name,s,a.transforms)}})},n)},this._instance.onFeatureFlags(n=\u003e{this.onFeatureFlags(n)})}initialize(){}onFeatureFlags(e){if(this._is_bot())sx.Zf(tYt);else if(!this.Mr.disable_web_experiments){if(Hs(this.Kf))return this.Kf=new Map,this.loadIfEnabled(),void this.previewWebExperiment();sx.Zf(\"applying feature flags\",e),e.forEach(n=\u003e{var o;if(this.Kf\u0026\u0026(!((o=this.Kf)===null||o===void 0)\u0026\u0026o.has(n))){var i;const r=this._instance.getFeatureFlag(n),s=(i=this.Kf)===null||i===void 0?void 0:i.get(n);r\u0026\u0026s?.variants[r]\u0026\u0026this.Xf(s.name,r,s.variants[r].transforms)}})}}previewWebExperiment(){const e=sx.getWindowLocation();if(e?.search){const n=iG(e?.search,\"__experiment_id\"),o=iG(e?.search,\"__experiment_variant\");n\u0026\u0026o\u0026\u0026(sx.Zf(`previewing web experiments ${n} \u0026\u0026 ${o}`),this.getWebExperiments(i=\u003e{this.tp(parseInt(n),o,i)},!1,!0))}}loadIfEnabled(){this.Mr.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,o){if(this.Mr.disable_web_experiments\u0026\u0026!o)return e([]);const i=this._instance.get_property(\"$web_experiments\");if(i\u0026\u0026!n)return e(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor(\"api\",`/api/web_experiments/?token=${this.Mr.token}`),method:\"GET\",timestampMode:\"query\",callback:r=\u003ee(r.statusCode===200\u0026\u0026r.json\u0026\u0026r.json.experiments||[])})}tp(e,n,o){const i=o.filter(r=\u003er.id===e);i\u0026\u0026i.length\u003e0\u0026\u0026(sx.Zf(`Previewing web experiment [${i[0].name}] with variant [${n}]`),this.Xf(i[0].name,n,i[0].variants[n].transforms))}static Yf(e,n){return!Hs(e.conditions)\u0026\u0026sx.ep(e,n)\u0026\u0026sx.np(e)}static ep(e,n){var o;if(Hs(e.conditions)||Hs((o=e.conditions)===null||o===void 0?void 0:o.url))return!0;const i=sx.getWindowLocation();if(i){var r,s,a;const A=dOt(n,i.href);return!(!((r=e.conditions)===null||r===void 0)\u0026\u0026r.url)||vYo[(s=(a=e.conditions)===null||a===void 0?void 0:a.urlMatchType)!==null\u0026\u0026s!==void 0?s:\"icontains\"](e.conditions.url,A)}return!1}static getWindowLocation(){return Fn?.location}static np(e){var n;if(Hs(e.conditions)||Hs((n=e.conditions)===null||n===void 0?void 0:n.utm))return!0;const o=LOt();if(o.utm_source){var i,r,s,a,A,c,l,u;const g=!(!((i=e.conditions)===null||i===void 0||(i=i.utm)===null||i===void 0)\u0026\u0026i.utm_campaign)||((r=e.conditions)===null||r===void 0||(r=r.utm)===null||r===void 0?void 0:r.utm_campaign)==o.utm_campaign,h=!(!((s=e.conditions)===null||s===void 0||(s=s.utm)===null||s===void 0)\u0026\u0026s.utm_source)||((a=e.conditions)===null||a===void 0||(a=a.utm)===null||a===void 0?void 0:a.utm_source)==o.utm_source,d=!(!((A=e.conditions)===null||A===void 0||(A=A.utm)===null||A===void 0)\u0026\u0026A.utm_medium)||((c=e.conditions)===null||c===void 0||(c=c.utm)===null||c===void 0?void 0:c.utm_medium)==o.utm_medium,p=!(!((l=e.conditions)===null||l===void 0||(l=l.utm)===null||l===void 0)\u0026\u0026l.utm_term)||((u=e.conditions)===null||u===void 0||(u=u.utm)===null||u===void 0?void 0:u.utm_term)==o.utm_term;return g\u0026\u0026d\u0026\u0026p\u0026\u0026h}return!1}static Zf(e,...n){ui.info(`[WebExperiments] ${e}`,n)}Xf(e,n,o){this._is_bot()?sx.Zf(tYt):n!==\"control\"?o.forEach(i=\u003e{if(i.selector){var r;sx.Zf(`applying transform of variant ${n} for experiment ${e} `,i);const s=(r=document)===null||r===void 0?void 0:r.querySelectorAll(i.selector);s?.forEach(a=\u003e{const A=a;i.html\u0026\u0026(A.innerHTML=i.html),i.css\u0026\u0026A.setAttribute(\"style\",i.css)})}}):sx.Zf(\"Control variants leave the page unmodified.\")}_is_bot(){return tf\u0026\u0026this._instance?xGt(tf,this.Mr.custom_blocked_useragents):void 0}}},Uge),KYo={conversations:class{constructor(t){this._instance=t,this.sp=void 0,this._conversationsManager=null,this.rp=!1,this.ne=null,this.op=!1}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(this._instance.config.disable_conversations||(this.ap=t.ok,!t.ok))return;const e=t.config.conversations;Hs(e)||($y(e)?this.sp=e:(this.sp=e.enabled,this.ne=e),this.loadIfEnabled())}reset(){var t;(t=this._conversationsManager)===null||t===void 0||t.reset(),this._conversationsManager=null,this.sp=void 0,this.ne=null,this.ap=void 0,this.op=!1}loadIfEnabled(){if(this._conversationsManager||this.rp||this._instance.config.disable_conversations||_Ne(this._instance.config)||this._instance.config.cookieless_mode\u0026\u0026this._instance.consent.isOptedOut())return;const t=Vr?.__PosthogExtensions__;if(t\u0026\u0026!Eo(this.sp)\u0026\u0026this.sp)if(this.ne\u0026\u0026this.ne.token){this.rp=!0;try{const e=t.initConversations;if(e)return this.lp(e),void(this.rp=!1);const n=t.loadExternalDependency;if(!n)return void this.up(hNe);n(this._instance,\"conversations\",o=\u003e{o||!t.initConversations?this.up(\"Could not load conversations script\",o):this.lp(t.initConversations),this.rp=!1})}catch(e){this.up(\"Error initializing conversations\",e),this.rp=!1}}else A4.error(\"Conversations enabled but missing token in remote config.\")}lp(t){if(this.ne)try{this._conversationsManager=t(this.ne,this._instance),this.op=!1,A4.info(\"Conversations loaded successfully\")}catch(e){this.up(\"Error completing conversations initialization\",e)}else A4.error(\"Cannot complete initialization: remote config is null\")}up(t,e){A4.error(t,e),this._conversationsManager=null,this.rp=!1,this.op=!0}show(){this._conversationsManager?this._conversationsManager.show():A4.warn(\"Conversations not loaded yet.\")}hide(){this._conversationsManager\u0026\u0026this._conversationsManager.hide()}isAvailable(){return this.sp===!0\u0026\u0026!Id(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?\"disabled_by_config\":_Ne(this._instance.config)?\"disabled_for_toolbar\":this._instance.config.cookieless_mode\u0026\u0026this._instance.consent.isOptedOut()?\"consent_opted_out\":this.ap===!1?\"remote_config_failed\":Eo(this.sp)?this.ap?\"disabled_in_project\":\"remote_config_pending\":this.sp?Hs(this.ne)||!this.ne.token?\"missing_token\":Vr?.__PosthogExtensions__?this.rp?\"initializing\":this.op?\"load_failed\":\"not_loaded\":\"extensions_unavailable\":\"disabled_in_project\"}isVisible(){var t,e;return(t=(e=this._conversationsManager)===null||e===void 0?void 0:e.isVisible())!==null\u0026\u0026t!==void 0\u0026\u0026t}sendMessage(t,e,n){var o=this;return Zu(function*(){return o._conversationsManager?o._conversationsManager.sendMessage(t,e,n):(A4.warn(vR),null)})()}getMessages(t,e){var n=this;return Zu(function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(A4.warn(vR),null)})()}markAsRead(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(A4.warn(vR),null)})()}getTickets(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(A4.warn(vR),null)})()}requestRestoreLink(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(A4.warn(vR),null)})()}restoreFromToken(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(A4.warn(vR),null)})()}restoreFromUrlToken(){var t=this;return Zu(function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(A4.warn(vR),null)})()}getCurrentTicketId(){var t,e;return(t=(e=this._conversationsManager)===null||e===void 0?void 0:e.getCurrentTicketId())!==null\u0026\u0026t!==void 0?t:null}getWidgetSessionId(){var t,e;return(t=(e=this._conversationsManager)===null||e===void 0?void 0:e.getWidgetSessionId())!==null\u0026\u0026t!==void 0?t:null}$h(){var t;(t=this._conversationsManager)===null||t===void 0||t.setIdentity()}Ch(){var t;(t=this._conversationsManager)===null||t===void 0||t.clearIdentity()}}},VYo={logs:class{constructor(t){var e;this._instance=t,this.name=\"logs\",this.hp=!1,this.cp=!1,this.dp=!1,this.A=Cd(\"[logs]\"),this.vp=sn(sn({},this.A),{},{error:(...n)=\u003e{n.some(rYt)||this.A.error(...n)}}),this.ol=[],this.fp=[],this.kd=0,this.To=!1,this.pp=[],this.gp=[],this.mp=!1,this.yp=!1,this.bp=()=\u003e{var n,o;this.To||(this.kd=0,(n=this._p)===null||n===void 0||n.onReconnect(),(o=this.wp)===null||o===void 0||o.onReconnect())},this._instance\u0026\u0026(!((e=this._instance.config.logs)===null||e===void 0)\u0026\u0026e.captureConsoleLogs)\u0026\u0026(this.hp=!0),Fn\u0026\u0026el(Fn,\"online\",this.bp)}kp(t,e,n,o){var i;const r=nYt((i=this._instance)===null||i===void 0||(i=i.config)===null||i===void 0?void 0:i.logs,n);return[new vOo(this.Sp(t,e),r,this.vp,()=\u003ethis.xp(),s=\u003es(),void 0,o),r]}$p(){var t;const e=(t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.logs;var n;return this._p\u0026\u0026this.Cp===e||((n=this._p)===null||n===void 0||n.reset(),this.Cp=e,[this._p,this.Tp]=this.kp(()=\u003ethis.ol,o=\u003e{this.ol=o})),this._p}Ip(){var t;const e=(t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.logs;var n;return this.wp\u0026\u0026this.Mp===e||((n=this.wp)===null||n===void 0||n.reset(),this.Mp=e,[this.wp,this.Ep]=this.kp(()=\u003ethis.fp,o=\u003e{this.fp=o},{serviceNameDefault:\"posthog-browser-logs\",consoleCapture:!0},oYt)),this.wp}setup(t){var e;if(this.To)return;this.bo=t,!((e=this._instance)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.logs)===null||e===void 0)\u0026\u0026e.captureConsoleLogs\u0026\u0026(this.hp=!0),(this.hp||this.Pp()\u0026\u0026this.Rp())\u0026\u0026this.Ap();let n=!1;const o=t.onRemoteConfig(i=\u003e{var r;n=i.ok\u0026\u0026((r=i.config.logs)===null||r===void 0?void 0:r.captureConsoleLogs)===!0,this.onRemoteConfig(i)});this.To?o.dispose():(this.Eo=o,n||this.loadIfEnabled())}dispose(){var t,e,n,o;this.To||(this.To=!0,this.Op(),(t=this.Eo)===null||t===void 0||t.dispose(),this.Eo=void 0,this.bo=void 0,this.dp=!1,Fn?.removeEventListener(\"online\",this.bp),(e=this.Fp)===null||e===void 0||e.call(this),this.Fp=void 0,(n=this._p)===null||n===void 0||n.reset(),(o=this.wp)===null||o===void 0||o.reset())}onRemoteConfig(t){var e,n;if(this.To)return;const o=t.ok?(e=t.config.logs)===null||e===void 0?void 0:e.captureConsoleLogs:void 0;Hs(o)?this.Dp():((n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$logs_capture_enabled_server_side:!!o}),o?(this.hp=!0,this.cp||this.Ap(),this.loadIfEnabled()):this.Dp())}reset(){var t,e,n,o;this.Op(),(t=this._p)===null||t===void 0||t.clearQueue(),this.ol=[],(e=this._p)===null||e===void 0||e.reset(),(n=this.wp)===null||n===void 0||n.clearQueue(),this.fp=[],(o=this.wp)===null||o===void 0||o.reset(),this.kd=0}captureLog(t){this.To||this.$p().captureLog(t)}captureConsoleLog(t){this.To||this.Ip().captureLog(t)}captureBufferedConsoleLog(t,e,n){this.To||this.Ip().captureLog(t,{context:e,occurredAtMs:n})}Rp(){var t;return!!(!((t=this._instance)===null||t===void 0||(t=t.persistence)===null||t===void 0||(t=t.props)===null||t===void 0)\u0026\u0026t[LHt])}Pp(){var t,e,n;return!(!((t=this._instance)===null||t===void 0||(e=t.il)===null||e===void 0)\u0026\u0026e.call(t))||!!(!((n=Vr._POSTHOG_REMOTE_CONFIG)===null||n===void 0||(n=n[this._instance.config.token])===null||n===void 0)\u0026\u0026n.config)}Ih(){var t;this.Op(),(t=this.wp)===null||t===void 0||t.clearQueue(),this.fp=[]}Dp(){this.hp||this.Op()}Ap(){var t;if(this.mp||!Vr?.console)return;const e=nYt((t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.logs).maxBufferSize;let n=!0;this.gp.push(()=\u003e{n=!1});for(const o of wYo){let i;try{i=PYo(Vr.console[o])}catch{continue}i\u0026\u0026this.gp.push(lq(Vr.console,o,r=\u003e{const s=(...a)=\u003e{try{n\u0026\u0026this.Lp(o,a,e)}catch{}return r.apply(Vr.console,a)};return s.__rrweb_original__=i,s}))}this.mp=!0,this.Np=setTimeout(()=\u003e{this.Op()},3e4)}Lp(t,e,n){var o;if(this.mp\u0026\u0026!this.yp\u0026\u0026e.length!==0)if(!((o=this._instance)===null||o===void 0)\u0026\u0026o.is_capturing()){if(n\u003ethis.pp.length){this.yp=!0;try{this.pp.push({level:t,args:e,occurredAtMs:Date.now(),context:this.xp()})}finally{this.yp=!1}}}else this.Op()}Op(){if(this.pp=[],this.mp){this.mp=!1,this.Np\u0026\u0026(clearTimeout(this.Np),this.Np=void 0);for(const t of this.gp)t();this.gp=[]}}qp(){const t=this.pp;return this.Op(),t}get logger(){return this.jp||(this.jp={trace:(t,e)=\u003ethis.captureLog({body:t,level:\"trace\",attributes:e}),debug:(t,e)=\u003ethis.captureLog({body:t,level:\"debug\",attributes:e}),info:(t,e)=\u003ethis.captureLog({body:t,level:\"info\",attributes:e}),warn:(t,e)=\u003ethis.captureLog({body:t,level:\"warn\",attributes:e}),error:(t,e)=\u003ethis.captureLog({body:t,level:\"error\",attributes:e}),fatal:(t,e)=\u003ethis.captureLog({body:t,level:\"fatal\",attributes:e})}),this.jp}flushLogs(t){t?this.Bp(t):(this._p\u0026\u0026this._p.flush().catch(e=\u003ethis.Hp(e)),this.wp\u0026\u0026this.wp.flush().catch(e=\u003ethis.Hp(e)))}Hp(t){rYt(t)||this.A.error(\"PostHog logs flush failed:\",t)}loadIfEnabled(){if(this.To||!this.hp||this.cp||this.dp)return;const t=Vr?.__PosthogExtensions__;if(!t)return this.A.error(\"PostHog Extensions not found.\"),void this.Op();const e=t.loadExternalDependency;if(!e)return this.A.error(hNe),void this.Op();this.dp=!0;try{e(this._instance,\"logs\",n=\u003e{if(this.dp=!1,this.To||!this.hp)return;const o=t.logs;if(n||!o?.initializeLogs)this.A.error(\"Could not load logs script\",n),this.Op();else{var i;const a=this.qp();var r,s;this.Fp=o.initializeLogs((i=this.bo)!==null\u0026\u0026i!==void 0?i:this._instance),this.cp=!0,a.length\u003e0\u0026\u0026((r=o.replayConsoleBuffer)===null||r===void 0||r.call(o,(s=this.bo)!==null\u0026\u0026s!==void 0?s:this._instance,a))}})}catch(n){throw this.dp=!1,n}}Sp(t,e){const n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:o=\u003eo===l6.LogsQueue?t():void 0,setPersistedProperty(o,i){var r;o===l6.LogsQueue\u0026\u0026e((r=i)!==null\u0026\u0026r!==void 0?r:[])},js:o=\u003ethis.js(o),getLibraryId:()=\u003en_.LIB_NAME,getLibraryVersion:()=\u003en_.LIB_VERSION}}js(t){return new Promise(e=\u003e{if(kOt(this.kd,3))return void e({kind:\"fatal\",error:iRe(void 0,\"logs endpoint is unreachable, dropping batch\")});let n=!1;const o=r=\u003e{n||(n=!0,clearTimeout(i),e(r))},i=setTimeout(()=\u003e{this.A.warn(\"Logs request timed out before receiving a response\"),o({kind:\"retry-later\",error:iRe(void 0,\"logs request timed out\")})},9e4);this._instance._send_request({method:\"POST\",url:this.zp(),data:t,compression:\"best-available\",batchKey:\"logs\",fireCallbackOnDrop:!0,callback:r=\u003e{const s=r.statusCode;if(this.Up(s),s\u003e=200\u0026\u0026300\u003es)o({kind:\"ok\"});else if(s===413)o({kind:\"too-large\"});else if(s!==0\u0026\u0026s!==408\u0026\u0026s!==429\u0026\u0026500\u003es)o({kind:\"fatal\",error:new Error(`logs request failed with status ${s}`)});else{var a;s===0?(r.error||this.A.warn(\"Logs request failed before receiving an HTTP response\"),o({kind:\"retry-later\",error:iRe(r.error,\"logs request failed before receiving an HTTP response\")})):o({kind:\"retry-later\",error:(a=r.error)!==null\u0026\u0026a!==void 0?a:new Error(`logs request failed with status ${s}`)})}}})})}Up(t){(t!==0||this._instance.__loaded)\u0026\u0026(this.kd=FOt(t,this.kd,3,()=\u003ethis.A.warn(\"Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes.\")))}Bp(t){this.ol.length\u003e0\u0026\u0026this.Wp(t,this.ol,this.Tp,n_.LIB_NAME,e=\u003e{this.ol=e}),this.fp.length\u003e0\u0026\u0026this.Wp(t,this.fp,this.Ep,oYt,e=\u003e{this.fp=e})}Wp(t,e,n,o,i){if(e.length===0)return;const r=e.map(a=\u003ea.record);i([]);const s=SHt(r,bHt(n,n_.LIB_NAME,n_.LIB_VERSION),o,n_.LIB_VERSION);this._instance._send_request({method:\"POST\",url:this.zp(),data:s,compression:\"best-available\",batchKey:\"logs\",transport:t})}zp(){return this._instance.requestRouter.endpointFor(\"api\",\"/i/v1/logs\")+\"?token=\"+encodeURIComponent(this._instance.config.token)}xp(){var t;const e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){const{sessionId:n,windowId:o,sessionStartTimestamp:i,lastActivityTimestamp:r}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);e.sessionId=n,e.windowId=o,Hs(i)||(e.sessionStartTimestamp=i),Hs(r)||(e.lastActivityTimestamp=r)}if(!(Vr==null||(t=Vr.location)===null||t===void 0)\u0026\u0026t.href\u0026\u0026(e.currentUrl=this._instance.config.disable_capture_url_hashes?Mw(Vr.location.href):Vr.location.href),this._instance.featureFlags){const n=this._instance.featureFlags.getFlags();n\u0026\u0026n.length\u003e0\u0026\u0026(e.activeFeatureFlags=n)}return e}}},zYo={metrics:class{constructor(t){this._instance=t,this.A=Cd(\"[metrics]\"),this.To=!1}initialize(){this.onConfigChange()}onConfigChange(){var t;if(this.To)return;const e=!!(!((t=this._instance.config.metrics)===null||t===void 0)\u0026\u0026t.network);e\u0026\u0026!this.Vp?this.Vp=(n=\u003e{let o=!0;const i=()=\u003eo?(a=\u003e{var A;const c=(A=a.config.metrics)===null||A===void 0?void 0:A.network;return c===!0?{}:c||void 0})(n):void 0,r=NYo(n,i),s=RYo(n,i);return()=\u003e{o=!1,r(),s()}})(this._instance):!e\u0026\u0026this.Vp\u0026\u0026(this.Vp(),this.Vp=void 0)}$p(){var t;const e=(t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.metrics;var n;return this._p\u0026\u0026this.Cp===e||((n=this._p)===null||n===void 0||n.reset(),this.Cp=e,this._p=new wOo(this.Sp(),(function(o){var i,r,s,a,A;const c=o?.resourceAttributes;return{serviceName:(i=c?.[\"service.name\"])!==null\u0026\u0026i!==void 0?i:o?.serviceName,serviceVersion:(r=c?.[\"service.version\"])!==null\u0026\u0026r!==void 0?r:o?.serviceVersion,environment:(s=c?.[\"deployment.environment\"])!==null\u0026\u0026s!==void 0?s:o?.environment,resourceAttributes:c,beforeSend:o?.beforeSend,flushIntervalMs:(a=o?.flushIntervalMs)!==null\u0026\u0026a!==void 0?a:1e4,maxSeriesPerFlush:(A=o?.maxSeriesPerFlush)!==null\u0026\u0026A!==void 0?A:1e3}})(e),this.A)),this._p}count(t,e=1,n){this.$p().count(t,e,n)}gauge(t,e,n){this.$p().gauge(t,e,n)}histogram(t,e,n){this.$p().histogram(t,e,n)}flush(t){if(!this._p)return Promise.resolve();if(t){const e=this._p.drainWindow();return e\u0026\u0026this.Ys(e,t),Promise.resolve()}return this._p.flush().catch(e=\u003ethis.A.error(\"PostHog metrics flush failed:\",e))}reset(){var t;(t=this._p)===null||t===void 0||t.reset()}dispose(){var t,e;this.To=!0,(t=this.Vp)===null||t===void 0||t.call(this),this.Vp=void 0,(e=this._p)===null||e===void 0||e.reset()}Sp(){const t=this._instance,e=this;return{get isDisabled(){return!1},get optedOut(){return!t.is_capturing()},Ys:n=\u003ee.Ys(n),getLibraryId:()=\u003en_.LIB_NAME,getLibraryVersion:()=\u003en_.LIB_VERSION}}Ys(t,e){return new Promise(n=\u003e{let o=!1;const i=s=\u003e{o||(o=!0,clearTimeout(r),n(s))},r=setTimeout(()=\u003ei({kind:\"retry-later\",error:new Error(\"metrics request timed out\")}),9e4);this._instance._send_request(sn(sn({method:\"POST\",url:this.Gp(),data:t,compression:\"best-available\",batchKey:\"metrics\"},e\u0026\u0026{transport:e}),{},{fireCallbackOnDrop:!0,callback(s){const a=s.statusCode;if(a\u003e=200\u0026\u0026300\u003ea)i({kind:\"ok\"});else if(a===413)i({kind:\"too-large\"});else if(a!==0\u0026\u0026a!==408\u0026\u0026a!==429\u0026\u0026500\u003ea)i({kind:\"fatal\",error:new Error(`metrics request failed with status ${a}`)});else{var A;i({kind:\"retry-later\",error:(A=s.error)!==null\u0026\u0026A!==void 0?A:new Error(`metrics request failed with status ${a}`)})}}}))})}Gp(){return this._instance.requestRouter.endpointFor(\"api\",\"/i/v1/metrics\")+\"?token=\"+encodeURIComponent(this._instance.config.token)}}};Aq.__defaultExtensionClasses=sn({},sn(sn(sn(sn(sn(sn(sn(sn(sn(sn(sn(sn(sn({},Uge),TYo),kYo),FYo),LYo),HYo),GYo),OYo),YYo),UYo),KYo),VYo),zYo));var dG=(function(){n_.SDK_DIST_CHANNEL=\"npm\";const t=rq[aq]=new Aq;return(function(){function e(){e.done||(e.done=!0,_Gt=!1,kl(rq,function(n){n._dom_loaded()}))}No?.addEventListener?No.readyState===\"complete\"?e():el(No,\"DOMContentLoaded\",e,{capture:!1}):Fn\u0026\u0026ui.error(\"Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized\")})(),t})();class Wb extends Error{response;request;options;constructor(e,n,o){const i=e.status||e.status===0?e.status:\"\",r=e.statusText??\"\",s=`${i} ${r}`.trim(),a=s?`status code ${s}`:\"an unknown error\";super(`Request failed with ${a}: ${n.method} ${n.url}`),this.name=\"HTTPError\",this.response=e,this.request=n,this.options=o}}class AYt extends Error{name=\"NonError\";value;constructor(e){let n=\"Non-error value was thrown\";try{typeof e==\"string\"?n=e:e\u0026\u0026typeof e==\"object\"\u0026\u0026\"message\"in e\u0026\u0026typeof e.message==\"string\"\u0026\u0026(n=e.message)}catch{}super(n),this.value=e}}class aRe extends Error{name=\"ForceRetryError\";customDelay;code;customRequest;constructor(e){const n=e?.cause?e.cause instanceof Error?e.cause:new AYt(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:\"Forced retry\",n?{cause:n}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}const cYt=(()=\u003e{let t=!1,e=!1;const n=typeof globalThis.ReadableStream==\"function\",o=typeof globalThis.Request==\"function\";if(n\u0026\u0026o)try{e=new globalThis.Request(\"https://empty.invalid\",{body:new globalThis.ReadableStream,method:\"POST\",get duplex(){return t=!0,\"half\"}}).headers.has(\"Content-Type\")}catch(i){if(i instanceof Error\u0026\u0026i.message===\"unsupported BodyInit type\")return!1;throw i}return t\u0026\u0026!e})(),JYo=typeof globalThis.AbortController==\"function\",lYt=typeof globalThis.AbortSignal==\"function\"\u0026\u0026typeof globalThis.AbortSignal.any==\"function\",WYo=typeof globalThis.ReadableStream==\"function\",jYo=typeof globalThis.FormData==\"function\",uYt=[\"get\",\"post\",\"put\",\"patch\",\"head\",\"delete\"],$Yo={json:\"application/json\",text:\"text/*\",formData:\"multipart/form-data\",arrayBuffer:\"*/*\",blob:\"*/*\",bytes:\"*/*\"},ARe=2147483647,qYo=new TextEncoder().encode(\"------WebKitFormBoundaryaxpyiPgbbPti10Rw\").length,gYt=Symbol(\"stop\");class dYt{options;constructor(e){this.options=e}}const XYo=t=\u003enew dYt(t),ZYo={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},eUo={next:!0},tUo={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},nUo=t=\u003e{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,o]of t)e+=qYo,e+=new TextEncoder().encode(`Content-Disposition: form-data; name=\"${n}\"`).length,e+=typeof o==\"string\"?new TextEncoder().encode(o).length:o.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t==\"string\")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if(\"byteLength\"in t)return t.byteLength;if(typeof t==\"object\"\u0026\u0026t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},hYt=(t,e,n)=\u003e{let o,i=0;return t.pipeThrough(new TransformStream({transform(r,s){if(s.enqueue(r),o){i+=o.byteLength;let a=e===0?0:i/e;a\u003e=1\u0026\u0026(a=1-Number.EPSILON),n?.({percent:a,totalBytes:Math.max(e,i),transferredBytes:i},o)}o=r},flush(){o\u0026\u0026(i+=o.byteLength,n?.({percent:1,totalBytes:Math.max(e,i),transferredBytes:i},o))}}))},oUo=(t,e)=\u003e{if(!t.body)return t;if(t.status===204)return new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers});const n=Math.max(0,Number(t.headers.get(\"content-length\"))||0);return new Response(hYt(t.body,n,e),{status:t.status,statusText:t.statusText,headers:t.headers})},iUo=(t,e,n)=\u003e{if(!t.body)return t;const o=nUo(n??t.body);return new Request(t,{duplex:\"half\",body:hYt(t.body,o,e)})},wR=t=\u003et!==null\u0026\u0026typeof t==\"object\",Kge=(...t)=\u003e{for(const e of t)if((!wR(e)||Array.isArray(e))\u0026\u0026e!==void 0)throw new TypeError(\"The `options` argument must be an object\");return cRe({},...t)},pYt=(t={},e={})=\u003e{const n=new globalThis.Headers(t),o=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[r,s]of i.entries())o\u0026\u0026s===\"undefined\"||s===void 0?n.delete(r):n.set(r,s);return n};function Vge(t,e,n){return Object.hasOwn(e,n)\u0026\u0026e[n]===void 0?[]:cRe(t[n]??[],e[n]??[])}const mYt=(t={},e={})=\u003e({beforeRequest:Vge(t,e,\"beforeRequest\"),beforeRetry:Vge(t,e,\"beforeRetry\"),afterResponse:Vge(t,e,\"afterResponse\"),beforeError:Vge(t,e,\"beforeError\")}),rUo=(t,e)=\u003e{const n=new URLSearchParams;for(const o of[t,e])if(o!==void 0)if(o instanceof URLSearchParams)for(const[i,r]of o.entries())n.append(i,r);else if(Array.isArray(o))for(const i of o){if(!Array.isArray(i)||i.length!==2)throw new TypeError(\"Array search parameters must be provided in [[key, value], ...] format\");n.append(String(i[0]),String(i[1]))}else if(wR(o))for(const[i,r]of Object.entries(o))r!==void 0\u0026\u0026n.append(i,String(r));else{const i=new URLSearchParams(o);for(const[r,s]of i.entries())n.append(r,s)}return n},cRe=(...t)=\u003e{let e={},n={},o={},i;const r=[];for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(wR(s)){for(let[a,A]of Object.entries(s)){if(a===\"signal\"\u0026\u0026A instanceof globalThis.AbortSignal){r.push(A);continue}if(a===\"context\"){if(A!=null\u0026\u0026(!wR(A)||Array.isArray(A)))throw new TypeError(\"The `context` option must be an object\");e={...e,context:A==null?{}:{...e.context,...A}};continue}if(a===\"searchParams\"){A==null?i=void 0:i=i===void 0?A:rUo(i,A);continue}wR(A)\u0026\u0026a in e\u0026\u0026(A=cRe(e[a],A)),e={...e,[a]:A}}wR(s.hooks)\u0026\u0026(o=mYt(o,s.hooks),e.hooks=o),wR(s.headers)\u0026\u0026(n=pYt(n,s.headers),e.headers=n)}return i!==void 0\u0026\u0026(e.searchParams=i),r.length\u003e0\u0026\u0026(r.length===1?e.signal=r[0]:lYt?e.signal=AbortSignal.any(r):e.signal=r.at(-1)),e},sUo=t=\u003euYt.includes(t)?t.toUpperCase():t,_Yt={limit:2,methods:[\"get\",\"put\",\"head\",\"delete\",\"options\",\"trace\"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=\u003e.3*2**(t-1)*1e3,jitter:void 0,retryOnTimeout:!1},aUo=(t={})=\u003e{if(typeof t==\"number\")return{..._Yt,limit:t};if(t.methods\u0026\u0026!Array.isArray(t.methods))throw new Error(\"retry.methods must be an array\");if(t.methods\u0026\u0026=t.methods.map(n=\u003en.toLowerCase()),t.statusCodes\u0026\u0026!Array.isArray(t.statusCodes))throw new Error(\"retry.statusCodes must be an array\");const e=Object.fromEntries(Object.entries(t).filter(([,n])=\u003en!==void 0));return{..._Yt,...e}};class lRe extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name=\"TimeoutError\",this.request=e}}async function AUo(t,e,n,o){return new Promise((i,r)=\u003e{const s=setTimeout(()=\u003e{n\u0026\u0026n.abort(),r(new lRe(t))},o.timeout);o.fetch(t,e).then(i).catch(r).then(()=\u003e{clearTimeout(s)})})}async function cUo(t,{signal:e}){return new Promise((n,o)=\u003e{e\u0026\u0026(e.throwIfAborted(),e.addEventListener(\"abort\",i,{once:!0}));function i(){clearTimeout(r),o(e.reason)}const r=setTimeout(()=\u003e{e?.removeEventListener(\"abort\",i),n()},t)})}const lUo=(t,e)=\u003e{const n={};for(const o in e)Object.hasOwn(e,o)\u0026\u0026!(o in tUo)\u0026\u0026!(o in ZYo)\u0026\u0026(!(o in t)||o in eUo)\u0026\u0026(n[o]=e[o]);return n},uUo=t=\u003et===void 0?!1:Array.isArray(t)?t.length\u003e0:t instanceof URLSearchParams?t.size\u003e0:typeof t==\"object\"?Object.keys(t).length\u003e0:typeof t==\"string\"?t.trim().length\u003e0:!!t;function gUo(t){return t instanceof Wb||t?.name===Wb.name}function dUo(t){return t instanceof lRe||t?.name===lRe.name}let fYt=class Bit{static create(e,n){const o=new Bit(e,n),i=async()=\u003e{if(typeof o.#e.timeout==\"number\"\u0026\u0026o.#e.timeout\u003eARe)throw new RangeError(`The \\`timeout\\` option cannot be greater than ${ARe}`);await Promise.resolve();let s=await o.#_();for(const a of o.#e.hooks.afterResponse){const A=o.#g(s.clone());let c;try{c=await a(o.request,o.#u(),A,{retryCount:o.#i})}catch(u){throw o.#A(A),o.#A(s),u}if(c instanceof dYt)throw o.#A(A),o.#A(s),new aRe(c.options);const l=c instanceof globalThis.Response?c:s;A!==l\u0026\u0026o.#A(A),s!==l\u0026\u0026o.#A(s),s=l}if(o.#g(s),!s.ok\u0026\u0026(typeof o.#e.throwHttpErrors==\"function\"?o.#e.throwHttpErrors(s.status):o.#e.throwHttpErrors)){let a=new Wb(s,o.request,o.#u());for(const A of o.#e.hooks.beforeError)a=await A(a,{retryCount:o.#i});throw a}if(o.#e.onDownloadProgress){if(typeof o.#e.onDownloadProgress!=\"function\")throw new TypeError(\"The `onDownloadProgress` option must be a function\");if(!WYo)throw new Error(\"Streams are not supported in your environment. `ReadableStream` is missing.\");const a=s.clone();return o.#A(s),oUo(a,o.#e.onDownloadProgress)}return s},r=o.#m(i).finally(()=\u003e{const s=o.#s;o.#d(s?.body??void 0),o.#d(o.request.body??void 0)});for(const[s,a]of Object.entries($Yo))s===\"bytes\"\u0026\u0026typeof globalThis.Response?.prototype?.bytes!=\"function\"||(r[s]=async()=\u003e{o.request.headers.set(\"accept\",o.request.headers.get(\"accept\")||a);const A=await r;if(s===\"json\"){if(A.status===204)return\"\";const c=await A.text();return c===\"\"?\"\":n.parseJson?n.parseJson(c):JSON.parse(c)}return A[s]()});return r}static#o(e){return e\u0026\u0026typeof e==\"object\"\u0026\u0026!Array.isArray(e)\u0026\u0026!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,n])=\u003en!==void 0)):e}request;#n;#i=0;#t;#e;#s;#r;#c;constructor(e,n={}){if(this.#t=e,this.#e={...n,headers:pYt(this.#t.headers,n.headers),hooks:mYt({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:sUo(n.method??this.#t.method??\"GET\"),prefixUrl:String(n.prefixUrl||\"\"),retry:aUo(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},typeof this.#t!=\"string\"\u0026\u0026!(this.#t instanceof URL||this.#t instanceof globalThis.Request))throw new TypeError(\"`input` must be a string, URL, or Request\");if(this.#e.prefixUrl\u0026\u0026typeof this.#t==\"string\"){if(this.#t.startsWith(\"/\"))throw new Error(\"`input` must not begin with a slash when using `prefixUrl`\");this.#e.prefixUrl.endsWith(\"/\")||(this.#e.prefixUrl+=\"/\"),this.#t=this.#e.prefixUrl+this.#t}JYo\u0026\u0026lYt\u0026\u0026(this.#r=this.#e.signal??this.#t.signal,this.#n=new globalThis.AbortController,this.#e.signal=this.#r?AbortSignal.any([this.#r,this.#n.signal]):this.#n.signal),cYt\u0026\u0026(this.#e.duplex=\"half\"),this.#e.json!==void 0\u0026\u0026(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set(\"content-type\",this.#e.headers.get(\"content-type\")??\"application/json\"));const o=n.headers\u0026\u0026new globalThis.Headers(n.headers).has(\"content-type\");if(this.#t instanceof globalThis.Request\u0026\u0026(jYo\u0026\u0026this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)\u0026\u0026!o\u0026\u0026this.#e.headers.delete(\"content-type\"),this.request=new globalThis.Request(this.#t,this.#e),uUo(this.#e.searchParams)){const r=\"?\"+(typeof this.#e.searchParams==\"string\"?this.#e.searchParams.replace(/^\\?/,\"\"):new URLSearchParams(Bit.#o(this.#e.searchParams)).toString()),s=this.request.url.replace(/(?:\\?.*?)?(?=#|$)/,r);this.request=new globalThis.Request(s,this.#e)}if(this.#e.onUploadProgress){if(typeof this.#e.onUploadProgress!=\"function\")throw new TypeError(\"The `onUploadProgress` option must be a function\");if(!cYt)throw new Error(\"Request streams are not supported in your environment. The `duplex` option for `Request` is not available.\");this.request=this.#p(this.request,this.#e.body??void 0)}}#a(){const e=this.#e.retry.delay(this.#i);let n=e;this.#e.retry.jitter===!0?n=Math.random()*e:typeof this.#e.retry.jitter==\"function\"\u0026\u0026(n=this.#e.retry.jitter(e),(!Number.isFinite(n)||n\u003c0)\u0026\u0026(n=e));const o=this.#e.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,n)}async#l(e){if(this.#i++,this.#i\u003ethis.#e.retry.limit)throw e;const n=e instanceof Error?e:new AYt(e);if(n instanceof aRe)return n.customDelay??this.#a();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#e.retry.shouldRetry!==void 0){const o=await this.#e.retry.shouldRetry({error:n,retryCount:this.#i});if(o===!1)throw e;if(o===!0)return this.#a()}if(dUo(e)\u0026\u0026!this.#e.retry.retryOnTimeout)throw e;if(gUo(e)){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;const o=e.response.headers.get(\"Retry-After\")??e.response.headers.get(\"RateLimit-Reset\")??e.response.headers.get(\"X-RateLimit-Retry-After\")??e.response.headers.get(\"X-RateLimit-Reset\")??e.response.headers.get(\"X-Rate-Limit-Reset\");if(o\u0026\u0026this.#e.retry.afterStatusCodes.includes(e.response.status)){let i=Number(o)*1e3;Number.isNaN(i)?i=Date.parse(o)-Date.now():i\u003e=Date.parse(\"2024-01-01\")\u0026\u0026(i-=Date.now());const r=this.#e.retry.maxRetryAfter??i;return i\u003cr?i:r}if(e.response.status===413)throw e}return this.#a()}#g(e){return this.#e.parseJson\u0026\u0026(e.json=async()=\u003ethis.#e.parseJson(await e.text())),e}#d(e){e\u0026\u0026e.cancel().catch(()=\u003e{})}#A(e){this.#d(e.body??void 0)}async#m(e){try{return await e()}catch(n){const o=Math.min(await this.#l(n),ARe);if(this.#i\u003c1)throw n;if(await cUo(o,this.#r?{signal:this.#r}:{}),n instanceof aRe\u0026\u0026n.customRequest){const i=this.#e.signal?new globalThis.Request(n.customRequest,{signal:this.#e.signal}):new globalThis.Request(n.customRequest);this.#h(i)}for(const i of this.#e.hooks.beforeRetry){const r=await i({request:this.request,options:this.#u(),error:n,retryCount:this.#i});if(r instanceof globalThis.Request){this.#h(r);break}if(r instanceof globalThis.Response)return r;if(r===gYt)return}return this.#m(e)}}async#_(){this.#n?.signal.aborted\u0026\u0026(this.#n=new globalThis.AbortController,this.#e.signal=this.#r?AbortSignal.any([this.#r,this.#n.signal]):this.#n.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));for(const n of this.#e.hooks.beforeRequest){const o=await n(this.request,this.#u(),{retryCount:this.#i});if(o instanceof Response)return o;if(o instanceof globalThis.Request){this.#h(o);break}}const e=lUo(this.request,this.#e);return this.#s=this.request,this.request=this.#s.clone(),this.#e.timeout===!1?this.#e.fetch(this.#s,e):AUo(this.#s,e,this.#n,this.#e)}#u(){if(!this.#c){const{hooks:e,...n}=this.#e;this.#c=Object.freeze(n)}return this.#c}#h(e){this.#c=void 0,this.request=this.#p(e)}#p(e,n){return!this.#e.onUploadProgress||!e.body?e:iUo(e,this.#e.onUploadProgress,n??this.#e.body??void 0)}};const uRe=t=\u003e{const e=(n,o)=\u003efYt.create(n,Kge(t,o));for(const n of uYt)e[n]=(o,i)=\u003efYt.create(o,Kge(t,i,{method:n}));return e.create=n=\u003euRe(Kge(n)),e.extend=n=\u003e(typeof n==\"function\"\u0026\u0026(n=n(t??{})),uRe(Kge(t,n))),e.stop=gYt,e.retry=XYo,e},hUo=uRe();class pUo extends Wb{constructor(e,n,o,i){super(e,n,o),this.name=\"RegistryHTTPError\",this.message=i}}function uq(t){return typeof window\u003c\"u\"?window[t]:null}function Hw(){const t=uq(\"TSCIRCUIT_REGISTRY_API_BASE_URL\")||void 0||\"https://registry-api.tscircuit.com\",e=uq(\"TSCIRCUIT_REGISTRY_TOKEN\");return hUo.create({prefixUrl:t,headers:{Authorization:`Bearer ${e}`},timeout:3e4,hooks:{afterResponse:[async(n,o,i)=\u003e{if(i.ok)return i;let r=null;try{r=await i.clone().json()}catch(u){console.error(\"Failed to parse registry error response\",u)}const s=r?.error?.message??r?.error?.error_message??r?.message,a=r?.error?.error_code??r?.error_code,A=new URL(i.url),l=[`Registry request failed for ${`${A.pathname}${A.search}`} (${i.status})`];throw s\u0026\u0026l.push(`Server message: ${s}`),a\u0026\u0026l.push(`Error code: ${a}`),new pUo(i,n,o,l.join(\" | \"))}]}})}function zge(){return!!uq(\"TSCIRCUIT_REGISTRY_TOKEN\")}const gq={get:(t,e)=\u003eHw().get(t,e),post:(t,e)=\u003eHw().post(t,e),put:(t,e)=\u003eHw().put(t,e),delete:(t,e)=\u003eHw().delete(t,e),patch:(t,e)=\u003eHw().patch(t,e)},mUo=\"phc_htd8AQjSfVEsFCLQMAiUooG4Q0DKBCjqYuQglc9V3Wo\",_Uo=\"https://postpig.tscircuit.com\",IYt=\"runframe:anonymous-id\",gRe=()=\u003etypeof window\u003c\"u\",CYt=t=\u003et.includes(\"localhost\")||t.includes(\"127.0.0.1\"),fUo=t=\u003e{try{return new URL(t).hostname}catch{return null}},IUo=()=\u003e{if(!gRe())return null;let t=null;return document.referrer\u0026\u0026(t=fUo(document.referrer)),t??window.location.hostname},CUo=()=\u003etypeof crypto\u003c\"u\"\u0026\u0026\"randomUUID\"in crypto?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,yUo=()=\u003e{if(!gRe())return null;try{const t=window.localStorage.getItem(IYt);if(t)return t;const e=CUo();return window.localStorage.setItem(IYt,e),e}catch{return null}},xUo=()=\u003euq(\"TSCIRCUIT_USE_RUNFRAME_FOR_CLI\")===!0,yYt=()=\u003e!gRe()||CYt(window.location.hostname)\u0026\u0026!xUo()?!1:(dG.__loaded||dG.init(mUo,{api_host:_Uo,person_profiles:\"always\"}),!0),EUo=()=\u003e{if(!yYt())return null;const t=IUo(),e=t!=null\u0026\u0026!CYt(t);let n=null;e||(n=yUo());let o,i;return e?(o=`domain:${t}`,i=\"domain\"):(o=void 0,n\u0026\u0026(o=`anonymous:${n}`),i=\"anonymous_id\"),{embedDomain:t,anonymousId:n,distinctId:o,identityType:i}},BUo=(t,{source:e,...n})=\u003e{const o=EUo();if(!o)return;const{embedDomain:i,anonymousId:r,distinctId:s,identityType:a}=o;if(s){const A={};a===\"domain\"\u0026\u0026i\u0026\u0026(A.embed_domain=i),a===\"anonymous_id\"\u0026\u0026r\u0026\u0026(A.runframe_anonymous_id=r),dG.identify(s,A)}dG.capture(t,{...n,source:e,embed_domain:i,runframe_anonymous_id:r,identity_type:a})},bUo=t=\u003e{BUo(\"runframe_activity\",t)};yYt();function SUo(t){const e=String.fromCodePoint(...t);return btoa(e)}function QUo(t,e){const n=JSON.stringify(t),o=RQe(TQe(n));return`https://tscircuit.com/editor?#data:application/gzip;base64,${SUo(o)}`}function Oi(...t){return BHo(NB(t))}const xYt=t=\u003et.replace(/_/g,\" \").replace(/\\b\\w/g,e=\u003ee.toUpperCase()),dRe=JLo,Jge=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(tLt,{ref:n,className:Oi(\"rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400\",t),...e}));Jge.displayName=tLt.displayName;const p6=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(nLt,{ref:n,className:Oi(\"rf-inline-flex rf-items-center rf-justify-center rf-whitespace-nowrap rf-rounded-md rf-px-3 rf-py-1 rf-text-sm rf-font-medium rf-ring-offset-white rf-transition-all focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 disabled:rf-pointer-events-none disabled:rf-opacity-50 data-[state=active]:rf-bg-white data-[state=active]:rf-text-zinc-950 data-[state=active]:rf-shadow dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=active]:rf-bg-zinc-950 dark:data-[state=active]:rf-text-zinc-50\",t),...e}));p6.displayName=nLt.displayName;const cI=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(oLt,{ref:n,className:Oi(\"rf-h-full rf-mt-2 rf-ring-offset-white focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300\",t),...e}));cI.displayName=oLt.displayName;const EYt=\"T1RUTwAJAIAAAwAQQ0ZGIFhQSpcAAAcwAABJ3U9TLzJqmmVhAAABAAAAAGBjbWFwFN0WswAABEwAAALEaGVhZC1P1HwAAACcAAAANmhoZWEDrgI1AAAA1AAAACRobXR44xAAAAAAURAAAAFQbWF4cABUUAAAAAD4AAAABm5hbWUZQ94BAAABYAAAAutwb3N0AAMAAAAABxAAAAAgAAEAAAABAADb+Z65Xw889QADA+gAAAAA5e9IsgAAAADl70iy/9P/PwKHAvkAAAADAAIAAAAAAAAAAQAAA6z/LAAAArQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAFQAAFAAAFQAAAADArQB9AAFAAACigK7AAAAjAKKArsAAAHfADEBAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAABYWFhYAEAAIQB6A6z/LAAAAvkAwQAAAAEAAAAAAiwC1wAAAAAAAAAAACIBngABAAAAAAAAAAEAWQABAAAAAAABABEAAAABAAAAAAACAAcAMwABAAAAAAADABsA/AABAAAAAAAEABkASAABAAAAAAAFAAsA2wABAAAAAAAGABgAkwABAAAAAAAHAAEAWQABAAAAAAAIAAEAWQABAAAAAAAJAAEAWQABAAAAAAAKAAEAWQABAAAAAAALAAEAWQABAAAAAAAMAAEAWQABAAAAAAANAAEAWQABAAAAAAAOAAEAWQABAAAAAAAQABEAAAABAAAAAAARAAcAMwADAAEECQAAAAIAgwADAAEECQABACIAEQADAAEECQACAA4AOgADAAEECQADADYBFwADAAEECQAE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gX7dfg4BYebBY2bBZSaBZiVBZyPBZ2JBZqDBZZ+BfdX/AEF91n4AQWWmAWakwWdjQWbhwWZgQWUfAWNewWGewX7gfxMBYuKBYqJBT37EQWGhQWGhgU9TAWEiAWGhwU8bAWLiwWLiwUO+Uj3UtkV98+LBZ2IBZmCBZV9BY57BYh7BYF9BX2CBXmIBfwsiwWEjAWFiwWJjQWIiwWGjgWGjgWJjQWJjAWHkAWHkAWKjQWKjQWKkQWJkAWLjgWLjQWMkQWLkQWNjQWLjQWPkAWOkQX38vguBfvPiwV5jgV9lAWBmQWImwWOmwWVmQWZlAWdjgX4LIsFkooFkYsFjYoFjooFkIgFkYgFjIkFjYoFj4YFj4YFjIkFjIkFjIUFjYYFi4gFi4kFioUFi4UFiYkFi4kFh4YFiIYFDgAAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAAK0AAACtAAAArQAAA==\";function hn(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}const vUo=/^matrix\\(\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*,\\s*([0-9_+-.e]+)\\s*\\)$/i;function wUo(t){const e=t.match(vUo);if(e===null||e.length\u003c7)throw new Error(`'${t}' is not a matrix`);return{a:parseFloat(e[1]),b:parseFloat(e[2]),c:parseFloat(e[3]),d:parseFloat(e[4]),e:parseFloat(e[5]),f:parseFloat(e[6])}}function PUo(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function dq(t){return typeof t\u003e\"u\"}function of(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function hq(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return hq(r,...i)}}}function m0(...t){return hq(...t)}const{cos:MUo,sin:DUo}=Math;function jb(t,e,n){const o=MUo(t),i=DUo(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return dq(e)||dq(n)?r:hq([of(e,n),r,of(-e,-n)])}function kx(t,e=void 0,n=void 0,o=void 0){dq(e)\u0026\u0026(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return dq(n)||dq(o)?i:hq([of(n,o),i,of(-n,-o)])}function NUo(t){return $b(t)}function $b(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function RUo(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function TUo(t,e){const n=t[0].x!=null?t[0].x:t[0][0],o=t[0].y!=null?t[0].y:t[0][1],i=e[0].x!=null?e[0].x:e[0][0],r=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],A=e[1].x!=null?e[1].x:e[1][0],c=e[1].y!=null?e[1].y:e[1][1],l=t[2].x!=null?t[2].x:t[2][0],u=t[2].y!=null?t[2].y:t[2][1],g=e[2].x!=null?e[2].x:e[2][0],h=e[2].y!=null?e[2].y:e[2][1],d={a:n-l,b:o-u,c:s-l,d:a-u,e:l,f:u},p={a:i-g,b:r-h,c:A-g,d:c-h,e:g,f:h},m=PUo(d),_=hq([p,m]);return RUo(_)}function kUo(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Wge(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(i,Wge.prototype),i.expected=e,i.found=n,i.location=o,i.name=\"SyntaxError\",i}kUo(Wge,Error);function hRe(t,e,n){return n=n||\" \",t.length\u003ee?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Wge.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var n=null,o;for(o=0;o\u003ct.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\\r\\n|\\n|\\r/g);break}var i=this.location.start,r=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(i):i,s=this.location.source+\":\"+r.line+\":\"+r.column;if(n){var a=this.location.end,A=hRe(\"\",r.line.toString().length,\" \"),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`\n --\u003e `+s+`\n`+A+` |\n`+r.line+\" | \"+c+`\n`+A+\" | \"+hRe(\"\",i.column-1,\" \")+hRe(\"\",u,\"^\")}else e+=`\n at `+s}return e},Wge.buildMessage=function(t,e){var n={literal:function(c){return'\"'+i(c.text)+'\"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+\"-\"+r(u[1]):r(u)});return\"[\"+(c.inverted?\"^\":\"\")+l.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function r(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length\u003e0){for(u=1,g=1;u\u003cl.length;u++)l[u-1]!==l[u]\u0026\u0026(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+\" or \"+l[1];default:return l.slice(0,-1).join(\", \")+\", or \"+l[l.length-1]}}function A(c){return c?'\"'+i(c)+'\"':\"end of input\"}return\"Expected \"+a(t)+\" but \"+A(e)+\" found.\"};var pq=\"TscircuitAlphabet\",BYt=\"data-tscircuit-alphabet-font\";function Ow(t){const e=o=\u003e({...o,children:(o.children??[]).filter(i=\u003e!(BYt in(i.attributes??{}))).map(e)}),n=e(t);return n.children.push({name:\"style\",type:\"element\",value:\"\",attributes:{[BYt]:\"\",type:\"text/css\"},children:[{name:\"\",type:\"text\",value:`@font-face { font-family: '${pq}'; src: url('data:font/ttf;base64,${EYt}') format('truetype'); font-weight: normal; font-style: normal; }`,attributes:{},children:[]}]}),Cbt(n)}function FUo(t,e,n){const{transform:o,shouldDrawErrors:i}=n;if(!i)return[];const{pcb_port_ids:r}=t,s=e.find(g=\u003eg.type===\"pcb_port\"\u0026\u0026g.pcb_port_id===r?.[0]),a=e.find(g=\u003eg.type===\"pcb_port\"\u0026\u0026g.pcb_port_id===r?.[1]);if(!s||!a){const h=t.message?.match(/pcb_via\\[#?(pcb_via_\\d+)\\]/)?.[1],d=e.find(p=\u003ep.type===\"pcb_via\"\u0026\u0026p.pcb_via_id===h);if(d\u0026\u0026d.type===\"pcb_via\")return LUo(t,d,n);if(t.center){const p=hn(o,{x:t.center.x,y:t.center.y});return pRe([{name:\"rect\",type:\"element\",attributes:{x:(p.x-5).toString(),y:(p.y-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${p.x} ${p.y})`},children:[],value:\"\"},{name:\"text\",type:\"element\",attributes:{x:p.x.toString(),y:(p.y-15).toString(),fill:\"red\",\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"text-anchor\":\"middle\"},children:[{type:\"text\",value:t.message||\"Pcb Trace Error\",name:\"\",attributes:{},children:[]}],value:\"\"}])}else return[]}const A=hn(o,{x:s.x,y:s.y}),c=hn(o,{x:a.x,y:a.y}),l={x:(A.x+c.x)/2,y:(A.y+c.y)/2};if(isNaN(A.x)||isNaN(A.y)||isNaN(c.x)||isNaN(c.y)||isNaN(l.x)||isNaN(l.y))return[];const u=[{name:\"line\",type:\"element\",attributes:{x1:A.x.toString(),y1:A.y.toString(),x2:l.x.toString(),y2:l.y.toString(),stroke:\"red\",\"stroke-width\":\"1.5\",\"stroke-dasharray\":\"2,2\"},children:[],value:\"\"},{name:\"line\",type:\"element\",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:c.x.toString(),y2:c.y.toString(),stroke:\"red\",\"stroke-width\":\"1.5\",\"stroke-dasharray\":\"2,2\"},children:[],value:\"\"},{name:\"rect\",type:\"element\",attributes:{x:(l.x-5).toString(),y:(l.y-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${l.x} ${l.y})`},children:[],value:\"\"},{name:\"text\",type:\"element\",attributes:{x:l.x.toString(),y:(l.y-15).toString(),fill:\"red\",\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"text-anchor\":\"middle\"},children:[{type:\"text\",value:t.message||\"Pcb Trace Error\",name:\"\",attributes:{},children:[]}],value:\"\"}];return pRe(u)}function LUo(t,e,n){const{transform:o}=n;if(t.center\u0026\u0026e){const i=hn(o,{x:t.center.x,y:t.center.y}),r=hn(o,{x:e.x,y:e.y}),s=r.x-i.x,a=r.y-i.y,A=Math.sqrt(s*s+a*a),c=Math.atan2(a,s)*180/Math.PI,u=A+10*2,g=20,h=(i.x+r.x)/2,d=(i.y+r.y)/2;return pRe([{name:\"rect\",type:\"element\",attributes:{x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),fill:\"none\",stroke:\"red\",\"stroke-width\":\"1\",\"stroke-dasharray\":\"3,2\",transform:`rotate(${c} ${h} ${d})`},children:[],value:\"\"},{name:\"rect\",type:\"element\",attributes:{x:(h-5).toString(),y:(d-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${h} ${d})`},children:[],value:\"\"},{name:\"text\",type:\"element\",attributes:{x:h.toString(),y:(d-g/2-5).toString(),fill:\"red\",\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"text-anchor\":\"middle\"},children:[{type:\"text\",value:t.message||\"Pcb Trace Error\",name:\"\",attributes:{},children:[]}],value:\"\"}])}return[]}function pRe(t){return t.map(e=\u003e({...e,attributes:{...e.attributes??{},\"data-type\":e.attributes?.[\"data-type\"]??\"pcb_trace_error\",\"data-pcb-layer\":e.attributes?.[\"data-pcb-layer\"]??\"overlay\"},children:(e.children??[]).map(n=\u003en?.type===\"element\"?{...n,attributes:{...n.attributes??{},\"data-type\":n.attributes?.[\"data-type\"]??\"pcb_trace_error\",\"data-pcb-layer\":n.attributes?.[\"data-pcb-layer\"]??\"overlay\"}}:n)}))}function HUo(t){return t.map(e=\u003e({...e,attributes:{...e.attributes??{},\"data-type\":e.attributes?.[\"data-type\"]??\"pcb_footprint_overlap_error\",\"data-pcb-layer\":e.attributes?.[\"data-pcb-layer\"]??\"overlay\"},children:(e.children??[]).map(n=\u003en?.type===\"element\"?{...n,attributes:{...n.attributes??{},\"data-type\":n.attributes?.[\"data-type\"]??\"pcb_footprint_overlap_error\",\"data-pcb-layer\":n.attributes?.[\"data-pcb-layer\"]??\"overlay\"}}:n)}))}function OUo(t,e,n){const{transform:o,shouldDrawErrors:i}=n;if(!i)return[];const r=[],s=[];let a=[];if(t.pcb_smtpad_ids)for(const l of t.pcb_smtpad_ids){const u=e.find(g=\u003eg.type===\"pcb_smtpad\"\u0026\u0026g.pcb_smtpad_id===l);u\u0026\u0026(s.push({x:u.x,y:u.y,type:\"pcb_smtpad\",id:l,pcb_port_id:u.pcb_port_id}),u.pcb_port_id\u0026\u0026a.push(u.pcb_port_id))}const A=a.length\u003e1\u0026\u0026a.every(l=\u003el===a[0]);let c=s;if(A\u0026\u0026(c=s.filter(l=\u003el.type!==\"pcb_smtpad\")),t.pcb_plated_hole_ids)for(const l of t.pcb_plated_hole_ids){const u=e.find(g=\u003eg.type===\"pcb_plated_hole\"\u0026\u0026g.pcb_plated_hole_id===l);u\u0026\u0026c.push({x:u.x,y:u.y,type:\"pcb_plated_hole\",id:l})}if(t.pcb_hole_ids)for(const l of t.pcb_hole_ids){const u=e.find(g=\u003eg.type===\"pcb_hole\"\u0026\u0026g.pcb_hole_id===l);u\u0026\u0026c.push({x:u.x,y:u.y,type:\"pcb_hole\",id:l})}if(c.length\u003e0){const l=c.reduce((h,d)=\u003eh+d.x,0)/c.length,u=c.reduce((h,d)=\u003eh+d.y,0)/c.length,g=hn(o,{x:l,y:u});r.push({name:\"rect\",type:\"element\",attributes:{x:(g.x-5).toString(),y:(g.y-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${g.x} ${g.y})`},children:[],value:\"\"}),r.push({name:\"text\",type:\"element\",attributes:{x:g.x.toString(),y:(g.y-15).toString(),fill:\"red\",\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"text-anchor\":\"middle\"},children:[{type:\"text\",value:t.message||\"PCB Footprint Overlap Error\",name:\"\",attributes:{},children:[]}],value:\"\"});for(const h of c){const d=hn(o,{x:h.x,y:h.y});r.push({name:\"rect\",type:\"element\",attributes:{x:(d.x-5).toString(),y:(d.y-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${d.x} ${d.y})`},children:[],value:\"\"}),c.length\u003e1\u0026\u0026r.push({name:\"line\",type:\"element\",attributes:{x1:g.x.toString(),y1:g.y.toString(),x2:d.x.toString(),y2:d.y.toString(),stroke:\"red\",\"stroke-width\":\"1.5\",\"stroke-dasharray\":\"2,2\"},children:[],value:\"\"})}}return HUo(r)}function GUo(t,e,n){const{transform:o,shouldDrawErrors:i}=n;if(!i)return[];const r=[],s=[];for(const l of t.pcb_component_ids){const u=e.find(g=\u003eg.type===\"pcb_component\"\u0026\u0026g.pcb_component_id===l);u\u0026\u0026s.push(u.center)}if(s.length===0)return[];const a=s.reduce((l,u)=\u003el+u.x,0)/s.length,A=s.reduce((l,u)=\u003el+u.y,0)/s.length,c=hn(o,{x:a,y:A});r.push({name:\"rect\",type:\"element\",attributes:{x:(c.x-5).toString(),y:(c.y-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${c.x} ${c.y})`,\"data-type\":\"pcb_courtyard_overlap_error\",\"data-pcb-layer\":\"overlay\"},children:[],value:\"\"}),r.push({name:\"text\",type:\"element\",attributes:{x:c.x.toString(),y:(c.y-15).toString(),fill:\"red\",\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"text-anchor\":\"middle\",\"data-type\":\"pcb_courtyard_overlap_error\",\"data-pcb-layer\":\"overlay\"},children:[{type:\"text\",value:t.message||\"PCB Courtyard Overlap\",name:\"\",attributes:{},children:[]}],value:\"\"});for(const l of s){const u=hn(o,l);r.push({name:\"rect\",type:\"element\",attributes:{x:(u.x-5).toString(),y:(u.y-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${u.x} ${u.y})`,\"data-type\":\"pcb_courtyard_overlap_error\",\"data-pcb-layer\":\"overlay\"},children:[],value:\"\"})}if(s.length===2){const l=s.map(h=\u003ehn(o,h)),u=l[0],g=l[1];r.push({name:\"line\",type:\"element\",attributes:{x1:u.x.toString(),y1:u.y.toString(),x2:g.x.toString(),y2:g.y.toString(),stroke:\"red\",\"stroke-width\":\"1.5\",\"stroke-dasharray\":\"4,3\",\"data-type\":\"pcb_courtyard_overlap_error\",\"data-pcb-layer\":\"overlay\"},children:[],value:\"\"})}return r}function YUo(t){return t.map(e=\u003e({...e,attributes:{...e.attributes??{},\"data-type\":e.attributes?.[\"data-type\"]??\"pcb_component_outside_board_error\",\"data-pcb-layer\":e.attributes?.[\"data-pcb-layer\"]??\"overlay\"}}))}function UUo(t,e){const n=t.pcb_component_id;if(!n)return t.component_bounds??null;const o=e.find(i=\u003ei.type===\"pcb_component\"\u0026\u0026i.pcb_component_id===n);return o?.center\u0026\u0026o?.width\u0026\u0026o?.height?{min_x:o.center.x-o.width/2,max_x:o.center.x+o.width/2,min_y:o.center.y-o.height/2,max_y:o.center.y+o.height/2}:t.component_bounds??null}function KUo(t,e,n){const{shouldDrawErrors:o,transform:i}=n;if(!o)return[];const r=UUo(t,e);if(!r)return[];const s=hn(i,{x:r.min_x,y:r.min_y}),a=hn(i,{x:r.max_x,y:r.max_y}),A=Math.min(s.x,a.x),c=Math.min(s.y,a.y),l=Math.abs(a.x-s.x),u=Math.abs(a.y-s.y),g=A+l/2,h=c+u/2,d=[{type:\"element\",name:\"rect\",value:\"\",attributes:{x:A.toString(),y:c.toString(),width:l.toString(),height:u.toString(),fill:\"none\",stroke:\"red\",\"stroke-width\":\"1.5\",\"stroke-dasharray\":\"4,2\"},children:[]},{type:\"element\",name:\"rect\",value:\"\",attributes:{x:(g-5).toString(),y:(h-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${g} ${h})`},children:[]},{type:\"element\",name:\"text\",value:\"\",attributes:{x:g.toString(),y:(c-10).toString(),fill:\"red\",\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"text-anchor\":\"middle\"},children:[{type:\"text\",name:\"\",value:t.message??\"PCB component extends outside board boundaries\",attributes:{},children:[]}]}];return YUo(d)}function mq(t){return t!==void 0\u0026\u0026typeof t.x==\"number\"\u0026\u0026Number.isFinite(t.x)\u0026\u0026typeof t.y==\"number\"\u0026\u0026Number.isFinite(t.y)}function VUo(t,e){return t.type===\"pcb_via_trace_clearance_error\"?e.find(n=\u003en.type===\"pcb_via\"\u0026\u0026n.pcb_via_id===t.pcb_via_id):e.find(n=\u003en.type===\"pcb_smtpad\"\u0026\u0026n.pcb_smtpad_id===t.pcb_pad_id||n.type===\"pcb_plated_hole\"\u0026\u0026n.pcb_plated_hole_id===t.pcb_pad_id)}function zUo(t){if(t){if(\"x\"in t\u0026\u0026\"y\"in t\u0026\u0026mq(t))return{x:t.x,y:t.y};if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"polygon\"\u0026\u0026t.points.length\u003e0){const e=t.points.filter(mq);if(e.length===0)return;const n=e.map(i=\u003ei.x),o=e.map(i=\u003ei.y);return{x:(Math.min(...n)+Math.max(...n))/2,y:(Math.min(...o)+Math.max(...o))/2}}}}function JUo(t){return t.route_type===\"through_pad\"?[t.start,t.end].filter(mq):mq(t)?[{x:t.x,y:t.y}]:[]}function WUo(t){if(!t)return;let e,n;for(const o of t.route){const i=JUo(o);!e\u0026\u0026i[0]\u0026\u0026(e=i[0]),i.length\u003e0\u0026\u0026(n=i[i.length-1])}return e\u0026\u0026n?{start:e,end:n}:void 0}function jUo(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function mRe(t,e,n){const o=t.x-e.x,i=t.y-e.y;if(!(o*o+i*i\u003c.25))return{type:\"element\",name:\"line\",value:\"\",attributes:{x1:t.x.toString(),y1:t.y.toString(),x2:e.x.toString(),y2:e.y.toString(),stroke:\"red\",\"stroke-width\":\"1.5\",\"stroke-dasharray\":\"2,2\",\"data-error-reference\":n},children:[]}}function $Uo(t,e){return t.map(n=\u003e({...n,attributes:{...n.attributes??{},\"data-type\":n.attributes?.[\"data-type\"]??e,\"data-pcb-layer\":n.attributes?.[\"data-pcb-layer\"]??\"overlay\"}}))}function qUo(t,e,n){const{shouldDrawErrors:o,transform:i}=n;if(!o)return[];const r=zUo(VUo(t,e)),s=e.find(I=\u003eI.type===\"pcb_trace\"\u0026\u0026I.pcb_trace_id===t.pcb_trace_id),a=WUo(s),A=mq(t.center)?t.center:r??(a?jUo(a.start,a.end):void 0);if(!A)return[];const c=hn(i,A),l=r?hn(i,r):void 0,u=a?{start:hn(i,a.start),end:hn(i,a.end)}:void 0,g=[u?mRe(u.start,c,\"trace-start\"):void 0,u?mRe(u.end,c,\"trace-end\"):void 0,l?mRe(l,c,\"obstacle\"):void 0].filter(I=\u003eI!==void 0),h=t.type===\"pcb_pad_trace_clearance_error\"?\"Pad/trace\":\"Via/trace\",d=t.actual_clearance,p=t.minimum_clearance,m=d!==void 0\u0026\u0026p!==void 0?`${h} clearance ${d} is below minimum ${p}`:t.type===\"pcb_pad_trace_clearance_error\"?\"Pad and trace too close\":\"Via and trace too close\",_=t.message??m,f=[...g,{type:\"element\",name:\"rect\",value:\"\",attributes:{x:(c.x-5).toString(),y:(c.y-5).toString(),width:\"10\",height:\"10\",fill:\"red\",transform:`rotate(45 ${c.x} ${c.y})`},children:[]},{type:\"element\",name:\"text\",value:\"\",attributes:{x:c.x.toString(),y:(c.y-15).toString(),fill:\"red\",\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"text-anchor\":\"middle\"},children:[{type:\"text\",name:\"\",value:_,attributes:{},children:[]}]}];return $Uo(f,t.type)}function XUo(t,e){const{transform:n,layer:o}=e;if(!t.route||!Array.isArray(t.route))return[];const i=t.route[0],r=t.route[t.route.length-1],s=i.x===r.x\u0026\u0026i.y===r.y,a=t.route.slice(0,s?-1:void 0).map((A,c)=\u003e{const[l,u]=hn(n,[A.x,A.y]);return c===0?`M ${l} ${u}`:`L ${l} ${u}`}).join(\" \")+(s?\" Z\":\"\");return[{name:\"path\",type:\"element\",attributes:{class:\"pcb-fabrication-note-path\",stroke:t.color||\"rgba(255,255,255,0.5)\",fill:\"none\",d:a,\"stroke-width\":(t.stroke_width*Math.abs(n.a)).toString(),\"data-pcb-component-id\":t.pcb_component_id,\"data-pcb-fabrication-note-path-id\":t.pcb_fabrication_note_path_id,\"data-type\":\"pcb_fabrication_note_path\",\"data-pcb-layer\":\"overlay\"},value:\"\",children:[]}]}var bYt=vc(\"circuit-to-svg\"),cm=bYt.extend(\"pcb\");bYt.extend(\"sch\");function SYt(t){switch(t){case\"top_left\":return{textAnchor:\"start\",dominantBaseline:\"text-before-edge\"};case\"top_center\":return{textAnchor:\"middle\",dominantBaseline:\"text-before-edge\"};case\"top_right\":return{textAnchor:\"end\",dominantBaseline:\"text-before-edge\"};case\"center_left\":return{textAnchor:\"start\",dominantBaseline:\"central\"};case\"center_right\":return{textAnchor:\"end\",dominantBaseline:\"central\"};case\"bottom_left\":return{textAnchor:\"start\",dominantBaseline:\"text-after-edge\"};case\"bottom_center\":return{textAnchor:\"middle\",dominantBaseline:\"text-after-edge\"};case\"bottom_right\":return{textAnchor:\"end\",dominantBaseline:\"text-after-edge\"};default:return{textAnchor:\"middle\",dominantBaseline:\"central\"}}}function ZUo(t,e){const{transform:n,layer:o}=e,{anchor_position:i,anchor_alignment:r=\"center\",text:s,font_size:a=1,layer:A=\"top\",color:c,ccw_rotation:l=0}=t;if(o\u0026\u0026A!==o)return[];if(!i||typeof i.x!=\"number\"||typeof i.y!=\"number\")return cm(`[pcb_fabrication_note_text] Invalid anchor_position for \"${t.pcb_fabrication_note_text_id}\": expected {x: number, y: number}, got ${JSON.stringify(i)}`),[];const[u,g]=hn(n,[i.x,i.y]),h=a*Math.abs(n.a),{textAnchor:d,dominantBaseline:p}=SYt(r),m=m0(of(u,g),jb(-l*Math.PI/180));return[{name:\"text\",type:\"element\",attributes:{x:\"0\",y:\"0\",\"font-family\":pq,\"font-size\":h.toString(),\"text-anchor\":d,\"dominant-baseline\":p,transform:$b(m),class:\"pcb-fabrication-note-text\",fill:c||\"rgba(255,255,255,0.5)\",\"data-type\":\"pcb_fabrication_note_text\",\"data-pcb-layer\":\"overlay\"},children:[{type:\"text\",value:s,name:\"\",attributes:{},children:[]}],value:\"\"}]}var eKo=\"rgba(255,255,255,0.5)\",tKo=\"rgba(255,255,255,0.2)\";function nKo(t,e){const{transform:n,layer:o}=e,{center:i,width:r,height:s,stroke_width:a,is_filled:A,has_stroke:c,is_stroke_dashed:l,color:u,layer:g=\"top\",pcb_component_id:h,pcb_fabrication_note_rect_id:d,corner_radius:p}=t;if(o\u0026\u0026g!==o)return[];if(!i||typeof i.x!=\"number\"||typeof i.y!=\"number\"||typeof r!=\"number\"||typeof s!=\"number\")return cm(`[pcb_fabrication_note_rect] Invalid data for \"${d}\": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(i)}, width=${JSON.stringify(r)}, height=${JSON.stringify(s)}`),[];const m=r/2,_=s/2,[f,I]=hn(n,[i.x-m,i.y+_]),[C,y]=hn(n,[i.x+m,i.y-_]),x=Math.min(f,C),E=Math.min(I,y),B=Math.abs(C-f),S=Math.abs(y-I),w=(typeof a==\"number\"?a:0)*Math.abs(n.a),M=u??eKo,k=typeof p==\"number\"\u0026\u0026p\u003e0?p:0,R=k*Math.abs(n.a),F=k*Math.abs(n.d),O={x:x.toString(),y:E.toString(),width:B.toString(),height:S.toString(),class:\"pcb-fabrication-note-rect\",\"data-type\":\"pcb_fabrication_note_rect\",\"data-pcb-fabrication-note-rect-id\":d,\"data-pcb-layer\":\"overlay\"};if(h!==void 0\u0026\u0026(O[\"data-pcb-component-id\"]=h),R\u003e0\u0026\u0026(O.rx=R.toString()),F\u003e0\u0026\u0026(O.ry=F.toString()),A?O.fill=u??tKo:O.fill=\"none\",c??w\u003e0){if(O.stroke=M,O[\"stroke-width\"]=w.toString(),l){const W=.2*Math.abs(n.a),te=.1*Math.abs(n.a);O[\"stroke-dasharray\"]=`${W} ${te}`}}else O.stroke=\"none\";return[{name:\"rect\",type:\"element\",value:\"\",attributes:O,children:[]}]}function _Re(t){const e=Math.hypot(t.x,t.y)||1;return{x:t.x/e,y:t.y/e}}var oKo=1.5,iKo=.6,rKo=.3;function QYt(t){return t.map((e,n)=\u003en===0?`M ${e.x} ${e.y}`:`L ${e.x} ${e.y}`).join(\" \")}function sKo(t,e){const{transform:n,layer:o}=e,{from:i,to:r,text:s,font_size:a=1,color:A,arrow_size:c,layer:l,pcb_component_id:u,pcb_fabrication_note_dimension_id:g,offset_distance:h,offset_direction:d,text_ccw_rotation:p}=t;if(o\u0026\u0026l\u0026\u0026l!==o)return[];if(!i||!r||typeof i!=\"object\"||typeof r!=\"object\")return cm(`[pcb_fabrication_note_dimension] Invalid endpoints for \"${g}\": expected {from: {x, y}, to: {x, y}}, got from=${JSON.stringify(i)}, to=${JSON.stringify(r)}`),[];if(typeof i.x!=\"number\"||typeof i.y!=\"number\"||typeof r.x!=\"number\"||typeof r.y!=\"number\")return cm(`[pcb_fabrication_note_dimension] Invalid point values for \"${g}\": x and y must be numbers, got from=${JSON.stringify(i)}, to=${JSON.stringify(r)}`),[];const m=typeof c==\"number\"?c:void 0;if(m===void 0||!Number.isFinite(m)||m\u003c=0)return cm(`[pcb_fabrication_note_dimension] Invalid arrow_size for \"${g}\": expected positive number, got ${JSON.stringify(c)}`),[];const _=m,f=_Re({x:r.x-i.x,y:r.y-i.y});if(Number.isNaN(f.x)||Number.isNaN(f.y))return[];const I={x:-f.y,y:f.x},C=d\u0026\u0026typeof d.x==\"number\"\u0026\u0026typeof d.y==\"number\",y=C?_Re({x:d.x,y:d.y}):{x:0,y:0},x=typeof h==\"number\"?h:0,E={x:y.x*x,y:y.y*x},B=Ce=\u003e({x:Ce.x+E.x,y:Ce.y+E.y}),S=B(i),Q=B(r),w=_/2,M={x:S.x+f.x*_,y:S.y+f.y*_},k={x:Q.x-f.x*_,y:Q.y-f.y*_},R=[ke(S),ke({x:M.x+I.x*w,y:M.y+I.y*w}),ke({x:M.x-I.x*w,y:M.y-I.y*w})],F=[ke(Q),ke({x:k.x+I.x*w,y:k.y+I.y*w}),ke({x:k.x-I.x*w,y:k.y-I.y*w})],[O,U]=hn(n,[M.x,M.y]),[Y,W]=hn(n,[k.x,k.y]),te=_/5*Math.abs(n.a),j=A||\"rgba(255,255,255,0.5)\",J=C\u0026\u0026(Math.abs(y.x)\u003eNumber.EPSILON||Math.abs(y.y)\u003eNumber.EPSILON)?y:I,oe=x+_,ie=Ce=\u003e{const Le={x:Ce.x+J.x*oe,y:Ce.y+J.y*oe},[Ye,tt]=hn(n,[Ce.x,Ce.y]),[At,at]=hn(n,[Le.x,Le.y]);return{name:\"path\",type:\"element\",value:\"\",attributes:{d:`M ${Ye} ${tt} L ${At} ${at}`,stroke:j,fill:\"none\",\"stroke-width\":te.toString(),\"stroke-linecap\":\"round\",class:\"pcb-fabrication-note-dimension-extension\"},children:[]}},ne=[ie(i),ie(r)],le={x:(i.x+r.x)/2+E.x,y:(i.y+r.y)/2+E.y},[ge,_e]=hn(n,[S.x,S.y]),[ue,fe]=hn(n,[Q.x,Q.y]),pe=_Re({x:ue-ge,y:fe-_e});let ye=Math.atan2(pe.y,pe.x)*180/Math.PI;(ye\u003e90||ye\u003c-90)\u0026\u0026(ye+=180);const Me=typeof p==\"number\"\u0026\u0026Number.isFinite(p)?ye-p:ye;let ve=0;if(s\u0026\u0026typeof p==\"number\"\u0026\u0026Number.isFinite(p)){const Ce=s.length*a*iKo,Le=a,Ye=p*Math.PI/180,tt=Math.abs(Math.sin(Ye)),At=Math.abs(Math.cos(Ye)),at=Ce/2,nt=Le/2;ve=at*tt+nt*At+a*rKo}const he=_*oKo+ve,Qe={x:le.x+I.x*he,y:le.y+I.y*he},[Pe,we]=hn(n,[Qe.x,Qe.y]),Te=a*Math.abs(n.a),Re=[...ne,{name:\"path\",type:\"element\",value:\"\",attributes:{d:`M ${O} ${U} L ${Y} ${W}`,stroke:j,fill:\"none\",\"stroke-width\":te.toString(),\"stroke-linecap\":\"round\",class:\"pcb-fabrication-note-dimension-line\"},children:[]},{name:\"path\",type:\"element\",value:\"\",attributes:{d:`${QYt(R)} Z`,fill:j,class:\"pcb-fabrication-note-dimension-arrow\"},children:[]},{name:\"path\",type:\"element\",value:\"\",attributes:{d:`${QYt(F)} Z`,fill:j,class:\"pcb-fabrication-note-dimension-arrow\"},children:[]}];s\u0026\u0026Re.push({name:\"text\",type:\"element\",value:\"\",attributes:{x:Pe.toString(),y:we.toString(),fill:j,\"font-size\":Te.toString(),\"font-family\":pq,\"text-anchor\":\"middle\",\"dominant-baseline\":\"central\",class:\"pcb-fabrication-note-dimension-text\",transform:`rotate(${Me} ${Pe} ${we})`},children:[{type:\"text\",name:\"\",value:s,attributes:{},children:[]}]});const Ee={class:\"pcb-fabrication-note-dimension\",\"data-type\":\"pcb_fabrication_note_dimension\",\"data-pcb-fabrication-note-dimension-id\":g,\"data-pcb-layer\":l??\"overlay\"};return u!==void 0\u0026\u0026(Ee[\"data-pcb-component-id\"]=u),[{name:\"g\",type:\"element\",value:\"\",attributes:Ee,children:Re}];function ke(Ce){const[Le,Ye]=hn(n,[Ce.x,Ce.y]);return{x:Le,y:Ye}}}var Lg={\"3d_viewer\":{background_bottom:\"rgb(102, 102, 128)\",background_top:\"rgb(204, 204, 230)\",board:\"rgb(51, 43, 23)\",copper:\"rgb(179, 156, 0)\",silkscreen_bottom:\"rgb(230, 230, 230)\",silkscreen_top:\"rgb(230, 230, 230)\",soldermask:\"rgb(20, 51, 36)\",solderpaste:\"rgb(128, 128, 128)\"},board:{anchor:\"rgb(255, 38, 226)\",aux_items:\"rgb(255, 255, 255)\",b_adhes:\"rgb(0, 0, 132)\",b_crtyd:\"rgb(255, 38, 226)\",b_fab:\"rgb(88, 93, 132)\",b_mask:\"rgba(2, 255, 238, 0.400)\",b_paste:\"rgb(0, 194, 194)\",b_silks:\"rgb(232, 178, 167)\",background:\"rgb(0, 16, 35)\",cmts_user:\"rgb(89, 148, 220)\",copper:{b:\"rgb(77, 127, 196)\",f:\"rgb(200, 52, 52)\",in1:\"rgb(127, 200, 127)\",in10:\"rgb(237, 124, 51)\",in11:\"rgb(91, 195, 235)\",in12:\"rgb(247, 111, 142)\",in13:\"rgb(167, 165, 198)\",in14:\"rgb(40, 204, 217)\",in15:\"rgb(232, 178, 167)\",in16:\"rgb(242, 237, 161)\",in17:\"rgb(237, 124, 51)\",in18:\"rgb(91, 195, 235)\",in19:\"rgb(247, 111, 142)\",in2:\"rgb(206, 125, 44)\",in20:\"rgb(167, 165, 198)\",in21:\"rgb(40, 204, 217)\",in22:\"rgb(232, 178, 167)\",in23:\"rgb(242, 237, 161)\",in24:\"rgb(237, 124, 51)\",in25:\"rgb(91, 195, 235)\",in26:\"rgb(247, 111, 142)\",in27:\"rgb(167, 165, 198)\",in28:\"rgb(40, 204, 217)\",in29:\"rgb(232, 178, 167)\",in3:\"rgb(79, 203, 203)\",in30:\"rgb(242, 237, 161)\",in4:\"rgb(219, 98, 139)\",in5:\"rgb(167, 165, 198)\",in6:\"rgb(40, 204, 217)\",in7:\"rgb(232, 178, 167)\",in8:\"rgb(242, 237, 161)\",in9:\"rgb(141, 203, 129)\"},cursor:\"rgb(255, 255, 255)\",drc:\"rgb(194, 194, 194)\",drc_error:\"rgba(215, 91, 107, 0.800)\",drc_exclusion:\"rgb(255, 255, 255)\",drc_warning:\"rgba(255, 208, 66, 0.902)\",dwgs_user:\"rgb(194, 194, 194)\",eco1_user:\"rgb(180, 219, 210)\",eco2_user:\"rgb(216, 200, 82)\",edge_cuts:\"rgb(208, 210, 205)\",f_adhes:\"rgb(132, 0, 132)\",f_crtyd:\"rgb(255, 0, 245)\",f_fab:\"rgb(175, 175, 175)\",f_mask:\"rgba(216, 100, 255, 0.400)\",f_paste:\"rgba(180, 160, 154, 0.902)\",f_silks:\"rgb(242, 237, 161)\",footprint_text_back:\"rgb(0, 0, 132)\",footprint_text_front:\"rgb(194, 194, 194)\",footprint_text_invisible:\"rgb(132, 132, 132)\",grid:\"rgb(132, 132, 132)\",grid_axes:\"rgb(194, 194, 194)\",margin:\"rgb(255, 38, 226)\",microvia:\"rgb(0, 132, 132)\",no_connect:\"rgb(0, 0, 132)\",pad_back:\"rgb(77, 127, 196)\",pad_front:\"rgb(200, 52, 52)\",pad_plated_hole:\"rgb(194, 194, 0)\",pad_through_hole:\"rgb(227, 183, 46)\",plated_hole:\"rgb(26, 196, 210)\",ratsnest:\"rgba(245, 255, 213, 0.702)\",select_overlay:\"rgb(4, 255, 67)\",through_via:\"rgb(236, 236, 236)\",user_1:\"rgb(194, 194, 194)\",user_2:\"rgb(89, 148, 220)\",user_3:\"rgb(180, 219, 210)\",user_4:\"rgb(216, 200, 82)\",user_5:\"rgb(194, 194, 194)\",user_6:\"rgb(89, 148, 220)\",user_7:\"rgb(180, 219, 210)\",user_8:\"rgb(216, 200, 82)\",user_9:\"rgb(232, 178, 167)\",via_blind_buried:\"rgb(187, 151, 38)\",via_hole:\"rgb(227, 183, 46)\",via_micro:\"rgb(0, 132, 132)\",via_through:\"rgb(236, 236, 236)\",worksheet:\"rgb(200, 114, 171)\"},gerbview:{axes:\"rgb(0, 0, 132)\",background:\"rgb(0, 0, 0)\",dcodes:\"rgb(255, 255, 255)\",grid:\"rgb(132, 132, 132)\",layers:[\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\"],negative_objects:\"rgb(132, 132, 132)\",worksheet:\"rgb(0, 0, 132)\"},meta:{filename:\"kicad_2020\",name:\"KiCad 2020\",version:2},simulation_palette:[\"#1f77b4\",\"#d62728\",\"#2ca02c\",\"#ff7f0e\",\"#9467bd\",\"#17becf\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\"],palette:[\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\"],schematic:{aux_items:\"rgb(46, 46, 46)\",background:\"rgb(245, 241, 237)\",brightened:\"rgb(255, 0, 255)\",bus:\"rgb(0, 0, 132)\",bus_junction:\"rgb(0, 0, 132)\",component_body:\"rgb(255, 255, 194)\",component_outline:\"rgb(132, 0, 0)\",cursor:\"rgb(15, 15, 15)\",erc_error:\"rgba(230, 9, 13, 0.800)\",erc_warning:\"rgba(209, 146, 0, 0.800)\",fields:\"rgb(132, 0, 132)\",grid:\"rgb(181, 181, 181)\",grid_axes:\"rgb(0, 0, 132)\",hidden:\"rgb(194, 194, 194)\",junction:\"rgb(0, 150, 0)\",label_global:\"rgb(132, 0, 0)\",label_background:\"rgba(255, 255, 255, 0.6)\",label_hier:\"rgb(114, 86, 0)\",label_local:\"rgb(15, 15, 15)\",net_name:\"rgb(132, 132, 132)\",no_connect:\"rgb(132, 0, 0)\",note:\"rgb(0, 0, 194)\",override_item_colors:!1,pin:\"rgb(132, 0, 0)\",pin_name:\"rgb(0, 100, 100)\",pin_number:\"rgb(169, 0, 0)\",reference:\"rgb(0, 100, 100)\",shadow:\"rgba(102, 179, 255, 0.800)\",sheet:\"rgb(132, 0, 0)\",sheet_background:\"rgba(253, 255, 231, 0.000)\",sheet_fields:\"rgb(132, 0, 132)\",sheet_filename:\"rgb(114, 86, 0)\",sheet_label:\"rgb(0, 100, 100)\",sheet_name:\"rgb(0, 100, 100)\",table:\"rgb(102, 102, 102)\",value:\"rgb(0, 100, 100)\",wire:\"rgb(0, 150, 0)\",wire_crossing:\"rgb(30, 180, 30)\",worksheet:\"rgb(132, 0, 0)\"}};function fRe(t){const e=Math.hypot(t.x,t.y)||1;return{x:t.x/e,y:t.y/e}}function vYt(t){return t.map((e,n)=\u003en===0?`M ${e.x} ${e.y}`:`L ${e.x} ${e.y}`).join(\" \")}function aKo(t,e){const{transform:n}=e,{from:o,to:i,text:r,font_size:s=1,color:a,arrow_size:A,offset_distance:c,offset_direction:l,text_ccw_rotation:u}=t;if(!o||!i)return cm(`[pcb_note_dimension] Invalid endpoints for \"${t.pcb_note_dimension_id}\": expected {from: {x, y}, to: {x, y}}, got from=${JSON.stringify(o)}, to=${JSON.stringify(i)}`),[];if(!Number.isFinite(A)||A\u003c=0)return cm(`[pcb_note_dimension] Invalid arrow_size for \"${t.pcb_note_dimension_id}\": expected positive number, got ${JSON.stringify(A)}`),[];const g=fRe({x:i.x-o.x,y:i.y-o.y});if(Number.isNaN(g.x)||Number.isNaN(g.y))return[];const h={x:-g.y,y:g.x},d=l\u0026\u0026typeof l.x==\"number\"\u0026\u0026typeof l.y==\"number\",p=d?fRe({x:l.x,y:l.y}):{x:0,y:0},m=typeof c==\"number\"?c:0,_={x:p.x*m,y:p.y*m},f=Qe=\u003e({x:Qe.x+_.x,y:Qe.y+_.y}),I=f(o),C=f(i),y=A/2,x={x:I.x+g.x*A,y:I.y+g.y*A},E={x:C.x-g.x*A,y:C.y-g.y*A},B=[he(I),he({x:x.x+h.x*y,y:x.y+h.y*y}),he({x:x.x-h.x*y,y:x.y-h.y*y})],S=[he(C),he({x:E.x+h.x*y,y:E.y+h.y*y}),he({x:E.x-h.x*y,y:E.y-h.y*y})],[Q,w]=hn(n,[x.x,x.y]),[M,k]=hn(n,[E.x,E.y]),R=A/5*Math.abs(n.a),F=a||Lg.board.user_2,O=d\u0026\u0026(Math.abs(p.x)\u003eNumber.EPSILON||Math.abs(p.y)\u003eNumber.EPSILON)?p:h,U=m+A,Y=Qe=\u003e{const Pe={x:Qe.x+O.x*U,y:Qe.y+O.y*U},[we,Te]=hn(n,[Qe.x,Qe.y]),[Re,Ee]=hn(n,[Pe.x,Pe.y]);return{name:\"path\",type:\"element\",value:\"\",attributes:{d:`M ${we} ${Te} L ${Re} ${Ee}`,stroke:F,fill:\"none\",\"stroke-width\":R.toString(),\"stroke-linecap\":\"round\",class:\"pcb-note-dimension-extension\"},children:[]}},W=[Y(o),Y(i)],te={x:(o.x+i.x)/2+_.x,y:(o.y+i.y)/2+_.y},[j,J]=hn(n,[I.x,I.y]),[oe,ie]=hn(n,[C.x,C.y]),ne=fRe({x:oe-j,y:ie-J});let le=Math.atan2(ne.y,ne.x)*180/Math.PI;(le\u003e90||le\u003c-90)\u0026\u0026(le+=180);const ge=typeof u==\"number\"\u0026\u0026Number.isFinite(u)?le-u:le;let _e=0;if(r\u0026\u0026typeof u==\"number\"\u0026\u0026Number.isFinite(u)){const Qe=r.length*s*.6,Pe=s,we=u*Math.PI/180,Te=Math.abs(Math.sin(we)),Re=Math.abs(Math.cos(we)),Ee=Qe/2,ke=Pe/2;_e=Ee*Te+ke*Re+s*.3}const ue=A*1.5+_e,fe={x:te.x+h.x*ue,y:te.y+h.y*ue},[pe,ye]=hn(n,[fe.x,fe.y]),Me=s*Math.abs(n.a),ve=[...W,{name:\"path\",type:\"element\",value:\"\",attributes:{d:`M ${Q} ${w} L ${M} ${k}`,stroke:F,fill:\"none\",\"stroke-width\":R.toString(),\"stroke-linecap\":\"round\",class:\"pcb-note-dimension-line\"},children:[]},{name:\"path\",type:\"element\",value:\"\",attributes:{d:`${vYt(B)} Z`,fill:F,class:\"pcb-note-dimension-arrow\"},children:[]},{name:\"path\",type:\"element\",value:\"\",attributes:{d:`${vYt(S)} Z`,fill:F,class:\"pcb-note-dimension-arrow\"},children:[]}];return r\u0026\u0026ve.push({name:\"text\",type:\"element\",value:\"\",attributes:{x:pe.toString(),y:ye.toString(),fill:F,\"font-size\":Me.toString(),\"font-family\":\"Arial, sans-serif\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"central\",class:\"pcb-note-dimension-text\",transform:`rotate(${ge} ${pe} ${ye})`},children:[{type:\"text\",name:\"\",value:r,attributes:{},children:[]}]}),[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"pcb-note-dimension\",\"data-type\":\"pcb_note_dimension\",\"data-pcb-note-dimension-id\":t.pcb_note_dimension_id,\"data-pcb-layer\":\"overlay\"},children:ve}];function he(Qe){const[Pe,we]=hn(n,[Qe.x,Qe.y]);return{x:Pe,y:we}}}var AKo=Lg.board.user_2;function cKo(t,e){const{transform:n}=e,{anchor_position:o,text:i,font_size:r=1,anchor_alignment:s=\"center\",color:a}=t;if(!o||typeof o.x!=\"number\"||typeof o.y!=\"number\")return cm(`[pcb_note_text] Invalid anchor_position for \"${t.pcb_note_text_id}\": expected {x: number, y: number}, got ${JSON.stringify(o)}`),[];if(typeof i!=\"string\"||i.length===0)return cm(`[pcb_note_text] Invalid text for \"${t.pcb_note_text_id}\": expected non-empty string, got ${JSON.stringify(i)}`),[];const[A,c]=hn(n,[o.x,o.y]),l=r*Math.abs(n.a),{textAnchor:u,dominantBaseline:g}=SYt(s),h=i.split(`\n`),d=h.length===1?[{type:\"text\",name:\"\",value:i,attributes:{},children:[]}]:h.map((m,_)=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:A.toString(),..._\u003e0?{dy:\"1em\"}:{}},children:[{type:\"text\",name:\"\",value:m,attributes:{},children:[]}]}));return[{name:\"text\",type:\"element\",value:\"\",attributes:{x:A.toString(),y:c.toString(),fill:a??AKo,\"font-family\":\"Arial, sans-serif\",\"font-size\":l.toString(),\"text-anchor\":u,\"dominant-baseline\":g,class:\"pcb-note-text\",\"data-type\":\"pcb_note_text\",\"data-pcb-note-text-id\":t.pcb_note_text_id,\"data-pcb-layer\":\"overlay\"},children:d}]}var lKo=Lg.board.user_2,uKo=Lg.board.user_2;function gKo(t,e){const{transform:n}=e,{center:o,width:i,height:r,stroke_width:s,is_filled:a,has_stroke:A,is_stroke_dashed:c,color:l,corner_radius:u}=t;if(!o||typeof o.x!=\"number\"||typeof o.y!=\"number\"||typeof i!=\"number\"||typeof r!=\"number\")return cm(`[pcb_note_rect] Invalid data for \"${t.pcb_note_rect_id}\": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(o)}, width=${JSON.stringify(i)}, height=${JSON.stringify(r)}`),[];const g=i/2,h=r/2,[d,p]=hn(n,[o.x-g,o.y+h]),[m,_]=hn(n,[o.x+g,o.y-h]),f=Math.min(d,m),I=Math.min(p,_),C=Math.abs(m-d),y=Math.abs(_-p),E=(typeof s==\"number\"?s:0)*Math.abs(n.a),B=typeof u==\"number\"\u0026\u0026u\u003e0?u:0,S=B*Math.abs(n.a),Q=B*Math.abs(n.d),w=l??lKo,M={x:f.toString(),y:I.toString(),width:C.toString(),height:y.toString(),class:\"pcb-note-rect\",\"data-type\":\"pcb_note_rect\",\"data-pcb-note-rect-id\":t.pcb_note_rect_id,\"data-pcb-layer\":\"overlay\"};if(S\u003e0\u0026\u0026(M.rx=S.toString()),Q\u003e0\u0026\u0026(M.ry=Q.toString()),a?M.fill=l??uKo:M.fill=\"none\",A??E\u003e0){if(M.stroke=w,M[\"stroke-width\"]=E.toString(),c){const F=.2*Math.abs(n.a),O=.1*Math.abs(n.a);M[\"stroke-dasharray\"]=`${F} ${O}`}}else M.stroke=\"none\";return[{name:\"rect\",type:\"element\",value:\"\",attributes:M,children:[]}]}var dKo=Lg.board.user_2;function hKo(t,e){const{transform:n}=e;if(!Array.isArray(t.route)||t.route.length===0)return cm(`[pcb_note_path] Invalid route for \"${t.pcb_note_path_id}\": expected non-empty array of points, got ${JSON.stringify(t.route)}`),[];for(const s of t.route)if(typeof s.x!=\"number\"||typeof s.y!=\"number\")return cm(`[pcb_note_path] Invalid point in route for \"${t.pcb_note_path_id}\": expected {x: number, y: number}, got ${JSON.stringify(s)}`),[];const o=t.route.map((s,a)=\u003e{const[A,c]=hn(n,[s.x,s.y]);return a===0?`M ${A} ${c}`:`L ${A} ${c}`}).join(\" \"),i=t.stroke_width*Math.abs(n.a);return[{name:\"path\",type:\"element\",value:\"\",attributes:{d:o,stroke:t.color??dKo,fill:\"none\",\"stroke-width\":i.toString(),class:\"pcb-note-path\",\"data-type\":\"pcb_note_path\",\"data-pcb-note-path-id\":t.pcb_note_path_id,\"data-pcb-layer\":\"overlay\"},children:[]}]}var pKo=Lg.board.user_2;function mKo(t,e){const{transform:n}=e,{x1:o,y1:i,x2:r,y2:s,stroke_width:a,color:A,is_dashed:c}=t;if(typeof o!=\"number\"||typeof i!=\"number\"||typeof r!=\"number\"||typeof s!=\"number\")return cm(`[pcb_note_line] Invalid coordinates for \"${t.pcb_note_line_id}\": expected x1, y1, x2, y2 as numbers, got x1=${JSON.stringify(o)}, y1=${JSON.stringify(i)}, x2=${JSON.stringify(r)}, y2=${JSON.stringify(s)}`),[];const[l,u]=hn(n,[o,i]),[g,h]=hn(n,[r,s]),p=(typeof a==\"number\"?a:0)*Math.abs(n.a),m={x1:l.toString(),y1:u.toString(),x2:g.toString(),y2:h.toString(),stroke:A??pKo,\"stroke-width\":p.toString(),\"stroke-linecap\":\"round\",class:\"pcb-note-line\",\"data-type\":\"pcb_note_line\",\"data-pcb-note-line-id\":t.pcb_note_line_id,\"data-pcb-layer\":\"overlay\"};if(c){const f=.2*Math.abs(n.a),I=.1*Math.abs(n.a);m[\"stroke-dasharray\"]=`${f} ${I}`}return[{name:\"line\",type:\"element\",value:\"\",attributes:m,children:[]}]}function wYt(t,e){if(!e)return{};const n=PYt(t,e);if(!n)return{};const o=e.find(a=\u003ea.type===\"source_port\"\u0026\u0026a.source_port_id===n),i=e.find(a=\u003ea.type===\"source_component\"\u0026\u0026a.source_component_id===o?.source_component_id),r={};i?.name\u0026\u0026o?.name\u0026\u0026(r[\"data-pad-name\"]=`${i.name}.${o.name}`);const s=fKo(n,e);return s\u0026\u0026(r[\"data-pad-net-name\"]=s),r}function _Ko(t,e){if(e){const i=PYt(t,e),r=e.find(s=\u003es.type===\"source_port\"\u0026\u0026s.source_port_id===i);if(r?.type===\"source_port\"\u0026\u0026r.pin_number!=null)return r.pin_number.toString()}const n=t.port_hints?.find(i=\u003ei.trim().length\u003e0);return n?n.match(/^pin(\\d+)$/i)?.[1]??n:void 0}function PYt(t,e){if(t.source_port_id)return t.source_port_id;if(t.pcb_port_id){const i=e.find(r=\u003er.type===\"pcb_port\"\u0026\u0026r.pcb_port_id===t.pcb_port_id);if(i?.source_port_id)return i.source_port_id}const n=t.pcb_smtpad_id??t.pcb_plated_hole_id;return n?e.find(i=\u003e{if(i.type!==\"pcb_port\")return!1;const r=i;return r.pcb_smtpad_id===n||r.pcb_plated_hole_id===n})?.source_port_id:void 0}function fKo(t,e){const o=e.find(r=\u003er.type!==\"source_trace\"?!1:r.connected_source_port_ids?.includes(t))?.connected_source_net_ids?.[0];return o?e.find(r=\u003er.type===\"source_net\"\u0026\u0026r.source_net_id===o)?.name:void 0}function IKo(t,e){const{transform:n,colorMap:o,showSolderMask:i}=e,[r,s]=hn(n,[t.x,t.y]),a=wYt(t,e.circuitJson),A=Array.isArray(t.layers)\u0026\u0026t.layers[0]||t.layer||\"top\",c=A,l=!!t.is_covered_with_solder_mask,u=(t.soldermask_margin??0)*Math.abs(n.a),g=i\u0026\u0026l\u0026\u0026u!==0,h=o.soldermaskWithCopperUnderneath.top;if(t.shape===\"pill\"){const d=t.outer_width*Math.abs(n.a),p=t.outer_height*Math.abs(n.a),m=t.hole_width*Math.abs(n.a),_=t.hole_height*Math.abs(n.a),f=t.ccw_rotation||0,I=f?`translate(${r} ${s}) rotate(${-f})`:`translate(${r} ${s})`,C=f?`translate(${r} ${s}) rotate(${-f})`:`translate(${r} ${s})`,y=(E,B)=\u003e{if(E\u003eB){const S=B/2,Q=E-2*S;return`M${-E/2+S},${-S} h${Q} a${S},${S} 0 0 1 0,${B} h${-Q} a${S},${S} 0 0 1 0,${-B} z`}else if(B\u003eE){const S=E/2,Q=B-2*S;return`M${S},${-B/2+S} v${Q} a${S},${S} 0 0 1 ${-E},0 v${-Q} a${S},${S} 0 0 1 ${E},0 z`}else{const S=E/2;return`M${-S},0 a${S},${S} 0 0 1 ${E},0 a${S},${S} 0 0 1 ${-E},0 z`}};let x=[{name:\"path\",type:\"element\",attributes:{class:\"pcb-hole-outer\",fill:o.copper.top,d:y(d,p),transform:I,\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"path\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,d:y(m,_),transform:C,\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}];if(g){const E=d+2*u,B=p+2*u;u\u003c0?x=[{name:\"path\",type:\"element\",attributes:{class:\"pcb-hole-outer-covered\",fill:h,d:y(d,p),transform:I,\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"path\",type:\"element\",attributes:{class:\"pcb-hole-outer-exposed\",fill:o.copper.top,d:y(E,B),transform:I,\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":c},value:\"\",children:[]},x[1]]:x.unshift({name:\"path\",type:\"element\",attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,d:y(E,B),transform:I,\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":c},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",attributes:{\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":\"through\",...a},children:x,value:\"\"}]}if(t.shape===\"oval\"){const d=t.outer_width*Math.abs(n.a),p=t.outer_height*Math.abs(n.a),m=t.hole_width*Math.abs(n.a),_=t.hole_height*Math.abs(n.a),f=t.ccw_rotation||0,I=f?`translate(${r} ${s}) rotate(${-f})`:`translate(${r} ${s})`,C=[{name:\"ellipse\",type:\"element\",attributes:{class:\"pcb-hole-outer\",fill:o.copper.top,cx:\"0\",cy:\"0\",rx:(d/2).toString(),ry:(p/2).toString(),transform:I,\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"ellipse\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,cx:\"0\",cy:\"0\",rx:(m/2).toString(),ry:(_/2).toString(),transform:I,\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}];return[{name:\"g\",type:\"element\",attributes:{\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":\"through\",...a},children:C,value:\"\"}]}if(t.shape===\"circle\"){const d=t.outer_diameter*Math.abs(n.a),p=t.outer_diameter*Math.abs(n.a),m=t.hole_diameter*Math.abs(n.a),_=t.hole_diameter*Math.abs(n.a),f=Math.min(d,p)/2,I=Math.min(m,_)/2;let C=[{name:\"circle\",type:\"element\",attributes:{class:\"pcb-hole-outer\",fill:o.copper.top,cx:r.toString(),cy:s.toString(),r:f.toString(),\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"circle\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,cx:r.toString(),cy:s.toString(),r:I.toString(),\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}];if(g){const y=f+u;u\u003c0?C=[{name:\"circle\",type:\"element\",attributes:{class:\"pcb-hole-outer-covered\",fill:h,cx:r.toString(),cy:s.toString(),r:f.toString(),\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"circle\",type:\"element\",attributes:{class:\"pcb-hole-outer-exposed\",fill:o.copper.top,cx:r.toString(),cy:s.toString(),r:y.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":c},value:\"\",children:[]},C[1]]:C.unshift({name:\"circle\",type:\"element\",attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,cx:r.toString(),cy:s.toString(),r:y.toString(),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":c},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",attributes:{\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":\"through\",...a},children:C,value:\"\"}]}if(t.shape===\"circular_hole_with_rect_pad\"){const d=t,p=t.hole_diameter*Math.abs(n.a),m=t.rect_pad_width*Math.abs(n.a),_=t.rect_pad_height*Math.abs(n.a),f=(t.rect_border_radius??0)*Math.abs(n.a),I=t.rect_ccw_rotation??0,C=d.rect_ccw_rotation??0,y=C?`translate(${r} ${s}) rotate(${-C})`:void 0;C?(-m/2).toString():(r-m/2).toString(),C?(-_/2).toString():(s-_/2).toString();const x=p/2,[E,B]=hn(n,[d.x+(d.hole_offset_x??0),d.y+(d.hole_offset_y??0)]);let S=[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-pad\",fill:o.copper.top,...I?{x:(-m/2).toString(),y:(-_/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-m/2).toString(),y:(s-_/2).toString()},width:m.toString(),height:_.toString(),...y?{transform:y}:{},...f?{rx:f.toString(),ry:f.toString()}:{},\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"circle\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,cx:E.toString(),cy:B.toString(),r:x.toString(),\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}];if(g){const Q=m+2*u,w=_+2*u,M=f+u;u\u003c0?S=[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-covered\",fill:h,...I?{x:(-m/2).toString(),y:(-_/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-m/2).toString(),y:(s-_/2).toString()},width:m.toString(),height:_.toString(),...y?{transform:y}:{},...f?{rx:f.toString(),ry:f.toString()}:{},\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-exposed\",fill:o.copper.top,...I?{x:(-Q/2).toString(),y:(-w/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-Q/2).toString(),y:(s-w/2).toString()},width:Q.toString(),height:w.toString(),...y?{transform:y}:{},...M\u003e0?{rx:M.toString(),ry:M.toString()}:{},\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":c},value:\"\",children:[]},S[1]]:S.unshift({name:\"rect\",type:\"element\",attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,...I?{x:(-Q/2).toString(),y:(-w/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-Q/2).toString(),y:(s-w/2).toString()},width:Q.toString(),height:w.toString(),...y?{transform:y}:{},...f?{rx:M.toString(),ry:M.toString()}:{},\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":c},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",attributes:{\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":\"through\",...a},children:S,value:\"\"}]}if(t.shape===\"pill_hole_with_rect_pad\"){const d=t,p=d.rect_pad_width*Math.abs(n.a),m=d.rect_pad_height*Math.abs(n.a),_=(d.rect_border_radius??0)*Math.abs(n.a),f=d.hole_height*Math.abs(n.a),I=d.hole_width*Math.abs(n.a),C=d,y=C.hole_offset_x??0,x=C.hole_offset_y??0,[E,B]=hn(n,[d.x+y,d.y+x]),S=Math.min(f,I)/2;let Q=[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-pad\",fill:o.copper.top,x:(r-p/2).toString(),y:(s-m/2).toString(),width:p.toString(),height:m.toString(),..._?{rx:_.toString(),ry:_.toString()}:{},\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,x:(E-I/2).toString(),y:(B-f/2).toString(),width:I.toString(),height:f.toString(),rx:S.toString(),ry:S.toString(),\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}];if(g){const w=p+2*u,M=m+2*u,k=_+u;u\u003c0?Q=[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-covered\",fill:h,x:(r-p/2).toString(),y:(s-m/2).toString(),width:p.toString(),height:m.toString(),..._?{rx:_.toString(),ry:_.toString()}:{},\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-exposed\",fill:o.copper.top,x:(r-w/2).toString(),y:(s-M/2).toString(),width:w.toString(),height:M.toString(),...k\u003e0?{rx:k.toString(),ry:k.toString()}:{},\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":c},value:\"\",children:[]},Q[1]]:Q.unshift({name:\"rect\",type:\"element\",attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,x:(r-w/2).toString(),y:(s-M/2).toString(),width:w.toString(),height:M.toString(),..._?{rx:k.toString(),ry:k.toString()}:{},\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":c},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",attributes:{\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":\"through\",...a},children:Q,value:\"\"}]}if(t.shape===\"rotated_pill_hole_with_rect_pad\"){const d=t,p=d.rect_pad_width*Math.abs(n.a),m=d.rect_pad_height*Math.abs(n.a),_=(d.rect_border_radius??0)*Math.abs(n.a),f=d.hole_height*Math.abs(n.a),I=d.hole_width*Math.abs(n.a),C=d,y=C.hole_offset_x??0,x=C.hole_offset_y??0,[E,B]=hn(n,[d.x+y,d.y+x]),S=Math.min(f,I)/2;let Q=[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-pad\",fill:o.copper.top,x:(-p/2).toString(),y:(-m/2).toString(),width:p.toString(),height:m.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,..._?{rx:_.toString(),ry:_.toString()}:{},\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,x:(-I/2).toString(),y:(-f/2).toString(),width:I.toString(),height:f.toString(),rx:S.toString(),ry:S.toString(),transform:`translate(${E} ${B}) rotate(${-d.hole_ccw_rotation})`,\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}];if(g){const w=p+2*u,M=m+2*u,k=_+u;u\u003c0?Q=[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-covered\",fill:h,x:(-p/2).toString(),y:(-m/2).toString(),width:p.toString(),height:m.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,..._?{rx:_.toString(),ry:_.toString()}:{},\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole-outer-exposed\",fill:o.copper.top,x:(-w/2).toString(),y:(-M/2).toString(),width:w.toString(),height:M.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,...k\u003e0?{rx:k.toString(),ry:k.toString()}:{},\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":c},value:\"\",children:[]},Q[1]]:Q.push({name:\"rect\",type:\"element\",attributes:{class:\"pcb-solder-mask\",fill:h,x:(-w/2).toString(),y:(-M/2).toString(),width:w.toString(),height:M.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,..._?{rx:k.toString(),ry:k.toString()}:{},\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":c},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",attributes:{\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":\"through\",...a},children:Q,value:\"\"}]}if(t.shape===\"hole_with_polygon_pad\"){const d=t,p=d.pad_outline||[],m=d.x??0,_=d.y??0,I=p.map(E=\u003ehn(n,[m+E.x,_+E.y])).map(E=\u003eE.join(\",\")).join(\" \"),[C,y]=hn(n,[m+d.hole_offset_x,_+d.hole_offset_y]),x=()=\u003e{if(d.hole_shape===\"circle\"){const B=(d.hole_diameter??0)*Math.abs(n.a)/2;return{name:\"circle\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,cx:C.toString(),cy:y.toString(),r:B.toString(),\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}}if(d.hole_shape===\"oval\"){const E=(d.hole_width??0)*Math.abs(n.a),B=(d.hole_height??0)*Math.abs(n.a),S=E/2,Q=B/2;return{name:\"ellipse\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,cx:C.toString(),cy:y.toString(),rx:S.toString(),ry:Q.toString(),\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}}if(d.hole_shape===\"pill\"||d.hole_shape===\"rotated_pill\"){const E=(d.hole_width??0)*Math.abs(n.a),B=(d.hole_height??0)*Math.abs(n.a),S=E\u003eB,Q=Math.min(E,B)/2,w=Math.abs(S?E-B:B-E),M=S?`M${-w/2},${-Q} h${w} a${Q},${Q} 0 0 1 0,${B} h-${w} a${Q},${Q} 0 0 1 0,-${B} z`:`M${-Q},${-w/2} v${w} a${Q},${Q} 0 0 0 ${E},0 v-${w} a${Q},${Q} 0 0 0 -${E},0 z`;return{name:\"path\",type:\"element\",attributes:{class:\"pcb-hole-inner\",fill:o.drill,d:M,transform:`translate(${C} ${y})`,\"data-type\":\"pcb_plated_hole_drill\",\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}}return{name:\"g\",type:\"element\",attributes:{},value:\"\",children:[]}};return[{name:\"g\",type:\"element\",attributes:{\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":\"through\",...a},children:[{name:\"polygon\",type:\"element\",attributes:{class:\"pcb-hole-outer-pad\",fill:o.copper.top,points:I,\"data-type\":\"pcb_plated_hole\",\"data-pcb-layer\":A},value:\"\",children:[]},x()],value:\"\"}]}return[]}function CKo(t,e){const{transform:n,layer:o,colorMap:i}=e;if(!t.route||!Array.isArray(t.route))return[];let r=t.route.map((l,u)=\u003e{const[g,h]=hn(n,[l.x,l.y]);return u===0?`M ${g} ${h}`:`L ${g} ${h}`}).join(\" \");const s=t.route[0],a=t.route[t.route.length-1];s\u0026\u0026a\u0026\u0026s.x===a.x\u0026\u0026s.y===a.y\u0026\u0026(r+=\" Z\");const A=t.layer||\"top\";if(o\u0026\u0026A!==o)return[];const c=A===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top;return[{name:\"path\",type:\"element\",attributes:{class:`pcb-silkscreen pcb-silkscreen-${A}`,d:r,fill:\"none\",stroke:c,\"stroke-width\":(t.stroke_width*Math.abs(n.a)).toString(),\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",\"data-pcb-component-id\":t.pcb_component_id,\"data-pcb-silkscreen-path-id\":t.pcb_silkscreen_path_id,\"data-type\":\"pcb_silkscreen_path\",\"data-pcb-layer\":A},value:\"\",children:[]}]}function jge(t,e){if(t.length===0)return\"\";const n=t.map(i=\u003e{const[r,s]=hn(e,[i.x,i.y]);return{...i,x:r,y:s}});let o=`M ${n[0].x} ${n[0].y}`;for(let i=0;i\u003cn.length;i++){const r=n[i],s=n[(i+1)%n.length];if(r.bulge){if(Math.hypot(s.x-r.x,s.y-r.y)\u003c1e-9)continue;const a=r.bulge,A=s.x-r.x,c=s.y-r.y,l=Math.hypot(A,c),u=Math.abs(l/4/a*(a*a+1)),g=a\u003c0?1:0,h=Math.abs(a)\u003e1?1:0;o+=` A ${u} ${u} 0 ${h} ${g} ${s.x} ${s.y}`}else o+=` L ${s.x} ${s.y}`}return o+=\" Z\",o}function yKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{layer:r=\"top\"}=t;if(o\u0026\u0026r!==o)return[];if(t.shape!==\"brep\")return[];const s=r===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top;let a=jge(t.brep_shape.outer_ring.vertices,n);for(const A of t.brep_shape.inner_rings??[])a+=` ${jge(A.vertices,n)}`;return[{name:\"path\",type:\"element\",attributes:{class:`pcb-silkscreen pcb-silkscreen-${r}`,d:a,fill:s,\"fill-rule\":\"evenodd\",stroke:\"none\",\"data-pcb-component-id\":t.pcb_component_id,\"data-pcb-silkscreen-graphic-id\":t.pcb_silkscreen_graphic_id,\"data-type\":\"pcb_silkscreen_graphic\",\"data-pcb-layer\":r},value:\"\",children:[]}]}function MYt(t){const{text:e,anchorAlignment:n,fontSize:o,charAdvance:i,spaceAdvance:r,trailingSpacing:s,lineHeight:a,mapSegment:A}=t,c=e.split(`\n`),l=c.length*a,u=c.map(f=\u003exKo(f,i,r,s)),g=[];let h=-l/2;for(let f=0;f\u003cc.length;f++){const I=c[f]??\"\";let y=-(u[f]??0)/2;for(const x of I){if(x===\" \"){y+=r;continue}const E=Ov[x];if(E)for(const B of E)g.push(A(B,y,h,o));y+=i}h+=a}const d=EKo(g);if(!d)return{pathData:\"\",bounds:null};const p=IRe(n,d),m=SKo(g,p),_=QKo(d,p);return{pathData:vKo(m),bounds:_}}function xKo(t,e,n,o){let i=0;for(const r of t)i+=r===\" \"?n:e;return i\u003e0?i-o:0}function EKo(t){if(t.length===0)return null;let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)e=Math.min(e,r.x1,r.x2),n=Math.min(n,r.y1,r.y2),o=Math.max(o,r.x1,r.x2),i=Math.max(i,r.y1,r.y2);return{minX:e,minY:n,maxX:o,maxY:i}}function IRe(t,e){return{x:-BKo(t,e),y:-bKo(t,e)}}function BKo(t,e){return t===\"top_left\"||t===\"center_left\"||t===\"bottom_left\"?e.minX:t===\"top_right\"||t===\"center_right\"||t===\"bottom_right\"?e.maxX:(e.minX+e.maxX)/2}function bKo(t,e){return t===\"top_left\"||t===\"top_center\"||t===\"top_right\"?e.minY:t===\"bottom_left\"||t===\"bottom_center\"||t===\"bottom_right\"?e.maxY:(e.minY+e.maxY)/2}function SKo(t,e){return e.x===0\u0026\u0026e.y===0?t:t.map(n=\u003e({x1:n.x1+e.x,y1:n.y1+e.y,x2:n.x2+e.x,y2:n.y2+e.y}))}function QKo(t,e){return{minX:t.minX+e.x,minY:t.minY+e.y,maxX:t.maxX+e.x,maxY:t.maxY+e.y}}function vKo(t){return t.map(e=\u003e`M${e.x1} ${e.y1}L${e.x2} ${e.y2}`).join(\" \")}var DYt=.94,$ge=.09/2,NYt=Object.fromEntries(Object.entries(Ov).map(([t,e])=\u003e{const n=e.flatMap(i=\u003e[i.x1,i.x2]),o=e.flatMap(i=\u003e[i.y1,i.y2]);return[t,e.length?{minX:Math.min(...n)-$ge,maxX:Math.max(...n)+$ge,minY:-(Math.max(...o)+$ge)*DYt,maxY:-(Math.min(...o)-$ge)*DYt}:null]})),RYt=Math.round(Math.max(...Object.values(NYt).map(t=\u003et?t.maxX-t.minX:0))*1e3)/1e3;function wKo(t,e){let n=null;const i=t.split(`\n`).map((r,s)=\u003e{const a=Array.from(r),A=-(a.length*RYt*e)/2,c=s*e*1.1;return a.forEach((l,u)=\u003e{const g=NYt[l];if(!g)return;const h=A+u*RYt*e,d={minX:h+g.minX*e,maxX:h+g.maxX*e,minY:c+g.minY*e,maxY:c+g.maxY*e};n=n?{minX:Math.min(n.minX,d.minX),maxX:Math.max(n.maxX,d.maxX),minY:Math.min(n.minY,d.minY),maxY:Math.max(n.maxY,d.maxY)}:d}),{name:\"tspan\",type:\"element\",value:\"\",attributes:{x:A.toString(),y:c.toString()},children:[{name:\"\",type:\"text\",value:r,attributes:{},children:[]}]}});return{bounds:n,textNode:{name:\"text\",type:\"element\",value:\"\",attributes:{\"font-family\":pq,\"font-size\":e.toString(),\"text-anchor\":\"start\",\"dominant-baseline\":\"alphabetic\",\"xml:space\":\"preserve\",fill:\"black\",stroke:\"none\"},children:i}}}var PKo=0;function MKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{anchor_position:r,text:s,font_size:a=1,layer:A=\"top\",ccw_rotation:c=0,anchor_alignment:l=\"center\",is_knockout:u=!1,knockout_padding:g,is_mirrored:h=!1}=t;if(o\u0026\u0026A!==o)return[];if(!r||typeof r.x!=\"number\"||typeof r.y!=\"number\")return cm(`[pcb_silkscreen_text] Invalid anchor_position for \"${t.pcb_silkscreen_text_id}\": expected {x: number, y: number}, got ${JSON.stringify(r)}`),[];if(!s)return[];const[d,p]=hn(n,[r.x,r.y]),m=Math.abs(n.a),_=A===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top,I=A===\"bottom\"?!0:h===!0;if(u){const Q=wKo(s,a);if(!Q.bounds)return[];const w=g?.left??a*.5,M=g?.right??a*.5,k=g?.top??a*.3,R=g?.bottom??a*.3,F=Q.bounds.minX-w,O=Q.bounds.minY-k,U=Q.bounds.maxX-Q.bounds.minX+w+M,Y=Q.bounds.maxY-Q.bounds.minY+k+R,W={minX:F,minY:O,maxX:F+U,maxY:O+Y},te=IRe(l,W),j=F+te.x,J=O+te.y,oe=[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:F.toString(),y:O.toString(),width:U.toString(),height:Y.toString(),fill:\"white\"},children:[]},Q.textNode],ne=te.x!==0||te.y!==0?[{name:\"g\",type:\"element\",value:\"\",attributes:{transform:`translate(${te.x} ${te.y})`},children:oe}]:oe,le=$b(m0(of(d,p),jb(-c*Math.PI/180),...I?[kx(-1,1)]:[],kx(m,m))),ge=`silkscreen-knockout-mask-${t.pcb_silkscreen_text_id}-${PKo++}`;return[{name:\"defs\",type:\"element\",value:\"\",children:[{name:\"mask\",type:\"element\",value:\"\",attributes:{id:ge},children:ne}],attributes:{}},{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{x:j.toString(),y:J.toString(),width:U.toString(),height:Y.toString(),fill:_,mask:`url(#${ge})`,transform:le,class:`pcb-silkscreen-text-knockout pcb-silkscreen-${A}`,\"data-type\":\"pcb_silkscreen_text\",\"data-pcb-silkscreen-text-id\":t.pcb_silkscreen_text_id,\"data-pcb-layer\":A}}]}const C=a*m;let y=\"middle\",x=\"central\";switch(l){case\"top_left\":y=\"start\",x=\"text-before-edge\";break;case\"top_center\":y=\"middle\",x=\"text-before-edge\";break;case\"top_right\":y=\"end\",x=\"text-before-edge\";break;case\"center_left\":y=\"start\",x=\"central\";break;case\"center_right\":y=\"end\",x=\"central\";break;case\"bottom_left\":y=\"start\",x=\"text-after-edge\";break;case\"bottom_center\":y=\"middle\",x=\"text-after-edge\";break;case\"bottom_right\":y=\"end\",x=\"text-after-edge\";break;default:y=\"middle\",x=\"central\";break}const E=m0(of(d,p),jb(-c*Math.PI/180),...I?[kx(-1,1)]:[]),B=s.split(`\n`),S=B.length===1?[{type:\"text\",value:s,name:\"\",attributes:{},children:[]}]:B.map((Q,w)=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:\"0\",...w\u003e0?{dy:C.toString()}:{}},children:[{type:\"text\",value:Q,name:\"\",attributes:{},children:[]}]}));return[{name:\"text\",type:\"element\",attributes:{x:\"0\",y:\"0\",dx:\"0\",dy:\"0\",fill:_,\"font-family\":pq,\"font-size\":C.toString(),\"text-anchor\":y,\"dominant-baseline\":x,transform:$b(E),class:`pcb-silkscreen-text pcb-silkscreen-${A}`,\"data-pcb-silkscreen-text-id\":t.pcb_silkscreen_text_id,stroke:\"none\",\"data-type\":\"pcb_silkscreen_text\",\"data-pcb-layer\":A},children:S,value:\"\"}]}function DKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,width:s,height:a,layer:A=\"top\",pcb_silkscreen_rect_id:c,stroke_width:l,is_filled:u,has_stroke:g,is_stroke_dashed:h,corner_radius:d,ccw_rotation:p=0}=t;if(o\u0026\u0026A!==o)return[];if(!r||typeof r.x!=\"number\"||typeof r.y!=\"number\"||typeof s!=\"number\"||typeof a!=\"number\")return cm(`[pcb_silkscreen_rect] Invalid data for \"${c}\": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(r)}, width=${JSON.stringify(s)}, height=${JSON.stringify(a)}`),[];const[m,_]=hn(n,[r.x,r.y]),f=typeof d==\"number\"\u0026\u0026d\u003e0?d:0,I=f*Math.abs(n.a),C=f*Math.abs(n.d),y=s*Math.abs(n.a),x=a*Math.abs(n.d),E=l*Math.abs(n.a),B=A===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top,S={x:(-y/2).toString(),y:(-x/2).toString(),width:y.toString(),height:x.toString(),class:`pcb-silkscreen-rect pcb-silkscreen-${A}`,\"data-pcb-silkscreen-rect-id\":c,\"data-type\":\"pcb_silkscreen_rect\",\"data-pcb-layer\":A};typeof p==\"number\"\u0026\u0026p!==0?S.transform=`translate(${m} ${_}) rotate(${-p})`:(S.x=(m-y/2).toString(),S.y=(_-x/2).toString()),I\u003e0\u0026\u0026(S.rx=I.toString()),C\u003e0\u0026\u0026(S.ry=C.toString()),S.fill=u?B:\"none\";let Q;if(g===void 0?Q=E\u003e0:Q=g,Q){if(S.stroke=B,S[\"stroke-width\"]=E.toString(),h){const M=.1*Math.abs(n.a),k=.05*Math.abs(n.a);S[\"stroke-dasharray\"]=`${M} ${k}`}}else S.stroke=\"none\";return[{name:\"rect\",type:\"element\",attributes:S,value:\"\",children:[]}]}var ch={copper:{top:\"rgb(200, 52, 52)\",inner1:\"rgb(255, 140, 0)\",inner2:\"rgb(255, 215, 0)\",inner3:\"rgb(50, 205, 50)\",inner4:\"rgb(64, 224, 208)\",inner5:\"rgb(138, 43, 226)\",inner6:\"rgb(255, 105, 180)\",inner7:\"rgb(0, 191, 255)\",inner8:\"rgb(160, 82, 45)\",bottom:\"rgb(77, 127, 196)\"},soldermaskWithCopperUnderneath:{top:\"rgb(18, 82, 50)\",bottom:\"rgb(77, 127, 196)\"},soldermask:{top:\"rgb(12, 55, 33)\",bottom:\"rgb(12, 55, 33)\"},soldermaskOverCopper:{top:\"rgb(52, 135, 73)\",bottom:\"rgb(52, 135, 73)\"},substrate:\"rgb(201, 162, 110)\",drill:\"#FF26E2\",silkscreen:{top:\"#f2eda1\",bottom:\"#5da9e9\"},boardOutline:\"rgba(255, 255, 255, 0.5)\",courtyard:{top:\"#FF00FF\",bottom:\"rgb(38, 233, 255)\"},keepout:\"#FF6B6B\",debugComponent:{fill:null,stroke:null}};ch.drill,ch.silkscreen.top,ch.silkscreen.bottom,{...ch.copper};function Fx(t,e=ch){return e.copper[t]??\"white\"}var NKo={bottom:\"rgb(105, 105, 105)\",top:\"rgb(105, 105, 105)\"};function hG(t){return NKo[t]??\"rgb(105, 105, 105)\"}var qge=1,pG=.2,TYt=1.4,kYt=.53,RKo=0;function TKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{anchor_position:r,text:s,font_size:a=\"0.2mm\",layer:A,ccw_rotation:c=0,anchor_alignment:l=\"center\",is_knockout:u=!1,knockout_padding:g,is_mirrored:h=!1}=t,d=A??\"top\";if(o\u0026\u0026o!==d)return[];if(!r)return[];if(!s)return[];const[p,m]=hn(n,[r.x,r.y]),_=lt.parse(a)??.2,f=Math.abs(n.a),I=Fx(d,i),y=d===\"bottom\"?!0:h===!0;if(u){const Q=_*kYt,w=MYt({text:s,anchorAlignment:l,fontSize:Q,charAdvance:(qge+pG)*Q,spaceAdvance:(qge+pG)*Q*.6,trailingSpacing:pG*Q,lineHeight:Q*TYt,mapSegment:(fe,pe,ye,Me)=\u003e({x1:pe+fe.x1*Me,y1:ye+(1-fe.y1)*Me,x2:pe+fe.x2*Me,y2:ye+(1-fe.y2)*Me})});if(!w.bounds||!w.pathData)return[];const M=g?.left??Q*.5,k=g?.right??Q*.5,R=g?.top??Q*.3,F=g?.bottom??Q*.3,O=w.bounds.minX-M,U=w.bounds.minY-R,Y=w.bounds.maxX-w.bounds.minX+M+k,W=w.bounds.maxY-w.bounds.minY+R+F,te=Q*.15,j={minX:O,minY:U,maxX:O+Y,maxY:U+W},J=IRe(l,j),oe=O+J.x,ie=U+J.y,ne=[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:O.toString(),y:U.toString(),width:Y.toString(),height:W.toString(),fill:\"white\"},children:[]},{name:\"path\",type:\"element\",value:\"\",attributes:{d:w.pathData,fill:\"none\",stroke:\"black\",\"stroke-width\":te.toString(),\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"},children:[]}],ge=J.x!==0||J.y!==0?[{name:\"g\",type:\"element\",value:\"\",attributes:{transform:`translate(${J.x} ${J.y})`},children:ne}]:ne,_e=$b(m0(of(p,m),jb(-c*Math.PI/180),...y?[kx(-1,1)]:[],kx(f,f))),ue=`knockout-mask-${t.pcb_copper_text_id}-${RKo++}`;return[{name:\"defs\",type:\"element\",value:\"\",children:[{name:\"mask\",type:\"element\",value:\"\",attributes:{id:ue},children:ge}],attributes:{}},{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{x:oe.toString(),y:ie.toString(),width:Y.toString(),height:W.toString(),fill:I,mask:`url(#${ue})`,transform:_e,class:`pcb-copper-text-knockout pcb-copper-${d}`,\"data-type\":\"pcb_copper_text\",\"data-pcb-copper-text-id\":t.pcb_copper_text_id}}]}const x=_*kYt,E=MYt({text:s,anchorAlignment:l,fontSize:x,charAdvance:(qge+pG)*x,spaceAdvance:(qge+pG)*x*.6,trailingSpacing:pG*x,lineHeight:x*TYt,mapSegment:(Q,w,M,k)=\u003e({x1:w+Q.x1*k,y1:M+(1-Q.y1)*k,x2:w+Q.x2*k,y2:M+(1-Q.y2)*k})});if(!E.pathData)return[];const B=$b(m0(of(p,m),jb(-c*Math.PI/180),...y?[kx(-1,1)]:[],kx(f,f))),S=x*.15;return[{name:\"path\",type:\"element\",attributes:{d:E.pathData,fill:\"none\",stroke:I,\"stroke-width\":S.toString(),\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",transform:B,class:`pcb-copper-text pcb-copper-${d}`,\"data-type\":\"pcb_copper_text\",\"data-pcb-copper-text-id\":t.pcb_copper_text_id},children:[],value:\"\"}]}function kKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,radius:s,layer:a=\"top\",pcb_silkscreen_circle_id:A,stroke_width:c=1,is_filled:l}=t;if(o\u0026\u0026a!==o)return[];if(!r||typeof r.x!=\"number\"||typeof r.y!=\"number\"||typeof s!=\"number\")return console.error(\"Invalid PCB Silkscreen Circle data:\",{center:r,radius:s}),[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=c*Math.abs(n.a),p=a===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top;return[{name:\"circle\",type:\"element\",attributes:{cx:u.toString(),cy:g.toString(),r:h.toString(),class:`pcb-silkscreen-circle pcb-silkscreen-${a}`,fill:l?p:\"none\",stroke:p,\"stroke-width\":d.toString(),\"data-pcb-silkscreen-circle-id\":A,\"data-type\":\"pcb_silkscreen_circle\",\"data-pcb-layer\":a},value:\"\",children:[]}]}function FKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{x1:r,y1:s,x2:a,y2:A,stroke_width:c,layer:l=\"top\",pcb_silkscreen_line_id:u}=t;if(o\u0026\u0026l!==o)return[];if(typeof r!=\"number\"||typeof s!=\"number\"||typeof a!=\"number\"||typeof A!=\"number\")return cm(`[pcb_silkscreen_line] Invalid coordinates for \"${u}\": expected x1, y1, x2, y2 as numbers, got x1=${JSON.stringify(r)}, y1=${JSON.stringify(s)}, x2=${JSON.stringify(a)}, y2=${JSON.stringify(A)}`),[];const[g,h]=hn(n,[r,s]),[d,p]=hn(n,[a,A]),m=c*Math.abs(n.a),_=l===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top;return[{name:\"line\",type:\"element\",attributes:{x1:g.toString(),y1:h.toString(),x2:d.toString(),y2:p.toString(),stroke:_,\"stroke-width\":m.toString(),class:`pcb-silkscreen-line pcb-silkscreen-${l}`,\"data-pcb-silkscreen-line-id\":u,\"data-type\":\"pcb_silkscreen_line\",\"data-pcb-layer\":l},value:\"\",children:[]}]}function LKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,width:s,height:a,layer:A=\"top\",pcb_silkscreen_pill_id:c,ccw_rotation:l=0}=t;if(o\u0026\u0026A!==o)return[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=a*Math.abs(n.d),m=Math.min(s,a)/2,_=m*Math.abs(n.a),f=m*Math.abs(n.d),I=A===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top;return[{name:\"rect\",type:\"element\",attributes:{x:(u-h/2).toString(),y:(g-d/2).toString(),width:h.toString(),height:d.toString(),rx:_.toString(),ry:f.toString(),fill:\"none\",stroke:I,\"stroke-width\":(.1*Math.abs(n.a)).toString(),class:`pcb-silkscreen-pill pcb-silkscreen-${A}`,\"data-pcb-silkscreen-pill-id\":c,\"data-type\":\"pcb_silkscreen_pill\",\"data-pcb-layer\":A,...l!==0\u0026\u0026{transform:`rotate(${-l} ${u} ${g})`}},value:\"\",children:[]}]}function HKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,radius_x:s,radius_y:a,layer:A=\"top\",pcb_silkscreen_oval_id:c,ccw_rotation:l=0}=t;if(o\u0026\u0026A!==o)return[];if(!r||typeof r.x!=\"number\"||typeof r.y!=\"number\"||typeof s!=\"number\"||typeof a!=\"number\")return cm(`[pcb_silkscreen_oval] Invalid data for \"${c}\": expected center {x: number, y: number}, radius_x: number, radius_y: number, got center=${JSON.stringify(r)}, radius_x=${JSON.stringify(s)}, radius_y=${JSON.stringify(a)}`),[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=a*Math.abs(n.d),p=A===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top;return[{name:\"ellipse\",type:\"element\",attributes:{cx:u.toString(),cy:g.toString(),rx:h.toString(),ry:d.toString(),fill:\"none\",stroke:p,\"stroke-width\":(.1*Math.abs(n.a)).toString(),class:`pcb-silkscreen-oval pcb-silkscreen-${A}`,\"data-pcb-silkscreen-oval-id\":c,\"data-type\":\"pcb_silkscreen_oval\",\"data-pcb-layer\":A,...l!==0\u0026\u0026{transform:`rotate(${-l} ${u} ${g})`}},value:\"\",children:[]}]}function OKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,width:s,height:a,layer:A=\"top\",pcb_courtyard_rect_id:c,ccw_rotation:l=0}=t;if(o\u0026\u0026A!==o)return[];if(!r||typeof r.x!=\"number\"||typeof r.y!=\"number\"||typeof s!=\"number\"||typeof a!=\"number\")return cm(`[pcb_courtyard_rect] Invalid data for \"${c}\": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(r)}, width=${JSON.stringify(s)}, height=${JSON.stringify(a)}`),[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=a*Math.abs(n.d),p=.05*Math.abs(n.a),m=A===\"bottom\"?i.courtyard.bottom:i.courtyard.top,_={x:(-h/2).toString(),y:(-d/2).toString(),width:h.toString(),height:d.toString(),class:`pcb-courtyard-rect pcb-courtyard-${A}`,\"data-pcb-courtyard-rect-id\":c,\"data-type\":\"pcb_courtyard_rect\",\"data-pcb-layer\":A,\"stroke-linejoin\":\"round\"};return typeof l==\"number\"\u0026\u0026l!==0?_.transform=`translate(${u} ${g}) rotate(${-l})`:(_.x=(u-h/2).toString(),_.y=(g-d/2).toString()),_.fill=\"none\",_.stroke=m,_[\"stroke-width\"]=p.toString(),[{name:\"rect\",type:\"element\",attributes:_,value:\"\",children:[]}]}function GKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{layer:r=\"top\",pcb_courtyard_polygon_id:s,points:a,color:A}=t;if(o\u0026\u0026r!==o)return[];if(!a||a.length===0)return cm(`[pcb_courtyard_polygon] Invalid data for \"${s}\": expected non-empty array of points, got ${JSON.stringify(a)}`),[];const l=a.map(p=\u003ehn(n,[p.x,p.y])).map(p=\u003e`${p[0]},${p[1]}`).join(\" \"),u=.05*Math.abs(n.a),g=A??(r===\"bottom\"?i.courtyard.bottom:i.courtyard.top);return[{name:\"polygon\",type:\"element\",attributes:{points:l,class:`pcb-courtyard-polygon pcb-courtyard-${r}`,\"data-pcb-courtyard-polygon-id\":s,\"data-type\":\"pcb_courtyard_polygon\",\"data-pcb-layer\":r,fill:\"none\",stroke:g,\"stroke-width\":u.toString(),\"stroke-linejoin\":\"round\"},value:\"\",children:[]}]}function YKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{layer:r,pcb_courtyard_outline_id:s,outline:a}=t;if(o\u0026\u0026r!==o)return[];if(!a||a.length===0)return cm(`[pcb_courtyard_outline] Invalid data for \"${s}\": expected non-empty array of points, got ${JSON.stringify(a)}`),[];const c=a.map(d=\u003ehn(n,[d.x,d.y])).map(d=\u003e`${d[0]},${d[1]}`).join(\" \"),l=.05*Math.abs(n.a),u=r===\"bottom\"?i.courtyard.bottom:i.courtyard.top;return[{name:\"polygon\",type:\"element\",attributes:{points:c,class:`pcb-courtyard-outline pcb-courtyard-${r}`,\"data-pcb-courtyard-outline-id\":s,\"data-type\":\"pcb_courtyard_outline\",\"data-pcb-layer\":r,fill:\"none\",stroke:u,\"stroke-width\":l.toString(),\"stroke-linejoin\":\"round\"},value:\"\",children:[]}]}function UKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,radius:s,layer:a=\"top\",pcb_courtyard_circle_id:A}=t;if(o\u0026\u0026a!==o)return[];if(!r||typeof r.x!=\"number\"||typeof r.y!=\"number\"||typeof s!=\"number\")return console.error(`[pcb_courtyard_circle] Invalid data for \"${A}\": expected center {x: number, y: number}, radius: number, got center=${JSON.stringify(r)}, radius=${JSON.stringify(s)}`),[];const[c,l]=hn(n,[r.x,r.y]),u=s*Math.abs(n.a),g=.05*Math.abs(n.a),h=a===\"bottom\"?i.courtyard.bottom:i.courtyard.top,d={cx:c.toString(),cy:l.toString(),r:u.toString(),class:`pcb-courtyard-circle pcb-courtyard-${a}`,\"data-pcb-courtyard-circle-id\":A,\"data-type\":\"pcb_courtyard_circle\",\"data-pcb-layer\":a};return d.fill=\"none\",d.stroke=h,d[\"stroke-width\"]=g.toString(),[{name:\"circle\",type:\"element\",attributes:d,value:\"\",children:[]}]}var Lx=1e-9;function KKo(t,e){const{startIsInsideCopperPour:n,endIsInsideCopperPour:o,start:i,end:r}=t;if(n===o)return t;const s=PR(i),a=PR(r),A=zKo(e).flatMap(h=\u003eWKo(h,s,a));if(A.length===0)return t;const c=o?Math.min(...A):Math.max(...A),l=HYt(s,a,c),u=VKo(t.startWidth,t.endWidth,c),g={...t,start:n?l:i,end:o?l:r,startWidth:n?u:t.startWidth,endWidth:o?u:t.endWidth};return $Ko(g.start,g.end)?null:g}function VKo(t,e,n){return t+(e-t)*n}function zKo(t){switch(t.shape){case\"rect\":return[JKo(t)];case\"polygon\":return[t.points.map(PR)];case\"brep\":return[t.brep_shape.outer_ring.vertices.map(OYt),...t.brep_shape.inner_rings.map(e=\u003ee.vertices.map(OYt))]}}function JKo(t){const e=PR(t.center),n=t.width/2,o=t.height/2,i=(t.rotation??0)*Math.PI/180,r=Math.cos(i),s=Math.sin(i);return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(a=\u003e({x:e.x+a.x*r-a.y*s,y:e.y+a.x*s+a.y*r}))}function WKo(t,e,n){const o=[];for(let i=0;i\u003ct.length;i++){const r=t[i],s=t[(i+1)%t.length];if(!r||!s)continue;if(r.bulge){o.push(...jKo(e,n,r,s,r.bulge));continue}const a=FYt(e,n,r,s);a!==null\u0026\u0026o.push(a)}return o}function jKo(t,e,n,o,i){const r=o.x-n.x,s=o.y-n.y,a=Math.hypot(r,s);if(a\u003cLx||Math.abs(i)\u003cLx){const C=FYt(t,e,n,o);return C===null?[]:[C]}const A=a*(1-i**2)/(4*i),c={x:(n.x+o.x)/2-s/a*A,y:(n.y+o.y)/2+r/a*A},l=Math.atan2(n.y-c.y,n.x-c.x),u=4*Math.atan(i),g=Math.hypot(n.x-c.x,n.y-c.y),h={x:e.x-t.x,y:e.y-t.y},d={x:t.x-c.x,y:t.y-c.y},p=yRe(h,h);if(p\u003cLx)return[];const m=2*yRe(d,h),_=yRe(d,d)-g**2,f=m**2-4*p*_;if(f\u003c-Lx)return[];const I=Math.sqrt(Math.max(0,f));return[(-m-I)/(2*p),(-m+I)/(2*p)].filter(C=\u003e{if(C\u003c-Lx||C\u003e1+Lx)return!1;const y=HYt(t,e,C),x=Math.atan2(y.y-c.y,y.x-c.x);return(u\u003e0?LYt(x-l):LYt(l-x))\u003c=Math.abs(u)+Lx})}function FYt(t,e,n,o){const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-n.x,y:o.y-n.y},s=CRe(i,r);if(Math.abs(s)\u003cLx)return null;const a={x:n.x-t.x,y:n.y-t.y},A=CRe(a,r)/s,c=CRe(a,i)/s;return A\u003c-Lx||A\u003e1+Lx||c\u003c-Lx||c\u003e1+Lx?null:Math.min(1,Math.max(0,A))}function CRe(t,e){return t.x*e.y-t.y*e.x}function yRe(t,e){return t.x*e.x+t.y*e.y}function LYt(t){const e=2*Math.PI,n=t%e;return n\u003c0?n+e:n}function HYt(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}}function PR(t){return{x:lt.parse(t.x),y:lt.parse(t.y)}}function OYt(t){return{...PR(t),bulge:t.bulge}}function $Ko(t,e){const n=PR(t),o=PR(e);return Math.abs(n.x-o.x)\u003cLx\u0026\u0026Math.abs(n.y-o.y)\u003cLx}function qKo(t){return t.route_type===\"through_pad\"?[t.start,t.end]:[t]}function XKo(t){const e=[];for(let n=0;n\u003ct.length-1;n++){const o=t[n],i=t[n+1];if(!o||!i)continue;const r=o.route_type===\"through_pad\"?o.end:o,s=i.route_type===\"through_pad\"?i.start:i,a=o.route_type===\"wire\"?o.layer:o.route_type===\"through_pad\"?o.end_layer:i.route_type===\"wire\"?i.layer:i.route_type===\"through_pad\"?i.start_layer:null;if(!a||ZKo(r,s))continue;const A=GYt(o),c=GYt(i),l=xRe(o)??xRe(i)??0,u=xRe(i)??l;e.push({start:r,end:s,layer:a,width:l,startWidth:l,endWidth:u,isInsideCopperPour:A\u0026\u0026c,startIsInsideCopperPour:A,endIsInsideCopperPour:c,copperPourId:A?YYt(o):c?YYt(i):void 0})}for(const n of t)if(!(!n||n.route_type!==\"through_pad\"))for(const o of new Set([n.start_layer,n.end_layer]))e.push({start:n.start,end:n.end,layer:o,width:n.width,startWidth:n.width,endWidth:n.width,isInsideCopperPour:!1,startIsInsideCopperPour:!1,endIsInsideCopperPour:!1});return e}function xRe(t){return\"width\"in t?lt.parse(t.width):void 0}function GYt(t){return\"is_inside_copper_pour\"in t\u0026\u0026t.is_inside_copper_pour===!0}function YYt(t){if(\"copper_pour_id\"in t)return t.copper_pour_id}function ZKo(t,e){const n=lt.parse(t.x),o=lt.parse(t.y),i=lt.parse(e.x),r=lt.parse(e.y);return n===i\u0026\u0026o===r}function eVo(t){const e=[],n=[];for(let o=0;o\u003ct.length;o++){const i=t[o];if(!i)continue;const r=tVo(t,o),s=ERe(-r.y,r.x),a=i.width/2;e.push({x:i.x+s.x*a,y:i.y+s.y*a}),n.push({x:i.x-s.x*a,y:i.y-s.y*a})}return e.concat(n.reverse())}function tVo(t,e){if(t.length\u003c2)return{x:1,y:0};if(e\u003c=0)return Xge(t[0],t[1]);if(e\u003e=t.length-1)return Xge(t[t.length-2],t[t.length-1]);const n=Xge(t[e-1],t[e]),o=Xge(t[e],t[e+1]),i=ERe(n.x+o.x,n.y+o.y);return i.x!==0||i.y!==0?i:n.x!==0||n.y!==0?n:o.x!==0||o.y!==0?o:{x:1,y:0}}function Xge(t,e){if(!t||!e)return{x:1,y:0};const n=ERe(e.x-t.x,e.y-t.y);return n.x===0\u0026\u0026n.y===0?{x:1,y:0}:n}function ERe(t,e){const n=Math.hypot(t,e);return n\u003c=Number.EPSILON?{x:0,y:0}:{x:t/n,y:e/n}}function UYt({elementType:t,shapeAttributes:e,layer:n,fillColor:o,fillOpacity:i,className:r,additionalAttributes:s}){const a={class:r,fill:o,\"fill-opacity\":i,\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":n,...e,...s};return{name:t,type:\"element\",value:\"\",children:[],attributes:a}}function KYt(t,e){const{transform:n,colorMap:o}=e,i=e.layer??\"top\",r=e.showSolderMask\u0026\u0026(i===\"top\"||i===\"bottom\");if(r\u0026\u0026!t.layers.includes(i))return[];const s=t,a=(i===\"top\"?s.tented_on_top:s.tented_on_bottom)??s.is_tented,[A,c]=hn(n,[t.x,t.y]),l=t.outer_diameter*Math.abs(n.a),u=t.outer_diameter*Math.abs(n.a),g=t.hole_diameter*Math.abs(n.a),h=t.hole_diameter*Math.abs(n.a),d=Math.min(l,u)/2,p=Math.min(g,h)/2,m={name:\"g\",type:\"element\",value:\"\",attributes:{\"data-type\":\"pcb_via\",\"data-pcb-layer\":\"through\"},children:[{name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-outer\",fill:o.copper[r?i:\"top\"],cx:A.toString(),cy:c.toString(),r:d.toString(),\"data-type\":\"pcb_via\",\"data-pcb-layer\":r?i:\"top\"}},{name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-inner\",fill:o.drill,cx:A.toString(),cy:c.toString(),r:p.toString(),\"data-type\":\"pcb_via\",\"data-pcb-layer\":\"drill\"}}]};return r\u0026\u0026a\u0026\u0026m.children.push(UYt({elementType:\"circle\",shapeAttributes:{cx:A.toString(),cy:c.toString(),r:d.toString()},layer:i,fillColor:o.soldermaskWithCopperUnderneath[i],fillOpacity:\"1\",className:\"pcb-via-tenting\"})),[m]}function VYt(t,e){if(t.shape===\"rect\"){const[n,o]=hn(e,[t.center.x,t.center.y]),i=t.width*Math.abs(e.a),r=t.height*Math.abs(e.d),s=-(t.rotation??0);return{elementType:\"rect\",shapeAttributes:{x:(-i/2).toString(),y:(-r/2).toString(),width:i.toString(),height:r.toString(),transform:$b(m0(of(n,o),jb(s*Math.PI/180)))}}}if(t.shape===\"polygon\")return!t.points||t.points.length===0?null:{elementType:\"polygon\",shapeAttributes:{points:t.points.map(o=\u003ehn(e,[o.x,o.y])).map(o=\u003e`${o[0]},${o[1]}`).join(\" \")}};if(t.shape===\"brep\"){const{brep_shape:n}=t;let o=jge(n.outer_ring.vertices,e);for(const i of n.inner_rings??[])o+=` ${jge(i.vertices,e)}`;return{elementType:\"path\",shapeAttributes:{d:o,\"fill-rule\":\"evenodd\"}}}return null}function zYt(t){return`copper-pour-trace-mask-${t}`.replace(/[^a-zA-Z0-9_-]/g,\"_\")}function nVo({layer:t,circuitJson:e}){for(const n of e)if(!(n.type!==\"pcb_copper_pour\"||n.layer!==t))return zYt(t)}function oVo({circuitJson:t,transform:e,svgWidth:n,svgHeight:o,usedMaskIds:i}){if(i.size===0)return null;const r=new Map;for(const a of t){if(a.type!==\"pcb_copper_pour\")continue;const A=a,c=zYt(A.layer);if(!i.has(c))continue;const l=r.get(c);l?l.push(A):r.set(c,[A])}if(r.size===0)return null;const s=[];for(const[a,A]of r){const c=[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{x:\"0\",y:\"0\",width:n.toString(),height:o.toString(),fill:\"#fff\"}}];for(const l of A){const u=VYt(l,e);u\u0026\u0026c.push({name:u.elementType,type:\"element\",value:\"\",children:[],attributes:{...u.shapeAttributes,fill:\"#000\"}})}s.push({name:\"mask\",type:\"element\",value:\"\",children:c,attributes:{id:a,maskUnits:\"userSpaceOnUse\",x:\"0\",y:\"0\",width:n.toString(),height:o.toString()}})}return{name:\"defs\",type:\"element\",value:\"\",children:s,attributes:{class:\"copper-pour-trace-mask-defs\"}}}function iVo(t){const e=[],n=new Map;for(const o of t){const i=o.attributes?.[\"data-type\"],r=o.attributes?.mask;if(!(i===\"pcb_trace\"||i===\"pcb_trace_soldermask\")||!r?.includes(\"#copper-pour-trace-mask-\")){e.push(o);continue}let a=n.get(r);if(!a){const d={name:\"g\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-trace-mask-group\",mask:r}};a={object:d,pathsByAttributes:new Map},n.set(r,a),e.push(d)}const{mask:A,d:c=\"\",...l}=o.attributes,u=JSON.stringify(l),g=a.pathsByAttributes.get(u);if(g){g.attributes.d+=` ${c}`;continue}const h={...o,attributes:{...l,d:c}};a.pathsByAttributes.set(u,h),a.object.children.push(h)}return e}function rVo(t,e){const{transform:n,layer:o,colorMap:i,showSolderMask:r}=e;if(!t.route||!Array.isArray(t.route)||t.route.length\u003c2)return[];const s=[],a=gVo(e),A=new Map,c=[];for(const u of XKo(t.route)){let g=u;if(g.isInsideCopperPour)continue;if(g.copperPourId\u0026\u0026g.startIsInsideCopperPour!==g.endIsInsideCopperPour){const d=e.circuitJson?.find(p=\u003ep.type===\"pcb_copper_pour\"\u0026\u0026p.pcb_copper_pour_id===g.copperPourId);if(d){const p=KKo(g,d);if(!p)continue;g=p}}const h=g.layer;h\u0026\u0026(o\u0026\u0026h!==o||c.push(g))}const l=u=\u003e{A.has(u)||A.set(u,e.circuitJson?nVo({layer:u,circuitJson:e.circuitJson}):void 0);const g=A.get(u);return g?(e.usedCopperPourTraceMaskIds?.add(g),{mask:`url(#${g})`}):{}};if(t.route_thickness_mode===\"interpolated\")for(const u of sVo(c)){const g=u[0]?.layer;if(!g)continue;const h=aVo(u,n);if(!h)continue;const d=Fx(g,i),p=i.soldermaskWithCopperUnderneath[g];s.push({name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:r?\"pcb-soldermask\":\"pcb-trace\",fill:r?p:d,stroke:\"none\",d:h,\"shape-rendering\":\"geometricPrecision\",\"data-type\":r?\"pcb_trace_soldermask\":\"pcb_trace\",\"data-pcb-layer\":g,...l(g)}})}else for(const u of c){const g=hn(n,[u.start.x,u.start.y]),h=hn(n,[u.end.x,u.end.y]),d=u.layer,p=Fx(d,i),m=i.soldermaskWithCopperUnderneath[d],_=u.width?(u.width*Math.abs(n.a)).toString():\"0.3\",f=l(d);if(r){const I={name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask\",stroke:m,fill:\"none\",d:`M ${g[0]} ${g[1]} L ${h[0]} ${h[1]}`,\"stroke-width\":_,\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",\"shape-rendering\":\"crispEdges\",\"data-type\":\"pcb_trace_soldermask\",\"data-pcb-layer\":d,...f}};s.push(I)}else{const I={name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-trace\",stroke:p,fill:\"none\",d:`M ${g[0]} ${g[1]} L ${h[0]} ${h[1]}`,\"stroke-width\":_,\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",\"shape-rendering\":\"crispEdges\",\"data-type\":\"pcb_trace\",\"data-pcb-layer\":d,...f}};s.push(I)}}for(const[u,g]of t.route.entries())!g||g.route_type!==\"via\"||a.has(WYt(g))||s.push(...KYt(cVo(t,g,u,e),e));return s}function sVo(t){const e=[];for(const n of t){const o=e[e.length-1],i=o?.[o.length-1];o\u0026\u0026i?.layer===n.layer\u0026\u0026AVo(i.end,n.start)?o.push(n):e.push([n])}return e}function aVo(t,e){const n=t[0];if(!n)return\"\";const o=[{x:lt.parse(n.start.x),y:lt.parse(n.start.y),width:n.startWidth},...t.map(A=\u003e({x:lt.parse(A.end.x),y:lt.parse(A.end.y),width:A.endWidth}))],r=eVo(o).map(A=\u003ehn(e,[A.x,A.y])),[s,...a]=r;return s?[`M ${s[0]} ${s[1]}`,...a.map(A=\u003e`L ${A[0]} ${A[1]}`),\"Z\"].join(\" \"):\"\"}function AVo(t,e){return lt.parse(t.x)===lt.parse(e.x)\u0026\u0026lt.parse(t.y)===lt.parse(e.y)}function cVo(t,e,n,o){const i=lVo(t.route,n),{holeDiameter:r,outerDiameter:s}=uVo(o,i);return{type:\"pcb_via\",pcb_via_id:`${t.pcb_trace_id}_route_via_${n}`,pcb_trace_id:t.pcb_trace_id,x:e.x,y:e.y,outer_diameter:s,hole_diameter:r,layers:[e.from_layer,e.to_layer]}}function lVo(t,e){const n=JYt(t,e,-1),o=JYt(t,e,1);return Math.max(n??0,o??0)}function JYt(t,e,n){for(let o=e+n;o\u003e=0\u0026\u0026o\u003ct.length;o+=n){const i=t[o];if(!(!i||!(\"width\"in i)||typeof i.width!=\"number\"))return i.width}}function uVo(t,e){const n=t.circuitJson?.find(c=\u003ec.type===\"pcb_board\"),o=Zge(n?.min_via_hole_diameter),i=Zge(n?.min_via_pad_diameter),r=Math.max(e,.3),s=Math.max(r*2,.6);return{holeDiameter:o??r,outerDiameter:i??s}}function gVo(t){return new Set(t.circuitJson?.filter(e=\u003ee.type===\"pcb_via\").map(e=\u003eWYt(e))??[])}function WYt(t){const e=Zge(t.x),n=Zge(t.y);return e!==void 0\u0026\u0026n!==void 0?`${e}:${n}`:`${String(t.x)}:${String(t.y)}`}function Zge(t){if(t==null)return;const e=lt.safeParse(t);return e.success?e.data:void 0}function dVo(t,e){const{transform:n,layer:o,colorMap:i,showSolderMask:r}=e;if(o\u0026\u0026t.layer!==o)return[];const s=wYt(t,e.circuitJson),a=!!t?.is_covered_with_solder_mask,A=r\u0026\u0026a,c=i.soldermaskWithCopperUnderneath[t.layer]??i.soldermaskWithCopperUnderneath.top,l=(t.soldermask_margin??0)*Math.abs(n.a);if(t.shape===\"rect\"||t.shape===\"rotated_rect\"){const u=t.width*Math.abs(n.a),g=t.height*Math.abs(n.d),[h,d]=hn(n,[t.x,t.y]),m=(t.corner_radius??t.rect_border_radius??0)*Math.abs(n.a),_={left:(t.soldermask_margin_left??t.soldermask_margin??0)*Math.abs(n.a),right:(t.soldermask_margin_right??t.soldermask_margin??0)*Math.abs(n.a),top:(t.soldermask_margin_top??t.soldermask_margin??0)*Math.abs(n.a),bottom:(t.soldermask_margin_bottom??t.soldermask_margin??0)*Math.abs(n.a)},f=_.left\u003c0||_.right\u003c0||_.top\u003c0||_.bottom\u003c0,I=_.left===0\u0026\u0026_.right===0\u0026\u0026_.top===0\u0026\u0026_.bottom===0;if(t.shape===\"rotated_rect\"\u0026\u0026t.ccw_rotation){const S={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad\",fill:Fx(t.layer,i),x:(-u/2).toString(),y:(-g/2).toString(),width:u.toString(),height:g.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...s,...m?{rx:m.toString(),ry:m.toString()}:{}}};if(!A)return[S];const Q=u+_.left+_.right,w=g+_.top+_.bottom,M=m?m+l:0;if(f){const R={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,x:(-u/2).toString(),y:(-g/2).toString(),width:u.toString(),height:g.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...m?{rx:m.toString(),ry:m.toString()}:{}}},F={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-exposed\",fill:Fx(t.layer,i),x:(-u/2-_.left).toString(),y:(-g/2-_.top).toString(),width:Q.toString(),height:w.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":t.layer,...M\u003e0?{rx:M.toString(),ry:M.toString()}:{}}};return[R,F]}return I?[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,x:(-u/2).toString(),y:(-g/2).toString(),width:u.toString(),height:g.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...m?{rx:m.toString(),ry:m.toString()}:{}}}]:[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:i.substrate,x:(-u/2-_.left).toString(),y:(-g/2-_.top).toString(),width:Q.toString(),height:w.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,...M\u003e0?{rx:M.toString(),ry:M.toString()}:{},\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":t.layer}},S]}const C={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad\",fill:Fx(t.layer,i),x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...s,...m?{rx:m.toString(),ry:m.toString()}:{}}};if(!A)return[C];const y=u+_.left+_.right,x=g+_.top+_.bottom,E=m?m+l:0;if(f){const S={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...m?{rx:m.toString(),ry:m.toString()}:{}}},Q={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-exposed\",fill:Fx(t.layer,i),x:(h-u/2-_.left).toString(),y:(d-g/2-_.top).toString(),width:y.toString(),height:x.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":t.layer,...E\u003e0?{rx:E.toString(),ry:E.toString()}:{}}};return[S,Q]}return I?[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),...E\u003e0?{rx:m.toString(),ry:m.toString()}:{},\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer}}]:[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:i.substrate,x:(h-u/2-_.left).toString(),y:(d-g/2-_.top).toString(),width:y.toString(),height:x.toString(),...E\u003e0?{rx:E.toString(),ry:E.toString()}:{},\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":t.layer}},C]}if(t.shape===\"pill\"||t.shape===\"rotated_pill\"){const u=t.shape===\"rotated_pill\",g=t.width*Math.abs(n.a),h=t.height*Math.abs(n.d),d=t.radius*Math.abs(n.a),[p,m]=hn(n,[t.x,t.y]),_=u?{transform:`translate(${p} ${m}) rotate(${-(t.ccw_rotation??0)})`}:void 0,f={class:\"pcb-pad\",fill:Fx(t.layer,i),x:u?(-g/2).toString():(p-g/2).toString(),y:u?(-h/2).toString():(m-h/2).toString(),width:g.toString(),height:h.toString(),rx:d.toString(),ry:d.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...s,..._??{}},I={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:f};if(!A)return[I];const C=g+2*l,y=h+2*l,x=d+l;if(l\u003c0){const S={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,x:u?(-g/2).toString():(p-g/2).toString(),y:u?(-h/2).toString():(m-h/2).toString(),width:g.toString(),height:h.toString(),rx:d.toString(),ry:d.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,..._??{}}},Q={class:\"pcb-pad-exposed\",fill:Fx(t.layer,i),x:u?(-C/2).toString():(p-C/2).toString(),y:u?(-y/2).toString():(m-y/2).toString(),width:C.toString(),height:y.toString(),rx:x.toString(),ry:x.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":t.layer,..._??{}};return[S,{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:Q}]}if(l===0)return[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,x:u?(-g/2).toString():(p-g/2).toString(),y:u?(-h/2).toString():(m-h/2).toString(),width:g.toString(),height:h.toString(),rx:d.toString(),ry:d.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,..._??{}}}];const E={class:\"pcb-soldermask-cutout\",fill:i.substrate,x:u?(-C/2).toString():(p-C/2).toString(),y:u?(-y/2).toString():(m-y/2).toString(),width:C.toString(),height:y.toString(),rx:x.toString(),ry:x.toString(),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":t.layer,..._??{}};return[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:E},I]}if(t.shape===\"circle\"){const u=t.radius*Math.abs(n.a),[g,h]=hn(n,[t.x,t.y]),d={name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad\",fill:Fx(t.layer,i),cx:g.toString(),cy:h.toString(),r:u.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...s}};if(!A)return[d];const p=u+l;if(l\u003c0){const _={name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,cx:g.toString(),cy:h.toString(),r:u.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer}},f={name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-exposed\",fill:Fx(t.layer,i),cx:g.toString(),cy:h.toString(),r:p.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":t.layer}};return[_,f]}return l===0?[{name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,cx:g.toString(),cy:h.toString(),r:u.toString(),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer}}]:[{name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:i.substrate,cx:g.toString(),cy:h.toString(),r:p.toString(),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":t.layer}},d]}if(t.shape===\"polygon\"){const u=(t.points??[]).map(p=\u003ehn(n,[p.x,p.y])),g={name:\"polygon\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad\",fill:Fx(t.layer,i),points:u.map(p=\u003ep.join(\",\")).join(\" \"),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer,...s}};if(!A)return[g];let h=u;if(l!==0){const p=u.reduce((_,f)=\u003e_+f[0],0)/u.length,m=u.reduce((_,f)=\u003e_+f[1],0)/u.length;h=u.map(([_,f])=\u003e{const I=_-p,C=f-m,y=Math.sqrt(I*I+C*C);if(y===0)return[_,f];const x=I/y,E=C/y;return[_+x*l,f+E*l]})}if(l\u003c0){const p={name:\"polygon\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,points:u.map(_=\u003e_.join(\",\")).join(\" \"),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer}},m={name:\"polygon\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-exposed\",fill:Fx(t.layer,i),points:h.map(_=\u003e_.join(\",\")).join(\" \"),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":t.layer}};return[p,m]}return l===0?[{name:\"polygon\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-pad-covered\",fill:c,points:u.map(m=\u003em.join(\",\")).join(\" \"),\"data-type\":\"pcb_smtpad\",\"data-pcb-layer\":t.layer}}]:[{name:\"polygon\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:i.substrate,points:h.map(p=\u003ep.join(\",\")).join(\" \"),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":t.layer}},g]}return[]}var jYt=.05,hE=4,$Yt=8,qYt=11,mG=1,_G=5,XYt=1.5,ZYt=2,BRe=_G+2,bRe=ZYt+2,_q=_G+hE+6,hVo=15,pVo=10,mVo=.2,_Vo=50;function SRe(t){const{groupAnchorPosition:e,componentPosition:n,transform:o,componentWidth:i=0,componentHeight:r=0,displayXOffset:s,displayYOffset:a}=t,A=[],[c,l]=hn(o,[e.x,e.y]),[u,g]=hn(o,[n.x,n.y]),h=n.x-e.x,d=n.y-e.y,p=Math.abs(o.a),m=i*p,_=r*p;A.push(IVo(c,l));const f=fVo(c,l,u,g);A.push({name:\"line\",type:\"element\",attributes:{x1:f.x1.toString(),y1:f.y1.toString(),x2:f.x2.toString(),y2:f.y2.toString(),stroke:\"#ffffff\",\"stroke-width\":\"0.5\",\"stroke-dasharray\":\"3,3\",opacity:\"0.5\",class:\"anchor-offset-connector\"},children:[],value:\"\"}),A.push({name:\"circle\",type:\"element\",attributes:{cx:u.toString(),cy:g.toString(),r:ZYt.toString(),fill:\"#ffffff\",opacity:\"0.7\",class:\"anchor-offset-component-marker\"},children:[],value:\"\"});const I=Math.abs(g-l),C=Math.abs(u-c),y=Math.sqrt(C*C+I*I),x=_/2+hVo,E=Math.max(x,Math.min(_Vo,y*mVo));let B=d\u003e0?g-E:g+E;const S=m/2+pVo;let Q=h\u003e0?u+S:u-S;if(ede(B,l)||ede(B,g)){const w=Math.min(l,g),M=Math.max(l,g),k=w-_q,R=M+_q;B=Math.abs(B-k)\u003cMath.abs(B-R)?k:R}if(ede(Q,c)||ede(Q,u)){const w=Math.min(c,u),M=Math.max(c,u),k=w-_q,R=M+_q;Q=Math.abs(Q-k)\u003cMath.abs(Q-R)?k:R}return Math.abs(h)\u003ejYt\u0026\u0026A.push(...CVo({startX:c,endX:u,y:B,offsetMm:h,offsetY:d,displayOffset:s})),Math.abs(d)\u003ejYt\u0026\u0026A.push(...yVo({x:Q,startY:l,endY:g,offsetMm:d,offsetX:h,displayOffset:a})),A}function fVo(t,e,n,o){const i=n-t,r=o-e,s=Math.hypot(i,r),a=BRe+bRe;if(!(s\u003ea))return{x1:t,y1:e,x2:n,y2:o};const A=i/s,c=r/s;return{x1:t+A*BRe,y1:e+c*BRe,x2:n-A*bRe,y2:o-c*bRe}}function ede(t,e){return Math.abs(t-e)\u003c_q}function IVo(t,e){return{name:\"g\",type:\"element\",attributes:{class:\"anchor-offset-marker\",\"data-type\":\"anchor_offset_marker\"},children:[{name:\"line\",type:\"element\",attributes:{x1:t.toString(),y1:(e-_G).toString(),x2:t.toString(),y2:(e+_G).toString(),stroke:\"#ffffff\",\"stroke-width\":XYt.toString(),\"stroke-linecap\":\"round\"},children:[],value:\"\"},{name:\"line\",type:\"element\",attributes:{x1:(t-_G).toString(),y1:e.toString(),x2:(t+_G).toString(),y2:e.toString(),stroke:\"#ffffff\",\"stroke-width\":XYt.toString(),\"stroke-linecap\":\"round\"},children:[],value:\"\"}],value:\"\"}}function CVo({startX:t,endX:e,y:n,offsetMm:o,offsetY:i,displayOffset:r}){const s=[];s.push({name:\"line\",type:\"element\",attributes:{x1:t.toString(),y1:n.toString(),x2:e.toString(),y2:n.toString(),stroke:\"#ffffff\",\"stroke-width\":mG.toString(),class:\"anchor-offset-dimension-x\"},children:[],value:\"\"}),s.push({name:\"line\",type:\"element\",attributes:{x1:t.toString(),y1:(n-hE).toString(),x2:t.toString(),y2:(n+hE).toString(),stroke:\"#ffffff\",\"stroke-width\":mG.toString()},children:[],value:\"\"}),s.push({name:\"line\",type:\"element\",attributes:{x1:e.toString(),y1:(n-hE).toString(),x2:e.toString(),y2:(n+hE).toString(),stroke:\"#ffffff\",\"stroke-width\":mG.toString()},children:[],value:\"\"});const a=(t+e)/2,A=i\u003e0?n-hE-$Yt:n+hE+$Yt;return s.push({name:\"text\",type:\"element\",attributes:{x:a.toString(),y:A.toString(),fill:\"#ffffff\",\"font-size\":qYt.toString(),\"font-family\":\"Arial, sans-serif\",\"text-anchor\":\"middle\",\"dominant-baseline\":i\u003e0?\"baseline\":\"hanging\",class:\"anchor-offset-label\"},children:[{type:\"text\",value:eUt(\"X\",o,r),name:\"\",attributes:{},children:[]}],value:\"\"}),s}function yVo({x:t,startY:e,endY:n,offsetMm:o,offsetX:i,displayOffset:r}){const s=[];s.push({name:\"line\",type:\"element\",attributes:{x1:t.toString(),y1:e.toString(),x2:t.toString(),y2:n.toString(),stroke:\"#ffffff\",\"stroke-width\":mG.toString(),class:\"anchor-offset-dimension-y\"},children:[],value:\"\"}),s.push({name:\"line\",type:\"element\",attributes:{x1:(t-hE).toString(),y1:e.toString(),x2:(t+hE).toString(),y2:e.toString(),stroke:\"#ffffff\",\"stroke-width\":mG.toString()},children:[],value:\"\"}),s.push({name:\"line\",type:\"element\",attributes:{x1:(t-hE).toString(),y1:n.toString(),x2:(t+hE).toString(),y2:n.toString(),stroke:\"#ffffff\",\"stroke-width\":mG.toString()},children:[],value:\"\"});const a=(e+n)/2,A=i\u003c0?t-hE-4:t+hE+4;return s.push({name:\"text\",type:\"element\",attributes:{x:A.toString(),y:a.toString(),fill:\"#ffffff\",\"font-size\":qYt.toString(),\"font-family\":\"Arial, sans-serif\",\"text-anchor\":i\u003c0?\"end\":\"start\",\"dominant-baseline\":\"middle\",class:\"anchor-offset-label\"},children:[{type:\"text\",value:eUt(\"Y\",o,r),name:\"\",attributes:{},children:[]}],value:\"\"}),s}function eUt(t,e,n){const o=typeof n==\"string\"?n:e.toFixed(2),r=typeof o==\"string\"\u0026\u0026o.trim().endsWith(\"mm\")?\"\":\"mm\";return`${t}: ${o}${r}`}function fq(t){const e=t?.anchor_position??t?.center;if(e\u0026\u0026typeof e.x==\"number\"\u0026\u0026typeof e.y==\"number\")return{x:e.x,y:e.y}}function tUt(t,e){const{transform:n,colorMap:o,showSolderMask:i,circuitJson:r}=e,{width:s,height:a,center:A,outline:c,position_mode:l,anchor_position:u,display_offset_x:g,display_offset_y:h}=t;let d;if(c\u0026\u0026Array.isArray(c)\u0026\u0026c.length\u003e=3)d=c.map((m,_)=\u003e{const[f,I]=hn(n,[m.x,m.y]);return _===0?`M ${f} ${I}`:`L ${f} ${I}`}).join(\" \");else{const m=s/2,_=a/2,f=hn(n,[A.x-m,A.y-_]),I=hn(n,[A.x+m,A.y-_]),C=hn(n,[A.x+m,A.y+_]),y=hn(n,[A.x-m,A.y+_]);d=`M ${f[0]} ${f[1]} L ${I[0]} ${I[1]} L ${C[0]} ${C[1]} L ${y[0]} ${y[1]}`}d+=\" Z\";const p=[];if(i){const _=(e.layer??\"top\")===\"bottom\"?\"soldermask-bottom\":\"soldermask-top\";p.push({name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-board-soldermask\",d,fill:o.soldermask.top,\"fill-opacity\":\"0.8\",stroke:\"none\",\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":_}})}if(p.push({name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-board\",d,fill:\"none\",stroke:o.boardOutline,\"stroke-width\":(.1*Math.abs(n.a)).toString(),\"data-type\":\"pcb_board\",\"data-pcb-layer\":\"board\"}}),e.showAnchorOffsets\u0026\u0026r\u0026\u0026l===\"relative_to_panel_anchor\"){const m=r.find(_=\u003e_.type===\"pcb_panel\");if(m){const _=fq(m);_\u0026\u0026p.push(...SRe({groupAnchorPosition:_,componentPosition:u??A,transform:n,componentWidth:s,componentHeight:a,displayXOffset:g,displayYOffset:h}))}}return p}function xVo(t,e){const{transform:n,colorMap:o,showSolderMask:i}=e,r=Number(t.width),s=Number(t.height),a=t.center??{x:r/2,y:s/2},A=r/2,c=s/2,l=hn(n,[a.x-A,a.y-c]),u=hn(n,[a.x+A,a.y-c]),g=hn(n,[a.x+A,a.y+c]),h=hn(n,[a.x-A,a.y+c]),d=`M ${l[0]} ${l[1]} L ${u[0]} ${u[1]} L ${g[0]} ${g[1]} L ${h[0]} ${h[1]} Z`;return t.covered_with_solder_mask,[{name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-panel\",d,fill:\"none\",stroke:o.boardOutline,\"stroke-width\":(.1*Math.abs(n.a)).toString(),\"data-type\":\"pcb_panel\",\"data-pcb-layer\":\"board\"}}]}function EVo(t,e){const{transform:n,colorMap:o,showSolderMask:i}=e,r=e.layer??\"top\",[s,a]=hn(n,[t.x,t.y]),A=!!t.is_covered_with_solder_mask,c=(t.soldermask_margin??0)*Math.abs(n.a),l=i\u0026\u0026A\u0026\u0026c!==0,u=o.soldermask.top;if(t.hole_shape===\"circle\"||t.hole_shape===\"square\"){const g=t.hole_diameter*Math.abs(n.a),h=g/2;if(t.hole_shape===\"circle\"){const _={name:\"circle\",type:\"element\",attributes:{class:\"pcb-hole\",cx:s.toString(),cy:a.toString(),r:h.toString(),fill:o.drill,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"};if(!l)return[_];const f=h+c;if(c\u003c0){const C={name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-covered\",fill:u,cx:s.toString(),cy:a.toString(),r:h.toString(),\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"}},y={name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-exposed\",fill:o.drill,cx:s.toString(),cy:a.toString(),r:f.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":\"drill\"}};return[C,y]}return[{name:\"circle\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,cx:s.toString(),cy:a.toString(),r:f.toString(),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":r}},_]}const d={name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole\",x:(s-h).toString(),y:(a-h).toString(),width:g.toString(),height:g.toString(),fill:o.drill,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"};if(!l)return[d];const p=g+2*c;if(c\u003c0){const _={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-covered\",fill:u,x:(s-h).toString(),y:(a-h).toString(),width:g.toString(),height:g.toString(),\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"}},f={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-exposed\",fill:o.drill,x:(s-p/2).toString(),y:(a-p/2).toString(),width:p.toString(),height:p.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":\"drill\"}};return[_,f]}return[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,x:(s-p/2).toString(),y:(a-p/2).toString(),width:p.toString(),height:p.toString(),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":r}},d]}if(t.hole_shape===\"oval\"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d=g/2,p=h/2,m={name:\"ellipse\",type:\"element\",attributes:{class:\"pcb-hole\",cx:s.toString(),cy:a.toString(),rx:d.toString(),ry:p.toString(),fill:o.drill,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"};if(!l)return[m];const _=d+c,f=p+c;if(c\u003c0){const C={name:\"ellipse\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-covered\",fill:u,cx:s.toString(),cy:a.toString(),rx:d.toString(),ry:p.toString(),\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"}},y={name:\"ellipse\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-exposed\",fill:o.drill,cx:s.toString(),cy:a.toString(),rx:_.toString(),ry:f.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":\"drill\"}};return[C,y]}return[{name:\"ellipse\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,cx:s.toString(),cy:a.toString(),rx:_.toString(),ry:f.toString(),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":r}},m]}if(t.hole_shape===\"rect\"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d={name:\"rect\",type:\"element\",attributes:{class:\"pcb-hole\",x:(s-g/2).toString(),y:(a-h/2).toString(),width:g.toString(),height:h.toString(),fill:o.drill,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"};if(!l)return[d];const p=g+2*c,m=h+2*c;if(c\u003c0){const f={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-covered\",fill:u,x:(s-g/2).toString(),y:(a-h/2).toString(),width:g.toString(),height:h.toString(),\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"}},I={name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-exposed\",fill:o.drill,x:(s-p/2).toString(),y:(a-m/2).toString(),width:p.toString(),height:m.toString(),\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":\"drill\"}};return[f,I]}return[{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,x:(s-p/2).toString(),y:(a-m/2).toString(),width:p.toString(),height:m.toString(),\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":r}},d]}if(t.hole_shape===\"pill\"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d=g\u003eh,p=Math.min(g,h)/2,m=Math.abs(d?g-h:h-g),_=d?`M${s-m/2},${a-p} h${m} a${p},${p} 0 0 1 0,${h} h-${m} a${p},${p} 0 0 1 0,-${h} z`:`M${s-p},${a-m/2} v${m} a${p},${p} 0 0 0 ${g},0 v-${m} a${p},${p} 0 0 0 -${g},0 z`,f={name:\"path\",type:\"element\",attributes:{class:\"pcb-hole\",fill:o.drill,d:_,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"};if(!l)return[f];const I=g+2*c,C=h+2*c,y=I\u003eC,x=Math.min(I,C)/2,E=Math.abs(y?I-C:C-I),B=y?`M${s-E/2},${a-x} h${E} a${x},${x} 0 0 1 0,${C} h-${E} a${x},${x} 0 0 1 0,-${C} z`:`M${s-x},${a-E/2} v${E} a${x},${x} 0 0 0 ${I},0 v-${E} a${x},${x} 0 0 0 -${I},0 z`;if(c\u003c0){const Q={name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-covered\",fill:u,d:_,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"}},w={name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-exposed\",fill:o.drill,d:B,\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":\"drill\"}};return[Q,w]}return[{name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,d:B,\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":r}},f]}if(t.hole_shape===\"rotated_pill\"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d=\"ccw_rotation\"in t?t.ccw_rotation??0:0,p=g\u003eh,m=Math.min(g,h)/2,_=Math.abs(p?g-h:h-g),f=p?`M${-_/2},${-m} h${_} a${m},${m} 0 0 1 0,${h} h-${_} a${m},${m} 0 0 1 0,-${h} z`:`M${-m},${-_/2} v${_} a${m},${m} 0 0 0 ${g},0 v-${_} a${m},${m} 0 0 0 -${g},0 z`,I={name:\"path\",type:\"element\",attributes:{class:\"pcb-hole\",fill:o.drill,d:f,transform:`translate(${s} ${a}) rotate(${-d})`,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"};if(!l)return[I];const C=g+2*c,y=h+2*c,x=C\u003ey,E=Math.min(C,y)/2,B=Math.abs(x?C-y:y-C),S=x?`M${-B/2},${-E} h${B} a${E},${E} 0 0 1 0,${y} h-${B} a${E},${E} 0 0 1 0,-${y} z`:`M${-E},${-B/2} v${B} a${E},${E} 0 0 0 ${C},0 v-${B} a${E},${E} 0 0 0 -${C},0 z`;if(c\u003c0){const w={name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-covered\",fill:u,d:f,transform:`translate(${s} ${a}) rotate(${-d})`,\"data-type\":\"pcb_hole\",\"data-pcb-layer\":\"drill\"}},M={name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-hole-exposed\",fill:o.drill,d:S,transform:`translate(${s} ${a}) rotate(${-d})`,\"data-type\":\"pcb_soldermask\",\"data-pcb-layer\":\"drill\"}};return[w,M]}return[{name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-soldermask-cutout\",fill:o.substrate,d:S,\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":r}},I]}return[]}var BVo=(t,e)=\u003e{const n=Mr(e).pcb_smtpad.get(t);if(n\u0026\u0026\"x\"in n\u0026\u0026\"y\"in n)return{x:n.x,y:n.y};const o=Mr(e).pcb_plated_hole.get(t);return o\u0026\u0026\"x\"in o\u0026\u0026\"y\"in o?{x:o.x,y:o.y}:null},bVo=(t,e,n,o)=\u003e{const i=n.getIdsConnectedToNet(e);let r=null,s=1/0;for(const a of i){const A=BVo(a,o);if(A){const c=t.x-A.x,l=t.y-A.y,u=Math.sqrt(c*c+l*l);u\u003e0\u0026\u0026u\u003cs\u0026\u0026(s=u,r=A)}}return r};function SVo(t,e){const{transform:n}=e,o=Vf(t),i=t.filter(A=\u003eA.type===\"pcb_port\"),r=t.filter(A=\u003eA.type===\"source_trace\"),s=[];i.forEach((A,c)=\u003e{const l=A.pcb_port_id;if(!l)return;const u=o.getNetConnectedToId(l);if(!u)return;let g=!1;const h=Mr(t).source_port.getWhere({pcb_port_id:l});if(h\u0026\u0026h.source_port_id){const m=h.source_port_id;for(const _ of r)if(Array.isArray(_.connected_source_port_ids)\u0026\u0026_.connected_source_port_ids.includes(m)\u0026\u0026Array.isArray(_.connected_source_net_ids)\u0026\u0026_.connected_source_net_ids.length\u003e0){g=!0;break}}const d={x:A.x,y:A.y},p=bVo(d,u,o,t);p\u0026\u0026s.push({key:`${l}-${c}`,startPoint:d,endPoint:p,isInNet:g})});const a=[];for(const A of s){const c=hn(n,[A.startPoint.x,A.startPoint.y]),l=hn(n,[A.endPoint.x,A.endPoint.y]),u={x1:c[0].toString(),y1:c[1].toString(),x2:l[0].toString(),y2:l[1].toString(),stroke:\"white\",\"stroke-width\":\"1\",\"stroke-dasharray\":\"6,6\",\"data-type\":\"pcb_rats_nest\",\"data-pcb-layer\":\"overlay\"};a.push({name:\"line\",type:\"element\",attributes:u,value:\"\",children:[]})}return a}function QVo(t,e){const{transform:n,colorMap:o}=e;if(t.shape===\"rect\"){const i=t,[r,s]=hn(n,[i.center.x,i.center.y]),a=i.width*Math.abs(n.a),A=i.height*Math.abs(n.d),c=-(i.rotation??0),{corner_radius:l}=i,u=typeof l==\"number\"\u0026\u0026l\u003e0?l:0,g=u*Math.abs(n.a),h=u*Math.abs(n.d),d={class:\"pcb-cutout pcb-cutout-rect\",x:(-a/2).toString(),y:(-A/2).toString(),width:a.toString(),height:A.toString(),fill:o.drill,transform:$b(m0(of(r,s),jb(c*Math.PI/180))),\"data-type\":\"pcb_cutout\",\"data-pcb-layer\":\"drill\"};return g\u003e0\u0026\u0026(d.rx=g.toString()),h\u003e0\u0026\u0026(d.ry=h.toString()),[{name:\"rect\",type:\"element\",attributes:d,children:[],value:\"\"}]}if(t.shape===\"circle\"){const i=t,[r,s]=hn(n,[i.center.x,i.center.y]),a=i.radius*Math.abs(n.a);return[{name:\"circle\",type:\"element\",attributes:{class:\"pcb-cutout pcb-cutout-circle\",cx:r.toString(),cy:s.toString(),r:a.toString(),fill:o.drill,\"data-type\":\"pcb_cutout\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"}]}if(t.shape===\"polygon\"){const i=t;return!i.points||i.points.length===0?[]:[{name:\"polygon\",type:\"element\",attributes:{class:\"pcb-cutout pcb-cutout-polygon\",points:i.points.map(a=\u003ehn(n,[a.x,a.y])).map(a=\u003e`${a[0]},${a[1]}`).join(\" \"),fill:o.drill,\"data-type\":\"pcb_cutout\",\"data-pcb-layer\":\"drill\"},children:[],value:\"\"}]}return[]}function vVo(t,e){const{transform:n,colorMap:o}=e;if(!t.route||!Array.isArray(t.route))return[];const i=t.route[0],r=t.route[t.route.length-1],s=i\u0026\u0026r\u0026\u0026i.x===r.x\u0026\u0026i.y===r.y;return[{name:\"path\",type:\"element\",attributes:{class:\"pcb-cutout pcb-cutout-path\",d:t.route.slice(0,s?-1:void 0).map((A,c)=\u003e{const[l,u]=hn(n,[A.x,A.y]);return c===0?`M ${l} ${u}`:`L ${l} ${u}`}).join(\" \")+(s?\" Z\":\"\"),fill:o.drill,\"data-type\":\"pcb_cutout_path\",\"data-pcb-cutout-id\":t.pcb_cutout_id,\"data-pcb-layer\":\"drill\"},value:\"\",children:[]}]}var nUt=\"pcb-keepout-pattern\",fG=20,wVo=5,oUt=\"rgba(255, 107, 107, 0.2)\";function PVo(t){const e=[];for(let n=-fG;n\u003c=fG;n+=wVo)e.push({name:\"line\",type:\"element\",value:\"\",attributes:{x1:n.toString(),y1:\"0\",x2:(n+fG).toString(),y2:fG.toString(),stroke:t,\"stroke-width\":\"1\"},children:[]});return e}function MVo(t){return{name:\"defs\",type:\"element\",value:\"\",attributes:{},children:[{name:\"pattern\",type:\"element\",value:\"\",attributes:{id:nUt,width:fG.toString(),height:fG.toString(),patternUnits:\"userSpaceOnUse\"},children:PVo(t)}]}}function iUt(t,e,n,o){const i={class:`pcb-keepout ${n} pcb-keepout-background`,\"data-type\":\"pcb_keepout\",\"data-pcb-layer\":e,\"data-pcb-keepout-id\":t,stroke:\"none\"};return o\u0026\u0026(i[\"data-description\"]=o),i}function rUt(t,e,n,o){const i={class:`pcb-keepout ${n} pcb-keepout-pattern`,fill:`url(#${nUt})`,\"data-type\":\"pcb_keepout\",\"data-pcb-layer\":e,\"data-pcb-keepout-id\":t,stroke:\"none\"};return o\u0026\u0026(i[\"data-description\"]=o),i}function DVo(t,e){const{transform:n,layer:o,colorMap:i}=e;if(o\u0026\u0026!t.layers.includes(o))return[];const r=[];i.keepout;for(const s of t.layers)if(!(o\u0026\u0026s!==o)){if(t.shape===\"rect\"){const a=t,[A,c]=hn(n,[a.center.x,a.center.y]),l=a.width*Math.abs(n.a),u=a.height*Math.abs(n.d),g=$b(m0(of(A,c))),h={...iUt(a.pcb_keepout_id,s,\"pcb-keepout-rect\",a.description),x:(-l/2).toString(),y:(-u/2).toString(),width:l.toString(),height:u.toString(),fill:oUt,transform:g},d={...rUt(a.pcb_keepout_id,s,\"pcb-keepout-rect\",a.description),x:(-l/2).toString(),y:(-u/2).toString(),width:l.toString(),height:u.toString(),transform:g};r.push({name:\"rect\",type:\"element\",attributes:h,children:[],value:\"\"},{name:\"rect\",type:\"element\",attributes:d,children:[],value:\"\"})}else if(t.shape===\"circle\"){const a=t,[A,c]=hn(n,[a.center.x,a.center.y]),l=a.radius*Math.abs(n.a),u={...iUt(a.pcb_keepout_id,s,\"pcb-keepout-circle\",a.description),cx:A.toString(),cy:c.toString(),r:l.toString(),fill:oUt},g={...rUt(a.pcb_keepout_id,s,\"pcb-keepout-circle\",a.description),cx:A.toString(),cy:c.toString(),r:l.toString()};r.push({name:\"circle\",type:\"element\",attributes:u,children:[],value:\"\"},{name:\"circle\",type:\"element\",attributes:g,children:[],value:\"\"})}}return r}function NVo({elementType:t,shapeAttributes:e,layer:n,colorMap:o,additionalAttributes:i}){const r={class:\"pcb-soldermask-cutout\",fill:o.substrate,\"data-type\":\"pcb_soldermask_opening\",\"data-pcb-layer\":n,...e,...i};return{name:t,type:\"element\",value:\"\",children:[],attributes:r}}function RVo(t,e){const{transform:n,layer:o,colorMap:i,showSolderMask:r}=e,{layer:s}=t;if(o\u0026\u0026s!==o)return[];const a=VYt(t,n);if(!a)return[];const{elementType:A,shapeAttributes:c}=a,l=Fx(s,i),u=\"0.5\",g=t.covered_with_solder_mask!==!1,h=s===\"bottom\"?i.soldermaskOverCopper.bottom:i.soldermaskOverCopper.top,d=\"0.9\",p={name:A,type:\"element\",value:\"\",children:[],attributes:{class:`pcb-copper-pour pcb-copper-pour-${t.shape}`,...c,fill:l,\"fill-opacity\":u,\"data-type\":\"pcb_copper_pour\",\"data-pcb-layer\":s}},m=r?g?UYt({elementType:A,shapeAttributes:c,layer:s,fillColor:h,fillOpacity:d,className:\"pcb-soldermask-covered-pour\"}):NVo({elementType:A,shapeAttributes:c,layer:s,colorMap:i}):null;return m?!g\u0026\u0026t.pcb_copper_pour_id?.includes(\"substrate_only\")?[m]:[p,m]:[p]}function sUt(t,e){const{transform:n,layer:o}=e;if(o\u0026\u0026t.layer!==o)return[];const[i,r]=hn(n,[t.x,t.y]);if(t.shape===\"rect\"||t.shape===\"rotated_rect\"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d);return t.shape===\"rotated_rect\"\u0026\u0026t.ccw_rotation?[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-solder-paste\",fill:hG(t.layer),x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),transform:`translate(${i} ${r}) rotate(${-t.ccw_rotation})`,\"data-type\":\"pcb_solder_paste\",\"data-pcb-layer\":t.layer}}]:[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-solder-paste\",fill:hG(t.layer),x:(i-s/2).toString(),y:(r-a/2).toString(),width:s.toString(),height:a.toString(),\"data-type\":\"pcb_solder_paste\",\"data-pcb-layer\":t.layer}}]}if(t.shape===\"pill\"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d),A=t.radius*Math.abs(n.a);return[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-solder-paste\",fill:hG(t.layer),x:(i-s/2).toString(),y:(r-a/2).toString(),width:s.toString(),height:a.toString(),rx:A.toString(),\"data-type\":\"pcb_solder_paste\",\"data-pcb-layer\":t.layer}}]}if(t.shape===\"rotated_pill\"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d),A=t.radius*Math.abs(n.a);return[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-solder-paste\",fill:hG(t.layer),x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),rx:A.toString(),transform:`translate(${i} ${r}) rotate(${-t.ccw_rotation})`,\"data-type\":\"pcb_solder_paste\",\"data-pcb-layer\":t.layer}}]}if(t.shape===\"oval\"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d);return[{name:\"ellipse\",type:\"element\",attributes:{class:\"pcb-solder-paste\",fill:hG(t.layer),cx:i.toString(),cy:r.toString(),rx:(s/2).toString(),ry:(a/2).toString(),\"data-type\":\"pcb_solder_paste\",\"data-pcb-layer\":t.layer}}]}if(t.shape===\"circle\"){const s=t.radius*Math.abs(n.a);return[{name:\"circle\",type:\"element\",attributes:{class:\"pcb-solder-paste\",fill:hG(t.layer),cx:i.toString(),cy:r.toString(),r:s.toString(),\"data-type\":\"pcb_solder_paste\",\"data-pcb-layer\":t.layer}}]}}var TVo=\"rgba(255, 255, 255, 0.5)\",aUt=\"pcb-grid-pattern\";function kVo({grid:t,svgWidth:e,svgHeight:n}){if(!t)return{};const o=t.lineColor??TVo,i=t.cellSize,r=t.majorCellSize,s=t.majorLineColor??o;if(r!==void 0){if(!i||i\u003c=0)throw new Error(\"grid.majorCellSize requires a positive grid.cellSize\");if(r\u003c=0)throw new Error(\"grid.majorCellSize must be a positive multiple of grid.cellSize\");const u=r/i,g=Math.round(u);if(!Number.isFinite(u)||Math.abs(u-g)\u003e1e-6)throw new Error(\"grid.majorCellSize must be a positive multiple of grid.cellSize\")}if(!i||i\u003c=0)return{};const a=r!==void 0,A=a?FVo(i,r,o,s):[{name:\"path\",type:\"element\",value:\"\",attributes:{d:`M ${i} 0 L 0 0 0 ${i}`,fill:\"none\",stroke:o,\"stroke-width\":\"1\",\"shape-rendering\":\"crispEdges\"},children:[]}],c={name:\"defs\",type:\"element\",value:\"\",attributes:{},children:[{name:\"pattern\",type:\"element\",value:\"\",attributes:{id:aUt,width:a?r.toString():i.toString(),height:a?r.toString():i.toString(),patternUnits:\"userSpaceOnUse\"},children:A}]},l={name:\"rect\",type:\"element\",value:\"\",attributes:{x:\"0\",y:\"0\",width:e.toString(),height:n.toString(),fill:`url(#${aUt})`,\"pointer-events\":\"none\",\"data-type\":\"pcb_grid\",\"data-pcb-layer\":\"global\"},children:[]};return{defs:c,rect:l}}function FVo(t,e,n,o){const i=[],r=Math.round(e/t);for(let s=0;s\u003cr;s+=1){const A=Number((s*t).toFixed(6)).toString(),c=s===0?o:n,l=e.toString();i.push({name:\"line\",type:\"element\",value:\"\",attributes:{x1:A,y1:\"0\",x2:A,y2:l,stroke:c,\"stroke-width\":\"1\",\"shape-rendering\":\"crispEdges\"},children:[]}),i.push({name:\"line\",type:\"element\",value:\"\",attributes:{x1:\"0\",y1:A,x2:l,y2:A,stroke:c,\"stroke-width\":\"1\",\"shape-rendering\":\"crispEdges\"},children:[]})}return i}function LVo(t,e){const{transform:n,circuitJson:o}=e,{center:i,width:r,height:s,rotation:a=0}=t,[A,c]=hn(n,[i.x,i.y]),l=r*Math.abs(n.a),u=s*Math.abs(n.d),g=`translate(${A}, ${c}) rotate(${-a}) scale(1, -1)`,h=[];if(e.showAnchorOffsets\u0026\u0026o\u0026\u0026t.position_mode===\"relative_to_group_anchor\"\u0026\u0026(t.positioned_relative_to_pcb_group_id||t.positioned_relative_to_pcb_board_id)){const d=HVo(t,o);d\u0026\u0026h.push(...SRe({groupAnchorPosition:d,componentPosition:i,transform:n,componentWidth:r,componentHeight:s,displayXOffset:t.display_offset_x,displayYOffset:t.display_offset_y}))}return!e.colorMap.debugComponent?.fill\u0026\u0026!e.colorMap.debugComponent?.stroke||h.push({name:\"g\",type:\"element\",attributes:{transform:g,\"data-type\":\"pcb_component\",\"data-pcb-layer\":t.layer??\"top\"},children:[{name:\"rect\",type:\"element\",attributes:{class:\"pcb-component\",x:(-l/2).toString(),y:(-u/2).toString(),width:l.toString(),height:u.toString(),fill:e.colorMap.debugComponent.fill??\"transparent\",stroke:e.colorMap.debugComponent.stroke??\"transparent\",\"data-type\":\"pcb_component\",\"data-pcb-layer\":t.layer??\"top\"}}],value:\"\"}),h}function HVo(t,e){if(t.positioned_relative_to_pcb_group_id){const n=e.find(i=\u003ei.type===\"pcb_group\"\u0026\u0026i.pcb_group_id===t.positioned_relative_to_pcb_group_id),o=fq(n);if(o)return o}if(t.positioned_relative_to_pcb_board_id){const n=e.find(i=\u003ei.type===\"pcb_board\"\u0026\u0026i.pcb_board_id===t.positioned_relative_to_pcb_board_id),o=fq(n);if(o)return o}}var AUt=[\"rgba(100, 200, 255, 0.6)\",\"rgba(255, 150, 100, 0.6)\",\"rgba(100, 255, 150, 0.6)\",\"rgba(200, 100, 255, 0.6)\",\"rgba(255, 220, 100, 0.6)\",\"rgba(255, 100, 200, 0.6)\",\"rgba(100, 255, 255, 0.6)\",\"rgba(180, 255, 100, 0.6)\"],OVo=.1;function GVo(t,e){const{transform:n,circuitJson:o}=e,{center:i,width:r,height:s}=t,a=[];if(e.showAnchorOffsets\u0026\u0026t.position_mode===\"relative_to_group_anchor\"\u0026\u0026o){const B=UVo(t,o);B\u0026\u0026a.push(...SRe({groupAnchorPosition:B,componentPosition:t.anchor_position??t.center,transform:n,componentWidth:t.width,componentHeight:t.height,displayXOffset:t.display_offset_x,displayYOffset:t.display_offset_y}))}const A=Array.isArray(t.outline)?t.outline:void 0,c=OVo*Math.abs(n.a),l=.3*Math.abs(n.a),u=.15*Math.abs(n.a),g={class:\"pcb-group\",fill:\"none\",stroke:YVo(t.pcb_group_id),\"stroke-width\":c.toString(),\"stroke-dasharray\":`${l} ${u}`,\"data-type\":\"pcb_group\",\"data-pcb-group-id\":t.pcb_group_id,\"data-pcb-layer\":\"overlay\"};if(t.name\u0026\u0026(g[\"data-group-name\"]=t.name),A\u0026\u0026A.length\u003e=3\u0026\u0026A.every(B=\u003eB\u0026\u0026typeof B.x==\"number\"\u0026\u0026typeof B.y==\"number\")){const B=A.map((S,Q)=\u003e{const[w,M]=hn(n,[S.x,S.y]);return Q===0?`M ${w} ${M}`:`L ${w} ${M}`}).join(\" \");return a.push({name:\"path\",type:\"element\",value:\"\",children:[],attributes:{...g,d:`${B} Z`}}),a}if(!i||typeof i.x!=\"number\"||typeof i.y!=\"number\"||typeof r!=\"number\"||typeof s!=\"number\")return cm(`[pcb_group] Invalid data for \"${t.pcb_group_id}\"${t.name?` (name: \"${t.name}\")`:\"\"}: expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(i)}, width=${JSON.stringify(r)}, height=${JSON.stringify(s)}`),a;const h=r/2,d=s/2,[p,m]=hn(n,[i.x-h,i.y+d]),[_,f]=hn(n,[i.x+h,i.y-d]),I=Math.min(p,_),C=Math.min(m,f),y=Math.abs(_-p),x=Math.abs(f-m),E={name:\"rect\",type:\"element\",value:\"\",attributes:{...g,x:I.toString(),y:C.toString(),width:y.toString(),height:x.toString()},children:[]};return a.push(E),a}function YVo(t){const e=t.match(/(\\d+)$/),n=e?Number.parseInt(e[1],10):0;return AUt[n%AUt.length]}function UVo(t,e){if(t.positioned_relative_to_pcb_group_id){const n=e.find(i=\u003ei.type===\"pcb_group\"\u0026\u0026i.pcb_group_id===t.positioned_relative_to_pcb_group_id),o=fq(n);if(o)return o}if(t.positioned_relative_to_pcb_board_id){const n=e.find(i=\u003ei.type===\"pcb_board\"\u0026\u0026i.pcb_board_id===t.positioned_relative_to_pcb_board_id),o=fq(n);if(o)return o}}function Gw(t){return t.find(n=\u003en.type===\"project_software_metadata\"||n.type===\"source_project_metadata\")?.software_used_string}var KVo={version:\"0.0.420\"},Yw=KVo.version,VVo={pcb_background:0,pcb_boundary:1,pcb_panel:5,pcb_board:10,pcb_cutout:15,pcb_cutout_path:15,pcb_keepout:16,pcb_hole:18,pcb_plated_hole_drill:19,pcb_plated_hole:20,pcb_trace_soldermask:25,pcb_trace:30,pcb_smtpad:30,pcb_copper_pour:35,pcb_via:36,pcb_soldermask:40,pcb_soldermask_opening:25,pcb_solder_paste:45,pcb_silkscreen_text:50,pcb_silkscreen_path:50,pcb_silkscreen_graphic:50,pcb_silkscreen_rect:50,pcb_silkscreen_circle:50,pcb_silkscreen_line:50,pcb_silkscreen_oval:50,pcb_silkscreen_pill:50,pcb_component:60,pcb_pad_pin_number:65,pcb_fabrication_note_text:70,pcb_fabrication_note_path:70,pcb_fabrication_note_rect:70,pcb_fabrication_note_dimension:70,pcb_note_dimension:70,pcb_note_text:70,pcb_note_rect:70,pcb_note_path:70,pcb_note_line:70,pcb_trace_error:80,pcb_footprint_overlap_error:80,pcb_component_outside_board_error:80,pcb_pad_trace_clearance_error:80,pcb_via_trace_clearance_error:80,pcb_connector_not_in_accessible_orientation_warning:80,pcb_manual_edit_conflict_warning:80,pcb_rats_nest:85,pcb_debug_object:90},cUt=100;function zVo(t){return t.map((e,n)=\u003e({object:e,index:n,layerPriority:JVo(e.attributes?.[\"data-pcb-layer\"]??void 0),typePriority:WVo(e.attributes?.[\"data-type\"]??void 0)})).sort((e,n)=\u003ee.layerPriority!==n.layerPriority?e.layerPriority-n.layerPriority:e.typePriority!==n.typePriority?e.typePriority-n.typePriority:e.index-n.index).map(({object:e})=\u003ee)}function JVo(t){if(!t)return 500;const e=t.toLowerCase();if(e===\"global\")return-100;if(e===\"bottom\")return 4;if(e===\"board\")return 2;if(e===\"soldermask-top\"||e===\"soldermask-bottom\")return 3;if(e.startsWith(\"inner\")){const n=e.match(/\\d+/);return 5+(n?Number.parseInt(n[0],10):0)}return e===\"through\"?18:e===\"top\"?17:e===\"drill\"?30:e===\"overlay\"?40:10}function WVo(t){return t?VVo[t]??cUt:cUt}function IG(t,e=\"error_text_overlay\"){const n=t.filter(r=\u003er.type.endsWith(\"_error\"));if(n.length===0)return null;const o=n.map(r=\u003er.message).filter(r=\u003e!!r);return o.length===0?null:{name:\"text\",type:\"element\",value:\"\",attributes:{x:\"10\",y:\"20\",fill:\"red\",\"font-family\":\"monospace\",\"font-size\":\"12px\",\"data-type\":e,\"data-layer\":\"global\"},children:o.map((r,s)=\u003e({name:\"tspan\",type:\"element\",value:\"\",attributes:{x:\"10\",dy:s===0?\"0\":\"1.2em\"},children:[{type:\"text\",value:r,name:\"\",attributes:{},children:[]}]}))}}function jVo({anchorPosition:t,textWidth:e,textHeight:n,anchorAlignment:o}){switch(o){case\"top_left\":return{x:t.x+e/2,y:t.y+n/2};case\"top_center\":return{x:t.x,y:t.y+n/2};case\"top_right\":return{x:t.x-e/2,y:t.y+n/2};case\"center_left\":return{x:t.x+e/2,y:t.y};case\"center_right\":return{x:t.x-e/2,y:t.y};case\"bottom_left\":return{x:t.x+e/2,y:t.y-n/2};case\"bottom_center\":return{x:t.x,y:t.y-n/2};case\"bottom_right\":return{x:t.x-e/2,y:t.y-n/2};default:return t}}function $Vo(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=!1,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=!1;for(const I of t)if(I.type===\"pcb_panel\"){const C=I,y=lt.parse(C.width),x=lt.parse(C.height);if(y===void 0||x===void 0)continue;const E=C.center??{x:y/2,y:x/2};u({center:E,width:y,height:x})}else if(I.type===\"pcb_board\")I.outline\u0026\u0026Array.isArray(I.outline)\u0026\u0026I.outline.length\u003e=3?(h(I.outline),d(I.outline)):\"center\"in I\u0026\u0026\"width\"in I\u0026\u0026\"height\"in I\u0026\u0026(u({center:I.center,width:I.width,height:I.height}),g({center:I.center,width:I.width,height:I.height}));else if(I.type===\"pcb_courtyard_rect\")u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.ccw_rotation});else if(I.type===\"pcb_smtpad\"){const C=I;if(C.shape===\"rect\"||C.shape===\"pill\")u({center:{x:C.x,y:C.y},width:C.width,height:C.height});else if(C.shape===\"rotated_rect\"||C.shape===\"rotated_pill\")u({center:{x:C.x,y:C.y},width:C.width,height:C.height,ccwRotationDegrees:C.ccw_rotation});else if(C.shape===\"circle\"){const y=lt.parse(C.radius);y!==void 0\u0026\u0026u({center:{x:C.x,y:C.y},width:y*2,height:y*2})}else C.shape===\"polygon\"\u0026\u0026p(C.points)}else if(I.type===\"pcb_via\"){const C=lt.parse(I.outer_diameter);u({center:{x:I.x,y:I.y},width:C??0,height:C??0})}else if(I.type===\"pcb_plated_hole\"){const C=I,y={x:C.x,y:C.y};if(C.shape===\"circle\"){const x=lt.parse(C.outer_diameter);u({center:y,width:x??0,height:x??0})}else C.shape===\"oval\"||C.shape===\"pill\"?u({center:y,width:C.outer_width,height:C.outer_height}):C.shape===\"circular_hole_with_rect_pad\"||C.shape===\"pill_hole_with_rect_pad\"?u({center:y,width:C.rect_pad_width,height:C.rect_pad_height}):C.shape===\"rotated_pill_hole_with_rect_pad\"?u({center:y,width:C.rect_pad_width,height:C.rect_pad_height,ccwRotationDegrees:C.rect_ccw_rotation}):C.shape===\"hole_with_polygon_pad\"\u0026\u0026p((C.pad_outline??[]).map(x=\u003e({x:C.x+x.x,y:C.y+x.y})))}else if(I.type===\"pcb_hole\"){const C=I,y={x:C.x,y:C.y};if(C.hole_shape===\"circle\"||C.hole_shape===\"square\"){const x=lt.parse(C.hole_diameter);u({center:y,width:x??0,height:x??0})}else C.hole_shape===\"rotated_pill\"?u({center:y,width:C.hole_width,height:C.hole_height,ccwRotationDegrees:C.ccw_rotation}):(C.hole_shape===\"oval\"||C.hole_shape===\"rect\"||C.hole_shape===\"pill\")\u0026\u0026u({center:y,width:C.hole_width,height:C.hole_height})}else if(I.type===\"pcb_note_line\")p([{x:I.x1,y:I.y1},{x:I.x2,y:I.y2}]);else if(\"x\"in I\u0026\u0026\"y\"in I)u({center:{x:I.x,y:I.y},width:0,height:0});else if(\"route\"in I)p(I.route);else if(I.type===\"pcb_note_rect\"||I.type===\"pcb_fabrication_note_rect\")u({center:I.center,width:I.width,height:I.height});else if(I.type===\"pcb_note_dimension\"||I.type===\"pcb_fabrication_note_dimension\"){const C=I,{from:y,to:x,text:E,font_size:B=1,arrow_size:S,offset_distance:Q,offset_direction:w}=C;if(!y||!x||!S)continue;u({center:y,width:0,height:0}),u({center:x,width:0,height:0});const M=ye=\u003e{const Me=Math.hypot(ye.x,ye.y)||1;return{x:ye.x/Me,y:ye.y/Me}},k=M({x:x.x-y.x,y:x.y-y.y});if(Number.isNaN(k.x)||Number.isNaN(k.y))continue;const R={x:-k.y,y:k.x},F=w\u0026\u0026typeof w.x==\"number\"\u0026\u0026typeof w.y==\"number\",O=F?M(w):{x:0,y:0},U=typeof Q==\"number\"?Q:0,Y={x:O.x*U,y:O.y*U},W={x:y.x+Y.x,y:y.y+Y.y},te={x:x.x+Y.x,y:x.y+Y.y};u({center:W,width:0,height:0}),u({center:te,width:0,height:0});const j=F\u0026\u0026(Math.abs(O.x)\u003eNumber.EPSILON||Math.abs(O.y)\u003eNumber.EPSILON)?O:R,J=U+S,oe={x:y.x+j.x*J,y:y.y+j.y*J},ie={x:x.x+j.x*J,y:x.y+j.y*J};u({center:oe,width:0,height:0}),u({center:ie,width:0,height:0});const ne=S/2,le={x:W.x+k.x*S,y:W.y+k.y*S},ge={x:te.x-k.x*S,y:te.y-k.y*S},_e={x:le.x+R.x*ne,y:le.y+R.y*ne},ue={x:le.x-R.x*ne,y:le.y-R.y*ne};u({center:_e,width:0,height:0}),u({center:ue,width:0,height:0});const fe={x:ge.x+R.x*ne,y:ge.y+R.y*ne},pe={x:ge.x-R.x*ne,y:ge.y-R.y*ne};if(u({center:fe,width:0,height:0}),u({center:pe,width:0,height:0}),E){const ye={x:(y.x+x.x)/2+Y.x,y:(y.y+x.y)/2+Y.y},Me=S*1.5,ve={x:ye.x+R.x*Me,y:ye.y+R.y*Me},he=E.length*B*.6;u({center:ve,width:he,height:B})}}else if(I.type===\"pcb_note_text\"||I.type===\"pcb_fabrication_note_text\")_({text:I.text,anchorPosition:I.anchor_position,fontSize:I.font_size,anchorAlignment:I.anchor_alignment,ccwRotationDegrees:I.type===\"pcb_fabrication_note_text\"?I.ccw_rotation??1:0});else if(I.type===\"pcb_cutout\"){const C=I;if(C.shape===\"rect\")u({center:C.center,width:C.width,height:C.height,ccwRotationDegrees:C.rotation});else if(C.shape===\"circle\"){const y=lt.parse(C.radius);y!==void 0\u0026\u0026u({center:C.center,width:y*2,height:y*2})}else if(C.shape===\"polygon\")p(C.points);else if(C.shape===\"path\"){const y=C;y.route\u0026\u0026Array.isArray(y.route)\u0026\u0026p(y.route)}}else if(I.type===\"pcb_keepout\"){const C=I;if(C.shape===\"rect\")u({center:C.center,width:C.width,height:C.height});else if(C.shape===\"circle\"){const y=typeof C.radius==\"number\"?C.radius:lt.parse(C.radius)??0;y\u003e0\u0026\u0026u({center:C.center,width:y*2,height:y*2})}}else I.type===\"pcb_silkscreen_graphic\"||I.type===\"pcb_silkscreen_text\"||I.type===\"pcb_silkscreen_rect\"||I.type===\"pcb_silkscreen_circle\"||I.type===\"pcb_silkscreen_line\"||I.type===\"pcb_silkscreen_oval\"||I.type===\"pcb_silkscreen_pill\"?f(I):I.type===\"pcb_copper_text\"?u({center:I.anchor_position,width:0,height:0}):I.type===\"pcb_copper_pour\"\u0026\u0026(I.shape===\"rect\"?u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.rotation}):I.shape===\"polygon\"?p(I.points):I.shape===\"brep\"\u0026\u0026p(I.brep_shape.outer_ring.vertices));return{minX:e,minY:n,maxX:o,maxY:i,boardMinX:s,boardMinY:a,boardMaxX:A,boardMaxY:c,hasBounds:r,hasBoardBounds:l};function u({center:I,width:C,height:y,ccwRotationDegrees:x}){if(!I)return;const E=lt.parse(I.x),B=lt.parse(I.y);if(E===void 0||B===void 0)return;const S=lt.parse(C)??0,Q=lt.parse(y)??0;let w=S/2,M=Q/2;if(typeof x==\"number\"\u0026\u0026x!==0){const k=x*Math.PI/180,R=Math.abs(Math.cos(k)),F=Math.abs(Math.sin(k)),O=w*R+M*F,U=w*F+M*R;w=O,M=U}e=Math.min(e,E-w),n=Math.min(n,B-M),o=Math.max(o,E+w),i=Math.max(i,B+M),r=!0}function g({center:I,width:C,height:y}){if(!I)return;const x=lt.parse(I.x),E=lt.parse(I.y);if(x===void 0||E===void 0)return;const B=lt.parse(C)??0,S=lt.parse(y)??0,Q=B/2,w=S/2;s=Math.min(s,x-Q),a=Math.min(a,E-w),A=Math.max(A,x+Q),c=Math.max(c,E+w),r=!0,l=!0}function h(I){let C=!1;for(const y of I){const x=lt.parse(y.x),E=lt.parse(y.y);x===void 0||E===void 0||(e=Math.min(e,x),n=Math.min(n,E),o=Math.max(o,x),i=Math.max(i,E),C=!0)}C\u0026\u0026(r=!0)}function d(I){let C=!1;for(const y of I){const x=lt.parse(y.x),E=lt.parse(y.y);x===void 0||E===void 0||(s=Math.min(s,x),a=Math.min(a,E),A=Math.max(A,x),c=Math.max(c,E),C=!0)}C\u0026\u0026(r=!0,l=!0)}function p(I){let C=!1;for(const y of I)for(const x of m(y)){const E=lt.parse(x.x),B=lt.parse(x.y);E===void 0||B===void 0||(e=Math.min(e,E),n=Math.min(n,B),o=Math.max(o,E),i=Math.max(i,B),C=!0)}C\u0026\u0026(r=!0)}function m(I){return\"route_type\"in I?qKo(I):[I]}function _({text:I,anchorPosition:C,fontSize:y=1,anchorAlignment:x=\"center\",ccwRotationDegrees:E=0}){if(!I||!C)return;const B=I.split(`\n`),Q=Math.max(...B.map(k=\u003ek.length),0)*y*.6,w=Math.max(B.length,1)*y,M=jVo({anchorPosition:C,textWidth:Q,textHeight:w,anchorAlignment:x});u({center:M,width:Q,height:w,ccwRotationDegrees:E})}function f(I){if(I.type===\"pcb_silkscreen_text\")u({center:I.anchor_position,width:0,height:0});else if(I.type===\"pcb_silkscreen_graphic\"){for(const C of I.brep_shape.outer_ring.vertices)u({center:{x:C.x,y:C.y},width:0,height:0});for(const C of I.brep_shape.inner_rings??[])for(const y of C.vertices)u({center:{x:y.x,y:y.y},width:0,height:0})}else if(I.type===\"pcb_silkscreen_path\")p(I.route);else if(I.type===\"pcb_silkscreen_rect\")u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.ccw_rotation});else if(I.type===\"pcb_silkscreen_circle\"){const C=lt.parse(I.radius);C!==void 0\u0026\u0026u({center:I.center,width:C*2,height:C*2})}else if(I.type===\"pcb_silkscreen_line\")u({center:{x:I.x1,y:I.y1},width:0,height:0}),u({center:{x:I.x2,y:I.y2},width:0,height:0});else if(I.type===\"pcb_silkscreen_oval\"){const C=lt.parse(I.radius_x),y=lt.parse(I.radius_y);C!==void 0\u0026\u0026y!==void 0\u0026\u0026u({center:I.center,width:C*2,height:y*2})}else if(I.type===\"pcb_silkscreen_pill\")u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.ccw_rotation});else if(I.type===\"pcb_cutout\"){const C=I;if(C.shape===\"rect\")u({center:C.center,width:C.width,height:C.height,ccwRotationDegrees:C.rotation});else if(C.shape===\"circle\"){const y=lt.parse(C.radius);y!==void 0\u0026\u0026u({center:C.center,width:y*2,height:y*2})}else if(C.shape===\"polygon\")p(C.points);else if(C.shape===\"path\"){const y=C;y.route\u0026\u0026Array.isArray(y.route)\u0026\u0026p(y.route)}}}}var qVo=({circuitJson:t,drawPaddingOutsideBoard:e,baseBounds:n,viewportOptions:o})=\u003e{let i=e?1:0,r=e||!n.hasBoardBounds?n.minX:n.boardMinX,s=e||!n.hasBoardBounds?n.minY:n.boardMinY,a=e||!n.hasBoardBounds?n.maxX:n.boardMaxX,A=e||!n.hasBoardBounds?n.maxY:n.boardMaxY,c=!1,l=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;const d=new Map,p=new Map;for(const m of t)if(m.type===\"pcb_panel\"){const _=m,f=lUt(_.center,_.width,_.height);if(!f)continue;l=Math.min(l,f.minX),u=Math.min(u,f.minY),g=Math.max(g,f.maxX),h=Math.max(h,f.maxY),c=!0,_.pcb_panel_id\u0026\u0026d.set(_.pcb_panel_id,f)}else if(m.type===\"pcb_board\"){const _=m,I=XVo(_.outline)??lUt(_.center,_.width,_.height);I\u0026\u0026_.pcb_board_id\u0026\u0026p.set(_.pcb_board_id,I)}if(o?.viewport){const{minX:m,minY:_,maxX:f,maxY:I}=o.viewport;r=m,s=_,a=f,A=I,i=0}else if(o?.viewportTarget?.pcb_panel_id){const m=d.get(o.viewportTarget.pcb_panel_id);if(!m)throw new Error(`Viewport target panel '${o.viewportTarget.pcb_panel_id}' not found`);r=m.minX,s=m.minY,a=m.maxX,A=m.maxY,i=0}else if(o?.viewportTarget?.pcb_board_id){const m=p.get(o.viewportTarget.pcb_board_id);if(!m)throw new Error(`Viewport target board '${o.viewportTarget.pcb_board_id}' not found`);r=m.minX,s=m.minY,a=m.maxX,A=m.maxY,i=0}else c\u0026\u0026(r=l,s=u,a=g,A=h);return{boundsMinX:r,boundsMinY:s,boundsMaxX:a,boundsMaxY:A,padding:i}};function lUt(t,e,n){if(!t||e===void 0||n===void 0)return;const o=lt.parse(t.x),i=lt.parse(t.y);if(o===void 0||i===void 0)return;const r=lt.parse(e),s=lt.parse(n);if(r===void 0||s===void 0)return;const a=r/2,A=s/2;return{minX:o-a,minY:i-A,maxX:o+a,maxY:i+A}}function XVo(t){if(!t||t.length\u003c3)return;let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){const s=lt.parse(r.x),a=lt.parse(r.y);s===void 0||a===void 0||(e=Math.min(e,s),n=Math.min(n,a),o=Math.max(o,s),i=Math.max(i,a))}if(!(!Number.isFinite(e)||!Number.isFinite(n))\u0026\u0026!(!Number.isFinite(o)||!Number.isFinite(i)))return{minX:e,minY:n,maxX:o,maxY:i}}var ZVo=.5,ezo=.42,tzo=.58,nzo=.75;function uUt(t,e){if(!e.showPinNumbers)return[];if(t.type===\"pcb_smtpad\"){if(e.layer\u0026\u0026t.layer!==e.layer)return[]}else if(e.layer\u0026\u0026!t.layers.includes(e.layer))return[];const n=_Ko(t,e.circuitJson);if(!n)return[];const o=ozo(t);if(!o||o.width\u003c=0||o.height\u003c=0)return[];const i=Math.abs(e.transform.a),r=Math.min(ZVo,o.height*ezo,o.width*nzo/(n.length*tzo));if(r\u003c=0)return[];const[s,a]=hn(e.transform,[o.centerX,o.centerY]),A=t.type===\"pcb_smtpad\"?t.layer:\"through\",c=o.ccwRotation?`rotate(${-o.ccwRotation} ${s} ${a})`:void 0;return[{name:\"text\",type:\"element\",value:\"\",attributes:{class:\"pcb-pad-pin-number\",x:s.toString(),y:a.toString(),fill:\"#b0b0b0\",\"font-family\":\"Arial, sans-serif\",\"font-size\":(r*i).toString(),\"font-weight\":\"500\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"central\",\"pointer-events\":\"none\",\"data-type\":\"pcb_pad_pin_number\",\"data-pcb-layer\":A,\"data-pin-number\":n,...c?{transform:c}:{}},children:[{type:\"text\",value:n,name:\"\",attributes:{},children:[]}]}]}function ozo(t){if(t.type===\"pcb_smtpad\")return t.shape===\"polygon\"?gUt(t.points):t.shape===\"circle\"?{centerX:t.x,centerY:t.y,width:t.radius*2,height:t.radius*2,ccwRotation:0}:{centerX:t.x,centerY:t.y,width:t.width,height:t.height,ccwRotation:t.shape===\"rotated_rect\"||t.shape===\"rotated_pill\"?t.ccw_rotation:0};if(t.shape===\"circle\")return{centerX:t.x,centerY:t.y,width:t.outer_diameter,height:t.outer_diameter,ccwRotation:0};if(t.shape===\"oval\"||t.shape===\"pill\")return{centerX:t.x,centerY:t.y,width:t.outer_width,height:t.outer_height,ccwRotation:t.ccw_rotation};if(t.shape===\"hole_with_polygon_pad\"){const e=gUt(t.pad_outline);return e?{...e,centerX:t.x+e.centerX,centerY:t.y+e.centerY,ccwRotation:0}:void 0}if(\"rect_pad_width\"in t)return{centerX:t.x,centerY:t.y,width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:t.shape===\"rotated_pill_hole_with_rect_pad\"?t.rect_ccw_rotation:t.shape===\"circular_hole_with_rect_pad\"?t.rect_ccw_rotation??0:0}}function gUt(t){if(t.length===0)return;const e=t.map(a=\u003ea.x),n=t.map(a=\u003ea.y),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{centerX:(o+i)/2,centerY:(r+s)/2,width:i-o,height:s-r,ccwRotation:0}}var dUt=\"rgb(255, 208, 66)\";function izo(t,e){return t.map(n=\u003e({...n,attributes:{...n.attributes??{},\"data-type\":e.type,\"data-pcb-layer\":\"overlay\"}}))}function rzo(t,e,n){if(!n.shouldDrawWarnings)return[];const o=e.find(_=\u003e_.type===\"pcb_component\"\u0026\u0026_.pcb_component_id===t.pcb_component_id);if(!o)return[];const i=(o.rotation??0)*Math.PI/180,r=Math.cos(i),s=Math.sin(i),a=o.width/2,A=o.height/2,c=[{x:-a,y:-A},{x:a,y:-A},{x:a,y:A},{x:-a,y:A}].map(_=\u003ehn(n.transform,{x:o.center.x+_.x*r-_.y*s,y:o.center.y+_.x*s+_.y*r})),l=Math.min(...c.map(_=\u003e_.x)),u=Math.min(...c.map(_=\u003e_.y)),g=Math.max(...c.map(_=\u003e_.x)),h=Math.max(...c.map(_=\u003e_.y)),d=g-l,p=h-u,m=l+d/2;return izo([{name:\"rect\",type:\"element\",value:\"\",attributes:{x:l.toString(),y:u.toString(),width:d.toString(),height:p.toString(),fill:\"none\",stroke:dUt,\"stroke-width\":\"2\",\"stroke-dasharray\":\"6,3\"},children:[]},{name:\"text\",type:\"element\",value:\"\",attributes:{x:m.toString(),y:(u-10).toString(),fill:dUt,\"font-family\":\"sans-serif\",\"font-size\":\"12\",\"font-weight\":\"600\",\"text-anchor\":\"middle\"},children:[{type:\"text\",name:\"\",value:t.message,attributes:{},children:[]}]}],t)}var hUt=\"#ff4d4d\",szo=t=\u003e({type:\"text\",value:t,name:\"\",attributes:{},children:[]}),QRe=({label:t,x:e,y:n,style:o,anchor:i=\"start\"})=\u003et?[{name:\"text\",type:\"element\",value:\"\",attributes:{x:e.toString(),y:n.toString(),fill:hUt,\"font-family\":\"monospace\",\"font-size\":o.fontSize.toString(),\"font-weight\":\"600\",\"text-anchor\":i},children:[szo(t)]}]:[],azo=t=\u003e({\"data-type\":\"pcb_debug_object\",\"data-pcb-layer\":\"overlay\",\"data-pcb-debug-object-id\":t.pcb_debug_object_id,\"data-debug-shape\":t.shape});function Azo({debugObject:t,transform:e,style:n,labelStackIndex:o=0}){const i=azo(t),r={fill:\"none\",stroke:hUt,\"stroke-width\":n.strokeWidth.toString(),\"stroke-dasharray\":`${n.dashLength},${n.dashLength}`};if(t.shape===\"rect\"){const A=hn(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),c=hn(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]),l=Math.min(A[0],c[0]),u=Math.min(A[1],c[1]),g=Math.abs(c[0]-A[0]),h=Math.abs(c[1]-A[1]);return[{name:\"g\",type:\"element\",value:\"\",attributes:i,children:[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:l.toString(),y:u.toString(),width:g.toString(),height:h.toString(),...r},children:[]},...QRe({label:t.label,x:l,y:u-n.labelGap-o*(n.fontSize+n.labelGap),style:n})]}]}if(t.shape===\"line\"){const[A,c]=hn(e,[t.start.x,t.start.y]),[l,u]=hn(e,[t.end.x,t.end.y]);return[{name:\"g\",type:\"element\",value:\"\",attributes:i,children:[{name:\"line\",type:\"element\",value:\"\",attributes:{x1:A.toString(),y1:c.toString(),x2:l.toString(),y2:u.toString(),...r},children:[]},...QRe({label:t.label,x:(A+l)/2,y:(c+u)/2-n.labelGap,style:n,anchor:\"middle\"})]}]}const[s,a]=hn(e,[t.center.x,t.center.y]);return[{name:\"g\",type:\"element\",value:\"\",attributes:i,children:[{name:\"circle\",type:\"element\",value:\"\",attributes:{cx:s.toString(),cy:a.toString(),r:n.pointRadius.toString(),...r},children:[]},...QRe({label:t.label,x:s+n.pointRadius+n.labelGap,y:a-n.pointRadius,style:n})]}]}function pUt(t,e){const n=e?.drawPaddingOutsideBoard??!0,o=e?.layer,i=e?.colorOverrides,r={...ch.copper};if(i?.copper)for(const[fe,pe]of Object.entries(i.copper))pe!==void 0\u0026\u0026(r[fe]=pe);const s={copper:r,drill:i?.drill??ch.drill,silkscreen:{top:i?.silkscreen?.top??ch.silkscreen.top,bottom:i?.silkscreen?.bottom??ch.silkscreen.bottom},boardOutline:i?.boardOutline??ch.boardOutline,soldermask:{top:i?.soldermask?.top??ch.soldermask.top,bottom:i?.soldermask?.bottom??ch.soldermask.bottom},soldermaskOverCopper:{top:i?.soldermaskOverCopper?.top??ch.soldermaskOverCopper.top,bottom:i?.soldermaskOverCopper?.bottom??ch.soldermaskOverCopper.bottom},soldermaskWithCopperUnderneath:{top:i?.soldermaskWithCopperUnderneath?.top??ch.soldermaskWithCopperUnderneath.top,bottom:i?.soldermaskWithCopperUnderneath?.bottom??ch.soldermaskWithCopperUnderneath.bottom},substrate:i?.substrate??ch.substrate,courtyard:{top:i?.courtyard?.top??ch.courtyard.top,bottom:i?.courtyard?.bottom??ch.courtyard.bottom},keepout:i?.keepout??ch.keepout,debugComponent:{fill:i?.debugComponent?.fill??ch.debugComponent.fill,stroke:i?.debugComponent?.stroke??ch.debugComponent.stroke}},a=e?.showCourtyards?t:t.filter(fe=\u003efe.type!==\"pcb_courtyard_rect\"),{minX:A,minY:c,maxX:l,maxY:u,boardMinX:g,boardMinY:h,boardMaxX:d,boardMaxY:p,hasBoardBounds:m}=$Vo(a),{boundsMinX:_,boundsMinY:f,boundsMaxX:I,boundsMaxY:C,padding:y}=qVo({circuitJson:t,drawPaddingOutsideBoard:n,baseBounds:{minX:A,minY:c,maxX:l,maxY:u,boardMinX:g,boardMinY:h,boardMaxX:d,boardMaxY:p,hasBoardBounds:m},viewportOptions:{viewport:e?.viewport,viewportTarget:e?.viewportTarget}}),x=I-_+2*y,E=C-f+2*y;let B=e?.width??800,S=e?.height??600;if(e?.matchBoardAspectRatio){const fe=I-_,pe=C-f;if(fe\u003e0\u0026\u0026pe\u003e0){const ye=fe/pe;e?.width\u0026\u0026!e?.height?S=e.width/ye:e?.height\u0026\u0026!e?.width?B=e.height*ye:S=B/ye}}const Q=[];for(const fe of t)\"route\"in fe\u0026\u0026fe.route!==void 0\u0026\u0026Q.push(fe.route);const w=B/x,M=S/E,k=Math.min(w,M),R=(B-x*k)/2,F=(S-E*k)/2,O=m0(of(R-_*k+y*k,S-F+f*k-y*k),kx(k,-k)),U=Math.min(B,S),Y=Math.max(1,Math.min(2,U*.002)),W=Math.max(10,Math.min(18,U*.02)),te={transform:O,layer:o,shouldDrawErrors:e?.shouldDrawErrors,shouldDrawWarnings:e?.shouldDrawWarnings,showCourtyards:e?.showCourtyards,showPcbGroups:e?.showPcbGroups,drawPaddingOutsideBoard:n,colorMap:s,showSolderMask:e?.showSolderMask,showSolderPaste:e?.showSolderPaste,showPcbNotes:e?.showPcbNotes??!0,showDebugObjects:e?.showDebugObjects,debugObjectStyle:{fontSize:W,strokeWidth:Y,dashLength:Y*4,labelGap:W*.35,pointRadius:Y*3},showAnchorOffsets:e?.showAnchorOffsets,showPinNumbers:e?.showPinNumbers,circuitJson:t,usedCopperPourTraceMaskIds:new Set};let j=t.flatMap(fe=\u003eczo({elm:fe,circuitJson:t,ctx:te}));for(const fe of t)if(\"stroke_width\"in fe){String(k*fe.stroke_width);break}if(e?.shouldDrawRatsNest){const fe=SVo(t,te);j=[...j,...fe]}const J=iVo(zVo(j)),oe=[{name:\"style\",type:\"element\",value:\"\",attributes:{},children:[{type:\"text\",value:\"\",name:\"\",attributes:{},children:[]}]}],ie=kVo({grid:e?.grid,svgWidth:B,svgHeight:S});ie.defs\u0026\u0026oe.push(ie.defs),t.some(fe=\u003efe.type===\"pcb_keepout\")\u0026\u0026oe.push(MVo(s.keepout??ch.keepout));const le=oVo({circuitJson:t,transform:O,svgWidth:B,svgHeight:S,usedMaskIds:te.usedCopperPourTraceMaskIds});if(le\u0026\u0026oe.push(le),oe.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"boundary\",x:\"0\",y:\"0\",fill:e?.backgroundColor??\"#000\",width:B.toString(),height:S.toString(),\"data-type\":\"pcb_background\",\"data-pcb-layer\":\"global\"},children:[]}),n\u0026\u0026oe.push(lzo(O,A,c,l,u)),oe.push(...J),ie.rect\u0026\u0026oe.push(ie.rect),e?.showErrorsInTextOverlay){const fe=IG(t,\"pcb_error_text_overlay\");fe\u0026\u0026oe.push(fe)}const ge=Gw(t),_e=Yw,ue={name:\"svg\",type:\"element\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",width:B.toString(),height:S.toString(),...ge\u0026\u0026{\"data-software-used-string\":ge},...e?.includeVersion\u0026\u0026{\"data-circuit-to-svg-version\":_e}},value:\"\",children:oe.filter(fe=\u003efe!==null)};try{return Ow(ue)}catch(fe){throw console.error(\"Error stringifying SVG object:\",fe),fe}}function czo({elm:t,circuitJson:e,ctx:n}){switch(t.type){case\"pcb_debug_object\":return n.showDebugObjects?Azo({debugObject:t,transform:n.transform,style:n.debugObjectStyle,labelStackIndex:t.shape===\"rect\"?e.slice(0,e.indexOf(t)).filter(i=\u003ei.type===\"pcb_debug_object\"\u0026\u0026i.shape===\"rect\"\u0026\u0026i.center.x===t.center.x\u0026\u0026i.center.y===t.center.y\u0026\u0026i.size.width===t.size.width\u0026\u0026i.size.height===t.size.height).length:0}):[];case\"pcb_trace_error\":return FUo(t,e,n).filter(Boolean);case\"pcb_footprint_overlap_error\":return OUo(t,e,n).filter(Boolean);case\"pcb_courtyard_overlap_error\":return GUo(t,e,n).filter(Boolean);case\"pcb_component_outside_board_error\":return KUo(t,e,n).filter(Boolean);case\"pcb_pad_trace_clearance_error\":case\"pcb_via_trace_clearance_error\":return qUo(t,e,n).filter(Boolean);case\"pcb_connector_not_in_accessible_orientation_warning\":case\"pcb_manual_edit_conflict_warning\":return rzo(t,e,n);case\"pcb_component\":return LVo(t,n).filter(Boolean);case\"pcb_trace\":return rVo(t,n);case\"pcb_copper_pour\":return RVo(t,n);case\"pcb_plated_hole\":return[...IKo(t,n).filter(Boolean),...uUt(t,n)];case\"pcb_hole\":return EVo(t,n);case\"pcb_smtpad\":return[...dVo(t,n),...uUt(t,n)];case\"pcb_solder_paste\":return n.showSolderPaste?sUt(t,n):[];case\"pcb_silkscreen_text\":return MKo(t,n);case\"pcb_silkscreen_rect\":return DKo(t,n);case\"pcb_silkscreen_circle\":return kKo(t,n);case\"pcb_silkscreen_line\":return FKo(t,n);case\"pcb_silkscreen_pill\":return LKo(t,n);case\"pcb_silkscreen_oval\":return HKo(t,n);case\"pcb_copper_text\":return TKo(t,n);case\"pcb_courtyard_rect\":return n.showCourtyards?OKo(t,n):[];case\"pcb_courtyard_polygon\":return n.showCourtyards?GKo(t,n):[];case\"pcb_courtyard_circle\":return n.showCourtyards?UKo(t,n):[];case\"pcb_courtyard_outline\":return n.showCourtyards?YKo(t,n):[];case\"pcb_fabrication_note_path\":return XUo(t,n);case\"pcb_fabrication_note_text\":return ZUo(t,n);case\"pcb_fabrication_note_rect\":return nKo(t,n);case\"pcb_fabrication_note_dimension\":return sKo(t,n);case\"pcb_note_dimension\":return n.showPcbNotes?aKo(t,n):[];case\"pcb_note_text\":return n.showPcbNotes?cKo(t,n):[];case\"pcb_note_rect\":return n.showPcbNotes?gKo(t,n):[];case\"pcb_note_path\":return n.showPcbNotes?hKo(t,n):[];case\"pcb_note_line\":return n.showPcbNotes?mKo(t,n):[];case\"pcb_silkscreen_path\":return CKo(t,n);case\"pcb_silkscreen_graphic\":return yKo(t,n);case\"pcb_panel\":return n.drawPaddingOutsideBoard?xVo(t,n):[];case\"pcb_board\":return n.drawPaddingOutsideBoard?tUt(t,n):[];case\"pcb_via\":return KYt(t,n);case\"pcb_cutout\":const o=t;return o.shape===\"path\"?vVo(o,n):QVo(t,n);case\"pcb_keepout\":return DVo(t,n);case\"pcb_group\":return n.showPcbGroups?GVo(t,n):[];default:return[]}}function lzo(t,e,n,o,i){const[r,s]=hn(t,[e,n]),[a,A]=hn(t,[o,i]),c=Math.abs(a-r),l=Math.abs(A-s),u=Math.min(r,a),g=Math.min(s,A);return{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-boundary\",fill:\"none\",stroke:\"#fff\",\"stroke-width\":\"0.3\",x:u.toString(),y:g.toString(),width:c.toString(),height:l.toString(),\"data-type\":\"pcb_boundary\",\"data-pcb-layer\":\"global\"}}}var uzo=pUt,tde={fill:\"none\",stroke:\"rgb(0,0,0)\",strokeOpacity:\"0.8\",strokeWidthFactor:.2};function gzo(t,e,n={}){const{width:o,height:i,center:r,outline:s}=t;let a;if(s\u0026\u0026Array.isArray(s)\u0026\u0026s.length\u003e=3)a=s.map((A,c)=\u003e{const[l,u]=hn(e,[A.x,A.y]);return c===0?`M ${l} ${u}`:`L ${l} ${u}`}).join(\" \");else{const A=o/2,c=i/2,l=hn(e,[r.x-A,r.y-c]),u=hn(e,[r.x+A,r.y-c]),g=hn(e,[r.x+A,r.y+c]),h=hn(e,[r.x-A,r.y+c]);a=`M ${l[0]} ${l[1]} L ${u[0]} ${u[1]} L ${g[0]} ${g[1]} L ${h[0]} ${h[1]}`}return a+=\" Z\",[{name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-board\",d:a,fill:n.fill??tde.fill,stroke:n.stroke??tde.stroke,\"stroke-opacity\":n.strokeOpacity??tde.strokeOpacity,\"stroke-width\":((n.strokeWidthFactor??tde.strokeWidthFactor)*Math.abs(e.a)).toString()}}]}var dzo={pin_number:.15,negated_pin_number:.15*.8,reference_designator:.18,manufacturer_number:.18,net_label:.18,error:.05},Uw=(t,e)=\u003ee??dzo[t],pE=(t,e,n)=\u003eMath.abs(t.a)*Uw(e,n);function hzo(t,e){const{elm:n,portPosition:o,name:i,arePinsInterchangeable:r}=t,{transform:s}=e,{center:a,width:A,height:c,rotation:l=0,layer:u=\"top\"}=n;if(!a||typeof A!=\"number\"||typeof c!=\"number\")return null;const[g,h]=hn(s,[a.x,a.y]),[d,p]=hn(s,[o.x,o.y]),m=A*Math.abs(s.a),_=c*Math.abs(s.d),f=p\u003eh,I=d\u003cg,C=[pzo(m,_,l,u),mzo(m,_,i??\"\")];return r||C.push(_zo(m,_,l,u,f,I)),{name:\"g\",type:\"element\",value:\"\",attributes:{transform:`translate(${g}, ${h}) scale(1, -1)`},children:C}}function pzo(t,e,n,o){const i=t/2,r=e/2;return{name:\"path\",type:\"element\",attributes:{class:\"assembly-component\",d:fzo(i,r,n),\"stroke-width\":.8.toFixed(2),transform:`rotate(${-n})`,\"stroke-dasharray\":o===\"bottom\"?\"2,2\":\"\"},value:\"\",children:[]}}function mzo(t,e,n,o){const i=Math.min(t,e),A=Math.min(58,Math.max(3,i*.8)),c=e\u003et;return{name:\"text\",type:\"element\",attributes:{x:\"0\",y:\"0\",class:\"assembly-component-label\",\"text-anchor\":\"middle\",dy:\".10em\",style:\"pointer-events: none\",\"font-size\":`${A.toFixed(1)}px`,transform:c?\"rotate(90) scale(1, -1)\":\"scale(1, -1)\"},children:[{type:\"text\",value:n||\"\",name:\"\",attributes:{},children:[]}],value:\"\"}}function _zo(t,e,n,o,i,r){const s=t/2,a=e/2,A=Math.min(s,a)*.5;let c;return i\u0026\u0026r?c=[[-s,-a],[-s+A,-a],[-s,-a+A]]:i\u0026\u0026!r?c=[[s,-a],[s-A,-a],[s,-a+A]]:!i\u0026\u0026r?c=[[-s,a],[-s+A,a],[-s,a-A]]:c=[[s,a],[s-A,a],[s,a-A]],{name:\"polygon\",type:\"element\",attributes:{class:\"assembly-pin1-indicator\",points:c.map(u=\u003eu.join(\",\")).join(\" \"),fill:\"#333\",stroke:\"none\",transform:`rotate(${-n})`},value:\"\",children:[]}}function fzo(t,e,n){const o=(a,A,c)=\u003e{const l=Math.PI/180*c,u=Math.cos(l),g=Math.sin(l);return[a*u-A*g,a*g+A*u]};return`${[[-t,-e],[t,-e],[t,e],[-t,e]].map(([a,A])=\u003eo(a,A,n)).map(([a,A],c)=\u003ec===0?`M${a},${A}`:`L${a},${A}`).join(\" \")} Z`}var vRe=\"rgb(190, 190, 190)\";function Izo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.hole_shape===\"circle\"||t.hole_shape===\"square\"){const r=t.hole_diameter*Math.abs(n.a),s=r/2;return t.hole_shape===\"circle\"?[{name:\"circle\",type:\"element\",attributes:{class:\"assembly-hole\",cx:o.toString(),cy:i.toString(),r:s.toString(),fill:vRe},children:[],value:\"\"}]:[{name:\"rect\",type:\"element\",attributes:{class:\"assembly-hole\",x:(o-s).toString(),y:(i-s).toString(),width:r.toString(),height:r.toString(),fill:vRe},children:[],value:\"\"}]}if(t.hole_shape===\"oval\"){const r=t.hole_width*Math.abs(n.a),s=t.hole_height*Math.abs(n.a),a=r/2,A=s/2;return[{name:\"ellipse\",type:\"element\",attributes:{class:\"assembly-hole\",cx:o.toString(),cy:i.toString(),rx:a.toString(),ry:A.toString(),fill:vRe},children:[],value:\"\"}]}return[]}var Iq=\"rgb(210, 210, 210)\",Cq=\"rgb(190, 190, 190)\";function Czo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.shape===\"pill\"){const r=t.outer_width*Math.abs(n.a),s=t.outer_height*Math.abs(n.a),a=t.hole_width*Math.abs(n.a),A=t.hole_height*Math.abs(n.a),c=r/2,l=s-r,u=a/2;return[{name:\"g\",type:\"element\",children:[{name:\"path\",type:\"element\",attributes:{class:\"assembly-hole-outer\",fill:Iq,d:`M${o-c},${i-l/2} v${l} a${c},${c} 0 0 0 ${r},0 v-${l} a${c},${c} 0 0 0 -${r},0 z`},value:\"\",children:[]},{name:\"path\",type:\"element\",attributes:{class:\"assembly-hole-inner\",fill:Cq,d:`M${o-u},${i-(A-a)/2} v${A-a} a${u},${u} 0 0 0 ${a},0 v-${A-a} a${u},${u} 0 0 0 -${a},0 z`},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"circle\"){const r=t.outer_diameter*Math.abs(n.a),s=t.outer_diameter*Math.abs(n.a),a=t.hole_diameter*Math.abs(n.a),A=t.hole_diameter*Math.abs(n.a),c=Math.min(r,s)/2,l=Math.min(a,A)/2;return[{name:\"g\",type:\"element\",children:[{name:\"circle\",type:\"element\",attributes:{class:\"assembly-hole-outer\",fill:Iq,cx:o.toString(),cy:i.toString(),r:c.toString()},value:\"\",children:[]},{name:\"circle\",type:\"element\",attributes:{class:\"assembly-hole-inner\",fill:Cq,cx:o.toString(),cy:i.toString(),r:l.toString()},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"circular_hole_with_rect_pad\"){const r=t,s=r.hole_diameter*Math.abs(n.a),a=r.rect_pad_width*Math.abs(n.a),A=r.rect_pad_height*Math.abs(n.a),c=(r.rect_border_radius??0)*Math.abs(n.a),l=r.rect_ccw_rotation??0,u=s/2,[g,h]=hn(n,[r.x+r.hole_offset_x,r.y+r.hole_offset_y]);return[{name:\"g\",type:\"element\",children:[{name:\"rect\",type:\"element\",attributes:{class:\"assembly-hole-outer-pad\",fill:Iq,...l?{x:(-a/2).toString(),y:(-A/2).toString(),transform:`translate(${o} ${i}) rotate(${-l})`}:{x:(o-a/2).toString(),y:(i-A/2).toString()},width:a.toString(),height:A.toString(),...c?{rx:c.toString(),ry:c.toString()}:{}},value:\"\",children:[]},{name:\"circle\",type:\"element\",attributes:{class:\"assembly-hole-inner\",fill:Cq,cx:g.toString(),cy:h.toString(),r:u.toString()},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"pill_hole_with_rect_pad\"){const r=t,s=r.rect_pad_width*Math.abs(n.a),a=r.rect_pad_height*Math.abs(n.a),A=(r.rect_border_radius??0)*Math.abs(n.a),c=r.hole_height*Math.abs(n.a),l=r.hole_width*Math.abs(n.a),u=r,g=u.hole_offset_x??0,h=u.hole_offset_y??0,[d,p]=hn(n,[r.x+g,r.y+h]),m=Math.min(c,l)/2;return[{name:\"g\",type:\"element\",children:[{name:\"rect\",type:\"element\",attributes:{class:\"assembly-hole-outer-pad\",fill:Iq,x:(o-s/2).toString(),y:(i-a/2).toString(),width:s.toString(),height:a.toString(),...A?{rx:A.toString(),ry:A.toString()}:{}},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"assembly-hole-inner\",fill:Cq,x:(d-l/2).toString(),y:(p-c/2).toString(),width:l.toString(),height:c.toString(),rx:m.toString(),ry:m.toString()},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"rotated_pill_hole_with_rect_pad\"){const r=t,s=r.rect_pad_width*Math.abs(n.a),a=r.rect_pad_height*Math.abs(n.a),A=(r.rect_border_radius??0)*Math.abs(n.a),c=r.hole_height*Math.abs(n.a),l=r.hole_width*Math.abs(n.a),u=r,g=u.hole_offset_x??0,h=u.hole_offset_y??0,[d,p]=hn(n,[r.x+g,r.y+h]),m=Math.min(c,l)/2;return[{name:\"g\",type:\"element\",children:[{name:\"rect\",type:\"element\",attributes:{class:\"assembly-hole-outer-pad\",fill:Iq,x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),transform:`translate(${o} ${i}) rotate(${-r.rect_ccw_rotation})`,...A?{rx:A.toString(),ry:A.toString()}:{}},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"assembly-hole-inner\",fill:Cq,x:(-l/2).toString(),y:(-c/2).toString(),width:l.toString(),height:c.toString(),rx:m.toString(),ry:m.toString(),transform:`translate(${d} ${p}) rotate(${-r.hole_ccw_rotation})`},value:\"\",children:[]}],value:\"\",attributes:{}}]}return[]}var yq=\"rgb(210, 210, 210)\";function yzo(t,e){const{transform:n}=e;if(t.shape===\"rect\"||t.shape===\"rotated_rect\"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),[r,s]=hn(n,[t.x,t.y]),a=(t.rect_border_radius??0)*Math.abs(n.a);return t.shape===\"rotated_rect\"\u0026\u0026t.ccw_rotation?[{name:\"rect\",type:\"element\",attributes:{class:\"assembly-pad\",fill:yq,x:(-o/2).toString(),y:(-i/2).toString(),width:o.toString(),height:i.toString(),transform:`translate(${r} ${s}) rotate(${-t.ccw_rotation})`,\"data-layer\":t.layer,...a?{rx:a.toString(),ry:a.toString()}:{}},value:\"\",children:[]}]:[{name:\"rect\",type:\"element\",attributes:{class:\"assembly-pad\",fill:yq,x:(r-o/2).toString(),y:(s-i/2).toString(),width:o.toString(),height:i.toString(),\"data-layer\":t.layer,...a?{rx:a.toString(),ry:a.toString()}:{}},value:\"\",children:[]}]}if(t.shape===\"pill\"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),r=t.radius*Math.abs(n.a),[s,a]=hn(n,[t.x,t.y]);return[{name:\"rect\",type:\"element\",attributes:{class:\"assembly-pad\",fill:yq,x:(s-o/2).toString(),y:(a-i/2).toString(),width:o.toString(),height:i.toString(),rx:r.toString(),ry:r.toString(),\"data-layer\":t.layer},value:\"\",children:[]}]}if(t.shape===\"circle\"){const o=t.radius*Math.abs(n.a),[i,r]=hn(n,[t.x,t.y]);return[{name:\"circle\",type:\"element\",attributes:{class:\"assembly-pad\",fill:yq,cx:i.toString(),cy:r.toString(),r:o.toString(),\"data-layer\":t.layer},value:\"\",children:[]}]}if(t.shape===\"polygon\"){const o=(t.points??[]).map(i=\u003ehn(n,[i.x,i.y]));return[{name:\"polygon\",type:\"element\",attributes:{class:\"assembly-pad\",fill:yq,points:o.map(i=\u003ei.join(\",\")).join(\" \"),\"data-layer\":t.layer},value:\"\",children:[]}]}return[]}var mUt=[\"pcb_component\",\"pcb_smtpad\",\"pcb_hole\",\"pcb_plated_hole\",\"pcb_board\"];function _Ut(t,e){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const E of t)if(E.type===\"pcb_board\"){const B=E.center,S=E.width||0,Q=E.height||0;n=Math.min(n,B.x-S/2),o=Math.min(o,B.y-Q/2),i=Math.max(i,B.x+S/2),r=Math.max(r,B.y+Q/2)}const s=1,a=i-n+2*s,A=r-o+2*s,c=e?.width??800,l=e?.height??600,u=c/a,g=l/A,h=Math.min(u,g),d=(c-a*h)/2,p=(l-A*h)/2,m=m0(of(d-n*h+s*h,l-p+o*h-s*h),kx(h,-h)),_={transform:m},f=t.sort((E,B)=\u003e(mUt.indexOf(B.type)??9999)-(mUt.indexOf(E.type)??9999)).flatMap(E=\u003exzo(E,_,t)),I=Gw(t),C=Yw,y=[{name:\"style\",type:\"element\",children:[{type:\"text\",value:`\n .assembly-component { \n fill: none; \n stroke: #000; \n }\n .assembly-board { \n fill: #f2f2f2; \n stroke: rgb(0,0,0); \n stroke-opacity: 0.8;\n }\n .assembly-component-label { \n fill: #000; \n font-family: Arial, serif;\n font-weight: bold;\n dominant-baseline: middle;\n text-anchor: middle;\n }\n .assembly-boundary { \n fill: none; \n stroke: #fff;\n stroke-width: 0.2; \n }\n `,name:\"\",attributes:{},children:[]}],value:\"\",attributes:{}},{name:\"rect\",type:\"element\",attributes:{fill:\"#fff\",x:\"0\",y:\"0\",width:c.toString(),height:l.toString()},value:\"\",children:[]},Ezo(m,n,o,i,r),...f].filter(E=\u003eE!==null);if(e?.showErrorsInTextOverlay){const E=IG(t);E\u0026\u0026y.push(E)}const x={name:\"svg\",type:\"element\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",width:c.toString(),height:l.toString(),...I\u0026\u0026{\"data-software-used-string\":I},...e?.includeVersion\u0026\u0026{\"data-circuit-to-svg-version\":C}},value:\"\",children:y};return Ow(x)}function xzo(t,e,n){const o=Mr(n).source_component.list();switch(t.type){case\"pcb_board\":return gzo(t,e.transform);case\"pcb_component\":{const i=o.find(a=\u003ea.source_component_id===t.source_component_id),s=Mr(n).pcb_port.list().filter(a=\u003ea.pcb_component_id===t.pcb_component_id)[0];if(i\u0026\u0026s){const a=i.are_pins_interchangeable,A=hzo({elm:t,portPosition:{x:s.x,y:s.y},name:i.name,arePinsInterchangeable:a},e);return A?[A]:[]}return[]}case\"pcb_smtpad\":return yzo(t,e);case\"pcb_hole\":return Izo(t,e);case\"pcb_plated_hole\":return Czo(t,e);default:return[]}}function Ezo(t,e,n,o,i){const[r,s]=hn(t,[e,n]),[a,A]=hn(t,[o,i]),c=Math.abs(a-r),l=Math.abs(A-s),u=Math.min(r,a),g=Math.min(s,A);return{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"assembly-boundary\",x:u.toString(),y:g.toString(),width:c.toString(),height:l.toString()}}}var Bzo=\"rgb(26, 115, 143)\",bzo=\"rgba(0,0,0,0.9)\";function Szo(t,e){const{transform:n,soup:o}=e,{width:i,height:r,center:s,outline:a}=t,c=o.find(h=\u003eh.type===\"source_board\"\u0026\u0026h.title)?.title;let l;if(a\u0026\u0026Array.isArray(a)\u0026\u0026a.length\u003e=3)l=a.map((h,d)=\u003e{const[p,m]=hn(n,[h.x,h.y]);return d===0?`M ${p} ${m}`:`L ${p} ${m}`}).join(\" \");else{const h=i/2,d=r/2,p=hn(n,[s.x-h,s.y-d]),m=hn(n,[s.x+h,s.y-d]),_=hn(n,[s.x+h,s.y+d]),f=hn(n,[s.x-h,s.y+d]);l=`M ${p[0]} ${p[1]} L ${m[0]} ${m[1]} L ${_[0]} ${_[1]} L ${f[0]} ${f[1]}`}l+=\" Z\";const u=Mr(o).pcb_cutout.list();for(const h of u)if(h.shape===\"rect\"){const{x:d,y:p,width:m,height:_}=h.center?(()=\u003e{const{x:B,y:S}=h.center,{width:Q,height:w}=h;return{x:B,y:S,width:Q,height:w}})():{x:0,y:0,width:0,height:0},f=m/2,I=_/2,[C,y,x,E]=[hn(n,[d-f,p-I]),hn(n,[d+f,p-I]),hn(n,[d+f,p+I]),hn(n,[d-f,p+I])];l+=` M ${C[0]} ${C[1]} L ${y[0]} ${y[1]} L ${x[0]} ${x[1]} L ${E[0]} ${E[1]} Z`}else h.shape;const g=[{name:\"path\",type:\"element\",value:\"\",children:[],attributes:{class:\"pinout-board\",d:l,fill:Bzo,stroke:bzo,\"fill-rule\":\"evenodd\",\"stroke-opacity\":\"0.8\",\"stroke-width\":(.2*Math.abs(n.a)).toString()}}];if(c){const h=e.svgWidth/2;g.push({name:\"text\",type:\"element\",value:\"\",children:[{name:\"\",type:\"text\",value:c,attributes:{},children:[]}],attributes:{x:h.toString(),y:30 .toString(),\"text-anchor\":\"middle\",\"font-size\":\"18px\",\"font-weight\":\"bold\",\"font-family\":\"Arial, sans-serif\",fill:\"black\",class:\"pinout-board-title\"}})}return g}var Qzo=\"rgba(120, 120, 120, 0.6)\",vzo=\"rgba(255, 255, 255, 0.9)\";function wzo(t,e){const{transform:n,soup:o}=e,{center:i,width:r,height:s,rotation:a=0,source_component_id:A}=t,c=Mr(o).source_component.get(A);if(!i||typeof r!=\"number\"||typeof s!=\"number\"||r===0||s===0)return[];const[l,u]=hn(n,[i.x,i.y]),g=r*Math.abs(n.a),h=s*Math.abs(n.d),d=`translate(${l}, ${u})`,p=[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-component-box\",x:(-g/2).toString(),y:(-h/2).toString(),width:g.toString(),height:h.toString(),fill:Qzo,transform:`rotate(${a}deg)`},value:\"\",children:[]}];if(c?.name){const m=Math.min(g,h)*.4;p.push({name:\"text\",type:\"element\",attributes:{x:\"0\",y:\"0\",fill:vzo,\"font-size\":`${m}px`,\"font-family\":\"sans-serif\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\"},children:[{type:\"text\",value:c.name,name:\"\",attributes:{},children:[]}],value:\"\"})}return[{name:\"g\",type:\"element\",attributes:{transform:d},children:p,value:\"\"}]}var wRe=\"rgb(50, 50, 50)\";function Pzo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.hole_shape===\"circle\"||t.hole_shape===\"square\"){const r=t.hole_diameter*Math.abs(n.a),s=r/2;return t.hole_shape===\"circle\"?[{name:\"circle\",type:\"element\",attributes:{class:\"pinout-hole\",cx:o.toString(),cy:i.toString(),r:s.toString(),fill:wRe},children:[],value:\"\"}]:[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-hole\",x:(o-s).toString(),y:(i-s).toString(),width:r.toString(),height:r.toString(),fill:wRe},children:[],value:\"\"}]}if(t.hole_shape===\"oval\"){const r=t.hole_width*Math.abs(n.a),s=t.hole_height*Math.abs(n.a),a=r/2,A=s/2;return[{name:\"ellipse\",type:\"element\",attributes:{class:\"pinout-hole\",cx:o.toString(),cy:i.toString(),rx:a.toString(),ry:A.toString(),fill:wRe},children:[],value:\"\"}]}return[]}var xq=\"rgb(218, 165, 32)\",Eq=\"rgb(40, 40, 40)\";function Mzo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.shape===\"pill\"){const r=t.outer_width*Math.abs(n.a),s=t.outer_height*Math.abs(n.a),a=t.hole_width*Math.abs(n.a),A=t.hole_height*Math.abs(n.a),c=r/2,l=s-r,u=a/2;return[{name:\"g\",type:\"element\",children:[{name:\"path\",type:\"element\",attributes:{class:\"pinout-hole-outer\",fill:xq,d:`M${o-c},${i-l/2} v${l} a${c},${c} 0 0 0 ${r},0 v-${l} a${c},${c} 0 0 0 -${r},0 z`},value:\"\",children:[]},{name:\"path\",type:\"element\",attributes:{class:\"pinout-hole-inner\",fill:Eq,d:`M${o-u},${i-(A-a)/2} v${A-a} a${u},${u} 0 0 0 ${a},0 v-${A-a} a${u},${u} 0 0 0 -${a},0 z`},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"circle\"){const r=t.outer_diameter*Math.abs(n.a),s=t.outer_diameter*Math.abs(n.a),a=t.hole_diameter*Math.abs(n.a),A=t.hole_diameter*Math.abs(n.a),c=Math.min(r,s)/2,l=Math.min(a,A)/2;return[{name:\"g\",type:\"element\",children:[{name:\"circle\",type:\"element\",attributes:{class:\"pinout-hole-outer\",fill:xq,cx:o.toString(),cy:i.toString(),r:c.toString()},value:\"\",children:[]},{name:\"circle\",type:\"element\",attributes:{class:\"pinout-hole-inner\",fill:Eq,cx:o.toString(),cy:i.toString(),r:l.toString()},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"circular_hole_with_rect_pad\"){const r=t.hole_diameter*Math.abs(n.a),s=t.rect_pad_width*Math.abs(n.a),a=t.rect_pad_height*Math.abs(n.a),A=r/2;return[{name:\"g\",type:\"element\",children:[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-hole-outer-pad\",fill:xq,x:(o-s/2).toString(),y:(i-a/2).toString(),width:s.toString(),height:a.toString()},value:\"\",children:[]},{name:\"circle\",type:\"element\",attributes:{class:\"pinout-hole-inner\",fill:Eq,cx:o.toString(),cy:i.toString(),r:A.toString()},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"pill_hole_with_rect_pad\"){const r=t.rect_pad_width*Math.abs(n.a),s=t.rect_pad_height*Math.abs(n.a),a=t.hole_height*Math.abs(n.a),A=t.hole_width*Math.abs(n.a),c=Math.min(a,A)/2;return[{name:\"g\",type:\"element\",children:[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-hole-outer-pad\",fill:xq,x:(o-r/2).toString(),y:(i-s/2).toString(),width:r.toString(),height:s.toString()},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"pinout-hole-inner\",fill:Eq,x:(o-A/2).toString(),y:(i-a/2).toString(),width:A.toString(),height:a.toString(),rx:c.toString(),ry:c.toString()},value:\"\",children:[]}],value:\"\",attributes:{}}]}if(t.shape===\"rotated_pill_hole_with_rect_pad\"){const r=t.rect_pad_width*Math.abs(n.a),s=t.rect_pad_height*Math.abs(n.a),a=t.hole_height*Math.abs(n.a),A=t.hole_width*Math.abs(n.a),c=Math.min(a,A)/2;return[{name:\"g\",type:\"element\",children:[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-hole-outer-pad\",fill:xq,x:(-r/2).toString(),y:(-s/2).toString(),width:r.toString(),height:s.toString(),transform:`translate(${o} ${i}) rotate(${-t.rect_ccw_rotation})`},value:\"\",children:[]},{name:\"rect\",type:\"element\",attributes:{class:\"pinout-hole-inner\",fill:Eq,x:(-A/2).toString(),y:(-a/2).toString(),width:A.toString(),height:a.toString(),rx:c.toString(),ry:c.toString(),transform:`translate(${o} ${i}) rotate(${-t.hole_ccw_rotation})`},value:\"\",children:[]}],value:\"\",attributes:{}}]}return[]}var Bq=\"rgb(218, 165, 32)\";function Dzo(t,e){const{transform:n}=e;if(t.shape===\"rect\"||t.shape===\"rotated_rect\"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),[r,s]=hn(n,[t.x,t.y]);return t.shape===\"rotated_rect\"\u0026\u0026t.ccw_rotation?[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-pad\",fill:Bq,x:(-o/2).toString(),y:(-i/2).toString(),width:o.toString(),height:i.toString(),transform:`translate(${r} ${s}) rotate(${-t.ccw_rotation})`,\"data-layer\":t.layer},value:\"\",children:[]}]:[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-pad\",fill:Bq,x:(r-o/2).toString(),y:(s-i/2).toString(),width:o.toString(),height:i.toString(),\"data-layer\":t.layer},value:\"\",children:[]}]}if(t.shape===\"pill\"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),r=t.radius*Math.abs(n.a),[s,a]=hn(n,[t.x,t.y]);return[{name:\"rect\",type:\"element\",attributes:{class:\"pinout-pad\",fill:Bq,x:(s-o/2).toString(),y:(a-i/2).toString(),width:o.toString(),height:i.toString(),rx:r.toString(),ry:r.toString(),\"data-layer\":t.layer},value:\"\",children:[]}]}if(t.shape===\"circle\"){const o=t.radius*Math.abs(n.a),[i,r]=hn(n,[t.x,t.y]);return[{name:\"circle\",type:\"element\",attributes:{class:\"pinout-pad\",fill:Bq,cx:i.toString(),cy:r.toString(),r:o.toString(),\"data-layer\":t.layer},value:\"\",children:[]}]}if(t.shape===\"polygon\"){const o=(t.points??[]).map(i=\u003ehn(n,[i.x,i.y]));return[{name:\"polygon\",type:\"element\",attributes:{class:\"pinout-pad\",fill:Bq,points:o.map(i=\u003ei.join(\",\")).join(\" \"),\"data-layer\":t.layer},value:\"\",children:[]}]}return[]}function PRe(t){const{rectX:e,rectY:n,rectWidth:o,rectHeight:i,textX:r,textY:s,text:a,fontSize:A,labelBackground:c,labelColor:l,rx:u=4,ry:g=4,fontFamily:h=\"Arial, sans-serif\",fontWeight:d=\"bold\",textAnchor:p=\"middle\",dominantBaseline:m=\"middle\"}=t;return[{name:\"rect\",type:\"element\",attributes:{x:e.toString(),y:n.toString(),width:o.toString(),height:i.toString(),fill:c,rx:typeof u==\"number\"?u.toString():u,ry:typeof g==\"number\"?g.toString():g,stroke:\"none\"},children:[],value:\"\"},{name:\"text\",type:\"element\",attributes:{x:r.toString(),y:s.toString(),fill:l,\"font-size\":`${A}px`,\"font-family\":h,\"font-weight\":d,\"text-anchor\":p,\"dominant-baseline\":m},children:[{type:\"text\",value:a,name:\"\",attributes:{},children:[]}],value:\"\"}]}var fUt=\"rgb(255, 255, 255)\",IUt=\"rgb(0, 0, 0)\",Nzo=\"rgba(0, 0, 0, 0.6)\",Rzo=\"rgb(200, 200, 200)\",Tzo=\"rgb(0, 0, 0)\";function kzo(t,e){const n=e.label_positions.get(t.pcb_port_id);if(!n)return[];const{text:o,aliases:i,elbow_end:r,label_pos:s,edge:a}=n,[A,c]=hn(e.transform,[t.x,t.y]),l=a===\"left\"?\"x-\":a===\"right\"?\"x+\":a===\"top\"?\"y-\":\"y+\",u=a===\"left\"?\"x+\":a===\"right\"?\"x-\":a===\"top\"?\"y+\":\"y-\",g=wF({x:A,y:c,facingDirection:l},{x:r.x,y:r.y,facingDirection:u},{}),h=/^pin(\\d+)$/i.exec(o),d=[{text:h?h[1]:o,bg:h?Rzo:IUt,color:h?Tzo:fUt},...i.map(F=\u003e({text:F,bg:IUt,color:fUt}))],p=Math.abs(e.transform.a),m=e.styleScale??1,f=1.6*m*p,I=Math.max(.08,.25*m),y=.3*m*p,x=I*p,E={x:s.x+(a===\"left\"?-x/2:x/2),y:s.y},B=[...g,E].map(F=\u003e`${F.x},${F.y}`).join(\" \"),S=f*(11/21),Q=(f-S)/2,w=Q,M=d.map(({text:F,bg:O,color:U})=\u003e{const Y=F??\"\",te=Y.length*S*.6+2*Q;return{text:Y,rectWidth:te,bg:O,color:U}}),k=s.y,R=[{name:\"polyline\",type:\"element\",attributes:{points:B,stroke:Nzo,\"stroke-width\":(I*p).toString(),fill:\"none\"},children:[],value:\"\"}];if(a===\"left\"){let F=s.x;for(const{text:O,rectWidth:U,bg:Y,color:W}of M){const te=F-U,j=te+U/2;R.push(...PRe({rectX:te,rectY:k-f/2,rectWidth:U,rectHeight:f,textX:j,textY:k,text:O,fontSize:S,labelBackground:Y,labelColor:W,rx:y,ry:y})),F=te-w}}else if(a===\"right\"){let F=s.x;for(const{text:O,rectWidth:U,bg:Y,color:W}of M){const te=F,j=te+U/2;R.push(...PRe({rectX:te,rectY:k-f/2,rectWidth:U,rectHeight:f,textX:j,textY:k,text:O,fontSize:S,labelBackground:Y,labelColor:W,rx:y,ry:y})),F=te+U+w}}else{const F=M.reduce((U,Y)=\u003eU+Y.rectWidth,0)+w*Math.max(0,M.length-1);let O=s.x-F/2;for(const{text:U,rectWidth:Y,bg:W,color:te}of M){const j=O,J=j+Y/2;R.push(...PRe({rectX:j,rectY:k-f/2,rectWidth:Y,rectHeight:f,textX:J,textY:k,text:U,fontSize:S,labelBackground:W,labelColor:te,rx:y,ry:y})),O=j+Y+w}}return R}var CUt=1.6,Fzo=11/21,Lzo=.6,yUt=.1,xUt=.1,MRe=3,EUt=.1,Hzo=.8;function BUt(t,e,{transform:n,soup:o,board_bounds:i,svgHeight:r,styleScale:s},a){const A=e.map(R=\u003eR.pcb_port.x),c={};for(const R of A){const F=R.toFixed(1);c[F]=(c[F]||0)+1}let l;if(Object.keys(c).length\u003e1\u0026\u0026e.length\u003e2){const R=Object.entries(c).sort((J,oe)=\u003eoe[1]-J[1]),F=parseFloat(R[0][0]),O=e.filter(J=\u003eMath.abs(J.pcb_port.x-F)\u003c.2),U=e.filter(J=\u003eMath.abs(J.pcb_port.x-F)\u003e=.2),Y=J=\u003e({pcb_port:J.pcb_port,y:hn(n,[J.pcb_port.x,J.pcb_port.y])[1],aliases:J.aliases});O.sort((J,oe)=\u003eoe.pcb_port.y-J.pcb_port.y),U.sort((J,oe)=\u003eoe.pcb_port.y-J.pcb_port.y);const W=O.length\u003e0?Math.max(...O.map(J=\u003eJ.pcb_port.y)):-1/0;l=((U.length\u003e0?Math.max(...U.map(J=\u003eJ.pcb_port.y)):-1/0)\u003eW?[...U,...O]:[...O,...U]).map(Y)}else l=e.map(R=\u003e({pcb_port:R.pcb_port,y:hn(n,[R.pcb_port.x,R.pcb_port.y])[1],aliases:R.aliases})).sort((R,F)=\u003eR.y-F.y);if(l.length===0)return;const u=hn(n,[t===\"left\"?i.minX:i.maxX,0])[0],g=l.length,h={};for(const R of e){const F=R.pcb_port.x.toFixed(1);h[F]=(h[F]||0)+1}let d=new Set;if(Object.keys(h).length\u003e1\u0026\u0026e.length\u003e2){const R=Object.entries(h).sort((U,Y)=\u003eY[1]-U[1]),F=parseFloat(R[0][0]),O=e.filter(U=\u003eMath.abs(U.pcb_port.x-F)\u003c.2);d=new Set(O.map(U=\u003eU.pcb_port.pcb_port_id))}const p=l.map((R,F)=\u003ed.has(R.pcb_port.pcb_port_id)?F:-1).filter(R=\u003eR!==-1),m=(g-1)/2,_=Math.abs(n.a),f=CUt*s*_,C=Math.max(.2*_,.3*s*_),y=Hzo*s*_,x=(yUt+g*xUt)*s*_,B=x+m*(MRe*s*_)+EUt*s*_,S=g-p.length,Q=p.length===0?g:S,w=Q*f+Math.max(0,Q-1)*C;let M;if(p.length\u003e0\u0026\u0026S\u003e0){const R=p.map(j=\u003el[j].y),F=Math.min(...R),O=Math.max(...R),U=F-f/2,Y=O+f/2;l.map((j,J)=\u003eJ).filter(j=\u003e!p.includes(j))[0]\u003cp[0]?M=U-(C*2+y)-w+f/2:M=Y+(C*2+y)+f/2}else M=(r-w)/2+f/2;const k=p.length===g;l.forEach(({pcb_port:R,aliases:F},O)=\u003e{let U;if(p.length\u003e0)if(p.includes(O))U=m;else{const ie=Math.min(...p),ne=Math.max(...p);let le;O\u003cie?le=ie-O:le=O-ne,U=m-le}else{const ie=Math.abs(O-m);U=m-ie}const Y=x+U*(MRe*s*_),W=t===\"left\"?-1:1,te=p.includes(O),j=k||p.length\u003e0\u0026\u0026te?l[O].y:M,J={x:u+W*Y,y:j},oe={x:u+W*B,y:j};a.set(R.pcb_port_id,{text:F[0],aliases:F.slice(1),elbow_end:J,label_pos:oe,edge:t}),p.length\u003e0\u0026\u0026te||(M+=f+C)})}var Ozo=({left_labels:t,right_labels:e,transform:n,soup:o,board_bounds:i,svgWidth:r,svgHeight:s,styleScale:a})=\u003e{const A=new Map,c={transform:n,soup:o,board_bounds:i};return BUt(\"left\",t,{...c,svgHeight:s,styleScale:a},A),BUt(\"right\",e,{...c,svgHeight:s,styleScale:a},A),A};function Gzo(t,e){const n=Mr(e).source_port.get(t.source_port_id);if(!n)return null;const o=n.port_hints?.filter(s=\u003e!/^\\d+$/.test(s)\u0026\u0026![\"left\",\"right\",\"top\",\"bottom\"].includes(s))??[];let i=o[0];if(i||(i=n.name),!i)return null;const r=o.filter(s=\u003es!==i);return{text:i,aliases:r}}function Yzo(t,e){const n={left:t.x-e.minX,right:e.maxX-t.x,top:e.maxY-t.y,bottom:t.y-e.minY};let o=\"left\",i=n.left;return n.right\u003ci\u0026\u0026(i=n.right,o=\"right\"),n.top\u003ci\u0026\u0026(i=n.top,o=\"top\"),n.bottom\u003ci\u0026\u0026(i=n.bottom,o=\"bottom\"),o}var bUt=[\"pcb_board\",\"pcb_smtpad\",\"pcb_hole\",\"pcb_plated_hole\",\"pcb_component\",\"pcb_port\"];function SUt(t,e){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const pe of t)if(pe.type===\"pcb_board\")if(\"outline\"in pe\u0026\u0026pe.outline\u0026\u0026Array.isArray(pe.outline)\u0026\u0026pe.outline.length\u003e0)for(const ye of pe.outline)n=Math.min(n,ye.x),o=Math.min(o,ye.y),i=Math.max(i,ye.x),r=Math.max(r,ye.y);else{const ye=pe.center,Me=pe.width||0,ve=pe.height||0;n=Math.min(n,ye.x-Me/2),o=Math.min(o,ye.y-ve/2),i=Math.max(i,ye.x+Me/2),r=Math.max(r,ye.y+ve/2)}const s=2;let a=e?.width??1200,A=e?.height??768;t.find(pe=\u003epe.type===\"source_board\"\u0026\u0026!!pe.title)?.title;const c={minX:n,minY:o,maxX:i,maxY:r},l=t.filter(pe=\u003epe.type===\"pcb_port\"\u0026\u0026pe.is_board_pinout),u=[];for(const pe of l){const ye=Gzo(pe,t);if(!ye)continue;const Me=Yzo({x:pe.x,y:pe.y},c);u.push({pcb_port:pe,aliases:[ye.text,...ye.aliases],edge:Me})}const g=u.filter(pe=\u003epe.edge===\"left\"),h=u.filter(pe=\u003epe.edge===\"right\"),d=u.filter(pe=\u003epe.edge===\"top\"),p=u.filter(pe=\u003epe.edge===\"bottom\"),m=(n+i)/2;d.length\u003e0\u0026\u0026(d.filter(ye=\u003eye.pcb_port.x\u003cm).length\u003ed.length/2?g.push(...d):h.push(...d)),p.length\u003e0\u0026\u0026(p.filter(ye=\u003eye.pcb_port.x\u003cm).length\u003ep.length/2?g.push(...p):h.push(...p));const f=t.filter(pe=\u003epe.type===\"pcb_smtpad\").map(pe=\u003e{if(typeof pe.height==\"number\")return pe.height;if(typeof pe.radius==\"number\")return pe.radius*2}).filter(pe=\u003eNumber.isFinite(pe)),I=f.length?f.reduce((pe,ye)=\u003epe+ye,0)/f.length:void 0,y=I?Math.max(.5,Math.min(1,I/1)):1,x=CUt*y;function E(pe){const ye=[...pe.aliases??[]];if(ye.length===0)return ye;const Me=/^pin(\\d+)$/i.exec(ye[0]);return Me\u0026\u0026(ye[0]=Me[1]),ye}function B(pe){if(pe.length===0)return 0;const ye=x,Me=ye*Fzo,ve=(ye-Me)/2,he=ve;return pe.map(we=\u003e(we??\"\").length*Me*Lzo+2*ve).reduce((we,Te)=\u003ewe+Te,0)+he*Math.max(0,pe.length-1)}function S(pe){if(pe\u003c=0)return 0;const ye=(pe-1)/2;return(yUt+pe*xUt)*y+ye*(MRe*y)+EUt*y}const Q=Math.max(0,...g.map(pe=\u003eB(E(pe)))),w=Math.max(0,...h.map(pe=\u003eB(E(pe)))),M=S(g.length)+Q,k=S(h.length)+w,R=n-M,O=i+k-R+2*s,U=r-o+2*s,Y=a/O,W=A/U,te=Math.min(Y,W),j=(a-O*te)/2,J=(A-U*te)/2,oe=m0(of(j-R*te+s*te,A-J+o*te-s*te),kx(te,-te)),ie=Ozo({left_labels:g,right_labels:h,transform:oe,soup:t,board_bounds:c,svgWidth:a,svgHeight:A,styleScale:y}),ne={transform:oe,soup:t,styleScale:y,label_positions:ie,svgWidth:a},le=t.sort((pe,ye)=\u003e(bUt.indexOf(pe.type)??9999)-(bUt.indexOf(ye.type)??9999)).flatMap(pe=\u003eUzo(pe,ne)),ge=Gw(t),_e=Yw,ue=[{name:\"rect\",type:\"element\",attributes:{fill:\"rgb(255, 255, 255)\",x:\"0\",y:\"0\",width:a.toString(),height:A.toString()},value:\"\",children:[]},...le].filter(pe=\u003epe!==null);if(e?.showErrorsInTextOverlay){const pe=IG(t);pe\u0026\u0026ue.push(pe)}const fe={name:\"svg\",type:\"element\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",width:a.toString(),height:A.toString(),...ge\u0026\u0026{\"data-software-used-string\":ge},...e?.includeVersion\u0026\u0026{\"data-circuit-to-svg-version\":_e}},value:\"\",children:ue};return Ow(fe)}function Uzo(t,e,n){switch(t.type){case\"pcb_board\":return Szo(t,e);case\"pcb_component\":return wzo(t,e);case\"pcb_smtpad\":return Dzo(t,e);case\"pcb_hole\":return Pzo(t,e);case\"pcb_plated_hole\":return Mzo(t,e);case\"pcb_port\":return t.is_board_pinout?kzo(t,e):[];default:return[]}}function Kzo(t){const{minX:e,minY:n,maxX:o,maxY:i}=t.bounds,r=t.cellSize??1,s=t.labelCells??!1,a=[],A=(c,l)=\u003e{const[u,g]=hn(t.transform,[c,l]);return{x:u,y:g}};for(let c=Math.floor(e);c\u003c=Math.ceil(o);c+=r){const l=A(c,n),u=A(c,i);a.push({name:\"line\",type:\"element\",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:Lg.schematic.grid,\"stroke-width\":(.01*Math.abs(t.transform.a)).toString(),\"stroke-opacity\":\"0.5\"}})}for(let c=Math.floor(n);c\u003c=Math.ceil(i);c+=r){const l=A(e,c),u=A(o,c);a.push({name:\"line\",type:\"element\",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:Lg.schematic.grid,\"stroke-width\":(.01*Math.abs(t.transform.a)).toString(),\"stroke-opacity\":\"0.5\"}})}if(s){const c=(l,u)=\u003er\u003c=.1?`${l.toFixed(1)},${u.toFixed(1)}`:`${l},${u}`;for(let l=Math.floor(e);l\u003c=Math.ceil(o);l+=r)for(let u=Math.floor(n);u\u003c=Math.ceil(i);u+=r){const g=A(l,u);a.push({name:\"text\",type:\"element\",attributes:{x:(g.x-2.5).toString(),y:(g.y-5).toString(),fill:Lg.schematic.grid,\"font-size\":(r/5*Math.abs(t.transform.a)).toString(),\"fill-opacity\":\"0.5\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\"},children:[{type:\"text\",value:c(l,u),name:\"\",attributes:{},children:[]}]})}}return{name:\"g\",value:\"\",type:\"element\",attributes:{class:\"grid sch-grid\"},children:a}}function Vzo(t){const{points:e,transform:n}=t,o=[];for(const i of e){const[r,s]=hn(n,[i.x-.1,i.y-.1]),[a,A]=hn(n,[i.x+.1,i.y+.1]),[c,l]=hn(n,[i.x-.1,i.y+.1]),[u,g]=hn(n,[i.x+.1,i.y-.1]);o.push({name:\"path\",type:\"element\",attributes:{d:`M${r},${s} L${a},${A} M${c},${l} L${u},${g}`,stroke:Lg.schematic.grid,\"stroke-width\":(.02*Math.abs(n.a)).toString(),\"stroke-opacity\":\"0.7\"}});const[h,d]=hn(n,[i.x+.15,i.y-.15]);o.push({name:\"text\",type:\"element\",attributes:{x:h.toString(),y:d.toString(),fill:Lg.schematic.grid,\"font-size\":(.1*Math.abs(n.a)).toString(),\"fill-opacity\":\"0.7\",\"text-anchor\":\"start\",\"font-family\":\"sans-serif\",\"dominant-baseline\":\"middle\"},children:[{type:\"text\",value:i.label||`(${i.x},${i.y})`,name:\"\",attributes:{},children:[]}]})}return{name:\"g\",value:\"\",type:\"element\",attributes:{class:\"labeled-points sch-labeled-points\"},children:o}}function zzo(t){return t.reduce((e,n)=\u003ee?n.sheet_index===void 0?e:e.sheet_index===void 0||n.sheet_index\u003ce.sheet_index?n:e:n,void 0)}var QUt={0:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},1:{width:13,height:27,ascent:22,descent:5,left:-3,right:9},2:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},3:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},4:{width:13,height:27,ascent:22,descent:5,left:0,right:12},5:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},6:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},7:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},8:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},9:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\" \":{width:7,height:27,ascent:22,descent:5,left:0,right:0},\"!\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},'\"':{width:9,height:27,ascent:22,descent:5,left:-1,right:7},\"#\":{width:13,height:27,ascent:22,descent:5,left:0,right:13},$:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"%\":{width:21,height:27,ascent:22,descent:5,left:-1,right:20},\"\u0026\":{width:16,height:27,ascent:22,descent:5,left:-1,right:15},\"'\":{width:5,height:27,ascent:22,descent:5,left:-1,right:3},\"(\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\")\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"*\":{width:9,height:27,ascent:22,descent:5,left:-1,right:8},\"+\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\",\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"-\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\".\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"/\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},\":\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\";\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"\u003c\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"=\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"\u003e\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"?\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"@\":{width:24,height:27,ascent:22,descent:5,left:-1,right:23},A:{width:16,height:27,ascent:22,descent:5,left:0,right:16},B:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},C:{width:17,height:27,ascent:22,descent:5,left:-1,right:16},D:{width:17,height:27,ascent:22,descent:5,left:-2,right:16},E:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},F:{width:15,height:27,ascent:22,descent:5,left:-2,right:14},G:{width:19,height:27,ascent:22,descent:5,left:-1,right:17},H:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},I:{width:7,height:27,ascent:22,descent:5,left:-2,right:5},J:{width:12,height:27,ascent:22,descent:5,left:-1,right:10},K:{width:16,height:27,ascent:22,descent:5,left:-2,right:16},L:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},M:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},N:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},O:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},P:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},Q:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},R:{width:17,height:27,ascent:22,descent:5,left:-2,right:17},S:{width:16,height:27,ascent:22,descent:5,left:-1,right:15},T:{width:15,height:27,ascent:22,descent:5,left:-1,right:14},U:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},V:{width:16,height:27,ascent:22,descent:5,left:0,right:16},W:{width:23,height:27,ascent:22,descent:5,left:0,right:22},X:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Y:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Z:{width:15,height:27,ascent:22,descent:5,left:0,right:14},\"[\":{width:7,height:27,ascent:22,descent:5,left:-2,right:6},\"\\\\\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},\"]\":{width:7,height:27,ascent:22,descent:5,left:0,right:5},\"^\":{width:11,height:27,ascent:22,descent:5,left:-1,right:11},_:{width:13,height:27,ascent:22,descent:5,left:0,right:14},\"`\":{width:8,height:27,ascent:22,descent:5,left:-1,right:5},a:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},b:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},c:{width:12,height:27,ascent:22,descent:5,left:-1,right:12},d:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},e:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},f:{width:7,height:27,ascent:22,descent:5,left:0,right:8},g:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},h:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},i:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},j:{width:5,height:27,ascent:22,descent:5,left:1,right:4},k:{width:12,height:27,ascent:22,descent:5,left:-2,right:12},l:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},m:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},n:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},o:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},p:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},q:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},r:{width:8,height:27,ascent:22,descent:5,left:-2,right:8},s:{width:12,height:27,ascent:22,descent:5,left:-1,right:11},t:{width:7,height:27,ascent:22,descent:5,left:0,right:6},u:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},v:{width:12,height:27,ascent:22,descent:5,left:0,right:12},w:{width:17,height:27,ascent:22,descent:5,left:0,right:17},x:{width:12,height:27,ascent:22,descent:5,left:0,right:12},y:{width:12,height:27,ascent:22,descent:5,left:0,right:12},z:{width:12,height:27,ascent:22,descent:5,left:0,right:11},\"{\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"|\":{width:6,height:27,ascent:22,descent:5,left:-2,right:4},\"}\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"~\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13}},bq=t=\u003e{if(!t)return 0;let e=0;for(const n of t){const o=QUt[n];o?e+=o.width:e+=QUt[\"?\"].width}return e/27},vUt=.65,wUt=.08;function nde(t){return bq(t.text||\"\")+(t.display_superscript?wUt+bq(t.display_superscript)*vUt:0)}function DRe(t,e,n,o=\"central\"){const i=[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}];return e\u0026\u0026i.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{class:\"sch-net-label-superscript\",\"font-size\":`${n*vUt}px`,dx:`${n*wUt}`,dy:`${-n*(o===\"ideographic\"?.5:.25)}`},children:[{type:\"text\",value:e,name:\"\",attributes:{},children:[]}]}),i}var CG=t=\u003e{switch(t){case\"top\":return{x:0,y:-1};case\"bottom\":return{x:0,y:1};case\"left\":return{x:1,y:0};case\"right\":return{x:-1,y:0}}throw new Error(`Invalid side: ${t}`)},Kw=.3,yG=.3,xG=.06,PUt=.2,MUt=t=\u003e({\"data-circuit-json-type\":\"schematic_net_label\",\"data-schematic-net-label-id\":t.schematic_net_label_id}),Jzo={top_left:\"start\",top_right:\"end\",middle_left:\"start\",middle_right:\"end\",bottom_left:\"start\",bottom_right:\"end\",center:\"middle\",middle_top:\"middle\",middle_bottom:\"middle\"},DUt={top_left:\"hanging\",top_right:\"hanging\",bottom_left:\"ideographic\",bottom_right:\"ideographic\",center:\"middle\",middle_left:\"middle\",middle_right:\"middle\",middle_top:\"hanging\",middle_bottom:\"ideographic\"};function Wzo(t){return{left:180,top:90,bottom:-90,right:0}[t]??0}function jzo(t,e,n){const o=n+Kw*2+xG*t.text.length+yG,i=CG(t.anchor_side);return t.anchor_position??{x:t.center.x-i.x*o*e/2,y:t.center.y-i.y*o*e/2}}var $zo=(t,e)=\u003e{const n=t\u003c0?t+2*Math.PI:t,o=e\u003c0?e+2*Math.PI:e;let i=Math.abs(n-o);return i\u003eMath.PI\u0026\u0026(i=2*Math.PI-i),i},NUt=({schPorts:t,symbol:e,schComponent:n})=\u003e{const o=t.map(a=\u003e{const A=a.center.x-n.center.x,c=a.center.y-n.center.y;return{port:a,angle:Math.atan2(c,A)}}),i=e.ports.map(a=\u003e{const A=a.x-e.center.x,c=a.y-e.center.y;return{port:a,angle:Math.atan2(c,A)}});o.sort((a,A)=\u003ea.angle-A.angle),i.sort((a,A)=\u003ea.angle-A.angle);const r=[],s=new Set;for(const a of o){let A=null;for(const c of i){if(s.has(c.port))continue;const l=$zo(a.angle,c.angle);(A===null||l\u003cA.angleDiff)\u0026\u0026(A={symbolPort:c.port,angleDiff:l})}A\u0026\u0026A.angleDiff\u003cMath.PI/4\u0026\u0026(r.push({schPort:a.port,symbolPort:A.symbolPort}),s.add(A.symbolPort))}return r};function RUt(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2),A=Math.sqrt((o.x-e.x)**2+(o.y-e.y)**2)/s,c=of(i,r),l=kx(A,A);return m0(c,l)}function qzo(t){const e=[],n=new Map,o=new Map;let i=null;for(const r of t)if(r.type===\"schematic_component\")e.push(r);else if(r.type===\"schematic_port\"\u0026\u0026r.schematic_component_id){const s=n.get(r.schematic_component_id)??[];s.push(r),n.set(r.schematic_component_id,s)}else r.type===\"source_component\"\u0026\u0026o.set(r.source_component_id,r);for(const r of e){const s=Xzo({component:r,schematicPorts:n.get(r.schematic_component_id)??[],sourceComponent:r.source_component_id?o.get(r.source_component_id):void 0});s\u0026\u0026(i=i?TUt(i,s):s)}return i}function Xzo({component:t,schematicPorts:e,sourceComponent:n}){if(!t.symbol_name)return null;const o=Su[t.symbol_name];if(!o)return null;const i=NUt({schPorts:e,symbol:o,schComponent:t});if(!i[0])return null;const r=RUt(i[1]?.symbolPort??o.center,i[1]?.schPort.center??t.center,i[0].symbolPort,i[0].schPort.center);let s=null;for(const a of o.primitives){if(a.type!==\"text\")continue;const A=Zzo({primitive:a,component:t,sourceComponent:n});if(!A)continue;const c=hn(r,a),l=Uw(\"reference_designator\"),u=eJo({x:c.x,y:c.y,width:bq(A)*l,height:l,anchor:a.anchor});s=s?TUt(s,u):u}return s}function Zzo({primitive:t,component:e,sourceComponent:n}){return t.text===\"{REF}\"?n?.display_name??n?.name??\"\":t.text===\"{VAL}\"?e.symbol_display_value??\"\":\"\"}function eJo({x:t,y:e,width:n,height:o,anchor:i}){let r=t,s=t,a=e-o/2,A=e+o/2;return i.includes(\"left\")?s=t+n:i.includes(\"right\")?r=t-n:(r=t-n/2,s=t+n/2),i.includes(\"top\")?(a=e-o,A=e):i.includes(\"bottom\")\u0026\u0026(a=e,A=e+o),{minX:r,minY:a,maxX:s,maxY:A}}function TUt(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}var kUt=(t,e)=\u003e{if(t.column_widths\u0026\u0026t.column_widths.length\u003e0\u0026\u0026t.row_heights\u0026\u0026t.row_heights.length\u003e0){const l=u=\u003etypeof u==\"number\"?u:u.endsWith(\"mm\")?parseFloat(u):u.endsWith(\"in\")?parseFloat(u)*25.4:parseFloat(u);return{column_widths:t.column_widths.map(l),row_heights:t.row_heights.map(l)}}const n=e.filter(l=\u003el.type===\"schematic_table_cell\"\u0026\u0026l.schematic_table_id===t.schematic_table_id);if(n.length===0)return{column_widths:[],row_heights:[]};const o=n.reduce((l,u)=\u003eMath.max(l,u.end_column_index),-1)+1,i=n.reduce((l,u)=\u003eMath.max(l,u.end_row_index),-1)+1,{cell_padding:r=.2}=t,s=new Array(o).fill(0),a=new Array(i).fill(0),A={},c={};for(const l of n){const u=Uw(\"reference_designator\",l.font_size),h=bq(l.text??\"\")*u+2*r,d=u*1.2+2*r,p=`${l.start_row_index}-${l.start_column_index}`;A[p]=h,c[p]=d}for(let l=0;l\u003ci;l++)for(let u=0;u\u003co;u++){const g=`${l}-${u}`;A[g]\u0026\u0026A[g]\u003es[u]\u0026\u0026(s[u]=A[g]),c[g]\u0026\u0026c[g]\u003ea[l]\u0026\u0026(a[l]=c[g])}for(const l of n){if(l.start_column_index===l.end_column_index\u0026\u0026l.start_row_index===l.end_row_index)continue;const u=`${l.start_row_index}-${l.start_column_index}`,g=A[u],h=c[u];if(g===void 0||h===void 0)continue;let d=0;for(let m=l.start_column_index;m\u003c=l.end_column_index;m++)d+=s[m];if(g\u003ed){const _=(g-d)/(l.end_column_index-l.start_column_index+1);for(let f=l.start_column_index;f\u003c=l.end_column_index;f++)s[f]+=_}let p=0;for(let m=l.start_row_index;m\u003c=l.end_row_index;m++)p+=a[m];if(h\u003ep){const _=(h-p)/(l.end_row_index-l.start_row_index+1);for(let f=l.start_row_index;f\u003c=l.end_row_index;f++)a[f]+=_}}return{column_widths:s,row_heights:a}},tJo=10.16,nJo=1.1,MR=tJo/nJo,oJo=297/MR,iJo=210/MR,ode=5/MR;function Sq(t={}){const e=t.center??{x:0,y:0},n=t.sheet_width===void 0?oJo:t.sheet_width/MR,o=t.sheet_height===void 0?iJo:t.sheet_height/MR,i=e.x-n/2,r=e.x+n/2,s=e.y-o/2,a=e.y+o/2;return{center:e,width:n,height:o,minX:i,maxX:r,minY:s,maxY:a,innerMinX:i+ode,innerMaxX:r-ode,innerMinY:s+ode,innerMaxY:a-ode}}function rJo(t,e=.5){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=.2;for(const c of t)if(c.type===\"schematic_sheet\"){const l=Sq(c);A(l.center,{width:l.width,height:l.height},0)}else if(c.type===\"schematic_component\")A(c.center,c.size,0);else if(c.type===\"schematic_port\")A(c.center,{width:s,height:s},0);else if(c.type===\"schematic_debug_object\")c.shape===\"rect\"?A(c.center,c.size,0):c.shape===\"line\"\u0026\u0026(A(c.start,{width:.1,height:.1},0),A(c.end,{width:.1,height:.1},0));else if(c.type===\"schematic_net_label\"){const l=Uw(\"net_label\"),u=nde(c),h=(u+Kw*2+xG*(c.text?.length||0)+yG)*l,d=PUt,p=Wzo(c.anchor_side)/180*Math.PI,m=jzo(c,l,u),_=CG(c.anchor_side),f={x:m.x+_.x*h/2,y:m.y+_.y*h/2};A(f,{width:h,height:d},p)}else if(c.type===\"schematic_trace\")for(const l of c.edges)A(l.from,{width:.1,height:.1},0),A(l.to,{width:.1,height:.1},0);else if(c.type===\"schematic_text\"){const u=Uw(\"reference_designator\",c.font_size)??.18,g=c.text??\"\",h=c.display_superscript;if(h){const d=g.split(`\n`),p=Math.max(...d.map((x,E)=\u003ende({text:x,display_superscript:E===d.length-1?h:void 0})))*u,m=c.anchor,_=m===\"left\"||m.endsWith(\"_left\")?p/2:m===\"right\"||m.endsWith(\"_right\")?-p/2:0,f=m===\"top\"||m.startsWith(\"top_\")?0:m===\"bottom\"||m.startsWith(\"bottom_\")?-u:-u/2,I=(d.length+.3)*u,C=-(f-.3*u+I/2),y=-(c.rotation??0)*Math.PI/180;A({x:c.position.x+_*Math.cos(y)-C*Math.sin(y),y:c.position.y+_*Math.sin(y)+C*Math.cos(y)},{width:p,height:I},y)}else{const d=g.length*u,p=u;A(c.position,{width:d,height:p},c.rotation??0)}}else if(c.type===\"schematic_voltage_probe\"){if(A(c.position,{width:.2,height:.4},0),c.name){const l=Uw(\"net_label\"),u=bq(c.name)*l,g=l,h=.3,d=c.label_alignment??\"top_right\";let p=c.position.x,m=c.position.y;d.includes(\"top\")?m+=h+g/2:d.includes(\"bottom\")\u0026\u0026(m-=h+g/2),d.includes(\"right\")?p+=h+u/2:d.includes(\"left\")\u0026\u0026(p-=h+u/2),A({x:p,y:m},{width:u,height:g},0)}}else if(c.type===\"schematic_box\")A({x:c.x+c.width/2,y:c.y+c.height/2},{width:c.width,height:c.height},0);else if(c.type===\"schematic_table\"){const{column_widths:l,row_heights:u}=kUt(c,t),g=l.reduce((I,C)=\u003eI+C,0),h=u.reduce((I,C)=\u003eI+C,0),d=c.anchor??\"center\";let p=c.anchor_position.x,m=c.anchor_position.y;d.includes(\"center\")?p-=g/2:d.includes(\"right\")\u0026\u0026(p-=g),d.includes(\"center\")?m+=h/2:d.includes(\"bottom\")\u0026\u0026(m+=h);const _=p+g/2,f=m-h/2;A({x:_,y:f},{width:g,height:h},0)}else if(c.type===\"schematic_line\")A({x:c.x1,y:c.y1},{width:.02,height:.02},0),A({x:c.x2,y:c.y2},{width:.02,height:.02},0);else if(c.type===\"schematic_circle\")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type===\"schematic_rect\")A(c.center,{width:c.width,height:c.height},c.rotation);else if(c.type===\"schematic_arc\")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type===\"schematic_path\"\u0026\u0026c.points\u0026\u0026c.points.length\u003e0)for(const l of c.points)A(l,{width:.02,height:.02},0);Number.isFinite(n)||(n=-1,o=-1,i=1,r=1),n-=e,o-=e,i+=e,r+=e;const a=qzo(t);return a\u0026\u0026(a.minX\u003cn\u0026\u0026(n=a.minX-e),a.minY\u003co\u0026\u0026(o=a.minY-e),a.maxX\u003ei\u0026\u0026(i=a.maxX+e),a.maxY\u003er\u0026\u0026(r=a.maxY+e)),{minX:n,minY:o,maxX:i,maxY:r};function A(c,l,u){const g=[{x:-l.width/2,y:-l.height/2},{x:l.width/2,y:-l.height/2},{x:l.width/2,y:l.height/2},{x:-l.width/2,y:l.height/2}];for(const h of g){const d=h.x*Math.cos(u)-h.y*Math.sin(u)+c.x,p=h.x*Math.sin(u)+h.y*Math.cos(u)+c.y;n=Math.min(n,d),o=Math.min(o,p),i=Math.max(i,d),r=Math.max(r,p)}}}function NRe(t){if(t.type!==\"element\")throw new Error(\"Expected SVG root element to be of type 'element'\");return t}function FUt(t){return{...t,attributes:{...t.attributes??{}},children:t.children?.map(FUt)??[]}}function Qq(t,e,n,o,i){const r=FUt(t);return r.attributes={...r.attributes,x:lm(e),y:lm(n),width:lm(o),height:lm(i)},delete r.attributes.xmlns,r}function lm(t){return Number.isFinite(t)?Number.parseFloat(t.toFixed(6)).toString():\"0\"}var vq=\"image/svg+xml\";function sJo({schematicGraphic:t,viewport:e}){const n=aJo(t);return{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-graphic\",\"pointer-events\":\"none\",\"data-circuit-json-type\":\"schematic_graphic\",\"data-schematic-graphic-id\":t.schematic_graphic_id,...t.schematic_sheet_id?{\"data-schematic-sheet-id\":t.schematic_sheet_id}:{}},children:[{name:\"image\",type:\"element\",value:\"\",attributes:{href:n,x:lm(e.x),y:lm(e.y),width:lm(e.width),height:lm(e.height),preserveAspectRatio:\"xMidYMid meet\",overflow:\"hidden\",\"pointer-events\":\"none\"},children:[]}]}}function aJo(t){const e=`Unable to render schematic graphic \"${t.schematic_graphic_id}\"`,{asset:n,svg_content:o}=t;if(!n){if(o!==void 0)return LUt(o);throw new Error(`${e}: asset or svg_content is required`)}if(HUt(n.mimetype)!==vq)throw new Error(`${e}: asset.mimetype must be \"${vq}\" (received ${JSON.stringify(n.mimetype)})`);const i=n.url.trim();if(i.toLowerCase().startsWith(\"data:\"))return AJo(i,e),i;if(o!==void 0)return LUt(o);throw new Error(`${e}: asset.url must be an inline SVG data URL because circuit-to-svg cannot synchronously load ${JSON.stringify(n.url)}`)}function AJo(t,e){const n=t.match(/^data:([^,]*),(.*)$/is);if(!n)throw new Error(`${e}: asset.url is not a valid SVG data URL`);const o=n[1].split(\";\").map(A=\u003eA.trim());if(HUt(o.shift()??\"\")!==vq)throw new Error(`${e}: asset.url must use the \"${vq}\" media type`);const r=n[2],s=o.findIndex(A=\u003eA.toLowerCase()===\"base64\"),a=s!==-1;if(a\u0026\u0026s!==o.length-1)throw new Error(`${e}: asset.url must place \"base64\" as its final metadata token`);if(a){const A=r.replace(/\\s+/g,\"\");if(!/^(?:[a-z\\d+/]{4})*(?:[a-z\\d+/]{2}==|[a-z\\d+/]{3}=)?$/i.test(A))throw new Error(`${e}: asset.url is not a valid SVG data URL`);return}if(r.includes(\"#\"))throw new Error(`${e}: asset.url must percent-encode \"#\" in a non-base64 SVG data URL`);try{decodeURIComponent(r)}catch(A){throw new Error(`${e}: asset.url is not a valid SVG data URL`,{cause:A})}}function LUt(t){const e=new TextEncoder().encode(t);let n=\"\";const o=32768;for(let i=0;i\u003ce.length;i+=o)n+=String.fromCharCode(...e.subarray(i,i+o));return`data:${vq};base64,${btoa(n)}`}function HUt(t){return(t.split(\";\",1)[0]??\"\").trim().toLowerCase()}var i_=t=\u003eMath.abs(t.a)*.02,RRe=({text:t,realCenter:e,realToScreenTransform:n})=\u003e{const o=hn(n,e);return{type:\"element\",name:\"text\",value:\"\",attributes:{x:o.x.toString(),y:o.y.toString(),fill:\"red\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${pE(n,\"error\")}px`},children:[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}]}},cJo=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=\u003e{if(!t.text)return[];const o=t.text.startsWith(\"N_\"),i=o?t.text.slice(2):t.text,r=MUt(t),s=[],a=Su[t.symbol_name];if(!a){const O=RRe({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e});return O.attributes={...O.attributes,...r},s.push(O),s}const A=a.primitives.filter(O=\u003eO.type===\"path\"),c=a.primitives.filter(O=\u003eO.type===\"text\"),l=a.primitives.filter(O=\u003eO.type===\"circle\"),u=a.primitives.filter(O=\u003eO.type===\"box\"),g={minX:Math.min(...A.flatMap(O=\u003eO.points.map(U=\u003eU.x))),maxX:Math.max(...A.flatMap(O=\u003eO.points.map(U=\u003eU.x))),minY:Math.min(...A.flatMap(O=\u003eO.points.map(U=\u003eU.y))),maxY:Math.max(...A.flatMap(O=\u003eO.points.map(U=\u003eU.y)))},h=Uw(\"net_label\"),p=nde({...t,text:i})+Kw*2+xG*i.length+yG,m=CG(t.anchor_side),_=t.anchor_position??{x:t.center.x-m.x*p*h/2,y:t.center.y-m.y*p*h/2},I=jb(0/180*Math.PI),C={minX:Math.min(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.x):[])),maxX:Math.max(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.x):[])),minY:Math.min(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.y):[])),maxY:Math.max(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.y):[]))},y=a.ports?.[0]?{x:a.ports[0].x,y:a.ports[0].y}:{x:C.minX,y:(C.minY+C.maxY)/2},x=hn(I,y),E=m0(of(_.x-x.x,_.y-x.y),I,kx(1)),[B,S]=hn(m0(e,E),[g.minX,g.minY]),[Q,w]=hn(m0(e,E),[g.maxX,g.maxY]),M=Math.abs(w-S),k=Math.min(S,w),R=Math.abs(Q-B),F=Math.min(B,Q);s.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay sch-net-label-overlay\",...r,x:F.toString(),y:k.toString(),width:R.toString(),height:M.toString(),fill:\"transparent\"},children:[]});for(const O of A){const U=O.points.map((Y,W)=\u003e{const[te,j]=hn(m0(e,E),[Y.x,Y.y]);return`${W===0?\"M\":\"L\"} ${te} ${j}`}).join(\" \");s.push({name:\"path\",type:\"element\",attributes:{class:\"sch-net-label-symbol-path\",...r,d:U+(O.closed?\" Z\":\"\"),stroke:n.schematic.component_outline,fill:\"none\",\"stroke-width\":`${i_(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}for(const O of c){const U=hn(m0(e,E),O);let Y=O.text;Y===\"{REF}\"?Y=i||\"\":Y===\"{VAL}\"\u0026\u0026(Y=\"\"),Math.abs(e.a);const W={x:U.x,y:U.y};s.push({name:\"text\",type:\"element\",attributes:{class:\"sch-net-label-symbol-text\",...r,x:W.x.toString(),y:W.y.toString(),fill:n.schematic.label_local,\"font-family\":\"sans-serif\",\"text-anchor\":Jzo[O.anchor],\"dominant-baseline\":DUt[O.anchor],\"font-size\":`${pE(e,\"reference_designator\")}px`,...o\u0026\u0026Y===i?{style:\"text-decoration: overline;\"}:{}},children:DRe(Y,O.text===\"{REF}\"?t.display_superscript:void 0,pE(e,\"reference_designator\"),DUt[O.anchor]),value:\"\"})}for(const O of u){const U=hn(m0(e,E),O),Y=m0(e,E).a;s.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-net-label-symbol-box\",...r,x:U.x.toString(),y:U.y.toString(),width:(O.width*Y).toString(),height:(O.height*Y).toString(),fill:\"red\"},value:\"\",children:[]})}for(const O of l){const U=hn(m0(e,E),O),Y=m0(e,E).a;s.push({name:\"circle\",type:\"element\",attributes:{class:\"sch-net-label-symbol-circle\",...r,cx:U.x.toString(),cy:U.y.toString(),r:(O.radius*Y).toString(),fill:\"none\",stroke:n.schematic.component_outline,\"stroke-width\":`${i_(e)}px`},value:\"\",children:[]})}return s},lJo=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=\u003e{if(!t.text)return[];const o=t.text;if(t.symbol_name)return cJo({schNetLabel:t,realToScreenTransform:e,colorMap:n});const i=MUt(t),r=[],s=pE(e,\"net_label\"),a=Uw(\"net_label\"),A=PUt/a/2,c=nde({...t,text:o}),l=hn(e,t.center),u=CG(t.anchor_side),g={...u};g.y*=-1;const h=c+Kw*2+xG*o.length+yG,d=t.anchor_position?hn(e,t.anchor_position):{x:l.x-g.x*h*s/2,y:l.y-g.y*h*s/2},p=t.anchor_position??{x:t.center.x-u.x*h*a/2,y:t.center.y-u.y*h*a/2},m={left:0,top:-90,bottom:90,right:180}[t.anchor_side],_=[{x:0,y:0},{x:Kw,y:A},{x:Kw*2+yG+xG*o.length+c,y:A},{x:Kw*2+yG+xG*o.length+c,y:-A},{x:Kw,y:-A}].map(x=\u003ehn(m0(e,of(p.x,p.y),kx(a),jb(m/180*Math.PI)),x)),f=`\n M ${_[0].x},${_[0].y}\n L ${_[1].x},${_[1].y}\n L ${_[2].x},${_[2].y}\n L ${_[3].x},${_[3].y}\n L ${_[4].x},${_[4].y}\n Z\n `;r.push({name:\"path\",type:\"element\",attributes:{class:\"net-label sch-net-label\",...i,d:f,fill:n.schematic.label_background,stroke:n.schematic.label_global,\"stroke-width\":`${i_(e)}px`},value:\"\",children:[]});const I={x:d.x+g.x*s*.5,y:d.y+g.y*s*.5},C={left:\"start\",top:\"start\",bottom:\"start\",right:\"end\"}[t.anchor_side],y={left:\"\",right:\"\",top:`rotate(90 ${I.x} ${I.y})`,bottom:`rotate(-90 ${I.x} ${I.y})`}[t.anchor_side];return r.push({name:\"text\",type:\"element\",attributes:{class:\"net-label-text sch-net-label-text\",...i,x:I.x.toString(),y:I.y.toString(),fill:n.schematic.label_global,\"text-anchor\":C,\"dominant-baseline\":\"central\",\"font-family\":\"sans-serif\",\"font-variant-numeric\":\"tabular-nums\",\"font-size\":`${s}px`,transform:y},children:DRe(o,t.display_superscript,s),value:\"\"}),r},uJo=.02,gJo=({schPort:t,transform:e})=\u003e{const n=hn(e,t.center),o=Math.abs(e.a)*uJo*2;return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-port-hover sch-port-hover\",\"data-schematic-port-id\":t.source_port_id,...t.schematic_sheet_id?{\"data-schematic-sheet-id\":t.schematic_sheet_id}:{}},children:[{name:\"circle\",type:\"element\",value:\"\",attributes:{cx:n.x.toString(),cy:n.y.toString(),r:o.toString(),fill:\"red\",opacity:\"0\"},children:[]}]}]},OUt=({component:t,transform:e,circuitJson:n})=\u003e{const o=Mr(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),i=[];for(const r of o)i.push(...gJo({schPort:r,transform:e}));return i},dJo=({schPort:t,transform:e,colorMap:n})=\u003e{const{x:i,y:r}=t.center,s=[-1,1].map(a=\u003e{const A=hn(e,{x:i-.05,y:r-a*.05}),c=hn(e,{x:i+.05,y:r+a*.05});return`M ${A.x} ${A.y} L ${c.x} ${c.y}`}).join(\" \");return{name:\"path\",type:\"element\",value:\"\",attributes:{class:\"sch-port-no-connect\",\"data-schematic-port-id\":t.schematic_port_id,\"data-source-port-id\":t.source_port_id,d:s,fill:\"none\",stroke:n.schematic.no_connect,\"stroke-width\":`${i_(e)}px`,\"stroke-linecap\":\"round\"},children:[]}},GUt=.02,hJo=({schPort:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=Math.abs(e.a)*GUt,s=Math.abs(e.a)*GUt,a=hn(e,t.center),A=n.find(l=\u003el.type===\"source_port\"\u0026\u0026l.source_port_id===t.source_port_id);A?.do_not_connect||i.push({name:\"circle\",type:\"element\",value:\"\",attributes:{class:\"component-pin sch-component-pin sch-port-indicator\",cx:a.x.toString(),cy:a.y.toString(),r:r.toString(),fill:\"none\",stroke:o.schematic.component_outline,\"stroke-width\":s.toString(),\"data-schematic-port-id\":t.schematic_port_id},children:[]});const c=t.display_pin_label??A?.name;if(c){const l={...t.center},u=t.distance_from_component_edge??0,g=.05;let h=\"middle\",d=\"\";switch(t.facing_direction){case\"left\":l.x+=u/2,l.y+=g,h=\"start\";break;case\"right\":l.x-=u/2,l.y+=g,h=\"end\";break;case\"up\":l.y-=u/2,l.x-=g,h=\"middle\";break;case\"down\":l.y+=u/2,l.x-=g,h=\"middle\";break}const p=hn(e,l),m=pE(e,\"pin_number\");(t.facing_direction===\"up\"||t.facing_direction===\"down\")\u0026\u0026(d=`rotate(-90 ${p.x} ${p.y})`),i.push({name:\"text\",type:\"element\",value:\"\",attributes:{class:\"port-indicator-label sch-port-label\",x:p.x.toString(),y:p.y.toString(),fill:o.schematic.component_outline,\"font-family\":\"sans-serif\",\"font-size\":`${m*.7}px`,\"text-anchor\":h,\"dominant-baseline\":\"middle\",...d\u0026\u0026{transform:d}},children:[{type:\"text\",value:c,name:\"\",attributes:{},children:[]}]})}return i},YUt=t=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:t.is_overlined?{\"text-decoration\":\"overline\"}:{},children:[{type:\"text\",name:\"\",value:t.text,attributes:{},children:[]}]}),pJo=t=\u003et.filter(e=\u003ee.text).map(YUt),mJo=t=\u003e{const e=[[]];for(const n of t)n.text.split(`\n`).forEach((o,i)=\u003e{i\u003e0\u0026\u0026e.push([]),o\u0026\u0026e.at(-1).push(YUt({...n,text:o}))});return e},TRe=({elm:t,transform:e,colorMap:n})=\u003e{const o=hn(e,t.position),i={center:\"middle\",center_right:\"end\",bottom_left:\"start\",bottom_center:\"middle\",bottom_right:\"end\",left:\"start\",right:\"end\",top:\"middle\",bottom:\"middle\",top_left:\"start\",top_center:\"middle\",top_right:\"end\",center_left:\"start\"},r={center:\"middle\",center_right:\"middle\",bottom_left:\"ideographic\",bottom_center:\"ideographic\",bottom_right:\"ideographic\",left:\"middle\",right:\"middle\",top:\"hanging\",bottom:\"ideographic\",top_left:\"hanging\",top_center:\"hanging\",top_right:\"hanging\",center_left:\"middle\"},s=t.text.split(`\n`),a=mJo(t.text_parts??[]),A=s.length===1?t.text_parts?.length?a[0]:[{type:\"text\",value:t.text,name:t.schematic_text_id,attributes:{},children:[]}]:s.map((c,l)=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:o.x.toString(),...l\u003e0?{dy:\"1em\"}:{}},children:t.text_parts?.length?a[l]??[]:[{type:\"text\",value:c,name:l===0?t.schematic_text_id:\"\",attributes:{},children:[]}]}));return t.display_superscript\u0026\u0026(s.length===1?A:A[A.length-1].children).push(...DRe(\"\",t.display_superscript,pE(e,\"reference_designator\",t.font_size),r[t.anchor]).slice(1)),{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-text\",x:o.x.toString(),y:o.y.toString(),fill:t.color??n.schematic.sheet_label,\"text-anchor\":i[t.anchor],\"dominant-baseline\":r[t.anchor],\"font-family\":\"sans-serif\",\"font-size\":`${pE(e,\"reference_designator\",t.font_size)}px`,transform:`rotate(${t.rotation}, ${o.x}, ${o.y})`},children:A}};function UUt({schArc:t,transform:e,colorMap:n}){const o=hn(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=t.start_angle_degrees*Math.PI/180,A=t.end_angle_degrees*Math.PI/180,c=o.x+i*Math.cos(a),l=o.y+i*Math.sin(a),u=o.x+i*Math.cos(A),g=o.y+i*Math.sin(A);let h=t.end_angle_degrees-t.start_angle_degrees;t.direction===\"clockwise\"\u0026\u0026(h=-h),h\u003c0\u0026\u0026(h+=360);const d=h\u003e180?1:0,p=t.direction===\"clockwise\"?1:0;return[{name:\"path\",type:\"element\",attributes:{class:\"sch-arc\",d:`M ${c} ${l} A ${i} ${i} 0 ${d} ${p} ${u} ${g}`,fill:\"none\",stroke:t.color,\"stroke-width\":s.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(s*3).toString()},\"data-schematic-arc-id\":t.schematic_arc_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var _Jo=({schematicBox:t,transform:e,colorMap:n})=\u003e{const o=hn(e,{x:t.x,y:t.y}),i=hn(e,{x:t.x+t.width,y:t.y+t.height}),r=Math.min(o.y,i.y),s=Math.max(o.y,i.y),a=Math.min(o.x,i.x),A=Math.max(o.x,i.x),c=i_(e),l={class:\"schematic-box sch-box\",x:a.toString(),y:r.toString(),width:(A-a).toString(),height:(s-r).toString(),\"stroke-width\":`${c}px`,stroke:n.schematic.component_outline||\"black\",fill:\"transparent\"};if(t.is_dashed){const u=8*c,g=4*c;l[\"stroke-dasharray\"]=`${u} ${g}`}return[{name:\"rect\",type:\"element\",value:\"\",attributes:l,children:[]}]};function KUt({schCircle:t,transform:e,colorMap:n}){const o=hn(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r;return[{name:\"circle\",type:\"element\",attributes:{class:\"sch-circle\",cx:o.x.toString(),cy:o.y.toString(),r:i.toString(),fill:t.is_filled?t.fill_color??t.color:\"none\",stroke:t.color,\"stroke-width\":s.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(s*3).toString()},\"data-schematic-circle-id\":t.schematic_circle_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var VUt=(t,e)=\u003e{for(const n of t){if(n.type!==\"source_trace\")continue;const o=n;if(Array.isArray(o.connected_source_port_ids)\u0026\u0026o.connected_source_port_ids.includes(e))return!0}return!1},fJo={top_left:\"start\",top_right:\"end\",middle_left:\"start\",middle_right:\"end\",bottom_left:\"start\",bottom_right:\"end\",center:\"middle\",middle_top:\"middle\",middle_bottom:\"middle\"},IJo={top_left:\"hanging\",top_right:\"hanging\",bottom_left:\"ideographic\",bottom_right:\"ideographic\",center:\"middle\",middle_left:\"middle\",middle_right:\"middle\",middle_top:\"hanging\",middle_bottom:\"ideographic\"},CJo=({component:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=Su[t.symbol_name];if(!r)return[RRe({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const s=Mr(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),a=Mr(n).source_component.get(t.source_component_id),A=NUt({schPorts:s,symbol:r,schComponent:t});if(!A[0])return[RRe({text:`Could not match ports for symbol ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const c=RUt(A[1]?.symbolPort??r.center,A[1]?.schPort.center??t.center,A[0].symbolPort,A[0].schPort.center),l=r.primitives.filter(B=\u003eB.type===\"path\"),u=r.primitives.filter(B=\u003eB.type===\"text\"),g=r.primitives.filter(B=\u003eB.type===\"circle\"),h=r.primitives.filter(B=\u003eB.type===\"box\"),d=new Set;for(const B of A)(VUt(n,B.schPort.source_port_id)||Mr(n).source_port.get(B.schPort.source_port_id)?.do_not_connect)\u0026\u0026d.add(B.symbolPort);const p={minX:Math.min(...l.flatMap(B=\u003eB.points.map(S=\u003eS.x))),maxX:Math.max(...l.flatMap(B=\u003eB.points.map(S=\u003eS.x))),minY:Math.min(...l.flatMap(B=\u003eB.points.map(S=\u003eS.y))),maxY:Math.max(...l.flatMap(B=\u003eB.points.map(S=\u003eS.y)))},[m,_]=hn(m0(e,c),[p.minX,p.minY]),[f,I]=hn(m0(e,c),[p.maxX,p.maxY]),C=Math.abs(I-_),y=Math.min(_,I),x=Math.abs(f-m),E=Math.min(m,f);i.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay\",x:E.toString(),y:y.toString(),width:x.toString(),height:C.toString(),fill:\"transparent\"},children:[]});for(const B of l){const{points:S,color:Q,closed:w,fill:M}=B;i.push({type:\"element\",name:\"path\",attributes:{class:\"sch-component-symbol-path\",d:S.map((k,R)=\u003e{const[F,O]=hn(m0(e,c),[k.x,k.y]);return`${R===0?\"M\":\"L\"} ${F} ${O}`}).join(\" \")+(w?\" Z\":\"\"),stroke:o.schematic.component_outline,fill:\"none\",\"stroke-width\":`${i_(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}for(const B of u){const S=hn(m0(e,c),B);let Q=\"\";const w=B.text===\"{REF}\";w?Q=a?.display_name??a?.name??\"\":B.text===\"{VAL}\"\u0026\u0026(Q=t.symbol_display_value??\"\");const M=IJo[B.anchor];i.push({name:\"text\",type:\"element\",attributes:{class:w?\"sch-component-name sch-component-text\":\"sch-component-text\",x:S.x.toString(),y:S.y.toString(),...w?{stroke:o.schematic.background,\"stroke-width\":`${i_(e)}px`,\"paint-order\":\"stroke\"}:{},fill:o.schematic.label_local,\"font-family\":\"sans-serif\",\"text-anchor\":fJo[B.anchor],\"dominant-baseline\":M,\"font-size\":`${pE(e,\"reference_designator\")}px`},value:\"\",children:[{type:\"text\",value:Q,name:\"\",attributes:{},children:[]}]})}for(const B of h){const S=hn(m0(e,c),B),Q=m0(e,c).a;i.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-component-symbol-box\",x:S.x.toString(),y:S.y.toString(),width:(B.width*Q).toString(),height:(B.height*Q).toString(),fill:\"red\"},value:\"\",children:[]})}for(const B of r.ports){if(d.has(B))continue;const S=hn(m0(e,c),B);i.push({type:\"element\",name:\"circle\",attributes:{class:\"component-pin sch-component-pin\",cx:S.x.toString(),cy:S.y.toString(),r:`${Math.abs(e.a)*.02}px`,\"stroke-width\":`${i_(e)}px`,fill:\"none\",stroke:o.schematic.component_outline},value:\"\",children:[]})}for(const B of g){const S=hn(m0(e,c),B),Q=Math.abs(B.radius*e.a);i.push({type:\"element\",name:\"circle\",attributes:{class:\"sch-component-symbol-circle\",cx:S.x.toString(),cy:S.y.toString(),r:`${Q}px`,\"stroke-width\":`${i_(e)}px`,fill:\"none\",stroke:o.schematic.component_outline},value:\"\",children:[]})}return i},wq=.02,zUt=(t,e,n,o,i)=\u003e{const r=Math.PI/6,s={x:t.x-n*Math.cos(e-r),y:t.y-n*Math.sin(e-r)},a={x:t.x-n*Math.cos(e+r),y:t.y-n*Math.sin(e+r)};return{name:\"polygon\",type:\"element\",attributes:{points:`${t.x},${t.y} ${s.x},${s.y} ${a.x},${a.y}`,fill:\"white\",stroke:o,\"stroke-width\":`${i}px`},value:\"\",children:[]}},yJo=({schPort:t,schComponent:e,transform:n,circuitJson:o})=\u003e{const i=[],r=Mr(o).source_port.get(t.source_port_id),s={x:t.center.x,y:t.center.y},a=t.distance_from_component_edge??.4;switch(t.side_of_component){case\"left\":s.x+=a;break;case\"right\":s.x-=a;break;case\"top\":s.y-=a;break;case\"bottom\":s.y+=a;break}const A=hn(n,t.center),c=hn(n,s),l=r!=null\u0026\u0026r.source_component_id==null\u0026\u0026typeof t.is_connected==\"boolean\"?t.is_connected:VUt(o,t.source_port_id),u=t.is_drawn_with_inversion_circle??!1,g=.06,h={...t.center};if(!l\u0026\u0026!r?.do_not_connect)switch(t.side_of_component){case\"left\":h.x+=wq;break;case\"right\":h.x-=wq;break;case\"top\":h.y-=wq;break;case\"bottom\":h.y+=wq;break}const d=hn(n,h);if(u){const I=Math.abs(n.a)*g,C={...c};switch(t.side_of_component){case\"left\":C.x-=I,c.x-=I*2;break;case\"right\":C.x+=I,c.x+=I*2;break;case\"top\":C.y-=I,c.y-=I*2;break;case\"bottom\":C.y+=I,c.y+=I*2;break}i.push({name:\"circle\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-inversion-bubble\",cx:C.x.toString(),cy:C.y.toString(),r:I.toString(),fill:\"white\",stroke:Lg.schematic.component_outline,\"stroke-width\":`${i_(n)}px`},value:\"\",children:[]})}i.push({name:\"line\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-port-line\",x1:c.x.toString(),y1:c.y.toString(),x2:d.x.toString(),y2:d.y.toString(),\"stroke-width\":`${i_(n)}px`},value:\"\",children:[]});const p=Math.abs(n.a)*wq,m=[];!l\u0026\u0026!r?.do_not_connect\u0026\u0026m.push({name:\"circle\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-port-terminal\",cx:A.x.toString(),cy:A.y.toString(),r:p.toString(),\"stroke-width\":`${i_(n)}px`},value:\"\",children:[]}),m.push({name:\"rect\",type:\"element\",attributes:{x:(A.x-p).toString(),y:(A.y-p).toString(),width:(p*2).toString(),height:(p*2).toString(),opacity:\"0\"},value:\"\",children:[]}),i.push({name:\"g\",type:\"element\",value:\"\",attributes:{class:\"sch-port\",\"data-schematic-port-id\":t.source_port_id},children:m});const{has_input_arrow:_,has_output_arrow:f}=t;if((_||f)\u0026\u0026t.side_of_component){const I=Math.abs(n.a)*.1,C=Lg.schematic.component_outline,y=I*Math.cos(Math.PI/6),x=i_(n)/3;let E=0,B=0;t.side_of_component===\"left\"?(E=0,B=Math.PI):t.side_of_component===\"right\"?(E=Math.PI,B=0):t.side_of_component===\"top\"?(E=Math.PI/2,B=-Math.PI/2):t.side_of_component===\"bottom\"\u0026\u0026(E=-Math.PI/2,B=Math.PI/2);const S=_\u0026\u0026f;let Q={...c},w={...c};if(S){const M=y;t.side_of_component===\"left\"?w.x-=M:t.side_of_component===\"right\"?w.x+=M:t.side_of_component===\"top\"?w.y-=M:t.side_of_component===\"bottom\"\u0026\u0026(w.y+=M)}if(_\u0026\u0026i.push(zUt(Q,E,I,C,x)),f){const M={x:w.x+I*Math.cos(B),y:w.y+I*Math.sin(B)};i.push(zUt(M,B,I,C,x))}}return i},xJo=t=\u003e{const e=[],{schPort:n,transform:o}=t,i={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const r=CG(n.side_of_component),s=n.distance_from_component_edge??.4;i.x+=r.x*s/2,i.y+=r.y*s/2,n.side_of_component===\"top\"||n.side_of_component===\"bottom\"?i.x-=.02:i.y+=.02;const a=hn(o,i);return e.push({name:\"text\",type:\"element\",attributes:{class:\"pin-number sch-pin-number\",x:a.x.toString(),y:a.y.toString(),style:\"font-family: sans-serif;\",fill:Lg.schematic.pin_number,\"text-anchor\":\"middle\",\"dominant-baseline\":\"auto\",\"font-size\":`${pE(o,\"pin_number\")}px`,transform:n.side_of_component===\"top\"||n.side_of_component===\"bottom\"?`rotate(-90 ${a.x} ${a.y})`:\"\"},children:[{type:\"text\",value:n.pin_number?.toString()||\"\",name:\"\",attributes:{},children:[]}],value:\"\"}),e},JUt=.1,WUt=t=\u003e{const e=[],{schPort:n,schComponent:o,transform:i,labelColor:r=Lg.schematic.pin_number,labelClassName:s=\"pin-number sch-pin-label\"}=t,a={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const A=CG(n.side_of_component),c=n.distance_from_component_edge??.4;a.x+=A.x*(c+JUt),a.y+=A.y*(c+JUt);const l=hn(i,a),u=n.display_pin_label??o.port_labels?.[`${n.pin_number}`];if(!u)return[];const g=u.startsWith(\"N_\"),h=g?u.slice(2):u,d=n.display_pin_label_text_parts,p=n.is_drawn_with_inversion_circle??!1,m=pE(i,g||p?\"negated_pin_number\":\"pin_number\",n.display_pin_label_font_size);return e.push({name:\"text\",type:\"element\",attributes:{class:s,x:l.x.toString(),y:l.y.toString(),style:`font-family: sans-serif;${g\u0026\u0026!d?.length?\" text-decoration: overline;\":\"\"}`,fill:r,\"text-anchor\":n.side_of_component===\"left\"||n.side_of_component===\"bottom\"?\"start\":\"end\",\"dominant-baseline\":\"middle\",\"font-size\":`${m}px`,transform:n.side_of_component===\"top\"||n.side_of_component===\"bottom\"?`rotate(-90 ${l.x} ${l.y})`:\"\"},children:d?.length?pJo(d):[{type:\"text\",value:h||\"\",name:\"\",attributes:{},children:[]}],value:\"\"}),e},EJo=t=\u003e{const e=[];return e.push(...yJo(t)),e.push(...xJo(t)),e.push(...WUt(t)),e},BJo=({component:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=hn(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),s=hn(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2}),a=s.x-r.x,A=s.y-r.y;i.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component chip sch-component-body\",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),\"stroke-width\":`${i_(e)}px`,fill:o.schematic.component_body,stroke:o.schematic.component_outline},children:[]}),i.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay\",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),fill:\"transparent\"},children:[]});const c=Mr(n).schematic_text.list();for(const u of c)u.schematic_component_id===t.schematic_component_id\u0026\u0026i.push(TRe({elm:u,transform:e,colorMap:o}));const l=Mr(n).schematic_port.list({schematic_component_id:t.schematic_component_id});for(const u of l)i.push(...EJo({schPort:u,schComponent:t,transform:e,circuitJson:n}));return i};function jUt({isDashed:t,dashLength:e,dashGap:n,strokeWidth:o,transform:i}){if(!t)return;const r=Math.abs(i.a),s=o*r*3,a=e!==void 0?e*r:s,A=n!==void 0?n*r:s;return`${a} ${A}`}function $Ut({schLine:t,transform:e,colorMap:n}){const o=hn(e,{x:t.x1,y:t.y1}),i=hn(e,{x:t.x2,y:t.y2}),r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=jUt({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return[{name:\"line\",type:\"element\",attributes:{class:\"sch-line\",x1:o.x.toString(),y1:o.y.toString(),x2:i.x.toString(),y2:i.y.toString(),stroke:t.color,\"stroke-width\":s.toString(),...a\u0026\u0026{\"stroke-dasharray\":a},\"data-schematic-line-id\":t.schematic_line_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}function qUt({schRect:t,transform:e,colorMap:n}){const o=hn(e,t.center),i=Math.abs(e.a)*t.width,r=Math.abs(e.d)*t.height,s=t.stroke_width??.02,a=Math.abs(e.a)*s,A=o.x-i/2,c=o.y-r/2;return[{name:\"rect\",type:\"element\",attributes:{class:\"sch-rect\",x:A.toString(),y:c.toString(),width:i.toString(),height:r.toString(),fill:t.is_filled?t.fill_color??t.color:\"none\",stroke:t.color,\"stroke-width\":a.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(a*3).toString()},...t.rotation!==0\u0026\u0026{transform:`rotate(${t.rotation} ${o.x} ${o.y})`},\"data-schematic-rect-id\":t.schematic_rect_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}function XUt({schPath:t,transform:e,colorMap:n}){const o=t.stroke_color??n.schematic.component_outline,i=t.fill_color??\"none\",r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=jUt({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return!t.points||t.points.length\u003c2?[]:[{name:\"path\",type:\"element\",attributes:{class:\"sch-path\",d:t.points.map(l=\u003ehn(e,{x:l.x,y:l.y})).map((l,u)=\u003e`${u===0?\"M\":\"L\"} ${l.x} ${l.y}`).join(\" \"),stroke:o,\"stroke-width\":s.toString(),fill:t.is_filled?i:\"none\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",...a\u0026\u0026{\"stroke-dasharray\":a},...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var bJo=({component:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=t.schematic_component_id;for(const s of n)!(\"schematic_component_id\"in s)||s.schematic_component_id!==r||(s.type===\"schematic_text\"\u0026\u0026t.is_box_with_pins===!1?i.push(TRe({elm:s,transform:e,colorMap:o})):s.type===\"schematic_line\"?i.push(...$Ut({schLine:s,transform:e,colorMap:o})):s.type===\"schematic_circle\"?i.push(...KUt({schCircle:s,transform:e,colorMap:o})):s.type===\"schematic_rect\"?i.push(...qUt({schRect:s,transform:e,colorMap:o})):s.type===\"schematic_arc\"?i.push(...UUt({schArc:s,transform:e,colorMap:o})):s.type===\"schematic_path\"\u0026\u0026i.push(...XUt({schPath:s,transform:e,colorMap:o})));if(t.is_box_with_pins===!1){const s=n.filter(A=\u003eA.type===\"schematic_line\"\u0026\u0026A.schematic_component_id===r),a=n.filter(A=\u003eA.type===\"schematic_port\"\u0026\u0026A.schematic_component_id===r);for(const A of a){const c=s.find(p=\u003ep.x1===A.center.x\u0026\u0026p.y1===A.center.y||p.x2===A.center.x\u0026\u0026p.y2===A.center.y);if(!c)continue;const l=c.x1===A.center.x\u0026\u0026c.y1===A.center.y?{x:c.x2,y:c.y2}:{x:c.x1,y:c.y1},u=l.x-A.center.x,g=l.y-A.center.y,h=Math.abs(u)\u003eMath.abs(g)?u\u003e0?\"left\":\"right\":g\u003e0?\"bottom\":\"top\",d=Math.max(Math.abs(u),Math.abs(g));i.push(...WUt({schPort:{...A,side_of_component:h,distance_from_component_edge:d},schComponent:t,transform:e,labelClassName:\"port-label sch-pin-label\",labelColor:o.schematic.pin_name}))}}return i};function SJo(t){const{component:e}=t;let n=[];e.is_box_with_pins!==!1\u0026\u0026(e.symbol_name?n=CJo(t):n=BJo(t));const o=bJo(t),i=[...n,...o];return[{type:\"element\",name:\"g\",attributes:{class:\"sch-component\",\"data-circuit-json-type\":\"schematic_component\",\"data-schematic-component-id\":e.schematic_component_id,...e.schematic_sheet_id?{\"data-schematic-sheet-id\":e.schematic_sheet_id}:{}},children:i,value:\"\"}]}function QJo({debugObject:t,transform:e}){if(t.shape===\"rect\"){let[n,o]=hn(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),[i,r]=hn(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]);[o,r]=[Math.min(o,r),Math.max(o,r)];const s=Math.abs(i-n),a=Math.abs(r-o),[A,c]=hn(e,[t.center.x,t.center.y]);return[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:n.toString(),y:o.toString(),width:s.toString(),height:a.toString(),fill:\"none\",stroke:\"red\",\"stroke-width\":(.02*Math.abs(e.a)).toString(),\"stroke-dasharray\":\"5,5\"},children:t.label?[{name:\"text\",type:\"element\",value:\"\",attributes:{x:A.toString(),y:(c-10).toString(),\"text-anchor\":\"middle\",\"font-size\":(.2*Math.abs(e.a)).toString(),fill:\"red\"},children:[{type:\"text\",value:t.label,name:\"\",attributes:{},children:[]}]}]:[]}]}if(t.shape===\"line\"){const[n,o]=hn(e,[t.start.x,t.start.y]),[i,r]=hn(e,[t.end.x,t.end.y]),s=(n+i)/2,a=(o+r)/2;return[{name:\"line\",type:\"element\",value:\"\",attributes:{x1:n.toString(),y1:o.toString(),x2:i.toString(),y2:r.toString(),stroke:\"red\",\"stroke-width\":(.02*Math.abs(e.a)).toString(),\"stroke-dasharray\":\"5,5\"},children:t.label?[{name:\"text\",type:\"element\",value:\"\",attributes:{x:s.toString(),y:(a-10).toString(),\"text-anchor\":\"middle\",\"font-size\":(.2*Math.abs(e.a)).toString(),fill:\"red\"},children:[{type:\"text\",value:t.label,name:\"\",attributes:{},children:[]}]}]:[]}]}return[]}var ZUt=.2/MR,vJo=3/MR,ide=[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"],Pq=[\"A\",\"B\",\"C\",\"D\"];function wJo({schematicSheet:t,transform:e,colorMap:n}){const o=Sq(t),i=n.schematic.sheet,r=n.schematic.net_name,s=[eKt({id:`${t.schematic_sheet_id}_outer`,center:o.center,width:o.width,height:o.height,transform:e,color:i}),eKt({id:`${t.schematic_sheet_id}_inner`,center:o.center,width:o.innerMaxX-o.innerMinX,height:o.innerMaxY-o.innerMinY,transform:e,color:i})];for(let a=1;a\u003cide.length;a++){const A=o.innerMinX+(o.innerMaxX-o.innerMinX)*a/ide.length;s.push(rde({id:`${t.schematic_sheet_id}_top_column_${a}`,x1:A,y1:o.maxY,x2:A,y2:o.innerMaxY,transform:e,color:i}),rde({id:`${t.schematic_sheet_id}_bottom_column_${a}`,x1:A,y1:o.minY,x2:A,y2:o.innerMinY,transform:e,color:i}))}for(let a=1;a\u003cPq.length;a++){const A=o.innerMinY+(o.innerMaxY-o.innerMinY)*a/Pq.length;s.push(rde({id:`${t.schematic_sheet_id}_left_row_${a}`,x1:o.minX,y1:A,x2:o.innerMinX,y2:A,transform:e,color:i}),rde({id:`${t.schematic_sheet_id}_right_row_${a}`,x1:o.maxX,y1:A,x2:o.innerMaxX,y2:A,transform:e,color:i}))}return ide.forEach((a,A)=\u003e{const c=o.innerMinX+(o.innerMaxX-o.innerMinX)*(A+.5)/ide.length;s.push(sde({text:a,x:c,y:(o.maxY+o.innerMaxY)/2,transform:e,color:r}),sde({text:a,x:c,y:(o.minY+o.innerMinY)/2,transform:e,color:r}))}),Pq.forEach((a,A)=\u003e{const c=o.innerMinY+(o.innerMaxY-o.innerMinY)*(Pq.length-A-.5)/Pq.length;s.push(sde({text:a,x:(o.minX+o.innerMinX)/2,y:c,transform:e,color:r}),sde({text:a,x:(o.maxX+o.innerMaxX)/2,y:c,transform:e,color:r}))}),[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-sheet\",\"data-circuit-json-type\":\"schematic_sheet\",\"data-schematic-sheet-id\":t.schematic_sheet_id},children:s}]}function eKt({id:t,center:e,width:n,height:o,transform:i,color:r}){const s=hn(i,e),a=Math.abs(i.a)*n,A=Math.abs(i.d)*o;return{name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"sch-rect\",x:(s.x-a/2).toString(),y:(s.y-A/2).toString(),width:a.toString(),height:A.toString(),fill:\"none\",stroke:r,\"stroke-width\":(Math.abs(i.a)*ZUt).toString(),\"data-schematic-rect-id\":t},children:[]}}function rde({id:t,x1:e,y1:n,x2:o,y2:i,transform:r,color:s}){const a=hn(r,{x:e,y:n}),A=hn(r,{x:o,y:i});return{name:\"line\",type:\"element\",value:\"\",attributes:{class:\"sch-line\",x1:a.x.toString(),y1:a.y.toString(),x2:A.x.toString(),y2:A.y.toString(),stroke:s,\"stroke-width\":(Math.abs(r.a)*ZUt).toString(),\"data-schematic-line-id\":t},children:[]}}function sde({text:t,x:e,y:n,transform:o,color:i}){const r=hn(o,{x:e,y:n});return{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-text\",x:r.x.toString(),y:r.y.toString(),fill:i,\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${pE(o,\"reference_designator\",vJo)}px`,transform:`rotate(0, ${r.x}, ${r.y})`},children:[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}]}}var PJo=({schematicTable:t,transform:e,colorMap:n,circuitJson:o})=\u003e{const{anchor_position:i,border_width:r=.05,anchor:s=\"center\"}=t,{column_widths:a,row_heights:A}=kUt(t,o),c=a.reduce((E,B)=\u003eE+B,0),l=A.reduce((E,B)=\u003eE+B,0);let u=i.x,g=i.y;s.includes(\"center\")?u-=c/2:s.includes(\"right\")\u0026\u0026(u-=c),s.includes(\"center\")?g+=l/2:s.includes(\"bottom\")\u0026\u0026(g+=l);const h=[],d=r*Math.abs(e.a),p=i_(e),[m,_]=hn(e,[u,g]),[f,I]=hn(e,[u+c,g-l]);h.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-table-border\",x:m.toString(),y:_.toString(),width:(f-m).toString(),height:(I-_).toString(),fill:\"none\",stroke:n.schematic.table,\"stroke-width\":d.toString()},children:[],value:\"\"});const C=o.filter(E=\u003eE.type===\"schematic_table_cell\"\u0026\u0026E.schematic_table_id===t.schematic_table_id);let y=u;for(let E=0;E\u003ca.length-1;E++){y+=a[E];let B=g;for(let S=0;S\u003cA.length;S++){const Q=B-A[S];if(!C.some(M=\u003eM.start_column_index\u003c=E\u0026\u0026M.end_column_index\u003eE\u0026\u0026M.start_row_index\u003c=S\u0026\u0026M.end_row_index\u003e=S)){const M=hn(e,{x:y,y:B}),k=hn(e,{x:y,y:Q});h.push({name:\"line\",type:\"element\",attributes:{class:\"sch-table-grid-line\",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,\"stroke-width\":p.toString()},children:[],value:\"\"})}B=Q}}let x=g;for(let E=0;E\u003cA.length-1;E++){x-=A[E];let B=u;for(let S=0;S\u003ca.length;S++){const Q=B+a[S];if(!C.some(M=\u003eM.start_row_index\u003c=E\u0026\u0026M.end_row_index\u003eE\u0026\u0026M.start_column_index\u003c=S\u0026\u0026M.end_column_index\u003e=S)){const M=hn(e,{x:B,y:x}),k=hn(e,{x:Q,y:x});h.push({name:\"line\",type:\"element\",attributes:{class:\"sch-table-grid-line\",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,\"stroke-width\":p.toString()},children:[],value:\"\"})}B=Q}}for(const E of C)if(E.text){const B=a.slice(E.start_column_index,E.end_column_index+1).reduce((te,j)=\u003ete+j,0),S=A.slice(E.start_row_index,E.end_row_index+1).reduce((te,j)=\u003ete+j,0),Q=u+a.slice(0,E.start_column_index).reduce((te,j)=\u003ete+j,0),w=g-A.slice(0,E.start_row_index).reduce((te,j)=\u003ete+j,0),{cell_padding:M=.2}=t,k=E.horizontal_align??\"center\",R=E.vertical_align??\"middle\";let F={x:Q+B/2,y:w-S/2};k===\"left\"?F.x=Q+M:k===\"right\"\u0026\u0026(F.x=Q+B-M),R===\"top\"?F.y=w-M:R===\"bottom\"\u0026\u0026(F.y=w-S+M);const O=hn(e,F),U=pE(e,\"reference_designator\",E.font_size),Y={left:\"start\",center:\"middle\",right:\"end\"},W={top:\"hanging\",middle:\"middle\",bottom:\"ideographic\"};h.push({name:\"text\",type:\"element\",attributes:{class:\"sch-table-text\",x:O.x.toString(),y:O.y.toString(),\"font-size\":`${U}px`,\"text-anchor\":Y[k],\"dominant-baseline\":W[R],fill:n.schematic.table,\"font-family\":\"sans-serif\"},children:[{type:\"text\",value:E.text,name:\"\",attributes:{},children:[]}],value:\"\"})}return[{name:\"g\",type:\"element\",attributes:{class:\"sch-table\",\"data-schematic-table-id\":t.schematic_table_id},children:h,value:\"\"}]};function MJo({trace:t,transform:e,colorMap:n}){const o=t.edges;if(o.length===0)return[];const i=[],r=[];let s=\"\";for(let a=0;a\u003co.length;a++){const A=o[a];if(A.is_crossing)continue;const[c,l]=hn(e,[A.from.x,A.from.y]),[u,g]=hn(e,[A.to.x,A.to.y]);a===0||o[a-1]?.is_crossing?s+=`M ${c} ${l} L ${u} ${g}`:s+=` L ${u} ${g}`}s\u0026\u0026(i.push({name:\"path\",type:\"element\",attributes:{d:s,class:\"trace-invisible-hover-outline sch-trace-hitbox\",stroke:n.schematic.wire,fill:\"none\",\"stroke-width\":`${i_(e)*8}px`,\"stroke-linecap\":\"round\",opacity:\"0\",\"stroke-linejoin\":\"round\"},value:\"\",children:[]}),i.push({name:\"path\",type:\"element\",attributes:{class:\"sch-trace-path\",d:s,stroke:n.schematic.wire,fill:\"none\",\"stroke-width\":`${i_(e)}px`,\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"},value:\"\",children:[]}));for(const a of o){if(!a.is_crossing)continue;const[A,c]=hn(e,[a.from.x,a.from.y]),[l,u]=hn(e,[a.to.x,a.to.y]),g=(A+l)/2,h=(c+u)/2,d=l-A,p=u-c,m=Math.sqrt(d*d+p*p),_=m*.7,f=-p/m*_,I=d/m*_,C=g+f,y=h-Math.abs(I);r.push({name:\"path\",type:\"element\",attributes:{class:\"trace-crossing-outline sch-trace-crossing-outline\",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.background,fill:\"none\",\"stroke-width\":`${i_(e)*1.5}px`,\"stroke-linecap\":\"butt\"},value:\"\",children:[]}),r.push({name:\"path\",type:\"element\",attributes:{class:\"sch-trace-crossing-path\",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.wire,fill:\"none\",\"stroke-width\":`${i_(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}if(t.junctions)for(const a of t.junctions){const[A,c]=hn(e,[a.x,a.y]);r.push({name:\"circle\",type:\"element\",attributes:{cx:A.toString(),cy:c.toString(),r:(Math.abs(e.a)*.03).toString(),class:\"trace-junction sch-trace-junction\",fill:n.schematic.junction},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"trace sch-trace\",\"data-layer\":\"base\",\"data-circuit-json-type\":\"schematic_trace\",\"data-schematic-trace-id\":t.schematic_trace_id,...t.subcircuit_connectivity_map_key\u0026\u0026{\"data-subcircuit-connectivity-map-key\":t.subcircuit_connectivity_map_key}},children:i},{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"trace-overlays sch-trace-overlays\",\"data-layer\":\"overlay\",\"data-circuit-json-type\":\"schematic_trace\",\"data-schematic-trace-id\":t.schematic_trace_id,...t.subcircuit_connectivity_map_key\u0026\u0026{\"data-subcircuit-connectivity-map-key\":t.subcircuit_connectivity_map_key}},children:r}]}function DJo({probe:t,transform:e,colorMap:n,fallbackColor:o}){const[i,r]=hn(e,[t.position.x,t.position.y]),s=t.color??o??n.schematic.reference,a=Math.abs(e.a)*.6,A=Math.abs(e.a)*.28,c=t.label_alignment??\"top_right\";let l,u,g,h;switch(c){case\"top_left\":l=-135*Math.PI/180,u=\"end\",g=-8,h=-8;break;case\"top_center\":l=-90*Math.PI/180,u=\"middle\",g=0,h=-8;break;case\"top_right\":l=-45*Math.PI/180,u=\"start\",g=8,h=-8;break;case\"center_left\":l=180*Math.PI/180,u=\"end\",g=-8,h=0;break;case\"center\":l=-90*Math.PI/180,u=\"middle\",g=0,h=-8;break;case\"center_right\":l=0*Math.PI/180,u=\"start\",g=8,h=0;break;case\"bottom_left\":l=135*Math.PI/180,u=\"end\",g=-8,h=8;break;case\"bottom_center\":l=90*Math.PI/180,u=\"middle\",g=0,h=8;break;case\"bottom_right\":l=45*Math.PI/180,u=\"start\",g=8,h=8;break;default:l=-50*Math.PI/180,u=\"start\",g=8,h=0}const d=i+a*Math.cos(l),p=r+a*Math.sin(l),m=i,_=r,f=[`M ${d},${p}`,`L ${m},${_}`,`M ${m},${_}`,`L ${m-A*Math.cos((l*180/Math.PI+150)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+150)*Math.PI/180)}`,`L ${m-A*Math.cos((l*180/Math.PI+210)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+210)*Math.PI/180)}`,\"Z\"].join(\" \"),I=(d+g).toString(),C=(p+h).toString(),y=[];if(t.name\u0026\u0026t.voltage!==void 0)y.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:I},children:[{type:\"text\",value:t.name,name:\"\",attributes:{},children:[]}]}),y.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:I,dy:\"1.2em\"},children:[{type:\"text\",value:`${t.voltage}V`,name:\"\",attributes:{},children:[]}]});else{const x=[];t.name\u0026\u0026x.push(t.name),t.voltage!==void 0\u0026\u0026x.push(`${t.voltage}V`),y.push({type:\"text\",value:x.join(\" \"),name:\"\",attributes:{},children:[]})}return[{name:\"path\",type:\"element\",attributes:{class:\"sch-voltage-probe\",d:f,stroke:s,fill:s,\"stroke-width\":`${i_(e)}px`},value:\"\",children:[]},{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-voltage-probe-label\",x:I,y:C,fill:s,\"text-anchor\":u,\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${pE(e,\"reference_designator\")}px`,\"font-weight\":\"bold\",\"data-schematic-voltage-probe-id\":t.schematic_voltage_probe_id},children:y}]}var Mq=6,ade=12,lI=12,EG=6,tKt=14,Ade=11,nKt=280,NJo=140,oKt=t=\u003et.type===\"schematic_component_overlap_warning\"||t.type===\"schematic_component_styling_warning\"||t.type===\"schematic_element_outside_sheet_warning\"||t.type===\"schematic_manual_edit_conflict_warning\";function RJo({circuitJson:t,transform:e,svgWidth:n,svgHeight:o,colorMap:i}){const r=i.schematic.erc_warning,s=[];return t.filter(oKt).flatMap(a=\u003e{const A=TJo(a,t,e);if(!A)return[];const c=Math.max(1,n-lI*2),l=YJo(a.message,Math.max(12,Math.floor((Math.min(nKt,c)-EG*2)/(Ade*.56)))),u=Math.max(...l.map(I=\u003eI.length)),g=Math.min(nKt,c,Math.max(Math.min(NJo,c),u*Ade*.56+EG*2)),h=EG*2+l.length*tKt,d=HJo({targetBounds:A,calloutWidth:g,calloutHeight:h,svgWidth:n,svgHeight:o,occupiedCalloutBounds:s});s.push(d);const p=GJo(a),m=cde(A,Mq),_=OJo(d,m);return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-warning\",\"data-type\":a.type,\"data-warning-id\":p,role:\"note\",\"aria-label\":a.message},children:[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:m.minX.toString(),y:m.minY.toString(),width:(m.maxX-m.minX).toString(),height:(m.maxY-m.minY).toString(),rx:\"6\",fill:\"none\",stroke:r,\"stroke-width\":\"1\",\"stroke-dasharray\":\"4,3\",\"data-warning-reference\":\"target\"},children:[]},{name:\"line\",type:\"element\",value:\"\",attributes:{x1:_.from.x.toString(),y1:_.from.y.toString(),x2:_.to.x.toString(),y2:_.to.y.toString(),stroke:r,\"stroke-width\":\"1\",\"data-warning-reference\":\"leader\"},children:[]},{name:\"rect\",type:\"element\",value:\"\",attributes:{x:d.minX.toString(),y:d.minY.toString(),width:g.toString(),height:h.toString(),fill:\"rgba(255, 250, 235, 0.97)\",stroke:r,\"stroke-width\":\"1\",\"data-warning-reference\":\"callout\"},children:[]},{name:\"text\",type:\"element\",value:\"\",attributes:{x:(d.minX+EG).toString(),y:(d.minY+EG+Ade).toString(),fill:\"#5c4300\",\"font-family\":\"sans-serif\",\"font-size\":Ade.toString()},children:l.map((I,C)=\u003e({name:\"tspan\",type:\"element\",value:\"\",attributes:{x:(d.minX+EG).toString(),dy:C===0?\"0\":tKt.toString()},children:[VJo(I)]}))}]}]})}function TJo(t,e,n){const i=kJo(t).map(r=\u003eFJo(e,r)).filter(r=\u003e!!r).map(r=\u003eLJo(r,n)).filter(r=\u003e!!r);return i.length===0?null:i.reduce(UJo)}function kJo(t){switch(t.type){case\"schematic_component_overlap_warning\":return t.schematic_component_ids;case\"schematic_component_styling_warning\":return[t.schematic_component_id,...t.schematic_port_ids??[]];case\"schematic_manual_edit_conflict_warning\":return[t.schematic_component_id];case\"schematic_element_outside_sheet_warning\":return[t.schematic_element_id]}}function FJo(t,e){return t.find(n=\u003e{if(!n.type.startsWith(\"schematic_\"))return!1;const o=`${n.type}_id`;return n[o]===e})}function LJo(t,e){if(t.type===\"schematic_component\"){const n=hn(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),o=hn(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2});return kRe([n,o])}if(t.type===\"schematic_port\"){const n=hn(e,t.center);return cde(kRe([n]),4)}if(t.type===\"schematic_net_label\"){const n=hn(e,t.anchor_position??t.center),o=Math.max(28,t.text.length*8);return{minX:n.x-o/2,minY:n.y-10,maxX:n.x+o/2,maxY:n.y+10}}if(t.type===\"schematic_trace\"){const n=t.edges.flatMap(o=\u003e[hn(e,o.from),hn(e,o.to)]);return n.length===0?null:cde(kRe(n),4)}return null}function HJo({targetBounds:t,calloutWidth:e,calloutHeight:n,svgWidth:o,svgHeight:i,occupiedCalloutBounds:r}){const s=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2,A=t.minY-Mq-ade-n,c=t.maxY+Mq+ade,l=t.minX-Mq-ade-e,u=t.maxX+Mq+ade,g=[];A\u003e=lI\u0026\u0026g.push(Dq({x:BG(s-e/2,lI,o-lI-e),y:A,width:e,height:n,side:\"top\"})),c+n\u003c=i-lI\u0026\u0026g.push(Dq({x:BG(s-e/2,lI,o-lI-e),y:c,width:e,height:n,side:\"bottom\"})),u+e\u003c=o-lI\u0026\u0026g.push(Dq({x:u,y:BG(a-n/2,lI,i-lI-n),width:e,height:n,side:\"right\"})),l\u003e=lI\u0026\u0026g.push(Dq({x:l,y:BG(a-n/2,lI,i-lI-n),width:e,height:n,side:\"left\"}));const h=g.find(d=\u003er.every(p=\u003e!KJo(cde(d,4),p)));return h||(g[0]?g[0]:Dq({x:BG(s-e/2,lI,o-lI-e),y:BG(A,lI,i-lI-n),width:e,height:n,side:\"top\"}))}function OJo(t,e){const n=(e.minX+e.maxX)/2,o=(e.minY+e.maxY)/2,i=(t.minX+t.maxX)/2,r=(t.minY+t.maxY)/2;switch(t.side){case\"top\":return{from:{x:i,y:t.maxY},to:{x:n,y:e.minY}};case\"bottom\":return{from:{x:i,y:t.minY},to:{x:n,y:e.maxY}};case\"left\":return{from:{x:t.maxX,y:r},to:{x:e.minX,y:o}};case\"right\":return{from:{x:t.minX,y:r},to:{x:e.maxX,y:o}}}}function GJo(t){switch(t.type){case\"schematic_component_overlap_warning\":return t.schematic_component_overlap_warning_id;case\"schematic_component_styling_warning\":return t.schematic_component_styling_warning_id;case\"schematic_element_outside_sheet_warning\":return t.schematic_element_outside_sheet_warning_id;case\"schematic_manual_edit_conflict_warning\":return t.schematic_manual_edit_conflict_warning_id}}function YJo(t,e){const n=t.trim().split(/\\s+/),o=[];let i=\"\";for(const r of n){const s=i?`${i} ${r}`:r;if(s.length\u003c=e||i.length===0){i=s;continue}o.push(i),i=r}return i\u0026\u0026o.push(i),o.length\u003e0?o:[\"Warning\"]}function kRe(t){return{minX:Math.min(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxX:Math.max(...t.map(e=\u003ee.x)),maxY:Math.max(...t.map(e=\u003ee.y))}}function UJo(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}function cde(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function KJo(t,e){return!(t.maxX\u003c=e.minX||t.minX\u003e=e.maxX||t.maxY\u003c=e.minY||t.minY\u003e=e.maxY)}function Dq({x:t,y:e,width:n,height:o,side:i}){return{minX:t,minY:e,maxX:t+n,maxY:e+o,side:i}}function BG(t,e,n){return n\u003ce?(e+n)/2:Math.min(Math.max(t,e),n)}function VJo(t){return{name:\"\",type:\"text\",value:t,attributes:{},children:[]}}function Nq(t,e){const n=t.filter(ge=\u003ege.type===\"schematic_sheet\"),o=zzo(n);let i=o;e?.schematicSheetId!==void 0?i=n.find(ge=\u003ege.schematic_sheet_id===e.schematicSheetId)??o:e?.schematicSheetIndex!==void 0\u0026\u0026(i=n.find(ge=\u003ege.sheet_index===e.schematicSheetIndex)??o);const r=i?t.filter(ge=\u003e!ge.type.startsWith(\"schematic_\")||oKt(ge)||\"schematic_sheet_id\"in ge\u0026\u0026ge.schematic_sheet_id===i.schematic_sheet_id):t,s=rJo(r),a=s.maxX-s.minX,A=s.maxY-s.minY,c=e?.width??1200,l=e?.height??600,u=e?.colorOverrides,g={...Lg,schematic:{...Lg.schematic,...u?.schematic??{}}},h=a/A,d=c/l;let p;if(h\u003ed){const ge=c/h;p={x:0,y:(l-ge)/2}}else{const ge=l*h;p={x:(c-ge)/2,y:0}}const m=TUo([{x:s.minX,y:s.maxY},{x:s.maxX,y:s.maxY},{x:s.maxX,y:s.minY}],[{x:p.x,y:p.y},{x:c-p.x,y:p.y},{x:c-p.x,y:l-p.y}]),_=[];if(_.push({name:\"rect\",type:\"element\",attributes:{class:\"boundary\",x:\"0\",y:\"0\",width:c.toString(),height:l.toString()},children:[],value:\"\"}),e?.grid){const ge=typeof e.grid==\"object\"?e.grid:{};_.push(Kzo({bounds:s,transform:m,...ge}))}const f=[],I=[],C=[],y=[],x=[],E=[],B=[],S=[],Q=[],w=[],M=[],k=[],R=[],F=[],O=[],U=[],Y=[],W=JJo({transform:m,svgWidth:c,svgHeight:l,schematicSheet:i}),te=Array.isArray(g.simulation_palette)?g.simulation_palette:Array.isArray(g.palette)?g.palette:[];let j=0;for(const ge of r)if(ge.type===\"schematic_sheet\")U.push(...wJo({schematicSheet:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_graphic\")Y.push(sJo({schematicGraphic:ge,viewport:WJo({availableViewport:W,schematicGraphic:ge,transform:m})}));else if(ge.type===\"schematic_debug_object\")f.push(...QJo({debugObject:ge,transform:m}));else if(ge.type===\"schematic_component\")I.push(...SJo({component:ge,transform:m,circuitJson:r,colorMap:g})),Q.push(...OUt({component:ge,transform:m,circuitJson:r}));else if(ge.type===\"schematic_box\")B.push(..._Jo({schematicBox:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_trace\")C.push(...MJo({trace:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_net_label\")y.push(...lJo({schNetLabel:ge,realToScreenTransform:m,colorMap:g}));else if(ge.type===\"schematic_text\"\u0026\u0026!ge.schematic_component_id)x.push(TRe({elm:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_voltage_probe\"){const _e=te.length\u003e0?te[j%te.length]:void 0;j+=1,E.push(...DJo({probe:ge,transform:m,colorMap:g,fallbackColor:_e}))}else if(ge.type===\"schematic_table\")S.push(...PJo({schematicTable:ge,transform:m,colorMap:g,circuitJson:r}));else if(ge.type===\"schematic_line\"){if(ge.schematic_component_id)continue;M.push(...$Ut({schLine:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_circle\"){if(ge.schematic_component_id)continue;k.push(...KUt({schCircle:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_rect\"){if(ge.schematic_component_id)continue;R.push(...qUt({schRect:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_arc\"){if(ge.schematic_component_id)continue;F.push(...UUt({schArc:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_path\"){if(ge.schematic_component_id)continue;O.push(...XUt({schPath:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_port\"){const _e=r.find(ue=\u003eue.type===\"source_port\"\u0026\u0026ue.source_port_id===ge.source_port_id);_e?.type===\"source_port\"\u0026\u0026_e.do_not_connect===!0\u0026\u0026w.push(dJo({schPort:ge,transform:m,colorMap:g})),e?.drawPorts\u0026\u0026w.push(...hJo({schPort:ge,transform:m,circuitJson:r,colorMap:g}))}const J=C.filter(ge=\u003ege.attributes?.[\"data-layer\"]!==\"overlay\"),oe=C.filter(ge=\u003ege.attributes?.[\"data-layer\"]===\"overlay\");_.push(...Y,...f,...U,...J,...oe,...M,...k,...R,...F,...O,...I,...Q,...w,...y,...x,...B,...E,...S),e?.labeledPoints\u0026\u0026_.push(Vzo({points:e.labeledPoints,transform:m})),e?.shouldDrawWarnings\u0026\u0026_.push(...RJo({circuitJson:r,transform:m,svgWidth:c,svgHeight:l,colorMap:g}));const ie=Gw(t),ne=Yw;if(e?.showErrorsInTextOverlay){const ge=IG(t);ge\u0026\u0026_.push(ge)}const le={name:\"svg\",type:\"element\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",class:[\"tscircuit-schematic\",e?.className].filter(Boolean).join(\" \"),width:c.toString(),height:l.toString(),style:`background-color: ${g.schematic.background}`,\"data-real-to-screen-transform\":NUo(m),...ie\u0026\u0026{\"data-software-used-string\":ie},...e?.includeVersion\u0026\u0026{\"data-circuit-to-svg-version\":ne}},children:[{name:\"style\",type:\"element\",children:[{type:\"text\",value:`\n .boundary { fill: ${g.schematic.background}; }\n .schematic-boundary { fill: none; stroke: #fff; }\n .component { fill: none; stroke: ${g.schematic.component_outline}; }\n .chip { fill: ${g.schematic.component_body}; stroke: ${g.schematic.component_outline}; }\n .component-pin { fill: none; stroke: ${g.schematic.component_outline}; }\n .text { font-family: sans-serif; fill: ${g.schematic.wire}; }\n .pin-number { fill: ${g.schematic.pin_number}; }\n .port-label { fill: ${g.schematic.reference}; }\n .component-name { fill: ${g.schematic.reference}; }\n ${e?.css??\"\"}\n `,name:\"\",attributes:{},children:[]}],value:\"\",attributes:{}},..._],value:\"\"};return Ow(le)}var zJo=Nq;function JJo({transform:t,svgWidth:e,svgHeight:n,schematicSheet:o}){if(!o)return{x:0,y:0,width:e,height:n};const i=Sq(o),r=hn(t,{x:i.innerMinX,y:i.innerMaxY}),s=hn(t,{x:i.innerMaxX,y:i.innerMinY});return{x:Math.min(r.x,s.x),y:Math.min(r.y,s.y),width:Math.abs(s.x-r.x),height:Math.abs(s.y-r.y)}}function WJo({availableViewport:t,schematicGraphic:e,transform:n}){if(e.width===void 0\u0026\u0026e.height===void 0)return t;const o=e.width===void 0?t.width:iKt(e.width*Math.hypot(n.a,n.b),t.width),i=e.height===void 0?t.height:iKt(e.height*Math.hypot(n.c,n.d),t.height);return{x:t.x+(t.width-o)/2,y:t.y+(t.height-i)/2,width:o,height:i}}function iKt(t,e){return Number.isFinite(t)?Math.max(0,Math.min(t,e)):e}var jJo=1e3,$Jo=28,qJo=16;function XJo(t,e){const n=t.filter(u=\u003eu.type===\"schematic_sheet\").slice().sort((u,g)=\u003e(u.sheet_index??0)-(g.sheet_index??0));if(n.length\u003c=1)return Nq(t,e);const o=e?.width??jJo,i=e?.sheetLabelHeight??$Jo,r=e?.sheetGap??qJo,s={...Lg,schematic:{...Lg.schematic,...e?.colorOverrides?.schematic??{}}},a=[];let A=0;n.forEach((u,g)=\u003e{const h=Sq(u),d=e?.height??Math.round(o*h.height/h.width),p=Nq(t,{...e,schematicSheetId:u.schematic_sheet_id,schematicSheetIndex:void 0,width:o,height:d}),m=NRe($W(p)),_=A+i,f=u.display_name??u.name??`Sheet ${u.sheet_index??g+1}`,I=ZJo({transformStr:m.attributes?.[\"data-real-to-screen-transform\"],panelTop:_,labelHeight:i,schematicSheet:u});a.push({name:\"text\",type:\"element\",value:\"\",attributes:{class:\"stacked-sheet-label\",x:lm(I.x),y:lm(I.y),\"font-family\":\"sans-serif\",\"font-size\":`${lm(i*.55)}px`,fill:s.schematic.reference,\"data-schematic-sheet-id\":u.schematic_sheet_id},children:[{name:\"\",type:\"text\",value:f,attributes:{},children:[]}]},Qq(m,0,_,o,d)),A=_+d+r});const c=Math.max(0,A-r),l={name:\"svg\",type:\"element\",value:\"\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",class:\"tscircuit-stacked-schematic\",width:lm(o),height:lm(c),viewBox:`0 0 ${lm(o)} ${lm(c)}`,style:`background-color: ${s.schematic.background}`},children:[{name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"boundary\",x:\"0\",y:\"0\",width:lm(o),height:lm(c),fill:s.schematic.background},children:[]},...a]};return Ow(l)}function ZJo({transformStr:t,panelTop:e,labelHeight:n,schematicSheet:o}){const i=e-n*.28;if(!t)return{x:4,y:i};const r=Sq(o),s=hn(wUo(t),{x:r.minX,y:r.maxY});return{x:Math.max(2,s.x),y:i}}var rKt=({simulationResult:t,fallbackName:e})=\u003e{const n=t.name??e,o=t.simulation_parameter_sweep_coordinate;return o?`${n} (${o.parameter_value}${o.parameter_unit})`:n},eWo=t=\u003e{const e=t[0]??0,n=t[1];return{timestamps_ms:t,start_time_ms:e,end_time_ms:t.at(-1)??0,time_per_step:n===void 0?1:Math.abs(n-e)}},tWo=t=\u003et.type===\"simulation_transient_voltage_graph\"?t.simulation_transient_voltage_graph_id:t.simulation_transient_current_graph_id,sKt=t=\u003e{switch(t.type){case\"simulation_transient_voltage_graph\":return t.simulation_transient_voltage_graph_id;case\"simulation_transient_current_graph\":return t.simulation_transient_current_graph_id;case\"simulation_dc_operating_point_voltage\":return t.simulation_dc_operating_point_voltage_id;case\"simulation_dc_operating_point_current\":return t.simulation_dc_operating_point_current_id;case\"simulation_dc_sweep_voltage_graph\":return t.simulation_dc_sweep_voltage_graph_id;case\"simulation_dc_sweep_current_graph\":return t.simulation_dc_sweep_current_graph_id;case\"simulation_ac_sweep_voltage_graph\":return t.simulation_ac_sweep_voltage_graph_id;case\"simulation_ac_sweep_current_graph\":return t.simulation_ac_sweep_current_graph_id}},nWo=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=\u003e{switch(t.type){case\"simulation_dc_operating_point_voltage\":return{horizontalCoordinates:[0],measuredLevels:[t.voltage],isCurrent:!1};case\"simulation_dc_operating_point_current\":return{horizontalCoordinates:[0],measuredLevels:[t.current],isCurrent:!0};case\"simulation_dc_sweep_voltage_graph\":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.voltage_levels,isCurrent:!1};case\"simulation_dc_sweep_current_graph\":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.current_levels,isCurrent:!0};case\"simulation_ac_sweep_voltage_graph\":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_voltages.map(o=\u003ee===\"phase\"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!1};case\"simulation_ac_sweep_current_graph\":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_currents.map(o=\u003ee===\"phase\"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!0}}},oWo=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=\u003e{if(t.type===\"simulation_transient_voltage_graph\"||t.type===\"simulation_transient_current_graph\")return t.simulation_parameter_sweep_coordinate?{...t,name:rKt({simulationResult:t,fallbackName:t.name??tWo(t)})}:t;const o=sKt(t),{horizontalCoordinates:i,measuredLevels:r,isCurrent:s}=nWo({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n}),a={simulation_experiment_id:t.simulation_experiment_id,simulation_parameter_sweep_coordinate:t.simulation_parameter_sweep_coordinate,name:rKt({simulationResult:t,fallbackName:o}),color:t.color,...eWo(i)};return s?{type:\"simulation_transient_current_graph\",simulation_transient_current_graph_id:o,current_levels:r,...a}:{type:\"simulation_transient_voltage_graph\",simulation_transient_voltage_graph_id:o,voltage_levels:r,...a}},iWo=({simulationResultType:t,experiment:e})=\u003et?.startsWith(\"simulation_ac_sweep_\")?\"Frequency (Hz)\":t?.startsWith(\"simulation_dc_sweep_\")?e?.dc_sweep_unit?`DC Sweep (${e.dc_sweep_unit})`:\"DC Sweep\":t?.startsWith(\"simulation_dc_operating_point_\")?\"Operating Point\":\"Time (ms)\",rWo=({results:t,acSweepView:e,experiment:n})=\u003e{const o=t[0]?.type,i=o?.startsWith(\"simulation_ac_sweep_\")??!1,r=i\u0026\u0026n?.ac_sweep_type!==\"linear\";return{graphs:t.map(a=\u003eoWo({simulationResult:a,acSweepView:e,usesLogarithmicXValues:r})),xAxisTitle:iWo({simulationResultType:o,experiment:n}),yAxisTitle:i\u0026\u0026e===\"phase\"?\"Phase (deg)\":void 0,usesLogarithmicXValues:r}};function Rq(t){return t?.valuePerDiv!==void 0\u0026\u0026Number.isFinite(t.valuePerDiv)\u0026\u0026Math.abs(t.valuePerDiv)\u003eNumber.EPSILON}var sWo=1200,aWo=600,um={top:64,right:100,bottom:80,left:100},FRe=24,LRe=56,AWo=56,cWo=8,aKt=\"#1f77b4\";function Hx(t){return t.type===\"simulation_transient_current_graph\"}function HRe(t){return Hx(t)?t.simulation_transient_current_graph_id:t.simulation_transient_voltage_graph_id}function AKt(t){return Hx(t)?\"data-simulation-transient-current-graph-id\":\"data-simulation-transient-voltage-graph-id\"}function cKt(t){return Hx(t)?t.current_levels:t.voltage_levels}function lWo(t){const e=t.some(o=\u003eHx(o.graph)),n=t.some(o=\u003e!Hx(o.graph));return e\u0026\u0026!n?\"Current (A)\":n\u0026\u0026!e?\"Voltage (V)\":\"Value\"}function uWo(t){return`simulation-graph-${t.replace(/[^a-zA-Z0-9_-]+/g,\"-\")}`}function ji(t){if(!Number.isFinite(t))return\"0\";const e=Number.parseFloat(t.toFixed(6));return Number.isInteger(e),e.toString()}function ac(t,e,n=[]){return{name:t,type:\"element\",value:\"\",attributes:e,children:n}}function LB(t){return{name:\"\",type:\"text\",value:t,attributes:{},children:[]}}function ORe(t,e){if(!Number.isFinite(t))return`0 ${e}`;if(t===0)return`0 ${e}`;const n=Math.abs(t),o=[{threshold:1e6,factor:1e6,prefix:\"M\"},{threshold:1e3,factor:1e3,prefix:\"k\"},{threshold:1,factor:1,prefix:\"\"},{threshold:.001,factor:.001,prefix:\"m\"},{threshold:1e-6,factor:1e-6,prefix:\"µ\"},{threshold:1e-9,factor:1e-9,prefix:\"n\"}],i=o.find(s=\u003en\u003e=s.threshold)??o[o.length-1],r=t/i.factor;return`${lKt(r)} ${i.prefix}${e}`}function gWo(t){return`${lKt(t)} div`}function lKt(t){if(!Number.isFinite(t))return\"0\";const e=Math.abs(t),n=e\u003e=100?0:e\u003e=10?1:e\u003e=1?2:3;return Number.parseFloat(t.toFixed(n)).toString()}function uKt(t,e){const n=e.tickLabelOverrides?.get(t);if(n!==void 0)return n;const{ticks:o}=e;if(o.length\u003c=1)return ji(t);const i=o[o.length-1]-o[0];if(!Number.isFinite(i)||i===0)return ji(t);const r=dWo(i),s=10**r;return(Math.round(t*s)/s).toFixed(r).replace(/\\.0+$/,\"\").replace(/(\\.\\d*?)0+$/,\"$1\").replace(/\\.$/,\"\")}function dWo(t){return t\u003e=100?0:t\u003e=10?1:t\u003e=1?2:3}function hWo({graphs:t,valueAxis:e,scaleY:n,plotLeft:o,plotWidth:i,plotHeight:r}){const s=um.top,a=um.top+r,A=o,c=o+i,l=[],u=t.filter(g=\u003eRq(g.scopeTraceDisplay));for(const[g,h]of u.entries()){const d=g%2===0?\"left\":\"right\",p=Math.floor(g/2),m=d===\"left\"?A-10-p*LRe:c+10+p*LRe,_=d===\"left\"?m-6:m+6,f=d===\"left\"?\"end\":\"start\",I=d===\"left\"?m+6:m-6,C=h.scopeTraceDisplay;if(Rq(C)){l.push(ac(\"line\",{class:\"axis axis-y axis-y-scope\",x1:ji(m),y1:ji(s),x2:ji(m),y2:ji(a),style:`stroke: ${h.color};`}),ac(\"text\",{class:\"axis-title axis-title-y axis-title-y-scope\",x:ji(m),y:ji(s-12),\"text-anchor\":\"middle\",style:`fill: ${h.color}; font-size: 10px;`},[LB(h.label)]));for(const y of e.ticks){const x=n(y),E=(C.center??0)+(y-(C.offsetDivs??0))*C.valuePerDiv;l.push(ac(\"line\",{class:\"axis-tick axis-tick-y axis-tick-y-scope\",x1:ji(m),y1:ji(x),x2:ji(I),y2:ji(x),style:`stroke: ${h.color};`}),ac(\"text\",{class:\"axis-label axis-label-y axis-label-y-scope\",x:ji(_),y:ji(x),\"text-anchor\":f,\"dominant-baseline\":\"middle\",style:`fill: ${h.color}; font-size: 10px;`},[LB(ORe(E,Hx(h.graph)?\"A\":\"V\"))]))}}}return l}function pWo({timeAxis:t,valueAxis:e,graphs:n,scaleX:o,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a,yAxisTitle:A,xAxisTitle:c,usesScopeTraceDisplay:l}){const u=um.top+a,g=r,h=r+s,d=[ac(\"line\",{class:\"axis axis-x\",x1:ji(g),y1:ji(u),x2:ji(h),y2:ji(u)}),...l?[]:[ac(\"line\",{class:\"axis axis-y\",x1:ji(g),y1:ji(um.top),x2:ji(g),y2:ji(u)})]];for(const p of t.ticks){const m=ji(o(p));d.push(ac(\"line\",{class:\"axis-tick axis-tick-x\",x1:m,y1:ji(u),x2:m,y2:ji(u+6)}),ac(\"text\",{class:\"axis-label axis-label-x\",x:m,y:ji(u+22),\"text-anchor\":\"middle\"},[LB(uKt(p,t))]))}if(l)d.push(...hWo({graphs:n,valueAxis:e,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a}));else{for(const p of e.ticks){const m=ji(i(p));d.push(ac(\"line\",{class:\"axis-tick axis-tick-y\",x1:ji(g-6),y1:m,x2:ji(g),y2:m}),ac(\"text\",{class:\"axis-label axis-label-y\",x:ji(g-10),y:m,\"text-anchor\":\"end\",\"dominant-baseline\":\"middle\"},[LB(uKt(p,e))]))}d.push(ac(\"text\",{class:\"axis-title axis-title-y\",x:ji(g-64),y:ji(um.top+a/2),transform:`rotate(-90 ${ji(g-64)} ${ji(um.top+a/2)})`,\"text-anchor\":\"middle\"},[LB(A)]))}return d.push(ac(\"text\",{class:\"axis-title axis-title-x\",x:ji(g+s/2),y:ji(u+48),\"text-anchor\":\"middle\"},[LB(c)])),ac(\"g\",{class:\"axes\"},d)}function lde(t,e=!1){if(t.length===0)return{domainMin:0,domainMax:1,ticks:[0,1]};const n=Math.min(...t),o=Math.max(...t);if(n===o){const A=n===0?1:Math.abs(n)*.1||1;return{domainMin:n-A,domainMax:n+A,ticks:[n-A,n,n+A]}}const i=gKt(n,o),r=i.length\u003e0?[...i]:[n,o];let s=r[0],a=r[r.length-1];if(e\u0026\u0026r.length\u003e1){const A=Math.abs(r[1]-r[0]),c=.1;n\u003cs+A*c\u0026\u0026(s-=A,r.unshift(s)),o\u003ea-A*c\u0026\u0026(a+=A,r.push(a))}return{domainMin:s,domainMax:a,ticks:r}}function mWo({values:t,graphs:e,experiment:n}){const o=ude(n?.start_time_ms),i=ude(n?.end_time_ms),r=e.map(p=\u003eude(p.start_time_ms)).filter(p=\u003ep!==void 0),s=e.map(p=\u003eude(p.end_time_ms)).filter(p=\u003ep!==void 0),a=o??(r.length\u003e0?Math.min(...r):void 0),A=i??(s.length\u003e0?Math.max(...s):void 0);if(a===void 0||A===void 0||a===A)return lde(t);const c=Math.min(a,A),l=Math.max(a,A),g=(l-c)*.12,h=gKt(c,l).filter(p=\u003ep\u003ec+g\u0026\u0026p\u003cl-g),d=_Wo([c,...h,l]);return{domainMin:c,domainMax:l,ticks:d,tickLabelOverrides:new Map([[c,ji(c)],[l,ji(l)]])}}function ude(t){return typeof t==\"number\"\u0026\u0026Number.isFinite(t)?t:void 0}function _Wo(t){const e=[...t].sort((o,i)=\u003eo-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)\u003e1e-12)\u0026\u0026n.push(o)}return n}function gKt(t,e,n=6){const o=e-t;if(!Number.isFinite(o)||o\u003c=Number.EPSILON)return[t,e];const i=fWo(o/Math.max(1,n-1)),r=Math.floor(t/i)*i,s=Math.ceil(e/i)*i,a=[];for(let A=r;A\u003c=s+i/2;A+=i)a.push(Number.parseFloat(A.toPrecision(12)));return a}function fWo(t){if(!Number.isFinite(t)||t\u003c=0)return 1;const e=Math.floor(Math.log10(t)),n=t/10**e;let o;return n\u003c=1?o=1:n\u003c=2?o=2:n\u003c=5?o=5:o=10,o*10**e}function IWo(t,e){return ac(\"rect\",{class:\"background\",x:\"0\",y:\"0\",width:ji(t),height:ji(e)})}function CWo(t,e,n,o){return ac(\"defs\",{},[ac(\"clipPath\",{id:t},[ac(\"rect\",{x:ji(e),y:ji(um.top),width:ji(n),height:ji(o)})])])}function yWo({timeAxis:t,valueAxis:e,scaleX:n,scaleY:o,plotLeft:i,plotWidth:r,plotHeight:s}){const a=um.top,A=um.top+s,c=i,l=i+r,u=[];for(const g of t.ticks){const h=ji(n(g));u.push(ac(\"line\",{class:\"grid-line grid-line-x\",x1:h,y1:ji(a),x2:h,y2:ji(A)}))}for(const g of e.ticks){const h=ji(o(g));u.push(ac(\"line\",{class:\"grid-line grid-line-y\",x1:ji(c),y1:h,x2:ji(l),y2:h}))}return ac(\"g\",{class:\"grid\"},u)}function dKt(t,e,n,o){if(!Number.isFinite(t)||!Number.isFinite(e)){const r=(n+o)/2;return()=\u003er}const i=e-t;if(Math.abs(i)\u003cNumber.EPSILON){const r=(n+o)/2;return()=\u003er}return r=\u003en+(r-t)/i*(o-n)}function xWo(t,e,n){return ac(\"rect\",{class:\"plot-background\",x:ji(t),y:ji(um.top),width:ji(e),height:ji(n)})}function EWo(){const t=`\n:root { color-scheme: light; }\nsvg { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; }\n.background { fill: ${Lg.schematic.background}; }\n.plot-background { fill: #ffffff; }\n.grid-line { stroke: rgba(0, 0, 0, 0.08); stroke-width: 1; }\n.axis { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1.5; }\n.axis-tick { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1; }\n.axis-label { fill: rgba(0, 0, 0, 0.75); font-size: 12px; }\n.axis-title { fill: rgba(0, 0, 0, 0.9); font-size: 14px; font-weight: 600; }\n.legend-label { fill: rgba(0, 0, 0, 0.75); font-size: 11px; }\n.legend-line { stroke-width: 3; }\n.scope-channel-card { fill: #ffffff; stroke: rgba(0, 0, 0, 0.22); stroke-width: 1; }\n.scope-channel-header-text { fill: #ffffff; font-size: 14px; font-weight: 700; }\n.scope-channel-detail { fill: rgba(0, 0, 0, 0.42); font-size: 14px; }\n.simulation-line { fill: none; stroke-width: 2.5; }\n.simulation-point { stroke-width: 0; }\n.chart-title { fill: rgba(0, 0, 0, 0.85); font-size: 18px; font-weight: 600; }\n`;return ac(\"style\",{},[LB(t)])}function hKt(t,e){const n=t[e];if(typeof n==\"string\")return n}function BWo(t,e,n,o){const r=[4,8],s=r.map(g=\u003eji(g)).join(\" \"),A=r.reduce((g,h)=\u003eg+h,0)/3,c=[];t.forEach((g,h)=\u003e{if(g.points.length===0)return;const d=[];g.points.forEach((I,C)=\u003e{const y=ji(n(I.timeMs)),x=ji(o(I.displayValue));d.push(`${C===0?\"M\":\"L\"} ${y} ${x}`)});const p={class:\"simulation-line\",d:d.join(\" \"),stroke:g.color,\"clip-path\":`url(#${e})`,[AKt(g.graph)]:HRe(g.graph)};g.graph.source_component_id\u0026\u0026(p[\"data-source-component-id\"]=g.graph.source_component_id);const m=hKt(g.graph,\"source_probe_id\");m\u0026\u0026(p[\"data-source-probe-id\"]=m);const _=hKt(g.graph,\"source_probe_name\");_\u0026\u0026(p[\"data-source-probe-name\"]=_),g.graph.subcircuit_connectivity_map_key\u0026\u0026(p[\"data-subcircuit-connectivity-map-key\"]=g.graph.subcircuit_connectivity_map_key);const f=g.points.map(I=\u003e{const C=ji(n(I.timeMs)),y=ji(o(I.displayValue));return ac(\"circle\",{class:\"simulation-point\",cx:C,cy:y,r:\"2.5\",fill:g.color,\"clip-path\":`url(#${e})`})});c.push({entry:g,graphIndex:h,pathAttributes:p,pointElements:f})});const l=[];for(let g=0;g\u003c3;g++)for(const h of c){const d=(h.graphIndex+g)%3,p=ji(d*A);l.push(ac(\"path\",{...h.pathAttributes,\"stroke-dasharray\":s,\"stroke-dashoffset\":p}))}const u=c.flatMap(g=\u003eg.pointElements);return ac(\"g\",{class:\"data-series\"},[...l,...u])}function bWo(t,e){return t?.name?ac(\"text\",{class:\"chart-title\",x:ji(e/2),y:ji(um.top-40),\"text-anchor\":\"middle\"},[LB(t.name)]):null}var pKt=16;function SWo(t,e,n,o){const i=o.map((r,s)=\u003eac(\"tspan\",{x:\"20\",dy:s===0?\"0\":String(pKt)},[LB(r)]));return ac(\"g\",{class:\"legend-item\",transform:`translate(${ji(e)} ${ji(n)})`},[ac(\"line\",{class:\"legend-line\",x1:\"0\",y1:\"0\",x2:\"16\",y2:\"0\",stroke:t.color}),ac(\"text\",{class:\"legend-label\",x:\"20\",y:\"0\",\"dominant-baseline\":\"middle\"},i)])}var QWo=15;function vWo(t){const e=t.split(\"_\");if(e.length\u003c=1)return[t];const n=[];let o=e[0]??\"\";for(let i=1;i\u003ce.length;i++){const r=e[i]??\"\",s=`${o}_${r}`;s.length\u003eQWo?(n.push(o),o=r):o=s}return o\u0026\u0026n.push(o),n}var wWo=24;function PWo(t,e){let n=um.top;const o=t.map(i=\u003e{const r=e-um.right+10,s=vWo(i.label),a=SWo(i,r,n,s),A=s.length*pKt;return n+=Math.max(A,wWo),a});return ac(\"g\",{class:\"legend\"},o)}var DR=118,gde=94,bG=18;function mKt(t,e){const n=Math.floor((e+bG)/(DR+bG)),o=Math.max(1,Math.min(n,t)),i=Math.max(1,Math.ceil(t/o)),r=o*DR+(o-1)*bG,s=i*gde+(i-1)*bG;return{columns:o,rows:i,x:Math.max(0,(e-r)/2),height:s}}var dde=20,GRe=8,MWo=14;function DWo(t,e,n){const o=mKt(t.length,e),i=[];for(const[r,s]of t.entries()){const a=r%o.columns,A=Math.floor(r/o.columns);i.push(NWo(s,r,o.x+a*(DR+bG),n+FRe+A*(gde+bG)))}return ac(\"g\",{class:\"scope-legend\"},i)}function NWo(t,e,n,o){const i=t.scopeTraceDisplay,r=Hx(t.graph)?\"A\":\"V\",s=i\u0026\u0026Rq(i)?ORe(i.valuePerDiv,r):`1 ${r}`,a=ORe(i?.center??0,r),A=gWo(i?.offsetDivs??0),c=`Ch${e+1}`,u=[t.label===c?void 0:t.label,`${s}/div`,A,a].filter(h=\u003e!!h),g=u.length\u003e1?(gde-dde-GRe*2-MWo)/(u.length-1):0;return ac(\"g\",{class:\"scope-channel\",transform:`translate(${ji(n)} ${ji(o)})`,[AKt(t.graph)]:HRe(t.graph)},[ac(\"rect\",{class:\"scope-channel-card\",x:\"0\",y:\"0\",width:ji(DR),height:ji(gde),rx:\"6\",ry:\"6\"}),ac(\"rect\",{x:\"0\",y:\"0\",width:ji(DR),height:ji(dde),rx:\"6\",ry:\"6\",fill:t.color}),ac(\"rect\",{x:\"0\",y:ji(dde-6),width:ji(DR),height:\"6\",fill:t.color}),ac(\"text\",{class:\"scope-channel-header-text\",x:ji(DR/2),y:\"14\",\"text-anchor\":\"middle\"},[LB(c)]),...u.map((h,d)=\u003eac(\"text\",{class:\"scope-channel-detail\",x:ji(GRe),y:ji(dde+GRe+d*g),\"dominant-baseline\":\"hanging\"},[LB(h)]))])}function RWo(t){const e=Math.ceil(t/2),n=Math.floor(t/2);return{left:_Kt(e),right:_Kt(n)}}function _Kt(t){if(t\u003c=1)return 0;const e=10+(t-1)*LRe+6+AWo+cWo;return Math.max(0,e-um.left)}function hde(t){return t.type===\"simulation_transient_voltage_graph\"||t.type===\"simulation_transient_current_graph\"||t.type===\"simulation_dc_operating_point_voltage\"||t.type===\"simulation_dc_operating_point_current\"||t.type===\"simulation_dc_sweep_voltage_graph\"||t.type===\"simulation_dc_sweep_current_graph\"||t.type===\"simulation_ac_sweep_voltage_graph\"||t.type===\"simulation_ac_sweep_current_graph\"}function TWo(t){return t?.type===\"simulation_transient_current_graph\"}function kWo(t){return t?.type===\"simulation_transient_voltage_graph\"}function YRe(t){return t?.type===\"simulation_experiment\"}function fKt(t){return t?.type===\"simulation_voltage_probe\"}function IKt(t){return t?.type===\"simulation_current_probe\"}function CKt(t){return t?.type===\"simulation_oscilloscope_trace\"}function FWo(t,e){const n=HWo(t),o=cKt(t),i=Math.min(n.length,o.length),r=[],s=LWo(e);for(let a=0;a\u003ci;a++){const A=Number(n[a]??Number.NaN),c=Number(o[a]??Number.NaN);!Number.isFinite(A)||!Number.isFinite(c)||r.push({timeMs:A,rawValue:c,displayValue:s(c)})}return r}function LWo(t){if(!Rq(t))return i=\u003ei;const e=t.center??0,n=t.offsetDivs??0,o=t.valuePerDiv;return i=\u003en+(i-e)/o}function HWo(t){const e=cKt(t);if(Array.isArray(t.timestamps_ms)\u0026\u0026t.timestamps_ms.length===e.length)return t.timestamps_ms.map(r=\u003eNumber(r));const n=e.length;if(n===0)return[];const o=[];for(let r=0;r\u003cn;r++)o.push(t.start_time_ms+t.time_per_step*r);const i=o.length\u003e0?o[o.length-1]:void 0;return i!==void 0\u0026\u0026Number.isFinite(t.end_time_ms)\u0026\u0026Number.isFinite(i)\u0026\u0026Math.abs(i-t.end_time_ms)\u003et.time_per_step/2\u0026\u0026o.push(t.end_time_ms),o}function pde(t,e){const n=t[e];if(typeof n==\"string\")return n}function OWo(t,e,n,o){const i=Hx(t)?\"I\":\"V\";if(n?.displayName)return n.displayName;if(t.simulation_parameter_sweep_coordinate\u0026\u0026t.name)return t.name;if(e?.name)return`${i}(${e.name})`;const r=pde(t,\"source_probe_name\");if(r)return`${i}(${r})`;if(t.source_component_id){const s=o.get(t.source_component_id);if(s)return`${i}(${s})`}return t.name?t.name:t.source_component_id?`Probe ${t.source_component_id}`:HRe(t)}function GWo(t,e,n,o,i,r){if(Hx(t)){const A=o.get(t.simulation_transient_current_graph_id);if(A)return A;const c=pde(t,\"source_probe_id\")??(e?.type===\"simulation_current_probe\"?e.simulation_current_probe_id:void 0);return c?r.get(c):void 0}const s=n.get(t.simulation_transient_voltage_graph_id);if(s)return s;const a=pde(t,\"source_probe_id\")??(e?.type===\"simulation_voltage_probe\"?e.simulation_voltage_probe_id:void 0);return a?i.get(a):void 0}function YWo(t,e,n,o,i){const r=pde(t,\"source_probe_id\");if(r){const s=Hx(t)?n.get(r):e.get(r);if(s)return s}if(t.source_component_id)return Hx(t)?i.get(t.source_component_id):o.get(t.source_component_id)}function UWo(t,e){if(e)return{displayName:e.display_name,color:e.color,center:e.display_center_value,offsetDivs:e.display_center_offset_divs,valuePerDiv:Hx(t)?e.amps_per_div:e.volts_per_div}}function KWo(t,e){const n=Array.isArray(Lg.simulation_palette)?Lg.simulation_palette:Array.isArray(Lg.palette)?Lg.palette:[],o=e.filter(fKt),i=e.filter(IKt),r=e.filter(CKt),s=new Map,a=new Map,A=new Map,c=new Map,l=new Map,u=new Map,g=new Map,h=new Map,d=new Map,p=new Map,m=new Map,_=new Map;for(const f of r)f.simulation_transient_voltage_graph_id\u0026\u0026d.set(f.simulation_transient_voltage_graph_id,f),f.simulation_transient_current_graph_id\u0026\u0026p.set(f.simulation_transient_current_graph_id,f),f.simulation_voltage_probe_id\u0026\u0026m.set(f.simulation_voltage_probe_id,f),f.simulation_current_probe_id\u0026\u0026_.set(f.simulation_current_probe_id,f);for(const f of o)l.set(f.simulation_voltage_probe_id,f),f.name\u0026\u0026f.source_component_id\u0026\u0026s.set(f.source_component_id,f.name),f.color\u0026\u0026f.source_component_id\u0026\u0026a.set(f.source_component_id,f.color),f.source_component_id\u0026\u0026g.set(f.source_component_id,f);for(const f of i)u.set(f.simulation_current_probe_id,f),f.name\u0026\u0026f.source_component_id\u0026\u0026A.set(f.source_component_id,f.name),f.color\u0026\u0026f.source_component_id\u0026\u0026c.set(f.source_component_id,f.color),f.source_component_id\u0026\u0026h.set(f.source_component_id,f);return t.map((f,I)=\u003e{const C=YWo(f,l,u,g,h),y=GWo(f,C,d,p,m,_),x=UWo(f,y),E=FWo(f,x),B=VWo(n,I),S=zWo(f,C,Hx(f)?c:a),Q=f.color??x?.color??S??B,w=OWo(f,C,x,Hx(f)?A:s);return{graph:f,points:E,color:Q,label:w,scopeTraceDisplay:x,usesScopeTraceDisplay:Rq(x)}}).filter(f=\u003ef.points.length\u003e0)}function VWo(t,e){return t.length===0?aKt:t[e%t.length]??aKt}function zWo(t,e,n){if(e?.color)return e.color;if(t.source_component_id)return n.get(t.source_component_id)}function yKt({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r=\"magnitude\",width:s=sWo,height:a=aWo,includeVersion:A}){const c=o?new Set(o):null,l=n?new Set(n):null,u=!!(c||l),g=i?new Set(i):null,h=t.find(J=\u003eYRe(J)\u0026\u0026J.simulation_experiment_id===e),d=t.filter(J=\u003ehde(J)\u0026\u0026J.simulation_experiment_id===e\u0026\u0026(!g||g.has(sKt(J)))\u0026\u0026(!u||J.type===\"simulation_transient_voltage_graph\"\u0026\u0026(c?.has(J.simulation_transient_voltage_graph_id)??!1)||J.type===\"simulation_transient_current_graph\"\u0026\u0026(l?.has(J.simulation_transient_current_graph_id)??!1))),p=rWo({results:d,acSweepView:r,experiment:h}),m=p.graphs;if(m.length===0)throw new Error(`No simulation analysis results found for simulation_experiment_id \"${e}\"`);const _=KWo(m,t),f=_.flatMap(J=\u003eJ.points);if(f.length===0)throw new Error(`Simulation results for simulation_experiment_id \"${e}\" do not contain any datapoints`);const I=f.map(J=\u003eJ.timeMs);let C;p.usesLogarithmicXValues?C=JWo(I):p.xAxisTitle===\"Time (ms)\"?C=mWo({values:I,graphs:m,experiment:h}):C=lde(I);const y=lde(f.map(J=\u003eJ.displayValue),!0),x=_.some(J=\u003eJ.usesScopeTraceDisplay),E=x?RWo(_.length):{left:0,right:0},B=s+E.left+E.right,S=x?mKt(_.length,B):null,Q=S?a+FRe+S.height+FRe:a,w=Math.max(1,s-um.left-um.right),M=Math.max(1,a-um.top-um.bottom),k=um.left+E.left,R=dKt(C.domainMin,C.domainMax,k,k+w),F=dKt(y.domainMin,y.domainMax,um.top+M,um.top),O=uWo(e),U=Gw(t),Y=Yw,W=bWo(h,B),te=[EWo(),IWo(B,Q),CWo(O,k,w,M),xWo(k,w,M),yWo({timeAxis:C,valueAxis:y,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M}),BWo(_,O,R,F),pWo({timeAxis:C,valueAxis:y,graphs:_,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M,yAxisTitle:p.yAxisTitle??lWo(_),xAxisTitle:p.xAxisTitle,usesScopeTraceDisplay:x}),x?DWo(_,B,a):PWo(_,B),...W?[W]:[]],j=ac(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:B.toString(),height:Q.toString(),style:`background-color: ${Lg.schematic.background}`,viewBox:`0 0 ${ji(B)} ${ji(Q)}`,\"data-simulation-experiment-id\":e,...h?.name\u0026\u0026{\"data-simulation-experiment-name\":h.name},...U\u0026\u0026{\"data-software-used-string\":U},...A\u0026\u0026{\"data-circuit-to-svg-version\":Y}},te);return Ow(j)}var JWo=t=\u003e{const e=lde(t);return{...e,tickLabelOverrides:new Map(e.ticks.map(n=\u003e[n,ji(10**n)]))}},WWo=1200,jWo=1200,xKt=.55;function $Wo({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s=WWo,height:a=jWo,schematicHeightRatio:A=xKt,schematicOptions:c,includeVersion:l,graphAboveSchematic:u=!1,showErrorsInTextOverlay:g}){const h=t.filter(F=\u003e!YRe(F)\u0026\u0026!hde(F)),d=XWo(A),p=Math.max(1,a*d),m=Math.max(1,a-p),_=p+m,f=_===0?1:a/_,I=p*f,C=m*f,y=Nq(h,{...c,width:s,height:I,includeVersion:!1,showErrorsInTextOverlay:g}),x=yKt({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s,height:C,includeVersion:!1}),E=NRe($W(y)),B=NRe($W(x)),S=qWo(B)??{width:s,height:C},Q=S.width\u003e0?s*(S.height/S.width):C,w=I+Q,M=[];u?(M.push(Qq(B,0,0,s,Q)),M.push(Qq(E,0,Q,s,I))):(M.push(Qq(E,0,0,s,I)),M.push(Qq(B,0,I,s,Q)));const k=Gw(h),R={name:\"svg\",type:\"element\",value:\"\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",width:lm(s),height:lm(w),viewBox:`0 0 ${lm(s)} ${lm(w)}`,\"data-simulation-experiment-id\":e,...k\u0026\u0026{\"data-software-used-string\":k},...l\u0026\u0026{\"data-circuit-to-svg-version\":Yw}},children:M};return Ow(R)}function qWo(t){const e=t.attributes?.viewBox;if(typeof e!=\"string\")return null;const n=e.trim().split(/[\\s,]+/).map(r=\u003eNumber.parseFloat(r));if(n.length!==4)return null;const o=n.at(2),i=n.at(3);return!Number.isFinite(o)||!Number.isFinite(i)||o===void 0||i===void 0||o\u003c=0||i\u003c=0?null:{width:o,height:i}}function XWo(t){return Number.isFinite(t)?t\u003c=0?0:t\u003e=1?1:t:xKt}var EKt=[\"pcb_board\",\"pcb_solder_paste\"];function ZWo(t,e){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=t.filter(Q=\u003eQ.type===\"pcb_board\"||Q.type===\"pcb_panel\"||Q.type===\"pcb_solder_paste\"\u0026\u0026Q.layer===e.layer);for(const Q of s)if(Q.type===\"pcb_board\")Q.outline\u0026\u0026Array.isArray(Q.outline)\u0026\u0026Q.outline.length\u003e=3?S(Q.outline):\"center\"in Q\u0026\u0026\"width\"in Q\u0026\u0026\"height\"in Q\u0026\u0026B(Q.center,Q.width,Q.height);else if(Q.type===\"pcb_panel\"){const w=Q,M=lt.parse(w.width),k=lt.parse(w.height);if(M!==void 0\u0026\u0026k!==void 0){const R=w.center??{x:M/2,y:k/2};B(R,M,k)}}else Q.type===\"pcb_solder_paste\"\u0026\u0026\"x\"in Q\u0026\u0026\"y\"in Q\u0026\u0026B({x:Q.x,y:Q.y},0,0);const a=1,A=i-n+2*a,c=r-o+2*a,l=e.width??800,u=e.height??600,g=l/A,h=u/c,d=Math.min(g,h),p=(l-A*d)/2,m=(u-c*d)/2,_=m0(of(p-n*d+a*d,u-m+o*d-a*d),kx(d,-d)),f={transform:_,layer:e.layer,colorMap:ch},I=s.sort((Q,w)=\u003e(EKt.indexOf(w.type)??9999)-(EKt.indexOf(Q.type)??9999)).flatMap(Q=\u003eejo({elm:Q,ctx:f})),C=Gw(t),y=Yw,x=[{name:\"style\",type:\"element\",children:[{type:\"text\",value:\"\"}]},{name:\"rect\",type:\"element\",attributes:{class:\"boundary\",x:\"0\",y:\"0\",fill:\"#000\",width:l.toString(),height:u.toString()}},tjo(_,n,o,i,r),...I].filter(Q=\u003eQ!==null);if(e?.showErrorsInTextOverlay){const Q=IG(t);Q\u0026\u0026x.push(Q)}const E={name:\"svg\",type:\"element\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",width:l.toString(),height:u.toString(),...C\u0026\u0026{\"data-software-used-string\":C},...e.includeVersion\u0026\u0026{\"data-circuit-to-svg-version\":y}},value:\"\",children:x};try{return Ow(E)}catch(Q){throw console.error(\"Error stringifying SVG object:\",Q),Q}function B(Q,w,M){const k=w/2,R=M/2;n=Math.min(n,Q.x-k),o=Math.min(o,Q.y-R),i=Math.max(i,Q.x+k),r=Math.max(r,Q.y+R)}function S(Q){for(const w of Q)n=Math.min(n,w.x),o=Math.min(o,w.y),i=Math.max(i,w.x),r=Math.max(r,w.y)}}function ejo({elm:t,ctx:e}){const{transform:n}=e;switch(t.type){case\"pcb_board\":return tUt(t,e);case\"pcb_solder_paste\":return sUt(t,e);default:return[]}}function tjo(t,e,n,o,i){const[r,s]=hn(t,[e,n]),[a,A]=hn(t,[o,i]),c=Math.abs(a-r),l=Math.abs(A-s),u=Math.min(r,a),g=Math.min(s,A);return{name:\"rect\",type:\"element\",value:\"\",children:[],attributes:{class:\"pcb-boundary\",fill:\"none\",stroke:\"#fff\",\"stroke-width\":\"0.3\",x:u.toString(),y:g.toString(),width:c.toString(),height:l.toString()}}}const njo=Object.freeze(Object.defineProperty({__proto__:null,CIRCUIT_TO_SVG_VERSION:Yw,circuitJsonToPcbSvg:uzo,circuitJsonToSchematicSvg:zJo,colorMap:Lg,convertCircuitJsonToAssemblySvg:_Ut,convertCircuitJsonToPcbSvg:pUt,convertCircuitJsonToPinoutSvg:SUt,convertCircuitJsonToSchematicSimulationSvg:$Wo,convertCircuitJsonToSchematicSvg:Nq,convertCircuitJsonToSimulationGraphSvg:yKt,convertCircuitJsonToSolderPasteMask:ZWo,convertCircuitJsonToStackedSchematicSheetsSvg:XJo,createErrorTextOverlay:IG,createSvgObjectsForSchComponentPortHovers:OUt,getSoftwareUsedString:Gw,isSimulationAnalysisResult:hde,isSimulationCurrentProbe:IKt,isSimulationExperiment:YRe,isSimulationOscilloscopeTrace:CKt,isSimulationTransientCurrentGraph:TWo,isSimulationTransientVoltageGraph:kWo,isSimulationVoltageProbe:fKt},Symbol.toStringTag,{value:\"Module\"})),ojo=t=\u003et.some(hde);const mde=\"165\",Vw={ROTATE:0,DOLLY:1,PAN:2},SG={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},ijo=0,BKt=1,rjo=2,bKt=1,SKt=2,qb=3,mE=0,uI=1,r_=2,zw=0,QG=1,QKt=2,vKt=3,wKt=4,sjo=5,NR=100,ajo=101,Ajo=102,cjo=103,ljo=104,ujo=200,gjo=201,djo=202,hjo=203,URe=204,KRe=205,pjo=206,mjo=207,_jo=208,fjo=209,Ijo=210,Cjo=211,yjo=212,xjo=213,Ejo=214,Bjo=0,bjo=1,Sjo=2,_de=3,Qjo=4,vjo=5,wjo=6,Pjo=7,VRe=0,Mjo=1,Djo=2,Jw=0,Njo=1,Rjo=2,Tjo=3,PKt=4,kjo=5,Fjo=6,Ljo=7,MKt=\"attached\",Hjo=\"detached\",DKt=300,vG=301,wG=302,fde=303,zRe=304,Ide=306,c4=1e3,Xy=1001,Tq=1002,wC=1003,JRe=1004,PG=1005,Fl=1006,kq=1007,gm=1008,Ww=1009,Ojo=1010,Gjo=1011,Cde=1012,NKt=1013,MG=1014,m6=1015,yde=1016,RKt=1017,TKt=1018,DG=1020,Yjo=35902,Ujo=1021,Kjo=1022,l4=1023,Vjo=1024,zjo=1025,NG=1026,RG=1027,kKt=1028,FKt=1029,Jjo=1030,LKt=1031,HKt=1033,WRe=33776,jRe=33777,$Re=33778,qRe=33779,OKt=35840,GKt=35841,YKt=35842,UKt=35843,KKt=36196,VKt=37492,zKt=37496,JKt=37808,WKt=37809,jKt=37810,$Kt=37811,qKt=37812,XKt=37813,ZKt=37814,eVt=37815,tVt=37816,nVt=37817,oVt=37818,iVt=37819,rVt=37820,sVt=37821,XRe=36492,aVt=36494,AVt=36495,Wjo=36283,cVt=36284,lVt=36285,uVt=36286,TG=2300,kG=2301,ZRe=2302,gVt=2400,dVt=2401,hVt=2402,jjo=2500,$jo=0,pVt=1,eTe=2,qjo=3200,mVt=3201,tTe=0,Xjo=1,_6=\"\",Ox=\"srgb\",jw=\"srgb-linear\",nTe=\"display-p3\",xde=\"display-p3-linear\",Ede=\"linear\",Ed=\"srgb\",Bde=\"rec709\",bde=\"p3\",FG=7680,_Vt=519,Zjo=512,e$o=513,t$o=514,fVt=515,n$o=516,o$o=517,i$o=518,r$o=519,oTe=35044,IVt=\"300 es\",Xb=2e3,Sde=2001;class RR{addEventListener(e,n){this._listeners===void 0\u0026\u0026(this._listeners={});const o=this._listeners;o[e]===void 0\u0026\u0026(o[e]=[]),o[e].indexOf(n)===-1\u0026\u0026o[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const o=this._listeners;return o[e]!==void 0\u0026\u0026o[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const r=i.indexOf(n);r!==-1\u0026\u0026i.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const o=this._listeners[e.type];if(o!==void 0){e.target=this;const i=o.slice(0);for(let r=0,s=i.length;r\u003cs;r++)i[r].call(this,e);e.target=null}}}const PC=[\"00\",\"01\",\"02\",\"03\",\"04\",\"05\",\"06\",\"07\",\"08\",\"09\",\"0a\",\"0b\",\"0c\",\"0d\",\"0e\",\"0f\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"1a\",\"1b\",\"1c\",\"1d\",\"1e\",\"1f\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"2a\",\"2b\",\"2c\",\"2d\",\"2e\",\"2f\",\"30\",\"31\",\"32\",\"33\",\"34\",\"35\",\"36\",\"37\",\"38\",\"39\",\"3a\",\"3b\",\"3c\",\"3d\",\"3e\",\"3f\",\"40\",\"41\",\"42\",\"43\",\"44\",\"45\",\"46\",\"47\",\"48\",\"49\",\"4a\",\"4b\",\"4c\",\"4d\",\"4e\",\"4f\",\"50\",\"51\",\"52\",\"53\",\"54\",\"55\",\"56\",\"57\",\"58\",\"59\",\"5a\",\"5b\",\"5c\",\"5d\",\"5e\",\"5f\",\"60\",\"61\",\"62\",\"63\",\"64\",\"65\",\"66\",\"67\",\"68\",\"69\",\"6a\",\"6b\",\"6c\",\"6d\",\"6e\",\"6f\",\"70\",\"71\",\"72\",\"73\",\"74\",\"75\",\"76\",\"77\",\"78\",\"79\",\"7a\",\"7b\",\"7c\",\"7d\",\"7e\",\"7f\",\"80\",\"81\",\"82\",\"83\",\"84\",\"85\",\"86\",\"87\",\"88\",\"89\",\"8a\",\"8b\",\"8c\",\"8d\",\"8e\",\"8f\",\"90\",\"91\",\"92\",\"93\",\"94\",\"95\",\"96\",\"97\",\"98\",\"99\",\"9a\",\"9b\",\"9c\",\"9d\",\"9e\",\"9f\",\"a0\",\"a1\",\"a2\",\"a3\",\"a4\",\"a5\",\"a6\",\"a7\",\"a8\",\"a9\",\"aa\",\"ab\",\"ac\",\"ad\",\"ae\",\"af\",\"b0\",\"b1\",\"b2\",\"b3\",\"b4\",\"b5\",\"b6\",\"b7\",\"b8\",\"b9\",\"ba\",\"bb\",\"bc\",\"bd\",\"be\",\"bf\",\"c0\",\"c1\",\"c2\",\"c3\",\"c4\",\"c5\",\"c6\",\"c7\",\"c8\",\"c9\",\"ca\",\"cb\",\"cc\",\"cd\",\"ce\",\"cf\",\"d0\",\"d1\",\"d2\",\"d3\",\"d4\",\"d5\",\"d6\",\"d7\",\"d8\",\"d9\",\"da\",\"db\",\"dc\",\"dd\",\"de\",\"df\",\"e0\",\"e1\",\"e2\",\"e3\",\"e4\",\"e5\",\"e6\",\"e7\",\"e8\",\"e9\",\"ea\",\"eb\",\"ec\",\"ed\",\"ee\",\"ef\",\"f0\",\"f1\",\"f2\",\"f3\",\"f4\",\"f5\",\"f6\",\"f7\",\"f8\",\"f9\",\"fa\",\"fb\",\"fc\",\"fd\",\"fe\",\"ff\"];let CVt=1234567;const LG=Math.PI/180,HG=180/Math.PI;function u4(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,o=Math.random()*4294967295|0;return(PC[t\u0026255]+PC[t\u003e\u003e8\u0026255]+PC[t\u003e\u003e16\u0026255]+PC[t\u003e\u003e24\u0026255]+\"-\"+PC[e\u0026255]+PC[e\u003e\u003e8\u0026255]+\"-\"+PC[e\u003e\u003e16\u002615|64]+PC[e\u003e\u003e24\u0026255]+\"-\"+PC[n\u002663|128]+PC[n\u003e\u003e8\u0026255]+\"-\"+PC[n\u003e\u003e16\u0026255]+PC[n\u003e\u003e24\u0026255]+PC[o\u0026255]+PC[o\u003e\u003e8\u0026255]+PC[o\u003e\u003e16\u0026255]+PC[o\u003e\u003e24\u0026255]).toLowerCase()}function rf(t,e,n){return Math.max(e,Math.min(n,t))}function iTe(t,e){return(t%e+e)%e}function s$o(t,e,n,o,i){return o+(t-e)*(i-o)/(n-e)}function a$o(t,e,n){return t!==e?(n-t)/(e-t):0}function Fq(t,e,n){return(1-n)*t+n*e}function A$o(t,e,n,o){return Fq(t,e,1-Math.exp(-n*o))}function c$o(t,e=1){return e-Math.abs(iTe(t,e*2)-e)}function l$o(t,e,n){return t\u003c=e?0:t\u003e=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function u$o(t,e,n){return t\u003c=e?0:t\u003e=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function g$o(t,e){return t+Math.floor(Math.random()*(e-t+1))}function d$o(t,e){return t+Math.random()*(e-t)}function h$o(t){return t*(.5-Math.random())}function p$o(t){t!==void 0\u0026\u0026(CVt=t);let e=CVt+=1831565813;return e=Math.imul(e^e\u003e\u003e\u003e15,e|1),e^=e+Math.imul(e^e\u003e\u003e\u003e7,e|61),((e^e\u003e\u003e\u003e14)\u003e\u003e\u003e0)/4294967296}function m$o(t){return t*LG}function _$o(t){return t*HG}function f$o(t){return(t\u0026t-1)===0\u0026\u0026t!==0}function I$o(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function C$o(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function y$o(t,e,n,o,i){const r=Math.cos,s=Math.sin,a=r(n/2),A=s(n/2),c=r((e+o)/2),l=s((e+o)/2),u=r((e-o)/2),g=s((e-o)/2),h=r((o-e)/2),d=s((o-e)/2);switch(i){case\"XYX\":t.set(a*l,A*u,A*g,a*c);break;case\"YZY\":t.set(A*g,a*l,A*u,a*c);break;case\"ZXZ\":t.set(A*u,A*g,a*l,a*c);break;case\"XZX\":t.set(a*l,A*d,A*h,a*c);break;case\"YXY\":t.set(A*h,a*l,A*d,a*c);break;case\"ZYZ\":t.set(A*d,A*h,a*l,a*c);break;default:console.warn(\"THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: \"+i)}}function HB(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error(\"Invalid component type.\")}}function ou(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error(\"Invalid component type.\")}}const OG={DEG2RAD:LG,RAD2DEG:HG,generateUUID:u4,clamp:rf,euclideanModulo:iTe,mapLinear:s$o,inverseLerp:a$o,lerp:Fq,damp:A$o,pingpong:c$o,smoothstep:l$o,smootherstep:u$o,randInt:g$o,randFloat:d$o,randFloatSpread:h$o,seededRandom:p$o,degToRad:m$o,radToDeg:_$o,isPowerOfTwo:f$o,ceilPowerOfTwo:I$o,floorPowerOfTwo:C$o,setQuaternionFromProperEuler:y$o,normalize:ou,denormalize:HB};let ni=class _4n{constructor(e=0,n=0){_4n.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error(\"index is out of range: \"+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error(\"index is out of range: \"+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,o=this.y,i=e.elements;return this.x=i[0]*n+i[3]*o+i[6],this.y=i[1]*n+i[4]*o+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const o=this.length();return this.divideScalar(o||1).multiplyScalar(Math.max(e,Math.min(n,o)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const o=this.dot(e)/n;return Math.acos(rf(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,o=this.y-e.y;return n*n+o*o}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,o){return this.x=e.x+(n.x-e.x)*o,this.y=e.y+(n.y-e.y)*o,this}equals(e){return e.x===this.x\u0026\u0026e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const o=Math.cos(n),i=Math.sin(n),r=this.x-e.x,s=this.y-e.y;return this.x=r*o-s*i+e.x,this.y=r*i+s*o+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};class HA{constructor(e,n,o,i,r,s,a,A,c){HA.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0\u0026\u0026this.set(e,n,o,i,r,s,a,A,c)}set(e,n,o,i,r,s,a,A,c){const l=this.elements;return l[0]=e,l[1]=i,l[2]=a,l[3]=n,l[4]=r,l[5]=A,l[6]=o,l[7]=s,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,o=e.elements;return n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],this}extractBasis(e,n,o){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),o.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const o=e.elements,i=n.elements,r=this.elements,s=o[0],a=o[3],A=o[6],c=o[1],l=o[4],u=o[7],g=o[2],h=o[5],d=o[8],p=i[0],m=i[3],_=i[6],f=i[1],I=i[4],C=i[7],y=i[2],x=i[5],E=i[8];return r[0]=s*p+a*f+A*y,r[3]=s*m+a*I+A*x,r[6]=s*_+a*C+A*E,r[1]=c*p+l*f+u*y,r[4]=c*m+l*I+u*x,r[7]=c*_+l*C+u*E,r[2]=g*p+h*f+d*y,r[5]=g*m+h*I+d*x,r[8]=g*_+h*C+d*E,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],o=e[1],i=e[2],r=e[3],s=e[4],a=e[5],A=e[6],c=e[7],l=e[8];return n*s*l-n*a*c-o*r*l+o*a*A+i*r*c-i*s*A}invert(){const e=this.elements,n=e[0],o=e[1],i=e[2],r=e[3],s=e[4],a=e[5],A=e[6],c=e[7],l=e[8],u=l*s-a*c,g=a*A-l*r,h=c*r-s*A,d=n*u+o*g+i*h;if(d===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/d;return e[0]=u*p,e[1]=(i*c-l*o)*p,e[2]=(a*o-i*s)*p,e[3]=g*p,e[4]=(l*n-i*A)*p,e[5]=(i*r-a*n)*p,e[6]=h*p,e[7]=(o*A-c*n)*p,e[8]=(s*n-o*r)*p,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,o,i,r,s,a){const A=Math.cos(r),c=Math.sin(r);return this.set(o*A,o*c,-o*(A*s+c*a)+s+e,-i*c,i*A,-i*(-c*s+A*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(rTe.makeScale(e,n)),this}rotate(e){return this.premultiply(rTe.makeRotation(-e)),this}translate(e,n){return this.premultiply(rTe.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),o=Math.sin(e);return this.set(n,-o,0,o,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,o=e.elements;for(let i=0;i\u003c9;i++)if(n[i]!==o[i])return!1;return!0}fromArray(e,n=0){for(let o=0;o\u003c9;o++)this.elements[o]=e[o+n];return this}toArray(e=[],n=0){const o=this.elements;return e[n]=o[0],e[n+1]=o[1],e[n+2]=o[2],e[n+3]=o[3],e[n+4]=o[4],e[n+5]=o[5],e[n+6]=o[6],e[n+7]=o[7],e[n+8]=o[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const rTe=new HA;function yVt(t){for(let e=t.length-1;e\u003e=0;--e)if(t[e]\u003e=65535)return!0;return!1}function Lq(t){return document.createElementNS(\"http://www.w3.org/1999/xhtml\",t)}function x$o(){const t=Lq(\"canvas\");return t.style.display=\"block\",t}const xVt={};function sTe(t){t in xVt||(xVt[t]=!0,console.warn(t))}function E$o(t,e,n){return new Promise(function(o,i){function r(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(r,n);break;default:o()}}setTimeout(r,n)})}const EVt=new HA().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),BVt=new HA().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Qde={[jw]:{transfer:Ede,primaries:Bde,toReference:t=\u003et,fromReference:t=\u003et},[Ox]:{transfer:Ed,primaries:Bde,toReference:t=\u003et.convertSRGBToLinear(),fromReference:t=\u003et.convertLinearToSRGB()},[xde]:{transfer:Ede,primaries:bde,toReference:t=\u003et.applyMatrix3(BVt),fromReference:t=\u003et.applyMatrix3(EVt)},[nTe]:{transfer:Ed,primaries:bde,toReference:t=\u003et.convertSRGBToLinear().applyMatrix3(BVt),fromReference:t=\u003et.applyMatrix3(EVt).convertLinearToSRGB()}},B$o=new Set([jw,xde]),iu={enabled:!0,_workingColorSpace:jw,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!B$o.has(t))throw new Error(`Unsupported working color space, \"${t}\".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const o=Qde[e].toReference,i=Qde[n].fromReference;return i(o(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Qde[t].primaries},getTransfer:function(t){return t===_6?Ede:Qde[t].transfer}};function GG(t){return t\u003c.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function aTe(t){return t\u003c.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let YG;class b$o{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement\u003e\"u\")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{YG===void 0\u0026\u0026(YG=Lq(\"canvas\")),YG.width=e.width,YG.height=e.height;const o=YG.getContext(\"2d\");e instanceof ImageData?o.putImageData(e,0,0):o.drawImage(e,0,0,e.width,e.height),n=YG}return n.width\u003e2048||n.height\u003e2048?(console.warn(\"THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons\",e),n.toDataURL(\"image/jpeg\",.6)):n.toDataURL(\"image/png\")}static sRGBToLinear(e){if(typeof HTMLImageElement\u003c\"u\"\u0026\u0026e instanceof HTMLImageElement||typeof HTMLCanvasElement\u003c\"u\"\u0026\u0026e instanceof HTMLCanvasElement||typeof ImageBitmap\u003c\"u\"\u0026\u0026e instanceof ImageBitmap){const n=Lq(\"canvas\");n.width=e.width,n.height=e.height;const o=n.getContext(\"2d\");o.drawImage(e,0,0,e.width,e.height);const i=o.getImageData(0,0,e.width,e.height),r=i.data;for(let s=0;s\u003cr.length;s++)r[s]=GG(r[s]/255)*255;return o.putImageData(i,0,0),n}else if(e.data){const n=e.data.slice(0);for(let o=0;o\u003cn.length;o++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[o]=Math.floor(GG(n[o]/255)*255):n[o]=GG(n[o]);return{data:n,width:e.width,height:e.height}}else return console.warn(\"THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.\"),e}}let S$o=0;class bVt{constructor(e=null){this.isSource=!0,Object.defineProperty(this,\"id\",{value:S$o++}),this.uuid=u4(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0\u0026\u0026this.version++}toJSON(e){const n=e===void 0||typeof e==\"string\";if(!n\u0026\u0026e.images[this.uuid]!==void 0)return e.images[this.uuid];const o={uuid:this.uuid,url:\"\"},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let s=0,a=i.length;s\u003ca;s++)i[s].isDataTexture?r.push(ATe(i[s].image)):r.push(ATe(i[s]))}else r=ATe(i);o.url=r}return n||(e.images[this.uuid]=o),o}}function ATe(t){return typeof HTMLImageElement\u003c\"u\"\u0026\u0026t instanceof HTMLImageElement||typeof HTMLCanvasElement\u003c\"u\"\u0026\u0026t instanceof HTMLCanvasElement||typeof ImageBitmap\u003c\"u\"\u0026\u0026t instanceof ImageBitmap?b$o.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn(\"THREE.Texture: Unable to serialize Texture.\"),{})}let Q$o=0;class Hg extends RR{constructor(e=Hg.DEFAULT_IMAGE,n=Hg.DEFAULT_MAPPING,o=Xy,i=Xy,r=Fl,s=gm,a=l4,A=Ww,c=Hg.DEFAULT_ANISOTROPY,l=_6){super(),this.isTexture=!0,Object.defineProperty(this,\"id\",{value:Q$o++}),this.uuid=u4(),this.name=\"\",this.source=new bVt(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=o,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=A,this.offset=new ni(0,0),this.repeat=new ni(1,1),this.center=new ni(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new HA,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=l,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const n=e===void 0||typeof e==\"string\";if(!n\u0026\u0026e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const o={metadata:{version:4.6,type:\"Texture\",generator:\"Texture.toJSON\"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length\u003e0\u0026\u0026(o.userData=this.userData),n||(e.textures[this.uuid]=o),o}dispose(){this.dispatchEvent({type:\"dispose\"})}transformUv(e){if(this.mapping!==DKt)return e;if(e.applyMatrix3(this.matrix),e.x\u003c0||e.x\u003e1)switch(this.wrapS){case c4:e.x=e.x-Math.floor(e.x);break;case Xy:e.x=e.x\u003c0?0:1;break;case Tq:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y\u003c0||e.y\u003e1)switch(this.wrapT){case c4:e.y=e.y-Math.floor(e.y);break;case Xy:e.y=e.y\u003c0?0:1;break;case Tq:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY\u0026\u0026(e.y=1-e.y),e}set needsUpdate(e){e===!0\u0026\u0026(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0\u0026\u0026this.pmremVersion++}}Hg.DEFAULT_IMAGE=null,Hg.DEFAULT_MAPPING=DKt,Hg.DEFAULT_ANISOTROPY=1;class ru{constructor(e=0,n=0,o=0,i=1){ru.prototype.isVector4=!0,this.x=e,this.y=n,this.z=o,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,o,i){return this.x=e,this.y=n,this.z=o,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error(\"index is out of range: \"+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error(\"index is out of range: \"+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,o=this.y,i=this.z,r=this.w,s=e.elements;return this.x=s[0]*n+s[4]*o+s[8]*i+s[12]*r,this.y=s[1]*n+s[5]*o+s[9]*i+s[13]*r,this.z=s[2]*n+s[6]*o+s[10]*i+s[14]*r,this.w=s[3]*n+s[7]*o+s[11]*i+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n\u003c1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,o,i,r;const A=e.elements,c=A[0],l=A[4],u=A[8],g=A[1],h=A[5],d=A[9],p=A[2],m=A[6],_=A[10];if(Math.abs(l-g)\u003c.01\u0026\u0026Math.abs(u-p)\u003c.01\u0026\u0026Math.abs(d-m)\u003c.01){if(Math.abs(l+g)\u003c.1\u0026\u0026Math.abs(u+p)\u003c.1\u0026\u0026Math.abs(d+m)\u003c.1\u0026\u0026Math.abs(c+h+_-3)\u003c.1)return this.set(1,0,0,0),this;n=Math.PI;const I=(c+1)/2,C=(h+1)/2,y=(_+1)/2,x=(l+g)/4,E=(u+p)/4,B=(d+m)/4;return I\u003eC\u0026\u0026I\u003ey?I\u003c.01?(o=0,i=.707106781,r=.707106781):(o=Math.sqrt(I),i=x/o,r=E/o):C\u003ey?C\u003c.01?(o=.707106781,i=0,r=.707106781):(i=Math.sqrt(C),o=x/i,r=B/i):y\u003c.01?(o=.707106781,i=.707106781,r=0):(r=Math.sqrt(y),o=E/r,i=B/r),this.set(o,i,r,n),this}let f=Math.sqrt((m-d)*(m-d)+(u-p)*(u-p)+(g-l)*(g-l));return Math.abs(f)\u003c.001\u0026\u0026(f=1),this.x=(m-d)/f,this.y=(u-p)/f,this.z=(g-l)/f,this.w=Math.acos((c+h+_-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const o=this.length();return this.divideScalar(o||1).multiplyScalar(Math.max(e,Math.min(n,o)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,o){return this.x=e.x+(n.x-e.x)*o,this.y=e.y+(n.y-e.y)*o,this.z=e.z+(n.z-e.z)*o,this.w=e.w+(n.w-e.w)*o,this}equals(e){return e.x===this.x\u0026\u0026e.y===this.y\u0026\u0026e.z===this.z\u0026\u0026e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class v$o extends RR{constructor(e=1,n=1,o={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new ru(0,0,e,n),this.scissorTest=!1,this.viewport=new ru(0,0,e,n);const i={width:e,height:n,depth:1};o=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Fl,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},o);const r=new Hg(i,o.mapping,o.wrapS,o.wrapT,o.magFilter,o.minFilter,o.format,o.type,o.anisotropy,o.colorSpace);r.flipY=!1,r.generateMipmaps=o.generateMipmaps,r.internalFormat=o.internalFormat,this.textures=[];const s=o.count;for(let a=0;a\u003cs;a++)this.textures[a]=r.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=o.depthBuffer,this.stencilBuffer=o.stencilBuffer,this.resolveDepthBuffer=o.resolveDepthBuffer,this.resolveStencilBuffer=o.resolveStencilBuffer,this.depthTexture=o.depthTexture,this.samples=o.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}setSize(e,n,o=1){if(this.width!==e||this.height!==n||this.depth!==o){this.width=e,this.height=n,this.depth=o;for(let i=0,r=this.textures.length;i\u003cr;i++)this.textures[i].image.width=e,this.textures[i].image.height=n,this.textures[i].image.depth=o;this.dispose()}this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let o=0,i=e.textures.length;o\u003ci;o++)this.textures[o]=e.textures[o].clone(),this.textures[o].isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new bVt(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null\u0026\u0026(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:\"dispose\"})}}class TR extends v$o{constructor(e=1,n=1,o={}){super(e,n,o),this.isWebGLRenderTarget=!0}}class SVt extends Hg{constructor(e=null,n=1,o=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:o,depth:i},this.magFilter=wC,this.minFilter=wC,this.wrapR=Xy,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class w$o extends Hg{constructor(e=null,n=1,o=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:o,depth:i},this.magFilter=wC,this.minFilter=wC,this.wrapR=Xy,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Zy{constructor(e=0,n=0,o=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=o,this._w=i}static slerpFlat(e,n,o,i,r,s,a){let A=o[i+0],c=o[i+1],l=o[i+2],u=o[i+3];const g=r[s+0],h=r[s+1],d=r[s+2],p=r[s+3];if(a===0){e[n+0]=A,e[n+1]=c,e[n+2]=l,e[n+3]=u;return}if(a===1){e[n+0]=g,e[n+1]=h,e[n+2]=d,e[n+3]=p;return}if(u!==p||A!==g||c!==h||l!==d){let m=1-a;const _=A*g+c*h+l*d+u*p,f=_\u003e=0?1:-1,I=1-_*_;if(I\u003eNumber.EPSILON){const y=Math.sqrt(I),x=Math.atan2(y,_*f);m=Math.sin(m*x)/y,a=Math.sin(a*x)/y}const C=a*f;if(A=A*m+g*C,c=c*m+h*C,l=l*m+d*C,u=u*m+p*C,m===1-a){const y=1/Math.sqrt(A*A+c*c+l*l+u*u);A*=y,c*=y,l*=y,u*=y}}e[n]=A,e[n+1]=c,e[n+2]=l,e[n+3]=u}static multiplyQuaternionsFlat(e,n,o,i,r,s){const a=o[i],A=o[i+1],c=o[i+2],l=o[i+3],u=r[s],g=r[s+1],h=r[s+2],d=r[s+3];return e[n]=a*d+l*u+A*h-c*g,e[n+1]=A*d+l*g+c*u-a*h,e[n+2]=c*d+l*h+a*g-A*u,e[n+3]=l*d-a*u-A*g-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,o,i){return this._x=e,this._y=n,this._z=o,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const o=e._x,i=e._y,r=e._z,s=e._order,a=Math.cos,A=Math.sin,c=a(o/2),l=a(i/2),u=a(r/2),g=A(o/2),h=A(i/2),d=A(r/2);switch(s){case\"XYZ\":this._x=g*l*u+c*h*d,this._y=c*h*u-g*l*d,this._z=c*l*d+g*h*u,this._w=c*l*u-g*h*d;break;case\"YXZ\":this._x=g*l*u+c*h*d,this._y=c*h*u-g*l*d,this._z=c*l*d-g*h*u,this._w=c*l*u+g*h*d;break;case\"ZXY\":this._x=g*l*u-c*h*d,this._y=c*h*u+g*l*d,this._z=c*l*d+g*h*u,this._w=c*l*u-g*h*d;break;case\"ZYX\":this._x=g*l*u-c*h*d,this._y=c*h*u+g*l*d,this._z=c*l*d-g*h*u,this._w=c*l*u+g*h*d;break;case\"YZX\":this._x=g*l*u+c*h*d,this._y=c*h*u+g*l*d,this._z=c*l*d-g*h*u,this._w=c*l*u-g*h*d;break;case\"XZY\":this._x=g*l*u-c*h*d,this._y=c*h*u-g*l*d,this._z=c*l*d+g*h*u,this._w=c*l*u+g*h*d;break;default:console.warn(\"THREE.Quaternion: .setFromEuler() encountered an unknown order: \"+s)}return n===!0\u0026\u0026this._onChangeCallback(),this}setFromAxisAngle(e,n){const o=n/2,i=Math.sin(o);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(o),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,o=n[0],i=n[4],r=n[8],s=n[1],a=n[5],A=n[9],c=n[2],l=n[6],u=n[10],g=o+a+u;if(g\u003e0){const h=.5/Math.sqrt(g+1);this._w=.25/h,this._x=(l-A)*h,this._y=(r-c)*h,this._z=(s-i)*h}else if(o\u003ea\u0026\u0026o\u003eu){const h=2*Math.sqrt(1+o-a-u);this._w=(l-A)/h,this._x=.25*h,this._y=(i+s)/h,this._z=(r+c)/h}else if(a\u003eu){const h=2*Math.sqrt(1+a-o-u);this._w=(r-c)/h,this._x=(i+s)/h,this._y=.25*h,this._z=(A+l)/h}else{const h=2*Math.sqrt(1+u-o-a);this._w=(s-i)/h,this._x=(r+c)/h,this._y=(A+l)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let o=e.dot(n)+1;return o\u003cNumber.EPSILON?(o=0,Math.abs(e.x)\u003eMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=o):(this._x=0,this._y=-e.z,this._z=e.y,this._w=o)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=o),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(rf(this.dot(e),-1,1)))}rotateTowards(e,n){const o=this.angleTo(e);if(o===0)return this;const i=Math.min(1,n/o);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const o=e._x,i=e._y,r=e._z,s=e._w,a=n._x,A=n._y,c=n._z,l=n._w;return this._x=o*l+s*a+i*c-r*A,this._y=i*l+s*A+r*a-o*c,this._z=r*l+s*c+o*A-i*a,this._w=s*l-o*a-i*A-r*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const o=this._x,i=this._y,r=this._z,s=this._w;let a=s*e._w+o*e._x+i*e._y+r*e._z;if(a\u003c0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a\u003e=1)return this._w=s,this._x=o,this._y=i,this._z=r,this;const A=1-a*a;if(A\u003c=Number.EPSILON){const h=1-n;return this._w=h*s+n*this._w,this._x=h*o+n*this._x,this._y=h*i+n*this._y,this._z=h*r+n*this._z,this.normalize(),this}const c=Math.sqrt(A),l=Math.atan2(c,a),u=Math.sin((1-n)*l)/c,g=Math.sin(n*l)/c;return this._w=s*u+this._w*g,this._x=o*u+this._x*g,this._y=i*u+this._y*g,this._z=r*u+this._z*g,this._onChangeCallback(),this}slerpQuaternions(e,n,o){return this.copy(e).slerp(n,o)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),o=Math.random(),i=Math.sqrt(1-o),r=Math.sqrt(o);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(n),r*Math.cos(n))}equals(e){return e._x===this._x\u0026\u0026e._y===this._y\u0026\u0026e._z===this._z\u0026\u0026e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class jt{constructor(e=0,n=0,o=0){jt.prototype.isVector3=!0,this.x=e,this.y=n,this.z=o}set(e,n,o){return o===void 0\u0026\u0026(o=this.z),this.x=e,this.y=n,this.z=o,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error(\"index is out of range: \"+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error(\"index is out of range: \"+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(QVt.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(QVt.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,o=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[3]*o+r[6]*i,this.y=r[1]*n+r[4]*o+r[7]*i,this.z=r[2]*n+r[5]*o+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,o=this.y,i=this.z,r=e.elements,s=1/(r[3]*n+r[7]*o+r[11]*i+r[15]);return this.x=(r[0]*n+r[4]*o+r[8]*i+r[12])*s,this.y=(r[1]*n+r[5]*o+r[9]*i+r[13])*s,this.z=(r[2]*n+r[6]*o+r[10]*i+r[14])*s,this}applyQuaternion(e){const n=this.x,o=this.y,i=this.z,r=e.x,s=e.y,a=e.z,A=e.w,c=2*(s*i-a*o),l=2*(a*n-r*i),u=2*(r*o-s*n);return this.x=n+A*c+s*u-a*l,this.y=o+A*l+a*c-r*u,this.z=i+A*u+r*l-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,o=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[4]*o+r[8]*i,this.y=r[1]*n+r[5]*o+r[9]*i,this.z=r[2]*n+r[6]*o+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const o=this.length();return this.divideScalar(o||1).multiplyScalar(Math.max(e,Math.min(n,o)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,o){return this.x=e.x+(n.x-e.x)*o,this.y=e.y+(n.y-e.y)*o,this.z=e.z+(n.z-e.z)*o,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const o=e.x,i=e.y,r=e.z,s=n.x,a=n.y,A=n.z;return this.x=i*A-r*a,this.y=r*s-o*A,this.z=o*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const o=e.dot(this)/n;return this.copy(e).multiplyScalar(o)}projectOnPlane(e){return cTe.copy(this).projectOnVector(e),this.sub(cTe)}reflect(e){return this.sub(cTe.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const o=this.dot(e)/n;return Math.acos(rf(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,o=this.y-e.y,i=this.z-e.z;return n*n+o*o+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,o){const i=Math.sin(n)*e;return this.x=i*Math.sin(o),this.y=Math.cos(n)*e,this.z=i*Math.cos(o),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,o){return this.x=e*Math.sin(n),this.y=o,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),o=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=o,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x\u0026\u0026e.y===this.y\u0026\u0026e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,o=Math.sqrt(1-n*n);return this.x=o*Math.cos(e),this.y=n,this.z=o*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const cTe=new jt,QVt=new Zy;class e2{constructor(e=new jt(1/0,1/0,1/0),n=new jt(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,o=e.length;n\u003co;n+=3)this.expandByPoint(OB.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,o=e.count;n\u003co;n++)this.expandByPoint(OB.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,o=e.length;n\u003co;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const o=OB.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(o),this.max.copy(e).add(o),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x\u003cthis.min.x||this.max.y\u003cthis.min.y||this.max.z\u003cthis.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,n=!1){e.updateWorldMatrix(!1,!1);const o=e.geometry;if(o!==void 0){const r=o.getAttribute(\"position\");if(n===!0\u0026\u0026r!==void 0\u0026\u0026e.isInstancedMesh!==!0)for(let s=0,a=r.count;s\u003ca;s++)e.isMesh===!0?e.getVertexPosition(s,OB):OB.fromBufferAttribute(r,s),OB.applyMatrix4(e.matrixWorld),this.expandByPoint(OB);else e.boundingBox!==void 0?(e.boundingBox===null\u0026\u0026e.computeBoundingBox(),vde.copy(e.boundingBox)):(o.boundingBox===null\u0026\u0026o.computeBoundingBox(),vde.copy(o.boundingBox)),vde.applyMatrix4(e.matrixWorld),this.union(vde)}const i=e.children;for(let r=0,s=i.length;r\u003cs;r++)this.expandByObject(i[r],n);return this}containsPoint(e){return!(e.x\u003cthis.min.x||e.x\u003ethis.max.x||e.y\u003cthis.min.y||e.y\u003ethis.max.y||e.z\u003cthis.min.z||e.z\u003ethis.max.z)}containsBox(e){return this.min.x\u003c=e.min.x\u0026\u0026e.max.x\u003c=this.max.x\u0026\u0026this.min.y\u003c=e.min.y\u0026\u0026e.max.y\u003c=this.max.y\u0026\u0026this.min.z\u003c=e.min.z\u0026\u0026e.max.z\u003c=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x\u003cthis.min.x||e.min.x\u003ethis.max.x||e.max.y\u003cthis.min.y||e.min.y\u003ethis.max.y||e.max.z\u003cthis.min.z||e.min.z\u003ethis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,OB),OB.distanceToSquared(e.center)\u003c=e.radius*e.radius}intersectsPlane(e){let n,o;return e.normal.x\u003e0?(n=e.normal.x*this.min.x,o=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,o=e.normal.x*this.min.x),e.normal.y\u003e0?(n+=e.normal.y*this.min.y,o+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,o+=e.normal.y*this.min.y),e.normal.z\u003e0?(n+=e.normal.z*this.min.z,o+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,o+=e.normal.z*this.min.z),n\u003c=-e.constant\u0026\u0026o\u003e=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Hq),wde.subVectors(this.max,Hq),UG.subVectors(e.a,Hq),KG.subVectors(e.b,Hq),VG.subVectors(e.c,Hq),$w.subVectors(KG,UG),qw.subVectors(VG,KG),kR.subVectors(UG,VG);let n=[0,-$w.z,$w.y,0,-qw.z,qw.y,0,-kR.z,kR.y,$w.z,0,-$w.x,qw.z,0,-qw.x,kR.z,0,-kR.x,-$w.y,$w.x,0,-qw.y,qw.x,0,-kR.y,kR.x,0];return!lTe(n,UG,KG,VG,wde)||(n=[1,0,0,0,1,0,0,0,1],!lTe(n,UG,KG,VG,wde))?!1:(Pde.crossVectors($w,qw),n=[Pde.x,Pde.y,Pde.z],lTe(n,UG,KG,VG,wde))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,OB).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(OB).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()\u0026\u0026this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Zb[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Zb[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Zb[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Zb[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Zb[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Zb[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Zb[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Zb[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Zb),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)\u0026\u0026e.max.equals(this.max)}}const Zb=[new jt,new jt,new jt,new jt,new jt,new jt,new jt,new jt],OB=new jt,vde=new e2,UG=new jt,KG=new jt,VG=new jt,$w=new jt,qw=new jt,kR=new jt,Hq=new jt,wde=new jt,Pde=new jt,FR=new jt;function lTe(t,e,n,o,i){for(let r=0,s=t.length-3;r\u003c=s;r+=3){FR.fromArray(t,r);const a=i.x*Math.abs(FR.x)+i.y*Math.abs(FR.y)+i.z*Math.abs(FR.z),A=e.dot(FR),c=n.dot(FR),l=o.dot(FR);if(Math.max(-Math.max(A,c,l),Math.min(A,c,l))\u003ea)return!1}return!0}const P$o=new e2,Oq=new jt,uTe=new jt;let GB=class{constructor(e=new jt,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const o=this.center;n!==void 0?o.copy(n):P$o.setFromPoints(e).getCenter(o);let i=0;for(let r=0,s=e.length;r\u003cs;r++)i=Math.max(i,o.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius\u003c0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)\u003c=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const n=this.radius+e.radius;return e.center.distanceToSquared(this.center)\u003c=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))\u003c=this.radius}clampPoint(e,n){const o=this.center.distanceToSquared(e);return n.copy(e),o\u003ethis.radius*this.radius\u0026\u0026(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Oq.subVectors(e,this.center);const n=Oq.lengthSq();if(n\u003ethis.radius*this.radius){const o=Math.sqrt(n),i=(o-this.radius)*.5;this.center.addScaledVector(Oq,i/o),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(uTe.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Oq.copy(e.center).add(uTe)),this.expandByPoint(Oq.copy(e.center).sub(uTe))),this)}equals(e){return e.center.equals(this.center)\u0026\u0026e.radius===this.radius}clone(){return new this.constructor().copy(this)}};const eS=new jt,gTe=new jt,Mde=new jt,Xw=new jt,dTe=new jt,Dde=new jt,hTe=new jt;let zG=class{constructor(e=new jt,n=new jt(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,eS)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const o=n.dot(this.direction);return o\u003c0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,o)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=eS.subVectors(e,this.origin).dot(this.direction);return n\u003c0?this.origin.distanceToSquared(e):(eS.copy(this.origin).addScaledVector(this.direction,n),eS.distanceToSquared(e))}distanceSqToSegment(e,n,o,i){gTe.copy(e).add(n).multiplyScalar(.5),Mde.copy(n).sub(e).normalize(),Xw.copy(this.origin).sub(gTe);const r=e.distanceTo(n)*.5,s=-this.direction.dot(Mde),a=Xw.dot(this.direction),A=-Xw.dot(Mde),c=Xw.lengthSq(),l=Math.abs(1-s*s);let u,g,h,d;if(l\u003e0)if(u=s*A-a,g=s*a-A,d=r*l,u\u003e=0)if(g\u003e=-d)if(g\u003c=d){const p=1/l;u*=p,g*=p,h=u*(u+s*g+2*a)+g*(s*u+g+2*A)+c}else g=r,u=Math.max(0,-(s*g+a)),h=-u*u+g*(g+2*A)+c;else g=-r,u=Math.max(0,-(s*g+a)),h=-u*u+g*(g+2*A)+c;else g\u003c=-d?(u=Math.max(0,-(-s*r+a)),g=u\u003e0?-r:Math.min(Math.max(-r,-A),r),h=-u*u+g*(g+2*A)+c):g\u003c=d?(u=0,g=Math.min(Math.max(-r,-A),r),h=g*(g+2*A)+c):(u=Math.max(0,-(s*r+a)),g=u\u003e0?r:Math.min(Math.max(-r,-A),r),h=-u*u+g*(g+2*A)+c);else g=s\u003e0?-r:r,u=Math.max(0,-(s*g+a)),h=-u*u+g*(g+2*A)+c;return o\u0026\u0026o.copy(this.origin).addScaledVector(this.direction,u),i\u0026\u0026i.copy(gTe).addScaledVector(Mde,g),h}intersectSphere(e,n){eS.subVectors(e.center,this.origin);const o=eS.dot(this.direction),i=eS.dot(eS)-o*o,r=e.radius*e.radius;if(i\u003er)return null;const s=Math.sqrt(r-i),a=o-s,A=o+s;return A\u003c0?null:a\u003c0?this.at(A,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)\u003c=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const o=-(this.origin.dot(e.normal)+e.constant)/n;return o\u003e=0?o:null}intersectPlane(e,n){const o=this.distanceToPlane(e);return o===null?null:this.at(o,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n\u003c0}intersectBox(e,n){let o,i,r,s,a,A;const c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,g=this.origin;return c\u003e=0?(o=(e.min.x-g.x)*c,i=(e.max.x-g.x)*c):(o=(e.max.x-g.x)*c,i=(e.min.x-g.x)*c),l\u003e=0?(r=(e.min.y-g.y)*l,s=(e.max.y-g.y)*l):(r=(e.max.y-g.y)*l,s=(e.min.y-g.y)*l),o\u003es||r\u003ei||((r\u003eo||isNaN(o))\u0026\u0026(o=r),(s\u003ci||isNaN(i))\u0026\u0026(i=s),u\u003e=0?(a=(e.min.z-g.z)*u,A=(e.max.z-g.z)*u):(a=(e.max.z-g.z)*u,A=(e.min.z-g.z)*u),o\u003eA||a\u003ei)||((a\u003eo||o!==o)\u0026\u0026(o=a),(A\u003ci||i!==i)\u0026\u0026(i=A),i\u003c0)?null:this.at(o\u003e=0?o:i,n)}intersectsBox(e){return this.intersectBox(e,eS)!==null}intersectTriangle(e,n,o,i,r){dTe.subVectors(n,e),Dde.subVectors(o,e),hTe.crossVectors(dTe,Dde);let s=this.direction.dot(hTe),a;if(s\u003e0){if(i)return null;a=1}else if(s\u003c0)a=-1,s=-s;else return null;Xw.subVectors(this.origin,e);const A=a*this.direction.dot(Dde.crossVectors(Xw,Dde));if(A\u003c0)return null;const c=a*this.direction.dot(dTe.cross(Xw));if(c\u003c0||A+c\u003es)return null;const l=-a*Xw.dot(hTe);return l\u003c0?null:this.at(l/s,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)\u0026\u0026e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}};class va{constructor(e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m){va.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0\u0026\u0026this.set(e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m)}set(e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m){const _=this.elements;return _[0]=e,_[4]=n,_[8]=o,_[12]=i,_[1]=r,_[5]=s,_[9]=a,_[13]=A,_[2]=c,_[6]=l,_[10]=u,_[14]=g,_[3]=h,_[7]=d,_[11]=p,_[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new va().fromArray(this.elements)}copy(e){const n=this.elements,o=e.elements;return n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],n[9]=o[9],n[10]=o[10],n[11]=o[11],n[12]=o[12],n[13]=o[13],n[14]=o[14],n[15]=o[15],this}copyPosition(e){const n=this.elements,o=e.elements;return n[12]=o[12],n[13]=o[13],n[14]=o[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,o){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),o.setFromMatrixColumn(this,2),this}makeBasis(e,n,o){return this.set(e.x,n.x,o.x,0,e.y,n.y,o.y,0,e.z,n.z,o.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,o=e.elements,i=1/JG.setFromMatrixColumn(e,0).length(),r=1/JG.setFromMatrixColumn(e,1).length(),s=1/JG.setFromMatrixColumn(e,2).length();return n[0]=o[0]*i,n[1]=o[1]*i,n[2]=o[2]*i,n[3]=0,n[4]=o[4]*r,n[5]=o[5]*r,n[6]=o[6]*r,n[7]=0,n[8]=o[8]*s,n[9]=o[9]*s,n[10]=o[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,o=e.x,i=e.y,r=e.z,s=Math.cos(o),a=Math.sin(o),A=Math.cos(i),c=Math.sin(i),l=Math.cos(r),u=Math.sin(r);if(e.order===\"XYZ\"){const g=s*l,h=s*u,d=a*l,p=a*u;n[0]=A*l,n[4]=-A*u,n[8]=c,n[1]=h+d*c,n[5]=g-p*c,n[9]=-a*A,n[2]=p-g*c,n[6]=d+h*c,n[10]=s*A}else if(e.order===\"YXZ\"){const g=A*l,h=A*u,d=c*l,p=c*u;n[0]=g+p*a,n[4]=d*a-h,n[8]=s*c,n[1]=s*u,n[5]=s*l,n[9]=-a,n[2]=h*a-d,n[6]=p+g*a,n[10]=s*A}else if(e.order===\"ZXY\"){const g=A*l,h=A*u,d=c*l,p=c*u;n[0]=g-p*a,n[4]=-s*u,n[8]=d+h*a,n[1]=h+d*a,n[5]=s*l,n[9]=p-g*a,n[2]=-s*c,n[6]=a,n[10]=s*A}else if(e.order===\"ZYX\"){const g=s*l,h=s*u,d=a*l,p=a*u;n[0]=A*l,n[4]=d*c-h,n[8]=g*c+p,n[1]=A*u,n[5]=p*c+g,n[9]=h*c-d,n[2]=-c,n[6]=a*A,n[10]=s*A}else if(e.order===\"YZX\"){const g=s*A,h=s*c,d=a*A,p=a*c;n[0]=A*l,n[4]=p-g*u,n[8]=d*u+h,n[1]=u,n[5]=s*l,n[9]=-a*l,n[2]=-c*l,n[6]=h*u+d,n[10]=g-p*u}else if(e.order===\"XZY\"){const g=s*A,h=s*c,d=a*A,p=a*c;n[0]=A*l,n[4]=-u,n[8]=c*l,n[1]=g*u+p,n[5]=s*l,n[9]=h*u-d,n[2]=d*u-h,n[6]=a*l,n[10]=p*u+g}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(M$o,e,D$o)}lookAt(e,n,o){const i=this.elements;return _E.subVectors(e,n),_E.lengthSq()===0\u0026\u0026(_E.z=1),_E.normalize(),Zw.crossVectors(o,_E),Zw.lengthSq()===0\u0026\u0026(Math.abs(o.z)===1?_E.x+=1e-4:_E.z+=1e-4,_E.normalize(),Zw.crossVectors(o,_E)),Zw.normalize(),Nde.crossVectors(_E,Zw),i[0]=Zw.x,i[4]=Nde.x,i[8]=_E.x,i[1]=Zw.y,i[5]=Nde.y,i[9]=_E.y,i[2]=Zw.z,i[6]=Nde.z,i[10]=_E.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const o=e.elements,i=n.elements,r=this.elements,s=o[0],a=o[4],A=o[8],c=o[12],l=o[1],u=o[5],g=o[9],h=o[13],d=o[2],p=o[6],m=o[10],_=o[14],f=o[3],I=o[7],C=o[11],y=o[15],x=i[0],E=i[4],B=i[8],S=i[12],Q=i[1],w=i[5],M=i[9],k=i[13],R=i[2],F=i[6],O=i[10],U=i[14],Y=i[3],W=i[7],te=i[11],j=i[15];return r[0]=s*x+a*Q+A*R+c*Y,r[4]=s*E+a*w+A*F+c*W,r[8]=s*B+a*M+A*O+c*te,r[12]=s*S+a*k+A*U+c*j,r[1]=l*x+u*Q+g*R+h*Y,r[5]=l*E+u*w+g*F+h*W,r[9]=l*B+u*M+g*O+h*te,r[13]=l*S+u*k+g*U+h*j,r[2]=d*x+p*Q+m*R+_*Y,r[6]=d*E+p*w+m*F+_*W,r[10]=d*B+p*M+m*O+_*te,r[14]=d*S+p*k+m*U+_*j,r[3]=f*x+I*Q+C*R+y*Y,r[7]=f*E+I*w+C*F+y*W,r[11]=f*B+I*M+C*O+y*te,r[15]=f*S+I*k+C*U+y*j,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],o=e[4],i=e[8],r=e[12],s=e[1],a=e[5],A=e[9],c=e[13],l=e[2],u=e[6],g=e[10],h=e[14],d=e[3],p=e[7],m=e[11],_=e[15];return d*(+r*A*u-i*c*u-r*a*g+o*c*g+i*a*h-o*A*h)+p*(+n*A*h-n*c*g+r*s*g-i*s*h+i*c*l-r*A*l)+m*(+n*c*u-n*a*h-r*s*u+o*s*h+r*a*l-o*c*l)+_*(-i*a*l-n*A*u+n*a*g+i*s*u-o*s*g+o*A*l)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,o){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=o),this}invert(){const e=this.elements,n=e[0],o=e[1],i=e[2],r=e[3],s=e[4],a=e[5],A=e[6],c=e[7],l=e[8],u=e[9],g=e[10],h=e[11],d=e[12],p=e[13],m=e[14],_=e[15],f=u*m*c-p*g*c+p*A*h-a*m*h-u*A*_+a*g*_,I=d*g*c-l*m*c-d*A*h+s*m*h+l*A*_-s*g*_,C=l*p*c-d*u*c+d*a*h-s*p*h-l*a*_+s*u*_,y=d*u*A-l*p*A-d*a*g+s*p*g+l*a*m-s*u*m,x=n*f+o*I+i*C+r*y;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const E=1/x;return e[0]=f*E,e[1]=(p*g*r-u*m*r-p*i*h+o*m*h+u*i*_-o*g*_)*E,e[2]=(a*m*r-p*A*r+p*i*c-o*m*c-a*i*_+o*A*_)*E,e[3]=(u*A*r-a*g*r-u*i*c+o*g*c+a*i*h-o*A*h)*E,e[4]=I*E,e[5]=(l*m*r-d*g*r+d*i*h-n*m*h-l*i*_+n*g*_)*E,e[6]=(d*A*r-s*m*r-d*i*c+n*m*c+s*i*_-n*A*_)*E,e[7]=(s*g*r-l*A*r+l*i*c-n*g*c-s*i*h+n*A*h)*E,e[8]=C*E,e[9]=(d*u*r-l*p*r-d*o*h+n*p*h+l*o*_-n*u*_)*E,e[10]=(s*p*r-d*a*r+d*o*c-n*p*c-s*o*_+n*a*_)*E,e[11]=(l*a*r-s*u*r-l*o*c+n*u*c+s*o*h-n*a*h)*E,e[12]=y*E,e[13]=(l*p*i-d*u*i+d*o*g-n*p*g-l*o*m+n*u*m)*E,e[14]=(d*a*i-s*p*i-d*o*A+n*p*A+s*o*m-n*a*m)*E,e[15]=(s*u*i-l*a*i+l*o*A-n*u*A-s*o*g+n*a*g)*E,this}scale(e){const n=this.elements,o=e.x,i=e.y,r=e.z;return n[0]*=o,n[4]*=i,n[8]*=r,n[1]*=o,n[5]*=i,n[9]*=r,n[2]*=o,n[6]*=i,n[10]*=r,n[3]*=o,n[7]*=i,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],o=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,o,i))}makeTranslation(e,n,o){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,o,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),o=Math.sin(e);return this.set(1,0,0,0,0,n,-o,0,0,o,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),o=Math.sin(e);return this.set(n,0,o,0,0,1,0,0,-o,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),o=Math.sin(e);return this.set(n,-o,0,0,o,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const o=Math.cos(n),i=Math.sin(n),r=1-o,s=e.x,a=e.y,A=e.z,c=r*s,l=r*a;return this.set(c*s+o,c*a-i*A,c*A+i*a,0,c*a+i*A,l*a+o,l*A-i*s,0,c*A-i*a,l*A+i*s,r*A*A+o,0,0,0,0,1),this}makeScale(e,n,o){return this.set(e,0,0,0,0,n,0,0,0,0,o,0,0,0,0,1),this}makeShear(e,n,o,i,r,s){return this.set(1,o,r,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,o){const i=this.elements,r=n._x,s=n._y,a=n._z,A=n._w,c=r+r,l=s+s,u=a+a,g=r*c,h=r*l,d=r*u,p=s*l,m=s*u,_=a*u,f=A*c,I=A*l,C=A*u,y=o.x,x=o.y,E=o.z;return i[0]=(1-(p+_))*y,i[1]=(h+C)*y,i[2]=(d-I)*y,i[3]=0,i[4]=(h-C)*x,i[5]=(1-(g+_))*x,i[6]=(m+f)*x,i[7]=0,i[8]=(d+I)*E,i[9]=(m-f)*E,i[10]=(1-(g+p))*E,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,o){const i=this.elements;let r=JG.set(i[0],i[1],i[2]).length();const s=JG.set(i[4],i[5],i[6]).length(),a=JG.set(i[8],i[9],i[10]).length();this.determinant()\u003c0\u0026\u0026(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],YB.copy(this);const c=1/r,l=1/s,u=1/a;return YB.elements[0]*=c,YB.elements[1]*=c,YB.elements[2]*=c,YB.elements[4]*=l,YB.elements[5]*=l,YB.elements[6]*=l,YB.elements[8]*=u,YB.elements[9]*=u,YB.elements[10]*=u,n.setFromRotationMatrix(YB),o.x=r,o.y=s,o.z=a,this}makePerspective(e,n,o,i,r,s,a=Xb){const A=this.elements,c=2*r/(n-e),l=2*r/(o-i),u=(n+e)/(n-e),g=(o+i)/(o-i);let h,d;if(a===Xb)h=-(s+r)/(s-r),d=-2*s*r/(s-r);else if(a===Sde)h=-s/(s-r),d=-s*r/(s-r);else throw new Error(\"THREE.Matrix4.makePerspective(): Invalid coordinate system: \"+a);return A[0]=c,A[4]=0,A[8]=u,A[12]=0,A[1]=0,A[5]=l,A[9]=g,A[13]=0,A[2]=0,A[6]=0,A[10]=h,A[14]=d,A[3]=0,A[7]=0,A[11]=-1,A[15]=0,this}makeOrthographic(e,n,o,i,r,s,a=Xb){const A=this.elements,c=1/(n-e),l=1/(o-i),u=1/(s-r),g=(n+e)*c,h=(o+i)*l;let d,p;if(a===Xb)d=(s+r)*u,p=-2*u;else if(a===Sde)d=r*u,p=-1*u;else throw new Error(\"THREE.Matrix4.makeOrthographic(): Invalid coordinate system: \"+a);return A[0]=2*c,A[4]=0,A[8]=0,A[12]=-g,A[1]=0,A[5]=2*l,A[9]=0,A[13]=-h,A[2]=0,A[6]=0,A[10]=p,A[14]=-d,A[3]=0,A[7]=0,A[11]=0,A[15]=1,this}equals(e){const n=this.elements,o=e.elements;for(let i=0;i\u003c16;i++)if(n[i]!==o[i])return!1;return!0}fromArray(e,n=0){for(let o=0;o\u003c16;o++)this.elements[o]=e[o+n];return this}toArray(e=[],n=0){const o=this.elements;return e[n]=o[0],e[n+1]=o[1],e[n+2]=o[2],e[n+3]=o[3],e[n+4]=o[4],e[n+5]=o[5],e[n+6]=o[6],e[n+7]=o[7],e[n+8]=o[8],e[n+9]=o[9],e[n+10]=o[10],e[n+11]=o[11],e[n+12]=o[12],e[n+13]=o[13],e[n+14]=o[14],e[n+15]=o[15],e}}const JG=new jt,YB=new va,M$o=new jt(0,0,0),D$o=new jt(1,1,1),Zw=new jt,Nde=new jt,_E=new jt,vVt=new va,wVt=new Zy;class t2{constructor(e=0,n=0,o=0,i=t2.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=o,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,o,i=this._order){return this._x=e,this._y=n,this._z=o,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,o=!0){const i=e.elements,r=i[0],s=i[4],a=i[8],A=i[1],c=i[5],l=i[9],u=i[2],g=i[6],h=i[10];switch(n){case\"XYZ\":this._y=Math.asin(rf(a,-1,1)),Math.abs(a)\u003c.9999999?(this._x=Math.atan2(-l,h),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(g,c),this._z=0);break;case\"YXZ\":this._x=Math.asin(-rf(l,-1,1)),Math.abs(l)\u003c.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(A,c)):(this._y=Math.atan2(-u,r),this._z=0);break;case\"ZXY\":this._x=Math.asin(rf(g,-1,1)),Math.abs(g)\u003c.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(A,r));break;case\"ZYX\":this._y=Math.asin(-rf(u,-1,1)),Math.abs(u)\u003c.9999999?(this._x=Math.atan2(g,h),this._z=Math.atan2(A,r)):(this._x=0,this._z=Math.atan2(-s,c));break;case\"YZX\":this._z=Math.asin(rf(A,-1,1)),Math.abs(A)\u003c.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(a,h));break;case\"XZY\":this._z=Math.asin(-rf(s,-1,1)),Math.abs(s)\u003c.9999999?(this._x=Math.atan2(g,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-l,h),this._y=0);break;default:console.warn(\"THREE.Euler: .setFromRotationMatrix() encountered an unknown order: \"+n)}return this._order=n,o===!0\u0026\u0026this._onChangeCallback(),this}setFromQuaternion(e,n,o){return vVt.makeRotationFromQuaternion(e),this.setFromRotationMatrix(vVt,n,o)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return wVt.setFromEuler(this),this.setFromQuaternion(wVt,e)}equals(e){return e._x===this._x\u0026\u0026e._y===this._y\u0026\u0026e._z===this._z\u0026\u0026e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0\u0026\u0026(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}t2.DEFAULT_ORDER=\"XYZ\";class pTe{constructor(){this.mask=1}set(e){this.mask=(1\u003c\u003ce|0)\u003e\u003e\u003e0}enable(e){this.mask|=1\u003c\u003ce|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1\u003c\u003ce|0}disable(e){this.mask\u0026=~(1\u003c\u003ce|0)}disableAll(){this.mask=0}test(e){return(this.mask\u0026e.mask)!==0}isEnabled(e){return(this.mask\u0026(1\u003c\u003ce|0))!==0}}let N$o=0;const PVt=new jt,WG=new Zy,tS=new va,Rde=new jt,Gq=new jt,R$o=new jt,T$o=new Zy,MVt=new jt(1,0,0),DVt=new jt(0,1,0),NVt=new jt(0,0,1),RVt={type:\"added\"},k$o={type:\"removed\"},jG={type:\"childadded\",child:null},mTe={type:\"childremoved\",child:null};class T0 extends RR{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,\"id\",{value:N$o++}),this.uuid=u4(),this.name=\"\",this.type=\"Object3D\",this.parent=null,this.children=[],this.up=T0.DEFAULT_UP.clone();const e=new jt,n=new t2,o=new Zy,i=new jt(1,1,1);function r(){o.setFromEuler(n,!1)}function s(){n.setFromQuaternion(o,void 0,!1)}n._onChange(r),o._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:o},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new va},normalMatrix:{value:new HA}}),this.matrix=new va,this.matrixWorld=new va,this.matrixAutoUpdate=T0.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=T0.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new pTe,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate\u0026\u0026this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return WG.setFromAxisAngle(e,n),this.quaternion.multiply(WG),this}rotateOnWorldAxis(e,n){return WG.setFromAxisAngle(e,n),this.quaternion.premultiply(WG),this}rotateX(e){return this.rotateOnAxis(MVt,e)}rotateY(e){return this.rotateOnAxis(DVt,e)}rotateZ(e){return this.rotateOnAxis(NVt,e)}translateOnAxis(e,n){return PVt.copy(e).applyQuaternion(this.quaternion),this.position.add(PVt.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(MVt,e)}translateY(e){return this.translateOnAxis(DVt,e)}translateZ(e){return this.translateOnAxis(NVt,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(tS.copy(this.matrixWorld).invert())}lookAt(e,n,o){e.isVector3?Rde.copy(e):Rde.set(e,n,o);const i=this.parent;this.updateWorldMatrix(!0,!1),Gq.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?tS.lookAt(Gq,Rde,this.up):tS.lookAt(Rde,Gq,this.up),this.quaternion.setFromRotationMatrix(tS),i\u0026\u0026(tS.extractRotation(i.matrixWorld),WG.setFromRotationMatrix(tS),this.quaternion.premultiply(WG.invert()))}add(e){if(arguments.length\u003e1){for(let n=0;n\u003carguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error(\"THREE.Object3D.add: object can't be added as a child of itself.\",e),this):(e\u0026\u0026e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(RVt),jG.child=e,this.dispatchEvent(jG),jG.child=null):console.error(\"THREE.Object3D.add: object not an instance of THREE.Object3D.\",e),this)}remove(e){if(arguments.length\u003e1){for(let o=0;o\u003carguments.length;o++)this.remove(arguments[o]);return this}const n=this.children.indexOf(e);return n!==-1\u0026\u0026(e.parent=null,this.children.splice(n,1),e.dispatchEvent(k$o),mTe.child=e,this.dispatchEvent(mTe),mTe.child=null),this}removeFromParent(){const e=this.parent;return e!==null\u0026\u0026e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),tS.copy(this.matrixWorld).invert(),e.parent!==null\u0026\u0026(e.parent.updateWorldMatrix(!0,!1),tS.multiply(e.parent.matrixWorld)),e.applyMatrix4(tS),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(RVt),jG.child=e,this.dispatchEvent(jG),jG.child=null,this}getObjectById(e){return this.getObjectByProperty(\"id\",e)}getObjectByName(e){return this.getObjectByProperty(\"name\",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let o=0,i=this.children.length;o\u003ci;o++){const s=this.children[o].getObjectByProperty(e,n);if(s!==void 0)return s}}getObjectsByProperty(e,n,o=[]){this[e]===n\u0026\u0026o.push(this);const i=this.children;for(let r=0,s=i.length;r\u003cs;r++)i[r].getObjectsByProperty(e,n,o);return o}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Gq,e,R$o),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Gq,T$o,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let o=0,i=n.length;o\u003ci;o++)n[o].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let o=0,i=n.length;o\u003ci;o++)n[o].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null\u0026\u0026(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate\u0026\u0026this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)\u0026\u0026(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let o=0,i=n.length;o\u003ci;o++){const r=n[o];(r.matrixWorldAutoUpdate===!0||e===!0)\u0026\u0026r.updateMatrixWorld(e)}}updateWorldMatrix(e,n){const o=this.parent;if(e===!0\u0026\u0026o!==null\u0026\u0026o.matrixWorldAutoUpdate===!0\u0026\u0026o.updateWorldMatrix(!0,!1),this.matrixAutoUpdate\u0026\u0026this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),n===!0){const i=this.children;for(let r=0,s=i.length;r\u003cs;r++){const a=i[r];a.matrixWorldAutoUpdate===!0\u0026\u0026a.updateWorldMatrix(!1,!0)}}}toJSON(e){const n=e===void 0||typeof e==\"string\",o={};n\u0026\u0026(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},o.metadata={version:4.6,type:\"Object\",generator:\"Object3D.toJSON\"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==\"\"\u0026\u0026(i.name=this.name),this.castShadow===!0\u0026\u0026(i.castShadow=!0),this.receiveShadow===!0\u0026\u0026(i.receiveShadow=!0),this.visible===!1\u0026\u0026(i.visible=!1),this.frustumCulled===!1\u0026\u0026(i.frustumCulled=!1),this.renderOrder!==0\u0026\u0026(i.renderOrder=this.renderOrder),Object.keys(this.userData).length\u003e0\u0026\u0026(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1\u0026\u0026(i.matrixAutoUpdate=!1),this.isInstancedMesh\u0026\u0026(i.type=\"InstancedMesh\",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null\u0026\u0026(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh\u0026\u0026(i.type=\"BatchedMesh\",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=\u003e({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null\u0026\u0026(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null\u0026\u0026(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null\u0026\u0026(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function r(a,A){return a[A.uuid]===void 0\u0026\u0026(a[A.uuid]=A.toJSON(e)),A.uuid}if(this.isScene)this.background\u0026\u0026(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture\u0026\u0026(i.background=this.background.toJSON(e).uuid)),this.environment\u0026\u0026this.environment.isTexture\u0026\u0026this.environment.isRenderTargetTexture!==!0\u0026\u0026(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0\u0026\u0026a.shapes!==void 0){const A=a.shapes;if(Array.isArray(A))for(let c=0,l=A.length;c\u003cl;c++){const u=A[c];r(e.shapes,u)}else r(e.shapes,A)}}if(this.isSkinnedMesh\u0026\u0026(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0\u0026\u0026(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let A=0,c=this.material.length;A\u003cc;A++)a.push(r(e.materials,this.material[A]));i.material=a}else i.material=r(e.materials,this.material);if(this.children.length\u003e0){i.children=[];for(let a=0;a\u003cthis.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length\u003e0){i.animations=[];for(let a=0;a\u003cthis.animations.length;a++){const A=this.animations[a];i.animations.push(r(e.animations,A))}}if(n){const a=s(e.geometries),A=s(e.materials),c=s(e.textures),l=s(e.images),u=s(e.shapes),g=s(e.skeletons),h=s(e.animations),d=s(e.nodes);a.length\u003e0\u0026\u0026(o.geometries=a),A.length\u003e0\u0026\u0026(o.materials=A),c.length\u003e0\u0026\u0026(o.textures=c),l.length\u003e0\u0026\u0026(o.images=l),u.length\u003e0\u0026\u0026(o.shapes=u),g.length\u003e0\u0026\u0026(o.skeletons=g),h.length\u003e0\u0026\u0026(o.animations=h),d.length\u003e0\u0026\u0026(o.nodes=d)}return o.object=i,o;function s(a){const A=[];for(const c in a){const l=a[c];delete l.metadata,A.push(l)}return A}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let o=0;o\u003ce.children.length;o++){const i=e.children[o];this.add(i.clone())}return this}}T0.DEFAULT_UP=new jt(0,1,0),T0.DEFAULT_MATRIX_AUTO_UPDATE=!0,T0.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const UB=new jt,nS=new jt,_Te=new jt,oS=new jt,$G=new jt,qG=new jt,TVt=new jt,fTe=new jt,ITe=new jt,CTe=new jt;class KB{constructor(e=new jt,n=new jt,o=new jt){this.a=e,this.b=n,this.c=o}static getNormal(e,n,o,i){i.subVectors(o,n),UB.subVectors(e,n),i.cross(UB);const r=i.lengthSq();return r\u003e0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,n,o,i,r){UB.subVectors(i,n),nS.subVectors(o,n),_Te.subVectors(e,n);const s=UB.dot(UB),a=UB.dot(nS),A=UB.dot(_Te),c=nS.dot(nS),l=nS.dot(_Te),u=s*c-a*a;if(u===0)return r.set(0,0,0),null;const g=1/u,h=(c*A-a*l)*g,d=(s*l-a*A)*g;return r.set(1-h-d,d,h)}static containsPoint(e,n,o,i){return this.getBarycoord(e,n,o,i,oS)===null?!1:oS.x\u003e=0\u0026\u0026oS.y\u003e=0\u0026\u0026oS.x+oS.y\u003c=1}static getInterpolation(e,n,o,i,r,s,a,A){return this.getBarycoord(e,n,o,i,oS)===null?(A.x=0,A.y=0,\"z\"in A\u0026\u0026(A.z=0),\"w\"in A\u0026\u0026(A.w=0),null):(A.setScalar(0),A.addScaledVector(r,oS.x),A.addScaledVector(s,oS.y),A.addScaledVector(a,oS.z),A)}static isFrontFacing(e,n,o,i){return UB.subVectors(o,n),nS.subVectors(e,n),UB.cross(nS).dot(i)\u003c0}set(e,n,o){return this.a.copy(e),this.b.copy(n),this.c.copy(o),this}setFromPointsAndIndices(e,n,o,i){return this.a.copy(e[n]),this.b.copy(e[o]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,o,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,o),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return UB.subVectors(this.c,this.b),nS.subVectors(this.a,this.b),UB.cross(nS).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return KB.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return KB.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,o,i,r){return KB.getInterpolation(e,this.a,this.b,this.c,n,o,i,r)}containsPoint(e){return KB.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return KB.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const o=this.a,i=this.b,r=this.c;let s,a;$G.subVectors(i,o),qG.subVectors(r,o),fTe.subVectors(e,o);const A=$G.dot(fTe),c=qG.dot(fTe);if(A\u003c=0\u0026\u0026c\u003c=0)return n.copy(o);ITe.subVectors(e,i);const l=$G.dot(ITe),u=qG.dot(ITe);if(l\u003e=0\u0026\u0026u\u003c=l)return n.copy(i);const g=A*u-l*c;if(g\u003c=0\u0026\u0026A\u003e=0\u0026\u0026l\u003c=0)return s=A/(A-l),n.copy(o).addScaledVector($G,s);CTe.subVectors(e,r);const h=$G.dot(CTe),d=qG.dot(CTe);if(d\u003e=0\u0026\u0026h\u003c=d)return n.copy(r);const p=h*c-A*d;if(p\u003c=0\u0026\u0026c\u003e=0\u0026\u0026d\u003c=0)return a=c/(c-d),n.copy(o).addScaledVector(qG,a);const m=l*d-h*u;if(m\u003c=0\u0026\u0026u-l\u003e=0\u0026\u0026h-d\u003e=0)return TVt.subVectors(r,i),a=(u-l)/(u-l+(h-d)),n.copy(i).addScaledVector(TVt,a);const _=1/(m+p+g);return s=p*_,a=g*_,n.copy(o).addScaledVector($G,s).addScaledVector(qG,a)}equals(e){return e.a.equals(this.a)\u0026\u0026e.b.equals(this.b)\u0026\u0026e.c.equals(this.c)}}const kVt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},eP={h:0,s:0,l:0},Tde={h:0,s:0,l:0};function yTe(t,e,n){return n\u003c0\u0026\u0026(n+=1),n\u003e1\u0026\u0026(n-=1),n\u003c1/6?t+(e-t)*6*n:n\u003c1/2?e:n\u003c2/3?t+(e-t)*6*(2/3-n):t}class Vi{constructor(e,n,o){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,o)}set(e,n,o){if(n===void 0\u0026\u0026o===void 0){const i=e;i\u0026\u0026i.isColor?this.copy(i):typeof i==\"number\"?this.setHex(i):typeof i==\"string\"\u0026\u0026this.setStyle(i)}else this.setRGB(e,n,o);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Ox){return e=Math.floor(e),this.r=(e\u003e\u003e16\u0026255)/255,this.g=(e\u003e\u003e8\u0026255)/255,this.b=(e\u0026255)/255,iu.toWorkingColorSpace(this,n),this}setRGB(e,n,o,i=iu.workingColorSpace){return this.r=e,this.g=n,this.b=o,iu.toWorkingColorSpace(this,i),this}setHSL(e,n,o,i=iu.workingColorSpace){if(e=iTe(e,1),n=rf(n,0,1),o=rf(o,0,1),n===0)this.r=this.g=this.b=o;else{const r=o\u003c=.5?o*(1+n):o+n-o*n,s=2*o-r;this.r=yTe(s,r,e+1/3),this.g=yTe(s,r,e),this.b=yTe(s,r,e-1/3)}return iu.toWorkingColorSpace(this,i),this}setStyle(e,n=Ox){function o(r){r!==void 0\u0026\u0026parseFloat(r)\u003c1\u0026\u0026console.warn(\"THREE.Color: Alpha component of \"+e+\" will be ignored.\")}let i;if(i=/^(\\w+)\\(([^\\)]*)\\)/.exec(e)){let r;const s=i[1],a=i[2];switch(s){case\"rgb\":case\"rgba\":if(r=/^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a))return o(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a))return o(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case\"hsl\":case\"hsla\":if(r=/^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*,\\s*(\\d*\\.?\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(a))return o(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn(\"THREE.Color: Unknown color model \"+e)}}else if(i=/^\\#([A-Fa-f\\d]+)$/.exec(e)){const r=i[1],s=r.length;if(s===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(r,16),n);console.warn(\"THREE.Color: Invalid hex color \"+e)}else if(e\u0026\u0026e.length\u003e0)return this.setColorName(e,n);return this}setColorName(e,n=Ox){const o=kVt[e.toLowerCase()];return o!==void 0?this.setHex(o,n):console.warn(\"THREE.Color: Unknown color \"+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=GG(e.r),this.g=GG(e.g),this.b=GG(e.b),this}copyLinearToSRGB(e){return this.r=aTe(e.r),this.g=aTe(e.g),this.b=aTe(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ox){return iu.fromWorkingColorSpace(MC.copy(this),e),Math.round(rf(MC.r*255,0,255))*65536+Math.round(rf(MC.g*255,0,255))*256+Math.round(rf(MC.b*255,0,255))}getHexString(e=Ox){return(\"000000\"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=iu.workingColorSpace){iu.fromWorkingColorSpace(MC.copy(this),n);const o=MC.r,i=MC.g,r=MC.b,s=Math.max(o,i,r),a=Math.min(o,i,r);let A,c;const l=(a+s)/2;if(a===s)A=0,c=0;else{const u=s-a;switch(c=l\u003c=.5?u/(s+a):u/(2-s-a),s){case o:A=(i-r)/u+(i\u003cr?6:0);break;case i:A=(r-o)/u+2;break;case r:A=(o-i)/u+4;break}A/=6}return e.h=A,e.s=c,e.l=l,e}getRGB(e,n=iu.workingColorSpace){return iu.fromWorkingColorSpace(MC.copy(this),n),e.r=MC.r,e.g=MC.g,e.b=MC.b,e}getStyle(e=Ox){iu.fromWorkingColorSpace(MC.copy(this),e);const n=MC.r,o=MC.g,i=MC.b;return e!==Ox?`color(${e} ${n.toFixed(3)} ${o.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(o*255)},${Math.round(i*255)})`}offsetHSL(e,n,o){return this.getHSL(eP),this.setHSL(eP.h+e,eP.s+n,eP.l+o)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,o){return this.r=e.r+(n.r-e.r)*o,this.g=e.g+(n.g-e.g)*o,this.b=e.b+(n.b-e.b)*o,this}lerpHSL(e,n){this.getHSL(eP),e.getHSL(Tde);const o=Fq(eP.h,Tde.h,n),i=Fq(eP.s,Tde.s,n),r=Fq(eP.l,Tde.l,n);return this.setHSL(o,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,o=this.g,i=this.b,r=e.elements;return this.r=r[0]*n+r[3]*o+r[6]*i,this.g=r[1]*n+r[4]*o+r[7]*i,this.b=r[2]*n+r[5]*o+r[8]*i,this}equals(e){return e.r===this.r\u0026\u0026e.g===this.g\u0026\u0026e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const MC=new Vi;Vi.NAMES=kVt;let F$o=0;class Gx extends RR{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,\"id\",{value:F$o++}),this.uuid=u4(),this.name=\"\",this.type=\"Material\",this.blending=QG,this.side=mE,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=URe,this.blendDst=KRe,this.blendEquation=NR,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Vi(0,0,0),this.blendAlpha=0,this.depthFunc=_de,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=_Vt,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=FG,this.stencilZFail=FG,this.stencilZPass=FG,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest\u003e0!=e\u003e0\u0026\u0026this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const o=e[n];if(o===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i\u0026\u0026i.isColor?i.set(o):i\u0026\u0026i.isVector3\u0026\u0026o\u0026\u0026o.isVector3?i.copy(o):this[n]=o}}toJSON(e){const n=e===void 0||typeof e==\"string\";n\u0026\u0026(e={textures:{},images:{}});const o={metadata:{version:4.6,type:\"Material\",generator:\"Material.toJSON\"}};o.uuid=this.uuid,o.type=this.type,this.name!==\"\"\u0026\u0026(o.name=this.name),this.color\u0026\u0026this.color.isColor\u0026\u0026(o.color=this.color.getHex()),this.roughness!==void 0\u0026\u0026(o.roughness=this.roughness),this.metalness!==void 0\u0026\u0026(o.metalness=this.metalness),this.sheen!==void 0\u0026\u0026(o.sheen=this.sheen),this.sheenColor\u0026\u0026this.sheenColor.isColor\u0026\u0026(o.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0\u0026\u0026(o.sheenRoughness=this.sheenRoughness),this.emissive\u0026\u0026this.emissive.isColor\u0026\u0026(o.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0\u0026\u0026this.emissiveIntensity!==1\u0026\u0026(o.emissiveIntensity=this.emissiveIntensity),this.specular\u0026\u0026this.specular.isColor\u0026\u0026(o.specular=this.specular.getHex()),this.specularIntensity!==void 0\u0026\u0026(o.specularIntensity=this.specularIntensity),this.specularColor\u0026\u0026this.specularColor.isColor\u0026\u0026(o.specularColor=this.specularColor.getHex()),this.shininess!==void 0\u0026\u0026(o.shininess=this.shininess),this.clearcoat!==void 0\u0026\u0026(o.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0\u0026\u0026(o.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap\u0026\u0026this.clearcoatMap.isTexture\u0026\u0026(o.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap\u0026\u0026this.clearcoatRoughnessMap.isTexture\u0026\u0026(o.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap\u0026\u0026this.clearcoatNormalMap.isTexture\u0026\u0026(o.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,o.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0\u0026\u0026(o.dispersion=this.dispersion),this.iridescence!==void 0\u0026\u0026(o.iridescence=this.iridescence),this.iridescenceIOR!==void 0\u0026\u0026(o.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0\u0026\u0026(o.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap\u0026\u0026this.iridescenceMap.isTexture\u0026\u0026(o.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap\u0026\u0026this.iridescenceThicknessMap.isTexture\u0026\u0026(o.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0\u0026\u0026(o.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0\u0026\u0026(o.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap\u0026\u0026this.anisotropyMap.isTexture\u0026\u0026(o.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map\u0026\u0026this.map.isTexture\u0026\u0026(o.map=this.map.toJSON(e).uuid),this.matcap\u0026\u0026this.matcap.isTexture\u0026\u0026(o.matcap=this.matcap.toJSON(e).uuid),this.alphaMap\u0026\u0026this.alphaMap.isTexture\u0026\u0026(o.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap\u0026\u0026this.lightMap.isTexture\u0026\u0026(o.lightMap=this.lightMap.toJSON(e).uuid,o.lightMapIntensity=this.lightMapIntensity),this.aoMap\u0026\u0026this.aoMap.isTexture\u0026\u0026(o.aoMap=this.aoMap.toJSON(e).uuid,o.aoMapIntensity=this.aoMapIntensity),this.bumpMap\u0026\u0026this.bumpMap.isTexture\u0026\u0026(o.bumpMap=this.bumpMap.toJSON(e).uuid,o.bumpScale=this.bumpScale),this.normalMap\u0026\u0026this.normalMap.isTexture\u0026\u0026(o.normalMap=this.normalMap.toJSON(e).uuid,o.normalMapType=this.normalMapType,o.normalScale=this.normalScale.toArray()),this.displacementMap\u0026\u0026this.displacementMap.isTexture\u0026\u0026(o.displacementMap=this.displacementMap.toJSON(e).uuid,o.displacementScale=this.displacementScale,o.displacementBias=this.displacementBias),this.roughnessMap\u0026\u0026this.roughnessMap.isTexture\u0026\u0026(o.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap\u0026\u0026this.metalnessMap.isTexture\u0026\u0026(o.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap\u0026\u0026this.emissiveMap.isTexture\u0026\u0026(o.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap\u0026\u0026this.specularMap.isTexture\u0026\u0026(o.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap\u0026\u0026this.specularIntensityMap.isTexture\u0026\u0026(o.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap\u0026\u0026this.specularColorMap.isTexture\u0026\u0026(o.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap\u0026\u0026this.envMap.isTexture\u0026\u0026(o.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0\u0026\u0026(o.combine=this.combine)),this.envMapRotation!==void 0\u0026\u0026(o.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0\u0026\u0026(o.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0\u0026\u0026(o.reflectivity=this.reflectivity),this.refractionRatio!==void 0\u0026\u0026(o.refractionRatio=this.refractionRatio),this.gradientMap\u0026\u0026this.gradientMap.isTexture\u0026\u0026(o.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0\u0026\u0026(o.transmission=this.transmission),this.transmissionMap\u0026\u0026this.transmissionMap.isTexture\u0026\u0026(o.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0\u0026\u0026(o.thickness=this.thickness),this.thicknessMap\u0026\u0026this.thicknessMap.isTexture\u0026\u0026(o.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0\u0026\u0026this.attenuationDistance!==1/0\u0026\u0026(o.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0\u0026\u0026(o.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0\u0026\u0026(o.size=this.size),this.shadowSide!==null\u0026\u0026(o.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0\u0026\u0026(o.sizeAttenuation=this.sizeAttenuation),this.blending!==QG\u0026\u0026(o.blending=this.blending),this.side!==mE\u0026\u0026(o.side=this.side),this.vertexColors===!0\u0026\u0026(o.vertexColors=!0),this.opacity\u003c1\u0026\u0026(o.opacity=this.opacity),this.transparent===!0\u0026\u0026(o.transparent=!0),this.blendSrc!==URe\u0026\u0026(o.blendSrc=this.blendSrc),this.blendDst!==KRe\u0026\u0026(o.blendDst=this.blendDst),this.blendEquation!==NR\u0026\u0026(o.blendEquation=this.blendEquation),this.blendSrcAlpha!==null\u0026\u0026(o.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null\u0026\u0026(o.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null\u0026\u0026(o.blendEquationAlpha=this.blendEquationAlpha),this.blendColor\u0026\u0026this.blendColor.isColor\u0026\u0026(o.blendColor=this.blendColor.getHex()),this.blendAlpha!==0\u0026\u0026(o.blendAlpha=this.blendAlpha),this.depthFunc!==_de\u0026\u0026(o.depthFunc=this.depthFunc),this.depthTest===!1\u0026\u0026(o.depthTest=this.depthTest),this.depthWrite===!1\u0026\u0026(o.depthWrite=this.depthWrite),this.colorWrite===!1\u0026\u0026(o.colorWrite=this.colorWrite),this.stencilWriteMask!==255\u0026\u0026(o.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_Vt\u0026\u0026(o.stencilFunc=this.stencilFunc),this.stencilRef!==0\u0026\u0026(o.stencilRef=this.stencilRef),this.stencilFuncMask!==255\u0026\u0026(o.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==FG\u0026\u0026(o.stencilFail=this.stencilFail),this.stencilZFail!==FG\u0026\u0026(o.stencilZFail=this.stencilZFail),this.stencilZPass!==FG\u0026\u0026(o.stencilZPass=this.stencilZPass),this.stencilWrite===!0\u0026\u0026(o.stencilWrite=this.stencilWrite),this.rotation!==void 0\u0026\u0026this.rotation!==0\u0026\u0026(o.rotation=this.rotation),this.polygonOffset===!0\u0026\u0026(o.polygonOffset=!0),this.polygonOffsetFactor!==0\u0026\u0026(o.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0\u0026\u0026(o.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0\u0026\u0026this.linewidth!==1\u0026\u0026(o.linewidth=this.linewidth),this.dashSize!==void 0\u0026\u0026(o.dashSize=this.dashSize),this.gapSize!==void 0\u0026\u0026(o.gapSize=this.gapSize),this.scale!==void 0\u0026\u0026(o.scale=this.scale),this.dithering===!0\u0026\u0026(o.dithering=!0),this.alphaTest\u003e0\u0026\u0026(o.alphaTest=this.alphaTest),this.alphaHash===!0\u0026\u0026(o.alphaHash=!0),this.alphaToCoverage===!0\u0026\u0026(o.alphaToCoverage=!0),this.premultipliedAlpha===!0\u0026\u0026(o.premultipliedAlpha=!0),this.forceSinglePass===!0\u0026\u0026(o.forceSinglePass=!0),this.wireframe===!0\u0026\u0026(o.wireframe=!0),this.wireframeLinewidth\u003e1\u0026\u0026(o.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==\"round\"\u0026\u0026(o.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==\"round\"\u0026\u0026(o.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0\u0026\u0026(o.flatShading=!0),this.visible===!1\u0026\u0026(o.visible=!1),this.toneMapped===!1\u0026\u0026(o.toneMapped=!1),this.fog===!1\u0026\u0026(o.fog=!1),Object.keys(this.userData).length\u003e0\u0026\u0026(o.userData=this.userData);function i(r){const s=[];for(const a in r){const A=r[a];delete A.metadata,s.push(A)}return s}if(n){const r=i(e.textures),s=i(e.images);r.length\u003e0\u0026\u0026(o.textures=r),s.length\u003e0\u0026\u0026(o.images=s)}return o}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let o=null;if(n!==null){const i=n.length;o=new Array(i);for(let r=0;r!==i;++r)o[r]=n[r].clone()}return this.clippingPlanes=o,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:\"dispose\"})}set needsUpdate(e){e===!0\u0026\u0026this.version++}}class fE extends Gx{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=\"MeshBasicMaterial\",this.color=new Vi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new t2,this.combine=VRe,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const s_=new jt,kde=new ni;class tg{constructor(e,n,o=!1){if(Array.isArray(e))throw new TypeError(\"THREE.BufferAttribute: array should be a Typed Array.\");this.isBufferAttribute=!0,this.name=\"\",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=o,this.usage=oTe,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=m6,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0\u0026\u0026this.version++}get updateRange(){return sTe(\"THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.\"),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,o){e*=this.itemSize,o*=n.itemSize;for(let i=0,r=this.itemSize;i\u003cr;i++)this.array[e+i]=n.array[o+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,o=this.count;n\u003co;n++)kde.fromBufferAttribute(this,n),kde.applyMatrix3(e),this.setXY(n,kde.x,kde.y);else if(this.itemSize===3)for(let n=0,o=this.count;n\u003co;n++)s_.fromBufferAttribute(this,n),s_.applyMatrix3(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}applyMatrix4(e){for(let n=0,o=this.count;n\u003co;n++)s_.fromBufferAttribute(this,n),s_.applyMatrix4(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}applyNormalMatrix(e){for(let n=0,o=this.count;n\u003co;n++)s_.fromBufferAttribute(this,n),s_.applyNormalMatrix(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}transformDirection(e){for(let n=0,o=this.count;n\u003co;n++)s_.fromBufferAttribute(this,n),s_.transformDirection(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let o=this.array[e*this.itemSize+n];return this.normalized\u0026\u0026(o=HB(o,this.array)),o}setComponent(e,n,o){return this.normalized\u0026\u0026(o=ou(o,this.array)),this.array[e*this.itemSize+n]=o,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}setX(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}setY(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}setZ(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}setW(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,o){return e*=this.itemSize,this.normalized\u0026\u0026(n=ou(n,this.array),o=ou(o,this.array)),this.array[e+0]=n,this.array[e+1]=o,this}setXYZ(e,n,o,i){return e*=this.itemSize,this.normalized\u0026\u0026(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array)),this.array[e+0]=n,this.array[e+1]=o,this.array[e+2]=i,this}setXYZW(e,n,o,i,r){return e*=this.itemSize,this.normalized\u0026\u0026(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array),r=ou(r,this.array)),this.array[e+0]=n,this.array[e+1]=o,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==\"\"\u0026\u0026(e.name=this.name),this.usage!==oTe\u0026\u0026(e.usage=this.usage),e}}class FVt extends tg{constructor(e,n,o){super(new Uint16Array(e),n,o)}}class xTe extends tg{constructor(e,n,o){super(new Uint32Array(e),n,o)}}class Bs extends tg{constructor(e,n,o){super(new Float32Array(e),n,o)}}let L$o=0;const g4=new va,ETe=new T0,XG=new jt,IE=new e2,Yq=new e2,r1=new jt;class Zl extends RR{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,\"id\",{value:L$o++}),this.uuid=u4(),this.name=\"\",this.type=\"BufferGeometry\",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(yVt(e)?xTe:FVt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,o=0){this.groups.push({start:e,count:n,materialIndex:o})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0\u0026\u0026(n.applyMatrix4(e),n.needsUpdate=!0);const o=this.attributes.normal;if(o!==void 0){const r=new HA().getNormalMatrix(e);o.applyNormalMatrix(r),o.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0\u0026\u0026(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null\u0026\u0026this.computeBoundingBox(),this.boundingSphere!==null\u0026\u0026this.computeBoundingSphere(),this}applyQuaternion(e){return g4.makeRotationFromQuaternion(e),this.applyMatrix4(g4),this}rotateX(e){return g4.makeRotationX(e),this.applyMatrix4(g4),this}rotateY(e){return g4.makeRotationY(e),this.applyMatrix4(g4),this}rotateZ(e){return g4.makeRotationZ(e),this.applyMatrix4(g4),this}translate(e,n,o){return g4.makeTranslation(e,n,o),this.applyMatrix4(g4),this}scale(e,n,o){return g4.makeScale(e,n,o),this.applyMatrix4(g4),this}lookAt(e){return ETe.lookAt(e),ETe.updateMatrix(),this.applyMatrix4(ETe.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(XG).negate(),this.translate(XG.x,XG.y,XG.z),this}setFromPoints(e){const n=[];for(let o=0,i=e.length;o\u003ci;o++){const r=e[o];n.push(r.x,r.y,r.z||0)}return this.setAttribute(\"position\",new Bs(n,3)),this}computeBoundingBox(){this.boundingBox===null\u0026\u0026(this.boundingBox=new e2);const e=this.attributes.position,n=this.morphAttributes.position;if(e\u0026\u0026e.isGLBufferAttribute){console.error(\"THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.\",this),this.boundingBox.set(new jt(-1/0,-1/0,-1/0),new jt(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let o=0,i=n.length;o\u003ci;o++){const r=n[o];IE.setFromBufferAttribute(r),this.morphTargetsRelative?(r1.addVectors(this.boundingBox.min,IE.min),this.boundingBox.expandByPoint(r1),r1.addVectors(this.boundingBox.max,IE.max),this.boundingBox.expandByPoint(r1)):(this.boundingBox.expandByPoint(IE.min),this.boundingBox.expandByPoint(IE.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))\u0026\u0026console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null\u0026\u0026(this.boundingSphere=new GB);const e=this.attributes.position,n=this.morphAttributes.position;if(e\u0026\u0026e.isGLBufferAttribute){console.error(\"THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.\",this),this.boundingSphere.set(new jt,1/0);return}if(e){const o=this.boundingSphere.center;if(IE.setFromBufferAttribute(e),n)for(let r=0,s=n.length;r\u003cs;r++){const a=n[r];Yq.setFromBufferAttribute(a),this.morphTargetsRelative?(r1.addVectors(IE.min,Yq.min),IE.expandByPoint(r1),r1.addVectors(IE.max,Yq.max),IE.expandByPoint(r1)):(IE.expandByPoint(Yq.min),IE.expandByPoint(Yq.max))}IE.getCenter(o);let i=0;for(let r=0,s=e.count;r\u003cs;r++)r1.fromBufferAttribute(e,r),i=Math.max(i,o.distanceToSquared(r1));if(n)for(let r=0,s=n.length;r\u003cs;r++){const a=n[r],A=this.morphTargetsRelative;for(let c=0,l=a.count;c\u003cl;c++)r1.fromBufferAttribute(a,c),A\u0026\u0026(XG.fromBufferAttribute(e,c),r1.add(XG)),i=Math.max(i,o.distanceToSquared(r1))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)\u0026\u0026console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error(\"THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)\");return}const o=n.position,i=n.normal,r=n.uv;this.hasAttribute(\"tangent\")===!1\u0026\u0026this.setAttribute(\"tangent\",new tg(new Float32Array(4*o.count),4));const s=this.getAttribute(\"tangent\"),a=[],A=[];for(let B=0;B\u003co.count;B++)a[B]=new jt,A[B]=new jt;const c=new jt,l=new jt,u=new jt,g=new ni,h=new ni,d=new ni,p=new jt,m=new jt;function _(B,S,Q){c.fromBufferAttribute(o,B),l.fromBufferAttribute(o,S),u.fromBufferAttribute(o,Q),g.fromBufferAttribute(r,B),h.fromBufferAttribute(r,S),d.fromBufferAttribute(r,Q),l.sub(c),u.sub(c),h.sub(g),d.sub(g);const w=1/(h.x*d.y-d.x*h.y);isFinite(w)\u0026\u0026(p.copy(l).multiplyScalar(d.y).addScaledVector(u,-h.y).multiplyScalar(w),m.copy(u).multiplyScalar(h.x).addScaledVector(l,-d.x).multiplyScalar(w),a[B].add(p),a[S].add(p),a[Q].add(p),A[B].add(m),A[S].add(m),A[Q].add(m))}let f=this.groups;f.length===0\u0026\u0026(f=[{start:0,count:e.count}]);for(let B=0,S=f.length;B\u003cS;++B){const Q=f[B],w=Q.start,M=Q.count;for(let k=w,R=w+M;k\u003cR;k+=3)_(e.getX(k+0),e.getX(k+1),e.getX(k+2))}const I=new jt,C=new jt,y=new jt,x=new jt;function E(B){y.fromBufferAttribute(i,B),x.copy(y);const S=a[B];I.copy(S),I.sub(y.multiplyScalar(y.dot(S))).normalize(),C.crossVectors(x,S);const w=C.dot(A[B])\u003c0?-1:1;s.setXYZW(B,I.x,I.y,I.z,w)}for(let B=0,S=f.length;B\u003cS;++B){const Q=f[B],w=Q.start,M=Q.count;for(let k=w,R=w+M;k\u003cR;k+=3)E(e.getX(k+0)),E(e.getX(k+1)),E(e.getX(k+2))}}computeVertexNormals(){const e=this.index,n=this.getAttribute(\"position\");if(n!==void 0){let o=this.getAttribute(\"normal\");if(o===void 0)o=new tg(new Float32Array(n.count*3),3),this.setAttribute(\"normal\",o);else for(let g=0,h=o.count;g\u003ch;g++)o.setXYZ(g,0,0,0);const i=new jt,r=new jt,s=new jt,a=new jt,A=new jt,c=new jt,l=new jt,u=new jt;if(e)for(let g=0,h=e.count;g\u003ch;g+=3){const d=e.getX(g+0),p=e.getX(g+1),m=e.getX(g+2);i.fromBufferAttribute(n,d),r.fromBufferAttribute(n,p),s.fromBufferAttribute(n,m),l.subVectors(s,r),u.subVectors(i,r),l.cross(u),a.fromBufferAttribute(o,d),A.fromBufferAttribute(o,p),c.fromBufferAttribute(o,m),a.add(l),A.add(l),c.add(l),o.setXYZ(d,a.x,a.y,a.z),o.setXYZ(p,A.x,A.y,A.z),o.setXYZ(m,c.x,c.y,c.z)}else for(let g=0,h=n.count;g\u003ch;g+=3)i.fromBufferAttribute(n,g+0),r.fromBufferAttribute(n,g+1),s.fromBufferAttribute(n,g+2),l.subVectors(s,r),u.subVectors(i,r),l.cross(u),o.setXYZ(g+0,l.x,l.y,l.z),o.setXYZ(g+1,l.x,l.y,l.z),o.setXYZ(g+2,l.x,l.y,l.z);this.normalizeNormals(),o.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,o=e.count;n\u003co;n++)r1.fromBufferAttribute(e,n),r1.normalize(),e.setXYZ(n,r1.x,r1.y,r1.z)}toNonIndexed(){function e(a,A){const c=a.array,l=a.itemSize,u=a.normalized,g=new c.constructor(A.length*l);let h=0,d=0;for(let p=0,m=A.length;p\u003cm;p++){a.isInterleavedBufferAttribute?h=A[p]*a.data.stride+a.offset:h=A[p]*l;for(let _=0;_\u003cl;_++)g[d++]=c[h++]}return new tg(g,l,u)}if(this.index===null)return console.warn(\"THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.\"),this;const n=new Zl,o=this.index.array,i=this.attributes;for(const a in i){const A=i[a],c=e(A,o);n.setAttribute(a,c)}const r=this.morphAttributes;for(const a in r){const A=[],c=r[a];for(let l=0,u=c.length;l\u003cu;l++){const g=c[l],h=e(g,o);A.push(h)}n.morphAttributes[a]=A}n.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let a=0,A=s.length;a\u003cA;a++){const c=s[a];n.addGroup(c.start,c.count,c.materialIndex)}return n}toJSON(){const e={metadata:{version:4.6,type:\"BufferGeometry\",generator:\"BufferGeometry.toJSON\"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==\"\"\u0026\u0026(e.name=this.name),Object.keys(this.userData).length\u003e0\u0026\u0026(e.userData=this.userData),this.parameters!==void 0){const A=this.parameters;for(const c in A)A[c]!==void 0\u0026\u0026(e[c]=A[c]);return e}e.data={attributes:{}};const n=this.index;n!==null\u0026\u0026(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const o=this.attributes;for(const A in o){const c=o[A];e.data.attributes[A]=c.toJSON(e.data)}const i={};let r=!1;for(const A in this.morphAttributes){const c=this.morphAttributes[A],l=[];for(let u=0,g=c.length;u\u003cg;u++){const h=c[u];l.push(h.toJSON(e.data))}l.length\u003e0\u0026\u0026(i[A]=l,r=!0)}r\u0026\u0026(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length\u003e0\u0026\u0026(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null\u0026\u0026(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const o=e.index;o!==null\u0026\u0026this.setIndex(o.clone(n));const i=e.attributes;for(const c in i){const l=i[c];this.setAttribute(c,l.clone(n))}const r=e.morphAttributes;for(const c in r){const l=[],u=r[c];for(let g=0,h=u.length;g\u003ch;g++)l.push(u[g].clone(n));this.morphAttributes[c]=l}this.morphTargetsRelative=e.morphTargetsRelative;const s=e.groups;for(let c=0,l=s.length;c\u003cl;c++){const u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}const a=e.boundingBox;a!==null\u0026\u0026(this.boundingBox=a.clone());const A=e.boundingSphere;return A!==null\u0026\u0026(this.boundingSphere=A.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:\"dispose\"})}}const LVt=new va,LR=new zG,Fde=new GB,HVt=new jt,ZG=new jt,eY=new jt,tY=new jt,BTe=new jt,Lde=new jt,Hde=new ni,Ode=new ni,Gde=new ni,OVt=new jt,GVt=new jt,YVt=new jt,Yde=new jt,Ude=new jt;class Er extends T0{constructor(e=new Zl,n=new fE){super(),this.isMesh=!0,this.type=\"Mesh\",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),e.morphTargetInfluences!==void 0\u0026\u0026(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0\u0026\u0026(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const n=this.geometry.morphAttributes,o=Object.keys(n);if(o.length\u003e0){const i=n[o[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=i.length;r\u003cs;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}getVertexPosition(e,n){const o=this.geometry,i=o.attributes.position,r=o.morphAttributes.position,s=o.morphTargetsRelative;n.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(r\u0026\u0026a){Lde.set(0,0,0);for(let A=0,c=r.length;A\u003cc;A++){const l=a[A],u=r[A];l!==0\u0026\u0026(BTe.fromBufferAttribute(u,e),s?Lde.addScaledVector(BTe,l):Lde.addScaledVector(BTe.sub(n),l))}n.add(Lde)}return n}raycast(e,n){const o=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0\u0026\u0026(o.boundingSphere===null\u0026\u0026o.computeBoundingSphere(),Fde.copy(o.boundingSphere),Fde.applyMatrix4(r),LR.copy(e.ray).recast(e.near),!(Fde.containsPoint(LR.origin)===!1\u0026\u0026(LR.intersectSphere(Fde,HVt)===null||LR.origin.distanceToSquared(HVt)\u003e(e.far-e.near)**2))\u0026\u0026(LVt.copy(r).invert(),LR.copy(e.ray).applyMatrix4(LVt),!(o.boundingBox!==null\u0026\u0026LR.intersectsBox(o.boundingBox)===!1)\u0026\u0026this._computeIntersections(e,n,LR)))}_computeIntersections(e,n,o){let i;const r=this.geometry,s=this.material,a=r.index,A=r.attributes.position,c=r.attributes.uv,l=r.attributes.uv1,u=r.attributes.normal,g=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(s))for(let d=0,p=g.length;d\u003cp;d++){const m=g[d],_=s[m.materialIndex],f=Math.max(m.start,h.start),I=Math.min(a.count,Math.min(m.start+m.count,h.start+h.count));for(let C=f,y=I;C\u003cy;C+=3){const x=a.getX(C),E=a.getX(C+1),B=a.getX(C+2);i=Kde(this,_,e,o,c,l,u,x,E,B),i\u0026\u0026(i.faceIndex=Math.floor(C/3),i.face.materialIndex=m.materialIndex,n.push(i))}}else{const d=Math.max(0,h.start),p=Math.min(a.count,h.start+h.count);for(let m=d,_=p;m\u003c_;m+=3){const f=a.getX(m),I=a.getX(m+1),C=a.getX(m+2);i=Kde(this,s,e,o,c,l,u,f,I,C),i\u0026\u0026(i.faceIndex=Math.floor(m/3),n.push(i))}}else if(A!==void 0)if(Array.isArray(s))for(let d=0,p=g.length;d\u003cp;d++){const m=g[d],_=s[m.materialIndex],f=Math.max(m.start,h.start),I=Math.min(A.count,Math.min(m.start+m.count,h.start+h.count));for(let C=f,y=I;C\u003cy;C+=3){const x=C,E=C+1,B=C+2;i=Kde(this,_,e,o,c,l,u,x,E,B),i\u0026\u0026(i.faceIndex=Math.floor(C/3),i.face.materialIndex=m.materialIndex,n.push(i))}}else{const d=Math.max(0,h.start),p=Math.min(A.count,h.start+h.count);for(let m=d,_=p;m\u003c_;m+=3){const f=m,I=m+1,C=m+2;i=Kde(this,s,e,o,c,l,u,f,I,C),i\u0026\u0026(i.faceIndex=Math.floor(m/3),n.push(i))}}}}function H$o(t,e,n,o,i,r,s,a){let A;if(e.side===uI?A=o.intersectTriangle(s,r,i,!0,a):A=o.intersectTriangle(i,r,s,e.side===mE,a),A===null)return null;Ude.copy(a),Ude.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(Ude);return c\u003cn.near||c\u003en.far?null:{distance:c,point:Ude.clone(),object:t}}function Kde(t,e,n,o,i,r,s,a,A,c){t.getVertexPosition(a,ZG),t.getVertexPosition(A,eY),t.getVertexPosition(c,tY);const l=H$o(t,e,n,o,ZG,eY,tY,Yde);if(l){i\u0026\u0026(Hde.fromBufferAttribute(i,a),Ode.fromBufferAttribute(i,A),Gde.fromBufferAttribute(i,c),l.uv=KB.getInterpolation(Yde,ZG,eY,tY,Hde,Ode,Gde,new ni)),r\u0026\u0026(Hde.fromBufferAttribute(r,a),Ode.fromBufferAttribute(r,A),Gde.fromBufferAttribute(r,c),l.uv1=KB.getInterpolation(Yde,ZG,eY,tY,Hde,Ode,Gde,new ni)),s\u0026\u0026(OVt.fromBufferAttribute(s,a),GVt.fromBufferAttribute(s,A),YVt.fromBufferAttribute(s,c),l.normal=KB.getInterpolation(Yde,ZG,eY,tY,OVt,GVt,YVt,new jt),l.normal.dot(o.direction)\u003e0\u0026\u0026l.normal.multiplyScalar(-1));const u={a,b:A,c,normal:new jt,materialIndex:0};KB.getNormal(ZG,eY,tY,u.normal),l.face=u}return l}class Yx extends Zl{constructor(e=1,n=1,o=1,i=1,r=1,s=1){super(),this.type=\"BoxGeometry\",this.parameters={width:e,height:n,depth:o,widthSegments:i,heightSegments:r,depthSegments:s};const a=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const A=[],c=[],l=[],u=[];let g=0,h=0;d(\"z\",\"y\",\"x\",-1,-1,o,n,e,s,r,0),d(\"z\",\"y\",\"x\",1,-1,o,n,-e,s,r,1),d(\"x\",\"z\",\"y\",1,1,e,o,n,i,s,2),d(\"x\",\"z\",\"y\",1,-1,e,o,-n,i,s,3),d(\"x\",\"y\",\"z\",1,-1,e,n,o,i,r,4),d(\"x\",\"y\",\"z\",-1,-1,e,n,-o,i,r,5),this.setIndex(A),this.setAttribute(\"position\",new Bs(c,3)),this.setAttribute(\"normal\",new Bs(l,3)),this.setAttribute(\"uv\",new Bs(u,2));function d(p,m,_,f,I,C,y,x,E,B,S){const Q=C/E,w=y/B,M=C/2,k=y/2,R=x/2,F=E+1,O=B+1;let U=0,Y=0;const W=new jt;for(let te=0;te\u003cO;te++){const j=te*w-k;for(let J=0;J\u003cF;J++){const oe=J*Q-M;W[p]=oe*f,W[m]=j*I,W[_]=R,c.push(W.x,W.y,W.z),W[p]=0,W[m]=0,W[_]=x\u003e0?1:-1,l.push(W.x,W.y,W.z),u.push(J/E),u.push(1-te/B),U+=1}}for(let te=0;te\u003cB;te++)for(let j=0;j\u003cE;j++){const J=g+j+F*te,oe=g+j+F*(te+1),ie=g+(j+1)+F*(te+1),ne=g+(j+1)+F*te;A.push(J,oe,ne),A.push(oe,ie,ne),Y+=6}a.addGroup(h,Y,S),h+=Y,g+=U}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Yx(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function nY(t){const e={};for(const n in t){e[n]={};for(const o in t[n]){const i=t[n][o];i\u0026\u0026(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn(\"UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().\"),e[n][o]=null):e[n][o]=i.clone():Array.isArray(i)?e[n][o]=i.slice():e[n][o]=i}}return e}function n2(t){const e={};for(let n=0;n\u003ct.length;n++){const o=nY(t[n]);for(const i in o)e[i]=o[i]}return e}function O$o(t){const e=[];for(let n=0;n\u003ct.length;n++)e.push(t[n].clone());return e}function UVt(t){const e=t.getRenderTarget();return e===null?t.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:iu.workingColorSpace}const KVt={clone:nY,merge:n2};var G$o=`void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}`,Y$o=`void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}`;class f6 extends Gx{constructor(e){super(),this.isShaderMaterial=!0,this.type=\"ShaderMaterial\",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=G$o,this.fragmentShader=Y$o,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0\u0026\u0026this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=nY(e.uniforms),this.uniformsGroups=O$o(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const s=this.uniforms[i].value;s\u0026\u0026s.isTexture?n.uniforms[i]={type:\"t\",value:s.toJSON(e).uuid}:s\u0026\u0026s.isColor?n.uniforms[i]={type:\"c\",value:s.getHex()}:s\u0026\u0026s.isVector2?n.uniforms[i]={type:\"v2\",value:s.toArray()}:s\u0026\u0026s.isVector3?n.uniforms[i]={type:\"v3\",value:s.toArray()}:s\u0026\u0026s.isVector4?n.uniforms[i]={type:\"v4\",value:s.toArray()}:s\u0026\u0026s.isMatrix3?n.uniforms[i]={type:\"m3\",value:s.toArray()}:s\u0026\u0026s.isMatrix4?n.uniforms[i]={type:\"m4\",value:s.toArray()}:n.uniforms[i]={value:s}}Object.keys(this.defines).length\u003e0\u0026\u0026(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const o={};for(const i in this.extensions)this.extensions[i]===!0\u0026\u0026(o[i]=!0);return Object.keys(o).length\u003e0\u0026\u0026(n.extensions=o),n}}class VVt extends T0{constructor(){super(),this.isCamera=!0,this.type=\"Camera\",this.matrixWorldInverse=new va,this.projectionMatrix=new va,this.projectionMatrixInverse=new va,this.coordinateSystem=Xb}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const tP=new jt,zVt=new ni,JVt=new ni;class sf extends VVt{constructor(e=50,n=1,o=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type=\"PerspectiveCamera\",this.fov=e,this.zoom=1,this.near=o,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=HG*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(LG*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return HG*2*Math.atan(Math.tan(LG*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,o){tP.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(tP.x,tP.y).multiplyScalar(-e/tP.z),tP.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),o.set(tP.x,tP.y).multiplyScalar(-e/tP.z)}getViewSize(e,n){return this.getViewBounds(e,zVt,JVt),n.subVectors(JVt,zVt)}setViewOffset(e,n,o,i,r,s){this.aspect=e/n,this.view===null\u0026\u0026(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=o,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null\u0026\u0026(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(LG*.5*this.fov)/this.zoom,o=2*n,i=this.aspect*o,r=-.5*i;const s=this.view;if(this.view!==null\u0026\u0026this.view.enabled){const A=s.fullWidth,c=s.fullHeight;r+=s.offsetX*i/A,n-=s.offsetY*o/c,i*=s.width/A,o*=s.height/c}const a=this.filmOffset;a!==0\u0026\u0026(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,n,n-o,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null\u0026\u0026(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const oY=-90,iY=1;class U$o extends T0{constructor(e,n,o){super(),this.type=\"CubeCamera\",this.renderTarget=o,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new sf(oY,iY,e,n);i.layers=this.layers,this.add(i);const r=new sf(oY,iY,e,n);r.layers=this.layers,this.add(r);const s=new sf(oY,iY,e,n);s.layers=this.layers,this.add(s);const a=new sf(oY,iY,e,n);a.layers=this.layers,this.add(a);const A=new sf(oY,iY,e,n);A.layers=this.layers,this.add(A);const c=new sf(oY,iY,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[o,i,r,s,a,A]=n;for(const c of n)this.remove(c);if(e===Xb)o.up.set(0,1,0),o.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),A.up.set(0,1,0),A.lookAt(0,0,-1);else if(e===Sde)o.up.set(0,-1,0),o.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),A.up.set(0,-1,0),A.lookAt(0,0,-1);else throw new Error(\"THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: \"+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null\u0026\u0026this.updateMatrixWorld();const{renderTarget:o,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem\u0026\u0026(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,s,a,A,c,l]=this.children,u=e.getRenderTarget(),g=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.xr.enabled;e.xr.enabled=!1;const p=o.texture.generateMipmaps;o.texture.generateMipmaps=!1,e.setRenderTarget(o,0,i),e.render(n,r),e.setRenderTarget(o,1,i),e.render(n,s),e.setRenderTarget(o,2,i),e.render(n,a),e.setRenderTarget(o,3,i),e.render(n,A),e.setRenderTarget(o,4,i),e.render(n,c),o.texture.generateMipmaps=p,e.setRenderTarget(o,5,i),e.render(n,l),e.setRenderTarget(u,g,h),e.xr.enabled=d,o.texture.needsPMREMUpdate=!0}}class WVt extends Hg{constructor(e,n,o,i,r,s,a,A,c,l){e=e!==void 0?e:[],n=n!==void 0?n:vG,super(e,n,o,i,r,s,a,A,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class K$o extends TR{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const o={width:e,height:e,depth:1},i=[o,o,o,o,o,o];this.texture=new WVt(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Fl}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const o={uniforms:{tEquirect:{value:null}},vertexShader:`\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \u003cbegin_vertex\u003e\n\t\t\t\t\t#include \u003cproject_vertex\u003e\n\n\t\t\t\t}\n\t\t\t`,fragmentShader:`\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \u003ccommon\u003e\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`},i=new Yx(5,5,5),r=new f6({name:\"CubemapFromEquirect\",uniforms:nY(o.uniforms),vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,side:uI,blending:zw});r.uniforms.tEquirect.value=n;const s=new Er(i,r),a=n.minFilter;return n.minFilter===gm\u0026\u0026(n.minFilter=Fl),new U$o(1,10,this).update(e,s),n.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,n,o,i){const r=e.getRenderTarget();for(let s=0;s\u003c6;s++)e.setRenderTarget(this,s),e.clear(n,o,i);e.setRenderTarget(r)}}const bTe=new jt,V$o=new jt,z$o=new HA;class nP{constructor(e=new jt(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,o,i){return this.normal.set(e,n,o),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,o){const i=bTe.subVectors(o,n).cross(V$o.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const o=e.delta(bTe),i=this.normal.dot(o);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r\u003c0||r\u003e1?null:n.copy(e.start).addScaledVector(o,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),o=this.distanceToPoint(e.end);return n\u003c0\u0026\u0026o\u003e0||o\u003c0\u0026\u0026n\u003e0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const o=n||z$o.getNormalMatrix(e),i=this.coplanarPoint(bTe).applyMatrix4(e),r=this.normal.applyMatrix3(o).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)\u0026\u0026e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const HR=new GB,Vde=new jt;class STe{constructor(e=new nP,n=new nP,o=new nP,i=new nP,r=new nP,s=new nP){this.planes=[e,n,o,i,r,s]}set(e,n,o,i,r,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(o),a[3].copy(i),a[4].copy(r),a[5].copy(s),this}copy(e){const n=this.planes;for(let o=0;o\u003c6;o++)n[o].copy(e.planes[o]);return this}setFromProjectionMatrix(e,n=Xb){const o=this.planes,i=e.elements,r=i[0],s=i[1],a=i[2],A=i[3],c=i[4],l=i[5],u=i[6],g=i[7],h=i[8],d=i[9],p=i[10],m=i[11],_=i[12],f=i[13],I=i[14],C=i[15];if(o[0].setComponents(A-r,g-c,m-h,C-_).normalize(),o[1].setComponents(A+r,g+c,m+h,C+_).normalize(),o[2].setComponents(A+s,g+l,m+d,C+f).normalize(),o[3].setComponents(A-s,g-l,m-d,C-f).normalize(),o[4].setComponents(A-a,g-u,m-p,C-I).normalize(),n===Xb)o[5].setComponents(A+a,g+u,m+p,C+I).normalize();else if(n===Sde)o[5].setComponents(a,u,p,I).normalize();else throw new Error(\"THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: \"+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null\u0026\u0026e.computeBoundingSphere(),HR.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null\u0026\u0026n.computeBoundingSphere(),HR.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(HR)}intersectsSprite(e){return HR.center.set(0,0,0),HR.radius=.7071067811865476,HR.applyMatrix4(e.matrixWorld),this.intersectsSphere(HR)}intersectsSphere(e){const n=this.planes,o=e.center,i=-e.radius;for(let r=0;r\u003c6;r++)if(n[r].distanceToPoint(o)\u003ci)return!1;return!0}intersectsBox(e){const n=this.planes;for(let o=0;o\u003c6;o++){const i=n[o];if(Vde.x=i.normal.x\u003e0?e.max.x:e.min.x,Vde.y=i.normal.y\u003e0?e.max.y:e.min.y,Vde.z=i.normal.z\u003e0?e.max.z:e.min.z,i.distanceToPoint(Vde)\u003c0)return!1}return!0}containsPoint(e){const n=this.planes;for(let o=0;o\u003c6;o++)if(n[o].distanceToPoint(e)\u003c0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function jVt(){let t=null,e=!1,n=null,o=null;function i(r,s){n(r,s),o=t.requestAnimationFrame(i)}return{start:function(){e!==!0\u0026\u0026n!==null\u0026\u0026(o=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(o),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function J$o(t){const e=new WeakMap;function n(a,A){const c=a.array,l=a.usage,u=c.byteLength,g=t.createBuffer();t.bindBuffer(A,g),t.bufferData(A,c,l),a.onUploadCallback();let h;if(c instanceof Float32Array)h=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?h=t.HALF_FLOAT:h=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)h=t.SHORT;else if(c instanceof Uint32Array)h=t.UNSIGNED_INT;else if(c instanceof Int32Array)h=t.INT;else if(c instanceof Int8Array)h=t.BYTE;else if(c instanceof Uint8Array)h=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)h=t.UNSIGNED_BYTE;else throw new Error(\"THREE.WebGLAttributes: Unsupported buffer data format: \"+c);return{buffer:g,type:h,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:u}}function o(a,A,c){const l=A.array,u=A._updateRange,g=A.updateRanges;if(t.bindBuffer(c,a),u.count===-1\u0026\u0026g.length===0\u0026\u0026t.bufferSubData(c,0,l),g.length!==0){for(let h=0,d=g.length;h\u003cd;h++){const p=g[h];t.bufferSubData(c,p.start*l.BYTES_PER_ELEMENT,l,p.start,p.count)}A.clearUpdateRanges()}u.count!==-1\u0026\u0026(t.bufferSubData(c,u.offset*l.BYTES_PER_ELEMENT,l,u.offset,u.count),u.count=-1),A.onUploadCallback()}function i(a){return a.isInterleavedBufferAttribute\u0026\u0026(a=a.data),e.get(a)}function r(a){a.isInterleavedBufferAttribute\u0026\u0026(a=a.data);const A=e.get(a);A\u0026\u0026(t.deleteBuffer(A.buffer),e.delete(a))}function s(a,A){if(a.isGLBufferAttribute){const l=e.get(a);(!l||l.version\u003ca.version)\u0026\u0026e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}a.isInterleavedBufferAttribute\u0026\u0026(a=a.data);const c=e.get(a);if(c===void 0)e.set(a,n(a,A));else if(c.version\u003ca.version){if(c.size!==a.array.byteLength)throw new Error(\"THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.\");o(c.buffer,a,A),c.version=a.version}}return{get:i,remove:r,update:s}}class VB extends Zl{constructor(e=1,n=1,o=1,i=1){super(),this.type=\"PlaneGeometry\",this.parameters={width:e,height:n,widthSegments:o,heightSegments:i};const r=e/2,s=n/2,a=Math.floor(o),A=Math.floor(i),c=a+1,l=A+1,u=e/a,g=n/A,h=[],d=[],p=[],m=[];for(let _=0;_\u003cl;_++){const f=_*g-s;for(let I=0;I\u003cc;I++){const C=I*u-r;d.push(C,-f,0),p.push(0,0,1),m.push(I/a),m.push(1-_/A)}}for(let _=0;_\u003cA;_++)for(let f=0;f\u003ca;f++){const I=f+c*_,C=f+c*(_+1),y=f+1+c*(_+1),x=f+1+c*_;h.push(I,C,x),h.push(C,y,x)}this.setIndex(h),this.setAttribute(\"position\",new Bs(d,3)),this.setAttribute(\"normal\",new Bs(p,3)),this.setAttribute(\"uv\",new Bs(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new VB(e.width,e.height,e.widthSegments,e.heightSegments)}}var W$o=`#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a \u003c getAlphaHashThreshold( vPosition ) ) discard;\n#endif`,j$o=`#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x \u003c ( 1.0 - a ) )\n\t\t\t? ( ( x \u003c a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif`,$o=`#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif`,q$o=`#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif`,X$o=`#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a \u003c alphaTest ) discard;\n\t#endif\n#endif`,Z$o=`#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif`,eqo=`#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) \u0026\u0026 defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif`,tqo=`#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif`,nqo=`#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif`,oqo=`#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif`,iqo=`vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif`,rqo=`vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif`,sqo=`float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated`,aqo=`#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq \u003c 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR \u003c outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] \u003c iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] \u003c iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] \u003c iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m \u003c= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif`,Aqo=`#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif`,cqo=`#if NUM_CLIPPING_PLANES \u003e 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i \u003c UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES \u003c NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i \u003c NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i \u003c UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) \u003e plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES \u003c NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i \u003c NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) \u003e plane.w ) \u0026\u0026 clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif`,lqo=`#if NUM_CLIPPING_PLANES \u003e 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif`,uqo=`#if NUM_CLIPPING_PLANES \u003e 0\n\tvarying vec3 vClipPosition;\n#endif`,gqo=`#if NUM_CLIPPING_PLANES \u003e 0\n\tvClipPosition = - mvPosition.xyz;\n#endif`,dqo=`#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif`,hqo=`#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif`,pqo=`#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif`,mqo=`#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( batchId );\n\tvColor.xyz *= batchingColor.xyz;\n#endif`,_qo=`#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated`,fqo=`#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x \u003e absDirection.z ) {\n\t\t\tif ( absDirection.x \u003e absDirection.y )\n\t\t\t\tface = direction.x \u003e 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y \u003e 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z \u003e absDirection.y )\n\t\t\t\tface = direction.z \u003e 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y \u003e 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face \u003e 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness \u003e= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness \u003e= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness \u003e= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness \u003e= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif`,Iqo=`vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif`,Cqo=`#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif`,yqo=`#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif`,xqo=`#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif`,Eqo=`#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif`,Bqo=\"gl_FragColor = linearToOutputTexel( gl_FragColor );\",bqo=`\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}`,Sqo=`#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif`,Qqo=`#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif`,vqo=`#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif`,wqo=`#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif`,Pqo=`#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif`,Mqo=`#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif`,Dqo=`#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif`,Nqo=`#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif`,Rqo=`#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif`,Tqo=`#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}`,kqo=`#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif`,Fqo=`LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;`,Lqo=`varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert`,Hqo=`uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance \u003e 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS \u003e 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS \u003e 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS \u003e 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation \u003e 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS \u003e 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS \u003e 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif`,Oqo=`#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif`,Gqo=`ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;`,Yqo=`varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon`,Uqo=`BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;`,Kqo=`varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong`,Vqo=`PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif`,zqo=`struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x \u003e 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) \u003c 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness \u003c 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness \u003c 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness \u003c 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS \u003e 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}`,Jqo=`\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence \u003e 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS \u003e 0 ) \u0026\u0026 defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) \u0026\u0026 NUM_POINT_LIGHT_SHADOWS \u003e 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) \u0026\u0026 ( UNROLLED_LOOP_INDEX \u003c NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible \u0026\u0026 receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS \u003e 0 ) \u0026\u0026 defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) \u0026\u0026 NUM_SPOT_LIGHT_SHADOWS \u003e 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX \u003c NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX \u003c NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX \u003c NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) \u0026\u0026 ( UNROLLED_LOOP_INDEX \u003c NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible \u0026\u0026 receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS \u003e 0 ) \u0026\u0026 defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) \u0026\u0026 NUM_DIR_LIGHT_SHADOWS \u003e 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) \u0026\u0026 ( UNROLLED_LOOP_INDEX \u003c NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible \u0026\u0026 receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS \u003e 0 ) \u0026\u0026 defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS \u003e 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i \u003c NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif`,Wqo=`#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) \u0026\u0026 defined( STANDARD ) \u0026\u0026 defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) \u0026\u0026 defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif`,jqo=`#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif`,$qo=`#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif`,qqo=`#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif`,Xqo=`#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif`,Zqo=`#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif`,eXo=`#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif`,tXo=`#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif`,nXo=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif`,oXo=`#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif`,iXo=`float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif`,rXo=`#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif`,sXo=`#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i \u003c MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif`,aXo=`#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i \u003c MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif`,AXo=`#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i \u003c MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif`,cXo=`#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif`,lXo=`#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i \u003c MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif`,uXo=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) \u0026\u0026 ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) \u0026\u0026 ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;`,gXo=`#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif`,dXo=`#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif`,hXo=`#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif`,pXo=`#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif`,mXo=`#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) \u0026\u0026 ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif`,_Xo=`#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif`,fXo=`#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif`,IXo=`#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif`,CXo=`#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif`,yXo=`#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );`,xXo=`vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}`,EXo=`#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif`,BXo=`vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;`,bXo=`#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif`,SXo=`#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif`,QXo=`float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif`,vXo=`#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif`,wXo=`#if NUM_SPOT_LIGHT_COORDS \u003e 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS \u003e 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS \u003e 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS \u003e 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS \u003e 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x \u003e= 0.0 \u0026\u0026 shadowCoord.x \u003c= 1.0 \u0026\u0026 shadowCoord.y \u003e= 0.0 \u0026\u0026 shadowCoord.y \u003c= 1.0;\n\t\tbool frustumTest = inFrustum \u0026\u0026 shadowCoord.z \u003c= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z \u003e= almostOne ) {\n\t\t\tif ( v.z \u003e 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x \u003e= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y \u003e= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar \u003c= 0.0 \u0026\u0026 lightToPositionLength - shadowCameraNear \u003e= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif`,PXo=`#if NUM_SPOT_LIGHT_COORDS \u003e 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS \u003e 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS \u003e 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS \u003e 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif`,MXo=`#if ( defined( USE_SHADOWMAP ) \u0026\u0026 ( NUM_DIR_LIGHT_SHADOWS \u003e 0 || NUM_POINT_LIGHT_SHADOWS \u003e 0 ) ) || ( NUM_SPOT_LIGHT_COORDS \u003e 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS \u003e 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i \u003c NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS \u003e 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i \u003c NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS \u003e 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) \u0026\u0026 UNROLLED_LOOP_INDEX \u003c NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif`,DXo=`float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS \u003e 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS \u003e 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS \u003e 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i \u003c NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}`,NXo=`#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif`,RXo=`#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif`,TXo=`#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif`,kXo=`#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif`,FXo=`float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif`,LXo=`#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif`,HXo=`#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif`,OXo=`#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x \u003c 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak \u003c StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }`,GXo=`#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif`,YXo=`#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i \u003c 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif`,UXo=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif`,KXo=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif`,VXo=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif`,zXo=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS \u003e 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif`;const OA={alphahash_fragment:W$o,alphahash_pars_fragment:j$o,alphamap_fragment:$o,alphamap_pars_fragment:q$o,alphatest_fragment:X$o,alphatest_pars_fragment:Z$o,aomap_fragment:eqo,aomap_pars_fragment:tqo,batching_pars_vertex:nqo,batching_vertex:oqo,begin_vertex:iqo,beginnormal_vertex:rqo,bsdfs:sqo,iridescence_fragment:aqo,bumpmap_pars_fragment:Aqo,clipping_planes_fragment:cqo,clipping_planes_pars_fragment:lqo,clipping_planes_pars_vertex:uqo,clipping_planes_vertex:gqo,color_fragment:dqo,color_pars_fragment:hqo,color_pars_vertex:pqo,color_vertex:mqo,common:_qo,cube_uv_reflection_fragment:fqo,defaultnormal_vertex:Iqo,displacementmap_pars_vertex:Cqo,displacementmap_vertex:yqo,emissivemap_fragment:xqo,emissivemap_pars_fragment:Eqo,colorspace_fragment:Bqo,colorspace_pars_fragment:bqo,envmap_fragment:Sqo,envmap_common_pars_fragment:Qqo,envmap_pars_fragment:vqo,envmap_pars_vertex:wqo,envmap_physical_pars_fragment:Oqo,envmap_vertex:Pqo,fog_vertex:Mqo,fog_pars_vertex:Dqo,fog_fragment:Nqo,fog_pars_fragment:Rqo,gradientmap_pars_fragment:Tqo,lightmap_pars_fragment:kqo,lights_lambert_fragment:Fqo,lights_lambert_pars_fragment:Lqo,lights_pars_begin:Hqo,lights_toon_fragment:Gqo,lights_toon_pars_fragment:Yqo,lights_phong_fragment:Uqo,lights_phong_pars_fragment:Kqo,lights_physical_fragment:Vqo,lights_physical_pars_fragment:zqo,lights_fragment_begin:Jqo,lights_fragment_maps:Wqo,lights_fragment_end:jqo,logdepthbuf_fragment:$qo,logdepthbuf_pars_fragment:qqo,logdepthbuf_pars_vertex:Xqo,logdepthbuf_vertex:Zqo,map_fragment:eXo,map_pars_fragment:tXo,map_particle_fragment:nXo,map_particle_pars_fragment:oXo,metalnessmap_fragment:iXo,metalnessmap_pars_fragment:rXo,morphinstance_vertex:sXo,morphcolor_vertex:aXo,morphnormal_vertex:AXo,morphtarget_pars_vertex:cXo,morphtarget_vertex:lXo,normal_fragment_begin:uXo,normal_fragment_maps:gXo,normal_pars_fragment:dXo,normal_pars_vertex:hXo,normal_vertex:pXo,normalmap_pars_fragment:mXo,clearcoat_normal_fragment_begin:_Xo,clearcoat_normal_fragment_maps:fXo,clearcoat_pars_fragment:IXo,iridescence_pars_fragment:CXo,opaque_fragment:yXo,packing:xXo,premultiplied_alpha_fragment:EXo,project_vertex:BXo,dithering_fragment:bXo,dithering_pars_fragment:SXo,roughnessmap_fragment:QXo,roughnessmap_pars_fragment:vXo,shadowmap_pars_fragment:wXo,shadowmap_pars_vertex:PXo,shadowmap_vertex:MXo,shadowmask_pars_fragment:DXo,skinbase_vertex:NXo,skinning_pars_vertex:RXo,skinning_vertex:TXo,skinnormal_vertex:kXo,specularmap_fragment:FXo,specularmap_pars_fragment:LXo,tonemapping_fragment:HXo,tonemapping_pars_fragment:OXo,transmission_fragment:GXo,transmission_pars_fragment:YXo,uv_pars_fragment:UXo,uv_pars_vertex:KXo,uv_vertex:VXo,worldpos_vertex:zXo,background_vert:`varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}`,background_frag:`uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n}`,backgroundCube_vert:`varying vec3 vWorldDirection;\n#include \u003ccommon\u003e\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\tgl_Position.z = gl_Position.w;\n}`,backgroundCube_frag:`#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \u003ccube_uv_reflection_fragment\u003e\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n}`,cube_vert:`varying vec3 vWorldDirection;\n#include \u003ccommon\u003e\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\tgl_Position.z = gl_Position.w;\n}`,cube_frag:`uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n}`,depth_vert:`#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \u003cbeginnormal_vertex\u003e\n\t\t#include \u003cmorphnormal_vertex\u003e\n\t\t#include \u003cskinnormal_vertex\u003e\n\t#endif\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\tvHighPrecisionZW = gl_Position.zw;\n}`,depth_frag:`#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \u003ccommon\u003e\n#include \u003cpacking\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \u003cclipping_planes_fragment\u003e\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \u003cmap_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\t#include \u003clogdepthbuf_fragment\u003e\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}`,distanceRGBA_vert:`#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \u003cbeginnormal_vertex\u003e\n\t\t#include \u003cmorphnormal_vertex\u003e\n\t\t#include \u003cskinnormal_vertex\u003e\n\t#endif\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\tvWorldPosition = worldPosition.xyz;\n}`,distanceRGBA_frag:`#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \u003ccommon\u003e\n#include \u003cpacking\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \u003cclipping_planes_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}`,equirect_vert:`varying vec3 vWorldDirection;\n#include \u003ccommon\u003e\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n}`,equirect_frag:`uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \u003ccommon\u003e\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n}`,linedashed_vert:`uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \u003ccommon\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \u003cuv_vertex\u003e\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,linedashed_frag:`uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \u003ccommon\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\tif ( mod( vLineDistance, totalSize ) \u003e dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\toutgoingLight = diffuseColor.rgb;\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n}`,meshbasic_vert:`#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cenvmap_pars_vertex\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \u003cbeginnormal_vertex\u003e\n\t\t#include \u003cmorphnormal_vertex\u003e\n\t\t#include \u003cskinbase_vertex\u003e\n\t\t#include \u003cskinnormal_vertex\u003e\n\t\t#include \u003cdefaultnormal_vertex\u003e\n\t#endif\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cenvmap_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,meshbasic_frag:`uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \u003ccommon\u003e\n#include \u003cdithering_pars_fragment\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003caomap_pars_fragment\u003e\n#include \u003clightmap_pars_fragment\u003e\n#include \u003cenvmap_common_pars_fragment\u003e\n#include \u003cenvmap_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003cspecularmap_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\t#include \u003cspecularmap_fragment\u003e\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \u003caomap_fragment\u003e\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \u003cenvmap_fragment\u003e\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n\t#include \u003cdithering_fragment\u003e\n}`,meshlambert_vert:`#define LAMBERT\nvarying vec3 vViewPosition;\n#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003cenvmap_pars_vertex\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cnormal_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003cshadowmap_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cbeginnormal_vertex\u003e\n\t#include \u003cmorphnormal_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cskinnormal_vertex\u003e\n\t#include \u003cdefaultnormal_vertex\u003e\n\t#include \u003cnormal_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\tvViewPosition = - mvPosition.xyz;\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cenvmap_vertex\u003e\n\t#include \u003cshadowmap_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,meshlambert_frag:`#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \u003ccommon\u003e\n#include \u003cpacking\u003e\n#include \u003cdithering_pars_fragment\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003caomap_pars_fragment\u003e\n#include \u003clightmap_pars_fragment\u003e\n#include \u003cemissivemap_pars_fragment\u003e\n#include \u003cenvmap_common_pars_fragment\u003e\n#include \u003cenvmap_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003cbsdfs\u003e\n#include \u003clights_pars_begin\u003e\n#include \u003cnormal_pars_fragment\u003e\n#include \u003clights_lambert_pars_fragment\u003e\n#include \u003cshadowmap_pars_fragment\u003e\n#include \u003cbumpmap_pars_fragment\u003e\n#include \u003cnormalmap_pars_fragment\u003e\n#include \u003cspecularmap_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\t#include \u003cspecularmap_fragment\u003e\n\t#include \u003cnormal_fragment_begin\u003e\n\t#include \u003cnormal_fragment_maps\u003e\n\t#include \u003cemissivemap_fragment\u003e\n\t#include \u003clights_lambert_fragment\u003e\n\t#include \u003clights_fragment_begin\u003e\n\t#include \u003clights_fragment_maps\u003e\n\t#include \u003clights_fragment_end\u003e\n\t#include \u003caomap_fragment\u003e\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \u003cenvmap_fragment\u003e\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n\t#include \u003cdithering_fragment\u003e\n}`,meshmatcap_vert:`#define MATCAP\nvarying vec3 vViewPosition;\n#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cnormal_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cbeginnormal_vertex\u003e\n\t#include \u003cmorphnormal_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cskinnormal_vertex\u003e\n\t#include \u003cdefaultnormal_vertex\u003e\n\t#include \u003cnormal_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n\tvViewPosition = - mvPosition.xyz;\n}`,meshmatcap_frag:`#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \u003ccommon\u003e\n#include \u003cdithering_pars_fragment\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003cnormal_pars_fragment\u003e\n#include \u003cbumpmap_pars_fragment\u003e\n#include \u003cnormalmap_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\t#include \u003cnormal_fragment_begin\u003e\n\t#include \u003cnormal_fragment_maps\u003e\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n\t#include \u003cdithering_fragment\u003e\n}`,meshnormal_vert:`#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003cnormal_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cbeginnormal_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphnormal_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cskinnormal_vertex\u003e\n\t#include \u003cdefaultnormal_vertex\u003e\n\t#include \u003cnormal_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}`,meshnormal_frag:`#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \u003cpacking\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cnormal_pars_fragment\u003e\n#include \u003cbumpmap_pars_fragment\u003e\n#include \u003cnormalmap_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cnormal_fragment_begin\u003e\n\t#include \u003cnormal_fragment_maps\u003e\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}`,meshphong_vert:`#define PHONG\nvarying vec3 vViewPosition;\n#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003cenvmap_pars_vertex\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cnormal_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003cshadowmap_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cbeginnormal_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphnormal_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cskinnormal_vertex\u003e\n\t#include \u003cdefaultnormal_vertex\u003e\n\t#include \u003cnormal_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\tvViewPosition = - mvPosition.xyz;\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cenvmap_vertex\u003e\n\t#include \u003cshadowmap_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,meshphong_frag:`#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \u003ccommon\u003e\n#include \u003cpacking\u003e\n#include \u003cdithering_pars_fragment\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003caomap_pars_fragment\u003e\n#include \u003clightmap_pars_fragment\u003e\n#include \u003cemissivemap_pars_fragment\u003e\n#include \u003cenvmap_common_pars_fragment\u003e\n#include \u003cenvmap_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003cbsdfs\u003e\n#include \u003clights_pars_begin\u003e\n#include \u003cnormal_pars_fragment\u003e\n#include \u003clights_phong_pars_fragment\u003e\n#include \u003cshadowmap_pars_fragment\u003e\n#include \u003cbumpmap_pars_fragment\u003e\n#include \u003cnormalmap_pars_fragment\u003e\n#include \u003cspecularmap_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\t#include \u003cspecularmap_fragment\u003e\n\t#include \u003cnormal_fragment_begin\u003e\n\t#include \u003cnormal_fragment_maps\u003e\n\t#include \u003cemissivemap_fragment\u003e\n\t#include \u003clights_phong_fragment\u003e\n\t#include \u003clights_fragment_begin\u003e\n\t#include \u003clights_fragment_maps\u003e\n\t#include \u003clights_fragment_end\u003e\n\t#include \u003caomap_fragment\u003e\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \u003cenvmap_fragment\u003e\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n\t#include \u003cdithering_fragment\u003e\n}`,meshphysical_vert:`#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cnormal_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003cshadowmap_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cbeginnormal_vertex\u003e\n\t#include \u003cmorphnormal_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cskinnormal_vertex\u003e\n\t#include \u003cdefaultnormal_vertex\u003e\n\t#include \u003cnormal_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\tvViewPosition = - mvPosition.xyz;\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cshadowmap_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}`,meshphysical_frag:`#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \u003ccommon\u003e\n#include \u003cpacking\u003e\n#include \u003cdithering_pars_fragment\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003caomap_pars_fragment\u003e\n#include \u003clightmap_pars_fragment\u003e\n#include \u003cemissivemap_pars_fragment\u003e\n#include \u003ciridescence_fragment\u003e\n#include \u003ccube_uv_reflection_fragment\u003e\n#include \u003cenvmap_common_pars_fragment\u003e\n#include \u003cenvmap_physical_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003clights_pars_begin\u003e\n#include \u003cnormal_pars_fragment\u003e\n#include \u003clights_physical_pars_fragment\u003e\n#include \u003ctransmission_pars_fragment\u003e\n#include \u003cshadowmap_pars_fragment\u003e\n#include \u003cbumpmap_pars_fragment\u003e\n#include \u003cnormalmap_pars_fragment\u003e\n#include \u003cclearcoat_pars_fragment\u003e\n#include \u003ciridescence_pars_fragment\u003e\n#include \u003croughnessmap_pars_fragment\u003e\n#include \u003cmetalnessmap_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\t#include \u003croughnessmap_fragment\u003e\n\t#include \u003cmetalnessmap_fragment\u003e\n\t#include \u003cnormal_fragment_begin\u003e\n\t#include \u003cnormal_fragment_maps\u003e\n\t#include \u003cclearcoat_normal_fragment_begin\u003e\n\t#include \u003cclearcoat_normal_fragment_maps\u003e\n\t#include \u003cemissivemap_fragment\u003e\n\t#include \u003clights_physical_fragment\u003e\n\t#include \u003clights_fragment_begin\u003e\n\t#include \u003clights_fragment_maps\u003e\n\t#include \u003clights_fragment_end\u003e\n\t#include \u003caomap_fragment\u003e\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \u003ctransmission_fragment\u003e\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n\t#include \u003cdithering_fragment\u003e\n}`,meshtoon_vert:`#define TOON\nvarying vec3 vViewPosition;\n#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cdisplacementmap_pars_vertex\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cnormal_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003cshadowmap_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cbeginnormal_vertex\u003e\n\t#include \u003cmorphnormal_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cskinnormal_vertex\u003e\n\t#include \u003cdefaultnormal_vertex\u003e\n\t#include \u003cnormal_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cdisplacementmap_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\tvViewPosition = - mvPosition.xyz;\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cshadowmap_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,meshtoon_frag:`#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \u003ccommon\u003e\n#include \u003cpacking\u003e\n#include \u003cdithering_pars_fragment\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003caomap_pars_fragment\u003e\n#include \u003clightmap_pars_fragment\u003e\n#include \u003cemissivemap_pars_fragment\u003e\n#include \u003cgradientmap_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003cbsdfs\u003e\n#include \u003clights_pars_begin\u003e\n#include \u003cnormal_pars_fragment\u003e\n#include \u003clights_toon_pars_fragment\u003e\n#include \u003cshadowmap_pars_fragment\u003e\n#include \u003cbumpmap_pars_fragment\u003e\n#include \u003cnormalmap_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\t#include \u003cnormal_fragment_begin\u003e\n\t#include \u003cnormal_fragment_maps\u003e\n\t#include \u003cemissivemap_fragment\u003e\n\t#include \u003clights_toon_fragment\u003e\n\t#include \u003clights_fragment_begin\u003e\n\t#include \u003clights_fragment_maps\u003e\n\t#include \u003clights_fragment_end\u003e\n\t#include \u003caomap_fragment\u003e\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n\t#include \u003cdithering_fragment\u003e\n}`,points_vert:`uniform float size;\nuniform float scale;\n#include \u003ccommon\u003e\n#include \u003ccolor_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \u003ccolor_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphcolor_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,points_frag:`uniform vec3 diffuse;\nuniform float opacity;\n#include \u003ccommon\u003e\n#include \u003ccolor_pars_fragment\u003e\n#include \u003cmap_particle_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_particle_fragment\u003e\n\t#include \u003ccolor_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\toutgoingLight = diffuseColor.rgb;\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n\t#include \u003cpremultiplied_alpha_fragment\u003e\n}`,shadow_vert:`#include \u003ccommon\u003e\n#include \u003cbatching_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003cmorphtarget_pars_vertex\u003e\n#include \u003cskinning_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cshadowmap_pars_vertex\u003e\nvoid main() {\n\t#include \u003cbatching_vertex\u003e\n\t#include \u003cbeginnormal_vertex\u003e\n\t#include \u003cmorphinstance_vertex\u003e\n\t#include \u003cmorphnormal_vertex\u003e\n\t#include \u003cskinbase_vertex\u003e\n\t#include \u003cskinnormal_vertex\u003e\n\t#include \u003cdefaultnormal_vertex\u003e\n\t#include \u003cbegin_vertex\u003e\n\t#include \u003cmorphtarget_vertex\u003e\n\t#include \u003cskinning_vertex\u003e\n\t#include \u003cproject_vertex\u003e\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cworldpos_vertex\u003e\n\t#include \u003cshadowmap_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,shadow_frag:`uniform vec3 color;\nuniform float opacity;\n#include \u003ccommon\u003e\n#include \u003cpacking\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003cbsdfs\u003e\n#include \u003clights_pars_begin\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cshadowmap_pars_fragment\u003e\n#include \u003cshadowmask_pars_fragment\u003e\nvoid main() {\n\t#include \u003clogdepthbuf_fragment\u003e\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n}`,sprite_vert:`uniform float rotation;\nuniform vec2 center;\n#include \u003ccommon\u003e\n#include \u003cuv_pars_vertex\u003e\n#include \u003cfog_pars_vertex\u003e\n#include \u003clogdepthbuf_pars_vertex\u003e\n#include \u003cclipping_planes_pars_vertex\u003e\nvoid main() {\n\t#include \u003cuv_vertex\u003e\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \u003clogdepthbuf_vertex\u003e\n\t#include \u003cclipping_planes_vertex\u003e\n\t#include \u003cfog_vertex\u003e\n}`,sprite_frag:`uniform vec3 diffuse;\nuniform float opacity;\n#include \u003ccommon\u003e\n#include \u003cuv_pars_fragment\u003e\n#include \u003cmap_pars_fragment\u003e\n#include \u003calphamap_pars_fragment\u003e\n#include \u003calphatest_pars_fragment\u003e\n#include \u003calphahash_pars_fragment\u003e\n#include \u003cfog_pars_fragment\u003e\n#include \u003clogdepthbuf_pars_fragment\u003e\n#include \u003cclipping_planes_pars_fragment\u003e\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \u003cclipping_planes_fragment\u003e\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \u003clogdepthbuf_fragment\u003e\n\t#include \u003cmap_fragment\u003e\n\t#include \u003calphamap_fragment\u003e\n\t#include \u003calphatest_fragment\u003e\n\t#include \u003calphahash_fragment\u003e\n\toutgoingLight = diffuseColor.rgb;\n\t#include \u003copaque_fragment\u003e\n\t#include \u003ctonemapping_fragment\u003e\n\t#include \u003ccolorspace_fragment\u003e\n\t#include \u003cfog_fragment\u003e\n}`},or={common:{diffuse:{value:new Vi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new HA},alphaMap:{value:null},alphaMapTransform:{value:new HA},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new HA}},envmap:{envMap:{value:null},envMapRotation:{value:new HA},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new HA}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new HA}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new HA},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new HA},normalScale:{value:new ni(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new HA},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new HA}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new HA}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new HA}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Vi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Vi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new HA},alphaTest:{value:0},uvTransform:{value:new HA}},sprite:{diffuse:{value:new Vi(16777215)},opacity:{value:1},center:{value:new ni(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new HA},alphaMap:{value:null},alphaMapTransform:{value:new HA},alphaTest:{value:0}}},I6={basic:{uniforms:n2([or.common,or.specularmap,or.envmap,or.aomap,or.lightmap,or.fog]),vertexShader:OA.meshbasic_vert,fragmentShader:OA.meshbasic_frag},lambert:{uniforms:n2([or.common,or.specularmap,or.envmap,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.fog,or.lights,{emissive:{value:new Vi(0)}}]),vertexShader:OA.meshlambert_vert,fragmentShader:OA.meshlambert_frag},phong:{uniforms:n2([or.common,or.specularmap,or.envmap,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.fog,or.lights,{emissive:{value:new Vi(0)},specular:{value:new Vi(1118481)},shininess:{value:30}}]),vertexShader:OA.meshphong_vert,fragmentShader:OA.meshphong_frag},standard:{uniforms:n2([or.common,or.envmap,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.roughnessmap,or.metalnessmap,or.fog,or.lights,{emissive:{value:new Vi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:OA.meshphysical_vert,fragmentShader:OA.meshphysical_frag},toon:{uniforms:n2([or.common,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.gradientmap,or.fog,or.lights,{emissive:{value:new Vi(0)}}]),vertexShader:OA.meshtoon_vert,fragmentShader:OA.meshtoon_frag},matcap:{uniforms:n2([or.common,or.bumpmap,or.normalmap,or.displacementmap,or.fog,{matcap:{value:null}}]),vertexShader:OA.meshmatcap_vert,fragmentShader:OA.meshmatcap_frag},points:{uniforms:n2([or.points,or.fog]),vertexShader:OA.points_vert,fragmentShader:OA.points_frag},dashed:{uniforms:n2([or.common,or.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:OA.linedashed_vert,fragmentShader:OA.linedashed_frag},depth:{uniforms:n2([or.common,or.displacementmap]),vertexShader:OA.depth_vert,fragmentShader:OA.depth_frag},normal:{uniforms:n2([or.common,or.bumpmap,or.normalmap,or.displacementmap,{opacity:{value:1}}]),vertexShader:OA.meshnormal_vert,fragmentShader:OA.meshnormal_frag},sprite:{uniforms:n2([or.sprite,or.fog]),vertexShader:OA.sprite_vert,fragmentShader:OA.sprite_frag},background:{uniforms:{uvTransform:{value:new HA},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:OA.background_vert,fragmentShader:OA.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new HA}},vertexShader:OA.backgroundCube_vert,fragmentShader:OA.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:OA.cube_vert,fragmentShader:OA.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:OA.equirect_vert,fragmentShader:OA.equirect_frag},distanceRGBA:{uniforms:n2([or.common,or.displacementmap,{referencePosition:{value:new jt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:OA.distanceRGBA_vert,fragmentShader:OA.distanceRGBA_frag},shadow:{uniforms:n2([or.lights,or.fog,{color:{value:new Vi(0)},opacity:{value:1}}]),vertexShader:OA.shadow_vert,fragmentShader:OA.shadow_frag}};I6.physical={uniforms:n2([I6.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new HA},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new HA},clearcoatNormalScale:{value:new ni(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new HA},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new HA},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new HA},sheen:{value:0},sheenColor:{value:new Vi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new HA},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new HA},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new HA},transmissionSamplerSize:{value:new ni},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new HA},attenuationDistance:{value:0},attenuationColor:{value:new Vi(0)},specularColor:{value:new Vi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new HA},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new HA},anisotropyVector:{value:new ni},anisotropyMap:{value:null},anisotropyMapTransform:{value:new HA}}]),vertexShader:OA.meshphysical_vert,fragmentShader:OA.meshphysical_frag};const zde={r:0,b:0,g:0},OR=new t2,JXo=new va;function WXo(t,e,n,o,i,r,s){const a=new Vi(0);let A=r===!0?0:1,c,l,u=null,g=0,h=null;function d(f){let I=f.isScene===!0?f.background:null;return I\u0026\u0026I.isTexture\u0026\u0026(I=(f.backgroundBlurriness\u003e0?n:e).get(I)),I}function p(f){let I=!1;const C=d(f);C===null?_(a,A):C\u0026\u0026C.isColor\u0026\u0026(_(C,1),I=!0);const y=t.xr.getEnvironmentBlendMode();y===\"additive\"?o.buffers.color.setClear(0,0,0,1,s):y===\"alpha-blend\"\u0026\u0026o.buffers.color.setClear(0,0,0,0,s),(t.autoClear||I)\u0026\u0026(o.buffers.depth.setTest(!0),o.buffers.depth.setMask(!0),o.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function m(f,I){const C=d(I);C\u0026\u0026(C.isCubeTexture||C.mapping===Ide)?(l===void 0\u0026\u0026(l=new Er(new Yx(1,1,1),new f6({name:\"BackgroundCubeMaterial\",uniforms:nY(I6.backgroundCube.uniforms),vertexShader:I6.backgroundCube.vertexShader,fragmentShader:I6.backgroundCube.fragmentShader,side:uI,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute(\"normal\"),l.geometry.deleteAttribute(\"uv\"),l.onBeforeRender=function(y,x,E){this.matrixWorld.copyPosition(E.matrixWorld)},Object.defineProperty(l.material,\"envMap\",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),OR.copy(I.backgroundRotation),OR.x*=-1,OR.y*=-1,OR.z*=-1,C.isCubeTexture\u0026\u0026C.isRenderTargetTexture===!1\u0026\u0026(OR.y*=-1,OR.z*=-1),l.material.uniforms.envMap.value=C,l.material.uniforms.flipEnvMap.value=C.isCubeTexture\u0026\u0026C.isRenderTargetTexture===!1?-1:1,l.material.uniforms.backgroundBlurriness.value=I.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=I.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(JXo.makeRotationFromEuler(OR)),l.material.toneMapped=iu.getTransfer(C.colorSpace)!==Ed,(u!==C||g!==C.version||h!==t.toneMapping)\u0026\u0026(l.material.needsUpdate=!0,u=C,g=C.version,h=t.toneMapping),l.layers.enableAll(),f.unshift(l,l.geometry,l.material,0,0,null)):C\u0026\u0026C.isTexture\u0026\u0026(c===void 0\u0026\u0026(c=new Er(new VB(2,2),new f6({name:\"BackgroundMaterial\",uniforms:nY(I6.background.uniforms),vertexShader:I6.background.vertexShader,fragmentShader:I6.background.fragmentShader,side:mE,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute(\"normal\"),Object.defineProperty(c.material,\"map\",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=C,c.material.uniforms.backgroundIntensity.value=I.backgroundIntensity,c.material.toneMapped=iu.getTransfer(C.colorSpace)!==Ed,C.matrixAutoUpdate===!0\u0026\u0026C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(u!==C||g!==C.version||h!==t.toneMapping)\u0026\u0026(c.material.needsUpdate=!0,u=C,g=C.version,h=t.toneMapping),c.layers.enableAll(),f.unshift(c,c.geometry,c.material,0,0,null))}function _(f,I){f.getRGB(zde,UVt(t)),o.buffers.color.setClear(zde.r,zde.g,zde.b,I,s)}return{getClearColor:function(){return a},setClearColor:function(f,I=1){a.set(f),A=I,_(a,A)},getClearAlpha:function(){return A},setClearAlpha:function(f){A=f,_(a,A)},render:p,addToRenderList:m}}function jXo(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),o={},i=g(null);let r=i,s=!1;function a(Q,w,M,k,R){let F=!1;const O=u(k,M,w);r!==O\u0026\u0026(r=O,c(r.object)),F=h(Q,k,M,R),F\u0026\u0026d(Q,k,M,R),R!==null\u0026\u0026e.update(R,t.ELEMENT_ARRAY_BUFFER),(F||s)\u0026\u0026(s=!1,C(Q,w,M,k),R!==null\u0026\u0026t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(R).buffer))}function A(){return t.createVertexArray()}function c(Q){return t.bindVertexArray(Q)}function l(Q){return t.deleteVertexArray(Q)}function u(Q,w,M){const k=M.wireframe===!0;let R=o[Q.id];R===void 0\u0026\u0026(R={},o[Q.id]=R);let F=R[w.id];F===void 0\u0026\u0026(F={},R[w.id]=F);let O=F[k];return O===void 0\u0026\u0026(O=g(A()),F[k]=O),O}function g(Q){const w=[],M=[],k=[];for(let R=0;R\u003cn;R++)w[R]=0,M[R]=0,k[R]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:w,enabledAttributes:M,attributeDivisors:k,object:Q,attributes:{},index:null}}function h(Q,w,M,k){const R=r.attributes,F=w.attributes;let O=0;const U=M.getAttributes();for(const Y in U)if(U[Y].location\u003e=0){const te=R[Y];let j=F[Y];if(j===void 0\u0026\u0026(Y===\"instanceMatrix\"\u0026\u0026Q.instanceMatrix\u0026\u0026(j=Q.instanceMatrix),Y===\"instanceColor\"\u0026\u0026Q.instanceColor\u0026\u0026(j=Q.instanceColor)),te===void 0||te.attribute!==j||j\u0026\u0026te.data!==j.data)return!0;O++}return r.attributesNum!==O||r.index!==k}function d(Q,w,M,k){const R={},F=w.attributes;let O=0;const U=M.getAttributes();for(const Y in U)if(U[Y].location\u003e=0){let te=F[Y];te===void 0\u0026\u0026(Y===\"instanceMatrix\"\u0026\u0026Q.instanceMatrix\u0026\u0026(te=Q.instanceMatrix),Y===\"instanceColor\"\u0026\u0026Q.instanceColor\u0026\u0026(te=Q.instanceColor));const j={};j.attribute=te,te\u0026\u0026te.data\u0026\u0026(j.data=te.data),R[Y]=j,O++}r.attributes=R,r.attributesNum=O,r.index=k}function p(){const Q=r.newAttributes;for(let w=0,M=Q.length;w\u003cM;w++)Q[w]=0}function m(Q){_(Q,0)}function _(Q,w){const M=r.newAttributes,k=r.enabledAttributes,R=r.attributeDivisors;M[Q]=1,k[Q]===0\u0026\u0026(t.enableVertexAttribArray(Q),k[Q]=1),R[Q]!==w\u0026\u0026(t.vertexAttribDivisor(Q,w),R[Q]=w)}function f(){const Q=r.newAttributes,w=r.enabledAttributes;for(let M=0,k=w.length;M\u003ck;M++)w[M]!==Q[M]\u0026\u0026(t.disableVertexAttribArray(M),w[M]=0)}function I(Q,w,M,k,R,F,O){O===!0?t.vertexAttribIPointer(Q,w,M,R,F):t.vertexAttribPointer(Q,w,M,k,R,F)}function C(Q,w,M,k){p();const R=k.attributes,F=M.getAttributes(),O=w.defaultAttributeValues;for(const U in F){const Y=F[U];if(Y.location\u003e=0){let W=R[U];if(W===void 0\u0026\u0026(U===\"instanceMatrix\"\u0026\u0026Q.instanceMatrix\u0026\u0026(W=Q.instanceMatrix),U===\"instanceColor\"\u0026\u0026Q.instanceColor\u0026\u0026(W=Q.instanceColor)),W!==void 0){const te=W.normalized,j=W.itemSize,J=e.get(W);if(J===void 0)continue;const oe=J.buffer,ie=J.type,ne=J.bytesPerElement,le=ie===t.INT||ie===t.UNSIGNED_INT||W.gpuType===NKt;if(W.isInterleavedBufferAttribute){const ge=W.data,_e=ge.stride,ue=W.offset;if(ge.isInstancedInterleavedBuffer){for(let fe=0;fe\u003cY.locationSize;fe++)_(Y.location+fe,ge.meshPerAttribute);Q.isInstancedMesh!==!0\u0026\u0026k._maxInstanceCount===void 0\u0026\u0026(k._maxInstanceCount=ge.meshPerAttribute*ge.count)}else for(let fe=0;fe\u003cY.locationSize;fe++)m(Y.location+fe);t.bindBuffer(t.ARRAY_BUFFER,oe);for(let fe=0;fe\u003cY.locationSize;fe++)I(Y.location+fe,j/Y.locationSize,ie,te,_e*ne,(ue+j/Y.locationSize*fe)*ne,le)}else{if(W.isInstancedBufferAttribute){for(let ge=0;ge\u003cY.locationSize;ge++)_(Y.location+ge,W.meshPerAttribute);Q.isInstancedMesh!==!0\u0026\u0026k._maxInstanceCount===void 0\u0026\u0026(k._maxInstanceCount=W.meshPerAttribute*W.count)}else for(let ge=0;ge\u003cY.locationSize;ge++)m(Y.location+ge);t.bindBuffer(t.ARRAY_BUFFER,oe);for(let ge=0;ge\u003cY.locationSize;ge++)I(Y.location+ge,j/Y.locationSize,ie,te,j*ne,j/Y.locationSize*ge*ne,le)}}else if(O!==void 0){const te=O[U];if(te!==void 0)switch(te.length){case 2:t.vertexAttrib2fv(Y.location,te);break;case 3:t.vertexAttrib3fv(Y.location,te);break;case 4:t.vertexAttrib4fv(Y.location,te);break;default:t.vertexAttrib1fv(Y.location,te)}}}}f()}function y(){B();for(const Q in o){const w=o[Q];for(const M in w){const k=w[M];for(const R in k)l(k[R].object),delete k[R];delete w[M]}delete o[Q]}}function x(Q){if(o[Q.id]===void 0)return;const w=o[Q.id];for(const M in w){const k=w[M];for(const R in k)l(k[R].object),delete k[R];delete w[M]}delete o[Q.id]}function E(Q){for(const w in o){const M=o[w];if(M[Q.id]===void 0)continue;const k=M[Q.id];for(const R in k)l(k[R].object),delete k[R];delete M[Q.id]}}function B(){S(),s=!0,r!==i\u0026\u0026(r=i,c(r.object))}function S(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:B,resetDefaultState:S,dispose:y,releaseStatesOfGeometry:x,releaseStatesOfProgram:E,initAttributes:p,enableAttribute:m,disableUnusedAttributes:f}}function $Xo(t,e,n){let o;function i(c){o=c}function r(c,l){t.drawArrays(o,c,l),n.update(l,o,1)}function s(c,l,u){u!==0\u0026\u0026(t.drawArraysInstanced(o,c,l,u),n.update(l,o,u))}function a(c,l,u){if(u===0)return;const g=e.get(\"WEBGL_multi_draw\");if(g===null)for(let h=0;h\u003cu;h++)this.render(c[h],l[h]);else{g.multiDrawArraysWEBGL(o,c,0,l,0,u);let h=0;for(let d=0;d\u003cu;d++)h+=l[d];n.update(h,o,1)}}function A(c,l,u,g){if(u===0)return;const h=e.get(\"WEBGL_multi_draw\");if(h===null)for(let d=0;d\u003cc.length;d++)s(c[d],l[d],g[d]);else{h.multiDrawArraysInstancedWEBGL(o,c,0,l,0,g,0,u);let d=0;for(let p=0;p\u003cu;p++)d+=l[p];for(let p=0;p\u003cg.length;p++)n.update(d,o,g[p])}}this.setMode=i,this.render=r,this.renderInstances=s,this.renderMultiDraw=a,this.renderMultiDrawInstances=A}function qXo(t,e,n,o){let i;function r(){if(i!==void 0)return i;if(e.has(\"EXT_texture_filter_anisotropic\")===!0){const x=e.get(\"EXT_texture_filter_anisotropic\");i=t.getParameter(x.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(x){return!(x!==l4\u0026\u0026o.convert(x)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(x){const E=x===yde\u0026\u0026(e.has(\"EXT_color_buffer_half_float\")||e.has(\"EXT_color_buffer_float\"));return!(x!==Ww\u0026\u0026o.convert(x)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)\u0026\u0026x!==m6\u0026\u0026!E)}function A(x){if(x===\"highp\"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision\u003e0\u0026\u0026t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision\u003e0)return\"highp\";x=\"mediump\"}return x===\"mediump\"\u0026\u0026t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision\u003e0\u0026\u0026t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision\u003e0?\"mediump\":\"lowp\"}let c=n.precision!==void 0?n.precision:\"highp\";const l=A(c);l!==c\u0026\u0026(console.warn(\"THREE.WebGLRenderer:\",c,\"not supported, using\",l,\"instead.\"),c=l);const u=n.logarithmicDepthBuffer===!0,g=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),m=t.getParameter(t.MAX_VERTEX_ATTRIBS),_=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),I=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),C=h\u003e0,y=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:A,textureFormatReadable:s,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:u,maxTextures:g,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:_,maxVaryings:f,maxFragmentUniforms:I,vertexTextures:C,maxSamples:y}}function XXo(t){const e=this;let n=null,o=0,i=!1,r=!1;const s=new nP,a=new HA,A={value:null,needsUpdate:!1};this.uniform=A,this.numPlanes=0,this.numIntersection=0,this.init=function(u,g){const h=u.length!==0||g||o!==0||i;return i=g,o=u.length,h},this.beginShadows=function(){r=!0,l(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(u,g){n=l(u,g,0)},this.setState=function(u,g,h){const d=u.clippingPlanes,p=u.clipIntersection,m=u.clipShadows,_=t.get(u);if(!i||d===null||d.length===0||r\u0026\u0026!m)r?l(null):c();else{const f=r?0:o,I=f*4;let C=_.clippingState||null;A.value=C,C=l(d,g,I,h);for(let y=0;y!==I;++y)C[y]=n[y];_.clippingState=C,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=f}};function c(){A.value!==n\u0026\u0026(A.value=n,A.needsUpdate=o\u003e0),e.numPlanes=o,e.numIntersection=0}function l(u,g,h,d){const p=u!==null?u.length:0;let m=null;if(p!==0){if(m=A.value,d!==!0||m===null){const _=h+p*4,f=g.matrixWorldInverse;a.getNormalMatrix(f),(m===null||m.length\u003c_)\u0026\u0026(m=new Float32Array(_));for(let I=0,C=h;I!==p;++I,C+=4)s.copy(u[I]).applyMatrix4(f,a),s.normal.toArray(m,C),m[C+3]=s.constant}A.value=m,A.needsUpdate=!0}return e.numPlanes=p,e.numIntersection=0,m}}function ZXo(t){let e=new WeakMap;function n(s,a){return a===fde?s.mapping=vG:a===zRe\u0026\u0026(s.mapping=wG),s}function o(s){if(s\u0026\u0026s.isTexture){const a=s.mapping;if(a===fde||a===zRe)if(e.has(s)){const A=e.get(s).texture;return n(A,s.mapping)}else{const A=s.image;if(A\u0026\u0026A.height\u003e0){const c=new K$o(A.height);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener(\"dispose\",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener(\"dispose\",i);const A=e.get(a);A!==void 0\u0026\u0026(e.delete(a),A.dispose())}function r(){e=new WeakMap}return{get:o,dispose:r}}class rY extends VVt{constructor(e=-1,n=1,o=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type=\"OrthographicCamera\",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=o,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,o,i,r,s){this.view===null\u0026\u0026(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=o,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null\u0026\u0026(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),o=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=o-e,s=o+e,a=i+n,A=i-n;if(this.view!==null\u0026\u0026this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,l=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,s=r+c*this.view.width,a-=l*this.view.offsetY,A=a-l*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,A,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null\u0026\u0026(n.object.view=Object.assign({},this.view)),n}}const sY=4,$Vt=[.125,.215,.35,.446,.526,.582],GR=20,QTe=new rY,qVt=new Vi;let vTe=null,wTe=0,PTe=0,MTe=!1;const YR=(1+Math.sqrt(5))/2,aY=1/YR,XVt=[new jt(-YR,aY,0),new jt(YR,aY,0),new jt(-aY,0,YR),new jt(aY,0,YR),new jt(0,YR,-aY),new jt(0,YR,aY),new jt(-1,1,-1),new jt(1,1,-1),new jt(-1,1,1),new jt(1,1,1)];class DTe{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,o=.1,i=100){vTe=this._renderer.getRenderTarget(),wTe=this._renderer.getActiveCubeFace(),PTe=this._renderer.getActiveMipmapLevel(),MTe=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,o,i,r),n\u003e0\u0026\u0026this._blur(r,0,0,n),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null\u0026\u0026(this._cubemapMaterial=tzt(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null\u0026\u0026(this._equirectMaterial=ezt(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null\u0026\u0026this._cubemapMaterial.dispose(),this._equirectMaterial!==null\u0026\u0026this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null\u0026\u0026this._blurMaterial.dispose(),this._pingPongRenderTarget!==null\u0026\u0026this._pingPongRenderTarget.dispose();for(let e=0;e\u003cthis._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(vTe,wTe,PTe),this._renderer.xr.enabled=MTe,e.scissorTest=!1,Jde(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===vG||e.mapping===wG?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),vTe=this._renderer.getRenderTarget(),wTe=this._renderer.getActiveCubeFace(),PTe=this._renderer.getActiveMipmapLevel(),MTe=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const o=n||this._allocateTargets();return this._textureToCubeUV(e,o),this._applyPMREM(o),this._cleanup(o),o}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,o={magFilter:Fl,minFilter:Fl,generateMipmaps:!1,type:yde,format:l4,colorSpace:jw,depthBuffer:!1},i=ZVt(e,n,o);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null\u0026\u0026this._dispose(),this._pingPongRenderTarget=ZVt(e,n,o);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=eZo(r)),this._blurMaterial=tZo(r,e,n)}return i}_compileMaterial(e){const n=new Er(this._lodPlanes[0],e);this._renderer.compile(n,QTe)}_sceneToCubeUV(e,n,o,i){const a=new sf(90,1,n,o),A=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],l=this._renderer,u=l.autoClear,g=l.toneMapping;l.getClearColor(qVt),l.toneMapping=Jw,l.autoClear=!1;const h=new fE({name:\"PMREM.Background\",side:uI,depthWrite:!1,depthTest:!1}),d=new Er(new Yx,h);let p=!1;const m=e.background;m?m.isColor\u0026\u0026(h.color.copy(m),e.background=null,p=!0):(h.color.copy(qVt),p=!0);for(let _=0;_\u003c6;_++){const f=_%3;f===0?(a.up.set(0,A[_],0),a.lookAt(c[_],0,0)):f===1?(a.up.set(0,0,A[_]),a.lookAt(0,c[_],0)):(a.up.set(0,A[_],0),a.lookAt(0,0,c[_]));const I=this._cubeSize;Jde(i,f*I,_\u003e2?I:0,I,I),l.setRenderTarget(i),p\u0026\u0026l.render(d,a),l.render(e,a)}d.geometry.dispose(),d.material.dispose(),l.toneMapping=g,l.autoClear=u,e.background=m}_textureToCubeUV(e,n){const o=this._renderer,i=e.mapping===vG||e.mapping===wG;i?(this._cubemapMaterial===null\u0026\u0026(this._cubemapMaterial=tzt()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null\u0026\u0026(this._equirectMaterial=ezt());const r=i?this._cubemapMaterial:this._equirectMaterial,s=new Er(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const A=this._cubeSize;Jde(n,0,0,3*A,2*A),o.setRenderTarget(n),o.render(s,QTe)}_applyPMREM(e){const n=this._renderer,o=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let r=1;r\u003ci;r++){const s=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=XVt[(i-r-1)%XVt.length];this._blur(e,r-1,r,s,a)}n.autoClear=o}_blur(e,n,o,i,r){const s=this._pingPongRenderTarget;this._halfBlur(e,s,n,o,i,\"latitudinal\",r),this._halfBlur(s,e,o,o,i,\"longitudinal\",r)}_halfBlur(e,n,o,i,r,s,a){const A=this._renderer,c=this._blurMaterial;s!==\"latitudinal\"\u0026\u0026s!==\"longitudinal\"\u0026\u0026console.error(\"blur direction must be either latitudinal or longitudinal!\");const l=3,u=new Er(this._lodPlanes[i],c),g=c.uniforms,h=this._sizeLods[o]-1,d=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*GR-1),p=r/d,m=isFinite(r)?1+Math.floor(l*p):GR;m\u003eGR\u0026\u0026console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${GR}`);const _=[];let f=0;for(let E=0;E\u003cGR;++E){const B=E/p,S=Math.exp(-B*B/2);_.push(S),E===0?f+=S:E\u003cm\u0026\u0026(f+=2*S)}for(let E=0;E\u003c_.length;E++)_[E]=_[E]/f;g.envMap.value=e.texture,g.samples.value=m,g.weights.value=_,g.latitudinal.value=s===\"latitudinal\",a\u0026\u0026(g.poleAxis.value=a);const{_lodMax:I}=this;g.dTheta.value=d,g.mipInt.value=I-o;const C=this._sizeLods[i],y=3*C*(i\u003eI-sY?i-I+sY:0),x=4*(this._cubeSize-C);Jde(n,y,x,3*C,2*C),A.setRenderTarget(n),A.render(u,QTe)}}function eZo(t){const e=[],n=[],o=[];let i=t;const r=t-sY+1+$Vt.length;for(let s=0;s\u003cr;s++){const a=Math.pow(2,i);n.push(a);let A=1/a;s\u003et-sY?A=$Vt[s-t+sY-1]:s===0\u0026\u0026(A=0),o.push(A);const c=1/(a-2),l=-c,u=1+c,g=[l,l,u,l,u,u,l,l,u,u,l,u],h=6,d=6,p=3,m=2,_=1,f=new Float32Array(p*d*h),I=new Float32Array(m*d*h),C=new Float32Array(_*d*h);for(let x=0;x\u003ch;x++){const E=x%3*2/3-1,B=x\u003e2?0:-1,S=[E,B,0,E+2/3,B,0,E+2/3,B+1,0,E,B,0,E+2/3,B+1,0,E,B+1,0];f.set(S,p*d*x),I.set(g,m*d*x);const Q=[x,x,x,x,x,x];C.set(Q,_*d*x)}const y=new Zl;y.setAttribute(\"position\",new tg(f,p)),y.setAttribute(\"uv\",new tg(I,m)),y.setAttribute(\"faceIndex\",new tg(C,_)),e.push(y),i\u003esY\u0026\u0026i--}return{lodPlanes:e,sizeLods:n,sigmas:o}}function ZVt(t,e,n){const o=new TR(t,e,n);return o.texture.mapping=Ide,o.texture.name=\"PMREM.cubeUv\",o.scissorTest=!0,o}function Jde(t,e,n,o,i){t.viewport.set(e,n,o,i),t.scissor.set(e,n,o,i)}function tZo(t,e,n){const o=new Float32Array(GR),i=new jt(0,1,0);return new f6({name:\"SphericalGaussianBlur\",defines:{n:GR,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:o},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:NTe(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \u003ccube_uv_reflection_fragment\u003e\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i \u003c n; i++ ) {\n\n\t\t\t\t\tif ( i \u003e= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t`,blending:zw,depthTest:!1,depthWrite:!1})}function ezt(){return new f6({name:\"EquirectangularToCubeUV\",uniforms:{envMap:{value:null}},vertexShader:NTe(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \u003ccommon\u003e\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t`,blending:zw,depthTest:!1,depthWrite:!1})}function tzt(){return new f6({name:\"CubemapToCubeUV\",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:NTe(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t`,blending:zw,depthTest:!1,depthWrite:!1})}function NTe(){return`\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`}function nZo(t){let e=new WeakMap,n=null;function o(a){if(a\u0026\u0026a.isTexture){const A=a.mapping,c=A===fde||A===zRe,l=A===vG||A===wG;if(c||l){let u=e.get(a);const g=u!==void 0?u.texture.pmremVersion:0;if(a.isRenderTargetTexture\u0026\u0026a.pmremVersion!==g)return n===null\u0026\u0026(n=new DTe(t)),u=c?n.fromEquirectangular(a,u):n.fromCubemap(a,u),u.texture.pmremVersion=a.pmremVersion,e.set(a,u),u.texture;if(u!==void 0)return u.texture;{const h=a.image;return c\u0026\u0026h\u0026\u0026h.height\u003e0||l\u0026\u0026h\u0026\u0026i(h)?(n===null\u0026\u0026(n=new DTe(t)),u=c?n.fromEquirectangular(a):n.fromCubemap(a),u.texture.pmremVersion=a.pmremVersion,e.set(a,u),a.addEventListener(\"dispose\",r),u.texture):null}}}return a}function i(a){let A=0;const c=6;for(let l=0;l\u003cc;l++)a[l]!==void 0\u0026\u0026A++;return A===c}function r(a){const A=a.target;A.removeEventListener(\"dispose\",r);const c=e.get(A);c!==void 0\u0026\u0026(e.delete(A),c.dispose())}function s(){e=new WeakMap,n!==null\u0026\u0026(n.dispose(),n=null)}return{get:o,dispose:s}}function oZo(t){const e={};function n(o){if(e[o]!==void 0)return e[o];let i;switch(o){case\"WEBGL_depth_texture\":i=t.getExtension(\"WEBGL_depth_texture\")||t.getExtension(\"MOZ_WEBGL_depth_texture\")||t.getExtension(\"WEBKIT_WEBGL_depth_texture\");break;case\"EXT_texture_filter_anisotropic\":i=t.getExtension(\"EXT_texture_filter_anisotropic\")||t.getExtension(\"MOZ_EXT_texture_filter_anisotropic\")||t.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\");break;case\"WEBGL_compressed_texture_s3tc\":i=t.getExtension(\"WEBGL_compressed_texture_s3tc\")||t.getExtension(\"MOZ_WEBGL_compressed_texture_s3tc\")||t.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\");break;case\"WEBGL_compressed_texture_pvrtc\":i=t.getExtension(\"WEBGL_compressed_texture_pvrtc\")||t.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\");break;default:i=t.getExtension(o)}return e[o]=i,i}return{has:function(o){return n(o)!==null},init:function(){n(\"EXT_color_buffer_float\"),n(\"WEBGL_clip_cull_distance\"),n(\"OES_texture_float_linear\"),n(\"EXT_color_buffer_half_float\"),n(\"WEBGL_multisampled_render_to_texture\"),n(\"WEBGL_render_shared_exponent\")},get:function(o){const i=n(o);return i===null\u0026\u0026sTe(\"THREE.WebGLRenderer: \"+o+\" extension not supported.\"),i}}}function iZo(t,e,n,o){const i={},r=new WeakMap;function s(u){const g=u.target;g.index!==null\u0026\u0026e.remove(g.index);for(const d in g.attributes)e.remove(g.attributes[d]);for(const d in g.morphAttributes){const p=g.morphAttributes[d];for(let m=0,_=p.length;m\u003c_;m++)e.remove(p[m])}g.removeEventListener(\"dispose\",s),delete i[g.id];const h=r.get(g);h\u0026\u0026(e.remove(h),r.delete(g)),o.releaseStatesOfGeometry(g),g.isInstancedBufferGeometry===!0\u0026\u0026delete g._maxInstanceCount,n.memory.geometries--}function a(u,g){return i[g.id]===!0||(g.addEventListener(\"dispose\",s),i[g.id]=!0,n.memory.geometries++),g}function A(u){const g=u.attributes;for(const d in g)e.update(g[d],t.ARRAY_BUFFER);const h=u.morphAttributes;for(const d in h){const p=h[d];for(let m=0,_=p.length;m\u003c_;m++)e.update(p[m],t.ARRAY_BUFFER)}}function c(u){const g=[],h=u.index,d=u.attributes.position;let p=0;if(h!==null){const f=h.array;p=h.version;for(let I=0,C=f.length;I\u003cC;I+=3){const y=f[I+0],x=f[I+1],E=f[I+2];g.push(y,x,x,E,E,y)}}else if(d!==void 0){const f=d.array;p=d.version;for(let I=0,C=f.length/3-1;I\u003cC;I+=3){const y=I+0,x=I+1,E=I+2;g.push(y,x,x,E,E,y)}}else return;const m=new(yVt(g)?xTe:FVt)(g,1);m.version=p;const _=r.get(u);_\u0026\u0026e.remove(_),r.set(u,m)}function l(u){const g=r.get(u);if(g){const h=u.index;h!==null\u0026\u0026g.version\u003ch.version\u0026\u0026c(u)}else c(u);return r.get(u)}return{get:a,update:A,getWireframeAttribute:l}}function rZo(t,e,n){let o;function i(g){o=g}let r,s;function a(g){r=g.type,s=g.bytesPerElement}function A(g,h){t.drawElements(o,h,r,g*s),n.update(h,o,1)}function c(g,h,d){d!==0\u0026\u0026(t.drawElementsInstanced(o,h,r,g*s,d),n.update(h,o,d))}function l(g,h,d){if(d===0)return;const p=e.get(\"WEBGL_multi_draw\");if(p===null)for(let m=0;m\u003cd;m++)this.render(g[m]/s,h[m]);else{p.multiDrawElementsWEBGL(o,h,0,r,g,0,d);let m=0;for(let _=0;_\u003cd;_++)m+=h[_];n.update(m,o,1)}}function u(g,h,d,p){if(d===0)return;const m=e.get(\"WEBGL_multi_draw\");if(m===null)for(let _=0;_\u003cg.length;_++)c(g[_]/s,h[_],p[_]);else{m.multiDrawElementsInstancedWEBGL(o,h,0,r,g,0,p,0,d);let _=0;for(let f=0;f\u003cd;f++)_+=h[f];for(let f=0;f\u003cp.length;f++)n.update(_,o,p[f])}}this.setMode=i,this.setIndex=a,this.render=A,this.renderInstances=c,this.renderMultiDraw=l,this.renderMultiDrawInstances=u}function sZo(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function o(r,s,a){switch(n.calls++,s){case t.TRIANGLES:n.triangles+=a*(r/3);break;case t.LINES:n.lines+=a*(r/2);break;case t.LINE_STRIP:n.lines+=a*(r-1);break;case t.LINE_LOOP:n.lines+=a*r;break;case t.POINTS:n.points+=a*r;break;default:console.error(\"THREE.WebGLInfo: Unknown draw mode:\",s);break}}function i(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:i,update:o}}function aZo(t,e,n){const o=new WeakMap,i=new ru;function r(s,a,A){const c=s.morphTargetInfluences,l=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,u=l!==void 0?l.length:0;let g=o.get(a);if(g===void 0||g.count!==u){let h=function(){B.dispose(),o.delete(a),a.removeEventListener(\"dispose\",h)};g!==void 0\u0026\u0026g.texture.dispose();const d=a.morphAttributes.position!==void 0,p=a.morphAttributes.normal!==void 0,m=a.morphAttributes.color!==void 0,_=a.morphAttributes.position||[],f=a.morphAttributes.normal||[],I=a.morphAttributes.color||[];let C=0;d===!0\u0026\u0026(C=1),p===!0\u0026\u0026(C=2),m===!0\u0026\u0026(C=3);let y=a.attributes.position.count*C,x=1;y\u003ee.maxTextureSize\u0026\u0026(x=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const E=new Float32Array(y*x*4*u),B=new SVt(E,y,x,u);B.type=m6,B.needsUpdate=!0;const S=C*4;for(let Q=0;Q\u003cu;Q++){const w=_[Q],M=f[Q],k=I[Q],R=y*x*4*Q;for(let F=0;F\u003cw.count;F++){const O=F*S;d===!0\u0026\u0026(i.fromBufferAttribute(w,F),E[R+O+0]=i.x,E[R+O+1]=i.y,E[R+O+2]=i.z,E[R+O+3]=0),p===!0\u0026\u0026(i.fromBufferAttribute(M,F),E[R+O+4]=i.x,E[R+O+5]=i.y,E[R+O+6]=i.z,E[R+O+7]=0),m===!0\u0026\u0026(i.fromBufferAttribute(k,F),E[R+O+8]=i.x,E[R+O+9]=i.y,E[R+O+10]=i.z,E[R+O+11]=k.itemSize===4?i.w:1)}}g={count:u,texture:B,size:new ni(y,x)},o.set(a,g),a.addEventListener(\"dispose\",h)}if(s.isInstancedMesh===!0\u0026\u0026s.morphTexture!==null)A.getUniforms().setValue(t,\"morphTexture\",s.morphTexture,n);else{let h=0;for(let p=0;p\u003cc.length;p++)h+=c[p];const d=a.morphTargetsRelative?1:1-h;A.getUniforms().setValue(t,\"morphTargetBaseInfluence\",d),A.getUniforms().setValue(t,\"morphTargetInfluences\",c)}A.getUniforms().setValue(t,\"morphTargetsTexture\",g.texture,n),A.getUniforms().setValue(t,\"morphTargetsTextureSize\",g.size)}return{update:r}}function AZo(t,e,n,o){let i=new WeakMap;function r(A){const c=o.render.frame,l=A.geometry,u=e.get(A,l);if(i.get(u)!==c\u0026\u0026(e.update(u),i.set(u,c)),A.isInstancedMesh\u0026\u0026(A.hasEventListener(\"dispose\",a)===!1\u0026\u0026A.addEventListener(\"dispose\",a),i.get(A)!==c\u0026\u0026(n.update(A.instanceMatrix,t.ARRAY_BUFFER),A.instanceColor!==null\u0026\u0026n.update(A.instanceColor,t.ARRAY_BUFFER),i.set(A,c))),A.isSkinnedMesh){const g=A.skeleton;i.get(g)!==c\u0026\u0026(g.update(),i.set(g,c))}return u}function s(){i=new WeakMap}function a(A){const c=A.target;c.removeEventListener(\"dispose\",a),n.remove(c.instanceMatrix),c.instanceColor!==null\u0026\u0026n.remove(c.instanceColor)}return{update:r,dispose:s}}class nzt extends Hg{constructor(e,n,o,i,r,s,a,A,c,l=NG){if(l!==NG\u0026\u0026l!==RG)throw new Error(\"DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat\");o===void 0\u0026\u0026l===NG\u0026\u0026(o=MG),o===void 0\u0026\u0026l===RG\u0026\u0026(o=DG),super(null,i,r,s,a,A,l,o,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:wC,this.minFilter=A!==void 0?A:wC,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null\u0026\u0026(n.compareFunction=this.compareFunction),n}}const ozt=new Hg,izt=new nzt(1,1);izt.compareFunction=fVt;const rzt=new SVt,szt=new w$o,azt=new WVt,Azt=[],czt=[],lzt=new Float32Array(16),uzt=new Float32Array(9),gzt=new Float32Array(4);function AY(t,e,n){const o=t[0];if(o\u003c=0||o\u003e0)return t;const i=e*n;let r=Azt[i];if(r===void 0\u0026\u0026(r=new Float32Array(i),Azt[i]=r),e!==0){o.toArray(r,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(r,a)}return r}function af(t,e){if(t.length!==e.length)return!1;for(let n=0,o=t.length;n\u003co;n++)if(t[n]!==e[n])return!1;return!0}function Af(t,e){for(let n=0,o=e.length;n\u003co;n++)t[n]=e[n]}function Wde(t,e){let n=czt[e];n===void 0\u0026\u0026(n=new Int32Array(e),czt[e]=n);for(let o=0;o!==e;++o)n[o]=t.allocateTextureUnit();return n}function cZo(t,e){const n=this.cache;n[0]!==e\u0026\u0026(t.uniform1f(this.addr,e),n[0]=e)}function lZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)\u0026\u0026(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(af(n,e))return;t.uniform2fv(this.addr,e),Af(n,e)}}function uZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)\u0026\u0026(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)\u0026\u0026(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(af(n,e))return;t.uniform3fv(this.addr,e),Af(n,e)}}function gZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)\u0026\u0026(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(af(n,e))return;t.uniform4fv(this.addr,e),Af(n,e)}}function dZo(t,e){const n=this.cache,o=e.elements;if(o===void 0){if(af(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Af(n,e)}else{if(af(n,o))return;gzt.set(o),t.uniformMatrix2fv(this.addr,!1,gzt),Af(n,o)}}function hZo(t,e){const n=this.cache,o=e.elements;if(o===void 0){if(af(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Af(n,e)}else{if(af(n,o))return;uzt.set(o),t.uniformMatrix3fv(this.addr,!1,uzt),Af(n,o)}}function pZo(t,e){const n=this.cache,o=e.elements;if(o===void 0){if(af(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Af(n,e)}else{if(af(n,o))return;lzt.set(o),t.uniformMatrix4fv(this.addr,!1,lzt),Af(n,o)}}function mZo(t,e){const n=this.cache;n[0]!==e\u0026\u0026(t.uniform1i(this.addr,e),n[0]=e)}function _Zo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)\u0026\u0026(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(af(n,e))return;t.uniform2iv(this.addr,e),Af(n,e)}}function fZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)\u0026\u0026(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(af(n,e))return;t.uniform3iv(this.addr,e),Af(n,e)}}function IZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)\u0026\u0026(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(af(n,e))return;t.uniform4iv(this.addr,e),Af(n,e)}}function CZo(t,e){const n=this.cache;n[0]!==e\u0026\u0026(t.uniform1ui(this.addr,e),n[0]=e)}function yZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)\u0026\u0026(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(af(n,e))return;t.uniform2uiv(this.addr,e),Af(n,e)}}function xZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)\u0026\u0026(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(af(n,e))return;t.uniform3uiv(this.addr,e),Af(n,e)}}function EZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)\u0026\u0026(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(af(n,e))return;t.uniform4uiv(this.addr,e),Af(n,e)}}function BZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i\u0026\u0026(t.uniform1i(this.addr,i),o[0]=i);const r=this.type===t.SAMPLER_2D_SHADOW?izt:ozt;n.setTexture2D(e||r,i)}function bZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i\u0026\u0026(t.uniform1i(this.addr,i),o[0]=i),n.setTexture3D(e||szt,i)}function SZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i\u0026\u0026(t.uniform1i(this.addr,i),o[0]=i),n.setTextureCube(e||azt,i)}function QZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i\u0026\u0026(t.uniform1i(this.addr,i),o[0]=i),n.setTexture2DArray(e||rzt,i)}function vZo(t){switch(t){case 5126:return cZo;case 35664:return lZo;case 35665:return uZo;case 35666:return gZo;case 35674:return dZo;case 35675:return hZo;case 35676:return pZo;case 5124:case 35670:return mZo;case 35667:case 35671:return _Zo;case 35668:case 35672:return fZo;case 35669:case 35673:return IZo;case 5125:return CZo;case 36294:return yZo;case 36295:return xZo;case 36296:return EZo;case 35678:case 36198:case 36298:case 36306:case 35682:return BZo;case 35679:case 36299:case 36307:return bZo;case 35680:case 36300:case 36308:case 36293:return SZo;case 36289:case 36303:case 36311:case 36292:return QZo}}function wZo(t,e){t.uniform1fv(this.addr,e)}function PZo(t,e){const n=AY(e,this.size,2);t.uniform2fv(this.addr,n)}function MZo(t,e){const n=AY(e,this.size,3);t.uniform3fv(this.addr,n)}function DZo(t,e){const n=AY(e,this.size,4);t.uniform4fv(this.addr,n)}function NZo(t,e){const n=AY(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function RZo(t,e){const n=AY(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function TZo(t,e){const n=AY(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function kZo(t,e){t.uniform1iv(this.addr,e)}function FZo(t,e){t.uniform2iv(this.addr,e)}function LZo(t,e){t.uniform3iv(this.addr,e)}function HZo(t,e){t.uniform4iv(this.addr,e)}function OZo(t,e){t.uniform1uiv(this.addr,e)}function GZo(t,e){t.uniform2uiv(this.addr,e)}function YZo(t,e){t.uniform3uiv(this.addr,e)}function UZo(t,e){t.uniform4uiv(this.addr,e)}function KZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTexture2D(e[s]||ozt,r[s])}function VZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTexture3D(e[s]||szt,r[s])}function zZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTextureCube(e[s]||azt,r[s])}function JZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTexture2DArray(e[s]||rzt,r[s])}function WZo(t){switch(t){case 5126:return wZo;case 35664:return PZo;case 35665:return MZo;case 35666:return DZo;case 35674:return NZo;case 35675:return RZo;case 35676:return TZo;case 5124:case 35670:return kZo;case 35667:case 35671:return FZo;case 35668:case 35672:return LZo;case 35669:case 35673:return HZo;case 5125:return OZo;case 36294:return GZo;case 36295:return YZo;case 36296:return UZo;case 35678:case 36198:case 36298:case 36306:case 35682:return KZo;case 35679:case 36299:case 36307:return VZo;case 35680:case 36300:case 36308:case 36293:return zZo;case 36289:case 36303:case 36311:case 36292:return JZo}}class jZo{constructor(e,n,o){this.id=e,this.addr=o,this.cache=[],this.type=n.type,this.setValue=vZo(n.type)}}class $Zo{constructor(e,n,o){this.id=e,this.addr=o,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=WZo(n.type)}}class qZo{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,o){const i=this.seq;for(let r=0,s=i.length;r!==s;++r){const a=i[r];a.setValue(e,n[a.id],o)}}}const RTe=/(\\w+)(\\])?(\\[|\\.)?/g;function dzt(t,e){t.seq.push(e),t.map[e.id]=e}function XZo(t,e,n){const o=t.name,i=o.length;for(RTe.lastIndex=0;;){const r=RTe.exec(o),s=RTe.lastIndex;let a=r[1];const A=r[2]===\"]\",c=r[3];if(A\u0026\u0026(a=a|0),c===void 0||c===\"[\"\u0026\u0026s+2===i){dzt(n,c===void 0?new jZo(a,t,e):new $Zo(a,t,e));break}else{let u=n.map[a];u===void 0\u0026\u0026(u=new qZo(a),dzt(n,u)),n=u}}}class jde{constructor(e,n){this.seq=[],this.map={};const o=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let i=0;i\u003co;++i){const r=e.getActiveUniform(n,i),s=e.getUniformLocation(n,r.name);XZo(r,s,this)}}setValue(e,n,o,i){const r=this.map[n];r!==void 0\u0026\u0026r.setValue(e,o,i)}setOptional(e,n,o){const i=n[o];i!==void 0\u0026\u0026this.setValue(e,o,i)}static upload(e,n,o,i){for(let r=0,s=n.length;r!==s;++r){const a=n[r],A=o[a.id];A.needsUpdate!==!1\u0026\u0026a.setValue(e,A.value,i)}}static seqWithValue(e,n){const o=[];for(let i=0,r=e.length;i!==r;++i){const s=e[i];s.id in n\u0026\u0026o.push(s)}return o}}function hzt(t,e,n){const o=t.createShader(e);return t.shaderSource(o,n),t.compileShader(o),o}const ZZo=37297;let eei=0;function tei(t,e){const n=t.split(`\n`),o=[],i=Math.max(e-6,0),r=Math.min(e+6,n.length);for(let s=i;s\u003cr;s++){const a=s+1;o.push(`${a===e?\"\u003e\":\" \"} ${a}: ${n[s]}`)}return o.join(`\n`)}function nei(t){const e=iu.getPrimaries(iu.workingColorSpace),n=iu.getPrimaries(t);let o;switch(e===n?o=\"\":e===bde\u0026\u0026n===Bde?o=\"LinearDisplayP3ToLinearSRGB\":e===Bde\u0026\u0026n===bde\u0026\u0026(o=\"LinearSRGBToLinearDisplayP3\"),t){case jw:case xde:return[o,\"LinearTransferOETF\"];case Ox:case nTe:return[o,\"sRGBTransferOETF\"];default:return console.warn(\"THREE.WebGLProgram: Unsupported color space:\",t),[o,\"LinearTransferOETF\"]}}function pzt(t,e,n){const o=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(o\u0026\u0026i===\"\")return\"\";const r=/ERROR: 0:(\\d+)/.exec(i);if(r){const s=parseInt(r[1]);return n.toUpperCase()+`\n\n`+i+`\n\n`+tei(t.getShaderSource(e),s)}else return i}function oei(t,e){const n=nei(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function iei(t,e){let n;switch(e){case Njo:n=\"Linear\";break;case Rjo:n=\"Reinhard\";break;case Tjo:n=\"OptimizedCineon\";break;case PKt:n=\"ACESFilmic\";break;case Fjo:n=\"AgX\";break;case Ljo:n=\"Neutral\";break;case kjo:n=\"Custom\";break;default:console.warn(\"THREE.WebGLProgram: Unsupported toneMapping:\",e),n=\"Linear\"}return\"vec3 \"+t+\"( vec3 color ) { return \"+n+\"ToneMapping( color ); }\"}function rei(t){return[t.extensionClipCullDistance?\"#extension GL_ANGLE_clip_cull_distance : require\":\"\",t.extensionMultiDraw?\"#extension GL_ANGLE_multi_draw : require\":\"\"].filter(Uq).join(`\n`)}function sei(t){const e=[];for(const n in t){const o=t[n];o!==!1\u0026\u0026e.push(\"#define \"+n+\" \"+o)}return e.join(`\n`)}function aei(t,e){const n={},o=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i\u003co;i++){const r=t.getActiveAttrib(e,i),s=r.name;let a=1;r.type===t.FLOAT_MAT2\u0026\u0026(a=2),r.type===t.FLOAT_MAT3\u0026\u0026(a=3),r.type===t.FLOAT_MAT4\u0026\u0026(a=4),n[s]={type:r.type,location:t.getAttribLocation(e,s),locationSize:a}}return n}function Uq(t){return t!==\"\"}function mzt(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function _zt(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Aei=/^[ \\t]*#include +\u003c([\\w\\d./]+)\u003e/gm;function TTe(t){return t.replace(Aei,lei)}const cei=new Map;function lei(t,e){let n=OA[e];if(n===void 0){const o=cei.get(e);if(o!==void 0)n=OA[o],console.warn('THREE.WebGLRenderer: Shader chunk \"%s\" has been deprecated. Use \"%s\" instead.',e,o);else throw new Error(\"Can not resolve #include \u003c\"+e+\"\u003e\")}return TTe(n)}const uei=/#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*\u003c\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;function fzt(t){return t.replace(uei,gei)}function gei(t,e,n,o){let i=\"\";for(let r=parseInt(e);r\u003cparseInt(n);r++)i+=o.replace(/\\[\\s*i\\s*\\]/g,\"[ \"+r+\" ]\").replace(/UNROLLED_LOOP_INDEX/g,r);return i}function Izt(t){let e=`precision ${t.precision} float;\n\tprecision ${t.precision} int;\n\tprecision ${t.precision} sampler2D;\n\tprecision ${t.precision} samplerCube;\n\tprecision ${t.precision} sampler3D;\n\tprecision ${t.precision} sampler2DArray;\n\tprecision ${t.precision} sampler2DShadow;\n\tprecision ${t.precision} samplerCubeShadow;\n\tprecision ${t.precision} sampler2DArrayShadow;\n\tprecision ${t.precision} isampler2D;\n\tprecision ${t.precision} isampler3D;\n\tprecision ${t.precision} isamplerCube;\n\tprecision ${t.precision} isampler2DArray;\n\tprecision ${t.precision} usampler2D;\n\tprecision ${t.precision} usampler3D;\n\tprecision ${t.precision} usamplerCube;\n\tprecision ${t.precision} usampler2DArray;\n\t`;return t.precision===\"highp\"?e+=`\n#define HIGH_PRECISION`:t.precision===\"mediump\"?e+=`\n#define MEDIUM_PRECISION`:t.precision===\"lowp\"\u0026\u0026(e+=`\n#define LOW_PRECISION`),e}function dei(t){let e=\"SHADOWMAP_TYPE_BASIC\";return t.shadowMapType===bKt?e=\"SHADOWMAP_TYPE_PCF\":t.shadowMapType===SKt?e=\"SHADOWMAP_TYPE_PCF_SOFT\":t.shadowMapType===qb\u0026\u0026(e=\"SHADOWMAP_TYPE_VSM\"),e}function hei(t){let e=\"ENVMAP_TYPE_CUBE\";if(t.envMap)switch(t.envMapMode){case vG:case wG:e=\"ENVMAP_TYPE_CUBE\";break;case Ide:e=\"ENVMAP_TYPE_CUBE_UV\";break}return e}function pei(t){let e=\"ENVMAP_MODE_REFLECTION\";return t.envMap\u0026\u0026t.envMapMode===wG\u0026\u0026(e=\"ENVMAP_MODE_REFRACTION\"),e}function mei(t){let e=\"ENVMAP_BLENDING_NONE\";if(t.envMap)switch(t.combine){case VRe:e=\"ENVMAP_BLENDING_MULTIPLY\";break;case Mjo:e=\"ENVMAP_BLENDING_MIX\";break;case Djo:e=\"ENVMAP_BLENDING_ADD\";break}return e}function _ei(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,o=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:o,maxMip:n}}function fei(t,e,n,o){const i=t.getContext(),r=n.defines;let s=n.vertexShader,a=n.fragmentShader;const A=dei(n),c=hei(n),l=pei(n),u=mei(n),g=_ei(n),h=rei(n),d=sei(r),p=i.createProgram();let m,_,f=n.glslVersion?\"#version \"+n.glslVersion+`\n`:\"\";n.isRawShaderMaterial?(m=[\"#define SHADER_TYPE \"+n.shaderType,\"#define SHADER_NAME \"+n.shaderName,d].filter(Uq).join(`\n`),m.length\u003e0\u0026\u0026(m+=`\n`),_=[\"#define SHADER_TYPE \"+n.shaderType,\"#define SHADER_NAME \"+n.shaderName,d].filter(Uq).join(`\n`),_.length\u003e0\u0026\u0026(_+=`\n`)):(m=[Izt(n),\"#define SHADER_TYPE \"+n.shaderType,\"#define SHADER_NAME \"+n.shaderName,d,n.extensionClipCullDistance?\"#define USE_CLIP_DISTANCE\":\"\",n.batching?\"#define USE_BATCHING\":\"\",n.batchingColor?\"#define USE_BATCHING_COLOR\":\"\",n.instancing?\"#define USE_INSTANCING\":\"\",n.instancingColor?\"#define USE_INSTANCING_COLOR\":\"\",n.instancingMorph?\"#define USE_INSTANCING_MORPH\":\"\",n.useFog\u0026\u0026n.fog?\"#define USE_FOG\":\"\",n.useFog\u0026\u0026n.fogExp2?\"#define FOG_EXP2\":\"\",n.map?\"#define USE_MAP\":\"\",n.envMap?\"#define USE_ENVMAP\":\"\",n.envMap?\"#define \"+l:\"\",n.lightMap?\"#define USE_LIGHTMAP\":\"\",n.aoMap?\"#define USE_AOMAP\":\"\",n.bumpMap?\"#define USE_BUMPMAP\":\"\",n.normalMap?\"#define USE_NORMALMAP\":\"\",n.normalMapObjectSpace?\"#define USE_NORMALMAP_OBJECTSPACE\":\"\",n.normalMapTangentSpace?\"#define USE_NORMALMAP_TANGENTSPACE\":\"\",n.displacementMap?\"#define USE_DISPLACEMENTMAP\":\"\",n.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",n.anisotropy?\"#define USE_ANISOTROPY\":\"\",n.anisotropyMap?\"#define USE_ANISOTROPYMAP\":\"\",n.clearcoatMap?\"#define USE_CLEARCOATMAP\":\"\",n.clearcoatRoughnessMap?\"#define USE_CLEARCOAT_ROUGHNESSMAP\":\"\",n.clearcoatNormalMap?\"#define USE_CLEARCOAT_NORMALMAP\":\"\",n.iridescenceMap?\"#define USE_IRIDESCENCEMAP\":\"\",n.iridescenceThicknessMap?\"#define USE_IRIDESCENCE_THICKNESSMAP\":\"\",n.specularMap?\"#define USE_SPECULARMAP\":\"\",n.specularColorMap?\"#define USE_SPECULAR_COLORMAP\":\"\",n.specularIntensityMap?\"#define USE_SPECULAR_INTENSITYMAP\":\"\",n.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",n.metalnessMap?\"#define USE_METALNESSMAP\":\"\",n.alphaMap?\"#define USE_ALPHAMAP\":\"\",n.alphaHash?\"#define USE_ALPHAHASH\":\"\",n.transmission?\"#define USE_TRANSMISSION\":\"\",n.transmissionMap?\"#define USE_TRANSMISSIONMAP\":\"\",n.thicknessMap?\"#define USE_THICKNESSMAP\":\"\",n.sheenColorMap?\"#define USE_SHEEN_COLORMAP\":\"\",n.sheenRoughnessMap?\"#define USE_SHEEN_ROUGHNESSMAP\":\"\",n.mapUv?\"#define MAP_UV \"+n.mapUv:\"\",n.alphaMapUv?\"#define ALPHAMAP_UV \"+n.alphaMapUv:\"\",n.lightMapUv?\"#define LIGHTMAP_UV \"+n.lightMapUv:\"\",n.aoMapUv?\"#define AOMAP_UV \"+n.aoMapUv:\"\",n.emissiveMapUv?\"#define EMISSIVEMAP_UV \"+n.emissiveMapUv:\"\",n.bumpMapUv?\"#define BUMPMAP_UV \"+n.bumpMapUv:\"\",n.normalMapUv?\"#define NORMALMAP_UV \"+n.normalMapUv:\"\",n.displacementMapUv?\"#define DISPLACEMENTMAP_UV \"+n.displacementMapUv:\"\",n.metalnessMapUv?\"#define METALNESSMAP_UV \"+n.metalnessMapUv:\"\",n.roughnessMapUv?\"#define ROUGHNESSMAP_UV \"+n.roughnessMapUv:\"\",n.anisotropyMapUv?\"#define ANISOTROPYMAP_UV \"+n.anisotropyMapUv:\"\",n.clearcoatMapUv?\"#define CLEARCOATMAP_UV \"+n.clearcoatMapUv:\"\",n.clearcoatNormalMapUv?\"#define CLEARCOAT_NORMALMAP_UV \"+n.clearcoatNormalMapUv:\"\",n.clearcoatRoughnessMapUv?\"#define CLEARCOAT_ROUGHNESSMAP_UV \"+n.clearcoatRoughnessMapUv:\"\",n.iridescenceMapUv?\"#define IRIDESCENCEMAP_UV \"+n.iridescenceMapUv:\"\",n.iridescenceThicknessMapUv?\"#define IRIDESCENCE_THICKNESSMAP_UV \"+n.iridescenceThicknessMapUv:\"\",n.sheenColorMapUv?\"#define SHEEN_COLORMAP_UV \"+n.sheenColorMapUv:\"\",n.sheenRoughnessMapUv?\"#define SHEEN_ROUGHNESSMAP_UV \"+n.sheenRoughnessMapUv:\"\",n.specularMapUv?\"#define SPECULARMAP_UV \"+n.specularMapUv:\"\",n.specularColorMapUv?\"#define SPECULAR_COLORMAP_UV \"+n.specularColorMapUv:\"\",n.specularIntensityMapUv?\"#define SPECULAR_INTENSITYMAP_UV \"+n.specularIntensityMapUv:\"\",n.transmissionMapUv?\"#define TRANSMISSIONMAP_UV \"+n.transmissionMapUv:\"\",n.thicknessMapUv?\"#define THICKNESSMAP_UV \"+n.thicknessMapUv:\"\",n.vertexTangents\u0026\u0026n.flatShading===!1?\"#define USE_TANGENT\":\"\",n.vertexColors?\"#define USE_COLOR\":\"\",n.vertexAlphas?\"#define USE_COLOR_ALPHA\":\"\",n.vertexUv1s?\"#define USE_UV1\":\"\",n.vertexUv2s?\"#define USE_UV2\":\"\",n.vertexUv3s?\"#define USE_UV3\":\"\",n.pointsUvs?\"#define USE_POINTS_UV\":\"\",n.flatShading?\"#define FLAT_SHADED\":\"\",n.skinning?\"#define USE_SKINNING\":\"\",n.morphTargets?\"#define USE_MORPHTARGETS\":\"\",n.morphNormals\u0026\u0026n.flatShading===!1?\"#define USE_MORPHNORMALS\":\"\",n.morphColors?\"#define USE_MORPHCOLORS\":\"\",n.morphTargetsCount\u003e0?\"#define MORPHTARGETS_TEXTURE_STRIDE \"+n.morphTextureStride:\"\",n.morphTargetsCount\u003e0?\"#define MORPHTARGETS_COUNT \"+n.morphTargetsCount:\"\",n.doubleSided?\"#define DOUBLE_SIDED\":\"\",n.flipSided?\"#define FLIP_SIDED\":\"\",n.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",n.shadowMapEnabled?\"#define \"+A:\"\",n.sizeAttenuation?\"#define USE_SIZEATTENUATION\":\"\",n.numLightProbes\u003e0?\"#define USE_LIGHT_PROBES\":\"\",n.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",\"uniform mat4 modelMatrix;\",\"uniform mat4 modelViewMatrix;\",\"uniform mat4 projectionMatrix;\",\"uniform mat4 viewMatrix;\",\"uniform mat3 normalMatrix;\",\"uniform vec3 cameraPosition;\",\"uniform bool isOrthographic;\",\"#ifdef USE_INSTANCING\",\"\tattribute mat4 instanceMatrix;\",\"#endif\",\"#ifdef USE_INSTANCING_COLOR\",\"\tattribute vec3 instanceColor;\",\"#endif\",\"#ifdef USE_INSTANCING_MORPH\",\"\tuniform sampler2D morphTexture;\",\"#endif\",\"attribute vec3 position;\",\"attribute vec3 normal;\",\"attribute vec2 uv;\",\"#ifdef USE_UV1\",\"\tattribute vec2 uv1;\",\"#endif\",\"#ifdef USE_UV2\",\"\tattribute vec2 uv2;\",\"#endif\",\"#ifdef USE_UV3\",\"\tattribute vec2 uv3;\",\"#endif\",\"#ifdef USE_TANGENT\",\"\tattribute vec4 tangent;\",\"#endif\",\"#if defined( USE_COLOR_ALPHA )\",\"\tattribute vec4 color;\",\"#elif defined( USE_COLOR )\",\"\tattribute vec3 color;\",\"#endif\",\"#ifdef USE_SKINNING\",\"\tattribute vec4 skinIndex;\",\"\tattribute vec4 skinWeight;\",\"#endif\",`\n`].filter(Uq).join(`\n`),_=[Izt(n),\"#define SHADER_TYPE \"+n.shaderType,\"#define SHADER_NAME \"+n.shaderName,d,n.useFog\u0026\u0026n.fog?\"#define USE_FOG\":\"\",n.useFog\u0026\u0026n.fogExp2?\"#define FOG_EXP2\":\"\",n.alphaToCoverage?\"#define ALPHA_TO_COVERAGE\":\"\",n.map?\"#define USE_MAP\":\"\",n.matcap?\"#define USE_MATCAP\":\"\",n.envMap?\"#define USE_ENVMAP\":\"\",n.envMap?\"#define \"+c:\"\",n.envMap?\"#define \"+l:\"\",n.envMap?\"#define \"+u:\"\",g?\"#define CUBEUV_TEXEL_WIDTH \"+g.texelWidth:\"\",g?\"#define CUBEUV_TEXEL_HEIGHT \"+g.texelHeight:\"\",g?\"#define CUBEUV_MAX_MIP \"+g.maxMip+\".0\":\"\",n.lightMap?\"#define USE_LIGHTMAP\":\"\",n.aoMap?\"#define USE_AOMAP\":\"\",n.bumpMap?\"#define USE_BUMPMAP\":\"\",n.normalMap?\"#define USE_NORMALMAP\":\"\",n.normalMapObjectSpace?\"#define USE_NORMALMAP_OBJECTSPACE\":\"\",n.normalMapTangentSpace?\"#define USE_NORMALMAP_TANGENTSPACE\":\"\",n.emissiveMap?\"#define USE_EMISSIVEMAP\":\"\",n.anisotropy?\"#define USE_ANISOTROPY\":\"\",n.anisotropyMap?\"#define USE_ANISOTROPYMAP\":\"\",n.clearcoat?\"#define USE_CLEARCOAT\":\"\",n.clearcoatMap?\"#define USE_CLEARCOATMAP\":\"\",n.clearcoatRoughnessMap?\"#define USE_CLEARCOAT_ROUGHNESSMAP\":\"\",n.clearcoatNormalMap?\"#define USE_CLEARCOAT_NORMALMAP\":\"\",n.dispersion?\"#define USE_DISPERSION\":\"\",n.iridescence?\"#define USE_IRIDESCENCE\":\"\",n.iridescenceMap?\"#define USE_IRIDESCENCEMAP\":\"\",n.iridescenceThicknessMap?\"#define USE_IRIDESCENCE_THICKNESSMAP\":\"\",n.specularMap?\"#define USE_SPECULARMAP\":\"\",n.specularColorMap?\"#define USE_SPECULAR_COLORMAP\":\"\",n.specularIntensityMap?\"#define USE_SPECULAR_INTENSITYMAP\":\"\",n.roughnessMap?\"#define USE_ROUGHNESSMAP\":\"\",n.metalnessMap?\"#define USE_METALNESSMAP\":\"\",n.alphaMap?\"#define USE_ALPHAMAP\":\"\",n.alphaTest?\"#define USE_ALPHATEST\":\"\",n.alphaHash?\"#define USE_ALPHAHASH\":\"\",n.sheen?\"#define USE_SHEEN\":\"\",n.sheenColorMap?\"#define USE_SHEEN_COLORMAP\":\"\",n.sheenRoughnessMap?\"#define USE_SHEEN_ROUGHNESSMAP\":\"\",n.transmission?\"#define USE_TRANSMISSION\":\"\",n.transmissionMap?\"#define USE_TRANSMISSIONMAP\":\"\",n.thicknessMap?\"#define USE_THICKNESSMAP\":\"\",n.vertexTangents\u0026\u0026n.flatShading===!1?\"#define USE_TANGENT\":\"\",n.vertexColors||n.instancingColor||n.batchingColor?\"#define USE_COLOR\":\"\",n.vertexAlphas?\"#define USE_COLOR_ALPHA\":\"\",n.vertexUv1s?\"#define USE_UV1\":\"\",n.vertexUv2s?\"#define USE_UV2\":\"\",n.vertexUv3s?\"#define USE_UV3\":\"\",n.pointsUvs?\"#define USE_POINTS_UV\":\"\",n.gradientMap?\"#define USE_GRADIENTMAP\":\"\",n.flatShading?\"#define FLAT_SHADED\":\"\",n.doubleSided?\"#define DOUBLE_SIDED\":\"\",n.flipSided?\"#define FLIP_SIDED\":\"\",n.shadowMapEnabled?\"#define USE_SHADOWMAP\":\"\",n.shadowMapEnabled?\"#define \"+A:\"\",n.premultipliedAlpha?\"#define PREMULTIPLIED_ALPHA\":\"\",n.numLightProbes\u003e0?\"#define USE_LIGHT_PROBES\":\"\",n.decodeVideoTexture?\"#define DECODE_VIDEO_TEXTURE\":\"\",n.logarithmicDepthBuffer?\"#define USE_LOGDEPTHBUF\":\"\",\"uniform mat4 viewMatrix;\",\"uniform vec3 cameraPosition;\",\"uniform bool isOrthographic;\",n.toneMapping!==Jw?\"#define TONE_MAPPING\":\"\",n.toneMapping!==Jw?OA.tonemapping_pars_fragment:\"\",n.toneMapping!==Jw?iei(\"toneMapping\",n.toneMapping):\"\",n.dithering?\"#define DITHERING\":\"\",n.opaque?\"#define OPAQUE\":\"\",OA.colorspace_pars_fragment,oei(\"linearToOutputTexel\",n.outputColorSpace),n.useDepthPacking?\"#define DEPTH_PACKING \"+n.depthPacking:\"\",`\n`].filter(Uq).join(`\n`)),s=TTe(s),s=mzt(s,n),s=_zt(s,n),a=TTe(a),a=mzt(a,n),a=_zt(a,n),s=fzt(s),a=fzt(a),n.isRawShaderMaterial!==!0\u0026\u0026(f=`#version 300 es\n`,m=[h,\"#define attribute in\",\"#define varying out\",\"#define texture2D texture\"].join(`\n`)+`\n`+m,_=[\"#define varying in\",n.glslVersion===IVt?\"\":\"layout(location = 0) out highp vec4 pc_fragColor;\",n.glslVersion===IVt?\"\":\"#define gl_FragColor pc_fragColor\",\"#define gl_FragDepthEXT gl_FragDepth\",\"#define texture2D texture\",\"#define textureCube texture\",\"#define texture2DProj textureProj\",\"#define texture2DLodEXT textureLod\",\"#define texture2DProjLodEXT textureProjLod\",\"#define textureCubeLodEXT textureLod\",\"#define texture2DGradEXT textureGrad\",\"#define texture2DProjGradEXT textureProjGrad\",\"#define textureCubeGradEXT textureGrad\"].join(`\n`)+`\n`+_);const I=f+m+s,C=f+_+a,y=hzt(i,i.VERTEX_SHADER,I),x=hzt(i,i.FRAGMENT_SHADER,C);i.attachShader(p,y),i.attachShader(p,x),n.index0AttributeName!==void 0?i.bindAttribLocation(p,0,n.index0AttributeName):n.morphTargets===!0\u0026\u0026i.bindAttribLocation(p,0,\"position\"),i.linkProgram(p);function E(w){if(t.debug.checkShaderErrors){const M=i.getProgramInfoLog(p).trim(),k=i.getShaderInfoLog(y).trim(),R=i.getShaderInfoLog(x).trim();let F=!0,O=!0;if(i.getProgramParameter(p,i.LINK_STATUS)===!1)if(F=!1,typeof t.debug.onShaderError==\"function\")t.debug.onShaderError(i,p,y,x);else{const U=pzt(i,y,\"vertex\"),Y=pzt(i,x,\"fragment\");console.error(\"THREE.WebGLProgram: Shader Error \"+i.getError()+\" - VALIDATE_STATUS \"+i.getProgramParameter(p,i.VALIDATE_STATUS)+`\n\nMaterial Name: `+w.name+`\nMaterial Type: `+w.type+`\n\nProgram Info Log: `+M+`\n`+U+`\n`+Y)}else M!==\"\"?console.warn(\"THREE.WebGLProgram: Program Info Log:\",M):(k===\"\"||R===\"\")\u0026\u0026(O=!1);O\u0026\u0026(w.diagnostics={runnable:F,programLog:M,vertexShader:{log:k,prefix:m},fragmentShader:{log:R,prefix:_}})}i.deleteShader(y),i.deleteShader(x),B=new jde(i,p),S=aei(i,p)}let B;this.getUniforms=function(){return B===void 0\u0026\u0026E(this),B};let S;this.getAttributes=function(){return S===void 0\u0026\u0026E(this),S};let Q=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return Q===!1\u0026\u0026(Q=i.getProgramParameter(p,ZZo)),Q},this.destroy=function(){o.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=eei++,this.cacheKey=e,this.usedTimes=1,this.program=p,this.vertexShader=y,this.fragmentShader=x,this}let Iei=0;class Cei{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,o=e.fragmentShader,i=this._getShaderStage(n),r=this._getShaderStage(o),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1\u0026\u0026(s.add(i),i.usedTimes++),s.has(r)===!1\u0026\u0026(s.add(r),r.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const o of n)o.usedTimes--,o.usedTimes===0\u0026\u0026this.shaderCache.delete(o.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let o=n.get(e);return o===void 0\u0026\u0026(o=new Set,n.set(e,o)),o}_getShaderStage(e){const n=this.shaderCache;let o=n.get(e);return o===void 0\u0026\u0026(o=new yei(e),n.set(e,o)),o}}class yei{constructor(e){this.id=Iei++,this.code=e,this.usedTimes=0}}function xei(t,e,n,o,i,r,s){const a=new pTe,A=new Cei,c=new Set,l=[],u=i.logarithmicDepthBuffer,g=i.vertexTextures;let h=i.precision;const d={MeshDepthMaterial:\"depth\",MeshDistanceMaterial:\"distanceRGBA\",MeshNormalMaterial:\"normal\",MeshBasicMaterial:\"basic\",MeshLambertMaterial:\"lambert\",MeshPhongMaterial:\"phong\",MeshToonMaterial:\"toon\",MeshStandardMaterial:\"physical\",MeshPhysicalMaterial:\"physical\",MeshMatcapMaterial:\"matcap\",LineBasicMaterial:\"basic\",LineDashedMaterial:\"dashed\",PointsMaterial:\"points\",ShadowMaterial:\"shadow\",SpriteMaterial:\"sprite\"};function p(S){return c.add(S),S===0?\"uv\":`uv${S}`}function m(S,Q,w,M,k){const R=M.fog,F=k.geometry,O=S.isMeshStandardMaterial?M.environment:null,U=(S.isMeshStandardMaterial?n:e).get(S.envMap||O),Y=U\u0026\u0026U.mapping===Ide?U.image.height:null,W=d[S.type];S.precision!==null\u0026\u0026(h=i.getMaxPrecision(S.precision),h!==S.precision\u0026\u0026console.warn(\"THREE.WebGLProgram.getParameters:\",S.precision,\"not supported, using\",h,\"instead.\"));const te=F.morphAttributes.position||F.morphAttributes.normal||F.morphAttributes.color,j=te!==void 0?te.length:0;let J=0;F.morphAttributes.position!==void 0\u0026\u0026(J=1),F.morphAttributes.normal!==void 0\u0026\u0026(J=2),F.morphAttributes.color!==void 0\u0026\u0026(J=3);let oe,ie,ne,le;if(W){const dt=I6[W];oe=dt.vertexShader,ie=dt.fragmentShader}else oe=S.vertexShader,ie=S.fragmentShader,A.update(S),ne=A.getVertexShaderID(S),le=A.getFragmentShaderID(S);const ge=t.getRenderTarget(),_e=k.isInstancedMesh===!0,ue=k.isBatchedMesh===!0,fe=!!S.map,pe=!!S.matcap,ye=!!U,Me=!!S.aoMap,ve=!!S.lightMap,he=!!S.bumpMap,Qe=!!S.normalMap,Pe=!!S.displacementMap,we=!!S.emissiveMap,Te=!!S.metalnessMap,Re=!!S.roughnessMap,Ee=S.anisotropy\u003e0,ke=S.clearcoat\u003e0,Ce=S.dispersion\u003e0,Le=S.iridescence\u003e0,Ye=S.sheen\u003e0,tt=S.transmission\u003e0,At=Ee\u0026\u0026!!S.anisotropyMap,at=ke\u0026\u0026!!S.clearcoatMap,nt=ke\u0026\u0026!!S.clearcoatNormalMap,gt=ke\u0026\u0026!!S.clearcoatRoughnessMap,bt=Le\u0026\u0026!!S.iridescenceMap,Ct=Le\u0026\u0026!!S.iridescenceThicknessMap,Dt=Ye\u0026\u0026!!S.sheenColorMap,kt=Ye\u0026\u0026!!S.sheenRoughnessMap,it=!!S.specularMap,Yt=!!S.specularColorMap,pn=!!S.specularIntensityMap,be=tt\u0026\u0026!!S.transmissionMap,et=tt\u0026\u0026!!S.thicknessMap,It=!!S.gradientMap,Bt=!!S.alphaMap,mt=S.alphaTest\u003e0,st=!!S.alphaHash,xt=!!S.extensions;let Xe=Jw;S.toneMapped\u0026\u0026(ge===null||ge.isXRRenderTarget===!0)\u0026\u0026(Xe=t.toneMapping);const Ze={shaderID:W,shaderType:S.type,shaderName:S.name,vertexShader:oe,fragmentShader:ie,defines:S.defines,customVertexShaderID:ne,customFragmentShaderID:le,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:h,batching:ue,batchingColor:ue\u0026\u0026k._colorsTexture!==null,instancing:_e,instancingColor:_e\u0026\u0026k.instanceColor!==null,instancingMorph:_e\u0026\u0026k.morphTexture!==null,supportsVertexTextures:g,outputColorSpace:ge===null?t.outputColorSpace:ge.isXRRenderTarget===!0?ge.texture.colorSpace:jw,alphaToCoverage:!!S.alphaToCoverage,map:fe,matcap:pe,envMap:ye,envMapMode:ye\u0026\u0026U.mapping,envMapCubeUVHeight:Y,aoMap:Me,lightMap:ve,bumpMap:he,normalMap:Qe,displacementMap:g\u0026\u0026Pe,emissiveMap:we,normalMapObjectSpace:Qe\u0026\u0026S.normalMapType===Xjo,normalMapTangentSpace:Qe\u0026\u0026S.normalMapType===tTe,metalnessMap:Te,roughnessMap:Re,anisotropy:Ee,anisotropyMap:At,clearcoat:ke,clearcoatMap:at,clearcoatNormalMap:nt,clearcoatRoughnessMap:gt,dispersion:Ce,iridescence:Le,iridescenceMap:bt,iridescenceThicknessMap:Ct,sheen:Ye,sheenColorMap:Dt,sheenRoughnessMap:kt,specularMap:it,specularColorMap:Yt,specularIntensityMap:pn,transmission:tt,transmissionMap:be,thicknessMap:et,gradientMap:It,opaque:S.transparent===!1\u0026\u0026S.blending===QG\u0026\u0026S.alphaToCoverage===!1,alphaMap:Bt,alphaTest:mt,alphaHash:st,combine:S.combine,mapUv:fe\u0026\u0026p(S.map.channel),aoMapUv:Me\u0026\u0026p(S.aoMap.channel),lightMapUv:ve\u0026\u0026p(S.lightMap.channel),bumpMapUv:he\u0026\u0026p(S.bumpMap.channel),normalMapUv:Qe\u0026\u0026p(S.normalMap.channel),displacementMapUv:Pe\u0026\u0026p(S.displacementMap.channel),emissiveMapUv:we\u0026\u0026p(S.emissiveMap.channel),metalnessMapUv:Te\u0026\u0026p(S.metalnessMap.channel),roughnessMapUv:Re\u0026\u0026p(S.roughnessMap.channel),anisotropyMapUv:At\u0026\u0026p(S.anisotropyMap.channel),clearcoatMapUv:at\u0026\u0026p(S.clearcoatMap.channel),clearcoatNormalMapUv:nt\u0026\u0026p(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:gt\u0026\u0026p(S.clearcoatRoughnessMap.channel),iridescenceMapUv:bt\u0026\u0026p(S.iridescenceMap.channel),iridescenceThicknessMapUv:Ct\u0026\u0026p(S.iridescenceThicknessMap.channel),sheenColorMapUv:Dt\u0026\u0026p(S.sheenColorMap.channel),sheenRoughnessMapUv:kt\u0026\u0026p(S.sheenRoughnessMap.channel),specularMapUv:it\u0026\u0026p(S.specularMap.channel),specularColorMapUv:Yt\u0026\u0026p(S.specularColorMap.channel),specularIntensityMapUv:pn\u0026\u0026p(S.specularIntensityMap.channel),transmissionMapUv:be\u0026\u0026p(S.transmissionMap.channel),thicknessMapUv:et\u0026\u0026p(S.thicknessMap.channel),alphaMapUv:Bt\u0026\u0026p(S.alphaMap.channel),vertexTangents:!!F.attributes.tangent\u0026\u0026(Qe||Ee),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0\u0026\u0026!!F.attributes.color\u0026\u0026F.attributes.color.itemSize===4,pointsUvs:k.isPoints===!0\u0026\u0026!!F.attributes.uv\u0026\u0026(fe||Bt),fog:!!R,useFog:S.fog===!0,fogExp2:!!R\u0026\u0026R.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:u,skinning:k.isSkinnedMesh===!0,morphTargets:F.morphAttributes.position!==void 0,morphNormals:F.morphAttributes.normal!==void 0,morphColors:F.morphAttributes.color!==void 0,morphTargetsCount:j,morphTextureStride:J,numDirLights:Q.directional.length,numPointLights:Q.point.length,numSpotLights:Q.spot.length,numSpotLightMaps:Q.spotLightMap.length,numRectAreaLights:Q.rectArea.length,numHemiLights:Q.hemi.length,numDirLightShadows:Q.directionalShadowMap.length,numPointLightShadows:Q.pointShadowMap.length,numSpotLightShadows:Q.spotShadowMap.length,numSpotLightShadowsWithMaps:Q.numSpotLightShadowsWithMaps,numLightProbes:Q.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:S.dithering,shadowMapEnabled:t.shadowMap.enabled\u0026\u0026w.length\u003e0,shadowMapType:t.shadowMap.type,toneMapping:Xe,decodeVideoTexture:fe\u0026\u0026S.map.isVideoTexture===!0\u0026\u0026iu.getTransfer(S.map.colorSpace)===Ed,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===r_,flipSided:S.side===uI,useDepthPacking:S.depthPacking\u003e=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionClipCullDistance:xt\u0026\u0026S.extensions.clipCullDistance===!0\u0026\u0026o.has(\"WEBGL_clip_cull_distance\"),extensionMultiDraw:xt\u0026\u0026S.extensions.multiDraw===!0\u0026\u0026o.has(\"WEBGL_multi_draw\"),rendererExtensionParallelShaderCompile:o.has(\"KHR_parallel_shader_compile\"),customProgramCacheKey:S.customProgramCacheKey()};return Ze.vertexUv1s=c.has(1),Ze.vertexUv2s=c.has(2),Ze.vertexUv3s=c.has(3),c.clear(),Ze}function _(S){const Q=[];if(S.shaderID?Q.push(S.shaderID):(Q.push(S.customVertexShaderID),Q.push(S.customFragmentShaderID)),S.defines!==void 0)for(const w in S.defines)Q.push(w),Q.push(S.defines[w]);return S.isRawShaderMaterial===!1\u0026\u0026(f(Q,S),I(Q,S),Q.push(t.outputColorSpace)),Q.push(S.customProgramCacheKey),Q.join()}function f(S,Q){S.push(Q.precision),S.push(Q.outputColorSpace),S.push(Q.envMapMode),S.push(Q.envMapCubeUVHeight),S.push(Q.mapUv),S.push(Q.alphaMapUv),S.push(Q.lightMapUv),S.push(Q.aoMapUv),S.push(Q.bumpMapUv),S.push(Q.normalMapUv),S.push(Q.displacementMapUv),S.push(Q.emissiveMapUv),S.push(Q.metalnessMapUv),S.push(Q.roughnessMapUv),S.push(Q.anisotropyMapUv),S.push(Q.clearcoatMapUv),S.push(Q.clearcoatNormalMapUv),S.push(Q.clearcoatRoughnessMapUv),S.push(Q.iridescenceMapUv),S.push(Q.iridescenceThicknessMapUv),S.push(Q.sheenColorMapUv),S.push(Q.sheenRoughnessMapUv),S.push(Q.specularMapUv),S.push(Q.specularColorMapUv),S.push(Q.specularIntensityMapUv),S.push(Q.transmissionMapUv),S.push(Q.thicknessMapUv),S.push(Q.combine),S.push(Q.fogExp2),S.push(Q.sizeAttenuation),S.push(Q.morphTargetsCount),S.push(Q.morphAttributeCount),S.push(Q.numDirLights),S.push(Q.numPointLights),S.push(Q.numSpotLights),S.push(Q.numSpotLightMaps),S.push(Q.numHemiLights),S.push(Q.numRectAreaLights),S.push(Q.numDirLightShadows),S.push(Q.numPointLightShadows),S.push(Q.numSpotLightShadows),S.push(Q.numSpotLightShadowsWithMaps),S.push(Q.numLightProbes),S.push(Q.shadowMapType),S.push(Q.toneMapping),S.push(Q.numClippingPlanes),S.push(Q.numClipIntersection),S.push(Q.depthPacking)}function I(S,Q){a.disableAll(),Q.supportsVertexTextures\u0026\u0026a.enable(0),Q.instancing\u0026\u0026a.enable(1),Q.instancingColor\u0026\u0026a.enable(2),Q.instancingMorph\u0026\u0026a.enable(3),Q.matcap\u0026\u0026a.enable(4),Q.envMap\u0026\u0026a.enable(5),Q.normalMapObjectSpace\u0026\u0026a.enable(6),Q.normalMapTangentSpace\u0026\u0026a.enable(7),Q.clearcoat\u0026\u0026a.enable(8),Q.iridescence\u0026\u0026a.enable(9),Q.alphaTest\u0026\u0026a.enable(10),Q.vertexColors\u0026\u0026a.enable(11),Q.vertexAlphas\u0026\u0026a.enable(12),Q.vertexUv1s\u0026\u0026a.enable(13),Q.vertexUv2s\u0026\u0026a.enable(14),Q.vertexUv3s\u0026\u0026a.enable(15),Q.vertexTangents\u0026\u0026a.enable(16),Q.anisotropy\u0026\u0026a.enable(17),Q.alphaHash\u0026\u0026a.enable(18),Q.batching\u0026\u0026a.enable(19),Q.dispersion\u0026\u0026a.enable(20),Q.batchingColor\u0026\u0026a.enable(21),S.push(a.mask),a.disableAll(),Q.fog\u0026\u0026a.enable(0),Q.useFog\u0026\u0026a.enable(1),Q.flatShading\u0026\u0026a.enable(2),Q.logarithmicDepthBuffer\u0026\u0026a.enable(3),Q.skinning\u0026\u0026a.enable(4),Q.morphTargets\u0026\u0026a.enable(5),Q.morphNormals\u0026\u0026a.enable(6),Q.morphColors\u0026\u0026a.enable(7),Q.premultipliedAlpha\u0026\u0026a.enable(8),Q.shadowMapEnabled\u0026\u0026a.enable(9),Q.doubleSided\u0026\u0026a.enable(10),Q.flipSided\u0026\u0026a.enable(11),Q.useDepthPacking\u0026\u0026a.enable(12),Q.dithering\u0026\u0026a.enable(13),Q.transmission\u0026\u0026a.enable(14),Q.sheen\u0026\u0026a.enable(15),Q.opaque\u0026\u0026a.enable(16),Q.pointsUvs\u0026\u0026a.enable(17),Q.decodeVideoTexture\u0026\u0026a.enable(18),Q.alphaToCoverage\u0026\u0026a.enable(19),S.push(a.mask)}function C(S){const Q=d[S.type];let w;if(Q){const M=I6[Q];w=KVt.clone(M.uniforms)}else w=S.uniforms;return w}function y(S,Q){let w;for(let M=0,k=l.length;M\u003ck;M++){const R=l[M];if(R.cacheKey===Q){w=R,++w.usedTimes;break}}return w===void 0\u0026\u0026(w=new fei(t,Q,S,r),l.push(w)),w}function x(S){if(--S.usedTimes===0){const Q=l.indexOf(S);l[Q]=l[l.length-1],l.pop(),S.destroy()}}function E(S){A.remove(S)}function B(){A.dispose()}return{getParameters:m,getProgramCacheKey:_,getUniforms:C,acquireProgram:y,releaseProgram:x,releaseShaderCache:E,programs:l,dispose:B}}function Eei(){let t=new WeakMap;function e(r){let s=t.get(r);return s===void 0\u0026\u0026(s={},t.set(r,s)),s}function n(r){t.delete(r)}function o(r,s,a){t.get(r)[s]=a}function i(){t=new WeakMap}return{get:e,remove:n,update:o,dispose:i}}function Bei(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Czt(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function yzt(){const t=[];let e=0;const n=[],o=[],i=[];function r(){e=0,n.length=0,o.length=0,i.length=0}function s(u,g,h,d,p,m){let _=t[e];return _===void 0?(_={id:u.id,object:u,geometry:g,material:h,groupOrder:d,renderOrder:u.renderOrder,z:p,group:m},t[e]=_):(_.id=u.id,_.object=u,_.geometry=g,_.material=h,_.groupOrder=d,_.renderOrder=u.renderOrder,_.z=p,_.group=m),e++,_}function a(u,g,h,d,p,m){const _=s(u,g,h,d,p,m);h.transmission\u003e0?o.push(_):h.transparent===!0?i.push(_):n.push(_)}function A(u,g,h,d,p,m){const _=s(u,g,h,d,p,m);h.transmission\u003e0?o.unshift(_):h.transparent===!0?i.unshift(_):n.unshift(_)}function c(u,g){n.length\u003e1\u0026\u0026n.sort(u||Bei),o.length\u003e1\u0026\u0026o.sort(g||Czt),i.length\u003e1\u0026\u0026i.sort(g||Czt)}function l(){for(let u=e,g=t.length;u\u003cg;u++){const h=t[u];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:n,transmissive:o,transparent:i,init:r,push:a,unshift:A,finish:l,sort:c}}function bei(){let t=new WeakMap;function e(o,i){const r=t.get(o);let s;return r===void 0?(s=new yzt,t.set(o,[s])):i\u003e=r.length?(s=new yzt,r.push(s)):s=r[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function Sei(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case\"DirectionalLight\":n={direction:new jt,color:new Vi};break;case\"SpotLight\":n={position:new jt,direction:new jt,color:new Vi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case\"PointLight\":n={position:new jt,color:new Vi,distance:0,decay:0};break;case\"HemisphereLight\":n={direction:new jt,skyColor:new Vi,groundColor:new Vi};break;case\"RectAreaLight\":n={color:new Vi,position:new jt,halfWidth:new jt,halfHeight:new jt};break}return t[e.id]=n,n}}}function Qei(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case\"DirectionalLight\":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ni};break;case\"SpotLight\":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ni};break;case\"PointLight\":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ni,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let vei=0;function wei(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Pei(t){const e=new Sei,n=Qei(),o={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c\u003c9;c++)o.probe.push(new jt);const i=new jt,r=new va,s=new va;function a(c){let l=0,u=0,g=0;for(let S=0;S\u003c9;S++)o.probe[S].set(0,0,0);let h=0,d=0,p=0,m=0,_=0,f=0,I=0,C=0,y=0,x=0,E=0;c.sort(wei);for(let S=0,Q=c.length;S\u003cQ;S++){const w=c[S],M=w.color,k=w.intensity,R=w.distance,F=w.shadow\u0026\u0026w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)l+=M.r*k,u+=M.g*k,g+=M.b*k;else if(w.isLightProbe){for(let O=0;O\u003c9;O++)o.probe[O].addScaledVector(w.sh.coefficients[O],k);E++}else if(w.isDirectionalLight){const O=e.get(w);if(O.color.copy(w.color).multiplyScalar(w.intensity),w.castShadow){const U=w.shadow,Y=n.get(w);Y.shadowBias=U.bias,Y.shadowNormalBias=U.normalBias,Y.shadowRadius=U.radius,Y.shadowMapSize=U.mapSize,o.directionalShadow[h]=Y,o.directionalShadowMap[h]=F,o.directionalShadowMatrix[h]=w.shadow.matrix,f++}o.directional[h]=O,h++}else if(w.isSpotLight){const O=e.get(w);O.position.setFromMatrixPosition(w.matrixWorld),O.color.copy(M).multiplyScalar(k),O.distance=R,O.coneCos=Math.cos(w.angle),O.penumbraCos=Math.cos(w.angle*(1-w.penumbra)),O.decay=w.decay,o.spot[p]=O;const U=w.shadow;if(w.map\u0026\u0026(o.spotLightMap[y]=w.map,y++,U.updateMatrices(w),w.castShadow\u0026\u0026x++),o.spotLightMatrix[p]=U.matrix,w.castShadow){const Y=n.get(w);Y.shadowBias=U.bias,Y.shadowNormalBias=U.normalBias,Y.shadowRadius=U.radius,Y.shadowMapSize=U.mapSize,o.spotShadow[p]=Y,o.spotShadowMap[p]=F,C++}p++}else if(w.isRectAreaLight){const O=e.get(w);O.color.copy(M).multiplyScalar(k),O.halfWidth.set(w.width*.5,0,0),O.halfHeight.set(0,w.height*.5,0),o.rectArea[m]=O,m++}else if(w.isPointLight){const O=e.get(w);if(O.color.copy(w.color).multiplyScalar(w.intensity),O.distance=w.distance,O.decay=w.decay,w.castShadow){const U=w.shadow,Y=n.get(w);Y.shadowBias=U.bias,Y.shadowNormalBias=U.normalBias,Y.shadowRadius=U.radius,Y.shadowMapSize=U.mapSize,Y.shadowCameraNear=U.camera.near,Y.shadowCameraFar=U.camera.far,o.pointShadow[d]=Y,o.pointShadowMap[d]=F,o.pointShadowMatrix[d]=w.shadow.matrix,I++}o.point[d]=O,d++}else if(w.isHemisphereLight){const O=e.get(w);O.skyColor.copy(w.color).multiplyScalar(k),O.groundColor.copy(w.groundColor).multiplyScalar(k),o.hemi[_]=O,_++}}m\u003e0\u0026\u0026(t.has(\"OES_texture_float_linear\")===!0?(o.rectAreaLTC1=or.LTC_FLOAT_1,o.rectAreaLTC2=or.LTC_FLOAT_2):(o.rectAreaLTC1=or.LTC_HALF_1,o.rectAreaLTC2=or.LTC_HALF_2)),o.ambient[0]=l,o.ambient[1]=u,o.ambient[2]=g;const B=o.hash;(B.directionalLength!==h||B.pointLength!==d||B.spotLength!==p||B.rectAreaLength!==m||B.hemiLength!==_||B.numDirectionalShadows!==f||B.numPointShadows!==I||B.numSpotShadows!==C||B.numSpotMaps!==y||B.numLightProbes!==E)\u0026\u0026(o.directional.length=h,o.spot.length=p,o.rectArea.length=m,o.point.length=d,o.hemi.length=_,o.directionalShadow.length=f,o.directionalShadowMap.length=f,o.pointShadow.length=I,o.pointShadowMap.length=I,o.spotShadow.length=C,o.spotShadowMap.length=C,o.directionalShadowMatrix.length=f,o.pointShadowMatrix.length=I,o.spotLightMatrix.length=C+y-x,o.spotLightMap.length=y,o.numSpotLightShadowsWithMaps=x,o.numLightProbes=E,B.directionalLength=h,B.pointLength=d,B.spotLength=p,B.rectAreaLength=m,B.hemiLength=_,B.numDirectionalShadows=f,B.numPointShadows=I,B.numSpotShadows=C,B.numSpotMaps=y,B.numLightProbes=E,o.version=vei++)}function A(c,l){let u=0,g=0,h=0,d=0,p=0;const m=l.matrixWorldInverse;for(let _=0,f=c.length;_\u003cf;_++){const I=c[_];if(I.isDirectionalLight){const C=o.directional[u];C.direction.setFromMatrixPosition(I.matrixWorld),i.setFromMatrixPosition(I.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),u++}else if(I.isSpotLight){const C=o.spot[h];C.position.setFromMatrixPosition(I.matrixWorld),C.position.applyMatrix4(m),C.direction.setFromMatrixPosition(I.matrixWorld),i.setFromMatrixPosition(I.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),h++}else if(I.isRectAreaLight){const C=o.rectArea[d];C.position.setFromMatrixPosition(I.matrixWorld),C.position.applyMatrix4(m),s.identity(),r.copy(I.matrixWorld),r.premultiply(m),s.extractRotation(r),C.halfWidth.set(I.width*.5,0,0),C.halfHeight.set(0,I.height*.5,0),C.halfWidth.applyMatrix4(s),C.halfHeight.applyMatrix4(s),d++}else if(I.isPointLight){const C=o.point[g];C.position.setFromMatrixPosition(I.matrixWorld),C.position.applyMatrix4(m),g++}else if(I.isHemisphereLight){const C=o.hemi[p];C.direction.setFromMatrixPosition(I.matrixWorld),C.direction.transformDirection(m),p++}}}return{setup:a,setupView:A,state:o}}function xzt(t){const e=new Pei(t),n=[],o=[];function i(l){c.camera=l,n.length=0,o.length=0}function r(l){n.push(l)}function s(l){o.push(l)}function a(){e.setup(n)}function A(l){e.setupView(n,l)}const c={lightsArray:n,shadowsArray:o,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:A,pushLight:r,pushShadow:s}}function Mei(t){let e=new WeakMap;function n(i,r=0){const s=e.get(i);let a;return s===void 0?(a=new xzt(t),e.set(i,[a])):r\u003e=s.length?(a=new xzt(t),s.push(a)):a=s[r],a}function o(){e=new WeakMap}return{get:n,dispose:o}}class Ezt extends Gx{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=\"MeshDepthMaterial\",this.depthPacking=qjo,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Bzt extends Gx{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=\"MeshDistanceMaterial\",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Dei=`void main() {\n\tgl_Position = vec4( position, 1.0 );\n}`,Nei=`uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \u003cpacking\u003e\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples \u003c= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples \u003c= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i \u003c samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}`;function Rei(t,e,n){let o=new STe;const i=new ni,r=new ni,s=new ru,a=new Ezt({depthPacking:mVt}),A=new Bzt,c={},l=n.maxTextureSize,u={[mE]:uI,[uI]:mE,[r_]:r_},g=new f6({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ni},radius:{value:4}},vertexShader:Dei,fragmentShader:Nei}),h=g.clone();h.defines.HORIZONTAL_PASS=1;const d=new Zl;d.setAttribute(\"position\",new tg(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Er(d,g),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bKt;let _=this.type;this.render=function(x,E,B){if(m.enabled===!1||m.autoUpdate===!1\u0026\u0026m.needsUpdate===!1||x.length===0)return;const S=t.getRenderTarget(),Q=t.getActiveCubeFace(),w=t.getActiveMipmapLevel(),M=t.state;M.setBlending(zw),M.buffers.color.setClear(1,1,1,1),M.buffers.depth.setTest(!0),M.setScissorTest(!1);const k=_!==qb\u0026\u0026this.type===qb,R=_===qb\u0026\u0026this.type!==qb;for(let F=0,O=x.length;F\u003cO;F++){const U=x[F],Y=U.shadow;if(Y===void 0){console.warn(\"THREE.WebGLShadowMap:\",U,\"has no shadow.\");continue}if(Y.autoUpdate===!1\u0026\u0026Y.needsUpdate===!1)continue;i.copy(Y.mapSize);const W=Y.getFrameExtents();if(i.multiply(W),r.copy(Y.mapSize),(i.x\u003el||i.y\u003el)\u0026\u0026(i.x\u003el\u0026\u0026(r.x=Math.floor(l/W.x),i.x=r.x*W.x,Y.mapSize.x=r.x),i.y\u003el\u0026\u0026(r.y=Math.floor(l/W.y),i.y=r.y*W.y,Y.mapSize.y=r.y)),Y.map===null||k===!0||R===!0){const j=this.type!==qb?{minFilter:wC,magFilter:wC}:{};Y.map!==null\u0026\u0026Y.map.dispose(),Y.map=new TR(i.x,i.y,j),Y.map.texture.name=U.name+\".shadowMap\",Y.camera.updateProjectionMatrix()}t.setRenderTarget(Y.map),t.clear();const te=Y.getViewportCount();for(let j=0;j\u003cte;j++){const J=Y.getViewport(j);s.set(r.x*J.x,r.y*J.y,r.x*J.z,r.y*J.w),M.viewport(s),Y.updateMatrices(U,j),o=Y.getFrustum(),C(E,B,Y.camera,U,this.type)}Y.isPointLightShadow!==!0\u0026\u0026this.type===qb\u0026\u0026f(Y,B),Y.needsUpdate=!1}_=this.type,m.needsUpdate=!1,t.setRenderTarget(S,Q,w)};function f(x,E){const B=e.update(p);g.defines.VSM_SAMPLES!==x.blurSamples\u0026\u0026(g.defines.VSM_SAMPLES=x.blurSamples,h.defines.VSM_SAMPLES=x.blurSamples,g.needsUpdate=!0,h.needsUpdate=!0),x.mapPass===null\u0026\u0026(x.mapPass=new TR(i.x,i.y)),g.uniforms.shadow_pass.value=x.map.texture,g.uniforms.resolution.value=x.mapSize,g.uniforms.radius.value=x.radius,t.setRenderTarget(x.mapPass),t.clear(),t.renderBufferDirect(E,null,B,g,p,null),h.uniforms.shadow_pass.value=x.mapPass.texture,h.uniforms.resolution.value=x.mapSize,h.uniforms.radius.value=x.radius,t.setRenderTarget(x.map),t.clear(),t.renderBufferDirect(E,null,B,h,p,null)}function I(x,E,B,S){let Q=null;const w=B.isPointLight===!0?x.customDistanceMaterial:x.customDepthMaterial;if(w!==void 0)Q=w;else if(Q=B.isPointLight===!0?A:a,t.localClippingEnabled\u0026\u0026E.clipShadows===!0\u0026\u0026Array.isArray(E.clippingPlanes)\u0026\u0026E.clippingPlanes.length!==0||E.displacementMap\u0026\u0026E.displacementScale!==0||E.alphaMap\u0026\u0026E.alphaTest\u003e0||E.map\u0026\u0026E.alphaTest\u003e0){const M=Q.uuid,k=E.uuid;let R=c[M];R===void 0\u0026\u0026(R={},c[M]=R);let F=R[k];F===void 0\u0026\u0026(F=Q.clone(),R[k]=F,E.addEventListener(\"dispose\",y)),Q=F}if(Q.visible=E.visible,Q.wireframe=E.wireframe,S===qb?Q.side=E.shadowSide!==null?E.shadowSide:E.side:Q.side=E.shadowSide!==null?E.shadowSide:u[E.side],Q.alphaMap=E.alphaMap,Q.alphaTest=E.alphaTest,Q.map=E.map,Q.clipShadows=E.clipShadows,Q.clippingPlanes=E.clippingPlanes,Q.clipIntersection=E.clipIntersection,Q.displacementMap=E.displacementMap,Q.displacementScale=E.displacementScale,Q.displacementBias=E.displacementBias,Q.wireframeLinewidth=E.wireframeLinewidth,Q.linewidth=E.linewidth,B.isPointLight===!0\u0026\u0026Q.isMeshDistanceMaterial===!0){const M=t.properties.get(Q);M.light=B}return Q}function C(x,E,B,S,Q){if(x.visible===!1)return;if(x.layers.test(E.layers)\u0026\u0026(x.isMesh||x.isLine||x.isPoints)\u0026\u0026(x.castShadow||x.receiveShadow\u0026\u0026Q===qb)\u0026\u0026(!x.frustumCulled||o.intersectsObject(x))){x.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,x.matrixWorld);const k=e.update(x),R=x.material;if(Array.isArray(R)){const F=k.groups;for(let O=0,U=F.length;O\u003cU;O++){const Y=F[O],W=R[Y.materialIndex];if(W\u0026\u0026W.visible){const te=I(x,W,S,Q);x.onBeforeShadow(t,x,E,B,k,te,Y),t.renderBufferDirect(B,null,k,te,x,Y),x.onAfterShadow(t,x,E,B,k,te,Y)}}}else if(R.visible){const F=I(x,R,S,Q);x.onBeforeShadow(t,x,E,B,k,F,null),t.renderBufferDirect(B,null,k,F,x,null),x.onAfterShadow(t,x,E,B,k,F,null)}}const M=x.children;for(let k=0,R=M.length;k\u003cR;k++)C(M[k],E,B,S,Q)}function y(x){x.target.removeEventListener(\"dispose\",y);for(const B in c){const S=c[B],Q=x.target.uuid;Q in S\u0026\u0026(S[Q].dispose(),delete S[Q])}}}function Tei(t){function e(){let be=!1;const et=new ru;let It=null;const Bt=new ru(0,0,0,0);return{setMask:function(mt){It!==mt\u0026\u0026!be\u0026\u0026(t.colorMask(mt,mt,mt,mt),It=mt)},setLocked:function(mt){be=mt},setClear:function(mt,st,xt,Xe,Ze){Ze===!0\u0026\u0026(mt*=Xe,st*=Xe,xt*=Xe),et.set(mt,st,xt,Xe),Bt.equals(et)===!1\u0026\u0026(t.clearColor(mt,st,xt,Xe),Bt.copy(et))},reset:function(){be=!1,It=null,Bt.set(-1,0,0,0)}}}function n(){let be=!1,et=null,It=null,Bt=null;return{setTest:function(mt){mt?le(t.DEPTH_TEST):ge(t.DEPTH_TEST)},setMask:function(mt){et!==mt\u0026\u0026!be\u0026\u0026(t.depthMask(mt),et=mt)},setFunc:function(mt){if(It!==mt){switch(mt){case Bjo:t.depthFunc(t.NEVER);break;case bjo:t.depthFunc(t.ALWAYS);break;case Sjo:t.depthFunc(t.LESS);break;case _de:t.depthFunc(t.LEQUAL);break;case Qjo:t.depthFunc(t.EQUAL);break;case vjo:t.depthFunc(t.GEQUAL);break;case wjo:t.depthFunc(t.GREATER);break;case Pjo:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}It=mt}},setLocked:function(mt){be=mt},setClear:function(mt){Bt!==mt\u0026\u0026(t.clearDepth(mt),Bt=mt)},reset:function(){be=!1,et=null,It=null,Bt=null}}}function o(){let be=!1,et=null,It=null,Bt=null,mt=null,st=null,xt=null,Xe=null,Ze=null;return{setTest:function(dt){be||(dt?le(t.STENCIL_TEST):ge(t.STENCIL_TEST))},setMask:function(dt){et!==dt\u0026\u0026!be\u0026\u0026(t.stencilMask(dt),et=dt)},setFunc:function(dt,Ut,Wt){(It!==dt||Bt!==Ut||mt!==Wt)\u0026\u0026(t.stencilFunc(dt,Ut,Wt),It=dt,Bt=Ut,mt=Wt)},setOp:function(dt,Ut,Wt){(st!==dt||xt!==Ut||Xe!==Wt)\u0026\u0026(t.stencilOp(dt,Ut,Wt),st=dt,xt=Ut,Xe=Wt)},setLocked:function(dt){be=dt},setClear:function(dt){Ze!==dt\u0026\u0026(t.clearStencil(dt),Ze=dt)},reset:function(){be=!1,et=null,It=null,Bt=null,mt=null,st=null,xt=null,Xe=null,Ze=null}}}const i=new e,r=new n,s=new o,a=new WeakMap,A=new WeakMap;let c={},l={},u=new WeakMap,g=[],h=null,d=!1,p=null,m=null,_=null,f=null,I=null,C=null,y=null,x=new Vi(0,0,0),E=0,B=!1,S=null,Q=null,w=null,M=null,k=null;const R=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let F=!1,O=0;const U=t.getParameter(t.VERSION);U.indexOf(\"WebGL\")!==-1?(O=parseFloat(/^WebGL (\\d)/.exec(U)[1]),F=O\u003e=1):U.indexOf(\"OpenGL ES\")!==-1\u0026\u0026(O=parseFloat(/^OpenGL ES (\\d)/.exec(U)[1]),F=O\u003e=2);let Y=null,W={};const te=t.getParameter(t.SCISSOR_BOX),j=t.getParameter(t.VIEWPORT),J=new ru().fromArray(te),oe=new ru().fromArray(j);function ie(be,et,It,Bt){const mt=new Uint8Array(4),st=t.createTexture();t.bindTexture(be,st),t.texParameteri(be,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(be,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let xt=0;xt\u003cIt;xt++)be===t.TEXTURE_3D||be===t.TEXTURE_2D_ARRAY?t.texImage3D(et,0,t.RGBA,1,1,Bt,0,t.RGBA,t.UNSIGNED_BYTE,mt):t.texImage2D(et+xt,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,mt);return st}const ne={};ne[t.TEXTURE_2D]=ie(t.TEXTURE_2D,t.TEXTURE_2D,1),ne[t.TEXTURE_CUBE_MAP]=ie(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),ne[t.TEXTURE_2D_ARRAY]=ie(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),ne[t.TEXTURE_3D]=ie(t.TEXTURE_3D,t.TEXTURE_3D,1,1),i.setClear(0,0,0,1),r.setClear(1),s.setClear(0),le(t.DEPTH_TEST),r.setFunc(_de),he(!1),Qe(BKt),le(t.CULL_FACE),Me(zw);function le(be){c[be]!==!0\u0026\u0026(t.enable(be),c[be]=!0)}function ge(be){c[be]!==!1\u0026\u0026(t.disable(be),c[be]=!1)}function _e(be,et){return l[be]!==et?(t.bindFramebuffer(be,et),l[be]=et,be===t.DRAW_FRAMEBUFFER\u0026\u0026(l[t.FRAMEBUFFER]=et),be===t.FRAMEBUFFER\u0026\u0026(l[t.DRAW_FRAMEBUFFER]=et),!0):!1}function ue(be,et){let It=g,Bt=!1;if(be){It=u.get(et),It===void 0\u0026\u0026(It=[],u.set(et,It));const mt=be.textures;if(It.length!==mt.length||It[0]!==t.COLOR_ATTACHMENT0){for(let st=0,xt=mt.length;st\u003cxt;st++)It[st]=t.COLOR_ATTACHMENT0+st;It.length=mt.length,Bt=!0}}else It[0]!==t.BACK\u0026\u0026(It[0]=t.BACK,Bt=!0);Bt\u0026\u0026t.drawBuffers(It)}function fe(be){return h!==be?(t.useProgram(be),h=be,!0):!1}const pe={[NR]:t.FUNC_ADD,[ajo]:t.FUNC_SUBTRACT,[Ajo]:t.FUNC_REVERSE_SUBTRACT};pe[cjo]=t.MIN,pe[ljo]=t.MAX;const ye={[ujo]:t.ZERO,[gjo]:t.ONE,[djo]:t.SRC_COLOR,[URe]:t.SRC_ALPHA,[Ijo]:t.SRC_ALPHA_SATURATE,[_jo]:t.DST_COLOR,[pjo]:t.DST_ALPHA,[hjo]:t.ONE_MINUS_SRC_COLOR,[KRe]:t.ONE_MINUS_SRC_ALPHA,[fjo]:t.ONE_MINUS_DST_COLOR,[mjo]:t.ONE_MINUS_DST_ALPHA,[Cjo]:t.CONSTANT_COLOR,[yjo]:t.ONE_MINUS_CONSTANT_COLOR,[xjo]:t.CONSTANT_ALPHA,[Ejo]:t.ONE_MINUS_CONSTANT_ALPHA};function Me(be,et,It,Bt,mt,st,xt,Xe,Ze,dt){if(be===zw){d===!0\u0026\u0026(ge(t.BLEND),d=!1);return}if(d===!1\u0026\u0026(le(t.BLEND),d=!0),be!==sjo){if(be!==p||dt!==B){if((m!==NR||I!==NR)\u0026\u0026(t.blendEquation(t.FUNC_ADD),m=NR,I=NR),dt)switch(be){case QG:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case QKt:t.blendFunc(t.ONE,t.ONE);break;case vKt:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case wKt:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error(\"THREE.WebGLState: Invalid blending: \",be);break}else switch(be){case QG:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case QKt:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case vKt:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case wKt:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error(\"THREE.WebGLState: Invalid blending: \",be);break}_=null,f=null,C=null,y=null,x.set(0,0,0),E=0,p=be,B=dt}return}mt=mt||et,st=st||It,xt=xt||Bt,(et!==m||mt!==I)\u0026\u0026(t.blendEquationSeparate(pe[et],pe[mt]),m=et,I=mt),(It!==_||Bt!==f||st!==C||xt!==y)\u0026\u0026(t.blendFuncSeparate(ye[It],ye[Bt],ye[st],ye[xt]),_=It,f=Bt,C=st,y=xt),(Xe.equals(x)===!1||Ze!==E)\u0026\u0026(t.blendColor(Xe.r,Xe.g,Xe.b,Ze),x.copy(Xe),E=Ze),p=be,B=!1}function ve(be,et){be.side===r_?ge(t.CULL_FACE):le(t.CULL_FACE);let It=be.side===uI;et\u0026\u0026(It=!It),he(It),be.blending===QG\u0026\u0026be.transparent===!1?Me(zw):Me(be.blending,be.blendEquation,be.blendSrc,be.blendDst,be.blendEquationAlpha,be.blendSrcAlpha,be.blendDstAlpha,be.blendColor,be.blendAlpha,be.premultipliedAlpha),r.setFunc(be.depthFunc),r.setTest(be.depthTest),r.setMask(be.depthWrite),i.setMask(be.colorWrite);const Bt=be.stencilWrite;s.setTest(Bt),Bt\u0026\u0026(s.setMask(be.stencilWriteMask),s.setFunc(be.stencilFunc,be.stencilRef,be.stencilFuncMask),s.setOp(be.stencilFail,be.stencilZFail,be.stencilZPass)),we(be.polygonOffset,be.polygonOffsetFactor,be.polygonOffsetUnits),be.alphaToCoverage===!0?le(t.SAMPLE_ALPHA_TO_COVERAGE):ge(t.SAMPLE_ALPHA_TO_COVERAGE)}function he(be){S!==be\u0026\u0026(be?t.frontFace(t.CW):t.frontFace(t.CCW),S=be)}function Qe(be){be!==ijo?(le(t.CULL_FACE),be!==Q\u0026\u0026(be===BKt?t.cullFace(t.BACK):be===rjo?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):ge(t.CULL_FACE),Q=be}function Pe(be){be!==w\u0026\u0026(F\u0026\u0026t.lineWidth(be),w=be)}function we(be,et,It){be?(le(t.POLYGON_OFFSET_FILL),(M!==et||k!==It)\u0026\u0026(t.polygonOffset(et,It),M=et,k=It)):ge(t.POLYGON_OFFSET_FILL)}function Te(be){be?le(t.SCISSOR_TEST):ge(t.SCISSOR_TEST)}function Re(be){be===void 0\u0026\u0026(be=t.TEXTURE0+R-1),Y!==be\u0026\u0026(t.activeTexture(be),Y=be)}function Ee(be,et,It){It===void 0\u0026\u0026(Y===null?It=t.TEXTURE0+R-1:It=Y);let Bt=W[It];Bt===void 0\u0026\u0026(Bt={type:void 0,texture:void 0},W[It]=Bt),(Bt.type!==be||Bt.texture!==et)\u0026\u0026(Y!==It\u0026\u0026(t.activeTexture(It),Y=It),t.bindTexture(be,et||ne[be]),Bt.type=be,Bt.texture=et)}function ke(){const be=W[Y];be!==void 0\u0026\u0026be.type!==void 0\u0026\u0026(t.bindTexture(be.type,null),be.type=void 0,be.texture=void 0)}function Ce(){try{t.compressedTexImage2D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function Le(){try{t.compressedTexImage3D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function Ye(){try{t.texSubImage2D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function tt(){try{t.texSubImage3D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function At(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function at(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function nt(){try{t.texStorage2D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function gt(){try{t.texStorage3D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function bt(){try{t.texImage2D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function Ct(){try{t.texImage3D.apply(t,arguments)}catch(be){console.error(\"THREE.WebGLState:\",be)}}function Dt(be){J.equals(be)===!1\u0026\u0026(t.scissor(be.x,be.y,be.z,be.w),J.copy(be))}function kt(be){oe.equals(be)===!1\u0026\u0026(t.viewport(be.x,be.y,be.z,be.w),oe.copy(be))}function it(be,et){let It=A.get(et);It===void 0\u0026\u0026(It=new WeakMap,A.set(et,It));let Bt=It.get(be);Bt===void 0\u0026\u0026(Bt=t.getUniformBlockIndex(et,be.name),It.set(be,Bt))}function Yt(be,et){const Bt=A.get(et).get(be);a.get(et)!==Bt\u0026\u0026(t.uniformBlockBinding(et,Bt,be.__bindingPointIndex),a.set(et,Bt))}function pn(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),c={},Y=null,W={},l={},u=new WeakMap,g=[],h=null,d=!1,p=null,m=null,_=null,f=null,I=null,C=null,y=null,x=new Vi(0,0,0),E=0,B=!1,S=null,Q=null,w=null,M=null,k=null,J.set(0,0,t.canvas.width,t.canvas.height),oe.set(0,0,t.canvas.width,t.canvas.height),i.reset(),r.reset(),s.reset()}return{buffers:{color:i,depth:r,stencil:s},enable:le,disable:ge,bindFramebuffer:_e,drawBuffers:ue,useProgram:fe,setBlending:Me,setMaterial:ve,setFlipSided:he,setCullFace:Qe,setLineWidth:Pe,setPolygonOffset:we,setScissorTest:Te,activeTexture:Re,bindTexture:Ee,unbindTexture:ke,compressedTexImage2D:Ce,compressedTexImage3D:Le,texImage2D:bt,texImage3D:Ct,updateUBOMapping:it,uniformBlockBinding:Yt,texStorage2D:nt,texStorage3D:gt,texSubImage2D:Ye,texSubImage3D:tt,compressedTexSubImage2D:At,compressedTexSubImage3D:at,scissor:Dt,viewport:kt,reset:pn}}function kei(t,e,n,o,i,r,s){const a=e.has(\"WEBGL_multisampled_render_to_texture\")?e.get(\"WEBGL_multisampled_render_to_texture\"):null,A=typeof navigator\u003e\"u\"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new ni,l=new WeakMap;let u;const g=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas\u003c\"u\"\u0026\u0026new OffscreenCanvas(1,1).getContext(\"2d\")!==null}catch{}function d(Re,Ee){return h?new OffscreenCanvas(Re,Ee):Lq(\"canvas\")}function p(Re,Ee,ke){let Ce=1;const Le=Te(Re);if((Le.width\u003eke||Le.height\u003eke)\u0026\u0026(Ce=ke/Math.max(Le.width,Le.height)),Ce\u003c1)if(typeof HTMLImageElement\u003c\"u\"\u0026\u0026Re instanceof HTMLImageElement||typeof HTMLCanvasElement\u003c\"u\"\u0026\u0026Re instanceof HTMLCanvasElement||typeof ImageBitmap\u003c\"u\"\u0026\u0026Re instanceof ImageBitmap||typeof VideoFrame\u003c\"u\"\u0026\u0026Re instanceof VideoFrame){const Ye=Math.floor(Ce*Le.width),tt=Math.floor(Ce*Le.height);u===void 0\u0026\u0026(u=d(Ye,tt));const At=Ee?d(Ye,tt):u;return At.width=Ye,At.height=tt,At.getContext(\"2d\").drawImage(Re,0,0,Ye,tt),console.warn(\"THREE.WebGLRenderer: Texture has been resized from (\"+Le.width+\"x\"+Le.height+\") to (\"+Ye+\"x\"+tt+\").\"),At}else return\"data\"in Re\u0026\u0026console.warn(\"THREE.WebGLRenderer: Image in DataTexture is too big (\"+Le.width+\"x\"+Le.height+\").\"),Re;return Re}function m(Re){return Re.generateMipmaps\u0026\u0026Re.minFilter!==wC\u0026\u0026Re.minFilter!==Fl}function _(Re){t.generateMipmap(Re)}function f(Re,Ee,ke,Ce,Le=!1){if(Re!==null){if(t[Re]!==void 0)return t[Re];console.warn(\"THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '\"+Re+\"'\")}let Ye=Ee;if(Ee===t.RED\u0026\u0026(ke===t.FLOAT\u0026\u0026(Ye=t.R32F),ke===t.HALF_FLOAT\u0026\u0026(Ye=t.R16F),ke===t.UNSIGNED_BYTE\u0026\u0026(Ye=t.R8)),Ee===t.RED_INTEGER\u0026\u0026(ke===t.UNSIGNED_BYTE\u0026\u0026(Ye=t.R8UI),ke===t.UNSIGNED_SHORT\u0026\u0026(Ye=t.R16UI),ke===t.UNSIGNED_INT\u0026\u0026(Ye=t.R32UI),ke===t.BYTE\u0026\u0026(Ye=t.R8I),ke===t.SHORT\u0026\u0026(Ye=t.R16I),ke===t.INT\u0026\u0026(Ye=t.R32I)),Ee===t.RG\u0026\u0026(ke===t.FLOAT\u0026\u0026(Ye=t.RG32F),ke===t.HALF_FLOAT\u0026\u0026(Ye=t.RG16F),ke===t.UNSIGNED_BYTE\u0026\u0026(Ye=t.RG8)),Ee===t.RG_INTEGER\u0026\u0026(ke===t.UNSIGNED_BYTE\u0026\u0026(Ye=t.RG8UI),ke===t.UNSIGNED_SHORT\u0026\u0026(Ye=t.RG16UI),ke===t.UNSIGNED_INT\u0026\u0026(Ye=t.RG32UI),ke===t.BYTE\u0026\u0026(Ye=t.RG8I),ke===t.SHORT\u0026\u0026(Ye=t.RG16I),ke===t.INT\u0026\u0026(Ye=t.RG32I)),Ee===t.RGB\u0026\u0026ke===t.UNSIGNED_INT_5_9_9_9_REV\u0026\u0026(Ye=t.RGB9_E5),Ee===t.RGBA){const tt=Le?Ede:iu.getTransfer(Ce);ke===t.FLOAT\u0026\u0026(Ye=t.RGBA32F),ke===t.HALF_FLOAT\u0026\u0026(Ye=t.RGBA16F),ke===t.UNSIGNED_BYTE\u0026\u0026(Ye=tt===Ed?t.SRGB8_ALPHA8:t.RGBA8),ke===t.UNSIGNED_SHORT_4_4_4_4\u0026\u0026(Ye=t.RGBA4),ke===t.UNSIGNED_SHORT_5_5_5_1\u0026\u0026(Ye=t.RGB5_A1)}return(Ye===t.R16F||Ye===t.R32F||Ye===t.RG16F||Ye===t.RG32F||Ye===t.RGBA16F||Ye===t.RGBA32F)\u0026\u0026e.get(\"EXT_color_buffer_float\"),Ye}function I(Re,Ee){let ke;return Re?Ee===null||Ee===MG||Ee===DG?ke=t.DEPTH24_STENCIL8:Ee===m6?ke=t.DEPTH32F_STENCIL8:Ee===Cde\u0026\u0026(ke=t.DEPTH24_STENCIL8,console.warn(\"DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.\")):Ee===null||Ee===MG||Ee===DG?ke=t.DEPTH_COMPONENT24:Ee===m6?ke=t.DEPTH_COMPONENT32F:Ee===Cde\u0026\u0026(ke=t.DEPTH_COMPONENT16),ke}function C(Re,Ee){return m(Re)===!0||Re.isFramebufferTexture\u0026\u0026Re.minFilter!==wC\u0026\u0026Re.minFilter!==Fl?Math.log2(Math.max(Ee.width,Ee.height))+1:Re.mipmaps!==void 0\u0026\u0026Re.mipmaps.length\u003e0?Re.mipmaps.length:Re.isCompressedTexture\u0026\u0026Array.isArray(Re.image)?Ee.mipmaps.length:1}function y(Re){const Ee=Re.target;Ee.removeEventListener(\"dispose\",y),E(Ee),Ee.isVideoTexture\u0026\u0026l.delete(Ee)}function x(Re){const Ee=Re.target;Ee.removeEventListener(\"dispose\",x),S(Ee)}function E(Re){const Ee=o.get(Re);if(Ee.__webglInit===void 0)return;const ke=Re.source,Ce=g.get(ke);if(Ce){const Le=Ce[Ee.__cacheKey];Le.usedTimes--,Le.usedTimes===0\u0026\u0026B(Re),Object.keys(Ce).length===0\u0026\u0026g.delete(ke)}o.remove(Re)}function B(Re){const Ee=o.get(Re);t.deleteTexture(Ee.__webglTexture);const ke=Re.source,Ce=g.get(ke);delete Ce[Ee.__cacheKey],s.memory.textures--}function S(Re){const Ee=o.get(Re);if(Re.depthTexture\u0026\u0026Re.depthTexture.dispose(),Re.isWebGLCubeRenderTarget)for(let Ce=0;Ce\u003c6;Ce++){if(Array.isArray(Ee.__webglFramebuffer[Ce]))for(let Le=0;Le\u003cEe.__webglFramebuffer[Ce].length;Le++)t.deleteFramebuffer(Ee.__webglFramebuffer[Ce][Le]);else t.deleteFramebuffer(Ee.__webglFramebuffer[Ce]);Ee.__webglDepthbuffer\u0026\u0026t.deleteRenderbuffer(Ee.__webglDepthbuffer[Ce])}else{if(Array.isArray(Ee.__webglFramebuffer))for(let Ce=0;Ce\u003cEe.__webglFramebuffer.length;Ce++)t.deleteFramebuffer(Ee.__webglFramebuffer[Ce]);else t.deleteFramebuffer(Ee.__webglFramebuffer);if(Ee.__webglDepthbuffer\u0026\u0026t.deleteRenderbuffer(Ee.__webglDepthbuffer),Ee.__webglMultisampledFramebuffer\u0026\u0026t.deleteFramebuffer(Ee.__webglMultisampledFramebuffer),Ee.__webglColorRenderbuffer)for(let Ce=0;Ce\u003cEe.__webglColorRenderbuffer.length;Ce++)Ee.__webglColorRenderbuffer[Ce]\u0026\u0026t.deleteRenderbuffer(Ee.__webglColorRenderbuffer[Ce]);Ee.__webglDepthRenderbuffer\u0026\u0026t.deleteRenderbuffer(Ee.__webglDepthRenderbuffer)}const ke=Re.textures;for(let Ce=0,Le=ke.length;Ce\u003cLe;Ce++){const Ye=o.get(ke[Ce]);Ye.__webglTexture\u0026\u0026(t.deleteTexture(Ye.__webglTexture),s.memory.textures--),o.remove(ke[Ce])}o.remove(Re)}let Q=0;function w(){Q=0}function M(){const Re=Q;return Re\u003e=i.maxTextures\u0026\u0026console.warn(\"THREE.WebGLTextures: Trying to use \"+Re+\" texture units while this GPU supports only \"+i.maxTextures),Q+=1,Re}function k(Re){const Ee=[];return Ee.push(Re.wrapS),Ee.push(Re.wrapT),Ee.push(Re.wrapR||0),Ee.push(Re.magFilter),Ee.push(Re.minFilter),Ee.push(Re.anisotropy),Ee.push(Re.internalFormat),Ee.push(Re.format),Ee.push(Re.type),Ee.push(Re.generateMipmaps),Ee.push(Re.premultiplyAlpha),Ee.push(Re.flipY),Ee.push(Re.unpackAlignment),Ee.push(Re.colorSpace),Ee.join()}function R(Re,Ee){const ke=o.get(Re);if(Re.isVideoTexture\u0026\u0026Pe(Re),Re.isRenderTargetTexture===!1\u0026\u0026Re.version\u003e0\u0026\u0026ke.__version!==Re.version){const Ce=Re.image;if(Ce===null)console.warn(\"THREE.WebGLRenderer: Texture marked for update but no image data found.\");else if(Ce.complete===!1)console.warn(\"THREE.WebGLRenderer: Texture marked for update but image is incomplete\");else{oe(ke,Re,Ee);return}}n.bindTexture(t.TEXTURE_2D,ke.__webglTexture,t.TEXTURE0+Ee)}function F(Re,Ee){const ke=o.get(Re);if(Re.version\u003e0\u0026\u0026ke.__version!==Re.version){oe(ke,Re,Ee);return}n.bindTexture(t.TEXTURE_2D_ARRAY,ke.__webglTexture,t.TEXTURE0+Ee)}function O(Re,Ee){const ke=o.get(Re);if(Re.version\u003e0\u0026\u0026ke.__version!==Re.version){oe(ke,Re,Ee);return}n.bindTexture(t.TEXTURE_3D,ke.__webglTexture,t.TEXTURE0+Ee)}function U(Re,Ee){const ke=o.get(Re);if(Re.version\u003e0\u0026\u0026ke.__version!==Re.version){ie(ke,Re,Ee);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ke.__webglTexture,t.TEXTURE0+Ee)}const Y={[c4]:t.REPEAT,[Xy]:t.CLAMP_TO_EDGE,[Tq]:t.MIRRORED_REPEAT},W={[wC]:t.NEAREST,[JRe]:t.NEAREST_MIPMAP_NEAREST,[PG]:t.NEAREST_MIPMAP_LINEAR,[Fl]:t.LINEAR,[kq]:t.LINEAR_MIPMAP_NEAREST,[gm]:t.LINEAR_MIPMAP_LINEAR},te={[Zjo]:t.NEVER,[r$o]:t.ALWAYS,[e$o]:t.LESS,[fVt]:t.LEQUAL,[t$o]:t.EQUAL,[i$o]:t.GEQUAL,[n$o]:t.GREATER,[o$o]:t.NOTEQUAL};function j(Re,Ee){if(Ee.type===m6\u0026\u0026e.has(\"OES_texture_float_linear\")===!1\u0026\u0026(Ee.magFilter===Fl||Ee.magFilter===kq||Ee.magFilter===PG||Ee.magFilter===gm||Ee.minFilter===Fl||Ee.minFilter===kq||Ee.minFilter===PG||Ee.minFilter===gm)\u0026\u0026console.warn(\"THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.\"),t.texParameteri(Re,t.TEXTURE_WRAP_S,Y[Ee.wrapS]),t.texParameteri(Re,t.TEXTURE_WRAP_T,Y[Ee.wrapT]),(Re===t.TEXTURE_3D||Re===t.TEXTURE_2D_ARRAY)\u0026\u0026t.texParameteri(Re,t.TEXTURE_WRAP_R,Y[Ee.wrapR]),t.texParameteri(Re,t.TEXTURE_MAG_FILTER,W[Ee.magFilter]),t.texParameteri(Re,t.TEXTURE_MIN_FILTER,W[Ee.minFilter]),Ee.compareFunction\u0026\u0026(t.texParameteri(Re,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(Re,t.TEXTURE_COMPARE_FUNC,te[Ee.compareFunction])),e.has(\"EXT_texture_filter_anisotropic\")===!0){if(Ee.magFilter===wC||Ee.minFilter!==PG\u0026\u0026Ee.minFilter!==gm||Ee.type===m6\u0026\u0026e.has(\"OES_texture_float_linear\")===!1)return;if(Ee.anisotropy\u003e1||o.get(Ee).__currentAnisotropy){const ke=e.get(\"EXT_texture_filter_anisotropic\");t.texParameterf(Re,ke.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Ee.anisotropy,i.getMaxAnisotropy())),o.get(Ee).__currentAnisotropy=Ee.anisotropy}}}function J(Re,Ee){let ke=!1;Re.__webglInit===void 0\u0026\u0026(Re.__webglInit=!0,Ee.addEventListener(\"dispose\",y));const Ce=Ee.source;let Le=g.get(Ce);Le===void 0\u0026\u0026(Le={},g.set(Ce,Le));const Ye=k(Ee);if(Ye!==Re.__cacheKey){Le[Ye]===void 0\u0026\u0026(Le[Ye]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,ke=!0),Le[Ye].usedTimes++;const tt=Le[Re.__cacheKey];tt!==void 0\u0026\u0026(Le[Re.__cacheKey].usedTimes--,tt.usedTimes===0\u0026\u0026B(Ee)),Re.__cacheKey=Ye,Re.__webglTexture=Le[Ye].texture}return ke}function oe(Re,Ee,ke){let Ce=t.TEXTURE_2D;(Ee.isDataArrayTexture||Ee.isCompressedArrayTexture)\u0026\u0026(Ce=t.TEXTURE_2D_ARRAY),Ee.isData3DTexture\u0026\u0026(Ce=t.TEXTURE_3D);const Le=J(Re,Ee),Ye=Ee.source;n.bindTexture(Ce,Re.__webglTexture,t.TEXTURE0+ke);const tt=o.get(Ye);if(Ye.version!==tt.__version||Le===!0){n.activeTexture(t.TEXTURE0+ke);const At=iu.getPrimaries(iu.workingColorSpace),at=Ee.colorSpace===_6?null:iu.getPrimaries(Ee.colorSpace),nt=Ee.colorSpace===_6||At===at?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,Ee.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ee.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,Ee.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,nt);let gt=p(Ee.image,!1,i.maxTextureSize);gt=we(Ee,gt);const bt=r.convert(Ee.format,Ee.colorSpace),Ct=r.convert(Ee.type);let Dt=f(Ee.internalFormat,bt,Ct,Ee.colorSpace,Ee.isVideoTexture);j(Ce,Ee);let kt;const it=Ee.mipmaps,Yt=Ee.isVideoTexture!==!0,pn=tt.__version===void 0||Le===!0,be=Ye.dataReady,et=C(Ee,gt);if(Ee.isDepthTexture)Dt=I(Ee.format===RG,Ee.type),pn\u0026\u0026(Yt?n.texStorage2D(t.TEXTURE_2D,1,Dt,gt.width,gt.height):n.texImage2D(t.TEXTURE_2D,0,Dt,gt.width,gt.height,0,bt,Ct,null));else if(Ee.isDataTexture)if(it.length\u003e0){Yt\u0026\u0026pn\u0026\u0026n.texStorage2D(t.TEXTURE_2D,et,Dt,it[0].width,it[0].height);for(let It=0,Bt=it.length;It\u003cBt;It++)kt=it[It],Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_2D,It,0,0,kt.width,kt.height,bt,Ct,kt.data):n.texImage2D(t.TEXTURE_2D,It,Dt,kt.width,kt.height,0,bt,Ct,kt.data);Ee.generateMipmaps=!1}else Yt?(pn\u0026\u0026n.texStorage2D(t.TEXTURE_2D,et,Dt,gt.width,gt.height),be\u0026\u0026n.texSubImage2D(t.TEXTURE_2D,0,0,0,gt.width,gt.height,bt,Ct,gt.data)):n.texImage2D(t.TEXTURE_2D,0,Dt,gt.width,gt.height,0,bt,Ct,gt.data);else if(Ee.isCompressedTexture)if(Ee.isCompressedArrayTexture){Yt\u0026\u0026pn\u0026\u0026n.texStorage3D(t.TEXTURE_2D_ARRAY,et,Dt,it[0].width,it[0].height,gt.depth);for(let It=0,Bt=it.length;It\u003cBt;It++)if(kt=it[It],Ee.format!==l4)if(bt!==null)if(Yt){if(be)if(Ee.layerUpdates.size\u003e0){for(const mt of Ee.layerUpdates){const st=kt.width*kt.height;n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,It,0,0,mt,kt.width,kt.height,1,bt,kt.data.slice(st*mt,st*(mt+1)),0,0)}Ee.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,It,0,0,0,kt.width,kt.height,gt.depth,bt,kt.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,It,Dt,kt.width,kt.height,gt.depth,0,kt.data,0,0);else console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\");else Yt?be\u0026\u0026n.texSubImage3D(t.TEXTURE_2D_ARRAY,It,0,0,0,kt.width,kt.height,gt.depth,bt,Ct,kt.data):n.texImage3D(t.TEXTURE_2D_ARRAY,It,Dt,kt.width,kt.height,gt.depth,0,bt,Ct,kt.data)}else{Yt\u0026\u0026pn\u0026\u0026n.texStorage2D(t.TEXTURE_2D,et,Dt,it[0].width,it[0].height);for(let It=0,Bt=it.length;It\u003cBt;It++)kt=it[It],Ee.format!==l4?bt!==null?Yt?be\u0026\u0026n.compressedTexSubImage2D(t.TEXTURE_2D,It,0,0,kt.width,kt.height,bt,kt.data):n.compressedTexImage2D(t.TEXTURE_2D,It,Dt,kt.width,kt.height,0,kt.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()\"):Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_2D,It,0,0,kt.width,kt.height,bt,Ct,kt.data):n.texImage2D(t.TEXTURE_2D,It,Dt,kt.width,kt.height,0,bt,Ct,kt.data)}else if(Ee.isDataArrayTexture)if(Yt){if(pn\u0026\u0026n.texStorage3D(t.TEXTURE_2D_ARRAY,et,Dt,gt.width,gt.height,gt.depth),be)if(Ee.layerUpdates.size\u003e0){let It;switch(Ct){case t.UNSIGNED_BYTE:switch(bt){case t.ALPHA:It=1;break;case t.LUMINANCE:It=1;break;case t.LUMINANCE_ALPHA:It=2;break;case t.RGB:It=3;break;case t.RGBA:It=4;break;default:throw new Error(`Unknown texel size for format ${bt}.`)}break;case t.UNSIGNED_SHORT_4_4_4_4:case t.UNSIGNED_SHORT_5_5_5_1:case t.UNSIGNED_SHORT_5_6_5:It=1;break;default:throw new Error(`Unknown texel size for type ${Ct}.`)}const Bt=gt.width*gt.height*It;for(const mt of Ee.layerUpdates)n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,mt,gt.width,gt.height,1,bt,Ct,gt.data.slice(Bt*mt,Bt*(mt+1)));Ee.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,gt.width,gt.height,gt.depth,bt,Ct,gt.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Dt,gt.width,gt.height,gt.depth,0,bt,Ct,gt.data);else if(Ee.isData3DTexture)Yt?(pn\u0026\u0026n.texStorage3D(t.TEXTURE_3D,et,Dt,gt.width,gt.height,gt.depth),be\u0026\u0026n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,gt.width,gt.height,gt.depth,bt,Ct,gt.data)):n.texImage3D(t.TEXTURE_3D,0,Dt,gt.width,gt.height,gt.depth,0,bt,Ct,gt.data);else if(Ee.isFramebufferTexture){if(pn)if(Yt)n.texStorage2D(t.TEXTURE_2D,et,Dt,gt.width,gt.height);else{let It=gt.width,Bt=gt.height;for(let mt=0;mt\u003cet;mt++)n.texImage2D(t.TEXTURE_2D,mt,Dt,It,Bt,0,bt,Ct,null),It\u003e\u003e=1,Bt\u003e\u003e=1}}else if(it.length\u003e0){if(Yt\u0026\u0026pn){const It=Te(it[0]);n.texStorage2D(t.TEXTURE_2D,et,Dt,It.width,It.height)}for(let It=0,Bt=it.length;It\u003cBt;It++)kt=it[It],Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_2D,It,0,0,bt,Ct,kt):n.texImage2D(t.TEXTURE_2D,It,Dt,bt,Ct,kt);Ee.generateMipmaps=!1}else if(Yt){if(pn){const It=Te(gt);n.texStorage2D(t.TEXTURE_2D,et,Dt,It.width,It.height)}be\u0026\u0026n.texSubImage2D(t.TEXTURE_2D,0,0,0,bt,Ct,gt)}else n.texImage2D(t.TEXTURE_2D,0,Dt,bt,Ct,gt);m(Ee)\u0026\u0026_(Ce),tt.__version=Ye.version,Ee.onUpdate\u0026\u0026Ee.onUpdate(Ee)}Re.__version=Ee.version}function ie(Re,Ee,ke){if(Ee.image.length!==6)return;const Ce=J(Re,Ee),Le=Ee.source;n.bindTexture(t.TEXTURE_CUBE_MAP,Re.__webglTexture,t.TEXTURE0+ke);const Ye=o.get(Le);if(Le.version!==Ye.__version||Ce===!0){n.activeTexture(t.TEXTURE0+ke);const tt=iu.getPrimaries(iu.workingColorSpace),At=Ee.colorSpace===_6?null:iu.getPrimaries(Ee.colorSpace),at=Ee.colorSpace===_6||tt===At?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,Ee.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ee.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,Ee.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,at);const nt=Ee.isCompressedTexture||Ee.image[0].isCompressedTexture,gt=Ee.image[0]\u0026\u0026Ee.image[0].isDataTexture,bt=[];for(let Bt=0;Bt\u003c6;Bt++)!nt\u0026\u0026!gt?bt[Bt]=p(Ee.image[Bt],!0,i.maxCubemapSize):bt[Bt]=gt?Ee.image[Bt].image:Ee.image[Bt],bt[Bt]=we(Ee,bt[Bt]);const Ct=bt[0],Dt=r.convert(Ee.format,Ee.colorSpace),kt=r.convert(Ee.type),it=f(Ee.internalFormat,Dt,kt,Ee.colorSpace),Yt=Ee.isVideoTexture!==!0,pn=Ye.__version===void 0||Ce===!0,be=Le.dataReady;let et=C(Ee,Ct);j(t.TEXTURE_CUBE_MAP,Ee);let It;if(nt){Yt\u0026\u0026pn\u0026\u0026n.texStorage2D(t.TEXTURE_CUBE_MAP,et,it,Ct.width,Ct.height);for(let Bt=0;Bt\u003c6;Bt++){It=bt[Bt].mipmaps;for(let mt=0;mt\u003cIt.length;mt++){const st=It[mt];Ee.format!==l4?Dt!==null?Yt?be\u0026\u0026n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,0,0,st.width,st.height,Dt,st.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,it,st.width,st.height,0,st.data):console.warn(\"THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()\"):Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,0,0,st.width,st.height,Dt,kt,st.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,it,st.width,st.height,0,Dt,kt,st.data)}}}else{if(It=Ee.mipmaps,Yt\u0026\u0026pn){It.length\u003e0\u0026\u0026et++;const Bt=Te(bt[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,et,it,Bt.width,Bt.height)}for(let Bt=0;Bt\u003c6;Bt++)if(gt){Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,0,0,bt[Bt].width,bt[Bt].height,Dt,kt,bt[Bt].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,it,bt[Bt].width,bt[Bt].height,0,Dt,kt,bt[Bt].data);for(let mt=0;mt\u003cIt.length;mt++){const xt=It[mt].image[Bt].image;Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,0,0,xt.width,xt.height,Dt,kt,xt.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,it,xt.width,xt.height,0,Dt,kt,xt.data)}}else{Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,0,0,Dt,kt,bt[Bt]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,it,Dt,kt,bt[Bt]);for(let mt=0;mt\u003cIt.length;mt++){const st=It[mt];Yt?be\u0026\u0026n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,0,0,Dt,kt,st.image[Bt]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,it,Dt,kt,st.image[Bt])}}}m(Ee)\u0026\u0026_(t.TEXTURE_CUBE_MAP),Ye.__version=Le.version,Ee.onUpdate\u0026\u0026Ee.onUpdate(Ee)}Re.__version=Ee.version}function ne(Re,Ee,ke,Ce,Le,Ye){const tt=r.convert(ke.format,ke.colorSpace),At=r.convert(ke.type),at=f(ke.internalFormat,tt,At,ke.colorSpace);if(!o.get(Ee).__hasExternalTextures){const gt=Math.max(1,Ee.width\u003e\u003eYe),bt=Math.max(1,Ee.height\u003e\u003eYe);Le===t.TEXTURE_3D||Le===t.TEXTURE_2D_ARRAY?n.texImage3D(Le,Ye,at,gt,bt,Ee.depth,0,tt,At,null):n.texImage2D(Le,Ye,at,gt,bt,0,tt,At,null)}n.bindFramebuffer(t.FRAMEBUFFER,Re),Qe(Ee)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Ce,Le,o.get(ke).__webglTexture,0,he(Ee)):(Le===t.TEXTURE_2D||Le\u003e=t.TEXTURE_CUBE_MAP_POSITIVE_X\u0026\u0026Le\u003c=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)\u0026\u0026t.framebufferTexture2D(t.FRAMEBUFFER,Ce,Le,o.get(ke).__webglTexture,Ye),n.bindFramebuffer(t.FRAMEBUFFER,null)}function le(Re,Ee,ke){if(t.bindRenderbuffer(t.RENDERBUFFER,Re),Ee.depthBuffer){const Ce=Ee.depthTexture,Le=Ce\u0026\u0026Ce.isDepthTexture?Ce.type:null,Ye=I(Ee.stencilBuffer,Le),tt=Ee.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,At=he(Ee);Qe(Ee)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,At,Ye,Ee.width,Ee.height):ke?t.renderbufferStorageMultisample(t.RENDERBUFFER,At,Ye,Ee.width,Ee.height):t.renderbufferStorage(t.RENDERBUFFER,Ye,Ee.width,Ee.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,tt,t.RENDERBUFFER,Re)}else{const Ce=Ee.textures;for(let Le=0;Le\u003cCe.length;Le++){const Ye=Ce[Le],tt=r.convert(Ye.format,Ye.colorSpace),At=r.convert(Ye.type),at=f(Ye.internalFormat,tt,At,Ye.colorSpace),nt=he(Ee);ke\u0026\u0026Qe(Ee)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,nt,at,Ee.width,Ee.height):Qe(Ee)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,nt,at,Ee.width,Ee.height):t.renderbufferStorage(t.RENDERBUFFER,at,Ee.width,Ee.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function ge(Re,Ee){if(Ee\u0026\u0026Ee.isWebGLCubeRenderTarget)throw new Error(\"Depth Texture with cube render targets is not supported\");if(n.bindFramebuffer(t.FRAMEBUFFER,Re),!(Ee.depthTexture\u0026\u0026Ee.depthTexture.isDepthTexture))throw new Error(\"renderTarget.depthTexture must be an instance of THREE.DepthTexture\");(!o.get(Ee.depthTexture).__webglTexture||Ee.depthTexture.image.width!==Ee.width||Ee.depthTexture.image.height!==Ee.height)\u0026\u0026(Ee.depthTexture.image.width=Ee.width,Ee.depthTexture.image.height=Ee.height,Ee.depthTexture.needsUpdate=!0),R(Ee.depthTexture,0);const Ce=o.get(Ee.depthTexture).__webglTexture,Le=he(Ee);if(Ee.depthTexture.format===NG)Qe(Ee)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Ce,0,Le):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Ce,0);else if(Ee.depthTexture.format===RG)Qe(Ee)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Ce,0,Le):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Ce,0);else throw new Error(\"Unknown depthTexture format\")}function _e(Re){const Ee=o.get(Re),ke=Re.isWebGLCubeRenderTarget===!0;if(Re.depthTexture\u0026\u0026!Ee.__autoAllocateDepthBuffer){if(ke)throw new Error(\"target.depthTexture not supported in Cube render targets\");ge(Ee.__webglFramebuffer,Re)}else if(ke){Ee.__webglDepthbuffer=[];for(let Ce=0;Ce\u003c6;Ce++)n.bindFramebuffer(t.FRAMEBUFFER,Ee.__webglFramebuffer[Ce]),Ee.__webglDepthbuffer[Ce]=t.createRenderbuffer(),le(Ee.__webglDepthbuffer[Ce],Re,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,Ee.__webglFramebuffer),Ee.__webglDepthbuffer=t.createRenderbuffer(),le(Ee.__webglDepthbuffer,Re,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function ue(Re,Ee,ke){const Ce=o.get(Re);Ee!==void 0\u0026\u0026ne(Ce.__webglFramebuffer,Re,Re.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ke!==void 0\u0026\u0026_e(Re)}function fe(Re){const Ee=Re.texture,ke=o.get(Re),Ce=o.get(Ee);Re.addEventListener(\"dispose\",x);const Le=Re.textures,Ye=Re.isWebGLCubeRenderTarget===!0,tt=Le.length\u003e1;if(tt||(Ce.__webglTexture===void 0\u0026\u0026(Ce.__webglTexture=t.createTexture()),Ce.__version=Ee.version,s.memory.textures++),Ye){ke.__webglFramebuffer=[];for(let At=0;At\u003c6;At++)if(Ee.mipmaps\u0026\u0026Ee.mipmaps.length\u003e0){ke.__webglFramebuffer[At]=[];for(let at=0;at\u003cEe.mipmaps.length;at++)ke.__webglFramebuffer[At][at]=t.createFramebuffer()}else ke.__webglFramebuffer[At]=t.createFramebuffer()}else{if(Ee.mipmaps\u0026\u0026Ee.mipmaps.length\u003e0){ke.__webglFramebuffer=[];for(let At=0;At\u003cEe.mipmaps.length;At++)ke.__webglFramebuffer[At]=t.createFramebuffer()}else ke.__webglFramebuffer=t.createFramebuffer();if(tt)for(let At=0,at=Le.length;At\u003cat;At++){const nt=o.get(Le[At]);nt.__webglTexture===void 0\u0026\u0026(nt.__webglTexture=t.createTexture(),s.memory.textures++)}if(Re.samples\u003e0\u0026\u0026Qe(Re)===!1){ke.__webglMultisampledFramebuffer=t.createFramebuffer(),ke.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ke.__webglMultisampledFramebuffer);for(let At=0;At\u003cLe.length;At++){const at=Le[At];ke.__webglColorRenderbuffer[At]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,ke.__webglColorRenderbuffer[At]);const nt=r.convert(at.format,at.colorSpace),gt=r.convert(at.type),bt=f(at.internalFormat,nt,gt,at.colorSpace,Re.isXRRenderTarget===!0),Ct=he(Re);t.renderbufferStorageMultisample(t.RENDERBUFFER,Ct,bt,Re.width,Re.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+At,t.RENDERBUFFER,ke.__webglColorRenderbuffer[At])}t.bindRenderbuffer(t.RENDERBUFFER,null),Re.depthBuffer\u0026\u0026(ke.__webglDepthRenderbuffer=t.createRenderbuffer(),le(ke.__webglDepthRenderbuffer,Re,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(Ye){n.bindTexture(t.TEXTURE_CUBE_MAP,Ce.__webglTexture),j(t.TEXTURE_CUBE_MAP,Ee);for(let At=0;At\u003c6;At++)if(Ee.mipmaps\u0026\u0026Ee.mipmaps.length\u003e0)for(let at=0;at\u003cEe.mipmaps.length;at++)ne(ke.__webglFramebuffer[At][at],Re,Ee,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+At,at);else ne(ke.__webglFramebuffer[At],Re,Ee,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+At,0);m(Ee)\u0026\u0026_(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(tt){for(let At=0,at=Le.length;At\u003cat;At++){const nt=Le[At],gt=o.get(nt);n.bindTexture(t.TEXTURE_2D,gt.__webglTexture),j(t.TEXTURE_2D,nt),ne(ke.__webglFramebuffer,Re,nt,t.COLOR_ATTACHMENT0+At,t.TEXTURE_2D,0),m(nt)\u0026\u0026_(t.TEXTURE_2D)}n.unbindTexture()}else{let At=t.TEXTURE_2D;if((Re.isWebGL3DRenderTarget||Re.isWebGLArrayRenderTarget)\u0026\u0026(At=Re.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(At,Ce.__webglTexture),j(At,Ee),Ee.mipmaps\u0026\u0026Ee.mipmaps.length\u003e0)for(let at=0;at\u003cEe.mipmaps.length;at++)ne(ke.__webglFramebuffer[at],Re,Ee,t.COLOR_ATTACHMENT0,At,at);else ne(ke.__webglFramebuffer,Re,Ee,t.COLOR_ATTACHMENT0,At,0);m(Ee)\u0026\u0026_(At),n.unbindTexture()}Re.depthBuffer\u0026\u0026_e(Re)}function pe(Re){const Ee=Re.textures;for(let ke=0,Ce=Ee.length;ke\u003cCe;ke++){const Le=Ee[ke];if(m(Le)){const Ye=Re.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,tt=o.get(Le).__webglTexture;n.bindTexture(Ye,tt),_(Ye),n.unbindTexture()}}}const ye=[],Me=[];function ve(Re){if(Re.samples\u003e0){if(Qe(Re)===!1){const Ee=Re.textures,ke=Re.width,Ce=Re.height;let Le=t.COLOR_BUFFER_BIT;const Ye=Re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,tt=o.get(Re),At=Ee.length\u003e1;if(At)for(let at=0;at\u003cEe.length;at++)n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,tt.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,tt.__webglFramebuffer);for(let at=0;at\u003cEe.length;at++){if(Re.resolveDepthBuffer\u0026\u0026(Re.depthBuffer\u0026\u0026(Le|=t.DEPTH_BUFFER_BIT),Re.stencilBuffer\u0026\u0026Re.resolveStencilBuffer\u0026\u0026(Le|=t.STENCIL_BUFFER_BIT)),At){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,tt.__webglColorRenderbuffer[at]);const nt=o.get(Ee[at]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,nt,0)}t.blitFramebuffer(0,0,ke,Ce,0,0,ke,Ce,Le,t.NEAREST),A===!0\u0026\u0026(ye.length=0,Me.length=0,ye.push(t.COLOR_ATTACHMENT0+at),Re.depthBuffer\u0026\u0026Re.resolveDepthBuffer===!1\u0026\u0026(ye.push(Ye),Me.push(Ye),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,Me)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,ye))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),At)for(let at=0;at\u003cEe.length;at++){n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.RENDERBUFFER,tt.__webglColorRenderbuffer[at]);const nt=o.get(Ee[at]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.TEXTURE_2D,nt,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,tt.__webglMultisampledFramebuffer)}else if(Re.depthBuffer\u0026\u0026Re.resolveDepthBuffer===!1\u0026\u0026A){const Ee=Re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[Ee])}}}function he(Re){return Math.min(i.maxSamples,Re.samples)}function Qe(Re){const Ee=o.get(Re);return Re.samples\u003e0\u0026\u0026e.has(\"WEBGL_multisampled_render_to_texture\")===!0\u0026\u0026Ee.__useRenderToTexture!==!1}function Pe(Re){const Ee=s.render.frame;l.get(Re)!==Ee\u0026\u0026(l.set(Re,Ee),Re.update())}function we(Re,Ee){const ke=Re.colorSpace,Ce=Re.format,Le=Re.type;return Re.isCompressedTexture===!0||Re.isVideoTexture===!0||ke!==jw\u0026\u0026ke!==_6\u0026\u0026(iu.getTransfer(ke)===Ed?(Ce!==l4||Le!==Ww)\u0026\u0026console.warn(\"THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.\"):console.error(\"THREE.WebGLTextures: Unsupported texture color space:\",ke)),Ee}function Te(Re){return typeof HTMLImageElement\u003c\"u\"\u0026\u0026Re instanceof HTMLImageElement?(c.width=Re.naturalWidth||Re.width,c.height=Re.naturalHeight||Re.height):typeof VideoFrame\u003c\"u\"\u0026\u0026Re instanceof VideoFrame?(c.width=Re.displayWidth,c.height=Re.displayHeight):(c.width=Re.width,c.height=Re.height),c}this.allocateTextureUnit=M,this.resetTextureUnits=w,this.setTexture2D=R,this.setTexture2DArray=F,this.setTexture3D=O,this.setTextureCube=U,this.rebindTextures=ue,this.setupRenderTarget=fe,this.updateRenderTargetMipmap=pe,this.updateMultisampleRenderTarget=ve,this.setupDepthRenderbuffer=_e,this.setupFrameBufferTexture=ne,this.useMultisampledRTT=Qe}function Fei(t,e){function n(o,i=_6){let r;const s=iu.getTransfer(i);if(o===Ww)return t.UNSIGNED_BYTE;if(o===RKt)return t.UNSIGNED_SHORT_4_4_4_4;if(o===TKt)return t.UNSIGNED_SHORT_5_5_5_1;if(o===Yjo)return t.UNSIGNED_INT_5_9_9_9_REV;if(o===Ojo)return t.BYTE;if(o===Gjo)return t.SHORT;if(o===Cde)return t.UNSIGNED_SHORT;if(o===NKt)return t.INT;if(o===MG)return t.UNSIGNED_INT;if(o===m6)return t.FLOAT;if(o===yde)return t.HALF_FLOAT;if(o===Ujo)return t.ALPHA;if(o===Kjo)return t.RGB;if(o===l4)return t.RGBA;if(o===Vjo)return t.LUMINANCE;if(o===zjo)return t.LUMINANCE_ALPHA;if(o===NG)return t.DEPTH_COMPONENT;if(o===RG)return t.DEPTH_STENCIL;if(o===kKt)return t.RED;if(o===FKt)return t.RED_INTEGER;if(o===Jjo)return t.RG;if(o===LKt)return t.RG_INTEGER;if(o===HKt)return t.RGBA_INTEGER;if(o===WRe||o===jRe||o===$Re||o===qRe)if(s===Ed)if(r=e.get(\"WEBGL_compressed_texture_s3tc_srgb\"),r!==null){if(o===WRe)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===jRe)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===$Re)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===qRe)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get(\"WEBGL_compressed_texture_s3tc\"),r!==null){if(o===WRe)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===jRe)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===$Re)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===qRe)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===OKt||o===GKt||o===YKt||o===UKt)if(r=e.get(\"WEBGL_compressed_texture_pvrtc\"),r!==null){if(o===OKt)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===GKt)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===YKt)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===UKt)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===KKt||o===VKt||o===zKt)if(r=e.get(\"WEBGL_compressed_texture_etc\"),r!==null){if(o===KKt||o===VKt)return s===Ed?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(o===zKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===JKt||o===WKt||o===jKt||o===$Kt||o===qKt||o===XKt||o===ZKt||o===eVt||o===tVt||o===nVt||o===oVt||o===iVt||o===rVt||o===sVt)if(r=e.get(\"WEBGL_compressed_texture_astc\"),r!==null){if(o===JKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===WKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===jKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===$Kt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===qKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===XKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===ZKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===eVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===tVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===nVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===oVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===iVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===rVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===sVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===XRe||o===aVt||o===AVt)if(r=e.get(\"EXT_texture_compression_bptc\"),r!==null){if(o===XRe)return s===Ed?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===aVt)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===AVt)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===Wjo||o===cVt||o===lVt||o===uVt)if(r=e.get(\"EXT_texture_compression_rgtc\"),r!==null){if(o===XRe)return r.COMPRESSED_RED_RGTC1_EXT;if(o===cVt)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===lVt)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===uVt)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===DG?t.UNSIGNED_INT_24_8:t[o]!==void 0?t[o]:null}return{convert:n}}class Lei extends sf{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class lh extends T0{constructor(){super(),this.isGroup=!0,this.type=\"Group\"}}const Hei={type:\"move\"};class kTe{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null\u0026\u0026(this._hand=new lh,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null\u0026\u0026(this._targetRay=new lh,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new jt,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new jt),this._targetRay}getGripSpace(){return this._grip===null\u0026\u0026(this._grip=new lh,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new jt,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new jt),this._grip}dispatchEvent(e){return this._targetRay!==null\u0026\u0026this._targetRay.dispatchEvent(e),this._grip!==null\u0026\u0026this._grip.dispatchEvent(e),this._hand!==null\u0026\u0026this._hand.dispatchEvent(e),this}connect(e){if(e\u0026\u0026e.hand){const n=this._hand;if(n)for(const o of e.hand.values())this._getHandJoint(n,o)}return this.dispatchEvent({type:\"connected\",data:e}),this}disconnect(e){return this.dispatchEvent({type:\"disconnected\",data:e}),this._targetRay!==null\u0026\u0026(this._targetRay.visible=!1),this._grip!==null\u0026\u0026(this._grip.visible=!1),this._hand!==null\u0026\u0026(this._hand.visible=!1),this}update(e,n,o){let i=null,r=null,s=null;const a=this._targetRay,A=this._grip,c=this._hand;if(e\u0026\u0026n.session.visibilityState!==\"visible-blurred\"){if(c\u0026\u0026e.hand){s=!0;for(const p of e.hand.values()){const m=n.getJointPose(p,o),_=this._getHandJoint(c,p);m!==null\u0026\u0026(_.matrix.fromArray(m.transform.matrix),_.matrix.decompose(_.position,_.rotation,_.scale),_.matrixWorldNeedsUpdate=!0,_.jointRadius=m.radius),_.visible=m!==null}const l=c.joints[\"index-finger-tip\"],u=c.joints[\"thumb-tip\"],g=l.position.distanceTo(u.position),h=.02,d=.005;c.inputState.pinching\u0026\u0026g\u003eh+d?(c.inputState.pinching=!1,this.dispatchEvent({type:\"pinchend\",handedness:e.handedness,target:this})):!c.inputState.pinching\u0026\u0026g\u003c=h-d\u0026\u0026(c.inputState.pinching=!0,this.dispatchEvent({type:\"pinchstart\",handedness:e.handedness,target:this}))}else A!==null\u0026\u0026e.gripSpace\u0026\u0026(r=n.getPose(e.gripSpace,o),r!==null\u0026\u0026(A.matrix.fromArray(r.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),A.matrixWorldNeedsUpdate=!0,r.linearVelocity?(A.hasLinearVelocity=!0,A.linearVelocity.copy(r.linearVelocity)):A.hasLinearVelocity=!1,r.angularVelocity?(A.hasAngularVelocity=!0,A.angularVelocity.copy(r.angularVelocity)):A.hasAngularVelocity=!1));a!==null\u0026\u0026(i=n.getPose(e.targetRaySpace,o),i===null\u0026\u0026r!==null\u0026\u0026(i=r),i!==null\u0026\u0026(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Hei)))}return a!==null\u0026\u0026(a.visible=i!==null),A!==null\u0026\u0026(A.visible=r!==null),c!==null\u0026\u0026(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const o=new lh;o.matrixAutoUpdate=!1,o.visible=!1,e.joints[n.jointName]=o,e.add(o)}return e.joints[n.jointName]}}const Oei=`\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}`,Gei=`\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x \u003e= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}`;class Yei{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,o){if(this.texture===null){const i=new Hg,r=e.properties.get(i);r.__webglTexture=n.texture,(n.depthNear!=o.depthNear||n.depthFar!=o.depthFar)\u0026\u0026(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null\u0026\u0026this.mesh===null){const n=e.cameras[0].viewport,o=new f6({vertexShader:Oei,fragmentShader:Gei,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new Er(new VB(20,20),o)}return this.mesh}reset(){this.texture=null,this.mesh=null}}class Uei extends RR{constructor(e,n){super();const o=this;let i=null,r=1,s=null,a=\"local-floor\",A=1,c=null,l=null,u=null,g=null,h=null,d=null;const p=new Yei,m=n.getContextAttributes();let _=null,f=null;const I=[],C=[],y=new ni;let x=null;const E=new sf;E.layers.enable(1),E.viewport=new ru;const B=new sf;B.layers.enable(2),B.viewport=new ru;const S=[E,B],Q=new Lei;Q.layers.enable(1),Q.layers.enable(2);let w=null,M=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ie){let ne=I[ie];return ne===void 0\u0026\u0026(ne=new kTe,I[ie]=ne),ne.getTargetRaySpace()},this.getControllerGrip=function(ie){let ne=I[ie];return ne===void 0\u0026\u0026(ne=new kTe,I[ie]=ne),ne.getGripSpace()},this.getHand=function(ie){let ne=I[ie];return ne===void 0\u0026\u0026(ne=new kTe,I[ie]=ne),ne.getHandSpace()};function k(ie){const ne=C.indexOf(ie.inputSource);if(ne===-1)return;const le=I[ne];le!==void 0\u0026\u0026(le.update(ie.inputSource,ie.frame,c||s),le.dispatchEvent({type:ie.type,data:ie.inputSource}))}function R(){i.removeEventListener(\"select\",k),i.removeEventListener(\"selectstart\",k),i.removeEventListener(\"selectend\",k),i.removeEventListener(\"squeeze\",k),i.removeEventListener(\"squeezestart\",k),i.removeEventListener(\"squeezeend\",k),i.removeEventListener(\"end\",R),i.removeEventListener(\"inputsourceschange\",F);for(let ie=0;ie\u003cI.length;ie++){const ne=C[ie];ne!==null\u0026\u0026(C[ie]=null,I[ie].disconnect(ne))}w=null,M=null,p.reset(),e.setRenderTarget(_),h=null,g=null,u=null,i=null,f=null,oe.stop(),o.isPresenting=!1,e.setPixelRatio(x),e.setSize(y.width,y.height,!1),o.dispatchEvent({type:\"sessionend\"})}this.setFramebufferScaleFactor=function(ie){r=ie,o.isPresenting===!0\u0026\u0026console.warn(\"THREE.WebXRManager: Cannot change framebuffer scale while presenting.\")},this.setReferenceSpaceType=function(ie){a=ie,o.isPresenting===!0\u0026\u0026console.warn(\"THREE.WebXRManager: Cannot change reference space type while presenting.\")},this.getReferenceSpace=function(){return c||s},this.setReferenceSpace=function(ie){c=ie},this.getBaseLayer=function(){return g!==null?g:h},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return i},this.setSession=async function(ie){if(i=ie,i!==null){if(_=e.getRenderTarget(),i.addEventListener(\"select\",k),i.addEventListener(\"selectstart\",k),i.addEventListener(\"selectend\",k),i.addEventListener(\"squeeze\",k),i.addEventListener(\"squeezestart\",k),i.addEventListener(\"squeezeend\",k),i.addEventListener(\"end\",R),i.addEventListener(\"inputsourceschange\",F),m.xrCompatible!==!0\u0026\u0026await n.makeXRCompatible(),x=e.getPixelRatio(),e.getSize(y),i.renderState.layers===void 0){const ne={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,n,ne),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),f=new TR(h.framebufferWidth,h.framebufferHeight,{format:l4,type:Ww,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let ne=null,le=null,ge=null;m.depth\u0026\u0026(ge=m.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,ne=m.stencil?RG:NG,le=m.stencil?DG:MG);const _e={colorFormat:n.RGBA8,depthFormat:ge,scaleFactor:r};u=new XRWebGLBinding(i,n),g=u.createProjectionLayer(_e),i.updateRenderState({layers:[g]}),e.setPixelRatio(1),e.setSize(g.textureWidth,g.textureHeight,!1),f=new TR(g.textureWidth,g.textureHeight,{format:l4,type:Ww,depthTexture:new nzt(g.textureWidth,g.textureHeight,le,void 0,void 0,void 0,void 0,void 0,void 0,ne),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:g.ignoreDepthValues===!1})}f.isXRRenderTarget=!0,this.setFoveation(A),c=null,s=await i.requestReferenceSpace(a),oe.setContext(i),oe.start(),o.isPresenting=!0,o.dispatchEvent({type:\"sessionstart\"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function F(ie){for(let ne=0;ne\u003cie.removed.length;ne++){const le=ie.removed[ne],ge=C.indexOf(le);ge\u003e=0\u0026\u0026(C[ge]=null,I[ge].disconnect(le))}for(let ne=0;ne\u003cie.added.length;ne++){const le=ie.added[ne];let ge=C.indexOf(le);if(ge===-1){for(let ue=0;ue\u003cI.length;ue++)if(ue\u003e=C.length){C.push(le),ge=ue;break}else if(C[ue]===null){C[ue]=le,ge=ue;break}if(ge===-1)break}const _e=I[ge];_e\u0026\u0026_e.connect(le)}}const O=new jt,U=new jt;function Y(ie,ne,le){O.setFromMatrixPosition(ne.matrixWorld),U.setFromMatrixPosition(le.matrixWorld);const ge=O.distanceTo(U),_e=ne.projectionMatrix.elements,ue=le.projectionMatrix.elements,fe=_e[14]/(_e[10]-1),pe=_e[14]/(_e[10]+1),ye=(_e[9]+1)/_e[5],Me=(_e[9]-1)/_e[5],ve=(_e[8]-1)/_e[0],he=(ue[8]+1)/ue[0],Qe=fe*ve,Pe=fe*he,we=ge/(-ve+he),Te=we*-ve;ne.matrixWorld.decompose(ie.position,ie.quaternion,ie.scale),ie.translateX(Te),ie.translateZ(we),ie.matrixWorld.compose(ie.position,ie.quaternion,ie.scale),ie.matrixWorldInverse.copy(ie.matrixWorld).invert();const Re=fe+we,Ee=pe+we,ke=Qe-Te,Ce=Pe+(ge-Te),Le=ye*pe/Ee*Re,Ye=Me*pe/Ee*Re;ie.projectionMatrix.makePerspective(ke,Ce,Le,Ye,Re,Ee),ie.projectionMatrixInverse.copy(ie.projectionMatrix).invert()}function W(ie,ne){ne===null?ie.matrixWorld.copy(ie.matrix):ie.matrixWorld.multiplyMatrices(ne.matrixWorld,ie.matrix),ie.matrixWorldInverse.copy(ie.matrixWorld).invert()}this.updateCamera=function(ie){if(i===null)return;p.texture!==null\u0026\u0026(ie.near=p.depthNear,ie.far=p.depthFar),Q.near=B.near=E.near=ie.near,Q.far=B.far=E.far=ie.far,(w!==Q.near||M!==Q.far)\u0026\u0026(i.updateRenderState({depthNear:Q.near,depthFar:Q.far}),w=Q.near,M=Q.far,E.near=w,E.far=M,B.near=w,B.far=M,E.updateProjectionMatrix(),B.updateProjectionMatrix(),ie.updateProjectionMatrix());const ne=ie.parent,le=Q.cameras;W(Q,ne);for(let ge=0;ge\u003cle.length;ge++)W(le[ge],ne);le.length===2?Y(Q,E,B):Q.projectionMatrix.copy(E.projectionMatrix),te(ie,Q,ne)};function te(ie,ne,le){le===null?ie.matrix.copy(ne.matrixWorld):(ie.matrix.copy(le.matrixWorld),ie.matrix.invert(),ie.matrix.multiply(ne.matrixWorld)),ie.matrix.decompose(ie.position,ie.quaternion,ie.scale),ie.updateMatrixWorld(!0),ie.projectionMatrix.copy(ne.projectionMatrix),ie.projectionMatrixInverse.copy(ne.projectionMatrixInverse),ie.isPerspectiveCamera\u0026\u0026(ie.fov=HG*2*Math.atan(1/ie.projectionMatrix.elements[5]),ie.zoom=1)}this.getCamera=function(){return Q},this.getFoveation=function(){if(!(g===null\u0026\u0026h===null))return A},this.setFoveation=function(ie){A=ie,g!==null\u0026\u0026(g.fixedFoveation=ie),h!==null\u0026\u0026h.fixedFoveation!==void 0\u0026\u0026(h.fixedFoveation=ie)},this.hasDepthSensing=function(){return p.texture!==null},this.getDepthSensingMesh=function(){return p.getMesh(Q)};let j=null;function J(ie,ne){if(l=ne.getViewerPose(c||s),d=ne,l!==null){const le=l.views;h!==null\u0026\u0026(e.setRenderTargetFramebuffer(f,h.framebuffer),e.setRenderTarget(f));let ge=!1;le.length!==Q.cameras.length\u0026\u0026(Q.cameras.length=0,ge=!0);for(let ue=0;ue\u003cle.length;ue++){const fe=le[ue];let pe=null;if(h!==null)pe=h.getViewport(fe);else{const Me=u.getViewSubImage(g,fe);pe=Me.viewport,ue===0\u0026\u0026(e.setRenderTargetTextures(f,Me.colorTexture,g.ignoreDepthValues?void 0:Me.depthStencilTexture),e.setRenderTarget(f))}let ye=S[ue];ye===void 0\u0026\u0026(ye=new sf,ye.layers.enable(ue),ye.viewport=new ru,S[ue]=ye),ye.matrix.fromArray(fe.transform.matrix),ye.matrix.decompose(ye.position,ye.quaternion,ye.scale),ye.projectionMatrix.fromArray(fe.projectionMatrix),ye.projectionMatrixInverse.copy(ye.projectionMatrix).invert(),ye.viewport.set(pe.x,pe.y,pe.width,pe.height),ue===0\u0026\u0026(Q.matrix.copy(ye.matrix),Q.matrix.decompose(Q.position,Q.quaternion,Q.scale)),ge===!0\u0026\u0026Q.cameras.push(ye)}const _e=i.enabledFeatures;if(_e\u0026\u0026_e.includes(\"depth-sensing\")){const ue=u.getDepthInformation(le[0]);ue\u0026\u0026ue.isValid\u0026\u0026ue.texture\u0026\u0026p.init(e,ue,i.renderState)}}for(let le=0;le\u003cI.length;le++){const ge=C[le],_e=I[le];ge!==null\u0026\u0026_e!==void 0\u0026\u0026_e.update(ge,ne,c||s)}j\u0026\u0026j(ie,ne),ne.detectedPlanes\u0026\u0026o.dispatchEvent({type:\"planesdetected\",data:ne}),d=null}const oe=new jVt;oe.setAnimationLoop(J),this.setAnimationLoop=function(ie){j=ie},this.dispose=function(){}}}const UR=new t2,Kei=new va;function Vei(t,e){function n(m,_){m.matrixAutoUpdate===!0\u0026\u0026m.updateMatrix(),_.value.copy(m.matrix)}function o(m,_){_.color.getRGB(m.fogColor.value,UVt(t)),_.isFog?(m.fogNear.value=_.near,m.fogFar.value=_.far):_.isFogExp2\u0026\u0026(m.fogDensity.value=_.density)}function i(m,_,f,I,C){_.isMeshBasicMaterial||_.isMeshLambertMaterial?r(m,_):_.isMeshToonMaterial?(r(m,_),u(m,_)):_.isMeshPhongMaterial?(r(m,_),l(m,_)):_.isMeshStandardMaterial?(r(m,_),g(m,_),_.isMeshPhysicalMaterial\u0026\u0026h(m,_,C)):_.isMeshMatcapMaterial?(r(m,_),d(m,_)):_.isMeshDepthMaterial?r(m,_):_.isMeshDistanceMaterial?(r(m,_),p(m,_)):_.isMeshNormalMaterial?r(m,_):_.isLineBasicMaterial?(s(m,_),_.isLineDashedMaterial\u0026\u0026a(m,_)):_.isPointsMaterial?A(m,_,f,I):_.isSpriteMaterial?c(m,_):_.isShadowMaterial?(m.color.value.copy(_.color),m.opacity.value=_.opacity):_.isShaderMaterial\u0026\u0026(_.uniformsNeedUpdate=!1)}function r(m,_){m.opacity.value=_.opacity,_.color\u0026\u0026m.diffuse.value.copy(_.color),_.emissive\u0026\u0026m.emissive.value.copy(_.emissive).multiplyScalar(_.emissiveIntensity),_.map\u0026\u0026(m.map.value=_.map,n(_.map,m.mapTransform)),_.alphaMap\u0026\u0026(m.alphaMap.value=_.alphaMap,n(_.alphaMap,m.alphaMapTransform)),_.bumpMap\u0026\u0026(m.bumpMap.value=_.bumpMap,n(_.bumpMap,m.bumpMapTransform),m.bumpScale.value=_.bumpScale,_.side===uI\u0026\u0026(m.bumpScale.value*=-1)),_.normalMap\u0026\u0026(m.normalMap.value=_.normalMap,n(_.normalMap,m.normalMapTransform),m.normalScale.value.copy(_.normalScale),_.side===uI\u0026\u0026m.normalScale.value.negate()),_.displacementMap\u0026\u0026(m.displacementMap.value=_.displacementMap,n(_.displacementMap,m.displacementMapTransform),m.displacementScale.value=_.displacementScale,m.displacementBias.value=_.displacementBias),_.emissiveMap\u0026\u0026(m.emissiveMap.value=_.emissiveMap,n(_.emissiveMap,m.emissiveMapTransform)),_.specularMap\u0026\u0026(m.specularMap.value=_.specularMap,n(_.specularMap,m.specularMapTransform)),_.alphaTest\u003e0\u0026\u0026(m.alphaTest.value=_.alphaTest);const f=e.get(_),I=f.envMap,C=f.envMapRotation;I\u0026\u0026(m.envMap.value=I,UR.copy(C),UR.x*=-1,UR.y*=-1,UR.z*=-1,I.isCubeTexture\u0026\u0026I.isRenderTargetTexture===!1\u0026\u0026(UR.y*=-1,UR.z*=-1),m.envMapRotation.value.setFromMatrix4(Kei.makeRotationFromEuler(UR)),m.flipEnvMap.value=I.isCubeTexture\u0026\u0026I.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=_.reflectivity,m.ior.value=_.ior,m.refractionRatio.value=_.refractionRatio),_.lightMap\u0026\u0026(m.lightMap.value=_.lightMap,m.lightMapIntensity.value=_.lightMapIntensity,n(_.lightMap,m.lightMapTransform)),_.aoMap\u0026\u0026(m.aoMap.value=_.aoMap,m.aoMapIntensity.value=_.aoMapIntensity,n(_.aoMap,m.aoMapTransform))}function s(m,_){m.diffuse.value.copy(_.color),m.opacity.value=_.opacity,_.map\u0026\u0026(m.map.value=_.map,n(_.map,m.mapTransform))}function a(m,_){m.dashSize.value=_.dashSize,m.totalSize.value=_.dashSize+_.gapSize,m.scale.value=_.scale}function A(m,_,f,I){m.diffuse.value.copy(_.color),m.opacity.value=_.opacity,m.size.value=_.size*f,m.scale.value=I*.5,_.map\u0026\u0026(m.map.value=_.map,n(_.map,m.uvTransform)),_.alphaMap\u0026\u0026(m.alphaMap.value=_.alphaMap,n(_.alphaMap,m.alphaMapTransform)),_.alphaTest\u003e0\u0026\u0026(m.alphaTest.value=_.alphaTest)}function c(m,_){m.diffuse.value.copy(_.color),m.opacity.value=_.opacity,m.rotation.value=_.rotation,_.map\u0026\u0026(m.map.value=_.map,n(_.map,m.mapTransform)),_.alphaMap\u0026\u0026(m.alphaMap.value=_.alphaMap,n(_.alphaMap,m.alphaMapTransform)),_.alphaTest\u003e0\u0026\u0026(m.alphaTest.value=_.alphaTest)}function l(m,_){m.specular.value.copy(_.specular),m.shininess.value=Math.max(_.shininess,1e-4)}function u(m,_){_.gradientMap\u0026\u0026(m.gradientMap.value=_.gradientMap)}function g(m,_){m.metalness.value=_.metalness,_.metalnessMap\u0026\u0026(m.metalnessMap.value=_.metalnessMap,n(_.metalnessMap,m.metalnessMapTransform)),m.roughness.value=_.roughness,_.roughnessMap\u0026\u0026(m.roughnessMap.value=_.roughnessMap,n(_.roughnessMap,m.roughnessMapTransform)),_.envMap\u0026\u0026(m.envMapIntensity.value=_.envMapIntensity)}function h(m,_,f){m.ior.value=_.ior,_.sheen\u003e0\u0026\u0026(m.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),m.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap\u0026\u0026(m.sheenColorMap.value=_.sheenColorMap,n(_.sheenColorMap,m.sheenColorMapTransform)),_.sheenRoughnessMap\u0026\u0026(m.sheenRoughnessMap.value=_.sheenRoughnessMap,n(_.sheenRoughnessMap,m.sheenRoughnessMapTransform))),_.clearcoat\u003e0\u0026\u0026(m.clearcoat.value=_.clearcoat,m.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap\u0026\u0026(m.clearcoatMap.value=_.clearcoatMap,n(_.clearcoatMap,m.clearcoatMapTransform)),_.clearcoatRoughnessMap\u0026\u0026(m.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,n(_.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap\u0026\u0026(m.clearcoatNormalMap.value=_.clearcoatNormalMap,n(_.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===uI\u0026\u0026m.clearcoatNormalScale.value.negate())),_.dispersion\u003e0\u0026\u0026(m.dispersion.value=_.dispersion),_.iridescence\u003e0\u0026\u0026(m.iridescence.value=_.iridescence,m.iridescenceIOR.value=_.iridescenceIOR,m.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap\u0026\u0026(m.iridescenceMap.value=_.iridescenceMap,n(_.iridescenceMap,m.iridescenceMapTransform)),_.iridescenceThicknessMap\u0026\u0026(m.iridescenceThicknessMap.value=_.iridescenceThicknessMap,n(_.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),_.transmission\u003e0\u0026\u0026(m.transmission.value=_.transmission,m.transmissionSamplerMap.value=f.texture,m.transmissionSamplerSize.value.set(f.width,f.height),_.transmissionMap\u0026\u0026(m.transmissionMap.value=_.transmissionMap,n(_.transmissionMap,m.transmissionMapTransform)),m.thickness.value=_.thickness,_.thicknessMap\u0026\u0026(m.thicknessMap.value=_.thicknessMap,n(_.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=_.attenuationDistance,m.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy\u003e0\u0026\u0026(m.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap\u0026\u0026(m.anisotropyMap.value=_.anisotropyMap,n(_.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=_.specularIntensity,m.specularColor.value.copy(_.specularColor),_.specularColorMap\u0026\u0026(m.specularColorMap.value=_.specularColorMap,n(_.specularColorMap,m.specularColorMapTransform)),_.specularIntensityMap\u0026\u0026(m.specularIntensityMap.value=_.specularIntensityMap,n(_.specularIntensityMap,m.specularIntensityMapTransform))}function d(m,_){_.matcap\u0026\u0026(m.matcap.value=_.matcap)}function p(m,_){const f=e.get(_).light;m.referencePosition.value.setFromMatrixPosition(f.matrixWorld),m.nearDistance.value=f.shadow.camera.near,m.farDistance.value=f.shadow.camera.far}return{refreshFogUniforms:o,refreshMaterialUniforms:i}}function zei(t,e,n,o){let i={},r={},s=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function A(f,I){const C=I.program;o.uniformBlockBinding(f,C)}function c(f,I){let C=i[f.id];C===void 0\u0026\u0026(d(f),C=l(f),i[f.id]=C,f.addEventListener(\"dispose\",m));const y=I.program;o.updateUBOMapping(f,y);const x=e.render.frame;r[f.id]!==x\u0026\u0026(g(f),r[f.id]=x)}function l(f){const I=u();f.__bindingPointIndex=I;const C=t.createBuffer(),y=f.__size,x=f.usage;return t.bindBuffer(t.UNIFORM_BUFFER,C),t.bufferData(t.UNIFORM_BUFFER,y,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,I,C),C}function u(){for(let f=0;f\u003ca;f++)if(s.indexOf(f)===-1)return s.push(f),f;return console.error(\"THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.\"),0}function g(f){const I=i[f.id],C=f.uniforms,y=f.__cache;t.bindBuffer(t.UNIFORM_BUFFER,I);for(let x=0,E=C.length;x\u003cE;x++){const B=Array.isArray(C[x])?C[x]:[C[x]];for(let S=0,Q=B.length;S\u003cQ;S++){const w=B[S];if(h(w,x,S,y)===!0){const M=w.__offset,k=Array.isArray(w.value)?w.value:[w.value];let R=0;for(let F=0;F\u003ck.length;F++){const O=k[F],U=p(O);typeof O==\"number\"||typeof O==\"boolean\"?(w.__data[0]=O,t.bufferSubData(t.UNIFORM_BUFFER,M+R,w.__data)):O.isMatrix3?(w.__data[0]=O.elements[0],w.__data[1]=O.elements[1],w.__data[2]=O.elements[2],w.__data[3]=0,w.__data[4]=O.elements[3],w.__data[5]=O.elements[4],w.__data[6]=O.elements[5],w.__data[7]=0,w.__data[8]=O.elements[6],w.__data[9]=O.elements[7],w.__data[10]=O.elements[8],w.__data[11]=0):(O.toArray(w.__data,R),R+=U.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,M,w.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function h(f,I,C,y){const x=f.value,E=I+\"_\"+C;if(y[E]===void 0)return typeof x==\"number\"||typeof x==\"boolean\"?y[E]=x:y[E]=x.clone(),!0;{const B=y[E];if(typeof x==\"number\"||typeof x==\"boolean\"){if(B!==x)return y[E]=x,!0}else if(B.equals(x)===!1)return B.copy(x),!0}return!1}function d(f){const I=f.uniforms;let C=0;const y=16;for(let E=0,B=I.length;E\u003cB;E++){const S=Array.isArray(I[E])?I[E]:[I[E]];for(let Q=0,w=S.length;Q\u003cw;Q++){const M=S[Q],k=Array.isArray(M.value)?M.value:[M.value];for(let R=0,F=k.length;R\u003cF;R++){const O=k[R],U=p(O),Y=C%y;Y!==0\u0026\u0026y-Y\u003cU.boundary\u0026\u0026(C+=y-Y),M.__data=new Float32Array(U.storage/Float32Array.BYTES_PER_ELEMENT),M.__offset=C,C+=U.storage}}}const x=C%y;return x\u003e0\u0026\u0026(C+=y-x),f.__size=C,f.__cache={},this}function p(f){const I={boundary:0,storage:0};return typeof f==\"number\"||typeof f==\"boolean\"?(I.boundary=4,I.storage=4):f.isVector2?(I.boundary=8,I.storage=8):f.isVector3||f.isColor?(I.boundary=16,I.storage=12):f.isVector4?(I.boundary=16,I.storage=16):f.isMatrix3?(I.boundary=48,I.storage=48):f.isMatrix4?(I.boundary=64,I.storage=64):f.isTexture?console.warn(\"THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.\"):console.warn(\"THREE.WebGLRenderer: Unsupported uniform value type.\",f),I}function m(f){const I=f.target;I.removeEventListener(\"dispose\",m);const C=s.indexOf(I.__bindingPointIndex);s.splice(C,1),t.deleteBuffer(i[I.id]),delete i[I.id],delete r[I.id]}function _(){for(const f in i)t.deleteBuffer(i[f]);s=[],i={},r={}}return{bind:A,update:c,dispose:_}}class $de{constructor(e={}){const{canvas:n=x$o(),context:o=null,depth:i=!0,stencil:r=!1,alpha:s=!1,antialias:a=!1,premultipliedAlpha:A=!0,preserveDrawingBuffer:c=!1,powerPreference:l=\"default\",failIfMajorPerformanceCaveat:u=!1}=e;this.isWebGLRenderer=!0;let g;if(o!==null){if(typeof WebGLRenderingContext\u003c\"u\"\u0026\u0026o instanceof WebGLRenderingContext)throw new Error(\"THREE.WebGLRenderer: WebGL 1 is not supported since r163.\");g=o.getContextAttributes().alpha}else g=s;const h=new Uint32Array(4),d=new Int32Array(4);let p=null,m=null;const _=[],f=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Ox,this.toneMapping=Jw,this.toneMappingExposure=1;const I=this;let C=!1,y=0,x=0,E=null,B=-1,S=null;const Q=new ru,w=new ru;let M=null;const k=new Vi(0);let R=0,F=n.width,O=n.height,U=1,Y=null,W=null;const te=new ru(0,0,F,O),j=new ru(0,0,F,O);let J=!1;const oe=new STe;let ie=!1,ne=!1;const le=new va,ge=new jt,_e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ue=!1;function fe(){return E===null?U:1}let pe=o;function ye(qe,vt){return n.getContext(qe,vt)}try{const qe={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:A,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if(\"setAttribute\"in n\u0026\u0026n.setAttribute(\"data-engine\",`three.js r${mde}`),n.addEventListener(\"webglcontextlost\",et,!1),n.addEventListener(\"webglcontextrestored\",It,!1),n.addEventListener(\"webglcontextcreationerror\",Bt,!1),pe===null){const vt=\"webgl2\";if(pe=ye(vt,qe),pe===null)throw ye(vt)?new Error(\"Error creating WebGL context with your selected attributes.\"):new Error(\"Error creating WebGL context.\")}}catch(qe){throw console.error(\"THREE.WebGLRenderer: \"+qe.message),qe}let Me,ve,he,Qe,Pe,we,Te,Re,Ee,ke,Ce,Le,Ye,tt,At,at,nt,gt,bt,Ct,Dt,kt,it,Yt;function pn(){Me=new oZo(pe),Me.init(),kt=new Fei(pe,Me),ve=new qXo(pe,Me,e,kt),he=new Tei(pe),Qe=new sZo(pe),Pe=new Eei,we=new kei(pe,Me,he,Pe,ve,kt,Qe),Te=new ZXo(I),Re=new nZo(I),Ee=new J$o(pe),it=new jXo(pe,Ee),ke=new iZo(pe,Ee,Qe,it),Ce=new AZo(pe,ke,Ee,Qe),bt=new aZo(pe,ve,we),at=new XXo(Pe),Le=new xei(I,Te,Re,Me,ve,it,at),Ye=new Vei(I,Pe),tt=new bei,At=new Mei(Me),gt=new WXo(I,Te,Re,he,Ce,g,A),nt=new Rei(I,Ce,ve),Yt=new zei(pe,Qe,ve,he),Ct=new $Xo(pe,Me,Qe),Dt=new rZo(pe,Me,Qe),Qe.programs=Le.programs,I.capabilities=ve,I.extensions=Me,I.properties=Pe,I.renderLists=tt,I.shadowMap=nt,I.state=he,I.info=Qe}pn();const be=new Uei(I,pe);this.xr=be,this.getContext=function(){return pe},this.getContextAttributes=function(){return pe.getContextAttributes()},this.forceContextLoss=function(){const qe=Me.get(\"WEBGL_lose_context\");qe\u0026\u0026qe.loseContext()},this.forceContextRestore=function(){const qe=Me.get(\"WEBGL_lose_context\");qe\u0026\u0026qe.restoreContext()},this.getPixelRatio=function(){return U},this.setPixelRatio=function(qe){qe!==void 0\u0026\u0026(U=qe,this.setSize(F,O,!1))},this.getSize=function(qe){return qe.set(F,O)},this.setSize=function(qe,vt,qt=!0){if(be.isPresenting){console.warn(\"THREE.WebGLRenderer: Can't change size while VR device is presenting.\");return}F=qe,O=vt,n.width=Math.floor(qe*U),n.height=Math.floor(vt*U),qt===!0\u0026\u0026(n.style.width=qe+\"px\",n.style.height=vt+\"px\"),this.setViewport(0,0,qe,vt)},this.getDrawingBufferSize=function(qe){return qe.set(F*U,O*U).floor()},this.setDrawingBufferSize=function(qe,vt,qt){F=qe,O=vt,U=qt,n.width=Math.floor(qe*qt),n.height=Math.floor(vt*qt),this.setViewport(0,0,qe,vt)},this.getCurrentViewport=function(qe){return qe.copy(Q)},this.getViewport=function(qe){return qe.copy(te)},this.setViewport=function(qe,vt,qt,Zt){qe.isVector4?te.set(qe.x,qe.y,qe.z,qe.w):te.set(qe,vt,qt,Zt),he.viewport(Q.copy(te).multiplyScalar(U).round())},this.getScissor=function(qe){return qe.copy(j)},this.setScissor=function(qe,vt,qt,Zt){qe.isVector4?j.set(qe.x,qe.y,qe.z,qe.w):j.set(qe,vt,qt,Zt),he.scissor(w.copy(j).multiplyScalar(U).round())},this.getScissorTest=function(){return J},this.setScissorTest=function(qe){he.setScissorTest(J=qe)},this.setOpaqueSort=function(qe){Y=qe},this.setTransparentSort=function(qe){W=qe},this.getClearColor=function(qe){return qe.copy(gt.getClearColor())},this.setClearColor=function(){gt.setClearColor.apply(gt,arguments)},this.getClearAlpha=function(){return gt.getClearAlpha()},this.setClearAlpha=function(){gt.setClearAlpha.apply(gt,arguments)},this.clear=function(qe=!0,vt=!0,qt=!0){let Zt=0;if(qe){let nn=!1;if(E!==null){const zn=E.texture.format;nn=zn===HKt||zn===LKt||zn===FKt}if(nn){const zn=E.texture.type,Nn=zn===Ww||zn===MG||zn===Cde||zn===DG||zn===RKt||zn===TKt,Co=gt.getClearColor(),ei=gt.getClearAlpha(),ro=Co.r,To=Co.g,yo=Co.b;Nn?(h[0]=ro,h[1]=To,h[2]=yo,h[3]=ei,pe.clearBufferuiv(pe.COLOR,0,h)):(d[0]=ro,d[1]=To,d[2]=yo,d[3]=ei,pe.clearBufferiv(pe.COLOR,0,d))}else Zt|=pe.COLOR_BUFFER_BIT}vt\u0026\u0026(Zt|=pe.DEPTH_BUFFER_BIT),qt\u0026\u0026(Zt|=pe.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),pe.clear(Zt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener(\"webglcontextlost\",et,!1),n.removeEventListener(\"webglcontextrestored\",It,!1),n.removeEventListener(\"webglcontextcreationerror\",Bt,!1),tt.dispose(),At.dispose(),Pe.dispose(),Te.dispose(),Re.dispose(),Ce.dispose(),it.dispose(),Yt.dispose(),Le.dispose(),be.dispose(),be.removeEventListener(\"sessionstart\",Ut),be.removeEventListener(\"sessionend\",Wt),Xt.stop()};function et(qe){qe.preventDefault(),console.log(\"THREE.WebGLRenderer: Context Lost.\"),C=!0}function It(){console.log(\"THREE.WebGLRenderer: Context Restored.\"),C=!1;const qe=Qe.autoReset,vt=nt.enabled,qt=nt.autoUpdate,Zt=nt.needsUpdate,nn=nt.type;pn(),Qe.autoReset=qe,nt.enabled=vt,nt.autoUpdate=qt,nt.needsUpdate=Zt,nt.type=nn}function Bt(qe){console.error(\"THREE.WebGLRenderer: A WebGL context could not be created. Reason: \",qe.statusMessage)}function mt(qe){const vt=qe.target;vt.removeEventListener(\"dispose\",mt),st(vt)}function st(qe){xt(qe),Pe.remove(qe)}function xt(qe){const vt=Pe.get(qe).programs;vt!==void 0\u0026\u0026(vt.forEach(function(qt){Le.releaseProgram(qt)}),qe.isShaderMaterial\u0026\u0026Le.releaseShaderCache(qe))}this.renderBufferDirect=function(qe,vt,qt,Zt,nn,zn){vt===null\u0026\u0026(vt=_e);const Nn=nn.isMesh\u0026\u0026nn.matrixWorld.determinant()\u003c0,Co=Lt(qe,vt,qt,Zt,nn);he.setMaterial(Zt,Nn);let ei=qt.index,ro=1;if(Zt.wireframe===!0){if(ei=ke.getWireframeAttribute(qt),ei===void 0)return;ro=2}const To=qt.drawRange,yo=qt.attributes.position;let Ro=To.start*ro,On=(To.start+To.count)*ro;zn!==null\u0026\u0026(Ro=Math.max(Ro,zn.start*ro),On=Math.min(On,(zn.start+zn.count)*ro)),ei!==null?(Ro=Math.max(Ro,0),On=Math.min(On,ei.count)):yo!=null\u0026\u0026(Ro=Math.max(Ro,0),On=Math.min(On,yo.count));const uo=On-Ro;if(uo\u003c0||uo===1/0)return;it.setup(nn,Zt,Co,qt,ei);let Oo,ko=Ct;if(ei!==null\u0026\u0026(Oo=Ee.get(ei),ko=Dt,ko.setIndex(Oo)),nn.isMesh)Zt.wireframe===!0?(he.setLineWidth(Zt.wireframeLinewidth*fe()),ko.setMode(pe.LINES)):ko.setMode(pe.TRIANGLES);else if(nn.isLine){let Ko=Zt.linewidth;Ko===void 0\u0026\u0026(Ko=1),he.setLineWidth(Ko*fe()),nn.isLineSegments?ko.setMode(pe.LINES):nn.isLineLoop?ko.setMode(pe.LINE_LOOP):ko.setMode(pe.LINE_STRIP)}else nn.isPoints?ko.setMode(pe.POINTS):nn.isSprite\u0026\u0026ko.setMode(pe.TRIANGLES);if(nn.isBatchedMesh)nn._multiDrawInstances!==null?ko.renderMultiDrawInstances(nn._multiDrawStarts,nn._multiDrawCounts,nn._multiDrawCount,nn._multiDrawInstances):ko.renderMultiDraw(nn._multiDrawStarts,nn._multiDrawCounts,nn._multiDrawCount);else if(nn.isInstancedMesh)ko.renderInstances(Ro,uo,nn.count);else if(qt.isInstancedBufferGeometry){const Ko=qt._maxInstanceCount!==void 0?qt._maxInstanceCount:1/0,mi=Math.min(qt.instanceCount,Ko);ko.renderInstances(Ro,uo,mi)}else ko.render(Ro,uo)};function Xe(qe,vt,qt){qe.transparent===!0\u0026\u0026qe.side===r_\u0026\u0026qe.forceSinglePass===!1?(qe.side=uI,qe.needsUpdate=!0,ht(qe,vt,qt),qe.side=mE,qe.needsUpdate=!0,ht(qe,vt,qt),qe.side=r_):ht(qe,vt,qt)}this.compile=function(qe,vt,qt=null){qt===null\u0026\u0026(qt=qe),m=At.get(qt),m.init(vt),f.push(m),qt.traverseVisible(function(nn){nn.isLight\u0026\u0026nn.layers.test(vt.layers)\u0026\u0026(m.pushLight(nn),nn.castShadow\u0026\u0026m.pushShadow(nn))}),qe!==qt\u0026\u0026qe.traverseVisible(function(nn){nn.isLight\u0026\u0026nn.layers.test(vt.layers)\u0026\u0026(m.pushLight(nn),nn.castShadow\u0026\u0026m.pushShadow(nn))}),m.setupLights();const Zt=new Set;return qe.traverse(function(nn){const zn=nn.material;if(zn)if(Array.isArray(zn))for(let Nn=0;Nn\u003czn.length;Nn++){const Co=zn[Nn];Xe(Co,qt,nn),Zt.add(Co)}else Xe(zn,qt,nn),Zt.add(zn)}),f.pop(),m=null,Zt},this.compileAsync=function(qe,vt,qt=null){const Zt=this.compile(qe,vt,qt);return new Promise(nn=\u003e{function zn(){if(Zt.forEach(function(Nn){Pe.get(Nn).currentProgram.isReady()\u0026\u0026Zt.delete(Nn)}),Zt.size===0){nn(qe);return}setTimeout(zn,10)}Me.get(\"KHR_parallel_shader_compile\")!==null?zn():setTimeout(zn,10)})};let Ze=null;function dt(qe){Ze\u0026\u0026Ze(qe)}function Ut(){Xt.stop()}function Wt(){Xt.start()}const Xt=new jVt;Xt.setAnimationLoop(dt),typeof self\u003c\"u\"\u0026\u0026Xt.setContext(self),this.setAnimationLoop=function(qe){Ze=qe,be.setAnimationLoop(qe),qe===null?Xt.stop():Xt.start()},be.addEventListener(\"sessionstart\",Ut),be.addEventListener(\"sessionend\",Wt),this.render=function(qe,vt){if(vt!==void 0\u0026\u0026vt.isCamera!==!0){console.error(\"THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.\");return}if(C===!0)return;if(qe.matrixWorldAutoUpdate===!0\u0026\u0026qe.updateMatrixWorld(),vt.parent===null\u0026\u0026vt.matrixWorldAutoUpdate===!0\u0026\u0026vt.updateMatrixWorld(),be.enabled===!0\u0026\u0026be.isPresenting===!0\u0026\u0026(be.cameraAutoUpdate===!0\u0026\u0026be.updateCamera(vt),vt=be.getCamera()),qe.isScene===!0\u0026\u0026qe.onBeforeRender(I,qe,vt,E),m=At.get(qe,f.length),m.init(vt),f.push(m),le.multiplyMatrices(vt.projectionMatrix,vt.matrixWorldInverse),oe.setFromProjectionMatrix(le),ne=this.localClippingEnabled,ie=at.init(this.clippingPlanes,ne),p=tt.get(qe,_.length),p.init(),_.push(p),be.enabled===!0\u0026\u0026be.isPresenting===!0){const zn=I.xr.getDepthSensingMesh();zn!==null\u0026\u0026Jt(zn,vt,-1/0,I.sortObjects)}Jt(qe,vt,0,I.sortObjects),p.finish(),I.sortObjects===!0\u0026\u0026p.sort(Y,W),ue=be.enabled===!1||be.isPresenting===!1||be.hasDepthSensing()===!1,ue\u0026\u0026gt.addToRenderList(p,qe),this.info.render.frame++,ie===!0\u0026\u0026at.beginShadows();const qt=m.state.shadowsArray;nt.render(qt,qe,vt),ie===!0\u0026\u0026at.endShadows(),this.info.autoReset===!0\u0026\u0026this.info.reset();const Zt=p.opaque,nn=p.transmissive;if(m.setupLights(),vt.isArrayCamera){const zn=vt.cameras;if(nn.length\u003e0)for(let Nn=0,Co=zn.length;Nn\u003cCo;Nn++){const ei=zn[Nn];An(Zt,nn,qe,ei)}ue\u0026\u0026gt.render(qe);for(let Nn=0,Co=zn.length;Nn\u003cCo;Nn++){const ei=zn[Nn];yn(p,qe,ei,ei.viewport)}}else nn.length\u003e0\u0026\u0026An(Zt,nn,qe,vt),ue\u0026\u0026gt.render(qe),yn(p,qe,vt);E!==null\u0026\u0026(we.updateMultisampleRenderTarget(E),we.updateRenderTargetMipmap(E)),qe.isScene===!0\u0026\u0026qe.onAfterRender(I,qe,vt),it.resetDefaultState(),B=-1,S=null,f.pop(),f.length\u003e0?(m=f[f.length-1],ie===!0\u0026\u0026at.setGlobalState(I.clippingPlanes,m.state.camera)):m=null,_.pop(),_.length\u003e0?p=_[_.length-1]:p=null};function Jt(qe,vt,qt,Zt){if(qe.visible===!1)return;if(qe.layers.test(vt.layers)){if(qe.isGroup)qt=qe.renderOrder;else if(qe.isLOD)qe.autoUpdate===!0\u0026\u0026qe.update(vt);else if(qe.isLight)m.pushLight(qe),qe.castShadow\u0026\u0026m.pushShadow(qe);else if(qe.isSprite){if(!qe.frustumCulled||oe.intersectsSprite(qe)){Zt\u0026\u0026ge.setFromMatrixPosition(qe.matrixWorld).applyMatrix4(le);const Nn=Ce.update(qe),Co=qe.material;Co.visible\u0026\u0026p.push(qe,Nn,Co,qt,ge.z,null)}}else if((qe.isMesh||qe.isLine||qe.isPoints)\u0026\u0026(!qe.frustumCulled||oe.intersectsObject(qe))){const Nn=Ce.update(qe),Co=qe.material;if(Zt\u0026\u0026(qe.boundingSphere!==void 0?(qe.boundingSphere===null\u0026\u0026qe.computeBoundingSphere(),ge.copy(qe.boundingSphere.center)):(Nn.boundingSphere===null\u0026\u0026Nn.computeBoundingSphere(),ge.copy(Nn.boundingSphere.center)),ge.applyMatrix4(qe.matrixWorld).applyMatrix4(le)),Array.isArray(Co)){const ei=Nn.groups;for(let ro=0,To=ei.length;ro\u003cTo;ro++){const yo=ei[ro],Ro=Co[yo.materialIndex];Ro\u0026\u0026Ro.visible\u0026\u0026p.push(qe,Nn,Ro,qt,ge.z,yo)}}else Co.visible\u0026\u0026p.push(qe,Nn,Co,qt,ge.z,null)}}const zn=qe.children;for(let Nn=0,Co=zn.length;Nn\u003cCo;Nn++)Jt(zn[Nn],vt,qt,Zt)}function yn(qe,vt,qt,Zt){const nn=qe.opaque,zn=qe.transmissive,Nn=qe.transparent;m.setupLightsView(qt),ie===!0\u0026\u0026at.setGlobalState(I.clippingPlanes,qt),Zt\u0026\u0026he.viewport(Q.copy(Zt)),nn.length\u003e0\u0026\u0026kn(nn,vt,qt),zn.length\u003e0\u0026\u0026kn(zn,vt,qt),Nn.length\u003e0\u0026\u0026kn(Nn,vt,qt),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function An(qe,vt,qt,Zt){if((qt.isScene===!0?qt.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[Zt.id]===void 0\u0026\u0026(m.state.transmissionRenderTarget[Zt.id]=new TR(1,1,{generateMipmaps:!0,type:Me.has(\"EXT_color_buffer_half_float\")||Me.has(\"EXT_color_buffer_float\")?yde:Ww,minFilter:gm,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:iu.workingColorSpace}));const zn=m.state.transmissionRenderTarget[Zt.id],Nn=Zt.viewport||Q;zn.setSize(Nn.z,Nn.w);const Co=I.getRenderTarget();I.setRenderTarget(zn),I.getClearColor(k),R=I.getClearAlpha(),R\u003c1\u0026\u0026I.setClearColor(16777215,.5),ue?gt.render(qt):I.clear();const ei=I.toneMapping;I.toneMapping=Jw;const ro=Zt.viewport;if(Zt.viewport!==void 0\u0026\u0026(Zt.viewport=void 0),m.setupLightsView(Zt),ie===!0\u0026\u0026at.setGlobalState(I.clippingPlanes,Zt),kn(qe,qt,Zt),we.updateMultisampleRenderTarget(zn),we.updateRenderTargetMipmap(zn),Me.has(\"WEBGL_multisampled_render_to_texture\")===!1){let To=!1;for(let yo=0,Ro=vt.length;yo\u003cRo;yo++){const On=vt[yo],uo=On.object,Oo=On.geometry,ko=On.material,Ko=On.group;if(ko.side===r_\u0026\u0026uo.layers.test(Zt.layers)){const mi=ko.side;ko.side=uI,ko.needsUpdate=!0,$n(uo,qt,Zt,Oo,ko,Ko),ko.side=mi,ko.needsUpdate=!0,To=!0}}To===!0\u0026\u0026(we.updateMultisampleRenderTarget(zn),we.updateRenderTargetMipmap(zn))}I.setRenderTarget(Co),I.setClearColor(k,R),ro!==void 0\u0026\u0026(Zt.viewport=ro),I.toneMapping=ei}function kn(qe,vt,qt){const Zt=vt.isScene===!0?vt.overrideMaterial:null;for(let nn=0,zn=qe.length;nn\u003czn;nn++){const Nn=qe[nn],Co=Nn.object,ei=Nn.geometry,ro=Zt===null?Nn.material:Zt,To=Nn.group;Co.layers.test(qt.layers)\u0026\u0026$n(Co,vt,qt,ei,ro,To)}}function $n(qe,vt,qt,Zt,nn,zn){qe.onBeforeRender(I,vt,qt,Zt,nn,zn),qe.modelViewMatrix.multiplyMatrices(qt.matrixWorldInverse,qe.matrixWorld),qe.normalMatrix.getNormalMatrix(qe.modelViewMatrix),nn.onBeforeRender(I,vt,qt,Zt,qe,zn),nn.transparent===!0\u0026\u0026nn.side===r_\u0026\u0026nn.forceSinglePass===!1?(nn.side=uI,nn.needsUpdate=!0,I.renderBufferDirect(qt,vt,Zt,nn,qe,zn),nn.side=mE,nn.needsUpdate=!0,I.renderBufferDirect(qt,vt,Zt,nn,qe,zn),nn.side=r_):I.renderBufferDirect(qt,vt,Zt,nn,qe,zn),qe.onAfterRender(I,vt,qt,Zt,nn,zn)}function ht(qe,vt,qt){vt.isScene!==!0\u0026\u0026(vt=_e);const Zt=Pe.get(qe),nn=m.state.lights,zn=m.state.shadowsArray,Nn=nn.state.version,Co=Le.getParameters(qe,nn.state,zn,vt,qt),ei=Le.getProgramCacheKey(Co);let ro=Zt.programs;Zt.environment=qe.isMeshStandardMaterial?vt.environment:null,Zt.fog=vt.fog,Zt.envMap=(qe.isMeshStandardMaterial?Re:Te).get(qe.envMap||Zt.environment),Zt.envMapRotation=Zt.environment!==null\u0026\u0026qe.envMap===null?vt.environmentRotation:qe.envMapRotation,ro===void 0\u0026\u0026(qe.addEventListener(\"dispose\",mt),ro=new Map,Zt.programs=ro);let To=ro.get(ei);if(To!==void 0){if(Zt.currentProgram===To\u0026\u0026Zt.lightsStateVersion===Nn)return rn(qe,Co),To}else Co.uniforms=Le.getUniforms(qe),qe.onBuild(qt,Co,I),qe.onBeforeCompile(Co,I),To=Le.acquireProgram(Co,ei),ro.set(ei,To),Zt.uniforms=Co.uniforms;const yo=Zt.uniforms;return(!qe.isShaderMaterial\u0026\u0026!qe.isRawShaderMaterial||qe.clipping===!0)\u0026\u0026(yo.clippingPlanes=at.uniform),rn(qe,Co),Zt.needsLights=Ao(qe),Zt.lightsStateVersion=Nn,Zt.needsLights\u0026\u0026(yo.ambientLightColor.value=nn.state.ambient,yo.lightProbe.value=nn.state.probe,yo.directionalLights.value=nn.state.directional,yo.directionalLightShadows.value=nn.state.directionalShadow,yo.spotLights.value=nn.state.spot,yo.spotLightShadows.value=nn.state.spotShadow,yo.rectAreaLights.value=nn.state.rectArea,yo.ltc_1.value=nn.state.rectAreaLTC1,yo.ltc_2.value=nn.state.rectAreaLTC2,yo.pointLights.value=nn.state.point,yo.pointLightShadows.value=nn.state.pointShadow,yo.hemisphereLights.value=nn.state.hemi,yo.directionalShadowMap.value=nn.state.directionalShadowMap,yo.directionalShadowMatrix.value=nn.state.directionalShadowMatrix,yo.spotShadowMap.value=nn.state.spotShadowMap,yo.spotLightMatrix.value=nn.state.spotLightMatrix,yo.spotLightMap.value=nn.state.spotLightMap,yo.pointShadowMap.value=nn.state.pointShadowMap,yo.pointShadowMatrix.value=nn.state.pointShadowMatrix),Zt.currentProgram=To,Zt.uniformsList=null,To}function Kt(qe){if(qe.uniformsList===null){const vt=qe.currentProgram.getUniforms();qe.uniformsList=jde.seqWithValue(vt.seq,qe.uniforms)}return qe.uniformsList}function rn(qe,vt){const qt=Pe.get(qe);qt.outputColorSpace=vt.outputColorSpace,qt.batching=vt.batching,qt.batchingColor=vt.batchingColor,qt.instancing=vt.instancing,qt.instancingColor=vt.instancingColor,qt.instancingMorph=vt.instancingMorph,qt.skinning=vt.skinning,qt.morphTargets=vt.morphTargets,qt.morphNormals=vt.morphNormals,qt.morphColors=vt.morphColors,qt.morphTargetsCount=vt.morphTargetsCount,qt.numClippingPlanes=vt.numClippingPlanes,qt.numIntersection=vt.numClipIntersection,qt.vertexAlphas=vt.vertexAlphas,qt.vertexTangents=vt.vertexTangents,qt.toneMapping=vt.toneMapping}function Lt(qe,vt,qt,Zt,nn){vt.isScene!==!0\u0026\u0026(vt=_e),we.resetTextureUnits();const zn=vt.fog,Nn=Zt.isMeshStandardMaterial?vt.environment:null,Co=E===null?I.outputColorSpace:E.isXRRenderTarget===!0?E.texture.colorSpace:jw,ei=(Zt.isMeshStandardMaterial?Re:Te).get(Zt.envMap||Nn),ro=Zt.vertexColors===!0\u0026\u0026!!qt.attributes.color\u0026\u0026qt.attributes.color.itemSize===4,To=!!qt.attributes.tangent\u0026\u0026(!!Zt.normalMap||Zt.anisotropy\u003e0),yo=!!qt.morphAttributes.position,Ro=!!qt.morphAttributes.normal,On=!!qt.morphAttributes.color;let uo=Jw;Zt.toneMapped\u0026\u0026(E===null||E.isXRRenderTarget===!0)\u0026\u0026(uo=I.toneMapping);const Oo=qt.morphAttributes.position||qt.morphAttributes.normal||qt.morphAttributes.color,ko=Oo!==void 0?Oo.length:0,Ko=Pe.get(Zt),mi=m.state.lights;if(ie===!0\u0026\u0026(ne===!0||qe!==S)){const ds=qe===S\u0026\u0026Zt.id===B;at.setState(Zt,qe,ds)}let Fo=!1;Zt.version===Ko.__version?(Ko.needsLights\u0026\u0026Ko.lightsStateVersion!==mi.state.version||Ko.outputColorSpace!==Co||nn.isBatchedMesh\u0026\u0026Ko.batching===!1||!nn.isBatchedMesh\u0026\u0026Ko.batching===!0||nn.isBatchedMesh\u0026\u0026Ko.batchingColor===!0\u0026\u0026nn.colorTexture===null||nn.isBatchedMesh\u0026\u0026Ko.batchingColor===!1\u0026\u0026nn.colorTexture!==null||nn.isInstancedMesh\u0026\u0026Ko.instancing===!1||!nn.isInstancedMesh\u0026\u0026Ko.instancing===!0||nn.isSkinnedMesh\u0026\u0026Ko.skinning===!1||!nn.isSkinnedMesh\u0026\u0026Ko.skinning===!0||nn.isInstancedMesh\u0026\u0026Ko.instancingColor===!0\u0026\u0026nn.instanceColor===null||nn.isInstancedMesh\u0026\u0026Ko.instancingColor===!1\u0026\u0026nn.instanceColor!==null||nn.isInstancedMesh\u0026\u0026Ko.instancingMorph===!0\u0026\u0026nn.morphTexture===null||nn.isInstancedMesh\u0026\u0026Ko.instancingMorph===!1\u0026\u0026nn.morphTexture!==null||Ko.envMap!==ei||Zt.fog===!0\u0026\u0026Ko.fog!==zn||Ko.numClippingPlanes!==void 0\u0026\u0026(Ko.numClippingPlanes!==at.numPlanes||Ko.numIntersection!==at.numIntersection)||Ko.vertexAlphas!==ro||Ko.vertexTangents!==To||Ko.morphTargets!==yo||Ko.morphNormals!==Ro||Ko.morphColors!==On||Ko.toneMapping!==uo||Ko.morphTargetsCount!==ko)\u0026\u0026(Fo=!0):(Fo=!0,Ko.__version=Zt.version);let Nr=Ko.currentProgram;Fo===!0\u0026\u0026(Nr=ht(Zt,vt,nn));let Rs=!1,ur=!1,zi=!1;const bi=Nr.getUniforms(),Ar=Ko.uniforms;if(he.useProgram(Nr.program)\u0026\u0026(Rs=!0,ur=!0,zi=!0),Zt.id!==B\u0026\u0026(B=Zt.id,ur=!0),Rs||S!==qe){bi.setValue(pe,\"projectionMatrix\",qe.projectionMatrix),bi.setValue(pe,\"viewMatrix\",qe.matrixWorldInverse);const ds=bi.map.cameraPosition;ds!==void 0\u0026\u0026ds.setValue(pe,ge.setFromMatrixPosition(qe.matrixWorld)),ve.logarithmicDepthBuffer\u0026\u0026bi.setValue(pe,\"logDepthBufFC\",2/(Math.log(qe.far+1)/Math.LN2)),(Zt.isMeshPhongMaterial||Zt.isMeshToonMaterial||Zt.isMeshLambertMaterial||Zt.isMeshBasicMaterial||Zt.isMeshStandardMaterial||Zt.isShaderMaterial)\u0026\u0026bi.setValue(pe,\"isOrthographic\",qe.isOrthographicCamera===!0),S!==qe\u0026\u0026(S=qe,ur=!0,zi=!0)}if(nn.isSkinnedMesh){bi.setOptional(pe,nn,\"bindMatrix\"),bi.setOptional(pe,nn,\"bindMatrixInverse\");const ds=nn.skeleton;ds\u0026\u0026(ds.boneTexture===null\u0026\u0026ds.computeBoneTexture(),bi.setValue(pe,\"boneTexture\",ds.boneTexture,we))}nn.isBatchedMesh\u0026\u0026(bi.setOptional(pe,nn,\"batchingTexture\"),bi.setValue(pe,\"batchingTexture\",nn._matricesTexture,we),bi.setOptional(pe,nn,\"batchingColorTexture\"),nn._colorsTexture!==null\u0026\u0026bi.setValue(pe,\"batchingColorTexture\",nn._colorsTexture,we));const ws=qt.morphAttributes;if((ws.position!==void 0||ws.normal!==void 0||ws.color!==void 0)\u0026\u0026bt.update(nn,qt,Nr),(ur||Ko.receiveShadow!==nn.receiveShadow)\u0026\u0026(Ko.receiveShadow=nn.receiveShadow,bi.setValue(pe,\"receiveShadow\",nn.receiveShadow)),Zt.isMeshGouraudMaterial\u0026\u0026Zt.envMap!==null\u0026\u0026(Ar.envMap.value=ei,Ar.flipEnvMap.value=ei.isCubeTexture\u0026\u0026ei.isRenderTargetTexture===!1?-1:1),Zt.isMeshStandardMaterial\u0026\u0026Zt.envMap===null\u0026\u0026vt.environment!==null\u0026\u0026(Ar.envMapIntensity.value=vt.environmentIntensity),ur\u0026\u0026(bi.setValue(pe,\"toneMappingExposure\",I.toneMappingExposure),Ko.needsLights\u0026\u0026Ho(Ar,zi),zn\u0026\u0026Zt.fog===!0\u0026\u0026Ye.refreshFogUniforms(Ar,zn),Ye.refreshMaterialUniforms(Ar,Zt,U,O,m.state.transmissionRenderTarget[qe.id]),jde.upload(pe,Kt(Ko),Ar,we)),Zt.isShaderMaterial\u0026\u0026Zt.uniformsNeedUpdate===!0\u0026\u0026(jde.upload(pe,Kt(Ko),Ar,we),Zt.uniformsNeedUpdate=!1),Zt.isSpriteMaterial\u0026\u0026bi.setValue(pe,\"center\",nn.center),bi.setValue(pe,\"modelViewMatrix\",nn.modelViewMatrix),bi.setValue(pe,\"normalMatrix\",nn.normalMatrix),bi.setValue(pe,\"modelMatrix\",nn.matrixWorld),Zt.isShaderMaterial||Zt.isRawShaderMaterial){const ds=Zt.uniformsGroups;for(let Et=0,Gt=ds.length;Et\u003cGt;Et++){const Rt=ds[Et];Yt.update(Rt,Nr),Yt.bind(Rt,Nr)}}return Nr}function Ho(qe,vt){qe.ambientLightColor.needsUpdate=vt,qe.lightProbe.needsUpdate=vt,qe.directionalLights.needsUpdate=vt,qe.directionalLightShadows.needsUpdate=vt,qe.pointLights.needsUpdate=vt,qe.pointLightShadows.needsUpdate=vt,qe.spotLights.needsUpdate=vt,qe.spotLightShadows.needsUpdate=vt,qe.rectAreaLights.needsUpdate=vt,qe.hemisphereLights.needsUpdate=vt}function Ao(qe){return qe.isMeshLambertMaterial||qe.isMeshToonMaterial||qe.isMeshPhongMaterial||qe.isMeshStandardMaterial||qe.isShadowMaterial||qe.isShaderMaterial\u0026\u0026qe.lights===!0}this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return E},this.setRenderTargetTextures=function(qe,vt,qt){Pe.get(qe.texture).__webglTexture=vt,Pe.get(qe.depthTexture).__webglTexture=qt;const Zt=Pe.get(qe);Zt.__hasExternalTextures=!0,Zt.__autoAllocateDepthBuffer=qt===void 0,Zt.__autoAllocateDepthBuffer||Me.has(\"WEBGL_multisampled_render_to_texture\")===!0\u0026\u0026(console.warn(\"THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided\"),Zt.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(qe,vt){const qt=Pe.get(qe);qt.__webglFramebuffer=vt,qt.__useDefaultFramebuffer=vt===void 0},this.setRenderTarget=function(qe,vt=0,qt=0){E=qe,y=vt,x=qt;let Zt=!0,nn=null,zn=!1,Nn=!1;if(qe){const ei=Pe.get(qe);ei.__useDefaultFramebuffer!==void 0?(he.bindFramebuffer(pe.FRAMEBUFFER,null),Zt=!1):ei.__webglFramebuffer===void 0?we.setupRenderTarget(qe):ei.__hasExternalTextures\u0026\u0026we.rebindTextures(qe,Pe.get(qe.texture).__webglTexture,Pe.get(qe.depthTexture).__webglTexture);const ro=qe.texture;(ro.isData3DTexture||ro.isDataArrayTexture||ro.isCompressedArrayTexture)\u0026\u0026(Nn=!0);const To=Pe.get(qe).__webglFramebuffer;qe.isWebGLCubeRenderTarget?(Array.isArray(To[vt])?nn=To[vt][qt]:nn=To[vt],zn=!0):qe.samples\u003e0\u0026\u0026we.useMultisampledRTT(qe)===!1?nn=Pe.get(qe).__webglMultisampledFramebuffer:Array.isArray(To)?nn=To[qt]:nn=To,Q.copy(qe.viewport),w.copy(qe.scissor),M=qe.scissorTest}else Q.copy(te).multiplyScalar(U).floor(),w.copy(j).multiplyScalar(U).floor(),M=J;if(he.bindFramebuffer(pe.FRAMEBUFFER,nn)\u0026\u0026Zt\u0026\u0026he.drawBuffers(qe,nn),he.viewport(Q),he.scissor(w),he.setScissorTest(M),zn){const ei=Pe.get(qe.texture);pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_CUBE_MAP_POSITIVE_X+vt,ei.__webglTexture,qt)}else if(Nn){const ei=Pe.get(qe.texture),ro=vt||0;pe.framebufferTextureLayer(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,ei.__webglTexture,qt||0,ro)}B=-1},this.readRenderTargetPixels=function(qe,vt,qt,Zt,nn,zn,Nn){if(!(qe\u0026\u0026qe.isWebGLRenderTarget)){console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.\");return}let Co=Pe.get(qe).__webglFramebuffer;if(qe.isWebGLCubeRenderTarget\u0026\u0026Nn!==void 0\u0026\u0026(Co=Co[Nn]),Co){he.bindFramebuffer(pe.FRAMEBUFFER,Co);try{const ei=qe.texture,ro=ei.format,To=ei.type;if(!ve.textureFormatReadable(ro)){console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.\");return}if(!ve.textureTypeReadable(To)){console.error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.\");return}vt\u003e=0\u0026\u0026vt\u003c=qe.width-Zt\u0026\u0026qt\u003e=0\u0026\u0026qt\u003c=qe.height-nn\u0026\u0026pe.readPixels(vt,qt,Zt,nn,kt.convert(ro),kt.convert(To),zn)}finally{const ei=E!==null?Pe.get(E).__webglFramebuffer:null;he.bindFramebuffer(pe.FRAMEBUFFER,ei)}}},this.readRenderTargetPixelsAsync=async function(qe,vt,qt,Zt,nn,zn,Nn){if(!(qe\u0026\u0026qe.isWebGLRenderTarget))throw new Error(\"THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.\");let Co=Pe.get(qe).__webglFramebuffer;if(qe.isWebGLCubeRenderTarget\u0026\u0026Nn!==void 0\u0026\u0026(Co=Co[Nn]),Co){he.bindFramebuffer(pe.FRAMEBUFFER,Co);try{const ei=qe.texture,ro=ei.format,To=ei.type;if(!ve.textureFormatReadable(ro))throw new Error(\"THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.\");if(!ve.textureTypeReadable(To))throw new Error(\"THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.\");if(vt\u003e=0\u0026\u0026vt\u003c=qe.width-Zt\u0026\u0026qt\u003e=0\u0026\u0026qt\u003c=qe.height-nn){const yo=pe.createBuffer();pe.bindBuffer(pe.PIXEL_PACK_BUFFER,yo),pe.bufferData(pe.PIXEL_PACK_BUFFER,zn.byteLength,pe.STREAM_READ),pe.readPixels(vt,qt,Zt,nn,kt.convert(ro),kt.convert(To),0),pe.flush();const Ro=pe.fenceSync(pe.SYNC_GPU_COMMANDS_COMPLETE,0);await E$o(pe,Ro,4);try{pe.bindBuffer(pe.PIXEL_PACK_BUFFER,yo),pe.getBufferSubData(pe.PIXEL_PACK_BUFFER,0,zn)}finally{pe.deleteBuffer(yo),pe.deleteSync(Ro)}return zn}}finally{const ei=E!==null?Pe.get(E).__webglFramebuffer:null;he.bindFramebuffer(pe.FRAMEBUFFER,ei)}}},this.copyFramebufferToTexture=function(qe,vt=null,qt=0){qe.isTexture!==!0\u0026\u0026(console.warn(\"WebGLRenderer: copyFramebufferToTexture function signature has changed.\"),vt=arguments[0]||null,qe=arguments[1]);const Zt=Math.pow(2,-qt),nn=Math.floor(qe.image.width*Zt),zn=Math.floor(qe.image.height*Zt),Nn=vt!==null?vt.x:0,Co=vt!==null?vt.y:0;we.setTexture2D(qe,0),pe.copyTexSubImage2D(pe.TEXTURE_2D,qt,0,0,Nn,Co,nn,zn),he.unbindTexture()},this.copyTextureToTexture=function(qe,vt,qt=null,Zt=null,nn=0){qe.isTexture!==!0\u0026\u0026(console.warn(\"WebGLRenderer: copyTextureToTexture function signature has changed.\"),Zt=arguments[0]||null,qe=arguments[1],vt=arguments[2],nn=arguments[3]||0,qt=null);let zn,Nn,Co,ei,ro,To;qt!==null?(zn=qt.max.x-qt.min.x,Nn=qt.max.y-qt.min.y,Co=qt.min.x,ei=qt.min.y):(zn=qe.image.width,Nn=qe.image.height,Co=0,ei=0),Zt!==null?(ro=Zt.x,To=Zt.y):(ro=0,To=0);const yo=kt.convert(vt.format),Ro=kt.convert(vt.type);we.setTexture2D(vt,0),pe.pixelStorei(pe.UNPACK_FLIP_Y_WEBGL,vt.flipY),pe.pixelStorei(pe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,vt.premultiplyAlpha),pe.pixelStorei(pe.UNPACK_ALIGNMENT,vt.unpackAlignment);const On=pe.getParameter(pe.UNPACK_ROW_LENGTH),uo=pe.getParameter(pe.UNPACK_IMAGE_HEIGHT),Oo=pe.getParameter(pe.UNPACK_SKIP_PIXELS),ko=pe.getParameter(pe.UNPACK_SKIP_ROWS),Ko=pe.getParameter(pe.UNPACK_SKIP_IMAGES),mi=qe.isCompressedTexture?qe.mipmaps[nn]:qe.image;pe.pixelStorei(pe.UNPACK_ROW_LENGTH,mi.width),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,mi.height),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,Co),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,ei),qe.isDataTexture?pe.texSubImage2D(pe.TEXTURE_2D,nn,ro,To,zn,Nn,yo,Ro,mi.data):qe.isCompressedTexture?pe.compressedTexSubImage2D(pe.TEXTURE_2D,nn,ro,To,mi.width,mi.height,yo,mi.data):pe.texSubImage2D(pe.TEXTURE_2D,nn,ro,To,yo,Ro,mi),pe.pixelStorei(pe.UNPACK_ROW_LENGTH,On),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,uo),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,Oo),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,ko),pe.pixelStorei(pe.UNPACK_SKIP_IMAGES,Ko),nn===0\u0026\u0026vt.generateMipmaps\u0026\u0026pe.generateMipmap(pe.TEXTURE_2D),he.unbindTexture()},this.copyTextureToTexture3D=function(qe,vt,qt=null,Zt=null,nn=0){qe.isTexture!==!0\u0026\u0026(console.warn(\"WebGLRenderer: copyTextureToTexture3D function signature has changed.\"),qt=arguments[0]||null,Zt=arguments[1]||null,qe=arguments[2],vt=arguments[3],nn=arguments[4]||0);let zn,Nn,Co,ei,ro,To,yo,Ro,On;const uo=qe.isCompressedTexture?qe.mipmaps[nn]:qe.image;qt!==null?(zn=qt.max.x-qt.min.x,Nn=qt.max.y-qt.min.y,Co=qt.max.z-qt.min.z,ei=qt.min.x,ro=qt.min.y,To=qt.min.z):(zn=uo.width,Nn=uo.height,Co=uo.depth,ei=0,ro=0,To=0),Zt!==null?(yo=Zt.x,Ro=Zt.y,On=Zt.z):(yo=0,Ro=0,On=0);const Oo=kt.convert(vt.format),ko=kt.convert(vt.type);let Ko;if(vt.isData3DTexture)we.setTexture3D(vt,0),Ko=pe.TEXTURE_3D;else if(vt.isDataArrayTexture||vt.isCompressedArrayTexture)we.setTexture2DArray(vt,0),Ko=pe.TEXTURE_2D_ARRAY;else{console.warn(\"THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.\");return}pe.pixelStorei(pe.UNPACK_FLIP_Y_WEBGL,vt.flipY),pe.pixelStorei(pe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,vt.premultiplyAlpha),pe.pixelStorei(pe.UNPACK_ALIGNMENT,vt.unpackAlignment);const mi=pe.getParameter(pe.UNPACK_ROW_LENGTH),Fo=pe.getParameter(pe.UNPACK_IMAGE_HEIGHT),Nr=pe.getParameter(pe.UNPACK_SKIP_PIXELS),Rs=pe.getParameter(pe.UNPACK_SKIP_ROWS),ur=pe.getParameter(pe.UNPACK_SKIP_IMAGES);pe.pixelStorei(pe.UNPACK_ROW_LENGTH,uo.width),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,uo.height),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,ei),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,ro),pe.pixelStorei(pe.UNPACK_SKIP_IMAGES,To),qe.isDataTexture||qe.isData3DTexture?pe.texSubImage3D(Ko,nn,yo,Ro,On,zn,Nn,Co,Oo,ko,uo.data):vt.isCompressedArrayTexture?pe.compressedTexSubImage3D(Ko,nn,yo,Ro,On,zn,Nn,Co,Oo,uo.data):pe.texSubImage3D(Ko,nn,yo,Ro,On,zn,Nn,Co,Oo,ko,uo),pe.pixelStorei(pe.UNPACK_ROW_LENGTH,mi),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,Fo),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,Nr),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,Rs),pe.pixelStorei(pe.UNPACK_SKIP_IMAGES,ur),nn===0\u0026\u0026vt.generateMipmaps\u0026\u0026pe.generateMipmap(Ko),he.unbindTexture()},this.initRenderTarget=function(qe){Pe.get(qe).__webglFramebuffer===void 0\u0026\u0026we.setupRenderTarget(qe)},this.initTexture=function(qe){qe.isCubeTexture?we.setTextureCube(qe,0):qe.isData3DTexture?we.setTexture3D(qe,0):qe.isDataArrayTexture||qe.isCompressedArrayTexture?we.setTexture2DArray(qe,0):we.setTexture2D(qe,0),he.unbindTexture()},this.resetState=function(){y=0,x=0,E=null,he.reset(),it.reset()},typeof __THREE_DEVTOOLS__\u003c\"u\"\u0026\u0026__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\",{detail:this}))}get coordinateSystem(){return Xb}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===nTe?\"display-p3\":\"srgb\",n.unpackColorSpace=iu.workingColorSpace===xde?\"display-p3\":\"srgb\"}}class KR extends T0{constructor(){super(),this.isScene=!0,this.type=\"Scene\",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new t2,this.environmentIntensity=1,this.environmentRotation=new t2,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__\u003c\"u\"\u0026\u0026__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"observe\",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null\u0026\u0026(this.background=e.background.clone()),e.environment!==null\u0026\u0026(this.environment=e.environment.clone()),e.fog!==null\u0026\u0026(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null\u0026\u0026(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null\u0026\u0026(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness\u003e0\u0026\u0026(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1\u0026\u0026(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1\u0026\u0026(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class Jei{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=oTe,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=u4()}onUploadCallback(){}set needsUpdate(e){e===!0\u0026\u0026this.version++}get updateRange(){return sTe(\"THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.\"),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,o){e*=this.stride,o*=n.stride;for(let i=0,r=this.stride;i\u003cr;i++)this.array[e+i]=n.array[o+i];return this}set(e,n=0){return this.array.set(e,n),this}clone(e){e.arrayBuffers===void 0\u0026\u0026(e.arrayBuffers={}),this.array.buffer._uuid===void 0\u0026\u0026(this.array.buffer._uuid=u4()),e.arrayBuffers[this.array.buffer._uuid]===void 0\u0026\u0026(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const n=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),o=new this.constructor(n,this.stride);return o.setUsage(this.usage),o}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0\u0026\u0026(e.arrayBuffers={}),this.array.buffer._uuid===void 0\u0026\u0026(this.array.buffer._uuid=u4()),e.arrayBuffers[this.array.buffer._uuid]===void 0\u0026\u0026(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const o2=new jt;class FTe{constructor(e,n,o,i=!1){this.isInterleavedBufferAttribute=!0,this.name=\"\",this.data=e,this.itemSize=n,this.offset=o,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let n=0,o=this.data.count;n\u003co;n++)o2.fromBufferAttribute(this,n),o2.applyMatrix4(e),this.setXYZ(n,o2.x,o2.y,o2.z);return this}applyNormalMatrix(e){for(let n=0,o=this.count;n\u003co;n++)o2.fromBufferAttribute(this,n),o2.applyNormalMatrix(e),this.setXYZ(n,o2.x,o2.y,o2.z);return this}transformDirection(e){for(let n=0,o=this.count;n\u003co;n++)o2.fromBufferAttribute(this,n),o2.transformDirection(e),this.setXYZ(n,o2.x,o2.y,o2.z);return this}getComponent(e,n){let o=this.array[e*this.data.stride+this.offset+n];return this.normalized\u0026\u0026(o=HB(o,this.array)),o}setComponent(e,n,o){return this.normalized\u0026\u0026(o=ou(o,this.array)),this.data.array[e*this.data.stride+this.offset+n]=o,this}setX(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset]=n,this}setY(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset+1]=n,this}setZ(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset+2]=n,this}setW(e,n){return this.normalized\u0026\u0026(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset+3]=n,this}getX(e){let n=this.data.array[e*this.data.stride+this.offset];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}getY(e){let n=this.data.array[e*this.data.stride+this.offset+1];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}getZ(e){let n=this.data.array[e*this.data.stride+this.offset+2];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}getW(e){let n=this.data.array[e*this.data.stride+this.offset+3];return this.normalized\u0026\u0026(n=HB(n,this.array)),n}setXY(e,n,o){return e=e*this.data.stride+this.offset,this.normalized\u0026\u0026(n=ou(n,this.array),o=ou(o,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=o,this}setXYZ(e,n,o,i){return e=e*this.data.stride+this.offset,this.normalized\u0026\u0026(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=o,this.data.array[e+2]=i,this}setXYZW(e,n,o,i,r){return e=e*this.data.stride+this.offset,this.normalized\u0026\u0026(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array),r=ou(r,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=o,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){console.log(\"THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.\");const n=[];for(let o=0;o\u003cthis.count;o++){const i=o*this.data.stride+this.offset;for(let r=0;r\u003cthis.itemSize;r++)n.push(this.data.array[i+r])}return new tg(new this.array.constructor(n),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0\u0026\u0026(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0\u0026\u0026(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new FTe(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log(\"THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.\");const n=[];for(let o=0;o\u003cthis.count;o++){const i=o*this.data.stride+this.offset;for(let r=0;r\u003cthis.itemSize;r++)n.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:n,normalized:this.normalized}}else return e.interleavedBuffers===void 0\u0026\u0026(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0\u0026\u0026(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const bzt=new jt,Szt=new ru,Qzt=new ru,Wei=new jt,vzt=new va,qde=new jt,LTe=new GB,wzt=new va,HTe=new zG;class jei extends Er{constructor(e,n){super(e,n),this.isSkinnedMesh=!0,this.type=\"SkinnedMesh\",this.bindMode=MKt,this.bindMatrix=new va,this.bindMatrixInverse=new va,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null\u0026\u0026(this.boundingBox=new e2),this.boundingBox.makeEmpty();const n=e.getAttribute(\"position\");for(let o=0;o\u003cn.count;o++)this.getVertexPosition(o,qde),this.boundingBox.expandByPoint(qde)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null\u0026\u0026(this.boundingSphere=new GB),this.boundingSphere.makeEmpty();const n=e.getAttribute(\"position\");for(let o=0;o\u003cn.count;o++)this.getVertexPosition(o,qde),this.boundingSphere.expandByPoint(qde)}copy(e,n){return super.copy(e,n),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null\u0026\u0026(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null\u0026\u0026(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,n){const o=this.material,i=this.matrixWorld;o!==void 0\u0026\u0026(this.boundingSphere===null\u0026\u0026this.computeBoundingSphere(),LTe.copy(this.boundingSphere),LTe.applyMatrix4(i),e.ray.intersectsSphere(LTe)!==!1\u0026\u0026(wzt.copy(i).invert(),HTe.copy(e.ray).applyMatrix4(wzt),!(this.boundingBox!==null\u0026\u0026HTe.intersectsBox(this.boundingBox)===!1)\u0026\u0026this._computeIntersections(e,n,HTe)))}getVertexPosition(e,n){return super.getVertexPosition(e,n),this.applyBoneTransform(e,n),n}bind(e,n){this.skeleton=e,n===void 0\u0026\u0026(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),n=this.matrixWorld),this.bindMatrix.copy(n),this.bindMatrixInverse.copy(n).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new ru,n=this.geometry.attributes.skinWeight;for(let o=0,i=n.count;o\u003ci;o++){e.fromBufferAttribute(n,o);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),n.setXYZW(o,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===MKt?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===Hjo?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn(\"THREE.SkinnedMesh: Unrecognized bindMode: \"+this.bindMode)}applyBoneTransform(e,n){const o=this.skeleton,i=this.geometry;Szt.fromBufferAttribute(i.attributes.skinIndex,e),Qzt.fromBufferAttribute(i.attributes.skinWeight,e),bzt.copy(n).applyMatrix4(this.bindMatrix),n.set(0,0,0);for(let r=0;r\u003c4;r++){const s=Qzt.getComponent(r);if(s!==0){const a=Szt.getComponent(r);vzt.multiplyMatrices(o.bones[a].matrixWorld,o.boneInverses[a]),n.addScaledVector(Wei.copy(bzt).applyMatrix4(vzt),s)}}return n.applyMatrix4(this.bindMatrixInverse)}}class Pzt extends T0{constructor(){super(),this.isBone=!0,this.type=\"Bone\"}}class OTe extends Hg{constructor(e=null,n=1,o=1,i,r,s,a,A,c=wC,l=wC,u,g){super(null,s,a,A,c,l,i,r,u,g),this.isDataTexture=!0,this.image={data:e,width:n,height:o},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Mzt=new va,$ei=new va;class GTe{constructor(e=[],n=[]){this.uuid=u4(),this.bones=e.slice(0),this.boneInverses=n,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,n=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),n.length===0)this.calculateInverses();else if(e.length!==n.length){console.warn(\"THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.\"),this.boneInverses=[];for(let o=0,i=this.bones.length;o\u003ci;o++)this.boneInverses.push(new va)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,n=this.bones.length;e\u003cn;e++){const o=new va;this.bones[e]\u0026\u0026o.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(o)}}pose(){for(let e=0,n=this.bones.length;e\u003cn;e++){const o=this.bones[e];o\u0026\u0026o.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,n=this.bones.length;e\u003cn;e++){const o=this.bones[e];o\u0026\u0026(o.parent\u0026\u0026o.parent.isBone?(o.matrix.copy(o.parent.matrixWorld).invert(),o.matrix.multiply(o.matrixWorld)):o.matrix.copy(o.matrixWorld),o.matrix.decompose(o.position,o.quaternion,o.scale))}}update(){const e=this.bones,n=this.boneInverses,o=this.boneMatrices,i=this.boneTexture;for(let r=0,s=e.length;r\u003cs;r++){const a=e[r]?e[r].matrixWorld:$ei;Mzt.multiplyMatrices(a,n[r]),Mzt.toArray(o,r*16)}i!==null\u0026\u0026(i.needsUpdate=!0)}clone(){return new GTe(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const n=new Float32Array(e*e*4);n.set(this.boneMatrices);const o=new OTe(n,e,e,l4,m6);return o.needsUpdate=!0,this.boneMatrices=n,this.boneTexture=o,this}getBoneByName(e){for(let n=0,o=this.bones.length;n\u003co;n++){const i=this.bones[n];if(i.name===e)return i}}dispose(){this.boneTexture!==null\u0026\u0026(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,n){this.uuid=e.uuid;for(let o=0,i=e.bones.length;o\u003ci;o++){const r=e.bones[o];let s=n[r];s===void 0\u0026\u0026(console.warn(\"THREE.Skeleton: No bone found with UUID:\",r),s=new Pzt),this.bones.push(s),this.boneInverses.push(new va().fromArray(e.boneInverses[o]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:\"Skeleton\",generator:\"Skeleton.toJSON\"},bones:[],boneInverses:[]};e.uuid=this.uuid;const n=this.bones,o=this.boneInverses;for(let i=0,r=n.length;i\u003cr;i++){const s=n[i];e.bones.push(s.uuid);const a=o[i];e.boneInverses.push(a.toArray())}return e}}class Xde extends tg{constructor(e,n,o,i=1){super(e,n,o),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const cY=new va,Dzt=new va,Zde=[],Nzt=new e2,qei=new va,Kq=new Er,Vq=new GB;class Xei extends Er{constructor(e,n,o){super(e,n),this.isInstancedMesh=!0,this.instanceMatrix=new Xde(new Float32Array(o*16),16),this.instanceColor=null,this.morphTexture=null,this.count=o,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i\u003co;i++)this.setMatrixAt(i,qei)}computeBoundingBox(){const e=this.geometry,n=this.count;this.boundingBox===null\u0026\u0026(this.boundingBox=new e2),e.boundingBox===null\u0026\u0026e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let o=0;o\u003cn;o++)this.getMatrixAt(o,cY),Nzt.copy(e.boundingBox).applyMatrix4(cY),this.boundingBox.union(Nzt)}computeBoundingSphere(){const e=this.geometry,n=this.count;this.boundingSphere===null\u0026\u0026(this.boundingSphere=new GB),e.boundingSphere===null\u0026\u0026e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let o=0;o\u003cn;o++)this.getMatrixAt(o,cY),Vq.copy(e.boundingSphere).applyMatrix4(cY),this.boundingSphere.union(Vq)}copy(e,n){return super.copy(e,n),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null\u0026\u0026(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null\u0026\u0026(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null\u0026\u0026(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null\u0026\u0026(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,n){n.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,n){n.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,n){const o=n.morphTargetInfluences,i=this.morphTexture.source.data.data,r=o.length+1,s=e*r+1;for(let a=0;a\u003co.length;a++)o[a]=i[s+a]}raycast(e,n){const o=this.matrixWorld,i=this.count;if(Kq.geometry=this.geometry,Kq.material=this.material,Kq.material!==void 0\u0026\u0026(this.boundingSphere===null\u0026\u0026this.computeBoundingSphere(),Vq.copy(this.boundingSphere),Vq.applyMatrix4(o),e.ray.intersectsSphere(Vq)!==!1))for(let r=0;r\u003ci;r++){this.getMatrixAt(r,cY),Dzt.multiplyMatrices(o,cY),Kq.matrixWorld=Dzt,Kq.raycast(e,Zde);for(let s=0,a=Zde.length;s\u003ca;s++){const A=Zde[s];A.instanceId=r,A.object=this,n.push(A)}Zde.length=0}}setColorAt(e,n){this.instanceColor===null\u0026\u0026(this.instanceColor=new Xde(new Float32Array(this.instanceMatrix.count*3),3)),n.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,n){n.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,n){const o=n.morphTargetInfluences,i=o.length+1;this.morphTexture===null\u0026\u0026(this.morphTexture=new OTe(new Float32Array(i*this.count),i,this.count,kKt,m6));const r=this.morphTexture.source.data.data;let s=0;for(let c=0;c\u003co.length;c++)s+=o[c];const a=this.geometry.morphTargetsRelative?1:1-s,A=i*e;r[A]=a,r.set(o,A+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:\"dispose\"}),this.morphTexture!==null\u0026\u0026(this.morphTexture.dispose(),this.morphTexture=null),this}}class VR extends Gx{constructor(e){super(),this.isLineBasicMaterial=!0,this.type=\"LineBasicMaterial\",this.color=new Vi(16777215),this.map=null,this.linewidth=1,this.linecap=\"round\",this.linejoin=\"round\",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const ehe=new jt,the=new jt,Rzt=new va,zq=new zG,nhe=new GB,YTe=new jt,Tzt=new jt;let UTe=class extends T0{constructor(e=new Zl,n=new VR){super(),this.isLine=!0,this.type=\"Line\",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,o=[0];for(let i=1,r=n.count;i\u003cr;i++)ehe.fromBufferAttribute(n,i-1),the.fromBufferAttribute(n,i),o[i]=o[i-1],o[i]+=ehe.distanceTo(the);e.setAttribute(\"lineDistance\",new Bs(o,1))}else console.warn(\"THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}raycast(e,n){const o=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,s=o.drawRange;if(o.boundingSphere===null\u0026\u0026o.computeBoundingSphere(),nhe.copy(o.boundingSphere),nhe.applyMatrix4(i),nhe.radius+=r,e.ray.intersectsSphere(nhe)===!1)return;Rzt.copy(i).invert(),zq.copy(e.ray).applyMatrix4(Rzt);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,c=this.isLineSegments?2:1,l=o.index,g=o.attributes.position;if(l!==null){const h=Math.max(0,s.start),d=Math.min(l.count,s.start+s.count);for(let p=h,m=d-1;p\u003cm;p+=c){const _=l.getX(p),f=l.getX(p+1),I=ohe(this,e,zq,A,_,f);I\u0026\u0026n.push(I)}if(this.isLineLoop){const p=l.getX(d-1),m=l.getX(h),_=ohe(this,e,zq,A,p,m);_\u0026\u0026n.push(_)}}else{const h=Math.max(0,s.start),d=Math.min(g.count,s.start+s.count);for(let p=h,m=d-1;p\u003cm;p+=c){const _=ohe(this,e,zq,A,p,p+1);_\u0026\u0026n.push(_)}if(this.isLineLoop){const p=ohe(this,e,zq,A,d-1,h);p\u0026\u0026n.push(p)}}}updateMorphTargets(){const n=this.geometry.morphAttributes,o=Object.keys(n);if(o.length\u003e0){const i=n[o[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=i.length;r\u003cs;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}};function ohe(t,e,n,o,i,r){const s=t.geometry.attributes.position;if(ehe.fromBufferAttribute(s,i),the.fromBufferAttribute(s,r),n.distanceSqToSegment(ehe,the,YTe,Tzt)\u003eo)return;YTe.applyMatrix4(t.matrixWorld);const A=e.ray.origin.distanceTo(YTe);if(!(A\u003ce.near||A\u003ee.far))return{distance:A,point:Tzt.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,object:t}}const kzt=new jt,Fzt=new jt;class Jq extends UTe{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type=\"LineSegments\"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,o=[];for(let i=0,r=n.count;i\u003cr;i+=2)kzt.fromBufferAttribute(n,i),Fzt.fromBufferAttribute(n,i+1),o[i]=i===0?0:o[i-1],o[i+1]=o[i]+kzt.distanceTo(Fzt);e.setAttribute(\"lineDistance\",new Bs(o,1))}else console.warn(\"THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}}class Zei extends UTe{constructor(e,n){super(e,n),this.isLineLoop=!0,this.type=\"LineLoop\"}}class zR extends Gx{constructor(e){super(),this.isPointsMaterial=!0,this.type=\"PointsMaterial\",this.color=new Vi(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const Lzt=new va,KTe=new zG,ihe=new GB,rhe=new jt;class Wq extends T0{constructor(e=new Zl,n=new zR){super(),this.isPoints=!0,this.type=\"Points\",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,n){const o=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,s=o.drawRange;if(o.boundingSphere===null\u0026\u0026o.computeBoundingSphere(),ihe.copy(o.boundingSphere),ihe.applyMatrix4(i),ihe.radius+=r,e.ray.intersectsSphere(ihe)===!1)return;Lzt.copy(i).invert(),KTe.copy(e.ray).applyMatrix4(Lzt);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,c=o.index,u=o.attributes.position;if(c!==null){const g=Math.max(0,s.start),h=Math.min(c.count,s.start+s.count);for(let d=g,p=h;d\u003cp;d++){const m=c.getX(d);rhe.fromBufferAttribute(u,m),Hzt(rhe,m,A,i,e,n,this)}}else{const g=Math.max(0,s.start),h=Math.min(u.count,s.start+s.count);for(let d=g,p=h;d\u003cp;d++)rhe.fromBufferAttribute(u,d),Hzt(rhe,d,A,i,e,n,this)}}updateMorphTargets(){const n=this.geometry.morphAttributes,o=Object.keys(n);if(o.length\u003e0){const i=n[o[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=i.length;r\u003cs;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function Hzt(t,e,n,o,i,r,s){const a=KTe.distanceSqToPoint(t);if(a\u003cn){const A=new jt;KTe.closestPointToPoint(t,A),A.applyMatrix4(o);const c=i.ray.origin.distanceTo(A);if(c\u003ci.near||c\u003ei.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:A,index:e,face:null,object:s})}}class VTe extends Hg{constructor(e,n,o,i,r,s,a,A,c,l,u,g){super(null,s,a,A,c,l,i,r,u,g),this.isCompressedTexture=!0,this.image={width:n,height:o},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Ux extends Hg{constructor(e,n,o,i,r,s,a,A,c){super(e,n,o,i,r,s,a,A,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class C6{constructor(){this.type=\"Curve\",this.arcLengthDivisions=200}getPoint(){return console.warn(\"THREE.Curve: .getPoint() not implemented.\"),null}getPointAt(e,n){const o=this.getUtoTmapping(e);return this.getPoint(o,n)}getPoints(e=5){const n=[];for(let o=0;o\u003c=e;o++)n.push(this.getPoint(o/e));return n}getSpacedPoints(e=5){const n=[];for(let o=0;o\u003c=e;o++)n.push(this.getPointAt(o/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths\u0026\u0026this.cacheArcLengths.length===e+1\u0026\u0026!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let o,i=this.getPoint(0),r=0;n.push(0);for(let s=1;s\u003c=e;s++)o=this.getPoint(s/e),r+=o.distanceTo(i),n.push(r),i=o;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const o=this.getLengths();let i=0;const r=o.length;let s;n?s=n:s=e*o[r-1];let a=0,A=r-1,c;for(;a\u003c=A;)if(i=Math.floor(a+(A-a)/2),c=o[i]-s,c\u003c0)a=i+1;else if(c\u003e0)A=i-1;else{A=i;break}if(i=A,o[i]===s)return i/(r-1);const l=o[i],g=o[i+1]-l,h=(s-l)/g;return(i+h)/(r-1)}getTangent(e,n){let i=e-1e-4,r=e+1e-4;i\u003c0\u0026\u0026(i=0),r\u003e1\u0026\u0026(r=1);const s=this.getPoint(i),a=this.getPoint(r),A=n||(s.isVector2?new ni:new jt);return A.copy(a).sub(s).normalize(),A}getTangentAt(e,n){const o=this.getUtoTmapping(e);return this.getTangent(o,n)}computeFrenetFrames(e,n){const o=new jt,i=[],r=[],s=[],a=new jt,A=new va;for(let h=0;h\u003c=e;h++){const d=h/e;i[h]=this.getTangentAt(d,new jt)}r[0]=new jt,s[0]=new jt;let c=Number.MAX_VALUE;const l=Math.abs(i[0].x),u=Math.abs(i[0].y),g=Math.abs(i[0].z);l\u003c=c\u0026\u0026(c=l,o.set(1,0,0)),u\u003c=c\u0026\u0026(c=u,o.set(0,1,0)),g\u003c=c\u0026\u0026o.set(0,0,1),a.crossVectors(i[0],o).normalize(),r[0].crossVectors(i[0],a),s[0].crossVectors(i[0],r[0]);for(let h=1;h\u003c=e;h++){if(r[h]=r[h-1].clone(),s[h]=s[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()\u003eNumber.EPSILON){a.normalize();const d=Math.acos(rf(i[h-1].dot(i[h]),-1,1));r[h].applyMatrix4(A.makeRotationAxis(a,d))}s[h].crossVectors(i[h],r[h])}if(n===!0){let h=Math.acos(rf(r[0].dot(r[e]),-1,1));h/=e,i[0].dot(a.crossVectors(r[0],r[e]))\u003e0\u0026\u0026(h=-h);for(let d=1;d\u003c=e;d++)r[d].applyMatrix4(A.makeRotationAxis(i[d],h*d)),s[d].crossVectors(i[d],r[d])}return{tangents:i,normals:r,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:\"Curve\",generator:\"Curve.toJSON\"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class zTe extends C6{constructor(e=0,n=0,o=1,i=1,r=0,s=Math.PI*2,a=!1,A=0){super(),this.isEllipseCurve=!0,this.type=\"EllipseCurve\",this.aX=e,this.aY=n,this.xRadius=o,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=a,this.aRotation=A}getPoint(e,n=new ni){const o=n,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)\u003cNumber.EPSILON;for(;r\u003c0;)r+=i;for(;r\u003ei;)r-=i;r\u003cNumber.EPSILON\u0026\u0026(s?r=0:r=i),this.aClockwise===!0\u0026\u0026!s\u0026\u0026(r===i?r=-i:r=r-i);const a=this.aStartAngle+e*r;let A=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const l=Math.cos(this.aRotation),u=Math.sin(this.aRotation),g=A-this.aX,h=c-this.aY;A=g*l-h*u+this.aX,c=g*u+h*l+this.aY}return o.set(A,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class eti extends zTe{constructor(e,n,o,i,r,s){super(e,n,o,o,i,r,s),this.isArcCurve=!0,this.type=\"ArcCurve\"}}function JTe(){let t=0,e=0,n=0,o=0;function i(r,s,a,A){t=r,e=a,n=-3*r+3*s-2*a-A,o=2*r-2*s+a+A}return{initCatmullRom:function(r,s,a,A,c){i(s,a,c*(a-r),c*(A-s))},initNonuniformCatmullRom:function(r,s,a,A,c,l,u){let g=(s-r)/c-(a-r)/(c+l)+(a-s)/l,h=(a-s)/l-(A-s)/(l+u)+(A-a)/u;g*=l,h*=l,i(s,a,g,h)},calc:function(r){const s=r*r,a=s*r;return t+e*r+n*s+o*a}}}const she=new jt,WTe=new JTe,jTe=new JTe,$Te=new JTe;class Ozt extends C6{constructor(e=[],n=!1,o=\"centripetal\",i=.5){super(),this.isCatmullRomCurve3=!0,this.type=\"CatmullRomCurve3\",this.points=e,this.closed=n,this.curveType=o,this.tension=i}getPoint(e,n=new jt){const o=n,i=this.points,r=i.length,s=(r-(this.closed?0:1))*e;let a=Math.floor(s),A=s-a;this.closed?a+=a\u003e0?0:(Math.floor(Math.abs(a)/r)+1)*r:A===0\u0026\u0026a===r-1\u0026\u0026(a=r-2,A=1);let c,l;this.closed||a\u003e0?c=i[(a-1)%r]:(she.subVectors(i[0],i[1]).add(i[0]),c=she);const u=i[a%r],g=i[(a+1)%r];if(this.closed||a+2\u003cr?l=i[(a+2)%r]:(she.subVectors(i[r-1],i[r-2]).add(i[r-1]),l=she),this.curveType===\"centripetal\"||this.curveType===\"chordal\"){const h=this.curveType===\"chordal\"?.5:.25;let d=Math.pow(c.distanceToSquared(u),h),p=Math.pow(u.distanceToSquared(g),h),m=Math.pow(g.distanceToSquared(l),h);p\u003c1e-4\u0026\u0026(p=1),d\u003c1e-4\u0026\u0026(d=p),m\u003c1e-4\u0026\u0026(m=p),WTe.initNonuniformCatmullRom(c.x,u.x,g.x,l.x,d,p,m),jTe.initNonuniformCatmullRom(c.y,u.y,g.y,l.y,d,p,m),$Te.initNonuniformCatmullRom(c.z,u.z,g.z,l.z,d,p,m)}else this.curveType===\"catmullrom\"\u0026\u0026(WTe.initCatmullRom(c.x,u.x,g.x,l.x,this.tension),jTe.initCatmullRom(c.y,u.y,g.y,l.y,this.tension),$Te.initCatmullRom(c.z,u.z,g.z,l.z,this.tension));return o.set(WTe.calc(A),jTe.calc(A),$Te.calc(A)),o}copy(e){super.copy(e),this.points=[];for(let n=0,o=e.points.length;n\u003co;n++){const i=e.points[n];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,o=this.points.length;n\u003co;n++){const i=this.points[n];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,o=e.points.length;n\u003co;n++){const i=e.points[n];this.points.push(new jt().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Gzt(t,e,n,o,i){const r=(o-e)*.5,s=(i-n)*.5,a=t*t,A=t*a;return(2*n-2*o+r+s)*A+(-3*n+3*o-2*r-s)*a+r*t+n}function tti(t,e){const n=1-t;return n*n*e}function nti(t,e){return 2*(1-t)*t*e}function oti(t,e){return t*t*e}function jq(t,e,n,o){return tti(t,e)+nti(t,n)+oti(t,o)}function iti(t,e){const n=1-t;return n*n*n*e}function rti(t,e){const n=1-t;return 3*n*n*t*e}function sti(t,e){return 3*(1-t)*t*t*e}function ati(t,e){return t*t*t*e}function $q(t,e,n,o,i){return iti(t,e)+rti(t,n)+sti(t,o)+ati(t,i)}class Yzt extends C6{constructor(e=new ni,n=new ni,o=new ni,i=new ni){super(),this.isCubicBezierCurve=!0,this.type=\"CubicBezierCurve\",this.v0=e,this.v1=n,this.v2=o,this.v3=i}getPoint(e,n=new ni){const o=n,i=this.v0,r=this.v1,s=this.v2,a=this.v3;return o.set($q(e,i.x,r.x,s.x,a.x),$q(e,i.y,r.y,s.y,a.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Ati extends C6{constructor(e=new jt,n=new jt,o=new jt,i=new jt){super(),this.isCubicBezierCurve3=!0,this.type=\"CubicBezierCurve3\",this.v0=e,this.v1=n,this.v2=o,this.v3=i}getPoint(e,n=new jt){const o=n,i=this.v0,r=this.v1,s=this.v2,a=this.v3;return o.set($q(e,i.x,r.x,s.x,a.x),$q(e,i.y,r.y,s.y,a.y),$q(e,i.z,r.z,s.z,a.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Uzt extends C6{constructor(e=new ni,n=new ni){super(),this.isLineCurve=!0,this.type=\"LineCurve\",this.v1=e,this.v2=n}getPoint(e,n=new ni){const o=n;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new ni){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class cti extends C6{constructor(e=new jt,n=new jt){super(),this.isLineCurve3=!0,this.type=\"LineCurve3\",this.v1=e,this.v2=n}getPoint(e,n=new jt){const o=n;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new jt){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Kzt extends C6{constructor(e=new ni,n=new ni,o=new ni){super(),this.isQuadraticBezierCurve=!0,this.type=\"QuadraticBezierCurve\",this.v0=e,this.v1=n,this.v2=o}getPoint(e,n=new ni){const o=n,i=this.v0,r=this.v1,s=this.v2;return o.set(jq(e,i.x,r.x,s.x),jq(e,i.y,r.y,s.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class lti extends C6{constructor(e=new jt,n=new jt,o=new jt){super(),this.isQuadraticBezierCurve3=!0,this.type=\"QuadraticBezierCurve3\",this.v0=e,this.v1=n,this.v2=o}getPoint(e,n=new jt){const o=n,i=this.v0,r=this.v1,s=this.v2;return o.set(jq(e,i.x,r.x,s.x),jq(e,i.y,r.y,s.y),jq(e,i.z,r.z,s.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Vzt extends C6{constructor(e=[]){super(),this.isSplineCurve=!0,this.type=\"SplineCurve\",this.points=e}getPoint(e,n=new ni){const o=n,i=this.points,r=(i.length-1)*e,s=Math.floor(r),a=r-s,A=i[s===0?s:s-1],c=i[s],l=i[s\u003ei.length-2?i.length-1:s+1],u=i[s\u003ei.length-3?i.length-1:s+2];return o.set(Gzt(a,A.x,c.x,l.x,u.x),Gzt(a,A.y,c.y,l.y,u.y)),o}copy(e){super.copy(e),this.points=[];for(let n=0,o=e.points.length;n\u003co;n++){const i=e.points[n];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,o=this.points.length;n\u003co;n++){const i=this.points[n];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,o=e.points.length;n\u003co;n++){const i=e.points[n];this.points.push(new ni().fromArray(i))}return this}}var qTe=Object.freeze({__proto__:null,ArcCurve:eti,CatmullRomCurve3:Ozt,CubicBezierCurve:Yzt,CubicBezierCurve3:Ati,EllipseCurve:zTe,LineCurve:Uzt,LineCurve3:cti,QuadraticBezierCurve:Kzt,QuadraticBezierCurve3:lti,SplineCurve:Vzt});class uti extends C6{constructor(){super(),this.type=\"CurvePath\",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),n=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(n)){const o=e.isVector2===!0?\"LineCurve\":\"LineCurve3\";this.curves.push(new qTe[o](n,e))}return this}getPoint(e,n){const o=e*this.getLength(),i=this.getCurveLengths();let r=0;for(;r\u003ci.length;){if(i[r]\u003e=o){const s=i[r]-o,a=this.curves[r],A=a.getLength(),c=A===0?0:1-s/A;return a.getPointAt(c,n)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths\u0026\u0026this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let o=0,i=this.curves.length;o\u003ci;o++)n+=this.curves[o].getLength(),e.push(n);return this.cacheLengths=e,e}getSpacedPoints(e=40){const n=[];for(let o=0;o\u003c=e;o++)n.push(this.getPoint(o/e));return this.autoClose\u0026\u0026n.push(n[0]),n}getPoints(e=12){const n=[];let o;for(let i=0,r=this.curves;i\u003cr.length;i++){const s=r[i],a=s.isEllipseCurve?e*2:s.isLineCurve||s.isLineCurve3?1:s.isSplineCurve?e*s.points.length:e,A=s.getPoints(a);for(let c=0;c\u003cA.length;c++){const l=A[c];o\u0026\u0026o.equals(l)||(n.push(l),o=l)}}return this.autoClose\u0026\u0026n.length\u003e1\u0026\u0026!n[n.length-1].equals(n[0])\u0026\u0026n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,o=e.curves.length;n\u003co;n++){const i=e.curves[n];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let n=0,o=this.curves.length;n\u003co;n++){const i=this.curves[n];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let n=0,o=e.curves.length;n\u003co;n++){const i=e.curves[n];this.curves.push(new qTe[i.type]().fromJSON(i))}return this}}class XTe extends uti{constructor(e){super(),this.type=\"Path\",this.currentPoint=new ni,e\u0026\u0026this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let n=1,o=e.length;n\u003co;n++)this.lineTo(e[n].x,e[n].y);return this}moveTo(e,n){return this.currentPoint.set(e,n),this}lineTo(e,n){const o=new Uzt(this.currentPoint.clone(),new ni(e,n));return this.curves.push(o),this.currentPoint.set(e,n),this}quadraticCurveTo(e,n,o,i){const r=new Kzt(this.currentPoint.clone(),new ni(e,n),new ni(o,i));return this.curves.push(r),this.currentPoint.set(o,i),this}bezierCurveTo(e,n,o,i,r,s){const a=new Yzt(this.currentPoint.clone(),new ni(e,n),new ni(o,i),new ni(r,s));return this.curves.push(a),this.currentPoint.set(r,s),this}splineThru(e){const n=[this.currentPoint.clone()].concat(e),o=new Vzt(n);return this.curves.push(o),this.currentPoint.copy(e[e.length-1]),this}arc(e,n,o,i,r,s){const a=this.currentPoint.x,A=this.currentPoint.y;return this.absarc(e+a,n+A,o,i,r,s),this}absarc(e,n,o,i,r,s){return this.absellipse(e,n,o,o,i,r,s),this}ellipse(e,n,o,i,r,s,a,A){const c=this.currentPoint.x,l=this.currentPoint.y;return this.absellipse(e+c,n+l,o,i,r,s,a,A),this}absellipse(e,n,o,i,r,s,a,A){const c=new zTe(e,n,o,i,r,s,a,A);if(this.curves.length\u003e0){const u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);const l=c.getPoint(1);return this.currentPoint.copy(l),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class lY extends Zl{constructor(e=1,n=1,o=1,i=32,r=1,s=!1,a=0,A=Math.PI*2){super(),this.type=\"CylinderGeometry\",this.parameters={radiusTop:e,radiusBottom:n,height:o,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:a,thetaLength:A};const c=this;i=Math.floor(i),r=Math.floor(r);const l=[],u=[],g=[],h=[];let d=0;const p=[],m=o/2;let _=0;f(),s===!1\u0026\u0026(e\u003e0\u0026\u0026I(!0),n\u003e0\u0026\u0026I(!1)),this.setIndex(l),this.setAttribute(\"position\",new Bs(u,3)),this.setAttribute(\"normal\",new Bs(g,3)),this.setAttribute(\"uv\",new Bs(h,2));function f(){const C=new jt,y=new jt;let x=0;const E=(n-e)/o;for(let B=0;B\u003c=r;B++){const S=[],Q=B/r,w=Q*(n-e)+e;for(let M=0;M\u003c=i;M++){const k=M/i,R=k*A+a,F=Math.sin(R),O=Math.cos(R);y.x=w*F,y.y=-Q*o+m,y.z=w*O,u.push(y.x,y.y,y.z),C.set(F,E,O).normalize(),g.push(C.x,C.y,C.z),h.push(k,1-Q),S.push(d++)}p.push(S)}for(let B=0;B\u003ci;B++)for(let S=0;S\u003cr;S++){const Q=p[S][B],w=p[S+1][B],M=p[S+1][B+1],k=p[S][B+1];l.push(Q,w,k),l.push(w,M,k),x+=6}c.addGroup(_,x,0),_+=x}function I(C){const y=d,x=new ni,E=new jt;let B=0;const S=C===!0?e:n,Q=C===!0?1:-1;for(let M=1;M\u003c=i;M++)u.push(0,m*Q,0),g.push(0,Q,0),h.push(.5,.5),d++;const w=d;for(let M=0;M\u003c=i;M++){const R=M/i*A+a,F=Math.cos(R),O=Math.sin(R);E.x=S*O,E.y=m*Q,E.z=S*F,u.push(E.x,E.y,E.z),g.push(0,Q,0),x.x=F*.5+.5,x.y=O*.5*Q+.5,h.push(x.x,x.y),d++}for(let M=0;M\u003ci;M++){const k=y+M,R=w+M;C===!0?l.push(R,R+1,k):l.push(R+1,R,k),B+=3}c.addGroup(_,B,C===!0?1:2),_+=B}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new lY(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ZTe extends lY{constructor(e=1,n=1,o=32,i=1,r=!1,s=0,a=Math.PI*2){super(0,e,n,o,i,r,s,a),this.type=\"ConeGeometry\",this.parameters={radius:e,height:n,radialSegments:o,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:a}}static fromJSON(e){return new ZTe(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}const ahe=new jt,Ahe=new jt,eke=new jt,che=new KB;class gti extends Zl{constructor(e=null,n=1){if(super(),this.type=\"EdgesGeometry\",this.parameters={geometry:e,thresholdAngle:n},e!==null){const i=Math.pow(10,4),r=Math.cos(LG*n),s=e.getIndex(),a=e.getAttribute(\"position\"),A=s?s.count:a.count,c=[0,0,0],l=[\"a\",\"b\",\"c\"],u=new Array(3),g={},h=[];for(let d=0;d\u003cA;d+=3){s?(c[0]=s.getX(d),c[1]=s.getX(d+1),c[2]=s.getX(d+2)):(c[0]=d,c[1]=d+1,c[2]=d+2);const{a:p,b:m,c:_}=che;if(p.fromBufferAttribute(a,c[0]),m.fromBufferAttribute(a,c[1]),_.fromBufferAttribute(a,c[2]),che.getNormal(eke),u[0]=`${Math.round(p.x*i)},${Math.round(p.y*i)},${Math.round(p.z*i)}`,u[1]=`${Math.round(m.x*i)},${Math.round(m.y*i)},${Math.round(m.z*i)}`,u[2]=`${Math.round(_.x*i)},${Math.round(_.y*i)},${Math.round(_.z*i)}`,!(u[0]===u[1]||u[1]===u[2]||u[2]===u[0]))for(let f=0;f\u003c3;f++){const I=(f+1)%3,C=u[f],y=u[I],x=che[l[f]],E=che[l[I]],B=`${C}_${y}`,S=`${y}_${C}`;S in g\u0026\u0026g[S]?(eke.dot(g[S].normal)\u003c=r\u0026\u0026(h.push(x.x,x.y,x.z),h.push(E.x,E.y,E.z)),g[S]=null):B in g||(g[B]={index0:c[f],index1:c[I],normal:eke.clone()})}}for(const d in g)if(g[d]){const{index0:p,index1:m}=g[d];ahe.fromBufferAttribute(a,p),Ahe.fromBufferAttribute(a,m),h.push(ahe.x,ahe.y,ahe.z),h.push(Ahe.x,Ahe.y,Ahe.z)}this.setAttribute(\"position\",new Bs(h,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}let zzt=class extends XTe{constructor(e){super(e),this.uuid=u4(),this.type=\"Shape\",this.holes=[]}getPointsHoles(e){const n=[];for(let o=0,i=this.holes.length;o\u003ci;o++)n[o]=this.holes[o].getPoints(e);return n}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let n=0,o=e.holes.length;n\u003co;n++){const i=e.holes[n];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let n=0,o=this.holes.length;n\u003co;n++){const i=this.holes[n];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let n=0,o=e.holes.length;n\u003co;n++){const i=e.holes[n];this.holes.push(new XTe().fromJSON(i))}return this}};const dti={triangulate:function(t,e,n=2){const o=e\u0026\u0026e.length,i=o?e[0]*n:t.length;let r=Jzt(t,0,i,n,!0);const s=[];if(!r||r.next===r.prev)return s;let a,A,c,l,u,g,h;if(o\u0026\u0026(r=fti(t,e,r,n)),t.length\u003e80*n){a=c=t[0],A=l=t[1];for(let d=n;d\u003ci;d+=n)u=t[d],g=t[d+1],u\u003ca\u0026\u0026(a=u),g\u003cA\u0026\u0026(A=g),u\u003ec\u0026\u0026(c=u),g\u003el\u0026\u0026(l=g);h=Math.max(c-a,l-A),h=h!==0?32767/h:0}return qq(r,s,n,a,A,h,0),s}};function Jzt(t,e,n,o,i){let r,s;if(i===wti(t,e,n,o)\u003e0)for(r=e;r\u003cn;r+=o)s=$zt(r,t[r],t[r+1],s);else for(r=n-o;r\u003e=e;r-=o)s=$zt(r,t[r],t[r+1],s);return s\u0026\u0026lhe(s,s.next)\u0026\u0026(Zq(s),s=s.next),s}function JR(t,e){if(!t)return t;e||(e=t);let n=t,o;do if(o=!1,!n.steiner\u0026\u0026(lhe(n,n.next)||jh(n.prev,n,n.next)===0)){if(Zq(n),n=e=n.prev,n===n.next)break;o=!0}else n=n.next;while(o||n!==e);return e}function qq(t,e,n,o,i,r,s){if(!t)return;!s\u0026\u0026r\u0026\u0026Eti(t,o,i,r);let a=t,A,c;for(;t.prev!==t.next;){if(A=t.prev,c=t.next,r?pti(t,o,i,r):hti(t)){e.push(A.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Zq(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=mti(JR(t),e,n),qq(t,e,n,o,i,r,2)):s===2\u0026\u0026_ti(t,e,n,o,i,r):qq(JR(t),e,n,o,i,r,1);break}}}function hti(t){const e=t.prev,n=t,o=t.next;if(jh(e,n,o)\u003e=0)return!1;const i=e.x,r=n.x,s=o.x,a=e.y,A=n.y,c=o.y,l=i\u003cr?i\u003cs?i:s:r\u003cs?r:s,u=a\u003cA?a\u003cc?a:c:A\u003cc?A:c,g=i\u003er?i\u003es?i:s:r\u003es?r:s,h=a\u003eA?a\u003ec?a:c:A\u003ec?A:c;let d=o.next;for(;d!==e;){if(d.x\u003e=l\u0026\u0026d.x\u003c=g\u0026\u0026d.y\u003e=u\u0026\u0026d.y\u003c=h\u0026\u0026uY(i,a,r,A,s,c,d.x,d.y)\u0026\u0026jh(d.prev,d,d.next)\u003e=0)return!1;d=d.next}return!0}function pti(t,e,n,o){const i=t.prev,r=t,s=t.next;if(jh(i,r,s)\u003e=0)return!1;const a=i.x,A=r.x,c=s.x,l=i.y,u=r.y,g=s.y,h=a\u003cA?a\u003cc?a:c:A\u003cc?A:c,d=l\u003cu?l\u003cg?l:g:u\u003cg?u:g,p=a\u003eA?a\u003ec?a:c:A\u003ec?A:c,m=l\u003eu?l\u003eg?l:g:u\u003eg?u:g,_=tke(h,d,e,n,o),f=tke(p,m,e,n,o);let I=t.prevZ,C=t.nextZ;for(;I\u0026\u0026I.z\u003e=_\u0026\u0026C\u0026\u0026C.z\u003c=f;){if(I.x\u003e=h\u0026\u0026I.x\u003c=p\u0026\u0026I.y\u003e=d\u0026\u0026I.y\u003c=m\u0026\u0026I!==i\u0026\u0026I!==s\u0026\u0026uY(a,l,A,u,c,g,I.x,I.y)\u0026\u0026jh(I.prev,I,I.next)\u003e=0||(I=I.prevZ,C.x\u003e=h\u0026\u0026C.x\u003c=p\u0026\u0026C.y\u003e=d\u0026\u0026C.y\u003c=m\u0026\u0026C!==i\u0026\u0026C!==s\u0026\u0026uY(a,l,A,u,c,g,C.x,C.y)\u0026\u0026jh(C.prev,C,C.next)\u003e=0))return!1;C=C.nextZ}for(;I\u0026\u0026I.z\u003e=_;){if(I.x\u003e=h\u0026\u0026I.x\u003c=p\u0026\u0026I.y\u003e=d\u0026\u0026I.y\u003c=m\u0026\u0026I!==i\u0026\u0026I!==s\u0026\u0026uY(a,l,A,u,c,g,I.x,I.y)\u0026\u0026jh(I.prev,I,I.next)\u003e=0)return!1;I=I.prevZ}for(;C\u0026\u0026C.z\u003c=f;){if(C.x\u003e=h\u0026\u0026C.x\u003c=p\u0026\u0026C.y\u003e=d\u0026\u0026C.y\u003c=m\u0026\u0026C!==i\u0026\u0026C!==s\u0026\u0026uY(a,l,A,u,c,g,C.x,C.y)\u0026\u0026jh(C.prev,C,C.next)\u003e=0)return!1;C=C.nextZ}return!0}function mti(t,e,n){let o=t;do{const i=o.prev,r=o.next.next;!lhe(i,r)\u0026\u0026Wzt(i,o,o.next,r)\u0026\u0026Xq(i,r)\u0026\u0026Xq(r,i)\u0026\u0026(e.push(i.i/n|0),e.push(o.i/n|0),e.push(r.i/n|0),Zq(o),Zq(o.next),o=t=r),o=o.next}while(o!==t);return JR(o)}function _ti(t,e,n,o,i,r){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i\u0026\u0026Sti(s,a)){let A=jzt(s,a);s=JR(s,s.next),A=JR(A,A.next),qq(s,e,n,o,i,r,0),qq(A,e,n,o,i,r,0);return}a=a.next}s=s.next}while(s!==t)}function fti(t,e,n,o){const i=[];let r,s,a,A,c;for(r=0,s=e.length;r\u003cs;r++)a=e[r]*o,A=r\u003cs-1?e[r+1]*o:t.length,c=Jzt(t,a,A,o,!1),c===c.next\u0026\u0026(c.steiner=!0),i.push(bti(c));for(i.sort(Iti),r=0;r\u003ci.length;r++)n=Cti(i[r],n);return n}function Iti(t,e){return t.x-e.x}function Cti(t,e){const n=yti(t,e);if(!n)return e;const o=jzt(n,t);return JR(o,o.next),JR(n,n.next)}function yti(t,e){let n=e,o=-1/0,i;const r=t.x,s=t.y;do{if(s\u003c=n.y\u0026\u0026s\u003e=n.next.y\u0026\u0026n.next.y!==n.y){const g=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(g\u003c=r\u0026\u0026g\u003eo\u0026\u0026(o=g,i=n.x\u003cn.next.x?n:n.next,g===r))return i}n=n.next}while(n!==e);if(!i)return null;const a=i,A=i.x,c=i.y;let l=1/0,u;n=i;do r\u003e=n.x\u0026\u0026n.x\u003e=A\u0026\u0026r!==n.x\u0026\u0026uY(s\u003cc?r:o,s,A,c,s\u003cc?o:r,s,n.x,n.y)\u0026\u0026(u=Math.abs(s-n.y)/(r-n.x),Xq(n,t)\u0026\u0026(u\u003cl||u===l\u0026\u0026(n.x\u003ei.x||n.x===i.x\u0026\u0026xti(i,n)))\u0026\u0026(i=n,l=u)),n=n.next;while(n!==a);return i}function xti(t,e){return jh(t.prev,t,e.prev)\u003c0\u0026\u0026jh(e.next,t,t.next)\u003c0}function Eti(t,e,n,o){let i=t;do i.z===0\u0026\u0026(i.z=tke(i.x,i.y,e,n,o)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,Bti(i)}function Bti(t){let e,n,o,i,r,s,a,A,c=1;do{for(n=t,t=null,r=null,s=0;n;){for(s++,o=n,a=0,e=0;e\u003cc\u0026\u0026(a++,o=o.nextZ,!!o);e++);for(A=c;a\u003e0||A\u003e0\u0026\u0026o;)a!==0\u0026\u0026(A===0||!o||n.z\u003c=o.z)?(i=n,n=n.nextZ,a--):(i=o,o=o.nextZ,A--),r?r.nextZ=i:t=i,i.prevZ=r,r=i;n=o}r.nextZ=null,c*=2}while(s\u003e1);return t}function tke(t,e,n,o,i){return t=(t-n)*i|0,e=(e-o)*i|0,t=(t|t\u003c\u003c8)\u002616711935,t=(t|t\u003c\u003c4)\u0026252645135,t=(t|t\u003c\u003c2)\u0026858993459,t=(t|t\u003c\u003c1)\u00261431655765,e=(e|e\u003c\u003c8)\u002616711935,e=(e|e\u003c\u003c4)\u0026252645135,e=(e|e\u003c\u003c2)\u0026858993459,e=(e|e\u003c\u003c1)\u00261431655765,t|e\u003c\u003c1}function bti(t){let e=t,n=t;do(e.x\u003cn.x||e.x===n.x\u0026\u0026e.y\u003cn.y)\u0026\u0026(n=e),e=e.next;while(e!==t);return n}function uY(t,e,n,o,i,r,s,a){return(i-s)*(e-a)\u003e=(t-s)*(r-a)\u0026\u0026(t-s)*(o-a)\u003e=(n-s)*(e-a)\u0026\u0026(n-s)*(r-a)\u003e=(i-s)*(o-a)}function Sti(t,e){return t.next.i!==e.i\u0026\u0026t.prev.i!==e.i\u0026\u0026!Qti(t,e)\u0026\u0026(Xq(t,e)\u0026\u0026Xq(e,t)\u0026\u0026vti(t,e)\u0026\u0026(jh(t.prev,t,e.prev)||jh(t,e.prev,e))||lhe(t,e)\u0026\u0026jh(t.prev,t,t.next)\u003e0\u0026\u0026jh(e.prev,e,e.next)\u003e0)}function jh(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function lhe(t,e){return t.x===e.x\u0026\u0026t.y===e.y}function Wzt(t,e,n,o){const i=ghe(jh(t,e,n)),r=ghe(jh(t,e,o)),s=ghe(jh(n,o,t)),a=ghe(jh(n,o,e));return!!(i!==r\u0026\u0026s!==a||i===0\u0026\u0026uhe(t,n,e)||r===0\u0026\u0026uhe(t,o,e)||s===0\u0026\u0026uhe(n,t,o)||a===0\u0026\u0026uhe(n,e,o))}function uhe(t,e,n){return e.x\u003c=Math.max(t.x,n.x)\u0026\u0026e.x\u003e=Math.min(t.x,n.x)\u0026\u0026e.y\u003c=Math.max(t.y,n.y)\u0026\u0026e.y\u003e=Math.min(t.y,n.y)}function ghe(t){return t\u003e0?1:t\u003c0?-1:0}function Qti(t,e){let n=t;do{if(n.i!==t.i\u0026\u0026n.next.i!==t.i\u0026\u0026n.i!==e.i\u0026\u0026n.next.i!==e.i\u0026\u0026Wzt(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Xq(t,e){return jh(t.prev,t,t.next)\u003c0?jh(t,e,t.next)\u003e=0\u0026\u0026jh(t,t.prev,e)\u003e=0:jh(t,e,t.prev)\u003c0||jh(t,t.next,e)\u003c0}function vti(t,e){let n=t,o=!1;const i=(t.x+e.x)/2,r=(t.y+e.y)/2;do n.y\u003er!=n.next.y\u003er\u0026\u0026n.next.y!==n.y\u0026\u0026i\u003c(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x\u0026\u0026(o=!o),n=n.next;while(n!==t);return o}function jzt(t,e){const n=new nke(t.i,t.x,t.y),o=new nke(e.i,e.x,e.y),i=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,o.next=n,n.prev=o,r.next=o,o.prev=r,o}function $zt(t,e,n,o){const i=new nke(t,e,n);return o?(i.next=o.next,i.prev=o,o.next.prev=i,o.next=i):(i.prev=i,i.next=i),i}function Zq(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ\u0026\u0026(t.prevZ.nextZ=t.nextZ),t.nextZ\u0026\u0026(t.nextZ.prevZ=t.prevZ)}function nke(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function wti(t,e,n,o){let i=0;for(let r=e,s=n-o;r\u003cn;r+=o)i+=(t[s]-t[r])*(t[r+1]+t[s+1]),s=r;return i}class gY{static area(e){const n=e.length;let o=0;for(let i=n-1,r=0;r\u003cn;i=r++)o+=e[i].x*e[r].y-e[r].x*e[i].y;return o*.5}static isClockWise(e){return gY.area(e)\u003c0}static triangulateShape(e,n){const o=[],i=[],r=[];qzt(e),Xzt(o,e);let s=e.length;n.forEach(qzt);for(let A=0;A\u003cn.length;A++)i.push(s),s+=n[A].length,Xzt(o,n[A]);const a=dti.triangulate(o,i);for(let A=0;A\u003ca.length;A+=3)r.push(a.slice(A,A+3));return r}}function qzt(t){const e=t.length;e\u003e2\u0026\u0026t[e-1].equals(t[0])\u0026\u0026t.pop()}function Xzt(t,e){for(let n=0;n\u003ce.length;n++)t.push(e[n].x),t.push(e[n].y)}class oke extends Zl{constructor(e=new zzt([new ni(.5,.5),new ni(-.5,.5),new ni(-.5,-.5),new ni(.5,-.5)]),n={}){super(),this.type=\"ExtrudeGeometry\",this.parameters={shapes:e,options:n},e=Array.isArray(e)?e:[e];const o=this,i=[],r=[];for(let a=0,A=e.length;a\u003cA;a++){const c=e[a];s(c)}this.setAttribute(\"position\",new Bs(i,3)),this.setAttribute(\"uv\",new Bs(r,2)),this.computeVertexNormals();function s(a){const A=[],c=n.curveSegments!==void 0?n.curveSegments:12,l=n.steps!==void 0?n.steps:1,u=n.depth!==void 0?n.depth:1;let g=n.bevelEnabled!==void 0?n.bevelEnabled:!0,h=n.bevelThickness!==void 0?n.bevelThickness:.2,d=n.bevelSize!==void 0?n.bevelSize:h-.1,p=n.bevelOffset!==void 0?n.bevelOffset:0,m=n.bevelSegments!==void 0?n.bevelSegments:3;const _=n.extrudePath,f=n.UVGenerator!==void 0?n.UVGenerator:Pti;let I,C=!1,y,x,E,B;_\u0026\u0026(I=_.getSpacedPoints(l),C=!0,g=!1,y=_.computeFrenetFrames(l,!1),x=new jt,E=new jt,B=new jt),g||(m=0,h=0,d=0,p=0);const S=a.extractPoints(c);let Q=S.shape;const w=S.holes;if(!gY.isClockWise(Q)){Q=Q.reverse();for(let ye=0,Me=w.length;ye\u003cMe;ye++){const ve=w[ye];gY.isClockWise(ve)\u0026\u0026(w[ye]=ve.reverse())}}const k=gY.triangulateShape(Q,w),R=Q;for(let ye=0,Me=w.length;ye\u003cMe;ye++){const ve=w[ye];Q=Q.concat(ve)}function F(ye,Me,ve){return Me||console.error(\"THREE.ExtrudeGeometry: vec does not exist\"),ye.clone().addScaledVector(Me,ve)}const O=Q.length,U=k.length;function Y(ye,Me,ve){let he,Qe,Pe;const we=ye.x-Me.x,Te=ye.y-Me.y,Re=ve.x-ye.x,Ee=ve.y-ye.y,ke=we*we+Te*Te,Ce=we*Ee-Te*Re;if(Math.abs(Ce)\u003eNumber.EPSILON){const Le=Math.sqrt(ke),Ye=Math.sqrt(Re*Re+Ee*Ee),tt=Me.x-Te/Le,At=Me.y+we/Le,at=ve.x-Ee/Ye,nt=ve.y+Re/Ye,gt=((at-tt)*Ee-(nt-At)*Re)/(we*Ee-Te*Re);he=tt+we*gt-ye.x,Qe=At+Te*gt-ye.y;const bt=he*he+Qe*Qe;if(bt\u003c=2)return new ni(he,Qe);Pe=Math.sqrt(bt/2)}else{let Le=!1;we\u003eNumber.EPSILON?Re\u003eNumber.EPSILON\u0026\u0026(Le=!0):we\u003c-Number.EPSILON?Re\u003c-Number.EPSILON\u0026\u0026(Le=!0):Math.sign(Te)===Math.sign(Ee)\u0026\u0026(Le=!0),Le?(he=-Te,Qe=we,Pe=Math.sqrt(ke)):(he=we,Qe=Te,Pe=Math.sqrt(ke/2))}return new ni(he/Pe,Qe/Pe)}const W=[];for(let ye=0,Me=R.length,ve=Me-1,he=ye+1;ye\u003cMe;ye++,ve++,he++)ve===Me\u0026\u0026(ve=0),he===Me\u0026\u0026(he=0),W[ye]=Y(R[ye],R[ve],R[he]);const te=[];let j,J=W.concat();for(let ye=0,Me=w.length;ye\u003cMe;ye++){const ve=w[ye];j=[];for(let he=0,Qe=ve.length,Pe=Qe-1,we=he+1;he\u003cQe;he++,Pe++,we++)Pe===Qe\u0026\u0026(Pe=0),we===Qe\u0026\u0026(we=0),j[he]=Y(ve[he],ve[Pe],ve[we]);te.push(j),J=J.concat(j)}for(let ye=0;ye\u003cm;ye++){const Me=ye/m,ve=h*Math.cos(Me*Math.PI/2),he=d*Math.sin(Me*Math.PI/2)+p;for(let Qe=0,Pe=R.length;Qe\u003cPe;Qe++){const we=F(R[Qe],W[Qe],he);ge(we.x,we.y,-ve)}for(let Qe=0,Pe=w.length;Qe\u003cPe;Qe++){const we=w[Qe];j=te[Qe];for(let Te=0,Re=we.length;Te\u003cRe;Te++){const Ee=F(we[Te],j[Te],he);ge(Ee.x,Ee.y,-ve)}}}const oe=d+p;for(let ye=0;ye\u003cO;ye++){const Me=g?F(Q[ye],J[ye],oe):Q[ye];C?(E.copy(y.normals[0]).multiplyScalar(Me.x),x.copy(y.binormals[0]).multiplyScalar(Me.y),B.copy(I[0]).add(E).add(x),ge(B.x,B.y,B.z)):ge(Me.x,Me.y,0)}for(let ye=1;ye\u003c=l;ye++)for(let Me=0;Me\u003cO;Me++){const ve=g?F(Q[Me],J[Me],oe):Q[Me];C?(E.copy(y.normals[ye]).multiplyScalar(ve.x),x.copy(y.binormals[ye]).multiplyScalar(ve.y),B.copy(I[ye]).add(E).add(x),ge(B.x,B.y,B.z)):ge(ve.x,ve.y,u/l*ye)}for(let ye=m-1;ye\u003e=0;ye--){const Me=ye/m,ve=h*Math.cos(Me*Math.PI/2),he=d*Math.sin(Me*Math.PI/2)+p;for(let Qe=0,Pe=R.length;Qe\u003cPe;Qe++){const we=F(R[Qe],W[Qe],he);ge(we.x,we.y,u+ve)}for(let Qe=0,Pe=w.length;Qe\u003cPe;Qe++){const we=w[Qe];j=te[Qe];for(let Te=0,Re=we.length;Te\u003cRe;Te++){const Ee=F(we[Te],j[Te],he);C?ge(Ee.x,Ee.y+I[l-1].y,I[l-1].x+ve):ge(Ee.x,Ee.y,u+ve)}}}ie(),ne();function ie(){const ye=i.length/3;if(g){let Me=0,ve=O*Me;for(let he=0;he\u003cU;he++){const Qe=k[he];_e(Qe[2]+ve,Qe[1]+ve,Qe[0]+ve)}Me=l+m*2,ve=O*Me;for(let he=0;he\u003cU;he++){const Qe=k[he];_e(Qe[0]+ve,Qe[1]+ve,Qe[2]+ve)}}else{for(let Me=0;Me\u003cU;Me++){const ve=k[Me];_e(ve[2],ve[1],ve[0])}for(let Me=0;Me\u003cU;Me++){const ve=k[Me];_e(ve[0]+O*l,ve[1]+O*l,ve[2]+O*l)}}o.addGroup(ye,i.length/3-ye,0)}function ne(){const ye=i.length/3;let Me=0;le(R,Me),Me+=R.length;for(let ve=0,he=w.length;ve\u003che;ve++){const Qe=w[ve];le(Qe,Me),Me+=Qe.length}o.addGroup(ye,i.length/3-ye,1)}function le(ye,Me){let ve=ye.length;for(;--ve\u003e=0;){const he=ve;let Qe=ve-1;Qe\u003c0\u0026\u0026(Qe=ye.length-1);for(let Pe=0,we=l+m*2;Pe\u003cwe;Pe++){const Te=O*Pe,Re=O*(Pe+1),Ee=Me+he+Te,ke=Me+Qe+Te,Ce=Me+Qe+Re,Le=Me+he+Re;ue(Ee,ke,Ce,Le)}}}function ge(ye,Me,ve){A.push(ye),A.push(Me),A.push(ve)}function _e(ye,Me,ve){fe(ye),fe(Me),fe(ve);const he=i.length/3,Qe=f.generateTopUV(o,i,he-3,he-2,he-1);pe(Qe[0]),pe(Qe[1]),pe(Qe[2])}function ue(ye,Me,ve,he){fe(ye),fe(Me),fe(he),fe(Me),fe(ve),fe(he);const Qe=i.length/3,Pe=f.generateSideWallUV(o,i,Qe-6,Qe-3,Qe-2,Qe-1);pe(Pe[0]),pe(Pe[1]),pe(Pe[3]),pe(Pe[1]),pe(Pe[2]),pe(Pe[3])}function fe(ye){i.push(A[ye*3+0]),i.push(A[ye*3+1]),i.push(A[ye*3+2])}function pe(ye){r.push(ye.x),r.push(ye.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes,o=this.parameters.options;return Mti(n,o,e)}static fromJSON(e,n){const o=[];for(let r=0,s=e.shapes.length;r\u003cs;r++){const a=n[e.shapes[r]];o.push(a)}const i=e.options.extrudePath;return i!==void 0\u0026\u0026(e.options.extrudePath=new qTe[i.type]().fromJSON(i)),new oke(o,e.options)}}const Pti={generateTopUV:function(t,e,n,o,i){const r=e[n*3],s=e[n*3+1],a=e[o*3],A=e[o*3+1],c=e[i*3],l=e[i*3+1];return[new ni(r,s),new ni(a,A),new ni(c,l)]},generateSideWallUV:function(t,e,n,o,i,r){const s=e[n*3],a=e[n*3+1],A=e[n*3+2],c=e[o*3],l=e[o*3+1],u=e[o*3+2],g=e[i*3],h=e[i*3+1],d=e[i*3+2],p=e[r*3],m=e[r*3+1],_=e[r*3+2];return Math.abs(a-l)\u003cMath.abs(s-c)?[new ni(s,1-A),new ni(c,1-u),new ni(g,1-d),new ni(p,1-_)]:[new ni(a,1-A),new ni(l,1-u),new ni(h,1-d),new ni(m,1-_)]}};function Mti(t,e,n){if(n.shapes=[],Array.isArray(t))for(let o=0,i=t.length;o\u003ci;o++){const r=t[o];n.shapes.push(r.uuid)}else n.shapes.push(t.uuid);return n.options=Object.assign({},e),e.extrudePath!==void 0\u0026\u0026(n.options.extrudePath=e.extrudePath.toJSON()),n}class WR extends Zl{constructor(e=1,n=32,o=16,i=0,r=Math.PI*2,s=0,a=Math.PI){super(),this.type=\"SphereGeometry\",this.parameters={radius:e,widthSegments:n,heightSegments:o,phiStart:i,phiLength:r,thetaStart:s,thetaLength:a},n=Math.max(3,Math.floor(n)),o=Math.max(2,Math.floor(o));const A=Math.min(s+a,Math.PI);let c=0;const l=[],u=new jt,g=new jt,h=[],d=[],p=[],m=[];for(let _=0;_\u003c=o;_++){const f=[],I=_/o;let C=0;_===0\u0026\u0026s===0?C=.5/n:_===o\u0026\u0026A===Math.PI\u0026\u0026(C=-.5/n);for(let y=0;y\u003c=n;y++){const x=y/n;u.x=-e*Math.cos(i+x*r)*Math.sin(s+I*a),u.y=e*Math.cos(s+I*a),u.z=e*Math.sin(i+x*r)*Math.sin(s+I*a),d.push(u.x,u.y,u.z),g.copy(u).normalize(),p.push(g.x,g.y,g.z),m.push(x+C,1-I),f.push(c++)}l.push(f)}for(let _=0;_\u003co;_++)for(let f=0;f\u003cn;f++){const I=l[_][f+1],C=l[_][f],y=l[_+1][f],x=l[_+1][f+1];(_!==0||s\u003e0)\u0026\u0026h.push(I,C,x),(_!==o-1||A\u003cMath.PI)\u0026\u0026h.push(C,y,x)}this.setIndex(h),this.setAttribute(\"position\",new Bs(d,3)),this.setAttribute(\"normal\",new Bs(p,3)),this.setAttribute(\"uv\",new Bs(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new WR(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class su extends Gx{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:\"\"},this.type=\"MeshStandardMaterial\",this.color=new Vi(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Vi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tTe,this.normalScale=new ni(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new t2,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:\"\"},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class CE extends su{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:\"\",PHYSICAL:\"\"},this.type=\"MeshPhysicalMaterial\",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new ni(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,\"reflectivity\",{get:function(){return rf(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Vi(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Vi(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Vi(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy\u003e0!=e\u003e0\u0026\u0026this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat\u003e0!=e\u003e0\u0026\u0026this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence\u003e0!=e\u003e0\u0026\u0026this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion\u003e0!=e\u003e0\u0026\u0026this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen\u003e0!=e\u003e0\u0026\u0026this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission\u003e0!=e\u003e0\u0026\u0026this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:\"\",PHYSICAL:\"\"},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class ike extends Gx{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type=\"MeshPhongMaterial\",this.color=new Vi(16777215),this.specular=new Vi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Vi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tTe,this.normalScale=new ni(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new t2,this.combine=VRe,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=\"round\",this.wireframeLinejoin=\"round\",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function dhe(t,e,n){return!t||!n\u0026\u0026t.constructor===e?t:typeof e.BYTES_PER_ELEMENT==\"number\"?new e(t):Array.prototype.slice.call(t)}function Dti(t){return ArrayBuffer.isView(t)\u0026\u0026!(t instanceof DataView)}function Nti(t){function e(i,r){return t[i]-t[r]}const n=t.length,o=new Array(n);for(let i=0;i!==n;++i)o[i]=i;return o.sort(e),o}function Zzt(t,e,n){const o=t.length,i=new t.constructor(o);for(let r=0,s=0;s!==o;++r){const a=n[r]*e;for(let A=0;A!==e;++A)i[s++]=t[a+A]}return i}function eJt(t,e,n,o){let i=1,r=t[0];for(;r!==void 0\u0026\u0026r[o]===void 0;)r=t[i++];if(r===void 0)return;let s=r[o];if(s!==void 0)if(Array.isArray(s))do s=r[o],s!==void 0\u0026\u0026(e.push(r.time),n.push.apply(n,s)),r=t[i++];while(r!==void 0);else if(s.toArray!==void 0)do s=r[o],s!==void 0\u0026\u0026(e.push(r.time),s.toArray(n,n.length)),r=t[i++];while(r!==void 0);else do s=r[o],s!==void 0\u0026\u0026(e.push(r.time),n.push(s)),r=t[i++];while(r!==void 0)}class eX{constructor(e,n,o,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(o),this.sampleValues=n,this.valueSize=o,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let o=this._cachedIndex,i=n[o],r=n[o-1];e:{t:{let s;n:{o:if(!(e\u003ci)){for(let a=o+2;;){if(i===void 0){if(e\u003cr)break o;return o=n.length,this._cachedIndex=o,this.copySampleValue_(o-1)}if(o===a)break;if(r=i,i=n[++o],e\u003ci)break t}s=n.length;break n}if(!(e\u003e=r)){const a=n[1];e\u003ca\u0026\u0026(o=2,r=a);for(let A=o-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(o===A)break;if(i=r,r=n[--o-1],e\u003e=r)break t}s=o,o=0;break n}break e}for(;o\u003cs;){const a=o+s\u003e\u003e\u003e1;e\u003cn[a]?s=a:o=a+1}if(i=n[o],r=n[o-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return o=n.length,this._cachedIndex=o,this.copySampleValue_(o-1)}this._cachedIndex=o,this.intervalChanged_(o,r,i)}return this.interpolate_(o,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const n=this.resultBuffer,o=this.sampleValues,i=this.valueSize,r=e*i;for(let s=0;s!==i;++s)n[s]=o[r+s];return n}interpolate_(){throw new Error(\"call to abstract method\")}intervalChanged_(){}}class Rti extends eX{constructor(e,n,o,i){super(e,n,o,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:gVt,endingEnd:gVt}}intervalChanged_(e,n,o){const i=this.parameterPositions;let r=e-2,s=e+1,a=i[r],A=i[s];if(a===void 0)switch(this.getSettings_().endingStart){case dVt:r=e,a=2*n-o;break;case hVt:r=i.length-2,a=n+i[r]-i[r+1];break;default:r=e,a=o}if(A===void 0)switch(this.getSettings_().endingEnd){case dVt:s=e,A=2*o-n;break;case hVt:s=1,A=o+i[1]-i[0];break;default:s=e-1,A=n}const c=(o-n)*.5,l=this.valueSize;this._weightPrev=c/(n-a),this._weightNext=c/(A-o),this._offsetPrev=r*l,this._offsetNext=s*l}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=e*a,c=A-a,l=this._offsetPrev,u=this._offsetNext,g=this._weightPrev,h=this._weightNext,d=(o-n)/(i-n),p=d*d,m=p*d,_=-g*m+2*g*p-g*d,f=(1+g)*m+(-1.5-2*g)*p+(-.5+g)*d+1,I=(-1-h)*m+(1.5+h)*p+.5*d,C=h*m-h*p;for(let y=0;y!==a;++y)r[y]=_*s[l+y]+f*s[c+y]+I*s[A+y]+C*s[u+y];return r}}class Tti extends eX{constructor(e,n,o,i){super(e,n,o,i)}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=e*a,c=A-a,l=(o-n)/(i-n),u=1-l;for(let g=0;g!==a;++g)r[g]=s[c+g]*u+s[A+g]*l;return r}}class kti extends eX{constructor(e,n,o,i){super(e,n,o,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class y6{constructor(e,n,o,i){if(e===void 0)throw new Error(\"THREE.KeyframeTrack: track name is undefined\");if(n===void 0||n.length===0)throw new Error(\"THREE.KeyframeTrack: no keyframes in track named \"+e);this.name=e,this.times=dhe(n,this.TimeBufferType),this.values=dhe(o,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const n=e.constructor;let o;if(n.toJSON!==this.toJSON)o=n.toJSON(e);else{o={name:e.name,times:dhe(e.times,Array),values:dhe(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation\u0026\u0026(o.interpolation=i)}return o.type=e.ValueTypeName,o}InterpolantFactoryMethodDiscrete(e){return new kti(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Tti(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Rti(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let n;switch(e){case TG:n=this.InterpolantFactoryMethodDiscrete;break;case kG:n=this.InterpolantFactoryMethodLinear;break;case ZRe:n=this.InterpolantFactoryMethodSmooth;break}if(n===void 0){const o=\"unsupported interpolation for \"+this.ValueTypeName+\" keyframe track named \"+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(o);return console.warn(\"THREE.KeyframeTrack:\",o),this}return this.createInterpolant=n,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return TG;case this.InterpolantFactoryMethodLinear:return kG;case this.InterpolantFactoryMethodSmooth:return ZRe}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const n=this.times;for(let o=0,i=n.length;o!==i;++o)n[o]+=e}return this}scale(e){if(e!==1){const n=this.times;for(let o=0,i=n.length;o!==i;++o)n[o]*=e}return this}trim(e,n){const o=this.times,i=o.length;let r=0,s=i-1;for(;r!==i\u0026\u0026o[r]\u003ce;)++r;for(;s!==-1\u0026\u0026o[s]\u003en;)--s;if(++s,r!==0||s!==i){r\u003e=s\u0026\u0026(s=Math.max(s,1),r=s-1);const a=this.getValueSize();this.times=o.slice(r,s),this.values=this.values.slice(r*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0\u0026\u0026(console.error(\"THREE.KeyframeTrack: Invalid value size in track.\",this),e=!1);const o=this.times,i=this.values,r=o.length;r===0\u0026\u0026(console.error(\"THREE.KeyframeTrack: Track is empty.\",this),e=!1);let s=null;for(let a=0;a!==r;a++){const A=o[a];if(typeof A==\"number\"\u0026\u0026isNaN(A)){console.error(\"THREE.KeyframeTrack: Time is not a valid number.\",this,a,A),e=!1;break}if(s!==null\u0026\u0026s\u003eA){console.error(\"THREE.KeyframeTrack: Out of order keys.\",this,a,A,s),e=!1;break}s=A}if(i!==void 0\u0026\u0026Dti(i))for(let a=0,A=i.length;a!==A;++a){const c=i[a];if(isNaN(c)){console.error(\"THREE.KeyframeTrack: Value is not a valid number.\",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),o=this.getValueSize(),i=this.getInterpolation()===ZRe,r=e.length-1;let s=1;for(let a=1;a\u003cr;++a){let A=!1;const c=e[a],l=e[a+1];if(c!==l\u0026\u0026(a!==1||c!==e[0]))if(i)A=!0;else{const u=a*o,g=u-o,h=u+o;for(let d=0;d!==o;++d){const p=n[u+d];if(p!==n[g+d]||p!==n[h+d]){A=!0;break}}}if(A){if(a!==s){e[s]=e[a];const u=a*o,g=s*o;for(let h=0;h!==o;++h)n[g+h]=n[u+h]}++s}}if(r\u003e0){e[s]=e[r];for(let a=r*o,A=s*o,c=0;c!==o;++c)n[A+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*o)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),o=this.constructor,i=new o(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}y6.prototype.TimeBufferType=Float32Array,y6.prototype.ValueBufferType=Float32Array,y6.prototype.DefaultInterpolation=kG;class dY extends y6{constructor(e,n,o){super(e,n,o)}}dY.prototype.ValueTypeName=\"bool\",dY.prototype.ValueBufferType=Array,dY.prototype.DefaultInterpolation=TG,dY.prototype.InterpolantFactoryMethodLinear=void 0,dY.prototype.InterpolantFactoryMethodSmooth=void 0;class tJt extends y6{}tJt.prototype.ValueTypeName=\"color\";class hY extends y6{}hY.prototype.ValueTypeName=\"number\";class Fti extends eX{constructor(e,n,o,i){super(e,n,o,i)}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=(o-n)/(i-n);let c=e*a;for(let l=c+a;c!==l;c+=4)Zy.slerpFlat(r,0,s,c-a,s,c,A);return r}}class pY extends y6{InterpolantFactoryMethodLinear(e){return new Fti(this.times,this.values,this.getValueSize(),e)}}pY.prototype.ValueTypeName=\"quaternion\",pY.prototype.InterpolantFactoryMethodSmooth=void 0;class mY extends y6{constructor(e,n,o){super(e,n,o)}}mY.prototype.ValueTypeName=\"string\",mY.prototype.ValueBufferType=Array,mY.prototype.DefaultInterpolation=TG,mY.prototype.InterpolantFactoryMethodLinear=void 0,mY.prototype.InterpolantFactoryMethodSmooth=void 0;class _Y extends y6{}_Y.prototype.ValueTypeName=\"vector\";class Lti{constructor(e=\"\",n=-1,o=[],i=jjo){this.name=e,this.tracks=o,this.duration=n,this.blendMode=i,this.uuid=u4(),this.duration\u003c0\u0026\u0026this.resetDuration()}static parse(e){const n=[],o=e.tracks,i=1/(e.fps||1);for(let s=0,a=o.length;s!==a;++s)n.push(Oti(o[s]).scale(i));const r=new this(e.name,e.duration,n,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const n=[],o=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,s=o.length;r!==s;++r)n.push(y6.toJSON(o[r]));return i}static CreateFromMorphTargetSequence(e,n,o,i){const r=n.length,s=[];for(let a=0;a\u003cr;a++){let A=[],c=[];A.push((a+r-1)%r,a,(a+1)%r),c.push(0,1,0);const l=Nti(A);A=Zzt(A,1,l),c=Zzt(c,1,l),!i\u0026\u0026A[0]===0\u0026\u0026(A.push(r),c.push(c[0])),s.push(new hY(\".morphTargetInfluences[\"+n[a].name+\"]\",A,c).scale(1/o))}return new this(e,-1,s)}static findByName(e,n){let o=e;if(!Array.isArray(e)){const i=e;o=i.geometry\u0026\u0026i.geometry.animations||i.animations}for(let i=0;i\u003co.length;i++)if(o[i].name===n)return o[i];return null}static CreateClipsFromMorphTargetSequences(e,n,o){const i={},r=/^([\\w-]*?)([\\d]+)$/;for(let a=0,A=e.length;a\u003cA;a++){const c=e[a],l=c.name.match(r);if(l\u0026\u0026l.length\u003e1){const u=l[1];let g=i[u];g||(i[u]=g=[]),g.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,o));return s}static parseAnimation(e,n){if(!e)return console.error(\"THREE.AnimationClip: No animation in JSONLoader data.\"),null;const o=function(u,g,h,d,p){if(h.length!==0){const m=[],_=[];eJt(h,m,_,d),m.length!==0\u0026\u0026p.push(new u(g,m,_))}},i=[],r=e.name||\"default\",s=e.fps||30,a=e.blendMode;let A=e.length||-1;const c=e.hierarchy||[];for(let u=0;u\u003cc.length;u++){const g=c[u].keys;if(!(!g||g.length===0))if(g[0].morphTargets){const h={};let d;for(d=0;d\u003cg.length;d++)if(g[d].morphTargets)for(let p=0;p\u003cg[d].morphTargets.length;p++)h[g[d].morphTargets[p]]=-1;for(const p in h){const m=[],_=[];for(let f=0;f!==g[d].morphTargets.length;++f){const I=g[d];m.push(I.time),_.push(I.morphTarget===p?1:0)}i.push(new hY(\".morphTargetInfluence[\"+p+\"]\",m,_))}A=h.length*s}else{const h=\".bones[\"+n[u].name+\"]\";o(_Y,h+\".position\",g,\"pos\",i),o(pY,h+\".quaternion\",g,\"rot\",i),o(_Y,h+\".scale\",g,\"scl\",i)}}return i.length===0?null:new this(r,A,i,a)}resetDuration(){const e=this.tracks;let n=0;for(let o=0,i=e.length;o!==i;++o){const r=this.tracks[o];n=Math.max(n,r.times[r.times.length-1])}return this.duration=n,this}trim(){for(let e=0;e\u003cthis.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let n=0;n\u003cthis.tracks.length;n++)e=e\u0026\u0026this.tracks[n].validate();return e}optimize(){for(let e=0;e\u003cthis.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n\u003cthis.tracks.length;n++)e.push(this.tracks[n].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Hti(t){switch(t.toLowerCase()){case\"scalar\":case\"double\":case\"float\":case\"number\":case\"integer\":return hY;case\"vector\":case\"vector2\":case\"vector3\":case\"vector4\":return _Y;case\"color\":return tJt;case\"quaternion\":return pY;case\"bool\":case\"boolean\":return dY;case\"string\":return mY}throw new Error(\"THREE.KeyframeTrack: Unsupported typeName: \"+t)}function Oti(t){if(t.type===void 0)throw new Error(\"THREE.KeyframeTrack: track type undefined, can not parse\");const e=Hti(t.type);if(t.times===void 0){const n=[],o=[];eJt(t.keys,n,o,\"value\"),t.times=n,t.values=o}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const oP={enabled:!1,files:{},add:function(t,e){this.enabled!==!1\u0026\u0026(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class Gti{constructor(e,n,o){const i=this;let r=!1,s=0,a=0,A;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=o,this.itemStart=function(l){a++,r===!1\u0026\u0026i.onStart!==void 0\u0026\u0026i.onStart(l,s,a),r=!0},this.itemEnd=function(l){s++,i.onProgress!==void 0\u0026\u0026i.onProgress(l,s,a),s===a\u0026\u0026(r=!1,i.onLoad!==void 0\u0026\u0026i.onLoad())},this.itemError=function(l){i.onError!==void 0\u0026\u0026i.onError(l)},this.resolveURL=function(l){return A?A(l):l},this.setURLModifier=function(l){return A=l,this},this.addHandler=function(l,u){return c.push(l,u),this},this.removeHandler=function(l){const u=c.indexOf(l);return u!==-1\u0026\u0026c.splice(u,2),this},this.getHandler=function(l){for(let u=0,g=c.length;u\u003cg;u+=2){const h=c[u],d=c[u+1];if(h.global\u0026\u0026(h.lastIndex=0),h.test(l))return d}return null}}}const nJt=new Gti;class x6{constructor(e){this.manager=e!==void 0?e:nJt,this.crossOrigin=\"anonymous\",this.withCredentials=!1,this.path=\"\",this.resourcePath=\"\",this.requestHeader={}}load(){}loadAsync(e,n){const o=this;return new Promise(function(i,r){o.load(e,i,n,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}x6.DEFAULT_MATERIAL_NAME=\"__DEFAULT\";const iS={};class Yti extends Error{constructor(e,n){super(e),this.response=n}}class fY extends x6{constructor(e){super(e)}load(e,n,o,i){e===void 0\u0026\u0026(e=\"\"),this.path!==void 0\u0026\u0026(e=this.path+e),e=this.manager.resolveURL(e);const r=oP.get(e);if(r!==void 0)return this.manager.itemStart(e),setTimeout(()=\u003e{n\u0026\u0026n(r),this.manager.itemEnd(e)},0),r;if(iS[e]!==void 0){iS[e].push({onLoad:n,onProgress:o,onError:i});return}iS[e]=[],iS[e].push({onLoad:n,onProgress:o,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?\"include\":\"same-origin\"}),a=this.mimeType,A=this.responseType;fetch(s).then(c=\u003e{if(c.status===200||c.status===0){if(c.status===0\u0026\u0026console.warn(\"THREE.FileLoader: HTTP Status 0 received.\"),typeof ReadableStream\u003e\"u\"||c.body===void 0||c.body.getReader===void 0)return c;const l=iS[e],u=c.body.getReader(),g=c.headers.get(\"X-File-Size\")||c.headers.get(\"Content-Length\"),h=g?parseInt(g):0,d=h!==0;let p=0;const m=new ReadableStream({start(_){f();function f(){u.read().then(({done:I,value:C})=\u003e{if(I)_.close();else{p+=C.byteLength;const y=new ProgressEvent(\"progress\",{lengthComputable:d,loaded:p,total:h});for(let x=0,E=l.length;x\u003cE;x++){const B=l[x];B.onProgress\u0026\u0026B.onProgress(y)}_.enqueue(C),f()}},I=\u003e{_.error(I)})}}});return new Response(m)}else throw new Yti(`fetch for \"${c.url}\" responded with ${c.status}: ${c.statusText}`,c)}).then(c=\u003e{switch(A){case\"arraybuffer\":return c.arrayBuffer();case\"blob\":return c.blob();case\"document\":return c.text().then(l=\u003enew DOMParser().parseFromString(l,a));case\"json\":return c.json();default:if(a===void 0)return c.text();{const u=/charset=\"?([^;\"\\s]*)\"?/i.exec(a),g=u\u0026\u0026u[1]?u[1].toLowerCase():void 0,h=new TextDecoder(g);return c.arrayBuffer().then(d=\u003eh.decode(d))}}}).then(c=\u003e{oP.add(e,c);const l=iS[e];delete iS[e];for(let u=0,g=l.length;u\u003cg;u++){const h=l[u];h.onLoad\u0026\u0026h.onLoad(c)}}).catch(c=\u003e{const l=iS[e];if(l===void 0)throw this.manager.itemError(e),c;delete iS[e];for(let u=0,g=l.length;u\u003cg;u++){const h=l[u];h.onError\u0026\u0026h.onError(c)}this.manager.itemError(e)}).finally(()=\u003e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Uti extends x6{constructor(e){super(e)}load(e,n,o,i){this.path!==void 0\u0026\u0026(e=this.path+e),e=this.manager.resolveURL(e);const r=this,s=oP.get(e);if(s!==void 0)return r.manager.itemStart(e),setTimeout(function(){n\u0026\u0026n(s),r.manager.itemEnd(e)},0),s;const a=Lq(\"img\");function A(){l(),oP.add(e,this),n\u0026\u0026n(this),r.manager.itemEnd(e)}function c(u){l(),i\u0026\u0026i(u),r.manager.itemError(e),r.manager.itemEnd(e)}function l(){a.removeEventListener(\"load\",A,!1),a.removeEventListener(\"error\",c,!1)}return a.addEventListener(\"load\",A,!1),a.addEventListener(\"error\",c,!1),e.slice(0,5)!==\"data:\"\u0026\u0026this.crossOrigin!==void 0\u0026\u0026(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class rke extends x6{constructor(e){super(e)}load(e,n,o,i){const r=new Hg,s=new Uti(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){r.image=a,r.needsUpdate=!0,n!==void 0\u0026\u0026n(r)},o,i),r}}class tX extends T0{constructor(e,n=1){super(),this.isLight=!0,this.type=\"Light\",this.color=new Vi(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0\u0026\u0026(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0\u0026\u0026(n.object.distance=this.distance),this.angle!==void 0\u0026\u0026(n.object.angle=this.angle),this.decay!==void 0\u0026\u0026(n.object.decay=this.decay),this.penumbra!==void 0\u0026\u0026(n.object.penumbra=this.penumbra),this.shadow!==void 0\u0026\u0026(n.object.shadow=this.shadow.toJSON()),n}}class Kti extends tX{constructor(e,n,o){super(e,o),this.isHemisphereLight=!0,this.type=\"HemisphereLight\",this.position.copy(T0.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Vi(n)}copy(e,n){return super.copy(e,n),this.groundColor.copy(e.groundColor),this}}const ske=new va,oJt=new jt,iJt=new jt;class ake{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ni(512,512),this.map=null,this.mapPass=null,this.matrix=new va,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new STe,this._frameExtents=new ni(1,1),this._viewportCount=1,this._viewports=[new ru(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,o=this.matrix;oJt.setFromMatrixPosition(e.matrixWorld),n.position.copy(oJt),iJt.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(iJt),n.updateMatrixWorld(),ske.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ske),o.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),o.multiply(ske)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map\u0026\u0026this.map.dispose(),this.mapPass\u0026\u0026this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0\u0026\u0026(e.bias=this.bias),this.normalBias!==0\u0026\u0026(e.normalBias=this.normalBias),this.radius!==1\u0026\u0026(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)\u0026\u0026(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Vti extends ake{constructor(){super(new sf(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,o=HG*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||n.far;(o!==n.fov||i!==n.aspect||r!==n.far)\u0026\u0026(n.fov=o,n.aspect=i,n.far=r,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class zti extends tX{constructor(e,n,o=0,i=Math.PI/3,r=0,s=2){super(e,n),this.isSpotLight=!0,this.type=\"SpotLight\",this.position.copy(T0.DEFAULT_UP),this.updateMatrix(),this.target=new T0,this.distance=o,this.angle=i,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new Vti}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const rJt=new va,nX=new jt,Ake=new jt;class Jti extends ake{constructor(){super(new sf(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new ni(4,2),this._viewportCount=6,this._viewports=[new ru(2,1,1,1),new ru(0,1,1,1),new ru(3,1,1,1),new ru(1,1,1,1),new ru(3,0,1,1),new ru(1,0,1,1)],this._cubeDirections=[new jt(1,0,0),new jt(-1,0,0),new jt(0,0,1),new jt(0,0,-1),new jt(0,1,0),new jt(0,-1,0)],this._cubeUps=[new jt(0,1,0),new jt(0,1,0),new jt(0,1,0),new jt(0,1,0),new jt(0,0,1),new jt(0,0,-1)]}updateMatrices(e,n=0){const o=this.camera,i=this.matrix,r=e.distance||o.far;r!==o.far\u0026\u0026(o.far=r,o.updateProjectionMatrix()),nX.setFromMatrixPosition(e.matrixWorld),o.position.copy(nX),Ake.copy(o.position),Ake.add(this._cubeDirections[n]),o.up.copy(this._cubeUps[n]),o.lookAt(Ake),o.updateMatrixWorld(),i.makeTranslation(-nX.x,-nX.y,-nX.z),rJt.multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rJt)}}class sJt extends tX{constructor(e,n,o=0,i=2){super(e,n),this.isPointLight=!0,this.type=\"PointLight\",this.distance=o,this.decay=i,this.shadow=new Jti}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Wti extends ake{constructor(){super(new rY(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class aJt extends tX{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type=\"DirectionalLight\",this.position.copy(T0.DEFAULT_UP),this.updateMatrix(),this.target=new T0,this.shadow=new Wti}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class AJt extends tX{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type=\"AmbientLight\"}}class jR{static decodeText(e){if(console.warn(\"THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead.\"),typeof TextDecoder\u003c\"u\")return new TextDecoder().decode(e);let n=\"\";for(let o=0,i=e.length;o\u003ci;o++)n+=String.fromCharCode(e[o]);try{return decodeURIComponent(escape(n))}catch{return n}}static extractUrlBase(e){const n=e.lastIndexOf(\"/\");return n===-1?\"./\":e.slice(0,n+1)}static resolveURL(e,n){return typeof e!=\"string\"||e===\"\"?\"\":(/^https?:\\/\\//i.test(n)\u0026\u0026/^\\//.test(e)\u0026\u0026(n=n.replace(/(^https?:\\/\\/[^\\/]+).*/i,\"$1\")),/^(https?:)?\\/\\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:n+e)}}class jti extends Zl{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type=\"InstancedBufferGeometry\",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class $ti extends x6{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap\u003e\"u\"\u0026\u0026console.warn(\"THREE.ImageBitmapLoader: createImageBitmap() not supported.\"),typeof fetch\u003e\"u\"\u0026\u0026console.warn(\"THREE.ImageBitmapLoader: fetch() not supported.\"),this.options={premultiplyAlpha:\"none\"}}setOptions(e){return this.options=e,this}load(e,n,o,i){e===void 0\u0026\u0026(e=\"\"),this.path!==void 0\u0026\u0026(e=this.path+e),e=this.manager.resolveURL(e);const r=this,s=oP.get(e);if(s!==void 0){if(r.manager.itemStart(e),s.then){s.then(c=\u003e{n\u0026\u0026n(c),r.manager.itemEnd(e)}).catch(c=\u003e{i\u0026\u0026i(c)});return}return setTimeout(function(){n\u0026\u0026n(s),r.manager.itemEnd(e)},0),s}const a={};a.credentials=this.crossOrigin===\"anonymous\"?\"same-origin\":\"include\",a.headers=this.requestHeader;const A=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:\"none\"}))}).then(function(c){return oP.add(e,c),n\u0026\u0026n(c),r.manager.itemEnd(e),c}).catch(function(c){i\u0026\u0026i(c),oP.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)});oP.add(e,A),r.manager.itemStart(e)}}let qti=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=cJt(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart\u0026\u0026!this.running)return this.start(),0;if(this.running){const n=cJt();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}};function cJt(){return(typeof performance\u003e\"u\"?Date:performance).now()}const cke=\"\\\\[\\\\]\\\\.:\\\\/\",Xti=new RegExp(\"[\"+cke+\"]\",\"g\"),lke=\"[^\"+cke+\"]\",Zti=\"[^\"+cke.replace(\"\\\\.\",\"\")+\"]\",eni=/((?:WC+[\\/:])*)/.source.replace(\"WC\",lke),tni=/(WCOD+)?/.source.replace(\"WCOD\",Zti),nni=/(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace(\"WC\",lke),oni=/\\.(WC+)(?:\\[(.+)\\])?/.source.replace(\"WC\",lke),ini=new RegExp(\"^\"+eni+tni+nni+oni+\"$\"),rni=[\"material\",\"materials\",\"bones\",\"map\"];class sni{constructor(e,n,o){const i=o||Ll.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const o=this._targetGroup.nCachedObjects_,i=this._bindings[o];i!==void 0\u0026\u0026i.getValue(e,n)}setValue(e,n){const o=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=o.length;i!==r;++i)o[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,o=e.length;n!==o;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,o=e.length;n!==o;++n)e[n].unbind()}}class Ll{constructor(e,n,o){this.path=n,this.parsedPath=o||Ll.parseTrackName(n),this.node=Ll.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,o){return e\u0026\u0026e.isAnimationObjectGroup?new Ll.Composite(e,n,o):new Ll(e,n,o)}static sanitizeNodeName(e){return e.replace(/\\s/g,\"_\").replace(Xti,\"\")}static parseTrackName(e){const n=ini.exec(e);if(n===null)throw new Error(\"PropertyBinding: Cannot parse trackName: \"+e);const o={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=o.nodeName\u0026\u0026o.nodeName.lastIndexOf(\".\");if(i!==void 0\u0026\u0026i!==-1){const r=o.nodeName.substring(i+1);rni.indexOf(r)!==-1\u0026\u0026(o.nodeName=o.nodeName.substring(0,i),o.objectName=r)}if(o.propertyName===null||o.propertyName.length===0)throw new Error(\"PropertyBinding: can not parse propertyName from trackName: \"+e);return o}static findNode(e,n){if(n===void 0||n===\"\"||n===\".\"||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const o=e.skeleton.getBoneByName(n);if(o!==void 0)return o}if(e.children){const o=function(r){for(let s=0;s\u003cr.length;s++){const a=r[s];if(a.name===n||a.uuid===n)return a;const A=o(a.children);if(A)return A}return null},i=o(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,n){e[n]=this.targetObject[this.propertyName]}_getValue_array(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)e[n++]=o[i]}_getValue_arrayElement(e,n){e[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,n){this.resolvedProperty.toArray(e,n)}_setValue_direct(e,n){this.targetObject[this.propertyName]=e[n]}_setValue_direct_setNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)o[i]=e[n++]}_setValue_array_setNeedsUpdate(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)o[i]=e[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)o[i]=e[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,n){this.resolvedProperty[this.propertyIndex]=e[n]}_setValue_arrayElement_setNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,n){this.resolvedProperty.fromArray(e,n)}_setValue_fromArray_setNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,n){this.bind(),this.getValue(e,n)}_setValue_unbound(e,n){this.bind(),this.setValue(e,n)}bind(){let e=this.node;const n=this.parsedPath,o=n.objectName,i=n.propertyName;let r=n.propertyIndex;if(e||(e=Ll.findNode(this.rootNode,n.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn(\"THREE.PropertyBinding: No target node found for track: \"+this.path+\".\");return}if(o){let c=n.objectIndex;switch(o){case\"materials\":if(!e.material){console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\",this);return}if(!e.material.materials){console.error(\"THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.\",this);return}e=e.material.materials;break;case\"bones\":if(!e.skeleton){console.error(\"THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.\",this);return}e=e.skeleton.bones;for(let l=0;l\u003ce.length;l++)if(e[l].name===c){c=l;break}break;case\"map\":if(\"map\"in e){e=e.map;break}if(!e.material){console.error(\"THREE.PropertyBinding: Can not bind to material as node does not have a material.\",this);return}if(!e.material.map){console.error(\"THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.\",this);return}e=e.material.map;break;default:if(e[o]===void 0){console.error(\"THREE.PropertyBinding: Can not bind to objectName of node undefined.\",this);return}e=e[o]}if(c!==void 0){if(e[c]===void 0){console.error(\"THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.\",this,e);return}e=e[c]}}const s=e[i];if(s===void 0){const c=n.nodeName;console.error(\"THREE.PropertyBinding: Trying to update property for track: \"+c+\".\"+i+\" but it wasn't found.\",e);return}let a=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0\u0026\u0026(a=this.Versioning.MatrixWorldNeedsUpdate);let A=this.BindingType.Direct;if(r!==void 0){if(i===\"morphTargetInfluences\"){if(!e.geometry){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.\",this);return}if(!e.geometry.morphAttributes){console.error(\"THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.\",this);return}e.morphTargetDictionary[r]!==void 0\u0026\u0026(r=e.morphTargetDictionary[r])}A=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else s.fromArray!==void 0\u0026\u0026s.toArray!==void 0?(A=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(A=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[A],this.setValue=this.SetterByBindingTypeAndVersioning[A][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ll.Composite=sni,Ll.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ll.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ll.prototype.GetterByBindingType=[Ll.prototype._getValue_direct,Ll.prototype._getValue_array,Ll.prototype._getValue_arrayElement,Ll.prototype._getValue_toArray],Ll.prototype.SetterByBindingTypeAndVersioning=[[Ll.prototype._setValue_direct,Ll.prototype._setValue_direct_setNeedsUpdate,Ll.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ll.prototype._setValue_array,Ll.prototype._setValue_array_setNeedsUpdate,Ll.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ll.prototype._setValue_arrayElement,Ll.prototype._setValue_arrayElement_setNeedsUpdate,Ll.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ll.prototype._setValue_fromArray,Ll.prototype._setValue_fromArray_setNeedsUpdate,Ll.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class uke{constructor(e){this.value=e}clone(){return new uke(this.value.clone===void 0?this.value:this.value.clone())}}const lJt=new va;class uJt{constructor(e,n,o=0,i=1/0){this.ray=new zG(e,n),this.near=o,this.far=i,this.camera=null,this.layers=new pTe,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,n){this.ray.set(e,n)}setFromCamera(e,n){n.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(n).sub(this.ray.origin).normalize(),this.camera=n):n.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld),this.camera=n):console.error(\"THREE.Raycaster: Unsupported camera type: \"+n.type)}setFromXRController(e){return lJt.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(lJt),this}intersectObject(e,n=!0,o=[]){return gke(e,this,o,n),o.sort(gJt),o}intersectObjects(e,n=!0,o=[]){for(let i=0,r=e.length;i\u003cr;i++)gke(e[i],this,o,n);return o.sort(gJt),o}}function gJt(t,e){return t.distance-e.distance}function gke(t,e,n,o){let i=!0;if(t.layers.test(e.layers)\u0026\u0026t.raycast(e,n)===!1\u0026\u0026(i=!1),i===!0\u0026\u0026o===!0){const r=t.children;for(let s=0,a=r.length;s\u003ca;s++)gke(r[s],e,n,!0)}}class dJt{constructor(e=1,n=0,o=0){return this.radius=e,this.phi=n,this.theta=o,this}set(e,n,o){return this.radius=e,this.phi=n,this.theta=o,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,o){return this.radius=Math.sqrt(e*e+n*n+o*o),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,o),this.phi=Math.acos(rf(n/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}typeof __THREE_DEVTOOLS__\u003c\"u\"\u0026\u0026__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(\"register\",{detail:{revision:mde}})),typeof window\u003c\"u\"\u0026\u0026(window.__THREE__?console.warn(\"WARNING: Multiple instances of Three.js being imported.\"):window.__THREE__=mde);const hJt=parseInt(mde.replace(/\\D+/g,\"\"));function pJt(t,e){if(e===$jo)return console.warn(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.\"),t;if(e===eTe||e===pVt){let n=t.getIndex();if(n===null){const s=[],a=t.getAttribute(\"position\");if(a!==void 0){for(let A=0;A\u003ca.count;A++)s.push(A);t.setIndex(s),n=t.getIndex()}else return console.error(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.\"),t}const o=n.count-2,i=[];if(n)if(e===eTe)for(let s=1;s\u003c=o;s++)i.push(n.getX(0)),i.push(n.getX(s)),i.push(n.getX(s+1));else for(let s=0;s\u003co;s++)s%2===0?(i.push(n.getX(s)),i.push(n.getX(s+1)),i.push(n.getX(s+2))):(i.push(n.getX(s+2)),i.push(n.getX(s+1)),i.push(n.getX(s)));i.length/3!==o\u0026\u0026console.error(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.\");const r=t.clone();return r.setIndex(i),r.clearGroups(),r}else return console.error(\"THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:\",e),t}var ani=Object.defineProperty,Ani=(t,e,n)=\u003ee in t?ani(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cni=(t,e,n)=\u003e(Ani(t,e+\"\",n),n);async function mJt(t){const e=await t.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(e)));return`data:${t.type||\"\"};base64,${n}`}let hhe,dke,IY,phe;function hke(t,e=1/0,n=null){dke||(dke=new VB(2,2,1,1)),IY||(IY=new f6({uniforms:{blitTexture:new uke(t)},vertexShader:`\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = vec4(position.xy * 1.0,0.,.999999);\n }\n `,fragmentShader:`\n uniform sampler2D blitTexture; \n varying vec2 vUv;\n\n void main(){ \n gl_FragColor = vec4(vUv.xy, 0, 1);\n \n #ifdef IS_SRGB\n gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) );\n #else\n gl_FragColor = texture2D( blitTexture, vUv);\n #endif\n }\n `})),IY.uniforms.blitTexture.value=t,IY.defines.IS_SRGB=\"colorSpace\"in t?t.colorSpace===\"srgb\":t.encoding===3001,IY.needsUpdate=!0,phe||(phe=new Er(dke,IY),phe.frustrumCulled=!1);const o=new sf,i=new KR;i.add(phe),n||(n=hhe=new $de({antialias:!1})),n.setSize(Math.min(t.image.width,e),Math.min(t.image.height,e)),n.clear(),n.render(i,o);const r=new Hg(n.domElement);return r.minFilter=t.minFilter,r.magFilter=t.magFilter,r.wrapS=t.wrapS,r.wrapT=t.wrapT,r.name=t.name,hhe\u0026\u0026(hhe.dispose(),hhe=null),r}const _Jt={POSITION:[\"byte\",\"byte normalized\",\"unsigned byte\",\"unsigned byte normalized\",\"short\",\"short normalized\",\"unsigned short\",\"unsigned short normalized\"],NORMAL:[\"byte normalized\",\"short normalized\"],TANGENT:[\"byte normalized\",\"short normalized\"],TEXCOORD:[\"byte\",\"byte normalized\",\"unsigned byte\",\"short\",\"short normalized\",\"unsigned short\"]},pke=(()=\u003e{class t{constructor(){this.pluginCallbacks=[],this.register(function(n){return new Ini(n)}),this.register(function(n){return new Cni(n)}),this.register(function(n){return new Eni(n)}),this.register(function(n){return new Bni(n)}),this.register(function(n){return new bni(n)}),this.register(function(n){return new Sni(n)}),this.register(function(n){return new yni(n)}),this.register(function(n){return new xni(n)}),this.register(function(n){return new Qni(n)}),this.register(function(n){return new vni(n)}),this.register(function(n){return new wni(n)})}register(n){return this.pluginCallbacks.indexOf(n)===-1\u0026\u0026this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1\u0026\u0026this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,o,i,r){const s=new fni,a=[];for(let A=0,c=this.pluginCallbacks.length;A\u003cc;A++)a.push(this.pluginCallbacks[A](s));s.setPlugins(a),s.write(n,o,r).catch(i)}parseAsync(n,o){const i=this;return new Promise(function(r,s){i.parse(n,r,s,o)})}}return cni(t,\"Utils\",{insertKeyframe:function(e,n){const i=e.getValueSize(),r=new e.TimeBufferType(e.times.length+1),s=new e.ValueBufferType(e.values.length+i),a=e.createInterpolant(new e.ValueBufferType(i));let A;if(e.times.length===0){r[0]=n;for(let c=0;c\u003ci;c++)s[c]=0;A=0}else if(n\u003ce.times[0]){if(Math.abs(e.times[0]-n)\u003c.001)return 0;r[0]=n,r.set(e.times,1),s.set(a.evaluate(n),0),s.set(e.values,i),A=0}else if(n\u003ee.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-n)\u003c.001)return e.times.length-1;r[r.length-1]=n,r.set(e.times,0),s.set(e.values,0),s.set(a.evaluate(n),e.values.length),A=r.length-1}else for(let c=0;c\u003ce.times.length;c++){if(Math.abs(e.times[c]-n)\u003c.001)return c;if(e.times[c]\u003cn\u0026\u0026e.times[c+1]\u003en){r.set(e.times.slice(0,c+1),0),r[c+1]=n,r.set(e.times.slice(c+1),c+2),s.set(e.values.slice(0,(c+1)*i),0),s.set(a.evaluate(n),(c+1)*i),s.set(e.values.slice((c+1)*i),(c+2)*i),A=c+1;break}}return e.times=r,e.values=s,A},mergeMorphTargetTracks:function(e,n){const o=[],i={},r=e.tracks;for(let s=0;s\u003cr.length;++s){let a=r[s];const A=Ll.parseTrackName(a.name),c=Ll.findNode(n,A.nodeName);if(A.propertyName!==\"morphTargetInfluences\"||A.propertyIndex===void 0){o.push(a);continue}if(a.createInterpolant!==a.InterpolantFactoryMethodDiscrete\u0026\u0026a.createInterpolant!==a.InterpolantFactoryMethodLinear){if(a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error(\"THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.\");console.warn(\"THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.\"),a=a.clone(),a.setInterpolation(kG)}const l=c.morphTargetInfluences.length,u=c.morphTargetDictionary[A.propertyIndex];if(u===void 0)throw new Error(\"THREE.GLTFExporter: Morph target name not found: \"+A.propertyIndex);let g;if(i[c.uuid]===void 0){g=a.clone();const d=new g.ValueBufferType(l*g.times.length);for(let p=0;p\u003cg.times.length;p++)d[p*l+u]=g.values[p];g.name=(A.nodeName||\"\")+\".morphTargetInfluences\",g.values=d,i[c.uuid]=g,o.push(g);continue}const h=a.createInterpolant(new a.ValueBufferType(1));g=i[c.uuid];for(let d=0;d\u003cg.times.length;d++)g.values[d*l+u]=h.evaluate(g.times[d]);for(let d=0;d\u003ca.times.length;d++){const p=this.insertKeyframe(g,a.times[d]);g.values[p*l+u]=a.values[d]}}return e.tracks=o,e}}),t})(),Nc={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},mke=\"KHR_mesh_quantization\",yE={};yE[wC]=Nc.NEAREST,yE[JRe]=Nc.NEAREST_MIPMAP_NEAREST,yE[PG]=Nc.NEAREST_MIPMAP_LINEAR,yE[Fl]=Nc.LINEAR,yE[kq]=Nc.LINEAR_MIPMAP_NEAREST,yE[gm]=Nc.LINEAR_MIPMAP_LINEAR,yE[Xy]=Nc.CLAMP_TO_EDGE,yE[c4]=Nc.REPEAT,yE[Tq]=Nc.MIRRORED_REPEAT;const fJt={scale:\"scale\",position:\"translation\",quaternion:\"rotation\",morphTargetInfluences:\"weights\"},lni=new Vi,IJt=12,uni=1179937895,gni=2,CJt=8,dni=1313821514,hni=5130562;function oX(t,e){return t.length===e.length\u0026\u0026t.every(function(n,o){return n===e[o]})}function pni(t){return new TextEncoder().encode(t).buffer}function mni(t){return oX(t.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}function _ni(t,e,n){const o={min:new Array(t.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(t.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let i=e;i\u003ce+n;i++)for(let r=0;r\u003ct.itemSize;r++){let s;t.itemSize\u003e4?s=t.array[i*t.itemSize+r]:(r===0?s=t.getX(i):r===1?s=t.getY(i):r===2?s=t.getZ(i):r===3\u0026\u0026(s=t.getW(i)),t.normalized===!0\u0026\u0026(s=OG.normalize(s,t.array))),o.min[r]=Math.min(o.min[r],s),o.max[r]=Math.max(o.max[r],s)}return o}function yJt(t){return Math.ceil(t/4)*4}function _ke(t,e=0){const n=yJt(t.byteLength);if(n!==t.byteLength){const o=new Uint8Array(n);if(o.set(new Uint8Array(t)),e!==0)for(let i=t.byteLength;i\u003cn;i++)o[i]=e;return o.buffer}return t}function xJt(){return typeof document\u003e\"u\"\u0026\u0026typeof OffscreenCanvas\u003c\"u\"?new OffscreenCanvas(1,1):document.createElement(\"canvas\")}function EJt(t,e){if(t.toBlob!==void 0)return new Promise(o=\u003et.toBlob(o,e));let n;return e===\"image/jpeg\"?n=.92:e===\"image/webp\"\u0026\u0026(n=.8),t.convertToBlob({type:e,quality:n})}class fni{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:\"2.0\",generator:\"THREE.GLTFExporter\"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,n,o={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},o),this.options.animations.length\u003e0\u0026\u0026(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const i=this,r=i.buffers,s=i.json;o=i.options;const a=i.extensionsUsed,A=i.extensionsRequired,c=new Blob(r,{type:\"application/octet-stream\"}),l=Object.keys(a),u=Object.keys(A);l.length\u003e0\u0026\u0026(s.extensionsUsed=l),u.length\u003e0\u0026\u0026(s.extensionsRequired=u),s.buffers\u0026\u0026s.buffers.length\u003e0\u0026\u0026(s.buffers[0].byteLength=c.size),o.binary===!0?c.arrayBuffer().then(g=\u003e{const h=_ke(g),d=new DataView(new ArrayBuffer(CJt));d.setUint32(0,h.byteLength,!0),d.setUint32(4,hni,!0);const p=_ke(pni(JSON.stringify(s)),32),m=new DataView(new ArrayBuffer(CJt));m.setUint32(0,p.byteLength,!0),m.setUint32(4,dni,!0);const _=new ArrayBuffer(IJt),f=new DataView(_);f.setUint32(0,uni,!0),f.setUint32(4,gni,!0);const I=IJt+m.byteLength+p.byteLength+d.byteLength+h.byteLength;f.setUint32(8,I,!0),new Blob([_,m,p,d,h],{type:\"application/octet-stream\"}).arrayBuffer().then(n)}):s.buffers\u0026\u0026s.buffers.length\u003e0?mJt(c).then(g=\u003e{s.buffers[0].uri=g,n(s)}):n(s)}serializeUserData(e,n){if(Object.keys(e.userData).length===0)return;const o=this.options,i=this.extensionsUsed;try{const r=JSON.parse(JSON.stringify(e.userData));if(o.includeCustomExtensions\u0026\u0026r.gltfExtensions){n.extensions===void 0\u0026\u0026(n.extensions={});for(const s in r.gltfExtensions)n.extensions[s]=r.gltfExtensions[s],i[s]=!0;delete r.gltfExtensions}Object.keys(r).length\u003e0\u0026\u0026(n.extras=r)}catch(r){console.warn(\"THREE.GLTFExporter: userData of '\"+e.name+\"' won't be serialized because of JSON.stringify error - \"+r.message)}}getUID(e,n=!1){if(this.uids.has(e)===!1){const i=new Map;i.set(!0,this.uid++),i.set(!1,this.uid++),this.uids.set(e,i)}return this.uids.get(e).get(n)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const o=new jt;for(let i=0,r=e.count;i\u003cr;i++)if(Math.abs(o.fromBufferAttribute(e,i).length()-1)\u003e5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const n=this.cache;if(n.attributesNormalized.has(e))return n.attributesNormalized.get(e);const o=e.clone(),i=new jt;for(let r=0,s=o.count;r\u003cs;r++)i.fromBufferAttribute(o,r),i.x===0\u0026\u0026i.y===0\u0026\u0026i.z===0?i.setX(1):i.normalize(),o.setXYZ(r,i.x,i.y,i.z);return n.attributesNormalized.set(e,o),o}applyTextureTransform(e,n){let o=!1;const i={};(n.offset.x!==0||n.offset.y!==0)\u0026\u0026(i.offset=n.offset.toArray(),o=!0),n.rotation!==0\u0026\u0026(i.rotation=n.rotation,o=!0),(n.repeat.x!==1||n.repeat.y!==1)\u0026\u0026(i.scale=n.repeat.toArray(),o=!0),o\u0026\u0026(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=i,this.extensionsUsed.KHR_texture_transform=!0)}buildMetalRoughTexture(e,n){if(e===n)return e;function o(h){return(\"colorSpace\"in h?h.colorSpace===\"srgb\":h.encoding===3001)?function(p){return p\u003c.04045?p*.0773993808:Math.pow(p*.9478672986+.0521327014,2.4)}:function(p){return p}}console.warn(\"THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures.\"),e instanceof VTe\u0026\u0026(e=hke(e)),n instanceof VTe\u0026\u0026(n=hke(n));const i=e?e.image:null,r=n?n.image:null,s=Math.max(i?i.width:0,r?r.width:0),a=Math.max(i?i.height:0,r?r.height:0),A=xJt();A.width=s,A.height=a;const c=A.getContext(\"2d\");c.fillStyle=\"#00ffff\",c.fillRect(0,0,s,a);const l=c.getImageData(0,0,s,a);if(i){c.drawImage(i,0,0,s,a);const h=o(e),d=c.getImageData(0,0,s,a).data;for(let p=2;p\u003cd.length;p+=4)l.data[p]=h(d[p]/256)*256}if(r){c.drawImage(r,0,0,s,a);const h=o(n),d=c.getImageData(0,0,s,a).data;for(let p=1;p\u003cd.length;p+=4)l.data[p]=h(d[p]/256)*256}c.putImageData(l,0,0);const g=(e||n).clone();return g.source=new Hg(A).source,\"colorSpace\"in g?g.colorSpace=\"\":g.encoding=3e3,g.channel=(e||n).channel,e\u0026\u0026n\u0026\u0026e.channel!==n.channel\u0026\u0026console.warn(\"THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match.\"),g}processBuffer(e){const n=this.json,o=this.buffers;return n.buffers||(n.buffers=[{byteLength:0}]),o.push(e),0}processBufferView(e,n,o,i,r){const s=this.json;s.bufferViews||(s.bufferViews=[]);let a;switch(n){case Nc.BYTE:case Nc.UNSIGNED_BYTE:a=1;break;case Nc.SHORT:case Nc.UNSIGNED_SHORT:a=2;break;default:a=4}let A=e.itemSize*a;r===Nc.ARRAY_BUFFER\u0026\u0026(A=Math.ceil(A/4)*4);const c=yJt(i*A),l=new DataView(new ArrayBuffer(c));let u=0;for(let d=o;d\u003co+i;d++){for(let p=0;p\u003ce.itemSize;p++){let m;e.itemSize\u003e4?m=e.array[d*e.itemSize+p]:(p===0?m=e.getX(d):p===1?m=e.getY(d):p===2?m=e.getZ(d):p===3\u0026\u0026(m=e.getW(d)),e.normalized===!0\u0026\u0026(m=OG.normalize(m,e.array))),n===Nc.FLOAT?l.setFloat32(u,m,!0):n===Nc.INT?l.setInt32(u,m,!0):n===Nc.UNSIGNED_INT?l.setUint32(u,m,!0):n===Nc.SHORT?l.setInt16(u,m,!0):n===Nc.UNSIGNED_SHORT?l.setUint16(u,m,!0):n===Nc.BYTE?l.setInt8(u,m):n===Nc.UNSIGNED_BYTE\u0026\u0026l.setUint8(u,m),u+=a}u%A!==0\u0026\u0026(u+=A-u%A)}const g={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:c};return r!==void 0\u0026\u0026(g.target=r),r===Nc.ARRAY_BUFFER\u0026\u0026(g.byteStride=A),this.byteOffset+=c,s.bufferViews.push(g),{id:s.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const n=this,o=n.json;return o.bufferViews||(o.bufferViews=[]),e.arrayBuffer().then(i=\u003e{const r=_ke(i),s={buffer:n.processBuffer(r),byteOffset:n.byteOffset,byteLength:r.byteLength};return n.byteOffset+=r.byteLength,o.bufferViews.push(s)-1})}processAccessor(e,n,o,i){const r=this.json,s={1:\"SCALAR\",2:\"VEC2\",3:\"VEC3\",4:\"VEC4\",9:\"MAT3\",16:\"MAT4\"};let a;if(e.array.constructor===Float32Array)a=Nc.FLOAT;else if(e.array.constructor===Int32Array)a=Nc.INT;else if(e.array.constructor===Uint32Array)a=Nc.UNSIGNED_INT;else if(e.array.constructor===Int16Array)a=Nc.SHORT;else if(e.array.constructor===Uint16Array)a=Nc.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)a=Nc.BYTE;else if(e.array.constructor===Uint8Array)a=Nc.UNSIGNED_BYTE;else throw new Error(\"THREE.GLTFExporter: Unsupported bufferAttribute component type: \"+e.array.constructor.name);if(o===void 0\u0026\u0026(o=0),i===void 0\u0026\u0026(i=e.count),i===0)return null;const A=_ni(e,o,i);let c;n!==void 0\u0026\u0026(c=e===n.index?Nc.ELEMENT_ARRAY_BUFFER:Nc.ARRAY_BUFFER);const l=this.processBufferView(e,a,o,i,c),u={bufferView:l.id,byteOffset:l.byteOffset,componentType:a,count:i,max:A.max,min:A.min,type:s[e.itemSize]};return e.normalized===!0\u0026\u0026(u.normalized=!0),r.accessors||(r.accessors=[]),r.accessors.push(u)-1}processImage(e,n,o,i=\"image/png\"){if(e!==null){const r=this,s=r.cache,a=r.json,A=r.options,c=r.pending;s.images.has(e)||s.images.set(e,{});const l=s.images.get(e),u=i+\":flipY/\"+o.toString();if(l[u]!==void 0)return l[u];a.images||(a.images=[]);const g={mimeType:i},h=xJt();h.width=Math.min(e.width,A.maxTextureSize),h.height=Math.min(e.height,A.maxTextureSize);const d=h.getContext(\"2d\");if(o===!0\u0026\u0026(d.translate(0,h.height),d.scale(1,-1)),e.data!==void 0){n!==l4\u0026\u0026console.error(\"GLTFExporter: Only RGBAFormat is supported.\",n),(e.width\u003eA.maxTextureSize||e.height\u003eA.maxTextureSize)\u0026\u0026console.warn(\"GLTFExporter: Image size is bigger than maxTextureSize\",e);const m=new Uint8ClampedArray(e.height*e.width*4);for(let _=0;_\u003cm.length;_+=4)m[_+0]=e.data[_+0],m[_+1]=e.data[_+1],m[_+2]=e.data[_+2],m[_+3]=e.data[_+3];d.putImageData(new ImageData(m,e.width,e.height),0,0)}else d.drawImage(e,0,0,h.width,h.height);A.binary===!0?c.push(EJt(h,i).then(m=\u003er.processBufferViewImage(m)).then(m=\u003e{g.bufferView=m})):h.toDataURL!==void 0?g.uri=h.toDataURL(i):c.push(EJt(h,i).then(mJt).then(m=\u003e{g.uri=m}));const p=a.images.push(g)-1;return l[u]=p,p}else throw new Error(\"THREE.GLTFExporter: No valid image data found. Unable to process texture.\")}processSampler(e){const n=this.json;n.samplers||(n.samplers=[]);const o={magFilter:yE[e.magFilter],minFilter:yE[e.minFilter],wrapS:yE[e.wrapS],wrapT:yE[e.wrapT]};return n.samplers.push(o)-1}processTexture(e){const o=this.options,i=this.cache,r=this.json;if(i.textures.has(e))return i.textures.get(e);r.textures||(r.textures=[]),e instanceof VTe\u0026\u0026(e=hke(e,o.maxTextureSize));let s=e.userData.mimeType;s===\"image/webp\"\u0026\u0026(s=\"image/png\");const a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,s)};e.name\u0026\u0026(a.name=e.name),this._invokeAll(function(c){c.writeTexture\u0026\u0026c.writeTexture(e,a)});const A=r.textures.push(a)-1;return i.textures.set(e,A),A}processMaterial(e){const n=this.cache,o=this.json;if(n.materials.has(e))return n.materials.get(e);if(e.isShaderMaterial)return console.warn(\"GLTFExporter: THREE.ShaderMaterial not supported.\"),null;o.materials||(o.materials=[]);const i={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0\u0026\u0026e.isMeshBasicMaterial!==!0\u0026\u0026console.warn(\"GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.\");const r=e.color.toArray().concat([e.opacity]);if(oX(r,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=r),e.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=e.metalness,i.pbrMetallicRoughness.roughnessFactor=e.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const a=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),A={index:this.processTexture(a),channel:a.channel};this.applyTextureTransform(A,a),i.pbrMetallicRoughness.metallicRoughnessTexture=A}if(e.map){const a={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(a,e.map),i.pbrMetallicRoughness.baseColorTexture=a}if(e.emissive){const a=e.emissive;if(Math.max(a.r,a.g,a.b)\u003e0\u0026\u0026(i.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const c={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(c,e.emissiveMap),i.emissiveTexture=c}}if(e.normalMap){const a={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale\u0026\u0026e.normalScale.x!==1\u0026\u0026(a.scale=e.normalScale.x),this.applyTextureTransform(a,e.normalMap),i.normalTexture=a}if(e.aoMap){const a={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1\u0026\u0026(a.strength=e.aoMapIntensity),this.applyTextureTransform(a,e.aoMap),i.occlusionTexture=a}e.transparent?i.alphaMode=\"BLEND\":e.alphaTest\u003e0\u0026\u0026(i.alphaMode=\"MASK\",i.alphaCutoff=e.alphaTest),e.side===r_\u0026\u0026(i.doubleSided=!0),e.name!==\"\"\u0026\u0026(i.name=e.name),this.serializeUserData(e,i),this._invokeAll(function(a){a.writeMaterial\u0026\u0026a.writeMaterial(e,i)});const s=o.materials.push(i)-1;return n.materials.set(e,s),s}processMesh(e){const n=this.cache,o=this.json,i=[e.geometry.uuid];if(Array.isArray(e.material))for(let I=0,C=e.material.length;I\u003cC;I++)i.push(e.material[I].uuid);else i.push(e.material.uuid);const r=i.join(\":\");if(n.meshes.has(r))return n.meshes.get(r);const s=e.geometry;let a;e.isLineSegments?a=Nc.LINES:e.isLineLoop?a=Nc.LINE_LOOP:e.isLine?a=Nc.LINE_STRIP:e.isPoints?a=Nc.POINTS:a=e.material.wireframe?Nc.LINES:Nc.TRIANGLES;const A={},c={},l=[],u=[],g={...hJt\u003e=152?{uv:\"TEXCOORD_0\",uv1:\"TEXCOORD_1\",uv2:\"TEXCOORD_2\",uv3:\"TEXCOORD_3\"}:{uv:\"TEXCOORD_0\",uv2:\"TEXCOORD_1\"},color:\"COLOR_0\",skinWeight:\"WEIGHTS_0\",skinIndex:\"JOINTS_0\"},h=s.getAttribute(\"normal\");h!==void 0\u0026\u0026!this.isNormalizedNormalAttribute(h)\u0026\u0026(console.warn(\"THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.\"),s.setAttribute(\"normal\",this.createNormalizedNormalAttribute(h)));let d=null;for(let I in s.attributes){if(I.slice(0,5)===\"morph\")continue;const C=s.attributes[I];if(I=g[I]||I.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\\d+|COLOR_\\d+|JOINTS_\\d+|WEIGHTS_\\d+)$/.test(I)||(I=\"_\"+I),n.attributes.has(this.getUID(C))){c[I]=n.attributes.get(this.getUID(C));continue}d=null;const x=C.array;I===\"JOINTS_0\"\u0026\u0026!(x instanceof Uint16Array)\u0026\u0026!(x instanceof Uint8Array)\u0026\u0026(console.warn('GLTFExporter: Attribute \"skinIndex\" converted to type UNSIGNED_SHORT.'),d=new tg(new Uint16Array(x),C.itemSize,C.normalized));const E=this.processAccessor(d||C,s);E!==null\u0026\u0026(I.startsWith(\"_\")||this.detectMeshQuantization(I,C),c[I]=E,n.attributes.set(this.getUID(C),E))}if(h!==void 0\u0026\u0026s.setAttribute(\"normal\",h),Object.keys(c).length===0)return null;if(e.morphTargetInfluences!==void 0\u0026\u0026e.morphTargetInfluences.length\u003e0){const I=[],C=[],y={};if(e.morphTargetDictionary!==void 0)for(const x in e.morphTargetDictionary)y[e.morphTargetDictionary[x]]=x;for(let x=0;x\u003ce.morphTargetInfluences.length;++x){const E={};let B=!1;for(const S in s.morphAttributes){if(S!==\"position\"\u0026\u0026S!==\"normal\"){B||(console.warn(\"GLTFExporter: Only POSITION and NORMAL morph are supported.\"),B=!0);continue}const Q=s.morphAttributes[S][x],w=S.toUpperCase(),M=s.attributes[S];if(n.attributes.has(this.getUID(Q,!0))){E[w]=n.attributes.get(this.getUID(Q,!0));continue}const k=Q.clone();if(!s.morphTargetsRelative)for(let R=0,F=Q.count;R\u003cF;R++)for(let O=0;O\u003cQ.itemSize;O++)O===0\u0026\u0026k.setX(R,Q.getX(R)-M.getX(R)),O===1\u0026\u0026k.setY(R,Q.getY(R)-M.getY(R)),O===2\u0026\u0026k.setZ(R,Q.getZ(R)-M.getZ(R)),O===3\u0026\u0026k.setW(R,Q.getW(R)-M.getW(R));E[w]=this.processAccessor(k,s),n.attributes.set(this.getUID(M,!0),E[w])}u.push(E),I.push(e.morphTargetInfluences[x]),e.morphTargetDictionary!==void 0\u0026\u0026C.push(y[x])}A.weights=I,C.length\u003e0\u0026\u0026(A.extras={},A.extras.targetNames=C)}const p=Array.isArray(e.material);if(p\u0026\u0026s.groups.length===0)return null;const m=p?e.material:[e.material],_=p?s.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let I=0,C=_.length;I\u003cC;I++){const y={mode:a,attributes:c};if(this.serializeUserData(s,y),u.length\u003e0\u0026\u0026(y.targets=u),s.index!==null){let E=this.getUID(s.index);(_[I].start!==void 0||_[I].count!==void 0)\u0026\u0026(E+=\":\"+_[I].start+\":\"+_[I].count),n.attributes.has(E)?y.indices=n.attributes.get(E):(y.indices=this.processAccessor(s.index,s,_[I].start,_[I].count),n.attributes.set(E,y.indices)),y.indices===null\u0026\u0026delete y.indices}const x=this.processMaterial(m[_[I].materialIndex]);x!==null\u0026\u0026(y.material=x),l.push(y)}A.primitives=l,o.meshes||(o.meshes=[]),this._invokeAll(function(I){I.writeMesh\u0026\u0026I.writeMesh(e,A)});const f=o.meshes.push(A)-1;return n.meshes.set(r,f),f}detectMeshQuantization(e,n){if(this.extensionsUsed[mke])return;let o;switch(n.array.constructor){case Int8Array:o=\"byte\";break;case Uint8Array:o=\"unsigned byte\";break;case Int16Array:o=\"short\";break;case Uint16Array:o=\"unsigned short\";break;default:return}n.normalized\u0026\u0026(o+=\" normalized\");const i=e.split(\"_\",1)[0];_Jt[i]\u0026\u0026_Jt[i].includes(o)\u0026\u0026(this.extensionsUsed[mke]=!0,this.extensionsRequired[mke]=!0)}processCamera(e){const n=this.json;n.cameras||(n.cameras=[]);const o=e.isOrthographicCamera,i={type:o?\"orthographic\":\"perspective\"};return o?i.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far\u003c=0?.001:e.far,znear:e.near\u003c0?0:e.near}:i.perspective={aspectRatio:e.aspect,yfov:OG.degToRad(e.fov),zfar:e.far\u003c=0?.001:e.far,znear:e.near\u003c0?0:e.near},e.name!==\"\"\u0026\u0026(i.name=e.type),n.cameras.push(i)-1}processAnimation(e,n){const o=this.json,i=this.nodeMap;o.animations||(o.animations=[]),e=pke.Utils.mergeMorphTargetTracks(e.clone(),n);const r=e.tracks,s=[],a=[];for(let A=0;A\u003cr.length;++A){const c=r[A],l=Ll.parseTrackName(c.name);let u=Ll.findNode(n,l.nodeName);const g=fJt[l.propertyName];if(l.objectName===\"bones\"\u0026\u0026(u.isSkinnedMesh===!0?u=u.skeleton.getBoneByName(l.objectIndex):u=void 0),!u||!g)return console.warn('THREE.GLTFExporter: Could not export animation track \"%s\".',c.name),null;const h=1;let d=c.values.length/c.times.length;g===fJt.morphTargetInfluences\u0026\u0026(d/=u.morphTargetInfluences.length);let p;c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline===!0?(p=\"CUBICSPLINE\",d/=3):c.getInterpolation()===TG?p=\"STEP\":p=\"LINEAR\",a.push({input:this.processAccessor(new tg(c.times,h)),output:this.processAccessor(new tg(c.values,d)),interpolation:p}),s.push({sampler:a.length-1,target:{node:i.get(u),path:g}})}return o.animations.push({name:e.name||\"clip_\"+o.animations.length,samplers:a,channels:s}),o.animations.length-1}processSkin(e){const n=this.json,o=this.nodeMap,i=n.nodes[o.get(e)],r=e.skeleton;if(r===void 0)return null;const s=e.skeleton.bones[0];if(s===void 0)return null;const a=[],A=new Float32Array(r.bones.length*16),c=new va;for(let u=0;u\u003cr.bones.length;++u)a.push(o.get(r.bones[u])),c.copy(r.boneInverses[u]),c.multiply(e.bindMatrix).toArray(A,u*16);return n.skins===void 0\u0026\u0026(n.skins=[]),n.skins.push({inverseBindMatrices:this.processAccessor(new tg(A,16)),joints:a,skeleton:o.get(s)}),i.skin=n.skins.length-1}processNode(e){const n=this.json,o=this.options,i=this.nodeMap;n.nodes||(n.nodes=[]);const r={};if(o.trs){const a=e.quaternion.toArray(),A=e.position.toArray(),c=e.scale.toArray();oX(a,[0,0,0,1])||(r.rotation=a),oX(A,[0,0,0])||(r.translation=A),oX(c,[1,1,1])||(r.scale=c)}else e.matrixAutoUpdate\u0026\u0026e.updateMatrix(),mni(e.matrix)===!1\u0026\u0026(r.matrix=e.matrix.elements);if(e.name!==\"\"\u0026\u0026(r.name=String(e.name)),this.serializeUserData(e,r),e.isMesh||e.isLine||e.isPoints){const a=this.processMesh(e);a!==null\u0026\u0026(r.mesh=a)}else e.isCamera\u0026\u0026(r.camera=this.processCamera(e));if(e.isSkinnedMesh\u0026\u0026this.skins.push(e),e.children.length\u003e0){const a=[];for(let A=0,c=e.children.length;A\u003cc;A++){const l=e.children[A];if(l.visible||o.onlyVisible===!1){const u=this.processNode(l);u!==null\u0026\u0026a.push(u)}}a.length\u003e0\u0026\u0026(r.children=a)}this._invokeAll(function(a){a.writeNode\u0026\u0026a.writeNode(e,r)});const s=n.nodes.push(r)-1;return i.set(e,s),s}processScene(e){const n=this.json,o=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};e.name!==\"\"\u0026\u0026(i.name=e.name),n.scenes.push(i);const r=[];for(let s=0,a=e.children.length;s\u003ca;s++){const A=e.children[s];if(A.visible||o.onlyVisible===!1){const c=this.processNode(A);c!==null\u0026\u0026r.push(c)}}r.length\u003e0\u0026\u0026(i.nodes=r),this.serializeUserData(e,i)}processObjects(e){const n=new KR;n.name=\"AuxScene\";for(let o=0;o\u003ce.length;o++)n.children.push(e[o]);this.processScene(n)}processInput(e){const n=this.options;e=e instanceof Array?e:[e],this._invokeAll(function(i){i.beforeParse\u0026\u0026i.beforeParse(e)});const o=[];for(let i=0;i\u003ce.length;i++)e[i]instanceof KR?this.processScene(e[i]):o.push(e[i]);o.length\u003e0\u0026\u0026this.processObjects(o);for(let i=0;i\u003cthis.skins.length;++i)this.processSkin(this.skins[i]);for(let i=0;i\u003cn.animations.length;++i)this.processAnimation(n.animations[i],e[0]);this._invokeAll(function(i){i.afterParse\u0026\u0026i.afterParse(e)})}_invokeAll(e){for(let n=0,o=this.plugins.length;n\u003co;n++)e(this.plugins[n])}}class Ini{constructor(e){this.writer=e,this.name=\"KHR_lights_punctual\"}writeNode(e,n){if(!e.isLight)return;if(!e.isDirectionalLight\u0026\u0026!e.isPointLight\u0026\u0026!e.isSpotLight){console.warn(\"THREE.GLTFExporter: Only directional, point, and spot lights are supported.\",e);return}const o=this.writer,i=o.json,r=o.extensionsUsed,s={};e.name\u0026\u0026(s.name=e.name),s.color=e.color.toArray(),s.intensity=e.intensity,e.isDirectionalLight?s.type=\"directional\":e.isPointLight?(s.type=\"point\",e.distance\u003e0\u0026\u0026(s.range=e.distance)):e.isSpotLight\u0026\u0026(s.type=\"spot\",e.distance\u003e0\u0026\u0026(s.range=e.distance),s.spot={},s.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,s.spot.outerConeAngle=e.angle),e.decay!==void 0\u0026\u0026e.decay!==2\u0026\u0026console.warn(\"THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2.\"),e.target\u0026\u0026(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)\u0026\u0026console.warn(\"THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1.\"),r[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},r[this.name]=!0);const a=i.extensions[this.name].lights;a.push(s),n.extensions=n.extensions||{},n.extensions[this.name]={light:a.length-1}}}let Cni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_unlit\"}writeMaterial(e,n){if(!e.isMeshBasicMaterial)return;const i=this.writer.extensionsUsed;n.extensions=n.extensions||{},n.extensions[this.name]={},i[this.name]=!0,n.pbrMetallicRoughness.metallicFactor=0,n.pbrMetallicRoughness.roughnessFactor=.9}},yni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_clearcoat\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.clearcoatFactor=e.clearcoat,e.clearcoatMap){const s={index:o.processTexture(e.clearcoatMap),texCoord:e.clearcoatMap.channel};o.applyTextureTransform(s,e.clearcoatMap),r.clearcoatTexture=s}if(r.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const s={index:o.processTexture(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};o.applyTextureTransform(s,e.clearcoatRoughnessMap),r.clearcoatRoughnessTexture=s}if(e.clearcoatNormalMap){const s={index:o.processTexture(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};o.applyTextureTransform(s,e.clearcoatNormalMap),r.clearcoatNormalTexture=s}n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},xni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_iridescence\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.iridescenceFactor=e.iridescence,e.iridescenceMap){const s={index:o.processTexture(e.iridescenceMap),texCoord:e.iridescenceMap.channel};o.applyTextureTransform(s,e.iridescenceMap),r.iridescenceTexture=s}if(r.iridescenceIor=e.iridescenceIOR,r.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const s={index:o.processTexture(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};o.applyTextureTransform(s,e.iridescenceThicknessMap),r.iridescenceThicknessTexture=s}n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Eni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_transmission\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.transmissionFactor=e.transmission,e.transmissionMap){const s={index:o.processTexture(e.transmissionMap),texCoord:e.transmissionMap.channel};o.applyTextureTransform(s,e.transmissionMap),r.transmissionTexture=s}n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Bni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_volume\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.thicknessFactor=e.thickness,e.thicknessMap){const s={index:o.processTexture(e.thicknessMap),texCoord:e.thicknessMap.channel};o.applyTextureTransform(s,e.thicknessMap),r.thicknessTexture=s}r.attenuationDistance=e.attenuationDistance,r.attenuationColor=e.attenuationColor.toArray(),n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},bni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_ior\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;const i=this.writer.extensionsUsed,r={};r.ior=e.ior,n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Sni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_specular\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1\u0026\u0026e.specularColor.equals(lni)\u0026\u0026!e.specularIntensityMap\u0026\u0026!e.specularColorTexture)return;const o=this.writer,i=o.extensionsUsed,r={};if(e.specularIntensityMap){const s={index:o.processTexture(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};o.applyTextureTransform(s,e.specularIntensityMap),r.specularTexture=s}if(e.specularColorMap){const s={index:o.processTexture(e.specularColorMap),texCoord:e.specularColorMap.channel};o.applyTextureTransform(s,e.specularColorMap),r.specularColorTexture=s}r.specularFactor=e.specularIntensity,r.specularColorFactor=e.specularColor.toArray(),n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Qni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_sheen\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;const o=this.writer,i=o.extensionsUsed,r={};if(e.sheenRoughnessMap){const s={index:o.processTexture(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};o.applyTextureTransform(s,e.sheenRoughnessMap),r.sheenRoughnessTexture=s}if(e.sheenColorMap){const s={index:o.processTexture(e.sheenColorMap),texCoord:e.sheenColorMap.channel};o.applyTextureTransform(s,e.sheenColorMap),r.sheenColorTexture=s}r.sheenRoughnessFactor=e.sheenRoughness,r.sheenColorFactor=e.sheenColor.toArray(),n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},vni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_anisotropy\"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.anisotropy==0)return;const o=this.writer,i=o.extensionsUsed,r={};if(e.anisotropyMap){const s={index:o.processTexture(e.anisotropyMap)};o.applyTextureTransform(s,e.anisotropyMap),r.anisotropyTexture=s}r.anisotropyStrength=e.anisotropy,r.anisotropyRotation=e.anisotropyRotation,n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},wni=class{constructor(e){this.writer=e,this.name=\"KHR_materials_emissive_strength\"}writeMaterial(e,n){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;const i=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}};function Pni(){const t=new KR,e=new Yx;e.deleteAttribute(\"uv\");const n=new su({side:uI}),o=new su,i=new sJt(16777215,5,28,2);i.position.set(.418,16.199,.3),t.add(i);const r=new Er(e,n);r.position.set(-.757,13.219,.717),r.scale.set(31.713,28.305,28.591),t.add(r);const s=new Er(e,o);s.position.set(-10.906,2.009,1.846),s.rotation.set(0,-.195,0),s.scale.set(2.328,7.905,4.651),t.add(s);const a=new Er(e,o);a.position.set(-5.607,-.754,-.758),a.rotation.set(0,.994,0),a.scale.set(1.97,1.534,3.955),t.add(a);const A=new Er(e,o);A.position.set(6.167,.857,7.803),A.rotation.set(0,.561,0),A.scale.set(3.927,6.285,3.687),t.add(A);const c=new Er(e,o);c.position.set(-2.017,.018,6.124),c.rotation.set(0,.333,0),c.scale.set(2.002,4.566,2.064),t.add(c);const l=new Er(e,o);l.position.set(2.291,-.756,-2.621),l.rotation.set(0,-.286,0),l.scale.set(1.546,1.552,1.496),t.add(l);const u=new Er(e,o);u.position.set(-2.193,-.369,-5.547),u.rotation.set(0,.516,0),u.scale.set(3.875,3.487,2.986),t.add(u);const g=new Er(e,f(50));g.position.set(-16.116,14.37,8.208),g.scale.set(.1,2.428,2.739),t.add(g);const h=new Er(e,f(50));h.position.set(-16.109,18.021,-8.207),h.scale.set(.1,2.425,2.751),t.add(h);const d=new Er(e,f(17));d.position.set(14.904,12.198,-1.832),d.scale.set(.15,4.265,6.331),t.add(d);const p=new Er(e,f(43));p.position.set(-.462,8.89,14.52),p.scale.set(4.38,5.441,.088),t.add(p);const m=new Er(e,f(20));m.position.set(3.235,11.486,-12.541),m.scale.set(2.5,2,.1),t.add(m);const _=new Er(e,f(100));_.position.set(0,20,0),_.scale.set(1,.1,1),t.add(_);function f(I){const C=new fE;return C.color.setScalar(I),C}return t}function iX(t){if(typeof TextDecoder\u003c\"u\")return new TextDecoder().decode(t);let e=\"\";for(let n=0,o=t.length;n\u003co;n++)e+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(e))}catch{return e}}const $R=\"srgb\",rS=\"srgb-linear\",BJt=3001,Mni=3e3;class Dni extends x6{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(n){return new Fni(n)}),this.register(function(n){return new Lni(n)}),this.register(function(n){return new Jni(n)}),this.register(function(n){return new Wni(n)}),this.register(function(n){return new jni(n)}),this.register(function(n){return new Oni(n)}),this.register(function(n){return new Gni(n)}),this.register(function(n){return new Yni(n)}),this.register(function(n){return new Uni(n)}),this.register(function(n){return new kni(n)}),this.register(function(n){return new Kni(n)}),this.register(function(n){return new Hni(n)}),this.register(function(n){return new zni(n)}),this.register(function(n){return new Vni(n)}),this.register(function(n){return new Rni(n)}),this.register(function(n){return new $ni(n)}),this.register(function(n){return new qni(n)})}load(e,n,o,i){const r=this;let s;if(this.resourcePath!==\"\")s=this.resourcePath;else if(this.path!==\"\"){const c=jR.extractUrlBase(e);s=jR.resolveURL(c,this.path)}else s=jR.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){i?i(c):console.error(c),r.manager.itemError(e),r.manager.itemEnd(e)},A=new fY(this.manager);A.setPath(this.path),A.setResponseType(\"arraybuffer\"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(e,function(c){try{r.parse(c,s,function(l){n(l),r.manager.itemEnd(e)},a)}catch(l){a(l)}},o,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: \"MSFT_texture_dds\" no longer supported. Please update to \"KHR_texture_basisu\".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1\u0026\u0026this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1\u0026\u0026this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,o,i){let r;const s={},a={};if(typeof e==\"string\")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(iX(new Uint8Array(e.slice(0,4)))===bJt){try{s[Rc.KHR_BINARY_GLTF]=new Xni(e)}catch(l){i\u0026\u0026i(l);return}r=JSON.parse(s[Rc.KHR_BINARY_GLTF].content)}else r=JSON.parse(iX(new Uint8Array(e)));else r=e;if(r.asset===void 0||r.asset.version[0]\u003c2){i\u0026\u0026i(new Error(\"THREE.GLTFLoader: Unsupported asset. glTF versions \u003e=2.0 are supported.\"));return}const A=new uoi(r,{path:n||this.resourcePath||\"\",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});A.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c\u003cthis.pluginCallbacks.length;c++){const l=this.pluginCallbacks[c](A);l.name||console.error(\"THREE.GLTFLoader: Invalid plugin found: missing name\"),a[l.name]=l,s[l.name]=!0}if(r.extensionsUsed)for(let c=0;c\u003cr.extensionsUsed.length;++c){const l=r.extensionsUsed[c],u=r.extensionsRequired||[];switch(l){case Rc.KHR_MATERIALS_UNLIT:s[l]=new Tni;break;case Rc.KHR_DRACO_MESH_COMPRESSION:s[l]=new Zni(r,this.dracoLoader);break;case Rc.KHR_TEXTURE_TRANSFORM:s[l]=new eoi;break;case Rc.KHR_MESH_QUANTIZATION:s[l]=new toi;break;default:u.indexOf(l)\u003e=0\u0026\u0026a[l]===void 0\u0026\u0026console.warn('THREE.GLTFLoader: Unknown extension \"'+l+'\".')}}A.setExtensions(s),A.setPlugins(a),A.parse(o,i)}parseAsync(e,n){const o=this;return new Promise(function(i,r){o.parse(e,n,i,r)})}}function Nni(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Rc={KHR_BINARY_GLTF:\"KHR_binary_glTF\",KHR_DRACO_MESH_COMPRESSION:\"KHR_draco_mesh_compression\",KHR_LIGHTS_PUNCTUAL:\"KHR_lights_punctual\",KHR_MATERIALS_CLEARCOAT:\"KHR_materials_clearcoat\",KHR_MATERIALS_DISPERSION:\"KHR_materials_dispersion\",KHR_MATERIALS_IOR:\"KHR_materials_ior\",KHR_MATERIALS_SHEEN:\"KHR_materials_sheen\",KHR_MATERIALS_SPECULAR:\"KHR_materials_specular\",KHR_MATERIALS_TRANSMISSION:\"KHR_materials_transmission\",KHR_MATERIALS_IRIDESCENCE:\"KHR_materials_iridescence\",KHR_MATERIALS_ANISOTROPY:\"KHR_materials_anisotropy\",KHR_MATERIALS_UNLIT:\"KHR_materials_unlit\",KHR_MATERIALS_VOLUME:\"KHR_materials_volume\",KHR_TEXTURE_BASISU:\"KHR_texture_basisu\",KHR_TEXTURE_TRANSFORM:\"KHR_texture_transform\",KHR_MESH_QUANTIZATION:\"KHR_mesh_quantization\",KHR_MATERIALS_EMISSIVE_STRENGTH:\"KHR_materials_emissive_strength\",EXT_MATERIALS_BUMP:\"EXT_materials_bump\",EXT_TEXTURE_WEBP:\"EXT_texture_webp\",EXT_TEXTURE_AVIF:\"EXT_texture_avif\",EXT_MESHOPT_COMPRESSION:\"EXT_meshopt_compression\",EXT_MESH_GPU_INSTANCING:\"EXT_mesh_gpu_instancing\"};class Rni{constructor(e){this.parser=e,this.name=Rc.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let o=0,i=n.length;o\u003ci;o++){const r=n[o];r.extensions\u0026\u0026r.extensions[this.name]\u0026\u0026r.extensions[this.name].light!==void 0\u0026\u0026e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const n=this.parser,o=\"light:\"+e;let i=n.cache.get(o);if(i)return i;const r=n.json,A=((r.extensions\u0026\u0026r.extensions[this.name]||{}).lights||[])[e];let c;const l=new Vi(16777215);A.color!==void 0\u0026\u0026l.setRGB(A.color[0],A.color[1],A.color[2],rS);const u=A.range!==void 0?A.range:0;switch(A.type){case\"directional\":c=new aJt(l),c.target.position.set(0,0,-1),c.add(c.target);break;case\"point\":c=new sJt(l),c.distance=u;break;case\"spot\":c=new zti(l),c.distance=u,A.spot=A.spot||{},A.spot.innerConeAngle=A.spot.innerConeAngle!==void 0?A.spot.innerConeAngle:0,A.spot.outerConeAngle=A.spot.outerConeAngle!==void 0?A.spot.outerConeAngle:Math.PI/4,c.angle=A.spot.outerConeAngle,c.penumbra=1-A.spot.innerConeAngle/A.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error(\"THREE.GLTFLoader: Unexpected light type: \"+A.type)}return c.position.set(0,0,0),c.decay=2,sS(c,A),A.intensity!==void 0\u0026\u0026(c.intensity=A.intensity),c.name=n.createUniqueName(A.name||\"light_\"+e),i=Promise.resolve(c),n.cache.add(o,i),i}getDependency(e,n){if(e===\"light\")return this._loadLight(n)}createNodeAttachment(e){const n=this,o=this.parser,r=o.json.nodes[e],a=(r.extensions\u0026\u0026r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(A){return o._getNodeRef(n.cache,a,A)})}}class Tni{constructor(){this.name=Rc.KHR_MATERIALS_UNLIT}getMaterialType(){return fE}extendParams(e,n,o){const i=[];e.color=new Vi(1,1,1),e.opacity=1;const r=n.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const s=r.baseColorFactor;e.color.setRGB(s[0],s[1],s[2],rS),e.opacity=s[3]}r.baseColorTexture!==void 0\u0026\u0026i.push(o.assignTexture(e,\"map\",r.baseColorTexture,$R))}return Promise.all(i)}}class kni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,n){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=i.extensions[this.name].emissiveStrength;return r!==void 0\u0026\u0026(n.emissiveIntensity=r),Promise.resolve()}}class Fni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];if(s.clearcoatFactor!==void 0\u0026\u0026(n.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"clearcoatMap\",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0\u0026\u0026(n.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"clearcoatRoughnessMap\",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0\u0026\u0026(r.push(o.assignTexture(n,\"clearcoatNormalMap\",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const a=s.clearcoatNormalTexture.scale;n.clearcoatNormalScale=new ni(a,a)}return Promise.all(r)}}class Lni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_DISPERSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=i.extensions[this.name];return n.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}}class Hni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return s.iridescenceFactor!==void 0\u0026\u0026(n.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"iridescenceMap\",s.iridescenceTexture)),s.iridescenceIor!==void 0\u0026\u0026(n.iridescenceIOR=s.iridescenceIor),n.iridescenceThicknessRange===void 0\u0026\u0026(n.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0\u0026\u0026(n.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0\u0026\u0026(n.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"iridescenceThicknessMap\",s.iridescenceThicknessTexture)),Promise.all(r)}}class Oni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_SHEEN}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[];n.sheenColor=new Vi(0,0,0),n.sheenRoughness=0,n.sheen=1;const s=i.extensions[this.name];if(s.sheenColorFactor!==void 0){const a=s.sheenColorFactor;n.sheenColor.setRGB(a[0],a[1],a[2],rS)}return s.sheenRoughnessFactor!==void 0\u0026\u0026(n.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"sheenColorMap\",s.sheenColorTexture,$R)),s.sheenRoughnessTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"sheenRoughnessMap\",s.sheenRoughnessTexture)),Promise.all(r)}}class Gni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return s.transmissionFactor!==void 0\u0026\u0026(n.transmission=s.transmissionFactor),s.transmissionTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"transmissionMap\",s.transmissionTexture)),Promise.all(r)}}class Yni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_VOLUME}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];n.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"thicknessMap\",s.thicknessTexture)),n.attenuationDistance=s.attenuationDistance||1/0;const a=s.attenuationColor||[1,1,1];return n.attenuationColor=new Vi().setRGB(a[0],a[1],a[2],rS),Promise.all(r)}}class Uni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_IOR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=i.extensions[this.name];return n.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class Kni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_SPECULAR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];n.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"specularIntensityMap\",s.specularTexture));const a=s.specularColorFactor||[1,1,1];return n.specularColor=new Vi().setRGB(a[0],a[1],a[2],rS),s.specularColorTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"specularColorMap\",s.specularColorTexture,$R)),Promise.all(r)}}class Vni{constructor(e){this.parser=e,this.name=Rc.EXT_MATERIALS_BUMP}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return n.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"bumpMap\",s.bumpTexture)),Promise.all(r)}}class zni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return s.anisotropyStrength!==void 0\u0026\u0026(n.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0\u0026\u0026(n.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0\u0026\u0026r.push(o.assignTexture(n,\"anisotropyMap\",s.anisotropyTexture)),Promise.all(r)}}class Jni{constructor(e){this.parser=e,this.name=Rc.KHR_TEXTURE_BASISU}loadTexture(e){const n=this.parser,o=n.json,i=o.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const r=i.extensions[this.name],s=n.options.ktx2Loader;if(!s){if(o.extensionsRequired\u0026\u0026o.extensionsRequired.indexOf(this.name)\u003e=0)throw new Error(\"THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures\");return null}return n.loadTextureImage(e,r.source,s)}}class Wni{constructor(e){this.parser=e,this.name=Rc.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,o=this.parser,i=o.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const s=r.extensions[n],a=i.images[s.source];let A=o.textureLoader;if(a.uri){const c=o.options.manager.getHandler(a.uri);c!==null\u0026\u0026(A=c)}return this.detectSupport().then(function(c){if(c)return o.loadTextureImage(e,s.source,A);if(i.extensionsRequired\u0026\u0026i.extensionsRequired.indexOf(n)\u003e=0)throw new Error(\"THREE.GLTFLoader: WebP required by asset but unsupported.\");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src=\"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA\",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class jni{constructor(e){this.parser=e,this.name=Rc.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,o=this.parser,i=o.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const s=r.extensions[n],a=i.images[s.source];let A=o.textureLoader;if(a.uri){const c=o.options.manager.getHandler(a.uri);c!==null\u0026\u0026(A=c)}return this.detectSupport().then(function(c){if(c)return o.loadTextureImage(e,s.source,A);if(i.extensionsRequired\u0026\u0026i.extensionsRequired.indexOf(n)\u003e=0)throw new Error(\"THREE.GLTFLoader: AVIF required by asset but unsupported.\");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src=\"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=\",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class $ni{constructor(e){this.name=Rc.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,o=n.bufferViews[e];if(o.extensions\u0026\u0026o.extensions[this.name]){const i=o.extensions[this.name],r=this.parser.getDependency(\"buffer\",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired\u0026\u0026n.extensionsRequired.indexOf(this.name)\u003e=0)throw new Error(\"THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files\");return null}return r.then(function(a){const A=i.byteOffset||0,c=i.byteLength||0,l=i.count,u=i.byteStride,g=new Uint8Array(a,A,c);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(l,u,g,i.mode,i.filter).then(function(h){return h.buffer}):s.ready.then(function(){const h=new ArrayBuffer(l*u);return s.decodeGltfBuffer(new Uint8Array(h),l,u,g,i.mode,i.filter),h})})}else return null}}class qni{constructor(e){this.name=Rc.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,o=n.nodes[e];if(!o.extensions||!o.extensions[this.name]||o.mesh===void 0)return null;const i=n.meshes[o.mesh];for(const c of i.primitives)if(c.mode!==d4.TRIANGLES\u0026\u0026c.mode!==d4.TRIANGLE_STRIP\u0026\u0026c.mode!==d4.TRIANGLE_FAN\u0026\u0026c.mode!==void 0)return null;const s=o.extensions[this.name].attributes,a=[],A={};for(const c in s)a.push(this.parser.getDependency(\"accessor\",s[c]).then(l=\u003e(A[c]=l,A[c])));return a.length\u003c1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=\u003e{const l=c.pop(),u=l.isGroup?l.children:[l],g=c[0].count,h=[];for(const d of u){const p=new va,m=new jt,_=new Zy,f=new jt(1,1,1),I=new Xei(d.geometry,d.material,g);for(let C=0;C\u003cg;C++)A.TRANSLATION\u0026\u0026m.fromBufferAttribute(A.TRANSLATION,C),A.ROTATION\u0026\u0026_.fromBufferAttribute(A.ROTATION,C),A.SCALE\u0026\u0026f.fromBufferAttribute(A.SCALE,C),I.setMatrixAt(C,p.compose(m,_,f));for(const C in A)if(C===\"_COLOR_0\"){const y=A[C];I.instanceColor=new Xde(y.array,y.itemSize,y.normalized)}else C!==\"TRANSLATION\"\u0026\u0026C!==\"ROTATION\"\u0026\u0026C!==\"SCALE\"\u0026\u0026d.geometry.setAttribute(C,A[C]);T0.prototype.copy.call(I,d),this.parser.assignFinalMaterial(I),h.push(I)}return l.isGroup?(l.clear(),l.add(...h),l):h[0]}))}}const bJt=\"glTF\",rX=12,SJt={JSON:1313821514,BIN:5130562};class Xni{constructor(e){this.name=Rc.KHR_BINARY_GLTF,this.content=null,this.body=null;const n=new DataView(e,0,rX);if(this.header={magic:iX(new Uint8Array(e.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==bJt)throw new Error(\"THREE.GLTFLoader: Unsupported glTF-Binary header.\");if(this.header.version\u003c2)throw new Error(\"THREE.GLTFLoader: Legacy binary file detected.\");const o=this.header.length-rX,i=new DataView(e,rX);let r=0;for(;r\u003co;){const s=i.getUint32(r,!0);r+=4;const a=i.getUint32(r,!0);if(r+=4,a===SJt.JSON){const A=new Uint8Array(e,rX+r,s);this.content=iX(A)}else if(a===SJt.BIN){const A=rX+r;this.body=e.slice(A,A+s)}r+=s}if(this.content===null)throw new Error(\"THREE.GLTFLoader: JSON content not found.\")}}class Zni{constructor(e,n){if(!n)throw new Error(\"THREE.GLTFLoader: No DRACOLoader instance provided.\");this.name=Rc.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=n,this.dracoLoader.preload()}decodePrimitive(e,n){const o=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,a={},A={},c={};for(const l in s){const u=Ike[l]||l.toLowerCase();a[u]=s[l]}for(const l in e.attributes){const u=Ike[l]||l.toLowerCase();if(s[l]!==void 0){const g=o.accessors[e.attributes[l]],h=CY[g.componentType];c[u]=h.name,A[u]=g.normalized===!0}}return n.getDependency(\"bufferView\",r).then(function(l){return new Promise(function(u,g){i.decodeDracoFile(l,function(h){for(const d in h.attributes){const p=h.attributes[d],m=A[d];m!==void 0\u0026\u0026(p.normalized=m)}u(h)},a,c,rS,g)})})}}class eoi{constructor(){this.name=Rc.KHR_TEXTURE_TRANSFORM}extendTexture(e,n){return(n.texCoord===void 0||n.texCoord===e.channel)\u0026\u0026n.offset===void 0\u0026\u0026n.rotation===void 0\u0026\u0026n.scale===void 0||(e=e.clone(),n.texCoord!==void 0\u0026\u0026(e.channel=n.texCoord),n.offset!==void 0\u0026\u0026e.offset.fromArray(n.offset),n.rotation!==void 0\u0026\u0026(e.rotation=n.rotation),n.scale!==void 0\u0026\u0026e.repeat.fromArray(n.scale),e.needsUpdate=!0),e}}class toi{constructor(){this.name=Rc.KHR_MESH_QUANTIZATION}}class QJt extends eX{constructor(e,n,o,i){super(e,n,o,i)}copySampleValue_(e){const n=this.resultBuffer,o=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let s=0;s!==i;s++)n[s]=o[r+s];return n}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=a*2,c=a*3,l=i-n,u=(o-n)/l,g=u*u,h=g*u,d=e*c,p=d-c,m=-2*h+3*g,_=h-g,f=1-m,I=_-g+u;for(let C=0;C!==a;C++){const y=s[p+C+a],x=s[p+C+A]*l,E=s[d+C+a],B=s[d+C]*l;r[C]=f*y+I*x+m*E+_*B}return r}}const noi=new Zy;class ooi extends QJt{interpolate_(e,n,o,i){const r=super.interpolate_(e,n,o,i);return noi.fromArray(r).normalize().toArray(r),r}}const d4={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},CY={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},vJt={9728:wC,9729:Fl,9984:JRe,9985:kq,9986:PG,9987:gm},wJt={33071:Xy,33648:Tq,10497:c4},fke={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ike={POSITION:\"position\",NORMAL:\"normal\",TANGENT:\"tangent\",...hJt\u003e=152?{TEXCOORD_0:\"uv\",TEXCOORD_1:\"uv1\",TEXCOORD_2:\"uv2\",TEXCOORD_3:\"uv3\"}:{TEXCOORD_0:\"uv\",TEXCOORD_1:\"uv2\"},COLOR_0:\"color\",WEIGHTS_0:\"skinWeight\",JOINTS_0:\"skinIndex\"},iP={scale:\"scale\",translation:\"position\",rotation:\"quaternion\",weights:\"morphTargetInfluences\"},ioi={CUBICSPLINE:void 0,LINEAR:kG,STEP:TG},Cke={OPAQUE:\"OPAQUE\",MASK:\"MASK\",BLEND:\"BLEND\"};function roi(t){return t.DefaultMaterial===void 0\u0026\u0026(t.DefaultMaterial=new su({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:mE})),t.DefaultMaterial}function qR(t,e,n){for(const o in n.extensions)t[o]===void 0\u0026\u0026(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[o]=n.extensions[o])}function sS(t,e){e.extras!==void 0\u0026\u0026(typeof e.extras==\"object\"?Object.assign(t.userData,e.extras):console.warn(\"THREE.GLTFLoader: Ignoring primitive type .extras, \"+e.extras))}function soi(t,e,n){let o=!1,i=!1,r=!1;for(let c=0,l=e.length;c\u003cl;c++){const u=e[c];if(u.POSITION!==void 0\u0026\u0026(o=!0),u.NORMAL!==void 0\u0026\u0026(i=!0),u.COLOR_0!==void 0\u0026\u0026(r=!0),o\u0026\u0026i\u0026\u0026r)break}if(!o\u0026\u0026!i\u0026\u0026!r)return Promise.resolve(t);const s=[],a=[],A=[];for(let c=0,l=e.length;c\u003cl;c++){const u=e[c];if(o){const g=u.POSITION!==void 0?n.getDependency(\"accessor\",u.POSITION):t.attributes.position;s.push(g)}if(i){const g=u.NORMAL!==void 0?n.getDependency(\"accessor\",u.NORMAL):t.attributes.normal;a.push(g)}if(r){const g=u.COLOR_0!==void 0?n.getDependency(\"accessor\",u.COLOR_0):t.attributes.color;A.push(g)}}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(A)]).then(function(c){const l=c[0],u=c[1],g=c[2];return o\u0026\u0026(t.morphAttributes.position=l),i\u0026\u0026(t.morphAttributes.normal=u),r\u0026\u0026(t.morphAttributes.color=g),t.morphTargetsRelative=!0,t})}function aoi(t,e){if(t.updateMorphTargets(),e.weights!==void 0)for(let n=0,o=e.weights.length;n\u003co;n++)t.morphTargetInfluences[n]=e.weights[n];if(e.extras\u0026\u0026Array.isArray(e.extras.targetNames)){const n=e.extras.targetNames;if(t.morphTargetInfluences.length===n.length){t.morphTargetDictionary={};for(let o=0,i=n.length;o\u003ci;o++)t.morphTargetDictionary[n[o]]=o}else console.warn(\"THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.\")}}function Aoi(t){let e;const n=t.extensions\u0026\u0026t.extensions[Rc.KHR_DRACO_MESH_COMPRESSION];if(n?e=\"draco:\"+n.bufferView+\":\"+n.indices+\":\"+yke(n.attributes):e=t.indices+\":\"+yke(t.attributes)+\":\"+t.mode,t.targets!==void 0)for(let o=0,i=t.targets.length;o\u003ci;o++)e+=\":\"+yke(t.targets[o]);return e}function yke(t){let e=\"\";const n=Object.keys(t).sort();for(let o=0,i=n.length;o\u003ci;o++)e+=n[o]+\":\"+t[n[o]]+\";\";return e}function xke(t){switch(t){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error(\"THREE.GLTFLoader: Unsupported normalized accessor component type.\")}}function coi(t){return t.search(/\\.jpe?g($|\\?)/i)\u003e0||t.search(/^data\\:image\\/jpeg/)===0?\"image/jpeg\":t.search(/\\.webp($|\\?)/i)\u003e0||t.search(/^data\\:image\\/webp/)===0?\"image/webp\":\"image/png\"}const loi=new va;class uoi{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new Nni,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let o=!1,i=!1,r=-1;typeof navigator\u003c\"u\"\u0026\u0026typeof navigator.userAgent\u003c\"u\"\u0026\u0026(o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf(\"Firefox\")\u003e-1,r=i?navigator.userAgent.match(/Firefox\\/([0-9]+)\\./)[1]:-1),typeof createImageBitmap\u003e\"u\"||o||i\u0026\u0026r\u003c98?this.textureLoader=new rke(this.options.manager):this.textureLoader=new $ti(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new fY(this.options.manager),this.fileLoader.setResponseType(\"arraybuffer\"),this.options.crossOrigin===\"use-credentials\"\u0026\u0026this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const o=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs\u0026\u0026s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot\u0026\u0026s.beforeRoot()})).then(function(){return Promise.all([o.getDependencies(\"scene\"),o.getDependencies(\"animation\"),o.getDependencies(\"camera\")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:o,userData:{}};return qR(r,a,i),sS(a,i),Promise.all(o._invokeAll(function(A){return A.afterRoot\u0026\u0026A.afterRoot(a)})).then(function(){for(const A of a.scenes)A.updateMatrixWorld();e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],o=this.json.meshes||[];for(let i=0,r=n.length;i\u003cr;i++){const s=n[i].joints;for(let a=0,A=s.length;a\u003cA;a++)e[s[a]].isBone=!0}for(let i=0,r=e.length;i\u003cr;i++){const s=e[i];s.mesh!==void 0\u0026\u0026(this._addNodeRef(this.meshCache,s.mesh),s.skin!==void 0\u0026\u0026(o[s.mesh].isSkinnedMesh=!0)),s.camera!==void 0\u0026\u0026this._addNodeRef(this.cameraCache,s.camera)}}_addNodeRef(e,n){n!==void 0\u0026\u0026(e.refs[n]===void 0\u0026\u0026(e.refs[n]=e.uses[n]=0),e.refs[n]++)}_getNodeRef(e,n,o){if(e.refs[n]\u003c=1)return o;const i=o.clone(),r=(s,a)=\u003e{const A=this.associations.get(s);A!=null\u0026\u0026this.associations.set(a,A);for(const[c,l]of s.children.entries())r(l,a.children[c])};return r(o,i),i.name+=\"_instance_\"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let o=0;o\u003cn.length;o++){const i=e(n[o]);if(i)return i}return null}_invokeAll(e){const n=Object.values(this.plugins);n.unshift(this);const o=[];for(let i=0;i\u003cn.length;i++){const r=e(n[i]);r\u0026\u0026o.push(r)}return o}getDependency(e,n){const o=e+\":\"+n;let i=this.cache.get(o);if(!i){switch(e){case\"scene\":i=this.loadScene(n);break;case\"node\":i=this._invokeOne(function(r){return r.loadNode\u0026\u0026r.loadNode(n)});break;case\"mesh\":i=this._invokeOne(function(r){return r.loadMesh\u0026\u0026r.loadMesh(n)});break;case\"accessor\":i=this.loadAccessor(n);break;case\"bufferView\":i=this._invokeOne(function(r){return r.loadBufferView\u0026\u0026r.loadBufferView(n)});break;case\"buffer\":i=this.loadBuffer(n);break;case\"material\":i=this._invokeOne(function(r){return r.loadMaterial\u0026\u0026r.loadMaterial(n)});break;case\"texture\":i=this._invokeOne(function(r){return r.loadTexture\u0026\u0026r.loadTexture(n)});break;case\"skin\":i=this.loadSkin(n);break;case\"animation\":i=this._invokeOne(function(r){return r.loadAnimation\u0026\u0026r.loadAnimation(n)});break;case\"camera\":i=this.loadCamera(n);break;default:if(i=this._invokeOne(function(r){return r!=this\u0026\u0026r.getDependency\u0026\u0026r.getDependency(e,n)}),!i)throw new Error(\"Unknown type: \"+e);break}this.cache.add(o,i)}return i}getDependencies(e){let n=this.cache.get(e);if(!n){const o=this,i=this.json[e+(e===\"mesh\"?\"es\":\"s\")]||[];n=Promise.all(i.map(function(r,s){return o.getDependency(e,s)})),this.cache.add(e,n)}return n}loadBuffer(e){const n=this.json.buffers[e],o=this.fileLoader;if(n.type\u0026\u0026n.type!==\"arraybuffer\")throw new Error(\"THREE.GLTFLoader: \"+n.type+\" buffer type is not supported.\");if(n.uri===void 0\u0026\u0026e===0)return Promise.resolve(this.extensions[Rc.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(r,s){o.load(jR.resolveURL(n.uri,i.path),r,void 0,function(){s(new Error('THREE.GLTFLoader: Failed to load buffer \"'+n.uri+'\".'))})})}loadBufferView(e){const n=this.json.bufferViews[e];return this.getDependency(\"buffer\",n.buffer).then(function(o){const i=n.byteLength||0,r=n.byteOffset||0;return o.slice(r,r+i)})}loadAccessor(e){const n=this,o=this.json,i=this.json.accessors[e];if(i.bufferView===void 0\u0026\u0026i.sparse===void 0){const s=fke[i.type],a=CY[i.componentType],A=i.normalized===!0,c=new a(i.count*s);return Promise.resolve(new tg(c,s,A))}const r=[];return i.bufferView!==void 0?r.push(this.getDependency(\"bufferView\",i.bufferView)):r.push(null),i.sparse!==void 0\u0026\u0026(r.push(this.getDependency(\"bufferView\",i.sparse.indices.bufferView)),r.push(this.getDependency(\"bufferView\",i.sparse.values.bufferView))),Promise.all(r).then(function(s){const a=s[0],A=fke[i.type],c=CY[i.componentType],l=c.BYTES_PER_ELEMENT,u=l*A,g=i.byteOffset||0,h=i.bufferView!==void 0?o.bufferViews[i.bufferView].byteStride:void 0,d=i.normalized===!0;let p,m;if(h\u0026\u0026h!==u){const _=Math.floor(g/h),f=\"InterleavedBuffer:\"+i.bufferView+\":\"+i.componentType+\":\"+_+\":\"+i.count;let I=n.cache.get(f);I||(p=new c(a,_*h,i.count*h/l),I=new Jei(p,h/l),n.cache.add(f,I)),m=new FTe(I,A,g%h/l,d)}else a===null?p=new c(i.count*A):p=new c(a,g,i.count*A),m=new tg(p,A,d);if(i.sparse!==void 0){const _=fke.SCALAR,f=CY[i.sparse.indices.componentType],I=i.sparse.indices.byteOffset||0,C=i.sparse.values.byteOffset||0,y=new f(s[1],I,i.sparse.count*_),x=new c(s[2],C,i.sparse.count*A);a!==null\u0026\u0026(m=new tg(m.array.slice(),m.itemSize,m.normalized));for(let E=0,B=y.length;E\u003cB;E++){const S=y[E];if(m.setX(S,x[E*A]),A\u003e=2\u0026\u0026m.setY(S,x[E*A+1]),A\u003e=3\u0026\u0026m.setZ(S,x[E*A+2]),A\u003e=4\u0026\u0026m.setW(S,x[E*A+3]),A\u003e=5)throw new Error(\"THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.\")}}return m})}loadTexture(e){const n=this.json,o=this.options,r=n.textures[e].source,s=n.images[r];let a=this.textureLoader;if(s.uri){const A=o.manager.getHandler(s.uri);A!==null\u0026\u0026(a=A)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,n,o){const i=this,r=this.json,s=r.textures[e],a=r.images[n],A=(a.uri||a.bufferView)+\":\"+s.sampler;if(this.textureCache[A])return this.textureCache[A];const c=this.loadImageSource(n,o).then(function(l){l.flipY=!1,l.name=s.name||a.name||\"\",l.name===\"\"\u0026\u0026typeof a.uri==\"string\"\u0026\u0026a.uri.startsWith(\"data:image/\")===!1\u0026\u0026(l.name=a.uri);const g=(r.samplers||{})[s.sampler]||{};return l.magFilter=vJt[g.magFilter]||Fl,l.minFilter=vJt[g.minFilter]||gm,l.wrapS=wJt[g.wrapS]||c4,l.wrapT=wJt[g.wrapT]||c4,i.associations.set(l,{textures:e}),l}).catch(function(){return null});return this.textureCache[A]=c,c}loadImageSource(e,n){const o=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=\u003eu.clone());const s=i.images[e],a=self.URL||self.webkitURL;let A=s.uri||\"\",c=!1;if(s.bufferView!==void 0)A=o.getDependency(\"bufferView\",s.bufferView).then(function(u){c=!0;const g=new Blob([u],{type:s.mimeType});return A=a.createObjectURL(g),A});else if(s.uri===void 0)throw new Error(\"THREE.GLTFLoader: Image \"+e+\" is missing URI and bufferView\");const l=Promise.resolve(A).then(function(u){return new Promise(function(g,h){let d=g;n.isImageBitmapLoader===!0\u0026\u0026(d=function(p){const m=new Hg(p);m.needsUpdate=!0,g(m)}),n.load(jR.resolveURL(u,r.path),d,void 0,h)})}).then(function(u){return c===!0\u0026\u0026a.revokeObjectURL(A),sS(u,s),u.userData.mimeType=s.mimeType||coi(s.uri),u}).catch(function(u){throw console.error(\"THREE.GLTFLoader: Couldn't load texture\",A),u});return this.sourceCache[e]=l,l}assignTexture(e,n,o,i){const r=this;return this.getDependency(\"texture\",o.index).then(function(s){if(!s)return null;if(o.texCoord!==void 0\u0026\u0026o.texCoord\u003e0\u0026\u0026(s=s.clone(),s.channel=o.texCoord),r.extensions[Rc.KHR_TEXTURE_TRANSFORM]){const a=o.extensions!==void 0?o.extensions[Rc.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const A=r.associations.get(s);s=r.extensions[Rc.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),r.associations.set(s,A)}}return i!==void 0\u0026\u0026(typeof i==\"number\"\u0026\u0026(i=i===BJt?$R:rS),\"colorSpace\"in s?s.colorSpace=i:s.encoding=i===$R?BJt:Mni),e[n]=s,s})}assignFinalMaterial(e){const n=e.geometry;let o=e.material;const i=n.attributes.tangent===void 0,r=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(e.isPoints){const a=\"PointsMaterial:\"+o.uuid;let A=this.cache.get(a);A||(A=new zR,Gx.prototype.copy.call(A,o),A.color.copy(o.color),A.map=o.map,A.sizeAttenuation=!1,this.cache.add(a,A)),o=A}else if(e.isLine){const a=\"LineBasicMaterial:\"+o.uuid;let A=this.cache.get(a);A||(A=new VR,Gx.prototype.copy.call(A,o),A.color.copy(o.color),A.map=o.map,this.cache.add(a,A)),o=A}if(i||r||s){let a=\"ClonedMaterial:\"+o.uuid+\":\";i\u0026\u0026(a+=\"derivative-tangents:\"),r\u0026\u0026(a+=\"vertex-colors:\"),s\u0026\u0026(a+=\"flat-shading:\");let A=this.cache.get(a);A||(A=o.clone(),r\u0026\u0026(A.vertexColors=!0),s\u0026\u0026(A.flatShading=!0),i\u0026\u0026(A.normalScale\u0026\u0026(A.normalScale.y*=-1),A.clearcoatNormalScale\u0026\u0026(A.clearcoatNormalScale.y*=-1)),this.cache.add(a,A),this.associations.set(A,this.associations.get(o))),o=A}e.material=o}getMaterialType(){return su}loadMaterial(e){const n=this,o=this.json,i=this.extensions,r=o.materials[e];let s;const a={},A=r.extensions||{},c=[];if(A[Rc.KHR_MATERIALS_UNLIT]){const u=i[Rc.KHR_MATERIALS_UNLIT];s=u.getMaterialType(),c.push(u.extendParams(a,r,n))}else{const u=r.pbrMetallicRoughness||{};if(a.color=new Vi(1,1,1),a.opacity=1,Array.isArray(u.baseColorFactor)){const g=u.baseColorFactor;a.color.setRGB(g[0],g[1],g[2],rS),a.opacity=g[3]}u.baseColorTexture!==void 0\u0026\u0026c.push(n.assignTexture(a,\"map\",u.baseColorTexture,$R)),a.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,a.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0\u0026\u0026(c.push(n.assignTexture(a,\"metalnessMap\",u.metallicRoughnessTexture)),c.push(n.assignTexture(a,\"roughnessMap\",u.metallicRoughnessTexture))),s=this._invokeOne(function(g){return g.getMaterialType\u0026\u0026g.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(g){return g.extendMaterialParams\u0026\u0026g.extendMaterialParams(e,a)})))}r.doubleSided===!0\u0026\u0026(a.side=r_);const l=r.alphaMode||Cke.OPAQUE;if(l===Cke.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,l===Cke.MASK\u0026\u0026(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0\u0026\u0026s!==fE\u0026\u0026(c.push(n.assignTexture(a,\"normalMap\",r.normalTexture)),a.normalScale=new ni(1,1),r.normalTexture.scale!==void 0)){const u=r.normalTexture.scale;a.normalScale.set(u,u)}if(r.occlusionTexture!==void 0\u0026\u0026s!==fE\u0026\u0026(c.push(n.assignTexture(a,\"aoMap\",r.occlusionTexture)),r.occlusionTexture.strength!==void 0\u0026\u0026(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0\u0026\u0026s!==fE){const u=r.emissiveFactor;a.emissive=new Vi().setRGB(u[0],u[1],u[2],rS)}return r.emissiveTexture!==void 0\u0026\u0026s!==fE\u0026\u0026c.push(n.assignTexture(a,\"emissiveMap\",r.emissiveTexture,$R)),Promise.all(c).then(function(){const u=new s(a);return r.name\u0026\u0026(u.name=r.name),sS(u,r),n.associations.set(u,{materials:e}),r.extensions\u0026\u0026qR(i,u,r),u})}createUniqueName(e){const n=Ll.sanitizeNodeName(e||\"\");return n in this.nodeNamesUsed?n+\"_\"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,o=this.extensions,i=this.primitiveCache;function r(a){return o[Rc.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(A){return PJt(A,a,n)})}const s=[];for(let a=0,A=e.length;a\u003cA;a++){const c=e[a],l=Aoi(c),u=i[l];if(u)s.push(u.promise);else{let g;c.extensions\u0026\u0026c.extensions[Rc.KHR_DRACO_MESH_COMPRESSION]?g=r(c):g=PJt(new Zl,c,n),i[l]={primitive:c,promise:g},s.push(g)}}return Promise.all(s)}loadMesh(e){const n=this,o=this.json,i=this.extensions,r=o.meshes[e],s=r.primitives,a=[];for(let A=0,c=s.length;A\u003cc;A++){const l=s[A].material===void 0?roi(this.cache):this.getDependency(\"material\",s[A].material);a.push(l)}return a.push(n.loadGeometries(s)),Promise.all(a).then(function(A){const c=A.slice(0,A.length-1),l=A[A.length-1],u=[];for(let h=0,d=l.length;h\u003cd;h++){const p=l[h],m=s[h];let _;const f=c[h];if(m.mode===d4.TRIANGLES||m.mode===d4.TRIANGLE_STRIP||m.mode===d4.TRIANGLE_FAN||m.mode===void 0)_=r.isSkinnedMesh===!0?new jei(p,f):new Er(p,f),_.isSkinnedMesh===!0\u0026\u0026_.normalizeSkinWeights(),m.mode===d4.TRIANGLE_STRIP?_.geometry=pJt(_.geometry,pVt):m.mode===d4.TRIANGLE_FAN\u0026\u0026(_.geometry=pJt(_.geometry,eTe));else if(m.mode===d4.LINES)_=new Jq(p,f);else if(m.mode===d4.LINE_STRIP)_=new UTe(p,f);else if(m.mode===d4.LINE_LOOP)_=new Zei(p,f);else if(m.mode===d4.POINTS)_=new Wq(p,f);else throw new Error(\"THREE.GLTFLoader: Primitive mode unsupported: \"+m.mode);Object.keys(_.geometry.morphAttributes).length\u003e0\u0026\u0026aoi(_,r),_.name=n.createUniqueName(r.name||\"mesh_\"+e),sS(_,r),m.extensions\u0026\u0026qR(i,_,m),n.assignFinalMaterial(_),u.push(_)}for(let h=0,d=u.length;h\u003cd;h++)n.associations.set(u[h],{meshes:e,primitives:h});if(u.length===1)return r.extensions\u0026\u0026qR(i,u[0],r),u[0];const g=new lh;r.extensions\u0026\u0026qR(i,g,r),n.associations.set(g,{meshes:e});for(let h=0,d=u.length;h\u003cd;h++)g.add(u[h]);return g})}loadCamera(e){let n;const o=this.json.cameras[e],i=o[o.type];if(!i){console.warn(\"THREE.GLTFLoader: Missing camera parameters.\");return}return o.type===\"perspective\"?n=new sf(OG.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):o.type===\"orthographic\"\u0026\u0026(n=new rY(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),o.name\u0026\u0026(n.name=this.createUniqueName(o.name)),sS(n,o),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],o=[];for(let i=0,r=n.joints.length;i\u003cr;i++)o.push(this._loadNodeShallow(n.joints[i]));return n.inverseBindMatrices!==void 0?o.push(this.getDependency(\"accessor\",n.inverseBindMatrices)):o.push(null),Promise.all(o).then(function(i){const r=i.pop(),s=i,a=[],A=[];for(let c=0,l=s.length;c\u003cl;c++){const u=s[c];if(u){a.push(u);const g=new va;r!==null\u0026\u0026g.fromArray(r.array,c*16),A.push(g)}else console.warn('THREE.GLTFLoader: Joint \"%s\" could not be found.',n.joints[c])}return new GTe(a,A)})}loadAnimation(e){const n=this.json,o=this,i=n.animations[e],r=i.name?i.name:\"animation_\"+e,s=[],a=[],A=[],c=[],l=[];for(let u=0,g=i.channels.length;u\u003cg;u++){const h=i.channels[u],d=i.samplers[h.sampler],p=h.target,m=p.node,_=i.parameters!==void 0?i.parameters[d.input]:d.input,f=i.parameters!==void 0?i.parameters[d.output]:d.output;p.node!==void 0\u0026\u0026(s.push(this.getDependency(\"node\",m)),a.push(this.getDependency(\"accessor\",_)),A.push(this.getDependency(\"accessor\",f)),c.push(d),l.push(p))}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(A),Promise.all(c),Promise.all(l)]).then(function(u){const g=u[0],h=u[1],d=u[2],p=u[3],m=u[4],_=[];for(let f=0,I=g.length;f\u003cI;f++){const C=g[f],y=h[f],x=d[f],E=p[f],B=m[f];if(C===void 0)continue;C.updateMatrix\u0026\u0026C.updateMatrix();const S=o._createAnimationTracks(C,y,x,E,B);if(S)for(let Q=0;Q\u003cS.length;Q++)_.push(S[Q])}return new Lti(r,void 0,_)})}createNodeMesh(e){const n=this.json,o=this,i=n.nodes[e];return i.mesh===void 0?null:o.getDependency(\"mesh\",i.mesh).then(function(r){const s=o._getNodeRef(o.meshCache,i.mesh,r);return i.weights!==void 0\u0026\u0026s.traverse(function(a){if(a.isMesh)for(let A=0,c=i.weights.length;A\u003cc;A++)a.morphTargetInfluences[A]=i.weights[A]}),s})}loadNode(e){const n=this.json,o=this,i=n.nodes[e],r=o._loadNodeShallow(e),s=[],a=i.children||[];for(let c=0,l=a.length;c\u003cl;c++)s.push(o.getDependency(\"node\",a[c]));const A=i.skin===void 0?Promise.resolve(null):o.getDependency(\"skin\",i.skin);return Promise.all([r,Promise.all(s),A]).then(function(c){const l=c[0],u=c[1],g=c[2];g!==null\u0026\u0026l.traverse(function(h){h.isSkinnedMesh\u0026\u0026h.bind(g,loi)});for(let h=0,d=u.length;h\u003cd;h++)l.add(u[h]);return l})}_loadNodeShallow(e){const n=this.json,o=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const r=n.nodes[e],s=r.name?i.createUniqueName(r.name):\"\",a=[],A=i._invokeOne(function(c){return c.createNodeMesh\u0026\u0026c.createNodeMesh(e)});return A\u0026\u0026a.push(A),r.camera!==void 0\u0026\u0026a.push(i.getDependency(\"camera\",r.camera).then(function(c){return i._getNodeRef(i.cameraCache,r.camera,c)})),i._invokeAll(function(c){return c.createNodeAttachment\u0026\u0026c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let l;if(r.isBone===!0?l=new Pzt:c.length\u003e1?l=new lh:c.length===1?l=c[0]:l=new T0,l!==c[0])for(let u=0,g=c.length;u\u003cg;u++)l.add(c[u]);if(r.name\u0026\u0026(l.userData.name=r.name,l.name=s),sS(l,r),r.extensions\u0026\u0026qR(o,l,r),r.matrix!==void 0){const u=new va;u.fromArray(r.matrix),l.applyMatrix4(u)}else r.translation!==void 0\u0026\u0026l.position.fromArray(r.translation),r.rotation!==void 0\u0026\u0026l.quaternion.fromArray(r.rotation),r.scale!==void 0\u0026\u0026l.scale.fromArray(r.scale);return i.associations.has(l)||i.associations.set(l,{}),i.associations.get(l).nodes=e,l}),this.nodeCache[e]}loadScene(e){const n=this.extensions,o=this.json.scenes[e],i=this,r=new lh;o.name\u0026\u0026(r.name=i.createUniqueName(o.name)),sS(r,o),o.extensions\u0026\u0026qR(n,r,o);const s=o.nodes||[],a=[];for(let A=0,c=s.length;A\u003cc;A++)a.push(i.getDependency(\"node\",s[A]));return Promise.all(a).then(function(A){for(let l=0,u=A.length;l\u003cu;l++)r.add(A[l]);const c=l=\u003e{const u=new Map;for(const[g,h]of i.associations)(g instanceof Gx||g instanceof Hg)\u0026\u0026u.set(g,h);return l.traverse(g=\u003e{const h=i.associations.get(g);h!=null\u0026\u0026u.set(g,h)}),u};return i.associations=c(r),r})}_createAnimationTracks(e,n,o,i,r){const s=[],a=e.name?e.name:e.uuid,A=[];iP[r.path]===iP.weights?e.traverse(function(g){g.morphTargetInfluences\u0026\u0026A.push(g.name?g.name:g.uuid)}):A.push(a);let c;switch(iP[r.path]){case iP.weights:c=hY;break;case iP.rotation:c=pY;break;case iP.position:case iP.scale:c=_Y;break;default:o.itemSize===1?c=hY:c=_Y;break}const l=i.interpolation!==void 0?ioi[i.interpolation]:kG,u=this._getArrayFromAccessor(o);for(let g=0,h=A.length;g\u003ch;g++){const d=new c(A[g]+\".\"+iP[r.path],n.array,u,l);i.interpolation===\"CUBICSPLINE\"\u0026\u0026this._createCubicSplineTrackInterpolant(d),s.push(d)}return s}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const o=xke(n.constructor),i=new Float32Array(n.length);for(let r=0,s=n.length;r\u003cs;r++)i[r]=n[r]*o;n=i}return n}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(o){const i=this instanceof pY?ooi:QJt;return new i(this.times,this.values,this.getValueSize()/3,o)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function goi(t,e,n){const o=e.attributes,i=new e2;if(o.POSITION!==void 0){const a=n.json.accessors[o.POSITION],A=a.min,c=a.max;if(A!==void 0\u0026\u0026c!==void 0){if(i.set(new jt(A[0],A[1],A[2]),new jt(c[0],c[1],c[2])),a.normalized){const l=xke(CY[a.componentType]);i.min.multiplyScalar(l),i.max.multiplyScalar(l)}}else{console.warn(\"THREE.GLTFLoader: Missing min/max properties for accessor POSITION.\");return}}else return;const r=e.targets;if(r!==void 0){const a=new jt,A=new jt;for(let c=0,l=r.length;c\u003cl;c++){const u=r[c];if(u.POSITION!==void 0){const g=n.json.accessors[u.POSITION],h=g.min,d=g.max;if(h!==void 0\u0026\u0026d!==void 0){if(A.setX(Math.max(Math.abs(h[0]),Math.abs(d[0]))),A.setY(Math.max(Math.abs(h[1]),Math.abs(d[1]))),A.setZ(Math.max(Math.abs(h[2]),Math.abs(d[2]))),g.normalized){const p=xke(CY[g.componentType]);A.multiplyScalar(p)}a.max(A)}else console.warn(\"THREE.GLTFLoader: Missing min/max properties for accessor POSITION.\")}}i.expandByVector(a)}t.boundingBox=i;const s=new GB;i.getCenter(s.center),s.radius=i.min.distanceTo(i.max)/2,t.boundingSphere=s}function PJt(t,e,n){const o=e.attributes,i=[];function r(s,a){return n.getDependency(\"accessor\",s).then(function(A){t.setAttribute(a,A)})}for(const s in o){const a=Ike[s]||s.toLowerCase();a in t.attributes||i.push(r(o[s],a))}if(e.indices!==void 0\u0026\u0026!t.index){const s=n.getDependency(\"accessor\",e.indices).then(function(a){t.setIndex(a)});i.push(s)}return sS(t,e),goi(t,e,n),Promise.all(i).then(function(){return e.targets!==void 0?soi(t,e.targets,n):t})}class doi extends x6{constructor(e){super(e)}load(e,n,o,i){const r=this,s=new fY(this.manager);s.setPath(this.path),s.setResponseType(\"arraybuffer\"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(r.parse(a))}catch(A){i?i(A):console.error(A),r.manager.itemError(e)}},o,i)}parse(e){function n(c){const l=new DataView(c),u=32/8*3+32/8*3*3+16/8,g=l.getUint32(80,!0);if(80+32/8+g*u===l.byteLength)return!0;const d=[115,111,108,105,100];for(let p=0;p\u003c5;p++)if(o(d,l,p))return!1;return!0}function o(c,l,u){for(let g=0,h=c.length;g\u003ch;g++)if(c[g]!==l.getUint8(u+g,!1))return!1;return!0}function i(c){const l=new DataView(c),u=l.getUint32(80,!0);let g,h,d,p=!1,m,_,f,I,C;for(let Q=0;Q\u003c70;Q++)l.getUint32(Q,!1)==1129270351\u0026\u0026l.getUint8(Q+4)==82\u0026\u0026l.getUint8(Q+5)==61\u0026\u0026(p=!0,m=new Float32Array(u*3*3),_=l.getUint8(Q+6)/255,f=l.getUint8(Q+7)/255,I=l.getUint8(Q+8)/255,C=l.getUint8(Q+9)/255);const y=84,x=50,E=new Zl,B=new Float32Array(u*3*3),S=new Float32Array(u*3*3);for(let Q=0;Q\u003cu;Q++){const w=y+Q*x,M=l.getFloat32(w,!0),k=l.getFloat32(w+4,!0),R=l.getFloat32(w+8,!0);if(p){const F=l.getUint16(w+48,!0);(F\u002632768)===0?(g=(F\u002631)/31,h=(F\u003e\u003e5\u002631)/31,d=(F\u003e\u003e10\u002631)/31):(g=_,h=f,d=I)}for(let F=1;F\u003c=3;F++){const O=w+F*12,U=Q*3*3+(F-1)*3;B[U]=l.getFloat32(O,!0),B[U+1]=l.getFloat32(O+4,!0),B[U+2]=l.getFloat32(O+8,!0),S[U]=M,S[U+1]=k,S[U+2]=R,p\u0026\u0026(m[U]=g,m[U+1]=h,m[U+2]=d)}}return E.setAttribute(\"position\",new tg(B,3)),E.setAttribute(\"normal\",new tg(S,3)),p\u0026\u0026(E.setAttribute(\"color\",new tg(m,3)),E.hasColors=!0,E.alpha=C),E}function r(c){const l=new Zl,u=/solid([\\s\\S]*?)endsolid/g,g=/facet([\\s\\S]*?)endfacet/g;let h=0;const d=/[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)/.source,p=new RegExp(\"vertex\"+d+d+d,\"g\"),m=new RegExp(\"normal\"+d+d+d,\"g\"),_=[],f=[],I=new jt;let C,y=0,x=0,E=0;for(;(C=u.exec(c))!==null;){x=E;const B=C[0];for(;(C=g.exec(B))!==null;){let w=0,M=0;const k=C[0];for(;(C=m.exec(k))!==null;)I.x=parseFloat(C[1]),I.y=parseFloat(C[2]),I.z=parseFloat(C[3]),M++;for(;(C=p.exec(k))!==null;)_.push(parseFloat(C[1]),parseFloat(C[2]),parseFloat(C[3])),f.push(I.x,I.y,I.z),w++,E++;M!==1\u0026\u0026console.error(\"THREE.STLLoader: Something isn't right with the normal of face number \"+h),w!==3\u0026\u0026console.error(\"THREE.STLLoader: Something isn't right with the vertices of face number \"+h),h++}const S=x,Q=E-x;l.addGroup(S,Q,y),y++}return l.setAttribute(\"position\",new Bs(_,3)),l.setAttribute(\"normal\",new Bs(f,3)),l}function s(c){return typeof c!=\"string\"?iX(new Uint8Array(c)):c}function a(c){if(typeof c==\"string\"){const l=new Uint8Array(c.length);for(let u=0;u\u003cc.length;u++)l[u]=c.charCodeAt(u)\u0026255;return l.buffer||l}else return c}const A=a(e);return n(A)?i(A):r(s(e))}}class hoi extends x6{constructor(e){super(e)}load(e,n,o,i){const r=this,s=this.path===\"\"?jR.extractUrlBase(e):this.path,a=new fY(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(A){try{n(r.parse(A,s))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},o,i)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,n){const o=e.split(`\n`);let i={};const r=/\\s+/,s={};for(let A=0;A\u003co.length;A++){let c=o[A];if(c=c.trim(),c.length===0||c.charAt(0)===\"#\")continue;const l=c.indexOf(\" \");let u=l\u003e=0?c.substring(0,l):c;u=u.toLowerCase();let g=l\u003e=0?c.substring(l+1):\"\";if(g=g.trim(),u===\"newmtl\")i={name:g},s[g]=i;else if(u===\"ka\"||u===\"kd\"||u===\"ks\"||u===\"ke\"){const h=g.split(r,3);i[u]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else i[u]=g}const a=new poi(this.resourcePath||n,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(s),a}}class poi{constructor(e=\"\",n={}){this.baseUrl=e,this.options=n,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin=\"anonymous\",this.side=this.options.side!==void 0?this.options.side:mE,this.wrap=this.options.wrap!==void 0?this.options.wrap:c4}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const n={};for(const o in e){const i=e[o],r={};n[o]=r;for(const s in i){let a=!0,A=i[s];const c=s.toLowerCase();switch(c){case\"kd\":case\"ka\":case\"ks\":this.options\u0026\u0026this.options.normalizeRGB\u0026\u0026(A=[A[0]/255,A[1]/255,A[2]/255]),this.options\u0026\u0026this.options.ignoreZeroRGBs\u0026\u0026A[0]===0\u0026\u0026A[1]===0\u0026\u0026A[2]===0\u0026\u0026(a=!1);break}a\u0026\u0026(r[c]=A)}}return n}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const n in this.materialsInfo)this.materialsArray[e]=this.create(n),this.nameLookup[n]=e,e++;return this.materialsArray}create(e){return this.materials[e]===void 0\u0026\u0026this.createMaterial_(e),this.materials[e]}createMaterial_(e){const n=this,o=this.materialsInfo[e],i={name:e,side:this.side};function r(a,A){return typeof A!=\"string\"||A===\"\"?\"\":/^https?:\\/\\//i.test(A)?A:a+A}function s(a,A){if(i[a])return;const c=n.getTextureParams(A,i),l=n.loadTexture(r(n.baseUrl,c.url));l.repeat.copy(c.scale),l.offset.copy(c.offset),l.wrapS=n.wrap,l.wrapT=n.wrap,i[a]=l}for(const a in o){const A=o[a];let c;if(A!==\"\")switch(a.toLowerCase()){case\"kd\":i.color=new Vi().fromArray(A);break;case\"ks\":i.specular=new Vi().fromArray(A);break;case\"ke\":i.emissive=new Vi().fromArray(A);break;case\"map_kd\":s(\"map\",A);break;case\"map_ks\":s(\"specularMap\",A);break;case\"map_ke\":s(\"emissiveMap\",A);break;case\"norm\":s(\"normalMap\",A);break;case\"map_bump\":case\"bump\":s(\"bumpMap\",A);break;case\"map_d\":s(\"alphaMap\",A),i.transparent=!0;break;case\"ns\":i.shininess=parseFloat(A);break;case\"d\":c=parseFloat(A),c\u003c1\u0026\u0026(i.opacity=c,i.transparent=!0);break;case\"tr\":c=parseFloat(A),this.options\u0026\u0026this.options.invertTrProperty\u0026\u0026(c=1-c),c\u003e0\u0026\u0026(i.opacity=1-c,i.transparent=!0);break}}return this.materials[e]=new ike(i),this.materials[e]}getTextureParams(e,n){const o={scale:new ni(1,1),offset:new ni(0,0)},i=e.split(/\\s+/);let r;return r=i.indexOf(\"-bm\"),r\u003e=0\u0026\u0026(n.bumpScale=parseFloat(i[r+1]),i.splice(r,2)),r=i.indexOf(\"-s\"),r\u003e=0\u0026\u0026(o.scale.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),r=i.indexOf(\"-o\"),r\u003e=0\u0026\u0026(o.offset.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),o.url=i.join(\" \").trim(),o}loadTexture(e,n,o,i,r){const s=this.manager!==void 0?this.manager:nJt;let a=s.getHandler(e);a===null\u0026\u0026(a=new rke(s)),a.setCrossOrigin\u0026\u0026a.setCrossOrigin(this.crossOrigin);const A=a.load(e,o,i,r);return n!==void 0\u0026\u0026(A.mapping=n),A}}const{CstParser:moi,Lexer:Eke,createToken:a_}=(()=\u003e{var t=typeof global==\"object\"\u0026\u0026global\u0026\u0026global.Object===Object\u0026\u0026global;const e=t;var n=typeof self==\"object\"\u0026\u0026self\u0026\u0026self.Object===Object\u0026\u0026self,o=e||n||Function(\"return this\")();const i=o;var r=i.Symbol;const s=r;var a=Object.prototype,A=a.hasOwnProperty,c=a.toString,l=s?s.toStringTag:void 0;function u(re){var X=A.call(re,l),me=re[l];try{re[l]=void 0;var He=!0}catch{}var We=c.call(re);return He\u0026\u0026(X?re[l]=me:delete re[l]),We}var g=Object.prototype,h=g.toString;function d(re){return h.call(re)}var p=\"[object Null]\",m=\"[object Undefined]\",_=s?s.toStringTag:void 0;function f(re){return re==null?re===void 0?m:p:_\u0026\u0026_ in Object(re)?u(re):d(re)}function I(re){return re!=null\u0026\u0026typeof re==\"object\"}var C=\"[object Symbol]\";function y(re){return typeof re==\"symbol\"||I(re)\u0026\u0026f(re)==C}function x(re,X){for(var me=-1,He=re==null?0:re.length,We=Array(He);++me\u003cHe;)We[me]=X(re[me],me,re);return We}var E=Array.isArray;const B=E;var S=s?s.prototype:void 0,Q=S?S.toString:void 0;function w(re){if(typeof re==\"string\")return re;if(B(re))return x(re,w)+\"\";if(y(re))return Q?Q.call(re):\"\";var X=re+\"\";return X==\"0\"\u0026\u00261/re==-1/0?\"-0\":X}var M=/\\s/;function k(re){for(var X=re.length;X--\u0026\u0026M.test(re.charAt(X)););return X}var R=/^\\s+/;function F(re){return re\u0026\u0026re.slice(0,k(re)+1).replace(R,\"\")}function O(re){var X=typeof re;return re!=null\u0026\u0026(X==\"object\"||X==\"function\")}var U=NaN,Y=/^[-+]0x[0-9a-f]+$/i,W=/^0b[01]+$/i,te=/^0o[0-7]+$/i,j=parseInt;function J(re){if(typeof re==\"number\")return re;if(y(re))return U;if(O(re)){var X=typeof re.valueOf==\"function\"?re.valueOf():re;re=O(X)?X+\"\":X}if(typeof re!=\"string\")return re===0?re:+re;re=F(re);var me=W.test(re);return me||te.test(re)?j(re.slice(2),me?2:8):Y.test(re)?U:+re}var oe=1/0,ie=17976931348623157e292;function ne(re){if(!re)return re===0?re:0;if(re=J(re),re===oe||re===-oe){var X=re\u003c0?-1:1;return X*ie}return re===re?re:0}function le(re){var X=ne(re),me=X%1;return X===X?me?X-me:X:0}function ge(re){return re}var _e=\"[object AsyncFunction]\",ue=\"[object Function]\",fe=\"[object GeneratorFunction]\",pe=\"[object Proxy]\";function ye(re){if(!O(re))return!1;var X=f(re);return X==ue||X==fe||X==_e||X==pe}var Me=i[\"__core-js_shared__\"];const ve=Me;var he=(function(){var re=/[^.]+$/.exec(ve\u0026\u0026ve.keys\u0026\u0026ve.keys.IE_PROTO||\"\");return re?\"Symbol(src)_1.\"+re:\"\"})();function Qe(re){return!!he\u0026\u0026he in re}var Pe=Function.prototype,we=Pe.toString;function Te(re){if(re!=null){try{return we.call(re)}catch{}try{return re+\"\"}catch{}}return\"\"}var Re=/[\\\\^$.*+?()[\\]{}|]/g,Ee=/^\\[object .+?Constructor\\]$/,ke=Function.prototype,Ce=Object.prototype,Le=ke.toString,Ye=Ce.hasOwnProperty,tt=RegExp(\"^\"+Le.call(Ye).replace(Re,\"\\\\$\u0026\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");function At(re){if(!O(re)||Qe(re))return!1;var X=ye(re)?tt:Ee;return X.test(Te(re))}function at(re,X){return re?.[X]}function nt(re,X){var me=at(re,X);return At(me)?me:void 0}var gt=nt(i,\"WeakMap\");const bt=gt;var Ct=Object.create,Dt=(function(){function re(){}return function(X){if(!O(X))return{};if(Ct)return Ct(X);re.prototype=X;var me=new re;return re.prototype=void 0,me}})();const kt=Dt;function it(re,X,me){switch(me.length){case 0:return re.call(X);case 1:return re.call(X,me[0]);case 2:return re.call(X,me[0],me[1]);case 3:return re.call(X,me[0],me[1],me[2])}return re.apply(X,me)}function Yt(){}function pn(re,X){var me=-1,He=re.length;for(X||(X=Array(He));++me\u003cHe;)X[me]=re[me];return X}var be=800,et=16,It=Date.now;function Bt(re){var X=0,me=0;return function(){var He=It(),We=et-(He-me);if(me=He,We\u003e0){if(++X\u003e=be)return arguments[0]}else X=0;return re.apply(void 0,arguments)}}function mt(re){return function(){return re}}var st=(function(){try{var re=nt(Object,\"defineProperty\");return re({},\"\",{}),re}catch{}})();const xt=st;var Xe=xt?function(re,X){return xt(re,\"toString\",{configurable:!0,enumerable:!1,value:mt(X),writable:!0})}:ge,dt=Bt(Xe);const Ut=dt;function Wt(re,X){for(var me=-1,He=re==null?0:re.length;++me\u003cHe\u0026\u0026X(re[me],me,re)!==!1;);return re}function Xt(re,X,me,He){for(var We=re.length,ft=me+-1;++ft\u003cWe;)if(X(re[ft],ft,re))return ft;return-1}function Jt(re){return re!==re}function yn(re,X,me){for(var He=me-1,We=re.length;++He\u003cWe;)if(re[He]===X)return He;return-1}function An(re,X,me){return X===X?yn(re,X,me):Xt(re,Jt,me)}function kn(re,X){var me=re==null?0:re.length;return!!me\u0026\u0026An(re,X,0)\u003e-1}var $n=9007199254740991,ht=/^(?:0|[1-9]\\d*)$/;function Kt(re,X){var me=typeof re;return X=X??$n,!!X\u0026\u0026(me==\"number\"||me!=\"symbol\"\u0026\u0026ht.test(re))\u0026\u0026re\u003e-1\u0026\u0026re%1==0\u0026\u0026re\u003cX}function rn(re,X,me){X==\"__proto__\"\u0026\u0026xt?xt(re,X,{configurable:!0,enumerable:!0,value:me,writable:!0}):re[X]=me}function Lt(re,X){return re===X||re!==re\u0026\u0026X!==X}var Ho=Object.prototype,Ao=Ho.hasOwnProperty;function qe(re,X,me){var He=re[X];(!(Ao.call(re,X)\u0026\u0026Lt(He,me))||me===void 0\u0026\u0026!(X in re))\u0026\u0026rn(re,X,me)}function vt(re,X,me,He){var We=!me;me||(me={});for(var ft=-1,wt=X.length;++ft\u003cwt;){var zt=X[ft],en=void 0;en===void 0\u0026\u0026(en=re[zt]),We?rn(me,zt,en):qe(me,zt,en)}return me}var qt=Math.max;function Zt(re,X,me){return X=qt(X===void 0?re.length-1:X,0),function(){for(var He=arguments,We=-1,ft=qt(He.length-X,0),wt=Array(ft);++We\u003cft;)wt[We]=He[X+We];We=-1;for(var zt=Array(X+1);++We\u003cX;)zt[We]=He[We];return zt[X]=me(wt),it(re,this,zt)}}function nn(re,X){return Ut(Zt(re,X,ge),re+\"\")}var zn=9007199254740991;function Nn(re){return typeof re==\"number\"\u0026\u0026re\u003e-1\u0026\u0026re%1==0\u0026\u0026re\u003c=zn}function Co(re){return re!=null\u0026\u0026Nn(re.length)\u0026\u0026!ye(re)}function ei(re,X,me){if(!O(me))return!1;var He=typeof X;return(He==\"number\"?Co(me)\u0026\u0026Kt(X,me.length):He==\"string\"\u0026\u0026X in me)?Lt(me[X],re):!1}function ro(re){return nn(function(X,me){var He=-1,We=me.length,ft=We\u003e1?me[We-1]:void 0,wt=We\u003e2?me[2]:void 0;for(ft=re.length\u003e3\u0026\u0026typeof ft==\"function\"?(We--,ft):void 0,wt\u0026\u0026ei(me[0],me[1],wt)\u0026\u0026(ft=We\u003c3?void 0:ft,We=1),X=Object(X);++He\u003cWe;){var zt=me[He];zt\u0026\u0026re(X,zt,He,ft)}return X})}var To=Object.prototype;function yo(re){var X=re\u0026\u0026re.constructor,me=typeof X==\"function\"\u0026\u0026X.prototype||To;return re===me}function Ro(re,X){for(var me=-1,He=Array(re);++me\u003cre;)He[me]=X(me);return He}var On=\"[object Arguments]\";function uo(re){return I(re)\u0026\u0026f(re)==On}var Oo=Object.prototype,ko=Oo.hasOwnProperty,Ko=Oo.propertyIsEnumerable,mi=uo((function(){return arguments})())?uo:function(re){return I(re)\u0026\u0026ko.call(re,\"callee\")\u0026\u0026!Ko.call(re,\"callee\")};const Fo=mi;function Nr(){return!1}var Rs=typeof exports==\"object\"\u0026\u0026exports\u0026\u0026!exports.nodeType\u0026\u0026exports,ur=Rs\u0026\u0026typeof module==\"object\"\u0026\u0026module\u0026\u0026!module.nodeType\u0026\u0026module,zi=ur\u0026\u0026ur.exports===Rs,bi=zi?i.Buffer:void 0,Ar=bi?bi.isBuffer:void 0,ws=Ar||Nr;const ds=ws;var Et=\"[object Arguments]\",Gt=\"[object Array]\",Rt=\"[object Boolean]\",Ht=\"[object Date]\",Qt=\"[object Error]\",Nt=\"[object Function]\",_n=\"[object Map]\",qn=\"[object Number]\",En=\"[object Object]\",Rn=\"[object RegExp]\",Hn=\"[object Set]\",Lo=\"[object String]\",Io=\"[object WeakMap]\",gi=\"[object ArrayBuffer]\",jo=\"[object DataView]\",oi=\"[object Float32Array]\",Ji=\"[object Float64Array]\",wi=\"[object Int8Array]\",Br=\"[object Int16Array]\",gr=\"[object Int32Array]\",oa=\"[object Uint8Array]\",hs=\"[object Uint8ClampedArray]\",Li=\"[object Uint16Array]\",ys=\"[object Uint32Array]\",dr={};dr[oi]=dr[Ji]=dr[wi]=dr[Br]=dr[gr]=dr[oa]=dr[hs]=dr[Li]=dr[ys]=!0,dr[Et]=dr[Gt]=dr[gi]=dr[Rt]=dr[jo]=dr[Ht]=dr[Qt]=dr[Nt]=dr[_n]=dr[qn]=dr[En]=dr[Rn]=dr[Hn]=dr[Lo]=dr[Io]=!1;function cA(re){return I(re)\u0026\u0026Nn(re.length)\u0026\u0026!!dr[f(re)]}function vA(re){return function(X){return re(X)}}var Yl=typeof exports==\"object\"\u0026\u0026exports\u0026\u0026!exports.nodeType\u0026\u0026exports,H0=Yl\u0026\u0026typeof module==\"object\"\u0026\u0026module\u0026\u0026!module.nodeType\u0026\u0026module,ph=H0\u0026\u0026H0.exports===Yl,Xh=ph\u0026\u0026e.process,Bl=(function(){try{var re=H0\u0026\u0026H0.require\u0026\u0026H0.require(\"util\").types;return re||Xh\u0026\u0026Xh.binding\u0026\u0026Xh.binding(\"util\")}catch{}})();const fc=Bl;var Nd=fc\u0026\u0026fc.isTypedArray,il=Nd?vA(Nd):cA;const Ul=il;var m_=Object.prototype,ag=m_.hasOwnProperty;function Rd(re,X){var me=B(re),He=!me\u0026\u0026Fo(re),We=!me\u0026\u0026!He\u0026\u0026ds(re),ft=!me\u0026\u0026!He\u0026\u0026!We\u0026\u0026Ul(re),wt=me||He||We||ft,zt=wt?Ro(re.length,String):[],en=zt.length;for(var In in re)(X||ag.call(re,In))\u0026\u0026!(wt\u0026\u0026(In==\"length\"||We\u0026\u0026(In==\"offset\"||In==\"parent\")||ft\u0026\u0026(In==\"buffer\"||In==\"byteLength\"||In==\"byteOffset\")||Kt(In,en)))\u0026\u0026zt.push(In);return zt}function mh(re,X){return function(me){return re(X(me))}}var mm=mh(Object.keys,Object);const gu=mm;var Ag=Object.prototype,C0=Ag.hasOwnProperty;function FC(re){if(!yo(re))return gu(re);var X=[];for(var me in Object(re))C0.call(re,me)\u0026\u0026me!=\"constructor\"\u0026\u0026X.push(me);return X}function O0(re){return Co(re)?Rd(re):FC(re)}var __=Object.prototype,Qp=__.hasOwnProperty,_1=ro(function(re,X){if(yo(X)||Co(X)){vt(X,O0(X),re);return}for(var me in X)Qp.call(X,me)\u0026\u0026qe(re,me,X[me])});const tr=_1;function Vo(re){var X=[];if(re!=null)for(var me in Object(re))X.push(me);return X}var wA=Object.prototype,Td=wA.hasOwnProperty;function da(re){if(!O(re))return Vo(re);var X=yo(re),me=[];for(var He in re)He==\"constructor\"\u0026\u0026(X||!Td.call(re,He))||me.push(He);return me}function Zh(re){return Co(re)?Rd(re,!0):da(re)}var mf=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,LC=/^\\w*$/;function _f(re,X){if(B(re))return!1;var me=typeof re;return me==\"number\"||me==\"symbol\"||me==\"boolean\"||re==null||y(re)?!0:LC.test(re)||!mf.test(re)||X!=null\u0026\u0026re in Object(X)}var _m=nt(Object,\"create\");const du=_m;function cg(){this.__data__=du?du(null):{},this.size=0}function Ug(re){var X=this.has(re)\u0026\u0026delete this.__data__[re];return this.size-=X?1:0,X}var Vc=\"__lodash_hash_undefined__\",ha=Object.prototype,BI=ha.hasOwnProperty;function G0(re){var X=this.__data__;if(du){var me=X[re];return me===Vc?void 0:me}return BI.call(X,re)?X[re]:void 0}var PA=Object.prototype,_h=PA.hasOwnProperty;function n0(re){var X=this.__data__;return du?X[re]!==void 0:_h.call(X,re)}var HC=\"__lodash_hash_undefined__\";function f1(re,X){var me=this.__data__;return this.size+=this.has(re)?0:1,me[re]=du\u0026\u0026X===void 0?HC:X,this}function fm(re){var X=-1,me=re==null?0:re.length;for(this.clear();++X\u003cme;){var He=re[X];this.set(He[0],He[1])}}fm.prototype.clear=cg,fm.prototype.delete=Ug,fm.prototype.get=G0,fm.prototype.has=n0,fm.prototype.set=f1;function vp(){this.__data__=[],this.size=0}function ku(re,X){for(var me=re.length;me--;)if(Lt(re[me][0],X))return me;return-1}var ot=Array.prototype,rt=ot.splice;function Ot(re){var X=this.__data__,me=ku(X,re);if(me\u003c0)return!1;var He=X.length-1;return me==He?X.pop():rt.call(X,me,1),--this.size,!0}function an(re){var X=this.__data__,me=ku(X,re);return me\u003c0?void 0:X[me][1]}function Dn(re){return ku(this.__data__,re)\u003e-1}function Xn(re,X){var me=this.__data__,He=ku(me,re);return He\u003c0?(++this.size,me.push([re,X])):me[He][1]=X,this}function oo(re){var X=-1,me=re==null?0:re.length;for(this.clear();++X\u003cme;){var He=re[X];this.set(He[0],He[1])}}oo.prototype.clear=vp,oo.prototype.delete=Ot,oo.prototype.get=an,oo.prototype.has=Dn,oo.prototype.set=Xn;var vo=nt(i,\"Map\");const Xo=vo;function Ti(){this.size=0,this.__data__={hash:new fm,map:new(Xo||oo),string:new fm}}function ir(re){var X=typeof re;return X==\"string\"||X==\"number\"||X==\"symbol\"||X==\"boolean\"?re!==\"__proto__\":re===null}function Gs(re,X){var me=re.__data__;return ir(X)?me[typeof X==\"string\"?\"string\":\"hash\"]:me.map}function qr(re){var X=Gs(this,re).delete(re);return this.size-=X?1:0,X}function ps(re){return Gs(this,re).get(re)}function Ic(re){return Gs(this,re).has(re)}function lc(re,X){var me=Gs(this,re),He=me.size;return me.set(re,X),this.size+=me.size==He?0:1,this}function ka(re){var X=-1,me=re==null?0:re.length;for(this.clear();++X\u003cme;){var He=re[X];this.set(He[0],He[1])}}ka.prototype.clear=Ti,ka.prototype.delete=qr,ka.prototype.get=ps,ka.prototype.has=Ic,ka.prototype.set=lc;var gn=\"Expected a function\";function bn(re,X){if(typeof re!=\"function\"||X!=null\u0026\u0026typeof X!=\"function\")throw new TypeError(gn);var me=function(){var He=arguments,We=X?X.apply(this,He):He[0],ft=me.cache;if(ft.has(We))return ft.get(We);var wt=re.apply(this,He);return me.cache=ft.set(We,wt)||ft,wt};return me.cache=new(bn.Cache||ka),me}bn.Cache=ka;var go=500;function Go(re){var X=bn(re,function(He){return me.size===go\u0026\u0026me.clear(),He}),me=X.cache;return X}var hr=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,ia=/\\\\(\\\\)?/g,lA=Go(function(re){var X=[];return re.charCodeAt(0)===46\u0026\u0026X.push(\"\"),re.replace(hr,function(me,He,We,ft){X.push(We?ft.replace(ia,\"$1\"):He||me)}),X});const MA=lA;function Fa(re){return re==null?\"\":w(re)}function La(re,X){return B(re)?re:_f(re,X)?[re]:MA(Fa(re))}function Y0(re){if(typeof re==\"string\"||y(re))return re;var X=re+\"\";return X==\"0\"\u0026\u00261/re==-1/0?\"-0\":X}function Hr(re,X){X=La(X,re);for(var me=0,He=X.length;re!=null\u0026\u0026me\u003cHe;)re=re[Y0(X[me++])];return me\u0026\u0026me==He?re:void 0}function fh(re,X,me){var He=re==null?void 0:Hr(re,X);return He===void 0?me:He}function Ih(re,X){for(var me=-1,He=X.length,We=re.length;++me\u003cHe;)re[We+me]=X[me];return re}var DA=s?s.isConcatSpreadable:void 0;function OC(re){return B(re)||Fo(re)||!!(DA\u0026\u0026re\u0026\u0026re[DA])}function bI(re,X,me,He,We){var ft=-1,wt=re.length;for(me||(me=OC),We||(We=[]);++ft\u003cwt;){var zt=re[ft];me(zt)?Ih(We,zt):He||(We[We.length]=zt)}return We}function hu(re){var X=re==null?0:re.length;return X?bI(re):[]}var lg=mh(Object.getPrototypeOf,Object);const wp=lg;function kd(re,X,me){var He=-1,We=re.length;X\u003c0\u0026\u0026(X=-X\u003eWe?0:We+X),me=me\u003eWe?We:me,me\u003c0\u0026\u0026(me+=We),We=X\u003eme?0:me-X\u003e\u003e\u003e0,X\u003e\u003e\u003e=0;for(var ft=Array(We);++He\u003cWe;)ft[He]=re[He+X];return ft}function ff(re,X,me,He){var We=-1,ft=re==null?0:re.length;for(He\u0026\u0026ft\u0026\u0026(me=re[++We]);++We\u003cft;)me=X(me,re[We],We,re);return me}function I1(){this.__data__=new oo,this.size=0}function p2(re){var X=this.__data__,me=X.delete(re);return this.size=X.size,me}function Pp(re){return this.__data__.get(re)}function SI(re){return this.__data__.has(re)}var Mp=200;function f_(re,X){var me=this.__data__;if(me instanceof oo){var He=me.__data__;if(!Xo||He.length\u003cMp-1)return He.push([re,X]),this.size=++me.size,this;me=this.__data__=new ka(He)}return me.set(re,X),this.size=me.size,this}function U0(re){var X=this.__data__=new oo(re);this.size=X.size}U0.prototype.clear=I1,U0.prototype.delete=p2,U0.prototype.get=Pp,U0.prototype.has=SI,U0.prototype.set=f_;function S4(re,X){return re\u0026\u0026vt(X,O0(X),re)}var ep=typeof exports==\"object\"\u0026\u0026exports\u0026\u0026!exports.nodeType\u0026\u0026exports,If=ep\u0026\u0026typeof module==\"object\"\u0026\u0026module\u0026\u0026!module.nodeType\u0026\u0026module,A3=If\u0026\u0026If.exports===ep,m2=A3?i.Buffer:void 0,KE=m2?m2.allocUnsafe:void 0;function Fd(re,X){var me=re.length,He=KE?KE(me):new re.constructor(me);return re.copy(He),He}function _2(re,X){for(var me=-1,He=re==null?0:re.length,We=0,ft=[];++me\u003cHe;){var wt=re[me];X(wt,me,re)\u0026\u0026(ft[We++]=wt)}return ft}function o0(){return[]}var tp=Object.prototype,Im=tp.propertyIsEnumerable,pu=Object.getOwnPropertySymbols,K0=pu?function(re){return re==null?[]:(re=Object(re),_2(pu(re),function(X){return Im.call(re,X)}))}:o0;const zc=K0;function np(re,X){return vt(re,zc(re),X)}var y0=Object.getOwnPropertySymbols,Cm=y0?function(re){for(var X=[];re;)Ih(X,zc(re)),re=wp(re);return X}:o0;const Dp=Cm;function Kg(re,X,me){var He=X(re);return B(re)?He:Ih(He,me(re))}function Ld(re){return Kg(re,O0,zc)}function f2(re){return Kg(re,Zh,Dp)}var Np=nt(i,\"DataView\");const QI=Np;var V0=nt(i,\"Promise\");const Vg=V0;var op=nt(i,\"Set\");const bs=op;var Zo=\"[object Map]\",ip=\"[object Object]\",vI=\"[object Promise]\",nc=\"[object Set]\",i0=\"[object WeakMap]\",Cf=\"[object DataView]\",ug=Te(QI),wI=Te(Xo),rp=Te(Vg),Rp=Te(bs),oc=Te(bt),gg=f;(QI\u0026\u0026gg(new QI(new ArrayBuffer(1)))!=Cf||Xo\u0026\u0026gg(new Xo)!=Zo||Vg\u0026\u0026gg(Vg.resolve())!=vI||bs\u0026\u0026gg(new bs)!=nc||bt\u0026\u0026gg(new bt)!=i0)\u0026\u0026(gg=function(re){var X=f(re),me=X==ip?re.constructor:void 0,He=me?Te(me):\"\";if(He)switch(He){case ug:return Cf;case wI:return Zo;case rp:return vI;case Rp:return nc;case oc:return i0}return X});const Cc=gg;var pa=Object.prototype,c3=pa.hasOwnProperty;function PI(re){var X=re.length,me=new re.constructor(X);return X\u0026\u0026typeof re[0]==\"string\"\u0026\u0026c3.call(re,\"index\")\u0026\u0026(me.index=re.index,me.input=re.input),me}var Tp=i.Uint8Array;const rl=Tp;function IA(re){var X=new re.constructor(re.byteLength);return new rl(X).set(new rl(re)),X}function uA(re,X){var me=re.buffer;return new re.constructor(me,re.byteOffset,re.byteLength)}var ym=/\\w*$/;function kp(re){var X=new re.constructor(re.source,ym.exec(re));return X.lastIndex=re.lastIndex,X}var C1=s?s.prototype:void 0,xm=C1?C1.valueOf:void 0;function I2(re){return xm?Object(xm.call(re)):{}}function y1(re,X){var me=re.buffer;return new re.constructor(me,re.byteOffset,re.length)}var I_=\"[object Boolean]\",MI=\"[object Date]\",VE=\"[object Map]\",GC=\"[object Number]\",YC=\"[object RegExp]\",yf=\"[object Set]\",Fu=\"[object String]\",sp=\"[object Symbol]\",xf=\"[object ArrayBuffer]\",C2=\"[object DataView]\",$s=\"[object Float32Array]\",DI=\"[object Float64Array]\",y2=\"[object Int8Array]\",x1=\"[object Int16Array]\",dg=\"[object Int32Array]\",x2=\"[object Uint8Array]\",zE=\"[object Uint8ClampedArray]\",E2=\"[object Uint16Array]\",NI=\"[object Uint32Array]\";function Fp(re,X,me){var He=re.constructor;switch(X){case xf:return IA(re);case I_:case MI:return new He(+re);case C2:return uA(re);case $s:case DI:case y2:case x1:case dg:case x2:case zE:case E2:case NI:return y1(re);case VE:return new He;case GC:case Fu:return new He(re);case YC:return kp(re);case yf:return new He;case sp:return I2(re)}}function qs(re){return typeof re.constructor==\"function\"\u0026\u0026!yo(re)?kt(wp(re)):{}}var RI=\"[object Map]\";function Ch(re){return I(re)\u0026\u0026Cc(re)==RI}var C_=fc\u0026\u0026fc.isMap,yh=C_?vA(C_):Ch;const Em=yh;var z0=\"[object Set]\";function TI(re){return I(re)\u0026\u0026Cc(re)==z0}var Ef=fc\u0026\u0026fc.isSet,Q4=Ef?vA(Ef):TI;const B2=Q4;var Lp=\"[object Arguments]\",ma=\"[object Array]\",b2=\"[object Boolean]\",Hd=\"[object Date]\",E1=\"[object Error]\",kI=\"[object Function]\",Od=\"[object GeneratorFunction]\",B1=\"[object Map]\",FI=\"[object Number]\",UC=\"[object Object]\",S2=\"[object RegExp]\",KC=\"[object Set]\",l3=\"[object String]\",y_=\"[object Symbol]\",ap=\"[object WeakMap]\",u3=\"[object ArrayBuffer]\",Q2=\"[object DataView]\",Gd=\"[object Float32Array]\",Yd=\"[object Float64Array]\",b1=\"[object Int8Array]\",v4=\"[object Int16Array]\",Hp=\"[object Int32Array]\",VC=\"[object Uint8Array]\",Bm=\"[object Uint8ClampedArray]\",Xr=\"[object Uint16Array]\",v2=\"[object Uint32Array]\",Ts={};Ts[Lp]=Ts[ma]=Ts[u3]=Ts[Q2]=Ts[b2]=Ts[Hd]=Ts[Gd]=Ts[Yd]=Ts[b1]=Ts[v4]=Ts[Hp]=Ts[B1]=Ts[FI]=Ts[UC]=Ts[S2]=Ts[KC]=Ts[l3]=Ts[y_]=Ts[VC]=Ts[Bm]=Ts[Xr]=Ts[v2]=!0,Ts[E1]=Ts[kI]=Ts[ap]=!1;function S1(re,X,me,He,We,ft){var wt;if(wt!==void 0)return wt;if(!O(re))return re;var zt=B(re);if(zt)return wt=PI(re),pn(re,wt);var en=Cc(re),In=en==kI||en==Od;if(ds(re))return Fd(re);if(en==UC||en==Lp||In\u0026\u0026!We)return wt=In?{}:qs(re),np(re,S4(wt,re));if(!Ts[en])return We?re:{};wt=Fp(re,en),ft||(ft=new U0);var po=ft.get(re);if(po)return po;ft.set(re,wt),B2(re)?re.forEach(function(Hi){wt.add(S1(Hi,X,me,Hi,re,ft))}):Em(re)\u0026\u0026re.forEach(function(Hi,pr){wt.set(pr,S1(Hi,X,me,pr,re,ft))});var wo=Ld,ci=zt?void 0:wo(re);return Wt(ci||re,function(Hi,pr){ci\u0026\u0026(pr=Hi,Hi=re[pr]),qe(wt,pr,S1(Hi,X,me,pr,re,ft))}),wt}var CA=4;function x0(re){return S1(re,CA)}function zg(re){for(var X=-1,me=re==null?0:re.length,He=0,We=[];++X\u003cme;){var ft=re[X];ft\u0026\u0026(We[He++]=ft)}return We}var bm=\"__lodash_hash_undefined__\";function Ss(re){return this.__data__.set(re,bm),this}function ic(re){return this.__data__.has(re)}function Va(re){var X=-1,me=re==null?0:re.length;for(this.__data__=new ka;++X\u003cme;)this.add(re[X])}Va.prototype.add=Va.prototype.push=Ss,Va.prototype.has=ic;function LI(re,X){for(var me=-1,He=re==null?0:re.length;++me\u003cHe;)if(X(re[me],me,re))return!0;return!1}function Lu(re,X){return re.has(X)}var Jg=1,x_=2;function hg(re,X,me,He,We,ft){var wt=me\u0026Jg,zt=re.length,en=X.length;if(zt!=en\u0026\u0026!(wt\u0026\u0026en\u003ezt))return!1;var In=ft.get(re),po=ft.get(X);if(In\u0026\u0026po)return In==X\u0026\u0026po==re;var wo=-1,ci=!0,Hi=me\u0026x_?new Va:void 0;for(ft.set(re,X),ft.set(X,re);++wo\u003czt;){var pr=re[wo],Wr=X[wo];if(He)var Ca=wt?He(Wr,pr,wo,X,re,ft):He(pr,Wr,wo,re,X,ft);if(Ca!==void 0){if(Ca)continue;ci=!1;break}if(Hi){if(!LI(X,function(rr,Wi){if(!Lu(Hi,Wi)\u0026\u0026(pr===rr||We(pr,rr,me,He,ft)))return Hi.push(Wi)})){ci=!1;break}}else if(!(pr===Wr||We(pr,Wr,me,He,ft))){ci=!1;break}}return ft.delete(re),ft.delete(X),ci}function xh(re){var X=-1,me=Array(re.size);return re.forEach(function(He,We){me[++X]=[We,He]}),me}function Ud(re){var X=-1,me=Array(re.size);return re.forEach(function(He){me[++X]=He}),me}var Ks=1,E_=2,Eh=\"[object Boolean]\",B_=\"[object Date]\",w4=\"[object Error]\",J0=\"[object Map]\",Sm=\"[object Number]\",w2=\"[object RegExp]\",g3=\"[object Set]\",Wg=\"[object String]\",r0=\"[object Symbol]\",P2=\"[object ArrayBuffer]\",zC=\"[object DataView]\",W0=s?s.prototype:void 0,M2=W0?W0.valueOf:void 0;function sl(re,X,me,He,We,ft,wt){switch(me){case zC:if(re.byteLength!=X.byteLength||re.byteOffset!=X.byteOffset)return!1;re=re.buffer,X=X.buffer;case P2:return!(re.byteLength!=X.byteLength||!ft(new rl(re),new rl(X)));case Eh:case B_:case Sm:return Lt(+re,+X);case w4:return re.name==X.name\u0026\u0026re.message==X.message;case w2:case Wg:return re==X+\"\";case J0:var zt=xh;case g3:var en=He\u0026Ks;if(zt||(zt=Ud),re.size!=X.size\u0026\u0026!en)return!1;var In=wt.get(re);if(In)return In==X;He|=E_,wt.set(re,X);var po=hg(zt(re),zt(X),He,We,ft,wt);return wt.delete(re),po;case r0:if(M2)return M2.call(re)==M2.call(X)}return!1}var b_=1,s0=Object.prototype,JE=s0.hasOwnProperty;function d3(re,X,me,He,We,ft){var wt=me\u0026b_,zt=Ld(re),en=zt.length,In=Ld(X),po=In.length;if(en!=po\u0026\u0026!wt)return!1;for(var wo=en;wo--;){var ci=zt[wo];if(!(wt?ci in X:JE.call(X,ci)))return!1}var Hi=ft.get(re),pr=ft.get(X);if(Hi\u0026\u0026pr)return Hi==X\u0026\u0026pr==re;var Wr=!0;ft.set(re,X),ft.set(X,re);for(var Ca=wt;++wo\u003cen;){ci=zt[wo];var rr=re[ci],Wi=X[ci];if(He)var Mi=wt?He(Wi,rr,ci,X,re,ft):He(rr,Wi,ci,re,X,ft);if(!(Mi===void 0?rr===Wi||We(rr,Wi,me,He,ft):Mi)){Wr=!1;break}Ca||(Ca=ci==\"constructor\")}if(Wr\u0026\u0026!Ca){var Gr=re.constructor,Bc=X.constructor;Gr!=Bc\u0026\u0026\"constructor\"in re\u0026\u0026\"constructor\"in X\u0026\u0026!(typeof Gr==\"function\"\u0026\u0026Gr instanceof Gr\u0026\u0026typeof Bc==\"function\"\u0026\u0026Bc instanceof Bc)\u0026\u0026(Wr=!1)}return ft.delete(re),ft.delete(X),Wr}var JC=1,Bf=\"[object Arguments]\",D2=\"[object Array]\",WC=\"[object Object]\",Qm=Object.prototype,N2=Qm.hasOwnProperty;function WE(re,X,me,He,We,ft){var wt=B(re),zt=B(X),en=wt?D2:Cc(re),In=zt?D2:Cc(X);en=en==Bf?WC:en,In=In==Bf?WC:In;var po=en==WC,wo=In==WC,ci=en==In;if(ci\u0026\u0026ds(re)){if(!ds(X))return!1;wt=!0,po=!1}if(ci\u0026\u0026!po)return ft||(ft=new U0),wt||Ul(re)?hg(re,X,me,He,We,ft):sl(re,X,en,me,He,We,ft);if(!(me\u0026JC)){var Hi=po\u0026\u0026N2.call(re,\"__wrapped__\"),pr=wo\u0026\u0026N2.call(X,\"__wrapped__\");if(Hi||pr){var Wr=Hi?re.value():re,Ca=pr?X.value():X;return ft||(ft=new U0),We(Wr,Ca,me,He,ft)}}return ci?(ft||(ft=new U0),d3(re,X,me,He,We,ft)):!1}function jE(re,X,me,He,We){return re===X?!0:re==null||X==null||!I(re)\u0026\u0026!I(X)?re!==re\u0026\u0026X!==X:WE(re,X,me,He,jE,We)}var $E=1,R2=2;function h3(re,X,me,He){var We=me.length,ft=We;if(re==null)return!ft;for(re=Object(re);We--;){var wt=me[We];if(wt[2]?wt[1]!==re[wt[0]]:!(wt[0]in re))return!1}for(;++We\u003cft;){wt=me[We];var zt=wt[0],en=re[zt],In=wt[1];if(wt[2]){if(en===void 0\u0026\u0026!(zt in re))return!1}else{var po=new U0,wo;if(!(wo===void 0?jE(In,en,$E|R2,He,po):wo))return!1}}return!0}function p3(re){return re===re\u0026\u0026!O(re)}function l9(re){for(var X=O0(re),me=X.length;me--;){var He=X[me],We=re[He];X[me]=[He,We,p3(We)]}return X}function qE(re,X){return function(me){return me==null?!1:me[re]===X\u0026\u0026(X!==void 0||re in Object(me))}}function P4(re){var X=l9(re);return X.length==1\u0026\u0026X[0][2]?qE(X[0][0],X[0][1]):function(me){return me===re||h3(me,re,X)}}function bf(re,X){return re!=null\u0026\u0026X in Object(re)}function XE(re,X,me){X=La(X,re);for(var He=-1,We=X.length,ft=!1;++He\u003cWe;){var wt=Y0(X[He]);if(!(ft=re!=null\u0026\u0026me(re,wt)))break;re=re[wt]}return ft||++He!=We?ft:(We=re==null?0:re.length,!!We\u0026\u0026Nn(We)\u0026\u0026Kt(wt,We)\u0026\u0026(B(re)||Fo(re)))}function T2(re,X){return re!=null\u0026\u0026XE(re,X,bf)}var k2=1,Ap=2;function F2(re,X){return _f(re)\u0026\u0026p3(X)?qE(Y0(re),X):function(me){var He=fh(me,re);return He===void 0\u0026\u0026He===X?T2(me,re):jE(X,He,k2|Ap)}}function m3(re){return function(X){return X?.[re]}}function HI(re){return function(X){return Hr(X,re)}}function kc(re){return _f(re)?m3(Y0(re)):HI(re)}function S_(re){return typeof re==\"function\"?re:re==null?ge:typeof re==\"object\"?B(re)?F2(re[0],re[1]):P4(re):kc(re)}function M4(re,X,me,He){for(var We=-1,ft=re==null?0:re.length;++We\u003cft;){var wt=re[We];X(He,wt,me(wt),re)}return He}function jC(re){return function(X,me,He){for(var We=-1,ft=Object(X),wt=He(X),zt=wt.length;zt--;){var en=wt[++We];if(me(ft[en],en,ft)===!1)break}return X}}var vm=jC();const ZE=vm;function NA(re,X){return re\u0026\u0026ZE(re,X,O0)}function Sf(re,X){return function(me,He){if(me==null)return me;if(!Co(me))return re(me,He);for(var We=me.length,ft=-1,wt=Object(me);++ft\u003cWe\u0026\u0026He(wt[ft],ft,wt)!==!1;);return me}}var OI=Sf(NA);const Q1=OI;function e5(re,X,me,He){return Q1(re,function(We,ft,wt){X(He,We,me(We),wt)}),He}function u9(re,X){return function(me,He){var We=B(me)?M4:e5,ft={};return We(me,re,S_(He),ft)}}var t5=Object.prototype,g9=t5.hasOwnProperty,n5=nn(function(re,X){re=Object(re);var me=-1,He=X.length,We=He\u003e2?X[2]:void 0;for(We\u0026\u0026ei(X[0],X[1],We)\u0026\u0026(He=1);++me\u003cHe;)for(var ft=X[me],wt=Zh(ft),zt=-1,en=wt.length;++zt\u003cen;){var In=wt[zt],po=re[In];(po===void 0||Lt(po,t5[In])\u0026\u0026!g9.call(re,In))\u0026\u0026(re[In]=ft[In])}return re});const o5=n5;function Qf(re){return I(re)\u0026\u0026Co(re)}var Q_=200;function d9(re,X,me,He){var We=-1,ft=kn,wt=!0,zt=re.length,en=[],In=X.length;if(!zt)return en;X.length\u003e=Q_\u0026\u0026(ft=Lu,wt=!1,X=new Va(X));e:for(;++We\u003czt;){var po=re[We],wo=po;if(po=po!==0?po:0,wt\u0026\u0026wo===wo){for(var ci=In;ci--;)if(X[ci]===wo)continue e;en.push(po)}else ft(X,wo,He)||en.push(po)}return en}var $C=nn(function(re,X){return Qf(re)?d9(re,bI(X,1,Qf,!0)):[]});const L2=$C;function GI(re){var X=re==null?0:re.length;return X?re[X-1]:void 0}function Hu(re,X,me){var He=re==null?0:re.length;return He?(X=X===void 0?1:le(X),kd(re,X\u003c0?0:X,He)):[]}function wm(re,X,me){var He=re==null?0:re.length;return He?(X=X===void 0?1:le(X),X=He-X,kd(re,0,X\u003c0?0:X)):[]}function i5(re){return typeof re==\"function\"?re:ge}function zr(re,X){var me=B(re)?Wt:Q1;return me(re,i5(X))}function v1(re,X){for(var me=-1,He=re==null?0:re.length;++me\u003cHe;)if(!X(re[me],me,re))return!1;return!0}function D4(re,X){var me=!0;return Q1(re,function(He,We,ft){return me=!!X(He,We,ft),me}),me}function Bh(re,X,me){var He=B(re)?v1:D4;return He(re,S_(X))}function H2(re,X){var me=[];return Q1(re,function(He,We,ft){X(He,We,ft)\u0026\u0026me.push(He)}),me}function mu(re,X){var me=B(re)?_2:H2;return me(re,S_(X))}function vf(re){return function(X,me,He){var We=Object(X);if(!Co(X)){var ft=S_(me);X=O0(X),me=function(zt){return ft(We[zt],zt,We)}}var wt=re(X,me,He);return wt\u003e-1?We[ft?X[wt]:wt]:void 0}}var YI=Math.max;function bh(re,X,me){var He=re==null?0:re.length;if(!He)return-1;var We=me==null?0:le(me);return We\u003c0\u0026\u0026(We=YI(He+We,0)),Xt(re,S_(X),We)}var _3=vf(bh);const cp=_3;function Jc(re){return re\u0026\u0026re.length?re[0]:void 0}function r5(re,X){var me=-1,He=Co(re)?Array(re.length):[];return Q1(re,function(We,ft,wt){He[++me]=X(We,ft,wt)}),He}function Gi(re,X){var me=B(re)?x:r5;return me(re,S_(X))}function pg(re,X){return bI(Gi(re,X))}var Pm=Object.prototype,Op=Pm.hasOwnProperty,Sh=u9(function(re,X,me){Op.call(re,me)?re[me].push(X):rn(re,me,[X])});const Ys=Sh;var w1=Object.prototype,a0=w1.hasOwnProperty;function al(re,X){return re!=null\u0026\u0026a0.call(re,X)}function ai(re,X){return re!=null\u0026\u0026XE(re,X,al)}var v_=\"[object String]\";function Al(re){return typeof re==\"string\"||!B(re)\u0026\u0026I(re)\u0026\u0026f(re)==v_}function P1(re,X){return x(X,function(me){return re[me]})}function Wc(re){return re==null?[]:P1(re,O0(re))}var Gp=Math.max;function A0(re,X,me,He){re=Co(re)?re:Wc(re),me=me?le(me):0;var We=re.length;return me\u003c0\u0026\u0026(me=Gp(We+me,0)),Al(re)?me\u003c=We\u0026\u0026re.indexOf(X,me)\u003e-1:!!We\u0026\u0026An(re,X,me)\u003e-1}function Mm(re,X,me){var He=re==null?0:re.length;if(!He)return-1;var We=0;return An(re,X,We)}var mg=\"[object Map]\",_g=\"[object Set]\",O2=Object.prototype,G2=O2.hasOwnProperty;function RA(re){if(re==null)return!0;if(Co(re)\u0026\u0026(B(re)||typeof re==\"string\"||typeof re.splice==\"function\"||ds(re)||Ul(re)||Fo(re)))return!re.length;var X=Cc(re);if(X==mg||X==_g)return!re.size;if(yo(re))return!FC(re).length;for(var me in re)if(G2.call(re,me))return!1;return!0}var jg=\"[object RegExp]\";function qC(re){return I(re)\u0026\u0026f(re)==jg}var Kd=fc\u0026\u0026fc.isRegExp,h9=Kd?vA(Kd):qC;const yc=h9;function cs(re){return re===void 0}var Jn=\"Expected a function\";function c8(re){if(typeof re!=\"function\")throw new TypeError(Jn);return function(){var X=arguments;switch(X.length){case 0:return!re.call(this);case 1:return!re.call(this,X[0]);case 2:return!re.call(this,X[0],X[1]);case 3:return!re.call(this,X[0],X[1],X[2])}return!re.apply(this,X)}}function wf(re,X,me,He){if(!O(re))return re;X=La(X,re);for(var We=-1,ft=X.length,wt=ft-1,zt=re;zt!=null\u0026\u0026++We\u003cft;){var en=Y0(X[We]),In=me;if(en===\"__proto__\"||en===\"constructor\"||en===\"prototype\")return re;if(We!=wt){var po=zt[en];In=void 0,In===void 0\u0026\u0026(In=O(po)?po:Kt(X[We+1])?[]:{})}qe(zt,en,In),zt=zt[en]}return re}function XC(re,X,me){for(var He=-1,We=X.length,ft={};++He\u003cWe;){var wt=X[He],zt=Hr(re,wt);me(zt,wt)\u0026\u0026wf(ft,La(wt,re),zt)}return ft}function fg(re,X){if(re==null)return{};var me=x(f2(re),function(He){return[He]});return X=S_(X),XC(re,me,function(He,We){return X(He,We[0])})}function Y2(re,X,me,He,We){return We(re,function(ft,wt,zt){me=He?(He=!1,ft):X(me,ft,wt,zt)}),me}function _u(re,X,me){var He=B(re)?ff:Y2,We=arguments.length\u003c3;return He(re,S_(X),me,We,Q1)}function Ig(re,X){var me=B(re)?_2:H2;return me(re,c8(S_(X)))}function s5(re,X){var me;return Q1(re,function(He,We,ft){return me=X(He,We,ft),!me}),!!me}function f3(re,X,me){var He=B(re)?LI:s5;return He(re,S_(X))}var ZC=1/0,I3=bs\u0026\u00261/Ud(new bs([,-0]))[1]==ZC?function(re){return new bs(re)}:Yt;const Pf=I3;var UI=200;function C3(re,X,me){var He=-1,We=kn,ft=re.length,wt=!0,zt=[],en=zt;if(ft\u003e=UI){var In=Pf(re);if(In)return Ud(In);wt=!1,We=Lu,en=new Va}else en=zt;e:for(;++He\u003cft;){var po=re[He],wo=po;if(po=po!==0?po:0,wt\u0026\u0026wo===wo){for(var ci=en.length;ci--;)if(en[ci]===wo)continue e;zt.push(po)}else We(en,wo,me)||(en!==zt\u0026\u0026en.push(wo),zt.push(po))}return zt}function KI(re){return re\u0026\u0026re.length?C3(re):[]}function E0(re){console\u0026\u0026console.error\u0026\u0026console.error(`Error: ${re}`)}function jc(re){console\u0026\u0026console.warn\u0026\u0026console.warn(`Warning: ${re}`)}function cl(re){const X=new Date().getTime(),me=re();return{time:new Date().getTime()-X,value:me}}function Ou(re){function X(){}X.prototype=re;const me=new X;function He(){return typeof me.bar}return He(),He(),re}function B0(re){return bl(re)?re.LABEL:re.name}function bl(re){return Al(re.LABEL)\u0026\u0026re.LABEL!==\"\"}class Vd{get definition(){return this._definition}set definition(X){this._definition=X}constructor(X){this._definition=X}accept(X){X.visit(this),zr(this.definition,me=\u003e{me.accept(X)})}}class za extends Vd{constructor(X){super([]),this.idx=1,tr(this,fg(X,me=\u003eme!==void 0))}set definition(X){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(X){X.visit(this)}}class $g extends Vd{constructor(X){super(X.definition),this.orgText=\"\",tr(this,fg(X,me=\u003eme!==void 0))}}class Xa extends Vd{constructor(X){super(X.definition),this.ignoreAmbiguities=!1,tr(this,fg(X,me=\u003eme!==void 0))}}class Za extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=\u003eme!==void 0))}}class Vs extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=\u003eme!==void 0))}}class fu extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=\u003eme!==void 0))}}class Si extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=\u003eme!==void 0))}}class lp extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=\u003eme!==void 0))}}class c0 extends Vd{get definition(){return this._definition}set definition(X){this._definition=X}constructor(X){super(X.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,tr(this,fg(X,me=\u003eme!==void 0))}}class $c{constructor(X){this.idx=1,tr(this,fg(X,me=\u003eme!==void 0))}accept(X){X.visit(this)}}function Qh(re){return Gi(re,Kl)}function Kl(re){function X(me){return Gi(me,Kl)}if(re instanceof za){const me={type:\"NonTerminal\",name:re.nonTerminalName,idx:re.idx};return Al(re.label)\u0026\u0026(me.label=re.label),me}else{if(re instanceof Xa)return{type:\"Alternative\",definition:X(re.definition)};if(re instanceof Za)return{type:\"Option\",idx:re.idx,definition:X(re.definition)};if(re instanceof Vs)return{type:\"RepetitionMandatory\",idx:re.idx,definition:X(re.definition)};if(re instanceof fu)return{type:\"RepetitionMandatoryWithSeparator\",idx:re.idx,separator:Kl(new $c({terminalType:re.separator})),definition:X(re.definition)};if(re instanceof lp)return{type:\"RepetitionWithSeparator\",idx:re.idx,separator:Kl(new $c({terminalType:re.separator})),definition:X(re.definition)};if(re instanceof Si)return{type:\"Repetition\",idx:re.idx,definition:X(re.definition)};if(re instanceof c0)return{type:\"Alternation\",idx:re.idx,definition:X(re.definition)};if(re instanceof $c){const me={type:\"Terminal\",name:re.terminalType.name,label:B0(re.terminalType),idx:re.idx};Al(re.label)\u0026\u0026(me.terminalLabel=re.label);const He=re.terminalType.PATTERN;return re.terminalType.PATTERN\u0026\u0026(me.pattern=yc(He)?He.source:He),me}else{if(re instanceof $g)return{type:\"Rule\",name:re.name,orgText:re.orgText,definition:X(re.definition)};throw Error(\"non exhaustive match\")}}}class VI{visit(X){const me=X;switch(me.constructor){case za:return this.visitNonTerminal(me);case Xa:return this.visitAlternative(me);case Za:return this.visitOption(me);case Vs:return this.visitRepetitionMandatory(me);case fu:return this.visitRepetitionMandatoryWithSeparator(me);case lp:return this.visitRepetitionWithSeparator(me);case Si:return this.visitRepetition(me);case c0:return this.visitAlternation(me);case $c:return this.visitTerminal(me);case $g:return this.visitRule(me);default:throw Error(\"non exhaustive match\")}}visitNonTerminal(X){}visitAlternative(X){}visitOption(X){}visitRepetition(X){}visitRepetitionMandatory(X){}visitRepetitionMandatoryWithSeparator(X){}visitRepetitionWithSeparator(X){}visitAlternation(X){}visitTerminal(X){}visitRule(X){}}function p9(re){return re instanceof Xa||re instanceof Za||re instanceof Si||re instanceof Vs||re instanceof fu||re instanceof lp||re instanceof $c||re instanceof $g}function zI(re,X=[]){return re instanceof Za||re instanceof Si||re instanceof lp?!0:re instanceof c0?f3(re.definition,He=\u003ezI(He,X)):re instanceof za\u0026\u0026A0(X,re)?!1:re instanceof Vd?(re instanceof za\u0026\u0026X.push(re),Bh(re.definition,He=\u003ezI(He,X))):!1}function rc(re){return re instanceof c0}function b0(re){if(re instanceof za)return\"SUBRULE\";if(re instanceof Za)return\"OPTION\";if(re instanceof c0)return\"OR\";if(re instanceof Vs)return\"AT_LEAST_ONE\";if(re instanceof fu)return\"AT_LEAST_ONE_SEP\";if(re instanceof lp)return\"MANY_SEP\";if(re instanceof Si)return\"MANY\";if(re instanceof $c)return\"CONSUME\";throw Error(\"non exhaustive match\")}class Mf{walk(X,me=[]){zr(X.definition,(He,We)=\u003e{const ft=Hu(X.definition,We+1);if(He instanceof za)this.walkProdRef(He,ft,me);else if(He instanceof $c)this.walkTerminal(He,ft,me);else if(He instanceof Xa)this.walkFlat(He,ft,me);else if(He instanceof Za)this.walkOption(He,ft,me);else if(He instanceof Vs)this.walkAtLeastOne(He,ft,me);else if(He instanceof fu)this.walkAtLeastOneSep(He,ft,me);else if(He instanceof lp)this.walkManySep(He,ft,me);else if(He instanceof Si)this.walkMany(He,ft,me);else if(He instanceof c0)this.walkOr(He,ft,me);else throw Error(\"non exhaustive match\")})}walkTerminal(X,me,He){}walkProdRef(X,me,He){}walkFlat(X,me,He){const We=me.concat(He);this.walk(X,We)}walkOption(X,me,He){const We=me.concat(He);this.walk(X,We)}walkAtLeastOne(X,me,He){const We=[new Za({definition:X.definition})].concat(me,He);this.walk(X,We)}walkAtLeastOneSep(X,me,He){const We=a5(X,me,He);this.walk(X,We)}walkMany(X,me,He){const We=[new Za({definition:X.definition})].concat(me,He);this.walk(X,We)}walkManySep(X,me,He){const We=a5(X,me,He);this.walk(X,We)}walkOr(X,me,He){const We=me.concat(He);zr(X.definition,ft=\u003e{const wt=new Xa({definition:[ft]});this.walk(wt,We)})}}function a5(re,X,me){return[new Za({definition:[new $c({terminalType:re.separator})].concat(re.definition)})].concat(X,me)}function Cg(re){if(re instanceof za)return Cg(re.referencedRule);if(re instanceof $c)return ey(re);if(p9(re))return Dm(re);if(rc(re))return JI(re);throw Error(\"non exhaustive match\")}function Dm(re){let X=[];const me=re.definition;let He=0,We=me.length\u003eHe,ft,wt=!0;for(;We\u0026\u0026wt;)ft=me[He],wt=zI(ft),X=X.concat(Cg(ft)),He=He+1,We=me.length\u003eHe;return KI(X)}function JI(re){const X=Gi(re.definition,me=\u003eCg(me));return KI(hu(X))}function ey(re){return[re.terminalType]}const Nm=\"_~IN~_\";class ll extends Mf{constructor(X){super(),this.topProd=X,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(X,me,He){}walkProdRef(X,me,He){const We=A5(X.referencedRule,X.idx)+this.topProd.name,ft=me.concat(He),wt=new Xa({definition:ft}),zt=Cg(wt);this.follows[We]=zt}}function WI(re){const X={};return zr(re,me=\u003e{const He=new ll(me).startWalking();tr(X,He)}),X}function A5(re,X){return re.name+X+Nm}function Yi(re){return re.charCodeAt(0)}function c5(re,X){Array.isArray(re)?re.forEach(function(me){X.push(me)}):X.push(re)}function Df(re,X){if(re[X]===!0)throw\"duplicate flag \"+X;re[X],re[X]=!0}function M1(re){if(re===void 0)throw Error(\"Internal Error - Should never get here!\");return!0}function ul(){throw Error(\"Internal Error - Should never get here!\")}function Iu(re){return re.type===\"Character\"}const yg=[];for(let re=Yi(\"0\");re\u003c=Yi(\"9\");re++)yg.push(re);const ss=[Yi(\"_\")].concat(yg);for(let re=Yi(\"a\");re\u003c=Yi(\"z\");re++)ss.push(re);for(let re=Yi(\"A\");re\u003c=Yi(\"Z\");re++)ss.push(re);const D1=[Yi(\" \"),Yi(\"\\f\"),Yi(`\n`),Yi(\"\\r\"),Yi(\"\t\"),Yi(\"\\v\"),Yi(\"\t\"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\"\\u2028\"),Yi(\"\\u2029\"),Yi(\" \"),Yi(\" \"),Yi(\" \"),Yi(\"\\uFEFF\")],l5=/[0-9a-fA-F]/,Yp=/[0-9]/,zd=/[1-9]/;class Gu{constructor(){this.idx=0,this.input=\"\",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(X){this.idx=X.idx,this.input=X.input,this.groupIdx=X.groupIdx}pattern(X){this.idx=0,this.input=X,this.groupIdx=0,this.consumeChar(\"/\");const me=this.disjunction();this.consumeChar(\"/\");const He={type:\"Flags\",loc:{begin:this.idx,end:X.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case\"g\":Df(He,\"global\");break;case\"i\":Df(He,\"ignoreCase\");break;case\"m\":Df(He,\"multiLine\");break;case\"u\":Df(He,\"unicode\");break;case\"y\":Df(He,\"sticky\");break}if(this.idx!==this.input.length)throw Error(\"Redundant input: \"+this.input.substring(this.idx));return{type:\"Pattern\",flags:He,value:me,loc:this.loc(0)}}disjunction(){const X=[],me=this.idx;for(X.push(this.alternative());this.peekChar()===\"|\";)this.consumeChar(\"|\"),X.push(this.alternative());return{type:\"Disjunction\",value:X,loc:this.loc(me)}}alternative(){const X=[],me=this.idx;for(;this.isTerm();)X.push(this.term());return{type:\"Alternative\",value:X,loc:this.loc(me)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const X=this.idx;switch(this.popChar()){case\"^\":return{type:\"StartAnchor\",loc:this.loc(X)};case\"$\":return{type:\"EndAnchor\",loc:this.loc(X)};case\"\\\\\":switch(this.popChar()){case\"b\":return{type:\"WordBoundary\",loc:this.loc(X)};case\"B\":return{type:\"NonWordBoundary\",loc:this.loc(X)}}throw Error(\"Invalid Assertion Escape\");case\"(\":this.consumeChar(\"?\");let me;switch(this.popChar()){case\"=\":me=\"Lookahead\";break;case\"!\":me=\"NegativeLookahead\";break}M1(me);const He=this.disjunction();return this.consumeChar(\")\"),{type:me,value:He,loc:this.loc(X)}}return ul()}quantifier(X=!1){let me;const He=this.idx;switch(this.popChar()){case\"*\":me={atLeast:0,atMost:1/0};break;case\"+\":me={atLeast:1,atMost:1/0};break;case\"?\":me={atLeast:0,atMost:1};break;case\"{\":const We=this.integerIncludingZero();switch(this.popChar()){case\"}\":me={atLeast:We,atMost:We};break;case\",\":let ft;this.isDigit()?(ft=this.integerIncludingZero(),me={atLeast:We,atMost:ft}):me={atLeast:We,atMost:1/0},this.consumeChar(\"}\");break}if(X===!0\u0026\u0026me===void 0)return;M1(me);break}if(!(X===!0\u0026\u0026me===void 0)\u0026\u0026M1(me))return this.peekChar(0)===\"?\"?(this.consumeChar(\"?\"),me.greedy=!1):me.greedy=!0,me.type=\"Quantifier\",me.loc=this.loc(He),me}atom(){let X;const me=this.idx;switch(this.peekChar()){case\".\":X=this.dotAll();break;case\"\\\\\":X=this.atomEscape();break;case\"[\":X=this.characterClass();break;case\"(\":X=this.group();break}if(X===void 0\u0026\u0026this.isPatternCharacter()\u0026\u0026(X=this.patternCharacter()),M1(X))return X.loc=this.loc(me),this.isQuantifier()\u0026\u0026(X.quantifier=this.quantifier()),X}dotAll(){return this.consumeChar(\".\"),{type:\"Set\",complement:!0,value:[Yi(`\n`),Yi(\"\\r\"),Yi(\"\\u2028\"),Yi(\"\\u2029\")]}}atomEscape(){switch(this.consumeChar(\"\\\\\"),this.peekChar()){case\"1\":case\"2\":case\"3\":case\"4\":case\"5\":case\"6\":case\"7\":case\"8\":case\"9\":return this.decimalEscapeAtom();case\"d\":case\"D\":case\"s\":case\"S\":case\"w\":case\"W\":return this.characterClassEscape();case\"f\":case\"n\":case\"r\":case\"t\":case\"v\":return this.controlEscapeAtom();case\"c\":return this.controlLetterEscapeAtom();case\"0\":return this.nulCharacterAtom();case\"x\":return this.hexEscapeSequenceAtom();case\"u\":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:\"GroupBackReference\",value:this.positiveInteger()}}characterClassEscape(){let X,me=!1;switch(this.popChar()){case\"d\":X=yg;break;case\"D\":X=yg,me=!0;break;case\"s\":X=D1;break;case\"S\":X=D1,me=!0;break;case\"w\":X=ss;break;case\"W\":X=ss,me=!0;break}if(M1(X))return{type:\"Set\",value:X,complement:me}}controlEscapeAtom(){let X;switch(this.popChar()){case\"f\":X=Yi(\"\\f\");break;case\"n\":X=Yi(`\n`);break;case\"r\":X=Yi(\"\\r\");break;case\"t\":X=Yi(\"\t\");break;case\"v\":X=Yi(\"\\v\");break}if(M1(X))return{type:\"Character\",value:X}}controlLetterEscapeAtom(){this.consumeChar(\"c\");const X=this.popChar();if(/[a-zA-Z]/.test(X)===!1)throw Error(\"Invalid \");return{type:\"Character\",value:X.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(\"0\"),{type:\"Character\",value:Yi(\"\\0\")}}hexEscapeSequenceAtom(){return this.consumeChar(\"x\"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(\"u\"),this.parseHexDigits(4)}identityEscapeAtom(){const X=this.popChar();return{type:\"Character\",value:Yi(X)}}classPatternCharacterAtom(){switch(this.peekChar()){case`\n`:case\"\\r\":case\"\\u2028\":case\"\\u2029\":case\"\\\\\":case\"]\":throw Error(\"TBD\");default:const X=this.popChar();return{type:\"Character\",value:Yi(X)}}}characterClass(){const X=[];let me=!1;for(this.consumeChar(\"[\"),this.peekChar(0)===\"^\"\u0026\u0026(this.consumeChar(\"^\"),me=!0);this.isClassAtom();){const He=this.classAtom();if(He.type,Iu(He)\u0026\u0026this.isRangeDash()){this.consumeChar(\"-\");const We=this.classAtom();if(We.type,Iu(We)){if(We.value\u003cHe.value)throw Error(\"Range out of order in character class\");X.push({from:He.value,to:We.value})}else c5(He.value,X),X.push(Yi(\"-\")),c5(We.value,X)}else c5(He.value,X)}return this.consumeChar(\"]\"),{type:\"Set\",complement:me,value:X}}classAtom(){switch(this.peekChar()){case\"]\":case`\n`:case\"\\r\":case\"\\u2028\":case\"\\u2029\":throw Error(\"TBD\");case\"\\\\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar(\"\\\\\"),this.peekChar()){case\"b\":return this.consumeChar(\"b\"),{type:\"Character\",value:Yi(\"\\b\")};case\"d\":case\"D\":case\"s\":case\"S\":case\"w\":case\"W\":return this.characterClassEscape();case\"f\":case\"n\":case\"r\":case\"t\":case\"v\":return this.controlEscapeAtom();case\"c\":return this.controlLetterEscapeAtom();case\"0\":return this.nulCharacterAtom();case\"x\":return this.hexEscapeSequenceAtom();case\"u\":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let X=!0;this.consumeChar(\"(\"),this.peekChar(0)===\"?\"?(this.consumeChar(\"?\"),this.consumeChar(\":\"),X=!1):this.groupIdx++;const me=this.disjunction();this.consumeChar(\")\");const He={type:\"Group\",capturing:X,value:me};return X\u0026\u0026(He.idx=this.groupIdx),He}positiveInteger(){let X=this.popChar();if(zd.test(X)===!1)throw Error(\"Expecting a positive integer\");for(;Yp.test(this.peekChar(0));)X+=this.popChar();return parseInt(X,10)}integerIncludingZero(){let X=this.popChar();if(Yp.test(X)===!1)throw Error(\"Expecting an integer\");for(;Yp.test(this.peekChar(0));)X+=this.popChar();return parseInt(X,10)}patternCharacter(){const X=this.popChar();switch(X){case`\n`:case\"\\r\":case\"\\u2028\":case\"\\u2029\":case\"^\":case\"$\":case\"\\\\\":case\".\":case\"*\":case\"+\":case\"?\":case\"(\":case\")\":case\"[\":case\"|\":throw Error(\"TBD\");default:return{type:\"Character\",value:Yi(X)}}}isRegExpFlag(){switch(this.peekChar(0)){case\"g\":case\"i\":case\"m\":case\"u\":case\"y\":return!0;default:return!1}}isRangeDash(){return this.peekChar()===\"-\"\u0026\u0026this.isClassAtom(1)}isDigit(){return Yp.test(this.peekChar(0))}isClassAtom(X=0){switch(this.peekChar(X)){case\"]\":case`\n`:case\"\\r\":case\"\\u2028\":case\"\\u2029\":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case\".\":case\"\\\\\":case\"[\":case\"(\":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case\"^\":case\"$\":return!0;case\"\\\\\":switch(this.peekChar(1)){case\"b\":case\"B\":return!0;default:return!1}case\"(\":return this.peekChar(1)===\"?\"\u0026\u0026(this.peekChar(2)===\"=\"||this.peekChar(2)===\"!\");default:return!1}}isQuantifier(){const X=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(X)}}isPatternCharacter(){switch(this.peekChar()){case\"^\":case\"$\":case\"\\\\\":case\".\":case\"*\":case\"+\":case\"?\":case\"(\":case\")\":case\"[\":case\"|\":case\"/\":case`\n`:case\"\\r\":case\"\\u2028\":case\"\\u2029\":return!1;default:return!0}}parseHexDigits(X){let me=\"\";for(let We=0;We\u003cX;We++){const ft=this.popChar();if(l5.test(ft)===!1)throw Error(\"Expecting a HexDecimal digits\");me+=ft}return{type:\"Character\",value:parseInt(me,16)}}peekChar(X=0){return this.input[this.idx+X]}popChar(){const X=this.peekChar(0);return this.consumeChar(void 0),X}consumeChar(X){if(X!==void 0\u0026\u0026this.input[this.idx]!==X)throw Error(\"Expected: '\"+X+\"' but found: '\"+this.input[this.idx]+\"' at offset: \"+this.idx);if(this.idx\u003e=this.input.length)throw Error(\"Unexpected end of input\");this.idx++}loc(X){return{begin:X,end:this.idx}}}class Nf{visitChildren(X){for(const me in X){const He=X[me];X.hasOwnProperty(me)\u0026\u0026(He.type!==void 0?this.visit(He):Array.isArray(He)\u0026\u0026He.forEach(We=\u003e{this.visit(We)},this))}}visit(X){switch(X.type){case\"Pattern\":this.visitPattern(X);break;case\"Flags\":this.visitFlags(X);break;case\"Disjunction\":this.visitDisjunction(X);break;case\"Alternative\":this.visitAlternative(X);break;case\"StartAnchor\":this.visitStartAnchor(X);break;case\"EndAnchor\":this.visitEndAnchor(X);break;case\"WordBoundary\":this.visitWordBoundary(X);break;case\"NonWordBoundary\":this.visitNonWordBoundary(X);break;case\"Lookahead\":this.visitLookahead(X);break;case\"NegativeLookahead\":this.visitNegativeLookahead(X);break;case\"Character\":this.visitCharacter(X);break;case\"Set\":this.visitSet(X);break;case\"Group\":this.visitGroup(X);break;case\"GroupBackReference\":this.visitGroupBackReference(X);break;case\"Quantifier\":this.visitQuantifier(X);break}this.visitChildren(X)}visitPattern(X){}visitFlags(X){}visitDisjunction(X){}visitAlternative(X){}visitStartAnchor(X){}visitEndAnchor(X){}visitWordBoundary(X){}visitNonWordBoundary(X){}visitLookahead(X){}visitNegativeLookahead(X){}visitCharacter(X){}visitSet(X){}visitGroup(X){}visitGroupBackReference(X){}visitQuantifier(X){}}let Fc={};const _a=new Gu;function fa(re){const X=re.toString();if(Fc.hasOwnProperty(X))return Fc[X];{const me=_a.pattern(X);return Fc[X]=me,me}}function zs(){Fc={}}const Rm=\"Complement Sets are not supported for first char optimization\",j0=`Unable to use \"first char\" lexer optimizations:\n`;function w_(re,X=!1){try{const me=fa(re);return $0(me.value,{},me.flags.ignoreCase)}catch(me){if(me.message===Rm)X\u0026\u0026jc(`${j0}\tUnable to optimize: \u003c ${re.toString()} \u003e\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let He=\"\";X\u0026\u0026(He=`\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),E0(`${j0}\n\tFailed parsing: \u003c ${re.toString()} \u003e\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+He)}}return[]}function $0(re,X,me){switch(re.type){case\"Disjunction\":for(let We=0;We\u003cre.value.length;We++)$0(re.value[We],X,me);break;case\"Alternative\":const He=re.value;for(let We=0;We\u003cHe.length;We++){const ft=He[We];switch(ft.type){case\"EndAnchor\":case\"GroupBackReference\":case\"Lookahead\":case\"NegativeLookahead\":case\"StartAnchor\":case\"WordBoundary\":case\"NonWordBoundary\":continue}const wt=ft;switch(wt.type){case\"Character\":N1(wt.value,X,me);break;case\"Set\":if(wt.complement===!0)throw Error(Rm);zr(wt.value,en=\u003e{if(typeof en==\"number\")N1(en,X,me);else{const In=en;if(me===!0)for(let po=In.from;po\u003c=In.to;po++)N1(po,X,me);else{for(let po=In.from;po\u003c=In.to\u0026\u0026po\u003cZr;po++)N1(po,X,me);if(In.to\u003e=Zr){const po=In.from\u003e=Zr?In.from:Zr,wo=In.to,ci=l0(po),Hi=l0(wo);for(let pr=ci;pr\u003c=Hi;pr++)X[pr]=pr}}}});break;case\"Group\":$0(wt.value,X,me);break;default:throw Error(\"Non Exhaustive Match\")}const zt=wt.quantifier!==void 0\u0026\u0026wt.quantifier.atLeast===0;if(wt.type===\"Group\"\u0026\u0026Kp(wt)===!1||wt.type!==\"Group\"\u0026\u0026zt===!1)break}break;default:throw Error(\"non exhaustive match!\")}return Wc(X)}function N1(re,X,me){const He=l0(re);X[He]=He,me===!0\u0026\u0026Up(re,X)}function Up(re,X){const me=String.fromCharCode(re),He=me.toUpperCase();if(He!==me){const We=l0(He.charCodeAt(0));X[We]=We}else{const We=me.toLowerCase();if(We!==me){const ft=l0(We.charCodeAt(0));X[ft]=ft}}}function GA(re,X){return cp(re.value,me=\u003e{if(typeof me==\"number\")return A0(X,me);{const He=me;return cp(X,We=\u003eHe.from\u003c=We\u0026\u0026We\u003c=He.to)!==void 0}})}function Kp(re){const X=re.quantifier;return X\u0026\u0026X.atLeast===0?!0:re.value?B(re.value)?Bh(re.value,Kp):Kp(re.value):!1}class S0 extends Nf{constructor(X){super(),this.targetCharCodes=X,this.found=!1}visitChildren(X){if(this.found!==!0){switch(X.type){case\"Lookahead\":this.visitLookahead(X);return;case\"NegativeLookahead\":this.visitNegativeLookahead(X);return}super.visitChildren(X)}}visitCharacter(X){A0(this.targetCharCodes,X.value)\u0026\u0026(this.found=!0)}visitSet(X){X.complement?GA(X,this.targetCharCodes)===void 0\u0026\u0026(this.found=!0):GA(X,this.targetCharCodes)!==void 0\u0026\u0026(this.found=!0)}}function u5(re,X){if(X instanceof RegExp){const me=fa(X),He=new S0(re);return He.visit(me),He.found}else return cp(X,me=\u003eA0(re,me.charCodeAt(0)))!==void 0}const jI=\"PATTERN\",vh=\"defaultMode\",R1=\"modes\";let Cu=typeof new RegExp(\"(?:)\").sticky==\"boolean\";function N4(re,X){X=o5(X,{useSticky:Cu,debug:!1,safeMode:!1,positionTracking:\"full\",lineTerminatorCharacters:[\"\\r\",`\n`],tracer:(Wi,Mi)=\u003eMi()});const me=X.tracer;me(\"initCharCodeToOptimizedIndexMap\",()=\u003e{k1()});let He;me(\"Reject Lexer.NA\",()=\u003e{He=Ig(re,Wi=\u003eWi[jI]===yu.NA)});let We=!1,ft;me(\"Transform Patterns\",()=\u003e{We=!1,ft=Gi(He,Wi=\u003e{const Mi=Wi[jI];if(yc(Mi)){const Gr=Mi.source;return Gr.length===1\u0026\u0026Gr!==\"^\"\u0026\u0026Gr!==\"$\"\u0026\u0026Gr!==\".\"\u0026\u0026!Mi.ignoreCase?Gr:Gr.length===2\u0026\u0026Gr[0]===\"\\\\\"\u0026\u0026!A0([\"d\",\"D\",\"s\",\"S\",\"t\",\"r\",\"n\",\"t\",\"0\",\"c\",\"b\",\"B\",\"f\",\"v\",\"w\",\"W\"],Gr[1])?Gr[1]:X.useSticky?$I(Mi):xg(Mi)}else{if(ye(Mi))return We=!0,{exec:Mi};if(typeof Mi==\"object\")return We=!0,Mi;if(typeof Mi==\"string\"){if(Mi.length===1)return Mi;{const Gr=Mi.replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$\u0026\"),Bc=new RegExp(Gr);return X.useSticky?$I(Bc):xg(Bc)}}else throw Error(\"non exhaustive match\")}})});let wt,zt,en,In,po;me(\"misc mapping\",()=\u003e{wt=Gi(He,Wi=\u003eWi.tokenTypeIdx),zt=Gi(He,Wi=\u003e{const Mi=Wi.GROUP;if(Mi!==yu.SKIPPED){if(Al(Mi))return Mi;if(cs(Mi))return!1;throw Error(\"non exhaustive match\")}}),en=Gi(He,Wi=\u003e{const Mi=Wi.LONGER_ALT;if(Mi)return B(Mi)?Gi(Mi,Bc=\u003eMm(He,Bc)):[Mm(He,Mi)]}),In=Gi(He,Wi=\u003eWi.PUSH_MODE),po=Gi(He,Wi=\u003eai(Wi,\"POP_MODE\"))});let wo;me(\"Line Terminator Handling\",()=\u003e{const Wi=gA(X.lineTerminatorCharacters);wo=Gi(He,Mi=\u003e!1),X.positionTracking!==\"onlyOffset\"\u0026\u0026(wo=Gi(He,Mi=\u003eai(Mi,\"LINE_BREAKS\")?!!Mi.LINE_BREAKS:qI(Mi,Wi)===!1\u0026\u0026u5(Wi,Mi.PATTERN)))});let ci,Hi,pr,Wr;me(\"Misc Mapping #2\",()=\u003e{ci=Gi(He,K2),Hi=Gi(ft,ty),pr=_u(He,(Wi,Mi)=\u003e{const Gr=Mi.GROUP;return Al(Gr)\u0026\u0026Gr!==yu.SKIPPED\u0026\u0026(Wi[Gr]=[]),Wi},{}),Wr=Gi(ft,(Wi,Mi)=\u003e({pattern:ft[Mi],longerAlt:en[Mi],canLineTerminator:wo[Mi],isCustom:ci[Mi],short:Hi[Mi],group:zt[Mi],push:In[Mi],pop:po[Mi],tokenTypeIdx:wt[Mi],tokenType:He[Mi]}))});let Ca=!0,rr=[];return X.safeMode||me(\"First Char Optimization\",()=\u003e{rr=_u(He,(Wi,Mi,Gr)=\u003e{if(typeof Mi.PATTERN==\"string\"){const Bc=Mi.PATTERN.charCodeAt(0),qp=l0(Bc);Us(Wi,qp,Wr[Gr])}else if(B(Mi.START_CHARS_HINT)){let Bc;zr(Mi.START_CHARS_HINT,qp=\u003e{const T_=typeof qp==\"string\"?qp.charCodeAt(0):qp,ly=l0(T_);Bc!==ly\u0026\u0026(Bc=ly,Us(Wi,ly,Wr[Gr]))})}else if(yc(Mi.PATTERN))if(Mi.PATTERN.unicode)Ca=!1,X.ensureOptimizations\u0026\u0026E0(`${j0}\tUnable to analyze \u003c ${Mi.PATTERN.toString()} \u003e pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const Bc=w_(Mi.PATTERN,X.ensureOptimizations);RA(Bc)\u0026\u0026(Ca=!1),zr(Bc,qp=\u003e{Us(Wi,qp,Wr[Gr])})}else X.ensureOptimizations\u0026\u0026E0(`${j0}\tTokenType: \u003c${Mi.name}\u003e is using a custom token pattern without providing \u003cstart_chars_hint\u003e parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),Ca=!1;return Wi},[])}),{emptyGroups:pr,patternIdxToConfig:Wr,charCodeToPatternIdxToConfig:rr,hasCustom:We,canBeOptimized:Ca}}function Vp(re,X){let me=[];const He=xs(re);me=me.concat(He.errors);const We=Lc(He.valid),ft=We.valid;return me=me.concat(We.errors),me=me.concat(Rf(ft)),me=me.concat(Tf(ft)),me=me.concat(Pa(ft,X)),me=me.concat(qc(ft)),me}function Rf(re){let X=[];const me=mu(re,He=\u003eyc(He[jI]));return X=X.concat(Ja(me)),X=X.concat(qg(me)),X=X.concat(gl(me)),X=X.concat(y3(me)),X=X.concat(Ps(me)),X}function xs(re){const X=mu(re,We=\u003e!ai(We,jI)),me=Gi(X,We=\u003e({message:\"Token Type: -\u003e\"+We.name+\"\u003c- missing static 'PATTERN' property\",type:us.MISSING_PATTERN,tokenTypes:[We]})),He=L2(re,X);return{errors:me,valid:He}}function Lc(re){const X=mu(re,We=\u003e{const ft=We[jI];return!yc(ft)\u0026\u0026!ye(ft)\u0026\u0026!ai(ft,\"exec\")\u0026\u0026!Al(ft)}),me=Gi(X,We=\u003e({message:\"Token Type: -\u003e\"+We.name+\"\u003c- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.\",type:us.INVALID_PATTERN,tokenTypes:[We]})),He=L2(re,X);return{errors:me,valid:He}}const Ha=/[^\\\\][$]/;function Ja(re){class X extends Nf{constructor(){super(...arguments),this.found=!1}visitEndAnchor(ft){this.found=!0}}const me=mu(re,We=\u003e{const ft=We.PATTERN;try{const wt=fa(ft),zt=new X;return zt.visit(wt),zt.found}catch{return Ha.test(ft.source)}});return Gi(me,We=\u003e({message:`Unexpected RegExp Anchor Error:\n\tToken Type: -\u003e`+We.name+`\u003c- static 'PATTERN' cannot contain end of input anchor '

muse/esp32-eink-display

A 55×46 mm two-layer ESP32-S3 e-paper controller board with USB‑C power/programming, buck regulation, FPC display connector, UC8179-style boost/charge-pump circuitry, ESD protection, controls, and routed passive components.

Version
1.3.4
License
unset
Stars
0

dist/standalone.min.js

(function(Bu){typeof define=="function"&&define.amd?define(Bu):Bu()})((function(){"use strict";var zEn=Bu=>{throw TypeError(Bu)};var JEn=(Bu,ax,my)=>ax.has(Bu)||zEn("Cannot "+my);var w0=(Bu,ax,my)=>(JEn(Bu,ax,"read from private field"),my?my.call(Bu):ax.get(Bu)),uit=(Bu,ax,my)=>ax.has(Bu)?zEn("Cannot add the same private member more than once"):ax instanceof WeakSet?ax.add(Bu):ax.set(Bu,my),Yte=(Bu,ax,my,_y)=>(JEn(Bu,ax,"write to private field"),_y?_y.call(Bu,my):ax.set(Bu,my),my);var h_,YE,p_,UE;var Bu=typeof document<"u"?document.currentScript:null;function ax(t,e){for(var n=0;n<e.length;n++){const o=e[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in t)){const r=Object.getOwnPropertyDescriptor(o,i);r&&Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var my=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wit(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function o(){var i=!1;try{i=this instanceof o}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return t[o]}})}),n}var one={exports:{}},tV={};var Pit;function v4n(){if(Pit)return tV;Pit=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(o,i,r){var s=null;if(r!==void 0&&(s=""+r),i.key!==void 0&&(s=""+i.key),"key"in i){r={};for(var a in i)a!=="key"&&(r[a]=i[a])}else r=i;return i=r.ref,{$$typeof:t,type:o,key:s,ref:i!==void 0?i:null,props:r}}return tV.Fragment=e,tV.jsx=n,tV.jsxs=n,tV}var nV={},ine={exports:{}},TA={},Mit;function w4n(){if(Mit)return TA;Mit=1;var t={env:{},version:""};var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),g=Symbol.iterator;function h(j){return j===null||typeof j!="object"?null:(j=g&&j[g]||j["@@iterator"],typeof j=="function"?j:null)}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,m={};function _(j,J,oe){this.props=j,this.context=J,this.refs=m,this.updater=oe||d}_.prototype.isReactComponent={},_.prototype.setState=function(j,J){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,J,"setState")},_.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function f(){}f.prototype=_.prototype;function I(j,J,oe){this.props=j,this.context=J,this.refs=m,this.updater=oe||d}var C=I.prototype=new f;C.constructor=I,p(C,_.prototype),C.isPureReactComponent=!0;var y=Array.isArray,x={H:null,A:null,T:null,S:null,V:null},E=Object.prototype.hasOwnProperty;function B(j,J,oe,ie,ne,le){return oe=le.ref,{$$typeof:e,type:j,key:J,ref:oe!==void 0?oe:null,props:le}}function S(j,J){return B(j.type,J,void 0,void 0,void 0,j.props)}function Q(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function w(j){var J={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(oe){return J[oe]})}var M=/\/+/g;function k(j,J){return typeof j=="object"&&j!==null&&j.key!=null?w(""+j.key):J.toString(36)}function R(){}function F(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(R,R):(j.status="pending",j.then(function(J){j.status==="pending"&&(j.status="fulfilled",j.value=J)},function(J){j.status==="pending"&&(j.status="rejected",j.reason=J)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function O(j,J,oe,ie,ne){var le=typeof j;(le==="undefined"||le==="boolean")&&(j=null);var ge=!1;if(j===null)ge=!0;else switch(le){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(j.$$typeof){case e:case n:ge=!0;break;case u:return ge=j._init,O(ge(j._payload),J,oe,ie,ne)}}if(ge)return ne=ne(j),ge=ie===""?"."+k(j,0):ie,y(ne)?(oe="",ge!=null&&(oe=ge.replace(M,"$&/")+"/"),O(ne,J,oe,"",function(fe){return fe})):ne!=null&&(Q(ne)&&(ne=S(ne,oe+(ne.key==null||j&&j.key===ne.key?"":(""+ne.key).replace(M,"$&/")+"/")+ge)),J.push(ne)),1;ge=0;var _e=ie===""?".":ie+":";if(y(j))for(var ue=0;ue<j.length;ue++)ie=j[ue],le=_e+k(ie,ue),ge+=O(ie,J,oe,le,ne);else if(ue=h(j),typeof ue=="function")for(j=ue.call(j),ue=0;!(ie=j.next()).done;)ie=ie.value,le=_e+k(ie,ue++),ge+=O(ie,J,oe,le,ne);else if(le==="object"){if(typeof j.then=="function")return O(F(j),J,oe,ie,ne);throw J=String(j),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return ge}function U(j,J,oe){if(j==null)return j;var ie=[],ne=0;return O(j,ie,"","",function(le){return J.call(oe,le,ne++)}),ie}function Y(j){if(j._status===-1){var J=j._result;J=J(),J.then(function(oe){(j._status===0||j._status===-1)&&(j._status=1,j._result=oe)},function(oe){(j._status===0||j._status===-1)&&(j._status=2,j._result=oe)}),j._status===-1&&(j._status=0,j._result=J)}if(j._status===1)return j._result.default;throw j._result}var W=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(J))return}else if(typeof t=="object"&&typeof t.emit=="function"){t.emit("uncaughtException",j);return}console.error(j)};function te(){}return TA.Children={map:U,forEach:function(j,J,oe){U(j,function(){J.apply(this,arguments)},oe)},count:function(j){var J=0;return U(j,function(){J++}),J},toArray:function(j){return U(j,function(J){return J})||[]},only:function(j){if(!Q(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},TA.Component=_,TA.Fragment=o,TA.Profiler=r,TA.PureComponent=I,TA.StrictMode=i,TA.Suspense=c,TA.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,TA.__COMPILER_RUNTIME={__proto__:null,c:function(j){return x.H.useMemoCache(j)}},TA.cache=function(j){return function(){return j.apply(null,arguments)}},TA.cloneElement=function(j,J,oe){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ie=p({},j.props),ne=j.key,le=void 0;if(J!=null)for(ge in J.ref!==void 0&&(le=void 0),J.key!==void 0&&(ne=""+J.key),J)!E.call(J,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&J.ref===void 0||(ie[ge]=J[ge]);var ge=arguments.length-2;if(ge===1)ie.children=oe;else if(1<ge){for(var _e=Array(ge),ue=0;ue<ge;ue++)_e[ue]=arguments[ue+2];ie.children=_e}return B(j.type,ne,void 0,void 0,le,ie)},TA.createContext=function(j){return j={$$typeof:a,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:s,_context:j},j},TA.createElement=function(j,J,oe){var ie,ne={},le=null;if(J!=null)for(ie in J.key!==void 0&&(le=""+J.key),J)E.call(J,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ne[ie]=J[ie]);var ge=arguments.length-2;if(ge===1)ne.children=oe;else if(1<ge){for(var _e=Array(ge),ue=0;ue<ge;ue++)_e[ue]=arguments[ue+2];ne.children=_e}if(j&&j.defaultProps)for(ie in ge=j.defaultProps,ge)ne[ie]===void 0&&(ne[ie]=ge[ie]);return B(j,le,void 0,void 0,null,ne)},TA.createRef=function(){return{current:null}},TA.forwardRef=function(j){return{$$typeof:A,render:j}},TA.isValidElement=Q,TA.lazy=function(j){return{$$typeof:u,_payload:{_status:-1,_result:j},_init:Y}},TA.memo=function(j,J){return{$$typeof:l,type:j,compare:J===void 0?null:J}},TA.startTransition=function(j){var J=x.T,oe={};x.T=oe;try{var ie=j(),ne=x.S;ne!==null&&ne(oe,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(te,W)}catch(le){W(le)}finally{x.T=J}},TA.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},TA.use=function(j){return x.H.use(j)},TA.useActionState=function(j,J,oe){return x.H.useActionState(j,J,oe)},TA.useCallback=function(j,J){return x.H.useCallback(j,J)},TA.useContext=function(j){return x.H.useContext(j)},TA.useDebugValue=function(){},TA.useDeferredValue=function(j,J){return x.H.useDeferredValue(j,J)},TA.useEffect=function(j,J,oe){var ie=x.H;if(typeof oe=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ie.useEffect(j,J)},TA.useId=function(){return x.H.useId()},TA.useImperativeHandle=function(j,J,oe){return x.H.useImperativeHandle(j,J,oe)},TA.useInsertionEffect=function(j,J){return x.H.useInsertionEffect(j,J)},TA.useLayoutEffect=function(j,J){return x.H.useLayoutEffect(j,J)},TA.useMemo=function(j,J){return x.H.useMemo(j,J)},TA.useOptimistic=function(j,J){return x.H.useOptimistic(j,J)},TA.useReducer=function(j,J,oe){return x.H.useReducer(j,J,oe)},TA.useRef=function(j){return x.H.useRef(j)},TA.useState=function(j){return x.H.useState(j)},TA.useSyncExternalStore=function(j,J,oe){return x.H.useSyncExternalStore(j,J,oe)},TA.useTransition=function(){return x.H.useTransition()},TA.version="19.1.0",TA}var oV={exports:{}};oV.exports;var Dit;function P4n(){return Dit||(Dit=1,(function(t,e){var n={env:{},version:""};n.env.NODE_ENV!=="production"&&(function(){function o(be,et){Object.defineProperty(s.prototype,be,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",et[0],et[1])}})}function i(be){return be===null||typeof be!="object"?null:(be=ye&&be[ye]||be["@@iterator"],typeof be=="function"?be:null)}function r(be,et){be=(be=be.constructor)&&(be.displayName||be.name)||"ReactClass";var It=be+"."+et;Me[It]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",et,be),Me[It]=!0)}function s(be,et,It){this.props=be,this.context=et,this.refs=Qe,this.updater=It||ve}function a(){}function A(be,et,It){this.props=be,this.context=et,this.refs=Qe,this.updater=It||ve}function c(be){return""+be}function l(be){try{c(be);var et=!1}catch{et=!0}if(et){et=console;var It=et.error,Bt=typeof Symbol=="function"&&Symbol.toStringTag&&be[Symbol.toStringTag]||be.constructor.name||"Object";return It.call(et,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Bt),c(be)}}function u(be){if(be==null)return null;if(typeof be=="function")return be.$$typeof===Re?null:be.displayName||be.name||null;if(typeof be=="string")return be;switch(be){case j:return"Fragment";case oe:return"Profiler";case J:return"StrictMode";case ge:return"Suspense";case _e:return"SuspenseList";case pe:return"Activity"}if(typeof be=="object")switch(typeof be.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),be.$$typeof){case te:return"Portal";case ne:return(be.displayName||"Context")+".Provider";case ie:return(be._context.displayName||"Context")+".Consumer";case le:var et=be.render;return be=be.displayName,be||(be=et.displayName||et.name||"",be=be!==""?"ForwardRef("+be+")":"ForwardRef"),be;case ue:return et=be.displayName||null,et!==null?et:u(be.type)||"Memo";case fe:et=be._payload,be=be._init;try{return u(be(et))}catch{}}return null}function g(be){if(be===j)return"<>";if(typeof be=="object"&&be!==null&&be.$$typeof===fe)return"<...>";try{var et=u(be);return et?"<"+et+">":"<...>"}catch{return"<...>"}}function h(){var be=Ee.A;return be===null?null:be.getOwner()}function d(){return Error("react-stack-top-frame")}function p(be){if(ke.call(be,"key")){var et=Object.getOwnPropertyDescriptor(be,"key").get;if(et&&et.isReactWarning)return!1}return be.key!==void 0}function m(be,et){function It(){Le||(Le=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",et))}It.isReactWarning=!0,Object.defineProperty(be,"key",{get:It,configurable:!0})}function _(){var be=u(this.type);return tt[be]||(tt[be]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),be=this.props.ref,be!==void 0?be:null}function f(be,et,It,Bt,mt,st,xt,Xe){return It=st.ref,be={$$typeof:W,type:be,key:et,props:st,_owner:mt},(It!==void 0?It:null)!==null?Object.defineProperty(be,"ref",{enumerable:!1,get:_}):Object.defineProperty(be,"ref",{enumerable:!1,value:null}),be._store={},Object.defineProperty(be._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(be,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(be,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:xt}),Object.defineProperty(be,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Xe}),Object.freeze&&(Object.freeze(be.props),Object.freeze(be)),be}function I(be,et){return et=f(be.type,et,void 0,void 0,be._owner,be.props,be._debugStack,be._debugTask),be._store&&(et._store.validated=be._store.validated),et}function C(be){return typeof be=="object"&&be!==null&&be.$$typeof===W}function y(be){var et={"=":"=0",":":"=2"};return"$"+be.replace(/[=:]/g,function(It){return et[It]})}function x(be,et){return typeof be=="object"&&be!==null&&be.key!=null?(l(be.key),y(""+be.key)):et.toString(36)}function E(){}function B(be){switch(be.status){case"fulfilled":return be.value;case"rejected":throw be.reason;default:switch(typeof be.status=="string"?be.then(E,E):(be.status="pending",be.then(function(et){be.status==="pending"&&(be.status="fulfilled",be.value=et)},function(et){be.status==="pending"&&(be.status="rejected",be.reason=et)})),be.status){case"fulfilled":return be.value;case"rejected":throw be.reason}}throw be}function S(be,et,It,Bt,mt){var st=typeof be;(st==="undefined"||st==="boolean")&&(be=null);var xt=!1;if(be===null)xt=!0;else switch(st){case"bigint":case"string":case"number":xt=!0;break;case"object":switch(be.$$typeof){case W:case te:xt=!0;break;case fe:return xt=be._init,S(xt(be._payload),et,It,Bt,mt)}}if(xt){xt=be,mt=mt(xt);var Xe=Bt===""?"."+x(xt,0):Bt;return Te(mt)?(It="",Xe!=null&&(It=Xe.replace(gt,"$&/")+"/"),S(mt,et,It,"",function(dt){return dt})):mt!=null&&(C(mt)&&(mt.key!=null&&(xt&&xt.key===mt.key||l(mt.key)),It=I(mt,It+(mt.key==null||xt&&xt.key===mt.key?"":(""+mt.key).replace(gt,"$&/")+"/")+Xe),Bt!==""&&xt!=null&&C(xt)&&xt.key==null&&xt._store&&!xt._store.validated&&(It._store.validated=2),mt=It),et.push(mt)),1}if(xt=0,Xe=Bt===""?".":Bt+":",Te(be))for(var Ze=0;Ze<be.length;Ze++)Bt=be[Ze],st=Xe+x(Bt,Ze),xt+=S(Bt,et,It,st,mt);else if(Ze=i(be),typeof Ze=="function")for(Ze===be.entries&&(nt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),nt=!0),be=Ze.call(be),Ze=0;!(Bt=be.next()).done;)Bt=Bt.value,st=Xe+x(Bt,Ze++),xt+=S(Bt,et,It,st,mt);else if(st==="object"){if(typeof be.then=="function")return S(B(be),et,It,Bt,mt);throw et=String(be),Error("Objects are not valid as a React child (found: "+(et==="[object Object]"?"object with keys {"+Object.keys(be).join(", ")+"}":et)+"). If you meant to render a collection of children, use an array instead.")}return xt}function Q(be,et,It){if(be==null)return be;var Bt=[],mt=0;return S(be,Bt,"","",function(st){return et.call(It,st,mt++)}),Bt}function w(be){if(be._status===-1){var et=be._result;et=et(),et.then(function(It){(be._status===0||be._status===-1)&&(be._status=1,be._result=It)},function(It){(be._status===0||be._status===-1)&&(be._status=2,be._result=It)}),be._status===-1&&(be._status=0,be._result=et)}if(be._status===1)return et=be._result,et===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))

Did you accidentally put curly braces around the import?`,et),"default"in et||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s

Your code should look like: 
  const MyComponent = lazy(() => import('./MyComponent'))`,et),et.default;throw be._result}function M(){var be=Ee.H;return be===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),be}function k(){}function R(be){if(Dt===null)try{var et=("require"+Math.random()).slice(0,7);Dt=(t&&t[et]).call(t,"timers").setImmediate}catch{Dt=function(Bt){Ct===!1&&(Ct=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var mt=new MessageChannel;mt.port1.onmessage=Bt,mt.port2.postMessage(void 0)}}return Dt(be)}function F(be){return 1<be.length&&typeof AggregateError=="function"?new AggregateError(be):be[0]}function O(be,et){et!==kt-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),kt=et}function U(be,et,It){var Bt=Ee.actQueue;if(Bt!==null)if(Bt.length!==0)try{Y(Bt),R(function(){return U(be,et,It)});return}catch(mt){Ee.thrownErrors.push(mt)}else Ee.actQueue=null;0<Ee.thrownErrors.length?(Bt=F(Ee.thrownErrors),Ee.thrownErrors.length=0,It(Bt)):et(be)}function Y(be){if(!Yt){Yt=!0;var et=0;try{for(;et<be.length;et++){var It=be[et];do{Ee.didUsePromise=!1;var Bt=It(!1);if(Bt!==null){if(Ee.didUsePromise){be[et]=It,be.splice(0,et);return}It=Bt}else break}while(!0)}be.length=0}catch(mt){be.splice(0,et+1),Ee.thrownErrors.push(mt)}finally{Yt=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var W=Symbol.for("react.transitional.element"),te=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),J=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),ie=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),pe=Symbol.for("react.activity"),ye=Symbol.iterator,Me={},ve={isMounted:function(){return!1},enqueueForceUpdate:function(be){r(be,"forceUpdate")},enqueueReplaceState:function(be){r(be,"replaceState")},enqueueSetState:function(be){r(be,"setState")}},he=Object.assign,Qe={};Object.freeze(Qe),s.prototype.isReactComponent={},s.prototype.setState=function(be,et){if(typeof be!="object"&&typeof be!="function"&&be!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,be,et,"setState")},s.prototype.forceUpdate=function(be){this.updater.enqueueForceUpdate(this,be,"forceUpdate")};var Pe={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},we;for(we in Pe)Pe.hasOwnProperty(we)&&o(we,Pe[we]);a.prototype=s.prototype,Pe=A.prototype=new a,Pe.constructor=A,he(Pe,s.prototype),Pe.isPureReactComponent=!0;var Te=Array.isArray,Re=Symbol.for("react.client.reference"),Ee={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},ke=Object.prototype.hasOwnProperty,Ce=console.createTask?console.createTask:function(){return null};Pe={"react-stack-bottom-frame":function(be){return be()}};var Le,Ye,tt={},At=Pe["react-stack-bottom-frame"].bind(Pe,d)(),at=Ce(g(d)),nt=!1,gt=/\/+/g,bt=typeof reportError=="function"?reportError:function(be){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var et=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof be=="object"&&be!==null&&typeof be.message=="string"?String(be.message):String(be),error:be});if(!window.dispatchEvent(et))return}else if(typeof n=="object"&&typeof n.emit=="function"){n.emit("uncaughtException",be);return}console.error(be)},Ct=!1,Dt=null,kt=0,it=!1,Yt=!1,pn=typeof queueMicrotask=="function"?function(be){queueMicrotask(function(){return queueMicrotask(be)})}:R;Pe=Object.freeze({__proto__:null,c:function(be){return M().useMemoCache(be)}}),e.Children={map:Q,forEach:function(be,et,It){Q(be,function(){et.apply(this,arguments)},It)},count:function(be){var et=0;return Q(be,function(){et++}),et},toArray:function(be){return Q(be,function(et){return et})||[]},only:function(be){if(!C(be))throw Error("React.Children.only expected to receive a single React element child.");return be}},e.Component=s,e.Fragment=j,e.Profiler=oe,e.PureComponent=A,e.StrictMode=J,e.Suspense=ge,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ee,e.__COMPILER_RUNTIME=Pe,e.act=function(be){var et=Ee.actQueue,It=kt;kt++;var Bt=Ee.actQueue=et!==null?et:[],mt=!1;try{var st=be()}catch(Ze){Ee.thrownErrors.push(Ze)}if(0<Ee.thrownErrors.length)throw O(et,It),be=F(Ee.thrownErrors),Ee.thrownErrors.length=0,be;if(st!==null&&typeof st=="object"&&typeof st.then=="function"){var xt=st;return pn(function(){mt||it||(it=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(Ze,dt){mt=!0,xt.then(function(Ut){if(O(et,It),It===0){try{Y(Bt),R(function(){return U(Ut,Ze,dt)})}catch(Xt){Ee.thrownErrors.push(Xt)}if(0<Ee.thrownErrors.length){var Wt=F(Ee.thrownErrors);Ee.thrownErrors.length=0,dt(Wt)}}else Ze(Ut)},function(Ut){O(et,It),0<Ee.thrownErrors.length&&(Ut=F(Ee.thrownErrors),Ee.thrownErrors.length=0),dt(Ut)})}}}var Xe=st;if(O(et,It),It===0&&(Y(Bt),Bt.length!==0&&pn(function(){mt||it||(it=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Ee.actQueue=null),0<Ee.thrownErrors.length)throw be=F(Ee.thrownErrors),Ee.thrownErrors.length=0,be;return{then:function(Ze,dt){mt=!0,It===0?(Ee.actQueue=Bt,R(function(){return U(Xe,Ze,dt)})):Ze(Xe)}}},e.cache=function(be){return function(){return be.apply(null,arguments)}},e.captureOwnerStack=function(){var be=Ee.getCurrentStack;return be===null?null:be()},e.cloneElement=function(be,et,It){if(be==null)throw Error("The argument must be a React element, but you passed "+be+".");var Bt=he({},be.props),mt=be.key,st=be._owner;if(et!=null){var xt;e:{if(ke.call(et,"ref")&&(xt=Object.getOwnPropertyDescriptor(et,"ref").get)&&xt.isReactWarning){xt=!1;break e}xt=et.ref!==void 0}xt&&(st=h()),p(et)&&(l(et.key),mt=""+et.key);for(Xe in et)!ke.call(et,Xe)||Xe==="key"||Xe==="__self"||Xe==="__source"||Xe==="ref"&&et.ref===void 0||(Bt[Xe]=et[Xe])}var Xe=arguments.length-2;if(Xe===1)Bt.children=It;else if(1<Xe){xt=Array(Xe);for(var Ze=0;Ze<Xe;Ze++)xt[Ze]=arguments[Ze+2];Bt.children=xt}for(Bt=f(be.type,mt,void 0,void 0,st,Bt,be._debugStack,be._debugTask),mt=2;mt<arguments.length;mt++)st=arguments[mt],C(st)&&st._store&&(st._store.validated=1);return Bt},e.createContext=function(be){return be={$$typeof:ne,_currentValue:be,_currentValue2:be,_threadCount:0,Provider:null,Consumer:null},be.Provider=be,be.Consumer={$$typeof:ie,_context:be},be._currentRenderer=null,be._currentRenderer2=null,be},e.createElement=function(be,et,It){for(var Bt=2;Bt<arguments.length;Bt++){var mt=arguments[Bt];C(mt)&&mt._store&&(mt._store.validated=1)}if(Bt={},mt=null,et!=null)for(Ze in Ye||!("__self"in et)||"key"in et||(Ye=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),p(et)&&(l(et.key),mt=""+et.key),et)ke.call(et,Ze)&&Ze!=="key"&&Ze!=="__self"&&Ze!=="__source"&&(Bt[Ze]=et[Ze]);var st=arguments.length-2;if(st===1)Bt.children=It;else if(1<st){for(var xt=Array(st),Xe=0;Xe<st;Xe++)xt[Xe]=arguments[Xe+2];Object.freeze&&Object.freeze(xt),Bt.children=xt}if(be&&be.defaultProps)for(Ze in st=be.defaultProps,st)Bt[Ze]===void 0&&(Bt[Ze]=st[Ze]);mt&&m(Bt,typeof be=="function"?be.displayName||be.name||"Unknown":be);var Ze=1e4>Ee.recentlyCreatedOwnerStacks++;return f(be,mt,void 0,void 0,h(),Bt,Ze?Error("react-stack-top-frame"):At,Ze?Ce(g(be)):at)},e.createRef=function(){var be={current:null};return Object.seal(be),be},e.forwardRef=function(be){be!=null&&be.$$typeof===ue?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof be!="function"?console.error("forwardRef requires a render function but was given %s.",be===null?"null":typeof be):be.length!==0&&be.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",be.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),be!=null&&be.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var et={$$typeof:le,render:be},It;return Object.defineProperty(et,"displayName",{enumerable:!1,configurable:!0,get:function(){return It},set:function(Bt){It=Bt,be.name||be.displayName||(Object.defineProperty(be,"name",{value:Bt}),be.displayName=Bt)}}),et},e.isValidElement=C,e.lazy=function(be){return{$$typeof:fe,_payload:{_status:-1,_result:be},_init:w}},e.memo=function(be,et){be==null&&console.error("memo: The first argument must be a component. Instead received: %s",be===null?"null":typeof be),et={$$typeof:ue,type:be,compare:et===void 0?null:et};var It;return Object.defineProperty(et,"displayName",{enumerable:!1,configurable:!0,get:function(){return It},set:function(Bt){It=Bt,be.name||be.displayName||(Object.defineProperty(be,"name",{value:Bt}),be.displayName=Bt)}}),et},e.startTransition=function(be){var et=Ee.T,It={};Ee.T=It,It._updatedFibers=new Set;try{var Bt=be(),mt=Ee.S;mt!==null&&mt(It,Bt),typeof Bt=="object"&&Bt!==null&&typeof Bt.then=="function"&&Bt.then(k,bt)}catch(st){bt(st)}finally{et===null&&It._updatedFibers&&(be=It._updatedFibers.size,It._updatedFibers.clear(),10<be&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),Ee.T=et}},e.unstable_useCacheRefresh=function(){return M().useCacheRefresh()},e.use=function(be){return M().use(be)},e.useActionState=function(be,et,It){return M().useActionState(be,et,It)},e.useCallback=function(be,et){return M().useCallback(be,et)},e.useContext=function(be){var et=M();return be.$$typeof===ie&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),et.useContext(be)},e.useDebugValue=function(be,et){return M().useDebugValue(be,et)},e.useDeferredValue=function(be,et){return M().useDeferredValue(be,et)},e.useEffect=function(be,et,It){be==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var Bt=M();if(typeof It=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Bt.useEffect(be,et)},e.useId=function(){return M().useId()},e.useImperativeHandle=function(be,et,It){return M().useImperativeHandle(be,et,It)},e.useInsertionEffect=function(be,et){return be==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),M().useInsertionEffect(be,et)},e.useLayoutEffect=function(be,et){return be==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),M().useLayoutEffect(be,et)},e.useMemo=function(be,et){return M().useMemo(be,et)},e.useOptimistic=function(be,et){return M().useOptimistic(be,et)},e.useReducer=function(be,et,It){return M().useReducer(be,et,It)},e.useRef=function(be){return M().useRef(be)},e.useState=function(be){return M().useState(be)},e.useSyncExternalStore=function(be,et,It){return M().useSyncExternalStore(be,et,It)},e.useTransition=function(){return M().useTransition()},e.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(oV,oV.exports)),oV.exports}var Nit;function L3(){if(Nit)return ine.exports;Nit=1;var t={env:{}};return t.env.NODE_ENV==="production"?ine.exports=w4n():ine.exports=P4n(),ine.exports}var Rit;function M4n(){if(Rit)return nV;Rit=1;var t={env:{}};return t.env.NODE_ENV!=="production"&&(function(){function e(j){if(j==null)return null;if(typeof j=="function")return j.$$typeof===w?null:j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case m:return"Fragment";case f:return"Profiler";case _:return"StrictMode";case x:return"Suspense";case E:return"SuspenseList";case Q:return"Activity"}if(typeof j=="object")switch(typeof j.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),j.$$typeof){case p:return"Portal";case C:return(j.displayName||"Context")+".Provider";case I:return(j._context.displayName||"Context")+".Consumer";case y:var J=j.render;return j=j.displayName,j||(j=J.displayName||J.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case B:return J=j.displayName||null,J!==null?J:e(j.type)||"Memo";case S:J=j._payload,j=j._init;try{return e(j(J))}catch{}}return null}function n(j){return""+j}function o(j){try{n(j);var J=!1}catch{J=!0}if(J){J=console;var oe=J.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&j[Symbol.toStringTag]||j.constructor.name||"Object";return oe.call(J,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),n(j)}}function i(j){if(j===m)return"<>";if(typeof j=="object"&&j!==null&&j.$$typeof===S)return"<...>";try{var J=e(j);return J?"<"+J+">":"<...>"}catch{return"<...>"}}function r(){var j=M.A;return j===null?null:j.getOwner()}function s(){return Error("react-stack-top-frame")}function a(j){if(k.call(j,"key")){var J=Object.getOwnPropertyDescriptor(j,"key").get;if(J&&J.isReactWarning)return!1}return j.key!==void 0}function A(j,J){function oe(){O||(O=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",J))}oe.isReactWarning=!0,Object.defineProperty(j,"key",{get:oe,configurable:!0})}function c(){var j=e(this.type);return U[j]||(U[j]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),j=this.props.ref,j!==void 0?j:null}function l(j,J,oe,ie,ne,le,ge,_e){return oe=le.ref,j={$$typeof:d,type:j,key:J,props:le,_owner:ne},(oe!==void 0?oe:null)!==null?Object.defineProperty(j,"ref",{enumerable:!1,get:c}):Object.defineProperty(j,"ref",{enumerable:!1,value:null}),j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(j,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(j,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.defineProperty(j,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:_e}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j}function u(j,J,oe,ie,ne,le,ge,_e){var ue=J.children;if(ue!==void 0)if(ie)if(R(ue)){for(ie=0;ie<ue.length;ie++)g(ue[ie]);Object.freeze&&Object.freeze(ue)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(ue);if(k.call(J,"key")){ue=e(j);var fe=Object.keys(J).filter(function(ye){return ye!=="key"});ie=0<fe.length?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}",te[ue+ie]||(fe=0<fe.length?"{"+fe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
  let props = %s;
  <%s {...props} />
React keys must be passed directly to JSX without using spread:
  let props = %s;
  <%s key={someKey} {...props} />`,ie,ue,fe,ue),te[ue+ie]=!0)}if(ue=null,oe!==void 0&&(o(oe),ue=""+oe),a(J)&&(o(J.key),ue=""+J.key),"key"in J){oe={};for(var pe in J)pe!=="key"&&(oe[pe]=J[pe])}else oe=J;return ue&&A(oe,typeof j=="function"?j.displayName||j.name||"Unknown":j),l(j,ue,le,ne,r(),oe,ge,_e)}function g(j){typeof j=="object"&&j!==null&&j.$$typeof===d&&j._store&&(j._store.validated=1)}var h=L3(),d=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),C=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),w=Symbol.for("react.client.reference"),M=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,R=Array.isArray,F=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(j){return j()}};var O,U={},Y=h["react-stack-bottom-frame"].bind(h,s)(),W=F(i(s)),te={};nV.Fragment=m,nV.jsx=function(j,J,oe,ie,ne){var le=1e4>M.recentlyCreatedOwnerStacks++;return u(j,J,oe,!1,ie,ne,le?Error("react-stack-top-frame"):Y,le?F(i(j)):W)},nV.jsxs=function(j,J,oe,ie,ne){var le=1e4>M.recentlyCreatedOwnerStacks++;return u(j,J,oe,!0,ie,ne,le?Error("react-stack-top-frame"):Y,le?F(i(j)):W)}})(),nV}var Tit;function kit(){if(Tit)return one.exports;Tit=1;var t={env:{}};return t.env.NODE_ENV==="production"?one.exports=v4n():one.exports=M4n(),one.exports}var K=kit(),rne={exports:{}},iV={},sne={exports:{}},$ye={};var Fit;function D4n(){return Fit||(Fit=1,(function(t){function e(O,U){var Y=O.length;O.push(U);e:for(;0<Y;){var W=Y-1>>>1,te=O[W];if(0<i(te,U))O[W]=U,O[Y]=te,Y=W;else break e}}function n(O){return O.length===0?null:O[0]}function o(O){if(O.length===0)return null;var U=O[0],Y=O.pop();if(Y!==U){O[0]=Y;e:for(var W=0,te=O.length,j=te>>>1;W<j;){var J=2*(W+1)-1,oe=O[J],ie=J+1,ne=O[ie];if(0>i(oe,Y))ie<te&&0>i(ne,oe)?(O[W]=ne,O[ie]=Y,W=ie):(O[W]=oe,O[J]=Y,W=J);else if(ie<te&&0>i(ne,Y))O[W]=ne,O[ie]=Y,W=ie;else break e}}return U}function i(O,U){var Y=O.sortIndex-U.sortIndex;return Y!==0?Y:O.id-U.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;t.unstable_now=function(){return r.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var A=[],c=[],l=1,u=null,g=3,h=!1,d=!1,p=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function C(O){for(var U=n(c);U!==null;){if(U.callback===null)o(c);else if(U.startTime<=O)o(c),U.sortIndex=U.expirationTime,e(A,U);else break;U=n(c)}}function y(O){if(p=!1,C(O),!d)if(n(A)!==null)d=!0,x||(x=!0,M());else{var U=n(c);U!==null&&F(y,U.startTime-O)}}var x=!1,E=-1,B=5,S=-1;function Q(){return m?!0:!(t.unstable_now()-S<B)}function w(){if(m=!1,x){var O=t.unstable_now();S=O;var U=!0;try{e:{d=!1,p&&(p=!1,f(E),E=-1),h=!0;var Y=g;try{t:{for(C(O),u=n(A);u!==null&&!(u.expirationTime>O&&Q());){var W=u.callback;if(typeof W=="function"){u.callback=null,g=u.priorityLevel;var te=W(u.expirationTime<=O);if(O=t.unstable_now(),typeof te=="function"){u.callback=te,C(O),U=!0;break t}u===n(A)&&o(A),C(O)}else o(A);u=n(A)}if(u!==null)U=!0;else{var j=n(c);j!==null&&F(y,j.startTime-O),U=!1}}break e}finally{u=null,g=Y,h=!1}U=void 0}}finally{U?M():x=!1}}}var M;if(typeof I=="function")M=function(){I(w)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,R=k.port2;k.port1.onmessage=w,M=function(){R.postMessage(null)}}else M=function(){_(w,0)};function F(O,U){E=_(function(){O(t.unstable_now())},U)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(O){O.callback=null},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function(O){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var Y=g;g=U;try{return O()}finally{g=Y}},t.unstable_requestPaint=function(){m=!0},t.unstable_runWithPriority=function(O,U){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var Y=g;g=O;try{return U()}finally{g=Y}},t.unstable_scheduleCallback=function(O,U,Y){var W=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?W+Y:W):Y=W,O){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=Y+te,O={id:l++,callback:U,priorityLevel:O,startTime:Y,expirationTime:te,sortIndex:-1},Y>W?(O.sortIndex=Y,e(c,O),n(A)===null&&O===n(c)&&(p?(f(E),E=-1):p=!0,F(y,Y-W))):(O.sortIndex=te,e(A,O),d||h||(d=!0,x||(x=!0,M()))),O},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(O){var U=g;return function(){var Y=g;g=U;try{return O.apply(this,arguments)}finally{g=Y}}}})($ye)),$ye}var qye={},Lit;function N4n(){return Lit||(Lit=1,(function(t){var e={env:{}};e.env.NODE_ENV!=="production"&&(function(){function n(){if(x=!1,Q){var U=t.unstable_now();k=U;var Y=!0;try{e:{C=!1,y&&(y=!1,B(w),w=-1),I=!0;var W=f;try{t:{for(a(U),_=i(d);_!==null&&!(_.expirationTime>U&&c());){var te=_.callback;if(typeof te=="function"){_.callback=null,f=_.priorityLevel;var j=te(_.expirationTime<=U);if(U=t.unstable_now(),typeof j=="function"){_.callback=j,a(U),Y=!0;break t}_===i(d)&&r(d),a(U)}else r(d);_=i(d)}if(_!==null)Y=!0;else{var J=i(p);J!==null&&l(A,J.startTime-U),Y=!1}}break e}finally{_=null,f=W,I=!1}Y=void 0}}finally{Y?R():Q=!1}}}function o(U,Y){var W=U.length;U.push(Y);e:for(;0<W;){var te=W-1>>>1,j=U[te];if(0<s(j,Y))U[te]=Y,U[W]=j,W=te;else break e}}function i(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var Y=U[0],W=U.pop();if(W!==Y){U[0]=W;e:for(var te=0,j=U.length,J=j>>>1;te<J;){var oe=2*(te+1)-1,ie=U[oe],ne=oe+1,le=U[ne];if(0>s(ie,W))ne<j&&0>s(le,ie)?(U[te]=le,U[ne]=W,te=ne):(U[te]=ie,U[oe]=W,te=oe);else if(ne<j&&0>s(le,W))U[te]=le,U[ne]=W,te=ne;else break e}}return Y}function s(U,Y){var W=U.sortIndex-Y.sortIndex;return W!==0?W:U.id-Y.id}function a(U){for(var Y=i(p);Y!==null;){if(Y.callback===null)r(p);else if(Y.startTime<=U)r(p),Y.sortIndex=Y.expirationTime,o(d,Y);else break;Y=i(p)}}function A(U){if(y=!1,a(U),!C)if(i(d)!==null)C=!0,Q||(Q=!0,R());else{var Y=i(p);Y!==null&&l(A,Y.startTime-U)}}function c(){return x?!0:!(t.unstable_now()-k<M)}function l(U,Y){w=E(function(){U(t.unstable_now())},Y)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var g=Date,h=g.now();t.unstable_now=function(){return g.now()-h}}var d=[],p=[],m=1,_=null,f=3,I=!1,C=!1,y=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null,Q=!1,w=-1,M=5,k=-1;if(typeof S=="function")var R=function(){S(n)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,O=F.port2;F.port1.onmessage=n,R=function(){O.postMessage(null)}}else R=function(){E(n,0)};t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_next=function(U){switch(f){case 1:case 2:case 3:var Y=3;break;default:Y=f}var W=f;f=Y;try{return U()}finally{f=W}},t.unstable_requestPaint=function(){x=!0},t.unstable_runWithPriority=function(U,Y){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var W=f;f=U;try{return Y()}finally{f=W}},t.unstable_scheduleCallback=function(U,Y,W){var te=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?te+W:te):W=te,U){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=W+j,U={id:m++,callback:Y,priorityLevel:U,startTime:W,expirationTime:j,sortIndex:-1},W>te?(U.sortIndex=W,o(p,U),i(d)===null&&U===i(p)&&(y?(B(w),w=-1):y=!0,l(A,W-te))):(U.sortIndex=j,o(d,U),C||I||(C=!0,Q||(Q=!0,R()))),U},t.unstable_shouldYield=c,t.unstable_wrapCallback=function(U){var Y=f;return function(){var W=f;f=Y;try{return U.apply(this,arguments)}finally{f=W}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(qye)),qye}var Hit;function ane(){if(Hit)return sne.exports;Hit=1;var t={env:{}};return t.env.NODE_ENV==="production"?sne.exports=D4n():sne.exports=N4n(),sne.exports}var Ane={exports:{}},uC={};var Oit;function R4n(){if(Oit)return uC;Oit=1;var t=L3();function e(A){var c="https://react.dev/errors/"+A;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)c+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+A+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var o={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function r(A,c,l){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:u==null?null:""+u,children:A,containerInfo:c,implementation:l}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(A,c){if(A==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return uC.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,uC.createPortal=function(A,c){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(e(299));return r(A,c,null,l)},uC.flushSync=function(A){var c=s.T,l=o.p;try{if(s.T=null,o.p=2,A)return A()}finally{s.T=c,o.p=l,o.d.f()}},uC.preconnect=function(A,c){typeof A=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,o.d.C(A,c))},uC.prefetchDNS=function(A){typeof A=="string"&&o.d.D(A)},uC.preinit=function(A,c){if(typeof A=="string"&&c&&typeof c.as=="string"){var l=c.as,u=a(l,c.crossOrigin),g=typeof c.integrity=="string"?c.integrity:void 0,h=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;l==="style"?o.d.S(A,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:u,integrity:g,fetchPriority:h}):l==="script"&&o.d.X(A,{crossOrigin:u,integrity:g,fetchPriority:h,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},uC.preinitModule=function(A,c){if(typeof A=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var l=a(c.as,c.crossOrigin);o.d.M(A,{crossOrigin:l,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&o.d.M(A)},uC.preload=function(A,c){if(typeof A=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var l=c.as,u=a(l,c.crossOrigin);o.d.L(A,l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},uC.preloadModule=function(A,c){if(typeof A=="string")if(c){var l=a(c.as,c.crossOrigin);o.d.m(A,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:l,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else o.d.m(A)},uC.requestFormReset=function(A){o.d.r(A)},uC.unstable_batchedUpdates=function(A,c){return A(c)},uC.useFormState=function(A,c,l){return s.H.useFormState(A,c,l)},uC.useFormStatus=function(){return s.H.useHostTransitionStatus()},uC.version="19.1.0",uC}var gC={},Git;function T4n(){if(Git)return gC;Git=1;var t={env:{}};return t.env.NODE_ENV!=="production"&&(function(){function e(){}function n(g){return""+g}function o(g,h,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{n(p);var m=!1}catch{m=!0}return m&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object"),n(p)),{$$typeof:l,key:p==null?null:""+p,children:g,containerInfo:h,implementation:d}}function i(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}function r(g){return g===null?"`null`":g===void 0?"`undefined`":g===""?"an empty string":'something with type "'+typeof g+'"'}function s(g){return g===null?"`null`":g===void 0?"`undefined`":g===""?"an empty string":typeof g=="string"?JSON.stringify(g):typeof g=="number"?"`"+g+"`":'something with type "'+typeof g+'"'}function a(){var g=u.H;return g===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),g}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var A=L3(),c={d:{f:e,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:e,C:e,L:e,m:e,X:e,S:e,M:e},p:0,findDOMNode:null},l=Symbol.for("react.portal"),u=A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),gC.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,gC.createPortal=function(g,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error("Target container is not a DOM element.");return o(g,h,null,d)},gC.flushSync=function(g){var h=u.T,d=c.p;try{if(u.T=null,c.p=2,g)return g()}finally{u.T=h,c.p=d,c.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},gC.preconnect=function(g,h){typeof g=="string"&&g?h!=null&&typeof h!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",s(h)):h!=null&&typeof h.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",r(h.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(g)),typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,c.d.C(g,h))},gC.prefetchDNS=function(g){if(typeof g!="string"||!g)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(g));else if(1<arguments.length){var h=arguments[1];typeof h=="object"&&h.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",s(h)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",s(h))}typeof g=="string"&&c.d.D(g)},gC.preinit=function(g,h){if(typeof g=="string"&&g?h==null||typeof h!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",s(h)):h.as!=="style"&&h.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',s(h.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",r(g)),typeof g=="string"&&h&&typeof h.as=="string"){var d=h.as,p=i(d,h.crossOrigin),m=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?c.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:_}):d==="script"&&c.d.X(g,{crossOrigin:p,integrity:m,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},gC.preinitModule=function(g,h){var d="";typeof g=="string"&&g||(d+=" The `href` argument encountered was "+r(g)+"."),h!==void 0&&typeof h!="object"?d+=" The `options` argument encountered was "+r(h)+".":h&&"as"in h&&h.as!=="script"&&(d+=" The `as` option encountered was "+s(h.as)+"."),d?console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",d):(d=h&&typeof h.as=="string"?h.as:"script",d)==="script"||(d=s(d),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',d,g)),typeof g=="string"&&(typeof h=="object"&&h!==null?(h.as==null||h.as==="script")&&(d=i(h.as,h.crossOrigin),c.d.M(g,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})):h==null&&c.d.M(g))},gC.preload=function(g,h){var d="";if(typeof g=="string"&&g||(d+=" The `href` argument encountered was "+r(g)+"."),h==null||typeof h!="object"?d+=" The `options` argument encountered was "+r(h)+".":typeof h.as=="string"&&h.as||(d+=" The `as` option encountered was "+r(h.as)+"."),d&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',d),typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){d=h.as;var p=i(d,h.crossOrigin);c.d.L(g,d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},gC.preloadModule=function(g,h){var d="";typeof g=="string"&&g||(d+=" The `href` argument encountered was "+r(g)+"."),h!==void 0&&typeof h!="object"?d+=" The `options` argument encountered was "+r(h)+".":h&&"as"in h&&typeof h.as!="string"&&(d+=" The `as` option encountered was "+r(h.as)+"."),d&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',d),typeof g=="string"&&(h?(d=i(h.as,h.crossOrigin),c.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})):c.d.m(g))},gC.requestFormReset=function(g){c.d.r(g)},gC.unstable_batchedUpdates=function(g,h){return g(h)},gC.useFormState=function(g,h,d){return a().useFormState(g,h,d)},gC.useFormStatus=function(){return a().useHostTransitionStatus()},gC.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),gC}var Yit;function Xye(){if(Yit)return Ane.exports;Yit=1;var t={env:{}};function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(t.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}}return t.env.NODE_ENV==="production"?(e(),Ane.exports=R4n()):Ane.exports=T4n(),Ane.exports}var Uit;function k4n(){if(Uit)return iV;Uit=1;var t={env:{},version:""};var e=ane(),n=L3(),o=Xye();function i(D){var H="https://react.dev/errors/"+D;if(1<arguments.length){H+="?args[]="+encodeURIComponent(arguments[1]);for(var z=2;z<arguments.length;z++)H+="&args[]="+encodeURIComponent(arguments[z])}return"Minified React error #"+D+"; visit "+H+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(D){return!(!D||D.nodeType!==1&&D.nodeType!==9&&D.nodeType!==11)}function s(D){var H=D,z=D;if(D.alternate)for(;H.return;)H=H.return;else{D=H;do H=D,(H.flags&4098)!==0&&(z=H.return),D=H.return;while(D)}return H.tag===3?z:null}function a(D){if(D.tag===13){var H=D.memoizedState;if(H===null&&(D=D.alternate,D!==null&&(H=D.memoizedState)),H!==null)return H.dehydrated}return null}function A(D){if(s(D)!==D)throw Error(i(188))}function c(D){var H=D.alternate;if(!H){if(H=s(D),H===null)throw Error(i(188));return H!==D?null:D}for(var z=D,se=H;;){var xe=z.return;if(xe===null)break;var Fe=xe.alternate;if(Fe===null){if(se=xe.return,se!==null){z=se;continue}break}if(xe.child===Fe.child){for(Fe=xe.child;Fe;){if(Fe===z)return A(xe),D;if(Fe===se)return A(xe),H;Fe=Fe.sibling}throw Error(i(188))}if(z.return!==se.return)z=xe,se=Fe;else{for(var pt=!1,St=xe.child;St;){if(St===z){pt=!0,z=xe,se=Fe;break}if(St===se){pt=!0,se=xe,z=Fe;break}St=St.sibling}if(!pt){for(St=Fe.child;St;){if(St===z){pt=!0,z=Fe,se=xe;break}if(St===se){pt=!0,se=Fe,z=xe;break}St=St.sibling}if(!pt)throw Error(i(189))}}if(z.alternate!==se)throw Error(i(190))}if(z.tag!==3)throw Error(i(188));return z.stateNode.current===z?D:H}function l(D){var H=D.tag;if(H===5||H===26||H===27||H===6)return D;for(D=D.child;D!==null;){if(H=l(D),H!==null)return H;D=D.sibling}return null}var u=Object.assign,g=Symbol.for("react.element"),h=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),I=Symbol.for("react.consumer"),C=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),w=Symbol.for("react.memo_cache_sentinel"),M=Symbol.iterator;function k(D){return D===null||typeof D!="object"?null:(D=M&&D[M]||D["@@iterator"],typeof D=="function"?D:null)}var R=Symbol.for("react.client.reference");function F(D){if(D==null)return null;if(typeof D=="function")return D.$$typeof===R?null:D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case p:return"Fragment";case _:return"Profiler";case m:return"StrictMode";case x:return"Suspense";case E:return"SuspenseList";case Q:return"Activity"}if(typeof D=="object")switch(D.$$typeof){case d:return"Portal";case C:return(D.displayName||"Context")+".Provider";case I:return(D._context.displayName||"Context")+".Consumer";case y:var H=D.render;return D=D.displayName,D||(D=H.displayName||H.name||"",D=D!==""?"ForwardRef("+D+")":"ForwardRef"),D;case B:return H=D.displayName||null,H!==null?H:F(D.type)||"Memo";case S:H=D._payload,D=D._init;try{return F(D(H))}catch{}}return null}var O=Array.isArray,U=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},te=[],j=-1;function J(D){return{current:D}}function oe(D){0>j||(D.current=te[j],te[j]=null,j--)}function ie(D,H){j++,te[j]=D.current,D.current=H}var ne=J(null),le=J(null),ge=J(null),_e=J(null);function ue(D,H){switch(ie(ge,H),ie(le,D),ie(ne,null),H.nodeType){case 9:case 11:D=(D=H.documentElement)&&(D=D.namespaceURI)?O1(D):0;break;default:if(D=H.tagName,H=H.namespaceURI)H=O1(H),D=ry(H,D);else switch(D){case"svg":D=1;break;case"math":D=2;break;default:D=0}}oe(ne),ie(ne,D)}function fe(){oe(ne),oe(le),oe(ge)}function pe(D){D.memoizedState!==null&&ie(_e,D);var H=ne.current,z=ry(H,D.type);H!==z&&(ie(le,D),ie(ne,z))}function ye(D){le.current===D&&(oe(ne),oe(le)),_e.current===D&&(oe(_e),nd._currentValue=W)}var Me=Object.prototype.hasOwnProperty,ve=e.unstable_scheduleCallback,he=e.unstable_cancelCallback,Qe=e.unstable_shouldYield,Pe=e.unstable_requestPaint,we=e.unstable_now,Te=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,Ee=e.unstable_UserBlockingPriority,ke=e.unstable_NormalPriority,Ce=e.unstable_LowPriority,Le=e.unstable_IdlePriority,Ye=e.log,tt=e.unstable_setDisableYieldValue,At=null,at=null;function nt(D){if(typeof Ye=="function"&&tt(D),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(At,D)}catch{}}var gt=Math.clz32?Math.clz32:Dt,bt=Math.log,Ct=Math.LN2;function Dt(D){return D>>>=0,D===0?32:31-(bt(D)/Ct|0)|0}var kt=256,it=4194304;function Yt(D){var H=D&42;if(H!==0)return H;switch(D&-D){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return D&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return D&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return D}}function pn(D,H,z){var se=D.pendingLanes;if(se===0)return 0;var xe=0,Fe=D.suspendedLanes,pt=D.pingedLanes;D=D.warmLanes;var St=se&134217727;return St!==0?(se=St&~Fe,se!==0?xe=Yt(se):(pt&=St,pt!==0?xe=Yt(pt):z||(z=St&~D,z!==0&&(xe=Yt(z))))):(St=se&~Fe,St!==0?xe=Yt(St):pt!==0?xe=Yt(pt):z||(z=se&~D,z!==0&&(xe=Yt(z)))),xe===0?0:H!==0&&H!==xe&&(H&Fe)===0&&(Fe=xe&-xe,z=H&-H,Fe>=z||Fe===32&&(z&4194048)!==0)?H:xe}function be(D,H){return(D.pendingLanes&~(D.suspendedLanes&~D.pingedLanes)&H)===0}function et(D,H){switch(D){case 1:case 2:case 4:case 8:case 64:return H+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return H+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function It(){var D=kt;return kt<<=1,(kt&4194048)===0&&(kt=256),D}function Bt(){var D=it;return it<<=1,(it&62914560)===0&&(it=4194304),D}function mt(D){for(var H=[],z=0;31>z;z++)H.push(D);return H}function st(D,H){D.pendingLanes|=H,H!==268435456&&(D.suspendedLanes=0,D.pingedLanes=0,D.warmLanes=0)}function xt(D,H,z,se,xe,Fe){var pt=D.pendingLanes;D.pendingLanes=z,D.suspendedLanes=0,D.pingedLanes=0,D.warmLanes=0,D.expiredLanes&=z,D.entangledLanes&=z,D.errorRecoveryDisabledLanes&=z,D.shellSuspendCounter=0;var St=D.entanglements,on=D.expirationTimes,Pn=D.hiddenUpdates;for(z=pt&~z;0<z;){var Zn=31-gt(z),Qo=1<<Zn;St[Zn]=0,on[Zn]=-1;var Gn=Pn[Zn];if(Gn!==null)for(Pn[Zn]=null,Zn=0;Zn<Gn.length;Zn++){var jn=Gn[Zn];jn!==null&&(jn.lane&=-536870913)}z&=~Qo}se!==0&&Xe(D,se,0),Fe!==0&&xe===0&&D.tag!==0&&(D.suspendedLanes|=Fe&~(pt&~H))}function Xe(D,H,z){D.pendingLanes|=H,D.suspendedLanes&=~H;var se=31-gt(H);D.entangledLanes|=H,D.entanglements[se]=D.entanglements[se]|1073741824|z&4194090}function Ze(D,H){var z=D.entangledLanes|=H;for(D=D.entanglements;z;){var se=31-gt(z),xe=1<<se;xe&H|D[se]&H&&(D[se]|=H),z&=~xe}}function dt(D){switch(D){case 2:D=1;break;case 8:D=4;break;case 32:D=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:D=128;break;case 268435456:D=134217728;break;default:D=0}return D}function Ut(D){return D&=-D,2<D?8<D?(D&134217727)!==0?32:268435456:8:2}function Wt(){var D=Y.p;return D!==0?D:(D=window.event,D===void 0?32:en(D.type))}function Xt(D,H){var z=Y.p;try{return Y.p=D,H()}finally{Y.p=z}}var Jt=Math.random().toString(36).slice(2),yn="__reactFiber$"+Jt,An="__reactProps$"+Jt,kn="__reactContainer$"+Jt,$n="__reactEvents$"+Jt,ht="__reactListeners$"+Jt,Kt="__reactHandles$"+Jt,rn="__reactResources$"+Jt,Lt="__reactMarker$"+Jt;function Ho(D){delete D[yn],delete D[An],delete D[$n],delete D[ht],delete D[Kt]}function Ao(D){var H=D[yn];if(H)return H;for(var z=D.parentNode;z;){if(H=z[kn]||z[yn]){if(z=H.alternate,H.child!==null||z!==null&&z.child!==null)for(D=Vu(D);D!==null;){if(z=D[yn])return z;D=Vu(D)}return H}D=z,z=D.parentNode}return null}function qe(D){if(D=D[yn]||D[kn]){var H=D.tag;if(H===5||H===6||H===13||H===26||H===27||H===3)return D}return null}function vt(D){var H=D.tag;if(H===5||H===26||H===27||H===6)return D.stateNode;throw Error(i(33))}function qt(D){var H=D[rn];return H||(H=D[rn]={hoistableStyles:new Map,hoistableScripts:new Map}),H}function Zt(D){D[Lt]=!0}var nn=new Set,zn={};function Nn(D,H){Co(D,H),Co(D+"Capture",H)}function Co(D,H){for(zn[D]=H,D=0;D<H.length;D++)nn.add(H[D])}var ei=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ro={},To={};function yo(D){return Me.call(To,D)?!0:Me.call(ro,D)?!1:ei.test(D)?To[D]=!0:(ro[D]=!0,!1)}function Ro(D,H,z){if(yo(H))if(z===null)D.removeAttribute(H);else{switch(typeof z){case"undefined":case"function":case"symbol":D.removeAttribute(H);return;case"boolean":var se=H.toLowerCase().slice(0,5);if(se!=="data-"&&se!=="aria-"){D.removeAttribute(H);return}}D.setAttribute(H,""+z)}}function On(D,H,z){if(z===null)D.removeAttribute(H);else{switch(typeof z){case"undefined":case"function":case"symbol":case"boolean":D.removeAttribute(H);return}D.setAttribute(H,""+z)}}function uo(D,H,z,se){if(se===null)D.removeAttribute(z);else{switch(typeof se){case"undefined":case"function":case"symbol":case"boolean":D.removeAttribute(z);return}D.setAttributeNS(H,z,""+se)}}var Oo,ko;function Ko(D){if(Oo===void 0)try{throw Error()}catch(z){var H=z.stack.trim().match(/\n( *(at )?)/);Oo=H&&H[1]||"",ko=-1<z.stack.indexOf(`
    at`)?" (<anonymous>)":-1<z.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Oo+D+ko}var mi=!1;function Fo(D,H){if(!D||mi)return"";mi=!0;var z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var se={DetermineComponentFrameRoot:function(){try{if(H){var Qo=function(){throw Error()};if(Object.defineProperty(Qo.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Qo,[])}catch(jn){var Gn=jn}Reflect.construct(D,[],Qo)}else{try{Qo.call()}catch(jn){Gn=jn}D.call(Qo.prototype)}}else{try{throw Error()}catch(jn){Gn=jn}(Qo=D())&&typeof Qo.catch=="function"&&Qo.catch(function(){})}}catch(jn){if(jn&&Gn&&typeof jn.stack=="string")return[jn.stack,Gn.stack]}return[null,null]}};se.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var xe=Object.getOwnPropertyDescriptor(se.DetermineComponentFrameRoot,"name");xe&&xe.configurable&&Object.defineProperty(se.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Fe=se.DetermineComponentFrameRoot(),pt=Fe[0],St=Fe[1];if(pt&&St){var on=pt.split(`
`),Pn=St.split(`
`);for(xe=se=0;se<on.length&&!on[se].includes("DetermineComponentFrameRoot");)se++;for(;xe<Pn.length&&!Pn[xe].includes("DetermineComponentFrameRoot");)xe++;if(se===on.length||xe===Pn.length)for(se=on.length-1,xe=Pn.length-1;1<=se&&0<=xe&&on[se]!==Pn[xe];)xe--;for(;1<=se&&0<=xe;se--,xe--)if(on[se]!==Pn[xe]){if(se!==1||xe!==1)do if(se--,xe--,0>xe||on[se]!==Pn[xe]){var Zn=`
`+on[se].replace(" at new "," at ");return D.displayName&&Zn.includes("<anonymous>")&&(Zn=Zn.replace("<anonymous>",D.displayName)),Zn}while(1<=se&&0<=xe);break}}}finally{mi=!1,Error.prepareStackTrace=z}return(z=D?D.displayName||D.name:"")?Ko(z):""}function Nr(D){switch(D.tag){case 26:case 27:case 5:return Ko(D.type);case 16:return Ko("Lazy");case 13:return Ko("Suspense");case 19:return Ko("SuspenseList");case 0:case 15:return Fo(D.type,!1);case 11:return Fo(D.type.render,!1);case 1:return Fo(D.type,!0);case 31:return Ko("Activity");default:return""}}function Rs(D){try{var H="";do H+=Nr(D),D=D.return;while(D);return H}catch(z){return`
Error generating stack: `+z.message+`
`+z.stack}}function ur(D){switch(typeof D){case"bigint":case"boolean":case"number":case"string":case"undefined":return D;case"object":return D;default:return""}}function zi(D){var H=D.type;return(D=D.nodeName)&&D.toLowerCase()==="input"&&(H==="checkbox"||H==="radio")}function bi(D){var H=zi(D)?"checked":"value",z=Object.getOwnPropertyDescriptor(D.constructor.prototype,H),se=""+D[H];if(!D.hasOwnProperty(H)&&typeof z<"u"&&typeof z.get=="function"&&typeof z.set=="function"){var xe=z.get,Fe=z.set;return Object.defineProperty(D,H,{configurable:!0,get:function(){return xe.call(this)},set:function(pt){se=""+pt,Fe.call(this,pt)}}),Object.defineProperty(D,H,{enumerable:z.enumerable}),{getValue:function(){return se},setValue:function(pt){se=""+pt},stopTracking:function(){D._valueTracker=null,delete D[H]}}}}function Ar(D){D._valueTracker||(D._valueTracker=bi(D))}function ws(D){if(!D)return!1;var H=D._valueTracker;if(!H)return!0;var z=H.getValue(),se="";return D&&(se=zi(D)?D.checked?"true":"false":D.value),D=se,D!==z?(H.setValue(D),!0):!1}function ds(D){if(D=D||(typeof document<"u"?document:void 0),typeof D>"u")return null;try{return D.activeElement||D.body}catch{return D.body}}var Et=/[\n"\\]/g;function Gt(D){return D.replace(Et,function(H){return"\\"+H.charCodeAt(0).toString(16)+" "})}function Rt(D,H,z,se,xe,Fe,pt,St){D.name="",pt!=null&&typeof pt!="function"&&typeof pt!="symbol"&&typeof pt!="boolean"?D.type=pt:D.removeAttribute("type"),H!=null?pt==="number"?(H===0&&D.value===""||D.value!=H)&&(D.value=""+ur(H)):D.value!==""+ur(H)&&(D.value=""+ur(H)):pt!=="submit"&&pt!=="reset"||D.removeAttribute("value"),H!=null?Qt(D,pt,ur(H)):z!=null?Qt(D,pt,ur(z)):se!=null&&D.removeAttribute("value"),xe==null&&Fe!=null&&(D.defaultChecked=!!Fe),xe!=null&&(D.checked=xe&&typeof xe!="function"&&typeof xe!="symbol"),St!=null&&typeof St!="function"&&typeof St!="symbol"&&typeof St!="boolean"?D.name=""+ur(St):D.removeAttribute("name")}function Ht(D,H,z,se,xe,Fe,pt,St){if(Fe!=null&&typeof Fe!="function"&&typeof Fe!="symbol"&&typeof Fe!="boolean"&&(D.type=Fe),H!=null||z!=null){if(!(Fe!=="submit"&&Fe!=="reset"||H!=null))return;z=z!=null?""+ur(z):"",H=H!=null?""+ur(H):z,St||H===D.value||(D.value=H),D.defaultValue=H}se=se??xe,se=typeof se!="function"&&typeof se!="symbol"&&!!se,D.checked=St?D.checked:!!se,D.defaultChecked=!!se,pt!=null&&typeof pt!="function"&&typeof pt!="symbol"&&typeof pt!="boolean"&&(D.name=pt)}function Qt(D,H,z){H==="number"&&ds(D.ownerDocument)===D||D.defaultValue===""+z||(D.defaultValue=""+z)}function Nt(D,H,z,se){if(D=D.options,H){H={};for(var xe=0;xe<z.length;xe++)H["$"+z[xe]]=!0;for(z=0;z<D.length;z++)xe=H.hasOwnProperty("$"+D[z].value),D[z].selected!==xe&&(D[z].selected=xe),xe&&se&&(D[z].defaultSelected=!0)}else{for(z=""+ur(z),H=null,xe=0;xe<D.length;xe++){if(D[xe].value===z){D[xe].selected=!0,se&&(D[xe].defaultSelected=!0);return}H!==null||D[xe].disabled||(H=D[xe])}H!==null&&(H.selected=!0)}}function _n(D,H,z){if(H!=null&&(H=""+ur(H),H!==D.value&&(D.value=H),z==null)){D.defaultValue!==H&&(D.defaultValue=H);return}D.defaultValue=z!=null?""+ur(z):""}function qn(D,H,z,se){if(H==null){if(se!=null){if(z!=null)throw Error(i(92));if(O(se)){if(1<se.length)throw Error(i(93));se=se[0]}z=se}z==null&&(z=""),H=z}z=ur(H),D.defaultValue=z,se=D.textContent,se===z&&se!==""&&se!==null&&(D.value=se)}function En(D,H){if(H){var z=D.firstChild;if(z&&z===D.lastChild&&z.nodeType===3){z.nodeValue=H;return}}D.textContent=H}var Rn=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Hn(D,H,z){var se=H.indexOf("--")===0;z==null||typeof z=="boolean"||z===""?se?D.setProperty(H,""):H==="float"?D.cssFloat="":D[H]="":se?D.setProperty(H,z):typeof z!="number"||z===0||Rn.has(H)?H==="float"?D.cssFloat=z:D[H]=(""+z).trim():D[H]=z+"px"}function Lo(D,H,z){if(H!=null&&typeof H!="object")throw Error(i(62));if(D=D.style,z!=null){for(var se in z)!z.hasOwnProperty(se)||H!=null&&H.hasOwnProperty(se)||(se.indexOf("--")===0?D.setProperty(se,""):se==="float"?D.cssFloat="":D[se]="");for(var xe in H)se=H[xe],H.hasOwnProperty(xe)&&z[xe]!==se&&Hn(D,xe,se)}else for(var Fe in H)H.hasOwnProperty(Fe)&&Hn(D,Fe,H[Fe])}function Io(D){if(D.indexOf("-")===-1)return!1;switch(D){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gi=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),jo=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function oi(D){return jo.test(""+D)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":D}var Ji=null;function wi(D){return D=D.target||D.srcElement||window,D.correspondingUseElement&&(D=D.correspondingUseElement),D.nodeType===3?D.parentNode:D}var Br=null,gr=null;function oa(D){var H=qe(D);if(H&&(D=H.stateNode)){var z=D[An]||null;e:switch(D=H.stateNode,H.type){case"input":if(Rt(D,z.value,z.defaultValue,z.defaultValue,z.checked,z.defaultChecked,z.type,z.name),H=z.name,z.type==="radio"&&H!=null){for(z=D;z.parentNode;)z=z.parentNode;for(z=z.querySelectorAll('input[name="'+Gt(""+H)+'"][type="radio"]'),H=0;H<z.length;H++){var se=z[H];if(se!==D&&se.form===D.form){var xe=se[An]||null;if(!xe)throw Error(i(90));Rt(se,xe.value,xe.defaultValue,xe.defaultValue,xe.checked,xe.defaultChecked,xe.type,xe.name)}}for(H=0;H<z.length;H++)se=z[H],se.form===D.form&&ws(se)}break e;case"textarea":_n(D,z.value,z.defaultValue);break e;case"select":H=z.value,H!=null&&Nt(D,!!z.multiple,H,!1)}}}var hs=!1;function Li(D,H,z){if(hs)return D(H,z);hs=!0;try{var se=D(H);return se}finally{if(hs=!1,(Br!==null||gr!==null)&&(P_(),Br&&(H=Br,D=gr,gr=Br=null,oa(H),D)))for(H=0;H<D.length;H++)oa(D[H])}}function ys(D,H){var z=D.stateNode;if(z===null)return null;var se=z[An]||null;if(se===null)return null;z=se[H];e:switch(H){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(se=!se.disabled)||(D=D.type,se=!(D==="button"||D==="input"||D==="select"||D==="textarea")),D=!se;break e;default:D=!1}if(D)return null;if(z&&typeof z!="function")throw Error(i(231,H,typeof z));return z}var dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cA=!1;if(dr)try{var vA={};Object.defineProperty(vA,"passive",{get:function(){cA=!0}}),window.addEventListener("test",vA,vA),window.removeEventListener("test",vA,vA)}catch{cA=!1}var Yl=null,H0=null,ph=null;function Xh(){if(ph)return ph;var D,H=H0,z=H.length,se,xe="value"in Yl?Yl.value:Yl.textContent,Fe=xe.length;for(D=0;D<z&&H[D]===xe[D];D++);var pt=z-D;for(se=1;se<=pt&&H[z-se]===xe[Fe-se];se++);return ph=xe.slice(D,1<se?1-se:void 0)}function Bl(D){var H=D.keyCode;return"charCode"in D?(D=D.charCode,D===0&&H===13&&(D=13)):D=H,D===10&&(D=13),32<=D||D===13?D:0}function fc(){return!0}function Nd(){return!1}function il(D){function H(z,se,xe,Fe,pt){this._reactName=z,this._targetInst=xe,this.type=se,this.nativeEvent=Fe,this.target=pt,this.currentTarget=null;for(var St in D)D.hasOwnProperty(St)&&(z=D[St],this[St]=z?z(Fe):Fe[St]);return this.isDefaultPrevented=(Fe.defaultPrevented!=null?Fe.defaultPrevented:Fe.returnValue===!1)?fc:Nd,this.isPropagationStopped=Nd,this}return u(H.prototype,{preventDefault:function(){this.defaultPrevented=!0;var z=this.nativeEvent;z&&(z.preventDefault?z.preventDefault():typeof z.returnValue!="unknown"&&(z.returnValue=!1),this.isDefaultPrevented=fc)},stopPropagation:function(){var z=this.nativeEvent;z&&(z.stopPropagation?z.stopPropagation():typeof z.cancelBubble!="unknown"&&(z.cancelBubble=!0),this.isPropagationStopped=fc)},persist:function(){},isPersistent:fc}),H}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(D){return D.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},m_=il(Ul),ag=u({},Ul,{view:0,detail:0}),Rd=il(ag),mh,mm,gu,Ag=u({},ag,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_m,button:0,buttons:0,relatedTarget:function(D){return D.relatedTarget===void 0?D.fromElement===D.srcElement?D.toElement:D.fromElement:D.relatedTarget},movementX:function(D){return"movementX"in D?D.movementX:(D!==gu&&(gu&&D.type==="mousemove"?(mh=D.screenX-gu.screenX,mm=D.screenY-gu.screenY):mm=mh=0,gu=D),mh)},movementY:function(D){return"movementY"in D?D.movementY:mm}}),C0=il(Ag),FC=u({},Ag,{dataTransfer:0}),O0=il(FC),__=u({},ag,{relatedTarget:0}),Qp=il(__),_1=u({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),tr=il(_1),Vo=u({},Ul,{clipboardData:function(D){return"clipboardData"in D?D.clipboardData:window.clipboardData}}),wA=il(Vo),Td=u({},Ul,{data:0}),da=il(Td),Zh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},LC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _f(D){var H=this.nativeEvent;return H.getModifierState?H.getModifierState(D):(D=LC[D])?!!H[D]:!1}function _m(){return _f}var du=u({},ag,{key:function(D){if(D.key){var H=Zh[D.key]||D.key;if(H!=="Unidentified")return H}return D.type==="keypress"?(D=Bl(D),D===13?"Enter":String.fromCharCode(D)):D.type==="keydown"||D.type==="keyup"?mf[D.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_m,charCode:function(D){return D.type==="keypress"?Bl(D):0},keyCode:function(D){return D.type==="keydown"||D.type==="keyup"?D.keyCode:0},which:function(D){return D.type==="keypress"?Bl(D):D.type==="keydown"||D.type==="keyup"?D.keyCode:0}}),cg=il(du),Ug=u({},Ag,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vc=il(Ug),ha=u({},ag,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_m}),BI=il(ha),G0=u({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),PA=il(G0),_h=u({},Ag,{deltaX:function(D){return"deltaX"in D?D.deltaX:"wheelDeltaX"in D?-D.wheelDeltaX:0},deltaY:function(D){return"deltaY"in D?D.deltaY:"wheelDeltaY"in D?-D.wheelDeltaY:"wheelDelta"in D?-D.wheelDelta:0},deltaZ:0,deltaMode:0}),n0=il(_h),HC=u({},Ul,{newState:0,oldState:0}),f1=il(HC),fm=[9,13,27,32],vp=dr&&"CompositionEvent"in window,ku=null;dr&&"documentMode"in document&&(ku=document.documentMode);var ot=dr&&"TextEvent"in window&&!ku,rt=dr&&(!vp||ku&&8<ku&&11>=ku),Ot=" ",an=!1;function Dn(D,H){switch(D){case"keyup":return fm.indexOf(H.keyCode)!==-1;case"keydown":return H.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xn(D){return D=D.detail,typeof D=="object"&&"data"in D?D.data:null}var oo=!1;function vo(D,H){switch(D){case"compositionend":return Xn(H);case"keypress":return H.which!==32?null:(an=!0,Ot);case"textInput":return D=H.data,D===Ot&&an?null:D;default:return null}}function Xo(D,H){if(oo)return D==="compositionend"||!vp&&Dn(D,H)?(D=Xh(),ph=H0=Yl=null,oo=!1,D):null;switch(D){case"paste":return null;case"keypress":if(!(H.ctrlKey||H.altKey||H.metaKey)||H.ctrlKey&&H.altKey){if(H.char&&1<H.char.length)return H.char;if(H.which)return String.fromCharCode(H.which)}return null;case"compositionend":return rt&&H.locale!=="ko"?null:H.data;default:return null}}var Ti={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ir(D){var H=D&&D.nodeName&&D.nodeName.toLowerCase();return H==="input"?!!Ti[D.type]:H==="textarea"}function Gs(D,H,z,se){Br?gr?gr.push(se):gr=[se]:Br=se,H=B3(H,"onChange"),0<H.length&&(z=new m_("onChange","change",null,z,se),D.push({event:z,listeners:H}))}var qr=null,ps=null;function Ic(D){ZI(D,0)}function lc(D){var H=vt(D);if(ws(H))return D}function ka(D,H){if(D==="change")return H}var gn=!1;if(dr){var bn;if(dr){var go="oninput"in document;if(!go){var Go=document.createElement("div");Go.setAttribute("oninput","return;"),go=typeof Go.oninput=="function"}bn=go}else bn=!1;gn=bn&&(!document.documentMode||9<document.documentMode)}function hr(){qr&&(qr.detachEvent("onpropertychange",ia),ps=qr=null)}function ia(D){if(D.propertyName==="value"&&lc(ps)){var H=[];Gs(H,ps,D,wi(D)),Li(Ic,H)}}function lA(D,H,z){D==="focusin"?(hr(),qr=H,ps=z,qr.attachEvent("onpropertychange",ia)):D==="focusout"&&hr()}function MA(D){if(D==="selectionchange"||D==="keyup"||D==="keydown")return lc(ps)}function Fa(D,H){if(D==="click")return lc(H)}function La(D,H){if(D==="input"||D==="change")return lc(H)}function Y0(D,H){return D===H&&(D!==0||1/D===1/H)||D!==D&&H!==H}var Hr=typeof Object.is=="function"?Object.is:Y0;function fh(D,H){if(Hr(D,H))return!0;if(typeof D!="object"||D===null||typeof H!="object"||H===null)return!1;var z=Object.keys(D),se=Object.keys(H);if(z.length!==se.length)return!1;for(se=0;se<z.length;se++){var xe=z[se];if(!Me.call(H,xe)||!Hr(D[xe],H[xe]))return!1}return!0}function Ih(D){for(;D&&D.firstChild;)D=D.firstChild;return D}function DA(D,H){var z=Ih(D);D=0;for(var se;z;){if(z.nodeType===3){if(se=D+z.textContent.length,D<=H&&se>=H)return{node:z,offset:H-D};D=se}e:{for(;z;){if(z.nextSibling){z=z.nextSibling;break e}z=z.parentNode}z=void 0}z=Ih(z)}}function OC(D,H){return D&&H?D===H?!0:D&&D.nodeType===3?!1:H&&H.nodeType===3?OC(D,H.parentNode):"contains"in D?D.contains(H):D.compareDocumentPosition?!!(D.compareDocumentPosition(H)&16):!1:!1}function bI(D){D=D!=null&&D.ownerDocument!=null&&D.ownerDocument.defaultView!=null?D.ownerDocument.defaultView:window;for(var H=ds(D.document);H instanceof D.HTMLIFrameElement;){try{var z=typeof H.contentWindow.location.href=="string"}catch{z=!1}if(z)D=H.contentWindow;else break;H=ds(D.document)}return H}function hu(D){var H=D&&D.nodeName&&D.nodeName.toLowerCase();return H&&(H==="input"&&(D.type==="text"||D.type==="search"||D.type==="tel"||D.type==="url"||D.type==="password")||H==="textarea"||D.contentEditable==="true")}var lg=dr&&"documentMode"in document&&11>=document.documentMode,wp=null,kd=null,ff=null,I1=!1;function p2(D,H,z){var se=z.window===z?z.document:z.nodeType===9?z:z.ownerDocument;I1||wp==null||wp!==ds(se)||(se=wp,"selectionStart"in se&&hu(se)?se={start:se.selectionStart,end:se.selectionEnd}:(se=(se.ownerDocument&&se.ownerDocument.defaultView||window).getSelection(),se={anchorNode:se.anchorNode,anchorOffset:se.anchorOffset,focusNode:se.focusNode,focusOffset:se.focusOffset}),ff&&fh(ff,se)||(ff=se,se=B3(kd,"onSelect"),0<se.length&&(H=new m_("onSelect","select",null,H,z),D.push({event:H,listeners:se}),H.target=wp)))}function Pp(D,H){var z={};return z[D.toLowerCase()]=H.toLowerCase(),z["Webkit"+D]="webkit"+H,z["Moz"+D]="moz"+H,z}var SI={animationend:Pp("Animation","AnimationEnd"),animationiteration:Pp("Animation","AnimationIteration"),animationstart:Pp("Animation","AnimationStart"),transitionrun:Pp("Transition","TransitionRun"),transitionstart:Pp("Transition","TransitionStart"),transitioncancel:Pp("Transition","TransitionCancel"),transitionend:Pp("Transition","TransitionEnd")},Mp={},f_={};dr&&(f_=document.createElement("div").style,"AnimationEvent"in window||(delete SI.animationend.animation,delete SI.animationiteration.animation,delete SI.animationstart.animation),"TransitionEvent"in window||delete SI.transitionend.transition);function U0(D){if(Mp[D])return Mp[D];if(!SI[D])return D;var H=SI[D],z;for(z in H)if(H.hasOwnProperty(z)&&z in f_)return Mp[D]=H[z];return D}var S4=U0("animationend"),ep=U0("animationiteration"),If=U0("animationstart"),A3=U0("transitionrun"),m2=U0("transitionstart"),KE=U0("transitioncancel"),Fd=U0("transitionend"),_2=new Map,o0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");o0.push("scrollEnd");function tp(D,H){_2.set(D,H),Nn(H,[D])}var Im=new WeakMap;function pu(D,H){if(typeof D=="object"&&D!==null){var z=Im.get(D);return z!==void 0?z:(H={value:D,source:H,stack:Rs(H)},Im.set(D,H),H)}return{value:D,source:H,stack:Rs(H)}}var K0=[],zc=0,np=0;function y0(){for(var D=zc,H=np=zc=0;H<D;){var z=K0[H];K0[H++]=null;var se=K0[H];K0[H++]=null;var xe=K0[H];K0[H++]=null;var Fe=K0[H];if(K0[H++]=null,se!==null&&xe!==null){var pt=se.pending;pt===null?xe.next=xe:(xe.next=pt.next,pt.next=xe),se.pending=xe}Fe!==0&&Ld(z,xe,Fe)}}function Cm(D,H,z,se){K0[zc++]=D,K0[zc++]=H,K0[zc++]=z,K0[zc++]=se,np|=se,D.lanes|=se,D=D.alternate,D!==null&&(D.lanes|=se)}function Dp(D,H,z,se){return Cm(D,H,z,se),f2(D)}function Kg(D,H){return Cm(D,null,null,H),f2(D)}function Ld(D,H,z){D.lanes|=z;var se=D.alternate;se!==null&&(se.lanes|=z);for(var xe=!1,Fe=D.return;Fe!==null;)Fe.childLanes|=z,se=Fe.alternate,se!==null&&(se.childLanes|=z),Fe.tag===22&&(D=Fe.stateNode,D===null||D._visibility&1||(xe=!0)),D=Fe,Fe=Fe.return;return D.tag===3?(Fe=D.stateNode,xe&&H!==null&&(xe=31-gt(z),D=Fe.hiddenUpdates,se=D[xe],se===null?D[xe]=[H]:se.push(H),H.lane=z|536870912),Fe):null}function f2(D){if(50<Ph)throw Ph=0,XI=null,Error(i(185));for(var H=D.return;H!==null;)D=H,H=D.return;return D.tag===3?D.stateNode:null}var Np={};function QI(D,H,z,se){this.tag=D,this.key=z,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=H,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=se,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function V0(D,H,z,se){return new QI(D,H,z,se)}function Vg(D){return D=D.prototype,!(!D||!D.isReactComponent)}function op(D,H){var z=D.alternate;return z===null?(z=V0(D.tag,H,D.key,D.mode),z.elementType=D.elementType,z.type=D.type,z.stateNode=D.stateNode,z.alternate=D,D.alternate=z):(z.pendingProps=H,z.type=D.type,z.flags=0,z.subtreeFlags=0,z.deletions=null),z.flags=D.flags&65011712,z.childLanes=D.childLanes,z.lanes=D.lanes,z.child=D.child,z.memoizedProps=D.memoizedProps,z.memoizedState=D.memoizedState,z.updateQueue=D.updateQueue,H=D.dependencies,z.dependencies=H===null?null:{lanes:H.lanes,firstContext:H.firstContext},z.sibling=D.sibling,z.index=D.index,z.ref=D.ref,z.refCleanup=D.refCleanup,z}function bs(D,H){D.flags&=65011714;var z=D.alternate;return z===null?(D.childLanes=0,D.lanes=H,D.child=null,D.subtreeFlags=0,D.memoizedProps=null,D.memoizedState=null,D.updateQueue=null,D.dependencies=null,D.stateNode=null):(D.childLanes=z.childLanes,D.lanes=z.lanes,D.child=z.child,D.subtreeFlags=0,D.deletions=null,D.memoizedProps=z.memoizedProps,D.memoizedState=z.memoizedState,D.updateQueue=z.updateQueue,D.type=z.type,H=z.dependencies,D.dependencies=H===null?null:{lanes:H.lanes,firstContext:H.firstContext}),D}function Zo(D,H,z,se,xe,Fe){var pt=0;if(se=D,typeof D=="function")Vg(D)&&(pt=1);else if(typeof D=="string")pt=d8(D,z,ne.current)?26:D==="html"||D==="head"||D==="body"?27:5;else e:switch(D){case Q:return D=V0(31,z,H,xe),D.elementType=Q,D.lanes=Fe,D;case p:return ip(z.children,xe,Fe,H);case m:pt=8,xe|=24;break;case _:return D=V0(12,z,H,xe|2),D.elementType=_,D.lanes=Fe,D;case x:return D=V0(13,z,H,xe),D.elementType=x,D.lanes=Fe,D;case E:return D=V0(19,z,H,xe),D.elementType=E,D.lanes=Fe,D;default:if(typeof D=="object"&&D!==null)switch(D.$$typeof){case f:case C:pt=10;break e;case I:pt=9;break e;case y:pt=11;break e;case B:pt=14;break e;case S:pt=16,se=null;break e}pt=29,z=Error(i(130,D===null?"null":typeof D,"")),se=null}return H=V0(pt,z,H,xe),H.elementType=D,H.type=se,H.lanes=Fe,H}function ip(D,H,z,se){return D=V0(7,D,se,H),D.lanes=z,D}function vI(D,H,z){return D=V0(6,D,null,H),D.lanes=z,D}function nc(D,H,z){return H=V0(4,D.children!==null?D.children:[],D.key,H),H.lanes=z,H.stateNode={containerInfo:D.containerInfo,pendingChildren:null,implementation:D.implementation},H}var i0=[],Cf=0,ug=null,wI=0,rp=[],Rp=0,oc=null,gg=1,Cc="";function pa(D,H){i0[Cf++]=wI,i0[Cf++]=ug,ug=D,wI=H}function c3(D,H,z){rp[Rp++]=gg,rp[Rp++]=Cc,rp[Rp++]=oc,oc=D;var se=gg;D=Cc;var xe=32-gt(se)-1;se&=~(1<<xe),z+=1;var Fe=32-gt(H)+xe;if(30<Fe){var pt=xe-xe%5;Fe=(se&(1<<pt)-1).toString(32),se>>=pt,xe-=pt,gg=1<<32-gt(H)+xe|z<<xe|se,Cc=Fe+D}else gg=1<<Fe|z<<xe|se,Cc=D}function PI(D){D.return!==null&&(pa(D,1),c3(D,1,0))}function Tp(D){for(;D===ug;)ug=i0[--Cf],i0[Cf]=null,wI=i0[--Cf],i0[Cf]=null;for(;D===oc;)oc=rp[--Rp],rp[Rp]=null,Cc=rp[--Rp],rp[Rp]=null,gg=rp[--Rp],rp[Rp]=null}var rl=null,IA=null,uA=!1,ym=null,kp=!1,C1=Error(i(519));function xm(D){var H=Error(i(418,""));throw GC(pu(H,D)),C1}function I2(D){var H=D.stateNode,z=D.type,se=D.memoizedProps;switch(H[yn]=D,H[An]=se,z){case"dialog":Ia("cancel",H),Ia("close",H);break;case"iframe":case"object":case"embed":Ia("load",H);break;case"video":case"audio":for(z=0;z<Ff.length;z++)Ia(Ff[z],H);break;case"source":Ia("error",H);break;case"img":case"image":case"link":Ia("error",H),Ia("load",H);break;case"details":Ia("toggle",H);break;case"input":Ia("invalid",H),Ht(H,se.value,se.defaultValue,se.checked,se.defaultChecked,se.type,se.name,!0),Ar(H);break;case"select":Ia("invalid",H);break;case"textarea":Ia("invalid",H),qn(H,se.value,se.defaultValue,se.children),Ar(H)}z=se.children,typeof z!="string"&&typeof z!="number"&&typeof z!="bigint"||H.textContent===""+z||se.suppressHydrationWarning===!0||JS(H.textContent,z)?(se.popover!=null&&(Ia("beforetoggle",H),Ia("toggle",H)),se.onScroll!=null&&Ia("scroll",H),se.onScrollEnd!=null&&Ia("scrollend",H),se.onClick!=null&&(H.onclick=l8),H=!0):H=!1,H||xm(D)}function y1(D){for(rl=D.return;rl;)switch(rl.tag){case 5:case 13:kp=!1;return;case 27:case 3:kp=!0;return;default:rl=rl.return}}function I_(D){if(D!==rl)return!1;if(!uA)return y1(D),uA=!0,!1;var H=D.tag,z;if((z=H!==3&&H!==27)&&((z=H===5)&&(z=D.type,z=!(z!=="form"&&z!=="button")||$p(D.type,D.memoizedProps)),z=!z),z&&IA&&xm(D),y1(D),H===13){if(D=D.memoizedState,D=D!==null?D.dehydrated:null,!D)throw Error(i(317));e:{for(D=D.nextSibling,H=0;D;){if(D.nodeType===8)if(z=D.data,z==="/$"){if(H===0){IA=km(D.nextSibling);break e}H--}else z!=="$"&&z!=="$!"&&z!=="$?"||H++;D=D.nextSibling}IA=null}}else H===27?(H=IA,ay(D.type)?(D=jd,jd=null,IA=D):IA=H):IA=rl?km(D.stateNode.nextSibling):null;return!0}function MI(){IA=rl=null,uA=!1}function VE(){var D=ym;return D!==null&&(Xg===null?Xg=D:Xg.push.apply(Xg,D),ym=null),D}function GC(D){ym===null?ym=[D]:ym.push(D)}var YC=J(null),yf=null,Fu=null;function sp(D,H,z){ie(YC,H._currentValue),H._currentValue=z}function xf(D){D._currentValue=YC.current,oe(YC)}function C2(D,H,z){for(;D!==null;){var se=D.alternate;if((D.childLanes&H)!==H?(D.childLanes|=H,se!==null&&(se.childLanes|=H)):se!==null&&(se.childLanes&H)!==H&&(se.childLanes|=H),D===z)break;D=D.return}}function $s(D,H,z,se){var xe=D.child;for(xe!==null&&(xe.return=D);xe!==null;){var Fe=xe.dependencies;if(Fe!==null){var pt=xe.child;Fe=Fe.firstContext;e:for(;Fe!==null;){var St=Fe;Fe=xe;for(var on=0;on<H.length;on++)if(St.context===H[on]){Fe.lanes|=z,St=Fe.alternate,St!==null&&(St.lanes|=z),C2(Fe.return,z,D),se||(pt=null);break e}Fe=St.next}}else if(xe.tag===18){if(pt=xe.return,pt===null)throw Error(i(341));pt.lanes|=z,Fe=pt.alternate,Fe!==null&&(Fe.lanes|=z),C2(pt,z,D),pt=null}else pt=xe.child;if(pt!==null)pt.return=xe;else for(pt=xe;pt!==null;){if(pt===D){pt=null;break}if(xe=pt.sibling,xe!==null){xe.return=pt.return,pt=xe;break}pt=pt.return}xe=pt}}function DI(D,H,z,se){D=null;for(var xe=H,Fe=!1;xe!==null;){if(!Fe){if((xe.flags&524288)!==0)Fe=!0;else if((xe.flags&262144)!==0)break}if(xe.tag===10){var pt=xe.alternate;if(pt===null)throw Error(i(387));if(pt=pt.memoizedProps,pt!==null){var St=xe.type;Hr(xe.pendingProps.value,pt.value)||(D!==null?D.push(St):D=[St])}}else if(xe===_e.current){if(pt=xe.alternate,pt===null)throw Error(i(387));pt.memoizedState.memoizedState!==xe.memoizedState.memoizedState&&(D!==null?D.push(nd):D=[nd])}xe=xe.return}D!==null&&$s(H,D,z,se),H.flags|=262144}function y2(D){for(D=D.firstContext;D!==null;){if(!Hr(D.context._currentValue,D.memoizedValue))return!0;D=D.next}return!1}function x1(D){yf=D,Fu=null,D=D.dependencies,D!==null&&(D.firstContext=null)}function dg(D){return zE(yf,D)}function x2(D,H){return yf===null&&x1(D),zE(D,H)}function zE(D,H){var z=H._currentValue;if(H={context:H,memoizedValue:z,next:null},Fu===null){if(D===null)throw Error(i(308));Fu=H,D.dependencies={lanes:0,firstContext:H},D.flags|=524288}else Fu=Fu.next=H;return z}var E2=typeof AbortController<"u"?AbortController:function(){var D=[],H=this.signal={aborted:!1,addEventListener:function(z,se){D.push(se)}};this.abort=function(){H.aborted=!0,D.forEach(function(z){return z()})}},NI=e.unstable_scheduleCallback,Fp=e.unstable_NormalPriority,qs={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function RI(){return{controller:new E2,data:new Map,refCount:0}}function Ch(D){D.refCount--,D.refCount===0&&NI(Fp,function(){D.controller.abort()})}var C_=null,yh=0,Em=0,z0=null;function TI(D,H){if(C_===null){var z=C_=[];yh=0,Em=E3(),z0={status:"pending",value:void 0,then:function(se){z.push(se)}}}return yh++,H.then(Ef,Ef),H}function Ef(){if(--yh===0&&C_!==null){z0!==null&&(z0.status="fulfilled");var D=C_;C_=null,Em=0,z0=null;for(var H=0;H<D.length;H++)(0,D[H])()}}function Q4(D,H){var z=[],se={status:"pending",value:null,reason:null,then:function(xe){z.push(xe)}};return D.then(function(){se.status="fulfilled",se.value=H;for(var xe=0;xe<z.length;xe++)(0,z[xe])(H)},function(xe){for(se.status="rejected",se.reason=xe,xe=0;xe<z.length;xe++)(0,z[xe])(void 0)}),se}var B2=U.S;U.S=function(D,H){typeof H=="object"&&H!==null&&typeof H.then=="function"&&TI(D,H),B2!==null&&B2(D,H)};var Lp=J(null);function ma(){var D=Lp.current;return D!==null?D:Lc.pooledCache}function b2(D,H){H===null?ie(Lp,Lp.current):ie(Lp,H.pool)}function Hd(){var D=ma();return D===null?null:{parent:qs._currentValue,pool:D}}var E1=Error(i(460)),kI=Error(i(474)),Od=Error(i(542)),B1={then:function(){}};function FI(D){return D=D.status,D==="fulfilled"||D==="rejected"}function UC(){}function S2(D,H,z){switch(z=D[z],z===void 0?D.push(H):z!==H&&(H.then(UC,UC),H=z),H.status){case"fulfilled":return H.value;case"rejected":throw D=H.reason,y_(D),D;default:if(typeof H.status=="string")H.then(UC,UC);else{if(D=Lc,D!==null&&100<D.shellSuspendCounter)throw Error(i(482));D=H,D.status="pending",D.then(function(se){if(H.status==="pending"){var xe=H;xe.status="fulfilled",xe.value=se}},function(se){if(H.status==="pending"){var xe=H;xe.status="rejected",xe.reason=se}})}switch(H.status){case"fulfilled":return H.value;case"rejected":throw D=H.reason,y_(D),D}throw KC=H,E1}}var KC=null;function l3(){if(KC===null)throw Error(i(459));var D=KC;return KC=null,D}function y_(D){if(D===E1||D===Od)throw Error(i(483))}var ap=!1;function u3(D){D.updateQueue={baseState:D.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Q2(D,H){D=D.updateQueue,H.updateQueue===D&&(H.updateQueue={baseState:D.baseState,firstBaseUpdate:D.firstBaseUpdate,lastBaseUpdate:D.lastBaseUpdate,shared:D.shared,callbacks:null})}function Gd(D){return{lane:D,tag:0,payload:null,callback:null,next:null}}function Yd(D,H,z){var se=D.updateQueue;if(se===null)return null;if(se=se.shared,(xs&2)!==0){var xe=se.pending;return xe===null?H.next=H:(H.next=xe.next,xe.next=H),se.pending=H,H=f2(D),Ld(D,null,z),H}return Cm(D,se,H,z),f2(D)}function b1(D,H,z){if(H=H.updateQueue,H!==null&&(H=H.shared,(z&4194048)!==0)){var se=H.lanes;se&=D.pendingLanes,z|=se,H.lanes=z,Ze(D,z)}}function v4(D,H){var z=D.updateQueue,se=D.alternate;if(se!==null&&(se=se.updateQueue,z===se)){var xe=null,Fe=null;if(z=z.firstBaseUpdate,z!==null){do{var pt={lane:z.lane,tag:z.tag,payload:z.payload,callback:null,next:null};Fe===null?xe=Fe=pt:Fe=Fe.next=pt,z=z.next}while(z!==null);Fe===null?xe=Fe=H:Fe=Fe.next=H}else xe=Fe=H;z={baseState:se.baseState,firstBaseUpdate:xe,lastBaseUpdate:Fe,shared:se.shared,callbacks:se.callbacks},D.updateQueue=z;return}D=z.lastBaseUpdate,D===null?z.firstBaseUpdate=H:D.next=H,z.lastBaseUpdate=H}var Hp=!1;function VC(){if(Hp){var D=z0;if(D!==null)throw D}}function Bm(D,H,z,se){Hp=!1;var xe=D.updateQueue;ap=!1;var Fe=xe.firstBaseUpdate,pt=xe.lastBaseUpdate,St=xe.shared.pending;if(St!==null){xe.shared.pending=null;var on=St,Pn=on.next;on.next=null,pt===null?Fe=Pn:pt.next=Pn,pt=on;var Zn=D.alternate;Zn!==null&&(Zn=Zn.updateQueue,St=Zn.lastBaseUpdate,St!==pt&&(St===null?Zn.firstBaseUpdate=Pn:St.next=Pn,Zn.lastBaseUpdate=on))}if(Fe!==null){var Qo=xe.baseState;pt=0,Zn=Pn=on=null,St=Fe;do{var Gn=St.lane&-536870913,jn=Gn!==St.lane;if(jn?(Ja&Gn)===Gn:(se&Gn)===Gn){Gn!==0&&Gn===Em&&(Hp=!0),Zn!==null&&(Zn=Zn.next={lane:0,tag:St.tag,payload:St.payload,callback:null,next:null});e:{var wr=D,br=St;Gn=H;var tA=z;switch(br.tag){case 1:if(wr=br.payload,typeof wr=="function"){Qo=wr.call(tA,Qo,Gn);break e}Qo=wr;break e;case 3:wr.flags=wr.flags&-65537|128;case 0:if(wr=br.payload,Gn=typeof wr=="function"?wr.call(tA,Qo,Gn):wr,Gn==null)break e;Qo=u({},Qo,Gn);break e;case 2:ap=!0}}Gn=St.callback,Gn!==null&&(D.flags|=64,jn&&(D.flags|=8192),jn=xe.callbacks,jn===null?xe.callbacks=[Gn]:jn.push(Gn))}else jn={lane:Gn,tag:St.tag,payload:St.payload,callback:St.callback,next:null},Zn===null?(Pn=Zn=jn,on=Qo):Zn=Zn.next=jn,pt|=Gn;if(St=St.next,St===null){if(St=xe.shared.pending,St===null)break;jn=St,St=jn.next,jn.next=null,xe.lastBaseUpdate=jn,xe.shared.pending=null}}while(!0);Zn===null&&(on=Qo),xe.baseState=on,xe.firstBaseUpdate=Pn,xe.lastBaseUpdate=Zn,Fe===null&&(xe.shared.lanes=0),qc|=pt,D.lanes=pt,D.memoizedState=Qo}}function Xr(D,H){if(typeof D!="function")throw Error(i(191,D));D.call(H)}function v2(D,H){var z=D.callbacks;if(z!==null)for(D.callbacks=null,D=0;D<z.length;D++)Xr(z[D],H)}var Ts=J(null),S1=J(0);function CA(D,H){D=Tf,ie(S1,D),ie(Ts,H),Tf=D|H.baseLanes}function x0(){ie(S1,Tf),ie(Ts,Ts.current)}function zg(){Tf=S1.current,oe(Ts),oe(S1)}var bm=0,Ss=null,ic=null,Va=null,LI=!1,Lu=!1,Jg=!1,x_=0,hg=0,xh=null,Ud=0;function Ks(){throw Error(i(321))}function E_(D,H){if(H===null)return!1;for(var z=0;z<H.length&&z<D.length;z++)if(!Hr(D[z],H[z]))return!1;return!0}function Eh(D,H,z,se,xe,Fe){return bm=Fe,Ss=H,H.memoizedState=null,H.updateQueue=null,H.lanes=0,U.H=D===null||D.memoizedState===null?H2:mu,Jg=!1,Fe=z(se,xe),Jg=!1,Lu&&(Fe=w4(H,z,se,xe)),B_(D),Fe}function B_(D){U.H=Bh;var H=ic!==null&&ic.next!==null;if(bm=0,Va=ic=Ss=null,LI=!1,hg=0,xh=null,H)throw Error(i(300));D===null||cs||(D=D.dependencies,D!==null&&y2(D)&&(cs=!0))}function w4(D,H,z,se){Ss=D;var xe=0;do{if(Lu&&(xh=null),hg=0,Lu=!1,25<=xe)throw Error(i(301));if(xe+=1,Va=ic=null,D.updateQueue!=null){var Fe=D.updateQueue;Fe.lastEffect=null,Fe.events=null,Fe.stores=null,Fe.memoCache!=null&&(Fe.memoCache.index=0)}U.H=vf,Fe=H(z,se)}while(Lu);return Fe}function J0(){var D=U.H,H=D.useState()[0];return H=typeof H.then=="function"?zC(H):H,D=D.useState()[0],(ic!==null?ic.memoizedState:null)!==D&&(Ss.flags|=1024),H}function Sm(){var D=x_!==0;return x_=0,D}function w2(D,H,z){H.updateQueue=D.updateQueue,H.flags&=-2053,D.lanes&=~z}function g3(D){if(LI){for(D=D.memoizedState;D!==null;){var H=D.queue;H!==null&&(H.pending=null),D=D.next}LI=!1}bm=0,Va=ic=Ss=null,Lu=!1,hg=x_=0,xh=null}function Wg(){var D={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Va===null?Ss.memoizedState=Va=D:Va=Va.next=D,Va}function r0(){if(ic===null){var D=Ss.alternate;D=D!==null?D.memoizedState:null}else D=ic.next;var H=Va===null?Ss.memoizedState:Va.next;if(H!==null)Va=H,ic=D;else{if(D===null)throw Ss.alternate===null?Error(i(467)):Error(i(310));ic=D,D={memoizedState:ic.memoizedState,baseState:ic.baseState,baseQueue:ic.baseQueue,queue:ic.queue,next:null},Va===null?Ss.memoizedState=Va=D:Va=Va.next=D}return Va}function P2(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zC(D){var H=hg;return hg+=1,xh===null&&(xh=[]),D=S2(xh,D,H),H=Ss,(Va===null?H.memoizedState:Va.next)===null&&(H=H.alternate,U.H=H===null||H.memoizedState===null?H2:mu),D}function W0(D){if(D!==null&&typeof D=="object"){if(typeof D.then=="function")return zC(D);if(D.$$typeof===C)return dg(D)}throw Error(i(438,String(D)))}function M2(D){var H=null,z=Ss.updateQueue;if(z!==null&&(H=z.memoCache),H==null){var se=Ss.alternate;se!==null&&(se=se.updateQueue,se!==null&&(se=se.memoCache,se!=null&&(H={data:se.data.map(function(xe){return xe.slice()}),index:0})))}if(H==null&&(H={data:[],index:0}),z===null&&(z=P2(),Ss.updateQueue=z),z.memoCache=H,z=H.data[H.index],z===void 0)for(z=H.data[H.index]=Array(D),se=0;se<D;se++)z[se]=w;return H.index++,z}function sl(D,H){return typeof H=="function"?H(D):H}function b_(D){var H=r0();return s0(H,ic,D)}function s0(D,H,z){var se=D.queue;if(se===null)throw Error(i(311));se.lastRenderedReducer=z;var xe=D.baseQueue,Fe=se.pending;if(Fe!==null){if(xe!==null){var pt=xe.next;xe.next=Fe.next,Fe.next=pt}H.baseQueue=xe=Fe,se.pending=null}if(Fe=D.baseState,xe===null)D.memoizedState=Fe;else{H=xe.next;var St=pt=null,on=null,Pn=H,Zn=!1;do{var Qo=Pn.lane&-536870913;if(Qo!==Pn.lane?(Ja&Qo)===Qo:(bm&Qo)===Qo){var Gn=Pn.revertLane;if(Gn===0)on!==null&&(on=on.next={lane:0,revertLane:0,action:Pn.action,hasEagerState:Pn.hasEagerState,eagerState:Pn.eagerState,next:null}),Qo===Em&&(Zn=!0);else if((bm&Gn)===Gn){Pn=Pn.next,Gn===Em&&(Zn=!0);continue}else Qo={lane:0,revertLane:Pn.revertLane,action:Pn.action,hasEagerState:Pn.hasEagerState,eagerState:Pn.eagerState,next:null},on===null?(St=on=Qo,pt=Fe):on=on.next=Qo,Ss.lanes|=Gn,qc|=Gn;Qo=Pn.action,Jg&&z(Fe,Qo),Fe=Pn.hasEagerState?Pn.eagerState:z(Fe,Qo)}else Gn={lane:Qo,revertLane:Pn.revertLane,action:Pn.action,hasEagerState:Pn.hasEagerState,eagerState:Pn.eagerState,next:null},on===null?(St=on=Gn,pt=Fe):on=on.next=Gn,Ss.lanes|=Qo,qc|=Qo;Pn=Pn.next}while(Pn!==null&&Pn!==H);if(on===null?pt=Fe:on.next=St,!Hr(Fe,D.memoizedState)&&(cs=!0,Zn&&(z=z0,z!==null)))throw z;D.memoizedState=Fe,D.baseState=pt,D.baseQueue=on,se.lastRenderedState=Fe}return xe===null&&(se.lanes=0),[D.memoizedState,se.dispatch]}function JE(D){var H=r0(),z=H.queue;if(z===null)throw Error(i(311));z.lastRenderedReducer=D;var se=z.dispatch,xe=z.pending,Fe=H.memoizedState;if(xe!==null){z.pending=null;var pt=xe=xe.next;do Fe=D(Fe,pt.action),pt=pt.next;while(pt!==xe);Hr(Fe,H.memoizedState)||(cs=!0),H.memoizedState=Fe,H.baseQueue===null&&(H.baseState=Fe),z.lastRenderedState=Fe}return[Fe,se]}function d3(D,H,z){var se=Ss,xe=r0(),Fe=uA;if(Fe){if(z===void 0)throw Error(i(407));z=z()}else z=H();var pt=!Hr((ic||xe).memoizedState,z);pt&&(xe.memoizedState=z,cs=!0),xe=xe.queue;var St=D2.bind(null,se,xe,D);if(kc(2048,8,St,[D]),xe.getSnapshot!==H||pt||Va!==null&&Va.memoizedState.tag&1){if(se.flags|=2048,Ap(9,F2(),Bf.bind(null,se,xe,z,H),null),Lc===null)throw Error(i(349));Fe||(bm&124)!==0||JC(se,H,z)}return z}function JC(D,H,z){D.flags|=16384,D={getSnapshot:H,value:z},H=Ss.updateQueue,H===null?(H=P2(),Ss.updateQueue=H,H.stores=[D]):(z=H.stores,z===null?H.stores=[D]:z.push(D))}function Bf(D,H,z,se){H.value=z,H.getSnapshot=se,WC(H)&&Qm(D)}function D2(D,H,z){return z(function(){WC(H)&&Qm(D)})}function WC(D){var H=D.getSnapshot;D=D.value;try{var z=H();return!Hr(D,z)}catch{return!0}}function Qm(D){var H=Kg(D,2);H!==null&&Sl(H,D,2)}function N2(D){var H=Wg();if(typeof D=="function"){var z=D;if(D=z(),Jg){nt(!0);try{z()}finally{nt(!1)}}}return H.memoizedState=H.baseState=D,H.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:D},H}function WE(D,H,z,se){return D.baseState=z,s0(D,ic,typeof se=="function"?se:sl)}function jE(D,H,z,se,xe){if(zr(D))throw Error(i(485));if(D=H.action,D!==null){var Fe={payload:xe,action:D,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(pt){Fe.listeners.push(pt)}};U.T!==null?z(!0):Fe.isTransition=!1,se(Fe),z=H.pending,z===null?(Fe.next=H.pending=Fe,$E(H,Fe)):(Fe.next=z.next,H.pending=z.next=Fe)}}function $E(D,H){var z=H.action,se=H.payload,xe=D.state;if(H.isTransition){var Fe=U.T,pt={};U.T=pt;try{var St=z(xe,se),on=U.S;on!==null&&on(pt,St),R2(D,H,St)}catch(Pn){p3(D,H,Pn)}finally{U.T=Fe}}else try{Fe=z(xe,se),R2(D,H,Fe)}catch(Pn){p3(D,H,Pn)}}function R2(D,H,z){z!==null&&typeof z=="object"&&typeof z.then=="function"?z.then(function(se){h3(D,H,se)},function(se){return p3(D,H,se)}):h3(D,H,z)}function h3(D,H,z){H.status="fulfilled",H.value=z,l9(H),D.state=z,H=D.pending,H!==null&&(z=H.next,z===H?D.pending=null:(z=z.next,H.next=z,$E(D,z)))}function p3(D,H,z){var se=D.pending;if(D.pending=null,se!==null){se=se.next;do H.status="rejected",H.reason=z,l9(H),H=H.next;while(H!==se)}D.action=null}function l9(D){D=D.listeners;for(var H=0;H<D.length;H++)(0,D[H])()}function qE(D,H){return H}function P4(D,H){if(uA){var z=Lc.formState;if(z!==null){e:{var se=Ss;if(uA){if(IA){t:{for(var xe=IA,Fe=kp;xe.nodeType!==8;){if(!Fe){xe=null;break t}if(xe=km(xe.nextSibling),xe===null){xe=null;break t}}Fe=xe.data,xe=Fe==="F!"||Fe==="F"?xe:null}if(xe){IA=km(xe.nextSibling),se=xe.data==="F!";break e}}xm(se)}se=!1}se&&(H=z[0])}}return z=Wg(),z.memoizedState=z.baseState=H,se={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qE,lastRenderedState:H},z.queue=se,z=Hu.bind(null,Ss,se),se.dispatch=z,se=N2(!1),Fe=i5.bind(null,Ss,!1,se.queue),se=Wg(),xe={state:H,dispatch:null,action:D,pending:null},se.queue=xe,z=jE.bind(null,Ss,xe,Fe,z),xe.dispatch=z,se.memoizedState=D,[H,z,!1]}function bf(D){var H=r0();return XE(H,ic,D)}function XE(D,H,z){if(H=s0(D,H,qE)[0],D=b_(sl)[0],typeof H=="object"&&H!==null&&typeof H.then=="function")try{var se=zC(H)}catch(pt){throw pt===E1?Od:pt}else se=H;H=r0();var xe=H.queue,Fe=xe.dispatch;return z!==H.memoizedState&&(Ss.flags|=2048,Ap(9,F2(),T2.bind(null,xe,z),null)),[se,Fe,D]}function T2(D,H){D.action=H}function k2(D){var H=r0(),z=ic;if(z!==null)return XE(H,z,D);r0(),H=H.memoizedState,z=r0();var se=z.queue.dispatch;return z.memoizedState=D,[H,se,!1]}function Ap(D,H,z,se){return D={tag:D,create:z,deps:se,inst:H,next:null},H=Ss.updateQueue,H===null&&(H=P2(),Ss.updateQueue=H),z=H.lastEffect,z===null?H.lastEffect=D.next=D:(se=z.next,z.next=D,D.next=se,H.lastEffect=D),D}function F2(){return{destroy:void 0,resource:void 0}}function m3(){return r0().memoizedState}function HI(D,H,z,se){var xe=Wg();se=se===void 0?null:se,Ss.flags|=D,xe.memoizedState=Ap(1|H,F2(),z,se)}function kc(D,H,z,se){var xe=r0();se=se===void 0?null:se;var Fe=xe.memoizedState.inst;ic!==null&&se!==null&&E_(se,ic.memoizedState.deps)?xe.memoizedState=Ap(H,Fe,z,se):(Ss.flags|=D,xe.memoizedState=Ap(1|H,Fe,z,se))}function S_(D,H){HI(8390656,8,D,H)}function M4(D,H){kc(2048,8,D,H)}function jC(D,H){return kc(4,2,D,H)}function vm(D,H){return kc(4,4,D,H)}function ZE(D,H){if(typeof H=="function"){D=D();var z=H(D);return function(){typeof z=="function"?z():H(null)}}if(H!=null)return D=D(),H.current=D,function(){H.current=null}}function NA(D,H,z){z=z!=null?z.concat([D]):null,kc(4,4,ZE.bind(null,H,D),z)}function Sf(){}function OI(D,H){var z=r0();H=H===void 0?null:H;var se=z.memoizedState;return H!==null&&E_(H,se[1])?se[0]:(z.memoizedState=[D,H],D)}function Q1(D,H){var z=r0();H=H===void 0?null:H;var se=z.memoizedState;if(H!==null&&E_(H,se[1]))return se[0];if(se=D(),Jg){nt(!0);try{D()}finally{nt(!1)}}return z.memoizedState=[se,H],se}function e5(D,H,z){return z===void 0||(bm&1073741824)!==0?D.memoizedState=H:(D.memoizedState=z,D=hl(),Ss.lanes|=D,qc|=D,z)}function u9(D,H,z,se){return Hr(z,H)?z:Ts.current!==null?(D=e5(D,z,se),Hr(D,H)||(cs=!0),D):(bm&42)===0?(cs=!0,D.memoizedState=z):(D=hl(),Ss.lanes|=D,qc|=D,H)}function t5(D,H,z,se,xe){var Fe=Y.p;Y.p=Fe!==0&&8>Fe?Fe:8;var pt=U.T,St={};U.T=St,i5(D,!1,H,z);try{var on=xe(),Pn=U.S;if(Pn!==null&&Pn(St,on),on!==null&&typeof on=="object"&&typeof on.then=="function"){var Zn=Q4(on,se);wm(D,H,Zn,dl(D))}else wm(D,H,se,dl(D))}catch(Qo){wm(D,H,{then:function(){},status:"rejected",reason:Qo},dl())}finally{Y.p=Fe,U.T=pt}}function g9(){}function n5(D,H,z,se){if(D.tag!==5)throw Error(i(476));var xe=o5(D).queue;t5(D,xe,H,W,z===null?g9:function(){return Qf(D),z(se)})}function o5(D){var H=D.memoizedState;if(H!==null)return H;H={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:W},next:null};var z={};return H.next={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:z},next:null},D.memoizedState=H,D=D.alternate,D!==null&&(D.memoizedState=H),H}function Qf(D){var H=o5(D).next.queue;wm(D,H,{},dl())}function Q_(){return dg(nd)}function d9(){return r0().memoizedState}function $C(){return r0().memoizedState}function L2(D){for(var H=D.return;H!==null;){switch(H.tag){case 24:case 3:var z=dl();D=Gd(z);var se=Yd(H,D,z);se!==null&&(Sl(se,H,z),b1(se,H,z)),H={cache:RI()},D.payload=H;return}H=H.return}}function GI(D,H,z){var se=dl();z={lane:se,revertLane:0,action:z,hasEagerState:!1,eagerState:null,next:null},zr(D)?v1(H,z):(z=Dp(D,H,z,se),z!==null&&(Sl(z,D,se),D4(z,H,se)))}function Hu(D,H,z){var se=dl();wm(D,H,z,se)}function wm(D,H,z,se){var xe={lane:se,revertLane:0,action:z,hasEagerState:!1,eagerState:null,next:null};if(zr(D))v1(H,xe);else{var Fe=D.alternate;if(D.lanes===0&&(Fe===null||Fe.lanes===0)&&(Fe=H.lastRenderedReducer,Fe!==null))try{var pt=H.lastRenderedState,St=Fe(pt,z);if(xe.hasEagerState=!0,xe.eagerState=St,Hr(St,pt))return Cm(D,H,xe,0),Lc===null&&y0(),!1}catch{}if(z=Dp(D,H,xe,se),z!==null)return Sl(z,D,se),D4(z,H,se),!0}return!1}function i5(D,H,z,se){if(se={lane:2,revertLane:E3(),action:se,hasEagerState:!1,eagerState:null,next:null},zr(D)){if(H)throw Error(i(479))}else H=Dp(D,z,se,2),H!==null&&Sl(H,D,2)}function zr(D){var H=D.alternate;return D===Ss||H!==null&&H===Ss}function v1(D,H){Lu=LI=!0;var z=D.pending;z===null?H.next=H:(H.next=z.next,z.next=H),D.pending=H}function D4(D,H,z){if((z&4194048)!==0){var se=H.lanes;se&=D.pendingLanes,z|=se,H.lanes=z,Ze(D,z)}}var Bh={readContext:dg,use:W0,useCallback:Ks,useContext:Ks,useEffect:Ks,useImperativeHandle:Ks,useLayoutEffect:Ks,useInsertionEffect:Ks,useMemo:Ks,useReducer:Ks,useRef:Ks,useState:Ks,useDebugValue:Ks,useDeferredValue:Ks,useTransition:Ks,useSyncExternalStore:Ks,useId:Ks,useHostTransitionStatus:Ks,useFormState:Ks,useActionState:Ks,useOptimistic:Ks,useMemoCache:Ks,useCacheRefresh:Ks},H2={readContext:dg,use:W0,useCallback:function(D,H){return Wg().memoizedState=[D,H===void 0?null:H],D},useContext:dg,useEffect:S_,useImperativeHandle:function(D,H,z){z=z!=null?z.concat([D]):null,HI(4194308,4,ZE.bind(null,H,D),z)},useLayoutEffect:function(D,H){return HI(4194308,4,D,H)},useInsertionEffect:function(D,H){HI(4,2,D,H)},useMemo:function(D,H){var z=Wg();H=H===void 0?null:H;var se=D();if(Jg){nt(!0);try{D()}finally{nt(!1)}}return z.memoizedState=[se,H],se},useReducer:function(D,H,z){var se=Wg();if(z!==void 0){var xe=z(H);if(Jg){nt(!0);try{z(H)}finally{nt(!1)}}}else xe=H;return se.memoizedState=se.baseState=xe,D={pending:null,lanes:0,dispatch:null,lastRenderedReducer:D,lastRenderedState:xe},se.queue=D,D=D.dispatch=GI.bind(null,Ss,D),[se.memoizedState,D]},useRef:function(D){var H=Wg();return D={current:D},H.memoizedState=D},useState:function(D){D=N2(D);var H=D.queue,z=Hu.bind(null,Ss,H);return H.dispatch=z,[D.memoizedState,z]},useDebugValue:Sf,useDeferredValue:function(D,H){var z=Wg();return e5(z,D,H)},useTransition:function(){var D=N2(!1);return D=t5.bind(null,Ss,D.queue,!0,!1),Wg().memoizedState=D,[!1,D]},useSyncExternalStore:function(D,H,z){var se=Ss,xe=Wg();if(uA){if(z===void 0)throw Error(i(407));z=z()}else{if(z=H(),Lc===null)throw Error(i(349));(Ja&124)!==0||JC(se,H,z)}xe.memoizedState=z;var Fe={value:z,getSnapshot:H};return xe.queue=Fe,S_(D2.bind(null,se,Fe,D),[D]),se.flags|=2048,Ap(9,F2(),Bf.bind(null,se,Fe,z,H),null),z},useId:function(){var D=Wg(),H=Lc.identifierPrefix;if(uA){var z=Cc,se=gg;z=(se&~(1<<32-gt(se)-1)).toString(32)+z,H="«"+H+"R"+z,z=x_++,0<z&&(H+="H"+z.toString(32)),H+="»"}else z=Ud++,H="«"+H+"r"+z.toString(32)+"»";return D.memoizedState=H},useHostTransitionStatus:Q_,useFormState:P4,useActionState:P4,useOptimistic:function(D){var H=Wg();H.memoizedState=H.baseState=D;var z={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return H.queue=z,H=i5.bind(null,Ss,!0,z),z.dispatch=H,[D,H]},useMemoCache:M2,useCacheRefresh:function(){return Wg().memoizedState=L2.bind(null,Ss)}},mu={readContext:dg,use:W0,useCallback:OI,useContext:dg,useEffect:M4,useImperativeHandle:NA,useInsertionEffect:jC,useLayoutEffect:vm,useMemo:Q1,useReducer:b_,useRef:m3,useState:function(){return b_(sl)},useDebugValue:Sf,useDeferredValue:function(D,H){var z=r0();return u9(z,ic.memoizedState,D,H)},useTransition:function(){var D=b_(sl)[0],H=r0().memoizedState;return[typeof D=="boolean"?D:zC(D),H]},useSyncExternalStore:d3,useId:d9,useHostTransitionStatus:Q_,useFormState:bf,useActionState:bf,useOptimistic:function(D,H){var z=r0();return WE(z,ic,D,H)},useMemoCache:M2,useCacheRefresh:$C},vf={readContext:dg,use:W0,useCallback:OI,useContext:dg,useEffect:M4,useImperativeHandle:NA,useInsertionEffect:jC,useLayoutEffect:vm,useMemo:Q1,useReducer:JE,useRef:m3,useState:function(){return JE(sl)},useDebugValue:Sf,useDeferredValue:function(D,H){var z=r0();return ic===null?e5(z,D,H):u9(z,ic.memoizedState,D,H)},useTransition:function(){var D=JE(sl)[0],H=r0().memoizedState;return[typeof D=="boolean"?D:zC(D),H]},useSyncExternalStore:d3,useId:d9,useHostTransitionStatus:Q_,useFormState:k2,useActionState:k2,useOptimistic:function(D,H){var z=r0();return ic!==null?WE(z,ic,D,H):(z.baseState=D,[D,z.queue.dispatch])},useMemoCache:M2,useCacheRefresh:$C},YI=null,bh=0;function _3(D){var H=bh;return bh+=1,YI===null&&(YI=[]),S2(YI,D,H)}function cp(D,H){H=H.props.ref,D.ref=H!==void 0?H:null}function Jc(D,H){throw H.$$typeof===g?Error(i(525)):(D=Object.prototype.toString.call(H),Error(i(31,D==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":D)))}function r5(D){var H=D._init;return H(D._payload)}function Gi(D){function H(Mn,Cn){if(D){var Un=Mn.deletions;Un===null?(Mn.deletions=[Cn],Mn.flags|=16):Un.push(Cn)}}function z(Mn,Cn){if(!D)return null;for(;Cn!==null;)H(Mn,Cn),Cn=Cn.sibling;return null}function se(Mn){for(var Cn=new Map;Mn!==null;)Mn.key!==null?Cn.set(Mn.key,Mn):Cn.set(Mn.index,Mn),Mn=Mn.sibling;return Cn}function xe(Mn,Cn){return Mn=op(Mn,Cn),Mn.index=0,Mn.sibling=null,Mn}function Fe(Mn,Cn,Un){return Mn.index=Un,D?(Un=Mn.alternate,Un!==null?(Un=Un.index,Un<Cn?(Mn.flags|=67108866,Cn):Un):(Mn.flags|=67108866,Cn)):(Mn.flags|=1048576,Cn)}function pt(Mn){return D&&Mn.alternate===null&&(Mn.flags|=67108866),Mn}function St(Mn,Cn,Un,Mo){return Cn===null||Cn.tag!==6?(Cn=vI(Un,Mn.mode,Mo),Cn.return=Mn,Cn):(Cn=xe(Cn,Un),Cn.return=Mn,Cn)}function on(Mn,Cn,Un,Mo){var mr=Un.type;return mr===p?Zn(Mn,Cn,Un.props.children,Mo,Un.key):Cn!==null&&(Cn.elementType===mr||typeof mr=="object"&&mr!==null&&mr.$$typeof===S&&r5(mr)===Cn.type)?(Cn=xe(Cn,Un.props),cp(Cn,Un),Cn.return=Mn,Cn):(Cn=Zo(Un.type,Un.key,Un.props,null,Mn.mode,Mo),cp(Cn,Un),Cn.return=Mn,Cn)}function Pn(Mn,Cn,Un,Mo){return Cn===null||Cn.tag!==4||Cn.stateNode.containerInfo!==Un.containerInfo||Cn.stateNode.implementation!==Un.implementation?(Cn=nc(Un,Mn.mode,Mo),Cn.return=Mn,Cn):(Cn=xe(Cn,Un.children||[]),Cn.return=Mn,Cn)}function Zn(Mn,Cn,Un,Mo,mr){return Cn===null||Cn.tag!==7?(Cn=ip(Un,Mn.mode,Mo,mr),Cn.return=Mn,Cn):(Cn=xe(Cn,Un),Cn.return=Mn,Cn)}function Qo(Mn,Cn,Un){if(typeof Cn=="string"&&Cn!==""||typeof Cn=="number"||typeof Cn=="bigint")return Cn=vI(""+Cn,Mn.mode,Un),Cn.return=Mn,Cn;if(typeof Cn=="object"&&Cn!==null){switch(Cn.$$typeof){case h:return Un=Zo(Cn.type,Cn.key,Cn.props,null,Mn.mode,Un),cp(Un,Cn),Un.return=Mn,Un;case d:return Cn=nc(Cn,Mn.mode,Un),Cn.return=Mn,Cn;case S:var Mo=Cn._init;return Cn=Mo(Cn._payload),Qo(Mn,Cn,Un)}if(O(Cn)||k(Cn))return Cn=ip(Cn,Mn.mode,Un,null),Cn.return=Mn,Cn;if(typeof Cn.then=="function")return Qo(Mn,_3(Cn),Un);if(Cn.$$typeof===C)return Qo(Mn,x2(Mn,Cn),Un);Jc(Mn,Cn)}return null}function Gn(Mn,Cn,Un,Mo){var mr=Cn!==null?Cn.key:null;if(typeof Un=="string"&&Un!==""||typeof Un=="number"||typeof Un=="bigint")return mr!==null?null:St(Mn,Cn,""+Un,Mo);if(typeof Un=="object"&&Un!==null){switch(Un.$$typeof){case h:return Un.key===mr?on(Mn,Cn,Un,Mo):null;case d:return Un.key===mr?Pn(Mn,Cn,Un,Mo):null;case S:return mr=Un._init,Un=mr(Un._payload),Gn(Mn,Cn,Un,Mo)}if(O(Un)||k(Un))return mr!==null?null:Zn(Mn,Cn,Un,Mo,null);if(typeof Un.then=="function")return Gn(Mn,Cn,_3(Un),Mo);if(Un.$$typeof===C)return Gn(Mn,Cn,x2(Mn,Un),Mo);Jc(Mn,Un)}return null}function jn(Mn,Cn,Un,Mo,mr){if(typeof Mo=="string"&&Mo!==""||typeof Mo=="number"||typeof Mo=="bigint")return Mn=Mn.get(Un)||null,St(Cn,Mn,""+Mo,mr);if(typeof Mo=="object"&&Mo!==null){switch(Mo.$$typeof){case h:return Mn=Mn.get(Mo.key===null?Un:Mo.key)||null,on(Cn,Mn,Mo,mr);case d:return Mn=Mn.get(Mo.key===null?Un:Mo.key)||null,Pn(Cn,Mn,Mo,mr);case S:var nA=Mo._init;return Mo=nA(Mo._payload),jn(Mn,Cn,Un,Mo,mr)}if(O(Mo)||k(Mo))return Mn=Mn.get(Un)||null,Zn(Cn,Mn,Mo,mr,null);if(typeof Mo.then=="function")return jn(Mn,Cn,Un,_3(Mo),mr);if(Mo.$$typeof===C)return jn(Mn,Cn,Un,x2(Cn,Mo),mr);Jc(Cn,Mo)}return null}function wr(Mn,Cn,Un,Mo){for(var mr=null,nA=null,es=Cn,gs=Cn=0,kh=null;es!==null&&gs<Un.length;gs++){es.index>gs?(kh=es,es=null):kh=es.sibling;var uc=Gn(Mn,es,Un[gs],Mo);if(uc===null){es===null&&(es=kh);break}D&&es&&uc.alternate===null&&H(Mn,es),Cn=Fe(uc,Cn,gs),nA===null?mr=uc:nA.sibling=uc,nA=uc,es=kh}if(gs===Un.length)return z(Mn,es),uA&&pa(Mn,gs),mr;if(es===null){for(;gs<Un.length;gs++)es=Qo(Mn,Un[gs],Mo),es!==null&&(Cn=Fe(es,Cn,gs),nA===null?mr=es:nA.sibling=es,nA=es);return uA&&pa(Mn,gs),mr}for(es=se(es);gs<Un.length;gs++)kh=jn(es,Mn,gs,Un[gs],Mo),kh!==null&&(D&&kh.alternate!==null&&es.delete(kh.key===null?gs:kh.key),Cn=Fe(kh,Cn,gs),nA===null?mr=kh:nA.sibling=kh,nA=kh);return D&&es.forEach(function(xu){return H(Mn,xu)}),uA&&pa(Mn,gs),mr}function br(Mn,Cn,Un,Mo){if(Un==null)throw Error(i(151));for(var mr=null,nA=null,es=Cn,gs=Cn=0,kh=null,uc=Un.next();es!==null&&!uc.done;gs++,uc=Un.next()){es.index>gs?(kh=es,es=null):kh=es.sibling;var xu=Gn(Mn,es,uc.value,Mo);if(xu===null){es===null&&(es=kh);break}D&&es&&xu.alternate===null&&H(Mn,es),Cn=Fe(xu,Cn,gs),nA===null?mr=xu:nA.sibling=xu,nA=xu,es=kh}if(uc.done)return z(Mn,es),uA&&pa(Mn,gs),mr;if(es===null){for(;!uc.done;gs++,uc=Un.next())uc=Qo(Mn,uc.value,Mo),uc!==null&&(Cn=Fe(uc,Cn,gs),nA===null?mr=uc:nA.sibling=uc,nA=uc);return uA&&pa(Mn,gs),mr}for(es=se(es);!uc.done;gs++,uc=Un.next())uc=jn(es,Mn,gs,uc.value,Mo),uc!==null&&(D&&uc.alternate!==null&&es.delete(uc.key===null?gs:uc.key),Cn=Fe(uc,Cn,gs),nA===null?mr=uc:nA.sibling=uc,nA=uc);return D&&es.forEach(function(MK){return H(Mn,MK)}),uA&&pa(Mn,gs),mr}function tA(Mn,Cn,Un,Mo){if(typeof Un=="object"&&Un!==null&&Un.type===p&&Un.key===null&&(Un=Un.props.children),typeof Un=="object"&&Un!==null){switch(Un.$$typeof){case h:e:{for(var mr=Un.key;Cn!==null;){if(Cn.key===mr){if(mr=Un.type,mr===p){if(Cn.tag===7){z(Mn,Cn.sibling),Mo=xe(Cn,Un.props.children),Mo.return=Mn,Mn=Mo;break e}}else if(Cn.elementType===mr||typeof mr=="object"&&mr!==null&&mr.$$typeof===S&&r5(mr)===Cn.type){z(Mn,Cn.sibling),Mo=xe(Cn,Un.props),cp(Mo,Un),Mo.return=Mn,Mn=Mo;break e}z(Mn,Cn);break}else H(Mn,Cn);Cn=Cn.sibling}Un.type===p?(Mo=ip(Un.props.children,Mn.mode,Mo,Un.key),Mo.return=Mn,Mn=Mo):(Mo=Zo(Un.type,Un.key,Un.props,null,Mn.mode,Mo),cp(Mo,Un),Mo.return=Mn,Mn=Mo)}return pt(Mn);case d:e:{for(mr=Un.key;Cn!==null;){if(Cn.key===mr)if(Cn.tag===4&&Cn.stateNode.containerInfo===Un.containerInfo&&Cn.stateNode.implementation===Un.implementation){z(Mn,Cn.sibling),Mo=xe(Cn,Un.children||[]),Mo.return=Mn,Mn=Mo;break e}else{z(Mn,Cn);break}else H(Mn,Cn);Cn=Cn.sibling}Mo=nc(Un,Mn.mode,Mo),Mo.return=Mn,Mn=Mo}return pt(Mn);case S:return mr=Un._init,Un=mr(Un._payload),tA(Mn,Cn,Un,Mo)}if(O(Un))return wr(Mn,Cn,Un,Mo);if(k(Un)){if(mr=k(Un),typeof mr!="function")throw Error(i(150));return Un=mr.call(Un),br(Mn,Cn,Un,Mo)}if(typeof Un.then=="function")return tA(Mn,Cn,_3(Un),Mo);if(Un.$$typeof===C)return tA(Mn,Cn,x2(Mn,Un),Mo);Jc(Mn,Un)}return typeof Un=="string"&&Un!==""||typeof Un=="number"||typeof Un=="bigint"?(Un=""+Un,Cn!==null&&Cn.tag===6?(z(Mn,Cn.sibling),Mo=xe(Cn,Un),Mo.return=Mn,Mn=Mo):(z(Mn,Cn),Mo=vI(Un,Mn.mode,Mo),Mo.return=Mn,Mn=Mo),pt(Mn)):z(Mn,Cn)}return function(Mn,Cn,Un,Mo){try{bh=0;var mr=tA(Mn,Cn,Un,Mo);return YI=null,mr}catch(es){if(es===E1||es===Od)throw es;var nA=V0(29,es,null,Mn.mode);return nA.lanes=Mo,nA.return=Mn,nA}}}var pg=Gi(!0),Pm=Gi(!1),Op=J(null),Sh=null;function Ys(D){var H=D.alternate;ie(ai,ai.current&1),ie(Op,D),Sh===null&&(H===null||Ts.current!==null||H.memoizedState!==null)&&(Sh=D)}function w1(D){if(D.tag===22){if(ie(ai,ai.current),ie(Op,D),Sh===null){var H=D.alternate;H!==null&&H.memoizedState!==null&&(Sh=D)}}else a0()}function a0(){ie(ai,ai.current),ie(Op,Op.current)}function al(D){oe(Op),Sh===D&&(Sh=null),oe(ai)}var ai=J(0);function v_(D){for(var H=D;H!==null;){if(H.tag===13){var z=H.memoizedState;if(z!==null&&(z=z.dehydrated,z===null||z.data==="$?"||m9(z)))return H}else if(H.tag===19&&H.memoizedProps.revealOrder!==void 0){if((H.flags&128)!==0)return H}else if(H.child!==null){H.child.return=H,H=H.child;continue}if(H===D)break;for(;H.sibling===null;){if(H.return===null||H.return===D)return null;H=H.return}H.sibling.return=H.return,H=H.sibling}return null}function Al(D,H,z,se){H=D.memoizedState,z=z(se,H),z=z==null?H:u({},H,z),D.memoizedState=z,D.lanes===0&&(D.updateQueue.baseState=z)}var P1={enqueueSetState:function(D,H,z){D=D._reactInternals;var se=dl(),xe=Gd(se);xe.payload=H,z!=null&&(xe.callback=z),H=Yd(D,xe,se),H!==null&&(Sl(H,D,se),b1(H,D,se))},enqueueReplaceState:function(D,H,z){D=D._reactInternals;var se=dl(),xe=Gd(se);xe.tag=1,xe.payload=H,z!=null&&(xe.callback=z),H=Yd(D,xe,se),H!==null&&(Sl(H,D,se),b1(H,D,se))},enqueueForceUpdate:function(D,H){D=D._reactInternals;var z=dl(),se=Gd(z);se.tag=2,H!=null&&(se.callback=H),H=Yd(D,se,z),H!==null&&(Sl(H,D,z),b1(H,D,z))}};function Wc(D,H,z,se,xe,Fe,pt){return D=D.stateNode,typeof D.shouldComponentUpdate=="function"?D.shouldComponentUpdate(se,Fe,pt):H.prototype&&H.prototype.isPureReactComponent?!fh(z,se)||!fh(xe,Fe):!0}function Gp(D,H,z,se){D=H.state,typeof H.componentWillReceiveProps=="function"&&H.componentWillReceiveProps(z,se),typeof H.UNSAFE_componentWillReceiveProps=="function"&&H.UNSAFE_componentWillReceiveProps(z,se),H.state!==D&&P1.enqueueReplaceState(H,H.state,null)}function A0(D,H){var z=H;if("ref"in H){z={};for(var se in H)se!=="ref"&&(z[se]=H[se])}if(D=D.defaultProps){z===H&&(z=u({},z));for(var xe in D)z[xe]===void 0&&(z[xe]=D[xe])}return z}var Mm=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(H))return}else if(typeof t=="object"&&typeof t.emit=="function"){t.emit("uncaughtException",D);return}console.error(D)};function mg(D){Mm(D)}function _g(D){console.error(D)}function O2(D){Mm(D)}function G2(D,H){try{var z=D.onUncaughtError;z(H.value,{componentStack:H.stack})}catch(se){setTimeout(function(){throw se})}}function RA(D,H,z){try{var se=D.onCaughtError;se(z.value,{componentStack:z.stack,errorBoundary:H.tag===1?H.stateNode:null})}catch(xe){setTimeout(function(){throw xe})}}function jg(D,H,z){return z=Gd(z),z.tag=3,z.payload={element:null},z.callback=function(){G2(D,H)},z}function qC(D){return D=Gd(D),D.tag=3,D}function Kd(D,H,z,se){var xe=z.type.getDerivedStateFromError;if(typeof xe=="function"){var Fe=se.value;D.payload=function(){return xe(Fe)},D.callback=function(){RA(H,z,se)}}var pt=z.stateNode;pt!==null&&typeof pt.componentDidCatch=="function"&&(D.callback=function(){RA(H,z,se),typeof xe!="function"&&(qI===null?qI=new Set([this]):qI.add(this));var St=se.stack;this.componentDidCatch(se.value,{componentStack:St!==null?St:""})})}function h9(D,H,z,se,xe){if(z.flags|=32768,se!==null&&typeof se=="object"&&typeof se.then=="function"){if(H=z.alternate,H!==null&&DI(H,z,xe,!0),z=Op.current,z!==null){switch(z.tag){case 13:return Sh===null?Wp():z.alternate===null&&Pa===0&&(Pa=3),z.flags&=-257,z.flags|=65536,z.lanes=xe,se===B1?z.flags|=16384:(H=z.updateQueue,H===null?z.updateQueue=new Set([se]):H.add(se),$o(D,se,xe)),!1;case 22:return z.flags|=65536,se===B1?z.flags|=16384:(H=z.updateQueue,H===null?(H={transitions:null,markerInstances:null,retryQueue:new Set([se])},z.updateQueue=H):(z=H.retryQueue,z===null?H.retryQueue=new Set([se]):z.add(se)),$o(D,se,xe)),!1}throw Error(i(435,z.tag))}return $o(D,se,xe),Wp(),!1}if(uA)return H=Op.current,H!==null?((H.flags&65536)===0&&(H.flags|=256),H.flags|=65536,H.lanes=xe,se!==C1&&(D=Error(i(422),{cause:se}),GC(pu(D,z)))):(se!==C1&&(H=Error(i(423),{cause:se}),GC(pu(H,z))),D=D.current.alternate,D.flags|=65536,xe&=-xe,D.lanes|=xe,se=pu(se,z),xe=jg(D.stateNode,se,xe),v4(D,xe),Pa!==4&&(Pa=2)),!1;var Fe=Error(i(520),{cause:se});if(Fe=pu(Fe,z),T1===null?T1=[Fe]:T1.push(Fe),Pa!==4&&(Pa=2),H===null)return!0;se=pu(se,z),z=H;do{switch(z.tag){case 3:return z.flags|=65536,D=xe&-xe,z.lanes|=D,D=jg(z.stateNode,se,D),v4(z,D),!1;case 1:if(H=z.type,Fe=z.stateNode,(z.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||Fe!==null&&typeof Fe.componentDidCatch=="function"&&(qI===null||!qI.has(Fe))))return z.flags|=65536,xe&=-xe,z.lanes|=xe,xe=qC(xe),Kd(xe,D,z,se),v4(z,xe),!1}z=z.return}while(z!==null);return!1}var yc=Error(i(461)),cs=!1;function Jn(D,H,z,se){H.child=D===null?Pm(H,null,z,se):pg(H,D.child,z,se)}function c8(D,H,z,se,xe){z=z.render;var Fe=H.ref;if("ref"in se){var pt={};for(var St in se)St!=="ref"&&(pt[St]=se[St])}else pt=se;return x1(H),se=Eh(D,H,z,pt,Fe,xe),St=Sm(),D!==null&&!cs?(w2(D,H,xe),bl(D,H,xe)):(uA&&St&&PI(H),H.flags|=1,Jn(D,H,se,xe),H.child)}function wf(D,H,z,se,xe){if(D===null){var Fe=z.type;return typeof Fe=="function"&&!Vg(Fe)&&Fe.defaultProps===void 0&&z.compare===null?(H.tag=15,H.type=Fe,XC(D,H,Fe,se,xe)):(D=Zo(z.type,null,se,H,H.mode,xe),D.ref=H.ref,D.return=H,H.child=D)}if(Fe=D.child,!Vd(D,xe)){var pt=Fe.memoizedProps;if(z=z.compare,z=z!==null?z:fh,z(pt,se)&&D.ref===H.ref)return bl(D,H,xe)}return H.flags|=1,D=op(Fe,se),D.ref=H.ref,D.return=H,H.child=D}function XC(D,H,z,se,xe){if(D!==null){var Fe=D.memoizedProps;if(fh(Fe,se)&&D.ref===H.ref)if(cs=!1,H.pendingProps=se=Fe,Vd(D,xe))(D.flags&131072)!==0&&(cs=!0);else return H.lanes=D.lanes,bl(D,H,xe)}return Ig(D,H,z,se,xe)}function fg(D,H,z){var se=H.pendingProps,xe=se.children,Fe=D!==null?D.memoizedState:null;if(se.mode==="hidden"){if((H.flags&128)!==0){if(se=Fe!==null?Fe.baseLanes|z:z,D!==null){for(xe=H.child=D.child,Fe=0;xe!==null;)Fe=Fe|xe.lanes|xe.childLanes,xe=xe.sibling;H.childLanes=Fe&~se}else H.childLanes=0,H.child=null;return Y2(D,H,se,z)}if((z&536870912)!==0)H.memoizedState={baseLanes:0,cachePool:null},D!==null&&b2(H,Fe!==null?Fe.cachePool:null),Fe!==null?CA(H,Fe):x0(),w1(H);else return H.lanes=H.childLanes=536870912,Y2(D,H,Fe!==null?Fe.baseLanes|z:z,z)}else Fe!==null?(b2(H,Fe.cachePool),CA(H,Fe),a0(),H.memoizedState=null):(D!==null&&b2(H,null),x0(),a0());return Jn(D,H,xe,z),H.child}function Y2(D,H,z,se){var xe=ma();return xe=xe===null?null:{parent:qs._currentValue,pool:xe},H.memoizedState={baseLanes:z,cachePool:xe},D!==null&&b2(H,null),x0(),w1(H),D!==null&&DI(D,H,se,!0),null}function _u(D,H){var z=H.ref;if(z===null)D!==null&&D.ref!==null&&(H.flags|=4194816);else{if(typeof z!="function"&&typeof z!="object")throw Error(i(284));(D===null||D.ref!==z)&&(H.flags|=4194816)}}function Ig(D,H,z,se,xe){return x1(H),z=Eh(D,H,z,se,void 0,xe),se=Sm(),D!==null&&!cs?(w2(D,H,xe),bl(D,H,xe)):(uA&&se&&PI(H),H.flags|=1,Jn(D,H,z,xe),H.child)}function s5(D,H,z,se,xe,Fe){return x1(H),H.updateQueue=null,z=w4(H,se,z,xe),B_(D),se=Sm(),D!==null&&!cs?(w2(D,H,Fe),bl(D,H,Fe)):(uA&&se&&PI(H),H.flags|=1,Jn(D,H,z,Fe),H.child)}function f3(D,H,z,se,xe){if(x1(H),H.stateNode===null){var Fe=Np,pt=z.contextType;typeof pt=="object"&&pt!==null&&(Fe=dg(pt)),Fe=new z(se,Fe),H.memoizedState=Fe.state!==null&&Fe.state!==void 0?Fe.state:null,Fe.updater=P1,H.stateNode=Fe,Fe._reactInternals=H,Fe=H.stateNode,Fe.props=se,Fe.state=H.memoizedState,Fe.refs={},u3(H),pt=z.contextType,Fe.context=typeof pt=="object"&&pt!==null?dg(pt):Np,Fe.state=H.memoizedState,pt=z.getDerivedStateFromProps,typeof pt=="function"&&(Al(H,z,pt,se),Fe.state=H.memoizedState),typeof z.getDerivedStateFromProps=="function"||typeof Fe.getSnapshotBeforeUpdate=="function"||typeof Fe.UNSAFE_componentWillMount!="function"&&typeof Fe.componentWillMount!="function"||(pt=Fe.state,typeof Fe.componentWillMount=="function"&&Fe.componentWillMount(),typeof Fe.UNSAFE_componentWillMount=="function"&&Fe.UNSAFE_componentWillMount(),pt!==Fe.state&&P1.enqueueReplaceState(Fe,Fe.state,null),Bm(H,se,Fe,xe),VC(),Fe.state=H.memoizedState),typeof Fe.componentDidMount=="function"&&(H.flags|=4194308),se=!0}else if(D===null){Fe=H.stateNode;var St=H.memoizedProps,on=A0(z,St);Fe.props=on;var Pn=Fe.context,Zn=z.contextType;pt=Np,typeof Zn=="object"&&Zn!==null&&(pt=dg(Zn));var Qo=z.getDerivedStateFromProps;Zn=typeof Qo=="function"||typeof Fe.getSnapshotBeforeUpdate=="function",St=H.pendingProps!==St,Zn||typeof Fe.UNSAFE_componentWillReceiveProps!="function"&&typeof Fe.componentWillReceiveProps!="function"||(St||Pn!==pt)&&Gp(H,Fe,se,pt),ap=!1;var Gn=H.memoizedState;Fe.state=Gn,Bm(H,se,Fe,xe),VC(),Pn=H.memoizedState,St||Gn!==Pn||ap?(typeof Qo=="function"&&(Al(H,z,Qo,se),Pn=H.memoizedState),(on=ap||Wc(H,z,on,se,Gn,Pn,pt))?(Zn||typeof Fe.UNSAFE_componentWillMount!="function"&&typeof Fe.componentWillMount!="function"||(typeof Fe.componentWillMount=="function"&&Fe.componentWillMount(),typeof Fe.UNSAFE_componentWillMount=="function"&&Fe.UNSAFE_componentWillMount()),typeof Fe.componentDidMount=="function"&&(H.flags|=4194308)):(typeof Fe.componentDidMount=="function"&&(H.flags|=4194308),H.memoizedProps=se,H.memoizedState=Pn),Fe.props=se,Fe.state=Pn,Fe.context=pt,se=on):(typeof Fe.componentDidMount=="function"&&(H.flags|=4194308),se=!1)}else{Fe=H.stateNode,Q2(D,H),pt=H.memoizedProps,Zn=A0(z,pt),Fe.props=Zn,Qo=H.pendingProps,Gn=Fe.context,Pn=z.contextType,on=Np,typeof Pn=="object"&&Pn!==null&&(on=dg(Pn)),St=z.getDerivedStateFromProps,(Pn=typeof St=="function"||typeof Fe.getSnapshotBeforeUpdate=="function")||typeof Fe.UNSAFE_componentWillReceiveProps!="function"&&typeof Fe.componentWillReceiveProps!="function"||(pt!==Qo||Gn!==on)&&Gp(H,Fe,se,on),ap=!1,Gn=H.memoizedState,Fe.state=Gn,Bm(H,se,Fe,xe),VC();var jn=H.memoizedState;pt!==Qo||Gn!==jn||ap||D!==null&&D.dependencies!==null&&y2(D.dependencies)?(typeof St=="function"&&(Al(H,z,St,se),jn=H.memoizedState),(Zn=ap||Wc(H,z,Zn,se,Gn,jn,on)||D!==null&&D.dependencies!==null&&y2(D.dependencies))?(Pn||typeof Fe.UNSAFE_componentWillUpdate!="function"&&typeof Fe.componentWillUpdate!="function"||(typeof Fe.componentWillUpdate=="function"&&Fe.componentWillUpdate(se,jn,on),typeof Fe.UNSAFE_componentWillUpdate=="function"&&Fe.UNSAFE_componentWillUpdate(se,jn,on)),typeof Fe.componentDidUpdate=="function"&&(H.flags|=4),typeof Fe.getSnapshotBeforeUpdate=="function"&&(H.flags|=1024)):(typeof Fe.componentDidUpdate!="function"||pt===D.memoizedProps&&Gn===D.memoizedState||(H.flags|=4),typeof Fe.getSnapshotBeforeUpdate!="function"||pt===D.memoizedProps&&Gn===D.memoizedState||(H.flags|=1024),H.memoizedProps=se,H.memoizedState=jn),Fe.props=se,Fe.state=jn,Fe.context=on,se=Zn):(typeof Fe.componentDidUpdate!="function"||pt===D.memoizedProps&&Gn===D.memoizedState||(H.flags|=4),typeof Fe.getSnapshotBeforeUpdate!="function"||pt===D.memoizedProps&&Gn===D.memoizedState||(H.flags|=1024),se=!1)}return Fe=se,_u(D,H),se=(H.flags&128)!==0,Fe||se?(Fe=H.stateNode,z=se&&typeof z.getDerivedStateFromError!="function"?null:Fe.render(),H.flags|=1,D!==null&&se?(H.child=pg(H,D.child,null,xe),H.child=pg(H,null,z,xe)):Jn(D,H,z,xe),H.memoizedState=Fe.state,D=H.child):D=bl(D,H,xe),D}function ZC(D,H,z,se){return MI(),H.flags|=256,Jn(D,H,z,se),H.child}var I3={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pf(D){return{baseLanes:D,cachePool:Hd()}}function UI(D,H,z){return D=D!==null?D.childLanes&~z:0,H&&(D|=xg),D}function C3(D,H,z){var se=H.pendingProps,xe=!1,Fe=(H.flags&128)!==0,pt;if((pt=Fe)||(pt=D!==null&&D.memoizedState===null?!1:(ai.current&2)!==0),pt&&(xe=!0,H.flags&=-129),pt=(H.flags&32)!==0,H.flags&=-33,D===null){if(uA){if(xe?Ys(H):a0(),uA){var St=IA,on;if(on=St){e:{for(on=St,St=kp;on.nodeType!==8;){if(!St){St=null;break e}if(on=km(on.nextSibling),on===null){St=null;break e}}St=on}St!==null?(H.memoizedState={dehydrated:St,treeContext:oc!==null?{id:gg,overflow:Cc}:null,retryLane:536870912,hydrationErrors:null},on=V0(18,null,null,0),on.stateNode=St,on.return=H,H.child=on,rl=H,IA=null,on=!0):on=!1}on||xm(H)}if(St=H.memoizedState,St!==null&&(St=St.dehydrated,St!==null))return m9(St)?H.lanes=32:H.lanes=536870912,null;al(H)}return St=se.children,se=se.fallback,xe?(a0(),xe=H.mode,St=E0({mode:"hidden",children:St},xe),se=ip(se,xe,z,null),St.return=H,se.return=H,St.sibling=se,H.child=St,xe=H.child,xe.memoizedState=Pf(z),xe.childLanes=UI(D,pt,z),H.memoizedState=I3,se):(Ys(H),KI(H,St))}if(on=D.memoizedState,on!==null&&(St=on.dehydrated,St!==null)){if(Fe)H.flags&256?(Ys(H),H.flags&=-257,H=jc(D,H,z)):H.memoizedState!==null?(a0(),H.child=D.child,H.flags|=128,H=null):(a0(),xe=se.fallback,St=H.mode,se=E0({mode:"visible",children:se.children},St),xe=ip(xe,St,z,null),xe.flags|=2,se.return=H,xe.return=H,se.sibling=xe,H.child=se,pg(H,D.child,null,z),se=H.child,se.memoizedState=Pf(z),se.childLanes=UI(D,pt,z),H.memoizedState=I3,H=xe);else if(Ys(H),m9(St)){if(pt=St.nextSibling&&St.nextSibling.dataset,pt)var Pn=pt.dgst;pt=Pn,se=Error(i(419)),se.stack="",se.digest=pt,GC({value:se,source:null,stack:null}),H=jc(D,H,z)}else if(cs||DI(D,H,z,!1),pt=(z&D.childLanes)!==0,cs||pt){if(pt=Lc,pt!==null&&(se=z&-z,se=(se&42)!==0?1:dt(se),se=(se&(pt.suspendedLanes|z))!==0?0:se,se!==0&&se!==on.retryLane))throw on.retryLane=se,Kg(D,se),Sl(pt,D,se),yc;St.data==="$?"||Wp(),H=jc(D,H,z)}else St.data==="$?"?(H.flags|=192,H.child=D.child,H=null):(D=on.treeContext,IA=km(St.nextSibling),rl=H,uA=!0,ym=null,kp=!1,D!==null&&(rp[Rp++]=gg,rp[Rp++]=Cc,rp[Rp++]=oc,gg=D.id,Cc=D.overflow,oc=H),H=KI(H,se.children),H.flags|=4096);return H}return xe?(a0(),xe=se.fallback,St=H.mode,on=D.child,Pn=on.sibling,se=op(on,{mode:"hidden",children:se.children}),se.subtreeFlags=on.subtreeFlags&65011712,Pn!==null?xe=op(Pn,xe):(xe=ip(xe,St,z,null),xe.flags|=2),xe.return=H,se.return=H,se.sibling=xe,H.child=se,se=xe,xe=H.child,St=D.child.memoizedState,St===null?St=Pf(z):(on=St.cachePool,on!==null?(Pn=qs._currentValue,on=on.parent!==Pn?{parent:Pn,pool:Pn}:on):on=Hd(),St={baseLanes:St.baseLanes|z,cachePool:on}),xe.memoizedState=St,xe.childLanes=UI(D,pt,z),H.memoizedState=I3,se):(Ys(H),z=D.child,D=z.sibling,z=op(z,{mode:"visible",children:se.children}),z.return=H,z.sibling=null,D!==null&&(pt=H.deletions,pt===null?(H.deletions=[D],H.flags|=16):pt.push(D)),H.child=z,H.memoizedState=null,z)}function KI(D,H){return H=E0({mode:"visible",children:H},D.mode),H.return=D,D.child=H}function E0(D,H){return D=V0(22,D,null,H),D.lanes=0,D.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},D}function jc(D,H,z){return pg(H,D.child,null,z),D=KI(H,H.pendingProps.children),D.flags|=2,H.memoizedState=null,D}function cl(D,H,z){D.lanes|=H;var se=D.alternate;se!==null&&(se.lanes|=H),C2(D.return,H,z)}function Ou(D,H,z,se,xe){var Fe=D.memoizedState;Fe===null?D.memoizedState={isBackwards:H,rendering:null,renderingStartTime:0,last:se,tail:z,tailMode:xe}:(Fe.isBackwards=H,Fe.rendering=null,Fe.renderingStartTime=0,Fe.last=se,Fe.tail=z,Fe.tailMode=xe)}function B0(D,H,z){var se=H.pendingProps,xe=se.revealOrder,Fe=se.tail;if(Jn(D,H,se.children,z),se=ai.current,(se&2)!==0)se=se&1|2,H.flags|=128;else{if(D!==null&&(D.flags&128)!==0)e:for(D=H.child;D!==null;){if(D.tag===13)D.memoizedState!==null&&cl(D,z,H);else if(D.tag===19)cl(D,z,H);else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===H)break e;for(;D.sibling===null;){if(D.return===null||D.return===H)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}se&=1}switch(ie(ai,se),xe){case"forwards":for(z=H.child,xe=null;z!==null;)D=z.alternate,D!==null&&v_(D)===null&&(xe=z),z=z.sibling;z=xe,z===null?(xe=H.child,H.child=null):(xe=z.sibling,z.sibling=null),Ou(H,!1,xe,z,Fe);break;case"backwards":for(z=null,xe=H.child,H.child=null;xe!==null;){if(D=xe.alternate,D!==null&&v_(D)===null){H.child=xe;break}D=xe.sibling,xe.sibling=z,z=xe,xe=D}Ou(H,!0,z,null,Fe);break;case"together":Ou(H,!1,null,null,void 0);break;default:H.memoizedState=null}return H.child}function bl(D,H,z){if(D!==null&&(H.dependencies=D.dependencies),qc|=H.lanes,(z&H.childLanes)===0)if(D!==null){if(DI(D,H,z,!1),(z&H.childLanes)===0)return null}else return null;if(D!==null&&H.child!==D.child)throw Error(i(153));if(H.child!==null){for(D=H.child,z=op(D,D.pendingProps),H.child=z,z.return=H;D.sibling!==null;)D=D.sibling,z=z.sibling=op(D,D.pendingProps),z.return=H;z.sibling=null}return H.child}function Vd(D,H){return(D.lanes&H)!==0?!0:(D=D.dependencies,!!(D!==null&&y2(D)))}function za(D,H,z){switch(H.tag){case 3:ue(H,H.stateNode.containerInfo),sp(H,qs,D.memoizedState.cache),MI();break;case 27:case 5:pe(H);break;case 4:ue(H,H.stateNode.containerInfo);break;case 10:sp(H,H.type,H.memoizedProps.value);break;case 13:var se=H.memoizedState;if(se!==null)return se.dehydrated!==null?(Ys(H),H.flags|=128,null):(z&H.child.childLanes)!==0?C3(D,H,z):(Ys(H),D=bl(D,H,z),D!==null?D.sibling:null);Ys(H);break;case 19:var xe=(D.flags&128)!==0;if(se=(z&H.childLanes)!==0,se||(DI(D,H,z,!1),se=(z&H.childLanes)!==0),xe){if(se)return B0(D,H,z);H.flags|=128}if(xe=H.memoizedState,xe!==null&&(xe.rendering=null,xe.tail=null,xe.lastEffect=null),ie(ai,ai.current),se)break;return null;case 22:case 23:return H.lanes=0,fg(D,H,z);case 24:sp(H,qs,D.memoizedState.cache)}return bl(D,H,z)}function $g(D,H,z){if(D!==null)if(D.memoizedProps!==H.pendingProps)cs=!0;else{if(!Vd(D,z)&&(H.flags&128)===0)return cs=!1,za(D,H,z);cs=(D.flags&131072)!==0}else cs=!1,uA&&(H.flags&1048576)!==0&&c3(H,wI,H.index);switch(H.lanes=0,H.tag){case 16:e:{D=H.pendingProps;var se=H.elementType,xe=se._init;if(se=xe(se._payload),H.type=se,typeof se=="function")Vg(se)?(D=A0(se,D),H.tag=1,H=f3(null,H,se,D,z)):(H.tag=0,H=Ig(null,H,se,D,z));else{if(se!=null){if(xe=se.$$typeof,xe===y){H.tag=11,H=c8(null,H,se,D,z);break e}else if(xe===B){H.tag=14,H=wf(null,H,se,D,z);break e}}throw H=F(se)||se,Error(i(306,H,""))}}return H;case 0:return Ig(D,H,H.type,H.pendingProps,z);case 1:return se=H.type,xe=A0(se,H.pendingProps),f3(D,H,se,xe,z);case 3:e:{if(ue(H,H.stateNode.containerInfo),D===null)throw Error(i(387));se=H.pendingProps;var Fe=H.memoizedState;xe=Fe.element,Q2(D,H),Bm(H,se,null,z);var pt=H.memoizedState;if(se=pt.cache,sp(H,qs,se),se!==Fe.cache&&$s(H,[qs],z,!0),VC(),se=pt.element,Fe.isDehydrated)if(Fe={element:se,isDehydrated:!1,cache:pt.cache},H.updateQueue.baseState=Fe,H.memoizedState=Fe,H.flags&256){H=ZC(D,H,se,z);break e}else if(se!==xe){xe=pu(Error(i(424)),H),GC(xe),H=ZC(D,H,se,z);break e}else for(D=H.stateNode.containerInfo,D.nodeType===9?D=D.body:D=D.nodeName==="HTML"?D.ownerDocument.body:D,IA=km(D.firstChild),rl=H,uA=!0,ym=null,kp=!0,z=Pm(H,null,se,z),H.child=z;z;)z.flags=z.flags&-3|4096,z=z.sibling;else{if(MI(),se===xe){H=bl(D,H,z);break e}Jn(D,H,se,z)}H=H.child}return H;case 26:return _u(D,H),D===null?(z=Hf(H.type,null,H.pendingProps,null))?H.memoizedState=z:uA||(z=H.type,D=H.pendingProps,se=Tm(ge.current).createElement(z),se[yn]=H,se[An]=D,_s(se,z,D),Zt(se),H.stateNode=se):H.memoizedState=Hf(H.type,D.memoizedProps,H.pendingProps,D.memoizedState),null;case 27:return pe(H),D===null&&uA&&(se=H.stateNode=Pi(H.type,H.pendingProps,ge.current),rl=H,kp=!0,xe=IA,ay(H.type)?(jd=xe,IA=km(se.firstChild)):IA=xe),Jn(D,H,H.pendingProps.children,z),_u(D,H),D===null&&(H.flags|=4194304),H.child;case 5:return D===null&&uA&&((xe=se=IA)&&(se=Q3(se,H.type,H.pendingProps,kp),se!==null?(H.stateNode=se,rl=H,IA=km(se.firstChild),kp=!1,xe=!0):xe=!1),xe||xm(H)),pe(H),xe=H.type,Fe=H.pendingProps,pt=D!==null?D.memoizedProps:null,se=Fe.children,$p(xe,Fe)?se=null:pt!==null&&$p(xe,pt)&&(H.flags|=32),H.memoizedState!==null&&(xe=Eh(D,H,J0,null,null,z),nd._currentValue=xe),_u(D,H),Jn(D,H,se,z),H.child;case 6:return D===null&&uA&&((D=z=IA)&&(z=m5(z,H.pendingProps,kp),z!==null?(H.stateNode=z,rl=H,IA=null,D=!0):D=!1),D||xm(H)),null;case 13:return C3(D,H,z);case 4:return ue(H,H.stateNode.containerInfo),se=H.pendingProps,D===null?H.child=pg(H,null,se,z):Jn(D,H,se,z),H.child;case 11:return c8(D,H,H.type,H.pendingProps,z);case 7:return Jn(D,H,H.pendingProps,z),H.child;case 8:return Jn(D,H,H.pendingProps.children,z),H.child;case 12:return Jn(D,H,H.pendingProps.children,z),H.child;case 10:return se=H.pendingProps,sp(H,H.type,se.value),Jn(D,H,se.children,z),H.child;case 9:return xe=H.type._context,se=H.pendingProps.children,x1(H),xe=dg(xe),se=se(xe),H.flags|=1,Jn(D,H,se,z),H.child;case 14:return wf(D,H,H.type,H.pendingProps,z);case 15:return XC(D,H,H.type,H.pendingProps,z);case 19:return B0(D,H,z);case 31:return se=H.pendingProps,z=H.mode,se={mode:se.mode,children:se.children},D===null?(z=E0(se,z),z.ref=H.ref,H.child=z,z.return=H,H=z):(z=op(D.child,se),z.ref=H.ref,H.child=z,z.return=H,H=z),H;case 22:return fg(D,H,z);case 24:return x1(H),se=dg(qs),D===null?(xe=ma(),xe===null&&(xe=Lc,Fe=RI(),xe.pooledCache=Fe,Fe.refCount++,Fe!==null&&(xe.pooledCacheLanes|=z),xe=Fe),H.memoizedState={parent:se,cache:xe},u3(H),sp(H,qs,xe)):((D.lanes&z)!==0&&(Q2(D,H),Bm(H,null,null,z),VC()),xe=D.memoizedState,Fe=H.memoizedState,xe.parent!==se?(xe={parent:se,cache:se},H.memoizedState=xe,H.lanes===0&&(H.memoizedState=H.updateQueue.baseState=xe),sp(H,qs,se)):(se=Fe.cache,sp(H,qs,se),se!==xe.cache&&$s(H,[qs],z,!0))),Jn(D,H,H.pendingProps.children,z),H.child;case 29:throw H.pendingProps}throw Error(i(156,H.tag))}function Xa(D){D.flags|=4}function Za(D,H){if(H.type!=="stylesheet"||(H.state.loading&4)!==0)D.flags&=-16777217;else if(D.flags|=16777216,!f9(H)){if(H=Op.current,H!==null&&((Ja&4194048)===Ja?Sh!==null:(Ja&62914560)!==Ja&&(Ja&536870912)===0||H!==Sh))throw KC=B1,kI;D.flags|=8192}}function Vs(D,H){H!==null&&(D.flags|=4),D.flags&16384&&(H=D.tag!==22?Bt():536870912,D.lanes|=H,$I|=H)}function fu(D,H){if(!uA)switch(D.tailMode){case"hidden":H=D.tail;for(var z=null;H!==null;)H.alternate!==null&&(z=H),H=H.sibling;z===null?D.tail=null:z.sibling=null;break;case"collapsed":z=D.tail;for(var se=null;z!==null;)z.alternate!==null&&(se=z),z=z.sibling;se===null?H||D.tail===null?D.tail=null:D.tail.sibling=null:se.sibling=null}}function Si(D){var H=D.alternate!==null&&D.alternate.child===D.child,z=0,se=0;if(H)for(var xe=D.child;xe!==null;)z|=xe.lanes|xe.childLanes,se|=xe.subtreeFlags&65011712,se|=xe.flags&65011712,xe.return=D,xe=xe.sibling;else for(xe=D.child;xe!==null;)z|=xe.lanes|xe.childLanes,se|=xe.subtreeFlags,se|=xe.flags,xe.return=D,xe=xe.sibling;return D.subtreeFlags|=se,D.childLanes=z,H}function lp(D,H,z){var se=H.pendingProps;switch(Tp(H),H.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Si(H),null;case 1:return Si(H),null;case 3:return z=H.stateNode,se=null,D!==null&&(se=D.memoizedState.cache),H.memoizedState.cache!==se&&(H.flags|=2048),xf(qs),fe(),z.pendingContext&&(z.context=z.pendingContext,z.pendingContext=null),(D===null||D.child===null)&&(I_(H)?Xa(H):D===null||D.memoizedState.isDehydrated&&(H.flags&256)===0||(H.flags|=1024,VE())),Si(H),null;case 26:return z=H.memoizedState,D===null?(Xa(H),z!==null?(Si(H),Za(H,z)):(Si(H),H.flags&=-16777217)):z?z!==D.memoizedState?(Xa(H),Si(H),Za(H,z)):(Si(H),H.flags&=-16777217):(D.memoizedProps!==se&&Xa(H),Si(H),H.flags&=-16777217),null;case 27:ye(H),z=ge.current;var xe=H.type;if(D!==null&&H.stateNode!=null)D.memoizedProps!==se&&Xa(H);else{if(!se){if(H.stateNode===null)throw Error(i(166));return Si(H),null}D=ne.current,I_(H)?I2(H):(D=Pi(xe,se,z),H.stateNode=D,Xa(H))}return Si(H),null;case 5:if(ye(H),z=H.type,D!==null&&H.stateNode!=null)D.memoizedProps!==se&&Xa(H);else{if(!se){if(H.stateNode===null)throw Error(i(166));return Si(H),null}if(D=ne.current,I_(H))I2(H);else{switch(xe=Tm(ge.current),D){case 1:D=xe.createElementNS("http://www.w3.org/2000/svg",z);break;case 2:D=xe.createElementNS("http://www.w3.org/1998/Math/MathML",z);break;default:switch(z){case"svg":D=xe.createElementNS("http://www.w3.org/2000/svg",z);break;case"math":D=xe.createElementNS("http://www.w3.org/1998/Math/MathML",z);break;case"script":D=xe.createElement("div"),D.innerHTML="<script><\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof se.is=="string"?xe.createElement("select",{is:se.is}):xe.createElement("select"),se.multiple?D.multiple=!0:se.size&&(D.size=se.size);break;default:D=typeof se.is=="string"?xe.createElement(z,{is:se.is}):xe.createElement(z)}}D[yn]=H,D[An]=se;e:for(xe=H.child;xe!==null;){if(xe.tag===5||xe.tag===6)D.appendChild(xe.stateNode);else if(xe.tag!==4&&xe.tag!==27&&xe.child!==null){xe.child.return=xe,xe=xe.child;continue}if(xe===H)break e;for(;xe.sibling===null;){if(xe.return===null||xe.return===H)break e;xe=xe.return}xe.sibling.return=xe.return,xe=xe.sibling}H.stateNode=D;e:switch(_s(D,z,se),z){case"button":case"input":case"select":case"textarea":D=!!se.autoFocus;break e;case"img":D=!0;break e;default:D=!1}D&&Xa(H)}}return Si(H),H.flags&=-16777217,null;case 6:if(D&&H.stateNode!=null)D.memoizedProps!==se&&Xa(H);else{if(typeof se!="string"&&H.stateNode===null)throw Error(i(166));if(D=ge.current,I_(H)){if(D=H.stateNode,z=H.memoizedProps,se=null,xe=rl,xe!==null)switch(xe.tag){case 27:case 5:se=xe.memoizedProps}D[yn]=H,D=!!(D.nodeValue===z||se!==null&&se.suppressHydrationWarning===!0||JS(D.nodeValue,z)),D||xm(H)}else D=Tm(D).createTextNode(se),D[yn]=H,H.stateNode=D}return Si(H),null;case 13:if(se=H.memoizedState,D===null||D.memoizedState!==null&&D.memoizedState.dehydrated!==null){if(xe=I_(H),se!==null&&se.dehydrated!==null){if(D===null){if(!xe)throw Error(i(318));if(xe=H.memoizedState,xe=xe!==null?xe.dehydrated:null,!xe)throw Error(i(317));xe[yn]=H}else MI(),(H.flags&128)===0&&(H.memoizedState=null),H.flags|=4;Si(H),xe=!1}else xe=VE(),D!==null&&D.memoizedState!==null&&(D.memoizedState.hydrationErrors=xe),xe=!0;if(!xe)return H.flags&256?(al(H),H):(al(H),null)}if(al(H),(H.flags&128)!==0)return H.lanes=z,H;if(z=se!==null,D=D!==null&&D.memoizedState!==null,z){se=H.child,xe=null,se.alternate!==null&&se.alternate.memoizedState!==null&&se.alternate.memoizedState.cachePool!==null&&(xe=se.alternate.memoizedState.cachePool.pool);var Fe=null;se.memoizedState!==null&&se.memoizedState.cachePool!==null&&(Fe=se.memoizedState.cachePool.pool),Fe!==xe&&(se.flags|=2048)}return z!==D&&z&&(H.child.flags|=8192),Vs(H,H.updateQueue),Si(H),null;case 4:return fe(),D===null&&zS(H.stateNode.containerInfo),Si(H),null;case 10:return xf(H.type),Si(H),null;case 19:if(oe(ai),xe=H.memoizedState,xe===null)return Si(H),null;if(se=(H.flags&128)!==0,Fe=xe.rendering,Fe===null)if(se)fu(xe,!1);else{if(Pa!==0||D!==null&&(D.flags&128)!==0)for(D=H.child;D!==null;){if(Fe=v_(D),Fe!==null){for(H.flags|=128,fu(xe,!1),D=Fe.updateQueue,H.updateQueue=D,Vs(H,D),H.subtreeFlags=0,D=z,z=H.child;z!==null;)bs(z,D),z=z.sibling;return ie(ai,ai.current&1|2),H.child}D=D.sibling}xe.tail!==null&&we()>ty&&(H.flags|=128,se=!0,fu(xe,!1),H.lanes=4194304)}else{if(!se)if(D=v_(Fe),D!==null){if(H.flags|=128,se=!0,D=D.updateQueue,H.updateQueue=D,Vs(H,D),fu(xe,!0),xe.tail===null&&xe.tailMode==="hidden"&&!Fe.alternate&&!uA)return Si(H),null}else 2*we()-xe.renderingStartTime>ty&&z!==536870912&&(H.flags|=128,se=!0,fu(xe,!1),H.lanes=4194304);xe.isBackwards?(Fe.sibling=H.child,H.child=Fe):(D=xe.last,D!==null?D.sibling=Fe:H.child=Fe,xe.last=Fe)}return xe.tail!==null?(H=xe.tail,xe.rendering=H,xe.tail=H.sibling,xe.renderingStartTime=we(),H.sibling=null,D=ai.current,ie(ai,se?D&1|2:D&1),H):(Si(H),null);case 22:case 23:return al(H),zg(),se=H.memoizedState!==null,D!==null?D.memoizedState!==null!==se&&(H.flags|=8192):se&&(H.flags|=8192),se?(z&536870912)!==0&&(H.flags&128)===0&&(Si(H),H.subtreeFlags&6&&(H.flags|=8192)):Si(H),z=H.updateQueue,z!==null&&Vs(H,z.retryQueue),z=null,D!==null&&D.memoizedState!==null&&D.memoizedState.cachePool!==null&&(z=D.memoizedState.cachePool.pool),se=null,H.memoizedState!==null&&H.memoizedState.cachePool!==null&&(se=H.memoizedState.cachePool.pool),se!==z&&(H.flags|=2048),D!==null&&oe(Lp),null;case 24:return z=null,D!==null&&(z=D.memoizedState.cache),H.memoizedState.cache!==z&&(H.flags|=2048),xf(qs),Si(H),null;case 25:return null;case 30:return null}throw Error(i(156,H.tag))}function c0(D,H){switch(Tp(H),H.tag){case 1:return D=H.flags,D&65536?(H.flags=D&-65537|128,H):null;case 3:return xf(qs),fe(),D=H.flags,(D&65536)!==0&&(D&128)===0?(H.flags=D&-65537|128,H):null;case 26:case 27:case 5:return ye(H),null;case 13:if(al(H),D=H.memoizedState,D!==null&&D.dehydrated!==null){if(H.alternate===null)throw Error(i(340));MI()}return D=H.flags,D&65536?(H.flags=D&-65537|128,H):null;case 19:return oe(ai),null;case 4:return fe(),null;case 10:return xf(H.type),null;case 22:case 23:return al(H),zg(),D!==null&&oe(Lp),D=H.flags,D&65536?(H.flags=D&-65537|128,H):null;case 24:return xf(qs),null;case 25:return null;default:return null}}function $c(D,H){switch(Tp(H),H.tag){case 3:xf(qs),fe();break;case 26:case 27:case 5:ye(H);break;case 4:fe();break;case 13:al(H);break;case 19:oe(ai);break;case 10:xf(H.type);break;case 22:case 23:al(H),zg(),D!==null&&oe(Lp);break;case 24:xf(qs)}}function Qh(D,H){try{var z=H.updateQueue,se=z!==null?z.lastEffect:null;if(se!==null){var xe=se.next;z=xe;do{if((z.tag&D)===D){se=void 0;var Fe=z.create,pt=z.inst;se=Fe(),pt.destroy=se}z=z.next}while(z!==xe)}}catch(St){wn(H,H.return,St)}}function Kl(D,H,z){try{var se=H.updateQueue,xe=se!==null?se.lastEffect:null;if(xe!==null){var Fe=xe.next;se=Fe;do{if((se.tag&D)===D){var pt=se.inst,St=pt.destroy;if(St!==void 0){pt.destroy=void 0,xe=H;var on=z,Pn=St;try{Pn()}catch(Zn){wn(xe,on,Zn)}}}se=se.next}while(se!==Fe)}}catch(Zn){wn(H,H.return,Zn)}}function VI(D){var H=D.updateQueue;if(H!==null){var z=D.stateNode;try{v2(H,z)}catch(se){wn(D,D.return,se)}}}function p9(D,H,z){z.props=A0(D.type,D.memoizedProps),z.state=D.memoizedState;try{z.componentWillUnmount()}catch(se){wn(D,H,se)}}function zI(D,H){try{var z=D.ref;if(z!==null){switch(D.tag){case 26:case 27:case 5:var se=D.stateNode;break;case 30:se=D.stateNode;break;default:se=D.stateNode}typeof z=="function"?D.refCleanup=z(se):z.current=se}}catch(xe){wn(D,H,xe)}}function rc(D,H){var z=D.ref,se=D.refCleanup;if(z!==null)if(typeof se=="function")try{se()}catch(xe){wn(D,H,xe)}finally{D.refCleanup=null,D=D.alternate,D!=null&&(D.refCleanup=null)}else if(typeof z=="function")try{z(null)}catch(xe){wn(D,H,xe)}else z.current=null}function b0(D){var H=D.type,z=D.memoizedProps,se=D.stateNode;try{e:switch(H){case"button":case"input":case"select":case"textarea":z.autoFocus&&se.focus();break e;case"img":z.src?se.src=z.src:z.srcSet&&(se.srcset=z.srcSet)}}catch(xe){wn(D,D.return,xe)}}function Mf(D,H,z){try{var se=D.stateNode;u8(se,D.type,z,H),se[An]=H}catch(xe){wn(D,D.return,xe)}}function a5(D){return D.tag===5||D.tag===3||D.tag===26||D.tag===27&&ay(D.type)||D.tag===4}function Cg(D){e:for(;;){for(;D.sibling===null;){if(D.return===null||a5(D.return))return null;D=D.return}for(D.sibling.return=D.return,D=D.sibling;D.tag!==5&&D.tag!==6&&D.tag!==18;){if(D.tag===27&&ay(D.type)||D.flags&2||D.child===null||D.tag===4)continue e;D.child.return=D,D=D.child}if(!(D.flags&2))return D.stateNode}}function Dm(D,H,z){var se=D.tag;if(se===5||se===6)D=D.stateNode,H?(z.nodeType===9?z.body:z.nodeName==="HTML"?z.ownerDocument.body:z).insertBefore(D,H):(H=z.nodeType===9?z.body:z.nodeName==="HTML"?z.ownerDocument.body:z,H.appendChild(D),z=z._reactRootContainer,z!=null||H.onclick!==null||(H.onclick=l8));else if(se!==4&&(se===27&&ay(D.type)&&(z=D.stateNode,H=null),D=D.child,D!==null))for(Dm(D,H,z),D=D.sibling;D!==null;)Dm(D,H,z),D=D.sibling}function JI(D,H,z){var se=D.tag;if(se===5||se===6)D=D.stateNode,H?z.insertBefore(D,H):z.appendChild(D);else if(se!==4&&(se===27&&ay(D.type)&&(z=D.stateNode),D=D.child,D!==null))for(JI(D,H,z),D=D.sibling;D!==null;)JI(D,H,z),D=D.sibling}function ey(D){var H=D.stateNode,z=D.memoizedProps;try{for(var se=D.type,xe=H.attributes;xe.length;)H.removeAttributeNode(xe[0]);_s(H,se,z),H[yn]=D,H[An]=z}catch(Fe){wn(D,D.return,Fe)}}var Nm=!1,ll=!1,WI=!1,A5=typeof WeakSet=="function"?WeakSet:Set,Yi=null;function c5(D,H){if(D=D.containerInfo,Rh=X,D=bI(D),hu(D)){if("selectionStart"in D)var z={start:D.selectionStart,end:D.selectionEnd};else e:{z=(z=D.ownerDocument)&&z.defaultView||window;var se=z.getSelection&&z.getSelection();if(se&&se.rangeCount!==0){z=se.anchorNode;var xe=se.anchorOffset,Fe=se.focusNode;se=se.focusOffset;try{z.nodeType,Fe.nodeType}catch{z=null;break e}var pt=0,St=-1,on=-1,Pn=0,Zn=0,Qo=D,Gn=null;t:for(;;){for(var jn;Qo!==z||xe!==0&&Qo.nodeType!==3||(St=pt+xe),Qo!==Fe||se!==0&&Qo.nodeType!==3||(on=pt+se),Qo.nodeType===3&&(pt+=Qo.nodeValue.length),(jn=Qo.firstChild)!==null;)Gn=Qo,Qo=jn;for(;;){if(Qo===D)break t;if(Gn===z&&++Pn===xe&&(St=pt),Gn===Fe&&++Zn===se&&(on=pt),(jn=Qo.nextSibling)!==null)break;Qo=Gn,Gn=Qo.parentNode}Qo=jn}z=St===-1||on===-1?null:{start:St,end:on}}else z=null}z=z||{start:0,end:0}}else z=null;for(tC={focusedElem:D,selectionRange:z},X=!1,Yi=H;Yi!==null;)if(H=Yi,D=H.child,(H.subtreeFlags&1024)!==0&&D!==null)D.return=H,Yi=D;else for(;Yi!==null;){switch(H=Yi,Fe=H.alternate,D=H.flags,H.tag){case 0:break;case 11:case 15:break;case 1:if((D&1024)!==0&&Fe!==null){D=void 0,z=H,xe=Fe.memoizedProps,Fe=Fe.memoizedState,se=z.stateNode;try{var wr=A0(z.type,xe,z.elementType===z.type);D=se.getSnapshotBeforeUpdate(wr,Fe),se.__reactInternalSnapshotBeforeUpdate=D}catch(br){wn(z,z.return,br)}}break;case 3:if((D&1024)!==0){if(D=H.stateNode.containerInfo,z=D.nodeType,z===9)Y1(D);else if(z===1)switch(D.nodeName){case"HEAD":case"HTML":case"BODY":Y1(D);break;default:D.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((D&1024)!==0)throw Error(i(163))}if(D=H.sibling,D!==null){D.return=H.return,Yi=D;break}Yi=H.return}}function Df(D,H,z){var se=z.flags;switch(z.tag){case 0:case 11:case 15:fa(D,z),se&4&&Qh(5,z);break;case 1:if(fa(D,z),se&4)if(D=z.stateNode,H===null)try{D.componentDidMount()}catch(pt){wn(z,z.return,pt)}else{var xe=A0(z.type,H.memoizedProps);H=H.memoizedState;try{D.componentDidUpdate(xe,H,D.__reactInternalSnapshotBeforeUpdate)}catch(pt){wn(z,z.return,pt)}}se&64&&VI(z),se&512&&zI(z,z.return);break;case 3:if(fa(D,z),se&64&&(D=z.updateQueue,D!==null)){if(H=null,z.child!==null)switch(z.child.tag){case 27:case 5:H=z.child.stateNode;break;case 1:H=z.child.stateNode}try{v2(D,H)}catch(pt){wn(z,z.return,pt)}}break;case 27:H===null&&se&4&&ey(z);case 26:case 5:fa(D,z),H===null&&se&4&&b0(z),se&512&&zI(z,z.return);break;case 12:fa(D,z);break;case 13:fa(D,z),se&4&&D1(D,z),se&64&&(D=z.memoizedState,D!==null&&(D=D.dehydrated,D!==null&&(z=Ni.bind(null,z),nC(D,z))));break;case 22:if(se=z.memoizedState!==null||Nm,!se){H=H!==null&&H.memoizedState!==null||ll,xe=Nm;var Fe=ll;Nm=se,(ll=H)&&!Fe?Rm(D,z,(z.subtreeFlags&8772)!==0):fa(D,z),Nm=xe,ll=Fe}break;case 30:break;default:fa(D,z)}}function M1(D){var H=D.alternate;H!==null&&(D.alternate=null,M1(H)),D.child=null,D.deletions=null,D.sibling=null,D.tag===5&&(H=D.stateNode,H!==null&&Ho(H)),D.stateNode=null,D.return=null,D.dependencies=null,D.memoizedProps=null,D.memoizedState=null,D.pendingProps=null,D.stateNode=null,D.updateQueue=null}var ul=null,Iu=!1;function yg(D,H,z){for(z=z.child;z!==null;)ss(D,H,z),z=z.sibling}function ss(D,H,z){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(At,z)}catch{}switch(z.tag){case 26:ll||rc(z,H),yg(D,H,z),z.memoizedState?z.memoizedState.count--:z.stateNode&&(z=z.stateNode,z.parentNode.removeChild(z));break;case 27:ll||rc(z,H);var se=ul,xe=Iu;ay(z.type)&&(ul=z.stateNode,Iu=!1),yg(D,H,z),Zg(z.stateNode),ul=se,Iu=xe;break;case 5:ll||rc(z,H);case 6:if(se=ul,xe=Iu,ul=null,yg(D,H,z),ul=se,Iu=xe,ul!==null)if(Iu)try{(ul.nodeType===9?ul.body:ul.nodeName==="HTML"?ul.ownerDocument.body:ul).removeChild(z.stateNode)}catch(Fe){wn(z,H,Fe)}else try{ul.removeChild(z.stateNode)}catch(Fe){wn(z,H,Fe)}break;case 18:ul!==null&&(Iu?(D=ul,Ay(D.nodeType===9?D.body:D.nodeName==="HTML"?D.ownerDocument.body:D,z.stateNode),Lm(D)):Ay(ul,z.stateNode));break;case 4:se=ul,xe=Iu,ul=z.stateNode.containerInfo,Iu=!0,yg(D,H,z),ul=se,Iu=xe;break;case 0:case 11:case 14:case 15:ll||Kl(2,z,H),ll||Kl(4,z,H),yg(D,H,z);break;case 1:ll||(rc(z,H),se=z.stateNode,typeof se.componentWillUnmount=="function"&&p9(z,H,se)),yg(D,H,z);break;case 21:yg(D,H,z);break;case 22:ll=(se=ll)||z.memoizedState!==null,yg(D,H,z),ll=se;break;default:yg(D,H,z)}}function D1(D,H){if(H.memoizedState===null&&(D=H.alternate,D!==null&&(D=D.memoizedState,D!==null&&(D=D.dehydrated,D!==null))))try{Lm(D)}catch(z){wn(H,H.return,z)}}function l5(D){switch(D.tag){case 13:case 19:var H=D.stateNode;return H===null&&(H=D.stateNode=new A5),H;case 22:return D=D.stateNode,H=D._retryCache,H===null&&(H=D._retryCache=new A5),H;default:throw Error(i(435,D.tag))}}function Yp(D,H){var z=l5(D);H.forEach(function(se){var xe=Xs.bind(null,D,se);z.has(se)||(z.add(se),se.then(xe,xe))})}function zd(D,H){var z=H.deletions;if(z!==null)for(var se=0;se<z.length;se++){var xe=z[se],Fe=D,pt=H,St=pt;e:for(;St!==null;){switch(St.tag){case 27:if(ay(St.type)){ul=St.stateNode,Iu=!1;break e}break;case 5:ul=St.stateNode,Iu=!1;break e;case 3:case 4:ul=St.stateNode.containerInfo,Iu=!0;break e}St=St.return}if(ul===null)throw Error(i(160));ss(Fe,pt,xe),ul=null,Iu=!1,Fe=xe.alternate,Fe!==null&&(Fe.return=null),xe.return=null}if(H.subtreeFlags&13878)for(H=H.child;H!==null;)Nf(H,D),H=H.sibling}var Gu=null;function Nf(D,H){var z=D.alternate,se=D.flags;switch(D.tag){case 0:case 11:case 14:case 15:zd(H,D),Fc(D),se&4&&(Kl(3,D,D.return),Qh(3,D),Kl(5,D,D.return));break;case 1:zd(H,D),Fc(D),se&512&&(ll||z===null||rc(z,z.return)),se&64&&Nm&&(D=D.updateQueue,D!==null&&(se=D.callbacks,se!==null&&(z=D.shared.hiddenCallbacks,D.shared.hiddenCallbacks=z===null?se:z.concat(se))));break;case 26:var xe=Gu;if(zd(H,D),Fc(D),se&512&&(ll||z===null||rc(z,z.return)),se&4){var Fe=z!==null?z.memoizedState:null;if(se=D.memoizedState,z===null)if(se===null)if(D.stateNode===null){e:{se=D.type,z=D.memoizedProps,xe=xe.ownerDocument||xe;t:switch(se){case"title":Fe=xe.getElementsByTagName("title")[0],(!Fe||Fe[Lt]||Fe[yn]||Fe.namespaceURI==="http://www.w3.org/2000/svg"||Fe.hasAttribute("itemprop"))&&(Fe=xe.createElement(se),xe.head.insertBefore(Fe,xe.querySelector("head > title"))),_s(Fe,se,z),Fe[yn]=D,Zt(Fe),se=Fe;break e;case"link":var pt=X2("link","href",xe).get(se+(z.href||""));if(pt){for(var St=0;St<pt.length;St++)if(Fe=pt[St],Fe.getAttribute("href")===(z.href==null||z.href===""?null:z.href)&&Fe.getAttribute("rel")===(z.rel==null?null:z.rel)&&Fe.getAttribute("title")===(z.title==null?null:z.title)&&Fe.getAttribute("crossorigin")===(z.crossOrigin==null?null:z.crossOrigin)){pt.splice(St,1);break t}}Fe=xe.createElement(se),_s(Fe,se,z),xe.head.appendChild(Fe);break;case"meta":if(pt=X2("meta","content",xe).get(se+(z.content||""))){for(St=0;St<pt.length;St++)if(Fe=pt[St],Fe.getAttribute("content")===(z.content==null?null:""+z.content)&&Fe.getAttribute("name")===(z.name==null?null:z.name)&&Fe.getAttribute("property")===(z.property==null?null:z.property)&&Fe.getAttribute("http-equiv")===(z.httpEquiv==null?null:z.httpEquiv)&&Fe.getAttribute("charset")===(z.charSet==null?null:z.charSet)){pt.splice(St,1);break t}}Fe=xe.createElement(se),_s(Fe,se,z),xe.head.appendChild(Fe);break;default:throw Error(i(468,se))}Fe[yn]=D,Zt(Fe),se=Fe}D.stateNode=se}else Z2(xe,D.type,D.stateNode);else D.stateNode=q2(xe,se,D.memoizedProps);else Fe!==se?(Fe===null?z.stateNode!==null&&(z=z.stateNode,z.parentNode.removeChild(z)):Fe.count--,se===null?Z2(xe,D.type,D.stateNode):q2(xe,se,D.memoizedProps)):se===null&&D.stateNode!==null&&Mf(D,D.memoizedProps,z.memoizedProps)}break;case 27:zd(H,D),Fc(D),se&512&&(ll||z===null||rc(z,z.return)),z!==null&&se&4&&Mf(D,D.memoizedProps,z.memoizedProps);break;case 5:if(zd(H,D),Fc(D),se&512&&(ll||z===null||rc(z,z.return)),D.flags&32){xe=D.stateNode;try{En(xe,"")}catch(jn){wn(D,D.return,jn)}}se&4&&D.stateNode!=null&&(xe=D.memoizedProps,Mf(D,xe,z!==null?z.memoizedProps:xe)),se&1024&&(WI=!0);break;case 6:if(zd(H,D),Fc(D),se&4){if(D.stateNode===null)throw Error(i(162));se=D.memoizedProps,z=D.stateNode;try{z.nodeValue=se}catch(jn){wn(D,D.return,jn)}}break;case 3:if(Gf=null,xe=Gu,Gu=cy(H.containerInfo),zd(H,D),Gu=xe,Fc(D),se&4&&z!==null&&z.memoizedState.isDehydrated)try{Lm(H.containerInfo)}catch(jn){wn(D,D.return,jn)}WI&&(WI=!1,_a(D));break;case 4:se=Gu,Gu=cy(D.stateNode.containerInfo),zd(H,D),Fc(D),Gu=se;break;case 12:zd(H,D),Fc(D);break;case 13:zd(H,D),Fc(D),D.child.flags&8192&&D.memoizedState!==null!=(z!==null&&z.memoizedState!==null)&&(K2=we()),se&4&&(se=D.updateQueue,se!==null&&(D.updateQueue=null,Yp(D,se)));break;case 22:xe=D.memoizedState!==null;var on=z!==null&&z.memoizedState!==null,Pn=Nm,Zn=ll;if(Nm=Pn||xe,ll=Zn||on,zd(H,D),ll=Zn,Nm=Pn,Fc(D),se&8192)e:for(H=D.stateNode,H._visibility=xe?H._visibility&-2:H._visibility|1,xe&&(z===null||on||Nm||ll||zs(D)),z=null,H=D;;){if(H.tag===5||H.tag===26){if(z===null){on=z=H;try{if(Fe=on.stateNode,xe)pt=Fe.style,typeof pt.setProperty=="function"?pt.setProperty("display","none","important"):pt.display="none";else{St=on.stateNode;var Qo=on.memoizedProps.style,Gn=Qo!=null&&Qo.hasOwnProperty("display")?Qo.display:null;St.style.display=Gn==null||typeof Gn=="boolean"?"":(""+Gn).trim()}}catch(jn){wn(on,on.return,jn)}}}else if(H.tag===6){if(z===null){on=H;try{on.stateNode.nodeValue=xe?"":on.memoizedProps}catch(jn){wn(on,on.return,jn)}}}else if((H.tag!==22&&H.tag!==23||H.memoizedState===null||H===D)&&H.child!==null){H.child.return=H,H=H.child;continue}if(H===D)break e;for(;H.sibling===null;){if(H.return===null||H.return===D)break e;z===H&&(z=null),H=H.return}z===H&&(z=null),H.sibling.return=H.return,H=H.sibling}se&4&&(se=D.updateQueue,se!==null&&(z=se.retryQueue,z!==null&&(se.retryQueue=null,Yp(D,z))));break;case 19:zd(H,D),Fc(D),se&4&&(se=D.updateQueue,se!==null&&(D.updateQueue=null,Yp(D,se)));break;case 30:break;case 21:break;default:zd(H,D),Fc(D)}}function Fc(D){var H=D.flags;if(H&2){try{for(var z,se=D.return;se!==null;){if(a5(se)){z=se;break}se=se.return}if(z==null)throw Error(i(160));switch(z.tag){case 27:var xe=z.stateNode,Fe=Cg(D);JI(D,Fe,xe);break;case 5:var pt=z.stateNode;z.flags&32&&(En(pt,""),z.flags&=-33);var St=Cg(D);JI(D,St,pt);break;case 3:case 4:var on=z.stateNode.containerInfo,Pn=Cg(D);Dm(D,Pn,on);break;default:throw Error(i(161))}}catch(Zn){wn(D,D.return,Zn)}D.flags&=-3}H&4096&&(D.flags&=-4097)}function _a(D){if(D.subtreeFlags&1024)for(D=D.child;D!==null;){var H=D;_a(H),H.tag===5&&H.flags&1024&&H.stateNode.reset(),D=D.sibling}}function fa(D,H){if(H.subtreeFlags&8772)for(H=H.child;H!==null;)Df(D,H.alternate,H),H=H.sibling}function zs(D){for(D=D.child;D!==null;){var H=D;switch(H.tag){case 0:case 11:case 14:case 15:Kl(4,H,H.return),zs(H);break;case 1:rc(H,H.return);var z=H.stateNode;typeof z.componentWillUnmount=="function"&&p9(H,H.return,z),zs(H);break;case 27:Zg(H.stateNode);case 26:case 5:rc(H,H.return),zs(H);break;case 22:H.memoizedState===null&&zs(H);break;case 30:zs(H);break;default:zs(H)}D=D.sibling}}function Rm(D,H,z){for(z=z&&(H.subtreeFlags&8772)!==0,H=H.child;H!==null;){var se=H.alternate,xe=D,Fe=H,pt=Fe.flags;switch(Fe.tag){case 0:case 11:case 15:Rm(xe,Fe,z),Qh(4,Fe);break;case 1:if(Rm(xe,Fe,z),se=Fe,xe=se.stateNode,typeof xe.componentDidMount=="function")try{xe.componentDidMount()}catch(Pn){wn(se,se.return,Pn)}if(se=Fe,xe=se.updateQueue,xe!==null){var St=se.stateNode;try{var on=xe.shared.hiddenCallbacks;if(on!==null)for(xe.shared.hiddenCallbacks=null,xe=0;xe<on.length;xe++)Xr(on[xe],St)}catch(Pn){wn(se,se.return,Pn)}}z&&pt&64&&VI(Fe),zI(Fe,Fe.return);break;case 27:ey(Fe);case 26:case 5:Rm(xe,Fe,z),z&&se===null&&pt&4&&b0(Fe),zI(Fe,Fe.return);break;case 12:Rm(xe,Fe,z);break;case 13:Rm(xe,Fe,z),z&&pt&4&&D1(xe,Fe);break;case 22:Fe.memoizedState===null&&Rm(xe,Fe,z),zI(Fe,Fe.return);break;case 30:break;default:Rm(xe,Fe,z)}H=H.sibling}}function j0(D,H){var z=null;D!==null&&D.memoizedState!==null&&D.memoizedState.cachePool!==null&&(z=D.memoizedState.cachePool.pool),D=null,H.memoizedState!==null&&H.memoizedState.cachePool!==null&&(D=H.memoizedState.cachePool.pool),D!==z&&(D!=null&&D.refCount++,z!=null&&Ch(z))}function w_(D,H){D=null,H.alternate!==null&&(D=H.alternate.memoizedState.cache),H=H.memoizedState.cache,H!==D&&(H.refCount++,D!=null&&Ch(D))}function $0(D,H,z,se){if(H.subtreeFlags&10256)for(H=H.child;H!==null;)N1(D,H,z,se),H=H.sibling}function N1(D,H,z,se){var xe=H.flags;switch(H.tag){case 0:case 11:case 15:$0(D,H,z,se),xe&2048&&Qh(9,H);break;case 1:$0(D,H,z,se);break;case 3:$0(D,H,z,se),xe&2048&&(D=null,H.alternate!==null&&(D=H.alternate.memoizedState.cache),H=H.memoizedState.cache,H!==D&&(H.refCount++,D!=null&&Ch(D)));break;case 12:if(xe&2048){$0(D,H,z,se),D=H.stateNode;try{var Fe=H.memoizedProps,pt=Fe.id,St=Fe.onPostCommit;typeof St=="function"&&St(pt,H.alternate===null?"mount":"update",D.passiveEffectDuration,-0)}catch(on){wn(H,H.return,on)}}else $0(D,H,z,se);break;case 13:$0(D,H,z,se);break;case 23:break;case 22:Fe=H.stateNode,pt=H.alternate,H.memoizedState!==null?Fe._visibility&2?$0(D,H,z,se):GA(D,H):Fe._visibility&2?$0(D,H,z,se):(Fe._visibility|=2,Up(D,H,z,se,(H.subtreeFlags&10256)!==0)),xe&2048&&j0(pt,H);break;case 24:$0(D,H,z,se),xe&2048&&w_(H.alternate,H);break;default:$0(D,H,z,se)}}function Up(D,H,z,se,xe){for(xe=xe&&(H.subtreeFlags&10256)!==0,H=H.child;H!==null;){var Fe=D,pt=H,St=z,on=se,Pn=pt.flags;switch(pt.tag){case 0:case 11:case 15:Up(Fe,pt,St,on,xe),Qh(8,pt);break;case 23:break;case 22:var Zn=pt.stateNode;pt.memoizedState!==null?Zn._visibility&2?Up(Fe,pt,St,on,xe):GA(Fe,pt):(Zn._visibility|=2,Up(Fe,pt,St,on,xe)),xe&&Pn&2048&&j0(pt.alternate,pt);break;case 24:Up(Fe,pt,St,on,xe),xe&&Pn&2048&&w_(pt.alternate,pt);break;default:Up(Fe,pt,St,on,xe)}H=H.sibling}}function GA(D,H){if(H.subtreeFlags&10256)for(H=H.child;H!==null;){var z=D,se=H,xe=se.flags;switch(se.tag){case 22:GA(z,se),xe&2048&&j0(se.alternate,se);break;case 24:GA(z,se),xe&2048&&w_(se.alternate,se);break;default:GA(z,se)}H=H.sibling}}var Kp=8192;function S0(D){if(D.subtreeFlags&Kp)for(D=D.child;D!==null;)u5(D),D=D.sibling}function u5(D){switch(D.tag){case 26:S0(D),D.flags&Kp&&D.memoizedState!==null&&tx(Gu,D.memoizedState,D.memoizedProps);break;case 5:S0(D);break;case 3:case 4:var H=Gu;Gu=cy(D.stateNode.containerInfo),S0(D),Gu=H;break;case 22:D.memoizedState===null&&(H=D.alternate,H!==null&&H.memoizedState!==null?(H=Kp,Kp=16777216,S0(D),Kp=H):S0(D));break;default:S0(D)}}function jI(D){var H=D.alternate;if(H!==null&&(D=H.child,D!==null)){H.child=null;do H=D.sibling,D.sibling=null,D=H;while(D!==null)}}function vh(D){var H=D.deletions;if((D.flags&16)!==0){if(H!==null)for(var z=0;z<H.length;z++){var se=H[z];Yi=se,N4(se,D)}jI(D)}if(D.subtreeFlags&10256)for(D=D.child;D!==null;)R1(D),D=D.sibling}function R1(D){switch(D.tag){case 0:case 11:case 15:vh(D),D.flags&2048&&Kl(9,D,D.return);break;case 3:vh(D);break;case 12:vh(D);break;case 22:var H=D.stateNode;D.memoizedState!==null&&H._visibility&2&&(D.return===null||D.return.tag!==13)?(H._visibility&=-3,Cu(D)):vh(D);break;default:vh(D)}}function Cu(D){var H=D.deletions;if((D.flags&16)!==0){if(H!==null)for(var z=0;z<H.length;z++){var se=H[z];Yi=se,N4(se,D)}jI(D)}for(D=D.child;D!==null;){switch(H=D,H.tag){case 0:case 11:case 15:Kl(8,H,H.return),Cu(H);break;case 22:z=H.stateNode,z._visibility&2&&(z._visibility&=-3,Cu(H));break;default:Cu(H)}D=D.sibling}}function N4(D,H){for(;Yi!==null;){var z=Yi;switch(z.tag){case 0:case 11:case 15:Kl(8,z,H);break;case 23:case 22:if(z.memoizedState!==null&&z.memoizedState.cachePool!==null){var se=z.memoizedState.cachePool.pool;se!=null&&se.refCount++}break;case 24:Ch(z.memoizedState.cache)}if(se=z.child,se!==null)se.return=z,Yi=se;else e:for(z=D;Yi!==null;){se=Yi;var xe=se.sibling,Fe=se.return;if(M1(se),se===z){Yi=null;break e}if(xe!==null){xe.return=Fe,Yi=xe;break e}Yi=Fe}}}var Vp={getCacheForType:function(D){var H=dg(qs),z=H.data.get(D);return z===void 0&&(z=D(),H.data.set(D,z)),z}},Rf=typeof WeakMap=="function"?WeakMap:Map,xs=0,Lc=null,Ha=null,Ja=0,Ps=0,wh=null,qg=!1,gl=!1,y3=!1,Tf=0,Pa=0,qc=0,Yu=0,xc=0,xg=0,$I=0,T1=null,Xg=null,U2=!1,K2=0,ty=1/0,kf=null,qI=null,ls=0,gA=null,Us=null,Zr=0,os=0,l0=null,k1=null,Ph=0,XI=null;function dl(){if((xs&2)!==0&&Ja!==0)return Ja&-Ja;if(U.T!==null){var D=Em;return D!==0?D:E3()}return Wt()}function hl(){xg===0&&(xg=(Ja&536870912)===0||uA?It():536870912);var D=Op.current;return D!==null&&(D.flags|=32),xg}function Sl(D,H,z){(D===Lc&&(Ps===2||Ps===9)||D.cancelPendingCommit!==null)&&(Mh(D,0),Jp(D,Ja,xg,!1)),st(D,z),((xs&2)===0||D!==Lc)&&(D===Lc&&((xs&2)===0&&(Yu|=z),Pa===4&&Jp(D,Ja,xg,!1)),Bi(D))}function Uu(D,H,z){if((xs&6)!==0)throw Error(i(327));var se=!z&&(H&124)===0&&(H&D.expiredLanes)===0||be(D,H),xe=se?yu(D,H):us(D,H,!0),Fe=se;do{if(xe===0){gl&&!se&&Jp(D,H,0,!1);break}else{if(z=D.current.alternate,Fe&&!pl(z)){xe=us(D,H,!1),Fe=!1;continue}if(xe===2){if(Fe=H,D.errorRecoveryDisabledLanes&Fe)var pt=0;else pt=D.pendingLanes&-536870913,pt=pt!==0?pt:pt&536870912?536870912:0;if(pt!==0){H=pt;e:{var St=D;xe=T1;var on=St.current.memoizedState.isDehydrated;if(on&&(Mh(St,pt).flags|=256),pt=us(St,pt,!1),pt!==2){if(y3&&!on){St.errorRecoveryDisabledLanes|=Fe,Yu|=Fe,xe=4;break e}Fe=Xg,Xg=xe,Fe!==null&&(Xg===null?Xg=Fe:Xg.push.apply(Xg,Fe))}xe=pt}if(Fe=!1,xe!==2)continue}}if(xe===1){Mh(D,0),Jp(D,H,0,!0);break}e:{switch(se=D,Fe=xe,Fe){case 0:case 1:throw Error(i(345));case 4:if((H&4194048)!==H)break;case 6:Jp(se,H,xg,!qg);break e;case 2:Xg=null;break;case 3:case 5:break;default:throw Error(i(329))}if((H&62914560)===H&&(xe=K2+300-we(),10<xe)){if(Jp(se,H,xg,!qg),pn(se,0,!0)!==0)break e;se.timeoutHandle=S3(zp.bind(null,se,z,Xg,kf,U2,H,xg,Yu,$I,qg,Fe,2,-0,0),xe);break e}zp(se,z,Xg,kf,U2,H,xg,Yu,$I,qg,Fe,0,-0,0)}}break}while(!0);Bi(D)}function zp(D,H,z,se,xe,Fe,pt,St,on,Pn,Zn,Qo,Gn,jn){if(D.timeoutHandle=-1,Qo=H.subtreeFlags,(Qo&8192||(Qo&16785408)===16785408)&&(ex={stylesheets:null,count:0,unsuspend:jS},u5(H),Qo=fs(),Qo!==null)){D.cancelPendingCommit=Qo(G.bind(null,D,H,Fe,z,se,xe,pt,St,on,Zn,1,Gn,jn)),Jp(D,Fe,pt,!Pn);return}G(D,H,Fe,z,se,xe,pt,St,on)}function pl(D){for(var H=D;;){var z=H.tag;if((z===0||z===11||z===15)&&H.flags&16384&&(z=H.updateQueue,z!==null&&(z=z.stores,z!==null)))for(var se=0;se<z.length;se++){var xe=z[se],Fe=xe.getSnapshot;xe=xe.value;try{if(!Hr(Fe(),xe))return!1}catch{return!1}}if(z=H.child,H.subtreeFlags&16384&&z!==null)z.return=H,H=z;else{if(H===D)break;for(;H.sibling===null;){if(H.return===null||H.return===D)return!0;H=H.return}H.sibling.return=H.return,H=H.sibling}}return!0}function Jp(D,H,z,se){H&=~xc,H&=~Yu,D.suspendedLanes|=H,D.pingedLanes&=~H,se&&(D.warmLanes|=H),se=D.expirationTimes;for(var xe=H;0<xe;){var Fe=31-gt(xe),pt=1<<Fe;se[Fe]=-1,xe&=~pt}z!==0&&Xe(D,z,H)}function P_(){return(xs&6)===0?(eA(0),!1):!0}function Vl(){if(Ha!==null){if(Ps===0)var D=Ha.return;else D=Ha,Fu=yf=null,g3(D),YI=null,bh=0,D=Ha;for(;D!==null;)$c(D.alternate,D),D=D.return;Ha=null}}function Mh(D,H){var z=D.timeoutHandle;z!==-1&&(D.timeoutHandle=-1,R4(z)),z=D.cancelPendingCommit,z!==null&&(D.cancelPendingCommit=null,z()),Vl(),Lc=D,Ha=z=op(D.current,null),Ja=H,Ps=0,wh=null,qg=!1,gl=be(D,H),y3=!1,$I=xg=xc=Yu=qc=Pa=0,Xg=T1=null,U2=!1,(H&8)!==0&&(H|=H&32);var se=D.entangledLanes;if(se!==0)for(D=D.entanglements,se&=H;0<se;){var xe=31-gt(se),Fe=1<<xe;H|=D[xe],se&=~Fe}return Tf=H,y0(),z}function ny(D,H){Ss=null,U.H=Bh,H===E1||H===Od?(H=l3(),Ps=3):H===kI?(H=l3(),Ps=4):Ps=H===yc?8:H!==null&&typeof H=="object"&&typeof H.then=="function"?6:1,wh=H,Ha===null&&(Pa=1,G2(D,pu(H,D.current)))}function x3(){var D=U.H;return U.H=Bh,D===null?Bh:D}function F1(){var D=U.A;return U.A=Vp,D}function Wp(){Pa=4,qg||(Ja&4194048)!==Ja&&Op.current!==null||(gl=!0),(qc&134217727)===0&&(Yu&134217727)===0||Lc===null||Jp(Lc,Ja,xg,!1)}function us(D,H,z){var se=xs;xs|=2;var xe=x3(),Fe=F1();(Lc!==D||Ja!==H)&&(kf=null,Mh(D,H)),H=!1;var pt=Pa;e:do try{if(Ps!==0&&Ha!==null){var St=Ha,on=wh;switch(Ps){case 8:Vl(),pt=6;break e;case 3:case 2:case 9:case 6:Op.current===null&&(H=!0);var Pn=Ps;if(Ps=0,wh=null,oy(D,St,on,Pn),z&&gl){pt=0;break e}break;default:Pn=Ps,Ps=0,wh=null,oy(D,St,on,Pn)}}Jd(),pt=Pa;break}catch(Zn){ny(D,Zn)}while(!0);return H&&D.shellSuspendCounter++,Fu=yf=null,xs=se,U.H=xe,U.A=Fe,Ha===null&&(Lc=null,Ja=0,y0()),pt}function Jd(){for(;Ha!==null;)V2(Ha)}function yu(D,H){var z=xs;xs|=2;var se=x3(),xe=F1();Lc!==D||Ja!==H?(kf=null,ty=we()+500,Mh(D,H)):gl=be(D,H);e:do try{if(Ps!==0&&Ha!==null){H=Ha;var Fe=wh;t:switch(Ps){case 1:Ps=0,wh=null,oy(D,H,Fe,1);break;case 2:case 9:if(FI(Fe)){Ps=0,wh=null,g5(H);break}H=function(){Ps!==2&&Ps!==9||Lc!==D||(Ps=7),Bi(D)},Fe.then(H,H);break e;case 3:Ps=7;break e;case 4:Ps=5;break e;case 7:FI(Fe)?(Ps=0,wh=null,g5(H)):(Ps=0,wh=null,oy(D,H,Fe,7));break;case 5:var pt=null;switch(Ha.tag){case 26:pt=Ha.memoizedState;case 5:case 27:var St=Ha;if(!pt||f9(pt)){Ps=0,wh=null;var on=St.sibling;if(on!==null)Ha=on;else{var Pn=St.return;Pn!==null?(Ha=Pn,up(Pn)):Ha=null}break t}}Ps=0,wh=null,oy(D,H,Fe,5);break;case 6:Ps=0,wh=null,oy(D,H,Fe,6);break;case 8:Vl(),Pa=6;break e;default:throw Error(i(462))}}Dh();break}catch(Zn){ny(D,Zn)}while(!0);return Fu=yf=null,U.H=se,U.A=xe,xs=z,Ha!==null?0:(Lc=null,Ja=0,y0(),Pa)}function Dh(){for(;Ha!==null&&!Qe();)V2(Ha)}function V2(D){var H=$g(D.alternate,D,Tf);D.memoizedProps=D.pendingProps,H===null?up(D):Ha=H}function g5(D){var H=D,z=H.alternate;switch(H.tag){case 15:case 0:H=s5(z,H,H.pendingProps,H.type,void 0,Ja);break;case 11:H=s5(z,H,H.pendingProps,H.type.render,H.ref,Ja);break;case 5:g3(H);default:$c(z,H),H=Ha=bs(H,Tf),H=$g(z,H,Tf)}D.memoizedProps=D.pendingProps,H===null?up(D):Ha=H}function oy(D,H,z,se){Fu=yf=null,g3(H),YI=null,bh=0;var xe=H.return;try{if(h9(D,xe,H,z,Ja)){Pa=1,G2(D,pu(z,D.current)),Ha=null;return}}catch(Fe){if(xe!==null)throw Ha=xe,Fe;Pa=1,G2(D,pu(z,D.current)),Ha=null;return}H.flags&32768?(uA||se===1?D=!0:gl||(Ja&536870912)!==0?D=!1:(qg=D=!0,(se===2||se===9||se===3||se===6)&&(se=Op.current,se!==null&&se.tag===13&&(se.flags|=16384))),Ku(H,D)):up(H)}function up(D){var H=D;do{if((H.flags&32768)!==0){Ku(H,qg);return}D=H.return;var z=lp(H.alternate,H,Tf);if(z!==null){Ha=z;return}if(H=H.sibling,H!==null){Ha=H;return}Ha=H=D}while(H!==null);Pa===0&&(Pa=5)}function Ku(D,H){do{var z=c0(D.alternate,D);if(z!==null){z.flags&=32767,Ha=z;return}if(z=D.return,z!==null&&(z.flags|=32768,z.subtreeFlags=0,z.deletions=null),!H&&(D=D.sibling,D!==null)){Ha=D;return}Ha=D=z}while(D!==null);Pa=6,Ha=null}function G(D,H,z,se,xe,Fe,pt,St,on){D.cancelPendingCommit=null;do Je();while(ls!==0);if((xs&6)!==0)throw Error(i(327));if(H!==null){if(H===D.current)throw Error(i(177));if(Fe=H.lanes|H.childLanes,Fe|=np,xt(D,z,Fe,pt,St,on),D===Lc&&(Ha=Lc=null,Ja=0),Us=H,gA=D,Zr=z,os=Fe,l0=xe,k1=se,(H.subtreeFlags&10256)!==0||(H.flags&10256)!==0?(D.callbackNode=null,D.callbackPriority=0,jp(ke,function(){return Tt(),null})):(D.callbackNode=null,D.callbackPriority=0),se=(H.flags&13878)!==0,(H.subtreeFlags&13878)!==0||se){se=U.T,U.T=null,xe=Y.p,Y.p=2,pt=xs,xs|=4;try{c5(D,H,z)}finally{xs=pt,Y.p=xe,U.T=se}}ls=1,V(),Ae(),Be()}}function V(){if(ls===1){ls=0;var D=gA,H=Us,z=(H.flags&13878)!==0;if((H.subtreeFlags&13878)!==0||z){z=U.T,U.T=null;var se=Y.p;Y.p=2;var xe=xs;xs|=4;try{Nf(H,D);var Fe=tC,pt=bI(D.containerInfo),St=Fe.focusedElem,on=Fe.selectionRange;if(pt!==St&&St&&St.ownerDocument&&OC(St.ownerDocument.documentElement,St)){if(on!==null&&hu(St)){var Pn=on.start,Zn=on.end;if(Zn===void 0&&(Zn=Pn),"selectionStart"in St)St.selectionStart=Pn,St.selectionEnd=Math.min(Zn,St.value.length);else{var Qo=St.ownerDocument||document,Gn=Qo&&Qo.defaultView||window;if(Gn.getSelection){var jn=Gn.getSelection(),wr=St.textContent.length,br=Math.min(on.start,wr),tA=on.end===void 0?br:Math.min(on.end,wr);!jn.extend&&br>tA&&(pt=tA,tA=br,br=pt);var Mn=DA(St,br),Cn=DA(St,tA);if(Mn&&Cn&&(jn.rangeCount!==1||jn.anchorNode!==Mn.node||jn.anchorOffset!==Mn.offset||jn.focusNode!==Cn.node||jn.focusOffset!==Cn.offset)){var Un=Qo.createRange();Un.setStart(Mn.node,Mn.offset),jn.removeAllRanges(),br>tA?(jn.addRange(Un),jn.extend(Cn.node,Cn.offset)):(Un.setEnd(Cn.node,Cn.offset),jn.addRange(Un))}}}}for(Qo=[],jn=St;jn=jn.parentNode;)jn.nodeType===1&&Qo.push({element:jn,left:jn.scrollLeft,top:jn.scrollTop});for(typeof St.focus=="function"&&St.focus(),St=0;St<Qo.length;St++){var Mo=Qo[St];Mo.element.scrollLeft=Mo.left,Mo.element.scrollTop=Mo.top}}X=!!Rh,tC=Rh=null}finally{xs=xe,Y.p=se,U.T=z}}D.current=H,ls=2}}function Ae(){if(ls===2){ls=0;var D=gA,H=Us,z=(H.flags&8772)!==0;if((H.subtreeFlags&8772)!==0||z){z=U.T,U.T=null;var se=Y.p;Y.p=2;var xe=xs;xs|=4;try{Df(D,H.alternate,H)}finally{xs=xe,Y.p=se,U.T=z}}ls=3}}function Be(){if(ls===4||ls===3){ls=0,Pe();var D=gA,H=Us,z=Zr,se=k1;(H.subtreeFlags&10256)!==0||(H.flags&10256)!==0?ls=5:(ls=0,Us=gA=null,Oe(D,D.pendingLanes));var xe=D.pendingLanes;if(xe===0&&(qI=null),Ut(z),H=H.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(At,H,void 0,(H.current.flags&128)===128)}catch{}if(se!==null){H=U.T,xe=Y.p,Y.p=2,U.T=null;try{for(var Fe=D.onRecoverableError,pt=0;pt<se.length;pt++){var St=se[pt];Fe(St.value,{componentStack:St.stack})}}finally{U.T=H,Y.p=xe}}(Zr&3)!==0&&Je(),Bi(D),xe=D.pendingLanes,(z&4194090)!==0&&(xe&42)!==0?D===XI?Ph++:(Ph=0,XI=D):Ph=0,eA(0)}}function Oe(D,H){(D.pooledCacheLanes&=H)===0&&(H=D.pooledCache,H!=null&&(D.pooledCache=null,Ch(H)))}function Je(D){return V(),Ae(),Be(),Tt()}function Tt(){if(ls!==5)return!1;var D=gA,H=os;os=0;var z=Ut(Zr),se=U.T,xe=Y.p;try{Y.p=32>z?32:z,U.T=null,z=l0,l0=null;var Fe=gA,pt=Zr;if(ls=0,Us=gA=null,Zr=0,(xs&6)!==0)throw Error(i(331));var St=xs;if(xs|=4,R1(Fe.current),N1(Fe,Fe.current,pt,z),xs=St,eA(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(At,Fe)}catch{}return!0}finally{Y.p=xe,U.T=se,Oe(D,H)}}function ln(D,H,z){H=pu(z,H),H=jg(D.stateNode,H,2),D=Yd(D,H,2),D!==null&&(st(D,2),Bi(D))}function wn(D,H,z){if(D.tag===3)ln(D,D,z);else for(;H!==null;){if(H.tag===3){ln(H,D,z);break}else if(H.tag===1){var se=H.stateNode;if(typeof H.type.getDerivedStateFromError=="function"||typeof se.componentDidCatch=="function"&&(qI===null||!qI.has(se))){D=pu(z,D),z=qC(2),se=Yd(H,z,2),se!==null&&(Kd(z,se,H,D),st(se,2),Bi(se));break}}H=H.return}}function $o(D,H,z){var se=D.pingCache;if(se===null){se=D.pingCache=new Rf;var xe=new Set;se.set(H,xe)}else xe=se.get(H),xe===void 0&&(xe=new Set,se.set(H,xe));xe.has(z)||(y3=!0,xe.add(z),D=Ai.bind(null,D,H,z),H.then(D,D))}function Ai(D,H,z){var se=D.pingCache;se!==null&&se.delete(H),D.pingedLanes|=D.suspendedLanes&z,D.warmLanes&=~z,Lc===D&&(Ja&z)===z&&(Pa===4||Pa===3&&(Ja&62914560)===Ja&&300>we()-K2?(xs&2)===0&&Mh(D,0):xc|=z,$I===Ja&&($I=0)),Bi(D)}function Qi(D,H){H===0&&(H=Bt()),D=Kg(D,H),D!==null&&(st(D,H),Bi(D))}function Ni(D){var H=D.memoizedState,z=0;H!==null&&(z=H.retryLane),Qi(D,z)}function Xs(D,H){var z=0;switch(D.tag){case 13:var se=D.stateNode,xe=D.memoizedState;xe!==null&&(z=xe.retryLane);break;case 19:se=D.stateNode;break;case 22:se=D.stateNode._retryCache;break;default:throw Error(i(314))}se!==null&&se.delete(H),Qi(D,z)}function jp(D,H){return ve(D,H)}var L1=null,Eg=null,Yn=!1,Qn=!1,to=!1,zo=0;function Bi(D){D!==Eg&&D.next===null&&(Eg===null?L1=Eg=D:Eg=Eg.next=D),Qn=!0,Yn||(Yn=!0,d5())}function eA(D,H){if(!to&&Qn){to=!0;do for(var z=!1,se=L1;se!==null;){if(D!==0){var xe=se.pendingLanes;if(xe===0)var Fe=0;else{var pt=se.suspendedLanes,St=se.pingedLanes;Fe=(1<<31-gt(42|D)+1)-1,Fe&=xe&~(pt&~St),Fe=Fe&201326741?Fe&201326741|1:Fe?Fe|2:0}Fe!==0&&(z=!0,Bg(se,Fe))}else Fe=Ja,Fe=pn(se,se===Lc?Fe:0,se.cancelPendingCommit!==null||se.timeoutHandle!==-1),(Fe&3)===0||be(se,Fe)||(z=!0,Bg(se,Fe));se=se.next}while(z);to=!1}}function Or(){Js()}function Js(){Qn=Yn=!1;var D=0;zo!==0&&(G1()&&(D=zo),zo=0);for(var H=we(),z=null,se=L1;se!==null;){var xe=se.next,Fe=Qs(se,H);Fe===0?(se.next=null,z===null?L1=xe:z.next=xe,xe===null&&(Eg=z)):(z=se,(D!==0||(Fe&3)!==0)&&(Qn=!0)),se=xe}eA(D)}function Qs(D,H){for(var z=D.suspendedLanes,se=D.pingedLanes,xe=D.expirationTimes,Fe=D.pendingLanes&-62914561;0<Fe;){var pt=31-gt(Fe),St=1<<pt,on=xe[pt];on===-1?((St&z)===0||(St&se)!==0)&&(xe[pt]=et(St,H)):on<=H&&(D.expiredLanes|=St),Fe&=~St}if(H=Lc,z=Ja,z=pn(D,D===H?z:0,D.cancelPendingCommit!==null||D.timeoutHandle!==-1),se=D.callbackNode,z===0||D===H&&(Ps===2||Ps===9)||D.cancelPendingCommit!==null)return se!==null&&se!==null&&he(se),D.callbackNode=null,D.callbackPriority=0;if((z&3)===0||be(D,z)){if(H=z&-z,H===D.callbackPriority)return H;switch(se!==null&&he(se),Ut(z)){case 2:case 8:z=Ee;break;case 32:z=ke;break;case 268435456:z=Le;break;default:z=ke}return se=Wa.bind(null,D),z=ve(z,se),D.callbackPriority=H,D.callbackNode=z,H}return se!==null&&se!==null&&he(se),D.callbackPriority=2,D.callbackNode=null,2}function Wa(D,H){if(ls!==0&&ls!==5)return D.callbackNode=null,D.callbackPriority=0,null;var z=D.callbackNode;if(Je()&&D.callbackNode!==z)return null;var se=Ja;return se=pn(D,D===Lc?se:0,D.cancelPendingCommit!==null||D.timeoutHandle!==-1),se===0?null:(Uu(D,se,H),Qs(D,we()),D.callbackNode!=null&&D.callbackNode===z?Wa.bind(null,D):null)}function Bg(D,H){if(Je())return null;Uu(D,H,!0)}function d5(){g8(function(){(xs&6)!==0?ve(Re,Or):Js()})}function E3(){return zo===0&&(zo=It()),zo}function H1(D){return D==null||typeof D=="symbol"||typeof D=="boolean"?null:typeof D=="function"?D:oi(""+D)}function M_(D,H){var z=H.ownerDocument.createElement("input");return z.name=H.name,z.value=H.value,D.id&&z.setAttribute("form",D.id),H.parentNode.insertBefore(z,H),D=new FormData(D),z.parentNode.removeChild(z),D}function gp(D,H,z,se,xe){if(H==="submit"&&z&&z.stateNode===xe){var Fe=H1((xe[An]||null).action),pt=se.submitter;pt&&(H=(H=pt[An]||null)?H1(H.formAction):pt.getAttribute("formAction"),H!==null&&(Fe=H,pt=null));var St=new m_("action","action",null,se,xe);D.push({event:St,listeners:[{instance:null,listener:function(){if(se.defaultPrevented){if(zo!==0){var on=pt?M_(xe,pt):new FormData(xe);n5(z,{pending:!0,data:on,method:xe.method,action:Fe},null,on)}}else typeof Fe=="function"&&(St.preventDefault(),on=pt?M_(xe,pt):new FormData(xe),n5(z,{pending:!0,data:on,method:xe.method,action:Fe},Fe,on))},currentTarget:xe}]})}}for(var Ma=0;Ma<o0.length;Ma++){var ja=o0[Ma],z2=ja.toLowerCase(),ms=ja[0].toUpperCase()+ja.slice(1);tp(z2,"on"+ms)}tp(S4,"onAnimationEnd"),tp(ep,"onAnimationIteration"),tp(If,"onAnimationStart"),tp("dblclick","onDoubleClick"),tp("focusin","onFocus"),tp("focusout","onBlur"),tp(A3,"onTransitionRun"),tp(m2,"onTransitionStart"),tp(KE,"onTransitionCancel"),tp(Fd,"onTransitionEnd"),Co("onMouseEnter",["mouseout","mouseover"]),Co("onMouseLeave",["mouseout","mouseover"]),Co("onPointerEnter",["pointerout","pointerover"]),Co("onPointerLeave",["pointerout","pointerover"]),Nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ff="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Wd=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ff));function ZI(D,H){H=(H&4)!==0;for(var z=0;z<D.length;z++){var se=D[z],xe=se.event;se=se.listeners;e:{var Fe=void 0;if(H)for(var pt=se.length-1;0<=pt;pt--){var St=se[pt],on=St.instance,Pn=St.currentTarget;if(St=St.listener,on!==Fe&&xe.isPropagationStopped())break e;Fe=St,xe.currentTarget=Pn;try{Fe(xe)}catch(Zn){Mm(Zn)}xe.currentTarget=null,Fe=on}else for(pt=0;pt<se.length;pt++){if(St=se[pt],on=St.instance,Pn=St.currentTarget,St=St.listener,on!==Fe&&xe.isPropagationStopped())break e;Fe=St,xe.currentTarget=Pn;try{Fe(xe)}catch(Zn){Mm(Zn)}xe.currentTarget=null,Fe=on}}}}function Ia(D,H){var z=H[$n];z===void 0&&(z=H[$n]=new Set);var se=D+"__bubble";z.has(se)||(Nh(H,D,2,!1),z.add(se))}function h5(D,H,z){var se=0;H&&(se|=4),Nh(z,D,se,H)}var p5="_reactListening"+Math.random().toString(36).slice(2);function zS(D){if(!D[p5]){D[p5]=!0,nn.forEach(function(z){z!=="selectionchange"&&(Wd.has(z)||h5(z,!1,D),h5(z,!0,D))});var H=D.nodeType===9?D:D.ownerDocument;H===null||H[p5]||(H[p5]=!0,h5("selectionchange",!1,H))}}function Nh(D,H,z,se){switch(en(H)){case 2:var xe=me;break;case 8:xe=He;break;default:xe=We}z=xe.bind(null,H,z,D),xe=void 0,!cA||H!=="touchstart"&&H!=="touchmove"&&H!=="wheel"||(xe=!0),se?xe!==void 0?D.addEventListener(H,z,{capture:!0,passive:xe}):D.addEventListener(H,z,!0):xe!==void 0?D.addEventListener(H,z,{passive:xe}):D.addEventListener(H,z,!1)}function yA(D,H,z,se,xe){var Fe=se;if((H&1)===0&&(H&2)===0&&se!==null)e:for(;;){if(se===null)return;var pt=se.tag;if(pt===3||pt===4){var St=se.stateNode.containerInfo;if(St===xe)break;if(pt===4)for(pt=se.return;pt!==null;){var on=pt.tag;if((on===3||on===4)&&pt.stateNode.containerInfo===xe)return;pt=pt.return}for(;St!==null;){if(pt=Ao(St),pt===null)return;if(on=pt.tag,on===5||on===6||on===26||on===27){se=Fe=pt;continue e}St=St.parentNode}}se=se.return}Li(function(){var Pn=Fe,Zn=wi(z),Qo=[];e:{var Gn=_2.get(D);if(Gn!==void 0){var jn=m_,wr=D;switch(D){case"keypress":if(Bl(z)===0)break e;case"keydown":case"keyup":jn=cg;break;case"focusin":wr="focus",jn=Qp;break;case"focusout":wr="blur",jn=Qp;break;case"beforeblur":case"afterblur":jn=Qp;break;case"click":if(z.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":jn=C0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":jn=O0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":jn=BI;break;case S4:case ep:case If:jn=tr;break;case Fd:jn=PA;break;case"scroll":case"scrollend":jn=Rd;break;case"wheel":jn=n0;break;case"copy":case"cut":case"paste":jn=wA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":jn=Vc;break;case"toggle":case"beforetoggle":jn=f1}var br=(H&4)!==0,tA=!br&&(D==="scroll"||D==="scrollend"),Mn=br?Gn!==null?Gn+"Capture":null:Gn;br=[];for(var Cn=Pn,Un;Cn!==null;){var Mo=Cn;if(Un=Mo.stateNode,Mo=Mo.tag,Mo!==5&&Mo!==26&&Mo!==27||Un===null||Mn===null||(Mo=ys(Cn,Mn),Mo!=null&&br.push(Lf(Cn,Mo,Un))),tA)break;Cn=Cn.return}0<br.length&&(Gn=new jn(Gn,wr,null,z,Zn),Qo.push({event:Gn,listeners:br}))}}if((H&7)===0){e:{if(Gn=D==="mouseover"||D==="pointerover",jn=D==="mouseout"||D==="pointerout",Gn&&z!==Ji&&(wr=z.relatedTarget||z.fromElement)&&(Ao(wr)||wr[kn]))break e;if((jn||Gn)&&(Gn=Zn.window===Zn?Zn:(Gn=Zn.ownerDocument)?Gn.defaultView||Gn.parentWindow:window,jn?(wr=z.relatedTarget||z.toElement,jn=Pn,wr=wr?Ao(wr):null,wr!==null&&(tA=s(wr),br=wr.tag,wr!==tA||br!==5&&br!==27&&br!==6)&&(wr=null)):(jn=null,wr=Pn),jn!==wr)){if(br=C0,Mo="onMouseLeave",Mn="onMouseEnter",Cn="mouse",(D==="pointerout"||D==="pointerover")&&(br=Vc,Mo="onPointerLeave",Mn="onPointerEnter",Cn="pointer"),tA=jn==null?Gn:vt(jn),Un=wr==null?Gn:vt(wr),Gn=new br(Mo,Cn+"leave",jn,z,Zn),Gn.target=tA,Gn.relatedTarget=Un,Mo=null,Ao(Zn)===Pn&&(br=new br(Mn,Cn+"enter",wr,z,Zn),br.target=Un,br.relatedTarget=tA,Mo=br),tA=Mo,jn&&wr)t:{for(br=jn,Mn=wr,Cn=0,Un=br;Un;Un=iy(Un))Cn++;for(Un=0,Mo=Mn;Mo;Mo=iy(Mo))Un++;for(;0<Cn-Un;)br=iy(br),Cn--;for(;0<Un-Cn;)Mn=iy(Mn),Un--;for(;Cn--;){if(br===Mn||Mn!==null&&br===Mn.alternate)break t;br=iy(br),Mn=iy(Mn)}br=null}else br=null;jn!==null&&b3(Qo,Gn,jn,br,!1),wr!==null&&tA!==null&&b3(Qo,tA,wr,br,!0)}}e:{if(Gn=Pn?vt(Pn):window,jn=Gn.nodeName&&Gn.nodeName.toLowerCase(),jn==="select"||jn==="input"&&Gn.type==="file")var mr=ka;else if(ir(Gn))if(gn)mr=La;else{mr=MA;var nA=lA}else jn=Gn.nodeName,!jn||jn.toLowerCase()!=="input"||Gn.type!=="checkbox"&&Gn.type!=="radio"?Pn&&Io(Pn.elementType)&&(mr=ka):mr=Fa;if(mr&&(mr=mr(D,Pn))){Gs(Qo,mr,z,Zn);break e}nA&&nA(D,Gn,Pn),D==="focusout"&&Pn&&Gn.type==="number"&&Pn.memoizedProps.value!=null&&Qt(Gn,"number",Gn.value)}switch(nA=Pn?vt(Pn):window,D){case"focusin":(ir(nA)||nA.contentEditable==="true")&&(wp=nA,kd=Pn,ff=null);break;case"focusout":ff=kd=wp=null;break;case"mousedown":I1=!0;break;case"contextmenu":case"mouseup":case"dragend":I1=!1,p2(Qo,z,Zn);break;case"selectionchange":if(lg)break;case"keydown":case"keyup":p2(Qo,z,Zn)}var es;if(vp)e:{switch(D){case"compositionstart":var gs="onCompositionStart";break e;case"compositionend":gs="onCompositionEnd";break e;case"compositionupdate":gs="onCompositionUpdate";break e}gs=void 0}else oo?Dn(D,z)&&(gs="onCompositionEnd"):D==="keydown"&&z.keyCode===229&&(gs="onCompositionStart");gs&&(rt&&z.locale!=="ko"&&(oo||gs!=="onCompositionStart"?gs==="onCompositionEnd"&&oo&&(es=Xh()):(Yl=Zn,H0="value"in Yl?Yl.value:Yl.textContent,oo=!0)),nA=B3(Pn,gs),0<nA.length&&(gs=new da(gs,D,null,z,Zn),Qo.push({event:gs,listeners:nA}),es?gs.data=es:(es=Xn(z),es!==null&&(gs.data=es)))),(es=ot?vo(D,z):Xo(D,z))&&(gs=B3(Pn,"onBeforeInput"),0<gs.length&&(nA=new da("onBeforeInput","beforeinput",null,z,Zn),Qo.push({event:nA,listeners:gs}),nA.data=es)),gp(Qo,D,Pn,z,Zn)}ZI(Qo,H)})}function Lf(D,H,z){return{instance:D,listener:H,currentTarget:z}}function B3(D,H){for(var z=H+"Capture",se=[];D!==null;){var xe=D,Fe=xe.stateNode;if(xe=xe.tag,xe!==5&&xe!==26&&xe!==27||Fe===null||(xe=ys(D,z),xe!=null&&se.unshift(Lf(D,xe,Fe)),xe=ys(D,H),xe!=null&&se.push(Lf(D,xe,Fe))),D.tag===3)return se;D=D.return}return[]}function iy(D){if(D===null)return null;do D=D.return;while(D&&D.tag!==5&&D.tag!==27);return D||null}function b3(D,H,z,se,xe){for(var Fe=H._reactName,pt=[];z!==null&&z!==se;){var St=z,on=St.alternate,Pn=St.stateNode;if(St=St.tag,on!==null&&on===se)break;St!==5&&St!==26&&St!==27||Pn===null||(on=Pn,xe?(Pn=ys(z,Fe),Pn!=null&&pt.unshift(Lf(z,Pn,on))):xe||(Pn=ys(z,Fe),Pn!=null&&pt.push(Lf(z,Pn,on)))),z=z.return}pt.length!==0&&D.push({event:H,listeners:pt})}var dp=/\r\n?/g,eC=/\u0000|\uFFFD/g;function J2(D){return(typeof D=="string"?D:""+D).replace(dp,`
`).replace(eC,"")}function JS(D,H){return H=J2(H),J2(D)===H}function l8(){}function ra(D,H,z,se,xe,Fe){switch(z){case"children":typeof se=="string"?H==="body"||H==="textarea"&&se===""||En(D,se):(typeof se=="number"||typeof se=="bigint")&&H!=="body"&&En(D,""+se);break;case"className":On(D,"class",se);break;case"tabIndex":On(D,"tabindex",se);break;case"dir":case"role":case"viewBox":case"width":case"height":On(D,z,se);break;case"style":Lo(D,se,Fe);break;case"data":if(H!=="object"){On(D,"data",se);break}case"src":case"href":if(se===""&&(H!=="a"||z!=="href")){D.removeAttribute(z);break}if(se==null||typeof se=="function"||typeof se=="symbol"||typeof se=="boolean"){D.removeAttribute(z);break}se=oi(""+se),D.setAttribute(z,se);break;case"action":case"formAction":if(typeof se=="function"){D.setAttribute(z,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof Fe=="function"&&(z==="formAction"?(H!=="input"&&ra(D,H,"name",xe.name,xe,null),ra(D,H,"formEncType",xe.formEncType,xe,null),ra(D,H,"formMethod",xe.formMethod,xe,null),ra(D,H,"formTarget",xe.formTarget,xe,null)):(ra(D,H,"encType",xe.encType,xe,null),ra(D,H,"method",xe.method,xe,null),ra(D,H,"target",xe.target,xe,null)));if(se==null||typeof se=="symbol"||typeof se=="boolean"){D.removeAttribute(z);break}se=oi(""+se),D.setAttribute(z,se);break;case"onClick":se!=null&&(D.onclick=l8);break;case"onScroll":se!=null&&Ia("scroll",D);break;case"onScrollEnd":se!=null&&Ia("scrollend",D);break;case"dangerouslySetInnerHTML":if(se!=null){if(typeof se!="object"||!("__html"in se))throw Error(i(61));if(z=se.__html,z!=null){if(xe.children!=null)throw Error(i(60));D.innerHTML=z}}break;case"multiple":D.multiple=se&&typeof se!="function"&&typeof se!="symbol";break;case"muted":D.muted=se&&typeof se!="function"&&typeof se!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(se==null||typeof se=="function"||typeof se=="boolean"||typeof se=="symbol"){D.removeAttribute("xlink:href");break}z=oi(""+se),D.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",z);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":se!=null&&typeof se!="function"&&typeof se!="symbol"?D.setAttribute(z,""+se):D.removeAttribute(z);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":se&&typeof se!="function"&&typeof se!="symbol"?D.setAttribute(z,""):D.removeAttribute(z);break;case"capture":case"download":se===!0?D.setAttribute(z,""):se!==!1&&se!=null&&typeof se!="function"&&typeof se!="symbol"?D.setAttribute(z,se):D.removeAttribute(z);break;case"cols":case"rows":case"size":case"span":se!=null&&typeof se!="function"&&typeof se!="symbol"&&!isNaN(se)&&1<=se?D.setAttribute(z,se):D.removeAttribute(z);break;case"rowSpan":case"start":se==null||typeof se=="function"||typeof se=="symbol"||isNaN(se)?D.removeAttribute(z):D.setAttribute(z,se);break;case"popover":Ia("beforetoggle",D),Ia("toggle",D),Ro(D,"popover",se);break;case"xlinkActuate":uo(D,"http://www.w3.org/1999/xlink","xlink:actuate",se);break;case"xlinkArcrole":uo(D,"http://www.w3.org/1999/xlink","xlink:arcrole",se);break;case"xlinkRole":uo(D,"http://www.w3.org/1999/xlink","xlink:role",se);break;case"xlinkShow":uo(D,"http://www.w3.org/1999/xlink","xlink:show",se);break;case"xlinkTitle":uo(D,"http://www.w3.org/1999/xlink","xlink:title",se);break;case"xlinkType":uo(D,"http://www.w3.org/1999/xlink","xlink:type",se);break;case"xmlBase":uo(D,"http://www.w3.org/XML/1998/namespace","xml:base",se);break;case"xmlLang":uo(D,"http://www.w3.org/XML/1998/namespace","xml:lang",se);break;case"xmlSpace":uo(D,"http://www.w3.org/XML/1998/namespace","xml:space",se);break;case"is":Ro(D,"is",se);break;case"innerText":case"textContent":break;default:(!(2<z.length)||z[0]!=="o"&&z[0]!=="O"||z[1]!=="n"&&z[1]!=="N")&&(z=gi.get(z)||z,Ro(D,z,se))}}function Wn(D,H,z,se,xe,Fe){switch(z){case"style":Lo(D,se,Fe);break;case"dangerouslySetInnerHTML":if(se!=null){if(typeof se!="object"||!("__html"in se))throw Error(i(61));if(z=se.__html,z!=null){if(xe.children!=null)throw Error(i(60));D.innerHTML=z}}break;case"children":typeof se=="string"?En(D,se):(typeof se=="number"||typeof se=="bigint")&&En(D,""+se);break;case"onScroll":se!=null&&Ia("scroll",D);break;case"onScrollEnd":se!=null&&Ia("scrollend",D);break;case"onClick":se!=null&&(D.onclick=l8);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zn.hasOwnProperty(z))e:{if(z[0]==="o"&&z[1]==="n"&&(xe=z.endsWith("Capture"),H=z.slice(2,xe?z.length-7:void 0),Fe=D[An]||null,Fe=Fe!=null?Fe[z]:null,typeof Fe=="function"&&D.removeEventListener(H,Fe,xe),typeof se=="function")){typeof Fe!="function"&&Fe!==null&&(z in D?D[z]=null:D.hasAttribute(z)&&D.removeAttribute(z)),D.addEventListener(H,se,xe);break e}z in D?D[z]=se:se===!0?D.setAttribute(z,""):Ro(D,z,se)}}}function _s(D,H,z){switch(H){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ia("error",D),Ia("load",D);var se=!1,xe=!1,Fe;for(Fe in z)if(z.hasOwnProperty(Fe)){var pt=z[Fe];if(pt!=null)switch(Fe){case"src":se=!0;break;case"srcSet":xe=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,H));default:ra(D,H,Fe,pt,z,null)}}xe&&ra(D,H,"srcSet",z.srcSet,z,null),se&&ra(D,H,"src",z.src,z,null);return;case"input":Ia("invalid",D);var St=Fe=pt=xe=null,on=null,Pn=null;for(se in z)if(z.hasOwnProperty(se)){var Zn=z[se];if(Zn!=null)switch(se){case"name":xe=Zn;break;case"type":pt=Zn;break;case"checked":on=Zn;break;case"defaultChecked":Pn=Zn;break;case"value":Fe=Zn;break;case"defaultValue":St=Zn;break;case"children":case"dangerouslySetInnerHTML":if(Zn!=null)throw Error(i(137,H));break;default:ra(D,H,se,Zn,z,null)}}Ht(D,Fe,St,on,Pn,pt,xe,!1),Ar(D);return;case"select":Ia("invalid",D),se=pt=Fe=null;for(xe in z)if(z.hasOwnProperty(xe)&&(St=z[xe],St!=null))switch(xe){case"value":Fe=St;break;case"defaultValue":pt=St;break;case"multiple":se=St;default:ra(D,H,xe,St,z,null)}H=Fe,z=pt,D.multiple=!!se,H!=null?Nt(D,!!se,H,!1):z!=null&&Nt(D,!!se,z,!0);return;case"textarea":Ia("invalid",D),Fe=xe=se=null;for(pt in z)if(z.hasOwnProperty(pt)&&(St=z[pt],St!=null))switch(pt){case"value":se=St;break;case"defaultValue":xe=St;break;case"children":Fe=St;break;case"dangerouslySetInnerHTML":if(St!=null)throw Error(i(91));break;default:ra(D,H,pt,St,z,null)}qn(D,se,xe,Fe),Ar(D);return;case"option":for(on in z)z.hasOwnProperty(on)&&(se=z[on],se!=null)&&(on==="selected"?D.selected=se&&typeof se!="function"&&typeof se!="symbol":ra(D,H,on,se,z,null));return;case"dialog":Ia("beforetoggle",D),Ia("toggle",D),Ia("cancel",D),Ia("close",D);break;case"iframe":case"object":Ia("load",D);break;case"video":case"audio":for(se=0;se<Ff.length;se++)Ia(Ff[se],D);break;case"image":Ia("error",D),Ia("load",D);break;case"details":Ia("toggle",D);break;case"embed":case"source":case"link":Ia("error",D),Ia("load",D);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Pn in z)if(z.hasOwnProperty(Pn)&&(se=z[Pn],se!=null))switch(Pn){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,H));default:ra(D,H,Pn,se,z,null)}return;default:if(Io(H)){for(Zn in z)z.hasOwnProperty(Zn)&&(se=z[Zn],se!==void 0&&Wn(D,H,Zn,se,z,void 0));return}}for(St in z)z.hasOwnProperty(St)&&(se=z[St],se!=null&&ra(D,H,St,se,z,null))}function u8(D,H,z,se){switch(H){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var xe=null,Fe=null,pt=null,St=null,on=null,Pn=null,Zn=null;for(jn in z){var Qo=z[jn];if(z.hasOwnProperty(jn)&&Qo!=null)switch(jn){case"checked":break;case"value":break;case"defaultValue":on=Qo;default:se.hasOwnProperty(jn)||ra(D,H,jn,null,se,Qo)}}for(var Gn in se){var jn=se[Gn];if(Qo=z[Gn],se.hasOwnProperty(Gn)&&(jn!=null||Qo!=null))switch(Gn){case"type":Fe=jn;break;case"name":xe=jn;break;case"checked":Pn=jn;break;case"defaultChecked":Zn=jn;break;case"value":pt=jn;break;case"defaultValue":St=jn;break;case"children":case"dangerouslySetInnerHTML":if(jn!=null)throw Error(i(137,H));break;default:jn!==Qo&&ra(D,H,Gn,jn,se,Qo)}}Rt(D,pt,St,on,Pn,Zn,Fe,xe);return;case"select":jn=pt=St=Gn=null;for(Fe in z)if(on=z[Fe],z.hasOwnProperty(Fe)&&on!=null)switch(Fe){case"value":break;case"multiple":jn=on;default:se.hasOwnProperty(Fe)||ra(D,H,Fe,null,se,on)}for(xe in se)if(Fe=se[xe],on=z[xe],se.hasOwnProperty(xe)&&(Fe!=null||on!=null))switch(xe){case"value":Gn=Fe;break;case"defaultValue":St=Fe;break;case"multiple":pt=Fe;default:Fe!==on&&ra(D,H,xe,Fe,se,on)}H=St,z=pt,se=jn,Gn!=null?Nt(D,!!z,Gn,!1):!!se!=!!z&&(H!=null?Nt(D,!!z,H,!0):Nt(D,!!z,z?[]:"",!1));return;case"textarea":jn=Gn=null;for(St in z)if(xe=z[St],z.hasOwnProperty(St)&&xe!=null&&!se.hasOwnProperty(St))switch(St){case"value":break;case"children":break;default:ra(D,H,St,null,se,xe)}for(pt in se)if(xe=se[pt],Fe=z[pt],se.hasOwnProperty(pt)&&(xe!=null||Fe!=null))switch(pt){case"value":Gn=xe;break;case"defaultValue":jn=xe;break;case"children":break;case"dangerouslySetInnerHTML":if(xe!=null)throw Error(i(91));break;default:xe!==Fe&&ra(D,H,pt,xe,se,Fe)}_n(D,Gn,jn);return;case"option":for(var wr in z)Gn=z[wr],z.hasOwnProperty(wr)&&Gn!=null&&!se.hasOwnProperty(wr)&&(wr==="selected"?D.selected=!1:ra(D,H,wr,null,se,Gn));for(on in se)Gn=se[on],jn=z[on],se.hasOwnProperty(on)&&Gn!==jn&&(Gn!=null||jn!=null)&&(on==="selected"?D.selected=Gn&&typeof Gn!="function"&&typeof Gn!="symbol":ra(D,H,on,Gn,se,jn));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var br in z)Gn=z[br],z.hasOwnProperty(br)&&Gn!=null&&!se.hasOwnProperty(br)&&ra(D,H,br,null,se,Gn);for(Pn in se)if(Gn=se[Pn],jn=z[Pn],se.hasOwnProperty(Pn)&&Gn!==jn&&(Gn!=null||jn!=null))switch(Pn){case"children":case"dangerouslySetInnerHTML":if(Gn!=null)throw Error(i(137,H));break;default:ra(D,H,Pn,Gn,se,jn)}return;default:if(Io(H)){for(var tA in z)Gn=z[tA],z.hasOwnProperty(tA)&&Gn!==void 0&&!se.hasOwnProperty(tA)&&Wn(D,H,tA,void 0,se,Gn);for(Zn in se)Gn=se[Zn],jn=z[Zn],!se.hasOwnProperty(Zn)||Gn===jn||Gn===void 0&&jn===void 0||Wn(D,H,Zn,Gn,se,jn);return}}for(var Mn in z)Gn=z[Mn],z.hasOwnProperty(Mn)&&Gn!=null&&!se.hasOwnProperty(Mn)&&ra(D,H,Mn,null,se,Gn);for(Qo in se)Gn=se[Qo],jn=z[Qo],!se.hasOwnProperty(Qo)||Gn===jn||Gn==null&&jn==null||ra(D,H,Qo,Gn,se,jn)}var Rh=null,tC=null;function Tm(D){return D.nodeType===9?D:D.ownerDocument}function O1(D){switch(D){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ry(D,H){if(D===0)switch(H){case"svg":return 1;case"math":return 2;default:return 0}return D===1&&H==="foreignObject"?0:D}function $p(D,H){return D==="textarea"||D==="noscript"||typeof H.children=="string"||typeof H.children=="number"||typeof H.children=="bigint"||typeof H.dangerouslySetInnerHTML=="object"&&H.dangerouslySetInnerHTML!==null&&H.dangerouslySetInnerHTML.__html!=null}var W2=null;function G1(){var D=window.event;return D&&D.type==="popstate"?D===W2?!1:(W2=D,!0):(W2=null,!1)}var S3=typeof setTimeout=="function"?setTimeout:void 0,R4=typeof clearTimeout=="function"?clearTimeout:void 0,sy=typeof Promise=="function"?Promise:void 0,g8=typeof queueMicrotask=="function"?queueMicrotask:typeof sy<"u"?function(D){return sy.resolve(null).then(D).catch(D_)}:S3;function D_(D){setTimeout(function(){throw D})}function ay(D){return D==="head"}function Ay(D,H){var z=H,se=0,xe=0;do{var Fe=z.nextSibling;if(D.removeChild(z),Fe&&Fe.nodeType===8)if(z=Fe.data,z==="/$"){if(0<se&&8>se){z=se;var pt=D.ownerDocument;if(z&1&&Zg(pt.documentElement),z&2&&Zg(pt.body),z&4)for(z=pt.head,Zg(z),pt=z.firstChild;pt;){var St=pt.nextSibling,on=pt.nodeName;pt[Lt]||on==="SCRIPT"||on==="STYLE"||on==="LINK"&&pt.rel.toLowerCase()==="stylesheet"||z.removeChild(pt),pt=St}}if(xe===0){D.removeChild(Fe),Lm(H);return}xe--}else z==="$"||z==="$?"||z==="$!"?xe++:se=z.charCodeAt(0)-48;else se=0;z=Fe}while(z);Lm(H)}function Y1(D){var H=D.firstChild;for(H&&H.nodeType===10&&(H=H.nextSibling);H;){var z=H;switch(H=H.nextSibling,z.nodeName){case"HTML":case"HEAD":case"BODY":Y1(z),Ho(z);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(z.rel.toLowerCase()==="stylesheet")continue}D.removeChild(z)}}function Q3(D,H,z,se){for(;D.nodeType===1;){var xe=z;if(D.nodeName.toLowerCase()!==H.toLowerCase()){if(!se&&(D.nodeName!=="INPUT"||D.type!=="hidden"))break}else if(se){if(!D[Lt])switch(H){case"meta":if(!D.hasAttribute("itemprop"))break;return D;case"link":if(Fe=D.getAttribute("rel"),Fe==="stylesheet"&&D.hasAttribute("data-precedence"))break;if(Fe!==xe.rel||D.getAttribute("href")!==(xe.href==null||xe.href===""?null:xe.href)||D.getAttribute("crossorigin")!==(xe.crossOrigin==null?null:xe.crossOrigin)||D.getAttribute("title")!==(xe.title==null?null:xe.title))break;return D;case"style":if(D.hasAttribute("data-precedence"))break;return D;case"script":if(Fe=D.getAttribute("src"),(Fe!==(xe.src==null?null:xe.src)||D.getAttribute("type")!==(xe.type==null?null:xe.type)||D.getAttribute("crossorigin")!==(xe.crossOrigin==null?null:xe.crossOrigin))&&Fe&&D.hasAttribute("async")&&!D.hasAttribute("itemprop"))break;return D;default:return D}}else if(H==="input"&&D.type==="hidden"){var Fe=xe.name==null?null:""+xe.name;if(xe.type==="hidden"&&D.getAttribute("name")===Fe)return D}else return D;if(D=km(D.nextSibling),D===null)break}return null}function m5(D,H,z){if(H==="")return null;for(;D.nodeType!==3;)if((D.nodeType!==1||D.nodeName!=="INPUT"||D.type!=="hidden")&&!z||(D=km(D.nextSibling),D===null))return null;return D}function m9(D){return D.data==="$!"||D.data==="$?"&&D.ownerDocument.readyState==="complete"}function nC(D,H){var z=D.ownerDocument;if(D.data!=="$?"||z.readyState==="complete")H();else{var se=function(){H(),z.removeEventListener("DOMContentLoaded",se)};z.addEventListener("DOMContentLoaded",se),D._reactRetry=se}}function km(D){for(;D!=null;D=D.nextSibling){var H=D.nodeType;if(H===1||H===3)break;if(H===8){if(H=D.data,H==="$"||H==="$!"||H==="$?"||H==="F!"||H==="F")break;if(H==="/$")return null}}return D}var jd=null;function Vu(D){D=D.previousSibling;for(var H=0;D;){if(D.nodeType===8){var z=D.data;if(z==="$"||z==="$!"||z==="$?"){if(H===0)return D;H--}else z==="/$"&&H++}D=D.previousSibling}return null}function Pi(D,H,z){switch(H=Tm(z),D){case"html":if(D=H.documentElement,!D)throw Error(i(452));return D;case"head":if(D=H.head,!D)throw Error(i(453));return D;case"body":if(D=H.body,!D)throw Error(i(454));return D;default:throw Error(i(451))}}function Zg(D){for(var H=D.attributes;H.length;)D.removeAttributeNode(H[0]);Ho(D)}var Ql=new Map,q0=new Set;function cy(D){return typeof D.getRootNode=="function"?D.getRootNode():D.nodeType===9?D:D.ownerDocument}var U1=Y.d;Y.d={f:v3,r:T4,D:N_,C:w3,L:td,m:zl,X:X0,S:vl,M:zu};function v3(){var D=U1.f(),H=P_();return D||H}function T4(D){var H=qe(D);H!==null&&H.tag===5&&H.type==="form"?Qf(H):U1.r(D)}var ed=typeof document>"u"?null:document;function hp(D,H,z){var se=ed;if(se&&typeof H=="string"&&H){var xe=Gt(H);xe='link[rel="'+D+'"][href="'+xe+'"]',typeof z=="string"&&(xe+='[crossorigin="'+z+'"]'),q0.has(xe)||(q0.add(xe),D={rel:D,crossOrigin:z,href:H},se.querySelector(xe)===null&&(H=se.createElement("link"),_s(H,"link",D),Zt(H),se.head.appendChild(H)))}}function N_(D){U1.D(D),hp("dns-prefetch",D,null)}function w3(D,H){U1.C(D,H),hp("preconnect",D,H)}function td(D,H,z){U1.L(D,H,z);var se=ed;if(se&&D&&H){var xe='link[rel="preload"][as="'+Gt(H)+'"]';H==="image"&&z&&z.imageSrcSet?(xe+='[imagesrcset="'+Gt(z.imageSrcSet)+'"]',typeof z.imageSizes=="string"&&(xe+='[imagesizes="'+Gt(z.imageSizes)+'"]')):xe+='[href="'+Gt(D)+'"]';var Fe=xe;switch(H){case"style":Fe=oC(D);break;case"script":Fe=Of(D)}Ql.has(Fe)||(D=u({rel:"preload",href:H==="image"&&z&&z.imageSrcSet?void 0:D,as:H},z),Ql.set(Fe,D),se.querySelector(xe)!==null||H==="style"&&se.querySelector(P3(Fe))||H==="script"&&se.querySelector($2(Fe))||(H=se.createElement("link"),_s(H,"link",D),Zt(H),se.head.appendChild(H)))}}function zl(D,H){U1.m(D,H);var z=ed;if(z&&D){var se=H&&typeof H.as=="string"?H.as:"script",xe='link[rel="modulepreload"][as="'+Gt(se)+'"][href="'+Gt(D)+'"]',Fe=xe;switch(se){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":Fe=Of(D)}if(!Ql.has(Fe)&&(D=u({rel:"modulepreload",href:D},H),Ql.set(Fe,D),z.querySelector(xe)===null)){switch(se){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(z.querySelector($2(Fe)))return}se=z.createElement("link"),_s(se,"link",D),Zt(se),z.head.appendChild(se)}}}function vl(D,H,z){U1.S(D,H,z);var se=ed;if(se&&D){var xe=qt(se).hoistableStyles,Fe=oC(D);H=H||"default";var pt=xe.get(Fe);if(!pt){var St={loading:0,preload:null};if(pt=se.querySelector(P3(Fe)))St.loading=5;else{D=u({rel:"stylesheet",href:D,"data-precedence":H},z),(z=Ql.get(Fe))&&k4(D,z);var on=pt=se.createElement("link");Zt(on),_s(on,"link",D),on._p=new Promise(function(Pn,Zn){on.onload=Pn,on.onerror=Zn}),on.addEventListener("load",function(){St.loading|=1}),on.addEventListener("error",function(){St.loading|=2}),St.loading|=4,_9(pt,H,se)}pt={type:"stylesheet",instance:pt,count:1,state:St},xe.set(Fe,pt)}}}function X0(D,H){U1.X(D,H);var z=ed;if(z&&D){var se=qt(z).hoistableScripts,xe=Of(D),Fe=se.get(xe);Fe||(Fe=z.querySelector($2(xe)),Fe||(D=u({src:D,async:!0},H),(H=Ql.get(xe))&&F4(D,H),Fe=z.createElement("script"),Zt(Fe),_s(Fe,"link",D),z.head.appendChild(Fe)),Fe={type:"script",instance:Fe,count:1,state:null},se.set(xe,Fe))}}function zu(D,H){U1.M(D,H);var z=ed;if(z&&D){var se=qt(z).hoistableScripts,xe=Of(D),Fe=se.get(xe);Fe||(Fe=z.querySelector($2(xe)),Fe||(D=u({src:D,async:!0,type:"module"},H),(H=Ql.get(xe))&&F4(D,H),Fe=z.createElement("script"),Zt(Fe),_s(Fe,"link",D),z.head.appendChild(Fe)),Fe={type:"script",instance:Fe,count:1,state:null},se.set(xe,Fe))}}function Hf(D,H,z,se){var xe=(xe=ge.current)?cy(xe):null;if(!xe)throw Error(i(446));switch(D){case"meta":case"title":return null;case"style":return typeof z.precedence=="string"&&typeof z.href=="string"?(H=oC(z.href),z=qt(xe).hoistableStyles,se=z.get(H),se||(se={type:"style",instance:null,count:0,state:null},z.set(H,se)),se):{type:"void",instance:null,count:0,state:null};case"link":if(z.rel==="stylesheet"&&typeof z.href=="string"&&typeof z.precedence=="string"){D=oC(z.href);var Fe=qt(xe).hoistableStyles,pt=Fe.get(D);if(pt||(xe=xe.ownerDocument||xe,pt={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},Fe.set(D,pt),(Fe=xe.querySelector(P3(D)))&&!Fe._p&&(pt.instance=Fe,pt.state.loading=5),Ql.has(D)||(z={rel:"preload",as:"style",href:z.href,crossOrigin:z.crossOrigin,integrity:z.integrity,media:z.media,hrefLang:z.hrefLang,referrerPolicy:z.referrerPolicy},Ql.set(D,z),Fe||WS(xe,D,z,pt.state))),H&&se===null)throw Error(i(528,""));return pt}if(H&&se!==null)throw Error(i(529,""));return null;case"script":return H=z.async,z=z.src,typeof z=="string"&&H&&typeof H!="function"&&typeof H!="symbol"?(H=Of(z),z=qt(xe).hoistableScripts,se=z.get(H),se||(se={type:"script",instance:null,count:0,state:null},z.set(H,se)),se):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,D))}}function oC(D){return'href="'+Gt(D)+'"'}function P3(D){return'link[rel="stylesheet"]['+D+"]"}function j2(D){return u({},D,{"data-precedence":D.precedence,precedence:null})}function WS(D,H,z,se){D.querySelector('link[rel="preload"][as="style"]['+H+"]")?se.loading=1:(H=D.createElement("link"),se.preload=H,H.addEventListener("load",function(){return se.loading|=1}),H.addEventListener("error",function(){return se.loading|=2}),_s(H,"link",z),Zt(H),D.head.appendChild(H))}function Of(D){return'[src="'+Gt(D)+'"]'}function $2(D){return"script[async]"+D}function q2(D,H,z){if(H.count++,H.instance===null)switch(H.type){case"style":var se=D.querySelector('style[data-href~="'+Gt(z.href)+'"]');if(se)return H.instance=se,Zt(se),se;var xe=u({},z,{"data-href":z.href,"data-precedence":z.precedence,href:null,precedence:null});return se=(D.ownerDocument||D).createElement("style"),Zt(se),_s(se,"style",xe),_9(se,z.precedence,D),H.instance=se;case"stylesheet":xe=oC(z.href);var Fe=D.querySelector(P3(xe));if(Fe)return H.state.loading|=4,H.instance=Fe,Zt(Fe),Fe;se=j2(z),(xe=Ql.get(xe))&&k4(se,xe),Fe=(D.ownerDocument||D).createElement("link"),Zt(Fe);var pt=Fe;return pt._p=new Promise(function(St,on){pt.onload=St,pt.onerror=on}),_s(Fe,"link",se),H.state.loading|=4,_9(Fe,z.precedence,D),H.instance=Fe;case"script":return Fe=Of(z.src),(xe=D.querySelector($2(Fe)))?(H.instance=xe,Zt(xe),xe):(se=z,(xe=Ql.get(Fe))&&(se=u({},z),F4(se,xe)),D=D.ownerDocument||D,xe=D.createElement("script"),Zt(xe),_s(xe,"link",se),D.head.appendChild(xe),H.instance=xe);case"void":return null;default:throw Error(i(443,H.type))}else H.type==="stylesheet"&&(H.state.loading&4)===0&&(se=H.instance,H.state.loading|=4,_9(se,z.precedence,D));return H.instance}function _9(D,H,z){for(var se=z.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),xe=se.length?se[se.length-1]:null,Fe=xe,pt=0;pt<se.length;pt++){var St=se[pt];if(St.dataset.precedence===H)Fe=St;else if(Fe!==xe)break}Fe?Fe.parentNode.insertBefore(D,Fe.nextSibling):(H=z.nodeType===9?z.head:z,H.insertBefore(D,H.firstChild))}function k4(D,H){D.crossOrigin==null&&(D.crossOrigin=H.crossOrigin),D.referrerPolicy==null&&(D.referrerPolicy=H.referrerPolicy),D.title==null&&(D.title=H.title)}function F4(D,H){D.crossOrigin==null&&(D.crossOrigin=H.crossOrigin),D.referrerPolicy==null&&(D.referrerPolicy=H.referrerPolicy),D.integrity==null&&(D.integrity=H.integrity)}var Gf=null;function X2(D,H,z){if(Gf===null){var se=new Map,xe=Gf=new Map;xe.set(z,se)}else xe=Gf,se=xe.get(z),se||(se=new Map,xe.set(z,se));if(se.has(D))return se;for(se.set(D,null),z=z.getElementsByTagName(D),xe=0;xe<z.length;xe++){var Fe=z[xe];if(!(Fe[Lt]||Fe[yn]||D==="link"&&Fe.getAttribute("rel")==="stylesheet")&&Fe.namespaceURI!=="http://www.w3.org/2000/svg"){var pt=Fe.getAttribute(H)||"";pt=D+pt;var St=se.get(pt);St?St.push(Fe):se.set(pt,[Fe])}}return se}function Z2(D,H,z){D=D.ownerDocument||D,D.head.insertBefore(z,H==="title"?D.querySelector("head > title"):null)}function d8(D,H,z){if(z===1||H.itemProp!=null)return!1;switch(D){case"meta":case"title":return!0;case"style":if(typeof H.precedence!="string"||typeof H.href!="string"||H.href==="")break;return!0;case"link":if(typeof H.rel!="string"||typeof H.href!="string"||H.href===""||H.onLoad||H.onError)break;return H.rel==="stylesheet"?(D=H.disabled,typeof H.precedence=="string"&&D==null):!0;case"script":if(H.async&&typeof H.async!="function"&&typeof H.async!="symbol"&&!H.onLoad&&!H.onError&&H.src&&typeof H.src=="string")return!0}return!1}function f9(D){return!(D.type==="stylesheet"&&(D.state.loading&3)===0)}var ex=null;function jS(){}function tx(D,H,z){if(ex===null)throw Error(i(475));var se=ex;if(H.type==="stylesheet"&&(typeof z.media!="string"||matchMedia(z.media).matches!==!1)&&(H.state.loading&4)===0){if(H.instance===null){var xe=oC(z.href),Fe=D.querySelector(P3(xe));if(Fe){D=Fe._p,D!==null&&typeof D=="object"&&typeof D.then=="function"&&(se.count++,se=Ec.bind(se),D.then(se,se)),H.state.loading|=4,H.instance=Fe,Zt(Fe);return}Fe=D.ownerDocument||D,z=j2(z),(xe=Ql.get(xe))&&k4(z,xe),Fe=Fe.createElement("link"),Zt(Fe);var pt=Fe;pt._p=new Promise(function(St,on){pt.onload=St,pt.onerror=on}),_s(Fe,"link",z),H.instance=Fe}se.stylesheets===null&&(se.stylesheets=new Map),se.stylesheets.set(H,D),(D=H.state.preload)&&(H.state.loading&3)===0&&(se.count++,H=Ec.bind(se),D.addEventListener("load",H),D.addEventListener("error",H))}}function fs(){if(ex===null)throw Error(i(475));var D=ex;return D.stylesheets&&D.count===0&&iC(D,D.stylesheets),0<D.count?function(H){var z=setTimeout(function(){if(D.stylesheets&&iC(D,D.stylesheets),D.unsuspend){var se=D.unsuspend;D.unsuspend=null,se()}},6e4);return D.unsuspend=H,function(){D.unsuspend=null,clearTimeout(z)}}:null}function Ec(){if(this.count--,this.count===0){if(this.stylesheets)iC(this,this.stylesheets);else if(this.unsuspend){var D=this.unsuspend;this.unsuspend=null,D()}}}var u0=null;function iC(D,H){D.stylesheets=null,D.unsuspend!==null&&(D.count++,u0=new Map,H.forEach(Th,D),u0=null,Ec.call(D))}function Th(D,H){if(!(H.state.loading&4)){var z=u0.get(D);if(z)var se=z.get(null);else{z=new Map,u0.set(D,z);for(var xe=D.querySelectorAll("link[data-precedence],style[data-precedence]"),Fe=0;Fe<xe.length;Fe++){var pt=xe[Fe];(pt.nodeName==="LINK"||pt.getAttribute("media")!=="not all")&&(z.set(pt.dataset.precedence,pt),se=pt)}se&&z.set(null,se)}xe=H.instance,pt=xe.getAttribute("data-precedence"),Fe=z.get(pt)||se,Fe===se&&z.set(null,xe),z.set(pt,xe),this.count++,se=Ec.bind(this),xe.addEventListener("load",se),xe.addEventListener("error",se),Fe?Fe.parentNode.insertBefore(xe,Fe.nextSibling):(D=D.nodeType===9?D.head:D,D.insertBefore(xe,D.firstChild)),H.state.loading|=4}}var nd={$$typeof:C,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function _5(D,H,z,se,xe,Fe,pt,St){this.tag=1,this.containerInfo=D,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.hiddenUpdates=mt(null),this.identifierPrefix=se,this.onUncaughtError=xe,this.onCaughtError=Fe,this.onRecoverableError=pt,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=St,this.incompleteTransitions=new Map}function Fm(D,H,z,se,xe,Fe,pt,St,on,Pn,Zn,Qo){return D=new _5(D,H,z,pt,St,on,Pn,Qo),H=1,Fe===!0&&(H|=24),Fe=V0(3,null,null,H),D.current=Fe,Fe.stateNode=D,H=RI(),H.refCount++,D.pooledCache=H,H.refCount++,Fe.memoizedState={element:se,isDehydrated:z,cache:H},u3(Fe),D}function R_(D){return D?(D=Np,D):Np}function pp(D,H,z,se,xe,Fe){xe=R_(xe),se.context===null?se.context=xe:se.pendingContext=xe,se=Gd(H),se.payload={element:z},Fe=Fe===void 0?null:Fe,Fe!==null&&(se.callback=Fe),z=Yd(D,se,H),z!==null&&(Sl(z,D,H),b1(z,D,H))}function f5(D,H){if(D=D.memoizedState,D!==null&&D.dehydrated!==null){var z=D.retryLane;D.retryLane=z!==0&&z<H?z:H}}function co(D,H){f5(D,H),(D=D.alternate)&&f5(D,H)}function re(D){if(D.tag===13){var H=Kg(D,67108864);H!==null&&Sl(H,D,67108864),co(D,67108864)}}var X=!0;function me(D,H,z,se){var xe=U.T;U.T=null;var Fe=Y.p;try{Y.p=2,We(D,H,z,se)}finally{Y.p=Fe,U.T=xe}}function He(D,H,z,se){var xe=U.T;U.T=null;var Fe=Y.p;try{Y.p=8,We(D,H,z,se)}finally{Y.p=Fe,U.T=xe}}function We(D,H,z,se){if(X){var xe=ft(se);if(xe===null)yA(D,H,se,wt,z),rr(D,se);else if(Mi(xe,D,H,z,se))se.stopPropagation();else if(rr(D,se),H&4&&-1<Ca.indexOf(D)){for(;xe!==null;){var Fe=qe(xe);if(Fe!==null)switch(Fe.tag){case 3:if(Fe=Fe.stateNode,Fe.current.memoizedState.isDehydrated){var pt=Yt(Fe.pendingLanes);if(pt!==0){var St=Fe;for(St.pendingLanes|=2,St.entangledLanes|=2;pt;){var on=1<<31-gt(pt);St.entanglements[1]|=on,pt&=~on}Bi(Fe),(xs&6)===0&&(ty=we()+500,eA(0))}}break;case 13:St=Kg(Fe,2),St!==null&&Sl(St,Fe,2),P_(),co(Fe,2)}if(Fe=ft(se),Fe===null&&yA(D,H,se,wt,z),Fe===xe)break;xe=Fe}xe!==null&&se.stopPropagation()}else yA(D,H,se,null,z)}}function ft(D){return D=wi(D),zt(D)}var wt=null;function zt(D){if(wt=null,D=Ao(D),D!==null){var H=s(D);if(H===null)D=null;else{var z=H.tag;if(z===13){if(D=a(H),D!==null)return D;D=null}else if(z===3){if(H.stateNode.current.memoizedState.isDehydrated)return H.tag===3?H.stateNode.containerInfo:null;D=null}else H!==D&&(D=null)}}return wt=D,null}function en(D){switch(D){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Te()){case Re:return 2;case Ee:return 8;case ke:case Ce:return 32;case Le:return 268435456;default:return 32}default:return 32}}var In=!1,po=null,wo=null,ci=null,Hi=new Map,pr=new Map,Wr=[],Ca="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function rr(D,H){switch(D){case"focusin":case"focusout":po=null;break;case"dragenter":case"dragleave":wo=null;break;case"mouseover":case"mouseout":ci=null;break;case"pointerover":case"pointerout":Hi.delete(H.pointerId);break;case"gotpointercapture":case"lostpointercapture":pr.delete(H.pointerId)}}function Wi(D,H,z,se,xe,Fe){return D===null||D.nativeEvent!==Fe?(D={blockedOn:H,domEventName:z,eventSystemFlags:se,nativeEvent:Fe,targetContainers:[xe]},H!==null&&(H=qe(H),H!==null&&re(H)),D):(D.eventSystemFlags|=se,H=D.targetContainers,xe!==null&&H.indexOf(xe)===-1&&H.push(xe),D)}function Mi(D,H,z,se,xe){switch(H){case"focusin":return po=Wi(po,D,H,z,se,xe),!0;case"dragenter":return wo=Wi(wo,D,H,z,se,xe),!0;case"mouseover":return ci=Wi(ci,D,H,z,se,xe),!0;case"pointerover":var Fe=xe.pointerId;return Hi.set(Fe,Wi(Hi.get(Fe)||null,D,H,z,se,xe)),!0;case"gotpointercapture":return Fe=xe.pointerId,pr.set(Fe,Wi(pr.get(Fe)||null,D,H,z,se,xe)),!0}return!1}function Gr(D){var H=Ao(D.target);if(H!==null){var z=s(H);if(z!==null){if(H=z.tag,H===13){if(H=a(z),H!==null){D.blockedOn=H,Xt(D.priority,function(){if(z.tag===13){var se=dl();se=dt(se);var xe=Kg(z,se);xe!==null&&Sl(xe,z,se),co(z,se)}});return}}else if(H===3&&z.stateNode.current.memoizedState.isDehydrated){D.blockedOn=z.tag===3?z.stateNode.containerInfo:null;return}}}D.blockedOn=null}function Bc(D){if(D.blockedOn!==null)return!1;for(var H=D.targetContainers;0<H.length;){var z=ft(D.nativeEvent);if(z===null){z=D.nativeEvent;var se=new z.constructor(z.type,z);Ji=se,z.target.dispatchEvent(se),Ji=null}else return H=qe(z),H!==null&&re(H),D.blockedOn=z,!1;H.shift()}return!0}function qp(D,H,z){Bc(D)&&z.delete(H)}function T_(){In=!1,po!==null&&Bc(po)&&(po=null),wo!==null&&Bc(wo)&&(wo=null),ci!==null&&Bc(ci)&&(ci=null),Hi.forEach(qp),pr.forEach(qp)}function ly(D,H){D.blockedOn===H&&(D.blockedOn=null,In||(In=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,T_)))}var K1=null;function uy(D){K1!==D&&(K1=D,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){K1===D&&(K1=null);for(var H=0;H<D.length;H+=3){var z=D[H],se=D[H+1],xe=D[H+2];if(typeof se!="function"){if(zt(se||z)===null)continue;break}var Fe=qe(z);Fe!==null&&(D.splice(H,3),H-=3,n5(Fe,{pending:!0,data:xe,method:z.method,action:se},se,xe))}}))}function Lm(D){function H(on){return ly(on,D)}po!==null&&ly(po,D),wo!==null&&ly(wo,D),ci!==null&&ly(ci,D),Hi.forEach(H),pr.forEach(H);for(var z=0;z<Wr.length;z++){var se=Wr[z];se.blockedOn===D&&(se.blockedOn=null)}for(;0<Wr.length&&(z=Wr[0],z.blockedOn===null);)Gr(z),z.blockedOn===null&&Wr.shift();if(z=(D.ownerDocument||D).$$reactFormReplay,z!=null)for(se=0;se<z.length;se+=3){var xe=z[se],Fe=z[se+1],pt=xe[An]||null;if(typeof Fe=="function")pt||uy(z);else if(pt){var St=null;if(Fe&&Fe.hasAttribute("formAction")){if(xe=Fe,pt=Fe[An]||null)St=pt.formAction;else if(zt(xe)!==null)continue}else St=pt.action;typeof St=="function"?z[se+1]=St:(z.splice(se,3),se-=3),uy(z)}}}function gy(D){this._internalRoot=D}rC.prototype.render=gy.prototype.render=function(D){var H=this._internalRoot;if(H===null)throw Error(i(409));var z=H.current,se=dl();pp(z,se,D,H,null,null)},rC.prototype.unmount=gy.prototype.unmount=function(){var D=this._internalRoot;if(D!==null){this._internalRoot=null;var H=D.containerInfo;pp(D.current,2,null,D,null,null),P_(),H[kn]=null}};function rC(D){this._internalRoot=D}rC.prototype.unstable_scheduleHydration=function(D){if(D){var H=Wt();D={blockedOn:null,target:D,priority:H};for(var z=0;z<Wr.length&&H!==0&&H<Wr[z].priority;z++);Wr.splice(z,0,D),z===0&&Gr(D)}};var dy=n.version;if(dy!=="19.1.0")throw Error(i(527,dy,"19.1.0"));Y.findDOMNode=function(D){var H=D._reactInternals;if(H===void 0)throw typeof D.render=="function"?Error(i(188)):(D=Object.keys(D).join(","),Error(i(268,D)));return D=c(H),D=D!==null?l(D):null,D=D===null?null:D.stateNode,D};var vr={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sC=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sC.isDisabled&&sC.supportsFiber)try{At=sC.inject(vr),at=sC}catch{}}return iV.createRoot=function(D,H){if(!r(D))throw Error(i(299));var z=!1,se="",xe=mg,Fe=_g,pt=O2,St=null;return H!=null&&(H.unstable_strictMode===!0&&(z=!0),H.identifierPrefix!==void 0&&(se=H.identifierPrefix),H.onUncaughtError!==void 0&&(xe=H.onUncaughtError),H.onCaughtError!==void 0&&(Fe=H.onCaughtError),H.onRecoverableError!==void 0&&(pt=H.onRecoverableError),H.unstable_transitionCallbacks!==void 0&&(St=H.unstable_transitionCallbacks)),H=Fm(D,1,!1,null,null,z,se,xe,Fe,pt,St,null),D[kn]=H.current,zS(D),new gy(H)},iV.hydrateRoot=function(D,H,z){if(!r(D))throw Error(i(299));var se=!1,xe="",Fe=mg,pt=_g,St=O2,on=null,Pn=null;return z!=null&&(z.unstable_strictMode===!0&&(se=!0),z.identifierPrefix!==void 0&&(xe=z.identifierPrefix),z.onUncaughtError!==void 0&&(Fe=z.onUncaughtError),z.onCaughtError!==void 0&&(pt=z.onCaughtError),z.onRecoverableError!==void 0&&(St=z.onRecoverableError),z.unstable_transitionCallbacks!==void 0&&(on=z.unstable_transitionCallbacks),z.formState!==void 0&&(Pn=z.formState)),H=Fm(D,1,!0,H,z??null,se,xe,Fe,pt,St,on,Pn),H.context=R_(null),z=H.current,se=dl(),se=dt(se),xe=Gd(se),xe.callback=null,Yd(z,xe,se),z=se,H.current.lanes=z,st(H,z),Bi(H),D[kn]=H.current,zS(D),new rC(H)},iV.version="19.1.0",iV}var rV={},Kit;function F4n(){if(Kit)return rV;Kit=1;var t={env:{},version:""};return t.env.NODE_ENV!=="production"&&(function(){function e(b,v){for(b=b.memoizedState;b!==null&&0<v;)b=b.next,v--;return b}function n(b,v,L,$){if(L>=v.length)return $;var ae=v[L],Ie=ra(b)?b.slice():ms({},b);return Ie[ae]=n(b[ae],v,L+1,$),Ie}function o(b,v,L){if(v.length!==L.length)console.warn("copyWithRename() expects paths of the same length");else{for(var $=0;$<L.length-1;$++)if(v[$]!==L[$]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return i(b,v,L,0)}}function i(b,v,L,$){var ae=v[$],Ie=ra(b)?b.slice():ms({},b);return $+1===v.length?(Ie[L[$]]=Ie[ae],ra(Ie)?Ie.splice(ae,1):delete Ie[ae]):Ie[ae]=i(b[ae],v,L,$+1),Ie}function r(b,v,L){var $=v[L],ae=ra(b)?b.slice():ms({},b);return L+1===v.length?(ra(ae)?ae.splice($,1):delete ae[$],ae):(ae[$]=r(b[$],v,L+1),ae)}function s(){return!1}function a(){return null}function A(){}function c(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function l(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function u(){}function g(b){var v=[];return b.forEach(function(L){v.push(L)}),v.sort().join(", ")}function h(b,v,L,$){return new ku(b,v,L,$)}function d(b,v){b.context===Yf&&(wn(b.current,2,v,b,null,null),XC())}function p(b,v){if(_l!==null){var L=v.staleFamilies;v=v.updatedFamilies,Za(),vp(b.current,v,L),XC()}}function m(b){_l=b}function _(b){return!(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)}function f(b){var v=b,L=b;if(b.alternate)for(;v.return;)v=v.return;else{b=v;do v=b,(v.flags&4098)!==0&&(L=v.return),b=v.return;while(b)}return v.tag===3?L:null}function I(b){if(b.tag===13){var v=b.memoizedState;if(v===null&&(b=b.alternate,b!==null&&(v=b.memoizedState)),v!==null)return v.dehydrated}return null}function C(b){if(f(b)!==b)throw Error("Unable to find node on an unmounted component.")}function y(b){var v=b.alternate;if(!v){if(v=f(b),v===null)throw Error("Unable to find node on an unmounted component.");return v!==b?null:b}for(var L=b,$=v;;){var ae=L.return;if(ae===null)break;var Ie=ae.alternate;if(Ie===null){if($=ae.return,$!==null){L=$;continue}break}if(ae.child===Ie.child){for(Ie=ae.child;Ie;){if(Ie===L)return C(ae),b;if(Ie===$)return C(ae),v;Ie=Ie.sibling}throw Error("Unable to find node on an unmounted component.")}if(L.return!==$.return)L=ae,$=Ie;else{for(var ze=!1,ct=ae.child;ct;){if(ct===L){ze=!0,L=ae,$=Ie;break}if(ct===$){ze=!0,$=ae,L=Ie;break}ct=ct.sibling}if(!ze){for(ct=Ie.child;ct;){if(ct===L){ze=!0,L=Ie,$=ae;break}if(ct===$){ze=!0,$=Ie,L=ae;break}ct=ct.sibling}if(!ze)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(L.alternate!==$)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(L.tag!==3)throw Error("Unable to find node on an unmounted component.");return L.stateNode.current===L?b:v}function x(b){var v=b.tag;if(v===5||v===26||v===27||v===6)return b;for(b=b.child;b!==null;){if(v=x(b),v!==null)return v;b=b.sibling}return null}function E(b){return b===null||typeof b!="object"?null:(b=JS&&b[JS]||b["@@iterator"],typeof b=="function"?b:null)}function B(b){if(b==null)return null;if(typeof b=="function")return b.$$typeof===l8?null:b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case Ia:return"Fragment";case p5:return"Profiler";case h5:return"StrictMode";case B3:return"Suspense";case iy:return"SuspenseList";case eC:return"Activity"}if(typeof b=="object")switch(typeof b.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),b.$$typeof){case ZI:return"Portal";case yA:return(b.displayName||"Context")+".Provider";case Nh:return(b._context.displayName||"Context")+".Consumer";case Lf:var v=b.render;return b=b.displayName,b||(b=v.displayName||v.name||"",b=b!==""?"ForwardRef("+b+")":"ForwardRef"),b;case b3:return v=b.displayName||null,v!==null?v:B(b.type)||"Memo";case dp:v=b._payload,b=b._init;try{return B(b(v))}catch{}}return null}function S(b){return typeof b.tag=="number"?Q(b):typeof b.name=="string"?b.name:null}function Q(b){var v=b.type;switch(b.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(v._context.displayName||"Context")+".Consumer";case 10:return(v.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return b=v.render,b=b.displayName||b.name||"",v.displayName||(b!==""?"ForwardRef("+b+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return v;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(v);case 8:return v===h5?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v;break;case 29:if(v=b._debugInfo,v!=null){for(var L=v.length-1;0<=L;L--)if(typeof v[L].name=="string")return v[L].name}if(b.return!==null)return Q(b.return)}return null}function w(b){return{current:b}}function M(b,v){0>Tm?console.error("Unexpected pop."):(v!==tC[Tm]&&console.error("Unexpected Fiber popped."),b.current=Rh[Tm],Rh[Tm]=null,tC[Tm]=null,Tm--)}function k(b,v,L){Tm++,Rh[Tm]=b.current,tC[Tm]=L,b.current=v}function R(b){return b===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),b}function F(b,v){k($p,v,b),k(ry,b,b),k(O1,null,b);var L=v.nodeType;switch(L){case 9:case 11:L=L===9?"#document":"#fragment",v=(v=v.documentElement)&&(v=v.namespaceURI)?Ps(v):lQ;break;default:if(L=v.tagName,v=v.namespaceURI)v=Ps(v),v=wh(v,L);else switch(L){case"svg":v=ZK;break;case"math":v=kye;break;default:v=lQ}}L=L.toLowerCase(),L=_n(null,L),L={context:v,ancestorInfo:L},M(O1,b),k(O1,L,b)}function O(b){M(O1,b),M(ry,b),M($p,b)}function U(){return R(O1.current)}function Y(b){b.memoizedState!==null&&k(W2,b,b);var v=R(O1.current),L=b.type,$=wh(v.context,L);L=_n(v.ancestorInfo,L),$={context:$,ancestorInfo:L},v!==$&&(k(ry,b,b),k(O1,$,b))}function W(b){ry.current===b&&(M(O1,b),M(ry,b)),W2.current===b&&(M(W2,b),Hte._currentValue=Nk)}function te(b){return typeof Symbol=="function"&&Symbol.toStringTag&&b[Symbol.toStringTag]||b.constructor.name||"Object"}function j(b){try{return J(b),!1}catch{return!0}}function J(b){return""+b}function oe(b,v){if(j(b))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",v,te(b)),J(b)}function ie(b,v){if(j(b))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",v,te(b)),J(b)}function ne(b){if(j(b))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",te(b)),J(b)}function le(b){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var v=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(v.isDisabled)return!0;if(!v.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{jd=v.inject(b),Vu=v}catch(L){console.error("React instrumentation encountered an error: %s.",L)}return!!v.checkDCE}function ge(b){if(typeof nC=="function"&&km(b),Vu&&typeof Vu.setStrictMode=="function")try{Vu.setStrictMode(jd,b)}catch(v){Zg||(Zg=!0,console.error("React instrumentation encountered an error: %s",v))}}function _e(b){Pi=b}function ue(){Pi!==null&&typeof Pi.markCommitStopped=="function"&&Pi.markCommitStopped()}function fe(b){Pi!==null&&typeof Pi.markComponentRenderStarted=="function"&&Pi.markComponentRenderStarted(b)}function pe(){Pi!==null&&typeof Pi.markComponentRenderStopped=="function"&&Pi.markComponentRenderStopped()}function ye(b){Pi!==null&&typeof Pi.markRenderStarted=="function"&&Pi.markRenderStarted(b)}function Me(){Pi!==null&&typeof Pi.markRenderStopped=="function"&&Pi.markRenderStopped()}function ve(b,v){Pi!==null&&typeof Pi.markStateUpdateScheduled=="function"&&Pi.markStateUpdateScheduled(b,v)}function he(b){return b>>>=0,b===0?32:31-(cy(b)/U1|0)|0}function Qe(b){if(b&1)return"SyncHydrationLane";if(b&2)return"Sync";if(b&4)return"InputContinuousHydration";if(b&8)return"InputContinuous";if(b&16)return"DefaultHydration";if(b&32)return"Default";if(b&128)return"TransitionHydration";if(b&4194048)return"Transition";if(b&62914560)return"Retry";if(b&67108864)return"SelectiveHydration";if(b&134217728)return"IdleHydration";if(b&268435456)return"Idle";if(b&536870912)return"Offscreen";if(b&1073741824)return"Deferred"}function Pe(b){var v=b&42;if(v!==0)return v;switch(b&-b){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return b&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),b}}function we(b,v,L){var $=b.pendingLanes;if($===0)return 0;var ae=0,Ie=b.suspendedLanes,ze=b.pingedLanes;b=b.warmLanes;var ct=$&134217727;return ct!==0?($=ct&~Ie,$!==0?ae=Pe($):(ze&=ct,ze!==0?ae=Pe(ze):L||(L=ct&~b,L!==0&&(ae=Pe(L))))):(ct=$&~Ie,ct!==0?ae=Pe(ct):ze!==0?ae=Pe(ze):L||(L=$&~b,L!==0&&(ae=Pe(L)))),ae===0?0:v!==0&&v!==ae&&(v&Ie)===0&&(Ie=ae&-ae,L=v&-v,Ie>=L||Ie===32&&(L&4194048)!==0)?v:ae}function Te(b,v){return(b.pendingLanes&~(b.suspendedLanes&~b.pingedLanes)&v)===0}function Re(b,v){switch(b){case 1:case 2:case 4:case 8:case 64:return v+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return v+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Ee(){var b=v3;return v3<<=1,(v3&4194048)===0&&(v3=256),b}function ke(){var b=T4;return T4<<=1,(T4&62914560)===0&&(T4=4194304),b}function Ce(b){for(var v=[],L=0;31>L;L++)v.push(b);return v}function Le(b,v){b.pendingLanes|=v,v!==268435456&&(b.suspendedLanes=0,b.pingedLanes=0,b.warmLanes=0)}function Ye(b,v,L,$,ae,Ie){var ze=b.pendingLanes;b.pendingLanes=L,b.suspendedLanes=0,b.pingedLanes=0,b.warmLanes=0,b.expiredLanes&=L,b.entangledLanes&=L,b.errorRecoveryDisabledLanes&=L,b.shellSuspendCounter=0;var ct=b.entanglements,Mt=b.expirationTimes,Vt=b.hiddenUpdates;for(L=ze&~L;0<L;){var io=31-q0(L),fo=1<<io;ct[io]=0,Mt[io]=-1;var eo=Vt[io];if(eo!==null)for(Vt[io]=null,io=0;io<eo.length;io++){var Bo=eo[io];Bo!==null&&(Bo.lane&=-536870913)}L&=~fo}$!==0&&tt(b,$,0),Ie!==0&&ae===0&&b.tag!==0&&(b.suspendedLanes|=Ie&~(ze&~v))}function tt(b,v,L){b.pendingLanes|=v,b.suspendedLanes&=~v;var $=31-q0(v);b.entangledLanes|=v,b.entanglements[$]=b.entanglements[$]|1073741824|L&4194090}function At(b,v){var L=b.entangledLanes|=v;for(b=b.entanglements;L;){var $=31-q0(L),ae=1<<$;ae&v|b[$]&v&&(b[$]|=v),L&=~ae}}function at(b){switch(b){case 2:b=1;break;case 8:b=4;break;case 32:b=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:b=128;break;case 268435456:b=134217728;break;default:b=0}return b}function nt(b,v,L){if(Ql)for(b=b.pendingUpdatersLaneMap;0<L;){var $=31-q0(L),ae=1<<$;b[$].add(v),L&=~ae}}function gt(b,v){if(Ql)for(var L=b.pendingUpdatersLaneMap,$=b.memoizedUpdaters;0<v;){var ae=31-q0(v);b=1<<ae,ae=L[ae],0<ae.size&&(ae.forEach(function(Ie){var ze=Ie.alternate;ze!==null&&$.has(ze)||$.add(Ie)}),ae.clear()),v&=~b}}function bt(b){return b&=-b,ed<b?hp<b?(b&134217727)!==0?N_:w3:hp:ed}function Ct(){var b=_s.p;return b!==0?b:(b=window.event,b===void 0?N_:to(b.type))}function Dt(b,v){var L=_s.p;try{return _s.p=b,v()}finally{_s.p=L}}function kt(b){delete b[zl],delete b[vl],delete b[zu],delete b[Hf],delete b[oC]}function it(b){var v=b[zl];if(v)return v;for(var L=b.parentNode;L;){if(v=L[X0]||L[zl]){if(L=v.alternate,v.child!==null||L!==null&&L.child!==null)for(b=Ph(b);b!==null;){if(L=b[zl])return L;b=Ph(b)}return v}b=L,L=b.parentNode}return null}function Yt(b){if(b=b[zl]||b[X0]){var v=b.tag;if(v===5||v===6||v===13||v===26||v===27||v===3)return b}return null}function pn(b){var v=b.tag;if(v===5||v===26||v===27||v===6)return b.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function be(b){var v=b[P3];return v||(v=b[P3]={hoistableStyles:new Map,hoistableScripts:new Map}),v}function et(b){b[j2]=!0}function It(b,v){Bt(b,v),Bt(b+"Capture",v)}function Bt(b,v){Of[b]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",b),Of[b]=v;var L=b.toLowerCase();for($2[L]=b,b==="onDoubleClick"&&($2.ondblclick=b),b=0;b<v.length;b++)WS.add(v[b])}function mt(b,v){q2[v.type]||v.onChange||v.onInput||v.readOnly||v.disabled||v.value==null||console.error(b==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),v.onChange||v.readOnly||v.disabled||v.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function st(b){return G1.call(F4,b)?!0:G1.call(k4,b)?!1:_9.test(b)?F4[b]=!0:(k4[b]=!0,console.error("Invalid attribute name: `%s`",b),!1)}function xt(b,v,L){if(st(v)){if(!b.hasAttribute(v)){switch(typeof L){case"symbol":case"object":return L;case"function":return L;case"boolean":if(L===!1)return L}return L===void 0?void 0:null}return b=b.getAttribute(v),b===""&&L===!0?!0:(oe(L,v),b===""+L?L:b)}}function Xe(b,v,L){if(st(v))if(L===null)b.removeAttribute(v);else{switch(typeof L){case"undefined":case"function":case"symbol":b.removeAttribute(v);return;case"boolean":var $=v.toLowerCase().slice(0,5);if($!=="data-"&&$!=="aria-"){b.removeAttribute(v);return}}oe(L,v),b.setAttribute(v,""+L)}}function Ze(b,v,L){if(L===null)b.removeAttribute(v);else{switch(typeof L){case"undefined":case"function":case"symbol":case"boolean":b.removeAttribute(v);return}oe(L,v),b.setAttribute(v,""+L)}}function dt(b,v,L,$){if($===null)b.removeAttribute(L);else{switch(typeof $){case"undefined":case"function":case"symbol":case"boolean":b.removeAttribute(L);return}oe($,L),b.setAttributeNS(v,L,""+$)}}function Ut(){}function Wt(){if(Gf===0){X2=console.log,Z2=console.info,d8=console.warn,f9=console.error,ex=console.group,jS=console.groupCollapsed,tx=console.groupEnd;var b={configurable:!0,enumerable:!0,value:Ut,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}Gf++}function Xt(){if(Gf--,Gf===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ms({},b,{value:X2}),info:ms({},b,{value:Z2}),warn:ms({},b,{value:d8}),error:ms({},b,{value:f9}),group:ms({},b,{value:ex}),groupCollapsed:ms({},b,{value:jS}),groupEnd:ms({},b,{value:tx})})}0>Gf&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Jt(b){if(fs===void 0)try{throw Error()}catch(L){var v=L.stack.trim().match(/\n( *(at )?)/);fs=v&&v[1]||"",Ec=-1<L.stack.indexOf(`
    at`)?" (<anonymous>)":-1<L.stack.indexOf("@")?"@unknown:0:0":""}return`
`+fs+b+Ec}function yn(b,v){if(!b||u0)return"";var L=iC.get(b);if(L!==void 0)return L;u0=!0,L=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var $=null;$=Wn.H,Wn.H=null,Wt();try{var ae={DetermineComponentFrameRoot:function(){try{if(v){var eo=function(){throw Error()};if(Object.defineProperty(eo.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(eo,[])}catch(Yr){var Bo=Yr}Reflect.construct(b,[],eo)}else{try{eo.call()}catch(Yr){Bo=Yr}b.call(eo.prototype)}}else{try{throw Error()}catch(Yr){Bo=Yr}(eo=b())&&typeof eo.catch=="function"&&eo.catch(function(){})}}catch(Yr){if(Yr&&Bo&&typeof Yr.stack=="string")return[Yr.stack,Bo.stack]}return[null,null]}};ae.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Ie=Object.getOwnPropertyDescriptor(ae.DetermineComponentFrameRoot,"name");Ie&&Ie.configurable&&Object.defineProperty(ae.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var ze=ae.DetermineComponentFrameRoot(),ct=ze[0],Mt=ze[1];if(ct&&Mt){var Vt=ct.split(`
`),io=Mt.split(`
`);for(ze=Ie=0;Ie<Vt.length&&!Vt[Ie].includes("DetermineComponentFrameRoot");)Ie++;for(;ze<io.length&&!io[ze].includes("DetermineComponentFrameRoot");)ze++;if(Ie===Vt.length||ze===io.length)for(Ie=Vt.length-1,ze=io.length-1;1<=Ie&&0<=ze&&Vt[Ie]!==io[ze];)ze--;for(;1<=Ie&&0<=ze;Ie--,ze--)if(Vt[Ie]!==io[ze]){if(Ie!==1||ze!==1)do if(Ie--,ze--,0>ze||Vt[Ie]!==io[ze]){var fo=`
`+Vt[Ie].replace(" at new "," at ");return b.displayName&&fo.includes("<anonymous>")&&(fo=fo.replace("<anonymous>",b.displayName)),typeof b=="function"&&iC.set(b,fo),fo}while(1<=Ie&&0<=ze);break}}}finally{u0=!1,Wn.H=$,Xt(),Error.prepareStackTrace=L}return Vt=(Vt=b?b.displayName||b.name:"")?Jt(Vt):"",typeof b=="function"&&iC.set(b,Vt),Vt}function An(b){var v=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,b=b.stack,Error.prepareStackTrace=v,b.startsWith(`Error: react-stack-top-frame
`)&&(b=b.slice(29)),v=b.indexOf(`
`),v!==-1&&(b=b.slice(v+1)),v=b.indexOf("react-stack-bottom-frame"),v!==-1&&(v=b.lastIndexOf(`
`,v)),v!==-1)b=b.slice(0,v);else return"";return b}function kn(b){switch(b.tag){case 26:case 27:case 5:return Jt(b.type);case 16:return Jt("Lazy");case 13:return Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return yn(b.type,!1);case 11:return yn(b.type.render,!1);case 1:return yn(b.type,!0);case 31:return Jt("Activity");default:return""}}function $n(b){try{var v="";do{v+=kn(b);var L=b._debugInfo;if(L)for(var $=L.length-1;0<=$;$--){var ae=L[$];if(typeof ae.name=="string"){var Ie=v,ze=ae.env,ct=Jt(ae.name+(ze?" ["+ze+"]":""));v=Ie+ct}}b=b.return}while(b);return v}catch(Mt){return`
Error generating stack: `+Mt.message+`
`+Mt.stack}}function ht(b){return(b=b?b.displayName||b.name:"")?Jt(b):""}function Kt(){if(Th===null)return null;var b=Th._debugOwner;return b!=null?S(b):null}function rn(){if(Th===null)return"";var b=Th;try{var v="";switch(b.tag===6&&(b=b.return),b.tag){case 26:case 27:case 5:v+=Jt(b.type);break;case 13:v+=Jt("Suspense");break;case 19:v+=Jt("SuspenseList");break;case 31:v+=Jt("Activity");break;case 30:case 0:case 15:case 1:b._debugOwner||v!==""||(v+=ht(b.type));break;case 11:b._debugOwner||v!==""||(v+=ht(b.type.render))}for(;b;)if(typeof b.tag=="number"){var L=b;b=L._debugOwner;var $=L._debugStack;b&&$&&(typeof $!="string"&&(L._debugStack=$=An($)),$!==""&&(v+=`
`+$))}else if(b.debugStack!=null){var ae=b.debugStack;(b=b.owner)&&ae&&(v+=`
`+An(ae))}else break;var Ie=v}catch(ze){Ie=`
Error generating stack: `+ze.message+`
`+ze.stack}return Ie}function Lt(b,v,L,$,ae,Ie,ze){var ct=Th;Ho(b);try{return b!==null&&b._debugTask?b._debugTask.run(v.bind(null,L,$,ae,Ie,ze)):v(L,$,ae,Ie,ze)}finally{Ho(ct)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Ho(b){Wn.getCurrentStack=b===null?null:rn,nd=!1,Th=b}function Ao(b){switch(typeof b){case"bigint":case"boolean":case"number":case"string":case"undefined":return b;case"object":return ne(b),b;default:return""}}function qe(b){var v=b.type;return(b=b.nodeName)&&b.toLowerCase()==="input"&&(v==="checkbox"||v==="radio")}function vt(b){var v=qe(b)?"checked":"value",L=Object.getOwnPropertyDescriptor(b.constructor.prototype,v);ne(b[v]);var $=""+b[v];if(!b.hasOwnProperty(v)&&typeof L<"u"&&typeof L.get=="function"&&typeof L.set=="function"){var ae=L.get,Ie=L.set;return Object.defineProperty(b,v,{configurable:!0,get:function(){return ae.call(this)},set:function(ze){ne(ze),$=""+ze,Ie.call(this,ze)}}),Object.defineProperty(b,v,{enumerable:L.enumerable}),{getValue:function(){return $},setValue:function(ze){ne(ze),$=""+ze},stopTracking:function(){b._valueTracker=null,delete b[v]}}}}function qt(b){b._valueTracker||(b._valueTracker=vt(b))}function Zt(b){if(!b)return!1;var v=b._valueTracker;if(!v)return!0;var L=v.getValue(),$="";return b&&($=qe(b)?b.checked?"true":"false":b.value),b=$,b!==L?(v.setValue(b),!0):!1}function nn(b){if(b=b||(typeof document<"u"?document:void 0),typeof b>"u")return null;try{return b.activeElement||b.body}catch{return b.body}}function zn(b){return b.replace(_5,function(v){return"\\"+v.charCodeAt(0).toString(16)+" "})}function Nn(b,v){v.checked===void 0||v.defaultChecked===void 0||R_||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Kt()||"A component",v.type),R_=!0),v.value===void 0||v.defaultValue===void 0||Fm||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Kt()||"A component",v.type),Fm=!0)}function Co(b,v,L,$,ae,Ie,ze,ct){b.name="",ze!=null&&typeof ze!="function"&&typeof ze!="symbol"&&typeof ze!="boolean"?(oe(ze,"type"),b.type=ze):b.removeAttribute("type"),v!=null?ze==="number"?(v===0&&b.value===""||b.value!=v)&&(b.value=""+Ao(v)):b.value!==""+Ao(v)&&(b.value=""+Ao(v)):ze!=="submit"&&ze!=="reset"||b.removeAttribute("value"),v!=null?ro(b,ze,Ao(v)):L!=null?ro(b,ze,Ao(L)):$!=null&&b.removeAttribute("value"),ae==null&&Ie!=null&&(b.defaultChecked=!!Ie),ae!=null&&(b.checked=ae&&typeof ae!="function"&&typeof ae!="symbol"),ct!=null&&typeof ct!="function"&&typeof ct!="symbol"&&typeof ct!="boolean"?(oe(ct,"name"),b.name=""+Ao(ct)):b.removeAttribute("name")}function ei(b,v,L,$,ae,Ie,ze,ct){if(Ie!=null&&typeof Ie!="function"&&typeof Ie!="symbol"&&typeof Ie!="boolean"&&(oe(Ie,"type"),b.type=Ie),v!=null||L!=null){if(!(Ie!=="submit"&&Ie!=="reset"||v!=null))return;L=L!=null?""+Ao(L):"",v=v!=null?""+Ao(v):L,ct||v===b.value||(b.value=v),b.defaultValue=v}$=$??ae,$=typeof $!="function"&&typeof $!="symbol"&&!!$,b.checked=ct?b.checked:!!$,b.defaultChecked=!!$,ze!=null&&typeof ze!="function"&&typeof ze!="symbol"&&typeof ze!="boolean"&&(oe(ze,"name"),b.name=ze)}function ro(b,v,L){v==="number"&&nn(b.ownerDocument)===b||b.defaultValue===""+L||(b.defaultValue=""+L)}function To(b,v){v.value==null&&(typeof v.children=="object"&&v.children!==null?ja.Children.forEach(v.children,function(L){L==null||typeof L=="string"||typeof L=="number"||typeof L=="bigint"||f5||(f5=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):v.dangerouslySetInnerHTML==null||co||(co=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),v.selected==null||pp||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),pp=!0)}function yo(){var b=Kt();return b?`

Check the render method of \``+b+"`.":""}function Ro(b,v,L,$){if(b=b.options,v){v={};for(var ae=0;ae<L.length;ae++)v["$"+L[ae]]=!0;for(L=0;L<b.length;L++)ae=v.hasOwnProperty("$"+b[L].value),b[L].selected!==ae&&(b[L].selected=ae),ae&&$&&(b[L].defaultSelected=!0)}else{for(L=""+Ao(L),v=null,ae=0;ae<b.length;ae++){if(b[ae].value===L){b[ae].selected=!0,$&&(b[ae].defaultSelected=!0);return}v!==null||b[ae].disabled||(v=b[ae])}v!==null&&(v.selected=!0)}}function On(b,v){for(b=0;b<X.length;b++){var L=X[b];if(v[L]!=null){var $=ra(v[L]);v.multiple&&!$?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",L,yo()):!v.multiple&&$&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",L,yo())}}v.value===void 0||v.defaultValue===void 0||re||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),re=!0)}function uo(b,v){v.value===void 0||v.defaultValue===void 0||me||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Kt()||"A component"),me=!0),v.children!=null&&v.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function Oo(b,v,L){if(v!=null&&(v=""+Ao(v),v!==b.value&&(b.value=v),L==null)){b.defaultValue!==v&&(b.defaultValue=v);return}b.defaultValue=L!=null?""+Ao(L):""}function ko(b,v,L,$){if(v==null){if($!=null){if(L!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(ra($)){if(1<$.length)throw Error("<textarea> can only have at most one child.");$=$[0]}L=$}L==null&&(L=""),v=L}L=Ao(v),b.defaultValue=L,$=b.textContent,$===L&&$!==""&&$!==null&&(b.value=$)}function Ko(b,v){return b.serverProps===void 0&&b.serverTail.length===0&&b.children.length===1&&3<b.distanceFromLeaf&&b.distanceFromLeaf>15-v?Ko(b.children[0],v):b}function mi(b){return"  "+"  ".repeat(b)}function Fo(b){return"+ "+"  ".repeat(b)}function Nr(b){return"- "+"  ".repeat(b)}function Rs(b){switch(b.tag){case 26:case 27:case 5:return b.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return b=b.type,b.displayName||b.name||null;case 11:return b=b.type.render,b.displayName||b.name||null;case 1:return b=b.type,b.displayName||b.name||null;default:return null}}function ur(b,v){return He.test(b)?(b=JSON.stringify(b),b.length>v-2?8>v?'{"..."}':"{"+b.slice(0,v-7)+'..."}':"{"+b+"}"):b.length>v?5>v?'{"..."}':b.slice(0,v-3)+"...":b}function zi(b,v,L){var $=120-2*L;if(v===null)return Fo(L)+ur(b,$)+`
`;if(typeof v=="string"){for(var ae=0;ae<v.length&&ae<b.length&&v.charCodeAt(ae)===b.charCodeAt(ae);ae++);return ae>$-8&&10<ae&&(b="..."+b.slice(ae-8),v="..."+v.slice(ae-8)),Fo(L)+ur(b,$)+`
`+Nr(L)+ur(v,$)+`
`}return mi(L)+ur(b,$)+`
`}function bi(b){return Object.prototype.toString.call(b).replace(/^\[object (.*)\]$/,function(v,L){return L})}function Ar(b,v){switch(typeof b){case"string":return b=JSON.stringify(b),b.length>v?5>v?'"..."':b.slice(0,v-4)+'..."':b;case"object":if(b===null)return"null";if(ra(b))return"[...]";if(b.$$typeof===Wd)return(v=B(b.type))?"<"+v+">":"<...>";var L=bi(b);if(L==="Object"){L="",v-=2;for(var $ in b)if(b.hasOwnProperty($)){var ae=JSON.stringify($);if(ae!=='"'+$+'"'&&($=ae),v-=$.length-2,ae=Ar(b[$],15>v?v:15),v-=ae.length,0>v){L+=L===""?"...":", ...";break}L+=(L===""?"":",")+$+":"+ae}return"{"+L+"}"}return L;case"function":return(v=b.displayName||b.name)?"function "+v:"function";default:return String(b)}}function ws(b,v){return typeof b!="string"||He.test(b)?"{"+Ar(b,v-2)+"}":b.length>v-2?5>v?'"..."':'"'+b.slice(0,v-5)+'..."':'"'+b+'"'}function ds(b,v,L){var $=120-L.length-b.length,ae=[],Ie;for(Ie in v)if(v.hasOwnProperty(Ie)&&Ie!=="children"){var ze=ws(v[Ie],120-L.length-Ie.length-1);$-=Ie.length+ze.length+2,ae.push(Ie+"="+ze)}return ae.length===0?L+"<"+b+`>
`:0<$?L+"<"+b+" "+ae.join(" ")+`>
`:L+"<"+b+`
`+L+"  "+ae.join(`
`+L+"  ")+`
`+L+`>
`}function Et(b,v,L){var $="",ae=ms({},v),Ie;for(Ie in b)if(b.hasOwnProperty(Ie)){delete ae[Ie];var ze=120-2*L-Ie.length-2,ct=Ar(b[Ie],ze);v.hasOwnProperty(Ie)?(ze=Ar(v[Ie],ze),$+=Fo(L)+Ie+": "+ct+`
`,$+=Nr(L)+Ie+": "+ze+`
`):$+=Fo(L)+Ie+": "+ct+`
`}for(var Mt in ae)ae.hasOwnProperty(Mt)&&(b=Ar(ae[Mt],120-2*L-Mt.length-2),$+=Nr(L)+Mt+": "+b+`
`);return $}function Gt(b,v,L,$){var ae="",Ie=new Map;for(Vt in L)L.hasOwnProperty(Vt)&&Ie.set(Vt.toLowerCase(),Vt);if(Ie.size===1&&Ie.has("children"))ae+=ds(b,v,mi($));else{for(var ze in v)if(v.hasOwnProperty(ze)&&ze!=="children"){var ct=120-2*($+1)-ze.length-1,Mt=Ie.get(ze.toLowerCase());if(Mt!==void 0){Ie.delete(ze.toLowerCase());var Vt=v[ze];Mt=L[Mt];var io=ws(Vt,ct);ct=ws(Mt,ct),typeof Vt=="object"&&Vt!==null&&typeof Mt=="object"&&Mt!==null&&bi(Vt)==="Object"&&bi(Mt)==="Object"&&(2<Object.keys(Vt).length||2<Object.keys(Mt).length||-1<io.indexOf("...")||-1<ct.indexOf("..."))?ae+=mi($+1)+ze+`={{
`+Et(Vt,Mt,$+2)+mi($+1)+`}}
`:(ae+=Fo($+1)+ze+"="+io+`
`,ae+=Nr($+1)+ze+"="+ct+`
`)}else ae+=mi($+1)+ze+"="+ws(v[ze],ct)+`
`}Ie.forEach(function(fo){if(fo!=="children"){var eo=120-2*($+1)-fo.length-1;ae+=Nr($+1)+fo+"="+ws(L[fo],eo)+`
`}}),ae=ae===""?mi($)+"<"+b+`>
`:mi($)+"<"+b+`
`+ae+mi($)+`>
`}return b=L.children,v=v.children,typeof b=="string"||typeof b=="number"||typeof b=="bigint"?(Ie="",(typeof v=="string"||typeof v=="number"||typeof v=="bigint")&&(Ie=""+v),ae+=zi(Ie,""+b,$+1)):(typeof v=="string"||typeof v=="number"||typeof v=="bigint")&&(ae=b==null?ae+zi(""+v,null,$+1):ae+zi(""+v,void 0,$+1)),ae}function Rt(b,v){var L=Rs(b);if(L===null){for(L="",b=b.child;b;)L+=Rt(b,v),b=b.sibling;return L}return mi(v)+"<"+L+`>
`}function Ht(b,v){var L=Ko(b,v);if(L!==b&&(b.children.length!==1||b.children[0]!==L))return mi(v)+`...
`+Ht(L,v+1);L="";var $=b.fiber._debugInfo;if($)for(var ae=0;ae<$.length;ae++){var Ie=$[ae].name;typeof Ie=="string"&&(L+=mi(v)+"<"+Ie+`>
`,v++)}if($="",ae=b.fiber.pendingProps,b.fiber.tag===6)$=zi(ae,b.serverProps,v),v++;else if(Ie=Rs(b.fiber),Ie!==null)if(b.serverProps===void 0){$=v;var ze=120-2*$-Ie.length-2,ct="";for(Vt in ae)if(ae.hasOwnProperty(Vt)&&Vt!=="children"){var Mt=ws(ae[Vt],15);if(ze-=Vt.length+Mt.length+2,0>ze){ct+=" ...";break}ct+=" "+Vt+"="+Mt}$=mi($)+"<"+Ie+ct+`>
`,v++}else b.serverProps===null?($=ds(Ie,ae,Fo(v)),v++):typeof b.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):($=Gt(Ie,ae,b.serverProps,v),v++);var Vt="";for(ae=b.fiber.child,Ie=0;ae&&Ie<b.children.length;)ze=b.children[Ie],ze.fiber===ae?(Vt+=Ht(ze,v),Ie++):Vt+=Rt(ae,v),ae=ae.sibling;for(ae&&0<b.children.length&&(Vt+=mi(v)+`...
`),ae=b.serverTail,b.serverProps===null&&v--,b=0;b<ae.length;b++)Ie=ae[b],Vt=typeof Ie=="string"?Vt+(Nr(v)+ur(Ie,120-2*v)+`
`):Vt+ds(Ie.type,Ie.props,Nr(v));return L+$+Vt}function Qt(b){try{return`

`+Ht(b,0)}catch{return""}}function Nt(b,v,L){for(var $=v,ae=null,Ie=0;$;)$===b&&(Ie=0),ae={fiber:$,children:ae!==null?[ae]:[],serverProps:$===v?L:$===b?null:void 0,serverTail:[],distanceFromLeaf:Ie},Ie++,$=$.return;return ae!==null?Qt(ae).replaceAll(/^[+-]/gm,">"):""}function _n(b,v){var L=ms({},b||en),$={tag:v};return ft.indexOf(v)!==-1&&(L.aTagInScope=null,L.buttonTagInScope=null,L.nobrTagInScope=null),wt.indexOf(v)!==-1&&(L.pTagInButtonScope=null),We.indexOf(v)!==-1&&v!=="address"&&v!=="div"&&v!=="p"&&(L.listItemTagAutoclosing=null,L.dlItemTagAutoclosing=null),L.current=$,v==="form"&&(L.formTag=$),v==="a"&&(L.aTagInScope=$),v==="button"&&(L.buttonTagInScope=$),v==="nobr"&&(L.nobrTagInScope=$),v==="p"&&(L.pTagInButtonScope=$),v==="li"&&(L.listItemTagAutoclosing=$),(v==="dd"||v==="dt")&&(L.dlItemTagAutoclosing=$),v==="#document"||v==="html"?L.containerTagInScope=null:L.containerTagInScope||(L.containerTagInScope=$),b!==null||v!=="#document"&&v!=="html"&&v!=="body"?L.implicitRootScope===!0&&(L.implicitRootScope=!1):L.implicitRootScope=!0,L}function qn(b,v,L){switch(v){case"select":return b==="hr"||b==="option"||b==="optgroup"||b==="script"||b==="template"||b==="#text";case"optgroup":return b==="option"||b==="#text";case"option":return b==="#text";case"tr":return b==="th"||b==="td"||b==="style"||b==="script"||b==="template";case"tbody":case"thead":case"tfoot":return b==="tr"||b==="style"||b==="script"||b==="template";case"colgroup":return b==="col"||b==="template";case"table":return b==="caption"||b==="colgroup"||b==="tbody"||b==="tfoot"||b==="thead"||b==="style"||b==="script"||b==="template";case"head":return b==="base"||b==="basefont"||b==="bgsound"||b==="link"||b==="meta"||b==="title"||b==="noscript"||b==="noframes"||b==="style"||b==="script"||b==="template";case"html":if(L)break;return b==="head"||b==="body"||b==="frameset";case"frameset":return b==="frame";case"#document":if(!L)return b==="html"}switch(b){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return v!=="h1"&&v!=="h2"&&v!=="h3"&&v!=="h4"&&v!=="h5"&&v!=="h6";case"rp":case"rt":return zt.indexOf(v)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return v==null;case"head":return L||v===null;case"html":return L&&v==="#document"||v===null;case"body":return L&&(v==="#document"||v==="html")||v===null}return!0}function En(b,v){switch(b){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return v.pTagInButtonScope;case"form":return v.formTag||v.pTagInButtonScope;case"li":return v.listItemTagAutoclosing;case"dd":case"dt":return v.dlItemTagAutoclosing;case"button":return v.buttonTagInScope;case"a":return v.aTagInScope;case"nobr":return v.nobrTagInScope}return null}function Rn(b,v){for(;b;){switch(b.tag){case 5:case 26:case 27:if(b.type===v)return b}b=b.return}return null}function Hn(b,v){v=v||en;var L=v.current;if(v=(L=qn(b,L&&L.tag,v.implicitRootScope)?null:L)?null:En(b,v),v=L||v,!v)return!0;var $=v.tag;if(v=String(!!L)+"|"+b+"|"+$,In[v])return!1;In[v]=!0;var ae=(v=Th)?Rn(v.return,$):null,Ie=v!==null&&ae!==null?Nt(ae,v,null):"",ze="<"+b+">";return L?(L="",$==="table"&&b==="tr"&&(L+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
This will cause a hydration error.%s`,ze,$,L,Ie)):console.error(`In HTML, %s cannot be a descendant of <%s>.
This will cause a hydration error.%s`,ze,$,Ie),v&&(b=v.return,ae===null||b===null||ae===b&&b._debugOwner===v._debugOwner||Lt(ae,function(){console.error(`<%s> cannot contain a nested %s.
See this log for the ancestor stack trace.`,$,ze)})),!1}function Lo(b,v,L){if(L||qn("#text",v,!1))return!0;if(L="#text|"+v,In[L])return!1;In[L]=!0;var $=(L=Th)?Rn(L,v):null;return L=L!==null&&$!==null?Nt($,L,L.tag!==6?{children:null}:null):"",/\S/.test(b)?console.error(`In HTML, text nodes cannot be a child of <%s>.
This will cause a hydration error.%s`,v,L):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
This will cause a hydration error.%s`,v,L),!1}function Io(b,v){if(v){var L=b.firstChild;if(L&&L===b.lastChild&&L.nodeType===3){L.nodeValue=v;return}}b.textContent=v}function gi(b){return b.replace(Wr,function(v,L){return L.toUpperCase()})}function jo(b,v,L){var $=v.indexOf("--")===0;$||(-1<v.indexOf("-")?rr.hasOwnProperty(v)&&rr[v]||(rr[v]=!0,console.error("Unsupported style property %s. Did you mean %s?",v,gi(v.replace(pr,"ms-")))):Hi.test(v)?rr.hasOwnProperty(v)&&rr[v]||(rr[v]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",v,v.charAt(0).toUpperCase()+v.slice(1))):!Ca.test(L)||Wi.hasOwnProperty(L)&&Wi[L]||(Wi[L]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,v,L.replace(Ca,""))),typeof L=="number"&&(isNaN(L)?Mi||(Mi=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",v)):isFinite(L)||Gr||(Gr=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",v)))),L==null||typeof L=="boolean"||L===""?$?b.setProperty(v,""):v==="float"?b.cssFloat="":b[v]="":$?b.setProperty(v,L):typeof L!="number"||L===0||Bc.has(v)?v==="float"?b.cssFloat=L:(ie(L,v),b[v]=(""+L).trim()):b[v]=L+"px"}function oi(b,v,L){if(v!=null&&typeof v!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(v&&Object.freeze(v),b=b.style,L!=null){if(v){var $={};if(L){for(var ae in L)if(L.hasOwnProperty(ae)&&!v.hasOwnProperty(ae))for(var Ie=po[ae]||[ae],ze=0;ze<Ie.length;ze++)$[Ie[ze]]=ae}for(var ct in v)if(v.hasOwnProperty(ct)&&(!L||L[ct]!==v[ct]))for(ae=po[ct]||[ct],Ie=0;Ie<ae.length;Ie++)$[ae[Ie]]=ct;ct={};for(var Mt in v)for(ae=po[Mt]||[Mt],Ie=0;Ie<ae.length;Ie++)ct[ae[Ie]]=Mt;Mt={};for(var Vt in $)if(ae=$[Vt],(Ie=ct[Vt])&&ae!==Ie&&(ze=ae+","+Ie,!Mt[ze])){Mt[ze]=!0,ze=console;var io=v[ae];ze.error.call(ze,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",io==null||typeof io=="boolean"||io===""?"Removing":"Updating",ae,Ie)}}for(var fo in L)!L.hasOwnProperty(fo)||v!=null&&v.hasOwnProperty(fo)||(fo.indexOf("--")===0?b.setProperty(fo,""):fo==="float"?b.cssFloat="":b[fo]="");for(var eo in v)Vt=v[eo],v.hasOwnProperty(eo)&&L[eo]!==Vt&&jo(b,eo,Vt)}else for($ in v)v.hasOwnProperty($)&&jo(b,$,v[$])}function Ji(b){if(b.indexOf("-")===-1)return!1;switch(b){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function wi(b){return ly.get(b)||b}function Br(b,v){if(G1.call(Lm,v)&&Lm[v])return!0;if(rC.test(v)){if(b="aria-"+v.slice(4).toLowerCase(),b=uy.hasOwnProperty(b)?b:null,b==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",v),Lm[v]=!0;if(v!==b)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",v,b),Lm[v]=!0}if(gy.test(v)){if(b=v.toLowerCase(),b=uy.hasOwnProperty(b)?b:null,b==null)return Lm[v]=!0,!1;v!==b&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",v,b),Lm[v]=!0)}return!0}function gr(b,v){var L=[],$;for($ in v)Br(b,$)||L.push($);v=L.map(function(ae){return"`"+ae+"`"}).join(", "),L.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",v,b):1<L.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",v,b)}function oa(b,v,L,$){if(G1.call(vr,v)&&vr[v])return!0;var ae=v.toLowerCase();if(ae==="onfocusin"||ae==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),vr[v]=!0;if(typeof L=="function"&&(b==="form"&&v==="action"||b==="input"&&v==="formAction"||b==="button"&&v==="formAction"))return!0;if($!=null){if(b=$.possibleRegistrationNames,$.registrationNameDependencies.hasOwnProperty(v))return!0;if($=b.hasOwnProperty(ae)?b[ae]:null,$!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",v,$),vr[v]=!0;if(sC.test(v))return console.error("Unknown event handler property `%s`. It will be ignored.",v),vr[v]=!0}else if(sC.test(v))return D.test(v)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",v),vr[v]=!0;if(H.test(v)||z.test(v))return!0;if(ae==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),vr[v]=!0;if(ae==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),vr[v]=!0;if(ae==="is"&&L!==null&&L!==void 0&&typeof L!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof L),vr[v]=!0;if(typeof L=="number"&&isNaN(L))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",v),vr[v]=!0;if(K1.hasOwnProperty(ae)){if(ae=K1[ae],ae!==v)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",v,ae),vr[v]=!0}else if(v!==ae)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",v,ae),vr[v]=!0;switch(v){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof L){case"boolean":switch(v){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return ae=v.toLowerCase().slice(0,5),ae==="data-"||ae==="aria-"?!0:(L?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',L,v,v,L,v):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',L,v,v,L,v,v,v),vr[v]=!0)}case"function":case"symbol":return vr[v]=!0,!1;case"string":if(L==="false"||L==="true"){switch(v){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",L,v,L==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',v,L),vr[v]=!0}}return!0}function hs(b,v,L){var $=[],ae;for(ae in v)oa(b,ae,v[ae],L)||$.push(ae);v=$.map(function(Ie){return"`"+Ie+"`"}).join(", "),$.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",v,b):1<$.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",v,b)}function Li(b){return se.test(""+b)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":b}function ys(b){return b=b.target||b.srcElement||window,b.correspondingUseElement&&(b=b.correspondingUseElement),b.nodeType===3?b.parentNode:b}function dr(b){var v=Yt(b);if(v&&(b=v.stateNode)){var L=b[vl]||null;e:switch(b=v.stateNode,v.type){case"input":if(Co(b,L.value,L.defaultValue,L.defaultValue,L.checked,L.defaultChecked,L.type,L.name),v=L.name,L.type==="radio"&&v!=null){for(L=b;L.parentNode;)L=L.parentNode;for(oe(v,"name"),L=L.querySelectorAll('input[name="'+zn(""+v)+'"][type="radio"]'),v=0;v<L.length;v++){var $=L[v];if($!==b&&$.form===b.form){var ae=$[vl]||null;if(!ae)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Co($,ae.value,ae.defaultValue,ae.defaultValue,ae.checked,ae.defaultChecked,ae.type,ae.name)}}for(v=0;v<L.length;v++)$=L[v],$.form===b.form&&Zt($)}break e;case"textarea":Oo(b,L.value,L.defaultValue);break e;case"select":v=L.value,v!=null&&Ro(b,!!L.multiple,v,!1)}}}function cA(b,v,L){if(St)return b(v,L);St=!0;try{var $=b(v);return $}finally{if(St=!1,(Fe!==null||pt!==null)&&(XC(),Fe&&(v=Fe,b=pt,pt=Fe=null,dr(v),b)))for(v=0;v<b.length;v++)dr(b[v])}}function vA(b,v){var L=b.stateNode;if(L===null)return null;var $=L[vl]||null;if($===null)return null;L=$[v];e:switch(v){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":($=!$.disabled)||(b=b.type,$=!(b==="button"||b==="input"||b==="select"||b==="textarea")),b=!$;break e;default:b=!1}if(b)return null;if(L&&typeof L!="function")throw Error("Expected `"+v+"` listener to be a function, instead got a value of `"+typeof L+"` type.");return L}function Yl(){if(jn)return jn;var b,v=Gn,L=v.length,$,ae="value"in Qo?Qo.value:Qo.textContent,Ie=ae.length;for(b=0;b<L&&v[b]===ae[b];b++);var ze=L-b;for($=1;$<=ze&&v[L-$]===ae[Ie-$];$++);return jn=ae.slice(b,1<$?1-$:void 0)}function H0(b){var v=b.keyCode;return"charCode"in b?(b=b.charCode,b===0&&v===13&&(b=13)):b=v,b===10&&(b=13),32<=b||b===13?b:0}function ph(){return!0}function Xh(){return!1}function Bl(b){function v(L,$,ae,Ie,ze){this._reactName=L,this._targetInst=ae,this.type=$,this.nativeEvent=Ie,this.target=ze,this.currentTarget=null;for(var ct in b)b.hasOwnProperty(ct)&&(L=b[ct],this[ct]=L?L(Ie):Ie[ct]);return this.isDefaultPrevented=(Ie.defaultPrevented!=null?Ie.defaultPrevented:Ie.returnValue===!1)?ph:Xh,this.isPropagationStopped=Xh,this}return ms(v.prototype,{preventDefault:function(){this.defaultPrevented=!0;var L=this.nativeEvent;L&&(L.preventDefault?L.preventDefault():typeof L.returnValue!="unknown"&&(L.returnValue=!1),this.isDefaultPrevented=ph)},stopPropagation:function(){var L=this.nativeEvent;L&&(L.stopPropagation?L.stopPropagation():typeof L.cancelBubble!="unknown"&&(L.cancelBubble=!0),this.isPropagationStopped=ph)},persist:function(){},isPersistent:ph}),v}function fc(b){var v=this.nativeEvent;return v.getModifierState?v.getModifierState(b):(b=uye[b])?!!v[b]:!1}function Nd(){return fc}function il(b,v){switch(b){case"keyup":return wot.indexOf(v.keyCode)!==-1;case"keydown":return v.keyCode!==gk;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ul(b){return b=b.detail,typeof b=="object"&&"data"in b?b.data:null}function m_(b,v){switch(b){case"compositionend":return Ul(v);case"keypress":return v.which!==hM?null:(hye=!0,hk);case"textInput":return b=v.data,b===hk&&hye?null:b;default:return null}}function ag(b,v){if(Zp)return b==="compositionend"||!dM&&il(b,v)?(b=Yl(),jn=Gn=Qo=null,Zp=!1,b):null;switch(b){case"paste":return null;case"keypress":if(!(v.ctrlKey||v.altKey||v.metaKey)||v.ctrlKey&&v.altKey){if(v.char&&1<v.char.length)return v.char;if(v.which)return String.fromCharCode(v.which)}return null;case"compositionend":return dk&&v.locale!=="ko"?null:v.data;default:return null}}function Rd(b){var v=b&&b.nodeName&&b.nodeName.toLowerCase();return v==="input"?!!V1[b.type]:v==="textarea"}function mh(b){if(!on)return!1;b="on"+b;var v=b in document;return v||(v=document.createElement("div"),v.setAttribute(b,"return;"),v=typeof v[b]=="function"),v}function mm(b,v,L,$){Fe?pt?pt.push($):pt=[$]:Fe=$,v=Nf(v,"onChange"),0<v.length&&(L=new br("onChange","change",null,L,$),b.push({event:L,listeners:v}))}function gu(b){yg(b,0)}function Ag(b){var v=pn(b);if(Zt(v))return b}function C0(b,v){if(b==="change")return v}function FC(){z1&&(z1.detachEvent("onpropertychange",O0),nx=z1=null)}function O0(b){if(b.propertyName==="value"&&Ag(nx)){var v=[];mm(v,nx,b,ys(b)),cA(gu,v)}}function __(b,v,L){b==="focusin"?(FC(),z1=v,nx=L,z1.attachEvent("onpropertychange",O0)):b==="focusout"&&FC()}function Qp(b){if(b==="selectionchange"||b==="keyup"||b==="keydown")return Ag(nx)}function _1(b,v){if(b==="click")return Ag(v)}function tr(b,v){if(b==="input"||b==="change")return Ag(v)}function Vo(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&v!==v}function wA(b,v){if(em(b,v))return!0;if(typeof b!="object"||b===null||typeof v!="object"||v===null)return!1;var L=Object.keys(b),$=Object.keys(v);if(L.length!==$.length)return!1;for($=0;$<L.length;$++){var ae=L[$];if(!G1.call(v,ae)||!em(b[ae],v[ae]))return!1}return!0}function Td(b){for(;b&&b.firstChild;)b=b.firstChild;return b}function da(b,v){var L=Td(b);b=0;for(var $;L;){if(L.nodeType===3){if($=b+L.textContent.length,b<=v&&$>=v)return{node:L,offset:v-b};b=$}e:{for(;L;){if(L.nextSibling){L=L.nextSibling;break e}L=L.parentNode}L=void 0}L=Td(L)}}function Zh(b,v){return b&&v?b===v?!0:b&&b.nodeType===3?!1:v&&v.nodeType===3?Zh(b,v.parentNode):"contains"in b?b.contains(v):b.compareDocumentPosition?!!(b.compareDocumentPosition(v)&16):!1:!1}function mf(b){b=b!=null&&b.ownerDocument!=null&&b.ownerDocument.defaultView!=null?b.ownerDocument.defaultView:window;for(var v=nn(b.document);v instanceof b.HTMLIFrameElement;){try{var L=typeof v.contentWindow.location.href=="string"}catch{L=!1}if(L)b=v.contentWindow;else break;v=nn(b.document)}return v}function LC(b){var v=b&&b.nodeName&&b.nodeName.toLowerCase();return v&&(v==="input"&&(b.type==="text"||b.type==="search"||b.type==="tel"||b.type==="url"||b.type==="password")||v==="textarea"||b.contentEditable==="true")}function _f(b,v,L){var $=L.window===L?L.document:L.nodeType===9?L:L.ownerDocument;sc||M3==null||M3!==nn($)||($=M3,"selectionStart"in $&&LC($)?$={start:$.selectionStart,end:$.selectionEnd}:($=($.ownerDocument&&$.ownerDocument.defaultView||window).getSelection(),$={anchorNode:$.anchorNode,anchorOffset:$.anchorOffset,focusNode:$.focusNode,focusOffset:$.focusOffset}),_M&&wA(_M,$)||(_M=$,$=Nf(mM,"onSelect"),0<$.length&&(v=new br("onSelect","select",null,v,L),b.push({event:v,listeners:$}),v.target=M3)))}function _m(b,v){var L={};return L[b.toLowerCase()]=v.toLowerCase(),L["Webkit"+b]="webkit"+v,L["Moz"+b]="moz"+v,L}function du(b){if(xA[b])return xA[b];if(!wl[b])return b;var v=wl[b],L;for(L in v)if(v.hasOwnProperty(L)&&L in YA)return xA[b]=v[L];return b}function cg(b,v){IM.set(b,v),It(v,[b])}function Ug(b,v){if(typeof b=="object"&&b!==null){var L=C9.get(b);return L!==void 0?L:(v={value:b,source:v,stack:$n(v)},C9.set(b,v),v)}return{value:b,source:v,stack:$n(v)}}function Vc(){for(var b=C5,v=_k=C5=0;v<b;){var L=Hm[v];Hm[v++]=null;var $=Hm[v];Hm[v++]=null;var ae=Hm[v];Hm[v++]=null;var Ie=Hm[v];if(Hm[v++]=null,$!==null&&ae!==null){var ze=$.pending;ze===null?ae.next=ae:(ae.next=ze.next,ze.next=ae),$.pending=ae}Ie!==0&&PA(L,ae,Ie)}}function ha(b,v,L,$){Hm[C5++]=b,Hm[C5++]=v,Hm[C5++]=L,Hm[C5++]=$,_k|=$,b.lanes|=$,b=b.alternate,b!==null&&(b.lanes|=$)}function BI(b,v,L,$){return ha(b,v,L,$),_h(b)}function G0(b,v){return ha(b,null,null,v),_h(b)}function PA(b,v,L){b.lanes|=L;var $=b.alternate;$!==null&&($.lanes|=L);for(var ae=!1,Ie=b.return;Ie!==null;)Ie.childLanes|=L,$=Ie.alternate,$!==null&&($.childLanes|=L),Ie.tag===22&&(b=Ie.stateNode,b===null||b._visibility&ml||(ae=!0)),b=Ie,Ie=Ie.return;return b.tag===3?(Ie=b.stateNode,ae&&v!==null&&(ae=31-q0(L),b=Ie.hiddenUpdates,$=b[ae],$===null?b[ae]=[v]:$.push(v),v.lane=L|536870912),Ie):null}function _h(b){if(Nte>ydr)throw vk=Nte=0,Rte=$ot=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");vk>xdr&&(vk=0,Rte=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),b.alternate===null&&(b.flags&4098)!==0&&rc(b);for(var v=b,L=v.return;L!==null;)v.alternate===null&&(v.flags&4098)!==0&&rc(b),v=L,L=v.return;return v.tag===3?v.stateNode:null}function n0(b){if(_l===null)return b;var v=_l(b);return v===void 0?b:v.current}function HC(b){if(_l===null)return b;var v=_l(b);return v===void 0?b!=null&&typeof b.render=="function"&&(v=n0(b.render),b.render!==v)?(v={$$typeof:Lf,render:v},b.displayName!==void 0&&(v.displayName=b.displayName),v):b:v.current}function f1(b,v){if(_l===null)return!1;var L=b.elementType;v=v.type;var $=!1,ae=typeof v=="object"&&v!==null?v.$$typeof:null;switch(b.tag){case 1:typeof v=="function"&&($=!0);break;case 0:(typeof v=="function"||ae===dp)&&($=!0);break;case 11:(ae===Lf||ae===dp)&&($=!0);break;case 14:case 15:(ae===b3||ae===dp)&&($=!0);break;default:return!1}return!!($&&(b=_l(L),b!==void 0&&b===_l(v)))}function fm(b){_l!==null&&typeof WeakSet=="function"&&(ox===null&&(ox=new WeakSet),ox.add(b))}function vp(b,v,L){var $=b.alternate,ae=b.child,Ie=b.sibling,ze=b.tag,ct=b.type,Mt=null;switch(ze){case 0:case 15:case 1:Mt=ct;break;case 11:Mt=ct.render}if(_l===null)throw Error("Expected resolveFamily to be set during hot reload.");var Vt=!1;ct=!1,Mt!==null&&(Mt=_l(Mt),Mt!==void 0&&(L.has(Mt)?ct=!0:v.has(Mt)&&(ze===1?ct=!0:Vt=!0))),ox!==null&&(ox.has(b)||$!==null&&ox.has($))&&(ct=!0),ct&&(b._debugNeedsRemount=!0),(ct||Vt)&&($=G0(b,2),$!==null&&yc($,b,2)),ae===null||ct||vp(ae,v,L),Ie!==null&&vp(Ie,v,L)}function ku(b,v,L,$){this.tag=b,this.key=L,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=v,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=$,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,fk||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function ot(b){return b=b.prototype,!(!b||!b.isReactComponent)}function rt(b,v){var L=b.alternate;switch(L===null?(L=h(b.tag,v,b.key,b.mode),L.elementType=b.elementType,L.type=b.type,L.stateNode=b.stateNode,L._debugOwner=b._debugOwner,L._debugStack=b._debugStack,L._debugTask=b._debugTask,L._debugHookTypes=b._debugHookTypes,L.alternate=b,b.alternate=L):(L.pendingProps=v,L.type=b.type,L.flags=0,L.subtreeFlags=0,L.deletions=null,L.actualDuration=-0,L.actualStartTime=-1.1),L.flags=b.flags&65011712,L.childLanes=b.childLanes,L.lanes=b.lanes,L.child=b.child,L.memoizedProps=b.memoizedProps,L.memoizedState=b.memoizedState,L.updateQueue=b.updateQueue,v=b.dependencies,L.dependencies=v===null?null:{lanes:v.lanes,firstContext:v.firstContext,_debugThenableState:v._debugThenableState},L.sibling=b.sibling,L.index=b.index,L.ref=b.ref,L.refCleanup=b.refCleanup,L.selfBaseDuration=b.selfBaseDuration,L.treeBaseDuration=b.treeBaseDuration,L._debugInfo=b._debugInfo,L._debugNeedsRemount=b._debugNeedsRemount,L.tag){case 0:case 15:L.type=n0(b.type);break;case 1:L.type=n0(b.type);break;case 11:L.type=HC(b.type)}return L}function Ot(b,v){b.flags&=65011714;var L=b.alternate;return L===null?(b.childLanes=0,b.lanes=v,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null,b.selfBaseDuration=0,b.treeBaseDuration=0):(b.childLanes=L.childLanes,b.lanes=L.lanes,b.child=L.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=L.memoizedProps,b.memoizedState=L.memoizedState,b.updateQueue=L.updateQueue,b.type=L.type,v=L.dependencies,b.dependencies=v===null?null:{lanes:v.lanes,firstContext:v.firstContext,_debugThenableState:v._debugThenableState},b.selfBaseDuration=L.selfBaseDuration,b.treeBaseDuration=L.treeBaseDuration),b}function an(b,v,L,$,ae,Ie){var ze=0,ct=b;if(typeof b=="function")ot(b)&&(ze=1),ct=n0(ct);else if(typeof b=="string")ze=U(),ze=oy(b,L,ze)?26:b==="html"||b==="head"||b==="body"?27:5;else e:switch(b){case eC:return v=h(31,L,v,ae),v.elementType=eC,v.lanes=Ie,v;case Ia:return Xn(L.children,ae,Ie,v);case h5:ze=8,ae|=Fh,ae|=AC;break;case p5:return b=L,$=ae,typeof b.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof b.id),v=h(12,b,v,$|Q0),v.elementType=p5,v.lanes=Ie,v.stateNode={effectDuration:0,passiveEffectDuration:0},v;case B3:return v=h(13,L,v,ae),v.elementType=B3,v.lanes=Ie,v;case iy:return v=h(19,L,v,ae),v.elementType=iy,v.lanes=Ie,v;default:if(typeof b=="object"&&b!==null)switch(b.$$typeof){case zS:case yA:ze=10;break e;case Nh:ze=9;break e;case Lf:ze=11,ct=HC(ct);break e;case b3:ze=14;break e;case dp:ze=16,ct=null;break e}ct="",(b===void 0||typeof b=="object"&&b!==null&&Object.keys(b).length===0)&&(ct+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),b===null?L="null":ra(b)?L="array":b!==void 0&&b.$$typeof===Wd?(L="<"+(B(b.type)||"Unknown")+" />",ct=" Did you accidentally export a JSX literal instead of a component?"):L=typeof b,(ze=$?S($):null)&&(ct+=`

Check the render method of \``+ze+"`."),ze=29,L=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(L+"."+ct)),ct=null}return v=h(ze,L,v,ae),v.elementType=b,v.type=ct,v.lanes=Ie,v._debugOwner=$,v}function Dn(b,v,L){return v=an(b.type,b.key,b.props,b._owner,v,L),v._debugOwner=b._owner,v._debugStack=b._debugStack,v._debugTask=b._debugTask,v}function Xn(b,v,L,$){return b=h(7,b,$,v),b.lanes=L,b}function oo(b,v,L){return b=h(6,b,null,v),b.lanes=L,b}function vo(b,v,L){return v=h(4,b.children!==null?b.children:[],b.key,v),v.lanes=L,v.stateNode={containerInfo:b.containerInfo,pendingChildren:null,implementation:b.implementation},v}function Xo(b,v){qr(),XS[L4++]=m8,XS[L4++]=CM,CM=b,m8=v}function Ti(b,v,L){qr(),Om[D3++]=y9,Om[D3++]=cC,Om[D3++]=ZS,ZS=b;var $=y9;b=cC;var ae=32-q0($)-1;$&=~(1<<ae),L+=1;var Ie=32-q0(v)+ae;if(30<Ie){var ze=ae-ae%5;Ie=($&(1<<ze)-1).toString(32),$>>=ze,ae-=ze,y9=1<<32-q0(v)+ae|L<<ae|$,cC=Ie+b}else y9=1<<Ie|L<<ae|$,cC=b}function ir(b){qr(),b.return!==null&&(Xo(b,1),Ti(b,1,0))}function Gs(b){for(;b===CM;)CM=XS[--L4],XS[L4]=null,m8=XS[--L4],XS[L4]=null;for(;b===ZS;)ZS=Om[--D3],Om[D3]=null,cC=Om[--D3],Om[D3]=null,y9=Om[--D3],Om[D3]=null}function qr(){Hc||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function ps(b,v){if(b.return===null){if(py===null)py={fiber:b,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:v};else{if(py.fiber!==b)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");py.distanceFromLeaf>v&&(py.distanceFromLeaf=v)}return py}var L=ps(b.return,v+1).children;return 0<L.length&&L[L.length-1].fiber===b?(L=L[L.length-1],L.distanceFromLeaf>v&&(L.distanceFromLeaf=v),L):(v={fiber:b,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:v},L.push(v),v)}function Ic(b,v){x9||(b=ps(b,0),b.serverProps=null,v!==null&&(v=os(v),b.serverTail.push(v)))}function lc(b){var v="",L=py;throw L!==null&&(py=null,v=Qt(L)),hr(Ug(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:

- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.

It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.

https://react.dev/link/hydration-mismatch`+v),b)),_8}function ka(b){var v=b.stateNode,L=b.type,$=b.memoizedProps;switch(v[zl]=b,v[vl]=$,fa(L,$),L){case"dialog":ss("cancel",v),ss("close",v);break;case"iframe":case"object":case"embed":ss("load",v);break;case"video":case"audio":for(L=0;L<Tte.length;L++)ss(Tte[L],v);break;case"source":ss("error",v);break;case"img":case"image":case"link":ss("error",v),ss("load",v);break;case"details":ss("toggle",v);break;case"input":mt("input",$),ss("invalid",v),Nn(v,$),ei(v,$.value,$.defaultValue,$.checked,$.defaultChecked,$.type,$.name,!0),qt(v);break;case"option":To(v,$);break;case"select":mt("select",$),ss("invalid",v),On(v,$);break;case"textarea":mt("textarea",$),ss("invalid",v),uo(v,$),ko(v,$.value,$.defaultValue,$.children),qt(v)}L=$.children,typeof L!="string"&&typeof L!="number"&&typeof L!="bigint"||v.textContent===""+L||$.suppressHydrationWarning===!0||N1(v.textContent,L)?($.popover!=null&&(ss("beforetoggle",v),ss("toggle",v)),$.onScroll!=null&&ss("scroll",v),$.onScrollEnd!=null&&ss("scrollend",v),$.onClick!=null&&(v.onclick=Up),v=!0):v=!1,v||lc(b)}function gn(b){for(W1=b.return;W1;)switch(W1.tag){case 5:case 13:Uf=!1;return;case 27:case 3:Uf=!0;return;default:W1=W1.return}}function bn(b){if(b!==W1)return!1;if(!Hc)return gn(b),Hc=!0,!1;var v=b.tag,L;if((L=v!==3&&v!==27)&&((L=v===5)&&(L=b.type,L=!(L!=="form"&&L!=="button")||qg(b.type,b.memoizedProps)),L=!L),L&&$d){for(L=$d;L;){var $=ps(b,0),ae=os(L);$.serverTail.push(ae),L=ae.type==="Suspense"?k1(L):Zr(L.nextSibling)}lc(b)}if(gn(b),v===13){if(b=b.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");$d=k1(b)}else v===27?(v=$d,xc(b.type)?(b=Ait,Ait=null,$d=b):$d=v):$d=W1?Zr(b.stateNode.nextSibling):null;return!0}function go(){$d=W1=null,x9=Hc=!1}function Go(){var b=qd;return b!==null&&(rx===null?rx=b:rx.push.apply(rx,b),qd=null),b}function hr(b){qd===null?qd=[b]:qd.push(b)}function ia(){var b=py;if(b!==null){py=null;for(var v=Qt(b);0<b.children.length;)b=b.children[0];Lt(b.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:

- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.

It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.

%s%s`,"https://react.dev/link/hydration-mismatch",v)})}}function lA(){B9=yM=null,xM=!1}function MA(b,v,L){k(fte,v._currentValue,b),v._currentValue=L,k(eQ,v._currentRenderer,b),v._currentRenderer!==void 0&&v._currentRenderer!==null&&v._currentRenderer!==kK&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),v._currentRenderer=kK}function Fa(b,v){b._currentValue=fte.current;var L=eQ.current;M(eQ,v),b._currentRenderer=L,M(fte,v)}function La(b,v,L){for(;b!==null;){var $=b.alternate;if((b.childLanes&v)!==v?(b.childLanes|=v,$!==null&&($.childLanes|=v)):$!==null&&($.childLanes&v)!==v&&($.childLanes|=v),b===L)break;b=b.return}b!==L&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Y0(b,v,L,$){var ae=b.child;for(ae!==null&&(ae.return=b);ae!==null;){var Ie=ae.dependencies;if(Ie!==null){var ze=ae.child;Ie=Ie.firstContext;e:for(;Ie!==null;){var ct=Ie;Ie=ae;for(var Mt=0;Mt<v.length;Mt++)if(ct.context===v[Mt]){Ie.lanes|=L,ct=Ie.alternate,ct!==null&&(ct.lanes|=L),La(Ie.return,L,b),$||(ze=null);break e}Ie=ct.next}}else if(ae.tag===18){if(ze=ae.return,ze===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");ze.lanes|=L,Ie=ze.alternate,Ie!==null&&(Ie.lanes|=L),La(ze,L,b),ze=null}else ze=ae.child;if(ze!==null)ze.return=ae;else for(ze=ae;ze!==null;){if(ze===b){ze=null;break}if(ae=ze.sibling,ae!==null){ae.return=ze.return,ze=ae;break}ze=ze.return}ae=ze}}function Hr(b,v,L,$){b=null;for(var ae=v,Ie=!1;ae!==null;){if(!Ie){if((ae.flags&524288)!==0)Ie=!0;else if((ae.flags&262144)!==0)break}if(ae.tag===10){var ze=ae.alternate;if(ze===null)throw Error("Should have a current fiber. This is a bug in React.");if(ze=ze.memoizedProps,ze!==null){var ct=ae.type;em(ae.pendingProps.value,ze.value)||(b!==null?b.push(ct):b=[ct])}}else if(ae===W2.current){if(ze=ae.alternate,ze===null)throw Error("Should have a current fiber. This is a bug in React.");ze.memoizedState.memoizedState!==ae.memoizedState.memoizedState&&(b!==null?b.push(Hte):b=[Hte])}ae=ae.return}b!==null&&Y0(v,b,L,$),v.flags|=262144}function fh(b){for(b=b.firstContext;b!==null;){if(!em(b.context._currentValue,b.memoizedValue))return!0;b=b.next}return!1}function Ih(b){yM=b,B9=null,b=b.dependencies,b!==null&&(b.firstContext=null)}function DA(b){return xM&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),bI(yM,b)}function OC(b,v){return yM===null&&Ih(b),bI(b,v)}function bI(b,v){var L=v._currentValue;if(v={context:v,memoizedValue:L,next:null},B9===null){if(b===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");B9=v,b.dependencies={lanes:0,firstContext:v,_debugThenableState:null},b.flags|=524288}else B9=B9.next=v;return L}function hu(){return{controller:new tQ,data:new Map,refCount:0}}function lg(b){b.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),b.refCount++}function wp(b){b.refCount--,0>b.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),b.refCount===0&&Ik(EM,function(){b.controller.abort()})}function kd(){var b=N3;return N3=0,b}function ff(b){var v=N3;return N3=b,v}function I1(b){var v=N3;return N3+=b,v}function p2(b){bg=nQ(),0>b.actualStartTime&&(b.actualStartTime=bg)}function Pp(b){if(0<=bg){var v=nQ()-bg;b.actualDuration+=v,b.selfBaseDuration=v,bg=-1}}function SI(b){if(0<=bg){var v=nQ()-bg;b.actualDuration+=v,bg=-1}}function Mp(){if(0<=bg){var b=nQ()-bg;bg=-1,N3+=b}}function f_(){bg=nQ()}function U0(b){for(var v=b.child;v;)b.actualDuration+=v.actualDuration,v=v.sibling}function S4(b,v){if(BM===null){var L=BM=[];LK=0,f8=c5(),oQ={status:"pending",value:void 0,then:function($){L.push($)}}}return LK++,v.then(ep,ep),v}function ep(){if(--LK===0&&BM!==null){oQ!==null&&(oQ.status="fulfilled");var b=BM;BM=null,f8=0,oQ=null;for(var v=0;v<b.length;v++)(0,b[v])()}}function If(b,v){var L=[],$={status:"pending",value:null,reason:null,then:function(ae){L.push(ae)}};return b.then(function(){$.status="fulfilled",$.value=v;for(var ae=0;ae<L.length;ae++)(0,L[ae])(v)},function(ae){for($.status="rejected",$.reason=ae,ae=0;ae<L.length;ae++)(0,L[ae])(void 0)}),$}function A3(){var b=I8.current;return b!==null?b:Sg.pooledCache}function m2(b,v){v===null?k(I8,I8.current,b):k(I8,v.pool,b)}function KE(){var b=A3();return b===null?null:{parent:Lh._currentValue,pool:b}}function Fd(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function _2(b){return b=b.status,b==="fulfilled"||b==="rejected"}function o0(){}function tp(b,v,L){Wn.actQueue!==null&&(Wn.didUsePromise=!0);var $=b.thenables;switch(L=$[L],L===void 0?$.push(v):L!==v&&(b.didWarnAboutUncachedPromise||(b.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),v.then(o0,o0),v=L),v.status){case"fulfilled":return v.value;case"rejected":throw b=v.reason,pu(b),b;default:if(typeof v.status=="string")v.then(o0,o0);else{if(b=Sg,b!==null&&100<b.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");b=v,b.status="pending",b.then(function(ae){if(v.status==="pending"){var Ie=v;Ie.status="fulfilled",Ie.value=ae}},function(ae){if(v.status==="pending"){var Ie=v;Ie.status="rejected",Ie.reason=ae}})}switch(v.status){case"fulfilled":return v.value;case"rejected":throw b=v.reason,pu(b),b}throw _o=v,di=!0,Ne}}function Im(){if(_o===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var b=_o;return _o=null,di=!1,b}function pu(b){if(b===Ne||b===Ft)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function K0(b){b.updateQueue={baseState:b.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zc(b,v){b=b.updateQueue,v.updateQueue===b&&(v.updateQueue={baseState:b.baseState,firstBaseUpdate:b.firstBaseUpdate,lastBaseUpdate:b.lastBaseUpdate,shared:b.shared,callbacks:null})}function np(b){return{lane:b,tag:iQ,payload:null,callback:null,next:null}}function y0(b,v,L){var $=b.updateQueue;if($===null)return null;if($=$.shared,cr===$&&!Do){var ae=Q(b);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.

Please update the following component: %s`,ae),Do=!0}return(v0&ix)!==x5?(ae=$.pending,ae===null?v.next=v:(v.next=ae.next,ae.next=v),$.pending=v,v=_h(b),PA(b,null,L),v):(ha(b,$,v,L),_h(b))}function Cm(b,v,L){if(v=v.updateQueue,v!==null&&(v=v.shared,(L&4194048)!==0)){var $=v.lanes;$&=b.pendingLanes,L|=$,v.lanes=L,At(b,L)}}function Dp(b,v){var L=b.updateQueue,$=b.alternate;if($!==null&&($=$.updateQueue,L===$)){var ae=null,Ie=null;if(L=L.firstBaseUpdate,L!==null){do{var ze={lane:L.lane,tag:L.tag,payload:L.payload,callback:null,next:null};Ie===null?ae=Ie=ze:Ie=Ie.next=ze,L=L.next}while(L!==null);Ie===null?ae=Ie=v:Ie=Ie.next=v}else ae=Ie=v;L={baseState:$.baseState,firstBaseUpdate:ae,lastBaseUpdate:Ie,shared:$.shared,callbacks:$.callbacks},b.updateQueue=L;return}b=L.lastBaseUpdate,b===null?L.firstBaseUpdate=v:b.next=v,L.lastBaseUpdate=v}function Kg(){if(gc){var b=oQ;if(b!==null)throw b}}function Ld(b,v,L,$){gc=!1;var ae=b.updateQueue;vn=!1,cr=ae.shared;var Ie=ae.firstBaseUpdate,ze=ae.lastBaseUpdate,ct=ae.shared.pending;if(ct!==null){ae.shared.pending=null;var Mt=ct,Vt=Mt.next;Mt.next=null,ze===null?Ie=Vt:ze.next=Vt,ze=Mt;var io=b.alternate;io!==null&&(io=io.updateQueue,ct=io.lastBaseUpdate,ct!==ze&&(ct===null?io.firstBaseUpdate=Vt:ct.next=Vt,io.lastBaseUpdate=Mt))}if(Ie!==null){var fo=ae.baseState;ze=0,io=Vt=Mt=null,ct=Ie;do{var eo=ct.lane&-536870913,Bo=eo!==ct.lane;if(Bo?(bc&eo)===eo:($&eo)===eo){eo!==0&&eo===f8&&(gc=!0),io!==null&&(io=io.next={lane:0,tag:ct.tag,payload:ct.payload,callback:null,next:null});e:{eo=b;var Yr=ct,Ea=v,Qg=L;switch(Yr.tag){case T3:if(Yr=Yr.payload,typeof Yr=="function"){xM=!0;var Oc=Yr.call(Qg,fo,Ea);if(eo.mode&Fh){ge(!0);try{Yr.call(Qg,fo,Ea)}finally{ge(!1)}}xM=!1,fo=Oc;break e}fo=Yr;break e;case mn:eo.flags=eo.flags&-65537|128;case iQ:if(Oc=Yr.payload,typeof Oc=="function"){if(xM=!0,Yr=Oc.call(Qg,fo,Ea),eo.mode&Fh){ge(!0);try{Oc.call(Qg,fo,Ea)}finally{ge(!1)}}xM=!1}else Yr=Oc;if(Yr==null)break e;fo=ms({},fo,Yr);break e;case fn:vn=!0}}eo=ct.callback,eo!==null&&(b.flags|=64,Bo&&(b.flags|=8192),Bo=ae.callbacks,Bo===null?ae.callbacks=[eo]:Bo.push(eo))}else Bo={lane:eo,tag:ct.tag,payload:ct.payload,callback:ct.callback,next:null},io===null?(Vt=io=Bo,Mt=fo):io=io.next=Bo,ze|=eo;if(ct=ct.next,ct===null){if(ct=ae.shared.pending,ct===null)break;Bo=ct,ct=Bo.next,Bo.next=null,ae.lastBaseUpdate=Bo,ae.shared.pending=null}}while(!0);io===null&&(Mt=fo),ae.baseState=Mt,ae.firstBaseUpdate=Vt,ae.lastBaseUpdate=io,Ie===null&&(ae.shared.lanes=0),DM|=ze,b.lanes=ze,b.memoizedState=fo}cr=null}function f2(b,v){if(typeof b!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+b);b.call(v)}function Np(b,v){var L=b.shared.hiddenCallbacks;if(L!==null)for(b.shared.hiddenCallbacks=null,b=0;b<L.length;b++)f2(L[b],v)}function QI(b,v){var L=b.callbacks;if(L!==null)for(b.callbacks=null,b=0;b<L.length;b++)f2(L[b],v)}function V0(b,v){var L=x8;k(xa,L,b),k(Ms,v,b),x8=L|v.baseLanes}function Vg(b){k(xa,x8,b),k(Ms,Ms.current,b)}function op(b){x8=xa.current,M(Ms,b),M(xa,b)}function bs(){var b=mo;H4===null?H4=[b]:H4.push(b)}function Zo(){var b=mo;if(H4!==null&&(sQ++,H4[sQ]!==b)){var v=Q($a);if(!Eu.has(v)&&(Eu.add(v),H4!==null)){for(var L="",$=0;$<=sQ;$++){var ae=H4[$],Ie=$===sQ?b:ae;for(ae=$+1+". "+ae;30>ae.length;)ae+=" ";ae+=Ie+`
`,L+=ae}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
%s   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`,v,L)}}}function ip(b){b==null||ra(b)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",mo,typeof b)}function vI(){var b=Q($a);_ye.has(b)||(_ye.add(b),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",b))}function nc(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function i0(b,v){if(xte)return!1;if(v===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",mo),!1;b.length!==v.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.

Previous: %s
Incoming: %s`,mo,"["+v.join(", ")+"]","["+b.join(", ")+"]");for(var L=0;L<v.length&&L<b.length;L++)if(!em(b[L],v[L]))return!1;return!0}function Cf(b,v,L,$,ae,Ie){wM=Ie,$a=v,H4=b!==null?b._debugHookTypes:null,sQ=-1,xte=b!==null&&b.type!==v.type,(Object.prototype.toString.call(L)==="[object AsyncFunction]"||Object.prototype.toString.call(L)==="[object AsyncGeneratorFunction]")&&(Ie=Q($a),y5.has(Ie)||(y5.add(Ie),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",Ie===null?"An unknown Component":"<"+Ie+">"))),v.memoizedState=null,v.updateQueue=null,v.lanes=0,Wn.H=b!==null&&b.memoizedState!==null?Mot:H4!==null?b3n:Pot,xk=Ie=(v.mode&Fh)!==fl;var ze=Dot(L,$,ae);if(xk=!1,HK&&(ze=wI(v,L,$,ae)),Ie){ge(!0);try{ze=wI(v,L,$,ae)}finally{ge(!1)}}return ug(b,v),ze}function ug(b,v){v._debugHookTypes=H4,v.dependencies===null?rQ!==null&&(v.dependencies={lanes:0,firstContext:null,_debugThenableState:rQ}):v.dependencies._debugThenableState=rQ,Wn.H=Cye;var L=Ju!==null&&Ju.next!==null;if(wM=0,H4=mo=F_=Ju=$a=null,sQ=-1,b!==null&&(b.flags&65011712)!==(v.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),fye=!1,yte=0,rQ=null,L)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");b===null||j1||(b=b.dependencies,b!==null&&fh(b)&&(j1=!0)),di?(di=!1,b=!0):b=!1,b&&(v=Q(v)||"Unknown",Hh.has(v)||y5.has(v)||(Hh.add(v),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function wI(b,v,L,$){$a=b;var ae=0;do{if(HK&&(rQ=null),yte=0,HK=!1,ae>=ldr)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(ae+=1,xte=!1,F_=Ju=null,b.updateQueue!=null){var Ie=b.updateQueue;Ie.lastEffect=null,Ie.events=null,Ie.stores=null,Ie.memoCache!=null&&(Ie.memoCache.index=0)}sQ=-1,Wn.H=S3n,Ie=Dot(v,L,$)}while(HK);return Ie}function rp(){var b=Wn.H,v=b.useState()[0];return v=typeof v.then=="function"?PI(v):v,b=b.useState()[0],(Ju!==null?Ju.memoizedState:null)!==b&&($a.flags|=1024),v}function Rp(){var b=Iye!==0;return Iye=0,b}function oc(b,v,L){v.updateQueue=b.updateQueue,v.flags=(v.mode&AC)!==fl?v.flags&-402655237:v.flags&-2053,b.lanes&=~L}function gg(b){if(fye){for(b=b.memoizedState;b!==null;){var v=b.queue;v!==null&&(v.pending=null),b=b.next}fye=!1}wM=0,H4=F_=Ju=$a=null,sQ=-1,mo=null,HK=!1,yte=Iye=0,rQ=null}function Cc(){var b={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return F_===null?$a.memoizedState=F_=b:F_=F_.next=b,F_}function pa(){if(Ju===null){var b=$a.alternate;b=b!==null?b.memoizedState:null}else b=Ju.next;var v=F_===null?$a.memoizedState:F_.next;if(v!==null)F_=v,Ju=b;else{if(b===null)throw $a.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Ju=b,b={memoizedState:Ju.memoizedState,baseState:Ju.baseState,baseQueue:Ju.baseQueue,queue:Ju.queue,next:null},F_===null?$a.memoizedState=F_=b:F_=F_.next=b}return F_}function c3(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function PI(b){var v=yte;return yte+=1,rQ===null&&(rQ=Fd()),b=tp(rQ,b,v),v=$a,(F_===null?v.memoizedState:F_.next)===null&&(v=v.alternate,Wn.H=v!==null&&v.memoizedState!==null?Mot:Pot),b}function Tp(b){if(b!==null&&typeof b=="object"){if(typeof b.then=="function")return PI(b);if(b.$$typeof===yA)return DA(b)}throw Error("An unsupported type was passed to use(): "+String(b))}function rl(b){var v=null,L=$a.updateQueue;if(L!==null&&(v=L.memoCache),v==null){var $=$a.alternate;$!==null&&($=$.updateQueue,$!==null&&($=$.memoCache,$!=null&&(v={data:$.data.map(function(ae){return ae.slice()}),index:0})))}if(v==null&&(v={data:[],index:0}),L===null&&(L=c3(),$a.updateQueue=L),L.memoCache=v,L=v.data[v.index],L===void 0||xte)for(L=v.data[v.index]=Array(b),$=0;$<b;$++)L[$]=J2;else L.length!==b&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",L.length,b);return v.index++,L}function IA(b,v){return typeof v=="function"?v(b):v}function uA(b,v,L){var $=Cc();if(L!==void 0){var ae=L(v);if(xk){ge(!0);try{L(v)}finally{ge(!1)}}}else ae=v;return $.memoizedState=$.baseState=ae,b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:b,lastRenderedState:ae},$.queue=b,b=b.dispatch=Hp.bind(null,$a,b),[$.memoizedState,b]}function ym(b){var v=pa();return kp(v,Ju,b)}function kp(b,v,L){var $=b.queue;if($===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");$.lastRenderedReducer=L;var ae=b.baseQueue,Ie=$.pending;if(Ie!==null){if(ae!==null){var ze=ae.next;ae.next=Ie.next,Ie.next=ze}v.baseQueue!==ae&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),v.baseQueue=ae=Ie,$.pending=null}if(Ie=b.baseState,ae===null)b.memoizedState=Ie;else{v=ae.next;var ct=ze=null,Mt=null,Vt=v,io=!1;do{var fo=Vt.lane&-536870913;if(fo!==Vt.lane?(bc&fo)===fo:(wM&fo)===fo){var eo=Vt.revertLane;if(eo===0)Mt!==null&&(Mt=Mt.next={lane:0,revertLane:0,action:Vt.action,hasEagerState:Vt.hasEagerState,eagerState:Vt.eagerState,next:null}),fo===f8&&(io=!0);else if((wM&eo)===eo){Vt=Vt.next,eo===f8&&(io=!0);continue}else fo={lane:0,revertLane:Vt.revertLane,action:Vt.action,hasEagerState:Vt.hasEagerState,eagerState:Vt.eagerState,next:null},Mt===null?(ct=Mt=fo,ze=Ie):Mt=Mt.next=fo,$a.lanes|=eo,DM|=eo;fo=Vt.action,xk&&L(Ie,fo),Ie=Vt.hasEagerState?Vt.eagerState:L(Ie,fo)}else eo={lane:fo,revertLane:Vt.revertLane,action:Vt.action,hasEagerState:Vt.hasEagerState,eagerState:Vt.eagerState,next:null},Mt===null?(ct=Mt=eo,ze=Ie):Mt=Mt.next=eo,$a.lanes|=fo,DM|=fo;Vt=Vt.next}while(Vt!==null&&Vt!==v);if(Mt===null?ze=Ie:Mt.next=ct,!em(Ie,b.memoizedState)&&(j1=!0,io&&(L=oQ,L!==null)))throw L;b.memoizedState=Ie,b.baseState=ze,b.baseQueue=Mt,$.lastRenderedState=Ie}return ae===null&&($.lanes=0),[b.memoizedState,$.dispatch]}function C1(b){var v=pa(),L=v.queue;if(L===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");L.lastRenderedReducer=b;var $=L.dispatch,ae=L.pending,Ie=v.memoizedState;if(ae!==null){L.pending=null;var ze=ae=ae.next;do Ie=b(Ie,ze.action),ze=ze.next;while(ze!==ae);em(Ie,v.memoizedState)||(j1=!0),v.memoizedState=Ie,v.baseQueue===null&&(v.baseState=Ie),L.lastRenderedState=Ie}return[Ie,$]}function xm(b,v,L){var $=$a,ae=Cc();if(Hc){if(L===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var Ie=L();sa||Ie===L()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),sa=!0)}else{if(Ie=v(),sa||(L=v(),em(Ie,L)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),sa=!0)),Sg===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(bc&124)!==0||y1($,v,Ie)}return ae.memoizedState=Ie,L={value:Ie,getSnapshot:v},ae.queue=L,TI(MI.bind(null,$,L,b),[b]),$.flags|=2048,Ch(vi|od,C_(),I_.bind(null,$,L,Ie,v),null),Ie}function I2(b,v,L){var $=$a,ae=pa(),Ie=Hc;if(Ie){if(L===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");L=L()}else if(L=v(),!sa){var ze=v();em(L,ze)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),sa=!0)}(ze=!em((Ju||ae).memoizedState,L))&&(ae.memoizedState=L,j1=!0),ae=ae.queue;var ct=MI.bind(null,$,ae,b);if(z0(2048,od,ct,[b]),ae.getSnapshot!==v||ze||F_!==null&&F_.memoizedState.tag&vi){if($.flags|=2048,Ch(vi|od,C_(),I_.bind(null,$,ae,L,v),null),Sg===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ie||(wM&124)!==0||y1($,v,L)}return L}function y1(b,v,L){b.flags|=16384,b={getSnapshot:v,value:L},v=$a.updateQueue,v===null?(v=c3(),$a.updateQueue=v,v.stores=[b]):(L=v.stores,L===null?v.stores=[b]:L.push(b))}function I_(b,v,L,$){v.value=L,v.getSnapshot=$,VE(v)&&GC(b)}function MI(b,v,L){return L(function(){VE(v)&&GC(b)})}function VE(b){var v=b.getSnapshot;b=b.value;try{var L=v();return!em(b,L)}catch{return!0}}function GC(b){var v=G0(b,2);v!==null&&yc(v,b,2)}function YC(b){var v=Cc();if(typeof b=="function"){var L=b;if(b=L(),xk){ge(!0);try{L()}finally{ge(!1)}}}return v.memoizedState=v.baseState=b,v.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:IA,lastRenderedState:b},v}function yf(b){b=YC(b);var v=b.queue,L=VC.bind(null,$a,v);return v.dispatch=L,[b.memoizedState,L]}function Fu(b){var v=Cc();v.memoizedState=v.baseState=b;var L={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return v.queue=L,v=Xr.bind(null,$a,!0,L),L.dispatch=v,[b,v]}function sp(b,v){var L=pa();return xf(L,Ju,b,v)}function xf(b,v,L,$){return b.baseState=L,kp(b,Ju,typeof $=="function"?$:IA)}function C2(b,v){var L=pa();return Ju!==null?xf(L,Ju,b,v):(L.baseState=b,[b,L.queue.dispatch])}function $s(b,v,L,$,ae){if(v2(b))throw Error("Cannot update form state while rendering.");if(b=v.action,b!==null){var Ie={payload:ae,action:b,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ze){Ie.listeners.push(ze)}};Wn.T!==null?L(!0):Ie.isTransition=!1,$(Ie),L=v.pending,L===null?(Ie.next=v.pending=Ie,DI(v,Ie)):(Ie.next=L.next,v.pending=L.next=Ie)}}function DI(b,v){var L=v.action,$=v.payload,ae=b.state;if(v.isTransition){var Ie=Wn.T,ze={};Wn.T=ze,Wn.T._updatedFibers=new Set;try{var ct=L(ae,$),Mt=Wn.S;Mt!==null&&Mt(ze,ct),y2(b,v,ct)}catch(Vt){dg(b,v,Vt)}finally{Wn.T=Ie,Ie===null&&ze._updatedFibers&&(b=ze._updatedFibers.size,ze._updatedFibers.clear(),10<b&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{ze=L(ae,$),y2(b,v,ze)}catch(Vt){dg(b,v,Vt)}}function y2(b,v,L){L!==null&&typeof L=="object"&&typeof L.then=="function"?(L.then(function($){x1(b,v,$)},function($){return dg(b,v,$)}),v.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):x1(b,v,L)}function x1(b,v,L){v.status="fulfilled",v.value=L,x2(v),b.state=L,v=b.pending,v!==null&&(L=v.next,L===v?b.pending=null:(L=L.next,v.next=L,DI(b,L)))}function dg(b,v,L){var $=b.pending;if(b.pending=null,$!==null){$=$.next;do v.status="rejected",v.reason=L,x2(v),v=v.next;while(v!==$)}b.action=null}function x2(b){b=b.listeners;for(var v=0;v<b.length;v++)(0,b[v])()}function zE(b,v){return v}function E2(b,v){if(Hc){var L=Sg.formState;if(L!==null){e:{var $=$a;if(Hc){if($d){t:{for(var ae=$d,Ie=Uf;ae.nodeType!==8;){if(!Ie){ae=null;break t}if(ae=Zr(ae.nextSibling),ae===null){ae=null;break t}}Ie=ae.data,ae=Ie===iit||Ie===BEn?ae:null}if(ae){$d=Zr(ae.nextSibling),$=ae.data===iit;break e}}lc($)}$=!1}$&&(v=L[0])}}return L=Cc(),L.memoizedState=L.baseState=v,$={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zE,lastRenderedState:v},L.queue=$,L=VC.bind(null,$a,$),$.dispatch=L,$=YC(!1),Ie=Xr.bind(null,$a,!1,$.queue),$=Cc(),ae={state:v,dispatch:null,action:b,pending:null},$.queue=ae,L=$s.bind(null,$a,ae,Ie,L),ae.dispatch=L,$.memoizedState=b,[v,L,!1]}function NI(b){var v=pa();return Fp(v,Ju,b)}function Fp(b,v,L){if(v=kp(b,v,zE)[0],b=ym(IA)[0],typeof v=="object"&&v!==null&&typeof v.then=="function")try{var $=PI(v)}catch(ze){throw ze===Ne?Ft:ze}else $=v;v=pa();var ae=v.queue,Ie=ae.dispatch;return L!==v.memoizedState&&($a.flags|=2048,Ch(vi|od,C_(),qs.bind(null,ae,L),null)),[$,Ie,b]}function qs(b,v){b.action=v}function RI(b){var v=pa(),L=Ju;if(L!==null)return Fp(v,L,b);pa(),v=v.memoizedState,L=pa();var $=L.queue.dispatch;return L.memoizedState=b,[v,$,!1]}function Ch(b,v,L,$){return b={tag:b,create:L,deps:$,inst:v,next:null},v=$a.updateQueue,v===null&&(v=c3(),$a.updateQueue=v),L=v.lastEffect,L===null?v.lastEffect=b.next=b:($=L.next,L.next=b,b.next=$,v.lastEffect=b),b}function C_(){return{destroy:void 0,resource:void 0}}function yh(b){var v=Cc();return b={current:b},v.memoizedState=b}function Em(b,v,L,$){var ae=Cc();$=$===void 0?null:$,$a.flags|=b,ae.memoizedState=Ch(vi|v,C_(),L,$)}function z0(b,v,L,$){var ae=pa();$=$===void 0?null:$;var Ie=ae.memoizedState.inst;Ju!==null&&$!==null&&i0($,Ju.memoizedState.deps)?ae.memoizedState=Ch(v,Ie,L,$):($a.flags|=b,ae.memoizedState=Ch(vi|v,Ie,L,$))}function TI(b,v){($a.mode&AC)!==fl&&($a.mode&J1)===fl?Em(276826112,od,b,v):Em(8390656,od,b,v)}function Ef(b,v){var L=4194308;return($a.mode&AC)!==fl&&(L|=134217728),Em(L,ya,b,v)}function Q4(b,v){if(typeof v=="function"){b=b();var L=v(b);return function(){typeof L=="function"?L():v(null)}}if(v!=null)return v.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(v).join(", ")+"}"),b=b(),v.current=b,function(){v.current=null}}function B2(b,v,L){typeof v!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",v!==null?typeof v:"null"),L=L!=null?L.concat([b]):null;var $=4194308;($a.mode&AC)!==fl&&($|=134217728),Em($,ya,Q4.bind(null,v,b),L)}function Lp(b,v,L){typeof v!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",v!==null?typeof v:"null"),L=L!=null?L.concat([b]):null,z0(4,ya,Q4.bind(null,v,b),L)}function ma(b,v){return Cc().memoizedState=[b,v===void 0?null:v],b}function b2(b,v){var L=pa();v=v===void 0?null:v;var $=L.memoizedState;return v!==null&&i0(v,$[1])?$[0]:(L.memoizedState=[b,v],b)}function Hd(b,v){var L=Cc();v=v===void 0?null:v;var $=b();if(xk){ge(!0);try{b()}finally{ge(!1)}}return L.memoizedState=[$,v],$}function E1(b,v){var L=pa();v=v===void 0?null:v;var $=L.memoizedState;if(v!==null&&i0(v,$[1]))return $[0];if($=b(),xk){ge(!0);try{b()}finally{ge(!1)}}return L.memoizedState=[$,v],$}function kI(b,v){var L=Cc();return FI(L,b,v)}function Od(b,v){var L=pa();return UC(L,Ju.memoizedState,b,v)}function B1(b,v){var L=pa();return Ju===null?FI(L,b,v):UC(L,Ju.memoizedState,b,v)}function FI(b,v,L){return L===void 0||(wM&1073741824)!==0?b.memoizedState=v:(b.memoizedState=L,b=h9(),$a.lanes|=b,DM|=b,L)}function UC(b,v,L,$){return em(L,v)?L:Ms.current!==null?(b=FI(b,L,$),em(b,v)||(j1=!0),b):(wM&42)===0?(j1=!0,b.memoizedState=L):(b=h9(),$a.lanes|=b,DM|=b,v)}function S2(b,v,L,$,ae){var Ie=_s.p;_s.p=Ie!==0&&Ie<hp?Ie:hp;var ze=Wn.T,ct={};Wn.T=ct,Xr(b,!1,v,L),ct._updatedFibers=new Set;try{var Mt=ae(),Vt=Wn.S;if(Vt!==null&&Vt(ct,Mt),Mt!==null&&typeof Mt=="object"&&typeof Mt.then=="function"){var io=If(Mt,$);Bm(b,v,io,Kd(b))}else Bm(b,v,$,Kd(b))}catch(fo){Bm(b,v,{then:function(){},status:"rejected",reason:fo},Kd(b))}finally{_s.p=Ie,Wn.T=ze,ze===null&&ct._updatedFibers&&(b=ct._updatedFibers.size,ct._updatedFibers.clear(),10<b&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function KC(b,v,L,$){if(b.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var ae=l3(b).queue;S2(b,ae,v,Nk,L===null?u:function(){return y_(b),L($)})}function l3(b){var v=b.memoizedState;if(v!==null)return v;v={memoizedState:Nk,baseState:Nk,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:IA,lastRenderedState:Nk},next:null};var L={};return v.next={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:IA,lastRenderedState:L},next:null},b.memoizedState=v,b=b.alternate,b!==null&&(b.memoizedState=v),v}function y_(b){Wn.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var v=l3(b).next.queue;Bm(b,v,{},Kd(b))}function ap(){var b=YC(!1);return b=S2.bind(null,$a,b.queue,!0,!1),Cc().memoizedState=b,[!1,b]}function u3(){var b=ym(IA)[0],v=pa().memoizedState;return[typeof b=="boolean"?b:PI(b),v]}function Q2(){var b=C1(IA)[0],v=pa().memoizedState;return[typeof b=="boolean"?b:PI(b),v]}function Gd(){return DA(Hte)}function Yd(){var b=Cc(),v=Sg.identifierPrefix;if(Hc){var L=cC,$=y9;L=($&~(1<<32-q0($)-1)).toString(32)+L,v="«"+v+"R"+L,L=Iye++,0<L&&(v+="H"+L.toString(32)),v+="»"}else L=cdr++,v="«"+v+"r"+L.toString(32)+"»";return b.memoizedState=v}function b1(){return Cc().memoizedState=v4.bind(null,$a)}function v4(b,v){for(var L=b.return;L!==null;){switch(L.tag){case 24:case 3:var $=Kd(L);b=np($);var ae=y0(L,b,$);ae!==null&&(yc(ae,L,$),Cm(ae,L,$)),L=hu(),v!=null&&ae!==null&&console.error("The seed argument is not enabled outside experimental channels."),b.payload={cache:L};return}L=L.return}}function Hp(b,v,L){var $=arguments;typeof $[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),$=Kd(b);var ae={lane:$,revertLane:0,action:L,hasEagerState:!1,eagerState:null,next:null};v2(b)?Ts(v,ae):(ae=BI(b,v,ae,$),ae!==null&&(yc(ae,b,$),S1(ae,v,$))),ve(b,$)}function VC(b,v,L){var $=arguments;typeof $[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),$=Kd(b),Bm(b,v,L,$),ve(b,$)}function Bm(b,v,L,$){var ae={lane:$,revertLane:0,action:L,hasEagerState:!1,eagerState:null,next:null};if(v2(b))Ts(v,ae);else{var Ie=b.alternate;if(b.lanes===0&&(Ie===null||Ie.lanes===0)&&(Ie=v.lastRenderedReducer,Ie!==null)){var ze=Wn.H;Wn.H=b9;try{var ct=v.lastRenderedState,Mt=Ie(ct,L);if(ae.hasEagerState=!0,ae.eagerState=Mt,em(Mt,ct))return ha(b,v,ae,0),Sg===null&&Vc(),!1}catch{}finally{Wn.H=ze}}if(L=BI(b,v,ae,$),L!==null)return yc(L,b,$),S1(L,v,$),!0}return!1}function Xr(b,v,L,$){if(Wn.T===null&&f8===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),$={lane:2,revertLane:c5(),action:$,hasEagerState:!1,eagerState:null,next:null},v2(b)){if(v)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else v=BI(b,L,$,2),v!==null&&yc(v,b,2);ve(b,2)}function v2(b){var v=b.alternate;return b===$a||v!==null&&v===$a}function Ts(b,v){HK=fye=!0;var L=b.pending;L===null?v.next=v:(v.next=L.next,L.next=v),b.pending=v}function S1(b,v,L){if((L&4194048)!==0){var $=v.lanes;$&=b.pendingLanes,L|=$,v.lanes=L,At(b,L)}}function CA(b){var v=UA;return b!=null&&(UA=v===null?b:v.concat(b)),v}function x0(b,v,L){for(var $=Object.keys(b.props),ae=0;ae<$.length;ae++){var Ie=$[ae];if(Ie!=="children"&&Ie!=="key"){v===null&&(v=Dn(b,L.mode,0),v._debugInfo=UA,v.return=L),Lt(v,function(ze){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ze)},Ie);break}}}function zg(b){var v=Ete;return Ete+=1,OK===null&&(OK=Fd()),tp(OK,b,v)}function bm(b,v){v=v.props.ref,b.ref=v!==void 0?v:null}function Ss(b,v){throw v.$$typeof===Ff?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.`):(b=Object.prototype.toString.call(v),Error("Objects are not valid as a React child (found: "+(b==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead."))}function ic(b,v){var L=Q(b)||"Component";G3n[L]||(G3n[L]=!0,v=v.displayName||v.name||"Component",b.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
  root.render(%s)`,v,v,v):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
  <%s>{%s}</%s>`,v,v,L,v,L))}function Va(b,v){var L=Q(b)||"Component";Y3n[L]||(Y3n[L]=!0,v=String(v),b.tag===3?console.error(`Symbols are not valid as a React child.
  root.render(%s)`,v):console.error(`Symbols are not valid as a React child.
  <%s>%s</%s>`,L,v,L))}function LI(b){function v(cn,un){if(b){var xn=cn.deletions;xn===null?(cn.deletions=[un],cn.flags|=16):xn.push(un)}}function L(cn,un){if(!b)return null;for(;un!==null;)v(cn,un),un=un.sibling;return null}function $(cn){for(var un=new Map;cn!==null;)cn.key!==null?un.set(cn.key,cn):un.set(cn.index,cn),cn=cn.sibling;return un}function ae(cn,un){return cn=rt(cn,un),cn.index=0,cn.sibling=null,cn}function Ie(cn,un,xn){return cn.index=xn,b?(xn=cn.alternate,xn!==null?(xn=xn.index,xn<un?(cn.flags|=67108866,un):xn):(cn.flags|=67108866,un)):(cn.flags|=1048576,un)}function ze(cn){return b&&cn.alternate===null&&(cn.flags|=67108866),cn}function ct(cn,un,xn,bo){return un===null||un.tag!==6?(un=oo(xn,cn.mode,bo),un.return=cn,un._debugOwner=cn,un._debugTask=cn._debugTask,un._debugInfo=UA,un):(un=ae(un,xn),un.return=cn,un._debugInfo=UA,un)}function Mt(cn,un,xn,bo){var Ri=xn.type;return Ri===Ia?(un=io(cn,un,xn.props.children,bo,xn.key),x0(xn,un,cn),un):un!==null&&(un.elementType===Ri||f1(un,xn)||typeof Ri=="object"&&Ri!==null&&Ri.$$typeof===dp&&PM(Ri)===un.type)?(un=ae(un,xn.props),bm(un,xn),un.return=cn,un._debugOwner=xn._owner,un._debugInfo=UA,un):(un=Dn(xn,cn.mode,bo),bm(un,xn),un.return=cn,un._debugInfo=UA,un)}function Vt(cn,un,xn,bo){return un===null||un.tag!==4||un.stateNode.containerInfo!==xn.containerInfo||un.stateNode.implementation!==xn.implementation?(un=vo(xn,cn.mode,bo),un.return=cn,un._debugInfo=UA,un):(un=ae(un,xn.children||[]),un.return=cn,un._debugInfo=UA,un)}function io(cn,un,xn,bo,Ri){return un===null||un.tag!==7?(un=Xn(xn,cn.mode,bo,Ri),un.return=cn,un._debugOwner=cn,un._debugTask=cn._debugTask,un._debugInfo=UA,un):(un=ae(un,xn),un.return=cn,un._debugInfo=UA,un)}function fo(cn,un,xn){if(typeof un=="string"&&un!==""||typeof un=="number"||typeof un=="bigint")return un=oo(""+un,cn.mode,xn),un.return=cn,un._debugOwner=cn,un._debugTask=cn._debugTask,un._debugInfo=UA,un;if(typeof un=="object"&&un!==null){switch(un.$$typeof){case Wd:return xn=Dn(un,cn.mode,xn),bm(xn,un),xn.return=cn,cn=CA(un._debugInfo),xn._debugInfo=UA,UA=cn,xn;case ZI:return un=vo(un,cn.mode,xn),un.return=cn,un._debugInfo=UA,un;case dp:var bo=CA(un._debugInfo);return un=PM(un),cn=fo(cn,un,xn),UA=bo,cn}if(ra(un)||E(un))return xn=Xn(un,cn.mode,xn,null),xn.return=cn,xn._debugOwner=cn,xn._debugTask=cn._debugTask,cn=CA(un._debugInfo),xn._debugInfo=UA,UA=cn,xn;if(typeof un.then=="function")return bo=CA(un._debugInfo),cn=fo(cn,zg(un),xn),UA=bo,cn;if(un.$$typeof===yA)return fo(cn,OC(cn,un),xn);Ss(cn,un)}return typeof un=="function"&&ic(cn,un),typeof un=="symbol"&&Va(cn,un),null}function eo(cn,un,xn,bo){var Ri=un!==null?un.key:null;if(typeof xn=="string"&&xn!==""||typeof xn=="number"||typeof xn=="bigint")return Ri!==null?null:ct(cn,un,""+xn,bo);if(typeof xn=="object"&&xn!==null){switch(xn.$$typeof){case Wd:return xn.key===Ri?(Ri=CA(xn._debugInfo),cn=Mt(cn,un,xn,bo),UA=Ri,cn):null;case ZI:return xn.key===Ri?Vt(cn,un,xn,bo):null;case dp:return Ri=CA(xn._debugInfo),xn=PM(xn),cn=eo(cn,un,xn,bo),UA=Ri,cn}if(ra(xn)||E(xn))return Ri!==null?null:(Ri=CA(xn._debugInfo),cn=io(cn,un,xn,bo,null),UA=Ri,cn);if(typeof xn.then=="function")return Ri=CA(xn._debugInfo),cn=eo(cn,un,zg(xn),bo),UA=Ri,cn;if(xn.$$typeof===yA)return eo(cn,un,OC(cn,xn),bo);Ss(cn,xn)}return typeof xn=="function"&&ic(cn,xn),typeof xn=="symbol"&&Va(cn,xn),null}function Bo(cn,un,xn,bo,Ri){if(typeof bo=="string"&&bo!==""||typeof bo=="number"||typeof bo=="bigint")return cn=cn.get(xn)||null,ct(un,cn,""+bo,Ri);if(typeof bo=="object"&&bo!==null){switch(bo.$$typeof){case Wd:return xn=cn.get(bo.key===null?xn:bo.key)||null,cn=CA(bo._debugInfo),un=Mt(un,xn,bo,Ri),UA=cn,un;case ZI:return cn=cn.get(bo.key===null?xn:bo.key)||null,Vt(un,cn,bo,Ri);case dp:var dA=CA(bo._debugInfo);return bo=PM(bo),un=Bo(cn,un,xn,bo,Ri),UA=dA,un}if(ra(bo)||E(bo))return xn=cn.get(xn)||null,cn=CA(bo._debugInfo),un=io(un,xn,bo,Ri,null),UA=cn,un;if(typeof bo.then=="function")return dA=CA(bo._debugInfo),un=Bo(cn,un,xn,zg(bo),Ri),UA=dA,un;if(bo.$$typeof===yA)return Bo(cn,un,xn,OC(un,bo),Ri);Ss(un,bo)}return typeof bo=="function"&&ic(un,bo),typeof bo=="symbol"&&Va(un,bo),null}function Yr(cn,un,xn,bo){if(typeof xn!="object"||xn===null)return bo;switch(xn.$$typeof){case Wd:case ZI:A(cn,un,xn);var Ri=xn.key;if(typeof Ri!="string")break;if(bo===null){bo=new Set,bo.add(Ri);break}if(!bo.has(Ri)){bo.add(Ri);break}Lt(un,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",Ri)});break;case dp:xn=PM(xn),Yr(cn,un,xn,bo)}return bo}function Ea(cn,un,xn,bo){for(var Ri=null,dA=null,Ur=null,hA=un,EA=un=0,id=null;hA!==null&&EA<xn.length;EA++){hA.index>EA?(id=hA,hA=null):id=hA.sibling;var Ym=eo(cn,hA,xn[EA],bo);if(Ym===null){hA===null&&(hA=id);break}Ri=Yr(cn,Ym,xn[EA],Ri),b&&hA&&Ym.alternate===null&&v(cn,hA),un=Ie(Ym,un,EA),Ur===null?dA=Ym:Ur.sibling=Ym,Ur=Ym,hA=id}if(EA===xn.length)return L(cn,hA),Hc&&Xo(cn,EA),dA;if(hA===null){for(;EA<xn.length;EA++)hA=fo(cn,xn[EA],bo),hA!==null&&(Ri=Yr(cn,hA,xn[EA],Ri),un=Ie(hA,un,EA),Ur===null?dA=hA:Ur.sibling=hA,Ur=hA);return Hc&&Xo(cn,EA),dA}for(hA=$(hA);EA<xn.length;EA++)id=Bo(hA,cn,EA,xn[EA],bo),id!==null&&(Ri=Yr(cn,id,xn[EA],Ri),b&&id.alternate!==null&&hA.delete(id.key===null?EA:id.key),un=Ie(id,un,EA),Ur===null?dA=id:Ur.sibling=id,Ur=id);return b&&hA.forEach(function(gQ){return v(cn,gQ)}),Hc&&Xo(cn,EA),dA}function Qg(cn,un,xn,bo){if(xn==null)throw Error("An iterable object provided no iterator.");for(var Ri=null,dA=null,Ur=un,hA=un=0,EA=null,id=null,Ym=xn.next();Ur!==null&&!Ym.done;hA++,Ym=xn.next()){Ur.index>hA?(EA=Ur,Ur=null):EA=Ur.sibling;var gQ=eo(cn,Ur,Ym.value,bo);if(gQ===null){Ur===null&&(Ur=EA);break}id=Yr(cn,gQ,Ym.value,id),b&&Ur&&gQ.alternate===null&&v(cn,Ur),un=Ie(gQ,un,hA),dA===null?Ri=gQ:dA.sibling=gQ,dA=gQ,Ur=EA}if(Ym.done)return L(cn,Ur),Hc&&Xo(cn,hA),Ri;if(Ur===null){for(;!Ym.done;hA++,Ym=xn.next())Ur=fo(cn,Ym.value,bo),Ur!==null&&(id=Yr(cn,Ur,Ym.value,id),un=Ie(Ur,un,hA),dA===null?Ri=Ur:dA.sibling=Ur,dA=Ur);return Hc&&Xo(cn,hA),Ri}for(Ur=$(Ur);!Ym.done;hA++,Ym=xn.next())EA=Bo(Ur,cn,hA,Ym.value,bo),EA!==null&&(id=Yr(cn,EA,Ym.value,id),b&&EA.alternate!==null&&Ur.delete(EA.key===null?hA:EA.key),un=Ie(EA,un,hA),dA===null?Ri=EA:dA.sibling=EA,dA=EA);return b&&Ur.forEach(function(kdr){return v(cn,kdr)}),Hc&&Xo(cn,hA),Ri}function Oc(cn,un,xn,bo){if(typeof xn=="object"&&xn!==null&&xn.type===Ia&&xn.key===null&&(x0(xn,null,cn),xn=xn.props.children),typeof xn=="object"&&xn!==null){switch(xn.$$typeof){case Wd:var Ri=CA(xn._debugInfo);e:{for(var dA=xn.key;un!==null;){if(un.key===dA){if(dA=xn.type,dA===Ia){if(un.tag===7){L(cn,un.sibling),bo=ae(un,xn.props.children),bo.return=cn,bo._debugOwner=xn._owner,bo._debugInfo=UA,x0(xn,bo,cn),cn=bo;break e}}else if(un.elementType===dA||f1(un,xn)||typeof dA=="object"&&dA!==null&&dA.$$typeof===dp&&PM(dA)===un.type){L(cn,un.sibling),bo=ae(un,xn.props),bm(bo,xn),bo.return=cn,bo._debugOwner=xn._owner,bo._debugInfo=UA,cn=bo;break e}L(cn,un);break}else v(cn,un);un=un.sibling}xn.type===Ia?(bo=Xn(xn.props.children,cn.mode,bo,xn.key),bo.return=cn,bo._debugOwner=cn,bo._debugTask=cn._debugTask,bo._debugInfo=UA,x0(xn,bo,cn),cn=bo):(bo=Dn(xn,cn.mode,bo),bm(bo,xn),bo.return=cn,bo._debugInfo=UA,cn=bo)}return cn=ze(cn),UA=Ri,cn;case ZI:e:{for(Ri=xn,xn=Ri.key;un!==null;){if(un.key===xn)if(un.tag===4&&un.stateNode.containerInfo===Ri.containerInfo&&un.stateNode.implementation===Ri.implementation){L(cn,un.sibling),bo=ae(un,Ri.children||[]),bo.return=cn,cn=bo;break e}else{L(cn,un);break}else v(cn,un);un=un.sibling}bo=vo(Ri,cn.mode,bo),bo.return=cn,cn=bo}return ze(cn);case dp:return Ri=CA(xn._debugInfo),xn=PM(xn),cn=Oc(cn,un,xn,bo),UA=Ri,cn}if(ra(xn))return Ri=CA(xn._debugInfo),cn=Ea(cn,un,xn,bo),UA=Ri,cn;if(E(xn)){if(Ri=CA(xn._debugInfo),dA=E(xn),typeof dA!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ur=dA.call(xn);return Ur===xn?(cn.tag!==0||Object.prototype.toString.call(cn.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ur)!=="[object Generator]")&&(H3n||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),H3n=!0):xn.entries!==dA||Rot||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Rot=!0),cn=Qg(cn,un,Ur,bo),UA=Ri,cn}if(typeof xn.then=="function")return Ri=CA(xn._debugInfo),cn=Oc(cn,un,zg(xn),bo),UA=Ri,cn;if(xn.$$typeof===yA)return Oc(cn,un,OC(cn,xn),bo);Ss(cn,xn)}return typeof xn=="string"&&xn!==""||typeof xn=="number"||typeof xn=="bigint"?(Ri=""+xn,un!==null&&un.tag===6?(L(cn,un.sibling),bo=ae(un,Ri),bo.return=cn,cn=bo):(L(cn,un),bo=oo(Ri,cn.mode,bo),bo.return=cn,bo._debugOwner=cn,bo._debugTask=cn._debugTask,bo._debugInfo=UA,cn=bo),ze(cn)):(typeof xn=="function"&&ic(cn,xn),typeof xn=="symbol"&&Va(cn,xn),L(cn,un))}return function(cn,un,xn,bo){var Ri=UA;UA=null;try{Ete=0;var dA=Oc(cn,un,xn,bo);return OK=null,dA}catch(id){if(id===Ne||id===Ft)throw id;var Ur=h(29,id,null,cn.mode);Ur.lanes=bo,Ur.return=cn;var hA=Ur._debugInfo=UA;if(Ur._debugOwner=cn._debugOwner,Ur._debugTask=cn._debugTask,hA!=null){for(var EA=hA.length-1;0<=EA;EA--)if(typeof hA[EA].stack=="string"){Ur._debugOwner=hA[EA],Ur._debugTask=hA[EA].debugTask;break}}return Ur}finally{UA=Ri}}}function Lu(b){var v=b.alternate;k(Kf,Kf.current&YK,b),k(O4,b,b),y8===null&&(v===null||Ms.current!==null||v.memoizedState!==null)&&(y8=b)}function Jg(b){if(b.tag===22){if(k(Kf,Kf.current,b),k(O4,b,b),y8===null){var v=b.alternate;v!==null&&v.memoizedState!==null&&(y8=b)}}else x_(b)}function x_(b){k(Kf,Kf.current,b),k(O4,O4.current,b)}function hg(b){M(O4,b),y8===b&&(y8=null),M(Kf,b)}function xh(b){for(var v=b;v!==null;){if(v.tag===13){var L=v.memoizedState;if(L!==null&&(L=L.dehydrated,L===null||L.data===cQ||gA(L)))return v}else if(v.tag===19&&v.memoizedProps.revealOrder!==void 0){if((v.flags&128)!==0)return v}else if(v.child!==null){v.child.return=v,v=v.child;continue}if(v===b)break;for(;v.sibling===null;){if(v.return===null||v.return===b)return null;v=v.return}v.sibling.return=v.return,v=v.sibling}return null}function Ud(b){if(b!==null&&typeof b!="function"){var v=String(b);eEn.has(v)||(eEn.add(v),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",b))}}function Ks(b,v,L,$){var ae=b.memoizedState,Ie=L($,ae);if(b.mode&Fh){ge(!0);try{Ie=L($,ae)}finally{ge(!1)}}Ie===void 0&&(v=B(v)||"Component",$3n.has(v)||($3n.add(v),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",v))),ae=Ie==null?ae:ms({},ae,Ie),b.memoizedState=ae,b.lanes===0&&(b.updateQueue.baseState=ae)}function E_(b,v,L,$,ae,Ie,ze){var ct=b.stateNode;if(typeof ct.shouldComponentUpdate=="function"){if(L=ct.shouldComponentUpdate($,Ie,ze),b.mode&Fh){ge(!0);try{L=ct.shouldComponentUpdate($,Ie,ze)}finally{ge(!1)}}return L===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",B(v)||"Component"),L}return v.prototype&&v.prototype.isPureReactComponent?!wA(L,$)||!wA(ae,Ie):!0}function Eh(b,v,L,$){var ae=v.state;typeof v.componentWillReceiveProps=="function"&&v.componentWillReceiveProps(L,$),typeof v.UNSAFE_componentWillReceiveProps=="function"&&v.UNSAFE_componentWillReceiveProps(L,$),v.state!==ae&&(b=Q(b)||"Component",V3n.has(b)||(V3n.add(b),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",b)),Tot.enqueueReplaceState(v,v.state,null))}function B_(b,v){var L=v;if("ref"in v){L={};for(var $ in v)$!=="ref"&&(L[$]=v[$])}if(b=b.defaultProps){L===v&&(L=ms({},L));for(var ae in b)L[ae]===void 0&&(L[ae]=b[ae])}return L}function w4(b){kot(b),console.warn(`%s

%s
`,UK?"An error occurred in the <"+UK+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function J0(b){var v=UK?"The above error occurred in the <"+UK+"> component.":"The above error occurred in one of your React components.",L="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Fot||"Anonymous")+".");if(typeof b=="object"&&b!==null&&typeof b.environmentName=="string"){var $=b.environmentName;b=[`%o

%s

%s
`,b,v,L].slice(0),typeof b[0]=="string"?b.splice(0,1,DEn+b[0],NEn,Hye+$+Hye,REn):b.splice(0,0,DEn,NEn,Hye+$+Hye,REn),b.unshift(console),$=Rdr.apply(console.error,b),$()}else console.error(`%o

%s

%s
`,b,v,L)}function Sm(b){kot(b)}function w2(b,v){try{UK=v.source?Q(v.source):null,Fot=null;var L=v.value;if(Wn.actQueue!==null)Wn.thrownErrors.push(L);else{var $=b.onUncaughtError;$(L,{componentStack:v.stack})}}catch(ae){setTimeout(function(){throw ae})}}function g3(b,v,L){try{UK=L.source?Q(L.source):null,Fot=Q(v);var $=b.onCaughtError;$(L.value,{componentStack:L.stack,errorBoundary:v.tag===1?v.stateNode:null})}catch(ae){setTimeout(function(){throw ae})}}function Wg(b,v,L){return L=np(L),L.tag=mn,L.payload={element:null},L.callback=function(){Lt(v.source,w2,b,v)},L}function r0(b){return b=np(b),b.tag=mn,b}function P2(b,v,L,$){var ae=L.type.getDerivedStateFromError;if(typeof ae=="function"){var Ie=$.value;b.payload=function(){return ae(Ie)},b.callback=function(){fm(L),Lt($.source,g3,v,L,$)}}var ze=L.stateNode;ze!==null&&typeof ze.componentDidCatch=="function"&&(b.callback=function(){fm(L),Lt($.source,g3,v,L,$),typeof ae!="function"&&(RM===null?RM=new Set([this]):RM.add(this)),udr(this,$),typeof ae=="function"||(L.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",Q(L)||"Unknown")})}function zC(b,v,L,$,ae){if(L.flags|=32768,Ql&&b0(b,ae),$!==null&&typeof $=="object"&&typeof $.then=="function"){if(v=L.alternate,v!==null&&Hr(v,L,ae,!0),Hc&&(x9=!0),L=O4.current,L!==null){switch(L.tag){case 13:return y8===null?f3():L.alternate===null&&tm===AQ&&(tm=Got),L.flags&=-257,L.flags|=65536,L.lanes=ae,$===Tn?L.flags|=16384:(v=L.updateQueue,v===null?L.updateQueue=new Set([$]):v.add($),lp(b,$,ae)),!1;case 22:return L.flags|=65536,$===Tn?L.flags|=16384:(v=L.updateQueue,v===null?(v={transitions:null,markerInstances:null,retryQueue:new Set([$])},L.updateQueue=v):(L=v.retryQueue,L===null?v.retryQueue=new Set([$]):L.add($)),lp(b,$,ae)),!1}throw Error("Unexpected Suspense handler tag ("+L.tag+"). This is a bug in React.")}return lp(b,$,ae),f3(),!1}if(Hc)return x9=!0,v=O4.current,v!==null?((v.flags&65536)===0&&(v.flags|=256),v.flags|=65536,v.lanes=ae,$!==_8&&hr(Ug(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:$}),L))):($!==_8&&hr(Ug(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:$}),L)),b=b.current.alternate,b.flags|=65536,ae&=-ae,b.lanes|=ae,$=Ug($,L),ae=Wg(b.stateNode,$,ae),Dp(b,ae),tm!==Ek&&(tm=JK)),!1;var Ie=Ug(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:$}),L);if(Mte===null?Mte=[Ie]:Mte.push(Ie),tm!==Ek&&(tm=JK),v===null)return!0;$=Ug($,L),L=v;do{switch(L.tag){case 3:return L.flags|=65536,b=ae&-ae,L.lanes|=b,b=Wg(L.stateNode,$,b),Dp(L,b),!1;case 1:if(v=L.type,Ie=L.stateNode,(L.flags&128)===0&&(typeof v.getDerivedStateFromError=="function"||Ie!==null&&typeof Ie.componentDidCatch=="function"&&(RM===null||!RM.has(Ie))))return L.flags|=65536,ae&=-ae,L.lanes|=ae,ae=r0(ae),P2(ae,b,L,$),Dp(L,ae),!1}L=L.return}while(L!==null);return!1}function W0(b,v,L,$){v.child=b===null?U3n(v,null,L,$):GK(v,b.child,L,$)}function M2(b,v,L,$,ae){L=L.render;var Ie=v.ref;if("ref"in $){var ze={};for(var ct in $)ct!=="ref"&&(ze[ct]=$[ct])}else ze=$;return Ih(v),fe(v),$=Cf(b,v,L,ze,Ie,ae),ct=Rp(),pe(),b!==null&&!j1?(oc(b,v,ae),bf(b,v,ae)):(Hc&&ct&&ir(v),v.flags|=1,W0(b,v,$,ae),v.child)}function sl(b,v,L,$,ae){if(b===null){var Ie=L.type;return typeof Ie=="function"&&!ot(Ie)&&Ie.defaultProps===void 0&&L.compare===null?(L=n0(Ie),v.tag=15,v.type=L,Qm(v,Ie),b_(b,v,L,$,ae)):(b=an(L.type,null,$,v,v.mode,ae),b.ref=v.ref,b.return=v,v.child=b)}if(Ie=b.child,!XE(b,ae)){var ze=Ie.memoizedProps;if(L=L.compare,L=L!==null?L:wA,L(ze,$)&&b.ref===v.ref)return bf(b,v,ae)}return v.flags|=1,b=rt(Ie,$),b.ref=v.ref,b.return=v,v.child=b}function b_(b,v,L,$,ae){if(b!==null){var Ie=b.memoizedProps;if(wA(Ie,$)&&b.ref===v.ref&&v.type===b.type)if(j1=!1,v.pendingProps=$=Ie,XE(b,ae))(b.flags&131072)!==0&&(j1=!0);else return v.lanes=b.lanes,bf(b,v,ae)}return JC(b,v,L,$,ae)}function s0(b,v,L){var $=v.pendingProps,ae=$.children,Ie=b!==null?b.memoizedState:null;if($.mode==="hidden"){if((v.flags&128)!==0){if($=Ie!==null?Ie.baseLanes|L:L,b!==null){for(ae=v.child=b.child,Ie=0;ae!==null;)Ie=Ie|ae.lanes|ae.childLanes,ae=ae.sibling;v.childLanes=Ie&~$}else v.childLanes=0,v.child=null;return JE(b,v,$,L)}if((L&536870912)!==0)v.memoizedState={baseLanes:0,cachePool:null},b!==null&&m2(v,Ie!==null?Ie.cachePool:null),Ie!==null?V0(v,Ie):Vg(v),Jg(v);else return v.lanes=v.childLanes=536870912,JE(b,v,Ie!==null?Ie.baseLanes|L:L,L)}else Ie!==null?(m2(v,Ie.cachePool),V0(v,Ie),x_(v),v.memoizedState=null):(b!==null&&m2(v,null),Vg(v),x_(v));return W0(b,v,ae,L),v.child}function JE(b,v,L,$){var ae=A3();return ae=ae===null?null:{parent:Lh._currentValue,pool:ae},v.memoizedState={baseLanes:L,cachePool:ae},b!==null&&m2(v,null),Vg(v),Jg(v),b!==null&&Hr(b,v,$,!0),null}function d3(b,v){var L=v.ref;if(L===null)b!==null&&b.ref!==null&&(v.flags|=4194816);else{if(typeof L!="function"&&typeof L!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(b===null||b.ref!==L)&&(v.flags|=4194816)}}function JC(b,v,L,$,ae){if(L.prototype&&typeof L.prototype.render=="function"){var Ie=B(L)||"Unknown";nEn[Ie]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",Ie,Ie),nEn[Ie]=!0)}return v.mode&Fh&&R3.recordLegacyContextWarning(v,null),b===null&&(Qm(v,v.type),L.contextTypes&&(Ie=B(L)||"Unknown",iEn[Ie]||(iEn[Ie]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",Ie)))),Ih(v),fe(v),L=Cf(b,v,L,$,void 0,ae),$=Rp(),pe(),b!==null&&!j1?(oc(b,v,ae),bf(b,v,ae)):(Hc&&$&&ir(v),v.flags|=1,W0(b,v,L,ae),v.child)}function Bf(b,v,L,$,ae,Ie){return Ih(v),fe(v),sQ=-1,xte=b!==null&&b.type!==v.type,v.updateQueue=null,L=wI(v,$,L,ae),ug(b,v),$=Rp(),pe(),b!==null&&!j1?(oc(b,v,Ie),bf(b,v,Ie)):(Hc&&$&&ir(v),v.flags|=1,W0(b,v,L,Ie),v.child)}function D2(b,v,L,$,ae){switch(a(v)){case!1:var Ie=v.stateNode,ze=new v.type(v.memoizedProps,Ie.context).state;Ie.updater.enqueueSetState(Ie,ze,null);break;case!0:v.flags|=128,v.flags|=65536,Ie=Error("Simulated error coming from DevTools");var ct=ae&-ae;if(v.lanes|=ct,ze=Sg,ze===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");ct=r0(ct),P2(ct,ze,v,Ug(Ie,v)),Dp(v,ct)}if(Ih(v),v.stateNode===null){if(ze=Yf,Ie=L.contextType,"contextType"in L&&Ie!==null&&(Ie===void 0||Ie.$$typeof!==yA)&&!Z3n.has(L)&&(Z3n.add(L),ct=Ie===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof Ie!="object"?" However, it is set to a "+typeof Ie+".":Ie.$$typeof===Nh?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(Ie).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",B(L)||"Component",ct)),typeof Ie=="object"&&Ie!==null&&(ze=DA(Ie)),Ie=new L($,ze),v.mode&Fh){ge(!0);try{Ie=new L($,ze)}finally{ge(!1)}}if(ze=v.memoizedState=Ie.state!==null&&Ie.state!==void 0?Ie.state:null,Ie.updater=Tot,v.stateNode=Ie,Ie._reactInternals=v,Ie._reactInternalInstance=K3n,typeof L.getDerivedStateFromProps=="function"&&ze===null&&(ze=B(L)||"Component",z3n.has(ze)||(z3n.add(ze),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",ze,Ie.state===null?"null":"undefined",ze))),typeof L.getDerivedStateFromProps=="function"||typeof Ie.getSnapshotBeforeUpdate=="function"){var Mt=ct=ze=null;if(typeof Ie.componentWillMount=="function"&&Ie.componentWillMount.__suppressDeprecationWarning!==!0?ze="componentWillMount":typeof Ie.UNSAFE_componentWillMount=="function"&&(ze="UNSAFE_componentWillMount"),typeof Ie.componentWillReceiveProps=="function"&&Ie.componentWillReceiveProps.__suppressDeprecationWarning!==!0?ct="componentWillReceiveProps":typeof Ie.UNSAFE_componentWillReceiveProps=="function"&&(ct="UNSAFE_componentWillReceiveProps"),typeof Ie.componentWillUpdate=="function"&&Ie.componentWillUpdate.__suppressDeprecationWarning!==!0?Mt="componentWillUpdate":typeof Ie.UNSAFE_componentWillUpdate=="function"&&(Mt="UNSAFE_componentWillUpdate"),ze!==null||ct!==null||Mt!==null){Ie=B(L)||"Component";var Vt=typeof L.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";W3n.has(Ie)||(W3n.add(Ie),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://react.dev/link/unsafe-component-lifecycles`,Ie,Vt,ze!==null?`
  `+ze:"",ct!==null?`
  `+ct:"",Mt!==null?`
  `+Mt:""))}}Ie=v.stateNode,ze=B(L)||"Component",Ie.render||(L.prototype&&typeof L.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",ze):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",ze)),!Ie.getInitialState||Ie.getInitialState.isReactClassApproved||Ie.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",ze),Ie.getDefaultProps&&!Ie.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",ze),Ie.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",ze),L.childContextTypes&&!X3n.has(L)&&(X3n.add(L),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",ze)),L.contextTypes&&!q3n.has(L)&&(q3n.add(L),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",ze)),typeof Ie.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",ze),L.prototype&&L.prototype.isPureReactComponent&&typeof Ie.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",B(L)||"A pure component"),typeof Ie.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",ze),typeof Ie.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",ze),typeof Ie.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",ze),typeof Ie.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",ze),ct=Ie.props!==$,Ie.props!==void 0&&ct&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",ze),Ie.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",ze,ze),typeof Ie.getSnapshotBeforeUpdate!="function"||typeof Ie.componentDidUpdate=="function"||J3n.has(L)||(J3n.add(L),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",B(L))),typeof Ie.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",ze),typeof Ie.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",ze),typeof L.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",ze),(ct=Ie.state)&&(typeof ct!="object"||ra(ct))&&console.error("%s.state: must be set to an object or null",ze),typeof Ie.getChildContext=="function"&&typeof L.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",ze),Ie=v.stateNode,Ie.props=$,Ie.state=v.memoizedState,Ie.refs={},K0(v),ze=L.contextType,Ie.context=typeof ze=="object"&&ze!==null?DA(ze):Yf,Ie.state===$&&(ze=B(L)||"Component",j3n.has(ze)||(j3n.add(ze),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",ze))),v.mode&Fh&&R3.recordLegacyContextWarning(v,Ie),R3.recordUnsafeLifecycleWarnings(v,Ie),Ie.state=v.memoizedState,ze=L.getDerivedStateFromProps,typeof ze=="function"&&(Ks(v,L,ze,$),Ie.state=v.memoizedState),typeof L.getDerivedStateFromProps=="function"||typeof Ie.getSnapshotBeforeUpdate=="function"||typeof Ie.UNSAFE_componentWillMount!="function"&&typeof Ie.componentWillMount!="function"||(ze=Ie.state,typeof Ie.componentWillMount=="function"&&Ie.componentWillMount(),typeof Ie.UNSAFE_componentWillMount=="function"&&Ie.UNSAFE_componentWillMount(),ze!==Ie.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",Q(v)||"Component"),Tot.enqueueReplaceState(Ie,Ie.state,null)),Ld(v,$,Ie,ae),Kg(),Ie.state=v.memoizedState),typeof Ie.componentDidMount=="function"&&(v.flags|=4194308),(v.mode&AC)!==fl&&(v.flags|=134217728),Ie=!0}else if(b===null){Ie=v.stateNode;var io=v.memoizedProps;ct=B_(L,io),Ie.props=ct;var fo=Ie.context;Mt=L.contextType,ze=Yf,typeof Mt=="object"&&Mt!==null&&(ze=DA(Mt)),Vt=L.getDerivedStateFromProps,Mt=typeof Vt=="function"||typeof Ie.getSnapshotBeforeUpdate=="function",io=v.pendingProps!==io,Mt||typeof Ie.UNSAFE_componentWillReceiveProps!="function"&&typeof Ie.componentWillReceiveProps!="function"||(io||fo!==ze)&&Eh(v,Ie,$,ze),vn=!1;var eo=v.memoizedState;Ie.state=eo,Ld(v,$,Ie,ae),Kg(),fo=v.memoizedState,io||eo!==fo||vn?(typeof Vt=="function"&&(Ks(v,L,Vt,$),fo=v.memoizedState),(ct=vn||E_(v,L,ct,$,eo,fo,ze))?(Mt||typeof Ie.UNSAFE_componentWillMount!="function"&&typeof Ie.componentWillMount!="function"||(typeof Ie.componentWillMount=="function"&&Ie.componentWillMount(),typeof Ie.UNSAFE_componentWillMount=="function"&&Ie.UNSAFE_componentWillMount()),typeof Ie.componentDidMount=="function"&&(v.flags|=4194308),(v.mode&AC)!==fl&&(v.flags|=134217728)):(typeof Ie.componentDidMount=="function"&&(v.flags|=4194308),(v.mode&AC)!==fl&&(v.flags|=134217728),v.memoizedProps=$,v.memoizedState=fo),Ie.props=$,Ie.state=fo,Ie.context=ze,Ie=ct):(typeof Ie.componentDidMount=="function"&&(v.flags|=4194308),(v.mode&AC)!==fl&&(v.flags|=134217728),Ie=!1)}else{Ie=v.stateNode,zc(b,v),ze=v.memoizedProps,Mt=B_(L,ze),Ie.props=Mt,Vt=v.pendingProps,eo=Ie.context,fo=L.contextType,ct=Yf,typeof fo=="object"&&fo!==null&&(ct=DA(fo)),io=L.getDerivedStateFromProps,(fo=typeof io=="function"||typeof Ie.getSnapshotBeforeUpdate=="function")||typeof Ie.UNSAFE_componentWillReceiveProps!="function"&&typeof Ie.componentWillReceiveProps!="function"||(ze!==Vt||eo!==ct)&&Eh(v,Ie,$,ct),vn=!1,eo=v.memoizedState,Ie.state=eo,Ld(v,$,Ie,ae),Kg();var Bo=v.memoizedState;ze!==Vt||eo!==Bo||vn||b!==null&&b.dependencies!==null&&fh(b.dependencies)?(typeof io=="function"&&(Ks(v,L,io,$),Bo=v.memoizedState),(Mt=vn||E_(v,L,Mt,$,eo,Bo,ct)||b!==null&&b.dependencies!==null&&fh(b.dependencies))?(fo||typeof Ie.UNSAFE_componentWillUpdate!="function"&&typeof Ie.componentWillUpdate!="function"||(typeof Ie.componentWillUpdate=="function"&&Ie.componentWillUpdate($,Bo,ct),typeof Ie.UNSAFE_componentWillUpdate=="function"&&Ie.UNSAFE_componentWillUpdate($,Bo,ct)),typeof Ie.componentDidUpdate=="function"&&(v.flags|=4),typeof Ie.getSnapshotBeforeUpdate=="function"&&(v.flags|=1024)):(typeof Ie.componentDidUpdate!="function"||ze===b.memoizedProps&&eo===b.memoizedState||(v.flags|=4),typeof Ie.getSnapshotBeforeUpdate!="function"||ze===b.memoizedProps&&eo===b.memoizedState||(v.flags|=1024),v.memoizedProps=$,v.memoizedState=Bo),Ie.props=$,Ie.state=Bo,Ie.context=ct,Ie=Mt):(typeof Ie.componentDidUpdate!="function"||ze===b.memoizedProps&&eo===b.memoizedState||(v.flags|=4),typeof Ie.getSnapshotBeforeUpdate!="function"||ze===b.memoizedProps&&eo===b.memoizedState||(v.flags|=1024),Ie=!1)}if(ct=Ie,d3(b,v),ze=(v.flags&128)!==0,ct||ze){if(ct=v.stateNode,Ho(v),ze&&typeof L.getDerivedStateFromError!="function")L=null,bg=-1;else{if(fe(v),L=w3n(ct),v.mode&Fh){ge(!0);try{w3n(ct)}finally{ge(!1)}}pe()}v.flags|=1,b!==null&&ze?(v.child=GK(v,b.child,null,ae),v.child=GK(v,null,L,ae)):W0(b,v,L,ae),v.memoizedState=ct.state,b=v.child}else b=bf(b,v,ae);return ae=v.stateNode,Ie&&ae.props!==$&&(KK||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",Q(v)||"a component"),KK=!0),b}function WC(b,v,L,$){return go(),v.flags|=256,W0(b,v,L,$),v.child}function Qm(b,v){v&&v.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
  %s.childContextTypes = ...`,v.displayName||v.name||"Component"),typeof v.getDerivedStateFromProps=="function"&&(b=B(v)||"Unknown",rEn[b]||(console.error("%s: Function components do not support getDerivedStateFromProps.",b),rEn[b]=!0)),typeof v.contextType=="object"&&v.contextType!==null&&(v=B(v)||"Unknown",oEn[v]||(console.error("%s: Function components do not support contextType.",v),oEn[v]=!0))}function N2(b){return{baseLanes:b,cachePool:KE()}}function WE(b,v,L){return b=b!==null?b.childLanes&~L:0,v&&(b|=B5),b}function jE(b,v,L){var $,ae=v.pendingProps;s(v)&&(v.flags|=128);var Ie=!1,ze=(v.flags&128)!==0;if(($=ze)||($=b!==null&&b.memoizedState===null?!1:(Kf.current&Bte)!==0),$&&(Ie=!0,v.flags&=-129),$=(v.flags&32)!==0,v.flags&=-33,b===null){if(Hc){if(Ie?Lu(v):x_(v),Hc){var ct=$d,Mt;if(!(Mt=!ct)){e:{var Vt=ct;for(Mt=Uf;Vt.nodeType!==8;){if(!Mt){Mt=null;break e}if(Vt=Zr(Vt.nextSibling),Vt===null){Mt=null;break e}}Mt=Vt}Mt!==null?(qr(),v.memoizedState={dehydrated:Mt,treeContext:ZS!==null?{id:y9,overflow:cC}:null,retryLane:536870912,hydrationErrors:null},Vt=h(18,null,null,fl),Vt.stateNode=Mt,Vt.return=v,v.child=Vt,W1=v,$d=null,Mt=!0):Mt=!1,Mt=!Mt}Mt&&(Ic(v,ct),lc(v))}if(ct=v.memoizedState,ct!==null&&(ct=ct.dehydrated,ct!==null))return gA(ct)?v.lanes=32:v.lanes=536870912,null;hg(v)}return ct=ae.children,ae=ae.fallback,Ie?(x_(v),Ie=v.mode,ct=R2({mode:"hidden",children:ct},Ie),ae=Xn(ae,Ie,L,null),ct.return=v,ae.return=v,ct.sibling=ae,v.child=ct,Ie=v.child,Ie.memoizedState=N2(L),Ie.childLanes=WE(b,$,L),v.memoizedState=Hot,ae):(Lu(v),$E(v,ct))}var io=b.memoizedState;if(io!==null&&(ct=io.dehydrated,ct!==null)){if(ze)v.flags&256?(Lu(v),v.flags&=-257,v=h3(b,v,L)):v.memoizedState!==null?(x_(v),v.child=b.child,v.flags|=128,v=null):(x_(v),Ie=ae.fallback,ct=v.mode,ae=R2({mode:"visible",children:ae.children},ct),Ie=Xn(Ie,ct,L,null),Ie.flags|=2,ae.return=v,Ie.return=v,ae.sibling=Ie,v.child=ae,GK(v,b.child,null,L),ae=v.child,ae.memoizedState=N2(L),ae.childLanes=WE(b,$,L),v.memoizedState=Hot,v=Ie);else if(Lu(v),Hc&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),gA(ct)){if($=ct.nextSibling&&ct.nextSibling.dataset,$){Mt=$.dgst;var fo=$.msg;Vt=$.stck;var eo=$.cstck}ct=fo,$=Mt,ae=Vt,Mt=Ie=eo,Ie=Error(ct||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),Ie.stack=ae||"",Ie.digest=$,$=Mt===void 0?null:Mt,ae={value:Ie,source:null,stack:$},typeof $=="string"&&C9.set(Ie,ae),hr(ae),v=h3(b,v,L)}else if(j1||Hr(b,v,L,!1),$=(L&b.childLanes)!==0,j1||$){if($=Sg,$!==null&&(ae=L&-L,ae=(ae&42)!==0?1:at(ae),ae=(ae&($.suspendedLanes|L))!==0?0:ae,ae!==0&&ae!==io.retryLane))throw io.retryLane=ae,G0(b,ae),yc($,b,ae),tEn;ct.data===cQ||f3(),v=h3(b,v,L)}else ct.data===cQ?(v.flags|=192,v.child=b.child,v=null):(b=io.treeContext,$d=Zr(ct.nextSibling),W1=v,Hc=!0,qd=null,x9=!1,py=null,Uf=!1,b!==null&&(qr(),Om[D3++]=y9,Om[D3++]=cC,Om[D3++]=ZS,y9=b.id,cC=b.overflow,ZS=v),v=$E(v,ae.children),v.flags|=4096);return v}return Ie?(x_(v),Ie=ae.fallback,ct=v.mode,Mt=b.child,Vt=Mt.sibling,ae=rt(Mt,{mode:"hidden",children:ae.children}),ae.subtreeFlags=Mt.subtreeFlags&65011712,Vt!==null?Ie=rt(Vt,Ie):(Ie=Xn(Ie,ct,L,null),Ie.flags|=2),Ie.return=v,ae.return=v,ae.sibling=Ie,v.child=ae,ae=Ie,Ie=v.child,ct=b.child.memoizedState,ct===null?ct=N2(L):(Mt=ct.cachePool,Mt!==null?(Vt=Lh._currentValue,Mt=Mt.parent!==Vt?{parent:Vt,pool:Vt}:Mt):Mt=KE(),ct={baseLanes:ct.baseLanes|L,cachePool:Mt}),Ie.memoizedState=ct,Ie.childLanes=WE(b,$,L),v.memoizedState=Hot,ae):(Lu(v),L=b.child,b=L.sibling,L=rt(L,{mode:"visible",children:ae.children}),L.return=v,L.sibling=null,b!==null&&($=v.deletions,$===null?(v.deletions=[b],v.flags|=16):$.push(b)),v.child=L,v.memoizedState=null,L)}function $E(b,v){return v=R2({mode:"visible",children:v},b.mode),v.return=b,b.child=v}function R2(b,v){return b=h(22,b,null,v),b.lanes=0,b.stateNode={_visibility:ml,_pendingMarkers:null,_retryCache:null,_transitions:null},b}function h3(b,v,L){return GK(v,b.child,null,L),b=$E(v,v.pendingProps.children),b.flags|=2,v.memoizedState=null,b}function p3(b,v,L){b.lanes|=v;var $=b.alternate;$!==null&&($.lanes|=v),La(b.return,v,L)}function l9(b,v){var L=ra(b);return b=!L&&typeof E(b)=="function",L||b?(L=L?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",L,v,L),!1):!0}function qE(b,v,L,$,ae){var Ie=b.memoizedState;Ie===null?b.memoizedState={isBackwards:v,rendering:null,renderingStartTime:0,last:$,tail:L,tailMode:ae}:(Ie.isBackwards=v,Ie.rendering=null,Ie.renderingStartTime=0,Ie.last=$,Ie.tail=L,Ie.tailMode=ae)}function P4(b,v,L){var $=v.pendingProps,ae=$.revealOrder,Ie=$.tail;if($=$.children,ae!==void 0&&ae!=="forwards"&&ae!=="backwards"&&ae!=="together"&&!sEn[ae])if(sEn[ae]=!0,typeof ae=="string")switch(ae.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',ae,ae.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',ae,ae.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',ae)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',ae);Ie===void 0||Lot[Ie]||(Ie!=="collapsed"&&Ie!=="hidden"?(Lot[Ie]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',Ie)):ae!=="forwards"&&ae!=="backwards"&&(Lot[Ie]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',Ie)));e:if((ae==="forwards"||ae==="backwards")&&$!==void 0&&$!==null&&$!==!1)if(ra($)){for(var ze=0;ze<$.length;ze++)if(!l9($[ze],ze))break e}else if(ze=E($),typeof ze=="function"){if(ze=ze.call($))for(var ct=ze.next(),Mt=0;!ct.done;ct=ze.next()){if(!l9(ct.value,Mt))break e;Mt++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',ae);if(W0(b,v,$,L),$=Kf.current,($&Bte)!==0)$=$&YK|Bte,v.flags|=128;else{if(b!==null&&(b.flags&128)!==0)e:for(b=v.child;b!==null;){if(b.tag===13)b.memoizedState!==null&&p3(b,L,v);else if(b.tag===19)p3(b,L,v);else if(b.child!==null){b.child.return=b,b=b.child;continue}if(b===v)break e;for(;b.sibling===null;){if(b.return===null||b.return===v)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}$&=YK}switch(k(Kf,$,v),ae){case"forwards":for(L=v.child,ae=null;L!==null;)b=L.alternate,b!==null&&xh(b)===null&&(ae=L),L=L.sibling;L=ae,L===null?(ae=v.child,v.child=null):(ae=L.sibling,L.sibling=null),qE(v,!1,ae,L,Ie);break;case"backwards":for(L=null,ae=v.child,v.child=null;ae!==null;){if(b=ae.alternate,b!==null&&xh(b)===null){v.child=ae;break}b=ae.sibling,ae.sibling=L,L=ae,ae=b}qE(v,!0,L,null,Ie);break;case"together":qE(v,!1,null,null,void 0);break;default:v.memoizedState=null}return v.child}function bf(b,v,L){if(b!==null&&(v.dependencies=b.dependencies),bg=-1,DM|=v.lanes,(L&v.childLanes)===0)if(b!==null){if(Hr(b,v,L,!1),(L&v.childLanes)===0)return null}else return null;if(b!==null&&v.child!==b.child)throw Error("Resuming work not yet implemented.");if(v.child!==null){for(b=v.child,L=rt(b,b.pendingProps),v.child=L,L.return=v;b.sibling!==null;)b=b.sibling,L=L.sibling=rt(b,b.pendingProps),L.return=v;L.sibling=null}return v.child}function XE(b,v){return(b.lanes&v)!==0?!0:(b=b.dependencies,!!(b!==null&&fh(b)))}function T2(b,v,L){switch(v.tag){case 3:F(v,v.stateNode.containerInfo),MA(v,Lh,b.memoizedState.cache),go();break;case 27:case 5:Y(v);break;case 4:F(v,v.stateNode.containerInfo);break;case 10:MA(v,v.type,v.memoizedProps.value);break;case 12:(L&v.childLanes)!==0&&(v.flags|=4),v.flags|=2048;var $=v.stateNode;$.effectDuration=-0,$.passiveEffectDuration=-0;break;case 13:if($=v.memoizedState,$!==null)return $.dehydrated!==null?(Lu(v),v.flags|=128,null):(L&v.child.childLanes)!==0?jE(b,v,L):(Lu(v),b=bf(b,v,L),b!==null?b.sibling:null);Lu(v);break;case 19:var ae=(b.flags&128)!==0;if($=(L&v.childLanes)!==0,$||(Hr(b,v,L,!1),$=(L&v.childLanes)!==0),ae){if($)return P4(b,v,L);v.flags|=128}if(ae=v.memoizedState,ae!==null&&(ae.rendering=null,ae.tail=null,ae.lastEffect=null),k(Kf,Kf.current,v),$)break;return null;case 22:case 23:return v.lanes=0,s0(b,v,L);case 24:MA(v,Lh,b.memoizedState.cache)}return bf(b,v,L)}function k2(b,v,L){if(v._debugNeedsRemount&&b!==null){L=an(v.type,v.key,v.pendingProps,v._debugOwner||null,v.mode,v.lanes),L._debugStack=v._debugStack,L._debugTask=v._debugTask;var $=v.return;if($===null)throw Error("Cannot swap the root fiber.");if(b.alternate=null,v.alternate=null,L.index=v.index,L.sibling=v.sibling,L.return=v.return,L.ref=v.ref,L._debugInfo=v._debugInfo,v===$.child)$.child=L;else{var ae=$.child;if(ae===null)throw Error("Expected parent to have a child.");for(;ae.sibling!==v;)if(ae=ae.sibling,ae===null)throw Error("Expected to find the previous sibling.");ae.sibling=L}return v=$.deletions,v===null?($.deletions=[b],$.flags|=16):v.push(b),L.flags|=2,L}if(b!==null)if(b.memoizedProps!==v.pendingProps||v.type!==b.type)j1=!0;else{if(!XE(b,L)&&(v.flags&128)===0)return j1=!1,T2(b,v,L);j1=(b.flags&131072)!==0}else j1=!1,($=Hc)&&(qr(),$=(v.flags&1048576)!==0),$&&($=v.index,qr(),Ti(v,m8,$));switch(v.lanes=0,v.tag){case 16:e:if($=v.pendingProps,b=PM(v.elementType),v.type=b,typeof b=="function")ot(b)?($=B_(b,$),v.tag=1,v.type=b=n0(b),v=D2(null,v,b,$,L)):(v.tag=0,Qm(v,b),v.type=b=n0(b),v=JC(null,v,b,$,L));else{if(b!=null){if(ae=b.$$typeof,ae===Lf){v.tag=11,v.type=b=HC(b),v=M2(null,v,b,$,L);break e}else if(ae===b3){v.tag=14,v=sl(null,v,b,$,L);break e}}throw v="",b!==null&&typeof b=="object"&&b.$$typeof===dp&&(v=" Did you wrap a component in React.lazy() more than once?"),b=B(b)||b,Error("Element type is invalid. Received a promise that resolves to: "+b+". Lazy element type must resolve to a class or function."+v)}return v;case 0:return JC(b,v,v.type,v.pendingProps,L);case 1:return $=v.type,ae=B_($,v.pendingProps),D2(b,v,$,ae,L);case 3:e:{if(F(v,v.stateNode.containerInfo),b===null)throw Error("Should have a current fiber. This is a bug in React.");$=v.pendingProps;var Ie=v.memoizedState;ae=Ie.element,zc(b,v),Ld(v,$,null,L);var ze=v.memoizedState;if($=ze.cache,MA(v,Lh,$),$!==Ie.cache&&Y0(v,[Lh],L,!0),Kg(),$=ze.element,Ie.isDehydrated)if(Ie={element:$,isDehydrated:!1,cache:ze.cache},v.updateQueue.baseState=Ie,v.memoizedState=Ie,v.flags&256){v=WC(b,v,$,L);break e}else if($!==ae){ae=Ug(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),v),hr(ae),v=WC(b,v,$,L);break e}else for(b=v.stateNode.containerInfo,b.nodeType===9?b=b.body:b=b.nodeName==="HTML"?b.ownerDocument.body:b,$d=Zr(b.firstChild),W1=v,Hc=!0,qd=null,x9=!1,py=null,Uf=!0,b=U3n(v,null,$,L),v.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling;else{if(go(),$===ae){v=bf(b,v,L);break e}W0(b,v,$,L)}v=v.child}return v;case 26:return d3(b,v),b===null?(b=Jp(v.type,null,v.pendingProps,null))?v.memoizedState=b:Hc||(b=v.type,L=v.pendingProps,$=R($p.current),$=Ja($).createElement(b),$[zl]=v,$[vl]=L,S0($,b,L),et($),v.stateNode=$):v.memoizedState=Jp(v.type,b.memoizedProps,v.pendingProps,b.memoizedState),null;case 27:return Y(v),b===null&&Hc&&($=R($p.current),ae=U(),$=v.stateNode=hl(v.type,v.pendingProps,$,ae,!1),x9||(ae=Lc($,v.type,v.pendingProps,ae),ae!==null&&(ps(v,0).serverProps=ae)),W1=v,Uf=!0,ae=$d,xc(v.type)?(Ait=ae,$d=Zr($.firstChild)):$d=ae),W0(b,v,v.pendingProps.children,L),d3(b,v),b===null&&(v.flags|=4194304),v.child;case 5:return b===null&&Hc&&(Ie=U(),$=Hn(v.type,Ie.ancestorInfo),ae=$d,(ze=!ae)||(ze=qI(ae,v.type,v.pendingProps,Uf),ze!==null?(v.stateNode=ze,x9||(Ie=Lc(ze,v.type,v.pendingProps,Ie),Ie!==null&&(ps(v,0).serverProps=Ie)),W1=v,$d=Zr(ze.firstChild),Uf=!1,Ie=!0):Ie=!1,ze=!Ie),ze&&($&&Ic(v,ae),lc(v))),Y(v),ae=v.type,Ie=v.pendingProps,ze=b!==null?b.memoizedProps:null,$=Ie.children,qg(ae,Ie)?$=null:ze!==null&&qg(ae,ze)&&(v.flags|=32),v.memoizedState!==null&&(ae=Cf(b,v,rp,null,null,L),Hte._currentValue=ae),d3(b,v),W0(b,v,$,L),v.child;case 6:return b===null&&Hc&&(b=v.pendingProps,L=U(),$=L.ancestorInfo.current,b=$!=null?Lo(b,$.tag,L.ancestorInfo.implicitRootScope):!0,L=$d,($=!L)||($=ls(L,v.pendingProps,Uf),$!==null?(v.stateNode=$,W1=v,$d=null,$=!0):$=!1,$=!$),$&&(b&&Ic(v,L),lc(v))),null;case 13:return jE(b,v,L);case 4:return F(v,v.stateNode.containerInfo),$=v.pendingProps,b===null?v.child=GK(v,null,$,L):W0(b,v,$,L),v.child;case 11:return M2(b,v,v.type,v.pendingProps,L);case 7:return W0(b,v,v.pendingProps,L),v.child;case 8:return W0(b,v,v.pendingProps.children,L),v.child;case 12:return v.flags|=4,v.flags|=2048,$=v.stateNode,$.effectDuration=-0,$.passiveEffectDuration=-0,W0(b,v,v.pendingProps.children,L),v.child;case 10:return $=v.type,ae=v.pendingProps,Ie=ae.value,"value"in ae||aEn||(aEn=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),MA(v,$,Ie),W0(b,v,ae.children,L),v.child;case 9:return ae=v.type._context,$=v.pendingProps.children,typeof $!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Ih(v),ae=DA(ae),fe(v),$=Dot($,ae,void 0),pe(),v.flags|=1,W0(b,v,$,L),v.child;case 14:return sl(b,v,v.type,v.pendingProps,L);case 15:return b_(b,v,v.type,v.pendingProps,L);case 19:return P4(b,v,L);case 31:return $=v.pendingProps,L=v.mode,$={mode:$.mode,children:$.children},b===null?(b=R2($,L),b.ref=v.ref,v.child=b,b.return=v,v=b):(b=rt(b.child,$),b.ref=v.ref,v.child=b,b.return=v,v=b),v;case 22:return s0(b,v,L);case 24:return Ih(v),$=DA(Lh),b===null?(ae=A3(),ae===null&&(ae=Sg,Ie=hu(),ae.pooledCache=Ie,lg(Ie),Ie!==null&&(ae.pooledCacheLanes|=L),ae=Ie),v.memoizedState={parent:$,cache:ae},K0(v),MA(v,Lh,ae)):((b.lanes&L)!==0&&(zc(b,v),Ld(v,null,null,L),Kg()),ae=b.memoizedState,Ie=v.memoizedState,ae.parent!==$?(ae={parent:$,cache:$},v.memoizedState=ae,v.lanes===0&&(v.memoizedState=v.updateQueue.baseState=ae),MA(v,Lh,$)):($=Ie.cache,MA(v,Lh,$),$!==ae.cache&&Y0(v,[Lh],L,!0))),W0(b,v,v.pendingProps.children,L),v.child;case 29:throw v.pendingProps}throw Error("Unknown unit of work tag ("+v.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Ap(b){b.flags|=4}function F2(b,v){if(v.type!=="stylesheet"||(v.state.loading&G4)!==Dk)b.flags&=-16777217;else if(b.flags|=16777216,!up(v)){if(v=O4.current,v!==null&&((bc&4194048)===bc?y8!==null:(bc&62914560)!==bc&&(bc&536870912)===0||v!==y8))throw _o=Tn,ut;b.flags|=8192}}function m3(b,v){v!==null&&(b.flags|=4),b.flags&16384&&(v=b.tag!==22?ke():536870912,b.lanes|=v,Sk|=v)}function HI(b,v){if(!Hc)switch(b.tailMode){case"hidden":v=b.tail;for(var L=null;v!==null;)v.alternate!==null&&(L=v),v=v.sibling;L===null?b.tail=null:L.sibling=null;break;case"collapsed":L=b.tail;for(var $=null;L!==null;)L.alternate!==null&&($=L),L=L.sibling;$===null?v||b.tail===null?b.tail=null:b.tail.sibling=null:$.sibling=null}}function kc(b){var v=b.alternate!==null&&b.alternate.child===b.child,L=0,$=0;if(v)if((b.mode&Q0)!==fl){for(var ae=b.selfBaseDuration,Ie=b.child;Ie!==null;)L|=Ie.lanes|Ie.childLanes,$|=Ie.subtreeFlags&65011712,$|=Ie.flags&65011712,ae+=Ie.treeBaseDuration,Ie=Ie.sibling;b.treeBaseDuration=ae}else for(ae=b.child;ae!==null;)L|=ae.lanes|ae.childLanes,$|=ae.subtreeFlags&65011712,$|=ae.flags&65011712,ae.return=b,ae=ae.sibling;else if((b.mode&Q0)!==fl){ae=b.actualDuration,Ie=b.selfBaseDuration;for(var ze=b.child;ze!==null;)L|=ze.lanes|ze.childLanes,$|=ze.subtreeFlags,$|=ze.flags,ae+=ze.actualDuration,Ie+=ze.treeBaseDuration,ze=ze.sibling;b.actualDuration=ae,b.treeBaseDuration=Ie}else for(ae=b.child;ae!==null;)L|=ae.lanes|ae.childLanes,$|=ae.subtreeFlags,$|=ae.flags,ae.return=b,ae=ae.sibling;return b.subtreeFlags|=$,b.childLanes=L,v}function S_(b,v,L){var $=v.pendingProps;switch(Gs(v),v.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kc(v),null;case 1:return kc(v),null;case 3:return L=v.stateNode,$=null,b!==null&&($=b.memoizedState.cache),v.memoizedState.cache!==$&&(v.flags|=2048),Fa(Lh,v),O(v),L.pendingContext&&(L.context=L.pendingContext,L.pendingContext=null),(b===null||b.child===null)&&(bn(v)?(ia(),Ap(v)):b===null||b.memoizedState.isDehydrated&&(v.flags&256)===0||(v.flags|=1024,Go())),kc(v),null;case 26:return L=v.memoizedState,b===null?(Ap(v),L!==null?(kc(v),F2(v,L)):(kc(v),v.flags&=-16777217)):L?L!==b.memoizedState?(Ap(v),kc(v),F2(v,L)):(kc(v),v.flags&=-16777217):(b.memoizedProps!==$&&Ap(v),kc(v),v.flags&=-16777217),null;case 27:W(v),L=R($p.current);var ae=v.type;if(b!==null&&v.stateNode!=null)b.memoizedProps!==$&&Ap(v);else{if(!$){if(v.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return kc(v),null}b=U(),bn(v)?ka(v):(b=hl(ae,$,L,b,!0),v.stateNode=b,Ap(v))}return kc(v),null;case 5:if(W(v),L=v.type,b!==null&&v.stateNode!=null)b.memoizedProps!==$&&Ap(v);else{if(!$){if(v.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return kc(v),null}if(ae=U(),bn(v))ka(v);else{switch(b=R($p.current),Hn(L,ae.ancestorInfo),ae=ae.context,b=Ja(b),ae){case ZK:b=b.createElementNS(T_,L);break;case kye:b=b.createElementNS(qp,L);break;default:switch(L){case"svg":b=b.createElementNS(T_,L);break;case"math":b=b.createElementNS(qp,L);break;case"script":b=b.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof $.is=="string"?b.createElement("select",{is:$.is}):b.createElement("select"),$.multiple?b.multiple=!0:$.size&&(b.size=$.size);break;default:b=typeof $.is=="string"?b.createElement(L,{is:$.is}):b.createElement(L),L.indexOf("-")===-1&&(L!==L.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",L),Object.prototype.toString.call(b)!=="[object HTMLUnknownElement]"||G1.call(SEn,L)||(SEn[L]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",L)))}}b[zl]=v,b[vl]=$;e:for(ae=v.child;ae!==null;){if(ae.tag===5||ae.tag===6)b.appendChild(ae.stateNode);else if(ae.tag!==4&&ae.tag!==27&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===v)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===v)break e;ae=ae.return}ae.sibling.return=ae.return,ae=ae.sibling}v.stateNode=b;e:switch(S0(b,L,$),L){case"button":case"input":case"select":case"textarea":b=!!$.autoFocus;break e;case"img":b=!0;break e;default:b=!1}b&&Ap(v)}}return kc(v),v.flags&=-16777217,null;case 6:if(b&&v.stateNode!=null)b.memoizedProps!==$&&Ap(v);else{if(typeof $!="string"&&v.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(b=R($p.current),L=U(),bn(v)){b=v.stateNode,L=v.memoizedProps,ae=!x9,$=null;var Ie=W1;if(Ie!==null)switch(Ie.tag){case 3:ae&&(ae=l0(b,L,$),ae!==null&&(ps(v,0).serverProps=ae));break;case 27:case 5:$=Ie.memoizedProps,ae&&(ae=l0(b,L,$),ae!==null&&(ps(v,0).serverProps=ae))}b[zl]=v,b=!!(b.nodeValue===L||$!==null&&$.suppressHydrationWarning===!0||N1(b.nodeValue,L)),b||lc(v)}else ae=L.ancestorInfo.current,ae!=null&&Lo($,ae.tag,L.ancestorInfo.implicitRootScope),b=Ja(b).createTextNode($),b[zl]=v,v.stateNode=b}return kc(v),null;case 13:if($=v.memoizedState,b===null||b.memoizedState!==null&&b.memoizedState.dehydrated!==null){if(ae=bn(v),$!==null&&$.dehydrated!==null){if(b===null){if(!ae)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(ae=v.memoizedState,ae=ae!==null?ae.dehydrated:null,!ae)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");ae[zl]=v,kc(v),(v.mode&Q0)!==fl&&$!==null&&(ae=v.child,ae!==null&&(v.treeBaseDuration-=ae.treeBaseDuration))}else ia(),go(),(v.flags&128)===0&&(v.memoizedState=null),v.flags|=4,kc(v),(v.mode&Q0)!==fl&&$!==null&&(ae=v.child,ae!==null&&(v.treeBaseDuration-=ae.treeBaseDuration));ae=!1}else ae=Go(),b!==null&&b.memoizedState!==null&&(b.memoizedState.hydrationErrors=ae),ae=!0;if(!ae)return v.flags&256?(hg(v),v):(hg(v),null)}return hg(v),(v.flags&128)!==0?(v.lanes=L,(v.mode&Q0)!==fl&&U0(v),v):(L=$!==null,b=b!==null&&b.memoizedState!==null,L&&($=v.child,ae=null,$.alternate!==null&&$.alternate.memoizedState!==null&&$.alternate.memoizedState.cachePool!==null&&(ae=$.alternate.memoizedState.cachePool.pool),Ie=null,$.memoizedState!==null&&$.memoizedState.cachePool!==null&&(Ie=$.memoizedState.cachePool.pool),Ie!==ae&&($.flags|=2048)),L!==b&&L&&(v.child.flags|=8192),m3(v,v.updateQueue),kc(v),(v.mode&Q0)!==fl&&L&&(b=v.child,b!==null&&(v.treeBaseDuration-=b.treeBaseDuration)),null);case 4:return O(v),b===null&&l5(v.stateNode.containerInfo),kc(v),null;case 10:return Fa(v.type,v),kc(v),null;case 19:if(M(Kf,v),ae=v.memoizedState,ae===null)return kc(v),null;if($=(v.flags&128)!==0,Ie=ae.rendering,Ie===null)if($)HI(ae,!1);else{if(tm!==AQ||b!==null&&(b.flags&128)!==0)for(b=v.child;b!==null;){if(Ie=xh(b),Ie!==null){for(v.flags|=128,HI(ae,!1),b=Ie.updateQueue,v.updateQueue=b,m3(v,b),v.subtreeFlags=0,b=L,L=v.child;L!==null;)Ot(L,b),L=L.sibling;return k(Kf,Kf.current&YK|Bte,v),v.child}b=b.sibling}ae.tail!==null&&D_()>Bye&&(v.flags|=128,$=!0,HI(ae,!1),v.lanes=4194304)}else{if(!$)if(b=xh(Ie),b!==null){if(v.flags|=128,$=!0,b=b.updateQueue,v.updateQueue=b,m3(v,b),HI(ae,!0),ae.tail===null&&ae.tailMode==="hidden"&&!Ie.alternate&&!Hc)return kc(v),null}else 2*D_()-ae.renderingStartTime>Bye&&L!==536870912&&(v.flags|=128,$=!0,HI(ae,!1),v.lanes=4194304);ae.isBackwards?(Ie.sibling=v.child,v.child=Ie):(b=ae.last,b!==null?b.sibling=Ie:v.child=Ie,ae.last=Ie)}return ae.tail!==null?(b=ae.tail,ae.rendering=b,ae.tail=b.sibling,ae.renderingStartTime=D_(),b.sibling=null,L=Kf.current,L=$?L&YK|Bte:L&YK,k(Kf,L,v),b):(kc(v),null);case 22:case 23:return hg(v),op(v),$=v.memoizedState!==null,b!==null?b.memoizedState!==null!==$&&(v.flags|=8192):$&&(v.flags|=8192),$?(L&536870912)!==0&&(v.flags&128)===0&&(kc(v),v.subtreeFlags&6&&(v.flags|=8192)):kc(v),L=v.updateQueue,L!==null&&m3(v,L.retryQueue),L=null,b!==null&&b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(L=b.memoizedState.cachePool.pool),$=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&($=v.memoizedState.cachePool.pool),$!==L&&(v.flags|=2048),b!==null&&M(I8,v),null;case 24:return L=null,b!==null&&(L=b.memoizedState.cache),v.memoizedState.cache!==L&&(v.flags|=2048),Fa(Lh,v),kc(v),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+v.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function M4(b,v){switch(Gs(v),v.tag){case 1:return b=v.flags,b&65536?(v.flags=b&-65537|128,(v.mode&Q0)!==fl&&U0(v),v):null;case 3:return Fa(Lh,v),O(v),b=v.flags,(b&65536)!==0&&(b&128)===0?(v.flags=b&-65537|128,v):null;case 26:case 27:case 5:return W(v),null;case 13:if(hg(v),b=v.memoizedState,b!==null&&b.dehydrated!==null){if(v.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");go()}return b=v.flags,b&65536?(v.flags=b&-65537|128,(v.mode&Q0)!==fl&&U0(v),v):null;case 19:return M(Kf,v),null;case 4:return O(v),null;case 10:return Fa(v.type,v),null;case 22:case 23:return hg(v),op(v),b!==null&&M(I8,v),b=v.flags,b&65536?(v.flags=b&-65537|128,(v.mode&Q0)!==fl&&U0(v),v):null;case 24:return Fa(Lh,v),null;case 25:return null;default:return null}}function jC(b,v){switch(Gs(v),v.tag){case 3:Fa(Lh,v),O(v);break;case 26:case 27:case 5:W(v);break;case 4:O(v);break;case 13:hg(v);break;case 19:M(Kf,v);break;case 10:Fa(v.type,v);break;case 22:case 23:hg(v),op(v),b!==null&&M(I8,v);break;case 24:Fa(Lh,v)}}function vm(b){return(b.mode&Q0)!==fl}function ZE(b,v){vm(b)?(f_(),Sf(v,b),Mp()):Sf(v,b)}function NA(b,v,L){vm(b)?(f_(),OI(L,b,v),Mp()):OI(L,b,v)}function Sf(b,v){try{var L=v.updateQueue,$=L!==null?L.lastEffect:null;if($!==null){var ae=$.next;L=ae;do{if((L.tag&b)===b&&((b&od)!==li?Pi!==null&&typeof Pi.markComponentPassiveEffectMountStarted=="function"&&Pi.markComponentPassiveEffectMountStarted(v):(b&ya)!==li&&Pi!==null&&typeof Pi.markComponentLayoutEffectMountStarted=="function"&&Pi.markComponentLayoutEffectMountStarted(v),$=void 0,(b&Ws)!==li&&(qK=!0),$=Lt(v,gdr,L),(b&Ws)!==li&&(qK=!1),(b&od)!==li?Pi!==null&&typeof Pi.markComponentPassiveEffectMountStopped=="function"&&Pi.markComponentPassiveEffectMountStopped():(b&ya)!==li&&Pi!==null&&typeof Pi.markComponentLayoutEffectMountStopped=="function"&&Pi.markComponentLayoutEffectMountStopped(),$!==void 0&&typeof $!="function")){var Ie=void 0;Ie=(L.tag&ya)!==0?"useLayoutEffect":(L.tag&Ws)!==0?"useInsertionEffect":"useEffect";var ze=void 0;ze=$===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof $.then=="function"?`

It looks like you wrote `+Ie+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:

`+Ie+`(() => {
  async function fetchData() {
    // You can await here
    const response = await MyAPI.getData(someId);
    // ...
  }
  fetchData();
}, [someId]); // Or [] if effect doesn't need props or state

Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+$,Lt(v,function(ct,Mt){console.error("%s must not return anything besides a function, which is used for clean-up.%s",ct,Mt)},Ie,ze)}L=L.next}while(L!==ae)}}catch(ct){Si(v,v.return,ct)}}function OI(b,v,L){try{var $=v.updateQueue,ae=$!==null?$.lastEffect:null;if(ae!==null){var Ie=ae.next;$=Ie;do{if(($.tag&b)===b){var ze=$.inst,ct=ze.destroy;ct!==void 0&&(ze.destroy=void 0,(b&od)!==li?Pi!==null&&typeof Pi.markComponentPassiveEffectUnmountStarted=="function"&&Pi.markComponentPassiveEffectUnmountStarted(v):(b&ya)!==li&&Pi!==null&&typeof Pi.markComponentLayoutEffectUnmountStarted=="function"&&Pi.markComponentLayoutEffectUnmountStarted(v),(b&Ws)!==li&&(qK=!0),ae=v,Lt(ae,ddr,ae,L,ct),(b&Ws)!==li&&(qK=!1),(b&od)!==li?Pi!==null&&typeof Pi.markComponentPassiveEffectUnmountStopped=="function"&&Pi.markComponentPassiveEffectUnmountStopped():(b&ya)!==li&&Pi!==null&&typeof Pi.markComponentLayoutEffectUnmountStopped=="function"&&Pi.markComponentLayoutEffectUnmountStopped())}$=$.next}while($!==Ie)}}catch(Mt){Si(v,v.return,Mt)}}function Q1(b,v){vm(b)?(f_(),Sf(v,b),Mp()):Sf(v,b)}function e5(b,v,L){vm(b)?(f_(),OI(L,b,v),Mp()):OI(L,b,v)}function u9(b){var v=b.updateQueue;if(v!==null){var L=b.stateNode;b.type.defaultProps||"ref"in b.memoizedProps||KK||(L.props!==b.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Q(b)||"instance"),L.state!==b.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Q(b)||"instance"));try{Lt(b,QI,v,L)}catch($){Si(b,b.return,$)}}}function t5(b,v,L){return b.getSnapshotBeforeUpdate(v,L)}function g9(b,v){var L=v.memoizedProps,$=v.memoizedState;v=b.stateNode,b.type.defaultProps||"ref"in b.memoizedProps||KK||(v.props!==b.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Q(b)||"instance"),v.state!==b.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Q(b)||"instance"));try{var ae=B_(b.type,L,b.elementType===b.type),Ie=Lt(b,t5,v,ae,$);L=AEn,Ie!==void 0||L.has(b.type)||(L.add(b.type),Lt(b,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",Q(b))})),v.__reactInternalSnapshotBeforeUpdate=Ie}catch(ze){Si(b,b.return,ze)}}function n5(b,v,L){L.props=B_(b.type,b.memoizedProps),L.state=b.memoizedState,vm(b)?(f_(),Lt(b,T3n,b,v,L),Mp()):Lt(b,T3n,b,v,L)}function o5(b){var v=b.ref;if(v!==null){switch(b.tag){case 26:case 27:case 5:var L=b.stateNode;break;case 30:L=b.stateNode;break;default:L=b.stateNode}if(typeof v=="function")if(vm(b))try{f_(),b.refCleanup=v(L)}finally{Mp()}else b.refCleanup=v(L);else typeof v=="string"?console.error("String refs are no longer supported."):v.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",Q(b)),v.current=L}}function Qf(b,v){try{Lt(b,o5,b)}catch(L){Si(b,v,L)}}function Q_(b,v){var L=b.ref,$=b.refCleanup;if(L!==null)if(typeof $=="function")try{if(vm(b))try{f_(),Lt(b,$)}finally{Mp(b)}else Lt(b,$)}catch(ae){Si(b,v,ae)}finally{b.refCleanup=null,b=b.alternate,b!=null&&(b.refCleanup=null)}else if(typeof L=="function")try{if(vm(b))try{f_(),Lt(b,L,null)}finally{Mp(b)}else Lt(b,L,null)}catch(ae){Si(b,v,ae)}else L.current=null}function d9(b,v,L,$){var ae=b.memoizedProps,Ie=ae.id,ze=ae.onCommit;ae=ae.onRender,v=v===null?"mount":"update",Ck&&(v="nested-update"),typeof ae=="function"&&ae(Ie,v,b.actualDuration,b.treeBaseDuration,b.actualStartTime,L),typeof ze=="function"&&ze(b.memoizedProps.id,v,$,L)}function $C(b,v,L,$){var ae=b.memoizedProps;b=ae.id,ae=ae.onPostCommit,v=v===null?"mount":"update",Ck&&(v="nested-update"),typeof ae=="function"&&ae(b,v,$,L)}function L2(b){var v=b.type,L=b.memoizedProps,$=b.stateNode;try{Lt(b,Tf,$,v,L,b)}catch(ae){Si(b,b.return,ae)}}function GI(b,v,L){try{Lt(b,Pa,b.stateNode,b.type,L,v,b)}catch($){Si(b,b.return,$)}}function Hu(b){return b.tag===5||b.tag===3||b.tag===26||b.tag===27&&xc(b.type)||b.tag===4}function wm(b){e:for(;;){for(;b.sibling===null;){if(b.return===null||Hu(b.return))return null;b=b.return}for(b.sibling.return=b.return,b=b.sibling;b.tag!==5&&b.tag!==6&&b.tag!==18;){if(b.tag===27&&xc(b.type)||b.flags&2||b.child===null||b.tag===4)continue e;b.child.return=b,b=b.child}if(!(b.flags&2))return b.stateNode}}function i5(b,v,L){var $=b.tag;if($===5||$===6)b=b.stateNode,v?(L.nodeType===9?L.body:L.nodeName==="HTML"?L.ownerDocument.body:L).insertBefore(b,v):(v=L.nodeType===9?L.body:L.nodeName==="HTML"?L.ownerDocument.body:L,v.appendChild(b),L=L._reactRootContainer,L!=null||v.onclick!==null||(v.onclick=Up));else if($!==4&&($===27&&xc(b.type)&&(L=b.stateNode,v=null),b=b.child,b!==null))for(i5(b,v,L),b=b.sibling;b!==null;)i5(b,v,L),b=b.sibling}function zr(b,v,L){var $=b.tag;if($===5||$===6)b=b.stateNode,v?L.insertBefore(b,v):L.appendChild(b);else if($!==4&&($===27&&xc(b.type)&&(L=b.stateNode),b=b.child,b!==null))for(zr(b,v,L),b=b.sibling;b!==null;)zr(b,v,L),b=b.sibling}function v1(b){for(var v,L=b.return;L!==null;){if(Hu(L)){v=L;break}L=L.return}if(v==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(v.tag){case 27:v=v.stateNode,L=wm(b),zr(b,L,v);break;case 5:L=v.stateNode,v.flags&32&&(qc(L),v.flags&=-33),v=wm(b),zr(b,v,L);break;case 3:case 4:v=v.stateNode.containerInfo,L=wm(b),i5(b,L,v);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function D4(b){var v=b.stateNode,L=b.memoizedProps;try{Lt(b,Sl,b.type,L,v,b)}catch($){Si(b,b.return,$)}}function Bh(b,v){if(b=b.containerInfo,rit=Oye,b=mf(b),LC(b)){if("selectionStart"in b)var L={start:b.selectionStart,end:b.selectionEnd};else e:{L=(L=b.ownerDocument)&&L.defaultView||window;var $=L.getSelection&&L.getSelection();if($&&$.rangeCount!==0){L=$.anchorNode;var ae=$.anchorOffset,Ie=$.focusNode;$=$.focusOffset;try{L.nodeType,Ie.nodeType}catch{L=null;break e}var ze=0,ct=-1,Mt=-1,Vt=0,io=0,fo=b,eo=null;t:for(;;){for(var Bo;fo!==L||ae!==0&&fo.nodeType!==3||(ct=ze+ae),fo!==Ie||$!==0&&fo.nodeType!==3||(Mt=ze+$),fo.nodeType===3&&(ze+=fo.nodeValue.length),(Bo=fo.firstChild)!==null;)eo=fo,fo=Bo;for(;;){if(fo===b)break t;if(eo===L&&++Vt===ae&&(ct=ze),eo===Ie&&++io===$&&(Mt=ze),(Bo=fo.nextSibling)!==null)break;fo=eo,eo=fo.parentNode}fo=Bo}L=ct===-1||Mt===-1?null:{start:ct,end:Mt}}else L=null}L=L||{start:0,end:0}}else L=null;for(sit={focusedElem:b,selectionRange:L},Oye=!1,$1=v;$1!==null;)if(v=$1,b=v.child,(v.subtreeFlags&1024)!==0&&b!==null)b.return=v,$1=b;else for(;$1!==null;){switch(b=v=$1,L=b.alternate,ae=b.flags,b.tag){case 0:break;case 11:case 15:break;case 1:(ae&1024)!==0&&L!==null&&g9(b,L);break;case 3:if((ae&1024)!==0){if(b=b.stateNode.containerInfo,L=b.nodeType,L===9)kf(b);else if(L===1)switch(b.nodeName){case"HEAD":case"HTML":case"BODY":kf(b);break;default:b.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((ae&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(b=v.sibling,b!==null){b.return=v.return,$1=b;break}$1=v.return}}function H2(b,v,L){var $=L.flags;switch(L.tag){case 0:case 11:case 15:Pm(b,L),$&4&&ZE(L,ya|vi);break;case 1:if(Pm(b,L),$&4)if(b=L.stateNode,v===null)L.type.defaultProps||"ref"in L.memoizedProps||KK||(b.props!==L.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Q(L)||"instance"),b.state!==L.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Q(L)||"instance")),vm(L)?(f_(),Lt(L,Not,L,b),Mp()):Lt(L,Not,L,b);else{var ae=B_(L.type,v.memoizedProps);v=v.memoizedState,L.type.defaultProps||"ref"in L.memoizedProps||KK||(b.props!==L.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",Q(L)||"instance"),b.state!==L.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",Q(L)||"instance")),vm(L)?(f_(),Lt(L,D3n,L,b,ae,v,b.__reactInternalSnapshotBeforeUpdate),Mp()):Lt(L,D3n,L,b,ae,v,b.__reactInternalSnapshotBeforeUpdate)}$&64&&u9(L),$&512&&Qf(L,L.return);break;case 3:if(v=kd(),Pm(b,L),$&64&&($=L.updateQueue,$!==null)){if(ae=null,L.child!==null)switch(L.child.tag){case 27:case 5:ae=L.child.stateNode;break;case 1:ae=L.child.stateNode}try{Lt(L,QI,$,ae)}catch(ze){Si(L,L.return,ze)}}b.effectDuration+=ff(v);break;case 27:v===null&&$&4&&D4(L);case 26:case 5:Pm(b,L),v===null&&$&4&&L2(L),$&512&&Qf(L,L.return);break;case 12:if($&4){$=kd(),Pm(b,L),b=L.stateNode,b.effectDuration+=I1($);try{Lt(L,d9,L,v,FK,b.effectDuration)}catch(ze){Si(L,L.return,ze)}}else Pm(b,L);break;case 13:Pm(b,L),$&4&&bh(b,L),$&64&&(b=L.memoizedState,b!==null&&(b=b.dehydrated,b!==null&&(L=Qh.bind(null,L),Us(b,L))));break;case 22:if($=L.memoizedState!==null||aQ,!$){v=v!==null&&v.memoizedState!==null||Gm,ae=aQ;var Ie=Gm;aQ=$,(Gm=v)&&!Ie?w1(b,L,(L.subtreeFlags&8772)!==0):Pm(b,L),aQ=ae,Gm=Ie}break;case 30:break;default:Pm(b,L)}}function mu(b){var v=b.alternate;v!==null&&(b.alternate=null,mu(v)),b.child=null,b.deletions=null,b.sibling=null,b.tag===5&&(v=b.stateNode,v!==null&&kt(v)),b.stateNode=null,b._debugOwner=null,b.return=null,b.dependencies=null,b.memoizedProps=null,b.memoizedState=null,b.pendingProps=null,b.stateNode=null,b.updateQueue=null}function vf(b,v,L){for(L=L.child;L!==null;)YI(b,v,L),L=L.sibling}function YI(b,v,L){if(Vu&&typeof Vu.onCommitFiberUnmount=="function")try{Vu.onCommitFiberUnmount(jd,L)}catch(Ie){Zg||(Zg=!0,console.error("React instrumentation encountered an error: %s",Ie))}switch(L.tag){case 26:Gm||Q_(L,v),vf(b,v,L),L.memoizedState?L.memoizedState.count--:L.stateNode&&(L=L.stateNode,L.parentNode.removeChild(L));break;case 27:Gm||Q_(L,v);var $=L_,ae=k3;xc(L.type)&&(L_=L.stateNode,k3=!1),vf(b,v,L),Lt(L,Uu,L.stateNode),L_=$,k3=ae;break;case 5:Gm||Q_(L,v);case 6:if($=L_,ae=k3,L_=null,vf(b,v,L),L_=$,k3=ae,L_!==null)if(k3)try{Lt(L,$I,L_,L.stateNode)}catch(Ie){Si(L,v,Ie)}else try{Lt(L,xg,L_,L.stateNode)}catch(Ie){Si(L,v,Ie)}break;case 18:L_!==null&&(k3?(b=L_,T1(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,L.stateNode),E3(b)):T1(L_,L.stateNode));break;case 4:$=L_,ae=k3,L_=L.stateNode.containerInfo,k3=!0,vf(b,v,L),L_=$,k3=ae;break;case 0:case 11:case 14:case 15:Gm||OI(Ws,L,v),Gm||NA(L,v,ya),vf(b,v,L);break;case 1:Gm||(Q_(L,v),$=L.stateNode,typeof $.componentWillUnmount=="function"&&n5(L,v,$)),vf(b,v,L);break;case 21:vf(b,v,L);break;case 22:Gm=($=Gm)||L.memoizedState!==null,vf(b,v,L),Gm=$;break;default:vf(b,v,L)}}function bh(b,v){if(v.memoizedState===null&&(b=v.alternate,b!==null&&(b=b.memoizedState,b!==null&&(b=b.dehydrated,b!==null))))try{Lt(v,dl,b)}catch(L){Si(v,v.return,L)}}function _3(b){switch(b.tag){case 13:case 19:var v=b.stateNode;return v===null&&(v=b.stateNode=new cEn),v;case 22:return b=b.stateNode,v=b._retryCache,v===null&&(v=b._retryCache=new cEn),v;default:throw Error("Unexpected Suspense handler tag ("+b.tag+"). This is a bug in React.")}}function cp(b,v){var L=_3(b);v.forEach(function($){var ae=Kl.bind(null,b,$);if(!L.has($)){if(L.add($),Ql)if(VK!==null&&zK!==null)b0(zK,VK);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");$.then(ae,ae)}})}function Jc(b,v){var L=v.deletions;if(L!==null)for(var $=0;$<L.length;$++){var ae=b,Ie=v,ze=L[$],ct=Ie;e:for(;ct!==null;){switch(ct.tag){case 27:if(xc(ct.type)){L_=ct.stateNode,k3=!1;break e}break;case 5:L_=ct.stateNode,k3=!1;break e;case 3:case 4:L_=ct.stateNode.containerInfo,k3=!0;break e}ct=ct.return}if(L_===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");YI(ae,Ie,ze),L_=null,k3=!1,ae=ze,Ie=ae.alternate,Ie!==null&&(Ie.return=null),ae.return=null}if(v.subtreeFlags&13878)for(v=v.child;v!==null;)r5(v,b),v=v.sibling}function r5(b,v){var L=b.alternate,$=b.flags;switch(b.tag){case 0:case 11:case 14:case 15:Jc(v,b),Gi(b),$&4&&(OI(Ws|vi,b,b.return),Sf(Ws|vi,b),NA(b,b.return,ya|vi));break;case 1:Jc(v,b),Gi(b),$&512&&(Gm||L===null||Q_(L,L.return)),$&64&&aQ&&(b=b.updateQueue,b!==null&&($=b.callbacks,$!==null&&(L=b.shared.hiddenCallbacks,b.shared.hiddenCallbacks=L===null?$:L.concat($))));break;case 26:var ae=S9;if(Jc(v,b),Gi(b),$&512&&(Gm||L===null||Q_(L,L.return)),$&4)if(v=L!==null?L.memoizedState:null,$=b.memoizedState,L===null)if($===null)if(b.stateNode===null){e:{$=b.type,L=b.memoizedProps,v=ae.ownerDocument||ae;t:switch($){case"title":ae=v.getElementsByTagName("title")[0],(!ae||ae[j2]||ae[zl]||ae.namespaceURI===T_||ae.hasAttribute("itemprop"))&&(ae=v.createElement($),v.head.insertBefore(ae,v.querySelector("head > title"))),S0(ae,$,L),ae[zl]=b,et(ae),$=ae;break e;case"link":var Ie=V2("link","href",v).get($+(L.href||""));if(Ie){for(var ze=0;ze<Ie.length;ze++)if(ae=Ie[ze],ae.getAttribute("href")===(L.href==null||L.href===""?null:L.href)&&ae.getAttribute("rel")===(L.rel==null?null:L.rel)&&ae.getAttribute("title")===(L.title==null?null:L.title)&&ae.getAttribute("crossorigin")===(L.crossOrigin==null?null:L.crossOrigin)){Ie.splice(ze,1);break t}}ae=v.createElement($),S0(ae,$,L),v.head.appendChild(ae);break;case"meta":if(Ie=V2("meta","content",v).get($+(L.content||""))){for(ze=0;ze<Ie.length;ze++)if(ae=Ie[ze],oe(L.content,"content"),ae.getAttribute("content")===(L.content==null?null:""+L.content)&&ae.getAttribute("name")===(L.name==null?null:L.name)&&ae.getAttribute("property")===(L.property==null?null:L.property)&&ae.getAttribute("http-equiv")===(L.httpEquiv==null?null:L.httpEquiv)&&ae.getAttribute("charset")===(L.charSet==null?null:L.charSet)){Ie.splice(ze,1);break t}}ae=v.createElement($),S0(ae,$,L),v.head.appendChild(ae);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+$+'". This is a bug in React.')}ae[zl]=b,et(ae),$=ae}b.stateNode=$}else g5(ae,b.type,b.stateNode);else b.stateNode=us(ae,$,b.memoizedProps);else v!==$?(v===null?L.stateNode!==null&&(L=L.stateNode,L.parentNode.removeChild(L)):v.count--,$===null?g5(ae,b.type,b.stateNode):us(ae,$,b.memoizedProps)):$===null&&b.stateNode!==null&&GI(b,b.memoizedProps,L.memoizedProps);break;case 27:Jc(v,b),Gi(b),$&512&&(Gm||L===null||Q_(L,L.return)),L!==null&&$&4&&GI(b,b.memoizedProps,L.memoizedProps);break;case 5:if(Jc(v,b),Gi(b),$&512&&(Gm||L===null||Q_(L,L.return)),b.flags&32){v=b.stateNode;try{Lt(b,qc,v)}catch(io){Si(b,b.return,io)}}$&4&&b.stateNode!=null&&(v=b.memoizedProps,GI(b,v,L!==null?L.memoizedProps:v)),$&1024&&(Oot=!0,b.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Jc(v,b),Gi(b),$&4){if(b.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");$=b.memoizedProps,L=L!==null?L.memoizedProps:$,v=b.stateNode;try{Lt(b,Yu,v,L,$)}catch(io){Si(b,b.return,io)}}break;case 3:if(ae=kd(),Fye=null,Ie=S9,S9=zp(v.containerInfo),Jc(v,b),S9=Ie,Gi(b),$&4&&L!==null&&L.memoizedState.isDehydrated)try{Lt(b,XI,v.containerInfo)}catch(io){Si(b,b.return,io)}Oot&&(Oot=!1,pg(b)),v.effectDuration+=ff(ae);break;case 4:$=S9,S9=zp(b.stateNode.containerInfo),Jc(v,b),Gi(b),S9=$;break;case 12:$=kd(),Jc(v,b),Gi(b),b.stateNode.effectDuration+=I1($);break;case 13:Jc(v,b),Gi(b),b.child.flags&8192&&b.memoizedState!==null!=(L!==null&&L.memoizedState!==null)&&(zot=D_()),$&4&&($=b.updateQueue,$!==null&&(b.updateQueue=null,cp(b,$)));break;case 22:ae=b.memoizedState!==null;var ct=L!==null&&L.memoizedState!==null,Mt=aQ,Vt=Gm;if(aQ=Mt||ae,Gm=Vt||ct,Jc(v,b),Gm=Vt,aQ=Mt,Gi(b),$&8192)e:for(v=b.stateNode,v._visibility=ae?v._visibility&~ml:v._visibility|ml,ae&&(L===null||ct||aQ||Gm||Sh(b)),L=null,v=b;;){if(v.tag===5||v.tag===26){if(L===null){ct=L=v;try{Ie=ct.stateNode,ae?Lt(ct,Xg,Ie):Lt(ct,K2,ct.stateNode,ct.memoizedProps)}catch(io){Si(ct,ct.return,io)}}}else if(v.tag===6){if(L===null){ct=v;try{ze=ct.stateNode,ae?Lt(ct,U2,ze):Lt(ct,ty,ze,ct.memoizedProps)}catch(io){Si(ct,ct.return,io)}}}else if((v.tag!==22&&v.tag!==23||v.memoizedState===null||v===b)&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===b)break e;for(;v.sibling===null;){if(v.return===null||v.return===b)break e;L===v&&(L=null),v=v.return}L===v&&(L=null),v.sibling.return=v.return,v=v.sibling}$&4&&($=b.updateQueue,$!==null&&(L=$.retryQueue,L!==null&&($.retryQueue=null,cp(b,L))));break;case 19:Jc(v,b),Gi(b),$&4&&($=b.updateQueue,$!==null&&(b.updateQueue=null,cp(b,$)));break;case 30:break;case 21:break;default:Jc(v,b),Gi(b)}}function Gi(b){var v=b.flags;if(v&2){try{Lt(b,v1,b)}catch(L){Si(b,b.return,L)}b.flags&=-3}v&4096&&(b.flags&=-4097)}function pg(b){if(b.subtreeFlags&1024)for(b=b.child;b!==null;){var v=b;pg(v),v.tag===5&&v.flags&1024&&v.stateNode.reset(),b=b.sibling}}function Pm(b,v){if(v.subtreeFlags&8772)for(v=v.child;v!==null;)H2(b,v.alternate,v),v=v.sibling}function Op(b){switch(b.tag){case 0:case 11:case 14:case 15:NA(b,b.return,ya),Sh(b);break;case 1:Q_(b,b.return);var v=b.stateNode;typeof v.componentWillUnmount=="function"&&n5(b,b.return,v),Sh(b);break;case 27:Lt(b,Uu,b.stateNode);case 26:case 5:Q_(b,b.return),Sh(b);break;case 22:b.memoizedState===null&&Sh(b);break;case 30:Sh(b);break;default:Sh(b)}}function Sh(b){for(b=b.child;b!==null;)Op(b),b=b.sibling}function Ys(b,v,L,$){var ae=L.flags;switch(L.tag){case 0:case 11:case 15:w1(b,L,$),ZE(L,ya);break;case 1:if(w1(b,L,$),v=L.stateNode,typeof v.componentDidMount=="function"&&Lt(L,Not,L,v),v=L.updateQueue,v!==null){b=L.stateNode;try{Lt(L,Np,v,b)}catch(Ie){Si(L,L.return,Ie)}}$&&ae&64&&u9(L),Qf(L,L.return);break;case 27:D4(L);case 26:case 5:w1(b,L,$),$&&v===null&&ae&4&&L2(L),Qf(L,L.return);break;case 12:if($&&ae&4){ae=kd(),w1(b,L,$),$=L.stateNode,$.effectDuration+=I1(ae);try{Lt(L,d9,L,v,FK,$.effectDuration)}catch(Ie){Si(L,L.return,Ie)}}else w1(b,L,$);break;case 13:w1(b,L,$),$&&ae&4&&bh(b,L);break;case 22:L.memoizedState===null&&w1(b,L,$),Qf(L,L.return);break;case 30:break;default:w1(b,L,$)}}function w1(b,v,L){for(L=L&&(v.subtreeFlags&8772)!==0,v=v.child;v!==null;)Ys(b,v.alternate,v,L),v=v.sibling}function a0(b,v){var L=null;b!==null&&b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(L=b.memoizedState.cachePool.pool),b=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(b=v.memoizedState.cachePool.pool),b!==L&&(b!=null&&lg(b),L!=null&&wp(L))}function al(b,v){b=null,v.alternate!==null&&(b=v.alternate.memoizedState.cache),v=v.memoizedState.cache,v!==b&&(lg(v),b!=null&&wp(b))}function ai(b,v,L,$){if(v.subtreeFlags&10256)for(v=v.child;v!==null;)v_(b,v,L,$),v=v.sibling}function v_(b,v,L,$){var ae=v.flags;switch(v.tag){case 0:case 11:case 15:ai(b,v,L,$),ae&2048&&Q1(v,od|vi);break;case 1:ai(b,v,L,$);break;case 3:var Ie=kd();ai(b,v,L,$),ae&2048&&(L=null,v.alternate!==null&&(L=v.alternate.memoizedState.cache),v=v.memoizedState.cache,v!==L&&(lg(v),L!=null&&wp(L))),b.passiveEffectDuration+=ff(Ie);break;case 12:if(ae&2048){ae=kd(),ai(b,v,L,$),b=v.stateNode,b.passiveEffectDuration+=I1(ae);try{Lt(v,$C,v,v.alternate,FK,b.passiveEffectDuration)}catch(ct){Si(v,v.return,ct)}}else ai(b,v,L,$);break;case 13:ai(b,v,L,$);break;case 23:break;case 22:Ie=v.stateNode;var ze=v.alternate;v.memoizedState!==null?Ie._visibility&_p?ai(b,v,L,$):Wc(b,v):Ie._visibility&_p?ai(b,v,L,$):(Ie._visibility|=_p,Al(b,v,L,$,(v.subtreeFlags&10256)!==0)),ae&2048&&a0(ze,v);break;case 24:ai(b,v,L,$),ae&2048&&al(v.alternate,v);break;default:ai(b,v,L,$)}}function Al(b,v,L,$,ae){for(ae=ae&&(v.subtreeFlags&10256)!==0,v=v.child;v!==null;)P1(b,v,L,$,ae),v=v.sibling}function P1(b,v,L,$,ae){var Ie=v.flags;switch(v.tag){case 0:case 11:case 15:Al(b,v,L,$,ae),Q1(v,od);break;case 23:break;case 22:var ze=v.stateNode;v.memoizedState!==null?ze._visibility&_p?Al(b,v,L,$,ae):Wc(b,v):(ze._visibility|=_p,Al(b,v,L,$,ae)),ae&&Ie&2048&&a0(v.alternate,v);break;case 24:Al(b,v,L,$,ae),ae&&Ie&2048&&al(v.alternate,v);break;default:Al(b,v,L,$,ae)}}function Wc(b,v){if(v.subtreeFlags&10256)for(v=v.child;v!==null;){var L=b,$=v,ae=$.flags;switch($.tag){case 22:Wc(L,$),ae&2048&&a0($.alternate,$);break;case 24:Wc(L,$),ae&2048&&al($.alternate,$);break;default:Wc(L,$)}v=v.sibling}}function Gp(b){if(b.subtreeFlags&bte)for(b=b.child;b!==null;)A0(b),b=b.sibling}function A0(b){switch(b.tag){case 26:Gp(b),b.flags&bte&&b.memoizedState!==null&&G(S9,b.memoizedState,b.memoizedProps);break;case 5:Gp(b);break;case 3:case 4:var v=S9;S9=zp(b.stateNode.containerInfo),Gp(b),S9=v;break;case 22:b.memoizedState===null&&(v=b.alternate,v!==null&&v.memoizedState!==null?(v=bte,bte=16777216,Gp(b),bte=v):Gp(b));break;default:Gp(b)}}function Mm(b){var v=b.alternate;if(v!==null&&(b=v.child,b!==null)){v.child=null;do v=b.sibling,b.sibling=null,b=v;while(b!==null)}}function mg(b){var v=b.deletions;if((b.flags&16)!==0){if(v!==null)for(var L=0;L<v.length;L++){var $=v[L];$1=$,RA($,b)}Mm(b)}if(b.subtreeFlags&10256)for(b=b.child;b!==null;)_g(b),b=b.sibling}function _g(b){switch(b.tag){case 0:case 11:case 15:mg(b),b.flags&2048&&e5(b,b.return,od|vi);break;case 3:var v=kd();mg(b),b.stateNode.passiveEffectDuration+=ff(v);break;case 12:v=kd(),mg(b),b.stateNode.passiveEffectDuration+=I1(v);break;case 22:v=b.stateNode,b.memoizedState!==null&&v._visibility&_p&&(b.return===null||b.return.tag!==13)?(v._visibility&=~_p,O2(b)):mg(b);break;default:mg(b)}}function O2(b){var v=b.deletions;if((b.flags&16)!==0){if(v!==null)for(var L=0;L<v.length;L++){var $=v[L];$1=$,RA($,b)}Mm(b)}for(b=b.child;b!==null;)G2(b),b=b.sibling}function G2(b){switch(b.tag){case 0:case 11:case 15:e5(b,b.return,od),O2(b);break;case 22:var v=b.stateNode;v._visibility&_p&&(v._visibility&=~_p,O2(b));break;default:O2(b)}}function RA(b,v){for(;$1!==null;){var L=$1,$=L;switch($.tag){case 0:case 11:case 15:e5($,v,od);break;case 23:case 22:$.memoizedState!==null&&$.memoizedState.cachePool!==null&&($=$.memoizedState.cachePool.pool,$!=null&&lg($));break;case 24:wp($.memoizedState.cache)}if($=L.child,$!==null)$.return=L,$1=$;else e:for(L=b;$1!==null;){$=$1;var ae=$.sibling,Ie=$.return;if(mu($),$===L){$1=null;break e}if(ae!==null){ae.return=Ie,$1=ae;break e}$1=Ie}}}function jg(){pdr.forEach(function(b){return b()})}function qC(){var b=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return b||Wn.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),b}function Kd(b){if((v0&ix)!==x5&&bc!==0)return bc&-bc;var v=Wn.T;return v!==null?(v._updatedFibers||(v._updatedFibers=new Set),v._updatedFibers.add(b),b=f8,b!==0?b:c5()):Ct()}function h9(){B5===0&&(B5=(bc&536870912)===0||Hc?Ee():536870912);var b=O4.current;return b!==null&&(b.flags|=32),B5}function yc(b,v,L){if(qK&&console.error("useInsertionEffect must not schedule updates."),qot&&(bye=!0),(b===Sg&&(Z0===Bk||Z0===bk)||b.cancelPendingCommit!==null)&&(Y2(b,0),wf(b,bc,B5,!1)),Le(b,L),(v0&ix)!==0&&b===Sg){if(nd)switch(v.tag){case 0:case 11:case 15:b=dc&&Q(dc)||"Unknown",IEn.has(b)||(IEn.add(b),v=Q(v)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",v,b,b));break;case 1:fEn||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),fEn=!0)}}else Ql&&nt(b,v,L),a5(v),b===Sg&&((v0&ix)===x5&&(NM|=L),tm===Ek&&wf(b,bc,B5,!1)),Cg(b)}function cs(b,v,L){if((v0&(ix|Q9))!==x5)throw Error("Should not already be working.");var $=!L&&(v&124)===0&&(v&b.expiredLanes)===0||Te(b,v),ae=$?Pf(b,v):ZC(b,v,!0),Ie=$;do{if(ae===AQ){jK&&!$&&wf(b,v,0,!1);break}else{if(L=b.current.alternate,Ie&&!c8(L)){ae=ZC(b,v,!1),Ie=!1;continue}if(ae===JK){if(Ie=v,b.errorRecoveryDisabledLanes&Ie)var ze=0;else ze=b.pendingLanes&-536870913,ze=ze!==0?ze:ze&536870912?536870912:0;if(ze!==0){v=ze;e:{ae=b;var ct=ze;ze=Mte;var Mt=ae.current.memoizedState.isDehydrated;if(Mt&&(Y2(ae,ct).flags|=256),ct=ZC(ae,ct,!1),ct!==JK){if(Kot&&!Mt){ae.errorRecoveryDisabledLanes|=Ie,NM|=Ie,ae=Ek;break e}ae=rx,rx=ze,ae!==null&&(rx===null?rx=ae:rx.push.apply(rx,ae))}ae=ct}if(Ie=!1,ae!==JK)continue}}if(ae===Qte){Y2(b,0),wf(b,v,0,!0);break}e:{switch($=b,ae){case AQ:case Qte:throw Error("Root did not complete. This is a bug in React.");case Ek:if((v&4194048)!==v)break;case xye:wf($,v,B5,!MM);break e;case JK:rx=null;break;case Got:case lEn:break;default:throw Error("Unknown root exit status.")}if(Wn.actQueue!==null)B0($,L,v,rx,Dte,Eye,B5,NM,Sk);else{if((v&62914560)===v&&(Ie=zot+gEn-D_(),10<Ie)){if(wf($,v,B5,!MM),we($,0,!0)!==0)break e;$.timeoutHandle=QEn(Jn.bind(null,$,L,rx,Dte,Eye,v,B5,NM,Sk,MM,ae,Idr,Ite,0),Ie);break e}Jn($,L,rx,Dte,Eye,v,B5,NM,Sk,MM,ae,_dr,Ite,0)}}}break}while(!0);Cg(b)}function Jn(b,v,L,$,ae,Ie,ze,ct,Mt,Vt,io,fo,eo,Bo){if(b.timeoutHandle=Mk,fo=v.subtreeFlags,(fo&8192||(fo&16785408)===16785408)&&(Lte={stylesheets:null,count:0,unsuspend:Ku},A0(v),fo=V(),fo!==null)){b.cancelPendingCommit=fo(B0.bind(null,b,v,Ie,L,$,ae,ze,ct,Mt,io,fdr,eo,Bo)),wf(b,Ie,ze,!Vt);return}B0(b,v,Ie,L,$,ae,ze,ct,Mt)}function c8(b){for(var v=b;;){var L=v.tag;if((L===0||L===11||L===15)&&v.flags&16384&&(L=v.updateQueue,L!==null&&(L=L.stores,L!==null)))for(var $=0;$<L.length;$++){var ae=L[$],Ie=ae.getSnapshot;ae=ae.value;try{if(!em(Ie(),ae))return!1}catch{return!1}}if(L=v.child,v.subtreeFlags&16384&&L!==null)L.return=v,v=L;else{if(v===b)break;for(;v.sibling===null;){if(v.return===null||v.return===b)return!0;v=v.return}v.sibling.return=v.return,v=v.sibling}}return!0}function wf(b,v,L,$){v&=~Vot,v&=~NM,b.suspendedLanes|=v,b.pingedLanes&=~v,$&&(b.warmLanes|=v),$=b.expirationTimes;for(var ae=v;0<ae;){var Ie=31-q0(ae),ze=1<<Ie;$[Ie]=-1,ae&=~ze}L!==0&&tt(b,L,v)}function XC(){return(v0&(ix|Q9))===x5?(Dm(0),!1):!0}function fg(){if(dc!==null){if(Z0===F3)var b=dc.return;else b=dc,lA(),gg(b),OK=null,Ete=0,b=dc;for(;b!==null;)jC(b.alternate,b),b=b.return;dc=null}}function Y2(b,v){var L=b.timeoutHandle;L!==Mk&&(b.timeoutHandle=Mk,Ddr(L)),L=b.cancelPendingCommit,L!==null&&(b.cancelPendingCommit=null,L()),fg(),Sg=b,dc=L=rt(b.current,null),bc=v,Z0=F3,E5=null,MM=!1,jK=Te(b,v),Kot=!1,tm=AQ,Sk=B5=Vot=NM=DM=0,rx=Mte=null,Eye=!1,(v&8)!==0&&(v|=v&32);var $=b.entangledLanes;if($!==0)for(b=b.entanglements,$&=v;0<$;){var ae=31-q0($),Ie=1<<ae;v|=b[ae],$&=~Ie}return x8=v,Vc(),v=TK(),1e3<v-E9&&(Wn.recentlyCreatedOwnerStacks=0,E9=v),R3.discardPendingWarnings(),L}function _u(b,v){$a=null,Wn.H=Cye,Wn.getCurrentStack=null,nd=!1,Th=null,v===Ne||v===Ft?(v=Im(),Z0=wte):v===ut?(v=Im(),Z0=uEn):Z0=v===tEn?Uot:v!==null&&typeof v=="object"&&typeof v.then=="function"?WK:vte,E5=v;var L=dc;if(L===null)tm=Qte,w2(b,Ug(v,b.current));else switch(L.mode&Q0&&Pp(L),pe(),Z0){case vte:Pi!==null&&typeof Pi.markComponentErrored=="function"&&Pi.markComponentErrored(L,v,bc);break;case Bk:case bk:case wte:case WK:case Pte:Pi!==null&&typeof Pi.markComponentSuspended=="function"&&Pi.markComponentSuspended(L,v,bc)}}function Ig(){var b=Wn.H;return Wn.H=Cye,b===null?Cye:b}function s5(){var b=Wn.A;return Wn.A=hdr,b}function f3(){tm=Ek,MM||(bc&4194048)!==bc&&O4.current!==null||(jK=!0),(DM&134217727)===0&&(NM&134217727)===0||Sg===null||wf(Sg,bc,B5,!1)}function ZC(b,v,L){var $=v0;v0|=ix;var ae=Ig(),Ie=s5();if(Sg!==b||bc!==v){if(Ql){var ze=b.memoizedUpdaters;0<ze.size&&(b0(b,bc),ze.clear()),gt(b,v)}Dte=null,Y2(b,v)}ye(v),v=!1,ze=tm;e:do try{if(Z0!==F3&&dc!==null){var ct=dc,Mt=E5;switch(Z0){case Uot:fg(),ze=xye;break e;case wte:case Bk:case bk:case WK:O4.current===null&&(v=!0);var Vt=Z0;if(Z0=F3,E5=null,jc(b,ct,Mt,Vt),L&&jK){ze=AQ;break e}break;default:Vt=Z0,Z0=F3,E5=null,jc(b,ct,Mt,Vt)}}I3(),ze=tm;break}catch(io){_u(b,io)}while(!0);return v&&b.shellSuspendCounter++,lA(),v0=$,Wn.H=ae,Wn.A=Ie,Me(),dc===null&&(Sg=null,bc=0,Vc()),ze}function I3(){for(;dc!==null;)C3(dc)}function Pf(b,v){var L=v0;v0|=ix;var $=Ig(),ae=s5();if(Sg!==b||bc!==v){if(Ql){var Ie=b.memoizedUpdaters;0<Ie.size&&(b0(b,bc),Ie.clear()),gt(b,v)}Dte=null,Bye=D_()+dEn,Y2(b,v)}else jK=Te(b,v);ye(v);e:do try{if(Z0!==F3&&dc!==null)t:switch(v=dc,Ie=E5,Z0){case vte:Z0=F3,E5=null,jc(b,v,Ie,vte);break;case Bk:case bk:if(_2(Ie)){Z0=F3,E5=null,KI(v);break}v=function(){Z0!==Bk&&Z0!==bk||Sg!==b||(Z0=Pte),Cg(b)},Ie.then(v,v);break e;case wte:Z0=Pte;break e;case uEn:Z0=Yot;break e;case Pte:_2(Ie)?(Z0=F3,E5=null,KI(v)):(Z0=F3,E5=null,jc(b,v,Ie,Pte));break;case Yot:var ze=null;switch(dc.tag){case 26:ze=dc.memoizedState;case 5:case 27:var ct=dc;if(!ze||up(ze)){Z0=F3,E5=null;var Mt=ct.sibling;if(Mt!==null)dc=Mt;else{var Vt=ct.return;Vt!==null?(dc=Vt,cl(Vt)):dc=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Z0=F3,E5=null,jc(b,v,Ie,Yot);break;case WK:Z0=F3,E5=null,jc(b,v,Ie,WK);break;case Uot:fg(),tm=xye;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Wn.actQueue!==null?I3():UI();break}catch(io){_u(b,io)}while(!0);return lA(),Wn.H=$,Wn.A=ae,v0=L,dc!==null?(Pi!==null&&typeof Pi.markRenderYielded=="function"&&Pi.markRenderYielded(),AQ):(Me(),Sg=null,bc=0,Vc(),tm)}function UI(){for(;dc!==null&&!sy();)C3(dc)}function C3(b){var v=b.alternate;(b.mode&Q0)!==fl?(p2(b),v=Lt(b,k2,v,b,x8),Pp(b)):v=Lt(b,k2,v,b,x8),b.memoizedProps=b.pendingProps,v===null?cl(b):dc=v}function KI(b){var v=Lt(b,E0,b);b.memoizedProps=b.pendingProps,v===null?cl(b):dc=v}function E0(b){var v=b.alternate,L=(b.mode&Q0)!==fl;switch(L&&p2(b),b.tag){case 15:case 0:v=Bf(v,b,b.pendingProps,b.type,void 0,bc);break;case 11:v=Bf(v,b,b.pendingProps,b.type.render,b.ref,bc);break;case 5:gg(b);default:jC(v,b),b=dc=Ot(b,x8),v=k2(v,b,x8)}return L&&Pp(b),v}function jc(b,v,L,$){lA(),gg(v),OK=null,Ete=0;var ae=v.return;try{if(zC(b,ae,v,L,bc)){tm=Qte,w2(b,Ug(L,b.current)),dc=null;return}}catch(Ie){if(ae!==null)throw dc=ae,Ie;tm=Qte,w2(b,Ug(L,b.current)),dc=null;return}v.flags&32768?(Hc||$===vte?b=!0:jK||(bc&536870912)!==0?b=!1:(MM=b=!0,($===Bk||$===bk||$===wte||$===WK)&&($=O4.current,$!==null&&$.tag===13&&($.flags|=16384))),Ou(v,b)):cl(v)}function cl(b){var v=b;do{if((v.flags&32768)!==0){Ou(v,MM);return}var L=v.alternate;if(b=v.return,p2(v),L=Lt(v,S_,L,v,x8),(v.mode&Q0)!==fl&&SI(v),L!==null){dc=L;return}if(v=v.sibling,v!==null){dc=v;return}dc=v=b}while(v!==null);tm===AQ&&(tm=lEn)}function Ou(b,v){do{var L=M4(b.alternate,b);if(L!==null){L.flags&=32767,dc=L;return}if((b.mode&Q0)!==fl){SI(b),L=b.actualDuration;for(var $=b.child;$!==null;)L+=$.actualDuration,$=$.sibling;b.actualDuration=L}if(L=b.return,L!==null&&(L.flags|=32768,L.subtreeFlags=0,L.deletions=null),!v&&(b=b.sibling,b!==null)){dc=b;return}dc=b=L}while(b!==null);tm=xye,dc=null}function B0(b,v,L,$,ae,Ie,ze,ct,Mt){b.cancelPendingCommit=null;do Za();while(lC!==Qk);if(R3.flushLegacyContextWarning(),R3.flushPendingUnsafeLifecycleWarnings(),(v0&(ix|Q9))!==x5)throw Error("Should not already be working.");if(Pi!==null&&typeof Pi.markCommitStarted=="function"&&Pi.markCommitStarted(L),v===null)ue();else{if(L===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),v===b.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(Ie=v.lanes|v.childLanes,Ie|=_k,Ye(b,L,Ie,ze,ct,Mt),b===Sg&&(dc=Sg=null,bc=0),$K=v,TM=b,kM=L,Wot=Ie,jot=ae,_En=$,(v.subtreeFlags&10256)!==0||(v.flags&10256)!==0?(b.callbackNode=null,b.callbackPriority=0,Mf(Q3,function(){return Vs(),null})):(b.callbackNode=null,b.callbackPriority=0),FK=nQ(),$=(v.flags&13878)!==0,(v.subtreeFlags&13878)!==0||$){$=Wn.T,Wn.T=null,ae=_s.p,_s.p=ed,ze=v0,v0|=Q9;try{Bh(b,v,L)}finally{v0=ze,_s.p=ae,Wn.T=$}}lC=hEn,bl(),Vd(),za()}}function bl(){if(lC===hEn){lC=Qk;var b=TM,v=$K,L=kM,$=(v.flags&13878)!==0;if((v.subtreeFlags&13878)!==0||$){$=Wn.T,Wn.T=null;var ae=_s.p;_s.p=ed;var Ie=v0;v0|=Q9;try{VK=L,zK=b,r5(v,b),zK=VK=null,L=sit;var ze=mf(b.containerInfo),ct=L.focusedElem,Mt=L.selectionRange;if(ze!==ct&&ct&&ct.ownerDocument&&Zh(ct.ownerDocument.documentElement,ct)){if(Mt!==null&&LC(ct)){var Vt=Mt.start,io=Mt.end;if(io===void 0&&(io=Vt),"selectionStart"in ct)ct.selectionStart=Vt,ct.selectionEnd=Math.min(io,ct.value.length);else{var fo=ct.ownerDocument||document,eo=fo&&fo.defaultView||window;if(eo.getSelection){var Bo=eo.getSelection(),Yr=ct.textContent.length,Ea=Math.min(Mt.start,Yr),Qg=Mt.end===void 0?Ea:Math.min(Mt.end,Yr);!Bo.extend&&Ea>Qg&&(ze=Qg,Qg=Ea,Ea=ze);var Oc=da(ct,Ea),cn=da(ct,Qg);if(Oc&&cn&&(Bo.rangeCount!==1||Bo.anchorNode!==Oc.node||Bo.anchorOffset!==Oc.offset||Bo.focusNode!==cn.node||Bo.focusOffset!==cn.offset)){var un=fo.createRange();un.setStart(Oc.node,Oc.offset),Bo.removeAllRanges(),Ea>Qg?(Bo.addRange(un),Bo.extend(cn.node,cn.offset)):(un.setEnd(cn.node,cn.offset),Bo.addRange(un))}}}}for(fo=[],Bo=ct;Bo=Bo.parentNode;)Bo.nodeType===1&&fo.push({element:Bo,left:Bo.scrollLeft,top:Bo.scrollTop});for(typeof ct.focus=="function"&&ct.focus(),ct=0;ct<fo.length;ct++){var xn=fo[ct];xn.element.scrollLeft=xn.left,xn.element.scrollTop=xn.top}}Oye=!!rit,sit=rit=null}finally{v0=Ie,_s.p=ae,Wn.T=$}}b.current=v,lC=pEn}}function Vd(){if(lC===pEn){lC=Qk;var b=TM,v=$K,L=kM,$=(v.flags&8772)!==0;if((v.subtreeFlags&8772)!==0||$){$=Wn.T,Wn.T=null;var ae=_s.p;_s.p=ed;var Ie=v0;v0|=Q9;try{Pi!==null&&typeof Pi.markLayoutEffectsStarted=="function"&&Pi.markLayoutEffectsStarted(L),VK=L,zK=b,H2(b,v.alternate,v),zK=VK=null,Pi!==null&&typeof Pi.markLayoutEffectsStopped=="function"&&Pi.markLayoutEffectsStopped()}finally{v0=Ie,_s.p=ae,Wn.T=$}}lC=mEn}}function za(){if(lC===Cdr||lC===mEn){lC=Qk,g8();var b=TM,v=$K,L=kM,$=_En,ae=(v.subtreeFlags&10256)!==0||(v.flags&10256)!==0;ae?lC=Jot:(lC=Qk,$K=TM=null,Xa(b,b.pendingLanes),vk=0,Rte=null);var Ie=b.pendingLanes;if(Ie===0&&(RM=null),ae||zI(b),ae=bt(L),v=v.stateNode,Vu&&typeof Vu.onCommitFiberRoot=="function")try{var ze=(v.current.flags&128)===128;switch(ae){case ed:var ct=Ay;break;case hp:ct=Y1;break;case N_:ct=Q3;break;case w3:ct=m9;break;default:ct=Q3}Vu.onCommitFiberRoot(jd,v,ct,ze)}catch(fo){Zg||(Zg=!0,console.error("React instrumentation encountered an error: %s",fo))}if(Ql&&b.memoizedUpdaters.clear(),jg(),$!==null){ze=Wn.T,ct=_s.p,_s.p=ed,Wn.T=null;try{var Mt=b.onRecoverableError;for(v=0;v<$.length;v++){var Vt=$[v],io=$g(Vt.stack);Lt(Vt.source,Mt,Vt.value,io)}}finally{Wn.T=ze,_s.p=ct}}(kM&3)!==0&&Za(),Cg(b),Ie=b.pendingLanes,(L&4194090)!==0&&(Ie&42)!==0?(yk=!0,b===$ot?Nte++:(Nte=0,$ot=b)):Nte=0,Dm(0),ue()}}function $g(b){return b={componentStack:b},Object.defineProperty(b,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),b}function Xa(b,v){(b.pooledCacheLanes&=v)===0&&(v=b.pooledCache,v!=null&&(b.pooledCache=null,wp(v)))}function Za(b){return bl(),Vd(),za(),Vs()}function Vs(){if(lC!==Jot)return!1;var b=TM,v=Wot;Wot=0;var L=bt(kM),$=N_>L?N_:L;L=Wn.T;var ae=_s.p;try{_s.p=$,Wn.T=null,$=jot,jot=null;var Ie=TM,ze=kM;if(lC=Qk,$K=TM=null,kM=0,(v0&(ix|Q9))!==x5)throw Error("Cannot flush passive effects while already rendering.");qot=!0,bye=!1,Pi!==null&&typeof Pi.markPassiveEffectsStarted=="function"&&Pi.markPassiveEffectsStarted(ze);var ct=v0;if(v0|=Q9,_g(Ie.current),v_(Ie,Ie.current,ze,$),Pi!==null&&typeof Pi.markPassiveEffectsStopped=="function"&&Pi.markPassiveEffectsStopped(),zI(Ie),v0=ct,Dm(0,!1),bye?Ie===Rte?vk++:(vk=0,Rte=Ie):vk=0,bye=qot=!1,Vu&&typeof Vu.onPostCommitFiberRoot=="function")try{Vu.onPostCommitFiberRoot(jd,Ie)}catch(Vt){Zg||(Zg=!0,console.error("React instrumentation encountered an error: %s",Vt))}var Mt=Ie.current.stateNode;return Mt.effectDuration=0,Mt.passiveEffectDuration=0,!0}finally{_s.p=ae,Wn.T=L,Xa(b,v)}}function fu(b,v,L){v=Ug(L,v),v=Wg(b.stateNode,v,2),b=y0(b,v,2),b!==null&&(Le(b,2),Cg(b))}function Si(b,v,L){if(qK=!1,b.tag===3)fu(b,b,L);else{for(;v!==null;){if(v.tag===3){fu(v,b,L);return}if(v.tag===1){var $=v.stateNode;if(typeof v.type.getDerivedStateFromError=="function"||typeof $.componentDidCatch=="function"&&(RM===null||!RM.has($))){b=Ug(L,b),L=r0(2),$=y0(v,L,2),$!==null&&(P2(L,$,v,b),Le($,2),Cg($));return}}v=v.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.

Error message:

%s`,L)}}function lp(b,v,L){var $=b.pingCache;if($===null){$=b.pingCache=new mdr;var ae=new Set;$.set(v,ae)}else ae=$.get(v),ae===void 0&&(ae=new Set,$.set(v,ae));ae.has(L)||(Kot=!0,ae.add(L),$=c0.bind(null,b,v,L),Ql&&b0(b,L),v.then($,$))}function c0(b,v,L){var $=b.pingCache;$!==null&&$.delete(v),b.pingedLanes|=b.suspendedLanes&L,b.warmLanes&=~L,qC()&&Wn.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).

When testing, code that resolves suspended data should be wrapped into act(...):

act(() => {
  /* finish loading suspended data */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Sg===b&&(bc&L)===L&&(tm===Ek||tm===Got&&(bc&62914560)===bc&&D_()-zot<gEn?(v0&ix)===x5&&Y2(b,0):Vot|=L,Sk===bc&&(Sk=0)),Cg(b)}function $c(b,v){v===0&&(v=ke()),b=G0(b,v),b!==null&&(Le(b,v),Cg(b))}function Qh(b){var v=b.memoizedState,L=0;v!==null&&(L=v.retryLane),$c(b,L)}function Kl(b,v){var L=0;switch(b.tag){case 13:var $=b.stateNode,ae=b.memoizedState;ae!==null&&(L=ae.retryLane);break;case 19:$=b.stateNode;break;case 22:$=b.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}$!==null&&$.delete(v),$c(b,L)}function VI(b,v,L){if((v.subtreeFlags&67117056)!==0)for(v=v.child;v!==null;){var $=b,ae=v,Ie=ae.type===h5;Ie=L||Ie,ae.tag!==22?ae.flags&67108864?Ie&&Lt(ae,p9,$,ae,(ae.mode&J1)===fl):VI($,ae,Ie):ae.memoizedState===null&&(Ie&&ae.flags&8192?Lt(ae,p9,$,ae):ae.subtreeFlags&67108864&&Lt(ae,VI,$,ae,Ie)),v=v.sibling}}function p9(b,v){var L=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;ge(!0);try{Op(v),L&&G2(v),Ys(b,v.alternate,v,!1),L&&P1(b,v,0,null,!1,0)}finally{ge(!1)}}function zI(b){var v=!0;b.current.mode&(Fh|AC)||(v=!1),VI(b,b.current,v)}function rc(b){if((v0&ix)===x5){var v=b.tag;if(v===3||v===1||v===0||v===11||v===14||v===15){if(v=Q(b)||"ReactComponent",Sye!==null){if(Sye.has(v))return;Sye.add(v)}else Sye=new Set([v]);Lt(b,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function b0(b,v){Ql&&b.memoizedUpdaters.forEach(function(L){nt(b,L,v)})}function Mf(b,v){var L=Wn.actQueue;return L!==null?(L.push(v),Edr):S3(b,v)}function a5(b){qC()&&Wn.actQueue===null&&Lt(b,function(){console.error(`An update to %s inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,Q(b))})}function Cg(b){b!==XK&&b.next===null&&(XK===null?Qye=XK=b:XK=XK.next=b),vye=!0,Wn.actQueue!==null?Zot||(Zot=!0,Yi()):Xot||(Xot=!0,Yi())}function Dm(b,v){if(!eit&&vye){eit=!0;do for(var L=!1,$=Qye;$!==null;){if(b!==0){var ae=$.pendingLanes;if(ae===0)var Ie=0;else{var ze=$.suspendedLanes,ct=$.pingedLanes;Ie=(1<<31-q0(42|b)+1)-1,Ie&=ae&~(ze&~ct),Ie=Ie&201326741?Ie&201326741|1:Ie?Ie|2:0}Ie!==0&&(L=!0,WI($,Ie))}else Ie=bc,Ie=we($,$===Sg?Ie:0,$.cancelPendingCommit!==null||$.timeoutHandle!==Mk),(Ie&3)===0||Te($,Ie)||(L=!0,WI($,Ie));$=$.next}while(L);eit=!1}}function JI(){ey()}function ey(){vye=Zot=Xot=!1;var b=0;wk!==0&&(gl()&&(b=wk),wk=0);for(var v=D_(),L=null,$=Qye;$!==null;){var ae=$.next,Ie=Nm($,v);Ie===0?($.next=null,L===null?Qye=ae:L.next=ae,ae===null&&(XK=L)):(L=$,(b!==0||(Ie&3)!==0)&&(vye=!0)),$=ae}Dm(b)}function Nm(b,v){for(var L=b.suspendedLanes,$=b.pingedLanes,ae=b.expirationTimes,Ie=b.pendingLanes&-62914561;0<Ie;){var ze=31-q0(Ie),ct=1<<ze,Mt=ae[ze];Mt===-1?((ct&L)===0||(ct&$)!==0)&&(ae[ze]=Re(ct,v)):Mt<=v&&(b.expiredLanes|=ct),Ie&=~ct}if(v=Sg,L=bc,L=we(b,b===v?L:0,b.cancelPendingCommit!==null||b.timeoutHandle!==Mk),$=b.callbackNode,L===0||b===v&&(Z0===Bk||Z0===bk)||b.cancelPendingCommit!==null)return $!==null&&A5($),b.callbackNode=null,b.callbackPriority=0;if((L&3)===0||Te(b,L)){if(v=L&-L,v!==b.callbackPriority||Wn.actQueue!==null&&$!==tit)A5($);else return v;switch(bt(L)){case ed:case hp:L=Y1;break;case N_:L=Q3;break;case w3:L=m9;break;default:L=Q3}return $=ll.bind(null,b),Wn.actQueue!==null?(Wn.actQueue.push($),L=tit):L=S3(L,$),b.callbackPriority=v,b.callbackNode=L,v}return $!==null&&A5($),b.callbackPriority=2,b.callbackNode=null,2}function ll(b,v){if(yk=Ck=!1,lC!==Qk&&lC!==Jot)return b.callbackNode=null,b.callbackPriority=0,null;var L=b.callbackNode;if(Za()&&b.callbackNode!==L)return null;var $=bc;return $=we(b,b===Sg?$:0,b.cancelPendingCommit!==null||b.timeoutHandle!==Mk),$===0?null:(cs(b,$,v),Nm(b,D_()),b.callbackNode!=null&&b.callbackNode===L?ll.bind(null,b):null)}function WI(b,v){if(Za())return null;Ck=yk,yk=!1,cs(b,v,!0)}function A5(b){b!==tit&&b!==null&&R4(b)}function Yi(){Wn.actQueue!==null&&Wn.actQueue.push(function(){return ey(),null}),Ndr(function(){(v0&(ix|Q9))!==x5?S3(Ay,JI):ey()})}function c5(){return wk===0&&(wk=Ee()),wk}function Df(b){return b==null||typeof b=="symbol"||typeof b=="boolean"?null:typeof b=="function"?b:(oe(b,"action"),Li(""+b))}function M1(b,v){var L=v.ownerDocument.createElement("input");return L.name=v.name,L.value=v.value,b.id&&L.setAttribute("form",b.id),v.parentNode.insertBefore(L,v),b=new FormData(b),L.parentNode.removeChild(L),b}function ul(b,v,L,$,ae){if(v==="submit"&&L&&L.stateNode===ae){var Ie=Df((ae[vl]||null).action),ze=$.submitter;ze&&(v=(v=ze[vl]||null)?Df(v.formAction):ze.getAttribute("formAction"),v!==null&&(Ie=v,ze=null));var ct=new br("action","action",null,$,ae);b.push({event:ct,listeners:[{instance:null,listener:function(){if($.defaultPrevented){if(wk!==0){var Mt=ze?M1(ae,ze):new FormData(ae),Vt={pending:!0,data:Mt,method:ae.method,action:Ie};Object.freeze(Vt),KC(L,Vt,null,Mt)}}else typeof Ie=="function"&&(ct.preventDefault(),Mt=ze?M1(ae,ze):new FormData(ae),Vt={pending:!0,data:Mt,method:ae.method,action:Ie},Object.freeze(Vt),KC(L,Vt,Ie,Mt))},currentTarget:ae}]})}}function Iu(b,v,L){b.currentTarget=L;try{v(b)}catch($){kot($)}b.currentTarget=null}function yg(b,v){v=(v&4)!==0;for(var L=0;L<b.length;L++){var $=b[L];e:{var ae=void 0,Ie=$.event;if($=$.listeners,v)for(var ze=$.length-1;0<=ze;ze--){var ct=$[ze],Mt=ct.instance,Vt=ct.currentTarget;if(ct=ct.listener,Mt!==ae&&Ie.isPropagationStopped())break e;Mt!==null?Lt(Mt,Iu,Ie,ct,Vt):Iu(Ie,ct,Vt),ae=Mt}else for(ze=0;ze<$.length;ze++){if(ct=$[ze],Mt=ct.instance,Vt=ct.currentTarget,ct=ct.listener,Mt!==ae&&Ie.isPropagationStopped())break e;Mt!==null?Lt(Mt,Iu,Ie,ct,Vt):Iu(Ie,ct,Vt),ae=Mt}}}}function ss(b,v){nit.has(b)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',b);var L=v[zu];L===void 0&&(L=v[zu]=new Set);var $=b+"__bubble";L.has($)||(Yp(v,b,2,!1),L.add($))}function D1(b,v,L){nit.has(b)&&!v&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',b);var $=0;v&&($|=4),Yp(L,b,$,v)}function l5(b){if(!b[wye]){b[wye]=!0,WS.forEach(function(L){L!=="selectionchange"&&(nit.has(L)||D1(L,!1,b),D1(L,!0,b))});var v=b.nodeType===9?b:b.ownerDocument;v===null||v[wye]||(v[wye]=!0,D1("selectionchange",!1,v))}}function Yp(b,v,L,$){switch(to(v)){case ed:var ae=jp;break;case hp:ae=L1;break;default:ae=Eg}L=ae.bind(null,v,L,b),ae=void 0,!Pn||v!=="touchstart"&&v!=="touchmove"&&v!=="wheel"||(ae=!0),$?ae!==void 0?b.addEventListener(v,L,{capture:!0,passive:ae}):b.addEventListener(v,L,!0):ae!==void 0?b.addEventListener(v,L,{passive:ae}):b.addEventListener(v,L,!1)}function zd(b,v,L,$,ae){var Ie=$;if((v&1)===0&&(v&2)===0&&$!==null)e:for(;;){if($===null)return;var ze=$.tag;if(ze===3||ze===4){var ct=$.stateNode.containerInfo;if(ct===ae)break;if(ze===4)for(ze=$.return;ze!==null;){var Mt=ze.tag;if((Mt===3||Mt===4)&&ze.stateNode.containerInfo===ae)return;ze=ze.return}for(;ct!==null;){if(ze=it(ct),ze===null)return;if(Mt=ze.tag,Mt===5||Mt===6||Mt===26||Mt===27){$=Ie=ze;continue e}ct=ct.parentNode}}$=$.return}cA(function(){var Vt=Ie,io=ys(L),fo=[];e:{var eo=IM.get(b);if(eo!==void 0){var Bo=br,Yr=b;switch(b){case"keypress":if(H0(L)===0)break e;case"keydown":case"keyup":Bo=I9;break;case"focusin":Yr="focus",Bo=uc;break;case"focusout":Yr="blur",Bo=uc;break;case"beforeblur":case"afterblur":Bo=uc;break;case"click":if(L.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Bo=nA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Bo=gs;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Bo=k_;break;case aC:case fM:case p8:Bo=MK;break;case qS:Bo=uM;break;case"scroll":case"scrollend":Bo=Mn;break;case"wheel":Bo=hy;break;case"copy":case"cut":case"paste":Bo=Aye;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Bo=DK;break;case"toggle":case"beforetoggle":Bo=gM}var Ea=(v&4)!==0,Qg=!Ea&&(b==="scroll"||b==="scrollend"),Oc=Ea?eo!==null?eo+"Capture":null:eo;Ea=[];for(var cn=Vt,un;cn!==null;){var xn=cn;if(un=xn.stateNode,xn=xn.tag,xn!==5&&xn!==26&&xn!==27||un===null||Oc===null||(xn=vA(cn,Oc),xn!=null&&Ea.push(Gu(cn,xn,un))),Qg)break;cn=cn.return}0<Ea.length&&(eo=new Bo(eo,Yr,null,L,io),fo.push({event:eo,listeners:Ea}))}}if((v&7)===0){e:{if(eo=b==="mouseover"||b==="pointerover",Bo=b==="mouseout"||b==="pointerout",eo&&L!==xe&&(Yr=L.relatedTarget||L.fromElement)&&(it(Yr)||Yr[X0]))break e;if((Bo||eo)&&(eo=io.window===io?io:(eo=io.ownerDocument)?eo.defaultView||eo.parentWindow:window,Bo?(Yr=L.relatedTarget||L.toElement,Bo=Vt,Yr=Yr?it(Yr):null,Yr!==null&&(Qg=f(Yr),Ea=Yr.tag,Yr!==Qg||Ea!==5&&Ea!==27&&Ea!==6)&&(Yr=null)):(Bo=null,Yr=Vt),Bo!==Yr)){if(Ea=nA,xn="onMouseLeave",Oc="onMouseEnter",cn="mouse",(b==="pointerout"||b==="pointerover")&&(Ea=DK,xn="onPointerLeave",Oc="onPointerEnter",cn="pointer"),Qg=Bo==null?eo:pn(Bo),un=Yr==null?eo:pn(Yr),eo=new Ea(xn,cn+"leave",Bo,L,io),eo.target=Qg,eo.relatedTarget=un,xn=null,it(io)===Vt&&(Ea=new Ea(Oc,cn+"enter",Yr,L,io),Ea.target=un,Ea.relatedTarget=Qg,xn=Ea),Qg=xn,Bo&&Yr)t:{for(Ea=Bo,Oc=Yr,cn=0,un=Ea;un;un=Fc(un))cn++;for(un=0,xn=Oc;xn;xn=Fc(xn))un++;for(;0<cn-un;)Ea=Fc(Ea),cn--;for(;0<un-cn;)Oc=Fc(Oc),un--;for(;cn--;){if(Ea===Oc||Oc!==null&&Ea===Oc.alternate)break t;Ea=Fc(Ea),Oc=Fc(Oc)}Ea=null}else Ea=null;Bo!==null&&_a(fo,eo,Bo,Ea,!1),Yr!==null&&Qg!==null&&_a(fo,Qg,Yr,Ea,!0)}}e:{if(eo=Vt?pn(Vt):window,Bo=eo.nodeName&&eo.nodeName.toLowerCase(),Bo==="select"||Bo==="input"&&eo.type==="file")var bo=C0;else if(Rd(eo))if(pM)bo=tr;else{bo=Qp;var Ri=__}else Bo=eo.nodeName,!Bo||Bo.toLowerCase()!=="input"||eo.type!=="checkbox"&&eo.type!=="radio"?Vt&&Ji(Vt.elementType)&&(bo=C0):bo=_1;if(bo&&(bo=bo(b,Vt))){mm(fo,bo,L,io);break e}Ri&&Ri(b,eo,Vt),b==="focusout"&&Vt&&eo.type==="number"&&Vt.memoizedProps.value!=null&&ro(eo,"number",eo.value)}switch(Ri=Vt?pn(Vt):window,b){case"focusin":(Rd(Ri)||Ri.contentEditable==="true")&&(M3=Ri,mM=Vt,_M=null);break;case"focusout":_M=mM=M3=null;break;case"mousedown":sc=!0;break;case"contextmenu":case"mouseup":case"dragend":sc=!1,_f(fo,L,io);break;case"selectionchange":if(hte)break;case"keydown":case"keyup":_f(fo,L,io)}var dA;if(dM)e:{switch(b){case"compositionstart":var Ur="onCompositionStart";break e;case"compositionend":Ur="onCompositionEnd";break e;case"compositionupdate":Ur="onCompositionUpdate";break e}Ur=void 0}else Zp?il(b,L)&&(Ur="onCompositionEnd"):b==="keydown"&&L.keyCode===gk&&(Ur="onCompositionStart");Ur&&(dk&&L.locale!=="ko"&&(Zp||Ur!=="onCompositionStart"?Ur==="onCompositionEnd"&&Zp&&(dA=Yl()):(Qo=io,Gn="value"in Qo?Qo.value:Qo.textContent,Zp=!0)),Ri=Nf(Vt,Ur),0<Ri.length&&(Ur=new $S(Ur,b,null,L,io),fo.push({event:Ur,listeners:Ri}),dA?Ur.data=dA:(dA=Ul(L),dA!==null&&(Ur.data=dA)))),(dA=NK?m_(b,L):ag(b,L))&&(Ur=Nf(Vt,"onBeforeInput"),0<Ur.length&&(Ri=new lye("onBeforeInput","beforeinput",null,L,io),fo.push({event:Ri,listeners:Ur}),Ri.data=dA)),ul(fo,b,Vt,L,io)}yg(fo,v)})}function Gu(b,v,L){return{instance:b,listener:v,currentTarget:L}}function Nf(b,v){for(var L=v+"Capture",$=[];b!==null;){var ae=b,Ie=ae.stateNode;if(ae=ae.tag,ae!==5&&ae!==26&&ae!==27||Ie===null||(ae=vA(b,L),ae!=null&&$.unshift(Gu(b,ae,Ie)),ae=vA(b,v),ae!=null&&$.push(Gu(b,ae,Ie))),b.tag===3)return $;b=b.return}return[]}function Fc(b){if(b===null)return null;do b=b.return;while(b&&b.tag!==5&&b.tag!==27);return b||null}function _a(b,v,L,$,ae){for(var Ie=v._reactName,ze=[];L!==null&&L!==$;){var ct=L,Mt=ct.alternate,Vt=ct.stateNode;if(ct=ct.tag,Mt!==null&&Mt===$)break;ct!==5&&ct!==26&&ct!==27||Vt===null||(Mt=Vt,ae?(Vt=vA(L,Ie),Vt!=null&&ze.unshift(Gu(L,Vt,Mt))):ae||(Vt=vA(L,Ie),Vt!=null&&ze.push(Gu(L,Vt,Mt)))),L=L.return}ze.length!==0&&b.push({event:v,listeners:ze})}function fa(b,v){gr(b,v),b!=="input"&&b!=="textarea"&&b!=="select"||v==null||v.value!==null||dy||(dy=!0,b==="select"&&v.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",b):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",b));var L={registrationNameDependencies:Of,possibleRegistrationNames:$2};Ji(b)||typeof v.is=="string"||hs(b,v,L),v.contentEditable&&!v.suppressContentEditableWarning&&v.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function zs(b,v,L,$){v!==L&&(L=$0(L),$0(v)!==L&&($[b]=v))}function Rm(b,v,L){v.forEach(function($){L[jI($)]=$==="style"?vh(b):b.getAttribute($)})}function j0(b,v){v===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",b,b,b):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",b,typeof v)}function w_(b,v){return b=b.namespaceURI===qp||b.namespaceURI===T_?b.ownerDocument.createElementNS(b.namespaceURI,b.tagName):b.ownerDocument.createElement(b.tagName),b.innerHTML=v,b.innerHTML}function $0(b){return j(b)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",te(b)),J(b)),(typeof b=="string"?b:""+b).replace(Bdr,`
`).replace(bdr,"")}function N1(b,v){return v=$0(v),$0(b)===v}function Up(){}function GA(b,v,L,$,ae,Ie){switch(L){case"children":typeof $=="string"?(Lo($,v,!1),v==="body"||v==="textarea"&&$===""||Io(b,$)):(typeof $=="number"||typeof $=="bigint")&&(Lo(""+$,v,!1),v!=="body"&&Io(b,""+$));break;case"className":Ze(b,"class",$);break;case"tabIndex":Ze(b,"tabindex",$);break;case"dir":case"role":case"viewBox":case"width":case"height":Ze(b,L,$);break;case"style":oi(b,$,Ie);break;case"data":if(v!=="object"){Ze(b,"data",$);break}case"src":case"href":if($===""&&(v!=="a"||L!=="href")){console.error(L==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',L,L),b.removeAttribute(L);break}if($==null||typeof $=="function"||typeof $=="symbol"||typeof $=="boolean"){b.removeAttribute(L);break}oe($,L),$=Li(""+$),b.setAttribute(L,$);break;case"action":case"formAction":if($!=null&&(v==="form"?L==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof $=="function"&&(ae.encType==null&&ae.method==null||Dye||(Dye=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),ae.target==null||Mye||(Mye=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):v==="input"||v==="button"?L==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):v!=="input"||ae.type==="submit"||ae.type==="image"||Pye?v!=="button"||ae.type==null||ae.type==="submit"||Pye?typeof $=="function"&&(ae.name==null||xEn||(xEn=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),ae.formEncType==null&&ae.formMethod==null||Dye||(Dye=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),ae.formTarget==null||Mye||(Mye=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Pye=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Pye=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(L==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof $=="function"){b.setAttribute(L,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof Ie=="function"&&(L==="formAction"?(v!=="input"&&GA(b,v,"name",ae.name,ae,null),GA(b,v,"formEncType",ae.formEncType,ae,null),GA(b,v,"formMethod",ae.formMethod,ae,null),GA(b,v,"formTarget",ae.formTarget,ae,null)):(GA(b,v,"encType",ae.encType,ae,null),GA(b,v,"method",ae.method,ae,null),GA(b,v,"target",ae.target,ae,null)));if($==null||typeof $=="symbol"||typeof $=="boolean"){b.removeAttribute(L);break}oe($,L),$=Li(""+$),b.setAttribute(L,$);break;case"onClick":$!=null&&(typeof $!="function"&&j0(L,$),b.onclick=Up);break;case"onScroll":$!=null&&(typeof $!="function"&&j0(L,$),ss("scroll",b));break;case"onScrollEnd":$!=null&&(typeof $!="function"&&j0(L,$),ss("scrollend",b));break;case"dangerouslySetInnerHTML":if($!=null){if(typeof $!="object"||!("__html"in $))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(L=$.__html,L!=null){if(ae.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");b.innerHTML=L}}break;case"multiple":b.multiple=$&&typeof $!="function"&&typeof $!="symbol";break;case"muted":b.muted=$&&typeof $!="function"&&typeof $!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if($==null||typeof $=="function"||typeof $=="boolean"||typeof $=="symbol"){b.removeAttribute("xlink:href");break}oe($,L),L=Li(""+$),b.setAttributeNS(Pk,"xlink:href",L);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":$!=null&&typeof $!="function"&&typeof $!="symbol"?(oe($,L),b.setAttribute(L,""+$)):b.removeAttribute(L);break;case"inert":$!==""||Nye[L]||(Nye[L]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",L));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":$&&typeof $!="function"&&typeof $!="symbol"?b.setAttribute(L,""):b.removeAttribute(L);break;case"capture":case"download":$===!0?b.setAttribute(L,""):$!==!1&&$!=null&&typeof $!="function"&&typeof $!="symbol"?(oe($,L),b.setAttribute(L,$)):b.removeAttribute(L);break;case"cols":case"rows":case"size":case"span":$!=null&&typeof $!="function"&&typeof $!="symbol"&&!isNaN($)&&1<=$?(oe($,L),b.setAttribute(L,$)):b.removeAttribute(L);break;case"rowSpan":case"start":$==null||typeof $=="function"||typeof $=="symbol"||isNaN($)?b.removeAttribute(L):(oe($,L),b.setAttribute(L,$));break;case"popover":ss("beforetoggle",b),ss("toggle",b),Xe(b,"popover",$);break;case"xlinkActuate":dt(b,Pk,"xlink:actuate",$);break;case"xlinkArcrole":dt(b,Pk,"xlink:arcrole",$);break;case"xlinkRole":dt(b,Pk,"xlink:role",$);break;case"xlinkShow":dt(b,Pk,"xlink:show",$);break;case"xlinkTitle":dt(b,Pk,"xlink:title",$);break;case"xlinkType":dt(b,Pk,"xlink:type",$);break;case"xmlBase":dt(b,oit,"xml:base",$);break;case"xmlLang":dt(b,oit,"xml:lang",$);break;case"xmlSpace":dt(b,oit,"xml:space",$);break;case"is":Ie!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),Xe(b,"is",$);break;case"innerText":case"textContent":break;case"popoverTarget":EEn||$==null||typeof $!="object"||(EEn=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",$));default:!(2<L.length)||L[0]!=="o"&&L[0]!=="O"||L[1]!=="n"&&L[1]!=="N"?(L=wi(L),Xe(b,L,$)):Of.hasOwnProperty(L)&&$!=null&&typeof $!="function"&&j0(L,$)}}function Kp(b,v,L,$,ae,Ie){switch(L){case"style":oi(b,$,Ie);break;case"dangerouslySetInnerHTML":if($!=null){if(typeof $!="object"||!("__html"in $))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(L=$.__html,L!=null){if(ae.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");b.innerHTML=L}}break;case"children":typeof $=="string"?Io(b,$):(typeof $=="number"||typeof $=="bigint")&&Io(b,""+$);break;case"onScroll":$!=null&&(typeof $!="function"&&j0(L,$),ss("scroll",b));break;case"onScrollEnd":$!=null&&(typeof $!="function"&&j0(L,$),ss("scrollend",b));break;case"onClick":$!=null&&(typeof $!="function"&&j0(L,$),b.onclick=Up);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Of.hasOwnProperty(L))$!=null&&typeof $!="function"&&j0(L,$);else e:{if(L[0]==="o"&&L[1]==="n"&&(ae=L.endsWith("Capture"),v=L.slice(2,ae?L.length-7:void 0),Ie=b[vl]||null,Ie=Ie!=null?Ie[L]:null,typeof Ie=="function"&&b.removeEventListener(v,Ie,ae),typeof $=="function")){typeof Ie!="function"&&Ie!==null&&(L in b?b[L]=null:b.hasAttribute(L)&&b.removeAttribute(L)),b.addEventListener(v,$,ae);break e}L in b?b[L]=$:$===!0?b.setAttribute(L,""):Xe(b,L,$)}}}function S0(b,v,L){switch(fa(v,L),v){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ss("error",b),ss("load",b);var $=!1,ae=!1,Ie;for(Ie in L)if(L.hasOwnProperty(Ie)){var ze=L[Ie];if(ze!=null)switch(Ie){case"src":$=!0;break;case"srcSet":ae=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(v+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:GA(b,v,Ie,ze,L,null)}}ae&&GA(b,v,"srcSet",L.srcSet,L,null),$&&GA(b,v,"src",L.src,L,null);return;case"input":mt("input",L),ss("invalid",b);var ct=Ie=ze=ae=null,Mt=null,Vt=null;for($ in L)if(L.hasOwnProperty($)){var io=L[$];if(io!=null)switch($){case"name":ae=io;break;case"type":ze=io;break;case"checked":Mt=io;break;case"defaultChecked":Vt=io;break;case"value":Ie=io;break;case"defaultValue":ct=io;break;case"children":case"dangerouslySetInnerHTML":if(io!=null)throw Error(v+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:GA(b,v,$,io,L,null)}}Nn(b,L),ei(b,Ie,ct,Mt,Vt,ze,ae,!1),qt(b);return;case"select":mt("select",L),ss("invalid",b),$=ze=Ie=null;for(ae in L)if(L.hasOwnProperty(ae)&&(ct=L[ae],ct!=null))switch(ae){case"value":Ie=ct;break;case"defaultValue":ze=ct;break;case"multiple":$=ct;default:GA(b,v,ae,ct,L,null)}On(b,L),v=Ie,L=ze,b.multiple=!!$,v!=null?Ro(b,!!$,v,!1):L!=null&&Ro(b,!!$,L,!0);return;case"textarea":mt("textarea",L),ss("invalid",b),Ie=ae=$=null;for(ze in L)if(L.hasOwnProperty(ze)&&(ct=L[ze],ct!=null))switch(ze){case"value":$=ct;break;case"defaultValue":ae=ct;break;case"children":Ie=ct;break;case"dangerouslySetInnerHTML":if(ct!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:GA(b,v,ze,ct,L,null)}uo(b,L),ko(b,$,ae,Ie),qt(b);return;case"option":To(b,L);for(Mt in L)L.hasOwnProperty(Mt)&&($=L[Mt],$!=null)&&(Mt==="selected"?b.selected=$&&typeof $!="function"&&typeof $!="symbol":GA(b,v,Mt,$,L,null));return;case"dialog":ss("beforetoggle",b),ss("toggle",b),ss("cancel",b),ss("close",b);break;case"iframe":case"object":ss("load",b);break;case"video":case"audio":for($=0;$<Tte.length;$++)ss(Tte[$],b);break;case"image":ss("error",b),ss("load",b);break;case"details":ss("toggle",b);break;case"embed":case"source":case"link":ss("error",b),ss("load",b);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Vt in L)if(L.hasOwnProperty(Vt)&&($=L[Vt],$!=null))switch(Vt){case"children":case"dangerouslySetInnerHTML":throw Error(v+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:GA(b,v,Vt,$,L,null)}return;default:if(Ji(v)){for(io in L)L.hasOwnProperty(io)&&($=L[io],$!==void 0&&Kp(b,v,io,$,L,void 0));return}}for(ct in L)L.hasOwnProperty(ct)&&($=L[ct],$!=null&&GA(b,v,ct,$,L,null))}function u5(b,v,L,$){switch(fa(v,$),v){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var ae=null,Ie=null,ze=null,ct=null,Mt=null,Vt=null,io=null;for(Bo in L){var fo=L[Bo];if(L.hasOwnProperty(Bo)&&fo!=null)switch(Bo){case"checked":break;case"value":break;case"defaultValue":Mt=fo;default:$.hasOwnProperty(Bo)||GA(b,v,Bo,null,$,fo)}}for(var eo in $){var Bo=$[eo];if(fo=L[eo],$.hasOwnProperty(eo)&&(Bo!=null||fo!=null))switch(eo){case"type":Ie=Bo;break;case"name":ae=Bo;break;case"checked":Vt=Bo;break;case"defaultChecked":io=Bo;break;case"value":ze=Bo;break;case"defaultValue":ct=Bo;break;case"children":case"dangerouslySetInnerHTML":if(Bo!=null)throw Error(v+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:Bo!==fo&&GA(b,v,eo,Bo,$,fo)}}v=L.type==="checkbox"||L.type==="radio"?L.checked!=null:L.value!=null,$=$.type==="checkbox"||$.type==="radio"?$.checked!=null:$.value!=null,v||!$||yEn||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),yEn=!0),!v||$||CEn||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),CEn=!0),Co(b,ze,ct,Mt,Vt,io,Ie,ae);return;case"select":Bo=ze=ct=eo=null;for(Ie in L)if(Mt=L[Ie],L.hasOwnProperty(Ie)&&Mt!=null)switch(Ie){case"value":break;case"multiple":Bo=Mt;default:$.hasOwnProperty(Ie)||GA(b,v,Ie,null,$,Mt)}for(ae in $)if(Ie=$[ae],Mt=L[ae],$.hasOwnProperty(ae)&&(Ie!=null||Mt!=null))switch(ae){case"value":eo=Ie;break;case"defaultValue":ct=Ie;break;case"multiple":ze=Ie;default:Ie!==Mt&&GA(b,v,ae,Ie,$,Mt)}$=ct,v=ze,L=Bo,eo!=null?Ro(b,!!v,eo,!1):!!L!=!!v&&($!=null?Ro(b,!!v,$,!0):Ro(b,!!v,v?[]:"",!1));return;case"textarea":Bo=eo=null;for(ct in L)if(ae=L[ct],L.hasOwnProperty(ct)&&ae!=null&&!$.hasOwnProperty(ct))switch(ct){case"value":break;case"children":break;default:GA(b,v,ct,null,$,ae)}for(ze in $)if(ae=$[ze],Ie=L[ze],$.hasOwnProperty(ze)&&(ae!=null||Ie!=null))switch(ze){case"value":eo=ae;break;case"defaultValue":Bo=ae;break;case"children":break;case"dangerouslySetInnerHTML":if(ae!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:ae!==Ie&&GA(b,v,ze,ae,$,Ie)}Oo(b,eo,Bo);return;case"option":for(var Yr in L)eo=L[Yr],L.hasOwnProperty(Yr)&&eo!=null&&!$.hasOwnProperty(Yr)&&(Yr==="selected"?b.selected=!1:GA(b,v,Yr,null,$,eo));for(Mt in $)eo=$[Mt],Bo=L[Mt],$.hasOwnProperty(Mt)&&eo!==Bo&&(eo!=null||Bo!=null)&&(Mt==="selected"?b.selected=eo&&typeof eo!="function"&&typeof eo!="symbol":GA(b,v,Mt,eo,$,Bo));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ea in L)eo=L[Ea],L.hasOwnProperty(Ea)&&eo!=null&&!$.hasOwnProperty(Ea)&&GA(b,v,Ea,null,$,eo);for(Vt in $)if(eo=$[Vt],Bo=L[Vt],$.hasOwnProperty(Vt)&&eo!==Bo&&(eo!=null||Bo!=null))switch(Vt){case"children":case"dangerouslySetInnerHTML":if(eo!=null)throw Error(v+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:GA(b,v,Vt,eo,$,Bo)}return;default:if(Ji(v)){for(var Qg in L)eo=L[Qg],L.hasOwnProperty(Qg)&&eo!==void 0&&!$.hasOwnProperty(Qg)&&Kp(b,v,Qg,void 0,$,eo);for(io in $)eo=$[io],Bo=L[io],!$.hasOwnProperty(io)||eo===Bo||eo===void 0&&Bo===void 0||Kp(b,v,io,eo,$,Bo);return}}for(var Oc in L)eo=L[Oc],L.hasOwnProperty(Oc)&&eo!=null&&!$.hasOwnProperty(Oc)&&GA(b,v,Oc,null,$,eo);for(fo in $)eo=$[fo],Bo=L[fo],!$.hasOwnProperty(fo)||eo===Bo||eo==null&&Bo==null||GA(b,v,fo,eo,$,Bo)}function jI(b){switch(b){case"class":return"className";case"for":return"htmlFor";default:return b}}function vh(b){var v={};b=b.style;for(var L=0;L<b.length;L++){var $=b[L];v[$]=b.getPropertyValue($)}return v}function R1(b,v,L){if(v!=null&&typeof v!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var $,ae=$="",Ie;for(Ie in v)if(v.hasOwnProperty(Ie)){var ze=v[Ie];ze!=null&&typeof ze!="boolean"&&ze!==""&&(Ie.indexOf("--")===0?(ie(ze,Ie),$+=ae+Ie+":"+(""+ze).trim()):typeof ze!="number"||ze===0||Bc.has(Ie)?(ie(ze,Ie),$+=ae+Ie.replace(wo,"-$1").toLowerCase().replace(ci,"-ms-")+":"+(""+ze).trim()):$+=ae+Ie.replace(wo,"-$1").toLowerCase().replace(ci,"-ms-")+":"+ze+"px",ae=";")}$=$||null,v=b.getAttribute("style"),v!==$&&($=$0($),$0(v)!==$&&(L.style=vh(b)))}}function Cu(b,v,L,$,ae,Ie){if(ae.delete(L),b=b.getAttribute(L),b===null)switch(typeof $){case"undefined":case"function":case"symbol":case"boolean":return}else if($!=null)switch(typeof $){case"function":case"symbol":case"boolean":break;default:if(oe($,v),b===""+$)return}zs(v,b,$,Ie)}function N4(b,v,L,$,ae,Ie){if(ae.delete(L),b=b.getAttribute(L),b===null){switch(typeof $){case"function":case"symbol":return}if(!$)return}else switch(typeof $){case"function":case"symbol":break;default:if($)return}zs(v,b,$,Ie)}function Vp(b,v,L,$,ae,Ie){if(ae.delete(L),b=b.getAttribute(L),b===null)switch(typeof $){case"undefined":case"function":case"symbol":return}else if($!=null)switch(typeof $){case"function":case"symbol":break;default:if(oe($,L),b===""+$)return}zs(v,b,$,Ie)}function Rf(b,v,L,$,ae,Ie){if(ae.delete(L),b=b.getAttribute(L),b===null)switch(typeof $){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN($))return}else if($!=null)switch(typeof $){case"function":case"symbol":case"boolean":break;default:if(!isNaN($)&&(oe($,v),b===""+$))return}zs(v,b,$,Ie)}function xs(b,v,L,$,ae,Ie){if(ae.delete(L),b=b.getAttribute(L),b===null)switch(typeof $){case"undefined":case"function":case"symbol":case"boolean":return}else if($!=null)switch(typeof $){case"function":case"symbol":case"boolean":break;default:if(oe($,v),L=Li(""+$),b===L)return}zs(v,b,$,Ie)}function Lc(b,v,L,$){for(var ae={},Ie=new Set,ze=b.attributes,ct=0;ct<ze.length;ct++)switch(ze[ct].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:Ie.add(ze[ct].name)}if(Ji(v)){for(var Mt in L)if(L.hasOwnProperty(Mt)){var Vt=L[Mt];if(Vt!=null){if(Of.hasOwnProperty(Mt))typeof Vt!="function"&&j0(Mt,Vt);else if(L.suppressHydrationWarning!==!0)switch(Mt){case"children":typeof Vt!="string"&&typeof Vt!="number"||zs("children",b.textContent,Vt,ae);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":ze=b.innerHTML,Vt=Vt?Vt.__html:void 0,Vt!=null&&(Vt=w_(b,Vt),zs(Mt,ze,Vt,ae));continue;case"style":Ie.delete(Mt),R1(b,Vt,ae);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":Ie.delete(Mt.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",Mt);continue;case"className":Ie.delete("class"),ze=xt(b,"class",Vt),zs("className",ze,Vt,ae);continue;default:$.context===lQ&&v!=="svg"&&v!=="math"?Ie.delete(Mt.toLowerCase()):Ie.delete(Mt),ze=xt(b,Mt,Vt),zs(Mt,ze,Vt,ae)}}}}else for(Vt in L)if(L.hasOwnProperty(Vt)&&(Mt=L[Vt],Mt!=null)){if(Of.hasOwnProperty(Vt))typeof Mt!="function"&&j0(Vt,Mt);else if(L.suppressHydrationWarning!==!0)switch(Vt){case"children":typeof Mt!="string"&&typeof Mt!="number"||zs("children",b.textContent,Mt,ae);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":ze=b.innerHTML,Mt=Mt?Mt.__html:void 0,Mt!=null&&(Mt=w_(b,Mt),ze!==Mt&&(ae[Vt]={__html:ze}));continue;case"className":Cu(b,Vt,"class",Mt,Ie,ae);continue;case"tabIndex":Cu(b,Vt,"tabindex",Mt,Ie,ae);continue;case"style":Ie.delete(Vt),R1(b,Mt,ae);continue;case"multiple":Ie.delete(Vt),zs(Vt,b.multiple,Mt,ae);continue;case"muted":Ie.delete(Vt),zs(Vt,b.muted,Mt,ae);continue;case"autoFocus":Ie.delete("autofocus"),zs(Vt,b.autofocus,Mt,ae);continue;case"data":if(v!=="object"){Ie.delete(Vt),ze=b.getAttribute("data"),zs(Vt,ze,Mt,ae);continue}case"src":case"href":if(!(Mt!==""||v==="a"&&Vt==="href"||v==="object"&&Vt==="data")){console.error(Vt==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',Vt,Vt);continue}xs(b,Vt,Vt,Mt,Ie,ae);continue;case"action":case"formAction":if(ze=b.getAttribute(Vt),typeof Mt=="function"){Ie.delete(Vt.toLowerCase()),Vt==="formAction"?(Ie.delete("name"),Ie.delete("formenctype"),Ie.delete("formmethod"),Ie.delete("formtarget")):(Ie.delete("enctype"),Ie.delete("method"),Ie.delete("target"));continue}else if(ze===Sdr){Ie.delete(Vt.toLowerCase()),zs(Vt,"function",Mt,ae);continue}xs(b,Vt,Vt.toLowerCase(),Mt,Ie,ae);continue;case"xlinkHref":xs(b,Vt,"xlink:href",Mt,Ie,ae);continue;case"contentEditable":Vp(b,Vt,"contenteditable",Mt,Ie,ae);continue;case"spellCheck":Vp(b,Vt,"spellcheck",Mt,Ie,ae);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Vp(b,Vt,Vt,Mt,Ie,ae);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":N4(b,Vt,Vt.toLowerCase(),Mt,Ie,ae);continue;case"capture":case"download":e:{ct=b;var io=ze=Vt,fo=ae;if(Ie.delete(io),ct=ct.getAttribute(io),ct===null)switch(typeof Mt){case"undefined":case"function":case"symbol":break e;default:if(Mt===!1)break e}else if(Mt!=null)switch(typeof Mt){case"function":case"symbol":break;case"boolean":if(Mt===!0&&ct==="")break e;break;default:if(oe(Mt,ze),ct===""+Mt)break e}zs(ze,ct,Mt,fo)}continue;case"cols":case"rows":case"size":case"span":e:{if(ct=b,io=ze=Vt,fo=ae,Ie.delete(io),ct=ct.getAttribute(io),ct===null)switch(typeof Mt){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(Mt)||1>Mt)break e}else if(Mt!=null)switch(typeof Mt){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(Mt)||1>Mt)&&(oe(Mt,ze),ct===""+Mt))break e}zs(ze,ct,Mt,fo)}continue;case"rowSpan":Rf(b,Vt,"rowspan",Mt,Ie,ae);continue;case"start":Rf(b,Vt,Vt,Mt,Ie,ae);continue;case"xHeight":Cu(b,Vt,"x-height",Mt,Ie,ae);continue;case"xlinkActuate":Cu(b,Vt,"xlink:actuate",Mt,Ie,ae);continue;case"xlinkArcrole":Cu(b,Vt,"xlink:arcrole",Mt,Ie,ae);continue;case"xlinkRole":Cu(b,Vt,"xlink:role",Mt,Ie,ae);continue;case"xlinkShow":Cu(b,Vt,"xlink:show",Mt,Ie,ae);continue;case"xlinkTitle":Cu(b,Vt,"xlink:title",Mt,Ie,ae);continue;case"xlinkType":Cu(b,Vt,"xlink:type",Mt,Ie,ae);continue;case"xmlBase":Cu(b,Vt,"xml:base",Mt,Ie,ae);continue;case"xmlLang":Cu(b,Vt,"xml:lang",Mt,Ie,ae);continue;case"xmlSpace":Cu(b,Vt,"xml:space",Mt,Ie,ae);continue;case"inert":Mt!==""||Nye[Vt]||(Nye[Vt]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",Vt)),N4(b,Vt,Vt,Mt,Ie,ae);continue;default:if(!(2<Vt.length)||Vt[0]!=="o"&&Vt[0]!=="O"||Vt[1]!=="n"&&Vt[1]!=="N"){ct=wi(Vt),ze=!1,$.context===lQ&&v!=="svg"&&v!=="math"?Ie.delete(ct.toLowerCase()):(io=Vt.toLowerCase(),io=K1.hasOwnProperty(io)&&K1[io]||null,io!==null&&io!==Vt&&(ze=!0,Ie.delete(io)),Ie.delete(ct));e:if(io=b,fo=ct,ct=Mt,st(fo))if(io.hasAttribute(fo))io=io.getAttribute(fo),oe(ct,fo),ct=io===""+ct?ct:io;else{switch(typeof ct){case"function":case"symbol":break e;case"boolean":if(io=fo.toLowerCase().slice(0,5),io!=="data-"&&io!=="aria-")break e}ct=ct===void 0?void 0:null}else ct=void 0;ze||zs(Vt,ct,Mt,ae)}}}return 0<Ie.size&&L.suppressHydrationWarning!==!0&&Rm(b,Ie,ae),Object.keys(ae).length===0?null:ae}function Ha(b,v){switch(b.length){case 0:return"";case 1:return b[0];case 2:return b[0]+" "+v+" "+b[1];default:return b.slice(0,-1).join(", ")+", "+v+" "+b[b.length-1]}}function Ja(b){return b.nodeType===9?b:b.ownerDocument}function Ps(b){switch(b){case T_:return ZK;case qp:return kye;default:return lQ}}function wh(b,v){if(b===lQ)switch(v){case"svg":return ZK;case"math":return kye;default:return lQ}return b===ZK&&v==="foreignObject"?lQ:b}function qg(b,v){return b==="textarea"||b==="noscript"||typeof v.children=="string"||typeof v.children=="number"||typeof v.children=="bigint"||typeof v.dangerouslySetInnerHTML=="object"&&v.dangerouslySetInnerHTML!==null&&v.dangerouslySetInnerHTML.__html!=null}function gl(){var b=window.event;return b&&b.type==="popstate"?b===ait?!1:(ait=b,!0):(ait=null,!1)}function y3(b){setTimeout(function(){throw b})}function Tf(b,v,L){switch(v){case"button":case"input":case"select":case"textarea":L.autoFocus&&b.focus();break;case"img":L.src?b.src=L.src:L.srcSet&&(b.srcset=L.srcSet)}}function Pa(b,v,L,$){u5(b,v,L,$),b[vl]=$}function qc(b){Io(b,"")}function Yu(b,v,L){b.nodeValue=L}function xc(b){return b==="head"}function xg(b,v){b.removeChild(v)}function $I(b,v){(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).removeChild(v)}function T1(b,v){var L=v,$=0,ae=0;do{var Ie=L.nextSibling;if(b.removeChild(L),Ie&&Ie.nodeType===8)if(L=Ie.data,L===Tye){if(0<$&&8>$){L=$;var ze=b.ownerDocument;if(L&vdr&&Uu(ze.documentElement),L&wdr&&Uu(ze.body),L&Pdr)for(L=ze.head,Uu(L),ze=L.firstChild;ze;){var ct=ze.nextSibling,Mt=ze.nodeName;ze[j2]||Mt==="SCRIPT"||Mt==="STYLE"||Mt==="LINK"&&ze.rel.toLowerCase()==="stylesheet"||L.removeChild(ze),ze=ct}}if(ae===0){b.removeChild(Ie),E3(v);return}ae--}else L===Rye||L===cQ||L===kte?ae++:$=L.charCodeAt(0)-48;else $=0;L=Ie}while(L);E3(v)}function Xg(b){b=b.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"}function U2(b){b.nodeValue=""}function K2(b,v){v=v[Mdr],v=v!=null&&v.hasOwnProperty("display")?v.display:null,b.style.display=v==null||typeof v=="boolean"?"":(""+v).trim()}function ty(b,v){b.nodeValue=v}function kf(b){var v=b.firstChild;for(v&&v.nodeType===10&&(v=v.nextSibling);v;){var L=v;switch(v=v.nextSibling,L.nodeName){case"HTML":case"HEAD":case"BODY":kf(L),kt(L);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(L.rel.toLowerCase()==="stylesheet")continue}b.removeChild(L)}}function qI(b,v,L,$){for(;b.nodeType===1;){var ae=L;if(b.nodeName.toLowerCase()!==v.toLowerCase()){if(!$&&(b.nodeName!=="INPUT"||b.type!=="hidden"))break}else if($){if(!b[j2])switch(v){case"meta":if(!b.hasAttribute("itemprop"))break;return b;case"link":if(Ie=b.getAttribute("rel"),Ie==="stylesheet"&&b.hasAttribute("data-precedence"))break;if(Ie!==ae.rel||b.getAttribute("href")!==(ae.href==null||ae.href===""?null:ae.href)||b.getAttribute("crossorigin")!==(ae.crossOrigin==null?null:ae.crossOrigin)||b.getAttribute("title")!==(ae.title==null?null:ae.title))break;return b;case"style":if(b.hasAttribute("data-precedence"))break;return b;case"script":if(Ie=b.getAttribute("src"),(Ie!==(ae.src==null?null:ae.src)||b.getAttribute("type")!==(ae.type==null?null:ae.type)||b.getAttribute("crossorigin")!==(ae.crossOrigin==null?null:ae.crossOrigin))&&Ie&&b.hasAttribute("async")&&!b.hasAttribute("itemprop"))break;return b;default:return b}}else if(v==="input"&&b.type==="hidden"){oe(ae.name,"name");var Ie=ae.name==null?null:""+ae.name;if(ae.type==="hidden"&&b.getAttribute("name")===Ie)return b}else return b;if(b=Zr(b.nextSibling),b===null)break}return null}function ls(b,v,L){if(v==="")return null;for(;b.nodeType!==3;)if((b.nodeType!==1||b.nodeName!=="INPUT"||b.type!=="hidden")&&!L||(b=Zr(b.nextSibling),b===null))return null;return b}function gA(b){return b.data===kte||b.data===cQ&&b.ownerDocument.readyState===bEn}function Us(b,v){var L=b.ownerDocument;if(b.data!==cQ||L.readyState===bEn)v();else{var $=function(){v(),L.removeEventListener("DOMContentLoaded",$)};L.addEventListener("DOMContentLoaded",$),b._reactRetry=$}}function Zr(b){for(;b!=null;b=b.nextSibling){var v=b.nodeType;if(v===1||v===3)break;if(v===8){if(v=b.data,v===Rye||v===kte||v===cQ||v===iit||v===BEn)break;if(v===Tye)return null}}return b}function os(b){if(b.nodeType===1){for(var v=b.nodeName.toLowerCase(),L={},$=b.attributes,ae=0;ae<$.length;ae++){var Ie=$[ae];L[jI(Ie.name)]=Ie.name.toLowerCase()==="style"?vh(b):Ie.value}return{type:v,props:L}}return b.nodeType===8?{type:"Suspense",props:{}}:b.nodeValue}function l0(b,v,L){return L===null||L[Qdr]!==!0?(b.nodeValue===v?b=null:(v=$0(v),b=$0(b.nodeValue)===v?null:b.nodeValue),b):null}function k1(b){b=b.nextSibling;for(var v=0;b;){if(b.nodeType===8){var L=b.data;if(L===Tye){if(v===0)return Zr(b.nextSibling);v--}else L!==Rye&&L!==kte&&L!==cQ||v++}b=b.nextSibling}return null}function Ph(b){b=b.previousSibling;for(var v=0;b;){if(b.nodeType===8){var L=b.data;if(L===Rye||L===kte||L===cQ){if(v===0)return b;v--}else L===Tye&&v++}b=b.previousSibling}return null}function XI(b){E3(b)}function dl(b){E3(b)}function hl(b,v,L,$,ae){switch(ae&&Hn(b,$.ancestorInfo),v=Ja(L),b){case"html":if(b=v.documentElement,!b)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return b;case"head":if(b=v.head,!b)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return b;case"body":if(b=v.body,!b)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return b;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function Sl(b,v,L,$){if(!L[X0]&&Yt(L)){var ae=L.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",ae,ae,ae)}switch(b){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(ae=L.attributes;ae.length;)L.removeAttributeNode(ae[0]);S0(L,b,v),L[zl]=$,L[vl]=v}function Uu(b){for(var v=b.attributes;v.length;)b.removeAttributeNode(v[0]);kt(b)}function zp(b){return typeof b.getRootNode=="function"?b.getRootNode():b.nodeType===9?b:b.ownerDocument}function pl(b,v,L){var $=eV;if($&&typeof v=="string"&&v){var ae=zn(v);ae='link[rel="'+b+'"][href="'+ae+'"]',typeof L=="string"&&(ae+='[crossorigin="'+L+'"]'),MEn.has(ae)||(MEn.add(ae),b={rel:b,crossOrigin:L,href:v},$.querySelector(ae)===null&&(v=$.createElement("link"),S0(v,"link",b),et(v),$.head.appendChild(v)))}}function Jp(b,v,L,$){var ae=(ae=$p.current)?zp(ae):null;if(!ae)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(b){case"meta":case"title":return null;case"style":return typeof L.precedence=="string"&&typeof L.href=="string"?(L=Vl(L.href),v=be(ae).hoistableStyles,$=v.get(L),$||($={type:"style",instance:null,count:0,state:null},v.set(L,$)),$):{type:"void",instance:null,count:0,state:null};case"link":if(L.rel==="stylesheet"&&typeof L.href=="string"&&typeof L.precedence=="string"){b=Vl(L.href);var Ie=be(ae).hoistableStyles,ze=Ie.get(b);if(!ze&&(ae=ae.ownerDocument||ae,ze={type:"stylesheet",instance:null,count:0,state:{loading:Dk,preload:null}},Ie.set(b,ze),(Ie=ae.querySelector(Mh(b)))&&!Ie._p&&(ze.instance=Ie,ze.state.loading=Fte|G4),!Y4.has(b))){var ct={rel:"preload",as:"style",href:L.href,crossOrigin:L.crossOrigin,integrity:L.integrity,media:L.media,hrefLang:L.hrefLang,referrerPolicy:L.referrerPolicy};Y4.set(b,ct),Ie||x3(ae,b,ct,ze.state)}if(v&&$===null)throw L=`

  - `+P_(v)+`
  + `+P_(L),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+L);return ze}if(v&&$!==null)throw L=`

  - `+P_(v)+`
  + `+P_(L),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+L);return null;case"script":return v=L.async,L=L.src,typeof L=="string"&&v&&typeof v!="function"&&typeof v!="symbol"?(L=F1(L),v=be(ae).hoistableScripts,$=v.get(L),$||($={type:"script",instance:null,count:0,state:null},v.set(L,$)),$):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+b+'". this is a bug in React.')}}function P_(b){var v=0,L="<link";return typeof b.rel=="string"?(v++,L+=' rel="'+b.rel+'"'):G1.call(b,"rel")&&(v++,L+=' rel="'+(b.rel===null?"null":"invalid type "+typeof b.rel)+'"'),typeof b.href=="string"?(v++,L+=' href="'+b.href+'"'):G1.call(b,"href")&&(v++,L+=' href="'+(b.href===null?"null":"invalid type "+typeof b.href)+'"'),typeof b.precedence=="string"?(v++,L+=' precedence="'+b.precedence+'"'):G1.call(b,"precedence")&&(v++,L+=" precedence={"+(b.precedence===null?"null":"invalid type "+typeof b.precedence)+"}"),Object.getOwnPropertyNames(b).length>v&&(L+=" ..."),L+" />"}function Vl(b){return'href="'+zn(b)+'"'}function Mh(b){return'link[rel="stylesheet"]['+b+"]"}function ny(b){return ms({},b,{"data-precedence":b.precedence,precedence:null})}function x3(b,v,L,$){b.querySelector('link[rel="preload"][as="style"]['+v+"]")?$.loading=Fte:(v=b.createElement("link"),$.preload=v,v.addEventListener("load",function(){return $.loading|=Fte}),v.addEventListener("error",function(){return $.loading|=wEn}),S0(v,"link",L),et(v),b.head.appendChild(v))}function F1(b){return'[src="'+zn(b)+'"]'}function Wp(b){return"script[async]"+b}function us(b,v,L){if(v.count++,v.instance===null)switch(v.type){case"style":var $=b.querySelector('style[data-href~="'+zn(L.href)+'"]');if($)return v.instance=$,et($),$;var ae=ms({},L,{"data-href":L.href,"data-precedence":L.precedence,href:null,precedence:null});return $=(b.ownerDocument||b).createElement("style"),et($),S0($,"style",ae),Jd($,L.precedence,b),v.instance=$;case"stylesheet":ae=Vl(L.href);var Ie=b.querySelector(Mh(ae));if(Ie)return v.state.loading|=G4,v.instance=Ie,et(Ie),Ie;$=ny(L),(ae=Y4.get(ae))&&yu($,ae),Ie=(b.ownerDocument||b).createElement("link"),et(Ie);var ze=Ie;return ze._p=new Promise(function(ct,Mt){ze.onload=ct,ze.onerror=Mt}),S0(Ie,"link",$),v.state.loading|=G4,Jd(Ie,L.precedence,b),v.instance=Ie;case"script":return Ie=F1(L.src),(ae=b.querySelector(Wp(Ie)))?(v.instance=ae,et(ae),ae):($=L,(ae=Y4.get(Ie))&&($=ms({},L),Dh($,ae)),b=b.ownerDocument||b,ae=b.createElement("script"),et(ae),S0(ae,"link",$),b.head.appendChild(ae),v.instance=ae);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+v.type+'". this is a bug in React.')}else v.type==="stylesheet"&&(v.state.loading&G4)===Dk&&($=v.instance,v.state.loading|=G4,Jd($,L.precedence,b));return v.instance}function Jd(b,v,L){for(var $=L.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),ae=$.length?$[$.length-1]:null,Ie=ae,ze=0;ze<$.length;ze++){var ct=$[ze];if(ct.dataset.precedence===v)Ie=ct;else if(Ie!==ae)break}Ie?Ie.parentNode.insertBefore(b,Ie.nextSibling):(v=L.nodeType===9?L.head:L,v.insertBefore(b,v.firstChild))}function yu(b,v){b.crossOrigin==null&&(b.crossOrigin=v.crossOrigin),b.referrerPolicy==null&&(b.referrerPolicy=v.referrerPolicy),b.title==null&&(b.title=v.title)}function Dh(b,v){b.crossOrigin==null&&(b.crossOrigin=v.crossOrigin),b.referrerPolicy==null&&(b.referrerPolicy=v.referrerPolicy),b.integrity==null&&(b.integrity=v.integrity)}function V2(b,v,L){if(Fye===null){var $=new Map,ae=Fye=new Map;ae.set(L,$)}else ae=Fye,$=ae.get(L),$||($=new Map,ae.set(L,$));if($.has(b))return $;for($.set(b,null),L=L.getElementsByTagName(b),ae=0;ae<L.length;ae++){var Ie=L[ae];if(!(Ie[j2]||Ie[zl]||b==="link"&&Ie.getAttribute("rel")==="stylesheet")&&Ie.namespaceURI!==T_){var ze=Ie.getAttribute(v)||"";ze=b+ze;var ct=$.get(ze);ct?ct.push(Ie):$.set(ze,[Ie])}}return $}function g5(b,v,L){b=b.ownerDocument||b,b.head.insertBefore(L,v==="title"?b.querySelector("head > title"):null)}function oy(b,v,L){var $=!L.ancestorInfo.containerTagInScope;if(L.context===ZK||v.itemProp!=null)return!$||v.itemProp==null||b!=="meta"&&b!=="title"&&b!=="style"&&b!=="link"&&b!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",b,b),!1;switch(b){case"meta":case"title":return!0;case"style":if(typeof v.precedence!="string"||typeof v.href!="string"||v.href===""){$&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags.  Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof v.rel!="string"||typeof v.href!="string"||v.href===""||v.onLoad||v.onError){if(v.rel==="stylesheet"&&typeof v.precedence=="string"){b=v.href;var ae=v.onError,Ie=v.disabled;L=[],v.onLoad&&L.push("`onLoad`"),ae&&L.push("`onError`"),Ie!=null&&L.push("`disabled`"),ae=Ha(L,"and"),ae+=L.length===1?" prop":" props",Ie=L.length===1?"an "+ae:"the "+ae,L.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',b,Ie,ae)}$&&(typeof v.rel!="string"||typeof v.href!="string"||v.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(v.onError||v.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}return v.rel==="stylesheet"?(b=v.precedence,v=v.disabled,typeof b!="string"&&$&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof b=="string"&&v==null):!0;case"script":if(b=v.async&&typeof v.async!="function"&&typeof v.async!="symbol",!b||v.onLoad||v.onError||!v.src||typeof v.src!="string"){$&&(b?v.onLoad||v.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":$&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",b)}return!1}function up(b){return!(b.type==="stylesheet"&&(b.state.loading&PEn)===Dk)}function Ku(){}function G(b,v,L){if(Lte===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var $=Lte;if(v.type==="stylesheet"&&(typeof L.media!="string"||matchMedia(L.media).matches!==!1)&&(v.state.loading&G4)===Dk){if(v.instance===null){var ae=Vl(L.href),Ie=b.querySelector(Mh(ae));if(Ie){b=Ie._p,b!==null&&typeof b=="object"&&typeof b.then=="function"&&($.count++,$=Ae.bind($),b.then($,$)),v.state.loading|=G4,v.instance=Ie,et(Ie);return}Ie=b.ownerDocument||b,L=ny(L),(ae=Y4.get(ae))&&yu(L,ae),Ie=Ie.createElement("link"),et(Ie);var ze=Ie;ze._p=new Promise(function(ct,Mt){ze.onload=ct,ze.onerror=Mt}),S0(Ie,"link",L),v.instance=Ie}$.stylesheets===null&&($.stylesheets=new Map),$.stylesheets.set(v,b),(b=v.state.preload)&&(v.state.loading&PEn)===Dk&&($.count++,v=Ae.bind($),b.addEventListener("load",v),b.addEventListener("error",v))}}function V(){if(Lte===null)throw Error("Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.");var b=Lte;return b.stylesheets&&b.count===0&&Be(b,b.stylesheets),0<b.count?function(v){var L=setTimeout(function(){if(b.stylesheets&&Be(b,b.stylesheets),b.unsuspend){var $=b.unsuspend;b.unsuspend=null,$()}},6e4);return b.unsuspend=v,function(){b.unsuspend=null,clearTimeout(L)}}:null}function Ae(){if(this.count--,this.count===0){if(this.stylesheets)Be(this,this.stylesheets);else if(this.unsuspend){var b=this.unsuspend;this.unsuspend=null,b()}}}function Be(b,v){b.stylesheets=null,b.unsuspend!==null&&(b.count++,Lye=new Map,v.forEach(Oe,b),Lye=null,Ae.call(b))}function Oe(b,v){if(!(v.state.loading&G4)){var L=Lye.get(b);if(L)var $=L.get(cit);else{L=new Map,Lye.set(b,L);for(var ae=b.querySelectorAll("link[data-precedence],style[data-precedence]"),Ie=0;Ie<ae.length;Ie++){var ze=ae[Ie];(ze.nodeName==="LINK"||ze.getAttribute("media")!=="not all")&&(L.set(ze.dataset.precedence,ze),$=ze)}$&&L.set(cit,$)}ae=v.instance,ze=ae.getAttribute("data-precedence"),Ie=L.get(ze)||$,Ie===$&&L.set(cit,ae),L.set(ze,ae),this.count++,$=Ae.bind(this),ae.addEventListener("load",$),ae.addEventListener("error",$),Ie?Ie.parentNode.insertBefore(ae,Ie.nextSibling):(b=b.nodeType===9?b.head:b,b.insertBefore(ae,b.firstChild)),v.state.loading|=G4}}function Je(b,v,L,$,ae,Ie,ze,ct){for(this.tag=1,this.containerInfo=b,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Mk,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ce(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ce(0),this.hiddenUpdates=Ce(null),this.identifierPrefix=$,this.onUncaughtError=ae,this.onCaughtError=Ie,this.onRecoverableError=ze,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ct,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,b=this.pendingUpdatersLaneMap=[],v=0;31>v;v++)b.push(new Set);this._debugRootType=L?"hydrateRoot()":"createRoot()"}function Tt(b,v,L,$,ae,Ie,ze,ct,Mt,Vt,io,fo){return b=new Je(b,v,L,ze,ct,Mt,Vt,fo),v=mte,Ie===!0&&(v|=Fh|AC),Ql&&(v|=Q0),Ie=h(3,null,null,v),b.current=Ie,Ie.stateNode=b,v=hu(),lg(v),b.pooledCache=v,lg(v),Ie.memoizedState={element:$,isDehydrated:L,cache:v},K0(Ie),b}function ln(b){return b?(b=Yf,b):Yf}function wn(b,v,L,$,ae,Ie){if(Vu&&typeof Vu.onScheduleFiberRoot=="function")try{Vu.onScheduleFiberRoot(jd,$,L)}catch(ze){Zg||(Zg=!0,console.error("React instrumentation encountered an error: %s",ze))}Pi!==null&&typeof Pi.markRenderScheduled=="function"&&Pi.markRenderScheduled(v),ae=ln(ae),$.context===null?$.context=ae:$.pendingContext=ae,nd&&Th!==null&&!TEn&&(TEn=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.

Check the render method of %s.`,Q(Th)||"Unknown")),$=np(v),$.payload={element:L},Ie=Ie===void 0?null:Ie,Ie!==null&&(typeof Ie!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",Ie),$.callback=Ie),L=y0(b,$,v),L!==null&&(yc(L,b,v),Cm(L,b,v))}function $o(b,v){if(b=b.memoizedState,b!==null&&b.dehydrated!==null){var L=b.retryLane;b.retryLane=L!==0&&L<v?L:v}}function Ai(b,v){$o(b,v),(b=b.alternate)&&$o(b,v)}function Qi(b){if(b.tag===13){var v=G0(b,67108864);v!==null&&yc(v,b,67108864),Ai(b,67108864)}}function Ni(){return Th}function Xs(){for(var b=new Map,v=1,L=0;31>L;L++){var $=Qe(v);b.set(v,$),v*=2}return b}function jp(b,v,L,$){var ae=Wn.T;Wn.T=null;var Ie=_s.p;try{_s.p=ed,Eg(b,v,L,$)}finally{_s.p=Ie,Wn.T=ae}}function L1(b,v,L,$){var ae=Wn.T;Wn.T=null;var Ie=_s.p;try{_s.p=hp,Eg(b,v,L,$)}finally{_s.p=Ie,Wn.T=ae}}function Eg(b,v,L,$){if(Oye){var ae=Yn($);if(ae===null)zd(b,v,$,Gye,L),zo(b,$);else if(eA(ae,b,v,L,$))$.stopPropagation();else if(zo(b,$),v&4&&-1<Tdr.indexOf(b)){for(;ae!==null;){var Ie=Yt(ae);if(Ie!==null)switch(Ie.tag){case 3:if(Ie=Ie.stateNode,Ie.current.memoizedState.isDehydrated){var ze=Pe(Ie.pendingLanes);if(ze!==0){var ct=Ie;for(ct.pendingLanes|=2,ct.entangledLanes|=2;ze;){var Mt=1<<31-q0(ze);ct.entanglements[1]|=Mt,ze&=~Mt}Cg(Ie),(v0&(ix|Q9))===x5&&(Bye=D_()+dEn,Dm(0))}}break;case 13:ct=G0(Ie,2),ct!==null&&yc(ct,Ie,2),XC(),Ai(Ie,2)}if(Ie=Yn($),Ie===null&&zd(b,v,$,Gye,L),Ie===ae)break;ae=Ie}ae!==null&&$.stopPropagation()}else zd(b,v,$,null,L)}}function Yn(b){return b=ys(b),Qn(b)}function Qn(b){if(Gye=null,b=it(b),b!==null){var v=f(b);if(v===null)b=null;else{var L=v.tag;if(L===13){if(b=I(v),b!==null)return b;b=null}else if(L===3){if(v.stateNode.current.memoizedState.isDehydrated)return v.tag===3?v.stateNode.containerInfo:null;b=null}else v!==b&&(b=null)}}return Gye=b,null}function to(b){switch(b){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return ed;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return hp;case"message":switch(ay()){case Ay:return ed;case Y1:return hp;case Q3:case m5:return N_;case m9:return w3;default:return N_}default:return N_}}function zo(b,v){switch(b){case"focusin":case"focusout":FM=null;break;case"dragenter":case"dragleave":LM=null;break;case"mouseover":case"mouseout":HM=null;break;case"pointerover":case"pointerout":Ote.delete(v.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gte.delete(v.pointerId)}}function Bi(b,v,L,$,ae,Ie){return b===null||b.nativeEvent!==Ie?(b={blockedOn:v,domEventName:L,eventSystemFlags:$,nativeEvent:Ie,targetContainers:[ae]},v!==null&&(v=Yt(v),v!==null&&Qi(v)),b):(b.eventSystemFlags|=$,v=b.targetContainers,ae!==null&&v.indexOf(ae)===-1&&v.push(ae),b)}function eA(b,v,L,$,ae){switch(v){case"focusin":return FM=Bi(FM,b,v,L,$,ae),!0;case"dragenter":return LM=Bi(LM,b,v,L,$,ae),!0;case"mouseover":return HM=Bi(HM,b,v,L,$,ae),!0;case"pointerover":var Ie=ae.pointerId;return Ote.set(Ie,Bi(Ote.get(Ie)||null,b,v,L,$,ae)),!0;case"gotpointercapture":return Ie=ae.pointerId,Gte.set(Ie,Bi(Gte.get(Ie)||null,b,v,L,$,ae)),!0}return!1}function Or(b){var v=it(b.target);if(v!==null){var L=f(v);if(L!==null){if(v=L.tag,v===13){if(v=I(L),v!==null){b.blockedOn=v,Dt(b.priority,function(){if(L.tag===13){var $=Kd(L);$=at($);var ae=G0(L,$);ae!==null&&yc(ae,L,$),Ai(L,$)}});return}}else if(v===3&&L.stateNode.current.memoizedState.isDehydrated){b.blockedOn=L.tag===3?L.stateNode.containerInfo:null;return}}}b.blockedOn=null}function Js(b){if(b.blockedOn!==null)return!1;for(var v=b.targetContainers;0<v.length;){var L=Yn(b.nativeEvent);if(L===null){L=b.nativeEvent;var $=new L.constructor(L.type,L),ae=$;xe!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),xe=ae,L.target.dispatchEvent($),xe===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),xe=null}else return v=Yt(L),v!==null&&Qi(v),b.blockedOn=L,!1;v.shift()}return!0}function Qs(b,v,L){Js(b)&&L.delete(v)}function Wa(){lit=!1,FM!==null&&Js(FM)&&(FM=null),LM!==null&&Js(LM)&&(LM=null),HM!==null&&Js(HM)&&(HM=null),Ote.forEach(Qs),Gte.forEach(Qs)}function Bg(b,v){b.blockedOn===v&&(b.blockedOn=null,lit||(lit=!0,Ma.unstable_scheduleCallback(Ma.unstable_NormalPriority,Wa)))}function d5(b){Yye!==b&&(Yye=b,Ma.unstable_scheduleCallback(Ma.unstable_NormalPriority,function(){Yye===b&&(Yye=null);for(var v=0;v<b.length;v+=3){var L=b[v],$=b[v+1],ae=b[v+2];if(typeof $!="function"){if(Qn($||L)===null)continue;break}var Ie=Yt(L);Ie!==null&&(b.splice(v,3),v-=3,L={pending:!0,data:ae,method:L.method,action:$},Object.freeze(L),KC(Ie,L,$,ae))}}))}function E3(b){function v(Mt){return Bg(Mt,b)}FM!==null&&Bg(FM,b),LM!==null&&Bg(LM,b),HM!==null&&Bg(HM,b),Ote.forEach(v),Gte.forEach(v);for(var L=0;L<OM.length;L++){var $=OM[L];$.blockedOn===b&&($.blockedOn=null)}for(;0<OM.length&&(L=OM[0],L.blockedOn===null);)Or(L),L.blockedOn===null&&OM.shift();if(L=(b.ownerDocument||b).$$reactFormReplay,L!=null)for($=0;$<L.length;$+=3){var ae=L[$],Ie=L[$+1],ze=ae[vl]||null;if(typeof Ie=="function")ze||d5(L);else if(ze){var ct=null;if(Ie&&Ie.hasAttribute("formAction")){if(ae=Ie,ze=Ie[vl]||null)ct=ze.formAction;else if(Qn(ae)!==null)continue}else ct=ze.action;typeof ct=="function"?L[$+1]=ct:(L.splice($,3),$-=3),d5(L)}}}function H1(b){this._internalRoot=b}function M_(b){this._internalRoot=b}function gp(b){b[X0]&&(b._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Ma=ane(),ja=L3(),z2=Xye(),ms=Object.assign,Ff=Symbol.for("react.element"),Wd=Symbol.for("react.transitional.element"),ZI=Symbol.for("react.portal"),Ia=Symbol.for("react.fragment"),h5=Symbol.for("react.strict_mode"),p5=Symbol.for("react.profiler"),zS=Symbol.for("react.provider"),Nh=Symbol.for("react.consumer"),yA=Symbol.for("react.context"),Lf=Symbol.for("react.forward_ref"),B3=Symbol.for("react.suspense"),iy=Symbol.for("react.suspense_list"),b3=Symbol.for("react.memo"),dp=Symbol.for("react.lazy"),eC=Symbol.for("react.activity"),J2=Symbol.for("react.memo_cache_sentinel"),JS=Symbol.iterator,l8=Symbol.for("react.client.reference"),ra=Array.isArray,Wn=ja.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_s=z2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,u8=Object.freeze({pending:!1,data:null,method:null,action:null}),Rh=[],tC=[],Tm=-1,O1=w(null),ry=w(null),$p=w(null),W2=w(null),G1=Object.prototype.hasOwnProperty,S3=Ma.unstable_scheduleCallback,R4=Ma.unstable_cancelCallback,sy=Ma.unstable_shouldYield,g8=Ma.unstable_requestPaint,D_=Ma.unstable_now,ay=Ma.unstable_getCurrentPriorityLevel,Ay=Ma.unstable_ImmediatePriority,Y1=Ma.unstable_UserBlockingPriority,Q3=Ma.unstable_NormalPriority,m5=Ma.unstable_LowPriority,m9=Ma.unstable_IdlePriority,nC=Ma.log,km=Ma.unstable_setDisableYieldValue,jd=null,Vu=null,Pi=null,Zg=!1,Ql=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",q0=Math.clz32?Math.clz32:he,cy=Math.log,U1=Math.LN2,v3=256,T4=4194304,ed=2,hp=8,N_=32,w3=268435456,td=Math.random().toString(36).slice(2),zl="__reactFiber$"+td,vl="__reactProps$"+td,X0="__reactContainer$"+td,zu="__reactEvents$"+td,Hf="__reactListeners$"+td,oC="__reactHandles$"+td,P3="__reactResources$"+td,j2="__reactMarker$"+td,WS=new Set,Of={},$2={},q2={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},_9=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),k4={},F4={},Gf=0,X2,Z2,d8,f9,ex,jS,tx;Ut.__reactDisabledLog=!0;var fs,Ec,u0=!1,iC=new(typeof WeakMap=="function"?WeakMap:Map),Th=null,nd=!1,_5=/[\n"\\]/g,Fm=!1,R_=!1,pp=!1,f5=!1,co=!1,re=!1,X=["value","defaultValue"],me=!1,He=/["'&<>\n\t]|^\s|\s$/,We="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),ft="applet caption html table td th marquee object template foreignObject desc title".split(" "),wt=ft.concat(["button"]),zt="dd dt li option optgroup p rp rt".split(" "),en={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},In={},po={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},wo=/([A-Z])/g,ci=/^ms-/,Hi=/^(?:webkit|moz|o)[A-Z]/,pr=/^-ms-/,Wr=/-(.)/g,Ca=/;\s*$/,rr={},Wi={},Mi=!1,Gr=!1,Bc=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),qp="http://www.w3.org/1998/Math/MathML",T_="http://www.w3.org/2000/svg",ly=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),K1={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},uy={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Lm={},gy=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rC=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),dy=!1,vr={},sC=/^on./,D=/^on[^A-Z]/,H=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),z=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),se=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,xe=null,Fe=null,pt=null,St=!1,on=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pn=!1;if(on)try{var Zn={};Object.defineProperty(Zn,"passive",{get:function(){Pn=!0}}),window.addEventListener("test",Zn,Zn),window.removeEventListener("test",Zn,Zn)}catch{Pn=!1}var Qo=null,Gn=null,jn=null,wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(b){return b.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},br=Bl(wr),tA=ms({},wr,{view:0,detail:0}),Mn=Bl(tA),Cn,Un,Mo,mr=ms({},tA,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nd,button:0,buttons:0,relatedTarget:function(b){return b.relatedTarget===void 0?b.fromElement===b.srcElement?b.toElement:b.fromElement:b.relatedTarget},movementX:function(b){return"movementX"in b?b.movementX:(b!==Mo&&(Mo&&b.type==="mousemove"?(Cn=b.screenX-Mo.screenX,Un=b.screenY-Mo.screenY):Un=Cn=0,Mo=b),Cn)},movementY:function(b){return"movementY"in b?b.movementY:Un}}),nA=Bl(mr),es=ms({},mr,{dataTransfer:0}),gs=Bl(es),kh=ms({},tA,{relatedTarget:0}),uc=Bl(kh),xu=ms({},wr,{animationName:0,elapsedTime:0,pseudoElement:0}),MK=Bl(xu),aye=ms({},wr,{clipboardData:function(b){return"clipboardData"in b?b.clipboardData:window.clipboardData}}),Aye=Bl(aye),cye=ms({},wr,{data:0}),$S=Bl(cye),lye=$S,gte={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dte={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},uye={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},gye=ms({},tA,{key:function(b){if(b.key){var v=gte[b.key]||b.key;if(v!=="Unidentified")return v}return b.type==="keypress"?(b=H0(b),b===13?"Enter":String.fromCharCode(b)):b.type==="keydown"||b.type==="keyup"?dte[b.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nd,charCode:function(b){return b.type==="keypress"?H0(b):0},keyCode:function(b){return b.type==="keydown"||b.type==="keyup"?b.keyCode:0},which:function(b){return b.type==="keypress"?H0(b):b.type==="keydown"||b.type==="keyup"?b.keyCode:0}}),I9=Bl(gye),mp=ms({},mr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),DK=Bl(mp),dye=ms({},tA,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nd}),k_=Bl(dye),lM=ms({},wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),uM=Bl(lM),Xp=ms({},mr,{deltaX:function(b){return"deltaX"in b?b.deltaX:"wheelDeltaX"in b?-b.wheelDeltaX:0},deltaY:function(b){return"deltaY"in b?b.deltaY:"wheelDeltaY"in b?-b.wheelDeltaY:"wheelDelta"in b?-b.wheelDelta:0},deltaZ:0,deltaMode:0}),hy=Bl(Xp),I5=ms({},wr,{newState:0,oldState:0}),gM=Bl(I5),wot=[9,13,27,32],gk=229,dM=on&&"CompositionEvent"in window,h8=null;on&&"documentMode"in document&&(h8=document.documentMode);var NK=on&&"TextEvent"in window&&!h8,dk=on&&(!dM||h8&&8<h8&&11>=h8),hM=32,hk=String.fromCharCode(hM),hye=!1,Zp=!1,V1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},z1=null,nx=null,pM=!1;on&&(pM=mh("input")&&(!document.documentMode||9<document.documentMode));var em=typeof Object.is=="function"?Object.is:Vo,hte=on&&"documentMode"in document&&11>=document.documentMode,M3=null,mM=null,_M=null,sc=!1,wl={animationend:_m("Animation","AnimationEnd"),animationiteration:_m("Animation","AnimationIteration"),animationstart:_m("Animation","AnimationStart"),transitionrun:_m("Transition","TransitionRun"),transitionstart:_m("Transition","TransitionStart"),transitioncancel:_m("Transition","TransitionCancel"),transitionend:_m("Transition","TransitionEnd")},xA={},YA={};on&&(YA=document.createElement("div").style,"AnimationEvent"in window||(delete wl.animationend.animation,delete wl.animationiteration.animation,delete wl.animationstart.animation),"TransitionEvent"in window||delete wl.transitionend.transition);var aC=du("animationend"),fM=du("animationiteration"),p8=du("animationstart"),pk=du("transitionrun"),pye=du("transitionstart"),pte=du("transitioncancel"),qS=du("transitionend"),IM=new Map,mk="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mk.push("scrollEnd");var C9=new WeakMap,ml=1,_p=2,Hm=[],C5=0,_k=0,Yf={};Object.freeze(Yf);var _l=null,ox=null,fl=0,mte=1,Q0=2,Fh=8,AC=16,J1=64,fk=!1;try{var RK=Object.preventExtensions({})}catch{fk=!0}var XS=[],L4=0,CM=null,m8=0,Om=[],D3=0,ZS=null,y9=1,cC="",W1=null,$d=null,Hc=!1,x9=!1,py=null,qd=null,Uf=!1,_8=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),E9=0;if(typeof performance=="object"&&typeof performance.now=="function")var _te=performance,TK=function(){return _te.now()};else{var mye=Date;TK=function(){return mye.now()}}var fte=w(null),eQ=w(null),kK={},yM=null,B9=null,xM=!1,tQ=typeof AbortController<"u"?AbortController:function(){var b=[],v=this.signal={aborted:!1,addEventListener:function(L,$){b.push($)}};this.abort=function(){v.aborted=!0,b.forEach(function(L){return L()})}},Ik=Ma.unstable_scheduleCallback,EM=Ma.unstable_NormalPriority,Lh={$$typeof:yA,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},nQ=Ma.unstable_now,Ite=-0,FK=-0,bg=-1.1,N3=-0,Ck=!1,yk=!1,BM=null,LK=0,f8=0,oQ=null,Cte=Wn.S;Wn.S=function(b,v){typeof v=="object"&&v!==null&&typeof v.then=="function"&&S4(b,v),Cte!==null&&Cte(b,v)};var I8=w(null),R3={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},bM=[],SM=[],QM=[],vM=[],P=[],T=[],q=new Set;R3.recordUnsafeLifecycleWarnings=function(b,v){q.has(b.type)||(typeof v.componentWillMount=="function"&&v.componentWillMount.__suppressDeprecationWarning!==!0&&bM.push(b),b.mode&Fh&&typeof v.UNSAFE_componentWillMount=="function"&&SM.push(b),typeof v.componentWillReceiveProps=="function"&&v.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&QM.push(b),b.mode&Fh&&typeof v.UNSAFE_componentWillReceiveProps=="function"&&vM.push(b),typeof v.componentWillUpdate=="function"&&v.componentWillUpdate.__suppressDeprecationWarning!==!0&&P.push(b),b.mode&Fh&&typeof v.UNSAFE_componentWillUpdate=="function"&&T.push(b))},R3.flushPendingUnsafeLifecycleWarnings=function(){var b=new Set;0<bM.length&&(bM.forEach(function(ct){b.add(Q(ct)||"Component"),q.add(ct.type)}),bM=[]);var v=new Set;0<SM.length&&(SM.forEach(function(ct){v.add(Q(ct)||"Component"),q.add(ct.type)}),SM=[]);var L=new Set;0<QM.length&&(QM.forEach(function(ct){L.add(Q(ct)||"Component"),q.add(ct.type)}),QM=[]);var $=new Set;0<vM.length&&(vM.forEach(function(ct){$.add(Q(ct)||"Component"),q.add(ct.type)}),vM=[]);var ae=new Set;0<P.length&&(P.forEach(function(ct){ae.add(Q(ct)||"Component"),q.add(ct.type)}),P=[]);var Ie=new Set;if(0<T.length&&(T.forEach(function(ct){Ie.add(Q(ct)||"Component"),q.add(ct.type)}),T=[]),0<v.size){var ze=g(v);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.

Please update the following components: %s`,ze)}0<$.size&&(ze=g($),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state

Please update the following components: %s`,ze)),0<Ie.size&&(ze=g(Ie),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.

Please update the following components: %s`,ze)),0<b.size&&(ze=g(b),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,ze)),0<L.size&&(ze=g(L),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,ze)),0<ae.size&&(ze=g(ae),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,ze))};var de=new Map,Se=new Set;R3.recordLegacyContextWarning=function(b,v){for(var L=null,$=b;$!==null;)$.mode&Fh&&(L=$),$=$.return;L===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!Se.has(b.type)&&($=de.get(L),b.type.contextTypes!=null||b.type.childContextTypes!=null||v!==null&&typeof v.getChildContext=="function")&&($===void 0&&($=[],de.set(L,$)),$.push(b))},R3.flushLegacyContextWarning=function(){de.forEach(function(b){if(b.length!==0){var v=b[0],L=new Set;b.forEach(function(ae){L.add(Q(ae)||"Component"),Se.add(ae.type)});var $=g(L);Lt(v,function(){console.error(`Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: %s

Learn more about this warning here: https://react.dev/link/legacy-context`,$)})}})},R3.discardPendingWarnings=function(){bM=[],SM=[],QM=[],vM=[],P=[],T=[],de=new Map};var Ne=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),ut=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Ft=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),Tn={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},_o=null,di=!1,li=0,vi=1,Ws=2,ya=4,od=8,iQ=0,T3=1,fn=2,mn=3,vn=!1,Do=!1,cr=null,gc=!1,Ms=w(null),xa=w(0),sa,Eu=new Set,Hh=new Set,y5=new Set,_ye=new Set,wM=0,$a=null,Ju=null,F_=null,fye=!1,HK=!1,xk=!1,Iye=0,yte=0,rQ=null,cdr=0,ldr=25,mo=null,H4=null,sQ=-1,xte=!1,Cye={readContext:DA,use:Tp,useCallback:nc,useContext:nc,useEffect:nc,useImperativeHandle:nc,useLayoutEffect:nc,useInsertionEffect:nc,useMemo:nc,useReducer:nc,useRef:nc,useState:nc,useDebugValue:nc,useDeferredValue:nc,useTransition:nc,useSyncExternalStore:nc,useId:nc,useHostTransitionStatus:nc,useFormState:nc,useActionState:nc,useOptimistic:nc,useMemoCache:nc,useCacheRefresh:nc},Pot=null,b3n=null,Mot=null,S3n=null,C8=null,b9=null,yye=null;Pot={readContext:function(b){return DA(b)},use:Tp,useCallback:function(b,v){return mo="useCallback",bs(),ip(v),ma(b,v)},useContext:function(b){return mo="useContext",bs(),DA(b)},useEffect:function(b,v){return mo="useEffect",bs(),ip(v),TI(b,v)},useImperativeHandle:function(b,v,L){return mo="useImperativeHandle",bs(),ip(L),B2(b,v,L)},useInsertionEffect:function(b,v){mo="useInsertionEffect",bs(),ip(v),Em(4,Ws,b,v)},useLayoutEffect:function(b,v){return mo="useLayoutEffect",bs(),ip(v),Ef(b,v)},useMemo:function(b,v){mo="useMemo",bs(),ip(v);var L=Wn.H;Wn.H=C8;try{return Hd(b,v)}finally{Wn.H=L}},useReducer:function(b,v,L){mo="useReducer",bs();var $=Wn.H;Wn.H=C8;try{return uA(b,v,L)}finally{Wn.H=$}},useRef:function(b){return mo="useRef",bs(),yh(b)},useState:function(b){mo="useState",bs();var v=Wn.H;Wn.H=C8;try{return yf(b)}finally{Wn.H=v}},useDebugValue:function(){mo="useDebugValue",bs()},useDeferredValue:function(b,v){return mo="useDeferredValue",bs(),kI(b,v)},useTransition:function(){return mo="useTransition",bs(),ap()},useSyncExternalStore:function(b,v,L){return mo="useSyncExternalStore",bs(),xm(b,v,L)},useId:function(){return mo="useId",bs(),Yd()},useFormState:function(b,v){return mo="useFormState",bs(),vI(),E2(b,v)},useActionState:function(b,v){return mo="useActionState",bs(),E2(b,v)},useOptimistic:function(b){return mo="useOptimistic",bs(),Fu(b)},useHostTransitionStatus:Gd,useMemoCache:rl,useCacheRefresh:function(){return mo="useCacheRefresh",bs(),b1()}},b3n={readContext:function(b){return DA(b)},use:Tp,useCallback:function(b,v){return mo="useCallback",Zo(),ma(b,v)},useContext:function(b){return mo="useContext",Zo(),DA(b)},useEffect:function(b,v){return mo="useEffect",Zo(),TI(b,v)},useImperativeHandle:function(b,v,L){return mo="useImperativeHandle",Zo(),B2(b,v,L)},useInsertionEffect:function(b,v){mo="useInsertionEffect",Zo(),Em(4,Ws,b,v)},useLayoutEffect:function(b,v){return mo="useLayoutEffect",Zo(),Ef(b,v)},useMemo:function(b,v){mo="useMemo",Zo();var L=Wn.H;Wn.H=C8;try{return Hd(b,v)}finally{Wn.H=L}},useReducer:function(b,v,L){mo="useReducer",Zo();var $=Wn.H;Wn.H=C8;try{return uA(b,v,L)}finally{Wn.H=$}},useRef:function(b){return mo="useRef",Zo(),yh(b)},useState:function(b){mo="useState",Zo();var v=Wn.H;Wn.H=C8;try{return yf(b)}finally{Wn.H=v}},useDebugValue:function(){mo="useDebugValue",Zo()},useDeferredValue:function(b,v){return mo="useDeferredValue",Zo(),kI(b,v)},useTransition:function(){return mo="useTransition",Zo(),ap()},useSyncExternalStore:function(b,v,L){return mo="useSyncExternalStore",Zo(),xm(b,v,L)},useId:function(){return mo="useId",Zo(),Yd()},useActionState:function(b,v){return mo="useActionState",Zo(),E2(b,v)},useFormState:function(b,v){return mo="useFormState",Zo(),vI(),E2(b,v)},useOptimistic:function(b){return mo="useOptimistic",Zo(),Fu(b)},useHostTransitionStatus:Gd,useMemoCache:rl,useCacheRefresh:function(){return mo="useCacheRefresh",Zo(),b1()}},Mot={readContext:function(b){return DA(b)},use:Tp,useCallback:function(b,v){return mo="useCallback",Zo(),b2(b,v)},useContext:function(b){return mo="useContext",Zo(),DA(b)},useEffect:function(b,v){mo="useEffect",Zo(),z0(2048,od,b,v)},useImperativeHandle:function(b,v,L){return mo="useImperativeHandle",Zo(),Lp(b,v,L)},useInsertionEffect:function(b,v){return mo="useInsertionEffect",Zo(),z0(4,Ws,b,v)},useLayoutEffect:function(b,v){return mo="useLayoutEffect",Zo(),z0(4,ya,b,v)},useMemo:function(b,v){mo="useMemo",Zo();var L=Wn.H;Wn.H=b9;try{return E1(b,v)}finally{Wn.H=L}},useReducer:function(b,v,L){mo="useReducer",Zo();var $=Wn.H;Wn.H=b9;try{return ym(b,v,L)}finally{Wn.H=$}},useRef:function(){return mo="useRef",Zo(),pa().memoizedState},useState:function(){mo="useState",Zo();var b=Wn.H;Wn.H=b9;try{return ym(IA)}finally{Wn.H=b}},useDebugValue:function(){mo="useDebugValue",Zo()},useDeferredValue:function(b,v){return mo="useDeferredValue",Zo(),Od(b,v)},useTransition:function(){return mo="useTransition",Zo(),u3()},useSyncExternalStore:function(b,v,L){return mo="useSyncExternalStore",Zo(),I2(b,v,L)},useId:function(){return mo="useId",Zo(),pa().memoizedState},useFormState:function(b){return mo="useFormState",Zo(),vI(),NI(b)},useActionState:function(b){return mo="useActionState",Zo(),NI(b)},useOptimistic:function(b,v){return mo="useOptimistic",Zo(),sp(b,v)},useHostTransitionStatus:Gd,useMemoCache:rl,useCacheRefresh:function(){return mo="useCacheRefresh",Zo(),pa().memoizedState}},S3n={readContext:function(b){return DA(b)},use:Tp,useCallback:function(b,v){return mo="useCallback",Zo(),b2(b,v)},useContext:function(b){return mo="useContext",Zo(),DA(b)},useEffect:function(b,v){mo="useEffect",Zo(),z0(2048,od,b,v)},useImperativeHandle:function(b,v,L){return mo="useImperativeHandle",Zo(),Lp(b,v,L)},useInsertionEffect:function(b,v){return mo="useInsertionEffect",Zo(),z0(4,Ws,b,v)},useLayoutEffect:function(b,v){return mo="useLayoutEffect",Zo(),z0(4,ya,b,v)},useMemo:function(b,v){mo="useMemo",Zo();var L=Wn.H;Wn.H=yye;try{return E1(b,v)}finally{Wn.H=L}},useReducer:function(b,v,L){mo="useReducer",Zo();var $=Wn.H;Wn.H=yye;try{return C1(b,v,L)}finally{Wn.H=$}},useRef:function(){return mo="useRef",Zo(),pa().memoizedState},useState:function(){mo="useState",Zo();var b=Wn.H;Wn.H=yye;try{return C1(IA)}finally{Wn.H=b}},useDebugValue:function(){mo="useDebugValue",Zo()},useDeferredValue:function(b,v){return mo="useDeferredValue",Zo(),B1(b,v)},useTransition:function(){return mo="useTransition",Zo(),Q2()},useSyncExternalStore:function(b,v,L){return mo="useSyncExternalStore",Zo(),I2(b,v,L)},useId:function(){return mo="useId",Zo(),pa().memoizedState},useFormState:function(b){return mo="useFormState",Zo(),vI(),RI(b)},useActionState:function(b){return mo="useActionState",Zo(),RI(b)},useOptimistic:function(b,v){return mo="useOptimistic",Zo(),C2(b,v)},useHostTransitionStatus:Gd,useMemoCache:rl,useCacheRefresh:function(){return mo="useCacheRefresh",Zo(),pa().memoizedState}},C8={readContext:function(b){return l(),DA(b)},use:function(b){return c(),Tp(b)},useCallback:function(b,v){return mo="useCallback",c(),bs(),ma(b,v)},useContext:function(b){return mo="useContext",c(),bs(),DA(b)},useEffect:function(b,v){return mo="useEffect",c(),bs(),TI(b,v)},useImperativeHandle:function(b,v,L){return mo="useImperativeHandle",c(),bs(),B2(b,v,L)},useInsertionEffect:function(b,v){mo="useInsertionEffect",c(),bs(),Em(4,Ws,b,v)},useLayoutEffect:function(b,v){return mo="useLayoutEffect",c(),bs(),Ef(b,v)},useMemo:function(b,v){mo="useMemo",c(),bs();var L=Wn.H;Wn.H=C8;try{return Hd(b,v)}finally{Wn.H=L}},useReducer:function(b,v,L){mo="useReducer",c(),bs();var $=Wn.H;Wn.H=C8;try{return uA(b,v,L)}finally{Wn.H=$}},useRef:function(b){return mo="useRef",c(),bs(),yh(b)},useState:function(b){mo="useState",c(),bs();var v=Wn.H;Wn.H=C8;try{return yf(b)}finally{Wn.H=v}},useDebugValue:function(){mo="useDebugValue",c(),bs()},useDeferredValue:function(b,v){return mo="useDeferredValue",c(),bs(),kI(b,v)},useTransition:function(){return mo="useTransition",c(),bs(),ap()},useSyncExternalStore:function(b,v,L){return mo="useSyncExternalStore",c(),bs(),xm(b,v,L)},useId:function(){return mo="useId",c(),bs(),Yd()},useFormState:function(b,v){return mo="useFormState",c(),bs(),E2(b,v)},useActionState:function(b,v){return mo="useActionState",c(),bs(),E2(b,v)},useOptimistic:function(b){return mo="useOptimistic",c(),bs(),Fu(b)},useMemoCache:function(b){return c(),rl(b)},useHostTransitionStatus:Gd,useCacheRefresh:function(){return mo="useCacheRefresh",bs(),b1()}},b9={readContext:function(b){return l(),DA(b)},use:function(b){return c(),Tp(b)},useCallback:function(b,v){return mo="useCallback",c(),Zo(),b2(b,v)},useContext:function(b){return mo="useContext",c(),Zo(),DA(b)},useEffect:function(b,v){mo="useEffect",c(),Zo(),z0(2048,od,b,v)},useImperativeHandle:function(b,v,L){return mo="useImperativeHandle",c(),Zo(),Lp(b,v,L)},useInsertionEffect:function(b,v){return mo="useInsertionEffect",c(),Zo(),z0(4,Ws,b,v)},useLayoutEffect:function(b,v){return mo="useLayoutEffect",c(),Zo(),z0(4,ya,b,v)},useMemo:function(b,v){mo="useMemo",c(),Zo();var L=Wn.H;Wn.H=b9;try{return E1(b,v)}finally{Wn.H=L}},useReducer:function(b,v,L){mo="useReducer",c(),Zo();var $=Wn.H;Wn.H=b9;try{return ym(b,v,L)}finally{Wn.H=$}},useRef:function(){return mo="useRef",c(),Zo(),pa().memoizedState},useState:function(){mo="useState",c(),Zo();var b=Wn.H;Wn.H=b9;try{return ym(IA)}finally{Wn.H=b}},useDebugValue:function(){mo="useDebugValue",c(),Zo()},useDeferredValue:function(b,v){return mo="useDeferredValue",c(),Zo(),Od(b,v)},useTransition:function(){return mo="useTransition",c(),Zo(),u3()},useSyncExternalStore:function(b,v,L){return mo="useSyncExternalStore",c(),Zo(),I2(b,v,L)},useId:function(){return mo="useId",c(),Zo(),pa().memoizedState},useFormState:function(b){return mo="useFormState",c(),Zo(),NI(b)},useActionState:function(b){return mo="useActionState",c(),Zo(),NI(b)},useOptimistic:function(b,v){return mo="useOptimistic",c(),Zo(),sp(b,v)},useMemoCache:function(b){return c(),rl(b)},useHostTransitionStatus:Gd,useCacheRefresh:function(){return mo="useCacheRefresh",Zo(),pa().memoizedState}},yye={readContext:function(b){return l(),DA(b)},use:function(b){return c(),Tp(b)},useCallback:function(b,v){return mo="useCallback",c(),Zo(),b2(b,v)},useContext:function(b){return mo="useContext",c(),Zo(),DA(b)},useEffect:function(b,v){mo="useEffect",c(),Zo(),z0(2048,od,b,v)},useImperativeHandle:function(b,v,L){return mo="useImperativeHandle",c(),Zo(),Lp(b,v,L)},useInsertionEffect:function(b,v){return mo="useInsertionEffect",c(),Zo(),z0(4,Ws,b,v)},useLayoutEffect:function(b,v){return mo="useLayoutEffect",c(),Zo(),z0(4,ya,b,v)},useMemo:function(b,v){mo="useMemo",c(),Zo();var L=Wn.H;Wn.H=b9;try{return E1(b,v)}finally{Wn.H=L}},useReducer:function(b,v,L){mo="useReducer",c(),Zo();var $=Wn.H;Wn.H=b9;try{return C1(b,v,L)}finally{Wn.H=$}},useRef:function(){return mo="useRef",c(),Zo(),pa().memoizedState},useState:function(){mo="useState",c(),Zo();var b=Wn.H;Wn.H=b9;try{return C1(IA)}finally{Wn.H=b}},useDebugValue:function(){mo="useDebugValue",c(),Zo()},useDeferredValue:function(b,v){return mo="useDeferredValue",c(),Zo(),B1(b,v)},useTransition:function(){return mo="useTransition",c(),Zo(),Q2()},useSyncExternalStore:function(b,v,L){return mo="useSyncExternalStore",c(),Zo(),I2(b,v,L)},useId:function(){return mo="useId",c(),Zo(),pa().memoizedState},useFormState:function(b){return mo="useFormState",c(),Zo(),RI(b)},useActionState:function(b){return mo="useActionState",c(),Zo(),RI(b)},useOptimistic:function(b,v){return mo="useOptimistic",c(),Zo(),C2(b,v)},useMemoCache:function(b){return c(),rl(b)},useHostTransitionStatus:Gd,useCacheRefresh:function(){return mo="useCacheRefresh",Zo(),pa().memoizedState}};var Q3n={"react-stack-bottom-frame":function(b,v,L){var $=nd;nd=!0;try{return b(v,L)}finally{nd=$}}},Dot=Q3n["react-stack-bottom-frame"].bind(Q3n),v3n={"react-stack-bottom-frame":function(b){var v=nd;nd=!0;try{return b.render()}finally{nd=v}}},w3n=v3n["react-stack-bottom-frame"].bind(v3n),P3n={"react-stack-bottom-frame":function(b,v){try{v.componentDidMount()}catch(L){Si(b,b.return,L)}}},Not=P3n["react-stack-bottom-frame"].bind(P3n),M3n={"react-stack-bottom-frame":function(b,v,L,$,ae){try{v.componentDidUpdate(L,$,ae)}catch(Ie){Si(b,b.return,Ie)}}},D3n=M3n["react-stack-bottom-frame"].bind(M3n),N3n={"react-stack-bottom-frame":function(b,v){var L=v.stack;b.componentDidCatch(v.value,{componentStack:L!==null?L:""})}},udr=N3n["react-stack-bottom-frame"].bind(N3n),R3n={"react-stack-bottom-frame":function(b,v,L){try{L.componentWillUnmount()}catch($){Si(b,v,$)}}},T3n=R3n["react-stack-bottom-frame"].bind(R3n),k3n={"react-stack-bottom-frame":function(b){b.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",b.resourceKind);var v=b.create;return b=b.inst,v=v(),b.destroy=v}},gdr=k3n["react-stack-bottom-frame"].bind(k3n),F3n={"react-stack-bottom-frame":function(b,v,L){try{L()}catch($){Si(b,v,$)}}},ddr=F3n["react-stack-bottom-frame"].bind(F3n),L3n={"react-stack-bottom-frame":function(b){var v=b._init;return v(b._payload)}},PM=L3n["react-stack-bottom-frame"].bind(L3n),OK=null,Ete=0,UA=null,Rot,H3n=Rot=!1,O3n={},G3n={},Y3n={};A=function(b,v,L){if(L!==null&&typeof L=="object"&&L._store&&(!L._store.validated&&L.key==null||L._store.validated===2)){if(typeof L._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");L._store.validated=1;var $=Q(b),ae=$||"null";if(!O3n[ae]){O3n[ae]=!0,L=L._owner,b=b._debugOwner;var Ie="";b&&typeof b.tag=="number"&&(ae=Q(b))&&(Ie=`

Check the render method of \``+ae+"`."),Ie||$&&(Ie=`

Check the top-level render call using <`+$+">.");var ze="";L!=null&&b!==L&&($=null,typeof L.tag=="number"?$=Q(L):typeof L.name=="string"&&($=L.name),$&&(ze=" It was passed a child from "+$+".")),Lt(v,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',Ie,ze)})}}};var GK=LI(!0),U3n=LI(!1),O4=w(null),y8=null,YK=1,Bte=2,Kf=w(0),K3n={},V3n=new Set,z3n=new Set,J3n=new Set,W3n=new Set,j3n=new Set,$3n=new Set,q3n=new Set,X3n=new Set,Z3n=new Set,eEn=new Set;Object.freeze(K3n);var Tot={enqueueSetState:function(b,v,L){b=b._reactInternals;var $=Kd(b),ae=np($);ae.payload=v,L!=null&&(Ud(L),ae.callback=L),v=y0(b,ae,$),v!==null&&(yc(v,b,$),Cm(v,b,$)),ve(b,$)},enqueueReplaceState:function(b,v,L){b=b._reactInternals;var $=Kd(b),ae=np($);ae.tag=T3,ae.payload=v,L!=null&&(Ud(L),ae.callback=L),v=y0(b,ae,$),v!==null&&(yc(v,b,$),Cm(v,b,$)),ve(b,$)},enqueueForceUpdate:function(b,v){b=b._reactInternals;var L=Kd(b),$=np(L);$.tag=fn,v!=null&&(Ud(v),$.callback=v),v=y0(b,$,L),v!==null&&(yc(v,b,L),Cm(v,b,L)),Pi!==null&&typeof Pi.markForceUpdateScheduled=="function"&&Pi.markForceUpdateScheduled(b,L)}},kot=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var v=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(v))return}else if(typeof t=="object"&&typeof t.emit=="function"){t.emit("uncaughtException",b);return}console.error(b)},UK=null,Fot=null,tEn=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),j1=!1,nEn={},oEn={},iEn={},rEn={},KK=!1,sEn={},Lot={},Hot={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},aEn=!1,AEn=null;AEn=new Set;var aQ=!1,Gm=!1,Oot=!1,cEn=typeof WeakSet=="function"?WeakSet:Set,$1=null,VK=null,zK=null,L_=null,k3=!1,S9=null,bte=8192,hdr={getCacheForType:function(b){var v=DA(Lh),L=v.data.get(b);return L===void 0&&(L=b(),v.data.set(b,L)),L},getOwner:function(){return Th}};if(typeof Symbol=="function"&&Symbol.for){var Ste=Symbol.for;Ste("selector.component"),Ste("selector.has_pseudo_class"),Ste("selector.role"),Ste("selector.test_id"),Ste("selector.text")}var pdr=[],mdr=typeof WeakMap=="function"?WeakMap:Map,x5=0,ix=2,Q9=4,AQ=0,Qte=1,JK=2,Got=3,Ek=4,xye=6,lEn=5,v0=x5,Sg=null,dc=null,bc=0,F3=0,vte=1,Bk=2,wte=3,uEn=4,Yot=5,WK=6,Pte=7,Uot=8,bk=9,Z0=F3,E5=null,MM=!1,jK=!1,Kot=!1,x8=0,tm=AQ,DM=0,NM=0,Vot=0,B5=0,Sk=0,Mte=null,rx=null,Eye=!1,zot=0,gEn=300,Bye=1/0,dEn=500,Dte=null,RM=null,_dr=0,fdr=1,Idr=2,Qk=0,hEn=1,pEn=2,mEn=3,Cdr=4,Jot=5,lC=0,TM=null,$K=null,kM=0,Wot=0,jot=null,_En=null,ydr=50,Nte=0,$ot=null,qot=!1,bye=!1,xdr=50,vk=0,Rte=null,qK=!1,Sye=null,fEn=!1,IEn=new Set,Edr={},Qye=null,XK=null,Xot=!1,Zot=!1,vye=!1,eit=!1,wk=0,tit={};(function(){for(var b=0;b<mk.length;b++){var v=mk[b],L=v.toLowerCase();v=v[0].toUpperCase()+v.slice(1),cg(L,"on"+v)}cg(aC,"onAnimationEnd"),cg(fM,"onAnimationIteration"),cg(p8,"onAnimationStart"),cg("dblclick","onDoubleClick"),cg("focusin","onFocus"),cg("focusout","onBlur"),cg(pk,"onTransitionRun"),cg(pye,"onTransitionStart"),cg(pte,"onTransitionCancel"),cg(qS,"onTransitionEnd")})(),Bt("onMouseEnter",["mouseout","mouseover"]),Bt("onMouseLeave",["mouseout","mouseover"]),Bt("onPointerEnter",["pointerout","pointerover"]),Bt("onPointerLeave",["pointerout","pointerover"]),It("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),It("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),It("onBeforeInput",["compositionend","keypress","textInput","paste"]),It("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),It("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),It("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tte="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),nit=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tte)),wye="_reactListening"+Math.random().toString(36).slice(2),CEn=!1,yEn=!1,Pye=!1,xEn=!1,Mye=!1,Dye=!1,EEn=!1,Nye={},Bdr=/\r\n?/g,bdr=/\u0000|\uFFFD/g,Pk="http://www.w3.org/1999/xlink",oit="http://www.w3.org/XML/1998/namespace",Sdr="javascript:throw new Error('React form unexpectedly submitted.')",Qdr="suppressHydrationWarning",Rye="$",Tye="/$",cQ="$?",kte="$!",vdr=1,wdr=2,Pdr=4,iit="F!",BEn="F",bEn="complete",Mdr="style",lQ=0,ZK=1,kye=2,rit=null,sit=null,SEn={dialog:!0,webview:!0},ait=null,QEn=typeof setTimeout=="function"?setTimeout:void 0,Ddr=typeof clearTimeout=="function"?clearTimeout:void 0,Mk=-1,vEn=typeof Promise=="function"?Promise:void 0,Ndr=typeof queueMicrotask=="function"?queueMicrotask:typeof vEn<"u"?function(b){return vEn.resolve(null).then(b).catch(y3)}:QEn,Ait=null,Dk=0,Fte=1,wEn=2,PEn=3,G4=4,Y4=new Map,MEn=new Set,uQ=_s.d;_s.d={f:function(){var b=uQ.f(),v=XC();return b||v},r:function(b){var v=Yt(b);v!==null&&v.tag===5&&v.type==="form"?y_(v):uQ.r(b)},D:function(b){uQ.D(b),pl("dns-prefetch",b,null)},C:function(b,v){uQ.C(b,v),pl("preconnect",b,v)},L:function(b,v,L){uQ.L(b,v,L);var $=eV;if($&&b&&v){var ae='link[rel="preload"][as="'+zn(v)+'"]';v==="image"&&L&&L.imageSrcSet?(ae+='[imagesrcset="'+zn(L.imageSrcSet)+'"]',typeof L.imageSizes=="string"&&(ae+='[imagesizes="'+zn(L.imageSizes)+'"]')):ae+='[href="'+zn(b)+'"]';var Ie=ae;switch(v){case"style":Ie=Vl(b);break;case"script":Ie=F1(b)}Y4.has(Ie)||(b=ms({rel:"preload",href:v==="image"&&L&&L.imageSrcSet?void 0:b,as:v},L),Y4.set(Ie,b),$.querySelector(ae)!==null||v==="style"&&$.querySelector(Mh(Ie))||v==="script"&&$.querySelector(Wp(Ie))||(v=$.createElement("link"),S0(v,"link",b),et(v),$.head.appendChild(v)))}},m:function(b,v){uQ.m(b,v);var L=eV;if(L&&b){var $=v&&typeof v.as=="string"?v.as:"script",ae='link[rel="modulepreload"][as="'+zn($)+'"][href="'+zn(b)+'"]',Ie=ae;switch($){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":Ie=F1(b)}if(!Y4.has(Ie)&&(b=ms({rel:"modulepreload",href:b},v),Y4.set(Ie,b),L.querySelector(ae)===null)){switch($){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(L.querySelector(Wp(Ie)))return}$=L.createElement("link"),S0($,"link",b),et($),L.head.appendChild($)}}},X:function(b,v){uQ.X(b,v);var L=eV;if(L&&b){var $=be(L).hoistableScripts,ae=F1(b),Ie=$.get(ae);Ie||(Ie=L.querySelector(Wp(ae)),Ie||(b=ms({src:b,async:!0},v),(v=Y4.get(ae))&&Dh(b,v),Ie=L.createElement("script"),et(Ie),S0(Ie,"link",b),L.head.appendChild(Ie)),Ie={type:"script",instance:Ie,count:1,state:null},$.set(ae,Ie))}},S:function(b,v,L){uQ.S(b,v,L);var $=eV;if($&&b){var ae=be($).hoistableStyles,Ie=Vl(b);v=v||"default";var ze=ae.get(Ie);if(!ze){var ct={loading:Dk,preload:null};if(ze=$.querySelector(Mh(Ie)))ct.loading=Fte|G4;else{b=ms({rel:"stylesheet",href:b,"data-precedence":v},L),(L=Y4.get(Ie))&&yu(b,L);var Mt=ze=$.createElement("link");et(Mt),S0(Mt,"link",b),Mt._p=new Promise(function(Vt,io){Mt.onload=Vt,Mt.onerror=io}),Mt.addEventListener("load",function(){ct.loading|=Fte}),Mt.addEventListener("error",function(){ct.loading|=wEn}),ct.loading|=G4,Jd(ze,v,$)}ze={type:"stylesheet",instance:ze,count:1,state:ct},ae.set(Ie,ze)}}},M:function(b,v){uQ.M(b,v);var L=eV;if(L&&b){var $=be(L).hoistableScripts,ae=F1(b),Ie=$.get(ae);Ie||(Ie=L.querySelector(Wp(ae)),Ie||(b=ms({src:b,async:!0,type:"module"},v),(v=Y4.get(ae))&&Dh(b,v),Ie=L.createElement("script"),et(Ie),S0(Ie,"link",b),L.head.appendChild(Ie)),Ie={type:"script",instance:Ie,count:1,state:null},$.set(ae,Ie))}}};var eV=typeof document>"u"?null:document,Fye=null,Lte=null,cit=null,Lye=null,Nk=u8,Hte={$$typeof:yA,Provider:null,Consumer:null,_currentValue:Nk,_currentValue2:Nk,_threadCount:0},DEn="%c%s%c ",NEn="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",REn="",Hye=" ",Rdr=Function.prototype.bind,TEn=!1,kEn=null,FEn=null,LEn=null,HEn=null,OEn=null,GEn=null,YEn=null,UEn=null,KEn=null;kEn=function(b,v,L,$){v=e(b,v),v!==null&&(L=n(v.memoizedState,L,0,$),v.memoizedState=L,v.baseState=L,b.memoizedProps=ms({},b.memoizedProps),L=G0(b,2),L!==null&&yc(L,b,2))},FEn=function(b,v,L){v=e(b,v),v!==null&&(L=r(v.memoizedState,L,0),v.memoizedState=L,v.baseState=L,b.memoizedProps=ms({},b.memoizedProps),L=G0(b,2),L!==null&&yc(L,b,2))},LEn=function(b,v,L,$){v=e(b,v),v!==null&&(L=o(v.memoizedState,L,$),v.memoizedState=L,v.baseState=L,b.memoizedProps=ms({},b.memoizedProps),L=G0(b,2),L!==null&&yc(L,b,2))},HEn=function(b,v,L){b.pendingProps=n(b.memoizedProps,v,0,L),b.alternate&&(b.alternate.pendingProps=b.pendingProps),v=G0(b,2),v!==null&&yc(v,b,2)},OEn=function(b,v){b.pendingProps=r(b.memoizedProps,v,0),b.alternate&&(b.alternate.pendingProps=b.pendingProps),v=G0(b,2),v!==null&&yc(v,b,2)},GEn=function(b,v,L){b.pendingProps=o(b.memoizedProps,v,L),b.alternate&&(b.alternate.pendingProps=b.pendingProps),v=G0(b,2),v!==null&&yc(v,b,2)},YEn=function(b){var v=G0(b,2);v!==null&&yc(v,b,2)},UEn=function(b){a=b},KEn=function(b){s=b};var Oye=!0,Gye=null,lit=!1,FM=null,LM=null,HM=null,Ote=new Map,Gte=new Map,OM=[],Tdr="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),Yye=null;if(M_.prototype.render=H1.prototype.render=function(b){var v=this._internalRoot;if(v===null)throw Error("Cannot update an unmounted root.");var L=arguments;typeof L[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):_(L[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof L[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),L=b;var $=v.current,ae=Kd($);wn($,ae,L,v,null,null)},M_.prototype.unmount=H1.prototype.unmount=function(){var b=arguments;if(typeof b[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),b=this._internalRoot,b!==null){this._internalRoot=null;var v=b.containerInfo;(v0&(ix|Q9))!==x5&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),wn(b.current,2,null,b,null,null),XC(),v[X0]=null}},M_.prototype.unstable_scheduleHydration=function(b){if(b){var v=Ct();b={blockedOn:null,target:b,priority:v};for(var L=0;L<OM.length&&v!==0&&v<OM[L].priority;L++);OM.splice(L,0,b),L===0&&Or(b)}},(function(){var b=ja.version;if(b!=="19.1.0")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
  - react:      `+(b+`
  - react-dom:  19.1.0
Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),_s.findDOMNode=function(b){var v=b._reactInternals;if(v===void 0)throw typeof b.render=="function"?Error("Unable to find node on an unmounted component."):(b=Object.keys(b).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+b));return b=y(v),b=b!==null?x(b):null,b=b===null?null:b.stateNode,b},!(function(){var b={bundleType:1,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Wn,reconcilerVersion:"19.1.0"};return b.overrideHookState=kEn,b.overrideHookStateDeletePath=FEn,b.overrideHookStateRenamePath=LEn,b.overrideProps=HEn,b.overridePropsDeletePath=OEn,b.overridePropsRenamePath=GEn,b.scheduleUpdate=YEn,b.setErrorHandler=UEn,b.setSuspenseHandler=KEn,b.scheduleRefresh=p,b.scheduleRoot=d,b.setRefreshHandler=m,b.getCurrentFiber=Ni,b.getLaneLabelMap=Xs,b.injectProfilingHooks=_e,le(b)})()&&on&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var VEn=window.location.protocol;/^(https?|file):$/.test(VEn)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(VEn==="file:"?`
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}rV.createRoot=function(b,v){if(!_(b))throw Error("Target container is not a DOM element.");gp(b);var L=!1,$="",ae=w4,Ie=J0,ze=Sm,ct=null;return v!=null&&(v.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof v=="object"&&v!==null&&v.$$typeof===Wd&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:

  let root = createRoot(domContainer);
  root.render(<App />);`),v.unstable_strictMode===!0&&(L=!0),v.identifierPrefix!==void 0&&($=v.identifierPrefix),v.onUncaughtError!==void 0&&(ae=v.onUncaughtError),v.onCaughtError!==void 0&&(Ie=v.onCaughtError),v.onRecoverableError!==void 0&&(ze=v.onRecoverableError),v.unstable_transitionCallbacks!==void 0&&(ct=v.unstable_transitionCallbacks)),v=Tt(b,1,!1,null,null,L,$,ae,Ie,ze,ct,null),b[X0]=v.current,l5(b),new H1(v)},rV.hydrateRoot=function(b,v,L){if(!_(b))throw Error("Target container is not a DOM element.");gp(b),v===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var $=!1,ae="",Ie=w4,ze=J0,ct=Sm,Mt=null,Vt=null;return L!=null&&(L.unstable_strictMode===!0&&($=!0),L.identifierPrefix!==void 0&&(ae=L.identifierPrefix),L.onUncaughtError!==void 0&&(Ie=L.onUncaughtError),L.onCaughtError!==void 0&&(ze=L.onCaughtError),L.onRecoverableError!==void 0&&(ct=L.onRecoverableError),L.unstable_transitionCallbacks!==void 0&&(Mt=L.unstable_transitionCallbacks),L.formState!==void 0&&(Vt=L.formState)),v=Tt(b,1,!0,v,L??null,$,ae,Ie,ze,ct,Mt,Vt),v.context=ln(null),L=v.current,$=Kd(L),$=at($),ae=np($),ae.callback=null,y0(L,ae,$),L=$,v.current.lanes=L,Le(v,L),Cg(v),b[X0]=v.current,l5(b),new M_(v)},rV.version="19.1.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),rV}var Vit;function L4n(){if(Vit)return rne.exports;Vit=1;var t={env:{}};function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(t.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}}return t.env.NODE_ENV==="production"?(e(),rne.exports=k4n()):rne.exports=F4n(),rne.exports}var H4n=L4n(),hQ=t=>{const e=Math.round(t*1e3)/1e3;return`${Number(e.toFixed(3))}mm`},zit=new Map([["T",1e12],["G",1e9],["M",1e6],["K",1e3],["k",1e3],["",1],["m",.001],["µ",1e-6],["μ",1e-6],["u",1e-6],["n",1e-9],["p",1e-12],["f",1e-15]]),O4n=[...zit.keys()];function Jit(t){return zit.get(t)}var Wit={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,mohm:.001,mOhm:.001,milliohm:.001,Ω:1,ohm:1,Ohm:1,kΩ:1e3,KΩ:1e3,kohm:1e3,kOhm:1e3,KOhm:1e3,Kohm:1e3,MΩ:1e6,Mohm:1e6,MOhm:1e6,megohm:1e6,Megohm:1e6,GΩ:1e9,Gohm:1e9,GOhm:1e9,TΩ:1e12,Tohm:1e12,TOhm:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,μA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,μF:1e-6,uF:1e-6,mF:.001,F:1,kF:1e3,KF:1e3,MF:1e6}},H:{baseUnit:"H",variants:{pH:1e-12,nH:1e-9,µH:1e-6,μH:1e-6,uH:1e-6,mH:.001,H:1,kH:1e3,KH:1e3,MH:1e6}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,μs:.001,ms:1,s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,μm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},Zye=new Set;for(const[t,e]of Object.entries(Wit)){Zye.add(t);for(const n of Object.keys(e.variants))Zye.add(n)}function G4n(t){for(const e of Object.values(Wit)){if(t in e.variants)return{baseUnit:e.baseUnit,conversionFactor:e.variants[t]};for(const[n,o]of Object.entries(e.variants)){if(!t.endsWith(n))continue;const i=t.slice(0,-n.length),r=Jit(i);if(r!=null)return{baseUnit:e.baseUnit,conversionFactor:r*o}}}return{baseUnit:t,conversionFactor:1}}function q1(t,e){if(t==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t=="string"&&t.match(/^-?[\d.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t=="number")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t=="object"&&"x"in t&&"y"in t){const c=q1(t.x,e),l=q1(t.x,e),u=q1(t.y,e);return l.value===null||u.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:c.parsedUnit,unitOfValue:c.unitOfValue,value:{x:l.value,y:u.value}}}const o=t.toString().split("").reverse().join("").match(/[^\d\s]+/)?.[0];if(!o)throw new Error(`Could not determine unit: "${t}"`);const i=o.split("").reverse().join(""),r=t.slice(0,-i.length),s=Jit(i);if(e&&s!=null)return{parsedUnit:null,unitOfValue:e,value:Number.parseFloat(r)*s};if(s!=null&&!Zye.has(i))return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(r)*s};const{baseUnit:a,conversionFactor:A}=G4n(i);return{parsedUnit:i,unitOfValue:a,value:A*Number.parseFloat(r)}}O4n.filter(t=>t!=="").sort((t,e)=>e.length-t.length).map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");var Lk=[{value:1e12,symbol:"T"},{value:1e9,symbol:"G"},{value:1e6,symbol:"M"},{value:1e3,symbol:"k"},{value:1,symbol:""},{value:.001,symbol:"m"},{value:1e-6,symbol:"µ"},{value:1e-9,symbol:"n"},{value:1e-12,symbol:"p"}],Y4n=Lk[Lk.length-1];function H_(t){if(t==null)return"";if(t===0)return"0";const e=Math.abs(t);let n=Lk.findIndex(s=>{const a=e/s.value;return a>=1&&a<1e3});n===-1&&(n=Lk.indexOf(Y4n));let o=Lk[n],i=t/o.value;for(;n>0&&Math.abs(Number(i.toPrecision(3)))>=1e3;)n-=1,o=Lk[n],i=t/o.value;let r=i.toPrecision(3);return r.includes(".")&&!/\.0+$/.test(r)&&(r=r.replace(/0+$/,"")),r=r.replace(/\.0+$/,""),`${r}${o.symbol}`}var Pl;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const r={};for(const s of i)r[s]=s;return r},t.getValidEnumValues=i=>{const r=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(const a of r)s[a]=i[a];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(r){return i[r]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const r=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&r.push(s);return r},t.find=(i,r)=>{for(const s of i)if(r(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function o(i,r=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(r)}t.joinValues=o,t.jsonStringifyReplacer=(i,r)=>typeof r=="bigint"?r.toString():r})(Pl||(Pl={}));var jit;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(jit||(jit={}));const Sr=Pl.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pQ=t=>{switch(typeof t){case"undefined":return Sr.undefined;case"string":return Sr.string;case"number":return Number.isNaN(t)?Sr.nan:Sr.number;case"boolean":return Sr.boolean;case"function":return Sr.function;case"bigint":return Sr.bigint;case"symbol":return Sr.symbol;case"object":return Array.isArray(t)?Sr.array:t===null?Sr.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Sr.promise:typeof Map<"u"&&t instanceof Map?Sr.map:typeof Set<"u"&&t instanceof Set?Sr.set:typeof Date<"u"&&t instanceof Date?Sr.date:Sr.object;default:return Sr.unknown}},lo=Pl.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class b5 extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(r){return r.message},o={_errors:[]},i=r=>{for(const s of r.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)o._errors.push(n(s));else{let a=o,A=0;for(;A<s.path.length;){const c=s.path[A];A===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],A++}}};return i(this),o}static assert(e){if(!(e instanceof b5))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pl.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)if(i.path.length>0){const r=i.path[0];n[r]=n[r]||[],n[r].push(e(i))}else o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}b5.create=t=>new b5(t);const sV=(t,e)=>{let n;switch(t.code){case lo.invalid_type:t.received===Sr.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case lo.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Pl.jsonStringifyReplacer)}`;break;case lo.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pl.joinValues(t.keys,", ")}`;break;case lo.invalid_union:n="Invalid input";break;case lo.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pl.joinValues(t.options)}`;break;case lo.invalid_enum_value:n=`Invalid enum value. Expected ${Pl.joinValues(t.options)}, received '${t.received}'`;break;case lo.invalid_arguments:n="Invalid function arguments";break;case lo.invalid_return_type:n="Invalid function return type";break;case lo.invalid_date:n="Invalid date";break;case lo.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Pl.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case lo.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case lo.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case lo.custom:n="Invalid input";break;case lo.invalid_intersection_types:n="Intersection results could not be merged";break;case lo.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case lo.not_finite:n="Number must be finite";break;default:n=e.defaultError,Pl.assertNever(t)}return{message:n}};let U4n=sV;function e2e(){return U4n}const t2e=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,r=[...n,...i.path||[]],s={...i,path:r};if(i.message!==void 0)return{...i,path:r,message:i.message};let a="";const A=o.filter(c=>!!c).slice().reverse();for(const c of A)a=c(s,{data:e,defaultError:a}).message;return{...i,path:r,message:a}};function sr(t,e){const n=e2e(),o=t2e({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===sV?void 0:sV].filter(i=>!!i)});t.common.issues.push(o)}class fy{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){if(i.status==="aborted")return Zs;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const r=await i.key,s=await i.value;o.push({key:r,value:s})}return fy.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:r,value:s}=i;if(r.status==="aborted"||s.status==="aborted")return Zs;r.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(o[r.value]=s.value)}return{status:e.value,value:o}}}const Zs=Object.freeze({status:"aborted"}),aV=t=>({status:"dirty",value:t}),Ax=t=>({status:"valid",value:t}),$it=t=>t.status==="aborted",qit=t=>t.status==="dirty",Hk=t=>t.status==="valid",cne=t=>typeof Promise<"u"&&t instanceof Promise;var is;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(is||(is={}));class w9{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xit=(t,e)=>{if(Hk(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new b5(t.common.issues);return this._error=n,this._error}}};function BA(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,a)=>{const{message:A}=t;return s.code==="invalid_enum_value"?{message:A??a.defaultError}:typeof a.data>"u"?{message:A??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:A??n??a.defaultError}},description:i}}class Sc{get description(){return this._def.description}_getType(e){return pQ(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:pQ(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new fy,ctx:{common:e.parent.common,data:e.data,parsedType:pQ(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(cne(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){const o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pQ(e)},i=this._parseSync({data:e,path:o.path,parent:o});return Xit(o,i)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pQ(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:n});return Hk(o)?{value:o.value}:{issues:n.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(o=>Hk(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:pQ(e)},i=this._parse({data:e,path:o.path,parent:o}),r=await(cne(i)?i:Promise.resolve(i));return Xit(o,r)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,r)=>{const s=e(i),a=()=>r.addIssue({code:lo.custom,...o(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(A=>A?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new _Q({schema:this,typeName:Ba.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return b8.create(this,this._def)}nullable(){return jM.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M9.create(this)}promise(){return uV.create(this,this._def)}or(e){return gne.create([this,e],this._def)}and(e){return dne.create(this,e,this._def)}transform(e){return new _Q({...BA(this._def),schema:this,typeName:Ba.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new mne({...BA(this._def),innerType:this,defaultValue:n,typeName:Ba.ZodDefault})}brand(){return new srt({typeName:Ba.ZodBranded,type:this,...BA(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new _ne({...BA(this._def),innerType:this,catchValue:n,typeName:Ba.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return A2e.create(this,e)}readonly(){return fne.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const K4n=/^c[^\s-]{8,}$/i,V4n=/^[0-9a-z]+$/,z4n=/^[0-9A-HJKMNP-TV-Z]{26}$/i,J4n=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}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[1-9]?[0-9])$/,oBn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iBn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Zit="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rBn=new RegExp(`^${Zit}$`);function ert(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function sBn(t){return new RegExp(`^${ert(t)}$`)}function aBn(t){let e=`${Zit}T${ert(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function ABn(t,e){return!!((e==="v4"||!e)&&Z4n.test(t)||(e==="v6"||!e)&&tBn.test(t))}function cBn(t,e){if(!j4n.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(o));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function lBn(t,e){return!!((e==="v4"||!e)&&eBn.test(t)||(e==="v6"||!e)&&nBn.test(t))}class P9 extends Sc{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Sr.string){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_type,expected:Sr.string,received:r.parsedType}),Zs}const o=new fy;let i;for(const r of this._def.checks)if(r.kind==="min")e.data.length<r.value&&(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),o.dirty());else if(r.kind==="max")e.data.length>r.value&&(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),o.dirty());else if(r.kind==="length"){const s=e.data.length>r.value,a=e.data.length<r.value;(s||a)&&(i=this._getOrReturnCtx(e,i),s?sr(i,{code:lo.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):a&&sr(i,{code:lo.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),o.dirty())}else if(r.kind==="email")q4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"email",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind==="emoji")n2e||(n2e=new RegExp(X4n,"u")),n2e.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"emoji",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind==="uuid")J4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"uuid",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind==="nanoid")W4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"nanoid",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind==="cuid")K4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"cuid",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind==="cuid2")V4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"cuid2",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind==="ulid")z4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"ulid",code:lo.invalid_string,message:r.message}),o.dirty());else if(r.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),sr(i,{validation:"url",code:lo.invalid_string,message:r.message}),o.dirty()}else r.kind==="regex"?(r.regex.lastIndex=0,r.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"regex",code:lo.invalid_string,message:r.message}),o.dirty())):r.kind==="trim"?e.data=e.data.trim():r.kind==="includes"?e.data.includes(r.value,r.position)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),o.dirty()):r.kind==="toLowerCase"?e.data=e.data.toLowerCase():r.kind==="toUpperCase"?e.data=e.data.toUpperCase():r.kind==="startsWith"?e.data.startsWith(r.value)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:{startsWith:r.value},message:r.message}),o.dirty()):r.kind==="endsWith"?e.data.endsWith(r.value)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:{endsWith:r.value},message:r.message}),o.dirty()):r.kind==="datetime"?aBn(r).test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:"datetime",message:r.message}),o.dirty()):r.kind==="date"?rBn.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:"date",message:r.message}),o.dirty()):r.kind==="time"?sBn(r).test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.invalid_string,validation:"time",message:r.message}),o.dirty()):r.kind==="duration"?$4n.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"duration",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind==="ip"?ABn(e.data,r.version)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"ip",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind==="jwt"?cBn(e.data,r.alg)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"jwt",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind==="cidr"?lBn(e.data,r.version)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"cidr",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind==="base64"?oBn.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"base64",code:lo.invalid_string,message:r.message}),o.dirty()):r.kind==="base64url"?iBn.test(e.data)||(i=this._getOrReturnCtx(e,i),sr(i,{validation:"base64url",code:lo.invalid_string,message:r.message}),o.dirty()):Pl.assertNever(r);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:lo.invalid_string,...is.errToObj(o)})}_addCheck(e){return new P9({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...is.errToObj(e)})}url(e){return this._addCheck({kind:"url",...is.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...is.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...is.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...is.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...is.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...is.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...is.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...is.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...is.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...is.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...is.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...is.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...is.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...is.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...is.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...is.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...is.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...is.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...is.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...is.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...is.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...is.errToObj(n)})}nonempty(e){return this.min(1,is.errToObj(e))}trim(){return new P9({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new P9({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new P9({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}P9.create=t=>new P9({checks:[],typeName:Ba.ZodString,coerce:t?.coerce??!1,...BA(t)});function uBn(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,r=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return r%s/10**i}class zM extends Sc{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Sr.number){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_type,expected:Sr.number,received:r.parsedType}),Zs}let o;const i=new fy;for(const r of this._def.checks)r.kind==="int"?Pl.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.invalid_type,expected:"integer",received:"float",message:r.message}),i.dirty()):r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()):r.kind==="multipleOf"?uBn(e.data,r.value)!==0&&(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):r.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.not_finite,message:r.message}),i.dirty()):Pl.assertNever(r);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,is.toString(n))}gt(e,n){return this.setLimit("min",e,!1,is.toString(n))}lte(e,n){return this.setLimit("max",e,!0,is.toString(n))}lt(e,n){return this.setLimit("max",e,!1,is.toString(n))}setLimit(e,n,o,i){return new zM({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:is.toString(i)}]})}_addCheck(e){return new zM({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:is.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:is.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:is.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:is.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:is.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:is.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:is.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:is.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:is.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Pl.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}zM.create=t=>new zM({checks:[],typeName:Ba.ZodNumber,coerce:t?.coerce||!1,...BA(t)});class JM extends Sc{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Sr.bigint)return this._getInvalidInput(e);let o;const i=new fy;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?e.data<r.value:e.data<=r.value)&&(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind==="max"?(r.inclusive?e.data>r.value:e.data>=r.value)&&(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()):r.kind==="multipleOf"?e.data%r.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),sr(o,{code:lo.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()):Pl.assertNever(r);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return sr(n,{code:lo.invalid_type,expected:Sr.bigint,received:n.parsedType}),Zs}gte(e,n){return this.setLimit("min",e,!0,is.toString(n))}gt(e,n){return this.setLimit("min",e,!1,is.toString(n))}lte(e,n){return this.setLimit("max",e,!0,is.toString(n))}lt(e,n){return this.setLimit("max",e,!1,is.toString(n))}setLimit(e,n,o,i){return new JM({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:is.toString(i)}]})}_addCheck(e){return new JM({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:is.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:is.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:is.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:is.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:is.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}JM.create=t=>new JM({checks:[],typeName:Ba.ZodBigInt,coerce:t?.coerce??!1,...BA(t)});class lne extends Sc{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Sr.boolean){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.boolean,received:o.parsedType}),Zs}return Ax(e.data)}}lne.create=t=>new lne({typeName:Ba.ZodBoolean,coerce:t?.coerce||!1,...BA(t)});class Ok extends Sc{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Sr.date){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_type,expected:Sr.date,received:r.parsedType}),Zs}if(Number.isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return sr(r,{code:lo.invalid_date}),Zs}const o=new fy;let i;for(const r of this._def.checks)r.kind==="min"?e.data.getTime()<r.value&&(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),o.dirty()):r.kind==="max"?e.data.getTime()>r.value&&(i=this._getOrReturnCtx(e,i),sr(i,{code:lo.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),o.dirty()):Pl.assertNever(r);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ok({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:is.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:is.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Ok.create=t=>new Ok({checks:[],coerce:t?.coerce||!1,typeName:Ba.ZodDate,...BA(t)});class trt extends Sc{_parse(e){if(this._getType(e)!==Sr.symbol){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.symbol,received:o.parsedType}),Zs}return Ax(e.data)}}trt.create=t=>new trt({typeName:Ba.ZodSymbol,...BA(t)});class o2e extends Sc{_parse(e){if(this._getType(e)!==Sr.undefined){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.undefined,received:o.parsedType}),Zs}return Ax(e.data)}}o2e.create=t=>new o2e({typeName:Ba.ZodUndefined,...BA(t)});class une extends Sc{_parse(e){if(this._getType(e)!==Sr.null){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.null,received:o.parsedType}),Zs}return Ax(e.data)}}une.create=t=>new une({typeName:Ba.ZodNull,...BA(t)});class AV extends Sc{constructor(){super(...arguments),this._any=!0}_parse(e){return Ax(e.data)}}AV.create=t=>new AV({typeName:Ba.ZodAny,...BA(t)});class Gk extends Sc{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ax(e.data)}}Gk.create=t=>new Gk({typeName:Ba.ZodUnknown,...BA(t)});class mQ extends Sc{_parse(e){const n=this._getOrReturnCtx(e);return sr(n,{code:lo.invalid_type,expected:Sr.never,received:n.parsedType}),Zs}}mQ.create=t=>new mQ({typeName:Ba.ZodNever,...BA(t)});class nrt extends Sc{_parse(e){if(this._getType(e)!==Sr.undefined){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.void,received:o.parsedType}),Zs}return Ax(e.data)}}nrt.create=t=>new nrt({typeName:Ba.ZodVoid,...BA(t)});class M9 extends Sc{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==Sr.array)return sr(n,{code:lo.invalid_type,expected:Sr.array,received:n.parsedType}),Zs;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(sr(n,{code:s?lo.too_big:lo.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(sr(n,{code:lo.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(sr(n,{code:lo.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new w9(n,s,n.path,a)))).then(s=>fy.mergeArray(o,s));const r=[...n.data].map((s,a)=>i.type._parseSync(new w9(n,s,n.path,a)));return fy.mergeArray(o,r)}get element(){return this._def.type}min(e,n){return new M9({...this._def,minLength:{value:e,message:is.toString(n)}})}max(e,n){return new M9({...this._def,maxLength:{value:e,message:is.toString(n)}})}length(e,n){return new M9({...this._def,exactLength:{value:e,message:is.toString(n)}})}nonempty(e){return this.min(1,e)}}M9.create=(t,e)=>new M9({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ba.ZodArray,...BA(e)});function Yk(t){if(t instanceof Um){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=b8.create(Yk(o))}return new Um({...t._def,shape:()=>e})}else return t instanceof M9?new M9({...t._def,type:Yk(t.element)}):t instanceof b8?b8.create(Yk(t.unwrap())):t instanceof jM?jM.create(Yk(t.unwrap())):t instanceof B8?B8.create(t.items.map(e=>Yk(e))):t}class Um extends Sc{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Pl.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Sr.object){const c=this._getOrReturnCtx(e);return sr(c,{code:lo.invalid_type,expected:Sr.object,received:c.parsedType}),Zs}const{status:o,ctx:i}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof mQ&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||a.push(c);const A=[];for(const c of s){const l=r[c],u=i.data[c];A.push({key:{status:"valid",value:c},value:l._parse(new w9(i,u,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof mQ){const c=this._def.unknownKeys;if(c==="passthrough")for(const l of a)A.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")a.length>0&&(sr(i,{code:lo.unrecognized_keys,keys:a}),o.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const l of a){const u=i.data[l];A.push({key:{status:"valid",value:l},value:c._parse(new w9(i,u,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const l of A){const u=await l.key,g=await l.value;c.push({key:u,value:g,alwaysSet:l.alwaysSet})}return c}).then(c=>fy.mergeObjectSync(o,c)):fy.mergeObjectSync(o,A)}get shape(){return this._def.shape()}strict(e){return is.errToObj,new Um({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{const i=this._def.errorMap?.(n,o).message??o.defaultError;return n.code==="unrecognized_keys"?{message:is.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Um({...this._def,unknownKeys:"strip"})}passthrough(){return new Um({...this._def,unknownKeys:"passthrough"})}extend(e){return new Um({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Um({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ba.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Um({...this._def,catchall:e})}pick(e){const n={};for(const o of Pl.objectKeys(e))e[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new Um({...this._def,shape:()=>n})}omit(e){const n={};for(const o of Pl.objectKeys(this.shape))e[o]||(n[o]=this.shape[o]);return new Um({...this._def,shape:()=>n})}deepPartial(){return Yk(this)}partial(e){const n={};for(const o of Pl.objectKeys(this.shape)){const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}return new Um({...this._def,shape:()=>n})}required(e){const n={};for(const o of Pl.objectKeys(this.shape))if(e&&!e[o])n[o]=this.shape[o];else{let r=this.shape[o];for(;r instanceof b8;)r=r._def.innerType;n[o]=r}return new Um({...this._def,shape:()=>n})}keyof(){return irt(Pl.objectKeys(this.shape))}}Um.create=(t,e)=>new Um({shape:()=>t,unknownKeys:"strip",catchall:mQ.create(),typeName:Ba.ZodObject,...BA(e)}),Um.strictCreate=(t,e)=>new Um({shape:()=>t,unknownKeys:"strict",catchall:mQ.create(),typeName:Ba.ZodObject,...BA(e)}),Um.lazycreate=(t,e)=>new Um({shape:t,unknownKeys:"strip",catchall:mQ.create(),typeName:Ba.ZodObject,...BA(e)});class gne extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(r){for(const a of r)if(a.result.status==="valid")return a.result;for(const a of r)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=r.map(a=>new b5(a.ctx.common.issues));return sr(n,{code:lo.invalid_union,unionErrors:s}),Zs}if(n.common.async)return Promise.all(o.map(async r=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await r._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let r;const s=[];for(const A of o){const c={...n,common:{...n.common,issues:[]},parent:null},l=A._parseSync({data:n.data,path:n.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!r&&(r={result:l,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(r)return n.common.issues.push(...r.ctx.common.issues),r.result;const a=s.map(A=>new b5(A));return sr(n,{code:lo.invalid_union,unionErrors:a}),Zs}}get options(){return this._def.options}}gne.create=(t,e)=>new gne({options:t,typeName:Ba.ZodUnion,...BA(e)});const E8=t=>t instanceof s2e?E8(t.schema):t instanceof _Q?E8(t.innerType()):t instanceof pne?[t.value]:t instanceof WM?t.options:t instanceof a2e?Pl.objectValues(t.enum):t instanceof mne?E8(t._def.innerType):t instanceof o2e?[void 0]:t instanceof une?[null]:t instanceof b8?[void 0,...E8(t.unwrap())]:t instanceof jM?[null,...E8(t.unwrap())]:t instanceof srt||t instanceof fne?E8(t.unwrap()):t instanceof _ne?E8(t._def.innerType):[];class i2e extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Sr.object)return sr(n,{code:lo.invalid_type,expected:Sr.object,received:n.parsedType}),Zs;const o=this.discriminator,i=n.data[o],r=this.optionsMap.get(i);return r?n.common.async?r._parseAsync({data:n.data,path:n.path,parent:n}):r._parseSync({data:n.data,path:n.path,parent:n}):(sr(n,{code:lo.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Zs)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const r of n){const s=E8(r.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,r)}}return new i2e({typeName:Ba.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...BA(o)})}}function r2e(t,e){const n=pQ(t),o=pQ(e);if(t===e)return{valid:!0,data:t};if(n===Sr.object&&o===Sr.object){const i=Pl.objectKeys(e),r=Pl.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(const a of r){const A=r2e(t[a],e[a]);if(!A.valid)return{valid:!1};s[a]=A.data}return{valid:!0,data:s}}else if(n===Sr.array&&o===Sr.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let r=0;r<t.length;r++){const s=t[r],a=e[r],A=r2e(s,a);if(!A.valid)return{valid:!1};i.push(A.data)}return{valid:!0,data:i}}else return n===Sr.date&&o===Sr.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class dne extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(r,s)=>{if($it(r)||$it(s))return Zs;const a=r2e(r.value,s.value);return a.valid?((qit(r)||qit(s))&&n.dirty(),{status:n.value,value:a.data}):(sr(o,{code:lo.invalid_intersection_types}),Zs)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([r,s])=>i(r,s)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}dne.create=(t,e,n)=>new dne({left:t,right:e,typeName:Ba.ZodIntersection,...BA(n)});class B8 extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.array)return sr(o,{code:lo.invalid_type,expected:Sr.array,received:o.parsedType}),Zs;if(o.data.length<this._def.items.length)return sr(o,{code:lo.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Zs;!this._def.rest&&o.data.length>this._def.items.length&&(sr(o,{code:lo.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const r=[...o.data].map((s,a)=>{const A=this._def.items[a]||this._def.rest;return A?A._parse(new w9(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(r).then(s=>fy.mergeArray(n,s)):fy.mergeArray(n,r)}get items(){return this._def.items}rest(e){return new B8({...this._def,rest:e})}}B8.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new B8({items:t,typeName:Ba.ZodTuple,rest:null,...BA(e)})};class hne extends Sc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.object)return sr(o,{code:lo.invalid_type,expected:Sr.object,received:o.parsedType}),Zs;const i=[],r=this._def.keyType,s=this._def.valueType;for(const a in o.data)i.push({key:r._parse(new w9(o,a,o.path,a)),value:s._parse(new w9(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?fy.mergeObjectAsync(n,i):fy.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Sc?new hne({keyType:e,valueType:n,typeName:Ba.ZodRecord,...BA(o)}):new hne({keyType:P9.create(),valueType:e,typeName:Ba.ZodRecord,...BA(n)})}}class ort extends Sc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.map)return sr(o,{code:lo.invalid_type,expected:Sr.map,received:o.parsedType}),Zs;const i=this._def.keyType,r=this._def.valueType,s=[...o.data.entries()].map(([a,A],c)=>({key:i._parse(new w9(o,a,o.path,[c,"key"])),value:r._parse(new w9(o,A,o.path,[c,"value"]))}));if(o.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const A of s){const c=await A.key,l=await A.value;if(c.status==="aborted"||l.status==="aborted")return Zs;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),a.set(c.value,l.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const A of s){const c=A.key,l=A.value;if(c.status==="aborted"||l.status==="aborted")return Zs;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),a.set(c.value,l.value)}return{status:n.value,value:a}}}}ort.create=(t,e,n)=>new ort({valueType:e,keyType:t,typeName:Ba.ZodMap,...BA(n)});class cV extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==Sr.set)return sr(o,{code:lo.invalid_type,expected:Sr.set,received:o.parsedType}),Zs;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(sr(o,{code:lo.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(sr(o,{code:lo.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const r=this._def.valueType;function s(A){const c=new Set;for(const l of A){if(l.status==="aborted")return Zs;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const a=[...o.data.values()].map((A,c)=>r._parse(new w9(o,A,o.path,c)));return o.common.async?Promise.all(a).then(A=>s(A)):s(a)}min(e,n){return new cV({...this._def,minSize:{value:e,message:is.toString(n)}})}max(e,n){return new cV({...this._def,maxSize:{value:e,message:is.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}cV.create=(t,e)=>new cV({valueType:t,minSize:null,maxSize:null,typeName:Ba.ZodSet,...BA(e)});class lV extends Sc{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Sr.function)return sr(n,{code:lo.invalid_type,expected:Sr.function,received:n.parsedType}),Zs;function o(a,A){return t2e({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,e2e(),sV].filter(c=>!!c),issueData:{code:lo.invalid_arguments,argumentsError:A}})}function i(a,A){return t2e({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,e2e(),sV].filter(c=>!!c),issueData:{code:lo.invalid_return_type,returnTypeError:A}})}const r={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof uV){const a=this;return Ax(async function(...A){const c=new b5([]),l=await a._def.args.parseAsync(A,r).catch(h=>{throw c.addIssue(o(A,h)),c}),u=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(u,r).catch(h=>{throw c.addIssue(i(u,h)),c})})}else{const a=this;return Ax(function(...A){const c=a._def.args.safeParse(A,r);if(!c.success)throw new b5([o(A,c.error)]);const l=Reflect.apply(s,this,c.data),u=a._def.returns.safeParse(l,r);if(!u.success)throw new b5([i(l,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new lV({...this._def,args:B8.create(e).rest(Gk.create())})}returns(e){return new lV({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new lV({args:e||B8.create([]).rest(Gk.create()),returns:n||Gk.create(),typeName:Ba.ZodFunction,...BA(o)})}}class s2e extends Sc{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}s2e.create=(t,e)=>new s2e({getter:t,typeName:Ba.ZodLazy,...BA(e)});class pne extends Sc{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return sr(n,{received:n.data,code:lo.invalid_literal,expected:this._def.value}),Zs}return{status:"valid",value:e.data}}get value(){return this._def.value}}pne.create=(t,e)=>new pne({value:t,typeName:Ba.ZodLiteral,...BA(e)});function irt(t,e){return new WM({values:t,typeName:Ba.ZodEnum,...BA(e)})}class WM extends Sc{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return sr(n,{expected:Pl.joinValues(o),received:n.parsedType,code:lo.invalid_type}),Zs}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return sr(n,{received:n.data,code:lo.invalid_enum_value,options:o}),Zs}return Ax(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return WM.create(e,{...this._def,...n})}exclude(e,n=this._def){return WM.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}WM.create=irt;class a2e extends Sc{_parse(e){const n=Pl.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==Sr.string&&o.parsedType!==Sr.number){const i=Pl.objectValues(n);return sr(o,{expected:Pl.joinValues(i),received:o.parsedType,code:lo.invalid_type}),Zs}if(this._cache||(this._cache=new Set(Pl.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=Pl.objectValues(n);return sr(o,{received:o.data,code:lo.invalid_enum_value,options:i}),Zs}return Ax(e.data)}get enum(){return this._def.values}}a2e.create=(t,e)=>new a2e({values:t,typeName:Ba.ZodNativeEnum,...BA(e)});class uV extends Sc{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Sr.promise&&n.common.async===!1)return sr(n,{code:lo.invalid_type,expected:Sr.promise,received:n.parsedType}),Zs;const o=n.parsedType===Sr.promise?n.data:Promise.resolve(n.data);return Ax(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}uV.create=(t,e)=>new uV({type:t,typeName:Ba.ZodPromise,...BA(e)});class _Q extends Sc{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ba.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:s=>{sr(o,s),s.fatal?n.abort():n.dirty()},get path(){return o.path}};if(r.addIssue=r.addIssue.bind(r),i.type==="preprocess"){const s=i.transform(o.data,r);if(o.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Zs;const A=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return A.status==="aborted"?Zs:A.status==="dirty"||n.value==="dirty"?aV(A.value):A});{if(n.value==="aborted")return Zs;const a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?Zs:a.status==="dirty"||n.value==="dirty"?aV(a.value):a}}if(i.type==="refinement"){const s=a=>{const A=i.refinement(a,r);if(o.common.async)return Promise.resolve(A);if(A instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===!1){const a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Zs:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?Zs:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(o.common.async===!1){const s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Hk(s))return Zs;const a=i.transform(s.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>Hk(s)?Promise.resolve(i.transform(s.value,r)).then(a=>({status:n.value,value:a})):Zs);Pl.assertNever(i)}}_Q.create=(t,e,n)=>new _Q({schema:t,typeName:Ba.ZodEffects,effect:e,...BA(n)}),_Q.createWithPreprocess=(t,e,n)=>new _Q({schema:e,effect:{type:"preprocess",transform:t},typeName:Ba.ZodEffects,...BA(n)});class b8 extends Sc{_parse(e){return this._getType(e)===Sr.undefined?Ax(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}b8.create=(t,e)=>new b8({innerType:t,typeName:Ba.ZodOptional,...BA(e)});class jM extends Sc{_parse(e){return this._getType(e)===Sr.null?Ax(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}jM.create=(t,e)=>new jM({innerType:t,typeName:Ba.ZodNullable,...BA(e)});class mne extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===Sr.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}mne.create=(t,e)=>new mne({innerType:t,typeName:Ba.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...BA(e)});class _ne extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return cne(i)?i.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new b5(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new b5(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}_ne.create=(t,e)=>new _ne({innerType:t,typeName:Ba.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...BA(e)});class rrt extends Sc{_parse(e){if(this._getType(e)!==Sr.nan){const o=this._getOrReturnCtx(e);return sr(o,{code:lo.invalid_type,expected:Sr.nan,received:o.parsedType}),Zs}return{status:"valid",value:e.data}}}rrt.create=t=>new rrt({typeName:Ba.ZodNaN,...BA(t)});class srt extends Sc{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class A2e extends Sc{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?Zs:r.status==="dirty"?(n.dirty(),aV(r.value)):this._def.out._parseAsync({data:r.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?Zs:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new A2e({in:e,out:n,typeName:Ba.ZodPipeline})}}class fne extends Sc{_parse(e){const n=this._def.innerType._parse(e),o=i=>(Hk(i)&&(i.value=Object.freeze(i.value)),i);return cne(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}fne.create=(t,e)=>new fne({innerType:t,typeName:Ba.ZodReadonly,...BA(e)});function art(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function P0(t,e={},n){return t?AV.create().superRefine((o,i)=>{const r=t(o);if(r instanceof Promise)return r.then(s=>{if(!s){const a=art(e,o),A=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:A})}});if(!r){const s=art(e,o),a=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:a})}}):AV.create()}var Ba;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ba||(Ba={}));const Z=P9.create,_t=zM.create;JM.create;const je=lne.create;Ok.create;const Art=une.create,rd=AV.create,c2e=Gk.create;mQ.create;const dn=M9.create,Pt=Um.create,xo=gne.create,Iy=i2e.create;dne.create;const fQ=B8.create,Qc=hne.create,IQ=lV.create,$e=pne.create,Kn=WM.create,CQ=uV.create;b8.create,jM.create;const crt=_Q.createWithPreprocess,S5={string:(t=>P9.create({...t,coerce:!0})),number:(t=>zM.create({...t,coerce:!0})),boolean:(t=>lne.create({...t,coerce:!0})),bigint:(t=>JM.create({...t,coerce:!0})),date:(t=>Ok.create({...t,coerce:!0}))},gBn=Zs;var S8=Z().or(_t()).transform(t=>q1(t,"Ω").value),$M=Z().or(_t()).transform(t=>q1(t,"F").value).transform(t=>Number.parseFloat(t.toPrecision(12))),Ine=Z().or(_t()).transform(t=>q1(t,"H").value),O_=Z().or(_t()).transform(t=>q1(t,"V").value),ce=Z().or(_t()).transform(t=>q1(t).value),Cy=Z().or(_t()).transform(t=>q1(t,"Hz").value),lt=ce,H3=Z().or(_t()).transform(t=>q1(t,"A").value),Uk=Z().or(_t()).transform(t=>q1(t).value),dBn=Uk,Ml=Uk,lrt=Z().datetime(),oA=Z().or(_t()).transform(t=>typeof t=="number"?t:t.endsWith("deg")?Number.parseFloat(t.split("deg")[0]):t.endsWith("rad")?Number.parseFloat(t.split("rad")[0])*180/Math.PI:Number.parseFloat(t)),urt=_t().or(Z().endsWith("mAh")).transform(t=>{if(typeof t=="string"){const e=t.replace("mAh",""),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error("Invalid capacity");return n}return t}).describe("Battery capacity in mAh"),ki=Pt({x:lt,y:lt}),hBn=ki,D9=Pt({x:lt,y:lt,z:lt}),pBn=D9,Cne=Pt({width:_t(),height:_t()}),mBn=t=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:t},()=>e[Math.floor(Math.random()*e.length)]).join("")},so=t=>Z().optional().default(()=>`${t}_${mBn(10)}`),Q8=Kn(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),_Bn=Kn(["top_silkscreen","bottom_silkscreen","top_copper","bottom_copper","top_soldermask","bottom_soldermask","top_fabrication_note","bottom_fabrication_note","top_user_note","bottom_user_note","top_courtyard","bottom_courtyard","inner1_copper","inner2_copper","inner3_copper","inner4_copper","inner5_copper","inner6_copper","inner7_copper","inner8_copper","edge_cuts","drill"]),yne=Pt({project_relative_path:Z(),url:Z(),mimetype:Z()}),xne=ki.extend({rotation:oA.optional()}),l2e=Pt({size:ki.optional(),thickness:lt.optional()}),grt=Pt({font:l2e.optional()}),gV=Pt({value:Z(),at:xne.optional(),layer:Z().optional(),uuid:Z().optional(),hide:je().optional(),effects:grt.optional()}),drt=Pt({Reference:gV.optional(),Value:gV.optional(),Datasheet:gV.optional(),Description:gV.optional()}),hrt=Pt({through_hole:je().optional(),smd:je().optional(),exclude_from_pos_files:je().optional(),exclude_from_bom:je().optional()}),prt=Pt({name:Z(),type:Z(),shape:Z().optional(),at:xne.optional(),size:ki.optional(),drill:lt.optional(),layers:dn(Z()).optional(),removeUnusedLayers:je().optional(),uuid:Z().optional()}),mrt=Pt({path:Z(),offset:D9.optional(),scale:D9.optional(),rotate:D9.optional()}),_rt=Pt({footprintName:Z().optional(),version:xo([_t(),Z()]).optional(),generator:Z().optional(),generatorVersion:xo([_t(),Z()]).optional(),layer:Z().optional(),properties:drt.optional(),attributes:hrt.optional(),pads:dn(prt).optional(),embeddedFonts:je().optional(),model:mrt.optional()}),frt=Pt({hide:je().optional()}),Irt=Pt({offset:lt.optional(),hide:je().optional()}),Crt=Pt({font:l2e.optional(),justify:xo([Z(),dn(Z())]).optional(),hide:je().optional()}),yQ=Pt({value:Z(),id:xo([_t(),Z()]).optional(),at:xne.optional(),effects:Crt.optional()}),yrt=Pt({Reference:yQ.optional(),Value:yQ.optional(),Footprint:yQ.optional(),Datasheet:yQ.optional(),Description:yQ.optional(),ki_keywords:yQ.optional(),ki_fp_filters:yQ.optional()}),xrt=Pt({symbolName:Z().optional(),extends:Z().optional(),pinNumbers:frt.optional(),pinNames:Irt.optional(),excludeFromSim:je().optional(),inBom:je().optional(),onBoard:je().optional(),properties:yrt.optional(),embeddedFonts:je().optional()}),Dl=Pt({error_type:Z(),message:Z(),is_fatal:je().optional()}),qM=Kn(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),bu=Pt({type:$e("source_component"),ftype:Z().optional(),source_component_id:Z(),name:Z(),manufacturer_part_number:Z().optional(),supplier_part_numbers:Qc(qM,dn(Z())).optional(),display_value:Z().optional(),display_name:Z().optional(),are_pins_interchangeable:je().optional(),internally_connected_source_port_ids:dn(dn(Z())).optional(),source_group_id:Z().optional(),subcircuit_id:Z().optional()}),u2e=bu.extend({ftype:$e("simple_capacitor"),capacitance:$M,max_voltage_rating:O_.optional(),display_capacitance:Z().optional(),max_decoupling_trace_length:lt.optional()}),g2e=bu.extend({ftype:$e("simple_resistor"),resistance:S8,display_resistance:Z().optional()}),Ene=bu.extend({ftype:$e("simple_diode")}),Ert=bu.extend({ftype:$e("simple_fiducial")}),d2e=Ene.extend({ftype:$e("simple_led"),color:Z().optional(),wavelength:Z().optional()}),Brt=bu.extend({ftype:$e("simple_ground")}),h2e=bu.extend({ftype:$e("simple_chip")}),p2e=bu.extend({ftype:$e("simple_power_source"),voltage:O_}),brt=bu.extend({ftype:$e("simple_current_source"),current:H3,frequency:Cy.optional(),peak_to_peak_current:H3.optional(),wave_shape:Kn(["sine","square","triangle","sawtooth","dc"]).optional().default("dc"),phase:_t().optional(),duty_cycle:_t().min(0).max(1).optional()}),Srt=bu.extend({ftype:$e("simple_fuse"),current_rating_amps:_t().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:_t().describe("Voltage rating in volts, e.g. ±5V would be 5")}),Qrt=bu.extend({ftype:$e("simple_ammeter")}),vrt=Pt({must_be_connected:je().optional(),provides_power:je().optional(),requires_power:je().optional(),provides_ground:je().optional(),requires_ground:je().optional(),provides_voltage:xo([Z(),_t()]).optional(),requires_voltage:xo([Z(),_t()]).optional(),do_not_connect:je().optional(),include_in_board_pinout:je().optional(),can_use_internal_pullup:je().optional(),is_using_internal_pullup:je().optional(),needs_external_pullup:je().optional(),can_use_internal_pulldown:je().optional(),is_using_internal_pulldown:je().optional(),needs_external_pulldown:je().optional(),can_use_open_drain:je().optional(),is_using_open_drain:je().optional(),can_use_push_pull:je().optional(),is_using_push_pull:je().optional(),should_have_decoupling_capacitor:je().optional(),recommended_decoupling_capacitor_capacitance:xo([Z(),_t()]).optional(),is_configured_for_i2c_sda:je().optional(),is_configured_for_i2c_scl:je().optional(),is_configured_for_spi_mosi:je().optional(),is_configured_for_spi_miso:je().optional(),is_configured_for_spi_sck:je().optional(),is_configured_for_spi_cs:je().optional(),is_configured_for_uart_tx:je().optional(),is_configured_for_uart_rx:je().optional(),supports_i2c_sda:je().optional(),supports_i2c_scl:je().optional(),supports_spi_mosi:je().optional(),supports_spi_miso:je().optional(),supports_spi_sck:je().optional(),supports_spi_cs:je().optional(),supports_uart_tx:je().optional(),supports_uart_rx:je().optional()}),m2e=bu.extend({ftype:$e("simple_battery"),capacity:urt}),_2e=bu.extend({ftype:$e("simple_inductor"),inductance:Ine,display_inductance:Z().optional(),max_current_rating:_t().optional()}),f2e=bu.extend({ftype:$e("simple_push_button")}),I2e=bu.extend({ftype:$e("simple_potentiometer"),max_resistance:S8,display_max_resistance:Z().optional()}),wrt=bu.extend({ftype:$e("simple_crystal"),frequency:_t().describe("Frequency in Hz"),load_capacitance:_t().optional().describe("Load capacitance in pF"),pin_variant:Kn(["two_pin","four_pin"]).optional()}),C2e=bu.extend({ftype:$e("simple_pin_header"),pin_count:_t(),gender:Kn(["male","female"]).optional().default("male")}),Prt=["usb_c","m2","jst_sh","jst_gh","jst_zh","jst_ph","jst_xh","jst_vh"],Mrt=bu.extend({ftype:$e("simple_connector"),standard:Kn(Prt).optional(),pin_count:_t().int().positive().optional()}),y2e=bu.extend({ftype:$e("simple_pinout")}),x2e=bu.extend({ftype:$e("simple_resonator"),load_capacitance:$M,equivalent_series_resistance:S8.optional(),frequency:Cy}),E2e=bu.extend({ftype:$e("simple_transistor"),transistor_type:Kn(["npn","pnp"])}),B2e=bu.extend({ftype:$e("simple_test_point"),footprint_variant:Kn(["pad","through_hole"]).optional(),pad_shape:Kn(["rect","circle"]).optional(),pad_diameter:xo([_t(),Z()]).optional(),hole_diameter:xo([_t(),Z()]).optional(),width:xo([_t(),Z()]).optional(),height:xo([_t(),Z()]).optional()}),b2e=bu.extend({ftype:$e("simple_mosfet"),channel_type:Kn(["n","p"]),mosfet_mode:Kn(["enhancement","depletion"])}),S2e=bu.extend({ftype:$e("simple_op_amp")}),Q2e=bu.extend({ftype:$e("simple_switch")}),v2e=Pt({type:$e("source_project_metadata"),name:Z().optional(),software_used_string:Z().optional(),project_url:Z().optional(),source_filesystem_md5_hash:Z().optional(),created_at:lrt.optional()}),Drt=Dl.extend({type:$e("source_missing_property_error"),source_missing_property_error_id:so("source_missing_property_error"),source_component_id:Z(),property_name:Z(),subcircuit_id:Z().optional(),error_type:$e("source_missing_property_error").default("source_missing_property_error")}).describe("The source code is missing a property"),Nrt=Dl.extend({type:$e("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:so("source_failed_to_create_component_error"),error_type:$e("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:Z().optional(),subcircuit_id:Z().optional(),parent_source_component_id:Z().optional(),pcb_center:Pt({x:_t().optional(),y:_t().optional()}).optional(),schematic_center:Pt({x:_t().optional(),y:_t().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),w2e=Dl.extend({type:$e("source_invalid_component_property_error"),source_invalid_component_property_error_id:so("source_invalid_component_property_error"),source_component_id:Z(),property_name:Z(),property_value:c2e().optional(),expected_format:Z().optional(),subcircuit_id:Z().optional(),error_type:$e("source_invalid_component_property_error").default("source_invalid_component_property_error")}).describe("The source component property is invalid"),P2e=Dl.extend({type:$e("source_trace_not_connected_error"),source_trace_not_connected_error_id:so("source_trace_not_connected_error"),error_type:$e("source_trace_not_connected_error").default("source_trace_not_connected_error"),subcircuit_id:Z().optional(),source_group_id:Z().optional(),source_trace_id:Z().optional(),connected_source_port_ids:dn(Z()).optional(),selectors_not_found:dn(Z()).optional()}).describe("Occurs when a source trace selector does not match any ports"),Rrt=Pt({type:$e("source_property_ignored_warning"),source_property_ignored_warning_id:so("source_property_ignored_warning"),source_component_id:Z(),property_name:Z(),subcircuit_id:Z().optional(),error_type:$e("source_property_ignored_warning").default("source_property_ignored_warning"),message:Z()}).describe("The source property was ignored"),M2e=Pt({type:$e("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:so("source_pin_missing_trace_warning"),warning_type:$e("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:Z(),source_component_id:Z(),source_port_id:Z(),subcircuit_id:Z().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),D2e=Pt({type:$e("source_missing_manufacturer_part_number_warning"),source_missing_manufacturer_part_number_warning_id:so("source_missing_manufacturer_part_number_warning"),warning_type:$e("source_missing_manufacturer_part_number_warning").default("source_missing_manufacturer_part_number_warning"),message:Z(),source_component_id:Z(),standard:Z(),subcircuit_id:Z().optional()}).describe("Warning emitted when a standard connector is missing manufacturer part number"),N2e=Pt({type:$e("source_refdes_convention_warning"),source_refdes_convention_warning_id:so("source_refdes_convention_warning"),warning_type:$e("source_refdes_convention_warning").default("source_refdes_convention_warning"),message:Z(),source_component_id:Z(),refdes:Z(),source_component_ftype:Z(),expected_prefixes:dn(Z()),actual_prefix:Z().optional(),subcircuit_id:Z().optional()}).describe("Warning emitted when a source component reference designator does not match the component type convention"),Trt=bu.extend({ftype:$e("simple_voltage_probe")}),krt=bu.extend({ftype:$e("interconnect")}),R2e=Dl.extend({type:$e("source_i2c_misconfigured_error"),source_i2c_misconfigured_error_id:so("source_i2c_misconfigured_error"),error_type:$e("source_i2c_misconfigured_error").default("source_i2c_misconfigured_error"),source_port_ids:dn(Z())}).describe("Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net"),dV=Dl.extend({type:$e("source_component_misconfigured_error"),source_component_misconfigured_error_id:so("source_component_misconfigured_error"),error_type:$e("source_component_misconfigured_error").default("source_component_misconfigured_error"),source_component_ids:dn(Z()),source_port_ids:dn(Z()).optional()}).describe("Error emitted when one or more source components have an invalid or conflicting configuration"),Frt=bu.extend({ftype:$e("simple_voltage_source"),voltage:O_,frequency:Cy.optional(),peak_to_peak_voltage:O_.optional(),wave_shape:Kn(["sinewave","square","triangle","sawtooth"]).optional(),phase:oA.optional(),duty_cycle:_t().optional().describe("Duty cycle as a fraction (0 to 1)"),pulse_delay:Ml.optional(),rise_time:Ml.optional(),fall_time:Ml.optional(),pulse_width:Ml.optional(),period:Ml.optional()}),Lrt=xo([g2e,u2e,Ene,Ert,d2e,Brt,h2e,p2e,brt,Qrt,m2e,_2e,f2e,I2e,wrt,C2e,Mrt,y2e,x2e,Q2e,E2e,B2e,b2e,S2e,Srt,Trt,krt,Frt,v2e,Drt,w2e,Nrt,P2e,Rrt,M2e,D2e,N2e,R2e,dV]),Hrt=Pt({type:$e("source_port"),pin_number:_t().optional(),port_hints:dn(Z()).optional(),name:Z(),source_port_id:Z(),source_component_id:Z().optional(),source_group_id:Z().optional(),most_frequently_referenced_by_name:Z().optional(),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional()}).merge(vrt),Ort=Pt({type:$e("source_component_internal_connection"),source_component_internal_connection_id:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}),Grt=Pt({type:$e("source_trace"),source_trace_id:Z(),connected_source_port_ids:dn(Z()),connected_source_net_ids:dn(Z()),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),max_length:_t().optional(),max_via_count:_t().int().nonnegative().optional(),name:Z().optional(),min_trace_thickness:_t().optional(),display_name:Z().optional()}),Yrt=Pt({type:$e("source_group"),source_group_id:Z(),subcircuit_id:Z().optional(),parent_subcircuit_id:Z().optional(),parent_source_group_id:Z().optional(),is_subcircuit:je().optional(),show_as_schematic_box:je().optional(),name:Z().optional(),was_automatically_named:je().optional()}),Urt=Pt({type:$e("source_net"),source_net_id:Z(),name:Z(),member_source_group_ids:dn(Z()),is_power:je().optional(),is_ground:je().optional(),is_digital_signal:je().optional(),is_analog_signal:je().optional(),is_positive_voltage_source:je().optional(),trace_width:_t().optional(),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional()}),Krt=Pt({type:$e("source_board"),source_board_id:Z(),source_group_id:Z(),title:Z().optional()}).describe("Defines a board in the source domain"),Vrt=Dl.extend({type:$e("source_ambiguous_port_reference"),source_ambiguous_port_reference_id:so("source_ambiguous_port_reference"),error_type:$e("source_ambiguous_port_reference").default("source_ambiguous_port_reference"),source_port_id:Z().optional(),source_component_id:Z().optional()}).describe("Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous"),zrt=Pt({type:$e("source_pcb_ground_plane"),source_pcb_ground_plane_id:Z(),source_group_id:Z(),source_net_id:Z(),subcircuit_id:Z().optional()}).describe("Defines a ground plane in the source domain"),Kk=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6","inner7","inner8"],T2e=Kn(Kk),Pr=T2e.or(Pt({name:T2e})).transform(t=>typeof t=="string"?t:t.name),Km=Kn(["top","bottom"]),Jrt=Pt({type:$e("source_manually_placed_via"),source_manually_placed_via_id:Z(),source_group_id:Z(),source_net_id:Z().min(1).optional(),subcircuit_id:Z().optional(),source_trace_id:Z().optional()}).describe("Defines a via that is manually placed in the source domain"),Wrt=Pt({type:$e("source_unnamed_trace_warning"),source_unnamed_trace_warning_id:so("source_unnamed_trace_warning"),warning_type:$e("source_unnamed_trace_warning").default("source_unnamed_trace_warning"),message:Z(),source_trace_id:Z(),subcircuit_id:Z().optional()}).describe("Warning emitted when a source trace is missing a name"),jrt=Pt({type:$e("source_no_power_pin_defined_warning"),source_no_power_pin_defined_warning_id:so("source_no_power_pin_defined_warning"),warning_type:$e("source_no_power_pin_defined_warning").default("source_no_power_pin_defined_warning"),message:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Warning emitted when a chip has no source ports with requires_power=true"),$rt=Pt({type:$e("source_no_ground_pin_defined_warning"),source_no_ground_pin_defined_warning_id:so("source_no_ground_pin_defined_warning"),warning_type:$e("source_no_ground_pin_defined_warning").default("source_no_ground_pin_defined_warning"),message:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Warning emitted when a chip has no source ports marked as ground pins"),qrt=Pt({type:$e("source_component_pins_underspecified_warning"),source_component_pins_underspecified_warning_id:so("source_component_pins_underspecified_warning"),warning_type:$e("source_component_pins_underspecified_warning").default("source_component_pins_underspecified_warning"),message:Z(),source_component_id:Z(),source_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Warning emitted when all ports on a source component are underspecified"),Xrt=Dl.extend({type:$e("source_pin_must_be_connected_error"),source_pin_must_be_connected_error_id:so("source_pin_must_be_connected_error"),error_type:$e("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),source_component_id:Z(),source_port_id:Z(),subcircuit_id:Z().optional()}).describe("Error emitted when a pin with mustBeConnected attribute is not connected to any trace"),Zrt=Dl.extend({type:$e("unknown_error_finding_part"),unknown_error_finding_part_id:so("unknown_error_finding_part"),error_type:$e("unknown_error_finding_part").default("unknown_error_finding_part"),source_component_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Error emitted when an unexpected error occurs while finding a part"),hV=Pt({type:$e("source_part_not_found_warning"),source_part_not_found_warning_id:so("source_part_not_found_warning"),warning_type:$e("source_part_not_found_warning").default("source_part_not_found_warning"),message:Z(),source_component_id:Z().optional(),subcircuit_id:Z().optional(),supplier_name:qM.optional(),manufacturer_part_number:Z().optional(),supplier_part_number:Z().optional(),part_name:Z().optional()}).describe("Warning emitted when a requested part can not be found"),est=Pt({type:$e("source_confusing_net_name_warning"),source_confusing_net_name_warning_id:so("source_confusing_net_name_warning"),warning_type:$e("source_confusing_net_name_warning").default("source_confusing_net_name_warning"),message:Z(),source_net_ids:dn(Z()).min(2),net_name:Z(),subcircuit_id:Z().optional()}).describe("Warning emitted when electrically disconnected source nets share a name"),tst=Pt({type:$e("schematic_box"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),width:lt,height:lt,is_dashed:je().default(!1),x:lt,y:lt,subcircuit_id:Z().optional()}).describe("Draws a box on the schematic"),nst=Pt({type:$e("schematic_path"),schematic_path_id:so("schematic_path"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),fill_color:Z().optional(),is_filled:je().optional(),is_dashed:je().default(!1),stroke_width:lt.nullable().optional(),stroke_color:Z().optional(),dash_length:lt.optional(),dash_gap:lt.optional(),points:dn(ki),subcircuit_id:Z().optional()}),ost=Qc(Pt({left_margin:ce.optional(),right_margin:ce.optional(),top_margin:ce.optional(),bottom_margin:ce.optional()})),ist=Pt({left_size:_t(),right_size:_t(),top_size:_t().optional(),bottom_size:_t().optional()}),rst=Pt({left_side:Pt({pins:dn(_t()),direction:Kn(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:Pt({pins:dn(_t()),direction:Kn(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:Pt({pins:dn(_t()),direction:Kn(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:Pt({pins:dn(_t()),direction:Kn(["left-to-right","right-to-left"]).optional()}).optional()}),sst=xo([ist,rst]),ast=Pt({type:$e("schematic_component"),size:Cne,center:ki,source_component_id:Z().optional(),schematic_component_id:Z(),schematic_sheet_id:Z().optional(),schematic_symbol_id:Z().optional(),pin_spacing:ce.optional(),pin_styles:ost.optional(),box_width:ce.optional(),symbol_name:Z().optional(),port_arrangement:sst.optional(),port_labels:Qc(Z()).optional(),symbol_display_value:Z().optional(),subcircuit_id:Z().optional(),schematic_group_id:Z().optional(),is_schematic_group:je().optional(),source_group_id:Z().optional(),is_box_with_pins:je().optional().default(!0)}),fBn=Pt({kicad_symbol:xrt.optional()}).catchall(c2e()),Ast=Pt({type:$e("schematic_symbol"),schematic_symbol_id:Z(),name:Z().optional(),metadata:fBn.optional()}).describe("Defines a named schematic symbol that can be referenced by components."),cst=Pt({type:$e("schematic_line"),schematic_line_id:so("schematic_line"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),x1:lt,y1:lt,x2:lt,y2:lt,stroke_width:lt.nullable().optional(),color:Z().default("#000000"),is_dashed:je().default(!1),dash_length:lt.optional(),dash_gap:lt.optional(),subcircuit_id:Z().optional()}).describe("Draws a styled line on the schematic"),lst=Pt({type:$e("schematic_rect"),schematic_rect_id:so("schematic_rect"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),center:ki,width:lt,height:lt,rotation:oA.default(0),stroke_width:lt.nullable().optional(),color:Z().default("#000000"),is_filled:je().default(!1),fill_color:Z().optional(),is_dashed:je().default(!1),subcircuit_id:Z().optional()}).describe("Draws a styled rectangle on the schematic"),ust=Pt({type:$e("schematic_circle"),schematic_circle_id:so("schematic_circle"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),center:ki,radius:lt,stroke_width:lt.nullable().optional(),color:Z().default("#000000"),is_filled:je().default(!1),fill_color:Z().optional(),is_dashed:je().default(!1),subcircuit_id:Z().optional()}).describe("Draws a styled circle on the schematic"),gst=Pt({type:$e("schematic_arc"),schematic_arc_id:so("schematic_arc"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),center:ki,radius:lt,start_angle_degrees:oA,end_angle_degrees:oA,direction:Kn(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:lt.nullable().optional(),color:Z().default("#000000"),is_dashed:je().default(!1),subcircuit_id:Z().optional()}).describe("Draws a styled arc on the schematic"),dst=Pt({type:$e("schematic_trace"),schematic_trace_id:Z(),schematic_sheet_id:Z().optional(),source_trace_id:Z().optional(),junctions:dn(Pt({x:_t(),y:_t()})),edges:dn(Pt({from:Pt({x:_t(),y:_t()}),to:Pt({x:_t(),y:_t()}),is_crossing:je().optional(),from_schematic_port_id:Z().optional(),to_schematic_port_id:Z().optional()})),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional()}),IBn=Kn(["center","left","right","top","bottom"]),k2e=Pt({text:Z(),is_overlined:je().optional()}),hst=Pt({type:$e("schematic_text"),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),schematic_symbol_id:Z().optional(),schematic_text_id:Z(),source_trace_id:Z().optional(),text:Z(),text_parts:dn(k2e).min(1).optional(),display_superscript:Z().optional(),font_size:_t().default(.18),position:Pt({x:lt,y:lt}),rotation:_t().default(0),anchor:xo([IBn.describe("legacy"),Q8]).default("center"),color:Z().default("#000000"),subcircuit_id:Z().optional()}),pst=Pt({type:$e("schematic_port"),schematic_port_id:Z(),source_port_id:Z(),schematic_sheet_id:Z().optional(),schematic_component_id:Z().optional(),center:ki,facing_direction:Kn(["up","down","left","right"]).optional(),distance_from_component_edge:_t().optional(),side_of_component:Kn(["top","bottom","left","right"]).optional(),true_ccw_index:_t().optional(),pin_number:_t().optional(),display_pin_label:Z().optional(),display_pin_label_text_parts:dn(k2e).min(1).optional(),display_pin_label_font_size:_t().positive().finite().optional(),subcircuit_id:Z().optional(),is_connected:je().optional(),is_internal_circuit_port:je().optional(),is_overlapping_internal_circuit_port:je().optional(),has_input_arrow:je().optional(),has_output_arrow:je().optional(),is_drawn_with_inversion_circle:je().optional()}).describe("Defines a port on a schematic component"),mst=Pt({type:$e("schematic_net_label"),schematic_net_label_id:so("schematic_net_label"),schematic_sheet_id:Z().optional(),schematic_trace_id:Z().optional(),source_trace_id:Z().optional(),source_net_id:Z(),center:ki,anchor_position:ki.optional(),anchor_side:Kn(["top","bottom","left","right"]),text:Z(),display_superscript:Z().optional(),symbol_name:Z().optional(),is_movable:je().optional(),subcircuit_id:Z().optional()}),_st=Dl.extend({type:$e("schematic_error"),schematic_error_id:Z(),error_type:$e("schematic_port_not_found").default("schematic_port_not_found"),subcircuit_id:Z().optional()}).describe("Defines a schematic error on the schematic"),fst=Dl.extend({type:$e("schematic_layout_error"),schematic_layout_error_id:so("schematic_layout_error"),error_type:$e("schematic_layout_error").default("schematic_layout_error"),source_group_id:Z(),schematic_group_id:Z(),subcircuit_id:Z().optional()}).describe("Error emitted when schematic layout fails for a group"),Bne=Pt({type:$e("schematic_debug_object"),label:Z().optional(),subcircuit_id:Z().optional()}),Ist=Bne.extend({shape:$e("rect"),center:ki,size:Cne}),Cst=Bne.extend({shape:$e("line"),start:ki,end:ki}),yst=Bne.extend({shape:$e("point"),center:ki}),xst=Iy("shape",[Ist,Cst,yst]),Est=Pt({type:$e("schematic_voltage_probe"),schematic_voltage_probe_id:Z(),schematic_sheet_id:Z().optional(),source_component_id:Z().optional(),name:Z().optional(),position:ki,schematic_trace_id:Z(),voltage:O_.optional(),subcircuit_id:Z().optional(),color:Z().optional(),label_alignment:Q8.optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),F2e=Pt({type:$e("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:so("schematic_manual_edit_conflict_warning"),warning_type:$e("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:Z(),schematic_component_id:Z(),schematic_group_id:Z().optional(),subcircuit_id:Z().optional(),source_component_id:Z()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),Bst=Pt({type:$e("schematic_component_overlap_warning"),schematic_component_overlap_warning_id:so("schematic_component_overlap_warning"),warning_type:$e("schematic_component_overlap_warning").default("schematic_component_overlap_warning"),message:Z(),schematic_component_ids:fQ([Z(),Z()]),schematic_sheet_id:Z().optional()}).describe("Warning emitted when the rendered bounds of two schematic components overlap"),bst=Pt({type:$e("schematic_component_styling_warning"),schematic_component_styling_warning_id:so("schematic_component_styling_warning"),warning_type:$e("schematic_component_styling_warning").default("schematic_component_styling_warning"),message:Z(),schematic_component_id:Z(),styling_issue_type:Z(),schematic_port_ids:dn(Z()).optional(),source_component_id:Z().optional(),schematic_sheet_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Warning emitted when a schematic component has a visual styling issue"),Sst=Pt({type:$e("schematic_element_outside_sheet_warning"),schematic_element_outside_sheet_warning_id:so("schematic_element_outside_sheet_warning"),warning_type:$e("schematic_element_outside_sheet_warning").default("schematic_element_outside_sheet_warning"),message:Z(),schematic_sheet_id:Z(),schematic_element_type:Kn(["schematic_component","schematic_net_label","schematic_trace"]),schematic_element_id:Z()}).describe("Warning emitted when a schematic component, net label, or trace extends outside its schematic sheet"),Qst=lt.pipe(_t().positive().finite()),vst=Pt({type:$e("schematic_graphic"),schematic_graphic_id:so("schematic_graphic"),schematic_sheet_id:Z().optional(),asset:yne.optional(),svg_content:Z().optional(),width:Qst.optional(),height:Qst.optional()}).describe("References a graphic asset or inline SVG content with optional centered layout bounds on a schematic sheet").superRefine(({asset:t,svg_content:e},n)=>{t===void 0&&e===void 0&&n.addIssue({code:lo.custom,message:"At least one of asset or svg_content is required"})}),wst=Pt({type:$e("schematic_group"),schematic_group_id:so("schematic_group"),schematic_sheet_id:Z().optional(),source_group_id:Z(),is_subcircuit:je().optional(),subcircuit_id:Z().optional(),width:ce,height:ce,center:ki,schematic_component_ids:dn(Z()),show_as_schematic_box:je().optional(),name:Z().optional(),description:Z().optional()}).describe("Defines a group of components on the schematic"),Pst=Pt({type:$e("schematic_table"),schematic_table_id:so("schematic_table"),schematic_sheet_id:Z().optional(),anchor_position:ki,column_widths:dn(lt),row_heights:dn(lt),cell_padding:lt.optional(),border_width:lt.optional(),subcircuit_id:Z().optional(),schematic_component_id:Z().optional(),anchor:Q8.optional()}).describe("Defines a table on the schematic"),Mst=Pt({type:$e("schematic_table_cell"),schematic_table_cell_id:so("schematic_table_cell"),schematic_sheet_id:Z().optional(),schematic_table_id:Z(),start_row_index:_t(),end_row_index:_t(),start_column_index:_t(),end_column_index:_t(),text:Z().optional(),center:ki,width:lt,height:lt,horizontal_align:Kn(["left","center","right"]).optional(),vertical_align:Kn(["top","middle","bottom"]).optional(),font_size:lt.optional(),subcircuit_id:Z().optional()}).describe("Defines a cell within a schematic_table"),L2e=Kn(["a4","ansi_b"]),Dst=Pt({type:$e("schematic_sheet"),schematic_sheet_id:so("schematic_sheet"),name:Z().optional(),sheet_index:_t().optional(),sheet_size:L2e.optional(),sheet_width:_t().positive().optional(),sheet_height:_t().positive().optional(),subcircuit_id:Z().optional(),outline_color:Z().optional()}).describe("Defines a schematic sheet or page that components can be placed on"),Nst=Pt({type:$e("schematic_missing_sheet_warning"),schematic_missing_sheet_warning_id:so("schematic_missing_sheet_warning"),warning_type:$e("schematic_missing_sheet_warning").default("schematic_missing_sheet_warning"),message:Z()}).describe("Circuit-wide warning emitted when a schematic has no schematic sheet. Display as a banner without attaching it to a component or drawing a target outline or leader line."),Rst=Pt({x:lt,y:lt,bulge:_t().optional()}),H2e=Pt({vertices:dn(Rst)}),O2e=Pt({outer_ring:H2e,inner_rings:dn(H2e).default([])}),G2e={from_left:"from_left",from_right:"from_right",from_top:"from_top",from_bottom:"from_bottom",from_above:"from_above",from_below:"from_below",from_x_neg:"from_left",from_x_pos:"from_right",from_y_pos:"from_top",from_y_neg:"from_bottom",from_z_pos:"from_above",from_z_neg:"from_below",from_front:"from_top",from_back:"from_bottom"},CBn={from_left:{x:-1,y:0,z:0},from_right:{x:1,y:0,z:0},from_top:{x:0,y:1,z:0},from_bottom:{x:0,y:-1,z:0},from_above:{x:0,y:0,z:1},from_below:{x:0,y:0,z:-1}},Tst=Kn(["from_left","from_right","from_top","from_bottom","from_above","from_below","from_x_neg","from_x_pos","from_y_pos","from_y_neg","from_z_pos","from_z_neg","from_front","from_back"]).transform(t=>G2e[t]).describe('The side exposing the receptacle where the cable or mating part is attached, following the 2D PCB diagram convention, not a 3D viewport frame. In project coordinate space, "from_top" is +Y, "from_bottom" -Y, "from_left" -X, "from_right" +X, "from_above" +Z and "from_below" -Z. A receptacle on the +Y edge is "from_top" even though the plug moves in -Y as it seats. Cartesian spellings such as "from_y_pos" are accepted and normalized to the named values, as are the deprecated "from_front" (now "from_top") and "from_back" (now "from_bottom").'),pV=Kn(["leftside_top","leftside_bottom","rightside_top","rightside_bottom","topside_left","topside_right","bottomside_left","bottomside_right"]),yBn=[["leftside_top","bottomside_left","rightside_bottom","topside_right"],["leftside_bottom","bottomside_right","rightside_top","topside_left"]],xBn=(t,e)=>{for(const n of yBn){const o=n.indexOf(t),i=n.indexOf(e);if(o!==-1&&i!==-1)return(i-o+n.length)%n.length*90}return null},kst=Pt({x:lt,y:lt,via:je().optional(),via_to_layer:Pr.optional()}),EBn=dn(kst),N9=Pt({x:lt,y:lt,via:je().optional(),to_layer:Pr.optional(),trace_width:lt.optional()}),Fst=Pt({min_trace_width:ce.optional(),min_board_edge_clearance:ce.optional(),min_via_hole_edge_to_via_hole_edge_clearance:ce.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:ce.optional(),min_trace_to_pad_edge_clearance:ce.optional(),min_pad_edge_to_pad_edge_clearance:ce.optional(),min_same_net_trace_edge_to_trace_edge_clearance:ce.optional(),min_different_net_trace_edge_to_trace_edge_clearance:ce.optional(),min_via_edge_to_pad_edge_clearance:ce.optional(),min_via_hole_diameter:ce.optional(),min_via_pad_diameter:ce.optional()}),Lst=Pt({type:$e("pcb_component"),pcb_component_id:so("pcb_component"),source_component_id:Z(),center:ki,layer:Pr,rotation:oA,display_offset_x:Z().optional().describe("How to display the x offset for this part, usually corresponding with how the user specified it"),display_offset_y:Z().optional().describe("How to display the y offset for this part, usually corresponding with how the user specified it"),width:ce,height:ce,do_not_place:je().optional(),is_allowed_to_be_off_board:je().optional(),subcircuit_id:Z().optional(),pcb_group_id:Z().optional(),position_mode:Kn(["packed","relative_to_group_anchor","relative_to_another_component","none"]).optional(),anchor_position:ki.optional(),anchor_alignment:Q8.optional(),positioned_relative_to_pcb_group_id:Z().optional(),positioned_relative_to_pcb_board_id:Z().optional(),cable_insertion_center:ki.optional(),insertion_direction:Tst.optional(),pin1_location:pV.optional().describe("Location of pin 1 on the unrotated, top-view component footprint"),supplier_pin1_location_map:Qc(qM,pV).optional().describe("Pin 1 location for each supplier's unrotated, top-view footprint"),metadata:Pt({kicad_footprint:_rt.optional()}).optional(),obstructs_within_bounds:je().default(!0).describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath")}).describe("Defines a component on the PCB"),bne=Pt({type:$e("pcb_debug_object"),pcb_debug_object_id:so("pcb_debug_object"),label:Z().optional(),subcircuit_id:Z().optional()}),Hst=bne.extend({shape:$e("rect"),center:ki,size:Cne}),Ost=bne.extend({shape:$e("line"),start:ki,end:ki}),Gst=bne.extend({shape:$e("point"),center:ki}),Yst=Iy("shape",[Hst,Ost,Gst]),Ust=Pt({type:$e("pcb_hole"),pcb_hole_id:so("pcb_hole"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e("circle"),hole_diameter:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),BBn=Ust.describe("Defines a circular hole on the PCB"),Kst=Pt({type:$e("pcb_hole"),pcb_hole_id:so("pcb_hole"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e("rect"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),bBn=Kst.describe("Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."),Vst=Pt({type:$e("pcb_hole"),pcb_hole_id:so("pcb_hole"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:Kn(["circle","square"]),hole_diameter:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),SBn=Vst.describe("Defines a circular or square hole on the PCB"),zst=Pt({type:$e("pcb_hole"),pcb_hole_id:so("pcb_hole"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e("oval"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),QBn=zst.describe("Defines an oval hole on the PCB"),Jst=Pt({type:$e("pcb_hole"),pcb_hole_id:so("pcb_hole"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e("pill"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),vBn=Jst.describe("Defines a pill-shaped hole on the PCB"),Wst=Pt({type:$e("pcb_hole"),pcb_hole_id:so("pcb_hole"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_component_id:Z().optional(),hole_shape:$e("rotated_pill"),hole_width:_t(),hole_height:_t(),x:lt,y:lt,ccw_rotation:oA,is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional()}),wBn=Wst.describe("Defines a rotated pill-shaped hole on the PCB"),jst=Vst.or(zst).or(Jst).or(Wst).or(Ust).or(Kst),PBn=Pt({type:$e("pcb_plated_hole"),shape:$e("circle"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),outer_diameter:_t(),hole_diameter:_t(),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so("pcb_plated_hole"),soldermask_margin:_t().optional()}),MBn=Pt({type:$e("pcb_plated_hole"),shape:Kn(["oval","pill"]),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),outer_width:_t(),outer_height:_t(),hole_width:_t(),hole_height:_t(),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,ccw_rotation:oA,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so("pcb_plated_hole"),soldermask_margin:_t().optional()}),DBn=Pt({type:$e("pcb_plated_hole"),shape:$e("circular_hole_with_rect_pad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:$e("circle"),pad_shape:$e("rect"),hole_diameter:_t(),rect_pad_width:_t(),rect_pad_height:_t(),rect_border_radius:_t().optional(),hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so("pcb_plated_hole"),soldermask_margin:_t().optional(),rect_ccw_rotation:oA.optional()}),NBn=Pt({type:$e("pcb_plated_hole"),shape:$e("pill_hole_with_rect_pad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:$e("pill"),pad_shape:$e("rect"),hole_width:_t(),hole_height:_t(),rect_pad_width:_t(),rect_pad_height:_t(),rect_border_radius:_t().optional(),hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so("pcb_plated_hole"),soldermask_margin:_t().optional()}),RBn=Pt({type:$e("pcb_plated_hole"),shape:$e("rotated_pill_hole_with_rect_pad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:$e("rotated_pill"),pad_shape:$e("rect"),hole_width:_t(),hole_height:_t(),hole_ccw_rotation:oA,rect_pad_width:_t(),rect_pad_height:_t(),rect_border_radius:_t().optional(),rect_ccw_rotation:oA,hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so("pcb_plated_hole"),soldermask_margin:_t().optional()}),TBn=Pt({type:$e("pcb_plated_hole"),shape:$e("hole_with_polygon_pad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),hole_shape:Kn(["circle","oval","pill","rotated_pill"]),hole_diameter:_t().optional(),hole_width:_t().optional(),hole_height:_t().optional(),pad_outline:dn(Pt({x:lt,y:lt})).min(3),hole_offset_x:lt.default(0),hole_offset_y:lt.default(0),is_covered_with_solder_mask:je().optional(),x:lt,y:lt,layers:dn(Pr),port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),pcb_plated_hole_id:so("pcb_plated_hole"),soldermask_margin:_t().optional(),ccw_rotation:oA.optional()}),$st=xo([PBn,MBn,DBn,NBn,RBn,TBn]),qst=Pt({type:$e("pcb_port"),pcb_port_id:so("pcb_port"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),source_port_id:Z(),pcb_component_id:Z().optional(),x:lt,y:lt,layers:dn(Pr),is_board_pinout:je().optional()}).describe("Defines a port on the PCB"),kBn=Pt({type:$e("pcb_smtpad"),shape:$e("circle"),pcb_smtpad_id:so("pcb_smtpad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,radius:_t(),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),FBn=Pt({type:$e("pcb_smtpad"),shape:$e("rect"),pcb_smtpad_id:so("pcb_smtpad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),rect_border_radius:_t().optional(),corner_radius:_t().optional(),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),soldermask_margin_left:_t().optional(),soldermask_margin_top:_t().optional(),soldermask_margin_right:_t().optional(),soldermask_margin_bottom:_t().optional(),solderpaste_margin:_t().optional()}),LBn=Pt({type:$e("pcb_smtpad"),shape:$e("rotated_rect"),pcb_smtpad_id:so("pcb_smtpad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),rect_border_radius:_t().optional(),corner_radius:_t().optional(),ccw_rotation:oA,layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),soldermask_margin_left:_t().optional(),soldermask_margin_top:_t().optional(),soldermask_margin_right:_t().optional(),soldermask_margin_bottom:_t().optional(),solderpaste_margin:_t().optional()}),Xst=Pt({type:$e("pcb_smtpad"),shape:$e("pill"),pcb_smtpad_id:so("pcb_smtpad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),HBn=Pt({type:$e("pcb_smtpad"),shape:$e("rotated_pill"),pcb_smtpad_id:so("pcb_smtpad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),ccw_rotation:oA,layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),OBn=Pt({type:$e("pcb_smtpad"),shape:$e("polygon"),pcb_smtpad_id:so("pcb_smtpad"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),points:dn(ki),layer:Pr,port_hints:dn(Z()).optional(),pcb_component_id:Z().optional(),pcb_port_id:Z().optional(),is_covered_with_solder_mask:je().optional(),soldermask_margin:_t().optional(),solderpaste_margin:_t().optional()}),Zst=Iy("shape",[kBn,FBn,LBn,HBn,Xst,OBn]).describe("Defines an SMT pad on the PCB"),GBn=Pt({type:$e("pcb_solder_paste"),shape:$e("circle"),pcb_solder_paste_id:so("pcb_solder_paste"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,radius:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),YBn=Pt({type:$e("pcb_solder_paste"),shape:$e("rect"),pcb_solder_paste_id:so("pcb_solder_paste"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),UBn=Pt({type:$e("pcb_solder_paste"),shape:$e("pill"),pcb_solder_paste_id:so("pcb_solder_paste"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),KBn=Pt({type:$e("pcb_solder_paste"),shape:$e("rotated_rect"),pcb_solder_paste_id:so("pcb_solder_paste"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),ccw_rotation:lt,layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),VBn=Pt({type:$e("pcb_solder_paste"),shape:$e("rotated_pill"),pcb_solder_paste_id:so("pcb_solder_paste"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),radius:_t(),ccw_rotation:oA,layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),zBn=Pt({type:$e("pcb_solder_paste"),shape:$e("oval"),pcb_solder_paste_id:so("pcb_solder_paste"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),x:lt,y:lt,width:_t(),height:_t(),layer:Pr,pcb_component_id:Z().optional(),pcb_smtpad_id:Z().optional()}),eat=xo([GBn,YBn,UBn,KBn,VBn,zBn]).describe("Defines solderpaste on the PCB"),tat=Pt({type:$e("pcb_text"),pcb_text_id:so("pcb_text"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),text:Z(),center:ki,layer:Pr,width:ce,height:ce,lines:_t(),align:Kn(["bottom-left"])}).describe("Defines text on the PCB"),nat=Pt({route_type:$e("wire"),x:lt,y:lt,width:lt,copper_pour_id:Z().optional(),is_inside_copper_pour:je().optional(),start_pcb_port_id:Z().optional(),end_pcb_port_id:Z().optional(),layer:Pr}),oat=Pt({route_type:$e("via"),x:lt,y:lt,copper_pour_id:Z().optional(),is_inside_copper_pour:je().optional(),hole_diameter:lt.optional(),outer_diameter:lt.optional(),from_layer:Pr,to_layer:Pr}),iat=Pt({route_type:$e("through_pad"),start:ki,end:ki,width:lt,start_layer:Pr,end_layer:Pr,pcb_smtpad_id:Z().optional(),pcb_plated_hole_id:Z().optional()}),Y2e=xo([nat,oat,iat]),rat=Pt({type:$e("pcb_trace"),source_trace_id:Z().optional(),pcb_component_id:Z().optional(),pcb_trace_id:so("pcb_trace"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),route_thickness_mode:Kn(["constant","interpolated"]).default("constant").optional(),route_order_index:_t().optional(),should_round_corners:je().optional(),trace_length:_t().optional(),highlight_color:Z().optional(),route:dn(Y2e)}).describe("Defines a trace on the PCB"),sat=Pt({type:$e("pcb_trace_warning"),pcb_trace_warning_id:so("pcb_trace_warning"),warning_type:$e("pcb_trace_warning").default("pcb_trace_warning"),message:Z(),center:ki.optional(),pcb_trace_id:Z(),source_trace_id:Z(),pcb_component_ids:dn(Z()),pcb_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Defines a trace warning on the PCB"),aat=Pt({type:$e("pcb_trace_too_long_warning"),pcb_trace_too_long_warning_id:so("pcb_trace_too_long_warning"),warning_type:$e("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),message:Z(),pcb_trace_id:Z(),source_net_id:Z().optional(),source_trace_id:Z().optional(),actual_trace_length:lt,maximum_trace_length:lt,subcircuit_id:Z().optional()}).describe("Warning emitted when a PCB trace is longer than its maximum allowed length"),Aat=Pt({type:$e("pcb_trace_too_many_vias_warning"),pcb_trace_too_many_vias_warning_id:so("pcb_trace_too_many_vias_warning"),warning_type:$e("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),message:Z(),pcb_trace_id:Z(),source_net_id:Z().optional(),source_trace_id:Z().optional(),actual_via_count:_t().int().nonnegative(),maximum_via_count:_t().int().nonnegative(),subcircuit_id:Z().optional()}).describe("Warning emitted when a PCB trace has more vias than its maximum allowed count"),cat=Dl.extend({type:$e("pcb_trace_error"),pcb_trace_error_id:so("pcb_trace_error"),error_type:$e("pcb_trace_error").default("pcb_trace_error"),center:ki.optional(),pcb_trace_id:Z(),source_trace_id:Z(),pcb_component_ids:dn(Z()),pcb_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Defines a trace error on the PCB"),lat=Dl.extend({type:$e("pcb_trace_missing_error"),pcb_trace_missing_error_id:so("pcb_trace_missing_error"),error_type:$e("pcb_trace_missing_error").default("pcb_trace_missing_error"),center:ki.optional(),source_trace_id:Z(),pcb_component_ids:dn(Z()),pcb_port_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),uat=Dl.extend({type:$e("pcb_port_not_matched_error"),pcb_error_id:so("pcb_error"),error_type:$e("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),pcb_component_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),gat=Dl.extend({type:$e("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:so("pcb_port_not_connected_error"),error_type:$e("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),pcb_port_ids:dn(Z()),pcb_component_ids:dn(Z()),subcircuit_id:Z().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),dat=Pt({type:$e("pcb_net"),pcb_net_id:so("pcb_net"),source_net_id:Z().optional(),highlight_color:Z().optional()}).describe("Defines a net on the PCB"),Sne=Pt({type:$e("pcb_via"),pcb_via_id:so("pcb_via"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),x:lt,y:lt,outer_diameter:lt.default("0.6mm"),hole_diameter:lt.default("0.25mm"),from_layer:Pr.optional(),to_layer:Pr.optional(),layers:dn(Pr),pcb_trace_id:Z().optional(),source_trace_id:Z().optional(),source_net_id:Z().min(1).optional(),net_is_assignable:je().optional(),net_assigned:je().optional(),is_tented:je().optional(),tented_on_top:je().optional(),tented_on_bottom:je().optional()}).transform(({is_tented:t,...e})=>(t!==void 0&&(e.tented_on_top??=t,e.tented_on_bottom??=t),e)).describe("Defines a via on the PCB"),hat=Pt({type:$e("pcb_board"),pcb_board_id:so("pcb_board"),pcb_panel_id:Z().optional(),carrier_pcb_board_id:Z().optional(),is_subcircuit:je().optional(),subcircuit_id:Z().optional(),is_mounted_to_carrier_board:je().optional(),is_via_in_pad_allowed:je().optional(),width:ce.optional(),height:ce.optional(),center:ki,display_offset_x:Z().optional().describe("How to display the x offset for this board, usually corresponding with how the user specified it"),display_offset_y:Z().optional().describe("How to display the y offset for this board, usually corresponding with how the user specified it"),thickness:ce.optional().default(1.4),num_layers:_t().optional().default(4),allow_blind_and_buried_vias:je().optional().describe("Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."),outline:dn(ki).optional(),shape:Kn(["rect","polygon"]).optional(),material:Kn(["fr4","fr1"]).default("fr4"),solder_mask_color:Z().optional(),silkscreen_color:Z().optional(),anchor_position:ki.optional(),anchor_alignment:Q8.optional(),position_mode:Kn(["relative_to_panel_anchor","none"]).optional()}).merge(Fst).describe("Defines the board outline of the PCB"),pat=Pt({type:$e("pcb_panel"),pcb_panel_id:so("pcb_panel"),width:ce,height:ce,center:ki,thickness:ce.optional().default(1.4),covered_with_solder_mask:je().optional().default(!0)}).describe("Defines a PCB panel that can contain multiple boards"),mat=Dl.extend({type:$e("pcb_placement_error"),pcb_placement_error_id:so("pcb_placement_error"),error_type:$e("pcb_placement_error").default("pcb_placement_error"),subcircuit_id:Z().optional()}).describe("Defines a placement error on the PCB"),_at=Dl.extend({type:$e("pcb_packing_error"),pcb_packing_error_id:so("pcb_packing_error"),error_type:$e("pcb_packing_error").default("pcb_packing_error"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Defines a failure to pack PCB components within layout bounds"),fat=Dl.extend({type:$e("pcb_panelization_placement_error"),pcb_panelization_placement_error_id:so("pcb_panelization_placement_error"),error_type:$e("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),pcb_panel_id:Z().optional(),pcb_board_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Defines a panelization placement error on the PCB"),Iat=Pt({type:$e("pcb_trace_hint"),pcb_trace_hint_id:so("pcb_trace_hint"),pcb_port_id:Z(),pcb_component_id:Z(),route:dn(N9),subcircuit_id:Z().optional()}).describe("A hint that can be used during generation of a PCB trace"),Cat=Pt({type:$e("pcb_silkscreen_line"),pcb_silkscreen_line_id:so("pcb_silkscreen_line"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),stroke_width:lt.default("0.1mm"),x1:lt,y1:lt,x2:lt,y2:lt,layer:Km}).describe("Defines a silkscreen line on the PCB"),yat=Pt({type:$e("pcb_silkscreen_path"),pcb_silkscreen_path_id:so("pcb_silkscreen_path"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,route:dn(ki),stroke_width:ce}).describe("Defines a silkscreen path on the PCB"),xat=Pt({type:$e("pcb_silkscreen_text"),pcb_silkscreen_text_id:so("pcb_silkscreen_text"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),font:$e("tscircuit2024").default("tscircuit2024"),font_size:lt.default("0.2mm"),pcb_component_id:Z(),text:Z(),is_knockout:je().default(!1).optional(),knockout_padding:Pt({left:ce,top:ce,bottom:ce,right:ce}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:_t().optional(),layer:Pr,is_mirrored:je().default(!1).optional(),anchor_position:ki.default({x:0,y:0}),anchor_alignment:Q8.default("center")}).describe("Defines silkscreen text on the PCB"),Eat=Pt({type:$e("pcb_copper_text"),pcb_copper_text_id:so("pcb_copper_text"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),font:$e("tscircuit2024").default("tscircuit2024"),font_size:lt.default("0.2mm"),pcb_component_id:Z(),text:Z(),is_knockout:je().default(!1).optional(),knockout_padding:Pt({left:ce,top:ce,bottom:ce,right:ce}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:_t().optional(),layer:Pr,is_mirrored:je().default(!1).optional(),anchor_position:ki.default({x:0,y:0}),anchor_alignment:Q8.default("center")}).describe("Defines copper text on the PCB"),Bat=Pt({type:$e("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:so("pcb_silkscreen_rect"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Pr,stroke_width:ce.default("1mm"),corner_radius:ce.optional(),is_filled:je().default(!0).optional(),has_stroke:je().optional(),is_stroke_dashed:je().optional(),ccw_rotation:_t().optional()}).describe("Defines a silkscreen rect on the PCB"),bat=Pt({type:$e("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:so("pcb_silkscreen_circle"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius:ce,layer:Km,stroke_width:ce.default("1mm"),is_filled:je().optional()}).describe("Defines a silkscreen circle on the PCB"),Sat=Pt({type:$e("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:so("pcb_silkscreen_oval"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius_x:lt,radius_y:lt,layer:Km,ccw_rotation:oA.optional()}).describe("Defines a silkscreen oval on the PCB"),JBn=Pt({type:$e("pcb_silkscreen_graphic"),pcb_silkscreen_graphic_id:so("pcb_silkscreen_graphic"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,image_asset:yne.optional()}),Qat=JBn.extend({shape:$e("brep"),brep_shape:O2e}).describe("Defines a BRep silkscreen graphic on the PCB"),vat=Iy("shape",[Qat]).describe("Defines a silkscreen graphic on the PCB"),wat=Pt({type:$e("pcb_silkscreen_pill"),pcb_silkscreen_pill_id:so("pcb_silkscreen_pill"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Pr,ccw_rotation:_t().optional()}).describe("Defines a silkscreen pill on the PCB"),U2e=Pt({type:$e("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:so("pcb_fabrication_note_text"),subcircuit_id:Z().optional(),pcb_group_id:Z().optional(),font:$e("tscircuit2024").default("tscircuit2024"),font_size:lt.default("1mm"),pcb_component_id:Z(),text:Z(),ccw_rotation:_t().optional(),layer:Km,anchor_position:ki.default({x:0,y:0}),anchor_alignment:Kn(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:Z().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),K2e=Pt({type:$e("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:so("pcb_fabrication_note_path"),pcb_component_id:Z(),subcircuit_id:Z().optional(),layer:Pr,route:dn(ki),stroke_width:ce,color:Z().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),V2e=Pt({type:$e("pcb_fabrication_note_rect"),pcb_fabrication_note_rect_id:so("pcb_fabrication_note_rect"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Km,stroke_width:ce.default("0.1mm"),corner_radius:ce.optional(),is_filled:je().optional(),has_stroke:je().optional(),is_stroke_dashed:je().optional(),color:Z().optional()}).describe("Defines a fabrication note rectangle on the PCB"),z2e=Pt({type:$e("pcb_fabrication_note_dimension"),pcb_fabrication_note_dimension_id:so("pcb_fabrication_note_dimension"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,from:ki,to:ki,text:Z().optional(),text_ccw_rotation:_t().optional(),offset:ce.optional(),offset_distance:ce.optional(),offset_direction:Pt({x:_t(),y:_t()}).optional(),font:$e("tscircuit2024").default("tscircuit2024"),font_size:ce.default("1mm"),color:Z().optional(),arrow_size:ce.default("1mm")}).describe("Defines a measurement annotation within PCB fabrication notes"),J2e=Pt({type:$e("pcb_note_text"),pcb_note_text_id:so("pcb_note_text"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),font:$e("tscircuit2024").default("tscircuit2024"),font_size:lt.default("1mm"),text:Z().optional(),anchor_position:ki.default({x:0,y:0}),anchor_alignment:Kn(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),layer:Km.default("top"),is_mirrored_from_top_view:je().optional(),color:Z().optional()}).describe("Defines a documentation note in text on the PCB"),W2e=Pt({type:$e("pcb_note_rect"),pcb_note_rect_id:so("pcb_note_rect"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),text:Z().optional(),center:ki,width:ce,height:ce,layer:Km.default("top"),stroke_width:ce.default("0.1mm"),corner_radius:ce.optional(),is_filled:je().optional(),has_stroke:je().optional(),is_stroke_dashed:je().optional(),color:Z().optional()}).describe("Defines a rectangular documentation note on the PCB"),j2e=Pt({type:$e("pcb_note_path"),pcb_note_path_id:so("pcb_note_path"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),text:Z().optional(),route:dn(ki),layer:Km.default("top"),stroke_width:ce.default("0.1mm"),color:Z().optional()}).describe("Defines a polyline documentation note on the PCB"),$2e=Pt({type:$e("pcb_note_line"),pcb_note_line_id:so("pcb_note_line"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),text:Z().optional(),x1:lt,y1:lt,x2:lt,y2:lt,layer:Km.default("top"),stroke_width:lt.default("0.1mm"),color:Z().optional(),is_dashed:je().optional()}).describe("Defines a straight documentation note line on the PCB"),q2e=Pt({type:$e("pcb_note_dimension"),pcb_note_dimension_id:so("pcb_note_dimension"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),name:Z().optional(),from:ki,to:ki,text:Z().optional(),text_ccw_rotation:_t().optional(),offset_distance:ce.optional(),offset_direction:Pt({x:_t(),y:_t()}).optional(),font:$e("tscircuit2024").default("tscircuit2024"),font_size:ce.default("1mm"),layer:Km.default("top"),color:Z().optional(),arrow_size:ce.default("1mm")}).describe("Defines a measurement annotation within PCB documentation notes"),Pat=Dl.extend({type:$e("pcb_footprint_overlap_error"),pcb_error_id:so("pcb_error"),error_type:$e("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),pcb_smtpad_ids:dn(Z()).optional(),pcb_plated_hole_ids:dn(Z()).optional(),pcb_hole_ids:dn(Z()).optional(),pcb_keepout_ids:dn(Z()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),Mat=Dl.extend({type:$e("pcb_courtyard_overlap_error"),pcb_error_id:so("pcb_error"),error_type:$e("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),pcb_component_ids:fQ([Z(),Z()])}).describe("Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"),Dat=Pt({type:$e("pcb_keepout"),shape:$e("outline"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),outline:dn(ki).min(2),stroke_width:ce,pcb_keepout_id:Z(),layers:dn(Z()),description:Z().optional(),excluded_pcb_component_ids:dn(Z()).optional()}),X2e=Pt({type:$e("pcb_keepout"),shape:$e("rect"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:lt,height:lt,pcb_keepout_id:Z(),layers:dn(Z()),description:Z().optional(),excluded_pcb_component_ids:dn(Z()).optional()}).or(Pt({type:$e("pcb_keepout"),shape:$e("circle"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius:lt,pcb_keepout_id:Z(),layers:dn(Z()),description:Z().optional(),excluded_pcb_component_ids:dn(Z()).optional()})).or(Dat),Qne=Pt({type:$e("pcb_cutout"),pcb_cutout_id:so("pcb_cutout"),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),pcb_board_id:Z().optional(),pcb_panel_id:Z().optional()}),Nat=Qne.extend({shape:$e("rect"),center:ki,width:ce,height:ce,rotation:oA.optional(),corner_radius:ce.optional()}),Rat=Qne.extend({shape:$e("circle"),center:ki,radius:ce}),Tat=Qne.extend({shape:$e("polygon"),points:dn(ki)}),kat=Qne.extend({shape:$e("path"),route:dn(ki),slot_width:ce,slot_length:ce.optional(),space_between_slots:ce.optional(),slot_corner_radius:ce.optional()}),Z2e=Iy("shape",[Nat,Rat,Tat,kat]).describe("Defines a cutout on the PCB, removing board material."),Fat=Dl.extend({type:$e("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:so("pcb_missing_footprint_error"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),error_type:$e("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:Z()}).describe("Defines a missing footprint error on the PCB"),mV=Dl.extend({type:$e("external_footprint_load_error"),external_footprint_load_error_id:so("external_footprint_load_error"),pcb_component_id:Z(),source_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),footprinter_string:Z().optional(),error_type:$e("external_footprint_load_error").default("external_footprint_load_error")}).describe("Defines an error when an external footprint fails to load"),exe=Dl.extend({type:$e("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:so("circuit_json_footprint_load_error"),pcb_component_id:Z(),source_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),error_type:$e("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),circuit_json:dn(rd()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),Lat=Pt({type:$e("pcb_group"),pcb_group_id:so("pcb_group"),source_group_id:Z(),is_subcircuit:je().optional(),subcircuit_id:Z().optional(),width:ce.optional(),height:ce.optional(),center:ki,display_offset_x:Z().optional().describe("How to display the x offset for this group, usually corresponding with how the user specified it"),display_offset_y:Z().optional().describe("How to display the y offset for this group, usually corresponding with how the user specified it"),outline:dn(ki).optional(),anchor_position:ki.optional(),anchor_alignment:Q8.default("center"),position_mode:Kn(["packed","relative_to_group_anchor","none"]).optional(),positioned_relative_to_pcb_group_id:Z().optional(),positioned_relative_to_pcb_board_id:Z().optional(),pcb_component_ids:dn(Z()),child_layout_mode:Kn(["packed","none"]).optional(),name:Z().optional(),description:Z().optional(),layout_mode:Z().optional(),autorouter_configuration:Pt({trace_clearance:ce}).optional(),autorouter_used_string:Z().optional()}).describe("Defines a group of components on the PCB"),Hat=Dl.extend({type:$e("pcb_autorouting_error"),pcb_error_id:so("pcb_autorouting_error"),error_type:$e("pcb_autorouting_error").default("pcb_autorouting_error"),subcircuit_id:Z().optional()}).describe("The autorouting has failed to route a portion of the board"),txe=Pt({type:$e("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:so("pcb_manual_edit_conflict_warning"),warning_type:$e("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:Z(),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),source_component_id:Z()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),Oat=Kn(["x-","x+","y+","y-"]),Gat=Pt({type:$e("pcb_connector_not_in_accessible_orientation_warning"),pcb_connector_not_in_accessible_orientation_warning_id:so("pcb_connector_not_in_accessible_orientation_warning"),warning_type:$e("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),message:Z(),pcb_component_id:Z(),source_component_id:Z().optional(),pcb_board_id:Z().optional(),facing_direction:Oat,recommended_facing_direction:Oat,subcircuit_id:Z().optional()}).describe("Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"),Yat=Pt({type:$e("pcb_component_missing_courtyard_warning"),pcb_component_missing_courtyard_warning_id:so("pcb_component_missing_courtyard_warning"),warning_type:$e("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),message:Z(),pcb_component_id:Z(),source_component_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Warning emitted when a PCB component has no courtyard geometry"),nxe=Pt({type:$e("supplier_footprint_mismatch_warning"),supplier_footprint_mismatch_warning_id:so("supplier_footprint_mismatch_warning"),warning_type:$e("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),message:Z(),source_component_id:Z(),pcb_component_id:Z().optional(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),supplier_name:qM.optional(),supplier_part_number:Z().optional(),supplier_footprint_url:Z().optional(),footprint_copper_intersection_over_union:_t()}).describe("Warning emitted when a supplier part footprint does not match the expected footprint"),Uat=Pt({type:$e("pcb_fabricator_extra_charge_warning"),pcb_fabricator_extra_charge_warning_id:so("pcb_fabricator_extra_charge_warning"),warning_type:$e("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),message:Z(),fabricator_preset:Z(),pcb_board_id:Z().optional(),pcb_via_ids:dn(Z()).optional(),subcircuit_id:Z().optional()}).describe("Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets."),Kat=Pt({type:$e("pcb_breakout_point"),pcb_breakout_point_id:so("pcb_breakout_point"),pcb_group_id:Z(),subcircuit_id:Z().optional(),source_trace_id:Z().optional(),source_port_id:Z().optional(),source_net_id:Z().optional(),layer:Pr.optional(),x:lt,y:lt}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),Vat=Pt({type:$e("pcb_ground_plane"),pcb_ground_plane_id:so("pcb_ground_plane"),source_pcb_ground_plane_id:Z(),source_net_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Defines a ground plane on the PCB"),zat=Pt({type:$e("pcb_ground_plane_region"),pcb_ground_plane_region_id:so("pcb_ground_plane_region"),pcb_ground_plane_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Pr,points:dn(ki)}).describe("Defines a polygon region of a ground plane"),Jat=Pt({type:$e("pcb_thermal_spoke"),pcb_thermal_spoke_id:so("pcb_thermal_spoke"),pcb_ground_plane_id:Z(),shape:Z(),spoke_count:_t(),spoke_thickness:lt,spoke_inner_diameter:lt,spoke_outer_diameter:lt,pcb_plated_hole_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),oxe=Pt({type:$e("pcb_copper_pour"),pcb_copper_pour_id:so("pcb_copper_pour"),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Pr,source_net_id:Z().optional(),covered_with_solder_mask:je().optional().default(!0)}),Wat=oxe.extend({shape:$e("rect"),center:ki,width:ce,height:ce,rotation:oA.optional()}),jat=oxe.extend({shape:$e("brep"),brep_shape:O2e}),$at=oxe.extend({shape:$e("polygon"),points:dn(ki)}),ixe=Iy("shape",[Wat,jat,$at]).describe("Defines a copper pour on the PCB."),qat=Dl.extend({type:$e("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:so("pcb_component_outside_board_error"),error_type:$e("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),pcb_component_id:Z(),pcb_board_id:Z(),component_center:ki,component_bounds:Pt({min_x:_t(),max_x:_t(),min_y:_t(),max_y:_t()}),subcircuit_id:Z().optional(),source_component_id:Z().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),Xat=Dl.extend({type:$e("pcb_component_not_on_board_edge_error"),pcb_component_not_on_board_edge_error_id:so("pcb_component_not_on_board_edge_error"),error_type:$e("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),pcb_component_id:Z(),pcb_board_id:Z(),component_center:ki,pad_to_nearest_board_edge_distance:_t(),source_component_id:Z().optional(),subcircuit_id:Z().optional()}).describe("Error emitted when a component that must be placed on the board edge is centered away from the edge"),vne=Dl.extend({type:$e("pcb_component_invalid_layer_error"),pcb_component_invalid_layer_error_id:so("pcb_component_invalid_layer_error"),error_type:$e("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),pcb_component_id:Z().optional(),source_component_id:Z(),layer:Pr,subcircuit_id:Z().optional()}).describe("Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"),Zat=Dl.extend({type:$e("pcb_via_clearance_error"),pcb_error_id:so("pcb_error"),error_type:$e("pcb_via_clearance_error").default("pcb_via_clearance_error"),pcb_via_ids:dn(Z()).min(2),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),pcb_center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe("Error emitted when vias are closer than the allowed clearance"),eAt=Dl.extend({type:$e("pcb_via_trace_clearance_error"),pcb_via_trace_clearance_error_id:so("pcb_via_trace_clearance_error"),error_type:$e("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),pcb_via_id:Z(),pcb_trace_id:Z(),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe("Error emitted when a via and trace are closer than the allowed clearance"),tAt=Dl.extend({type:$e("pcb_pad_pad_clearance_error"),pcb_pad_pad_clearance_error_id:so("pcb_pad_pad_clearance_error"),error_type:$e("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),pcb_pad_ids:dn(Z()).min(2),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe("Error emitted when pads are closer than the allowed clearance"),nAt=Dl.extend({type:$e("pcb_pad_trace_clearance_error"),pcb_pad_trace_clearance_error_id:so("pcb_pad_trace_clearance_error"),error_type:$e("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),pcb_pad_id:Z(),pcb_trace_id:Z(),minimum_clearance:lt.optional(),actual_clearance:lt.optional(),center:Pt({x:_t().optional(),y:_t().optional()}).optional(),subcircuit_id:Z().optional()}).describe("Error emitted when a pad and trace are closer than allowed clearance"),rxe=Pt({type:$e("pcb_courtyard_rect"),pcb_courtyard_rect_id:so("pcb_courtyard_rect"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,layer:Km,ccw_rotation:oA.optional(),color:Z().optional()}).describe("Defines a courtyard rectangle on the PCB"),sxe=Pt({type:$e("pcb_courtyard_outline"),pcb_courtyard_outline_id:so("pcb_courtyard_outline"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,outline:dn(ki).min(2)}).describe("Defines a courtyard outline on the PCB"),axe=Pt({type:$e("pcb_courtyard_polygon"),pcb_courtyard_polygon_id:so("pcb_courtyard_polygon"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),layer:Km,points:dn(ki).min(3),color:Z().optional()}).describe("Defines a courtyard polygon on the PCB"),Axe=Pt({type:$e("pcb_courtyard_circle"),pcb_courtyard_circle_id:so("pcb_courtyard_circle"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,radius:ce,layer:Km,color:Z().optional()}).describe("Defines a courtyard circle on the PCB"),cxe=Pt({type:$e("pcb_courtyard_pill"),pcb_courtyard_pill_id:so("pcb_courtyard_pill"),pcb_component_id:Z(),pcb_group_id:Z().optional(),subcircuit_id:Z().optional(),center:ki,width:ce,height:ce,radius:ce,layer:Km,color:Z().optional()}).describe("Defines a courtyard pill on the PCB"),WBn=["obj","stl","3mf","gltf","glb","step","wrl"],oAt=["x+","x-","y+","y-","z+","z-"],jBn={obj:"z+",stl:"z+","3mf":"z+",gltf:"y+",glb:"y+",step:"z+",wrl:"y+"},iAt=Pt({type:$e("cad_component"),cad_component_id:Z(),pcb_component_id:Z(),source_component_id:Z(),position:D9,rotation:D9.optional(),size:D9.optional(),layer:Pr.optional(),subcircuit_id:Z().optional(),footprinter_string:Z().optional(),model_obj_url:Z().optional(),model_stl_url:Z().optional(),model_3mf_url:Z().optional(),model_gltf_url:Z().optional(),model_glb_url:Z().optional(),model_step_url:Z().optional(),model_wrl_url:Z().optional(),model_asset:yne.optional(),model_unit_to_mm_scale_factor:_t().optional(),model_board_normal_direction:Kn(oAt).optional().describe(`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`),model_origin_position:D9.optional(),model_origin_alignment:Kn(["unknown","center","center_of_component_on_board_surface","bottom_center_of_component"]).optional(),model_object_fit:Kn(["contain_within_bounds","fill_bounds"]).optional().default("contain_within_bounds"),model_jscad:rd().optional(),show_as_translucent_model:je().optional(),show_as_bounding_box:je().optional(),show_hidden_edges:je().optional(),anchor_alignment:Kn(["center","center_of_component_on_board_surface"]).optional().default("center")}).describe("Defines a component on the PCB"),lxe=Kn(["sinewave","square","triangle","sawtooth"]),$Bn=xo([Z(),_t()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),rAt=Pt({type:$e("simulation_voltage_source"),simulation_voltage_source_id:so("simulation_voltage_source"),is_dc_source:$e(!0).optional().default(!0),positive_source_port_id:Z().optional(),negative_source_port_id:Z().optional(),positive_source_net_id:Z().optional(),negative_source_net_id:Z().optional(),voltage:O_,ac_magnitude:O_.optional(),ac_phase:oA.optional()}).describe("Defines a DC voltage source for simulation"),sAt=Pt({type:$e("simulation_voltage_source"),simulation_voltage_source_id:so("simulation_voltage_source"),is_dc_source:$e(!1),terminal1_source_port_id:Z().optional(),terminal2_source_port_id:Z().optional(),terminal1_source_net_id:Z().optional(),terminal2_source_net_id:Z().optional(),voltage:O_.optional(),frequency:Cy.optional(),peak_to_peak_voltage:O_.optional(),wave_shape:lxe.optional(),phase:oA.optional(),duty_cycle:$Bn.optional(),pulse_delay:Ml.optional(),rise_time:Ml.optional(),fall_time:Ml.optional(),pulse_width:Ml.optional(),period:Ml.optional(),ac_magnitude:O_.optional(),ac_phase:oA.optional()}).describe("Defines an AC voltage source for simulation"),aAt=xo([rAt,sAt]).describe("Defines a voltage source for simulation"),qBn=xo([Z(),_t()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),AAt=Pt({type:$e("simulation_current_source"),simulation_current_source_id:so("simulation_current_source"),is_dc_source:$e(!0).optional().default(!0),positive_source_port_id:Z().optional(),negative_source_port_id:Z().optional(),positive_source_net_id:Z().optional(),negative_source_net_id:Z().optional(),current:H3,ac_magnitude:H3.optional(),ac_phase:oA.optional()}).describe("Defines a DC current source for simulation"),cAt=Pt({type:$e("simulation_current_source"),simulation_current_source_id:so("simulation_current_source"),is_dc_source:$e(!1),terminal1_source_port_id:Z().optional(),terminal2_source_port_id:Z().optional(),terminal1_source_net_id:Z().optional(),terminal2_source_net_id:Z().optional(),current:H3.optional(),frequency:Cy.optional(),peak_to_peak_current:H3.optional(),wave_shape:lxe.optional(),phase:oA.optional(),duty_cycle:qBn.optional(),ac_magnitude:H3.optional(),ac_phase:oA.optional()}).describe("Defines an AC current source for simulation"),lAt=xo([AAt,cAt]).describe("Defines a current source for simulation"),wne=P0(t=>t==="V"||t==="A"),uxe=P0(t=>t==="Ω"||t==="F"||t==="H"||t==="V"||t==="A"),uAt=xo([$e("spice_dc_sweep"),$e("spice_dc_operating_point"),$e("spice_transient_analysis"),$e("spice_ac_analysis")]),gAt=Pt({method:Kn(["trap","gear"]).optional(),reltol:xo([_t(),Z()]).optional(),abstol:xo([_t(),Z()]).optional(),vntol:xo([_t(),Z()]).optional()}).describe("SPICE solver options for a simulation experiment"),dAt=Pt({type:$e("simulation_experiment"),simulation_experiment_id:so("simulation_experiment"),name:Z(),experiment_type:uAt,time_per_step:Uk.optional(),start_time_ms:Ml.optional(),end_time_ms:Ml.optional(),spice_options:gAt.optional(),dc_sweep_voltage_source_id:Z().optional(),dc_sweep_current_source_id:Z().optional(),dc_sweep_start:_t().optional(),dc_sweep_stop:_t().optional(),dc_sweep_step:_t().refine(t=>t!==0).optional(),dc_sweep_unit:wne.optional(),ac_sweep_type:Kn(["linear","decade","octave"]).optional(),ac_samples_per_interval:_t().int().positive().optional(),ac_sample_count:_t().int().positive().optional(),ac_start_frequency_hz:_t().positive().optional(),ac_stop_frequency_hz:_t().positive().optional()}).superRefine((t,e)=>{if(t.experiment_type==="spice_dc_sweep"){const n=["dc_sweep_start","dc_sweep_stop","dc_sweep_step","dc_sweep_unit"];for(const r of n)t[r]===void 0&&e.addIssue({code:lo.custom,path:[r],message:`${r} is required for a DC sweep`});const o=t.dc_sweep_voltage_source_id!==void 0,i=t.dc_sweep_current_source_id!==void 0;o===i&&e.addIssue({code:lo.custom,path:["dc_sweep_voltage_source_id"],message:"Exactly one DC sweep voltage or current source ID is required"})}t.experiment_type==="spice_ac_analysis"&&(t.ac_sweep_type===void 0&&e.addIssue({code:lo.custom,path:["ac_sweep_type"],message:"ac_sweep_type is required for an AC analysis"}),t.ac_start_frequency_hz===void 0&&e.addIssue({code:lo.custom,path:["ac_start_frequency_hz"],message:"ac_start_frequency_hz is required for an AC analysis"}),t.ac_stop_frequency_hz===void 0&&e.addIssue({code:lo.custom,path:["ac_stop_frequency_hz"],message:"ac_stop_frequency_hz is required for an AC analysis"}),t.ac_sweep_type==="linear"&&t.ac_sample_count===void 0&&e.addIssue({code:lo.custom,path:["ac_sample_count"],message:"ac_sample_count is required for a linear AC analysis"}),(t.ac_sweep_type==="decade"||t.ac_sweep_type==="octave")&&t.ac_samples_per_interval===void 0&&e.addIssue({code:lo.custom,path:["ac_samples_per_interval"],message:"ac_samples_per_interval is required for decade and octave AC analyses"}))}).describe("Defines a simulation experiment configuration"),v8=Pt({simulation_parameter_sweep_id:Z(),sweep_index:_t().int().nonnegative(),parameter_value:_t(),parameter_unit:uxe}),hAt=Pt({type:$e("simulation_transient_voltage_graph"),simulation_transient_voltage_graph_id:so("simulation_transient_voltage_graph"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),timestamps_ms:dn(_t()).optional(),voltage_levels:dn(_t()),source_component_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),time_per_step:Uk,start_time_ms:Ml,end_time_ms:Ml,name:Z().optional(),color:Z().optional()}).describe("Stores voltage measurements over time for a simulation"),pAt=Pt({type:$e("simulation_transient_current_graph"),simulation_transient_current_graph_id:so("simulation_transient_current_graph"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),timestamps_ms:dn(_t()).optional(),current_levels:dn(_t()),source_component_id:Z().optional(),subcircuit_connectivity_map_key:Z().optional(),time_per_step:Uk,start_time_ms:Ml,end_time_ms:Ml,name:Z().optional(),color:Z().optional()}).describe("Stores current measurements over time for a simulation"),mAt=Pt({type:$e("simulation_switch"),simulation_switch_id:so("simulation_switch"),source_component_id:Z().optional(),closes_at:Ml.optional(),opens_at:Ml.optional(),starts_closed:je().optional(),switching_frequency:Cy.optional()}).describe("Defines a switch for simulation timing control"),_At=Pt({type:$e("simulation_voltage_probe"),simulation_voltage_probe_id:so("simulation_voltage_probe"),source_component_id:Z().optional(),name:Z().optional(),signal_input_source_port_id:Z().optional(),signal_input_source_net_id:Z().optional(),reference_input_source_port_id:Z().optional(),reference_input_source_net_id:Z().optional(),subcircuit_id:Z().optional(),color:Z().optional()}).describe("Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.").superRefine((t,e)=>{if(t.reference_input_source_port_id||t.reference_input_source_net_id){const o=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,i=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;o&&i?e.addIssue({code:lo.custom,message:"Cannot mix port and net connections in a differential probe."}):o?(!t.signal_input_source_port_id||!t.reference_input_source_port_id)&&e.addIssue({code:lo.custom,message:"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."}):i&&(!t.signal_input_source_net_id||!t.reference_input_source_net_id)&&e.addIssue({code:lo.custom,message:"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."})}else!!t.signal_input_source_port_id==!!t.signal_input_source_net_id&&e.addIssue({code:lo.custom,message:"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."})}),fAt=Pt({type:$e("simulation_current_probe"),simulation_current_probe_id:so("simulation_current_probe"),source_component_id:Z().optional(),name:Z().optional(),positive_source_port_id:Z().optional(),negative_source_port_id:Z().optional(),positive_source_net_id:Z().optional(),negative_source_net_id:Z().optional(),subcircuit_id:Z().optional(),color:Z().optional()}).describe("Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint.").superRefine((t,e)=>{const n=!!t.positive_source_port_id,o=!!t.negative_source_port_id,i=!!t.positive_source_net_id,r=!!t.negative_source_net_id,s=n||o,a=i||r;if(s&&a){e.addIssue({code:lo.custom,message:"Cannot mix port and net connections in a current probe."});return}if(s){(!n||!o)&&e.addIssue({code:lo.custom,message:"Current probe using source ports requires both positive_source_port_id and negative_source_port_id."});return}if(a){(!i||!r)&&e.addIssue({code:lo.custom,message:"Current probe using source nets requires both positive_source_net_id and negative_source_net_id."});return}e.addIssue({code:lo.custom,message:"A current probe must have either positive/negative source port ids or positive/negative source net ids."})}),IAt=Dl.extend({type:$e("simulation_unknown_experiment_error"),simulation_unknown_experiment_error_id:so("simulation_unknown_experiment_error"),error_type:$e("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),simulation_experiment_id:Z().optional(),subcircuit_id:Z().optional()}).describe("An unknown error occurred during the simulation experiment."),XBn=Kn(["resistance","capacitance","inductance","voltage","current"]),_V=Pt({type:$e("simulation_parameter_sweep"),simulation_parameter_sweep_id:so("simulation_parameter_sweep"),simulation_experiment_id:Z(),name:Z().optional(),parameter_values:dn(_t()).min(1),parameter_unit:uxe}),CAt=Iy("parameter_type",[_V.extend({parameter_type:$e("resistance"),resistor_source_component_id:Z()}),_V.extend({parameter_type:$e("capacitance"),capacitor_source_component_id:Z()}),_V.extend({parameter_type:$e("inductance"),inductor_source_component_id:Z()}),_V.extend({parameter_type:$e("voltage"),source_net_id:Z()}),_V.extend({parameter_type:$e("current"),current_source_component_id:Z()})]).describe("Repeats a simulation experiment over component parameter values"),yAt=Pt({type:$e("simulation_dc_operating_point_voltage"),simulation_dc_operating_point_voltage_id:so("simulation_dc_operating_point_voltage"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_voltage_probe_id:Z(),voltage:_t(),name:Z().optional(),color:Z().optional()}),xAt=Pt({type:$e("simulation_dc_operating_point_current"),simulation_dc_operating_point_current_id:so("simulation_dc_operating_point_current"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_current_probe_id:Z(),current:_t(),name:Z().optional(),color:Z().optional()}),EAt=Pt({type:$e("simulation_dc_sweep_voltage_graph"),simulation_dc_sweep_voltage_graph_id:so("simulation_dc_sweep_voltage_graph"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_voltage_probe_id:Z(),sweep_values:dn(_t()),sweep_unit:wne,voltage_levels:dn(_t()),name:Z().optional(),color:Z().optional()}).refine(t=>t.sweep_values.length===t.voltage_levels.length,{message:"sweep_values and voltage_levels must have the same length"}),BAt=Pt({type:$e("simulation_dc_sweep_current_graph"),simulation_dc_sweep_current_graph_id:so("simulation_dc_sweep_current_graph"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_current_probe_id:Z(),sweep_values:dn(_t()),sweep_unit:wne,current_levels:dn(_t()),name:Z().optional(),color:Z().optional()}).refine(t=>t.sweep_values.length===t.current_levels.length,{message:"sweep_values and current_levels must have the same length"}),gxe=Pt({re:_t(),im:_t()}),bAt=Pt({type:$e("simulation_ac_sweep_voltage_graph"),simulation_ac_sweep_voltage_graph_id:so("simulation_ac_sweep_voltage_graph"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_voltage_probe_id:Z(),frequencies_hz:dn(_t()),complex_voltages:dn(gxe),name:Z().optional(),color:Z().optional()}).refine(t=>t.frequencies_hz.length===t.complex_voltages.length,{message:"frequencies_hz and complex_voltages must have the same length"}),SAt=Pt({type:$e("simulation_ac_sweep_current_graph"),simulation_ac_sweep_current_graph_id:so("simulation_ac_sweep_current_graph"),simulation_experiment_id:Z(),simulation_parameter_sweep_coordinate:v8.optional(),simulation_current_probe_id:Z(),frequencies_hz:dn(_t()),complex_currents:dn(gxe),name:Z().optional(),color:Z().optional()}).refine(t=>t.frequencies_hz.length===t.complex_currents.length,{message:"frequencies_hz and complex_currents must have the same length"}),QAt=Pt({type:$e("simulation_op_amp"),simulation_op_amp_id:so("simulation_op_amp"),source_component_id:Z().optional(),inverting_input_source_port_id:Z(),non_inverting_input_source_port_id:Z(),output_source_port_id:Z(),positive_supply_source_port_id:Z(),negative_supply_source_port_id:Z()}).describe("Defines a simple ideal operational amplifier for simulation"),vAt=Pt({type:$e("simulation_spice_subcircuit"),simulation_spice_subcircuit_id:so("simulation_spice_subcircuit"),source_component_id:Z(),spice_pin_to_source_port_map:Qc(Z(),Z()),subcircuit_source:Z()}).describe("Defines a custom SPICE subcircuit model for simulation"),wAt=t=>t!==void 0,PAt=Pt({type:$e("simulation_oscilloscope_trace"),simulation_oscilloscope_trace_id:so("simulation_oscilloscope_trace"),simulation_transient_voltage_graph_id:Z().optional(),simulation_transient_current_graph_id:Z().optional(),simulation_voltage_probe_id:Z().optional(),simulation_current_probe_id:Z().optional(),display_name:Z().optional(),color:Z().optional(),display_center_value:_t().optional(),display_center_offset_divs:_t().optional(),volts_per_div:_t().positive().optional(),amps_per_div:_t().positive().optional()}).describe("Defines how a simulation measurement is rendered as an oscilloscope-style trace.").superRefine((t,e)=>{const n=[t.simulation_transient_voltage_graph_id,t.simulation_voltage_probe_id].filter(wAt).length,o=[t.simulation_transient_current_graph_id,t.simulation_current_probe_id].filter(wAt).length;n+o!==1&&e.addIssue({code:lo.custom,message:"An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."}),n>0&&t.amps_per_div!==void 0&&e.addIssue({code:lo.custom,message:"Voltage oscilloscope traces must use volts_per_div, not amps_per_div."}),o>0&&t.volts_per_div!==void 0&&e.addIssue({code:lo.custom,message:"Current oscilloscope traces must use amps_per_div, not volts_per_div."})}),dxe=xo([Grt,Hrt,Ort,Lrt,Urt,Yrt,h2e,u2e,Ene,d2e,g2e,p2e,m2e,_2e,C2e,y2e,x2e,Q2e,E2e,B2e,b2e,S2e,I2e,f2e,zrt,Jrt,Krt,v2e,w2e,P2e,M2e,Wrt,est,D2e,N2e,jrt,$rt,qrt,Xrt,Zrt,hV,R2e,dV,Vrt,Lst,Yst,jst,Fat,mV,exe,txe,Gat,Yat,nxe,Uat,$st,X2e,qst,dat,tat,rat,sat,aat,Aat,Sne,Zst,eat,hat,pat,Lat,Iat,Cat,yat,xat,wat,Eat,Bat,bat,Sat,vat,cat,lat,mat,_at,fat,uat,gat,Zat,eAt,tAt,nAt,K2e,U2e,V2e,z2e,J2e,W2e,j2e,$2e,q2e,Hat,Pat,Mat,Kat,Z2e,Vat,zat,Jat,ixe,qat,Xat,vne,rxe,sxe,axe,Axe,cxe,tst,hst,cst,lst,ust,gst,ast,Ast,pst,dst,nst,_st,fst,mst,xst,Est,F2e,Bst,bst,Nst,Sst,vst,wst,Dst,Pst,Mst,iAt,aAt,lAt,dAt,hAt,pAt,yAt,xAt,EAt,BAt,bAt,SAt,CAt,mAt,_At,fAt,PAt,IAt,QAt,vAt]),U4=dxe;const R9=Object.freeze(Object.defineProperty({__proto__:null,all_layers:Kk,any_circuit_element:dxe,any_soup_element:U4,any_source_component:Lrt,asset:yne,base_circuit_json_error:Dl,battery_capacity:urt,brep_shape:O2e,cadModelDefaultDirectionMap:jBn,cad_component:iAt,cad_model_axis_directions:oAt,cad_model_formats:WBn,capacitance:$M,circuit_json_footprint_load_error:exe,current:H3,distance:lt,duration_ms:Uk,experiment_type:uAt,external_footprint_load_error:mV,frequency:Cy,getRotationBetweenPcbPin1Locations:xBn,getZodPrefixedIdWithDefault:so,inductance:Ine,insertionDirectionToCanonical:G2e,insertionDirectionToVector:CBn,insertion_direction:Tst,kicadAt:xne,kicadEffects:grt,kicadFont:l2e,kicadFootprintAttributes:hrt,kicadFootprintMetadata:_rt,kicadFootprintModel:mrt,kicadFootprintPad:prt,kicadFootprintProperties:drt,kicadProperty:gV,kicadSymbolEffects:Crt,kicadSymbolMetadata:xrt,kicadSymbolPinNames:Irt,kicadSymbolPinNumbers:frt,kicadSymbolProperties:yrt,kicadSymbolProperty:yQ,layer_ref:Pr,layer_string:T2e,length:ce,manufacturing_drc_properties:Fst,ms:Ml,ninePointAnchor:Q8,parseAndConvertSiUnit:q1,pcbRenderLayer:_Bn,pcb_autorouting_error:Hat,pcb_board:hat,pcb_breakout_point:Kat,pcb_component:Lst,pcb_component_invalid_layer_error:vne,pcb_component_missing_courtyard_warning:Yat,pcb_component_not_on_board_edge_error:Xat,pcb_component_outside_board_error:qat,pcb_connector_not_in_accessible_orientation_warning:Gat,pcb_copper_pour:ixe,pcb_copper_pour_brep:jat,pcb_copper_pour_polygon:$at,pcb_copper_pour_rect:Wat,pcb_copper_text:Eat,pcb_courtyard_circle:Axe,pcb_courtyard_outline:sxe,pcb_courtyard_overlap_error:Mat,pcb_courtyard_pill:cxe,pcb_courtyard_polygon:axe,pcb_courtyard_rect:rxe,pcb_cutout:Z2e,pcb_cutout_circle:Rat,pcb_cutout_path:kat,pcb_cutout_polygon:Tat,pcb_cutout_rect:Nat,pcb_debug_line:Ost,pcb_debug_object:Yst,pcb_debug_object_base:bne,pcb_debug_point:Gst,pcb_debug_rect:Hst,pcb_fabrication_note_dimension:z2e,pcb_fabrication_note_path:K2e,pcb_fabrication_note_rect:V2e,pcb_fabrication_note_text:U2e,pcb_fabricator_extra_charge_warning:Uat,pcb_footprint_overlap_error:Pat,pcb_ground_plane:Vat,pcb_ground_plane_region:zat,pcb_group:Lat,pcb_hole:jst,pcb_hole_circle_or_square_shape:SBn,pcb_hole_circle_shape:BBn,pcb_hole_oval_shape:QBn,pcb_hole_pill_shape:vBn,pcb_hole_rect_shape:bBn,pcb_hole_rotated_pill_shape:wBn,pcb_keepout:X2e,pcb_keepout_outline:Dat,pcb_manual_edit_conflict_warning:txe,pcb_missing_footprint_error:Fat,pcb_net:dat,pcb_note_dimension:q2e,pcb_note_line:$2e,pcb_note_path:j2e,pcb_note_rect:W2e,pcb_note_text:J2e,pcb_packing_error:_at,pcb_pad_pad_clearance_error:tAt,pcb_pad_trace_clearance_error:nAt,pcb_panel:pat,pcb_panelization_placement_error:fat,pcb_pin1_location:pV,pcb_placement_error:mat,pcb_plated_hole:$st,pcb_port:qst,pcb_port_not_connected_error:gat,pcb_port_not_matched_error:uat,pcb_route_hint:kst,pcb_route_hints:EBn,pcb_silkscreen_circle:bat,pcb_silkscreen_graphic:vat,pcb_silkscreen_graphic_brep:Qat,pcb_silkscreen_line:Cat,pcb_silkscreen_oval:Sat,pcb_silkscreen_path:yat,pcb_silkscreen_pill:wat,pcb_silkscreen_rect:Bat,pcb_silkscreen_text:xat,pcb_smtpad:Zst,pcb_smtpad_pill:Xst,pcb_solder_paste:eat,pcb_text:tat,pcb_thermal_spoke:Jat,pcb_trace:rat,pcb_trace_error:cat,pcb_trace_hint:Iat,pcb_trace_missing_error:lat,pcb_trace_route_point:Y2e,pcb_trace_route_point_through_pad:iat,pcb_trace_route_point_via:oat,pcb_trace_route_point_wire:nat,pcb_trace_too_long_warning:aat,pcb_trace_too_many_vias_warning:Aat,pcb_trace_warning:sat,pcb_via:Sne,pcb_via_clearance_error:Zat,pcb_via_trace_clearance_error:eAt,point:ki,point3:D9,point_with_bulge:Rst,port_arrangement:sst,position:hBn,position3:pBn,resistance:S8,ring:H2e,rotation:oA,route_hint_point:N9,schematic_arc:gst,schematic_box:tst,schematic_circle:ust,schematic_component:ast,schematic_component_overlap_warning:Bst,schematic_component_port_arrangement_by_sides:rst,schematic_component_port_arrangement_by_size:ist,schematic_component_styling_warning:bst,schematic_debug_line:Cst,schematic_debug_object:xst,schematic_debug_object_base:Bne,schematic_debug_point:yst,schematic_debug_rect:Ist,schematic_element_outside_sheet_warning:Sst,schematic_error:_st,schematic_graphic:vst,schematic_group:wst,schematic_layout_error:fst,schematic_line:cst,schematic_manual_edit_conflict_warning:F2e,schematic_missing_sheet_warning:Nst,schematic_net_label:mst,schematic_path:nst,schematic_pin_styles:ost,schematic_port:pst,schematic_rect:lst,schematic_sheet:Dst,schematic_sheet_size:L2e,schematic_symbol:Ast,schematic_table:Pst,schematic_table_cell:Mst,schematic_text:hst,schematic_text_part:k2e,schematic_trace:dst,schematic_voltage_probe:Est,simulation_ac_current_source:cAt,simulation_ac_sweep_current_graph:SAt,simulation_ac_sweep_voltage_graph:bAt,simulation_ac_voltage_source:sAt,simulation_complex_sample:gxe,simulation_current_probe:fAt,simulation_current_source:lAt,simulation_dc_current_source:AAt,simulation_dc_operating_point_current:xAt,simulation_dc_operating_point_voltage:yAt,simulation_dc_sweep_current_graph:BAt,simulation_dc_sweep_unit:wne,simulation_dc_sweep_voltage_graph:EAt,simulation_dc_voltage_source:rAt,simulation_experiment:dAt,simulation_op_amp:QAt,simulation_oscilloscope_trace:PAt,simulation_parameter_sweep:CAt,simulation_parameter_sweep_coordinate:v8,simulation_parameter_type:XBn,simulation_parameter_unit:uxe,simulation_spice_subcircuit:vAt,simulation_switch:mAt,simulation_transient_current_graph:pAt,simulation_transient_voltage_graph:hAt,simulation_unknown_experiment_error:IAt,simulation_voltage_probe:_At,simulation_voltage_source:aAt,size:Cne,source_ambiguous_port_reference:Vrt,source_board:Krt,source_component_base:bu,source_component_internal_connection:Ort,source_component_misconfigured_error:dV,source_component_pins_underspecified_warning:qrt,source_confusing_net_name_warning:est,source_failed_to_create_component_error:Nrt,source_group:Yrt,source_i2c_misconfigured_error:R2e,source_interconnect:krt,source_invalid_component_property_error:w2e,source_manually_placed_via:Jrt,source_missing_manufacturer_part_number_warning:D2e,source_missing_property_error:Drt,source_net:Urt,source_no_ground_pin_defined_warning:$rt,source_no_power_pin_defined_warning:jrt,source_part_not_found_warning:hV,source_pcb_ground_plane:zrt,source_pin_attributes:vrt,source_pin_missing_trace_warning:M2e,source_pin_must_be_connected_error:Xrt,source_port:Hrt,source_project_metadata:v2e,source_property_ignored_warning:Rrt,source_refdes_convention_warning:N2e,source_simple_ammeter:Qrt,source_simple_battery:m2e,source_simple_capacitor:u2e,source_simple_chip:h2e,source_simple_connector:Mrt,source_simple_connector_standards:Prt,source_simple_crystal:wrt,source_simple_current_source:brt,source_simple_diode:Ene,source_simple_fiducial:Ert,source_simple_fuse:Srt,source_simple_ground:Brt,source_simple_inductor:_2e,source_simple_led:d2e,source_simple_mosfet:b2e,source_simple_op_amp:S2e,source_simple_pin_header:C2e,source_simple_pinout:y2e,source_simple_potentiometer:I2e,source_simple_power_source:p2e,source_simple_push_button:f2e,source_simple_resistor:g2e,source_simple_resonator:x2e,source_simple_switch:Q2e,source_simple_test_point:B2e,source_simple_transistor:E2e,source_simple_voltage_probe:Trt,source_simple_voltage_source:Frt,source_trace:Grt,source_trace_not_connected_error:P2e,source_unnamed_trace_warning:Wrt,spice_simulation_options:gAt,supplier_footprint_mismatch_warning:nxe,supplier_name:qM,time:dBn,timestamp:lrt,unknown_error_finding_part:Zrt,visible_layer:Km,voltage:O_,wave_shape:lxe},Symbol.toStringTag,{value:"Module"}));var MAt={in:25.4,inch:25.4,mil:.0254,mm:1,m:1e3,cm:10,ft:304.8,feet:304.8},KA=t=>{let e=typeof t=="number"?"mm":t.replace(/^[^a-zA-Z]+/g,"").toLowerCase();e||(e="mm");const n=typeof t=="number"?t:Number.parseFloat(t.split(e)[0]);if(e in MAt)return n*MAt[e];throw new Error(`Unsupported unit: ${e}`)},sd=KA,ZBn=Object.defineProperty,e9n=(t,e)=>{for(var n in e)ZBn(t,n,{get:e[n],enumerable:!0})},w8={};e9n(w8,{axial:()=>J7n,bga:()=>W9n,breakoutheaders:()=>l6n,cap:()=>f9n,crystal:()=>C9n,d2pak:()=>kAt,dfn:()=>v7n,diode:()=>_9n,dip:()=>a9n,dpak:()=>TAt,electrolytic:()=>ASn,fpc:()=>uSn,hc49:()=>d6n,headermodule:()=>P7n,jst:()=>Ebn,lcc:()=>tQn,led:()=>y9n,led2835:()=>E9n,led5050:()=>b9n,lga:()=>A6n,lqfp:()=>s6n,m2host:()=>zSn,melf:()=>M8n,micromelf:()=>T8n,minimelf:()=>E8n,mlp:()=>r7n,mountedpcbmodule:()=>WSn,ms012:()=>T7n,ms013:()=>F7n,msop:()=>Nbn,pad:()=>h6n,pinrow:()=>ZAt,platedhole:()=>RSn,potentiometer:()=>rSn,pushbutton:()=>e6n,qfn:()=>n7n,qfp:()=>i7n,quad:()=>eD,radial:()=>$7n,res:()=>z9n,rj45:()=>X7n,sma:()=>H8n,smb:()=>J8n,smbf:()=>dSn,smc:()=>q8n,smdpads:()=>BSn,smdpinheader:()=>DSn,smdpushbutton:()=>SSn,smdslideswitch:()=>PSn,smf:()=>U8n,smtpad:()=>xSn,sod110:()=>bbn,sod123:()=>U7n,sod123f:()=>$6n,sod123fl:()=>e8n,sod123w:()=>P6n,sod128:()=>A8n,sod323:()=>R6n,sod323f:()=>z6n,sod323fl:()=>Hbn,sod323w:()=>Tbn,sod523:()=>C6n,sod723:()=>i8n,sod80:()=>S6n,sod882:()=>Y6n,sod882d:()=>Q8n,sod923:()=>L6n,soic:()=>$9n,solderjumper:()=>$bn,son:()=>Ubn,sop8:()=>B6n,sot:()=>kSn,sot143:()=>HSn,sot223:()=>tbn,sot23:()=>y7n,sot23w:()=>lbn,sot25:()=>b7n,sot323:()=>fSn,sot343:()=>YSn,sot363:()=>h7n,sot457:()=>Zbn,sot563:()=>N7n,sot723:()=>H7n,sot886:()=>_7n,sot89:()=>f8n,sot963:()=>nSn,ssop:()=>A7n,stampboard:()=>n6n,stampreceiver:()=>r6n,to220:()=>rct,to220f:()=>y8n,to252:()=>u9n,to263:()=>g9n,to92:()=>f6n,to92l:()=>XSn,to92s:()=>mbn,tqfp:()=>o7n,tssop:()=>u7n,usbcmidmount:()=>eQn,vson:()=>Vbn,vssop:()=>Pbn,wson:()=>jbn});var yi=(t,e,n)=>({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:"silkscreen_text_1",font:"tscircuit2024",font_size:n,pcb_component_id:"pcb_component_1",text:"{REF}",layer:"top",anchor_position:{x:t,y:e},anchor_alignment:"center"}),fV=Z().or(dn(rd())).transform(t=>Array.isArray(t)?t:(t.startsWith("(")&&t.endsWith(")")&&(t=t.slice(1,-1)),t.split(",").map(e=>{const n=Number(e);return isNaN(n)?e:n}))).pipe(dn(Z().or(_t()))),t9n=Kn(["leftside","rightside"]),n9n=Kn(["topside","bottomside"]),o9n=Kn(["left","right"]),i9n=Kn(["top","bottom"]),DAt=fV.pipe(xo([fQ([t9n,i9n]),fQ([n9n,o9n])])),Ii=Pt({norefdes:je().optional().describe("disable reference designator label"),invert:je().optional().describe("install the part backwards: for a pin header, the LONG pins pass through the board instead of the short ones. It does not change which side of the board the part is on — that is the component's `layer`"),faceup:je().optional().describe("DEPRECATED, and a no-op for through-hole parts. It meant 'the male pin header should face upwards, out of the top layer', which is what a correctly mounted header does by default; its other effect was to delete the pins below the board, leaving a through-hole part that cannot be soldered into its own plated holes. Use `layer` for which side of the board a part is on, and `invert` to install it backwards"),nosilkscreen:je().optional().describe("omit all silkscreen elements from the footprint"),rounded:ce.refine(t=>t>=0,{message:"rounded radius must be non-negative"}).optional().describe("corner radius applied to all rectangular copper pads"),pin1location:DAt.optional().describe("rotate the footprint to place pin 1 on a requested side"),cathodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe("identify which diode pad is the cathode"),anodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe("identify which diode pad is the anode")}),ks=(t,e,n,o,i)=>({pcb_plated_hole_id:"",type:"pcb_plated_hole",shape:"circle",x:e,y:n,hole_diameter:KA(o),outer_diameter:KA(i),pcb_port_id:"",layers:["top","bottom"],port_hints:[t.toString()]}),yy=t=>{const{pn:e,x:n,y:o,holeDiameter:i,rectPadWidth:r,rectPadHeight:s,holeOffsetX:a=0,holeOffsetY:A=0,rectBorderRadius:c}=t;return{pcb_plated_hole_id:"",type:"pcb_plated_hole",shape:"circular_hole_with_rect_pad",x:n,y:o,hole_diameter:KA(i),hole_shape:"circle",pad_shape:"rect",rect_pad_width:KA(r),rect_pad_height:KA(s),...c!==void 0&&{rect_border_radius:c},pcb_port_id:"",layers:["top","bottom"],port_hints:[e.toString()],hole_offset_x:a,hole_offset_y:A}},Pne=Array.from({length:9},(t,e)=>Math.cos(e/8*Math.PI-Math.PI)).map(t=>({x:t,y:-Math.sqrt(1-t**2)})),xy=t=>{if(t.length<2)throw new Error("Rect union outline requires at least two bounds");for(const c of t)if(c.minX>=c.maxX||c.minY>=c.maxY)throw new Error("Each rectangle bound must have min < max on both axes");for(let c=1;c<t.length;c++){const l=t[c-1],u=t[c];if(u.minX<l.minX||u.maxX>l.maxX||u.minY>l.minY||u.maxY<l.maxY)throw new Error("Bounds must be ordered outer-to-inner with tighter X and larger Y span")}const e=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].maxY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.maxY}),c.push({x:g.minX,y:g.maxY}),l-=1}return c},n=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].maxY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.maxY}),c.push({x:g.maxX,y:g.maxY}),l-=1}return c},o=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].minY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.minY}),c.push({x:g.maxX,y:g.minY}),l-=1}return c},i=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].minY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.minY}),c.push({x:g.minX,y:g.minY}),l-=1}return c},r=e(),s=n(),a=o(),A=i();return[...r.reverse(),...s,...a.reverse(),...A]};function xQ(t){return typeof t=="string"?t.trim().toLowerCase().endsWith("mil")?parseFloat(t)*.0254:parseFloat(t):Number(t)}var Mne=xo([Z(),_t()]).transform(t=>xQ(t)),r9n=t=>Ii.extend({fn:Z(),num_pins:_t().optional().default(6),wide:je().optional(),narrow:je().optional(),w:Mne.optional(),p:Mne.default(t.p??"2.54mm"),id:Mne.optional(),od:Mne.optional(),nosquareplating:je().optional().default(!1).describe("do not use rectangular pad for pin 1")}).transform(e=>(!e.id&&!e.od?Math.abs(e.p-1.27)<.01?(e.id=xQ("0.55mm"),e.od=xQ("0.95mm")):(e.id=xQ("0.8mm"),e.od=xQ("1.6mm")):e.id?e.od||(e.od=e.id*(1.5/1)):e.id=e.od*(1/1.5),e.w||(e.wide?e.w=xQ("600mil"):e.narrow?e.w=xQ("300mil"):e.w=xQ(t.w??"300mil")),e)),s9n=r9n({}),NAt=(t,e,n,o,i)=>{const r=t/2,s=e<=r,a=r-1,A=o,c=A*a;return s?{x:-n/2,y:c/2-(e-1)*A}:{x:n/2,y:-c/2+(e-r-1)*A}},a9n=t=>{const e=s9n.parse(t),n=[];for(let _=0;_<e.num_pins;_++){const{x:f,y:I}=NAt(e.num_pins,_+1,e.w,e.p??2.54,e.nosquareplating);if(_===0&&!e.nosquareplating){n.push(yy({pn:_+1,x:f,y:I,holeDiameter:e.id??"0.8mm",rectPadWidth:e.od??"1mm",rectPadHeight:e.od??"1mm"}));continue}n.push(ks(_+1,f,I,e.id??"0.8mm",e.od??"1mm"))}const o=(e.num_pins/2-1)*e.p+e.od,r=e.w-e.od-1,s=(e.num_pins/2-1)*e.p+e.od+.4,a={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...Pne.map(({x:_,y:f})=>({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}],type:"pcb_silkscreen_path",stroke_width:.1},A=[];for(let _=0;_<e.num_pins;_++){const f=_+1,I=f<=e.num_pins/2,C=NAt(e.num_pins,f,e.w,e.p??2.54,e.nosquareplating),y=.6,x=I?C.x-e.od/2-y:C.x+e.od/2+y,E=.3;A.push({type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:`pin_${f}`,layer:"top",pcb_component_id:`pin_${f}`,text:`{pin${f}}`,anchor_position:{x,y:C.y+E/2},font_size:E,font:"tscircuit2024",anchor_alignment:I?"top_right":"top_left"})}const c=yi(0,s/2+.5,.4),l=e.w+e.od,u=o,g=l/2+.25,h=g,d=u/2+.72,p=d,m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:xy([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:"top"};return{circuitJson:[...n,a,c,...A,m],parameters:e}},Jo=(t,e,n,o,i,r)=>({type:"pcb_smtpad",x:e,y:n,width:o,height:i,layer:"top",shape:"rect",...r!==void 0&&{corner_radius:r},pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(s=>s.toString()):[t.toString()]}),iA=(t,e={})=>({type:"pcb_silkscreen_path",layer:e.layer||"top",pcb_component_id:e.pcb_component_id||"",pcb_silkscreen_path_id:e.pcb_silkscreen_path_id||"",route:t,stroke_width:e.stroke_width||.1}),A9n=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(6)]).default(3),p:ce.default("2.29mm").describe("pitch between adjacent lead positions"),pw:ce.default("1.6mm").describe("lead pad width along the pin column"),pl:ce.default("3mm").describe("lead pad length toward the package"),tabw:ce.default("6.2mm").describe("large tab pad width"),tabh:ce.default("5.8mm").describe("large tab pad height"),span:ce.default("6.85mm").describe("center-to-center distance from the leads to the tab"),w:ce.default("6.6mm").describe("package body width"),h:ce.default("6.5mm").describe("package body height"),string:Z().optional()}),c9n={p:"2.54mm",pw:"1.5mm",pl:"3.5mm",tabw:"8.38mm",tabh:"10.7mm",span:"10.21mm",w:"10.1mm",h:"10.1mm"},l9n=t=>{if(t.num_pins===3||t.num_pins===6)return t.num_pins;const e=t.string?.match(/^(?:d2pak|to252|to263)_(\d+)/i),n=Number.parseInt(e?.[1]??"3",10);return n===5||n===6?6:3},RAt=(t,e)=>{const n=A9n.parse({...e,...t,num_pins:l9n(t)}),{num_pins:o,p:i,pw:r,pl:s,tabw:a,tabh:A,span:c,w:l,h:u}=n,g=o===3?2:5,h=-c/2,d=c/2,p=[];for(let M=0;M<g;M++){const k=o===3?M*2+1:M+1,R=o===3?(1-M*2)*i:((g-1)/2-M)*i;p.push(Jo(k,h,R,s,r))}p.push(Jo(o===3?2:6,d,0,a,A));const m=-l/2,_=l/2,f=Math.min(h-s/2,d-a/2),I=Math.max(h+s/2,d+a/2),C=(o===3?i:(g-1)/2*i)+r/2,y=Math.max(C,A/2),x=Math.max(y,u/2)+.2,E=[iA([{x:m,y:x},{x:_,y:x}]),iA([{x:m,y:-x},{x:_,y:-x}]),iA([{x:h-.3,y:x+.15},{x:h,y:x+.45},{x:h+.3,y:x+.15}])],B=Math.min(f,m)-.25,S=Math.max(I,_)+.25,Q=Math.max(y,u/2)+.25,w={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(B+S)/2,y:0},width:S-B,height:Q*2,layer:"top"};return{circuitJson:[...p,...E,yi(0,Q+.55,.5),w],parameters:n}},TAt=t=>RAt(t),kAt=t=>RAt(t,c9n),u9n=TAt,g9n=kAt,FAt=[{imperial:"01005",metric:"0402",p_mm_min:.5,pw_mm_min:.4,ph_mm_min:.3,w_mm_min:.58,h_mm_min:.21,courtyard_width_mm:1.2,courtyard_height_mm:.6},{imperial:"0504",metric:"1310",p_mm_min:1.1,pw_mm_min:.65,ph_mm_min:1.3,w_mm_min:.58,h_mm_min:.21},{imperial:"1812",metric:"4532",p_mm_min:4.275,pw_mm_min:1.125,ph_mm_min:3.4,w_mm_min:5.4,h_mm_min:3.4,courtyard_width_mm:5.9,courtyard_height_mm:3.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.386252,line_y_mm:1.71,stroke_width_mm:.12}},{imperial:"0201",metric:"0603",p_mm_min:.66,pw_mm_min:.46,ph_mm_min:.4,w_mm_min:.9,h_mm_min:.3,courtyard_width_mm:1.4,courtyard_height_mm:.7,rounded_pads:!0},{imperial:"0402",metric:"1005",p_mm_min:1.02,pw_mm_min:.54,ph_mm_min:.64,w_mm_min:1.56,h_mm_min:.64,courtyard_width_mm:1.86,courtyard_height_mm:.94,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.153641,line_y_mm:.38,stroke_width_mm:.12}},{imperial:"0603",metric:"1608",p_mm_min:1.65,pw_mm_min:.8,ph_mm_min:.95,w_mm_min:2.45,h_mm_min:.95,courtyard_width_mm:2.96,courtyard_height_mm:1.46,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.237258,line_y_mm:.5225,stroke_width_mm:.12}},{imperial:"0805",metric:"2012",p_mm_min:1.825,pw_mm_min:1.025,ph_mm_min:1.4,w_mm_min:2.8499999999999996,h_mm_min:1.4,courtyard_width_mm:3.36,courtyard_height_mm:1.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.227064,line_y_mm:.735,stroke_width_mm:.12}},{imperial:"1206",metric:"3216",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:1.75,w_mm_min:4.05,h_mm_min:1.75,courtyard_width_mm:4.56,courtyard_height_mm:2.26,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.727064,line_y_mm:.91,stroke_width_mm:.12}},{imperial:"1210",metric:"3225",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:2.65,w_mm_min:4.05,h_mm_min:2.65,courtyard_width_mm:4.56,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.723737,line_y_mm:1.355,stroke_width_mm:.12}},{imperial:"2010",metric:"5025",p_mm_min:4.625,pw_mm_min:1.225,ph_mm_min:2.65,w_mm_min:5.85,h_mm_min:2.65,courtyard_width_mm:6.36,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.527064,line_y_mm:1.36,stroke_width_mm:.12}},{imperial:"2512",metric:"6332",p_mm_min:5.925,pw_mm_min:1.225,ph_mm_min:3.35,w_mm_min:7.15,h_mm_min:3.35,courtyard_width_mm:7.66,courtyard_height_mm:3.86,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:2.177064,line_y_mm:1.71,stroke_width_mm:.12}}],d9n=Object.fromEntries(FAt.map(t=>[t.metric,t])),h9n=Object.fromEntries(FAt.map(t=>[t.imperial,t])),LAt=(t,e)=>({type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:t,height:e,layer:"top"});Ii.extend({fn:Z().optional(),string:Z().optional(),tht:je(),p:ce.optional(),pw:ce.optional(),ph:ce.optional(),metric:lt.optional(),imperial:lt.optional(),w:ce.optional(),h:ce.optional(),cyw:ce.optional().describe("courtyard width"),cyh:ce.optional().describe("courtyard height"),nonpolarized:je().optional(),textbottom:je().optional(),roundedPads:je().optional()});var Dne=t=>{let{fn:e,tht:n,p:o,pw:i,ph:r,metric:s,imperial:a,w:A,h:c,cyw:l,cyh:u,nonpolarized:g,textbottom:h,roundedPads:d,string:p}=t;if(typeof A=="string"&&(A=sd(A)),typeof c=="string"&&(c=sd(c)),typeof l=="string"&&(l=sd(l)),typeof u=="string"&&(u=sd(u)),typeof o=="string"&&(o=sd(o)),typeof i=="string"&&(i=sd(i)),typeof r=="string"&&(r=sd(r)),c!==void 0&&A!==void 0&&c>A)throw new Error("height cannot be greater than width (rotated footprint not yet implemented)");let m;if(s&&(m=d9n[s]),a&&(m=h9n[a]),m&&(A=m.w_mm_min,c=m.h_mm_min,o=m.p_mm_min,i=m.pw_mm_min,r=m.ph_mm_min),o===void 0||i===void 0||r===void 0)throw new Error("Could not determine required pad dimensions (p, pw, ph)");let _=[];const f=e==="res"&&(g===!0||typeof p!="string"||/^res(?:\d{4}|\d{5})(?:_|$)/i.test(p))?m?.nonpolarizedSilkscreen:void 0;if(f?.stroke_width_mm){const{line_half_length_mm:B=0,line_y_mm:S=0,stroke_width_mm:Q}=f;_=[{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-B,y:S},{x:B,y:S}],stroke_width:Q,pcb_silkscreen_path_id:""},{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-B,y:-S},{x:B,y:-S}],stroke_width:Q,pcb_silkscreen_path_id:""}]}else _=[{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:o/2,y:r/2+.4},{x:-o/2-i/2-.2,y:r/2+.4},{x:-o/2-i/2-.2,y:-r/2-.4},{x:o/2,y:-r/2-.4}],stroke_width:.1,pcb_silkscreen_path_id:""}];const I=h?-r/2-.9:r/2+.9,C=yi(0,I,.2),y=m?.courtyard_width_mm&&m.courtyard_height_mm?LAt(m.courtyard_width_mm,m.courtyard_height_mm):l!==void 0&&u!==void 0?LAt(l,u):null,E=d??m?.rounded_pads??!1?Math.min(.125,Math.min(i,r)/8):void 0;return n?[ks(1,-o/2,0,i,i*1/.8),ks(2,o/2,0,i,i*1/.8),..._,C,...y?[y]:[]]:[Jo(["1","left"],-o/2,0,i,r,E),Jo(["2","right"],o/2,0,i,r,E),..._,C,...y?[y]:[]]},p9n=t=>{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)r.type==="pcb_smtpad"&&(e=Math.min(e,r.x-r.width/2),n=Math.max(n,r.x+r.width/2),o=Math.min(o,r.y-r.height/2),i=Math.max(i,r.y+r.height/2)),r.type==="pcb_plated_hole"&&(e=Math.min(e,r.x-r.outer_diameter/2),n=Math.max(n,r.x+r.outer_diameter/2),o=Math.min(o,r.y-r.outer_diameter/2),i=Math.max(i,r.y+r.outer_diameter/2));if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(i))throw new Error("Could not determine diode copper bounds");return{minX:e,maxX:n,minY:o,maxY:i}},HAt=(t,e={})=>Nne(p9n(t),e),m9n=({anodePin:t,cathodePin:e})=>{if(t!==void 0&&t!==1&&t!==2)throw new Error("Diode anode pin must be 1 or 2");if(e!==void 0&&e!==1&&e!==2)throw new Error("Diode cathode pin must be 1 or 2");if(t!==void 0&&e!==void 0){if(t===e)throw new Error("Diode anode and cathode cannot use the same pin");return e}if(e!==void 0)return e;if(t===1)return 2;if(t===2)return 1},Xd=t=>{const e=t.p??t.pad_spacing;if(e===void 0||t.pl===void 0||t.pw===void 0)throw new Error("Diode fabrication note requires p or pad_spacing, pl, and pw");const n=ce.parse(e),o=ce.parse(t.pl),i=ce.parse(t.pw);return Nne({minX:-n/2-o/2,maxX:n/2+o/2,minY:-i/2,maxY:i/2},{anodePin:t.anodepin,cathodePin:t.cathodepin})},Nne=(t,e={})=>{const n=[],o=t.maxX-t.minX,i=t.maxY-t.minY,r=(t.minX+t.maxX)/2,s=(t.minY+t.maxY)/2,A=m9n(e)===1?x=>2*r-x:x=>x,c=i*.28,l=c*2,u=o*.2,h=Math.min(u,l*1.25),d=r-h/2,p=r+h/2,m=h*.18,_=d+m,f=p-m,I=Math.max(Math.min(o,i)*.035,.01),C=Math.max(Math.min(o,i)*.25,.1),y=x=>e.idSuffix?`${x}_${e.idSuffix}`:x;return n.push({type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_anode_leg"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(d),y:s},{x:A(_),y:s}]},{type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_triangle"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(_),y:s+c},{x:A(f),y:s},{x:A(_),y:s-c},{x:A(_),y:s+c}]},{type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_cathode"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(f),y:s+c},{x:A(f),y:s-c}]},{type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_cathode_leg"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(f),y:s},{x:A(p),y:s}]},{type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:y("diode_fabrication_note_positive"),pcb_component_id:"",layer:"top",font:"tscircuit2024",font_size:C,text:"+",anchor_position:{x:A(t.minX+o*.125),y:s},anchor_alignment:"center"},{type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:y("diode_fabrication_note_negative"),pcb_component_id:"",layer:"top",font:"tscircuit2024",font_size:C,text:"-",anchor_position:{x:A(t.maxX-o*.125),y:s},anchor_alignment:"center"}),n},_9n=t=>{const e=Dne({...t,roundedPads:!0});return{circuitJson:e.concat(HAt(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})),parameters:t}},f9n=t=>({circuitJson:Dne(t),parameters:t}),I9n=Ii.extend({fn:$e("crystal"),num_pins:$e(4).default(4),px:ce.default("2.2mm").describe("horizontal pad center pitch"),py:ce.default("1.7mm").describe("vertical pad center pitch"),pw:ce.default("1.4mm").describe("pad width"),ph:ce.default("1.2mm").describe("pad height")}),C9n=t=>{const e=I9n.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Jo(1,-n/2,-o/2,i,r),Jo(2,n/2,-o/2,i,r),Jo(3,n/2,o/2,i,r),Jo(4,-n/2,o/2,i,r)],a=(n+i)/2+.2,A=(o+r)/2+.2,c=iA([{x:-a,y:-A},{x:a,y:-A},{x:a,y:A},{x:-a,y:A},{x:-a,y:-A}]),l=yi(0,A+.6,.5),u={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:"top"};return{circuitJson:[...s,c,l,u],parameters:e}},y9n=t=>{const e=Dne(t);return{circuitJson:e.concat(HAt(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})).map(o=>o.type!=="pcb_silkscreen_path"?o:{...o,route:o.route.map(i=>({...i,x:-i.x}))}),parameters:t}},x9n=Ii.extend({fn:$e("led2835"),num_pins:$e(2).default(2),p1w:ce.default("2.2mm").describe("pin 1 (anode) pad width"),p2w:ce.default("1.25mm").describe("pin 2 (cathode) pad width"),ph:ce.default("2.2mm").describe("pad height"),p1x:ce.default("-0.9mm").describe("pin 1 pad center x"),p2x:ce.default("1.375mm").describe("pin 2 pad center x"),w:ce.default("3.5mm").describe("package body width"),h:ce.default("2.8mm").describe("package body height")}),E9n=t=>{const e=x9n.parse(t),{p1w:n,p2w:o,ph:i,p1x:r,p2x:s,w:a,h:A}=e,c=[Jo(1,r,0,n,i),Jo(2,s,0,o,i)],l=a/2+.45,u=A/2+.2,g=[iA([{x:s-o/2,y:-u},{x:-l,y:-u},{x:-l,y:u},{x:s-o/2,y:u}])],h=yi(0,u+.8,.5),d={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(r-n/2+s+o/2)/2,y:0},width:s+o/2-(r-n/2)+.5,height:Math.max(A,i)+.5,layer:"top"},p=Nne({minX:Math.min(r-n/2,s-o/2),maxX:Math.max(r+n/2,s+o/2),minY:-i/2,maxY:i/2},{anodePin:e.anodepin,cathodePin:e.cathodepin});return{circuitJson:[...c,...g,h,d,...p],parameters:e}},B9n=Ii.extend({fn:$e("led5050"),num_pins:$e(6).default(6),p:ce.default("1.7mm").describe("pin pitch along each column"),rowspan:ce.default("4.8mm").describe("distance between pad columns"),pl:ce.default("2mm").describe("pad length across the package edge"),pw:ce.default("1.1mm").describe("pad width along the pin column"),w:ce.default("5mm").describe("package body width"),h:ce.default("5mm").describe("package body height")}),b9n=t=>{const e=B9n.parse(t),{p:n,rowspan:o,pl:i,pw:r,w:s,h:a}=e,A=[];for(let m=0;m<3;m++)A.push(Jo(m+1,-o/2,n-m*n,i,r)),A.push(Jo(6-m,o/2,n-m*n,i,r));const c=s/2,l=a/2+.2,u=[iA([{x:-c,y:l},{x:c,y:l}]),iA([{x:-c,y:-l},{x:c,y:-l}]),iA([{x:-o/2-i/2-.4,y:n+r/2},{x:-o/2-i/2-.4,y:n-r/2}])],g=yi(0,l+.8,.5),h={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:o+i+.5,height:Math.max(a,2*n+r)+.5,layer:"top"},p=[{color:"green",y:n},{color:"red",y:0},{color:"blue",y:-n}].flatMap(({color:m,y:_})=>Nne({minX:-o/2-i/2,maxX:o/2+i/2,minY:_-r/2,maxY:_+r/2},{idSuffix:m}));return{circuitJson:[...A,...u,g,h,...p],parameters:e}},Vk=t=>{const{padSpacing:e,padWidth:n,padHeight:o,padPitch:i,numRows:r,textbottom:s,courtyardOutline:a}=t,A=[],c=(r-1)*(i/2);for(let Q=0;Q<r;Q++)A.push(c-Q*i);const l=[];A.forEach((Q,w)=>{l.push(Jo(w+1,-e/2,Q,n,o))}),A.slice().reverse().forEach((Q,w)=>{l.push(Jo(w+r+1,e/2,Q,n,o))});const u=Math.max(...A)+o/2+.4,g=Math.min(...A)-o/2-.4,h=-e/2-n/2-.4,d=e/2+n/2+.4,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d*.5,y:u},{x:h*.5,y:u}],stroke_width:.12,pcb_silkscreen_path_id:"silkscreen_top"},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d*.5,y:g},{x:h*.5,y:g}],stroke_width:.12,pcb_silkscreen_path_id:"silkscreen_bottom"},_=-e/2,f=Math.max(...A),I=.2,C=_-n/2-.1,y=f+o/2+.1,x={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_marker",route:[{x:C,y},{x:C-I,y},{x:C,y:y+I},{x:C,y}],stroke_width:.1},E=s?g-.9:u+.9,B=yi(0,E,.2),S=a?{type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:a}:null;return[...l,p,m,x,B,...S?[S]:[]]},S9n=Ii.extend({pw:ce.default("0.5mm"),ph:ce.default("0.4mm"),p:ce.default("0.7mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Q9n=1,v9n=t=>{const e=S9n.parse(t);if(e.concave===!0)return[];const n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:Q9n,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:.95},{x:-1,y:-.95},{x:1,y:-.95},{x:1,y:.95}]})},w9n=Ii.extend({pw:ce.default("0.5mm"),ph:ce.default("0.32mm"),p:ce.default("0.5mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),P9n=1,M9n=t=>{const e=w9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:P9n,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:1.25},{x:-1,y:-1.25},{x:1,y:-1.25},{x:1,y:1.25}]})},D9n=Ii.extend({pw:ce.default("0.9mm"),ph:ce.default("0.4mm"),p:ce.default("0.8mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),N9n=1.7,R9n=t=>{const e=D9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:N9n,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.05},{x:-1.55,y:-1.05},{x:1.55,y:-1.05},{x:1.55,y:1.05}]})},T9n=Ii.extend({pw:ce.default("0.9mm"),ph:ce.default("0.4mm"),p:ce.default("0.8mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),k9n=1.7,F9n=t=>{const e=T9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:k9n,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.88},{x:-1.55,y:-1.87},{x:1.55,y:-1.87},{x:1.55,y:1.88}]})},L9n=Ii.extend({pw:ce.default("0.7mm"),ph:ce.default("0.64mm"),p:ce.default("0.94mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),H9n=1.4,O9n=t=>{const e=L9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:H9n,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.3,y:1.05},{x:-1.3,y:-1.05},{x:1.3,y:-1.05},{x:1.3,y:1.05}]})},G9n=Ii.extend({pw:ce.default("0.9mm"),ph:ce.default("0.9mm"),p:ce.default("1.34mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Y9n=3,U9n=t=>{const e=G9n.parse(t),n=sd(e.pw),o=sd(e.ph),i=sd(e.p);return Vk({padSpacing:Y9n,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-2.21,y:2.85},{x:-2.21,y:-2.85},{x:2.2,y:-2.85},{x:2.2,y:2.85}]})},K9n=t=>{const e=t.array??t.x;if(typeof e=="number")return Number.isNaN(e)?void 0:e;if(typeof e=="string"){const n=Number.parseInt(e,10);return Number.isNaN(n)?void 0:n}if(typeof t.imperial=="string"){const o=t.imperial.match(/x(2|4)$/)?.[1];if(o)return Number.parseInt(o,10)}},V9n=t=>t?(typeof t=="number"?`${t}`:t).split(/[_x]/)[0]:void 0,z9n=t=>{const e=K9n(t),n=V9n(t.imperial);return e===2&&n==="0402"?{circuitJson:v9n(t),parameters:t}:e===4&&n==="0402"?{circuitJson:M9n(t),parameters:t}:e===2&&n==="0603"?{circuitJson:R9n(t),parameters:t}:e===4&&n==="0603"?{circuitJson:F9n(t),parameters:t}:e===2&&n==="0606"?{circuitJson:O9n(t),parameters:t}:e===4&&n==="1206"?{circuitJson:U9n(t),parameters:t}:{circuitJson:Dne(t),parameters:t}},OAt=(t,{x:e,y:n,radius:o})=>({type:"pcb_smtpad",x:e,y:n,radius:o,layer:"top",shape:"circle",pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(i=>i.toString()):[t.toString()]}),GAt="ABCDEFGHIJKLMNOPQRSTUVWXYZ",K4=Z().transform(t=>{const[e,n]=t.split(/[x ]/);return{x:parseFloat(e??""),y:parseFloat(n??"")}}).pipe(Pt({x:_t(),y:_t()})),J9n=Ii.extend({fn:Z(),num_pins:_t().optional().default(64),grid:K4.optional(),p:lt.default("0.8mm"),w:ce.optional(),h:ce.optional(),ball:ce.optional().describe("ball diameter"),pad:ce.optional().describe("pad width/height"),circularpads:je().optional().default(!0).describe("use circular pads"),tlorigin:je().optional(),blorigin:je().optional(),trorigin:je().optional(),brorigin:je().optional(),missing:fV.default([])}).transform(t=>{let e="tl";if(t.blorigin&&(e="bl"),t.trorigin&&(e="tr"),t.brorigin&&(e="br"),!t.grid){const o=Math.ceil(Math.sqrt(t.num_pins));t.grid={x:o,y:o}}return t.missing&&(t.missing=t.missing.map(o=>{if(typeof o=="number")return o;if(o==="center")return"center";if(o==="topleft")return"topleft";const i=o.match(/([A-Z]+)(\d+)/);if(!i)return o;const r=GAt.indexOf(i[1]),s=Number.parseInt(i[2])-1;return r*t.grid.x+s+1})),{...t,origin:e}}),W9n=t=>{const e=J9n.parse(t);let{num_pins:n,grid:o,p:i,w:r,h:s,ball:a,pad:A,missing:c}=e;a??=.75/1.27*i,A??=e.ball===void 0?i*.5:a*.8;const l=[],u=(c??[]).filter(Y=>typeof Y=="number"),g=o.x*o.y-n;if(c.length===0&&g>0&&(Math.sqrt(g)%1===0?c.push("center"):g===1&&c.push("topleft")),c?.includes("center")){const Y=Math.floor(Math.sqrt(g)),W=Math.floor((o.x-Y)/2),te=Math.floor((o.y-Y)/2);for(let j=te;j<te+Y;j++)for(let J=W;J<W+Y;J++)u.push(j*o.x+J+1)}c?.includes("topleft")&&u.push(1);const h=new Set(u);let d=0;for(let Y=0;Y<o.y;Y++)for(let W=0;W<o.x;W++){const te=(W-(o.x-1)/2)*i,j=(Y-(o.y-1)/2)*i;let J=W,oe=Y;switch(e.origin){case"bl":J=W,oe=o.y-1-Y;break;case"br":J=o.x-1-W,oe=o.y-1-Y;break;case"tr":J=o.x-1-W,oe=Y;break}let ie=oe*o.x+J+1;if(h.has(ie)){d++;continue}ie-=d;const ne=[ie,`${GAt[oe]}${J+1}`];l.push(e.circularpads?OAt(ne,{x:te,y:j,radius:A/2}):Jo(ne,te,j,A,A))}const p=yi(0,o.y*i/2,.2),m=i/6;let _;const f=o.x*i/2,I=o.y*i/2;switch(e.origin){case"bl":_=[{x:-f,y:-I},{x:-f,y:-I-m},{x:-f-m,y:-I},{x:-f,y:-I}];break;case"br":_=[{x:f,y:-I},{x:f,y:-I-m},{x:f+m,y:-I},{x:f,y:-I}];break;case"tr":_=[{x:f,y:I},{x:f,y:I+m},{x:f+m,y:I},{x:f,y:I}];break;default:_=[{x:-f,y:I},{x:-f,y:I+m},{x:-f-m,y:I},{x:-f,y:I}];break}const C={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_marker",route:_,stroke_width:.05},y=(o.x-1)*i+A,x=(o.y-1)*i+A,E=r??y,B=s??x,S=Math.max(y/2,E/2),Q=Math.max(x/2,B/2),w=1.715,M=1.765,k=S+w,R=k,F=Q+M,O=F,U={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:xy([{minX:-k,maxX:k,minY:-O,maxY:O},{minX:-R,maxX:R,minY:-F,maxY:F}]),layer:"top"};return{circuitJson:[...l,p,C,U],parameters:e}},XM=(t,e,n,o,i)=>({type:"pcb_smtpad",x:e,y:n,width:o,height:i,radius:Math.min(o,i)/2,layer:"top",shape:"pill",pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(r=>r.toString()):[t.toString()]}),zk={thermalpadcenteroffsetx:ce.optional().default(0),thermalpadcenteroffsety:ce.optional().default(0)},EQ=(t,e)=>Jo(["thermalpad"],e.x,e.y,t.x,t.y),ZM=t=>Ii.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(t.w??"5.3mm")),p:ce.default(ce.parse(t.p??"1.27mm")),pw:ce.default(ce.parse(t.pw??"0.6mm")),pl:ce.default(ce.parse(t.pl??"1.0mm")),legsoutside:je().optional().default(t.legsoutside??!1),pillpads:je().optional().default(t.pillpads??!1),thermalpad:K4.optional(),...zk,silkscreen_stroke_width:_t().optional().default(.1)}).transform(e=>(!e.pw&&!e.pl?(e.pw=ce.parse("0.6mm"),e.pl=ce.parse("1.0mm")):e.pw?e.pl||(e.pl=e.pw*(1/.6)):e.pw=e.pl*(.6/1),e)),j9n=ZM({}),hxe=t=>{t.widthincludeslegs!==void 0&&(t.legsoutside=!t.widthincludeslegs);const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n<=a,c=a-1,l=i,u=l*c,g=s?r/2:-r/2;return A?{x:-o/2-g,y:u/2-(n-1)*l}:{x:o/2+g,y:-u/2+(n-a-1)*l}},$9n=t=>{const e=j9n.parse(t);return{circuitJson:IV(e),parameters:e}},IV=t=>{const e=[],n=Math.min(t.pl,t.pw)/8;let o=0,i=0;for(let _=0;_<t.num_pins;_++){const{x:f,y:I}=hxe({num_pins:t.num_pins,pn:_+1,w:t.w,p:t.p,pl:t.pl,legsoutside:t.legsoutside});o=Math.max(o,Math.abs(f)+t.pl/2),i=Math.max(i,Math.abs(I)+t.pw/2),t.pillpads?e.push(XM(_+1,f,I,t.pl,t.pw)):e.push(Jo(_+1,f,I,t.pl,t.pw,n))}t.thermalpad&&e.push(EQ(t.thermalpad,{x:t.thermalpadcenteroffsetx,y:t.thermalpadcenteroffsety}));const r=Math.min(1,t.p/2),s=t.w-(t.legsoutside?0:t.pl*2)-.2,a=(t.num_pins/2-1)*t.p+t.pw+r,A=yi(0,a/2+.4,a/12),c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",stroke_width:t.silkscreen_stroke_width??.1,route:[{x:-s/2,y:-a/2},{x:-s/2,y:a/2},...Pne.map(({x:_,y:f})=>({x:_*s/6,y:f*s/6+a/2})),{x:s/2,y:a/2},{x:s/2,y:-a/2},{x:-s/2,y:-a/2}]},l=t.w/2,u=a/2,g=Math.max(o,l)+.25,h=Math.min(i,u)+.25,d=Math.min(o,l)+.25,p=Math.max(i,u)+.25,m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-g,maxX:g,minY:-h,maxY:h},{minX:-d,maxX:d,minY:-p,maxY:p}])};return[...e,c,A,m]},q9n=({num_pins:t,sidePinCounts:e,cw:n,ccw:o,startingpin:i})=>{const r=[],s=e.left,a=s+1,A=e.left+e.bottom,c=A+1,l=e.left+e.bottom+e.right,u=l+1;let g=1;const h={};for(const d of i??[])h[d]=!0;!h.leftside&&!h.topside&&!h.rightside&&!h.bottomside&&(h.leftside=!0),!h.bottompin&&!h.leftpin&&!h.rightpin&&!h.toppin&&(h.leftside?h.toppin=!0:h.topside?h.rightpin=!0:h.rightside?h.bottompin=!0:h.bottomside&&(h.leftpin=!0)),h.leftside&&h.toppin?g=1:h.leftside&&h.bottompin?g=s:h.bottomside&&h.leftpin?g=a:h.bottomside&&h.rightpin?g=A:h.rightside&&h.bottompin?g=c:h.rightside&&h.toppin?g=l:h.topside&&h.rightpin?g=u:h.topside&&h.leftpin&&(g=t),r.push(-1);for(let d=0;d<t;d++)r[g]=d+1,o||!n?(g++,g>t&&(g=1)):(g--,g<1&&(g=t));return r},YAt=(t,e,n,o)=>{if(e!==void 0&&o!==void 0&&e!==o)throw new Error(`Conflicting ${t} (${e}) and ${n} (${o})`);return o??e},UAt=t=>{const e=YAt("lrpins",t.lrpins,"leftrightpins",t.leftrightpins),n=YAt("tbpins",t.tbpins,"topbottompins",t.topbottompins),o=t.num_pins/4,i={left:t.leftpins??e??o,top:t.toppins??n??o,right:t.rightpins??e??o,bottom:t.bottompins??n??o};if([t.leftpins,t.toppins,t.rightpins,t.bottompins,t.lrpins,t.leftrightpins,t.tbpins,t.topbottompins].some(s=>s!==void 0)){const s=Object.entries(i),a=s.find(([,c])=>!Number.isInteger(c)||c<1);if(a)throw new Error(`Quad ${a[0]} pin count must be a positive integer, got ${a[1]}`);const A=s.reduce((c,[,l])=>c+l,0);if(A!==t.num_pins)throw new Error(`Quad side pin counts left=${i.left}, top=${i.top}, right=${i.right}, bottom=${i.bottom} require ${A} pins, got ${t.num_pins}`)}return i},KAt=Kn(["leftside","topside","rightside","bottomside","toppin","bottompin","leftpin","rightpin"]),BQ=S5.number().int().positive().optional(),Rne=Ii.extend({fn:Z(),cc:je().default(!0).optional(),ccw:je().default(!0).optional(),startingpin:Z().or(dn(KAt)).transform(t=>typeof t=="string"?t.slice(1,-1).split(","):t).pipe(dn(KAt)).optional(),num_pins:_t().optional().default(64),leftpins:BQ,toppins:BQ,rightpins:BQ,bottompins:BQ,lrpins:BQ,leftrightpins:BQ,tbpins:BQ,topbottompins:BQ,w:ce.optional(),h:ce.optional(),p:ce.default(ce.parse("0.5mm")),px:ce.optional().describe("top and bottom side pad pitch"),py:ce.optional().describe("left and right side pad pitch"),pw:ce.optional(),pl:ce.optional(),lrpw:ce.optional().describe("alias for leftrightpadwidth"),lrpl:ce.optional().describe("alias for leftrightpadlength"),leftrightpadwidth:ce.optional().describe("left and right side pad width"),leftrightpadlength:ce.optional().describe("left and right side pad length"),thermalpad:xo([$e(!0),K4]).optional(),...zk,pillpads:je().optional().default(!1),legsoutside:je().default(!1)}),Tne=t=>{if(t.lrpw!==void 0&&t.leftrightpadwidth!==void 0&&t.lrpw!==t.leftrightpadwidth)throw new Error(`Conflicting lrpw (${t.lrpw}) and leftrightpadwidth (${t.leftrightpadwidth})`);if(t.lrpl!==void 0&&t.leftrightpadlength!==void 0&&t.lrpl!==t.leftrightpadlength)throw new Error(`Conflicting lrpl (${t.lrpl}) and leftrightpadlength (${t.leftrightpadlength})`);t.leftrightpadwidth=t.leftrightpadwidth??t.lrpw,t.leftrightpadlength=t.leftrightpadlength??t.lrpl,t.w&&!t.h?t.h=t.w:!t.w&&t.h&&(t.w=t.h);const e=UAt(t),n=Math.max(e.top,e.bottom),o=Math.max(e.left,e.right),i=t.px??t.p,r=t.py??t.p;if(!t.p&&!t.pw&&!t.pl&&t.w){const s=n+4;t.p=t.w/s}if(!t.p&&t.w&&t.h&&t.pw&&t.pl){const s=(t.w-t.pl*2)/Math.max(n-1,1),a=(t.h-t.pl*2)/Math.max(o-1,1);t.p=(s+a)/2}return!t.w&&!t.h&&t.p&&(t.w=i*(n+4),t.h=r*(o+4)),t.p&&!t.pw&&!t.pl?(t.pw=t.p/2,t.pl=t.p/2):t.pw?t.pl||(t.pl=t.pw*(1/.6)):t.pw=t.pl*(.6/1),t},VAt=Rne.transform(Tne),X9n=["left","bottom","right","top"],Z9n=t=>{const{sidePinCounts:e,pn:n,w:o,h:i,p:r,px:s,py:a,pl:A,leftRightPadLength:c,legsoutside:l}=t,u=[e.left,e.bottom,e.right,e.top];let g=0,h=n-1;for(;g<u.length-1&&h>=u[g];)h-=u[g],g+=1;const d=u[g],p=X9n[g],m=p==="left"||p==="right"?a??r:s??r,_=p==="left"||p==="right"?c??A:A,f=m*(d-1),I=m*(d-1),C=l?_/2:-_/2;switch(p){case"left":return{x:-o/2-C+.1,y:I/2-h*m,o:"vert"};case"bottom":return{x:-f/2+h*m,y:-i/2-C+.1,o:"horz"};case"right":return{x:o/2+C-.1,y:-I/2+h*m,o:"vert"};case"top":return{x:f/2-h*m,y:i/2+C-.1,o:"horz"};default:throw new Error("Invalid pin number")}},eD=t=>{const e=VAt.parse(t),n=e.leftrightpadwidth??e.lrpw??e.pw,o=e.leftrightpadlength??e.lrpl??e.pl,i=UAt(e),r=[];let s=0,a=0;const A=q9n({...e,sidePinCounts:i}),c=Math.max(i.left,i.right),l=Math.max(i.top,i.bottom),u=i.left,g=u+1,h=i.left+i.bottom,d=h+1,p=i.left+i.bottom+i.right,m=p+1,_=e.num_pins;for(let R=0;R<e.num_pins;R++){const{x:F,y:O,o:U}=Z9n({sidePinCounts:i,pin_count:e.num_pins,pn:R+1,w:e.w,h:e.h,p:e.p??.5,px:e.px,py:e.py,pl:e.pl,leftRightPadLength:o,legsoutside:e.legsoutside}),Y=U==="vert";let W=Y?n:e.pw,te=Y?o:e.pl;U==="vert"&&([W,te]=[te,W]);const j=Math.min(W,te)/8,J=A[R+1];s=Math.max(s,Math.abs(F)+W/2),a=Math.max(a,Math.abs(O)+te/2),r.push(e.pillpads?XM(J,F,O,W,te):Jo(J,F,O,W,te,j))}if(e.thermalpad){const R={x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety};if(typeof e.thermalpad=="boolean"){const F=(e.px??e.p)*(l-1)+e.pw,O=(e.py??e.p)*(c-1)+n;s=Math.max(s,Math.abs(R.x)+F/2),a=Math.max(a,Math.abs(R.y)+O/2),r.push(EQ({x:F,y:O},R))}else s=Math.max(s,Math.abs(R.x)+e.thermalpad.x/2),a=Math.max(a,Math.abs(R.y)+e.thermalpad.y/2),r.push(EQ(e.thermalpad,R))}const f=[];for(const[R,F,O]of[["top-left",-1,1],["bottom-left",-1,-1],["bottom-right",1,-1],["top-right",1,1]]){const U=e.w/2*F,Y=e.h/2*O;let W="none",te=U,j=Y;const J=e.pw*2;A[1]===1&&R==="top-left"?W="in1":A[_]===1&&R==="top-left"||A[m]===1&&R==="top-right"?W="in2":A[p]===1&&R==="top-right"||A[u]===1&&R==="bottom-left"?W="in1":A[g]===1&&R==="bottom-left"?W="in2":A[h]===1&&R==="bottom-right"?W="in1":A[d]===1&&R==="bottom-right"&&(W="in2");const oe=W==="in1"?1:-1;if(e.legsoutside){const ie=W==="in1"?e.pl/2:e.pw/2,ne=W==="in1"?e.pw/2:e.pl/2;te+=ie*F*oe,j-=ne*O*oe}(W==="none"||e.legsoutside)&&f.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}`,route:[{x:U-J*F,y:Y},{x:U,y:Y},{x:U,y:Y-J*O}],type:"pcb_silkscreen_path",stroke_width:.1}),(W==="in1"||W==="in2")&&!e.legsoutside&&f.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_1`,route:[{x:U-J*F,y:Y},{x:U-J*F/2,y:Y}],type:"pcb_silkscreen_path",stroke_width:0},{layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_2`,route:[{x:U,y:Y-J*O/2},{x:U,y:Y-J*O}],type:"pcb_silkscreen_path",stroke_width:.1}),(W==="in1"||W==="in2")&&f.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_3`,route:[{x:te-.2*-F,y:j+.2*oe},{x:te,y:j},{x:te+.2*oe*-F,y:j+.2},{x:te-.2*-F,y:j+.2*oe}],type:"pcb_silkscreen_path",stroke_width:.1})}const I=yi(0,e.h/2+(e.legsoutside?e.pl*1.2:.5),.3),C=R=>Math.ceil(R/.05)*.05,y=(l-1)*(e.px??e.p)+e.pw,x=(c-1)*(e.py??e.p)+n,E=y/2+.25,B=x/2+.25,S=e.w/2+.25,Q=e.h/2+.25,w=Math.max(S,C(s+.25)),M=Math.max(Q,C(a+.25)),k={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-w,maxX:w,minY:-B,maxY:B},{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-E,maxX:E,minY:-M,maxY:M}])};return{circuitJson:[...r,...f,I,k],parameters:e}},e7n=K4.refine(({x:t,y:e})=>Number.isInteger(t)&&Number.isInteger(e)&&t>0&&e>0,"thermal via grid dimensions must be positive integers"),pxe=ce.refine(t=>t>0,{message:"thermal via dimensions must be positive"}),mxe=Pt({thermalvias:xo([$e(!0),e7n]).optional(),thermalviapitch:pxe.optional(),thermalviaid:pxe.optional().describe("thermal via inner (hole) diameter"),thermalviaod:pxe.optional().describe("thermal via outer diameter")}),kne={grid:{x:4,y:4},pitch:ce.parse("1mm"),holeDiameter:ce.parse("0.3048mm"),outerDiameter:ce.parse("0.6096mm")},t7n=(t,e)=>{if(!t.thermalvias)return[];const n=t.thermalvias===!0?kne.grid:t.thermalvias,o=t.thermalviapitch??kne.pitch,i=t.thermalviaid??kne.holeDiameter,r=t.thermalviaod??kne.outerDiameter;if(r<i)throw new Error("thermalviaod must be greater than or equal to thermalviaid");const s=(n.x-1)*o+r,a=(n.y-1)*o+r;if(s>e.width||a>e.height)throw new Error("thermal via grid must fit inside thermalpad");return Array.from({length:n.x*n.y},(A,c)=>{const l=c%n.x,u=Math.floor(c/n.x);return{pcb_via_id:"",type:"pcb_via",x:e.x+(l-(n.x-1)/2)*o,y:e.y+(u-(n.y-1)/2)*o,hole_diameter:i,outer_diameter:r,layers:["top","bottom"]}})},zAt=(t,e)=>{if(!e.thermalvias)return t;const n=t.find(o=>o.type==="pcb_smtpad"&&o.port_hints.includes("thermalpad"));if(!n)throw new Error("thermalvias requires a thermalpad");return[...t,...t7n(e,n)]};Rne.extend(mxe.shape).transform(Tne);var n7n=t=>{const e={...t,legsoutside:!1,pl:t.pl??.875,pw:t.pw??.25},n=eD(e),o=mxe.parse(t);return{circuitJson:zAt(n.circuitJson,o),parameters:{...n.parameters,...o}}},o7n=t=>{if(t.legsoutside=!0,!t.p)switch(t.num_pins){case 32:t.p=.8;break;case 44:case 48:t.p=.5;break;case 64:case 80:case 100:t.p=.5;break;case 144:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 32:case 44:case 48:case 64:case 80:case 100:t.pl=1.475;break;case 144:t.pl=1.6;break}if(!t.pw)switch(t.num_pins){case 32:t.pw=.55;break;case 44:case 48:case 64:case 80:case 100:t.pw=.3;break;case 144:t.pw=.25;break}return eD(t)},i7n=t=>{t.legsoutside=!0;const e=VAt.parse(t);if(!t.p)switch(t.num_pins){case 44:case 64:t.p=.8;break;case 52:t.w===14?t.p=1:t.p=.65;break;case 208:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 44:case 52:case 64:t.pl=2.25;break;case 208:t.pl=1.65;break;default:t.pl=e.pl*4;break}if(!t.pw)switch(t.num_pins){case 44:case 64:t.pw=.5;break;case 52:t.w===14?t.pw=.45:t.pw=.55;break;case 208:t.pw=.3;break;default:t.pw=e.pw;break}return eD(t)};Rne.extend({}).transform(Tne);var r7n=t=>(t.legsoutside=!1,t.thermalpad===void 0&&(t.thermalpad=!0),eD(t)),s7n=Ii.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse("3.9mm")),p:ce.default(ce.parse("1.27mm")),pw:ce.optional(),pl:ce.optional(),legsoutside:je().optional().default(!1),thermalpad:K4.optional(),...zk,silkscreen_stroke_width:_t().optional().default(.1)}).transform(t=>(t.pw==null&&t.pl==null?(t.pw=ce.parse("0.51mm"),t.pl=ce.parse("1.1mm")):t.pw==null?t.pw=t.pl*(.51/1.1):t.pl==null&&(t.pl=t.pw*(1.1/.51)),t)),a7n=t=>{const{num_pins:e,pn:n,w:o,p:i}=t,r=e/2,s=n<=r,a=r-1,A=i,c=A*a,l=o+ce.parse("0.2mm"),u=(s?-1:1)*(l/2);return s?{x:u,y:c/2-(n-1)*A}:{x:u,y:-c/2+(n-r-1)*A}},A7n=t=>{const e=s7n.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let _=0;_<e.num_pins;_++){const{x:f,y:I}=a7n({num_pins:e.num_pins,pn:_+1,w:e.w,p:e.p,pl:e.pl,legsoutside:e.legsoutside});n.push(Jo(_+1,f,I,e.pl,e.pw,o))}e.thermalpad&&n.push(EQ(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const i=Math.min(1,e.p/2),r=e.w-(e.legsoutside?0:e.pl)-.2,s=(e.num_pins/2-1)*e.p+e.pw+i,a=yi(0,s/2+.4,s/12),A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",stroke_width:e.silkscreen_stroke_width??.1,route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...Pne.map(({x:_,y:f})=>({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}]},c=(e.num_pins/2-1)*e.p+e.pw,l=e.legsoutside?e.w/2+e.pl:(e.w+.2)/2+e.pl/2,u=c/2,g=l+.25,h=g,d=u+.445,p=d,m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:xy([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:"top"};return{circuitJson:[...n,A,a,m],parameters:e}},c7n=Ii.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse("3.0mm")),p:ce.default(ce.parse("0.5mm")),pw:ce.default(ce.parse("0.30mm")),pl:ce.default(ce.parse("1.45mm")),legsoutside:je().optional().default(!0),thermalpad:K4.optional(),...zk,silkscreen_stroke_width:_t().optional().default(.1)}),l7n=t=>{const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n<=a,c=a-1,l=i*c,u=s?r/2:-r/2;return A?{x:-o/2-u,y:l/2-(n-1)*i}:{x:o/2+u,y:-l/2+(n-a-1)*i}},u7n=t=>{const e={...t},n=e.p,o=typeof n=="string"||typeof n=="number"?ce.parse(n):void 0,i=o!=null&&o<=ce.parse("0.5mm"),r=c7n.parse(e),s=[],a=r.rounded??Math.min(r.pl,r.pw)/8,A=i?r.w-ce.parse("0.15mm"):r.w;for(let y=0;y<r.num_pins;y++){const{x,y:E}=l7n({num_pins:r.num_pins,pn:y+1,w:A,p:r.p,pl:r.pl,legsoutside:r.legsoutside});s.push(Jo(y+1,x,E,r.pl,r.pw,a))}r.thermalpad&&s.push(EQ(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const c=Math.min(1,r.p/2),l=r.w-(r.legsoutside?0:r.pl*2)-.2,u=(r.num_pins/2-1)*r.p+r.pw+c,g=yi(0,u/2+.4,u/12),h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",stroke_width:r.silkscreen_stroke_width??.1,route:[{x:-l/2,y:-u/2},{x:-l/2,y:u/2},...Pne.map(({x:y,y:x})=>({x:y*l/6,y:x*l/6+u/2})),{x:l/2,y:u/2},{x:l/2,y:-u/2},{x:-l/2,y:-u/2}]},d=(r.num_pins/2-1)*r.p+r.pw,p=r.w/2+(r.legsoutside?r.pl:0),m=r.w/2+.25,_=p+.18,f=d/2+.25,I=f+.35,C={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-_,maxX:_,minY:-f,maxY:f},{minX:-m,maxX:m,minY:-I,maxY:I}])};return{circuitJson:[...s,h,g,C],parameters:r}},g7n=[{x:-1.45,y:.93},{x:-.73,y:.93},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.93},{x:1.45,y:.93},{x:1.45,y:-.93},{x:.73,y:-.93},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.93},{x:-1.45,y:-.93}],d7n=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("3.1mm"),h:Z().default("2.0mm"),p:Z().default("0.65mm"),pl:Z().default("1.03mm"),pw:Z().default("0.35mm"),string:Z().optional()}),h7n=t=>{const e=d7n.parse({...t,fn:"sot363"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=JAt(p+1,n,i);A.push(Jo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/4,y:o/2+.1},{x:n/4,y:o/2+.1}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/4,y:-o/2-.1},{x:n/4,y:-o/2-.1}],stroke_width:.05,pcb_silkscreen_path_id:""},u=JAt(1,n,i),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=yi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:g7n,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},JAt=(t,e,n,o)=>t<=3?{x:-.84,y:n-(t-1)*n}:{x:.84,y:-n+(t-4)*n},p7n=[{x:-.75,y:1},{x:-.75,y:-1},{x:.75,y:-1},{x:.75,y:1}],m7n=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("1.01mm"),h:Z().default("1.45mm"),p:Z().default("0.5mm"),pl:Z().default("0.33mm"),pw:Z().default("0.27mm"),string:Z().optional()}),_7n=t=>{const e=m7n.parse({...t,fn:"sot886"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=WAt(p+1,n,i,r);A.push(Jo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},u=WAt(1,n,i,r),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=yi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:p7n,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},WAt=(t,e,n,o)=>{const i=e/2-o/2;return t<=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},f7n=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:.55},{x:2.05,y:.55},{x:2.05,y:-.55},{x:1.05,y:-.55},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5},{x:-2.05,y:-.39},{x:-1.05,y:-.39},{x:-1.05,y:.39},{x:-2.05,y:.39}],I7n=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:1.5},{x:2.05,y:1.5},{x:2.05,y:.39},{x:1.05,y:.39},{x:1.05,y:-.39},{x:2.05,y:-.39},{x:2.05,y:-1.5},{x:1.05,y:-1.5},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5}],jAt=Ii.extend({fn:Z(),num_pins:_t().default(3),w:Z().default("2.275mm"),h:Z().default("2.74mm"),pl:Z().default("1.325mm"),pw:Z().default("0.6mm"),p:Z().default("0.95mm"),string:Z().optional()}),C7n=ZM({p:"0.95mm",w:"1.6mm",legsoutside:!0}),y7n=t=>{const e=t.string?.match(/^sot23_(\d+)/),n=e?Number.parseInt(e[1],10):3;if(n===6||n===8){const i=C7n.parse({...t,num_pins:n});return{circuitJson:IV(i),parameters:i}}const o=jAt.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:E7n(o),parameters:o};if(o.num_pins===5)return{circuitJson:qAt(o),parameters:o};throw new Error("Invalid number of pins")},x7n=t=>{const{pn:e,w:n,p:o}=t;return e===1?{x:-n/2,y:o}:e===2?{x:-n/2,y:-o}:{x:n/2,y:0}},E7n=t=>{const e=[],n=Number.parseFloat(t.w);Number.parseFloat(t.h);const o=Number.parseFloat(t.pl),i=Number.parseFloat(t.pw),r=Number.parseFloat(t.p),s=t.rounded??Math.min(o,i)/8;for(let c=0;c<t.num_pins;c++){const{x:l,y:u}=x7n({num_pins:t.num_pins,pn:c+1,w:n,p:r});e.push(Jo(c+1,l,u,o,i,s))}const a=yi(0,Number.parseInt(t.h),.3),A={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:f7n,layer:"top"};return[...e,a,A]},$At=t=>{const{w:e,p:n,h:o,pn:i}=t;if(i===1)return{x:-e/2,y:n};if(i===2)return{x:-e/2,y:0};if(i===3)return{x:-e/2,y:-n};if(i===4)return{x:e/2,y:-n};if(i===5)return{x:e/2,y:n};throw new Error("Invalid pin number")},qAt=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.p),r=Number.parseFloat(t.pl),s=Number.parseFloat(t.pw),a=t.rounded??Math.min(r,s)/8;for(let f=1;f<=t.num_pins;f++){const{x:I,y:C}=$At({w:n,h:o,p:i,pn:f});e.push(Jo(f,I,C,r,s,a))}const A=(t.num_pins+1)/2*i,c=o,l={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-A/3,y:c/2+i/1.3},{x:A/3,y:c/2+i/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-A/3,y:-c/2-i/1.3},{x:A/3,y:-c/2-i/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},g=yi(0,c+.3,.3),h=$At({w:n,h:o,p:i,pn:1});h.x=h.x-s*1.5;const d=.3,p=.4,m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_indicator",route:[{x:h.x+d/2,y:h.y},{x:h.x-d/2,y:h.y+p/2},{x:h.x-d/2,y:h.y-p/2},{x:h.x+d/2,y:h.y}],stroke_width:.05},_={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:I7n,layer:"top"};return[...e,g,l,u,m,_]},B7n=jAt.extend({}),b7n=t=>{const e=B7n.parse({...t,num_pins:5});return{circuitJson:qAt(e),parameters:e}},S7n=[{name:"top-left",dx:-1,dy:1},{name:"top-right",dx:1,dy:1},{name:"bottom-left",dx:-1,dy:-1},{name:"bottom-right",dx:1,dy:-1}],_xe=(t,e)=>({type:"pcb_smtpad",points:e,layer:"top",shape:"polygon",pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(n=>n.toString()):[t.toString()]}),Q7n=ZM({}).and(mxe),v7n=t=>{const e=je().optional().parse(t.cornerpads),n=t.cornerpadcutlength===void 0?void 0:ce.parse(t.cornerpadcutlength),o=fV.parse(t.missing??[]);if(o.some(S=>typeof S!="number"))throw new Error("DFN missing positions must be pad numbers");const i=[...new Set(o)];if(i.length!==o.length)throw new Error("DFN missing positions must not contain duplicates");const r={...Q7n.parse(t),cornerpads:e,cornerpadcutlength:n,missing:i},s=r.num_pins;if(i.some(S=>S<1||S>s))throw new Error("DFN missing position is outside the nominal pad range");if(e){if(s!==4||i.length>0||r.pillpads)throw new Error("DFN corner pads require four nominal pads with none missing");if(n===void 0||n<=0||n>Math.min(r.pl,r.pw))throw new Error("DFN corner pads require a valid cornerpadcutlength")}const a=new Set(i),A=[],c=Math.min(r.pl,r.pw)/8;let l=0,u=1;for(let S=1;S<=s;S+=1){if(a.has(S))continue;const{x:Q,y:w}=hxe({num_pins:s,pn:S,w:r.w,p:r.p??1.27,pl:r.pl,widthincludeslegs:!0});if(l=Math.max(l,Math.abs(w)+r.pw/2),e){const M=Math.sign(Q),k=Math.sign(w),R=Q-M*r.pl/2,F=w-k*r.pw/2,O=Q+M*r.pl/2,U=w+k*r.pw/2;A.push(_xe(u,[{x:R,y:F+k*n},{x:R,y:U},{x:O,y:U},{x:O,y:F},{x:R+M*n,y:F}]))}else A.push((r.pillpads?XM:Jo)(u,Q,w,r.pl??"1mm",r.pw??"0.6mm",c));u+=1}r.thermalpad&&A.push(EQ(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const g=Math.min(1,r.p/2),h=r.w+g,d=l*2+g,p=[];for(const S of S7n){const{dx:Q,dy:w}=S;p.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",route:[{x:Q*h/2-Q*r.p,y:w*d/2},{x:Q*h/2,y:w*d/2},{x:Q*h/2,y:w*d/2-w*r.p}],type:"pcb_silkscreen_path",stroke_width:.1})}const m=r.p/4,_=-h/2-m/2,f=d/2-r.p/2;p.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:_,y:f},{x:_-m,y:f+m},{x:_-m,y:f-m},{x:_,y:f}],stroke_width:.1});const I=yi(0,d/2+.4,d/12),C=S=>Math.ceil(S/.05)*.05,y=C(r.w/2+.25),x=C(l+.45),E={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:y*2,height:x*2,layer:"top"},B=[...A,I,...p,E];return{circuitJson:zAt(B,r),parameters:r}};function XAt({pinlabeltextalignleft:t,pinlabeltextalignright:e,pinlabelorthogonal:n}){let o="top";return n?o="left":o="top",t&&(n?o="bottom":o="right"),e&&(n?o="top":o="left"),o}var tD=({fs:t,pn:e,anchor_x:n,anchor_y:o,textalign:i="center",anchorplacement:r,orthogonal:s=!1,verticallyinverted:a=!1,layer:A="top"})=>{let c=0;s&&a?c=270:a?c=180:s?c=90:c=0;let l="center";if(i!=="center"&&(l=i==="left"?a?"center_right":"center_left":a?"center_left":"center_right",r)){const g={top:{x:0,y:1},bottom:{x:0,y:-1},left:{x:-1,y:0},right:{x:1,y:0}}[r],h=c*Math.PI/180,d={x:Math.cos(h),y:Math.sin(h)},p=g.x*d.x+g.y*d.y;Math.abs(p)>.5&&(l=p>0?"center_left":"center_right")}return A==="bottom"&&(l==="center_left"?l="center_right":l==="center_right"&&(l="center_left")),{type:"pcb_silkscreen_text",pcb_silkscreen_text_id:"silkscreen_text_1",font:"tscircuit2024",font_size:t,pcb_component_id:"pcb_component_1",text:`{PIN${e}}`,layer:A,anchor_position:{x:n,y:o},anchor_alignment:l,ccw_rotation:c}},w7n=Ii.extend({fn:Z(),num_pins:_t().optional().default(6),rows:xo([Z(),_t()]).transform(t=>Number(t)).optional().default(1).describe("number of rows"),cols:xo([Z(),_t()]).transform(t=>Number(t)).optional().describe("number of nominal columns in a sparse grid"),p:ce.default("0.1in").describe("pitch"),py:ce.optional().describe("vertical row pitch"),id:ce.default("1.0mm").describe("inner diameter"),od:ce.default("1.5mm").describe("outer diameter"),missing:fV.default([]).describe("row-major nominal grid positions to omit"),male:je().optional().describe("for male pin headers"),female:je().optional().describe("for female pin headers"),smd:je().optional().describe("surface mount device"),surfacemount:je().optional().describe("surface mount device (verbose)"),rightangle:je().optional().describe("right angle"),pw:ce.optional().default("1.0mm").describe("pad width for SMD"),pl:ce.optional().default("2.0mm").describe("pad length for SMD"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nosquareplating:je().optional().default(!1).describe("do not use rectangular pad for pin 1"),nopinlabels:je().optional().default(!1).describe("omit silkscreen pin labels"),doublesidedpinlabel:je().optional().default(!1).describe("add silkscreen pins in top and bottom layers"),bottomsidepinlabel:je().optional().default(!1).describe("place the silkscreen reference text on the bottom layer instead of top"),silkscreenborder:je().optional().default(!1).describe("add a rectangular silkscreen border around the pin row"),silkscreenlabel:Z().transform(t=>t.startsWith("(")&&t.endsWith(")")?t.slice(1,-1):t).optional().describe("replace the reference designator with a custom silkscreen label")}).transform(t=>{const e=XAt(t);return{...t,pinlabelAnchorSide:e,male:t.male??!t.female,female:t.female??!1,smd:t.smd??t.surfacemount??!1,rightangle:t.rightangle??!1}}).superRefine((t,e)=>{t.male&&t.female&&e.addIssue({code:lo.custom,message:"'male' and 'female' cannot both be true; it should be male or female.",path:["male","female"]}),t.cols!==void 0&&(!Number.isInteger(t.cols)||t.cols<1)&&e.addIssue({code:lo.custom,message:"'cols' must be a positive integer",path:["cols"]}),t.missing.some(n=>typeof n!="number")&&e.addIssue({code:lo.custom,message:"'missing' positions must be pad numbers",path:["missing"]})}),ZAt=t=>{const e=w7n.parse(t),{p:n,py:o,id:i,od:r,rows:s,cols:a,num_pins:A,missing:c,pinlabelAnchorSide:l,pinlabelverticallyinverted:u,pinlabelorthogonal:g,pinlabeltextalignleft:h,pinlabeltextalignright:d,nopinlabels:p,doublesidedpinlabel:m,bottomsidepinlabel:_,silkscreenborder:f,silkscreenlabel:I}=e;let C="center";h?C="left":d&&(C="right");const y=[];let x=null;const E=c,B=new Set(E);if(B.size!==E.length)throw new Error("Pinrow missing positions must not contain duplicates");const S=A+E.length,Q=a??Math.ceil(S/s),w=Q*s,M=a!==void 0||E.length>0;if(M&&w!==S)throw new Error(`Pinrow grid has ${w} positions, but ${S} are required for ${A} pins and ${E.length} missing positions`);if(E.some(he=>!Number.isInteger(he)||he<1||he>w))throw new Error("Pinrow missing position is outside the nominal grid");const k=o??n,R=(s-1)*k,F=R/2,O=-k,U=({xoff:he,yoff:Qe,od:Pe,anchorSide:we,smd:Te,pw:Re,pl:Ee})=>{let ke=0,Ce=0;if(Te){const Le=Pe/5;switch(we){case"right":ke=Re/2+Le;break;case"top":Ce=Ee/2+Le;break;case"bottom":Ce=-(Ee/2+Le);break;case"left":ke=-(Re/2+Le);break}}else{const Le=Pe/2+.6;switch(we){case"right":ke=Le;break;case"top":Ce=Le;break;case"bottom":Ce=-Le;break;case"left":ke=-Le;break}}return{anchor_x:he+ke,anchor_y:Qe+Ce}},Y=(he,Qe,Pe)=>{he===1&&(x={x:Qe,y:Pe}),e.smd?y.push(Jo(he,Qe,Pe,e.pw,e.pl)):he===1&&!e.nosquareplating?y.push(yy({pn:he,x:Qe,y:Pe,holeDiameter:i,rectPadWidth:r,rectPadHeight:r})):y.push(ks(he,Qe,Pe,i,r));const{anchor_x:we,anchor_y:Te}=U({xoff:Qe,yoff:Pe,od:r,anchorSide:l,smd:e.smd,pw:e.pw,pl:e.pl});p||(_?y.push(tD({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:"bottom"})):y.push(tD({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:"top"})),m&&y.push(tD({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:"bottom"})))},W=new Set;if(M){const he=-((Q-1)/2)*n;let Qe=1;for(let Pe=0;Pe<s;Pe++)for(let we=0;we<Q;we++){const Te=Pe*Q+we+1;if(B.has(Te))continue;const Re=he+we*n,Ee=F+Pe*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Qe++,Re,Ee)}}else if(s===1){const he=-((A-1)/2)*n;for(let Qe=0;Qe<A;Qe++){const Pe=Qe+1,we=he+Qe*n,Te=`${we},0`;if(W.has(Te))throw new Error(`Overlap at ${Te}`);W.add(Te),Y(Pe,we,0)}}else if(s>2&&Q>2){const Qe=-((Q-1)/2)*n;let Pe=1;for(let we=0;we<s&&Pe<=A;we++)for(let Te=0;Te<Q&&Pe<=A;Te++){const Re=Qe+Te*n,Ee=F+we*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Pe++,Re,Ee)}}else{const Qe=-((Q-1)/2)*n;let Pe=1,we=0,Te=s-1,Re=0,Ee=Q-1;for(;Pe<=A&&we<=Te&&Re<=Ee;){for(let ke=we;ke<=Te&&Pe<=A;ke++){const Ce=Qe+Re*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Re++;for(let ke=Re;ke<=Ee&&Pe<=A;ke++){const Ce=Qe+ke*n,Le=F+Te*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}if(Te--,Re<=Ee){for(let ke=Te;ke>=we&&Pe<=A;ke--){const Ce=Qe+Ee*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Ee--}if(we<=Te){for(let ke=Ee;ke>=Re&&Pe<=A;ke--){const Ce=Qe+ke*n,Le=F+we*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}we++}}if(Pe-1<A)throw new Error(`Missing pins: assigned ${Pe-1}, expected ${A}`)}const te=e.smd?e.pw/2:r/2,j=e.smd?e.pl/2:r/2,J=(Q-1)*n,oe=J/2+n/2+1,ie=Math.max(R/2+j+1,n/2+1),ne=f?iA([{x:-oe,y:-ie},{x:oe,y:-ie},{x:oe,y:ie},{x:-oe,y:ie},{x:-oe,y:-ie}]):null,le=(()=>{if(e.fn!=="headermodule"||!x)return null;const he=Math.max(.3,Math.min(.6,n/4)),Qe=.15;if(l==="top"||l==="bottom"){const Ee=Math.sign(x.x)||(l==="top"?-1:1),ke=x.x+Ee*(te+Qe),Ce=ke+Ee*he;return iA([{x:ke,y:x.y},{x:Ce,y:x.y-he},{x:Ce,y:x.y+he},{x:ke,y:x.y}],{pcb_component_id:"pin_marker_1",pcb_silkscreen_path_id:"pin_marker_1"})}const we=Math.sign(x.y)||1,Te=x.y+we*(j+Qe),Re=Te+we*he;return iA([{x:x.x,y:Te},{x:x.x-he,y:Re},{x:x.x+he,y:Re},{x:x.x,y:Te}],{pcb_component_id:"pin_marker_1",pcb_silkscreen_path_id:"pin_marker_1"})})(),ge=I?{type:"pcb_silkscreen_text",pcb_silkscreen_text_id:"silkscreen_text_1",font:"tscircuit2024",font_size:.8,pcb_component_id:"pcb_component_1",text:I,layer:"top",anchor_position:{x:0,y:0},anchor_alignment:"center"}:yi(0,R/2+n,.5),_e=J/2+te,ue=R/2+j,fe=J/2+n/2,pe=R/2+n/2,ye=Math.max(_e+.25,fe+.5),Me=Math.max(ue+.25,pe+.5),ve={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*ye,height:2*Me,layer:"top"};return{circuitJson:[...y,...ne?[ne]:[],...le?[le]:[],ge,ve],parameters:e}},P7n=t=>ZAt({...t,fn:"headermodule"}),M7n=[{x:-1.2,y:.83},{x:-.75,y:.83},{x:-.75,y:.95},{x:.75,y:.95},{x:.75,y:.83},{x:1.2,y:.83},{x:1.2,y:-.83},{x:.75,y:-.83},{x:.75,y:-.95},{x:-.75,y:-.95},{x:-.75,y:-.83},{x:-1.2,y:-.83}],D7n=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("2.1mm"),h:Z().default("2.45mm"),p:Z().default("0.5mm"),pl:Z().default("0.675mm"),pw:Z().default("0.35mm"),string:Z().optional()}),N7n=t=>{const e=D7n.parse({...t,fn:"sot563"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=ect(p+1,n,i,r);A.push(Jo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},u=ect(1,n,i,r),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=yi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:M7n,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},ect=(t,e,n,o)=>{const i=e/2-o/2;return t<=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},R7n=ZM({p:"1.27mm",w:"3.9mm",legsoutside:!0}),T7n=t=>{const e=R7n.parse({...t,num_pins:8});return{circuitJson:IV(e),parameters:e}},k7n=ZM({p:"1.27mm",w:"7.5mm",legsoutside:!0}),F7n=t=>{const e=k7n.parse({...t,num_pins:16});return{circuitJson:IV(e),parameters:e}},L7n=Ii.extend({fn:Z(),num_pins:$e(3).default(3),w:Z().default("1.2mm"),h:Z().default("1.2mm"),pw:Z().default("0.40mm"),pl:Z().default("0.45mm"),p:Z().default("0.575mm")}),H7n=t=>{const e=L7n.parse(t),n=G7n(e),o=yi(0,ce.parse(e.h),.2),i=1.8,r=1.8,s={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:[{x:-i/2,y:r/2},{x:i/2,y:r/2},{x:i/2,y:-r/2},{x:-i/2,y:-r/2}],layer:"top"};return{circuitJson:[...n,o,s],parameters:e}},O7n=t=>{const{pn:e,p:n}=t;return e===1?{x:n,y:0}:e===2?{x:-n,y:-.4}:{x:-n,y:.4}},G7n=t=>{const e=[];Number.parseFloat(t.w),Number.parseFloat(t.h);const n=Number.parseFloat(t.pl),o=Number.parseFloat(t.pw),i=Number.parseFloat(t.p),r=Math.min(n,o)/8;for(let s=0;s<3;s++){const{x:a,y:A}=O7n({num_pins:t.num_pins,pn:s+1,p:i});e.push(Jo(s+1,a,A,n,o,r))}return e},Y7n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("2.36mm"),h:Z().default("1.22mm"),pl:Z().default("0.9mm"),pw:Z().default("1.2mm"),p:Z().default("3.30mm")}),U7n=t=>{const e=Y7n.parse(t),n=ce.parse(e.h),o=yi(0,n/4+.4,.3),s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.7,height:2.3,layer:"top"};return{circuitJson:V7n(e).concat(...Xd(e),o,s),parameters:e}},K7n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},V7n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=K7n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1125))}return e},z7n=Ii.extend({fn:Z(),p:ce.optional().default("2.54mm"),id:ce.optional().default("0.7mm"),od:ce.optional().default("1.4mm")}),J7n=t=>{const e=z7n.parse(t),{p:n,id:o,od:i}=e,r=[ks(1,-n/2,0,o,i),ks(2,n/2,0,o,i)],s={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2+i+o/2,y:0},{x:n/2-i-o/2,y:0}],stroke_width:.1,pcb_silkscreen_path_id:""},a=yi(0,1.5,.5),A=-n/2,c=n/2,l=i/2,u=i/2,g=A-l-.35,h=c+l+.26,d=u+.35,p=g,m=h,_=d,f={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:xy([{minX:g,maxX:h,minY:-_,maxY:_},{minX:p,maxX:m,minY:-d,maxY:d}]),layer:"top"};return{circuitJson:[...r,s,a,f],parameters:e}},W7n=(t,e,n,o,i,r=.1)=>{const s=[],a=[],A=Math.max(1,Math.ceil(Math.PI*n/r)),c=Math.PI/A;for(let l=0;l<=A;l++){const u=l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g<t-o&&h>=e-i/2&&h<=e+i/2||s.push({x:g,y:h})}for(let l=0;l<=A;l++){const u=Math.PI+l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g<t-o&&h>=e-i/2&&h<=e+i/2||a.push({x:g,y:h})}return{topArc:s,bottomArc:a}},j7n=Ii.extend({fn:Z(),p:ce.optional().default("5mm"),id:ce.optional().default("0.8mm"),od:ce.optional().default("1.6mm"),ceramic:je().optional(),electrolytic:je().optional(),polarized:je().optional()}),$7n=t=>{const e=j7n.parse(t),{p:n,id:o,od:i}=e;o===.8&&i===1.6&&(e.id=n===5?.8:n*.25,e.od=n===5?1.6:n*.5);const r=[ks(1,-n/2,0,e.id,e.od),ks(2,n/2,0,e.id,e.od)],s=n+.1,{topArc:a,bottomArc:A}=W7n(0,0,s,e.od/2,e.od),c=.02*n,l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:a,stroke_width:c,pcb_silkscreen_path_id:""},u={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:A,stroke_width:c,pcb_silkscreen_path_id:""},g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:0,y:s},{x:0,y:-s}],stroke_width:c,pcb_silkscreen_path_id:""},h=.1*n,d=-(n+h+.04*n),p=s-h-.08*n,m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d-h,y:p},{x:d+h,y:p}],stroke_width:c,pcb_silkscreen_path_id:""},_={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d,y:p-h},{x:d,y:p+h}],stroke_width:c,pcb_silkscreen_path_id:""},f=yi(0,s+.12*n,.1*n),I=[...r,l,u,g,f];(e.electrolytic===!0||e.polarized===!0)&&I.push(m,_);const y=n+.25,x={type:"pcb_courtyard_circle",pcb_courtyard_circle_id:"",pcb_component_id:"",center:{x:0,y:0},radius:y,layer:"top"};return I.push(x),{circuitJson:I,parameters:e}},q7n=Ii.extend({fn:$e("rj45"),num_pins:xo([$e(10),$e(14)]).default(10),ledpins:je().default(!1).describe("add the four through-hole LED connections as pins 9 through 12"),firstpinleft:je().default(!1).describe("mirror the eight signal pins so pin 1 is on the left"),firstpintop:je().default(!1).describe("mirror the eight signal pins so pin 1 is in the top row"),p:ce.default("1.02mm").describe("horizontal signal-pin pitch"),py:ce.default("1.78mm").describe("signal-row pitch"),id:ce.default("0.9144mm").describe("signal and LED hole diameter"),od:ce.default("1.524mm").describe("signal and LED outer diameter"),shieldx:ce.default("8.13mm").describe("shield-pin x offset from the footprint center"),shieldy:ce.default("0.13mm").describe("signed shield-pin y offset from the signal-row center"),shieldid:ce.default("1.8mm").describe("shield-pin hole diameter"),shieldod:ce.default("2.5mm").describe("shield-pin outer diameter"),holex:ce.default("6.35mm").describe("locator-hole x offset from the footprint center"),holey:ce.default("-3.43mm").describe("signed locator-hole y offset from the signal-row center"),holed:ce.default("3.25mm").describe("locator-hole diameter"),ledx:ce.default("4.57mm").describe("inner LED-pin x offset from the footprint center"),ledp:ce.default("2.29mm").describe("pitch within each LED-pin pair"),ledy:ce.default("5.7mm").describe("signed LED-pin y offset from the signal-row center"),w:ce.default("16.26mm").describe("connector body width"),h:ce.default("15.88mm").describe("connector body height"),bodyy:ce.default("-0.96mm").describe("signed connector body center y offset")}),X7n=t=>{const e=t.ledpins===!0||t.num_pins===14,n=q7n.parse({...t,ledpins:e,num_pins:e?14:10}),{ledpins:o,firstpinleft:i,firstpintop:r,p:s,py:a,id:A,od:c,shieldx:l,shieldy:u,shieldid:g,shieldod:h,holex:d,holey:p,holed:m,ledx:_,ledp:f,ledy:I,w:C,h:y,bodyy:x}=n,E=Me=>Number(Me.toFixed(12)),B=Array.from({length:8},(Me,ve)=>{const he=ve+1,Qe=(3.5-ve)*s,Pe=ve%2===0?-a/2:a/2,we=E(i?-Qe:Qe),Te=E(r?-Pe:Pe);return ks(he,we,Te,A,c)}),S=o?[ks(9,E(-_-f),I,A,c),ks(10,-_,I,A,c),ks(11,_,I,A,c),ks(12,E(_+f),I,A,c)]:[],Q=o?14:9,w=o?13:10,M=i!==r,k=M?w:Q,R=M?Q:w,F=[ks(k,-l,u,g,h),ks(R,l,u,g,h)],O=[-d,d].map(Me=>({type:"pcb_hole",pcb_hole_id:"",pcb_component_id:"",hole_shape:"circle",hole_diameter:m,x:Me,y:p})),U=-C/2,Y=C/2,W=x-y/2,te=x+y/2,j=h/2+.2,J=[[W,Math.min(te,u-j)],[Math.max(W,u+j),te]].filter(([Me,ve])=>ve-Me>.01),oe=[iA([{x:U,y:W},{x:Y,y:W}]),iA([{x:U,y:te},{x:Y,y:te}]),...J.flatMap(([Me,ve])=>[iA([{x:U,y:Me},{x:U,y:ve}]),iA([{x:Y,y:Me},{x:Y,y:ve}])])],ie=Math.min(-l-h/2,-d-m/2,o?-_-f-c/2:0),ne=-ie,le=Math.min(u-h/2,p-m/2,-a/2-c/2,o?I-c/2:Number.POSITIVE_INFINITY),ge=Math.max(u+h/2,p+m/2,a/2+c/2,o?I+c/2:Number.NEGATIVE_INFINITY),_e=Math.min(U,ie)-.25,ue=Math.max(Y,ne)+.25,fe=Math.min(W,le)-.25,pe=Math.max(te,ge)+.25,ye={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(_e+ue)/2,y:(fe+pe)/2},width:ue-_e,height:pe-fe,layer:"top"};return{circuitJson:[...O,...B,...S,...F,...oe,yi(0,pe+.55,.5),ye],parameters:n}},Z7n=Ii.extend({fn:$e("pushbutton"),w:ce.default(4.5),h:ce.default(6.5),id:ce.default(1),od:ce.default(1.2)}),e6n=t=>{const e=Z7n.parse(t),n=e.w,o=e.h,i=e.id,r=[ks(1,-n/2,o/2,i,i*1.5),ks(2,-n/2,-o/2,i,i*1.5),ks(3,n/2,-o/2,i,i*1.5),ks(4,n/2,o/2,i,i*1.5)],s=[iA([{x:-n/2,y:-o/2},{x:-n/2,y:o/2}]),iA([{x:n/2,y:-o/2},{x:n/2,y:o/2}]),iA([{x:-n/2,y:0},{x:-n/5,y:0},{x:n/5*1/Math.sqrt(2),y:o/8}]),iA([{x:n/2,y:0},{x:n/5,y:0}])],a=yi(0,o/2+.4,.5),A=i*1.5/2,c=n,l=o,u=c/2+A,g=l/2+A,h=u+.5,d=g+.5,p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*h,height:2*d,layer:"top"};return{circuitJson:[...r,...s,a,p],parameters:e}},tct=Ii.extend({fn:Z(),w:ce.default("22.58mm"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse("2.54mm")),pw:ce.default(ce.parse("1.6mm")),pl:ce.default(ce.parse("2.4mm")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse("1.61mm")),silkscreenlabels:je().default(!1),silkscreenlabelmargin:ce.default(ce.parse("0.1mm"))}),t6n=t=>{const e=tct.parse(t);return e.left&&e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},Fne=(t,e,n)=>{let o=[];return n==="right"&&(o=[{x:t+1/2,y:e},{x:t-1/2,y:e+.6/2},{x:t-1/2,y:e-.6/2},{x:t+1/2,y:e}]),n==="left"&&(o=[{x:t-1/2,y:e},{x:t+1/2,y:e+.6/2},{x:t+1/2,y:e-.6/2},{x:t-1/2,y:e}]),n==="top"&&(o=[{x:t,y:e+1/2},{x:t-.6/2,y:e-1/2},{x:t+.6/2,y:e-1/2},{x:t,y:e+1/2}]),n==="bottom"&&(o=[{x:t,y:e-1/2},{x:t-.6/2,y:e+1/2},{x:t+.6/2,y:e+1/2},{x:t,y:e-1/2}]),o},n6n=t=>{const e=tct.parse(t),n=e.h??t6n(e),o=[],i=[],r=[];let s=[];const a=1,A=a,c=e.left+e.right+(e.bottom??0)+(e.top??0),u=`pin${c}`.length*.7/2;if(e.right){const p=-((e.right-1)/2)*e.p;for(let m=0;m<e.right;m++){if(m===0&&!e.left&&!e.bottom&&!e.silkscreenlabels&&(s=Fne(e.w/2-e.pl*1.4,p+m*e.p,"right")),o.push(Jo(m+1+e.left+(e.bottom??0),e.w/2-e.pl/2,p+m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1+e.left+(e.bottom??0),f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:e.w/2-e.pl-(u+e.silkscreenlabelmargin),y:p+m*e.p},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"})}e.innerhole&&(i.push(ks(m+1+e.left+(e.bottom??0)+c,e.w/2,p+m*e.p,a,A)),i.push(ks(m+1+e.left+(e.bottom??0)+c*2,e.w/2-e.innerholeedgedistance,p+m*e.p,a,A)))}}if(e.left){const p=(e.left-1)/2*e.p;for(let m=0;m<e.left;m++){if(m===0&&!e.silkscreenlabels&&(s=Fne(-e.w/2+e.pl*1.4,p-m*e.p,"left")),o.push(Jo(m+1,-e.w/2+e.pl/2,p-m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1,f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:-e.w/2+e.pl+(u+e.silkscreenlabelmargin),y:p-m*e.p},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"})}e.innerhole&&(i.push(ks(m+1+c,-e.w/2,p-m*e.p,a,A)),i.push(ks(m+1+c*2,-e.w/2+e.innerholeedgedistance,p-m*e.p,a,A)))}}if(e.top){const p=(e.top-1)/2*e.p;for(let m=0;m<e.top;m++){if(m===0&&!e.left&&!e.bottom&&!e.right&&!e.silkscreenlabels&&(s=Fne(p-m*e.p,n/2-e.pl*1.4,"top")),o.push(Jo(m+1+e.left+e.right+(e.bottom??0),p-m*e.p,n/2-e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left+e.right+(e.bottom??0),f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:p-m*e.p,y:n/2-e.pl-(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center",ccw_rotation:270})}e.innerhole&&(i.push(ks(m+1+e.left+e.right+(e.bottom??0)+c,p-m*e.p,n/2,a,A)),i.push(ks(m+1+e.left+e.right+(e.bottom??0)+c*2,p-m*e.p,n/2-e.innerholeedgedistance,a,A)))}}if(e.bottom){const p=-((e.bottom-1)/2)*e.p;for(let m=0;m<e.bottom;m++){if(m===0&&!e.left&&!e.silkscreenlabels&&(s=Fne(p+m*e.p,-n/2+e.pl*1.4,"bottom")),o.push(Jo(m+1+e.left,p+m*e.p,-n/2+e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left,f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:p+m*e.p,y:-n/2+e.pl+(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center",ccw_rotation:90})}e.innerhole&&(i.push(ks(m+1+e.left+c,p+m*e.p,-n/2,a,A)),i.push(ks(m+1+e.left+c*2,p+m*e.p,-n/2+e.innerholeedgedistance,a,A)))}}const g={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_triangle_1",pcb_component_id:"2",route:s,stroke_width:.1,layer:"top"},h={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_path_1",pcb_component_id:"1",route:[{x:-e.w/2,y:n/2},{x:e.w/2,y:n/2},{x:e.w/2,y:-n/2},{x:-e.w/2,y:-n/2},{x:-e.w/2,y:n/2}],stroke_width:.1,layer:"top"},d=yi(0,n/1.8,n/25);return{circuitJson:[...o,...i,...r,h,...e.silkscreenlabels?[]:[g],d],parameters:e}},nct=Ii.extend({fn:Z(),w:ce.default("22.58mm"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse("2.54mm")),pw:ce.default(ce.parse("1.6mm")),pl:ce.default(ce.parse("3.2mm")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse("1.61mm"))}),o6n=t=>{const e=nct.parse(t);return e.left&&e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},i6n=(t,e,n,o=1,i=.6)=>{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},r6n=t=>{const e=nct.parse(t),n=e.h??o6n(e),o=[],i=[],r=[],s=1,a=1.2,A=e.left+e.right+(e.bottom??0)+(e.top??0);let c=[],l=1;if(e.left){const d=(e.left-1)/2*e.p;for(let p=0;p<e.left;p++)p===0&&(c=i6n(-e.w/2-e.pl/2,d-p*e.p,"left")),o.push(Jo(l,-e.w/2+e.pl/2,d-p*e.p,e.pl,e.pw)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:-e.w/2+e.pl/2-4.5,y:d-p*e.p},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(ks(l+A,-e.w/2+e.innerholeedgedistance,d-p*e.p,s,a))}if(e.bottom){const d=(e.bottom-1)/2*e.p;for(let p=e.bottom-1;p>=0;p--)o.push(Jo(l,d-p*e.p,-n/2+e.pl/2,e.pw,e.pl)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:d-p*e.p,y:-n/2+e.pl/2-3.2},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(ks(l+A,d-p*e.p,-n/2+e.innerholeedgedistance,s,a))}if(e.right){const d=-((e.right-1)/2)*e.p;for(let p=0;p<e.right;p++)o.push(Jo(l,e.w/2-e.pl/2,d+p*e.p,e.pl,e.pw)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:e.w/2-e.pl/2+3.7,y:d+p*e.p},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(ks(l+A,e.w/2-e.innerholeedgedistance,d+p*e.p,s,a))}if(e.top){const d=-((e.top-1)/2)*e.p;for(let p=e.top-1;p>=0;p--)o.push(Jo(l,d+p*e.p,n/2-e.pl/2,e.pw,e.pl)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:d+p*e.p,y:n/2-e.pl/2+3.2},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(ks(l+A,d+p*e.p,n/2-e.innerholeedgedistance,s,a))}const u={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"1",pcb_component_id:"1",layer:"top",route:c,stroke_width:.1},g={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_path_1",pcb_component_id:"1",route:[{x:-e.w/2-e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:n/2+e.pl/3}],stroke_width:.1,layer:"top"},h=yi(0,n/1.8,n/25);return{circuitJson:[...r,...o,...i,g,u,h],parameters:e}},s6n=t=>(t.legsoutside=!0,t.pl||(t.pl=1.5),t.pw||(t.pw=.3),eD(t)),a6n=Ii.extend({fn:Z(),num_pins:_t().int().positive().optional().default(14),grid:K4.optional(),p:ce.default(ce.parse("0.5mm")),w:ce.optional(),h:ce.optional(),pw:ce.default(ce.parse("0.28mm")),pl:ce.default(ce.parse("0.7mm")),pillpads:je().optional().default(!1)}),A6n=t=>{const e=a6n.parse(t),n=e.num_pins/2;if(!Number.isInteger(n))throw new Error("LGA footprints require an even number of perimeter pads");const o=e.grid??{x:Math.ceil(n/2),y:Math.floor(n/2)};if(!Number.isInteger(o.x)||!Number.isInteger(o.y)||o.x<0||o.y<0||o.x+o.y<=0||2*(o.x+o.y)!==e.num_pins)throw new Error(`LGA grid ${o.x}x${o.y} requires ${2*(o.x+o.y)} pads, got ${e.num_pins}`);const i=e.w??(o.y-1)*e.p+2*e.pl,r=e.h??(o.x-1)*e.p+2*e.pl,s=(i-e.pl)/2,a=(r-e.pl)/2,A=[],c=(p,m,_,f,I)=>{A.push(e.pillpads?XM(p,m,_,f,I):Jo(p,m,_,f,I))};let l=1;for(let p=0;p<o.x;p+=1)c(l++,-s,((o.x-1)/2-p)*e.p,e.pl,e.pw);for(let p=0;p<o.y;p+=1)c(l++,(p-(o.y-1)/2)*e.p,-a,e.pw,e.pl);for(let p=0;p<o.x;p+=1)c(l++,s,(p-(o.x-1)/2)*e.p,e.pl,e.pw);for(let p=0;p<o.y;p+=1)c(l++,((o.y-1)/2-p)*e.p,a,e.pw,e.pl);const u=Math.max(e.pw,.15),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_marker",stroke_width:.1,route:[{x:-i/2,y:r/2-u},{x:-i/2,y:r/2},{x:-i/2+u,y:r/2}]},h=.25,d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:[{x:-i/2-h,y:-r/2-h},{x:i/2+h,y:-r/2-h},{x:i/2+h,y:r/2+h},{x:-i/2-h,y:r/2+h},{x:-i/2-h,y:-r/2-h}]};return{circuitJson:[...A,g,yi(0,r/2+.5,.3),d],parameters:{...e,grid:o,w:i,h:r}}},oct=Ii.extend({fn:Z(),w:ce.default("10mm"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(0),bottom:ce.optional().default(0),p:ce.default(ce.parse("2.54mm")),id:ce.optional().default(ce.parse("1mm")),od:ce.optional().default(ce.parse("1.5mm"))}),c6n=t=>{const e=oct.parse(t);return e.left&&e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},Lne=(t,e,n,o=1,i=.6)=>{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},l6n=t=>{const e=oct.parse(t),n=e.h??c6n(e),o=[],i=e.id,r=e.od;let s=[];if(e.right){const l=-((e.right-1)/2)*e.p;for(let u=0;u<e.right;u++)u===0&&!e.left&&!e.bottom&&(s=Lne(e.w/2+r*1.4,l+u*e.p,"right")),o.push(ks(u+1+e.left+(e.bottom??0),e.w/2,l+u*e.p,i,r))}if(e.left){const l=-((e.left-1)/2)*e.p;for(let u=0;u<e.left;u++)u===e.left-1&&(s=Lne(-e.w/2-r*1.4,l+u*e.p,"left")),o.push(ks(u+1,-e.w/2,l+u*e.p,i,r))}if(e.top){const l=-((e.top-1)/2)*e.p;for(let u=0;u<e.top;u++)u===e.top-1&&!e.left&&!e.bottom&&!e.right&&(s=Lne(l+u*e.p,n/2+r*1.4,"top")),o.push(ks(u+1+e.right+(e.bottom??0)+e.left,l+u*e.p,n/2,i,r))}if(e.bottom){const l=-((e.bottom-1)/2)*e.p;for(let u=0;u<e.bottom;u++)u===0&&!e.left&&(s=Lne(l+u*e.p,-n/2-r*1.4,"bottom")),o.push(ks(u+1+e.left,l+u*e.p,-n/2,i,r))}const a={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"1",pcb_component_id:"1",layer:"top",route:s,stroke_width:.1},A={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_path_1",pcb_component_id:"1",route:[{x:-e.w/2-r,y:n/2+r},{x:e.w/2+r,y:n/2+r},{x:e.w/2+r,y:-n/2-r},{x:-e.w/2-r,y:-n/2-r},{x:-e.w/2-r,y:n/2+r}],stroke_width:.1,layer:"top"},c=yi(0,n/1.7,n/25);return{circuitJson:[...o,A,c,a],parameters:e}},u6n=t=>{const{centerX:e,centerY:n,straightHalfLength:o,radius:i,arcSegmentCount:r=9,orientation:s="horizontal"}=t;if(o<0)throw new Error("Capsule straightHalfLength must be non-negative");if(i<=0)throw new Error("Capsule radius must be positive");if(r<2)throw new Error("Capsule arcSegmentCount must be at least 2");if(s==="horizontal"){const u=e-o,g=e+o,h=Array.from({length:r+1},(p,m)=>{const _=Math.PI/2-m*Math.PI/r;return{x:g+Math.cos(_)*i,y:n+Math.sin(_)*i}}),d=Array.from({length:r+1},(p,m)=>{const _=-Math.PI/2+m*Math.PI/r;return{x:u-Math.cos(_)*i,y:n+Math.sin(_)*i}});return[{x:u,y:n+i},{x:g,y:n+i},...h.slice(1,-1),{x:g,y:n-i},{x:u,y:n-i},...d.slice(1,-1)]}const a=n-o,A=n+o,c=Array.from({length:r+1},(u,g)=>{const h=Math.PI-g*Math.PI/r;return{x:e+Math.cos(h)*i,y:A+Math.sin(h)*i}}),l=Array.from({length:r+1},(u,g)=>{const h=g*Math.PI/r;return{x:e+Math.cos(h)*i,y:a-Math.sin(h)*i}});return[{x:e-i,y:a},{x:e-i,y:A},...c.slice(1,-1),{x:e+i,y:A},{x:e+i,y:a},...l.slice(1,-1)]},ict=(t,e,n,o)=>Array.from({length:25},(i,r)=>{const s=r/24*Math.PI-Math.PI/2;return{x:t+(o==="right"?1:-1)*Math.cos(s)*n,y:e+Math.sin(s)*n}}),g6n=Ii.extend({fn:Z(),p:ce.optional().default("4.88mm"),id:ce.optional().default("0.8mm"),od:ce.optional().default("1.5mm"),w:ce.optional().default("5.6mm"),h:ce.optional().default("3.5mm")}),d6n=t=>{const e=g6n.parse(t),{p:n,id:o,od:i,w:r,h:s}=e,a=s/2,A=[ks(1,-n/2,0,o,i),ks(2,n/2,0,o,i)],c=ict(-r/2,0,a,"left"),l=ict(r/2,0,a,"right"),u={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[...c,...c.slice(1).reverse(),{x:-r/2,y:-s/2},{x:r/2,y:-s/2},...l,{x:r/2,y:s/2},{x:-r/2,y:s/2}],stroke_width:.1,pcb_silkscreen_path_id:""},g=yi(0,n/4,.5),d=n/2+i/2,p=Math.max(s/2+.25,r/2+.03),m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:u6n({centerX:0,centerY:0,straightHalfLength:d,radius:p,arcSegmentCount:9}),layer:"top"};return{circuitJson:[...A,u,g,m],parameters:e}};Ii.extend({w:ce,h:ce});var h6n=t=>{const{w:e,h:n}=t,o=KA(e),i=KA(n);return{circuitJson:[Jo(1,0,0,o,i),yi(0,i/2+.5,.2)],parameters:t}},T9=(t,e,n,o,i,r)=>({pcb_plated_hole_id:"",type:"pcb_plated_hole",shape:"pill",x:e,y:n,outer_width:KA(i),outer_height:KA(r),hole_width:KA(o),hole_height:KA(o),pcb_port_id:"",layers:["top","bottom"],port_hints:[t.toString()],ccw_rotation:0}),p6n=[{x:-2.5,y:4.75},{x:-2.5,y:-.25},{x:2.5,y:-.25},{x:2.5,y:4.75}],m6n=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default("1.27mm"),id:Z().default("0.72mm"),od:Z().default("0.95mm"),w:Z().default("4.5mm"),h:Z().default("4.5mm"),inline:je().default(!1),string:Z().optional()}),_6n=(t,e,n)=>Array.from({length:25},(o,i)=>{const r=i/24*Math.PI;return{x:t+Math.cos(r)*n,y:e+Math.sin(r)*n}}),f6n=t=>{const e=t.string?.match(/^to92_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=m6n.parse({...t,num_pins:n}),{p:i,id:r,od:s,w:a,h:A,inline:c}=o,l=Number.parseFloat(A)/2,u=Number.parseFloat(i),g=Number.parseFloat(r),h=Number.parseFloat(s),d=h,p=h*(1.5/1.05);let m=[];if(o.num_pins===3)c?m=[yy({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:p}),T9(2,0,l-u,g,d,p),T9(3,u,l-u,g,d,p)]:m=[yy({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:h}),ks(2,0,l,g,h),ks(3,u,l-u,g,h)];else if(o.num_pins===2)m=[yy({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:d,rectPadHeight:p}),T9(2,u,l-u,g,d,p)];else throw new Error("Invalid number of pins for TO-92");const _=Number.parseFloat(a)/2,f=_6n(0,l,_),I={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[...f,{x:-_,y:0},{x:_,y:0},f[0]],stroke_width:.1,pcb_silkscreen_path_id:""},C=yi(0,l+1,.5),y={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:p6n,layer:"top"};return{circuitJson:[...m,I,C,y],parameters:o}},I6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("2.15mm"),h:Z().default("0.7mm"),pl:Z().default("0.6mm"),pw:Z().default("0.7mm"),p:Z().default("1.4mm")}),C6n=t=>{const e=I6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2.5,height:1.4,layer:"top"};return{circuitJson:x6n(e).concat(...Xd(e),o,n,s),parameters:e}},y6n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},x6n=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.075;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=y6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},E6n=ZM({w:"7.05mm",p:"1.27mm",pw:"0.65mm",pl:"1.975mm"}),B6n=t=>{const e=E6n.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let h=0;h<e.num_pins;h++){const{x:d,y:p}=hxe({num_pins:e.num_pins,pn:h+1,w:e.w,p:e.p??1.27,pl:e.pl,widthincludeslegs:!0});n.push(Jo(h+1,d,p,e.pl,e.pw,o))}const i=(e.num_pins/2-1)*e.p+e.pw,r=yi(0,i/2+1,i/12),s={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:-e.w/3,y:i/2+.4},{x:e.w/3,y:i/2+.4}],stroke_width:.1},a=(e.num_pins/2-1)*e.p+e.pw,A=e.w/2-1.395,c=e.w/2+.255,l=a/2+.25,u=a/2+.5,g={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-c,maxX:c,minY:-l,maxY:l},{minX:-A,maxX:A,minY:-u,maxY:u}])};return{circuitJson:[...n,r,s,g],parameters:e}},b6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("5.0mm"),h:Z().default("2.30mm"),pl:Z().default("1.25mm"),pw:Z().default("2mm"),p:Z().default("3.75mm")}),S6n=t=>{const e=b6n.parse(t),n=yi(0,ce.parse(e.h)/2+1,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2+.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2-.5},{x:ce.parse(e.p)/2+.5,y:-ce.parse(e.h)/2-.5}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:5.1,height:2.8,layer:"top"};return{circuitJson:v6n(e).concat(...Xd(e),o,n,s),parameters:e}},Q6n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},v6n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=Q6n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},w6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.4mm"),h:Z().default("1.7mm"),pl:Z().default("1.2mm"),pw:Z().default("1.2mm"),p:Z().default("2.8mm")}),P6n=t=>{const e=w6n.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.5,height:2.2,layer:"top"};return{circuitJson:D6n(e).concat(...Xd(e),o,n,s),parameters:e}},M6n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},D6n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=M6n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},N6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.30mm"),h:Z().default("1.80mm"),pl:Z().default("0.60mm"),pw:Z().default("0.45mm"),p:Z().default("2.1mm")}),R6n=t=>{const e=N6n.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.2,height:1.9,layer:"top"};return{circuitJson:k6n(e).concat(...Xd(e),o,n,s),parameters:e}},T6n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},k6n=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.05625;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=T6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},F6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.4mm"),h:Z().default("0.9mm"),pl:Z().default("0.36mm"),pw:Z().default("0.25mm"),p:Z().default("0.85mm")}),L6n=t=>{const e=F6n.parse(t),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.pl),r=ce.parse(e.pw),s=ce.parse(e.p),a=yi(0,o,.3),A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:s/2+.15,y:o/2},{x:-n/2-.15,y:o/2},{x:-n/2-.15,y:-o/2},{x:s/2+.15,y:-o/2}],stroke_width:.1,pcb_silkscreen_path_id:""},c=s+i,l=r,u=n/2,g=o/2,h=c/2,d=l/2,p=Math.max(u,h),m=Math.max(g,d),_=Math.min(u,h),f=Math.min(g,d),I=p+.05,C=_-.055,y=m,x=f+.155,E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:xy([{minX:-I,maxX:I,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-y,maxY:y}]),layer:"top"};return{circuitJson:O6n(e).concat(...Xd(e),A,a,E),parameters:e}},H6n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},O6n=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.03125;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=H6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},G6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.3mm"),h:Z().default("0.9mm"),pl:Z().default("0.4mm"),pw:Z().default("0.7mm"),p:Z().default("0.7mm")}),Y6n=t=>{const e=G6n.parse(t),n=yi(0,ce.parse(e.h)+.1,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2+.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2+.2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:1.6,height:1.2,layer:"top"};return{circuitJson:K6n(e).concat(...Xd(e),o,n,s),parameters:e}},U6n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},K6n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=U6n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.025))}return e},V6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.05mm"),h:Z().default("1.4mm"),pl:Z().default("0.5mm"),pw:Z().default("0.5mm"),pad_spacing:Z().default("2.2mm")}),z6n=t=>{const e=V6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.2,height:1.9,layer:"top"};return{circuitJson:W6n(e).concat(...Xd(e),o,n,s),parameters:e}},J6n=t=>{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},W6n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=J6n({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},j6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.4mm"),h:Z().default("2.1mm"),pl:Z().default("1.10mm"),pw:Z().default("1.10mm"),p:Z().default("2.8mm")}),$6n=t=>{const e=j6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.4,height:2.3,layer:"top"};return{circuitJson:X6n(e).concat(...Xd(e),o,n,s),parameters:e}},q6n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},X6n=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=q6n({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},Z6n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.4mm"),h:Z().default("2.1mm"),pl:Z().default("0.91mm"),pw:Z().default("1.22mm"),p:Z().default("3.146mm")}),e8n=t=>{const e=Z6n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.9,height:2.7,layer:"top"};return{circuitJson:n8n(e).concat(...Xd(e),o,n,s),parameters:e}},t8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},n8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=t8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},o8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.80mm"),h:Z().default("1.00mm"),pl:Z().default("0.66mm"),pw:Z().default("0.5mm"),p:Z().default("0.8mm")}),i8n=t=>{const e=o8n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2.3,height:1.5,layer:"top"};return{circuitJson:s8n(e).concat(...Xd(e),o,n,s),parameters:e}},r8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},s8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=r8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},a8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("6.2mm"),h:Z().default("3.4mm"),pl:Z().default("1.4mm"),pw:Z().default("2.1mm"),p:Z().default("4.4mm")}),A8n=t=>{const e=a8n.parse(t),n=yi(0,ce.parse(e.h)/2+.4,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:6.3,height:3,layer:"top"};return{circuitJson:l8n(e).concat(...Xd(e),o,n,s),parameters:e}},c8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},l8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=c8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},u8n=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.25,y:2.5},{x:2.25,y:-2.5}],g8n=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.85,y:2.5},{x:2.85,y:-2.5}],d8n=[{x:.9,y:.5},{x:2.6,y:.5},{x:2.6,y:-.5},{x:.9,y:-.5},{x:.4,y:-1},{x:-.4,y:-1},{x:-.9,y:-.5},{x:-2.6,y:-.5},{x:-2.6,y:.5},{x:-.9,y:.5},{x:-.4,y:1},{x:.4,y:1}],h8n=[{x:2,y:-.8665},{x:-1.125,y:-.8665},{x:-1.125,y:-.45},{x:-2.6,y:-.45},{x:-2.6,y:.45},{x:-1.125,y:.45},{x:-1.125,y:.8665},{x:2,y:.8665}],p8n=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(5)]).default(3),w:Z().default("4.20mm"),h:Z().default("4.80mm"),pl:Z().default("1.3mm"),pw:Z().default("0.9mm"),p:Z().default("1.5mm"),string:Z().optional()}),m8n=t=>{const e=Number.parseFloat(t.p),n=Number.parseFloat(t.pw),o=Number.parseFloat(t.w),i=Number.parseFloat(t.pl),r=Math.min(i,n)/8,s=-o/2+.15,a=o/2-1,A=Number.parseFloat(t.h)/2,c=[Jo(1,s,e,i,n,r),_xe(2,h8n),Jo(3,s,-e,i,n,r)],l=yi(0,A+.5,.3),u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-a,y:A},{x:a,y:A},{x:a,y:A/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},g={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-a,y:-A},{x:a,y:-A},{x:a,y:-A/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},h={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:u8n,layer:"top"};return[...c,u,g,l,h]},_8n=t=>{const e=Math.min(1.5,.7)/8,n=[Jo(1,-1.85,-1.5,1.5,.7,e),Jo(2,-1.85,1.5,1.5,.7,e),_xe(3,d8n),Jo(4,1.85,-1.5,1.5,.7,e),Jo(5,1.85,1.5,1.5,.7,e)],o=Number.parseFloat(t.w)/2-1,i=Number.parseFloat(t.h)/2,r=yi(0,i+.5,.3),s={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-o,y:i},{x:o,y:i}],type:"pcb_silkscreen_path",stroke_width:.1},a={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-o,y:-i},{x:o,y:-i}],type:"pcb_silkscreen_path",stroke_width:.1},A={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:g8n,layer:"top"};return[...n,s,a,r,A]},f8n=t=>{const e=t.string?.match(/^sot89_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=p8n.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:m8n(o),parameters:o};if(o.num_pins===5)return{circuitJson:_8n(o),parameters:o};throw new Error("Invalid number of pins for SOT89")},I8n=Ii.extend({fn:Z(),p:ce.optional().default("5.0mm"),id:ce.optional().default("1.0mm"),od:ce.optional().default("1.9mm"),w:ce.optional().default("13mm"),h:ce.optional().default("7mm"),num_pins:_t().optional(),string:Z().optional()}),rct=t=>{const e=I8n.parse(t),{id:n,od:o,w:i,h:r,string:s}=e,a=e.num_pins??Number.parseInt(s?.match(/^to220(?:_|-)(\d+)/i)?.[1]??"3"),A=-1,c=i/2,l=r/2,u=2.5,g=i*.4,h=Math.max(u,g/(a-1)),d=Array.from({length:a},(F,O)=>{const U=a%2===0?(O-a/2+.5)*h:(O-Math.floor(a/2))*h;return ks(O+1,U,A,n,o)}),p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-c,y:-l},{x:c,y:-l},{x:c,y:l},{x:-c,y:l},{x:-c,y:-l}],stroke_width:.1,pcb_silkscreen_path_id:""},m=-l+2*r/3,_={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-c,y:m},{x:c,y:m}],stroke_width:.1,pcb_silkscreen_path_id:""},f=[{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-i/6,y:m},{x:-i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:""},{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:i/6,y:m},{x:i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:""}],I=yi(0,r/2+.6,.5),C=Math.max(...d.map(F=>Math.abs(F.x)))+o/2,y=A+o/2,x=A-o/2,E=Math.max(C+.25,c-o*.59),B=l-o*.63,S=x-(o/2+.01),Q=-E,w=E,M=Math.min(S,x-.25),k=Math.max(B,y+.25),R={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(Q+w)/2,y:(M+k)/2},width:w-Q,height:k-M,layer:"top"};return{circuitJson:[...d,p,_,...f,I,R],parameters:{...e,p:h}}},fxe=2.54,C8n=Ii.extend({fn:Z(),id:ce.optional().default("1.2mm"),od:ce.optional().default("1.905mm"),ph:ce.optional().default("2mm"),w:ce.optional().default("13mm"),h:ce.optional().default("7mm"),num_pins:_t().optional(),string:Z().optional()}),y8n=t=>{const e=C8n.parse(t),n=e.num_pins??Number.parseInt(e.string?.match(/^to220f(?:_|-)(\d+)/i)?.[1]??"3"),o=rct({...e,fn:"to220",string:e.string?.replace(/^to220f/i,"to220"),num_pins:n}),i=-1,r=Array.from({length:n},(a,A)=>{const c=n%2===0?(A-n/2+.5)*fxe:(A-Math.floor(n/2))*fxe;return A===0?yy({pn:1,x:c,y:i,holeDiameter:e.id,rectPadWidth:e.od,rectPadHeight:e.ph}):T9(A+1,c,i,KA(e.id),KA(e.od),KA(e.ph))}),s=o.circuitJson.filter(a=>a.type!=="pcb_plated_hole");return{circuitJson:[...r,...s],parameters:{...e,p:fxe,num_pins:n}}},x8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("5.40mm"),h:Z().default("2.30mm"),pl:Z().default("1.30mm"),pw:Z().default("1.70mm"),p:Z().default("3.5mm")}),E8n=t=>{const e=x8n.parse(t),n=yi(0,ce.parse(e.h)/2+.4,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:5.3,height:2.2,layer:"top"};return{circuitJson:b8n(e).concat(...Xd(e),o,n,s),parameters:e}},B8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},b8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=B8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},S8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.90mm"),h:Z().default("1.33mm"),pl:Z().default("0.5mm"),pw:Z().default("0.7mm"),p:Z().default("0.8mm")}),Q8n=t=>{const e=S8n.parse(t),n=yi(0,ce.parse(e.h)+.1,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2+.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2+.1,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:1.8,height:1.2,layer:"top"};return{circuitJson:w8n(e).concat(...Xd(e),o,n,s),parameters:e}},v8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},w8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=v8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},P8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("7.0mm"),h:Z().default("3.35mm"),pl:Z().default("1.50mm"),pw:Z().default("2.70mm"),p:Z().default("4.8mm")}),M8n=t=>{const e=P8n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:6.8,height:3.2,layer:"top"};return{circuitJson:N8n(e).concat(...Xd(e),o,n,s),parameters:e}},D8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},N8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=D8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},R8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.0mm"),h:Z().default("1.80mm"),pl:Z().default("0.80mm"),pw:Z().default("1.20mm"),p:Z().default("1.6mm")}),T8n=t=>{const e=R8n.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2.9,height:1.7,layer:"top"};return{circuitJson:F8n(e).concat(...Xd(e),o,n,s),parameters:e}},k8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},F8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=k8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},L8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("7.10mm"),h:Z().default("3.40mm"),pl:Z().default("2.50mm"),pw:Z().default("1.80mm"),p:Z().default("4.00mm")}),H8n=t=>{const e=L8n.parse(t),n=yi(0,ce.parse(e.h)/2+.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:7,height:3.5,layer:"top"};return{circuitJson:G8n(e).concat(...Xd(e),o,n,s),parameters:e}},O8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},G8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=O8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},Y8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.80mm"),h:Z().default("2.10mm"),pl:Z().default("1.30mm"),pw:Z().default("1.40mm"),p:Z().default("2.9mm")}),U8n=t=>{const e=Y8n.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.7,height:2.3,layer:"top"};return{circuitJson:V8n(e).concat(...Xd(e),o,n,s),parameters:e}},K8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},V8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=K8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},z8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("7.30mm"),h:Z().default("4.40mm"),pl:Z().default("2.50mm"),pw:Z().default("2.30mm"),p:Z().default("4.30mm")}),J8n=t=>{const e=z8n.parse(t),n=yi(0,ce.parse(e.h)/2+.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:7.3,height:4.5,layer:"top"};return{circuitJson:j8n(e).concat(...Xd(e),o,n,s),parameters:e}},W8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},j8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=W8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},$8n=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("10.70mm"),h:Z().default("6.60mm"),pl:Z().default("2.50mm"),pw:Z().default("3.30mm"),p:Z().default("6.80mm")}),q8n=t=>{const e=$8n.parse(t),n=yi(0,3,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:-ce.parse(e.h)/2+.8},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2+.8}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:9.8,height:6.7,layer:"top"};return{circuitJson:Z8n(e).concat(...Xd(e),o,n,s),parameters:e}},X8n=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Z8n=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=X8n({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},ebn=Ii.extend({fn:Z(),num_pins:_t().default(4),w:Z().default("8.50mm"),h:Z().default("6.90mm"),pl:Z().default("2mm"),pw:Z().default("1.5mm"),p:Z().default("2.30mm"),tabpl:Z().optional(),tabpw:Z().default("3.8mm"),taboffset:Z().default("0mm"),string:Z().optional()}),tbn=t=>{const e=t.string?.match(/^sot223_(\d+)/),n=e?Number.parseInt(e[1],10):4;if(n===8){const i=ibn.parse({...t,num_pins:n});return{circuitJson:IV(i),parameters:i}}const o=ebn.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:obn(o),parameters:o};if(o.num_pins===5)return{circuitJson:sbn(o),parameters:o};if(o.num_pins===6)return{circuitJson:Abn(o),parameters:o};throw new Error("Invalid number of pins")},nbn=t=>{const{pn:e,w:n,p:o,taboffset:i}=t;return e===1?{x:-n/2+1.1,y:o}:e===2?{x:-n/2+1.1,y:0}:e===3?{x:-n/2+1.1,y:-o}:{x:n/2-1.1+i,y:0}},obn=t=>{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h),s=Number.parseFloat(t.pl),a=Number.parseFloat(t.p),A=Number.parseFloat(t.pw),c=Number.parseFloat(t.tabpl??t.pl),l=Number.parseFloat(t.tabpw),u=Number.parseFloat(t.taboffset);for(let x=0;x<t.num_pins;x++){const{x:E,y:B}=nbn({num_pins:t.num_pins,pn:x+1,w:i,p:a,taboffset:u}),S=x===3?l:A,Q=x===3?c:s,w=Math.min(Q,S)/8;n=Math.max(n,Math.abs(E)+Q/2),o=Math.max(o,Math.abs(B)+S/2),e.push(Jo(x+1,E,B,Q,S,w))}const g=yi(0,0,.3),h=i/2-2.4,d=r/2,p={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-h,y:d},{x:h,y:d},{x:h,y:d/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},m={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-h,y:-d},{x:h,y:-d},{x:h,y:-d/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},_=i/2,f=r/2,I=Math.max(n+.25,_+.15),C=Math.max(o+.25,f+.15),y={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*I,height:2*C,layer:"top"};return[...e,p,m,g,y]},ibn=ZM({p:"0.90mm",w:"2.8mm",legsoutside:!0}),rbn=t=>{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:e/2+e};if(n===2)return{x:-o/2+1.2,y:e/2};if(n===3)return{x:-o/2+1.2,y:-e/2};if(n===4)return{x:-o/2+1.2,y:-e/2-e};if(n===5)return{x:o/2-1,y:0};throw new Error("Invalid pin number")},sbn=t=>{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h);for(let m=1;m<=t.num_pins;m++){const{x:_,y:f}=rbn({p:1.5,pn:m,w:i});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===5?(I=3.4,C=1.8):(I=1,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Jo(m,_,f,C,I,y))}const s=i/2-2.4,a=r/2,A={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},c={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},l=yi(0,0,.3),u=i/2,g=r/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*h,height:2*d,layer:"top"};return[...e,A,c,l,p]},abn=t=>{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:2*e};if(n===2)return{x:-o/2+1.2,y:e};if(n===3)return{x:-o/2+1.2,y:0};if(n===4)return{x:-o/2+1.2,y:-e};if(n===5)return{x:-o/2+1.2,y:-2*e};if(n===6)return{x:o/2-1.175,y:0};throw new Error("Invalid pin number")},Abn=t=>{const e=[];let n=0,o=0;const i=Number.parseFloat(t.h),r=8.7;for(let m=1;m<=t.num_pins;m++){const{x:_,y:f}=abn({p:1.3,pn:m,w:r});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===6?(I=3.4,C=2.15):(I=.6,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Jo(m,_,f,C,I,y))}const s=Number.parseFloat(t.w)/2-2.4,a=i/2,A={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},c={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},l=yi(0,0,.3),u=Number.parseFloat(t.w)/2,g=i/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*h,height:2*d,layer:"top"};return[...e,A,c,l,p]},cbn=Ii.extend({fn:Z(),num_pins:_t().default(3),w:Z().default("3.40mm"),h:Z().default("3.30mm"),pl:Z().default("1mm"),pw:Z().default("0.7mm"),p:Z().default("1.2mm"),string:Z().optional()}),lbn=t=>{const e=t.string?.match(/^sot23w_(\d+)/),n=e?Number.parseInt(e[1],3):3,o=cbn.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:gbn(o),parameters:o};throw new Error("Invalid number of pins")},ubn=t=>{const{pn:e,p:n}=t;return e===1?{x:-n,y:.95}:e===2?{x:-n,y:-.95}:{x:n,y:0}},gbn=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let I=0;I<t.num_pins;I++){const{x:C,y}=ubn({num_pins:t.num_pins,pn:I+1,p:s});e.push(Jo(I+1,C,y,i,r,a))}const A=yi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-1,l=o/2,u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-c,y:l},{x:c+.3,y:l},{x:c+.3,y:l/2}],type:"pcb_silkscreen_path",stroke_width:.1},g={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-c,y:-l},{x:c+.3,y:-l},{x:c+.3,y:-l/2}],type:"pcb_silkscreen_path",stroke_width:.1},h=s+i/2,d=.95+r/2,p=o/2,m=h+.25,_=Math.max(d+.25,p+.09),f={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*m,height:2*_,layer:"top"};return[...e,u,g,A,f]},dbn=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default("1.27mm"),id:Z().default("0.72mm"),od:Z().default("0.95mm"),w:Z().default("2.5mm"),h:Z().default("4.2mm"),string:Z().optional()}),hbn=t=>{const{p:e,id:n,od:o,w:i,h:r}=t,s=Number.parseFloat(r)/2,a=Number.parseFloat(e);return[ks(1,-a,s-a,n,o),ks(2,0,s-a,n,o),ks(3,a,s-a,n,o)]},pbn=t=>{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i)/2,s=Number.parseFloat(e),a=Number.parseFloat(n),A=Number.parseFloat(o),c=A*(1.5/1.05);return[yy({pn:1,x:-s,y:r-s,holeDiameter:a,rectPadWidth:A,rectPadHeight:c}),T9(2,s,r-s,a,A,c)]},mbn=t=>{const e=t.string?.match(/^to92s_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=dbn.parse({...t,num_pins:n});let i=[];if(o.num_pins===3)i=hbn(o);else if(o.num_pins===2)i=pbn(o);else throw new Error("Invalid number of pins for TO-92");const r=Number.parseFloat(o.h)/2,s=Number.parseFloat(o.p),a={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-r,y:r-s},{x:-1.9,y:0},{x:1.9,y:0},{x:r,y:r-s},{x:1.5,y:Number.parseFloat(o.h)/2+.5},{x:-1.5,y:Number.parseFloat(o.h)/2+.5},{x:-r,y:r-s}],stroke_width:.1,pcb_silkscreen_path_id:""},A=yi(0,r+1,.5),c=Number.parseFloat(o.od),l=r-s,u=-s-c/2,g=s+c/2,h=l-c/2,d=l+c/2,p=-r,m=r,_=0,f=r+.5,I=Math.min(u,p)-.25,C=Math.max(g,m)+.25,y=Math.min(h,_)-.25,x=Math.max(d,f)+.25,E={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(I+C)/2,y:(y+x)/2},width:C-I,height:x-y,layer:"top"};return{circuitJson:[...i,a,A,E],parameters:o}},_bn=Ii.extend({fn:Z(),p:ce.optional(),id:ce.optional(),pw:ce.optional(),pl:ce.optional(),w:ce.optional(),h:ce.optional(),mpx:ce.optional().describe("center-to-center distance between the SMD mounting pads"),mpy:ce.optional().describe("mounting-pad row distance from the signal-pad row"),mpw:ce.optional().describe("SMD mounting pad width"),mpl:ce.optional().describe("SMD mounting pad length"),mounttop:je().optional().describe("place SMD mounting pads above the signal-pad row"),smd:je().optional().describe("Generic surface-mount JST-style connector with one signal row and two mounting pads."),sh:je().optional().describe('JST SH (Surface-mount) connector family. SH stands for "Super High-density".'),ph:je().optional().describe('JST PH (Through-hole) connector family. PH stands for "Pin Header".'),zh:je().optional().describe("JST ZH (Through-hole) connector family. 1.5mm pitch wire-to-board."),xh:je().optional().describe("JST XH (Through-hole) connector family. 2.5mm pitch wire-to-board."),string:Z().optional()}),fbn=()=>({minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),bQ=({bounds:t,centerX:e,centerY:n,width:o,height:i})=>{const r=o/2,s=i/2;t.minX=Math.min(t.minX,e-r),t.maxX=Math.max(t.maxX,e+r),t.minY=Math.min(t.minY,n-s),t.maxY=Math.max(t.maxY,n+s)},Ibn={ph:{p:ce.parse("2mm"),id:ce.parse("0.75mm"),pw:ce.parse("1.20mm"),pl:ce.parse("1.75mm"),h:ce.parse("5mm")},sh:{p:ce.parse("1mm"),pw:ce.parse("0.6mm"),pl:ce.parse("1.55mm"),w:ce.parse("5.8mm"),h:ce.parse("7.8mm")},smd:{p:ce.parse("2mm"),id:0,pw:ce.parse("1mm"),pl:ce.parse("3mm"),mpw:ce.parse("1.8mm"),mpl:ce.parse("3mm"),mpy:ce.parse("2.5mm"),w:ce.parse("8mm"),h:ce.parse("5mm")},zh:{p:ce.parse("1.5mm"),id:ce.parse("0.73mm"),pw:ce.parse("1.03mm"),pl:ce.parse("1.73mm"),w:ce.parse("3mm"),h:ce.parse("3.5mm")},xh:{p:ce.parse("2.5mm"),pw:ce.parse("1.7mm")}};function Cbn(t){return t.smd?"smd":t.sh?"sh":t.ph?"ph":t.zh?"zh":t.xh?"xh":"ph"}function ybn({variant:t,numPins:e,p:n,id:o,pw:i,pl:r,mpx:s,mpy:a,mpw:A,mpl:c,mounttop:l}){const u=[],g=fbn();let h=0;if(t==="smd"){const d=-((e-1)/2)*n;for(let m=0;m<e;m++){const _=d+m*n;u.push(Jo(m+1,_,0,i,r)),bQ({bounds:g,centerX:_,centerY:0,width:i,height:r})}const p=a===0?0:(l?1:-1)*a;for(const[m,_]of[-s/2,s/2].entries())u.push(Jo(e+m+1,_,p,A,c)),bQ({bounds:g,centerX:_,centerY:p,width:A,height:c});h=Math.max(r/2,c/2)}else if(t==="ph"){const d=-((e-1)/2)*n;for(let p=0;p<e;p++){const m=d+p*n;p===0?u.push(yy({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.1249998})):u.push(T9(p+1,m,0,o,i,r)),bQ({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t==="zh"){const d=-((e-1)/2)*n;for(let p=0;p<e;p++){const m=d+p*n;p===0?u.push(yy({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12499977})):u.push(T9(p+1,m,0,o,i,r)),bQ({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t==="xh"){const d=-((e-1)/2)*n;for(let p=0;p<e;p++){const m=d+p*n;p===0?u.push(yy({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12500015})):u.push(T9(p+1,m,0,o,i,r)),bQ({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else{const d=-((e-1)/2)*n;for(let m=0;m<e;m++){const _=d+m*n;u.push(Jo(m+1,_,-1.325,i,r)),bQ({bounds:g,centerX:_,centerY:-1.325,width:i,height:r}),h=Math.max(h,r/2)}const p=(e-1)/2*n+1.3;u.push(Jo(e+1,-p,1.22,1.2,1.8)),u.push(Jo(e+2,p,1.22,1.2,1.8)),bQ({bounds:g,centerX:-p,centerY:1.22,width:1.2,height:1.8}),bQ({bounds:g,centerX:p,centerY:1.22,width:1.2,height:1.8}),h=Math.max(h,.9)}return{pads:u,padBounds:g,maxPadHalfY:h}}function xbn({variant:t,w:e,h:n,numPins:o,p:i}){const r=s=>({type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:s,stroke_width:.1,pcb_silkscreen_path_id:""});if(t==="smd")return[r([{x:-e/2,y:-n/2},{x:e/2,y:-n/2},{x:e/2,y:n/2},{x:-e/2,y:n/2},{x:-e/2,y:-n/2}])];if(t==="ph"){const s=n/2+.5,a=s-n;return[r([{x:-e/2,y:s},{x:e/2,y:s},{x:e/2,y:a},{x:-e/2,y:a},{x:-e/2,y:s}])]}else if(t==="zh"&&o&&i){const s=(o-1)*i,a=-s/2-1.5,A=s/2+1.5,c=-n/2,l=n/2;return[r([{x:a,y:c},{x:A,y:c},{x:A,y:l},{x:a,y:l},{x:a,y:c}])]}else if(t==="xh"&&o&&i){const s=-((o-1)/2)*i,a=Array.from({length:o},(I,C)=>s+C*i),A=a[0],c=a[o-1],l=(A+c)/2,u=-2.75,g=-3.51,h=2.46,d=2.75,p=1.5,m=.2,_=(I,C,y,x)=>r([{x:I,y:C},{x:y,y:C},{x:y,y:x},{x:I,y:x},{x:I,y:C}]),f=[];return f.push(_(A-2.56,h,c+2.56,g)),f.push(r([{x:A-1.6,y:d},{x:A-2.85,y:d},{x:A-2.85,y:p}])),f.push(r([{x:A-2.55,y:m},{x:A-1.8,y:m},{x:A-1.8,y:u},{x:l,y:u}])),f.push(r([{x:c+2.55,y:m},{x:c+1.8,y:m},{x:c+1.8,y:u},{x:l,y:u}])),f.push(_(A-2.55,2.45,A-.75,1.7)),c-.75>A+.75&&f.push(_(A+.75,2.45,c-.75,1.7)),f.push(_(c+.75,2.45,c+2.55,1.7)),f}else return[]}var Ebn=t=>{const e=_bn.parse(t),n=Cbn(e),o=Ibn[n];let i;const r=t.num_pins;typeof r=="number"&&(i=r);const s=typeof t.string=="string"?t.string:"",a=s.match(/(?:^|_)jst(\d+)(?:_|$)/),A=s.match(/(?:^|_)zh(\d+)(?:_|$)/);if(a&&a[1]){const fe=Number.parseInt(a[1],10);Number.isNaN(fe)||(i=fe)}if(A&&A[1]){const fe=Number.parseInt(A[1],10);Number.isNaN(fe)||(i=fe)}if(typeof i!="number")throw new Error(`JST requires an explicit pin count (e.g. jst6_sh or .jst(6))${e.string?`, from string "${e.string}"`:""}`);const c=e.p??o.p,l=e.id??(n==="xh"?i===2?1:.95:o.id),u=e.pw??o.pw,g=e.pl??(n==="xh"?i===2?2:1.95:o.pl),h=(i-1)*c+4,d=n==="xh"?(i-1)*c+5.12:n==="ph"?h:o.w,p=e.w??d,m=e.h??(n==="xh"?5.97:o.h),_=e.mpx??(i-1)*c+3.4,f=e.mpy??o.mpy??0,I=e.mpw??o.mpw??0,C=e.mpl??o.mpl??0,y=e.mounttop??!1,x=ybn({variant:n,numPins:i,p:c,id:l,pw:u,pl:g,mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}),{pads:E,padBounds:B,maxPadHalfY:S}=x,Q=n==="smd"?Math.max(p,2*Math.max(Math.abs(B.minX),Math.abs(B.maxX))+.4):p,w=n==="smd"?Math.max(m,2*Math.max(Math.abs(B.minY),Math.abs(B.maxY))+.4):m,M=xbn({variant:n,w:Q,h:w,numPins:i,p:c}),k=yi(0,w/2+1,.5),R=M.flatMap(fe=>fe.route),F=R.map(fe=>fe.x),O=R.map(fe=>fe.y),U=F.length>0&&O.length>0,Y=U?Math.min(B.minX,Math.min(...F)):B.minX,W=U?Math.max(B.maxX,Math.max(...F)):B.maxX,te=U?Math.min(B.minY,Math.min(...O)):B.minY,j=U?Math.max(B.maxY,Math.max(...O)):B.maxY,J=.5,oe=.05,ie=S+.085,ne=Y-J,le=W+J,ge=te-ie,_e=j+oe,ue=n==="ph"?{type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:-.55},width:(i-1)*c+4.9,height:5.5,layer:"top"}:n==="xh"?{type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:-.525},width:(i-1)*c+5.9,height:6.75,layer:"top"}:{type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(ne+le)/2,y:(ge+_e)/2},width:le-ne,height:_e-ge,layer:"top"};return{circuitJson:[...E,...M,k,ue],parameters:{...e,p:c,id:l,pw:u,pl:g,w:p,h:m,num_pins:i,sh:n==="sh",ph:n==="ph",smd:n==="smd",zh:n==="zh",xh:n==="xh",...n==="smd"?{mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}:{}}}},Bbn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.30mm"),h:Z().default("1.70mm"),pl:Z().default("0.80mm"),pw:Z().default("1mm"),p:Z().default("1.90mm")}),bbn=t=>{const e=Bbn.parse(t),n=yi(0,ce.parse(e.h)/2+.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.2,height:2,layer:"top"};return{circuitJson:Qbn(e).concat(...Xd(e),o,n,s),parameters:e}},Sbn=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Qbn=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=Sbn({pn:n,p:Number.parseFloat(t.p)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},vbn=t=>{switch(t){case 8:return{w:"3.06mm",h:"3.14mm",p:"0.65mm",pl:"1.6mm",pw:"0.5mm"};case 10:return{w:"3.10mm",h:"3.33mm",p:"0.5mm",pl:"1.45mm",pw:"0.3mm"};default:return{w:"3.06mm",h:"3.14mm",p:"0.65mm",pl:"1.6mm",pw:"0.5mm"}}},wbn=Ii.extend({fn:Z(),num_pins:xo([$e(8),$e(10)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:K4.optional(),...zk,string:Z().optional()}),Pbn=t=>{const e=wbn.parse(t),n=vbn(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[],l=e.num_pins/2;for(let S=0;S<e.num_pins;S++){const{x:Q,y:w}=sct(e.num_pins,S+1,o,r),M=S<l?S+1:e.num_pins-(S-l);c.push(Jo(M,Q,w,s,a,A))}e.thermalpad&&c.push(EQ(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const u=o,g=i,h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-u/2,y:g/2},{x:u/2,y:g/2}],stroke_width:.05,pcb_silkscreen_path_id:""},d={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-u/2,y:-g/2},{x:u/2,y:-g/2}],stroke_width:.05,pcb_silkscreen_path_id:""},p=sct(e.num_pins,1,u,r),m={x:p.x-.8,y:p.y},_={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:m.x-.4,y:m.y},{x:m.x-.7,y:m.y+.3},{x:m.x-.7,y:m.y-.3},{x:m.x-.4,y:m.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},f=yi(0,g/2+.5,.3),I=(e.num_pins/2-1)*r+a,C=o/2+.25,y=C+1.43,x=I/2+.255,E=i/2+.25,B={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-y,maxX:y,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-E,maxY:E}])};return{circuitJson:[...c,h,d,f,_,B],parameters:e}},sct=(t,e,n,o)=>{const i=t/2,r=(e-1)%i,s=e<=i?-1:1,a=(i-1)/2-r;return{x:s*2.11,y:a*o}},Mbn=t=>{switch(t){case 10:return{w:"3.10mm",h:"3.32mm",p:"0.5mm",pl:"1.63mm",pw:"0.33mm"};case 12:return{w:"3mm",h:"4mm",p:"0.65mm",pl:"0.88mm",pw:"0.4mm"};case 16:return{w:"3.10mm",h:"4mm",p:"0.5mm",pl:"0.88mm",pw:"0.3mm"};default:return{w:"3.10mm",h:"3.32mm",p:"0.65mm",pl:"1.63mm",pw:"0.4mm"}}},Dbn=Ii.extend({fn:Z(),num_pins:xo([$e(8),$e(10),$e(12),$e(16)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:K4.optional(),...zk,string:Z().optional()}),act=(t,e,n,o,i)=>{const r=t/2,s=(e-1)%r,a=e<=r?-1:1,A=(r-1)/2-s,c=ce.parse("0.2mm");return{x:a*(n/2+i/2-c),y:A*o}},Nbn=t=>{const e=Dbn.parse(t),n=Mbn(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[];for(let B=0;B<e.num_pins;B++){const{x:S,y:Q}=act(e.num_pins,B+1,o,r,s);c.push(Jo(B+1,S,Q,s,a,A))}e.thermalpad&&c.push(EQ(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const l=o,u=i,g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-l/2,y:u/2},{x:l/2,y:u/2}],stroke_width:.05,pcb_silkscreen_path_id:""},h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-l/2,y:-u/2},{x:l/2,y:-u/2}],stroke_width:.05,pcb_silkscreen_path_id:""},d=act(e.num_pins,1,l,r,s),p={x:d.x-.8,y:d.y},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:p.x-.4,y:p.y},{x:p.x-.7,y:p.y+.3},{x:p.x-.7,y:p.y-.3},{x:p.x-.4,y:p.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},_=yi(0,u/2+.5,.3),f=(e.num_pins/2-1)*r+a,I=o/2+.25,C=I+1.43,y=f/2+.255,x=i/2+.25,E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return{circuitJson:[...c,g,h,_,m,E],parameters:e}},Rbn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.8mm"),h:Z().default("1.65mm"),pl:Z().default("1.2mm"),pw:Z().default("1.2mm"),pad_spacing:Z().default("2.6mm")}),Tbn=t=>{const e=Rbn.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.3,height:2.15,layer:"top"};return{circuitJson:Fbn(e).concat(...Xd(e),o,n,s),parameters:e}},kbn=t=>{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Fbn=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=kbn({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Lbn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.20mm"),h:Z().default("1.65mm"),pl:Z().default("0.8mm"),pw:Z().default("0.9mm"),pad_spacing:Z().default("2.1mm")}),Hbn=t=>{const e=Lbn.parse(t),n=yi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.7,height:2.15,layer:"top"};return{circuitJson:Gbn(e).concat(...Xd(e),o,n,s),parameters:e}},Obn=t=>{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Gbn=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=Obn({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Jo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Ybn=Ii.extend({fn:Z(),num_pins:xo([$e(6),$e(8)]).default(8),w:Z().default("3mm"),h:Z().default("3mm"),p:Z().default("0.5mm"),pl:Z().default("0.52mm"),pw:Z().default("0.35mm"),epw:Z().default("1.40mm"),eph:Z().default("1.60mm"),string:Z().optional(),ep:je().default(!1)}),Ubn=t=>{t.string&&t.string.includes("_ep")&&(t.ep=!0);const e=t.string?.match(/^son_(\d+)/),n=e?Number.parseInt(e[1],10):t.num_pins||8,o=Ybn.parse({...t,num_pins:n}),i=ce.parse(o.w),r=ce.parse(o.h),s=ce.parse(o.p),a=ce.parse(o.pl),A=ce.parse(o.pw),c=ce.parse(o.epw),l=ce.parse(o.eph),u=Math.min(a,A)/8,g=[];for(let k=0;k<o.num_pins;k++){const{x:R,y:F}=Ixe(o.num_pins,k+1,i,s);g.push(Jo(k+1,R,F,a,A,u))}o.ep&&g.push(Jo(o.num_pins+1,0,0,c,l));const h=i,d=r,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-h/2,y:d/2},{x:h/2,y:d/2}],stroke_width:.05,pcb_silkscreen_path_id:""},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-h/2,y:-d/2},{x:h/2,y:-d/2}],stroke_width:.05,pcb_silkscreen_path_id:""},_=Ixe(o.num_pins,1,h,s),f={x:_.x-.4,y:_.y},I={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:f.x-.4,y:f.y},{x:f.x-.7,y:f.y+.3},{x:f.x-.7,y:f.y-.3},{x:f.x-.4,y:f.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},C=yi(0,d/2+.5,.3),y=Math.abs(Ixe(o.num_pins,1,i,s).x),x=(o.num_pins/2-1)*s+A,E=y*2+a,B=i/2+.25,S=E/2+.25,Q=x/2+.25,w=r/2+.25,M={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-B,maxX:B,minY:-w,maxY:w}])};return{circuitJson:[...g,p,m,C,I,M],parameters:o}},Ixe=(t,e,n,o)=>{const i=t/2,r=(e-1)%i,s=e<=i?-1:1,a=(i-1)/2-r;return{x:s*ce.parse("1.4mm"),y:a*o}},Kbn=Ii.extend({fn:Z(),num_pins:_t().optional().default(8),p:lt.describe("pitch (distance between center of each pin)"),w:ce.describe("width between vertical rows of pins"),grid:K4.describe("width and height of the border of the footprint"),ep:K4.default("0x0mm").describe("width and height of the central exposed thermal pad"),epx:ce.default("0mm").describe("x offset of the center of the central exposed thermal pad"),pinw:ce.describe("width of the pin pads"),pinh:ce.describe("height of the pin pads")}),Vbn=t=>{const e=Kbn.parse(t),{num_pins:n,p:o,w:i,grid:r,ep:s,epx:a,pinw:A,pinh:c}=e;if(n%2!==0)throw new Error("invalid number of pins");const l=[],u=Math.min(A,c)/8;for(let B=0;B<n;B++){const{pinX:S,pinY:Q}=zbn({pinCount:n,pinIndex:B,width:i,pitch:o});l.push(Jo(B+1,S,Q,A,c,u))}s.x>0&&s.y>0&&l.push(Jo(e.num_pins+1,a,0,s.x,s.y));const g=Jbn(r),h=yi(0,r.y/2+o,r.y/6),d=(n/2-1)*o+c,p=i+A,m=r.x/2+.25,_=p/2+.25,f=d/2+.25,I=d/2+.45+Math.max(0,.8-o),C=Math.min(r.y/2+.25,I),y=Math.max(0,.37-Math.max(0,_-m-.38)*1.4),x=Math.max(f,C-y),E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-_,maxX:_,minY:-x,maxY:x},{minX:-m,maxX:m,minY:-C,maxY:C}])};return{circuitJson:[...l,...g,h,E],parameters:e}},zbn=t=>{let e=0,n=0;const o=(t.pinCount/2-1)*t.pitch/2,i=t.pinCount/2;return t.pinIndex+1<=i?(e=t.pitch*t.pinIndex-o,n=0-t.width/2):(e=t.pitch*(t.pinCount-t.pinIndex-1)-o,n=t.width/2),{pinX:n,pinY:e}},Jbn=t=>{const n=t.y/30;return[{layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:-t.x/2-.1,y:t.y/2+.1-n},{x:-t.x/2-.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1-n}],stroke_width:t.y/30},{layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:-t.x/2-.1,y:-t.y/2-.1+n},{x:-t.x/2-.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1+n}],stroke_width:t.y/30}]},Wbn=Ii.extend({fn:$e("wson"),num_pins:$e(8).default(8),p:ce.default("0.5mm").describe("pin pitch"),rowspan:ce.default("3.015mm").describe("distance between pad rows"),pl:ce.default("0.6mm").describe("pad length across the package edge"),pw:ce.default("0.28mm").describe("pad width along the pin row"),ep:je().default(!0).describe("include the exposed pad"),epw:ce.default("1.7mm").describe("exposed pad width"),eph:ce.default("0.3mm").describe("exposed pad height"),w:ce.default("2mm").describe("package body width"),h:ce.default("3mm").describe("package body height")}),jbn=t=>{const e=Wbn.parse(t),{p:n,rowspan:o,pl:i,pw:r,ep:s,epw:a,eph:A,w:c,h:l}=e,u=[],g=-3*n/2;for(let f=0;f<4;f+=1){const I=g+f*n;u.push(Jo(f+1,I,-o/2,r,i)),u.push(Jo(8-f,I,o/2,r,i))}s&&u.push(Jo(9,0,0,a,A));const h=[iA([{x:-c/2,y:-l/2},{x:-c/2,y:l/2}]),iA([{x:c/2,y:-l/2},{x:c/2,y:l/2}])],d=yi(0,Math.max(l/2,(o+i)/2)+.6,.5),p=Math.max(3*n+r,s?a:0),m=Math.max(o+i,s?A:0),_={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:Math.max(c,p)+.5,height:Math.max(l,m)+.5,layer:"top"};return{circuitJson:[...u,...h,d,_],parameters:e}},$bn=t=>{const{num_pins:e,bridged:n,p:o=2.54,pw:i=1.5,ph:r=1.5}=t,s=ce.parse(o),a=ce.parse(i),A=ce.parse(r),c=Math.min(A/4,.5),l=[];for(let Q=0;Q<e;Q++)l.push(Jo(Q+1,Q*s,0,a,A));let u=[];if(n){const Q=n.split("").map(Number);if(Q.length>1)for(let w=0;w<Q.length-1;w++){const M=Q[w],k=Q[w+1];if(typeof M=="number"&&typeof k=="number"&&!isNaN(M)&&!isNaN(k)){const R=(M-1)*s,F=(k-1)*s,O=Math.sign(F-R),U=R+O*(a/2),Y=F-O*(a/2);u.push({type:"pcb_trace",pcb_trace_id:"",route:[{start_pcb_port_id:`{PIN${M}}`,x:U,y:0,width:c,layer:"top",route_type:"wire"},{end_pcb_port_id:`{PIN${k}}`,x:Y,y:0,width:c,layer:"top",route_type:"wire"}]})}}}const g=(e-1)*s+a+.7,h=A+1,d=(e-1)*s/2,p=0,m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"outline",route:[{x:d-g/2,y:p-h/2},{x:d+g/2,y:p-h/2},{x:d+g/2,y:p+h/2},{x:d-g/2,y:p+h/2},{x:d-g/2,y:p-h/2}],stroke_width:.15},f=p+h/2+.6,I=yi(d,f,.4),C=(e-1)*s,y=C/2+a/2,x=A/2,E=y+.5,B=x+.5,S={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:C/2,y:0},width:2*E,height:2*B,layer:"top"};return{circuitJson:[...l,...u,m,I,S],parameters:t}},Act={fn:$e("sot457"),num_pins:$e(6).default(6),pillh:Z().default("0.45mm"),pillw:Z().default("1.45mm"),pl:Z(),pw:Z(),p:Z(),wave:je().optional(),reflow:je().optional()},qbn=Ii.extend({...Act,h:Z().default("2.5mm"),w:Z().default("2.7mm"),pl:Z().default("0.8mm"),pw:Z().default("0.55mm"),p:Z().default("0.95mm")}),Xbn=Ii.extend({...Act,h:Z().default("3mm"),w:Z().default("4mm"),pillr:Z().default("0.225mm"),pl:Z().default("1.45mm"),pw:Z().default("1.5mm"),p:Z().default("1.475mm")}).transform(t=>({...t,wave:t.wave??(t.reflow===void 0?!0:!t.reflow),reflow:t.reflow??(t.wave===void 0?!1:!t.wave)})),P8=t=>Number.parseFloat(t.replace("mm","")),cct=({pitch:t,width:e,pinNumber:n})=>{const r={1:{x:-e/2-.1,y:t},2:{x:-e/2-.1,y:0},3:{x:-e/2-.1,y:-t},4:{x:e/2+.1,y:-t},5:{x:e/2+.1,y:0},6:{x:e/2+.1,y:t}}[n];if(!r)throw new Error(`Invalid pin number: ${n}`);return r},lct=t=>{const e=[],n=P8(t.p),o=P8(t.pl),i=P8(t.pw),r=P8(t.w),s=P8(t.h),a=Math.min(o,i)/8;if(t.wave){const m={1:({padWidth:_,padHeight:f})=>Jo(1,-n,n,f,_,a),2:({padWidth:_,padHeight:f})=>Jo(2,-n,-n,f,_,a),3:({padWidth:_,padHeight:f})=>XM(3,-n,0,P8(t.pillw),P8(t.pillh)),4:({padWidth:_,padHeight:f})=>XM(4,n,0,P8(t.pillw),P8(t.pillh)),5:({padWidth:_,padHeight:f})=>Jo(5,n,n,f,_,a),6:({padWidth:_,padHeight:f})=>Jo(6,n,-n,f,_,a)};for(let _=1;_<=t.num_pins;_++){const f=m[_];f&&e.push(f({padWidth:o,padHeight:i}))}}else for(let m=1;m<=t.num_pins;m++){const{x:_,y:f}=cct({pitch:n,width:r,pinNumber:m});e.push(Jo(m,_,f,o,i,a))}const A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-r/3,y:s/2+n/1.3},{x:r/3,y:s/2+n/1.3}],stroke_width:.05},c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-r/3,y:-s/2-n/1.3},{x:r/3,y:-s/2-n/1.3}],stroke_width:.05},l=yi(0,s+.5,.3),u=cct({pitch:n,width:r,pinNumber:1}),g=t.wave?1:.5,h=t.wave?.7:.3;u.x-=t.wave?i:i*1.7;const d={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_indicator",route:[{x:u.x+g/2,y:u.y},{x:u.x-g/2,y:u.y+h/2},{x:u.x-g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y}],stroke_width:.05};let p;if(t.wave){const m=2*n,_=2*n,f=m/2+i/2,I=_/2+o/2,C=f+.25,y=I+.25;p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*C,height:2*y,layer:"top"}}else{const _=r/2+.1+o/2,f=n+i/2,I=r/2,C=s/2,y=_+.25,x=I+.08,E=f+.25,B=Math.max(C+.45,E);p={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:xy([{minX:-y,maxX:y,minY:-E,maxY:E},{minX:-x,maxX:x,minY:-B,maxY:B}]),layer:"top"}}return[l,A,c,d,...e,p]},Zbn=t=>{if(t.wave){const n=Xbn.parse({...t,fn:"sot457"});return{circuitJson:lct(n),parameters:n}}const e=qbn.parse(t);return{circuitJson:lct(e),parameters:e}},eSn=[{x:-.8,y:.75},{x:.8,y:.75},{x:.8,y:-.75},{x:-.8,y:-.75}],tSn=Ii.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("1.1mm"),h:Z().default("1.45mm"),p:Z().default("0.35mm"),pl:Z().default("0.2mm"),pw:Z().default("0.2mm"),string:Z().optional()}),nSn=t=>{const e=tSn.parse({...t,fn:"sot963"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=uct(p+1,n,i,r);A.push(Jo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},u=uct(1,n,i,r),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=yi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:eSn,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},uct=(t,e,n,o)=>{const i=e/2-o/2;return t<=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},oSn=Ii.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default("5mm"),id:Z().default("1.25mm"),od:Z().default("2.35mm"),ca:Z().default("14mm").describe("Caliper axis (width or diameter of the potentiometer body or adjustment knob)"),w:Z().default("5.35mm"),h:Z().default("4mm"),string:Z().optional()}),iSn=t=>{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i),s=Number.parseFloat(e);return[ks(1,0,s,n,o),ks(2,r,0,n,o),ks(3,0,-s,n,o)]},rSn=t=>{const e=t.string?.match(/^potentiometer_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=oSn.parse({...t,num_pins:n});let i=[];o.num_pins===3&&(i=iSn(o));const r=Number.parseFloat(o.ca)/2+.15,s=Number.parseFloat(o.w),a=Number.parseFloat(o.od)/2+.35,A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:0,y:r-1.75},{x:0,y:r},{x:s,y:r},{x:s,y:a}],stroke_width:.1,pcb_silkscreen_path_id:""},c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:s,y:-a},{x:s,y:-r},{x:0,y:-r},{x:0,y:-r+1.75}],stroke_width:.1,pcb_silkscreen_path_id:""},l=Number.parseFloat(o.w)/2,u=yi(l,r+1,.5),g=Number.parseFloat(o.od)/2,h=Number.parseFloat(o.h),d=Number.parseFloat(o.ca)/2,p=-(g+.25),m=h+g+.25,_=d+.25,f={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(p+m)/2,y:0},width:m-p,height:2*_,layer:"top"};return{circuitJson:[...i,A,c,u,f],parameters:o}},sSn=Ii.extend({fn:Z(),p:ce.optional().default("7.5mm"),id:ce.optional().default("1mm"),od:ce.optional().default("2mm"),d:ce.optional().default("10.5mm")}),aSn=(t,e,n,o,i)=>{const r=[],s=[];for(let a=0;a<=50;a++){const A=a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c<t-o&&l>=e-i/2&&l<=e+i/2||r.push({x:c,y:l})}for(let a=0;a<=50;a++){const A=Math.PI+a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c<t-o&&l>=e-i/2&&l<=e+i/2||s.push({x:c,y:l})}return{topArc:r,bottomArc:s}},ASn=t=>{const e=sSn.parse(t),{p:n,id:o,od:i,d:r}=e,s=[yy({pn:1,x:-n/2,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:i}),ks(2,n/2,0,o,i)],{topArc:a,bottomArc:A}=aSn(0,0,r/2+.1,i/2,i),c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:a,stroke_width:.1,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:A,stroke_width:.1,pcb_silkscreen_path_id:""},u={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:0,y:r/2+.1},{x:0,y:-(r/2+.1)}],stroke_width:.1,pcb_silkscreen_path_id:""},g=-(r/2+.5),h=i/2+1.5,d=.5,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:g-d,y:h},{x:g+d,y:h}],stroke_width:.1,pcb_silkscreen_path_id:""},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:g,y:h-d},{x:g,y:h+d}],stroke_width:.1,pcb_silkscreen_path_id:""},_=yi(0,r/2+1,.5),f=r/2,I=n/2+i/2,y=Math.max(f,I)+.25,x={type:"pcb_courtyard_circle",pcb_courtyard_circle_id:"",pcb_component_id:"",center:{x:0,y:0},radius:y,layer:"top"};return{circuitJson:[...s,c,l,u,p,m,_,x],parameters:e}},cSn=Ii.extend({fn:$e("fpc"),num_pins:S5.number().int().min(2),p:ce.default("0.5mm").describe("contact pad pitch"),pw:ce.default("0.3mm").describe("contact pad width"),pl:ce.default("1.25mm").describe("contact pad length"),staggered:je().default(!1).describe("alternate contacts between two rows"),reverse:je().default(!1).describe("place pin 1 on the upper row when staggered"),py:ce.default("2.4mm").describe("staggered row center pitch"),toppl:ce.optional().describe("upper-row contact pad length"),bottompl:ce.optional().describe("lower-row contact pad length"),mpx:ce.optional().describe("mounting pad center pitch"),mpy:ce.optional().describe("mounting pad row distance from the contact-row center"),mounttop:je().default(!1).describe("place the mounting pads above the contact-row center"),mpw:ce.default("2mm").describe("mounting pad width"),mpl:ce.default("2.5mm").describe("mounting pad length")}),Cxe=(...t)=>Jo(...t),lSn=t=>({maxX:Math.max(...t.map(e=>e.x+e.width/2)),maxY:Math.max(...t.map(e=>e.y+e.height/2)),minX:Math.min(...t.map(e=>e.x-e.width/2)),minY:Math.min(...t.map(e=>e.y-e.height/2))}),uSn=t=>{const e=cSn.parse(t),{num_pins:n,p:o,pw:i,pl:r,staggered:s,reverse:a,py:A,toppl:c,bottompl:l,mounttop:u,mpw:g,mpl:h}=e,d=(n-1)*o,p=e.mpx??d+(s?3.5:3.38),m=e.mpy??(s?0:2.575),_=m===0?0:(u?1:-1)*m,f=-d/2,I=Array.from({length:n},(O,U)=>{const Y=s&&U%2===1!==a,W=s?Y?A/2:-A/2:0,te=Y?c??r:l??r;return Cxe(U+1,f+U*o,W,i,te)}),C=[Cxe(n+1,p/2,_,g,h),Cxe(n+2,-p/2,_,g,h)],y=[...I,...C],x=lSn(y),E=Math.min(d/2+i/2,p/2-g/2),B=x.maxY+.2,S=x.minY-.2,Q=I[0],w=Q.x-Q.width/2-.2,M=Q.y,k=[iA([{x:-E,y:B},{x:E,y:B}]),iA([{x:-E,y:S},{x:E,y:S}]),iA([{x:w-.25,y:M-.25},{x:w,y:M},{x:w-.25,y:M+.25}])],R=yi(0,B+.7,.5),F={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(x.minX+x.maxX)/2,y:(x.minY+x.maxY)/2},width:x.maxX-x.minX+.5,height:x.maxY-x.minY+.5,layer:"top"};return{circuitJson:[...y,...k,R,F],parameters:{...e,mpx:p,mpy:m,toppl:c??r,bottompl:l??r}}},gSn=Ii.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("6.5mm"),h:Z().default("3mm"),pl:Z().default("1.75mm"),pw:Z().default("2.40mm"),p:Z().default("4.75mm")}),dSn=t=>{const e=gSn.parse(t),n=yi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:7,height:3.5,layer:"top"};return{circuitJson:pSn(e).concat(...Xd(e),o,n,s),parameters:e}},hSn=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},pSn=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=hSn({pn:s,p:n});e.push(Jo(s,a,A,o,i,r))}return e},mSn=[{x:-1.45,y:.98},{x:-.73,y:.98},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.33},{x:1.45,y:.33},{x:1.45,y:-.33},{x:.73,y:-.33},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.98},{x:-1.45,y:-.98},{x:-1.45,y:-.32},{x:-.73,y:-.32},{x:-.73,y:.32},{x:-1.45,y:.32}],_Sn=Ii.extend({fn:Z(),num_pins:_t().default(3),w:Z().default("2.45mm"),h:Z().default("2.40mm"),pl:Z().default("0.92mm"),pw:Z().default("0.45mm"),p:Z().default("0.891mm"),string:Z().optional()}),fSn=t=>{const e=t.string?.match(/^sot323_(\d+)/),n=e?Number.parseInt(e[1],3):3,o=_Sn.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:CSn(o),parameters:o};throw new Error("Invalid number of pins")},ISn=t=>{const{pn:e,p:n}=t;return e===1?{x:-n,y:.65}:e===2?{x:-n,y:-.65}:{x:n,y:0}},CSn=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let d=0;d<t.num_pins;d++){const{x:p,y:m}=ISn({num_pins:t.num_pins,pn:d+1,p:s});e.push(Jo(d+1,p,m,i,r,a))}const A=yi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-i,l=o/2,u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-c,y:l+.3},{x:c,y:l+.3},{x:c,y:l/2}],type:"pcb_silkscreen_path",stroke_width:.1},g={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-c,y:-l-.3},{x:c,y:-l-.3},{x:c,y:-l/2}],type:"pcb_silkscreen_path",stroke_width:.1},h={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:mSn,layer:"top"};return[...e,u,g,A,h]},ySn=Ii.extend({fn:Z(),circle:je().optional(),rect:je().optional(),square:je().optional(),pill:je().optional(),d:ce.optional(),pd:ce.optional(),diameter:ce.optional(),r:ce.optional(),pr:ce.optional(),radius:ce.optional(),w:ce.optional(),pw:ce.optional(),width:ce.optional(),h:ce.optional(),ph:ce.optional(),height:ce.optional(),s:ce.optional(),size:ce.optional(),string:Z().optional()}).transform(t=>{let e="rect";t.circle&&(e="circle"),t.square&&(e="square"),t.rect&&(e="rect"),t.pill&&(e="pill");let n,o,i;return e==="circle"?t.r!==void 0?n=KA(t.r):t.pr!==void 0?n=KA(t.pr):t.radius!==void 0?n=KA(t.radius):t.d!==void 0?n=KA(t.d)/2:t.pd!==void 0?n=KA(t.pd)/2:t.diameter!==void 0?n=KA(t.diameter)/2:n=KA("1mm")/2:(t.w!==void 0?o=KA(t.w):t.pw!==void 0?o=KA(t.pw):t.width!==void 0?o=KA(t.width):t.s!==void 0?o=KA(t.s):t.size!==void 0?o=KA(t.size):o=KA("1mm"),t.h!==void 0?i=KA(t.h):t.ph!==void 0?i=KA(t.ph):t.height!==void 0?i=KA(t.height):e==="square"||e==="rect"?i=o:i=KA("1mm")),{fn:t.fn,shape:e,radius:n,width:o,height:i}}),xSn=t=>{const e=ySn.parse(t),{shape:n,radius:o,width:i,height:r}=e;let s,a;return n==="circle"?(s=OAt(1,{x:0,y:0,radius:o}),a=o+.5):n==="pill"?(s=XM(1,0,0,i,r),a=Math.max(i,r)/2+.5):(s=Jo(1,0,0,i,r),a=r/2+.5),{circuitJson:[s,yi(0,a,.2)],parameters:e}},ESn=Ii.extend({fn:$e("smdpads"),num_pins:_t().int().positive().default(3),p:ce.default("1mm").describe("pad center pitch"),pw:ce.default("1mm").describe("outer pad width"),ph:ce.default("1mm").describe("pad height"),cyw:ce.optional().describe("courtyard width"),cyh:ce.optional().describe("courtyard height"),centerpadwidth:ce.optional().describe("center pad width")}).superRefine((t,e)=>{t.centerpadwidth!==void 0&&t.num_pins%2===0&&e.addIssue({code:lo.custom,message:"'centerpadwidth' requires an odd number of SMD pads",path:["centerpadwidth"]})}),BSn=t=>{const e=ESn.parse(t),{num_pins:n,p:o,pw:i,ph:r,cyw:s,cyh:a,centerpadwidth:A}=e,c=Math.ceil(n/2),l=-((n-1)*o)/2,u=Array.from({length:n},(_,f)=>{const I=f+1,C=A!==void 0&&I===c?A:i;return Jo(I,l+f*o,0,C,r)}),g=(n-1)*o/2+i/2,h=A?A/2:0,d=Math.max(g,h),p=s!==void 0&&a!==void 0?{width:s,height:a}:{width:d*2+.5,height:r+.5},m={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:p.width,height:p.height,layer:"top"};return{circuitJson:[...u,yi(0,r/2+.8,.4),m],parameters:e}},bSn=Ii.extend({fn:$e("smdpushbutton"),num_pins:$e(4).default(4),px:ce.default("4.2mm").describe("horizontal pad center pitch"),py:ce.default("2.15mm").describe("vertical pad center pitch"),pw:ce.default("1.05mm").describe("pad width"),ph:ce.default("0.7mm").describe("pad height")}),SSn=t=>{const e=bSn.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Jo(1,-n/2,o/2,i,r),Jo(2,n/2,o/2,i,r),Jo(3,-n/2,-o/2,i,r),Jo(4,n/2,-o/2,i,r)],a=Math.max(n/2-i/2-.15,.2),A=o/2+r/2+.1,c=Math.max(o/2-r/2-.15,.2),l=[iA([{x:-a,y:A},{x:a,y:A}]),iA([{x:-a,y:-A},{x:a,y:-A}]),iA([{x:-n/2,y:-c},{x:-n/2,y:c}]),iA([{x:n/2,y:-c},{x:n/2,y:c}])],u=yi(0,A+.6,.5),g={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:"top"};return{circuitJson:[...s,...l,u,g],parameters:e}},QSn=t=>({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),vSn=t=>{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r<t.length;r++){const s=t[r];s.x<e&&(e=s.x),s.y<n&&(n=s.y),s.x>o&&(o=s.x),s.y>i&&(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}},wSn=Ii.extend({fn:$e("smdslideswitch"),num_pins:$e(7).default(7),signalcols:S5.number().int().min(3).default(3),missing:fV.default([]),p:ce.default("1mm").describe("signal-pad column pitch"),pw:ce.default("0.7mm").describe("signal-pad width"),pl:ce.default("1.5mm").describe("signal-pad length"),mounty:ce.default("-1.8mm").describe("Y position of the mounting-pad row center"),mpx:ce.default("5.5mm").describe("horizontal center-to-center mounting-pad distance"),mpy:ce.default("2.2mm").describe("vertical center-to-center mounting-pad distance"),mpw:ce.default("1mm").describe("mounting-pad width"),mpl:ce.default("0.8mm").describe("mounting-pad length"),holex:ce.default("1.5mm").describe("alignment-hole X distance from the footprint center"),holey:ce.optional().describe("alignment-hole Y position; defaults to mounty"),holed:ce.default("0.9mm").describe("alignment-hole diameter"),noholes:je().optional().default(!1)}),PSn=t=>{const e=wSn.parse(t),{num_pins:n,signalcols:o,missing:i,p:r,pw:s,pl:a,mounty:A,mpx:c,mpy:l,mpw:u,mpl:g,holex:h,holed:d,noholes:p}=e,m=e.holey??A,_=i.find(J=>typeof J!="number"||!Number.isInteger(J)||J<1||J>o);if(_!==void 0)throw new Error(`Invalid missing signal column "${_}" for signalcols${o}`);const f=new Set(i.filter(J=>typeof J=="number")),I=o-f.size;if(I+4!==n)throw new Error(`smdslideswitch${n} needs ${n-4} signal pads, but signalcols${o}_missing(${[...f].join(",")}) creates ${I}`);const C=J=>Number(J.toFixed(12)),y=[],x=-((o-1)*r)/2;let E=1;for(let J=1;J<=o;J++)f.has(J)||(y.push(Jo(E,C(x+(J-1)*r),0,s,a)),E++);const B=A+l/2,S=A-l/2,Q=[{x:C(-c/2),y:C(B)},{x:C(c/2),y:C(B)},{x:C(-c/2),y:C(S)},{x:C(c/2),y:C(S)}];for(const J of Q)y.push(Jo(E,J.x,J.y,u,g)),E++;const w=p?[]:[-h,h].map(J=>({type:"pcb_hole",pcb_hole_id:"",pcb_component_id:"",hole_shape:"circle",hole_diameter:d,x:J,y:m})),M=Math.max(c/2-u/2-.2,r),k=-a/2-.2,R=S+g/2+.2,F=[iA([{x:-M,y:k},{x:M,y:k}]),iA([{x:-M,y:R},{x:M,y:R}]),iA([{x:-M,y:R},{x:-M,y:k}]),iA([{x:M,y:R},{x:M,y:k}])],O=x+(o-1)*r,U=vSn([{x:x-s/2,y:-a/2},{x:O+s/2,y:a/2},{x:-c/2-u/2,y:S-g/2},{x:c/2+u/2,y:B+g/2},...p?[]:[{x:-h-d/2,y:m-d/2},{x:h+d/2,y:m+d/2}]]);if(!U)throw new Error("Could not determine SMD slide-switch bounds");const Y=.25,W=QSn(U),te={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:W,width:U.maxX-U.minX+Y*2,height:U.maxY-U.minY+Y*2,layer:"top"},j=yi(W.x,U.maxY+.6,.5);return{circuitJson:[...y,...w,...F,j,te],parameters:e}},MSn=Ii.extend({fn:$e("smdpinheader"),num_pins:_t().int().positive().default(6),p:ce.default("2.54mm").describe("contact pitch"),py:ce.default("3.31mm").describe("center-to-center distance between alternating pad rows"),pw:ce.default("1mm").describe("pad width"),ph:ce.default("2.51mm").describe("pad height"),bh:ce.default("2.5mm").describe("plastic body height"),male:$e(!0).default(!0),female:$e(!1).default(!1),smd:$e(!0).default(!0)}),DSn=t=>{const e=MSn.parse(t),{num_pins:n,p:o,py:i,pw:r,ph:s,bh:a}=e,A=-((n-1)*o)/2,c=Array.from({length:n},(y,x)=>Jo(x+1,A+x*o,x%2===0?i/2:-i/2,r,s)),l=n*o/2,u=a/2,g=Math.min(.5,a/4),h=(y,x,E=-l)=>{const B=r/2+.2,S=[];let Q=E;for(let w=x;w<n;w+=2){const M=A+w*o,k=M-B;k>Q&&S.push(iA([{x:Q,y},{x:k,y}])),Q=M+B}return Q<l&&S.push(iA([{x:Q,y},{x:l,y}])),S},d=[...h(u,0,-l+g),...h(-u,1),iA([{x:l,y:-u},{x:l,y:u}]),iA([{x:-l,y:-u},{x:-l,y:u-g},{x:-l+g,y:u}])],p=(n-1)*o/2+r/2,m=i/2+s/2,_=Math.max(l,p)+.25,f=Math.max(u,m)+.25,I={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*_,height:2*f,layer:"top"},C=yi(0,f+.6,.5);return{circuitJson:[...c,...d,C,I],parameters:e}},NSn=Ii.extend({fn:Z(),d:ce.optional(),hd:ce.optional(),r:ce.optional(),hr:ce.optional(),pd:ce.optional(),pr:ce.optional(),squarepad:je().optional().default(!1)}).transform(t=>{let e;t.d!==void 0?e=KA(t.d):t.hd!==void 0?e=KA(t.hd):t.r!==void 0?e=KA(t.r)*2:t.hr!==void 0?e=KA(t.hr)*2:e=KA("1mm");let n;return t.pd!==void 0?n=KA(t.pd):t.pr!==void 0?n=KA(t.pr)*2:n=e*(1.5/1),{fn:t.fn,d:e,pd:n,squarepad:t.squarepad??!1}}),RSn=t=>{const e=NSn.parse(t),{d:n,pd:o,squarepad:i}=e;return{circuitJson:[i?yy({pn:1,x:0,y:0,holeDiameter:n,rectPadWidth:o,rectPadHeight:o}):ks(1,0,0,n,o),yi(0,o/2+.5,.2)],parameters:e}},TSn=Ii.extend({fn:Z(),num_pins:$e(6).default(6),h:Z().default("1.3mm"),pl:Z().default("1.325mm"),pw:Z().default("0.6mm"),p:Z().default("0.95mm")}),kSn=t=>{const e=TSn.parse(t);return{circuitJson:FSn(e),parameters:e}},gct=t=>{const{p:e,h:n,pn:o}=t;if(o===1)return{x:-n/2-.4875,y:e};if(o===2)return{x:-n/2-.4875,y:0};if(o===3)return{x:-n/2-.4875,y:-e};if(o===4)return{x:n/2+.4875,y:-e};if(o===5)return{x:n/2+.4875,y:0};if(o===6)return{x:n/2+.4875,y:e};throw new Error("Invalid pin number")},FSn=t=>{const e=[],n=Number.parseFloat(t.h),o=Number.parseFloat(t.p),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Math.min(i,r)/8;for(let B=1;B<=t.num_pins;B++){const{x:S,y:Q}=gct({h:n,p:o,pn:B});e.push(Jo(B,S,Q,i,r,s))}const a=t.num_pins/2*o,A=n,c={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-a/3,y:A/2+Number.parseFloat(t.p)/1.3},{x:a/3,y:A/2+o/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},l={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-a/3,y:-A/2-o/1.3},{x:a/3,y:-A/2-o/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},u=yi(0,A+.3,.3),g=gct({h:n,p:o,pn:1});g.x=g.x-r*1.5;const h=.7,d=.3,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_indicator",route:[{x:g.x+h/2-.2,y:g.y},{x:g.x-h/2,y:g.y+d/2},{x:g.x-h/2,y:g.y-d/2},{x:g.x+h/2-.2,y:g.y}],stroke_width:.05},m=n/2+.4875,_=o*2+r,f=m+i/2,I=n/2+.4,C=f+.25,y=_/2+.25,x=y+.2,E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:xy([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return[...e,u,c,l,p,E]},LSn=Ii.extend({fn:$e("sot143"),num_pins:$e(4).default(4),p:ce.default("2.382774mm"),px:ce.default("1.89992mm"),pw:ce.default("0.8382mm"),ph:ce.default("0.8382mm"),pin1padwidth:ce.default("1.1938mm"),pin1centeroffsetx:ce.default("0.199898mm"),w:ce.default("3mm"),h:ce.default("2.9mm")}),HSn=t=>{const e=LSn.parse(t),{p:n,px:o,pw:i,ph:r,pin1padwidth:s,pin1centeroffsetx:a,w:A,h:c}=e,l=o/2,u=n/2,g=[Jo(1,-l+a,-u,s,r),Jo(2,l,-u,i,r),Jo(3,l,u,i,r),Jo(4,-l,u,i,r)],h=A/2,d=c/2,p=[iA([{x:-h,y:-d/2},{x:-h,y:d/2}]),iA([{x:h,y:d/2},{x:h,y:-d/2}])],m=o+Math.max(s,i),_=n+r,f={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:Math.max(A,m)+.5,height:Math.max(c,_)+.5,layer:"top"};return{circuitJson:[...g,...p,yi(0,Math.max(d,_/2)+.8,.4),f],parameters:e}},OSn=[{x:-1.703,y:.98},{x:-.983,y:.98},{x:-.983,y:1.1},{x:.477,y:1.1},{x:.477,y:.98},{x:1.197,y:.98},{x:1.197,y:-.98},{x:.477,y:-.98},{x:.477,y:-1.1},{x:-.983,y:-1.1},{x:-.983,y:-.98},{x:-1.703,y:-.98}],GSn=Ii.extend({fn:Z(),num_pins:_t().default(4),w:Z().default("3.2mm"),h:Z().default("2.6mm"),pl:Z().default("1.05mm"),pw:Z().default("0.45mm"),p:Z().default("0.55mm"),string:Z().optional()}),YSn=t=>{const e=t.string?.match(/^sot343_(\d+)/),n=e?Number.parseInt(e[1],4):4,o=GSn.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:KSn(o),parameters:o};throw new Error("Invalid number of pins")},USn=t=>{const{pn:e,p:n}=t;return e===1?{x:-n*1.92,y:-.65}:e===2?{x:-n*1.92,y:.65}:e===3?{x:n,y:.65}:e===4?{x:n,y:-.65}:{x:0,y:0}},KSn=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;let A=1/0,c=-1/0,l=1/0,u=-1/0;for(let y=0;y<t.num_pins;y++){const{x,y:E}=USn({num_pins:t.num_pins,pn:y+1,p:s});e.push(Jo(y+1,x,E,i,r,a)),x<A&&(A=x),x>c&&(c=x),E<l&&(l=E),E>u&&(u=E)}const g=(A+c)/2,h=u-l,d=o*.3,p=h/2+d;let m=n*.8;o<=2.6&&(m/=2);const _=yi(g,p+.5,.3),f={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_top",route:[{x:g-m/2,y:p},{x:g+m/2,y:p}],type:"pcb_silkscreen_path",stroke_width:.1},I={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_bottom",route:[{x:g-m/2,y:-p},{x:g+m/2,y:-p}],type:"pcb_silkscreen_path",stroke_width:.1},C={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:OSn,layer:"top"};return[...e,f,I,_,C]},VSn=Ii.extend({fn:Z()}),zSn=t=>{const e=VSn.parse(t),n=[],o=.5-.15,i=1.5,s=.5/2,a=75,A=-37/2;for(let E=0;E<a;E++){const B=E+1;if(B>=24&&B<=31)continue;const S=A-E*s,Q=B%2===0,w=i+(Q?.25:0),k=.5-w/2,R=Jo(B,k,S,w,o);R.layer=Q?"bottom":"top",n.push(R)}const c=46*.0254,l=137*.0254,u=261*.0254,g={type:"pcb_cutout",pcb_cutout_id:"",shape:"rect",center:{x:-l/2+i/2,y:A-u},width:l,height:c},h={x:-.5,y:A},d={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:h.x-.4,y:h.y},{x:h.x-.7,y:h.y+.3},{x:h.x-.7,y:h.y-.3},{x:h.x-.4,y:h.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"};let p=1/0,m=-1/0,_=1/0,f=-1/0;const I=(E,B,S=0,Q=0)=>{p=Math.min(p,E-S/2),m=Math.max(m,E+S/2),_=Math.min(_,B-Q/2),f=Math.max(f,B+Q/2)};for(const E of n){const B=E;I(B.x,B.y,B.width,B.height)}I(g.center.x,g.center.y,g.width,g.height);for(const E of d.route)I(E.x,E.y);const C=(p+m)/2,y=(_+f)/2,x=E=>{typeof E.x=="number"&&(E.x-=C),typeof E.y=="number"&&(E.y-=y),E.center&&(E.center.x-=C,E.center.y-=y),Array.isArray(E.route)&&(E.route=E.route.map(B=>({x:B.x-C,y:B.y-y})))};for(const E of n)x(E);return x(g),x(d),{circuitJson:[...n,g,d],parameters:e}},JSn=Ii.extend({fn:Z(),numPins:_t().optional().default(0),rows:xo([Z(),_t()]).transform(t=>Number(t)).optional().default(1).describe("number of rows"),p:ce.default("2.54mm").describe("pitch"),id:ce.default("1.0mm").describe("inner diameter"),od:ce.default("1.5mm").describe("outer diameter"),male:je().optional().describe("the module uses male headers"),nopin:je().optional().default(!1).describe("omit pins rendering"),female:je().optional().describe("the module uses female headers"),smd:je().optional().describe("surface mount device"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nopinlabels:je().optional().default(!1).describe("omit silkscreen pin labels"),doublesidedpinlabel:je().optional().default(!1).describe("add silkscreen pins in top and bottom layers"),bottomsidepinlabel:je().optional().default(!1).describe("place the silkscreen reference text on the bottom layer instead of top"),pinRowSide:Kn(["left","right","top","bottom"]).optional().default("left"),pinrowleft:je().optional().default(!1),pinrowright:je().optional().default(!1),pinrowtop:je().optional().default(!1),pinrowbottom:je().optional().default(!1),pinrowleftpins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),pinrowrightpins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),pinrowtoppins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),pinrowbottompins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),width:ce.optional(),height:ce.optional(),pinRowHoleEdgeToEdgeDist:ce.default("2mm"),holes:xo([Z(),dn(Z())]).optional().transform(t=>!t||Array.isArray(t)?t:t.startsWith("(")&&t.endsWith(")")?t.slice(1,-1).split(",").map(e=>e.trim()):[t]),holeXDist:ce.optional(),holeYDist:ce.optional(),holeInset:ce.default("1mm"),pinrow:xo([Z(),_t()]).optional(),usbposition:Kn(["left","right","top","bottom"]).optional().default("left"),usbleft:je().optional().default(!1),usbtop:je().optional().default(!1),usbright:je().optional().default(!1),usbbottom:je().optional().default(!1),usbtype:Kn(["micro","c"]).optional(),usbmicro:je().optional().default(!1),usbc:je().optional().default(!1),screen:je().optional().default(!1).describe("add silkscreen outline for screen/display area"),screenwidth:ce.optional(),screenheight:ce.optional(),screencenteroffsetx:ce.optional(),screencenteroffsety:ce.optional()}).transform(t=>{const e=XAt(t);let n=t.pinRowSide;t.pinrowleft&&(n="left"),t.pinrowright&&(n="right"),t.pinrowtop&&(n="top"),t.pinrowbottom&&(n="bottom");let o=t.usbposition;t.usbleft&&(o="left"),t.usbtop&&(o="top"),t.usbright&&(o="right"),t.usbbottom&&(o="bottom");let i=t.usbtype;t.usbmicro&&(i="micro"),t.usbc&&(i="c"),t.pinrow!==void 0&&(t.numPins=Number(t.pinrow));const r={left:t.pinrowleftpins,right:t.pinrowrightpins,top:t.pinrowtoppins,bottom:t.pinrowbottompins},s=Object.values(r).some(C=>C!==void 0&&C>0),a=(r.left??0)>0&&(r.right??0)>0,A=(r.top??0)>0&&(r.bottom??0)>0;s&&((r.left??0)>0?n="left":(r.right??0)>0?n="right":(r.top??0)>0?n="top":(r.bottom??0)>0&&(n="bottom"),t.numPins=(r.left??0)+(r.right??0)+(r.top??0)+(r.bottom??0));const c=Math.ceil(t.numPins/t.rows),l=Math.max(r.left??0,r.right??0),u=Math.max(r.top??0,r.bottom??0);let g,h;if(s){const C=a?t.p:0,y=A?t.p:0;g=(u>0?(u-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+C,h=(l>0?(l-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+y}else n==="left"||n==="right"?(g=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,h=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist):(h=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,g=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist);t.numPins===0&&(g=10,h=10);const d=t.width??g,p=t.height??h,m=t.screenwidth??d*.95,_=t.screenheight??p*.95,f=t.screencenteroffsetx??0,I=t.screencenteroffsety??0;return{...t,pinlabelAnchorSide:e,pinRowSide:n,usbposition:o,usbtype:i,male:t.male??!t.female,female:t.female??!1,width:d,height:p,screenwidth:m,screenheight:_,screencenteroffsetx:f,screencenteroffsety:I,pinrowleftpins:r.left,pinrowrightpins:r.right,pinrowtoppins:r.top,pinrowbottompins:r.bottom}}).superRefine((t,e)=>{t.male&&t.female&&e.addIssue({code:lo.custom,message:"'male' and 'female' cannot both be true; it should be male or female.",path:["male","female"]})}),WSn=t=>{const e=JSn.parse(t),{p:n,id:o,od:i,rows:r,numPins:s,pinlabelAnchorSide:a,pinlabelverticallyinverted:A,pinlabelorthogonal:c,pinlabeltextalignleft:l,pinlabeltextalignright:u,nopinlabels:g,doublesidedpinlabel:h,bottomsidepinlabel:d,pinRowSide:p,width:m,height:_,pinRowHoleEdgeToEdgeDist:f,holes:I,holeXDist:C,holeYDist:y,holeInset:x,pinrowleftpins:E,pinrowrightpins:B,pinrowtoppins:S,pinrowbottompins:Q,usbposition:w,usbtype:M,screen:k,screenwidth:R,screenheight:F,screencenteroffsetx:O,screencenteroffsety:U}=e;let Y="center";l?Y="left":u&&(Y="right");const W=[],te={left:E,right:B,top:S,bottom:Q},j=Object.values(te).some(ie=>ie!==void 0&&ie>0),J=(ie,ne,le,ge)=>{if(e.smd?W.push(Jo(ie,ne,le,e.od,e.od)):ie===1?W.push(yy({pn:ie,x:ne,y:le,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(ks(ie,ne,le,o,i)),!g){const _e=ne+(ge==="left"?-i:ge==="right"?i:0),ue=le+(ge==="top"?i:ge==="bottom"?-i:0);d||W.push(tD({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"top"})),(h||d)&&W.push(tD({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"bottom"}))}};if(j){const ie=n;let ne=1;const le=te.left??0,ge=te.right??0,_e=te.top??0,ue=te.bottom??0,fe=(pe,ye)=>{if(!(ye<=0))if(pe==="left"||pe==="right"){const Me=pe==="left"?-m/2+f:m/2-f,ve=(ye-1)/2*ie;for(let he=0;he<ye;he++)J(ne,Me,ve-he*ie,pe),ne++}else{const Me=pe==="top"?_/2-f:-_/2+f,ve=-((ye-1)/2)*ie;for(let he=0;he<ye;he++)J(ne,ve+he*ie,Me,pe),ne++}};fe("left",le),fe("right",ge),fe("top",_e),fe("bottom",ue)}else{const ie=n;let ne=0,le=0,ge=0,_e=0,ue=0,fe=0;const pe=Math.ceil(s/r);p==="left"||p==="right"?(ne=p==="left"?-m/2+f:m/2-f,le=(pe-1)/2*ie,ge=0,_e=-ie,ue=p==="left"?ie:-ie,fe=0):(ne=-(pe-1)/2*ie,le=p==="top"?_/2-f:-_/2+f,ge=ie,_e=0,ue=0,fe=p==="top"?-ie:ie);let ye=1;for(let Me=0;Me<r&&ye<=s;Me++)for(let ve=0;ve<pe&&ye<=s;ve++){const he=ne+ve*ge+Me*ue,Qe=le+ve*_e+Me*fe;if(e.smd?W.push(Jo(ye,he,Qe,e.od,e.od)):ye===1?W.push(yy({pn:ye,x:he,y:Qe,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(ks(ye,he,Qe,o,i)),!g){const Pe=he+(p==="left"?-i:p==="right"?i:0),we=Qe+(p==="top"?i:p==="bottom"?-i:0);d||W.push(tD({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"top"})),(h||d)&&W.push(tD({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"bottom"}))}ye++}}if(I)for(const ie of I){let ne=0,le=0;ie==="topleft"?(ne=-m/2+x,le=_/2-x):ie==="topright"?(ne=m/2-x,le=_/2-x):ie==="bottomleft"?(ne=-m/2+x,le=-_/2+x):ie==="bottomright"?(ne=m/2-x,le=-_/2+x):ie==="center"&&(ne=0,le=0),C!==void 0&&(ne+=C),y!==void 0&&(le+=y),W.push(ks(s+I.indexOf(ie)+1,ne,le,o,i))}if(!e.nosilkscreen){const ie=[{x:-m/2,y:-_/2},{x:m/2,y:-_/2},{x:m/2,y:_/2},{x:-m/2,y:_/2},{x:-m/2,y:-_/2}];W.push(iA(ie,{stroke_width:.1,layer:"top"}))}const oe=yi(0,_/2+1,.5);if(W.push(oe),w&&M){let ie,ne;if(M==="c")ie=8,ne=3;else if(M==="micro")ie=6,ne=2;else return{circuitJson:W,parameters:e};let le;if(w==="left")le=[{x:-m/2,y:-ie/2},{x:-m/2+ne,y:-ie/2},{x:-m/2+ne,y:ie/2},{x:-m/2,y:ie/2},{x:-m/2,y:-ie/2}];else if(w==="right")le=[{x:m/2-ne,y:-ie/2},{x:m/2,y:-ie/2},{x:m/2,y:ie/2},{x:m/2-ne,y:ie/2},{x:m/2-ne,y:-ie/2}];else if(w==="top")le=[{x:-ie/2,y:_/2-ne},{x:ie/2,y:_/2-ne},{x:ie/2,y:_/2},{x:-ie/2,y:_/2},{x:-ie/2,y:_/2-ne}];else if(w==="bottom")le=[{x:-ie/2,y:-_/2},{x:ie/2,y:-_/2},{x:ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2}];else return{circuitJson:W,parameters:e};W.push(iA(le,{stroke_width:.1,layer:"top"}))}if(k){const ie=R/2,ne=F/2,le=O,ge=U,_e=[{x:-ie+le,y:-ne+ge},{x:ie+le,y:-ne+ge},{x:ie+le,y:ne+ge},{x:-ie+le,y:ne+ge},{x:-ie+le,y:-ne+ge}];W.push(iA(_e,{stroke_width:.05,layer:"top"}))}return{circuitJson:W,parameters:e}},jSn=[{x:-1.45,y:2.75},{x:-1.45,y:-1.85},{x:4.05,y:-1.85},{x:4.05,y:2.75}],$Sn=[{x:-1.55,y:2.75},{x:-1.55,y:-1.85},{x:3.95,y:-1.85},{x:3.95,y:2.75}],qSn=Ii.extend({fn:Z(),num_pins:_t().default(3),inline:je().default(!1),p:Z().default("1.27mm"),id:Z().default("0.75mm"),od:Z().default("1.3mm"),w:Z().default("4.8mm"),h:Z().default("4.0mm")}),XSn=t=>{const e=qSn.parse(t),n=Number.parseFloat(e.p),o=Number.parseFloat(e.w),i=Number.parseFloat(e.h),r=e.inline?1.05:Number.parseFloat(e.od),s=e.inline?1.5:r,a=[yy({pn:1,x:0,y:0,holeDiameter:e.id,rectPadWidth:r,rectPadHeight:s}),e.inline?T9(2,n,0,Number.parseFloat(e.id),r,s):ks(2,n,n,e.id,r),e.inline?T9(3,n*2,0,Number.parseFloat(e.id),r,s):ks(3,n*2,0,e.id,r)],A=o/2,c=e.inline?n-.09:n,l=.2,u=l+A-i,g=Array.from({length:32},(m,_)=>{const f=Math.PI*_/31;return{x:c+A*Math.cos(f),y:l+A*Math.sin(f)}}),h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",stroke_width:.12,route:[...g,{x:c-A,y:u},{x:c+A,y:u},g[0]]},d=yi(c,l+A+1,.5),p={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:e.inline?$Sn:jSn,layer:"top"};return{circuitJson:[...a,h,d,p],parameters:e}},ZSn=Ii.extend({fn:$e("usbcmidmount"),num_pins:$e(16).default(16),pinstart:S5.number().int().positive().default(1),split:je().default(!1).describe("emit all 16 contact lands"),reverse:je().default(!1).describe("number contact lands right-to-left"),noholes:je().default(!1).describe("omit the two locator holes"),rowy:ce.default("2.125mm").describe("contact pad row y position"),ph:ce.default("1.1mm").describe("contact pad height"),pw:ce.default("0.3mm").describe("signal contact pad width"),powerpw:ce.default("0.55mm").describe("merged power pad width"),powerx:ce.default("3.2mm").describe("outer merged power pad x"),shellx:ce.default("4.325mm").describe("shell tab x position"),topy:ce.default("1.575mm").describe("upper shell tab y position"),bottomy:ce.default("2.625mm").describe("lower shell tab negative y magnitude"),tophw:ce.default("0.6mm").describe("upper shell slot width"),tophh:ce.default("1.5mm").describe("upper shell slot height"),topring:ce.default("0.25mm").describe("upper shell annular ring"),bottomhw:ce.default("0.6mm").describe("lower shell slot width"),bottomhh:ce.default("1.2mm").describe("lower shell slot height"),bottomring:ce.default("0.3mm").describe("lower shell annular ring"),holex:ce.default("2.89mm").describe("locator hole x position"),holey:ce.default("1.055mm").describe("locator hole y position"),holed:ce.default("0.7mm").describe("locator hole diameter"),bodybottom:ce.default("5.225mm").describe("connector body negative y extent")}),Hne=({pin:t,x:e,y:n,holeWidth:o,holeHeight:i,outerWidth:r,outerHeight:s})=>({type:"pcb_plated_hole",shape:"pill",pcb_plated_hole_id:"",pcb_component_id:"",pcb_port_id:"",x:e,y:n,hole_width:o,hole_height:i,outer_width:r,outer_height:s,ccw_rotation:0,layers:["top","bottom"],port_hints:[t.toString()]}),eQn=t=>{const e=ZSn.parse(t),{pinstart:n,split:o,reverse:i,noholes:r,rowy:s,ph:a,pw:A,powerpw:c,powerx:l,shellx:u,topy:g,bottomy:h,tophw:d,tophh:p,topring:m,bottomhw:_,bottomhh:f,bottomring:I,holex:C,holey:y,holed:x,bodybottom:E}=e,B=r?[]:[-C,C].map(ge=>({type:"pcb_hole",pcb_hole_id:"",pcb_component_id:"",hole_shape:"circle",hole_diameter:x,x:ge,y})),S=[Hne({pin:n,x:-u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Hne({pin:n+1,x:u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Hne({pin:n+2,x:-u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I}),Hne({pin:n+3,x:u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I})],Q=Number((l-.8).toFixed(12)),w=[-l,-Q,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,Q,l],k=o?[-3.35,-3.05,-2.55,-2.25,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,2.25,2.55,3.05,3.35]:w,R=i?k.slice().reverse():k,F=o?R.map(()=>A):R.map((ge,_e)=>_e<2||_e>=R.length-2?c:A),O=R.map((ge,_e)=>Jo(n+4+_e,ge,s,F[_e],a)),U=Math.min(u-Math.max(d,_)/2-.2,4.5),Y=[iA([{x:-U,y:-h+f/2+I+.2},{x:-U,y:g-p/2-m-.2}]),iA([{x:U,y:-h+f/2+I+.2},{x:U,y:g-p/2-m-.2}]),iA([{x:-U,y:-E},{x:U,y:-E}])],W=Math.max(s+a/2,g+p/2+m),te=Math.min(-E,-h-f/2-I),j=-u-Math.max(d+2*m,_+2*I)/2-.25,J=-j,oe=W+.25,ie=te-.25,ne=yi(0,oe+.75,.5),le={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:(oe+ie)/2},width:J-j,height:oe-ie,layer:"top"};return{circuitJson:[...B,...S,...O,...Y,ne,le],parameters:e}};Rne.extend({}).transform(Tne);var tQn=t=>(t.legsoutside=!1,t.pl||(t.pl=1),t.pw||(t.pw=.6),eD(t)),nQn=(t,e)=>{const n=t.filter(o=>o.type==="pcb_silkscreen_text");if(n.length===0)return t;for(const o of n)e.norefdes&&(o.text="");return t},oQn=(t,e)=>e.nosilkscreen?t.filter(n=>n.type!=="pcb_silkscreen_path"&&n.type!=="pcb_silkscreen_text"):t,iQn=(t,e)=>{if(!e)return t;const n=t.filter(l=>l.type==="pcb_smtpad"||l.type==="pcb_plated_hole");if(n.length===0)return t;let o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const a=(l,u,g=0,h=0)=>{const d=l-g/2,p=l+g/2,m=u-h/2,_=u+h/2;o=Math.min(o,d),i=Math.max(i,p),r=Math.min(r,m),s=Math.max(s,_)};for(const l of n)if(l.type==="pcb_smtpad"){const u=l.shape==="circle"?l.radius*2:l.width,g=l.shape==="circle"?l.radius*2:l.height;a(l.x,l.y,u,g)}else if(l.type==="pcb_plated_hole"){const u=l.outer_diameter??l.hole_diameter;a(l.x,l.y,u,u)}let A=0,c=0;switch(e){case"center":A=(o+i)/2,c=(r+s)/2;break;case"bottomleft":A=o,c=r;break;case"bottomcenter":case"centerbottom":A=(o+i)/2,c=r;break;case"topcenter":case"centertop":A=(o+i)/2,c=s;break;case"leftcenter":case"centerleft":A=o,c=(r+s)/2;break;case"rightcenter":case"centerright":A=i,c=(r+s)/2;break;case"pin1":{const l=n.find(u=>u.port_hints?.[0]==="1")||n[0];A=l.x,c=l.y;break}}if(A===0&&c===0)return t;for(const l of t){if(typeof l.x=="number"&&(l.x-=A),typeof l.y=="number"&&(l.y-=c),l.center&&typeof l.center.x=="number"&&(l.center.x-=A,l.center.y-=c),l.type==="pcb_silkscreen_path")for(const u of l.route)u.x-=A,u.y-=c;l.type==="pcb_silkscreen_text"&&l.anchor_position&&(l.anchor_position.x-=A,l.anchor_position.y-=c)}return t},rQn=[0,90,180,270],One=(t,e)=>{switch(e){case 90:return{x:-t.y,y:t.x};case 180:return{x:-t.x,y:-t.y};case 270:return{x:t.y,y:-t.x};default:return{...t}}},dct=t=>{if(typeof t.x=="number"&&typeof t.y=="number")return{x:t.x,y:t.y};if(Array.isArray(t.points)&&t.points.length>0){const e=t.points.map(o=>o.x),n=t.points.map(o=>o.y);return{x:(Math.min(...e)+Math.max(...e))/2,y:(Math.min(...n)+Math.max(...n))/2}}return null},sQn=t=>t.port_hints?.some(e=>/^(?:pin)?1$/i.test(String(e))),aQn=(t,e,[n,o])=>{const i=t.map(_=>_.x),r=t.map(_=>_.y),s=Math.min(...i),a=Math.max(...i),A=Math.min(...r),c=Math.max(...r),l=(s+a)/2,u=(A+c)/2,g=a-s,h=c-A,d=Math.max(g,h,1)*1e-6,p=n==="leftside"&&Math.abs(e.x-s)<=d||n==="rightside"&&Math.abs(e.x-a)<=d||n==="topside"&&Math.abs(e.y-c)<=d||n==="bottomside"&&Math.abs(e.y-A)<=d,m=o==="left"&&(g<=d||e.x<l-d)||o==="right"&&(g<=d||e.x>l+d)||o==="top"&&(h<=d||e.y>u+d)||o==="bottom"&&(h<=d||e.y<u-d);return p&&m},yxe=(t,e)=>{if(!t||typeof t!="object"||typeof t.x!="number"||typeof t.y!="number")return;const n=One(t,e);t.x=n.x,t.y=n.y},Gne=t=>(t%360+360)%360,AQn=(t,e)=>{switch(t.shape){case"rect":return{...t,shape:"rotated_rect",ccw_rotation:Gne(e)};case"pill":return{...t,shape:"rotated_pill",ccw_rotation:Gne(e)};case"rotated_rect":case"rotated_pill":return{...t,ccw_rotation:Gne(t.ccw_rotation+e)};default:return t}},cQn=(t,e)=>e===0?t:t.map(n=>{const o=structuredClone(n);if(typeof o.x=="number"&&typeof o.y=="number"){const i=One(o,e);o.x=i.x,o.y=i.y}yxe(o.center,e),yxe(o.anchor_position,e);for(const i of["route","outline","points"])if(Array.isArray(o[i]))for(const r of o[i])yxe(r,e);return o.type==="pcb_smtpad"?AQn(o,e):((o.type==="pcb_plated_hole"||o.type==="pcb_silkscreen_text"||o.type==="pcb_fabrication_note_text")&&(o.ccw_rotation=Gne(Number(o.ccw_rotation??0)+e)),(e===90||e===270)&&(o.type==="pcb_courtyard_rect"||o.type==="pcb_silkscreen_rect"||o.type==="pcb_fabrication_note_rect"||o.type==="pcb_cutout"&&o.shape==="rect")&&([o.width,o.height]=[o.height,o.width]),o)}),lQn=(t,e)=>{if(!e)return t;const n=t.filter(a=>a.type==="pcb_smtpad"||a.type==="pcb_plated_hole"),o=n.find(sQn),i=n.map(dct).filter(a=>a!==null),r=o?dct(o):null;if(!o||!r||i.length===0)throw new Error(`pin1location(${e.join(",")}) requires a footprint with a pad whose port_hints contain "1" or "pin1"`);const s=rQn.find(a=>{const A=i.map(l=>One(l,a)),c=One(r,a);return aQn(A,c,e)});if(s===void 0)throw new Error(`pin1location(${e.join(",")}) cannot be reached with a rotation; the requested location may be the mirrored orientation of this footprint`);return cQn(t,s)},hct=(t,e,n)=>Math.min(t,e/2,n/2),uQn=(t,e)=>{if(e===void 0)return t;const n=KA(e);if(!Number.isFinite(n)||n<0)throw new Error(`rounded radius must be a non-negative length, got "${e}"`);for(const o of t)o.type==="pcb_smtpad"&&(o.shape==="rect"||o.shape==="rotated_rect")&&(o.corner_radius=hct(n,o.width,o.height)),o.type==="pcb_plated_hole"&&"rect_pad_width"in o&&"rect_pad_height"in o&&(o.rect_border_radius=hct(n,o.rect_pad_width,o.rect_pad_height));return t};function gQn(t){return t!=null}var dQn=t=>t.trim().replace(/^pinheader(?=[\d_]|$)/i,"pinrow").replace(/^d2pak(\d+)(?=_|$)/i,"d2pak_$1").replace(/^to-252(?:-(\d+))?(?=_|$)/i,(e,n)=>n?`to252_${n}`:"to252").replace(/^to-263(?:-(\d+))?(?=_|$)/i,(e,n)=>n?`to263_${n}`:"to263").replace(/^sot-23(?:-(\d+))?(?=_|$)/i,(e,n)=>n?`sot23_${n}`:"sot23").replace(/^sot23-(\d+)(?=_|$)/i,"sot23_$1").replace(/^sot-223-(\d+)(?=_|$)/i,"sot223_$1").replace(/^to-220f-(\d+)(?=_|$)/i,"to220f_$1").replace(/^jst_(ph|sh|zh|xh)_(\d+)(?=_|$)/i,"jst$2_$1"),hQn=t=>t.replace(/([+-]?(?:\d+(?:\.\d*)?|\.\d+))\s*(?:um|µm)(?=$|[x,() ])/gi,e=>`${Number(ce.parse(e).toPrecision(12))}mm`),pQn=t=>{let e=Yne();const n=dQn(t),i=n.replace(/^((?:\d{4}|\d{5}))(?=$|_|x)/,"res$1").replace(/^zh(\d+)(?:$|_)/,"jst$1_zh").split(/_(?!metric)/).map(r=>{const s=r.match(/^(pin1location)(\(.*\))$/i);if(s)return{fn:s[1].toLowerCase(),v:s[2]};const a=r.match(/((?:p\d+[a-zA-Z]+(?=[\(\d\.\+\-\?]))|[a-zA-Z]+)([\(\d\.\+\-\?].*)?/);if(!a)return null;const[,A,c]=a;if(!A)return null;const l=A.toLowerCase();return c?.includes("?")?null:{fn:l,v:c}}).filter(gQn);for(const{fn:r,v:s}of i)e=e[r](s);return e.setString(n),e},mQn=()=>Object.keys(w8),Yne=()=>{const t=new Proxy({},{get:(e,n)=>{if(n==="soup"||n==="circuitJson"){if("fn"in e&&w8[e.fn])return()=>{const{circuitJson:o}=w8[e.fn](e),i=oQn(o,e),r=nQn(i,e),s=lQn(r,e.pin1location?DAt.parse(e.pin1location):void 0),a=uQn(s,e.rounded);return iQn(a,e.origin)};if(!w8[e.fn])throw new Error(`Invalid footprint function, got "${e.fn}"${e.string?`, from string "${e.string}"`:""}`);return()=>{throw new Error(`No function found for footprinter, make sure to specify .dip, .lr, .p, etc. Got "${n}"`)}}if(n==="json"){if(!w8[e.fn])throw new Error(`Invalid footprint function, got "${e.fn}"${e.string?`, from string "${e.string}"`:""}`);return()=>w8[e.fn](e).parameters}return n==="getFootprintNames"?()=>Object.keys(w8):n==="params"?()=>e:n==="setString"?o=>(e.string=o,t):(...o)=>{const i=o[0],r=typeof i=="string"?hQn(i):i;return Object.keys(e).length===0?`${n}${i}`in w8?(e[`${n}${i}`]=!0,e.fn=`${n}${i}`):(e[n]=!0,e.fn=n,n==="res"||n==="cap"||n==="led"||n==="diode"?i&&(typeof i=="string"&&i.includes("_metric")?e.metric=i.split("_metric")[0]:e.imperial=i):e.num_pins=Number.isNaN(Number.parseFloat(i))?void 0:Number.parseFloat(i)):!i&&["w","h","p"].includes(n)||(e[n]=n==="pin1location"&&o.length>1?o:r??!0),t}}});return t};Yne.string=pQn,Yne.getFootprintNames=mQn;var pct=Yne;function xxe([t,e],[n,o],{lineThickness:i=0}={}){return i===0?X1(t,e,n,o):_Qn(t,e,n,o)<=i}function X1(t,e,n,o){const i=Une(t,e,n),r=Une(t,e,o),s=Une(n,o,t),a=Une(n,o,e);return!!(i!==r&&s!==a||i===0&&CV(t,n,e)||r===0&&CV(t,o,e)||s===0&&CV(n,t,o)||a===0&&CV(n,e,o))}function Une(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o>0?1:2}function CV(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function _Qn(t,e,n,o){if(t.x===e.x&&t.y===e.y)return Zd(t,n,o);if(n.x===o.x&&n.y===o.y)return Zd(n,t,e);if(X1(t,e,n,o))return 0;const i=[Zd(t,n,o),Zd(e,n,o),Zd(n,t,e),Zd(o,t,e)];return Math.min(...i)}function Zd(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return ad(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;i=Math.max(0,Math.min(1,i));const r={x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)};return ad(t,r)}function ad(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function V4(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=o.x-n.x,a=o.y-n.y,A=t.x-n.x,c=t.y-n.y,l=i*a-r*s;if(Math.abs(l)<1e-10)return null;const u=(c*s-A*a)/l,g=(i*c-r*A)/l,h=1e-9;if(u>=-h&&u<=1+h&&g>=-h&&g<=1+h){const d=t.x+u*i,p=t.y+u*r;return{x:d,y:p}}return null}function Exe(t,e,n){const o=A=>A.x>=n.minX&&A.x<=n.maxX&&A.y>=n.minY&&A.y<=n.maxY;if(o(t)||o(e))return!0;const i={x:n.minX,y:n.minY},r={x:n.maxX,y:n.minY},s={x:n.minX,y:n.maxY},a={x:n.maxX,y:n.maxY};return X1(t,e,i,r)||X1(t,e,r,a)||X1(t,e,a,s)||X1(t,e,s,i)}var fQn=t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];e.push([o,i])}return e},IQn=(t,e,n)=>{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)>1e-9)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i<0)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return!(r===0||i>r)},nD=(t,e)=>{if(e.length<3)return!1;const n=fQn(e);for(const[i,r]of n)if(IQn(t,i,r))return!0;let o=!1;for(let i=0,r=e.length-1;i<e.length;r=i++){const s=e[i].x,a=e[i].y,A=e[r].x,c=e[r].y;a>t.y!=c>t.y&&t.x<(A-s)*(t.y-a)/(c-a)+s&&(o=!o)}return o};function yV(t){const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,maxX:t.center.x+e,minY:t.center.y-n,maxY:t.center.y+n}}function mct(t,e){const n=yV(t),o=yV(e),i=Math.max(n.minX-o.maxX,o.minX-n.maxX,0),r=Math.max(n.minY-o.maxY,o.minY-n.maxY,0),s={x:0,y:0},a={x:0,y:0};return i===0&&r===0?{distance:0,pointA:t.center,pointB:e.center}:(s.x=fp(t.center.x,o.minX,o.maxX),s.y=fp(t.center.y,o.minY,o.maxY),a.x=fp(e.center.x,n.minX,n.maxX),a.y=fp(e.center.y,n.minY,n.maxY),{distance:Math.hypot(s.x-a.x,s.y-a.y),pointA:s,pointB:a})}function Kne(t,e){return mct(t,e)}function fp(t,e,n){return Math.max(e,Math.min(n,t))}function CQn(t,e){let n=Number.POSITIVE_INFINITY,o={x:0,y:0},i={x:0,y:0};for(const r of t)for(const s of e){const{distance:a,pointA:A,pointB:c}=mct(r,s);a<n&&(n=a,o=A,i=c)}return{pointA:o,pointB:i,distance:n}}function xV(t,e,n,o){if(t.x===e.x&&t.y===e.y)return Zd(t,n,o);if(n.x===o.x&&n.y===o.y)return Zd(n,t,e);if(X1(t,e,n,o))return 0;const i=[Zd(t,n,o),Zd(e,n,o),Zd(n,t,e),Zd(o,t,e)];return Math.min(...i)}function _ct(t,e,n){const o={x:n.minX,y:n.minY},i={x:n.maxX,y:n.minY},r={x:n.minX,y:n.maxY},s={x:n.maxX,y:n.maxY};if(X1(t,e,o,i)||X1(t,e,i,s)||X1(t,e,s,r)||X1(t,e,r,o)||t.x>=n.minX&&t.x<=n.maxX&&t.y>=n.minY&&t.y<=n.maxY&&e.x>=n.minX&&e.x<=n.maxX&&e.y>=n.minY&&e.y<=n.maxY)return 0;const a=[Zd(o,t,e),Zd(i,t,e),Zd(r,t,e),Zd(s,t,e)];if(t.x>=n.minX&&t.x<=n.maxX&&t.y>=n.minY&&t.y<=n.maxY||e.x>=n.minX&&e.x<=n.maxX&&e.y>=n.minY&&e.y<=n.maxY)return 0;if(t.x<n.minX||t.x>n.maxX||t.y<n.minY||t.y>n.maxY){const A=fp(t.x,n.minX,n.maxX),c=fp(t.y,n.minY,n.maxY);a.push(ad(t,{x:A,y:c}))}if(e.x<n.minX||e.x>n.maxX||e.y<n.minY||e.y>n.maxY){const A=fp(e.x,n.minX,n.maxX),c=fp(e.y,n.minY,n.maxY);a.push(ad(e,{x:A,y:c}))}return Math.min(...a)}function yQn(t,e,n){const o=n.width/2,i=n.height/2,r={minX:n.center.x-o,maxX:n.center.x+o,minY:n.center.y-i,maxY:n.center.y+i};return _ct(t,e,r)}function Vne(t,e,n){const o={x:n.x,y:n.y};if(t.x===e.x&&t.y===e.y)return Math.max(0,ad(t,o)-n.radius);const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-t.x,y:o.y-t.y},s=i.x*i.x+i.y*i.y,a=Math.max(0,Math.min(1,(i.x*r.x+i.y*r.y)/s)),A={x:t.x+a*i.x,y:t.y+a*i.y},c=ad(A,o);return Math.max(0,c-n.radius)}function SQ(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r===0)return{x:e.x,y:e.y};let s=((t.x-e.x)*o+(t.y-e.y)*i)/r;return s=Math.max(0,Math.min(1,s)),{x:e.x+s*o,y:e.y+s*i}}var Bxe=(t,e)=>{const n={x:e.x-t.x,y:e.y-t.y},o=Math.sqrt(n.x**2+n.y**2);return{x:n.x/o,y:n.y/o}},Jk=t=>{switch(t){case"up":return{x:0,y:1};case"down":return{x:0,y:-1};case"left":return{x:-1,y:0};case"right":return{x:1,y:0}}};function xQn({rows:t,cols:e,xSpacing:n,ySpacing:o,width:i,height:r,offsetX:s=0,offsetY:a=0,yDirection:A="cartesian",centered:c=!0}){const l=n??1,u=o??1,g=i??e*l,h=r??t*u,d=c?-g/2:0,p=c?-h/2:0,m=i?i/e:l,_=r?r/t:u,f=[];for(let I=0;I<t;I++)for(let C=0;C<e;C++){const y=I*e+C,x=s+d+C*m+m/2,E=A==="cartesian"?a+p+(t-1-I)*_+_/2:a+p+I*_+_/2;f.push({index:y,center:{x,y:E},topLeft:{x:x-m/2,y:E+_/2},bottomRight:{x:x+m/2,y:E-_/2},row:I,col:C})}return f}function k9(t){return(t%360+360)%360}function EQn(t,e){const n=e.width/2,o=e.height/2,i=e.center.x-n,r=e.center.x+n,s=e.center.y-o,a=e.center.y+o;if(t.x>=i&&t.x<=r&&t.y>=s&&t.y<=a)return 0;const A=fp(t.x,i,r),c=fp(t.y,s,a);return ad(t,{x:A,y:c})}function BQn(t,e){if(t.x>=e.minX&&t.x<=e.maxX&&t.y>=e.minY&&t.y<=e.maxY)return 0;const n=fp(t.x,e.minX,e.maxX),o=fp(t.y,e.minY,e.maxY);return ad(t,{x:n,y:o})}function zne(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function bxe(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}var bQn=(t,e)=>{const n=Math.max(0,Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)),o=Math.max(0,Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY));return n*o},EV=(t,e)=>{const n=t.maxX<e.minX?e.minX-t.maxX:e.maxX<t.minX?t.minX-e.maxX:0,o=t.maxY<e.minY?e.minY-t.maxY:e.maxY<t.minY?t.minY-e.maxY:0;return Math.sqrt(n*n+o*o)},fct=(t,e)=>{const n=Math.max(t.minX,e.minX),o=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return n>i||o>r?null:{minX:n,minY:o,maxX:i,maxY:r}},z4=(t,e)=>!(t.maxX<e.minX||e.maxX<t.minX||t.maxY<e.minY||e.maxY<t.minY),Ey=t=>{const{center:e,width:n,height:o}=t,i=n/2,r=o/2;return{minX:e.x-i,maxX:e.x+i,minY:e.y-r,maxY:e.y+r}},oD=t=>({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),Oh=t=>{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r<t.length;r++){const s=t[r];s.x<e&&(e=s.x),s.y<n&&(n=s.y),s.x>o&&(o=s.x),s.y>i&&(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}},Jne={exports:{}},Sxe,Ict;function SQn(){if(Ict)return Sxe;Ict=1;var t=1e3,e=t*60,n=e*60,o=n*24,i=o*7,r=o*365.25;Sxe=function(l,u){u=u||{};var g=typeof l;if(g==="string"&&l.length>0)return s(l);if(g==="number"&&isFinite(l))return u.long?A(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function s(l){if(l=String(l),!(l.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var g=parseFloat(u[1]),h=(u[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return g*r;case"weeks":case"week":case"w":return g*i;case"days":case"day":case"d":return g*o;case"hours":case"hour":case"hrs":case"hr":case"h":return g*n;case"minutes":case"minute":case"mins":case"min":case"m":return g*e;case"seconds":case"second":case"secs":case"sec":case"s":return g*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function a(l){var u=Math.abs(l);return u>=o?Math.round(l/o)+"d":u>=n?Math.round(l/n)+"h":u>=e?Math.round(l/e)+"m":u>=t?Math.round(l/t)+"s":l+"ms"}function A(l){var u=Math.abs(l);return u>=o?c(l,u,o,"day"):u>=n?c(l,u,n,"hour"):u>=e?c(l,u,e,"minute"):u>=t?c(l,u,t,"second"):l+" ms"}function c(l,u,g,h){var d=u>=g*1.5;return Math.round(l/g)+" "+h+(d?"s":"")}return Sxe}var Qxe,Cct;function QQn(){if(Cct)return Qxe;Cct=1;function t(e){o.debug=o,o.default=o,o.coerce=c,o.disable=a,o.enable=r,o.enabled=A,o.humanize=SQn(),o.destroy=l,Object.keys(e).forEach(u=>{o[u]=e[u]}),o.names=[],o.skips=[],o.formatters={};function n(u){let g=0;for(let h=0;h<u.length;h++)g=(g<<5)-g+u.charCodeAt(h),g|=0;return o.colors[Math.abs(g)%o.colors.length]}o.selectColor=n;function o(u){let g,h=null,d,p;function m(..._){if(!m.enabled)return;const f=m,I=Number(new Date),C=I-(g||I);f.diff=C,f.prev=g,f.curr=I,g=I,_[0]=o.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let y=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(E,B)=>{if(E==="%%")return"%";y++;const S=o.formatters[B];if(typeof S=="function"){const Q=_[y];E=S.call(f,Q),_.splice(y,1),y--}return E}),o.formatArgs.call(f,_),(f.log||o.log).apply(f,_)}return m.namespace=u,m.useColors=o.useColors(),m.color=o.selectColor(u),m.extend=i,m.destroy=o.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(d!==o.namespaces&&(d=o.namespaces,p=o.enabled(u)),p),set:_=>{h=_}}),typeof o.init=="function"&&o.init(m),m}function i(u,g){const h=o(this.namespace+(typeof g>"u"?":":g)+u);return h.log=this.log,h}function r(u){o.save(u),o.namespaces=u,o.names=[],o.skips=[];const g=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const h of g)h[0]==="-"?o.skips.push(h.slice(1)):o.names.push(h)}function s(u,g){let h=0,d=0,p=-1,m=0;for(;h<u.length;)if(d<g.length&&(g[d]===u[h]||g[d]==="*"))g[d]==="*"?(p=d,m=h,d++):(h++,d++);else if(p!==-1)d=p+1,m++,h=m;else return!1;for(;d<g.length&&g[d]==="*";)d++;return d===g.length}function a(){const u=[...o.names,...o.skips.map(g=>"-"+g)].join(",");return o.enable(""),u}function A(u){for(const g of o.skips)if(s(u,g))return!1;for(const g of o.names)if(s(u,g))return!0;return!1}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}return Qxe=t,Qxe}var yct;function vQn(){return yct||(yct=1,(function(t,e){var n={env:{},version:""};e.formatArgs=i,e.save=r,e.load=s,e.useColors=o,e.storage=a(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,g=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(u++,h==="%c"&&(g=u))}),c.splice(g,0,l)}e.log=console.debug||console.log||(()=>{});function r(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function s(){let c;try{c=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!c&&typeof n<"u"&&"env"in n&&(c=n.env.DEBUG),c}function a(){try{return localStorage}catch{}}t.exports=QQn()(e);const{formatters:A}=t.exports;A.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Jne,Jne.exports)),Jne.exports}var wQn=vQn();const vc=_y(wQn);function Bn(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function PQn(t,e){return e.map(n=>Bn(t,n))}function xct(t){return{a:parseFloat(t.a),b:parseFloat(t.b),c:parseFloat(t.c),d:parseFloat(t.d),e:parseFloat(t.e),f:parseFloat(t.f)}}const MQn=/^matrix\(\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*\)$/i;function BV(t){const e=s=>{const a=parseFloat(s);if(Number.isFinite(a))return a;throw new Error(`'${t}' is not a matrix`)},n=t.substring(0,7).toLowerCase(),o=t.substring(t.length-1),r=t.substring(7,t.length-1).split(",");if(n==="matrix("&&o===")"&&r.length===6)return{a:e(r[0]),b:e(r[1]),c:e(r[2]),d:e(r[3]),e:e(r[4]),f:e(r[5])};throw new Error(`'${t}' is not a matrix`)}function DQn(t){const e=t.match(MQn);if(e===null||e.length<7)throw new Error(`'${t}' is not a matrix`);return{a:parseFloat(e[1]),b:parseFloat(e[2]),c:parseFloat(e[3]),d:parseFloat(e[4]),e:parseFloat(e[5]),f:parseFloat(e[6])}}function QQ(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function bV(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function SV(t){return typeof t>"u"}function Wk(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function NQn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function RQn(t){return NQn(t)&&"a"in t&&Wk(t.a)&&"b"in t&&Wk(t.b)&&"c"in t&&Wk(t.c)&&"d"in t&&Wk(t.d)&&"e"in t&&Wk(t.e)&&"f"in t&&Wk(t.f)}function pA(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function jk(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return jk(r,...i)}}}function Ad(...t){return jk(...t)}const{cos:TQn,sin:kQn,PI:FQn}=Math;function vQ(t,e,n){const o=TQn(t),i=kQn(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return SV(e)||SV(n)?r:jk([pA(e,n),r,pA(-e,-n)])}function F9(t,e=void 0,n=void 0){return vQ(t*FQn/180,e,n)}function dC(t,e=void 0,n=void 0,o=void 0){SV(e)&&(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return SV(n)||SV(o)?i:jk([pA(n,o),i,pA(-n,-o)])}function Ect(t,e){return{a:1,c:t,e:0,b:e,d:1,f:0}}const{tan:Bct}=Math;function bct(t,e){return{a:1,c:Bct(t),e:0,b:Bct(e),d:1,f:0}}function vxe(t,e){return bct(t*Math.PI/180,e*Math.PI/180)}function LQn(t){return iD(t)}function HQn(t){return iD(t)}function iD(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function Sct(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function OQn(t,e){const n=t[0].x!=null?t[0].x:t[0][0],o=t[0].y!=null?t[0].y:t[0][1],i=e[0].x!=null?e[0].x:e[0][0],r=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],A=e[1].x!=null?e[1].x:e[1][0],c=e[1].y!=null?e[1].y:e[1][1],l=t[2].x!=null?t[2].x:t[2][0],u=t[2].y!=null?t[2].y:t[2][1],g=e[2].x!=null?e[2].x:e[2][0],h=e[2].y!=null?e[2].y:e[2][1],d={a:n-l,b:o-u,c:s-l,d:a-u,e:l,f:u},p={a:i-g,b:r-h,c:A-g,d:c-h,e:g,f:h},m=bV(d),_=jk([p,m]);return Sct(_)}function GQn(t){return Array.isArray(t)?t.map(e):e(t);function e(n){switch(n.type){case"matrix":if("a"in n&&"b"in n&&"c"in n&&"d"in n&&"e"in n&&"f"in n)return xct(n);throw new Error("MISSING_MANDATORY_PARAM");case"translate":if(!("tx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"ty"in n?pA(n.tx,n.ty):pA(n.tx);case"scale":if(!("sx"in n))throw new Error("MISSING_MANDATORY_PARAM");return"sy"in n?dC(n.sx,n.sy):dC(n.sx);case"rotate":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return"cx"in n&&"cy"in n?F9(n.angle,n.cx,n.cy):F9(n.angle);case"skewX":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return vxe(n.angle,0);case"skewY":if(!("angle"in n))throw new Error("MISSING_MANDATORY_PARAM");return vxe(0,n.angle);case"shear":if(!("shx"in n&&"shy"in n))throw new Error("MISSING_MANDATORY_PARAM");return Ect(n.shx,n.shy);default:throw new Error("UNSUPPORTED_DESCRIPTOR")}}}let Qct=class extends SyntaxError{constructor(e,n,o,i){super(e),this.expected=n,this.found=o,this.location=i,this.name="SyntaxError"}format(e){let n="Error: "+this.message;if(this.location){let o=null;const i=e.find(A=>A.source===this.location.source);i&&(o=i.text.split(/\r\n|\n|\r/g));const r=this.location.start,s=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(r):r,a=this.location.source+":"+s.line+":"+s.column;if(o){const A=this.location.end,c="".padEnd(s.line.toString().length," "),l=o[r.line-1],g=(r.line===A.line?A.column:l.length+1)-r.column||1;n+=`
 --> `+a+`
`+c+` |
`+s.line+" | "+l+`
`+c+" | "+"".padEnd(r.column-1," ")+"".padEnd(g,"^")}else n+=`
 at `+a}return n}static buildMessage(e,n){function o(g){return g.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function r(g){return i?g.replace(i,h=>"\\u{"+o(h)+"}"):g}function s(g){return r(g.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,h=>"\\x0"+o(h)).replace(/[\x10-\x1F\x7F-\x9F]/g,h=>"\\x"+o(h)))}function a(g){return r(g.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,h=>"\\x0"+o(h)).replace(/[\x10-\x1F\x7F-\x9F]/g,h=>"\\x"+o(h)))}const A={literal(g){return'"'+s(g.text)+'"'},class(g){const h=g.parts.map(d=>Array.isArray(d)?a(d[0])+"-"+a(d[1]):a(d));return"["+(g.inverted?"^":"")+h.join("")+"]"+(g.unicode?"u":"")},any(){return"any character"},end(){return"end of input"},other(g){return g.description}};function c(g){return A[g.type](g)}function l(g){const h=g.map(c);if(h.sort(),h.length>0){let d=1;for(let p=1;p<h.length;p++)h[p-1]!==h[p]&&(h[d]=h[p],d++);h.length=d}switch(h.length){case 1:return h[0];case 2:return h[0]+" or "+h[1];default:return h.slice(0,-1).join(", ")+", or "+h[h.length-1]}}function u(g){return g?'"'+s(g)+'"':"end of input"}return"Expected "+l(e)+" but "+u(n)+" found."}};function YQn(t,e){e=e!==void 0?e:{};const n={},o=e.grammarSource,i={transformList:Ct};let r=Ct;const s="matrix",a="(",A=")",c="translate",l="scale",u="rotate",g="skewX",h="skewY",d=",",p=".",m=/^[eE]/,_=/^[+\-]/,f=/^[0-9]/,I=/^[ \t\r\n]/,C=Le("matrix",!1),y=Le("(",!1),x=Le(")",!1),E=Le("translate",!1),B=Le("scale",!1),S=Le("rotate",!1),Q=Le("skewX",!1),w=Le("skewY",!1),M=Le(",",!1),k=At("fractionalConstant"),R=Le(".",!1),F=Ye(["e","E"],!1,!1,!1),O=Ye(["+","-"],!1,!1,!1),U=Ye([["0","9"]],!1,!1,!1),Y=Ye([" ","	","\r",`
`],!1,!1,!1);function W(ht){return ht}function te(ht,Kt){return ht.concat(Kt)}function j(ht,Kt,rn,Lt,Ho,Ao){return[{type:"matrix",a:ht,b:Kt,c:rn,d:Lt,e:Ho,f:Ao}]}function J(ht,Kt){var rn={type:"translate",tx:ht};return Kt&&(rn.ty=Kt),[rn]}function oe(ht,Kt){var rn={type:"scale",sx:ht};return Kt&&(rn.sy=Kt),[rn]}function ie(ht,Kt){var rn={type:"rotate",angle:ht};return Kt&&(rn.cx=Kt[0],rn.cy=Kt[1]),[rn]}function ne(ht){return[{type:"skewX",angle:ht}]}function le(ht){return[{type:"skewY",angle:ht}]}function ge(ht){return parseFloat(ht.join(""))}function _e(ht){return parseInt(ht.join(""))}function ue(ht){return ht}function fe(ht,Kt){return[ht,Kt]}function pe(ht){return ht.join("")}function ye(ht,Kt){return[ht,Kt||null].join("")}function Me(ht,Kt){return[ht,Kt].join("")}function ve(ht,Kt){return[ht?ht.join(""):null,".",Kt.join("")].join("")}function he(ht){return ht.join("")}function Qe(ht,Kt){return["e",ht,Kt.join("")].join("")}let Pe=e.peg$currPos|0;const we=[{line:1,column:1}];let Te=Pe,Re=e.peg$maxFailExpected||[],Ee=e.peg$silentFails|0,ke;if(e.startRule){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');r=i[e.startRule]}function Ce(ht=Pe){const Kt=t.codePointAt(ht);return Kt===void 0?"":String.fromCodePoint(Kt)}function Le(ht,Kt){return{type:"literal",text:ht,ignoreCase:Kt}}function Ye(ht,Kt,rn,Lt){return{type:"class",parts:ht,inverted:Kt,ignoreCase:rn,unicode:Lt}}function tt(){return{type:"end"}}function At(ht){return{type:"other",description:ht}}function at(ht){let Kt=we[ht],rn;if(Kt)return Kt;if(ht>=we.length)rn=we.length-1;else for(rn=ht;!we[--rn];);for(Kt=we[rn],Kt={line:Kt.line,column:Kt.column};rn<ht;)t.charCodeAt(rn)===10?(Kt.line++,Kt.column=1):Kt.column++,rn++;return we[ht]=Kt,Kt}function nt(ht,Kt,rn){const Lt=at(ht),Ho=at(Kt);return{source:o,start:{offset:ht,line:Lt.line,column:Lt.column},end:{offset:Kt,line:Ho.line,column:Ho.column}}}function gt(ht){Pe<Te||(Pe>Te&&(Te=Pe,Re=[]),Re.push(ht))}function bt(ht,Kt,rn){return new Qct(Qct.buildMessage(ht,Kt),ht,Kt,rn)}function Ct(){let ht,Kt,rn,Lt,Ho;for(ht=Pe,Kt=[],rn=An();rn!==n;)Kt.push(rn),rn=An();for(rn=Dt(),rn===n&&(rn=null),Lt=[],Ho=An();Ho!==n;)Lt.push(Ho),Ho=An();return ht=rn,ht}function Dt(){let ht,Kt,rn,Lt;if(ht=Pe,Kt=kt(),Kt!==n){if(rn=[],Lt=xt(),Lt!==n)for(;Lt!==n;)rn.push(Lt),Lt=xt();else rn=n;rn!==n?(Lt=Dt(),Lt!==n?ht=te(Kt,Lt):(Pe=ht,ht=n)):(Pe=ht,ht=n)}else Pe=ht,ht=n;return ht===n&&(ht=kt()),ht}function kt(){let ht;return ht=it(),ht===n&&(ht=Yt(),ht===n&&(ht=pn(),ht===n&&(ht=be(),ht===n&&(ht=et(),ht===n&&(ht=It()))))),ht}function it(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt,Zt,nn,zn,Nn,Co,ei,ro,To,yo;if(ht=Pe,t.substr(Pe,6)===s?(Kt=s,Pe+=6):(Kt=n,Ee===0&&gt(C)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0&&gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n)if(qe=xt(),qe!==n)if(vt=Bt(),vt!==n)if(qt=xt(),qt!==n)if(Zt=Bt(),Zt!==n)if(nn=xt(),nn!==n)if(zn=Bt(),zn!==n)if(Nn=xt(),Nn!==n)if(Co=Bt(),Co!==n)if(ei=xt(),ei!==n)if(ro=Bt(),ro!==n){for(To=[],yo=An();yo!==n;)To.push(yo),yo=An();t.charCodeAt(Pe)===41?(yo=A,Pe++):(yo=n,Ee===0&&gt(x)),yo!==n?ht=j(Ao,vt,Zt,zn,Co,ro):(Pe=ht,ht=n)}else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n;else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function Yt(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt;if(ht=Pe,t.substr(Pe,9)===c?(Kt=c,Pe+=9):(Kt=n,Ee===0&&gt(E)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0&&gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=mt(),qe===n&&(qe=null),vt=[],qt=An();qt!==n;)vt.push(qt),qt=An();t.charCodeAt(Pe)===41?(qt=A,Pe++):(qt=n,Ee===0&&gt(x)),qt!==n?ht=J(Ao,qe):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function pn(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt;if(ht=Pe,t.substr(Pe,5)===l?(Kt=l,Pe+=5):(Kt=n,Ee===0&&gt(B)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0&&gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=mt(),qe===n&&(qe=null),vt=[],qt=An();qt!==n;)vt.push(qt),qt=An();t.charCodeAt(Pe)===41?(qt=A,Pe++):(qt=n,Ee===0&&gt(x)),qt!==n?ht=oe(Ao,qe):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function be(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt,qt;if(ht=Pe,t.substr(Pe,6)===u?(Kt=u,Pe+=6):(Kt=n,Ee===0&&gt(S)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0&&gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=st(),qe===n&&(qe=null),vt=[],qt=An();qt!==n;)vt.push(qt),qt=An();t.charCodeAt(Pe)===41?(qt=A,Pe++):(qt=n,Ee===0&&gt(x)),qt!==n?ht=ie(Ao,qe):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function et(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt;if(ht=Pe,t.substr(Pe,5)===g?(Kt=g,Pe+=5):(Kt=n,Ee===0&&gt(Q)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0&&gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=[],vt=An();vt!==n;)qe.push(vt),vt=An();t.charCodeAt(Pe)===41?(vt=A,Pe++):(vt=n,Ee===0&&gt(x)),vt!==n?ht=ne(Ao):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function It(){let ht,Kt,rn,Lt,Ho,Ao,qe,vt;if(ht=Pe,t.substr(Pe,5)===h?(Kt=h,Pe+=5):(Kt=n,Ee===0&&gt(w)),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();if(t.charCodeAt(Pe)===40?(Lt=a,Pe++):(Lt=n,Ee===0&&gt(y)),Lt!==n){for(Ho=[],Ao=An();Ao!==n;)Ho.push(Ao),Ao=An();if(Ao=Bt(),Ao!==n){for(qe=[],vt=An();vt!==n;)qe.push(vt),vt=An();t.charCodeAt(Pe)===41?(vt=A,Pe++):(vt=n,Ee===0&&gt(x)),vt!==n?ht=le(Ao):(Pe=ht,ht=n)}else Pe=ht,ht=n}else Pe=ht,ht=n}else Pe=ht,ht=n;return ht}function Bt(){let ht,Kt,rn,Lt;return ht=Pe,Kt=Pe,rn=Xt(),rn===n&&(rn=null),Lt=dt(),Lt!==n?(rn=[rn,Lt],Kt=rn):(Pe=Kt,Kt=n),Kt!==n&&(Kt=ge(Kt)),ht=Kt,ht===n&&(ht=Pe,Kt=Pe,rn=Xt(),rn===n&&(rn=null),Lt=Ze(),Lt!==n?(rn=[rn,Lt],Kt=rn):(Pe=Kt,Kt=n),Kt!==n&&(Kt=_e(Kt)),ht=Kt),ht}function mt(){let ht,Kt,rn;return ht=Pe,Kt=xt(),Kt!==n?(rn=Bt(),rn!==n?ht=rn:(Pe=ht,ht=n)):(Pe=ht,ht=n),ht}function st(){let ht,Kt,rn,Lt,Ho;return ht=Pe,Kt=xt(),Kt!==n?(rn=Bt(),rn!==n?(Lt=xt(),Lt!==n?(Ho=Bt(),Ho!==n?ht=fe(rn,Ho):(Pe=ht,ht=n)):(Pe=ht,ht=n)):(Pe=ht,ht=n)):(Pe=ht,ht=n),ht}function xt(){let ht,Kt,rn,Lt,Ho;if(ht=Pe,Kt=[],rn=An(),rn!==n)for(;rn!==n;)Kt.push(rn),rn=An();else Kt=n;if(Kt!==n){for(rn=Xe(),rn===n&&(rn=null),Lt=[],Ho=An();Ho!==n;)Lt.push(Ho),Ho=An();Kt=[Kt,rn,Lt],ht=Kt}else Pe=ht,ht=n;if(ht===n)if(ht=Pe,Kt=Xe(),Kt!==n){for(rn=[],Lt=An();Lt!==n;)rn.push(Lt),Lt=An();Kt=[Kt,rn],ht=Kt}else Pe=ht,ht=n;return ht}function Xe(){let ht;return t.charCodeAt(Pe)===44?(ht=d,Pe++):(ht=n,Ee===0&&gt(M)),ht}function Ze(){let ht,Kt;return ht=Pe,Kt=Jt(),Kt!==n&&(Kt=pe(Kt)),ht=Kt,ht}function dt(){let ht,Kt,rn;return ht=Pe,Kt=Ut(),Kt!==n?(rn=Wt(),rn===n&&(rn=null),ht=ye(Kt,rn)):(Pe=ht,ht=n),ht===n&&(ht=Pe,Kt=Jt(),Kt!==n?(rn=Wt(),rn!==n?ht=Me(Kt,rn):(Pe=ht,ht=n)):(Pe=ht,ht=n)),ht}function Ut(){let ht,Kt,rn,Lt;return Ee++,ht=Pe,Kt=Jt(),Kt===n&&(Kt=null),t.charCodeAt(Pe)===46?(rn=p,Pe++):(rn=n,Ee===0&&gt(R)),rn!==n?(Lt=Jt(),Lt!==n?ht=ve(Kt,Lt):(Pe=ht,ht=n)):(Pe=ht,ht=n),ht===n&&(ht=Pe,Kt=Jt(),Kt!==n?(t.charCodeAt(Pe)===46?(rn=p,Pe++):(rn=n,Ee===0&&gt(R)),rn!==n?ht=he(Kt):(Pe=ht,ht=n)):(Pe=ht,ht=n)),Ee--,ht===n&&(Kt=n,Ee===0&&gt(k)),ht}function Wt(){let ht,Kt,rn,Lt;return ht=Pe,Kt=t.charAt(Pe),m.test(Kt)?Pe++:(Kt=n,Ee===0&&gt(F)),Kt!==n?(rn=Xt(),rn===n&&(rn=null),Lt=Jt(),Lt!==n?ht=Qe(rn,Lt):(Pe=ht,ht=n)):(Pe=ht,ht=n),ht}function Xt(){let ht;return ht=t.charAt(Pe),_.test(ht)?Pe++:(ht=n,Ee===0&&gt(O)),ht}function Jt(){let ht,Kt;if(ht=[],Kt=yn(),Kt!==n)for(;Kt!==n;)ht.push(Kt),Kt=yn();else ht=n;return ht}function yn(){let ht;return ht=t.charAt(Pe),f.test(ht)?Pe++:(ht=n,Ee===0&&gt(U)),ht}function An(){let ht;return ht=t.charAt(Pe),I.test(ht)?Pe++:(ht=n,Ee===0&&gt(Y)),ht}ke=r();const kn=ke!==n&&Pe===t.length;function $n(){throw ke!==n&&Pe<t.length&&gt(tt()),bt(Re,Te<t.length?Ce(Te):null,Te<t.length?nt(Te,Te+1):nt(Te,Te))}if(e.peg$library)return{peg$result:ke,peg$currPos:Pe,peg$FAILED:n,peg$maxFailExpected:Re,peg$maxFailPos:Te,peg$success:kn,peg$throw:kn?void 0:$n};if(kn)return ke;$n()}function UQn(t){return YQn(t)}function wxe(t,e=!1,n=!1){e?n?t=Ad(t,dC(-1,-1)):t=Ad(t,dC(1,-1)):n&&(t=Ad(t,dC(-1,1)));const o=t.a,i=t.b,r=t.c,s=t.d;let a,A,c;if(o!==0||r!==0){const l=Math.hypot(o,r);a=l,A=(o*s-i*r)/l;const u=Math.acos(o/l);c=r>0?-u:u}else if(i!==0||s!==0){const l=Math.hypot(i,s);a=(o*s-i*r)/l,A=l;const u=Math.acos(i/l);c=Math.PI/2+(s>0?-u:u)}else a=0,A=0,c=0;return n&&(a=-a),e&&(A=-A),{translate:{tx:t.e,ty:t.f},scale:{sx:a,sy:A},rotation:{angle:c}}}function KQn(){return{a:1,c:0,e:0,b:0,d:-1,f:0}}function VQn(){return{a:-1,c:0,e:0,b:0,d:1,f:0}}function zQn(){return{a:-1,c:0,e:0,b:0,d:-1,f:0}}function vct(t,e){const n=e.x-t.x,o=e.y-t.y;return pA(n,o)}function JQn(t,e,n,o){const i=vct(t,n),r=Bn(i,e),s=n,a=o,A=Math.atan2(a.y-s.y,a.x-s.x)-Math.atan2(r.y-s.y,r.x-s.x),c=vQ(A,s.x,s.y),l=Math.sqrt(Math.pow(r.x-s.x,2)+Math.pow(r.y-s.y,2)),g=Math.sqrt(Math.pow(a.x-s.x,2)+Math.pow(a.y-s.y,2))/l,h=dC(g,g,s.x,s.y);return Ad([i,h,c])}const WQn=Object.freeze(Object.defineProperty({__proto__:null,applyToPoint:Bn,applyToPoints:PQn,compose:Ad,decomposeTSR:wxe,flipOrigin:zQn,flipX:KQn,flipY:VQn,fromDefinition:GQn,fromObject:xct,fromOneMovingPoint:vct,fromString:BV,fromStringLegacy:DQn,fromTransformAttribute:UQn,fromTriangles:OQn,fromTwoMovingPoints:JQn,identity:QQ,inverse:bV,isAffineMatrix:RQn,rotate:vQ,rotateDEG:F9,scale:dC,shear:Ect,skew:bct,skewDEG:vxe,smoothMatrix:Sct,toCSS:LQn,toSVG:HQn,toString:iD,transform:jk,translate:pA},Symbol.toStringTag,{value:"Module"}));var Pxe=(t,e={})=>{let n=t._internal_store;if(!n){n={counts:{}},t._internal_store=n;for(const i of t){const r=i.type,s=i[`${r}_id`];if(!s)continue;const a=Number.parseInt(s.split("_").pop());Number.isNaN(a)||(n.counts[r]=Math.max(n.counts[r]??0,a))}}return new Proxy({},{get:(i,r)=>r==="toArray"?()=>t:{get:s=>t.find(a=>a.type===r&&a[`${r}_id`]===s),getUsing:s=>{const a=Object.keys(s);if(a.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const A=a[0],c=A.replace("_id",""),l=t.find(u=>u.type===c&&u[A]===s[A]);return l?t.find(u=>u.type===r&&u[`${r}_id`]===l[`${r}_id`]):null},getWhere:s=>{const a=Object.keys(s);return t.find(A=>A.type===r&&a.every(c=>A[c]===s[c]))},list:s=>{const a=s?Object.keys(s):[];return t.filter(A=>A.type===r&&a.every(c=>A[c]===s[c]))},insert:s=>{n.counts[r]??=-1,n.counts[r]++;const a=n.counts[r],A={type:r,[`${r}_id`]:`${r}_${a}`,...s};return e.validateInserts&&(R9[r]??U4).parse(A),t.push(A),A},delete:s=>{const a=t.find(A=>A[`${r}_id`]===s);a&&t.splice(t.indexOf(a),1)},update:(s,a)=>{const A=t.find(c=>c.type===r&&c[`${r}_id`]===s);if(A)return Object.assign(A,a),A},select:s=>{if(r==="source_component")return t.find(a=>a.type==="source_component"&&a.name===s.replace(/\./g,""));if(r==="pcb_port"||r==="source_port"||r==="schematic_port"){const[a,A]=s.replace(/\./g,"").split(/[\s\>]+/),c=t.find(u=>u.type==="source_component"&&u.name===a);if(!c)return null;const l=t.find(u=>u.type==="source_port"&&u.source_component_id===c.source_component_id&&(u.name===A||(u.port_hints??[]).includes(A)));if(!l)return null;if(r==="source_port")return l;if(r==="pcb_port")return t.find(u=>u.type==="pcb_port"&&u.source_port_id===l.source_port_id);if(r==="schematic_port")return t.find(u=>u.type==="schematic_port"&&u.source_port_id===l.source_port_id)}}}})};Pxe.unparsed=Pxe;var O3=Pxe,rD={exports:{}},jQn=rD.exports,wct;function $Qn(){if(wct)return rD.exports;wct=1;var t={env:{},version:""};return(function(){var e,n,o,i,r,s;typeof performance<"u"&&performance!==null&&performance.now?rD.exports=function(){return performance.now()}:typeof t<"u"&&t!==null&&t.hrtime?(rD.exports=function(){return(e()-r)/1e6},n=t.hrtime,e=function(){var a;return a=n(),a[0]*1e9+a[1]},i=e(),s=t.uptime()*1e9,r=i-s):Date.now?(rD.exports=function(){return Date.now()-o},o=Date.now()):(rD.exports=function(){return new Date().getTime()-o},o=new Date().getTime())}).call(jQn),rD.exports}$Qn();function qQn([t,e],[n,o],{lineThickness:i=0}={}){return i===0?Pct(t,e,n,o):XQn(t,e,n,o)<=i}function Pct(t,e,n,o){const i=Wne(t,e,n),r=Wne(t,e,o),s=Wne(n,o,t),a=Wne(n,o,e);return!!(i!==r&&s!==a||i===0&&jne(t,n,e)||r===0&&jne(t,o,e)||s===0&&jne(n,t,o)||a===0&&jne(n,e,o))}function Wne(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o>0?1:2}function jne(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function XQn(t,e,n,o){if(t.x===e.x&&t.y===e.y)return $k(t,n,o);if(n.x===o.x&&n.y===o.y)return $k(n,t,e);if(Pct(t,e,n,o))return 0;const i=[$k(t,n,o),$k(e,n,o),$k(n,t,e),$k(o,t,e)];return Math.min(...i)}function $k(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return Mct(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;i=Math.max(0,Math.min(1,i));const r={x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)};return Mct(t,r)}function Mct(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function $ne(t){const e=new Map;let n=0;function o(i){for(const[,s]of e)if(s.has(i))return s;const r=new Set;return e.set(`connectivity_net${n++}`,r),r}for(const i of t){let r=null;for(const s of i){if(!r)r=o(s);else if(!r.has(s)){const a=o(s);if(a!==r){for(const A of a)r.add(A);e.delete(Array.from(e.entries()).find(([,A])=>A===a)[0])}}r.add(s)}}return Object.fromEntries(Array.from(e.entries()).map(([i,r])=>[i,Array.from(r)]))}var wQ=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s&&o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){this.netMap[i].push(...this.netMap[r]),this.netMap[r]=this.netMap[i];for(const s of this.netMap[i])this.idToNetMap[s]=i}}for(const r of n)this.netMap[i].includes(r)||this.netMap[i].push(r),this.idToNetMap[r]=i}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return i?o===i||i===e||i===e:!1}areAllIdsConnected(e){const n=this.getNetConnectedToId(e[0]);for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}},Mxe=t=>{const e=[];for(const o of t)if(o.type==="source_trace")e.push([...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]]);else if(o.type==="source_component"&&o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=$ne(e);return new wQ(n)},Vf=t=>{const e=[];for(const o of t)if(o.type==="source_trace")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type==="pcb_port"){const{pcb_port_id:i,source_port_id:r}=o;r&&i&&e.push([r,i])}else if(o.type==="pcb_smtpad"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_plated_hole"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_trace"){const{pcb_trace_id:i,source_trace_id:r}=o,s=Array.isArray(o.route)?o.route.filter(a=>a&&a.route_type==="wire"):[];if(r&&i&&e.push([i,r]),Array.isArray(s)){const a=s.find(c=>c&&c.start_pcb_port_id)?.start_pcb_port_id,A=s.find(c=>c&&c.end_pcb_port_id)?.end_pcb_port_id;a&&i&&A&&e.push([a,i,A])}}else if(o.type==="pcb_via"){const{pcb_via_id:i,pcb_trace_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="source_component"&&o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=$ne(e);return new wQ(n)},qne=class{circuitJson;traceIdToElm;portIdToElm;connMap;constructor(t){this.circuitJson=t||[],this.traceIdToElm=new Map,this.portIdToElm=new Map,t?(this._buildTraceMap(),this._buildPortMap(),this.connMap=this._buildTraceConnectivityMap()):this.connMap=new wQ({})}_buildPortMap(){for(const t of this.circuitJson)t.type==="pcb_port"&&this.portIdToElm.set(t.pcb_port_id,t)}_buildTraceMap(){for(const t of this.circuitJson)t.type==="pcb_trace"&&this.traceIdToElm.set(t.pcb_trace_id,t)}_buildTraceConnectivityMap(){const t=[],e=Array.from(this.traceIdToElm.keys());for(let n=0;n<e.length;n++)for(let o=n+1;o<e.length;o++){const i=this.traceIdToElm.get(e[n]),r=this.traceIdToElm.get(e[o]);this._arePcbTracesConnected(i,r)&&t.push([e[n],e[o]])}for(const n of this.portIdToElm.values())for(const o of this.traceIdToElm.values())for(const i of o.route)i.route_type==="wire"&&(i.start_pcb_port_id===n.pcb_port_id?t.push([n.pcb_port_id,o.pcb_trace_id]):i.end_pcb_port_id===n.pcb_port_id&&t.push([o.pcb_trace_id,n.pcb_port_id]));return new wQ($ne(t))}addTrace(t){this.traceIdToElm.set(t.pcb_trace_id,t);const e=[];for(const n of t.route)n.route_type==="wire"&&(n.start_pcb_port_id&&e.push([n.start_pcb_port_id,t.pcb_trace_id]),n.end_pcb_port_id&&e.push([n.end_pcb_port_id,t.pcb_trace_id]));this.connMap.addConnections(e)}_arePcbTracesConnected(t,e){for(let n=0;n<t.route.length-1;n++){const o=t.route[n],i=t.route[n+1];if(o.route_type==="wire"&&i.route_type==="wire")for(let r=0;r<e.route.length-1;r++){const s=e.route[r],a=e.route[r+1];if(s.route_type!=="wire"||a.route_type!=="wire")continue;if(qQn([o,i],[s,a],{lineThickness:(o.width+s.width)/2}))return!0}}return!1}areTracesConnected(t,e){return this.connMap.areIdsConnected(t,e)}getAllTracesConnectedToTrace(t){const e=this.connMap.getNetConnectedToId(t);return e?this.connMap.getIdsConnectedToNet(e).filter(n=>this.traceIdToElm.has(n)).map(n=>this.traceIdToElm.get(n)):[]}getAllTracesConnectedToPort(t){const e=this.connMap.getNetConnectedToId(t);return e?this.connMap.getIdsConnectedToNet(e).filter(n=>this.traceIdToElm.has(n)).map(n=>this.traceIdToElm.get(n)):[]}};let ZQn=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");var sD=(t,e)=>Math.abs(t.x-e.x)+Math.abs(t.y-e.y),Dct=(t,e)=>{const n=e.x-t.x,o=e.y-t.y;return Math.abs(n)>Math.abs(o)?{dx:Math.sign(n),dy:0}:{dx:0,dy:Math.sign(o)}},Nct=(t,e,n)=>Math.abs(t.x-e.x)*Math.abs(n.dx)+Math.abs(t.y-e.y)*Math.abs(n.dy),Rct=(t,e=.1)=>`${Math.round(t.x/e)},${Math.round(t.y/e)}`,Tct=(t,e)=>Math.abs(t-e)<1e-4,kct=(t,e,{viaDiameter:n=.5}={})=>{const o=[];for(let i=0;i<t.length-1;i++){const[r,s]=[t[i],t[i+1]],a=i-1>=0?t[i-1]:null,A=Tct(r.y,s.y),c=Tct(r.x,s.x);if(!A&&!c)throw new Error(`getObstaclesFromTrace currently only supports horizontal and vertical traces (not diagonals) Conflicting trace: ${e}, start: (${r.x}, ${r.y}), end: (${s.x}, ${s.y})`);const l={type:"rect",layers:[r.layer],center:{x:(r.x+s.x)/2,y:(r.y+s.y)/2},width:A?Math.abs(r.x-s.x):.1,height:c?Math.abs(r.y-s.y):.1,connectedTo:[e]};if(o.push(l),a&&a.layer===r.layer&&r.layer!==s.layer){const u={type:"rect",layers:[r.layer,s.layer],center:{x:r.x,y:r.y},connectedTo:[e],width:n,height:n};o.push(u)}}return o},Fct=class{obstacles;GRID_STEP=.1;constructor(t){this.obstacles=t.map(e=>({...e,left:e.center.x-e.width/2,right:e.center.x+e.width/2,top:e.center.y+e.height/2,bottom:e.center.y-e.height/2}))}getObstacleAt(t,e,n){n??=this.GRID_STEP;for(const o of this.obstacles){const i=o.width/2+n,r=o.height/2+n;if(t>=o.center.x-i&&t<=o.center.x+i&&e>=o.center.y-r&&e<=o.center.y+r)return o}return null}isObstacleAt(t,e,n){return this.getObstacleAt(t,e,n)!==null}getDirectionDistancesToNearestObstacle(t,e){const{GRID_STEP:n}=this,o={left:1/0,top:1/0,bottom:1/0,right:1/0};for(const i of this.obstacles)if(i.type==="rect"){const r=i.center.x-i.width/2-n,s=i.center.x+i.width/2+n,a=i.center.y+i.height/2+n,A=i.center.y-i.height/2-n;e>=A&&e<=a&&t>r&&(o.left=Math.min(o.left,t-s)),e>=A&&e<=a&&t<s&&(o.right=Math.min(o.right,r-t)),t>=r&&t<=s&&e<a&&(o.top=Math.min(o.top,A-e)),t>=r&&t<=s&&e>A&&(o.bottom=Math.min(o.bottom,e-a))}return o}getOrthoDirectionCollisionInfo(t,e,{margin:n=0}={}){const{x:o,y:i}=t,{dx:r,dy:s}=e;let a=1/0,A=null;for(const c of this.obstacles){const l=c.left-n,u=c.right+n,g=c.top+n,h=c.bottom-n;let d=null;r===1&&s===0?i>h&&i<g&&o<c.left&&(d=c.left-o):r===-1&&s===0?i>h&&i<g&&o>c.right&&(d=o-c.right):r===0&&s===1?o>l&&o<u&&i<c.bottom&&(d=c.bottom-i):r===0&&s===-1&&o>l&&o<u&&i>c.top&&(d=i-c.top),d!==null&&d<a&&(a=d,A=c)}return{dx:r,dy:s,wallDistance:a,obstacle:A}}getObstaclesOverlappingRegion(t){const e=[];for(const n of this.obstacles){const{left:o,right:i,top:r,bottom:s}=n;o<=t.maxX&&i>=t.minX&&r<=t.maxY&&s>=t.minY&&e.push(n)}return e}};function evn(t){if(t.length<4)return t;const e=[{...t[0]}];let n=t[0].layer;for(let o=1;o<t.length;o++){const i={start:t[o-1],end:t[o]},r=t[o].route_type==="via"||t[o-1].route_type==="via";if(t[o].layer!==n||r){e.push({...t[o]}),n=t[o].layer;continue}let s=!1,a=null,A=-1;for(let l=0;l<e.length-1;l++){const u={start:e[l],end:e[l+1]};if(u.start.layer===i.start.layer&&u.start.layer===i.start.layer){const g=tvn(u,i);if(g){s=!0,a={...g,layer:n},A=l;break}}}s&&a&&(e.splice(A+1),e.push(a));const c=e[e.length-1];(c.x!==t[o].x||c.y!==t[o].y)&&e.push(t[o])}return e}function tvn(t,e){if(t.start.x===t.end.x&&e.start.x===e.end.x||t.start.y===t.end.y&&e.start.y===e.end.y)return null;let n;if(t.start.x===t.end.x){const o=t.start.x,i=e.start.y;n={...t.start,x:o,y:i}}else{const o=e.start.x,i=t.start.y;n={...t.start,x:o,y:i}}return Lct(n,t)&&Lct(n,e)?n:null}function Lct(t,e){return t.x>=Math.min(e.start.x,e.end.x)&&t.x<=Math.max(e.start.x,e.end.x)&&t.y>=Math.min(e.start.y,e.end.y)&&t.y<=Math.max(e.start.y,e.end.y)}function nvn(t){const e=[t[0]];for(let n=1;n<t.length-1;n++){const[o,i,r]=[t[n-1],t[n],t[n+1]];e.push(i),!(i.route_type!=="wire"||o.route_type!=="wire"||r.route_type!=="wire")&&o.layer===i.layer&&i.layer!==r.layer&&e.push({route_type:"via",from_layer:i.layer,to_layer:r.layer,x:i.x,y:i.y})}return e.push(t[t.length-1]),e}vc("autorouter:shortenPathWithShortcuts");function ovn(t,e){if(t.length<=2)return t;const n=[t[0]];for(let o=1;o<t.length;o++){const i={start:n[n.length-1],end:t[o]};let r=-1;const s=i.start.x===i.end.x,a=i.start.y===i.end.y;for(let A=o+1;A<t.length;A++){if(A<=r)continue;const c={start:t[A],end:t[A+1]};if(!c.end)continue;const l=c.start.x===c.end.x,u=c.start.y===c.end.y,g=s&&l,h=a&&u;if(h&&g||!(g||h))continue;let p=!1;const m=Math.min(i.start.x,i.end.x),_=Math.max(i.start.x,i.end.x),f=Math.min(c.start.x,c.end.x),I=Math.max(c.start.x,c.end.x),C=Math.min(i.start.y,i.end.y),y=Math.max(i.start.y,i.end.y),x=Math.min(c.start.y,c.end.y),E=Math.max(c.start.y,c.end.y);if(h?p=m<=I&&_>=f:g&&(p=C<=E&&y>=x),!p)continue;const B=[],S=n[n.length-1],Q=t[A+2];if(!Q)continue;h&&f<_&&Q.x===f&&B.push({x:f,y:i.start.y,layer:i.start.layer}),h&&I>m&&Q.x===I&&B.push({x:I,y:i.start.y,layer:i.start.layer}),g&&x<y&&Q.y===x&&B.push({x:i.start.x,y:x,layer:i.start.layer}),g&&E>C&&Q.y===E&&B.push({x:i.start.x,y:E,layer:i.start.layer});let w=null;for(const M of B)if(!(e(S,M)||e(Q,M))){w=M;break}if(w){n.push(w),o=A+1,r=A+1;break}}r===-1&&n.push(t[o])}return n[n.length-1]!==t[t.length-1]&&n.push(t[t.length-1]),n}var aD=vc("autorouting-dataset:astar"),Hct=class{openSet=[];closedSet=new Set;debug=!1;debugSolutions;debugMessage=null;debugTraceCount=0;input;obstacles;allObstacles;startNode;goalPoint;GRID_STEP;OBSTACLE_MARGIN;MAX_ITERATIONS;isRemovePathLoopsEnabled;isShortenPathWithShortcutsEnabled;GREEDY_MULTIPLIER=1.1;iterations=-1;constructor(t){this.input=t.input,this.allObstacles=t.input.obstacles,this.startNode=t.startNode,this.goalPoint=t.goalPoint?{l:0,...t.goalPoint}:void 0,this.GRID_STEP=t.GRID_STEP??.1,this.OBSTACLE_MARGIN=t.OBSTACLE_MARGIN??.15,this.MAX_ITERATIONS=t.MAX_ITERATIONS??100,this.debug=t.debug??aD.enabled,this.isRemovePathLoopsEnabled=t.isRemovePathLoopsEnabled??!1,this.isShortenPathWithShortcutsEnabled=t.isShortenPathWithShortcutsEnabled??!1,this.debug&&(aD.enabled=!0),aD.enabled&&(this.debugSolutions={},this.debugMessage="")}getNeighbors(t){return[]}isSameNode(t,e){return sD(t,e)<this.GRID_STEP}computeG(t,e){return t.g+sD(t,e)}computeH(t){return sD(t,this.goalPoint)}getNodeName(t){return Rct(t,this.GRID_STEP)}solveOneStep(){this.iterations+=1;const{openSet:t,closedSet:e,GRID_STEP:n,goalPoint:o}=this;t.sort((a,A)=>a.f-A.f);const i=t.shift();if(this.computeH(i)<=n*2)return{solved:!0,current:i,newNeighbors:[]};this.closedSet.add(this.getNodeName(i));let s=[];for(const a of this.getNeighbors(i)){if(e.has(this.getNodeName(a)))continue;const A=this.computeG(i,a),c=this.openSet.find(l=>this.isSameNode(l,a));if(!c||A<c.g){const l=this.computeH(a),u=A+l*this.GREEDY_MULTIPLIER,g={...a,g:A,h:l,f:u,obstacleHit:a.obstacleHit??void 0,manDistFromParent:sD(i,a),nodesInPath:i.nodesInPath+1,parent:i,enterMarginCost:a.enterMarginCost,travelMarginCostFactor:a.travelMarginCostFactor};t.push(g),s.push(g)}}return aD.enabled&&(t.sort((a,A)=>a.f-A.f),this.drawDebugSolution({current:i,newNeighbors:s})),{solved:!1,current:i,newNeighbors:s}}getStartNode(t){return{x:t.pointsToConnect[0].x,y:t.pointsToConnect[0].y,manDistFromParent:0,f:0,g:0,h:0,nodesInPath:0,parent:null}}layerToIndex(t){return 0}indexToLayer(t){return"top"}preprocessConnectionBeforeSolving(t){return t}solveConnection(t){if(t.pointsToConnect.length>2)throw new Error("GeneralizedAstarAutorouter doesn't currently support 2+ points in a connection");t=this.preprocessConnectionBeforeSolving(t);const{pointsToConnect:e}=t;for(this.iterations=0,this.closedSet=new Set,this.startNode=this.getStartNode(t),this.goalPoint={...e[e.length-1],l:this.layerToIndex(e[e.length-1].layer)},this.openSet=[this.startNode];this.iterations<this.MAX_ITERATIONS;){const{solved:n,current:o}=this.solveOneStep();if(n){let i=[],r=o;for(;r;){const s=r.l;i.unshift({x:r.x,y:r.y,layer:s!==void 0?this.indexToLayer(s):e[0].layer}),r=r.parent}return aD.enabled&&(this.debugMessage+=`t${this.debugTraceCount}: ${this.iterations} iterations
`),this.isRemovePathLoopsEnabled&&(i=evn(i)),this.isShortenPathWithShortcutsEnabled&&(i=ovn(i,(s,a)=>{if(s.x===a.x&&s.y===a.y)return!1;const A=this.obstacles.getOrthoDirectionCollisionInfo({x:s.x,y:s.y,l:this.layerToIndex(s.layer)??0},{dx:Math.sign(a.x-s.x),dy:Math.sign(a.y-s.y),dl:0},{margin:.05}),c=Math.sqrt((s.x-a.x)**2+(s.y-a.y)**2);return A.wallDistance<c})),{solved:!0,route:i,connectionName:t.name}}if(this.openSet.length===0)break}return aD.enabled&&(this.debugMessage+=`t${this.debugTraceCount}: ${this.iterations} iterations (failed)
`),{solved:!1,connectionName:t.name}}createObstacleList({dominantLayer:t,connection:e,obstaclesFromTraces:n}){return new Fct(this.allObstacles.filter(o=>!o.connectedTo.includes(e.name)).filter(o=>o.layers.includes(t)).concat(n??[]))}postprocessConnectionSolveResult(t,e){return e}solve(){const t=[],e=[];this.debugTraceCount=0;for(const n of this.input.connections){const o=n.pointsToConnect[0].layer??"top";this.debugTraceCount+=1,this.obstacles=this.createObstacleList({dominantLayer:o,connection:n,obstaclesFromTraces:e});let i=this.solveConnection(n);i=this.postprocessConnectionSolveResult(n,i),t.push(i),aD.enabled&&this.drawDebugTraceObstacles(e),i.solved&&e.push(...kct(i.route.map(r=>({x:r.x,y:r.y,layer:r.layer??o})),n.name))}return t}solveAndMapToTraces(){return this.solve().flatMap(e=>e.solved?[{type:"pcb_trace",pcb_trace_id:`pcb_trace_for_${e.connectionName}`,route:nvn(e.route.map(n=>({route_type:"wire",x:n.x,y:n.y,width:this.input.minTraceWidth,layer:n.layer})))}]:[])}getDebugGroup(){const t=`t${this.debugTraceCount}_iter[${this.iterations-1}]`;return this.iterations<30||this.iterations<100&&this.iterations%10===0||this.iterations<1e3&&this.iterations%100===0||!this.debugSolutions?t:null}drawDebugTraceObstacles(t){const{debugTraceCount:e,debugSolutions:n}=this;for(const o in n)o.startsWith(`t${e}_`)&&n[o].push(...t.map((i,r)=>({type:"pcb_smtpad",pcb_component_id:"",layer:i.layers[0],width:i.width,shape:"rect",x:i.center.x,y:i.center.y,pcb_smtpad_id:`trace_obstacle_${r}`,height:i.height})))}drawDebugSolution({current:t,newNeighbors:e}){const n=this.getDebugGroup();if(!n)return;const{openSet:o,debugTraceCount:i,debugSolutions:r}=this;r[n]??=[];const s=r[n];s.push({type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:`debug_note_${t.x}_${t.y}`,font:"tscircuit2024",font_size:.25,text:"X"+(t.l!==void 0?t.l:""),pcb_component_id:"",layer:"top",anchor_position:{x:t.x,y:t.y},anchor_alignment:"center"});for(let a=0;a<o.length;a++){const A=o[a];s.push({type:"pcb_fabrication_note_path",pcb_component_id:"",pcb_fabrication_note_path_id:`note_path_${A.x}_${A.y}`,layer:"top",route:[[0,.05],[.05,0],[0,-.05],[-.05,0],[0,.05]].map(([c,l])=>({x:A.x+c,y:A.y+l})),stroke_width:.01}),s.push({type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:`debug_note_${A.x}_${A.y}`,font:"tscircuit2024",font_size:.03,text:a.toString(),pcb_component_id:"",layer:"top",anchor_position:{x:A.x,y:A.y},anchor_alignment:"center"})}if(t.parent){const a=[];let A=t;for(;A;)a.unshift(A),A=A.parent;s.push({type:"pcb_fabrication_note_path",pcb_component_id:"",pcb_fabrication_note_path_id:`note_path_${t.x}_${t.y}`,layer:"top",route:a,stroke_width:.01})}}},ivn=vc("autorouting-dataset:infinite-grid-ijump-astar:get-distance-to-overcome-obstacle");function Dxe({node:t,travelDir:e,wallDir:n,obstacle:o,obstacles:i,obstaclesInRow:r=0,OBSTACLE_MARGIN:s=.15,SHOULD_DETECT_CONJOINED_OBSTACLES:a=!1,MAX_CONJOINED_OBSTACLES:A=20}){let c;if(e.dx===0?e.dy>0?c=o.center.y+o.height/2-t.y:c=t.y-(o.center.y-o.height/2):e.dx>0?c=o.center.x+o.width/2-t.x:c=t.x-(o.center.x-o.width/2),c+=s,a&&r<A){const l=i.getObstacleAt(t.x+e.dx*c+n.dx*(n.wallDistance+.001),t.y+e.dy*c+n.dy*(n.wallDistance+.001));if(l===o)return c;if(l&&l.type==="rect"){const u=e.dy===0,g=u?o.height:o.width;if((u?l.height:l.width)>g)return ivn("next obstacle on path is bigger, not trying to overcome it"),c;const d=Dxe({node:{x:t.x+e.dx*c,y:t.y+e.dy*c},travelDir:e,wallDir:n,obstacle:l,obstacles:i,obstaclesInRow:r+1,SHOULD_DETECT_CONJOINED_OBSTACLES:a,MAX_CONJOINED_OBSTACLES:A,OBSTACLE_MARGIN:s});c+=d}}return c}var rvn=class extends Hct{MAX_ITERATIONS=200;getNeighbors(t){const e=this.obstacles,n=this.goalPoint;let o;t.parent?o=Dct(t.parent,t):o=Dct(t,n);const i=[{dx:0,dy:1},{dx:1,dy:0},{dx:0,dy:-1},{dx:-1,dy:0}].filter(s=>s.dx===o.dx*-1&&s.dy===o.dy*-1?!1:!(s.dx===o.dx&&s.dy===o.dy&&t.parent?.obstacleHit)).map(s=>e.getOrthoDirectionCollisionInfo(t,s,{margin:this.OBSTACLE_MARGIN})).filter(s=>s.wallDistance>=this.OBSTACLE_MARGIN),r=[];for(const s of i){let a=null;t?.obstacleHit&&(a=Dxe({node:t,travelDir:s,wallDir:{...o,wallDistance:this.OBSTACLE_MARGIN},obstacle:t.obstacleHit,obstacles:e,OBSTACLE_MARGIN:this.OBSTACLE_MARGIN,SHOULD_DETECT_CONJOINED_OBSTACLES:!0}));const A=Nct(t,n,s),c=(s.dx===0||Math.sign(n.x-t.x)===s.dx)&&(s.dy===0||Math.sign(n.y-t.y)===s.dy);A<s.wallDistance&&A>0&&c?r.push({...s,travelDistance:A}):a!==null&&a<s.wallDistance?r.push({...s,travelDistance:a}):s.wallDistance!==1/0&&r.push({...s,travelDistance:s.wallDistance-this.OBSTACLE_MARGIN})}return r.filter(s=>!e.isObstacleAt(t.x+s.dx*s.travelDistance,t.y+s.dy*s.travelDistance)).map(s=>({x:t.x+s.dx*s.travelDistance,y:t.y+s.dy*s.travelDistance,obstacleHit:s.obstacle}))}};function svn(t,e=4){const{center:n,width:o,height:i,rotation:r}=t,s=[],a=r*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=(r%360+360)%360;if(i<=o?l>=45&&l<135||l>=225&&l<315:l>=135&&l<225||l>=315||l<45){const g=o/e;for(let h=0;h<e;h++){const d=(h-e/2+.5)*g,p=-d*A,m=-d*c,_=g*1.1,f=Math.abs(i*A)+Math.abs(g*c);s.push({center:{x:n.x+p,y:n.y+m},width:_,height:f})}}else{const g=i/e;for(let h=0;h<e;h++){const d=(h-e/2+.5)*g,p=-d*c,m=d*A,_=Math.abs(o*A)+Math.abs(g*c),f=g*1.1;s.push({center:{x:n.x+p,y:n.y+m},width:_,height:f})}}return s}var Xne=["top","inner1","inner2","bottom"],Oct=(t,e)=>{const n=i=>e?i.concat(i.map(r=>e?.getNetConnectedToId(r)).filter(Boolean)):i,o=[];for(const i of t)if(i.type==="pcb_smtpad"){if(i.shape==="circle")o.push({type:"oval",layers:[i.layer],center:{x:i.x,y:i.y},width:i.radius*2,height:i.radius*2,connectedTo:n([i.pcb_smtpad_id])});else if(i.shape==="rect")o.push({type:"rect",layers:[i.layer],center:{x:i.x,y:i.y},width:i.width,height:i.height,connectedTo:n([i.pcb_smtpad_id])});else if(i.shape==="rotated_rect"){const r={center:{x:i.x,y:i.y},width:i.width,height:i.height,rotation:i.ccw_rotation},s=svn(r);for(const a of s)o.push({type:"rect",layers:[i.layer],center:a.center,width:a.width,height:a.height,connectedTo:n([i.pcb_smtpad_id])})}}else if(i.type==="pcb_keepout")i.shape==="circle"?o.push({type:"oval",layers:i.layers,center:{x:i.center.x,y:i.center.y},width:i.radius*2,height:i.radius*2,connectedTo:[]}):i.shape==="rect"&&o.push({type:"rect",layers:i.layers,center:{x:i.center.x,y:i.center.y},width:i.width,height:i.height,connectedTo:[]});else if(i.type==="pcb_hole")i.hole_shape==="oval"?o.push({type:"oval",center:{x:i.x,y:i.y},width:i.hole_width,height:i.hole_height,connectedTo:[]}):i.hole_shape==="square"?o.push({type:"rect",layers:Xne,center:{x:i.x,y:i.y},width:i.hole_diameter,height:i.hole_diameter,connectedTo:[]}):(i.hole_shape==="round"||i.hole_shape==="circle")&&o.push({type:"rect",layers:Xne,center:{x:i.x,y:i.y},width:i.hole_diameter,height:i.hole_diameter,connectedTo:[]});else if(i.type==="pcb_plated_hole")i.shape==="circle"?o.push({type:"oval",layers:Xne,center:{x:i.x,y:i.y},width:i.outer_diameter,height:i.outer_diameter,connectedTo:n([i.pcb_plated_hole_id])}):(i.shape==="oval"||i.shape==="pill")&&o.push({type:"oval",layers:Xne,center:{x:i.x,y:i.y},width:i.outer_width,height:i.outer_height,connectedTo:n([i.pcb_plated_hole_id])});else if(i.type==="pcb_trace"){const r=kct(i.route.map(s=>({x:s.x,y:s.y,layer:"layer"in s?s.layer:s.from_layer})),i.source_trace_id);o.push(...r)}else i.type==="pcb_via"&&o.push({type:"rect",layers:i.layers,center:{x:i.x,y:i.y},connectedTo:[],width:i.outer_diameter,height:i.outer_diameter});return o};function Gct(t){const{pcbConnMap:e,goalElementId:n}=t;if(!n.startsWith("pcb_port_"))throw new Error(`Currently alternative goal boxes must have a goal id with prefix "pcb_port_" (got ${n})`);const o=e.getAllTracesConnectedToPort(n);return Oct(o).map(i=>({...i,connectedTo:[n]}))}var Yct=t=>{let{connection:e,pcbConnMap:n}=t;if(e.pointsToConnect.length!==2)throw new Error(`Connection must have exactly 2 points for alternative goal boxes (got ${e.pointsToConnect.length})`);const[o,i]=e.pointsToConnect;if(!o.pcb_port_id||!i.pcb_port_id)throw new Error(`Connection points must have pcb_port_id for alternative goal box calculation (got ${o.pcb_port_id} and ${i.pcb_port_id})`);const r=Gct({goalElementId:o.pcb_port_id,pcbConnMap:n}).concat([{center:o,width:.01,height:.01,connectedTo:[o.pcb_port_id],layers:[o.layer],type:"rect"}]),s=Gct({goalElementId:i.pcb_port_id,pcbConnMap:n}).concat([{center:i,width:.01,height:.01,connectedTo:[i.pcb_port_id],layers:[i.layer],type:"rect"}]);if(r.length<=1&&s.length<=1)return{...e,startPoint:o,endPoint:i,goalBoxes:[]};const a=CQn(r,s);let A,c,l;return r.length>=s.length?(A={...i,...a.pointB},c={...o,...a.pointA},l=r):(A={...o,...a.pointA},c={...i,...a.pointB},l=s),{startPoint:A,endPoint:c,goalBoxes:l,name:e.name,pointsToConnect:[A,c]}},avn=(t,e={})=>{const n={minTraceWidth:.1};n.layerCount=e.layerCount??1,n.obstacles=Oct(t,e.connMap),n.connections=[];for(const i of t)if(i.type==="source_trace"){if(t.some(a=>a.type==="pcb_trace"&&a.source_trace_id===i.source_trace_id))continue;let s={name:i.source_trace_id,pointsToConnect:i.connected_source_port_ids.map(a=>{const A=O3(t).pcb_port.getWhere({source_port_id:a});if(!A)throw new Error(`Could not find pcb_port for source_port_id "${a}"`);return{x:A.x,y:A.y,layer:A.layers?.[0]??"top",pcb_port_id:A.pcb_port_id}})};if(e.optimizeWithGoalBoxes){const a=new qne(t);s=Yct({connection:s,pcbConnMap:a})}n.connections.push(s),Avn(n.obstacles,s.pointsToConnect,s.name)}const o={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(const i of n.obstacles)o.minX=Math.min(o.minX,i.center.x-i.width/2),o.maxX=Math.max(o.maxX,i.center.x+i.width/2),o.minY=Math.min(o.minY,i.center.y-i.height/2),o.maxY=Math.max(o.maxY,i.center.y+i.height/2);for(const i of n.connections)for(const r of i.pointsToConnect)o.minX=Math.min(o.minX,r.x),o.maxX=Math.max(o.maxX,r.x),o.minY=Math.min(o.minY,r.y),o.maxY=Math.max(o.maxY,r.y);return n.bounds=o,n},Avn=(t,e,n)=>{for(const o of e)for(const i of t)cvn(o,i)&&i.connectedTo.push(n)};function cvn(t,e){const n=e.width/2,o=e.height/2;if(e.type==="rect")return t.x>=e.center.x-n&&t.x<=e.center.x+n&&t.y>=e.center.y-o&&t.y<=e.center.y+o;if(e.type==="oval"){const i=(t.x-e.center.x)/n,r=(t.y-e.center.y)/o;return i*i+r*r<=1}return!1}function Uct(t,e){const n=e.x>t.x?1:e.x<t.x?-1:0,o=e.y>t.y?1:e.y<t.y?-1:0,i=e.l>t.l?1:e.l<t.l?-1:0;return{dx:n,dy:o,dl:i}}var Nxe={1:["top"],2:["top","bottom"],4:["top","inner1","inner2","bottom"]},lvn=t=>Nxe[t];function Kct(t,e){const o=Nxe[t].indexOf(e);if(o===-1)throw new Error(`Invalid layer for getLayerIndex (for layerCount === ${t}): "${e}"`);return o}function uvn(t,e){const o=Nxe[t][e];if(!o)throw new Error(`Invalid index for indexToLayer (for layerCount === ${t}): "${e}"`);return o}var gvn=class extends Fct{obstacles;GRID_STEP=.1;layerCount;constructor(t,e){super([]),this.layerCount=t;const n=lvn(t);this.obstacles=e.flatMap(o=>o.layers.filter(i=>n.includes(i)).map(i=>({...o,left:o.center.x-o.width/2,right:o.center.x+o.width/2,top:o.center.y+o.height/2,bottom:o.center.y-o.height/2,l:Kct(t,i)})))}getObstacleAt(t,e,n,o){o??=this.GRID_STEP;for(const i of this.obstacles){if(i.l!==n)continue;const r=i.width/2+o,s=i.height/2+o;if(t>=i.center.x-r&&t<=i.center.x+r&&e>=i.center.y-s&&e<=i.center.y+s)return i}return null}isObstacleAt(t,e,n,o){return this.getObstacleAt(t,e,n,o)!==null}getDirectionDistancesToNearestObstacle3d(t,e,n){const{GRID_STEP:o}=this,i={left:1/0,top:1/0,bottom:1/0,right:1/0};for(const r of this.obstacles)if(r.l===n&&r.type==="rect"){const s=r.center.x-r.width/2-o,a=r.center.x+r.width/2+o,A=r.center.y+r.height/2+o,c=r.center.y-r.height/2-o;e>=c&&e<=A&&t>s&&(i.left=Math.min(i.left,t-a)),e>=c&&e<=A&&t<a&&(i.right=Math.min(i.right,s-t)),t>=s&&t<=a&&e<A&&(i.top=Math.min(i.top,c-e)),t>=s&&t<=a&&e>c&&(i.bottom=Math.min(i.bottom,e-A))}return i}getOrthoDirectionCollisionInfo(t,e,{margin:n=0}={}){const{x:o,y:i,l:r}=t,{dx:s,dy:a,dl:A}=e;let c=1/0,l=null;if(A!==0){const u=r+A;return this.isObstacleAt(o,i,u,n)?(c=1,l=this.getObstacleAt(o,i,u,n)):c=1,{dx:s,dy:a,dl:A,wallDistance:c,obstacle:l}}else{for(const u of this.obstacles){if(u.l!==r)continue;const g=u.left-n,h=u.right+n,d=u.top+n,p=u.bottom-n;let m=null;s===1&&a===0?i>p&&i<d&&o<u.left&&(m=u.left-o):s===-1&&a===0?i>p&&i<d&&o>u.right&&(m=o-u.right):s===0&&a===1?o>g&&o<h&&i<u.bottom&&(m=u.bottom-i):s===0&&a===-1&&o>g&&o<h&&i>u.top&&(m=i-u.top),m!==null&&m<c&&(c=m,l=u)}return{dx:s,dy:a,dl:0,wallDistance:c,obstacle:l}}}getObstaclesOverlappingRegion(t){const e=[];for(const n of this.obstacles){if(n.l!==t.l)continue;const{left:o,right:i,top:r,bottom:s}=n;o<=t.maxX&&i>=t.minX&&r>=t.minY&&s<=t.maxY&&e.push(n)}return e}},Vct=class extends Hct{MAX_ITERATIONS=500;VIA_COST=4;VIA_DIAMETER=.5;allowLayerChange=!0;layerCount;obstacles;optimizeWithGoalBoxes;connMap;pcbConnMap;GOAL_RUSH_FACTOR=1.1;defaultGoalViaMargin=.5;marginsWithCosts;get largestMargin(){return this.marginsWithCosts[0].margin}constructor(t){super(t),this.layerCount=t.input.layerCount??2,this.MAX_ITERATIONS=t.MAX_ITERATIONS??this.MAX_ITERATIONS,this.VIA_COST=t.VIA_COST??this.VIA_COST,this.connMap=t.connMap,this.pcbConnMap=t.pcbConnMap??new qne,this.optimizeWithGoalBoxes=t.optimizeWithGoalBoxes??!1,this.obstacles=null,this.marginsWithCosts=t.marginsWithCosts??[{margin:1,enterCost:0,travelCostFactor:1},{margin:this.OBSTACLE_MARGIN,enterCost:10,travelCostFactor:2}]}preprocessConnectionBeforeSolving(t){return this.optimizeWithGoalBoxes?Yct({connection:t,pcbConnMap:this.pcbConnMap}):t}postprocessConnectionSolveResult(t,e){if(!e.solved)return e;if(this.optimizeWithGoalBoxes){const n=e.route.map(o=>({x:o.x,y:o.y,route_type:"wire",layer:o.layer,width:this.input.minTraceWidth}));n[0].start_pcb_port_id=t.pointsToConnect[0].pcb_port_id,n[n.length-1].end_pcb_port_id=t.pointsToConnect[1].pcb_port_id,this.pcbConnMap.addTrace({type:"pcb_trace",pcb_trace_id:`postprocess_trace_${ZQn(8)}`,route:n})}return e}createObstacleList({dominantLayer:t,connection:e,obstaclesFromTraces:n}){const o=this.connMap?this.connMap.getNetConnectedToId(e.name):e.name;if(!o)throw new Error(`The connection.name "${e.name}" wasn't present in the full connectivity map`);return new gvn(this.layerCount,this.allObstacles.filter(i=>!i.connectedTo.includes(o)).concat(n??[]))}computeG(t,e){let n=t.g+sD(t,e)*(t.travelMarginCostFactor??1)+(e.enterMarginCost??0);return(e.l??t.l!==-1??-1)&&(n+=this.VIA_COST),n}computeH(t){const e=Math.abs(t.x-this.goalPoint.x),n=Math.abs(t.y-this.goalPoint.y),o=Math.abs(t.l-this.goalPoint.l);return(e+n)**this.GOAL_RUSH_FACTOR+o*this.VIA_COST}getStartNode(t){return{...super.getStartNode(t),l:this.layerToIndex(t.pointsToConnect[0].layer)}}layerToIndex(t){return Kct(this.layerCount,t)}indexToLayer(t){return uvn(this.layerCount,t)}getNodeName(t){return`${Rct(t,this.GRID_STEP)}-${t.l??0}`}hasSpaceForVia(t,e){return t.every(n=>this.obstacles.getObstaclesOverlappingRegion({minX:e.x-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,minY:e.y-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,maxX:e.x+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,maxY:e.y+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,l:n}).length===0)}getNeighborsSurroundingGoal(t){this.obstacles;const e=this.goalPoint,n=[],o=[{dx:1,dy:0,dl:0},{dx:-1,dy:0,dl:0},{dx:0,dy:1,dl:0},{dx:0,dy:-1,dl:0}],i=this.VIA_DIAMETER+this.OBSTACLE_MARGIN+this.defaultGoalViaMargin;for(const r of o){const s={x:t.x+r.dx*i,y:t.y+r.dy*i,l:t.l+r.dl,obstacleHit:null};this.hasSpaceForVia([t.l,e.l],s)&&n.push(s)}return n}getNeighbors(t){const e=this.obstacles,n=this.goalPoint,o=sD(t,n);if(o<=this.OBSTACLE_MARGIN)return this.getNeighborsSurroundingGoal(t);let i;t.parent?i=Uct(t.parent,t):i=Uct(t,n);const r=[{dx:0,dy:1,dl:0},{dx:1,dy:0,dl:0},{dx:0,dy:-1,dl:0},{dx:-1,dy:0,dl:0}],s=o>this.VIA_DIAMETER+this.OBSTACLE_MARGIN,a=sD(t,this.startNode)>this.VIA_DIAMETER+this.OBSTACLE_MARGIN;this.allowLayerChange&&s&&a&&(t.l<this.layerCount-1&&r.push({dx:0,dy:0,dl:1}),t.l>0&&r.push({dx:0,dy:0,dl:-1}));const A=r.filter(l=>l.dx===i.dx*-1&&l.dy===i.dy*-1&&l.dl===i.dl*-1?!1:!(l.dx===i.dx&&l.dy===i.dy&&l.dl===i.dl&&t.parent?.obstacleHit)).map(l=>e.getOrthoDirectionCollisionInfo(t,l,{margin:this.OBSTACLE_MARGIN})).filter(l=>!(l.wallDistance<this.OBSTACLE_MARGIN)),c=[];for(const l of A){const u=l.dx===0&&l.dy===0&&l.dl===1,g=l.dx===0&&l.dy===0&&l.dl===-1;if((u||g)&&![t.l,t.l+l.dl].every(_=>e.getObstaclesOverlappingRegion({minX:t.x-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,minY:t.y-this.VIA_DIAMETER/2-this.OBSTACLE_MARGIN,maxX:t.x+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,maxY:t.y+this.VIA_DIAMETER/2+this.OBSTACLE_MARGIN,l:_}).length===0))continue;if(u){t.l<this.layerCount-1&&c.push({...l,travelDistance:0,enterMarginCost:0,travelMarginCostFactor:1});continue}if(g){t.l>0&&c.push({...l,travelDistance:0,enterMarginCost:0,travelMarginCostFactor:1});continue}let h=null;t?.obstacleHit&&(h=Dxe({node:t,travelDir:l,wallDir:{...i,wallDistance:this.OBSTACLE_MARGIN},obstacle:t.obstacleHit,obstacles:e,OBSTACLE_MARGIN:this.OBSTACLE_MARGIN,SHOULD_DETECT_CONJOINED_OBSTACLES:!0}));const d=Nct(t,n,l),p=(l.dx===0||Math.sign(n.x-t.x)===l.dx)&&(l.dy===0||Math.sign(n.y-t.y)===l.dy);if(d<l.wallDistance&&d>0&&p){const m=t.l===n.l;let _=0;!m&&Math.abs(d-o)<this.GRID_STEP&&(_=this.VIA_DIAMETER+this.OBSTACLE_MARGIN+this.defaultGoalViaMargin),c.push({...l,travelDistance:d-_,enterMarginCost:0,travelMarginCostFactor:1})}else if(h!==null&&h<l.wallDistance){for(const{margin:m,enterCost:_,travelCostFactor:f}of this.marginsWithCosts)h-this.OBSTACLE_MARGIN+m*2<l.wallDistance&&c.push({...l,travelDistance:h-this.OBSTACLE_MARGIN+m,enterMarginCost:_,travelMarginCostFactor:f});if(l.wallDistance===1/0)c.push({...l,travelDistance:d,enterMarginCost:0,travelMarginCostFactor:1});else if(l.wallDistance>this.largestMargin)for(const{margin:m,enterCost:_,travelCostFactor:f}of this.marginsWithCosts)l.wallDistance>this.largestMargin+m&&c.push({...l,travelDistance:l.wallDistance-m,enterMarginCost:_,travelMarginCostFactor:f})}else if(l.wallDistance!==1/0)for(const{margin:m,enterCost:_,travelCostFactor:f}of this.marginsWithCosts)l.wallDistance>m&&c.push({...l,travelDistance:l.wallDistance-m,enterMarginCost:_,travelMarginCostFactor:f})}return c.map(l=>({x:t.x+l.dx*l.travelDistance,y:t.y+l.dy*l.travelDistance,l:t.l+l.dl,obstacleHit:l.obstacle,travelMarginCostFactor:l.travelMarginCostFactor,enterMarginCost:l.enterMarginCost}))}};function dvn(t){const e=avn(t),n=new rvn({input:e});return{solution:n.solveAndMapToTraces(),debugSolutions:n.debugSolutions,debugMessage:n.debugMessage}}var ee=L3();const Fs=_y(ee),Q5=ax({__proto__:null,default:Fs},[ee]);var hvn=Kn(["up","down","left","right"]);Kn(["top-to-bottom","left-to-right","bottom-to-top","right-to-left"]);var pvn=Z().regex(/^calc\(.*\)$/),Po=lt,Vm=pvn.or(lt),zct=Pt({shape:$e("pill"),width:Po,height:Po}),Jct=Pt({shape:$e("rect"),width:Po,height:Po}),Wct=Pt({shape:$e("circle"),radius:Po});Iy("shape",[zct,Jct,Wct]);var mvn=Pt({name:Z().optional()}),Rxe=t=>Z().refine(e=>e.trim().length>0,{message:`${t} cannot be empty`}),jct=t=>Po.refine(e=>Number.isFinite(e)&&e>0,{message:`${t} must be a positive finite distance`});Pt({name:Rxe("name"),connectsTo:Rxe("connectsTo"),width:jct("width").optional(),height:jct("height").optional(),cadModel:Rxe("cadModel").optional()}).superRefine((t,e)=>{const n=t.width!==void 0,o=t.height!==void 0;if(n!==o){e.addIssue({code:lo.custom,message:"width and height must be provided together",path:n?["height"]:["width"]});return}!n&&t.cadModel===void 0&&e.addIssue({code:lo.custom,message:"provide either width and height or cadModel",path:[]})});var _vn=Pt({margin:Po.optional(),widthDimensionOffset:Po.optional(),heightDimensionOffset:Po.optional(),depth:Po.optional()}),Txe=_vn.shape,fvn=Iy("shape",[zct.extend(Txe),Jct.extend(Txe),Wct.extend(Txe)]),Ivn=Pt({name:Z().optional(),boardRef:Z().min(1),width:Po.optional(),height:Po.optional(),depth:Po.optional(),wallThickness:Po.default("2mm"),floorThickness:Po.optional(),lidThickness:Po.optional(),boardClearance:Po.optional(),standoffHeight:Po.optional(),topHeadroom:Po.optional(),lidLipDepth:Po.optional(),disableCutouts:je().optional(),showHiddenEdges:je().optional()}),v5=dn(Z().or(_t())),L9=Pt({x:lt,y:lt,z:lt}),G_=crt(t=>t&&typeof t=="object"&&"default"in t?t.default:t,Z()),Cvn=Pt({x:xo([_t(),Z()]),y:xo([_t(),Z()]),z:xo([_t(),Z()])}),yvn=["x+","x-","y+","y-","z+","z-"],xvn=Kn(yvn),PQ=Pt({rotationOffset:_t().or(Cvn).optional(),positionOffset:L9.optional(),modelOriginPosition:L9.optional(),modelBounds:Pt({min:L9,max:L9}).optional(),size:L9.optional(),modelUnitToMmScale:Po.optional(),modelBoardNormalDirection:xvn.optional(),pcbRotationOffset:_t().optional(),zOffsetFromSurface:Po.optional(),showAsTranslucentModel:je().optional(),stepUrl:G_.optional()}),Evn=PQ.extend({stlUrl:G_}),Bvn=PQ.extend({objUrl:G_,mtlUrl:G_.optional()}),bvn=PQ.extend({gltfUrl:G_}),Svn=PQ.extend({glbUrl:G_}),Qvn=PQ.extend({stepUrl:G_}),vvn=PQ.extend({wrlUrl:G_}),wvn=PQ.extend({jscad:Qc(rd())}),kxe=xo([Art(),Z().min(1),P0(t=>t&&typeof t=="object"&&"type"in t&&"props"in t),Evn,Bvn,bvn,Svn,Qvn,vvn,wvn]),Fxe=P0(t=>!0),By=Pt({x:lt,y:lt}),Lxe=By.extend({rotation:oA.optional()}),$ct=Pt({size:By.optional(),thickness:lt.optional()}),Pvn=Pt({font:$ct.optional()}),Zne=Pt({value:Z(),at:Lxe.optional(),layer:Z().optional(),uuid:Z().optional(),hide:je().optional(),effects:Pvn.optional()}),Mvn=Pt({Reference:Zne.optional(),Value:Zne.optional(),Datasheet:Zne.optional(),Description:Zne.optional()}),Dvn=Pt({through_hole:je().optional(),smd:je().optional(),exclude_from_pos_files:je().optional(),exclude_from_bom:je().optional()}),Nvn=Pt({name:Z(),type:Z(),shape:Z().optional(),at:Lxe.optional(),size:By.optional(),drill:lt.optional(),layers:dn(Z()).optional(),removeUnusedLayers:je().optional(),uuid:Z().optional()}),Rvn=Pt({path:Z(),offset:L9.optional(),scale:L9.optional(),rotate:L9.optional()}),Tvn=Pt({footprintName:Z().optional(),version:xo([_t(),Z()]).optional(),generator:Z().optional(),generatorVersion:xo([_t(),Z()]).optional(),layer:Z().optional(),properties:Mvn.optional(),attributes:Dvn.optional(),pads:dn(Nvn).optional(),embeddedFonts:je().optional(),model:Rvn.optional()}),kvn=Pt({hide:je().optional()}),Fvn=Pt({offset:lt.optional(),hide:je().optional()}),Lvn=Pt({font:$ct.optional(),justify:xo([Z(),dn(Z())]).optional(),hide:je().optional()}),AD=Pt({value:Z(),id:xo([_t(),Z()]).optional(),at:Lxe.optional(),effects:Lvn.optional()}),Hvn=Pt({Reference:AD.optional(),Value:AD.optional(),Footprint:AD.optional(),Datasheet:AD.optional(),Description:AD.optional(),ki_keywords:AD.optional(),ki_fp_filters:AD.optional()}),Ovn=Pt({symbolName:Z().optional(),extends:Z().optional(),pinNumbers:kvn.optional(),pinNames:Fvn.optional(),excludeFromSim:je().optional(),inBom:je().optional(),onBoard:je().optional(),properties:Hvn.optional(),embeddedFonts:je().optional()}),Hxe=Pt({silkscreenFontSize:lt.optional(),viaPadDiameter:lt.optional(),viaHoleDiameter:lt.optional(),silkscreenTextPosition:xo([Kn(["centered","outside","none"]),Pt({offsetX:_t(),offsetY:_t()})]).optional(),silkscreenTextVisibility:Kn(["hidden","visible","inherit"]).optional()}),Gvn=Pt({fontSize:ce.optional(),pcbX:Vm.optional(),pcbY:Vm.optional(),visibility:Kn(["hidden","visible","inherit"]).optional()}),qct=Qc(Z(),Gvn),Oxe=Kn(["i2c_sda","i2c_scl","spi_cs","spi_sck","spi_mosi","spi_miso","uart_tx","uart_rx"]),Yvn=Pt({isInput:je().optional(),isOutput:je().optional(),isBidirectional:je().optional(),isPassive:je().optional(),canUseTriState:je().optional(),isUsingTriState:je().optional(),canUseOpenCollector:je().optional(),isUsingOpenCollector:je().optional(),canUseOpenEmitter:je().optional(),isUsingOpenEmitter:je().optional(),capabilities:dn(Oxe).optional(),activeCapabilities:dn(Oxe).optional(),activeCapability:Oxe.optional(),providesPower:je().optional(),requiresPower:je().optional(),providesGround:je().optional(),requiresGround:je().optional(),providesVoltage:xo([Z(),_t()]).optional(),requiresVoltage:xo([Z(),_t()]).optional(),doNotConnect:je().optional(),includeInBoardPinout:je().optional(),highlightColor:Z().optional(),mustBeConnected:je().optional(),canUseInternalPullup:je().optional(),isUsingInternalPullup:je().optional(),needsExternalPullup:je().optional(),canUseInternalPulldown:je().optional(),isUsingInternalPulldown:je().optional(),needsExternalPulldown:je().optional(),canUseOpenDrain:je().optional(),isUsingOpenDrain:je().optional(),canUsePushPull:je().optional(),isUsingPushPull:je().optional(),shouldHaveDecouplingCapacitor:je().optional(),recommendedDecouplingCapacitorCapacitance:xo([Z(),_t()]).optional(),isGpio:je().optional()}),Uvn=Pt({defaultPassiveSize:xo([Kn(["xs","sm","md"]),lt]).optional(),defaultCapacitorOrientation:Kn(["vertical","none"]).optional()}),Kvn=P0(t=>!0),qa=Pt({pcbX:Vm.optional(),pcbY:Vm.optional(),pcbLeftEdgeX:Vm.optional(),pcbRightEdgeX:Vm.optional(),pcbTopEdgeY:Vm.optional(),pcbBottomEdgeY:Vm.optional(),pcbOffsetX:lt.optional(),pcbOffsetY:lt.optional(),pcbRotation:oA.optional(),pcbPositionAnchor:Z().optional(),pcbPositionMode:Kn(["relative_to_group_anchor","auto","relative_to_board_anchor","relative_to_component_anchor"]).optional(),shouldBeOnEdgeOfBoard:je().optional(),layer:Pr.optional(),pcbMarginTop:lt.optional(),pcbMarginRight:lt.optional(),pcbMarginBottom:lt.optional(),pcbMarginLeft:lt.optional(),pcbMarginX:lt.optional(),pcbMarginY:lt.optional(),pcbStyle:Hxe.optional(),pcbSx:qct.optional(),pcbRelative:je().optional(),relative:je().optional()}),eoe=Pt({pcbX:Vm.optional(),pcbY:Vm.optional(),pcbLeftEdgeX:Vm.optional(),pcbRightEdgeX:Vm.optional(),pcbTopEdgeY:Vm.optional(),pcbBottomEdgeY:Vm.optional(),pcbOffsetX:lt.optional(),pcbOffsetY:lt.optional(),pcbRotation:oA.optional(),pcbPositionAnchor:Z().optional(),pcbPositionMode:Kn(["relative_to_group_anchor","auto","relative_to_board_anchor","relative_to_component_anchor"]).optional(),shouldBeOnEdgeOfBoard:je().optional(),pcbMarginTop:lt.optional(),pcbMarginRight:lt.optional(),pcbMarginBottom:lt.optional(),pcbMarginLeft:lt.optional(),pcbMarginX:lt.optional(),pcbMarginY:lt.optional(),pcbStyle:Hxe.optional(),pcbSx:qct.optional(),schMarginTop:lt.optional(),schMarginRight:lt.optional(),schMarginBottom:lt.optional(),schMarginLeft:lt.optional(),schMarginX:lt.optional(),schMarginY:lt.optional(),schX:lt.optional(),schY:lt.optional(),schRotation:oA.optional(),layer:Pr.optional(),footprint:Fxe.optional(),symbol:Kvn.optional(),schStyle:Uvn.optional(),relative:je().optional(),schRelative:je().optional(),pcbRelative:je().optional()}),Gxe=Pt({supplierPartNumbers:Qc(qM,dn(Z())).optional()}),vg=eoe.merge(Gxe).extend({key:rd().optional(),name:Z(),displayName:Z().optional(),schSectionName:Z().optional().describe('This component will be drawn as part of this section e.g. "Power"'),schSheetName:Z().optional().describe('This component will be drawn as part of this sheet e.g. "Main"'),datasheetUrl:G_.optional(),cadModel:kxe.optional(),kicadFootprintMetadata:Tvn.optional(),kicadSymbolMetadata:Ovn.optional(),children:rd().optional(),symbolName:Z().optional(),doNotPlace:je().optional(),allowOffBoard:je().optional().describe("Allows the PCB component to hang off the board (e.g. for USB ports or displays)"),obstructsWithinBounds:je().optional().describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"),showAsTranslucentModel:je().optional().describe("Whether to show this component's CAD model as translucent in the 3D viewer."),pinAttributes:Qc(Z(),Yvn).optional(),mfn:Z().describe("Manufacturer Part Number").optional(),manufacturerPartNumber:Z().optional()}),Vvn=["pin1","left","pin2","right"],Yxe=["pin1","left","anode","pos","pin2","right","cathode","neg"];lt.or(Kn(["2x","3x","4x"]));var zvn=By.extend({via:je().optional(),fromLayer:Pr.optional(),toLayer:Pr.optional()}),Jvn=zvn.superRefine((t,e)=>{t.via?t.toLayer||e.addIssue({code:lo.custom,message:"toLayer is required when via is true",path:["toLayer"]}):(t.fromLayer||t.toLayer)&&e.addIssue({code:lo.custom,message:"fromLayer/toLayer are only allowed when via is true",path:["via"]})}),Uxe=dn(xo([Jvn,Z()])),Wvn=["Audio_Module/Reverb_BTDR-1H","Audio_Module/Reverb_BTDR-1V","Battery/BatteryClip_Keystone_54_D16-19mm","Battery/BatteryHolder_Bulgin_BX0034_1xAAA","Battery/BatteryHolder_Bulgin_BX0036_1xC","Battery/BatteryHolder_Bulgin_BX0123_1xCR123","Battery/BatteryHolder_ComfortableElectronic_CH273-2450_1x2450","Battery/BatteryHolder_Eagle_12BH611-GR","Battery/BatteryHolder_Keystone_103_1x20mm","Battery/BatteryHolder_Keystone_1042_1x18650","Battery/BatteryHolder_Keystone_104_1x23mm","Battery/BatteryHolder_Keystone_1057_1x2032","Battery/BatteryHolder_Keystone_1058_1x2032","Battery/BatteryHolder_Keystone_105_1x2430","Battery/BatteryHolder_Keystone_1060_1x2032","Battery/BatteryHolder_Keystone_106_1x20mm","Battery/BatteryHolder_Keystone_107_1x23mm","Battery/BatteryHolder_Keystone_2460_1xAA","Battery/BatteryHolder_Keystone_2462_2xAA","Battery/BatteryHolder_Keystone_2466_1xAAA","Battery/BatteryHolder_Keystone_2468_2xAAA","Battery/BatteryHolder_Keystone_2479_3xAAA","Battery/BatteryHolder_Keystone_2993","Battery/BatteryHolder_Keystone_2998_1x6.8mm","Battery/BatteryHolder_Keystone_3000_1x12mm","Battery/BatteryHolder_Keystone_3001_1x12mm","Battery/BatteryHolder_Keystone_3002_1x2032","Battery/BatteryHolder_Keystone_3008_1x2450","Battery/BatteryHolder_Keystone_3009_1x2450","Battery/BatteryHolder_Keystone_3034_1x20mm","Battery/BatteryHolder_Keystone_500","Battery/BatteryHolder_Keystone_590","Battery/BatteryHolder_LINX_BAT-HLD-012-SMT","Battery/BatteryHolder_MPD_BA9VPC_1xPP3","Battery/BatteryHolder_MPD_BC12AAPC_2xAA","Battery/BatteryHolder_MPD_BC2003_1x2032","Battery/BatteryHolder_MPD_BC2AAPC_2xAA","Battery/BatteryHolder_MPD_BH-18650-PC","Battery/BatteryHolder_MPD_BK-18650-PC2","Battery/BatteryHolder_MYOUNG_BS-07-A1BJ001_CR2032","Battery/BatteryHolder_Multicomp_BC-2001_1x2032","Battery/BatteryHolder_Renata_SMTU2032-LF_1x2032","Battery/BatteryHolder_Seiko_MS621F","Battery/BatteryHolder_TruPower_BH-331P_3xAA","Battery/Battery_CR1225","Battery/Battery_Panasonic_CR1025-VSK_Vertical_CircularHoles","Battery/Battery_Panasonic_CR1220-VCN_Vertical_CircularHoles","Battery/Battery_Panasonic_CR1632-V1AN_Vertical_CircularHoles","Battery/Battery_Panasonic_CR2025-V1AK_Vertical_CircularHoles","Battery/Battery_Panasonic_CR2032-HFN_Horizontal_CircularHoles","Battery/Battery_Panasonic_CR2032-VS1N_Vertical_CircularHoles","Battery/Battery_Panasonic_CR2354-VCN_Vertical_CircularHoles","Battery/Battery_Panasonic_CR2450-VAN_Vertical_CircularHoles","Battery/Battery_Panasonic_CR2477-VCN_Vertical_CircularHoles","Battery/Battery_Panasonic_CR3032-VCN_Vertical_CircularHoles","Button_Switch_Keyboard/SW_Cherry_MX_1.00u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_1.00u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_1.25u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_1.25u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_1.50u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_1.50u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_1.75u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_1.75u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_2.00u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_2.00u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_2.00u_Vertical_PCB","Button_Switch_Keyboard/SW_Cherry_MX_2.00u_Vertical_Plate","Button_Switch_Keyboard/SW_Cherry_MX_2.25u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_2.25u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_2.75u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_2.75u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_6.25u_PCB","Button_Switch_Keyboard/SW_Cherry_MX_6.25u_Plate","Button_Switch_Keyboard/SW_Cherry_MX_ISOEnter_PCB","Button_Switch_Keyboard/SW_Cherry_MX_ISOEnter_Plate","Button_Switch_Keyboard/SW_Matias_1.00u","Button_Switch_Keyboard/SW_Matias_1.25u","Button_Switch_Keyboard/SW_Matias_1.50u","Button_Switch_Keyboard/SW_Matias_1.75u","Button_Switch_Keyboard/SW_Matias_2.00u","Button_Switch_Keyboard/SW_Matias_2.25u","Button_Switch_Keyboard/SW_Matias_2.75u","Button_Switch_Keyboard/SW_Matias_6.25u","Button_Switch_Keyboard/SW_Matias_ISOEnter","Button_Switch_SMD/Nidec_Copal_CAS-120A","Button_Switch_SMD/Nidec_Copal_SH-7010A","Button_Switch_SMD/Nidec_Copal_SH-7010B","Button_Switch_SMD/Nidec_Copal_SH-7040B","Button_Switch_SMD/Panasonic_EVQPUJ_EVQPUA","Button_Switch_SMD/Panasonic_EVQPUK_EVQPUB","Button_Switch_SMD/Panasonic_EVQPUL_EVQPUC","Button_Switch_SMD/Panasonic_EVQPUM_EVQPUD","Button_Switch_SMD/SW_DIP_SPSTx01_Slide_6.7x4.1mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx01_Slide_6.7x4.1mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx01_Slide_9.78x4.72mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Copal_CHS-01A_W5.08mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Copal_CHS-01B_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Copal_CVS-01xB_W5.9mm_P1mm","Button_Switch_SMD/SW_DIP_SPSTx01_Slide_Omron_A6S-110x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_6.7x6.64mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_6.7x6.64mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_9.78x7.26mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Copal_CHS-02A_W5.08mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Copal_CHS-02B_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Copal_CVS-02xB_W5.9mm_P1mm","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_KingTek_DSHP02TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_KingTek_DSHP02TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Omron_A6H-2101_W6.15mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx02_Slide_Omron_A6S-210x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx03_Slide_6.7x9.18mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx03_Slide_6.7x9.18mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx03_Slide_9.78x9.8mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx03_Slide_Copal_CVS-03xB_W5.9mm_P1mm","Button_Switch_SMD/SW_DIP_SPSTx03_Slide_KingTek_DSHP03TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx03_Slide_KingTek_DSHP03TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx03_Slide_Omron_A6S-310x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_6.7x11.72mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_6.7x11.72mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_9.78x12.34mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Copal_CHS-04A_W5.08mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Copal_CHS-04B_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Copal_CVS-04xB_W5.9mm_P1mm","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_KingTek_DSHP04TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_KingTek_DSHP04TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Omron_A6H-4101_W6.15mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx04_Slide_Omron_A6S-410x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx05_Slide_6.7x14.26mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx05_Slide_6.7x14.26mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx05_Slide_9.78x14.88mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx05_Slide_KingTek_DSHP05TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx05_Slide_KingTek_DSHP05TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx05_Slide_Omron_A6S-510x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_6.7x16.8mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_6.7x16.8mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_9.78x17.42mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Copal_CHS-06A_W5.08mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Copal_CHS-06B_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_KingTek_DSHP06TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_KingTek_DSHP06TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Omron_A6H-6101_W6.15mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx06_Slide_Omron_A6S-610x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx07_Slide_6.7x19.34mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx07_Slide_6.7x19.34mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx07_Slide_9.78x19.96mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx07_Slide_KingTek_DSHP07TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx07_Slide_KingTek_DSHP07TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx07_Slide_Omron_A6S-710x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_6.7x21.88mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_6.7x21.88mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_9.78x22.5mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Copal_CHS-08A_W5.08mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Copal_CHS-08B_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Copal_CVS-08xB_W5.9mm_P1mm","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_KingTek_DSHP08TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_KingTek_DSHP08TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Omron_A6H-8101_W6.15mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx08_Slide_Omron_A6S-810x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx09_Slide_6.7x24.42mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx09_Slide_6.7x24.42mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx09_Slide_9.78x25.04mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx09_Slide_KingTek_DSHP09TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx09_Slide_KingTek_DSHP09TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx09_Slide_Omron_A6S-910x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_6.7x26.96mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_6.7x26.96mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_9.78x27.58mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Copal_CHS-10A_W5.08mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Copal_CHS-10B_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_KingTek_DSHP10TJ_W5.25mm_P1.27mm_JPin","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_KingTek_DSHP10TS_W7.62mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Omron_A6H-10101_W6.15mm_P1.27mm","Button_Switch_SMD/SW_DIP_SPSTx10_Slide_Omron_A6S-1010x_W8.9mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx11_Slide_6.7x29.5mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx11_Slide_6.7x29.5mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx11_Slide_9.78x30.12mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DIP_SPSTx12_Slide_6.7x32.04mm_W6.73mm_P2.54mm_LowProfile_JPin","Button_Switch_SMD/SW_DIP_SPSTx12_Slide_6.7x32.04mm_W8.61mm_P2.54mm_LowProfile","Button_Switch_SMD/SW_DIP_SPSTx12_Slide_9.78x32.66mm_W8.61mm_P2.54mm","Button_Switch_SMD/SW_DPDT_CK_JS202011JCQN","Button_Switch_SMD/SW_MEC_5GSH9","Button_Switch_SMD/SW_Push_1P1T-MP_NO_Horizontal_Alps_SKRTLAE010","Button_Switch_SMD/SW_Push_1P1T-SH_NO_CK_KMR2xxG","Button_Switch_SMD/SW_Push_1P1T_NO_CK_KMR2","Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC6xxG","Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC6xxJ","Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC7xxJ","Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC9xxG","Button_Switch_SMD/SW_Push_1P1T_NO_CK_KSC9xxJ","Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx43PSMTR","Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx43SMTR","Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx73PSMTR","Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx73SMTR","Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx85PSMTR","Button_Switch_SMD/SW_Push_1P1T_NO_CK_PTS125Sx85SMTR","Button_Switch_SMD/SW_Push_1P1T_NO_E-Switch_TL3301NxxxxxG","Button_Switch_SMD/SW_Push_1P1T_NO_Vertical_Wuerth_434133025816","Button_Switch_SMD/SW_Push_1P1T_XKB_TS-1187A","Button_Switch_SMD/SW_Push_1TS009xxxx-xxxx-xxxx_6x6x5mm","Button_Switch_SMD/SW_Push_SPST_NO_Alps_SKRK","Button_Switch_SMD/SW_SP3T_PCM13","Button_Switch_SMD/SW_SPDT_CK_JS102011SAQN","Button_Switch_SMD/SW_SPDT_PCM12","Button_Switch_SMD/SW_SPDT_REED_MSDM-DT","Button_Switch_SMD/SW_SPDT_Shouhan_MSK12C02","Button_Switch_SMD/SW_SPST_B3S-1000","Button_Switch_SMD/SW_SPST_B3S-1100","Button_Switch_SMD/SW_SPST_B3SL-1002P","Button_Switch_SMD/SW_SPST_B3SL-1022P","Button_Switch_SMD/SW_SPST_B3U-1000P-B","Button_Switch_SMD/SW_SPST_B3U-1000P","Button_Switch_SMD/SW_SPST_B3U-1100P-B","Button_Switch_SMD/SW_SPST_B3U-1100P","Button_Switch_SMD/SW_SPST_B3U-3000P-B","Button_Switch_SMD/SW_SPST_B3U-3000P","Button_Switch_SMD/SW_SPST_B3U-3100P-B","Button_Switch_SMD/SW_SPST_B3U-3100P","Button_Switch_SMD/SW_SPST_CK_KMS2xxG","Button_Switch_SMD/SW_SPST_CK_KMS2xxGP","Button_Switch_SMD/SW_SPST_CK_KXT3","Button_Switch_SMD/SW_SPST_CK_RS282G05A3","Button_Switch_SMD/SW_SPST_EVPBF","Button_Switch_SMD/SW_SPST_EVQP0","Button_Switch_SMD/SW_SPST_EVQP2_MiddlePushTravel_H2.5mm","Button_Switch_SMD/SW_SPST_EVQP2_ShortPushTravel_H2.1mm","Button_Switch_SMD/SW_SPST_EVQP2_ShortPushTravel_H2.5mm","Button_Switch_SMD/SW_SPST_EVQP7A","Button_Switch_SMD/SW_SPST_EVQP7C","Button_Switch_SMD/SW_SPST_EVQPE1","Button_Switch_SMD/SW_SPST_EVQQ2","Button_Switch_SMD/SW_SPST_FSMSM","Button_Switch_SMD/SW_SPST_GT-TC155X","Button_Switch_SMD/SW_SPST_Omron_B3FS-100xP","Button_Switch_SMD/SW_SPST_Omron_B3FS-101xP","Button_Switch_SMD/SW_SPST_Omron_B3FS-105xP","Button_Switch_SMD/SW_SPST_PTS645Sx43SMTR92","Button_Switch_SMD/SW_SPST_PTS647_Sx38","Button_Switch_SMD/SW_SPST_PTS647_Sx50","Button_Switch_SMD/SW_SPST_PTS647_Sx70","Button_Switch_SMD/SW_SPST_PTS810","Button_Switch_SMD/SW_SPST_Panasonic_EVQPL_3PL_5PL_PT_A08","Button_Switch_SMD/SW_SPST_Panasonic_EVQPL_3PL_5PL_PT_A15","Button_Switch_SMD/SW_SPST_REED_CT05-XXXX-G1","Button_Switch_SMD/SW_SPST_REED_CT05-XXXX-J1","Button_Switch_SMD/SW_SPST_REED_CT10-XXXX-G1","Button_Switch_SMD/SW_SPST_REED_CT10-XXXX-G2","Button_Switch_SMD/SW_SPST_REED_CT10-XXXX-G4","Button_Switch_SMD/SW_SPST_SKQG_WithStem","Button_Switch_SMD/SW_SPST_SKQG_WithoutStem","Button_Switch_SMD/SW_SPST_TL3305A","Button_Switch_SMD/SW_SPST_TL3305B","Button_Switch_SMD/SW_SPST_TL3305C","Button_Switch_SMD/SW_SPST_TL3342","Button_Switch_SMD/SW_SPST_TS-1088-xR020","Button_Switch_SMD/SW_SPST_TS-1088-xR025","Button_Switch_SMD/SW_Tactile_SPST_NO_Straight_CK_PTS636Sx25SMTRLFS","Button_Switch_THT/KSA_Tactile_SPST","Button_Switch_THT/Nidec_Copal_SH-7010C","Button_Switch_THT/Push_E-Switch_KS01Q01","Button_Switch_THT/SW_CK_JS202011AQN_DPDT_Angled","Button_Switch_THT/SW_CK_JS202011CQN_DPDT_Straight","Button_Switch_THT/SW_CW_GPTS203211B","Button_Switch_THT/SW_DIP_SPSTx01_Piano_10.8x4.1mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx01_Slide_6.7x4.1mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx01_Slide_9.78x4.72mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx02_Piano_10.8x6.64mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx02_Piano_CTS_Series194-2MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx02_Slide_6.7x6.64mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx02_Slide_9.78x7.26mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx03_Piano_10.8x9.18mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx03_Piano_CTS_Series194-3MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx03_Slide_6.7x9.18mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx03_Slide_9.78x9.8mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx04_Piano_10.8x11.72mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx04_Piano_CTS_Series194-4MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx04_Slide_6.7x11.72mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx04_Slide_9.78x12.34mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx05_Piano_10.8x14.26mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx05_Piano_CTS_Series194-5MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx05_Slide_6.7x14.26mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx05_Slide_9.78x14.88mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx06_Piano_10.8x16.8mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx06_Piano_CTS_Series194-6MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx06_Slide_6.7x16.8mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx06_Slide_9.78x17.42mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx07_Piano_10.8x19.34mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx07_Piano_CTS_Series194-7MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx07_Slide_6.7x19.34mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx07_Slide_9.78x19.96mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx08_Piano_10.8x21.88mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx08_Piano_CTS_Series194-8MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx08_Slide_6.7x21.88mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx08_Slide_9.78x22.5mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx09_Piano_10.8x24.42mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx09_Piano_CTS_Series194-9MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx09_Slide_6.7x24.42mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx09_Slide_9.78x25.04mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx10_Piano_10.8x26.96mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx10_Piano_CTS_Series194-10MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx10_Slide_6.7x26.96mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx10_Slide_9.78x27.58mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx11_Piano_10.8x29.5mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx11_Piano_CTS_Series194-11MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx11_Slide_6.7x29.5mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx11_Slide_9.78x30.12mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx12_Piano_10.8x32.04mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx12_Piano_CTS_Series194-12MSTN_W7.62mm_P2.54mm","Button_Switch_THT/SW_DIP_SPSTx12_Slide_6.7x32.04mm_W7.62mm_P2.54mm_LowProfile","Button_Switch_THT/SW_DIP_SPSTx12_Slide_9.78x32.66mm_W7.62mm_P2.54mm","Button_Switch_THT/SW_E-Switch_EG1224_SPDT_Angled","Button_Switch_THT/SW_E-Switch_EG1271_SPDT","Button_Switch_THT/SW_E-Switch_EG2219_DPDT_Angled","Button_Switch_THT/SW_Lever_1P2T_NKK_GW12LxH","Button_Switch_THT/SW_MEC_5GTH9","Button_Switch_THT/SW_NKK_BB15AH","Button_Switch_THT/SW_NKK_G1xJP","Button_Switch_THT/SW_NKK_GW12LJP","Button_Switch_THT/SW_NKK_NR01","Button_Switch_THT/SW_PUSH-12mm","Button_Switch_THT/SW_PUSH-12mm_Wuerth-430476085716","Button_Switch_THT/SW_PUSH_1P1T_6x3.5mm_H4.3_APEM_MJTP1243","Button_Switch_THT/SW_PUSH_1P1T_6x3.5mm_H5.0_APEM_MJTP1250","Button_Switch_THT/SW_PUSH_6mm","Button_Switch_THT/SW_PUSH_6mm_H13mm","Button_Switch_THT/SW_PUSH_6mm_H4.3mm","Button_Switch_THT/SW_PUSH_6mm_H5mm","Button_Switch_THT/SW_PUSH_6mm_H7.3mm","Button_Switch_THT/SW_PUSH_6mm_H8.5mm","Button_Switch_THT/SW_PUSH_6mm_H8mm","Button_Switch_THT/SW_PUSH_6mm_H9.5mm","Button_Switch_THT/SW_PUSH_E-Switch_FS5700DP_DPDT","Button_Switch_THT/SW_PUSH_LCD_E3_SAxxxx","Button_Switch_THT/SW_PUSH_LCD_E3_SAxxxx_SocketPins","Button_Switch_THT/SW_Push_1P1T_NO_LED_E-Switch_TL1250","Button_Switch_THT/SW_Push_1P2T_Vertical_E-Switch_800UDP8P1A1M6","Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH1xxxxxxV2","Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH2xxxxxxV2","Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH3xxxxxxV2","Button_Switch_THT/SW_Push_2P1T_Toggle_CK_PVA1xxH4xxxxxxV2","Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2OAH5xxxxxxV2","Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH1xxxxxxV2","Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH2xxxxxxV2","Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH3xxxxxxV2","Button_Switch_THT/SW_Push_2P2T_Toggle_CK_PVA2xxH4xxxxxxV2","Button_Switch_THT/SW_Push_2P2T_Vertical_E-Switch_800UDP8P1A1M6","Button_Switch_THT/SW_SPST_Omron_B3F-315x_Angled","Button_Switch_THT/SW_SPST_Omron_B3F-40xx","Button_Switch_THT/SW_SPST_Omron_B3F-50xx","Button_Switch_THT/SW_Slide-03_Wuerth-WS-SLTV_10x2.5x6.4_P2.54mm","Button_Switch_THT/SW_Slide_SP3T_Straight_CK_OS103012MU1QP1","Button_Switch_THT/SW_Slide_SPDT_Angled_CK_OS102011MA1Q","Button_Switch_THT/SW_Slide_SPDT_Straight_CK_OS102011MS2Q","Button_Switch_THT/SW_TH_Tactile_Omron_B3F-100x","Button_Switch_THT/SW_TH_Tactile_Omron_B3F-102x","Button_Switch_THT/SW_TH_Tactile_Omron_B3F-106x","Button_Switch_THT/SW_TH_Tactile_Omron_B3F-107x","Button_Switch_THT/SW_TH_Tactile_Omron_B3F-110x","Button_Switch_THT/SW_TH_Tactile_Omron_B3F-1110","Button_Switch_THT/SW_TH_Tactile_Omron_B3F-112x","Button_Switch_THT/SW_Tactile_SKHH_Angled","Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx31-2LFS","Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx39-2LFS","Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx58-2LFS","Button_Switch_THT/SW_Tactile_SPST_Angled_PTS645Vx83-2LFS","Button_Switch_THT/SW_Tactile_Straight_KSA0Axx1LFTR","Button_Switch_THT/SW_Tactile_Straight_KSL0Axx1LFTR","Button_Switch_THT/SW_XKB_DM1-16UC-1","Button_Switch_THT/SW_XKB_DM1-16UD-1","Button_Switch_THT/SW_XKB_DM1-16UP-1","Buzzer_Beeper/Buzzer_12x9.5RM7.6","Buzzer_Beeper/Buzzer_15x7.5RM7.6","Buzzer_Beeper/Buzzer_CUI_CPT-9019S-SMT","Buzzer_Beeper/Buzzer_D14mm_H7mm_P10mm","Buzzer_Beeper/Buzzer_Mallory_AST1109MLTRQ","Buzzer_Beeper/Buzzer_Mallory_AST1240MLQ","Buzzer_Beeper/Buzzer_Murata_PKLCS1212E","Buzzer_Beeper/Buzzer_Murata_PKMCS0909E","Buzzer_Beeper/Buzzer_TDK_PS1240P02BT_D12.2mm_H6.5mm","Buzzer_Beeper/Indicator_PUI_AI-1440-TWT-24V-2-R","Buzzer_Beeper/MagneticBuzzer_CUI_CMT-8504-100-SMT","Buzzer_Beeper/MagneticBuzzer_CUI_CST-931RP-A","Buzzer_Beeper/MagneticBuzzer_Kingstate_KCG0601","Buzzer_Beeper/MagneticBuzzer_Kobitone_254-EMB73-RO","Buzzer_Beeper/MagneticBuzzer_Kobitone_254-EMB84Q-RO","Buzzer_Beeper/MagneticBuzzer_PUI_AT-0927-TT-6-R","Buzzer_Beeper/MagneticBuzzer_PUI_SMT-1028-T-2-R","Buzzer_Beeper/MagneticBuzzer_ProSignal_ABI-009-RC","Buzzer_Beeper/MagneticBuzzer_ProSignal_ABI-010-RC","Buzzer_Beeper/MagneticBuzzer_ProSignal_ABT-410-RC","Buzzer_Beeper/MagneticBuzzer_ProjectsUnlimited_AI-4228-TWT-R","Buzzer_Beeper/MagneticBuzzer_StarMicronics_HGP","Buzzer_Beeper/MagneticBuzzer_StarMicronics_HMB-06_HMB-12","Buzzer_Beeper/MagneticBuzzer_StarMicronics_HMB","Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB-105","Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB-108","Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB-111","Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMB","Buzzer_Beeper/MagneticBuzzer_StarMicronics_QMX","Buzzer_Beeper/MagneticBuzzer_StarMicronics_RMX","Buzzer_Beeper/MagneticBuzzer_StarMicronics_TMB","Buzzer_Beeper/MagneticBuzzer_StarMicronics_TMX-F","Buzzer_Beeper/MagneticBuzzer_StarMicronics_TMX-H","Buzzer_Beeper/PUIAudio_SMT_0825_S_4_R","Buzzer_Beeper/Speaker_CUI_CMR-1206S-67","Calibration_Scale/Gauge_100mm_Grid_Type1_CopperTop","Calibration_Scale/Gauge_100mm_Type1_CopperTop","Calibration_Scale/Gauge_100mm_Type1_SilkScreenTop","Calibration_Scale/Gauge_100mm_Type2_CopperTop","Calibration_Scale/Gauge_100mm_Type2_SilkScreenTop","Calibration_Scale/Gauge_10mm_Type1_CopperTop","Calibration_Scale/Gauge_10mm_Type1_SilkScreenTop","Calibration_Scale/Gauge_10mm_Type2_CopperTop","Calibration_Scale/Gauge_10mm_Type2_SilkScreenTop","Calibration_Scale/Gauge_10mm_Type3_CopperTop","Calibration_Scale/Gauge_10mm_Type3_SilkScreenTop","Calibration_Scale/Gauge_10mm_Type4_CopperTop","Calibration_Scale/Gauge_10mm_Type4_SilkScreenTop","Calibration_Scale/Gauge_10mm_Type5_CopperTop","Calibration_Scale/Gauge_10mm_Type5_SilkScreenTop","Calibration_Scale/Gauge_50mm_Type1_CopperTop","Calibration_Scale/Gauge_50mm_Type1_SilkScreenTop","Calibration_Scale/Gauge_50mm_Type2_CopperTop","Calibration_Scale/Gauge_50mm_Type2_SilkScreenTop","Capacitor_SMD/CP_Elec_10x10.5","Capacitor_SMD/CP_Elec_10x10","Capacitor_SMD/CP_Elec_10x12.5","Capacitor_SMD/CP_Elec_10x12.6","Capacitor_SMD/CP_Elec_10x14.3","Capacitor_SMD/CP_Elec_10x7.7","Capacitor_SMD/CP_Elec_10x7.9","Capacitor_SMD/CP_Elec_16x17.5","Capacitor_SMD/CP_Elec_16x22","Capacitor_SMD/CP_Elec_18x17.5","Capacitor_SMD/CP_Elec_18x22","Capacitor_SMD/CP_Elec_3x5.3","Capacitor_SMD/CP_Elec_3x5.4","Capacitor_SMD/CP_Elec_4x3.9","Capacitor_SMD/CP_Elec_4x3","Capacitor_SMD/CP_Elec_4x4.5","Capacitor_SMD/CP_Elec_4x5.3","Capacitor_SMD/CP_Elec_4x5.4","Capacitor_SMD/CP_Elec_4x5.7","Capacitor_SMD/CP_Elec_4x5.8","Capacitor_SMD/CP_Elec_5x3.9","Capacitor_SMD/CP_Elec_5x3","Capacitor_SMD/CP_Elec_5x4.4","Capacitor_SMD/CP_Elec_5x4.5","Capacitor_SMD/CP_Elec_5x5.3","Capacitor_SMD/CP_Elec_5x5.4","Capacitor_SMD/CP_Elec_5x5.7","Capacitor_SMD/CP_Elec_5x5.8","Capacitor_SMD/CP_Elec_5x5.9","Capacitor_SMD/CP_Elec_6.3x3.9","Capacitor_SMD/CP_Elec_6.3x3","Capacitor_SMD/CP_Elec_6.3x4.5","Capacitor_SMD/CP_Elec_6.3x4.9","Capacitor_SMD/CP_Elec_6.3x5.2","Capacitor_SMD/CP_Elec_6.3x5.3","Capacitor_SMD/CP_Elec_6.3x5.4","Capacitor_SMD/CP_Elec_6.3x5.4_Nichicon","Capacitor_SMD/CP_Elec_6.3x5.7","Capacitor_SMD/CP_Elec_6.3x5.8","Capacitor_SMD/CP_Elec_6.3x5.9","Capacitor_SMD/CP_Elec_6.3x7.7","Capacitor_SMD/CP_Elec_6.3x9.9","Capacitor_SMD/CP_Elec_8x10.5","Capacitor_SMD/CP_Elec_8x10","Capacitor_SMD/CP_Elec_8x11.9","Capacitor_SMD/CP_Elec_8x5.4","Capacitor_SMD/CP_Elec_8x6.2","Capacitor_SMD/CP_Elec_8x6.5","Capacitor_SMD/CP_Elec_8x6.7","Capacitor_SMD/CP_Elec_8x6.9","Capacitor_SMD/CP_Elec_CAP-XX_DMF3Zxxxxxxxx3D","Capacitor_SMD/C_01005_0402Metric","Capacitor_SMD/C_01005_0402Metric_Pad0.57x0.30mm_HandSolder","Capacitor_SMD/C_0201_0603Metric","Capacitor_SMD/C_0201_0603Metric_Pad0.64x0.40mm_HandSolder","Capacitor_SMD/C_0402_1005Metric","Capacitor_SMD/C_0402_1005Metric_Pad0.74x0.62mm_HandSolder","Capacitor_SMD/C_0504_1310Metric","Capacitor_SMD/C_0504_1310Metric_Pad0.83x1.28mm_HandSolder","Capacitor_SMD/C_0603_1608Metric","Capacitor_SMD/C_0603_1608Metric_Pad1.08x0.95mm_HandSolder","Capacitor_SMD/C_0805_2012Metric","Capacitor_SMD/C_0805_2012Metric_Pad1.18x1.45mm_HandSolder","Capacitor_SMD/C_1206_3216Metric","Capacitor_SMD/C_1206_3216Metric_Pad1.33x1.80mm_HandSolder","Capacitor_SMD/C_1210_3225Metric","Capacitor_SMD/C_1210_3225Metric_Pad1.33x2.70mm_HandSolder","Capacitor_SMD/C_1808_4520Metric","Capacitor_SMD/C_1808_4520Metric_Pad1.72x2.30mm_HandSolder","Capacitor_SMD/C_1812_4532Metric","Capacitor_SMD/C_1812_4532Metric_Pad1.57x3.40mm_HandSolder","Capacitor_SMD/C_1825_4564Metric","Capacitor_SMD/C_1825_4564Metric_Pad1.57x6.80mm_HandSolder","Capacitor_SMD/C_2220_5750Metric","Capacitor_SMD/C_2220_5750Metric_Pad1.97x5.40mm_HandSolder","Capacitor_SMD/C_2225_5664Metric","Capacitor_SMD/C_2225_5664Metric_Pad1.80x6.60mm_HandSolder","Capacitor_SMD/C_3640_9110Metric","Capacitor_SMD/C_3640_9110Metric_Pad2.10x10.45mm_HandSolder","Capacitor_SMD/C_Elec_10x10.2","Capacitor_SMD/C_Elec_3x5.4","Capacitor_SMD/C_Elec_4x5.4","Capacitor_SMD/C_Elec_4x5.8","Capacitor_SMD/C_Elec_5x5.4","Capacitor_SMD/C_Elec_5x5.8","Capacitor_SMD/C_Elec_6.3x5.4","Capacitor_SMD/C_Elec_6.3x5.8","Capacitor_SMD/C_Elec_6.3x7.7","Capacitor_SMD/C_Elec_8x10.2","Capacitor_SMD/C_Elec_8x5.4","Capacitor_SMD/C_Elec_8x6.2","Capacitor_SMD/C_Trimmer_Murata_TZB4-A","Capacitor_SMD/C_Trimmer_Murata_TZB4-B","Capacitor_SMD/C_Trimmer_Murata_TZC3","Capacitor_SMD/C_Trimmer_Murata_TZR1","Capacitor_SMD/C_Trimmer_Murata_TZW4","Capacitor_SMD/C_Trimmer_Murata_TZY2","Capacitor_SMD/C_Trimmer_Sprague-Goodman_SGC3","Capacitor_SMD/C_Trimmer_Voltronics_JN","Capacitor_SMD/C_Trimmer_Voltronics_JQ","Capacitor_SMD/C_Trimmer_Voltronics_JR","Capacitor_SMD/C_Trimmer_Voltronics_JV","Capacitor_SMD/C_Trimmer_Voltronics_JZ","Capacitor_THT/CP_Axial_L10.0mm_D4.5mm_P15.00mm_Horizontal","Capacitor_THT/CP_Axial_L10.0mm_D6.0mm_P15.00mm_Horizontal","Capacitor_THT/CP_Axial_L11.0mm_D5.0mm_P18.00mm_Horizontal","Capacitor_THT/CP_Axial_L11.0mm_D6.0mm_P18.00mm_Horizontal","Capacitor_THT/CP_Axial_L11.0mm_D8.0mm_P15.00mm_Horizontal","Capacitor_THT/CP_Axial_L18.0mm_D10.0mm_P25.00mm_Horizontal","Capacitor_THT/CP_Axial_L18.0mm_D6.5mm_P25.00mm_Horizontal","Capacitor_THT/CP_Axial_L18.0mm_D8.0mm_P25.00mm_Horizontal","Capacitor_THT/CP_Axial_L20.0mm_D10.0mm_P26.00mm_Horizontal","Capacitor_THT/CP_Axial_L20.0mm_D13.0mm_P26.00mm_Horizontal","Capacitor_THT/CP_Axial_L21.0mm_D8.0mm_P28.00mm_Horizontal","Capacitor_THT/CP_Axial_L25.0mm_D10.0mm_P30.00mm_Horizontal","Capacitor_THT/CP_Axial_L26.5mm_D20.0mm_P33.00mm_Horizontal","Capacitor_THT/CP_Axial_L29.0mm_D10.0mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L29.0mm_D13.0mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L29.0mm_D16.0mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L29.0mm_D20.0mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L30.0mm_D10.0mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L30.0mm_D12.5mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L30.0mm_D15.0mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L30.0mm_D18.0mm_P35.00mm_Horizontal","Capacitor_THT/CP_Axial_L34.5mm_D20.0mm_P41.00mm_Horizontal","Capacitor_THT/CP_Axial_L37.0mm_D13.0mm_P43.00mm_Horizontal","Capacitor_THT/CP_Axial_L37.0mm_D16.0mm_P43.00mm_Horizontal","Capacitor_THT/CP_Axial_L37.0mm_D20.0mm_P43.00mm_Horizontal","Capacitor_THT/CP_Axial_L38.0mm_D18.0mm_P44.00mm_Horizontal","Capacitor_THT/CP_Axial_L38.0mm_D21.0mm_P44.00mm_Horizontal","Capacitor_THT/CP_Axial_L40.0mm_D16.0mm_P48.00mm_Horizontal","Capacitor_THT/CP_Axial_L42.0mm_D23.0mm_P45.00mm_Horizontal","Capacitor_THT/CP_Axial_L42.0mm_D26.0mm_P45.00mm_Horizontal","Capacitor_THT/CP_Axial_L42.0mm_D29.0mm_P45.00mm_Horizontal","Capacitor_THT/CP_Axial_L42.0mm_D32.0mm_P45.00mm_Horizontal","Capacitor_THT/CP_Axial_L42.0mm_D35.0mm_P45.00mm_Horizontal","Capacitor_THT/CP_Axial_L42.5mm_D20.0mm_P49.00mm_Horizontal","Capacitor_THT/CP_Axial_L46.0mm_D20.0mm_P52.00mm_Horizontal","Capacitor_THT/CP_Axial_L55.0mm_D23.0mm_P60.00mm_Horizontal","Capacitor_THT/CP_Axial_L55.0mm_D26.0mm_P60.00mm_Horizontal","Capacitor_THT/CP_Axial_L55.0mm_D29.0mm_P60.00mm_Horizontal","Capacitor_THT/CP_Axial_L55.0mm_D32.0mm_P60.00mm_Horizontal","Capacitor_THT/CP_Axial_L55.0mm_D35.0mm_P60.00mm_Horizontal","Capacitor_THT/CP_Axial_L67.0mm_D23.0mm_P75.00mm_Horizontal","Capacitor_THT/CP_Axial_L67.0mm_D26.0mm_P75.00mm_Horizontal","Capacitor_THT/CP_Axial_L67.0mm_D29.0mm_P75.00mm_Horizontal","Capacitor_THT/CP_Axial_L67.0mm_D32.0mm_P75.00mm_Horizontal","Capacitor_THT/CP_Axial_L67.0mm_D35.0mm_P75.00mm_Horizontal","Capacitor_THT/CP_Axial_L80.0mm_D23.0mm_P85.00mm_Horizontal","Capacitor_THT/CP_Axial_L80.0mm_D26.0mm_P85.00mm_Horizontal","Capacitor_THT/CP_Axial_L80.0mm_D29.0mm_P85.00mm_Horizontal","Capacitor_THT/CP_Axial_L80.0mm_D32.0mm_P85.00mm_Horizontal","Capacitor_THT/CP_Axial_L80.0mm_D35.0mm_P85.00mm_Horizontal","Capacitor_THT/CP_Axial_L93.0mm_D23.0mm_P100.00mm_Horizontal","Capacitor_THT/CP_Axial_L93.0mm_D26.0mm_P100.00mm_Horizontal","Capacitor_THT/CP_Axial_L93.0mm_D29.0mm_P100.00mm_Horizontal","Capacitor_THT/CP_Axial_L93.0mm_D32.0mm_P100.00mm_Horizontal","Capacitor_THT/CP_Axial_L93.0mm_D35.0mm_P100.00mm_Horizontal","Capacitor_THT/CP_Radial_D10.0mm_P2.50mm","Capacitor_THT/CP_Radial_D10.0mm_P2.50mm_P5.00mm","Capacitor_THT/CP_Radial_D10.0mm_P3.50mm","Capacitor_THT/CP_Radial_D10.0mm_P3.80mm","Capacitor_THT/CP_Radial_D10.0mm_P5.00mm","Capacitor_THT/CP_Radial_D10.0mm_P5.00mm_P7.50mm","Capacitor_THT/CP_Radial_D10.0mm_P7.50mm","Capacitor_THT/CP_Radial_D12.5mm_P2.50mm","Capacitor_THT/CP_Radial_D12.5mm_P5.00mm","Capacitor_THT/CP_Radial_D12.5mm_P7.50mm","Capacitor_THT/CP_Radial_D13.0mm_P2.50mm","Capacitor_THT/CP_Radial_D13.0mm_P5.00mm","Capacitor_THT/CP_Radial_D13.0mm_P7.50mm","Capacitor_THT/CP_Radial_D14.0mm_P5.00mm","Capacitor_THT/CP_Radial_D14.0mm_P7.50mm","Capacitor_THT/CP_Radial_D16.0mm_P7.50mm","Capacitor_THT/CP_Radial_D17.0mm_P7.50mm","Capacitor_THT/CP_Radial_D18.0mm_P7.50mm","Capacitor_THT/CP_Radial_D22.0mm_P10.00mm_3pin_SnapIn","Capacitor_THT/CP_Radial_D22.0mm_P10.00mm_SnapIn","Capacitor_THT/CP_Radial_D24.0mm_P10.00mm_3pin_SnapIn","Capacitor_THT/CP_Radial_D24.0mm_P10.00mm_SnapIn","Capacitor_THT/CP_Radial_D25.0mm_P10.00mm_3pin_SnapIn","Capacitor_THT/CP_Radial_D25.0mm_P10.00mm_SnapIn","Capacitor_THT/CP_Radial_D26.0mm_P10.00mm_3pin_SnapIn","Capacitor_THT/CP_Radial_D26.0mm_P10.00mm_SnapIn","Capacitor_THT/CP_Radial_D30.0mm_P10.00mm_3pin_SnapIn","Capacitor_THT/CP_Radial_D30.0mm_P10.00mm_SnapIn","Capacitor_THT/CP_Radial_D35.0mm_P10.00mm_3pin_SnapIn","Capacitor_THT/CP_Radial_D35.0mm_P10.00mm_SnapIn","Capacitor_THT/CP_Radial_D4.0mm_P1.50mm","Capacitor_THT/CP_Radial_D4.0mm_P2.00mm","Capacitor_THT/CP_Radial_D40.0mm_P10.00mm_3pin_SnapIn","Capacitor_THT/CP_Radial_D40.0mm_P10.00mm_SnapIn","Capacitor_THT/CP_Radial_D5.0mm_P2.00mm","Capacitor_THT/CP_Radial_D5.0mm_P2.50mm","Capacitor_THT/CP_Radial_D6.3mm_P2.50mm","Capacitor_THT/CP_Radial_D7.5mm_P2.50mm","Capacitor_THT/CP_Radial_D8.0mm_P2.50mm","Capacitor_THT/CP_Radial_D8.0mm_P3.50mm","Capacitor_THT/CP_Radial_D8.0mm_P3.80mm","Capacitor_THT/CP_Radial_D8.0mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D10.5mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D10.5mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D4.5mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D4.5mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D5.0mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D5.0mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D5.5mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D5.5mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D6.0mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D6.0mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D7.0mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D7.0mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D8.0mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D8.0mm_P5.00mm","Capacitor_THT/CP_Radial_Tantal_D9.0mm_P2.50mm","Capacitor_THT/CP_Radial_Tantal_D9.0mm_P5.00mm","Capacitor_THT/C_Axial_L12.0mm_D10.5mm_P15.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D10.5mm_P20.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D6.5mm_P15.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D6.5mm_P20.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D7.5mm_P15.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D7.5mm_P20.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D8.5mm_P15.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D8.5mm_P20.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D9.5mm_P15.00mm_Horizontal","Capacitor_THT/C_Axial_L12.0mm_D9.5mm_P20.00mm_Horizontal","Capacitor_THT/C_Axial_L17.0mm_D6.5mm_P20.00mm_Horizontal","Capacitor_THT/C_Axial_L17.0mm_D6.5mm_P25.00mm_Horizontal","Capacitor_THT/C_Axial_L17.0mm_D7.0mm_P20.00mm_Horizontal","Capacitor_THT/C_Axial_L17.0mm_D7.0mm_P25.00mm_Horizontal","Capacitor_THT/C_Axial_L19.0mm_D7.5mm_P25.00mm_Horizontal","Capacitor_THT/C_Axial_L19.0mm_D8.0mm_P25.00mm_Horizontal","Capacitor_THT/C_Axial_L19.0mm_D9.0mm_P25.00mm_Horizontal","Capacitor_THT/C_Axial_L19.0mm_D9.5mm_P25.00mm_Horizontal","Capacitor_THT/C_Axial_L22.0mm_D10.5mm_P27.50mm_Horizontal","Capacitor_THT/C_Axial_L22.0mm_D9.5mm_P27.50mm_Horizontal","Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P10.00mm_Horizontal","Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P12.50mm_Horizontal","Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P15.00mm_Horizontal","Capacitor_THT/C_Axial_L3.8mm_D2.6mm_P7.50mm_Horizontal","Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P10.00mm_Horizontal","Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P12.50mm_Horizontal","Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P15.00mm_Horizontal","Capacitor_THT/C_Axial_L5.1mm_D3.1mm_P7.50mm_Horizontal","Capacitor_THT/C_Disc_D10.0mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D10.5mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D10.5mm_W5.0mm_P5.00mm","Capacitor_THT/C_Disc_D10.5mm_W5.0mm_P7.50mm","Capacitor_THT/C_Disc_D11.0mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D11.0mm_W5.0mm_P5.00mm","Capacitor_THT/C_Disc_D11.0mm_W5.0mm_P7.50mm","Capacitor_THT/C_Disc_D12.0mm_W4.4mm_P7.75mm","Capacitor_THT/C_Disc_D12.5mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D12.5mm_W5.0mm_P7.50mm","Capacitor_THT/C_Disc_D14.5mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D14.5mm_W5.0mm_P7.50mm","Capacitor_THT/C_Disc_D16.0mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D16.0mm_W5.0mm_P7.50mm","Capacitor_THT/C_Disc_D3.0mm_W1.6mm_P2.50mm","Capacitor_THT/C_Disc_D3.0mm_W2.0mm_P2.50mm","Capacitor_THT/C_Disc_D3.4mm_W2.1mm_P2.50mm","Capacitor_THT/C_Disc_D3.8mm_W2.6mm_P2.50mm","Capacitor_THT/C_Disc_D4.3mm_W1.9mm_P5.00mm","Capacitor_THT/C_Disc_D4.7mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D5.0mm_W2.5mm_P2.50mm","Capacitor_THT/C_Disc_D5.0mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D5.1mm_W3.2mm_P5.00mm","Capacitor_THT/C_Disc_D6.0mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D6.0mm_W4.4mm_P5.00mm","Capacitor_THT/C_Disc_D7.0mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D7.5mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D7.5mm_W4.4mm_P5.00mm","Capacitor_THT/C_Disc_D7.5mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D7.5mm_W5.0mm_P5.00mm","Capacitor_THT/C_Disc_D7.5mm_W5.0mm_P7.50mm","Capacitor_THT/C_Disc_D8.0mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D8.0mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D8.0mm_W5.0mm_P5.00mm","Capacitor_THT/C_Disc_D8.0mm_W5.0mm_P7.50mm","Capacitor_THT/C_Disc_D9.0mm_W2.5mm_P5.00mm","Capacitor_THT/C_Disc_D9.0mm_W5.0mm_P10.00mm","Capacitor_THT/C_Disc_D9.0mm_W5.0mm_P5.00mm","Capacitor_THT/C_Disc_D9.0mm_W5.0mm_P7.50mm","Capacitor_THT/C_Radial_D10.0mm_H12.5mm_P5.00mm","Capacitor_THT/C_Radial_D10.0mm_H16.0mm_P5.00mm","Capacitor_THT/C_Radial_D10.0mm_H20.0mm_P5.00mm","Capacitor_THT/C_Radial_D12.5mm_H20.0mm_P5.00mm","Capacitor_THT/C_Radial_D12.5mm_H25.0mm_P5.00mm","Capacitor_THT/C_Radial_D16.0mm_H25.0mm_P7.50mm","Capacitor_THT/C_Radial_D16.0mm_H31.5mm_P7.50mm","Capacitor_THT/C_Radial_D18.0mm_H35.5mm_P7.50mm","Capacitor_THT/C_Radial_D4.0mm_H5.0mm_P1.50mm","Capacitor_THT/C_Radial_D4.0mm_H7.0mm_P1.50mm","Capacitor_THT/C_Radial_D5.0mm_H11.0mm_P2.00mm","Capacitor_THT/C_Radial_D5.0mm_H5.0mm_P2.00mm","Capacitor_THT/C_Radial_D5.0mm_H7.0mm_P2.00mm","Capacitor_THT/C_Radial_D6.3mm_H11.0mm_P2.50mm","Capacitor_THT/C_Radial_D6.3mm_H5.0mm_P2.50mm","Capacitor_THT/C_Radial_D6.3mm_H7.0mm_P2.50mm","Capacitor_THT/C_Radial_D8.0mm_H11.5mm_P3.50mm","Capacitor_THT/C_Radial_D8.0mm_H7.0mm_P3.50mm","Capacitor_THT/C_Rect_L10.0mm_W2.5mm_P7.50mm_MKS4","Capacitor_THT/C_Rect_L10.0mm_W3.0mm_P7.50mm_FKS3_FKP3","Capacitor_THT/C_Rect_L10.0mm_W3.0mm_P7.50mm_MKS4","Capacitor_THT/C_Rect_L10.0mm_W4.0mm_P7.50mm_FKS3_FKP3","Capacitor_THT/C_Rect_L10.0mm_W4.0mm_P7.50mm_MKS4","Capacitor_THT/C_Rect_L10.0mm_W5.0mm_P5.00mm_P7.50mm","Capacitor_THT/C_Rect_L10.3mm_W4.5mm_P7.50mm_MKS4","Capacitor_THT/C_Rect_L10.3mm_W5.0mm_P7.50mm_MKS4","Capacitor_THT/C_Rect_L10.3mm_W5.7mm_P7.50mm_MKS4","Capacitor_THT/C_Rect_L10.3mm_W7.2mm_P7.50mm_MKS4","Capacitor_THT/C_Rect_L11.0mm_W2.8mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W3.4mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W3.5mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W4.2mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W4.3mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W5.1mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W5.3mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W6.3mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W6.4mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W7.3mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.0mm_W8.8mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W2.0mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W2.6mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W2.8mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W3.2mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W3.5mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W3.6mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W4.0mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W4.3mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W4.5mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W5.0mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W5.1mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W5.2mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W5.6mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W6.4mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W6.6mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W6.9mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W7.3mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W7.5mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W7.8mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W8.0mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W8.8mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W9.5mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L11.5mm_W9.8mm_P10.00mm_MKT","Capacitor_THT/C_Rect_L13.0mm_W3.0mm_P10.00mm_FKS3_FKP3_MKS4","Capacitor_THT/C_Rect_L13.0mm_W4.0mm_P10.00mm_FKS3_FKP3_MKS4","Capacitor_THT/C_Rect_L13.0mm_W5.0mm_P10.00mm_FKS3_FKP3_MKS4","Capacitor_THT/C_Rect_L13.0mm_W6.0mm_P10.00mm_FKS3_FKP3_MKS4","Capacitor_THT/C_Rect_L13.0mm_W6.5mm_P7.50mm_P10.00mm","Capacitor_THT/C_Rect_L13.0mm_W8.0mm_P10.00mm_FKS3_FKP3_MKS4","Capacitor_THT/C_Rect_L13.5mm_W4.0mm_P10.00mm_FKS3_FKP3_MKS4","Capacitor_THT/C_Rect_L13.5mm_W5.0mm_P10.00mm_FKS3_FKP3_MKS4","Capacitor_THT/C_Rect_L16.5mm_W10.7mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W10.9mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W11.2mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W11.8mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W13.5mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W13.7mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W13.9mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W4.7mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W4.9mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W5.0mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W6.0mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W7.0mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W7.3mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W8.7mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W8.9mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W9.0mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L16.5mm_W9.2mm_P15.00mm_MKT","Capacitor_THT/C_Rect_L18.0mm_W11.0mm_P15.00mm_FKS3_FKP3","Capacitor_THT/C_Rect_L18.0mm_W5.0mm_P15.00mm_FKS3_FKP3","Capacitor_THT/C_Rect_L18.0mm_W6.0mm_P15.00mm_FKS3_FKP3","Capacitor_THT/C_Rect_L18.0mm_W7.0mm_P15.00mm_FKS3_FKP3","Capacitor_THT/C_Rect_L18.0mm_W8.0mm_P15.00mm_FKS3_FKP3","Capacitor_THT/C_Rect_L18.0mm_W9.0mm_P15.00mm_FKS3_FKP3","Capacitor_THT/C_Rect_L19.0mm_W11.0mm_P15.00mm_MKS4","Capacitor_THT/C_Rect_L19.0mm_W5.0mm_P15.00mm_MKS4","Capacitor_THT/C_Rect_L19.0mm_W6.0mm_P15.00mm_MKS4","Capacitor_THT/C_Rect_L19.0mm_W7.0mm_P15.00mm_MKS4","Capacitor_THT/C_Rect_L19.0mm_W8.0mm_P15.00mm_MKS4","Capacitor_THT/C_Rect_L19.0mm_W9.0mm_P15.00mm_MKS4","Capacitor_THT/C_Rect_L24.0mm_W10.1mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W10.3mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W10.9mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W12.2mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W12.6mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W12.8mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W7.0mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W8.3mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L24.0mm_W8.6mm_P22.50mm_MKT","Capacitor_THT/C_Rect_L26.5mm_W10.5mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L26.5mm_W11.5mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L26.5mm_W5.0mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L26.5mm_W6.0mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L26.5mm_W7.0mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L26.5mm_W8.5mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L27.0mm_W11.0mm_P22.00mm","Capacitor_THT/C_Rect_L27.0mm_W9.0mm_P22.00mm","Capacitor_THT/C_Rect_L27.0mm_W9.0mm_P23.00mm","Capacitor_THT/C_Rect_L28.0mm_W10.0mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L28.0mm_W12.0mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L28.0mm_W8.0mm_P22.50mm_MKS4","Capacitor_THT/C_Rect_L29.0mm_W11.0mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W11.9mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W12.2mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W13.0mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W13.8mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W14.2mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W16.0mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W7.6mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W7.8mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W7.9mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W9.1mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L29.0mm_W9.6mm_P27.50mm_MKT","Capacitor_THT/C_Rect_L31.5mm_W11.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L31.5mm_W13.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L31.5mm_W15.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L31.5mm_W17.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L31.5mm_W20.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L31.5mm_W9.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L32.0mm_W15.0mm_P27.00mm","Capacitor_THT/C_Rect_L33.0mm_W13.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L33.0mm_W15.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L33.0mm_W20.0mm_P27.50mm_MKS4","Capacitor_THT/C_Rect_L4.0mm_W2.5mm_P2.50mm","Capacitor_THT/C_Rect_L4.6mm_W2.0mm_P2.50mm_MKS02_FKP02","Capacitor_THT/C_Rect_L4.6mm_W3.0mm_P2.50mm_MKS02_FKP02","Capacitor_THT/C_Rect_L4.6mm_W3.8mm_P2.50mm_MKS02_FKP02","Capacitor_THT/C_Rect_L4.6mm_W4.6mm_P2.50mm_MKS02_FKP02","Capacitor_THT/C_Rect_L4.6mm_W5.5mm_P2.50mm_MKS02_FKP02","Capacitor_THT/C_Rect_L41.5mm_W11.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W13.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W15.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W17.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W19.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W20.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W24.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W31.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W35.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W40.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L41.5mm_W9.0mm_P37.50mm_MKS4","Capacitor_THT/C_Rect_L7.0mm_W2.0mm_P5.00mm","Capacitor_THT/C_Rect_L7.0mm_W2.5mm_P5.00mm","Capacitor_THT/C_Rect_L7.0mm_W3.5mm_P2.50mm_P5.00mm","Capacitor_THT/C_Rect_L7.0mm_W3.5mm_P5.00mm","Capacitor_THT/C_Rect_L7.0mm_W4.5mm_P5.00mm","Capacitor_THT/C_Rect_L7.0mm_W6.0mm_P5.00mm","Capacitor_THT/C_Rect_L7.0mm_W6.5mm_P5.00mm","Capacitor_THT/C_Rect_L7.2mm_W11.0mm_P5.00mm_FKS2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.2mm_W2.5mm_P5.00mm","Capacitor_THT/C_Rect_L7.2mm_W2.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.2mm_W3.0mm_P5.00mm_FKS2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.2mm_W3.5mm_P5.00mm","Capacitor_THT/C_Rect_L7.2mm_W3.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.2mm_W4.5mm_P5.00mm","Capacitor_THT/C_Rect_L7.2mm_W4.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.2mm_W5.0mm_P5.00mm","Capacitor_THT/C_Rect_L7.2mm_W5.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.2mm_W6.0mm_P5.00mm","Capacitor_THT/C_Rect_L7.2mm_W7.2mm_P5.00mm","Capacitor_THT/C_Rect_L7.2mm_W7.2mm_P5.00mm_FKS2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.2mm_W8.5mm_P5.00mm_FKP2_FKP2_MKS2_MKP2","Capacitor_THT/C_Rect_L7.5mm_W6.5mm_P5.00mm","Capacitor_THT/C_Rect_L9.0mm_W2.5mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W2.6mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W2.7mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W3.2mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W3.3mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W3.4mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W3.6mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W3.8mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W3.9mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W4.0mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W4.2mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W4.9mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W5.1mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W5.7mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W6.4mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W6.7mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W7.7mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W8.5mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W9.5mm_P7.50mm_MKT","Capacitor_THT/C_Rect_L9.0mm_W9.8mm_P7.50mm_MKT","Capacitor_THT/DX_5R5HxxxxU_D11.5mm_P10.00mm","Capacitor_THT/DX_5R5VxxxxU_D11.5mm_P5.00mm","Capacitor_THT/DX_5R5VxxxxU_D19.0mm_P5.00mm","Capacitor_Tantalum_SMD/CP_EIA-1608-08_AVX-J","Capacitor_Tantalum_SMD/CP_EIA-1608-08_AVX-J_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-1608-10_AVX-L","Capacitor_Tantalum_SMD/CP_EIA-1608-10_AVX-L_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-2012-12_Kemet-R","Capacitor_Tantalum_SMD/CP_EIA-2012-12_Kemet-R_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-2012-15_AVX-P","Capacitor_Tantalum_SMD/CP_EIA-2012-15_AVX-P_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-3216-10_Kemet-I","Capacitor_Tantalum_SMD/CP_EIA-3216-10_Kemet-I_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-3216-12_Kemet-S","Capacitor_Tantalum_SMD/CP_EIA-3216-12_Kemet-S_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-3216-18_Kemet-A","Capacitor_Tantalum_SMD/CP_EIA-3216-18_Kemet-A_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-3528-12_Kemet-T","Capacitor_Tantalum_SMD/CP_EIA-3528-12_Kemet-T_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-3528-15_AVX-H","Capacitor_Tantalum_SMD/CP_EIA-3528-15_AVX-H_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-3528-21_Kemet-B","Capacitor_Tantalum_SMD/CP_EIA-3528-21_Kemet-B_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-6032-15_Kemet-U","Capacitor_Tantalum_SMD/CP_EIA-6032-15_Kemet-U_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-6032-20_AVX-F","Capacitor_Tantalum_SMD/CP_EIA-6032-20_AVX-F_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-6032-28_Kemet-C","Capacitor_Tantalum_SMD/CP_EIA-6032-28_Kemet-C_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7132-20_AVX-U","Capacitor_Tantalum_SMD/CP_EIA-7132-20_AVX-U_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7132-28_AVX-C","Capacitor_Tantalum_SMD/CP_EIA-7132-28_AVX-C_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7260-15_AVX-R","Capacitor_Tantalum_SMD/CP_EIA-7260-15_AVX-R_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7260-20_AVX-M","Capacitor_Tantalum_SMD/CP_EIA-7260-20_AVX-M_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7260-28_AVX-M","Capacitor_Tantalum_SMD/CP_EIA-7260-28_AVX-M_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7260-38_AVX-R","Capacitor_Tantalum_SMD/CP_EIA-7260-38_AVX-R_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7343-15_Kemet-W","Capacitor_Tantalum_SMD/CP_EIA-7343-15_Kemet-W_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7343-20_Kemet-V","Capacitor_Tantalum_SMD/CP_EIA-7343-20_Kemet-V_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7343-30_AVX-N","Capacitor_Tantalum_SMD/CP_EIA-7343-30_AVX-N_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7343-31_Kemet-D","Capacitor_Tantalum_SMD/CP_EIA-7343-31_Kemet-D_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7343-40_Kemet-Y","Capacitor_Tantalum_SMD/CP_EIA-7343-40_Kemet-Y_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7343-43_Kemet-X","Capacitor_Tantalum_SMD/CP_EIA-7343-43_Kemet-X_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7360-38_Kemet-E","Capacitor_Tantalum_SMD/CP_EIA-7360-38_Kemet-E_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7361-38_AVX-V","Capacitor_Tantalum_SMD/CP_EIA-7361-38_AVX-V_HandSolder","Capacitor_Tantalum_SMD/CP_EIA-7361-438_AVX-U","Capacitor_Tantalum_SMD/CP_EIA-7361-438_AVX-U_HandSolder","Connector/BJB_Pico_46.110.1001_Receptacle_Horizontal","Connector/Banana_Cliff_FCR7350B_S16N-PC_Horizontal","Connector/Banana_Cliff_FCR7350G_S16N-PC_Horizontal","Connector/Banana_Cliff_FCR7350L_S16N-PC_Horizontal","Connector/Banana_Cliff_FCR7350N_S16N-PC_Horizontal","Connector/Banana_Cliff_FCR7350R_S16N-PC_Horizontal","Connector/Banana_Cliff_FCR7350Y_S16N-PC_Horizontal","Connector/Banana_Jack_1Pin","Connector/Banana_Jack_2Pin","Connector/Banana_Jack_3Pin","Connector/CUI_PD-30","Connector/CUI_PD-30S","Connector/CUI_PD-30S_CircularHoles","Connector/CalTest_CT3151","Connector/Conn_C14_Receptacle_RightAngle_Schurter_DD21.01xx","Connector/Connector_SFP_and_Cage","Connector/DTF13-12Px","Connector/FanPinHeader_1x03_P2.54mm_Vertical","Connector/FanPinHeader_1x04_P2.54mm_Vertical","Connector/GB042-34S-H10","Connector/IHI_B6A-PCB-45_Vertical","Connector/JWT_A3963_1x02_P3.96mm_Vertical","Connector/Joint-Tech_C5080WR-04P_1x04_P5.08mm_Vertical","Connector/NS-Tech_Grove_1x04_P2mm_Vertical","Connector/OCN_OK-01GM030-04_2x15_P0.4mm_Vertical","Connector/SpringContact_Harwin_S1941-46R","Connector/Tag-Connect_TC2030-IDC-FP_2x03_P1.27mm_Vertical","Connector/Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_Vertical","Connector/Tag-Connect_TC2050-IDC-FP_2x05_P1.27mm_Vertical","Connector/Tag-Connect_TC2050-IDC-NL_2x05_P1.27mm_Vertical","Connector/Tag-Connect_TC2050-IDC-NL_2x05_P1.27mm_Vertical_with_bottom_clip","Connector/Tag-Connect_TC2070-IDC-FP_2x07_P1.27mm_Vertical","Connector_AMASS/AMASS_MR30PW-FB_1x03_P3.50mm_Horizontal","Connector_AMASS/AMASS_MR30PW-M_1x03_P3.50mm_Horizontal","Connector_AMASS/AMASS_XT30PW-F_1x02_P2.50mm_Horizontal","Connector_AMASS/AMASS_XT30PW-M_1x02_P2.50mm_Horizontal","Connector_AMASS/AMASS_XT30U-F_1x02_P5.0mm_Vertical","Connector_AMASS/AMASS_XT30U-M_1x02_P5.0mm_Vertical","Connector_AMASS/AMASS_XT30UPB-F_1x02_P5.0mm_Vertical","Connector_AMASS/AMASS_XT30UPB-M_1x02_P5.0mm_Vertical","Connector_AMASS/AMASS_XT60-F_1x02_P7.20mm_Vertical","Connector_AMASS/AMASS_XT60-M_1x02_P7.20mm_Vertical","Connector_AMASS/AMASS_XT60IPW-M_1x03_P7.20mm_Horizontal","Connector_AMASS/AMASS_XT60PW-F_1x02_P7.20mm_Horizontal","Connector_AMASS/AMASS_XT60PW-M_1x02_P7.20mm_Horizontal","Connector_AMASS/AMASS_XT90PW-M_1x02_P10.90mm_Horizontal","Connector_Amphenol/Amphenol_M8S-03PMMR-SF8001","Connector_Audio/Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ-3524-SMT_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3513N_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3514N_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3515N_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3523N_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3524N_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3525N_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3533NG_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3533NG_Horizontal_CircularHoles","Connector_Audio/Jack_3.5mm_CUI_SJ1-3535NG_Horizontal","Connector_Audio/Jack_3.5mm_CUI_SJ1-3535NG_Horizontal_CircularHoles","Connector_Audio/Jack_3.5mm_CUI_SJ2-3593D-SMT_Horizontal","Connector_Audio/Jack_3.5mm_KoreanHropartsElec_PJ-320D-4A_Horizontal","Connector_Audio/Jack_3.5mm_Ledino_KB3SPRS_Horizontal","Connector_Audio/Jack_3.5mm_Lumberg_1503_02_Horizontal","Connector_Audio/Jack_3.5mm_Lumberg_1503_03_Horizontal","Connector_Audio/Jack_3.5mm_Lumberg_1503_07_Horizontal","Connector_Audio/Jack_3.5mm_PJ31060-I_Horizontal","Connector_Audio/Jack_3.5mm_PJ311_Horizontal","Connector_Audio/Jack_3.5mm_PJ320D_Horizontal","Connector_Audio/Jack_3.5mm_PJ320E_Horizontal","Connector_Audio/Jack_3.5mm_QingPu_WQP-PJ398SM_Vertical_CircularHoles","Connector_Audio/Jack_3.5mm_Switronic_ST-005-G_horizontal","Connector_Audio/Jack_3.5mm_Technik_TWP-3002_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NJ2FD-V_Vertical","Connector_Audio/Jack_6.35mm_Neutrik_NJ3FD-V_Vertical","Connector_Audio/Jack_6.35mm_Neutrik_NJ5FD-V_Vertical","Connector_Audio/Jack_6.35mm_Neutrik_NJ6FD-V_Vertical","Connector_Audio/Jack_6.35mm_Neutrik_NJ6TB-V_Vertical","Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HCD2_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HFD2_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HFD3_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ4HHD2_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HCD2_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HCD3_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD2-AU_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD2_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD3_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HFD4_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NMJ6HHD2_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ3HF-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HF-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HF_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HH-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ4HH_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF-1-AU_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF-AU_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HF_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HH-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HH-AU_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HH_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HM-1-AU_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HM-1-PRE_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NRJ6HM-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HC_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HF-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HH-1_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NSJ12HL_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NSJ8HC_Horizontal","Connector_Audio/Jack_6.35mm_Neutrik_NSJ8HL_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-H-0_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-H_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-V-0_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ10FI-V_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-H-0_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-H_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-V-0_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ5FI-V_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-H-0_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-H-DA_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-H_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-V-0_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-V-DA_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FA-V_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-H-0_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-H_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-V-0_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ6FI-V_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-H-0_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-H_Horizontal","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-V-0_Vertical","Connector_Audio/Jack_XLR-6.35mm_Neutrik_NCJ9FI-V_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAAH-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAAH1-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAAH1-DA_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAAH1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAAH2-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAAH2_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAAV-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAAV1-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAAV1-DA_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAAV1_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAAV2-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAAV2_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAH-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAH1-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAH1-DA_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAH1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAH2-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAH2-DA_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAH2_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHL-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHL1-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHL1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHR-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHR1-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHR1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHR2-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAHR2_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FAV-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAV1-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAV1-DA_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAV1_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAV2-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAV2-DA_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAV2_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBH1-B_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBH1-DA_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBH1-E_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBH1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBH2-B_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBH2-DA_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBH2-E_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBH2_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBHL1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3FBV1-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBV1-B_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBV1-DA_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBV1_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBV2-B_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBV2-DA_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBV2-SW_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3FBV2_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MAAH-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAAH-1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAAV-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MAAV-1_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MAAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MAFH-PH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAH-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAHL_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAHR_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAMH-PH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MAV-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MBH-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBH-1_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBH-B_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBH-E_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBHL-B_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBHL_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBHR-B_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBHR_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC3MBV-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MBV-1_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MBV-B_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MBV-E_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MBV-SW_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC3MBV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC4FAH-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC4FAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC4FAV-0_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC4FAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC4FBH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC4FBV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC4MAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC4MAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC4MBH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC4MBV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5FAH-0_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5FAH-DA_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5FAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5FAV-DA_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5FAV-SW_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5FAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5FBH-B_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5FBH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5FBV-B_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5FBV-SW_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5FBV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5MAH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5MAV-SW_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5MAV_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5MBH-B_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5MBH_Horizontal","Connector_Audio/Jack_XLR_Neutrik_NC5MBV-B_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5MBV-SW_Vertical","Connector_Audio/Jack_XLR_Neutrik_NC5MBV_Vertical","Connector_Audio/Jack_speakON-6.35mm_Neutrik_NLJ2MDXX-H_Horizontal","Connector_Audio/Jack_speakON-6.35mm_Neutrik_NLJ2MDXX-V_Vertical","Connector_Audio/Jack_speakON_Neutrik_NL2MDXX-H-3_Horizontal","Connector_Audio/Jack_speakON_Neutrik_NL2MDXX-V_Vertical","Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-H-2_Horizontal","Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-H-3_Horizontal","Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-V-2_Vertical","Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-V-3_Vertical","Connector_Audio/Jack_speakON_Neutrik_NL4MDXX-V_Vertical","Connector_Audio/Jack_speakON_Neutrik_NL8MDXX-V-3_Vertical","Connector_Audio/Jack_speakON_Neutrik_NL8MDXX-V_Vertical","Connector_Audio/Jack_speakON_Neutrik_NLT4MD-V_Vertical","Connector_Audio/MiniXLR-5_Switchcraft_TRAPC_Horizontal","Connector_Audio/Plug_3.5mm_CUI_SP-3541","Connector_BarrelJack/BarrelJack_CLIFF_FC681465S_SMT_Horizontal","Connector_BarrelJack/BarrelJack_CUI_PJ-036AH-SMT_Horizontal","Connector_BarrelJack/BarrelJack_CUI_PJ-063AH_Horizontal","Connector_BarrelJack/BarrelJack_CUI_PJ-063AH_Horizontal_CircularHoles","Connector_BarrelJack/BarrelJack_CUI_PJ-079BH_Horizontal","Connector_BarrelJack/BarrelJack_CUI_PJ-102AH_Horizontal","Connector_BarrelJack/BarrelJack_GCT_DCJ200-10-A_Horizontal","Connector_BarrelJack/BarrelJack_Horizontal","Connector_BarrelJack/BarrelJack_Kycon_KLDX-0202-xC_Horizontal","Connector_BarrelJack/BarrelJack_SwitchcraftConxall_RAPC10U_Horizontal","Connector_BarrelJack/BarrelJack_Wuerth_694102107102_1.0x3.9mm","Connector_BarrelJack/BarrelJack_Wuerth_694103107102_1.35x3.9mm","Connector_BarrelJack/BarrelJack_Wuerth_694106106102_2.0x5.5mm","Connector_BarrelJack/BarrelJack_Wuerth_694108106102_2.5x5.5mm","Connector_BarrelJack/BarrelJack_Wuerth_6941xx301002","Connector_Card/CF-Card_3M_N7E50-A516xx-30","Connector_Card/CF-Card_3M_N7E50-E516xx-30","Connector_Card/SD-SIM_microSD-microSIM_Molex_104168-1620","Connector_Card/SD_Card_Device_16mm_SlotDepth","Connector_Card/SD_Hirose_DM1AA_SF_PEJ82","Connector_Card/SD_Kyocera_145638009211859+","Connector_Card/SD_Kyocera_145638009511859+","Connector_Card/SD_Kyocera_145638109211859+","Connector_Card/SD_Kyocera_145638109511859+","Connector_Card/SD_TE_2041021","Connector_Card/microSD_HC_Hirose_DM3AT-SF-PEJM5","Connector_Card/microSD_HC_Hirose_DM3BT-DSF-PEJS","Connector_Card/microSD_HC_Hirose_DM3D-SF","Connector_Card/microSD_HC_Molex_104031-0811","Connector_Card/microSD_HC_Molex_47219-2001","Connector_Card/microSD_HC_Wuerth_693072010801","Connector_Card/microSIM_JAE_SF53S006VCBR2000","Connector_Card/nanoSIM_GCT_SIM8060-6-0-14-00","Connector_Card/nanoSIM_GCT_SIM8060-6-1-14-00","Connector_Card/nanoSIM_Hinged_CUI_NSIM-2-C","Connector_Coaxial/BNC_Amphenol_031-5539_Vertical","Connector_Coaxial/BNC_Amphenol_031-6575_Horizontal","Connector_Coaxial/BNC_Amphenol_B6252HB-NPP3G-50_Horizontal","Connector_Coaxial/BNC_PanelMountable_Vertical","Connector_Coaxial/BNC_TEConnectivity_1478035_Horizontal","Connector_Coaxial/BNC_TEConnectivity_1478204_Vertical","Connector_Coaxial/BNC_Win_364A2x95_Horizontal","Connector_Coaxial/CoaxialSwitch_Hirose_MS-156C3_Horizontal","Connector_Coaxial/LEMO-EPG.00.302.NLN","Connector_Coaxial/LEMO-EPL.00.250.NTN","Connector_Coaxial/MMCX_Molex_73415-0961_Horizontal_0.8mm-PCB","Connector_Coaxial/MMCX_Molex_73415-0961_Horizontal_1.0mm-PCB","Connector_Coaxial/MMCX_Molex_73415-0961_Horizontal_1.6mm-PCB","Connector_Coaxial/MMCX_Molex_73415-1471_Vertical","Connector_Coaxial/SMA_Amphenol_132134-10_Vertical","Connector_Coaxial/SMA_Amphenol_132134-11_Vertical","Connector_Coaxial/SMA_Amphenol_132134-14_Vertical","Connector_Coaxial/SMA_Amphenol_132134-16_Vertical","Connector_Coaxial/SMA_Amphenol_132134_Vertical","Connector_Coaxial/SMA_Amphenol_132203-12_Horizontal","Connector_Coaxial/SMA_Amphenol_132289_EdgeMount","Connector_Coaxial/SMA_Amphenol_132291-12_Vertical","Connector_Coaxial/SMA_Amphenol_132291_Vertical","Connector_Coaxial/SMA_Amphenol_901-143_Horizontal","Connector_Coaxial/SMA_Amphenol_901-144_Vertical","Connector_Coaxial/SMA_BAT_Wireless_BWSMA-KWE-Z001","Connector_Coaxial/SMA_Molex_73251-1153_EdgeMount_Horizontal","Connector_Coaxial/SMA_Molex_73251-2120_EdgeMount_Horizontal","Connector_Coaxial/SMA_Molex_73251-2200_Horizontal","Connector_Coaxial/SMA_Samtec_SMA-J-P-H-ST-EM1_EdgeMount","Connector_Coaxial/SMA_Wurth_60312002114503_Vertical","Connector_Coaxial/SMA_Wurth_60312102114405_Vertical","Connector_Coaxial/SMB_Jack_Vertical","Connector_Coaxial/U.FL_Hirose_U.FL-R-SMT-1_Vertical","Connector_Coaxial/U.FL_Molex_MCRF_73412-0110_Vertical","Connector_Coaxial/WR-MMCX_Wuerth_66011102111302_Horizontal","Connector_Coaxial/WR-MMCX_Wuerth_66012102111404_Vertical","Connector_DIN/DIN41612_B2_2x16_Female_Vertical_THT","Connector_DIN/DIN41612_B2_2x16_Male_Horizontal_THT","Connector_DIN/DIN41612_B2_2x8_Female_Vertical_THT","Connector_DIN/DIN41612_B2_2x8_Male_Horizontal_THT","Connector_DIN/DIN41612_B3_2x10_Female_Vertical_THT","Connector_DIN/DIN41612_B3_2x10_Male_Horizontal_THT","Connector_DIN/DIN41612_B3_2x5_Female_Vertical_THT","Connector_DIN/DIN41612_B3_2x5_Male_Horizontal_THT","Connector_DIN/DIN41612_B_1x32_Female_Vertical_THT","Connector_DIN/DIN41612_B_1x32_Male_Horizontal_THT","Connector_DIN/DIN41612_B_2x16_Female_Vertical_THT","Connector_DIN/DIN41612_B_2x16_Male_Horizontal_THT","Connector_DIN/DIN41612_B_2x32_Female_Vertical_THT","Connector_DIN/DIN41612_B_2x32_Male_Horizontal_THT","Connector_DIN/DIN41612_C2_2x16_Female_Vertical_THT","Connector_DIN/DIN41612_C2_2x16_Male_Horizontal_THT","Connector_DIN/DIN41612_C2_3x16_Female_Vertical_THT","Connector_DIN/DIN41612_C2_3x16_Male_Horizontal_THT","Connector_DIN/DIN41612_C3_2x10_Female_Vertical_THT","Connector_DIN/DIN41612_C3_2x10_Male_Horizontal_THT","Connector_DIN/DIN41612_C3_3x10_Female_Vertical_THT","Connector_DIN/DIN41612_C3_3x10_Male_Horizontal_THT","Connector_DIN/DIN41612_C_1x32_Female_Vertical_THT","Connector_DIN/DIN41612_C_1x32_Male_Horizontal_THT","Connector_DIN/DIN41612_C_2x16_Female_Vertical_THT","Connector_DIN/DIN41612_C_2x16_Male_Horizontal_THT","Connector_DIN/DIN41612_C_2x32_Female_Vertical_THT","Connector_DIN/DIN41612_C_2x32_Male_Horizontal_THT","Connector_DIN/DIN41612_C_3x16_Female_Vertical_THT","Connector_DIN/DIN41612_C_3x16_Male_Horizontal_THT","Connector_DIN/DIN41612_C_3x32_Female_Vertical_THT","Connector_DIN/DIN41612_C_3x32_Male_Horizontal_THT","Connector_DIN/DIN41612_D_2x16_Female_Vertical_THT","Connector_DIN/DIN41612_D_2x16_Male_Horizontal_THT","Connector_DIN/DIN41612_D_2x8_Female_Vertical_THT","Connector_DIN/DIN41612_D_2x8_Male_Horizontal_THT","Connector_DIN/DIN41612_E_2x16_Female_Vertical_THT","Connector_DIN/DIN41612_E_2x16_Male_Horizontal_THT","Connector_DIN/DIN41612_E_2x16_RowsAC_Female_Vertical_THT","Connector_DIN/DIN41612_E_2x16_RowsAC_Male_Horizontal_THT","Connector_DIN/DIN41612_E_3x16_Female_Vertical_THT","Connector_DIN/DIN41612_E_3x16_Male_Horizontal_THT","Connector_DIN/DIN41612_F_2x16_Female_Vertical_THT","Connector_DIN/DIN41612_F_2x16_Male_Horizontal_THT","Connector_DIN/DIN41612_F_2x16_RowsZD_Female_Vertical_THT","Connector_DIN/DIN41612_F_2x16_RowsZD_Male_Horizontal_THT","Connector_DIN/DIN41612_F_3x16_Female_Vertical_THT","Connector_DIN/DIN41612_F_3x16_Male_Horizontal_THT","Connector_DIN/DIN41612_M-flat_3x14+6_Female_Vertical_THT","Connector_DIN/DIN41612_M-flat_3x20+4_Female_Vertical_THT","Connector_DIN/DIN41612_M-flat_3x26+2_Female_Vertical_THT","Connector_DIN/DIN41612_M-flat_3x8+8_Female_Vertical_THT","Connector_DIN/DIN41612_M-invers_3x14+6_Female_Horizontal_THT","Connector_DIN/DIN41612_M-invers_3x14+6_Male_Vertical_THT","Connector_DIN/DIN41612_M-invers_3x2+10_Female_Horizontal_THT","Connector_DIN/DIN41612_M-invers_3x2+10_Male_Vertical_THT","Connector_DIN/DIN41612_M-invers_3x20+4_Female_Horizontal_THT","Connector_DIN/DIN41612_M-invers_3x20+4_Male_Vertical_THT","Connector_DIN/DIN41612_M-invers_3x26+2_Female_Horizontal_THT","Connector_DIN/DIN41612_M-invers_3x26+2_Male_Vertical_THT","Connector_DIN/DIN41612_M-invers_3x8+8_Female_Horizontal_THT","Connector_DIN/DIN41612_M-invers_3x8+8_Male_Vertical_THT","Connector_DIN/DIN41612_M_3x14+6_Female_Vertical_THT","Connector_DIN/DIN41612_M_3x14+6_Male_Horizontal_THT","Connector_DIN/DIN41612_M_3x20+4_Female_Vertical_THT","Connector_DIN/DIN41612_M_3x20+4_Male_Horizontal_THT","Connector_DIN/DIN41612_M_3x26+2_Female_Vertical_THT","Connector_DIN/DIN41612_M_3x26+2_Male_Horizontal_THT","Connector_DIN/DIN41612_M_3x8+8_Female_Vertical_THT","Connector_DIN/DIN41612_M_3x8+8_Male_Horizontal_THT","Connector_DIN/DIN41612_Q2_2x16_Female_Horizontal_THT","Connector_DIN/DIN41612_Q2_2x16_Male_Vertical_THT","Connector_DIN/DIN41612_Q3_2x10_Female_Horizontal_THT","Connector_DIN/DIN41612_Q3_2x10_Male_Vertical_THT","Connector_DIN/DIN41612_Q_2x32_Female_Horizontal_THT","Connector_DIN/DIN41612_Q_2x32_Male_Vertical_THT","Connector_DIN/DIN41612_R2_2x16_Female_Horizontal_THT","Connector_DIN/DIN41612_R2_2x16_Male_Vertical_THT","Connector_DIN/DIN41612_R2_3x16_Female_Horizontal_THT","Connector_DIN/DIN41612_R2_3x16_Male_Vertical_THT","Connector_DIN/DIN41612_R3_2x10_Female_Horizontal_THT","Connector_DIN/DIN41612_R3_2x10_Male_Vertical_THT","Connector_DIN/DIN41612_R3_3x10_Female_Horizontal_THT","Connector_DIN/DIN41612_R3_3x10_Male_Vertical_THT","Connector_DIN/DIN41612_R_1x32_Female_Horizontal_THT","Connector_DIN/DIN41612_R_1x32_Male_Vertical_THT","Connector_DIN/DIN41612_R_2x16_Female_Horizontal_THT","Connector_DIN/DIN41612_R_2x16_Male_Vertical_THT","Connector_DIN/DIN41612_R_2x32_Female_Horizontal_THT","Connector_DIN/DIN41612_R_2x32_Male_Vertical_THT","Connector_DIN/DIN41612_R_3x16_Female_Horizontal_THT","Connector_DIN/DIN41612_R_3x16_Male_Vertical_THT","Connector_DIN/DIN41612_R_3x32_Female_Horizontal_THT","Connector_DIN/DIN41612_R_3x32_Male_Vertical_THT","Connector_Dsub/DSUB-15-HD_Pins_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-15-HD_Pins_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-15-HD_Pins_Vertical_P2.29x1.98mm_MountingHoles","Connector_Dsub/DSUB-15-HD_Socket_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-15-HD_Socket_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-15-HD_Socket_Vertical_P2.29x1.98mm_MountingHoles","Connector_Dsub/DSUB-15_Pins_EdgeMount_P2.77mm","Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-15_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-15_Pins_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-15_Pins_Vertical_P2.77x2.84mm_MountingHoles","Connector_Dsub/DSUB-15_Socket_EdgeMount_P2.77mm","Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-15_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-15_Socket_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-15_Socket_Vertical_P2.77x2.84mm_MountingHoles","Connector_Dsub/DSUB-25_Pins_EdgeMount_P2.77mm","Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-25_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-25_Pins_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-25_Pins_Vertical_P2.77x2.84mm_MountingHoles","Connector_Dsub/DSUB-25_Socket_EdgeMount_P2.77mm","Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-25_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-25_Socket_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-25_Socket_Vertical_P2.77x2.84mm_MountingHoles","Connector_Dsub/DSUB-26-HD_Pins_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-26-HD_Pins_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-26-HD_Pins_Vertical_P2.29x1.98mm_MountingHoles","Connector_Dsub/DSUB-26-HD_Socket_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-26-HD_Socket_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-26-HD_Socket_Vertical_P2.29x1.98mm_MountingHoles","Connector_Dsub/DSUB-37_Pins_EdgeMount_P2.77mm","Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-37_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-37_Pins_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-37_Pins_Vertical_P2.77x2.84mm_MountingHoles","Connector_Dsub/DSUB-37_Socket_EdgeMount_P2.77mm","Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-37_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-37_Socket_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-37_Socket_Vertical_P2.77x2.84mm_MountingHoles","Connector_Dsub/DSUB-44-HD_Pins_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-44-HD_Pins_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-44-HD_Pins_Vertical_P2.29x1.98mm_MountingHoles","Connector_Dsub/DSUB-44-HD_Socket_Horizontal_P2.29x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-44-HD_Socket_Horizontal_P2.29x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-44-HD_Socket_Vertical_P2.29x1.98mm_MountingHoles","Connector_Dsub/DSUB-62-HD_Pins_Horizontal_P2.41x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-62-HD_Pins_Horizontal_P2.41x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-62-HD_Pins_Vertical_P2.41x1.98mm_MountingHoles","Connector_Dsub/DSUB-62-HD_Socket_Horizontal_P2.41x1.90mm_EdgePinOffset3.03mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-62-HD_Socket_Horizontal_P2.41x2.54mm_EdgePinOffset8.35mm_Housed_MountingHolesOffset10.89mm","Connector_Dsub/DSUB-62-HD_Socket_Vertical_P2.41x1.98mm_MountingHoles","Connector_Dsub/DSUB-9_Pins_EdgeMount_P2.77mm","Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-9_Pins_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-9_Pins_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-9_Pins_Vertical_P2.77x2.84mm_MountingHoles","Connector_Dsub/DSUB-9_Socket_EdgeMount_P2.77mm","Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.54mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset15.98mm","Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset14.56mm_Housed_MountingHolesOffset8.20mm","Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset4.94mm_Housed_MountingHolesOffset4.94mm","Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm","Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.40mm","Connector_Dsub/DSUB-9_Socket_Horizontal_P2.77x2.84mm_EdgePinOffset9.90mm_Housed_MountingHolesOffset11.32mm","Connector_Dsub/DSUB-9_Socket_Vertical_P2.77x2.84mm","Connector_Dsub/DSUB-9_Socket_Vertical_P2.77x2.84mm_MountingHoles","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11004_1x04-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11005_1x05-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11006_1x06-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11007_1x07-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11008_1x08-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11009_1x09-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11010_1x10-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11011_1x11-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11012_1x12-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11013_1x13-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11014_1x14-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11015_1x15-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11016_1x16-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11017_1x17-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11018_1x18-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11019_1x19-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11020_1x20-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11021_1x21-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11022_1x22-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11023_1x23-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11024_1x24-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11025_1x25-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11026_1x26-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11027_1x27-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11028_1x28-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11029_1x29-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11030_1x30-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11031_1x31-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11032_1x32-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11033_1x33-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11034_1x34-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11035_1x35-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11036_1x36-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11037_1x37-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11038_1x38-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11039_1x39-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11040_1x40-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11041_1x41-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11042_1x42-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11043_1x43-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11044_1x44-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11045_1x45-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11046_1x46-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11047_1x47-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11048_1x48-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11049_1x49-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11050_1x50-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11051_1x51-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11052_1x52-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11053_1x53-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11054_1x54-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11055_1x55-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11056_1x56-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11057_1x57-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11058_1x58-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11059_1x59-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32Q-1A7x1-11060_1x60-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11004_1x04-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11005_1x05-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11006_1x06-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11007_1x07-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11008_1x08-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11009_1x09-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11010_1x10-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11011_1x11-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11012_1x12-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11013_1x13-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11014_1x14-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11015_1x15-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11016_1x16-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11017_1x17-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11018_1x18-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11019_1x19-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11020_1x20-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11021_1x21-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11022_1x22-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11023_1x23-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11024_1x24-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11025_1x25-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11026_1x26-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11027_1x27-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11028_1x28-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11029_1x29-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11030_1x30-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11031_1x31-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11032_1x32-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11033_1x33-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11034_1x34-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11035_1x35-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11036_1x36-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11037_1x37-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11038_1x38-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11039_1x39-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11040_1x40-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11041_1x41-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11042_1x42-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11043_1x43-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11044_1x44-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11045_1x45-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11046_1x46-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11047_1x47-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11048_1x48-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11049_1x49-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11050_1x50-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11051_1x51-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11052_1x52-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11053_1x53-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11054_1x54-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11055_1x55-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11056_1x56-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11057_1x57-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11058_1x58-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11059_1x59-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Amphenol_F32R-1A7x1-11060_1x60-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-10S-0.5SH_1x10-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-11S-0.5SH_1x11-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-12S-0.5SH_1x12-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-13S-0.5SH_1x13-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-14S-0.5SH_1x14-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-15S-0.5SH_1x15-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-16S-0.5SH_1x16-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-17S-0.5SH_1x17-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-18S-0.5SH_1x18-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-19S-0.5SH_1x19-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-20S-0.5SH_1x20-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-22S-0.5SH_1x22-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-24S-0.5SH_1x24-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-25S-0.5SH_1x25-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-26S-0.5SH_1x26-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-28S-0.5SH_1x28-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-30S-0.5SH_1x30-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-32S-0.5SH_1x32-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-33S-0.5SH_1x33-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-34S-0.5SH_1x34-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-35S-0.5SH_1x35-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-36S-0.5SH_1x36-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-40S-0.5SH_1x40-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-45S-0.5SH_1x45-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-50S-0.5SH_1x50-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-53S-0.5SH_1x53-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-6S-0.5SH_1x06-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH12-8S-0.5SH_1x08-1MP_P0.50mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-13S-0.3SHW_2Rows-13Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-15S-0.3SHW_2Rows-15Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-17S-0.3SHW_2Rows-17Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-19S-0.3SHW_2Rows-19Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-21S-0.3SHW_2Rows-21Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-23S-0.3SHW_2Rows-23Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-25S-0.3SHW_2Rows-25Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-27S-0.3SHW_2Rows-27Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-29S-0.3SHW_2Rows-29Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-31S-0.3SHW_2Rows-31Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-33S-0.3SHW_2Rows-33Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-35S-0.3SHW_2Rows-35Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-37S-0.3SHW_2Rows-37Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-39S-0.3SHW_2Rows-39Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-41S-0.3SHW_2Rows-41Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-45S-0.3SHW_2Rows-45Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-51S-0.3SHW_2Rows-51Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-55S-0.3SHW_2Rows-55Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-57S-0.3SHW_2Rows-57Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-61S-0.3SHW_2Rows-61Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH26-71S-0.3SHW_2Rows-71Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Hirose_FH41-30S-0.5SH_1x30_1MP_1SH_P0.5mm_Horizontal","Connector_FFC-FPC/JAE_FF0825SA1_2Rows-25Pins_P0.40mm_Horizontal","Connector_FFC-FPC/JAE_FF0829SA1_2Rows-29Pins_P0.40mm_Horizontal","Connector_FFC-FPC/JAE_FF0841SA1_2Rows-41Pins_P0.40mm_Horizontal","Connector_FFC-FPC/JAE_FF0851SA1_2Rows-51Pins_P0.40mm_Horizontal","Connector_FFC-FPC/JAE_FF0871SA1_2Rows-71Pins_P0.40mm_Horizontal","Connector_FFC-FPC/JAE_FF0881SA1_2Rows-81Pins_P0.40mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S04FCA-00_1x4-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S05FCA-00_1x5-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S06FCA-00_1x6-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S07FCA-00_1x7-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S08FCA-00_1x8-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S09FCA-00_1x9-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S10FCA-00_1x10-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S11FCA-00_1x11-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S12FCA-00_1x12-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S13FCA-00_1x13-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S14FCA-00_1x14-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S15FCA-00_1x15-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S16FCA-00_1x16-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S17FCA-00_1x17-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S18FCA-00_1x18-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S19FCA-00_1x19-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S20FCA-00_1x20-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S21FCA-00_1x21-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S22FCA-00_1x22-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S23FCA-00_1x23-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S24FCA-00_1x24-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S25FCA-00_1x25-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S26FCA-00_1x26-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S27FCA-00_1x27-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S28FCA-00_1x28-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/JUSHUO_AFA07-S29FCA-00_1x29-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/Jushuo_AFC07-S06FCA-00_1x6-1MP_P0.50_Horizontal","Connector_FFC-FPC/Jushuo_AFC07-S24FCA-00_1x24-1MP_P0.50_Horizontal","Connector_FFC-FPC/Molex_200528-0040_1x04-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0050_1x05-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0060_1x06-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0070_1x07-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0080_1x08-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0090_1x09-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0100_1x10-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0110_1x11-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0120_1x12-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0130_1x13-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0140_1x14-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0150_1x15-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0160_1x16-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0170_1x17-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0180_1x18-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0190_1x19-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0200_1x20-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0210_1x21-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0220_1x22-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0230_1x23-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0240_1x24-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0250_1x25-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0260_1x26-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0270_1x27-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0280_1x28-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0290_1x29-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_200528-0300_1x30-1MP_P1.00mm_Horizontal","Connector_FFC-FPC/Molex_502231-1500_1x15-1SH_P0.5mm_Vertical","Connector_FFC-FPC/Molex_502231-2400_1x24-1SH_P0.5mm_Vertical","Connector_FFC-FPC/Molex_502231-3300_1x33-1SH_P0.5mm_Vertical","Connector_FFC-FPC/Molex_502244-1530_1x15-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Molex_502244-2430_1x24-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Molex_502244-3330_1x33-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Molex_502250-1791_2Rows-17Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-2191_2Rows-21Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-2391_2Rows-23Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-2791_2Rows-27Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-3391_2Rows-33Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-3591_2Rows-35Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-3991_2Rows-39Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-4191_2Rows-41Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_502250-5191_2Rows-51Pins-1MP_P0.60mm_Horizontal","Connector_FFC-FPC/Molex_52559-3652_2x18-1MP_P0.5mm_Vertical","Connector_FFC-FPC/Molex_54132-5033_1x50-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Molex_54548-1071_1x10-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/Omron_XF2M-4015-1A_1x40-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_0-1734839-5_1x05-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_0-1734839-6_1x06-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_0-1734839-7_1x07-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_0-1734839-8_1x08-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_0-1734839-9_1x09-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-0_1x10-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-1_1x11-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-2_1x12-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-3_1x13-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-4_1x14-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-5_1x15-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-6_1x16-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-7_1x17-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-8_1x18-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-1734839-9_1x19-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_1-84952-0_1x10-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-1_1x11-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-2_1x12-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-3_1x13-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-4_1x14-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-5_1x15-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-6_1x16-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-7_1x17-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-8_1x18-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84952-9_1x19-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-0_1x10-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-1_1x11-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-2_1x12-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-3_1x13-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-4_1x14-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-5_1x15-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-6_1x16-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-7_1x17-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-8_1x18-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84953-9_1x19-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_1-84982-0_2Rows-10Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-1_2Rows-11Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-2_2Rows-12Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-3_2Rows-13Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-4_2Rows-14Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-5_2Rows-15Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-6_2Rows-16Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-7_2Rows-17Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-8_2Rows-18Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_1-84982-9_2Rows-19Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-1734839-0_1x20-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-1_1x21-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-2_1x22-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-3_1x23-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-4_1x24-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-5_1x25-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-6_1x26-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-7_1x27-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-8_1x28-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-1734839-9_1x29-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_2-84952-0_1x20-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-1_1x21-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-2_1x22-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-3_1x23-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-4_1x24-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-5_1x25-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-6_1x26-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-7_1x27-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-8_1x28-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84952-9_1x29-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-0_1x20-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-1_1x21-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-2_1x22-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-3_1x23-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-4_1x24-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-5_1x25-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-6_1x26-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-7_1x27-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-8_1x28-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84953-9_1x29-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_2-84982-0_2Rows-20Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-1_2Rows-21Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-2_2Rows-22Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-3_2Rows-23Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-4_2Rows-24Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-5_2Rows-25Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-6_2Rows-26Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-7_2Rows-27Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-8_2Rows-28Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_2-84982-9_2Rows-29Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_3-1734839-0_1x30-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-1_1x31-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-2_1x32-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-3_1x33-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-4_1x34-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-5_1x35-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-6_1x36-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-7_1x37-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-8_1x38-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-1734839-9_1x39-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_3-84952-0_1x30-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_3-84953-0_1x30-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_3-84982-0_2Rows-30Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_4-1734839-0_1x40-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-1_1x41-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-2_1x42-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-3_1x43-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-4_1x44-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-5_1x45-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-6_1x46-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-7_1x47-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-8_1x48-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_4-1734839-9_1x49-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_5-1734839-0_1x50-1MP_P0.5mm_Horizontal","Connector_FFC-FPC/TE_84952-4_1x04-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84952-5_1x05-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84952-6_1x06-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84952-7_1x07-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84952-8_1x08-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84952-9_1x09-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84953-4_1x04-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84953-5_1x05-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84953-6_1x06-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84953-7_1x07-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84953-8_1x08-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84953-9_1x09-1MP_P1.0mm_Horizontal","Connector_FFC-FPC/TE_84982-4_2Rows-04Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_84982-5_2Rows-05Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_84982-6_2Rows-06Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_84982-7_2Rows-07Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_84982-8_2Rows-08Pins-P1.0mm_Vertical","Connector_FFC-FPC/TE_84982-9_2Rows-09Pins-P1.0mm_Vertical","Connector_FFC-FPC/Wuerth_68611214422_1x12-1MP_P1.0mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110213001xxx_1x02-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110213002xxx_1x02-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110213010xxx_1x02-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110313001xxx_1x03-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110313002xxx_1x03-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110313010xxx_1x03-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110413001xxx_1x04-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110413002xxx_1x04-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110413010xxx_1x04-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110513001xxx_1x05-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110513002xxx_1x05-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110513010xxx_1x05-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110613001xxx_1x06-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110613002xxx_1x06-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110613010xxx_1x06-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110713001xxx_1x07-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110713002xxx_1x07-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110713010xxx_1x07-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110813001xxx_1x08-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110813002xxx_1x08-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110813010xxx_1x08-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110913001xxx_1x09-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14110913002xxx_1x09-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14110913010xxx_1x09-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14111013001xxx_1x10-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14111013002xxx_1x10-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14111013010xxx_1x10-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14111113001xxx_1x11-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14111113002xxx_1x11-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14111113010xxx_1x11-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14111213001xxx_1x12-MP_P2.54mm_Vertical","Connector_Harting/Harting_har-flexicon_14111213002xxx_1x12-MP_P2.54mm_Horizontal","Connector_Harting/Harting_har-flexicon_14111213010xxx_1x12-MP_P2.54mm_Horizontal","Connector_Harwin/Harwin_Gecko-G125-FVX0605L0X_2x03_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-FVX1005L0X_2x05_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-FVX1205L0X_2x06_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-FVX1605L0X_2x08_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-FVX2005L0X_2x10_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-FVX2605L0X_2x13_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-FVX3405L0X_2x17_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-FVX5005L0X_2x25_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX0605L0X_2x03_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX0605L1X_2x03_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX1005L0X_2x05_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX1005L1X_2x05_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX1205L0X_2x06_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX1205L1X_2x06_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX1605L0X_2x08_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX1605L1X_2x08_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX2005L0X_2x10_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX2005L1X_2x10_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX2605L0X_2x13_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX2605L1X_2x13_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX3405L0X_2x17_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX3405L1X_2x17_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX5005L0X_2x25_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko-G125-MVX5005L1X_2x25_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS10605M2P_2x03_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS11005M2P_2x05_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS11205M2P_2x06_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS11605M2P_2x08_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS12005M2P_2x10_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS12605M2P_2x13_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS13405M2P_2x17_P1.25mm_Vertical","Connector_Harwin/Harwin_Gecko_G125-MS15005M2P_2x25_P1.25mm_Vertical","Connector_Harwin/Harwin_LTek-Male_02_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_02_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_03_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_03_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_04_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_04_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_05_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_05_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_06_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_06_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_07_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_07_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_17_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_17_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_22_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_22_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x02_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x02_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x03_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x03_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x04_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x04_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x05_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x05_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x06_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x06_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x07_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x07_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x08_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x08_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x09_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x09_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x10_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x10_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x13_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x13_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x17_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x17_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_LTek-Male_2x22_P2.00mm_Vertical","Connector_Harwin/Harwin_LTek-Male_2x22_P2.00mm_Vertical_StrainRelief","Connector_Harwin/Harwin_M20-7810245_2x02_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7810345_2x03_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7810445_2x04_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7810545_2x05_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7810645_2x06_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7810745_2x07_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7810845_2x08_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7810945_2x09_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7811045_2x10_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7811245_2x12_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7811545_2x15_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-7812045_2x20_P2.54mm_Vertical","Connector_Harwin/Harwin_M20-89003xx_1x03_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89004xx_1x04_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89005xx_1x05_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89006xx_1x06_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89007xx_1x07_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89008xx_1x08_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89009xx_1x09_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89010xx_1x10_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89011xx_1x11_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89012xx_1x12_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89013xx_1x13_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89014xx_1x14_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89015xx_1x15_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89016xx_1x16_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89017xx_1x17_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89018xx_1x18_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89019xx_1x19_P2.54mm_Horizontal","Connector_Harwin/Harwin_M20-89020xx_1x20_P2.54mm_Horizontal","Connector_Hirose/Hirose_BM23FR0.6-16DP-0.35V_2x08_1MP_Vertical","Connector_Hirose/Hirose_BM23FR0.6-16DS-0.35V_2x08_P0.35_1MP_Vertical","Connector_Hirose/Hirose_BM24_BM24-40DP-2-0.35V_2x20_P0.35mm_PowerPin2_Vertical","Connector_Hirose/Hirose_BM24_BM24-40DS-2-0.35V_2x20_P0.35mm_PowerPin2_Vertical","Connector_Hirose/Hirose_DF11-10DP-2DSA_2x05_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-12DP-2DSA_2x06_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-14DP-2DSA_2x07_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-16DP-2DSA_2x08_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-18DP-2DSA_2x09_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-20DP-2DSA_2x10_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-22DP-2DSA_2x11_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-24DP-2DSA_2x12_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-26DP-2DSA_2x13_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-28DP-2DSA_2x14_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-30DP-2DSA_2x15_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-32DP-2DSA_2x16_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-4DP-2DSA_2x02_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-6DP-2DSA_2x03_P2.00mm_Vertical","Connector_Hirose/Hirose_DF11-8DP-2DSA_2x04_P2.00mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-10DS-0.5V_2x05_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-14DS-0.5V_2x07_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-20DS-0.5V_2x10_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-30DS-0.5V_2x15_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-32DS-0.5V_2x16_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-36DS-0.5V_2x18_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-40DS-0.5V_2x20_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-50DS-0.5V_2x25_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12C3.0-60DS-0.5V_2x30_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-10DP-0.5V_2x05_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-14DP-0.5V_2x07_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-20DP-0.5V_2x10_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-30DP-0.5V_2x15_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-32DP-0.5V_2x16_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-36DP-0.5V_2x18_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-40DP-0.5V_2x20_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-50DP-0.5V_2x25_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-60DP-0.5V_2x30_P0.50mm_Vertical","Connector_Hirose/Hirose_DF12_DF12E3.0-80DP-0.5V_2x40_P0.50mm_Vertical","Connector_Hirose/Hirose_DF13-02P-1.25DSA_1x02_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-02P-1.25DS_1x02_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-03P-1.25DSA_1x03_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-03P-1.25DS_1x03_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-04P-1.25DSA_1x04_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-04P-1.25DS_1x04_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-05P-1.25DSA_1x05_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-05P-1.25DS_1x05_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-06P-1.25DSA_1x06_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-06P-1.25DS_1x06_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-07P-1.25DSA_1x07_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-07P-1.25DS_1x07_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-08P-1.25DSA_1x08_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-08P-1.25DS_1x08_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-09P-1.25DSA_1x09_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-09P-1.25DS_1x09_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-10P-1.25DSA_1x10_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-10P-1.25DS_1x10_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-11P-1.25DSA_1x11_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-11P-1.25DS_1x11_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-12P-1.25DSA_1x12_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-12P-1.25DS_1x12_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-13P-1.25DSA_1x13_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-14P-1.25DSA_1x14_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-14P-1.25DS_1x14_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13-15P-1.25DSA_1x15_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13-15P-1.25DS_1x15_P1.25mm_Horizontal","Connector_Hirose/Hirose_DF13C_CL535-0402-2-51_1x02-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0403-5-51_1x03-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0404-8-51_1x04-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0405-0-51_1x05-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0406-3-51_1x06-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0407-6-51_1x07-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0408-9-51_1x08-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0409-1-51_1x09-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0410-4-51_1x10-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0411-3-51_1x11-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0412-6-51_1x12-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0414-1-51_1x14-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF13C_CL535-0415-4-51_1x15-1MP_P1.25mm_Vertical","Connector_Hirose/Hirose_DF3EA-02P-2H_1x02-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-02P-2V_1x02-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-03P-2H_1x03-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-03P-2V_1x03-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-04P-2H_1x04-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-04P-2V_1x04-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-05P-2H_1x05-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-05P-2V_1x05-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-06P-2H_1x06-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-06P-2V_1x06-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-07P-2H_1x07-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-07P-2V_1x07-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-08P-2H_1x08-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-08P-2V_1x08-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-09P-2H_1x09-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-09P-2V_1x09-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-10P-2H_1x10-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-10P-2V_1x10-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-11P-2H_1x11-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-11P-2V_1x11-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-12P-2H_1x12-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-12P-2V_1x12-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-13P-2H_1x13-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-13P-2V_1x13-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-14P-2H_1x14-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-14P-2V_1x14-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF3EA-15P-2H_1x15-1MP_P2.00mm_Horizontal","Connector_Hirose/Hirose_DF3EA-15P-2V_1x15-1MP_P2.00mm_Vertical","Connector_Hirose/Hirose_DF52-10S-0.8H_1x10-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-11S-0.8H_1x11-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-12S-0.8H_1x12-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-14S-0.8H_1x14-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-15S-0.8H_1x15-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-2S-0.8H_1x02-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-3S-0.8H_1x03-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-4S-0.8H_1x04-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-5S-0.8H_1x05-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-6S-0.8H_1x06-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-7S-0.8H_1x07-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-8S-0.8H_1x08-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF52-9S-0.8H_1x09-1MP_P0.80mm_Horizontal","Connector_Hirose/Hirose_DF57H-2P-1.2V_1x02_P1.2mm_Socket","Connector_Hirose/Hirose_DF57H-2P-2.4V_1x02_P2.4mm_Socket","Connector_Hirose/Hirose_DF57H-3P-1.2V_1x03_P1.2mm_Socket","Connector_Hirose/Hirose_DF57H-4P-1.2V_1x04_P1.2mm_Socket","Connector_Hirose/Hirose_DF57H-5P-1.2V_1x05_P1.2mm_Socket","Connector_Hirose/Hirose_DF57H-6P-1.2V_1x06_P1.2mm_Socket","Connector_Hirose/Hirose_DF63-5P-3.96DSA_1x05_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63-6P-3.96DSA_1x06_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63M-1P-3.96DSA_1x01_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63M-2P-3.96DSA_1x02_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63M-3P-3.96DSA_1x03_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63M-4P-3.96DSA_1x04_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63R-1P-3.96DSA_1x01_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63R-2P-3.96DSA_1x02_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63R-3P-3.96DSA_1x03_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63R-4P-3.96DSA_1x04_P3.96mm_Vertical","Connector_Hirose/Hirose_DF63R-5P-3.96DSA_1x05_P3.96mm_Vertical","Connector_Hirose/Hirose_FX10A-120P-SV_2x60-1MP_P0.5mm","Connector_Hirose/Hirose_FX10A-120S-SV_2x60-1MP_P0.5mm","Connector_Hirose/Hirose_FX10A-144P-SV_2x72-1MP_P0.5mm","Connector_Hirose/Hirose_FX10A-144S-SV_2x72-1MP_P0.5mm","Connector_Hirose/Hirose_FX10A-168P-SV_2x84-1MP_P0.5mm","Connector_Hirose/Hirose_FX10A-168S-SV_2x84-1MP_P0.5mm","Connector_Hirose/Hirose_FX10A-96P-SV_2x48-1MP_P0.5mm","Connector_Hirose/Hirose_FX10A-96S-SV_2x48-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-120P-SV_2x60-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-120S-SV_2x60-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-144P-SV_2x72-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-144S-SV_2x72-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-168P-SV_2x84-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-168S-SV_2x84-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-96P-SV_2x48-1MP_P0.5mm","Connector_Hirose/Hirose_FX10B-96S-SV_2x48-1MP_P0.5mm","Connector_Hirose_DF40/Hirose_DF40B(2.0)-12DS-0.4V_2x06-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40B(2.0)-80DS-0.4V_2x40-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40B-10DS-0.4V_2x05-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40B-12DS-0.4V_2x06-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40B-30DS-0.4V_2x15-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40B-50DS-0.4V_2x25-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40B-60DS-0.4V_2x30-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40B-80DS-0.4V_2x40-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-20DS-0.4V_2x10_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-24DS-0.4V_2x12_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-30DS-0.4V_2x15_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-40DS-0.4V_2x20_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-50DS-0.4V_2x25_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-60DS-0.4V_2x30_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-70DS-0.4V_2x35_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C(2.0)-80DS-0.4V_2x40_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-100DP-0.4V_2x50-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-100DS-0.4V_2x50_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-10DP-0.4V_2x05-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-120DP-0.4V_2x60-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-120DS-0.4V_2x60_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-12DP-0.4V_2x06-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-20DP-0.4V_2x10-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-20DS-0.4V_2x10_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-24DP-0.4V_2x12-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-24DS-0.4V_2x12_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-30DP-0.4V_2x15-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-30DS-0.4V_2x15_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-34DP-0.4V_2x17-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-34DS-0.4V_2x17_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-40DP-0.4V_2x20-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-40DS-0.4V_2x20_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-44DP-0.4V_2x22-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-50DP-0.4V_2x25-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-50DS-0.4V_2x25_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-60DP-0.4V_2x30-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-60DS-0.4V_2x30_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-70DP-0.4V_2x35-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-70DS-0.4V_2x35_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-80DP-0.4V_2x40-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-80DS-0.4V_2x40_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-90DP-0.4V_2x45-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40C-90DS-0.4V_2x45_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HB(2.5)-10DS-0.4V_2x05-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HB(4.0)-50DS-0.4V_2x25-1MP_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(2.5)-20DS-0.4V_2x10_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(2.5)-30DS-0.4V_2x15_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(2.5)-40DS-0.4V_2x20_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(2.5)-50DS-0.4V_2x25_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(2.5)-60DS-0.4V_2x30_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-100DS-0.4V_2x50_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-30DS-0.4V_2x15_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-40DS-0.4V_2x20_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-44DS-0.4V_2x22_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-50DS-0.4V_2x25_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-60DS-0.4V_2x30_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-70DS-0.4V_2x35_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-80DS-0.4V_2x40_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.0)-90DS-0.4V_2x45_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.5)-20DS-0.4V_2x10_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.5)-30DS-0.4V_2x15_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.5)-40DS-0.4V_2x20_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.5)-50DS-0.4V_2x25_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.5)-60DS-0.4V_2x30_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(3.5)-80DS-0.4V_2x40_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(4.0)-40DS-0.4V_2x20_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(4.0)-50DS-0.4V_2x25_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(4.0)-60DS-0.4V_2x30_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(4.0)-80DS-0.4V_2x40_P0.4mm","Connector_Hirose_DF40/Hirose_DF40HC(4.0)-90DS-0.4V_2x45_P0.4mm","Connector_Hirose_FX8/Hirose_FX8-100P-SV_2x50_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-100S-SV_2x50_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-120P-SV_2x60_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-120S-SV_2x60_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-140P-SV_2x70_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-140S-SV_2x70_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-60P-SV_2x30_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-60S-SV_2x30_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-80P-SV_2x40_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-80S-SV_2x40_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-90P-SV_2x45_P0.6mm","Connector_Hirose_FX8/Hirose_FX8-90S-SV_2x45_P0.6mm","Connector_IDC/IDC-Header_2x03_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x03_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x03_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x04_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x04_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x04_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x05-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x05_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x05_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x05_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x05_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x05_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x05_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x05_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x05_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x06-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x06_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x06_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x06_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x06_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x06_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x06_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x06_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x06_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x07-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x07_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x07_P2.54mm_Horizontal_Lock","Connector_IDC/IDC-Header_2x07_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x07_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x07_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x07_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x07_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x07_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x07_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x08-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x08_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x08_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x08_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x08_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x08_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x08_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x08_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x08_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x09_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x09_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x09_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x10-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x10_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x10_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x10_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x10_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x10_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x10_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x10_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x10_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x11_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x11_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x11_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x12-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x12_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x12_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x12_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x12_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x12_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x12_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x12_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x12_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x13-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x13_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x13_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x13_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x13_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x13_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x13_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x13_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x13_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x15-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x15_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x15_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x15_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x15_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x15_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x15_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x15_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x17-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x17_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x17_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x17_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x17_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x17_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x17_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x17_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x20-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x20_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x20_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x20_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x20_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x20_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x20_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x20_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x20_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x22_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x22_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x22_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x25-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x25_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x25_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x25_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x25_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x25_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x25_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x25_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x25_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x30-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x30_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x30_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x30_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x30_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x30_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x30_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x30_P2.54mm_Vertical","Connector_IDC/IDC-Header_2x30_P2.54mm_Vertical_SMD","Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x32-1MP_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x32_P2.54mm_Horizontal","Connector_IDC/IDC-Header_2x32_P2.54mm_Latch12.0mm_Vertical","Connector_IDC/IDC-Header_2x32_P2.54mm_Latch6.5mm_Vertical","Connector_IDC/IDC-Header_2x32_P2.54mm_Latch9.5mm_Vertical","Connector_IDC/IDC-Header_2x32_P2.54mm_Latch_Horizontal","Connector_IDC/IDC-Header_2x32_P2.54mm_Latch_Vertical","Connector_IDC/IDC-Header_2x32_P2.54mm_Vertical","Connector_JAE/JAE_LY20-10P-DLT1_2x05_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-10P-DT1_2x05_P2.00mm_Vertical","Connector_JAE/JAE_LY20-12P-DLT1_2x06_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-12P-DT1_2x06_P2.00mm_Vertical","Connector_JAE/JAE_LY20-14P-DLT1_2x07_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-14P-DT1_2x07_P2.00mm_Vertical","Connector_JAE/JAE_LY20-16P-DLT1_2x08_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-16P-DT1_2x08_P2.00mm_Vertical","Connector_JAE/JAE_LY20-18P-DLT1_2x09_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-18P-DT1_2x09_P2.00mm_Vertical","Connector_JAE/JAE_LY20-20P-DLT1_2x10_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-20P-DT1_2x10_P2.00mm_Vertical","Connector_JAE/JAE_LY20-22P-DLT1_2x11_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-22P-DT1_2x11_P2.00mm_Vertical","Connector_JAE/JAE_LY20-24P-DLT1_2x12_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-24P-DT1_2x12_P2.00mm_Vertical","Connector_JAE/JAE_LY20-26P-DLT1_2x13_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-26P-DT1_2x13_P2.00mm_Vertical","Connector_JAE/JAE_LY20-28P-DLT1_2x14_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-28P-DT1_2x14_P2.00mm_Vertical","Connector_JAE/JAE_LY20-30P-DLT1_2x15_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-30P-DT1_2x15_P2.00mm_Vertical","Connector_JAE/JAE_LY20-32P-DLT1_2x16_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-32P-DT1_2x16_P2.00mm_Vertical","Connector_JAE/JAE_LY20-34P-DLT1_2x17_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-34P-DT1_2x17_P2.00mm_Vertical","Connector_JAE/JAE_LY20-36P-DLT1_2x18_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-36P-DT1_2x18_P2.00mm_Vertical","Connector_JAE/JAE_LY20-38P-DLT1_2x19_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-38P-DT1_2x19_P2.00mm_Vertical","Connector_JAE/JAE_LY20-40P-DLT1_2x20_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-40P-DT1_2x20_P2.00mm_Vertical","Connector_JAE/JAE_LY20-42P-DLT1_2x21_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-42P-DT1_2x21_P2.00mm_Vertical","Connector_JAE/JAE_LY20-44P-DLT1_2x22_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-44P-DT1_2x22_P2.00mm_Vertical","Connector_JAE/JAE_LY20-4P-DLT1_2x02_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-4P-DT1_2x02_P2.00mm_Vertical","Connector_JAE/JAE_LY20-6P-DLT1_2x03_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-6P-DT1_2x03_P2.00mm_Vertical","Connector_JAE/JAE_LY20-8P-DLT1_2x04_P2.00mm_Horizontal","Connector_JAE/JAE_LY20-8P-DT1_2x04_P2.00mm_Vertical","Connector_JAE/JAE_MM70-314-310B1","Connector_JAE/JAE_SIM_Card_SF72S006","Connector_JAE_WP7B/JAE_WP7B-P034VA1-R8000_2x17-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P034VA1-R8000_Longpads_2x17-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P040VA1-R8000_2x20-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P040VA1-R8000_Longpads_2x20-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P050VA1-R8000_2x25-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P050VA1-R8000_Longpads_2x25-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P060VA1-R8000_2x30-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P060VA1-R8000_Longpads_2x30-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P070VA1-R8000_2x35-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-P070VA1-R8000_Longpads_2x35-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S034VA1-R8000_2x17-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S034VA1-R8000_Longpads_2x17-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S040VA1-R8000_2x20-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S040VA1-R8000_Longpads_2x20-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S050VA1-R8000_2x25-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S050VA1-R8000_Longpads_2x25-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S060VA1-R8000_2x30-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S060VA1-R8000_Longpads_2x30-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S070VA1-R8000_2x35-1MP_P0.4mm","Connector_JAE_WP7B/JAE_WP7B-S070VA1-R8000_Longpads_2x35-1MP_P0.4mm","Connector_JST/JST_ACH_BM01B-ACHSS-A-GAN-ETF_1x01-1MP_P1.20mm_Vertical","Connector_JST/JST_ACH_BM02B-ACHSS-GAN-ETF_1x02-1MP_P1.20mm_Vertical","Connector_JST/JST_ACH_BM03B-ACHSS-GAN-ETF_1x03-1MP_P1.20mm_Vertical","Connector_JST/JST_ACH_BM04B-ACHSS-A-GAN-ETF_1x04-1MP_P1.20mm_Vertical","Connector_JST/JST_ACH_BM05B-ACHSS-A-GAN-ETF_1x05-1MP_P1.20mm_Vertical","Connector_JST/JST_AUH_BM03B-AUHKS-GA-TB_1x03-1MP_P1.50mm_Vertical","Connector_JST/JST_AUH_BM05B-AUHKS-GA-TB_1x05-1MP_P1.50mm_Vertical","Connector_JST/JST_EH_B10B-EH-A_1x10_P2.50mm_Vertical","Connector_JST/JST_EH_B11B-EH-A_1x11_P2.50mm_Vertical","Connector_JST/JST_EH_B12B-EH-A_1x12_P2.50mm_Vertical","Connector_JST/JST_EH_B13B-EH-A_1x13_P2.50mm_Vertical","Connector_JST/JST_EH_B14B-EH-A_1x14_P2.50mm_Vertical","Connector_JST/JST_EH_B15B-EH-A_1x15_P2.50mm_Vertical","Connector_JST/JST_EH_B2B-EH-A_1x02_P2.50mm_Vertical","Connector_JST/JST_EH_B3B-EH-A_1x03_P2.50mm_Vertical","Connector_JST/JST_EH_B4B-EH-A_1x04_P2.50mm_Vertical","Connector_JST/JST_EH_B5B-EH-A_1x05_P2.50mm_Vertical","Connector_JST/JST_EH_B6B-EH-A_1x06_P2.50mm_Vertical","Connector_JST/JST_EH_B7B-EH-A_1x07_P2.50mm_Vertical","Connector_JST/JST_EH_B8B-EH-A_1x08_P2.50mm_Vertical","Connector_JST/JST_EH_B9B-EH-A_1x09_P2.50mm_Vertical","Connector_JST/JST_EH_S10B-EH_1x10_P2.50mm_Horizontal","Connector_JST/JST_EH_S11B-EH_1x11_P2.50mm_Horizontal","Connector_JST/JST_EH_S12B-EH_1x12_P2.50mm_Horizontal","Connector_JST/JST_EH_S13B-EH_1x13_P2.50mm_Horizontal","Connector_JST/JST_EH_S14B-EH_1x14_P2.50mm_Horizontal","Connector_JST/JST_EH_S15B-EH_1x15_P2.50mm_Horizontal","Connector_JST/JST_EH_S2B-EH_1x02_P2.50mm_Horizontal","Connector_JST/JST_EH_S3B-EH_1x03_P2.50mm_Horizontal","Connector_JST/JST_EH_S4B-EH_1x04_P2.50mm_Horizontal","Connector_JST/JST_EH_S5B-EH_1x05_P2.50mm_Horizontal","Connector_JST/JST_EH_S6B-EH_1x06_P2.50mm_Horizontal","Connector_JST/JST_EH_S7B-EH_1x07_P2.50mm_Horizontal","Connector_JST/JST_EH_S8B-EH_1x08_P2.50mm_Horizontal","Connector_JST/JST_EH_S9B-EH_1x09_P2.50mm_Horizontal","Connector_JST/JST_GH_BM02B-GHS-TBT_1x02-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM03B-GHS-TBT_1x03-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM04B-GHS-TBT_1x04-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM05B-GHS-TBT_1x05-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM06B-GHS-TBT_1x06-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM07B-GHS-TBT_1x07-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM08B-GHS-TBT_1x08-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM09B-GHS-TBT_1x09-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM10B-GHS-TBT_1x10-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM11B-GHS-TBT_1x11-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM12B-GHS-TBT_1x12-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM13B-GHS-TBT_1x13-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM14B-GHS-TBT_1x14-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_BM15B-GHS-TBT_1x15-1MP_P1.25mm_Vertical","Connector_JST/JST_GH_SM02B-GHS-TB_1x02-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM03B-GHS-TB_1x03-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM04B-GHS-TB_1x04-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM05B-GHS-TB_1x05-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM06B-GHS-TB_1x06-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM07B-GHS-TB_1x07-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM08B-GHS-TB_1x08-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM09B-GHS-TB_1x09-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM10B-GHS-TB_1x10-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM11B-GHS-TB_1x11-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM12B-GHS-TB_1x12-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM13B-GHS-TB_1x13-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM14B-GHS-TB_1x14-1MP_P1.25mm_Horizontal","Connector_JST/JST_GH_SM15B-GHS-TB_1x15-1MP_P1.25mm_Horizontal","Connector_JST/JST_J2100_B06B-J21DK-GGXR_2x03_P2.50x4.00mm_Vertical","Connector_JST/JST_J2100_B08B-J21DK-GGXR_2x04_P2.50x4.00mm_Vertical","Connector_JST/JST_J2100_B10B-J21DK-GGXR_2x05_P2.50x4.00mm_Vertical","Connector_JST/JST_J2100_B12B-J21DK-GGXR_2x06_P2.50x4.00mm_Vertical","Connector_JST/JST_J2100_B16B-J21DK-GGXR_2x08_P2.50x4.00mm_Vertical","Connector_JST/JST_J2100_B20B-J21DK-GGXR_2x10_P2.50x4.00mm_Vertical","Connector_JST/JST_J2100_S06B-J21DK-GGXR_2x03_P2.50mm_Horizontal","Connector_JST/JST_J2100_S08B-J21DK-GGXR_2x04_P2.50mm_Horizontal","Connector_JST/JST_J2100_S10B-J21DK-GGXR_2x05_P2.50mm_Horizontal","Connector_JST/JST_J2100_S12B-J21DK-GGXR_2x06_P2.50mm_Horizontal","Connector_JST/JST_J2100_S16B-J21DK-GGXR_2x08_P2.50mm_Horizontal","Connector_JST/JST_J2100_S20B-J21DK-GGXR_2x10_P2.50mm_Horizontal","Connector_JST/JST_JWPF_B02B-JWPF-SK-R_1x02_P2.00mm_Vertical","Connector_JST/JST_JWPF_B03B-JWPF-SK-R_1x03_P2.00mm_Vertical","Connector_JST/JST_JWPF_B04B-JWPF-SK-R_1x04_P2.00mm_Vertical","Connector_JST/JST_JWPF_B06B-JWPF-SK-R_2x03_P2.00mm_Vertical","Connector_JST/JST_JWPF_B08B-JWPF-SK-R_2x04_P2.00mm_Vertical","Connector_JST/JST_LEA_SM02B-LEASS-TF_1x02-1MP_P4.20mm_Horizontal","Connector_JST/JST_NV_B02P-NV_1x02_P5.00mm_Vertical","Connector_JST/JST_NV_B03P-NV_1x03_P5.00mm_Vertical","Connector_JST/JST_NV_B04P-NV_1x04_P5.00mm_Vertical","Connector_JST/JST_PHD_B10B-PHDSS_2x05_P2.00mm_Vertical","Connector_JST/JST_PHD_B12B-PHDSS_2x06_P2.00mm_Vertical","Connector_JST/JST_PHD_B14B-PHDSS_2x07_P2.00mm_Vertical","Connector_JST/JST_PHD_B16B-PHDSS_2x08_P2.00mm_Vertical","Connector_JST/JST_PHD_B18B-PHDSS_2x09_P2.00mm_Vertical","Connector_JST/JST_PHD_B20B-PHDSS_2x10_P2.00mm_Vertical","Connector_JST/JST_PHD_B22B-PHDSS_2x11_P2.00mm_Vertical","Connector_JST/JST_PHD_B24B-PHDSS_2x12_P2.00mm_Vertical","Connector_JST/JST_PHD_B26B-PHDSS_2x13_P2.00mm_Vertical","Connector_JST/JST_PHD_B28B-PHDSS_2x14_P2.00mm_Vertical","Connector_JST/JST_PHD_B30B-PHDSS_2x15_P2.00mm_Vertical","Connector_JST/JST_PHD_B32B-PHDSS_2x16_P2.00mm_Vertical","Connector_JST/JST_PHD_B34B-PHDSS_2x17_P2.00mm_Vertical","Connector_JST/JST_PHD_B8B-PHDSS_2x04_P2.00mm_Vertical","Connector_JST/JST_PHD_S10B-PHDSS_2x05_P2.00mm_Horizontal","Connector_JST/JST_PHD_S12B-PHDSS_2x06_P2.00mm_Horizontal","Connector_JST/JST_PHD_S14B-PHDSS_2x07_P2.00mm_Horizontal","Connector_JST/JST_PHD_S16B-PHDSS_2x08_P2.00mm_Horizontal","Connector_JST/JST_PHD_S18B-PHDSS_2x09_P2.00mm_Horizontal","Connector_JST/JST_PHD_S20B-PHDSS_2x10_P2.00mm_Horizontal","Connector_JST/JST_PHD_S22B-PHDSS_2x11_P2.00mm_Horizontal","Connector_JST/JST_PHD_S24B-PHDSS_2x12_P2.00mm_Horizontal","Connector_JST/JST_PHD_S26B-PHDSS_2x13_P2.00mm_Horizontal","Connector_JST/JST_PHD_S28B-PHDSS_2x14_P2.00mm_Horizontal","Connector_JST/JST_PHD_S30B-PHDSS_2x15_P2.00mm_Horizontal","Connector_JST/JST_PHD_S32B-PHDSS_2x16_P2.00mm_Horizontal","Connector_JST/JST_PHD_S34B-PHDSS_2x17_P2.00mm_Horizontal","Connector_JST/JST_PHD_S8B-PHDSS_2x04_P2.00mm_Horizontal","Connector_JST/JST_PH_B10B-PH-K_1x10_P2.00mm_Vertical","Connector_JST/JST_PH_B10B-PH-SM4-TB_1x10-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B11B-PH-K_1x11_P2.00mm_Vertical","Connector_JST/JST_PH_B11B-PH-SM4-TB_1x11-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B12B-PH-K_1x12_P2.00mm_Vertical","Connector_JST/JST_PH_B12B-PH-SM4-TB_1x12-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B13B-PH-K_1x13_P2.00mm_Vertical","Connector_JST/JST_PH_B13B-PH-SM4-TB_1x13-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B14B-PH-K_1x14_P2.00mm_Vertical","Connector_JST/JST_PH_B14B-PH-SM4-TB_1x14-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B15B-PH-K_1x15_P2.00mm_Vertical","Connector_JST/JST_PH_B15B-PH-SM4-TB_1x15-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B16B-PH-K_1x16_P2.00mm_Vertical","Connector_JST/JST_PH_B16B-PH-SM4-TB_1x16-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B2B-PH-K_1x02_P2.00mm_Vertical","Connector_JST/JST_PH_B2B-PH-SM4-TB_1x02-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B3B-PH-K_1x03_P2.00mm_Vertical","Connector_JST/JST_PH_B3B-PH-SM4-TB_1x03-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B4B-PH-K_1x04_P2.00mm_Vertical","Connector_JST/JST_PH_B4B-PH-SM4-TB_1x04-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B5B-PH-K_1x05_P2.00mm_Vertical","Connector_JST/JST_PH_B5B-PH-SM4-TB_1x05-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B6B-PH-K_1x06_P2.00mm_Vertical","Connector_JST/JST_PH_B6B-PH-SM4-TB_1x06-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B7B-PH-K_1x07_P2.00mm_Vertical","Connector_JST/JST_PH_B7B-PH-SM4-TB_1x07-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B8B-PH-K_1x08_P2.00mm_Vertical","Connector_JST/JST_PH_B8B-PH-SM4-TB_1x08-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_B9B-PH-K_1x09_P2.00mm_Vertical","Connector_JST/JST_PH_B9B-PH-SM4-TB_1x09-1MP_P2.00mm_Vertical","Connector_JST/JST_PH_S10B-PH-K_1x10_P2.00mm_Horizontal","Connector_JST/JST_PH_S10B-PH-SM4-TB_1x10-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S11B-PH-K_1x11_P2.00mm_Horizontal","Connector_JST/JST_PH_S11B-PH-SM4-TB_1x11-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S12B-PH-K_1x12_P2.00mm_Horizontal","Connector_JST/JST_PH_S12B-PH-SM4-TB_1x12-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S13B-PH-K_1x13_P2.00mm_Horizontal","Connector_JST/JST_PH_S13B-PH-SM4-TB_1x13-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S14B-PH-K_1x14_P2.00mm_Horizontal","Connector_JST/JST_PH_S14B-PH-SM4-TB_1x14-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S15B-PH-K_1x15_P2.00mm_Horizontal","Connector_JST/JST_PH_S15B-PH-SM4-TB_1x15-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S16B-PH-K_1x16_P2.00mm_Horizontal","Connector_JST/JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal","Connector_JST/JST_PH_S2B-PH-SM4-TB_1x02-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S3B-PH-K_1x03_P2.00mm_Horizontal","Connector_JST/JST_PH_S3B-PH-SM4-TB_1x03-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S4B-PH-K_1x04_P2.00mm_Horizontal","Connector_JST/JST_PH_S4B-PH-SM4-TB_1x04-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S5B-PH-K_1x05_P2.00mm_Horizontal","Connector_JST/JST_PH_S5B-PH-SM4-TB_1x05-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S6B-PH-K_1x06_P2.00mm_Horizontal","Connector_JST/JST_PH_S6B-PH-SM4-TB_1x06-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S7B-PH-K_1x07_P2.00mm_Horizontal","Connector_JST/JST_PH_S7B-PH-SM4-TB_1x07-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S8B-PH-K_1x08_P2.00mm_Horizontal","Connector_JST/JST_PH_S8B-PH-SM4-TB_1x08-1MP_P2.00mm_Horizontal","Connector_JST/JST_PH_S9B-PH-K_1x09_P2.00mm_Horizontal","Connector_JST/JST_PH_S9B-PH-SM4-TB_1x09-1MP_P2.00mm_Horizontal","Connector_JST/JST_PUD_B08B-PUDSS_2x04_P2.00mm_Vertical","Connector_JST/JST_PUD_B10B-PUDSS_2x05_P2.00mm_Vertical","Connector_JST/JST_PUD_B12B-PUDSS_2x06_P2.00mm_Vertical","Connector_JST/JST_PUD_B14B-PUDSS_2x07_P2.00mm_Vertical","Connector_JST/JST_PUD_B16B-PUDSS_2x08_P2.00mm_Vertical","Connector_JST/JST_PUD_B18B-PUDSS_2x09_P2.00mm_Vertical","Connector_JST/JST_PUD_B20B-PUDSS_2x10_P2.00mm_Vertical","Connector_JST/JST_PUD_B22B-PUDSS_2x11_P2.00mm_Vertical","Connector_JST/JST_PUD_B24B-PUDSS_2x12_P2.00mm_Vertical","Connector_JST/JST_PUD_B26B-PUDSS_2x13_P2.00mm_Vertical","Connector_JST/JST_PUD_B28B-PUDSS_2x14_P2.00mm_Vertical","Connector_JST/JST_PUD_B30B-PUDSS_2x15_P2.00mm_Vertical","Connector_JST/JST_PUD_B32B-PUDSS_2x16_P2.00mm_Vertical","Connector_JST/JST_PUD_B34B-PUDSS_2x17_P2.00mm_Vertical","Connector_JST/JST_PUD_B36B-PUDSS_2x18_P2.00mm_Vertical","Connector_JST/JST_PUD_B38B-PUDSS_2x19_P2.00mm_Vertical","Connector_JST/JST_PUD_B40B-PUDSS_2x20_P2.00mm_Vertical","Connector_JST/JST_PUD_S08B-PUDSS-1_2x04_P2.00mm_Horizontal","Connector_JST/JST_PUD_S10B-PUDSS-1_2x05_P2.00mm_Horizontal","Connector_JST/JST_PUD_S12B-PUDSS-1_2x06_P2.00mm_Horizontal","Connector_JST/JST_PUD_S14B-PUDSS-1_2x07_P2.00mm_Horizontal","Connector_JST/JST_PUD_S16B-PUDSS-1_2x08_P2.00mm_Horizontal","Connector_JST/JST_PUD_S18B-PUDSS-1_2x09_P2.00mm_Horizontal","Connector_JST/JST_PUD_S20B-PUDSS-1_2x10_P2.00mm_Horizontal","Connector_JST/JST_PUD_S22B-PUDSS-1_2x11_P2.00mm_Horizontal","Connector_JST/JST_PUD_S24B-PUDSS-1_2x12_P2.00mm_Horizontal","Connector_JST/JST_PUD_S26B-PUDSS-1_2x13_P2.00mm_Horizontal","Connector_JST/JST_PUD_S28B-PUDSS-1_2x14_P2.00mm_Horizontal","Connector_JST/JST_PUD_S30B-PUDSS-1_2x15_P2.00mm_Horizontal","Connector_JST/JST_PUD_S32B-PUDSS-1_2x16_P2.00mm_Horizontal","Connector_JST/JST_PUD_S34B-PUDSS-1_2x17_P2.00mm_Horizontal","Connector_JST/JST_PUD_S36B-PUDSS-1_2x18_P2.00mm_Horizontal","Connector_JST/JST_PUD_S38B-PUDSS-1_2x19_P2.00mm_Horizontal","Connector_JST/JST_PUD_S40B-PUDSS-1_2x20_P2.00mm_Horizontal","Connector_JST/JST_SFH_SM02B-SFHRS-TF_1x02-1MP_P4.20mm_Horizontal","Connector_JST/JST_SHD_BM20B-SRDS-A-G-TF_2x10-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_BM20B-SRDS-G-TF_2x10-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_BM30B-SRDS-A-G-TF_2x15-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_BM30B-SRDS-G-TF_2x15-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_BM40B-SRDS-A-G-TF_2x20-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_BM40B-SRDS-G-TF_2x20-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_BM50B-SRDS-A-G-TF_2x25-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_BM50B-SRDS-G-TF_2x25-1MP_P1.0mm_Vertical","Connector_JST/JST_SHD_SM20B-SRDS-G-TF_2x10-1MP_P1.0mm_Horizontal","Connector_JST/JST_SHD_SM30B-SRDS-G-TF_2x15-1MP_P1.0mm_Horizontal","Connector_JST/JST_SHD_SM40B-SRDS-G-TF_2x20-1MP_P1.0mm_Horizontal","Connector_JST/JST_SHD_SM50B-SRDS-G-TF_2x25-1MP_P1.0mm_Horizontal","Connector_JST/JST_SHL_SM02B-SHLS-TF_1x02-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM05B-SHLS-TF_1x05-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM06B-SHLS-TF_1x06-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM07B-SHLS-TF_1x07-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM08B-SHLS-TF_1x08-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM10B-SHLS-TF_1x10-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM11B-SHLS-TF_1x11-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM12B-SHLS-TF_1x12-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM14B-SHLS-TF_1x14-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM16B-SHLS-TF_1x16-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM20B-SHLS-TF_1x20-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM22B-SHLS-TF_1x22-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM26B-SHLS-TF_1x26-1MP_P1.00mm_Horizontal","Connector_JST/JST_SHL_SM30B-SHLS-TF_1x30-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_BM02B-SRSS-TB_1x02-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM03B-SRSS-TB_1x03-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM04B-SRSS-TB_1x04-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM05B-SRSS-TB_1x05-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM06B-SRSS-TB_1x06-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM07B-SRSS-TB_1x07-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM08B-SRSS-TB_1x08-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM09B-SRSS-TB_1x09-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM10B-SRSS-TB_1x10-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM11B-SRSS-TB_1x11-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM12B-SRSS-TB_1x12-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM13B-SRSS-TB_1x13-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM14B-SRSS-TB_1x14-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_BM15B-SRSS-TB_1x15-1MP_P1.00mm_Vertical","Connector_JST/JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM05B-SRSS-TB_1x05-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM06B-SRSS-TB_1x06-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM07B-SRSS-TB_1x07-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM08B-SRSS-TB_1x08-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM09B-SRSS-TB_1x09-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM10B-SRSS-TB_1x10-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM11B-SRSS-TB_1x11-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM12B-SRSS-TB_1x12-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM13B-SRSS-TB_1x13-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM14B-SRSS-TB_1x14-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM15B-SRSS-TB_1x15-1MP_P1.00mm_Horizontal","Connector_JST/JST_SH_SM20B-SRSS-TB_1x20-1MP_P1.00mm_Horizontal","Connector_JST/JST_SUR_BM02B-SURS-TF_1x02-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM03B-SURS-TF_1x03-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM04B-SURS-TF_1x04-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM05B-SURS-TF_1x05-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM06B-SURS-TF_1x06-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM08B-SURS-TF_1x08-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM10B-SURS-TF_1x10-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM12B-SURS-TF_1x12-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM14B-SURS-TF_1x14-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM15B-SURS-TF_1x15-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM16B-SURS-TF_1x16-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM17B-SURS-TF_1x17-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_BM20B-SURS-TF_1x20-1MP_P0.80mm_Vertical","Connector_JST/JST_SUR_SM02B-SURS-TF_1x02-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM03B-SURS-TF_1x03-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM04B-SURS-TF_1x04-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM05B-SURS-TF_1x05-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM06B-SURS-TF_1x06-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM08B-SURS-TF_1x08-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM10B-SURS-TF_1x10-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM12B-SURS-TF_1x12-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM14B-SURS-TF_1x14-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM15B-SURS-TF_1x15-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM16B-SURS-TF_1x16-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM17B-SURS-TF_1x17-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM20B-SURS-TF_1x20-1MP_P0.80mm_Horizontal","Connector_JST/JST_SUR_SM22B-SURS-TF_1x22-1MP_P0.80mm_Horizontal","Connector_JST/JST_VH_B10P-VH-B_1x10_P3.96mm_Vertical","Connector_JST/JST_VH_B10P-VH-FB-B_1x10_P3.96mm_Vertical","Connector_JST/JST_VH_B10P-VH_1x10_P3.96mm_Vertical","Connector_JST/JST_VH_B10PS-VH_1x10_P3.96mm_Horizontal","Connector_JST/JST_VH_B11P-VH-B_1x11_P3.96mm_Vertical","Connector_JST/JST_VH_B2P-VH-B_1x02_P3.96mm_Vertical","Connector_JST/JST_VH_B2P-VH-FB-B_1x02_P3.96mm_Vertical","Connector_JST/JST_VH_B2P-VH_1x02_P3.96mm_Vertical","Connector_JST/JST_VH_B2P3-VH_1x02_P7.92mm_Vertical","Connector_JST/JST_VH_B2PS-VH_1x02_P3.96mm_Horizontal","Connector_JST/JST_VH_B3P-VH-B_1x03_P3.96mm_Vertical","Connector_JST/JST_VH_B3P-VH-FB-B_1x03_P3.96mm_Vertical","Connector_JST/JST_VH_B3P-VH_1x03_P3.96mm_Vertical","Connector_JST/JST_VH_B3PS-VH_1x03_P3.96mm_Horizontal","Connector_JST/JST_VH_B4P-VH-B_1x04_P3.96mm_Vertical","Connector_JST/JST_VH_B4P-VH-FB-B_1x04_P3.96mm_Vertical","Connector_JST/JST_VH_B4P-VH_1x04_P3.96mm_Vertical","Connector_JST/JST_VH_B4PS-VH_1x04_P3.96mm_Horizontal","Connector_JST/JST_VH_B5P-VH-B_1x05_P3.96mm_Vertical","Connector_JST/JST_VH_B5P-VH-FB-B_1x05_P3.96mm_Vertical","Connector_JST/JST_VH_B5P-VH_1x05_P3.96mm_Vertical","Connector_JST/JST_VH_B5PS-VH_1x05_P3.96mm_Horizontal","Connector_JST/JST_VH_B6P-VH-B_1x06_P3.96mm_Vertical","Connector_JST/JST_VH_B6P-VH-FB-B_1x06_P3.96mm_Vertical","Connector_JST/JST_VH_B6P-VH_1x06_P3.96mm_Vertical","Connector_JST/JST_VH_B6PS-VH_1x06_P3.96mm_Horizontal","Connector_JST/JST_VH_B7P-VH-B_1x07_P3.96mm_Vertical","Connector_JST/JST_VH_B7P-VH-FB-B_1x07_P3.96mm_Vertical","Connector_JST/JST_VH_B7P-VH_1x07_P3.96mm_Vertical","Connector_JST/JST_VH_B7PS-VH_1x07_P3.96mm_Horizontal","Connector_JST/JST_VH_B8P-VH-B_1x08_P3.96mm_Vertical","Connector_JST/JST_VH_B8P-VH-FB-B_1x08_P3.96mm_Vertical","Connector_JST/JST_VH_B8P-VH_1x08_P3.96mm_Vertical","Connector_JST/JST_VH_B8PS-VH_1x08_P3.96mm_Horizontal","Connector_JST/JST_VH_B9P-VH-B_1x09_P3.96mm_Vertical","Connector_JST/JST_VH_B9P-VH-FB-B_1x09_P3.96mm_Vertical","Connector_JST/JST_VH_B9P-VH_1x09_P3.96mm_Vertical","Connector_JST/JST_VH_B9PS-VH_1x09_P3.96mm_Horizontal","Connector_JST/JST_VH_S2P-VH_1x02_P3.96mm_Horizontal","Connector_JST/JST_VH_S3P-VH_1x03_P3.96mm_Horizontal","Connector_JST/JST_VH_S4P-VH_1x04_P3.96mm_Horizontal","Connector_JST/JST_VH_S5P-VH_1x05_P3.96mm_Horizontal","Connector_JST/JST_VH_S6P-VH_1x06_P3.96mm_Horizontal","Connector_JST/JST_VH_S7P-VH_1x07_P3.96mm_Horizontal","Connector_JST/JST_XAG_SM05B-XAGKS-BN-TB_1x05-1MP_P2.50mm_Horizontal","Connector_JST/JST_XA_B02B-XASK-1-A_1x02_P2.50mm_Vertical","Connector_JST/JST_XA_B02B-XASK-1_1x02_P2.50mm_Vertical","Connector_JST/JST_XA_B03B-XASK-1-A_1x03_P2.50mm_Vertical","Connector_JST/JST_XA_B03B-XASK-1_1x03_P2.50mm_Vertical","Connector_JST/JST_XA_B04B-XASK-1-A_1x04_P2.50mm_Vertical","Connector_JST/JST_XA_B04B-XASK-1_1x04_P2.50mm_Vertical","Connector_JST/JST_XA_B05B-XASK-1-A_1x05_P2.50mm_Vertical","Connector_JST/JST_XA_B05B-XASK-1_1x05_P2.50mm_Vertical","Connector_JST/JST_XA_B06B-XASK-1-A_1x06_P2.50mm_Vertical","Connector_JST/JST_XA_B06B-XASK-1_1x06_P2.50mm_Vertical","Connector_JST/JST_XA_B07B-XASK-1-A_1x07_P2.50mm_Vertical","Connector_JST/JST_XA_B07B-XASK-1_1x07_P2.50mm_Vertical","Connector_JST/JST_XA_B08B-XASK-1-A_1x08_P2.50mm_Vertical","Connector_JST/JST_XA_B08B-XASK-1_1x08_P2.50mm_Vertical","Connector_JST/JST_XA_B09B-XASK-1-A_1x09_P2.50mm_Vertical","Connector_JST/JST_XA_B09B-XASK-1_1x09_P2.50mm_Vertical","Connector_JST/JST_XA_B10B-XASK-1-A_1x10_P2.50mm_Vertical","Connector_JST/JST_XA_B10B-XASK-1_1x10_P2.50mm_Vertical","Connector_JST/JST_XA_B11B-XASK-1-A_1x11_P2.50mm_Vertical","Connector_JST/JST_XA_B11B-XASK-1_1x11_P2.50mm_Vertical","Connector_JST/JST_XA_B12B-XASK-1-A_1x12_P2.50mm_Vertical","Connector_JST/JST_XA_B12B-XASK-1_1x12_P2.50mm_Vertical","Connector_JST/JST_XA_B13B-XASK-1-A_1x13_P2.50mm_Vertical","Connector_JST/JST_XA_B13B-XASK-1_1x13_P2.50mm_Vertical","Connector_JST/JST_XA_B14B-XASK-1-A_1x14_P2.50mm_Vertical","Connector_JST/JST_XA_B14B-XASK-1_1x14_P2.50mm_Vertical","Connector_JST/JST_XA_B15B-XASK-1-A_1x15_P2.50mm_Vertical","Connector_JST/JST_XA_B15B-XASK-1_1x15_P2.50mm_Vertical","Connector_JST/JST_XA_B18B-XASK-1_1x18_P2.50mm_Vertical","Connector_JST/JST_XA_B20B-XASK-1-A_1x20_P2.50mm_Vertical","Connector_JST/JST_XA_B20B-XASK-1_1x20_P2.50mm_Vertical","Connector_JST/JST_XA_S02B-XASK-1N-BN_1x02_P2.50mm_Horizontal","Connector_JST/JST_XA_S02B-XASK-1_1x02_P2.50mm_Horizontal","Connector_JST/JST_XA_S03B-XASK-1N-BN_1x03_P2.50mm_Horizontal","Connector_JST/JST_XA_S03B-XASK-1_1x03_P2.50mm_Horizontal","Connector_JST/JST_XA_S04B-XASK-1N-BN_1x04_P2.50mm_Horizontal","Connector_JST/JST_XA_S04B-XASK-1_1x04_P2.50mm_Horizontal","Connector_JST/JST_XA_S05B-XASK-1N-BN_1x05_P2.50mm_Horizontal","Connector_JST/JST_XA_S05B-XASK-1_1x05_P2.50mm_Horizontal","Connector_JST/JST_XA_S06B-XASK-1N-BN_1x06_P2.50mm_Horizontal","Connector_JST/JST_XA_S06B-XASK-1_1x06_P2.50mm_Horizontal","Connector_JST/JST_XA_S07B-XASK-1N-BN_1x07_P2.50mm_Horizontal","Connector_JST/JST_XA_S07B-XASK-1_1x07_P2.50mm_Horizontal","Connector_JST/JST_XA_S08B-XASK-1N-BN_1x08_P2.50mm_Horizontal","Connector_JST/JST_XA_S08B-XASK-1_1x08_P2.50mm_Horizontal","Connector_JST/JST_XA_S09B-XASK-1N-BN_1x09_P2.50mm_Horizontal","Connector_JST/JST_XA_S09B-XASK-1_1x09_P2.50mm_Horizontal","Connector_JST/JST_XA_S10B-XASK-1N-BN_1x10_P2.50mm_Horizontal","Connector_JST/JST_XA_S10B-XASK-1_1x10_P2.50mm_Horizontal","Connector_JST/JST_XA_S11B-XASK-1N-BN_1x11_P2.50mm_Horizontal","Connector_JST/JST_XA_S11B-XASK-1_1x11_P2.50mm_Horizontal","Connector_JST/JST_XA_S12B-XASK-1N-BN_1x12_P2.50mm_Horizontal","Connector_JST/JST_XA_S12B-XASK-1_1x12_P2.50mm_Horizontal","Connector_JST/JST_XA_S13B-XASK-1N-BN_1x13_P2.50mm_Horizontal","Connector_JST/JST_XA_S13B-XASK-1_1x13_P2.50mm_Horizontal","Connector_JST/JST_XA_S14B-XASK-1N-BN_1x14_P2.50mm_Horizontal","Connector_JST/JST_XA_S14B-XASK-1_1x14_P2.50mm_Horizontal","Connector_JST/JST_XH_B10B-XH-AM_1x10_P2.50mm_Vertical","Connector_JST/JST_XH_B10B-XH-A_1x10_P2.50mm_Vertical","Connector_JST/JST_XH_B11B-XH-A_1x11_P2.50mm_Vertical","Connector_JST/JST_XH_B12B-XH-AM_1x12_P2.50mm_Vertical","Connector_JST/JST_XH_B12B-XH-A_1x12_P2.50mm_Vertical","Connector_JST/JST_XH_B13B-XH-A_1x13_P2.50mm_Vertical","Connector_JST/JST_XH_B14B-XH-A_1x14_P2.50mm_Vertical","Connector_JST/JST_XH_B15B-XH-A_1x15_P2.50mm_Vertical","Connector_JST/JST_XH_B16B-XH-A_1x16_P2.50mm_Vertical","Connector_JST/JST_XH_B1B-XH-AM_1x01_P2.50mm_Vertical","Connector_JST/JST_XH_B20B-XH-A_1x20_P2.50mm_Vertical","Connector_JST/JST_XH_B2B-XH-AM_1x02_P2.50mm_Vertical","Connector_JST/JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical","Connector_JST/JST_XH_B3B-XH-AM_1x03_P2.50mm_Vertical","Connector_JST/JST_XH_B3B-XH-A_1x03_P2.50mm_Vertical","Connector_JST/JST_XH_B4B-XH-AM_1x04_P2.50mm_Vertical","Connector_JST/JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical","Connector_JST/JST_XH_B5B-XH-AM_1x05_P2.50mm_Vertical","Connector_JST/JST_XH_B5B-XH-A_1x05_P2.50mm_Vertical","Connector_JST/JST_XH_B6B-XH-AM_1x06_P2.50mm_Vertical","Connector_JST/JST_XH_B6B-XH-A_1x06_P2.50mm_Vertical","Connector_JST/JST_XH_B7B-XH-AM_1x07_P2.50mm_Vertical","Connector_JST/JST_XH_B7B-XH-A_1x07_P2.50mm_Vertical","Connector_JST/JST_XH_B8B-XH-AM_1x08_P2.50mm_Vertical","Connector_JST/JST_XH_B8B-XH-A_1x08_P2.50mm_Vertical","Connector_JST/JST_XH_B9B-XH-AM_1x09_P2.50mm_Vertical","Connector_JST/JST_XH_B9B-XH-A_1x09_P2.50mm_Vertical","Connector_JST/JST_XH_S10B-XH-A-1_1x10_P2.50mm_Horizontal","Connector_JST/JST_XH_S10B-XH-A_1x10_P2.50mm_Horizontal","Connector_JST/JST_XH_S11B-XH-A-1_1x11_P2.50mm_Horizontal","Connector_JST/JST_XH_S11B-XH-A_1x11_P2.50mm_Horizontal","Connector_JST/JST_XH_S12B-XH-A-1_1x12_P2.50mm_Horizontal","Connector_JST/JST_XH_S12B-XH-A_1x12_P2.50mm_Horizontal","Connector_JST/JST_XH_S13B-XH-A-1_1x13_P2.50mm_Horizontal","Connector_JST/JST_XH_S13B-XH-A_1x13_P2.50mm_Horizontal","Connector_JST/JST_XH_S14B-XH-A-1_1x14_P2.50mm_Horizontal","Connector_JST/JST_XH_S14B-XH-A_1x14_P2.50mm_Horizontal","Connector_JST/JST_XH_S15B-XH-A-1_1x15_P2.50mm_Horizontal","Connector_JST/JST_XH_S15B-XH-A_1x15_P2.50mm_Horizontal","Connector_JST/JST_XH_S16B-XH-A_1x16_P2.50mm_Horizontal","Connector_JST/JST_XH_S2B-XH-A-1_1x02_P2.50mm_Horizontal","Connector_JST/JST_XH_S2B-XH-A_1x02_P2.50mm_Horizontal","Connector_JST/JST_XH_S3B-XH-A-1_1x03_P2.50mm_Horizontal","Connector_JST/JST_XH_S3B-XH-A_1x03_P2.50mm_Horizontal","Connector_JST/JST_XH_S3B-XH-SM4-TB_1x03-1MP_P2.50mm_Horizontal","Connector_JST/JST_XH_S4B-XH-A-1_1x04_P2.50mm_Horizontal","Connector_JST/JST_XH_S4B-XH-A_1x04_P2.50mm_Horizontal","Connector_JST/JST_XH_S4B-XH-SM4-TB_1x04-1MP_P2.50mm_Horizontal","Connector_JST/JST_XH_S5B-XH-A-1_1x05_P2.50mm_Horizontal","Connector_JST/JST_XH_S5B-XH-A_1x05_P2.50mm_Horizontal","Connector_JST/JST_XH_S6B-XH-A-1_1x06_P2.50mm_Horizontal","Connector_JST/JST_XH_S6B-XH-A_1x06_P2.50mm_Horizontal","Connector_JST/JST_XH_S6B-XH-SM4-TB_1x06-1MP_P2.50mm_Horizontal","Connector_JST/JST_XH_S7B-XH-A-1_1x07_P2.50mm_Horizontal","Connector_JST/JST_XH_S7B-XH-A_1x07_P2.50mm_Horizontal","Connector_JST/JST_XH_S8B-XH-A-1_1x08_P2.50mm_Horizontal","Connector_JST/JST_XH_S8B-XH-A_1x08_P2.50mm_Horizontal","Connector_JST/JST_XH_S9B-XH-A-1_1x09_P2.50mm_Horizontal","Connector_JST/JST_XH_S9B-XH-A_1x09_P2.50mm_Horizontal","Connector_JST/JST_ZE_B02B-ZESK-1D_1x02_P1.50mm_Vertical","Connector_JST/JST_ZE_B03B-ZESK-1D_1x03_P1.50mm_Vertical","Connector_JST/JST_ZE_B03B-ZESK-D_1x03_P1.50mm_Vertical","Connector_JST/JST_ZE_B04B-ZESK-1D_1x04_P1.50mm_Vertical","Connector_JST/JST_ZE_B04B-ZESK-D_1x04_P1.50mm_Vertical","Connector_JST/JST_ZE_B05B-ZESK-1D_1x05_P1.50mm_Vertical","Connector_JST/JST_ZE_B05B-ZESK-D_1x05_P1.50mm_Vertical","Connector_JST/JST_ZE_B06B-ZESK-1D_1x06_P1.50mm_Vertical","Connector_JST/JST_ZE_B06B-ZESK-D_1x06_P1.50mm_Vertical","Connector_JST/JST_ZE_B07B-ZESK-1D_1x07_P1.50mm_Vertical","Connector_JST/JST_ZE_B07B-ZESK-D_1x07_P1.50mm_Vertical","Connector_JST/JST_ZE_B08B-ZESK-1D_1x08_P1.50mm_Vertical","Connector_JST/JST_ZE_B08B-ZESK-D_1x08_P1.50mm_Vertical","Connector_JST/JST_ZE_B09B-ZESK-1D_1x09_P1.50mm_Vertical","Connector_JST/JST_ZE_B09B-ZESK-D_1x09_P1.50mm_Vertical","Connector_JST/JST_ZE_B10B-ZESK-1D_1x10_P1.50mm_Vertical","Connector_JST/JST_ZE_B10B-ZESK-D_1x10_P1.50mm_Vertical","Connector_JST/JST_ZE_B11B-ZESK-1D_1x11_P1.50mm_Vertical","Connector_JST/JST_ZE_B11B-ZESK-D_1x11_P1.50mm_Vertical","Connector_JST/JST_ZE_B12B-ZESK-1D_1x12_P1.50mm_Vertical","Connector_JST/JST_ZE_B12B-ZESK-D_1x12_P1.50mm_Vertical","Connector_JST/JST_ZE_B13B-ZESK-1D_1x13_P1.50mm_Vertical","Connector_JST/JST_ZE_B13B-ZESK-D_1x13_P1.50mm_Vertical","Connector_JST/JST_ZE_B14B-ZESK-1D_1x14_P1.50mm_Vertical","Connector_JST/JST_ZE_B14B-ZESK-D_1x14_P1.50mm_Vertical","Connector_JST/JST_ZE_B15B-ZESK-1D_1x15_P1.50mm_Vertical","Connector_JST/JST_ZE_B15B-ZESK-D_1x15_P1.50mm_Vertical","Connector_JST/JST_ZE_B16B-ZESK-1D_1x16_P1.50mm_Vertical","Connector_JST/JST_ZE_B16B-ZESK-D_1x16_P1.50mm_Vertical","Connector_JST/JST_ZE_BM02B-ZESS-TBT_1x02-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM03B-ZESS-TBT_1x03-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM04B-ZESS-TBT_1x04-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM05B-ZESS-TBT_1x05-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM06B-ZESS-TBT_1x06-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM07B-ZESS-TBT_1x07-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM08B-ZESS-TBT_1x08-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM09B-ZESS-TBT_1x09-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM10B-ZESS-TBT_1x10-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM11B-ZESS-TBT_1x11-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM12B-ZESS-TBT_1x12-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM13B-ZESS-TBT_1x13-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM14B-ZESS-TBT_1x14-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM15B-ZESS-TBT_1x15-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_BM16B-ZESS-TBT_1x16-1MP_P1.50mm_Vertical","Connector_JST/JST_ZE_S02B-ZESK-2D_1x02_P1.50mm_Horizontal","Connector_JST/JST_ZE_S03B-ZESK-2D_1x03_P1.50mm_Horizontal","Connector_JST/JST_ZE_S04B-ZESK-2D_1x04_P1.50mm_Horizontal","Connector_JST/JST_ZE_S05B-ZESK-2D_1x05_P1.50mm_Horizontal","Connector_JST/JST_ZE_S06B-ZESK-2D_1x06_P1.50mm_Horizontal","Connector_JST/JST_ZE_S07B-ZESK-2D_1x07_P1.50mm_Horizontal","Connector_JST/JST_ZE_S08B-ZESK-2D_1x08_P1.50mm_Horizontal","Connector_JST/JST_ZE_S09B-ZESK-2D_1x09_P1.50mm_Horizontal","Connector_JST/JST_ZE_S10B-ZESK-2D_1x10_P1.50mm_Horizontal","Connector_JST/JST_ZE_S11B-ZESK-2D_1x11_P1.50mm_Horizontal","Connector_JST/JST_ZE_S12B-ZESK-2D_1x12_P1.50mm_Horizontal","Connector_JST/JST_ZE_S13B-ZESK-2D_1x13_P1.50mm_Horizontal","Connector_JST/JST_ZE_S14B-ZESK-2D_1x14_P1.50mm_Horizontal","Connector_JST/JST_ZE_S15B-ZESK-2D_1x15_P1.50mm_Horizontal","Connector_JST/JST_ZE_S16B-ZESK-2D_1x16_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM02B-ZESS-TB_1x02-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM03B-ZESS-TB_1x03-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM04B-ZESS-TB_1x04-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM05B-ZESS-TB_1x05-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM06B-ZESS-TB_1x06-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM07B-ZESS-TB_1x07-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM08B-ZESS-TB_1x08-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM09B-ZESS-TB_1x09-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM10B-ZESS-TB_1x10-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM11B-ZESS-TB_1x11-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM12B-ZESS-TB_1x12-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM13B-ZESS-TB_1x13-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM14B-ZESS-TB_1x14-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM15B-ZESS-TB_1x15-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZE_SM16B-ZESS-TB_1x16-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_B10B-ZR-SM4-TF_1x10-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B10B-ZR_1x10_P1.50mm_Vertical","Connector_JST/JST_ZH_B11B-ZR-SM4-TF_1x11-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B11B-ZR_1x11_P1.50mm_Vertical","Connector_JST/JST_ZH_B12B-ZR-SM4-TF_1x12-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B12B-ZR_1x12_P1.50mm_Vertical","Connector_JST/JST_ZH_B13B-ZR-SM4-TF_1x13-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B2B-ZR-SM4-TF_1x02-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B2B-ZR_1x02_P1.50mm_Vertical","Connector_JST/JST_ZH_B3B-ZR-SM4-TF_1x03-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B3B-ZR_1x03_P1.50mm_Vertical","Connector_JST/JST_ZH_B4B-ZR-SM4-TF_1x04-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B4B-ZR_1x04_P1.50mm_Vertical","Connector_JST/JST_ZH_B5B-ZR-SM4-TF_1x05-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B5B-ZR_1x05_P1.50mm_Vertical","Connector_JST/JST_ZH_B6B-ZR-SM4-TF_1x06-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B6B-ZR_1x06_P1.50mm_Vertical","Connector_JST/JST_ZH_B7B-ZR-SM4-TF_1x07-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B7B-ZR_1x07_P1.50mm_Vertical","Connector_JST/JST_ZH_B8B-ZR-SM4-TF_1x08-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B8B-ZR_1x08_P1.50mm_Vertical","Connector_JST/JST_ZH_B9B-ZR-SM4-TF_1x09-1MP_P1.50mm_Vertical","Connector_JST/JST_ZH_B9B-ZR_1x09_P1.50mm_Vertical","Connector_JST/JST_ZH_S10B-ZR-SM4A-TF_1x10-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S11B-ZR-SM4A-TF_1x11-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S12B-ZR-SM4A-TF_1x12-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S13B-ZR-SM4A-TF_1x13-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S2B-ZR-SM4A-TF_1x02-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S3B-ZR-SM4A-TF_1x03-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S4B-ZR-SM4A-TF_1x04-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S5B-ZR-SM4A-TF_1x05-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S6B-ZR-SM4A-TF_1x06-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S7B-ZR-SM4A-TF_1x07-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S8B-ZR-SM4A-TF_1x08-1MP_P1.50mm_Horizontal","Connector_JST/JST_ZH_S9B-ZR-SM4A-TF_1x09-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502382-0270_1x02-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-0370_1x03-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-0470_1x04-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-0570_1x05-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-0670_1x06-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-0770_1x07-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-0870_1x08-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-0970_1x09-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-1070_1x10-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-1170_1x11-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-1270_1x12-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-1370_1x13-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-1470_1x14-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502382-1570_1x15-1MP_P1.25mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502386-0270_1x02-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-0370_1x03-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-0470_1x04-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-0570_1x05-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-0670_1x06-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-0770_1x07-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-0870_1x08-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-0970_1x09-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-1070_1x10-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-1170_1x11-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-1270_1x12-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-1370_1x13-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-1470_1x14-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502386-1570_1x15-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502443-0270_1x02-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-0370_1x03-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-0470_1x04-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-0570_1x05-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-0670_1x06-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-0770_1x07-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-0870_1x08-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-0970_1x09-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-1270_1x12-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-1370_1x13-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-1470_1x14-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502443-1570_1x15-1MP_P2.00mm_Vertical","Connector_Molex/Molex_CLIK-Mate_502494-0270_1x02-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-0370_1x03-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-0470_1x04-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-0670_1x06-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-0870_1x08-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-1070_1x10-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-1270_1x12-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-1370_1x13-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-1470_1x14-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502494-1570_1x15-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0270_1x02-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0370_1x03-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0470_1x04-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0570_1x05-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0670_1x06-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0770_1x07-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0870_1x08-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-0970_1x09-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-1070_1x10-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-1170_1x11-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-1270_1x12-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-1370_1x13-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-1470_1x14-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_502585-1570_1x15-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_CLIK-Mate_505405-0270_1x02-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-0370_1x03-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-0470_1x04-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-0570_1x05-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-0670_1x06-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-0770_1x07-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-0870_1x08-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-0970_1x09-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-1070_1x10-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-1170_1x11-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-1270_1x12-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-1370_1x13-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-1470_1x14-1MP_P1.50mm_Vertical","Connector_Molex/Molex_CLIK-Mate_505405-1570_1x15-1MP_P1.50mm_Vertical","Connector_Molex/Molex_DuraClik_502352-0200_1x02-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-0300_1x03-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-0400_1x04-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-0500_1x05-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-0600_1x06-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-0700_1x07-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-0800_1x08-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-0900_1x09-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-1000_1x10-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-1100_1x11-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-1200_1x12-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-1300_1x13-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-1400_1x14-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_DuraClik_502352-1500_1x15-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_KK-254_AE-6410-02A_1x02_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-03A_1x03_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-04A_1x04_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-05A_1x05_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-06A_1x06_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-07A_1x07_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-08A_1x08_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-09A_1x09_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-10A_1x10_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-11A_1x11_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-12A_1x12_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-13A_1x13_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-14A_1x14_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-15A_1x15_P2.54mm_Vertical","Connector_Molex/Molex_KK-254_AE-6410-16A_1x16_P2.54mm_Vertical","Connector_Molex/Molex_KK-396_5273-02A_1x02_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-03A_1x03_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-04A_1x04_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-05A_1x05_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-06A_1x06_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-07A_1x07_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-08A_1x08_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-09A_1x09_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-10A_1x10_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-11A_1x11_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_5273-12A_1x12_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0002_1x02_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0003_1x03_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0004_1x04_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0005_1x05_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0006_1x06_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0007_1x07_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0008_1x08_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0009_1x09_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0010_1x10_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0011_1x11_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0012_1x12_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0013_1x13_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0014_1x14_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0015_1x15_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0016_1x16_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0017_1x17_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41791-0018_1x18_P3.96mm_Vertical","Connector_Molex/Molex_KK-396_A-41792-0002_1x02_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0003_1x03_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0004_1x04_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0005_1x05_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0006_1x06_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0007_1x07_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0008_1x08_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0009_1x09_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0010_1x10_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0011_1x11_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0012_1x12_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0013_1x13_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0014_1x14_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0015_1x15_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0016_1x16_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0017_1x17_P3.96mm_Horizontal","Connector_Molex/Molex_KK-396_A-41792-0018_1x18_P3.96mm_Horizontal","Connector_Molex/Molex_Mega-Fit_76825-0002_2x01_P5.70mm_Horizontal","Connector_Molex/Molex_Mega-Fit_76825-0004_2x02_P5.70mm_Horizontal","Connector_Molex/Molex_Mega-Fit_76825-0006_2x03_P5.70mm_Horizontal","Connector_Molex/Molex_Mega-Fit_76825-0008_2x04_P5.70mm_Horizontal","Connector_Molex/Molex_Mega-Fit_76825-0010_2x05_P5.70mm_Horizontal","Connector_Molex/Molex_Mega-Fit_76825-0012_2x06_P5.70mm_Horizontal","Connector_Molex/Molex_Mega-Fit_76829-0002_2x01_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0004_2x02_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0006_2x03_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0008_2x04_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0010_2x05_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0012_2x06_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0102_2x01_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0104_2x02_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0106_2x03_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0108_2x04_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0110_2x05_P5.70mm_Vertical","Connector_Molex/Molex_Mega-Fit_76829-0112_2x06_P5.70mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0200_2x01_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0210_2x01-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0212_2x01_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0215_2x01_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0218_2x01-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0221_2x01-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0400_2x02_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0410_2x02-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0412_2x02_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0415_2x02_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0418_2x02-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0421_2x02-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0600_2x03_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0610_2x03-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0612_2x03_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0615_2x03_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0618_2x03-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0621_2x03-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0800_2x04_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0810_2x04-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-0812_2x04_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0815_2x04_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0818_2x04-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-0821_2x04-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1000_2x05_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1010_2x05-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1012_2x05_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1015_2x05_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1018_2x05-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1021_2x05-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1200_2x06_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1210_2x06-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1212_2x06_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1215_2x06_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1218_2x06-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1221_2x06-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1400_2x07_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1410_2x07-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1412_2x07_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1415_2x07_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1418_2x07-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1421_2x07-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1600_2x08_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1610_2x08-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1612_2x08_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1615_2x08_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1618_2x08-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1621_2x08-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1800_2x09_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1810_2x09-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-1812_2x09_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1815_2x09_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1818_2x09-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-1821_2x09-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2000_2x10_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2010_2x10-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2012_2x10_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2015_2x10_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2018_2x10-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2021_2x10-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2200_2x11_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2210_2x11-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2212_2x11_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2215_2x11_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2218_2x11-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2221_2x11-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2400_2x12_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2410_2x12-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43045-2412_2x12_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2415_2x12_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2418_2x12-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43045-2421_2x12-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0200_1x02_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0210_1x02-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0210_1x02-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0212_1x02-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0215_1x02_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0221_1x02_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0224_1x02-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0300_1x03_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0310_1x03-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0310_1x03-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0312_1x03-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0315_1x03_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0321_1x03_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0324_1x03-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0400_1x04_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0410_1x04-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0410_1x04-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0412_1x04-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0415_1x04_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0421_1x04_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0424_1x04-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0500_1x05_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0510_1x05-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0510_1x05-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0512_1x05-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0515_1x05_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0521_1x05_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0524_1x05-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0600_1x06_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0610_1x06-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0610_1x06-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0612_1x06-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0615_1x06_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0621_1x06_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0624_1x06-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0700_1x07_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0710_1x07-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0710_1x07-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0712_1x07-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0715_1x07_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0721_1x07_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0724_1x07-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0800_1x08_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0810_1x08-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0810_1x08-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0812_1x08-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0815_1x08_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0821_1x08_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0824_1x08-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0900_1x09_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0910_1x09-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0910_1x09-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-0912_1x09-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-0915_1x09_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0921_1x09_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-0924_1x09-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1000_1x10_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1010_1x10-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1010_1x10-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-1012_1x10-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1015_1x10_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1021_1x10_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1024_1x10-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1100_1x11_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1110_1x11-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1110_1x11-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-1112_1x11-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1115_1x11_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1121_1x11_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1124_1x11-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1200_1x12_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1210_1x12-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1210_1x12-1MP_P3.00mm_Horizontal_PnP","Connector_Molex/Molex_Micro-Fit_3.0_43650-1212_1x12-1MP_P3.00mm_Horizontal","Connector_Molex/Molex_Micro-Fit_3.0_43650-1215_1x12_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1221_1x12_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Fit_3.0_43650-1224_1x12-1MP_P3.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0270_1x02_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0370_1x03_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0470_1x04_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0570_1x05_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0670_1x06_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0770_1x07_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0870_1x08_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-0970_1x09_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-1070_1x10_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-1170_1x11_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-1270_1x12_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-1370_1x13_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-1470_1x14_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53253-1570_1x15_P2.00mm_Vertical","Connector_Molex/Molex_Micro-Latch_53254-0270_1x02_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-0370_1x03_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-0470_1x04_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-0570_1x05_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-0670_1x06_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-0770_1x07_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-0870_1x08_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-0970_1x09_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-1070_1x10_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-1170_1x11_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-1270_1x12_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-1370_1x13_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-1470_1x14_P2.00mm_Horizontal","Connector_Molex/Molex_Micro-Latch_53254-1570_1x15_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55932-0210_1x02_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0230_1x02_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0310_1x03_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0330_1x03_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0410_1x04_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0430_1x04_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0510_1x05_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0530_1x05_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0610_1x06_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0630_1x06_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0710_1x07_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0730_1x07_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0810_1x08_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0830_1x08_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0910_1x09_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-0930_1x09_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1010_1x10_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1030_1x10_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1110_1x11_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1130_1x11_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1210_1x12_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1230_1x12_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1310_1x13_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1330_1x13_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1410_1x14_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1430_1x14_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1510_1x15_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55932-1530_1x15_P2.00mm_Vertical","Connector_Molex/Molex_MicroClasp_55935-0210_1x02_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0230_1x02_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0310_1x03_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0330_1x03_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0410_1x04_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0430_1x04_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0510_1x05_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0530_1x05_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0610_1x06_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0630_1x06_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0710_1x07_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0730_1x07_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0810_1x08_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0830_1x08_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0910_1x09_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-0930_1x09_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1010_1x10_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1030_1x10_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1110_1x11_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1130_1x11_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1210_1x12_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1230_1x12_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1310_1x13_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1330_1x13_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1410_1x14_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1430_1x14_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1510_1x15_P2.00mm_Horizontal","Connector_Molex/Molex_MicroClasp_55935-1530_1x15_P2.00mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5566-02A2_2x01_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-02A_2x01_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-04A2_2x02_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-04A_2x02_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-06A2_2x03_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-06A_2x03_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-08A2_2x04_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-08A_2x04_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-10A2_2x05_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-10A_2x05_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-12A2_2x06_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-12A_2x06_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-14A2_2x07_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-14A_2x07_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-16A2_2x08_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-16A_2x08_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-18A2_2x09_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-18A_2x09_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-20A2_2x10_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-20A_2x10_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-22A2_2x11_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-22A_2x11_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-24A2_2x12_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5566-24A_2x12_P4.20mm_Vertical","Connector_Molex/Molex_Mini-Fit_Jr_5569-02A1_2x01_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-02A2_2x01_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-04A1_2x02_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-04A2_2x02_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-06A1_2x03_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-06A2_2x03_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-08A1_2x04_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-08A2_2x04_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-10A1_2x05_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-10A2_2x05_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-12A1_2x06_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-12A2_2x06_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-14A1_2x07_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-14A2_2x07_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-16A1_2x08_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-16A2_2x08_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-18A1_2x09_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-18A2_2x09_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-20A1_2x10_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-20A2_2x10_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-22A1_2x11_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-22A2_2x11_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-24A1_2x12_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Jr_5569-24A2_2x12_P4.20mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Sr_42819-22XX_1x02_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_42819-22XX_1x02_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42819-32XX_1x03_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_42819-32XX_1x03_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42819-42XX_1x04_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_42819-42XX_1x04_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42819-52XX_1x05_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_42819-52XX_1x05_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42819-62XX_1x06_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_42819-62XX_1x06_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42820-22XX_1x02_P10.00mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Sr_42820-22XX_1x02_P10.00mm_Horizontal_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42820-32XX_1x03_P10.00mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Sr_42820-32XX_1x03_P10.00mm_Horizontal_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42820-42XX_1x04_P10.00mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Sr_42820-42XX_1x04_P10.00mm_Horizontal_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42820-52XX_1x05_P10.00mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Sr_42820-52XX_1x05_P10.00mm_Horizontal_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_42820-62XX_1x06_P10.00mm_Horizontal","Connector_Molex/Molex_Mini-Fit_Sr_42820-62XX_1x06_P10.00mm_Horizontal_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx06_2x03_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx06_2x03_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx08_2x04_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx08_2x04_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx10_2x05_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx10_2x05_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx12_2x06_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx12_2x06_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx14_2x07_P10.00mm_Vertical","Connector_Molex/Molex_Mini-Fit_Sr_43915-xx14_2x07_P10.00mm_Vertical_ThermalVias","Connector_Molex/Molex_Nano-Fit_105309-xx02_1x02_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105309-xx03_1x03_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105309-xx04_1x04_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105309-xx05_1x05_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105309-xx06_1x06_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105309-xx07_1x07_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105309-xx08_1x08_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105310-xx04_2x02_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105310-xx06_2x03_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105310-xx08_2x04_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105310-xx10_2x05_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105310-xx12_2x06_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105310-xx14_2x07_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105310-xx16_2x08_P2.50mm_Vertical","Connector_Molex/Molex_Nano-Fit_105313-xx02_1x02_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105313-xx03_1x03_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105313-xx04_1x04_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105313-xx05_1x05_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105313-xx06_1x06_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105313-xx07_1x07_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105313-xx08_1x08_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105314-xx04_2x02_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105314-xx06_2x03_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105314-xx08_2x04_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105314-xx10_2x05_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105314-xx12_2x06_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105314-xx14_2x07_P2.50mm_Horizontal","Connector_Molex/Molex_Nano-Fit_105314-xx16_2x08_P2.50mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0270_1x02-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0370_1x03-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0470_1x04-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0570_1x05-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0670_1x06-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0770_1x07-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0870_1x08-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-0970_1x09-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-1070_1x10-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-1270_1x12-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-1470_1x14-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-1570_1x15-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-1870_1x18-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Panelmate_53780-3070_1x30-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0207_1x02-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0307_1x03-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0407_1x04-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0507_1x05-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0607_1x06-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0707_1x07-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0807_1x08-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-0907_1x09-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-1007_1x10-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-1107_1x11-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-1207_1x12-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-1307_1x13-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-1407_1x14-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_202396-1507_1x15-1MP_P1.00mm_Horizontal","Connector_Molex/Molex_Pico-Clasp_501331-0207_1x02-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-0307_1x03-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-0407_1x04-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-0507_1x05-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-0607_1x06-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-0707_1x07-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-0807_1x08-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-0907_1x09-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-1007_1x10-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-1107_1x11-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-1207_1x12-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-1307_1x13-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-1407_1x14-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-Clasp_501331-1507_1x15-1MP_P1.00mm_Vertical","Connector_Molex/Molex_Pico-EZmate_78171-0002_1x02-1MP_P1.20mm_Vertical","Connector_Molex/Molex_Pico-EZmate_78171-0003_1x03-1MP_P1.20mm_Vertical","Connector_Molex/Molex_Pico-EZmate_78171-0004_1x04-1MP_P1.20mm_Vertical","Connector_Molex/Molex_Pico-EZmate_78171-0005_1x05-1MP_P1.20mm_Vertical","Connector_Molex/Molex_Pico-EZmate_Slim_202656-0021_1x02-1MP_P1.20mm_Vertical","Connector_Molex/Molex_Pico-Lock_205338-0002_1x02-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_Pico-Lock_205338-0004_1x04-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_Pico-Lock_205338-0006_1x06-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_Pico-Lock_205338-0008_1x08-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_Pico-Lock_205338-0010_1x10-1MP_P2.00mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0291_1x02-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0391_1x03-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0491_1x04-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0591_1x05-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0691_1x06-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0791_1x07-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0891_1x08-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-0991_1x09-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-1091_1x10-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-1191_1x11-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-Lock_504050-1291_1x12-1MP_P1.50mm_Horizontal","Connector_Molex/Molex_Pico-SPOX_87437-1443_1x14-P1.5mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0210_1x02_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0310_1x03_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0410_1x04_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0510_1x05_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0610_1x06_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0710_1x07_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0810_1x08_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-0910_1x09_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-1010_1x10_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-1110_1x11_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-1210_1x12_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-1310_1x13_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-1410_1x14_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53047-1510_1x15_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53048-0210_1x02_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-0310_1x03_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-0410_1x04_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-0510_1x05_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-0610_1x06_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-0710_1x07_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-0810_1x08_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-0910_1x09_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-1010_1x10_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-1110_1x11_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-1210_1x12_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-1310_1x13_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-1410_1x14_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53048-1510_1x15_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0271_1x02-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0371_1x03-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0471_1x04-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0571_1x05-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0671_1x06-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0771_1x07-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0871_1x08-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-0971_1x09-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-1071_1x10-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-1171_1x11-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-1271_1x12-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-1371_1x13-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-1471_1x14-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-1571_1x15-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53261-1771_1x17-1MP_P1.25mm_Horizontal","Connector_Molex/Molex_PicoBlade_53398-0271_1x02-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-0371_1x03-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-0471_1x04-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-0571_1x05-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-0671_1x06-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-0771_1x07-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-0871_1x08-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-0971_1x09-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-1071_1x10-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-1171_1x11-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-1271_1x12-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-1371_1x13-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-1471_1x14-1MP_P1.25mm_Vertical","Connector_Molex/Molex_PicoBlade_53398-1571_1x15-1MP_P1.25mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0004_2x02_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0006_2x03_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0008_2x04_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0010_2x05_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0012_2x06_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0014_2x07_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0016_2x08_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0018_2x09_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0020_2x10_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0022_2x11_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0024_2x12_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90325-0026_2x13_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0004_2x02_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0006_2x03_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0008_2x04_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0010_2x05_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0012_2x06_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0014_2x07_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0016_2x08_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0018_2x09_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0020_2x10_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0022_2x11_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0024_2x12_P1.27mm_Vertical","Connector_Molex/Molex_Picoflex_90814-0026_2x13_P1.27mm_Vertical","Connector_Molex/Molex_SL_171971-0002_1x02_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0003_1x03_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0004_1x04_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0005_1x05_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0006_1x06_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0007_1x07_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0008_1x08_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0009_1x09_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0010_1x10_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0011_1x11_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0012_1x12_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0013_1x13_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0014_1x14_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0015_1x15_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0016_1x16_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0017_1x17_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0018_1x18_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0019_1x19_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0020_1x20_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0021_1x21_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0022_1x22_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0023_1x23_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0024_1x24_P2.54mm_Vertical","Connector_Molex/Molex_SL_171971-0025_1x25_P2.54mm_Vertical","Connector_Molex/Molex_SPOX_5267-02A_1x02_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-03A_1x03_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-04A_1x04_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-05A_1x05_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-06A_1x06_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-07A_1x07_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-08A_1x08_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-09A_1x09_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-10A_1x10_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-11A_1x11_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-12A_1x12_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-13A_1x13_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-14A_1x14_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5267-15A_1x15_P2.50mm_Vertical","Connector_Molex/Molex_SPOX_5268-02A_1x02_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-03A_1x03_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-04A_1x04_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-05A_1x05_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-06A_1x06_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-07A_1x07_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-08A_1x08_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-09A_1x09_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-10A_1x10_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-11A_1x11_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-12A_1x12_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-13A_1x13_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-14A_1x14_P2.50mm_Horizontal","Connector_Molex/Molex_SPOX_5268-15A_1x15_P2.50mm_Horizontal","Connector_Molex/Molex_Sabre_43160-0102_1x02_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-0102_1x02_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-0103_1x03_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-0103_1x03_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-0104_1x04_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-0104_1x04_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-0105_1x05_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-0105_1x05_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-0106_1x06_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-0106_1x06_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-1102_1x02_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_43160-1102_1x02_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_43160-1103_1x03_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_43160-1103_1x03_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_43160-1104_1x04_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_43160-1104_1x04_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_43160-1105_1x05_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_43160-1105_1x05_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_43160-1106_1x06_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_43160-1106_1x06_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_43160-2102_1x02_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-2102_1x02_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-2103_1x03_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-2103_1x03_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-2104_1x04_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-2104_1x04_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-2105_1x05_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-2105_1x05_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_43160-2106_1x06_P7.49mm_Vertical","Connector_Molex/Molex_Sabre_43160-2106_1x06_P7.49mm_Vertical_ThermalVias","Connector_Molex/Molex_Sabre_46007-1102_1x02_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_46007-1102_1x02_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_46007-1103_1x03_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_46007-1103_1x03_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_46007-1104_1x04_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_46007-1104_1x04_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_46007-1105_1x05_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_46007-1105_1x05_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_Sabre_46007-1106_1x06_P7.49mm_Horizontal","Connector_Molex/Molex_Sabre_46007-1106_1x06_P7.49mm_Horizontal_ThermalVias","Connector_Molex/Molex_SlimStack_501920-3001_2x15_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_501920-4001_2x20_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_501920-5001_2x25_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_502426-0810_2x04_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-1410_2x07_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-2010_2x10_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-2210_2x11_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-2410_2x12_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-2610_2x13_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-3010_2x15_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-3210_2x16_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-3410_2x17_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-4010_2x20_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-4410_2x22_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-5010_2x25_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-6010_2x30_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-6410_2x32_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502426-8010_2x40_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-0820_2x04_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-1410_2x07_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-2010_2x10_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-2210_2x11_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-2410_2x12_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-2610_2x13_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-3010_2x15_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-3210_2x16_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-3410_2x17_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-4010_2x20_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-4410_2x22_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-5010_2x25_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-6010_2x30_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-6410_2x32_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_502430-8010_2x40_P0.40mm_Vertical","Connector_Molex/Molex_SlimStack_52991-0208_2x10_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_52991-0308_2x15_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_52991-0408_2x20_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_52991-0508_2x25_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_52991-0608_2x30_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_52991-0708_2x35_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_52991-0808_2x40_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_53748-0208_2x10_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_53748-0308_2x15_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_53748-0408_2x20_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_53748-0608_2x30_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_53748-0708_2x35_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_53748-0808_2x40_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0164_2x08_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0204_2x10_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0224_2x11_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0244_2x12_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0304_2x15_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0344_2x17_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0404_2x20_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0504_2x25_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0604_2x30_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_54722-0804_2x40_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0161_2x08_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0201_2x10_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0221_2x11_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0241_2x12_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0301_2x15_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0341_2x17_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0401_2x20_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0501_2x25_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0601_2x30_P0.50mm_Vertical","Connector_Molex/Molex_SlimStack_55560-0801_2x40_P0.50mm_Vertical","Connector_Molex_Milligrid/Molex_8783204xx_2x02_P2.0mm_Header_Vertical","Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical","Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical_MountingPegs","Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783206xx_2x03_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical","Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical_MountingPegs","Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783208xx_2x04_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical","Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical_MountingPegs","Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783210xx_2x05_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical","Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical_MountingPegs","Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783212xx_2x06_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783214xx_2x07_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783214xx_2x07_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783216xx_2x08_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783216xx_2x08_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783218xx_2x09_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783218xx_2x09_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783220xx_2x10_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783220xx_2x10_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783222xx_2x11_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783222xx_2x11_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783224xx_2x12_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783224xx_2x12_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783226xx_2x13_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783226xx_2x13_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783228xx_2x14_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783228xx_2x14_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783230xx_2x15_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783230xx_2x15_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783232xx_2x16_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783232xx_2x16_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783234xx_2x17_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783234xx_2x17_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783236xx_2x18_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783236xx_2x18_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783238xx_2x19_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783238xx_2x19_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783240xx_2x20_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783240xx_2x20_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783242xx_2x21_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783242xx_2x21_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783244xx_2x22_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783244xx_2x22_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783246xx_2x23_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783246xx_2x23_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783248xx_2x24_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783248xx_2x24_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_Molex_Milligrid/Molex_8783250xx_2x25_P2.0mm_Header_Vertical_Polarized","Connector_Molex_Milligrid/Molex_8783250xx_2x25_P2.0mm_Header_Vertical_Polarized_MountingPegs","Connector_PCBEdge/4UCON_10156_2x40_P1.27mm_Socket_Horizontal","Connector_PCBEdge/BUS_AT","Connector_PCBEdge/BUS_PCI","Connector_PCBEdge/BUS_PCI_Express_Mini","Connector_PCBEdge/BUS_PCI_Express_Mini_Dual","Connector_PCBEdge/BUS_PCI_Express_Mini_Full","Connector_PCBEdge/BUS_PCI_Express_Mini_Half","Connector_PCBEdge/BUS_PCIexpress_x1","Connector_PCBEdge/BUS_PCIexpress_x16","Connector_PCBEdge/BUS_PCIexpress_x4","Connector_PCBEdge/BUS_PCIexpress_x8","Connector_PCBEdge/DEC_double_long","Connector_PCBEdge/DEC_double_short","Connector_PCBEdge/DEC_quad_long","Connector_PCBEdge/DEC_quad_short","Connector_PCBEdge/DEC_single_long","Connector_PCBEdge/DEC_single_short","Connector_PCBEdge/JAE_MM60-EZH039-Bx_BUS_PCI_Express_Holder","Connector_PCBEdge/JAE_MM60-EZH059-Bx_BUS_PCI_Express_Holder","Connector_PCBEdge/M.2_22110-xx-B","Connector_PCBEdge/M.2_22110-xx-M","Connector_PCBEdge/M.2_2230-xx-A","Connector_PCBEdge/M.2_2230-xx-B","Connector_PCBEdge/M.2_2230-xx-E","Connector_PCBEdge/M.2_2230-xx-M","Connector_PCBEdge/M.2_2242-xx-B","Connector_PCBEdge/M.2_2242-xx-M","Connector_PCBEdge/M.2_2260-xx-B","Connector_PCBEdge/M.2_2260-xx-M","Connector_PCBEdge/M.2_2280-xx-B","Connector_PCBEdge/M.2_2280-xx-M","Connector_PCBEdge/M.2_3030-xx-A","Connector_PCBEdge/M.2_3030-xx-E","Connector_PCBEdge/M.2_3042-xx-B","Connector_PCBEdge/SODIMM-200_1.8V_Card_edge","Connector_PCBEdge/SODIMM-200_2.5V_Card_edge","Connector_PCBEdge/SODIMM-260_DDR4_H4.0-5.2_OrientationStd_Socket","Connector_PCBEdge/Samtec_MECF-05-01-L-DV-WT_2x05_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-01-L-DV_2x05_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-01-NP-L-DV-WT_2x05_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-01-NP-L-DV_2x05_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-02-L-DV-WT_2x05_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-02-L-DV_2x05_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-02-NP-L-DV-WT_2x05_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-02-NP-L-DV_2x05_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-05-0_-L-DV_2x05_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-05-0_-NP-L-DV_2x05_P1.27mm_Edge","Connector_PCBEdge/Samtec_MECF-08-01-L-DV-WT_2x08_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-01-L-DV_2x08_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-01-NP-L-DV-WT_2x08_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-01-NP-L-DV_2x08_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-02-L-DV-WT_2x08_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-02-L-DV_2x08_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-02-NP-L-DV-WT_2x08_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-02-NP-L-DV_2x08_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-08-0_-L-DV_2x08_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-08-0_-NP-L-DV_2x08_P1.27mm_Edge","Connector_PCBEdge/Samtec_MECF-20-01-L-DV-WT_2x20_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-01-L-DV_2x20_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-01-NP-L-DV-WT_2x20_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-01-NP-L-DV_2x20_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-02-L-DV-WT_2x20_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-02-L-DV_2x20_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-02-NP-L-DV-WT_2x20_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-02-NP-L-DV_2x20_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-20-0_-L-DV_2x20_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-20-0_-NP-L-DV_2x20_P1.27mm_Edge","Connector_PCBEdge/Samtec_MECF-30-01-L-DV-WT_2x30_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-01-L-DV_2x30_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-01-NP-L-DV-WT_2x30_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-01-NP-L-DV_2x30_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-02-L-DV-WT_2x30_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-02-L-DV_2x30_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-02-NP-L-DV-WT_2x30_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-02-NP-L-DV_2x30_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-30-0_-L-DV_2x30_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-30-0_-NP-L-DV_2x30_P1.27mm_Edge","Connector_PCBEdge/Samtec_MECF-40-01-L-DV-WT_2x40_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-01-L-DV_2x40_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-01-NP-L-DV-WT_2x40_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-01-NP-L-DV_2x40_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-02-L-DV-WT_2x40_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-02-L-DV_2x40_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-02-NP-L-DV-WT_2x40_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-02-NP-L-DV_2x40_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-40-0_-L-DV_2x40_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-40-0_-NP-L-DV_2x40_P1.27mm_Edge","Connector_PCBEdge/Samtec_MECF-50-01-L-DV-WT_2x50_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-01-L-DV_2x50_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-01-NP-L-DV-WT_2x50_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-01-NP-L-DV_2x50_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-02-L-DV-WT_2x50_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-02-L-DV_2x50_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-02-NP-L-DV-WT_2x50_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-02-NP-L-DV_2x50_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-50-0_-L-DV_2x50_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-50-0_-NP-L-DV_2x50_P1.27mm_Edge","Connector_PCBEdge/Samtec_MECF-60-01-L-DV-WT_2x60_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-01-L-DV_2x60_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-01-NP-L-DV-WT_2x60_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-01-NP-L-DV_2x60_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-02-L-DV-WT_2x60_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-02-L-DV_2x60_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-02-NP-L-DV-WT_2x60_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-02-NP-L-DV_2x60_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-60-0_-L-DV_2x60_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-60-0_-NP-L-DV_2x60_P1.27mm_Edge","Connector_PCBEdge/Samtec_MECF-70-01-L-DV-WT_2x70_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-01-L-DV_2x70_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-01-NP-L-DV-WT_2x70_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-01-NP-L-DV_2x70_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-02-L-DV-WT_2x70_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-02-L-DV_2x70_P1.27mm_Polarized_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-02-NP-L-DV-WT_2x70_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-02-NP-L-DV_2x70_P1.27mm_Socket_Horizontal","Connector_PCBEdge/Samtec_MECF-70-0_-L-DV_2x70_P1.27mm_Polarized_Edge","Connector_PCBEdge/Samtec_MECF-70-0_-NP-L-DV_2x70_P1.27mm_Edge","Connector_PCBEdge/molex_EDGELOCK_2-CKT","Connector_PCBEdge/molex_EDGELOCK_4-CKT","Connector_PCBEdge/molex_EDGELOCK_6-CKT","Connector_PCBEdge/molex_EDGELOCK_8-CKT","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_10-G-7,62_1x10_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_10-G_1x10_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_11-G-7,62_1x11_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_11-G_1x11_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_12-G-7,62_1x12_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_12-G_1x12_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_2-G-7,62_1x02_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_2-G_1x02_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_3-G-7,62_1x03_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_3-G_1x03_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_4-G-7,62_1x04_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_4-G_1x04_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_5-G-7,62_1x05_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_5-G_1x05_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_6-G-7,62_1x06_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_6-G_1x06_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_7-G-7,62_1x07_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_7-G_1x07_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_8-G-7,62_1x08_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_8-G_1x08_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_9-G-7,62_1x09_P7.62mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBA_2,5_9-G_1x09_P7.50mm_Horizontal","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_10-G-7,62_1x10_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_10-G_1x10_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_11-G-7,62_1x11_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_11-G_1x11_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_12-G-7,62_1x12_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_12-G_1x12_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_2-G-7,62_1x02_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_2-G_1x02_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_3-G-7,62_1x03_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_3-G_1x03_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_4-G-7,62_1x04_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_4-G_1x04_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_5-G-7,62_1x05_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_5-G_1x05_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_6-G-7,62_1x06_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_6-G_1x06_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_7-G-7,62_1x07_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_7-G_1x07_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_8-G-7,62_1x08_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_8-G_1x08_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_9-G-7,62_1x09_P7.62mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBVA_2,5_9-G_1x09_P7.50mm_Vertical","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_10-GF-7,62_1x10_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_10-GF-7,62_1x10_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_11-GF-7,62_1x11_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_11-GF-7,62_1x11_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_12-GF-7,62_1x12_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_12-GF-7,62_1x12_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_2-GF-7,62_1x02_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_2-GF-7,62_1x02_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_3-GF-7,62_1x03_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_3-GF-7,62_1x03_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_4-GF-7,62_1x04_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_4-GF-7,62_1x04_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_5-GF-7,62_1x05_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_5-GF-7,62_1x05_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_6-GF-7,62_1x06_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_6-GF-7,62_1x06_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_7-GF-7,62_1x07_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_7-GF-7,62_1x07_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_8-GF-7,62_1x08_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_8-GF-7,62_1x08_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_9-GF-7,62_1x09_P7.62mm_Vertical_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTBV_2,5_9-GF-7,62_1x09_P7.62mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_10-GF-7,62_1x10_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_10-GF-7,62_1x10_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_11-GF-7,62_1x11_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_11-GF-7,62_1x11_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_12-GF-7,62_1x12_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_12-GF-7,62_1x12_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_2-GF-7,62_1x02_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_2-GF-7,62_1x02_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_3-GF-7,62_1x03_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_3-GF-7,62_1x03_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_4-GF-7,62_1x04_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_4-GF-7,62_1x04_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_5-GF-7,62_1x05_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_5-GF-7,62_1x05_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_6-GF-7,62_1x06_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_6-GF-7,62_1x06_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_7-GF-7,62_1x07_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_7-GF-7,62_1x07_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_8-GF-7,62_1x08_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_8-GF-7,62_1x08_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_9-GF-7,62_1x09_P7.62mm_Horizontal_ThreadedFlange","Connector_Phoenix_GMSTB/PhoenixContact_GMSTB_2,5_9-GF-7,62_1x09_P7.62mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-G-3.5_1x10_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-G-3.81_1x10_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.5_1x10_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.5_1x10_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.81_1x10_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_10-GF-3.81_1x10_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-G-3.5_1x11_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-G-3.81_1x11_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.5_1x11_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.5_1x11_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.81_1x11_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_11-GF-3.81_1x11_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-G-3.5_1x12_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-G-3.81_1x12_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.5_1x12_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.5_1x12_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.81_1x12_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_12-GF-3.81_1x12_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-G-3.5_1x13_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-G-3.81_1x13_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.5_1x13_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.5_1x13_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.81_1x13_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_13-GF-3.81_1x13_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-G-3.5_1x14_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-G-3.81_1x14_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.5_1x14_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.5_1x14_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.81_1x14_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_14-GF-3.81_1x14_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-G-3.5_1x15_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-G-3.81_1x15_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.5_1x15_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.5_1x15_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.81_1x15_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_15-GF-3.81_1x15_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-G-3.5_1x16_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-G-3.81_1x16_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.5_1x16_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.5_1x16_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.81_1x16_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_16-GF-3.81_1x16_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-G-3.5_1x02_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-G-3.81_1x02_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.5_1x02_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.5_1x02_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.81_1x02_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_2-GF-3.81_1x02_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-G-3.5_1x03_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-G-3.81_1x03_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.5_1x03_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.5_1x03_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.81_1x03_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_3-GF-3.81_1x03_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-G-3.5_1x04_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-G-3.81_1x04_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.5_1x04_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.5_1x04_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.81_1x04_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_4-GF-3.81_1x04_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-G-3.5_1x05_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-G-3.81_1x05_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.5_1x05_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.5_1x05_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.81_1x05_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_5-GF-3.81_1x05_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-G-3.5_1x06_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-G-3.81_1x06_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.5_1x06_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.5_1x06_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.81_1x06_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_6-GF-3.81_1x06_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-G-3.5_1x07_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-G-3.81_1x07_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.5_1x07_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.5_1x07_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.81_1x07_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_7-GF-3.81_1x07_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-G-3.5_1x08_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-G-3.81_1x08_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.5_1x08_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.5_1x08_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.81_1x08_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_8-GF-3.81_1x08_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-G-3.5_1x09_P3.50mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-G-3.81_1x09_P3.81mm_Vertical","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.5_1x09_P3.50mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.5_1x09_P3.50mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.81_1x09_P3.81mm_Vertical_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MCV_1,5_9-GF-3.81_1x09_P3.81mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-G-3.5_1x10_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-G-3.81_1x10_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.5_1x10_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.5_1x10_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.81_1x10_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_10-GF-3.81_1x10_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-G-3.5_1x11_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-G-3.81_1x11_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.5_1x11_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.5_1x11_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.81_1x11_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_11-GF-3.81_1x11_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-G-3.5_1x12_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-G-3.81_1x12_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.5_1x12_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.5_1x12_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.81_1x12_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_12-GF-3.81_1x12_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-G-3.5_1x13_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-G-3.81_1x13_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.5_1x13_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.5_1x13_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.81_1x13_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_13-GF-3.81_1x13_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-G-3.5_1x14_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-G-3.81_1x14_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.5_1x14_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.5_1x14_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.81_1x14_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_14-GF-3.81_1x14_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-G-3.5_1x15_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-G-3.81_1x15_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.5_1x15_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.5_1x15_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.81_1x15_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_15-GF-3.81_1x15_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-G-3.5_1x16_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-G-3.81_1x16_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.5_1x16_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.5_1x16_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.81_1x16_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_16-GF-3.81_1x16_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-G-3.5_1x02_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-G-3.81_1x02_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.5_1x02_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.5_1x02_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.81_1x02_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_2-GF-3.81_1x02_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-G-3.5_1x03_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-G-3.81_1x03_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.5_1x03_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.5_1x03_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.81_1x03_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_3-GF-3.81_1x03_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-G-3.5_1x04_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-G-3.81_1x04_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.5_1x04_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.5_1x04_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.81_1x04_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_4-GF-3.81_1x04_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-G-3.5_1x05_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-G-3.81_1x05_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.5_1x05_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.5_1x05_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.81_1x05_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_5-GF-3.81_1x05_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-G-3.5_1x06_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-G-3.81_1x06_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.5_1x06_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.5_1x06_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.81_1x06_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_6-GF-3.81_1x06_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-G-3.5_1x07_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-G-3.81_1x07_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.5_1x07_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.5_1x07_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.81_1x07_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_7-GF-3.81_1x07_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-G-3.5_1x08_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-G-3.81_1x08_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.5_1x08_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.5_1x08_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.81_1x08_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_8-GF-3.81_1x08_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-G-3.5_1x09_P3.50mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-G-3.81_1x09_P3.81mm_Horizontal","Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.5_1x09_P3.50mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.5_1x09_P3.50mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.81_1x09_P3.81mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC/PhoenixContact_MC_1,5_9-GF-3.81_1x09_P3.81mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_10-G-5.08_1x10_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_10-GF-5.08_1x10_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_10-GF-5.08_1x10_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_11-G-5.08_1x11_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_11-GF-5.08_1x11_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_11-GF-5.08_1x11_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_12-G-5.08_1x12_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_12-GF-5.08_1x12_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_12-GF-5.08_1x12_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_2-G-5.08_1x02_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_2-GF-5.08_1x02_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_2-GF-5.08_1x02_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_3-G-5.08_1x03_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_3-GF-5.08_1x03_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_3-GF-5.08_1x03_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_4-G-5.08_1x04_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_4-GF-5.08_1x04_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_4-GF-5.08_1x04_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_5-G-5.08_1x05_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_5-GF-5.08_1x05_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_5-GF-5.08_1x05_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_6-G-5.08_1x06_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_6-GF-5.08_1x06_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_6-GF-5.08_1x06_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_7-G-5.08_1x07_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_7-GF-5.08_1x07_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_7-GF-5.08_1x07_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_8-G-5.08_1x08_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_8-GF-5.08_1x08_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_8-GF-5.08_1x08_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_9-G-5.08_1x09_P5.08mm_Vertical","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_9-GF-5.08_1x09_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MCV_1,5_9-GF-5.08_1x09_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_10-G-5.08_1x10_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_10-GF-5.08_1x10_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_10-GF-5.08_1x10_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_11-G-5.08_1x11_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_11-GF-5.08_1x11_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_11-GF-5.08_1x11_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_12-G-5.08_1x12_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_12-GF-5.08_1x12_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_12-GF-5.08_1x12_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_2-G-5.08_1x02_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_2-GF-5.08_1x02_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_2-GF-5.08_1x02_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_3-G-5.08_1x03_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_3-GF-5.08_1x03_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_3-GF-5.08_1x03_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_4-G-5.08_1x04_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_4-GF-5.08_1x04_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_4-GF-5.08_1x04_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_5-G-5.08_1x05_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_5-GF-5.08_1x05_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_5-GF-5.08_1x05_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_6-G-5.08_1x06_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_6-GF-5.08_1x06_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_6-GF-5.08_1x06_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_7-G-5.08_1x07_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_7-GF-5.08_1x07_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_7-GF-5.08_1x07_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_8-G-5.08_1x08_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_8-GF-5.08_1x08_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_8-GF-5.08_1x08_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_9-G-5.08_1x09_P5.08mm_Horizontal","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_9-GF-5.08_1x09_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MC_HighVoltage/PhoenixContact_MC_1,5_9-GF-5.08_1x09_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_10-G-5,08_1x10_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_10-G_1x10_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_11-G-5,08_1x11_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_11-G_1x11_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_12-G-5,08_1x12_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_12-G_1x12_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_13-G-5,08_1x13_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_13-G_1x13_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_14-G-5,08_1x14_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_14-G_1x14_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_15-G-5,08_1x15_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_15-G_1x15_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_16-G-5,08_1x16_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_16-G_1x16_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_2-G-5,08_1x02_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_2-G_1x02_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_3-G-5,08_1x03_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_3-G_1x03_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_4-G-5,08_1x04_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_4-G_1x04_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_5-G-5,08_1x05_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_5-G_1x05_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_6-G-5,08_1x06_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_6-G_1x06_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_7-G-5,08_1x07_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_7-G_1x07_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_8-G-5,08_1x08_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_8-G_1x08_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_9-G-5,08_1x09_P5.08mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBA_2,5_9-G_1x09_P5.00mm_Horizontal","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_10-G-5,08_1x10_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_10-G_1x10_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_11-G-5,08_1x11_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_11-G_1x11_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_12-G-5,08_1x12_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_12-G_1x12_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_13-G-5,08_1x13_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_13-G_1x13_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_14-G-5,08_1x14_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_14-G_1x14_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_15-G-5,08_1x15_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_15-G_1x15_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_16-G-5,08_1x16_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_16-G_1x16_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_2-G-5,08_1x02_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_2-G_1x02_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_3-G-5,08_1x03_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_3-G_1x03_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_4-G-5,08_1x04_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_4-G_1x04_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_5-G-5,08_1x05_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_5-G_1x05_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_6-G-5,08_1x06_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_6-G_1x06_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_7-G-5,08_1x07_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_7-G_1x07_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_8-G-5,08_1x08_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_8-G_1x08_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_9-G-5,08_1x09_P5.08mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBVA_2,5_9-G_1x09_P5.00mm_Vertical","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF-5,08_1x10_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF-5,08_1x10_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF_1x10_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_10-GF_1x10_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF-5,08_1x11_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF-5,08_1x11_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF_1x11_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_11-GF_1x11_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF-5,08_1x12_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF-5,08_1x12_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF_1x12_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_12-GF_1x12_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF-5,08_1x13_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF-5,08_1x13_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF_1x13_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_13-GF_1x13_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF-5,08_1x14_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF-5,08_1x14_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF_1x14_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_14-GF_1x14_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF-5,08_1x15_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF-5,08_1x15_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF_1x15_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_15-GF_1x15_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF-5,08_1x16_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF-5,08_1x16_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF_1x16_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_16-GF_1x16_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF-5,08_1x02_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF-5,08_1x02_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF_1x02_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_2-GF_1x02_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF-5,08_1x03_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF-5,08_1x03_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF_1x03_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_3-GF_1x03_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF-5,08_1x04_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF-5,08_1x04_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF_1x04_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_4-GF_1x04_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF-5,08_1x05_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF-5,08_1x05_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF_1x05_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_5-GF_1x05_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF-5,08_1x06_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF-5,08_1x06_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF_1x06_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_6-GF_1x06_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF-5,08_1x07_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF-5,08_1x07_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF_1x07_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_7-GF_1x07_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF-5,08_1x08_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF-5,08_1x08_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF_1x08_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_8-GF_1x08_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF-5,08_1x09_P5.08mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF-5,08_1x09_P5.08mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF_1x09_P5.00mm_Vertical_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTBV_2,5_9-GF_1x09_P5.00mm_Vertical_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF-5,08_1x10_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF-5,08_1x10_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF_1x10_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_10-GF_1x10_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF-5,08_1x11_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF-5,08_1x11_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF_1x11_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_11-GF_1x11_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF-5,08_1x12_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF-5,08_1x12_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF_1x12_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_12-GF_1x12_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF-5,08_1x13_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF-5,08_1x13_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF_1x13_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_13-GF_1x13_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF-5,08_1x14_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF-5,08_1x14_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF_1x14_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_14-GF_1x14_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF-5,08_1x15_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF-5,08_1x15_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF_1x15_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_15-GF_1x15_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF-5,08_1x16_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF-5,08_1x16_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF_1x16_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_16-GF_1x16_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF-5,08_1x02_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF-5,08_1x02_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF_1x02_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_2-GF_1x02_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF-5,08_1x03_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF-5,08_1x03_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF_1x03_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_3-GF_1x03_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF-5,08_1x04_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF-5,08_1x04_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF_1x04_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_4-GF_1x04_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF-5,08_1x05_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF-5,08_1x05_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF_1x05_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_5-GF_1x05_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF-5,08_1x06_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF-5,08_1x06_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF_1x06_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_6-GF_1x06_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF-5,08_1x07_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF-5,08_1x07_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF_1x07_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_7-GF_1x07_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF-5,08_1x08_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF-5,08_1x08_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF_1x08_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_8-GF_1x08_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF-5,08_1x09_P5.08mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF-5,08_1x09_P5.08mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF_1x09_P5.00mm_Horizontal_ThreadedFlange","Connector_Phoenix_MSTB/PhoenixContact_MSTB_2,5_9-GF_1x09_P5.00mm_Horizontal_ThreadedFlange_MountHole","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_10-H-3.5_1x10_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_11-H-3.5_1x11_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_12-H-3.5_1x12_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_2-H-3.5_1x02_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_3-H-3.5_1x03_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_4-H-3.5_1x04_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_5-H-3.5_1x05_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_6-H-3.5_1x06_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_7-H-3.5_1x07_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_8-H-3.5_1x08_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_1.5_9-H-3.5_1x09_P3.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_1-H-5.0_1x01_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_10-H-5.0-EX_1x10_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_10-H-5.0_1x10_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_10-V-5.0-EX_1x10_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_11-H-5.0-EX_1x11_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_11-H-5.0_1x11_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_11-V-5.0-EX_1x11_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_12-H-5.0-EX_1x12_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_12-H-5.0_1x12_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_12-V-5.0-EX_1x12_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_2-H-5.0-EX_1x02_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_2-H-5.0_1x02_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_2-V-5.0-EX_1x02_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_3-H-5.0-EX_1x03_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_3-H-5.0_1x03_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_3-V-5.0-EX_1x03_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_4-H-5.0-EX_1x04_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_4-H-5.0_1x04_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_4-V-5.0-EX_1x04_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_5-H-5.0-EX_1x05_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_5-H-5.0_1x05_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_5-V-5.0-EX_1x05_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_6-H-5.0-EX_1x06_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_6-H-5.0_1x06_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_6-V-5.0-EX_1x06_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_7-H-5.0-EX_1x07_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_7-H-5.0_1x07_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_7-V-5.0-EX_1x07_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_8-H-5.0-EX_1x08_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_8-H-5.0_1x08_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_8-V-5.0-EX_1x08_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_9-H-5.0-EX_1x09_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_9-H-5.0_1x09_P5.0mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_2.5_9-V-5.0-EX_1x09_P5.0mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_1-H-7.5_1x01_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_1-V-7.5_1x01_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_10-H-7.5-ZB_1x10_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_10-V-7.5-ZB_1x10_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_11-H-7.5-ZB_1x11_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_11-V-7.5-ZB_1x11_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_12-H-7.5-ZB_1x12_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_12-V-7.5-ZB_1x12_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_2-H-7.5-ZB_1x02_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_2-V-7.5_1x02_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_3-H-7.5-ZB_1x03_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_3-H-7.5_1x03_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_3-V-7.5-ZB_1x03_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_4-H-7.5-ZB_1x04_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_5-H-7.5-ZB_1x05_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_5-V-7.5-ZB_1x05_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_6-H-7.5-ZB_1x06_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_6-V-7.5-ZB_1x06_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_7-H-7.5-ZB_1x07_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_7-V-7.5-ZB_1x07_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_8-H-7.5-ZB_1x08_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_8-V-7.5-ZB_1x08_P7.5mm_Vertical","Connector_Phoenix_SPT/PhoenixContact_SPT_5_9-H-7.5-ZB_1x09_P7.5mm_Horizontal","Connector_Phoenix_SPT/PhoenixContact_SPT_5_9-V-7.5-ZB_1x09_P7.5mm_Vertical","Connector_Pin/Pin_D0.7mm_L6.5mm_W1.8mm_FlatFork","Connector_Pin/Pin_D0.9mm_L10.0mm_W2.4mm_FlatFork","Connector_Pin/Pin_D1.0mm_L10.0mm","Connector_Pin/Pin_D1.0mm_L10.0mm_LooseFit","Connector_Pin/Pin_D1.1mm_L10.2mm_W3.5mm_Flat","Connector_Pin/Pin_D1.1mm_L8.5mm_W2.5mm_FlatFork","Connector_Pin/Pin_D1.2mm_L10.2mm_W2.9mm_FlatFork","Connector_Pin/Pin_D1.2mm_L11.3mm_W3.0mm_Flat","Connector_Pin/Pin_D1.3mm_L10.0mm_W3.5mm_Flat","Connector_Pin/Pin_D1.3mm_L11.0mm","Connector_Pin/Pin_D1.3mm_L11.0mm_LooseFit","Connector_Pin/Pin_D1.3mm_L11.3mm_W2.8mm_Flat","Connector_Pin/Pin_D1.4mm_L8.5mm_W2.8mm_FlatFork","Connector_PinHeader_1.00mm/PinHeader_1x01_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x01_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x02_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x03_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x04_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x05_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x06_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x07_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x08_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x09_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x10_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x11_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x12_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x13_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x14_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x15_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x16_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x17_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x18_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x19_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x20_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x21_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x22_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x23_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x24_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x25_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x26_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x27_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x28_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x29_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x30_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x31_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x32_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x33_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x34_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x35_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x36_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x37_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x38_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x39_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.00mm/PinHeader_1x40_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.00mm/PinHeader_2x01_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x01_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x01_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x02_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x02_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x02_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x03_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x03_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x03_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x04_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x04_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x04_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x05_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x05_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x05_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x06_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x06_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x06_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x07_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x07_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x07_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x08_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x08_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x08_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x09_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x09_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x09_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x10_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x10_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x10_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x11_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x11_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x11_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x12_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x12_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x12_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x13_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x13_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x13_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x14_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x14_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x14_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x15_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x15_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x15_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x16_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x16_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x16_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x17_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x17_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x17_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x18_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x18_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x18_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x19_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x19_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x19_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x20_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x20_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x20_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x21_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x21_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x21_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x22_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x22_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x22_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x23_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x23_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x23_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x24_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x24_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x24_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x25_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x25_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x25_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x26_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x26_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x26_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x27_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x27_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x27_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x28_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x28_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x28_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x29_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x29_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x29_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x30_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x30_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x30_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x31_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x31_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x31_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x32_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x32_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x32_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x33_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x33_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x33_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x34_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x34_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x34_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x35_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x35_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x35_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x36_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x36_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x36_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x37_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x37_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x37_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x38_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x38_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x38_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x39_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x39_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x39_P1.00mm_Vertical_SMD","Connector_PinHeader_1.00mm/PinHeader_2x40_P1.00mm_Horizontal","Connector_PinHeader_1.00mm/PinHeader_2x40_P1.00mm_Vertical","Connector_PinHeader_1.00mm/PinHeader_2x40_P1.00mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_1x01_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x01_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x02_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x03_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x04_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x05_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x06_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x07_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x08_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x09_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x10_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x11_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x12_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x13_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x14_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x15_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x16_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x17_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x18_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x19_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x20_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x21_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x22_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x23_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x24_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x25_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x26_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x27_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x28_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x29_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x30_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x31_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x32_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x33_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x34_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x35_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x36_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x37_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x38_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x39_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinHeader_1.27mm/PinHeader_1x40_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinHeader_1.27mm/PinHeader_2x01_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x01_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x01_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x02_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x02_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x02_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x03_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x03_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x03_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x04_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x04_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x04_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x05_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x05_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x05_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x06_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x06_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x06_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x07_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x07_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x07_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x08_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x08_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x08_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x09_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x09_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x09_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x10_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x10_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x10_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x11_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x11_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x11_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x12_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x12_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x12_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x13_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x13_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x13_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x14_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x14_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x14_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x15_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x15_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x15_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x16_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x16_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x16_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x17_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x17_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x17_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x18_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x18_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x18_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x19_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x19_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x19_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x20_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x20_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x20_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x21_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x21_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x21_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x22_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x22_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x22_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x23_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x23_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x23_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x24_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x24_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x24_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x25_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x25_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x25_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x26_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x26_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x26_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x27_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x27_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x27_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x28_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x28_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x28_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x29_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x29_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x29_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x30_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x30_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x30_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x31_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x31_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x31_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x32_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x32_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x32_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x33_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x33_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x33_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x34_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x34_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x34_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x35_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x35_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x35_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x36_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x36_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x36_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x37_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x37_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x37_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x38_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x38_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x38_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x39_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x39_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x39_P1.27mm_Vertical_SMD","Connector_PinHeader_1.27mm/PinHeader_2x40_P1.27mm_Horizontal","Connector_PinHeader_1.27mm/PinHeader_2x40_P1.27mm_Vertical","Connector_PinHeader_1.27mm/PinHeader_2x40_P1.27mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_1x01_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x01_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x02_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x03_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x04_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x05_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x06_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x07_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x08_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x09_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x10_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x11_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x12_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x13_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x14_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x15_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x16_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x17_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x18_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x19_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x20_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x21_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x22_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x23_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x24_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x25_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x26_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x27_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x28_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x29_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x30_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x31_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x32_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x33_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x34_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x35_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x36_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x37_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x38_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x39_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.00mm/PinHeader_1x40_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.00mm/PinHeader_2x01_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x01_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x01_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x02_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x02_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x02_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x03_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x03_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x03_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x04_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x04_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x04_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x05_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x05_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x05_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x06_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x06_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x06_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x07_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x07_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x07_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x08_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x08_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x08_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x09_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x09_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x09_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x10_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x10_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x10_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x11_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x11_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x11_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x12_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x12_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x12_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x13_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x13_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x13_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x14_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x14_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x14_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x15_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x15_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x15_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x16_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x16_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x16_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x17_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x17_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x17_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x18_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x18_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x18_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x19_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x19_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x19_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x20_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x20_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x20_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x21_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x21_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x21_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x22_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x22_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x22_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x23_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x23_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x23_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x24_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x24_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x24_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x25_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x25_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x25_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x26_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x26_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x26_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x27_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x27_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x27_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x28_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x28_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x28_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x29_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x29_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x29_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x30_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x30_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x30_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x31_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x31_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x31_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x32_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x32_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x32_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x33_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x33_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x33_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x34_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x34_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x34_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x35_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x35_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x35_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x36_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x36_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x36_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x37_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x37_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x37_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x38_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x38_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x38_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x39_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x39_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x39_P2.00mm_Vertical_SMD","Connector_PinHeader_2.00mm/PinHeader_2x40_P2.00mm_Horizontal","Connector_PinHeader_2.00mm/PinHeader_2x40_P2.00mm_Vertical","Connector_PinHeader_2.00mm/PinHeader_2x40_P2.00mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_1x01_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x01_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x02_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x03_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x04_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x05_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x06_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x07_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x08_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x09_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x10_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x11_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x12_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x13_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x14_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x15_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x16_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x17_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x18_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x19_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x20_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x21_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x22_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x23_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x24_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x25_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x26_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x27_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x28_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x29_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x30_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x31_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x32_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x33_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x34_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x35_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x36_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x37_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x38_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x39_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinHeader_2.54mm/PinHeader_1x40_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinHeader_2.54mm/PinHeader_2x01_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x01_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x01_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x02_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x02_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x02_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x03_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x03_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x03_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x04_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x04_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x04_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x05_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x05_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x05_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x06_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x06_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x06_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x07_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x07_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x07_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x08_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x08_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x08_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x09_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x09_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x09_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x10_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x10_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x10_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x11_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x11_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x11_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x12_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x12_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x12_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x13_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x13_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x13_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x14_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x14_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x14_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x15_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x15_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x15_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x16_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x16_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x16_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x17_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x17_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x17_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x18_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x18_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x18_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x19_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x19_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x19_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x20_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x20_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x20_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x21_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x21_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x21_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x22_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x22_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x22_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x23_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x23_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x23_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x24_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x24_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x24_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x25_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x25_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x25_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x26_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x26_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x26_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x27_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x27_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x27_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x28_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x28_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x28_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x29_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x29_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x29_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x30_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x30_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x30_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x31_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x31_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x31_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x32_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x32_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x32_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x33_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x33_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x33_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x34_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x34_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x34_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x35_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x35_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x35_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x36_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x36_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x36_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x37_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x37_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x37_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x38_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x38_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x38_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x39_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x39_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x39_P2.54mm_Vertical_SMD","Connector_PinHeader_2.54mm/PinHeader_2x40_P2.54mm_Horizontal","Connector_PinHeader_2.54mm/PinHeader_2x40_P2.54mm_Vertical","Connector_PinHeader_2.54mm/PinHeader_2x40_P2.54mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_1x02_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x02_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x02_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x03_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x03_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x03_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x04_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x04_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x04_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x05_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x05_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x05_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x06_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x06_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x06_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x07_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x07_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x07_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x08_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x08_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x08_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x09_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x09_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x09_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x10_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x10_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x10_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x11_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x11_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x11_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x12_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x12_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x12_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x13_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x13_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x13_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x14_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x14_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x14_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x15_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x15_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x15_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x16_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x16_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x16_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x17_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x17_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x17_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x18_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x18_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x18_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x19_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x19_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x19_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x20_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x20_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x20_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x21_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x21_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x21_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x22_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x22_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x22_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x23_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x23_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x23_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x24_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x24_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x24_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x25_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x25_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x25_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x26_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x26_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x26_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x27_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x27_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x27_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x28_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x28_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x28_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x29_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x29_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x29_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x30_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x30_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x30_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x31_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x31_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x31_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x32_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x32_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x32_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x33_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x33_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x33_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x34_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x34_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x34_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x35_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x35_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x35_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x36_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x36_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x36_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x37_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x37_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x37_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x38_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x38_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x38_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x39_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x39_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x39_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_1x40_P1.00mm_Vertical","Connector_PinSocket_1.00mm/PinSocket_1x40_P1.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.00mm/PinSocket_1x40_P1.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.00mm/PinSocket_2x02_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x03_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x04_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x05_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x06_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x07_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x08_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x09_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x10_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x11_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x12_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x13_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x14_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x15_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x16_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x17_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x18_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x19_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x20_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x21_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x22_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x23_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x24_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x25_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x26_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x27_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x28_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x29_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x30_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x31_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x32_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x33_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x34_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x35_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x36_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x37_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x38_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x39_P1.00mm_Vertical_SMD","Connector_PinSocket_1.00mm/PinSocket_2x40_P1.00mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_1x01_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x02_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x02_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x02_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x03_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x03_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x03_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x04_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x04_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x04_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x05_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x05_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x05_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x06_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x06_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x06_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x07_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x07_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x07_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x08_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x08_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x08_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x09_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x09_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x09_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x10_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x10_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x10_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x11_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x11_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x11_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x12_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x12_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x12_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x13_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x13_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x13_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x14_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x14_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x14_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x15_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x15_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x15_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x16_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x16_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x16_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x17_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x17_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x17_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x18_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x18_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x18_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x19_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x19_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x19_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x20_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x20_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x20_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x21_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x21_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x21_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x22_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x22_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x22_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x23_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x23_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x23_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x24_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x24_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x24_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x25_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x25_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x25_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x26_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x26_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x26_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x27_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x27_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x27_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x28_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x28_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x28_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x29_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x29_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x29_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x30_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x30_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x30_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x31_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x31_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x31_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x32_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x32_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x32_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x33_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x33_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x33_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x34_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x34_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x34_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x35_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x35_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x35_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x36_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x36_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x36_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x37_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x37_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x37_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x38_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x38_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x38_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x39_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x39_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x39_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_1x40_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_1x40_P1.27mm_Vertical_SMD_Pin1Left","Connector_PinSocket_1.27mm/PinSocket_1x40_P1.27mm_Vertical_SMD_Pin1Right","Connector_PinSocket_1.27mm/PinSocket_2x01_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x01_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x02_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x02_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x03_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x03_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x03_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x04_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x04_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x04_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x05_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x05_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x05_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x06_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x06_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x06_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x07_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x07_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x07_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x08_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x08_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x08_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x09_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x09_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x09_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x10_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x10_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x10_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x11_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x11_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x11_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x12_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x12_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x12_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x13_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x13_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x13_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x14_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x14_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x14_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x15_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x15_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x15_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x16_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x16_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x16_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x17_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x17_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x17_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x18_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x18_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x18_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x19_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x19_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x19_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x20_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x20_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x20_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x21_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x21_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x21_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x22_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x22_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x22_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x23_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x23_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x23_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x24_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x24_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x24_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x25_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x25_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x25_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x26_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x26_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x26_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x27_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x27_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x27_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x28_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x28_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x28_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x29_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x29_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x29_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x30_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x30_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x30_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x31_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x31_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x31_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x32_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x32_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x32_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x33_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x33_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x33_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x34_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x34_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x34_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x35_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x35_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x35_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x36_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x36_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x36_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x37_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x37_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x37_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x38_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x38_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x38_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x39_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x39_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x39_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x40_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x40_P1.27mm_Vertical","Connector_PinSocket_1.27mm/PinSocket_2x40_P1.27mm_Vertical_SMD","Connector_PinSocket_1.27mm/PinSocket_2x41_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x42_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x43_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x44_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x45_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x46_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x47_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x48_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x49_P1.27mm_Horizontal","Connector_PinSocket_1.27mm/PinSocket_2x50_P1.27mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x01_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x01_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x02_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x03_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x04_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x05_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x06_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x07_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x08_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x09_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x10_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x11_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x12_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x13_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x14_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x15_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x16_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x17_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x18_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x19_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x20_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x21_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x22_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x23_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x24_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x25_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x26_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x27_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x28_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x29_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x30_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x31_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x32_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x33_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x34_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x35_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x36_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x37_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x38_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x39_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.00mm/PinSocket_1x40_P2.00mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.00mm/PinSocket_2x01_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x01_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x01_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x02_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x02_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x02_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x03_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x03_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x03_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x04_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x04_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x04_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x05_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x05_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x05_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x06_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x06_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x06_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x07_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x07_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x07_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x08_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x08_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x08_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x09_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x09_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x09_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x10_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x10_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x10_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x11_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x11_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x11_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x12_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x12_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x12_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x13_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x13_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x13_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x14_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x14_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x14_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x15_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x15_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x15_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x16_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x16_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x16_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x17_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x17_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x17_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x18_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x18_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x18_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x19_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x19_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x19_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x20_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x20_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x20_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x21_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x21_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x21_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x22_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x22_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x22_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x23_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x23_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x23_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x24_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x24_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x24_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x25_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x25_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x25_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x26_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x26_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x26_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x27_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x27_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x27_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x28_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x28_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x28_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x29_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x29_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x29_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x30_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x30_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x30_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x31_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x31_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x31_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x32_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x32_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x32_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x33_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x33_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x33_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x34_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x34_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x34_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x35_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x35_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x35_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x36_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x36_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x36_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x37_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x37_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x37_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x38_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x38_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x38_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x39_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x39_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x39_P2.00mm_Vertical_SMD","Connector_PinSocket_2.00mm/PinSocket_2x40_P2.00mm_Horizontal","Connector_PinSocket_2.00mm/PinSocket_2x40_P2.00mm_Vertical","Connector_PinSocket_2.00mm/PinSocket_2x40_P2.00mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_1x01_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x01_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x02_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x03_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x04_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x05_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x06_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x07_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x09_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x10_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x11_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x12_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x13_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x14_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x15_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x16_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x17_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x18_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x19_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x20_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x21_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x22_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x23_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x24_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x25_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x26_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x27_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x28_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x29_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x30_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x31_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x32_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x33_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x34_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x35_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x36_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x37_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x38_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x39_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Vertical_SMD_Pin1Left","Connector_PinSocket_2.54mm/PinSocket_1x40_P2.54mm_Vertical_SMD_Pin1Right","Connector_PinSocket_2.54mm/PinSocket_2x01_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x01_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x01_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x02_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x02_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x02_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x03_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x03_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x03_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x04_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x04_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x04_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x05_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x05_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x05_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x06_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x06_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x06_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x07_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x07_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x07_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x08_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x08_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x08_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x09_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x09_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x09_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x10_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x10_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x10_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x11_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x11_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x11_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x12_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x12_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x12_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x13_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x13_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x13_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x14_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x14_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x14_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x15_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x15_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x15_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x16_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x16_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x16_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x17_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x17_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x17_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x18_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x18_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x18_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x19_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x19_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x19_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x20_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x20_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x20_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x21_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x21_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x21_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x22_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x22_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x22_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x23_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x23_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x23_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x24_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x24_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x24_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x25_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x25_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x25_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x26_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x26_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x26_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x27_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x27_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x27_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x28_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x28_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x28_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x29_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x29_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x29_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x30_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x30_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x30_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x31_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x31_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x31_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x32_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x32_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x32_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x33_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x33_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x33_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x34_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x34_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x34_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x35_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x35_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x35_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x36_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x36_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x36_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x37_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x37_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x37_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x38_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x38_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x38_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x39_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x39_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x39_P2.54mm_Vertical_SMD","Connector_PinSocket_2.54mm/PinSocket_2x40_P2.54mm_Horizontal","Connector_PinSocket_2.54mm/PinSocket_2x40_P2.54mm_Vertical","Connector_PinSocket_2.54mm/PinSocket_2x40_P2.54mm_Vertical_SMD","Connector_RJ/RJ12_Amphenol_54601-x06_Horizontal","Connector_RJ/RJ14_Connfly_DS1133-S4_Horizontal","Connector_RJ/RJ25_Wayconn_MJEA-660X1_Horizontal","Connector_RJ/RJ45_Abracon_ARJP11A-MA_Horizontal","Connector_RJ/RJ45_Amphenol_54602-x08_Horizontal","Connector_RJ/RJ45_Amphenol_RJHSE5380-08","Connector_RJ/RJ45_Amphenol_RJHSE5380","Connector_RJ/RJ45_Amphenol_RJHSE538X-02","Connector_RJ/RJ45_Amphenol_RJHSE538X-04","Connector_RJ/RJ45_Amphenol_RJHSE538X","Connector_RJ/RJ45_Amphenol_RJMG1BD3B8K1ANR","Connector_RJ/RJ45_BEL_SS74301-00x_Vertical","Connector_RJ/RJ45_Bel_SI-60062-F","Connector_RJ/RJ45_Bel_V895-1001-AW_Vertical","Connector_RJ/RJ45_Cetus_J1B1211CCD_Horizontal","Connector_RJ/RJ45_Connfly_DS1128-09-S8xx-S_Horizontal","Connector_RJ/RJ45_HALO_HFJ11-x2450E-LxxRL_Horizontal","Connector_RJ/RJ45_HALO_HFJ11-x2450ERL_Horizontal","Connector_RJ/RJ45_HALO_HFJ11-x2450HRL_Horizontal","Connector_RJ/RJ45_Hanrun_HR911105A_Horizontal","Connector_RJ/RJ45_Kycon_G7LX-A88S7-BP-xx_Horizontal","Connector_RJ/RJ45_Molex_0855135013_Vertical","Connector_RJ/RJ45_Molex_9346520x_Horizontal","Connector_RJ/RJ45_Ninigi_GE","Connector_RJ/RJ45_OST_PJ012-8P8CX_Vertical","Connector_RJ/RJ45_Plug_Metz_AJP92A8813","Connector_RJ/RJ45_Pulse_JK00177NL_Horizontal","Connector_RJ/RJ45_Pulse_JK0654219NL_Horizontal","Connector_RJ/RJ45_Pulse_JXD6-0001NL_Horizontal","Connector_RJ/RJ45_RCH_RC01937","Connector_RJ/RJ45_UDE_RB1-125B8G1A","Connector_RJ/RJ45_Wuerth_74980111211_Horizontal","Connector_RJ/RJ45_Wuerth_7499010001A_Horizontal","Connector_RJ/RJ45_Wuerth_7499010121A_Horizontal","Connector_RJ/RJ45_Wuerth_7499010211A_Horizontal","Connector_RJ/RJ45_Wuerth_7499111446_Horizontal","Connector_RJ/RJ45_Wuerth_7499151120_Horizontal","Connector_RJ/RJ9_Evercom_5301-440xxx_Horizontal","Connector_SATA_SAS/SAS-mini_TEConnectivity_1888174_Vertical","Connector_SATA_SAS/SATA_Amphenol_10029364-001LF_Horizontal","Connector_Samtec/Samtec_FMC_ASP-134486-01_10x40_P1.27mm_Vertical","Connector_Samtec/Samtec_FMC_ASP-134602-01_10x40_P1.27mm_Vertical","Connector_Samtec/Samtec_FMC_ASP-134604-01_4x40_Vertical","Connector_Samtec/Samtec_LSHM-105-xx.x-x-DV-N_2x05_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-105-xx.x-x-DV-S_2x05-1SH_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-110-xx.x-x-DV-N_2x10_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-110-xx.x-x-DV-S_2x10-1SH_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-120-xx.x-x-DV-N_2x20_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-120-xx.x-x-DV-S_2x20-1SH_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-130-xx.x-x-DV-N_2x30_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-130-xx.x-x-DV-S_2x30-1SH_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-140-xx.x-x-DV-N_2x40_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-140-xx.x-x-DV-S_2x40-1SH_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-150-xx.x-x-DV-N_2x50_P0.50mm_Vertical","Connector_Samtec/Samtec_LSHM-150-xx.x-x-DV-S_2x50-1SH_P0.50mm_Vertical","Connector_Samtec/Samtec_SS4-10-3.00-x-D-K-xR_2x10_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-10-3.50-x-D-K-xR_2x10_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-15-3.00-x-D-K-xR_2x15_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-15-3.50-x-D-K-xR_2x15_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-20-3.00-x-D-K-xR_2x20_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-20-3.50-x-D-K-xR_2x20_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-30-3.00-x-D-K-xR_2x30_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-30-3.50-x-D-K-xR_2x30_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-40-3.00-x-D-K-xR_2x40_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-40-3.50-x-D-K-xR_2x40_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-50-3.00-x-D-K-xR_2x50_P0.4mm_Socket","Connector_Samtec/Samtec_SS4-50-3.50-x-D-K-xR_2x50_P0.4mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-005-XX.X-DV-L_2x05_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-005-XX.X-DV_2x05_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-010-XX.X-DV-L_2x10_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-010-XX.X-DV_2x10_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-011-XX.X-DV-L_2x11_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-011-XX.X-DV_2x11_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-013-XX.X-DV-L_2x13_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-013-XX.X-DV_2x13_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-020-XX.X-DV-L_2x20_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-020-XX.X-DV_2x20_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-025-XX.X-DV-L_2x25_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-025-XX.X-DV_2x25_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-030-XX.X-DV-L_2x30_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-030-XX.X-DV_2x30_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-035-XX.X-DV-L_2x35_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-035-XX.X-DV_2x35_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-040-XX.X-DV-L_2x40_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-040-XX.X-DV_2x40_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-049-XX.X-DV-L_2x49_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-049-XX.X-DV_2x49_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-050-XX.X-DV-L_2x50_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-050-XX.X-DV_2x50_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-060-XX.X-DV-L_2x60_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-060-XX.X-DV_2x60_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-070-XX.X-DV-L_2x70_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-070-XX.X-DV_2x70_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-075-XX.X-DV-L_2x75_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-075-XX.X-DV_2x75_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERF8-100-XX.X-DV-L_2x100_P0.8mm_Socket_Latch","Connector_Samtec_EdgeRate/Samtec_ERF8-100-XX.X-DV_2x100_P0.8mm_Socket","Connector_Samtec_EdgeRate/Samtec_ERM8-005-XX.X-DV-L_2x05_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-005-XX.X-DV_2x05_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-010-XX.X-DV-L_2x10_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-010-XX.X-DV_2x10_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-011-XX.X-DV-L_2x11_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-011-XX.X-DV_2x11_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-013-XX.X-DV-L_2x13_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-013-XX.X-DV_2x13_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-020-XX.X-DV-L_2x20_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-020-XX.X-DV_2x20_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-025-XX.X-DV-L_2x25_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-025-XX.X-DV_2x25_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-030-XX.X-DV-L_2x30_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-030-XX.X-DV_2x30_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-035-XX.X-DV-L_2x35_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-035-XX.X-DV_2x35_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-040-XX.X-DV-L_2x40_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-040-XX.X-DV_2x40_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-049-XX.X-DV-L_2x49_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-049-XX.X-DV_2x49_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-050-XX.X-DV-L_2x50_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-050-XX.X-DV_2x50_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-060-XX.X-DV-L_2x60_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-060-XX.X-DV_2x60_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-070-XX.X-DV-L_2x70_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-070-XX.X-DV_2x70_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-075-XX.X-DV-L_2x75_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-075-XX.X-DV_2x75_P0.8mm_Terminal","Connector_Samtec_EdgeRate/Samtec_ERM8-100-XX.X-DV-L_2x100_P0.8mm_Terminal_Latch","Connector_Samtec_EdgeRate/Samtec_ERM8-100-XX.X-DV_2x100_P0.8mm_Terminal","Connector_Samtec_FSI/Samtec_FSI-105-03-X-D-AD_2x05_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-105-03-X-D_2x05_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D-AD_2x05_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D-AD_2x05_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D_2x05_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-105-XX-X-D_2x05_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-110-03-X-D-AD_2x10_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-110-03-X-D-M-AD_2x10_P1.0mm_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-110-03-X-D-M_2x10_P1.0mm_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-110-03-X-D_2x10_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-AD_2x10_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-AD_2x10_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M-AD_2x10_P1.0mm_Mate_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M-AD_2x10_P1.0mm_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M_2x10_P1.0mm_Mate_Threaded","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D-M_2x10_P1.0mm_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D_2x10_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-110-XX-X-D_2x10_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-115-03-X-D-AD_2x15_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-115-03-X-D_2x15_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D-AD_2x15_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D-AD_2x15_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D_2x15_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-115-XX-X-D_2x15_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-120-03-X-D-AD_2x20_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-120-03-X-D-M-AD_2x20_P1.0mm_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-120-03-X-D-M_2x20_P1.0mm_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-120-03-X-D_2x20_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-AD_2x20_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-AD_2x20_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M-AD_2x20_P1.0mm_Mate_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M-AD_2x20_P1.0mm_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M_2x20_P1.0mm_Mate_Threaded","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D-M_2x20_P1.0mm_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D_2x20_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-120-XX-X-D_2x20_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-125-03-X-D-AD_2x25_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-125-03-X-D_2x25_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D-AD_2x25_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D-AD_2x25_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D_2x25_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-125-XX-X-D_2x25_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-130-03-X-D-AD_2x30_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-130-03-X-D-M-AD_2x30_P1.0mm_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-130-03-X-D-M_2x30_P1.0mm_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-130-03-X-D_2x30_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-AD_2x30_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-AD_2x30_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M-AD_2x30_P1.0mm_Mate_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M-AD_2x30_P1.0mm_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M_2x30_P1.0mm_Mate_Threaded","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D-M_2x30_P1.0mm_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D_2x30_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-130-XX-X-D_2x30_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-135-03-X-D-AD_2x35_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-135-03-X-D_2x35_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D-AD_2x35_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D-AD_2x35_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D_2x35_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-135-XX-X-D_2x35_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-140-03-X-D-AD_2x40_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-140-03-X-D-M-AD_2x40_P1.0mm_Pol20_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-140-03-X-D-M_2x40_P1.0mm_Pol20_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-140-03-X-D_2x40_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-AD_2x40_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-AD_2x40_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M-AD_2x40_P1.0mm_Pol20_Mate_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M-AD_2x40_P1.0mm_Pol20_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M_2x40_P1.0mm_Pol20_Mate_Threaded","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D-M_2x40_P1.0mm_Pol20_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D_2x40_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-140-XX-X-D_2x40_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-145-03-X-D-AD_2x45_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-145-03-X-D_2x45_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D-AD_2x45_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D-AD_2x45_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D_2x45_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-145-XX-X-D_2x45_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-150-03-X-D-AD_2x50_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-150-03-X-D-M-AD_2x50_P1.0mm_Pol25_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-150-03-X-D-M_2x50_P1.0mm_Pol25_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-150-03-X-D_2x50_P1.0mm_Socket","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-AD_2x50_P1.0mm_Mate_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-AD_2x50_P1.0mm_Socket_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M-AD_2x50_P1.0mm_Pol25_Mate_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M-AD_2x50_P1.0mm_Pol25_Socket_Threaded_AlignmentPin","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M_2x50_P1.0mm_Pol25_Mate_Threaded","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D-M_2x50_P1.0mm_Pol25_Socket_Threaded","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D_2x50_P1.0mm_Mate","Connector_Samtec_FSI/Samtec_FSI-150-XX-X-D_2x50_P1.0mm_Socket","Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV-BE-LC_2x02_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV-BE_2x02_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV-LC_2x02_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-102-02-xxx-DV_2x02_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV-BE-LC_2x03_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV-BE_2x03_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV-LC_2x03_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-103-02-xxx-DV_2x03_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-A_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-BE-A_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-BE-LC_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-BE_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV-LC_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-104-02-xxx-DV_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-A_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-BE-A_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-BE-LC_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-BE_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV-LC_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-105-02-xxx-DV_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-A_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-BE-A_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-BE-LC_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-BE_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV-LC_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-106-02-xxx-DV_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-A_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-BE-A_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-BE-LC_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-BE_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV-LC_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-107-02-xxx-DV_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-A_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-BE-A_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-BE-LC_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-BE_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV-LC_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-108-02-xxx-DV_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-A_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-BE-A_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-BE-LC_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-BE_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV-LC_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-109-02-xxx-DV_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-A_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-BE-A_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-BE-LC_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-BE_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV-LC_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-110-02-xxx-DV_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-A_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-BE-A_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-BE-LC_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-BE_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV-LC_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-111-02-xxx-DV_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-A_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-BE-A_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-BE-LC_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-BE_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV-LC_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-112-02-xxx-DV_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-A_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-BE-A_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-BE-LC_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-BE_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV-LC_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-113-02-xxx-DV_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-A_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-BE-A_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-BE-LC_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-BE_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV-LC_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-114-02-xxx-DV_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-A_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-BE-A_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-BE-LC_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-BE_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV-LC_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-115-02-xxx-DV_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-A_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-BE-A_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-BE-LC_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-BE_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV-LC_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-116-02-xxx-DV_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-A_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-BE-A_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-BE-LC_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-BE_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV-LC_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-117-02-xxx-DV_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-A_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-BE-A_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-BE-LC_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-BE_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV-LC_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-118-02-xxx-DV_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-A_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-BE-A_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-BE-LC_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-BE_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV-LC_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-119-02-xxx-DV_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-A_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-BE-A_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-BE-LC_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-BE_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV-LC_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-120-02-xxx-DV_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-A_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-BE-A_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-BE-LC_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-BE_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV-LC_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-121-02-xxx-DV_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-A_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-BE-A_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-BE-LC_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-BE_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV-LC_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-122-02-xxx-DV_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-A_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-BE-A_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-BE-LC_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-BE_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV-LC_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-123-02-xxx-DV_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-A_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-BE-A_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-BE-LC_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-BE_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV-LC_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-124-02-xxx-DV_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-A_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-BE-A_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-BE-LC_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-BE_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV-LC_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-125-02-xxx-DV_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-A_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-BE-A_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-BE-LC_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-BE_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV-LC_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-126-02-xxx-DV_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-A_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-BE-A_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-BE-LC_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-BE_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV-LC_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-127-02-xxx-DV_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-A_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-BE-A_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-BE-LC_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-BE_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV-LC_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-128-02-xxx-DV_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-A_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-BE-A_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-BE-LC_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-BE_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV-LC_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-129-02-xxx-DV_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-A_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-BE-A_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-BE-LC_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-BE_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV-LC_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-130-02-xxx-DV_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-A_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-BE-A_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-BE-LC_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-BE_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV-LC_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-131-02-xxx-DV_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-A_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-BE-A_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-BE-LC_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-BE_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV-LC_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-132-02-xxx-DV_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-A_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-BE-A_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-BE-LC_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-BE_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV-LC_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-133-02-xxx-DV_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-A_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-BE-A_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-BE-LC_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-BE_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV-LC_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-134-02-xxx-DV_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-A_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-BE-A_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-BE-LC_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-BE_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV-LC_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-135-02-xxx-DV_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-A_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-BE-A_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-BE-LC_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-BE_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV-LC_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-136-02-xxx-DV_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-A_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-BE-A_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-BE-LC_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-BE_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV-LC_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-137-02-xxx-DV_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-A_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-BE-A_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-BE-LC_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-BE_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV-LC_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-138-02-xxx-DV_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-A_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-BE-A_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-BE-LC_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-BE_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV-LC_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-139-02-xxx-DV_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-A_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-BE-A_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-BE-LC_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-BE_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV-LC_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-140-02-xxx-DV_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-A_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-BE-A_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-BE-LC_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-BE_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV-LC_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-141-02-xxx-DV_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-A_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-BE-A_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-BE-LC_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-BE_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV-LC_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-142-02-xxx-DV_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-A_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-BE-A_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-BE-LC_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-BE_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV-LC_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-143-02-xxx-DV_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-A_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-BE-A_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-BE-LC_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-BE_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV-LC_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-144-02-xxx-DV_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-A_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-BE-A_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-BE-LC_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-BE_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV-LC_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-145-02-xxx-DV_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-A_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-BE-A_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-BE-LC_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-BE_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV-LC_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-146-02-xxx-DV_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-A_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-BE-A_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-BE-LC_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-BE_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV-LC_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-147-02-xxx-DV_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-A_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-BE-A_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-BE-LC_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-BE_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV-LC_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-148-02-xxx-DV_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-A_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-BE-A_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-BE-LC_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-BE_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV-LC_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-149-02-xxx-DV_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-A_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-BE-A_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-BE-LC_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-BE_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV-LC_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_SMD/Samtec_HLE-150-02-xxx-DV_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-104-02-xx-DV-PE-LC_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-104-02-xx-DV-PE_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-104-02-xx-DV-TE_2x04_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-105-02-xx-DV-PE-LC_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-105-02-xx-DV-PE_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-105-02-xx-DV-TE_2x05_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-106-02-xx-DV-PE-LC_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-106-02-xx-DV-PE_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-106-02-xx-DV-TE_2x06_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-107-02-xx-DV-PE-LC_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-107-02-xx-DV-PE_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-107-02-xx-DV-TE_2x07_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-108-02-xx-DV-PE-LC_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-108-02-xx-DV-PE_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-108-02-xx-DV-TE_2x08_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-109-02-xx-DV-PE-LC_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-109-02-xx-DV-PE_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-109-02-xx-DV-TE_2x09_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-110-02-xx-DV-PE-LC_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-110-02-xx-DV-PE_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-110-02-xx-DV-TE_2x10_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-111-02-xx-DV-PE-LC_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-111-02-xx-DV-PE_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-111-02-xx-DV-TE_2x11_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-112-02-xx-DV-PE-LC_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-112-02-xx-DV-PE_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-112-02-xx-DV-TE_2x12_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-113-02-xx-DV-PE-LC_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-113-02-xx-DV-PE_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-113-02-xx-DV-TE_2x13_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-114-02-xx-DV-PE-LC_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-114-02-xx-DV-PE_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-114-02-xx-DV-TE_2x14_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-115-02-xx-DV-PE-LC_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-115-02-xx-DV-PE_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-115-02-xx-DV-TE_2x15_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-116-02-xx-DV-PE-LC_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-116-02-xx-DV-PE_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-116-02-xx-DV-TE_2x16_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-117-02-xx-DV-PE-LC_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-117-02-xx-DV-PE_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-117-02-xx-DV-TE_2x17_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-118-02-xx-DV-PE-LC_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-118-02-xx-DV-PE_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-118-02-xx-DV-TE_2x18_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-119-02-xx-DV-PE-LC_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-119-02-xx-DV-PE_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-119-02-xx-DV-TE_2x19_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-120-02-xx-DV-PE-LC_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-120-02-xx-DV-PE_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-120-02-xx-DV-TE_2x20_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-121-02-xx-DV-PE-LC_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-121-02-xx-DV-PE_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-121-02-xx-DV-TE_2x21_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-122-02-xx-DV-PE-LC_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-122-02-xx-DV-PE_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-122-02-xx-DV-TE_2x22_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-123-02-xx-DV-PE-LC_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-123-02-xx-DV-PE_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-123-02-xx-DV-TE_2x23_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-124-02-xx-DV-PE-LC_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-124-02-xx-DV-PE_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-124-02-xx-DV-TE_2x24_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-125-02-xx-DV-PE-LC_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-125-02-xx-DV-PE_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-125-02-xx-DV-TE_2x25_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-126-02-xx-DV-PE-LC_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-126-02-xx-DV-PE_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-126-02-xx-DV-TE_2x26_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-127-02-xx-DV-PE-LC_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-127-02-xx-DV-PE_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-127-02-xx-DV-TE_2x27_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-128-02-xx-DV-PE-LC_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-128-02-xx-DV-PE_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-128-02-xx-DV-TE_2x28_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-129-02-xx-DV-PE-LC_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-129-02-xx-DV-PE_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-129-02-xx-DV-TE_2x29_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-130-02-xx-DV-PE-LC_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-130-02-xx-DV-PE_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-130-02-xx-DV-TE_2x30_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-131-02-xx-DV-PE-LC_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-131-02-xx-DV-PE_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-131-02-xx-DV-TE_2x31_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-132-02-xx-DV-PE-LC_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-132-02-xx-DV-PE_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-132-02-xx-DV-TE_2x32_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-133-02-xx-DV-PE-LC_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-133-02-xx-DV-PE_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-133-02-xx-DV-TE_2x33_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-134-02-xx-DV-PE-LC_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-134-02-xx-DV-PE_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-134-02-xx-DV-TE_2x34_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-135-02-xx-DV-PE-LC_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-135-02-xx-DV-PE_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-135-02-xx-DV-TE_2x35_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-136-02-xx-DV-PE-LC_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-136-02-xx-DV-PE_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-136-02-xx-DV-TE_2x36_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-137-02-xx-DV-PE-LC_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-137-02-xx-DV-PE_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-137-02-xx-DV-TE_2x37_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-138-02-xx-DV-PE-LC_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-138-02-xx-DV-PE_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-138-02-xx-DV-TE_2x38_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-139-02-xx-DV-PE-LC_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-139-02-xx-DV-PE_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-139-02-xx-DV-TE_2x39_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-140-02-xx-DV-PE-LC_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-140-02-xx-DV-PE_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-140-02-xx-DV-TE_2x40_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-141-02-xx-DV-PE-LC_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-141-02-xx-DV-PE_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-141-02-xx-DV-TE_2x41_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-142-02-xx-DV-PE-LC_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-142-02-xx-DV-PE_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-142-02-xx-DV-TE_2x42_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-143-02-xx-DV-PE-LC_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-143-02-xx-DV-PE_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-143-02-xx-DV-TE_2x43_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-144-02-xx-DV-PE-LC_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-144-02-xx-DV-PE_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-144-02-xx-DV-TE_2x44_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-145-02-xx-DV-PE-LC_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-145-02-xx-DV-PE_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-145-02-xx-DV-TE_2x45_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-146-02-xx-DV-PE-LC_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-146-02-xx-DV-PE_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-146-02-xx-DV-TE_2x46_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-147-02-xx-DV-PE-LC_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-147-02-xx-DV-PE_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-147-02-xx-DV-TE_2x47_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-148-02-xx-DV-PE-LC_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-148-02-xx-DV-PE_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-148-02-xx-DV-TE_2x48_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-149-02-xx-DV-PE-LC_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-149-02-xx-DV-PE_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-149-02-xx-DV-TE_2x49_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-150-02-xx-DV-PE-LC_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-150-02-xx-DV-PE_2x50_P2.54mm_Horizontal","Connector_Samtec_HLE_THT/Samtec_HLE-150-02-xx-DV-TE_2x50_P2.54mm_Horizontal","Connector_Samtec_HPM_THT/Samtec_HPM-01-01-x-S_Straight_1x01_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-01-05-x-S_Straight_1x01_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-02-01-x-S_Straight_1x02_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-02-05-x-S_Straight_1x02_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-03-01-x-S_Straight_1x03_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-03-05-x-S_Straight_1x03_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-04-01-x-S_Straight_1x04_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-04-05-x-S_Straight_1x04_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-05-01-x-S_Straight_1x05_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-05-05-x-S_Straight_1x05_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-06-01-x-S_Straight_1x06_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-06-05-x-S_Straight_1x06_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-07-01-x-S_Straight_1x07_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-07-05-x-S_Straight_1x07_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-08-01-x-S_Straight_1x08_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-08-05-x-S_Straight_1x08_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-09-01-x-S_Straight_1x09_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-09-05-x-S_Straight_1x09_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-10-01-x-S_Straight_1x10_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-10-05-x-S_Straight_1x10_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-11-01-x-S_Straight_1x11_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-11-05-x-S_Straight_1x11_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-12-01-x-S_Straight_1x12_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-12-05-x-S_Straight_1x12_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-13-01-x-S_Straight_1x13_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-13-05-x-S_Straight_1x13_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-14-01-x-S_Straight_1x14_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-14-05-x-S_Straight_1x14_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-15-01-x-S_Straight_1x15_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-15-05-x-S_Straight_1x15_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-16-01-x-S_Straight_1x16_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-16-05-x-S_Straight_1x16_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-17-01-x-S_Straight_1x17_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-17-05-x-S_Straight_1x17_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-18-01-x-S_Straight_1x18_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-18-05-x-S_Straight_1x18_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-19-01-x-S_Straight_1x19_Pitch5.08mm","Connector_Samtec_HPM_THT/Samtec_HPM-19-05-x-S_Straight_1x19_Pitch5.08mm","Connector_Samtec_HSEC8/Samtec_HSEC8-109-01-X-DV-A-BL_2x09_P0.8mm_Pol04_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-109-01-X-DV-A-WT_2x09_P0.8mm_Pol04_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-109-X-X-DV-BL_2x09_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-109-X-X-DV_2x09_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-109-X-X-DV_2x09_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV-A-BL_2x10_P0.8mm_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV-A-WT_2x10_P0.8mm_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV-A_2x10_P0.8mm_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-110-01-X-DV_2x10_P0.8mm_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-110-03-X-DV-A-WT_2x10_P0.8mm_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-110-03-X-DV-A_2x10_P0.8mm_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-110-03-X-DV_2x10_P0.8mm_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-110-X-X-DV-BL_2x10_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-110-X-X-DV_2x10_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-110-X-X-DV_2x10_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV-A-BL_2x100_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV-A-WT_2x100_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV-A_2x100_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-01-X-DV_2x100_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-03-X-DV-A-WT_2x100_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-03-X-DV-A_2x100_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-03-X-DV_2x100_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-X-X-DV-BL_2x100_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-X-X-DV_2x100_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-1100-X-X-DV_2x100_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV-A-BL_2x13_P0.8mm_Pol06_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV-A-WT_2x13_P0.8mm_Pol06_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV-A_2x13_P0.8mm_Pol06_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-113-01-X-DV_2x13_P0.8mm_Pol06_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-113-X-X-DV-BL_2x13_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-113-X-X-DV_2x13_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-113-X-X-DV_2x13_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV-A-BL_2x20_P0.8mm_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV-A-WT_2x20_P0.8mm_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV-A_2x20_P0.8mm_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-120-01-X-DV_2x20_P0.8mm_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-120-03-X-DV-A-WT_2x20_P0.8mm_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-120-03-X-DV-A_2x20_P0.8mm_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-120-03-X-DV_2x20_P0.8mm_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-120-X-X-DV-BL_2x20_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-120-X-X-DV_2x20_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-120-X-X-DV_2x20_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV-A-BL_2x25_P0.8mm_Pol06_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV-A-WT_2x25_P0.8mm_Pol06_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV-A_2x25_P0.8mm_Pol06_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-125-01-X-DV_2x25_P0.8mm_Pol06_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-125-X-X-DV-BL_2x25_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-125-X-X-DV_2x25_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-125-X-X-DV_2x25_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV-A-BL_2x30_P0.8mm_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV-A-WT_2x30_P0.8mm_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV-A_2x30_P0.8mm_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-130-01-X-DV_2x30_P0.8mm_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-130-03-X-DV-A-WT_2x30_P0.8mm_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-130-03-X-DV-A_2x30_P0.8mm_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-130-03-X-DV_2x30_P0.8mm_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-130-X-X-DV-BL_2x30_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-130-X-X-DV_2x30_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-130-X-X-DV_2x30_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV-A-BL_2x37_P0.8mm_Pol21_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV-A-WT_2x37_P0.8mm_Pol21_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV-A_2x37_P0.8mm_Pol21_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-137-01-X-DV_2x37_P0.8mm_Pol21_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-137-X-X-DV-BL_2x37_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-137-X-X-DV_2x37_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-137-X-X-DV_2x37_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV-A-BL_2x40_P0.8mm_Pol22_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV-A-WT_2x40_P0.8mm_Pol22_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV-A_2x40_P0.8mm_Pol22_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-140-01-X-DV_2x40_P0.8mm_Pol22_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-140-03-X-DV-A-WT_2x40_P0.8mm_Pol22_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-140-03-X-DV-A_2x40_P0.8mm_Pol22_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-140-03-X-DV_2x40_P0.8mm_Pol22_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-140-X-X-DV-BL_2x40_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-140-X-X-DV_2x40_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-140-X-X-DV_2x40_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV-A-BL_2x49_P0.8mm_Pol27_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV-A-WT_2x49_P0.8mm_Pol27_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV-A_2x49_P0.8mm_Pol27_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-149-01-X-DV_2x49_P0.8mm_Pol27_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-149-X-X-DV-BL_2x49_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-149-X-X-DV_2x49_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-149-X-X-DV_2x49_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV-A-BL_2x50_P0.8mm_Pol27_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV-A-WT_2x50_P0.8mm_Pol27_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV-A_2x50_P0.8mm_Pol27_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-150-01-X-DV_2x50_P0.8mm_Pol27_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-150-03-X-DV-A-WT_2x50_P0.8mm_Pol27_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-150-03-X-DV-A_2x50_P0.8mm_Pol27_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-150-03-X-DV_2x50_P0.8mm_Pol27_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-150-X-X-DV-BL_2x50_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-150-X-X-DV_2x50_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-150-X-X-DV_2x50_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV-A-BL_2x60_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV-A-WT_2x60_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV-A_2x60_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-160-01-X-DV_2x60_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-160-03-X-DV-A-WT_2x60_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-160-03-X-DV-A_2x60_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-160-03-X-DV_2x60_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-160-X-X-DV-BL_2x60_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-160-X-X-DV_2x60_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-160-X-X-DV_2x60_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV-A-BL_2x70_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV-A-WT_2x70_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV-A_2x70_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-170-01-X-DV_2x70_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-170-03-X-DV-A-WT_2x70_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-170-03-X-DV-A_2x70_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-170-03-X-DV_2x70_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-170-X-X-DV-BL_2x70_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-170-X-X-DV_2x70_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-170-X-X-DV_2x70_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV-A-BL_2x80_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV-A-WT_2x80_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV-A_2x80_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-180-01-X-DV_2x80_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-180-03-X-DV-A-WT_2x80_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-180-03-X-DV-A_2x80_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-180-03-X-DV_2x80_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-180-X-X-DV-BL_2x80_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-180-X-X-DV_2x80_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-180-X-X-DV_2x80_P0.8mm_Wing_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV-A-BL_2x90_P0.8mm_Pol32_Socket_WeldTabs_BoardLocks","Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV-A-WT_2x90_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV-A_2x90_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-190-01-X-DV_2x90_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-190-03-X-DV-A-WT_2x90_P0.8mm_Pol32_Socket_WeldTabs","Connector_Samtec_HSEC8/Samtec_HSEC8-190-03-X-DV-A_2x90_P0.8mm_Pol32_Socket_AlignmentPins","Connector_Samtec_HSEC8/Samtec_HSEC8-190-03-X-DV_2x90_P0.8mm_Pol32_Socket","Connector_Samtec_HSEC8/Samtec_HSEC8-190-X-X-DV-BL_2x90_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-190-X-X-DV_2x90_P0.8mm_Edge","Connector_Samtec_HSEC8/Samtec_HSEC8-190-X-X-DV_2x90_P0.8mm_Wing_Edge","Connector_Samtec_LTMM/Samtec_LTMM-104-02-X-D-SM-LC_2x04_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-104-02-X-D-SM_2x04_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-105-02-X-D-SM-LC_2x05_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-105-02-X-D-SM_2x05_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-106-02-X-D-SM-LC_2x06_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-106-02-X-D-SM_2x06_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-107-02-X-D-SM-LC_2x07_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-107-02-X-D-SM_2x07_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-108-02-X-D-SM-LC_2x08_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-108-02-X-D-SM_2x08_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-110-02-X-D-SM-LC_2x10_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-110-02-X-D-SM_2x10_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-112-02-X-D-SM-LC_2x12_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-112-02-X-D-SM_2x12_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-113-02-X-D-SM-LC_2x13_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-113-02-X-D-SM_2x13_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-115-02-X-D-SM-LC_2x15_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-115-02-X-D-SM_2x15_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-117-02-X-D-SM-LC_2x17_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-117-02-X-D-SM_2x17_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-120-02-X-D-SM-LC_2x20_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-120-02-X-D-SM_2x20_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-122-02-X-D-SM-LC_2x22_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-122-02-X-D-SM_2x22_P2.0mm_Header_Vertical","Connector_Samtec_LTMM/Samtec_LTMM-125-02-X-D-SM-LC_2x25_P2.0mm_Header_Vertical_LockingClip","Connector_Samtec_LTMM/Samtec_LTMM-125-02-X-D-SM_2x25_P2.0mm_Header_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-02-X-S-RA_1x02-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-02-X-S-V_1x02-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-02-X-SH-L_1x02-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-02-X-SV-L_1x02-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-03-X-S-RA_1x03-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-03-X-S-V_1x03-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-03-X-SH-L_1x03-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-03-X-SV-L_1x03-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-04-X-S-RA_1x04-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-04-X-S-V_1x04-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-04-X-SH-L_1x04-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-04-X-SV-L_1x04-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-05-X-S-RA_1x05-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-05-X-S-V_1x05-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-05-X-SH-L_1x05-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-05-X-SV-L_1x05-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-06-X-S-RA_1x06-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-06-X-S-V_1x06-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-06-X-SH-L_1x06-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-06-X-SV-L_1x06-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-07-X-S-RA_1x07-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-07-X-S-V_1x07-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-07-X-SH-L_1x07-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-07-X-SV-L_1x07-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-08-X-S-RA_1x08-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-08-X-S-V_1x08-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-08-X-SH-L_1x08-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-08-X-SV-L_1x08-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-09-X-S-RA_1x09-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-09-X-S-V_1x09-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-09-X-SH-L_1x09-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-09-X-SV-L_1x09-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-10-X-S-RA_1x10-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-10-X-S-V_1x10-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-10-X-SH-L_1x10-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-10-X-SV-L_1x10-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-11-X-S-RA_1x11-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-11-X-S-V_1x11-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-11-X-SH-L_1x11-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-11-X-SV-L_1x11-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-12-X-S-RA_1x12-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-12-X-S-V_1x12-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-12-X-SH-L_1x12-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-12-X-SV-L_1x12-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-13-X-S-RA_1x13-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-13-X-S-V_1x13-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-13-X-SH-L_1x13-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-13-X-SV-L_1x13-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-14-X-S-RA_1x14-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-14-X-S-V_1x14-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-14-X-SH-L_1x14-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-14-X-SV-L_1x14-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-15-X-S-RA_1x15-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-15-X-S-V_1x15-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-15-X-SH-L_1x15-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-15-X-SV-L_1x15-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-16-X-S-RA_1x16-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-16-X-S-V_1x16-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-16-X-SH-L_1x16-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-16-X-SV-L_1x16-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-17-X-S-RA_1x17-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-17-X-S-V_1x17-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-17-X-SH-L_1x17-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-17-X-SV-L_1x17-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-18-X-S-RA_1x18-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-18-X-S-V_1x18-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-18-X-SH-L_1x18-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-18-X-SV-L_1x18-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-19-X-S-RA_1x19-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-19-X-S-V_1x19-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-19-X-SH-L_1x19-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-19-X-SV-L_1x19-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroMate/Samtec_T1M-20-X-S-RA_1x20-1MP_P1.0mm_Terminal_Horizontal","Connector_Samtec_MicroMate/Samtec_T1M-20-X-S-V_1x20-1MP_P1.0mm_Terminal_Vertical","Connector_Samtec_MicroMate/Samtec_T1M-20-X-SH-L_1x20-1MP_P1.0mm_Terminal_Horizontal_Latch","Connector_Samtec_MicroMate/Samtec_T1M-20-X-SV-L_1x20-1MP_P1.0mm_Terminal_Vertical_Latch","Connector_Samtec_MicroPower/Samtec_UMPS-02-XX.X-X-V-S-W_1x02-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-02-XX.X-X-V-S_1x02_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-03-XX.X-X-V-S-W_1x03-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-03-XX.X-X-V-S_1x03_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-04-XX.X-X-V-S-W_1x04-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-04-XX.X-X-V-S_1x04_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-05-XX.X-X-V-S-W_1x05-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-05-XX.X-X-V-S_1x05_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-06-XX.X-X-V-S-W_1x06-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-06-XX.X-X-V-S_1x06_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-07-XX.X-X-V-S-W_1x07-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-07-XX.X-X-V-S_1x07_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-08-XX.X-X-V-S-W_1x08-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-08-XX.X-X-V-S_1x08_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-09-XX.X-X-V-S-W_1x09-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-09-XX.X-X-V-S_1x09_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPS-10-XX.X-X-V-S-W_1x10-1MP_P2.0mm_Socket_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPS-10-XX.X-X-V-S_1x10_P2.0mm_Socket","Connector_Samtec_MicroPower/Samtec_UMPT-02-XX.X-X-V-S-W_1x02-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-02-XX.X-X-V-S_1x02_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-03-XX.X-X-V-S-W_1x03-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-03-XX.X-X-V-S_1x03_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-04-XX.X-X-V-S-W_1x04-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-04-XX.X-X-V-S_1x04_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-05-XX.X-X-V-S-W_1x05-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-05-XX.X-X-V-S_1x05_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-06-XX.X-X-V-S-W_1x06-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-06-XX.X-X-V-S_1x06_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-07-XX.X-X-V-S-W_1x07-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-07-XX.X-X-V-S_1x07_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-08-XX.X-X-V-S-W_1x08-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-08-XX.X-X-V-S_1x08_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-09-XX.X-X-V-S-W_1x09-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-09-XX.X-X-V-S_1x09_P2.0mm_Terminal","Connector_Samtec_MicroPower/Samtec_UMPT-10-XX.X-X-V-S-W_1x10-1MP_P2.0mm_Terminal_WeldTab","Connector_Samtec_MicroPower/Samtec_UMPT-10-XX.X-X-V-S_1x10_P2.0mm_Terminal","Connector_Stocko/Stocko_MKS_1651-6-0-202_1x2_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1652-6-0-202_1x2_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1653-6-0-303_1x3_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1654-6-0-404_1x4_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1655-6-0-505_1x5_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1656-6-0-606_1x6_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1657-6-0-707_1x7_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1658-6-0-808_1x8_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1659-6-0-909_1x9_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1660-6-0-1010_1x10_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1661-6-0-1111_1x11_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1662-6-0-1212_1x12_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1663-6-0-1313_1x13_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1664-6-0-1414_1x14_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1665-6-0-1515_1x15_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1666-6-0-1616_1x16_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1667-6-0-1717_1x17_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1668-6-0-1818_1x18_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1669-6-0-1919_1x19_P2.50mm_Vertical","Connector_Stocko/Stocko_MKS_1670-6-0-2020_1x20_P2.50mm_Vertical","Connector_TE-Connectivity/TE_1-826576-3_1x13_P3.96mm_Vertical","Connector_TE-Connectivity/TE_1-826576-5_1x15_P3.96mm_Vertical","Connector_TE-Connectivity/TE_1-826576-6_1x16_P3.96mm_Vertical","Connector_TE-Connectivity/TE_1-826576-7_1x17_P3.96mm_Vertical","Connector_TE-Connectivity/TE_1-826576-8_1x18_P3.96mm_Vertical","Connector_TE-Connectivity/TE_2-826576-0_1x20_P3.96mm_Vertical","Connector_TE-Connectivity/TE_2834006-1_1x01_P4.0mm_Horizontal","Connector_TE-Connectivity/TE_2834006-2_1x02_P4.0mm_Horizontal","Connector_TE-Connectivity/TE_2834006-3_1x03_P4.0mm_Horizontal","Connector_TE-Connectivity/TE_2834006-4_1x04_P4.0mm_Horizontal","Connector_TE-Connectivity/TE_2834006-5_1x05_P4.0mm_Horizontal","Connector_TE-Connectivity/TE_3-826576-6_1x36_P3.96mm_Vertical","Connector_TE-Connectivity/TE_440054-2_1x02_P2.00mm_Vertical","Connector_TE-Connectivity/TE_440055-2_1x02_P2.00mm_Horizontal","Connector_TE-Connectivity/TE_5767171-1_2x19_P0.635mm_Vertical","Connector_TE-Connectivity/TE_826576-2_1x02_P3.96mm_Vertical","Connector_TE-Connectivity/TE_826576-3_1x03_P3.96mm_Vertical","Connector_TE-Connectivity/TE_826576-5_1x05_P3.96mm_Vertical","Connector_TE-Connectivity/TE_826576-6_1x06_P3.96mm_Vertical","Connector_TE-Connectivity/TE_826576-7_1x07_P3.96mm_Vertical","Connector_TE-Connectivity/TE_826576-8_1x08_P3.96mm_Vertical","Connector_TE-Connectivity/TE_826576-9_1x09_P3.96mm_Vertical","Connector_TE-Connectivity/TE_AMPSEAL_1-776087-x_3Rows_23_P0.4mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770182-x_3x03_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770186-x_3x04_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770190-x_3x05_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770621-x_2x06_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770858-x_2x05_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770866-x_1x02_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770870-x_1x03_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770874-x_2x02_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770875-x_2x03_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770966-x_1x02_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770967-x_1x03_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770968-x_2x02_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770969-x_2x03_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770970-x_2x04_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770971-x_2x05_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770972-x_2x06_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770973-x_2x07_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-770974-x_2x08_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794067-x_2x07_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794068-x_2x08_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794069-x_2x09_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794070-x_2x10_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794071-x_2x11_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794072-x_2x12_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794073-x_2x04_P4.14mm_Vertical","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794105-x_2x09_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794106-x_2x10_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794107-x_2x11_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794108-x_2x12_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_1-794374-x_1x01_P4.14mm_Horizontal","Connector_TE-Connectivity/TE_MATE-N-LOK_350211-1_1x04_P5.08mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-0_2x05_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-2_2x06_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-4_2x07_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-6_2x08_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_1-215079-8_2x09_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_2-215079-0_2x10_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_215079-4_2x02_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_215079-6_2x03_P1.27mm_Vertical","Connector_TE-Connectivity/TE_Micro-MaTch_215079-8_2x04_P1.27mm_Vertical","Connector_TE-Connectivity/TE_T4041037031-000_M8_03_Socket_Straight","Connector_TE-Connectivity/TE_T4041037041-000_M8_04_Socket_Straight","Connector_USB/USB3_A_Molex_48393-001","Connector_USB/USB3_A_Molex_48406-0001_Horizontal_Stacked","Connector_USB/USB3_A_Plug_Wuerth_692112030100_Horizontal","Connector_USB/USB3_A_Receptacle_Wuerth_692122030100","Connector_USB/USB3_Micro-B_Connfly_DS1104-01","Connector_USB/USB_A_CNCTech_1001-011-01101_Horizontal","Connector_USB/USB_A_CUI_UJ2-ADH-TH_Horizontal_Stacked","Connector_USB/USB_A_Connfly_DS1095","Connector_USB/USB_A_Connfly_DS1098_Horizontal","Connector_USB/USB_A_Kycon_KUSBX-AS1N-B_Horizontal","Connector_USB/USB_A_Molex_105057_Vertical","Connector_USB/USB_A_Molex_48037-2200_Horizontal","Connector_USB/USB_A_Molex_67643_Horizontal","Connector_USB/USB_A_Receptacle_GCT_USB1046","Connector_USB/USB_A_Receptacle_XKB_U231-091N-4BLRA00-S","Connector_USB/USB_A_Stewart_SS-52100-001_Horizontal","Connector_USB/USB_A_TE_292303-7_Horizontal","Connector_USB/USB_A_Wuerth_614004134726_Horizontal","Connector_USB/USB_A_Wuerth_61400826021_Horizontal_Stacked","Connector_USB/USB_B_Amphenol_MUSB-D511_Vertical_Rugged","Connector_USB/USB_B_Lumberg_2411_02_Horizontal","Connector_USB/USB_B_OST_USB-B1HSxx_Horizontal","Connector_USB/USB_B_TE_5787834_Vertical","Connector_USB/USB_C_Plug_JAE_DX07P024AJ1","Connector_USB/USB_C_Plug_Molex_105444","Connector_USB/USB_C_Plug_ShenzhenJingTuoJin_918-118A2021Y40002_Vertical","Connector_USB/USB_C_Receptacle_Amphenol_12401548E4-2A","Connector_USB/USB_C_Receptacle_Amphenol_12401548E4-2A_CircularHoles","Connector_USB/USB_C_Receptacle_Amphenol_12401610E4-2A","Connector_USB/USB_C_Receptacle_Amphenol_12401610E4-2A_CircularHoles","Connector_USB/USB_C_Receptacle_Amphenol_12401948E412A","Connector_USB/USB_C_Receptacle_Amphenol_124019772112A","Connector_USB/USB_C_Receptacle_CNCTech_C-ARA1-AK51X","Connector_USB/USB_C_Receptacle_G-Switch_GT-USB-7010ASV","Connector_USB/USB_C_Receptacle_G-Switch_GT-USB-7025","Connector_USB/USB_C_Receptacle_G-Switch_GT-USB-7051x","Connector_USB/USB_C_Receptacle_GCT_USB4085","Connector_USB/USB_C_Receptacle_GCT_USB4105-xx-A_16P_TopMnt_Horizontal","Connector_USB/USB_C_Receptacle_GCT_USB4110","Connector_USB/USB_C_Receptacle_GCT_USB4115-03-C","Connector_USB/USB_C_Receptacle_GCT_USB4125-xx-x-0190_6P_TopMnt_Horizontal","Connector_USB/USB_C_Receptacle_GCT_USB4125-xx-x_6P_TopMnt_Horizontal","Connector_USB/USB_C_Receptacle_GCT_USB4135-GF-A_6P_TopMnt_Horizontal","Connector_USB/USB_C_Receptacle_HCTL_HC-TYPE-C-16P-01A","Connector_USB/USB_C_Receptacle_HRO_TYPE-C-31-M-12","Connector_USB/USB_C_Receptacle_HRO_TYPE-C-31-M-17","Connector_USB/USB_C_Receptacle_JAE_DX07S016JA1R1500","Connector_USB/USB_C_Receptacle_JAE_DX07S024WJ1R350","Connector_USB/USB_C_Receptacle_JAE_DX07S024WJ3R400","Connector_USB/USB_C_Receptacle_Molex_105450-0101","Connector_USB/USB_C_Receptacle_Palconn_UTC16-G","Connector_USB/USB_C_Receptacle_XKB_U262-16XN-4BVC11","Connector_USB/USB_Micro-AB_Molex_47590-0001","Connector_USB/USB_Micro-B_Amphenol_10103594-0001LF_Horizontal","Connector_USB/USB_Micro-B_Amphenol_10104110_Horizontal","Connector_USB/USB_Micro-B_Amphenol_10118193-0001LF_Horizontal","Connector_USB/USB_Micro-B_Amphenol_10118193-0002LF_Horizontal","Connector_USB/USB_Micro-B_Amphenol_10118194-0001LF_Horizontal","Connector_USB/USB_Micro-B_Amphenol_10118194_Horizontal","Connector_USB/USB_Micro-B_GCT_USB3076-30-A","Connector_USB/USB_Micro-B_Molex-105017-0001","Connector_USB/USB_Micro-B_Molex-105133-0001","Connector_USB/USB_Micro-B_Molex-105133-0031","Connector_USB/USB_Micro-B_Molex_47346-0001","Connector_USB/USB_Micro-B_Technik_TWP-4002D-H3","Connector_USB/USB_Micro-B_Wuerth_614105150721_Vertical","Connector_USB/USB_Micro-B_Wuerth_614105150721_Vertical_CircularHoles","Connector_USB/USB_Micro-B_Wuerth_629105150521","Connector_USB/USB_Micro-B_Wuerth_629105150521_CircularHoles","Connector_USB/USB_Micro-B_XKB_U254-051T-4BH83-F1S","Connector_USB/USB_Mini-B_AdamTech_MUSB-B5-S-VT-TSMT-1_SMD_Vertical","Connector_USB/USB_Mini-B_Lumberg_2486_01_Horizontal","Connector_USB/USB_Mini-B_Tensility_54-00023_Vertical","Connector_USB/USB_Mini-B_Tensility_54-00023_Vertical_CircularHoles","Connector_USB/USB_Mini-B_Wuerth_65100516121_Horizontal","Connector_Video/DVI-D_Molex_74320-4004_Horizontal","Connector_Video/DVI-I_Molex_74320-1004_Horizontal","Connector_Video/HDMI_A_Amphenol_10029449-x01xLF_Horizontal","Connector_Video/HDMI_A_Contact_Technology_19APL2_Horizontal","Connector_Video/HDMI_A_Kycon_KDMIX-SL1-NS-WS-B15_VerticalRightAngle","Connector_Video/HDMI_A_Molex_208658-1001_Horizontal","Connector_Video/HDMI_Micro-D_Molex_46765-0xxx","Connector_Video/HDMI_Micro-D_Molex_46765-1xxx","Connector_Video/HDMI_Micro-D_Molex_46765-2xxx","Connector_Wago/Wago_734-132_1x02_P3.50mm_Vertical","Connector_Wago/Wago_734-133_1x03_P3.50mm_Vertical","Connector_Wago/Wago_734-134_1x04_P3.50mm_Vertical","Connector_Wago/Wago_734-135_1x05_P3.50mm_Vertical","Connector_Wago/Wago_734-136_1x06_P3.50mm_Vertical","Connector_Wago/Wago_734-137_1x07_P3.50mm_Vertical","Connector_Wago/Wago_734-138_1x08_P3.50mm_Vertical","Connector_Wago/Wago_734-139_1x09_P3.50mm_Vertical","Connector_Wago/Wago_734-140_1x10_P3.50mm_Vertical","Connector_Wago/Wago_734-141_1x11_P3.50mm_Vertical","Connector_Wago/Wago_734-142_1x12_P3.50mm_Vertical","Connector_Wago/Wago_734-143_1x13_P3.50mm_Vertical","Connector_Wago/Wago_734-144_1x14_P3.50mm_Vertical","Connector_Wago/Wago_734-146_1x16_P3.50mm_Vertical","Connector_Wago/Wago_734-148_1x18_P3.50mm_Vertical","Connector_Wago/Wago_734-150_1x20_P3.50mm_Vertical","Connector_Wago/Wago_734-154_1x24_P3.50mm_Vertical","Connector_Wago/Wago_734-162_1x02_P3.50mm_Horizontal","Connector_Wago/Wago_734-163_1x03_P3.50mm_Horizontal","Connector_Wago/Wago_734-164_1x04_P3.50mm_Horizontal","Connector_Wago/Wago_734-165_1x05_P3.50mm_Horizontal","Connector_Wago/Wago_734-166_1x06_P3.50mm_Horizontal","Connector_Wago/Wago_734-167_1x07_P3.50mm_Horizontal","Connector_Wago/Wago_734-168_1x08_P3.50mm_Horizontal","Connector_Wago/Wago_734-169_1x09_P3.50mm_Horizontal","Connector_Wago/Wago_734-170_1x10_P3.50mm_Horizontal","Connector_Wago/Wago_734-171_1x11_P3.50mm_Horizontal","Connector_Wago/Wago_734-172_1x12_P3.50mm_Horizontal","Connector_Wago/Wago_734-173_1x13_P3.50mm_Horizontal","Connector_Wago/Wago_734-174_1x14_P3.50mm_Horizontal","Connector_Wago/Wago_734-176_1x16_P3.50mm_Horizontal","Connector_Wago/Wago_734-178_1x18_P3.50mm_Horizontal","Connector_Wago/Wago_734-180_1x20_P3.50mm_Horizontal","Connector_Wago/Wago_734-184_1x24_P3.50mm_Horizontal","Connector_Wire/SolderWire-0.127sqmm_1x01_D0.48mm_OD1mm","Connector_Wire/SolderWire-0.127sqmm_1x01_D0.48mm_OD1mm_Relief","Connector_Wire/SolderWire-0.127sqmm_1x01_D0.48mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.127sqmm_1x02_P3.7mm_D0.48mm_OD1mm","Connector_Wire/SolderWire-0.127sqmm_1x02_P3.7mm_D0.48mm_OD1mm_Relief","Connector_Wire/SolderWire-0.127sqmm_1x02_P3.7mm_D0.48mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.127sqmm_1x03_P3.7mm_D0.48mm_OD1mm","Connector_Wire/SolderWire-0.127sqmm_1x03_P3.7mm_D0.48mm_OD1mm_Relief","Connector_Wire/SolderWire-0.127sqmm_1x03_P3.7mm_D0.48mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.127sqmm_1x04_P3.7mm_D0.48mm_OD1mm","Connector_Wire/SolderWire-0.127sqmm_1x04_P3.7mm_D0.48mm_OD1mm_Relief","Connector_Wire/SolderWire-0.127sqmm_1x04_P3.7mm_D0.48mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.127sqmm_1x05_P3.7mm_D0.48mm_OD1mm","Connector_Wire/SolderWire-0.127sqmm_1x05_P3.7mm_D0.48mm_OD1mm_Relief","Connector_Wire/SolderWire-0.127sqmm_1x05_P3.7mm_D0.48mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.127sqmm_1x06_P3.7mm_D0.48mm_OD1mm","Connector_Wire/SolderWire-0.127sqmm_1x06_P3.7mm_D0.48mm_OD1mm_Relief","Connector_Wire/SolderWire-0.127sqmm_1x06_P3.7mm_D0.48mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.15sqmm_1x01_D0.5mm_OD1.5mm","Connector_Wire/SolderWire-0.15sqmm_1x01_D0.5mm_OD1.5mm_Relief","Connector_Wire/SolderWire-0.15sqmm_1x01_D0.5mm_OD1.5mm_Relief2x","Connector_Wire/SolderWire-0.15sqmm_1x02_P4mm_D0.5mm_OD1.5mm","Connector_Wire/SolderWire-0.15sqmm_1x02_P4mm_D0.5mm_OD1.5mm_Relief","Connector_Wire/SolderWire-0.15sqmm_1x02_P4mm_D0.5mm_OD1.5mm_Relief2x","Connector_Wire/SolderWire-0.15sqmm_1x03_P4mm_D0.5mm_OD1.5mm","Connector_Wire/SolderWire-0.15sqmm_1x03_P4mm_D0.5mm_OD1.5mm_Relief","Connector_Wire/SolderWire-0.15sqmm_1x03_P4mm_D0.5mm_OD1.5mm_Relief2x","Connector_Wire/SolderWire-0.15sqmm_1x04_P4mm_D0.5mm_OD1.5mm","Connector_Wire/SolderWire-0.15sqmm_1x04_P4mm_D0.5mm_OD1.5mm_Relief","Connector_Wire/SolderWire-0.15sqmm_1x04_P4mm_D0.5mm_OD1.5mm_Relief2x","Connector_Wire/SolderWire-0.15sqmm_1x05_P4mm_D0.5mm_OD1.5mm","Connector_Wire/SolderWire-0.15sqmm_1x05_P4mm_D0.5mm_OD1.5mm_Relief","Connector_Wire/SolderWire-0.15sqmm_1x05_P4mm_D0.5mm_OD1.5mm_Relief2x","Connector_Wire/SolderWire-0.15sqmm_1x06_P4mm_D0.5mm_OD1.5mm","Connector_Wire/SolderWire-0.15sqmm_1x06_P4mm_D0.5mm_OD1.5mm_Relief","Connector_Wire/SolderWire-0.15sqmm_1x06_P4mm_D0.5mm_OD1.5mm_Relief2x","Connector_Wire/SolderWire-0.1sqmm_1x01_D0.4mm_OD1mm","Connector_Wire/SolderWire-0.1sqmm_1x01_D0.4mm_OD1mm_Relief","Connector_Wire/SolderWire-0.1sqmm_1x01_D0.4mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.1sqmm_1x02_P3.6mm_D0.4mm_OD1mm","Connector_Wire/SolderWire-0.1sqmm_1x02_P3.6mm_D0.4mm_OD1mm_Relief","Connector_Wire/SolderWire-0.1sqmm_1x02_P3.6mm_D0.4mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.1sqmm_1x03_P3.6mm_D0.4mm_OD1mm","Connector_Wire/SolderWire-0.1sqmm_1x03_P3.6mm_D0.4mm_OD1mm_Relief","Connector_Wire/SolderWire-0.1sqmm_1x03_P3.6mm_D0.4mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.1sqmm_1x04_P3.6mm_D0.4mm_OD1mm","Connector_Wire/SolderWire-0.1sqmm_1x04_P3.6mm_D0.4mm_OD1mm_Relief","Connector_Wire/SolderWire-0.1sqmm_1x04_P3.6mm_D0.4mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.1sqmm_1x05_P3.6mm_D0.4mm_OD1mm","Connector_Wire/SolderWire-0.1sqmm_1x05_P3.6mm_D0.4mm_OD1mm_Relief","Connector_Wire/SolderWire-0.1sqmm_1x05_P3.6mm_D0.4mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.1sqmm_1x06_P3.6mm_D0.4mm_OD1mm","Connector_Wire/SolderWire-0.1sqmm_1x06_P3.6mm_D0.4mm_OD1mm_Relief","Connector_Wire/SolderWire-0.1sqmm_1x06_P3.6mm_D0.4mm_OD1mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD1.7mm","Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD1.7mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD1.7mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD2mm","Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD2mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x01_D0.65mm_OD2mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x02_P4.2mm_D0.65mm_OD1.7mm","Connector_Wire/SolderWire-0.25sqmm_1x02_P4.2mm_D0.65mm_OD1.7mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x02_P4.2mm_D0.65mm_OD1.7mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x02_P4.5mm_D0.65mm_OD2mm","Connector_Wire/SolderWire-0.25sqmm_1x02_P4.5mm_D0.65mm_OD2mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x02_P4.5mm_D0.65mm_OD2mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x03_P4.2mm_D0.65mm_OD1.7mm","Connector_Wire/SolderWire-0.25sqmm_1x03_P4.2mm_D0.65mm_OD1.7mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x03_P4.2mm_D0.65mm_OD1.7mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x03_P4.5mm_D0.65mm_OD2mm","Connector_Wire/SolderWire-0.25sqmm_1x03_P4.5mm_D0.65mm_OD2mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x03_P4.5mm_D0.65mm_OD2mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x04_P4.2mm_D0.65mm_OD1.7mm","Connector_Wire/SolderWire-0.25sqmm_1x04_P4.2mm_D0.65mm_OD1.7mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x04_P4.2mm_D0.65mm_OD1.7mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x04_P4.5mm_D0.65mm_OD2mm","Connector_Wire/SolderWire-0.25sqmm_1x04_P4.5mm_D0.65mm_OD2mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x04_P4.5mm_D0.65mm_OD2mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x05_P4.2mm_D0.65mm_OD1.7mm","Connector_Wire/SolderWire-0.25sqmm_1x05_P4.2mm_D0.65mm_OD1.7mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x05_P4.2mm_D0.65mm_OD1.7mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x05_P4.5mm_D0.65mm_OD2mm","Connector_Wire/SolderWire-0.25sqmm_1x05_P4.5mm_D0.65mm_OD2mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x05_P4.5mm_D0.65mm_OD2mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x06_P4.2mm_D0.65mm_OD1.7mm","Connector_Wire/SolderWire-0.25sqmm_1x06_P4.2mm_D0.65mm_OD1.7mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x06_P4.2mm_D0.65mm_OD1.7mm_Relief2x","Connector_Wire/SolderWire-0.25sqmm_1x06_P4.5mm_D0.65mm_OD2mm","Connector_Wire/SolderWire-0.25sqmm_1x06_P4.5mm_D0.65mm_OD2mm_Relief","Connector_Wire/SolderWire-0.25sqmm_1x06_P4.5mm_D0.65mm_OD2mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.1mm","Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.1mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.1mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.3mm","Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x01_D0.9mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm","Connector_Wire/SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x02_P4.8mm_D0.9mm_OD2.3mm","Connector_Wire/SolderWire-0.5sqmm_1x02_P4.8mm_D0.9mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x02_P4.8mm_D0.9mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x03_P4.6mm_D0.9mm_OD2.1mm","Connector_Wire/SolderWire-0.5sqmm_1x03_P4.6mm_D0.9mm_OD2.1mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x03_P4.6mm_D0.9mm_OD2.1mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x03_P4.8mm_D0.9mm_OD2.3mm","Connector_Wire/SolderWire-0.5sqmm_1x03_P4.8mm_D0.9mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x03_P4.8mm_D0.9mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x04_P4.6mm_D0.9mm_OD2.1mm","Connector_Wire/SolderWire-0.5sqmm_1x04_P4.6mm_D0.9mm_OD2.1mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x04_P4.6mm_D0.9mm_OD2.1mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mm","Connector_Wire/SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x04_P4.8mm_D0.9mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x05_P4.6mm_D0.9mm_OD2.1mm","Connector_Wire/SolderWire-0.5sqmm_1x05_P4.6mm_D0.9mm_OD2.1mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x05_P4.6mm_D0.9mm_OD2.1mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x05_P4.8mm_D0.9mm_OD2.3mm","Connector_Wire/SolderWire-0.5sqmm_1x05_P4.8mm_D0.9mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x05_P4.8mm_D0.9mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x06_P4.6mm_D0.9mm_OD2.1mm","Connector_Wire/SolderWire-0.5sqmm_1x06_P4.6mm_D0.9mm_OD2.1mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x06_P4.6mm_D0.9mm_OD2.1mm_Relief2x","Connector_Wire/SolderWire-0.5sqmm_1x06_P4.8mm_D0.9mm_OD2.3mm","Connector_Wire/SolderWire-0.5sqmm_1x06_P4.8mm_D0.9mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.5sqmm_1x06_P4.8mm_D0.9mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD2.3mm","Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD3.5mm","Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD3.5mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x01_D1.25mm_OD3.5mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x02_P4.8mm_D1.25mm_OD2.3mm","Connector_Wire/SolderWire-0.75sqmm_1x02_P4.8mm_D1.25mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x02_P4.8mm_D1.25mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x02_P7mm_D1.25mm_OD3.5mm","Connector_Wire/SolderWire-0.75sqmm_1x02_P7mm_D1.25mm_OD3.5mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x02_P7mm_D1.25mm_OD3.5mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x03_P4.8mm_D1.25mm_OD2.3mm","Connector_Wire/SolderWire-0.75sqmm_1x03_P4.8mm_D1.25mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x03_P4.8mm_D1.25mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x03_P7mm_D1.25mm_OD3.5mm","Connector_Wire/SolderWire-0.75sqmm_1x03_P7mm_D1.25mm_OD3.5mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x03_P7mm_D1.25mm_OD3.5mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x04_P4.8mm_D1.25mm_OD2.3mm","Connector_Wire/SolderWire-0.75sqmm_1x04_P4.8mm_D1.25mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x04_P4.8mm_D1.25mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x04_P7mm_D1.25mm_OD3.5mm","Connector_Wire/SolderWire-0.75sqmm_1x04_P7mm_D1.25mm_OD3.5mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x04_P7mm_D1.25mm_OD3.5mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x05_P4.8mm_D1.25mm_OD2.3mm","Connector_Wire/SolderWire-0.75sqmm_1x05_P4.8mm_D1.25mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x05_P4.8mm_D1.25mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x05_P7mm_D1.25mm_OD3.5mm","Connector_Wire/SolderWire-0.75sqmm_1x05_P7mm_D1.25mm_OD3.5mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x05_P7mm_D1.25mm_OD3.5mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x06_P4.8mm_D1.25mm_OD2.3mm","Connector_Wire/SolderWire-0.75sqmm_1x06_P4.8mm_D1.25mm_OD2.3mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x06_P4.8mm_D1.25mm_OD2.3mm_Relief2x","Connector_Wire/SolderWire-0.75sqmm_1x06_P7mm_D1.25mm_OD3.5mm","Connector_Wire/SolderWire-0.75sqmm_1x06_P7mm_D1.25mm_OD3.5mm_Relief","Connector_Wire/SolderWire-0.75sqmm_1x06_P7mm_D1.25mm_OD3.5mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3.9mm","Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3mm","Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x01_D1.7mm_OD3mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x02_P6mm_D1.7mm_OD3mm","Connector_Wire/SolderWire-1.5sqmm_1x02_P6mm_D1.7mm_OD3mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x02_P6mm_D1.7mm_OD3mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x02_P7.8mm_D1.7mm_OD3.9mm","Connector_Wire/SolderWire-1.5sqmm_1x02_P7.8mm_D1.7mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x02_P7.8mm_D1.7mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x03_P6mm_D1.7mm_OD3mm","Connector_Wire/SolderWire-1.5sqmm_1x03_P6mm_D1.7mm_OD3mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x03_P6mm_D1.7mm_OD3mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x03_P7.8mm_D1.7mm_OD3.9mm","Connector_Wire/SolderWire-1.5sqmm_1x03_P7.8mm_D1.7mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x03_P7.8mm_D1.7mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm","Connector_Wire/SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x04_P7.8mm_D1.7mm_OD3.9mm","Connector_Wire/SolderWire-1.5sqmm_1x04_P7.8mm_D1.7mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x04_P7.8mm_D1.7mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x05_P6mm_D1.7mm_OD3mm","Connector_Wire/SolderWire-1.5sqmm_1x05_P6mm_D1.7mm_OD3mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x05_P6mm_D1.7mm_OD3mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x05_P7.8mm_D1.7mm_OD3.9mm","Connector_Wire/SolderWire-1.5sqmm_1x05_P7.8mm_D1.7mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x05_P7.8mm_D1.7mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x06_P6mm_D1.7mm_OD3mm","Connector_Wire/SolderWire-1.5sqmm_1x06_P6mm_D1.7mm_OD3mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x06_P6mm_D1.7mm_OD3mm_Relief2x","Connector_Wire/SolderWire-1.5sqmm_1x06_P7.8mm_D1.7mm_OD3.9mm","Connector_Wire/SolderWire-1.5sqmm_1x06_P7.8mm_D1.7mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1.5sqmm_1x06_P7.8mm_D1.7mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD2.7mm","Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD2.7mm_Relief","Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD2.7mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD3.9mm","Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1sqmm_1x01_D1.4mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x02_P5.4mm_D1.4mm_OD2.7mm","Connector_Wire/SolderWire-1sqmm_1x02_P5.4mm_D1.4mm_OD2.7mm_Relief","Connector_Wire/SolderWire-1sqmm_1x02_P5.4mm_D1.4mm_OD2.7mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x02_P7.8mm_D1.4mm_OD3.9mm","Connector_Wire/SolderWire-1sqmm_1x02_P7.8mm_D1.4mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1sqmm_1x02_P7.8mm_D1.4mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x03_P5.4mm_D1.4mm_OD2.7mm","Connector_Wire/SolderWire-1sqmm_1x03_P5.4mm_D1.4mm_OD2.7mm_Relief","Connector_Wire/SolderWire-1sqmm_1x03_P5.4mm_D1.4mm_OD2.7mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x03_P7.8mm_D1.4mm_OD3.9mm","Connector_Wire/SolderWire-1sqmm_1x03_P7.8mm_D1.4mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1sqmm_1x03_P7.8mm_D1.4mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x04_P5.4mm_D1.4mm_OD2.7mm","Connector_Wire/SolderWire-1sqmm_1x04_P5.4mm_D1.4mm_OD2.7mm_Relief","Connector_Wire/SolderWire-1sqmm_1x04_P5.4mm_D1.4mm_OD2.7mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x04_P7.8mm_D1.4mm_OD3.9mm","Connector_Wire/SolderWire-1sqmm_1x04_P7.8mm_D1.4mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1sqmm_1x04_P7.8mm_D1.4mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x05_P5.4mm_D1.4mm_OD2.7mm","Connector_Wire/SolderWire-1sqmm_1x05_P5.4mm_D1.4mm_OD2.7mm_Relief","Connector_Wire/SolderWire-1sqmm_1x05_P5.4mm_D1.4mm_OD2.7mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x05_P7.8mm_D1.4mm_OD3.9mm","Connector_Wire/SolderWire-1sqmm_1x05_P7.8mm_D1.4mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1sqmm_1x05_P7.8mm_D1.4mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x06_P5.4mm_D1.4mm_OD2.7mm","Connector_Wire/SolderWire-1sqmm_1x06_P5.4mm_D1.4mm_OD2.7mm_Relief","Connector_Wire/SolderWire-1sqmm_1x06_P5.4mm_D1.4mm_OD2.7mm_Relief2x","Connector_Wire/SolderWire-1sqmm_1x06_P7.8mm_D1.4mm_OD3.9mm","Connector_Wire/SolderWire-1sqmm_1x06_P7.8mm_D1.4mm_OD3.9mm_Relief","Connector_Wire/SolderWire-1sqmm_1x06_P7.8mm_D1.4mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD3.6mm","Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD3.6mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD3.6mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD4.4mm","Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD4.4mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x01_D2.4mm_OD4.4mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x02_P7.2mm_D2.4mm_OD3.6mm","Connector_Wire/SolderWire-2.5sqmm_1x02_P7.2mm_D2.4mm_OD3.6mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x02_P7.2mm_D2.4mm_OD3.6mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x02_P8.8mm_D2.4mm_OD4.4mm","Connector_Wire/SolderWire-2.5sqmm_1x02_P8.8mm_D2.4mm_OD4.4mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x02_P8.8mm_D2.4mm_OD4.4mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x03_P7.2mm_D2.4mm_OD3.6mm","Connector_Wire/SolderWire-2.5sqmm_1x03_P7.2mm_D2.4mm_OD3.6mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x03_P7.2mm_D2.4mm_OD3.6mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x03_P8.8mm_D2.4mm_OD4.4mm","Connector_Wire/SolderWire-2.5sqmm_1x03_P8.8mm_D2.4mm_OD4.4mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x03_P8.8mm_D2.4mm_OD4.4mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x04_P7.2mm_D2.4mm_OD3.6mm","Connector_Wire/SolderWire-2.5sqmm_1x04_P7.2mm_D2.4mm_OD3.6mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x04_P7.2mm_D2.4mm_OD3.6mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x04_P8.8mm_D2.4mm_OD4.4mm","Connector_Wire/SolderWire-2.5sqmm_1x04_P8.8mm_D2.4mm_OD4.4mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x04_P8.8mm_D2.4mm_OD4.4mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x05_P7.2mm_D2.4mm_OD3.6mm","Connector_Wire/SolderWire-2.5sqmm_1x05_P7.2mm_D2.4mm_OD3.6mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x05_P7.2mm_D2.4mm_OD3.6mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x05_P8.8mm_D2.4mm_OD4.4mm","Connector_Wire/SolderWire-2.5sqmm_1x05_P8.8mm_D2.4mm_OD4.4mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x05_P8.8mm_D2.4mm_OD4.4mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x06_P7.2mm_D2.4mm_OD3.6mm","Connector_Wire/SolderWire-2.5sqmm_1x06_P7.2mm_D2.4mm_OD3.6mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x06_P7.2mm_D2.4mm_OD3.6mm_Relief2x","Connector_Wire/SolderWire-2.5sqmm_1x06_P8.8mm_D2.4mm_OD4.4mm","Connector_Wire/SolderWire-2.5sqmm_1x06_P8.8mm_D2.4mm_OD4.4mm_Relief","Connector_Wire/SolderWire-2.5sqmm_1x06_P8.8mm_D2.4mm_OD4.4mm_Relief2x","Connector_Wire/SolderWire-2sqmm_1x01_D2mm_OD3.9mm","Connector_Wire/SolderWire-2sqmm_1x01_D2mm_OD3.9mm_Relief","Connector_Wire/SolderWire-2sqmm_1x01_D2mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-2sqmm_1x02_P7.8mm_D2mm_OD3.9mm","Connector_Wire/SolderWire-2sqmm_1x02_P7.8mm_D2mm_OD3.9mm_Relief","Connector_Wire/SolderWire-2sqmm_1x02_P7.8mm_D2mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-2sqmm_1x03_P7.8mm_D2mm_OD3.9mm","Connector_Wire/SolderWire-2sqmm_1x03_P7.8mm_D2mm_OD3.9mm_Relief","Connector_Wire/SolderWire-2sqmm_1x03_P7.8mm_D2mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-2sqmm_1x04_P7.8mm_D2mm_OD3.9mm","Connector_Wire/SolderWire-2sqmm_1x04_P7.8mm_D2mm_OD3.9mm_Relief","Connector_Wire/SolderWire-2sqmm_1x04_P7.8mm_D2mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-2sqmm_1x05_P7.8mm_D2mm_OD3.9mm","Connector_Wire/SolderWire-2sqmm_1x05_P7.8mm_D2mm_OD3.9mm_Relief","Connector_Wire/SolderWire-2sqmm_1x05_P7.8mm_D2mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-2sqmm_1x06_P7.8mm_D2mm_OD3.9mm","Connector_Wire/SolderWire-2sqmm_1x06_P7.8mm_D2mm_OD3.9mm_Relief","Connector_Wire/SolderWire-2sqmm_1x06_P7.8mm_D2mm_OD3.9mm_Relief2x","Connector_Wire/SolderWire-4sqmm_1x01_D3mm_OD6mm","Connector_Wire/SolderWire-4sqmm_1x01_D3mm_OD6mm_Relief","Connector_Wire/SolderWire-4sqmm_1x01_D3mm_OD6mm_Relief2x","Connector_Wire/SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mm","Connector_Wire/SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mm_Relief","Connector_Wire/SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mm_Relief2x","Connector_Wire/SolderWire-4sqmm_1x03_P12mm_D3mm_OD6mm","Connector_Wire/SolderWire-4sqmm_1x03_P12mm_D3mm_OD6mm_Relief","Connector_Wire/SolderWire-4sqmm_1x03_P12mm_D3mm_OD6mm_Relief2x","Connector_Wire/SolderWire-4sqmm_1x04_P12mm_D3mm_OD6mm","Connector_Wire/SolderWire-4sqmm_1x04_P12mm_D3mm_OD6mm_Relief","Connector_Wire/SolderWire-4sqmm_1x04_P12mm_D3mm_OD6mm_Relief2x","Connector_Wire/SolderWire-4sqmm_1x05_P12mm_D3mm_OD6mm","Connector_Wire/SolderWire-4sqmm_1x05_P12mm_D3mm_OD6mm_Relief","Connector_Wire/SolderWire-4sqmm_1x05_P12mm_D3mm_OD6mm_Relief2x","Connector_Wire/SolderWire-4sqmm_1x06_P12mm_D3mm_OD6mm","Connector_Wire/SolderWire-4sqmm_1x06_P12mm_D3mm_OD6mm_Relief","Connector_Wire/SolderWire-4sqmm_1x06_P12mm_D3mm_OD6mm_Relief2x","Connector_Wire/SolderWire-6sqmm_1x01_D3.5mm_OD7mm","Connector_Wire/SolderWire-6sqmm_1x01_D3.5mm_OD7mm_Relief","Connector_Wire/SolderWire-6sqmm_1x01_D3.5mm_OD7mm_Relief2x","Connector_Wire/SolderWire-6sqmm_1x02_P14mm_D3.5mm_OD7mm","Connector_Wire/SolderWire-6sqmm_1x02_P14mm_D3.5mm_OD7mm_Relief","Connector_Wire/SolderWire-6sqmm_1x02_P14mm_D3.5mm_OD7mm_Relief2x","Connector_Wire/SolderWire-6sqmm_1x03_P14mm_D3.5mm_OD7mm","Connector_Wire/SolderWire-6sqmm_1x03_P14mm_D3.5mm_OD7mm_Relief","Connector_Wire/SolderWire-6sqmm_1x03_P14mm_D3.5mm_OD7mm_Relief2x","Connector_Wire/SolderWire-6sqmm_1x04_P14mm_D3.5mm_OD7mm","Connector_Wire/SolderWire-6sqmm_1x04_P14mm_D3.5mm_OD7mm_Relief","Connector_Wire/SolderWire-6sqmm_1x04_P14mm_D3.5mm_OD7mm_Relief2x","Connector_Wire/SolderWire-6sqmm_1x05_P14mm_D3.5mm_OD7mm","Connector_Wire/SolderWire-6sqmm_1x05_P14mm_D3.5mm_OD7mm_Relief","Connector_Wire/SolderWire-6sqmm_1x05_P14mm_D3.5mm_OD7mm_Relief2x","Connector_Wire/SolderWire-6sqmm_1x06_P14mm_D3.5mm_OD7mm","Connector_Wire/SolderWire-6sqmm_1x06_P14mm_D3.5mm_OD7mm_Relief","Connector_Wire/SolderWire-6sqmm_1x06_P14mm_D3.5mm_OD7mm_Relief2x","Connector_Wire/SolderWirePad_1x01_SMD_1.5x3mm","Connector_Wire/SolderWirePad_1x01_SMD_1x2mm","Connector_Wire/SolderWirePad_1x01_SMD_2x4mm","Connector_Wire/SolderWirePad_1x01_SMD_3x6mm","Connector_Wire/SolderWirePad_1x01_SMD_4x8mm","Connector_Wire/SolderWirePad_1x01_SMD_5x10mm","Connector_Wuerth/Wuerth_WR-PHD_610004243021_SMD_2x02_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610006243021_SMD_2x03_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610008243021_SMD_2x04_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610010243021_SMD_2x05_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610012243021_SMD_2x06_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610016243021_SMD_2x08_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610018243021_SMD_2x09_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610020243021_SMD_2x10_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610022243021_SMD_2x11_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610024243021_SMD_2x12_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610026243021_SMD_2x13_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610032243021_SMD_2x16_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_610034243021_SMD_2x17_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613004216921_Large_2x02_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61300425721_Standard_2x02_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613006216921_Large_2x03_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61300625721_Standard_2x03_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613008216921_Large_2x04_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61300825721_Standard_2x04_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613010216921_Large_2x05_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61301025721_Standard_2x05_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613012216921_Large_2x06_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61301225721_Standard_2x06_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613016216921_Large_2x08_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61301625721_Standard_2x08_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613018216921_Large_2x09_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613020216921_Large_2x10_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61302025721_Standard_2x10_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613022216921_Large_2x11_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613024216921_Large_2x12_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61302425721_Standard_2x12_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613026216921_Large_2x13_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61302625721_Standard_2x13_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613032216921_Large_2x16_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61303225721_Standard_2x16_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_613034216921_Large_2x17_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-PHD_61303425721_Standard_2x17_P2.54mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800211622_1x02_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800311622_1x03_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800411622_1x04_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800511622_1x05_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800611622_1x06_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800711622_1x07_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800811622_1x08_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64800911622_1x09_P1.50mm_Vertical","Connector_Wuerth/Wuerth_WR-WTB_64801011622_1x10_P1.50mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-10PLT_1x10-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-2PLT_1x02-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-3PLT_1x03-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-4PLT_1x04-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-5PLT_1x05-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-6PLT_1x06-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-7PLT_1x07-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-8PLT_1x08-1MP_P3.96mm_Vertical","Connector_Zhaoxing/Zhaoxing_VH_ZX-VH3.96-9PLT_1x09-1MP_P3.96mm_Vertical","Converter_ACDC/Converter_ACDC_CUI_PBO-3-Sxx_THT_Vertical","Converter_ACDC/Converter_ACDC_Hahn_HS-400xx_THT","Converter_ACDC/Converter_ACDC_Hi-Link_HLK-10Mxx","Converter_ACDC/Converter_ACDC_Hi-Link_HLK-12MxxA","Converter_ACDC/Converter_ACDC_Hi-Link_HLK-20Mxx","Converter_ACDC/Converter_ACDC_Hi-Link_HLK-2Mxx","Converter_ACDC/Converter_ACDC_Hi-Link_HLK-30Mxx","Converter_ACDC/Converter_ACDC_Hi-Link_HLK-5Mxx","Converter_ACDC/Converter_ACDC_Hi-Link_HLK-PMxx","Converter_ACDC/Converter_ACDC_MeanWell_IRM-02-xx_SMD","Converter_ACDC/Converter_ACDC_MeanWell_IRM-02-xx_THT","Converter_ACDC/Converter_ACDC_MeanWell_IRM-03-xx_SMD","Converter_ACDC/Converter_ACDC_MeanWell_IRM-03-xx_THT","Converter_ACDC/Converter_ACDC_MeanWell_IRM-05-xx_THT","Converter_ACDC/Converter_ACDC_MeanWell_IRM-10-xx_THT","Converter_ACDC/Converter_ACDC_MeanWell_IRM-20-xx_THT","Converter_ACDC/Converter_ACDC_MeanWell_IRM-60-xx_THT","Converter_ACDC/Converter_ACDC_MeanWell_MFM-10-xx_THT","Converter_ACDC/Converter_ACDC_MeanWell_MFM-15-xx_THT","Converter_ACDC/Converter_ACDC_Murata_BAC05SxxDC_THT","Converter_ACDC/Converter_ACDC_RECOM_RAC01-xxSGB_THT","Converter_ACDC/Converter_ACDC_RECOM_RAC04-xxSGx_THT","Converter_ACDC/Converter_ACDC_RECOM_RAC05-xxSK_THT","Converter_ACDC/Converter_ACDC_Recom_RAC20-xxDK_THT","Converter_ACDC/Converter_ACDC_Recom_RAC20-xxSK_THT","Converter_ACDC/Converter_ACDC_TRACO_TMF_051xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMF_101xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMF_201xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMF_301xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMG_071xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMG_151xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMLM-04_THT","Converter_ACDC/Converter_ACDC_TRACO_TMLM-05_THT","Converter_ACDC/Converter_ACDC_TRACO_TMLM-10-20_THT","Converter_ACDC/Converter_ACDC_TRACO_TMPW10_1xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMPW25_1xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TMPW5-1xx_THT","Converter_ACDC/Converter_ACDC_TRACO_TPP-15-1xx-D_THT","Converter_ACDC/Converter_ACDC_Vigortronix_VTX-214-010-1xx_THT","Converter_ACDC/Converter_ACDC_Vigortronix_VTX-214-010-2xx_THT","Converter_ACDC/Converter_ACDC_Vigortronix_VTX-214-015-1xx_THT","Converter_ACDC/Converter_ACDC_ZETTLER_ZPI03Sxx00WC_THT","Converter_DCDC/Converter_DCDC_Artesyn_ATA_SMD","Converter_DCDC/Converter_DCDC_Bothhand_CFUDxxxx_THT","Converter_DCDC/Converter_DCDC_Bothhand_CFUSxxxxEH_THT","Converter_DCDC/Converter_DCDC_Bothhand_CFUSxxxx_THT","Converter_DCDC/Converter_DCDC_Cincon_EC5BExx_Dual_THT","Converter_DCDC/Converter_DCDC_Cincon_EC5BExx_Single_THT","Converter_DCDC/Converter_DCDC_Cincon_EC6Cxx_Dual-Triple_THT","Converter_DCDC/Converter_DCDC_Cincon_EC6Cxx_Single_THT","Converter_DCDC/Converter_DCDC_Cyntec_MUN12AD01-SH","Converter_DCDC/Converter_DCDC_Cyntec_MUN12AD03-SH","Converter_DCDC/Converter_DCDC_Hamamatsu_C11204-1_THT","Converter_DCDC/Converter_DCDC_MeanWell_NID30_THT","Converter_DCDC/Converter_DCDC_MeanWell_NID60_THT","Converter_DCDC/Converter_DCDC_MeanWell_NSD10_THT","Converter_DCDC/Converter_DCDC_Murata_CRE1xxxxxx3C_THT","Converter_DCDC/Converter_DCDC_Murata_CRE1xxxxxxDC_THT","Converter_DCDC/Converter_DCDC_Murata_CRE1xxxxxxSC_THT","Converter_DCDC/Converter_DCDC_Murata_MEE1SxxxxSC_THT","Converter_DCDC/Converter_DCDC_Murata_MEE3SxxxxSC_THT","Converter_DCDC/Converter_DCDC_Murata_MGJ2DxxxxxxSC_THT","Converter_DCDC/Converter_DCDC_Murata_MGJ3","Converter_DCDC/Converter_DCDC_Murata_MYRxP","Converter_DCDC/Converter_DCDC_Murata_NCS1SxxxxSC_THT","Converter_DCDC/Converter_DCDC_Murata_NMAxxxxDC_THT","Converter_DCDC/Converter_DCDC_Murata_NMAxxxxSC_THT","Converter_DCDC/Converter_DCDC_Murata_NXExSxxxxMC_SMD","Converter_DCDC/Converter_DCDC_Murata_OKI-78SR_Horizontal","Converter_DCDC/Converter_DCDC_Murata_OKI-78SR_Vertical","Converter_DCDC/Converter_DCDC_RECOM_R-78B-2.0_THT","Converter_DCDC/Converter_DCDC_RECOM_R-78E-0.5_THT","Converter_DCDC/Converter_DCDC_RECOM_R-78HB-0.5L_THT","Converter_DCDC/Converter_DCDC_RECOM_R-78HB-0.5_THT","Converter_DCDC/Converter_DCDC_RECOM_R-78S-0.1_THT","Converter_DCDC/Converter_DCDC_RECOM_R5xxxDA_THT","Converter_DCDC/Converter_DCDC_RECOM_R5xxxPA_THT","Converter_DCDC/Converter_DCDC_RECOM_RCD-24_THT","Converter_DCDC/Converter_DCDC_RECOM_RPA60-xxxxSFW","Converter_DCDC/Converter_DCDC_RECOM_RPMx.x-x.0","Converter_DCDC/Converter_DCDC_Silvertel_Ag54xx","Converter_DCDC/Converter_DCDC_Silvertel_Ag5810","Converter_DCDC/Converter_DCDC_Silvertel_Ag99xxLP_THT","Converter_DCDC/Converter_DCDC_TRACO_TBA1-xxxxE_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TBA1-xxxxE_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TBA1-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TBA2-xxxx_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TBA2-xxxx_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TDN_5-xxxxWISM_SMD","Converter_DCDC/Converter_DCDC_TRACO_TDN_5-xxxxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_TDU1-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TEA1-xxxxE_THT","Converter_DCDC/Converter_DCDC_TRACO_TEA1-xxxxHI_THT","Converter_DCDC/Converter_DCDC_TRACO_TEA1-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TEC2-12xxWI_24xxWI_48xxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_TEC3-24xxUI_THT","Converter_DCDC/Converter_DCDC_TRACO_TEL12-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN10-110xxWIRH_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN10-xxxx_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN10-xxxx_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN10-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN20-110xxWIRH_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN20-xxxx-N4_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN20-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN30-xxxxUIR_THT","Converter_DCDC/Converter_DCDC_TRACO_TEN40-110xxWIRH_THT","Converter_DCDC/Converter_DCDC_TRACO_TEP150-721xUIR_THT","Converter_DCDC/Converter_DCDC_TRACO_TES1-051x_121x_241x_Single_SMD","Converter_DCDC/Converter_DCDC_TRACO_TES1-052x_122x_242x_Dual_SMD","Converter_DCDC/Converter_DCDC_TRACO_THB10-xxxx_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_THB10-xxxx_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_THD_15-xxxxWIN_THT","Converter_DCDC/Converter_DCDC_TRACO_THL30-xxxxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_THL40-xxxxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_THN10-xxxxUIR_THT","Converter_DCDC/Converter_DCDC_TRACO_THN30-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_THR40-72xxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_TMA-05xxD_12xxD_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TMA-05xxS_12xxS_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TMA-15xxD_24xxD_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TMA-15xxS_24xxS_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TME_03xxS_05xxS_12xxS_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TME_24xxS_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TMR-1-xxxx_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TMR-1-xxxx_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TMR-1SM_SMD","Converter_DCDC/Converter_DCDC_TRACO_TMR10-24xxWIR_48xxWIR_72xxWIR_THT","Converter_DCDC/Converter_DCDC_TRACO_TMR2-xxxxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_TMR4-xxxxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_TMU3-05xx_12xx_THT","Converter_DCDC/Converter_DCDC_TRACO_TMU3-24xx_THT","Converter_DCDC/Converter_DCDC_TRACO_TMV-051xD_121xD_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TMV-051xS_121xS_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TMV-241xD_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TMV-241xS_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TOS06-05SIL_THT","Converter_DCDC/Converter_DCDC_TRACO_TOS06-12SIL_THT","Converter_DCDC/Converter_DCDC_TRACO_TRA3-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TRI1-xxxxSM_SMD","Converter_DCDC/Converter_DCDC_TRACO_TRI1-xxxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TRI10_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TRI10_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TRN3-xx1x_Single_THT","Converter_DCDC/Converter_DCDC_TRACO_TRN3-xx2x_Dual_THT","Converter_DCDC/Converter_DCDC_TRACO_TSR-1_THT","Converter_DCDC/Converter_DCDC_TRACO_TSR0.5-24xxSM_241xxSM_SMD","Converter_DCDC/Converter_DCDC_TRACO_TSR0.5-24xx_TSR0.5-24xxx_THT","Converter_DCDC/Converter_DCDC_TRACO_TSR0.6-48xxWI_TSR0.6-48xxxWI_THT","Converter_DCDC/Converter_DCDC_TRACO_TSR1-xxxxE_THT","Converter_DCDC/Converter_DCDC_TRACO_TSR1.5-24xxE_24120E_THT","Converter_DCDC/Converter_DCDC_TRACO_TSR2-24xxN_TSR2-24xxxN_THT","Converter_DCDC/Converter_DCDC_TRACO_TSR2-xxxx_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IA48xxD_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IA48xxS_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IAxxxxD_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IAxxxxS_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxDH_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxD_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxSH_THT","Converter_DCDC/Converter_DCDC_XP_POWER-IHxxxxS_THT","Converter_DCDC/Converter_DCDC_XP_POWER-ISU02_SMD","Converter_DCDC/Converter_DCDC_XP_POWER-ITQxxxxS-H_THT","Converter_DCDC/Converter_DCDC_XP_POWER-ITXxxxxSA_THT","Converter_DCDC/Converter_DCDC_XP_POWER-ITxxxxxS_THT","Converter_DCDC/Converter_DCDC_XP_POWER_JTDxxxxxxx_THT","Converter_DCDC/Converter_DCDC_XP_POWER_JTExxxxDxx_THT","Converter_DCDC/Converter_DCDC_muRata_MEJ1DxxxxSC_THT","Converter_DCDC/Converter_DCDC_muRata_MEJ1SxxxxSC_THT","Crystal/Crystal_AT310_D3.0mm_L10.0mm_Horizontal","Crystal/Crystal_AT310_D3.0mm_L10.0mm_Horizontal_1EP_style1","Crystal/Crystal_AT310_D3.0mm_L10.0mm_Horizontal_1EP_style2","Crystal/Crystal_AT310_D3.0mm_L10.0mm_Vertical","Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Horizontal","Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Horizontal_1EP_style1","Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Horizontal_1EP_style2","Crystal/Crystal_C26-LF_D2.1mm_L6.5mm_Vertical","Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Horizontal","Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Horizontal_1EP_style1","Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Horizontal_1EP_style2","Crystal/Crystal_C38-LF_D3.0mm_L8.0mm_Vertical","Crystal/Crystal_DS10_D1.0mm_L4.3mm_Horizontal","Crystal/Crystal_DS10_D1.0mm_L4.3mm_Horizontal_1EP_style1","Crystal/Crystal_DS10_D1.0mm_L4.3mm_Horizontal_1EP_style2","Crystal/Crystal_DS10_D1.0mm_L4.3mm_Vertical","Crystal/Crystal_DS15_D1.5mm_L5.0mm_Horizontal","Crystal/Crystal_DS15_D1.5mm_L5.0mm_Horizontal_1EP_style1","Crystal/Crystal_DS15_D1.5mm_L5.0mm_Horizontal_1EP_style2","Crystal/Crystal_DS15_D1.5mm_L5.0mm_Vertical","Crystal/Crystal_DS26_D2.0mm_L6.0mm_Horizontal","Crystal/Crystal_DS26_D2.0mm_L6.0mm_Horizontal_1EP_style1","Crystal/Crystal_DS26_D2.0mm_L6.0mm_Horizontal_1EP_style2","Crystal/Crystal_DS26_D2.0mm_L6.0mm_Vertical","Crystal/Crystal_HC18-U_Horizontal","Crystal/Crystal_HC18-U_Horizontal_1EP_style1","Crystal/Crystal_HC18-U_Horizontal_1EP_style2","Crystal/Crystal_HC18-U_Vertical","Crystal/Crystal_HC33-U_Horizontal","Crystal/Crystal_HC33-U_Horizontal_1EP_style1","Crystal/Crystal_HC33-U_Horizontal_1EP_style2","Crystal/Crystal_HC33-U_Vertical","Crystal/Crystal_HC35-U","Crystal/Crystal_HC49-4H_Vertical","Crystal/Crystal_HC49-U-3Pin_Vertical","Crystal/Crystal_HC49-U_Horizontal","Crystal/Crystal_HC49-U_Horizontal_1EP_style1","Crystal/Crystal_HC49-U_Horizontal_1EP_style2","Crystal/Crystal_HC49-U_Vertical","Crystal/Crystal_HC50_Horizontal","Crystal/Crystal_HC50_Horizontal_1EP_style1","Crystal/Crystal_HC50_Horizontal_1EP_style2","Crystal/Crystal_HC50_Vertical","Crystal/Crystal_HC51-U_Vertical","Crystal/Crystal_HC51_Horizontal","Crystal/Crystal_HC51_Horizontal_1EP_style1","Crystal/Crystal_HC51_Horizontal_1EP_style2","Crystal/Crystal_HC52-6mm_Horizontal","Crystal/Crystal_HC52-6mm_Horizontal_1EP_style1","Crystal/Crystal_HC52-6mm_Horizontal_1EP_style2","Crystal/Crystal_HC52-6mm_Vertical","Crystal/Crystal_HC52-8mm_Horizontal","Crystal/Crystal_HC52-8mm_Horizontal_1EP_style1","Crystal/Crystal_HC52-8mm_Horizontal_1EP_style2","Crystal/Crystal_HC52-8mm_Vertical","Crystal/Crystal_HC52-U-3Pin_Vertical","Crystal/Crystal_HC52-U_Horizontal","Crystal/Crystal_HC52-U_Horizontal_1EP_style1","Crystal/Crystal_HC52-U_Horizontal_1EP_style2","Crystal/Crystal_HC52-U_Vertical","Crystal/Crystal_Round_D1.0mm_Vertical","Crystal/Crystal_Round_D1.5mm_Vertical","Crystal/Crystal_Round_D2.0mm_Vertical","Crystal/Crystal_Round_D3.0mm_Vertical","Crystal/Crystal_SMD_0603-2Pin_6.0x3.5mm","Crystal/Crystal_SMD_0603-2Pin_6.0x3.5mm_HandSoldering","Crystal/Crystal_SMD_0603-4Pin_6.0x3.5mm","Crystal/Crystal_SMD_0603-4Pin_6.0x3.5mm_HandSoldering","Crystal/Crystal_SMD_1210-4Pin_1.2x1.0mm","Crystal/Crystal_SMD_1210-4Pin_1.2x1.0mm_RotB","Crystal/Crystal_SMD_2012-2Pin_2.0x1.2mm","Crystal/Crystal_SMD_2012-2Pin_2.0x1.2mm_HandSoldering","Crystal/Crystal_SMD_2016-4Pin_2.0x1.6mm","Crystal/Crystal_SMD_2520-4Pin_2.5x2.0mm","Crystal/Crystal_SMD_3215-2Pin_3.2x1.5mm","Crystal/Crystal_SMD_3225-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSoldering","Crystal/Crystal_SMD_5032-2Pin_5.0x3.2mm","Crystal/Crystal_SMD_5032-2Pin_5.0x3.2mm_HandSoldering","Crystal/Crystal_SMD_5032-4Pin_5.0x3.2mm","Crystal/Crystal_SMD_7050-2Pin_7.0x5.0mm","Crystal/Crystal_SMD_7050-2Pin_7.0x5.0mm_HandSoldering","Crystal/Crystal_SMD_7050-4Pin_7.0x5.0mm","Crystal/Crystal_SMD_Abracon_ABM10-4Pin_2.5x2.0mm","Crystal/Crystal_SMD_Abracon_ABM3-2Pin_5.0x3.2mm","Crystal/Crystal_SMD_Abracon_ABM3-2Pin_5.0x3.2mm_HandSoldering","Crystal/Crystal_SMD_Abracon_ABM3B-4Pin_5.0x3.2mm","Crystal/Crystal_SMD_Abracon_ABM3C-4Pin_5.0x3.2mm","Crystal/Crystal_SMD_Abracon_ABM7-2Pin_6.0x3.5mm","Crystal/Crystal_SMD_Abracon_ABM8AIG-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_Abracon_ABM8G-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_Abracon_ABS25-4Pin_8.0x3.8mm","Crystal/Crystal_SMD_Citizen_CS325S-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_ECS_CSM3X-2Pin_7.6x4.1mm","Crystal/Crystal_SMD_EuroQuartz_EQ161-2Pin_3.2x1.5mm","Crystal/Crystal_SMD_EuroQuartz_EQ161-2Pin_3.2x1.5mm_HandSoldering","Crystal/Crystal_SMD_EuroQuartz_MJ-4Pin_5.0x3.2mm","Crystal/Crystal_SMD_EuroQuartz_MJ-4Pin_5.0x3.2mm_HandSoldering","Crystal/Crystal_SMD_EuroQuartz_MQ-4Pin_7.0x5.0mm","Crystal/Crystal_SMD_EuroQuartz_MQ-4Pin_7.0x5.0mm_HandSoldering","Crystal/Crystal_SMD_EuroQuartz_MQ2-2Pin_7.0x5.0mm","Crystal/Crystal_SMD_EuroQuartz_MQ2-2Pin_7.0x5.0mm_HandSoldering","Crystal/Crystal_SMD_EuroQuartz_MT-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_EuroQuartz_MT-4Pin_3.2x2.5mm_HandSoldering","Crystal/Crystal_SMD_EuroQuartz_X22-4Pin_2.5x2.0mm","Crystal/Crystal_SMD_EuroQuartz_X22-4Pin_2.5x2.0mm_HandSoldering","Crystal/Crystal_SMD_FOX_FE-2Pin_7.5x5.0mm","Crystal/Crystal_SMD_FOX_FE-2Pin_7.5x5.0mm_HandSoldering","Crystal/Crystal_SMD_FOX_FQ7050-2Pin_7.0x5.0mm","Crystal/Crystal_SMD_FOX_FQ7050-2Pin_7.0x5.0mm_HandSoldering","Crystal/Crystal_SMD_FOX_FQ7050-4Pin_7.0x5.0mm","Crystal/Crystal_SMD_FrontierElectronics_FM206","Crystal/Crystal_SMD_G8-2Pin_3.2x1.5mm","Crystal/Crystal_SMD_G8-2Pin_3.2x1.5mm_HandSoldering","Crystal/Crystal_SMD_HC49-SD","Crystal/Crystal_SMD_HC49-SD_HandSoldering","Crystal/Crystal_SMD_MicroCrystal_CC1V-T1A-2Pin_8.0x3.7mm","Crystal/Crystal_SMD_MicroCrystal_CC1V-T1A-2Pin_8.0x3.7mm_HandSoldering","Crystal/Crystal_SMD_MicroCrystal_CC4V-T1A-2Pin_5.0x1.9mm","Crystal/Crystal_SMD_MicroCrystal_CC4V-T1A-2Pin_5.0x1.9mm_HandSoldering","Crystal/Crystal_SMD_MicroCrystal_CC5V-T1A-2Pin_4.1x1.5mm","Crystal/Crystal_SMD_MicroCrystal_CC5V-T1A-2Pin_4.1x1.5mm_HandSoldering","Crystal/Crystal_SMD_MicroCrystal_CC7V-T1A-2Pin_3.2x1.5mm","Crystal/Crystal_SMD_MicroCrystal_CC7V-T1A-2Pin_3.2x1.5mm_HandSoldering","Crystal/Crystal_SMD_MicroCrystal_CC8V-T1A-2Pin_2.0x1.2mm","Crystal/Crystal_SMD_MicroCrystal_CC8V-T1A-2Pin_2.0x1.2mm_HandSoldering","Crystal/Crystal_SMD_MicroCrystal_CM9V-T1A-2Pin_1.6x1.0mm","Crystal/Crystal_SMD_MicroCrystal_CM9V-T1A-2Pin_1.6x1.0mm_HandSoldering","Crystal/Crystal_SMD_MicroCrystal_MS1V-T1K","Crystal/Crystal_SMD_MicroCrystal_MS3V-T1R","Crystal/Crystal_SMD_Qantek_QC5CB-2Pin_5x3.2mm","Crystal/Crystal_SMD_SeikoEpson_FA128-4Pin_2.0x1.6mm","Crystal/Crystal_SMD_SeikoEpson_FA238-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_SeikoEpson_FA238-4Pin_3.2x2.5mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_FA238V-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_SeikoEpson_FA238V-4Pin_3.2x2.5mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MA406-4Pin_11.7x4.0mm","Crystal/Crystal_SMD_SeikoEpson_MA406-4Pin_11.7x4.0mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MA505-2Pin_12.7x5.1mm","Crystal/Crystal_SMD_SeikoEpson_MA505-2Pin_12.7x5.1mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MA506-4Pin_12.7x5.1mm","Crystal/Crystal_SMD_SeikoEpson_MA506-4Pin_12.7x5.1mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MC146-4Pin_6.7x1.5mm","Crystal/Crystal_SMD_SeikoEpson_MC146-4Pin_6.7x1.5mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MC156-4Pin_7.1x2.5mm","Crystal/Crystal_SMD_SeikoEpson_MC156-4Pin_7.1x2.5mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MC306-4Pin_8.0x3.2mm","Crystal/Crystal_SMD_SeikoEpson_MC306-4Pin_8.0x3.2mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MC405-2Pin_9.6x4.1mm","Crystal/Crystal_SMD_SeikoEpson_MC405-2Pin_9.6x4.1mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_MC406-4Pin_9.6x4.1mm","Crystal/Crystal_SMD_SeikoEpson_MC406-4Pin_9.6x4.1mm_HandSoldering","Crystal/Crystal_SMD_SeikoEpson_TSX3225-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_SeikoEpson_TSX3225-4Pin_3.2x2.5mm_HandSoldering","Crystal/Crystal_SMD_TXC_7A-2Pin_5x3.2mm","Crystal/Crystal_SMD_TXC_7M-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_TXC_7M-4Pin_3.2x2.5mm_HandSoldering","Crystal/Crystal_SMD_TXC_9HT11-2Pin_2.0x1.2mm","Crystal/Crystal_SMD_TXC_9HT11-2Pin_2.0x1.2mm_HandSoldering","Crystal/Crystal_SMD_TXC_AX_8045-2Pin_8.0x4.5mm","Crystal/Crystal_SMD_WE_12SMX-4Pin_7.0x5.0mm","Crystal/Crystal_SMD_WE_CFPX-104-4Pin_5.0x3.2mm","Crystal/Crystal_SMD_WE_CFPX-180-4Pin_3.2x2.5mm","Crystal/Crystal_SMD_WE_CFPX-218-4Pin_2.5x2.0mm","Crystal/Crystal_SMD_WE_IQXC-240-4Pin_1.2x1.0mm","Crystal/Crystal_SMD_WE_IQXC-26-4Pin_1.6x1.2mm","Crystal/Crystal_SMD_WE_IQXC-42-4Pin_2.0x1.6mm","Crystal/Resonator-2Pin_W10.0mm_H5.0mm","Crystal/Resonator-2Pin_W6.0mm_H3.0mm","Crystal/Resonator-2Pin_W7.0mm_H2.5mm","Crystal/Resonator-2Pin_W8.0mm_H3.5mm","Crystal/Resonator-3Pin_W10.0mm_H5.0mm","Crystal/Resonator-3Pin_W6.0mm_H3.0mm","Crystal/Resonator-3Pin_W7.0mm_H2.5mm","Crystal/Resonator-3Pin_W8.0mm_H3.5mm","Crystal/Resonator_Murata_CSTLSxxxG-3Pin_W8.0mm_H3.0mm","Crystal/Resonator_Murata_CSTLSxxxX-3Pin_W5.5mm_H3.0mm","Crystal/Resonator_Murata_DSN6-3Pin_W7.0mm_H2.5mm","Crystal/Resonator_Murata_DSS6-3Pin_W7.0mm_H2.5mm","Crystal/Resonator_SMD-3Pin_7.2x3.0mm","Crystal/Resonator_SMD-3Pin_7.2x3.0mm_HandSoldering","Crystal/Resonator_SMD_Murata_CDSCB-2Pin_4.5x2.0mm","Crystal/Resonator_SMD_Murata_CDSCB-2Pin_4.5x2.0mm_HandSoldering","Crystal/Resonator_SMD_Murata_CSTCR_4.5x2x1.15mm","Crystal/Resonator_SMD_Murata_CSTxExxV-3Pin_3.0x1.1mm","Crystal/Resonator_SMD_Murata_CSTxExxV-3Pin_3.0x1.1mm_HandSoldering","Crystal/Resonator_SMD_Murata_SFECV-3Pin_6.9x2.9mm","Crystal/Resonator_SMD_Murata_SFECV-3Pin_6.9x2.9mm_HandSoldering","Crystal/Resonator_SMD_Murata_SFSKA-3Pin_7.9x3.8mm","Crystal/Resonator_SMD_Murata_SFSKA-3Pin_7.9x3.8mm_HandSoldering","Crystal/Resonator_SMD_Murata_TPSKA-3Pin_7.9x3.8mm","Crystal/Resonator_SMD_Murata_TPSKA-3Pin_7.9x3.8mm_HandSoldering","Diode_SMD/D_01005_0402Metric","Diode_SMD/D_01005_0402Metric_Pad0.57x0.30mm_HandSolder","Diode_SMD/D_0201_0603Metric","Diode_SMD/D_0201_0603Metric_Pad0.64x0.40mm_HandSolder","Diode_SMD/D_0402_1005Metric","Diode_SMD/D_0402_1005Metric_Pad0.77x0.64mm_HandSolder","Diode_SMD/D_0603_1608Metric","Diode_SMD/D_0603_1608Metric_Pad1.05x0.95mm_HandSolder","Diode_SMD/D_0805_2012Metric","Diode_SMD/D_0805_2012Metric_Pad1.15x1.40mm_HandSolder","Diode_SMD/D_1206_3216Metric","Diode_SMD/D_1206_3216Metric_Pad1.42x1.75mm_HandSolder","Diode_SMD/D_1210_3225Metric","Diode_SMD/D_1210_3225Metric_Pad1.42x2.65mm_HandSolder","Diode_SMD/D_1812_4532Metric","Diode_SMD/D_1812_4532Metric_Pad1.30x3.40mm_HandSolder","Diode_SMD/D_2010_5025Metric","Diode_SMD/D_2010_5025Metric_Pad1.52x2.65mm_HandSolder","Diode_SMD/D_2114_3652Metric","Diode_SMD/D_2114_3652Metric_Pad1.85x3.75mm_HandSolder","Diode_SMD/D_2512_6332Metric","Diode_SMD/D_2512_6332Metric_Pad1.52x3.35mm_HandSolder","Diode_SMD/D_3220_8050Metric","Diode_SMD/D_3220_8050Metric_Pad2.65x5.15mm_HandSolder","Diode_SMD/D_MELF-RM10_Universal_Handsoldering","Diode_SMD/D_MELF","Diode_SMD/D_MELF_Handsoldering","Diode_SMD/D_MicroMELF","Diode_SMD/D_MicroMELF_Handsoldering","Diode_SMD/D_MicroSMP_LargeAnode","Diode_SMD/D_MicroSMP_LargeCathode","Diode_SMD/D_MiniMELF","Diode_SMD/D_MiniMELF_Handsoldering","Diode_SMD/D_PowerDI-123","Diode_SMD/D_PowerDI-5","Diode_SMD/D_Powermite2_LargeAnode","Diode_SMD/D_Powermite2_LargeCathode","Diode_SMD/D_Powermite3","Diode_SMD/D_Powermite_LargeAnode","Diode_SMD/D_Powermite_LargeCathode","Diode_SMD/D_QFN_3.3x3.3mm_P0.65mm","Diode_SMD/D_SC-80","Diode_SMD/D_SC-80_HandSoldering","Diode_SMD/D_SMA-SMB_Universal_Handsoldering","Diode_SMD/D_SMA","Diode_SMD/D_SMA_Handsoldering","Diode_SMD/D_SMB-SMC_Universal_Handsoldering","Diode_SMD/D_SMB","Diode_SMD/D_SMB_Handsoldering","Diode_SMD/D_SMB_Modified","Diode_SMD/D_SMC-RM10_Universal_Handsoldering","Diode_SMD/D_SMC","Diode_SMD/D_SMC_Handsoldering","Diode_SMD/D_SMF","Diode_SMD/D_SMP_DO-220AA","Diode_SMD/D_SOD-110","Diode_SMD/D_SOD-123","Diode_SMD/D_SOD-123F","Diode_SMD/D_SOD-128","Diode_SMD/D_SOD-323","Diode_SMD/D_SOD-323F","Diode_SMD/D_SOD-323_HandSoldering","Diode_SMD/D_SOD-523","Diode_SMD/D_SOD-882","Diode_SMD/D_SOD-882D","Diode_SMD/D_SOD-923","Diode_SMD/D_TUMD2","Diode_SMD/Diode_Bridge_Bourns_CD-DF4xxS","Diode_SMD/Diode_Bridge_Diotec_ABS","Diode_SMD/Diode_Bridge_Diotec_MicroDil_3.0x3.0x1.8mm","Diode_SMD/Diode_Bridge_Diotec_SO-DIL-Slim","Diode_SMD/Diode_Bridge_OnSemi_SDIP-4L","Diode_SMD/Diode_Bridge_Vishay_DFS","Diode_SMD/Diode_Bridge_Vishay_DFSFlat","Diode_SMD/Diode_Bridge_Vishay_MBLS","Diode_SMD/Infineon_SG-WLL-2-3_0.58x0.28_P0.36mm","Diode_SMD/Littelfuse_PolyZen-LS","Diode_SMD/Nexperia_CFP3_SOD-123W","Diode_SMD/Nexperia_DSN0603-2_0.6x0.3mm_P0.4mm","Diode_SMD/Nexperia_DSN1608-2_1.6x0.8mm","Diode_SMD/ST_D_SMC","Diode_SMD/ST_QFN-2L_1.6x1.0mm","Diode_SMD/Vishay_SMPA","Diode_THT/D_5KPW_P12.70mm_Horizontal","Diode_THT/D_5KPW_P7.62mm_Vertical_AnodeUp","Diode_THT/D_5KPW_P7.62mm_Vertical_CathodeUp","Diode_THT/D_5KP_P10.16mm_Horizontal","Diode_THT/D_5KP_P12.70mm_Horizontal","Diode_THT/D_5KP_P7.62mm_Vertical_AnodeUp","Diode_THT/D_5KP_P7.62mm_Vertical_CathodeUp","Diode_THT/D_5W_P10.16mm_Horizontal","Diode_THT/D_5W_P12.70mm_Horizontal","Diode_THT/D_5W_P5.08mm_Vertical_AnodeUp","Diode_THT/D_5W_P5.08mm_Vertical_CathodeUp","Diode_THT/D_A-405_P10.16mm_Horizontal","Diode_THT/D_A-405_P12.70mm_Horizontal","Diode_THT/D_A-405_P2.54mm_Vertical_AnodeUp","Diode_THT/D_A-405_P2.54mm_Vertical_CathodeUp","Diode_THT/D_A-405_P5.08mm_Vertical_AnodeUp","Diode_THT/D_A-405_P5.08mm_Vertical_CathodeUp","Diode_THT/D_A-405_P7.62mm_Horizontal","Diode_THT/D_DO-15_P10.16mm_Horizontal","Diode_THT/D_DO-15_P12.70mm_Horizontal","Diode_THT/D_DO-15_P15.24mm_Horizontal","Diode_THT/D_DO-15_P2.54mm_Vertical_AnodeUp","Diode_THT/D_DO-15_P2.54mm_Vertical_CathodeUp","Diode_THT/D_DO-15_P3.81mm_Vertical_AnodeUp","Diode_THT/D_DO-15_P3.81mm_Vertical_CathodeUp","Diode_THT/D_DO-15_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-15_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-201AD_P12.70mm_Horizontal","Diode_THT/D_DO-201AD_P15.24mm_Horizontal","Diode_THT/D_DO-201AD_P3.81mm_Vertical_AnodeUp","Diode_THT/D_DO-201AD_P3.81mm_Vertical_CathodeUp","Diode_THT/D_DO-201AD_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-201AD_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-201AE_P12.70mm_Horizontal","Diode_THT/D_DO-201AE_P15.24mm_Horizontal","Diode_THT/D_DO-201AE_P3.81mm_Vertical_AnodeUp","Diode_THT/D_DO-201AE_P3.81mm_Vertical_CathodeUp","Diode_THT/D_DO-201AE_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-201AE_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-201_P12.70mm_Horizontal","Diode_THT/D_DO-201_P15.24mm_Horizontal","Diode_THT/D_DO-201_P3.81mm_Vertical_AnodeUp","Diode_THT/D_DO-201_P3.81mm_Vertical_CathodeUp","Diode_THT/D_DO-201_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-201_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-247_Horizontal_TabDown","Diode_THT/D_DO-247_Horizontal_TabUp","Diode_THT/D_DO-247_Vertical","Diode_THT/D_DO-27_P12.70mm_Horizontal","Diode_THT/D_DO-27_P15.24mm_Horizontal","Diode_THT/D_DO-27_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-27_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-34_SOD68_P10.16mm_Horizontal","Diode_THT/D_DO-34_SOD68_P12.70mm_Horizontal","Diode_THT/D_DO-34_SOD68_P2.54mm_Vertical_AnodeUp","Diode_THT/D_DO-34_SOD68_P2.54mm_Vertical_CathodeUp","Diode_THT/D_DO-34_SOD68_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-34_SOD68_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-34_SOD68_P7.62mm_Horizontal","Diode_THT/D_DO-35_SOD27_P10.16mm_Horizontal","Diode_THT/D_DO-35_SOD27_P12.70mm_Horizontal","Diode_THT/D_DO-35_SOD27_P2.54mm_Vertical_AnodeUp","Diode_THT/D_DO-35_SOD27_P2.54mm_Vertical_CathodeUp","Diode_THT/D_DO-35_SOD27_P3.81mm_Vertical_AnodeUp","Diode_THT/D_DO-35_SOD27_P3.81mm_Vertical_CathodeUp","Diode_THT/D_DO-35_SOD27_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-35_SOD27_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-35_SOD27_P7.62mm_Horizontal","Diode_THT/D_DO-41_SOD81_P10.16mm_Horizontal","Diode_THT/D_DO-41_SOD81_P12.70mm_Horizontal","Diode_THT/D_DO-41_SOD81_P2.54mm_Vertical_AnodeUp","Diode_THT/D_DO-41_SOD81_P2.54mm_Vertical_CathodeUp","Diode_THT/D_DO-41_SOD81_P3.81mm_Vertical_AnodeUp","Diode_THT/D_DO-41_SOD81_P3.81mm_Vertical_CathodeUp","Diode_THT/D_DO-41_SOD81_P5.08mm_Vertical_AnodeUp","Diode_THT/D_DO-41_SOD81_P5.08mm_Vertical_CathodeUp","Diode_THT/D_DO-41_SOD81_P7.62mm_Horizontal","Diode_THT/D_P600_R-6_P12.70mm_Horizontal","Diode_THT/D_P600_R-6_P20.00mm_Horizontal","Diode_THT/D_P600_R-6_P7.62mm_Vertical_AnodeUp","Diode_THT/D_P600_R-6_P7.62mm_Vertical_CathodeUp","Diode_THT/D_T-1_P10.16mm_Horizontal","Diode_THT/D_T-1_P12.70mm_Horizontal","Diode_THT/D_T-1_P2.54mm_Vertical_AnodeUp","Diode_THT/D_T-1_P2.54mm_Vertical_CathodeUp","Diode_THT/D_T-1_P5.08mm_Horizontal","Diode_THT/Diode_Bridge_15.1x15.1x6.3mm_P10.9mm","Diode_THT/Diode_Bridge_15.2x15.2x6.3mm_P10.9mm","Diode_THT/Diode_Bridge_15.7x15.7x6.3mm_P10.8mm","Diode_THT/Diode_Bridge_16.7x16.7x6.3mm_P10.8mm","Diode_THT/Diode_Bridge_19.0x19.0x6.8mm_P12.7mm","Diode_THT/Diode_Bridge_19.0x3.5x10.0mm_P5.0mm","Diode_THT/Diode_Bridge_28.6x28.6x7.3mm_P18.0mm_P11.6mm","Diode_THT/Diode_Bridge_32.0x5.6x17.0mm_P10.0mm_P7.5mm","Diode_THT/Diode_Bridge_Comchip_SCVB-L","Diode_THT/Diode_Bridge_DIGITRON_KBPC_T","Diode_THT/Diode_Bridge_DIP-4_W5.08mm_P2.54mm","Diode_THT/Diode_Bridge_DIP-4_W7.62mm_P5.08mm","Diode_THT/Diode_Bridge_GeneSiC_KBPC_T","Diode_THT/Diode_Bridge_GeneSiC_KBPC_W","Diode_THT/Diode_Bridge_IXYS_GUFP","Diode_THT/Diode_Bridge_Round_D8.9mm","Diode_THT/Diode_Bridge_Round_D9.0mm","Diode_THT/Diode_Bridge_Round_D9.8mm","Diode_THT/Diode_Bridge_Vishay_GBL","Diode_THT/Diode_Bridge_Vishay_GBU","Diode_THT/Diode_Bridge_Vishay_KBL","Diode_THT/Diode_Bridge_Vishay_KBPC1","Diode_THT/Diode_Bridge_Vishay_KBPC6","Diode_THT/Diode_Bridge_Vishay_KBPM","Diode_THT/Diode_Bridge_Vishay_KBU","Display/AG12864E","Display/Adafruit_SSD1306","Display/Adafruit_SSD1306_No_Mounting_Holes","Display/CR2013-MI2120","Display/DL1416","Display/EA-eDIP128B-XXX","Display/EA_DOGL128-6","Display/EA_DOGM128-6","Display/EA_DOGS104X-A","Display/EA_DOGXL160-7","Display/EA_DOGXL160-7_Backlight","Display/EA_T123X-I2C","Display/EA_eDIP160-XXX","Display/EA_eDIP240-XXX","Display/EA_eDIP320X-XXX","Display/EA_eDIPTFT32-XXX","Display/EA_eDIPTFT43-ATC","Display/EA_eDIPTFT43-XXX","Display/EA_eDIPTFT57-XXX","Display/EA_eDIPTFT70-ATC","Display/EA_eDIPTFT70-XXX","Display/ER-OLED0.42-1W_Folded","Display/ERM19264","Display/ER_OLEDM0.91_1x-I2C","Display/HDSM-441B_HDSM-443B","Display/HDSM-541B_HDSM-543B","Display/HDSP-4830","Display/HDSP-4832","Display/HDSP-4836","Display/HDSP-4840","Display/HDSP-4850","Display/HDSP-48xx","Display/HLCP-J100","Display/HY1602E","Display/LCD-016N002L","Display/LM16255","Display/NHD-0420H1Z","Display/NHD-C0220BiZ-FSRGB","Display/NHD-C0220BiZ","Display/NHD-C12832A1Z-FSRGB","Display/Noritake_CU20025-Ux1J","Display/OLED-128O064D","Display/RC1602A","Display/WC1602A","Display_7Segment/7SEGMENT-LED__HDSM531_HDSM533_SMD","Display_7Segment/7SegmentLED_LTS6760_LTS6780","Display_7Segment/AD-121F2","Display_7Segment/AFF_2x7SEG-DIGIT_10mm","Display_7Segment/CA56-12CGKWA","Display_7Segment/CA56-12EWA","Display_7Segment/CA56-12SEKWA","Display_7Segment/CA56-12SRWA","Display_7Segment/CA56-12SURKWA","Display_7Segment/CA56-12SYKWA","Display_7Segment/CC56-12GWA","Display_7Segment/CC56-12YWA","Display_7Segment/D1X8K","Display_7Segment/DA04-11CGKWA","Display_7Segment/DA04-11SEKWA","Display_7Segment/DA04-11SURKWA","Display_7Segment/DA04-11SYKWA","Display_7Segment/DA56-11CGKWA","Display_7Segment/DA56-11SEKWA","Display_7Segment/DA56-11SURKWA","Display_7Segment/DA56-11SYKWA","Display_7Segment/DE113-XX-XX","Display_7Segment/DE114-RS-20","Display_7Segment/DE119-XX-XX","Display_7Segment/DE122-XX-XX","Display_7Segment/DE152-XX-XX","Display_7Segment/DE170-XX-XX","Display_7Segment/ELD_426XXXX","Display_7Segment/HDSP-7401","Display_7Segment/HDSP-7507","Display_7Segment/HDSP-7801","Display_7Segment/HDSP-7807","Display_7Segment/HDSP-A151","Display_7Segment/HDSP-A401","Display_7Segment/KCSC02-105","Display_7Segment/KCSC02-106","Display_7Segment/KCSC02-107","Display_7Segment/KCSC02-123","Display_7Segment/KCSC02-136","Display_7Segment/LTC-4627Jx","Display_7Segment/MAN3410A","Display_7Segment/MAN3420A","Display_7Segment/MAN3610A","Display_7Segment/MAN3620A","Display_7Segment/MAN3630A","Display_7Segment/MAN3810A","Display_7Segment/MAN3820A","Display_7Segment/MAN71A","Display_7Segment/MAN72A","Display_7Segment/MAN73A","Display_7Segment/SA15-11xxx","Display_7Segment/SBC18-11SURKCGKWA","Display_7Segment/Sx39-1xxxxx","Ferrite_THT/LairdTech_28C0236-0JW-10","Fiducial/Fiducial_0.5mm_Mask1.5mm","Fiducial/Fiducial_0.5mm_Mask1mm","Fiducial/Fiducial_0.5mm_Mask2mm","Fiducial/Fiducial_0.75mm_Mask1.5mm","Fiducial/Fiducial_0.75mm_Mask2.25mm","Fiducial/Fiducial_1.5mm_Mask3mm","Fiducial/Fiducial_1.5mm_Mask4.5mm","Fiducial/Fiducial_1mm_Mask2mm","Fiducial/Fiducial_1mm_Mask3mm","Fiducial/Fiducial_Cross_1.5mm_Mask2mm","Filter/Filter_1109-5_1.1x0.9mm","Filter/Filter_1411-5_1.4x1.1mm","Filter/Filter_Bourns_SRF0905_6.0x9.2mm","Filter/Filter_FILTERCON_1FPxx","Filter/Filter_KEMET_PZB300_24.0x12.5mm_P10.0mm","Filter/Filter_Mini-Circuits_FV1206-1","Filter/Filter_Mini-Circuits_FV1206-4","Filter/Filter_Mini-Circuits_FV1206-5","Filter/Filter_Mini-Circuits_FV1206-6","Filter/Filter_Mini-Circuits_FV1206-7","Filter/Filter_Mini-Circuits_FV1206","Filter/Filter_Murata_BNX025","Filter/Filter_Murata_BNX025_ThermalVias","Filter/Filter_Murata_SFECF-6","Filter/Filter_Murata_SFECF-6_HandSoldering","Filter/Filter_SAW-6_3.8x3.8mm","Filter/Filter_SAW-8_3.8x3.8mm","Filter/Filter_SAW_Epcos_DCC6C_3x3mm","Filter/Filter_Schaffner_FN405","Filter/Filter_Schaffner_FN406","Fuse/FuseHolder_Blade_ATO_Littelfuse_FLR_178.6165","Fuse/Fuse_0402_1005Metric","Fuse/Fuse_0402_1005Metric_Pad0.77x0.64mm_HandSolder","Fuse/Fuse_0603_1608Metric","Fuse/Fuse_0603_1608Metric_Pad1.05x0.95mm_HandSolder","Fuse/Fuse_0805_2012Metric","Fuse/Fuse_0805_2012Metric_Pad1.15x1.40mm_HandSolder","Fuse/Fuse_1206_3216Metric","Fuse/Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder","Fuse/Fuse_1210_3225Metric","Fuse/Fuse_1210_3225Metric_Pad1.42x2.65mm_HandSolder","Fuse/Fuse_1812_4532Metric","Fuse/Fuse_1812_4532Metric_Pad1.30x3.40mm_HandSolder","Fuse/Fuse_2010_5025Metric","Fuse/Fuse_2010_5025Metric_Pad1.52x2.65mm_HandSolder","Fuse/Fuse_2512_6332Metric","Fuse/Fuse_2512_6332Metric_Pad1.52x3.35mm_HandSolder","Fuse/Fuse_2920_7451Metric","Fuse/Fuse_2920_7451Metric_Pad2.10x5.45mm_HandSolder","Fuse/Fuse_BelFuse_0ZRE0005FF_L8.3mm_W3.8mm","Fuse/Fuse_BelFuse_0ZRE0008FF_L8.3mm_W3.8mm","Fuse/Fuse_BelFuse_0ZRE0012FF_L8.3mm_W3.8mm","Fuse/Fuse_BelFuse_0ZRE0016FF_L9.9mm_W3.8mm","Fuse/Fuse_BelFuse_0ZRE0025FF_L9.6mm_W3.8mm","Fuse/Fuse_BelFuse_0ZRE0033FF_L11.4mm_W3.8mm","Fuse/Fuse_BelFuse_0ZRE0040FF_L11.5mm_W3.8mm","Fuse/Fuse_BelFuse_0ZRE0055FF_L14.0mm_W4.1mm","Fuse/Fuse_BelFuse_0ZRE0075FF_L11.5mm_W4.8mm","Fuse/Fuse_BelFuse_0ZRE0100FF_L18.7mm_W5.1mm","Fuse/Fuse_BelFuse_0ZRE0125FF_L21.2mm_W5.3mm","Fuse/Fuse_BelFuse_0ZRE0150FF_L23.4mm_W5.3mm","Fuse/Fuse_BelFuse_0ZRE0200FF_L24.9mm_W6.1mm","Fuse/Fuse_Blade_ATO_directSolder","Fuse/Fuse_Blade_Mini_directSolder","Fuse/Fuse_Bourns_MF-RG1000","Fuse/Fuse_Bourns_MF-RG1100","Fuse/Fuse_Bourns_MF-RG300","Fuse/Fuse_Bourns_MF-RG400","Fuse/Fuse_Bourns_MF-RG500","Fuse/Fuse_Bourns_MF-RG600","Fuse/Fuse_Bourns_MF-RG650","Fuse/Fuse_Bourns_MF-RG700","Fuse/Fuse_Bourns_MF-RG800","Fuse/Fuse_Bourns_MF-RG900","Fuse/Fuse_Bourns_MF-RHT050","Fuse/Fuse_Bourns_MF-RHT070","Fuse/Fuse_Bourns_MF-RHT100","Fuse/Fuse_Bourns_MF-RHT1000","Fuse/Fuse_Bourns_MF-RHT1100","Fuse/Fuse_Bourns_MF-RHT1300","Fuse/Fuse_Bourns_MF-RHT200","Fuse/Fuse_Bourns_MF-RHT300","Fuse/Fuse_Bourns_MF-RHT400","Fuse/Fuse_Bourns_MF-RHT500","Fuse/Fuse_Bourns_MF-RHT550","Fuse/Fuse_Bourns_MF-RHT600","Fuse/Fuse_Bourns_MF-RHT650","Fuse/Fuse_Bourns_MF-RHT700","Fuse/Fuse_Bourns_MF-RHT750","Fuse/Fuse_Bourns_MF-RHT800","Fuse/Fuse_Bourns_MF-RHT900","Fuse/Fuse_Bourns_MF-SM_7.98x5.44mm","Fuse/Fuse_Bourns_MF-SM_9.5x6.71mm","Fuse/Fuse_Bourns_TBU-CA","Fuse/Fuse_Littelfuse-LVR100","Fuse/Fuse_Littelfuse-LVR125","Fuse/Fuse_Littelfuse-LVR200","Fuse/Fuse_Littelfuse-NANO2-451_453","Fuse/Fuse_Littelfuse-NANO2-462","Fuse/Fuse_Littelfuse-NANO2-885","Fuse/Fuse_Littelfuse_372_D8.50mm","Fuse/Fuse_Littelfuse_395Series","Fuse/Fuse_Schurter_UMT250","Fuse/Fuse_Schurter_UMZ250","Fuse/Fuse_SunFuse-6HP","Fuse/Fuseholder_Blade_ATO_Littelfuse_Pudenz_2_Pin","Fuse/Fuseholder_Blade_Mini_Keystone_3568","Fuse/Fuseholder_Clip-5x20mm_Bel_FC-203-22_Lateral_P17.80x5.00mm_D1.17mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Eaton_1A5601-01_Inline_P20.80x6.76mm_D1.70mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Keystone_3512P_Inline_P23.62x7.27mm_D1.02x2.41x1.02x1.57mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Keystone_3512_Inline_P23.62x7.27mm_D1.02x1.57mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Keystone_3517_Inline_P23.11x6.76mm_D1.70mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Keystone_3518P_Inline_P23.11x6.76mm_D2.44x1.70mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Littelfuse_100_Inline_P20.50x4.60mm_D1.30mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Littelfuse_111_Inline_P20.00x5.00mm_D1.05mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Littelfuse_111_Lateral_P18.80x5.00mm_D1.17mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Littelfuse_445-030_Inline_P20.50x5.20mm_D1.30mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Littelfuse_519_Inline_P20.60x5.00mm_D1.00mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Littelfuse_520_Inline_P20.50x5.80mm_D1.30mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Littelfuse_521_Lateral_P17.00x5.00mm_D1.30mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Schurter_CQM_Inline_P20.60x5.00mm_D1.00mm_Horizontal","Fuse/Fuseholder_Clip-5x20mm_Schurter_OG_Lateral_P15.00x5.00mm_D1.3mm_Horizontal","Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_102071_Inline_P34.70x7.60mm_D2.00mm_Horizontal","Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_102_122_Inline_P34.21x7.62mm_D1.98mm_Horizontal","Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_102_Inline_P34.21x7.62mm_D2.54mm_Horizontal","Fuse/Fuseholder_Clip-6.3x32mm_Littelfuse_122_Inline_P34.21x7.62mm_D2.54mm_Horizontal","Fuse/Fuseholder_Cylinder-5x20mm_Bulgin_FX0456_Vertical_Closed","Fuse/Fuseholder_Cylinder-5x20mm_Bulgin_FX0457_Horizontal_Closed","Fuse/Fuseholder_Cylinder-5x20mm_EATON_H15-V-1_Vertical_Closed","Fuse/Fuseholder_Cylinder-5x20mm_EATON_HBV_Vertical_Closed","Fuse/Fuseholder_Cylinder-5x20mm_EATON_HBW_Vertical_Closed","Fuse/Fuseholder_Cylinder-5x20mm_Schurter_0031_8201_Horizontal_Open","Fuse/Fuseholder_Cylinder-5x20mm_Schurter_FAB_0031-355x_Horizontal_Closed","Fuse/Fuseholder_Cylinder-5x20mm_Schurter_FPG4_Vertical_Closed","Fuse/Fuseholder_Cylinder-5x20mm_Schurter_FUP_0031.2510_Horizontal_Closed","Fuse/Fuseholder_Cylinder-5x20mm_Schurter_OGN-SMD_Horizontal_Open","Fuse/Fuseholder_Cylinder-5x20mm_Stelvio-Kontek_PTF78_Horizontal_Open","Fuse/Fuseholder_Cylinder-5x20mm_Wuerth_696103101002-SMD_Horizontal_Open","Fuse/Fuseholder_Cylinder-6.3x32mm_Schurter_0031-8002_Horizontal_Open","Fuse/Fuseholder_Cylinder-6.3x32mm_Schurter_FUP_0031.2520_Horizontal_Closed","Fuse/Fuseholder_Keystone_3555-2","Fuse/Fuseholder_Littelfuse_100_series_5x20mm","Fuse/Fuseholder_Littelfuse_100_series_5x25mm","Fuse/Fuseholder_Littelfuse_100_series_5x30mm","Fuse/Fuseholder_Littelfuse_445_030_series_5x20mm","Fuse/Fuseholder_Littelfuse_445_030_series_5x25mm","Fuse/Fuseholder_Littelfuse_445_030_series_5x30mm","Fuse/Fuseholder_Littelfuse_Nano2_154x","Fuse/Fuseholder_Littelfuse_Nano2_157x","Fuse/Fuseholder_TR5_Littelfuse_No560_No460","Fuse/GDT_Bourns_2038","Fuse/GDT_Yageo_3RxxxxL-6","Fuse/GDT_Yageo_3RxxxxM-6","Heatsink/Heatsink_125x35x50mm_3xFixationM3","Heatsink/Heatsink_35x26mm_1xFixation3mm_Fischer-SK486-35","Heatsink/Heatsink_38x38mm_SpringFixation","Heatsink/Heatsink_62x40mm_2xFixation3mm","Heatsink/Heatsink_AAVID_573300D00010G_TO-263","Heatsink/Heatsink_AAVID_576802B03900G","Heatsink/Heatsink_AAVID_590302B03600G","Heatsink/Heatsink_AAVID_Extruded_531002B00000G_34.9x12.7mm_H25.4mm","Heatsink/Heatsink_AAVID_Extruded_531002B02100G_34.9x12.7mm_H25.4mm","Heatsink/Heatsink_AAVID_Extruded_531002B02500G_34.9x12.7mm_H25.4mm","Heatsink/Heatsink_AAVID_Extruded_531102B00000G_34.9x12.7mm_H38.1mm","Heatsink/Heatsink_AAVID_Extruded_531102B02100G_34.9x12.7mm_H38.1mm","Heatsink/Heatsink_AAVID_Extruded_531102B02500G_34.9x12.7mm_H38.1mm","Heatsink/Heatsink_AAVID_Extruded_531102V02500G_34.9x12.7mm_H38.1mm","Heatsink/Heatsink_AAVID_Extruded_531202B00000G_34.9x12.7mm_H50.8mm","Heatsink/Heatsink_AAVID_Extruded_531202B02100G_34.9x12.7mm_H50.8mm","Heatsink/Heatsink_AAVID_Extruded_531202B02500G_34.9x12.7mm_H50.8mm","Heatsink/Heatsink_AAVID_Extruded_531302B02500G_34.9x12.7mm_H63.5mm","Heatsink/Heatsink_AAVID_TV5G_TO220_Horizontal","Heatsink/Heatsink_Fischer_FK224xx2201_25x8.3mm","Heatsink/Heatsink_Fischer_FK24413D2PAK_26x13mm","Heatsink/Heatsink_Fischer_FK24413DPAK_23x13mm","Heatsink/Heatsink_Fischer_SK104-STC-STIC_35x13mm_2xDrill2.5mm","Heatsink/Heatsink_Fischer_SK104-STCB_35x13mm__2xDrill3.5mm_ScrewM3","Heatsink/Heatsink_Fischer_SK129-STS_42x25mm_2xDrill2.5mm","Heatsink/Heatsink_SheetType_50x7mm_2Fixations","Heatsink/Heatsink_Stonecold_HS-130_30x12mm_2xFixation2.5mm","Heatsink/Heatsink_Stonecold_HS-132_32x14mm_2xFixation1.5mm","Heatsink/Heatsink_Stonecold_HS-S01_13.21x6.35mm","Heatsink/Heatsink_Stonecold_HS-S02_13.21x9.53mm","Heatsink/Heatsink_Stonecold_HS-S03_13.21x12.7mm","Inductor_SMD/L_01005_0402Metric","Inductor_SMD/L_01005_0402Metric_Pad0.57x0.30mm_HandSolder","Inductor_SMD/L_0201_0603Metric","Inductor_SMD/L_0201_0603Metric_Pad0.64x0.40mm_HandSolder","Inductor_SMD/L_0402_1005Metric","Inductor_SMD/L_0402_1005Metric_Pad0.77x0.64mm_HandSolder","Inductor_SMD/L_0603_1608Metric","Inductor_SMD/L_0603_1608Metric_Pad1.05x0.95mm_HandSolder","Inductor_SMD/L_0805_2012Metric","Inductor_SMD/L_0805_2012Metric_Pad1.05x1.20mm_HandSolder","Inductor_SMD/L_10.4x10.4_H4.8","Inductor_SMD/L_1008_2520Metric","Inductor_SMD/L_1008_2520Metric_Pad1.43x2.20mm_HandSolder","Inductor_SMD/L_1206_3216Metric","Inductor_SMD/L_1206_3216Metric_Pad1.22x1.90mm_HandSolder","Inductor_SMD/L_1210_3225Metric","Inductor_SMD/L_1210_3225Metric_Pad1.42x2.65mm_HandSolder","Inductor_SMD/L_12x12mm_H4.5mm","Inductor_SMD/L_12x12mm_H6mm","Inductor_SMD/L_12x12mm_H8mm","Inductor_SMD/L_1806_4516Metric","Inductor_SMD/L_1806_4516Metric_Pad1.45x1.90mm_HandSolder","Inductor_SMD/L_1812_4532Metric","Inductor_SMD/L_1812_4532Metric_Pad1.30x3.40mm_HandSolder","Inductor_SMD/L_2010_5025Metric","Inductor_SMD/L_2010_5025Metric_Pad1.52x2.65mm_HandSolder","Inductor_SMD/L_2512_6332Metric","Inductor_SMD/L_2512_6332Metric_Pad1.52x3.35mm_HandSolder","Inductor_SMD/L_6.3x6.3_H3","Inductor_SMD/L_7.3x7.3_H3.5","Inductor_SMD/L_7.3x7.3_H4.5","Inductor_SMD/L_APV_ANR252010","Inductor_SMD/L_APV_ANR252012","Inductor_SMD/L_APV_ANR3010","Inductor_SMD/L_APV_ANR3012","Inductor_SMD/L_APV_ANR3015","Inductor_SMD/L_APV_ANR4010","Inductor_SMD/L_APV_ANR4012","Inductor_SMD/L_APV_ANR4018","Inductor_SMD/L_APV_ANR4020","Inductor_SMD/L_APV_ANR4026","Inductor_SMD/L_APV_ANR4030","Inductor_SMD/L_APV_ANR5012","Inductor_SMD/L_APV_ANR5020","Inductor_SMD/L_APV_ANR5040","Inductor_SMD/L_APV_ANR5045","Inductor_SMD/L_APV_ANR6020","Inductor_SMD/L_APV_ANR6028","Inductor_SMD/L_APV_ANR6045","Inductor_SMD/L_APV_ANR8040","Inductor_SMD/L_APV_ANR8065","Inductor_SMD/L_APV_APH0412","Inductor_SMD/L_APV_APH0420","Inductor_SMD/L_APV_APH0518","Inductor_SMD/L_APV_APH0530","Inductor_SMD/L_APV_APH0615","Inductor_SMD/L_APV_APH0618","Inductor_SMD/L_APV_APH0620","Inductor_SMD/L_APV_APH0624","Inductor_SMD/L_APV_APH0630","Inductor_SMD/L_APV_APH0640","Inductor_SMD/L_APV_APH0650","Inductor_SMD/L_APV_APH0840","Inductor_SMD/L_APV_APH0850","Inductor_SMD/L_APV_APH1030","Inductor_SMD/L_APV_APH1040","Inductor_SMD/L_APV_APH1050","Inductor_SMD/L_APV_APH1240","Inductor_SMD/L_APV_APH1250","Inductor_SMD/L_APV_APH1260","Inductor_SMD/L_APV_APH1265","Inductor_SMD/L_APV_APH1770","Inductor_SMD/L_APV_APH2213","Inductor_SMD/L_AVX_LMLP07A7","Inductor_SMD/L_Abracon_ASPI-0425","Inductor_SMD/L_Abracon_ASPI-0630LR","Inductor_SMD/L_Abracon_ASPI-3012S","Inductor_SMD/L_Abracon_ASPI-4030S","Inductor_SMD/L_Abracon_ASPIAIG-F4020","Inductor_SMD/L_Bourns-SRN1060","Inductor_SMD/L_Bourns-SRN4018","Inductor_SMD/L_Bourns-SRN6028","Inductor_SMD/L_Bourns-SRN8040_8x8.15mm","Inductor_SMD/L_Bourns-SRR1005","Inductor_SMD/L_Bourns-SRU1028_10.0x10.0mm","Inductor_SMD/L_Bourns-SRU8028_8.0x8.0mm","Inductor_SMD/L_Bourns-SRU8043","Inductor_SMD/L_Bourns_SDR0604","Inductor_SMD/L_Bourns_SDR1806","Inductor_SMD/L_Bourns_SRF1260","Inductor_SMD/L_Bourns_SRN6045TA","Inductor_SMD/L_Bourns_SRN8040TA","Inductor_SMD/L_Bourns_SRP1038C_10.0x10.0mm","Inductor_SMD/L_Bourns_SRP1050WA","Inductor_SMD/L_Bourns_SRP1245A","Inductor_SMD/L_Bourns_SRP1770TA_16.9x16.9mm","Inductor_SMD/L_Bourns_SRP2313AA","Inductor_SMD/L_Bourns_SRP5030T","Inductor_SMD/L_Bourns_SRP6060FA","Inductor_SMD/L_Bourns_SRP7028A_7.3x6.6mm","Inductor_SMD/L_Bourns_SRR1208_12.7x12.7mm","Inductor_SMD/L_Bourns_SRR1210A","Inductor_SMD/L_Bourns_SRR1260","Inductor_SMD/L_Bourns_SRU5016_5.2x5.2mm","Inductor_SMD/L_Cenker_CKCS201610","Inductor_SMD/L_Cenker_CKCS252010","Inductor_SMD/L_Cenker_CKCS252012","Inductor_SMD/L_Cenker_CKCS3012","Inductor_SMD/L_Cenker_CKCS3015","Inductor_SMD/L_Cenker_CKCS4018","Inductor_SMD/L_Cenker_CKCS4020","Inductor_SMD/L_Cenker_CKCS4030","Inductor_SMD/L_Cenker_CKCS5020","Inductor_SMD/L_Cenker_CKCS5040","Inductor_SMD/L_Cenker_CKCS6020","Inductor_SMD/L_Cenker_CKCS6028","Inductor_SMD/L_Cenker_CKCS6045","Inductor_SMD/L_Cenker_CKCS8040","Inductor_SMD/L_Cenker_CKCS8060","Inductor_SMD/L_Cenker_CKCS8080","Inductor_SMD/L_Changjiang_FNR252010S","Inductor_SMD/L_Changjiang_FNR252012S","Inductor_SMD/L_Changjiang_FNR3010S","Inductor_SMD/L_Changjiang_FNR3012S","Inductor_SMD/L_Changjiang_FNR3015S","Inductor_SMD/L_Changjiang_FNR3021S","Inductor_SMD/L_Changjiang_FNR4010S","Inductor_SMD/L_Changjiang_FNR4012S","Inductor_SMD/L_Changjiang_FNR4015S","Inductor_SMD/L_Changjiang_FNR4018S","Inductor_SMD/L_Changjiang_FNR4020S","Inductor_SMD/L_Changjiang_FNR4026S","Inductor_SMD/L_Changjiang_FNR4030S","Inductor_SMD/L_Changjiang_FNR5012S","Inductor_SMD/L_Changjiang_FNR5015S","Inductor_SMD/L_Changjiang_FNR5020S","Inductor_SMD/L_Changjiang_FNR5030S","Inductor_SMD/L_Changjiang_FNR5040S","Inductor_SMD/L_Changjiang_FNR5045S","Inductor_SMD/L_Changjiang_FNR6020S","Inductor_SMD/L_Changjiang_FNR6028S","Inductor_SMD/L_Changjiang_FNR6040S","Inductor_SMD/L_Changjiang_FNR6045S","Inductor_SMD/L_Changjiang_FNR8040S","Inductor_SMD/L_Changjiang_FNR8050S","Inductor_SMD/L_Changjiang_FNR8065S","Inductor_SMD/L_Changjiang_FTC100765D","Inductor_SMD/L_Changjiang_FTC121065S","Inductor_SMD/L_Changjiang_FTC141207S","Inductor_SMD/L_Changjiang_FTC141208S","Inductor_SMD/L_Changjiang_FTC141265S","Inductor_SMD/L_Changjiang_FTC160808S","Inductor_SMD/L_Changjiang_FTC160865S","Inductor_SMD/L_Changjiang_FTC201208S","Inductor_SMD/L_Changjiang_FTC201210S","Inductor_SMD/L_Changjiang_FTC201212S","Inductor_SMD/L_Changjiang_FTC201265S","Inductor_SMD/L_Changjiang_FTC201607S","Inductor_SMD/L_Changjiang_FTC201608S","Inductor_SMD/L_Changjiang_FTC201610D","Inductor_SMD/L_Changjiang_FTC201610S","Inductor_SMD/L_Changjiang_FTC201612S","Inductor_SMD/L_Changjiang_FTC201655S","Inductor_SMD/L_Changjiang_FTC201665S","Inductor_SMD/L_Changjiang_FTC252008S","Inductor_SMD/L_Changjiang_FTC252010S","Inductor_SMD/L_Changjiang_FTC252012S","Inductor_SMD/L_Changjiang_FTC252075S","Inductor_SMD/L_Changjiang_FTC303010D","Inductor_SMD/L_Changjiang_FTC303012D","Inductor_SMD/L_Changjiang_FTC303015D","Inductor_SMD/L_Changjiang_FTC303018D","Inductor_SMD/L_Changjiang_FTC303020D","Inductor_SMD/L_Changjiang_FTC322510S","Inductor_SMD/L_Changjiang_FTC322512S","Inductor_SMD/L_Changjiang_FTC322520S","Inductor_SMD/L_Changjiang_FTC404010S","Inductor_SMD/L_Changjiang_FTC404012S","Inductor_SMD/L_Changjiang_FTC404020S","Inductor_SMD/L_Changjiang_FTC404030S","Inductor_SMD/L_Changjiang_FXL0412","Inductor_SMD/L_Changjiang_FXL0420","Inductor_SMD/L_Changjiang_FXL0518","Inductor_SMD/L_Changjiang_FXL0530","Inductor_SMD/L_Changjiang_FXL0615","Inductor_SMD/L_Changjiang_FXL0618","Inductor_SMD/L_Changjiang_FXL0624","Inductor_SMD/L_Changjiang_FXL0630","Inductor_SMD/L_Changjiang_FXL0640","Inductor_SMD/L_Changjiang_FXL0650","Inductor_SMD/L_Changjiang_FXL0840","Inductor_SMD/L_Changjiang_FXL1030","Inductor_SMD/L_Changjiang_FXL1040","Inductor_SMD/L_Changjiang_FXL1050","Inductor_SMD/L_Changjiang_FXL1340","Inductor_SMD/L_Changjiang_FXL1350","Inductor_SMD/L_Changjiang_FXL1360","Inductor_SMD/L_Changjiang_FXL1365","Inductor_SMD/L_Changjiang_FXL1770","Inductor_SMD/L_Changjiang_FXL2213","Inductor_SMD/L_Chilisin_BMRA00040415","Inductor_SMD/L_Chilisin_BMRA00040420","Inductor_SMD/L_Chilisin_BMRA00050520","Inductor_SMD/L_Chilisin_BMRA00050530","Inductor_SMD/L_Chilisin_BMRB00050512","Inductor_SMD/L_Chilisin_BMRB00050518-B","Inductor_SMD/L_Chilisin_BMRB00050518","Inductor_SMD/L_Chilisin_BMRB00060612","Inductor_SMD/L_Chilisin_BMRB00060618","Inductor_SMD/L_Chilisin_BMRB00060624","Inductor_SMD/L_Chilisin_BMRB00060650","Inductor_SMD/L_Chilisin_BMRF00101040","Inductor_SMD/L_Chilisin_BMRF00131350","Inductor_SMD/L_Chilisin_BMRF00131360","Inductor_SMD/L_Chilisin_BMRF00171770","Inductor_SMD/L_Chilisin_BMRG00101030","Inductor_SMD/L_Chilisin_BMRG00131360","Inductor_SMD/L_Chilisin_BMRx00040412","Inductor_SMD/L_Chilisin_BMRx00050512-B","Inductor_SMD/L_Chilisin_BMRx00050515","Inductor_SMD/L_Chilisin_BMRx00060615","Inductor_SMD/L_Chilisin_BMRx00060630","Inductor_SMD/L_Chilisin_BWVS00322515","Inductor_SMD/L_Chilisin_BWVS00404012","Inductor_SMD/L_Chilisin_BWVS00404018","Inductor_SMD/L_Chilisin_BWVS00404026","Inductor_SMD/L_Chilisin_BWVS00505020","Inductor_SMD/L_Chilisin_BWVS00505030","Inductor_SMD/L_Chilisin_BWVS00505040","Inductor_SMD/L_Chilisin_BWVS00606020","Inductor_SMD/L_Chilisin_BWVS00606028","Inductor_SMD/L_Chilisin_BWVS00606045","Inductor_SMD/L_Chilisin_BWVS00808040","Inductor_SMD/L_Coilcraft_0403HQ_1008Metric","Inductor_SMD/L_Coilcraft_0604HQ_1610Metric","Inductor_SMD/L_Coilcraft_0805HQ_2012Metric","Inductor_SMD/L_Coilcraft_1008HQ_2520Metric","Inductor_SMD/L_Coilcraft_1008HQ_2520Metric_LowProfile","Inductor_SMD/L_Coilcraft_1515SQ-47N","Inductor_SMD/L_Coilcraft_1515SQ-68N","Inductor_SMD/L_Coilcraft_1515SQ-82N","Inductor_SMD/L_Coilcraft_2222SQ-111","Inductor_SMD/L_Coilcraft_2222SQ-131","Inductor_SMD/L_Coilcraft_2222SQ-161","Inductor_SMD/L_Coilcraft_2222SQ-181","Inductor_SMD/L_Coilcraft_2222SQ-221","Inductor_SMD/L_Coilcraft_2222SQ-271","Inductor_SMD/L_Coilcraft_2222SQ-301","Inductor_SMD/L_Coilcraft_2222SQ-90N","Inductor_SMD/L_Coilcraft_2929SQ-331","Inductor_SMD/L_Coilcraft_2929SQ-361","Inductor_SMD/L_Coilcraft_2929SQ-391","Inductor_SMD/L_Coilcraft_2929SQ-431","Inductor_SMD/L_Coilcraft_2929SQ-501","Inductor_SMD/L_Coilcraft_LPS3010","Inductor_SMD/L_Coilcraft_LPS3314","Inductor_SMD/L_Coilcraft_LPS4018","Inductor_SMD/L_Coilcraft_LPS4414","Inductor_SMD/L_Coilcraft_LPS5030","Inductor_SMD/L_Coilcraft_MOS6020-XXX","Inductor_SMD/L_Coilcraft_MSS1038-XXX","Inductor_SMD/L_Coilcraft_MSS1038T-XXX","Inductor_SMD/L_Coilcraft_MSS1048-XXX","Inductor_SMD/L_Coilcraft_MSS1048T-XXX","Inductor_SMD/L_Coilcraft_MSS1210-XXX","Inductor_SMD/L_Coilcraft_MSS1210H-XXX","Inductor_SMD/L_Coilcraft_MSS1246-XXX","Inductor_SMD/L_Coilcraft_MSS1246H-XXX","Inductor_SMD/L_Coilcraft_MSS1246T-XXX","Inductor_SMD/L_Coilcraft_MSS1260-XXX","Inductor_SMD/L_Coilcraft_MSS1260H-XXX","Inductor_SMD/L_Coilcraft_MSS1260T-XXX","Inductor_SMD/L_Coilcraft_MSS1278-XXX","Inductor_SMD/L_Coilcraft_MSS1278H-XXX","Inductor_SMD/L_Coilcraft_MSS1278T-XXX","Inductor_SMD/L_Coilcraft_MSS1514V-XXX","Inductor_SMD/L_Coilcraft_MSS1583-XXX","Inductor_SMD/L_Coilcraft_MSS1812T-XXX","Inductor_SMD/L_Coilcraft_MSS7348-XXX","Inductor_SMD/L_Coilcraft_XAL1010-XXX","Inductor_SMD/L_Coilcraft_XAL1030-XXX","Inductor_SMD/L_Coilcraft_XAL1060-XXX","Inductor_SMD/L_Coilcraft_XAL1350-XXX","Inductor_SMD/L_Coilcraft_XAL1510-103","Inductor_SMD/L_Coilcraft_XAL1510-153","Inductor_SMD/L_Coilcraft_XAL1510-223","Inductor_SMD/L_Coilcraft_XAL1510-333","Inductor_SMD/L_Coilcraft_XAL1510-472","Inductor_SMD/L_Coilcraft_XAL1510-682","Inductor_SMD/L_Coilcraft_XAL1510-822","Inductor_SMD/L_Coilcraft_XAL1513-153","Inductor_SMD/L_Coilcraft_XAL1580-102","Inductor_SMD/L_Coilcraft_XAL1580-132","Inductor_SMD/L_Coilcraft_XAL1580-182","Inductor_SMD/L_Coilcraft_XAL1580-202","Inductor_SMD/L_Coilcraft_XAL1580-302","Inductor_SMD/L_Coilcraft_XAL1580-401","Inductor_SMD/L_Coilcraft_XAL1580-452","Inductor_SMD/L_Coilcraft_XAL1580-532","Inductor_SMD/L_Coilcraft_XAL1580-612","Inductor_SMD/L_Coilcraft_XAL1580-741","Inductor_SMD/L_Coilcraft_XAL4020-XXX","Inductor_SMD/L_Coilcraft_XAL4030-XXX","Inductor_SMD/L_Coilcraft_XAL4040-XXX","Inductor_SMD/L_Coilcraft_XAL5020-XXX","Inductor_SMD/L_Coilcraft_XAL5030-XXX","Inductor_SMD/L_Coilcraft_XAL5050-XXX","Inductor_SMD/L_Coilcraft_XAL6020-XXX","Inductor_SMD/L_Coilcraft_XAL6030-XXX","Inductor_SMD/L_Coilcraft_XAL6060-XXX","Inductor_SMD/L_Coilcraft_XAL7020-102","Inductor_SMD/L_Coilcraft_XAL7020-122","Inductor_SMD/L_Coilcraft_XAL7020-151","Inductor_SMD/L_Coilcraft_XAL7020-152","Inductor_SMD/L_Coilcraft_XAL7020-222","Inductor_SMD/L_Coilcraft_XAL7020-271","Inductor_SMD/L_Coilcraft_XAL7020-331","Inductor_SMD/L_Coilcraft_XAL7020-471","Inductor_SMD/L_Coilcraft_XAL7020-681","Inductor_SMD/L_Coilcraft_XAL7030-102","Inductor_SMD/L_Coilcraft_XAL7030-103","Inductor_SMD/L_Coilcraft_XAL7030-152","Inductor_SMD/L_Coilcraft_XAL7030-161","Inductor_SMD/L_Coilcraft_XAL7030-222","Inductor_SMD/L_Coilcraft_XAL7030-272","Inductor_SMD/L_Coilcraft_XAL7030-301","Inductor_SMD/L_Coilcraft_XAL7030-332","Inductor_SMD/L_Coilcraft_XAL7030-472","Inductor_SMD/L_Coilcraft_XAL7030-562","Inductor_SMD/L_Coilcraft_XAL7030-601","Inductor_SMD/L_Coilcraft_XAL7030-682","Inductor_SMD/L_Coilcraft_XAL7030-822","Inductor_SMD/L_Coilcraft_XAL7050-XXX","Inductor_SMD/L_Coilcraft_XAL7070-XXX","Inductor_SMD/L_Coilcraft_XAL8050-223","Inductor_SMD/L_Coilcraft_XAL8080-XXX","Inductor_SMD/L_Coilcraft_XFL2010","Inductor_SMD/L_Coilcraft_XxL4020","Inductor_SMD/L_Coilcraft_XxL4030","Inductor_SMD/L_Coilcraft_XxL4040","Inductor_SMD/L_CommonModeChoke_Bourns_SRF1260","Inductor_SMD/L_CommonModeChoke_Coilank_ACM1210","Inductor_SMD/L_CommonModeChoke_Coilank_ACM1608","Inductor_SMD/L_CommonModeChoke_Coilank_ACM2012","Inductor_SMD/L_CommonModeChoke_Coilank_ACM2520","Inductor_SMD/L_CommonModeChoke_Coilank_ACM3216","Inductor_SMD/L_CommonModeChoke_Coilank_ACM3225","Inductor_SMD/L_CommonModeChoke_Coilank_ACM4532","Inductor_SMD/L_CommonModeChoke_Coilcraft_0603USB","Inductor_SMD/L_CommonModeChoke_Coilcraft_0805USB","Inductor_SMD/L_CommonModeChoke_Coilcraft_1812CAN","Inductor_SMD/L_CommonModeChoke_Murata_DLW5BTMxxxSQ2x_5x5mm","Inductor_SMD/L_CommonModeChoke_TDK_ACM2520-2P","Inductor_SMD/L_CommonModeChoke_TDK_ACM2520-3P","Inductor_SMD/L_CommonModeChoke_TDK_ACM7060","Inductor_SMD/L_CommonModeChoke_Wuerth_WE-SL5-HC","Inductor_SMD/L_CommonModeChoke_Wuerth_WE-SL5","Inductor_SMD/L_CommonModeChoke_XR_XRGM0905C","Inductor_SMD/L_CommonMode_Bourns_DR331","Inductor_SMD/L_CommonMode_Delevan_4222","Inductor_SMD/L_CommonMode_Wuerth_WE-SL2","Inductor_SMD/L_CommonMode_Wurth_WE-CNSW-1206","Inductor_SMD/L_Eaton_MCL2012V1","Inductor_SMD/L_Fastron_PISN","Inductor_SMD/L_Fastron_PISN_Handsoldering","Inductor_SMD/L_Fastron_PISR","Inductor_SMD/L_Fastron_PISR_Handsoldering","Inductor_SMD/L_Ferrocore_DLG-0302","Inductor_SMD/L_Ferrocore_DLG-0403","Inductor_SMD/L_Ferrocore_DLG-0504","Inductor_SMD/L_Ferrocore_DLG-0703","Inductor_SMD/L_Ferrocore_DLG-0705","Inductor_SMD/L_Ferrocore_DLG-1004","Inductor_SMD/L_Ferrocore_DLG-1005","Inductor_SMD/L_KOHERelec_MDA5030","Inductor_SMD/L_KOHERelec_MDA7030","Inductor_SMD/L_Murata_DEM3512C","Inductor_SMD/L_Murata_DEM3518C","Inductor_SMD/L_Murata_DFE201610P","Inductor_SMD/L_Murata_LQH2MCNxxxx02_2.0x1.6mm","Inductor_SMD/L_Murata_LQH55DN_5.7x5.0mm","Inductor_SMD/L_Neosid_Air-Coil_SML_1turn_HDM0131A","Inductor_SMD/L_Neosid_Air-Coil_SML_2turn_HAM0231A","Inductor_SMD/L_Neosid_Air-Coil_SML_2turn_HDM0231A","Inductor_SMD/L_Neosid_Air-Coil_SML_3turn_HAM0331A","Inductor_SMD/L_Neosid_Air-Coil_SML_3turn_HDM0331A","Inductor_SMD/L_Neosid_Air-Coil_SML_4turn_HAM0431A","Inductor_SMD/L_Neosid_Air-Coil_SML_4turn_HDM0431A","Inductor_SMD/L_Neosid_Air-Coil_SML_5turn_HAM0531A","Inductor_SMD/L_Neosid_Air-Coil_SML_5turn_HDM0531A","Inductor_SMD/L_Neosid_Air-Coil_SML_6-10turn_HAM0631A-HAM1031A","Inductor_SMD/L_Neosid_Air-Coil_SML_6-10turn_HDM0431A-HDM1031A","Inductor_SMD/L_Neosid_Air-Coil_SML_6turn_HAM0631A","Inductor_SMD/L_Neosid_MicroCoil_Ms36-L","Inductor_SMD/L_Neosid_Ms42","Inductor_SMD/L_Neosid_Ms50","Inductor_SMD/L_Neosid_Ms50T","Inductor_SMD/L_Neosid_Ms85","Inductor_SMD/L_Neosid_Ms85T","Inductor_SMD/L_Neosid_Ms95","Inductor_SMD/L_Neosid_Ms95T","Inductor_SMD/L_Neosid_Ms95a","Inductor_SMD/L_Neosid_SM-NE127","Inductor_SMD/L_Neosid_SM-NE127_HandSoldering","Inductor_SMD/L_Neosid_SM-NE150","Inductor_SMD/L_Neosid_SM-NE95H","Inductor_SMD/L_Neosid_SM-PIC0512H","Inductor_SMD/L_Neosid_SM-PIC0602H","Inductor_SMD/L_Neosid_SM-PIC0612H","Inductor_SMD/L_Neosid_SM-PIC1004H","Inductor_SMD/L_Neosid_SMS-ME3010","Inductor_SMD/L_Neosid_SMS-ME3015","Inductor_SMD/L_Neosid_SMs42","Inductor_SMD/L_Neosid_SMs50","Inductor_SMD/L_Neosid_SMs85","Inductor_SMD/L_Neosid_SMs95_SMs95p","Inductor_SMD/L_Panasonic_PCC-M0530M","Inductor_SMD/L_Panasonic_PCC-M0540M","Inductor_SMD/L_Panasonic_PCC-M0630M","Inductor_SMD/L_Panasonic_PCC-M0645M","Inductor_SMD/L_Panasonic_PCC-M0750M","Inductor_SMD/L_Panasonic_PCC-M0754M","Inductor_SMD/L_Panasonic_PCC-M0850M","Inductor_SMD/L_Panasonic_PCC-M0854M","Inductor_SMD/L_Panasonic_PCC-M1040ML","Inductor_SMD/L_Panasonic_PCC-M1050M","Inductor_SMD/L_Panasonic_PCC-M1050ML","Inductor_SMD/L_Panasonic_PCC-M1054M","Inductor_SMD/L_Panasonic_PCC-M1060ML","Inductor_SMD/L_Pulse_P059x","Inductor_SMD/L_Pulse_PA4320","Inductor_SMD/L_Pulse_PA4332","Inductor_SMD/L_Pulse_PA4334","Inductor_SMD/L_Pulse_PA4340","Inductor_SMD/L_Pulse_PA4341","Inductor_SMD/L_Pulse_PA4344","Inductor_SMD/L_Pulse_PA4349","Inductor_SMD/L_Pulse_PA5402","Inductor_SMD/L_SOREDE_SNR.1050_10x10x5mm","Inductor_SMD/L_SXN_SMDRI124","Inductor_SMD/L_SXN_SMDRI125","Inductor_SMD/L_SXN_SMDRI127","Inductor_SMD/L_SXN_SMDRI62","Inductor_SMD/L_SXN_SMDRI64","Inductor_SMD/L_SXN_SMDRI73","Inductor_SMD/L_SXN_SMDRI74","Inductor_SMD/L_SXN_SMMS1770","Inductor_SMD/L_Sagami_CER1242B","Inductor_SMD/L_Sagami_CER1257B","Inductor_SMD/L_Sagami_CER1277B","Inductor_SMD/L_Sagami_CWR1242C","Inductor_SMD/L_Sagami_CWR1257C","Inductor_SMD/L_Sagami_CWR1277C","Inductor_SMD/L_SigTra_SC3316F","Inductor_SMD/L_Sumida_CDMC6D28_7.25x6.5mm","Inductor_SMD/L_Sumida_CR75","Inductor_SMD/L_Sunlord_MWSA0402S","Inductor_SMD/L_Sunlord_MWSA0412S","Inductor_SMD/L_Sunlord_MWSA0503S","Inductor_SMD/L_Sunlord_MWSA0518S","Inductor_SMD/L_Sunlord_MWSA0602S","Inductor_SMD/L_Sunlord_MWSA0603S","Inductor_SMD/L_Sunlord_MWSA0604S","Inductor_SMD/L_Sunlord_MWSA0605S","Inductor_SMD/L_Sunlord_MWSA0615S","Inductor_SMD/L_Sunlord_MWSA0618S","Inductor_SMD/L_Sunlord_MWSA0624S","Inductor_SMD/L_Sunlord_MWSA0804S","Inductor_SMD/L_Sunlord_MWSA1003S","Inductor_SMD/L_Sunlord_MWSA1004S","Inductor_SMD/L_Sunlord_MWSA1005S","Inductor_SMD/L_Sunlord_MWSA1204S-100","Inductor_SMD/L_Sunlord_MWSA1204S-150","Inductor_SMD/L_Sunlord_MWSA1204S-1R0","Inductor_SMD/L_Sunlord_MWSA1204S-1R5","Inductor_SMD/L_Sunlord_MWSA1204S-220","Inductor_SMD/L_Sunlord_MWSA1204S-2R2","Inductor_SMD/L_Sunlord_MWSA1204S-3R3","Inductor_SMD/L_Sunlord_MWSA1204S-4R7","Inductor_SMD/L_Sunlord_MWSA1204S-6R8","Inductor_SMD/L_Sunlord_MWSA1204S-R22","Inductor_SMD/L_Sunlord_MWSA1204S-R47","Inductor_SMD/L_Sunlord_MWSA1204S-R68","Inductor_SMD/L_Sunlord_MWSA1204S-R82","Inductor_SMD/L_Sunlord_MWSA1205S-100","Inductor_SMD/L_Sunlord_MWSA1205S-150","Inductor_SMD/L_Sunlord_MWSA1205S-1R0","Inductor_SMD/L_Sunlord_MWSA1205S-1R5","Inductor_SMD/L_Sunlord_MWSA1205S-220","Inductor_SMD/L_Sunlord_MWSA1205S-2R2","Inductor_SMD/L_Sunlord_MWSA1205S-330","Inductor_SMD/L_Sunlord_MWSA1205S-3R3","Inductor_SMD/L_Sunlord_MWSA1205S-470","Inductor_SMD/L_Sunlord_MWSA1205S-4R7","Inductor_SMD/L_Sunlord_MWSA1205S-6R8","Inductor_SMD/L_Sunlord_MWSA1205S-R22","Inductor_SMD/L_Sunlord_MWSA1205S-R36","Inductor_SMD/L_Sunlord_MWSA1205S-R50","Inductor_SMD/L_Sunlord_MWSA1205S-R68","Inductor_SMD/L_Sunlord_MWSA1205S-R82","Inductor_SMD/L_Sunlord_MWSA1206S-100","Inductor_SMD/L_Sunlord_MWSA1206S-101","Inductor_SMD/L_Sunlord_MWSA1206S-120","Inductor_SMD/L_Sunlord_MWSA1206S-121","Inductor_SMD/L_Sunlord_MWSA1206S-150","Inductor_SMD/L_Sunlord_MWSA1206S-151","Inductor_SMD/L_Sunlord_MWSA1206S-180","Inductor_SMD/L_Sunlord_MWSA1206S-1R5","Inductor_SMD/L_Sunlord_MWSA1206S-220","Inductor_SMD/L_Sunlord_MWSA1206S-270","Inductor_SMD/L_Sunlord_MWSA1206S-2R2","Inductor_SMD/L_Sunlord_MWSA1206S-330","Inductor_SMD/L_Sunlord_MWSA1206S-3R3","Inductor_SMD/L_Sunlord_MWSA1206S-470","Inductor_SMD/L_Sunlord_MWSA1206S-4R7","Inductor_SMD/L_Sunlord_MWSA1206S-5R6","Inductor_SMD/L_Sunlord_MWSA1206S-680","Inductor_SMD/L_Sunlord_MWSA1206S-6R8","Inductor_SMD/L_Sunlord_MWSA1206S-8R2","Inductor_SMD/L_Sunlord_MWSA1206S-R68","Inductor_SMD/L_Sunlord_MWSA1265S","Inductor_SMD/L_Sunlord_MWSA1707S","Inductor_SMD/L_Sunlord_MWSA2213S","Inductor_SMD/L_Sunlord_SWPA252010S","Inductor_SMD/L_Sunlord_SWPA252012S","Inductor_SMD/L_Sunlord_SWPA3010S","Inductor_SMD/L_Sunlord_SWPA3012S","Inductor_SMD/L_Sunlord_SWPA3015S","Inductor_SMD/L_Sunlord_SWPA4010S","Inductor_SMD/L_Sunlord_SWPA4012S","Inductor_SMD/L_Sunlord_SWPA4018S","Inductor_SMD/L_Sunlord_SWPA4020S","Inductor_SMD/L_Sunlord_SWPA4026S","Inductor_SMD/L_Sunlord_SWPA4030S","Inductor_SMD/L_Sunlord_SWPA5012S","Inductor_SMD/L_Sunlord_SWPA5020S","Inductor_SMD/L_Sunlord_SWPA5040S","Inductor_SMD/L_Sunlord_SWPA6020S","Inductor_SMD/L_Sunlord_SWPA6028S","Inductor_SMD/L_Sunlord_SWPA6040S","Inductor_SMD/L_Sunlord_SWPA6045S","Inductor_SMD/L_Sunlord_SWPA8040S","Inductor_SMD/L_Sunlord_SWRB1204S","Inductor_SMD/L_Sunlord_SWRB1205S","Inductor_SMD/L_Sunlord_SWRB1207S","Inductor_SMD/L_TDK_MLZ1608","Inductor_SMD/L_TDK_MLZ2012_h0.85mm","Inductor_SMD/L_TDK_MLZ2012_h1.25mm","Inductor_SMD/L_TDK_NLV25_2.5x2.0mm","Inductor_SMD/L_TDK_NLV32_3.2x2.5mm","Inductor_SMD/L_TDK_SLF10145","Inductor_SMD/L_TDK_SLF10165","Inductor_SMD/L_TDK_SLF12555","Inductor_SMD/L_TDK_SLF12565","Inductor_SMD/L_TDK_SLF12575","Inductor_SMD/L_TDK_SLF6025","Inductor_SMD/L_TDK_SLF6028","Inductor_SMD/L_TDK_SLF6045","Inductor_SMD/L_TDK_SLF7032","Inductor_SMD/L_TDK_SLF7045","Inductor_SMD/L_TDK_SLF7055","Inductor_SMD/L_TDK_VLF10040","Inductor_SMD/L_TDK_VLP8040","Inductor_SMD/L_TDK_VLS6045EX_VLS6045AF","Inductor_SMD/L_TaiTech_TMPC1265_13.5x12.5mm","Inductor_SMD/L_Taiyo-Yuden_BK_Array_1206_3216Metric","Inductor_SMD/L_Taiyo-Yuden_MD-1616","Inductor_SMD/L_Taiyo-Yuden_MD-2020","Inductor_SMD/L_Taiyo-Yuden_MD-3030","Inductor_SMD/L_Taiyo-Yuden_MD-4040","Inductor_SMD/L_Taiyo-Yuden_MD-5050","Inductor_SMD/L_Taiyo-Yuden_NR-10050_9.8x10.0mm","Inductor_SMD/L_Taiyo-Yuden_NR-10050_9.8x10.0mm_HandSoldering","Inductor_SMD/L_Taiyo-Yuden_NR-20xx","Inductor_SMD/L_Taiyo-Yuden_NR-20xx_HandSoldering","Inductor_SMD/L_Taiyo-Yuden_NR-24xx","Inductor_SMD/L_Taiyo-Yuden_NR-24xx_HandSoldering","Inductor_SMD/L_Taiyo-Yuden_NR-30xx","Inductor_SMD/L_Taiyo-Yuden_NR-30xx_HandSoldering","Inductor_SMD/L_Taiyo-Yuden_NR-40xx","Inductor_SMD/L_Taiyo-Yuden_NR-40xx_HandSoldering","Inductor_SMD/L_Taiyo-Yuden_NR-50xx","Inductor_SMD/L_Taiyo-Yuden_NR-50xx_HandSoldering","Inductor_SMD/L_Taiyo-Yuden_NR-60xx","Inductor_SMD/L_Taiyo-Yuden_NR-60xx_HandSoldering","Inductor_SMD/L_Taiyo-Yuden_NR-80xx","Inductor_SMD/L_Taiyo-Yuden_NR-80xx_HandSoldering","Inductor_SMD/L_TechFuse_SL0420","Inductor_SMD/L_TechFuse_SL0520","Inductor_SMD/L_TechFuse_SL0530","Inductor_SMD/L_TechFuse_SL0620","Inductor_SMD/L_TechFuse_SL0624","Inductor_SMD/L_TechFuse_SL0630","Inductor_SMD/L_TechFuse_SL0650","Inductor_SMD/L_TechFuse_SL1040","Inductor_SMD/L_TechFuse_SL1050","Inductor_SMD/L_TechFuse_SL1250","Inductor_SMD/L_TechFuse_SL1265","Inductor_SMD/L_TracoPower_TCK-047_5.2x5.8mm","Inductor_SMD/L_TracoPower_TCK-141","Inductor_SMD/L_Vishay_IFSC-1515AH_4x4x1.8mm","Inductor_SMD/L_Vishay_IHLP-1212","Inductor_SMD/L_Vishay_IHLP-1616","Inductor_SMD/L_Vishay_IHLP-2020","Inductor_SMD/L_Vishay_IHLP-2525","Inductor_SMD/L_Vishay_IHLP-3232","Inductor_SMD/L_Vishay_IHLP-4040","Inductor_SMD/L_Vishay_IHLP-5050","Inductor_SMD/L_Vishay_IHLP-6767","Inductor_SMD/L_Vishay_IHSM-3825","Inductor_SMD/L_Vishay_IHSM-4825","Inductor_SMD/L_Vishay_IHSM-5832","Inductor_SMD/L_Vishay_IHSM-7832","Inductor_SMD/L_Walsin_WLFM201209x","Inductor_SMD/L_Walsin_WLFM201609x","Inductor_SMD/L_Walsin_WLFM252009x","Inductor_SMD/L_Wuerth_HCF-2013","Inductor_SMD/L_Wuerth_HCF-2815","Inductor_SMD/L_Wuerth_HCF-2818","Inductor_SMD/L_Wuerth_HCI-1030","Inductor_SMD/L_Wuerth_HCI-1040","Inductor_SMD/L_Wuerth_HCI-1050","Inductor_SMD/L_Wuerth_HCI-1335","Inductor_SMD/L_Wuerth_HCI-1350","Inductor_SMD/L_Wuerth_HCI-1365","Inductor_SMD/L_Wuerth_HCI-1890","Inductor_SMD/L_Wuerth_HCI-2212","Inductor_SMD/L_Wuerth_HCI-5040","Inductor_SMD/L_Wuerth_HCI-7030","Inductor_SMD/L_Wuerth_HCI-7040","Inductor_SMD/L_Wuerth_HCI-7050","Inductor_SMD/L_Wuerth_HCM-1050","Inductor_SMD/L_Wuerth_HCM-1052","Inductor_SMD/L_Wuerth_HCM-1070","Inductor_SMD/L_Wuerth_HCM-1078","Inductor_SMD/L_Wuerth_HCM-1190","Inductor_SMD/L_Wuerth_HCM-1240","Inductor_SMD/L_Wuerth_HCM-1350","Inductor_SMD/L_Wuerth_HCM-1390","Inductor_SMD/L_Wuerth_HCM-7050","Inductor_SMD/L_Wuerth_HCM-7070","Inductor_SMD/L_Wuerth_LQFS-3818","Inductor_SMD/L_Wuerth_LQFS-4818","Inductor_SMD/L_Wuerth_LQFS-4828","Inductor_SMD/L_Wuerth_MAPI-1610","Inductor_SMD/L_Wuerth_MAPI-2010","Inductor_SMD/L_Wuerth_MAPI-2506","Inductor_SMD/L_Wuerth_MAPI-2508","Inductor_SMD/L_Wuerth_MAPI-2510","Inductor_SMD/L_Wuerth_MAPI-2512","Inductor_SMD/L_Wuerth_MAPI-3010","Inductor_SMD/L_Wuerth_MAPI-3012","Inductor_SMD/L_Wuerth_MAPI-3015","Inductor_SMD/L_Wuerth_MAPI-3020","Inductor_SMD/L_Wuerth_MAPI-4020","Inductor_SMD/L_Wuerth_MAPI-4030","Inductor_SMD/L_Wuerth_MAPI-5020","Inductor_SMD/L_Wuerth_MAPI-5030","Inductor_SMD/L_Wuerth_PMCI-160808","Inductor_SMD/L_Wuerth_PMCI-201210","Inductor_SMD/L_Wuerth_PMCI-201610","Inductor_SMD/L_Wuerth_PMCI-252010","Inductor_SMD/L_Wuerth_PMCI-252012","Inductor_SMD/L_Wuerth_PMCI-322510","Inductor_SMD/L_Wuerth_PMCI-322512","Inductor_SMD/L_Wuerth_PMCI-322515","Inductor_SMD/L_Wuerth_PMFI-201610","Inductor_SMD/L_Wuerth_PMFI-201610_PMCI-compatible","Inductor_SMD/L_Wuerth_PMFI-252012","Inductor_SMD/L_Wuerth_PMFI-252012_PMCI-compatible","Inductor_SMD/L_Wuerth_PMFI-322512","Inductor_SMD/L_Wuerth_PMFI-322512_PMCI-compatible","Inductor_SMD/L_Wuerth_PMFI-353220","Inductor_SMD/L_Wuerth_WE-DD-Typ-L-Typ-XL-Typ-XXL","Inductor_SMD/L_Wuerth_WE-DD-Typ-M-Typ-S","Inductor_SMD/L_Wuerth_WE-GF-1210","Inductor_SMD/L_Wuerth_WE-PD-Typ-7345","Inductor_SMD/L_Wuerth_WE-PD-Typ-LS","Inductor_SMD/L_Wuerth_WE-PD-Typ-LS_Handsoldering","Inductor_SMD/L_Wuerth_WE-PD-Typ-M-Typ-S","Inductor_SMD/L_Wuerth_WE-PD-Typ-M-Typ-S_Handsoldering","Inductor_SMD/L_Wuerth_WE-PD2-Typ-L","Inductor_SMD/L_Wuerth_WE-PD2-Typ-MS","Inductor_SMD/L_Wuerth_WE-PD2-Typ-XL","Inductor_SMD/L_Wuerth_WE-PD4-Typ-X","Inductor_SMD/L_Wuerth_WE-PDF","Inductor_SMD/L_Wuerth_WE-PDF_Handsoldering","Inductor_SMD/L_Wuerth_WE-TPC-3816","Inductor_SMD/L_Wuerth_XHMI-6060","Inductor_SMD/L_Wuerth_XHMI-8080","Inductor_SMD/L_Wurth_WE-CAIR-5910","Inductor_SMD_Wurth/L_Wurth_WE-LQSH-2010","Inductor_SMD_Wurth/L_Wurth_WE-LQSH-2512","Inductor_SMD_Wurth/L_Wurth_WE-LQSH-3012","Inductor_SMD_Wurth/L_Wurth_WE-LQSH-4020","Inductor_THT/Choke_EPCOS_B82722A","Inductor_THT/Choke_Schaffner_RN102-04-14.0x14.0mm","Inductor_THT/Choke_Schaffner_RN112-04-17.7x17.1mm","Inductor_THT/Choke_Schaffner_RN114-04-22.5x21.5mm","Inductor_THT/Choke_Schaffner_RN116-04-22.5x21.5mm","Inductor_THT/Choke_Schaffner_RN122-04-28.0x27.0mm","Inductor_THT/Choke_Schaffner_RN142-04-33.1x32.5mm","Inductor_THT/Choke_Schaffner_RN143-04-33.1x32.5mm","Inductor_THT/Choke_Schaffner_RN152-04-43.0x41.8mm","Inductor_THT/Choke_Schaffner_RN202-04-8.8x18.2mm","Inductor_THT/Choke_Schaffner_RN204-04-9.0x14.0mm","Inductor_THT/Choke_Schaffner_RN212-04-12.5x18.0mm","Inductor_THT/Choke_Schaffner_RN214-04-15.5x23.0mm","Inductor_THT/Choke_Schaffner_RN216-04-15.5x23.0mm","Inductor_THT/Choke_Schaffner_RN218-04-12.5x18.0mm","Inductor_THT/Choke_Schaffner_RN222-04-18.0x31.0mm","Inductor_THT/Choke_Schaffner_RN232-04-18.0x31.0mm","Inductor_THT/Choke_Schaffner_RN242-04-18.0x31.0mm","Inductor_THT/L_Axial_L11.0mm_D4.5mm_P15.24mm_Horizontal_Fastron_MECC","Inductor_THT/L_Axial_L11.0mm_D4.5mm_P5.08mm_Vertical_Fastron_MECC","Inductor_THT/L_Axial_L11.0mm_D4.5mm_P7.62mm_Vertical_Fastron_MECC","Inductor_THT/L_Axial_L12.0mm_D5.0mm_P15.24mm_Horizontal_Fastron_MISC","Inductor_THT/L_Axial_L12.0mm_D5.0mm_P5.08mm_Vertical_Fastron_MISC","Inductor_THT/L_Axial_L12.0mm_D5.0mm_P7.62mm_Vertical_Fastron_MISC","Inductor_THT/L_Axial_L12.8mm_D5.8mm_P20.32mm_Horizontal_Fastron_HBCC","Inductor_THT/L_Axial_L12.8mm_D5.8mm_P25.40mm_Horizontal_Fastron_HBCC","Inductor_THT/L_Axial_L12.8mm_D5.8mm_P5.08mm_Vertical_Fastron_HBCC","Inductor_THT/L_Axial_L12.8mm_D5.8mm_P7.62mm_Vertical_Fastron_HBCC","Inductor_THT/L_Axial_L13.0mm_D4.5mm_P15.24mm_Horizontal_Fastron_HCCC","Inductor_THT/L_Axial_L13.0mm_D4.5mm_P5.08mm_Vertical_Fastron_HCCC","Inductor_THT/L_Axial_L13.0mm_D4.5mm_P7.62mm_Vertical_Fastron_HCCC","Inductor_THT/L_Axial_L14.0mm_D4.5mm_P15.24mm_Horizontal_Fastron_LACC","Inductor_THT/L_Axial_L14.0mm_D4.5mm_P5.08mm_Vertical_Fastron_LACC","Inductor_THT/L_Axial_L14.0mm_D4.5mm_P7.62mm_Vertical_Fastron_LACC","Inductor_THT/L_Axial_L14.5mm_D5.8mm_P20.32mm_Horizontal_Fastron_HBCC","Inductor_THT/L_Axial_L14.5mm_D5.8mm_P25.40mm_Horizontal_Fastron_HBCC","Inductor_THT/L_Axial_L14.5mm_D5.8mm_P5.08mm_Vertical_Fastron_HBCC","Inductor_THT/L_Axial_L14.5mm_D5.8mm_P7.62mm_Vertical_Fastron_HBCC","Inductor_THT/L_Axial_L16.0mm_D6.3mm_P20.32mm_Horizontal_Fastron_VHBCC","Inductor_THT/L_Axial_L16.0mm_D6.3mm_P25.40mm_Horizontal_Fastron_VHBCC","Inductor_THT/L_Axial_L16.0mm_D6.3mm_P5.08mm_Vertical_Fastron_VHBCC","Inductor_THT/L_Axial_L16.0mm_D6.3mm_P7.62mm_Vertical_Fastron_VHBCC","Inductor_THT/L_Axial_L16.0mm_D7.5mm_P20.32mm_Horizontal_Fastron_XHBCC","Inductor_THT/L_Axial_L16.0mm_D7.5mm_P25.40mm_Horizontal_Fastron_XHBCC","Inductor_THT/L_Axial_L16.0mm_D7.5mm_P5.08mm_Vertical_Fastron_XHBCC","Inductor_THT/L_Axial_L16.0mm_D7.5mm_P7.62mm_Vertical_Fastron_XHBCC","Inductor_THT/L_Axial_L16.0mm_D9.5mm_P20.32mm_Horizontal_Vishay_IM-10-37","Inductor_THT/L_Axial_L16.0mm_D9.5mm_P5.08mm_Vertical_Vishay_IM-10-37","Inductor_THT/L_Axial_L17.5mm_D12.0mm_P20.32mm_Horizontal_Vishay_IM-10-46","Inductor_THT/L_Axial_L17.5mm_D12.0mm_P7.62mm_Vertical_Vishay_IM-10-46","Inductor_THT/L_Axial_L20.0mm_D8.0mm_P25.40mm_Horizontal","Inductor_THT/L_Axial_L20.0mm_D8.0mm_P5.08mm_Vertical","Inductor_THT/L_Axial_L20.0mm_D8.0mm_P7.62mm_Vertical","Inductor_THT/L_Axial_L20.3mm_D12.1mm_P28.50mm_Horizontal_Vishay_IHA-101","Inductor_THT/L_Axial_L20.3mm_D12.1mm_P7.62mm_Vertical_Vishay_IHA-101","Inductor_THT/L_Axial_L20.3mm_D12.7mm_P25.40mm_Horizontal_Vishay_IHA-201","Inductor_THT/L_Axial_L20.3mm_D12.7mm_P7.62mm_Vertical_Vishay_IHA-201","Inductor_THT/L_Axial_L23.4mm_D12.7mm_P32.00mm_Horizontal_Vishay_IHA-203","Inductor_THT/L_Axial_L23.4mm_D12.7mm_P7.62mm_Vertical_Vishay_IHA-203","Inductor_THT/L_Axial_L24.0mm_D7.1mm_P30.48mm_Horizontal_Vishay_IM-10-28","Inductor_THT/L_Axial_L24.0mm_D7.1mm_P5.08mm_Vertical_Vishay_IM-10-28","Inductor_THT/L_Axial_L24.0mm_D7.5mm_P27.94mm_Horizontal_Fastron_MESC","Inductor_THT/L_Axial_L24.0mm_D7.5mm_P5.08mm_Vertical_Fastron_MESC","Inductor_THT/L_Axial_L24.0mm_D7.5mm_P7.62mm_Vertical_Fastron_MESC","Inductor_THT/L_Axial_L26.0mm_D10.0mm_P30.48mm_Horizontal_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D10.0mm_P5.08mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D10.0mm_P7.62mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D11.0mm_P30.48mm_Horizontal_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D11.0mm_P5.08mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D11.0mm_P7.62mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D9.0mm_P30.48mm_Horizontal_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D9.0mm_P5.08mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L26.0mm_D9.0mm_P7.62mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L26.7mm_D12.1mm_P35.00mm_Horizontal_Vishay_IHA-103","Inductor_THT/L_Axial_L26.7mm_D12.1mm_P7.62mm_Vertical_Vishay_IHA-103","Inductor_THT/L_Axial_L26.7mm_D14.0mm_P35.00mm_Horizontal_Vishay_IHA-104","Inductor_THT/L_Axial_L26.7mm_D14.0mm_P7.62mm_Vertical_Vishay_IHA-104","Inductor_THT/L_Axial_L29.9mm_D14.0mm_P38.00mm_Horizontal_Vishay_IHA-105","Inductor_THT/L_Axial_L29.9mm_D14.0mm_P7.62mm_Vertical_Vishay_IHA-105","Inductor_THT/L_Axial_L30.0mm_D8.0mm_P35.56mm_Horizontal_Fastron_77A","Inductor_THT/L_Axial_L30.0mm_D8.0mm_P5.08mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L30.0mm_D8.0mm_P7.62mm_Vertical_Fastron_77A","Inductor_THT/L_Axial_L5.0mm_D3.6mm_P10.00mm_Horizontal_Murata_BL01RN1A2A2","Inductor_THT/L_Axial_L5.3mm_D2.2mm_P10.16mm_Horizontal_Vishay_IM-1","Inductor_THT/L_Axial_L5.3mm_D2.2mm_P2.54mm_Vertical_Vishay_IM-1","Inductor_THT/L_Axial_L5.3mm_D2.2mm_P7.62mm_Horizontal_Vishay_IM-1","Inductor_THT/L_Axial_L6.6mm_D2.7mm_P10.16mm_Horizontal_Vishay_IM-2","Inductor_THT/L_Axial_L6.6mm_D2.7mm_P2.54mm_Vertical_Vishay_IM-2","Inductor_THT/L_Axial_L7.0mm_D3.3mm_P10.16mm_Horizontal_Fastron_MICC","Inductor_THT/L_Axial_L7.0mm_D3.3mm_P12.70mm_Horizontal_Fastron_MICC","Inductor_THT/L_Axial_L7.0mm_D3.3mm_P2.54mm_Vertical_Fastron_MICC","Inductor_THT/L_Axial_L7.0mm_D3.3mm_P5.08mm_Vertical_Fastron_MICC","Inductor_THT/L_Axial_L9.5mm_D4.0mm_P12.70mm_Horizontal_Fastron_SMCC","Inductor_THT/L_Axial_L9.5mm_D4.0mm_P15.24mm_Horizontal_Fastron_SMCC","Inductor_THT/L_Axial_L9.5mm_D4.0mm_P2.54mm_Vertical_Fastron_SMCC","Inductor_THT/L_Axial_L9.5mm_D4.0mm_P5.08mm_Vertical_Fastron_SMCC","Inductor_THT/L_CommonMode_PulseElectronics_PH9455x105NL_1","Inductor_THT/L_CommonMode_PulseElectronics_PH9455x155NL_1","Inductor_THT/L_CommonMode_PulseElectronics_PH9455x205NL_1","Inductor_THT/L_CommonMode_PulseElectronics_PH9455x405NL_1","Inductor_THT/L_CommonMode_PulseElectronics_PH9455x705NL_1","Inductor_THT/L_CommonMode_PulseElectronics_PH9455xxx6NL_2","Inductor_THT/L_CommonMode_TDK_B82746S4143A040","Inductor_THT/L_CommonMode_TDK_B82746S6702A040","Inductor_THT/L_CommonMode_TDK_B82747E6163A040","Inductor_THT/L_CommonMode_TDK_B82747E6203A040","Inductor_THT/L_CommonMode_TDK_B82747E6253A040","Inductor_THT/L_CommonMode_TDK_B82747E6353A040","Inductor_THT/L_CommonMode_TDK_B82767S4123N030","Inductor_THT/L_CommonMode_TDK_B82767S4193N030","Inductor_THT/L_CommonMode_TDK_B82767S4263N030","Inductor_THT/L_CommonMode_Toroid_Vertical_L13.0mm_W7.5mm_Px6.00mm_Py5.00mm_PRODTech_PDMCAT1065","Inductor_THT/L_CommonMode_Toroid_Vertical_L19.3mm_W10.8mm_Px6.35mm_Py15.24mm_Bourns_8100","Inductor_THT/L_CommonMode_Toroid_Vertical_L21.0mm_W10.0mm_Px5.08mm_Py12.70mm_Murata_5100","Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-102ML","Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-103ML","Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-202ML","Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-203ML","Inductor_THT/L_CommonMode_Toroid_Vertical_L22.0mm_W12.0mm_Px9.00mm_Py8.00mm_PRODTech_PDMCAT18107-502ML","Inductor_THT/L_CommonMode_Toroid_Vertical_L24.0mm_W16.3mm_Px10.16mm_Py20.32mm_Murata_5200","Inductor_THT/L_CommonMode_Toroid_Vertical_L30.5mm_W15.2mm_Px10.16mm_Py20.32mm_Bourns_8100","Inductor_THT/L_CommonMode_Toroid_Vertical_L34.3mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100","Inductor_THT/L_CommonMode_Toroid_Vertical_L36.8mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100","Inductor_THT/L_CommonMode_Toroid_Vertical_L38.1mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100","Inductor_THT/L_CommonMode_Toroid_Vertical_L39.4mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100","Inductor_THT/L_CommonMode_Toroid_Vertical_L41.9mm_W20.3mm_Px15.24mm_Py22.86mm_Bourns_8100","Inductor_THT/L_CommonMode_Toroid_Vertical_L43.2mm_W22.9mm_Px17.78mm_Py30.48mm_Bourns_8100","Inductor_THT/L_CommonMode_VAC_T60405-S6123-X140","Inductor_THT/L_CommonMode_VAC_T60405-S6123-X240","Inductor_THT/L_CommonMode_VAC_T60405-S6123-X402","Inductor_THT/L_CommonMode_Wuerth_WE-CMB-L","Inductor_THT/L_CommonMode_Wuerth_WE-CMB-M","Inductor_THT/L_CommonMode_Wuerth_WE-CMB-S","Inductor_THT/L_CommonMode_Wuerth_WE-CMB-XL","Inductor_THT/L_CommonMode_Wuerth_WE-CMB-XS","Inductor_THT/L_CommonMode_Wuerth_WE-CMB-XXL","Inductor_THT/L_Mount_Lodestone_VTM120","Inductor_THT/L_Mount_Lodestone_VTM160","Inductor_THT/L_Mount_Lodestone_VTM254","Inductor_THT/L_Mount_Lodestone_VTM280","Inductor_THT/L_Mount_Lodestone_VTM950-6","Inductor_THT/L_Radial_D10.0mm_P5.00mm_Fastron_07M","Inductor_THT/L_Radial_D10.0mm_P5.00mm_Fastron_07P","Inductor_THT/L_Radial_D10.0mm_P5.00mm_Neosid_SD12_style3","Inductor_THT/L_Radial_D10.0mm_P5.00mm_Neosid_SD12k_style3","Inductor_THT/L_Radial_D10.5mm_P4.00x5.00mm_Murata_1200RS","Inductor_THT/L_Radial_D10.5mm_P5.00mm_Abacron_AISR-01","Inductor_THT/L_Radial_D12.0mm_P10.00mm_Neosid_SD12_style1","Inductor_THT/L_Radial_D12.0mm_P10.00mm_Neosid_SD12k_style1","Inductor_THT/L_Radial_D12.0mm_P5.00mm_Fastron_11P","Inductor_THT/L_Radial_D12.0mm_P5.00mm_Neosid_SD12_style2","Inductor_THT/L_Radial_D12.0mm_P5.00mm_Neosid_SD12k_style2","Inductor_THT/L_Radial_D12.0mm_P6.00mm_Murata_1900R","Inductor_THT/L_Radial_D12.5mm_P7.00mm_Fastron_09HCP","Inductor_THT/L_Radial_D12.5mm_P9.00mm_Fastron_09HCP","Inductor_THT/L_Radial_D13.5mm_P7.00mm_Fastron_09HCP","Inductor_THT/L_Radial_D14.2mm_P10.00mm_Neosid_SD14","Inductor_THT/L_Radial_D16.0mm_P10.00mm_Panasonic_15E-L","Inductor_THT/L_Radial_D16.8mm_P11.43mm_Vishay_IHB-1","Inductor_THT/L_Radial_D16.8mm_P12.07mm_Vishay_IHB-1","Inductor_THT/L_Radial_D16.8mm_P12.70mm_Vishay_IHB-1","Inductor_THT/L_Radial_D18.0mm_P10.00mm","Inductor_THT/L_Radial_D21.0mm_P14.61mm_Vishay_IHB-2","Inductor_THT/L_Radial_D21.0mm_P15.00mm_Vishay_IHB-2","Inductor_THT/L_Radial_D21.0mm_P15.24mm_Vishay_IHB-2","Inductor_THT/L_Radial_D21.0mm_P15.75mm_Vishay_IHB-2","Inductor_THT/L_Radial_D21.0mm_P19.00mm","Inductor_THT/L_Radial_D24.0mm_P24.00mm","Inductor_THT/L_Radial_D24.4mm_P22.90mm_Murata_1400series","Inductor_THT/L_Radial_D24.4mm_P23.10mm_Murata_1400series","Inductor_THT/L_Radial_D24.4mm_P23.40mm_Murata_1400series","Inductor_THT/L_Radial_D24.4mm_P23.70mm_Murata_1400series","Inductor_THT/L_Radial_D24.4mm_P23.90mm_Murata_1400series","Inductor_THT/L_Radial_D27.9mm_P18.29mm_Vishay_IHB-3","Inductor_THT/L_Radial_D27.9mm_P19.05mm_Vishay_IHB-3","Inductor_THT/L_Radial_D27.9mm_P20.07mm_Vishay_IHB-3","Inductor_THT/L_Radial_D28.0mm_P29.20mm","Inductor_THT/L_Radial_D29.8mm_P28.30mm_Murata_1400series","Inductor_THT/L_Radial_D29.8mm_P28.50mm_Murata_1400series","Inductor_THT/L_Radial_D29.8mm_P28.80mm_Murata_1400series","Inductor_THT/L_Radial_D29.8mm_P29.00mm_Murata_1400series","Inductor_THT/L_Radial_D29.8mm_P29.30mm_Murata_1400series","Inductor_THT/L_Radial_D40.6mm_P26.16mm_Vishay_IHB-5","Inductor_THT/L_Radial_D40.6mm_P27.18mm_Vishay_IHB-4","Inductor_THT/L_Radial_D40.6mm_P27.94mm_Vishay_IHB-4","Inductor_THT/L_Radial_D40.6mm_P27.94mm_Vishay_IHB-5","Inductor_THT/L_Radial_D40.6mm_P28.70mm_Vishay_IHB-5","Inductor_THT/L_Radial_D50.8mm_P33.27mm_Vishay_IHB-6","Inductor_THT/L_Radial_D50.8mm_P34.29mm_Vishay_IHB-6","Inductor_THT/L_Radial_D50.8mm_P35.81mm_Vishay_IHB-6","Inductor_THT/L_Radial_D50.8mm_P36.32mm_Vishay_IHB-6","Inductor_THT/L_Radial_D50.8mm_P38.86mm_Vishay_IHB-6","Inductor_THT/L_Radial_D6.0mm_P4.00mm","Inductor_THT/L_Radial_D7.0mm_P3.00mm","Inductor_THT/L_Radial_D7.2mm_P3.00mm_Murata_1700","Inductor_THT/L_Radial_D7.5mm_P3.50mm_Fastron_07P","Inductor_THT/L_Radial_D7.5mm_P5.00mm_Fastron_07P","Inductor_THT/L_Radial_D7.8mm_P5.00mm_Fastron_07HCP","Inductor_THT/L_Radial_D8.7mm_P5.00mm_Fastron_07HCP","Inductor_THT/L_Radial_D9.5mm_P5.00mm_Fastron_07HVP","Inductor_THT/L_Radial_L10.2mm_W10.2mm_Px7.62mm_Py7.62mm_Pulse_LP-30","Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.3mm","Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.5mm","Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.7mm","Inductor_THT/L_Radial_L11.5mm_W11.5mm_Px6.00mm_Py6.00mm_Neosid_NE-CPB-11EN_Drill1.8mm","Inductor_THT/L_Radial_L12.6mm_W12.6mm_Px9.52mm_Py9.52mm_Pulse_LP-37","Inductor_THT/L_Radial_L16.1mm_W16.1mm_Px7.62mm_Py12.70mm_Pulse_LP-44","Inductor_THT/L_Radial_L7.5mm_W4.6mm_P5.00mm_Neosid_SD75","Inductor_THT/L_Radial_L8.0mm_W8.0mm_P5.00mm_Neosid_NE-CPB-07E","Inductor_THT/L_Radial_L8.0mm_W8.0mm_P5.00mm_Neosid_SD8","Inductor_THT/L_Radial_L9.1mm_W9.1mm_Px6.35mm_Py6.35mm_Pulse_LP-25","Inductor_THT/L_SELF1408","Inductor_THT/L_SELF1418","Inductor_THT/L_Toroid_Horizontal_D11.2mm_P17.00mm_Diameter12-5mm_Amidon-T44","Inductor_THT/L_Toroid_Horizontal_D12.7mm_P20.00mm_Diameter14-5mm_Amidon-T50","Inductor_THT/L_Toroid_Horizontal_D16.8mm_P14.70mm_Vishay_TJ3","Inductor_THT/L_Toroid_Horizontal_D16.8mm_P14.70mm_Vishay_TJ3_BigPads","Inductor_THT/L_Toroid_Horizontal_D17.3mm_P15.24mm_Bourns_2000","Inductor_THT/L_Toroid_Horizontal_D21.8mm_P19.10mm_Bourns_2100","Inductor_THT/L_Toroid_Horizontal_D21.8mm_P19.60mm_Bourns_2100","Inductor_THT/L_Toroid_Horizontal_D22.4mm_P19.80mm_Vishay_TJ4","Inductor_THT/L_Toroid_Horizontal_D24.1mm_P21.80mm_Bourns_2200","Inductor_THT/L_Toroid_Horizontal_D24.1mm_P23.10mm_Bourns_2200","Inductor_THT/L_Toroid_Horizontal_D25.4mm_P22.90mm_Vishay_TJ5","Inductor_THT/L_Toroid_Horizontal_D25.4mm_P22.90mm_Vishay_TJ5_BigPads","Inductor_THT/L_Toroid_Horizontal_D26.0mm_P5.08mm","Inductor_THT/L_Toroid_Horizontal_D28.0mm_P25.10mm_Bourns_2200","Inductor_THT/L_Toroid_Horizontal_D28.0mm_P26.67mm_Bourns_2200","Inductor_THT/L_Toroid_Horizontal_D3.2mm_P6.40mm_Diameter3-5mm_Amidon-T12","Inductor_THT/L_Toroid_Horizontal_D32.5mm_P28.90mm_Bourns_2300","Inductor_THT/L_Toroid_Horizontal_D32.5mm_P30.00mm_Bourns_2300","Inductor_THT/L_Toroid_Horizontal_D35.1mm_P31.00mm_Vishay_TJ6","Inductor_THT/L_Toroid_Horizontal_D4.1mm_P8.00mm_Diameter4-5mm_Amidon-T16","Inductor_THT/L_Toroid_Horizontal_D40.0mm_P48.26mm","Inductor_THT/L_Toroid_Horizontal_D41.9mm_P37.60mm_Vishay_TJ7","Inductor_THT/L_Toroid_Horizontal_D49.3mm_P44.60mm_Vishay_TJ8","Inductor_THT/L_Toroid_Horizontal_D5.1mm_P9.00mm_Diameter6-5mm_Amidon-T20","Inductor_THT/L_Toroid_Horizontal_D6.5mm_P10.00mm_Diameter7-5mm_Amidon-T25","Inductor_THT/L_Toroid_Horizontal_D69.1mm_P63.20mm_Vishay_TJ9","Inductor_THT/L_Toroid_Horizontal_D7.8mm_P13.00mm_Diameter9-5mm_Amidon-T30","Inductor_THT/L_Toroid_Horizontal_D9.5mm_P15.00mm_Diameter10-5mm_Amidon-T37","Inductor_THT/L_Toroid_Vertical_L10.0mm_W5.0mm_P5.08mm","Inductor_THT/L_Toroid_Vertical_L13.0mm_W6.5mm_P5.60mm","Inductor_THT/L_Toroid_Vertical_L14.0mm_W5.6mm_P5.30mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L14.0mm_W6.3mm_P4.57mm_Pulse_A","Inductor_THT/L_Toroid_Vertical_L14.7mm_W8.6mm_P5.58mm_Pulse_KM-1","Inductor_THT/L_Toroid_Vertical_L16.0mm_W8.0mm_P7.62mm","Inductor_THT/L_Toroid_Vertical_L16.3mm_W7.1mm_P7.11mm_Pulse_H","Inductor_THT/L_Toroid_Vertical_L16.4mm_W7.6mm_P6.60mm_Vishay_TJ3","Inductor_THT/L_Toroid_Vertical_L16.5mm_W11.4mm_P7.62mm_Pulse_KM-2","Inductor_THT/L_Toroid_Vertical_L16.8mm_W9.2mm_P7.10mm_Vishay_TJ3","Inductor_THT/L_Toroid_Vertical_L16.8mm_W9.2mm_P7.10mm_Vishay_TJ3_BigPads","Inductor_THT/L_Toroid_Vertical_L17.8mm_W8.1mm_P7.62mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L17.8mm_W9.7mm_P7.11mm_Pulse_B","Inductor_THT/L_Toroid_Vertical_L19.1mm_W8.1mm_P7.10mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L21.6mm_W11.4mm_P7.62mm_Pulse_KM-3","Inductor_THT/L_Toroid_Vertical_L21.6mm_W8.4mm_P8.38mm_Pulse_G","Inductor_THT/L_Toroid_Vertical_L21.6mm_W9.1mm_P8.40mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L21.6mm_W9.5mm_P7.11mm_Pulse_C","Inductor_THT/L_Toroid_Vertical_L22.4mm_W10.2mm_P7.90mm_Vishay_TJ4","Inductor_THT/L_Toroid_Vertical_L24.6mm_W15.5mm_P11.44mm_Pulse_KM-4","Inductor_THT/L_Toroid_Vertical_L25.4mm_W14.7mm_P12.20mm_Vishay_TJ5","Inductor_THT/L_Toroid_Vertical_L25.4mm_W14.7mm_P12.20mm_Vishay_TJ5_BigPads","Inductor_THT/L_Toroid_Vertical_L26.7mm_W14.0mm_P10.16mm_Pulse_D","Inductor_THT/L_Toroid_Vertical_L28.6mm_W14.3mm_P11.43mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L31.8mm_W15.9mm_P13.50mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L33.0mm_W17.8mm_P12.70mm_Pulse_KM-5","Inductor_THT/L_Toroid_Vertical_L35.1mm_W21.1mm_P18.50mm_Vishay_TJ6","Inductor_THT/L_Toroid_Vertical_L35.6mm_W17.8mm_P12.70mm_Pulse_E","Inductor_THT/L_Toroid_Vertical_L41.9mm_W17.8mm_P12.70mm_Pulse_F","Inductor_THT/L_Toroid_Vertical_L41.9mm_W19.1mm_P15.80mm_Vishay_TJ7","Inductor_THT/L_Toroid_Vertical_L46.0mm_W19.1mm_P21.80mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L48.8mm_W25.4mm_P20.80mm_Vishay_TJ8","Inductor_THT/L_Toroid_Vertical_L54.0mm_W23.8mm_P20.10mm_Bourns_5700","Inductor_THT/L_Toroid_Vertical_L67.6mm_W36.1mm_P31.80mm_Vishay_TJ9","Inductor_THT_Wurth/L_Wurth_WE-HCFT-2012_LeadDiameter1.2mm","Inductor_THT_Wurth/L_Wurth_WE-HCFT-2012_LeadDiameter1.5mm","Inductor_THT_Wurth/L_Wurth_WE-HCFT-2504","Inductor_THT_Wurth/L_Wurth_WE-HCFT-3521","Inductor_THT_Wurth/L_Wurth_WE-HCFT-3533_LeadDiameter1.8mm","Inductor_THT_Wurth/L_Wurth_WE-HCFT-3533_LeadDiameter2.0mm","Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter0.8mm","Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter1.3mm","Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter1.5mm","Inductor_THT_Wurth/L_Wurth_WE-HCFT-3540_LeadDiameter2.0mm","Jumper/Jumper_Harwin_S1621_P10.9mm","Jumper/SolderJumper-2_P1.3mm_Bridged2Bar_Pad1.0x1.5mm","Jumper/SolderJumper-2_P1.3mm_Bridged2Bar_RoundedPad1.0x1.5mm","Jumper/SolderJumper-2_P1.3mm_Bridged_Pad1.0x1.5mm","Jumper/SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm","Jumper/SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mm","Jumper/SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm","Jumper/SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged123_Pad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged123_Pad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Bridged123_RoundedPad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged123_RoundedPad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Bridged12_Pad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged12_Pad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_Pad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_Pad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_RoundedPad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar123_RoundedPad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_Pad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_Pad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_RoundedPad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Bridged2Bar12_RoundedPad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Open_Pad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Open_Pad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm","Jumper/SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mm_NumberLabels","Jumper/SolderJumper-3_P2.0mm_Open_TrianglePad1.0x1.5mm","Jumper/SolderJumper-3_P2.0mm_Open_TrianglePad1.0x1.5mm_NumberLabels","LED_SMD/LED-APA102-2020","LED_SMD/LED-L1T2_LUMILEDS","LED_SMD/LED_01005_0402Metric","LED_SMD/LED_01005_0402Metric_Pad0.57x0.30mm_HandSolder","LED_SMD/LED_0201_0603Metric","LED_SMD/LED_0201_0603Metric_Pad0.64x0.40mm_HandSolder","LED_SMD/LED_0402_1005Metric","LED_SMD/LED_0402_1005Metric_Pad0.77x0.64mm_HandSolder","LED_SMD/LED_0603_1608Metric","LED_SMD/LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder","LED_SMD/LED_0805_2012Metric","LED_SMD/LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder","LED_SMD/LED_1206_3216Metric","LED_SMD/LED_1206_3216Metric_Pad1.42x1.75mm_HandSolder","LED_SMD/LED_1206_3216Metric_ReverseMount_Hole1.8x2.4mm","LED_SMD/LED_1210_3225Metric","LED_SMD/LED_1210_3225Metric_Pad1.42x2.65mm_HandSolder","LED_SMD/LED_1812_4532Metric","LED_SMD/LED_1812_4532Metric_Pad1.30x3.40mm_HandSolder","LED_SMD/LED_1W_3W_R8","LED_SMD/LED_2010_5025Metric","LED_SMD/LED_2010_5025Metric_Pad1.52x2.65mm_HandSolder","LED_SMD/LED_2512_6332Metric","LED_SMD/LED_2512_6332Metric_Pad1.52x3.35mm_HandSolder","LED_SMD/LED_ASMB-KTF0-0A306","LED_SMD/LED_Avago_PLCC4_3.2x2.8mm_CW","LED_SMD/LED_Avago_PLCC6_3x2.8mm","LED_SMD/LED_CSP_Samsung_LH181B_2.36x2.36mm","LED_SMD/LED_Cree-PLCC4_2x2mm_CW","LED_SMD/LED_Cree-PLCC4_3.2x2.8mm_CCW","LED_SMD/LED_Cree-PLCC4_5x5mm_CW","LED_SMD/LED_Cree-PLCC6_4.7x1.5mm","LED_SMD/LED_Cree-XB","LED_SMD/LED_Cree-XH","LED_SMD/LED_Cree-XHP35","LED_SMD/LED_Cree-XHP50_12V_HighDensity","LED_SMD/LED_Cree-XHP50_12V_HighIntensity","LED_SMD/LED_Cree-XHP50_3V_HighDensity","LED_SMD/LED_Cree-XHP50_3V_HighIntensity","LED_SMD/LED_Cree-XHP50_6V_HighDensity","LED_SMD/LED_Cree-XHP50_6V_HighIntensity","LED_SMD/LED_Cree-XHP70_12V","LED_SMD/LED_Cree-XHP70_6V","LED_SMD/LED_Cree-XP-G","LED_SMD/LED_Cree-XP","LED_SMD/LED_Cree-XQ","LED_SMD/LED_Cree-XQ_HandSoldering","LED_SMD/LED_Dialight_591","LED_SMD/LED_Everlight-SMD3528_3.5x2.8mm_67-21ST","LED_SMD/LED_Foshan-NTD3528_3.5x2.8mm","LED_SMD/LED_Inolux_IN-P55TATRGB_PLCC6_5.0x5.5mm_P1.8mm","LED_SMD/LED_Inolux_IN-PI554FCH_PLCC4_5.0x5.0mm_P3.2mm","LED_SMD/LED_Kingbright_AAA3528ESGCT","LED_SMD/LED_Kingbright_APA1606_1.6x0.6mm_Horizontal","LED_SMD/LED_Kingbright_APDA3020VBCD","LED_SMD/LED_Kingbright_APFA3010_3x1.5mm_Horizontal","LED_SMD/LED_Kingbright_APHBM2012_2x1.25mm","LED_SMD/LED_Kingbright_KPA-3010_3x2x1mm","LED_SMD/LED_Kingbright_KPBD-3224","LED_SMD/LED_LiteOn_LTST-C19HE1WT","LED_SMD/LED_LiteOn_LTST-C235KGKRKT","LED_SMD/LED_LiteOn_LTST-C295K_1.6x0.8mm","LED_SMD/LED_LiteOn_LTST-E563C_PLCC4_5.0x5.0mm_P3.2mm","LED_SMD/LED_LiteOn_LTST-E563C_PLCC4_5.0x5.0mm_P3.2mm_HandSoldering","LED_SMD/LED_LiteOn_LTST-S326","LED_SMD/LED_Lumex_SML-LX0303SIUPGUSB","LED_SMD/LED_Lumex_SML-LX0404SIUPGUSB","LED_SMD/LED_Luminus_MP-3030-1100_3.0x3.0mm","LED_SMD/LED_OPSCO_SK6812_PLCC4_5.0x5.0mm_P3.1mm","LED_SMD/LED_Osram_Lx_P47F_D2mm_ReverseMount","LED_SMD/LED_PLCC-2_3.4x3.0mm_AK","LED_SMD/LED_PLCC-2_3.4x3.0mm_KA","LED_SMD/LED_PLCC-2_3x2mm_AK","LED_SMD/LED_PLCC-2_3x2mm_KA","LED_SMD/LED_PLCC_2835","LED_SMD/LED_PLCC_2835_Handsoldering","LED_SMD/LED_RGB_1210","LED_SMD/LED_RGB_5050-6","LED_SMD/LED_RGB_Cree-PLCC-6_6x5mm_P2.1mm","LED_SMD/LED_RGB_Everlight_EASV3015RGBA0_Horizontal","LED_SMD/LED_RGB_Getian_GT-P6PRGB4303","LED_SMD/LED_RGB_Lumex_SML-LXT0805SIUGUBW","LED_SMD/LED_RGB_PLCC-6","LED_SMD/LED_RGB_Wuerth-PLCC4_3.2x2.8mm_150141M173100","LED_SMD/LED_RGB_Wuerth_150080M153000","LED_SMD/LED_ROHM_SMLVN6","LED_SMD/LED_SK6805_PLCC4_2.4x2.7mm_P1.3mm","LED_SMD/LED_SK6812MINI-E_3.2x2.8mm_P1.5mm_ReverseMount","LED_SMD/LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mm","LED_SMD/LED_SK6812_EC15_1.5x1.5mm","LED_SMD/LED_SK6812_PLCC4_5.0x5.0mm_P3.2mm","LED_SMD/LED_WS2812B-2020_PLCC4_2.0x2.0mm","LED_SMD/LED_WS2812B-Mini_PLCC4_3.5x3.5mm","LED_SMD/LED_WS2812B_PLCC4_5.0x5.0mm_P3.2mm","LED_SMD/LED_WS2812_PLCC6_5.0x5.0mm_P1.6mm","LED_SMD/LED_Wurth_150044M155260","LED_SMD/LED_Yuji_5730","LED_SMD/LED_miniPLCC_2315","LED_SMD/LED_miniPLCC_2315_Handsoldering","LED_THT/LED_BL-FL7680RGB","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z1.6mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z4.9mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z8.2mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O3.81mm_Z1.6mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O3.81mm_Z4.9mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O3.81mm_Z8.2mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O6.35mm_Z1.6mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O6.35mm_Z4.9mm","LED_THT/LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O6.35mm_Z8.2mm","LED_THT/LED_D1.8mm_W3.3mm_H2.4mm","LED_THT/LED_D10.0mm-3","LED_THT/LED_D10.0mm","LED_THT/LED_D2.0mm_W4.0mm_H2.8mm_FlatTop","LED_THT/LED_D2.0mm_W4.8mm_H2.5mm_FlatTop","LED_THT/LED_D20.0mm","LED_THT/LED_D3.0mm-3","LED_THT/LED_D3.0mm","LED_THT/LED_D3.0mm_Clear","LED_THT/LED_D3.0mm_FlatTop","LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z10.0mm","LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm","LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm_Clear","LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm_IRBlack","LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z2.0mm_IRGrey","LED_THT/LED_D3.0mm_Horizontal_O1.27mm_Z6.0mm","LED_THT/LED_D3.0mm_Horizontal_O3.81mm_Z10.0mm","LED_THT/LED_D3.0mm_Horizontal_O3.81mm_Z2.0mm","LED_THT/LED_D3.0mm_Horizontal_O3.81mm_Z6.0mm","LED_THT/LED_D3.0mm_Horizontal_O6.35mm_Z10.0mm","LED_THT/LED_D3.0mm_Horizontal_O6.35mm_Z2.0mm","LED_THT/LED_D3.0mm_Horizontal_O6.35mm_Z6.0mm","LED_THT/LED_D3.0mm_IRBlack","LED_THT/LED_D3.0mm_IRGrey","LED_THT/LED_D4.0mm","LED_THT/LED_D5.0mm-3","LED_THT/LED_D5.0mm-3_Horizontal_O3.81mm_Z3.0mm","LED_THT/LED_D5.0mm-4_RGB","LED_THT/LED_D5.0mm-4_RGB_Staggered_Pins","LED_THT/LED_D5.0mm-4_RGB_Wide_Pins","LED_THT/LED_D5.0mm","LED_THT/LED_D5.0mm_Clear","LED_THT/LED_D5.0mm_FlatTop","LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z15.0mm","LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm","LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_Clear","LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_IRBlack","LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_IRGrey","LED_THT/LED_D5.0mm_Horizontal_O1.27mm_Z9.0mm","LED_THT/LED_D5.0mm_Horizontal_O3.81mm_Z15.0mm","LED_THT/LED_D5.0mm_Horizontal_O3.81mm_Z3.0mm","LED_THT/LED_D5.0mm_Horizontal_O3.81mm_Z9.0mm","LED_THT/LED_D5.0mm_Horizontal_O6.35mm_Z15.0mm","LED_THT/LED_D5.0mm_Horizontal_O6.35mm_Z3.0mm","LED_THT/LED_D5.0mm_Horizontal_O6.35mm_Z9.0mm","LED_THT/LED_D5.0mm_IRBlack","LED_THT/LED_D5.0mm_IRGrey","LED_THT/LED_D8.0mm-3","LED_THT/LED_D8.0mm","LED_THT/LED_Oval_W5.2mm_H3.8mm","LED_THT/LED_Rectangular_W3.0mm_H2.0mm","LED_THT/LED_Rectangular_W3.9mm_H1.8mm","LED_THT/LED_Rectangular_W3.9mm_H1.9mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm-3Pins","LED_THT/LED_Rectangular_W5.0mm_H2.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O1.27mm_Z1.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O1.27mm_Z3.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O1.27mm_Z5.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O3.81mm_Z1.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O3.81mm_Z3.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O3.81mm_Z5.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O6.35mm_Z1.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O6.35mm_Z3.0mm","LED_THT/LED_Rectangular_W5.0mm_H2.0mm_Horizontal_O6.35mm_Z5.0mm","LED_THT/LED_Rectangular_W5.0mm_H5.0mm","LED_THT/LED_Rectangular_W7.62mm_H4.55mm_P5.08mm_R3","LED_THT/LED_SideEmitter_Rectangular_W4.5mm_H1.6mm","LED_THT/LED_VCCLite_5381H1_6.35x6.35mm","LED_THT/LED_VCCLite_5381H3_6.35x6.35mm","LED_THT/LED_VCCLite_5381H5_6.35x6.35mm","LED_THT/LED_VCCLite_5381H7_6.35x6.35mm","Module/A20_OLINUXINO_LIME2","Module/Adafruit_Feather","Module/Adafruit_Feather_32u4_FONA","Module/Adafruit_Feather_32u4_FONA_WithMountingHoles","Module/Adafruit_Feather_32u4_RFM","Module/Adafruit_Feather_32u4_RFM_WithMountingHoles","Module/Adafruit_Feather_M0_RFM","Module/Adafruit_Feather_M0_RFM_WithMountingHoles","Module/Adafruit_Feather_M0_Wifi","Module/Adafruit_Feather_M0_Wifi_WithMountingHoles","Module/Adafruit_Feather_WICED","Module/Adafruit_Feather_WICED_WithMountingHoles","Module/Adafruit_Feather_WithMountingHoles","Module/Adafruit_HUZZAH_ESP8266_breakout","Module/Adafruit_HUZZAH_ESP8266_breakout_WithMountingHoles","Module/Arduino_Nano","Module/Arduino_Nano_WithMountingHoles","Module/Arduino_UNO_R2","Module/Arduino_UNO_R2_WithMountingHoles","Module/Arduino_UNO_R3","Module/Arduino_UNO_R3_WithMountingHoles","Module/BeagleBoard_PocketBeagle","Module/Carambola2","Module/Electrosmith_Daisy_Seed","Module/Flipper_Zero_Angled","Module/Flipper_Zero_Straight","Module/Google_Coral_SMT_TPU_Module","Module/Maple_Mini","Module/Olimex_MOD-WIFI-ESP8266-DEV","Module/Onion_Omega2+","Module/Onion_Omega2S","Module/Pololu_Breakout-16_15.2x20.3mm","Module/RaspberryPi_Pico_Common_SMD","Module/RaspberryPi_Pico_Common_THT","Module/RaspberryPi_Pico_Common_Unspecified","Module/RaspberryPi_Pico_SMD","Module/RaspberryPi_Pico_SMD_HandSolder","Module/RaspberryPi_Pico_W_SMD","Module/RaspberryPi_Pico_W_SMD_HandSolder","Module/Raspberry_Pi_Zero_Socketed_THT_FaceDown_MountingHoles","Module/ST_Morpho_Connector_144_STLink","Module/ST_Morpho_Connector_144_STLink_MountingHoles","Module/Sipeed-M1","Module/Sipeed-M1W","Module/Texas_EUK_R-PDSS-T7_THT","Module/Texas_EUS_R-PDSS-T5_THT","Module/Texas_EUW_R-PDSS-T7_THT","Motors/Vybronics_VZ30C1T8219732L","MountingEquipment/DINRailAdapter_3xM3_PhoenixContact_1201578","MountingHole/MountingHole_2.1mm","MountingHole/MountingHole_2.2mm_M2","MountingHole/MountingHole_2.2mm_M2_DIN965","MountingHole/MountingHole_2.2mm_M2_DIN965_Pad","MountingHole/MountingHole_2.2mm_M2_DIN965_Pad_TopBottom","MountingHole/MountingHole_2.2mm_M2_DIN965_Pad_TopOnly","MountingHole/MountingHole_2.2mm_M2_ISO14580","MountingHole/MountingHole_2.2mm_M2_ISO14580_Pad","MountingHole/MountingHole_2.2mm_M2_ISO14580_Pad_TopBottom","MountingHole/MountingHole_2.2mm_M2_ISO14580_Pad_TopOnly","MountingHole/MountingHole_2.2mm_M2_ISO7380","MountingHole/MountingHole_2.2mm_M2_ISO7380_Pad","MountingHole/MountingHole_2.2mm_M2_ISO7380_Pad_TopBottom","MountingHole/MountingHole_2.2mm_M2_ISO7380_Pad_TopOnly","MountingHole/MountingHole_2.2mm_M2_Pad","MountingHole/MountingHole_2.2mm_M2_Pad_TopBottom","MountingHole/MountingHole_2.2mm_M2_Pad_TopOnly","MountingHole/MountingHole_2.2mm_M2_Pad_Via","MountingHole/MountingHole_2.5mm","MountingHole/MountingHole_2.5mm_Pad","MountingHole/MountingHole_2.5mm_Pad_TopBottom","MountingHole/MountingHole_2.5mm_Pad_TopOnly","MountingHole/MountingHole_2.5mm_Pad_Via","MountingHole/MountingHole_2.7mm","MountingHole/MountingHole_2.7mm_M2.5","MountingHole/MountingHole_2.7mm_M2.5_DIN965","MountingHole/MountingHole_2.7mm_M2.5_DIN965_Pad","MountingHole/MountingHole_2.7mm_M2.5_DIN965_Pad_TopBottom","MountingHole/MountingHole_2.7mm_M2.5_DIN965_Pad_TopOnly","MountingHole/MountingHole_2.7mm_M2.5_ISO14580","MountingHole/MountingHole_2.7mm_M2.5_ISO14580_Pad","MountingHole/MountingHole_2.7mm_M2.5_ISO14580_Pad_TopBottom","MountingHole/MountingHole_2.7mm_M2.5_ISO14580_Pad_TopOnly","MountingHole/MountingHole_2.7mm_M2.5_ISO7380","MountingHole/MountingHole_2.7mm_M2.5_ISO7380_Pad","MountingHole/MountingHole_2.7mm_M2.5_ISO7380_Pad_TopBottom","MountingHole/MountingHole_2.7mm_M2.5_ISO7380_Pad_TopOnly","MountingHole/MountingHole_2.7mm_M2.5_Pad","MountingHole/MountingHole_2.7mm_M2.5_Pad_TopBottom","MountingHole/MountingHole_2.7mm_M2.5_Pad_TopOnly","MountingHole/MountingHole_2.7mm_M2.5_Pad_Via","MountingHole/MountingHole_2.7mm_Pad","MountingHole/MountingHole_2.7mm_Pad_TopBottom","MountingHole/MountingHole_2.7mm_Pad_TopOnly","MountingHole/MountingHole_2.7mm_Pad_Via","MountingHole/MountingHole_2mm","MountingHole/MountingHole_3.2mm_M3","MountingHole/MountingHole_3.2mm_M3_DIN965","MountingHole/MountingHole_3.2mm_M3_DIN965_Pad","MountingHole/MountingHole_3.2mm_M3_DIN965_Pad_TopBottom","MountingHole/MountingHole_3.2mm_M3_DIN965_Pad_TopOnly","MountingHole/MountingHole_3.2mm_M3_ISO14580","MountingHole/MountingHole_3.2mm_M3_ISO14580_Pad","MountingHole/MountingHole_3.2mm_M3_ISO14580_Pad_TopBottom","MountingHole/MountingHole_3.2mm_M3_ISO14580_Pad_TopOnly","MountingHole/MountingHole_3.2mm_M3_ISO7380","MountingHole/MountingHole_3.2mm_M3_ISO7380_Pad","MountingHole/MountingHole_3.2mm_M3_ISO7380_Pad_TopBottom","MountingHole/MountingHole_3.2mm_M3_ISO7380_Pad_TopOnly","MountingHole/MountingHole_3.2mm_M3_Pad","MountingHole/MountingHole_3.2mm_M3_Pad_TopBottom","MountingHole/MountingHole_3.2mm_M3_Pad_TopOnly","MountingHole/MountingHole_3.2mm_M3_Pad_Via","MountingHole/MountingHole_3.5mm","MountingHole/MountingHole_3.5mm_Pad","MountingHole/MountingHole_3.5mm_Pad_TopBottom","MountingHole/MountingHole_3.5mm_Pad_TopOnly","MountingHole/MountingHole_3.5mm_Pad_Via","MountingHole/MountingHole_3.7mm","MountingHole/MountingHole_3.7mm_Pad","MountingHole/MountingHole_3.7mm_Pad_TopBottom","MountingHole/MountingHole_3.7mm_Pad_TopOnly","MountingHole/MountingHole_3.7mm_Pad_Via","MountingHole/MountingHole_3mm","MountingHole/MountingHole_3mm_Pad","MountingHole/MountingHole_3mm_Pad_TopBottom","MountingHole/MountingHole_3mm_Pad_TopOnly","MountingHole/MountingHole_3mm_Pad_Via","MountingHole/MountingHole_4.3mm_M4","MountingHole/MountingHole_4.3mm_M4_DIN965","MountingHole/MountingHole_4.3mm_M4_DIN965_Pad","MountingHole/MountingHole_4.3mm_M4_DIN965_Pad_TopBottom","MountingHole/MountingHole_4.3mm_M4_DIN965_Pad_TopOnly","MountingHole/MountingHole_4.3mm_M4_ISO14580","MountingHole/MountingHole_4.3mm_M4_ISO14580_Pad","MountingHole/MountingHole_4.3mm_M4_ISO14580_Pad_TopBottom","MountingHole/MountingHole_4.3mm_M4_ISO14580_Pad_TopOnly","MountingHole/MountingHole_4.3mm_M4_ISO7380","MountingHole/MountingHole_4.3mm_M4_ISO7380_Pad","MountingHole/MountingHole_4.3mm_M4_ISO7380_Pad_TopBottom","MountingHole/MountingHole_4.3mm_M4_ISO7380_Pad_TopOnly","MountingHole/MountingHole_4.3mm_M4_Pad","MountingHole/MountingHole_4.3mm_M4_Pad_TopBottom","MountingHole/MountingHole_4.3mm_M4_Pad_TopOnly","MountingHole/MountingHole_4.3mm_M4_Pad_Via","MountingHole/MountingHole_4.3x6.2mm_M4_Pad","MountingHole/MountingHole_4.3x6.2mm_M4_Pad_Via","MountingHole/MountingHole_4.5mm","MountingHole/MountingHole_4.5mm_Pad","MountingHole/MountingHole_4.5mm_Pad_TopBottom","MountingHole/MountingHole_4.5mm_Pad_TopOnly","MountingHole/MountingHole_4.5mm_Pad_Via","MountingHole/MountingHole_4mm","MountingHole/MountingHole_4mm_Pad","MountingHole/MountingHole_4mm_Pad_TopBottom","MountingHole/MountingHole_4mm_Pad_TopOnly","MountingHole/MountingHole_4mm_Pad_Via","MountingHole/MountingHole_5.3mm_M5","MountingHole/MountingHole_5.3mm_M5_DIN965","MountingHole/MountingHole_5.3mm_M5_DIN965_Pad","MountingHole/MountingHole_5.3mm_M5_DIN965_Pad_TopBottom","MountingHole/MountingHole_5.3mm_M5_DIN965_Pad_TopOnly","MountingHole/MountingHole_5.3mm_M5_ISO14580","MountingHole/MountingHole_5.3mm_M5_ISO14580_Pad","MountingHole/MountingHole_5.3mm_M5_ISO14580_Pad_TopBottom","MountingHole/MountingHole_5.3mm_M5_ISO14580_Pad_TopOnly","MountingHole/MountingHole_5.3mm_M5_ISO7380","MountingHole/MountingHole_5.3mm_M5_ISO7380_Pad","MountingHole/MountingHole_5.3mm_M5_ISO7380_Pad_TopBottom","MountingHole/MountingHole_5.3mm_M5_ISO7380_Pad_TopOnly","MountingHole/MountingHole_5.3mm_M5_Pad","MountingHole/MountingHole_5.3mm_M5_Pad_TopBottom","MountingHole/MountingHole_5.3mm_M5_Pad_TopOnly","MountingHole/MountingHole_5.3mm_M5_Pad_Via","MountingHole/MountingHole_5.5mm","MountingHole/MountingHole_5.5mm_Pad","MountingHole/MountingHole_5.5mm_Pad_TopBottom","MountingHole/MountingHole_5.5mm_Pad_TopOnly","MountingHole/MountingHole_5.5mm_Pad_Via","MountingHole/MountingHole_5mm","MountingHole/MountingHole_5mm_Pad","MountingHole/MountingHole_5mm_Pad_TopBottom","MountingHole/MountingHole_5mm_Pad_TopOnly","MountingHole/MountingHole_5mm_Pad_Via","MountingHole/MountingHole_6.4mm_M6","MountingHole/MountingHole_6.4mm_M6_DIN965","MountingHole/MountingHole_6.4mm_M6_DIN965_Pad","MountingHole/MountingHole_6.4mm_M6_DIN965_Pad_TopBottom","MountingHole/MountingHole_6.4mm_M6_DIN965_Pad_TopOnly","MountingHole/MountingHole_6.4mm_M6_ISO14580","MountingHole/MountingHole_6.4mm_M6_ISO14580_Pad","MountingHole/MountingHole_6.4mm_M6_ISO14580_Pad_TopBottom","MountingHole/MountingHole_6.4mm_M6_ISO14580_Pad_TopOnly","MountingHole/MountingHole_6.4mm_M6_ISO7380","MountingHole/MountingHole_6.4mm_M6_ISO7380_Pad","MountingHole/MountingHole_6.4mm_M6_ISO7380_Pad_TopBottom","MountingHole/MountingHole_6.4mm_M6_ISO7380_Pad_TopOnly","MountingHole/MountingHole_6.4mm_M6_Pad","MountingHole/MountingHole_6.4mm_M6_Pad_TopBottom","MountingHole/MountingHole_6.4mm_M6_Pad_TopOnly","MountingHole/MountingHole_6.4mm_M6_Pad_Via","MountingHole/MountingHole_6.5mm","MountingHole/MountingHole_6.5mm_Pad","MountingHole/MountingHole_6.5mm_Pad_TopBottom","MountingHole/MountingHole_6.5mm_Pad_TopOnly","MountingHole/MountingHole_6.5mm_Pad_Via","MountingHole/MountingHole_6mm","MountingHole/MountingHole_6mm_Pad","MountingHole/MountingHole_6mm_Pad_TopBottom","MountingHole/MountingHole_6mm_Pad_TopOnly","MountingHole/MountingHole_6mm_Pad_Via","MountingHole/MountingHole_8.4mm_M8","MountingHole/MountingHole_8.4mm_M8_Pad","MountingHole/MountingHole_8.4mm_M8_Pad_TopBottom","MountingHole/MountingHole_8.4mm_M8_Pad_TopOnly","MountingHole/MountingHole_8.4mm_M8_Pad_Via","MountingHole/ToolingHole_1.152mm","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H10mm_9771100360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H11mm_9771110360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H12mm_9771120360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H13mm_9771130360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H14mm_9771140360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H15mm_9771150360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H5mm_9771050360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H6mm_9771060360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H7mm_9771070360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H8mm_9771080360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSE-ExternalM3_H9mm_9771090360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H0.5mm_9774005633","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H1.5mm_9774015633","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H1mm_9774010633","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2.5mm_9774025633","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2.5mm_ThreadDepth1.5mm_97730256332","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2.5mm_ThreadDepth1.5mm_NoNPTH_97730256330","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H2mm_9774020633","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3.5mm_ThreadDepth2mm_97730356332","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3.5mm_ThreadDepth2mm_97730356334","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3.5mm_ThreadDepth2mm_NoNPTH_97730356330","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3mm_9774030633","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3mm_ThreadDepth1.8mm_97730306332","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H3mm_ThreadDepth1.8mm_NoNPTH_97730306330","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4.5mm_ThreadDepth2mm_97730456332","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4.5mm_ThreadDepth2mm_97730456334","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4.5mm_ThreadDepth2mm_NoNPTH_97730456330","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4mm_ThreadDepth2mm_97730406332","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4mm_ThreadDepth2mm_97730406334","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H4mm_ThreadDepth2mm_NoNPTH_97730406330","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H5mm_ThreadDepth2mm_97730506332","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H5mm_ThreadDepth2mm_97730506334","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H5mm_ThreadDepth2mm_NoNPTH_97730506330","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H6mm_ThreadDepth2mm_97730606332","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H6mm_ThreadDepth2mm_97730606334","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M1.6_H6mm_ThreadDepth2mm_NoNPTH_97730606330","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H0.5mm_9774005151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H1.5mm_9774015151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H10mm_9774100151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H1mm_9774010151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H2.5mm_9774025151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H2.7mm_9774027151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H2mm_9774020151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H3.5mm_9774035151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H3mm_9774030151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H4.5mm_9774045151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H4mm_9774040151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H5.5mm_9774055151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H5mm_9774050151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H6.5mm_9774065151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H6mm_9774060151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H7.5mm_9774075151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H7mm_9774070151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H8.5mm_9774085151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H8mm_9774080151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H9.5mm_9774095151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2.5_H9mm_9774090151","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H0.5mm_9774005243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H1.5mm_9774015243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H1mm_9774010243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H2.5mm_9774025243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H2mm_9774020243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H3.5mm_9774035243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H3mm_9774030243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H4.5mm_9774045243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H4mm_9774040243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H5mm_9774050243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H6mm_9774060243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H7mm_9774070243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M2_H8mm_9774080243","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H0.5mm_9774005360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H1.5mm_9774015360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H10mm_9774100360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H11mm_9774110360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H12mm_9774120360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H13mm_9774130360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H14mm_9774140360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H15mm_9774150360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H16mm_9774160360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H1mm_9774010360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H2.5mm_9774025360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H2mm_9774020360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H3mm_9774030360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H4mm_9774040360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H5mm_9774050360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H6mm_9774060360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H7mm_9774070360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H8mm_9774080360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M3_H9mm_9774090360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H10mm_9774100482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H1mm_9774010482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H2mm_9774020482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H3mm_9774030482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H4mm_9774040482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H5mm_9774050482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H6mm_9774060482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H7mm_9774070482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H8mm_9774080482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSI-M4_H9mm_9774090482","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H10.6mm_ReverseMount_9775106960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H11.6mm_ReverseMount_9775116960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H2.6mm_ReverseMount_9775026960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H3.1mm_ReverseMount_9775031960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H3.6mm_ReverseMount_9775036960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H4.1mm_ReverseMount_9775041960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H4.6mm_ReverseMount_9775046960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H5.1mm_ReverseMount_9775051960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H5.6mm_ReverseMount_9775056960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H6.6mm_ReverseMount_9775066960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H7.6mm_ReverseMount_9775076960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H8.6mm_ReverseMount_9775086960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-3.2mm_H9.6mm_ReverseMount_9775096960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H10.6mm_ReverseMount_9775106360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H11.6mm_ReverseMount_9775116360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H2.6mm_ReverseMount_9775026360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H3.1mm_ReverseMount_9775031360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H3.6mm_ReverseMount_9775036360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H4.1mm_ReverseMount_9775041360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H4.6mm_ReverseMount_9775046360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H5.1mm_ReverseMount_9775051360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H5.6mm_ReverseMount_9775056360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H6.6mm_ReverseMount_9775066360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H7.6mm_ReverseMount_9775076360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H8.6mm_ReverseMount_9775086360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSR-M3_H9.6mm_ReverseMount_9775096360","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H10mm_SnapRivet_9776100960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H2.5mm_SnapRivet_9776025960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H2mm_SnapRivet_9776020960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H3mm_SnapRivet_9776030960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H4mm_SnapRivet_9776040960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H5mm_SnapRivet_9776050960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H6mm_SnapRivet_9776060960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H7mm_SnapRivet_9776070960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H8mm_SnapRivet_9776080960","Mounting_Wuerth/Mounting_Wuerth_WA-SMSSR-3.3mm_H9mm_SnapRivet_9776090960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H1.5mm_9774015943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H1mm_9774010943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H2.5mm_9774025943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H2mm_9774020943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H3.5mm_9774035943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H3mm_9774030943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H4.5mm_9774045943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H4mm_9774040943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H5mm_9774050943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H6mm_9774060943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H7mm_9774070943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.25mm_H8mm_9774080943","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H1.5mm_9774015951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H10mm_9774100951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H1mm_9774010951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H2.5mm_9774025951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H2mm_9774020951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H3mm_9774030951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H4mm_9774040951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H5.5mm_9774055951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H5mm_9774050951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H6.5mm_9774065951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H6mm_9774060951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H7mm_9774070951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H8mm_9774080951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-2.7mm_H9mm_9774090951","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H1.5mm_9774015960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H10mm_9774100960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H11mm_9774110960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H12mm_9774120960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H13mm_9774130960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H14mm_9774140960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H15mm_9774150960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H16mm_9774160960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H1mm_9774010960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H2.5mm_9774025960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H2mm_9774020960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H3mm_9774030960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H4mm_9774040960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H5mm_9774050960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H6mm_9774060960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H7mm_9774070960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H8mm_9774080960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-3.3mm_H9mm_9774090960","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H10mm_9774100982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H1mm_9774010982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H2mm_9774020982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H3mm_9774030982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H4mm_9774040982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H5mm_9774050982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H6mm_9774060982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H7mm_9774070982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H8mm_9774080982","Mounting_Wuerth/Mounting_Wuerth_WA-SMST-4.5mm_H9mm_9774090982","Mounting_Wuerth/Mounting_Wuerth_WP-SMRA-D3.3mm_L7mm_7466300_Horizontal","Mounting_Wuerth/Mounting_Wuerth_WP-SMRA-M3_L7mm_7466303_Horizontal","NetTie/NetTie-2_SMD_Pad0.5mm","NetTie/NetTie-2_SMD_Pad2.0mm","NetTie/NetTie-2_THT_Pad0.3mm","NetTie/NetTie-2_THT_Pad1.0mm","NetTie/NetTie-3_SMD_Pad0.5mm","NetTie/NetTie-3_SMD_Pad2.0mm","NetTie/NetTie-3_THT_Pad0.3mm","NetTie/NetTie-3_THT_Pad1.0mm","NetTie/NetTie-4_SMD_Pad0.5mm","NetTie/NetTie-4_SMD_Pad2.0mm","NetTie/NetTie-4_THT_Pad0.3mm","NetTie/NetTie-4_THT_Pad1.0mm","OptoDevice/ADNS-9800","OptoDevice/AGILENT_HFBR-152x","OptoDevice/AGILENT_HFBR-252x","OptoDevice/AMS_TSL2550_SMD","OptoDevice/AMS_TSL25911FN","OptoDevice/Broadcom_AFBR-16xxZ_Horizontal","OptoDevice/Broadcom_AFBR-16xxZ_Tilted","OptoDevice/Broadcom_AFBR-16xxZ_Vertical","OptoDevice/Broadcom_APDS-9160-003","OptoDevice/Broadcom_APDS-9301","OptoDevice/Broadcom_DFN-6_2x2mm_P0.65mm","OptoDevice/Broadcom_LGA-8_2x2mm_P0.53mm","OptoDevice/Broadcom_LGA-8_2x2mm_P0.5mm","OptoDevice/Everlight_IRM-H6xxT","OptoDevice/Everlight_ITR1201SR10AR","OptoDevice/Everlight_ITR8307","OptoDevice/Everlight_ITR8307F43","OptoDevice/Everlight_ITR8307_Reverse","OptoDevice/Everlight_ITR9608-F","OptoDevice/Finder_34.81","OptoDevice/Hamamatsu_C12880","OptoDevice/Hamamatsu_S13360-30CS","OptoDevice/Hamamatsu_S14160-6050HS","OptoDevice/Kingbright_KPS-3227","OptoDevice/Kingbright_KPS-5130","OptoDevice/Kingbright_KRC011_Horizontal","OptoDevice/Kingbright_KRC011_Vertical","OptoDevice/Kodenshi_LG206D","OptoDevice/Kodenshi_LG206L","OptoDevice/Kodenshi_SG105","OptoDevice/Kodenshi_SG105F","OptoDevice/Kodenshi_SG105_Reverse","OptoDevice/LaserDiode_TO18-D5.6-3","OptoDevice/LaserDiode_TO3.3-D3.3-3","OptoDevice/LaserDiode_TO38ICut-3","OptoDevice/LaserDiode_TO5-D9-3","OptoDevice/LaserDiode_TO56-3","OptoDevice/Lightpipe_Bivar_RLP1-400-650","OptoDevice/Lightpipe_Bivar_SLP3-150-100-F","OptoDevice/Lightpipe_Bivar_SLP3-150-100-R","OptoDevice/Lightpipe_Bivar_SLP3-150-150-F","OptoDevice/Lightpipe_Bivar_SLP3-150-150-R","OptoDevice/Lightpipe_Bivar_SLP3-150-200-R","OptoDevice/Lightpipe_Bivar_SLP3-150-250-F","OptoDevice/Lightpipe_Bivar_SLP3-150-250-R","OptoDevice/Lightpipe_Bivar_SLP3-150-300-F","OptoDevice/Lightpipe_Bivar_SLP3-150-300-R","OptoDevice/Lightpipe_Bivar_SLP3-150-450-R","OptoDevice/Lightpipe_Dialight_515-1064F","OptoDevice/Lightpipe_LPF-C012303S","OptoDevice/Lightpipe_LPF-C013301S","OptoDevice/Lightpipe_Mentor_1275.x00x","OptoDevice/Lightpipe_Mentor_1276.1004","OptoDevice/Lightpipe_Mentor_1276.2004","OptoDevice/Lite-On_LTR-303ALS-01","OptoDevice/Luna_NSL-32","OptoDevice/Maxim_OLGA-14_3.3x5.6mm_P0.8mm","OptoDevice/ONSemi_QSE15x","OptoDevice/OnSemi_CASE100AQ","OptoDevice/OnSemi_CASE100CY","OptoDevice/Osram_BP104-SMD","OptoDevice/Osram_BPW34S-SMD","OptoDevice/Osram_BPW82","OptoDevice/Osram_DIL2_4.3x4.65mm_P5.08mm","OptoDevice/Osram_LPT80A","OptoDevice/Osram_SFH205","OptoDevice/Osram_SFH2201","OptoDevice/Osram_SFH225","OptoDevice/Osram_SFH2430","OptoDevice/Osram_SFH2440","OptoDevice/Osram_SFH3710","OptoDevice/Osram_SFH9x0x","OptoDevice/Osram_SMD-SmartDIL","OptoDevice/Panasonic_APV-AQY_SSOP-4_4.45x2.65mm_P1.27mm","OptoDevice/PerkinElmer_VTL5C","OptoDevice/PerkinElmer_VTL5Cx2","OptoDevice/R_LDR_10x8.5mm_P7.6mm_Vertical","OptoDevice/R_LDR_11x9.4mm_P8.2mm_Vertical","OptoDevice/R_LDR_12x10.8mm_P9.0mm_Vertical","OptoDevice/R_LDR_4.9x4.2mm_P2.54mm_Vertical","OptoDevice/R_LDR_5.0x4.1mm_P3mm_Vertical","OptoDevice/R_LDR_5.1x4.3mm_P3.4mm_Vertical","OptoDevice/R_LDR_5.2x5.2mm_P3.5mm_Horizontal","OptoDevice/R_LDR_7x6mm_P5.1mm_Vertical","OptoDevice/R_LDR_D13.8mm_P9.0mm_Vertical","OptoDevice/R_LDR_D20mm_P17.5mm_Vertical","OptoDevice/R_LDR_D6.4mm_P3.4mm_Vertical","OptoDevice/Renesas_DFN-6_1.5x1.6mm_P0.5mm","OptoDevice/Rohm_RPR-0720","OptoDevice/ST_VL53L0X","OptoDevice/Sharp_GP2S700HCP","OptoDevice/Sharp_GP2Y0A41SK0F","OptoDevice/Sharp_IS471F","OptoDevice/Sharp_IS485","OptoDevice/Siemens_SFH900","OptoDevice/Toshiba_TORX170_TORX173_TORX193_TORX194","OptoDevice/Toshiba_TOTX170_TOTX173_TOTX193_TOTX194","OptoDevice/Vishay_CAST-3Pin","OptoDevice/Vishay_CNY70","OptoDevice/Vishay_MINICAST-3Pin","OptoDevice/Vishay_MINIMOLD-3Pin","OptoDevice/Vishay_MOLD-3Pin","OptoDevice/Vishay_TCRT5000","Oscillator/Oscillator_DIP-14","Oscillator/Oscillator_DIP-14_LargePads","Oscillator/Oscillator_DIP-8","Oscillator/Oscillator_DIP-8_LargePads","Oscillator/Oscillator_OCXO_Morion_MV267","Oscillator/Oscillator_OCXO_Morion_MV317","Oscillator/Oscillator_SMD_Abracon_ABLNO","Oscillator/Oscillator_SMD_Abracon_ASCO-4Pin_1.6x1.2mm","Oscillator/Oscillator_SMD_Abracon_ASDMB-4Pin_2.5x2.0mm","Oscillator/Oscillator_SMD_Abracon_ASE-4Pin_3.2x2.5mm","Oscillator/Oscillator_SMD_Abracon_ASE-4Pin_3.2x2.5mm_HandSoldering","Oscillator/Oscillator_SMD_Abracon_ASV-4Pin_7.0x5.1mm","Oscillator/Oscillator_SMD_Abracon_ASV-4Pin_7.0x5.1mm_HandSoldering","Oscillator/Oscillator_SMD_Diodes_FN-4Pin_7.0x5.0mm","Oscillator/Oscillator_SMD_ECS_2520MV-xxx-xx-4Pin_2.5x2.0mm","Oscillator/Oscillator_SMD_EuroQuartz_XO32-4Pin_3.2x2.5mm","Oscillator/Oscillator_SMD_EuroQuartz_XO32-4Pin_3.2x2.5mm_RotB","Oscillator/Oscillator_SMD_EuroQuartz_XO32-4Pin_3.2x2.5mm_RotB_HandSoldering","Oscillator/Oscillator_SMD_EuroQuartz_XO53-4Pin_5.0x3.2mm","Oscillator/Oscillator_SMD_EuroQuartz_XO53-4Pin_5.0x3.2mm_HandSoldering","Oscillator/Oscillator_SMD_EuroQuartz_XO91-4Pin_7.0x5.0mm","Oscillator/Oscillator_SMD_EuroQuartz_XO91-4Pin_7.0x5.0mm_HandSoldering","Oscillator/Oscillator_SMD_Fordahl_DFAS1-6Pin_14.8x9.1mm","Oscillator/Oscillator_SMD_Fordahl_DFAS11-4Pin_7.0x5.0mm","Oscillator/Oscillator_SMD_Fordahl_DFAS11-4Pin_7.0x5.0mm_HandSoldering","Oscillator/Oscillator_SMD_Fordahl_DFAS15-4Pin_5.0x3.2mm","Oscillator/Oscillator_SMD_Fordahl_DFAS15-4Pin_5.0x3.2mm_HandSoldering","Oscillator/Oscillator_SMD_Fordahl_DFAS2-4Pin_7.3x5.1mm","Oscillator/Oscillator_SMD_Fordahl_DFAS2-4Pin_7.3x5.1mm_HandSoldering","Oscillator/Oscillator_SMD_Fordahl_DFAS3-4Pin_9.1x7.2mm","Oscillator/Oscillator_SMD_Fordahl_DFAS3-4Pin_9.1x7.2mm_HandSoldering","Oscillator/Oscillator_SMD_Fordahl_DFAS7-4Pin_19.9x12.9mm","Oscillator/Oscillator_SMD_Fordahl_DFAS7-4Pin_19.9x12.9mm_HandSoldering","Oscillator/Oscillator_SMD_Fox_FT5H_5.0x3.2mm","Oscillator/Oscillator_SMD_IDT_JS6-6_5.0x3.2mm_P1.27mm","Oscillator/Oscillator_SMD_IDT_JU6-6_7.0x5.0mm_P2.54mm","Oscillator/Oscillator_SMD_IQD_IQXO70-4Pin_7.5x5.0mm","Oscillator/Oscillator_SMD_IQD_IQXO70-4Pin_7.5x5.0mm_HandSoldering","Oscillator/Oscillator_SMD_Kyocera_2520-6Pin_2.5x2.0mm","Oscillator/Oscillator_SMD_Kyocera_KC2520Z-4Pin_2.5x2.0mm","Oscillator/Oscillator_SMD_OCXO_ConnorWinfield_OH300","Oscillator/Oscillator_SMD_SI570_SI571_HandSoldering","Oscillator/Oscillator_SMD_SI570_SI571_Standard","Oscillator/Oscillator_SMD_SeikoEpson_SG210-4Pin_2.5x2.0mm","Oscillator/Oscillator_SMD_SeikoEpson_SG210-4Pin_2.5x2.0mm_HandSoldering","Oscillator/Oscillator_SMD_SeikoEpson_SG3030CM","Oscillator/Oscillator_SMD_SeikoEpson_SG8002CA-4Pin_7.0x5.0mm","Oscillator/Oscillator_SMD_SeikoEpson_SG8002CA-4Pin_7.0x5.0mm_HandSoldering","Oscillator/Oscillator_SMD_SeikoEpson_SG8002CE-4Pin_3.2x2.5mm","Oscillator/Oscillator_SMD_SeikoEpson_SG8002CE-4Pin_3.2x2.5mm_HandSoldering","Oscillator/Oscillator_SMD_SeikoEpson_SG8002JA-4Pin_14.0x8.7mm","Oscillator/Oscillator_SMD_SeikoEpson_SG8002JA-4Pin_14.0x8.7mm_HandSoldering","Oscillator/Oscillator_SMD_SeikoEpson_SG8002JC-4Pin_10.5x5.0mm","Oscillator/Oscillator_SMD_SeikoEpson_SG8002JC-4Pin_10.5x5.0mm_HandSoldering","Oscillator/Oscillator_SMD_SeikoEpson_SG8002LB-4Pin_5.0x3.2mm","Oscillator/Oscillator_SMD_SeikoEpson_SG8002LB-4Pin_5.0x3.2mm_HandSoldering","Oscillator/Oscillator_SMD_SeikoEpson_TG2520SMN-xxx-xxxxxx-4Pin_2.5x2.0mm","Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_2.0x1.6mm","Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_2.5x2.0mm","Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_3.2x2.5mm","Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_5.0x3.2mm","Oscillator/Oscillator_SMD_SiT_PQFN-4Pin_7.0x5.0mm","Oscillator/Oscillator_SMD_SiTime_PQFD-6L_3.2x2.5mm","Oscillator/Oscillator_SMD_SiTime_SiT9121-6Pin_3.2x2.5mm","Oscillator/Oscillator_SMD_Silicon_Labs_LGA-6_2.5x3.2mm_P1.25mm","Oscillator/Oscillator_SMD_TCXO_G158","Oscillator/Oscillator_SMD_TXC_7C-4Pin_5.0x3.2mm","Oscillator/Oscillator_SMD_TXC_7C-4Pin_5.0x3.2mm_HandSoldering","Oscillator/Oscillator_SeikoEpson_SG-8002DB","Oscillator/Oscillator_SeikoEpson_SG-8002DC","Package_BGA/Alliance_TFBGA-36_6x8mm_Layout6x8_P0.75mm","Package_BGA/Alliance_TFBGA-54_8x8mm_Layout9x9_P0.8mm","Package_BGA/Analog_BGA-165_11.9x16mm_Layout11x15_P1.0mm","Package_BGA/Analog_BGA-209_9.5x16mm_Layout11x19_P0.8mm","Package_BGA/Analog_BGA-28_4x6.25mm_Layout4x7_P0.8mm","Package_BGA/Analog_BGA-49_6.25x6.25mm_Layout7x7_P0.8mm","Package_BGA/Analog_BGA-77_9x15mm_Layout7x11_P1.27mm","Package_BGA/BGA-100_11.0x11.0mm_Layout10x10_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD","Package_BGA/BGA-100_12x18mm_Layout10x17_P1mm","Package_BGA/BGA-100_14x18mm_Layout10x17_P1mm","Package_BGA/BGA-100_6.0x6.0mm_Layout11x11_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD","Package_BGA/BGA-1023_33.0x33.0mm_Layout32x32_P1.0mm","Package_BGA/BGA-1156_35.0x35.0mm_Layout34x34_P1.0mm","Package_BGA/BGA-121_9.0x9.0mm_Layout11x11_P0.8mm_Ball0.4mm_Pad0.35mm_NSMD","Package_BGA/BGA-1295_37.5x37.5mm_Layout36x36_P1.0mm","Package_BGA/BGA-132_12x18mm_Layout11x17_P1.0mm","Package_BGA/BGA-132_12x18mm_Layout11x17_P1mm","Package_BGA/BGA-144_13.0x13.0mm_Layout12x12_P1.0mm","Package_BGA/BGA-144_7.0x7.0mm_Layout13x13_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD","Package_BGA/BGA-152_14x18mm_Layout13x17_P0.5mm","Package_BGA/BGA-152_14x18mm_Layout13x17_P1mm","Package_BGA/BGA-153_8.0x8.0mm_Layout15x15_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD","Package_BGA/BGA-169_11.0x11.0mm_Layout13x13_P0.8mm_Ball0.5mm_Pad0.4mm_NSMD","Package_BGA/BGA-16_1.92x1.92mm_Layout4x4_P0.5mm","Package_BGA/BGA-196_15x15mm_Layout14x14_P1.0mm","Package_BGA/BGA-200_10x14.5mm_Layout12x22_P0.8x0.65mm","Package_BGA/BGA-24_6x8mm_Layout5x5_P1.0mm","Package_BGA/BGA-24_8x8mm_Layout5x5_P1.0mm","Package_BGA/BGA-256_11.0x11.0mm_Layout20x20_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD","Package_BGA/BGA-256_14.0x14.0mm_Layout16x16_P0.8mm_Ball0.45mm_Pad0.32mm_NSMD","Package_BGA/BGA-256_17.0x17.0mm_Layout16x16_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD","Package_BGA/BGA-25_6.35x6.35mm_Layout5x5_P1.27mm","Package_BGA/BGA-324_15.0x15.0mm_Layout18x18_P0.8mm_Ball0.5mm_Pad0.4mm_NSMD","Package_BGA/BGA-324_15x15mm_Layout18x18_P0.8mm","Package_BGA/BGA-324_19.0x19.0mm_Layout18x18_P1.0mm_Ball0.5mm_Pad0.4mm_NSMD","Package_BGA/BGA-352_35.0x35.0mm_Layout26x26_P1.27mm","Package_BGA/BGA-36_3.396x3.466mm_Layout6x6_P0.4mm_Ball0.25mm_Pad0.2mm_NSMD","Package_BGA/BGA-400_21.0x21.0mm_Layout20x20_P1.0mm","Package_BGA/BGA-484_23.0x23.0mm_Layout22x22_P1.0mm","Package_BGA/BGA-48_8.0x9.0mm_Layout6x8_P0.8mm","Package_BGA/BGA-529_19x19mm_Layout23x23_P0.8mm","Package_BGA/BGA-624_21x21mm_Layout25x25_P0.8mm","Package_BGA/BGA-625_21.0x21.0mm_Layout25x25_P0.8mm","Package_BGA/BGA-63_9x11mm_Layout10x12_P0.8mm","Package_BGA/BGA-64_9.0x9.0mm_Layout10x10_P0.8mm","Package_BGA/BGA-672_27.0x27.0mm_Layout26x26_P1.0mm_Ball0.6mm_Pad0.5mm_NSMD","Package_BGA/BGA-676_27.0x27.0mm_Layout26x26_P1.0mm_Ball0.6mm_Pad0.5mm_NSMD","Package_BGA/BGA-68_5.0x5.0mm_Layout9x9_P0.5mm_Ball0.3mm_Pad0.25mm_NSMD","Package_BGA/BGA-81_4.496x4.377mm_Layout9x9_P0.4mm_Ball0.25mm_Pad0.2mm_NSMD","Package_BGA/BGA-90_8.0x13.0mm_Layout2x3x15_P0.8mm","Package_BGA/BGA-96_9.0x13.0mm_Layout2x3x16_P0.8mm","Package_BGA/BGA-9_1.6x1.6mm_Layout3x3_P0.5mm","Package_BGA/EPC_BGA-4_0.9x0.9mm_Layout2x2_P0.45mm","Package_BGA/FB-BGA-484_23.0x23.0mm_Layout22x22_P1.0mm","Package_BGA/FBGA-78_7.5x10.5mm_Layout9x13_P0.8mm","Package_BGA/FBGA-78_7.5x10.6mm_Layout9x13_P0.8mm","Package_BGA/FBGA-78_7.5x11mm_Layout2x3x13_P0.8mm","Package_BGA/FBGA-78_8x10.5mm_Layout9x13_P0.8mm","Package_BGA/FBGA-78_9x10.5mm_Layout9x13_P0.8mm","Package_BGA/FBGA-78_9x10.6mm_Layout9x13_P0.8mm","Package_BGA/FBGA-96_7.5x13.5mm_Layout9x16_P0.8mm","Package_BGA/FBGA-96_7.5x13mm_Layout9x16_P0.8mm","Package_BGA/FBGA-96_8x13mm_Layout9x16_P0.8mm","Package_BGA/FBGA-96_8x14mm_Layout9x16_P0.8mm","Package_BGA/FBGA-96_9x13mm_Layout9x16_P0.8mm","Package_BGA/FBGA-96_9x14mm_Layout9x16_P0.8mm","Package_BGA/FCPBGA-780_23x23mm_Layout28x28_P0.8mm","Package_BGA/Fujitsu_WLP-15_2.28x3.092mm_Layout3x5_P0.4mm","Package_BGA/Infineon_LFBGA-292_17x17mm_Layout20x20_P0.8mm","Package_BGA/Infineon_TFBGA-48_6x10mm_Layout6x8_P0.75mm","Package_BGA/LFBGA-100_10x10mm_Layout10x10_P0.8mm","Package_BGA/LFBGA-144_10x10mm_Layout12x12_P0.8mm","Package_BGA/LFBGA-153_11.5x13mm_Layout14x14_P0.5mm","Package_BGA/LFBGA-169_12x16mm_Layout14x28_P0.5mm","Package_BGA/LFBGA-169_12x18mm_Layout14x28_P0.5mm","Package_BGA/LFBGA-169_14x18mm_Layout14x28_P0.5mm","Package_BGA/LFBGA-289_14x14mm_Layout17x17_P0.8mm","Package_BGA/LFBGA-400_16x16mm_Layout20x20_P0.8mm","Package_BGA/LFBGA-484_18x18mm_Layout22x22_P0.8mm","Package_BGA/Lattice_caBGA-381_17x17mm_Layout20x20_P0.8mm","Package_BGA/Lattice_caBGA-381_17x17mm_Layout20x20_P0.8mm_SMD","Package_BGA/Lattice_caBGA-756_27x27mm_Layout32x32_P0.8mm","Package_BGA/Lattice_iCE40_csBGA-132_8x8mm_Layout14x14_P0.5mm","Package_BGA/Linear_BGA-133_15.0x15.0mm_Layout12x12_P1.27mm","Package_BGA/MAPBGA-272_9x9mm_Layout17x17_P0.5mm","Package_BGA/MAPBGA-289_14x14mm_Layout17x17_P0.8mm","Package_BGA/Maxim_WLP-12","Package_BGA/Maxim_WLP-12_2.008x1.608mm_Layout4x3_P0.4mm","Package_BGA/Maxim_WLP-9_1.595x1.415_Layout3x3_P0.4mm_Ball0.27mm_Pad0.25mm_NSMD","Package_BGA/Microchip_FCG1152_BGA-1152_35x35mm_Layout34x34_P1.0mm","Package_BGA/Microchip_FCSG325_BGA-325_11x11mm_Layout21x21_P0.5mm","Package_BGA/Microchip_FCSG536_BGA-536_16x16mm_Layout30x30_P0.5mm","Package_BGA/Microchip_FCVG484_BGA-484_19x19mm_Layout22x22_P0.8mm","Package_BGA/Microchip_FCVG784_BGA-784_23x23mm_Layout28x28_P0.8mm","Package_BGA/Microchip_TFBGA-196_11x11mm_Layout14x14_P0.75mm_SMD","Package_BGA/Micron_FBGA-78_7.5x10.6mm_Layout9x13_P0.8mm","Package_BGA/Micron_FBGA-78_8x10.5mm_Layout9x13_P0.8mm","Package_BGA/Micron_FBGA-78_9x10.5mm_Layout9x13_P0.8mm","Package_BGA/Micron_FBGA-96_7.5x13.5mm_Layout9x16_P0.8mm","Package_BGA/Micron_FBGA-96_8x14mm_Layout9x16_P0.8mm","Package_BGA/Micron_FBGA-96_9x14mm_Layout9x16_P0.8mm","Package_BGA/NXP_SOT1982-1_VFBGA-98_7x7mm_Layout13x13_P0.5mm","Package_BGA/NXP_SOT2162-1_VFBGA-59_4x4mm_Layout9x9_P0.4mm","Package_BGA/NXP_TFBGA-50_5x5mm_Layout9x9_P0.5mm","Package_BGA/NXP_VFBGA-42_2.6x3mm_Layout6x7_P0.4mm","Package_BGA/ST_LFBGA-354_16x16mm_Layout19x19_P0.8mm","Package_BGA/ST_LFBGA-448_18x18mm_Layout22x22_P0.8mm","Package_BGA/ST_TFBGA-169_7x7mm_Layout13x13_P0.5mm","Package_BGA/ST_TFBGA-225_13x13mm_Layout15x15_P0.8mm","Package_BGA/ST_TFBGA-257_10x10mm_Layout19x19_P0.5mmP0.65mm","Package_BGA/ST_TFBGA-320_11x11mm_Layout21x21_P0.5mm","Package_BGA/ST_TFBGA-361_12x12mm_Layout23x23_P0.5mmP0.65mm","Package_BGA/ST_TFBGA-436_18x18mm_Layout22x22_P0.8mm","Package_BGA/ST_UFBGA-121_6x6mm_Layout11x11_P0.5mm","Package_BGA/ST_UFBGA-129_7x7mm_Layout13x13_P0.5mm","Package_BGA/ST_UFBGA-59_5x5mm_Layout8x8_P0.5mm","Package_BGA/ST_UFBGA-73_5x5mm_Layout9x9_P0.5mm","Package_BGA/ST_UFBGA-81_5x5mm_Layout9x9_P0.5mm","Package_BGA/ST_VFBGA-361_10x10mm_Layout19x19_P0.5mm","Package_BGA/ST_VFBGA-424_14x14mm_Layout27x27_P0.5mmP0.5x0.5mm_Stagger","Package_BGA/ST_uTFBGA-36_3.6x3.6mm_Layout6x6_P0.5mm","Package_BGA/TFBGA-100_5.5x5.5mm_Layout10x10_P0.5mm","Package_BGA/TFBGA-100_8x8mm_Layout10x10_P0.8mm","Package_BGA/TFBGA-100_9.0x9.0mm_Layout10x10_P0.8mm","Package_BGA/TFBGA-121_10x10mm_Layout11x11_P0.8mm","Package_BGA/TFBGA-169_9x9mm_Layout13x13_P0.65mm","Package_BGA/TFBGA-216_13x13mm_Layout15x15_P0.8mm","Package_BGA/TFBGA-225_10x10mm_Layout15x15_P0.65mm","Package_BGA/TFBGA-256_13x13mm_Layout16x16_P0.8mm","Package_BGA/TFBGA-265_14x14mm_Layout17x17_P0.8mm","Package_BGA/TFBGA-289_9x9mm_Layout17x17_P0.5mm","Package_BGA/TFBGA-324_12x12mm_Layout18x18_P0.65mm","Package_BGA/TFBGA-361_13x13mm_Layout19x19_P0.65mm","Package_BGA/TFBGA-48_6x10mm_Layout6x8_P0.75mm","Package_BGA/TFBGA-49_3x3mm_Layout7x7_P0.4mm","Package_BGA/TFBGA-576_16x16mm_Layout24x24_P0.65mm","Package_BGA/TFBGA-644_19x19mm_Layout28x28_P0.65mm","Package_BGA/TFBGA-64_5x5mm_Layout8x8_P0.5mm","Package_BGA/TFBGA-81_5x5mm_Layout9x9_P0.5mm","Package_BGA/Texas_BGA-289_15x15mm_Layout17x17_P0.8mm","Package_BGA/Texas_DSBGA-10_1.36x1.86mm_Layout3x4_P0.5mm","Package_BGA/Texas_DSBGA-12_1.36x1.86mm_Layout3x4_P0.5mm","Package_BGA/Texas_DSBGA-12_2.11x1.61mm_Layout4x3_P0.5mm","Package_BGA/Texas_DSBGA-16_2.39x2.39mm_Layout4x4_P0.5mm","Package_BGA/Texas_DSBGA-28_1.9x3mm_Layout4x7_P0.4mm","Package_BGA/Texas_DSBGA-49_3.33x3.488mm_Layout7x7_P0.4mm","Package_BGA/Texas_DSBGA-5_0.822x1.116mm_Layout2x1x2_P0.4mm","Package_BGA/Texas_DSBGA-5_0.8875x1.3875mm_Layout2x3_P0.5mm","Package_BGA/Texas_DSBGA-5_1.5855x1.6365mm_Layout3x2_P0.5mm","Package_BGA/Texas_DSBGA-64_3.415x3.535mm_Layout8x8_P0.4mm","Package_BGA/Texas_DSBGA-6_0.704x1.054mm_Layout2x3_P0.35mm","Package_BGA/Texas_DSBGA-6_0.757x1.01mm_Layout2x3_P0.35mm","Package_BGA/Texas_DSBGA-6_0.76x1.16mm_Layout2x3_P0.4mm","Package_BGA/Texas_DSBGA-6_0.855x1.255mm_Layout2x3_P0.4mm_LevelB","Package_BGA/Texas_DSBGA-6_0.855x1.255mm_Layout2x3_P0.4mm_LevelC","Package_BGA/Texas_DSBGA-6_0.95x1.488mm_Layout2x3_P0.4mm","Package_BGA/Texas_DSBGA-6_0.9x1.4mm_Layout2x3_P0.5mm","Package_BGA/Texas_DSBGA-8_0.705x1.468mm_Layout2x4_P0.4mm","Package_BGA/Texas_DSBGA-8_0.9x1.9mm_Layout2x4_P0.5mm","Package_BGA/Texas_DSBGA-8_1.43x1.41mm_Layout3x3_P0.5mm","Package_BGA/Texas_DSBGA-8_1.5195x1.5195mm_Layout3x3_P0.5mm","Package_BGA/Texas_DSBGA-9_1.4715x1.4715mm_Layout3x3_P0.5mm","Package_BGA/Texas_DSBGA-9_1.62x1.58mm_Layout3x3_P0.5mm","Package_BGA/Texas_MicroStar_Junior_BGA-113_7x7mm_Layout12x12_P0.5mm","Package_BGA/Texas_MicroStar_Junior_BGA-12_2.0x2.5mm_Layout4x3_P0.5mm","Package_BGA/Texas_MicroStar_Junior_BGA-80_5.0x5.0mm_Layout9x9_P0.5mm","Package_BGA/Texas_PicoStar_BGA-4_0.758x0.758mm_Layout2x2_P0.4mm","Package_BGA/Texas_YFP0020_DSBGA-20_1.588x1.988mm_Layout4x5_P0.4mm","Package_BGA/UCBGA-36_2.5x2.5mm_Layout6x6_P0.4mm","Package_BGA/UCBGA-49_3x3mm_Layout7x7_P0.4mm","Package_BGA/UCBGA-81_4x4mm_Layout9x9_P0.4mm","Package_BGA/UFBGA-100_7x7mm_Layout12x12_P0.5mm","Package_BGA/UFBGA-132_7x7mm_Layout12x12_P0.5mm","Package_BGA/UFBGA-132_7x7mm_P0.5mm","Package_BGA/UFBGA-144_10x10mm_Layout12x12_P0.8mm","Package_BGA/UFBGA-144_7x7mm_Layout12x12_P0.5mm","Package_BGA/UFBGA-15_3.0x3.0mm_Layout4x4_P0.65mm","Package_BGA/UFBGA-169_7x7mm_Layout13x13_P0.5mm","Package_BGA/UFBGA-201_10x10mm_Layout15x15_P0.65mm","Package_BGA/UFBGA-32_4.0x4.0mm_Layout6x6_P0.5mm","Package_BGA/UFBGA-64_5x5mm_Layout8x8_P0.5mm","Package_BGA/VFBGA-100_7.0x7.0mm_Layout10x10_P0.65mm","Package_BGA/VFBGA-49_5.0x5.0mm_Layout7x7_P0.65mm","Package_BGA/VFBGA-86_6x6mm_Layout10x10_P0.55mm","Package_BGA/WLP-4_0.728x0.728mm_Layout2x2_P0.35mm","Package_BGA/WLP-4_0.83x0.83mm_P0.4mm","Package_BGA/WLP-4_0.86x0.86mm_P0.4mm","Package_BGA/WLP-9_1.468x1.448mm_Layout3x3_P0.4mm","Package_BGA/XBGA-121_10x10mm_Layout11x11_P0.8mm","Package_BGA/XFBGA-121_8x8mm_Layout11x11_P0.65mm","Package_BGA/XFBGA-36_3.5x3.5mm_Layout6x6_P0.5mm","Package_BGA/XFBGA-64_5.0x5.0mm_Layout8x8_P0.5mm","Package_BGA/Xilinx_CLG225","Package_BGA/Xilinx_CLG400","Package_BGA/Xilinx_CLG484_CLG485","Package_BGA/Xilinx_CPG236","Package_BGA/Xilinx_CPG238","Package_BGA/Xilinx_CPGA196","Package_BGA/Xilinx_CSG324","Package_BGA/Xilinx_CSG325","Package_BGA/Xilinx_CSGA225","Package_BGA/Xilinx_CSGA324","Package_BGA/Xilinx_FBG484","Package_BGA/Xilinx_FBG676","Package_BGA/Xilinx_FBG900","Package_BGA/Xilinx_FFG1156","Package_BGA/Xilinx_FFG1157_FFG1158","Package_BGA/Xilinx_FFG1761","Package_BGA/Xilinx_FFG1926_FFG1927_FFG1928_FFG1930","Package_BGA/Xilinx_FFG676","Package_BGA/Xilinx_FFG900_FFG901","Package_BGA/Xilinx_FFV1761","Package_BGA/Xilinx_FGG484","Package_BGA/Xilinx_FGG676","Package_BGA/Xilinx_FGGA484","Package_BGA/Xilinx_FGGA676","Package_BGA/Xilinx_FHG1761","Package_BGA/Xilinx_FLG1925_FLG1926_FLG1928_FLG1930","Package_BGA/Xilinx_FTG256","Package_BGA/Xilinx_FTGB196","Package_BGA/Xilinx_RB484","Package_BGA/Xilinx_RB676","Package_BGA/Xilinx_RF1156","Package_BGA/Xilinx_RF1157_RF1158","Package_BGA/Xilinx_RF1761","Package_BGA/Xilinx_RF1930","Package_BGA/Xilinx_RF676","Package_BGA/Xilinx_RF900","Package_BGA/Xilinx_RFG676","Package_BGA/Xilinx_RS484","Package_BGA/Xilinx_SBG484","Package_BGA/Xilinx_SBG485","Package_BGA/csBGA-64_5x5mm_Layout8x8_P0.5mm","Package_BGA/ucBGA-64_4x4mm_Layout8x8_P0.4mm","Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm","Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias","Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.35x2.35mm","Package_CSP/Analog_LFCSP-16-1EP_4x4mm_P0.65mm_EP2.35x2.35mm_ThermalVias","Package_CSP/Analog_LFCSP-8-1EP_3x3mm_P0.5mm_EP1.53x1.85mm","Package_CSP/Analog_LFCSP-UQ-10_1.3x1.6mm_P0.4mm","Package_CSP/Anpec_WLCSP-20_1.76x2.03mm_Layout4x5_P0.4mm","Package_CSP/Dialog_WLCSP-34_4.54x1.66mm_Layout17x4_P0.25x0.34mm","Package_CSP/DiodesInc_GEA20_WLCSP-20_1.7x2.1mm_Layout4x5_P0.4mm","Package_CSP/Efinix_WLCSP-64_3.5353x3.3753mm_Layout8x8_P0.4mm","Package_CSP/Efinix_WLCSP-80_4.4567x3.5569mm_Layout10x8_P0.4mm","Package_CSP/LFCSP-10_2x2mm_P0.5mm","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.3x1.3mm","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.3x1.3mm_ThermalVias","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.5x1.5mm","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm_ThermalVias","Package_CSP/LFCSP-16-1EP_3x3mm_P0.5mm_EP1.854x1.854mm","Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm","Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.4x2.4mm","Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.4x2.4mm_ThermalVias","Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm","Package_CSP/LFCSP-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm_ThermalVias","Package_CSP/LFCSP-16_3x3mm_P0.5mm","Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm","Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias","Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm","Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias","Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_CSP/LFCSP-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP0.5x0.5mm","Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.3x2.3mm","Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.3x2.3mm_ThermalVias","Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm","Package_CSP/LFCSP-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias","Package_CSP/LFCSP-28-1EP_5x5mm_P0.5mm_EP3.14x3.14mm","Package_CSP/LFCSP-28-1EP_5x5mm_P0.5mm_EP3.14x3.14mm_ThermalVias","Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm","Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias","Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.25x3.25mm","Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm","Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm_ThermalVias","Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm","Package_CSP/LFCSP-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm_ThermalVias","Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP3.9x3.9mm","Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP3.9x3.9mm_ThermalVias","Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.65x4.65mm","Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.65x4.65mm_ThermalVias","Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm","Package_CSP/LFCSP-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm_ThermalVias","Package_CSP/LFCSP-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm","Package_CSP/LFCSP-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm_ThermalVias","Package_CSP/LFCSP-56-1EP_8x8mm_P0.5mm_EP6.6x6.6mm","Package_CSP/LFCSP-56-1EP_8x8mm_P0.5mm_EP6.6x6.6mm_ThermalVias","Package_CSP/LFCSP-6-1EP_2x2mm_P0.65mm_EP1x1.6mm","Package_CSP/LFCSP-64-1EP_9x9mm_P0.5mm_EP5.21x5.21mm","Package_CSP/LFCSP-64-1EP_9x9mm_P0.5mm_EP5.21x5.21mm_ThermalVias","Package_CSP/LFCSP-72-1EP_10x10mm_P0.5mm_EP5.3x5.3mm","Package_CSP/LFCSP-72-1EP_10x10mm_P0.5mm_EP5.3x5.3mm_ThermalVias","Package_CSP/LFCSP-72-1EP_10x10mm_P0.5mm_EP6.15x6.15mm","Package_CSP/LFCSP-8-1EP_3x2mm_P0.5mm_EP1.6x1.65mm","Package_CSP/LFCSP-8-1EP_3x3mm_P0.5mm_EP1.45x1.74mm","Package_CSP/LFCSP-8-1EP_3x3mm_P0.5mm_EP1.6x2.34mm","Package_CSP/LFCSP-8-1EP_3x3mm_P0.5mm_EP1.6x2.34mm_ThermalVias","Package_CSP/LFCSP-8_2x2mm_P0.5mm","Package_CSP/LFCSP-VQ-24-1EP_4x4mm_P0.5mm_EP2.642x2.642mm","Package_CSP/LFCSP-VQ-48-1EP_7x7mm_P0.5mm","Package_CSP/LFCSP-WD-10-1EP_3x3mm_P0.5mm_EP1.64x2.38mm","Package_CSP/LFCSP-WD-10-1EP_3x3mm_P0.5mm_EP1.64x2.38mm_ThermalVias","Package_CSP/LFCSP-WD-8-1EP_3x3mm_P0.65mm_EP1.6x2.44mm","Package_CSP/LFCSP-WD-8-1EP_3x3mm_P0.65mm_EP1.6x2.44mm_ThermalVias","Package_CSP/Macronix_WLCSP-12_2.02x2.09mm_Layout4x4_P0.5mm","Package_CSP/Maxim_WLCSP-35_2.998x2.168mm_Layout7x5_P0.4mm","Package_CSP/NXP_SOT1444-5_WLCSP-49_3.44x3.44mm_Layout7x7_P0.4mm","Package_CSP/NXP_SOT1450-2_WLCSP-100_5.07x5.07mm_Layout10x10_P0.5mm","Package_CSP/Nexperia_WLCSP-15_2.37x1.17mm_Layout6x3_P0.4mmP0.8mm","Package_CSP/OnSemi_ODCSP36_BGA-36_6.13x6.13mm_Layout6x6_P1.0mm","Package_CSP/OnSemi_ODCSP36_BGA-36_6.13x6.13mm_Layout6x6_P1.0mm_ManualAssembly","Package_CSP/OnSemi_ODCSP8_BGA-8_3.16x3.16mm_Layout3x3_P1.26mm","Package_CSP/OnSemi_ODCSP8_BGA-8_3.16x3.16mm_Layout3x3_P1.26mm_ManualAssembly","Package_CSP/ST_WLCSP-100_4.437x4.456mm_Layout10x10_P0.4mm","Package_CSP/ST_WLCSP-100_4.4x4.38mm_Layout10x10_P0.4mm_Offcenter","Package_CSP/ST_WLCSP-100_Die422","Package_CSP/ST_WLCSP-100_Die446","Package_CSP/ST_WLCSP-100_Die452","Package_CSP/ST_WLCSP-100_Die461","Package_CSP/ST_WLCSP-101_3.86x3.79mm_Layout11x19_P0.35mm_Stagger","Package_CSP/ST_WLCSP-104_Die437","Package_CSP/ST_WLCSP-115_3.73x4.15mm_Layout11x21_P0.35mm_Stagger","Package_CSP/ST_WLCSP-115_4.63x4.15mm_Layout21x11_P0.4mm_Stagger","Package_CSP/ST_WLCSP-12_1.7x1.42mm_Layout4x6_P0.35mm_Stagger","Package_CSP/ST_WLCSP-132_4.57x4.37mm_Layout12x11_P0.35mm","Package_CSP/ST_WLCSP-143_Die419","Package_CSP/ST_WLCSP-143_Die449","Package_CSP/ST_WLCSP-144_Die470","Package_CSP/ST_WLCSP-150_5.38x5.47mm_Layout13x23_P0.4mm_Stagger","Package_CSP/ST_WLCSP-156_4.96x4.64mm_Layout13x12_P0.35mm","Package_CSP/ST_WLCSP-168_Die434","Package_CSP/ST_WLCSP-180_Die451","Package_CSP/ST_WLCSP-18_1.86x2.14mm_Layout7x5_P0.4mm_Stagger","Package_CSP/ST_WLCSP-19_1.643x2.492mm_Layout4x11_P0.35mm_Stagger","Package_CSP/ST_WLCSP-208_5.38x5.47mm_Layout26x16_P0.35mm_Stagger","Package_CSP/ST_WLCSP-208_5.8x5.6mm_Layout26x16_P0.35mm_Stagger","Package_CSP/ST_WLCSP-20_1.94x2.4mm_Layout4x5_P0.4mm","Package_CSP/ST_WLCSP-25_2.33x2.24mm_Layout5x5_P0.4mm","Package_CSP/ST_WLCSP-25_2.3x2.48mm_Layout5x5_P0.4mm","Package_CSP/ST_WLCSP-25_Die425","Package_CSP/ST_WLCSP-25_Die444","Package_CSP/ST_WLCSP-25_Die457","Package_CSP/ST_WLCSP-27_2.34x2.55mm_Layout9x6_P0.4mm_Stagger","Package_CSP/ST_WLCSP-36_2.58x3.07mm_Layout6x6_P0.4mm","Package_CSP/ST_WLCSP-36_2.652x2.592mm_Layout7x12_P0.4mm_Stagger_Offcenter","Package_CSP/ST_WLCSP-36_2.83x2.99mm_Layout7x13_P0.4mm_Stagger_Offcenter","Package_CSP/ST_WLCSP-36_Die417","Package_CSP/ST_WLCSP-36_Die440","Package_CSP/ST_WLCSP-36_Die445","Package_CSP/ST_WLCSP-36_Die458","Package_CSP/ST_WLCSP-39_2.76x2.78mm_Layout11x7_P0.4mm_Stagger","Package_CSP/ST_WLCSP-41_2.98x2.76mm_Layout13x7_P0.4mm_Stagger","Package_CSP/ST_WLCSP-42_2.93x2.82mm_Layout12x7_P0.4mm_Stagger","Package_CSP/ST_WLCSP-49_3.14x3.14mm_Layout7x7_P0.4mm_Offcenter","Package_CSP/ST_WLCSP-49_3.15x3.13mm_Layout7x7_P0.4mm","Package_CSP/ST_WLCSP-49_3.3x3.38mm_Layout7x7_P0.4mm_Offcenter","Package_CSP/ST_WLCSP-49_Die423","Package_CSP/ST_WLCSP-49_Die431","Package_CSP/ST_WLCSP-49_Die433","Package_CSP/ST_WLCSP-49_Die435","Package_CSP/ST_WLCSP-49_Die438","Package_CSP/ST_WLCSP-49_Die439","Package_CSP/ST_WLCSP-49_Die447","Package_CSP/ST_WLCSP-49_Die448","Package_CSP/ST_WLCSP-52_3.09x3.15mm_Layout13x8_P0.4mm_Stagger","Package_CSP/ST_WLCSP-56_3.38x3.38mm_Layout14x8_P0.4mm_Stagger","Package_CSP/ST_WLCSP-63_Die427","Package_CSP/ST_WLCSP-64_3.56x3.52mm_Layout8x8_P0.4mm","Package_CSP/ST_WLCSP-64_Die414","Package_CSP/ST_WLCSP-64_Die427","Package_CSP/ST_WLCSP-64_Die435","Package_CSP/ST_WLCSP-64_Die436","Package_CSP/ST_WLCSP-64_Die441","Package_CSP/ST_WLCSP-64_Die442","Package_CSP/ST_WLCSP-64_Die462","Package_CSP/ST_WLCSP-66_Die411","Package_CSP/ST_WLCSP-66_Die432","Package_CSP/ST_WLCSP-72_3.38x3.38mm_Layout16x9_P0.35mm_Stagger","Package_CSP/ST_WLCSP-72_Die415","Package_CSP/ST_WLCSP-80_3.5x3.27mm_Layout10x16_P0.35mm_Stagger_Offcenter","Package_CSP/ST_WLCSP-81_4.02x4.27mm_Layout9x9_P0.4mm","Package_CSP/ST_WLCSP-81_4.36x4.07mm_Layout9x9_P0.4mm","Package_CSP/ST_WLCSP-81_Die415","Package_CSP/ST_WLCSP-81_Die421","Package_CSP/ST_WLCSP-81_Die463","Package_CSP/ST_WLCSP-90_4.2x3.95mm_Layout18x10_P0.4mm_Stagger","Package_CSP/ST_WLCSP-90_Die413","Package_CSP/ST_WLCSP-99_4.42x3.77mm_Layout11x9_P0.35mm","Package_CSP/WLCSP-12_1.403x1.555mm_Layout6x4_P0.4mm_Stagger","Package_CSP/WLCSP-12_1.56x1.56mm_P0.4mm","Package_CSP/WLCSP-16_1.409x1.409mm_Layout4x4_P0.35mm","Package_CSP/WLCSP-16_2.225x2.17mm_Layout4x4_P0.5mm","Package_CSP/WLCSP-16_4x4_B2.17x2.32mm_P0.5mm","Package_CSP/WLCSP-20_1.934x2.434mm_Layout4x5_P0.4mm","Package_CSP/WLCSP-20_1.994x1.609mm_Layout5x4_P0.4mm","Package_CSP/WLCSP-20_1.994x1.94mm_Layout4x5_P0.4mm","Package_CSP/WLCSP-36_2.374x2.459mm_Layout6x6_P0.35mm","Package_CSP/WLCSP-36_2.82x2.67mm_Layout6x6_P0.4mm","Package_CSP/WLCSP-4_0.64x0.64mm_Layout2x2_P0.35mm","Package_CSP/WLCSP-4_0.89x0.89mm_Layout2x2_P0.5mm","Package_CSP/WLCSP-56_3.170x3.444mm_Layout7x8_P0.4mm","Package_CSP/WLCSP-6_1.46x1.1mm_Layout3x2_P0.4mm","Package_CSP/WLCSP-6_1.4x1.0mm_P0.4mm","Package_CSP/WLCSP-81_4.41x3.76mm_P0.4mm","Package_CSP/WLCSP-8_1.551x2.284mm_Layout2x4_P0.5mm","Package_CSP/WLCSP-8_1.58x1.63x0.35mm_Layout3x5_P0.35x0.4mm_Ball0.25mm_Pad0.25mm_NSMD","Package_CSP/WLCSP-9_1.21x1.22mm_Layout3x3_P0.4mm","Package_CSP/Xilinx_CSG48_7.0x7.0mm_Layout7x7_P0.8mm","Package_CSP/pSemi_CSP-16_1.64x2.04mm_P0.4mm","Package_CSP/pSemi_CSP-16_1.64x2.04mm_P0.4mm_Pad0.18mm","Package_DFN_QFN/AMS_QFN-4-1EP_2x2mm_P0.95mm_EP0.7x1.6mm","Package_DFN_QFN/AO_AOZ666xDI_DFN-8-1EP_3x3mm_P0.65mm_EP1.25x2.7mm","Package_DFN_QFN/AO_DFN-8-1EP_5.55x5.2mm_P1.27mm_EP4.12x4.6mm","Package_DFN_QFN/Analog_QFN-28-36-2EP_5x6mm_P0.5mm","Package_DFN_QFN/ArtInChip_QFN-100-1EP_12x12mm_P0.4mm_EP7.4x7.4mm","Package_DFN_QFN/ArtInChip_QFN-100-1EP_12x12mm_P0.4mm_EP7.4x7.4mm_ThermalVias","Package_DFN_QFN/ArtInChip_QFN-68-1EP_7x7mm_P0.35mm_EP5.49x5.49mm","Package_DFN_QFN/ArtInChip_QFN-68-1EP_7x7mm_P0.35mm_EP5.49x5.49mm_ThermalVias","Package_DFN_QFN/ArtInChip_QFN-88-1EP_10x10mm_P0.4mm_EP6.74x6.74mm","Package_DFN_QFN/ArtInChip_QFN-88-1EP_10x10mm_P0.4mm_EP6.74x6.74mm_ThermalVias","Package_DFN_QFN/CDFN-4_2.5x3.2mm_P2.1mm","Package_DFN_QFN/CDFN-4_2x2.5mm_P1.65mm","Package_DFN_QFN/CDFN-4_3.2x5mm_P2.54mm","Package_DFN_QFN/Cypress_QFN-56-1EP_8x8mm_P0.5mm_EP6.22x6.22mm_ThermalVias","Package_DFN_QFN/DFN-10-1EP_2.6x2.6mm_P0.5mm_EP1.3x2.2mm","Package_DFN_QFN/DFN-10-1EP_2.6x2.6mm_P0.5mm_EP1.3x2.2mm_ThermalVias","Package_DFN_QFN/DFN-10-1EP_2x3mm_P0.5mm_EP0.64x2.4mm","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.55x2.48mm","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.58x2.35mm","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.58x2.35mm_ThermalVias","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.646x3.1mm","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.646x3.1mm_ThermalVias","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.65x2.38mm","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.65x2.38mm_ThermalVias","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.75x2.7mm","Package_DFN_QFN/DFN-10-1EP_3x3mm_P0.5mm_EP1.7x2.5mm","Package_DFN_QFN/DFN-10_2x2mm_P0.4mm","Package_DFN_QFN/DFN-12-1EP_2x3mm_P0.45mm_EP0.64x2.4mm","Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.45mm_EP1.65x2.38mm","Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.45mm_EP1.65x2.38mm_ThermalVias","Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.5mm_EP1.6x2.5mm","Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.5mm_EP1.6x2.5mm_ThermalVias","Package_DFN_QFN/DFN-12-1EP_3x3mm_P0.5mm_EP2.05x2.86mm","Package_DFN_QFN/DFN-12-1EP_3x4mm_P0.5mm_EP1.7x3.3mm","Package_DFN_QFN/DFN-12-1EP_4x4mm_P0.5mm_EP2.66x3.38mm","Package_DFN_QFN/DFN-12-1EP_4x4mm_P0.65mm_EP2.64x3.54mm","Package_DFN_QFN/DFN-14-1EP_3x3mm_P0.4mm_EP1.78x2.35mm","Package_DFN_QFN/DFN-14-1EP_3x4.5mm_P0.65mm_EP1.65x4.25mm","Package_DFN_QFN/DFN-14-1EP_3x4.5mm_P0.65mm_EP1.65x4.25mm_ThermalVias","Package_DFN_QFN/DFN-14-1EP_3x4mm_P0.5mm_EP1.7x3.3mm","Package_DFN_QFN/DFN-14_1.35x3.5mm_P0.5mm","Package_DFN_QFN/DFN-16-1EP_3x4mm_P0.45mm_EP1.7x3.3mm","Package_DFN_QFN/DFN-16-1EP_3x5mm_P0.5mm_EP1.66x4.4mm","Package_DFN_QFN/DFN-16-1EP_4x5mm_P0.5mm_EP2.44x4.34mm","Package_DFN_QFN/DFN-16-1EP_5x5mm_P0.5mm_EP3.46x4mm","Package_DFN_QFN/DFN-18-1EP_3x5mm_P0.5mm_EP1.66x4.4mm","Package_DFN_QFN/DFN-18-1EP_4x5mm_P0.5mm_EP2.44x4.34mm","Package_DFN_QFN/DFN-20-1EP_5x6mm_P0.5mm_EP3.24x4.24mm","Package_DFN_QFN/DFN-22-1EP_5x6mm_P0.5mm_EP3.14x4.3mm","Package_DFN_QFN/DFN-24-1EP_4x7mm_P0.5mm_EP2.64x6.44mm","Package_DFN_QFN/DFN-32-1EP_4x7mm_P0.4mm_EP2.64x6.44mm","Package_DFN_QFN/DFN-44-1EP_5x8.9mm_P0.4mm_EP3.7x8.4mm","Package_DFN_QFN/DFN-4_5x7mm_P5.08mm","Package_DFN_QFN/DFN-6-1EP_1.2x1.2mm_P0.4mm_EP0.3x0.94mm_PullBack","Package_DFN_QFN/DFN-6-1EP_2x1.6mm_P0.5mm_EP1.15x1.3mm","Package_DFN_QFN/DFN-6-1EP_2x1.8mm_P0.5mm_EP1.2x1.6mm","Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.5mm_EP0.61x1.42mm","Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.5mm_EP0.6x1.37mm","Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.5mm_EP0.7x1.6mm","Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.65mm_EP1.01x1.7mm","Package_DFN_QFN/DFN-6-1EP_2x2mm_P0.65mm_EP1x1.6mm","Package_DFN_QFN/DFN-6-1EP_3x2mm_P0.5mm_EP1.65x1.35mm","Package_DFN_QFN/DFN-6-1EP_3x3mm_P0.95mm_EP1.7x2.6mm","Package_DFN_QFN/DFN-6-1EP_3x3mm_P1mm_EP1.5x2.4mm","Package_DFN_QFN/DFN-6_1.3x1.2mm_P0.4mm","Package_DFN_QFN/DFN-6_1.6x1.3mm_P0.4mm","Package_DFN_QFN/DFN-8-1EP_1.5x1.5mm_P0.4mm_EP0.7x1.2mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.45mm_EP0.64x1.37mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.6x1.2mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.86x1.55mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.8x1.6mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.3mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.5mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.7mm","Package_DFN_QFN/DFN-8-1EP_2x2mm_P0.5mm_EP1.05x1.75mm","Package_DFN_QFN/DFN-8-1EP_2x3mm_P0.5mm_EP0.61x2.2mm","Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.45mm_EP1.66x1.36mm","Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.36x1.46mm","Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.3x1.5mm","Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.75x1.45mm","Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.7x1.4mm","Package_DFN_QFN/DFN-8-1EP_3x2mm_P0.5mm_EP1.7x1.6mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.65x2.38mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.65x2.38mm_ThermalVias","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.66x2.38mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.5mm_EP1.7x2.4mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.2x2.15mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.2x2.15mm_ThermalVias","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.55x2.4mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.5x2.25mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.6x2.56mm","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.6x2.56mm_ThermalVias","Package_DFN_QFN/DFN-8-1EP_3x3mm_P0.65mm_EP1.7x2.05mm","Package_DFN_QFN/DFN-8-1EP_4x4mm_P0.8mm_EP2.39x2.21mm","Package_DFN_QFN/DFN-8-1EP_4x4mm_P0.8mm_EP2.3x3.24mm","Package_DFN_QFN/DFN-8-1EP_4x4mm_P0.8mm_EP2.5x3.6mm","Package_DFN_QFN/DFN-8-1EP_6x5mm_P1.27mm_EP2x2mm","Package_DFN_QFN/DFN-8-1EP_6x5mm_P1.27mm_EP4x4mm","Package_DFN_QFN/DFN-8_2x2mm_P0.5mm","Package_DFN_QFN/DFN-S-8-1EP_6x5mm_P1.27mm","Package_DFN_QFN/DHVQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm","Package_DFN_QFN/DHVQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm_ThermalVias","Package_DFN_QFN/DHVQFN-16-1EP_2.5x3.5mm_P0.5mm_EP1x2mm","Package_DFN_QFN/DHVQFN-20-1EP_2.5x4.5mm_P0.5mm_EP1x3mm","Package_DFN_QFN/DHWQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm","Package_DFN_QFN/DHWQFN-14-1EP_2.5x3mm_P0.5mm_EP1x1.5mm_ThermalVias","Package_DFN_QFN/Diodes_DFN1006-3","Package_DFN_QFN/Diodes_UDFN-10_1x2.5mm_P0.5mm","Package_DFN_QFN/Diodes_UDFN2020-6_Type-F","Package_DFN_QFN/Diodes_UDFN3810-9_TYPE_B","Package_DFN_QFN/Diodes_ZL32_TQFN-32-1EP_3x6mm_P0.4mm_EP1.25x3.5mm","Package_DFN_QFN/EPC_QFN-13-3EP_3.5x5mm_P0.5mm","Package_DFN_QFN/HVQFN-16-1EP_3x3mm_P0.5mm_EP1.5x1.5mm","Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm","Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm","Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias","Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/HVQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/HVQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm","Package_DFN_QFN/HVQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias","Package_DFN_QFN/HVQFN-36-1EP_6x6mm_P0.5mm_EP3.9x3.9mm","Package_DFN_QFN/HVQFN-36-1EP_6x6mm_P0.5mm_EP3.9x3.9mm_ThermalVias","Package_DFN_QFN/HVQFN-40-1EP_6x6mm_P0.5mm_EP4.1x4.1mm","Package_DFN_QFN/HVQFN-40-1EP_6x6mm_P0.5mm_EP4.1x4.1mm_ThermalVias","Package_DFN_QFN/HXQFN-16-1EP_3x3mm_P0.5mm_EP1.85x1.85mm","Package_DFN_QFN/HXQFN-16-1EP_3x3mm_P0.5mm_EP1.85x1.85mm_ThermalVias","Package_DFN_QFN/IDT_QFN-12-1EP_2x2mm_P0.5mm_EP1.1x1.1mm","Package_DFN_QFN/IDT_QFN-12-1EP_2x2mm_P0.5mm_EP1.1x1.1mm_ThermalVias","Package_DFN_QFN/Infineon_MLPQ-16-14-1EP_4x4mm_P0.5mm","Package_DFN_QFN/Infineon_MLPQ-40-32-1EP_7x7mm_P0.5mm","Package_DFN_QFN/Infineon_MLPQ-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm","Package_DFN_QFN/Infineon_MLPQ-48-1EP_7x7mm_P0.5mm_EP5.55x5.55mm","Package_DFN_QFN/Infineon_PQFN-22-15-4EP_6x5mm_P0.65mm","Package_DFN_QFN/Infineon_PQFN-44-31-5EP_7x7mm_P0.5mm","Package_DFN_QFN/LQFN-10-1EP_2x2mm_P0.5mm_EP0.7x0.7mm","Package_DFN_QFN/LQFN-12-1EP_2x2mm_P0.5mm_EP0.7x0.7mm","Package_DFN_QFN/LQFN-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm","Package_DFN_QFN/Linear_DE14MA","Package_DFN_QFN/Linear_UGK52_QFN-46-52","Package_DFN_QFN/MLF-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/MLF-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/MLF-6-1EP_1.6x1.6mm_P0.5mm_EP0.5x1.26mm","Package_DFN_QFN/MLF-8-1EP_3x3mm_P0.65mm_EP1.55x2.3mm","Package_DFN_QFN/MLF-8-1EP_3x3mm_P0.65mm_EP1.55x2.3mm_ThermalVias","Package_DFN_QFN/MLPQ-16-1EP_4x4mm_P0.65mm_EP2.8x2.8mm","Package_DFN_QFN/MPS_QFN-12_2x2mm_P0.4mm","Package_DFN_QFN/MPS_QFN-16_3x3mm_P0.5mm","Package_DFN_QFN/Maxim_FC2QFN-14_2.5x2.5mm_P0.5mm","Package_DFN_QFN/Maxim_TDFN-10-1EP_3x3mm_P0.5mm_EP1.58x2.35mm","Package_DFN_QFN/Maxim_TDFN-12-1EP_3x3mm_P0.5mm_EP1.7x2.5mm","Package_DFN_QFN/Maxim_TDFN-12-1EP_3x3mm_P0.5mm_EP1.7x2.5mm_ThermalVias","Package_DFN_QFN/Maxim_TDFN-6-1EP_3x3mm_P0.95mm_EP1.5x2.3mm","Package_DFN_QFN/Maxim_WSON-8-1EP_3x2mm_P0.5mm_EP1.75x1.63mm","Package_DFN_QFN/Micrel_MLF-8-1EP_2x2mm_P0.5mm_EP0.6x1.2mm","Package_DFN_QFN/Micrel_MLF-8-1EP_2x2mm_P0.5mm_EP0.6x1.2mm_ThermalVias","Package_DFN_QFN/Micrel_MLF-8-1EP_2x2mm_P0.5mm_EP0.8x1.3mm_ThermalVias","Package_DFN_QFN/Microchip_8E-16","Package_DFN_QFN/Microchip_DRQFN-44-1EP_5x5mm_P0.7mm_EP2.65x2.65mm","Package_DFN_QFN/Microchip_DRQFN-44-1EP_5x5mm_P0.7mm_EP2.65x2.65mm_ThermalVias","Package_DFN_QFN/Microchip_DRQFN-64-1EP_7x7mm_P0.65mm_EP4.1x4.1mm","Package_DFN_QFN/Microchip_DRQFN-64-1EP_7x7mm_P0.65mm_EP4.1x4.1mm_ThermalVias","Package_DFN_QFN/Microsemi_QFN-40-32-2EP_6x8mm_P0.5mm","Package_DFN_QFN/Mini-Circuits_DL805","Package_DFN_QFN/Mini-Circuits_FG873-4_3x3mm","Package_DFN_QFN/NXP_LQFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_16xMask0.45x0.45","Package_DFN_QFN/NXP_LQFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_16xMask0.45x0.45_ThermalVias","Package_DFN_QFN/NXP_VQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm","Package_DFN_QFN/Nordic_AQFN-73-1EP_7x7mm_P0.5mm","Package_DFN_QFN/Nordic_AQFN-94-1EP_7x7mm_P0.4mm","Package_DFN_QFN/OnSemi_DFN-14-1EP_4x4mm_P0.5mm_EP2.7x3.4mm","Package_DFN_QFN/OnSemi_DFN-8_2x2mm_P0.5mm","Package_DFN_QFN/OnSemi_SIP-38-6EP-9x7mm_P0.65mm_EP1.2x1.2mm","Package_DFN_QFN/OnSemi_UDFN-16-1EP_1.35x3.3mm_P0.4mm_EP0.4x2.8mm","Package_DFN_QFN/OnSemi_UDFN-8_1.2x1.8mm_P0.4mm","Package_DFN_QFN/OnSemi_VCT-28_3.5x3.5mm_P0.4mm","Package_DFN_QFN/OnSemi_XDFN-10_1.35x2.2mm_P0.4mm","Package_DFN_QFN/OnSemi_XDFN4-1EP_1.0x1.0mm_EP0.52x0.52mm","Package_DFN_QFN/PQFN-8-EP_6x5mm_P1.27mm_Generic","Package_DFN_QFN/Panasonic_HQFN-16-1EP_4x4mm_P0.65mm_EP2.9x2.9mm","Package_DFN_QFN/Panasonic_HSON-8_8x8mm_P2.00mm","Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.51mm_EP1.45x1.45mm","Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.45x1.45mm","Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.45x1.45mm_ThermalVias","Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.65x1.65mm","Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.65x1.65mm_ThermalVias","Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.6x1.6mm","Package_DFN_QFN/QFN-12-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_1.8x2.6mm_P0.4mm_EP0.7x1.5mm","Package_DFN_QFN/QFN-16-1EP_1.8x2.6mm_P0.4mm_EP0.7x1.5mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.675x1.675mm","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.7x1.7mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.9x1.9mm","Package_DFN_QFN/QFN-16-1EP_3x3mm_P0.5mm_EP1.9x1.9mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.5mm_EP2.45x2.45mm","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.15x2.15mm","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.15x2.15mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_PullBack","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_PullBack_ThermalVias","Package_DFN_QFN/QFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/QFN-16-1EP_5x5mm_P0.8mm_EP2.7x2.7mm","Package_DFN_QFN/QFN-16-1EP_5x5mm_P0.8mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_3.5x3.5mm_P0.5mm_EP2x2mm","Package_DFN_QFN/QFN-20-1EP_3.5x3.5mm_P0.5mm_EP2x2mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.45mm_EP1.6x1.6mm","Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.45mm_EP1.6x1.6mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mm","Package_DFN_QFN/QFN-20-1EP_3x3mm_P0.4mm_EP1.65x1.65mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_3x4mm_P0.5mm_EP1.65x2.65mm","Package_DFN_QFN/QFN-20-1EP_3x4mm_P0.5mm_EP1.65x2.65mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm","Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/QFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_4x5mm_P0.5mm_EP2.65x3.65mm","Package_DFN_QFN/QFN-20-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias","Package_DFN_QFN/QFN-20-1EP_5x5mm_P0.65mm_EP3.35x3.35mm","Package_DFN_QFN/QFN-20-1EP_5x5mm_P0.65mm_EP3.35x3.35mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_3x3mm_P0.4mm_EP1.75x1.6mm","Package_DFN_QFN/QFN-24-1EP_3x3mm_P0.4mm_EP1.75x1.6mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_3x4mm_P0.4mm_EP1.65x2.65mm","Package_DFN_QFN/QFN-24-1EP_3x4mm_P0.4mm_EP1.65x2.65mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.15x2.15mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.15x2.15mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.65x2.65mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.65x2.65mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.75x2.75mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.75x2.75mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.6mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.6mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm","Package_DFN_QFN/QFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm","Package_DFN_QFN/QFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.25x3.25mm","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.25x3.25mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.2x3.2mm","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.2x3.2mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.4x3.4mm","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.4x3.4mm_ThermalVias","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.6x3.6mm","Package_DFN_QFN/QFN-24-1EP_5x5mm_P0.65mm_EP3.6x3.6mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_3x6mm_P0.5mm_EP1.7x4.75mm","Package_DFN_QFN/QFN-28-1EP_3x6mm_P0.5mm_EP1.7x4.75mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm","Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.45mm_EP2.6x2.6mm","Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.3x2.3mm","Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.3x2.3mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.4x2.4mm","Package_DFN_QFN/QFN-28-1EP_4x4mm_P0.4mm_EP2.4x2.4mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_4x5mm_P0.5mm_EP2.65x3.65mm","Package_DFN_QFN/QFN-28-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.1x3.1mm","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mm","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.75x3.75mm","Package_DFN_QFN/QFN-28-1EP_5x5mm_P0.5mm_EP3.75x3.75mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_5x6mm_P0.5mm_EP3.65x4.65mm","Package_DFN_QFN/QFN-28-1EP_5x6mm_P0.5mm_EP3.65x4.65mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.25x4.25mm","Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.25x4.25mm_ThermalVias","Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.8x4.8mm","Package_DFN_QFN/QFN-28-1EP_6x6mm_P0.65mm_EP4.8x4.8mm_ThermalVias","Package_DFN_QFN/QFN-28_4x4mm_P0.5mm","Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.65x2.65mm","Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.65x2.65mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.9x2.9mm","Package_DFN_QFN/QFN-32-1EP_4x4mm_P0.4mm_EP2.9x2.9mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.3x3.3mm","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.3x3.3mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.65x3.65mm","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.65x3.65mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.6x3.6mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.7x3.7mm","Package_DFN_QFN/QFN-32-1EP_5x5mm_P0.5mm_EP3.7x3.7mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.65x4.65mm","Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.65x4.65mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.7x4.7mm","Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP4.7x4.7mm_ThermalVias","Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP5.4x5.4mm","Package_DFN_QFN/QFN-32-1EP_7x7mm_P0.65mm_EP5.4x5.4mm_ThermalVias","Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.1mm","Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.1mm_ThermalVias","Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.6mm","Package_DFN_QFN/QFN-36-1EP_5x6mm_P0.5mm_EP3.6x4.6mm_ThermalVias","Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP3.7x3.7mm","Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP3.7x3.7mm_ThermalVias","Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP4.1x4.1mm","Package_DFN_QFN/QFN-36-1EP_6x6mm_P0.5mm_EP4.1x4.1mm_ThermalVias","Package_DFN_QFN/QFN-38-1EP_4x6mm_P0.4mm_EP2.65x4.65mm","Package_DFN_QFN/QFN-38-1EP_4x6mm_P0.4mm_EP2.65x4.65mm_ThermalVias","Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm","Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm_ThermalVias","Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm","Package_DFN_QFN/QFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm_ThermalVias","Package_DFN_QFN/QFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm","Package_DFN_QFN/QFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm_ThermalVias","Package_DFN_QFN/QFN-42-1EP_5x6mm_P0.4mm_EP3.7x4.7mm","Package_DFN_QFN/QFN-42-1EP_5x6mm_P0.4mm_EP3.7x4.7mm_ThermalVias","Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.15x5.15mm","Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias","Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.2x5.2mm","Package_DFN_QFN/QFN-44-1EP_7x7mm_P0.5mm_EP5.2x5.2mm_ThermalVias","Package_DFN_QFN/QFN-44-1EP_8x8mm_P0.65mm_EP6.45x6.45mm","Package_DFN_QFN/QFN-44-1EP_8x8mm_P0.65mm_EP6.45x6.45mm_ThermalVias","Package_DFN_QFN/QFN-44-1EP_9x9mm_P0.65mm_EP7.5x7.5mm","Package_DFN_QFN/QFN-44-1EP_9x9mm_P0.65mm_EP7.5x7.5mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_5x5mm_P0.35mm_EP3.7x3.7mm","Package_DFN_QFN/QFN-48-1EP_5x5mm_P0.35mm_EP3.7x3.7mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.3x4.3mm","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.3x4.3mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.4x4.4mm","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.4x4.4mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.66x4.66mm","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.66x4.66mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.6x4.6mm","Package_DFN_QFN/QFN-48-1EP_6x6mm_P0.4mm_EP4.6x4.6mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.3x5.3mm","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.3x5.3mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.45x5.45mm","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.45x5.45mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mm","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.7x5.7mm","Package_DFN_QFN/QFN-48-1EP_7x7mm_P0.5mm_EP5.7x5.7mm_ThermalVias","Package_DFN_QFN/QFN-48-1EP_8x8mm_P0.5mm_EP6.2x6.2mm","Package_DFN_QFN/QFN-48-1EP_8x8mm_P0.5mm_EP6.2x6.2mm_ThermalVias","Package_DFN_QFN/QFN-52-1EP_7x8mm_P0.5mm_EP5.41x6.45mm","Package_DFN_QFN/QFN-52-1EP_7x8mm_P0.5mm_EP5.41x6.45mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm","Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP4x4mm","Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP4x4mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP5.6x5.6mm","Package_DFN_QFN/QFN-56-1EP_7x7mm_P0.4mm_EP5.6x5.6mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.3x4.3mm","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.3x4.3mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.5x5.2mm","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.5x5.2mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP4.5x5.2mm_ThermalVias_TopTented","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.6x5.6mm","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.6x5.6mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.9x5.9mm","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP5.9x5.9mm_ThermalVias","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP6.1x6.1mm","Package_DFN_QFN/QFN-56-1EP_8x8mm_P0.5mm_EP6.1x6.1mm_ThermalVias","Package_DFN_QFN/QFN-60-1EP_7x7mm_P0.4mm_EP3.4x3.4mm","Package_DFN_QFN/QFN-60-1EP_7x7mm_P0.4mm_EP3.4x3.4mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_8x8mm_P0.4mm_EP6.5x6.5mm","Package_DFN_QFN/QFN-64-1EP_8x8mm_P0.4mm_EP6.5x6.5mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.4x3.4mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.4x3.4mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.8x3.8mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP3.8x3.8mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.1x4.1mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.1x4.1mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.35x4.35mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.35x4.35mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.7x4.7mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP4.7x4.7mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.2x5.2mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.2x5.2mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.45x5.45mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.45x5.45mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.7x5.7mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP5.7x5.7mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP6x6mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP6x6mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.25x7.25mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.35x7.35mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.3x7.3mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.3x7.3mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.5x7.5mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.5x7.5mm_ThermalVias","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.65x7.65mm","Package_DFN_QFN/QFN-64-1EP_9x9mm_P0.5mm_EP7.65x7.65mm_ThermalVias","Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP5.2x5.2mm","Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP5.2x5.2mm_ThermalVias","Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP6.4x6.4mm","Package_DFN_QFN/QFN-68-1EP_8x8mm_P0.4mm_EP6.4x6.4mm_ThermalVias","Package_DFN_QFN/QFN-72-1EP_10x10mm_P0.5mm_EP6x6mm","Package_DFN_QFN/QFN-72-1EP_10x10mm_P0.5mm_EP6x6mm_ThermalVias","Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP3.8x3.8mm","Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP3.8x3.8mm_ThermalVias","Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP5.81x6.31mm","Package_DFN_QFN/QFN-76-1EP_9x9mm_P0.4mm_EP5.81x6.31mm_ThermalVias","Package_DFN_QFN/QFN-8-1EP_6x5mm_P1.27mm_EP3.4x4.2mm","Package_DFN_QFN/QFN-80-1EP_10x10mm_P0.4mm_EP3.4x3.4mm","Package_DFN_QFN/QFN-80-1EP_10x10mm_P0.4mm_EP3.4x3.4mm_ThermalVias","Package_DFN_QFN/Qorvo_DFN-8-1EP_2x2mm_P0.5mm","Package_DFN_QFN/Qorvo_TQFN66-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm","Package_DFN_QFN/Qorvo_TQFN66-48-1EP_6x6mm_P0.4mm_EP4.2x4.2mm_ThermalVias","Package_DFN_QFN/ROHM_DFN0604-3","Package_DFN_QFN/Renesas_UQFN-16_2x2mm_P0.4mm","Package_DFN_QFN/Renesas_UQFN-20_2x3mm_P0.4mm_LayoutBorder4x6y","Package_DFN_QFN/ST_DFN-10-1EP_3x3mm_P0.5mm_EP0.62x0.98mm","Package_DFN_QFN/ST_DFN-10-1EP_3x3mm_P0.5mm_EP0.62x0.98mm_ThermalVias","Package_DFN_QFN/ST_UFDFPN-12-1EP_3x3mm_P0.5mm_EP1.4x2.55mm","Package_DFN_QFN/ST_UFQFPN-20_3x3mm_P0.5mm","Package_DFN_QFN/ST_UQFN-6L_1.5x1.7mm_P0.5mm","Package_DFN_QFN/SiliconLabs_QFN-20-1EP_3x3mm_P0.5mm_EP1.8x1.8mm","Package_DFN_QFN/SiliconLabs_QFN-20-1EP_3x3mm_P0.5mm_EP1.8x1.8mm_ThermalVias","Package_DFN_QFN/TDFN-10-1EP_2x3mm_P0.5mm_EP0.9x2mm","Package_DFN_QFN/TDFN-10-1EP_2x3mm_P0.5mm_EP0.9x2mm_ThermalVias","Package_DFN_QFN/TDFN-12-1EP_3x3mm_P0.4mm_EP1.7x2.45mm","Package_DFN_QFN/TDFN-12-1EP_3x3mm_P0.4mm_EP1.7x2.45mm_ThermalVias","Package_DFN_QFN/TDFN-12_2x3mm_P0.5mm","Package_DFN_QFN/TDFN-14-1EP_3x3mm_P0.4mm_EP1.78x2.35mm","Package_DFN_QFN/TDFN-14-1EP_3x3mm_P0.4mm_EP1.78x2.35mm_ThermalVias","Package_DFN_QFN/TDFN-6-1EP_1.2x1.2mm_P0.4mm_EP0.3x0.94mm","Package_DFN_QFN/TDFN-6-1EP_2.5x2.5mm_P0.65mm_EP1.3x2mm","Package_DFN_QFN/TDFN-6-1EP_2.5x2.5mm_P0.65mm_EP1.3x2mm_ThermalVias","Package_DFN_QFN/TDFN-8-1EP_2x2mm_P0.5mm_EP0.8x1.2mm","Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.3x1.4mm","Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.4x1.4mm","Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.80x1.65mm","Package_DFN_QFN/TDFN-8-1EP_3x2mm_P0.5mm_EP1.80x1.65mm_ThermalVias","Package_DFN_QFN/TDFN-8_1.4x1.6mm_P0.4mm","Package_DFN_QFN/TQFN-16-1EP_3x3mm_P0.5mm_EP1.23x1.23mm","Package_DFN_QFN/TQFN-16-1EP_3x3mm_P0.5mm_EP1.23x1.23mm_ThermalVias","Package_DFN_QFN/TQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm","Package_DFN_QFN/TQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm","Package_DFN_QFN/TQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP2.29x2.29mm","Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP2.29x2.29mm_ThermalVias","Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP3.1x3.1mm","Package_DFN_QFN/TQFN-16-1EP_5x5mm_P0.8mm_EP3.1x3.1mm_ThermalVias","Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm","Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.9x2.9mm","Package_DFN_QFN/TQFN-20-1EP_4x4mm_P0.5mm_EP2.9x2.9mm_ThermalVias","Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.1x3.1mm","Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.1x3.1mm_ThermalVias","Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.25x3.25mm","Package_DFN_QFN/TQFN-20-1EP_5x5mm_P0.65mm_EP3.25x3.25mm_ThermalVias","Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm","Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_PullBack","Package_DFN_QFN/TQFN-24-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_PullBack_ThermalVias","Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm","Package_DFN_QFN/TQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm_ThermalVias","Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm","Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm","Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias","Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.4x3.4mm","Package_DFN_QFN/TQFN-32-1EP_5x5mm_P0.5mm_EP3.4x3.4mm_ThermalVias","Package_DFN_QFN/TQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm","Package_DFN_QFN/TQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm_ThermalVias","Package_DFN_QFN/TQFN-44-1EP_7x7mm_P0.5mm_EP4.7x4.7mm","Package_DFN_QFN/TQFN-44-1EP_7x7mm_P0.5mm_EP4.7x4.7mm_ThermalVias","Package_DFN_QFN/TQFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm","Package_DFN_QFN/TQFN-48-1EP_7x7mm_P0.5mm_EP5.1x5.1mm_ThermalVias","Package_DFN_QFN/Texas_B3QFN-14-1EP_5x5.5mm_P0.65mm","Package_DFN_QFN/Texas_B3QFN-14-1EP_5x5.5mm_P0.65mm_ThermalVia","Package_DFN_QFN/Texas_DLH0010A_WSON-10-1EP_2.2x2mm_P0.4mm_EP0.9x1.5mm","Package_DFN_QFN/Texas_DLH0010A_WSON-10-1EP_2.2x2mm_P0.4mm_EP0.9x1.5mm_ThermalVias","Package_DFN_QFN/Texas_DRB0008A","Package_DFN_QFN/Texas_DSQ0010A_WSON-10-1EP_2x2mm_P0.4mm_EP0.9x1.5mm","Package_DFN_QFN/Texas_DSQ0010A_WSON-10-1EP_2x2mm_P0.4mm_EP0.9x1.5mm_ThermalVias","Package_DFN_QFN/Texas_MOF0009A","Package_DFN_QFN/Texas_PicoStar_DFN-3_0.69x0.60mm","Package_DFN_QFN/Texas_QFN-41_10x16mm","Package_DFN_QFN/Texas_R-PUQFN-N10","Package_DFN_QFN/Texas_R-PUQFN-N12","Package_DFN_QFN/Texas_RDX0007A_QFN-FCMOD-7-3.3x4mm-P0.5mm_4EP","Package_DFN_QFN/Texas_REE0036A_WQFN-36-1EP_4x5mm_P0.4mm_EP2.7x3.7mm","Package_DFN_QFN/Texas_REE0036A_WQFN-36-1EP_4x5mm_P0.4mm_EP2.7x3.7mm_ThermalVias","Package_DFN_QFN/Texas_REF0038A_WQFN-38-2EP_6x4mm_P0.4","Package_DFN_QFN/Texas_RGC0064B_VQFN-64-1EP_9x9mm_P0.5mm_EP4.25x4.25mm","Package_DFN_QFN/Texas_RGC0064B_VQFN-64-1EP_9x9mm_P0.5mm_EP4.25x4.25mm_ThermalVias","Package_DFN_QFN/Texas_RGE0024C_VQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm","Package_DFN_QFN/Texas_RGE0024C_VQFN-24-1EP_4x4mm_P0.5mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/Texas_RGE0024H_VQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/Texas_RGE0024H_VQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/Texas_RGP0020D_VQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/Texas_RGP0020D_VQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/Texas_RGP0020H_VQFN-20-1EP_4x4mm_P0.5mm_EP2.4x2.4mm","Package_DFN_QFN/Texas_RGP0020H_VQFN-20-1EP_4x4mm_P0.5mm_EP2.4x2.4mm_ThermalVias","Package_DFN_QFN/Texas_RGV0016A_VQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm","Package_DFN_QFN/Texas_RGV0016A_VQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/Texas_RGW0020A_VQFN-20-1EP_5x5mm_P0.65mm_EP3.15x3.15mm","Package_DFN_QFN/Texas_RGW0020A_VQFN-20-1EP_5x5mm_P0.65mm_EP3.15x3.15mm_ThermalVias","Package_DFN_QFN/Texas_RGY_R-PVQFN-N16_EP2.05x2.55mm","Package_DFN_QFN/Texas_RGY_R-PVQFN-N16_EP2.05x2.55mm_ThermalVias","Package_DFN_QFN/Texas_RGY_R-PVQFN-N20_EP2.05x3.05mm","Package_DFN_QFN/Texas_RGY_R-PVQFN-N20_EP2.05x3.05mm_ThermalVias","Package_DFN_QFN/Texas_RGY_R-PVQFN-N24_EP2.05x3.1mm","Package_DFN_QFN/Texas_RGY_R-PVQFN-N24_EP2.05x3.1mm_ThermalVias","Package_DFN_QFN/Texas_RGZ0048A_VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm","Package_DFN_QFN/Texas_RGZ0048A_VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias","Package_DFN_QFN/Texas_RHA0040B_VQFN-40-1EP_6x6mm_P0.5mm_EP4.15x4.15mm","Package_DFN_QFN/Texas_RHA0040B_VQFN-40-1EP_6x6mm_P0.5mm_EP4.15x4.15mm_ThermalVias","Package_DFN_QFN/Texas_RHA0040D_VQFN-40-1EP_6x6mm_P0.5mm_EP2.9x2.9mm","Package_DFN_QFN/Texas_RHA0040D_VQFN-40-1EP_6x6mm_P0.5mm_EP2.9x2.9mm_ThermalVias","Package_DFN_QFN/Texas_RHA0040E_VQFN-40-1EP_6x6mm_P0.5mm_EP3.52x2.62mm","Package_DFN_QFN/Texas_RHA0040E_VQFN-40-1EP_6x6mm_P0.5mm_EP3.52x2.62mm_ThermalVias","Package_DFN_QFN/Texas_RHA_VQFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm","Package_DFN_QFN/Texas_RHA_VQFN-40-1EP_6x6mm_P0.5mm_EP4.6x4.6mm_ThermalVias","Package_DFN_QFN/Texas_RHB0032E_VQFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm","Package_DFN_QFN/Texas_RHB0032E_VQFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm_ThermalVias","Package_DFN_QFN/Texas_RHB0032M_VQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm","Package_DFN_QFN/Texas_RHB0032M_VQFN-32-1EP_5x5mm_P0.5mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/Texas_RHF0024A_VQFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm","Package_DFN_QFN/Texas_RHF0024A_VQFN-24-1EP_4x5mm_P0.5mm_EP2.65x3.65mm_ThermalVias","Package_DFN_QFN/Texas_RHH0036C_VQFN-36-1EP_6x6mm_P0.5mm_EP4.4x4.4mm","Package_DFN_QFN/Texas_RHH0036C_VQFN-36-1EP_6x6mm_P0.5mm_EP4.4x4.4mm_ThermalVias","Package_DFN_QFN/Texas_RJE0020A_VQFN-20-1EP_3x3mm_P0.45mm_EP0.675x0.76mm","Package_DFN_QFN/Texas_RJE0020A_VQFN-20-1EP_3x3mm_P0.45mm_EP0.675x0.76mm_ThermalVias","Package_DFN_QFN/Texas_RMG0012A_WQFN-12_1.8x1.8mm_P0.4mm","Package_DFN_QFN/Texas_RMQ0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm","Package_DFN_QFN/Texas_RMQ0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm_ThermalVias","Package_DFN_QFN/Texas_RNH0030A_WQFN-30-1EP_2.5x4.5mm_P0.4mm_EP1.2x3.2mm","Package_DFN_QFN/Texas_RNH0030A_WQFN-30-1EP_2.5x4.5mm_P0.4mm_EP1.2x3.2mm_ThermalVias","Package_DFN_QFN/Texas_RNN0018A","Package_DFN_QFN/Texas_RNP0030B_WQFN-30-1EP_4x6mm_P0.5mm_EP1.8x4.5mm","Package_DFN_QFN/Texas_RNP0030B_WQFN-30-1EP_4x6mm_P0.5mm_EP1.8x4.5mm_ThermalVias","Package_DFN_QFN/Texas_RNQ0040A_WQFN-40-1EP_6x4mm_P0.4mm_EP4.7x2.7mm","Package_DFN_QFN/Texas_RNQ0040A_WQFN-40-1EP_6x4mm_P0.4mm_EP4.7x2.7mm_ThermalVias","Package_DFN_QFN/Texas_RNX0012C_VQFN-14-11-1EP_2x3mm_P0.5mm_EP0.25x1.825mm","Package_DFN_QFN/Texas_RPU0010A_VQFN-HR-10_2x2mm_P0.5mm","Package_DFN_QFN/Texas_RQM0029A_VQFN-29_4x4mm_P0.4mm","Package_DFN_QFN/Texas_RRW0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm","Package_DFN_QFN/Texas_RRW0024A_WQFN-24-1EP_3x3mm_P0.4mm_EP1.9x1.9mm_ThermalVias","Package_DFN_QFN/Texas_RSA_VQFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm","Package_DFN_QFN/Texas_RSA_VQFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/Texas_RSN_WQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm","Package_DFN_QFN/Texas_RSN_WQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm_ThermalVias","Package_DFN_QFN/Texas_RSW0010A_UQFN-10_1.4x1.8mm_P0.4mm","Package_DFN_QFN/Texas_RTE0016D_WQFN-16-1EP_3x3mm_P0.5mm_EP0.8x0.8mm","Package_DFN_QFN/Texas_RTE0016D_WQFN-16-1EP_3x3mm_P0.5mm_EP0.8x0.8mm_ThermalVias","Package_DFN_QFN/Texas_RTE_WQFN-16-1EP_3x3mm_P0.5mm_EP1.2x0.8mm","Package_DFN_QFN/Texas_RTE_WQFN-16-1EP_3x3mm_P0.5mm_EP1.2x0.8mm_ThermalVias","Package_DFN_QFN/Texas_RTW_WQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/Texas_RTW_WQFN-24-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/Texas_RTY_WQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm","Package_DFN_QFN/Texas_RTY_WQFN-16-1EP_4x4mm_P0.65mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/Texas_RUK0020B_WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm","Package_DFN_QFN/Texas_RUK0020B_WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias","Package_DFN_QFN/Texas_RUM0016A_WQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm","Package_DFN_QFN/Texas_RUM0016A_WQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/Texas_RUM0016E_WQFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm","Package_DFN_QFN/Texas_RUM0016E_WQFN-16-1EP_4x4mm_P0.65mm_EP2.5x2.5mm_ThermalVias","Package_DFN_QFN/Texas_RUN0010A_WQFN-10_2x2mm_P0.5mm","Package_DFN_QFN/Texas_RVA_VQFN-16-1EP_3.5x3.5mm_P0.5mm_EP2.14x2.14mm","Package_DFN_QFN/Texas_RVA_VQFN-16-1EP_3.5x3.5mm_P0.5mm_EP2.14x2.14mm_ThermalVias","Package_DFN_QFN/Texas_RVC0020A_WQFN-20-1EP_3x4mm_P0.5mm_EP1.6x2.6mm","Package_DFN_QFN/Texas_RVC0020A_WQFN-20-1EP_3x4mm_P0.5mm_EP1.6x2.6mm_ThermalVias","Package_DFN_QFN/Texas_RVE0028A_VQFN-28-1EP_3.5x4.5mm_P0.4mm_EP2.1x3.1mm","Package_DFN_QFN/Texas_RVE0028A_VQFN-28-1EP_3.5x4.5mm_P0.4mm_EP2.1x3.1mm_ThermalVias","Package_DFN_QFN/Texas_RWH0032A","Package_DFN_QFN/Texas_RWH0032A_ThermalVias","Package_DFN_QFN/Texas_RWU0007A_VQFN-7_2x2mm_P0.5mm","Package_DFN_QFN/Texas_S-PDSO-N10_EP1.2x2mm","Package_DFN_QFN/Texas_S-PDSO-N10_EP1.2x2mm_ThermalVias","Package_DFN_QFN/Texas_S-PVQFN-N14","Package_DFN_QFN/Texas_S-PVQFN-N14_ThermalVias","Package_DFN_QFN/Texas_S-PWQFN-N100_EP5.5x5.5mm","Package_DFN_QFN/Texas_S-PWQFN-N100_EP5.5x5.5mm_ThermalVias","Package_DFN_QFN/Texas_S-PWQFN-N20","Package_DFN_QFN/Texas_S-PX2QFN-14","Package_DFN_QFN/Texas_UQFN-10_1.5x2mm_P0.5mm","Package_DFN_QFN/Texas_UQFN-8_1.5x1.5mm_P0.5mm","Package_DFN_QFN/Texas_VQFN-HR-12_2x2.5mm_P0.5mm","Package_DFN_QFN/Texas_VQFN-HR-12_2x2.5mm_P0.5mm_ThermalVias","Package_DFN_QFN/Texas_VQFN-HR-20_3x2.5mm_P0.5mm_RQQ0011A","Package_DFN_QFN/Texas_VQFN-RHL-20","Package_DFN_QFN/Texas_VQFN-RHL-20_ThermalVias","Package_DFN_QFN/Texas_VQFN-RNR0011A-11","Package_DFN_QFN/Texas_WQFN-MR-100_3x3-DapStencil","Package_DFN_QFN/Texas_WQFN-MR-100_ThermalVias_3x3-DapStencil","Package_DFN_QFN/Texas_X2QFN-12_1.6x1.6mm_P0.4mm","Package_DFN_QFN/Texas_X2QFN-RUE-12_1.4x2mm_P0.4mm","Package_DFN_QFN/UDC-QFN-20-4EP_3x4mm_P0.5mm_EP0.41x0.25mm","Package_DFN_QFN/UDFN-10_1.35x2.6mm_P0.5mm","Package_DFN_QFN/UDFN-4-1EP_1x1mm_P0.65mm_EP0.48x0.48mm","Package_DFN_QFN/UDFN-9_1.0x3.8mm_P0.5mm","Package_DFN_QFN/UFQFPN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm","Package_DFN_QFN/UFQFPN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm_ThermalVias","Package_DFN_QFN/UQFN-10_1.3x1.8mm_P0.4mm","Package_DFN_QFN/UQFN-10_1.4x1.8mm_P0.4mm","Package_DFN_QFN/UQFN-10_1.6x2.1mm_P0.5mm","Package_DFN_QFN/UQFN-12-1EP_2x2mm_P0.4mm_EP1.1x1.1mm","Package_DFN_QFN/UQFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm","Package_DFN_QFN/UQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm","Package_DFN_QFN/UQFN-16-1EP_4x4mm_P0.65mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/UQFN-16-1EP_4x4mm_P0.65mm_EP2.7x2.7mm","Package_DFN_QFN/UQFN-16_1.8x2.6mm_P0.4mm","Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm","Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias","Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.85x1.85mm","Package_DFN_QFN/UQFN-20-1EP_3x3mm_P0.4mm_EP1.85x1.85mm_ThermalVias","Package_DFN_QFN/UQFN-20-1EP_4x4mm_P0.5mm_EP2.8x2.8mm","Package_DFN_QFN/UQFN-20-1EP_4x4mm_P0.5mm_EP2.8x2.8mm_ThermalVias","Package_DFN_QFN/UQFN-20_3x3mm_P0.4mm","Package_DFN_QFN/UQFN-28-1EP_4x4mm_P0.4mm_EP2.35x2.35mm","Package_DFN_QFN/UQFN-28-1EP_4x4mm_P0.4mm_EP2.35x2.35mm_ThermalVias","Package_DFN_QFN/UQFN-32_5x5mm_P0.5mm","Package_DFN_QFN/UQFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm","Package_DFN_QFN/UQFN-40-1EP_5x5mm_P0.4mm_EP3.8x3.8mm_ThermalVias","Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.45x4.45mm","Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.45x4.45mm_ThermalVias","Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.62x4.62mm","Package_DFN_QFN/UQFN-48-1EP_6x6mm_P0.4mm_EP4.62x4.62mm_ThermalVias","Package_DFN_QFN/VDFN-8-1EP_2x2mm_P0.5mm_EP0.9x1.7mm","Package_DFN_QFN/VQFN-100-1EP_12x12mm_P0.4mm_EP8x8mm","Package_DFN_QFN/VQFN-100-1EP_12x12mm_P0.4mm_EP8x8mm_ThermalVias","Package_DFN_QFN/VQFN-12-1EP_4x4mm_P0.8mm_EP2.1x2.1mm","Package_DFN_QFN/VQFN-12-1EP_4x4mm_P0.8mm_EP2.1x2.1mm_ThermalVias","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.1x1.1mm","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.1x1.1mm_ThermalVias","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.45x1.45mm_ThermalVias","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm_ThermalVias","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.8x1.8mm","Package_DFN_QFN/VQFN-16-1EP_3x3mm_P0.5mm_EP1.8x1.8mm_ThermalVias","Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.45mm_EP1.55x1.55mm","Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.45mm_EP1.55x1.55mm_ThermalVias","Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm","Package_DFN_QFN/VQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias","Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm","Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias","Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm","Package_DFN_QFN/VQFN-24-1EP_4x4mm_P0.5mm_EP2.5x2.5mm_ThermalVias","Package_DFN_QFN/VQFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm","Package_DFN_QFN/VQFN-28-1EP_4x4mm_P0.45mm_EP2.4x2.4mm_ThermalVias","Package_DFN_QFN/VQFN-28-1EP_4x5mm_P0.5mm_EP2.55x3.55mm","Package_DFN_QFN/VQFN-28-1EP_4x5mm_P0.5mm_EP2.55x3.55mm_ThermalVias","Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm","Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.25x3.25mm_ThermalVias","Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.7x3.7mm","Package_DFN_QFN/VQFN-28-1EP_5x5mm_P0.5mm_EP3.7x3.7mm_ThermalVias","Package_DFN_QFN/VQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm","Package_DFN_QFN/VQFN-32-1EP_4x4mm_P0.4mm_EP2.8x2.8mm_ThermalVias","Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.15x3.15mm","Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.15x3.15mm_ThermalVias","Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm","Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm_ThermalVias","Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm","Package_DFN_QFN/VQFN-32-1EP_5x5mm_P0.5mm_EP3.5x3.5mm_ThermalVias","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.3x3.3mm","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.3x3.3mm_ThermalVias","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.5x3.5mm_ThermalVias","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.6x3.6mm_ThermalVias","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.7x3.7mm","Package_DFN_QFN/VQFN-40-1EP_5x5mm_P0.4mm_EP3.7x3.7mm_ThermalVias","Package_DFN_QFN/VQFN-40-1EP_6x6mm_P0.5mm_EP3.5x3.5mm","Package_DFN_QFN/VQFN-40-1EP_6x6mm_P0.5mm_EP3.5x3.5mm_ThermalVias","Package_DFN_QFN/VQFN-46-1EP_5x6mm_P0.4mm_EP2.8x3.8mm","Package_DFN_QFN/VQFN-46-1EP_5x6mm_P0.4mm_EP2.8x3.8mm_ThermalVias","Package_DFN_QFN/VQFN-48-1EP_6x6mm_P0.4mm_EP4.1x4.1mm","Package_DFN_QFN/VQFN-48-1EP_6x6mm_P0.4mm_EP4.1x4.1mm_ThermalVias","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.1x4.1mm_ThermalVias","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.2x4.2mm","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP4.2x4.2mm_ThermalVias","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm","Package_DFN_QFN/VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias","Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.1x4.96mm","Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.1x4.96mm_ThermalVias","Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.5x5.06mm","Package_DFN_QFN/VQFN-56-1EP_8x8mm_P0.5mm_EP5.5x5.06mm_ThermalVias","Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm","Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP5.4x5.4mm_ThermalVias","Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm","Package_DFN_QFN/VQFN-64-1EP_9x9mm_P0.5mm_EP7.15x7.15mm_ThermalVias","Package_DFN_QFN/VQFN-68-1EP_8x8mm_P0.4mm_EP4.3x4.3mm","Package_DFN_QFN/Vishay_PowerPAK_MLP44-24L","Package_DFN_QFN/Vishay_PowerPAK_MLP44-24L_ThermalVias","Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L","Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L_R","Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L_R_ThermalVias","Package_DFN_QFN/Vishay_PowerPAK_MLP55-27L_ThermalVias","Package_DFN_QFN/W-PDFN-8-1EP_6x5mm_P1.27mm_EP3x3mm","Package_DFN_QFN/WCH_QFN-16-1EP_3x3mm_P0.5mm_EP1.8x1.8mm","Package_DFN_QFN/WDFN-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm","Package_DFN_QFN/WDFN-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm_ThermalVias","Package_DFN_QFN/WDFN-12-1EP_3x3mm_P0.45mm_EP1.7x2.5mm","Package_DFN_QFN/WDFN-6-2EP_4.0x2.6mm_P0.65mm","Package_DFN_QFN/WDFN-8-1EP_2x2.2mm_P0.5mm_EP0.80x0.54","Package_DFN_QFN/WDFN-8-1EP_2x2mm_P0.5mm_EP0.8x1.2mm","Package_DFN_QFN/WDFN-8-1EP_3x2mm_P0.5mm_EP1.3x1.4mm","Package_DFN_QFN/WDFN-8-1EP_4x3mm_P0.65mm_EP2.4x1.8mm","Package_DFN_QFN/WDFN-8-1EP_4x3mm_P0.65mm_EP2.4x1.8mm_ThermalVias","Package_DFN_QFN/WDFN-8-1EP_6x5mm_P1.27mm_EP3.4x4mm","Package_DFN_QFN/WDFN-8-1EP_8x6mm_P1.27mm_EP6x4.8mm","Package_DFN_QFN/WDFN-8-1EP_8x6mm_P1.27mm_EP6x4.8mm_ThermalVias","Package_DFN_QFN/WDFN-8_2x2mm_P0.5mm","Package_DFN_QFN/WFDFPN-8-1EP_3x2mm_P0.5mm_EP1.25x1.35mm","Package_DFN_QFN/WQFN-14-1EP_2.5x2.5mm_P0.5mm_EP1.45x1.45mm","Package_DFN_QFN/WQFN-14-1EP_2.5x2.5mm_P0.5mm_EP1.45x1.45mm_ThermalVias","Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm","Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.68x1.68mm_ThermalVias","Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm","Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.6x1.6mm_ThermalVias","Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm","Package_DFN_QFN/WQFN-16-1EP_3x3mm_P0.5mm_EP1.75x1.75mm_ThermalVias","Package_DFN_QFN/WQFN-16-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/WQFN-16-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/WQFN-20-1EP_2.5x4.5mm_P0.5mm_EP1x2.9mm","Package_DFN_QFN/WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm","Package_DFN_QFN/WQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mm_ThermalVias","Package_DFN_QFN/WQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm","Package_DFN_QFN/WQFN-20-1EP_4x4mm_P0.5mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm","Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias","Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm","Package_DFN_QFN/WQFN-24-1EP_4x4mm_P0.5mm_EP2.6x2.6mm_ThermalVias","Package_DFN_QFN/WQFN-28-1EP_4x4mm_P0.4mm_EP2.7x2.7mm","Package_DFN_QFN/WQFN-28-1EP_4x4mm_P0.4mm_EP2.7x2.7mm_ThermalVias","Package_DFN_QFN/WQFN-32-1EP_5x5mm_P0.5mm_EP3.1x3.1mm","Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP2.7x4.7mm","Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP2.7x4.7mm_ThermalVias","Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.15x5.15mm","Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.15x5.15mm_ThermalVias","Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.65x5.65mm","Package_DFN_QFN/WQFN-38-1EP_5x7mm_P0.5mm_EP3.65x5.65mm_ThermalVias","Package_DFN_QFN/WQFN-42-1EP_3.5x9mm_P0.5mm_EP2.05x7.55mm","Package_DFN_QFN/WQFN-42-1EP_3.5x9mm_P0.5mm_EP2.05x7.55mm_ThermalVias","Package_DIP/CERDIP-14_W7.62mm_SideBrazed","Package_DIP/CERDIP-14_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-14_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-14_W7.62mm_SideBrazed_Socket","Package_DIP/CERDIP-16_W7.62mm_SideBrazed","Package_DIP/CERDIP-16_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-16_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-16_W7.62mm_SideBrazed_Socket","Package_DIP/CERDIP-18_W7.62mm_SideBrazed","Package_DIP/CERDIP-18_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-18_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-18_W7.62mm_SideBrazed_Socket","Package_DIP/CERDIP-20_W7.62mm_SideBrazed","Package_DIP/CERDIP-20_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-20_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-20_W7.62mm_SideBrazed_Socket","Package_DIP/CERDIP-22_W7.62mm_SideBrazed","Package_DIP/CERDIP-22_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-22_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-22_W7.62mm_SideBrazed_Socket","Package_DIP/CERDIP-24_W7.62mm_SideBrazed","Package_DIP/CERDIP-24_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-24_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-24_W7.62mm_SideBrazed_Socket","Package_DIP/CERDIP-28_W7.62mm_SideBrazed","Package_DIP/CERDIP-28_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-28_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-28_W7.62mm_SideBrazed_Socket","Package_DIP/CERDIP-8_W7.62mm_SideBrazed","Package_DIP/CERDIP-8_W7.62mm_SideBrazed_LongPads","Package_DIP/CERDIP-8_W7.62mm_SideBrazed_LongPads_Socket","Package_DIP/CERDIP-8_W7.62mm_SideBrazed_Socket","Package_DIP/DIP-10_W10.16mm","Package_DIP/DIP-10_W10.16mm_LongPads","Package_DIP/DIP-10_W7.62mm","Package_DIP/DIP-10_W7.62mm_LongPads","Package_DIP/DIP-10_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-10_W7.62mm_Socket","Package_DIP/DIP-10_W7.62mm_Socket_LongPads","Package_DIP/DIP-10_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-12_W10.16mm","Package_DIP/DIP-12_W10.16mm_LongPads","Package_DIP/DIP-12_W7.62mm","Package_DIP/DIP-12_W7.62mm_LongPads","Package_DIP/DIP-12_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-12_W7.62mm_Socket","Package_DIP/DIP-12_W7.62mm_Socket_LongPads","Package_DIP/DIP-12_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-14_W10.16mm","Package_DIP/DIP-14_W10.16mm_LongPads","Package_DIP/DIP-14_W7.62mm","Package_DIP/DIP-14_W7.62mm_LongPads","Package_DIP/DIP-14_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-14_W7.62mm_Socket","Package_DIP/DIP-14_W7.62mm_Socket_LongPads","Package_DIP/DIP-14_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-16_W10.16mm","Package_DIP/DIP-16_W10.16mm_LongPads","Package_DIP/DIP-16_W7.62mm","Package_DIP/DIP-16_W7.62mm_LongPads","Package_DIP/DIP-16_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-16_W7.62mm_Socket","Package_DIP/DIP-16_W7.62mm_Socket_LongPads","Package_DIP/DIP-16_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-18_W7.62mm","Package_DIP/DIP-18_W7.62mm_LongPads","Package_DIP/DIP-18_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-18_W7.62mm_Socket","Package_DIP/DIP-18_W7.62mm_Socket_LongPads","Package_DIP/DIP-18_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-20_W7.62mm","Package_DIP/DIP-20_W7.62mm_LongPads","Package_DIP/DIP-20_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-20_W7.62mm_Socket","Package_DIP/DIP-20_W7.62mm_Socket_LongPads","Package_DIP/DIP-20_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-22_W10.16mm","Package_DIP/DIP-22_W10.16mm_LongPads","Package_DIP/DIP-22_W10.16mm_SMDSocket_SmallPads","Package_DIP/DIP-22_W10.16mm_Socket","Package_DIP/DIP-22_W10.16mm_Socket_LongPads","Package_DIP/DIP-22_W11.43mm_SMDSocket_LongPads","Package_DIP/DIP-22_W7.62mm","Package_DIP/DIP-22_W7.62mm_LongPads","Package_DIP/DIP-22_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-22_W7.62mm_Socket","Package_DIP/DIP-22_W7.62mm_Socket_LongPads","Package_DIP/DIP-22_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm","Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_LongPads","Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_Socket","Package_DIP/DIP-24_18.0mmx34.29mm_W15.24mm_Socket_LongPads","Package_DIP/DIP-24_W10.16mm","Package_DIP/DIP-24_W10.16mm_LongPads","Package_DIP/DIP-24_W10.16mm_SMDSocket_SmallPads","Package_DIP/DIP-24_W10.16mm_Socket","Package_DIP/DIP-24_W10.16mm_Socket_LongPads","Package_DIP/DIP-24_W11.43mm_SMDSocket_LongPads","Package_DIP/DIP-24_W15.24mm","Package_DIP/DIP-24_W15.24mm_LongPads","Package_DIP/DIP-24_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-24_W15.24mm_Socket","Package_DIP/DIP-24_W15.24mm_Socket_LongPads","Package_DIP/DIP-24_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-24_W7.62mm","Package_DIP/DIP-24_W7.62mm_LongPads","Package_DIP/DIP-24_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-24_W7.62mm_Socket","Package_DIP/DIP-24_W7.62mm_Socket_LongPads","Package_DIP/DIP-24_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-26_W15.24mm","Package_DIP/DIP-26_W15.24mm_LongPads","Package_DIP/DIP-26_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-26_W15.24mm_Socket","Package_DIP/DIP-26_W15.24mm_Socket_LongPads","Package_DIP/DIP-26_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-28_W15.24mm","Package_DIP/DIP-28_W15.24mm_LongPads","Package_DIP/DIP-28_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-28_W15.24mm_Socket","Package_DIP/DIP-28_W15.24mm_Socket_LongPads","Package_DIP/DIP-28_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-28_W7.62mm","Package_DIP/DIP-28_W7.62mm_LongPads","Package_DIP/DIP-28_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-28_W7.62mm_Socket","Package_DIP/DIP-28_W7.62mm_Socket_LongPads","Package_DIP/DIP-28_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-32_W15.24mm","Package_DIP/DIP-32_W15.24mm_LongPads","Package_DIP/DIP-32_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-32_W15.24mm_Socket","Package_DIP/DIP-32_W15.24mm_Socket_LongPads","Package_DIP/DIP-32_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-32_W7.62mm","Package_DIP/DIP-40_W15.24mm","Package_DIP/DIP-40_W15.24mm_LongPads","Package_DIP/DIP-40_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-40_W15.24mm_Socket","Package_DIP/DIP-40_W15.24mm_Socket_LongPads","Package_DIP/DIP-40_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-40_W25.4mm","Package_DIP/DIP-40_W25.4mm_LongPads","Package_DIP/DIP-40_W25.4mm_SMDSocket_SmallPads","Package_DIP/DIP-40_W25.4mm_Socket","Package_DIP/DIP-40_W25.4mm_Socket_LongPads","Package_DIP/DIP-40_W26.67mm_SMDSocket_LongPads","Package_DIP/DIP-42_W15.24mm","Package_DIP/DIP-42_W15.24mm_LongPads","Package_DIP/DIP-42_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-42_W15.24mm_Socket","Package_DIP/DIP-42_W15.24mm_Socket_LongPads","Package_DIP/DIP-42_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-48_W15.24mm","Package_DIP/DIP-48_W15.24mm_LongPads","Package_DIP/DIP-48_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-48_W15.24mm_Socket","Package_DIP/DIP-48_W15.24mm_Socket_LongPads","Package_DIP/DIP-48_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-4_W10.16mm","Package_DIP/DIP-4_W10.16mm_LongPads","Package_DIP/DIP-4_W7.62mm","Package_DIP/DIP-4_W7.62mm_LongPads","Package_DIP/DIP-4_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-4_W7.62mm_Socket","Package_DIP/DIP-4_W7.62mm_Socket_LongPads","Package_DIP/DIP-4_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-5-6_W10.16mm","Package_DIP/DIP-5-6_W10.16mm_LongPads","Package_DIP/DIP-5-6_W7.62mm","Package_DIP/DIP-5-6_W7.62mm_LongPads","Package_DIP/DIP-5-6_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-5-6_W7.62mm_Socket","Package_DIP/DIP-5-6_W7.62mm_Socket_LongPads","Package_DIP/DIP-5-6_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-64_W15.24mm","Package_DIP/DIP-64_W15.24mm_LongPads","Package_DIP/DIP-64_W15.24mm_SMDSocket_SmallPads","Package_DIP/DIP-64_W15.24mm_Socket","Package_DIP/DIP-64_W15.24mm_Socket_LongPads","Package_DIP/DIP-64_W16.51mm_SMDSocket_LongPads","Package_DIP/DIP-64_W22.86mm","Package_DIP/DIP-64_W22.86mm_LongPads","Package_DIP/DIP-64_W22.86mm_SMDSocket_SmallPads","Package_DIP/DIP-64_W22.86mm_Socket","Package_DIP/DIP-64_W22.86mm_Socket_LongPads","Package_DIP/DIP-64_W24.13mm_SMDSocket_LongPads","Package_DIP/DIP-64_W25.4mm","Package_DIP/DIP-64_W25.4mm_LongPads","Package_DIP/DIP-64_W25.4mm_SMDSocket_SmallPads","Package_DIP/DIP-64_W25.4mm_Socket","Package_DIP/DIP-64_W25.4mm_Socket_LongPads","Package_DIP/DIP-64_W26.67mm_SMDSocket_LongPads","Package_DIP/DIP-6_W10.16mm","Package_DIP/DIP-6_W10.16mm_LongPads","Package_DIP/DIP-6_W7.62mm","Package_DIP/DIP-6_W7.62mm_LongPads","Package_DIP/DIP-6_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-6_W7.62mm_Socket","Package_DIP/DIP-6_W7.62mm_Socket_LongPads","Package_DIP/DIP-6_W8.89mm_SMDSocket_LongPads","Package_DIP/DIP-8-16_W7.62mm","Package_DIP/DIP-8-16_W7.62mm_Socket","Package_DIP/DIP-8-16_W7.62mm_Socket_LongPads","Package_DIP/DIP-8-N6_W7.62mm","Package_DIP/DIP-8-N7_W7.62mm","Package_DIP/DIP-8_W10.16mm","Package_DIP/DIP-8_W10.16mm_LongPads","Package_DIP/DIP-8_W7.62mm","Package_DIP/DIP-8_W7.62mm_LongPads","Package_DIP/DIP-8_W7.62mm_SMDSocket_SmallPads","Package_DIP/DIP-8_W7.62mm_Socket","Package_DIP/DIP-8_W7.62mm_Socket_LongPads","Package_DIP/DIP-8_W8.89mm_SMDSocket_LongPads","Package_DIP/Fairchild_LSOP-8","Package_DIP/IXYS_Flatpak-8_6.3x9.7mm_P2.54mm","Package_DIP/IXYS_SMD-8_6.3x9.7mm_P2.54mm","Package_DIP/PowerIntegrations_PDIP-8B","Package_DIP/PowerIntegrations_PDIP-8C","Package_DIP/PowerIntegrations_SDIP-10C","Package_DIP/PowerIntegrations_SMD-8","Package_DIP/PowerIntegrations_SMD-8B","Package_DIP/PowerIntegrations_SMD-8C","Package_DIP/PowerIntegrations_eDIP-12B","Package_DIP/SMDIP-10_W11.48mm","Package_DIP/SMDIP-10_W7.62mm","Package_DIP/SMDIP-10_W9.53mm","Package_DIP/SMDIP-10_W9.53mm_Clearance8mm","Package_DIP/SMDIP-12_W11.48mm","Package_DIP/SMDIP-12_W7.62mm","Package_DIP/SMDIP-12_W9.53mm","Package_DIP/SMDIP-12_W9.53mm_Clearance8mm","Package_DIP/SMDIP-14_W11.48mm","Package_DIP/SMDIP-14_W7.62mm","Package_DIP/SMDIP-14_W9.53mm","Package_DIP/SMDIP-14_W9.53mm_Clearance8mm","Package_DIP/SMDIP-16_W11.48mm","Package_DIP/SMDIP-16_W7.62mm","Package_DIP/SMDIP-16_W9.53mm","Package_DIP/SMDIP-16_W9.53mm_Clearance8mm","Package_DIP/SMDIP-18_W11.48mm","Package_DIP/SMDIP-18_W7.62mm","Package_DIP/SMDIP-18_W9.53mm","Package_DIP/SMDIP-18_W9.53mm_Clearance8mm","Package_DIP/SMDIP-20_W11.48mm","Package_DIP/SMDIP-20_W7.62mm","Package_DIP/SMDIP-20_W9.53mm","Package_DIP/SMDIP-20_W9.53mm_Clearance8mm","Package_DIP/SMDIP-22_W11.48mm","Package_DIP/SMDIP-22_W7.62mm","Package_DIP/SMDIP-22_W9.53mm","Package_DIP/SMDIP-22_W9.53mm_Clearance8mm","Package_DIP/SMDIP-24_W11.48mm","Package_DIP/SMDIP-24_W15.24mm","Package_DIP/SMDIP-24_W7.62mm","Package_DIP/SMDIP-24_W9.53mm","Package_DIP/SMDIP-28_W15.24mm","Package_DIP/SMDIP-32_W11.48mm","Package_DIP/SMDIP-32_W15.24mm","Package_DIP/SMDIP-32_W7.62mm","Package_DIP/SMDIP-32_W9.53mm","Package_DIP/SMDIP-40_W15.24mm","Package_DIP/SMDIP-40_W25.24mm","Package_DIP/SMDIP-42_W15.24mm","Package_DIP/SMDIP-48_W15.24mm","Package_DIP/SMDIP-4_W11.48mm","Package_DIP/SMDIP-4_W7.62mm","Package_DIP/SMDIP-4_W9.53mm","Package_DIP/SMDIP-4_W9.53mm_Clearance8mm","Package_DIP/SMDIP-64_W15.24mm","Package_DIP/SMDIP-6_W11.48mm","Package_DIP/SMDIP-6_W7.62mm","Package_DIP/SMDIP-6_W9.53mm","Package_DIP/SMDIP-6_W9.53mm_Clearance8mm","Package_DIP/SMDIP-8_W11.48mm","Package_DIP/SMDIP-8_W7.62mm","Package_DIP/SMDIP-8_W9.53mm","Package_DIP/SMDIP-8_W9.53mm_Clearance8mm","Package_DIP/Toshiba_11-7A9","Package_DIP/Vishay_HVM-DIP-3_W7.62mm","Package_DirectFET/DirectFET_L4","Package_DirectFET/DirectFET_L6","Package_DirectFET/DirectFET_L8","Package_DirectFET/DirectFET_LA","Package_DirectFET/DirectFET_M2","Package_DirectFET/DirectFET_M4","Package_DirectFET/DirectFET_MA","Package_DirectFET/DirectFET_MB","Package_DirectFET/DirectFET_MC","Package_DirectFET/DirectFET_MD","Package_DirectFET/DirectFET_ME","Package_DirectFET/DirectFET_MF","Package_DirectFET/DirectFET_MN","Package_DirectFET/DirectFET_MP","Package_DirectFET/DirectFET_MQ","Package_DirectFET/DirectFET_MT","Package_DirectFET/DirectFET_MU","Package_DirectFET/DirectFET_MX","Package_DirectFET/DirectFET_MZ","Package_DirectFET/DirectFET_S1","Package_DirectFET/DirectFET_S2","Package_DirectFET/DirectFET_S3C","Package_DirectFET/DirectFET_SA","Package_DirectFET/DirectFET_SB","Package_DirectFET/DirectFET_SC","Package_DirectFET/DirectFET_SH","Package_DirectFET/DirectFET_SJ","Package_DirectFET/DirectFET_SQ","Package_DirectFET/DirectFET_ST","Package_LCC/Analog_LCC-8_5x5mm_P1.27mm","Package_LCC/MO047AD_PLCC-52_19.1x19.1mm_P1.27mm","Package_LCC/PLCC-20","Package_LCC/PLCC-20_9.0x9.0mm_P1.27mm","Package_LCC/PLCC-20_SMD-Socket","Package_LCC/PLCC-20_THT-Socket","Package_LCC/PLCC-28","Package_LCC/PLCC-28_SMD-Socket","Package_LCC/PLCC-28_THT-Socket","Package_LCC/PLCC-32_11.4x14.0mm_P1.27mm","Package_LCC/PLCC-32_THT-Socket","Package_LCC/PLCC-44","Package_LCC/PLCC-44_16.6x16.6mm_P1.27mm","Package_LCC/PLCC-44_SMD-Socket","Package_LCC/PLCC-44_THT-Socket","Package_LCC/PLCC-52","Package_LCC/PLCC-52_SMD-Socket","Package_LCC/PLCC-52_THT-Socket","Package_LCC/PLCC-68","Package_LCC/PLCC-68_24.2x24.2mm_P1.27mm","Package_LCC/PLCC-68_SMD-Socket","Package_LCC/PLCC-68_THT-Socket","Package_LCC/PLCC-84","Package_LCC/PLCC-84_29.3x29.3mm_P1.27mm","Package_LCC/PLCC-84_SMD-Socket","Package_LCC/PLCC-84_THT-Socket","Package_LGA/AMS_LGA-10-1EP_2.7x4mm_P0.6mm","Package_LGA/AMS_LGA-20_4.7x4.5mm_P0.65mm","Package_LGA/AMS_OLGA-8_2x3.1mm_P0.8mm","Package_LGA/Bosch_LGA-14_3x2.5mm_P0.5mm","Package_LGA/Bosch_LGA-16_4.5x3mm_P0.5mm_LayoutBorder7x1y_ClockwisePinNumbering","Package_LGA/Bosch_LGA-8_2.5x2.5mm_P0.65mm_ClockwisePinNumbering","Package_LGA/Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumbering","Package_LGA/Bosch_LGA-8_3x3mm_P0.8mm_ClockwisePinNumbering","Package_LGA/Infineon_PG-TSNP-6-10_0.7x1.1mm_0.7x1.1mm_P0.4mm","Package_LGA/Kionix_LGA-12_2x2mm_P0.5mm_LayoutBorder2x4y","Package_LGA/LGA-12_2x2mm_P0.5mm","Package_LGA/LGA-14_2x2mm_P0.35mm_LayoutBorder3x4y","Package_LGA/LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4y","Package_LGA/LGA-14_3x5mm_P0.8mm_LayoutBorder1x6y","Package_LGA/LGA-16_3x3mm_P0.5mm","Package_LGA/LGA-16_3x3mm_P0.5mm_LayoutBorder3x5y","Package_LGA/LGA-16_4x4mm_P0.65mm_LayoutBorder4x4y","Package_LGA/LGA-24L_3x3.5mm_P0.43mm","Package_LGA/LGA-28_5.2x3.8mm_P0.5mm","Package_LGA/LGA-8_3x5mm_P1.25mm","Package_LGA/LGA-8_8x6.2mm_P1.27mm","Package_LGA/LGA-8_8x6mm_P1.27mm","Package_LGA/Linear_LGA-133_15.0x15.0mm_Layout12x12_P1.27mm","Package_LGA/MPS_LGA-18-10EP_12x12mm_P3.3mm","Package_LGA/NXP_LGA-8_3x5mm_P1.25mm_H1.1mm","Package_LGA/NXP_LGA-8_3x5mm_P1.25mm_H1.2mm","Package_LGA/NXP_USON-8_1x1.35mm_P0.35mm","Package_LGA/Nordic_nRF9151-LAxx_LGA-80-33EP_12.1x11.1mm_P0.5mm","Package_LGA/Nordic_nRF9160-SIxx_LGA-102-59EP_16.0x10.5mm_P0.5mm","Package_LGA/Rohm_MLGA010V020A_LGA-10_2x2mm_P0.45mm_LayoutBorder2x3y","Package_LGA/ST_CCLGA-7L_2.8x2.8mm_P1.15mm_H1.95mm","Package_LGA/ST_HLGA-10_2.5x2.5mm_P0.6mm_LayoutBorder3x2y","Package_LGA/ST_HLGA-10_2x2mm_P0.5mm_LayoutBorder3x2y","Package_LGA/Texas_SIL0008C_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm","Package_LGA/Texas_SIL0008C_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm_ThermalVias","Package_LGA/Texas_SIL0008D_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm","Package_LGA/Texas_SIL0008D_MicroSiP-8-1EP_2.8x3mm_P0.65mm_EP1.1x1.9mm_ThermalVias","Package_LGA/Texas_SIL0010A_MicroSiP-10-1EP_3.8x3mm_P0.6mm_EP0.7x2.9mm","Package_LGA/Texas_SIL0010A_MicroSiP-10-1EP_3.8x3mm_P0.6mm_EP0.7x2.9mm_ThermalVias","Package_LGA/VLGA-4_2x2.5mm_P1.65mm","Package_LGA/ublox_LGA-53_4.5x4.5mm_Layout9x9_P0.5mm","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP4x4mm","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP4x4mm_ThermalVias","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP5x5mm","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP5x5mm_ThermalVias","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP6.61x5.615mm","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP6.61x5.615mm_ThermalVias","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP7.2x6.35mm","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP7.2x6.35mm_ThermalVias","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP8.93x8.7mm","Package_QFP/EQFP-144-1EP_20x20mm_P0.5mm_EP8.93x8.7mm_ThermalVias","Package_QFP/Hitachi_FP80B_PQFP-80_14x20mm_P0.8mm","Package_QFP/LQFP-100-1EP_14x14mm_P0.5mm_EP6.9x6.9mm","Package_QFP/LQFP-100-1EP_14x14mm_P0.5mm_EP6.9x6.9mm_ThermalVias","Package_QFP/LQFP-100_14x14mm_P0.5mm","Package_QFP/LQFP-128_14x14mm_P0.4mm","Package_QFP/LQFP-128_14x20mm_P0.5mm","Package_QFP/LQFP-144-1EP_20x20mm_P0.5mm_EP6.5x6.5mm","Package_QFP/LQFP-144-1EP_20x20mm_P0.5mm_EP6.5x6.5mm_ThermalVias","Package_QFP/LQFP-144_20x20mm_P0.5mm","Package_QFP/LQFP-160_24x24mm_P0.5mm","Package_QFP/LQFP-176-1EP_24x24mm_P0.5mm_EP6.6x6.6mm","Package_QFP/LQFP-176-1EP_24x24mm_P0.5mm_EP6.6x6.6mm_ThermalVias","Package_QFP/LQFP-176_20x20mm_P0.4mm","Package_QFP/LQFP-176_24x24mm_P0.5mm","Package_QFP/LQFP-208_28x28mm_P0.5mm","Package_QFP/LQFP-216_24x24mm_P0.4mm","Package_QFP/LQFP-32_5x5mm_P0.5mm","Package_QFP/LQFP-32_7x7mm_P0.8mm","Package_QFP/LQFP-36_7x7mm_P0.65mm","Package_QFP/LQFP-44_10x10mm_P0.8mm","Package_QFP/LQFP-48-1EP_7x7mm_P0.5mm_EP3.6x3.6mm","Package_QFP/LQFP-48-1EP_7x7mm_P0.5mm_EP3.6x3.6mm_ThermalVias","Package_QFP/LQFP-48_7x7mm_P0.5mm","Package_QFP/LQFP-52-1EP_10x10mm_P0.65mm_EP4.8x4.8mm","Package_QFP/LQFP-52-1EP_10x10mm_P0.65mm_EP4.8x4.8mm_ThermalVias","Package_QFP/LQFP-52_10x10mm_P0.65mm","Package_QFP/LQFP-52_14x14mm_P1mm","Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP5x5mm","Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP5x5mm_ThermalVias","Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP6.5x6.5mm","Package_QFP/LQFP-64-1EP_10x10mm_P0.5mm_EP6.5x6.5mm_ThermalVias","Package_QFP/LQFP-64_10x10mm_P0.5mm","Package_QFP/LQFP-64_14x14mm_P0.8mm","Package_QFP/LQFP-64_7x7mm_P0.4mm","Package_QFP/LQFP-80_10x10mm_P0.4mm","Package_QFP/LQFP-80_12x12mm_P0.5mm","Package_QFP/LQFP-80_14x14mm_P0.65mm","Package_QFP/MO112AC1_PQFP-52_10x10mm_P0.65mm","Package_QFP/Microchip_PQFP-44_10x10mm_P0.8mm","Package_QFP/PQFP-100_14x20mm_P0.65mm","Package_QFP/PQFP-112_20x20mm_P0.65mm","Package_QFP/PQFP-128_28x28mm_P0.8mm","Package_QFP/PQFP-132_24x24mm_P0.635mm","Package_QFP/PQFP-132_24x24mm_P0.635mm_i386","Package_QFP/PQFP-144_28x28mm_P0.65mm","Package_QFP/PQFP-160_28x28mm_P0.65mm","Package_QFP/PQFP-168_28x28mm_P0.65mm","Package_QFP/PQFP-208_28x28mm_P0.5mm","Package_QFP/PQFP-240_32.1x32.1mm_P0.5mm","Package_QFP/PQFP-256_28x28mm_P0.4mm","Package_QFP/PQFP-44_10x10mm_P0.8mm","Package_QFP/PQFP-64_14x14mm_P0.8mm","Package_QFP/PQFP-80_14x14mm_P0.65mm","Package_QFP/PQFP-80_14x20mm_P0.8mm","Package_QFP/TQFP-100-1EP_14x14mm_P0.5mm_EP5x5mm","Package_QFP/TQFP-100-1EP_14x14mm_P0.5mm_EP5x5mm_ThermalVias","Package_QFP/TQFP-100_12x12mm_P0.4mm","Package_QFP/TQFP-100_14x14mm_P0.5mm","Package_QFP/TQFP-120_14x14mm_P0.4mm","Package_QFP/TQFP-128_14x14mm_P0.4mm","Package_QFP/TQFP-144_16x16mm_P0.4mm","Package_QFP/TQFP-144_20x20mm_P0.5mm","Package_QFP/TQFP-176_20x20mm_P0.4mm","Package_QFP/TQFP-176_24x24mm_P0.5mm","Package_QFP/TQFP-32_5x5mm_P0.5mm","Package_QFP/TQFP-32_7x7mm_P0.8mm","Package_QFP/TQFP-44-1EP_10x10mm_P0.8mm_EP4.5x4.5mm","Package_QFP/TQFP-44-1EP_10x10mm_P0.8mm_EP4.5x4.5mm_ThermalVias","Package_QFP/TQFP-44_10x10mm_P0.8mm","Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm","Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP3.5x3.5mm_ThermalVias","Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP4.11x4.11mm","Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP5x5mm","Package_QFP/TQFP-48-1EP_7x7mm_P0.5mm_EP5x5mm_ThermalVias","Package_QFP/TQFP-48_7x7mm_P0.5mm","Package_QFP/TQFP-52-1EP_10x10mm_P0.65mm_EP6.5x6.5mm","Package_QFP/TQFP-52-1EP_10x10mm_P0.65mm_EP6.5x6.5mm_ThermalVias","Package_QFP/TQFP-64-1EP_10x10mm_P0.5mm_EP5.305x5.305mm","Package_QFP/TQFP-64-1EP_10x10mm_P0.5mm_EP5.305x5.305mm_ThermalVias","Package_QFP/TQFP-64_10x10mm_P0.5mm","Package_QFP/TQFP-64_14x14mm_P0.8mm","Package_QFP/TQFP-64_7x7mm_P0.4mm","Package_QFP/TQFP-80-1EP_14x14mm_P0.65mm_EP9.5x9.5mm","Package_QFP/TQFP-80-1EP_14x14mm_P0.65mm_EP9.5x9.5mm_ThermalVias","Package_QFP/TQFP-80_12x12mm_P0.5mm","Package_QFP/TQFP-80_14x14mm_P0.65mm","Package_QFP/Texas_PHP0048E_HTQFP-48-1EP_7x7mm_P0.5mm_EP6.5x6.5mm_Mask3.62x3.62mm","Package_QFP/Texas_PHP0048E_HTQFP-48-1EP_7x7mm_P0.5mm_EP6.5x6.5mm_Mask3.62x3.62mm_ThermalVias","Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask4.44x4.44mm","Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask4.44x4.44mm_ThermalVias","Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask5x5mm","Package_QFP/Texas_TQFP-64-1EP_10x10mm_P0.5mm_EP8x8mm_Mask5x5mm_ThermalVias","Package_SIP/PowerIntegrations_eSIP-7C","Package_SIP/PowerIntegrations_eSIP-7F","Package_SIP/SIP-8_19x3mm_P2.54mm","Package_SIP/SIP-9_21.54x3mm_P2.54mm","Package_SIP/SIP-9_22.3x3mm_P2.54mm","Package_SIP/SIP3_11.6x8.5mm","Package_SIP/SIP4_Sharp-SSR_P7.62mm_Angled","Package_SIP/SIP4_Sharp-SSR_P7.62mm_Angled_NoHole","Package_SIP/SIP4_Sharp-SSR_P7.62mm_Straight","Package_SIP/SIP9_Housing","Package_SIP/SIP9_Housing_BigPads","Package_SIP/SLA704XM","Package_SIP/STK672-040-E","Package_SIP/STK672-080-E","Package_SIP/Sanyo_STK4xx-15_59.2x8.0mm_P2.54mm","Package_SIP/Sanyo_STK4xx-15_78.0x8.0mm_P2.54mm","Package_SO/Analog_MSOP-12-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm","Package_SO/Analog_MSOP-12-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm_ThermalVias","Package_SO/Analog_MSOP-12-16_3x4.039mm_P0.5mm","Package_SO/Diodes_PSOP-8","Package_SO/Diodes_SO-8EP","Package_SO/ETSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3x4.2mm","Package_SO/HSOP-20-1EP_11.0x15.9mm_P1.27mm_SlugDown","Package_SO/HSOP-20-1EP_11.0x15.9mm_P1.27mm_SlugDown_ThermalVias","Package_SO/HSOP-20-1EP_11.0x15.9mm_P1.27mm_SlugUp","Package_SO/HSOP-32-1EP_7.5x11mm_P0.65mm_EP4.7x4.7mm","Package_SO/HSOP-36-1EP_11.0x15.9mm_P0.65mm_SlugDown","Package_SO/HSOP-36-1EP_11.0x15.9mm_P0.65mm_SlugDown_ThermalVias","Package_SO/HSOP-36-1EP_11.0x15.9mm_P0.65mm_SlugUp","Package_SO/HSOP-54-1EP_7.5x17.9mm_P0.65mm_EP4.6x4.6mm","Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.3x2.3mm","Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.3x2.3mm_ThermalVias","Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.1mm","Package_SO/HSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.1mm_ThermalVias","Package_SO/HTSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.4x3.2mm","Package_SO/HTSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.4x3.2mm_ThermalVias","Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm","Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.46x2.31mm","Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.46x2.31mm_ThermalVias","Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.66x2.46mm","Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask2.66x2.46mm_ThermalVias","Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3x3mm_ThermalVias","Package_SO/HTSSOP-16-1EP_4.4x5mm_P0.65mm_EP3x3mm","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.74x3.86mm","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.85x4mm","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.4x3.7mm","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.75x3.43mm","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.75x3.43mm_ThermalVias","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.96x2.96mm","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_Mask2.96x2.96mm_ThermalVias","Package_SO/HTSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP3.4x6.5mm_ThermalVias","Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.2x5mm","Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.44x3.42mm","Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.44x3.42mm_ThermalVias","Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x2.98mm","Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x2.98mm_ThermalVias","Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x4.68mm","Package_SO/HTSSOP-24-1EP_4.4x7.8mm_P0.65mm_EP3.4x7.8mm_Mask2.4x4.68mm_ThermalVias","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.75x6.2mm","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.75x6.2mm_ThermalVias","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm_ThermalVias","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm_Mask2.4x6.17mm","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm_Mask2.4x6.17mm_ThermalVias","Package_SO/HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.5mm_ThermalVias","Package_SO/HTSSOP-32-1EP_6.1x11mm_P0.65mm_EP5.2x11mm_Mask4.11x4.36mm","Package_SO/HTSSOP-32-1EP_6.1x11mm_P0.65mm_EP5.2x11mm_Mask4.11x4.36mm_ThermalVias","Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP1.5x3.3mm","Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP1.5x3.3mm_ThermalVias","Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm","Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm_ThermalVias","Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP3.05x6.65mm","Package_SO/HTSSOP-38-1EP_4.4x9.7mm_P0.5mm_EP3.05x6.65mm_ThermalVias","Package_SO/HTSSOP-38-1EP_6.1x12.5mm_P0.65mm_EP5.2x12.5mm_Mask3.39x6.35mm","Package_SO/HTSSOP-38-1EP_6.1x12.5mm_P0.65mm_EP5.2x12.5mm_Mask3.39x6.35mm_ThermalVias","Package_SO/HTSSOP-44-1EP_6.1x14mm_P0.635mm_EP5.2x14mm_Mask4.31x8.26mm","Package_SO/HTSSOP-44-1EP_6.1x14mm_P0.635mm_EP5.2x14mm_Mask4.31x8.26mm_ThermalVias","Package_SO/HTSSOP-44_6.1x14mm_P0.635mm_TopEP4.14x7.01mm","Package_SO/HTSSOP-56-1EP_6.1x14mm_P0.5mm_EP3.61x6.35mm","Package_SO/HVSSOP-10-1EP_3x3mm_P0.5mm_EP1.83x1.89mm","Package_SO/HVSSOP-10-1EP_3x3mm_P0.5mm_EP1.83x1.89mm_ThermalVias","Package_SO/HVSSOP-8-1EP_3x3mm_P0.65mm_EP1.57x1.89mm","Package_SO/HVSSOP-8-1EP_3x3mm_P0.65mm_EP1.57x1.89mm_ThermalVias","Package_SO/Infineon_PG-DSO-12-11","Package_SO/Infineon_PG-DSO-12-11_ThermalVias","Package_SO/Infineon_PG-DSO-12-9","Package_SO/Infineon_PG-DSO-12-9_ThermalVias","Package_SO/Infineon_PG-DSO-20-30","Package_SO/Infineon_PG-DSO-20-30_ThermalVias","Package_SO/Infineon_PG-DSO-20-32","Package_SO/Infineon_PG-DSO-20-85","Package_SO/Infineon_PG-DSO-20-85_ThermalVias","Package_SO/Infineon_PG-DSO-20-87","Package_SO/Infineon_PG-DSO-20-U03_7.5x12.8mm","Package_SO/Infineon_PG-DSO-8-24_4x5mm","Package_SO/Infineon_PG-DSO-8-27_3.9x4.9mm_EP2.65x3mm","Package_SO/Infineon_PG-DSO-8-27_3.9x4.9mm_EP2.65x3mm_ThermalVias","Package_SO/Infineon_PG-DSO-8-43","Package_SO/Infineon_PG-DSO-8-59_7.5x6.3mm","Package_SO/Infineon_PG-TSDSO-14-22","Package_SO/Infineon_SOIC-20W_7.6x12.8mm_P1.27mm","Package_SO/JEITA_SOIC-16_3.9x9.9mm_P1.27mm","Package_SO/JEITA_SOIC-8_3.9x4.9mm_P1.27mm","Package_SO/Linear_HTSSOP-31-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm","Package_SO/Linear_HTSSOP-31-38-1EP_4.4x9.7mm_P0.5mm_EP2.74x4.75mm_ThermalVias","Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.68x1.88mm","Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.68x1.88mm_ThermalVias","Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.73x1.98mm","Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP1.73x1.98mm_ThermalVias","Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP2.2x3.1mm_Mask1.83x1.89mm","Package_SO/MSOP-10-1EP_3x3mm_P0.5mm_EP2.2x3.1mm_Mask1.83x1.89mm_ThermalVias","Package_SO/MSOP-10_3x3mm_P0.5mm","Package_SO/MSOP-12-1EP_3x4.039mm_P0.65mm_EP1.651x2.845mm","Package_SO/MSOP-12-1EP_3x4.039mm_P0.65mm_EP1.651x2.845mm_ThermalVias","Package_SO/MSOP-12_3x4.039mm_P0.65mm","Package_SO/MSOP-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm","Package_SO/MSOP-16-1EP_3x4.039mm_P0.5mm_EP1.651x2.845mm_ThermalVias","Package_SO/MSOP-16_3x4.039mm_P0.5mm","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.5x1.8mm","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.5x1.8mm_ThermalVias","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.68x1.88mm","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.68x1.88mm_ThermalVias","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.73x1.85mm","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.73x1.85mm_ThermalVias","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.95x2.15mm","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP1.95x2.15mm_ThermalVias","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP2.5x3mm_Mask1.73x2.36mm","Package_SO/MSOP-8-1EP_3x3mm_P0.65mm_EP2.5x3mm_Mask1.73x2.36mm_ThermalVias","Package_SO/MSOP-8_3x3mm_P0.65mm","Package_SO/NXP_HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.2x3.4mm","Package_SO/NXP_HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.2x3.4mm_ThermalVias","Package_SO/ONSemi_SO-8FL_488AA","Package_SO/OnSemi_751EP_SOIC-4_3.9x4.725mm_P2.54mm","Package_SO/OnSemi_Micro8","Package_SO/PSOP-44_16.9x27.17mm_P1.27mm","Package_SO/PowerIntegrations_SO-8","Package_SO/PowerIntegrations_SO-8B","Package_SO/PowerIntegrations_SO-8C","Package_SO/PowerIntegrations_eSOP-12B","Package_SO/PowerPAK_SO-8L_Single","Package_SO/PowerPAK_SO-8_Dual","Package_SO/PowerPAK_SO-8_Single","Package_SO/PowerSSO-16-1EP_3.9x4.9mm_P0.5mm_EP2.5x3.61mm","Package_SO/PowerSSO-16-1EP_3.9x4.9mm_P0.5mm_EP2.5x3.61mm_ThermalVias","Package_SO/QSOP-16_3.9x4.9mm_P0.635mm","Package_SO/QSOP-20_3.9x8.7mm_P0.635mm","Package_SO/QSOP-24_3.9x8.7mm_P0.635mm","Package_SO/QSOP-28_3.9x9.9mm_P0.635mm","Package_SO/Renesas_SOP-32_11.4x20.75mm_P1.27mm","Package_SO/SO-14_3.9x8.65mm_P1.27mm","Package_SO/SO-14_5.3x10.2mm_P1.27mm","Package_SO/SO-16_3.9x9.9mm_P1.27mm","Package_SO/SO-16_5.3x10.2mm_P1.27mm","Package_SO/SO-20-1EP_7.52x12.825mm_P1.27mm_EP6.045x12.09mm_Mask3.56x4.47mm","Package_SO/SO-20-1EP_7.52x12.825mm_P1.27mm_EP6.045x12.09mm_Mask3.56x4.47mm_ThermalVias","Package_SO/SO-20_12.8x7.5mm_P1.27mm","Package_SO/SO-20_5.3x12.6mm_P1.27mm","Package_SO/SO-24_5.3x15mm_P1.27mm","Package_SO/SO-4_4.4x2.3mm_P1.27mm","Package_SO/SO-4_4.4x3.6mm_P2.54mm","Package_SO/SO-4_4.4x3.9mm_P2.54mm","Package_SO/SO-4_4.4x4.3mm_P2.54mm","Package_SO/SO-4_7.6x3.6mm_P2.54mm","Package_SO/SO-5-6_4.55x3.7mm_P1.27mm","Package_SO/SO-6L_10x3.84mm_P1.27mm","Package_SO/SO-6_4.4x3.6mm_P1.27mm","Package_SO/SO-8_3.9x4.9mm_P1.27mm","Package_SO/SOIC-10_3.9x4.9mm_P1mm","Package_SO/SOIC-14-16_3.9x9.9mm_P1.27mm","Package_SO/SOIC-14W_7.5x9mm_P1.27mm","Package_SO/SOIC-14_3.9x8.7mm_P1.27mm","Package_SO/SOIC-16W-12_7.5x10.3mm_P1.27mm","Package_SO/SOIC-16W_5.3x10.2mm_P1.27mm","Package_SO/SOIC-16W_7.5x10.3mm_P1.27mm","Package_SO/SOIC-16W_7.5x12.8mm_P1.27mm","Package_SO/SOIC-16_3.9x9.9mm_P1.27mm","Package_SO/SOIC-16_4.55x10.3mm_P1.27mm","Package_SO/SOIC-18W_7.5x11.6mm_P1.27mm","Package_SO/SOIC-20W_7.5x12.8mm_P1.27mm","Package_SO/SOIC-20W_7.5x15.4mm_P1.27mm","Package_SO/SOIC-24W_7.5x15.4mm_P1.27mm","Package_SO/SOIC-28W_7.5x17.9mm_P1.27mm","Package_SO/SOIC-28W_7.5x18.7mm_P1.27mm","Package_SO/SOIC-32_7.518x20.777mm_P1.27mm","Package_SO/SOIC-4_4.55x2.6mm_P1.27mm","Package_SO/SOIC-4_4.55x3.7mm_P2.54mm","Package_SO/SOIC-5-6_4.4x3.6mm_P1.27mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mm_ThermalVias","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalVias","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.81mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.81mm_ThermalVias","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.514x3.2mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.514x3.2mm_ThermalVias","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.62x3.51mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.62x3.51mm_ThermalVias","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.71x3.7mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.71x3.7mm_ThermalVias","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.34x2.34mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.34x2.34mm_ThermalVias","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.71x3.4mm","Package_SO/SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.71x3.4mm_ThermalVias","Package_SO/SOIC-8-N7_3.9x4.9mm_P1.27mm","Package_SO/SOIC-8_3.81x9.347mm_P2.54mm","Package_SO/SOIC-8_3.9x4.9mm_P1.27mm","Package_SO/SOIC-8_5.3x5.3mm_P1.27mm","Package_SO/SOIC-8_5.3x6.2mm_P1.27mm","Package_SO/SOIC-8_7.5x5.85mm_P1.27mm","Package_SO/SOJ-24_7.62x15.875mm_P1.27mm","Package_SO/SOJ-28_10.16x18.415mm_P1.27mm","Package_SO/SOJ-28_7.62x18.415mm_P1.27mm","Package_SO/SOJ-32_10.16x20.955mm_P1.27mm","Package_SO/SOJ-32_7.62x20.955mm_P1.27mm","Package_SO/SOJ-36_10.16x23.495mm_P1.27mm","Package_SO/SOJ-44_10.16x28.575mm_P1.27mm","Package_SO/SOP-16_4.4x10.4mm_P1.27mm","Package_SO/SOP-16_4.55x10.3mm_P1.27mm","Package_SO/SOP-18_7.495x11.515mm_P1.27mm","Package_SO/SOP-18_7x12.5mm_P1.27mm","Package_SO/SOP-20_7.5x12.8mm_P1.27mm","Package_SO/SOP-24_7.5x15.4mm_P1.27mm","Package_SO/SOP-28_8.4x18.16mm_P1.27mm","Package_SO/SOP-32_11.305x20.495mm_P1.27mm","Package_SO/SOP-44_12.6x28.5mm_P1.27mm","Package_SO/SOP-44_13.3x28.2mm_P1.27mm","Package_SO/SOP-4_3.8x4.1mm_P2.54mm","Package_SO/SOP-4_4.4x2.6mm_P1.27mm","Package_SO/SOP-4_7.5x4.1mm_P2.54mm","Package_SO/SOP-8-1EP_4.57x4.57mm_P1.27mm_EP4.57x4.45mm","Package_SO/SOP-8-1EP_4.57x4.57mm_P1.27mm_EP4.57x4.45mm_ThermalVias","Package_SO/SOP-8_3.76x4.96mm_P1.27mm","Package_SO/SOP-8_6.605x9.655mm_P2.54mm","Package_SO/SOP-8_6.62x9.15mm_P2.54mm","Package_SO/SSO-4_6.7x5.1mm_P2.54mm_Clearance8mm","Package_SO/SSO-6_6.8x4.6mm_P1.27mm_Clearance7mm","Package_SO/SSO-6_6.8x4.6mm_P1.27mm_Clearance8mm","Package_SO/SSO-7-8_6.4x9.78mm_P2.54mm","Package_SO/SSO-8-7_6.4x9.7mm_P2.54mm","Package_SO/SSO-8_13.6x6.3mm_P1.27mm_Clearance14.2mm","Package_SO/SSO-8_6.7x9.8mm_P2.54mm_Clearance8mm","Package_SO/SSO-8_6.8x5.9mm_P1.27mm_Clearance7mm","Package_SO/SSO-8_6.8x5.9mm_P1.27mm_Clearance8mm","Package_SO/SSO-8_9.6x6.3mm_P1.27mm_Clearance10.5mm","Package_SO/SSOP-10-1EP_3.9x4.9mm_P1mm_EP2.1x3.3mm","Package_SO/SSOP-10-1EP_3.9x4.9mm_P1mm_EP2.1x3.3mm_ThermalVias","Package_SO/SSOP-10_3.9x4.9mm_P1.00mm","Package_SO/SSOP-14_5.3x6.2mm_P0.65mm","Package_SO/SSOP-16_3.9x4.9mm_P0.635mm","Package_SO/SSOP-16_4.4x5.2mm_P0.65mm","Package_SO/SSOP-16_5.3x6.2mm_P0.65mm","Package_SO/SSOP-18_4.4x6.5mm_P0.65mm","Package_SO/SSOP-20_3.9x8.7mm_P0.635mm","Package_SO/SSOP-20_4.4x6.5mm_P0.65mm","Package_SO/SSOP-20_5.3x7.2mm_P0.65mm","Package_SO/SSOP-24_3.9x8.7mm_P0.635mm","Package_SO/SSOP-24_5.3x8.2mm_P0.65mm","Package_SO/SSOP-28_3.9x9.9mm_P0.635mm","Package_SO/SSOP-28_5.3x10.2mm_P0.65mm","Package_SO/SSOP-40_8.8x17.5mm_P0.8mm","Package_SO/SSOP-44_5.3x12.8mm_P0.5mm","Package_SO/SSOP-48_5.3x12.8mm_P0.5mm","Package_SO/SSOP-48_7.5x15.9mm_P0.635mm","Package_SO/SSOP-4_4.4x2.6mm_P1.27mm","Package_SO/SSOP-56_7.5x18.5mm_P0.635mm","Package_SO/SSOP-8_2.95x2.8mm_P0.65mm","Package_SO/SSOP-8_3.95x5.21x3.27mm_P1.27mm","Package_SO/SSOP-8_3.9x5.05mm_P1.27mm","Package_SO/SSOP-8_5.3x3mm_P0.65mm","Package_SO/STC_SOP-16_3.9x9.9mm_P1.27mm","Package_SO/ST_MultiPowerSO-30","Package_SO/ST_PowerSSO-24_SlugDown","Package_SO/ST_PowerSSO-24_SlugDown_ThermalVias","Package_SO/ST_PowerSSO-24_SlugUp","Package_SO/ST_PowerSSO-36_SlugDown","Package_SO/ST_PowerSSO-36_SlugDown_ThermalVias","Package_SO/ST_PowerSSO-36_SlugUp","Package_SO/TI_SO-PowerPAD-8","Package_SO/TI_SO-PowerPAD-8_ThermalVias","Package_SO/TSOP-5_1.65x3.05mm_P0.95mm","Package_SO/TSOP-6_1.65x3.05mm_P0.95mm","Package_SO/TSOP-I-24_12.4x6mm_P0.5mm","Package_SO/TSOP-I-24_14.4x6mm_P0.5mm","Package_SO/TSOP-I-24_16.4x6mm_P0.5mm","Package_SO/TSOP-I-24_18.4x6mm_P0.5mm","Package_SO/TSOP-I-28_11.8x8mm_P0.55mm","Package_SO/TSOP-I-32_11.8x8mm_P0.5mm","Package_SO/TSOP-I-32_12.4x8mm_P0.5mm","Package_SO/TSOP-I-32_14.4x8mm_P0.5mm","Package_SO/TSOP-I-32_16.4x8mm_P0.5mm","Package_SO/TSOP-I-32_18.4x8mm_P0.5mm","Package_SO/TSOP-I-32_18.4x8mm_P0.5mm_Reverse","Package_SO/TSOP-I-40_12.4x10mm_P0.5mm","Package_SO/TSOP-I-40_14.4x10mm_P0.5mm","Package_SO/TSOP-I-40_16.4x10mm_P0.5mm","Package_SO/TSOP-I-40_18.4x10mm_P0.5mm","Package_SO/TSOP-I-48_12.4x12mm_P0.5mm","Package_SO/TSOP-I-48_14.4x12mm_P0.5mm","Package_SO/TSOP-I-48_16.4x12mm_P0.5mm","Package_SO/TSOP-I-48_18.4x12mm_P0.5mm","Package_SO/TSOP-I-56_14.4x14mm_P0.5mm","Package_SO/TSOP-I-56_16.4x14mm_P0.5mm","Package_SO/TSOP-I-56_18.4x14mm_P0.5mm","Package_SO/TSOP-II-32_21.0x10.2mm_P1.27mm","Package_SO/TSOP-II-40-44_10.16x18.37mm_P0.8mm","Package_SO/TSOP-II-44_10.16x18.41mm_P0.8mm","Package_SO/TSOP-II-54_22.2x10.16mm_P0.8mm","Package_SO/TSSOP-100_6.1x20.8mm_P0.4mm","Package_SO/TSSOP-10_3x3mm_P0.5mm","Package_SO/TSSOP-14-1EP_4.4x5mm_P0.65mm","Package_SO/TSSOP-14_4.4x3.6mm_P0.4mm","Package_SO/TSSOP-14_4.4x5mm_P0.65mm","Package_SO/TSSOP-16-1EP_4.4x5mm_P0.65mm","Package_SO/TSSOP-16-1EP_4.4x5mm_P0.65mm_EP3x3mm","Package_SO/TSSOP-16-1EP_4.4x5mm_P0.65mm_EP3x3mm_ThermalVias","Package_SO/TSSOP-16_4.4x3.6mm_P0.4mm","Package_SO/TSSOP-16_4.4x5mm_P0.65mm","Package_SO/TSSOP-20-1EP_4.4x6.5mm_P0.65mm_EP2.15x3.35mm","Package_SO/TSSOP-20_4.4x5mm_P0.4mm","Package_SO/TSSOP-20_4.4x5mm_P0.5mm","Package_SO/TSSOP-20_4.4x6.5mm_P0.65mm","Package_SO/TSSOP-24_4.4x5mm_P0.4mm","Package_SO/TSSOP-24_4.4x6.5mm_P0.5mm","Package_SO/TSSOP-24_4.4x7.8mm_P0.65mm","Package_SO/TSSOP-24_6.1x7.8mm_P0.65mm","Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.74x4.75mm","Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.74x4.75mm_ThermalVias","Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x6.7mm","Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.05x7.56mm","Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.05x7.56mm_ThermalVias","Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask3.1x4.05mm","Package_SO/TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask3.1x4.05mm_ThermalVias","Package_SO/TSSOP-28_4.4x7.8mm_P0.5mm","Package_SO/TSSOP-28_4.4x9.7mm_P0.65mm","Package_SO/TSSOP-28_6.1x7.8mm_P0.5mm","Package_SO/TSSOP-28_6.1x9.7mm_P0.65mm","Package_SO/TSSOP-28_8x9.7mm_P0.65mm","Package_SO/TSSOP-30_4.4x7.8mm_P0.5mm","Package_SO/TSSOP-30_6.1x9.7mm_P0.65mm","Package_SO/TSSOP-32_4.4x6.5mm_P0.4mm","Package_SO/TSSOP-32_6.1x11mm_P0.65mm","Package_SO/TSSOP-32_8x11mm_P0.65mm","Package_SO/TSSOP-36_4.4x7.8mm_P0.4mm","Package_SO/TSSOP-36_4.4x9.7mm_P0.5mm","Package_SO/TSSOP-36_6.1x12.5mm_P0.65mm","Package_SO/TSSOP-36_6.1x7.8mm_P0.4mm","Package_SO/TSSOP-36_6.1x9.7mm_P0.5mm","Package_SO/TSSOP-36_8x12.5mm_P0.65mm","Package_SO/TSSOP-36_8x9.7mm_P0.5mm","Package_SO/TSSOP-38_4.4x9.7mm_P0.5mm","Package_SO/TSSOP-38_6.1x12.5mm_P0.65mm","Package_SO/TSSOP-40_6.1x11mm_P0.5mm","Package_SO/TSSOP-40_6.1x14mm_P0.65mm","Package_SO/TSSOP-40_8x11mm_P0.5mm","Package_SO/TSSOP-40_8x14mm_P0.65mm","Package_SO/TSSOP-44_4.4x11.2mm_P0.5mm","Package_SO/TSSOP-44_4.4x11mm_P0.5mm","Package_SO/TSSOP-44_6.1x11mm_P0.5mm","Package_SO/TSSOP-48_4.4x9.7mm_P0.4mm","Package_SO/TSSOP-48_6.1x12.5mm_P0.5mm","Package_SO/TSSOP-48_6.1x9.7mm_P0.4mm","Package_SO/TSSOP-48_8x12.5mm_P0.5mm","Package_SO/TSSOP-48_8x9.7mm_P0.4mm","Package_SO/TSSOP-4_4.4x5mm_P4mm","Package_SO/TSSOP-50_4.4x12.5mm_P0.5mm","Package_SO/TSSOP-52_6.1x11mm_P0.4mm","Package_SO/TSSOP-52_8x11mm_P0.4mm","Package_SO/TSSOP-56_4.4x11.3mm_P0.4mm","Package_SO/TSSOP-56_6.1x12.5mm_P0.4mm","Package_SO/TSSOP-56_6.1x14mm_P0.5mm","Package_SO/TSSOP-56_8x12.5mm_P0.4mm","Package_SO/TSSOP-56_8x14mm_P0.5mm","Package_SO/TSSOP-60_8x12.5mm_P0.4mm","Package_SO/TSSOP-64_6.1x14mm_P0.4mm","Package_SO/TSSOP-64_6.1x17mm_P0.5mm","Package_SO/TSSOP-64_8x14mm_P0.4mm","Package_SO/TSSOP-68_8x14mm_P0.4mm","Package_SO/TSSOP-80_6.1x17mm_P0.4mm","Package_SO/TSSOP-8_3x3mm_P0.65mm","Package_SO/TSSOP-8_4.4x3mm_P0.65mm","Package_SO/Texas_DAD0032A_HTSSOP-32_6.1x11mm_P0.65mm_TopEP3.71x3.81mm","Package_SO/Texas_DGN0008B_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x3mm_Mask1.88x1.98mm","Package_SO/Texas_DGN0008B_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x3mm_Mask1.88x1.98mm_ThermalVias","Package_SO/Texas_DGN0008D_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.57x1.89mm","Package_SO/Texas_DGN0008D_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.57x1.89mm_ThermalVias","Package_SO/Texas_DGN0008G_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.846x2.15mm","Package_SO/Texas_DGN0008G_VSSOP-8-1EP_3x3mm_P0.65mm_EP2x2.94mm_Mask1.846x2.15mm_ThermalVias","Package_SO/Texas_DGS0020A_TSSOP-20_3x5.1mm_P0.5mm","Package_SO/Texas_DKD0036A_HSSOP-36_11x15.9mm_P0.65mm_TopEP5.85x12.65mm","Package_SO/Texas_DYY0016A_TSOT-23-16_2x4.2mm_P0.5mm","Package_SO/Texas_HSOP-8-1EP_3.9x4.9mm_P1.27mm","Package_SO/Texas_HSOP-8-1EP_3.9x4.9mm_P1.27mm_ThermalVias","Package_SO/Texas_HTSOP-8-1EP_3.9x4.9mm_P1.27mm_EP2.95x4.9mm_Mask2.4x3.1mm_ThermalVias","Package_SO/Texas_HTSSOP-14-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3.155x3.255mm","Package_SO/Texas_HTSSOP-14-1EP_4.4x5mm_P0.65mm_EP3.4x5mm_Mask3.155x3.255mm_ThermalVias","Package_SO/Texas_PW0020A_TSSOP-20_4.4x6.5mm_P0.65mm","Package_SO/Texas_PWP0020A","Package_SO/Texas_PWP0028V_TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask2.94x5.62mm","Package_SO/Texas_PWP0028V_TSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP3.4x9.7mm_Mask2.94x5.62mm_ThermalVias","Package_SO/Texas_R-PDSO-G8_EP2.95x4.9mm_Mask2.4x3.1mm","Package_SO/Texas_R-PDSO-G8_EP2.95x4.9mm_Mask2.4x3.1mm_ThermalVias","Package_SO/Texas_S-PDSO-G8_3x3mm_P0.65mm","Package_SO/Toshiba_SOIC-4-6_4.4x3.6mm_P1.27mm","Package_SO/Toshiba_SOIC-5-6_4.4x3.6mm_P1.27mm","Package_SO/VSO-40_7.6x15.4mm_P0.762mm","Package_SO/VSO-56_11.1x21.5mm_P0.75mm","Package_SO/VSSOP-8_2.3x2mm_P0.5mm","Package_SO/VSSOP-8_3x3mm_P0.65mm","Package_SO/Vishay_PowerPAK_1212-8_Dual","Package_SO/Vishay_PowerPAK_1212-8_Single","Package_SO/Zetex_SM8","Package_SON/Diodes_PowerDI3333-8","Package_SON/Diodes_PowerDI3333-8_UXC_3.3x3.3mm_P0.65mm","Package_SON/EPSON_CE-USON-10_USON-10_3.2x2.5mm_P0.7mm","Package_SON/Fairchild_DualPower33-6_3x3mm","Package_SON/Fairchild_MicroPak-6_1.0x1.45mm_P0.5mm","Package_SON/Fairchild_MicroPak2-6_1.0x1.0mm_P0.35mm","Package_SON/HUSON-3-1EP_2x2mm_P1.3mm_EP1.1x1.6mm","Package_SON/HVSON-8-1EP_3x3mm_P0.65mm_EP1.6x2.4mm","Package_SON/HVSON-8-1EP_4x4mm_P0.8mm_EP2.2x3.1mm","Package_SON/Infineon_PG-LSON-8-1","Package_SON/Infineon_PG-TDSON-8_6.15x5.15mm","Package_SON/Infineon_PG-TISON-8-2","Package_SON/Infineon_PG-TISON-8-3","Package_SON/Infineon_PG-TISON-8-4","Package_SON/Infineon_PG-TISON-8-5","Package_SON/MPS_USON-6_1.2x1.6mm_P0.5mm","Package_SON/MPS_VSON-6_1x1.5mm_P0.5mm","Package_SON/MicroCrystal_C7_SON-8_1.5x3.2mm_P0.9mm","Package_SON/Microchip_USON-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm","Package_SON/Microchip_USON-10-1EP_3x3mm_P0.5mm_EP1.8x2.5mm_ThermalVias","Package_SON/NXP_XSON-16","Package_SON/Nexperia_HUSON-12_USON-12-1EP_1.35x2.5mm_P0.4mm_EP0.4x2mm","Package_SON/Nexperia_HUSON-16_USON-16-1EP_1.35x3.3mm_P0.4mm_EP0.4x2.8mm","Package_SON/Nexperia_HUSON-8_USON-8-1EP_1.35x1.7mm_P0.4mm_EP0.4x1.2mm","Package_SON/ROHM_VML0806","Package_SON/RTC_SMD_MicroCrystal_C3_2.5x3.7mm","Package_SON/SON-8-1EP_3x2mm_P0.5mm_EP1.4x1.6mm","Package_SON/ST_PowerFLAT-6L_5x6mm_P1.27mm","Package_SON/ST_PowerFLAT_HV-5_8x8mm","Package_SON/ST_PowerFLAT_HV-8_5x6mm","Package_SON/Texas_DPY0002A_0.6x1mm_P0.65mm","Package_SON/Texas_DQK","Package_SON/Texas_DQX002A","Package_SON/Texas_DRC0010J","Package_SON/Texas_DRC0010J_ThermalVias","Package_SON/Texas_DRX_WSON-10_2.5x2.5mm_P0.5mm","Package_SON/Texas_DSC0010J","Package_SON/Texas_DSC0010J_ThermalVias","Package_SON/Texas_DSG0008A_WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm","Package_SON/Texas_DSG0008A_WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm_ThermalVias","Package_SON/Texas_PWSON-N6","Package_SON/Texas_R-PUSON-N14","Package_SON/Texas_R-PUSON-N8_USON-8-1EP_1.6x2.1mm_P0.5mm_EP0.4x1.7mm","Package_SON/Texas_R-PWSON-N12_EP0.4x2mm","Package_SON/Texas_S-PDSO-N12","Package_SON/Texas_S-PVSON-N10","Package_SON/Texas_S-PVSON-N10_ThermalVias","Package_SON/Texas_S-PVSON-N8","Package_SON/Texas_S-PVSON-N8_ThermalVias","Package_SON/Texas_S-PWSON-N10","Package_SON/Texas_S-PWSON-N10_ThermalVias","Package_SON/Texas_S-PWSON-N8_EP1.2x2mm","Package_SON/Texas_S-PWSON-N8_EP1.2x2mm_ThermalVias","Package_SON/Texas_USON-6_1x1.45mm_P0.5mm_SMD","Package_SON/Texas_VSON-HR-8_1.5x2mm_P0.5mm","Package_SON/Texas_X2SON-4-1EP_1.1x1.4mm_P0.5mm_EP0.8x0.6mm","Package_SON/Texas_X2SON-4-1EP_1.1x1.4mm_P0.5mm_EP0.8x0.6mm_ThermalVias","Package_SON/Texas_X2SON-4_1x1mm_P0.65mm","Package_SON/Texas_X2SON-5_0.8x0.8mm_P0.48mm","Package_SON/Texas_X2SON-5_0.8x0.8mm_P0.48mm_RoutingVia","Package_SON/USON-10_2.5x1.0mm_P0.5mm","Package_SON/USON-20_2x4mm_P0.4mm","Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.2x2mm","Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.2x2mm_ThermalVias","Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.65x2.4mm","Package_SON/VSON-10-1EP_3x3mm_P0.5mm_EP1.65x2.4mm_ThermalVias","Package_SON/VSON-14-1EP_3x4.45mm_P0.65mm_EP1.6x4.2mm","Package_SON/VSON-14-1EP_3x4.45mm_P0.65mm_EP1.6x4.2mm_ThermalVias","Package_SON/VSON-8-1EP_3x3mm_P0.65mm_EP1.65x2.4mm","Package_SON/VSON-8-1EP_3x3mm_P0.65mm_EP1.65x2.4mm_ThermalVias","Package_SON/VSON-8-1EP_3x3mm_P0.65mm_EP1.6x2.4mm","Package_SON/VSON-8_1.5x2mm_P0.5mm","Package_SON/VSON-8_3.3x3.3mm_P0.65mm_NexFET","Package_SON/VSONP-8-1EP_5x6_P1.27mm","Package_SON/WSON-10-1EP_2.5x2.5mm_P0.5mm_EP1.2x2mm","Package_SON/WSON-10-1EP_2.5x2.5mm_P0.5mm_EP1.2x2mm_ThermalVias","Package_SON/WSON-10-1EP_2x3mm_P0.5mm_EP0.84x2.4mm","Package_SON/WSON-10-1EP_2x3mm_P0.5mm_EP0.84x2.4mm_ThermalVias","Package_SON/WSON-10-1EP_4x3mm_P0.5mm_EP2.2x2mm","Package_SON/WSON-10-1EP_4x4mm_P0.8mm_EP2.6x3mm","Package_SON/WSON-10-1EP_4x4mm_P0.8mm_EP2.6x3mm_ThermalVias","Package_SON/WSON-12-1EP_3x2mm_P0.5mm_EP1x2.65","Package_SON/WSON-12-1EP_3x2mm_P0.5mm_EP1x2.65_ThermalVias","Package_SON/WSON-12-1EP_3x3mm_P0.5mm_EP1.5x2.5mm","Package_SON/WSON-12-1EP_3x3mm_P0.5mm_EP1.5x2.5mm_ThermalVias","Package_SON/WSON-12-1EP_4x4mm_P0.5mm_EP2.6x3mm","Package_SON/WSON-12-1EP_4x4mm_P0.5mm_EP2.6x3mm_ThermalVias","Package_SON/WSON-14-1EP_4.0x4.0mm_P0.5mm_EP2.6x2.6mm","Package_SON/WSON-16_3.3x1.35_P0.4mm","Package_SON/WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mm","Package_SON/WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mm_ThermalVias","Package_SON/WSON-6-1EP_3x3mm_P0.95mm","Package_SON/WSON-6_1.5x1.5mm_P0.5mm","Package_SON/WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm","Package_SON/WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mm_ThermalVias","Package_SON/WSON-8-1EP_3x2.5mm_P0.5mm_EP1.2x1.5mm_PullBack","Package_SON/WSON-8-1EP_3x2.5mm_P0.5mm_EP1.2x1.5mm_PullBack_ThermalVias","Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.2x2mm","Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.2x2mm_ThermalVias","Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.45x2.4mm","Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.45x2.4mm_ThermalVias","Package_SON/WSON-8-1EP_3x3mm_P0.5mm_EP1.6x2.0mm","Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP1.98x3mm","Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP1.98x3mm_ThermalVias","Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.2x3mm","Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.2x3mm_ThermalVias","Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.6x3mm","Package_SON/WSON-8-1EP_4x4mm_P0.8mm_EP2.6x3mm_ThermalVias","Package_SON/WSON-8-1EP_6x5mm_P1.27mm_EP3.4x4.3mm","Package_SON/WSON-8-1EP_6x5mm_P1.27mm_EP3.4x4mm","Package_SON/WSON-8-1EP_8x6mm_P1.27mm_EP3.4x4.3mm","Package_SON/Winbond_USON-8-1EP_3x2mm_P0.5mm_EP0.2x1.6mm","Package_SON/Winbond_USON-8-2EP_3x4mm_P0.8mm_EP0.2x0.8mm","Package_SON/X2SON-8_1.4x1mm_P0.35mm","Package_SO_J-Lead/TSOC-6_3.76x3.94mm_P1.27mm","Package_TO_SOT_SMD/ATPAK-2","Package_TO_SOT_SMD/Analog_KS-4","Package_TO_SOT_SMD/Diodes_SOT-553","Package_TO_SOT_SMD/HVSOF5","Package_TO_SOT_SMD/HVSOF6","Package_TO_SOT_SMD/Infineon_PG-HDSOP-10-1","Package_TO_SOT_SMD/Infineon_PG-HSOF-8-1","Package_TO_SOT_SMD/Infineon_PG-HSOF-8-1_ThermalVias","Package_TO_SOT_SMD/Infineon_PG-HSOF-8-2","Package_TO_SOT_SMD/Infineon_PG-HSOF-8-2_ThermalVias","Package_TO_SOT_SMD/Infineon_PG-HSOF-8-2_ThermalVias2","Package_TO_SOT_SMD/Infineon_PG-HSOF-8-3","Package_TO_SOT_SMD/Infineon_PG-HSOF-8-3_ThermalVias","Package_TO_SOT_SMD/Infineon_PG-TO-220-7Lead_TabPin8","Package_TO_SOT_SMD/Infineon_PG-TSFP-3-1","Package_TO_SOT_SMD/LFPAK33","Package_TO_SOT_SMD/LFPAK56","Package_TO_SOT_SMD/LFPAK88","Package_TO_SOT_SMD/Nexperia_CFP15_SOT-1289","Package_TO_SOT_SMD/OnSemi_ECH8","Package_TO_SOT_SMD/PQFN_8x8","Package_TO_SOT_SMD/PowerMacro_M234_NoHole","Package_TO_SOT_SMD/PowerMacro_M234_WithHole","Package_TO_SOT_SMD/ROHM_SOT-457_ClockwisePinNumbering","Package_TO_SOT_SMD/Rohm_HRP7","Package_TO_SOT_SMD/SC-59","Package_TO_SOT_SMD/SC-59_Handsoldering","Package_TO_SOT_SMD/SC-70-8","Package_TO_SOT_SMD/SC-74-6_1.55x2.9mm_P0.95mm","Package_TO_SOT_SMD/SC-74A-5_1.55x2.9mm_P0.95mm","Package_TO_SOT_SMD/SC-82AA","Package_TO_SOT_SMD/SC-82AA_Handsoldering","Package_TO_SOT_SMD/SC-82AB","Package_TO_SOT_SMD/SC-82AB_Handsoldering","Package_TO_SOT_SMD/SOT-1123","Package_TO_SOT_SMD/SOT-1333-1","Package_TO_SOT_SMD/SOT-1334-1","Package_TO_SOT_SMD/SOT-143","Package_TO_SOT_SMD/SOT-143R","Package_TO_SOT_SMD/SOT-143R_Handsoldering","Package_TO_SOT_SMD/SOT-143_Handsoldering","Package_TO_SOT_SMD/SOT-223-3_TabPin2","Package_TO_SOT_SMD/SOT-223-5","Package_TO_SOT_SMD/SOT-223-6","Package_TO_SOT_SMD/SOT-223-6_TabPin3","Package_TO_SOT_SMD/SOT-223-8","Package_TO_SOT_SMD/SOT-223","Package_TO_SOT_SMD/SOT-23-3","Package_TO_SOT_SMD/SOT-23-5","Package_TO_SOT_SMD/SOT-23-5_HandSoldering","Package_TO_SOT_SMD/SOT-23-6","Package_TO_SOT_SMD/SOT-23-6_Handsoldering","Package_TO_SOT_SMD/SOT-23-8","Package_TO_SOT_SMD/SOT-23-8_Handsoldering","Package_TO_SOT_SMD/SOT-23","Package_TO_SOT_SMD/SOT-23W","Package_TO_SOT_SMD/SOT-23W_Handsoldering","Package_TO_SOT_SMD/SOT-23_Handsoldering","Package_TO_SOT_SMD/SOT-323_SC-70","Package_TO_SOT_SMD/SOT-343_SC-70-4","Package_TO_SOT_SMD/SOT-353_SC-70-5","Package_TO_SOT_SMD/SOT-363_SC-70-6","Package_TO_SOT_SMD/SOT-383F","Package_TO_SOT_SMD/SOT-383FL","Package_TO_SOT_SMD/SOT-416","Package_TO_SOT_SMD/SOT-457T","Package_TO_SOT_SMD/SOT-523","Package_TO_SOT_SMD/SOT-543","Package_TO_SOT_SMD/SOT-553","Package_TO_SOT_SMD/SOT-563","Package_TO_SOT_SMD/SOT-583-8","Package_TO_SOT_SMD/SOT-665","Package_TO_SOT_SMD/SOT-666","Package_TO_SOT_SMD/SOT-723","Package_TO_SOT_SMD/SOT-883","Package_TO_SOT_SMD/SOT-886","Package_TO_SOT_SMD/SOT-89-3","Package_TO_SOT_SMD/SOT-89-3_Handsoldering","Package_TO_SOT_SMD/SOT-89-5","Package_TO_SOT_SMD/SOT-89-5_Handsoldering","Package_TO_SOT_SMD/SOT-963","Package_TO_SOT_SMD/SuperSOT-3","Package_TO_SOT_SMD/SuperSOT-6","Package_TO_SOT_SMD/SuperSOT-8","Package_TO_SOT_SMD/TDSON-8-1","Package_TO_SOT_SMD/TO-252-2","Package_TO_SOT_SMD/TO-252-2_TabPin1","Package_TO_SOT_SMD/TO-252-3_TabPin2","Package_TO_SOT_SMD/TO-252-3_TabPin4","Package_TO_SOT_SMD/TO-252-4","Package_TO_SOT_SMD/TO-252-5_TabPin3","Package_TO_SOT_SMD/TO-252-5_TabPin6","Package_TO_SOT_SMD/TO-263-2","Package_TO_SOT_SMD/TO-263-2_TabPin1","Package_TO_SOT_SMD/TO-263-3_TabPin2","Package_TO_SOT_SMD/TO-263-3_TabPin4","Package_TO_SOT_SMD/TO-263-4","Package_TO_SOT_SMD/TO-263-5_TabPin3","Package_TO_SOT_SMD/TO-263-5_TabPin6","Package_TO_SOT_SMD/TO-263-6","Package_TO_SOT_SMD/TO-263-7_TabPin4","Package_TO_SOT_SMD/TO-263-7_TabPin8","Package_TO_SOT_SMD/TO-263-9_TabPin10","Package_TO_SOT_SMD/TO-263-9_TabPin5","Package_TO_SOT_SMD/TO-268-2","Package_TO_SOT_SMD/TO-269AA","Package_TO_SOT_SMD/TO-277A","Package_TO_SOT_SMD/TO-277B","Package_TO_SOT_SMD/TO-50-3_LongPad-NoHole_Housing","Package_TO_SOT_SMD/TO-50-3_LongPad-WithHole_Housing","Package_TO_SOT_SMD/TO-50-3_ShortPad-NoHole_Housing","Package_TO_SOT_SMD/TO-50-3_ShortPad-WithHole_Housing","Package_TO_SOT_SMD/TO-50-4_LongPad-NoHole_Housing","Package_TO_SOT_SMD/TO-50-4_LongPad-WithHole_Housing","Package_TO_SOT_SMD/TO-50-4_ShortPad-NoHole_Housing","Package_TO_SOT_SMD/TO-50-4_ShortPad-WithHole_Housing","Package_TO_SOT_SMD/TSOT-23-5","Package_TO_SOT_SMD/TSOT-23-5_HandSoldering","Package_TO_SOT_SMD/TSOT-23-6","Package_TO_SOT_SMD/TSOT-23-6_HandSoldering","Package_TO_SOT_SMD/TSOT-23-8","Package_TO_SOT_SMD/TSOT-23-8_HandSoldering","Package_TO_SOT_SMD/TSOT-23","Package_TO_SOT_SMD/TSOT-23_HandSoldering","Package_TO_SOT_SMD/Texas_DDF0008A_SOT-8_1.6x2.9mm_P0.65mm","Package_TO_SOT_SMD/Texas_DRT-3","Package_TO_SOT_SMD/Texas_NDQ","Package_TO_SOT_SMD/Texas_NDW-7_TabPin4","Package_TO_SOT_SMD/Texas_NDW-7_TabPin8","Package_TO_SOT_SMD/Texas_NDY0011A","Package_TO_SOT_SMD/Texas_R-PDSO-G5_DCK-5","Package_TO_SOT_SMD/Texas_R-PDSO-G6","Package_TO_SOT_SMD/Texas_R-PDSO-N5_DRL-5","Package_TO_SOT_SMD/Texas_R-PDSO-N6_DRL-6","Package_TO_SOT_SMD/VSOF5","Package_TO_SOT_SMD/Vishay_PowerPAK_SC70-6L_Dual","Package_TO_SOT_SMD/Vishay_PowerPAK_SC70-6L_Single","Package_TO_SOT_THT/Analog_TO-46-4_ThermalShield","Package_TO_SOT_THT/Fairchild_TO-220F-6L","Package_TO_SOT_THT/Heraeus_TO-92-2","Package_TO_SOT_THT/NEC_Molded_7x4x9mm","Package_TO_SOT_THT/PowerIntegrations_TO-220-7C","Package_TO_SOT_THT/SIPAK-1EP_Horizontal_TabDown","Package_TO_SOT_THT/SIPAK_Vertical","Package_TO_SOT_THT/SOD-70_P2.54mm","Package_TO_SOT_THT/SOD-70_P5.08mm","Package_TO_SOT_THT/SOT-227","Package_TO_SOT_THT/TO-100-10","Package_TO_SOT_THT/TO-100-10_Window","Package_TO_SOT_THT/TO-11-2","Package_TO_SOT_THT/TO-11-2_Window","Package_TO_SOT_THT/TO-11-3","Package_TO_SOT_THT/TO-11-3_Window","Package_TO_SOT_THT/TO-12-4","Package_TO_SOT_THT/TO-12-4_Window","Package_TO_SOT_THT/TO-126-2_Horizontal_TabDown","Package_TO_SOT_THT/TO-126-2_Horizontal_TabUp","Package_TO_SOT_THT/TO-126-2_Vertical","Package_TO_SOT_THT/TO-126-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-126-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-126-3_Vertical","Package_TO_SOT_THT/TO-17-4","Package_TO_SOT_THT/TO-17-4_Window","Package_TO_SOT_THT/TO-18-2","Package_TO_SOT_THT/TO-18-2_Lens","Package_TO_SOT_THT/TO-18-2_Window","Package_TO_SOT_THT/TO-18-3","Package_TO_SOT_THT/TO-18-3_Lens","Package_TO_SOT_THT/TO-18-3_Window","Package_TO_SOT_THT/TO-18-4","Package_TO_SOT_THT/TO-18-4_Lens","Package_TO_SOT_THT/TO-18-4_Window","Package_TO_SOT_THT/TO-218-2_Horizontal_TabDown","Package_TO_SOT_THT/TO-218-2_Horizontal_TabUp","Package_TO_SOT_THT/TO-218-2_Vertical","Package_TO_SOT_THT/TO-218-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-218-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-218-3_Vertical","Package_TO_SOT_THT/TO-220-11_P3.4x2.54mm_StaggerEven_Lead5.84mm_TabDown","Package_TO_SOT_THT/TO-220-11_P3.4x2.54mm_StaggerOdd_Lead5.84mm_TabDown","Package_TO_SOT_THT/TO-220-11_P3.4x5.08mm_StaggerEven_Lead4.58mm_Vertical","Package_TO_SOT_THT/TO-220-11_P3.4x5.08mm_StaggerOdd_Lead4.58mm_Vertical","Package_TO_SOT_THT/TO-220-11_P3.4x5.08mm_StaggerOdd_Lead8.45mm_TabDown","Package_TO_SOT_THT/TO-220-15_P2.54x2.54mm_StaggerEven_Lead5.84mm_TabDown","Package_TO_SOT_THT/TO-220-15_P2.54x2.54mm_StaggerOdd_Lead5.84mm_TabDown","Package_TO_SOT_THT/TO-220-15_P2.54x5.08mm_StaggerEven_Lead4.58mm_Vertical","Package_TO_SOT_THT/TO-220-15_P2.54x5.08mm_StaggerOdd_Lead4.58mm_Vertical","Package_TO_SOT_THT/TO-220-2_Horizontal_TabDown","Package_TO_SOT_THT/TO-220-2_Horizontal_TabUp","Package_TO_SOT_THT/TO-220-2_Vertical","Package_TO_SOT_THT/TO-220-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-220-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-220-3_Vertical","Package_TO_SOT_THT/TO-220-4_Horizontal_TabDown","Package_TO_SOT_THT/TO-220-4_Horizontal_TabUp","Package_TO_SOT_THT/TO-220-4_P5.08x3.7mm_StaggerEven_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-4_P5.08x3.7mm_StaggerOdd_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-4_P5.08x3.8mm_StaggerEven_Lead5.85mm_TabDown","Package_TO_SOT_THT/TO-220-4_P5.08x3.8mm_StaggerOdd_Lead5.85mm_TabDown","Package_TO_SOT_THT/TO-220-4_Vertical","Package_TO_SOT_THT/TO-220-5_Horizontal_TabDown","Package_TO_SOT_THT/TO-220-5_Horizontal_TabUp","Package_TO_SOT_THT/TO-220-5_P3.4x3.7mm_StaggerEven_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-5_P3.4x3.7mm_StaggerOdd_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-5_P3.4x3.8mm_StaggerEven_Lead7.13mm_TabDown","Package_TO_SOT_THT/TO-220-5_P3.4x3.8mm_StaggerOdd_Lead7.13mm_TabDown","Package_TO_SOT_THT/TO-220-5_Vertical","Package_TO_SOT_THT/TO-220-7_P2.54x3.7mm_StaggerEven_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-7_P2.54x3.7mm_StaggerOdd_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-7_P2.54x3.8mm_StaggerEven_Lead5.85mm_TabDown","Package_TO_SOT_THT/TO-220-7_P2.54x3.8mm_StaggerOdd_Lead5.85mm_TabDown","Package_TO_SOT_THT/TO-220-7_P2.54x5.08mm_StaggerOdd_Lead3.08mm_Vertical","Package_TO_SOT_THT/TO-220-7_P2.54x5.1mm_StaggerOdd_Lead8.025mm_TabDown","Package_TO_SOT_THT/TO-220-8_Vertical","Package_TO_SOT_THT/TO-220-9_P1.93x5.08mm_StaggerOdd_Lead3.378mm_Vertical","Package_TO_SOT_THT/TO-220-9_P1.94x3.7mm_StaggerEven_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-9_P1.94x3.7mm_StaggerOdd_Lead3.8mm_Vertical","Package_TO_SOT_THT/TO-220-9_P1.94x3.8mm_StaggerEven_Lead5.85mm_TabDown","Package_TO_SOT_THT/TO-220-9_P1.94x3.8mm_StaggerOdd_Lead5.85mm_TabDown","Package_TO_SOT_THT/TO-220F-11_P3.4x5.08mm_StaggerEven_Lead5.08mm_Vertical","Package_TO_SOT_THT/TO-220F-11_P3.4x5.08mm_StaggerOdd_Lead5.08mm_Vertical","Package_TO_SOT_THT/TO-220F-15_P2.54x5.08mm_StaggerEven_Lead5.08mm_Vertical","Package_TO_SOT_THT/TO-220F-15_P2.54x5.08mm_StaggerOdd_Lead5.08mm_Vertical","Package_TO_SOT_THT/TO-220F-2_Horizontal_TabDown","Package_TO_SOT_THT/TO-220F-2_Horizontal_TabUp","Package_TO_SOT_THT/TO-220F-2_Vertical","Package_TO_SOT_THT/TO-220F-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-220F-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-220F-3_Vertical","Package_TO_SOT_THT/TO-220F-4_Horizontal_TabDown","Package_TO_SOT_THT/TO-220F-4_Horizontal_TabUp","Package_TO_SOT_THT/TO-220F-4_P5.08x2.05mm_StaggerEven_Lead1.85mm_Vertical","Package_TO_SOT_THT/TO-220F-4_P5.08x2.05mm_StaggerOdd_Lead1.85mm_Vertical","Package_TO_SOT_THT/TO-220F-4_P5.08x3.7mm_StaggerEven_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-220F-4_P5.08x3.7mm_StaggerOdd_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-220F-4_Vertical","Package_TO_SOT_THT/TO-220F-5_Horizontal_TabDown","Package_TO_SOT_THT/TO-220F-5_Horizontal_TabUp","Package_TO_SOT_THT/TO-220F-5_P3.4x2.06mm_StaggerEven_Lead1.86mm_Vertical","Package_TO_SOT_THT/TO-220F-5_P3.4x2.06mm_StaggerOdd_Lead1.86mm_Vertical","Package_TO_SOT_THT/TO-220F-5_P3.4x3.7mm_StaggerEven_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-220F-5_P3.4x3.7mm_StaggerOdd_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-220F-5_Vertical","Package_TO_SOT_THT/TO-220F-7_P2.54x3.7mm_StaggerEven_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-220F-7_P2.54x3.7mm_StaggerOdd_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-220F-9_P1.8x3.7mm_StaggerEven_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-220F-9_P1.8x3.7mm_StaggerOdd_Lead3.5mm_Vertical","Package_TO_SOT_THT/TO-247-2_Horizontal_TabDown","Package_TO_SOT_THT/TO-247-2_Horizontal_TabUp","Package_TO_SOT_THT/TO-247-2_Vertical","Package_TO_SOT_THT/TO-247-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-247-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-247-3_Vertical","Package_TO_SOT_THT/TO-247-4_Horizontal_TabDown","Package_TO_SOT_THT/TO-247-4_Horizontal_TabUp","Package_TO_SOT_THT/TO-247-4_Vertical","Package_TO_SOT_THT/TO-247-5_Horizontal_TabDown","Package_TO_SOT_THT/TO-247-5_Horizontal_TabUp","Package_TO_SOT_THT/TO-247-5_Vertical","Package_TO_SOT_THT/TO-251-2-1EP_Horizontal_TabDown","Package_TO_SOT_THT/TO-251-2_Vertical","Package_TO_SOT_THT/TO-251-3-1EP_Horizontal_TabDown","Package_TO_SOT_THT/TO-251-3_Vertical","Package_TO_SOT_THT/TO-262-3-1EP_Horizontal_TabDown","Package_TO_SOT_THT/TO-262-3_Vertical","Package_TO_SOT_THT/TO-262-5-1EP_Horizontal_TabDown","Package_TO_SOT_THT/TO-262-5_Vertical","Package_TO_SOT_THT/TO-264-2_Horizontal_TabDown","Package_TO_SOT_THT/TO-264-2_Horizontal_TabUp","Package_TO_SOT_THT/TO-264-2_Vertical","Package_TO_SOT_THT/TO-264-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-264-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-264-3_Vertical","Package_TO_SOT_THT/TO-264-5_Horizontal_TabDown","Package_TO_SOT_THT/TO-264-5_Horizontal_TabUp","Package_TO_SOT_THT/TO-264-5_Vertical","Package_TO_SOT_THT/TO-3","Package_TO_SOT_THT/TO-33-4","Package_TO_SOT_THT/TO-33-4_Window","Package_TO_SOT_THT/TO-38-2","Package_TO_SOT_THT/TO-38-2_Window","Package_TO_SOT_THT/TO-38-3","Package_TO_SOT_THT/TO-38-3_Window","Package_TO_SOT_THT/TO-39-10","Package_TO_SOT_THT/TO-39-10_Window","Package_TO_SOT_THT/TO-39-2","Package_TO_SOT_THT/TO-39-2_Window","Package_TO_SOT_THT/TO-39-3","Package_TO_SOT_THT/TO-39-3_Window","Package_TO_SOT_THT/TO-39-4","Package_TO_SOT_THT/TO-39-4_Window","Package_TO_SOT_THT/TO-39-6","Package_TO_SOT_THT/TO-39-6_Window","Package_TO_SOT_THT/TO-39-8","Package_TO_SOT_THT/TO-39-8_Window","Package_TO_SOT_THT/TO-3P-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-3P-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-3P-3_Vertical","Package_TO_SOT_THT/TO-3PB-3_Horizontal_TabDown","Package_TO_SOT_THT/TO-3PB-3_Horizontal_TabUp","Package_TO_SOT_THT/TO-3PB-3_Vertical","Package_TO_SOT_THT/TO-46-2","Package_TO_SOT_THT/TO-46-2_Pin2Center","Package_TO_SOT_THT/TO-46-2_Pin2Center_Window","Package_TO_SOT_THT/TO-46-2_Window","Package_TO_SOT_THT/TO-46-3","Package_TO_SOT_THT/TO-46-3_Pin2Center","Package_TO_SOT_THT/TO-46-3_Pin2Center_Window","Package_TO_SOT_THT/TO-46-3_Window","Package_TO_SOT_THT/TO-46-4","Package_TO_SOT_THT/TO-46-4_Window","Package_TO_SOT_THT/TO-5-10","Package_TO_SOT_THT/TO-5-10_Window","Package_TO_SOT_THT/TO-5-2","Package_TO_SOT_THT/TO-5-2_Window","Package_TO_SOT_THT/TO-5-3","Package_TO_SOT_THT/TO-5-3_Window","Package_TO_SOT_THT/TO-5-4","Package_TO_SOT_THT/TO-5-4_Window","Package_TO_SOT_THT/TO-5-6","Package_TO_SOT_THT/TO-5-6_Window","Package_TO_SOT_THT/TO-5-8","Package_TO_SOT_THT/TO-5-8_PD5.08","Package_TO_SOT_THT/TO-5-8_PD5.08_Window","Package_TO_SOT_THT/TO-5-8_Window","Package_TO_SOT_THT/TO-52-2","Package_TO_SOT_THT/TO-52-2_Window","Package_TO_SOT_THT/TO-52-3","Package_TO_SOT_THT/TO-52-3_Window","Package_TO_SOT_THT/TO-72-4","Package_TO_SOT_THT/TO-72-4_Window","Package_TO_SOT_THT/TO-75-6","Package_TO_SOT_THT/TO-75-6_Window","Package_TO_SOT_THT/TO-78-10","Package_TO_SOT_THT/TO-78-10_Window","Package_TO_SOT_THT/TO-78-6","Package_TO_SOT_THT/TO-78-6_Window","Package_TO_SOT_THT/TO-78-8","Package_TO_SOT_THT/TO-78-8_Window","Package_TO_SOT_THT/TO-8-2","Package_TO_SOT_THT/TO-8-2_Window","Package_TO_SOT_THT/TO-8-3","Package_TO_SOT_THT/TO-8-3_Window","Package_TO_SOT_THT/TO-92-2","Package_TO_SOT_THT/TO-92-2_Horizontal1","Package_TO_SOT_THT/TO-92-2_Horizontal2","Package_TO_SOT_THT/TO-92-2_W4.0mm_Horizontal_FlatSideDown","Package_TO_SOT_THT/TO-92-2_W4.0mm_Horizontal_FlatSideUp","Package_TO_SOT_THT/TO-92-2_Wide","Package_TO_SOT_THT/TO-92","Package_TO_SOT_THT/TO-92Flat","Package_TO_SOT_THT/TO-92L","Package_TO_SOT_THT/TO-92L_HandSolder","Package_TO_SOT_THT/TO-92L_Inline","Package_TO_SOT_THT/TO-92L_Inline_Wide","Package_TO_SOT_THT/TO-92L_Wide","Package_TO_SOT_THT/TO-92Mini-2","Package_TO_SOT_THT/TO-92S","Package_TO_SOT_THT/TO-92_HandSolder","Package_TO_SOT_THT/TO-92_Horizontal1","Package_TO_SOT_THT/TO-92_Horizontal2","Package_TO_SOT_THT/TO-92_Inline","Package_TO_SOT_THT/TO-92_Inline_Horizontal1","Package_TO_SOT_THT/TO-92_Inline_Horizontal2","Package_TO_SOT_THT/TO-92_Inline_W4.0mm_Horizontal_FlatSideDown","Package_TO_SOT_THT/TO-92_Inline_W4.0mm_Horizontal_FlatSideUp","Package_TO_SOT_THT/TO-92_Inline_Wide","Package_TO_SOT_THT/TO-92_W4.0mm_StaggerEven_Horizontal_FlatSideDown","Package_TO_SOT_THT/TO-92_W4.0mm_StaggerEven_Horizontal_FlatSideUp","Package_TO_SOT_THT/TO-92_Wide","Package_TO_SOT_THT/TO-99-6","Package_TO_SOT_THT/TO-99-6_Window","Package_TO_SOT_THT/TO-99-8","Package_TO_SOT_THT/TO-99-8_Window","Panelization/BreakLine_11h_D0.5mm_P0.85mm","Panelization/BreakLine_1h_D0.5mm_P0.85mm","Panelization/BreakLine_2h_D0.5mm_P0.85mm","Panelization/BreakLine_2h_D0.5mm_P1.7mm","Panelization/BreakLine_3h_D0.5mm_P0.85mm","Panelization/BreakLine_3h_D0.5mm_P1.7mm","Panelization/BreakLine_5h_D0.5mm_P0.85mm","Panelization/BreakLine_7h_D0.5mm_P0.85mm","Panelization/BreakLine_9h_D0.5mm_P0.85mm","Panelization/MouseBite-Part_2.0x2.0mm_0h","Panelization/MouseBite-Part_2.0x2.0mm_inset_D0.5mm_P0.85mm_4h_Trace","Panelization/MouseBite-Part_2.0x2.0mm_inset_D0.5mm_P0.85mm_5h","Panelization/MouseBite-Part_2.0x2.0mm_outset_D0.5mm_P0.85mm_2h_Trace","Panelization/MouseBite-Part_2.0x2.0mm_outset_D0.5mm_P0.85mm_3h","Panelization/MouseBite-Part_2.0x4.5mm_0h","Panelization/MouseBite-Part_2.0x4.5mm_inset_D0.5mm_P0.85mm_5h_Trace","Panelization/MouseBite-Part_2.0x4.5mm_inset_D0.5mm_P0.85mm_7h","Panelization/MouseBite-Part_2.0x4.5mm_outset_D0.5mm_P0.85mm_5h_Trace","Panelization/MouseBite-Part_2.0x4.5mm_outset_D0.5mm_P0.85mm_7h","Panelization/MouseBite-Slot-Jumper_01005","Panelization/MouseBite-Slot-Jumper_0201","Panelization/MouseBite-Slot_2.0x2.0mm_inset_D0.5mm_P0.85mm_4h_Trace","Panelization/MouseBite-Slot_2.0x2.0mm_inset_D0.5mm_P0.85mm_5h","Panelization/MouseBite-Slot_2.0x2.0mm_outset_D0.5mm_P0.85mm_2h_Trace","Panelization/MouseBite-Slot_2.0x2.0mm_outset_D0.5mm_P0.85mm_3h","Panelization/MouseBite-Slot_2.0x4.5mm_inset_D0.5mm_P0.85mm_5h_Trace","Panelization/MouseBite-Slot_2.0x4.5mm_inset_D0.5mm_P0.85mm_7h","Panelization/MouseBite-Slot_2.0x4.5mm_outset_D0.5mm_P0.85mm_5h_Trace","Panelization/MouseBite-Slot_2.0x4.5mm_outset_D0.5mm_P0.85mm_7h","Panelization/MouseBite-Slot_2.54x2.54mm_on-edge_D0.5mm_P0.85mm_4h_Trace","Panelization/MouseBite-Slot_2.54x5.08mm_on-edge_D0.5mm_P0.85mm_5h_Trace","Potentiometer_SMD/Potentiometer_ACP_CA14-VSMD_Vertical","Potentiometer_SMD/Potentiometer_ACP_CA14-VSMD_Vertical_Hole","Potentiometer_SMD/Potentiometer_ACP_CA6-VSMD_Vertical","Potentiometer_SMD/Potentiometer_ACP_CA6-VSMD_Vertical_Hole","Potentiometer_SMD/Potentiometer_ACP_CA9-VSMD_Vertical","Potentiometer_SMD/Potentiometer_ACP_CA9-VSMD_Vertical_Hole","Potentiometer_SMD/Potentiometer_Bourns_3214G_Horizontal","Potentiometer_SMD/Potentiometer_Bourns_3214J_Horizontal","Potentiometer_SMD/Potentiometer_Bourns_3214W_Vertical","Potentiometer_SMD/Potentiometer_Bourns_3214X_Vertical","Potentiometer_SMD/Potentiometer_Bourns_3224G_Horizontal","Potentiometer_SMD/Potentiometer_Bourns_3224J_Horizontal","Potentiometer_SMD/Potentiometer_Bourns_3224W_Vertical","Potentiometer_SMD/Potentiometer_Bourns_3224X_Vertical","Potentiometer_SMD/Potentiometer_Bourns_3269P_Horizontal","Potentiometer_SMD/Potentiometer_Bourns_3269W_Vertical","Potentiometer_SMD/Potentiometer_Bourns_3269X_Horizontal","Potentiometer_SMD/Potentiometer_Bourns_3314G_Vertical","Potentiometer_SMD/Potentiometer_Bourns_3314J_Vertical","Potentiometer_SMD/Potentiometer_Bourns_3314R-1_Vertical_Hole","Potentiometer_SMD/Potentiometer_Bourns_3314R-GM5_Vertical_Hole","Potentiometer_SMD/Potentiometer_Bourns_3314S_Horizontal","Potentiometer_SMD/Potentiometer_Bourns_PRS11S_Vertical","Potentiometer_SMD/Potentiometer_Bourns_TC33X_Vertical","Potentiometer_SMD/Potentiometer_Vishay_TS53YJ_Vertical","Potentiometer_SMD/Potentiometer_Vishay_TS53YL_Vertical","Potentiometer_THT/Potentiometer_ACP_CA14-H2,5_Horizontal","Potentiometer_THT/Potentiometer_ACP_CA14-H4_Horizontal","Potentiometer_THT/Potentiometer_ACP_CA14-H5_Horizontal","Potentiometer_THT/Potentiometer_ACP_CA14V-15_Vertical","Potentiometer_THT/Potentiometer_ACP_CA14V-15_Vertical_Hole","Potentiometer_THT/Potentiometer_ACP_CA6-H2,5_Horizontal","Potentiometer_THT/Potentiometer_ACP_CA9-H2,5_Horizontal","Potentiometer_THT/Potentiometer_ACP_CA9-H3,8_Horizontal","Potentiometer_THT/Potentiometer_ACP_CA9-H5_Horizontal","Potentiometer_THT/Potentiometer_ACP_CA9-V10_Vertical","Potentiometer_THT/Potentiometer_ACP_CA9-V10_Vertical_Hole","Potentiometer_THT/Potentiometer_Alpha_RD901F-40-00D_Single_Vertical","Potentiometer_THT/Potentiometer_Alpha_RD901F-40-00D_Single_Vertical_CircularHoles","Potentiometer_THT/Potentiometer_Alpha_RD902F-40-00D_Dual_Vertical","Potentiometer_THT/Potentiometer_Alpha_RD902F-40-00D_Dual_Vertical_CircularHoles","Potentiometer_THT/Potentiometer_Alps_RK097_Dual_Horizontal","Potentiometer_THT/Potentiometer_Alps_RK097_Dual_Horizontal_Switch","Potentiometer_THT/Potentiometer_Alps_RK097_Single_Horizontal","Potentiometer_THT/Potentiometer_Alps_RK097_Single_Horizontal_Switch","Potentiometer_THT/Potentiometer_Alps_RK09K_Single_Horizontal","Potentiometer_THT/Potentiometer_Alps_RK09K_Single_Vertical","Potentiometer_THT/Potentiometer_Alps_RK09L_Double_Horizontal","Potentiometer_THT/Potentiometer_Alps_RK09L_Double_Vertical","Potentiometer_THT/Potentiometer_Alps_RK09L_Single_Horizontal","Potentiometer_THT/Potentiometer_Alps_RK09L_Single_Vertical","Potentiometer_THT/Potentiometer_Alps_RK09Y11_Single_Horizontal","Potentiometer_THT/Potentiometer_Alps_RK163_Dual_Horizontal","Potentiometer_THT/Potentiometer_Alps_RK163_Single_Horizontal","Potentiometer_THT/Potentiometer_Bourns_20P_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3005_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3006P_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3006W_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3006Y_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3009P_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3009Y_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3266P_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3266W_Vertical","Potentiometer_THT/Potentiometer_Bourns_3266X_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3266Y_Vertical","Potentiometer_THT/Potentiometer_Bourns_3266Z_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3296P_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3296W_Vertical","Potentiometer_THT/Potentiometer_Bourns_3296X_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3296Y_Vertical","Potentiometer_THT/Potentiometer_Bourns_3296Z_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3299P_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3299W_Vertical","Potentiometer_THT/Potentiometer_Bourns_3299X_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3299Y_Vertical","Potentiometer_THT/Potentiometer_Bourns_3299Z_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3339H_Vertical","Potentiometer_THT/Potentiometer_Bourns_3339P_Vertical","Potentiometer_THT/Potentiometer_Bourns_3339P_Vertical_HandSoldering","Potentiometer_THT/Potentiometer_Bourns_3339S_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3339W_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3386C_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3386F_Vertical","Potentiometer_THT/Potentiometer_Bourns_3386H_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3386P_Vertical","Potentiometer_THT/Potentiometer_Bourns_3386W_Horizontal","Potentiometer_THT/Potentiometer_Bourns_3386X_Horizontal","Potentiometer_THT/Potentiometer_Bourns_PTA1543_Single_Slide","Potentiometer_THT/Potentiometer_Bourns_PTA2043_Single_Slide","Potentiometer_THT/Potentiometer_Bourns_PTA3043_Single_Slide","Potentiometer_THT/Potentiometer_Bourns_PTA4543_Single_Slide","Potentiometer_THT/Potentiometer_Bourns_PTA6043_Single_Slide","Potentiometer_THT/Potentiometer_Bourns_PTV09A-1_Single_Vertical","Potentiometer_THT/Potentiometer_Bourns_PTV09A-2_Single_Horizontal","Potentiometer_THT/Potentiometer_Bourns_PTV112-4_Dual_Vertical","Potentiometer_THT/Potentiometer_Omeg_PC16BU_Horizontal","Potentiometer_THT/Potentiometer_Omeg_PC16BU_Vertical","Potentiometer_THT/Potentiometer_Piher_PC-16_Dual_Horizontal","Potentiometer_THT/Potentiometer_Piher_PC-16_Single_Horizontal","Potentiometer_THT/Potentiometer_Piher_PC-16_Single_Vertical","Potentiometer_THT/Potentiometer_Piher_PC-16_Triple_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-10-H01_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-10-H05_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-10-V05_Vertical","Potentiometer_THT/Potentiometer_Piher_PT-10-V10_Vertical","Potentiometer_THT/Potentiometer_Piher_PT-10-V10_Vertical_Hole","Potentiometer_THT/Potentiometer_Piher_PT-15-H01_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-15-H05_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-15-H06_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-15-H25_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-15-V02_Vertical","Potentiometer_THT/Potentiometer_Piher_PT-15-V02_Vertical_Hole","Potentiometer_THT/Potentiometer_Piher_PT-15-V15_Vertical","Potentiometer_THT/Potentiometer_Piher_PT-15-V15_Vertical_Hole","Potentiometer_THT/Potentiometer_Piher_PT-6-H_Horizontal","Potentiometer_THT/Potentiometer_Piher_PT-6-V_Vertical","Potentiometer_THT/Potentiometer_Piher_PT-6-V_Vertical_Hole","Potentiometer_THT/Potentiometer_Piher_T-16H_Double_Horizontal","Potentiometer_THT/Potentiometer_Piher_T-16H_Single_Horizontal","Potentiometer_THT/Potentiometer_Piher_T-16L_Single_Vertical_Hole","Potentiometer_THT/Potentiometer_Runtron_RM-063_Horizontal","Potentiometer_THT/Potentiometer_Runtron_RM-065_Vertical","Potentiometer_THT/Potentiometer_TT_P0915N","Potentiometer_THT/Potentiometer_Vishay_148-149_Dual_Horizontal","Potentiometer_THT/Potentiometer_Vishay_148-149_Single_Horizontal","Potentiometer_THT/Potentiometer_Vishay_148-149_Single_Vertical","Potentiometer_THT/Potentiometer_Vishay_148E-149E_Dual_Horizontal","Potentiometer_THT/Potentiometer_Vishay_148E-149E_Single_Horizontal","Potentiometer_THT/Potentiometer_Vishay_248BH-249BH_Single_Horizontal","Potentiometer_THT/Potentiometer_Vishay_248GJ-249GJ_Single_Horizontal","Potentiometer_THT/Potentiometer_Vishay_248GJ-249GJ_Single_Vertical","Potentiometer_THT/Potentiometer_Vishay_43_Horizontal","Potentiometer_THT/Potentiometer_Vishay_T7-YA_Single_Vertical","Potentiometer_THT/Potentiometer_Vishay_T73XW_Horizontal","Potentiometer_THT/Potentiometer_Vishay_T73XX_Horizontal","Potentiometer_THT/Potentiometer_Vishay_T73YP_Vertical","Potentiometer_THT/Potentiometer_Vishay_T93XA_Horizontal","Potentiometer_THT/Potentiometer_Vishay_T93YA_Vertical","RF/Skyworks_SKY13575_639LF","RF/Skyworks_SKY65404-31","RF_Antenna/AVX_M620720","RF_Antenna/Abracon_APAES868R8060C16-T","RF_Antenna/Abracon_PRO-OB-440","RF_Antenna/Abracon_PRO-OB-471","RF_Antenna/Antenova_SR4G013_GPS","RF_Antenna/Astrocast_AST50127-00","RF_Antenna/Coilcraft_MA5532-AE_RFID","RF_Antenna/Johanson_2450AT18x100","RF_Antenna/Johanson_2450AT18x100_2400-2500Mhz","RF_Antenna/Johanson_2450AT43F0100","RF_Antenna/Johanson_2450AT43F0100_2400-2500Mhz","RF_Antenna/Molex_47948-0001_2.4Ghz","RF_Antenna/NiceRF_SW868-TH13_868Mhz","RF_Antenna/Pulse_W3000","RF_Antenna/Pulse_W3011","RF_Antenna/Texas_SWRA117D_2.4GHz_Left","RF_Antenna/Texas_SWRA117D_2.4GHz_Right","RF_Antenna/Texas_SWRA416_868MHz_915MHz","RF_Converter/Anaren_0805_2012Metric-6","RF_Converter/Balun_Johanson_0896BM15A0001","RF_Converter/Balun_Johanson_0900FM15K0039","RF_Converter/Balun_Johanson_0900PC15J0013","RF_Converter/Balun_Johanson_1.6x0.8mm","RF_Converter/Balun_Johanson_5400BL15B050E","RF_Converter/RF_Attenuator_Susumu_PAT1220","RF_GPS/Linx_RXM-GPS","RF_GPS/OriginGPS_ORG1510","RF_GPS/Quectel_L70-R","RF_GPS/Quectel_L76","RF_GPS/Quectel_L80-R","RF_GPS/Quectel_L96","RF_GPS/SIM28ML","RF_GPS/Sierra_XA11X0","RF_GPS/Sierra_XM11X0","RF_GPS/ublox_LEA","RF_GPS/ublox_MAX","RF_GPS/ublox_NEO","RF_GPS/ublox_SAM-M8Q","RF_GPS/ublox_SAM-M8Q_HandSolder","RF_GPS/ublox_ZED","RF_GPS/ublox_ZOE_M8","RF_GSM/Quectel_BC66","RF_GSM/Quectel_BC95","RF_GSM/Quectel_BG95","RF_GSM/Quectel_BG96","RF_GSM/Quectel_M95","RF_GSM/SIMCom_SIM800C","RF_GSM/SIMCom_SIM900","RF_GSM/Telit_SE150A4","RF_GSM/Telit_xL865","RF_GSM/ublox_LENA-R8_LGA-100","RF_GSM/ublox_SARA_LGA-96","RF_Mini-Circuits/Mini-Circuits_BK377","RF_Mini-Circuits/Mini-Circuits_BK377_LandPatternPL-005","RF_Mini-Circuits/Mini-Circuits_CD541_H2.08mm","RF_Mini-Circuits/Mini-Circuits_CD542_H2.84mm","RF_Mini-Circuits/Mini-Circuits_CD542_LandPatternPL-052","RF_Mini-Circuits/Mini-Circuits_CD542_LandPatternPL-094","RF_Mini-Circuits/Mini-Circuits_CD636_H4.11mm","RF_Mini-Circuits/Mini-Circuits_CD636_LandPatternPL-035","RF_Mini-Circuits/Mini-Circuits_CD637_H5.23mm","RF_Mini-Circuits/Mini-Circuits_CK605","RF_Mini-Circuits/Mini-Circuits_CK605_LandPatternPL-012","RF_Mini-Circuits/Mini-Circuits_DB1627","RF_Mini-Circuits/Mini-Circuits_GP1212","RF_Mini-Circuits/Mini-Circuits_GP1212_LandPatternPL-176","RF_Mini-Circuits/Mini-Circuits_GP731","RF_Mini-Circuits/Mini-Circuits_GP731_LandPatternPL-176","RF_Mini-Circuits/Mini-Circuits_HF1139","RF_Mini-Circuits/Mini-Circuits_HF1139_LandPatternPL-230","RF_Mini-Circuits/Mini-Circuits_HQ1157","RF_Mini-Circuits/Mini-Circuits_HZ1198","RF_Mini-Circuits/Mini-Circuits_HZ1198_LandPatternPL-247","RF_Mini-Circuits/Mini-Circuits_MMM168","RF_Mini-Circuits/Mini-Circuits_MMM168_LandPatternPL-225","RF_Mini-Circuits/Mini-Circuits_QQQ130_ClockwisePinNumbering","RF_Mini-Circuits/Mini-Circuits_QQQ130_LandPattern_PL-236_ClockwisePinNumbering","RF_Mini-Circuits/Mini-Circuits_TT1224_ClockwisePinNumbering","RF_Mini-Circuits/Mini-Circuits_TT1224_LandPatternPL-258_ClockwisePinNumbering","RF_Mini-Circuits/Mini-Circuits_TTT167","RF_Mini-Circuits/Mini-Circuits_TTT167_LandPatternPL-079","RF_Mini-Circuits/Mini-Circuits_YY161","RF_Mini-Circuits/Mini-Circuits_YY161_LandPatternPL-049","RF_Module/Ai-Thinker-Ra-01-LoRa","RF_Module/Astrocast_AST50147-00","RF_Module/Atmel_ATSAMR21G18-MR210UA_NoRFPads","RF_Module/BLE112-A","RF_Module/BM78SPPS5xC2","RF_Module/CMWX1ZZABZ","RF_Module/CYBLE-21Pin-10x10mm","RF_Module/DWM1000","RF_Module/DecaWave_DWM1001","RF_Module/Digi_XBee_SMT","RF_Module/E18-MS1-PCB","RF_Module/E73-2G4M04S","RF_Module/ESP-01","RF_Module/ESP-07","RF_Module/ESP-12E","RF_Module/ESP-WROOM-02","RF_Module/ESP32-C3-DevKitM-1","RF_Module/ESP32-C3-WROOM-02","RF_Module/ESP32-C3-WROOM-02U","RF_Module/ESP32-C6-MINI-1","RF_Module/ESP32-S2-MINI-1","RF_Module/ESP32-S2-MINI-1U","RF_Module/ESP32-S2-WROVER","RF_Module/ESP32-S3-WROOM-1","RF_Module/ESP32-S3-WROOM-1U","RF_Module/ESP32-S3-WROOM-2","RF_Module/ESP32-WROOM-32","RF_Module/ESP32-WROOM-32D","RF_Module/ESP32-WROOM-32E","RF_Module/ESP32-WROOM-32U","RF_Module/ESP32-WROOM-32UE","RF_Module/Garmin_M8-35_9.8x14.0mm_Layout6x6_P1.5mm","RF_Module/HOPERF_RFM69HW","RF_Module/HOPERF_RFM9XW_SMD","RF_Module/HOPERF_RFM9XW_THT","RF_Module/Heltec_HT-CT62","RF_Module/IQRF_TRx2DA_KON-SIM-01","RF_Module/IQRF_TRx2D_KON-SIM-01","RF_Module/Jadak_Thingmagic_M6e-Nano","RF_Module/Laird_BL652","RF_Module/Laird_BL653","RF_Module/MCU_Seeed_ESP32C3","RF_Module/MOD-nRF8001","RF_Module/Microchip_BM83","RF_Module/Microchip_RN4871","RF_Module/Modtronix_inAir9","RF_Module/MonoWireless_TWE-L-WX","RF_Module/NINA-B111","RF_Module/Particle_P1","RF_Module/RAK3172","RF_Module/RAK4200","RF_Module/RAK811","RF_Module/RFDigital_RFD77101","RF_Module/RMC20452T","RF_Module/RN2483","RF_Module/RN42","RF_Module/RN42N","RF_Module/Raytac_MDBT42Q","RF_Module/Raytac_MDBT50Q","RF_Module/ST-SiP-LGA-86-11x7.3mm","RF_Module/ST_SPBTLE","RF_Module/TD1205","RF_Module/TD1208","RF_Module/Taiyo-Yuden_EYSGJNZWY","RF_Module/WEMOS_C3_mini","RF_Module/WEMOS_D1_mini_light","RF_Module/ZETA-433-SO_SMD","RF_Module/ZETA-433-SO_THT","RF_Module/nRF24L01_Breakout","RF_Shielding/Laird_Technologies_97-2002_25.40x25.40mm","RF_Shielding/Laird_Technologies_97-2003_12.70x13.37mm","RF_Shielding/Laird_Technologies_BMI-S-101_13.66x12.70mm","RF_Shielding/Laird_Technologies_BMI-S-102_16.50x16.50mm","RF_Shielding/Laird_Technologies_BMI-S-103_26.21x26.21mm","RF_Shielding/Laird_Technologies_BMI-S-104_32.00x32.00mm","RF_Shielding/Laird_Technologies_BMI-S-105_38.10x25.40mm","RF_Shielding/Laird_Technologies_BMI-S-106_36.83x33.68mm","RF_Shielding/Laird_Technologies_BMI-S-107_44.37x44.37mm","RF_Shielding/Laird_Technologies_BMI-S-201-F_13.66x12.70mm","RF_Shielding/Laird_Technologies_BMI-S-202-F_16.50x16.50mm","RF_Shielding/Laird_Technologies_BMI-S-203-F_26.21x26.21mm","RF_Shielding/Laird_Technologies_BMI-S-204-F_32.00x32.00mm","RF_Shielding/Laird_Technologies_BMI-S-205-F_38.10x25.40mm","RF_Shielding/Laird_Technologies_BMI-S-206-F_36.83x33.68mm","RF_Shielding/Laird_Technologies_BMI-S-207-F_44.37x44.37mm","RF_Shielding/Laird_Technologies_BMI-S-208-F_39.60x39.60mm","RF_Shielding/Laird_Technologies_BMI-S-209-F_29.36x18.50mm","RF_Shielding/Laird_Technologies_BMI-S-210-F_44.00x30.50mm","RF_Shielding/Laird_Technologies_BMI-S-230-F_50.8x38.1mm","RF_Shielding/Wuerth_36103205_20x20mm","RF_Shielding/Wuerth_36103255_25x25mm","RF_Shielding/Wuerth_36103305_30x30mm","RF_Shielding/Wuerth_36103505_50x50mm","RF_Shielding/Wuerth_36103605_60x60mm","RF_Shielding/Wuerth_36503205_20x20mm","RF_Shielding/Wuerth_36503255_25x25mm","RF_Shielding/Wuerth_36503305_30x30mm","RF_Shielding/Wuerth_36503505_50x50mm","RF_Shielding/Wuerth_36503605_60x60mm","RF_WiFi/USR-C322","Relay_SMD/Relay_2P2T_10x6mm_TE_IMxxG","Relay_SMD/Relay_DPDT_AXICOM_IMSeries_JLeg","Relay_SMD/Relay_DPDT_FRT5_SMD","Relay_SMD/Relay_DPDT_Kemet_EE2_NU","Relay_SMD/Relay_DPDT_Kemet_EE2_NUH","Relay_SMD/Relay_DPDT_Kemet_EE2_NUH_DoubleCoil","Relay_SMD/Relay_DPDT_Kemet_EE2_NUX_DoubleCoil","Relay_SMD/Relay_DPDT_Kemet_EE2_NUX_NKX","Relay_SMD/Relay_DPDT_Kemet_EE2_NU_DoubleCoil","Relay_SMD/Relay_DPDT_Omron_G6H-2F","Relay_SMD/Relay_DPDT_Omron_G6K-2F-Y","Relay_SMD/Relay_DPDT_Omron_G6K-2F","Relay_SMD/Relay_DPDT_Omron_G6K-2G-Y","Relay_SMD/Relay_DPDT_Omron_G6K-2G","Relay_SMD/Relay_DPDT_Omron_G6S-2F","Relay_SMD/Relay_DPDT_Omron_G6S-2G","Relay_SMD/Relay_DPDT_Omron_G6SK-2F","Relay_SMD/Relay_DPDT_Omron_G6SK-2G","Relay_SMD/Relay_Fujitsu_FTR-B3S","Relay_SMD/Relay_SPDT_AXICOM_HF3Series_50ohms_Pitch1.27mm","Relay_SMD/Relay_SPDT_AXICOM_HF3Series_75ohms_Pitch1.27mm","Relay_THT/Relay_1-Form-A_Schrack-RYII_RM5mm","Relay_THT/Relay_1-Form-B_Schrack-RYII_RM5mm","Relay_THT/Relay_1-Form-C_Schrack-RYII_RM3.2mm","Relay_THT/Relay_3PST_COTO_3650","Relay_THT/Relay_3PST_COTO_3660","Relay_THT/Relay_DPDT_AXICOM_IMSeries_Pitch3.2mm","Relay_THT/Relay_DPDT_AXICOM_IMSeries_Pitch5.08mm","Relay_THT/Relay_DPDT_FRT5","Relay_THT/Relay_DPDT_Finder_30.22","Relay_THT/Relay_DPDT_Finder_40.52","Relay_THT/Relay_DPDT_Finder_40.62","Relay_THT/Relay_DPDT_Fujitsu_FTR-F1C","Relay_THT/Relay_DPDT_Hongfa_HF115F-2Z-x4","Relay_THT/Relay_DPDT_Kemet_EC2_NJ","Relay_THT/Relay_DPDT_Kemet_EC2_NJ_DoubleCoil","Relay_THT/Relay_DPDT_Kemet_EC2_NU","Relay_THT/Relay_DPDT_Kemet_EC2_NU_DoubleCoil","Relay_THT/Relay_DPDT_Omron_G2RL-2","Relay_THT/Relay_DPDT_Omron_G5V-2","Relay_THT/Relay_DPDT_Omron_G6A","Relay_THT/Relay_DPDT_Omron_G6AK","Relay_THT/Relay_DPDT_Omron_G6H-2","Relay_THT/Relay_DPDT_Omron_G6K-2P-Y","Relay_THT/Relay_DPDT_Omron_G6K-2P","Relay_THT/Relay_DPDT_Omron_G6S-2","Relay_THT/Relay_DPDT_Omron_G6SK-2","Relay_THT/Relay_DPDT_Panasonic_JW2","Relay_THT/Relay_DPDT_Schrack-RT2-FormC-Dual-Coil_RM5mm","Relay_THT/Relay_DPDT_Schrack-RT2-FormC_RM5mm","Relay_THT/Relay_DPST_COTO_3602","Relay_THT/Relay_DPST_Fujitsu_FTR-F1A","Relay_THT/Relay_DPST_Omron_G2RL-2A","Relay_THT/Relay_DPST_Schrack-RT2-FormA_RM5mm","Relay_THT/Relay_NCR_HHG1D-1","Relay_THT/Relay_SPDT_CUI_SR5","Relay_THT/Relay_SPDT_Finder_32.21-x000","Relay_THT/Relay_SPDT_Finder_34.51_Horizontal","Relay_THT/Relay_SPDT_Finder_34.51_Vertical","Relay_THT/Relay_SPDT_Finder_36.11","Relay_THT/Relay_SPDT_Finder_40.11","Relay_THT/Relay_SPDT_Finder_40.31","Relay_THT/Relay_SPDT_Finder_40.41","Relay_THT/Relay_SPDT_Finder_40.51","Relay_THT/Relay_SPDT_Finder_40.61","Relay_THT/Relay_SPDT_Fujitsu_FTR-LYCA005x_FormC_Vertical","Relay_THT/Relay_SPDT_HJR-4102","Relay_THT/Relay_SPDT_Hongfa_HF3F-L-xx-1ZL1T","Relay_THT/Relay_SPDT_Hongfa_HF3F-L-xx-1ZL2T-R","Relay_THT/Relay_SPDT_Hongfa_HF3F-L-xx-1ZL2T","Relay_THT/Relay_SPDT_Hongfa_JQC-3FF_0XX-1Z","Relay_THT/Relay_SPDT_HsinDa_Y14","Relay_THT/Relay_SPDT_Omron-G5LE-1","Relay_THT/Relay_SPDT_Omron-G5Q-1","Relay_THT/Relay_SPDT_Omron_G2RL-1-E","Relay_THT/Relay_SPDT_Omron_G2RL-1","Relay_THT/Relay_SPDT_Omron_G5V-1","Relay_THT/Relay_SPDT_Omron_G6E","Relay_THT/Relay_SPDT_Omron_G6EK","Relay_THT/Relay_SPDT_Panasonic_DR-L","Relay_THT/Relay_SPDT_Panasonic_DR-L2","Relay_THT/Relay_SPDT_Panasonic_DR","Relay_THT/Relay_SPDT_Panasonic_JW1_FormC","Relay_THT/Relay_SPDT_PotterBrumfield_T9AP5D52_12V30A","Relay_THT/Relay_SPDT_RAYEX-L90","Relay_THT/Relay_SPDT_RAYEX-L90S","Relay_THT/Relay_SPDT_SANYOU_SRD_Series_Form_C","Relay_THT/Relay_SPDT_Schrack-RP-II-1-16A-FormC_RM5mm","Relay_THT/Relay_SPDT_Schrack-RP-II-1-FormC_RM3.5mm","Relay_THT/Relay_SPDT_Schrack-RP-II-1-FormC_RM5mm","Relay_THT/Relay_SPDT_Schrack-RT1-16A-FormC_RM5mm","Relay_THT/Relay_SPDT_Schrack-RT1-FormC_RM3.5mm","Relay_THT/Relay_SPDT_Schrack-RT1-FormC_RM5mm","Relay_THT/Relay_SPDT_StandexMeder_SIL_Form1C","Relay_THT/Relay_SPST-NO_Fujitsu_FTR-LYAA005x_FormA_Vertical","Relay_THT/Relay_SPST_Finder_32.21-x300","Relay_THT/Relay_SPST_Hongfa_HF3F-L-xx-1HL1T","Relay_THT/Relay_SPST_Hongfa_HF3F-L-xx-1HL2T-R","Relay_THT/Relay_SPST_Hongfa_HF3F-L-xx-1HL2T","Relay_THT/Relay_SPST_Hongfa_JQC-3FF_0XX-1H","Relay_THT/Relay_SPST_Omron-G5Q-1A","Relay_THT/Relay_SPST_Omron_G2RL-1A-E","Relay_THT/Relay_SPST_Omron_G2RL-1A","Relay_THT/Relay_SPST_Omron_G5NB","Relay_THT/Relay_SPST_Omron_G5PZ","Relay_THT/Relay_SPST_Panasonic_ADW11","Relay_THT/Relay_SPST_Panasonic_ALFG_FormA","Relay_THT/Relay_SPST_Panasonic_ALFG_FormA_CircularHoles","Relay_THT/Relay_SPST_Panasonic_JW1_FormA","Relay_THT/Relay_SPST_PotterBrumfield_T9AP1D52_12V30A","Relay_THT/Relay_SPST_RAYEX-L90A","Relay_THT/Relay_SPST_RAYEX-L90AS","Relay_THT/Relay_SPST_RAYEX-L90B","Relay_THT/Relay_SPST_RAYEX-L90BS","Relay_THT/Relay_SPST_SANYOU_SRD_Series_Form_A","Relay_THT/Relay_SPST_SANYOU_SRD_Series_Form_B","Relay_THT/Relay_SPST_Schrack-RP-II-1-16A-FormA_RM5mm","Relay_THT/Relay_SPST_Schrack-RP-II-1-FormA_RM3.5mm","Relay_THT/Relay_SPST_Schrack-RP-II-1-FormA_RM5mm","Relay_THT/Relay_SPST_Schrack-RP3SL-1coil_RM5mm","Relay_THT/Relay_SPST_Schrack-RP3SL_RM5mm","Relay_THT/Relay_SPST_Schrack-RT1-16A-FormA_RM5mm","Relay_THT/Relay_SPST_Schrack-RT1-FormA_RM3.5mm","Relay_THT/Relay_SPST_Schrack-RT1-FormA_RM5mm","Relay_THT/Relay_SPST_StandexMeder_MS_Form1AB","Relay_THT/Relay_SPST_StandexMeder_SIL_Form1A","Relay_THT/Relay_SPST_StandexMeder_SIL_Form1B","Relay_THT/Relay_SPST_TE_PCH-1xxx2M","Relay_THT/Relay_SPST_TE_PCN-1xxD3MHZ","Relay_THT/Relay_SPST_Zettler-AZSR131","Relay_THT/Relay_Socket_3PDT_Omron_PLE11-0","Relay_THT/Relay_Socket_4PDT_Omron_PY14-02","Relay_THT/Relay_Socket_DPDT_Finder_96.12","Relay_THT/Relay_Socket_DPDT_Omron_PLE08-0","Relay_THT/Relay_StandexMeder_DIP_HighProfile","Relay_THT/Relay_StandexMeder_DIP_LowProfile","Relay_THT/Relay_StandexMeder_UMS","Relay_THT/Relay_Tyco_V23072_Sealed","Resistor_SMD/R_01005_0402Metric","Resistor_SMD/R_01005_0402Metric_Pad0.57x0.30mm_HandSolder","Resistor_SMD/R_0201_0603Metric","Resistor_SMD/R_0201_0603Metric_Pad0.64x0.40mm_HandSolder","Resistor_SMD/R_0402_1005Metric","Resistor_SMD/R_0402_1005Metric_Pad0.72x0.64mm_HandSolder","Resistor_SMD/R_0508_1220Metric","Resistor_SMD/R_0508_1220Metric_Pad1.12x2.15mm_HandSolder","Resistor_SMD/R_0603_1608Metric","Resistor_SMD/R_0603_1608Metric_Pad0.98x0.95mm_HandSolder","Resistor_SMD/R_0612_1632Metric","Resistor_SMD/R_0612_1632Metric_Pad1.18x3.40mm_HandSolder","Resistor_SMD/R_0805_2012Metric","Resistor_SMD/R_0805_2012Metric_Pad1.20x1.40mm_HandSolder","Resistor_SMD/R_0815_2038Metric","Resistor_SMD/R_0815_2038Metric_Pad1.20x4.05mm_HandSolder","Resistor_SMD/R_1020_2550Metric","Resistor_SMD/R_1020_2550Metric_Pad1.33x5.20mm_HandSolder","Resistor_SMD/R_1206_3216Metric","Resistor_SMD/R_1206_3216Metric_Pad1.30x1.75mm_HandSolder","Resistor_SMD/R_1210_3225Metric","Resistor_SMD/R_1210_3225Metric_Pad1.30x2.65mm_HandSolder","Resistor_SMD/R_1218_3246Metric","Resistor_SMD/R_1218_3246Metric_Pad1.22x4.75mm_HandSolder","Resistor_SMD/R_1225_3264Metric","Resistor_SMD/R_1225_3264Metric_Pad1.47x6.45mm_HandSolder","Resistor_SMD/R_1812_4532Metric","Resistor_SMD/R_1812_4532Metric_Pad1.30x3.40mm_HandSolder","Resistor_SMD/R_2010_5025Metric","Resistor_SMD/R_2010_5025Metric_Pad1.40x2.65mm_HandSolder","Resistor_SMD/R_2512_6332Metric","Resistor_SMD/R_2512_6332Metric_Pad1.40x3.35mm_HandSolder","Resistor_SMD/R_2816_7142Metric","Resistor_SMD/R_2816_7142Metric_Pad3.20x4.45mm_HandSolder","Resistor_SMD/R_4020_10251Metric","Resistor_SMD/R_4020_10251Metric_Pad1.65x5.30mm_HandSolder","Resistor_SMD/R_Array_Concave_2x0603","Resistor_SMD/R_Array_Concave_4x0402","Resistor_SMD/R_Array_Concave_4x0603","Resistor_SMD/R_Array_Convex_2x0402","Resistor_SMD/R_Array_Convex_2x0603","Resistor_SMD/R_Array_Convex_2x0606","Resistor_SMD/R_Array_Convex_2x1206","Resistor_SMD/R_Array_Convex_4x0402","Resistor_SMD/R_Array_Convex_4x0603","Resistor_SMD/R_Array_Convex_4x0612","Resistor_SMD/R_Array_Convex_4x1206","Resistor_SMD/R_Array_Convex_5x0603","Resistor_SMD/R_Array_Convex_5x1206","Resistor_SMD/R_Array_Convex_8x0602","Resistor_SMD/R_Cat16-2","Resistor_SMD/R_Cat16-4","Resistor_SMD/R_Cat16-8","Resistor_SMD/R_MELF_MMB-0207","Resistor_SMD/R_MicroMELF_MMU-0102","Resistor_SMD/R_MiniMELF_MMA-0204","Resistor_SMD/R_Shunt_Isabellenhuette_BVR4026","Resistor_SMD/R_Shunt_Ohmite_LVK12","Resistor_SMD/R_Shunt_Ohmite_LVK20","Resistor_SMD/R_Shunt_Ohmite_LVK24","Resistor_SMD/R_Shunt_Ohmite_LVK25","Resistor_SMD/R_Shunt_Vishay_WSK2512_6332Metric_T1.19mm","Resistor_SMD/R_Shunt_Vishay_WSK2512_6332Metric_T2.21mm","Resistor_SMD/R_Shunt_Vishay_WSK2512_6332Metric_T2.66mm","Resistor_SMD/R_Shunt_Vishay_WSKW0612","Resistor_SMD/R_Shunt_Vishay_WSR2_WSR3","Resistor_SMD/R_Shunt_Vishay_WSR2_WSR3_KelvinConnection","Resistor_THT/R_Array_SIP10","Resistor_THT/R_Array_SIP11","Resistor_THT/R_Array_SIP12","Resistor_THT/R_Array_SIP13","Resistor_THT/R_Array_SIP14","Resistor_THT/R_Array_SIP4","Resistor_THT/R_Array_SIP5","Resistor_THT/R_Array_SIP6","Resistor_THT/R_Array_SIP7","Resistor_THT/R_Array_SIP8","Resistor_THT/R_Array_SIP9","Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P1.90mm_Vertical","Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical","Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Horizontal","Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal","Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal","Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P15.24mm_Horizontal","Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_Vertical","Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal","Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P12.70mm_Horizontal","Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P15.24mm_Horizontal","Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_Vertical","Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P20.32mm_Horizontal","Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0309_L9.0mm_D3.2mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P12.70mm_Horizontal","Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P15.24mm_Horizontal","Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P20.32mm_Horizontal","Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0411_L9.9mm_D3.6mm_P7.62mm_Vertical","Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P15.24mm_Horizontal","Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P20.32mm_Horizontal","Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0414_L11.9mm_D4.5mm_P7.62mm_Vertical","Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P20.32mm_Horizontal","Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P30.48mm_Horizontal","Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0516_L15.5mm_D5.0mm_P7.62mm_Vertical","Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P15.24mm_Horizontal","Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P20.32mm_Horizontal","Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0614_L14.3mm_D5.7mm_P7.62mm_Vertical","Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P20.32mm_Horizontal","Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P30.48mm_Horizontal","Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P5.08mm_Vertical","Resistor_THT/R_Axial_DIN0617_L17.0mm_D6.0mm_P7.62mm_Vertical","Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P22.86mm_Horizontal","Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P30.48mm_Horizontal","Resistor_THT/R_Axial_DIN0918_L18.0mm_D9.0mm_P7.62mm_Vertical","Resistor_THT/R_Axial_DIN0922_L20.0mm_D9.0mm_P25.40mm_Horizontal","Resistor_THT/R_Axial_DIN0922_L20.0mm_D9.0mm_P30.48mm_Horizontal","Resistor_THT/R_Axial_DIN0922_L20.0mm_D9.0mm_P7.62mm_Vertical","Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P22.40mm","Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P25.40mm","Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P30.48mm","Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P5.08mm_Vertical","Resistor_THT/R_Axial_Power_L20.0mm_W6.4mm_P7.62mm_Vertical","Resistor_THT/R_Axial_Power_L25.0mm_W6.4mm_P27.94mm","Resistor_THT/R_Axial_Power_L25.0mm_W6.4mm_P30.48mm","Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P10.16mm_Vertical","Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P27.94mm","Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P30.48mm","Resistor_THT/R_Axial_Power_L25.0mm_W9.0mm_P7.62mm_Vertical","Resistor_THT/R_Axial_Power_L38.0mm_W6.4mm_P40.64mm","Resistor_THT/R_Axial_Power_L38.0mm_W6.4mm_P45.72mm","Resistor_THT/R_Axial_Power_L38.0mm_W9.0mm_P40.64mm","Resistor_THT/R_Axial_Power_L38.0mm_W9.0mm_P45.72mm","Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P10.16mm_Vertical","Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P55.88mm","Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P60.96mm","Resistor_THT/R_Axial_Power_L48.0mm_W12.5mm_P7.62mm_Vertical","Resistor_THT/R_Axial_Power_L50.0mm_W9.0mm_P55.88mm","Resistor_THT/R_Axial_Power_L50.0mm_W9.0mm_P60.96mm","Resistor_THT/R_Axial_Power_L60.0mm_W14.0mm_P10.16mm_Vertical","Resistor_THT/R_Axial_Power_L60.0mm_W14.0mm_P66.04mm","Resistor_THT/R_Axial_Power_L60.0mm_W14.0mm_P71.12mm","Resistor_THT/R_Axial_Power_L75.0mm_W9.0mm_P81.28mm","Resistor_THT/R_Axial_Power_L75.0mm_W9.0mm_P86.36mm","Resistor_THT/R_Axial_Shunt_L22.2mm_W8.0mm_PS14.30mm_P25.40mm","Resistor_THT/R_Axial_Shunt_L22.2mm_W9.5mm_PS14.30mm_P25.40mm","Resistor_THT/R_Axial_Shunt_L35.3mm_W9.5mm_PS25.40mm_P38.10mm","Resistor_THT/R_Axial_Shunt_L47.6mm_W12.7mm_PS34.93mm_P50.80mm","Resistor_THT/R_Axial_Shunt_L47.6mm_W9.5mm_PS34.93mm_P50.80mm","Resistor_THT/R_Bare_Metal_Element_L12.4mm_W4.8mm_P11.40mm","Resistor_THT/R_Bare_Metal_Element_L16.3mm_W4.8mm_P15.30mm","Resistor_THT/R_Bare_Metal_Element_L21.3mm_W4.8mm_P20.30mm","Resistor_THT/R_Box_L13.0mm_W4.0mm_P9.00mm","Resistor_THT/R_Box_L14.0mm_W5.0mm_P9.00mm","Resistor_THT/R_Box_L26.0mm_W5.0mm_P20.00mm","Resistor_THT/R_Box_L8.4mm_W2.5mm_P5.08mm","Resistor_THT/R_Radial_Power_L11.0mm_W7.0mm_P5.00mm","Resistor_THT/R_Radial_Power_L12.0mm_W8.0mm_P5.00mm","Resistor_THT/R_Radial_Power_L13.0mm_W9.0mm_P5.00mm","Resistor_THT/R_Radial_Power_L16.1mm_W9.0mm_P7.37mm","Resistor_THT/R_Radial_Power_L7.0mm_W8.0mm_Px2.40mm_Py2.30mm","Resistor_THT/R_Radial_Power_L9.0mm_W10.0mm_Px2.70mm_Py2.30mm","Rotary_Encoder/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm","Rotary_Encoder/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_CircularMountingHoles","Rotary_Encoder/RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm_MountingHoles","Rotary_Encoder/RotaryEncoder_Alps_EC11E_Vertical_H20mm","Rotary_Encoder/RotaryEncoder_Alps_EC11E_Vertical_H20mm_CircularMountingHoles","Rotary_Encoder/RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mm","Rotary_Encoder/RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mm_CircularMountingHoles","Rotary_Encoder/RotaryEncoder_Alps_EC12E_Vertical_H20mm","Rotary_Encoder/RotaryEncoder_Alps_EC12E_Vertical_H20mm_CircularMountingHoles","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC09-2xxxF-Nxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC09-2xxxF-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC12R-2x17F-Nxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEC12R-2x17F-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x16F-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x18F-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x21F-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x25S-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x26F-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Horizontal_PEL12D-2x31F-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEC12R-3x17F-Nxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEC12R-3x17F-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEL12D-4x25S-Sxxxx","Rotary_Encoder/RotaryEncoder_Bourns_Vertical_PEL12D-4xxxF-Sxxxx","Sensor/ASAIR_AM2302_P2.54mm_Lead2.75mm_TabDown","Sensor/ASAIR_AM2302_P2.54mm_Vertical","Sensor/Aosong_DHT11_5.5x12.0_P2.54mm","Sensor/Avago_APDS-9960","Sensor/LuminOX_LOX-O2","Sensor/MQ-6","Sensor/Rohm_RPR-0521RS","Sensor/SHT1x","Sensor/SPEC_110-xxx_SMD-10Pin_20x20mm_P4.0mm","Sensor/Senseair_S8_Down","Sensor/Senseair_S8_Up","Sensor/Sensirion_SCD4x-1EP_10.1x10.1mm_P1.25mm_EP4.8x4.8mm","Sensor/Sensortech_MiCS_5x7mm_P1.25mm","Sensor/TGS-5141","Sensor/Winson_GM-402B_5x5mm_P1.27mm","Sensor_Audio/CUI_CMC-4013-SMT","Sensor_Audio/Infineon_PG-LLGA-5-1","Sensor_Audio/Infineon_PG-LLGA-5-2","Sensor_Audio/InvenSense_ICS-43434-6_3.5x2.65mm","Sensor_Audio/Knowles_LGA-5_3.5x2.65mm","Sensor_Audio/Knowles_LGA-6_4.72x3.76mm","Sensor_Audio/Knowles_SPH0645LM4H-6_3.5x2.65mm","Sensor_Audio/POM-2244P-C3310-2-R","Sensor_Audio/ST_HLGA-6_3.76x4.72mm_P1.65mm","Sensor_Current/AKM_CQ_7","Sensor_Current/AKM_CQ_7S","Sensor_Current/AKM_CQ_VSOP-24_5.6x7.9mm_P0.65mm","Sensor_Current/AKM_CZ_SSOP-10_6.5x8.1mm_P0.95mm","Sensor_Current/Allegro_CB_PFF","Sensor_Current/Allegro_CB_PSF","Sensor_Current/Allegro_CB_PSS","Sensor_Current/Allegro_PSOF-7_4.8x6.4mm_P1.60mm","Sensor_Current/Allegro_QFN-12-10-1EP_3x3mm_P0.5mm","Sensor_Current/Allegro_QSOP-24_3.9x8.7mm_P0.635mm","Sensor_Current/Allegro_SIP-4","Sensor_Current/Diodes_SIP-3_4.1x1.5mm_P1.27mm","Sensor_Current/Diodes_SIP-3_4.1x1.5mm_P2.65mm","Sensor_Current/Honeywell_CSLW","Sensor_Current/LEM_CKSR","Sensor_Current/LEM_HO40-NP","Sensor_Current/LEM_HO8-NP","Sensor_Current/LEM_HO8-NSM","Sensor_Current/LEM_HTFS","Sensor_Current/LEM_HX02-P","Sensor_Current/LEM_HX03-P-SP2","Sensor_Current/LEM_HX04-P","Sensor_Current/LEM_HX05-NP","Sensor_Current/LEM_HX05-P-SP2","Sensor_Current/LEM_HX06-P","Sensor_Current/LEM_HX10-NP","Sensor_Current/LEM_HX10-P-SP2","Sensor_Current/LEM_HX15-NP","Sensor_Current/LEM_HX15-P-SP2","Sensor_Current/LEM_HX20-P-SP2","Sensor_Current/LEM_HX25-P-SP2","Sensor_Current/LEM_HX50-P-SP2","Sensor_Current/LEM_LA25-NP","Sensor_Current/LEM_LA25-P","Sensor_Current/LEM_LTSR-NP","Sensor_Distance/AMS_OLGA12","Sensor_Distance/ST_VL53L1x","Sensor_Humidity/Sensirion_DFN-4-1EP_2x2mm_P1mm_EP0.7x1.6mm","Sensor_Humidity/Sensirion_DFN-4_1.5x1.5mm_P0.8mm_SHT4x_NoCentralPad","Sensor_Humidity/Sensirion_DFN-8-1EP_2.5x2.5mm_P0.5mm_EP1.1x1.7mm","Sensor_Humidity/Texas_S-PWSON-N6-HDC2080","Sensor_Motion/Analog_LGA-16_3.25x3mm_P0.5mm_LayoutBorder3x5y","Sensor_Motion/InvenSense_QFN-24_3x3mm_P0.4mm","Sensor_Motion/InvenSense_QFN-24_3x3mm_P0.4mm_NoMask","Sensor_Motion/InvenSense_QFN-24_4x4mm_P0.5mm","Sensor_Motion/InvenSense_QFN-24_4x4mm_P0.5mm_NoMask","Sensor_Pressure/CFSensor_XGZP6859D_7x7mm","Sensor_Pressure/CFSensor_XGZP6897x","Sensor_Pressure/CFSensor_XGZP6899x","Sensor_Pressure/Freescale_98ARH99066A","Sensor_Pressure/Freescale_98ARH99089A","Sensor_Pressure/Honeywell_40PCxxxG1A","Sensor_Pressure/Honeywell_ABPDAN","Sensor_Pressure/TE_MS5525DSO-DBxxxyS","Sensor_Pressure/TE_MS5837-xxBA","Sensor_Voltage/LEM_LV25-P","Socket/3M_Textool_240-1288-00-0602J_2x20_P2.54mm","Socket/DIP_Socket-14_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_214-3339-00-0602J","Socket/DIP_Socket-16_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_216-3340-00-0602J","Socket/DIP_Socket-18_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_218-3341-00-0602J","Socket/DIP_Socket-20_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_220-3342-00-0602J","Socket/DIP_Socket-22_W6.9mm_W7.62mm_W10.16mm_W12.7mm_W13.5mm_3M_222-3343-00-0602J","Socket/DIP_Socket-24_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_224-1275-00-0602J","Socket/DIP_Socket-24_W4.3mm_W5.08mm_W7.62mm_W10.16mm_W10.9mm_3M_224-5248-00-0602J","Socket/DIP_Socket-28_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_228-1277-00-0602J","Socket/DIP_Socket-28_W6.9mm_W7.62mm_W10.16mm_W12.7mm_W13.5mm_3M_228-4817-00-0602J","Socket/DIP_Socket-32_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_232-1285-00-0602J","Socket/DIP_Socket-40_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_240-1280-00-0602J","Socket/DIP_Socket-40_W22.1mm_W22.86mm_W25.4mm_W27.94mm_W28.7mm_3M_240-3639-00-0602J","Socket/DIP_Socket-42_W11.9mm_W12.7mm_W15.24mm_W17.78mm_W18.5mm_3M_242-1281-00-0602J","Socket/Wells_648-0482211SA01","Symbol/CE-Logo_11.2x8mm_SilkScreen","Symbol/CE-Logo_16.8x12mm_SilkScreen","Symbol/CE-Logo_28x20mm_SilkScreen","Symbol/CE-Logo_42x30mm_SilkScreen","Symbol/CE-Logo_56.1x40mm_SilkScreen","Symbol/CE-Logo_8.5x6mm_SilkScreen","Symbol/ESD-Logo_13.2x12mm_SilkScreen","Symbol/ESD-Logo_22x20mm_SilkScreen","Symbol/ESD-Logo_33x30mm_SilkScreen","Symbol/ESD-Logo_44.1x40mm_SilkScreen","Symbol/ESD-Logo_6.6x6mm_SilkScreen","Symbol/ESD-Logo_8.9x8mm_SilkScreen","Symbol/EasterEgg_EWG1308-2013_ClassA","Symbol/FCC-Logo_14.6x12mm_SilkScreen","Symbol/FCC-Logo_24.2x20mm_SilkScreen","Symbol/FCC-Logo_36.3x30mm_SilkScreen","Symbol/FCC-Logo_48.3x40mm_SilkScreen","Symbol/FCC-Logo_7.3x6mm_SilkScreen","Symbol/FCC-Logo_9.6x8mm_SilkScreen","Symbol/KiCad-Logo2_12mm_Copper","Symbol/KiCad-Logo2_12mm_SilkScreen","Symbol/KiCad-Logo2_20mm_Copper","Symbol/KiCad-Logo2_20mm_SilkScreen","Symbol/KiCad-Logo2_30mm_Copper","Symbol/KiCad-Logo2_30mm_SilkScreen","Symbol/KiCad-Logo2_40mm_Copper","Symbol/KiCad-Logo2_40mm_SilkScreen","Symbol/KiCad-Logo2_5mm_Copper","Symbol/KiCad-Logo2_5mm_SilkScreen","Symbol/KiCad-Logo2_6mm_Copper","Symbol/KiCad-Logo2_6mm_SilkScreen","Symbol/KiCad-Logo2_8mm_Copper","Symbol/KiCad-Logo2_8mm_SilkScreen","Symbol/KiCad-Logo_12mm_Copper","Symbol/KiCad-Logo_12mm_SilkScreen","Symbol/KiCad-Logo_20mm_Copper","Symbol/KiCad-Logo_20mm_SilkScreen","Symbol/KiCad-Logo_30mm_Copper","Symbol/KiCad-Logo_30mm_SilkScreen","Symbol/KiCad-Logo_40mm_Copper","Symbol/KiCad-Logo_40mm_SilkScreen","Symbol/KiCad-Logo_5mm_Copper","Symbol/KiCad-Logo_5mm_SilkScreen","Symbol/KiCad-Logo_6mm_Copper","Symbol/KiCad-Logo_6mm_SilkScreen","Symbol/KiCad-Logo_8mm_Copper","Symbol/KiCad-Logo_8mm_SilkScreen","Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_Named","Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored","Symbol/LayerMarker_10_14x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored","Symbol/LayerMarker_12_16.5x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_12_16.5x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_12_16.5x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_14_19.1x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_14_19.1x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_14_19.1x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_16_21.6x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_16_21.6x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_16_21.6x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_18_24.1x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_18_24.1x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_18_24.1x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_20_26.7x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_20_26.7x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_20_26.7x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_22_29.2x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_22_29.2x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_22_29.2x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_24_31.8x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_24_31.8x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_24_31.8x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_26_34.3x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_26_34.3x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_26_34.3x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_28_36.8x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_28_36.8x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_28_36.8x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm","Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm_BottomMirrored","Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm_Named","Symbol/LayerMarker_2_3.81x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored","Symbol/LayerMarker_30_39.4x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_30_39.4x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_30_39.4x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_32_41.9x2.54mm_TextH1mm_P1.27mm_AlNum","Symbol/LayerMarker_32_41.9x2.54mm_TextH1mm_P1.27mm_AlNum_BottomMirrored","Symbol/LayerMarker_32_41.9x2.54mm_TextH1mm_P1.27mm_AlNum_LowerMirrored","Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm","Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_BottomMirrored","Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_LowerMirrored","Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_Named","Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored","Symbol/LayerMarker_4_6.35x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored","Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm","Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_BottomMirrored","Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_LowerMirrored","Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_Named","Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored","Symbol/LayerMarker_6_8.89x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored","Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm","Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_BottomMirrored","Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_LowerMirrored","Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_Named","Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_Named_BottomMirrored","Symbol/LayerMarker_8_11.4x2.54mm_TextH1mm_P1.27mm_Named_LowerMirrored","Symbol/OSHW-Logo2_14.6x12mm_Copper","Symbol/OSHW-Logo2_14.6x12mm_SilkScreen","Symbol/OSHW-Logo2_24.3x20mm_Copper","Symbol/OSHW-Logo2_24.3x20mm_SilkScreen","Symbol/OSHW-Logo2_36.5x30mm_Copper","Symbol/OSHW-Logo2_36.5x30mm_SilkScreen","Symbol/OSHW-Logo2_48.7x40mm_Copper","Symbol/OSHW-Logo2_48.7x40mm_SilkScreen","Symbol/OSHW-Logo2_7.3x6mm_Copper","Symbol/OSHW-Logo2_7.3x6mm_SilkScreen","Symbol/OSHW-Logo2_9.8x8mm_Copper","Symbol/OSHW-Logo2_9.8x8mm_SilkScreen","Symbol/OSHW-Logo_11.4x12mm_Copper","Symbol/OSHW-Logo_11.4x12mm_SilkScreen","Symbol/OSHW-Logo_19x20mm_Copper","Symbol/OSHW-Logo_19x20mm_SilkScreen","Symbol/OSHW-Logo_28.5x30mm_Copper","Symbol/OSHW-Logo_28.5x30mm_SilkScreen","Symbol/OSHW-Logo_38.1x40mm_Copper","Symbol/OSHW-Logo_38.1x40mm_SilkScreen","Symbol/OSHW-Logo_5.7x6mm_Copper","Symbol/OSHW-Logo_5.7x6mm_SilkScreen","Symbol/OSHW-Logo_7.5x8mm_Copper","Symbol/OSHW-Logo_7.5x8mm_SilkScreen","Symbol/OSHW-Symbol_13.4x12mm_Copper","Symbol/OSHW-Symbol_13.4x12mm_SilkScreen","Symbol/OSHW-Symbol_22.3x20mm_Copper","Symbol/OSHW-Symbol_22.3x20mm_SilkScreen","Symbol/OSHW-Symbol_33.5x30mm_Copper","Symbol/OSHW-Symbol_33.5x30mm_SilkScreen","Symbol/OSHW-Symbol_44.5x40mm_Copper","Symbol/OSHW-Symbol_44.5x40mm_SilkScreen","Symbol/OSHW-Symbol_6.7x6mm_Copper","Symbol/OSHW-Symbol_6.7x6mm_SilkScreen","Symbol/OSHW-Symbol_8.9x8mm_Copper","Symbol/OSHW-Symbol_8.9x8mm_SilkScreen","Symbol/Polarity_Center_Negative_12mm_SilkScreen","Symbol/Polarity_Center_Negative_20mm_SilkScreen","Symbol/Polarity_Center_Negative_30mm_SilkScreen","Symbol/Polarity_Center_Negative_40mm_SilkScreen","Symbol/Polarity_Center_Negative_6mm_SilkScreen","Symbol/Polarity_Center_Negative_8mm_SilkScreen","Symbol/Polarity_Center_Positive_12mm_SilkScreen","Symbol/Polarity_Center_Positive_20mm_SilkScreen","Symbol/Polarity_Center_Positive_30mm_SilkScreen","Symbol/Polarity_Center_Positive_40mm_SilkScreen","Symbol/Polarity_Center_Positive_6mm_SilkScreen","Symbol/Polarity_Center_Positive_8mm_SilkScreen","Symbol/RoHS-Logo_12mm_SilkScreen","Symbol/RoHS-Logo_20mm_SilkScreen","Symbol/RoHS-Logo_30mm_SilkScreen","Symbol/RoHS-Logo_40mm_SilkScreen","Symbol/RoHS-Logo_6mm_SilkScreen","Symbol/RoHS-Logo_8mm_SilkScreen","Symbol/Screw_Generic_2.0x3.0mm_SilkScreen","Symbol/Smolhaj_Scale_0.1","Symbol/Symbol_Attention_Triangle_17x15mm_Copper","Symbol/Symbol_Attention_Triangle_8x7mm_Copper","Symbol/Symbol_Barrel_Polarity","Symbol/Symbol_CC-Attribution_CopperTop_Big","Symbol/Symbol_CC-Attribution_CopperTop_Small","Symbol/Symbol_CC-Noncommercial_CopperTop_Big","Symbol/Symbol_CC-Noncommercial_CopperTop_Small","Symbol/Symbol_CC-PublicDomain_CopperTop_Big","Symbol/Symbol_CC-PublicDomain_CopperTop_Small","Symbol/Symbol_CC-PublicDomain_SilkScreenTop_Big","Symbol/Symbol_CC-ShareAlike_CopperTop_Big","Symbol/Symbol_CC-ShareAlike_CopperTop_Small","Symbol/Symbol_CreativeCommonsPublicDomain_CopperTop_Small","Symbol/Symbol_CreativeCommonsPublicDomain_SilkScreenTop_Small","Symbol/Symbol_CreativeCommons_CopperTop_Type1_Big","Symbol/Symbol_CreativeCommons_CopperTop_Type2_Big","Symbol/Symbol_CreativeCommons_CopperTop_Type2_Small","Symbol/Symbol_CreativeCommons_SilkScreenTop_Type2_Big","Symbol/Symbol_Danger_18x16mm_Copper","Symbol/Symbol_Danger_8x8mm_Copper","Symbol/Symbol_ESD-Logo-Text_CopperTop","Symbol/Symbol_ESD-Logo_CopperTop","Symbol/Symbol_GNU-GPL_CopperTop_Big","Symbol/Symbol_GNU-GPL_CopperTop_Small","Symbol/Symbol_GNU-Logo_CopperTop","Symbol/Symbol_GNU-Logo_SilkscreenTop","Symbol/Symbol_HighVoltage_NoTriangle_2x5mm_Copper","Symbol/Symbol_HighVoltage_NoTriangle_6x15mm_Copper","Symbol/Symbol_HighVoltage_Triangle_17x15mm_Copper","Symbol/Symbol_HighVoltage_Triangle_6x6mm_Copper","Symbol/Symbol_HighVoltage_Triangle_8x7mm_Copper","Symbol/UKCA-Logo_12x12mm_SilkScreen","Symbol/UKCA-Logo_20x20mm_SilkScreen","Symbol/UKCA-Logo_30x30mm_SilkScreen","Symbol/UKCA-Logo_40x40mm_SilkScreen","Symbol/UKCA-Logo_6x6mm_SilkScreen","Symbol/UKCA-Logo_8x8mm_SilkScreen","Symbol/WEEE-Logo_14x20mm_SilkScreen","Symbol/WEEE-Logo_21x30mm_SilkScreen","Symbol/WEEE-Logo_28.1x40mm_SilkScreen","Symbol/WEEE-Logo_4.2x6mm_SilkScreen","Symbol/WEEE-Logo_5.6x8mm_SilkScreen","Symbol/WEEE-Logo_8.4x12mm_SilkScreen","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-03P_1x03_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-04P_1x04_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-05P_1x05_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-06P_1x06_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-07P_1x07_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-08P_1x08_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-09P_1x09_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-10P_1x10_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-11P_1x11_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-12P_1x12_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-13P_1x13_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-14P_1x14_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-15P_1x15_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-16P_1x16_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-17P_1x17_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-18P_1x18_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-19P_1x19_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-20P_1x20_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-21P_1x21_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-22P_1x22_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-23P_1x23_P5.00mm","TerminalBlock/TerminalBlock_MaiXu_MX126-5.0-24P_1x24_P5.00mm","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-10P_1x10_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-11P_1x11_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-12P_1x12_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-13P_1x13_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-14P_1x14_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-15P_1x15_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-16P_1x16_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-17P_1x17_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-18P_1x18_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-19P_1x19_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-20P_1x20_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-21P_1x21_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-22P_1x22_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-23P_1x23_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-2P_1x02_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-3P_1x03_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-4P_1x04_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-5P_1x05_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-6P_1x06_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-7P_1x07_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-8P_1x08_P2.54mm_Horizontal","TerminalBlock/TerminalBlock_Xinya_XY308-2.54-9P_1x09_P2.54mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x02_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x02_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x03_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x03_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x04_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x04_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x05_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x05_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x06_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x06_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x07_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x07_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x08_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x08_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x09_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x09_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x10_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x10_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x11_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x11_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x12_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x12_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x13_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x13_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x14_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x14_P3.50mm_Vertical","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x15_P3.50mm_Horizontal","TerminalBlock_4Ucon/TerminalBlock_4Ucon_1x15_P3.50mm_Vertical","TerminalBlock_Altech/Altech_AK100_1x02_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x03_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x04_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x05_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x06_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x07_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x08_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x09_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x10_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x11_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x12_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x13_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x14_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x15_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x16_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x17_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x18_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x19_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x20_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x21_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x22_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x23_P5.00mm","TerminalBlock_Altech/Altech_AK100_1x24_P5.00mm","TerminalBlock_Altech/Altech_AK300_1x02_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x03_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x04_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x05_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x06_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x07_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x08_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x09_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x10_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x11_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x12_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x13_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x14_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x15_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x16_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x17_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x18_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x19_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x20_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x21_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x22_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x23_P5.00mm_45-Degree","TerminalBlock_Altech/Altech_AK300_1x24_P5.00mm_45-Degree","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-02_1x02_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-03_1x03_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-04_1x04_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-05_1x05_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-06_1x06_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-07_1x07_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-08_1x08_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-09_1x09_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-10_1x10_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-11_1x11_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-12_1x12_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-13_1x13_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-14_1x14_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-15_1x15_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-16_1x16_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-17_1x17_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-18_1x18_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-19_1x19_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-20_1x20_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-21_1x21_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-22_1x22_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-23_1x23_P5.08mm_Horizontal","TerminalBlock_CUI/TerminalBlock_CUI_TB007-508-24_1x24_P5.08mm_Horizontal","TerminalBlock_Degson/Degson_DG246-3.81-03P","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-01P_1x01_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-02P_1x02_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-03P_1x03_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-04P_1x04_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-05P_1x05_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-06P_1x06_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-07P_1x07_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-08P_1x08_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-09P_1x09_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-10P_1x10_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-11P_1x11_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-12P_1x12_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-14P_1x14_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-15P_1x15_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-16P_1x16_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-18P_1x18_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-19P_1x19_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-20P_1x20_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-24P_1x24_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-44P_1x44_P3.50mm_45Degree","TerminalBlock_Degson/TerminalBlock_Degson_DG250-3.5-45P_1x45_P3.50mm_45Degree","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-02_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-03_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-04_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-05_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-06_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-07_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-08_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-09_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-10_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-11_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-12_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-13_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-14_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-15_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-16_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-17_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-18_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-19_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-20_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-21_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-22_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-23_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-24_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-25_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-26_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-27_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-28_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-29_P10.00mm","TerminalBlock_Dinkle/TerminalBlock_Dinkle_DT-55-B01X-30_P10.00mm","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360271_1x01_Horizontal_ScrewM3.0_Boxed","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360272_1x01_Horizontal_ScrewM2.6","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360273_1x01_Horizontal_ScrewM2.6_WireProtection","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360291_1x01_Horizontal_ScrewM3.0_Boxed","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360322_1x01_Horizontal_ScrewM3.0_WireProtection","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360381_1x01_Horizontal_ScrewM3.0","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360410_1x01_Horizontal_ScrewM3.0","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_360425_1x01_Horizontal_ScrewM4.0_Boxed","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05502HBLC_1x02_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05503HBLC_1x03_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05504HBLC_1x04_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05505HBLC_1x05_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type011_RT05506HBLC_1x06_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type055_RT01502HDWU_1x02_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type055_RT01503HDWU_1x03_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type055_RT01504HDWU_1x04_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06302HBWC_1x02_P3.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06303HBWC_1x03_P3.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06304HBWC_1x04_P3.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06305HBWC_1x05_P3.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type059_RT06306HBWC_1x06_P3.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01902HDWC_1x02_P10.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01903HDWC_1x03_P10.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01904HDWC_1x04_P10.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type067_RT01905HDWC_1x05_P10.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type073_RT02602HBLU_1x02_P5.08mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type073_RT02603HBLU_1x03_P5.08mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03402HBLC_1x02_P3.81mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03403HBLC_1x03_P3.81mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03404HBLC_1x04_P3.81mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03405HBLC_1x05_P3.81mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type086_RT03406HBLC_1x06_P3.81mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03502HBLU_1x02_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03503HBLU_1x03_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03504HBLU_1x04_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03505HBLU_1x05_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type094_RT03506HBLU_1x06_P5.00mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01602HBWC_1x02_P5.08mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01603HBWC_1x03_P5.08mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01604HBWC_1x04_P5.08mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01605HBWC_1x05_P5.08mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type101_RT01606HBWC_1x06_P5.08mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13702HBWC_1x02_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13703HBWC_1x03_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13704HBWC_1x04_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13705HBWC_1x05_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type171_RT13706HBWC_1x06_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02702HBLC_1x02_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02703HBLC_1x03_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02704HBLC_1x04_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02705HBLC_1x05_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type175_RT02706HBLC_1x06_P7.50mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04502UBLC_1x02_P5.00mm_45Degree","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04503UBLC_1x03_P5.00mm_45Degree","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04504UBLC_1x04_P5.00mm_45Degree","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04505UBLC_1x05_P5.00mm_45Degree","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type205_RT04506UBLC_1x06_P5.00mm_45Degree","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type701_RT11L02HGLU_1x02_P6.35mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type701_RT11L03HGLU_1x03_P6.35mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type703_RT10N02HGLU_1x02_P9.52mm_Horizontal","TerminalBlock_MetzConnect/TerminalBlock_MetzConnect_Type703_RT10N03HGLU_1x03_P9.52mm_Horizontal","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x02_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x03_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x04_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x05_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x06_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x07_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x08_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x09_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x10_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x11_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500M_1x12_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x02_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x03_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x04_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x05_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x06_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x07_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x08_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x09_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x10_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x11_P9.5mm","TerminalBlock_Ningbo-Kagnex/TerminalBlock_Ningbo-Kagnex_HB9500_1x12_P9.5mm","TerminalBlock_Philmore/TerminalBlock_Philmore_TB132_1x02_P5.00mm_Horizontal","TerminalBlock_Philmore/TerminalBlock_Philmore_TB133_1x03_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-10-5.08_1x10_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-10_1x10_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-11-5.08_1x11_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-11_1x11_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-12-5.08_1x12_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-12_1x12_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-13-5.08_1x13_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-13_1x13_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-14-5.08_1x14_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-14_1x14_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-15-5.08_1x15_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-15_1x15_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-16-5.08_1x16_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-16_1x16_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-3-5.08_1x03_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-3_1x03_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-4-5.08_1x04_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-4_1x04_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-5-5.08_1x05_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-5_1x05_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-6-5.08_1x06_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-6_1x06_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-7-5.08_1x07_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-7_1x07_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-8-5.08_1x08_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-8_1x08_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-9-5.08_1x09_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1,5-9_1x09_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-10-3.81_1x10_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-11-3.81_1x11_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-12-3.81_1x12_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-13-3.81_1x13_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-2-3.81_1x02_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-3-3.81_1x03_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-4-3.81_1x04_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-5-3.81_1x05_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-6-3.81_1x06_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-7-3.81_1x07_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-8-3.81_1x08_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-1-9-3.81_1x09_P3.81mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-10-5.08_1x10_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-11-5.08_1x11_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-12-5.08_1x12_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-13-5.08_1x13_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-14-5.08_1x14_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-15-5.08_1x15_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-16-5.08_1x16_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-2-5.08_1x02_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-3-5.08_1x03_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-4-5.08_1x04_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-5-5.08_1x05_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-6-5.08_1x06_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-7-5.08_1x07_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-8-5.08_1x08_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MKDS-3-9-5.08_1x09_P5.08mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-10-2.54_1x10_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-11-2.54_1x11_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-12-2.54_1x12_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-2-2.54_1x02_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-3-2.54_1x03_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-4-2.54_1x04_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-5-2.54_1x05_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-6-2.54_1x06_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-7-2.54_1x07_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-8-2.54_1x08_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_MPT-0,5-9-2.54_1x09_P2.54mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-10-3.5-H_1x10_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-10-5.0-H_1x10_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-11-3.5-H_1x11_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-11-5.0-H_1x11_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-12-3.5-H_1x12_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-12-5.0-H_1x12_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-13-3.5-H_1x13_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-13-5.0-H_1x13_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-14-3.5-H_1x14_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-14-5.0-H_1x14_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-15-3.5-H_1x15_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-15-5.0-H_1x15_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-16-3.5-H_1x16_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-16-5.0-H_1x16_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-2-5.0-H_1x02_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-3-3.5-H_1x03_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-3-5.0-H_1x03_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-4-3.5-H_1x04_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-4-5.0-H_1x04_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-5-3.5-H_1x05_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-5-5.0-H_1x05_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-6-3.5-H_1x06_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-6-5.0-H_1x06_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-7-3.5-H_1x07_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-7-5.0-H_1x07_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-8-3.5-H_1x08_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-8-5.0-H_1x08_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-9-3.5-H_1x09_P3.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PT-1,5-9-5.0-H_1x09_P5.00mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-2,5-V-SMD_1x02-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-2.5-H-THR_1x02_P2.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-2.5-V-THR_1x02_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-2-HV-2.5-SMD_1x02-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-2,5-V-SMD_1x03-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-2.5-H-THR_1x03_P2.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-2.5-V-THR_1x03_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-3-HV-2.5-SMD_1x03-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-2,5-V-SMD_1x04-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-2.5-H-THR_1x04_P2.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-2.5-V-THR_1x04_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-4-HV-2.5-SMD_1x04-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-2,5-V-SMD_1x05-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-2.5-H-THR_1x05_P2.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-2.5-V-THR_1x05_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-5-HV-2.5-SMD_1x05-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-2,5-V-SMD_1x06-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-2.5-H-THR_1x06_P2.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-2.5-V-THR_1x06_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-6-HV-2.5-SMD_1x06-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-2,5-V-SMD_1x07-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-2.5-H-THR_1x07_P2.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-2.5-V-THR_1x07_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-7-HV-2.5-SMD_1x07-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-2,5-V-SMD_1x08-1MP_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-2.5-H-THR_1x08_P2.50mm_Horizontal","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-2.5-V-THR_1x08_P2.50mm_Vertical","TerminalBlock_Phoenix/TerminalBlock_Phoenix_PTSM-0,5-8-HV-2.5-SMD_1x08-1MP_P2.50mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00001_1x02_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00002_1x03_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00003_1x04_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00004_1x05_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00005_1x06_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00006_1x07_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00007_1x08_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00008_1x09_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00009_1x10_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00010_1x11_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00011_1x12_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00012_1x02_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00013_1x03_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00014_1x04_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00015_1x05_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00016_1x06_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00017_1x07_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00018_1x08_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00019_1x09_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00020_1x10_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00021_1x11_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00022_1x12_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00023_1x02_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00024_1x03_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00025_1x04_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00026_1x05_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00027_1x06_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00028_1x07_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00029_1x08_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00030_1x09_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00031_1x10_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00032_1x11_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00033_1x12_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00045_1x02_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00046_1x03_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00047_1x04_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00048_1x05_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00049_1x06_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00050_1x07_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00051_1x08_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00052_1x09_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00053_1x10_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00054_1x11_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00055_1x12_P5.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00056_1x02_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00057_1x03_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00058_1x04_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00059_1x05_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00060_1x06_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00061_1x07_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00062_1x08_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00063_1x09_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00064_1x10_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00065_1x11_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00066_1x12_P5.00mm_45Degree","TerminalBlock_RND/TerminalBlock_RND_205-00067_1x02_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00068_1x03_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00069_1x04_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00070_1x05_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00071_1x06_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00072_1x07_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00073_1x08_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00074_1x09_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00075_1x10_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00076_1x11_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00077_1x12_P7.50mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00078_1x02_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00079_1x03_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00080_1x04_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00081_1x05_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00082_1x06_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00083_1x07_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00084_1x08_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00085_1x09_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00086_1x10_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00087_1x11_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00088_1x12_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00232_1x02_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00233_1x03_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00234_1x04_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00235_1x05_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00236_1x06_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00237_1x07_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00238_1x08_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00239_1x09_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00240_1x10_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00241_1x02_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00241_1x11_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00242_1x03_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00242_1x12_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00243_1x04_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00244_1x05_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00245_1x06_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00246_1x07_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00247_1x08_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00248_1x09_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00249_1x10_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00250_1x11_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00251_1x12_P10.16mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00276_1x02_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00277_1x03_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00278_1x04_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00279_1x05_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00280_1x06_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00281_1x07_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00282_1x08_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00283_1x09_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00284_1x10_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00285_1x11_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00286_1x12_P5.00mm_Vertical","TerminalBlock_RND/TerminalBlock_RND_205-00287_1x02_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00288_1x03_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00289_1x04_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00290_1x05_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00291_1x06_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00292_1x07_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00293_1x08_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00294_1x09_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00295_1x10_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00296_1x11_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00297_1x12_P5.08mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00298_1x02_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00299_1x03_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00300_1x04_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00301_1x05_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00302_1x06_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00303_1x07_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00304_1x08_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00305_1x09_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00306_1x10_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00307_1x11_P10.00mm_Horizontal","TerminalBlock_RND/TerminalBlock_RND_205-00308_1x12_P10.00mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_1-282834-0_1x10_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_1-282834-1_1x11_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_1-282834-2_1x12_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-2_1x02_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-3_1x03_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-4_1x04_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-5_1x05_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-6_1x06_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-7_1x07_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-8_1x08_P2.54mm_Horizontal","TerminalBlock_TE-Connectivity/TerminalBlock_TE_282834-9_1x09_P2.54mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_233-502_2x02_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-503_2x03_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-504_2x04_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-505_2x05_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-506_2x06_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-507_2x07_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-508_2x08_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-509_2x09_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-510_2x10_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_233-512_2x12_P2.54mm","TerminalBlock_WAGO/TerminalBlock_WAGO_236-101_1x01_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-102_1x02_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-103_1x03_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-104_1x04_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-105_1x05_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-106_1x06_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-107_1x07_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-108_1x08_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-109_1x09_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-110_1x10_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-111_1x11_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-112_1x12_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-113_1x13_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-114_1x14_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-115_1x15_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-116_1x16_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-124_1x24_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-136_1x36_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-148_1x48_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-201_1x01_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-202_1x02_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-203_1x03_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-204_1x04_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-205_1x05_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-206_1x06_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-207_1x07_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-208_1x08_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-209_1x09_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-210_1x10_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-211_1x11_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-212_1x12_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-213_1x13_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-214_1x14_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-215_1x15_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-216_1x16_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-224_1x24_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-301_1x01_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-302_1x02_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-303_1x03_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-304_1x04_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-305_1x05_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-306_1x06_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-307_1x07_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-308_1x08_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-309_1x09_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-310_1x10_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-311_1x11_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-312_1x12_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-313_1x13_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-314_1x14_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-315_1x15_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-316_1x16_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-324_1x24_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-401_1x01_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-402_1x02_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-403_1x03_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-404_1x04_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-405_1x05_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-406_1x06_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-407_1x07_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-408_1x08_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-409_1x09_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-410_1x10_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-411_1x11_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-412_1x12_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-413_1x13_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-414_1x14_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-415_1x15_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-416_1x16_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-424_1x24_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-436_1x36_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-448_1x48_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-501_1x01_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-502_1x02_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-503_1x03_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-504_1x04_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-505_1x05_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-506_1x06_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-507_1x07_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-508_1x08_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-509_1x09_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-510_1x10_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-511_1x11_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-512_1x12_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-513_1x13_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-514_1x14_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-515_1x15_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-516_1x16_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-524_1x24_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-601_1x01_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-602_1x02_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-603_1x03_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-604_1x04_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-605_1x05_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-606_1x06_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-607_1x07_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-608_1x08_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-609_1x09_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-610_1x10_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-611_1x11_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-612_1x12_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-613_1x13_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-614_1x14_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-615_1x15_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-616_1x16_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_236-624_1x24_P10.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1102_1x02_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1103_1x03_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1104_1x04_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1105_1x05_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1106_1x06_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1108_1x08_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1109_1x09_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1110_1x10_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1111_1x11_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-1112_1x12_P3.50mm_Horizontal","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3102_1x02_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3103_1x03_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3104_1x04_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3105_1x05_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3106_1x06_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3107_1x07_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3108_1x08_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3109_1x09_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3110_1x10_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3111_1x11_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3112_1x12_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3114_1x14_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_2601-3124_1x24_P3.50mm_Vertical","TerminalBlock_WAGO/TerminalBlock_WAGO_804-101_1x01_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-102_1x02_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-103_1x03_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-104_1x04_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-105_1x05_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-106_1x06_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-107_1x07_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-108_1x08_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-109_1x09_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-110_1x10_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-111_1x11_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-112_1x12_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-113_1x13_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-114_1x14_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-115_1x15_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-116_1x16_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-124_1x24_P5.00mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-301_1x01_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-302_1x02_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-303_1x03_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-304_1x04_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-305_1x05_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-306_1x06_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-307_1x07_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-308_1x08_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-309_1x09_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-310_1x10_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-311_1x11_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-312_1x12_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-316_1x16_P7.50mm_45Degree","TerminalBlock_WAGO/TerminalBlock_WAGO_804-324_1x24_P7.50mm_45Degree","TerminalBlock_Wuerth/Wuerth_691311400102_P7.62mm","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650073_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650074_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650094_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650173_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650174_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650194_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74650195_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRBU_74655095_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651173_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651174_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651175_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651194_THR","TerminalBlock_Wuerth/Wuerth_REDCUBE-THR_WP-THRSH_74651195_THR","TestPoint/TestPoint_2Pads_Pitch2.54mm_Drill0.8mm","TestPoint/TestPoint_2Pads_Pitch5.08mm_Drill1.3mm","TestPoint/TestPoint_Bridge_Pitch2.0mm_Drill0.7mm","TestPoint/TestPoint_Bridge_Pitch2.54mm_Drill0.7mm","TestPoint/TestPoint_Bridge_Pitch2.54mm_Drill1.0mm","TestPoint/TestPoint_Bridge_Pitch2.54mm_Drill1.3mm","TestPoint/TestPoint_Bridge_Pitch3.81mm_Drill1.3mm","TestPoint/TestPoint_Bridge_Pitch5.08mm_Drill0.7mm","TestPoint/TestPoint_Bridge_Pitch5.08mm_Drill1.3mm","TestPoint/TestPoint_Bridge_Pitch6.35mm_Drill1.3mm","TestPoint/TestPoint_Bridge_Pitch7.62mm_Drill1.3mm","TestPoint/TestPoint_Keystone_5000-5004_Miniature","TestPoint/TestPoint_Keystone_5005-5009_Compact","TestPoint/TestPoint_Keystone_5010-5014_Multipurpose","TestPoint/TestPoint_Keystone_5015_Micro_Mini","TestPoint/TestPoint_Keystone_5019_Miniature","TestPoint/TestPoint_Loop_D1.80mm_Drill1.0mm_Beaded","TestPoint/TestPoint_Loop_D2.50mm_Drill1.0mm","TestPoint/TestPoint_Loop_D2.50mm_Drill1.0mm_LowProfile","TestPoint/TestPoint_Loop_D2.50mm_Drill1.85mm","TestPoint/TestPoint_Loop_D2.54mm_Drill1.5mm_Beaded","TestPoint/TestPoint_Loop_D2.60mm_Drill0.9mm_Beaded","TestPoint/TestPoint_Loop_D2.60mm_Drill1.4mm_Beaded","TestPoint/TestPoint_Loop_D2.60mm_Drill1.6mm_Beaded","TestPoint/TestPoint_Loop_D3.50mm_Drill0.9mm_Beaded","TestPoint/TestPoint_Loop_D3.50mm_Drill1.4mm_Beaded","TestPoint/TestPoint_Loop_D3.80mm_Drill2.0mm","TestPoint/TestPoint_Loop_D3.80mm_Drill2.5mm","TestPoint/TestPoint_Loop_D3.80mm_Drill2.8mm","TestPoint/TestPoint_Pad_1.0x1.0mm","TestPoint/TestPoint_Pad_1.5x1.5mm","TestPoint/TestPoint_Pad_2.0x2.0mm","TestPoint/TestPoint_Pad_2.5x2.5mm","TestPoint/TestPoint_Pad_3.0x3.0mm","TestPoint/TestPoint_Pad_4.0x4.0mm","TestPoint/TestPoint_Pad_D1.0mm","TestPoint/TestPoint_Pad_D1.5mm","TestPoint/TestPoint_Pad_D2.0mm","TestPoint/TestPoint_Pad_D2.5mm","TestPoint/TestPoint_Pad_D3.0mm","TestPoint/TestPoint_Pad_D4.0mm","TestPoint/TestPoint_Plated_Hole_D2.0mm","TestPoint/TestPoint_Plated_Hole_D3.0mm","TestPoint/TestPoint_Plated_Hole_D4.0mm","TestPoint/TestPoint_Plated_Hole_D5.0mm","TestPoint/TestPoint_THTPad_1.0x1.0mm_Drill0.5mm","TestPoint/TestPoint_THTPad_1.5x1.5mm_Drill0.7mm","TestPoint/TestPoint_THTPad_2.0x2.0mm_Drill1.0mm","TestPoint/TestPoint_THTPad_2.5x2.5mm_Drill1.2mm","TestPoint/TestPoint_THTPad_3.0x3.0mm_Drill1.5mm","TestPoint/TestPoint_THTPad_4.0x4.0mm_Drill2.0mm","TestPoint/TestPoint_THTPad_D1.0mm_Drill0.5mm","TestPoint/TestPoint_THTPad_D1.5mm_Drill0.7mm","TestPoint/TestPoint_THTPad_D2.0mm_Drill1.0mm","TestPoint/TestPoint_THTPad_D2.5mm_Drill1.2mm","TestPoint/TestPoint_THTPad_D3.0mm_Drill1.5mm","TestPoint/TestPoint_THTPad_D4.0mm_Drill2.0mm","Transformer_SMD/Pulse_P0926NL","Transformer_SMD/Pulse_PA1323NL","Transformer_SMD/Pulse_PA2001NL","Transformer_SMD/Pulse_PA2002NL-PA2008NL-PA2009NL","Transformer_SMD/Pulse_PA2004NL","Transformer_SMD/Pulse_PA2005NL","Transformer_SMD/Pulse_PA2006NL","Transformer_SMD/Pulse_PA2007NL","Transformer_SMD/Pulse_PA2777NL","Transformer_SMD/Pulse_PA3493NL","Transformer_SMD/Transformer_Coilcraft_CST1","Transformer_SMD/Transformer_Coilcraft_CST2","Transformer_SMD/Transformer_Coilcraft_CST2010","Transformer_SMD/Transformer_CurrentSense_8.4x7.2mm","Transformer_SMD/Transformer_ED8_4-Lead_10.5x8mm_P5mm","Transformer_SMD/Transformer_Ethernet_Bel_S558-5999-T7-F","Transformer_SMD/Transformer_Ethernet_Bourns_PT61017PEL","Transformer_SMD/Transformer_Ethernet_Bourns_PT61020EL","Transformer_SMD/Transformer_Ethernet_Bourns_SM13126PEL","Transformer_SMD/Transformer_Ethernet_CNDtek_H1102N","Transformer_SMD/Transformer_Ethernet_HALO_TG111-MSC13","Transformer_SMD/Transformer_Ethernet_Halo_N2_SO-16_7.11x12.7mm","Transformer_SMD/Transformer_Ethernet_Halo_N5_SO-16_7.11x12.7mm","Transformer_SMD/Transformer_Ethernet_Halo_N6_SO-16_7.11x14.73mm","Transformer_SMD/Transformer_Ethernet_Wuerth_749013011A","Transformer_SMD/Transformer_Ethernet_YDS_30F-51NL_SO-24_7.1x15.1mm","Transformer_SMD/Transformer_MACOM_SM-22","Transformer_SMD/Transformer_MiniCircuits_AT224-1A","Transformer_SMD/Transformer_Murata_78250JC","Transformer_SMD/Transformer_NF_ETAL_P2781","Transformer_SMD/Transformer_NF_ETAL_P2781_HandSoldering","Transformer_SMD/Transformer_NF_ETAL_P3000","Transformer_SMD/Transformer_NF_ETAL_P3000_HandSoldering","Transformer_SMD/Transformer_NF_ETAL_P3181","Transformer_SMD/Transformer_NF_ETAL_P3181_HandSoldering","Transformer_SMD/Transformer_NF_ETAL_P3188","Transformer_SMD/Transformer_NF_ETAL_P3188_HandSoldering","Transformer_SMD/Transformer_NF_ETAL_P3191","Transformer_SMD/Transformer_NF_ETAL_P3191_HandSoldering","Transformer_SMD/Transformer_Pulse_H1100NL","Transformer_SMD/Transformer_Wuerth_750315371","Transformer_SMD/Transformer_Wurth_WE-AGDT-EP7","Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D10.5mm_Amidon-T37","Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D12.5mm_Amidon-T44","Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D14.0mm_Amidon-T50","Transformer_THT/Autotransformer_Toroid_1Tap_Horizontal_D9.0mm_Amidon-T30","Transformer_THT/Autotransformer_ZS1052-AC","Transformer_THT/Transformer_37x44","Transformer_THT/Transformer_Breve_TEZ-22x24","Transformer_THT/Transformer_Breve_TEZ-28x33","Transformer_THT/Transformer_Breve_TEZ-35x42","Transformer_THT/Transformer_Breve_TEZ-38x45","Transformer_THT/Transformer_Breve_TEZ-44x52","Transformer_THT/Transformer_Breve_TEZ-47x57","Transformer_THT/Transformer_CHK_EI30-2VA_1xSec","Transformer_THT/Transformer_CHK_EI30-2VA_2xSec","Transformer_THT/Transformer_CHK_EI30-2VA_Neutral","Transformer_THT/Transformer_CHK_EI38-3VA_1xSec","Transformer_THT/Transformer_CHK_EI38-3VA_2xSec","Transformer_THT/Transformer_CHK_EI38-3VA_Neutral","Transformer_THT/Transformer_CHK_EI42-5VA_1xSec","Transformer_THT/Transformer_CHK_EI42-5VA_2xSec","Transformer_THT/Transformer_CHK_EI42-5VA_Neutral","Transformer_THT/Transformer_CHK_EI48-10VA_1xSec","Transformer_THT/Transformer_CHK_EI48-10VA_2xSec","Transformer_THT/Transformer_CHK_EI48-10VA_Neutral","Transformer_THT/Transformer_CHK_EI48-8VA_1xSec","Transformer_THT/Transformer_CHK_EI48-8VA_2xSec","Transformer_THT/Transformer_CHK_EI48-8VA_Neutral","Transformer_THT/Transformer_CHK_EI54-12VA_1xSec","Transformer_THT/Transformer_CHK_EI54-12VA_2xSec","Transformer_THT/Transformer_CHK_EI54-12VA_Neutral","Transformer_THT/Transformer_CHK_EI54-16VA_1xSec","Transformer_THT/Transformer_CHK_EI54-16VA_2xSec","Transformer_THT/Transformer_CHK_EI54-16VA_Neutral","Transformer_THT/Transformer_CHK_UI30-4VA_Flat","Transformer_THT/Transformer_CHK_UI39-10VA_Flat","Transformer_THT/Transformer_Coilcraft_Q4434-B_Rhombus-T1311","Transformer_THT/Transformer_EPCOS_B66359A1013T_Horizontal","Transformer_THT/Transformer_EPCOS_B66359J1014T_Vertical","Transformer_THT/Transformer_Microphone_Lundahl_LL1538","Transformer_THT/Transformer_Microphone_Lundahl_LL1587","Transformer_THT/Transformer_Myrra_74040_Horizontal","Transformer_THT/Transformer_Myrra_EF20_7408x","Transformer_THT/Transformer_Myrra_EI30-5_44000_Horizontal","Transformer_THT/Transformer_NF_ETAL_1-1_P1200","Transformer_THT/Transformer_NF_ETAL_P1165","Transformer_THT/Transformer_NF_ETAL_P3324","Transformer_THT/Transformer_NF_ETAL_P3356","Transformer_THT/Transformer_Toroid_Horizontal_D10.5mm_Amidon-T37","Transformer_THT/Transformer_Toroid_Horizontal_D12.5mm_Amidon-T44","Transformer_THT/Transformer_Toroid_Horizontal_D14.0mm_Amidon-T50","Transformer_THT/Transformer_Toroid_Horizontal_D18.0mm","Transformer_THT/Transformer_Toroid_Horizontal_D9.0mm_Amidon-T30","Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D10.5mm_Amidon-T37","Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D12.5mm_Amidon-T44","Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D14.0mm_Amidon-T50","Transformer_THT/Transformer_Toroid_Tapped_Horizontal_D9.0mm_Amidon-T30","Transformer_THT/Transformer_Triad_VPP16-310","Transformer_THT/Transformer_Wuerth_750343373","Transformer_THT/Transformer_Wuerth_760871131","Transformer_THT/Transformer_Zeming_ZMCT103C","Transformer_THT/Transformer_Zeming_ZMPT101K","Transistor_Power/GaN_Systems_GaNPX-3_5x6.6mm_Drain2.93x0.6mm","Transistor_Power/GaN_Systems_GaNPX-3_5x6.6mm_Drain3.76x0.6mm","Transistor_Power/GaN_Systems_GaNPX-4_7x8.4mm","Transistor_Power_Module/Infineon_AG-ECONO2","Transistor_Power_Module/Infineon_AG-ECONO3","Transistor_Power_Module/Infineon_AG-ECONO3B","Transistor_Power_Module/Infineon_EasyPACK-1B","Transistor_Power_Module/Infineon_EasyPACK-1B_PressFIT","Transistor_Power_Module/Infineon_EasyPIM-1B","Transistor_Power_Module/Infineon_EasyPIM-2B","Transistor_Power_Module/Littelfuse_Package_H_XBN2MM","Transistor_Power_Module/Littelfuse_Package_H_XN2MM","Transistor_Power_Module/Littelfuse_Package_W_XBN2MM","Transistor_Power_Module/Littelfuse_Package_W_XN2MM","Transistor_Power_Module/ST_ACEPACK-2-CIB","Transistor_Power_Module/ST_ACEPACK-2-CIB_PressFIT","Transistor_Power_Module/ST_SDIP-25L","Valve/Valve_ECC-83-1","Valve/Valve_ECC-83-2","Valve/Valve_EURO","Valve/Valve_Glimm","Valve/Valve_Mini_G","Valve/Valve_Mini_P","Valve/Valve_Mini_Pentode_Linear","Valve/Valve_Noval_G","Valve/Valve_Noval_P","Valve/Valve_Octal","Varistor/RV_Disc_D12mm_W3.9mm_P7.5mm","Varistor/RV_Disc_D12mm_W4.2mm_P7.5mm","Varistor/RV_Disc_D12mm_W4.3mm_P7.5mm","Varistor/RV_Disc_D12mm_W4.4mm_P7.5mm","Varistor/RV_Disc_D12mm_W4.5mm_P7.5mm","Varistor/RV_Disc_D12mm_W4.6mm_P7.5mm","Varistor/RV_Disc_D12mm_W4.7mm_P7.5mm","Varistor/RV_Disc_D12mm_W4.8mm_P7.5mm","Varistor/RV_Disc_D12mm_W4mm_P7.5mm","Varistor/RV_Disc_D12mm_W5.1mm_P7.5mm","Varistor/RV_Disc_D12mm_W5.4mm_P7.5mm","Varistor/RV_Disc_D12mm_W5.8mm_P7.5mm","Varistor/RV_Disc_D12mm_W5mm_P7.5mm","Varistor/RV_Disc_D12mm_W6.1mm_P7.5mm","Varistor/RV_Disc_D12mm_W6.2mm_P7.5mm","Varistor/RV_Disc_D12mm_W6.3mm_P7.5mm","Varistor/RV_Disc_D12mm_W6.7mm_P7.5mm","Varistor/RV_Disc_D12mm_W7.1mm_P7.5mm","Varistor/RV_Disc_D12mm_W7.5mm_P7.5mm","Varistor/RV_Disc_D12mm_W7.9mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W11mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W3.9mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.2mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.3mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.4mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.5mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.6mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.7mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.8mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4.9mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W4mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W5.2mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W5.4mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W5.9mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W5mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W6.1mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W6.3mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W6.4mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W6.8mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W7.2mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W7.5mm_P7.5mm","Varistor/RV_Disc_D15.5mm_W8mm_P7.5mm","Varistor/RV_Disc_D16.5mm_W6.7mm_P7.5mm","Varistor/RV_Disc_D21.5mm_W11.4mm_P10mm","Varistor/RV_Disc_D21.5mm_W4.3mm_P10mm","Varistor/RV_Disc_D21.5mm_W4.4mm_P10mm","Varistor/RV_Disc_D21.5mm_W4.5mm_P10mm","Varistor/RV_Disc_D21.5mm_W4.6mm_P10mm","Varistor/RV_Disc_D21.5mm_W4.7mm_P10mm","Varistor/RV_Disc_D21.5mm_W4.8mm_P10mm","Varistor/RV_Disc_D21.5mm_W4.9mm_P10mm","Varistor/RV_Disc_D21.5mm_W5.1mm_P10mm","Varistor/RV_Disc_D21.5mm_W5.3mm_P10mm","Varistor/RV_Disc_D21.5mm_W5.4mm_P10mm","Varistor/RV_Disc_D21.5mm_W5.6mm_P10mm","Varistor/RV_Disc_D21.5mm_W5.8mm_P10mm","Varistor/RV_Disc_D21.5mm_W5mm_P10mm","Varistor/RV_Disc_D21.5mm_W6.1mm_P7.5mm","Varistor/RV_Disc_D21.5mm_W6.3mm_P10mm","Varistor/RV_Disc_D21.5mm_W6.5mm_P10mm","Varistor/RV_Disc_D21.5mm_W6.7mm_P10mm","Varistor/RV_Disc_D21.5mm_W6.8mm_P10mm","Varistor/RV_Disc_D21.5mm_W7.1mm_P10mm","Varistor/RV_Disc_D21.5mm_W7.5mm_P10mm","Varistor/RV_Disc_D21.5mm_W7.9mm_P10mm","Varistor/RV_Disc_D21.5mm_W8.4mm_P10mm","Varistor/RV_Disc_D7mm_W3.4mm_P5mm","Varistor/RV_Disc_D7mm_W3.5mm_P5mm","Varistor/RV_Disc_D7mm_W3.6mm_P5mm","Varistor/RV_Disc_D7mm_W3.7mm_P5mm","Varistor/RV_Disc_D7mm_W3.8mm_P5mm","Varistor/RV_Disc_D7mm_W3.9mm_P5mm","Varistor/RV_Disc_D7mm_W4.2mm_P5mm","Varistor/RV_Disc_D7mm_W4.3mm_P5mm","Varistor/RV_Disc_D7mm_W4.5mm_P5mm","Varistor/RV_Disc_D7mm_W4.8mm_P5mm","Varistor/RV_Disc_D7mm_W4.9mm_P5mm","Varistor/RV_Disc_D7mm_W4mm_P5mm","Varistor/RV_Disc_D7mm_W5.1mm_P5mm","Varistor/RV_Disc_D7mm_W5.4mm_P5mm","Varistor/RV_Disc_D7mm_W5.5mm_P5mm","Varistor/RV_Disc_D7mm_W5.7mm_P5mm","Varistor/RV_Disc_D9mm_W3.3mm_P5mm","Varistor/RV_Disc_D9mm_W3.4mm_P5mm","Varistor/RV_Disc_D9mm_W3.5mm_P5mm","Varistor/RV_Disc_D9mm_W3.6mm_P5mm","Varistor/RV_Disc_D9mm_W3.7mm_P5mm","Varistor/RV_Disc_D9mm_W3.8mm_P5mm","Varistor/RV_Disc_D9mm_W3.9mm_P5mm","Varistor/RV_Disc_D9mm_W4.1mm_P5mm","Varistor/RV_Disc_D9mm_W4.2mm_P5mm","Varistor/RV_Disc_D9mm_W4.4mm_P5mm","Varistor/RV_Disc_D9mm_W4.5mm_P5mm","Varistor/RV_Disc_D9mm_W4.8mm_P5mm","Varistor/RV_Disc_D9mm_W4mm_P5mm","Varistor/RV_Disc_D9mm_W5.2mm_P5mm","Varistor/RV_Disc_D9mm_W5.4mm_P5mm","Varistor/RV_Disc_D9mm_W5.5mm_P5mm","Varistor/RV_Disc_D9mm_W5.7mm_P5mm","Varistor/RV_Disc_D9mm_W6.1mm_P5mm","Varistor/RV_Rect_V25S440P_L26.5mm_W8.2mm_P12.7mm","Varistor/Varistor_Panasonic_VF"];Object.fromEntries(Wvn.map(t=>[t,`kicad:${t}`]));var MQ=Kn(["vertical","horizontal","pos_top","pos_bottom","pos_left","pos_right","neg_top","neg_bottom","neg_left","neg_right"]).describe("horizontal means pins go 1->2 rightward and vertical means pins go 1->2 downward (generally, positive on top)"),jvn=Pt({pins:dn(xo([_t(),Z()])),direction:xo([$e("top-to-bottom"),$e("left-to-right"),$e("bottom-to-top"),$e("right-to-left")])}),$vn=dn(xo([_t(),Z()])),toe=t=>xo([jvn,$vn]).transform(e=>Array.isArray(e)?{pins:e,direction:t}:e),noe=Pt({leftSize:_t().optional().describe("@deprecated, use leftPinCount"),topSize:_t().optional().describe("@deprecated, use topPinCount"),rightSize:_t().optional().describe("@deprecated, use rightPinCount"),bottomSize:_t().optional().describe("@deprecated, use bottomPinCount"),leftPinCount:_t().optional(),rightPinCount:_t().optional(),topPinCount:_t().optional(),bottomPinCount:_t().optional(),leftSide:toe("top-to-bottom").optional(),rightSide:toe("top-to-bottom").optional(),topSide:toe("left-to-right").optional(),bottomSide:toe("left-to-right").optional()}),ooe=noe,QV=Qc(Pt({marginLeft:lt.optional(),marginRight:lt.optional(),marginTop:lt.optional(),marginBottom:lt.optional(),leftMargin:lt.optional(),rightMargin:lt.optional(),topMargin:lt.optional(),bottomMargin:lt.optional()})),zm=Z().regex(/^[A-Za-z0-9_]+$/),Xct=lt.or(Kn(["xs","sm","default","md"])).describe("distance between pin1 and pin2 of the schematic symbol"),qvn=Kn(["input","output","bidirectional","tri_state","passive","free","unspecified","power_in","power_out","open_collector","open_emitter","no_connect"]),Xvn=Kn(["line","inverted","clock","inverted_clock","input_low","clock_low","output_low","falling_edge_clock","nonlogic"]),Zvn=Pt({electricalType:qvn.optional(),graphicStyle:Xvn.optional(),pinLength:Po.optional(),nameTextSize:Po.optional(),numberTextSize:Po.optional()}),ewn=P0(t=>typeof t=="function"),H9=Kn(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),vV=Pt({edit_event_id:Z(),in_progress:je().optional(),created_at:_t()}),twn=vV.extend({pcb_edit_event_type:$e("edit_component_location").describe("deprecated"),edit_event_type:$e("edit_pcb_component_location"),pcb_component_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})}),nwn=vV.extend({pcb_edit_event_type:$e("edit_trace_hint").describe("deprecated"),edit_event_type:$e("edit_pcb_trace_hint").optional(),pcb_port_id:Z(),pcb_trace_hint_id:Z().optional(),route:dn(Pt({x:_t(),y:_t(),via:je().optional()}))}),own=vV.extend({edit_event_type:$e("edit_schematic_component_location"),schematic_component_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})});vV.extend({edit_event_type:$e("edit_pcb_group_location"),pcb_group_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})}),vV.extend({edit_event_type:$e("edit_schematic_group_location"),schematic_group_id:Z(),original_center:Pt({x:_t(),y:_t()}),new_center:Pt({x:_t(),y:_t()})}),xo([twn,nwn,own]);var iwn=Pt({selector:Z(),relative_to:Z().optional().default("group_center").describe("Can be a selector or 'group_center'"),center:ki}),rwn=Pt({pcb_port_selector:Z(),offsets:dn(N9)}),swn=Pt({selector:Z(),relative_to:Z().optional().default("group_center").describe("Can be a selector or 'group_center'"),center:ki}),awn=Pt({pcb_placements:dn(iwn).optional(),manual_trace_hints:dn(rwn).optional(),schematic_placements:dn(swn).optional()}),cD=Z().or(dn(Z()).readonly()).or(dn(Z())),G3=t=>Qc(Kn(t),cD),wV=Pt({layoutMode:Kn(["grid","flex","match-adapt","relative","none"]).optional(),position:Kn(["absolute","relative"]).optional(),grid:je().optional(),gridCols:_t().or(Z()).optional(),gridRows:_t().or(Z()).optional(),gridTemplateRows:Z().optional(),gridTemplateColumns:Z().optional(),gridTemplate:Z().optional(),gridGap:_t().or(Z()).optional(),gridRowGap:_t().or(Z()).optional(),gridColumnGap:_t().or(Z()).optional(),flex:je().or(Z()).optional(),flexDirection:Kn(["row","column"]).optional(),alignItems:Kn(["start","center","end","stretch"]).optional(),justifyContent:Kn(["start","center","end","stretch","space-between","space-around","space-evenly"]).optional(),flexRow:je().optional(),flexColumn:je().optional(),gap:_t().or(Z()).optional(),pack:je().optional().describe("Pack the contents of this group using a packing strategy"),packOrderStrategy:Kn(["largest_to_smallest","first_to_last","highest_to_lowest_pin_count"]).optional(),packPlacementStrategy:Kn(["shortest_connection_along_outline"]).optional(),padding:ce.optional(),paddingLeft:ce.optional(),paddingRight:ce.optional(),paddingTop:ce.optional(),paddingBottom:ce.optional(),paddingX:ce.optional(),paddingY:ce.optional(),width:ce.optional(),height:ce.optional(),matchAdapt:je().optional(),matchAdaptTemplate:rd().optional()}),Zct=Pt({strokeWidth:ce.optional(),dashed:je().optional(),solid:je().optional()}),Awn=P0(t=>typeof t=="string"),elt=Pt({minTraceWidth:ce.optional(),minViaHoleEdgeToViaHoleEdgeClearance:ce.optional(),minViaEdgeToPadEdgeClearance:ce.optional(),minPlatedHoleDrillEdgeToDrillEdgeClearance:ce.optional(),minTraceToPadEdgeClearance:ce.optional(),minPadEdgeToPadEdgeClearance:ce.optional(),minBoardEdgeClearance:ce.optional(),minViaHoleDiameter:ce.optional(),minViaPadDiameter:ce.optional()}),cwn=Pt({serverUrl:G_.optional(),inputFormat:Kn(["simplified","circuit-json"]).optional(),serverMode:Kn(["job","solve-endpoint"]).optional(),serverCacheEnabled:je().optional(),cache:P0(t=>!0).optional(),traceClearance:ce.optional(),availableJumperTypes:dn(Kn(["1206x4","0603"])).optional(),allowViaInPad:je().optional().describe("Allows the autorouter to place vias inside connected pads. Omitted or false keeps via-in-pad routing disabled."),groupMode:Kn(["sequential_trace","subcircuit","sequential-trace"]).optional(),algorithmFn:P0(t=>typeof t=="function"||t===void 0).optional(),implicitBreakoutPointSolverFn:P0(t=>typeof t=="function"||t===void 0).optional(),preset:Kn(["sequential_trace","subcircuit","default","auto","auto_local","auto_cloud","auto_jumper","tscircuit_beta","krt","freerouting","simplify","laser_prefab","single_layer_fanout","fanout","auto-jumper","sequential-trace","auto-local","auto-cloud"]).optional(),local:je().optional()}),lwn=xo([$e("sequential_trace"),$e("subcircuit"),$e("default"),$e("auto"),$e("auto_local"),$e("auto_cloud"),$e("auto_jumper"),$e("tscircuit_beta"),$e("krt"),$e("freerouting"),$e("simplify"),$e("laser_prefab"),$e("single_layer_fanout"),$e("fanout"),$e("auto-jumper"),$e("sequential-trace"),$e("auto-local"),$e("auto-cloud")]),uwn=Z(),ioe=xo([cwn,lwn,uwn]),gwn=Kn(["1x","2x","5x","10x","100x"]),dwn=Kn(["beta_pipeline1","beta_pipeline3","beta_pipeline4","beta_pipeline5","beta_pipeline7","beta_pipeline9","latest"]),hwn=P0(t=>typeof t=="string").transform(t=>{const e=dwn.safeParse(t);return e.success?e.data:(console.warn(`Unknown autorouterVersion "${t}", falling back to "latest".`),"latest")}),Kxe=eoe.extend({name:Z().optional(),children:rd().optional(),schTitle:Z().optional(),schSheetName:Z().optional().describe('This group will be drawn as part of this sheet e.g. "Main"'),key:rd().optional(),showAsSchematicBox:je().optional(),connections:Qc(Z(),cD.optional()).optional(),schPinArrangement:ooe.optional(),schPinSpacing:ce.optional(),schPinStyle:QV.optional(),...wV.shape,grid:wV.shape.grid.describe("@deprecated use pcbGrid"),flex:wV.shape.flex.describe("@deprecated use pcbFlex"),pcbGrid:je().optional(),pcbGridCols:_t().or(Z()).optional(),pcbGridRows:_t().or(Z()).optional(),pcbGridTemplateRows:Z().optional(),pcbGridTemplateColumns:Z().optional(),pcbGridTemplate:Z().optional(),pcbGridGap:_t().or(Z()).optional(),pcbGridRowGap:_t().or(Z()).optional(),pcbGridColumnGap:_t().or(Z()).optional(),pcbFlex:je().or(Z()).optional(),pcbFlexGap:_t().or(Z()).optional(),pcbFlexDirection:Kn(["row","column"]).optional(),pcbAlignItems:Kn(["start","center","end","stretch"]).optional(),pcbJustifyContent:Kn(["start","center","end","stretch","space-between","space-around","space-evenly"]).optional(),pcbFlexRow:je().optional(),pcbFlexColumn:je().optional(),pcbGap:_t().or(Z()).optional(),pcbPack:je().optional(),pcbPackGap:_t().or(Z()).optional(),schGrid:je().optional(),schGridCols:_t().or(Z()).optional(),schGridRows:_t().or(Z()).optional(),schGridTemplateRows:Z().optional(),schGridTemplateColumns:Z().optional(),schGridTemplate:Z().optional(),schGridGap:_t().or(Z()).optional(),schGridRowGap:_t().or(Z()).optional(),schGridColumnGap:_t().or(Z()).optional(),schFlex:je().or(Z()).optional(),schFlexGap:_t().or(Z()).optional(),schFlexDirection:Kn(["row","column"]).optional(),schAlignItems:Kn(["start","center","end","stretch"]).optional(),schJustifyContent:Kn(["start","center","end","stretch","space-between","space-around","space-evenly"]).optional(),schFlexRow:je().optional(),schFlexColumn:je().optional(),schGap:_t().or(Z()).optional(),schPack:je().optional(),schMatchAdapt:je().optional(),pcbWidth:ce.optional(),pcbHeight:ce.optional(),minTraceWidth:ce.optional(),nominalTraceWidth:ce.optional(),schWidth:ce.optional(),schHeight:ce.optional(),pcbLayout:wV.optional(),schLayout:wV.optional(),cellBorder:Zct.nullable().optional(),border:Zct.nullable().optional(),schPadding:ce.optional(),schPaddingLeft:ce.optional(),schPaddingRight:ce.optional(),schPaddingTop:ce.optional(),schPaddingBottom:ce.optional(),pcbPadding:ce.optional(),pcbPaddingLeft:ce.optional(),pcbPaddingRight:ce.optional(),pcbPaddingTop:ce.optional(),pcbPaddingBottom:ce.optional(),pcbAnchorAlignment:Awn.optional()}),tlt=P0(t=>"findPart"in t),roe=Kxe.extend({manualEdits:awn.optional(),schAutoLayoutEnabled:je().optional(),schTraceAutoLabelEnabled:je().optional(),schMaxTraceDistance:lt.optional(),routingDisabled:je().optional(),placementDrcChecksDisabled:je().optional(),bomDisabled:je().optional(),defaultTraceWidth:ce.optional(),...elt.shape,nominalTraceWidth:ce.optional(),partsEngine:tlt.optional(),_subcircuitCachingEnabled:je().optional(),pcbRouteCache:P0(t=>!0).optional(),autorouter:ioe.optional(),autorouterEffortLevel:gwn.optional(),autorouterVersion:hwn.optional(),square:je().optional(),emptyArea:Z().optional(),filledArea:Z().optional(),width:lt.optional(),height:lt.optional(),outline:dn(By).optional(),outlineOffsetX:lt.optional(),outlineOffsetY:lt.optional(),circuitJson:dn(rd()).optional(),exposedNets:dn(Z()).optional(),exposeNets:je().optional()}),pwn=roe.extend({subcircuit:$e(!0)}),mwn=Iy("subcircuit",[Kxe.extend({subcircuit:$e(!1).optional()}),pwn]),qk=P0(t=>typeof t=="string"),_wn=Pt({...By.shape,isCastellatedHole:je().optional(),holeDiameter:Po.optional(),padDiameter:Po.optional(),connectsTo:Z().or(dn(Z())).optional()}).superRefine((t,e)=>{if(t.isCastellatedHole){t.holeDiameter===void 0&&e.addIssue({code:lo.custom,path:["holeDiameter"],message:"holeDiameter is required for a castellated hole"}),t.padDiameter===void 0&&e.addIssue({code:lo.custom,path:["padDiameter"],message:"padDiameter is required for a castellated hole"});return}(t.holeDiameter!==void 0||t.padDiameter!==void 0||t.connectsTo!==void 0)&&e.addIssue({code:lo.custom,path:["isCastellatedHole"],message:"isCastellatedHole must be true when castellated hole props are provided"})}),nlt=roe.omit({connections:!0}).extend({fabricatorPreset:Kn(["jlcpcb_economy","jlcpcb_standard","jlcpcb_economy_20260912","jlcpcb_standard_20260912"]).optional().describe("Fabricator preset, preserved as supplied. Omitted leaves the preset unset."),material:Kn(["fr4","fr1","flex"]).default("fr4"),layers:xo([$e(1),$e(2),$e(4),$e(6),$e(8),$e(10)]).default(2),allowBlindAndBuriedVias:je().default(!1).describe("Whether the autorouter may generate blind and buried vias. Defaults to false, which restricts newly generated vias to the full board stack."),defaultViaTenting:xo([je(),Kn(["both_sides","top_and_bottom_tented","top_tented","bottom_tented","exposed"])]).transform(t=>t===!0||t==="both_sides"?"top_and_bottom_tented":t===!1?"exposed":t).optional(),borderRadius:Po.optional(),thickness:Po.optional(),boardAnchorPosition:By.optional(),anchorAlignment:H9.optional(),boardAnchorAlignment:H9.optional().describe("Prefer using anchorAlignment when possible"),outline:dn(_wn).optional(),title:Z().optional(),solderMaskColor:qk.optional(),topSolderMaskColor:qk.optional(),bottomSolderMaskColor:qk.optional(),silkscreenColor:qk.optional(),topSilkscreenColor:qk.optional(),bottomSilkscreenColor:qk.optional(),doubleSidedAssembly:je().optional().default(!1),isViaInPadAllowed:je().optional().describe("Allows intentional via-in-pad designs to pass DRC. Omitted or false keeps via-in-pad disallowed."),automaticPoursEnabled:je().default(!1).describe("Whether implicit copper pours should be generated automatically. Defaults to false."),enableViaStitching:je().default(!1).describe("Whether to stitch copper pours on the same net across layers with vias. Defaults to false."),viaStitchPitch:Po.pipe(_t().positive().finite()).optional().describe("Positive center-to-center stitching via spacing in millimeters or a unit string, parsed to millimeters. Omitted uses the solver default. Does not enable stitching by itself."),schematicDisabled:je().optional()}),olt=Kxe.omit({width:!0,height:!0,layoutMode:!0,children:!0}).extend({width:Po.optional(),height:Po.optional(),children:rd().optional(),anchorAlignment:H9.optional(),noSolderMask:je().optional(),panelizationMethod:Kn(["tab-routing","outline_routing","none"]).optional(),boardGap:Po.optional(),layoutMode:Kn(["grid","pack","none"]).optional(),row:_t().optional(),col:_t().optional(),cellWidth:Po.optional(),cellHeight:Po.optional(),tabWidth:Po.optional(),tabLength:Po.optional(),mouseBites:je().optional(),edgePadding:Po.optional(),edgePaddingLeft:Po.optional(),edgePaddingRight:Po.optional(),edgePaddingTop:Po.optional(),edgePaddingBottom:Po.optional(),_subcircuitCachingEnabled:je().optional()}),fwn=olt,soe=Po.refine(Number.isFinite,"Coordinate must be finite"),Vxe=Po.refine(t=>Number.isFinite(t)&&t>0,"Distance must be positive and finite"),Iwn=Iy("route_type",[Pt({route_type:$e("wire"),x:soe,y:soe,width:Vxe,layer:Pr}),Pt({route_type:$e("via"),x:soe,y:soe,from_layer:Pr,to_layer:Pr,via_diameter:Vxe.optional(),via_hole_diameter:Vxe.optional()})]),ilt=Pt({connection:Z().min(1),route:dn(Iwn).min(2).superRefine((t,e)=>{const n=t[0];let o=n?.route_type==="via"?n.from_layer:n?.layer;for(const i of t)(i.route_type==="wire"?i.layer:i.from_layer)!==o&&e.addIssue({code:"custom",message:"A fanout trace path must use vias for layer changes"}),i.route_type==="via"&&(o=i.to_layer)})}),PV=Po.refine(t=>t>=0,{message:"Fanout boundary padding cannot be negative"}),Cwn=xo([PV,Pt({top:PV.optional(),right:PV.optional(),bottom:PV.optional(),left:PV.optional()})]),rlt=["topside_left","topside_center","topside_right","rightside_top","rightside_center","rightside_bottom","bottomside_right","bottomside_center","bottomside_left","leftside_bottom","leftside_center","leftside_top","center"],slt=Kn(rlt),ywn=xo([H9,slt,Pt({direction:xo([H9,slt])})]),alt=Pt({busFanoutDirections:Qc(ywn).optional(),fanoutBoundaryPadding:Cwn.optional(),fanoutRoutingLayers:dn(Pr).min(1).optional(),fanoutPourNetMap:Qc(Pr,xo([Z(),dn(Z()).min(1)])).optional()}),xwn=Po.refine(t=>t>=0,{message:"Fanout margin cannot be negative"}),Ewn=roe.extend({autorouter:ioe.default("fanout"),pcbTracePaths:dn(ilt).optional(),padding:Po.optional(),paddingLeft:Po.optional(),paddingRight:Po.optional(),paddingTop:Po.optional(),paddingBottom:Po.optional(),fanoutMargin:xwn.optional(),...alt.shape}),Bwn=Z().or(dn(Z()).readonly()).or(dn(Z())),Alt=dn(zm).readonly().or(dn(zm)),bwn=P0().pipe(Qc(Z(),Bwn)),Swn=P0(t=>!!t&&typeof t=="object"&&"type"in t&&"props"in t),Qwn=P0(t=>ee.isValidElement(t)&&t.type==="internalcircuit"),zxe=Qc(zm,zm.or(dn(zm).readonly()).or(dn(zm))),vwn=Pt({manufacturerPartNumber:Z().optional(),supplierPartNumber:Qc(qM,dn(Z())).optional()}),Y3=vg.extend({manufacturerPartNumber:Z().optional(),pinLabels:zxe.optional(),showPinAliases:je().optional(),pcbPinLabels:Qc(Z(),Z()).optional(),internallyConnectedPins:dn(dn(xo([Z(),_t()]))).optional(),externallyConnectedPins:dn(dn(Z())).optional(),schPinArrangement:noe.optional(),schPortArrangement:noe.optional(),pinCompatibleVariants:dn(vwn).optional(),schPinStyle:QV.optional(),schPinSpacing:lt.optional(),schWidth:lt.optional(),schHeight:lt.optional(),noSchematicRepresentation:je().optional(),schShowInternalCircuit:je().optional().default(!1),noConnect:Alt.optional(),connections:bwn.optional(),spiceModel:Swn.optional(),internalCircuit:Qwn.optional()}),wwn=Y3,clt=vg.extend({manufacturerPartNumber:Z().optional(),pinLabels:Qc(_t().or(zm),zm.or(dn(zm))).optional(),schPinStyle:QV.optional(),schPinSpacing:lt.optional(),schWidth:lt.optional(),schHeight:lt.optional(),schDirection:Kn(["left","right"]).optional(),schPinArrangement:ooe.optional(),schPortArrangement:noe.optional(),pcbPinLabels:Qc(Z(),Z()).optional(),pinCount:xo([$e(2),$e(3)]).optional(),internallyConnectedPins:dn(dn(xo([Z(),_t()]))).optional(),connections:P0().pipe(Qc(Z(),cD)).optional()}),Pwn=clt.extend({bridgedPins:dn(dn(Z())).optional(),bridged:je().optional()}),Mwn=Kn(["usb_c","m2","jst_sh","jst_gh","jst_zh","jst_ph","jst_xh","jst_vh"]),Dwn=Y3.extend({standard:Mwn.optional(),pinCount:_t().int().positive().optional()}),Nwn=vg.extend({standard:Kn(["TSC0001_36P_XALT_2025_11","0805","0603","1206"]).optional(),pinLabels:Qc(_t().or(zm),zm.or(dn(zm))).optional(),internallyConnectedPins:dn(dn(xo([Z(),_t()]))).optional()}),Rwn=vg.extend({currentRating:xo([_t(),Z()]),voltageRating:xo([_t(),Z()]).optional(),schShowRatings:je().optional(),schOrientation:MQ.optional(),connections:Qc(Z(),xo([Z(),dn(Z()).readonly(),dn(Z())])).optional()}),Twn="0.04in",kwn="0.1in",Fwn=t=>{if(!t||typeof t!="object")return t;const e={...t};return e.shape!==void 0?e:e.padOutline!==void 0?(e.shape="hole_with_polygon_pad",e):e.rectPadWidth!==void 0||e.rectPadHeight!==void 0?e.holeDiameter!==void 0?(e.shape="circular_hole_with_rect_pad",e):(e.shape="pill_hole_with_rect_pad",e):e.outerDiameter!==void 0||e.holeDiameter!==void 0||e.padDiameter!==void 0?(e.shape="circle",e):e.outerWidth!==void 0||e.outerHeight!==void 0?(e.shape=e.rectPad===!0?"pill":"oval",e):(e.shape="circle",e.holeDiameter=Twn,e.outerDiameter=kwn,e)},aoe=P0().transform(t=>{if(t!==void 0)return lt.parse(t)}),Lwn=Iy("shape",[qa.omit({pcbRotation:!0,layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e("circle"),holeDiameter:lt,outerDiameter:lt,padDiameter:lt.optional().describe("Diameter of the copper pad"),portHints:v5.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e("oval"),outerWidth:lt,outerHeight:lt,holeWidth:aoe,holeHeight:aoe,innerWidth:lt.optional().describe("DEPRECATED use holeWidth"),innerHeight:lt.optional().describe("DEPRECATED use holeHeight"),portHints:v5.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e("pill"),rectPad:je().optional(),outerWidth:lt,outerHeight:lt,holeWidth:aoe,holeHeight:aoe,innerWidth:lt.optional().describe("DEPRECATED use holeWidth"),innerHeight:lt.optional().describe("DEPRECATED use holeHeight"),portHints:v5.optional(),holeOffsetX:lt.optional(),holeOffsetY:lt.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e("circular_hole_with_rect_pad"),holeDiameter:lt,rectPadWidth:lt,rectPadHeight:lt,rectBorderRadius:lt.optional(),holeShape:$e("circle").optional(),padShape:$e("rect").optional(),portHints:v5.optional(),holeOffsetX:lt.optional(),holeOffsetY:lt.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e("pill_hole_with_rect_pad"),holeShape:$e("pill").optional(),padShape:$e("rect").optional(),holeWidth:lt,holeHeight:lt,rectPadWidth:lt,rectPadHeight:lt,rectBorderRadius:lt.optional(),portHints:v5.optional(),holeOffsetX:lt.optional(),holeOffsetY:lt.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()}),qa.omit({pcbRotation:!0,layer:!0}).extend({name:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),shape:$e("hole_with_polygon_pad"),holeShape:Kn(["circle","oval","pill","rotated_pill"]),holeDiameter:lt.optional(),holeWidth:lt.optional(),holeHeight:lt.optional(),padOutline:dn(By),holeOffsetX:lt,holeOffsetY:lt,portHints:v5.optional(),solderMaskMargin:lt.optional(),coveredWithSolderMask:je().optional()})]).transform(t=>("innerWidth"in t&&t.innerWidth!==void 0&&(t.holeWidth??=t.innerWidth),"innerHeight"in t&&t.innerHeight!==void 0&&(t.holeHeight??=t.innerHeight),t)),Hwn=crt(Fwn,Lwn),Own=["pin1","pin2","pos","neg"],Gwn=new Set(["01005","0201","0402","0504","0603","0805","1206","1210","1812","2010","2512"]),Ywn=t=>typeof t!="string"||!Gwn.has(t)?t:`res${t}`,Uwn=Fxe.optional().transform(Ywn),Kwn=vg.extend({footprint:Uwn,resistance:S8,tolerance:xo([Z(),_t()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,"Tolerance must be non-negative").max(1,"Tolerance cannot be greater than 100%")).optional(),pullupFor:Z().optional(),pullupTo:Z().optional(),pulldownFor:Z().optional(),pulldownTo:Z().optional(),schOrientation:MQ.optional(),schSize:Xct.optional(),connections:G3(Own).optional()}),Vwn=["pin1","pin2","pin3"],zwn=vg.extend({maxResistance:S8,pinVariant:Kn(["two_pin","three_pin"]).optional(),connections:G3(Vwn).optional()}),Jwn=["pin1","left","pin2","right","pin3","pin4"],Wwn=vg.extend({frequency:Cy,loadCapacitance:$M,maxTraceLength:lt.optional(),manufacturerPartNumber:Z().optional(),mpn:Z().optional(),pinVariant:Kn(["two_pin","four_pin"]).optional(),schOrientation:MQ.optional(),connections:G3(Jwn).optional()}),jwn=vg.extend({frequency:Cy,loadCapacitance:$M,pinVariant:Kn(["no_ground","ground_pin","two_ground_pins"]).optional()});nlt.extend({leftPinCount:_t().optional(),rightPinCount:_t().optional(),topPinCount:_t().optional(),bottomPinCount:_t().optional(),leftPins:dn(Z()).optional(),rightPins:dn(Z()).optional(),topPins:dn(Z()).optional(),bottomPins:dn(Z()).optional(),pinPitch:lt.optional(),innerHoles:je().optional()});var $wn=["pin1","pin2","pos","neg","anode","cathode"],qwn=vg.extend({capacitance:$M,maxVoltageRating:O_.optional(),schShowRatings:je().optional().default(!1),polarized:je().optional().default(!1),decouplingFor:Z().optional(),decouplingTo:Z().optional(),bypassFor:Z().optional(),bypassTo:Z().optional(),maxDecouplingTraceLength:lt.optional(),schOrientation:MQ.optional(),schSize:Xct.optional(),connections:G3($wn).optional()}),Xwn=Pt({name:Z(),connectsTo:Z().or(dn(Z())).optional(),routingPhaseIndex:_t().nullable().optional(),highlightColor:Z().optional(),isPowerNet:je().optional(),isGroundNet:je().optional(),nominalTraceWidth:lt.optional()}),llt=vg.extend({soldermaskPullback:Po.optional(),padDiameter:Po});Pt({name:Z().optional(),pcbOnly:je().optional(),schOnly:je().optional()});var Zwn=Pt({pcb:$e(!0).optional(),xDist:Po,left:Z(),right:Z(),edgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional()}),ePn=Pt({pcb:$e(!0).optional(),yDist:Po,top:Z(),bottom:Z(),edgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional()}),tPn=Pt({pcb:$e(!0).optional(),sameY:$e(!0).optional(),for:dn(Z())}),nPn=Pt({pcb:$e(!0).optional(),sameX:$e(!0).optional(),for:dn(Z())}),oPn=xo([Zwn,ePn,tPn,nPn]),iPn=qa.omit({layer:!0,pcbRotation:!0}).extend({name:Z().optional(),shape:$e("rect"),width:Po,height:Po}),rPn=qa.omit({layer:!0,pcbRotation:!0}).extend({name:Z().optional(),shape:$e("circle"),radius:Po}),sPn=qa.omit({layer:!0,pcbRotation:!0}).extend({name:Z().optional(),shape:$e("polygon"),points:dn(By)}),aPn=Iy("shape",[iPn,rPn,sPn]),APn=Pt({name:Z().optional(),checkFn:ewn}),cPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e("rect"),width:Po,height:Po,rectBorderRadius:Po.optional(),cornerRadius:Po.optional(),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderMaskMarginLeft:Po.optional(),solderMaskMarginRight:Po.optional(),solderMaskMarginTop:Po.optional(),solderMaskMarginBottom:Po.optional(),solderPasteMargin:Po.optional()}),lPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e("rotated_rect"),width:Po,height:Po,ccwRotation:_t(),cornerRadius:Po.optional(),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderMaskMarginLeft:Po.optional(),solderMaskMarginRight:Po.optional(),solderMaskMarginTop:Po.optional(),solderMaskMarginBottom:Po.optional(),solderPasteMargin:Po.optional()}),uPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e("circle"),radius:Po,portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),gPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e("pill"),width:Po,height:Po,radius:Po,portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),dPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e("rotated_pill"),width:Po,height:Po,radius:Po,ccwRotation:_t(),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),hPn=qa.omit({pcbRotation:!0}).extend({name:Z().optional(),shape:$e("polygon"),points:dn(By),portHints:v5.optional(),coveredWithSolderMask:je().optional(),solderMaskMargin:Po.optional(),solderPasteMargin:Po.optional()}),pPn=Iy("shape",[uPn,cPn,lPn,gPn,dPn,hPn]),mPn=qa.omit({pcbRotation:!0}).extend({shape:$e("rect"),width:Po,height:Po}),_Pn=qa.omit({pcbRotation:!0}).extend({shape:$e("circle"),radius:Po});xo([_Pn,mPn]);var fPn=qa.extend({name:Z().optional(),shape:$e("circle").optional(),diameter:Po.optional(),radius:Po.optional(),solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}).transform(t=>({...t,diameter:t.diameter??2*t.radius,radius:t.radius??t.diameter/2})),IPn=qa.extend({name:Z().optional(),shape:$e("pill"),width:Po,height:Po,solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}),CPn=qa.extend({name:Z().optional(),shape:$e("oval"),width:Po,height:Po,solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}),yPn=qa.extend({name:Z().optional(),shape:$e("rect"),width:Po,height:Po,solderMaskMargin:Po.optional(),coveredWithSolderMask:je().optional()}),xPn=xo([fPn,IPn,CPn,yPn]),EPn=["2.4ghz_quarter_wave_monopole","2.4ghz_meandered_monopole","2.4ghz_inverted_f","2.4ghz_meandered_inverted_f","2.4ghz_folded_dipole"],BPn=Kn(EPn),bPn=["2.4ghz","5ghz","6ghz","dual_band_2.4ghz_5ghz","tri_band_2.4ghz_5ghz_6ghz"],SPn=Kn(bPn),QPn=vg.extend({antennaShape:BPn.optional(),frequencyBand:SPn.optional(),pcbPath:Uxe.optional()}),MV=xo([Z(),P0(t=>typeof t=="object"&&t!==null&&"getPortSelector"in t&&typeof t.getPortSelector=="function")]),Jxe=Pt({key:Z().optional(),name:Z().optional(),displayName:Z().optional(),thickness:lt.optional(),width:lt.optional().describe("Alias for trace thickness"),schematicRouteHints:dn(By).optional(),pcbRouteHints:dn(N9).optional(),pcbPathRelativeTo:Z().optional(),pcbPath:Uxe.optional(),pcbPaths:dn(Uxe).optional(),routingPhaseIndex:_t().nullable().optional(),pcbStraightLine:je().optional().describe("Draw a straight pcb trace between the connected points"),schDisplayLabel:Z().optional(),schStroke:Z().optional(),highlightColor:Z().optional(),maxLength:lt.optional(),maxViaCount:_t().int().nonnegative().optional().describe("Maximum number of vias allowed in the PCB trace route"),connectsTo:Z().or(dn(Z())).optional()}),vPn=xo([Jxe.extend({path:dn(MV)}),Jxe.extend({from:MV,to:MV}),Jxe.extend({start:MV,end:MV})]),wPn=Pt({name:Z().optional(),connections:dn(Z()).min(1),routingPhaseIndex:_t().nullable().optional(),maxLengthSkew:lt.pipe(_t().min(0).finite()).optional(),targetImpedance:S8.pipe(_t().positive().finite()).optional(),pcbTraceWidth:lt.pipe(_t().positive().finite()).optional(),pcbAllowedLayers:dn(Pr).min(1).optional(),preferredLayer:Pr.optional(),preferredLayers:dn(Pr).min(1).optional()}),PPn=Pt({name:Z().optional(),positiveConnection:Z(),negativeConnection:Z(),maxLengthSkew:lt.pipe(_t().min(0).finite()).optional(),targetDifferentialImpedance:S8.pipe(_t().positive().finite()).optional(),pcbTraceGap:lt.pipe(_t().positive().finite()).optional(),maxUncoupledLength:lt.pipe(_t().min(0).finite()).optional()}),ult=Kn(["from_left","from_right","from_top","from_bottom","from_above","from_below","from_x_neg","from_x_pos","from_y_pos","from_y_neg","from_z_pos","from_z_neg","from_front","from_back"]),MPn=Pt({children:rd().optional(),name:Z().optional(),originalLayer:Pr.default("top").optional(),circuitJson:dn(rd()).optional(),src:Fxe.describe("Can be a footprint or kicad string").optional(),insertionDirection:ult.optional().describe("Direction a cable or mating part is attached from, named for the side of the footprint it approaches from, in its unrotated orientation."),cutoutApertureDirection:ult.optional().describe("Direction the part's enclosure opening faces, in its unrotated orientation. Distinct from insertionDirection: a side-actuated switch is installed from above and actuated from the side. Falls back to insertionDirection when absent.")}),DPn=Pt({originalFacingDirection:Kn(["up","down","left","right"]).default("right").optional(),width:Po.optional(),height:Po.optional(),name:Z().optional()}),NPn=_t().or(Z().endsWith("mAh")).transform(t=>{if(typeof t=="string"){const e=t.replace("mAh",""),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error("Invalid capacity");return n}return t}).describe("Battery capacity in mAh"),RPn=Yxe,TPn=vg.extend({capacity:NPn.optional(),voltage:O_.optional(),standard:Kn(["AA","AAA","9V","CR2032","18650","C"]).optional(),schOrientation:MQ.optional(),connections:G3(RPn).optional()}),kPn=roe.extend({manufacturerPartNumber:Y3.shape.manufacturerPartNumber,pinLabels:Y3.shape.pinLabels,showPinAliases:Y3.shape.showPinAliases,pcbPinLabels:Y3.shape.pcbPinLabels,schPortArrangement:Y3.shape.schPortArrangement,pinCompatibleVariants:Y3.shape.pinCompatibleVariants,noSchematicRepresentation:Y3.shape.noSchematicRepresentation,internallyConnectedPins:Y3.shape.internallyConnectedPins,externallyConnectedPins:Y3.shape.externallyConnectedPins,boardToBoardDistance:Po.optional(),mountOrientation:Kn(["faceDown","faceUp"]).optional()}),FPn=Kn(["vertical","horizontal"]).describe("vertical means pins go 1->2 downward and horizontal means pins go 1->2 rightward"),LPn=vg.extend({pinCount:_t(),pitch:lt.optional(),schFacingDirection:Kn(["up","down","left","right"]).optional(),gender:Kn(["male","female","unpopulated"]).optional().default("male"),showSilkscreenPinLabels:je().optional(),pcbPinLabels:Qc(Z(),Z()).optional(),doubleRow:je().optional(),rightAngle:je().optional(),pcbOrientation:FPn.optional(),holeDiameter:lt.optional(),platedDiameter:lt.optional(),pinLabels:Qc(Z(),zm).or(dn(zm)).optional(),connections:P0().pipe(Qc(Z(),cD)).optional(),facingDirection:Kn(["left","right"]).optional(),schPinArrangement:ooe.optional(),schPinStyle:QV.optional(),schPinSpacing:lt.optional(),schWidth:lt.optional(),schHeight:lt.optional(),connectsFromAbove:je().optional(),connectsFromBelow:je().optional()}).superRefine((t,e)=>{t.connectsFromAbove&&t.connectsFromBelow&&e.addIssue({code:lo.custom,message:"connectsFromAbove and connectsFromBelow are opposites; set at most one"})}).transform(t=>{const e=t.layer??(t.connectsFromBelow?"bottom":t.connectsFromAbove?"top":void 0);return e===void 0?t:{...t,layer:e}});Pt({net:Z().optional(),connection:Z().optional(),schX:Po.optional(),schY:Po.optional(),schRotation:oA.optional(),anchorSide:Kn(["left","top","right","bottom"]).optional()});var HPn=Pt({net:Z().optional(),connection:Z().optional(),connectsTo:Z().or(dn(Z())).optional(),inline:je().optional(),schX:Po.optional(),schY:Po.optional(),schRotation:oA.optional(),anchorSide:Kn(["left","top","right","bottom"]).optional()}),OPn=Y3.extend({}),glt=P0(t=>typeof t=="string"),dlt=Pt({method:Kn(["trap","gear"]).optional(),reltol:xo([_t(),Z()]).optional(),abstol:xo([_t(),Z()]).optional(),vntol:xo([_t(),Z()]).optional()}),Aoe={name:Z().optional(),spiceEngine:glt.optional(),spiceOptions:dlt.optional(),graphIndependentAxes:je().optional(),children:P0().optional()},GPn=Pt({name:Z().optional(),simulationType:$e("spice_transient_analysis").default("spice_transient_analysis"),duration:Ml.optional(),startTime:Ml.optional(),timePerStep:Ml.optional(),spiceEngine:glt.optional(),spiceOptions:dlt.optional(),graphIndependentAxes:je().optional()}),hlt=Ml.refine(t=>t>0,"Time must be positive"),YPn=Pt({...Aoe,duration:hlt.default("10ms"),startTime:Ml.default("0ms"),timePerStep:hlt.default("0.01ms")}).superRefine((t,e)=>{(t.startTime<0||t.startTime>t.duration)&&e.addIssue({code:lo.custom,path:["startTime"],message:"startTime must be between zero and duration"})}),UPn=Pt({...Aoe}),Wxe=xo([O_,H3]),KPn=Pt({...Aoe,sweepSource:Z().min(1),sweepStart:Wxe,sweepStop:Wxe,sweepStep:Wxe.refine(t=>t!==0,"sweepStep must be nonzero")}).superRefine((t,e)=>{Math.sign(t.sweepStop-t.sweepStart)!==Math.sign(t.sweepStep)&&e.addIssue({code:lo.custom,path:["sweepStep"],message:"sweepStep must move from sweepStart toward sweepStop"})}),VPn=Pt({...Aoe,sweepType:Kn(["linear","decade","octave"]),startFrequency:Cy.refine(t=>t>0,"startFrequency must be positive"),stopFrequency:Cy.refine(t=>t>0,"stopFrequency must be positive"),samplesPerInterval:_t().int().positive().optional(),sampleCount:_t().int().positive().optional()}).superRefine((t,e)=>{if(t.stopFrequency<=t.startFrequency&&e.addIssue({code:lo.custom,path:["stopFrequency"],message:"stopFrequency must be greater than startFrequency"}),t.sweepType==="linear"){t.sampleCount===void 0&&e.addIssue({code:lo.custom,path:["sampleCount"],message:"sampleCount is required for a linear AC sweep"}),t.samplesPerInterval!==void 0&&e.addIssue({code:lo.custom,path:["samplesPerInterval"],message:"samplesPerInterval is only valid for decade or octave sweeps"});return}t.samplesPerInterval===void 0&&e.addIssue({code:lo.custom,path:["samplesPerInterval"],message:"samplesPerInterval is required for decade or octave sweeps"}),t.sampleCount!==void 0&&e.addIssue({code:lo.custom,path:["sampleCount"],message:"sampleCount is only valid for a linear sweep"})}),zPn=S8.pipe(_t()),JPn=$M.pipe(_t()),WPn=Ine.pipe(_t()),jPn=O_.pipe(_t()),$Pn=H3.pipe(_t()),DV=t=>({name:Z().optional(),values:dn(t).min(1).optional(),start:t.optional(),stop:t.optional(),step:t.optional()}),qPn=Pt({...DV(zPn),parameterType:$e("resistance"),resistorRef:Z().min(1)}).strict(),XPn=Pt({...DV(JPn),parameterType:$e("capacitance"),capacitorRef:Z().min(1)}).strict(),ZPn=Pt({...DV(WPn),parameterType:$e("inductance"),inductorRef:Z().min(1)}).strict(),eMn=Pt({...DV(jPn),parameterType:$e("voltage"),net:Z().min(1)}).strict(),tMn=Pt({...DV($Pn),parameterType:$e("current"),currentSourceRef:Z().min(1)}).strict(),nMn=(t,e)=>{const n=t.values!==void 0,o=[t.start,t.stop,t.step].filter(r=>r!==void 0).length,i=o>0;if(n===i){e.addIssue({code:lo.custom,message:"Provide either values or start/stop/step"});return}if(o!==0&&o!==3){e.addIssue({code:lo.custom,message:"start, stop, and step must be provided together"});return}t.step===0&&e.addIssue({code:lo.custom,path:["step"],message:"step must be nonzero"}),t.start!==void 0&&t.stop!==void 0&&t.step!==void 0&&Math.sign(t.stop-t.start)!==Math.sign(t.step)&&e.addIssue({code:lo.custom,path:["step"],message:"step must move from start toward stop"})},oMn=Iy("parameterType",[qPn,XPn,ZPn,eMn,tMn]).superRefine(nMn),iMn=Pt({key:rd().optional(),name:Z().optional(),autorouter:ioe.optional(),phaseIndex:_t().optional(),pcbTracePaths:dn(ilt).optional(),...elt.shape,region:Pt({shape:$e("rect").optional(),minX:_t(),maxX:_t(),minY:_t(),maxY:_t()}).optional(),connection:Z().optional(),connections:dn(Z()).optional(),reroute:je().optional(),...alt.shape}).superRefine((t,e)=>{const n=t.autorouter==="simplify"||typeof t.autorouter=="object"&&t.autorouter?.preset==="simplify";n&&t.reroute!==!0&&console.warn('The "simplify" autorouter preset should only be used with reroute=true'),t.reroute!==void 0&&!(n&&t.reroute===!0)&&t.region===void 0&&t.connection===void 0&&t.connections===void 0&&e.addIssue({code:lo.custom,message:"region, connection, or connections is required when reroute is provided",path:["region"]})}),rMn=Pt({source:Z(),spicePinMapping:Qc(Z(),Z()).optional()}),sMn=["pin1","pin2","pin3","emitter","collector","base","gate","source","drain"],aMn=vg.extend({type:Kn(["npn","pnp","bjt","jfet","mosfet","igbt"]),connections:G3(sMn).optional()}),AMn=["pin1","drain","pin2","source","pin3","gate"],cMn=vg.extend({channelType:Kn(["n","p"]),mosfetMode:Kn(["enhancement","depletion"]),symbolDrainSide:Kn(["left","right","top","bottom"]).optional(),symbolSourceSide:Kn(["left","right","top","bottom"]).optional(),symbolGateSide:Kn(["left","right","top","bottom"]).optional(),connections:G3(AMn).optional()}),lMn=["inverting_input","non_inverting_input","output","positive_supply","negative_supply"],uMn=vg.extend({connections:G3(lMn).optional()}),gMn=Vvn,dMn=vg.extend({inductance:Ine,maxCurrentRating:xo([Z(),_t()]).optional(),schOrientation:MQ.optional(),connections:G3(gMn).optional()});Pt({children:P0().optional()});var hMn=Yxe,pMn=Kn(["anode","cathode","pin1","pin2","pos","neg"]),mMn=Z().or(dn(Z()).readonly()).or(dn(Z())),_Mn=Qc(pMn,mMn),plt=Qc(Kn(hMn),zm.or(dn(zm).readonly()).or(dn(zm))),fMn=Kn(["standard","schottky","zener","avalanche","photo","tvs"]),IMn=vg.extend({connections:_Mn.optional(),variant:fMn.optional().default("standard"),standard:je().optional(),schottky:je().optional(),zener:je().optional(),avalanche:je().optional(),photo:je().optional(),tvs:je().optional(),schOrientation:MQ.optional(),pinLabels:plt.optional()}).superRefine((t,e)=>{if([t.standard,t.schottky,t.zener,t.avalanche,t.photo,t.tvs].filter(Boolean).length>1)return e.addIssue({code:lo.custom,message:"Exactly one diode variant must be enabled",path:[]}),Zs}).transform(t=>{const e={...t,standard:!1,schottky:!1,zener:!1,avalanche:!1,photo:!1,tvs:!1};if(t.standard)e.standard=!0;else if(t.schottky)e.schottky=!0;else if(t.zener)e.zener=!0;else if(t.photo)e.photo=!0;else if(t.tvs)e.tvs=!0;else switch(t.variant){case"standard":e.standard=!0;break;case"schottky":e.schottky=!0;break;case"zener":e.zener=!0;break;case"avalanche":e.avalanche=!0;break;case"photo":e.photo=!0;break;case"tvs":e.tvs=!0;break;default:e.standard=!0}return e}),CMn=Qc(Kn(["1","2"]),zm.or(dn(zm).readonly()).or(dn(zm))).transform(t=>({...t[1]===void 0?{}:{pin1:t[1]},...t[2]===void 0?{}:{pin2:t[2]}})),yMn=vg.extend({color:Z().optional(),wavelength:Z().optional(),schDisplayValue:Z().optional(),schOrientation:MQ.optional(),pinLabels:plt.or(CMn).optional(),connections:G3(Yxe).optional(),laser:je().optional()}),xMn=vg.extend({type:Kn(["spst","spdt","dpst","dpdt"]).optional(),isNormallyClosed:je().optional().default(!1),spst:je().optional(),spdt:je().optional(),dpst:je().optional(),dpdt:je().optional(),pinLabels:zxe.optional(),noConnect:Alt.optional(),simSwitchFrequency:Cy.optional(),simCloseAt:Ml.optional(),simOpenAt:Ml.optional(),simStartClosed:je().optional(),simStartOpen:je().optional(),connections:P0().pipe(Qc(Z(),cD)).optional()}).transform(t=>{const e={...t};switch(e.dpdt?e.type="dpdt":e.spst?e.type="spst":e.spdt?e.type="spdt":e.dpst&&(e.type="dpst"),e.type){case"spdt":e.spdt=!0;break;case"spst":e.spst=!0;break;case"dpst":e.dpst=!0;break;case"dpdt":e.dpdt=!0;break}return e}),EMn=qa.extend({text:Z(),anchorAlignment:Kn(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),font:Kn(["tscircuit2024"]).optional(),fontSize:ce.optional(),color:Z().optional()}),BMn=qa.omit({pcbRotation:!0}).extend({width:lt,height:lt,strokeWidth:lt.optional(),isFilled:je().optional(),hasStroke:je().optional(),isStrokeDashed:je().optional(),color:Z().optional(),cornerRadius:lt.optional()}),bMn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({route:dn(N9),strokeWidth:ce.optional(),color:Z().optional()}),mlt=xo([Z(),By]),SMn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({from:mlt,to:mlt,text:Z().optional(),offset:lt.optional(),font:Kn(["tscircuit2024"]).optional(),fontSize:ce.optional(),color:Z().optional(),arrowSize:lt.optional(),units:Kn(["in","mm"]).optional(),outerEdgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional(),innerEdgeToEdge:$e(!0).optional()});Pt({layer:Z().optional(),thickness:lt.optional(),route:dn(N9)});var _lt=eoe.extend({name:Z().optional(),fromLayer:Pr.optional(),toLayer:Pr.optional(),holeDiameter:lt.optional(),outerDiameter:lt.optional(),layers:dn(Pr).optional(),connectsTo:Z().or(dn(Z())).optional(),netIsAssignable:je().optional(),tented:xo([je(),Kn(["both_sides","top_and_bottom_tented","top_tented","bottom_tented","exposed"])]).transform(t=>t===!0||t==="both_sides"?"top_and_bottom_tented":t===!1?"exposed":t).optional()}),QMn=Pt({pin1:cD}).strict(),vMn=vg.extend({connections:QMn.optional(),footprintVariant:Kn(["pad","through_hole"]).optional(),padShape:Kn(["rect","circle"]).optional().default("circle"),padDiameter:lt.optional(),holeDiameter:lt.optional(),width:lt.optional(),height:lt.optional()}).refine(t=>t.footprintVariant!=="through_hole"||t.holeDiameter!==void 0,{message:"holeDiameter is required for through_hole testpoints"}),wMn=qa.omit({pcbRotation:!0,layer:!0}).extend({connection:Z()}),PMn=xo([qa.omit({pcbRotation:!0}).extend({shape:$e("circle"),radius:lt,layers:dn(Pr).optional(),excludeRefs:dn(Z()).optional().describe('Component selectors excluded from the keepout, such as ".ANT1"')}),qa.extend({shape:$e("rect"),width:lt,height:lt,layers:dn(Pr).optional(),excludeRefs:dn(Z()).optional().describe('Component selectors excluded from the keepout, such as ".ANT1"')})]),MMn=qa.extend({width:lt,height:lt,strokeWidth:lt.optional(),isFilled:je().optional(),hasStroke:je().optional(),isStrokeDashed:je().optional(),color:Z().optional()}),DMn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({outline:dn(By),strokeWidth:ce.optional(),isClosed:je().optional(),isStrokeDashed:je().optional(),color:Z().optional()}),NMn=qa.omit({pcbRotation:!0}).extend({radius:lt});qa.omit({pcbRotation:!0}).extend({width:lt,height:lt,radius:lt});var RMn=Pt({name:Z().optional(),layer:Pr,connectsTo:Z(),unbroken:je().optional().describe("Reserves the pour region during autorouting so unrelated traces do not split it. Vias may still cross the region using antipads."),padMargin:Po.optional(),traceMargin:Po.optional(),clearance:Po.optional(),boardEdgeMargin:Po.optional(),cutoutMargin:Po.optional(),useThermalReliefs:je().optional(),outline:dn(By).optional(),coveredWithSolderMask:je().optional().default(!0)}),TMn=Pt({originalLayer:Pr.default("top").optional(),children:rd().optional()}),kMn=Pt({pcbX:Vm.optional(),pcbY:Vm.optional(),pcbLeftEdgeX:Vm.optional(),pcbRightEdgeX:Vm.optional(),pcbTopEdgeY:Vm.optional(),pcbBottomEdgeY:Vm.optional(),pcbOffsetX:Po.optional(),pcbOffsetY:Po.optional(),pcbZ:Po.optional()}),FMn=PQ.extend({modelUrl:G_,stepUrl:G_.optional()}),LMn=FMn.merge(kMn),HMn=xo([Art(),G_,LMn]),OMn=vg.extend({voltage:O_}),GMn=["pin1","pin2","pos","neg"],YMn=xo([Z(),_t()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),UMn=vg.extend({voltage:O_.optional(),frequency:Cy.optional(),peakToPeakVoltage:O_.optional(),waveShape:Kn(["sinewave","square","triangle","sawtooth"]).optional(),phase:oA.optional(),dutyCycle:YMn.optional(),pulseDelay:Ml.optional(),riseTime:Ml.optional(),fallTime:Ml.optional(),pulseWidth:Ml.optional(),period:Ml.optional(),acMagnitude:O_.optional(),acPhase:oA.optional(),connections:G3(GMn).optional()}),KMn=["pin1","pin2","pos","neg"],VMn=xo([Z(),_t()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(_t().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),zMn=vg.extend({current:H3.optional(),frequency:Cy.optional(),peakToPeakCurrent:H3.optional(),waveShape:Kn(["sinewave","square","triangle","sawtooth"]).optional(),phase:oA.optional(),dutyCycle:VMn.optional(),acMagnitude:H3.optional(),acPhase:oA.optional(),connections:G3(KMn).optional()}),JMn=vg.omit({name:!0}).extend({name:Z().optional(),connectsTo:Z(),referenceTo:Z().optional(),color:Z().optional(),graphDisplayName:Z().optional(),graphCenter:_t().optional(),graphVerticalOffset:_t().or(Z()).optional(),graphVoltagePerDiv:_t().or(Z()).optional()}),WMn=["pin1","pin2","pos","neg"],jMn=t=>t.pos!==void 0&&t.neg!==void 0||t.pin1!==void 0&&t.pin2!==void 0,$Mn=vg.extend({connections:G3(WMn).refine(jMn,"Ammeter connections must include either pos/neg or pin1/pin2"),color:Z().optional(),graphDisplayName:Z().optional(),graphCenter:_t().optional(),graphVerticalOffset:_t().or(Z()).optional(),graphCurrentPerDiv:_t().or(Z()).optional()}),qMn=Pt({center:ki,radius:lt,startAngleDegrees:oA,endAngleDegrees:oA,direction:Kn(["clockwise","counterclockwise"]).default("counterclockwise"),strokeWidth:lt.optional(),color:Z().optional(),isDashed:je().optional().default(!1)});Pt({children:rd().optional()});var XMn=Pt({name:Z().optional(),chipRef:Z().optional(),pinLabels:zxe.optional(),schPinArrangement:ooe.optional(),schPinStyle:QV.optional(),schX:lt.optional(),schY:lt.optional(),schSectionName:Z().optional(),schSheetName:Z().optional(),width:lt.optional(),height:lt.optional(),overlay:dn(Z()).optional(),padding:lt.optional(),paddingLeft:lt.optional(),paddingRight:lt.optional(),paddingTop:lt.optional(),paddingBottom:lt.optional(),title:Z().optional(),titleAlignment:H9.default("top_left"),titleColor:Z().optional(),titleFontSize:lt.optional(),titleInside:je().default(!1),strokeStyle:Kn(["solid","dashed"]).default("solid")}).refine(t=>t.width!==void 0&&t.height!==void 0||Array.isArray(t.overlay)&&t.overlay.length>0,{message:"Must provide either both `width` and `height`, or a non-empty `overlay` array."}).refine(t=>!(t.width!==void 0&&t.height!==void 0&&Array.isArray(t.overlay)&&t.overlay.length>0),{message:"Cannot provide both `width`/`height` and `overlay` at the same time."}),ZMn=P0().pipe(Qc(Z(),cD)).refine(t=>Object.keys(t).length>0,{message:"connections must map at least one schematic symbol port"}),eDn=Pt({name:Z().min(1),displayName:Z().optional(),chipRef:Z().min(1).optional(),symbolName:Z().min(1),connections:ZMn.optional(),schX:Po.optional(),schY:Po.optional(),schRotation:oA.optional(),schSectionName:Z().optional(),schSheetName:Z().optional()}),tDn=Pt({center:ki,radius:lt,strokeWidth:lt.optional(),color:Z().optional(),isFilled:je().optional().default(!1),fillColor:Z().optional(),isDashed:je().optional().default(!1)}),nDn=Pt({schX:lt.optional(),schY:lt.optional(),width:lt,height:lt,rotation:oA.default(0),strokeWidth:lt.optional(),color:Z().optional(),isFilled:je().optional().default(!1),fillColor:Z().optional(),isDashed:je().optional().default(!1)}),oDn=Pt({x1:lt,y1:lt,x2:lt,y2:lt,strokeWidth:lt.optional(),color:Z().optional(),isDashed:je().optional().default(!1),dashLength:lt.optional(),dashGap:lt.optional()}),iDn=Kn(["center","left","right","top","bottom"]),rDn=Pt({schX:lt.optional(),schY:lt.optional(),text:Z(),fontSize:_t().default(1),anchor:xo([iDn.describe("legacy"),H9]).default("center"),color:Z().default("#000000"),schRotation:oA.default(0)}),sDn=Pt({points:dn(ki).optional(),svgPath:Z().optional(),strokeWidth:lt.optional(),strokeColor:Z().optional(),dashLength:lt.optional(),dashGap:lt.optional(),isFilled:je().optional().default(!1),fillColor:Z().optional()}),aDn=Pt({schX:lt.optional(),schY:lt.optional(),children:rd().optional(),cellPadding:lt.optional(),borderWidth:lt.optional(),anchor:H9.optional(),fontSize:lt.optional()}),ADn=Pt({children:rd().optional(),height:lt.optional()}),cDn=Pt({children:Z().optional(),horizontalAlign:Kn(["left","center","right"]).optional(),verticalAlign:Kn(["top","middle","bottom"]).optional(),fontSize:lt.optional(),rowSpan:_t().optional(),colSpan:_t().optional(),width:lt.optional(),text:Z().optional()}),lDn=Pt({displayName:Z().optional(),name:Z(),sectionTitleFontSize:lt.optional()}),uDn=Pt({name:Z().optional(),displayName:Z().optional(),sheetIndex:_t().optional(),sheetSize:Kn(["A4","ANSI_B"]).default("A4"),sheetWidth:lt.pipe(_t().positive()).optional(),sheetHeight:lt.pipe(_t().positive()).optional(),children:rd().optional()}),gDn=G_.refine(t=>t.trim().length>0,{message:"imageUrl cannot be empty"}),flt=t=>Po.refine(e=>Number.isFinite(e)&&e>0,{message:`${t} must be a positive finite distance`}),dDn=Pt({imageUrl:gDn.optional(),svgContent:Z().refine(t=>t.trim().length>0,{message:"svgContent cannot be empty"}).optional(),width:flt("width").optional(),height:flt("height").optional()}).superRefine(({imageUrl:t,svgContent:e},n)=>{t===void 0&&e===void 0&&n.addIssue({code:lo.custom,message:"At least one of imageUrl or svgContent is required"})}),hDn=qa.extend({text:Z(),anchorAlignment:H9.default("center"),font:Kn(["tscircuit2024"]).optional(),fontSize:ce.optional(),layers:dn(Pr).optional(),knockout:je().optional(),mirrored:je().optional()}),pDn=qa.extend({text:Z(),anchorAlignment:H9.default("center"),font:Kn(["tscircuit2024"]).optional(),fontSize:ce.optional(),isKnockout:je().optional(),knockoutPadding:ce.optional(),knockoutPaddingLeft:ce.optional(),knockoutPaddingRight:ce.optional(),knockoutPaddingTop:ce.optional(),knockoutPaddingBottom:ce.optional(),layers:dn(Pr).optional()}),mDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({route:dn(N9),strokeWidth:ce.optional()}),_Dn=qa.omit({pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({strokeWidth:lt,x1:lt,y1:lt,x2:lt,y2:lt}),fDn=qa.omit({pcbRotation:!0}).extend({filled:je().default(!0).optional(),stroke:Kn(["dashed","solid","none"]).optional(),strokeWidth:lt.optional(),width:lt,height:lt,cornerRadius:lt.optional()}),IDn=qa.omit({pcbRotation:!0}).extend({isFilled:je().optional(),isOutline:je().optional(),strokeWidth:lt.optional(),radius:lt}),CDn=qa.omit({layer:!0,pcbStyle:!0,pcbSx:!0}).extend({imageUrl:G_,width:Po,height:Po,layer:Km.optional()}),Ilt=Pt({x:lt,y:lt,via:je().optional(),toLayer:Pr.optional()}),yDn=Pt({for:Z().optional().describe("Selector for the port you're targeting, not required if you're inside a trace"),order:_t().optional(),offset:N9.or(Ilt).optional(),offsets:dn(N9).or(dn(Ilt)).optional(),traceWidth:_t().optional()}),xDn=eoe.extend({name:Z().optional(),pinNumber:_t().optional(),schStemLength:_t().optional(),schPinLabelFontSize:Kn(["default","sm"]).or(lt.refine(t=>Number.isFinite(t)&&t>0,{message:"Schematic pin-label font size must be positive and finite"})).optional(),aliases:dn(Z()).optional(),layer:Z().optional(),layers:dn(Z()).optional(),schX:_t().optional(),schY:_t().optional(),direction:hvn.optional(),connectsTo:Z().or(dn(Z())).optional(),kicadPinMetadata:Zvn.optional(),hasInversionCircle:je().optional()}),EDn=qa.extend({text:Z(),anchorAlignment:Kn(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),font:Kn(["tscircuit2024"]).optional(),fontSize:ce.optional(),color:Z().optional()}),BDn=qa.omit({pcbRotation:!0}).extend({width:lt,height:lt,strokeWidth:lt.optional(),isFilled:je().optional(),hasStroke:je().optional(),isStrokeDashed:je().optional(),color:Z().optional(),cornerRadius:lt.optional()}),bDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({route:dn(N9),strokeWidth:ce.optional(),color:Z().optional()}),SDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({x1:lt,y1:lt,x2:lt,y2:lt,strokeWidth:lt.optional(),color:Z().optional(),isDashed:je().optional()}),Clt=xo([Z(),By]),QDn=qa.omit({pcbLeftEdgeX:!0,pcbRightEdgeX:!0,pcbTopEdgeY:!0,pcbBottomEdgeY:!0,pcbX:!0,pcbY:!0,pcbOffsetX:!0,pcbOffsetY:!0,pcbRotation:!0}).extend({from:Clt,to:Clt,text:Z().optional(),offset:lt.optional(),font:Kn(["tscircuit2024"]).optional(),fontSize:ce.optional(),color:Z().optional(),arrowSize:lt.optional(),units:Kn(["in","mm"]).optional(),outerEdgeToEdge:$e(!0).optional(),centerToCenter:$e(!0).optional(),innerEdgeToEdge:$e(!0).optional()}),ylt=dn(rd()).describe("Circuit JSON"),jxe=Pt({footprintCircuitJson:dn(rd()),cadModel:kxe.optional()}),xlt=IQ().args(Z()).returns(CQ(jxe)).or(IQ().args(Z(),Pt({resolvedPcbStyle:Hxe.optional()}).optional()).returns(CQ(jxe))).describe("A function that takes a path and returns Circuit JSON"),vDn=Pt({loadFromUrl:IQ().args(Z()).returns(CQ(jxe)).describe("A function that takes a footprint file URL and returns Circuit JSON")}),wDn=Pt({engineVersionString:Z().optional(),simulationResultCircuitJson:ylt}),PDn=Pt({simulate:IQ().args(Z()).returns(CQ(wDn)).describe("A function that takes a SPICE string and returns a simulation result")}),MDn=P0(t=>typeof t=="string"),Elt=Pt({run:IQ().args().returns(CQ(c2e())).describe("Run the autorouter"),getOutputSimpleRouteJson:IQ().args().returns(CQ(rd())).describe("Get the resulting SimpleRouteJson")}),DDn=Pt({createAutorouter:IQ().args(rd(),rd().optional()).returns(xo([Elt,CQ(Elt)])).describe("Create an autorouter instance")}),NDn=P0(t=>typeof t=="function").describe("A fetch-like function to use for platform requests"),RDn=P0(t=>typeof t=="object"&&t!==null&&"getItem"in t&&typeof t.getItem=="function"&&"setItem"in t&&typeof t.setItem=="function"),TDn=P0(t=>typeof t=="object"&&t!==null&&"runDrcChecks"in t&&typeof t.runDrcChecks=="function"),kDn=Pt({partsEngine:tlt.optional(),fabricatorEngine:TDn.optional(),autorouter:ioe.optional(),autorouterMap:Qc(Z(),DDn).optional(),allowLegacyAutorouters:je().optional(),registryApiUrl:G_.optional(),cloudAutorouterUrl:G_.optional(),projectName:Z().optional(),projectBaseUrl:G_.optional(),version:Z().optional(),url:G_.optional(),printBoardInformationToSilkscreen:je().optional(),includeBoardFiles:dn(Z()).describe('The board files to automatically build with "tsci build", defaults to ["**/*.circuit.tsx"]. Can be an array of files or globs').optional(),snapshotsDir:Z().describe('The directory where snapshots are stored for "tsci snapshot", defaults to "tests/__snapshots__"').optional(),defaultSpiceEngine:MDn.optional(),unitPreference:Kn(["mm","in","mil"]).optional(),localCacheEngine:RDn.optional(),useCloudAutorouter:je().optional(),enablePartOrientationAnalysis:je().optional(),pcbPackSolverTimeoutMs:_t().finite().positive().optional(),pcbDisabled:je().optional(),routingDisabled:je().optional(),schematicDisabled:je().optional(),partsEngineDisabled:je().optional(),analogSimulationDisabled:je().optional(),drcChecksDisabled:je().optional(),netlistDrcChecksDisabled:je().optional(),routingDrcChecksDisabled:je().optional(),placementDrcChecksDisabled:je().optional(),pinSpecificationDrcChecksDisabled:je().optional(),spiceEngineMap:Qc(Z(),PDn).optional(),footprintLibraryMap:Qc(Z(),xo([xlt,Qc(Z(),xo([ylt,xlt]))])).optional(),footprintFileParserMap:Qc(Z(),vDn).optional(),resolveProjectStaticFileImportUrl:IQ().args(Z()).returns(CQ(Z())).describe("A function that returns a string URL for static files for the project").optional(),platformFetch:NDn.optional()}),FDn=kDn,LDn=FDn.pick({projectName:!0,projectBaseUrl:!0,version:!0,url:!0,printBoardInformationToSilkscreen:!0,includeBoardFiles:!0,snapshotsDir:!0,defaultSpiceEngine:!0,pcbDisabled:!0,schematicDisabled:!0,analogSimulationDisabled:!0}),Y_;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(Y_||(Y_={}));function HDn(t){return t.type===Y_.Tag||t.type===Y_.Script||t.type===Y_.Style}const ODn=Y_.Root,GDn=Y_.Text,YDn=Y_.Directive,UDn=Y_.Comment,KDn=Y_.Script,VDn=Y_.Style,zDn=Y_.Tag,JDn=Y_.CDATA,WDn=Y_.Doctype;function w5(t){return HDn(t)}function $xe(t){return t.type===Y_.CDATA}function Xk(t){return t.type===Y_.Text}function Blt(t){return t.type===Y_.Comment}function jDn(t){return t.type===Y_.Root}function J4(t){return Object.prototype.hasOwnProperty.call(t,"children")}const blt=/["&'<>$\x80-\uFFFF]/g,$Dn=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),qDn=String.prototype.codePointAt!=null?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function Slt(t){let e="",n=0,o;for(;(o=blt.exec(t))!==null;){const i=o.index,r=t.charCodeAt(i),s=$Dn.get(r);s!==void 0?(e+=t.substring(n,i)+s,n=i+1):(e+=`${t.substring(n,i)}&#x${qDn(t,i).toString(16)};`,n=blt.lastIndex+=+((r&64512)===55296))}return e+t.substr(n)}function Qlt(t,e){return function(o){let i,r=0,s="";for(;i=t.exec(o);)r!==i.index&&(s+=o.substring(r,i.index)),s+=e.get(i[0].charCodeAt(0)),r=i.index+1;return s+o.substring(r)}}const XDn=Qlt(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),ZDn=Qlt(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),eNn=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),tNn=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),nNn=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function oNn(t){return t.replace(/"/g,"&quot;")}function iNn(t,e){var n;if(!t)return;const o=((n=e.encodeEntities)!==null&&n!==void 0?n:e.decodeEntities)===!1?oNn:e.xmlMode||e.encodeEntities!=="utf8"?Slt:XDn;return Object.keys(t).map(i=>{var r,s;const a=(r=t[i])!==null&&r!==void 0?r:"";return e.xmlMode==="foreign"&&(i=(s=tNn.get(i))!==null&&s!==void 0?s:i),!e.emptyAttrs&&!e.xmlMode&&a===""?i:`${i}="${o(a)}"`}).join(" ")}const vlt=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function qxe(t,e={}){const n="length"in t?t:[t];let o="";for(let i=0;i<n.length;i++)o+=rNn(n[i],e);return o}function rNn(t,e){switch(t.type){case ODn:return qxe(t.children,e);case WDn:case YDn:return cNn(t);case UDn:return gNn(t);case JDn:return uNn(t);case KDn:case VDn:case zDn:return ANn(t,e);case GDn:return lNn(t,e)}}const sNn=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),aNn=new Set(["svg","math"]);function ANn(t,e){var n;e.xmlMode==="foreign"&&(t.name=(n=eNn.get(t.name))!==null&&n!==void 0?n:t.name,t.parent&&sNn.has(t.parent.name)&&(e={...e,xmlMode:!1})),!e.xmlMode&&aNn.has(t.name)&&(e={...e,xmlMode:"foreign"});let o=`<${t.name}`;const i=iNn(t.attribs,e);return i&&(o+=` ${i}`),t.children.length===0&&(e.xmlMode?e.selfClosingTags!==!1:e.selfClosingTags&&vlt.has(t.name))?(e.xmlMode||(o+=" "),o+="/>"):(o+=">",t.children.length>0&&(o+=qxe(t.children,e)),(e.xmlMode||!vlt.has(t.name))&&(o+=`</${t.name}>`)),o}function cNn(t){return`<${t.data}>`}function lNn(t,e){var n;let o=t.data||"";return((n=e.encodeEntities)!==null&&n!==void 0?n:e.decodeEntities)!==!1&&!(!e.xmlMode&&t.parent&&nNn.has(t.parent.name))&&(o=e.xmlMode||e.encodeEntities!=="utf8"?Slt(o):ZDn(o)),o}function uNn(t){return`<![CDATA[${t.children[0].data}]]>`}function gNn(t){return`<!--${t.data}-->`}function wlt(t,e){return qxe(t,e)}function dNn(t,e){return J4(t)?t.children.map(n=>wlt(n,e)).join(""):""}function coe(t){return Array.isArray(t)?t.map(coe).join(""):w5(t)?t.name==="br"?`
`:coe(t.children):$xe(t)?coe(t.children):Xk(t)?t.data:""}function loe(t){return Array.isArray(t)?t.map(loe).join(""):J4(t)&&!Blt(t)?loe(t.children):Xk(t)?t.data:""}function Xxe(t){return Array.isArray(t)?t.map(Xxe).join(""):J4(t)&&(t.type===Y_.Tag||$xe(t))?Xxe(t.children):Xk(t)?t.data:""}function Plt(t){return J4(t)?t.children:[]}function Mlt(t){return t.parent||null}function hNn(t){const e=Mlt(t);if(e!=null)return Plt(e);const n=[t];let{prev:o,next:i}=t;for(;o!=null;)n.unshift(o),{prev:o}=o;for(;i!=null;)n.push(i),{next:i}=i;return n}function pNn(t,e){var n;return(n=t.attribs)===null||n===void 0?void 0:n[e]}function mNn(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}function _Nn(t){return t.name}function fNn(t){let{next:e}=t;for(;e!==null&&!w5(e);)({next:e}=e);return e}function INn(t){let{prev:e}=t;for(;e!==null&&!w5(e);)({prev:e}=e);return e}function NV(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){const e=t.parent.children,n=e.lastIndexOf(t);n>=0&&e.splice(n,1)}t.next=null,t.prev=null,t.parent=null}function CNn(t,e){const n=e.prev=t.prev;n&&(n.next=e);const o=e.next=t.next;o&&(o.prev=e);const i=e.parent=t.parent;if(i){const r=i.children;r[r.lastIndexOf(t)]=e,t.parent=null}}function yNn(t,e){if(NV(e),e.next=null,e.parent=t,t.children.push(e)>1){const n=t.children[t.children.length-2];n.next=e,e.prev=n}else e.prev=null}function xNn(t,e){NV(e);const{parent:n}=t,o=t.next;if(e.next=o,e.prev=t,t.next=e,e.parent=n,o){if(o.prev=e,n){const i=n.children;i.splice(i.lastIndexOf(o),0,e)}}else n&&n.children.push(e)}function ENn(t,e){if(NV(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){const n=t.children[1];n.prev=e,e.next=n}else e.next=null}function BNn(t,e){NV(e);const{parent:n}=t;if(n){const o=n.children;o.splice(o.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=n,e.prev=t.prev,e.next=t,t.prev=e}function RV(t,e,n=!0,o=1/0){return Dlt(t,Array.isArray(e)?e:[e],n,o)}function Dlt(t,e,n,o){const i=[],r=[Array.isArray(e)?e:[e]],s=[0];for(;;){if(s[0]>=r[0].length){if(s.length===1)return i;r.shift(),s.shift();continue}const a=r[0][s[0]++];if(t(a)&&(i.push(a),--o<=0))return i;n&&J4(a)&&a.children.length>0&&(s.unshift(0),r.unshift(a.children))}}function bNn(t,e){return e.find(t)}function Zxe(t,e,n=!0){const o=Array.isArray(e)?e:[e];for(let i=0;i<o.length;i++){const r=o[i];if(w5(r)&&t(r))return r;if(n&&J4(r)&&r.children.length>0){const s=Zxe(t,r.children,!0);if(s)return s}}return null}function Nlt(t,e){return(Array.isArray(e)?e:[e]).some(n=>w5(n)&&t(n)||J4(n)&&Nlt(t,n.children))}function SNn(t,e){const n=[],o=[Array.isArray(e)?e:[e]],i=[0];for(;;){if(i[0]>=o[0].length){if(o.length===1)return n;o.shift(),i.shift();continue}const r=o[0][i[0]++];w5(r)&&t(r)&&n.push(r),J4(r)&&r.children.length>0&&(i.unshift(0),o.unshift(r.children))}}const uoe={tag_name(t){return typeof t=="function"?e=>w5(e)&&t(e.name):t==="*"?w5:e=>w5(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>Xk(e)&&t(e.data):e=>Xk(e)&&e.data===t}};function e3e(t,e){return typeof e=="function"?n=>w5(n)&&e(n.attribs[t]):n=>w5(n)&&n.attribs[t]===e}function QNn(t,e){return n=>t(n)||e(n)}function Rlt(t){const e=Object.keys(t).map(n=>{const o=t[n];return Object.prototype.hasOwnProperty.call(uoe,n)?uoe[n](o):e3e(n,o)});return e.length===0?null:e.reduce(QNn)}function vNn(t,e){const n=Rlt(t);return n?n(e):!0}function wNn(t,e,n,o=1/0){const i=Rlt(t);return i?RV(i,e,n,o):[]}function PNn(t,e,n=!0){return Array.isArray(e)||(e=[e]),Zxe(e3e("id",t),e,n)}function Zk(t,e,n=!0,o=1/0){return RV(uoe.tag_name(t),e,n,o)}function MNn(t,e,n=!0,o=1/0){return RV(e3e("class",t),e,n,o)}function DNn(t,e,n=!0,o=1/0){return RV(uoe.tag_type(t),e,n,o)}function NNn(t){let e=t.length;for(;--e>=0;){const n=t[e];if(e>0&&t.lastIndexOf(n,e-1)>=0){t.splice(e,1);continue}for(let o=n.parent;o;o=o.parent)if(t.includes(o)){t.splice(e,1);break}}return t}var P5;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(P5||(P5={}));function Tlt(t,e){const n=[],o=[];if(t===e)return 0;let i=J4(t)?t:t.parent;for(;i;)n.unshift(i),i=i.parent;for(i=J4(e)?e:e.parent;i;)o.unshift(i),i=i.parent;const r=Math.min(n.length,o.length);let s=0;for(;s<r&&n[s]===o[s];)s++;if(s===0)return P5.DISCONNECTED;const a=n[s-1],A=a.children,c=n[s],l=o[s];return A.indexOf(c)>A.indexOf(l)?a===e?P5.FOLLOWING|P5.CONTAINED_BY:P5.FOLLOWING:a===t?P5.PRECEDING|P5.CONTAINS:P5.PRECEDING}function RNn(t){return t=t.filter((e,n,o)=>!o.includes(e,n+1)),t.sort((e,n)=>{const o=Tlt(e,n);return o&P5.PRECEDING?-1:o&P5.FOLLOWING?1:0}),t}function TNn(t){const e=goe(ONn,t);return e?e.name==="feed"?kNn(e):FNn(e):null}function kNn(t){var e;const n=t.children,o={type:"atom",items:Zk("entry",n).map(s=>{var a;const{children:A}=s,c={media:klt(A)};cx(c,"id","id",A),cx(c,"title","title",A);const l=(a=goe("link",A))===null||a===void 0?void 0:a.attribs.href;l&&(c.link=l);const u=DQ("summary",A)||DQ("content",A);u&&(c.description=u);const g=DQ("updated",A);return g&&(c.pubDate=new Date(g)),c})};cx(o,"id","id",n),cx(o,"title","title",n);const i=(e=goe("link",n))===null||e===void 0?void 0:e.attribs.href;i&&(o.link=i),cx(o,"description","subtitle",n);const r=DQ("updated",n);return r&&(o.updated=new Date(r)),cx(o,"author","email",n,!0),o}function FNn(t){var e,n;const o=(n=(e=goe("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&n!==void 0?n:[],i={type:t.name.substr(0,3),id:"",items:Zk("item",t.children).map(s=>{const{children:a}=s,A={media:klt(a)};cx(A,"id","guid",a),cx(A,"title","title",a),cx(A,"link","link",a),cx(A,"description","description",a);const c=DQ("pubDate",a)||DQ("dc:date",a);return c&&(A.pubDate=new Date(c)),A})};cx(i,"title","title",o),cx(i,"link","link",o),cx(i,"description","description",o);const r=DQ("lastBuildDate",o);return r&&(i.updated=new Date(r)),cx(i,"author","managingEditor",o,!0),i}const LNn=["url","type","lang"],HNn=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function klt(t){return Zk("media:content",t).map(e=>{const{attribs:n}=e,o={medium:n.medium,isDefault:!!n.isDefault};for(const i of LNn)n[i]&&(o[i]=n[i]);for(const i of HNn)n[i]&&(o[i]=parseInt(n[i],10));return n.expression&&(o.expression=n.expression),o})}function goe(t,e){return Zk(t,e,!0,1)[0]}function DQ(t,e,n=!1){return loe(Zk(t,e,n,1)).trim()}function cx(t,e,n,o,i=!1){const r=DQ(n,o,i);r&&(t[e]=r)}function ONn(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}const Flt=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return P5},append:xNn,appendChild:yNn,compareDocumentPosition:Tlt,existsOne:Nlt,filter:RV,find:Dlt,findAll:SNn,findOne:Zxe,findOneChild:bNn,getAttributeValue:pNn,getChildren:Plt,getElementById:PNn,getElements:wNn,getElementsByClassName:MNn,getElementsByTagName:Zk,getElementsByTagType:DNn,getFeed:TNn,getInnerHTML:dNn,getName:_Nn,getOuterHTML:wlt,getParent:Mlt,getSiblings:hNn,getText:coe,hasAttrib:mNn,hasChildren:J4,innerText:Xxe,isCDATA:$xe,isComment:Blt,isDocument:jDn,isTag:w5,isText:Xk,nextElementSibling:fNn,prepend:BNn,prependChild:ENn,prevElementSibling:INn,removeElement:NV,removeSubsets:NNn,replaceElement:CNn,testElement:vNn,textContent:loe,uniqueSort:RNn},Symbol.toStringTag,{value:"Module"}));var t3e,Llt;function GNn(){return Llt||(Llt=1,t3e={trueFunc:function(){return!0},falseFunc:function(){return!1}}),t3e}var YNn=GNn();const VA=_y(YNn);var ba;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(ba||(ba={}));var U_;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(U_||(U_={}));const Hlt=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,UNn=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,KNn=new Map([[126,U_.Element],[94,U_.Start],[36,U_.End],[42,U_.Any],[33,U_.Not],[124,U_.Hyphen]]),VNn=new Set(["has","not","matches","is","where","host","host-context"]);function zNn(t){switch(t.type){case ba.Adjacent:case ba.Child:case ba.Descendant:case ba.Parent:case ba.Sibling:case ba.ColumnCombinator:return!0;default:return!1}}const JNn=new Set(["contains","icontains"]);function WNn(t,e,n){const o=parseInt(e,16)-65536;return o!==o||n?e:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,o&1023|56320)}function TV(t){return t.replace(UNn,WNn)}function n3e(t){return t===39||t===34}function Olt(t){return t===32||t===9||t===10||t===12||t===13}function Glt(t){const e=[],n=Ylt(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function Ylt(t,e,n){let o=[];function i(g){const h=e.slice(n+g).match(Hlt);if(!h)throw new Error(`Expected name, found ${e.slice(n)}`);const[d]=h;return n+=g+d.length,TV(d)}function r(g){for(n+=g;n<e.length&&Olt(e.charCodeAt(n));)n++}function s(){n+=1;const g=n;let h=1;for(;h>0&&n<e.length;n++)e.charCodeAt(n)===40&&!a(n)?h++:e.charCodeAt(n)===41&&!a(n)&&h--;if(h)throw new Error("Parenthesis not matched");return TV(e.slice(g,n-1))}function a(g){let h=0;for(;e.charCodeAt(--g)===92;)h++;return(h&1)===1}function A(){if(o.length>0&&zNn(o[o.length-1]))throw new Error("Did not expect successive traversals.")}function c(g){if(o.length>0&&o[o.length-1].type===ba.Descendant){o[o.length-1].type=g;return}A(),o.push({type:g})}function l(g,h){o.push({type:ba.Attribute,name:g,action:h,value:i(1),namespace:null,ignoreCase:"quirks"})}function u(){if(o.length&&o[o.length-1].type===ba.Descendant&&o.pop(),o.length===0)throw new Error("Empty sub-selector");t.push(o)}if(r(0),e.length===n)return n;e:for(;n<e.length;){const g=e.charCodeAt(n);switch(g){case 32:case 9:case 10:case 12:case 13:{(o.length===0||o[0].type!==ba.Descendant)&&(A(),o.push({type:ba.Descendant})),r(1);break}case 62:{c(ba.Child),r(1);break}case 60:{c(ba.Parent),r(1);break}case 126:{c(ba.Sibling),r(1);break}case 43:{c(ba.Adjacent),r(1);break}case 46:{l("class",U_.Element);break}case 35:{l("id",U_.Equals);break}case 91:{r(1);let h,d=null;e.charCodeAt(n)===124?h=i(1):e.startsWith("*|",n)?(d="*",h=i(2)):(h=i(0),e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61&&(d=h,h=i(1))),r(0);let p=U_.Exists;const m=KNn.get(e.charCodeAt(n));if(m){if(p=m,e.charCodeAt(n+1)!==61)throw new Error("Expected `=`");r(2)}else e.charCodeAt(n)===61&&(p=U_.Equals,r(1));let _="",f=null;if(p!=="exists"){if(n3e(e.charCodeAt(n))){const y=e.charCodeAt(n);let x=n+1;for(;x<e.length&&(e.charCodeAt(x)!==y||a(x));)x+=1;if(e.charCodeAt(x)!==y)throw new Error("Attribute value didn't end");_=TV(e.slice(n+1,x)),n=x+1}else{const y=n;for(;n<e.length&&(!Olt(e.charCodeAt(n))&&e.charCodeAt(n)!==93||a(n));)n+=1;_=TV(e.slice(y,n))}r(0);const C=e.charCodeAt(n)|32;C===115?(f=!1,r(1)):C===105&&(f=!0,r(1))}if(e.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const I={type:ba.Attribute,name:h,action:p,value:_,namespace:d,ignoreCase:f};o.push(I);break}case 58:{if(e.charCodeAt(n+1)===58){o.push({type:ba.PseudoElement,name:i(2).toLowerCase(),data:e.charCodeAt(n)===40?s():null});continue}const h=i(1).toLowerCase();let d=null;if(e.charCodeAt(n)===40)if(VNn.has(h)){if(n3e(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${h} cannot be quoted`);if(d=[],n=Ylt(d,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${h} (${e})`);n+=1}else{if(d=s(),JNn.has(h)){const p=d.charCodeAt(0);p===d.charCodeAt(d.length-1)&&n3e(p)&&(d=d.slice(1,-1))}d=TV(d)}o.push({type:ba.Pseudo,name:h,data:d});break}case 44:{u(),o=[],r(1);break}default:{if(e.startsWith("/*",n)){const p=e.indexOf("*/",n+2);if(p<0)throw new Error("Comment was not terminated");n=p+2,o.length===0&&r(0);break}let h=null,d;if(g===42)n+=1,d="*";else if(g===124){if(d="",e.charCodeAt(n+1)===124){c(ba.ColumnCombinator),r(2);break}}else if(Hlt.test(e.slice(n)))d=i(0);else break e;e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==124&&(h=d,e.charCodeAt(n+1)===42?(d="*",n+=2):d=i(1)),o.push(d==="*"?{type:ba.Universal,namespace:h}:{type:ba.Tag,name:d,namespace:h})}}}return u(),n}const Ult=new Map([[ba.Universal,50],[ba.Tag,30],[ba.Attribute,1],[ba.Pseudo,0]]);function o3e(t){return!Ult.has(t.type)}const jNn=new Map([[U_.Exists,10],[U_.Equals,8],[U_.Not,7],[U_.Start,6],[U_.End,6],[U_.Any,5]]);function $Nn(t){const e=t.map(Klt);for(let n=1;n<t.length;n++){const o=e[n];if(!(o<0))for(let i=n-1;i>=0&&o<e[i];i--){const r=t[i+1];t[i+1]=t[i],t[i]=r,e[i+1]=e[i],e[i]=o}}}function Klt(t){var e,n;let o=(e=Ult.get(t.type))!==null&&e!==void 0?e:-1;return t.type===ba.Attribute?(o=(n=jNn.get(t.action))!==null&&n!==void 0?n:4,t.action===U_.Equals&&t.name==="id"&&(o=9),t.ignoreCase&&(o>>=1)):t.type===ba.Pseudo&&(t.data?t.name==="has"||t.name==="contains"?o=0:Array.isArray(t.data)?(o=Math.min(...t.data.map(i=>Math.min(...i.map(Klt)))),o<0&&(o=0)):o=2:o=3),o}const qNn=/[-[\]{}()*+?.,\\^$|#\s]/g;function Vlt(t){return t.replace(qNn,"\\$&")}const XNn=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function lD(t,e){return typeof t.ignoreCase=="boolean"?t.ignoreCase:t.ignoreCase==="quirks"?!!e.quirksMode:!e.xmlMode&&XNn.has(t.name)}const ZNn={equals(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;return lD(e,n)?(r=r.toLowerCase(),s=>{const a=o.getAttributeValue(s,i);return a!=null&&a.length===r.length&&a.toLowerCase()===r&&t(s)}):s=>o.getAttributeValue(s,i)===r&&t(s)},hyphen(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;const s=r.length;return lD(e,n)?(r=r.toLowerCase(),function(A){const c=o.getAttributeValue(A,i);return c!=null&&(c.length===s||c.charAt(s)==="-")&&c.substr(0,s).toLowerCase()===r&&t(A)}):function(A){const c=o.getAttributeValue(A,i);return c!=null&&(c.length===s||c.charAt(s)==="-")&&c.substr(0,s)===r&&t(A)}},element(t,e,n){const{adapter:o}=n,{name:i,value:r}=e;if(/\s/.test(r))return VA.falseFunc;const s=new RegExp(`(?:^|\\s)${Vlt(r)}(?:$|\\s)`,lD(e,n)?"i":"");return function(A){const c=o.getAttributeValue(A,i);return c!=null&&c.length>=r.length&&s.test(c)&&t(A)}},exists(t,{name:e},{adapter:n}){return o=>n.hasAttrib(o,e)&&t(o)},start(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;const s=r.length;return s===0?VA.falseFunc:lD(e,n)?(r=r.toLowerCase(),a=>{const A=o.getAttributeValue(a,i);return A!=null&&A.length>=s&&A.substr(0,s).toLowerCase()===r&&t(a)}):a=>{var A;return!!(!((A=o.getAttributeValue(a,i))===null||A===void 0)&&A.startsWith(r))&&t(a)}},end(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;const s=-r.length;return s===0?VA.falseFunc:lD(e,n)?(r=r.toLowerCase(),a=>{var A;return((A=o.getAttributeValue(a,i))===null||A===void 0?void 0:A.substr(s).toLowerCase())===r&&t(a)}):a=>{var A;return!!(!((A=o.getAttributeValue(a,i))===null||A===void 0)&&A.endsWith(r))&&t(a)}},any(t,e,n){const{adapter:o}=n,{name:i,value:r}=e;if(r==="")return VA.falseFunc;if(lD(e,n)){const s=new RegExp(Vlt(r),"i");return function(A){const c=o.getAttributeValue(A,i);return c!=null&&c.length>=r.length&&s.test(c)&&t(A)}}return s=>{var a;return!!(!((a=o.getAttributeValue(s,i))===null||a===void 0)&&a.includes(r))&&t(s)}},not(t,e,n){const{adapter:o}=n,{name:i}=e;let{value:r}=e;return r===""?s=>!!o.getAttributeValue(s,i)&&t(s):lD(e,n)?(r=r.toLowerCase(),s=>{const a=o.getAttributeValue(s,i);return(a==null||a.length!==r.length||a.toLowerCase()!==r)&&t(s)}):s=>o.getAttributeValue(s,i)!==r&&t(s)}},eRn=new Set([9,10,12,13,32]),zlt=48,tRn=57;function nRn(t){if(t=t.trim().toLowerCase(),t==="even")return[2,0];if(t==="odd")return[2,1];let e=0,n=0,o=r(),i=s();if(e<t.length&&t.charAt(e)==="n"&&(e++,n=o*(i??1),a(),e<t.length?(o=r(),a(),i=s()):o=i=0),i===null||e<t.length)throw new Error(`n-th rule couldn't be parsed ('${t}')`);return[n,o*i];function r(){return t.charAt(e)==="-"?(e++,-1):(t.charAt(e)==="+"&&e++,1)}function s(){const A=e;let c=0;for(;e<t.length&&t.charCodeAt(e)>=zlt&&t.charCodeAt(e)<=tRn;)c=c*10+(t.charCodeAt(e)-zlt),e++;return e===A?null:c}function a(){for(;e<t.length&&eRn.has(t.charCodeAt(e));)e++}}function oRn(t){const e=t[0],n=t[1]-1;if(n<0&&e<=0)return VA.falseFunc;if(e===-1)return r=>r<=n;if(e===0)return r=>r===n;if(e===1)return n<0?VA.trueFunc:r=>r>=n;const o=Math.abs(e),i=(n%o+o)%o;return e>1?r=>r>=n&&r%o===i:r=>r<=n&&r%o===i}function doe(t){return oRn(nRn(t))}function hoe(t,e){return n=>{const o=e.getParent(n);return o!=null&&e.isTag(o)&&t(n)}}const i3e={contains(t,e,{adapter:n}){return function(i){return t(i)&&n.getText(i).includes(e)}},icontains(t,e,{adapter:n}){const o=e.toLowerCase();return function(r){return t(r)&&n.getText(r).toLowerCase().includes(o)}},"nth-child"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=0;c<a.length&&!o(s,a[c]);c++)n.isTag(a[c])&&A++;return i(A)&&t(s)}},"nth-last-child"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=a.length-1;c>=0&&!o(s,a[c]);c--)n.isTag(a[c])&&A++;return i(A)&&t(s)}},"nth-of-type"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=0;c<a.length;c++){const l=a[c];if(o(s,l))break;n.isTag(l)&&n.getName(l)===n.getName(s)&&A++}return i(A)&&t(s)}},"nth-last-of-type"(t,e,{adapter:n,equals:o}){const i=doe(e);return i===VA.falseFunc?VA.falseFunc:i===VA.trueFunc?hoe(t,n):function(s){const a=n.getSiblings(s);let A=0;for(let c=a.length-1;c>=0;c--){const l=a[c];if(o(s,l))break;n.isTag(l)&&n.getName(l)===n.getName(s)&&A++}return i(A)&&t(s)}},root(t,e,{adapter:n}){return o=>{const i=n.getParent(o);return(i==null||!n.isTag(i))&&t(o)}},scope(t,e,n,o){const{equals:i}=n;return!o||o.length===0?i3e.root(t,e,n):o.length===1?r=>i(o[0],r)&&t(r):r=>o.includes(r)&&t(r)},hover:r3e("isHovered"),visited:r3e("isVisited"),active:r3e("isActive")};function r3e(t){return function(n,o,{adapter:i}){const r=i[t];return typeof r!="function"?VA.falseFunc:function(a){return r(a)&&n(a)}}}const Jlt={empty(t,{adapter:e}){return!e.getChildren(t).some(n=>e.isTag(n)||e.getText(n)!=="")},"first-child"(t,{adapter:e,equals:n}){if(e.prevElementSibling)return e.prevElementSibling(t)==null;const o=e.getSiblings(t).find(i=>e.isTag(i));return o!=null&&n(t,o)},"last-child"(t,{adapter:e,equals:n}){const o=e.getSiblings(t);for(let i=o.length-1;i>=0;i--){if(n(t,o[i]))return!0;if(e.isTag(o[i]))break}return!1},"first-of-type"(t,{adapter:e,equals:n}){const o=e.getSiblings(t),i=e.getName(t);for(let r=0;r<o.length;r++){const s=o[r];if(n(t,s))return!0;if(e.isTag(s)&&e.getName(s)===i)break}return!1},"last-of-type"(t,{adapter:e,equals:n}){const o=e.getSiblings(t),i=e.getName(t);for(let r=o.length-1;r>=0;r--){const s=o[r];if(n(t,s))return!0;if(e.isTag(s)&&e.getName(s)===i)break}return!1},"only-of-type"(t,{adapter:e,equals:n}){const o=e.getName(t);return e.getSiblings(t).every(i=>n(t,i)||!e.isTag(i)||e.getName(i)!==o)},"only-child"(t,{adapter:e,equals:n}){return e.getSiblings(t).every(o=>n(t,o)||!e.isTag(o))}};function Wlt(t,e,n,o){if(n===null){if(t.length>o)throw new Error(`Pseudo-class :${e} requires an argument`)}else if(t.length===o)throw new Error(`Pseudo-class :${e} doesn't have any arguments`)}const iRn={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
        :is(button, input, select, textarea, optgroup, option)[disabled],
        optgroup[disabled] > option,
        fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
    )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},jlt={};function rRn(t,e){return t===VA.falseFunc?VA.falseFunc:n=>e.isTag(n)&&t(n)}function $lt(t,e){const n=e.getSiblings(t);if(n.length<=1)return[];const o=n.indexOf(t);return o<0||o===n.length-1?[]:n.slice(o+1).filter(e.isTag)}function s3e(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}const a3e=(t,e,n,o,i)=>{const r=i(e,s3e(n),o);return r===VA.trueFunc?t:r===VA.falseFunc?VA.falseFunc:s=>r(s)&&t(s)},A3e={is:a3e,matches:a3e,where:a3e,not(t,e,n,o,i){const r=i(e,s3e(n),o);return r===VA.falseFunc?t:r===VA.trueFunc?VA.falseFunc:s=>!r(s)&&t(s)},has(t,e,n,o,i){const{adapter:r}=n,s=s3e(n);s.relativeSelector=!0;const a=e.some(l=>l.some(o3e))?[jlt]:void 0,A=i(e,s,a);if(A===VA.falseFunc)return VA.falseFunc;const c=rRn(A,r);if(a&&A!==VA.trueFunc){const{shouldTestNextSiblings:l=!1}=A;return u=>{if(!t(u))return!1;a[0]=u;const g=r.getChildren(u),h=l?[...g,...$lt(u,r)]:g;return r.existsOne(c,h)}}return l=>t(l)&&r.existsOne(c,r.getChildren(l))}};function sRn(t,e,n,o,i){var r;const{name:s,data:a}=e;if(Array.isArray(a)){if(!(s in A3e))throw new Error(`Unknown pseudo-class :${s}(${a})`);return A3e[s](t,a,n,o,i)}const A=(r=n.pseudos)===null||r===void 0?void 0:r[s],c=typeof A=="string"?A:iRn[s];if(typeof c=="string"){if(a!=null)throw new Error(`Pseudo ${s} doesn't have any arguments`);const l=Glt(c);return A3e.is(t,l,n,o,i)}if(typeof A=="function")return Wlt(A,s,a,1),l=>A(l,a)&&t(l);if(s in i3e)return i3e[s](t,a,n,o);if(s in Jlt){const l=Jlt[s];return Wlt(l,s,a,2),u=>l(u,n,a)&&t(u)}throw new Error(`Unknown pseudo-class :${s}`)}function c3e(t,e){const n=e.getParent(t);return n&&e.isTag(n)?n:null}function aRn(t,e,n,o,i){const{adapter:r,equals:s}=n;switch(e.type){case ba.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case ba.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case ba.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),ZNn[e.action](t,e,n)}case ba.Pseudo:return sRn(t,e,n,o,i);case ba.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:a}=e;return(!n.xmlMode||n.lowerCaseTags)&&(a=a.toLowerCase()),function(c){return r.getName(c)===a&&t(c)}}case ba.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(c){let l=c;for(;l=c3e(l,r);)if(t(l))return!0;return!1};const a=new WeakSet;return function(c){let l=c;for(;l=c3e(l,r);)if(!a.has(l)){if(r.isTag(l)&&t(l))return!0;a.add(l)}return!1}}case"_flexibleDescendant":return function(A){let c=A;do if(t(c))return!0;while(c=c3e(c,r));return!1};case ba.Parent:return function(A){return r.getChildren(A).some(c=>r.isTag(c)&&t(c))};case ba.Child:return function(A){const c=r.getParent(A);return c!=null&&r.isTag(c)&&t(c)};case ba.Sibling:return function(A){const c=r.getSiblings(A);for(let l=0;l<c.length;l++){const u=c[l];if(s(A,u))break;if(r.isTag(u)&&t(u))return!0}return!1};case ba.Adjacent:return r.prevElementSibling?function(A){const c=r.prevElementSibling(A);return c!=null&&t(c)}:function(A){const c=r.getSiblings(A);let l;for(let u=0;u<c.length;u++){const g=c[u];if(s(A,g))break;r.isTag(g)&&(l=g)}return!!l&&t(l)};case ba.Universal:{if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}}function ARn(t,e,n){const o=typeof t=="string"?Glt(t):t;return Xlt(o,e,n)}function qlt(t){return t.type===ba.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(qlt)))}const cRn={type:ba.Descendant},lRn={type:"_flexibleDescendant"},uRn={type:ba.Pseudo,name:"scope",data:null};function gRn(t,{adapter:e},n){const o=!!n?.every(i=>{const r=e.isTag(i)&&e.getParent(i);return i===jlt||r&&e.isTag(r)});for(const i of t){if(!(i.length>0&&o3e(i[0])&&i[0].type!==ba.Descendant))if(o&&!i.some(qlt))i.unshift(cRn);else continue;i.unshift(uRn)}}function Xlt(t,e,n){var o;t.forEach($Nn),n=(o=e.context)!==null&&o!==void 0?o:n;const i=Array.isArray(n),r=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)gRn(t,e,r);else if(t.some(A=>A.length>0&&o3e(A[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;const a=t.map(A=>{if(A.length>=2){const[c,l]=A;c.type!==ba.Pseudo||c.name!=="scope"||(i&&l.type===ba.Descendant?A[1]=lRn:(l.type===ba.Adjacent||l.type===ba.Sibling)&&(s=!0))}return dRn(A,e,r)}).reduce(hRn,VA.falseFunc);return a.shouldTestNextSiblings=s,a}function dRn(t,e,n){var o;return t.reduce((i,r)=>i===VA.falseFunc?VA.falseFunc:aRn(i,r,e,n,Xlt),(o=e.rootFunc)!==null&&o!==void 0?o:VA.trueFunc)}function hRn(t,e){return e===VA.falseFunc||t===VA.trueFunc?t:t===VA.falseFunc||e===VA.trueFunc?e:function(o){return t(o)||e(o)}}const Zlt=(t,e)=>t===e,pRn={adapter:Flt,equals:Zlt};function mRn(t){var e,n,o,i;const r=t??pRn;return(e=r.adapter)!==null&&e!==void 0||(r.adapter=Flt),(n=r.equals)!==null&&n!==void 0||(r.equals=(i=(o=r.adapter)===null||o===void 0?void 0:o.equals)!==null&&i!==void 0?i:Zlt),r}function e0t(t){return function(n,o,i){const r=mRn(i);typeof n!="function"&&(n=ARn(n,r,o));const s=_Rn(o,r.adapter,n.shouldTestNextSiblings);return t(n,s,r)}}function _Rn(t,e,n=!1){return n&&(t=fRn(t,e)),Array.isArray(t)?e.removeSubsets(t):e.getChildren(t)}function fRn(t,e){const n=Array.isArray(t)?t.slice(0):[t],o=n.length;for(let i=0;i<o;i++){const r=$lt(n[i],e);n.push(...r)}return n}const t0t=e0t((t,e,n)=>t===VA.falseFunc||!e||e.length===0?[]:n.adapter.findAll(t,e)),poe=e0t((t,e,n)=>t===VA.falseFunc||!e||e.length===0?null:n.adapter.findOne(t,e));function ts(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function IRn(t,e){return e.map(n=>ts(t,n))}function hC(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function CRn(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function kV(t){return typeof t>"u"}function M0(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function moe(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return moe(r,...i)}}}function D0(...t){return moe(...t)}const{cos:yRn,sin:xRn,PI:ERn}=Math;function W4(t,e,n){const o=yRn(t),i=xRn(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return kV(e)||kV(n)?r:moe([M0(e,n),r,M0(-e,-n)])}function l3e(t,e=void 0,n=void 0){return W4(t*ERn/180,e,n)}function FV(t,e=void 0,n=void 0,o=void 0){kV(e)&&(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return kV(n)||kV(o)?i:moe([M0(n,o),i,M0(-n,-o)])}function BRn(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function _oe(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,_oe.prototype),i.expected=e,i.found=n,i.location=o,i.name="SyntaxError",i}BRn(_oe,Error);function u3e(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}_oe.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,r=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+r.line+":"+r.column;if(n){var a=this.location.end,A=u3e("",r.line.toString().length," "),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`
 --> `+s+`
`+A+` |
`+r.line+" | "+c+`
`+A+" | "+u3e("",i.column-1," ")+u3e("",u,"^")}else e+=`
 at `+s}return e},_oe.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+"-"+r(u[1]):r(u)});return"["+(c.inverted?"^":"")+l.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function r(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length>0){for(u=1,g=1;u<l.length;u++)l[u-1]!==l[u]&&(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function A(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(t)+" but "+A(e)+" found."};function O9(t,e=!1,n=!1){e?n?t=D0(t,FV(-1,-1)):t=D0(t,FV(1,-1)):n&&(t=D0(t,FV(-1,1)));const o=t.a,i=t.b,r=t.c,s=t.d;let a,A,c;if(o!==0||r!==0){const l=Math.hypot(o,r);a=l,A=(o*s-i*r)/l;const u=Math.acos(o/l);c=r>0?-u:u}else if(i!==0||s!==0){const l=Math.hypot(i,s);a=(o*s-i*r)/l,A=l;const u=Math.acos(i/l);c=Math.PI/2+(s>0?-u:u)}else a=0,A=0,c=0;return n&&(a=-a),e&&(A=-A),{translate:{tx:t.e,ty:t.f},scale:{sx:a,sy:A},rotation:{angle:c}}}function g3e(){return{a:-1,c:0,e:0,b:0,d:1,f:0}}function U3(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function n0t(t){return typeof t>"u"}function o0t(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function foe(...t){t=Array.isArray(t[0])?t[0]:t;let e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[n,o,...i]=t,r=e(n,o);return foe(r,...i)}}}var{cos:bRn,sin:SRn}=Math;function QRn(t,e,n){let o=bRn(t),i=SRn(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return n0t(e)||n0t(n)?r:foe([o0t(e,n),r,o0t(-e,-n)])}function vRn(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Ioe(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Ioe.prototype),i.expected=e,i.found=n,i.location=o,i.name="SyntaxError",i}vRn(Ioe,Error);function d3e(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Ioe.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,r=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+r.line+":"+r.column;if(n){var a=this.location.end,A=d3e("",r.line.toString().length," "),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`
 --> `+s+`
`+A+` |
`+r.line+" | "+c+`
`+A+" | "+d3e("",i.column-1," ")+d3e("",u,"^")}else e+=`
 at `+s}return e},Ioe.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+"-"+r(u[1]):r(u)});return"["+(c.inverted?"^":"")+l.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function r(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length>0){for(u=1,g=1;u<l.length;u++)l[u-1]!==l[u]&&(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function A(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(t)+" but "+A(e)+" found."};function h3e(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,i=-1/0,r=s=>{e=Math.min(e,s.x),n=Math.max(n,s.x),o=Math.min(o,s.y),i=Math.max(i,s.y)};return t.forEach(s=>{switch(s.type){case"path":s.points.forEach(r);break;case"text":r({x:s.x,y:s.y});break;case"circle":{let{x:a,y:A,radius:c}=s;r({x:a-c,y:A-c}),r({x:a+c,y:A+c});break}case"box":{let{x:a,y:A,width:c,height:l}=s,u=c/2,g=l/2;r({x:a-u,y:A-g}),r({x:a+u,y:A+g});break}}}),{minX:e,maxX:n,minY:o,maxY:i}}var wRn=(t,e="right")=>{switch(e){case"down":switch(t){case"middle_top":return"middle_right";case"middle_bottom":return"middle_left";case"middle_left":return"middle_bottom";case"middle_right":return"middle_top"}break;case"up":switch(t){case"middle_top":return"middle_left";case"middle_bottom":return"middle_right";case"middle_left":return"middle_top";case"middle_right":return"middle_bottom"}break;case"left":switch(t){case"middle_top":return"middle_bottom";case"middle_bottom":return"middle_top";case"middle_left":return"middle_right";case"middle_right":return"middle_left"}break;case"right":return t}return t},eF=(t,e)=>{let{primitives:n,center:o,ports:i,size:r}=t,s=foe({a:1,b:0,c:0,d:-1,e:0,f:2*o.y}),a=n.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(h=>U3(s,h))};case"text":let l=U3(s,{x:c.x,y:c.y}),u={top_left:"bottom_left",top_right:"bottom_right",bottom_left:"top_left",bottom_right:"top_right",center:"center",middle_top:"middle_bottom",middle_bottom:"middle_top",middle_left:"middle_left",middle_right:"middle_right"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case"circle":case"box":let g=U3(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=>({...c,...U3(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},tF=(t,e)=>{let{primitives:n,center:o,ports:i,size:r}=t,s=foe({a:-1,b:0,c:0,d:1,e:0,f:2*o.x}),a=n.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(h=>U3(s,h))};case"text":let l=U3(s,{x:c.x,y:c.y}),u={top_left:"top_right",top_right:"top_left",bottom_left:"bottom_right",bottom_right:"bottom_left",center:"center",middle_top:"middle_top",middle_bottom:"middle_bottom",middle_left:"middle_right",middle_right:"middle_left"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case"circle":case"box":let g=U3(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=>({...c,...U3(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},LV=(t,e)=>{let{newOrientation:n,overrides:o}=e,i={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},r=QRn(n?i[n]:Math.PI/2,t.center.x,t.center.y),{primitives:s,center:a,size:A,ports:c}=t,l=s.map(h=>{switch(h={...h},h.type){case"path":return{...h,points:h.points.map(_=>U3(r,_))};case"text":let d=U3(r,{x:h.x,y:h.y});return h.anchor=wRn(h.anchor,n??"right"),{...h,x:d.x,y:d.y};case"circle":let p=U3(r,{x:h.x,y:h.y});return{...h,x:p.x,y:p.y};case"box":let m=U3(r,{x:h.x,y:h.y});return{...h,x:m.x,y:m.y,width:h.height,height:h.width}}}),u=c.map(h=>({...h,...U3(r,h)})),g=h3e(l);return{primitives:l,center:a,ports:u,size:{width:g.maxX-g.minX,height:g.maxY-g.minY},...o}},ii=(t,e="down",n={})=>LV(t,{newOrientation:e,overrides:n}),PRn=class{symbol;constructor(e){this.symbol=JSON.parse(JSON.stringify(e)),this.symbol.size=this.computeSize()}changeTextAnchor(e,n,o){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(i=>i.type==="text"&&i.text===e?{...i,anchor:n,...o?{x:i.x+o.x,y:i.y+o.y}:{}}:i)},this}labelPort(e,n){return this.symbol={...this.symbol,ports:this.symbol.ports.map(o=>o.labels.includes(e)?{...o,labels:n}:o)},this}rotateRightFacingSymbol(e){return this.symbol=LV(this.symbol,{newOrientation:e}),this}computeSize(){let e=h3e(this.symbol.primitives);return{width:e.maxX-e.minX,height:e.maxY-e.minY}}build(){return{...this.symbol,size:this.computeSize()}}},Vn=t=>{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],n=t.ports??Object.entries(t.refblocks).flatMap(([i,r])=>[{...r,labels:[i]}]),o=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return n.length===2&&(o={x:(n[0].x+n[1].x)/2,y:(n[0].y+n[1].y)/2}),new PRn({...t,primitives:e,ports:n,center:o})},nF={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path17:{type:"path",points:[{x:0,y:-.13},{x:.07,y:-.11}],color:"primary",fill:!1},path18:{type:"path",points:[{x:.07,y:-.11},{x:.14,y:-.13}],color:"primary",fill:!1},path19:{type:"path",points:[{x:-.15,y:-.13},{x:-.07,y:-.11}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.07,y:-.11},{x:0,y:-.13}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:MRn,bounds:Coe,refblocks:i0t,circles:DRn}=nF,NRn=Vn({primitives:[...Object.values(MRn),...Object.values(DRn),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...i0t.left1,labels:["1"]},{...i0t.right1,labels:["2"]}],size:{width:Coe.width,height:Coe.height},center:{x:Coe.centerX,y:Coe.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:RRn,bounds:yoe,refblocks:r0t,circles:TRn}=nF,kRn=Vn({primitives:[...Object.values(RRn),...Object.values(TRn),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...r0t.left1,labels:["1"]},{...r0t.right1,labels:["2"]}],size:{width:yoe.width,height:yoe.height},center:{x:yoe.centerX,y:yoe.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:FRn,bounds:xoe,refblocks:s0t,circles:LRn}=nF,HRn=Vn({primitives:[...Object.values(FRn),...Object.values(LRn),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...s0t.left1,labels:["1"]},{...s0t.right1,labels:["2"]}],size:{width:xoe.width,height:xoe.height},center:{x:xoe.centerX,y:xoe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ORn,bounds:Eoe,refblocks:a0t,circles:GRn}=nF,YRn=Vn({primitives:[...Object.values(ORn),...Object.values(GRn),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...a0t.left1,labels:["1"]},{...a0t.right1,labels:["2"]}],size:{width:Eoe.width,height:Eoe.height},center:{x:Eoe.centerX,y:Eoe.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:URn,bounds:Boe,refblocks:A0t,circles:KRn}=nF,VRn=Vn({primitives:[...Object.values(URn),...Object.values(KRn),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...A0t.left1,labels:["1"]},{...A0t.right1,labels:["2"]}],size:{width:Boe.width,height:Boe.height},center:{x:Boe.centerX,y:Boe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:zRn,bounds:boe,refblocks:c0t,circles:JRn}=nF,WRn=Vn({primitives:[...Object.values(zRn),...Object.values(JRn),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...c0t.left1,labels:["1"]},{...c0t.right1,labels:["2"]}],size:{width:boe.width,height:boe.height},center:{x:boe.centerX,y:boe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),oF={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.2}],color:"primary",fill:!1},"path43-8-3":{type:"path",points:[{x:.21,y:-.11},{x:.15,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:jRn,texts:Fdr,bounds:Soe,refblocks:l0t,circles:$Rn}=oF,qRn=Vn({primitives:[...Object.values(jRn),...Object.values($Rn),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...l0t.left1,labels:["1"]},{...l0t.right1,labels:["2"]}],size:{width:Soe.width,height:Soe.height},center:{x:Soe.centerX,y:Soe.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),XRn=Vn(oF).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ZRn,texts:Ldr,bounds:Qoe,refblocks:u0t,circles:eTn}=oF,tTn=Vn({primitives:[...Object.values(ZRn),...Object.values(eTn),{type:"text",text:"{REF}",x:-0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.3294553499999995}],ports:[{...u0t.left1,labels:["1"]},{...u0t.right1,labels:["2"]}],size:{width:Qoe.width,height:Qoe.height},center:{x:Qoe.centerX,y:Qoe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),nTn=Vn(oF).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:oTn,texts:Hdr,bounds:voe,refblocks:g0t,circles:iTn}=oF,rTn=Vn({primitives:[...Object.values(oTn),...Object.values(iTn),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...g0t.left1,labels:["1"]},{...g0t.right1,labels:["2"]}],size:{width:voe.width,height:voe.height},center:{x:voe.centerX,y:voe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:sTn,texts:Odr,bounds:woe,refblocks:d0t,circles:aTn}=oF,ATn=Vn({primitives:[...Object.values(sTn),...Object.values(aTn),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...d0t.left1,labels:["1"]},{...d0t.right1,labels:["2"]}],size:{width:woe.width,height:woe.height},center:{x:woe.centerX,y:woe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),p3e={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.14,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.18,y:.18},{x:.11,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.18,y:-.09},{x:.11,y:-.09}],color:"primary",fill:!1}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:cTn,bounds:Poe,refblocks:h0t,circles:lTn}=p3e,uTn=Vn({primitives:[...Object.values(cTn),...Object.values(lTn),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...h0t.left1,labels:["1"]},{...h0t.right1,labels:["2"]}],size:{width:Poe.width,height:Poe.height},center:{x:Poe.centerX,y:Poe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:gTn,bounds:Moe,refblocks:p0t,circles:dTn}=p3e,m0t=Vn({primitives:[...Object.values(gTn),...Object.values(dTn),{type:"text",text:"{REF}",x:-1118e-7,y:-.18},{type:"text",text:"{VAL}",x:1118e-7,y:.2738453}],ports:[{...p0t.left1,labels:["1"]},{...p0t.right1,labels:["2"]}],size:{width:Moe.width,height:Moe.height},center:{x:Moe.centerX,y:Moe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["2"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:hTn,bounds:Doe,refblocks:_0t,circles:pTn}=p3e,mTn=Vn({primitives:[...Object.values(hTn),...Object.values(pTn),{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999985,anchor:"middle_left"},{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.27384530000000007,anchor:"middle_left"}],ports:[{..._0t.left1,labels:["1"]},{..._0t.right1,labels:["2"]}],size:{width:Doe.width,height:Doe.height},center:{x:Doe.centerX,y:Doe.centerY}}).changeTextAnchor("{VAL}","middle_top").labelPort("right1",["2"]).labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),m3e=ii(m0t,"down"),_3e=m3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),f3e=m3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");_3e.anchor="middle_left",f3e.anchor="middle_left",_3e.x=.25,_3e.y+=.21,f3e.y-=.21,f3e.x=.25;var _Tn=m3e,HV={paths:{path43:{type:"path",points:[{x:-.06,y:.19},{x:-.06,y:-.12}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.02,y:.13},{x:.02,y:-.06}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.06,y:.03},{x:-.45,y:.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.03},{x:.03,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.28}},refblocks:{left1:{x:-.45,y:.03},right1:{x:.45,y:.03}},bounds:{width:.95,height:.29,centerX:0,centerY:.06},circles:{}},{paths:fTn,bounds:f0t,refblocks:I0t,circles:ITn}=HV,CTn=Vn({primitives:[...Object.values(fTn),...Object.values(ITn),{type:"text",text:"{REF}",x:-.2,y:.31},{type:"text",text:"{VAL}",x:.2,y:.31}],ports:[{...I0t.left1,labels:["1"]},{...I0t.right1,labels:["2"]}],center:{x:f0t.centerX,y:f0t.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_left").build(),yTn={...CTn,size:{width:.95,height:.9}};function Nl(t){let e=t.size;if(!e){let n=h3e(t.primitives);e={width:n.maxX-n.minX,height:n.maxY-n.minY}}return{...t,size:e}}var{paths:xTn,texts:C0t,bounds:Noe,refblocks:y0t,circles:ETn}=HV,x0t=Nl({primitives:[...Object.values(xTn),...Object.values(ETn),{...C0t.top1,anchor:"middle_bottom"},{...C0t.bottom1,anchor:"middle_top"}],ports:[{...y0t.left1,labels:["1"]},{...y0t.right1,labels:["2"]}],size:{width:Noe.width,height:Noe.height},center:{x:Noe.centerX,y:Noe.centerY}}),{paths:BTn,bounds:E0t,refblocks:B0t,circles:bTn}=HV,STn=Vn({primitives:[...Object.values(BTn),...Object.values(bTn),{type:"text",text:"{REF}",x:0,y:-.22},{type:"text",text:"{VAL}",x:0,y:.28}],ports:[{...B0t.left1,labels:["1"]},{...B0t.right1,labels:["2"]}],center:{x:E0t.centerX,y:E0t.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").build(),QTn={...STn,size:{width:.95,height:.65}},{paths:vTn,bounds:b0t,refblocks:S0t,circles:wTn}=HV,PTn=Vn({primitives:[...Object.values(vTn),...Object.values(wTn),{type:"text",text:"{REF}",x:0,y:.28},{type:"text",text:"{VAL}",x:0,y:-.22}],ports:[{...S0t.left1,labels:["1"]},{...S0t.right1,labels:["2"]}],center:{x:b0t.centerX,y:b0t.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_bottom").build(),MTn={...PTn,size:{width:.95,height:.65}},{paths:DTn,bounds:Q0t,refblocks:v0t,circles:NTn}=HV,RTn=Vn({primitives:[...Object.values(DTn),...Object.values(NTn),{type:"text",text:"{REF}",x:.2,y:-.25},{type:"text",text:"{VAL}",x:-.2,y:-.25}],ports:[{...v0t.left1,labels:["1"]},{...v0t.right1,labels:["2"]}],center:{x:Q0t.centerX,y:Q0t.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_left").build(),TTn={...RTn,size:{width:.95,height:.9}},kTn=LV(x0t,{newOrientation:"up"}),Roe={paths:{path1:{type:"path",points:[{x:-.3,y:0},{x:-.19998,y:0}],color:"primary",fill:!1,strokeWidth:.012},path2:{type:"path",points:[{x:.19998,y:0},{x:.3,y:0}],color:"primary",fill:!1,strokeWidth:.012},path3:{type:"path",points:[{x:-.19998,y:.07998},{x:.19998,y:.07998},{x:.19998,y:-.07998},{x:-.19998,y:-.07998},{x:-.19998,y:.07998}],color:"primary",fill:!1,strokeWidth:.012}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:FTn,bounds:w0t,refblocks:P0t,circles:LTn}=Roe,HTn=Vn({primitives:[...Object.values(FTn),...Object.values(LTn),{type:"text",text:"{REF}",x:-.16,y:.16},{type:"text",text:"{VAL}",x:.16,y:.16}],ports:[{...P0t.left1,labels:["1"]},{...P0t.right1,labels:["2"]}],center:{x:w0t.centerX,y:w0t.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),OTn={...HTn,size:{width:.9,height:.6}},{paths:GTn,bounds:M0t,refblocks:D0t,circles:YTn}=Roe,UTn=Vn({primitives:[...Object.values(GTn),...Object.values(YTn),{type:"text",text:"{REF}",x:0,y:-.16},{type:"text",text:"{VAL}",x:0,y:.16}],ports:[{...D0t.left1,labels:["1"]},{...D0t.right1,labels:["2"]}],center:{x:M0t.centerX,y:M0t.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),KTn={...UTn,size:{width:.6,height:.65}},{paths:VTn,bounds:N0t,refblocks:R0t,circles:zTn}=Roe,JTn=Vn({primitives:[...Object.values(VTn),...Object.values(zTn),{type:"text",text:"{REF}",x:0,y:.16},{type:"text",text:"{VAL}",x:0,y:-.16}],ports:[{...R0t.left1,labels:["1"]},{...R0t.right1,labels:["2"]}],center:{x:N0t.centerX,y:N0t.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),WTn={...JTn,size:{width:.6,height:.65}},Toe={paths:{path2:{type:"path",points:[{x:.15,y:-.01},{x:.55,y:-.01}],color:"primary",fill:!0},"path2-5":{type:"path",points:[{x:-.15,y:.06},{x:.14,y:.06}],color:"primary",fill:!0},"path2-5-1":{type:"path",points:[{x:.14,y:.06},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-5-1-6":{type:"path",points:[{x:-.16,y:.06},{x:-.16,y:-.08}],color:"primary",fill:!0},"path2-5-4":{type:"path",points:[{x:-.15,y:-.08},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-9":{type:"path",points:[{x:-.55,y:-.01},{x:-.17,y:-.01}],color:"primary",fill:!0}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{width:1.16,height:.35,centerX:0,centerY:0},circles:{}},{paths:jTn,bounds:koe,refblocks:T0t,circles:$Tn}=Toe,qTn=Vn({primitives:[...Object.values(jTn),...Object.values($Tn),{type:"text",text:"{REF}",x:-.2,y:.1404553499999995},{type:"text",text:"{VAL}",x:.2,y:.1494553499999995}],ports:[{...T0t.left1,labels:["1"]},{...T0t.right1,labels:["2"]}],size:{width:koe.width,height:koe.height},center:{x:koe.centerX,y:koe.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:XTn,bounds:Foe,refblocks:k0t,circles:ZTn}=Toe,ekn=Vn({primitives:[...Object.values(XTn),...Object.values(ZTn),{type:"text",text:"{REF}",x:0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.1704553499999995}],ports:[{...k0t.left1,labels:["1"]},{...k0t.right1,labels:["2"]}],size:{width:Foe.width,height:Foe.height},center:{x:Foe.centerX,y:Foe.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:tkn,bounds:Loe,refblocks:F0t,circles:nkn}=Toe,okn=Vn({primitives:[...Object.values(tkn),...Object.values(nkn),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...F0t.left1,labels:["1"]},{...F0t.right1,labels:["2"]}],size:{width:Loe.width,height:Loe.height},center:{x:Loe.centerX,y:Loe.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:ikn,bounds:Hoe,refblocks:L0t,circles:rkn}=Toe,skn=Vn({primitives:[...Object.values(ikn),...Object.values(rkn),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...L0t.left1,labels:["1"]},{...L0t.right1,labels:["2"]}],size:{width:Hoe.width,height:Hoe.height},center:{x:Hoe.centerX,y:Hoe.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:akn,bounds:H0t,refblocks:O0t,circles:Akn}=Roe,ckn=Vn({primitives:[...Object.values(akn),...Object.values(Akn),{type:"text",text:"{REF}",x:.16,y:-.16},{type:"text",text:"{VAL}",x:-.16,y:-.16}],ports:[{...O0t.left1,labels:["1"]},{...O0t.right1,labels:["2"]}],center:{x:H0t.centerX,y:H0t.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),lkn={...ckn,size:{width:.9,height:.6}},I3e={paths:{"horizontal-bar":{type:"path",points:[{x:-.4,y:0},{x:.4,y:0}],color:"primary",fill:!1},"middle-dash-1":{type:"path",points:[{x:0,y:.2},{x:0,y:.07}],color:"primary",fill:!1},"middle-dash-2":{type:"path",points:[{x:0,y:.01},{x:0,y:-.12}],color:"primary",fill:!1},"middle-dash-3":{type:"path",points:[{x:0,y:-.18},{x:0,y:-.31}],color:"primary",fill:!1},"left-vertical":{type:"path",points:[{x:-.25,y:0},{x:-.25,y:-.2}],color:"primary",fill:!1},"right-vertical":{type:"path",points:[{x:.25,y:0},{x:.25,y:-.2}],color:"primary",fill:!1},"left-ground":{type:"path",points:[{x:-.3,y:-.2},{x:-.25,y:-.3},{x:-.2,y:-.2},{x:-.3,y:-.2}],color:"primary",fill:!1},"right-ground":{type:"path",points:[{x:.2,y:-.2},{x:.25,y:-.3},{x:.3,y:-.2},{x:.2,y:-.2}],color:"primary",fill:!1}},refblocks:{left1:{x:-.4,y:0},right1:{x:.4,y:0}},bounds:{centerX:0,centerY:-.02},circles:{}},{paths:ukn,bounds:G0t,refblocks:Y0t,circles:gkn}=I3e,dkn=Vn({primitives:[...Object.values(ukn),...Object.values(gkn),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...Y0t.left1,labels:["1"]},{...Y0t.right1,labels:["2"]}],center:{x:G0t.centerX,y:G0t.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:hkn,bounds:U0t,refblocks:K0t,circles:pkn}=I3e,V0t=Vn({primitives:[...Object.values(hkn),...Object.values(pkn),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...K0t.left1,labels:["1"]},{...K0t.right1,labels:["2"]}],center:{x:U0t.centerX,y:U0t.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),mkn=tF(V0t),{paths:_kn,bounds:z0t,refblocks:J0t,circles:fkn}=I3e,Ikn=Vn({primitives:[...Object.values(_kn),...Object.values(fkn),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...J0t.left1,labels:["1"]},{...J0t.right1,labels:["2"]}],center:{x:z0t.centerX,y:z0t.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),Ooe={paths:{path27:{type:"path",points:[{x:.3,y:0},{x:.06,y:0}],color:"primary",fill:!1,strokeWidth:.012},path28:{type:"path",points:[{x:-.06,y:0},{x:-.3,y:0}],color:"primary",fill:!1,strokeWidth:.012},path29:{type:"path",points:[{x:.06,y:.16002},{x:.06,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012},path30:{type:"path",points:[{x:-.06,y:.16002},{x:-.06,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.24,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-.24,anchor:"middle_top"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.24,maxY:.24,width:.6,height:.48,centerX:0,centerY:0},circles:{}},{paths:Ckn,texts:Gdr,bounds:Goe,refblocks:W0t,circles:ykn}=Ooe,xkn=Vn({primitives:[...Object.values(Ckn),...Object.values(ykn),{type:"text",text:"{REF}",x:-.2,y:.115},{type:"text",text:"{VAL}",x:.2,y:.115}],ports:[{...W0t.left1,labels:["1"]},{...W0t.right1,labels:["2"]}],size:{width:Goe.width,height:Goe.height},center:{x:Goe.centerX,y:Goe.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),Ekn={...xkn,size:{width:.9,height:.6}},Bkn=Vn(Ooe).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),bkn={...Bkn,size:{width:.6,height:.65}},Yoe={paths:{path27:{type:"path",points:[{x:.3,y:0},{x:657e-6,y:0}],color:"primary",fill:!1,strokeWidth:.012},path28:{type:"path",points:[{x:-.038683,y:0},{x:-.3,y:0}],color:"primary",fill:!1,strokeWidth:.012},path30:{type:"path",points:[{x:-.074255,y:.16002},{x:-.074255,y:.16002},{x:-.069544,y:.149352},{x:-.065126,y:.138684},{x:-.061005,y:.128016},{x:-.057182,y:.117348},{x:-.053663,y:.10668},{x:-.05045,y:.096012},{x:-.047547,y:.085344},{x:-.044957,y:.074676},{x:-.042684,y:.064008},{x:-.040732,y:.05334},{x:-.039103,y:.042672},{x:-.037801,y:.032004},{x:-.03683,y:.021336},{x:-.036193,y:.010668},{x:-.035893,y:0},{x:-.036193,y:-.010668},{x:-.03683,y:-.021336},{x:-.037801,y:-.032004},{x:-.039103,y:-.042672},{x:-.040732,y:-.05334},{x:-.042684,y:-.064008},{x:-.044957,y:-.074676},{x:-.047547,y:-.085344},{x:-.05045,y:-.096012},{x:-.053663,y:-.10668},{x:-.057182,y:-.117348},{x:-.061005,y:-.128016},{x:-.065126,y:-.138684},{x:-.069544,y:-.149352},{x:-.074255,y:-.16002},{x:-.074255,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012},"path30-7":{type:"path",points:[{x:-385e-6,y:.16002},{x:-385e-6,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012},"path30-9-2":{type:"path",points:[{x:.156026,y:.2},{x:.085846,y:.2}],color:"primary",fill:!1,strokeWidth:.012},"path30-9-2-9":{type:"path",points:[{x:.120936,y:.16491},{x:.120936,y:.23509}],color:"primary",fill:!1,strokeWidth:.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.42,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42,anchor:"middle_top"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.55,maxY:.55,width:.6,height:1.1,centerX:0,centerY:0},circles:{"viewbox-padding-min":{type:"circle",x:-.3,y:-.55,radius:0,fill:!1,color:"transparent"},"viewbox-padding-max":{type:"circle",x:.3,y:.55,radius:0,fill:!1,color:"transparent"}}},Skn=Vn(Yoe).rotateRightFacingSymbol("up").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.3}).changeTextAnchor("{VAL}","middle_left",{x:-.12,y:-.3}).build(),Qkn=Vn(Yoe).rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),vkn=Vn(Yoe).rotateRightFacingSymbol("left").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.78}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.78}).build(),wkn=Vn(Yoe).rotateRightFacingSymbol("down").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_left",{x:-.12,y:.3}).changeTextAnchor("{VAL}","middle_left",{x:.72,y:-.3}).build(),Pkn=Vn(Ooe).rotateRightFacingSymbol("right").changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").build(),Mkn={...Pkn,size:{width:.6,height:.65}},{paths:Dkn,texts:Ydr,bounds:Uoe,refblocks:j0t,circles:Nkn}=Ooe,Rkn=Vn({primitives:[...Object.values(Dkn),...Object.values(Nkn),{type:"text",text:"{REF}",x:.2,y:-.095},{type:"text",text:"{VAL}",x:-.2,y:-.095}],ports:[{...j0t.left1,labels:["1"]},{...j0t.right1,labels:["2"]}],size:{width:Uoe.width,height:Uoe.height},center:{x:Uoe.centerX,y:Uoe.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),Tkn={...Rkn,size:{width:.9,height:.6}},iF={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.29,y:.29},{x:.29,y:-.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.37}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.37,maxY:.37,width:1.14,height:.74,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:kkn,texts:Udr,bounds:Koe,refblocks:$0t,circles:Fkn}=iF,Lkn=Vn({primitives:[...Object.values(kkn),...Object.values(Fkn),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...$0t.left1,labels:["1"]},{...$0t.right1,labels:["2"]}],size:{width:Koe.width,height:Koe.height},center:{x:Koe.centerX,y:Koe.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Hkn=Vn(iF).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Okn,texts:Kdr,bounds:Voe,refblocks:q0t,circles:Gkn}=iF,Ykn=Vn({primitives:[...Object.values(Okn),...Object.values(Gkn),{type:"text",text:"{REF}",x:-0,y:-.2894553499999995},{type:"text",text:"{VAL}",x:0,y:.3894553499999995}],ports:[{...q0t.left1,labels:["1"]},{...q0t.right1,labels:["2"]}],size:{width:Voe.width,height:Voe.height},center:{x:Voe.centerX,y:Voe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Ukn=Vn(iF).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Kkn,texts:Vdr,bounds:zoe,refblocks:X0t,circles:Vkn}=iF,zkn=Vn({primitives:[...Object.values(Kkn),...Object.values(Vkn),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...X0t.left1,labels:["1"]},{...X0t.right1,labels:["2"]}],size:{width:zoe.width,height:zoe.height},center:{x:zoe.centerX,y:zoe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Jkn,texts:zdr,bounds:Joe,refblocks:Z0t,circles:Wkn}=iF,jkn=Vn({primitives:[...Object.values(Jkn),...Object.values(Wkn),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...Z0t.left1,labels:["1"]},{...Z0t.right1,labels:["2"]}],size:{width:Joe.width,height:Joe.height},center:{x:Joe.centerX,y:Joe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Woe={paths:{path27:{type:"path",points:[{x:.54,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:.25},{x:.13,y:-.27}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:.25},{x:.07,y:-.28}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:.25},{x:-.14,y:-.27}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:.26},{x:-.08,y:-.27}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.21,y:.32},{x:.2,y:.32}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.71},{x:0,y:.33},{x:0,y:.32}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:-.21,y:.32},{x:-.21,y:.25}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.2,y:.32},{x:.2,y:.25}],color:"primary",fill:!1},"path43-9":{type:"path",points:[{x:.19,y:-.35},{x:-.22,y:-.35}],color:"primary",fill:!1},"path44-0-5":{type:"path",points:[{x:-.02,y:-.71},{x:-.02,y:-.36},{x:-.02,y:-.35}],color:"primary",fill:!1},"path43-8-1":{type:"path",points:[{x:.19,y:-.35},{x:.19,y:-.28}],color:"primary",fill:!1},"path43-8-8-9":{type:"path",points:[{x:-.22,y:-.35},{x:-.22,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.54,y:-.01}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"{REF}",x:.53,y:.28},right1:{type:"text",text:"{VAL}",x:.54,y:-.28}},refblocks:{top1:{x:0,y:.71},bottom1:{x:-.02,y:-.71},left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.74,maxY:.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:$kn,texts:Jdr,bounds:joe,refblocks:$oe,circles:qkn}=Woe,Xkn=Vn({primitives:[...Object.values($kn),...Object.values(qkn),{type:"text",text:"{REF}",x:-.4,y:.4094554499999995},{type:"text",text:"{VAL}",x:.4,y:.4094553499999995}],ports:[{...$oe.left1,labels:["1"]},{...$oe.right1,labels:["3"]},{...$oe.bottom1,labels:["2"]},{...$oe.top1,labels:["4"]}],size:{width:joe.width,height:joe.height},center:{x:joe.centerX,y:joe.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),Zkn=Vn(Woe).labelPort("top1",["2","gnd1"]).labelPort("bottom1",["4","gnd2"]).labelPort("left1",["3"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),eFn=Vn(Woe).labelPort("top1",["4","gnd1"]).labelPort("bottom1",["2","gnd2"]).labelPort("left1",["1"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),{paths:tFn,texts:Wdr,bounds:qoe,refblocks:Xoe,circles:nFn}=Woe,oFn=Vn({primitives:[...Object.values(tFn),...Object.values(nFn),{type:"text",text:"{VAL}",x:-.4,y:-.4094554499999995},{type:"text",text:"{REF}",x:.4,y:-.4094553499999995}],ports:[{...Xoe.left1,labels:["1"]},{...Xoe.right1,labels:["3"]},{...Xoe.bottom1,labels:["2"]},{...Xoe.top1,labels:["4"]}],size:{width:qoe.width,height:qoe.height},center:{x:qoe.centerX,y:qoe.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),Zoe={paths:{path27:{type:"path",points:[{x:.55,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.55,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:-.28},{x:.13,y:.25}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:-.28},{x:.07,y:.25}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:-.28},{x:-.14,y:.25}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:-.28},{x:-.08,y:.25}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{VAL}",x:-.01,y:-.42},bottom1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{minX:-.58,maxX:.58,minY:-.52,maxY:.43,width:1.16,height:1,centerX:0,centerY:-.04},circles:{}},{paths:iFn,texts:jdr,bounds:eie,refblocks:eut,circles:rFn}=Zoe,sFn=Vn({primitives:[...Object.values(iFn),...Object.values(rFn),{type:"text",text:"{REF}",x:-.3,y:.3094553499999995},{type:"text",text:"{VAL}",x:.3,y:.3094553499999995}],ports:[{...eut.left1,labels:["1"]},{...eut.right1,labels:["2"]}],size:{width:eie.width,height:eie.height},center:{x:eie.centerX,y:eie.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),aFn=Vn(Zoe).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),AFn=Vn(Zoe).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:cFn,texts:$dr,bounds:tie,refblocks:tut,circles:lFn}=Zoe,uFn=Vn({primitives:[...Object.values(cFn),...Object.values(lFn),{type:"text",text:"{REF}",x:.3,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.3094553499999995}],ports:[{...tut.left1,labels:["1"]},{...tut.right1,labels:["2"]}],size:{width:tie.width,height:tie.height},center:{x:tie.centerX,y:tie.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),OV=.6,C3e=.3,gFn=[{type:"path",points:[{x:-OV,y:0},{x:-C3e,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:C3e,y:0},{x:OV,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:C3e,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],dFn=Vn({primitives:[...gFn,{type:"text",text:"{REF}",x:-.2,y:.35},{type:"text",text:"{VAL}",x:.2,y:.35}],ports:[{x:-OV,y:0,labels:["1"]},{x:OV,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:OV*2,height:.9}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),GV=.6,y3e=.3,hFn=[{type:"path",points:[{x:-GV,y:0},{x:-y3e,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:y3e,y:0},{x:GV,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:y3e,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],pFn=Vn({primitives:[...hFn,{type:"text",text:"{REF}",x:0,y:-.4},{type:"text",text:"{VAL}",x:0,y:.4}],ports:[{x:-GV,y:0,labels:["1"]},{x:GV,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:GV*2,height:.9}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),YV=.6,x3e=.3,mFn=[{type:"path",points:[{x:-YV,y:0},{x:-x3e,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:x3e,y:0},{x:YV,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:x3e,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],_Fn=Vn({primitives:[...mFn,{type:"text",text:"{REF}",x:0,y:.4},{type:"text",text:"{VAL}",x:0,y:-.4}],ports:[{x:-YV,y:0,labels:["1"]},{x:YV,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:YV*2,height:.9}}).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),UV=.6,E3e=.3,fFn=[{type:"path",points:[{x:-UV,y:0},{x:-E3e,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:E3e,y:0},{x:UV,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:E3e,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],IFn=Vn({primitives:[...fFn,{type:"text",text:"{REF}",x:.2,y:-.35},{type:"text",text:"{VAL}",x:-.2,y:-.35}],ports:[{x:-UV,y:0,labels:["1"]},{x:UV,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:UV*2,height:.9}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),rF={paths:{path11:{type:"path",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:"primary",fill:!1},"arrow-2":{type:"path",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:"primary",fill:!0},path1:{type:"path",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:"primary",fill:!1},path2:{type:"path",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:"primary",fill:!1},path3:{type:"path",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:"primary",fill:!1},path4:{type:"path",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:"primary",fill:!1},"arrow-1":{type:"path",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:"primary",fill:!0},path9:{type:"path",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:1.88,y:-1.94},right1:{type:"text",text:"{REF}",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:.77,height:.86,centerX:1.96,centerY:-1.55},circles:{"path1-0":{type:"circle",x:2.05,y:-1.54,radius:.3,color:"primary",fill:!1}}},CFn=Vn(rF).rotateRightFacingSymbol("down").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:0,y:.15}).build(),yFn=Vn(rF).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),xFn=Vn(rF).rotateRightFacingSymbol("left").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.8}).changeTextAnchor("{REF}","middle_left",{x:0,y:.8}).build(),EFn=Vn(rF).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),BFn=Vn(rF).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),bFn=Vn(rF).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),SFn={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0,radius:.29,color:"primary",fill:!1}}},{paths:nut,bounds:nie,refblocks:out,circles:QFn}=SFn,KV=Nl({primitives:[nut.path11,nut.path12,{type:"path",points:[{x:-.12,y:.14},{x:.12,y:.14}],color:"primary",fill:!1},...Object.values(QFn),{type:"text",text:"{REF}",x:0,y:.3594553499999995,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.35,anchor:"middle_top"},{type:"path",points:[{x:-.095,y:-.16},{x:0,y:.09}],color:"primary",fill:!1},{type:"path",points:[{x:0,y:.09},{x:.095,y:-.16}],color:"primary",fill:!1},{type:"path",points:[{x:-.048,y:-.045},{x:.048,y:-.045}],color:"primary",fill:!1}],ports:[{...out.left1,labels:["1"]},{...out.right1,labels:["2"]}],size:{width:nie.width,height:nie.height},center:{x:nie.centerX,y:nie.centerY}}),B3e=structuredClone(KV);B3e.primitives=B3e.primitives.map(t=>t.type!=="text"?t:t.text==="{REF}"?{...t,x:-.16,y:.3594553499999995,anchor:"middle_bottom"}:t.text==="{VAL}"?{...t,x:.16,y:.35,anchor:"middle_bottom"}:t);var iut=LV(B3e,{newOrientation:"down"}),vFn=tF(KV),wFn=KV,b3e=structuredClone(KV);b3e.primitives=b3e.primitives.map(t=>t.type!=="text"?t:t.text==="{REF}"?{...t,x:.16,y:-.3594553499999995,anchor:"middle_top"}:t.text==="{VAL}"?{...t,x:-.16,y:-.35,anchor:"middle_top"}:t);var PFn=LV(b3e,{newOrientation:"up"}),sF={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12,y:-.14},{x:.12,y:-.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:MFn,bounds:oie,refblocks:rut,circles:DFn}=sF,NFn=Vn({primitives:[...Object.values(MFn),...Object.values(DFn),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...rut.left1,labels:["1"]},{...rut.right1,labels:["2"]}],size:{width:oie.width,height:oie.height},center:{x:oie.centerX,y:oie.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:RFn,bounds:iie,refblocks:sut,circles:TFn}=sF,kFn=Vn({primitives:[...Object.values(RFn),...Object.values(TFn),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...sut.left1,labels:["1"]},{...sut.right1,labels:["2"]}],size:{width:iie.width,height:iie.height},center:{x:iie.centerX,y:iie.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:FFn,bounds:rie,refblocks:aut,circles:LFn}=sF,HFn=Vn({primitives:[...Object.values(FFn),...Object.values(LFn),{type:"text",text:"{REF}",x:-0,y:-.3294553499999995},{type:"text",text:"{VAL}",x:0,y:.4294553499999995}],ports:[{...aut.left1,labels:["1"]},{...aut.right1,labels:["2"]}],size:{width:rie.width,height:rie.height},center:{x:rie.centerX,y:rie.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:OFn,bounds:sie,refblocks:Aut,circles:GFn}=sF,YFn=Vn({primitives:[...Object.values(OFn),...Object.values(GFn),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...Aut.left1,labels:["1"]},{...Aut.right1,labels:["2"]}],size:{width:sie.width,height:sie.height},center:{x:sie.centerX,y:sie.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:UFn,bounds:aie,refblocks:cut,circles:KFn}=sF,VFn=Vn({primitives:[...Object.values(UFn),...Object.values(KFn),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...cut.left1,labels:["1"]},{...cut.right1,labels:["2"]}],size:{width:aie.width,height:aie.height},center:{x:aie.centerX,y:aie.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:zFn,bounds:Aie,refblocks:lut,circles:JFn}=sF,WFn=Vn({primitives:[...Object.values(zFn),...Object.values(JFn),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...lut.left1,labels:["1"]},{...lut.right1,labels:["2"]}],size:{width:Aie.width,height:Aie.height},center:{x:Aie.centerX,y:Aie.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),aF={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},jFn=Vn(aF).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:-.03,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.2}).build(),$Fn=Vn(aF).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),qFn=Vn(aF).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.8}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.9}).build(),XFn=Vn(aF).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),ZFn=Vn(aF).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),eLn=Vn(aF).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),cie={paths:{triangle:{type:"path",points:[{x:-.06,y:-.09},{x:-.06,y:.09},{x:.06,y:0},{x:-.06,y:-.09}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.11,y:0},{x:-.06,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.11,y:0}},bounds:{centerX:0,centerY:0}},{paths:tLn,bounds:uut,refblocks:nLn}=cie,oLn=Vn({primitives:[...Object.values(tLn),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...nLn.left1,labels:["1"]}],center:{x:uut.centerX,y:uut.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:iLn,bounds:gut,refblocks:rLn}=cie,sLn=Vn({primitives:[...Object.values(iLn),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...rLn.left1,labels:["1"]}],center:{x:gut.centerX,y:gut.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:aLn,bounds:dut,refblocks:ALn}=cie,cLn=Vn({primitives:[...Object.values(aLn),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...ALn.left1,labels:["1"]}],center:{x:dut.centerX,y:dut.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:lLn,bounds:hut,refblocks:uLn}=cie,gLn=Vn({primitives:[...Object.values(lLn),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...uLn.left1,labels:["1"]}],center:{x:hut.centerX,y:hut.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),dLn={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},lie=Vn(dLn).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),hLn=ii(lie,"down"),pLn=ii(lie,"left"),mLn=ii(lie,"up"),_Ln={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-2":{type:"path",points:[{x:-.07,y:.22},{x:.11,y:.16}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-5":{type:"path",points:[{x:-.07,y:-.19},{x:.1,y:-.24}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.2},{x:0,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.56},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},uie=Vn(_Ln).labelPort("left1",["1"]).labelPort("right1",["3"]).labelPort("right2",["2"]).labelPort("right3",["6"]).labelPort("left2",["4"]).labelPort("right5",["5"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),S3e=ii(uie,"down"),Q3e=S3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),v3e=S3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Q3e.anchor="middle_bottom",v3e.anchor="middle_top",Q3e.x=0,Q3e.y+=.537,v3e.y-=.5375,v3e.x=0;var fLn=S3e,w3e=ii(uie,"left"),P3e=w3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),M3e=w3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");P3e.anchor="middle_bottom",M3e.anchor="middle_top",P3e.x=0,P3e.y+=1,M3e.y-=1,M3e.x=0;var ILn=w3e,D3e=ii(uie,"up"),N3e=D3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),R3e=D3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");N3e.anchor="middle_bottom",R3e.anchor="middle_top",N3e.x=0,N3e.y+=.537,R3e.y-=.5375,R3e.x=0;var CLn=D3e,yLn={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.23},{x:.11,y:.33}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-6":{type:"path",points:[{x:-.07,y:-.18},{x:.11,y:-.07}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.12},{x:0,y:.27}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.61},bottom1:{type:"text",text:"{VAL}",x:0,y:-.52}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},gie=Vn(yLn).labelPort("left1",["1"]).labelPort("right1",["3"]).labelPort("right2",["2"]).labelPort("right3",["6"]).labelPort("left2",["4"]).labelPort("right5",["5"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),T3e=ii(gie,"down"),k3e=T3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),F3e=T3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");k3e.anchor="middle_bottom",F3e.anchor="middle_top",k3e.x=0,k3e.y+=.565,F3e.y-=.555,F3e.x=0;var xLn=T3e,L3e=ii(gie,"left"),H3e=L3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),O3e=L3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");H3e.anchor="middle_bottom",O3e.anchor="middle_top",H3e.x=0,H3e.y+=1.09,O3e.y-=1.09,O3e.x=0;var ELn=L3e,G3e=ii(gie,"up"),Y3e=G3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),U3e=G3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Y3e.anchor="middle_bottom",U3e.anchor="middle_top",Y3e.x=0,Y3e.y+=.565,U3e.y-=.555,U3e.x=0;var BLn=G3e,bLn={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.11,y:.11}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.17},{x:.11,y:-.12}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.31}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},die=Vn(bLn).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),K3e=ii(die,"down"),V3e=K3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),z3e=K3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");V3e.anchor="middle_bottom",z3e.anchor="middle_top",V3e.x=.4,V3e.y+=.265,z3e.y-=.265,z3e.x=.4;var SLn=K3e,J3e=ii(die,"left"),W3e=J3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),j3e=J3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");W3e.anchor="middle_bottom",j3e.anchor="middle_top",W3e.x=0,W3e.y+=.67,j3e.y-=.67,j3e.x=0;var QLn=J3e,$3e=ii(die,"up"),q3e=$3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),X3e=$3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");q3e.anchor="middle_bottom",X3e.anchor="middle_top",q3e.x=.46,q3e.y+=.265,X3e.y-=.265,X3e.x=.46;var vLn=$3e,wLn={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.1,y:.2}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.16},{x:.1,y:-.03}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},hie=Vn(wLn).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Z3e=ii(hie,"down"),eEe=Z3e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),tEe=Z3e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");eEe.anchor="middle_bottom",tEe.anchor="middle_top",eEe.x=.4,eEe.y+=.295,tEe.y-=.295,tEe.x=.42;var PLn=Z3e,nEe=ii(hie,"left"),oEe=nEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),iEe=nEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");oEe.anchor="middle_bottom",iEe.anchor="middle_top",oEe.x=0,oEe.y+=.795,iEe.y-=.795,iEe.x=0;var MLn=nEe,rEe=ii(hie,"up"),sEe=rEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),aEe=rEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");sEe.anchor="middle_bottom",aEe.anchor="middle_top",sEe.x=.46,sEe.y+=.315,aEe.y-=.315,aEe.x=.46;var DLn=rEe,put={paths:{path5:{type:"path",points:[{x:-.44,y:0},{x:-.16,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.17,y:0},{x:.44,y:.01}],color:"primary",fill:!1},path9:{type:"path",points:[{x:-.25,y:-.16},{x:.02,y:.3},{x:.25,y:.17},{x:-.02,y:-.29},{x:-.25,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.44,y:0},right1:{x:.44,y:.01}},bounds:{minX:-.57,maxX:.57,minY:-.25,maxY:.25,width:1.13,height:.5,centerX:0,centerY:0},circles:{}},{paths:NLn,texts:qdr,bounds:pie,refblocks:mut,circles:RLn}=put,_ut=Vn({primitives:[...Object.values(NLn),...Object.values(RLn),{type:"text",text:"{REF}",x:.18,y:-.3204553499999995},{type:"text",text:"{VAL}",x:-.25,y:-.3294553499999995}],ports:[{...mut.left1,labels:["1"]},{...mut.right1,labels:["2"]}],size:{width:pie.width,height:pie.height},center:{x:pie.centerX,y:pie.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),AEe=eF(_ut),cEe=AEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),lEe=AEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");cEe.anchor="middle_left",lEe.anchor="middle_left",cEe.y+=.4,cEe.x=.32,lEe.y-=.45,lEe.x=.32;var TLn=AEe,fut=Vn(put).labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),kLn=tF(fut),AF={paths:{path11:{type:"path",points:[{x:-.56,y:.04},{x:-.22,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:.05},{x:.48,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.14,y:-.15},{x:.14,y:.25}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.22,y:.25},{x:-.21,y:-.15},{x:.14,y:.05},{x:-.22,y:.25}],color:"primary",fill:!0}},refblocks:{left1:{x:-.56,y:.04},right1:{x:.48,y:.05}},bounds:{width:1.18,height:.76,centerX:0,centerY:0},circles:{}},{paths:FLn,bounds:mie,refblocks:Iut,circles:LLn}=AF,HLn=Vn({primitives:[...Object.values(FLn),...Object.values(LLn),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...Iut.left1,labels:["1"]},{...Iut.right1,labels:["2"]}],size:{width:mie.width,height:mie.height},center:{x:mie.centerX,y:mie.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:OLn,bounds:_ie,refblocks:Cut,circles:GLn}=AF,YLn=Vn({primitives:[...Object.values(OLn),...Object.values(GLn),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...Cut.left1,labels:["1"]},{...Cut.right1,labels:["2"]}],size:{width:_ie.width,height:_ie.height},center:{x:_ie.centerX,y:_ie.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ULn,bounds:fie,refblocks:yut,circles:KLn}=AF,VLn=Vn({primitives:[...Object.values(ULn),...Object.values(KLn),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...yut.left1,labels:["1"]},{...yut.right1,labels:["2"]}],size:{width:fie.width,height:fie.height},center:{x:fie.centerX,y:fie.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:zLn,bounds:Iie,refblocks:xut,circles:JLn}=AF,WLn=Vn({primitives:[...Object.values(zLn),...Object.values(JLn),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...xut.left1,labels:["1"]},{...xut.right1,labels:["2"]}],size:{width:Iie.width,height:Iie.height},center:{x:Iie.centerX,y:Iie.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:jLn,bounds:Cie,refblocks:Eut,circles:$Ln}=AF,qLn=Vn({primitives:[...Object.values(jLn),...Object.values($Ln),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...Eut.left1,labels:["1"]},{...Eut.right1,labels:["2"]}],size:{width:Cie.width,height:Cie.height},center:{x:Cie.centerX,y:Cie.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:XLn,bounds:yie,refblocks:But,circles:ZLn}=AF,eHn=Vn({primitives:[...Object.values(XLn),...Object.values(ZLn),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...But.left1,labels:["1"]},{...But.right1,labels:["2"]}],size:{width:yie.width,height:yie.height},center:{x:yie.centerX,y:yie.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),tHn={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Hz",x:0,y:-.04}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:nHn,texts:oHn,bounds:xie,refblocks:but,circles:iHn}=tHn,uEe=Nl({primitives:[...Object.values(nHn),...Object.values(iHn),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...oHn.left1,x:0,y:.01,anchor:"center",fontSize:.2}],ports:[{...but.left1,labels:["1"]},{...but.right1,labels:["2"]}],size:{width:xie.width,height:xie.height},center:{x:xie.centerX,y:xie.centerY}}),{5:rHn,...sHn}=uEe.primitives;function aHn(t){return typeof t=="object"}var Sut=ii({...uEe,primitives:Object.values(sHn).filter(aHn)}),AHn={...Sut,primitives:[...Sut.primitives,rHn]},cHn={paths:{path10:{type:"path",points:[{x:-.53,y:.04},{x:.53,y:.04}],color:"primary",fill:!1},path14:{type:"path",points:[{x:0,y:.17},{x:.27,y:.17},{x:.27,y:-.1},{x:-.26,y:-.1},{x:-.26,y:.17},{x:0,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.24}},refblocks:{left1:{x:-.53,y:.04},right1:{x:.53,y:.04}},bounds:{width:1.13,height:.47,centerX:0,centerY:0}},{paths:lHn,texts:uHn,bounds:Eie,refblocks:Qut}=cHn,vut=Nl({primitives:[...Object.values(lHn),{...uHn.top1,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.2,anchor:"middle_top"}],ports:[{...Qut.left1,labels:["1"]},{...Qut.right1,labels:["2"]}],size:{width:Eie.width,height:Eie.height},center:{x:Eie.centerX,y:Eie.centerY}}),gHn=ii(vut),cF={paths:{path1:{type:"path",points:[{x:-.29,y:.01},{x:.04,y:0}],color:"primary",fill:!0},path2:{type:"path",points:[{x:.04,y:-.22},{x:.04,y:.22}],color:"primary",fill:!0},path3:{type:"path",points:[{x:.12,y:-.17},{x:.12,y:.17}],color:"primary",fill:!0},path4:{type:"path",points:[{x:.19,y:-.06},{x:.19,y:.06}],color:"primary",fill:!0}},texts:{right1:{type:"text",text:"{REF}",x:.31,y:-.02}},refblocks:{left1:{x:-.29,y:.01}},bounds:{minX:-.31,maxX:.31,minY:-.22,maxY:.22,width:.62,height:.45,centerX:0,centerY:0},circles:{}},dHn=Vn(cF).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),hHn=Vn(cF).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),pHn=Vn(cF).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),mHn=Vn(cF).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),_Hn=Vn(cF).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),fHn=Vn(cF).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),gEe={paths:{path11:{type:"path",points:[{x:-.52,y:.03},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.04},{x:.52,y:.04}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.31,y:.2},{x:-.31,y:-.11},{x:-.01,y:.04},{x:-.3,y:.2}],color:"primary",fill:!0},"path11-0-9-5":{type:"path",points:[{x:.33,y:.2},{x:.33,y:-.1},{x:.04,y:.04},{x:.33,y:.2}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.04,y:.32},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.32}},refblocks:{left1:{x:-.52,y:.03},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.32,maxY:.32,width:1.09,height:.63,centerX:0,centerY:0},circles:{}},{paths:Xdr,texts:Zdr,bounds:ehr,refblocks:thr,circles:nhr}=gEe,IHn=Vn(gEe).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),CHn=Vn(gEe).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),yHn={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.3,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:"primary",fill:!1},box:{type:"path",points:[{x:-.3,y:-.4},{x:.3,y:-.4},{x:.3,y:.4},{x:-.3,y:.4},{x:-.3,y:-.4},{x:-.3,y:.4}],color:"primary",fill:!1},"path48-1":{type:"path",points:[{x:-.3,y:.13},{x:-.54,y:.13}],color:"primary",fill:!1},"path48-2":{type:"path",points:[{x:-.3,y:-.13},{x:-.54,y:-.13}],color:"primary",fill:!1},"path48-3":{type:"path",points:[{x:.3,y:-.13},{x:.54,y:-.13}],color:"primary",fill:!1},"path48-4":{type:"path",points:[{x:.3,y:.13},{x:.54,y:.13}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.43},right1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.54,y:.13},left2:{x:-.54,y:-.13},right1:{x:.54,y:-.13},right2:{x:.54,y:.13}},bounds:{minX:-.56,maxX:.56,minY:-.32,maxY:.32,width:1.13,height:.65,centerX:0,centerY:0},circles:{}},Bie=Vn(yHn).labelPort("left1",["1","DIN"]).labelPort("left2",["2","POWER"]).labelPort("right1",["3","GND"]).labelPort("right2",["4","DOUT"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),xHn=ii(Bie,"down"),EHn=tF(Bie),dEe=ii(Bie,"up"),hEe=dEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),pEe=dEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");hEe.anchor="middle_left",pEe.anchor="middle_left",hEe.y+=.21,hEe.x=.44,pEe.y-=.21,pEe.x=.44;var BHn=dEe,bHn={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:-.01,y:0}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.01,y:-.12},{x:.01,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.28,y:-.25},{x:.28,y:-.56}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.56},{x:.28,y:.27}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.17,y:-.22},{x:.28,y:-.23},{x:.23,y:-.14}],color:"primary",fill:!0},path17:{type:"path",points:[{x:.08,y:-.09},{x:.23,y:-.2}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.28,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.36},bottom1:{type:"text",text:"{VAL}",x:.02,y:-.42}},refblocks:{top1:{x:.28,y:.56},bottom1:{x:.28,y:-.56},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:.01,radius:.29,color:"primary",fill:!1}}},wut=Vn(bHn).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),mEe=ii(wut),_Ee=mEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Put=mEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");_Ee.anchor="middle_left",Put.anchor="middle_right",_Ee.x=.45,_Ee.y+=.065,Put.y+=.065;var SHn=mEe,QHn={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.02,y:-.02},{x:.02,y:-.1}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.19},{x:-.17,y:-.19}],color:"primary",fill:!1},"path12-1-5-6-8":{type:"path",points:[{x:.02,y:.17},{x:.02,y:.11}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.15,y:-.03},{x:.2,y:-.19}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.19},{x:.47,y:-.19}],color:"primary",fill:!1},"path12-1-8-6-9-4":{type:"path",points:[{x:.02,y:.12},{x:.02,y:.02}],color:"primary",fill:!1},"path12-1-8-6-9-4-3":{type:"path",points:[{x:.08,y:.11},{x:.08,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-3-1":{type:"path",points:[{x:-.04,y:.11},{x:-.04,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-4":{type:"path",points:[{x:.08,y:.11},{x:-.04,y:.11}],color:"primary",fill:!1},"path14-5":{type:"path",points:[{x:-.01,y:.28},{x:.01,y:.25},{x:.04,y:.23},{x:.06,y:.2}],color:"primary",fill:!0},"path14-5-3":{type:"path",points:[{x:-.01,y:.2},{x:.01,y:.23},{x:.04,y:.25},{x:.06,y:.28}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.38},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.38}},refblocks:{left1:{x:-.47,y:-.19},right1:{x:.47,y:-.19}},bounds:{minX:-.5,maxX:.5,minY:-.38,maxY:.38,width:1,height:.76,centerX:0,centerY:0},circles:{path9:{type:"circle",x:.02,y:.24,radius:.06,color:"primary",fill:!1}}},Mut=Vn(QHn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Dut=ii(Mut),Nut=Dut.primitives.filter(t=>t.type==="text"),fEe=Nut.find(t=>t.text==="{VAL}");fEe.x=-.35,fEe.y=0,fEe.anchor="middle_right";var IEe=Nut.find(t=>t.text==="{REF}");IEe.y=0,IEe.x=.35,IEe.anchor="middle_left";var vHn=Dut,bie={paths:{path8698:{type:"path",points:[{x:-.19796749999999919,y:-.023826854587889912},{x:-.2004570399999992,y:-.018993393814014044},{x:-.2029465799999992,y:-.014174384106555204},{x:-.20543611999999922,y:-.009384187436300498},{x:-.20792565999999923,y:-.004636988132081332},{x:-.21041519999999925,y:5329457033053167e-20},{x:-.21290473999999926,y:.004673092344940184},{x:-.21539427999999927,y:.009209271428771242},{x:-.21788381999999928,y:.013649213595881985},{x:-.2203733599999993,y:.01798089395292432},{x:-.2228628999999993,y:.022192955076609913},{x:-.22535243999999932,y:.02627477703600152},{x:-.22784197999999933,y:.030216542867918667},{x:-.23033151999999935,y:.03400929910178016},{x:-.23282105999999936,y:.03764501096072756},{x:-.23531059999999937,y:.04111661189869628},{x:-.23780013999999938,y:.04441804716802203},{x:-.2402896799999994,y:.04754431114897349},{x:-.2427792199999994,y:.05049147821106258},{x:-.24526875999999942,y:.053256726915861724},{x:-.24775829999999943,y:.05583835741211009},{x:-.25024783999999944,y:.05823580191586174},{x:-.25273737999999946,y:.060449628211062575},{x:-.25522691999999947,y:.0624815361489735},{x:-.2577164599999995,y:.06433434716802203},{x:-.2602059999999995,y:.06601198689869628},{x:-.2626955399999995,y:.06751946096072757},{x:-.2651850799999995,y:.06886282410178016},{x:-.26767461999999953,y:.07004914286791866},{x:-.27016415999999954,y:.0710864520360015},{x:-.27265369999999955,y:.07198370507660991},{x:-.27514323999999957,y:.07275071895292433},{x:-.2776327799999996,y:.07339811359588198},{x:-.2801223199999996,y:.07393724642877124},{x:-.2826118599999996,y:.07438014234494018},{x:-.2851013999999996,y:.07473941957033053},{x:-.28759093999999963,y:.07502821186791866},{x:-.29008047999999964,y:.07526008756369952},{x:-.29257001999999965,y:.07544896589344477},{x:-.29505955999999967,y:.07560903118598594},{x:-.2975490999999997,y:.07575464541211008},{x:-.30003863749999965,y:.07560903118598594},{x:-.3025281749999997,y:.07544896589344477},{x:-.30501771249999965,y:.07526008756369951},{x:-.3075072499999996,y:.07502821186791866},{x:-.30999678749999965,y:.07473941957033052},{x:-.3124863249999996,y:.07438014234494018},{x:-.3149758624999996,y:.07393724642877124},{x:-.31746539999999956,y:.07339811359588198},{x:-.3199549374999996,y:.07275071895292431},{x:-.32244447499999956,y:.07198370507660991},{x:-.32493401249999954,y:.0710864520360015},{x:-.32742354999999956,y:.07004914286791866},{x:-.32991308749999954,y:.06886282410178016},{x:-.3324026249999995,y:.06751946096072756},{x:-.33489216249999954,y:.06601198689869628},{x:-.3373816999999995,y:.06433434716802203},{x:-.3398712374999995,y:.06248153614897349},{x:-.3423607749999995,y:.06044962821106258},{x:-.3448503124999994,y:.05823580191586174},{x:-.34733984999999945,y:.05583835741211009},{x:-.3498293874999995,y:.053256726915861724},{x:-.35231892499999945,y:.050491478211062576},{x:-.3548084624999994,y:.0475443111489735},{x:-.3572979999999994,y:.04441804716802203},{x:-.35978753749999937,y:.04111661189869628},{x:-.3622770749999994,y:.03764501096072756},{x:-.36476661249999937,y:.03400929910178016},{x:-.36725614999999934,y:.030216542867918673},{x:-.36974568749999936,y:.02627477703600152},{x:-.37223522499999934,y:.022192955076609917},{x:-.3747247624999993,y:.017980893952924324},{x:-.37721429999999934,y:.013649213595881985},{x:-.3797038374999993,y:.00920927142877125},{x:-.3821933749999993,y:.004673092344940191},{x:-.3846829124999993,y:5329457033053514e-20},{x:-.3871724499999993,y:-.004636988132081328},{x:-.38966198749999925,y:-.009384187436300498},{x:-.3921515249999992,y:-.014174384106555197},{x:-.39464106249999925,y:-.01899339381401404},{x:-.3971305999999992,y:-.023826854587889912}],color:"primary",fill:!1},path8700:{type:"path",points:[{x:.0011955000000007932,y:-.02382615458789039},{x:-.00129403749999919,y:-.01899269131401453},{x:-.0037835749999991734,y:-.014173679106555696},{x:-.006273112499999156,y:-.009383479936300985},{x:-.00876264999999914,y:-.004636278132081827},{x:-.011252187499999122,y:5400707033003174e-20},{x:-.013741724999999105,y:.004673807344939681},{x:-.016231262499999087,y:.009209988928770731},{x:-.018720799999999073,y:.013649933595881476},{x:-.021210337499999055,y:.017981616452923805},{x:-.023699874999999038,y:.022193680076609393},{x:-.026189412499999024,y:.026275504536001},{x:-.028678949999999002,y:.030217272867918137},{x:-.03116848749999899,y:.034010031601779636},{x:-.03365802499999897,y:.03764574596072702},{x:-.03614756249999895,y:.04111734939869574},{x:-.03863709999999894,y:.04441878716802149},{x:-.04112663749999892,y:.04754505364897295},{x:-.043616174999998904,y:.05049222321106203},{x:-.04610571249999888,y:.05325747441586117},{x:-.04859524999999887,y:.055839107412109526},{x:-.051084787499998854,y:.05823655441586117},{x:-.05357432499999884,y:.06045038321106201},{x:-.05606386249999881,y:.06248229364897292},{x:-.0585533999999988,y:.06433510716802145},{x:-.061042937499998784,y:.0660127493986957},{x:-.06353247499999877,y:.06752022596072697},{x:-.06602201249999876,y:.06886359160177957},{x:-.06851154999999873,y:.07004991286791806},{x:-.07100108749999871,y:.07108722453600091},{x:-.0734906249999987,y:.0719844800766093},{x:-.07598016249999869,y:.07275149645292371},{x:-.07846969999999867,y:.07339889359588138},{x:-.08095923749999864,y:.07393802892877062},{x:-.08344877499999863,y:.07438092734493956},{x:-.08593831249999861,y:.07474020707032991},{x:-.0884278499999986,y:.07502900186791804},{x:-.09091738749999859,y:.07526088006369888},{x:-.09340692499999856,y:.07544976089344414},{x:-.09589646249999854,y:.0756098286859853},{x:-.09838599999999853,y:.07575544541210943},{x:-.10087553999999854,y:.0756098286859853},{x:-.10336507999999855,y:.07544976089344414},{x:-.10585461999999857,y:.07526088006369887},{x:-.10834415999999858,y:.07502900186791804},{x:-.11083369999999859,y:.0747402070703299},{x:-.1133232399999986,y:.07438092734493956},{x:-.11581277999999862,y:.07393802892877062},{x:-.11830231999999863,y:.07339889359588138},{x:-.12079185999999864,y:.07275149645292371},{x:-.12328139999999865,y:.0719844800766093},{x:-.12577093999999867,y:.07108722453600091},{x:-.12826047999999868,y:.07004991286791806},{x:-.1307500199999987,y:.06886359160177957},{x:-.1332395599999987,y:.06752022596072697},{x:-.13572909999999871,y:.0660127493986957},{x:-.13821863999999873,y:.06433510716802145},{x:-.14070817999999874,y:.06248229364897291},{x:-.14319771999999875,y:.06045038321106202},{x:-.14568725999999876,y:.05823655441586117},{x:-.14817679999999878,y:.055839107412109526},{x:-.1506663399999988,y:.05325747441586117},{x:-.1531558799999988,y:.05049222321106202},{x:-.1556454199999988,y:.047545053648972956},{x:-.15813495999999883,y:.04441878716802149},{x:-.16062449999999884,y:.04111734939869574},{x:-.16311403999999885,y:.03764574596072702},{x:-.16560357999999886,y:.034010031601779636},{x:-.16809311999999887,y:.03021727286791814},{x:-.1705826599999989,y:.026275504536001},{x:-.1730721999999989,y:.022193680076609396},{x:-.1755617399999989,y:.017981616452923805},{x:-.17805127999999892,y:.013649933595881474},{x:-.18054081999999894,y:.00920998892877074},{x:-.18303035999999895,y:.0046738073449396865},{x:-.18551989999999896,y:5400707033003521e-20},{x:-.18800943999999897,y:-.004636278132081827},{x:-.19049897999999899,y:-.009383479936300985},{x:-.192988519999999,y:-.01417367910655569},{x:-.19547805999999898,y:-.018992691314014522},{x:-.19796759999999902,y:-.02382615458789039}],color:"primary",fill:!1},path8702:{type:"path",points:[{x:.2003586000000006,y:-.02382615458789039},{x:.19786906000000057,y:-.01899269131401453},{x:.19537952000000058,y:-.014173679106555696},{x:.19288998000000057,y:-.009383479936300985},{x:.1904004400000006,y:-.004636278132081827},{x:.18791090000000055,y:5400707033003174e-20},{x:.1854213600000005,y:.004673807344939681},{x:.18293182000000052,y:.009209988928770731},{x:.1804422800000005,y:.013649933595881476},{x:.17795274000000053,y:.017981616452923805},{x:.17546320000000049,y:.022193680076609393},{x:.17297366000000047,y:.026275504536001},{x:.17048412000000046,y:.030217272867918137},{x:.16799458000000045,y:.034010031601779636},{x:.16550504000000044,y:.03764574596072702},{x:.16301550000000042,y:.04111734939869574},{x:.1605259600000004,y:.04441878716802149},{x:.1580364200000004,y:.04754505364897295},{x:.1555468800000004,y:.05049222321106203},{x:.15305734000000037,y:.05325747441586117},{x:.15056780000000036,y:.055839107412109526},{x:.14807826000000035,y:.05823655441586117},{x:.14558872000000034,y:.06045038321106201},{x:.14309918000000033,y:.06248229364897292},{x:.1406096400000003,y:.06433510716802145},{x:.1381201000000003,y:.0660127493986957},{x:.1356305600000003,y:.06752022596072697},{x:.13314102000000028,y:.06886359160177957},{x:.13065148000000026,y:.07004991286791806},{x:.12816194000000025,y:.07108722453600091},{x:.12567240000000024,y:.0719844800766093},{x:.12318286000000023,y:.07275149645292371},{x:.12069332000000021,y:.07339889359588138},{x:.1182037800000002,y:.07393802892877062},{x:.11571424000000019,y:.07438092734493956},{x:.11322470000000018,y:.07474020707032991},{x:.11073516000000017,y:.07502900186791804},{x:.10824562000000015,y:.07526088006369888},{x:.10575608000000014,y:.07544976089344414},{x:.10326654000000013,y:.0756098286859853},{x:.10077700000000012,y:.07575544541210943},{x:.09828746250000013,y:.0756098286859853},{x:.09579792500000014,y:.07544976089344414},{x:.09330838750000017,y:.07526088006369887},{x:.09081885000000019,y:.07502900186791804},{x:.0883293125000002,y:.0747402070703299},{x:.08583977500000022,y:.07438092734493956},{x:.08335023750000023,y:.07393802892877062},{x:.08086070000000026,y:.07339889359588138},{x:.07837116250000027,y:.07275149645292371},{x:.07588162500000029,y:.0719844800766093},{x:.0733920875000003,y:.07108722453600091},{x:.07090255000000031,y:.07004991286791806},{x:.06841301250000034,y:.06886359160177957},{x:.06592347500000036,y:.06752022596072697},{x:.06343393750000037,y:.0660127493986957},{x:.060944400000000384,y:.06433510716802145},{x:.0584548625000004,y:.06248229364897291},{x:.05596532500000043,y:.06045038321106202},{x:.05347578750000044,y:.05823655441586117},{x:.050986250000000455,y:.055839107412109526},{x:.04849671250000047,y:.05325747441586117},{x:.04600717500000048,y:.05049222321106202},{x:.04351763750000051,y:.047545053648972956},{x:.041028100000000525,y:.04441878716802149},{x:.03853856250000054,y:.04111734939869574},{x:.036049025000000554,y:.03764574596072702},{x:.03355948750000057,y:.034010031601779636},{x:.031069950000000596,y:.03021727286791814},{x:.02858041250000061,y:.026275504536001},{x:.026090875000000624,y:.022193680076609396},{x:.023601337500000638,y:.017981616452923805},{x:.021111800000000652,y:.013649933595881474},{x:.01862226250000068,y:.00920998892877074},{x:.016132725000000694,y:.0046738073449396865},{x:.013643187500000709,y:5400707033003521e-20},{x:.011153650000000723,y:-.004636278132081827},{x:.008664112500000737,y:-.009383479936300985},{x:.006174575000000764,y:-.01417367910655569},{x:.0036850375000007786,y:-.018992691314014522},{x:.0011955000000007932,y:-.02382615458789039}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:.3995216000000006,y:-.02382615458789039},{x:.39703206250000056,y:-.01899269131401453},{x:.3945425250000006,y:-.014173679106555696},{x:.3920529875000006,y:-.009383479936300985},{x:.38956345000000064,y:-.004636278132081827},{x:.38707391250000067,y:5400707033003174e-20},{x:.3845843750000007,y:.004673807344939681},{x:.38209483750000073,y:.009209988928770731},{x:.37960530000000076,y:.013649933595881476},{x:.3771157625000008,y:.017981616452923805},{x:.37462622500000076,y:.022193680076609393},{x:.37213668750000073,y:.026275504536001},{x:.36964715000000076,y:.030217272867918137},{x:.3671576125000008,y:.034010031601779636},{x:.3646680750000008,y:.03764574596072702},{x:.36217853750000084,y:.04111734939869574},{x:.3596890000000008,y:.04441878716802149},{x:.3571994625000009,y:.04754505364897295},{x:.35470992500000087,y:.05049222321106203},{x:.35222038750000095,y:.05325747441586117},{x:.3497308500000009,y:.055839107412109526},{x:.3472413125000009,y:.05823655441586117},{x:.344751775000001,y:.06045038321106201},{x:.34226223750000095,y:.06248229364897292},{x:.33977270000000104,y:.06433510716802145},{x:.337283162500001,y:.0660127493986957},{x:.334793625000001,y:.06752022596072697},{x:.33230408750000107,y:.06886359160177957},{x:.3298145500000011,y:.07004991286791806},{x:.32732501250000107,y:.07108722453600091},{x:.3248354750000011,y:.0719844800766093},{x:.3223459375000011,y:.07275149645292371},{x:.3198564000000011,y:.07339889359588138},{x:.3173668625000012,y:.07393802892877062},{x:.31487732500000115,y:.07438092734493956},{x:.3123877875000012,y:.07474020707032991},{x:.3098982500000012,y:.07502900186791804},{x:.30740871250000124,y:.07526088006369888},{x:.30491917500000126,y:.07544976089344414},{x:.30242963750000124,y:.0756098286859853},{x:.29994010000000126,y:.07575544541210943},{x:.29745056000000125,y:.0756098286859853},{x:.29496102000000124,y:.07544976089344414},{x:.2924714800000012,y:.07526088006369887},{x:.2899819400000012,y:.07502900186791804},{x:.2874924000000012,y:.0747402070703299},{x:.2850028600000012,y:.07438092734493956},{x:.2825133200000012,y:.07393802892877062},{x:.28002378000000117,y:.07339889359588138},{x:.27753424000000115,y:.07275149645292371},{x:.27504470000000114,y:.0719844800766093},{x:.27255516000000113,y:.07108722453600091},{x:.2700656200000011,y:.07004991286791806},{x:.2675760800000011,y:.06886359160177957},{x:.2650865400000011,y:.06752022596072697},{x:.2625970000000011,y:.0660127493986957},{x:.26010746000000107,y:.06433510716802145},{x:.25761792000000105,y:.06248229364897291},{x:.25512838000000104,y:.06045038321106202},{x:.25263884000000103,y:.05823655441586117},{x:.250149300000001,y:.055839107412109526},{x:.247659760000001,y:.05325747441586117},{x:.245170220000001,y:.05049222321106202},{x:.24268068000000098,y:.047545053648972956},{x:.24019114000000097,y:.04441878716802149},{x:.23770160000000096,y:.04111734939869574},{x:.23521206000000094,y:.03764574596072702},{x:.23272252000000093,y:.034010031601779636},{x:.23023298000000092,y:.03021727286791814},{x:.2277434400000009,y:.026275504536001},{x:.2252539000000009,y:.022193680076609396},{x:.22276436000000088,y:.017981616452923805},{x:.22027482000000087,y:.013649933595881474},{x:.21778528000000086,y:.00920998892877074},{x:.21529574000000085,y:.0046738073449396865},{x:.21280620000000083,y:5400707033003521e-20},{x:.21031666000000082,y:-.004636278132081827},{x:.2078271200000008,y:-.009383479936300985},{x:.2053375800000008,y:-.01417367910655569},{x:.20284804000000078,y:-.018992691314014522},{x:.20035850000000077,y:-.02382615458789039}],color:"primary",fill:!1},path8706:{type:"path",points:[{x:-.40026109999999937,y:-.022544054587890106},{x:-.5272914999999991,y:-.022544054587890106}],color:"primary",fill:!1},"path8706-5":{type:"path",points:[{x:.5282280000000006,y:-.027111054587890093},{x:.4011975999999997,y:-.027111054587890093}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0020145999999989783,y:.22997364541210996},bottom1:{type:"text",text:"{VAL}",x:-.002185205294839676,y:-.22997364541210996}},refblocks:{left1:{x:-.5279125,y:-.021272154587890446},right1:{x:.5279125,y:-.026521254587889898}},bounds:{minX:-.556070941,maxX:.556070941,minY:-.22997364541210996,maxY:.22997364541210996,width:1.112141882,height:.4599472908242199,centerX:0,centerY:0},circles:{}},wHn=Vn(bie).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right",{x:-.5,y:0}).changeTextAnchor("{VAL}","middle_left",{x:.5,y:0}).build(),PHn=Vn(bie).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.5}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.5}).build(),MHn=Vn(bie).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),DHn=Vn(bie).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_left").build(),Rut={paths:{path11:{type:"path",points:[{x:-.54,y:-.06},{x:-.15,y:-.06}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:-.05},{x:-.13,y:-.18}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.08},{x:.13,y:-.05}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.18},{x:-.13,y:.08}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.08},{x:.13,y:-.18}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:-.05},{x:.54,y:-.06}],color:"primary",fill:!1},"path25-0-9-8":{type:"path",points:[{x:-.03,y:.39},{x:-.05,y:.47},{x:-.08,y:.39}],color:"primary",fill:!0},"path78-6-5-5":{type:"path",points:[{x:-.05,y:.27},{x:-.05,y:.29},{x:-.05,y:.41},{x:-.05,y:.42}],color:"primary",fill:!1},"path25-0-9-8-2":{type:"path",points:[{x:.07,y:.39},{x:.04,y:.47},{x:.02,y:.39}],color:"primary",fill:!0},"path78-6-5-5-7":{type:"path",points:[{x:.04,y:.27},{x:.04,y:.29},{x:.04,y:.41},{x:.04,y:.42}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:.03,y:.06},{x:.03,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.38,y:.38},bottom1:{type:"text",text:"{VAL}",x:.38,y:-.47}},refblocks:{left1:{x:-.54,y:-.06},right1:{x:.54,y:-.06}},bounds:{minX:-.57,maxX:.57,minY:-.47,maxY:.47,width:1.14,height:.93,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.05,radius:.29,color:"primary",fill:!1}}};Rut.bounds.width+=.2;var Sie=Vn(Rut).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),CEe=ii(Sie,"down"),yEe=CEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),xEe=CEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");yEe.anchor="middle_left",xEe.anchor="middle_left",yEe.y+=.9,yEe.x=.3,xEe.y-=.1,xEe.x=.3;var NHn=CEe,EEe=ii(Sie,"left"),BEe=EEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),bEe=EEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");BEe.anchor="middle_left",bEe.anchor="middle_left",BEe.y+=.71,BEe.x=.44,bEe.y-=.71,bEe.x=.44;var RHn=EEe,SEe=ii(Sie,"up"),QEe=SEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),vEe=SEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");QEe.anchor="middle_left",vEe.anchor="middle_left",QEe.y+=.1,QEe.x=.3,vEe.y-=.71,vEe.x=.3;var THn=SEe,kHn={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.54,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.54,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.21},right1:{type:"text",text:"{REF}",x:0,y:.41}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.13,height:.65,centerX:0,centerY:0},circles:{}},{paths:FHn,texts:Tut,bounds:Qie,refblocks:kut,circles:LHn}=kHn,wEe=Nl({primitives:[...Object.values(FHn),...Object.values(LHn),{...Tut.bottom1,anchor:"middle_top"},{...Tut.right1,anchor:"middle_bottom"}],ports:[{...kut.left1,labels:["1"]},{...kut.right1,labels:["2"]}],size:{width:Qie.width,height:Qie.height},center:{x:Qie.centerX,y:Qie.centerY}}),PEe=ii(wEe,"up"),MEe=PEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),DEe=PEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");MEe.anchor="middle_left",DEe.anchor="middle_left",MEe.y+=.21,MEe.x=.21,DEe.y-=.21,DEe.x=.21;var Fut=PEe,NEe=eF(Fut),REe=NEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),TEe=NEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");REe.anchor="middle_left",TEe.anchor="middle_left",REe.y+=.4,REe.x=.2,TEe.y-=.41,TEe.x=.2;var HHn=NEe,OHn=tF(wEe),GHn={paths:{path11:{type:"path",points:[{x:-.52,y:-.01},{x:-.18,y:-.01}],color:"primary",fill:!1},"path11-2":{type:"path",points:[{x:-.17,y:-.11},{x:-.17,y:.08}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.17,y:-.12},{x:.16,y:-.12}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:-.17,y:.08},{x:.16,y:.08}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.17,y:-.01},{x:.52,y:-.01}],color:"primary",fill:!1},"path11-2-1":{type:"path",points:[{x:.16,y:-.12},{x:.16,y:.08}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:-.4,y:-.21},{x:-.33,y:-.18},{x:-.34,y:-.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:-.45,y:-.34},{x:-.44,y:-.32},{x:-.35,y:-.22},{x:-.35,y:-.22}],color:"primary",fill:!1},"path25-0-9-0":{type:"path",points:[{x:-.3,y:-.34},{x:-.22,y:-.31},{x:-.24,y:-.4}],color:"primary",fill:!0},"path78-6-5-9":{type:"path",points:[{x:-.35,y:-.46},{x:-.34,y:-.45},{x:-.25,y:-.35},{x:-.25,y:-.35}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17,y:-.41},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.46}},refblocks:{left1:{x:-.52,y:-.01},right1:{x:.52,y:-.01}},bounds:{width:1.1,height:.62,centerX:0,centerY:-.02},circles:{path1:{type:"circle",x:0,y:-.02,radius:.28,color:"primary",fill:!1}}},{paths:YHn,texts:Lut,bounds:vie,refblocks:Hut,circles:UHn}=GHn,Out=Nl({primitives:[...Object.values(YHn),...Object.values(UHn),{...Lut.top1,anchor:"middle_left",x:0},{...Lut.bottom1,anchor:"middle_left",x:0}],ports:[{...Hut.left1,labels:["1"]},{...Hut.right1,labels:["2"]}],size:{width:vie.width,height:vie.height},center:{x:vie.centerX,y:vie.centerY}}),Gut=ii(Out),Yut=Gut.primitives.filter(t=>t.type==="text"),kEe=Yut.find(t=>t.text==="{VAL}");kEe.x=-.35,kEe.y=0,kEe.anchor="middle_right";var FEe=Yut.find(t=>t.text==="{REF}");FEe.y=0,FEe.x=.35,FEe.anchor="middle_left";var KHn=Gut,VHn={paths:{path208:{type:"path",points:[{x:.38,y:.13},{x:.52,y:-.13}],color:"primary",fill:!1},path209:{type:"path",points:[{x:.25,y:-.13},{x:.38,y:.13}],color:"primary",fill:!1},path210:{type:"path",points:[{x:.52,y:-.13},{x:.25,y:-.13}],color:"primary",fill:!1},path211:{type:"path",points:[{x:.25,y:.13},{x:.52,y:.13}],color:"primary",fill:!1},path212:{type:"path",points:[{x:.12,y:-.4},{x:.38,y:-.4}],color:"primary",fill:!1},path213:{type:"path",points:[{x:.38,y:.4},{x:.12,y:.4}],color:"primary",fill:!1},path214:{type:"path",points:[{x:.12,y:.54},{x:.12,y:.18}],color:"primary",fill:!1},path215:{type:"path",points:[{x:.12,y:-.54},{x:.12,y:0}],color:"primary",fill:!1},path216:{type:"path",points:[{x:.38,y:-.4},{x:.38,y:.4}],color:"primary",fill:!1},path217:{type:"path",points:[{x:-.14,y:.26},{x:-.14,y:-.27}],color:"primary",fill:!1},path218:{type:"path",points:[{x:-.22,y:-.27},{x:-.22,y:.26}],color:"primary",fill:!1},path219:{type:"path",points:[{x:-.54,y:-.27},{x:-.22,y:-.27}],color:"primary",fill:!1},path220:{type:"path",points:[{x:-.14,y:-.19},{x:.12,y:-.19}],color:"primary",fill:!1},path221:{type:"path",points:[{x:-.14,y:.18},{x:.12,y:.18}],color:"primary",fill:!1},path222:{type:"path",points:[{x:-.07,y:0},{x:.12,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{VAL}",x:.57,y:.02},right2:{type:"text",text:"{REF}",x:.57,y:.21}},refblocks:{top1:{x:.12,y:.54},bottom1:{x:.12,y:-.54},left1:{x:-.54,y:-.27}},bounds:{centerX:0,centerY:0}};function VV(t,e){return{width:Math.max(...e.map(n=>Math.abs(n.x-t.x)))*2,height:Math.max(...e.map(n=>Math.abs(n.y-t.y)))*2}}var{paths:zHn,texts:Uut,bounds:Kut,refblocks:lF}=VHn,Vut={x:Kut.centerX+.2,y:Kut.centerY},zut=Nl({primitives:[...Object.values(zHn),{...Uut.right1,anchor:"middle_left"},{...Uut.right2,anchor:"middle_left"}],ports:[{...lF.top1,labels:["1"]},{...lF.bottom1,labels:["2"]},{...lF.left1,labels:["3"]}],size:VV(Vut,[lF.top1,lF.bottom1,lF.left1]),center:Vut}),LEe=ii(zut),Jut=LEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),HEe=LEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Jut.anchor="middle_top",HEe.anchor="middle_top",Jut.x=HEe.x,HEe.y+=.15;var JHn=LEe,WHn={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.01,y:.07},{x:.01,y:-.01}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.09},{x:-.17,y:-.09}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.16,y:-.01},{x:.17,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.09},{x:.47,y:-.09}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.1,y:.06},{x:-.1,y:.06},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.09,y:.09},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.11},{x:-.09,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.05,y:.14},{x:-.05,y:.15},{x:-.05,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.01,y:.16},{x:-.01,y:.16},{x:0,y:.16},{x:0,y:.16},{x:0,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.05,y:.15},{x:.05,y:.15},{x:.05,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.08,y:.14},{x:.08,y:.13},{x:.08,y:.13},{x:.08,y:.13},{x:.09,y:.13},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.1,y:.11},{x:.1,y:.11},{x:.1,y:.1},{x:.1,y:.1},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.06},{x:.11,y:.06},{x:.1,y:.06},{x:.1,y:.06},{x:.09,y:.06},{x:.09,y:.06},{x:.08,y:.06},{x:.07,y:.06},{x:.07,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.04,y:.06},{x:.03,y:.06},{x:.03,y:.06},{x:.02,y:.06},{x:.01,y:.06},{x:.01,y:.06},{x:0,y:.06},{x:-.01,y:.06},{x:-.01,y:.06},{x:-.02,y:.06},{x:-.03,y:.06},{x:-.03,y:.06},{x:-.04,y:.06},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.07,y:.06},{x:-.07,y:.06},{x:-.08,y:.06},{x:-.09,y:.06},{x:-.09,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.27}},refblocks:{left1:{x:-.47,y:-.09},right1:{x:.47,y:-.09}},bounds:{width:1,height:.53,centerX:0,centerY:0},circles:{}},{paths:jHn,texts:Wut,bounds:wie,refblocks:jut,circles:$Hn}=WHn,$ut=Nl({primitives:[...Object.values(jHn),...Object.values($Hn),{...Wut.top1,anchor:"middle_bottom",x:0},{...Wut.bottom1,anchor:"middle_top",x:0}],ports:[{...jut.left1,labels:["1"]},{...jut.right1,labels:["2"]}],size:{width:wie.width,height:wie.height},center:{x:wie.centerX+.006,y:wie.centerY+.06}}),OEe=ii($ut),zV=OEe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Pie=OEe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");zV.anchor="middle_left",Pie.anchor="middle_right",zV.x=zV.x-.03,zV.y=zV.y,Pie.x=Pie.x,Pie.y=0;var qHn=OEe,Jl=({horizontalSymbol:t,verticalSymbol:e,gateSide:n,drainSide:o})=>{let i=n==="left"||n==="right",r=o==="left"||o==="right";if(i===r)throw new Error(`Invalid MOSFET orientation: gate ${n}, drain ${o}. Gate and drain must be perpendicular.`);let s=i?t:e;return(n==="right"||r&&o==="left")&&(s=tF(s)),(n==="bottom"||!r&&o==="bottom")&&(s=eF(s)),s},XHn={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:ZHn,texts:qut,bounds:Xut,refblocks:uF,circles:eOn}=XHn,Zut={x:Xut.centerX,y:Xut.centerY},G9=Nl({primitives:[...Object.values(ZHn),...Object.values(eOn),{...qut.top1,anchor:"middle_right",x:0},{...qut.bottom1,anchor:"middle_right",x:0}],ports:[{...uF.top1,labels:["1","drain"]},{...uF.bottom1,labels:["2","source"]},{...uF.left1,labels:["3","gate"]}],size:VV(Zut,[uF.top1,uF.bottom1,uF.left1]),center:Zut}),egt=ii(G9),tgt=egt.primitives.filter(t=>t.type==="text"),GEe=tgt.find(t=>t.text==="{VAL}");GEe.x=-.35,GEe.y=0,GEe.anchor="middle_right";var YEe=tgt.find(t=>t.text==="{REF}");YEe.y=0,YEe.x=.35,YEe.anchor="middle_left";var M8=egt,tOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"bottom",drainSide:"left"}),nOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"bottom",drainSide:"right"}),oOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"left",drainSide:"bottom"}),iOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"left",drainSide:"top"}),rOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"right",drainSide:"bottom"}),sOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"right",drainSide:"top"}),aOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"top",drainSide:"left"}),AOn=Jl({horizontalSymbol:G9,verticalSymbol:M8,gateSide:"top",drainSide:"right"}),cOn={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:lOn,texts:ngt,bounds:ogt,refblocks:gF,circles:uOn}=cOn,igt={x:ogt.centerX,y:ogt.centerY},Y9=Nl({primitives:[...Object.values(lOn),...Object.values(uOn),{...ngt.top1,anchor:"middle_right",x:0},{...ngt.bottom1,anchor:"middle_right",x:0}],ports:[{...gF.top1,labels:["1","drain"]},{...gF.bottom1,labels:["2","source"]},{...gF.left1,labels:["3","gate"]}],size:VV(igt,[gF.top1,gF.bottom1,gF.left1]),center:igt}),rgt=ii(Y9),sgt=rgt.primitives.filter(t=>t.type==="text"),UEe=sgt.find(t=>t.text==="{VAL}");UEe.x=-.35,UEe.y=0,UEe.anchor="middle_right";var KEe=sgt.find(t=>t.text==="{REF}");KEe.y=0,KEe.x=.35,KEe.anchor="middle_left";var D8=rgt,gOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"bottom",drainSide:"left"}),dOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"bottom",drainSide:"right"}),hOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"left",drainSide:"bottom"}),pOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"left",drainSide:"top"}),mOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"right",drainSide:"bottom"}),_On=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"right",drainSide:"top"}),fOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"top",drainSide:"left"}),IOn=Jl({horizontalSymbol:Y9,verticalSymbol:D8,gateSide:"top",drainSide:"right"}),COn={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.07},{x:.01,y:0},{x:-.08,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:yOn,texts:agt,bounds:Mie,refblocks:VEe,circles:xOn}=COn,Agt=Nl({primitives:[...Object.values(yOn),...Object.values(xOn),{...agt.top1,anchor:"middle_right",x:0},{...agt.bottom1,anchor:"middle_right",x:0}],ports:[{...VEe.top1,labels:["1","drain"]},{...VEe.bottom1,labels:["2","source"]},{...VEe.left1,labels:["3","gate"]}],size:{width:Mie.width,height:Mie.height},center:{x:Mie.centerX,y:Mie.centerY}}),cgt=ii(Agt),lgt=cgt.primitives.filter(t=>t.type==="text"),zEe=lgt.find(t=>t.text==="{VAL}");zEe.x=-.35,zEe.y=0,zEe.anchor="middle_right";var JEe=lgt.find(t=>t.text==="{REF}");JEe.y=0,JEe.x=.35,JEe.anchor="middle_left";var EOn=cgt,BOn={paths:{diag1:{type:"path",points:[{x:-.1,y:-.1},{x:.1,y:.1}],color:"primary",fill:!1},diag2:{type:"path",points:[{x:-.1,y:.1},{x:.1,y:-.1}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.2,y:0}},bounds:{centerX:0,centerY:0}},{paths:bOn,bounds:ugt,refblocks:SOn}=BOn,Die=Vn({primitives:[...Object.values(bOn)],ports:[{...SOn.left1,labels:["1"]}],center:{x:ugt.centerX,y:ugt.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).build(),QOn=ii(Die,"down"),vOn=ii(Die,"left"),wOn=ii(Die,"up"),dF={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.19,y:-.1},{x:.12,y:-.2},{x:.22,y:-.2},{x:.19,y:-.1}],color:"primary",fill:!0}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:POn,bounds:Nie,refblocks:WEe,circles:MOn}=dF,DOn=Vn({primitives:[...Object.values(POn),...Object.values(MOn),{type:"text",text:"{REF}",x:-.3,y:.5094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.5094553499999995}],ports:[{...WEe.top1,labels:["1","collector"]},{...WEe.bottom1,labels:["3","emitter"]},{...WEe.left1,labels:["2","base"]}],size:{width:Nie.width,height:Nie.height},center:{x:Nie.centerX,y:Nie.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:NOn,bounds:Rie,refblocks:jEe,circles:ROn}=dF,TOn=Vn({primitives:[...Object.values(NOn),...Object.values(ROn),{type:"text",text:"{REF}",x:.55,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.4094553499999995}],ports:[{...jEe.top1,labels:["1","collector"]},{...jEe.bottom1,labels:["3","emitter"]},{...jEe.left1,labels:["2","base"]}],size:{width:Rie.width,height:Rie.height},center:{x:Rie.centerX,y:Rie.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:kOn,bounds:Tie,refblocks:$Ee,circles:FOn}=dF,LOn=Vn({primitives:[...Object.values(kOn),...Object.values(FOn),{type:"text",text:"{REF}",x:-.5,y:.3094553499999995},{type:"text",text:"{VAL}",x:.55,y:.3094553499999995}],ports:[{...$Ee.top1,labels:["1","collector"]},{...$Ee.bottom1,labels:["3","emitter"]},{...$Ee.left1,labels:["2","base"]}],size:{width:Tie.width,height:Tie.height},center:{x:Tie.centerX,y:Tie.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:HOn,bounds:kie,refblocks:qEe,circles:OOn}=dF,GOn=Vn({primitives:[...Object.values(HOn),...Object.values(OOn),{type:"text",text:"{REF}",x:.55,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.4094553499999995}],ports:[{...qEe.top1,labels:["1","collector"]},{...qEe.bottom1,labels:["3","emitter"]},{...qEe.left1,labels:["2","base"]}],size:{width:kie.width,height:kie.height},center:{x:kie.centerX,y:kie.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:YOn,bounds:Fie,refblocks:XEe,circles:UOn}=dF,KOn=Vn({primitives:[...Object.values(YOn),...Object.values(UOn),{type:"text",text:"{REF}",x:-.3,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:.4094553499999995}],ports:[{...XEe.top1,labels:["1","collector"]},{...XEe.bottom1,labels:["3","emitter"]},{...XEe.left1,labels:["2","base"]}],size:{width:Fie.width,height:Fie.height},center:{x:Fie.centerX,y:Fie.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:VOn,bounds:Lie,refblocks:ZEe,circles:zOn}=dF,JOn=Vn({primitives:[...Object.values(VOn),...Object.values(zOn),{type:"text",text:"{REF}",x:-.3,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:.4094553499999995}],ports:[{...ZEe.top1,labels:["1","collector"]},{...ZEe.bottom1,labels:["3","emitter"]},{...ZEe.left1,labels:["2","base"]}],size:{width:Lie.width,height:Lie.height},center:{x:Lie.centerX,y:Lie.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),WOn={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.3}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},Hie=Vn(WOn).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),jOn=ii(Hie,"down"),$On=eF(ii(Hie,"left")),qOn=ii(Hie,"up"),XOn={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path44-1":{type:"path",points:[{x:-.1,y:.44},{x:-.1,y:.18}],color:"primary",fill:!1},"path44-2":{type:"path",points:[{x:-.09,y:-.34},{x:-.09,y:-.09}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.25,y:.32},bottom1:{type:"text",text:"{VAL}",x:.25,y:-.24}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04},top2:{x:-.1,y:.44},bottom1:{x:-.09,y:-.34}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},Oie=Vn(XOn).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["4","out"]).labelPort("top2",["5","V+"]).labelPort("bottom1",["3","V-"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),ZOn=ii(Oie,"down"),eGn=eF(ii(Oie,"left")),tGn=ii(Oie,"up"),nGn={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:oGn,texts:ggt,bounds:dgt,refblocks:hF,circles:iGn}=nGn,hgt={x:dgt.centerX,y:dgt.centerY},U9=Nl({primitives:[...Object.values(oGn),...Object.values(iGn),{...ggt.top1,anchor:"middle_right",x:0},{...ggt.bottom1,anchor:"middle_right",x:0}],ports:[{...hF.top1,labels:["1","drain"]},{...hF.bottom1,labels:["2","source"]},{...hF.left1,labels:["3","gate"]}],size:VV(hgt,[hF.top1,hF.bottom1,hF.left1]),center:hgt}),pgt=ii(U9),mgt=pgt.primitives.filter(t=>t.type==="text"),e5e=mgt.find(t=>t.text==="{VAL}");e5e.x=-.35,e5e.y=0,e5e.anchor="middle_right";var t5e=mgt.find(t=>t.text==="{REF}");t5e.y=0,t5e.x=.35,t5e.anchor="middle_left";var N8=pgt,rGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"bottom",drainSide:"left"}),sGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"bottom",drainSide:"right"}),aGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"left",drainSide:"bottom"}),AGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"left",drainSide:"top"}),cGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"right",drainSide:"bottom"}),lGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"right",drainSide:"top"}),uGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"top",drainSide:"left"}),gGn=Jl({horizontalSymbol:U9,verticalSymbol:N8,gateSide:"top",drainSide:"right"}),dGn={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:hGn,texts:_gt,bounds:fgt,refblocks:pF,circles:pGn}=dGn,Igt={x:fgt.centerX,y:fgt.centerY},K9=Nl({primitives:[...Object.values(hGn),...Object.values(pGn),{..._gt.top1,anchor:"middle_right",x:0},{..._gt.bottom1,anchor:"middle_right",x:0}],ports:[{...pF.top1,labels:["1","drain"]},{...pF.bottom1,labels:["2","source"]},{...pF.left1,labels:["3","gate"]}],size:VV(Igt,[pF.top1,pF.bottom1,pF.left1]),center:Igt}),Cgt=ii(K9),ygt=Cgt.primitives.filter(t=>t.type==="text"),n5e=ygt.find(t=>t.text==="{VAL}");n5e.x=-.35,n5e.y=0,n5e.anchor="middle_right";var o5e=ygt.find(t=>t.text==="{REF}");o5e.y=0,o5e.x=.35,o5e.anchor="middle_left";var R8=Cgt,mGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"bottom",drainSide:"left"}),_Gn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"bottom",drainSide:"right"}),fGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"left",drainSide:"bottom"}),IGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"left",drainSide:"top"}),CGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"right",drainSide:"bottom"}),yGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"right",drainSide:"top"}),xGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"top",drainSide:"left"}),EGn=Jl({horizontalSymbol:K9,verticalSymbol:R8,gateSide:"top",drainSide:"right"}),BGn={paths:{path11:{type:"path",points:[{x:-.54,y:-.01},{x:-.15,y:-.02}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:0},{x:-.13,y:-.13}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.13},{x:.13,y:0}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.13},{x:-.13,y:.13}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.13},{x:.13,y:-.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:0},{x:.54,y:-.01}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.2,y:.38},{x:.16,y:.28},{x:.26,y:.3}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.33,y:.43},{x:.32,y:.42},{x:.21,y:.31},{x:.21,y:.31}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:.35,y:.35},{x:.31,y:.26},{x:.41,y:.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:.48,y:.4},{x:.47,y:.39},{x:.35,y:.29},{x:.35,y:.29}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.1,y:.35},bottom1:{type:"text",text:"{VAL}",x:0,y:-.43}},refblocks:{left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.43,maxY:.43,width:1.14,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.01,radius:.29,color:"primary",fill:!1}}},xgt=Vn(BGn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Egt=ii(xgt),bGn=Egt.primitives.filter(t=>t.type==="text"),Bgt=bGn.find(t=>t.text==="{REF}");Bgt.y=0,Bgt.anchor="middle_left";var SGn=Egt,QGn={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.01,y:-.07},{x:.01,y:.06},{x:-.08,y:0},{x:.01,y:-.07}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:vGn,texts:bgt,bounds:Gie,refblocks:i5e,circles:wGn}=QGn,Sgt=Nl({primitives:[...Object.values(vGn),...Object.values(wGn),{...bgt.top1,anchor:"middle_right",x:0},{...bgt.bottom1,anchor:"middle_right"}],ports:[{...i5e.top1,labels:["1","drain"]},{...i5e.bottom1,labels:["2","source"]},{...i5e.left1,labels:["3","gate"]}],size:{width:Gie.width,height:Gie.height},center:{x:Gie.centerX,y:Gie.centerY}}),Qgt=ii(Sgt),vgt=Qgt.primitives.filter(t=>t.type==="text"),r5e=vgt.find(t=>t.text==="{VAL}");r5e.x=-.35,r5e.y=0,r5e.anchor="middle_right";var s5e=vgt.find(t=>t.text==="{REF}");s5e.y=0,s5e.x=.35,s5e.anchor="middle_left";var PGn=Qgt,uD={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.15,y:-.23},{x:.22,y:-.12},{x:.12,y:-.12},{x:.15,y:-.23}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:MGn,texts:ohr,bounds:Yie,refblocks:a5e,circles:DGn}=uD,NGn=Vn({primitives:[...Object.values(MGn),...Object.values(DGn),{type:"text",text:"{REF}",x:-.1,y:.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:-.3094553499999995}],ports:[{...a5e.top1,labels:["1","collector"]},{...a5e.bottom1,labels:["3","emitter"]},{...a5e.left1,labels:["2","base"]}],size:{width:Yie.width,height:Yie.height},center:{x:Yie.centerX,y:Yie.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:ihr,texts:rhr,bounds:shr,refblocks:ahr,circles:Ahr}=uD,RGn=Vn(uD).rotateRightFacingSymbol("up").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["2","base"]).labelPort("top1",["1","collector"]).labelPort("bottom1",["3","emitter"]).changeTextAnchor("{REF}","middle_right").build(),{paths:TGn,texts:chr,bounds:Uie,refblocks:A5e,circles:kGn}=uD,FGn=Vn({primitives:[...Object.values(TGn),...Object.values(kGn),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...A5e.top1,labels:["1","collector"]},{...A5e.bottom1,labels:["3","emitter"]},{...A5e.left1,labels:["2","base"]}],size:{width:Uie.width,height:Uie.height},center:{x:Uie.centerX,y:Uie.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_bottom").build(),{paths:LGn,texts:lhr,bounds:Kie,refblocks:c5e,circles:HGn}=uD,OGn=Vn({primitives:[...Object.values(LGn),...Object.values(HGn),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...c5e.top1,labels:["1","collector"]},{...c5e.bottom1,labels:["3","emitter"]},{...c5e.left1,labels:["2","base"]}],size:{width:Kie.width,height:Kie.height},center:{x:Kie.centerX,y:Kie.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_top").changeTextAnchor("{VAL}","middle_top").build(),{paths:GGn,texts:uhr,bounds:Vie,refblocks:l5e,circles:YGn}=uD,UGn=Vn({primitives:[...Object.values(GGn),...Object.values(YGn),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...l5e.top1,labels:["1","collector"]},{...l5e.bottom1,labels:["3","emitter"]},{...l5e.left1,labels:["2","base"]}],size:{width:Vie.width,height:Vie.height},center:{x:Vie.centerX,y:Vie.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:KGn,texts:ghr,bounds:zie,refblocks:u5e,circles:VGn}=uD,zGn=Vn({primitives:[...Object.values(KGn),...Object.values(VGn),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...u5e.top1,labels:["1","collector"]},{...u5e.bottom1,labels:["3","emitter"]},{...u5e.left1,labels:["2","base"]}],size:{width:zie.width,height:zie.height},center:{x:zie.centerX,y:zie.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),JGn={paths:{path40:{type:"path",points:[{x:-.19,y:.33},{x:-.26,y:.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:.26},{x:-.19,y:.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:.14},{x:-.38,y:.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:.39},{x:-.13,y:.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.52},{x:-.19,y:.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:-.32},{x:-.38,y:-.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:-.13},{x:-.19,y:-.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:-.26},{x:-.26,y:-.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:-.26},{x:-.26,y:-.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:-.19},{x:-.51,y:-.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:-.5},{x:-.19,y:-.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:.19},{x:.13,y:.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:.38},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:.26},{x:.26,y:.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:.26},{x:.26,y:.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:.32},{x:.01,y:.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:-.19},{x:.26,y:-.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:-.26},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:-.38},{x:.13,y:-.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:-.13},{x:.39,y:-.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:-.32},{x:0,y:-.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:-.01},{x:.32,y:-.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:-.5}},refblocks:{left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.09,centerX:0,centerY:0}},{paths:WGn,texts:wgt,bounds:Jie,refblocks:Pgt}=JGn,Mgt=Nl({primitives:[...Object.values(WGn),{...wgt.bottom1,y:.35,anchor:"middle_top"},{...wgt.top1,anchor:"middle_left"}],ports:[{...Pgt.left1,labels:["1"]},{...Pgt.right1,labels:["2"]}],size:{width:Jie.width+.05,height:Jie.height},center:{x:Jie.centerX,y:Jie.centerY}}),jGn=ii(Mgt),$Gn=jGn,qGn={paths:{path18:{type:"path",points:[{x:-.53,y:0},{x:-.27,y:0}],color:"primary",fill:!1},path19:{type:"path",points:[{x:.26,y:0},{x:.53,y:0}],color:"primary",fill:!1},path20:{type:"path",points:[{x:0,y:.13},{x:.26,y:.13},{x:.26,y:-.13},{x:-.27,y:-.13},{x:-.27,y:.13},{x:0,y:.13}],color:"primary",fill:!1},path24:{type:"path",points:[{x:.29,y:-.29},{x:.26,y:-.16},{x:.16,y:-.26},{x:.29,y:-.29}],color:"primary",fill:!0},path26:{type:"path",points:[{x:-.3,y:.29},{x:.2,y:-.2}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.06,y:.2},bottom1:{type:"text",text:"{VAL}",x:-.1,y:-.28}},refblocks:{left1:{x:-.53,y:0},right1:{x:.53,y:0}},bounds:{width:1.13,height:.58,centerX:0,centerY:0}},{paths:XGn,texts:Dgt,bounds:Wie,refblocks:Ngt}=qGn,jie=Nl({primitives:[...Object.values(XGn),{...Dgt.bottom1,x:0,y:-.35,anchor:"middle_top"},{...Dgt.top1,x:0,y:.35,anchor:"middle_bottom"}],ports:[{...Ngt.left1,labels:["1"]},{...Ngt.right1,labels:["2"]}],size:{width:Wie.width+.05,height:Wie.height},center:{x:Wie.centerX,y:Wie.centerY}}),g5e=ii(jie,"down"),d5e=g5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),h5e=g5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");d5e.anchor="middle_left",h5e.anchor="middle_left",d5e.y+=.31,d5e.x=.34,h5e.y-=.31,h5e.x=.34;var ZGn=g5e,p5e=ii(jie,"left"),m5e=p5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),_5e=p5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");m5e.anchor="middle_bottom",_5e.anchor="middle_top",m5e.y+=.73,m5e.x=0,_5e.y-=.7,_5e.x=0;var eYn=p5e,f5e=ii(jie,"up"),I5e=f5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),C5e=f5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");I5e.anchor="middle_left",C5e.anchor="middle_left",I5e.y+=.21,I5e.x=.34,C5e.y-=.21,C5e.x=.34;var tYn=f5e,$ie={paths:{path1:{type:"path",points:[{x:-.42,y:0},{x:-.3,y:0}],color:"primary",fill:!1},"path1-2-1":{type:"path",points:[{x:-.3,y:0},{x:-.25,y:.1},{x:-.15,y:-.1},{x:-.05,y:.1},{x:.05,y:-.1},{x:.15,y:.1},{x:.25,y:-.1},{x:.3,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.3,y:0},{x:.42,y:0}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0,y:-.17},{x:0,y:-.4}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0,y:-.12},{x:.05,y:-.2},{x:-.05,y:-.2},{x:0,y:-.12}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.3,y:.25},bottom1:{type:"text",text:"{VAL}",x:.3,y:-.25}},refblocks:{left:{x:-.42,y:0},right:{x:.42,y:0},bottom:{x:0,y:-.4}},bounds:{minX:-.42,maxX:.42,minY:-.2,maxY:.2,width:.84,height:.4,centerX:0,centerY:0},circles:{}},{paths:nYn,texts:dhr,bounds:qie,refblocks:y5e,circles:oYn}=$ie,iYn=Vn({primitives:[...Object.values(nYn),...Object.values(oYn),{type:"text",text:"{REF}",x:-.15,y:.2394553499999995},{type:"text",text:"{VAL}",x:.15,y:.2394553499999995}],ports:[{...y5e.left,labels:["1"]},{...y5e.right,labels:["3"]},{...y5e.bottom,labels:["2"]}],size:{width:qie.width,height:qie.height},center:{x:qie.centerX,y:qie.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:rYn,texts:hhr,bounds:Xie,refblocks:x5e,circles:sYn}=$ie,aYn=Vn({primitives:[...Object.values(rYn),...Object.values(sYn),{type:"text",text:"{REF}",x:-.3,y:-.3894553499999995},{type:"text",text:"{VAL}",x:-.3,y:.3194553499999995}],ports:[{...x5e.left,labels:["1"]},{...x5e.right,labels:["3"]},{...x5e.bottom,labels:["2"]}],size:{width:Xie.width,height:Xie.height},center:{x:Xie.centerX,y:Xie.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),AYn=Vn($ie).labelPort("left",["1"]).labelPort("right",["3"]).labelPort("bottom",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:cYn,texts:phr,bounds:Zie,refblocks:E5e,circles:lYn}=$ie,uYn=Vn({primitives:[...Object.values(cYn),...Object.values(lYn),{type:"text",text:"{REF}",x:.3,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.2894553499999995}],ports:[{...E5e.left,labels:["1"]},{...E5e.right,labels:["3"]},{...E5e.bottom,labels:["2"]}],size:{width:Zie.width,height:Zie.height},center:{x:Zie.centerX,y:Zie.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),gYn={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:dYn,bounds:ere,refblocks:Rgt,circles:hYn}=gYn,Tgt=Nl({primitives:[...Object.values(dYn),...Object.values(hYn),{type:"text",text:"{REF}",x:0,y:.43330070000000065,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.43330070000000065,anchor:"middle_top"},{type:"text",text:"COS φ",x:0,y:.014279000000000375,anchor:"center"}],ports:[{...Rgt.left1,labels:["1"]},{...Rgt.right1,labels:["2"]}],size:{width:ere.width,height:ere.height},center:{x:ere.centerX,y:ere.centerY}}),kgt=ii(Tgt),B5e=kgt.primitives.filter(t=>t.type==="text"),b5e=B5e.find(t=>t.text==="{REF}"),S5e=B5e.find(t=>t.text==="{VAL}"),Q5e=B5e.find(t=>t.text==="COS φ");b5e.x=.35,b5e.y=.4279000000000375,b5e.anchor="middle_left",S5e.anchor="middle_left",S5e.x=.35,S5e.y=-.4279000000000375,Q5e.x=0,Q5e.y=.014279000000000375,Q5e.anchor="center";var pYn=kgt,mYn={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:.01,y:.03},{x:.01,y:-.09}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:-.09},{x:.18,y:-.09}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.22},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:_Yn,texts:Fgt,bounds:Lgt,refblocks:Hgt,circles:fYn}=mYn,Ogt=Nl({primitives:[...Object.values(_Yn),...Object.values(fYn),{...Fgt.top1,anchor:"middle_left"},{...Fgt.bottom1,anchor:"middle_left"}],ports:[{...Hgt.left1,labels:["1"]},{...Hgt.right1,labels:["2"]}],center:{x:Lgt.centerX,y:Lgt.centerY}}),IYn=ii(Ogt,"up"),Ggt={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:-.05,y:.09},{x:-.05,y:.04}],color:"primary",fill:!1},"path12-1-8-7-9-9":{type:"path",points:[{x:-.05,y:.09},{x:.07,y:.09}],color:"primary",fill:!1},"path12-1-8-6-9-10":{type:"path",points:[{x:.07,y:.09},{x:.07,y:.04}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:.04},{x:.18,y:.04}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.29},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:CYn,texts:Ygt,bounds:Ugt,refblocks:Kgt,circles:yYn}=Ggt,JV=Nl({primitives:[...Object.values(CYn),...Object.values(yYn),{...Ygt.top1,x:0,y:.3594553499999995,anchor:"middle_bottom"},{...Ygt.bottom1,x:0,y:-.3594553499999995,anchor:"middle_top"}],ports:[{...Kgt.left1,labels:["1"]},{...Kgt.right1,labels:["2"]}],center:{x:Ugt.centerX,y:Ugt.centerY}}),v5e=ii(JV,"down"),w5e=v5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),P5e=v5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");w5e.anchor="middle_bottom",P5e.anchor="middle_top",w5e.y=.4,w5e.x=.35,P5e.y=-.4,P5e.x=.35;var xYn=v5e,{paths:EYn,texts:Vgt,bounds:zgt,refblocks:Jgt,circles:BYn}=Ggt,bYn=Nl({primitives:[...Object.values(EYn),...Object.values(BYn),{...Vgt.top1,x:0,y:.3594553499999995,anchor:"middle_bottom"},{...Vgt.bottom1,x:0,y:-.3594553499999995,anchor:"middle_top"}],ports:[{...Jgt.left1,labels:["1"]},{...Jgt.right1,labels:["2"]}],center:{x:zgt.centerX,y:zgt.centerY}}),M5e=ii(JV,"left"),D5e=M5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),N5e=M5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");D5e.anchor="middle_bottom",N5e.anchor="middle_top",D5e.y=.4,D5e.x=0,N5e.y=-.4,N5e.x=0;var SYn=M5e,R5e=ii(JV,"up"),T5e=R5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),k5e=R5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");T5e.anchor="middle_left",k5e.anchor="middle_left",T5e.y+=.4,T5e.x=.34,k5e.y-=.41,k5e.x=.34;var QYn=R5e,F5e=ii(JV,"up"),L5e=F5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),H5e=F5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");L5e.anchor="middle_left",H5e.anchor="middle_left",L5e.y+=.4,L5e.x=.34,H5e.y-=.41,H5e.x=.34;var vYn=F5e,tre={paths:{path12_rotated:{type:"path",points:[{x:-.09,y:.12},{x:-.09,y:-.12}],color:"primary",fill:!1},path2_rotated:{type:"path",points:[{x:-.09,y:0},{x:.09,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:.09,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:wYn,bounds:Wgt,refblocks:PYn,circles:MYn}=tre,DYn=Vn({primitives:[...Object.values(wYn),...Object.values(MYn),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...PYn.left1,labels:["1"]}],center:{x:Wgt.centerX,y:Wgt.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:NYn,bounds:jgt,refblocks:RYn,circles:TYn}=tre,kYn=Vn({primitives:[...Object.values(NYn),...Object.values(TYn),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...RYn.left1,labels:["1"]}],center:{x:jgt.centerX,y:jgt.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:FYn,bounds:$gt,refblocks:LYn,circles:HYn}=tre,OYn=Vn({primitives:[...Object.values(FYn),...Object.values(HYn),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...LYn.left1,labels:["1"]}],center:{x:$gt.centerX,y:$gt.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:GYn,bounds:qgt,refblocks:YYn}=tre,UYn=Vn({primitives:[...Object.values(GYn),{type:"text",text:"{REF}",x:-.14,y:0}],ports:[{...YYn.left1,labels:["1"]}],center:{x:qgt.centerX,y:qgt.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),KYn={paths:{path40:{type:"path",points:[{x:-.19,y:-.33},{x:-.26,y:-.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:-.26},{x:-.19,y:-.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:-.14},{x:-.38,y:-.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:-.39},{x:-.13,y:-.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:-.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:-.52},{x:-.19,y:-.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:.32},{x:-.38,y:.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:.13},{x:-.19,y:.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:.26},{x:-.26,y:.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:.26},{x:-.26,y:.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:.19},{x:-.51,y:.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:.5},{x:-.19,y:.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:-.19},{x:.13,y:-.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:-.38},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:-.26},{x:.26,y:-.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:-.26},{x:.26,y:-.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:-.32},{x:.01,y:-.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:-.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:.19},{x:.26,y:.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:.26},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:.38},{x:.13,y:.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:.13},{x:.39,y:.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:.32},{x:0,y:.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:.01},{x:.32,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:-.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:.5}},refblocks:{top1:{x:0,y:-.52},bottom1:{x:0,y:.52},left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:VYn,texts:Xgt,bounds:nre,refblocks:ore,circles:zYn}=KYn,Zgt=Nl({primitives:[...Object.values(VYn),...Object.values(zYn),{...Xgt.top1,anchor:"middle_right"},{...Xgt.bottom1,anchor:"middle_right"}],ports:[{...ore.top1,labels:["1"]},{...ore.bottom1,labels:["2"]},{...ore.left1,labels:["3"]},{...ore.right1,labels:["4"]}],size:{width:nre.width,height:nre.height},center:{x:nre.centerX,y:nre.centerY}}),O5e=ii(Zgt),JYn=O5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),WYn=O5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");JYn.anchor="middle_left",WYn.anchor="middle_right";var jYn=O5e,ire={paths:{path27:{type:"path",points:[{x:.47,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path27-0":{type:"path",points:[{x:-.21,y:.04},{x:-.47,y:.04}],color:"primary",fill:!1},"path27-8-2-4":{type:"path",points:[{x:.21,y:.04},{x:.19,y:-.05}],color:"primary",fill:!1},"path27-8-2-4-29":{type:"path",points:[{x:-.19,y:.14},{x:-.21,y:.04}],color:"primary",fill:!1},"path27-8-2-4-5":{type:"path",points:[{x:.19,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1":{type:"path",points:[{x:.08,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9":{type:"path",points:[{x:.08,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2":{type:"path",points:[{x:-.03,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1":{type:"path",points:[{x:-.03,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.19,y:.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.47,y:.04},right1:{x:.47,y:.04}},bounds:{width:.99,height:.84,centerX:0,centerY:0},circles:{}},{paths:$Yn,bounds:rre,refblocks:edt,circles:qYn}=ire,XYn=Vn({primitives:[...Object.values($Yn),...Object.values(qYn),{type:"text",text:"{REF}",x:-.2,y:.2194553499999995},{type:"text",text:"{VAL}",x:.2,y:.2194553499999995}],ports:[{...edt.left1,labels:["1"]},{...edt.right1,labels:["2"]}],size:{width:rre.width,height:rre.height},center:{x:rre.centerX,y:rre.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:ZYn,bounds:sre,refblocks:tdt,circles:eUn}=ire,tUn=Vn({primitives:[...Object.values(ZYn),...Object.values(eUn),{type:"text",text:"{REF}",x:0,y:-.1704553499999995},{type:"text",text:"{VAL}",x:0,y:.2294553499999995}],ports:[{...tdt.left1,labels:["1"]},{...tdt.right1,labels:["2"]}],size:{width:sre.width,height:sre.height},center:{x:sre.centerX,y:sre.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:nUn,bounds:are,refblocks:ndt,circles:oUn}=ire,iUn=Vn({primitives:[...Object.values(nUn),...Object.values(oUn),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...ndt.left1,labels:["1"]},{...ndt.right1,labels:["2"]}],size:{width:are.width,height:are.height},center:{x:are.centerX,y:are.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:rUn,bounds:Are,refblocks:odt,circles:sUn}=ire,aUn=Vn({primitives:[...Object.values(rUn),...Object.values(sUn),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...odt.left1,labels:["1"]},{...odt.right1,labels:["2"]}],size:{width:Are.width,height:Are.height},center:{x:Are.centerX,y:Are.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),idt={paths:{path27:{type:"path",points:[{x:.76,y:-.28},{x:.31,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.3,y:-.02},{x:-.77,y:-.02}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.3,y:.35},{x:-.3,y:-.28}],color:"primary",fill:!1},"path27-3":{type:"path",points:[{x:.77,y:.35},{x:.32,y:.35}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.07,y:-.28},{x:-.3,y:-.28}],color:"primary",fill:!1},"path29-5-7":{type:"path",points:[{x:.33,y:-.28},{x:.11,y:-.28}],color:"primary",fill:!1},"path29-5-7-6":{type:"path",points:[{x:-.06,y:-.17},{x:-.06,y:-.39}],color:"primary",fill:!1},"path29-5-7-6-6":{type:"path",points:[{x:.09,y:-.17},{x:.09,y:-.39}],color:"primary",fill:!1},"path29-5-9":{type:"path",points:[{x:-.07,y:.35},{x:-.3,y:.35}],color:"primary",fill:!1},"path29-5-7-2":{type:"path",points:[{x:.33,y:.35},{x:.11,y:.35}],color:"primary",fill:!1},"path29-5-7-6-0":{type:"path",points:[{x:-.06,y:.46},{x:-.06,y:.24}],color:"primary",fill:!1},"path29-5-7-6-6-2":{type:"path",points:[{x:.09,y:.46},{x:.09,y:.24}],color:"primary",fill:!1},"path29-5-92":{type:"path",points:[{x:.33,y:.13},{x:.33,y:.35}],color:"primary",fill:!1},"path29-5-7-28":{type:"path",points:[{x:.33,y:-.28},{x:.33,y:-.05}],color:"primary",fill:!1},"path29-5-7-6-9":{type:"path",points:[{x:.44,y:.11},{x:.22,y:.11}],color:"primary",fill:!1},"path29-5-7-6-6-7":{type:"path",points:[{x:.44,y:-.04},{x:.22,y:-.04}],color:"primary",fill:!1},"path29-5-7-6-9-2":{type:"path",points:[{x:.44,y:.07},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4":{type:"path",points:[{x:.44,y:0},{x:.44,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4-6":{type:"path",points:[{x:.22,y:0},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-9":{type:"path",points:[{x:.44,y:0},{x:.22,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.02,y:.53},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.54}},refblocks:{left1:{x:-.77,y:-.02},right1:{x:.76,y:-.28},right2:{x:.77,y:.35}},bounds:{width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:AUn,texts:rdt,bounds:cre,refblocks:G5e,circles:cUn}=idt,lre=Nl({primitives:[...Object.values(AUn),...Object.values(cUn),{...rdt.top1,anchor:"middle_bottom"},{...rdt.bottom1,anchor:"middle_top"}],ports:[{...G5e.left1,labels:["1"]},{...G5e.right1,labels:["2"]},{...G5e.right2,labels:["3"]}],size:{width:cre.width,height:cre.height},center:{x:cre.centerX,y:cre.centerY}}),Y5e=ii(lre,"down"),U5e=Y5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),K5e=Y5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");U5e.anchor="middle_bottom",K5e.anchor="middle_top",U5e.y+=.3,U5e.x+=.101,K5e.y-=.49999,K5e.x+=1.19999;var lUn=Y5e,{paths:uUn,bounds:ure,refblocks:V5e,circles:gUn}=idt,sdt=Nl({primitives:[...Object.values(uUn),...Object.values(gUn),{type:"text",text:"{REF}",x:.01596175000000022,y:-.5308501500000009,anchor:"middle_top"},{type:"text",text:"{VAL}",x:.013116750000000454,y:.5408501499999989,anchor:"middle_bottom"}],ports:[{...V5e.left1,labels:["1"]},{...V5e.right1,labels:["2"]},{...V5e.right2,labels:["3"]}],size:{width:ure.width,height:ure.height},center:{x:ure.centerX,y:ure.centerY}}),z5e=ii(lre,"left"),J5e=z5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),W5e=z5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");J5e.anchor="middle_bottom",W5e.anchor="middle_top",J5e.y+=.99,J5e.x-=0,W5e.y-=1.10999,W5e.x=0;var dUn=z5e,j5e=ii(lre,"up"),$5e=j5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),q5e=j5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");$5e.anchor="middle_bottom",q5e.anchor="middle_top",$5e.y+=.499,$5e.x=.62,q5e.y-=.29999,q5e.x+=.1;var hUn=j5e,pUn=ii(sdt),mUn={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-7":{type:"path",points:[{x:.21,y:.18},{x:.14,y:.18}],color:"primary",fill:!1},"path43-7-9":{type:"path",points:[{x:.21,y:.13},{x:.21,y:.18}],color:"primary",fill:!1},"path43-7-2":{type:"path",points:[{x:.08,y:-.09},{x:.14,y:-.09}],color:"primary",fill:!1},"path43-7-9-3":{type:"path",points:[{x:.08,y:-.04},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},gre=Vn(mUn).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_top").changeTextAnchor("{REF}","middle_bottom").build(),X5e=ii(gre,"down"),Z5e=X5e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),e4e=X5e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Z5e.anchor="middle_left",e4e.anchor="middle_left",Z5e.y+=.3,Z5e.x=.3,e4e.y-=.3,e4e.x=.3;var _Un=X5e,t4e=ii(gre,"left"),n4e=t4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),o4e=t4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");n4e.anchor="middle_bottom",o4e.anchor="middle_top",n4e.y+=.5,n4e.x=0,o4e.y-=.55,o4e.x=0;var fUn=t4e,i4e=ii(gre,"up"),r4e=i4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),s4e=i4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");r4e.anchor="middle_left",s4e.anchor="middle_left",r4e.y+=.3,r4e.x=.3,s4e.y-=.3,s4e.x=.3;var IUn=i4e,adt={paths:{path11:{type:"path",points:[{x:-.52,y:.04},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.05},{x:.52,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.18,y:-.15},{x:.18,y:.25}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.19,y:0},{x:.35,y:-.14}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.35,y:-.14},{x:.34,y:-.35}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.17,y:.27},{x:-.17,y:-.15},{x:.18,y:.05},{x:-.17,y:.27}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.22,y:.38},bottom1:{type:"text",text:"{VAL}",x:.11,y:-.38}},refblocks:{bottom1:{x:.34,y:-.35},left1:{x:-.52,y:.04},right1:{x:.52,y:.05}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.38,width:1.09,height:.77,centerX:0,centerY:0},circles:{}},{paths:mhr,texts:_hr,bounds:fhr,refblocks:Ihr,circles:Chr}=adt,Adt=Vn(adt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),cdt=ii(Adt),CUn=cdt.primitives.filter(t=>t.type==="text"),ldt=CUn.find(t=>t.text==="{REF}");ldt.y=0,ldt.anchor="middle_left";var yUn=cdt,udt={paths:{path44:{type:"path",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.07,y:-.025},{x:-.07,y:-.025}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.4458008,y:-.025023700000000426},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},xUn=Vn(udt).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),a4e=Vn(udt).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),gdt=ii(a4e,"left"),A4e=gdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");A4e.anchor="middle_bottom",A4e.y+=.4,A4e.x=0;var EUn=gdt,ddt=ii(a4e,"up"),c4e=ddt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");c4e.anchor="middle_left",c4e.y+=0,c4e.x=.2;var BUn=ddt,hdt={paths:{path44:{type:"path",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.44,y:-.02},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},bUn=Vn(hdt).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),l4e=Vn(hdt).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),pdt=ii(l4e,"left"),u4e=pdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");u4e.anchor="middle_bottom",u4e.y+=.4,u4e.x=0;var SUn=pdt,mdt=ii(l4e,"up"),g4e=mdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");g4e.anchor="middle_left",g4e.y+=.05,g4e.x=.2;var QUn=mdt,_dt={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},vUn=Vn(_dt).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),d4e=Vn(_dt).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),fdt=ii(d4e,"left"),h4e=fdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");h4e.anchor="middle_left",h4e.y+=.5,h4e.x=.2;var wUn=fdt,Idt=ii(d4e,"up"),p4e=Idt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");p4e.anchor="middle_left",p4e.y+=.3,p4e.x=.2;var PUn=Idt,Cdt={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.125,y:.1},{x:.045,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},MUn=Vn(Cdt).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),m4e=Vn(Cdt).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),ydt=ii(m4e,"left"),_4e=ydt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");_4e.anchor="middle_left",_4e.y+=.5,_4e.x=.2;var DUn=ydt,xdt=ii(m4e,"up"),f4e=xdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");f4e.anchor="middle_left",f4e.y+=.4,f4e.x=.2;var NUn=xdt,Edt={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.125,y:.1},{x:.045,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},RUn=Vn(Edt).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),I4e=Vn(Edt).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),Bdt=ii(I4e,"left"),C4e=Bdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");C4e.anchor="middle_left",C4e.y+=.6,C4e.x=.3;var TUn=Bdt,bdt=ii(I4e,"up"),y4e=bdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");y4e.anchor="middle_left",y4e.y+=.4,y4e.x=.2;var kUn=bdt,Sdt={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},FUn=Vn(Sdt).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),x4e=Vn(Sdt).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),Qdt=ii(x4e,"left"),E4e=Qdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");E4e.anchor="middle_left",E4e.y+=.5,E4e.x=.3;var LUn=Qdt,vdt=ii(x4e,"up"),B4e=vdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");B4e.anchor="middle_left",B4e.y+=.3,B4e.x=.2;var HUn=vdt,OUn={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:-.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right2:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},dre=Vn(OUn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right2",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),b4e=ii(dre,"down"),S4e=b4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Q4e=b4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");S4e.anchor="middle_bottom",Q4e.anchor="middle_top",S4e.x=.44,S4e.y+=.28,Q4e.y-=.28,Q4e.x=.44;var GUn=b4e,v4e=ii(dre,"left"),w4e=v4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),P4e=v4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");w4e.anchor="middle_bottom",P4e.anchor="middle_top",w4e.x=0,w4e.y+=.625,P4e.y-=.695,P4e.x=0;var YUn=v4e,M4e=ii(dre,"up"),D4e=M4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),N4e=M4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");D4e.anchor="middle_bottom",N4e.anchor="middle_top",D4e.x=.4,D4e.y+=.28,N4e.y-=.28,N4e.x=.4;var UUn=M4e,KUn={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:.14}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.4},bottom1:{type:"text",text:"{VAL}",x:0,y:-.4}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right3:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},hre=Vn(KUn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),R4e=ii(hre,"down"),T4e=R4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),k4e=R4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");T4e.anchor="middle_bottom",k4e.anchor="middle_top",T4e.x=.44,T4e.y+=.28,k4e.y-=.28,k4e.x=.44;var VUn=R4e,F4e=ii(hre,"left"),L4e=F4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),H4e=F4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");L4e.anchor="middle_bottom",H4e.anchor="middle_top",L4e.x=0,L4e.y+=.625,H4e.y-=.695,H4e.x=0;var zUn=F4e,O4e=ii(hre,"up"),G4e=O4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Y4e=O4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");G4e.anchor="middle_bottom",Y4e.anchor="middle_top",G4e.x=.4,G4e.y+=.28,Y4e.y-=.28,Y4e.x=.4;var JUn=O4e,pre={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:0},{x:.11,y:.05}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.28}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete pre.refblocks.left1,delete pre.refblocks.right1,pre.bounds.width+=.2;var mre=Vn(pre).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),U4e=ii(mre,"down"),K4e=U4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),V4e=U4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");K4e.anchor="middle_bottom",V4e.anchor="middle_top",K4e.x=.3,K4e.y+=.265,V4e.y-=.265,V4e.x=.3;var WUn=U4e,z4e=ii(mre,"left"),J4e=z4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),W4e=z4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");J4e.anchor="middle_bottom",W4e.anchor="middle_top",J4e.x=0,J4e.y+=.57,W4e.y-=.57,W4e.x=0;var jUn=z4e,j4e=ii(mre,"up"),$4e=j4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),q4e=j4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");$4e.anchor="middle_bottom",q4e.anchor="middle_top",$4e.x=.3,$4e.y+=.265,q4e.y-=.265,q4e.x=.3;var $Un=j4e,_re={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:.01},{x:.1,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.25},bottom1:{type:"text",text:"{VAL}",x:0,y:-.25}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete _re.refblocks.left1,delete _re.refblocks.right1,_re.bounds.width+=.2;var fre=Vn(_re).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),X4e=ii(fre,"down"),Z4e=X4e.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),eBe=X4e.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Z4e.anchor="middle_bottom",eBe.anchor="middle_top",Z4e.x=.3,Z4e.y+=.265,eBe.y-=.265,eBe.x=.3;var qUn=X4e,tBe=ii(fre,"left"),nBe=tBe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),oBe=tBe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");nBe.anchor="middle_bottom",oBe.anchor="middle_top",nBe.x=0,nBe.y+=.57,oBe.y-=.57,oBe.x=0;var XUn=tBe,iBe=ii(fre,"up"),rBe=iBe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),sBe=iBe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");rBe.anchor="middle_bottom",sBe.anchor="middle_top",rBe.x=.3,rBe.y+=.265,sBe.y-=.265,sBe.x=.3;var ZUn=iBe,Ire={paths:{path44:{type:"path",points:[{x:-.16845120000000047,y:.02621170000000017},{x:-.4458008,y:.02709619999999968}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4458008,y:.026971799999999657},{x:.1677968999999997,y:.027926399999999685}],color:"primary",fill:!1},"path8704-1":{type:"path",points:[{x:-.0040837000000002455,y:-.13467459999999964},{x:-.0040837000000002455,y:-.13467459999999964},{x:-.017668143940740948,y:-.1311205263185182},{x:-.03043520885925943,y:-.12727072121481456},{x:-.04240966440000013,y:-.1231399985999998},{x:-.05361628020740751,y:-.11874317238518502},{x:-.064079825925926,y:-.11409505648148131},{x:-.07382507120000005,y:-.10921046479999987},{x:-.0828767856740741,y:-.10410421125185171},{x:-.0912597389925926,y:-.09879110974814802},{x:-.09899870079999995,y:-.0932859741999998},{x:-.10611844074074069,y:-.08760361851851838},{x:-.11264372845925916,y:-.0817588566148146},{x:-.11859933359999993,y:-.07576650239999982},{x:-.12401002580740728,y:-.06964136978518495},{x:-.12890057472592584,y:-.06339827268148127},{x:-.13329574999999985,y:-.05705202499999972},{x:-.13722032127407394,y:-.05061744065185156},{x:-.14069905819259243,y:-.04410933354814783},{x:-.14375673039999987,y:-.03754251759999966},{x:-.14641810754074058,y:-.030931806718518143},{x:-.1487079592592591,y:-.0242920148148144},{x:-.15065105519999983,y:-.017637955799999563},{x:-.15227216500740723,y:-.01098444358518472},{x:-.15359605832592574,y:-.004346292081480994},{x:-.1546475047999998,y:.00226168480000051},{x:-.15545127407407386,y:.008824673148148676},{x:-.1560321357925924,y:.015327859051852397},{x:-.1564148595999998,y:.02175642860000056},{x:-.1566242151407405,y:.028095567881482052},{x:-.15668497205925902,y:.03433046298518576},{x:-.15662189999999976,y:.04044630000000058},{x:-.15662189999999976,y:.0404463000000006},{x:-.15662189999999976,y:.0404463000000006},{x:-.15622857394444417,y:.04717166472222282},{x:-.1553217675555553,y:.05388046444444503},{x:-.15392183849999977,y:.060558907500000585},{x:-.1520491444444442,y:.0671932022222228},{x:-.1497240430555553,y:.07376955694444502},{x:-.14696689199999974,y:.08027418000000058},{x:-.14379804894444415,y:.0866932797222228},{x:-.1402378715555553,y:.09301306444444506},{x:-.13630671749999965,y:.09921974250000057},{x:-.13202494444444415,y:.10529952222222282},{x:-.12741291005555522,y:.11123861194444501},{x:-.1224909719999997,y:.1170232200000006},{x:-.11727948794444407,y:.12263955472222278},{x:-.11179881555555524,y:.12807382444444504},{x:-.10606931249999965,y:.13331223750000057},{x:-.1001113364444441,y:.13834100222222284},{x:-.09394524505555521,y:.14314632694444504},{x:-.08759139599999967,y:.14771442000000062},{x:-.08107014694444413,y:.15203148972222283},{x:-.07440185555555523,y:.15608374444444503},{x:-.0676068794999997,y:.15985739250000058},{x:-.06070557644444415,y:.16333864222222283},{x:-.05371830405555529,y:.16651370194444504},{x:-.04666541999999976,y:.1693687800000006},{x:-.03956728194444424,y:.1718900847222228},{x:-.03244424755555539,y:.17406382444444501},{x:-.025316674499999876,y:.17587620750000055},{x:-.01820492044444437,y:.17731344222222278},{x:-.01112934305555553,y:.178361736944445},{x:-.004110300000000034,y:.17900730000000054},{x:-.004110300000000011,y:.17900730000000054}],color:"primary",fill:!1},"path8704-1-9":{type:"path",points:[{x:.004158700000000071,y:-.1355885000000001},{x:.004158700000000071,y:-.1355885000000001},{x:.017743143940740766,y:-.1320344263185187},{x:.03051020885925925,y:-.12818462121481505},{x:.042484664399999955,y:-.12405389860000024},{x:.053691280207407335,y:-.11965707238518546},{x:.0641548259259258,y:-.11500895648148178},{x:.07390007119999986,y:-.1101243648000003},{x:.0829517856740739,y:-.10501811125185218},{x:.0913347389925924,y:-.09970500974814848},{x:.09907370079999973,y:-.09419987420000027},{x:.10619344074074046,y:-.08851751851851883},{x:.11271872845925893,y:-.08267275661481507},{x:.11867433359999968,y:-.07668040240000029},{x:.12408502580740703,y:-.0705552697851854},{x:.12897557472592555,y:-.06431217268148172},{x:.13337074999999957,y:-.05796592500000018},{x:.13729532127407365,y:-.05153134065185202},{x:.14077405819259214,y:-.045023233548148286},{x:.14383173039999952,y:-.038456417600000126},{x:.14649310754074024,y:-.03184570671851861},{x:.14878295925925875,y:-.02520591481481487},{x:.1507260551999995,y:-.01855185580000003},{x:.15234716500740686,y:-.011898343585185192},{x:.15367105832592537,y:-.005260192081481464},{x:.15472250479999944,y:.001347784800000043},{x:.1555262740740735,y:.007910773148148207},{x:.156107135792592,y:.01441395905185193},{x:.1564898595999994,y:.020842528600000094},{x:.15669921514074014,y:.02718166788148159},{x:.15675997205925862,y:.03341656298518529},{x:.15669689999999936,y:.03953240000000011},{x:.15669689999999936,y:.039532400000000134},{x:.15669689999999936,y:.039532400000000134},{x:.1563035739444438,y:.04625776472222235},{x:.15539676755555493,y:.05296656444444457},{x:.15399683849999934,y:.05964500750000013},{x:.1521241444444438,y:.06627930222222234},{x:.14979904305555491,y:.07285565694444456},{x:.14704189199999937,y:.07936028000000013},{x:.1438730489444438,y:.08577937972222234},{x:.1403128715555549,y:.09209916444444458},{x:.13638171749999925,y:.0983058425000001},{x:.13209994444444376,y:.10438562222222235},{x:.12748791005555482,y:.11032471194444453},{x:.12256597199999929,y:.11610932000000013},{x:.1173544879444437,y:.1217256547222223},{x:.11187381555555485,y:.12715992444444457},{x:.10614431249999925,y:.1323983375000001},{x:.10018633644444369,y:.13742710222222235},{x:.09402024505555481,y:.14223242694444457},{x:.08766639599999927,y:.14680052000000016},{x:.08114514694444372,y:.15111758972222236},{x:.07447685555555483,y:.15516984444444457},{x:.06768187949999929,y:.15894349250000012},{x:.06078057644444377,y:.16242474222222236},{x:.053793304055554894,y:.16559980194444457},{x:.046740419999999366,y:.16845488000000014},{x:.039642281944443844,y:.17097618472222234},{x:.03251924755555499,y:.17314992444444455},{x:.02539167449999948,y:.17496230750000008},{x:.018279920444443973,y:.17639954222222232},{x:.011204343055555134,y:.17744783694444452},{x:.004185299999999637,y:.17809340000000007},{x:.004185299999999614,y:.17809340000000007}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.08039130000000005,y:.0179576999999993},{x:-.08039130000000005,y:.09650599999999931}],color:"primary",fill:!0},"path4-5":{type:"path",points:[{x:.01494479999999987,y:-.055216500000000224},{x:.01494479999999987,y:.09691909999999937}],color:"primary",fill:!0},"path4-5-8":{type:"path",points:[{x:.06871169999999927,y:-.056870000000000864},{x:.06871169999999927,y:.018784499999999538}],color:"primary",fill:!0},"path4-1":{type:"path",points:[{x:-.08179359999999969,y:.09650570000000003},{x:.015771699999999722,y:.09650570000000003}],color:"primary",fill:!0},"path4-1-6":{type:"path",points:[{x:.0117995999999998,y:-.05594970000000088},{x:.06843709999999925,y:-.05594970000000088}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.17162450000000073,y:.11125030000000025},{x:-.2688274000000015,y:.11125030000000025},{x:-.2688274000000015,y:.11469129999999961},{x:-.17162450000000073,y:.11469129999999961}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.2184661999999995,y:.16159429999999997},{x:-.2184661999999995,y:.06439139999999943},{x:-.22190719999999908,y:.06439139999999943},{x:-.22190719999999908,y:.16159429999999997}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0024445000000006267,y:.23933980000000044},bottom1:{type:"text",text:"{VAL}",x:.00341719999999901,y:-.23933980000000066}},refblocks:{left1:{x:-.4458008,y:.02709619999999968},right1:{x:.4458008,y:.026971799999999657}},bounds:{minX:-.473959241,maxX:.473959241,minY:-.23933980000000066,maxY:.23933980000000044,width:.947918482,height:.4786796000000011,centerX:0,centerY:-11102230246251565e-32},circles:{}},eKn=Vn(Ire).rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_left",{x:.02,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.5,y:-.2}).build(),tKn=Vn(Ire).rotateRightFacingSymbol("left").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.45}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.55}).build(),nKn=Vn(Ire).rotateRightFacingSymbol("right").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),oKn=Vn(Ire).rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_left",{x:.02,y:-.2}).changeTextAnchor("{REF}","middle_left",{x:.5,y:.2}).build(),wdt={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-5":{type:"path",points:[{x:.19,y:-.09},{x:.15,y:-.09}],color:"primary",fill:!1},"path43-5-2":{type:"path",points:[{x:.19,y:-.14},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:yhr,texts:xhr,bounds:Ehr,refblocks:Bhr,circles:bhr}=wdt,Pdt=Vn(wdt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),iKn=ii(Pdt),rKn={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"RPM",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:sKn,texts:aKn,bounds:Cre,refblocks:Mdt,circles:AKn}=rKn,aBe=Nl({primitives:[...Object.values(sKn),...Object.values(AKn),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...aKn.left1,y:.01,anchor:"center",fontSize:.2}],ports:[{...Mdt.left1,labels:["1"]},{...Mdt.right1,labels:["2"]}],size:{width:Cre.width,height:Cre.height},center:{x:Cre.centerX,y:Cre.centerY}}),{5:cKn,...lKn}=aBe.primitives;function uKn(t){return typeof t=="object"}var Ddt=ii({...aBe,primitives:Object.values(lKn).filter(uKn)}),gKn={...Ddt,primitives:[...Ddt.primitives,cKn]},yre=Nl({primitives:[{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1},{type:"path",points:Array.from({length:32},(t,e)=>{let n=Math.PI/2-e*Math.PI/31,o=.1;return{x:.1-o*Math.cos(n),y:o*Math.sin(n)}}),color:"primary",fill:!1},{type:"text",text:"{REF}",x:.125,y:0,anchor:"middle_left"}],ports:[{x:-.2,y:0,labels:["1"]}],center:{x:0,y:0}}),Ndt=ii(yre,"down"),Rdt=Ndt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");Rdt&&(Rdt.anchor="middle_top");var dKn=Ndt,hKn=ii(yre,"left"),Tdt=ii(yre,"up"),kdt=Tdt.primitives.find(t=>t.type==="text"&&t.text==="{REF}");kdt&&(kdt.anchor="middle_bottom");var pKn=Tdt,mKn={paths:{path40:{type:"path",points:[{x:.44,y:.04},{x:.19,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:.19,y:.18},{x:.44,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.19,y:-.09},{x:.19,y:.18}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.19,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.43,y:.22},{x:-.11,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{right1:{x:-.43,y:.22}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},ABe=Vn(mKn).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),cBe=ii(ABe,"up"),lBe=cBe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),uBe=cBe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");lBe.anchor="middle_bottom",uBe.anchor="middle_top",lBe.x=.4,lBe.y+=.2,uBe.y-=.3,uBe.x=.4;var Fdt=cBe,gBe=eF(Fdt),dBe=gBe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),hBe=gBe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");dBe.anchor="middle_bottom",hBe.anchor="middle_top",dBe.x=.35,dBe.y+=.4,hBe.y-=.4,hBe.x=.35;var _Kn=gBe,pBe=ii(ABe,"left"),mBe=pBe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),_Be=pBe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");mBe.anchor="middle_bottom",_Be.anchor="middle_top",mBe.x=0,mBe.y+=.5,_Be.y-=.6,_Be.x=0;var fKn=pBe,Ldt={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0},"path12-2":{type:"path",points:[{x:.09,y:-.06},{x:.27,y:-.17}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.27,y:-.18},{x:.27,y:-.31}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{bottom1:{x:.27,y:-.31},left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},{paths:Shr,texts:Qhr,bounds:vhr,refblocks:whr,circles:Phr}=Ldt,Hdt=Vn(Ldt).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),Odt=ii(Hdt),Gdt=Odt.primitives.filter(t=>t.type==="text"),IKn=Gdt.find(t=>t.text==="{REF}"),CKn=Gdt.find(t=>t.text==="{VAL}");IKn.y=0,CKn.y=0;var yKn=Odt,xKn={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.14,y:-.09},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:EKn,texts:Ydt,bounds:xre,refblocks:Udt,circles:BKn}=xKn,Kdt=Nl({primitives:[...Object.values(EKn),...Object.values(BKn),{...Ydt.top1,anchor:"middle_bottom"},{...Ydt.bottom1,anchor:"middle_top"}],ports:[{...Udt.left1,labels:["1"]},{...Udt.right1,labels:["2"]}],size:{width:xre.width,height:xre.height},center:{x:xre.centerX,y:xre.centerY}}),fBe=ii(Kdt),bKn=fBe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),SKn=fBe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");bKn.anchor="middle_left",SKn.anchor="middle_right";var QKn=fBe,vKn={paths:{path11:{type:"path",points:[{x:-.34,y:.22},{x:-.02,y:.01}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.23,y:.13},{x:.23,y:.4}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.23,y:-.08},{x:.23,y:-.35}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.01,y:-.18},{x:-.01,y:.23}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.23,y:.12},{x:-.01,y:.12}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.11,y:.13},{x:-.17,y:.04},{x:-.06,y:.03},{x:-.11,y:.13}],color:"primary",fill:!0},"path11-0-3-8":{type:"path",points:[{x:.23,y:-.08},{x:-.01,y:-.08}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2,y:.39},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{top1:{x:.23,y:.4},bottom1:{x:.23,y:-.35},left1:{x:-.34,y:.22}},bounds:{width:.74,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.08,y:.01,radius:.29,color:"primary",fill:!1}}},{paths:wKn,texts:Vdt,bounds:Ere,refblocks:IBe,circles:PKn}=vKn,zdt=Nl({primitives:[...Object.values(wKn),...Object.values(PKn),{...Vdt.top1,anchor:"middle_left"},{...Vdt.bottom1,anchor:"middle_right"}],ports:[{...IBe.top1,labels:["1"]},{...IBe.bottom1,labels:["2"]},{...IBe.left1,labels:["3"]}],size:{width:Ere.width,height:Ere.height},center:{x:Ere.centerX,y:Ere.centerY}}),Jdt=ii(zdt),Wdt=Jdt.primitives.filter(t=>t.type==="text"),MKn=Wdt.find(t=>t.text==="{REF}");MKn.y=.1;var jdt=Wdt.find(t=>t.text==="{VAL}");jdt.y=.1,jdt.x=-.4;var DKn=Jdt,NKn={paths:{capsule_outer:{type:"path",points:[{x:-.44,y:.34},{x:-.45,y:.39},{x:-.46,y:.42},{x:-.49,y:.44},{x:-.52,y:.46},{x:-.56,y:.46},{x:-.6,y:.46},{x:-.63,y:.44},{x:-.65,y:.42},{x:-.67,y:.39},{x:-.68,y:.34},{x:-.68,y:-.34},{x:-.67,y:-.39},{x:-.65,y:-.42},{x:-.63,y:-.44},{x:-.6,y:-.45},{x:-.56,y:-.46},{x:-.52,y:-.45},{x:-.49,y:-.44},{x:-.46,y:-.42},{x:-.45,y:-.39},{x:-.44,y:-.34},{x:-.44,y:.34}],color:"primary",fill:!1},capsule_inner:{type:"path",points:[{x:-.51,y:.28},{x:-.52,y:.32},{x:-.53,y:.34},{x:-.56,y:.35},{x:-.57,y:.35},{x:-.58,y:.34},{x:-.6,y:.32},{x:-.61,y:.28},{x:-.61,y:-.28},{x:-.6,y:-.32},{x:-.58,y:-.34},{x:-.57,y:-.35},{x:-.56,y:-.35},{x:-.53,y:-.34},{x:-.52,y:-.32},{x:-.51,y:-.28},{x:-.51,y:.28}],color:"primary",fill:!0},usb_vertical:{type:"path",points:[{x:.1,y:-.4},{x:.1,y:.4}],color:"primary",fill:!1},usb_left_branch:{type:"path",points:[{x:.1,y:-.1},{x:-.03,y:.05},{x:-.03,y:.15}],color:"primary",fill:!1},usb_right_branch:{type:"path",points:[{x:.1,y:0},{x:.25,y:.15},{x:.25,y:.25}],color:"primary",fill:!1},usb_arrow:{type:"path",points:[{x:.05,y:.4},{x:.1,y:.5},{x:.15,y:.4},{x:.05,y:.4}],color:"primary",fill:!0},usb_square:{type:"path",points:[{x:.2,y:.25},{x:.3,y:.25},{x:.3,y:.35},{x:.2,y:.35},{x:.2,y:.25}],color:"primary",fill:!0}},circles:{usb_base:{type:"circle",x:.1,y:-.4,radius:.07,color:"primary",fill:!0},usb_tip_circle:{type:"circle",x:-.03,y:.15,radius:.04,color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.25,y:.7}},refblocks:{},bounds:{minX:-.75,maxX:.35,minY:-.6,maxY:.75,width:1.1,height:1.35,centerX:-.2,centerY:.08}},RKn=Vn(NKn).changeTextAnchor("{REF}","middle_bottom").build(),TKn={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.18,y:-.36},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.43},left1:{type:"text",text:"Var",x:-.19,y:.07}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:kKn,texts:CBe,bounds:Bre,refblocks:$dt,circles:FKn}=TKn,qdt=Nl({primitives:[...Object.values(kKn),...Object.values(FKn),{...CBe.top1,x:0,y:-.3594553499999995,anchor:"middle_top"},{...CBe.bottom1,x:0,y:.35,anchor:"middle_bottom"},{...CBe.left1,x:-.02,y:.01,fontSize:.2,anchor:"center"}],ports:[{...$dt.left1,labels:["1"]},{...$dt.right1,labels:["2"]}],size:{width:Bre.width,height:Bre.height},center:{x:Bre.centerX,y:Bre.centerY}}),LKn=ii(qdt),HKn={paths:{path40:{type:"path",points:[{x:.08,y:.04},{x:-.18,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.18,y:.18},{x:.08,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.18,y:-.09},{x:-.18,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.09,y:.17},{x:.1,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.2,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.19,y:.17},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:OKn,texts:Xdt,bounds:bre,refblocks:Zdt,circles:GKn}=HKn,eht=Nl({primitives:[...Object.values(OKn),...Object.values(GKn),{...Xdt.top1,anchor:"middle_bottom"},{...Xdt.bottom1,anchor:"middle_top"}],ports:[{...Zdt.left1,labels:["1"]},{...Zdt.right1,labels:["2"]}],size:{width:bre.width,height:bre.height},center:{x:bre.centerX,y:bre.centerY}}),yBe=ii(eht),YKn=yBe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),UKn=yBe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");YKn.anchor="middle_left",UKn.anchor="middle_right";var KKn=yBe,VKn={paths:{path5:{type:"path",points:[{x:-.54,y:0},{x:-.26,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.27,y:0},{x:.54,y:.01}],color:"primary",fill:!1},path7:{type:"path",points:[{x:.27,y:-.23},{x:-.26,y:.24}],color:"primary",fill:!1},path8:{type:"path",points:[{x:.38,y:-.23},{x:.27,y:-.23}],color:"primary",fill:!1},path9:{type:"path",points:[{x:0,y:.14},{x:.27,y:.14},{x:.27,y:-.13},{x:-.26,y:-.13},{x:-.26,y:.14},{x:0,y:.14}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.06,y:.25},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.25}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:.01}},bounds:{width:1.13,height:.5,centerX:0,centerY:0}},{paths:zKn,texts:tht,bounds:Sre,refblocks:nht}=VKn,oht=Nl({primitives:[...Object.values(zKn),{...tht.top1,anchor:"middle_left"},{...tht.bottom1,anchor:"middle_right"}],ports:[{...nht.left1,labels:["1","-"]},{...nht.right1,labels:["2","+"]}],size:{width:Sre.width,height:Sre.height},center:{x:Sre.centerX,y:Sre.centerY}}),JKn=ii(oht),WKn={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Var",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:jKn,texts:$Kn,bounds:Qre,refblocks:iht,circles:qKn}=WKn,xBe=Nl({primitives:[...Object.values(jKn),...Object.values(qKn),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...$Kn.left1,anchor:"center",y:.02,fontSize:.2}],ports:[{...iht.left1,labels:["1"]},{...iht.right1,labels:["2"]}],size:{width:Qre.width,height:Qre.height},center:{x:Qre.centerX,y:Qre.centerY}}),{5:XKn,...ZKn}=xBe.primitives;function eVn(t){return typeof t=="object"}var rht=ii({...xBe,primitives:Object.values(ZKn).filter(eVn)}),tVn={...rht,primitives:[...rht.primitives,XKn]},vre={paths:{"path28-2":{type:"path",points:[{x:.19,y:0},{x:0,y:.09}],color:"primary",fill:!1},"path28-2-6":{type:"path",points:[{x:.19,y:0},{x:0,y:-.09}],color:"primary",fill:!1},"path29-3":{type:"path",points:[{x:.19,y:0},{x:-.23,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{REF}",x:.25,y:0}},refblocks:{left1:{x:-.23,y:0}},bounds:{minX:-.25,maxX:.25,minY:-.09,maxY:.09,width:.5,height:.19,centerX:0,centerY:0},circles:{}};function wre(t,e){let{width:n,height:o}=t.size,i=1,r=1;e.width!==void 0&&e.height!==void 0?(i=e.width/n,r=e.height/o):e.width!==void 0?i=r=e.width/n:e.height!==void 0&&(i=r=e.height/o);let s=t.primitives.map(a=>{switch(a.type){case"path":return{...a,points:a.points.map(A=>({x:A.x*i,y:A.y*r}))};case"text":return{...a,x:a.x*i,y:a.y*r,fontSize:a.fontSize?a.fontSize*i:void 0};case"circle":return{...a,x:a.x*i,y:a.y*r,radius:a.radius*i};case"box":return{...a,x:a.x*i,y:a.y*r,width:a.width*i,height:a.height*r};default:return a}});return{...t,primitives:s,center:{x:t.center.x*i,y:t.center.y*r},ports:t.ports.map(a=>({...a,x:a.x*i,y:a.y*r})),size:{width:n*i,height:o*r}}}var nVn=Vn(vre).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),oVn=wre(nVn,{width:.24,height:.23}),iVn=Vn(vre).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),rVn=wre(iVn,{width:.23,height:.24}),sVn=Vn(vre).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),aVn=wre(sVn,{width:.23,height:.24}),AVn=Vn(vre).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),cVn=wre(AVn,{width:.24,height:.23}),EBe={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.4},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.4}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.4,maxY:.4,width:1.14,height:.8,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:Mhr,texts:Dhr,bounds:Nhr,circles:Rhr,refblocks:Thr}=EBe,lVn=Vn(EBe).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:uVn,texts:khr,bounds:sht,circles:gVn,refblocks:aht}=EBe,dVn=Vn({primitives:[...Object.values(uVn),...Object.values(gVn),{type:"text",text:"{REF}",x:-.2,y:.35},{type:"text",text:"{VAL}",x:.2,y:.35}],ports:[{...aht.left1,labels:["left1"]},{...aht.right1,labels:["right1"]}],center:{x:sht.centerX,y:sht.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),hVn=dVn,pVn={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Wh",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:mVn,texts:_Vn,bounds:Pre,refblocks:Aht,circles:fVn}=pVn,BBe=Nl({primitives:[...Object.values(mVn),...Object.values(fVn),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{..._Vn.left1,anchor:"center",y:.01,fontSize:.2}],ports:[{...Aht.left1,labels:["1"]},{...Aht.right1,labels:["2"]}],size:{width:Pre.width,height:Pre.height},center:{x:Pre.centerX,y:Pre.centerY}}),{5:IVn,...CVn}=BBe.primitives;function yVn(t){return typeof t=="object"}var cht=ii({...BBe,primitives:Object.values(CVn).filter(yVn)}),xVn={...cht,primitives:[...cht.primitives,IVn]},EVn={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"W",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:BVn,texts:bVn,bounds:Mre,refblocks:lht,circles:SVn}=EVn,bBe=Nl({primitives:[...Object.values(BVn),...Object.values(SVn),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...bVn.left1,anchor:"center",y:.01,fontSize:.3}],ports:[{...lht.left1,labels:["1"]},{...lht.right1,labels:["2"]}],size:{width:Mre.width,height:Mre.height},center:{x:Mre.centerX,y:Mre.centerY}}),{5:QVn,...vVn}=bBe.primitives;function wVn(t){return typeof t=="object"}var uht=ii({...bBe,primitives:Object.values(vVn).filter(wVn)}),PVn={...uht,primitives:[...uht.primitives,QVn]},ght={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.21069330000000042,y:.17632800000000026}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.14458890000000002,y:-.0882553999999991},{x:.07848449999999962,y:-.0882553999999991}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.27384529999999985,maxY:.27384530000000007,width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},MVn=Vn(ght).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:DVn,bounds:Dre,refblocks:dht,circles:NVn}=ght,RVn=Vn({primitives:[...Object.values(DVn),...Object.values(NVn),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...dht.left1,labels:["1"]},{...dht.right1,labels:["2"]}],size:{width:Dre.width,height:Dre.height},center:{x:Dre.centerX,y:Dre.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Su={ac_voltmeter_down:NRn,ac_voltmeter_horz:kRn,ac_voltmeter_left:HRn,ac_voltmeter_right:YRn,ac_voltmeter_up:VRn,ac_voltmeter_vert:WRn,avalanche_diode_down:qRn,avalanche_diode_horz:XRn,avalanche_diode_left:tTn,avalanche_diode_right:nTn,avalanche_diode_up:rTn,avalanche_diode_vert:ATn,backward_diode_down:uTn,backward_diode_left:m0t,backward_diode_right:mTn,backward_diode_up:_Tn,battery_down:yTn,battery_horz:x0t,battery_left:QTn,battery_right:MTn,battery_up:TTn,battery_vert:kTn,boxresistor_down:OTn,boxresistor_left:KTn,boxresistor_right:WTn,boxresistor_small_down:qTn,boxresistor_small_left:ekn,boxresistor_small_right:okn,boxresistor_small_up:skn,boxresistor_up:lkn,bridged_ground_down:dkn,bridged_ground_left:mkn,bridged_ground_right:V0t,bridged_ground_up:Ikn,capacitor_down:Ekn,capacitor_left:bkn,capacitor_polarized_down:Skn,capacitor_polarized_left:Qkn,capacitor_polarized_right:vkn,capacitor_polarized_up:wkn,capacitor_right:Mkn,capacitor_up:Tkn,constant_current_diode_down:Lkn,constant_current_diode_horz:Hkn,constant_current_diode_left:Ykn,constant_current_diode_right:Ukn,constant_current_diode_up:zkn,constant_current_diode_vert:jkn,crystal_4pin_down:Xkn,crystal_4pin_left:Zkn,crystal_4pin_right:eFn,crystal_4pin_up:oFn,crystal_down:sFn,crystal_left:aFn,crystal_right:AFn,crystal_up:uFn,current_source_down:dFn,current_source_left:pFn,current_source_right:_Fn,current_source_up:IFn,darlington_pair_transistor_down:CFn,darlington_pair_transistor_horz:yFn,darlington_pair_transistor_left:xFn,darlington_pair_transistor_right:EFn,darlington_pair_transistor_up:BFn,darlington_pair_transistor_vert:bFn,dc_ammeter_down:iut,dc_ammeter_horz:KV,dc_ammeter_left:vFn,dc_ammeter_right:wFn,dc_ammeter_up:PFn,dc_ammeter_vert:iut,dc_voltmeter_down:NFn,dc_voltmeter_horz:kFn,dc_voltmeter_left:HFn,dc_voltmeter_right:YFn,dc_voltmeter_up:VFn,dc_voltmeter_vert:WFn,diac_down:jFn,diac_horz:$Fn,diac_left:qFn,diac_right:XFn,diac_up:ZFn,diac_vert:eLn,digital_ground_down:oLn,digital_ground_left:sLn,digital_ground_right:cLn,digital_ground_up:gLn,diode_down:hLn,diode_left:pLn,diode_right:lie,diode_up:mLn,dpdt_normally_closed_switch_down:fLn,dpdt_normally_closed_switch_left:ILn,dpdt_normally_closed_switch_right:uie,dpdt_normally_closed_switch_up:CLn,dpdt_switch_down:xLn,dpdt_switch_left:ELn,dpdt_switch_right:gie,dpdt_switch_up:BLn,dpst_normally_closed_switch_down:SLn,dpst_normally_closed_switch_left:QLn,dpst_normally_closed_switch_right:die,dpst_normally_closed_switch_up:vLn,dpst_switch_down:PLn,dpst_switch_left:MLn,dpst_switch_right:hie,dpst_switch_up:DLn,ferrite_bead_down:TLn,ferrite_bead_left:kLn,ferrite_bead_right:fut,ferrite_bead_up:_ut,filled_diode_down:HLn,filled_diode_horz:YLn,filled_diode_left:VLn,filled_diode_right:WLn,filled_diode_up:qLn,filled_diode_vert:eHn,frequency_meter_horz:uEe,frequency_meter_vert:AHn,fuse_horz:vut,fuse_vert:gHn,ground_down:dHn,ground_horz:hHn,ground_left:pHn,ground_right:mHn,ground_up:_Hn,ground_vert:fHn,gunn_diode_horz:IHn,gunn_diode_vert:CHn,icled_down:xHn,icled_left:EHn,icled_right:Bie,icled_up:BHn,igbt_transistor_horz:wut,igbt_transistor_vert:SHn,illuminated_push_button_normally_open_horz:Mut,illuminated_push_button_normally_open_vert:vHn,inductor_down:wHn,inductor_left:PHn,inductor_right:MHn,inductor_up:DHn,laser_diode_down:NHn,laser_diode_left:RHn,laser_diode_right:Sie,laser_diode_up:THn,led_down:HHn,led_left:OHn,led_right:wEe,led_up:Fut,light_dependent_resistor_horz:Out,light_dependent_resistor_vert:KHn,mosfet_depletion_normally_on_horz:zut,mosfet_depletion_normally_on_vert:JHn,mushroom_head_normally_open_momentary_horz:$ut,mushroom_head_normally_open_momentary_vert:qHn,n_channel_d_mosfet_transistor_gate_bottom_drain_left:tOn,n_channel_d_mosfet_transistor_gate_bottom_drain_right:nOn,n_channel_d_mosfet_transistor_gate_left_drain_bottom:oOn,n_channel_d_mosfet_transistor_gate_left_drain_top:iOn,n_channel_d_mosfet_transistor_gate_right_drain_bottom:rOn,n_channel_d_mosfet_transistor_gate_right_drain_top:sOn,n_channel_d_mosfet_transistor_gate_top_drain_left:aOn,n_channel_d_mosfet_transistor_gate_top_drain_right:AOn,n_channel_d_mosfet_transistor_horz:G9,n_channel_d_mosfet_transistor_vert:M8,n_channel_e_mosfet_transistor_gate_bottom_drain_left:gOn,n_channel_e_mosfet_transistor_gate_bottom_drain_right:dOn,n_channel_e_mosfet_transistor_gate_left_drain_bottom:hOn,n_channel_e_mosfet_transistor_gate_left_drain_top:pOn,n_channel_e_mosfet_transistor_gate_right_drain_bottom:mOn,n_channel_e_mosfet_transistor_gate_right_drain_top:_On,n_channel_e_mosfet_transistor_gate_top_drain_left:fOn,n_channel_e_mosfet_transistor_gate_top_drain_right:IOn,n_channel_e_mosfet_transistor_horz:Y9,n_channel_e_mosfet_transistor_vert:D8,njfet_transistor_horz:Agt,njfet_transistor_vert:EOn,not_connected_down:QOn,not_connected_left:vOn,not_connected_right:Die,not_connected_up:wOn,npn_bipolar_transistor_down:DOn,npn_bipolar_transistor_horz:TOn,npn_bipolar_transistor_left:LOn,npn_bipolar_transistor_right:GOn,npn_bipolar_transistor_up:KOn,npn_bipolar_transistor_vert:JOn,opamp_no_power_down:jOn,opamp_no_power_left:$On,opamp_no_power_right:Hie,opamp_no_power_up:qOn,opamp_with_power_down:ZOn,opamp_with_power_left:eGn,opamp_with_power_right:Oie,opamp_with_power_up:tGn,p_channel_d_mosfet_transistor_gate_bottom_drain_left:rGn,p_channel_d_mosfet_transistor_gate_bottom_drain_right:sGn,p_channel_d_mosfet_transistor_gate_left_drain_bottom:aGn,p_channel_d_mosfet_transistor_gate_left_drain_top:AGn,p_channel_d_mosfet_transistor_gate_right_drain_bottom:cGn,p_channel_d_mosfet_transistor_gate_right_drain_top:lGn,p_channel_d_mosfet_transistor_gate_top_drain_left:uGn,p_channel_d_mosfet_transistor_gate_top_drain_right:gGn,p_channel_d_mosfet_transistor_horz:U9,p_channel_d_mosfet_transistor_vert:N8,p_channel_e_mosfet_transistor_gate_bottom_drain_left:mGn,p_channel_e_mosfet_transistor_gate_bottom_drain_right:_Gn,p_channel_e_mosfet_transistor_gate_left_drain_bottom:fGn,p_channel_e_mosfet_transistor_gate_left_drain_top:IGn,p_channel_e_mosfet_transistor_gate_right_drain_bottom:CGn,p_channel_e_mosfet_transistor_gate_right_drain_top:yGn,p_channel_e_mosfet_transistor_gate_top_drain_left:xGn,p_channel_e_mosfet_transistor_gate_top_drain_right:EGn,p_channel_e_mosfet_transistor_horz:K9,p_channel_e_mosfet_transistor_vert:R8,photodiode_horz:xgt,photodiode_vert:SGn,pjfet_transistor_horz:Sgt,pjfet_transistor_vert:PGn,pnp_bipolar_transistor_down:NGn,pnp_bipolar_transistor_horz:RGn,pnp_bipolar_transistor_left:FGn,pnp_bipolar_transistor_right:OGn,pnp_bipolar_transistor_up:UGn,pnp_bipolar_transistor_vert:zGn,potentiometer_horz:Mgt,potentiometer_vert:$Gn,potentiometer2_down:ZGn,potentiometer2_left:eYn,potentiometer2_right:jie,potentiometer2_up:tYn,potentiometer3_down:iYn,potentiometer3_left:aYn,potentiometer3_right:AYn,potentiometer3_up:uYn,power_factor_meter_horz:Tgt,power_factor_meter_vert:pYn,push_button_normally_closed_momentary_horz:Ogt,push_button_normally_closed_momentary_vert:IYn,push_button_normally_open_momentary_down:xYn,push_button_normally_open_momentary_horz:bYn,push_button_normally_open_momentary_left:SYn,push_button_normally_open_momentary_right:JV,push_button_normally_open_momentary_up:QYn,push_button_normally_open_momentary_vert:vYn,rail_down:DYn,rail_left:kYn,rail_right:OYn,rail_up:UYn,rectifier_diode_horz:Zgt,rectifier_diode_vert:jYn,resistor_down:XYn,resistor_left:tUn,resistor_right:iUn,resistor_up:aUn,resonator_down:lUn,resonator_horz:sdt,resonator_left:dUn,resonator_right:lre,resonator_up:hUn,resonator_vert:pUn,schottky_diode_down:_Un,schottky_diode_left:fUn,schottky_diode_right:gre,schottky_diode_up:IUn,silicon_controlled_rectifier_horz:Adt,silicon_controlled_rectifier_vert:yUn,solderjumper2_bridged12_down:xUn,solderjumper2_bridged12_left:EUn,solderjumper2_bridged12_right:a4e,solderjumper2_bridged12_up:BUn,solderjumper2_down:bUn,solderjumper2_left:SUn,solderjumper2_right:l4e,solderjumper2_up:QUn,solderjumper3_bridged12_down:vUn,solderjumper3_bridged12_left:wUn,solderjumper3_bridged12_right:d4e,solderjumper3_bridged12_up:PUn,solderjumper3_bridged123_down:MUn,solderjumper3_bridged123_left:DUn,solderjumper3_bridged123_right:m4e,solderjumper3_bridged123_up:NUn,solderjumper3_bridged23_down:RUn,solderjumper3_bridged23_left:TUn,solderjumper3_bridged23_right:I4e,solderjumper3_bridged23_up:kUn,solderjumper3_down:FUn,solderjumper3_left:LUn,solderjumper3_right:x4e,solderjumper3_up:HUn,spdt_normally_closed_switch_down:GUn,spdt_normally_closed_switch_left:YUn,spdt_normally_closed_switch_right:dre,spdt_normally_closed_switch_up:UUn,spdt_switch_down:VUn,spdt_switch_left:zUn,spdt_switch_right:hre,spdt_switch_up:JUn,spst_normally_closed_switch_down:WUn,spst_normally_closed_switch_left:jUn,spst_normally_closed_switch_right:mre,spst_normally_closed_switch_up:$Un,spst_switch_down:qUn,spst_switch_left:XUn,spst_switch_right:fre,spst_switch_up:ZUn,square_wave_down:eKn,square_wave_left:tKn,square_wave_right:nKn,square_wave_up:oKn,step_recovery_diode_horz:Pdt,step_recovery_diode_vert:iKn,tachometer_horz:aBe,tachometer_vert:gKn,testpoint_down:dKn,testpoint_left:hKn,testpoint_right:yre,testpoint_up:pKn,tilted_ground_down:_Kn,tilted_ground_left:fKn,tilted_ground_right:ABe,tilted_ground_up:Fdt,triac_horz:Hdt,triac_vert:yKn,tunnel_diode_horz:Kdt,tunnel_diode_vert:QKn,unijunction_transistor_horz:zdt,unijunction_transistor_vert:DKn,usbc:RKn,var_meter_horz:qdt,var_meter_vert:LKn,varactor_diode_horz:eht,varactor_diode_vert:KKn,varistor_horz:oht,varistor_vert:JKn,varmeter_horz:xBe,varmeter_vert:tVn,vcc_down:oVn,vcc_left:rVn,vcc_right:aVn,vcc_up:cVn,volt_meter_horz:lVn,volt_meter_vert:hVn,watt_hour_meter_horz:BBe,watt_hour_meter_vert:xVn,wattmeter_horz:bBe,wattmeter_vert:PVn,zener_diode_horz:MVn,zener_diode_vert:RVn};Object.fromEntries(Object.keys(Su).map(t=>[t,t]));const hht=!0,TVn=!1,mF={CCW:-1,CW:1,NOT_ORIENTABLE:0},kVn=2*Math.PI,Nre=1,pht=0,V9=2,FVn=3,LVn=4,HVn=1,OVn=2,SBe=0,WV=1,_F=2;var Rre=Object.freeze({__proto__:null,BOUNDARY:V9,CCW:hht,CONTAINS:FVn,CW:TVn,END_VERTEX:_F,INSIDE:Nre,INTERLACE:LVn,NOT_VERTEX:SBe,ORIENTATION:mF,OUTSIDE:pht,OVERLAP_OPPOSITE:OVn,OVERLAP_SAME:HVn,PIx2:kVn,START_VERTEX:WV});let z9=1e-6;function mht(t){z9=t}function _ht(){return z9}const GVn=3;function QBe(t){return t<z9&&t>-z9}function gD(t,e){return t-e<z9&&t-e>-z9}function fht(t,e){return t-e>z9}function YVn(t,e){return t-e>-z9}function Iht(t,e){return t-e<-z9}function UVn(t,e){return t-e<z9}var KVn=Object.freeze({__proto__:null,DECIMALS:GVn,EQ:gD,EQ_0:QBe,GE:YVn,GT:fht,LE:UVn,LT:Iht,getTolerance:_ht,setTolerance:mht});let Ge={Utils:KVn,Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in Rre)Ge[t]=Rre[t];Object.defineProperty(Ge,"DP_TOL",{get:function(){return _ht()},set:function(t){mht(t)}});let cd=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}};Ge.Errors=cd;let vBe=class{constructor(e,n){this.first=e,this.last=n||this.first}[Symbol.iterator](){let e;return{next:()=>(e=e?e.next:this.first,{value:e,done:e===void 0})}}get size(){let e=0;for(let n of this)e++;return e}toArray(e=void 0,n=void 0){let o=[],i=e||this.first,r=n||this.last,s=i;if(s===void 0)return o;do o.push(s),s=s.next;while(s!==r.next);return o}append(e){return this.isEmpty()?this.first=e:(e.prev=this.last,this.last.next=e),this.last=e,this.last.next=void 0,this.first.prev=void 0,this}insert(e,n){if(this.isEmpty())this.first=e,this.last=e;else if(n==null)e.next=this.first,this.first.prev=e,this.first=e;else{let o=n.next;n.next=e,o&&(o.prev=e),e.prev=n,e.next=o,this.last===n&&(this.last=e)}return this.last.next=void 0,this.first.prev=void 0,this}remove(e){return e===this.first&&e===this.last?(this.first=void 0,this.last=void 0):(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this.first&&(this.first=e.next),e===this.last&&(this.last=e.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(e){let n=e,o=e;do{if(n!=e&&n===o)throw cd.INFINITE_LOOP;n=n.next,o=o.next.next}while(n!=e)}};const Cht={stroke:"black"};let VVn=class{constructor(e=Cht){for(const n in e)this[n]=e[n];this.stroke=e.stroke??Cht.stroke}toAttributesString(){return Object.keys(this).reduce((e,n)=>e+(this[n]!==void 0?this.toAttrString(n,this[n]):""),"")}toAttrString(e,n){const o=e==="className"?"class":this.convertCamelToKebabCase(e);return n===null?`${o} `:`${o}="${n.toString()}" `}convertCamelToKebabCase(e){return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}};function dD(t){return new VVn(t).toAttributesString()}function fF(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ge.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ge.Point(g,h))}return n}function hD(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ge.Utils.EQ(i,e.r))n.push(o);else if(Ge.Utils.LT(i,e.r)){let r=Math.sqrt(e.r*e.r-i*i),s,a;s=t.norm.rotate90CCW().multiply(r),a=o.translate(s),n.push(a),s=t.norm.rotate90CW().multiply(r),a=o.translate(s),n.push(a)}return n}function IF(t,e){let n=[];for(let o of e.toSegments()){let i=jV(o,t);for(let r of i)Mht(r,n)||n.push(r)}return n}function Tre(t,e){let n=[];if(IF(t,e.box).length===0)return n;let o=new Ge.Circle(e.pc,e.r),i=hD(t,o);for(let r of i)r.on(e)&&n.push(r);return n}function jV(t,e){let n=[];if(t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e))return n;let o=new Ge.Line(t.ps,t.pe);return fF(o,e)}function kre(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new Ge.Line(t.ps,t.pe),i=new Ge.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),e.ps.on(t)&&!e.ps.equalTo(t.ps)&&!e.ps.equalTo(t.pe)&&n.push(e.ps),e.pe.on(t)&&!e.pe.equalTo(t.ps)&&!e.pe.equalTo(t.pe)&&n.push(e.pe);else if(o.parallelTo(i)){const r=new Ge.Vector(t.ps,t.pe),s=new Ge.Vector(e.ps,e.pe),a=new Ge.Vector(t.ps,e.ps),A=r.cross(s);if(!Ge.Utils.EQ_0(A)){const c=a.cross(s)/A,l=a.cross(r)/A;Ge.Utils.GE(c,0)&&Ge.Utils.LE(c,1)&&Ge.Utils.GE(l,0)&&Ge.Utils.LE(l,1)&&n.push(yht(t.ps.translate(r.multiply(c)),t,e))}}else{let r=fF(o,i);r.length>0&&xht(r[0],t)&&xht(r[0],e)&&n.push(yht(r[0],t,e))}return n}function yht(t,e,n){for(const o of[e.ps,e.pe,n.ps,n.pe])if(t.equalTo(o))return o;return t}function xht(t,e){const n=e.box;return Ge.Utils.LE(t.x,n.xmax)&&Ge.Utils.GE(t.x,n.xmin)&&Ge.Utils.LE(t.y,n.ymax)&&Ge.Utils.GE(t.y,n.ymin)}function Fre(t,e){let n=[];if(t.isZeroLength()){let[r,s]=t.ps.distanceTo(e.pc);return Ge.Utils.EQ(r,e.r)&&n.push(t.ps),n}let o=new Ge.Line(t.ps,t.pe),i=hD(o,e);for(let r of i)r.on(t)&&n.push(r);return n}function CF(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=new Ge.Line(t.ps,t.pe),i=new Ge.Circle(e.pc,e.r),r=hD(o,i);for(let s of r)s.on(t)&&s.on(e)&&n.push(s);return n}function zVn(t,e){let n=[];for(let o of e.toSegments()){let i=kre(o,t);for(let r of i)n.push(r)}return n}function Eht(t,e){let n=[],o=new Ge.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ge.Utils.EQ_0(i)||Ge.Utils.EQ_0(r))return n;if(Ge.Utils.EQ_0(o.x)&&Ge.Utils.EQ_0(o.y)&&Ge.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s=t.pc.distanceTo(e.pc)[0];if(Ge.Utils.GT(s,i+r)||Ge.Utils.LT(s,Math.abs(i-r)))return n;o.x/=s,o.y/=s;let a;if(Ge.Utils.EQ(s,i+r)||Ge.Utils.EQ(s,Math.abs(i-r)))return a=t.pc.translate(i*o.x,i*o.y),n.push(a),n;let A=i*i/(2*s)-r*r/(2*s)+s/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return a=c.translate(o.rotate90CCW().multiply(l)),n.push(a),a=c.translate(o.rotate90CW().multiply(l)),n.push(a),n}function JVn(t,e){let n=[];for(let o of e.toSegments()){let i=Fre(o,t);for(let r of i)n.push(r)}return n}function Bht(t,e){let n=[];if(t.pc.equalTo(e.pc)&&Ge.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new Ge.Circle(t.pc,t.r),i=new Ge.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)&&s.on(e)&&n.push(s);return n}function wBe(t,e){let n=[];if(e.pc.equalTo(t.pc)&&Ge.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=e,i=new Ge.Circle(t.pc,t.r),r=Eht(o,i);for(let s of r)s.on(t)&&n.push(s);return n}function WVn(t,e){let n=[];for(let o of e.toSegments()){let i=CF(o,t);for(let r of i)n.push(r)}return n}function bht(t,e){return t.isSegment?kre(t.shape,e):CF(e,t.shape)}function Sht(t,e){return t.isSegment?CF(t.shape,e):Bht(t.shape,e)}function Qht(t,e){return t.isSegment?jV(t.shape,e):Tre(e,t.shape)}function jVn(t,e){return t.isSegment?DBe(e,t.shape):NBe(e,t.shape)}function $Vn(t,e){return t.isSegment?Fre(t.shape,e):wBe(t.shape,e)}function PBe(t,e){let n=[];for(let o of e.edges)for(let i of bht(o,t))n.push(i);return n}function MBe(t,e){let n=[];for(let o of e.edges)for(let i of Sht(o,t))n.push(i);return n}function $V(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of Qht(o,t))Mht(i,n)||n.push(i);return t.sortPoints(n)}function vht(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of $Vn(o,t))n.push(i);return n}function wht(t,e){return t.isSegment?bht(e,t.shape):t.isArc?Sht(e,t.shape):t.isLine?Qht(e,t.shape):t.isRay?jVn(e,t.shape):[]}function Pht(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...wht(t,i)];return n}function qVn(t,e){let n=[];if(e.isEmpty()||t.size===0)return n;for(let o of t)n=[...n,...Pht(o,e)];return n}function XVn(t,e){let n=[];if(t.isEmpty()||e.isEmpty()||t.box.not_intersect(e.box))return n;for(let o of t.edges)n=[...n,...Pht(o,e)];return n}function ZVn(t,e){return t instanceof Ge.Line?$V(t,e):t instanceof Ge.Segment?PBe(t,e):t instanceof Ge.Arc?MBe(t,e):[]}function Mht(t,e){return e.some(n=>n.equalTo(t))}function NQ(t){return new Ge.Line(t.start,t.norm)}function DBe(t,e){return jV(e,NQ(t)).filter(n=>t.contains(n))}function NBe(t,e){return Tre(NQ(t),e).filter(n=>t.contains(n))}function Dht(t,e){return hD(NQ(t),e).filter(n=>t.contains(n))}function ezn(t,e){return IF(NQ(t),e).filter(n=>t.contains(n))}function Nht(t,e){return fF(NQ(t),e).filter(n=>t.contains(n))}function tzn(t,e){return fF(NQ(t),NQ(e)).filter(n=>t.contains(n)).filter(n=>e.contains(n))}function Rht(t,e){return $V(NQ(t),e).filter(n=>t.contains(n))}function Tht(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw cd.UNSUPPORTED_SHAPE_TYPE}function yF(t,e){let n=[];for(let o of e)n=[...n,...Tht(t,o.shape)];return n}function nzn(t,e){let n=[];for(let o of t)for(let i of e)n=[...n,...Tht(o.shape,i.shape)];return n}let pD=class Ute extends vBe{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,i=A=>A instanceof Ge.Segment||A instanceof Ge.Arc||A instanceof Ge.Ray||A instanceof Ge.Line,r=A=>A instanceof Ge.Segment||A instanceof Ge.Arc||A instanceof Ge.Ray,s=A=>A instanceof Ge.Segment||A instanceof Ge.Arc;if(o===1&&i(n[0])||o>1&&r(n[0])&&r(n[o-1])&&n.slice(1,o-1).every(s)){this.isInfinite=n.some(A=>A instanceof Ge.Ray||A instanceof Ge.Line);for(let A of n){let c=new Ge.Edge(A);this.append(c)}this.setArcLength()}else throw Ge.Errors.ILLEGAL_PARAMETERS}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new Ge.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new Ute(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ge.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Ge.Point){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Line){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Circle){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Segment){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Arc){const[n,o]=Ge.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ge.Box){const[n,o]=Ge.Distance.shape2multiline(new Ge.Polygon(e),this);return[n,o.reverse()]}if(e instanceof Ge.Multiline)return Ge.Distance.multiline2multiline(this,e);throw Ge.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ge.Multiline?nzn(this,e):yF(e,this)}contains(e){if(e instanceof Ge.Point)return this.edges.some(n=>n.shape.contains(e));throw Ge.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new Ute(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new Ge.Point){return new Ute(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new Ge.Matrix){return new Ute(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
<path ${dD({fill:"none",...e})} d="`;n+=`
M${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`" >
</path>`,n}};Ge.Multiline=pD;const ozn=(...t)=>new Ge.Multiline(...t);Ge.multiline=ozn;function xF(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;i[0]===null?r=0:i[1]===null?r=t.shape.length:r=i[0].length;let s=SBe;gD(r,0)&&(s|=WV),gD(r,t.shape.length)&&(s|=_F);let a;r===1/0?a=i[0].coord(e):a=s&_F&&t.next&&t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:a,edge_before:t,edge_after:void 0,face:t.face,is_vertex:s})}function qV(t){t.int_points1_sorted=RQ(t.int_points1),t.int_points2_sorted=RQ(t.int_points2)}function RQ(t){let e=new Map,n=0;for(let i of t)e.has(i.face)||(e.set(i.face,n),n++);for(let i of t)i.faceId=e.get(i.face);return t.slice().sort(izn)}function izn(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function RBe(t){if(t.int_points1.length<2)return;let e=!1,n,o,i,r;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){n=t.int_points1_sorted[s],o=t.int_points2[n.id];for(let a=s+1;a<t.int_points1_sorted.length&&(i=t.int_points1_sorted[a],!!gD(i.arc_length,n.arc_length));a++)i.id!==-1&&(r=t.int_points2[i.id],r.id!==-1&&i.edge_before===n.edge_before&&i.edge_after===n.edge_after&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after&&(i.id=-1,r.id=-1,e=!0))}o=t.int_points2_sorted[0],n=t.int_points1[o.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(o.id===-1||!gD(a.arc_length,o.arc_length)){o=a,n=t.int_points1[o.id];continue}let A=t.int_points1[a.id];A.edge_before===n.edge_before&&A.edge_after===n.edge_after&&a.edge_before===o.edge_before&&a.edge_after===o.edge_after&&(A.id=-1,a.id=-1,e=!0)}e&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function TBe(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=V9),e.edge_after&&(e.edge_after.bvStart=V9)}function kBe(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function rzn(t){let e,n,o,i=t.int_points1.length;for(let r=0;r<i;r++){let s=t.int_points1_sorted[r];s.face!==e&&(n=r,e=s.face);let a=r,A=EF(t.int_points1_sorted,r,e),c;a+A<i&&t.int_points1_sorted[a+A].face===e?c=a+A:c=n;let l=EF(t.int_points1_sorted,c,e);o=null;for(let _=c;_<c+l;_++){let f=t.int_points1_sorted[_];if(f.face===e&&t.int_points2[f.id].face===t.int_points2[s.id].face){o=f;break}}if(o===null)continue;let u=s.edge_after,g=o.edge_before;if(!(u.bv===V9&&g.bv===V9)||u!==g)continue;let h=t.int_points2[s.id],d=t.int_points2[o.id],p=h.edge_after,m=d.edge_before;p.bv===V9&&m.bv===V9&&p===m||(h=t.int_points2[o.id],d=t.int_points2[s.id],p=h.edge_after,m=d.edge_before),p.bv===V9&&m.bv===V9&&p===m&&u.setOverlap(p)}}function EF(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&!(o.face!==n||(i=t[s],!(i.pt.equalTo(o.pt)&&i.edge_before===o.edge_before&&i.edge_after===o.edge_after)));s++)r++;return r}function BF(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=SBe,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=WV),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=_F),n.is_vertex&WV){n.edge_before=o.prev,o.prev&&(n.is_vertex=_F);continue}if(n.is_vertex&_F)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof pD&&n.is_vertex&WV&&(n.edge_after=t.first)}}function kht(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}const{INSIDE:J9,OUTSIDE:W9,BOUNDARY:zf,OVERLAP_SAME:szn,OVERLAP_OPPOSITE:azn}=Rre,{NOT_VERTEX:Fhr,START_VERTEX:Fht,END_VERTEX:Lht}=Rre,Lre=1,XV=2,mD=3;function Azn(t,e){let[n]=ZV(t,e,Lre,!0);return n}function FBe(t,e){let o=e.clone().reverse(),[i]=ZV(t,o,mD,!0);return i}function Hht(t,e){let[n]=ZV(t,e,XV,!0);return n}function Oht(t,e){let[n,o]=ZV(t,e,XV,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=>a.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=>a.shape)];return[i,r]}function LBe(t,e){let[n]=ZV(t,e,mD,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=>r.shape)];return o}function Ght(t,e){let n=t.clone(),o=e.clone(),i=Yht(n,o);qV(i),BF(n,i.int_points1_sorted),BF(o,i.int_points2_sorted),RBe(i),qV(i);let r=i.int_points1_sorted.map(a=>a.pt),s=i.int_points2_sorted.map(a=>a.pt);return[r,s]}function czn(t,e,n,o){let i=Uht(t,n.int_points1),r=Uht(e,n.int_points2);for(Kht(i,e),Kht(r,t),TBe(n.int_points1),TBe(n.int_points2),kBe(n.int_points1,e),kBe(n.int_points2,t);uzn(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););rzn(n),HBe(t,o,n.int_points1_sorted,!0),HBe(e,o,n.int_points2_sorted,!1),Vht(t,i,o,!0),Vht(e,r,o,!1)}function lzn(t,e,n,o){gzn(t,e,o,n.int_points2),dzn(t,e,n),OBe(t,n.int_points1),OBe(e,n.int_points2),GBe(t,n.int_points1,n.int_points2),GBe(t,n.int_points2,n.int_points1),zht(t),zht(e)}function ZV(t,e,n,o){let i=t.clone(),r=e.clone(),s=Yht(i,r);return qV(s),BF(i,s.int_points1_sorted),BF(r,s.int_points2_sorted),RBe(s),qV(s),czn(i,r,s,n),o&&lzn(i,r,s,n),[i,r]}function Yht(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)xF(o,a,n.int_points1),xF(r,a,n.int_points2)}}return n}function Uht(t,e){let n=[];for(let o of t.faces)e.find(i=>i.face===o)||n.push(o);return n}function Kht(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function uzn(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u<c;u++){let g=o[u];g.face!==s&&(a=u,s=g.face);let h=u,d=EF(o,u,s),p;h+d<c&&o[h+d].face===s?p=h+d:p=a;let m=EF(o,p,s);A=null;for(let I=p;I<p+m;I++){let C=o[I];if(C.face===s&&i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv===zf&&f.bv!=zf){_.bv=f.bv;continue}if(_.bv!=zf&&f.bv===zf){f.bv=_.bv;continue}if(_.bv===zf&&f.bv===zf&&_!=f||_.bv===J9&&f.bv===W9||_.bv===W9&&f.bv===J9){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===zf&&f.bv===zf&&_!=f){let I=_.next,C;for(;I!=f;){if(I.bv!=zf){if(C===void 0)C=I.bv;else if(I.bv!=C)throw cd.UNRESOLVED_BOUNDARY_CONFLICT}I=I.next}C!=null&&(_.bv=C,f.bv=C);continue}if(_.bv===J9&&f.bv===W9||_.bv===W9&&f.bv===J9){let I=_;for(;I!=f;){if(I.bvStart===_.bv&&I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C<10*Ge.DP_TOL){xF(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex&Fht)x.edge_after=I,x.edge_before=I.prev,I.bvStart=zf,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex&Lht)x.edge_after=I.next,I.bvEnd=zf,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=zf,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);xF(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex&Fht)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex&Lht)B.edge_after=E.next;else{let S=i.find(w=>w.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S&&(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=zf,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=zf,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}qV(r),l=!0;break}}I=I.next}if(l)break;throw cd.UNRESOLVED_BOUNDARY_CONFLICT}}return l}function HBe(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A<n.length;A++){if(s=n[A],s.face!==i&&(r=A,i=s.face),i.isEmpty())continue;let c=A,l=EF(n,A,i),u;c+l<n.length&&n[c+l].face===s.face?u=c+l:u=r,a=n[u];let g=u,h=EF(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===J9&&p.bv===J9&&e===Lre||d.bv===W9&&p.bv===W9&&e===XV||(d.bv===W9||p.bv===W9)&&e===mD&&!o||(d.bv===J9||p.bv===J9)&&e===mD&&o||d.bv===zf&&p.bv===zf&&d.overlap&szn&&o||d.bv===zf&&p.bv===zf&&d.overlap&azn){t.removeChain(i,d,p);for(let m=c;m<c+l;m++)n[m].edge_after=void 0;for(let m=g;m<g+h;m++)n[m].edge_before=void 0}A+=l-1}}function gzn(t,e,n,o){for(let i of e.faces){for(let r of i)t.edges.add(r);o.find(r=>r.face===i)===void 0&&t.addFace(i.first,i.last)}}function dzn(t,e,n){if(n.int_points1.length!==0)for(let o=0;o<n.int_points1.length;o++){let i=n.int_points1[o],r=n.int_points2[o];if(i.edge_before!==void 0&&i.edge_after===void 0&&r.edge_before===void 0&&r.edge_after!==void 0&&(i.edge_before.next=r.edge_after,r.edge_after.prev=i.edge_before,i.edge_after=r.edge_after,r.edge_before=i.edge_before),r.edge_before!==void 0&&r.edge_after===void 0&&i.edge_before===void 0&&i.edge_after!==void 0&&(r.edge_before.next=i.edge_after,i.edge_after.prev=r.edge_before,r.edge_after=i.edge_after,i.edge_before=r.edge_before),i.edge_before!==void 0&&i.edge_after===void 0)for(let s of n.int_points1_sorted)s!==i&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(i.pt)&&(i.edge_before.next=s.edge_after,s.edge_after.prev=i.edge_before,i.edge_after=s.edge_after,s.edge_before=i.edge_before);if(r.edge_before!==void 0&&r.edge_after===void 0)for(let s of n.int_points2_sorted)s!==r&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(r.pt)&&(r.edge_before.next=s.edge_after,s.edge_after.prev=r.edge_before,r.edge_after=s.edge_after,s.edge_before=r.edge_before)}}function OBe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function GBe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{vBe.testInfiniteLoop(i)}catch{throw cd.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function Vht(t,e,n,o){for(let i of e){let r=i.first.bv;(n===Lre&&r===J9||n===mD&&r===J9&&o||n===mD&&r===W9&&!o||n===XV&&r===W9)&&t.deleteFace(i)}}function zht(t){const e=[];for(const n of t.edges)(!n.face||!t.faces.has(n.face))&&e.push(n);for(const n of e)t.edges.delete(n)}var YBe=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:XV,BOOLEAN_SUBTRACT:mD,BOOLEAN_UNION:Lre,calculateIntersections:Ght,innerClip:Oht,intersect:Hht,outerClip:LBe,removeNotRelevantChains:HBe,removeOldFaces:OBe,restoreFaces:GBe,subtract:FBe,unify:Azn});const hzn=RegExp("T.F..FFF.|T.F...F.."),pzn=RegExp("T........|.T.......|...T.....|....T...."),mzn=RegExp("FT.......|F..T.....|F...T...."),_zn=RegExp("T.F..F..."),fzn=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF...");let bF=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(e){this.m[0]=e}get I2B(){return this.m[1]}set I2B(e){this.m[1]=e}get I2E(){return this.m[2]}set I2E(e){this.m[2]=e}get B2I(){return this.m[3]}set B2I(e){this.m[3]=e}get B2B(){return this.m[4]}set B2B(e){this.m[4]=e}get B2E(){return this.m[5]}set B2E(e){this.m[5]=e}get E2I(){return this.m[6]}set E2I(e){this.m[6]=e}get E2B(){return this.m[7]}set E2B(e){this.m[7]=e}get E2E(){return this.m[8]}set E2E(e){this.m[8]=e}toString(){return this.m.map(e=>e instanceof Array&&e.length>0?"T":e instanceof Array&&e.length===0?"F":"*").join("")}equal(){return hzn.test(this.toString())}intersect(){return pzn.test(this.toString())}touch(){return mzn.test(this.toString())}inside(){return _zn.test(this.toString())}covered(){return fzn.test(this.toString())}};function ez(t,e){let n,o=new Ge.Ray(e),i=new Ge.Line(o.pt,o.norm);const r=new Ge.Box(o.box.xmin-Ge.DP_TOL,o.box.ymin-Ge.DP_TOL,o.box.xmax+Ge.DP_TOL,o.box.ymax+Ge.DP_TOL);if(t.box.not_intersect(r))return Ge.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ge.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ge.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ge.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=>Iht(l.pt.x,u.pt.x)?-1:fht(l.pt.x,u.pt.x)?1:l.face_index<u.face_index?-1:l.face_index>u.face_index?1:l.edge.arc_length<u.edge.arc_length?-1:l.edge.arc_length>u.edge.arc_length?1:0);let c=0;for(let l=0;l<A.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;QBe(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;QBe(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.edge.shape instanceof Ge.Segment)c++;else{let g=u.edge.shape.box;gD(u.pt.y,g.ymin)||gD(u.pt.y,g.ymax)||c++}}return n=c%2===1?Nre:pht,n}function Izn(t,e){return SF(t,e).equal()}function Jht(t,e){return SF(t,e).intersect()}function Czn(t,e){return SF(t,e).touch()}function yzn(t,e){return!Jht(t,e)}function Wht(t,e){return SF(t,e).inside()}function jht(t,e){return SF(t,e).covered()}function xzn(t,e){return Wht(e,t)}function $ht(t,e){return jht(e,t)}function SF(t,e){if(t instanceof Ge.Line&&e instanceof Ge.Line)return Ezn(t,e);if(t instanceof Ge.Line&&e instanceof Ge.Circle)return Bzn(t,e);if(t instanceof Ge.Line&&e instanceof Ge.Box)return bzn(t,e);if(t instanceof Ge.Line&&e instanceof Ge.Polygon)return Szn(t,e);if((t instanceof Ge.Segment||t instanceof Ge.Arc)&&e instanceof Ge.Polygon)return qht(t,e);if((t instanceof Ge.Segment||t instanceof Ge.Arc)&&(e instanceof Ge.Circle||e instanceof Ge.Box))return qht(t,new Ge.Polygon(e));if(t instanceof Ge.Polygon&&e instanceof Ge.Polygon)return Hre(t,e);if((t instanceof Ge.Circle||t instanceof Ge.Box)&&(e instanceof Ge.Circle||e instanceof Ge.Box))return Hre(new Ge.Polygon(t),new Ge.Polygon(e));if((t instanceof Ge.Circle||t instanceof Ge.Box)&&e instanceof Ge.Polygon)return Hre(new Ge.Polygon(t),e);if(t instanceof Ge.Polygon&&(e instanceof Ge.Circle||e instanceof Ge.Box))return Hre(t,new Ge.Polygon(e))}function Ezn(t,e){let n=new bF,o=fF(t,e);return o.length===0?t.contains(e.pt)&&e.contains(t.pt)?(n.I2I=[t],n.I2E=[],n.E2I=[]):(n.I2I=[],n.I2E=[t],n.E2I=[e]):(n.I2I=o,n.I2E=t.split(o),n.E2I=e.split(o)),n}function Bzn(t,e){let n=new bF,o=hD(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new pD([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ge.Polygon([e.toArc()]).cutWithLine(t)}return n}function bzn(t,e){let n=new bF,o=IF(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new pD([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();e.toSegments().some(a=>a.contains(o[0])&&a.contains(o[1]))?(n.I2I=[],n.I2B=[s[1]],n.I2E=[s[0],s[2]],n.E2I=[e]):(n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ge.Polygon(e.toSegments()).cutWithLine(t))}return n}function Szn(t,e){let n=new bF,o=$V(t,e),i=new pD([t]),r=o.length>0?o.slice():t.sortPoints(o);return i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===Ge.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===Ge.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===Ge.OUTSIDE).map(s=>s.shape),n.E2I=e.cutWithLine(t),n}function qht(t,e){let n=new bF,o=ZVn(t,e),i=o.length>0?o.slice():t.sortPoints(o),r=new pD([t]);r.split(i),[...r].forEach(s=>s.setInclusion(e)),n.I2I=[...r].filter(s=>s.bv===Ge.INSIDE).map(s=>s.shape),n.I2B=[...r].slice(1).map(s=>s.bv===Ge.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=>s.bv===Ge.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(ez(e,s)){case Ge.INSIDE:n.B2I.push(s);break;case Ge.BOUNDARY:n.B2B.push(s);break;case Ge.OUTSIDE:n.B2E.push(s);break}return n}function Hre(t,e){let n=new bF,[o,i]=Ght(t,e),r=Hht(t,e),s=FBe(t,e),a=FBe(e,t),[A,c]=Oht(t,e),l=LBe(t,e),u=LBe(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var Qzn=Object.freeze({__proto__:null,contain:xzn,cover:$ht,covered:jht,disjoint:yzn,equal:Izn,inside:Wht,intersect:Jht,relate:SF,touch:Czn});let QF=class Rk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new Rk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new Rk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new Rk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length==1&&!isNaN(e[0].x)&&!isNaN(e[0].y))n=e[0].x,o=e[0].y;else if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")n=e[0],o=e[1];else throw cd.ILLEGAL_PARAMETERS;return this.multiply(new Rk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new Rk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new Rk(e,0,0,n,0,0))}equalTo(e){return!(!Ge.Utils.EQ(this.tx,e.tx)||!Ge.Utils.EQ(this.ty,e.ty)||!Ge.Utils.EQ(this.a,e.a)||!Ge.Utils.EQ(this.b,e.b)||!Ge.Utils.EQ(this.c,e.c)||!Ge.Utils.EQ(this.d,e.d))}};Ge.Matrix=QF;const vzn=(...t)=>new Ge.Matrix(...t);Ge.matrix=vzn;let wzn=class{constructor(e,n){this.low=e,this.high=n}get max(){return this.clone()}less_than(e){return this.low<e.low||this.low===e.low&&this.high<e.high}equal_to(e){return this.low===e.low&&this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high<e.low||e.high<this.low}merge(e){const n=this.low===void 0?e.low:this.low<e.low?this.low:e.low,o=this.high===void 0?e.high:this.high>e.high?this.high:e.high,i=this.clone();return i.low=n,i.high=o,i}output(){return[this.low,this.high]}comparable_less_than(e,n){return e<n}},Pzn=class WEn extends wzn{clone(){return new WEn(this.low,this.high)}};const Z1=1,eu=0;let TQ=class{constructor(e,n,o=null,i=null,r=null,s=eu){if(this.left=o,this.right=i,this.parent=r,this.color=s,this.item={key:void 0,values:[]},n!==void 0&&this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,A]=e;if(!Number.isNaN(a)&&!Number.isNaN(A)){let c=a,l=A;c>l&&([c,l]=[l,c]),this.item.key=new Pzn(c,l)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===eu}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n&&o&&n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(n,i.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(i.high,n)}},UBe=class jEn{constructor(){this.root=null,this.nil_node=new TQ}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new TQ(e));if(o)return o.item.values.push(n),o;const i=new TQ(e,n,this.nil_node,this.nil_node,null,Z1);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new TQ(e));return o?arguments.length<2||n===e?!0:o.item.values.some(i=>i&&i.equal_to?i.equal_to(n):i===n):!1}remove(e,n=e){const o=this.tree_search(this.root,new TQ(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=>r&&r.equal_to?r.equal_to(n):r===n);if(i>=0)return o.item.values.splice(i,1),o.item.values.length===0&&this.tree_delete(o),o}search(e,n=(o,i)=>o===i?i.output():o){const o=new TQ(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new TQ(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new jEn;return this.tree_walk(this.root,o=>{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=>o===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new TQ(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,e.less_than(n)?n=n.left:n=n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===Z1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===Z1?(n.parent.color=eu,o.color=eu,n.parent.parent.color=Z1,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=eu,n.parent.parent.color=Z1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===Z1?(n.parent.color=eu,o.color=eu,n.parent.parent.color=Z1,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=eu,n.parent.parent.color=Z1,this.rotate_left(n.parent.parent)));this.root.color=eu}tree_delete(e){let n,o;e.left===this.nil_node||e.right===this.nil_node?n=e:n=this.tree_successor(e),n.left!==this.nil_node?o=n.left:o=n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===eu&&this.delete_fixup(o)}delete_fixup(e){let n=e,o;for(;n!==this.root&&n.parent!=null&&n.color===eu;)n===n.parent.left?(o=n.parent.right,o.color===Z1&&(o.color=eu,n.parent.color=Z1,this.rotate_left(n.parent),o=n.parent.right),o.left.color===eu&&o.right.color===eu?(o.color=Z1,n=n.parent):(o.right.color===eu&&(o.color=Z1,o.left.color=eu,this.rotate_right(o),o=n.parent.right),o.color=n.parent.color,n.parent.color=eu,o.right.color=eu,this.rotate_left(n.parent),n=this.root)):(o=n.parent.left,o.color===Z1&&(o.color=eu,n.parent.color=Z1,this.rotate_right(n.parent),o=n.parent.left),o.left.color===eu&&o.right.color===eu?(o.color=Z1,n=n.parent):(o.left.color===eu&&(o.color=Z1,o.right.color=eu,this.rotate_left(o),o=n.parent.left),o.color=n.parent.color,n.parent.color=eu,o.left.color=eu,this.rotate_right(n.parent),n=this.root));n.color=eu}tree_search(e,n){if(!(e==null||e===this.nil_node))return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i&&i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:((!o||i.less_than(o))&&(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),!o&&e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null&&i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===Z1&&(n.left.color===eu&&n.right.color===eu||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===eu&&n++,e.left!==this.nil_node?o=this.testBlackHeightProperty(e.left):o=1,e.right!==this.nil_node?i=this.testBlackHeightProperty(e.right):i=1,o!==i)throw new Error("Red-black height property violated");return n+=o,n}},Mzn=class extends Set{constructor(e){super(e),this.index=new UBe,this.forEach(n=>this.index.insert(n))}add(e){let n=this.size;const{key:o,value:i}=e,r=o||e.box,s=i||e;return super.add(s),this.size>n&&this.index.insert(r,s),this}delete(e){const{key:n,value:o}=e,i=n||e.box,r=o||e;let s=super.delete(r);return s&&this.index.remove(i,r),s}clear(){super.clear(),this.index=new UBe}search(e){return this.index.search(e)}hit(e){let n=new Ge.Box(e.x-1,e.y-1,e.x+1,e.y+1);return this.index.search(n).filter(i=>e.on(i))}svg(){return[...this].reduce((n,o)=>n+o.svg(),"")}};Ge.PlanarSet=Mzn;let kQ=class{get name(){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...e){return this.transform(new QF().translate(...e))}rotate(e,n=new Ge.Point){return this.transform(new QF().rotate(e,n.x,n.y))}scale(e,n){return this.transform(new QF().scale(e,n))}transform(...e){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(e={}){throw cd.CANNOT_INVOKE_ABSTRACT_METHOD}},Gc=class $En extends kQ{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number"){this.x=n[0],this.y=n[1];return}}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"){this.x=e[0],this.y=e[1];return}throw cd.ILLEGAL_PARAMETERS}}get box(){return new Ge.Box(this.x,this.y,this.x,this.y)}clone(){return new Ge.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ge.Utils.EQ(this.x,e.x)&&Ge.Utils.EQ(this.y,e.y)}lessThan(e){return!!(Ge.Utils.LT(this.y,e.y)||Ge.Utils.EQ(this.y,e.y)&&Ge.Utils.LT(this.x,e.x))}transform(e){return new Ge.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ge.Vector(this,e.pt);if(Ge.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ge.Vector(e.pt,this);return Ge.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof $En){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ge.Segment(this,e)]}if(e instanceof Ge.Line)return Ge.Distance.point2line(this,e);if(e instanceof Ge.Circle)return Ge.Distance.point2circle(this,e);if(e instanceof Ge.Segment)return Ge.Distance.point2segment(this,e);if(e instanceof Ge.Arc)return Ge.Distance.point2arc(this,e);if(e instanceof Ge.Box)return Ge.Distance.point2polygon(this,new Ge.Polygon(e));if(e instanceof Ge.Polygon)return Ge.Distance.point2polygon(this,e);if(e instanceof Ge.PlanarSet)return Ge.Distance.shape2planarSet(this,e);if(e instanceof Ge.Multiline)return Ge.Distance.shape2multiline(this,e)}on(e){if(e instanceof Ge.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ge.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
<circle cx="${this.x}" cy="${this.y}" r="${n}"
            ${dD({fill:"red",...e})} />`}};Ge.Point=Gc;const by=(...t)=>new Ge.Point(...t);Ge.point=by;let Dzn=class extends kQ{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number"){this.x=n[0],this.y=n[1];return}}if(e.length===1&&e[0]instanceof Object&&e[0].name==="vector"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{start:n,end:o}=e[0];this.x=o.x-n.x,this.y=o.y-n.y;return}if(e.length===2){let n=e[0],o=e[1];if(typeof n=="number"&&typeof o=="number"){this.x=n,this.y=o;return}if(n instanceof Ge.Point&&o instanceof Ge.Point){this.x=o.x-n.x,this.y=o.y-n.y;return}}throw cd.ILLEGAL_PARAMETERS}}clone(){return new Ge.Vector(this.x,this.y)}get slope(){let e=Math.atan2(this.y,this.x);return e<0&&(e=2*Math.PI+e),e}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ge.Utils.EQ_0(this.length)}equalTo(e){return Ge.Utils.EQ(this.x,e.x)&&Ge.Utils.EQ(this.y,e.y)}multiply(e){return new Ge.Vector(e*this.x,e*this.y)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}normalize(){if(this.isZeroLength())throw cd.ZERO_DIVISION;return new Ge.Vector(this.x/this.length,this.y/this.length)}rotate(e,n=new Ge.Point){if(n.x===0&&n.y===0)return this.transform(new QF().rotate(e));throw cd.OPERATION_IS_NOT_SUPPORTED}transform(e){return new Ge.Vector(e.transform([this.x,this.y]))}rotate90CCW(){return new Ge.Vector(-this.y,this.x)}rotate90CW(){return new Ge.Vector(this.y,-this.x)}invert(){return new Ge.Vector(-this.x,-this.y)}add(e){return new Ge.Vector(this.x+e.x,this.y+e.y)}subtract(e){return new Ge.Vector(this.x-e.x,this.y-e.y)}angleTo(e){let n=this.normalize(),o=e.normalize(),i=Math.atan2(n.cross(o),n.dot(o));return i<0&&(i+=2*Math.PI),i}projectionOn(e){let n=e.normalize(),o=this.dot(n);return n.multiply(o)}get name(){return"vector"}};Ge.Vector=Dzn;const vF=(...t)=>new Ge.Vector(...t);Ge.vector=vF;let _D=class git extends kQ{constructor(...e){if(super(),this.ps=new Ge.Point,this.pe=new Ge.Point,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===4){let n=e[0];this.ps=new Ge.Point(n[0],n[1]),this.pe=new Ge.Point(n[2],n[3]);return}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{ps:n,pe:o}=e[0];this.ps=new Ge.Point(n.x,n.y),this.pe=new Ge.Point(o.x,o.y);return}if(e.length===1&&e[0]instanceof Ge.Point){this.ps=e[0].clone();return}if(e.length===2&&e[0]instanceof Ge.Point&&e[1]instanceof Ge.Point){this.ps=e[0].clone(),this.pe=e[1].clone();return}if(e.length===4){this.ps=new Ge.Point(e[0],e[1]),this.pe=new Ge.Point(e[2],e[3]);return}throw cd.ILLEGAL_PARAMETERS}}clone(){return new Ge.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ge.Vector(this.start,this.end).slope}get box(){return new Ge.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)&&this.pe.equalTo(e.pe)}contains(e){return Ge.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return jV(this,e);if(e instanceof Ge.Ray)return DBe(e,this);if(e instanceof Ge.Segment)return kre(this,e);if(e instanceof Ge.Circle)return Fre(this,e);if(e instanceof Ge.Box)return zVn(this,e);if(e instanceof Ge.Arc)return CF(this,e);if(e instanceof Ge.Polygon)return PBe(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ge.Line){let[n,o]=Ge.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ge.PlanarSet){let[n,o]=Ge.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ge.Multiline)return Ge.Distance.shape2multiline(this,e)}tangentInStart(){return new Ge.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ge.Vector(this.end,this.start).normalize()}reverse(){return new git(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ge.Segment(this.start,e),new Ge.Segment(e,this.end)]}middle(){return new Ge.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e>this.length||e<0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ge.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ge.Distance.point2segment(e,this);return n}definiteIntegral(e=0){let n=this.end.x-this.start.x,o=this.start.y-e,i=this.end.y-e;return n*(o+i)/2}transform(e=new Ge.Matrix){return new git(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ge.Line(this.start,this.end).sortPoints(e)}get name(){return"segment"}svg(e={}){return`
<line x1="${this.start.x}" y1="${this.start.y}" x2="${this.end.x}" y2="${this.end.y}" ${dD(e)} />`}};Ge.Segment=_D;const KBe=(...t)=>new Ge.Segment(...t);Ge.segment=KBe;let{vector:tz}=Ge,Nzn=class qEn extends kQ{constructor(...e){if(super(),this.pt=new Ge.Point,this.norm=new Ge.Vector(0,1),e.length!==0){if(e.length===1&&e[0]instanceof Object&&e[0].name==="line"){let{pt:n,norm:o}=e[0];this.pt=new Ge.Point(n),this.norm=new Ge.Vector(o);return}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ge.Point&&o instanceof Ge.Point){this.pt=n,this.norm=qEn.points2norm(n,o),this.norm.dot(tz(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}if(n instanceof Ge.Point&&o instanceof Ge.Vector){if(Ge.Utils.EQ_0(o.x)&&Ge.Utils.EQ_0(o.y))throw cd.ILLEGAL_PARAMETERS;this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),this.norm.dot(tz(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}if(n instanceof Ge.Vector&&o instanceof Ge.Point){if(Ge.Utils.EQ_0(n.x)&&Ge.Utils.EQ_0(n.y))throw cd.ILLEGAL_PARAMETERS;this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),this.norm.dot(tz(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}}throw cd.ILLEGAL_PARAMETERS}}clone(){return new Ge.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ge.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ge.Vector(this.norm.y,-this.norm.x).slope}get standard(){let e=this.norm.x,n=this.norm.y,o=this.norm.dot(tz(this.pt.x,this.pt.y));return[e,n,o]}parallelTo(e){return Ge.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)&&this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ge.Vector(this.pt,e);return Ge.Utils.EQ_0(this.norm.dot(n))}coord(e){return tz(e.x,e.y).cross(this.norm)}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return fF(this,e);if(e instanceof Ge.Ray)return Nht(e,this);if(e instanceof Ge.Circle)return hD(this,e);if(e instanceof Ge.Box)return IF(this,e);if(e instanceof Ge.Segment)return jV(e,this);if(e instanceof Ge.Arc)return Tre(this,e);if(e instanceof Ge.Polygon)return $V(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ge.Point)return[new Ge.Ray(e,this.norm),new Ge.Ray(e,this.norm)];{let n=new Ge.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ge.Point){return new Ge.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ge.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=>this.coord(n)<this.coord(o)?-1:this.coord(n)>this.coord(o)?1:0)}get name(){return"line"}svg(e,n={}){let o=IF(this,e);if(o.length===0)return"";let i=o[0],r=o.length===2?o[1]:o.find(a=>!a.equalTo(i));return r===void 0&&(r=i),new Ge.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw cd.ILLEGAL_PARAMETERS;return new Ge.Vector(e,n).normalize().rotate90CCW()}};Ge.Line=Nzn;const Rzn=(...t)=>new Ge.Line(...t);Ge.line=Rzn;let fD=class extends kQ{constructor(...e){if(super(),this.pc=new Ge.Point,this.r=1,e.length===1&&e[0]instanceof Object&&e[0].name==="circle"){let{pc:n,r:o}=e[0];this.pc=new Ge.Point(n),this.r=o}else{let[n,o]=[...e];n&&n instanceof Ge.Point&&(this.pc=n.clone()),o!==void 0&&(this.r=o)}}clone(){return new Ge.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ge.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(e){if(e instanceof Ge.Point)return Ge.Utils.LE(e.distanceTo(this.center)[0],this.r);if(e instanceof Ge.Segment)return Ge.Utils.LE(e.start.distanceTo(this.center)[0],this.r)&&Ge.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ge.Arc)return this.intersect(e).length===0&&Ge.Utils.LE(e.start.distanceTo(this.center)[0],this.r)&&Ge.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ge.Circle)return this.intersect(e).length===0&&Ge.Utils.LE(e.r,this.r)&&Ge.Utils.LE(e.center.distanceTo(this.center)[0],this.r)}toArc(e=!0){return new Ge.Arc(this.center,this.r,Math.PI,-Math.PI,e)}scale(e,n){if(e!==n||!(this.pc.x===0&&this.pc.y===0))throw cd.OPERATION_IS_NOT_SUPPORTED;return new Ge.Circle(this.pc,this.r*e)}transform(e=new Ge.Matrix){return new Ge.Circle(this.pc.transform(e),this.r)}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return hD(e,this);if(e instanceof Ge.Ray)return Dht(e,this);if(e instanceof Ge.Segment)return Fre(e,this);if(e instanceof Ge.Circle)return Eht(e,this);if(e instanceof Ge.Box)return JVn(this,e);if(e instanceof Ge.Arc)return wBe(e,this);if(e instanceof Ge.Polygon)return vht(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.circle2circle(this,e);return[n,o]}if(e instanceof Ge.Line){let[n,o]=Ge.Distance.circle2line(this,e);return[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.arc2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ge.PlanarSet){let[n,o]=Ge.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ge.Multiline){let[n,o]=Ge.Distance.shape2multiline(this,e);return[n,o]}}get name(){return"circle"}svg(e={}){return`
<circle cx="${this.pc.x}" cy="${this.pc.y}" r="${this.r}"
                ${dD({fill:"none",...e})} />`}};Ge.Circle=fD;const Tzn=(...t)=>new Ge.Circle(...t);Ge.circle=Tzn;let T8=class extends kQ{constructor(...e){if(super(),this.pc=new Ge.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,e.length!==0)if(e.length===1&&e[0]instanceof Object&&e[0].name==="arc"){let{pc:n,r:o,startAngle:i,endAngle:r,counterClockwise:s}=e[0];this.pc=new Ge.Point(n.x,n.y),this.r=o,this.startAngle=i,this.endAngle=r,this.counterClockwise=s}else{let[n,o,i,r,s]=[...e];n&&n instanceof Ge.Point&&(this.pc=n.clone()),o!==void 0&&(this.r=o),i!==void 0&&(this.startAngle=i),r!==void 0&&(this.endAngle=r),s!==void 0&&(this.counterClockwise=s)}}clone(){return new Ge.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let e=this.startAngle,n=this.endAngle;if(Ge.Utils.EQ(Math.abs(e-n),Ge.PIx2))return Ge.PIx2;Math.abs(e)>Ge.PIx2&&(e-=Math.trunc(e/Ge.PIx2)*Ge.PIx2),e<0&&(e+=Ge.PIx2),Math.abs(n)>Ge.PIx2&&(n-=Math.trunc(n/Ge.PIx2)*Ge.PIx2),n<0&&(n+=Ge.PIx2);let o=this.counterClockwise?n-e:e-n;return o<0&&(o+=Ge.PIx2),o}get start(){return new Ge.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ge.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let n=this.breakToFunctional().reduce((o,i)=>o.merge(i.start.box),new Ge.Box);return n=n.merge(this.end.box),n}contains(e){if(!Ge.Utils.EQ(this.pc.distanceTo(e)[0],this.r))return!1;if(e.equalTo(this.start))return!0;let n=new Ge.Vector(this.pc,e).slope,o=new Ge.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise);return Ge.Utils.LE(o.length,this.length)}split(e){if(this.start.equalTo(e))return[null,this.clone()];if(this.end.equalTo(e))return[this.clone(),null];let n=new Ge.Vector(this.pc,e).slope;return[new Ge.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise),new Ge.Arc(this.pc,this.r,n,this.endAngle,this.counterClockwise)]}middle(){let e=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ge.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise).end}pointAtLength(e){if(e>this.length||e<0)return null;if(e===0)return this.start;if(e===this.length)return this.end;let n=e/this.length,o=this.counterClockwise?this.startAngle+this.sweep*n:this.startAngle-this.sweep*n;return new Ge.Arc(this.pc,this.r,this.startAngle,o,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return Tre(e,this);if(e instanceof Ge.Ray)return NBe(e,this);if(e instanceof Ge.Circle)return wBe(this,e);if(e instanceof Ge.Segment)return CF(e,this);if(e instanceof Ge.Box)return WVn(this,e);if(e instanceof Ge.Arc)return Bht(this,e);if(e instanceof Ge.Polygon)return MBe(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2arc(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle){let[n,o]=Ge.Distance.arc2circle(this,e);return[n,o]}if(e instanceof Ge.Line){let[n,o]=Ge.Distance.arc2line(this,e);return[n,o]}if(e instanceof Ge.Segment){let[n,o]=Ge.Distance.segment2arc(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Arc){let[n,o]=Ge.Distance.arc2arc(this,e);return[n,o]}if(e instanceof Ge.Box){let[n,o]=Ge.Distance.shape2polygon(this,new Ge.Polygon(e));return[n,o]}if(e instanceof Ge.Polygon){let[n,o]=Ge.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ge.PlanarSet){let[n,o]=Ge.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ge.Multiline)return Ge.Distance.shape2multiline(this,e)}breakToFunctional(){let e=[],n=[0,Math.PI/2,Math.PI,3*Math.PI/2],o=this.startAngle,i=this.endAngle;Ge.Utils.EQ(Math.abs(o-i),Ge.PIx2)&&(i=o),Math.abs(o)>Ge.PIx2&&(o-=Math.trunc(o/Ge.PIx2)*Ge.PIx2),o<0&&(o+=Ge.PIx2),Math.abs(i)>Ge.PIx2&&(i-=Math.trunc(i/Ge.PIx2)*Ge.PIx2),i<0&&(i+=Ge.PIx2);let r=o,s,a,A;this.counterClockwise?(a=Math.ceil(o/(Math.PI/2))%4,A=1):(a=Math.floor(o/(Math.PI/2))%4,A=-1);for(let c=0,l=a;c<4;c++,l=(l+A+4)%4){if(s=n[l],s===r)continue;let u=this.counterClockwise?s-o:o-s;if(u<0&&(u+=Ge.PIx2),u>this.sweep)break;e.push(new Ge.Arc(this.pc,this.r,r,s,this.counterClockwise)),r=s}return e.length===0?(e.push(this),e):(s=i,r!==s&&e.push(new Ge.Arc(this.pc,this.r,r,s,this.counterClockwise)),e)}tangentInStart(){let e=new Ge.Vector(this.pc,this.start),n=this.counterClockwise?Math.PI/2:-Math.PI/2;return e.rotate(n).normalize()}tangentInEnd(){let e=new Ge.Vector(this.pc,this.end),n=this.counterClockwise?-Math.PI/2:Math.PI/2;return e.rotate(n).normalize()}reverse(){return new Ge.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(e=new Ge.Matrix){let n=this.start.transform(e),o=this.end.transform(e),i=this.pc.transform(e),r=this.counterClockwise;return e.a*e.d<0&&(r=!r),Ge.Arc.arcSE(i,n,o,r)}static arcSE(e,n,o,i){let{vector:r}=Ge,s=r(e,n).slope,a=r(e,o).slope;Ge.Utils.EQ(s,a)&&(a+=2*Math.PI,i=!0);let A=r(e,n).length;return new Ge.Arc(e,A,s,a,i)}definiteIntegral(e=0){return this.breakToFunctional().reduce((i,r)=>i+r.circularSegmentDefiniteIntegral(e),0)}circularSegmentDefiniteIntegral(e){let o=new Ge.Segment(this.start,this.end).definiteIntegral(e),i=Ge.Utils.EQ(this.sweep,Ge.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?o-i:o+i}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(e){let{vector:n}=Ge;return e.slice().sort((o,i)=>{let r=n(this.pc,o).slope,s=n(this.pc,i).slope;return r<s?-1:r>s?1:0})}get name(){return"arc"}svg(e={}){let n=this.sweep<=Math.PI?"0":"1",o=this.counterClockwise?"1":"0";return Ge.Utils.EQ(this.sweep,2*Math.PI)?new Ge.Circle(this.pc,this.r).svg(e):`
<path d="M${this.start.x},${this.start.y}
                             A${this.r},${this.r} 0 ${n},${o} ${this.end.x},${this.end.y}"
                    ${dD({fill:"none",...e})} />`}};Ge.Arc=T8;const kzn=(...t)=>new Ge.Arc(...t);Ge.arc=kzn;let VBe=class Kte extends kQ{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new Kte(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ge.Point(this.xmin,this.ymin)}get high(){return new Ge.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ge.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax<e.xmin||this.xmin>e.xmax||this.ymax<e.ymin||this.ymin>e.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new Kte(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!(this.low.lessThan(e.low)||this.low.equalTo(e.low)&&this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)&&this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e<=0?this.clone():new Kte(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ge.Point(this.xmin,this.ymin),new Ge.Point(this.xmax,this.ymin),new Ge.Point(this.xmax,this.ymax),new Ge.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ge.Segment(e[0],e[1]),new Ge.Segment(e[1],e[2]),new Ge.Segment(e[2],e[3]),new Ge.Segment(e[3],e[0])]}rotate(e,n=new Ge.Point){throw cd.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ge.Matrix){return this.toPoints().map(o=>o.transform(e)).reduce((o,i)=>o.merge(i.box),new Kte)}contains(e){if(e instanceof Ge.Point)return e.x>=this.xmin&&e.x<=this.xmax&&e.y>=this.ymin&&e.y<=this.ymax;if(e instanceof Ge.Segment)return e.vertices.every(n=>this.contains(n));if(e instanceof Ge.Box)return e.toSegments().every(n=>this.contains(n));if(e instanceof Ge.Circle)return this.contains(e.box);if(e instanceof Ge.Arc)return e.vertices.every(n=>this.contains(n))&&this.toSegments().every(n=>CF(n,e).length===0);if(e instanceof Ge.Line||e instanceof Ge.Ray)return!1;if(e instanceof Ge.Multiline)return e.toShapes().every(n=>this.contains(n));if(e instanceof Ge.Polygon)return this.contains(e.box)}distanceTo(e){const n=this.toSegments().map(i=>i.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=>{i[0]<o[0]&&(o=i)}),o}get name(){return"box"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`
<rect x="${this.xmin}" y="${this.ymin}" width="${n}" height="${o}"
                ${dD({fill:"none",...e})} />`}};Ge.Box=VBe;const Fzn=(...t)=>new Ge.Box(...t);Ge.box=Fzn;let Lzn=class{constructor(e){this.shape=e,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ge.Segment}get isArc(){return this.shape instanceof Ge.Arc}get isLine(){return this.shape instanceof Ge.Line}get isRay(){return this.shape instanceof Ge.Ray}middle(){return this.shape.middle()}pointAtLength(e){return this.shape.pointAtLength(e)}contains(e){return this.shape.contains(e)}setInclusion(e){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ge.Line||this.shape instanceof Ge.Ray)return this.bv=Ge.OUTSIDE,this.bv;if(this.bvStart===void 0&&(this.bvStart=ez(e,this.start)),this.bvEnd===void 0&&(this.bvEnd=ez(e,this.end)),this.bvStart===Ge.OUTSIDE||this.bvEnd==Ge.OUTSIDE)this.bv=Ge.OUTSIDE;else if(this.bvStart===Ge.INSIDE||this.bvEnd==Ge.INSIDE)this.bv=Ge.INSIDE;else{let n=ez(e,this.middle());this.bv=n}return this.bv}setOverlap(e){let n,o=this.shape,i=e.shape;o instanceof Ge.Segment&&i instanceof Ge.Segment?o.start.equalTo(i.start)&&o.end.equalTo(i.end)?n=Ge.OVERLAP_SAME:o.start.equalTo(i.end)&&o.end.equalTo(i.start)&&(n=Ge.OVERLAP_OPPOSITE):(o instanceof Ge.Arc&&i instanceof Ge.Arc||o instanceof Ge.Segment&&i instanceof Ge.Arc||o instanceof Ge.Arc&&i instanceof Ge.Segment)&&(o.start.equalTo(i.start)&&o.end.equalTo(i.end)&&o.middle().equalTo(i.middle())?n=Ge.OVERLAP_SAME:o.start.equalTo(i.end)&&o.end.equalTo(i.start)&&o.middle().equalTo(i.middle())&&(n=Ge.OVERLAP_OPPOSITE)),this.overlap===void 0&&(this.overlap=n),e.overlap===void 0&&(e.overlap=n)}svg(){if(this.shape instanceof Ge.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ge.Arc){let e=this.shape,n,o=e.counterClockwise?"1":"0";if(Ge.Utils.EQ(e.sweep,2*Math.PI)){let i=e.counterClockwise?1:-1,r=new Ge.Arc(e.pc,e.r,e.startAngle,e.startAngle+i*Math.PI,e.counterClockwise),s=new Ge.Arc(e.pc,e.r,e.startAngle+i*Math.PI,e.endAngle,e.counterClockwise);return n="0",` A${r.r},${r.r} 0 ${n},${o} ${r.end.x},${r.end.y}
                    A${s.r},${s.r} 0 ${n},${o} ${s.end.x},${s.end.y}`}else return n=e.sweep<=Math.PI?"0":"1",` A${e.r},${e.r} 0 ${n},${o} ${e.end.x},${e.end.y}`}}toJSON(){return this.shape.toJSON()}};Ge.Edge=Lzn;let Hzn=class extends vBe{constructor(e,n){super(e,n),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let e;return{next:()=>{let n=e||this.first,o=this.first?e?e===this.first:!1:!0;return e=n?n.next:void 0,{value:n,done:o}}}}append(e){return super.append(e),this.setCircularLinks(),this}insert(e,n){return super.insert(e,n),this.setCircularLinks(),this}remove(e){return super.remove(e),this}},Ozn=class Vte extends Hzn{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=>i instanceof Ge.Point)){let i=Vte.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=>i instanceof Array&&i.length===2)){let i=o.map(s=>new Ge.Point(s[0],s[1])),r=Vte.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=>i instanceof Ge.Segment||i instanceof Ge.Arc))this.shapes2face(e.edges,o);else if(o.every(i=>i.name==="segment"||i.name==="arc")){let i=[];for(let r of o){let s;r.name==="segment"?s=new Ge.Segment(r):s=new Ge.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof Vte){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ge.Circle)this.shapes2face(e.edges,[n[0].toArc(hht)]);else if(n[0]instanceof Ge.Box){let o=n[0];this.shapes2face(e.edges,[new Ge.Segment(new Ge.Point(o.xmin,o.ymin),new Ge.Point(o.xmax,o.ymin)),new Ge.Segment(new Ge.Point(o.xmax,o.ymin),new Ge.Point(o.xmax,o.ymax)),new Ge.Segment(new Ge.Point(o.xmax,o.ymax),new Ge.Point(o.xmin,o.ymax)),new Ge.Segment(new Ge.Point(o.xmin,o.ymax),new Ge.Point(o.xmin,o.ymin))])}}n.length===2&&n[0]instanceof Ge.Edge&&n[1]instanceof Ge.Edge&&(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=>e.shape.start.clone())}get shapes(){return this.edges.map(e=>e.shape.clone())}get box(){if(this._box===void 0){let e=new Ge.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e>this.perimeter||e<0)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o<e.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ge.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ge.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0&&(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ge.Utils.EQ_0(e)?this._orientation=mF.NOT_ORIENTABLE:Ge.Utils.LT(e,0)?this._orientation=mF.CCW:this._orientation=mF.CW}return this._orientation}isSimple(e){return Vte.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ge.Segment&&a.shape instanceof Ge.Segment&&(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if(!(c.equalTo(r.start)&&c.equalTo(a.end)&&a===r.prev)&&!(c.equalTo(r.end)&&c.equalTo(a.start)&&a===r.next)&&(i.push(c),o))break;if(i.length>0&&o)break}if(i.length>0&&o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)&&(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ge.Polygon(this.shapes)}toJSON(){return this.edges.map(e=>e.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=" z",e}};Ge.Face=Ozn;let Gzn=class XEn extends kQ{constructor(...e){if(super(),this.pt=new Ge.Point,this.norm=new Ge.Vector(0,1),e.length!==0&&(e.length>=1&&e[0]instanceof Ge.Point&&(this.pt=e[0].clone()),e.length!==1)){if(e.length===2&&e[1]instanceof Ge.Vector){this.norm=e[1].clone();return}throw cd.ILLEGAL_PARAMETERS}}clone(){return new XEn(this.pt,this.norm)}get slope(){return new Ge.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ge.Box(e>Math.PI/2&&e<3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e>=0&&e<=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e>=Math.PI/2&&e<=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e>=Math.PI&&e<=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ge.Vector(this.pt,e);return Ge.Utils.EQ_0(this.norm.dot(n))&&Ge.Utils.GE(n.cross(this.norm),0)}coord(e){return vF(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ge.Segment(this.pt,e),new Ge.Ray(e,this.norm)]:[]}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Segment)return DBe(this,e);if(e instanceof Ge.Arc)return NBe(this,e);if(e instanceof Ge.Line)return Nht(this,e);if(e instanceof Ge.Ray)return tzn(this,e);if(e instanceof Ge.Circle)return Dht(this,e);if(e instanceof Ge.Box)return ezn(this,e);if(e instanceof Ge.Polygon)return Rht(this,e);if(e instanceof Ge.Multiline)return yF(this,e)}rotate(e,n=new Ge.Point){return new Ge.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ge.Ray(this.pt.transform(e),this.norm.clone())}get name(){return"ray"}svg(e,n={}){let o=new Ge.Line(this.pt,this.norm),i=IF(o,e);return i=i.filter(s=>this.contains(s)),i.length===0||i.length===2?"":new Ge.Segment(this.pt,i[0]).svg(n)}};Ge.Ray=Gzn;const Yzn=(...t)=>new Ge.Ray(...t);Ge.ray=Yzn;let Ip=class GM{constructor(){this.faces=new Ge.PlanarSet,this.edges=new Ge.PlanarSet;let e=[...arguments];if(e.length===1&&(e[0]instanceof Array&&e[0].length>0||e[0]instanceof Ge.Circle||e[0]instanceof Ge.Box)){let n=e[0];if(e[0]instanceof Array&&e[0].every(o=>o instanceof Array))if(n.every(o=>o instanceof Array&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"))this.faces.add(new Ge.Face(this,n));else for(let o of n)if(o instanceof Array&&o[0]instanceof Array&&o[0].every(i=>i instanceof Array&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"))for(let i of o)this.faces.add(new Ge.Face(this,i));else this.faces.add(new Ge.Face(this,o));else this.faces.add(new Ge.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=>e.merge(n.box),new Ge.Box)}get vertices(){return[...this.faces].flatMap(e=>e.vertices)}clone(){let e=new GM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new GM;return e.forEach(o=>[...o.faces].forEach(i=>n.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=>n+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ge.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next===n){this.deleteFace(e);return}for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ge.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e&&(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const o=this.splitToIslands().flatMap(i=>i._cutSingleIsland(e)).filter(i=>i.isValid()&&i.isEmpty()===!1);return this.createFromArray(o)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=wht(a,A);for(let l of c)xF(a,l,i.int_points1),xF(A,l,i.int_points2)}if(i.int_points1.length===0)return n;i.int_points1_sorted=RQ(i.int_points1),i.int_points2_sorted=RQ(i.int_points2),BF(o,i.int_points1_sorted),BF(n,i.int_points2_sorted),RBe(i),i.int_points1_sorted=RQ(i.int_points1),i.int_points2_sorted=RQ(i.int_points2),TBe(i.int_points1),kBe(i.int_points1,n);for(let a of i.int_points1_sorted)a.edge_before&&a.edge_after&&a.edge_before.bv===a.edge_after.bv&&(i.int_points2[a.id]=-1,a.id=-1);if(i.int_points1=i.int_points1.filter(a=>a.id>=0),i.int_points2=i.int_points2.filter(a=>a.id>=0),i.int_points1.forEach((a,A)=>{a.id=A}),i.int_points2.forEach((a,A)=>{a.id=A}),i.int_points1.length===0)return n;i.int_points1_sorted=RQ(i.int_points1),i.int_points2_sorted=RQ(i.int_points2);let r,s;for(let a=1;a<i.int_points1_sorted.length;a++)if(s=i.int_points1_sorted[a],r=i.int_points1_sorted[a-1],s.edge_before&&s.edge_before.bv===Nre){let A=r.edge_after,c=s.edge_before,l=o.getChain(A,c);kht(i.int_points2[r.id],i.int_points2[s.id],l),l.forEach(u=>n.edges.add(u)),l=l.reverse().map(u=>new Ge.Edge(u.shape.reverse()));for(let u=0;u<l.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];kht(i.int_points2[s.id],i.int_points2[r.id],l),l.forEach(u=>n.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new pD([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=>r.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=>[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=>s.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size<=1)return this.clone();const e=this.splitToIslands(),n=new GM;return e.forEach(o=>{o.faces.forEach(i=>n.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?mF.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=>{this.isOuter(n)&&e++}),e>1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ge.Point){let n=ez(this,e);return n===Nre||n===V9}else return $ht(this,e)}distanceTo(e){if(e instanceof Ge.Point){let[n,o]=Ge.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Circle||e instanceof Ge.Line||e instanceof Ge.Segment||e instanceof Ge.Arc){let[n,o]=Ge.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ge.Box)return this.distanceTo(new Ge.Polygon(e));if(e instanceof Ge.Polygon){let n=[Number.POSITIVE_INFINITY,new Ge.Segment],o,i;for(let r of this.edges){let s=n[0];[o,i]=Ge.Distance.shape2planarSet(r.shape,e.edges,s),Ge.Utils.LT(o,s)&&(n=[o,i])}return n}}intersect(e){if(e instanceof Ge.Point)return this.contains(e)?[e]:[];if(e instanceof Ge.Line)return $V(e,this);if(e instanceof Ge.Ray)return Rht(e,this);if(e instanceof Ge.Circle)return vht(e,this);if(e instanceof Ge.Segment)return PBe(e,this);if(e instanceof Ge.Arc)return MBe(e,this);if(e instanceof Ge.Polygon)return XVn(e,this);if(e instanceof Ge.Multiline)return qVn(e,this)}translate(e){let n=new GM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.translate(e)));return n}rotate(e=0,n=new Ge.Point){let o=new GM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.rotate(e,n)));return o}scale(e,n){let o=new GM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.scale(e,n)));return o}transform(e=new Ge.Matrix){let n=new GM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.transform(e)));return n}toJSON(){return[...this.faces].map(e=>e.toJSON())}toArray(){return[...this.faces].map(e=>e.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=>e+n.svg(),"")}svg(e={}){let n=`
<path ${dD({fillRule:"evenodd",fill:"lightcyan",...e})} d="`;for(let o of this.faces)n+=`
${o.svg()}`;return n+=`" >
</path>`,n}};Ge.Polygon=Ip;const Uzn=(...t)=>new Ge.Polygon(...t);Ge.polygon=Uzn;const{Circle:zBe,Line:Xht,Point:Zht,Vector:Ore,Utils:JBe}=Ge;let Kzn=class Uye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new Ore(e.pc,n),i=e.r*e.r,r=o.dot(o);return JBe.EQ_0(r)?new Zht(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(JBe.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new Ore(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new Xht(s,r)}else{let i=new Ore(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new zBe(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(JBe.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new Ore(e.pc,i.end);return s=s.multiply(r/o),new zBe(e.pc.translate(s),r)}}inverse(e){if(e instanceof Zht)return Uye.inversePoint(this.circle,e);if(e instanceof zBe)return Uye.inverseCircle(this.circle,e);if(e instanceof Xht)return Uye.inverseLine(this.circle,e)}};Ge.Inversion=Kzn;const Vzn=t=>new Ge.Inversion(t);Ge.inversion=Vzn;let zzn=class Rr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ge.Vector(e,o).length,new Ge.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ge.Utils.EQ_0(o))return[n.r,new Ge.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ge.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ge.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return Rr.point2point(e,n.start);let o=new Ge.Vector(n.start,n.end),i=new Ge.Vector(n.start,e),r=new Ge.Vector(n.end,e),s=o.dot(i),a=-o.dot(r),A,c;if(Ge.Utils.GE(s,0)&&Ge.Utils.GE(a,0)){let l=n.tangentInStart();return A=Math.abs(l.cross(i)),c=n.start.translate(l.multiply(l.dot(i))),[A,new Ge.Segment(e,c)]}else return s<0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o=new Ge.Circle(n.pc,n.r),i=[],r,s;return[r,s]=Rr.point2circle(e,o),s.end.on(n)&&i.push(Rr.point2circle(e,o)),i.push(Rr.point2point(e,n.start)),i.push(Rr.point2point(e,n.end)),Rr.sort(i),i[0]}static point2edge(e,n){return n.shape instanceof Ge.Segment?Rr.point2segment(e,n.shape):Rr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let i=[];return i.push(Rr.point2line(e.start,n)),i.push(Rr.point2line(e.end,n)),Rr.sort(i),i[0]}static segment2segment(e,n){let o=kre(e,n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let i=[],r,s;return[r,s]=Rr.point2segment(n.start,e),i.push([r,s.reverse()]),[r,s]=Rr.point2segment(n.end,e),i.push([r,s.reverse()]),i.push(Rr.point2segment(e.start,n)),i.push(Rr.point2segment(e.end,n)),Rr.sort(i),i[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Line(e.ps,e.pe),[r,s]=Rr.point2line(n.center,i);if(Ge.Utils.GE(r,n.r)&&s.end.on(e))return Rr.point2circle(s.end,n);{let[a,A]=Rr.point2circle(e.start,n),[c,l]=Rr.point2circle(e.end,n);return Ge.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Line(e.ps,e.pe),r=new Ge.Circle(n.pc,n.r),[s,a]=Rr.point2line(r.center,i);if(Ge.Utils.GE(s,r.r)&&a.end.on(e)){let[u,g]=Rr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A=[];A.push(Rr.point2arc(e.start,n)),A.push(Rr.point2arc(e.end,n));let c,l;return[c,l]=Rr.point2segment(n.start,e),A.push([c,l.reverse()]),[c,l]=Rr.point2segment(n.end,e),A.push([c,l.reverse()]),Rr.sort(A),A[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return Rr.point2point(i.start,r.start)}else{let i=new Ge.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(Rr.point2point(r[0],s[0])),a.push(Rr.point2point(r[0],s[1])),a.push(Rr.point2point(r[1],s[0])),a.push(Rr.point2point(r[1],s[1])),Rr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let[i,r]=Rr.point2line(e.center,n),[s,a]=Rr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Circle(e.center,e.r),[r,s]=Rr.point2line(i.center,n);if(Ge.Utils.GE(r,i.r)){let[a,A]=Rr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}else{let a=[];return a.push(Rr.point2line(e.start,n)),a.push(Rr.point2line(e.end,n)),Rr.sort(a),a[0]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Circle(e.center,e.r),[r,s]=Rr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(Rr.point2circle(e.start,n)),a.push(Rr.point2circle(e.end,n)),Rr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ge.Segment(o[0],o[0])];let i=new Ge.Circle(e.center,e.r),r=new Ge.Circle(n.center,n.r),[s,a]=Rr.circle2circle(i,r);if(a.start.on(e)&&a.end.on(n))return[s,a];{let A=[],c,l;return[c,l]=Rr.point2arc(e.start,n),l.end.on(n)&&A.push([c,l]),[c,l]=Rr.point2arc(e.end,n),l.end.on(n)&&A.push([c,l]),[c,l]=Rr.point2arc(n.start,e),l.end.on(e)&&A.push([c,l.reverse()]),[c,l]=Rr.point2arc(n.end,e),l.end.on(e)&&A.push([c,l.reverse()]),[c,l]=Rr.point2point(e.start,n.start),A.push([c,l]),[c,l]=Rr.point2point(e.start,n.end),A.push([c,l]),[c,l]=Rr.point2point(e.end,n.start),A.push([c,l]),[c,l]=Rr.point2point(e.end,n.end),A.push([c,l]),Rr.sort(A),A[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n.edges){let[r,s]=Rr.point2edge(e,i);Ge.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ge.Utils.LT(r,o[0])&&(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ge.Utils.LT(s,o[0])&&(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin,c=a*a+A*A;return[r,c]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let l of n){[r,s]=Rr.box2box_minmax(e.box,l.item.key);for(let u of l.item.values)u instanceof Ge.Edge?i.insert([r,s],u.shape):i.insert([r,s],u);Ge.Utils.LT(s,o)&&(o=s)}if(n.length===0)return o;let a=n.map(l=>l.left.isNil()?void 0:l.left).filter(l=>l!==void 0),A=n.map(l=>l.right.isNil()?void 0:l.right).filter(l=>l!==void 0),c=[...a,...A].filter(l=>{let[u,g]=Rr.box2box_minmax(e.box,l.max);return Ge.Utils.LE(u,o)});return o=Rr.minmax_tree_process_level(e,c,o,i),o}static minmax_tree(e,n,o){let i=new UBe,r=[n.index.root],s=o<Number.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=Rr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null&&!n.isNil()){if([i,r]=Rr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ge.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=Rr.distanceToArray(e,n.item.values);return Ge.Utils.LT(s,i[0])&&(i=[s,a]),[i,r]=Rr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ge.Segment],r=!1;if(n instanceof Ge.PlanarSet){let s=Rr.minmax_tree(e,n,o);[i,r]=Rr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=>Ge.Utils.LT(n[0],o[0])?-1:Ge.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ge.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of n){let[r,s]=Rr.distance(e,i.shape);Ge.Utils.LT(r,o[0])&&(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ge.Segment];for(let i of e)for(let r of n){let[s,a]=Rr.distance(i.shape,r.shape);Ge.Utils.LT(s,o[0])&&(o=[s,a])}return o}};Ge.Distance=zzn;const{Multiline:Jzn,Point:ept,Segment:Wzn,Polygon:tpt}=Ge;function WBe(t){return new ept(t.split(" ").map(Number))}function npt(t){return t.split(", ").map(WBe)}function jBe(t){const e=npt(t);let n=[];for(let o=0;o<e.length-1;o++)n.push(new Wzn(e[o],e[o+1]));return new Jzn(n)}function jzn(t){return t.replace(/\(\(/,"").replace(/\)\)$/,"").split("), (").map(jBe)}function opt(t){const e=t.replace(/\(\(/,"").replace(/\)\)$/,"").split("), ("),n=new tpt;let o;return e.forEach((i,r)=>{let s=i.split(", ").map(A=>new ept(A.split(" ").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o&&a.reverse()}),n}function $zn(t){const n=t.split(/\)\), \(\(/).map(r=>"(("+r+"))").map(opt),o=new tpt;return n.reduce((r,s)=>[...r,...s?.faces],[]).forEach(r=>o.addFace([...r?.shapes])),o}function qzn(t){if(t.startsWith("POLYGON")){const e=t.replace(/^POLYGON /,"");return opt(e)}else{const e=t.replace(/^MULTIPOLYGON \(\(\((.*)\)\)\)$/,"$1");return $zn(e)}}function Xzn(t){return t.split(`
`).map(n=>n.match(/\(([^)]+)\)/)[1]).map(WBe)}function Zzn(t){return t.split(`
`).map(n=>n.match(/\(([^)]+)\)/)[1]).map(jBe).reduce((n,o)=>[...n,...o],[])}function ipt(t){if(t.startsWith("POINT")){const e=t.replace(/^POINT \(/,"").replace(/\)$/,"");return WBe(e)}else if(t.startsWith("MULTIPOINT")){const e=t.replace(/^MULTIPOINT \(/,"").replace(/\)$/,"");return npt(e)}else if(t.startsWith("LINESTRING")){const e=t.replace(/^LINESTRING \(/,"").replace(/\)$/,"");return jBe(e)}else if(t.startsWith("MULTILINESTRING")){const e=t.replace(/^MULTILINESTRING /,"");return jzn(e)}else{if(t.startsWith("POLYGON")||t.startsWith("MULTIPOLYGON"))return qzn(t);if(t.startsWith("GEOMETRYCOLLECTION")){const e=/(?<type>POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \((?:[^\(\)]|\([^\)]*\))*\)/g,n=t.match(e);return n[0].startsWith("GEOMETRYCOLLECTION")&&(n[0]=n[0].replace("GEOMETRYCOLLECTION (","")),n.map(ipt).map(i=>i instanceof Array?i:[i]).reduce((i,r)=>[...i,...r],[])}else{if(rpt(t))return Xzn(t);if(spt(t))return Zzn(t)}}return[]}function rpt(t){return t.split(`
`)?.every(e=>e.includes("POINT"))}function spt(t){return t.split(`
`)?.every(e=>e.includes("LINESTRING"))}function eJn(t){return t.startsWith("POINT")||rpt(t)||t.startsWith("LINESTRING")||spt(t)||t.startsWith("MULTILINESTRING")||t.startsWith("POLYGON")||t.startsWith("MULTIPOINT")||t.startsWith("MULTIPOLYGON")||t.startsWith("GEOMETRYCOLLECTION")}Ge.isWktString=eJn,Ge.parseWKT=ipt,Ge.BooleanOperations=YBe,Ge.Relations=Qzn;const tJn={version:"0.0.874"},nJn=(t,e,n)=>{const o=[{x:t.x,y:t.y}],i=(t.x+e.x)/2,r=(t.y+e.y)/2,s={x:e.x,y:e.y};switch(e.facingDirection){case"x+":s.x+=n;break;case"x-":s.x-=n;break;case"y+":s.y+=n;break;case"y-":s.y-=n;break}const a=t.facingDirection??"none",A=e.facingDirection??"none",c=g=>{const h=o[o.length-1];(h.x!==g.x||h.y!==g.y)&&o.push(g)},l=Math.abs(t.y-e.y)<=Math.max(1e-6,n*.1),u=Math.abs(t.x-e.x)<=Math.max(1e-6,n*.1);if(a==="none"&&A==="none")c({x:i,y:t.y}),c({x:i,y:e.y});else if(a==="x+"&&A==="y+")t.x>e.x&&t.y<e.y?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:e.y+n}),c({x:e.x,y:e.y+n})):!u&&!l&&t.x<e.x&&t.y>e.y?c({x:e.x,y:t.y}):u?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:e.y+n}),c({x:e.x,y:e.y+n})):t.x<e.x?(c({x:i,y:t.y}),c({x:i,y:s.y}),c({x:e.x,y:s.y})):t.y<=e.y+n?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y+n}),c({x:e.x,y:t.y+n}),c({x:e.x,y:e.y})):(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:(t.y+e.y)/2}),c({x:e.x,y:(t.y+e.y)/2}));else if(a==="x+"&&A==="x+"&&!l){const g=Math.max(t.x+n,s.x);c({x:g,y:t.y}),c({x:g,y:e.y})}else if(a==="x+"&&A==="x+"&&l)c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y+n}),c({x:e.x+n,y:t.y+n}),c({x:e.x+n,y:e.y});else if(a==="x+"&&A==="y-")if(u&&t.y<=e.y)c({x:t.x+n,y:t.y}),c({x:t.x+n,y:r}),c({x:e.x,y:r});else if(u&&t.y>e.y)c({x:t.x+n,y:t.y}),c({x:t.x+n,y:e.y-n}),c({x:e.x,y:e.y-n});else if(t.x<e.x&&t.y<e.y)c({x:e.x,y:t.y});else if(t.x>e.x&&t.y<e.y){const g=t.x+n;c({x:g,y:t.y}),c({x:g,y:r}),c({x:e.x,y:r})}else if(t.x>e.x&&t.y>e.y){const g=t.x+n;c({x:g,y:t.y}),c({x:g,y:s.y}),c({x:e.x,y:s.y})}else t.y===e.y?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y-n}),c({x:e.x,y:t.y-n})):(c({x:i,y:t.y}),c({x:i,y:s.y}),c({x:e.x,y:s.y}));else if(a==="x+"&&A==="x-"&&t.x+n>=e.x-n&&!l){const g=t.x+n;c({x:g,y:t.y}),c({x:g,y:r}),c({x:s.x,y:r}),c({x:s.x,y:s.y})}else a==="x+"&&A==="x-"&&l&&e.x>t.x||(a==="x+"&&A==="x-"&&l?(c({x:t.x+n,y:t.y}),c({x:t.x+n,y:t.y+n}),c({x:e.x-n,y:t.y+n}),c({x:e.x-n,y:t.y})):(a==="x+"&&c({x:t.x+n,y:t.y}),c({x:i,y:o[o.length-1].y}),c({x:i,y:s.y}),c({x:s.x,y:s.y})));return c({x:e.x,y:e.y}),o},wF=(t,e,n={})=>{let o=t,i=e,r=!1;(o.x>i.x||o.x===i.x&&o.y>i.y)&&(r=!0,[o,i]=[i,o]);const s=o.facingDirection==="x-",a=o.facingDirection==="y-",A=f=>{const I=s?o.x-(f.x-o.x):f.x,C=a?o.y-(f.y-o.y):f.y;let y=f.facingDirection;return s&&(y==="x+"?y="x-":y==="x-"&&(y="x+")),a&&(y==="y+"?y="y-":y==="y-"&&(y="y+")),{x:I,y:C,facingDirection:y}},c=(f,I)=>{const C=f.x-I.x,y=f.y-I.y,x=I.x+y,E=I.y-C;let B=f.facingDirection;switch(B){case"x+":B="y-";break;case"y-":B="x-";break;case"x-":B="y+";break;case"y+":B="x+";break}return{x,y:E,facingDirection:B}},l=(f,I)=>{const C=f.x-I.x,y=f.y-I.y;return{x:I.x-y,y:I.y+C}},u=s||a?A(o):o,g=s||a?A(i):i;let h=u,d=g,p=!1;u.facingDirection==="y+"&&(p=!0,h={...u,facingDirection:"x+"},d=c(g,u));const m=n?.overshoot??.1*Math.max(Math.abs(h.x-d.x),Math.abs(h.y-d.y));let _=nJn(h,d,m);return p&&(_=_.map(f=>l(f,h))),(s||a)&&(_=_.map(({x:f,y:I})=>({x:s?o.x-(f-o.x):f,y:a?o.y-(I-o.y):I}))),r?_.reverse():_};var Gre={exports:{}},$Be={exports:{}},apt;function oJn(){return apt||(apt=1,(function(t){var e={env:{},version:""};t.exports=function(n){function o(G,V,Ae,Be){return new E2(G,V,Ae,Be)}function i(){}function r(G){var V="https://react.dev/errors/"+G;if(1<arguments.length){V+="?args[]="+encodeURIComponent(arguments[1]);for(var Ae=2;Ae<arguments.length;Ae++)V+="&args[]="+encodeURIComponent(arguments[Ae])}return"Minified React error #"+G+"; visit "+V+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(G){var V=G,Ae=G;if(G.alternate)for(;V.return;)V=V.return;else{G=V;do V=G,(V.flags&4098)!==0&&(Ae=V.return),G=V.return;while(G)}return V.tag===3?Ae:null}function a(G){if(s(G)!==G)throw Error(r(188))}function A(G){var V=G.alternate;if(!V){if(V=s(G),V===null)throw Error(r(188));return V!==G?null:G}for(var Ae=G,Be=V;;){var Oe=Ae.return;if(Oe===null)break;var Je=Oe.alternate;if(Je===null){if(Be=Oe.return,Be!==null){Ae=Be;continue}break}if(Oe.child===Je.child){for(Je=Oe.child;Je;){if(Je===Ae)return a(Oe),G;if(Je===Be)return a(Oe),V;Je=Je.sibling}throw Error(r(188))}if(Ae.return!==Be.return)Ae=Oe,Be=Je;else{for(var Tt=!1,ln=Oe.child;ln;){if(ln===Ae){Tt=!0,Ae=Oe,Be=Je;break}if(ln===Be){Tt=!0,Be=Oe,Ae=Je;break}ln=ln.sibling}if(!Tt){for(ln=Je.child;ln;){if(ln===Ae){Tt=!0,Ae=Je,Be=Oe;break}if(ln===Be){Tt=!0,Be=Je,Ae=Oe;break}ln=ln.sibling}if(!Tt)throw Error(r(189))}}if(Ae.alternate!==Be)throw Error(r(190))}if(Ae.tag!==3)throw Error(r(188));return Ae.stateNode.current===Ae?G:V}function c(G){var V=G.tag;if(V===5||V===26||V===27||V===6)return G;for(G=G.child;G!==null;){if(V=c(G),V!==null)return V;G=G.sibling}return null}function l(G){var V=G.tag;if(V===5||V===26||V===27||V===6)return G;for(G=G.child;G!==null;){if(G.tag!==4&&(V=l(G),V!==null))return V;G=G.sibling}return null}function u(G){return G===null||typeof G!="object"?null:(G=Hp&&G[Hp]||G["@@iterator"],typeof G=="function"?G:null)}function g(G){if(G==null)return null;if(typeof G=="function")return G.$$typeof===VC?null:G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case FI:return"Fragment";case S2:return"Profiler";case UC:return"StrictMode";case u3:return"Suspense";case Q2:return"SuspenseList";case b1:return"Activity"}if(typeof G=="object")switch(G.$$typeof){case B1:return"Portal";case y_:return(G.displayName||"Context")+".Provider";case l3:return(G._context.displayName||"Context")+".Consumer";case ap:var V=G.render;return G=G.displayName,G||(G=V.displayName||V.name||"",G=G!==""?"ForwardRef("+G+")":"ForwardRef"),G;case Gd:return V=G.displayName||null,V!==null?V:g(G.type)||"Memo";case Yd:V=G._payload,G=G._init;try{return g(G(V))}catch{}}return null}function h(G){return{current:G}}function d(G){0>Mm||(G.current=A0[Mm],A0[Mm]=null,Mm--)}function p(G,V){Mm++,A0[Mm]=G.current,G.current=V}function m(G){return G>>>=0,G===0?32:31-(O2(G)/G2|0)|0}function _(G){var V=G&42;if(V!==0)return V;switch(G&-G){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return G&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return G&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return G}}function f(G,V,Ae){var Be=G.pendingLanes;if(Be===0)return 0;var Oe=0,Je=G.suspendedLanes,Tt=G.pingedLanes;G=G.warmLanes;var ln=Be&134217727;return ln!==0?(Be=ln&~Je,Be!==0?Oe=_(Be):(Tt&=ln,Tt!==0?Oe=_(Tt):Ae||(Ae=ln&~G,Ae!==0&&(Oe=_(Ae))))):(ln=Be&~Je,ln!==0?Oe=_(ln):Tt!==0?Oe=_(Tt):Ae||(Ae=Be&~G,Ae!==0&&(Oe=_(Ae)))),Oe===0?0:V!==0&&V!==Oe&&(V&Je)===0&&(Je=Oe&-Oe,Ae=V&-V,Je>=Ae||Je===32&&(Ae&4194048)!==0)?V:Oe}function I(G,V){return(G.pendingLanes&~(G.suspendedLanes&~G.pingedLanes)&V)===0}function C(G,V){switch(G){case 1:case 2:case 4:case 8:case 64:return V+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return V+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function y(){var G=RA;return RA<<=1,(RA&4194048)===0&&(RA=256),G}function x(){var G=jg;return jg<<=1,(jg&62914560)===0&&(jg=4194304),G}function E(G){for(var V=[],Ae=0;31>Ae;Ae++)V.push(G);return V}function B(G,V){G.pendingLanes|=V,V!==268435456&&(G.suspendedLanes=0,G.pingedLanes=0,G.warmLanes=0)}function S(G,V,Ae,Be,Oe,Je){var Tt=G.pendingLanes;G.pendingLanes=Ae,G.suspendedLanes=0,G.pingedLanes=0,G.warmLanes=0,G.expiredLanes&=Ae,G.entangledLanes&=Ae,G.errorRecoveryDisabledLanes&=Ae,G.shellSuspendCounter=0;var ln=G.entanglements,wn=G.expirationTimes,$o=G.hiddenUpdates;for(Ae=Tt&~Ae;0<Ae;){var Ai=31-_g(Ae),Qi=1<<Ai;ln[Ai]=0,wn[Ai]=-1;var Ni=$o[Ai];if(Ni!==null)for($o[Ai]=null,Ai=0;Ai<Ni.length;Ai++){var Xs=Ni[Ai];Xs!==null&&(Xs.lane&=-536870913)}Ae&=~Qi}Be!==0&&Q(G,Be,0),Je!==0&&Oe===0&&G.tag!==0&&(G.suspendedLanes|=Je&~(Tt&~V))}function Q(G,V,Ae){G.pendingLanes|=V,G.suspendedLanes&=~V;var Be=31-_g(V);G.entangledLanes|=V,G.entanglements[Be]=G.entanglements[Be]|1073741824|Ae&4194090}function w(G,V){var Ae=G.entangledLanes|=V;for(G=G.entanglements;Ae;){var Be=31-_g(Ae),Oe=1<<Be;Oe&V|G[Be]&V&&(G[Be]|=V),Ae&=~Oe}}function M(G){switch(G){case 2:G=1;break;case 8:G=4;break;case 32:G=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:G=128;break;case 268435456:G=134217728;break;default:G=0}return G}function k(G){return G&=-G,2<G?8<G?(G&134217727)!==0?32:268435456:8:2}function R(G){if(typeof fg=="function"&&Y2(G),Ig&&typeof Ig.setStrictMode=="function")try{Ig.setStrictMode(_u,G)}catch{}}function F(G){if(s5===void 0)try{throw Error()}catch(Ae){var V=Ae.stack.trim().match(/\n( *(at )?)/);s5=V&&V[1]||"",f3=-1<Ae.stack.indexOf(`
    at`)?" (<anonymous>)":-1<Ae.stack.indexOf("@")?"@unknown:0:0":""}return`
`+s5+G+f3}function O(G,V){if(!G||ZC)return"";ZC=!0;var Ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var Be={DetermineComponentFrameRoot:function(){try{if(V){var Qi=function(){throw Error()};if(Object.defineProperty(Qi.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Qi,[])}catch(Xs){var Ni=Xs}Reflect.construct(G,[],Qi)}else{try{Qi.call()}catch(Xs){Ni=Xs}G.call(Qi.prototype)}}else{try{throw Error()}catch(Xs){Ni=Xs}(Qi=G())&&typeof Qi.catch=="function"&&Qi.catch(function(){})}}catch(Xs){if(Xs&&Ni&&typeof Xs.stack=="string")return[Xs.stack,Ni.stack]}return[null,null]}};Be.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Oe=Object.getOwnPropertyDescriptor(Be.DetermineComponentFrameRoot,"name");Oe&&Oe.configurable&&Object.defineProperty(Be.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Je=Be.DetermineComponentFrameRoot(),Tt=Je[0],ln=Je[1];if(Tt&&ln){var wn=Tt.split(`
`),$o=ln.split(`
`);for(Oe=Be=0;Be<wn.length&&!wn[Be].includes("DetermineComponentFrameRoot");)Be++;for(;Oe<$o.length&&!$o[Oe].includes("DetermineComponentFrameRoot");)Oe++;if(Be===wn.length||Oe===$o.length)for(Be=wn.length-1,Oe=$o.length-1;1<=Be&&0<=Oe&&wn[Be]!==$o[Oe];)Oe--;for(;1<=Be&&0<=Oe;Be--,Oe--)if(wn[Be]!==$o[Oe]){if(Be!==1||Oe!==1)do if(Be--,Oe--,0>Oe||wn[Be]!==$o[Oe]){var Ai=`
`+wn[Be].replace(" at new "," at ");return G.displayName&&Ai.includes("<anonymous>")&&(Ai=Ai.replace("<anonymous>",G.displayName)),Ai}while(1<=Be&&0<=Oe);break}}}finally{ZC=!1,Error.prepareStackTrace=Ae}return(Ae=G?G.displayName||G.name:"")?F(Ae):""}function U(G){switch(G.tag){case 26:case 27:case 5:return F(G.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 15:return O(G.type,!1);case 11:return O(G.type.render,!1);case 1:return O(G.type,!0);case 31:return F("Activity");default:return""}}function Y(G){try{var V="";do V+=U(G),G=G.return;while(G);return V}catch(Ae){return`
Error generating stack: `+Ae.message+`
`+Ae.stack}}function W(G,V){if(typeof G=="object"&&G!==null){var Ae=I3.get(G);return Ae!==void 0?Ae:(V={value:G,source:V,stack:Y(V)},I3.set(G,V),V)}return{value:G,source:V,stack:Y(V)}}function te(G,V){Pf[UI++]=KI,Pf[UI++]=C3,C3=G,KI=V}function j(G,V,Ae){E0[jc++]=Ou,E0[jc++]=B0,E0[jc++]=cl,cl=G;var Be=Ou;G=B0;var Oe=32-_g(Be)-1;Be&=~(1<<Oe),Ae+=1;var Je=32-_g(V)+Oe;if(30<Je){var Tt=Oe-Oe%5;Je=(Be&(1<<Tt)-1).toString(32),Be>>=Tt,Oe-=Tt,Ou=1<<32-_g(V)+Oe|Ae<<Oe|Be,B0=Je+G}else Ou=1<<Je|Ae<<Oe|Be,B0=G}function J(G){G.return!==null&&(te(G,1),j(G,1,0))}function oe(G){for(;G===C3;)C3=Pf[--UI],Pf[UI]=null,KI=Pf[--UI],Pf[UI]=null;for(;G===cl;)cl=E0[--jc],E0[jc]=null,B0=E0[--jc],E0[jc]=null,Ou=E0[--jc],E0[jc]=null}function ie(G,V){p(za,V),p(Vd,G),p(bl,null),G=x0(V),d(bl),p(bl,G)}function ne(){d(bl),d(Vd),d(za)}function le(G){G.memoizedState!==null&&p($g,G);var V=bl.current,Ae=zg(V,G.type);V!==Ae&&(p(Vd,G),p(bl,Ae))}function ge(G){Vd.current===G&&(d(bl),d(Vd)),$g.current===G&&(d($g),Ud?b_._currentValue=sl:b_._currentValue2=sl)}function _e(G){var V=Error(r(418,""));throw ve(W(V,G)),lp}function ue(G,V){if(!Eh)throw Error(r(175));Hu(G.stateNode,G.type,G.memoizedProps,V,G)||_e(G)}function fe(G){for(Xa=G.return;Xa;)switch(Xa.tag){case 5:case 13:Si=!1;return;case 27:case 3:Si=!0;return;default:Xa=Xa.return}}function pe(G){if(!Eh||G!==Xa)return!1;if(!Vs)return fe(G),Vs=!0,!1;var V=G.tag;if(ai?V!==3&&V!==27&&(V!==5||mu(G.type)&&!Lu(G.type,G.memoizedProps))&&Za&&_e(G):V!==3&&(V!==5||mu(G.type)&&!Lu(G.type,G.memoizedProps))&&Za&&_e(G),fe(G),V===13){if(!Eh)throw Error(r(316));if(G=G.memoizedState,G=G!==null?G.dehydrated:null,!G)throw Error(r(317));Za=zr(G)}else Za=ai&&V===27?n5(G.type,Za):Xa?g9(G.stateNode):null;return!0}function ye(){Eh&&(Za=Xa=null,Vs=!1)}function Me(){var G=fu;return G!==null&&(Vl===null?Vl=G:Vl.push.apply(Vl,G),fu=null),G}function ve(G){fu===null?fu=[G]:fu.push(G)}function he(G,V){return G===V&&(G!==0||1/G===1/V)||G!==G&&V!==V}function Qe(G,V,Ae){Ud?(p($c,V._currentValue),V._currentValue=Ae):(p($c,V._currentValue2),V._currentValue2=Ae)}function Pe(G){var V=$c.current;Ud?G._currentValue=V:G._currentValue2=V,d($c)}function we(G,V,Ae){for(;G!==null;){var Be=G.alternate;if((G.childLanes&V)!==V?(G.childLanes|=V,Be!==null&&(Be.childLanes|=V)):Be!==null&&(Be.childLanes&V)!==V&&(Be.childLanes|=V),G===Ae)break;G=G.return}}function Te(G,V,Ae,Be){var Oe=G.child;for(Oe!==null&&(Oe.return=G);Oe!==null;){var Je=Oe.dependencies;if(Je!==null){var Tt=Oe.child;Je=Je.firstContext;e:for(;Je!==null;){var ln=Je;Je=Oe;for(var wn=0;wn<V.length;wn++)if(ln.context===V[wn]){Je.lanes|=Ae,ln=Je.alternate,ln!==null&&(ln.lanes|=Ae),we(Je.return,Ae,G),Be||(Tt=null);break e}Je=ln.next}}else if(Oe.tag===18){if(Tt=Oe.return,Tt===null)throw Error(r(341));Tt.lanes|=Ae,Je=Tt.alternate,Je!==null&&(Je.lanes|=Ae),we(Tt,Ae,G),Tt=null}else Tt=Oe.child;if(Tt!==null)Tt.return=Oe;else for(Tt=Oe;Tt!==null;){if(Tt===G){Tt=null;break}if(Oe=Tt.sibling,Oe!==null){Oe.return=Tt.return,Tt=Oe;break}Tt=Tt.return}Oe=Tt}}function Re(G,V,Ae,Be){G=null;for(var Oe=V,Je=!1;Oe!==null;){if(!Je){if((Oe.flags&524288)!==0)Je=!0;else if((Oe.flags&262144)!==0)break}if(Oe.tag===10){var Tt=Oe.alternate;if(Tt===null)throw Error(r(387));if(Tt=Tt.memoizedProps,Tt!==null){var ln=Oe.type;c0(Oe.pendingProps.value,Tt.value)||(G!==null?G.push(ln):G=[ln])}}else if(Oe===$g.current){if(Tt=Oe.alternate,Tt===null)throw Error(r(387));Tt.memoizedState.memoizedState!==Oe.memoizedState.memoizedState&&(G!==null?G.push(b_):G=[b_])}Oe=Oe.return}G!==null&&Te(V,G,Ae,Be),V.flags|=262144}function Ee(G){for(G=G.firstContext;G!==null;){var V=G.context;if(!c0(Ud?V._currentValue:V._currentValue2,G.memoizedValue))return!0;G=G.next}return!1}function ke(G){Qh=G,Kl=null,G=G.dependencies,G!==null&&(G.firstContext=null)}function Ce(G){return Ye(Qh,G)}function Le(G,V){return Qh===null&&ke(G),Ye(G,V)}function Ye(G,V){var Ae=Ud?V._currentValue:V._currentValue2;if(V={context:V,memoizedValue:Ae,next:null},Kl===null){if(G===null)throw Error(r(308));Kl=V,G.dependencies={lanes:0,firstContext:V},G.flags|=524288}else Kl=Kl.next=V;return Ae}function tt(){return{controller:new VI,data:new Map,refCount:0}}function At(G){G.refCount--,G.refCount===0&&p9(zI,function(){G.controller.abort()})}function at(G){G!==Mf&&G.next===null&&(Mf===null?b0=Mf=G:Mf=Mf.next=G),Cg=!0,a5||(a5=!0,it())}function nt(G,V){if(!Dm&&Cg){Dm=!0;do for(var Ae=!1,Be=b0;Be!==null;){if(G!==0){var Oe=Be.pendingLanes;if(Oe===0)var Je=0;else{var Tt=Be.suspendedLanes,ln=Be.pingedLanes;Je=(1<<31-_g(42|G)+1)-1,Je&=Oe&~(Tt&~ln),Je=Je&201326741?Je&201326741|1:Je?Je|2:0}Je!==0&&(Ae=!0,kt(Be,Je))}else Je=Zr,Je=f(Be,Be===gA?Je:0,Be.cancelPendingCommit!==null||Be.timeoutHandle!==xh),(Je&3)===0||I(Be,Je)||(Ae=!0,kt(Be,Je));Be=Be.next}while(Ae);Dm=!1}}function gt(){bt()}function bt(){Cg=a5=!1;var G=0;JI!==0&&(g3()&&(G=JI),JI=0);for(var V=cs(),Ae=null,Be=b0;Be!==null;){var Oe=Be.next,Je=Ct(Be,V);Je===0?(Be.next=null,Ae===null?b0=Oe:Ae.next=Oe,Oe===null&&(Mf=Ae)):(Ae=Be,(G!==0||(Je&3)!==0)&&(Cg=!0)),Be=Oe}nt(G)}function Ct(G,V){for(var Ae=G.suspendedLanes,Be=G.pingedLanes,Oe=G.expirationTimes,Je=G.pendingLanes&-62914561;0<Je;){var Tt=31-_g(Je),ln=1<<Tt,wn=Oe[Tt];wn===-1?((ln&Ae)===0||(ln&Be)!==0)&&(Oe[Tt]=C(ln,V)):wn<=V&&(G.expiredLanes|=ln),Je&=~ln}if(V=gA,Ae=Zr,Ae=f(G,G===V?Ae:0,G.cancelPendingCommit!==null||G.timeoutHandle!==xh),Be=G.callbackNode,Ae===0||G===V&&(os===2||os===9)||G.cancelPendingCommit!==null)return Be!==null&&Be!==null&&Kd(Be),G.callbackNode=null,G.callbackPriority=0;if((Ae&3)===0||I(G,Ae)){if(V=Ae&-Ae,V===G.callbackPriority)return V;switch(Be!==null&&Kd(Be),k(Ae)){case 2:case 8:Ae=c8;break;case 32:Ae=wf;break;case 268435456:Ae=XC;break;default:Ae=wf}return Be=Dt.bind(null,G),Ae=qC(Ae,Be),G.callbackPriority=V,G.callbackNode=Ae,V}return Be!==null&&Be!==null&&Kd(Be),G.callbackPriority=2,G.callbackNode=null,2}function Dt(G,V){if(us!==0&&us!==5)return G.callbackNode=null,G.callbackPriority=0,null;var Ae=G.callbackNode;if(sp()&&G.callbackNode!==Ae)return null;var Be=Zr;return Be=f(G,G===gA?Be:0,G.cancelPendingCommit!==null||G.timeoutHandle!==xh),Be===0?null:(wI(G,Be,V),Ct(G,cs()),G.callbackNode!=null&&G.callbackNode===Ae?Dt.bind(null,G):null)}function kt(G,V){if(sp())return null;wI(G,V,!0)}function it(){JE?d3(function(){(ls&6)!==0?qC(Jn,gt):bt()}):qC(Jn,gt)}function Yt(){return JI===0&&(JI=y()),JI}function pn(G,V){if(ey===null){var Ae=ey=[];Nm=0,ll=Yt(),WI={status:"pending",value:void 0,then:function(Be){Ae.push(Be)}}}return Nm++,V.then(be,be),V}function be(){if(--Nm===0&&ey!==null){WI!==null&&(WI.status="fulfilled");var G=ey;ey=null,ll=0,WI=null;for(var V=0;V<G.length;V++)(0,G[V])()}}function et(G,V){var Ae=[],Be={status:"pending",value:null,reason:null,then:function(Oe){Ae.push(Oe)}};return G.then(function(){Be.status="fulfilled",Be.value=V;for(var Oe=0;Oe<Ae.length;Oe++)(0,Ae[Oe])(V)},function(Oe){for(Be.status="rejected",Be.reason=Oe,Oe=0;Oe<Ae.length;Oe++)(0,Ae[Oe])(void 0)}),Be}function It(){var G=Yi.current;return G!==null?G:gA.pooledCache}function Bt(G,V){V===null?p(Yi,Yi.current):p(Yi,V.pool)}function mt(){var G=It();return G===null?null:{parent:Ud?rc._currentValue:rc._currentValue2,pool:G}}function st(G,V){if(c0(G,V))return!0;if(typeof G!="object"||G===null||typeof V!="object"||V===null)return!1;var Ae=Object.keys(G),Be=Object.keys(V);if(Ae.length!==Be.length)return!1;for(Be=0;Be<Ae.length;Be++){var Oe=Ae[Be];if(!c5.call(V,Oe)||!c0(G[Oe],V[Oe]))return!1}return!0}function xt(G){return G=G.status,G==="fulfilled"||G==="rejected"}function Xe(){}function Ze(G,V,Ae){switch(Ae=G[Ae],Ae===void 0?G.push(V):Ae!==V&&(V.then(Xe,Xe),V=Ae),V.status){case"fulfilled":return V.value;case"rejected":throw G=V.reason,Ut(G),G;default:if(typeof V.status=="string")V.then(Xe,Xe);else{if(G=gA,G!==null&&100<G.shellSuspendCounter)throw Error(r(482));G=V,G.status="pending",G.then(function(Be){if(V.status==="pending"){var Oe=V;Oe.status="fulfilled",Oe.value=Be}},function(Be){if(V.status==="pending"){var Oe=V;Oe.status="rejected",Oe.reason=Be}})}switch(V.status){case"fulfilled":return V.value;case"rejected":throw G=V.reason,Ut(G),G}throw yg=V,Df}}function dt(){if(yg===null)throw Error(r(459));var G=yg;return yg=null,G}function Ut(G){if(G===Df||G===ul)throw Error(r(483))}function Wt(){for(var G=D1,V=l5=D1=0;V<G;){var Ae=ss[V];ss[V++]=null;var Be=ss[V];ss[V++]=null;var Oe=ss[V];ss[V++]=null;var Je=ss[V];if(ss[V++]=null,Be!==null&&Oe!==null){var Tt=Be.pending;Tt===null?Oe.next=Oe:(Oe.next=Tt.next,Tt.next=Oe),Be.pending=Oe}Je!==0&&An(Ae,Oe,Je)}}function Xt(G,V,Ae,Be){ss[D1++]=G,ss[D1++]=V,ss[D1++]=Ae,ss[D1++]=Be,l5|=Be,G.lanes|=Be,G=G.alternate,G!==null&&(G.lanes|=Be)}function Jt(G,V,Ae,Be){return Xt(G,V,Ae,Be),kn(G)}function yn(G,V){return Xt(G,null,null,V),kn(G)}function An(G,V,Ae){G.lanes|=Ae;var Be=G.alternate;Be!==null&&(Be.lanes|=Ae);for(var Oe=!1,Je=G.return;Je!==null;)Je.childLanes|=Ae,Be=Je.alternate,Be!==null&&(Be.childLanes|=Ae),Je.tag===22&&(G=Je.stateNode,G===null||G._visibility&1||(Oe=!0)),G=Je,Je=Je.return;return G.tag===3?(Je=G.stateNode,Oe&&V!==null&&(Oe=31-_g(Ae),G=Je.hiddenUpdates,Be=G[Oe],Be===null?G[Oe]=[V]:Be.push(V),V.lane=Ae|536870912),Je):null}function kn(G){if(50<up)throw up=0,Ku=null,Error(r(185));for(var V=G.return;V!==null;)G=V,V=G.return;return G.tag===3?G.stateNode:null}function $n(G){G.updateQueue={baseState:G.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ht(G,V){G=G.updateQueue,V.updateQueue===G&&(V.updateQueue={baseState:G.baseState,firstBaseUpdate:G.firstBaseUpdate,lastBaseUpdate:G.lastBaseUpdate,shared:G.shared,callbacks:null})}function Kt(G){return{lane:G,tag:0,payload:null,callback:null,next:null}}function rn(G,V,Ae){var Be=G.updateQueue;if(Be===null)return null;if(Be=Be.shared,(ls&2)!==0){var Oe=Be.pending;return Oe===null?V.next=V:(V.next=Oe.next,Oe.next=V),Be.pending=V,V=kn(G),An(G,null,Ae),V}return Xt(G,Be,V,Ae),kn(G)}function Lt(G,V,Ae){if(V=V.updateQueue,V!==null&&(V=V.shared,(Ae&4194048)!==0)){var Be=V.lanes;Be&=G.pendingLanes,Ae|=Be,V.lanes=Ae,w(G,Ae)}}function Ho(G,V){var Ae=G.updateQueue,Be=G.alternate;if(Be!==null&&(Be=Be.updateQueue,Ae===Be)){var Oe=null,Je=null;if(Ae=Ae.firstBaseUpdate,Ae!==null){do{var Tt={lane:Ae.lane,tag:Ae.tag,payload:Ae.payload,callback:null,next:null};Je===null?Oe=Je=Tt:Je=Je.next=Tt,Ae=Ae.next}while(Ae!==null);Je===null?Oe=Je=V:Je=Je.next=V}else Oe=Je=V;Ae={baseState:Be.baseState,firstBaseUpdate:Oe,lastBaseUpdate:Je,shared:Be.shared,callbacks:Be.callbacks},G.updateQueue=Ae;return}G=Ae.lastBaseUpdate,G===null?Ae.firstBaseUpdate=V:G.next=V,Ae.lastBaseUpdate=V}function Ao(){if(zd){var G=WI;if(G!==null)throw G}}function qe(G,V,Ae,Be){zd=!1;var Oe=G.updateQueue;Yp=!1;var Je=Oe.firstBaseUpdate,Tt=Oe.lastBaseUpdate,ln=Oe.shared.pending;if(ln!==null){Oe.shared.pending=null;var wn=ln,$o=wn.next;wn.next=null,Tt===null?Je=$o:Tt.next=$o,Tt=wn;var Ai=G.alternate;Ai!==null&&(Ai=Ai.updateQueue,ln=Ai.lastBaseUpdate,ln!==Tt&&(ln===null?Ai.firstBaseUpdate=$o:ln.next=$o,Ai.lastBaseUpdate=wn))}if(Je!==null){var Qi=Oe.baseState;Tt=0,Ai=$o=wn=null,ln=Je;do{var Ni=ln.lane&-536870913,Xs=Ni!==ln.lane;if(Xs?(Zr&Ni)===Ni:(Be&Ni)===Ni){Ni!==0&&Ni===ll&&(zd=!0),Ai!==null&&(Ai=Ai.next={lane:0,tag:ln.tag,payload:ln.payload,callback:null,next:null});e:{var jp=G,L1=ln;Ni=V;var Eg=Ae;switch(L1.tag){case 1:if(jp=L1.payload,typeof jp=="function"){Qi=jp.call(Eg,Qi,Ni);break e}Qi=jp;break e;case 3:jp.flags=jp.flags&-65537|128;case 0:if(jp=L1.payload,Ni=typeof jp=="function"?jp.call(Eg,Qi,Ni):jp,Ni==null)break e;Qi=E1({},Qi,Ni);break e;case 2:Yp=!0}}Ni=ln.callback,Ni!==null&&(G.flags|=64,Xs&&(G.flags|=8192),Xs=Oe.callbacks,Xs===null?Oe.callbacks=[Ni]:Xs.push(Ni))}else Xs={lane:Ni,tag:ln.tag,payload:ln.payload,callback:ln.callback,next:null},Ai===null?($o=Ai=Xs,wn=Qi):Ai=Ai.next=Xs,Tt|=Ni;if(ln=ln.next,ln===null){if(ln=Oe.shared.pending,ln===null)break;Xs=ln,ln=Xs.next,Xs.next=null,Oe.lastBaseUpdate=Xs,Oe.shared.pending=null}}while(!0);Ai===null&&(wn=Qi),Oe.baseState=wn,Oe.firstBaseUpdate=$o,Oe.lastBaseUpdate=Ai,Je===null&&(Oe.shared.lanes=0),Sl|=Tt,G.lanes=Tt,G.memoizedState=Qi}}function vt(G,V){if(typeof G!="function")throw Error(r(191,G));G.call(V)}function qt(G,V){var Ae=G.callbacks;if(Ae!==null)for(G.callbacks=null,G=0;G<Ae.length;G++)vt(Ae[G],V)}function Zt(G,V){G=dl,p(Nf,G),p(Gu,V),dl=G|V.baseLanes}function nn(){p(Nf,dl),p(Gu,Gu.current)}function zn(){dl=Nf.current,d(Gu),d(Nf)}function Nn(){throw Error(r(321))}function Co(G,V){if(V===null)return!1;for(var Ae=0;Ae<V.length&&Ae<G.length;Ae++)if(!c0(G[Ae],V[Ae]))return!1;return!0}function ei(G,V,Ae,Be,Oe,Je){return Fc=Je,_a=V,V.memoizedState=null,V.updateQueue=null,V.lanes=0,Xr.H=G===null||G.memoizedState===null?S0:u5,w_=!1,Je=Ae(Be,Oe),w_=!1,j0&&(Je=To(V,Ae,Be,Oe)),ro(G),Je}function ro(G){Xr.H=Kp;var V=fa!==null&&fa.next!==null;if(Fc=0,zs=fa=_a=null,Rm=!1,N1=0,Up=null,V)throw Error(r(300));G===null||Ps||(G=G.dependencies,G!==null&&Ee(G)&&(Ps=!0))}function To(G,V,Ae,Be){_a=G;var Oe=0;do{if(j0&&(Up=null),N1=0,j0=!1,25<=Oe)throw Error(r(301));if(Oe+=1,zs=fa=null,G.updateQueue!=null){var Je=G.updateQueue;Je.lastEffect=null,Je.events=null,Je.stores=null,Je.memoCache!=null&&(Je.memoCache.index=0)}Xr.H=jI,Je=V(Ae,Be)}while(j0);return Je}function yo(){var G=Xr.H,V=G.useState()[0];return V=typeof V.then=="function"?mi(V):V,G=G.useState()[0],(fa!==null?fa.memoizedState:null)!==G&&(_a.flags|=1024),V}function Ro(){var G=$0!==0;return $0=0,G}function On(G,V,Ae){V.updateQueue=G.updateQueue,V.flags&=-2053,G.lanes&=~Ae}function uo(G){if(Rm){for(G=G.memoizedState;G!==null;){var V=G.queue;V!==null&&(V.pending=null),G=G.next}Rm=!1}Fc=0,zs=fa=_a=null,j0=!1,N1=$0=0,Up=null}function Oo(){var G={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zs===null?_a.memoizedState=zs=G:zs=zs.next=G,zs}function ko(){if(fa===null){var G=_a.alternate;G=G!==null?G.memoizedState:null}else G=fa.next;var V=zs===null?_a.memoizedState:zs.next;if(V!==null)zs=V,fa=G;else{if(G===null)throw _a.alternate===null?Error(r(467)):Error(r(310));fa=G,G={memoizedState:fa.memoizedState,baseState:fa.baseState,baseQueue:fa.baseQueue,queue:fa.queue,next:null},zs===null?_a.memoizedState=zs=G:zs=zs.next=G}return zs}function Ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mi(G){var V=N1;return N1+=1,Up===null&&(Up=[]),G=Ze(Up,G,V),V=_a,(zs===null?V.memoizedState:zs.next)===null&&(V=V.alternate,Xr.H=V===null||V.memoizedState===null?S0:u5),G}function Fo(G){if(G!==null&&typeof G=="object"){if(typeof G.then=="function")return mi(G);if(G.$$typeof===y_)return Ce(G)}throw Error(r(438,String(G)))}function Nr(G){var V=null,Ae=_a.updateQueue;if(Ae!==null&&(V=Ae.memoCache),V==null){var Be=_a.alternate;Be!==null&&(Be=Be.updateQueue,Be!==null&&(Be=Be.memoCache,Be!=null&&(V={data:Be.data.map(function(Oe){return Oe.slice()}),index:0})))}if(V==null&&(V={data:[],index:0}),Ae===null&&(Ae=Ko(),_a.updateQueue=Ae),Ae.memoCache=V,Ae=V.data[V.index],Ae===void 0)for(Ae=V.data[V.index]=Array(G),Be=0;Be<G;Be++)Ae[Be]=v4;return V.index++,Ae}function Rs(G,V){return typeof V=="function"?V(G):V}function ur(G){var V=ko();return zi(V,fa,G)}function zi(G,V,Ae){var Be=G.queue;if(Be===null)throw Error(r(311));Be.lastRenderedReducer=Ae;var Oe=G.baseQueue,Je=Be.pending;if(Je!==null){if(Oe!==null){var Tt=Oe.next;Oe.next=Je.next,Je.next=Tt}V.baseQueue=Oe=Je,Be.pending=null}if(Je=G.baseState,Oe===null)G.memoizedState=Je;else{V=Oe.next;var ln=Tt=null,wn=null,$o=V,Ai=!1;do{var Qi=$o.lane&-536870913;if(Qi!==$o.lane?(Zr&Qi)===Qi:(Fc&Qi)===Qi){var Ni=$o.revertLane;if(Ni===0)wn!==null&&(wn=wn.next={lane:0,revertLane:0,action:$o.action,hasEagerState:$o.hasEagerState,eagerState:$o.eagerState,next:null}),Qi===ll&&(Ai=!0);else if((Fc&Ni)===Ni){$o=$o.next,Ni===ll&&(Ai=!0);continue}else Qi={lane:0,revertLane:$o.revertLane,action:$o.action,hasEagerState:$o.hasEagerState,eagerState:$o.eagerState,next:null},wn===null?(ln=wn=Qi,Tt=Je):wn=wn.next=Qi,_a.lanes|=Ni,Sl|=Ni;Qi=$o.action,w_&&Ae(Je,Qi),Je=$o.hasEagerState?$o.eagerState:Ae(Je,Qi)}else Ni={lane:Qi,revertLane:$o.revertLane,action:$o.action,hasEagerState:$o.hasEagerState,eagerState:$o.eagerState,next:null},wn===null?(ln=wn=Ni,Tt=Je):wn=wn.next=Ni,_a.lanes|=Qi,Sl|=Qi;$o=$o.next}while($o!==null&&$o!==V);if(wn===null?Tt=Je:wn.next=ln,!c0(Je,G.memoizedState)&&(Ps=!0,Ai&&(Ae=WI,Ae!==null)))throw Ae;G.memoizedState=Je,G.baseState=Tt,G.baseQueue=wn,Be.lastRenderedState=Je}return Oe===null&&(Be.lanes=0),[G.memoizedState,Be.dispatch]}function bi(G){var V=ko(),Ae=V.queue;if(Ae===null)throw Error(r(311));Ae.lastRenderedReducer=G;var Be=Ae.dispatch,Oe=Ae.pending,Je=V.memoizedState;if(Oe!==null){Ae.pending=null;var Tt=Oe=Oe.next;do Je=G(Je,Tt.action),Tt=Tt.next;while(Tt!==Oe);c0(Je,V.memoizedState)||(Ps=!0),V.memoizedState=Je,V.baseQueue===null&&(V.baseState=Je),Ae.lastRenderedState=Je}return[Je,Be]}function Ar(G,V,Ae){var Be=_a,Oe=ko(),Je=Vs;if(Je){if(Ae===void 0)throw Error(r(407));Ae=Ae()}else Ae=V();var Tt=!c0((fa||Oe).memoizedState,Ae);Tt&&(Oe.memoizedState=Ae,Ps=!0),Oe=Oe.queue;var ln=Et.bind(null,Be,Oe,G);if(hs(2048,8,ln,[G]),Oe.getSnapshot!==V||Tt||zs!==null&&zs.memoizedState.tag&1){if(Be.flags|=2048,wi(9,Br(),ds.bind(null,Be,Oe,Ae,V),null),gA===null)throw Error(r(349));Je||(Fc&124)!==0||ws(Be,V,Ae)}return Ae}function ws(G,V,Ae){G.flags|=16384,G={getSnapshot:V,value:Ae},V=_a.updateQueue,V===null?(V=Ko(),_a.updateQueue=V,V.stores=[G]):(Ae=V.stores,Ae===null?V.stores=[G]:Ae.push(G))}function ds(G,V,Ae,Be){V.value=Ae,V.getSnapshot=Be,Gt(V)&&Rt(G)}function Et(G,V,Ae){return Ae(function(){Gt(V)&&Rt(G)})}function Gt(G){var V=G.getSnapshot;G=G.value;try{var Ae=V();return!c0(G,Ae)}catch{return!0}}function Rt(G){var V=yn(G,2);V!==null&&ug(V,G,2)}function Ht(G){var V=Oo();if(typeof G=="function"){var Ae=G;if(G=Ae(),w_){R(!0);try{Ae()}finally{R(!1)}}}return V.memoizedState=V.baseState=G,V.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:G},V}function Qt(G,V,Ae,Be){return G.baseState=Ae,zi(G,fa,typeof Be=="function"?Be:Rs)}function Nt(G,V,Ae,Be,Oe){if(C0(G))throw Error(r(485));if(G=V.action,G!==null){var Je={payload:Oe,action:G,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Tt){Je.listeners.push(Tt)}};Xr.T!==null?Ae(!0):Je.isTransition=!1,Be(Je),Ae=V.pending,Ae===null?(Je.next=V.pending=Je,_n(V,Je)):(Je.next=Ae.next,V.pending=Ae.next=Je)}}function _n(G,V){var Ae=V.action,Be=V.payload,Oe=G.state;if(V.isTransition){var Je=Xr.T,Tt={};Xr.T=Tt;try{var ln=Ae(Oe,Be),wn=Xr.S;wn!==null&&wn(Tt,ln),qn(G,V,ln)}catch($o){Rn(G,V,$o)}finally{Xr.T=Je}}else try{Je=Ae(Oe,Be),qn(G,V,Je)}catch($o){Rn(G,V,$o)}}function qn(G,V,Ae){Ae!==null&&typeof Ae=="object"&&typeof Ae.then=="function"?Ae.then(function(Be){En(G,V,Be)},function(Be){return Rn(G,V,Be)}):En(G,V,Ae)}function En(G,V,Ae){V.status="fulfilled",V.value=Ae,Hn(V),G.state=Ae,V=G.pending,V!==null&&(Ae=V.next,Ae===V?G.pending=null:(Ae=Ae.next,V.next=Ae,_n(G,Ae)))}function Rn(G,V,Ae){var Be=G.pending;if(G.pending=null,Be!==null){Be=Be.next;do V.status="rejected",V.reason=Ae,Hn(V),V=V.next;while(V!==Be)}G.action=null}function Hn(G){G=G.listeners;for(var V=0;V<G.length;V++)(0,G[V])()}function Lo(G,V){return V}function Io(G,V){if(Vs){var Ae=gA.formState;if(Ae!==null){e:{var Be=_a;if(Vs){if(Za){var Oe=u9(Za,Si);if(Oe){Za=g9(Oe),Be=t5(Oe);break e}}_e(Be)}Be=!1}Be&&(V=Ae[0])}}Ae=Oo(),Ae.memoizedState=Ae.baseState=V,Be={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:V},Ae.queue=Be,Ae=mm.bind(null,_a,Be),Be.dispatch=Ae,Be=Ht(!1);var Je=Ag.bind(null,_a,!1,Be.queue);return Be=Oo(),Oe={state:V,dispatch:null,action:G,pending:null},Be.queue=Oe,Ae=Nt.bind(null,_a,Oe,Je,Ae),Oe.dispatch=Ae,Be.memoizedState=G,[V,Ae,!1]}function gi(G){var V=ko();return jo(V,fa,G)}function jo(G,V,Ae){if(V=zi(G,V,Lo)[0],G=ur(Rs)[0],typeof V=="object"&&V!==null&&typeof V.then=="function")try{var Be=mi(V)}catch(Tt){throw Tt===Df?ul:Tt}else Be=V;V=ko();var Oe=V.queue,Je=Oe.dispatch;return Ae!==V.memoizedState&&(_a.flags|=2048,wi(9,Br(),oi.bind(null,Oe,Ae),null)),[Be,Je,G]}function oi(G,V){G.action=V}function Ji(G){var V=ko(),Ae=fa;if(Ae!==null)return jo(V,Ae,G);ko(),V=V.memoizedState,Ae=ko();var Be=Ae.queue.dispatch;return Ae.memoizedState=G,[V,Be,!1]}function wi(G,V,Ae,Be){return G={tag:G,create:Ae,deps:Be,inst:V,next:null},V=_a.updateQueue,V===null&&(V=Ko(),_a.updateQueue=V),Ae=V.lastEffect,Ae===null?V.lastEffect=G.next=G:(Be=Ae.next,Ae.next=G,G.next=Be,V.lastEffect=G),G}function Br(){return{destroy:void 0,resource:void 0}}function gr(){return ko().memoizedState}function oa(G,V,Ae,Be){var Oe=Oo();Be=Be===void 0?null:Be,_a.flags|=G,Oe.memoizedState=wi(1|V,Br(),Ae,Be)}function hs(G,V,Ae,Be){var Oe=ko();Be=Be===void 0?null:Be;var Je=Oe.memoizedState.inst;fa!==null&&Be!==null&&Co(Be,fa.memoizedState.deps)?Oe.memoizedState=wi(V,Je,Ae,Be):(_a.flags|=G,Oe.memoizedState=wi(1|V,Je,Ae,Be))}function Li(G,V){oa(8390656,8,G,V)}function ys(G,V){hs(2048,8,G,V)}function dr(G,V){return hs(4,2,G,V)}function cA(G,V){return hs(4,4,G,V)}function vA(G,V){if(typeof V=="function"){G=G();var Ae=V(G);return function(){typeof Ae=="function"?Ae():V(null)}}if(V!=null)return G=G(),V.current=G,function(){V.current=null}}function Yl(G,V,Ae){Ae=Ae!=null?Ae.concat([G]):null,hs(4,4,vA.bind(null,V,G),Ae)}function H0(){}function ph(G,V){var Ae=ko();V=V===void 0?null:V;var Be=Ae.memoizedState;return V!==null&&Co(V,Be[1])?Be[0]:(Ae.memoizedState=[G,V],G)}function Xh(G,V){var Ae=ko();V=V===void 0?null:V;var Be=Ae.memoizedState;if(V!==null&&Co(V,Be[1]))return Be[0];if(Be=G(),w_){R(!0);try{G()}finally{R(!1)}}return Ae.memoizedState=[Be,V],Be}function Bl(G,V,Ae){return Ae===void 0||(Fc&1073741824)!==0?G.memoizedState=V:(G.memoizedState=Ae,G=Cf(),_a.lanes|=G,Sl|=G,Ae)}function fc(G,V,Ae,Be){return c0(Ae,V)?Ae:Gu.current!==null?(G=Bl(G,Ae,Be),c0(G,V)||(Ps=!0),G):(Fc&42)===0?(Ps=!0,G.memoizedState=Ae):(G=Cf(),_a.lanes|=G,Sl|=G,V)}function Nd(G,V,Ae,Be,Oe){var Je=Sm();J0(Je!==0&&8>Je?Je:8);var Tt=Xr.T,ln={};Xr.T=ln,Ag(G,!1,V,Ae);try{var wn=Oe(),$o=Xr.S;if($o!==null&&$o(ln,wn),wn!==null&&typeof wn=="object"&&typeof wn.then=="function"){var Ai=et(wn,Be);gu(G,V,Ai,i0(G))}else gu(G,V,Be,i0(G))}catch(Qi){gu(G,V,{then:function(){},status:"rejected",reason:Qi},i0())}finally{J0(Je),Xr.T=Tt}}function il(G){var V=G.memoizedState;if(V!==null)return V;V={memoizedState:sl,baseState:sl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:sl},next:null};var Ae={};return V.next={memoizedState:Ae,baseState:Ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:Ae},next:null},G.memoizedState=V,G=G.alternate,G!==null&&(G.memoizedState=V),V}function Ul(){return Ce(b_)}function m_(){return ko().memoizedState}function ag(){return ko().memoizedState}function Rd(G){for(var V=G.return;V!==null;){switch(V.tag){case 24:case 3:var Ae=i0();G=Kt(Ae);var Be=rn(V,G,Ae);Be!==null&&(ug(Be,V,Ae),Lt(Be,V,Ae)),V={cache:tt()},G.payload=V;return}V=V.return}}function mh(G,V,Ae){var Be=i0();Ae={lane:Be,revertLane:0,action:Ae,hasEagerState:!1,eagerState:null,next:null},C0(G)?FC(V,Ae):(Ae=Jt(G,V,Ae,Be),Ae!==null&&(ug(Ae,G,Be),O0(Ae,V,Be)))}function mm(G,V,Ae){var Be=i0();gu(G,V,Ae,Be)}function gu(G,V,Ae,Be){var Oe={lane:Be,revertLane:0,action:Ae,hasEagerState:!1,eagerState:null,next:null};if(C0(G))FC(V,Oe);else{var Je=G.alternate;if(G.lanes===0&&(Je===null||Je.lanes===0)&&(Je=V.lastRenderedReducer,Je!==null))try{var Tt=V.lastRenderedState,ln=Je(Tt,Ae);if(Oe.hasEagerState=!0,Oe.eagerState=ln,c0(ln,Tt))return Xt(G,V,Oe,0),gA===null&&Wt(),!1}catch{}if(Ae=Jt(G,V,Oe,Be),Ae!==null)return ug(Ae,G,Be),O0(Ae,V,Be),!0}return!1}function Ag(G,V,Ae,Be){if(Be={lane:2,revertLane:Yt(),action:Be,hasEagerState:!1,eagerState:null,next:null},C0(G)){if(V)throw Error(r(479))}else V=Jt(G,Ae,Be,2),V!==null&&ug(V,G,2)}function C0(G){var V=G.alternate;return G===_a||V!==null&&V===_a}function FC(G,V){j0=Rm=!0;var Ae=G.pending;Ae===null?V.next=V:(V.next=Ae.next,Ae.next=V),G.pending=V}function O0(G,V,Ae){if((Ae&4194048)!==0){var Be=V.lanes;Be&=G.pendingLanes,Ae|=Be,V.lanes=Ae,w(G,Ae)}}function __(G){var V=R1;return R1+=1,vh===null&&(vh=[]),Ze(vh,G,V)}function Qp(G,V){V=V.props.ref,G.ref=V!==void 0?V:null}function _1(G,V){throw V.$$typeof===kI?Error(r(525)):(G=Object.prototype.toString.call(V),Error(r(31,G==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":G)))}function tr(G){var V=G._init;return V(G._payload)}function Vo(G){function V(Yn,Qn){if(G){var to=Yn.deletions;to===null?(Yn.deletions=[Qn],Yn.flags|=16):to.push(Qn)}}function Ae(Yn,Qn){if(!G)return null;for(;Qn!==null;)V(Yn,Qn),Qn=Qn.sibling;return null}function Be(Yn){for(var Qn=new Map;Yn!==null;)Yn.key!==null?Qn.set(Yn.key,Yn):Qn.set(Yn.index,Yn),Yn=Yn.sibling;return Qn}function Oe(Yn,Qn){return Yn=Fp(Yn,Qn),Yn.index=0,Yn.sibling=null,Yn}function Je(Yn,Qn,to){return Yn.index=to,G?(to=Yn.alternate,to!==null?(to=to.index,to<Qn?(Yn.flags|=67108866,Qn):to):(Yn.flags|=67108866,Qn)):(Yn.flags|=1048576,Qn)}function Tt(Yn){return G&&Yn.alternate===null&&(Yn.flags|=67108866),Yn}function ln(Yn,Qn,to,zo){return Qn===null||Qn.tag!==6?(Qn=C_(to,Yn.mode,zo),Qn.return=Yn,Qn):(Qn=Oe(Qn,to),Qn.return=Yn,Qn)}function wn(Yn,Qn,to,zo){var Bi=to.type;return Bi===FI?Ai(Yn,Qn,to.props.children,zo,to.key):Qn!==null&&(Qn.elementType===Bi||typeof Bi=="object"&&Bi!==null&&Bi.$$typeof===Yd&&tr(Bi)===Qn.type)?(Qn=Oe(Qn,to.props),Qp(Qn,to),Qn.return=Yn,Qn):(Qn=RI(to.type,to.key,to.props,null,Yn.mode,zo),Qp(Qn,to),Qn.return=Yn,Qn)}function $o(Yn,Qn,to,zo){return Qn===null||Qn.tag!==4||Qn.stateNode.containerInfo!==to.containerInfo||Qn.stateNode.implementation!==to.implementation?(Qn=yh(to,Yn.mode,zo),Qn.return=Yn,Qn):(Qn=Oe(Qn,to.children||[]),Qn.return=Yn,Qn)}function Ai(Yn,Qn,to,zo,Bi){return Qn===null||Qn.tag!==7?(Qn=Ch(to,Yn.mode,zo,Bi),Qn.return=Yn,Qn):(Qn=Oe(Qn,to),Qn.return=Yn,Qn)}function Qi(Yn,Qn,to){if(typeof Qn=="string"&&Qn!==""||typeof Qn=="number"||typeof Qn=="bigint")return Qn=C_(""+Qn,Yn.mode,to),Qn.return=Yn,Qn;if(typeof Qn=="object"&&Qn!==null){switch(Qn.$$typeof){case Od:return to=RI(Qn.type,Qn.key,Qn.props,null,Yn.mode,to),Qp(to,Qn),to.return=Yn,to;case B1:return Qn=yh(Qn,Yn.mode,to),Qn.return=Yn,Qn;case Yd:var zo=Qn._init;return Qn=zo(Qn._payload),Qi(Yn,Qn,to)}if(Bm(Qn)||u(Qn))return Qn=Ch(Qn,Yn.mode,to,null),Qn.return=Yn,Qn;if(typeof Qn.then=="function")return Qi(Yn,__(Qn),to);if(Qn.$$typeof===y_)return Qi(Yn,Le(Yn,Qn),to);_1(Yn,Qn)}return null}function Ni(Yn,Qn,to,zo){var Bi=Qn!==null?Qn.key:null;if(typeof to=="string"&&to!==""||typeof to=="number"||typeof to=="bigint")return Bi!==null?null:ln(Yn,Qn,""+to,zo);if(typeof to=="object"&&to!==null){switch(to.$$typeof){case Od:return to.key===Bi?wn(Yn,Qn,to,zo):null;case B1:return to.key===Bi?$o(Yn,Qn,to,zo):null;case Yd:return Bi=to._init,to=Bi(to._payload),Ni(Yn,Qn,to,zo)}if(Bm(to)||u(to))return Bi!==null?null:Ai(Yn,Qn,to,zo,null);if(typeof to.then=="function")return Ni(Yn,Qn,__(to),zo);if(to.$$typeof===y_)return Ni(Yn,Qn,Le(Yn,to),zo);_1(Yn,to)}return null}function Xs(Yn,Qn,to,zo,Bi){if(typeof zo=="string"&&zo!==""||typeof zo=="number"||typeof zo=="bigint")return Yn=Yn.get(to)||null,ln(Qn,Yn,""+zo,Bi);if(typeof zo=="object"&&zo!==null){switch(zo.$$typeof){case Od:return Yn=Yn.get(zo.key===null?to:zo.key)||null,wn(Qn,Yn,zo,Bi);case B1:return Yn=Yn.get(zo.key===null?to:zo.key)||null,$o(Qn,Yn,zo,Bi);case Yd:var eA=zo._init;return zo=eA(zo._payload),Xs(Yn,Qn,to,zo,Bi)}if(Bm(zo)||u(zo))return Yn=Yn.get(to)||null,Ai(Qn,Yn,zo,Bi,null);if(typeof zo.then=="function")return Xs(Yn,Qn,to,__(zo),Bi);if(zo.$$typeof===y_)return Xs(Yn,Qn,to,Le(Qn,zo),Bi);_1(Qn,zo)}return null}function jp(Yn,Qn,to,zo){for(var Bi=null,eA=null,Or=Qn,Js=Qn=0,Qs=null;Or!==null&&Js<to.length;Js++){Or.index>Js?(Qs=Or,Or=null):Qs=Or.sibling;var Wa=Ni(Yn,Or,to[Js],zo);if(Wa===null){Or===null&&(Or=Qs);break}G&&Or&&Wa.alternate===null&&V(Yn,Or),Qn=Je(Wa,Qn,Js),eA===null?Bi=Wa:eA.sibling=Wa,eA=Wa,Or=Qs}if(Js===to.length)return Ae(Yn,Or),Vs&&te(Yn,Js),Bi;if(Or===null){for(;Js<to.length;Js++)Or=Qi(Yn,to[Js],zo),Or!==null&&(Qn=Je(Or,Qn,Js),eA===null?Bi=Or:eA.sibling=Or,eA=Or);return Vs&&te(Yn,Js),Bi}for(Or=Be(Or);Js<to.length;Js++)Qs=Xs(Or,Yn,Js,to[Js],zo),Qs!==null&&(G&&Qs.alternate!==null&&Or.delete(Qs.key===null?Js:Qs.key),Qn=Je(Qs,Qn,Js),eA===null?Bi=Qs:eA.sibling=Qs,eA=Qs);return G&&Or.forEach(function(Bg){return V(Yn,Bg)}),Vs&&te(Yn,Js),Bi}function L1(Yn,Qn,to,zo){if(to==null)throw Error(r(151));for(var Bi=null,eA=null,Or=Qn,Js=Qn=0,Qs=null,Wa=to.next();Or!==null&&!Wa.done;Js++,Wa=to.next()){Or.index>Js?(Qs=Or,Or=null):Qs=Or.sibling;var Bg=Ni(Yn,Or,Wa.value,zo);if(Bg===null){Or===null&&(Or=Qs);break}G&&Or&&Bg.alternate===null&&V(Yn,Or),Qn=Je(Bg,Qn,Js),eA===null?Bi=Bg:eA.sibling=Bg,eA=Bg,Or=Qs}if(Wa.done)return Ae(Yn,Or),Vs&&te(Yn,Js),Bi;if(Or===null){for(;!Wa.done;Js++,Wa=to.next())Wa=Qi(Yn,Wa.value,zo),Wa!==null&&(Qn=Je(Wa,Qn,Js),eA===null?Bi=Wa:eA.sibling=Wa,eA=Wa);return Vs&&te(Yn,Js),Bi}for(Or=Be(Or);!Wa.done;Js++,Wa=to.next())Wa=Xs(Or,Yn,Js,Wa.value,zo),Wa!==null&&(G&&Wa.alternate!==null&&Or.delete(Wa.key===null?Js:Wa.key),Qn=Je(Wa,Qn,Js),eA===null?Bi=Wa:eA.sibling=Wa,eA=Wa);return G&&Or.forEach(function(d5){return V(Yn,d5)}),Vs&&te(Yn,Js),Bi}function Eg(Yn,Qn,to,zo){if(typeof to=="object"&&to!==null&&to.type===FI&&to.key===null&&(to=to.props.children),typeof to=="object"&&to!==null){switch(to.$$typeof){case Od:e:{for(var Bi=to.key;Qn!==null;){if(Qn.key===Bi){if(Bi=to.type,Bi===FI){if(Qn.tag===7){Ae(Yn,Qn.sibling),zo=Oe(Qn,to.props.children),zo.return=Yn,Yn=zo;break e}}else if(Qn.elementType===Bi||typeof Bi=="object"&&Bi!==null&&Bi.$$typeof===Yd&&tr(Bi)===Qn.type){Ae(Yn,Qn.sibling),zo=Oe(Qn,to.props),Qp(zo,to),zo.return=Yn,Yn=zo;break e}Ae(Yn,Qn);break}else V(Yn,Qn);Qn=Qn.sibling}to.type===FI?(zo=Ch(to.props.children,Yn.mode,zo,to.key),zo.return=Yn,Yn=zo):(zo=RI(to.type,to.key,to.props,null,Yn.mode,zo),Qp(zo,to),zo.return=Yn,Yn=zo)}return Tt(Yn);case B1:e:{for(Bi=to.key;Qn!==null;){if(Qn.key===Bi)if(Qn.tag===4&&Qn.stateNode.containerInfo===to.containerInfo&&Qn.stateNode.implementation===to.implementation){Ae(Yn,Qn.sibling),zo=Oe(Qn,to.children||[]),zo.return=Yn,Yn=zo;break e}else{Ae(Yn,Qn);break}else V(Yn,Qn);Qn=Qn.sibling}zo=yh(to,Yn.mode,zo),zo.return=Yn,Yn=zo}return Tt(Yn);case Yd:return Bi=to._init,to=Bi(to._payload),Eg(Yn,Qn,to,zo)}if(Bm(to))return jp(Yn,Qn,to,zo);if(u(to)){if(Bi=u(to),typeof Bi!="function")throw Error(r(150));return to=Bi.call(to),L1(Yn,Qn,to,zo)}if(typeof to.then=="function")return Eg(Yn,Qn,__(to),zo);if(to.$$typeof===y_)return Eg(Yn,Qn,Le(Yn,to),zo);_1(Yn,to)}return typeof to=="string"&&to!==""||typeof to=="number"||typeof to=="bigint"?(to=""+to,Qn!==null&&Qn.tag===6?(Ae(Yn,Qn.sibling),zo=Oe(Qn,to),zo.return=Yn,Yn=zo):(Ae(Yn,Qn),zo=C_(to,Yn.mode,zo),zo.return=Yn,Yn=zo),Tt(Yn)):Ae(Yn,Qn)}return function(Yn,Qn,to,zo){try{R1=0;var Bi=Eg(Yn,Qn,to,zo);return vh=null,Bi}catch(Or){if(Or===Df||Or===ul)throw Or;var eA=o(29,Or,null,Yn.mode);return eA.lanes=zo,eA.return=Yn,eA}}}function wA(G){var V=G.alternate;p(xs,xs.current&1),p(Vp,G),Rf===null&&(V===null||Gu.current!==null||V.memoizedState!==null)&&(Rf=G)}function Td(G){if(G.tag===22){if(p(xs,xs.current),p(Vp,G),Rf===null){var V=G.alternate;V!==null&&V.memoizedState!==null&&(Rf=G)}}else da()}function da(){p(xs,xs.current),p(Vp,Vp.current)}function Zh(G){d(Vp),Rf===G&&(Rf=null),d(xs)}function mf(G){for(var V=G;V!==null;){if(V.tag===13){var Ae=V.memoizedState;if(Ae!==null&&(Ae=Ae.dehydrated,Ae===null||Sf(Ae)||OI(Ae)))return V}else if(V.tag===19&&V.memoizedProps.revealOrder!==void 0){if((V.flags&128)!==0)return V}else if(V.child!==null){V.child.return=V,V=V.child;continue}if(V===G)break;for(;V.sibling===null;){if(V.return===null||V.return===G)return null;V=V.return}V.sibling.return=V.return,V=V.sibling}return null}function LC(G,V,Ae,Be){V=G.memoizedState,Ae=Ae(Be,V),Ae=Ae==null?V:E1({},V,Ae),G.memoizedState=Ae,G.lanes===0&&(G.updateQueue.baseState=Ae)}function _f(G,V,Ae,Be,Oe,Je,Tt){return G=G.stateNode,typeof G.shouldComponentUpdate=="function"?G.shouldComponentUpdate(Be,Je,Tt):V.prototype&&V.prototype.isPureReactComponent?!st(Ae,Be)||!st(Oe,Je):!0}function _m(G,V,Ae,Be){G=V.state,typeof V.componentWillReceiveProps=="function"&&V.componentWillReceiveProps(Ae,Be),typeof V.UNSAFE_componentWillReceiveProps=="function"&&V.UNSAFE_componentWillReceiveProps(Ae,Be),V.state!==G&&Lc.enqueueReplaceState(V,V.state,null)}function du(G,V){var Ae=V;if("ref"in V){Ae={};for(var Be in V)Be!=="ref"&&(Ae[Be]=V[Be])}if(G=G.defaultProps){Ae===V&&(Ae=E1({},Ae));for(var Oe in G)Ae[Oe]===void 0&&(Ae[Oe]=G[Oe])}return Ae}function cg(G,V){try{var Ae=G.onUncaughtError;Ae(V.value,{componentStack:V.stack})}catch(Be){setTimeout(function(){throw Be})}}function Ug(G,V,Ae){try{var Be=G.onCaughtError;Be(Ae.value,{componentStack:Ae.stack,errorBoundary:V.tag===1?V.stateNode:null})}catch(Oe){setTimeout(function(){throw Oe})}}function Vc(G,V,Ae){return Ae=Kt(Ae),Ae.tag=3,Ae.payload={element:null},Ae.callback=function(){cg(G,V)},Ae}function ha(G){return G=Kt(G),G.tag=3,G}function BI(G,V,Ae,Be){var Oe=Ae.type.getDerivedStateFromError;if(typeof Oe=="function"){var Je=Be.value;G.payload=function(){return Oe(Je)},G.callback=function(){Ug(V,Ae,Be)}}var Tt=Ae.stateNode;Tt!==null&&typeof Tt.componentDidCatch=="function"&&(G.callback=function(){Ug(V,Ae,Be),typeof Oe!="function"&&(Wp===null?Wp=new Set([this]):Wp.add(this));var ln=Be.stack;this.componentDidCatch(Be.value,{componentStack:ln!==null?ln:""})})}function G0(G,V,Ae,Be,Oe){if(Ae.flags|=32768,Be!==null&&typeof Be=="object"&&typeof Be.then=="function"){if(V=Ae.alternate,V!==null&&Re(V,Ae,Oe,!0),Ae=Vp.current,Ae!==null){switch(Ae.tag){case 13:return Rf===null?IA():Ae.alternate===null&&hl===0&&(hl=3),Ae.flags&=-257,Ae.flags|=65536,Ae.lanes=Oe,Be===Iu?Ae.flags|=16384:(V=Ae.updateQueue,V===null?Ae.updateQueue=new Set([Be]):V.add(Be),DI(G,Be,Oe)),!1;case 22:return Ae.flags|=65536,Be===Iu?Ae.flags|=16384:(V=Ae.updateQueue,V===null?(V={transitions:null,markerInstances:null,retryQueue:new Set([Be])},Ae.updateQueue=V):(Ae=V.retryQueue,Ae===null?V.retryQueue=new Set([Be]):Ae.add(Be)),DI(G,Be,Oe)),!1}throw Error(r(435,Ae.tag))}return DI(G,Be,Oe),IA(),!1}if(Vs)return V=Vp.current,V!==null?((V.flags&65536)===0&&(V.flags|=256),V.flags|=65536,V.lanes=Oe,Be!==lp&&(G=Error(r(422),{cause:Be}),ve(W(G,Ae)))):(Be!==lp&&(V=Error(r(423),{cause:Be}),ve(W(V,Ae))),G=G.current.alternate,G.flags|=65536,Oe&=-Oe,G.lanes|=Oe,Be=W(Be,Ae),Oe=Vc(G.stateNode,Be,Oe),Ho(G,Oe),hl!==4&&(hl=2)),!1;var Je=Error(r(520),{cause:Be});if(Je=W(Je,Ae),P_===null?P_=[Je]:P_.push(Je),hl!==4&&(hl=2),V===null)return!0;Be=W(Be,Ae),Ae=V;do{switch(Ae.tag){case 3:return Ae.flags|=65536,G=Oe&-Oe,Ae.lanes|=G,G=Vc(Ae.stateNode,Be,G),Ho(Ae,G),!1;case 1:if(V=Ae.type,Je=Ae.stateNode,(Ae.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||Je!==null&&typeof Je.componentDidCatch=="function"&&(Wp===null||!Wp.has(Je))))return Ae.flags|=65536,Oe&=-Oe,Ae.lanes|=Oe,Oe=ha(Oe),BI(Oe,G,Ae,Be),Ho(Ae,Oe),!1}Ae=Ae.return}while(Ae!==null);return!1}function PA(G,V,Ae,Be){V.child=G===null?N4(V,null,Ae,Be):Cu(V,G.child,Ae,Be)}function _h(G,V,Ae,Be,Oe){Ae=Ae.render;var Je=V.ref;if("ref"in Be){var Tt={};for(var ln in Be)ln!=="ref"&&(Tt[ln]=Be[ln])}else Tt=Be;return ke(V),Be=ei(G,V,Ae,Tt,Je,Oe),ln=Ro(),G!==null&&!Ps?(On(G,V,Oe),qr(G,V,Oe)):(Vs&&ln&&J(V),V.flags|=1,PA(G,V,Be,Oe),V.child)}function n0(G,V,Ae,Be,Oe){if(G===null){var Je=Ae.type;return typeof Je=="function"&&!NI(Je)&&Je.defaultProps===void 0&&Ae.compare===null?(V.tag=15,V.type=Je,HC(G,V,Je,Be,Oe)):(G=RI(Ae.type,null,Be,V,V.mode,Oe),G.ref=V.ref,G.return=V,V.child=G)}if(Je=G.child,!ps(G,Oe)){var Tt=Je.memoizedProps;if(Ae=Ae.compare,Ae=Ae!==null?Ae:st,Ae(Tt,Be)&&G.ref===V.ref)return qr(G,V,Oe)}return V.flags|=1,G=Fp(Je,Be),G.ref=V.ref,G.return=V,V.child=G}function HC(G,V,Ae,Be,Oe){if(G!==null){var Je=G.memoizedProps;if(st(Je,Be)&&G.ref===V.ref)if(Ps=!1,V.pendingProps=Be=Je,ps(G,Oe))(G.flags&131072)!==0&&(Ps=!0);else return V.lanes=G.lanes,qr(G,V,Oe)}return ku(G,V,Ae,Be,Oe)}function f1(G,V,Ae){var Be=V.pendingProps,Oe=Be.children,Je=G!==null?G.memoizedState:null;if(Be.mode==="hidden"){if((V.flags&128)!==0){if(Be=Je!==null?Je.baseLanes|Ae:Ae,G!==null){for(Oe=V.child=G.child,Je=0;Oe!==null;)Je=Je|Oe.lanes|Oe.childLanes,Oe=Oe.sibling;V.childLanes=Je&~Be}else V.childLanes=0,V.child=null;return fm(G,V,Be,Ae)}if((Ae&536870912)!==0)V.memoizedState={baseLanes:0,cachePool:null},G!==null&&Bt(V,Je!==null?Je.cachePool:null),Je!==null?Zt(V,Je):nn(),Td(V);else return V.lanes=V.childLanes=536870912,fm(G,V,Je!==null?Je.baseLanes|Ae:Ae,Ae)}else Je!==null?(Bt(V,Je.cachePool),Zt(V,Je),da(),V.memoizedState=null):(G!==null&&Bt(V,null),nn(),da());return PA(G,V,Oe,Ae),V.child}function fm(G,V,Ae,Be){var Oe=It();return Oe=Oe===null?null:{parent:Ud?rc._currentValue:rc._currentValue2,pool:Oe},V.memoizedState={baseLanes:Ae,cachePool:Oe},G!==null&&Bt(V,null),nn(),Td(V),G!==null&&Re(G,V,Be,!0),null}function vp(G,V){var Ae=V.ref;if(Ae===null)G!==null&&G.ref!==null&&(V.flags|=4194816);else{if(typeof Ae!="function"&&typeof Ae!="object")throw Error(r(284));(G===null||G.ref!==Ae)&&(V.flags|=4194816)}}function ku(G,V,Ae,Be,Oe){return ke(V),Ae=ei(G,V,Ae,Be,void 0,Oe),Be=Ro(),G!==null&&!Ps?(On(G,V,Oe),qr(G,V,Oe)):(Vs&&Be&&J(V),V.flags|=1,PA(G,V,Ae,Oe),V.child)}function ot(G,V,Ae,Be,Oe,Je){return ke(V),V.updateQueue=null,Ae=To(V,Be,Ae,Oe),ro(G),Be=Ro(),G!==null&&!Ps?(On(G,V,Je),qr(G,V,Je)):(Vs&&Be&&J(V),V.flags|=1,PA(G,V,Ae,Je),V.child)}function rt(G,V,Ae,Be,Oe){if(ke(V),V.stateNode===null){var Je=mg,Tt=Ae.contextType;typeof Tt=="object"&&Tt!==null&&(Je=Ce(Tt)),Je=new Ae(Be,Je),V.memoizedState=Je.state!==null&&Je.state!==void 0?Je.state:null,Je.updater=Lc,V.stateNode=Je,Je._reactInternals=V,Je=V.stateNode,Je.props=Be,Je.state=V.memoizedState,Je.refs={},$n(V),Tt=Ae.contextType,Je.context=typeof Tt=="object"&&Tt!==null?Ce(Tt):mg,Je.state=V.memoizedState,Tt=Ae.getDerivedStateFromProps,typeof Tt=="function"&&(LC(V,Ae,Tt,Be),Je.state=V.memoizedState),typeof Ae.getDerivedStateFromProps=="function"||typeof Je.getSnapshotBeforeUpdate=="function"||typeof Je.UNSAFE_componentWillMount!="function"&&typeof Je.componentWillMount!="function"||(Tt=Je.state,typeof Je.componentWillMount=="function"&&Je.componentWillMount(),typeof Je.UNSAFE_componentWillMount=="function"&&Je.UNSAFE_componentWillMount(),Tt!==Je.state&&Lc.enqueueReplaceState(Je,Je.state,null),qe(V,Be,Je,Oe),Ao(),Je.state=V.memoizedState),typeof Je.componentDidMount=="function"&&(V.flags|=4194308),Be=!0}else if(G===null){Je=V.stateNode;var ln=V.memoizedProps,wn=du(Ae,ln);Je.props=wn;var $o=Je.context,Ai=Ae.contextType;Tt=mg,typeof Ai=="object"&&Ai!==null&&(Tt=Ce(Ai));var Qi=Ae.getDerivedStateFromProps;Ai=typeof Qi=="function"||typeof Je.getSnapshotBeforeUpdate=="function",ln=V.pendingProps!==ln,Ai||typeof Je.UNSAFE_componentWillReceiveProps!="function"&&typeof Je.componentWillReceiveProps!="function"||(ln||$o!==Tt)&&_m(V,Je,Be,Tt),Yp=!1;var Ni=V.memoizedState;Je.state=Ni,qe(V,Be,Je,Oe),Ao(),$o=V.memoizedState,ln||Ni!==$o||Yp?(typeof Qi=="function"&&(LC(V,Ae,Qi,Be),$o=V.memoizedState),(wn=Yp||_f(V,Ae,wn,Be,Ni,$o,Tt))?(Ai||typeof Je.UNSAFE_componentWillMount!="function"&&typeof Je.componentWillMount!="function"||(typeof Je.componentWillMount=="function"&&Je.componentWillMount(),typeof Je.UNSAFE_componentWillMount=="function"&&Je.UNSAFE_componentWillMount()),typeof Je.componentDidMount=="function"&&(V.flags|=4194308)):(typeof Je.componentDidMount=="function"&&(V.flags|=4194308),V.memoizedProps=Be,V.memoizedState=$o),Je.props=Be,Je.state=$o,Je.context=Tt,Be=wn):(typeof Je.componentDidMount=="function"&&(V.flags|=4194308),Be=!1)}else{Je=V.stateNode,ht(G,V),Tt=V.memoizedProps,Ai=du(Ae,Tt),Je.props=Ai,Qi=V.pendingProps,Ni=Je.context,$o=Ae.contextType,wn=mg,typeof $o=="object"&&$o!==null&&(wn=Ce($o)),ln=Ae.getDerivedStateFromProps,($o=typeof ln=="function"||typeof Je.getSnapshotBeforeUpdate=="function")||typeof Je.UNSAFE_componentWillReceiveProps!="function"&&typeof Je.componentWillReceiveProps!="function"||(Tt!==Qi||Ni!==wn)&&_m(V,Je,Be,wn),Yp=!1,Ni=V.memoizedState,Je.state=Ni,qe(V,Be,Je,Oe),Ao();var Xs=V.memoizedState;Tt!==Qi||Ni!==Xs||Yp||G!==null&&G.dependencies!==null&&Ee(G.dependencies)?(typeof ln=="function"&&(LC(V,Ae,ln,Be),Xs=V.memoizedState),(Ai=Yp||_f(V,Ae,Ai,Be,Ni,Xs,wn)||G!==null&&G.dependencies!==null&&Ee(G.dependencies))?($o||typeof Je.UNSAFE_componentWillUpdate!="function"&&typeof Je.componentWillUpdate!="function"||(typeof Je.componentWillUpdate=="function"&&Je.componentWillUpdate(Be,Xs,wn),typeof Je.UNSAFE_componentWillUpdate=="function"&&Je.UNSAFE_componentWillUpdate(Be,Xs,wn)),typeof Je.componentDidUpdate=="function"&&(V.flags|=4),typeof Je.getSnapshotBeforeUpdate=="function"&&(V.flags|=1024)):(typeof Je.componentDidUpdate!="function"||Tt===G.memoizedProps&&Ni===G.memoizedState||(V.flags|=4),typeof Je.getSnapshotBeforeUpdate!="function"||Tt===G.memoizedProps&&Ni===G.memoizedState||(V.flags|=1024),V.memoizedProps=Be,V.memoizedState=Xs),Je.props=Be,Je.state=Xs,Je.context=wn,Be=Ai):(typeof Je.componentDidUpdate!="function"||Tt===G.memoizedProps&&Ni===G.memoizedState||(V.flags|=4),typeof Je.getSnapshotBeforeUpdate!="function"||Tt===G.memoizedProps&&Ni===G.memoizedState||(V.flags|=1024),Be=!1)}return Je=Be,vp(G,V),Be=(V.flags&128)!==0,Je||Be?(Je=V.stateNode,Ae=Be&&typeof Ae.getDerivedStateFromError!="function"?null:Je.render(),V.flags|=1,G!==null&&Be?(V.child=Cu(V,G.child,null,Oe),V.child=Cu(V,null,Ae,Oe)):PA(G,V,Ae,Oe),V.memoizedState=Je.state,G=V.child):G=qr(G,V,Oe),G}function Ot(G,V,Ae,Be){return ye(),V.flags|=256,PA(G,V,Ae,Be),V.child}function an(G){return{baseLanes:G,cachePool:mt()}}function Dn(G,V,Ae){return G=G!==null?G.childLanes&~Ae:0,V&&(G|=pl),G}function Xn(G,V,Ae){var Be=V.pendingProps,Oe=!1,Je=(V.flags&128)!==0,Tt;if((Tt=Je)||(Tt=G!==null&&G.memoizedState===null?!1:(xs.current&2)!==0),Tt&&(Oe=!0,V.flags&=-129),Tt=(V.flags&32)!==0,V.flags&=-33,G===null){if(Vs){if(Oe?wA(V):da(),Vs){var ln=Za,wn;(wn=ln)&&(ln=GI(ln,Si),ln!==null?(V.memoizedState={dehydrated:ln,treeContext:cl!==null?{id:Ou,overflow:B0}:null,retryLane:536870912,hydrationErrors:null},wn=o(18,null,null,0),wn.stateNode=ln,wn.return=V,V.child=wn,Xa=V,Za=null,wn=!0):wn=!1),wn||_e(V)}if(ln=V.memoizedState,ln!==null&&(ln=ln.dehydrated,ln!==null))return OI(ln)?V.lanes=32:V.lanes=536870912,null;Zh(V)}return ln=Be.children,Be=Be.fallback,Oe?(da(),Oe=V.mode,ln=vo({mode:"hidden",children:ln},Oe),Be=Ch(Be,Oe,Ae,null),ln.return=V,Be.return=V,ln.sibling=Be,V.child=ln,Oe=V.child,Oe.memoizedState=an(Ae),Oe.childLanes=Dn(G,Tt,Ae),V.memoizedState=wh,Be):(wA(V),oo(V,ln))}if(wn=G.memoizedState,wn!==null&&(ln=wn.dehydrated,ln!==null)){if(Je)V.flags&256?(wA(V),V.flags&=-257,V=Xo(G,V,Ae)):V.memoizedState!==null?(da(),V.child=G.child,V.flags|=128,V=null):(da(),Oe=Be.fallback,ln=V.mode,Be=vo({mode:"visible",children:Be.children},ln),Oe=Ch(Oe,ln,Ae,null),Oe.flags|=2,Be.return=V,Oe.return=V,Be.sibling=Oe,V.child=Be,Cu(V,G.child,null,Ae),Be=V.child,Be.memoizedState=an(Ae),Be.childLanes=Dn(G,Tt,Ae),V.memoizedState=wh,V=Oe);else if(wA(V),OI(ln))Tt=Q1(ln).digest,Be=Error(r(419)),Be.stack="",Be.digest=Tt,ve({value:Be,source:null,stack:null}),V=Xo(G,V,Ae);else if(Ps||Re(G,V,Ae,!1),Tt=(Ae&G.childLanes)!==0,Ps||Tt){if(Tt=gA,Tt!==null&&(Be=Ae&-Ae,Be=(Be&42)!==0?1:M(Be),Be=(Be&(Tt.suspendedLanes|Ae))!==0?0:Be,Be!==0&&Be!==wn.retryLane))throw wn.retryLane=Be,yn(G,Be),ug(Tt,G,Be),Ja;Sf(ln)||IA(),V=Xo(G,V,Ae)}else Sf(ln)?(V.flags|=192,V.child=G.child,V=null):(G=wn.treeContext,Eh&&(Za=Q_(ln),Xa=V,Vs=!0,fu=null,Si=!1,G!==null&&(E0[jc++]=Ou,E0[jc++]=B0,E0[jc++]=cl,Ou=G.id,B0=G.overflow,cl=V)),V=oo(V,Be.children),V.flags|=4096);return V}return Oe?(da(),Oe=Be.fallback,ln=V.mode,wn=G.child,Je=wn.sibling,Be=Fp(wn,{mode:"hidden",children:Be.children}),Be.subtreeFlags=wn.subtreeFlags&65011712,Je!==null?Oe=Fp(Je,Oe):(Oe=Ch(Oe,ln,Ae,null),Oe.flags|=2),Oe.return=V,Be.return=V,Be.sibling=Oe,V.child=Be,Be=Oe,Oe=V.child,ln=G.child.memoizedState,ln===null?ln=an(Ae):(wn=ln.cachePool,wn!==null?(Je=Ud?rc._currentValue:rc._currentValue2,wn=wn.parent!==Je?{parent:Je,pool:Je}:wn):wn=mt(),ln={baseLanes:ln.baseLanes|Ae,cachePool:wn}),Oe.memoizedState=ln,Oe.childLanes=Dn(G,Tt,Ae),V.memoizedState=wh,Be):(wA(V),Ae=G.child,G=Ae.sibling,Ae=Fp(Ae,{mode:"visible",children:Be.children}),Ae.return=V,Ae.sibling=null,G!==null&&(Tt=V.deletions,Tt===null?(V.deletions=[G],V.flags|=16):Tt.push(G)),V.child=Ae,V.memoizedState=null,Ae)}function oo(G,V){return V=vo({mode:"visible",children:V},G.mode),V.return=G,G.child=V}function vo(G,V){return G=o(22,G,null,V),G.lanes=0,G.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},G}function Xo(G,V,Ae){return Cu(V,G.child,null,Ae),G=oo(V,V.pendingProps.children),G.flags|=2,V.memoizedState=null,G}function Ti(G,V,Ae){G.lanes|=V;var Be=G.alternate;Be!==null&&(Be.lanes|=V),we(G.return,V,Ae)}function ir(G,V,Ae,Be,Oe){var Je=G.memoizedState;Je===null?G.memoizedState={isBackwards:V,rendering:null,renderingStartTime:0,last:Be,tail:Ae,tailMode:Oe}:(Je.isBackwards=V,Je.rendering=null,Je.renderingStartTime=0,Je.last=Be,Je.tail=Ae,Je.tailMode=Oe)}function Gs(G,V,Ae){var Be=V.pendingProps,Oe=Be.revealOrder,Je=Be.tail;if(PA(G,V,Be.children,Ae),Be=xs.current,(Be&2)!==0)Be=Be&1|2,V.flags|=128;else{if(G!==null&&(G.flags&128)!==0)e:for(G=V.child;G!==null;){if(G.tag===13)G.memoizedState!==null&&Ti(G,Ae,V);else if(G.tag===19)Ti(G,Ae,V);else if(G.child!==null){G.child.return=G,G=G.child;continue}if(G===V)break e;for(;G.sibling===null;){if(G.return===null||G.return===V)break e;G=G.return}G.sibling.return=G.return,G=G.sibling}Be&=1}switch(p(xs,Be),Oe){case"forwards":for(Ae=V.child,Oe=null;Ae!==null;)G=Ae.alternate,G!==null&&mf(G)===null&&(Oe=Ae),Ae=Ae.sibling;Ae=Oe,Ae===null?(Oe=V.child,V.child=null):(Oe=Ae.sibling,Ae.sibling=null),ir(V,!1,Oe,Ae,Je);break;case"backwards":for(Ae=null,Oe=V.child,V.child=null;Oe!==null;){if(G=Oe.alternate,G!==null&&mf(G)===null){V.child=Oe;break}G=Oe.sibling,Oe.sibling=Ae,Ae=Oe,Oe=G}ir(V,!0,Ae,null,Je);break;case"together":ir(V,!1,null,null,void 0);break;default:V.memoizedState=null}return V.child}function qr(G,V,Ae){if(G!==null&&(V.dependencies=G.dependencies),Sl|=V.lanes,(Ae&V.childLanes)===0)if(G!==null){if(Re(G,V,Ae,!1),(Ae&V.childLanes)===0)return null}else return null;if(G!==null&&V.child!==G.child)throw Error(r(153));if(V.child!==null){for(G=V.child,Ae=Fp(G,G.pendingProps),V.child=Ae,Ae.return=V;G.sibling!==null;)G=G.sibling,Ae=Ae.sibling=Fp(G,G.pendingProps),Ae.return=V;Ae.sibling=null}return V.child}function ps(G,V){return(G.lanes&V)!==0?!0:(G=G.dependencies,!!(G!==null&&Ee(G)))}function Ic(G,V,Ae){switch(V.tag){case 3:ie(V,V.stateNode.containerInfo),Qe(V,rc,G.memoizedState.cache),ye();break;case 27:case 5:le(V);break;case 4:ie(V,V.stateNode.containerInfo);break;case 10:Qe(V,V.type,V.memoizedProps.value);break;case 13:var Be=V.memoizedState;if(Be!==null)return Be.dehydrated!==null?(wA(V),V.flags|=128,null):(Ae&V.child.childLanes)!==0?Xn(G,V,Ae):(wA(V),G=qr(G,V,Ae),G!==null?G.sibling:null);wA(V);break;case 19:var Oe=(G.flags&128)!==0;if(Be=(Ae&V.childLanes)!==0,Be||(Re(G,V,Ae,!1),Be=(Ae&V.childLanes)!==0),Oe){if(Be)return Gs(G,V,Ae);V.flags|=128}if(Oe=V.memoizedState,Oe!==null&&(Oe.rendering=null,Oe.tail=null,Oe.lastEffect=null),p(xs,xs.current),Be)break;return null;case 22:case 23:return V.lanes=0,f1(G,V,Ae);case 24:Qe(V,rc,G.memoizedState.cache)}return qr(G,V,Ae)}function lc(G,V,Ae){if(G!==null)if(G.memoizedProps!==V.pendingProps)Ps=!0;else{if(!ps(G,Ae)&&(V.flags&128)===0)return Ps=!1,Ic(G,V,Ae);Ps=(G.flags&131072)!==0}else Ps=!1,Vs&&(V.flags&1048576)!==0&&j(V,KI,V.index);switch(V.lanes=0,V.tag){case 16:e:{G=V.pendingProps;var Be=V.elementType,Oe=Be._init;if(Be=Oe(Be._payload),V.type=Be,typeof Be=="function")NI(Be)?(G=du(Be,G),V.tag=1,V=rt(null,V,Be,G,Ae)):(V.tag=0,V=ku(null,V,Be,G,Ae));else{if(Be!=null){if(Oe=Be.$$typeof,Oe===ap){V.tag=11,V=_h(null,V,Be,G,Ae);break e}else if(Oe===Gd){V.tag=14,V=n0(null,V,Be,G,Ae);break e}}throw V=g(Be)||Be,Error(r(306,V,""))}}return V;case 0:return ku(G,V,V.type,V.pendingProps,Ae);case 1:return Be=V.type,Oe=du(Be,V.pendingProps),rt(G,V,Be,Oe,Ae);case 3:e:{if(ie(V,V.stateNode.containerInfo),G===null)throw Error(r(387));var Je=V.pendingProps;Oe=V.memoizedState,Be=Oe.element,ht(G,V),qe(V,Je,null,Ae);var Tt=V.memoizedState;if(Je=Tt.cache,Qe(V,rc,Je),Je!==Oe.cache&&Te(V,[rc],Ae,!0),Ao(),Je=Tt.element,Eh&&Oe.isDehydrated)if(Oe={element:Je,isDehydrated:!1,cache:Tt.cache},V.updateQueue.baseState=Oe,V.memoizedState=Oe,V.flags&256){V=Ot(G,V,Je,Ae);break e}else if(Je!==Be){Be=W(Error(r(424)),V),ve(Be),V=Ot(G,V,Je,Ae);break e}else for(Eh&&(Za=Qf(V.stateNode.containerInfo),Xa=V,Vs=!0,fu=null,Si=!0),Ae=N4(V,null,Je,Ae),V.child=Ae;Ae;)Ae.flags=Ae.flags&-3|4096,Ae=Ae.sibling;else{if(ye(),Je===Be){V=qr(G,V,Ae);break e}PA(G,V,Je,Ae)}V=V.child}return V;case 26:if(bh)return vp(G,V),G===null?(Ae=Jc(V.type,null,V.pendingProps,null))?V.memoizedState=Ae:Vs||(V.stateNode=Sh(V.type,V.pendingProps,za.current,V)):V.memoizedState=Jc(V.type,G.memoizedProps,V.pendingProps,G.memoizedState),null;case 27:if(ai)return le(V),G===null&&ai&&Vs&&(Be=V.stateNode=v_(V.type,V.pendingProps,za.current,bl.current,!1),Xa=V,Si=!0,Za=d9(V.type,Be,Za)),PA(G,V,V.pendingProps.children,Ae),vp(G,V),G===null&&(V.flags|=4194304),V.child;case 5:return G===null&&Vs&&(vf(V.type,V.pendingProps,bl.current),(Oe=Be=Za)&&(Be=$C(Be,V.type,V.pendingProps,Si),Be!==null?(V.stateNode=Be,Xa=V,Za=o5(Be),Si=!1,Oe=!0):Oe=!1),Oe||_e(V)),le(V),Oe=V.type,Je=V.pendingProps,Tt=G!==null?G.memoizedProps:null,Be=Je.children,Lu(Oe,Je)?Be=null:Tt!==null&&Lu(Oe,Tt)&&(V.flags|=32),V.memoizedState!==null&&(Oe=ei(G,V,yo,null,null,Ae),Ud?b_._currentValue=Oe:b_._currentValue2=Oe),vp(G,V),PA(G,V,Be,Ae),V.child;case 6:return G===null&&Vs&&(YI(V.pendingProps,bl.current),(G=Ae=Za)&&(Ae=L2(Ae,V.pendingProps,Si),Ae!==null?(V.stateNode=Ae,Xa=V,Za=null,G=!0):G=!1),G||_e(V)),null;case 13:return Xn(G,V,Ae);case 4:return ie(V,V.stateNode.containerInfo),Be=V.pendingProps,G===null?V.child=Cu(V,null,Be,Ae):PA(G,V,Be,Ae),V.child;case 11:return _h(G,V,V.type,V.pendingProps,Ae);case 7:return PA(G,V,V.pendingProps,Ae),V.child;case 8:return PA(G,V,V.pendingProps.children,Ae),V.child;case 12:return PA(G,V,V.pendingProps.children,Ae),V.child;case 10:return Be=V.pendingProps,Qe(V,V.type,Be.value),PA(G,V,Be.children,Ae),V.child;case 9:return Oe=V.type._context,Be=V.pendingProps.children,ke(V),Oe=Ce(Oe),Be=Be(Oe),V.flags|=1,PA(G,V,Be,Ae),V.child;case 14:return n0(G,V,V.type,V.pendingProps,Ae);case 15:return HC(G,V,V.type,V.pendingProps,Ae);case 19:return Gs(G,V,Ae);case 31:return Be=V.pendingProps,Ae=V.mode,Be={mode:Be.mode,children:Be.children},G===null?(Ae=vo(Be,Ae),Ae.ref=V.ref,V.child=Ae,Ae.return=V,V=Ae):(Ae=Fp(G.child,Be),Ae.ref=V.ref,V.child=Ae,Ae.return=V,V=Ae),V;case 22:return f1(G,V,Ae);case 24:return ke(V),Be=Ce(rc),G===null?(Oe=It(),Oe===null&&(Oe=gA,Je=tt(),Oe.pooledCache=Je,Je.refCount++,Je!==null&&(Oe.pooledCacheLanes|=Ae),Oe=Je),V.memoizedState={parent:Be,cache:Oe},$n(V),Qe(V,rc,Oe)):((G.lanes&Ae)!==0&&(ht(G,V),qe(V,null,null,Ae),Ao()),Oe=G.memoizedState,Je=V.memoizedState,Oe.parent!==Be?(Oe={parent:Be,cache:Be},V.memoizedState=Oe,V.lanes===0&&(V.memoizedState=V.updateQueue.baseState=Oe),Qe(V,rc,Be)):(Be=Je.cache,Qe(V,rc,Be),Be!==Oe.cache&&Te(V,[rc],Ae,!0))),PA(G,V,V.pendingProps.children,Ae),V.child;case 29:throw V.pendingProps}throw Error(r(156,V.tag))}function ka(G){G.flags|=4}function gn(G,V){if(G!==null&&G.child===V.child)return!1;if((V.flags&16)!==0)return!0;for(G=V.child;G!==null;){if((G.flags&13878)!==0||(G.subtreeFlags&13878)!==0)return!0;G=G.sibling}return!1}function bn(G,V,Ae,Be){if(Ks)for(Ae=V.child;Ae!==null;){if(Ae.tag===5||Ae.tag===6)Va(G,Ae.stateNode);else if(!(Ae.tag===4||ai&&Ae.tag===27)&&Ae.child!==null){Ae.child.return=Ae,Ae=Ae.child;continue}if(Ae===V)break;for(;Ae.sibling===null;){if(Ae.return===null||Ae.return===V)return;Ae=Ae.return}Ae.sibling.return=Ae.return,Ae=Ae.sibling}else if(E_)for(var Oe=V.child;Oe!==null;){if(Oe.tag===5){var Je=Oe.stateNode;Ae&&Be&&(Je=ZE(Je,Oe.type,Oe.memoizedProps)),Va(G,Je)}else if(Oe.tag===6)Je=Oe.stateNode,Ae&&Be&&(Je=NA(Je,Oe.memoizedProps)),Va(G,Je);else if(Oe.tag!==4){if(Oe.tag===22&&Oe.memoizedState!==null)Je=Oe.child,Je!==null&&(Je.return=Oe),bn(G,Oe,!0,!0);else if(Oe.child!==null){Oe.child.return=Oe,Oe=Oe.child;continue}}if(Oe===V)break;for(;Oe.sibling===null;){if(Oe.return===null||Oe.return===V)return;Oe=Oe.return}Oe.sibling.return=Oe.return,Oe=Oe.sibling}}function go(G,V,Ae,Be){var Oe=!1;if(E_)for(var Je=V.child;Je!==null;){if(Je.tag===5){var Tt=Je.stateNode;Ae&&Be&&(Tt=ZE(Tt,Je.type,Je.memoizedProps)),M4(G,Tt)}else if(Je.tag===6)Tt=Je.stateNode,Ae&&Be&&(Tt=NA(Tt,Je.memoizedProps)),M4(G,Tt);else if(Je.tag!==4){if(Je.tag===22&&Je.memoizedState!==null)Oe=Je.child,Oe!==null&&(Oe.return=Je),go(G,Je,!0,!0),Oe=!0;else if(Je.child!==null){Je.child.return=Je,Je=Je.child;continue}}if(Je===V)break;for(;Je.sibling===null;){if(Je.return===null||Je.return===V)return Oe;Je=Je.return}Je.sibling.return=Je.return,Je=Je.sibling}return Oe}function Go(G,V){if(E_&&gn(G,V)){G=V.stateNode;var Ae=G.containerInfo,Be=S_();go(Be,V,!1,!1),G.pendingChildren=Be,ka(V),jC(Ae,Be)}}function hr(G,V,Ae,Be){if(Ks)G.memoizedProps!==Be&&ka(V);else if(E_){var Oe=G.stateNode,Je=G.memoizedProps;if((G=gn(G,V))||Je!==Be){var Tt=bl.current;Je=kc(Oe,Ae,Je,Be,!G,null),Je===Oe?V.stateNode=Oe:(LI(Je,Ae,Be,Tt)&&ka(V),V.stateNode=Je,G?bn(Je,V,!1,!1):ka(V))}else V.stateNode=Oe}}function ia(G,V,Ae){if(r0(V,Ae)){if(G.flags|=16777216,!P2(V,Ae))if(PI())G.flags|=8192;else throw yg=Iu,M1}else G.flags&=-16777217}function lA(G,V){if(w1(V)){if(G.flags|=16777216,!a0(V))if(PI())G.flags|=8192;else throw yg=Iu,M1}else G.flags&=-16777217}function MA(G,V){V!==null&&(G.flags|=4),G.flags&16384&&(V=G.tag!==22?x():536870912,G.lanes|=V,Jp|=V)}function Fa(G,V){if(!Vs)switch(G.tailMode){case"hidden":V=G.tail;for(var Ae=null;V!==null;)V.alternate!==null&&(Ae=V),V=V.sibling;Ae===null?G.tail=null:Ae.sibling=null;break;case"collapsed":Ae=G.tail;for(var Be=null;Ae!==null;)Ae.alternate!==null&&(Be=Ae),Ae=Ae.sibling;Be===null?V||G.tail===null?G.tail=null:G.tail.sibling=null:Be.sibling=null}}function La(G){var V=G.alternate!==null&&G.alternate.child===G.child,Ae=0,Be=0;if(V)for(var Oe=G.child;Oe!==null;)Ae|=Oe.lanes|Oe.childLanes,Be|=Oe.subtreeFlags&65011712,Be|=Oe.flags&65011712,Oe.return=G,Oe=Oe.sibling;else for(Oe=G.child;Oe!==null;)Ae|=Oe.lanes|Oe.childLanes,Be|=Oe.subtreeFlags,Be|=Oe.flags,Oe.return=G,Oe=Oe.sibling;return G.subtreeFlags|=Be,G.childLanes=Ae,V}function Y0(G,V,Ae){var Be=V.pendingProps;switch(oe(V),V.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return La(V),null;case 1:return La(V),null;case 3:return Ae=V.stateNode,Be=null,G!==null&&(Be=G.memoizedState.cache),V.memoizedState.cache!==Be&&(V.flags|=2048),Pe(rc),ne(),Ae.pendingContext&&(Ae.context=Ae.pendingContext,Ae.pendingContext=null),(G===null||G.child===null)&&(pe(V)?ka(V):G===null||G.memoizedState.isDehydrated&&(V.flags&256)===0||(V.flags|=1024,Me())),Go(G,V),La(V),null;case 26:if(bh){Ae=V.type;var Oe=V.memoizedState;return G===null?(ka(V),Oe!==null?(La(V),lA(V,Oe)):(La(V),ia(V,Ae,Be))):Oe?Oe!==G.memoizedState?(ka(V),La(V),lA(V,Oe)):(La(V),V.flags&=-16777217):(Ks?G.memoizedProps!==Be&&ka(V):hr(G,V,Ae,Be),La(V),ia(V,Ae,Be)),null}case 27:if(ai){if(ge(V),Ae=za.current,Oe=V.type,G!==null&&V.stateNode!=null)Ks?G.memoizedProps!==Be&&ka(V):hr(G,V,Oe,Be);else{if(!Be){if(V.stateNode===null)throw Error(r(166));return La(V),null}G=bl.current,pe(V)?ue(V,G):(G=v_(Oe,Be,Ae,G,!0),V.stateNode=G,ka(V))}return La(V),null}case 5:if(ge(V),Ae=V.type,G!==null&&V.stateNode!=null)hr(G,V,Ae,Be);else{if(!Be){if(V.stateNode===null)throw Error(r(166));return La(V),null}G=bl.current,pe(V)?ue(V,G):(Oe=ic(Ae,Be,za.current,G,V),bn(Oe,V,!1,!1),V.stateNode=Oe,LI(Oe,Ae,Be,G)&&ka(V))}return La(V),ia(V,V.type,V.pendingProps),null;case 6:if(G&&V.stateNode!=null)Ae=G.memoizedProps,Ks?Ae!==Be&&ka(V):E_&&(Ae!==Be?(V.stateNode=Jg(Be,za.current,bl.current,V),ka(V)):V.stateNode=G.stateNode);else{if(typeof Be!="string"&&V.stateNode===null)throw Error(r(166));if(G=za.current,Ae=bl.current,pe(V)){if(!Eh)throw Error(r(176));if(G=V.stateNode,Ae=V.memoizedProps,Be=null,Oe=Xa,Oe!==null)switch(Oe.tag){case 27:case 5:Be=Oe.memoizedProps}wm(G,Ae,V,Be)||_e(V)}else V.stateNode=Jg(Be,G,Ae,V)}return La(V),null;case 13:if(Be=V.memoizedState,G===null||G.memoizedState!==null&&G.memoizedState.dehydrated!==null){if(Oe=pe(V),Be!==null&&Be.dehydrated!==null){if(G===null){if(!Oe)throw Error(r(318));if(!Eh)throw Error(r(344));if(Oe=V.memoizedState,Oe=Oe!==null?Oe.dehydrated:null,!Oe)throw Error(r(317));i5(Oe,V)}else ye(),(V.flags&128)===0&&(V.memoizedState=null),V.flags|=4;La(V),Oe=!1}else Oe=Me(),G!==null&&G.memoizedState!==null&&(G.memoizedState.hydrationErrors=Oe),Oe=!0;if(!Oe)return V.flags&256?(Zh(V),V):(Zh(V),null)}if(Zh(V),(V.flags&128)!==0)return V.lanes=Ae,V;if(Ae=Be!==null,G=G!==null&&G.memoizedState!==null,Ae){Be=V.child,Oe=null,Be.alternate!==null&&Be.alternate.memoizedState!==null&&Be.alternate.memoizedState.cachePool!==null&&(Oe=Be.alternate.memoizedState.cachePool.pool);var Je=null;Be.memoizedState!==null&&Be.memoizedState.cachePool!==null&&(Je=Be.memoizedState.cachePool.pool),Je!==Oe&&(Be.flags|=2048)}return Ae!==G&&Ae&&(V.child.flags|=8192),MA(V,V.updateQueue),La(V),null;case 4:return ne(),Go(G,V),G===null&&w4(V.stateNode.containerInfo),La(V),null;case 10:return Pe(V.type),La(V),null;case 19:if(d(xs),Oe=V.memoizedState,Oe===null)return La(V),null;if(Be=(V.flags&128)!==0,Je=Oe.rendering,Je===null)if(Be)Fa(Oe,!1);else{if(hl!==0||G!==null&&(G.flags&128)!==0)for(G=V.child;G!==null;){if(Je=mf(G),Je!==null){for(V.flags|=128,Fa(Oe,!1),G=Je.updateQueue,V.updateQueue=G,MA(V,G),V.subtreeFlags=0,G=Ae,Ae=V.child;Ae!==null;)qs(Ae,G),Ae=Ae.sibling;return p(xs,xs.current&1|2),V.child}G=G.sibling}Oe.tail!==null&&cs()>x3&&(V.flags|=128,Be=!0,Fa(Oe,!1),V.lanes=4194304)}else{if(!Be)if(G=mf(Je),G!==null){if(V.flags|=128,Be=!0,G=G.updateQueue,V.updateQueue=G,MA(V,G),Fa(Oe,!0),Oe.tail===null&&Oe.tailMode==="hidden"&&!Je.alternate&&!Vs)return La(V),null}else 2*cs()-Oe.renderingStartTime>x3&&Ae!==536870912&&(V.flags|=128,Be=!0,Fa(Oe,!1),V.lanes=4194304);Oe.isBackwards?(Je.sibling=V.child,V.child=Je):(G=Oe.last,G!==null?G.sibling=Je:V.child=Je,Oe.last=Je)}return Oe.tail!==null?(V=Oe.tail,Oe.rendering=V,Oe.tail=V.sibling,Oe.renderingStartTime=cs(),V.sibling=null,G=xs.current,p(xs,Be?G&1|2:G&1),V):(La(V),null);case 22:case 23:return Zh(V),zn(),Be=V.memoizedState!==null,G!==null?G.memoizedState!==null!==Be&&(V.flags|=8192):Be&&(V.flags|=8192),Be?(Ae&536870912)!==0&&(V.flags&128)===0&&(La(V),V.subtreeFlags&6&&(V.flags|=8192)):La(V),Ae=V.updateQueue,Ae!==null&&MA(V,Ae.retryQueue),Ae=null,G!==null&&G.memoizedState!==null&&G.memoizedState.cachePool!==null&&(Ae=G.memoizedState.cachePool.pool),Be=null,V.memoizedState!==null&&V.memoizedState.cachePool!==null&&(Be=V.memoizedState.cachePool.pool),Be!==Ae&&(V.flags|=2048),G!==null&&d(Yi),null;case 24:return Ae=null,G!==null&&(Ae=G.memoizedState.cache),V.memoizedState.cache!==Ae&&(V.flags|=2048),Pe(rc),La(V),null;case 25:return null;case 30:return null}throw Error(r(156,V.tag))}function Hr(G,V){switch(oe(V),V.tag){case 1:return G=V.flags,G&65536?(V.flags=G&-65537|128,V):null;case 3:return Pe(rc),ne(),G=V.flags,(G&65536)!==0&&(G&128)===0?(V.flags=G&-65537|128,V):null;case 26:case 27:case 5:return ge(V),null;case 13:if(Zh(V),G=V.memoizedState,G!==null&&G.dehydrated!==null){if(V.alternate===null)throw Error(r(340));ye()}return G=V.flags,G&65536?(V.flags=G&-65537|128,V):null;case 19:return d(xs),null;case 4:return ne(),null;case 10:return Pe(V.type),null;case 22:case 23:return Zh(V),zn(),G!==null&&d(Yi),G=V.flags,G&65536?(V.flags=G&-65537|128,V):null;case 24:return Pe(rc),null;case 25:return null;default:return null}}function fh(G,V){switch(oe(V),V.tag){case 3:Pe(rc),ne();break;case 26:case 27:case 5:ge(V);break;case 4:ne();break;case 13:Zh(V);break;case 19:d(xs);break;case 10:Pe(V.type);break;case 22:case 23:Zh(V),zn(),G!==null&&d(Yi);break;case 24:Pe(rc)}}function Ih(G,V){try{var Ae=V.updateQueue,Be=Ae!==null?Ae.lastEffect:null;if(Be!==null){var Oe=Be.next;Ae=Oe;do{if((Ae.tag&G)===G){Be=void 0;var Je=Ae.create,Tt=Ae.inst;Be=Je(),Tt.destroy=Be}Ae=Ae.next}while(Ae!==Oe)}}catch(ln){$s(V,V.return,ln)}}function DA(G,V,Ae){try{var Be=V.updateQueue,Oe=Be!==null?Be.lastEffect:null;if(Oe!==null){var Je=Oe.next;Be=Je;do{if((Be.tag&G)===G){var Tt=Be.inst,ln=Tt.destroy;if(ln!==void 0){Tt.destroy=void 0,Oe=V;var wn=Ae,$o=ln;try{$o()}catch(Ai){$s(Oe,wn,Ai)}}}Be=Be.next}while(Be!==Je)}}catch(Ai){$s(V,V.return,Ai)}}function OC(G){var V=G.updateQueue;if(V!==null){var Ae=G.stateNode;try{qt(V,Ae)}catch(Be){$s(G,G.return,Be)}}}function bI(G,V,Ae){Ae.props=du(G.type,G.memoizedProps),Ae.state=G.memoizedState;try{Ae.componentWillUnmount()}catch(Be){$s(G,V,Be)}}function hu(G,V){try{var Ae=G.ref;if(Ae!==null){switch(G.tag){case 26:case 27:case 5:var Be=CA(G.stateNode);break;case 30:Be=G.stateNode;break;default:Be=G.stateNode}typeof Ae=="function"?G.refCleanup=Ae(Be):Ae.current=Be}}catch(Oe){$s(G,V,Oe)}}function lg(G,V){var Ae=G.ref,Be=G.refCleanup;if(Ae!==null)if(typeof Be=="function")try{Be()}catch(Oe){$s(G,V,Oe)}finally{G.refCleanup=null,G=G.alternate,G!=null&&(G.refCleanup=null)}else if(typeof Ae=="function")try{Ae(null)}catch(Oe){$s(G,V,Oe)}else Ae.current=null}function wp(G){var V=G.type,Ae=G.memoizedProps,Be=G.stateNode;try{p3(Be,V,Ae,G)}catch(Oe){$s(G,G.return,Oe)}}function kd(G,V,Ae){try{l9(G.stateNode,G.type,Ae,V,G)}catch(Be){$s(G,G.return,Be)}}function ff(G){return G.tag===5||G.tag===3||(bh?G.tag===26:!1)||(ai?G.tag===27&&Gp(G.type):!1)||G.tag===4}function I1(G){e:for(;;){for(;G.sibling===null;){if(G.return===null||ff(G.return))return null;G=G.return}for(G.sibling.return=G.return,G=G.sibling;G.tag!==5&&G.tag!==6&&G.tag!==18;){if(ai&&G.tag===27&&Gp(G.type)||G.flags&2||G.child===null||G.tag===4)continue e;G.child.return=G,G=G.child}if(!(G.flags&2))return G.stateNode}}function p2(G,V,Ae){var Be=G.tag;if(Be===5||Be===6)G=G.stateNode,V?P4(Ae,G,V):R2(Ae,G);else if(Be!==4&&(ai&&Be===27&&Gp(G.type)&&(Ae=G.stateNode,V=null),G=G.child,G!==null))for(p2(G,V,Ae),G=G.sibling;G!==null;)p2(G,V,Ae),G=G.sibling}function Pp(G,V,Ae){var Be=G.tag;if(Be===5||Be===6)G=G.stateNode,V?qE(Ae,G,V):$E(Ae,G);else if(Be!==4&&(ai&&Be===27&&Gp(G.type)&&(Ae=G.stateNode),G=G.child,G!==null))for(Pp(G,V,Ae),G=G.sibling;G!==null;)Pp(G,V,Ae),G=G.sibling}function SI(G,V,Ae){G=G.containerInfo;try{vm(G,Ae)}catch(Be){$s(V,V.return,Be)}}function Mp(G){var V=G.stateNode,Ae=G.memoizedProps;try{Al(G.type,Ae,V,G)}catch(Be){$s(G,G.return,Be)}}function f_(G,V){for(bm(G.containerInfo),Pa=V;Pa!==null;)if(G=Pa,V=G.child,(G.subtreeFlags&1024)!==0&&V!==null)V.return=G,Pa=V;else for(;Pa!==null;){G=Pa;var Ae=G.alternate;switch(V=G.flags,G.tag){case 0:break;case 11:case 15:break;case 1:if((V&1024)!==0&&Ae!==null){V=void 0;var Be=G,Oe=Ae.memoizedProps;Ae=Ae.memoizedState;var Je=Be.stateNode;try{var Tt=du(Be.type,Oe,Be.elementType===Be.type);V=Je.getSnapshotBeforeUpdate(Tt,Ae),Je.__reactInternalSnapshotBeforeUpdate=V}catch(ln){$s(Be,Be.return,ln)}}break;case 3:(V&1024)!==0&&Ks&&HI(G.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((V&1024)!==0)throw Error(r(163))}if(V=G.sibling,V!==null){V.return=G.return,Pa=V;break}Pa=G.return}}function U0(G,V,Ae){var Be=Ae.flags;switch(Ae.tag){case 0:case 11:case 15:Im(G,Ae),Be&4&&Ih(5,Ae);break;case 1:if(Im(G,Ae),Be&4)if(G=Ae.stateNode,V===null)try{G.componentDidMount()}catch(Tt){$s(Ae,Ae.return,Tt)}else{var Oe=du(Ae.type,V.memoizedProps);V=V.memoizedState;try{G.componentDidUpdate(Oe,V,G.__reactInternalSnapshotBeforeUpdate)}catch(Tt){$s(Ae,Ae.return,Tt)}}Be&64&&OC(Ae),Be&512&&hu(Ae,Ae.return);break;case 3:if(Im(G,Ae),Be&64&&(G=Ae.updateQueue,G!==null)){if(V=null,Ae.child!==null)switch(Ae.child.tag){case 27:case 5:V=CA(Ae.child.stateNode);break;case 1:V=Ae.child.stateNode}try{qt(G,V)}catch(Tt){$s(Ae,Ae.return,Tt)}}break;case 27:ai&&V===null&&Be&4&&Mp(Ae);case 26:case 5:Im(G,Ae),V===null&&Be&4&&wp(Ae),Be&512&&hu(Ae,Ae.return);break;case 12:Im(G,Ae);break;case 13:Im(G,Ae),Be&4&&A3(G,Ae),Be&64&&(G=Ae.memoizedState,G!==null&&(G=G.dehydrated,G!==null&&(Ae=dg.bind(null,Ae),e5(G,Ae))));break;case 22:if(Be=Ae.memoizedState!==null||qg,!Be){V=V!==null&&V.memoizedState!==null||gl,Oe=qg;var Je=gl;qg=Be,(gl=V)&&!Je?K0(G,Ae,(Ae.subtreeFlags&8772)!==0):Im(G,Ae),qg=Oe,gl=Je}break;case 30:break;default:Im(G,Ae)}}function S4(G){var V=G.alternate;V!==null&&(G.alternate=null,S4(V)),G.child=null,G.deletions=null,G.sibling=null,G.tag===5&&(V=G.stateNode,V!==null&&Wg(V)),G.stateNode=null,G.return=null,G.dependencies=null,G.memoizedProps=null,G.memoizedState=null,G.pendingProps=null,G.stateNode=null,G.updateQueue=null}function ep(G,V,Ae){for(Ae=Ae.child;Ae!==null;)If(G,V,Ae),Ae=Ae.sibling}function If(G,V,Ae){if(Ig&&typeof Ig.onCommitFiberUnmount=="function")try{Ig.onCommitFiberUnmount(_u,Ae)}catch{}switch(Ae.tag){case 26:if(bh){gl||lg(Ae,V),ep(G,V,Ae),Ae.memoizedState?Gi(Ae.memoizedState):Ae.stateNode&&Op(Ae.stateNode);break}case 27:if(ai){gl||lg(Ae,V);var Be=qc,Oe=Yu;Gp(Ae.type)&&(qc=Ae.stateNode,Yu=!1),ep(G,V,Ae),P1(Ae.stateNode),qc=Be,Yu=Oe;break}case 5:gl||lg(Ae,V);case 6:if(Ks){if(Be=qc,Oe=Yu,qc=null,ep(G,V,Ae),qc=Be,Yu=Oe,qc!==null)if(Yu)try{XE(qc,Ae.stateNode)}catch(Je){$s(Ae,V,Je)}else try{bf(qc,Ae.stateNode)}catch(Je){$s(Ae,V,Je)}}else ep(G,V,Ae);break;case 18:Ks&&qc!==null&&(Yu?H2(qc,Ae.stateNode):Bh(qc,Ae.stateNode));break;case 4:Ks?(Be=qc,Oe=Yu,qc=Ae.stateNode.containerInfo,Yu=!0,ep(G,V,Ae),qc=Be,Yu=Oe):(E_&&SI(Ae.stateNode,Ae,S_()),ep(G,V,Ae));break;case 0:case 11:case 14:case 15:gl||DA(2,Ae,V),gl||DA(4,Ae,V),ep(G,V,Ae);break;case 1:gl||(lg(Ae,V),Be=Ae.stateNode,typeof Be.componentWillUnmount=="function"&&bI(Ae,V,Be)),ep(G,V,Ae);break;case 21:ep(G,V,Ae);break;case 22:gl=(Be=gl)||Ae.memoizedState!==null,ep(G,V,Ae),gl=Be;break;default:ep(G,V,Ae)}}function A3(G,V){if(Eh&&V.memoizedState===null&&(G=V.alternate,G!==null&&(G=G.memoizedState,G!==null&&(G=G.dehydrated,G!==null))))try{D4(G)}catch(Ae){$s(V,V.return,Ae)}}function m2(G){switch(G.tag){case 13:case 19:var V=G.stateNode;return V===null&&(V=G.stateNode=new Tf),V;case 22:return G=G.stateNode,V=G._retryCache,V===null&&(V=G._retryCache=new Tf),V;default:throw Error(r(435,G.tag))}}function KE(G,V){var Ae=m2(G);V.forEach(function(Be){var Oe=x2.bind(null,G,Be);Ae.has(Be)||(Ae.add(Be),Be.then(Oe,Oe))})}function Fd(G,V){var Ae=V.deletions;if(Ae!==null)for(var Be=0;Be<Ae.length;Be++){var Oe=Ae[Be],Je=G,Tt=V;if(Ks){var ln=Tt;e:for(;ln!==null;){switch(ln.tag){case 27:if(ai){if(Gp(ln.type)){qc=ln.stateNode,Yu=!1;break e}break}case 5:qc=ln.stateNode,Yu=!1;break e;case 3:case 4:qc=ln.stateNode.containerInfo,Yu=!0;break e}ln=ln.return}if(qc===null)throw Error(r(160));If(Je,Tt,Oe),qc=null,Yu=!1}else If(Je,Tt,Oe);Je=Oe.alternate,Je!==null&&(Je.return=null),Oe.return=null}if(V.subtreeFlags&13878)for(V=V.child;V!==null;)_2(V,G),V=V.sibling}function _2(G,V){var Ae=G.alternate,Be=G.flags;switch(G.tag){case 0:case 11:case 14:case 15:Fd(V,G),o0(G),Be&4&&(DA(3,G,G.return),Ih(3,G),DA(5,G,G.return));break;case 1:Fd(V,G),o0(G),Be&512&&(gl||Ae===null||lg(Ae,Ae.return)),Be&64&&qg&&(G=G.updateQueue,G!==null&&(Be=G.callbacks,Be!==null&&(Ae=G.shared.hiddenCallbacks,G.shared.hiddenCallbacks=Ae===null?Be:Ae.concat(Be))));break;case 26:if(bh){var Oe=xc;if(Fd(V,G),o0(G),Be&512&&(gl||Ae===null||lg(Ae,Ae.return)),Be&4){Be=Ae!==null?Ae.memoizedState:null;var Je=G.memoizedState;Ae===null?Je===null?G.stateNode===null?G.stateNode=pg(Oe,G.type,G.memoizedProps,G):Pm(Oe,G.type,G.stateNode):G.stateNode=r5(Oe,Je,G.memoizedProps):Be!==Je?(Be===null?Ae.stateNode!==null&&Op(Ae.stateNode):Gi(Be),Je===null?Pm(Oe,G.type,G.stateNode):r5(Oe,Je,G.memoizedProps)):Je===null&&G.stateNode!==null&&kd(G,G.memoizedProps,Ae.memoizedProps)}break}case 27:if(ai){Fd(V,G),o0(G),Be&512&&(gl||Ae===null||lg(Ae,Ae.return)),Ae!==null&&Be&4&&kd(G,G.memoizedProps,Ae.memoizedProps);break}case 5:if(Fd(V,G),o0(G),Be&512&&(gl||Ae===null||lg(Ae,Ae.return)),Ks){if(G.flags&32){Oe=G.stateNode;try{T2(Oe)}catch(Ai){$s(G,G.return,Ai)}}Be&4&&G.stateNode!=null&&(Oe=G.memoizedProps,kd(G,Oe,Ae!==null?Ae.memoizedProps:Oe)),Be&1024&&(y3=!0)}break;case 6:if(Fd(V,G),o0(G),Be&4&&Ks){if(G.stateNode===null)throw Error(r(162));Be=G.memoizedProps,Ae=Ae!==null?Ae.memoizedProps:Be,Oe=G.stateNode;try{h3(Oe,Ae,Be)}catch(Ai){$s(G,G.return,Ai)}}break;case 3:if(bh?(Ys(),Oe=xc,xc=cp(V.containerInfo),Fd(V,G),xc=Oe):Fd(V,G),o0(G),Be&4){if(Ks&&Eh&&Ae!==null&&Ae.memoizedState.isDehydrated)try{v1(V.containerInfo)}catch(Ai){$s(G,G.return,Ai)}if(E_){Be=V.containerInfo,Ae=V.pendingChildren;try{vm(Be,Ae)}catch(Ai){$s(G,G.return,Ai)}}}y3&&(y3=!1,tp(G));break;case 4:bh?(Ae=xc,xc=cp(G.stateNode.containerInfo),Fd(V,G),o0(G),xc=Ae):(Fd(V,G),o0(G)),Be&4&&E_&&SI(G.stateNode,G,G.stateNode.pendingChildren);break;case 12:Fd(V,G),o0(G);break;case 13:Fd(V,G),o0(G),G.child.flags&8192&&G.memoizedState!==null!=(Ae!==null&&Ae.memoizedState!==null)&&(ny=cs()),Be&4&&(Be=G.updateQueue,Be!==null&&(G.updateQueue=null,KE(G,Be)));break;case 22:Oe=G.memoizedState!==null;var Tt=Ae!==null&&Ae.memoizedState!==null,ln=qg,wn=gl;if(qg=ln||Oe,gl=wn||Tt,Fd(V,G),gl=wn,qg=ln,o0(G),Be&8192&&(V=G.stateNode,V._visibility=Oe?V._visibility&-2:V._visibility|1,Oe&&(Ae===null||Tt||qg||gl||pu(G)),Ks)){e:if(Ae=null,Ks)for(V=G;;){if(V.tag===5||bh&&V.tag===26){if(Ae===null){Tt=Ae=V;try{Je=Tt.stateNode,Oe?k2(Je):F2(Tt.stateNode,Tt.memoizedProps)}catch(Ai){$s(Tt,Tt.return,Ai)}}}else if(V.tag===6){if(Ae===null){Tt=V;try{var $o=Tt.stateNode;Oe?Ap($o):m3($o,Tt.memoizedProps)}catch(Ai){$s(Tt,Tt.return,Ai)}}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===G)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===G)break e;for(;V.sibling===null;){if(V.return===null||V.return===G)break e;Ae===V&&(Ae=null),V=V.return}Ae===V&&(Ae=null),V.sibling.return=V.return,V=V.sibling}}Be&4&&(Be=G.updateQueue,Be!==null&&(Ae=Be.retryQueue,Ae!==null&&(Be.retryQueue=null,KE(G,Ae))));break;case 19:Fd(V,G),o0(G),Be&4&&(Be=G.updateQueue,Be!==null&&(G.updateQueue=null,KE(G,Be)));break;case 30:break;case 21:break;default:Fd(V,G),o0(G)}}function o0(G){var V=G.flags;if(V&2){try{if(Ks){for(var Ae,Be=G.return;Be!==null;){if(ff(Be)){Ae=Be;break}Be=Be.return}if(Ae==null)throw Error(r(160));switch(Ae.tag){case 27:if(ai){var Oe=Ae.stateNode,Je=I1(G);Pp(G,Je,Oe);break}case 5:var Tt=Ae.stateNode;Ae.flags&32&&(T2(Tt),Ae.flags&=-33);var ln=I1(G);Pp(G,ln,Tt);break;case 3:case 4:var wn=Ae.stateNode.containerInfo,$o=I1(G);p2(G,$o,wn);break;default:throw Error(r(161))}}}catch(Ai){$s(G,G.return,Ai)}G.flags&=-3}V&4096&&(G.flags&=-4097)}function tp(G){if(G.subtreeFlags&1024)for(G=G.child;G!==null;){var V=G;tp(V),V.tag===5&&V.flags&1024&&s0(V.stateNode),G=G.sibling}}function Im(G,V){if(V.subtreeFlags&8772)for(V=V.child;V!==null;)U0(G,V.alternate,V),V=V.sibling}function pu(G){for(G=G.child;G!==null;){var V=G;switch(V.tag){case 0:case 11:case 14:case 15:DA(4,V,V.return),pu(V);break;case 1:lg(V,V.return);var Ae=V.stateNode;typeof Ae.componentWillUnmount=="function"&&bI(V,V.return,Ae),pu(V);break;case 27:ai&&P1(V.stateNode);case 26:case 5:lg(V,V.return),pu(V);break;case 22:V.memoizedState===null&&pu(V);break;case 30:pu(V);break;default:pu(V)}G=G.sibling}}function K0(G,V,Ae){for(Ae=Ae&&(V.subtreeFlags&8772)!==0,V=V.child;V!==null;){var Be=V.alternate,Oe=G,Je=V,Tt=Je.flags;switch(Je.tag){case 0:case 11:case 15:K0(Oe,Je,Ae),Ih(4,Je);break;case 1:if(K0(Oe,Je,Ae),Be=Je,Oe=Be.stateNode,typeof Oe.componentDidMount=="function")try{Oe.componentDidMount()}catch($o){$s(Be,Be.return,$o)}if(Be=Je,Oe=Be.updateQueue,Oe!==null){var ln=Be.stateNode;try{var wn=Oe.shared.hiddenCallbacks;if(wn!==null)for(Oe.shared.hiddenCallbacks=null,Oe=0;Oe<wn.length;Oe++)vt(wn[Oe],ln)}catch($o){$s(Be,Be.return,$o)}}Ae&&Tt&64&&OC(Je),hu(Je,Je.return);break;case 27:ai&&Mp(Je);case 26:case 5:K0(Oe,Je,Ae),Ae&&Be===null&&Tt&4&&wp(Je),hu(Je,Je.return);break;case 12:K0(Oe,Je,Ae);break;case 13:K0(Oe,Je,Ae),Ae&&Tt&4&&A3(Oe,Je);break;case 22:Je.memoizedState===null&&K0(Oe,Je,Ae),hu(Je,Je.return);break;case 30:break;default:K0(Oe,Je,Ae)}V=V.sibling}}function zc(G,V){var Ae=null;G!==null&&G.memoizedState!==null&&G.memoizedState.cachePool!==null&&(Ae=G.memoizedState.cachePool.pool),G=null,V.memoizedState!==null&&V.memoizedState.cachePool!==null&&(G=V.memoizedState.cachePool.pool),G!==Ae&&(G!=null&&G.refCount++,Ae!=null&&At(Ae))}function np(G,V){G=null,V.alternate!==null&&(G=V.alternate.memoizedState.cache),V=V.memoizedState.cache,V!==G&&(V.refCount++,G!=null&&At(G))}function y0(G,V,Ae,Be){if(V.subtreeFlags&10256)for(V=V.child;V!==null;)Cm(G,V,Ae,Be),V=V.sibling}function Cm(G,V,Ae,Be){var Oe=V.flags;switch(V.tag){case 0:case 11:case 15:y0(G,V,Ae,Be),Oe&2048&&Ih(9,V);break;case 1:y0(G,V,Ae,Be);break;case 3:y0(G,V,Ae,Be),Oe&2048&&(G=null,V.alternate!==null&&(G=V.alternate.memoizedState.cache),V=V.memoizedState.cache,V!==G&&(V.refCount++,G!=null&&At(G)));break;case 12:if(Oe&2048){y0(G,V,Ae,Be),G=V.stateNode;try{var Je=V.memoizedProps,Tt=Je.id,ln=Je.onPostCommit;typeof ln=="function"&&ln(Tt,V.alternate===null?"mount":"update",G.passiveEffectDuration,-0)}catch(wn){$s(V,V.return,wn)}}else y0(G,V,Ae,Be);break;case 13:y0(G,V,Ae,Be);break;case 23:break;case 22:Je=V.stateNode,Tt=V.alternate,V.memoizedState!==null?Je._visibility&2?y0(G,V,Ae,Be):Kg(G,V):Je._visibility&2?y0(G,V,Ae,Be):(Je._visibility|=2,Dp(G,V,Ae,Be,(V.subtreeFlags&10256)!==0)),Oe&2048&&zc(Tt,V);break;case 24:y0(G,V,Ae,Be),Oe&2048&&np(V.alternate,V);break;default:y0(G,V,Ae,Be)}}function Dp(G,V,Ae,Be,Oe){for(Oe=Oe&&(V.subtreeFlags&10256)!==0,V=V.child;V!==null;){var Je=G,Tt=V,ln=Ae,wn=Be,$o=Tt.flags;switch(Tt.tag){case 0:case 11:case 15:Dp(Je,Tt,ln,wn,Oe),Ih(8,Tt);break;case 23:break;case 22:var Ai=Tt.stateNode;Tt.memoizedState!==null?Ai._visibility&2?Dp(Je,Tt,ln,wn,Oe):Kg(Je,Tt):(Ai._visibility|=2,Dp(Je,Tt,ln,wn,Oe)),Oe&&$o&2048&&zc(Tt.alternate,Tt);break;case 24:Dp(Je,Tt,ln,wn,Oe),Oe&&$o&2048&&np(Tt.alternate,Tt);break;default:Dp(Je,Tt,ln,wn,Oe)}V=V.sibling}}function Kg(G,V){if(V.subtreeFlags&10256)for(V=V.child;V!==null;){var Ae=G,Be=V,Oe=Be.flags;switch(Be.tag){case 22:Kg(Ae,Be),Oe&2048&&zc(Be.alternate,Be);break;case 24:Kg(Ae,Be),Oe&2048&&np(Be.alternate,Be);break;default:Kg(Ae,Be)}V=V.sibling}}function Ld(G){if(G.subtreeFlags&xg)for(G=G.child;G!==null;)f2(G),G=G.sibling}function f2(G){switch(G.tag){case 26:Ld(G),G.flags&xg&&(G.memoizedState!==null?al(xc,G.memoizedState,G.memoizedProps):W0(G.type,G.memoizedProps));break;case 5:Ld(G),G.flags&xg&&W0(G.type,G.memoizedProps);break;case 3:case 4:if(bh){var V=xc;xc=cp(G.stateNode.containerInfo),Ld(G),xc=V}else Ld(G);break;case 22:G.memoizedState===null&&(V=G.alternate,V!==null&&V.memoizedState!==null?(V=xg,xg=16777216,Ld(G),xg=V):Ld(G));break;default:Ld(G)}}function Np(G){var V=G.alternate;if(V!==null&&(G=V.child,G!==null)){V.child=null;do V=G.sibling,G.sibling=null,G=V;while(G!==null)}}function QI(G){var V=G.deletions;if((G.flags&16)!==0){if(V!==null)for(var Ae=0;Ae<V.length;Ae++){var Be=V[Ae];Pa=Be,op(Be,G)}Np(G)}if(G.subtreeFlags&10256)for(G=G.child;G!==null;)V0(G),G=G.sibling}function V0(G){switch(G.tag){case 0:case 11:case 15:QI(G),G.flags&2048&&DA(9,G,G.return);break;case 3:QI(G);break;case 12:QI(G);break;case 22:var V=G.stateNode;G.memoizedState!==null&&V._visibility&2&&(G.return===null||G.return.tag!==13)?(V._visibility&=-3,Vg(G)):QI(G);break;default:QI(G)}}function Vg(G){var V=G.deletions;if((G.flags&16)!==0){if(V!==null)for(var Ae=0;Ae<V.length;Ae++){var Be=V[Ae];Pa=Be,op(Be,G)}Np(G)}for(G=G.child;G!==null;){switch(V=G,V.tag){case 0:case 11:case 15:DA(8,V,V.return),Vg(V);break;case 22:Ae=V.stateNode,Ae._visibility&2&&(Ae._visibility&=-3,Vg(V));break;default:Vg(V)}G=G.sibling}}function op(G,V){for(;Pa!==null;){var Ae=Pa;switch(Ae.tag){case 0:case 11:case 15:DA(8,Ae,V);break;case 23:case 22:if(Ae.memoizedState!==null&&Ae.memoizedState.cachePool!==null){var Be=Ae.memoizedState.cachePool.pool;Be!=null&&Be.refCount++}break;case 24:At(Ae.memoizedState.cache)}if(Be=Ae.child,Be!==null)Be.return=Ae,Pa=Be;else e:for(Ae=G;Pa!==null;){Be=Pa;var Oe=Be.sibling,Je=Be.return;if(S4(Be),Be===Ae){Pa=null;break e}if(Oe!==null){Oe.return=Je,Pa=Oe;break e}Pa=Je}}}function bs(G){var V=B_(G);if(V!=null){if(typeof V.memoizedProps["data-testname"]!="string")throw Error(r(364));return V}if(G=Bf(G),G===null)throw Error(r(362));return G.stateNode.current}function Zo(G,V){var Ae=G.tag;switch(V.$$typeof){case T1:if(G.type===V.value)return!0;break;case Xg:e:{for(V=V.value,G=[G,0],Ae=0;Ae<G.length;){var Be=G[Ae++],Oe=Be.tag,Je=G[Ae++],Tt=V[Je];if(Oe!==5&&Oe!==26&&Oe!==27||!Qm(Be)){for(;Tt!=null&&Zo(Be,Tt);)Je++,Tt=V[Je];if(Je===V.length){V=!0;break e}else for(Be=Be.child;Be!==null;)G.push(Be,Je),Be=Be.sibling}}V=!1}return V;case U2:if((Ae===5||Ae===26||Ae===27)&&N2(G.stateNode,V.value))return!0;break;case ty:if((Ae===5||Ae===6||Ae===26||Ae===27)&&(G=WC(G),G!==null&&0<=G.indexOf(V.value)))return!0;break;case K2:if((Ae===5||Ae===26||Ae===27)&&(G=G.memoizedProps["data-testname"],typeof G=="string"&&G.toLowerCase()===V.value.toLowerCase()))return!0;break;default:throw Error(r(365))}return!1}function ip(G){switch(G.$$typeof){case T1:return"<"+(g(G.value)||"Unknown")+">";case Xg:return":has("+(ip(G)||"")+")";case U2:return'[role="'+G.value+'"]';case ty:return'"'+G.value+'"';case K2:return'[data-testname="'+G.value+'"]';default:throw Error(r(365))}}function vI(G,V){var Ae=[];G=[G,0];for(var Be=0;Be<G.length;){var Oe=G[Be++],Je=Oe.tag,Tt=G[Be++],ln=V[Tt];if(Je!==5&&Je!==26&&Je!==27||!Qm(Oe)){for(;ln!=null&&Zo(Oe,ln);)Tt++,ln=V[Tt];if(Tt===V.length)Ae.push(Oe);else for(Oe=Oe.child;Oe!==null;)G.push(Oe,Tt),Oe=Oe.sibling}}return Ae}function nc(G,V){if(!JC)throw Error(r(363));G=bs(G),G=vI(G,V),V=[],G=Array.from(G);for(var Ae=0;Ae<G.length;){var Be=G[Ae++],Oe=Be.tag;if(Oe===5||Oe===26||Oe===27)Qm(Be)||V.push(Be.stateNode);else for(Be=Be.child;Be!==null;)G.push(Be),Be=Be.sibling}return V}function i0(){if((ls&2)!==0&&Zr!==0)return Zr&-Zr;if(Xr.T!==null){var G=ll;return G!==0?G:Yt()}return w2()}function Cf(){pl===0&&(pl=(Zr&536870912)===0||Vs?y():536870912);var G=Vp.current;return G!==null&&(G.flags|=32),pl}function ug(G,V,Ae){(G===gA&&(os===2||os===9)||G.cancelPendingCommit!==null)&&(pa(G,0),oc(G,Zr,pl,!1)),B(G,Ae),((ls&2)===0||G!==gA)&&(G===gA&&((ls&2)===0&&(Uu|=Ae),hl===4&&oc(G,Zr,pl,!1)),at(G))}function wI(G,V,Ae){if((ls&6)!==0)throw Error(r(327));var Be=!Ae&&(V&124)===0&&(V&G.expiredLanes)===0||I(G,V),Oe=Be?kp(G,V):uA(G,V,!0),Je=Be;do{if(Oe===0){Ph&&!Be&&oc(G,V,0,!1);break}else{if(Ae=G.current.alternate,Je&&!Rp(Ae)){Oe=uA(G,V,!1),Je=!1;continue}if(Oe===2){if(Je=V,G.errorRecoveryDisabledLanes&Je)var Tt=0;else Tt=G.pendingLanes&-536870913,Tt=Tt!==0?Tt:Tt&536870912?536870912:0;if(Tt!==0){V=Tt;e:{var ln=G;Oe=P_;var wn=Eh&&ln.current.memoizedState.isDehydrated;if(wn&&(pa(ln,Tt).flags|=256),Tt=uA(ln,Tt,!1),Tt!==2){if(XI&&!wn){ln.errorRecoveryDisabledLanes|=Je,Uu|=Je,Oe=4;break e}Je=Vl,Vl=Oe,Je!==null&&(Vl===null?Vl=Je:Vl.push.apply(Vl,Je))}Oe=Tt}if(Je=!1,Oe!==2)continue}}if(Oe===1){pa(G,0),oc(G,V,0,!0);break}e:{switch(Be=G,Je=Oe,Je){case 0:case 1:throw Error(r(345));case 4:if((V&4194048)!==V)break;case 6:oc(Be,V,pl,!k1);break e;case 2:Vl=null;break;case 3:case 5:break;default:throw Error(r(329))}if((V&62914560)===V&&(Oe=ny+300-cs(),10<Oe)){if(oc(Be,V,pl,!k1),f(Be,0,!0)!==0)break e;Be.timeoutHandle=x_(rp.bind(null,Be,Ae,Vl,F1,Mh,V,pl,Uu,Jp,k1,Je,2,-0,0),Oe);break e}rp(Be,Ae,Vl,F1,Mh,V,pl,Uu,Jp,k1,Je,0,-0,0)}}break}while(!0);at(G)}function rp(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o,Ai,Qi,Ni,Xs){if(G.timeoutHandle=xh,Qi=V.subtreeFlags,(Qi&8192||(Qi&16785408)===16785408)&&(zC(),f2(V),Qi=M2(),Qi!==null)){G.cancelPendingCommit=Qi(VE.bind(null,G,V,Je,Ae,Be,Oe,Tt,ln,wn,Ai,1,Ni,Xs)),oc(G,Je,Tt,!$o);return}VE(G,V,Je,Ae,Be,Oe,Tt,ln,wn)}function Rp(G){for(var V=G;;){var Ae=V.tag;if((Ae===0||Ae===11||Ae===15)&&V.flags&16384&&(Ae=V.updateQueue,Ae!==null&&(Ae=Ae.stores,Ae!==null)))for(var Be=0;Be<Ae.length;Be++){var Oe=Ae[Be],Je=Oe.getSnapshot;Oe=Oe.value;try{if(!c0(Je(),Oe))return!1}catch{return!1}}if(Ae=V.child,V.subtreeFlags&16384&&Ae!==null)Ae.return=V,V=Ae;else{if(V===G)break;for(;V.sibling===null;){if(V.return===null||V.return===G)return!0;V=V.return}V.sibling.return=V.return,V=V.sibling}}return!0}function oc(G,V,Ae,Be){V&=~zp,V&=~Uu,G.suspendedLanes|=V,G.pingedLanes&=~V,Be&&(G.warmLanes|=V),Be=G.expirationTimes;for(var Oe=V;0<Oe;){var Je=31-_g(Oe),Tt=1<<Je;Be[Je]=-1,Oe&=~Tt}Ae!==0&&Q(G,Ae,V)}function gg(){return(ls&6)===0?(nt(0),!1):!0}function Cc(){if(Us!==null){if(os===0)var G=Us.return;else G=Us,Kl=Qh=null,uo(G),vh=null,R1=0,G=Us;for(;G!==null;)fh(G.alternate,G),G=G.return;Us=null}}function pa(G,V){var Ae=G.timeoutHandle;Ae!==xh&&(G.timeoutHandle=xh,hg(Ae)),Ae=G.cancelPendingCommit,Ae!==null&&(G.cancelPendingCommit=null,Ae()),Cc(),gA=G,Us=Ae=Fp(G.current,null),Zr=V,os=0,l0=null,k1=!1,Ph=I(G,V),XI=!1,Jp=pl=zp=Uu=Sl=hl=0,Vl=P_=null,Mh=!1,(V&8)!==0&&(V|=V&32);var Be=G.entangledLanes;if(Be!==0)for(G=G.entanglements,Be&=V;0<Be;){var Oe=31-_g(Be),Je=1<<Oe;V|=G[Oe],Be&=~Je}return dl=V,Wt(),Ae}function c3(G,V){_a=null,Xr.H=Kp,V===Df||V===ul?(V=dt(),os=3):V===M1?(V=dt(),os=4):os=V===Ja?8:V!==null&&typeof V=="object"&&typeof V.then=="function"?6:1,l0=V,Us===null&&(hl=1,cg(G,W(V,G.current)))}function PI(){var G=Vp.current;return G===null?!0:(Zr&4194048)===Zr?Rf===null:(Zr&62914560)===Zr||(Zr&536870912)!==0?G===Rf:!1}function Tp(){var G=Xr.H;return Xr.H=Kp,G===null?Kp:G}function rl(){var G=Xr.A;return Xr.A=$I,G}function IA(){hl=4,k1||(Zr&4194048)!==Zr&&Vp.current!==null||(Ph=!0),(Sl&134217727)===0&&(Uu&134217727)===0||gA===null||oc(gA,Zr,pl,!1)}function uA(G,V,Ae){var Be=ls;ls|=2;var Oe=Tp(),Je=rl();(gA!==G||Zr!==V)&&(F1=null,pa(G,V)),V=!1;var Tt=hl;e:do try{if(os!==0&&Us!==null){var ln=Us,wn=l0;switch(os){case 8:Cc(),Tt=6;break e;case 3:case 2:case 9:case 6:Vp.current===null&&(V=!0);var $o=os;if(os=0,l0=null,y1(G,ln,wn,$o),Ae&&Ph){Tt=0;break e}break;default:$o=os,os=0,l0=null,y1(G,ln,wn,$o)}}ym(),Tt=hl;break}catch(Ai){c3(G,Ai)}while(!0);return V&&G.shellSuspendCounter++,Kl=Qh=null,ls=Be,Xr.H=Oe,Xr.A=Je,Us===null&&(gA=null,Zr=0,Wt()),Tt}function ym(){for(;Us!==null;)xm(Us)}function kp(G,V){var Ae=ls;ls|=2;var Be=Tp(),Oe=rl();gA!==G||Zr!==V?(F1=null,x3=cs()+500,pa(G,V)):Ph=I(G,V);e:do try{if(os!==0&&Us!==null){V=Us;var Je=l0;t:switch(os){case 1:os=0,l0=null,y1(G,V,Je,1);break;case 2:case 9:if(xt(Je)){os=0,l0=null,I2(V);break}V=function(){os!==2&&os!==9||gA!==G||(os=7),at(G)},Je.then(V,V);break e;case 3:os=7;break e;case 4:os=5;break e;case 7:xt(Je)?(os=0,l0=null,I2(V)):(os=0,l0=null,y1(G,V,Je,7));break;case 5:var Tt=null;switch(Us.tag){case 26:Tt=Us.memoizedState;case 5:case 27:var ln=Us,wn=ln.type,$o=ln.pendingProps;if(Tt?a0(Tt):P2(wn,$o)){os=0,l0=null;var Ai=ln.sibling;if(Ai!==null)Us=Ai;else{var Qi=ln.return;Qi!==null?(Us=Qi,I_(Qi)):Us=null}break t}}os=0,l0=null,y1(G,V,Je,5);break;case 6:os=0,l0=null,y1(G,V,Je,6);break;case 8:Cc(),hl=6;break e;default:throw Error(r(462))}}C1();break}catch(Ni){c3(G,Ni)}while(!0);return Kl=Qh=null,Xr.H=Be,Xr.A=Oe,ls=Ae,Us!==null?0:(gA=null,Zr=0,Wt(),hl)}function C1(){for(;Us!==null&&!h9();)xm(Us)}function xm(G){var V=lc(G.alternate,G,dl);G.memoizedProps=G.pendingProps,V===null?I_(G):Us=V}function I2(G){var V=G,Ae=V.alternate;switch(V.tag){case 15:case 0:V=ot(Ae,V,V.pendingProps,V.type,void 0,Zr);break;case 11:V=ot(Ae,V,V.pendingProps,V.type.render,V.ref,Zr);break;case 5:uo(V);default:fh(Ae,V),V=Us=qs(V,dl),V=lc(Ae,V,dl)}G.memoizedProps=G.pendingProps,V===null?I_(G):Us=V}function y1(G,V,Ae,Be){Kl=Qh=null,uo(V),vh=null,R1=0;var Oe=V.return;try{if(G0(G,Oe,V,Ae,Zr)){hl=1,cg(G,W(Ae,G.current)),Us=null;return}}catch(Je){if(Oe!==null)throw Us=Oe,Je;hl=1,cg(G,W(Ae,G.current)),Us=null;return}V.flags&32768?(Vs||Be===1?G=!0:Ph||(Zr&536870912)!==0?G=!1:(k1=G=!0,(Be===2||Be===9||Be===3||Be===6)&&(Be=Vp.current,Be!==null&&Be.tag===13&&(Be.flags|=16384))),MI(V,G)):I_(V)}function I_(G){var V=G;do{if((V.flags&32768)!==0){MI(V,k1);return}G=V.return;var Ae=Y0(V.alternate,V,dl);if(Ae!==null){Us=Ae;return}if(V=V.sibling,V!==null){Us=V;return}Us=V=G}while(V!==null);hl===0&&(hl=5)}function MI(G,V){do{var Ae=Hr(G.alternate,G);if(Ae!==null){Ae.flags&=32767,Us=Ae;return}if(Ae=G.return,Ae!==null&&(Ae.flags|=32768,Ae.subtreeFlags=0,Ae.deletions=null),!V&&(G=G.sibling,G!==null)){Us=G;return}Us=G=Ae}while(G!==null);hl=6,Us=null}function VE(G,V,Ae,Be,Oe,Je,Tt,ln,wn){G.cancelPendingCommit=null;do sp();while(us!==0);if((ls&6)!==0)throw Error(r(327));if(V!==null){if(V===G.current)throw Error(r(177));if(Je=V.lanes|V.childLanes,Je|=l5,S(G,Ae,Je,Tt,ln,wn),G===gA&&(Us=gA=null,Zr=0),yu=V,Jd=G,Dh=Ae,V2=Je,g5=Oe,oy=Be,(V.subtreeFlags&10256)!==0||(V.flags&10256)!==0?(G.callbackNode=null,G.callbackPriority=0,zE(wf,function(){return xf(),null})):(G.callbackNode=null,G.callbackPriority=0),Be=(V.flags&13878)!==0,(V.subtreeFlags&13878)!==0||Be){Be=Xr.T,Xr.T=null,Oe=Sm(),J0(2),Tt=ls,ls|=4;try{f_(G,V,Ae)}finally{ls=Tt,J0(Oe),Xr.T=Be}}us=1,GC(),YC(),yf()}}function GC(){if(us===1){us=0;var G=Jd,V=yu,Ae=(V.flags&13878)!==0;if((V.subtreeFlags&13878)!==0||Ae){Ae=Xr.T,Xr.T=null;var Be=Sm();J0(2);var Oe=ls;ls|=4;try{_2(V,G),Ss(G.containerInfo)}finally{ls=Oe,J0(Be),Xr.T=Ae}}G.current=V,us=2}}function YC(){if(us===2){us=0;var G=Jd,V=yu,Ae=(V.flags&8772)!==0;if((V.subtreeFlags&8772)!==0||Ae){Ae=Xr.T,Xr.T=null;var Be=Sm();J0(2);var Oe=ls;ls|=4;try{U0(G,V.alternate,V)}finally{ls=Oe,J0(Be),Xr.T=Ae}}us=3}}function yf(){if(us===4||us===3){us=0,yc();var G=Jd,V=yu,Ae=Dh,Be=oy;(V.subtreeFlags&10256)!==0||(V.flags&10256)!==0?us=5:(us=0,yu=Jd=null,Fu(G,G.pendingLanes));var Oe=G.pendingLanes;if(Oe===0&&(Wp=null),k(Ae),V=V.stateNode,Ig&&typeof Ig.onCommitFiberRoot=="function")try{Ig.onCommitFiberRoot(_u,V,void 0,(V.current.flags&128)===128)}catch{}if(Be!==null){V=Xr.T,Oe=Sm(),J0(2),Xr.T=null;try{for(var Je=G.onRecoverableError,Tt=0;Tt<Be.length;Tt++){var ln=Be[Tt];Je(ln.value,{componentStack:ln.stack})}}finally{Xr.T=V,J0(Oe)}}(Dh&3)!==0&&sp(),at(G),Oe=G.pendingLanes,(Ae&4194090)!==0&&(Oe&42)!==0?G===Ku?up++:(up=0,Ku=G):up=0,nt(0)}}function Fu(G,V){(G.pooledCacheLanes&=V)===0&&(V=G.pooledCache,V!=null&&(G.pooledCache=null,At(V)))}function sp(G){return GC(),YC(),yf(),xf()}function xf(){if(us!==5)return!1;var G=Jd,V=V2;V2=0;var Ae=k(Dh),Be=32>Ae?32:Ae;Ae=Xr.T;var Oe=Sm();try{J0(Be),Xr.T=null,Be=g5,g5=null;var Je=Jd,Tt=Dh;if(us=0,yu=Jd=null,Dh=0,(ls&6)!==0)throw Error(r(331));var ln=ls;if(ls|=4,V0(Je.current),Cm(Je,Je.current,Tt,Be),ls=ln,nt(0,!1),Ig&&typeof Ig.onPostCommitFiberRoot=="function")try{Ig.onPostCommitFiberRoot(_u,Je)}catch{}return!0}finally{J0(Oe),Xr.T=Ae,Fu(G,V)}}function C2(G,V,Ae){V=W(Ae,V),V=Vc(G.stateNode,V,2),G=rn(G,V,2),G!==null&&(B(G,2),at(G))}function $s(G,V,Ae){if(G.tag===3)C2(G,G,Ae);else for(;V!==null;){if(V.tag===3){C2(V,G,Ae);break}else if(V.tag===1){var Be=V.stateNode;if(typeof V.type.getDerivedStateFromError=="function"||typeof Be.componentDidCatch=="function"&&(Wp===null||!Wp.has(Be))){G=W(Ae,G),Ae=ha(2),Be=rn(V,Ae,2),Be!==null&&(BI(Ae,Be,V,G),B(Be,2),at(Be));break}}V=V.return}}function DI(G,V,Ae){var Be=G.pingCache;if(Be===null){Be=G.pingCache=new qI;var Oe=new Set;Be.set(V,Oe)}else Oe=Be.get(V),Oe===void 0&&(Oe=new Set,Be.set(V,Oe));Oe.has(Ae)||(XI=!0,Oe.add(Ae),G=y2.bind(null,G,V,Ae),V.then(G,G))}function y2(G,V,Ae){var Be=G.pingCache;Be!==null&&Be.delete(V),G.pingedLanes|=G.suspendedLanes&Ae,G.warmLanes&=~Ae,gA===G&&(Zr&Ae)===Ae&&(hl===4||hl===3&&(Zr&62914560)===Zr&&300>cs()-ny?(ls&2)===0&&pa(G,0):zp|=Ae,Jp===Zr&&(Jp=0)),at(G)}function x1(G,V){V===0&&(V=x()),G=yn(G,V),G!==null&&(B(G,V),at(G))}function dg(G){var V=G.memoizedState,Ae=0;V!==null&&(Ae=V.retryLane),x1(G,Ae)}function x2(G,V){var Ae=0;switch(G.tag){case 13:var Be=G.stateNode,Oe=G.memoizedState;Oe!==null&&(Ae=Oe.retryLane);break;case 19:Be=G.stateNode;break;case 22:Be=G.stateNode._retryCache;break;default:throw Error(r(314))}Be!==null&&Be.delete(V),x1(G,Ae)}function zE(G,V){return qC(G,V)}function E2(G,V,Ae,Be){this.tag=G,this.key=Ae,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=V,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Be,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function NI(G){return G=G.prototype,!(!G||!G.isReactComponent)}function Fp(G,V){var Ae=G.alternate;return Ae===null?(Ae=o(G.tag,V,G.key,G.mode),Ae.elementType=G.elementType,Ae.type=G.type,Ae.stateNode=G.stateNode,Ae.alternate=G,G.alternate=Ae):(Ae.pendingProps=V,Ae.type=G.type,Ae.flags=0,Ae.subtreeFlags=0,Ae.deletions=null),Ae.flags=G.flags&65011712,Ae.childLanes=G.childLanes,Ae.lanes=G.lanes,Ae.child=G.child,Ae.memoizedProps=G.memoizedProps,Ae.memoizedState=G.memoizedState,Ae.updateQueue=G.updateQueue,V=G.dependencies,Ae.dependencies=V===null?null:{lanes:V.lanes,firstContext:V.firstContext},Ae.sibling=G.sibling,Ae.index=G.index,Ae.ref=G.ref,Ae.refCleanup=G.refCleanup,Ae}function qs(G,V){G.flags&=65011714;var Ae=G.alternate;return Ae===null?(G.childLanes=0,G.lanes=V,G.child=null,G.subtreeFlags=0,G.memoizedProps=null,G.memoizedState=null,G.updateQueue=null,G.dependencies=null,G.stateNode=null):(G.childLanes=Ae.childLanes,G.lanes=Ae.lanes,G.child=Ae.child,G.subtreeFlags=0,G.deletions=null,G.memoizedProps=Ae.memoizedProps,G.memoizedState=Ae.memoizedState,G.updateQueue=Ae.updateQueue,G.type=Ae.type,V=Ae.dependencies,G.dependencies=V===null?null:{lanes:V.lanes,firstContext:V.firstContext}),G}function RI(G,V,Ae,Be,Oe,Je){var Tt=0;if(Be=G,typeof G=="function")NI(G)&&(Tt=1);else if(typeof G=="string")Tt=bh&&ai?_3(G,Ae,bl.current)?26:Wc(G)?27:5:bh?_3(G,Ae,bl.current)?26:5:ai&&Wc(G)?27:5;else e:switch(G){case b1:return G=o(31,Ae,V,Oe),G.elementType=b1,G.lanes=Je,G;case FI:return Ch(Ae.children,Oe,Je,V);case UC:Tt=8,Oe|=24;break;case S2:return G=o(12,Ae,V,Oe|2),G.elementType=S2,G.lanes=Je,G;case u3:return G=o(13,Ae,V,Oe),G.elementType=u3,G.lanes=Je,G;case Q2:return G=o(19,Ae,V,Oe),G.elementType=Q2,G.lanes=Je,G;default:if(typeof G=="object"&&G!==null)switch(G.$$typeof){case KC:case y_:Tt=10;break e;case l3:Tt=9;break e;case ap:Tt=11;break e;case Gd:Tt=14;break e;case Yd:Tt=16,Be=null;break e}Tt=29,Ae=Error(r(130,G===null?"null":typeof G,"")),Be=null}return V=o(Tt,Ae,V,Oe),V.elementType=G,V.type=Be,V.lanes=Je,V}function Ch(G,V,Ae,Be){return G=o(7,G,Be,V),G.lanes=Ae,G}function C_(G,V,Ae){return G=o(6,G,null,V),G.lanes=Ae,G}function yh(G,V,Ae){return V=o(4,G.children!==null?G.children:[],G.key,V),V.lanes=Ae,V.stateNode={containerInfo:G.containerInfo,pendingChildren:null,implementation:G.implementation},V}function Em(G,V,Ae,Be,Oe,Je,Tt,ln){this.tag=1,this.containerInfo=G,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=xh,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=E(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=E(0),this.hiddenUpdates=E(null),this.identifierPrefix=Be,this.onUncaughtError=Oe,this.onCaughtError=Je,this.onRecoverableError=Tt,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ln,this.incompleteTransitions=new Map}function z0(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o,Ai,Qi){return G=new Em(G,V,Ae,Tt,ln,wn,$o,Qi),V=1,Je===!0&&(V|=24),Je=o(3,null,null,V),G.current=Je,Je.stateNode=G,V=tt(),V.refCount++,G.pooledCache=V,V.refCount++,Je.memoizedState={element:Be,isDehydrated:Ae,cache:V},$n(Je),G}function TI(G){return G?(G=mg,G):mg}function Ef(G){var V=G._reactInternals;if(V===void 0)throw typeof G.render=="function"?Error(r(188)):(G=Object.keys(G).join(","),Error(r(268,G)));return G=A(V),G=G!==null?c(G):null,G===null?null:CA(G.stateNode)}function Q4(G,V,Ae,Be,Oe,Je){Oe=TI(Oe),Be.context===null?Be.context=Oe:Be.pendingContext=Oe,Be=Kt(V),Be.payload={element:Ae},Je=Je===void 0?null:Je,Je!==null&&(Be.callback=Je),Ae=rn(G,Be,V),Ae!==null&&(ug(Ae,G,V),Lt(Ae,G,V))}function B2(G,V){if(G=G.memoizedState,G!==null&&G.dehydrated!==null){var Ae=G.retryLane;G.retryLane=Ae!==0&&Ae<V?Ae:V}}function Lp(G,V){B2(G,V),(G=G.alternate)&&B2(G,V)}var ma={},b2=L3(),Hd=ane(),E1=Object.assign,kI=Symbol.for("react.element"),Od=Symbol.for("react.transitional.element"),B1=Symbol.for("react.portal"),FI=Symbol.for("react.fragment"),UC=Symbol.for("react.strict_mode"),S2=Symbol.for("react.profiler"),KC=Symbol.for("react.provider"),l3=Symbol.for("react.consumer"),y_=Symbol.for("react.context"),ap=Symbol.for("react.forward_ref"),u3=Symbol.for("react.suspense"),Q2=Symbol.for("react.suspense_list"),Gd=Symbol.for("react.memo"),Yd=Symbol.for("react.lazy"),b1=Symbol.for("react.activity"),v4=Symbol.for("react.memo_cache_sentinel"),Hp=Symbol.iterator,VC=Symbol.for("react.client.reference"),Bm=Array.isArray,Xr=b2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,v2=n.rendererVersion,Ts=n.rendererPackageName,S1=n.extraDevToolsConfig,CA=n.getPublicInstance,x0=n.getRootHostContext,zg=n.getChildHostContext,bm=n.prepareForCommit,Ss=n.resetAfterCommit,ic=n.createInstance;n.cloneMutableInstance;var Va=n.appendInitialChild,LI=n.finalizeInitialChildren,Lu=n.shouldSetTextContent,Jg=n.createTextInstance;n.cloneMutableTextInstance;var x_=n.scheduleTimeout,hg=n.cancelTimeout,xh=n.noTimeout,Ud=n.isPrimaryRenderer;n.warnsIfNotActing;var Ks=n.supportsMutation,E_=n.supportsPersistence,Eh=n.supportsHydration,B_=n.getInstanceFromNode;n.beforeActiveInstanceBlur;var w4=n.preparePortalMount;n.prepareScopeUpdate,n.getInstanceFromScope;var J0=n.setCurrentUpdatePriority,Sm=n.getCurrentUpdatePriority,w2=n.resolveUpdatePriority;n.trackSchedulerEvent,n.resolveEventType,n.resolveEventTimeStamp;var g3=n.shouldAttemptEagerTransition,Wg=n.detachDeletedInstance;n.requestPostPaintCallback;var r0=n.maySuspendCommit,P2=n.preloadInstance,zC=n.startSuspendingCommit,W0=n.suspendInstance;n.suspendOnActiveViewTransition;var M2=n.waitForCommitToBeReady,sl=n.NotPendingTransition,b_=n.HostTransitionContext,s0=n.resetFormInstance;n.bindToConsole;var JE=n.supportsMicrotasks,d3=n.scheduleMicrotask,JC=n.supportsTestSelectors,Bf=n.findFiberRoot,D2=n.getBoundingRect,WC=n.getTextContent,Qm=n.isHiddenSubtree,N2=n.matchAccessibilityRole,WE=n.setFocusIfFocusable,jE=n.setupIntersectionObserver,$E=n.appendChild,R2=n.appendChildToContainer,h3=n.commitTextUpdate,p3=n.commitMount,l9=n.commitUpdate,qE=n.insertBefore,P4=n.insertInContainerBefore,bf=n.removeChild,XE=n.removeChildFromContainer,T2=n.resetTextContent,k2=n.hideInstance,Ap=n.hideTextInstance,F2=n.unhideInstance,m3=n.unhideTextInstance;n.cancelViewTransitionName,n.cancelRootViewTransitionName,n.restoreRootViewTransitionName,n.cloneRootViewTransitionContainer,n.removeRootViewTransitionClone,n.measureClonedInstance,n.hasInstanceChanged,n.hasInstanceAffectedParent,n.startViewTransition,n.startGestureTransition,n.stopGestureTransition,n.getCurrentGestureOffset,n.subscribeToGestureDirection,n.createViewTransitionInstance;var HI=n.clearContainer;n.createFragmentInstance,n.updateFragmentInstanceFiber,n.commitNewChildToFragmentInstance,n.deleteChildFromFragmentInstance;var kc=n.cloneInstance,S_=n.createContainerChildSet,M4=n.appendChildToContainerChildSet,jC=n.finalizeContainerChildren,vm=n.replaceContainerChildren,ZE=n.cloneHiddenInstance,NA=n.cloneHiddenTextInstance,Sf=n.isSuspenseInstancePending,OI=n.isSuspenseInstanceFallback,Q1=n.getSuspenseInstanceFallbackErrorDetails,e5=n.registerSuspenseInstanceRetry,u9=n.canHydrateFormStateMarker,t5=n.isFormStateMarkerMatching,g9=n.getNextHydratableSibling,n5=n.getNextHydratableSiblingAfterSingleton,o5=n.getFirstHydratableChild,Qf=n.getFirstHydratableChildWithinContainer,Q_=n.getFirstHydratableChildWithinSuspenseInstance,d9=n.getFirstHydratableChildWithinSingleton,$C=n.canHydrateInstance,L2=n.canHydrateTextInstance,GI=n.canHydrateSuspenseInstance,Hu=n.hydrateInstance,wm=n.hydrateTextInstance,i5=n.hydrateSuspenseInstance,zr=n.getNextHydratableInstanceAfterSuspenseInstance,v1=n.commitHydratedContainer,D4=n.commitHydratedSuspenseInstance,Bh=n.clearSuspenseBoundary,H2=n.clearSuspenseBoundaryFromContainer,mu=n.shouldDeleteUnhydratedTailInstances;n.diffHydratedPropsForDevWarnings,n.diffHydratedTextForDevWarnings,n.describeHydratableInstanceForDevWarnings;var vf=n.validateHydratableInstance,YI=n.validateHydratableTextInstance,bh=n.supportsResources,_3=n.isHostHoistableType,cp=n.getHoistableRoot,Jc=n.getResource,r5=n.acquireResource,Gi=n.releaseResource,pg=n.hydrateHoistable,Pm=n.mountHoistable,Op=n.unmountHoistable,Sh=n.createHoistableInstance,Ys=n.prepareToCommitHoistables,w1=n.mayResourceSuspendCommit,a0=n.preloadResource,al=n.suspendResource,ai=n.supportsSingletons,v_=n.resolveSingletonInstance,Al=n.acquireSingletonInstance,P1=n.releaseSingletonInstance,Wc=n.isHostSingletonType,Gp=n.isSingletonScope,A0=[],Mm=-1,mg={},_g=Math.clz32?Math.clz32:m,O2=Math.log,G2=Math.LN2,RA=256,jg=4194304,qC=Hd.unstable_scheduleCallback,Kd=Hd.unstable_cancelCallback,h9=Hd.unstable_shouldYield,yc=Hd.unstable_requestPaint,cs=Hd.unstable_now,Jn=Hd.unstable_ImmediatePriority,c8=Hd.unstable_UserBlockingPriority,wf=Hd.unstable_NormalPriority,XC=Hd.unstable_IdlePriority,fg=Hd.log,Y2=Hd.unstable_setDisableYieldValue,_u=null,Ig=null,s5,f3,ZC=!1,I3=new WeakMap,Pf=[],UI=0,C3=null,KI=0,E0=[],jc=0,cl=null,Ou=1,B0="",bl=h(null),Vd=h(null),za=h(null),$g=h(null),Xa=null,Za=null,Vs=!1,fu=null,Si=!1,lp=Error(r(519)),c0=typeof Object.is=="function"?Object.is:he,$c=h(null),Qh=null,Kl=null,VI=typeof AbortController<"u"?AbortController:function(){var G=[],V=this.signal={aborted:!1,addEventListener:function(Ae,Be){G.push(Be)}};this.abort=function(){V.aborted=!0,G.forEach(function(Ae){return Ae()})}},p9=Hd.unstable_scheduleCallback,zI=Hd.unstable_NormalPriority,rc={$$typeof:y_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},b0=null,Mf=null,a5=!1,Cg=!1,Dm=!1,JI=0,ey=null,Nm=0,ll=0,WI=null,A5=Xr.S;Xr.S=function(G,V){typeof V=="object"&&V!==null&&typeof V.then=="function"&&pn(G,V),A5!==null&&A5(G,V)};var Yi=h(null),c5=Object.prototype.hasOwnProperty,Df=Error(r(460)),M1=Error(r(474)),ul=Error(r(542)),Iu={then:function(){}},yg=null,ss=[],D1=0,l5=0,Yp=!1,zd=!1,Gu=h(null),Nf=h(0),Fc=0,_a=null,fa=null,zs=null,Rm=!1,j0=!1,w_=!1,$0=0,N1=0,Up=null,GA=0,Kp={readContext:Ce,use:Fo,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useLayoutEffect:Nn,useInsertionEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useSyncExternalStore:Nn,useId:Nn,useHostTransitionStatus:Nn,useFormState:Nn,useActionState:Nn,useOptimistic:Nn,useMemoCache:Nn,useCacheRefresh:Nn},S0={readContext:Ce,use:Fo,useCallback:function(G,V){return Oo().memoizedState=[G,V===void 0?null:V],G},useContext:Ce,useEffect:Li,useImperativeHandle:function(G,V,Ae){Ae=Ae!=null?Ae.concat([G]):null,oa(4194308,4,vA.bind(null,V,G),Ae)},useLayoutEffect:function(G,V){return oa(4194308,4,G,V)},useInsertionEffect:function(G,V){oa(4,2,G,V)},useMemo:function(G,V){var Ae=Oo();V=V===void 0?null:V;var Be=G();if(w_){R(!0);try{G()}finally{R(!1)}}return Ae.memoizedState=[Be,V],Be},useReducer:function(G,V,Ae){var Be=Oo();if(Ae!==void 0){var Oe=Ae(V);if(w_){R(!0);try{Ae(V)}finally{R(!1)}}}else Oe=V;return Be.memoizedState=Be.baseState=Oe,G={pending:null,lanes:0,dispatch:null,lastRenderedReducer:G,lastRenderedState:Oe},Be.queue=G,G=G.dispatch=mh.bind(null,_a,G),[Be.memoizedState,G]},useRef:function(G){var V=Oo();return G={current:G},V.memoizedState=G},useState:function(G){G=Ht(G);var V=G.queue,Ae=mm.bind(null,_a,V);return V.dispatch=Ae,[G.memoizedState,Ae]},useDebugValue:H0,useDeferredValue:function(G,V){var Ae=Oo();return Bl(Ae,G,V)},useTransition:function(){var G=Ht(!1);return G=Nd.bind(null,_a,G.queue,!0,!1),Oo().memoizedState=G,[!1,G]},useSyncExternalStore:function(G,V,Ae){var Be=_a,Oe=Oo();if(Vs){if(Ae===void 0)throw Error(r(407));Ae=Ae()}else{if(Ae=V(),gA===null)throw Error(r(349));(Zr&124)!==0||ws(Be,V,Ae)}Oe.memoizedState=Ae;var Je={value:Ae,getSnapshot:V};return Oe.queue=Je,Li(Et.bind(null,Be,Je,G),[G]),Be.flags|=2048,wi(9,Br(),ds.bind(null,Be,Je,Ae,V),null),Ae},useId:function(){var G=Oo(),V=gA.identifierPrefix;if(Vs){var Ae=B0,Be=Ou;Ae=(Be&~(1<<32-_g(Be)-1)).toString(32)+Ae,V="«"+V+"R"+Ae,Ae=$0++,0<Ae&&(V+="H"+Ae.toString(32)),V+="»"}else Ae=GA++,V="«"+V+"r"+Ae.toString(32)+"»";return G.memoizedState=V},useHostTransitionStatus:Ul,useFormState:Io,useActionState:Io,useOptimistic:function(G){var V=Oo();V.memoizedState=V.baseState=G;var Ae={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return V.queue=Ae,V=Ag.bind(null,_a,!0,Ae),Ae.dispatch=V,[G,V]},useMemoCache:Nr,useCacheRefresh:function(){return Oo().memoizedState=Rd.bind(null,_a)}},u5={readContext:Ce,use:Fo,useCallback:ph,useContext:Ce,useEffect:ys,useImperativeHandle:Yl,useInsertionEffect:dr,useLayoutEffect:cA,useMemo:Xh,useReducer:ur,useRef:gr,useState:function(){return ur(Rs)},useDebugValue:H0,useDeferredValue:function(G,V){var Ae=ko();return fc(Ae,fa.memoizedState,G,V)},useTransition:function(){var G=ur(Rs)[0],V=ko().memoizedState;return[typeof G=="boolean"?G:mi(G),V]},useSyncExternalStore:Ar,useId:m_,useHostTransitionStatus:Ul,useFormState:gi,useActionState:gi,useOptimistic:function(G,V){var Ae=ko();return Qt(Ae,fa,G,V)},useMemoCache:Nr,useCacheRefresh:ag},jI={readContext:Ce,use:Fo,useCallback:ph,useContext:Ce,useEffect:ys,useImperativeHandle:Yl,useInsertionEffect:dr,useLayoutEffect:cA,useMemo:Xh,useReducer:bi,useRef:gr,useState:function(){return bi(Rs)},useDebugValue:H0,useDeferredValue:function(G,V){var Ae=ko();return fa===null?Bl(Ae,G,V):fc(Ae,fa.memoizedState,G,V)},useTransition:function(){var G=bi(Rs)[0],V=ko().memoizedState;return[typeof G=="boolean"?G:mi(G),V]},useSyncExternalStore:Ar,useId:m_,useHostTransitionStatus:Ul,useFormState:Ji,useActionState:Ji,useOptimistic:function(G,V){var Ae=ko();return fa!==null?Qt(Ae,fa,G,V):(Ae.baseState=G,[G,Ae.queue.dispatch])},useMemoCache:Nr,useCacheRefresh:ag},vh=null,R1=0,Cu=Vo(!0),N4=Vo(!1),Vp=h(null),Rf=null,xs=h(0),Lc={enqueueSetState:function(G,V,Ae){G=G._reactInternals;var Be=i0(),Oe=Kt(Be);Oe.payload=V,Ae!=null&&(Oe.callback=Ae),V=rn(G,Oe,Be),V!==null&&(ug(V,G,Be),Lt(V,G,Be))},enqueueReplaceState:function(G,V,Ae){G=G._reactInternals;var Be=i0(),Oe=Kt(Be);Oe.tag=1,Oe.payload=V,Ae!=null&&(Oe.callback=Ae),V=rn(G,Oe,Be),V!==null&&(ug(V,G,Be),Lt(V,G,Be))},enqueueForceUpdate:function(G,V){G=G._reactInternals;var Ae=i0(),Be=Kt(Ae);Be.tag=2,V!=null&&(Be.callback=V),V=rn(G,Be,Ae),V!==null&&(ug(V,G,Ae),Lt(V,G,Ae))}},Ha=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(V))return}else if(typeof e=="object"&&typeof e.emit=="function"){e.emit("uncaughtException",G);return}console.error(G)},Ja=Error(r(461)),Ps=!1,wh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},qg=!1,gl=!1,y3=!1,Tf=typeof WeakSet=="function"?WeakSet:Set,Pa=null,qc=null,Yu=!1,xc=null,xg=8192,$I={getCacheForType:function(G){var V=Ce(rc),Ae=V.data.get(G);return Ae===void 0&&(Ae=G(),V.data.set(G,Ae)),Ae}},T1=0,Xg=1,U2=2,K2=3,ty=4;if(typeof Symbol=="function"&&Symbol.for){var kf=Symbol.for;T1=kf("selector.component"),Xg=kf("selector.has_pseudo_class"),U2=kf("selector.role"),K2=kf("selector.test_id"),ty=kf("selector.text")}var qI=typeof WeakMap=="function"?WeakMap:Map,ls=0,gA=null,Us=null,Zr=0,os=0,l0=null,k1=!1,Ph=!1,XI=!1,dl=0,hl=0,Sl=0,Uu=0,zp=0,pl=0,Jp=0,P_=null,Vl=null,Mh=!1,ny=0,x3=1/0,F1=null,Wp=null,us=0,Jd=null,yu=null,Dh=0,V2=0,g5=null,oy=null,up=0,Ku=null;return ma.attemptContinuousHydration=function(G){if(G.tag===13){var V=yn(G,67108864);V!==null&&ug(V,G,67108864),Lp(G,67108864)}},ma.attemptHydrationAtCurrentPriority=function(G){if(G.tag===13){var V=i0();V=M(V);var Ae=yn(G,V);Ae!==null&&ug(Ae,G,V),Lp(G,V)}},ma.attemptSynchronousHydration=function(G){switch(G.tag){case 3:if(G=G.stateNode,G.current.memoizedState.isDehydrated){var V=_(G.pendingLanes);if(V!==0){for(G.pendingLanes|=2,G.entangledLanes|=2;V;){var Ae=1<<31-_g(V);G.entanglements[1]|=Ae,V&=~Ae}at(G),(ls&6)===0&&(x3=cs()+500,nt(0))}}break;case 13:V=yn(G,2),V!==null&&ug(V,G,2),gg(),Lp(G,2)}},ma.batchedUpdates=function(G,V){return G(V)},ma.createComponentSelector=function(G){return{$$typeof:T1,value:G}},ma.createContainer=function(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o){return z0(G,V,!1,null,Ae,Be,Je,Tt,ln,wn,$o,null)},ma.createHasPseudoClassSelector=function(G){return{$$typeof:Xg,value:G}},ma.createHydrationContainer=function(G,V,Ae,Be,Oe,Je,Tt,ln,wn,$o,Ai,Qi,Ni){return G=z0(Ae,Be,!0,G,Oe,Je,ln,wn,$o,Ai,Qi,Ni),G.context=TI(null),Ae=G.current,Be=i0(),Be=M(Be),Oe=Kt(Be),Oe.callback=V??null,rn(Ae,Oe,Be),V=Be,G.current.lanes=V,B(G,V),at(G),G},ma.createPortal=function(G,V,Ae){var Be=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B1,key:Be==null?null:""+Be,children:G,containerInfo:V,implementation:Ae}},ma.createRoleSelector=function(G){return{$$typeof:U2,value:G}},ma.createTestNameSelector=function(G){return{$$typeof:K2,value:G}},ma.createTextSelector=function(G){return{$$typeof:ty,value:G}},ma.defaultOnCaughtError=function(G){console.error(G)},ma.defaultOnRecoverableError=function(G){Ha(G)},ma.defaultOnUncaughtError=function(G){Ha(G)},ma.deferredUpdates=function(G){var V=Xr.T,Ae=Sm();try{return J0(32),Xr.T=null,G()}finally{J0(Ae),Xr.T=V}},ma.discreteUpdates=function(G,V,Ae,Be,Oe){var Je=Xr.T,Tt=Sm();try{return J0(2),Xr.T=null,G(V,Ae,Be,Oe)}finally{J0(Tt),Xr.T=Je,ls===0&&(x3=cs()+500)}},ma.findAllNodes=nc,ma.findBoundingRects=function(G,V){if(!JC)throw Error(r(363));V=nc(G,V),G=[];for(var Ae=0;Ae<V.length;Ae++)G.push(D2(V[Ae]));for(V=G.length-1;0<V;V--){Ae=G[V];for(var Be=Ae.x,Oe=Be+Ae.width,Je=Ae.y,Tt=Je+Ae.height,ln=V-1;0<=ln;ln--)if(V!==ln){var wn=G[ln],$o=wn.x,Ai=$o+wn.width,Qi=wn.y,Ni=Qi+wn.height;if(Be>=$o&&Je>=Qi&&Oe<=Ai&&Tt<=Ni){G.splice(V,1);break}else if(Be!==$o||Ae.width!==wn.width||Ni<Je||Qi>Tt){if(!(Je!==Qi||Ae.height!==wn.height||Ai<Be||$o>Oe)){$o>Be&&(wn.width+=$o-Be,wn.x=Be),Ai<Oe&&(wn.width=Oe-$o),G.splice(V,1);break}}else{Qi>Je&&(wn.height+=Qi-Je,wn.y=Je),Ni<Tt&&(wn.height=Tt-Qi),G.splice(V,1);break}}}return G},ma.findHostInstance=Ef,ma.findHostInstanceWithNoPortals=function(G){return G=A(G),G=G!==null?l(G):null,G===null?null:CA(G.stateNode)},ma.findHostInstanceWithWarning=function(G){return Ef(G)},ma.flushPassiveEffects=sp,ma.flushSyncFromReconciler=function(G){var V=ls;ls|=1;var Ae=Xr.T,Be=Sm();try{if(J0(2),Xr.T=null,G)return G()}finally{J0(Be),Xr.T=Ae,ls=V,(ls&6)===0&&nt(0)}},ma.flushSyncWork=gg,ma.focusWithin=function(G,V){if(!JC)throw Error(r(363));for(G=bs(G),V=vI(G,V),V=Array.from(V),G=0;G<V.length;){var Ae=V[G++],Be=Ae.tag;if(!Qm(Ae)){if((Be===5||Be===26||Be===27)&&WE(Ae.stateNode))return!0;for(Ae=Ae.child;Ae!==null;)V.push(Ae),Ae=Ae.sibling}}return!1},ma.getFindAllNodesFailureDescription=function(G,V){if(!JC)throw Error(r(363));var Ae=0,Be=[];G=[bs(G),0];for(var Oe=0;Oe<G.length;){var Je=G[Oe++],Tt=Je.tag,ln=G[Oe++],wn=V[ln];if((Tt!==5&&Tt!==26&&Tt!==27||!Qm(Je))&&(Zo(Je,wn)&&(Be.push(ip(wn)),ln++,ln>Ae&&(Ae=ln)),ln<V.length))for(Je=Je.child;Je!==null;)G.push(Je,ln),Je=Je.sibling}if(Ae<V.length){for(G=[];Ae<V.length;Ae++)G.push(ip(V[Ae]));return`findAllNodes was able to match part of the selector:
  `+(Be.join(" > ")+`

No matching component was found for:
  `)+G.join(" > ")}return null},ma.getPublicRootInstance=function(G){if(G=G.current,!G.child)return null;switch(G.child.tag){case 27:case 5:return CA(G.child.stateNode);default:return G.child.stateNode}},ma.injectIntoDevTools=function(){var G={bundleType:0,version:v2,rendererPackageName:Ts,currentDispatcherRef:Xr,reconcilerVersion:"19.1.0"};if(S1!==null&&(G.rendererConfig=S1),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")G=!1;else{var V=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(V.isDisabled||!V.supportsFiber)G=!0;else{try{_u=V.inject(G),Ig=V}catch{}G=!!V.checkDCE}}return G},ma.isAlreadyRendering=function(){return(ls&6)!==0},ma.observeVisibleRects=function(G,V,Ae,Be){if(!JC)throw Error(r(363));G=nc(G,V);var Oe=jE(G,Ae,Be).disconnect;return{disconnect:function(){Oe()}}},ma.shouldError=function(){return null},ma.shouldSuspend=function(){return!1},ma.startHostTransition=function(G,V,Ae,Be){if(G.tag!==5)throw Error(r(476));var Oe=il(G).queue;Nd(G,Oe,V,sl,Ae===null?i:function(){var Je=il(G).next.queue;return gu(G,Je,{},i0()),Ae(Be)})},ma.updateContainer=function(G,V,Ae,Be){var Oe=V.current,Je=i0();return Q4(Oe,Je,G,V,Ae,Be),Je},ma.updateContainerSync=function(G,V,Ae,Be){return Q4(V.current,2,G,V,Ae,Be),2},ma},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0})})($Be)),$Be.exports}var qBe={exports:{}},Apt;function iJn(){return Apt||(Apt=1,(function(t){var e={env:{},version:""};e.env.NODE_ENV!=="production"&&(t.exports=function(n){function o(P,T){for(P=P.memoizedState;P!==null&&0<T;)P=P.next,T--;return P}function i(P,T,q,de){if(q>=T.length)return de;var Se=T[q],Ne=cs(P)?P.slice():al({},P);return Ne[Se]=i(P[Se],T,q+1,de),Ne}function r(P,T,q){if(T.length!==q.length)console.warn("copyWithRename() expects paths of the same length");else{for(var de=0;de<q.length-1;de++)if(T[de]!==q[de]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return s(P,T,q,0)}}function s(P,T,q,de){var Se=T[de],Ne=cs(P)?P.slice():al({},P);return de+1===T.length?(Ne[q[de]]=Ne[Se],cs(Ne)?Ne.splice(Se,1):delete Ne[Se]):Ne[Se]=s(P[Se],T,q,de+1),Ne}function a(P,T,q){var de=T[q],Se=cs(P)?P.slice():al({},P);return q+1===T.length?(cs(Se)?Se.splice(de,1):delete Se[de],Se):(Se[de]=a(P[de],T,q+1),Se)}function A(){return!1}function c(){return null}function l(P,T,q,de){return new i5(P,T,q,de)}function u(P,T){P.context===zp&&(r5(T,P,null,null),D2())}function g(P,T){if(bg!==null){var q=T.staleFamilies;T=T.updatedFamilies,jC(),wm(P.current,T,q),D2()}}function h(P){bg=P}function d(){}function p(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function m(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function _(){}function f(P){var T=[];return P.forEach(function(q){T.push(q)}),T.sort().join(", ")}function I(P){var T=P,q=P;if(P.alternate)for(;T.return;)T=T.return;else{P=T;do T=P,(T.flags&4098)!==0&&(q=T.return),P=T.return;while(P)}return T.tag===3?q:null}function C(P){if(I(P)!==P)throw Error("Unable to find node on an unmounted component.")}function y(P){var T=P.alternate;if(!T){if(T=I(P),T===null)throw Error("Unable to find node on an unmounted component.");return T!==P?null:P}for(var q=P,de=T;;){var Se=q.return;if(Se===null)break;var Ne=Se.alternate;if(Ne===null){if(de=Se.return,de!==null){q=de;continue}break}if(Se.child===Ne.child){for(Ne=Se.child;Ne;){if(Ne===q)return C(Se),P;if(Ne===de)return C(Se),T;Ne=Ne.sibling}throw Error("Unable to find node on an unmounted component.")}if(q.return!==de.return)q=Se,de=Ne;else{for(var ut=!1,Ft=Se.child;Ft;){if(Ft===q){ut=!0,q=Se,de=Ne;break}if(Ft===de){ut=!0,de=Se,q=Ne;break}Ft=Ft.sibling}if(!ut){for(Ft=Ne.child;Ft;){if(Ft===q){ut=!0,q=Ne,de=Se;break}if(Ft===de){ut=!0,de=Ne,q=Se;break}Ft=Ft.sibling}if(!ut)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(q.alternate!==de)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(q.tag!==3)throw Error("Unable to find node on an unmounted component.");return q.stateNode.current===q?P:T}function x(P){return P=y(P),P!==null?E(P):null}function E(P){var T=P.tag;if(T===5||T===26||T===27||T===6)return P;for(P=P.child;P!==null;){if(T=E(P),T!==null)return T;P=P.sibling}return null}function B(P){var T=P.tag;if(T===5||T===26||T===27||T===6)return P;for(P=P.child;P!==null;){if(P.tag!==4&&(T=B(P),T!==null))return T;P=P.sibling}return null}function S(P){return P===null||typeof P!="object"?null:(P=h9&&P[h9]||P["@@iterator"],typeof P=="function"?P:null)}function Q(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===yc?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case P1:return"Fragment";case Gp:return"Profiler";case Wc:return"StrictMode";case O2:return"Suspense";case G2:return"SuspenseList";case qC:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case Al:return"Portal";case mg:return(P.displayName||"Context")+".Provider";case Mm:return(P._context.displayName||"Context")+".Consumer";case _g:var T=P.render;return P=P.displayName,P||(P=T.displayName||T.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case RA:return T=P.displayName||null,T!==null?T:Q(P.type)||"Memo";case jg:T=P._payload,P=P._init;try{return Q(P(T))}catch{}}return null}function w(P){var T=P.type;switch(P.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(T._context.displayName||"Context")+".Consumer";case 10:return(T.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return P=T.render,P=P.displayName||P.name||"",T.displayName||(P!==""?"ForwardRef("+P+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return T;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Q(T);case 8:return T===Wc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;break;case 29:if(T=P._debugInfo,T!=null){for(var q=T.length-1;0<=q;q--)if(typeof T[q].name=="string")return T[q].name}if(P.return!==null)return w(P.return)}return null}function M(P){return{current:P}}function k(P,T){0>Uu?console.error("Unexpected pop."):(T!==Sl[Uu]&&console.error("Unexpected Fiber popped."),P.current=hl[Uu],hl[Uu]=null,Sl[Uu]=null,Uu--)}function R(P,T,q){Uu++,hl[Uu]=P.current,Sl[Uu]=q,P.current=T}function F(P){return P>>>=0,P===0?32:31-(Jp(P)/P_|0)|0}function O(P){if(P&1)return"SyncHydrationLane";if(P&2)return"Sync";if(P&4)return"InputContinuousHydration";if(P&8)return"InputContinuous";if(P&16)return"DefaultHydration";if(P&32)return"Default";if(P&128)return"TransitionHydration";if(P&4194048)return"Transition";if(P&62914560)return"Retry";if(P&67108864)return"SelectiveHydration";if(P&134217728)return"IdleHydration";if(P&268435456)return"Idle";if(P&536870912)return"Offscreen";if(P&1073741824)return"Deferred"}function U(P){var T=P&42;if(T!==0)return T;switch(P&-P){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return P&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return P&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),P}}function Y(P,T,q){var de=P.pendingLanes;if(de===0)return 0;var Se=0,Ne=P.suspendedLanes,ut=P.pingedLanes;P=P.warmLanes;var Ft=de&134217727;return Ft!==0?(de=Ft&~Ne,de!==0?Se=U(de):(ut&=Ft,ut!==0?Se=U(ut):q||(q=Ft&~P,q!==0&&(Se=U(q))))):(Ft=de&~Ne,Ft!==0?Se=U(Ft):ut!==0?Se=U(ut):q||(q=de&~P,q!==0&&(Se=U(q)))),Se===0?0:T!==0&&T!==Se&&(T&Ne)===0&&(Ne=Se&-Se,q=T&-T,Ne>=q||Ne===32&&(q&4194048)!==0)?T:Se}function W(P,T){return(P.pendingLanes&~(P.suspendedLanes&~P.pingedLanes)&T)===0}function te(P,T){switch(P){case 1:case 2:case 4:case 8:case 64:return T+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return T+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function j(){var P=Vl;return Vl<<=1,(Vl&4194048)===0&&(Vl=256),P}function J(){var P=Mh;return Mh<<=1,(Mh&62914560)===0&&(Mh=4194304),P}function oe(P){for(var T=[],q=0;31>q;q++)T.push(P);return T}function ie(P,T){P.pendingLanes|=T,T!==268435456&&(P.suspendedLanes=0,P.pingedLanes=0,P.warmLanes=0)}function ne(P,T,q,de,Se,Ne){var ut=P.pendingLanes;P.pendingLanes=q,P.suspendedLanes=0,P.pingedLanes=0,P.warmLanes=0,P.expiredLanes&=q,P.entangledLanes&=q,P.errorRecoveryDisabledLanes&=q,P.shellSuspendCounter=0;var Ft=P.entanglements,Tn=P.expirationTimes,_o=P.hiddenUpdates;for(q=ut&~q;0<q;){var di=31-pl(q),li=1<<di;Ft[di]=0,Tn[di]=-1;var vi=_o[di];if(vi!==null)for(_o[di]=null,di=0;di<vi.length;di++){var Ws=vi[di];Ws!==null&&(Ws.lane&=-536870913)}q&=~li}de!==0&&le(P,de,0),Ne!==0&&Se===0&&P.tag!==0&&(P.suspendedLanes|=Ne&~(ut&~T))}function le(P,T,q){P.pendingLanes|=T,P.suspendedLanes&=~T;var de=31-pl(T);P.entangledLanes|=T,P.entanglements[de]=P.entanglements[de]|1073741824|q&4194090}function ge(P,T){var q=P.entangledLanes|=T;for(P=P.entanglements;q;){var de=31-pl(q),Se=1<<de;Se&T|P[de]&T&&(P[de]|=T),q&=~Se}}function _e(P){switch(P){case 2:P=1;break;case 8:P=4;break;case 32:P=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:P=128;break;case 268435456:P=134217728;break;default:P=0}return P}function ue(P,T,q){if(Ae)for(P=P.pendingUpdatersLaneMap;0<q;){var de=31-pl(q),Se=1<<de;P[de].add(T),q&=~Se}}function fe(P,T){if(Ae)for(var q=P.pendingUpdatersLaneMap,de=P.memoizedUpdaters;0<T;){var Se=31-pl(T);P=1<<Se,Se=q[Se],0<Se.size&&(Se.forEach(function(Ne){var ut=Ne.alternate;ut!==null&&de.has(ut)||de.add(Ne)}),Se.clear()),T&=~P}}function pe(P){return P&=-P,2<P?8<P?(P&134217727)!==0?32:268435456:8:2}function ye(P){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var T=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(T.isDisabled)return!0;if(!T.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{up=T.inject(P),Ku=T}catch(q){console.error("React instrumentation encountered an error: %s.",q)}return!!T.checkDCE}function Me(P){if(typeof g5=="function"&&oy(P),Ku&&typeof Ku.setStrictMode=="function")try{Ku.setStrictMode(up,P)}catch(T){V||(V=!0,console.error("React instrumentation encountered an error: %s",T))}}function ve(P){G=P}function he(){G!==null&&typeof G.markCommitStopped=="function"&&G.markCommitStopped()}function Qe(P){G!==null&&typeof G.markComponentRenderStarted=="function"&&G.markComponentRenderStarted(P)}function Pe(){G!==null&&typeof G.markComponentRenderStopped=="function"&&G.markComponentRenderStopped()}function we(P){G!==null&&typeof G.markRenderStarted=="function"&&G.markRenderStarted(P)}function Te(){G!==null&&typeof G.markRenderStopped=="function"&&G.markRenderStopped()}function Re(P,T){G!==null&&typeof G.markStateUpdateScheduled=="function"&&G.markStateUpdateScheduled(P,T)}function Ee(){}function ke(){if(Be===0){Oe=console.log,Je=console.info,Tt=console.warn,ln=console.error,wn=console.group,$o=console.groupCollapsed,Ai=console.groupEnd;var P={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}Be++}function Ce(){if(Be--,Be===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:al({},P,{value:Oe}),info:al({},P,{value:Je}),warn:al({},P,{value:Tt}),error:al({},P,{value:ln}),group:al({},P,{value:wn}),groupCollapsed:al({},P,{value:$o}),groupEnd:al({},P,{value:Ai})})}0>Be&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Le(P){if(Qi===void 0)try{throw Error()}catch(q){var T=q.stack.trim().match(/\n( *(at )?)/);Qi=T&&T[1]||"",Ni=-1<q.stack.indexOf(`
    at`)?" (<anonymous>)":-1<q.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Qi+P+Ni}function Ye(P,T){if(!P||Xs)return"";var q=jp.get(P);if(q!==void 0)return q;Xs=!0,q=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var de=null;de=Jn.H,Jn.H=null,ke();try{var Se={DetermineComponentFrameRoot:function(){try{if(T){var vi=function(){throw Error()};if(Object.defineProperty(vi.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(vi,[])}catch(ya){var Ws=ya}Reflect.construct(P,[],vi)}else{try{vi.call()}catch(ya){Ws=ya}P.call(vi.prototype)}}else{try{throw Error()}catch(ya){Ws=ya}(vi=P())&&typeof vi.catch=="function"&&vi.catch(function(){})}}catch(ya){if(ya&&Ws&&typeof ya.stack=="string")return[ya.stack,Ws.stack]}return[null,null]}};Se.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Ne=Object.getOwnPropertyDescriptor(Se.DetermineComponentFrameRoot,"name");Ne&&Ne.configurable&&Object.defineProperty(Se.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var ut=Se.DetermineComponentFrameRoot(),Ft=ut[0],Tn=ut[1];if(Ft&&Tn){var _o=Ft.split(`
`),di=Tn.split(`
`);for(ut=Ne=0;Ne<_o.length&&!_o[Ne].includes("DetermineComponentFrameRoot");)Ne++;for(;ut<di.length&&!di[ut].includes("DetermineComponentFrameRoot");)ut++;if(Ne===_o.length||ut===di.length)for(Ne=_o.length-1,ut=di.length-1;1<=Ne&&0<=ut&&_o[Ne]!==di[ut];)ut--;for(;1<=Ne&&0<=ut;Ne--,ut--)if(_o[Ne]!==di[ut]){if(Ne!==1||ut!==1)do if(Ne--,ut--,0>ut||_o[Ne]!==di[ut]){var li=`
`+_o[Ne].replace(" at new "," at ");return P.displayName&&li.includes("<anonymous>")&&(li=li.replace("<anonymous>",P.displayName)),typeof P=="function"&&jp.set(P,li),li}while(1<=Ne&&0<=ut);break}}}finally{Xs=!1,Jn.H=de,Ce(),Error.prepareStackTrace=q}return _o=(_o=P?P.displayName||P.name:"")?Le(_o):"",typeof P=="function"&&jp.set(P,_o),_o}function tt(P){var T=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,P=P.stack,Error.prepareStackTrace=T,P.startsWith(`Error: react-stack-top-frame
`)&&(P=P.slice(29)),T=P.indexOf(`
`),T!==-1&&(P=P.slice(T+1)),T=P.indexOf("react-stack-bottom-frame"),T!==-1&&(T=P.lastIndexOf(`
`,T)),T!==-1)P=P.slice(0,T);else return"";return P}function At(P){switch(P.tag){case 26:case 27:case 5:return Le(P.type);case 16:return Le("Lazy");case 13:return Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Ye(P.type,!1);case 11:return Ye(P.type.render,!1);case 1:return Ye(P.type,!0);case 31:return Le("Activity");default:return""}}function at(P){try{var T="";do{T+=At(P);var q=P._debugInfo;if(q)for(var de=q.length-1;0<=de;de--){var Se=q[de];if(typeof Se.name=="string"){var Ne=T,ut=Se.env,Ft=Le(Se.name+(ut?" ["+ut+"]":""));T=Ne+Ft}}P=P.return}while(P);return T}catch(Tn){return`
Error generating stack: `+Tn.message+`
`+Tn.stack}}function nt(P){return(P=P?P.displayName||P.name:"")?Le(P):""}function gt(P,T){if(typeof P=="object"&&P!==null){var q=L1.get(P);return q!==void 0?q:(T={value:P,source:T,stack:at(T)},L1.set(P,T),T)}return{value:P,source:T,stack:at(T)}}function bt(P,T){it(),Eg[Yn++]=to,Eg[Yn++]=Qn,Qn=P,to=T}function Ct(P,T,q){it(),zo[Bi++]=Or,zo[Bi++]=Js,zo[Bi++]=eA,eA=P;var de=Or;P=Js;var Se=32-pl(de)-1;de&=~(1<<Se),q+=1;var Ne=32-pl(T)+Se;if(30<Ne){var ut=Se-Se%5;Ne=(de&(1<<ut)-1).toString(32),de>>=ut,Se-=ut,Or=1<<32-pl(T)+Se|q<<Se|de,Js=Ne+P}else Or=1<<Ne|q<<Se|de,Js=P}function Dt(P){it(),P.return!==null&&(bt(P,1),Ct(P,1,0))}function kt(P){for(;P===Qn;)Qn=Eg[--Yn],Eg[Yn]=null,to=Eg[--Yn],Eg[Yn]=null;for(;P===eA;)eA=zo[--Bi],zo[Bi]=null,Js=zo[--Bi],zo[Bi]=null,Or=zo[--Bi],zo[Bi]=null}function it(){ja||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Yt(P){return P===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),P}function pn(P,T){R(Bg,T,P),R(Wa,P,P),R(Qs,null,P),T=Y2(T),k(Qs,P),R(Qs,T,P)}function be(P){k(Qs,P),k(Wa,P),k(Bg,P)}function et(){return Yt(Qs.current)}function It(P){P.memoizedState!==null&&R(d5,P,P);var T=Yt(Qs.current),q=_u(T,P.type);T!==q&&(R(Wa,P,P),R(Qs,q,P))}function Bt(P){Wa.current===P&&(k(Qs,P),k(Wa,P)),d5.current===P&&(k(d5,P),jc?Kl._currentValue=Qh:Kl._currentValue2=Qh)}function mt(P,T){return P.serverProps===void 0&&P.serverTail.length===0&&P.children.length===1&&3<P.distanceFromLeaf&&P.distanceFromLeaf>15-T?mt(P.children[0],T):P}function st(P){return"  "+"  ".repeat(P)}function xt(P){return"+ "+"  ".repeat(P)}function Xe(P){return"- "+"  ".repeat(P)}function Ze(P){switch(P.tag){case 26:case 27:case 5:return P.type;case 16:return"Lazy";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return P=P.type,P.displayName||P.name||null;case 11:return P=P.type.render,P.displayName||P.name||null;case 1:return P=P.type,P.displayName||P.name||null;default:return null}}function dt(P,T){return E3.test(P)?(P=JSON.stringify(P),P.length>T-2?8>T?'{"..."}':"{"+P.slice(0,T-7)+'..."}':"{"+P+"}"):P.length>T?5>T?'{"..."}':P.slice(0,T-3)+"...":P}function Ut(P,T,q){var de=120-2*q;if(T===null)return xt(q)+dt(P,de)+`
`;if(typeof T=="string"){for(var Se=0;Se<T.length&&Se<P.length&&T.charCodeAt(Se)===P.charCodeAt(Se);Se++);return Se>de-8&&10<Se&&(P="..."+P.slice(Se-8),T="..."+T.slice(Se-8)),xt(q)+dt(P,de)+`
`+Xe(q)+dt(T,de)+`
`}return st(q)+dt(P,de)+`
`}function Wt(P){return Object.prototype.toString.call(P).replace(/^\[object (.*)\]$/,function(T,q){return q})}function Xt(P,T){switch(typeof P){case"string":return P=JSON.stringify(P),P.length>T?5>T?'"..."':P.slice(0,T-4)+'..."':P;case"object":if(P===null)return"null";if(cs(P))return"[...]";if(P.$$typeof===v_)return(T=Q(P.type))?"<"+T+">":"<...>";var q=Wt(P);if(q==="Object"){q="",T-=2;for(var de in P)if(P.hasOwnProperty(de)){var Se=JSON.stringify(de);if(Se!=='"'+de+'"'&&(de=Se),T-=de.length-2,Se=Xt(P[de],15>T?T:15),T-=Se.length,0>T){q+=q===""?"...":", ...";break}q+=(q===""?"":",")+de+":"+Se}return"{"+q+"}"}return q;case"function":return(T=P.displayName||P.name)?"function "+T:"function";default:return String(P)}}function Jt(P,T){return typeof P!="string"||E3.test(P)?"{"+Xt(P,T-2)+"}":P.length>T-2?5>T?'"..."':'"'+P.slice(0,T-5)+'..."':'"'+P+'"'}function yn(P,T,q){var de=120-q.length-P.length,Se=[],Ne;for(Ne in T)if(T.hasOwnProperty(Ne)&&Ne!=="children"){var ut=Jt(T[Ne],120-q.length-Ne.length-1);de-=Ne.length+ut.length+2,Se.push(Ne+"="+ut)}return Se.length===0?q+"<"+P+`>
`:0<de?q+"<"+P+" "+Se.join(" ")+`>
`:q+"<"+P+`
`+q+"  "+Se.join(`
`+q+"  ")+`
`+q+`>
`}function An(P,T,q){var de="",Se=al({},T),Ne;for(Ne in P)if(P.hasOwnProperty(Ne)){delete Se[Ne];var ut=120-2*q-Ne.length-2,Ft=Xt(P[Ne],ut);T.hasOwnProperty(Ne)?(ut=Xt(T[Ne],ut),de+=xt(q)+Ne+": "+Ft+`
`,de+=Xe(q)+Ne+": "+ut+`
`):de+=xt(q)+Ne+": "+Ft+`
`}for(var Tn in Se)Se.hasOwnProperty(Tn)&&(P=Xt(Se[Tn],120-2*q-Tn.length-2),de+=Xe(q)+Tn+": "+P+`
`);return de}function kn(P,T,q,de){var Se="",Ne=new Map;for(_o in q)q.hasOwnProperty(_o)&&Ne.set(_o.toLowerCase(),_o);if(Ne.size===1&&Ne.has("children"))Se+=yn(P,T,st(de));else{for(var ut in T)if(T.hasOwnProperty(ut)&&ut!=="children"){var Ft=120-2*(de+1)-ut.length-1,Tn=Ne.get(ut.toLowerCase());if(Tn!==void 0){Ne.delete(ut.toLowerCase());var _o=T[ut];Tn=q[Tn];var di=Jt(_o,Ft);Ft=Jt(Tn,Ft),typeof _o=="object"&&_o!==null&&typeof Tn=="object"&&Tn!==null&&Wt(_o)==="Object"&&Wt(Tn)==="Object"&&(2<Object.keys(_o).length||2<Object.keys(Tn).length||-1<di.indexOf("...")||-1<Ft.indexOf("..."))?Se+=st(de+1)+ut+`={{
`+An(_o,Tn,de+2)+st(de+1)+`}}
`:(Se+=xt(de+1)+ut+"="+di+`
`,Se+=Xe(de+1)+ut+"="+Ft+`
`)}else Se+=st(de+1)+ut+"="+Jt(T[ut],Ft)+`
`}Ne.forEach(function(li){if(li!=="children"){var vi=120-2*(de+1)-li.length-1;Se+=Xe(de+1)+li+"="+Jt(q[li],vi)+`
`}}),Se=Se===""?st(de)+"<"+P+`>
`:st(de)+"<"+P+`
`+Se+st(de)+`>
`}return P=q.children,T=T.children,typeof P=="string"||typeof P=="number"||typeof P=="bigint"?(Ne="",(typeof T=="string"||typeof T=="number"||typeof T=="bigint")&&(Ne=""+T),Se+=Ut(Ne,""+P,de+1)):(typeof T=="string"||typeof T=="number"||typeof T=="bigint")&&(Se=P==null?Se+Ut(""+T,null,de+1):Se+Ut(""+T,void 0,de+1)),Se}function $n(P,T){var q=Ze(P);if(q===null){for(q="",P=P.child;P;)q+=$n(P,T),P=P.sibling;return q}return st(T)+"<"+q+`>
`}function ht(P,T){var q=mt(P,T);if(q!==P&&(P.children.length!==1||P.children[0]!==q))return st(T)+`...
`+ht(q,T+1);q="";var de=P.fiber._debugInfo;if(de)for(var Se=0;Se<de.length;Se++){var Ne=de[Se].name;typeof Ne=="string"&&(q+=st(T)+"<"+Ne+`>
`,T++)}if(de="",Se=P.fiber.pendingProps,P.fiber.tag===6)de=Ut(Se,P.serverProps,T),T++;else if(Ne=Ze(P.fiber),Ne!==null)if(P.serverProps===void 0){de=T;var ut=120-2*de-Ne.length-2,Ft="";for(_o in Se)if(Se.hasOwnProperty(_o)&&_o!=="children"){var Tn=Jt(Se[_o],15);if(ut-=_o.length+Tn.length+2,0>ut){Ft+=" ...";break}Ft+=" "+_o+"="+Tn}de=st(de)+"<"+Ne+Ft+`>
`,T++}else P.serverProps===null?(de=yn(Ne,Se,xt(T)),T++):typeof P.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(de=kn(Ne,Se,P.serverProps,T),T++);var _o="";for(Se=P.fiber.child,Ne=0;Se&&Ne<P.children.length;)ut=P.children[Ne],ut.fiber===Se?(_o+=ht(ut,T),Ne++):_o+=$n(Se,T),Se=Se.sibling;for(Se&&0<P.children.length&&(_o+=st(T)+`...
`),Se=P.serverTail,P.serverProps===null&&T--,P=0;P<Se.length;P++)Ne=Se[P],_o=typeof Ne=="string"?_o+(Xe(T)+dt(Ne,120-2*T)+`
`):_o+yn(Ne.type,Ne.props,Xe(T));return q+de+_o}function Kt(P){try{return`

`+ht(P,0)}catch{return""}}function rn(){if(H1===null)return"";var P=H1;try{var T="";switch(P.tag===6&&(P=P.return),P.tag){case 26:case 27:case 5:T+=Le(P.type);break;case 13:T+=Le("Suspense");break;case 19:T+=Le("SuspenseList");break;case 31:T+=Le("Activity");break;case 30:case 0:case 15:case 1:P._debugOwner||T!==""||(T+=nt(P.type));break;case 11:P._debugOwner||T!==""||(T+=nt(P.type.render))}for(;P;)if(typeof P.tag=="number"){var q=P;P=q._debugOwner;var de=q._debugStack;P&&de&&(typeof de!="string"&&(q._debugStack=de=tt(de)),de!==""&&(T+=`
`+de))}else if(P.debugStack!=null){var Se=P.debugStack;(P=P.owner)&&Se&&(T+=`
`+tt(Se))}else break;var Ne=T}catch(ut){Ne=`
Error generating stack: `+ut.message+`
`+ut.stack}return Ne}function Lt(P,T,q,de,Se,Ne,ut){var Ft=H1;Ho(P);try{return P!==null&&P._debugTask?P._debugTask.run(T.bind(null,q,de,Se,Ne,ut)):T(q,de,Se,Ne,ut)}finally{Ho(Ft)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function Ho(P){Jn.getCurrentStack=P===null?null:rn,M_=!1,H1=P}function Ao(P,T){if(P.return===null){if(ms===null)ms={fiber:P,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:T};else{if(ms.fiber!==P)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ms.distanceFromLeaf>T&&(ms.distanceFromLeaf=T)}return ms}var q=Ao(P.return,T+1).children;return 0<q.length&&q[q.length-1].fiber===P?(q=q[q.length-1],q.distanceFromLeaf>T&&(q.distanceFromLeaf=T),q):(T={fiber:P,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:T},q.push(T),T)}function qe(P,T){z2||(P=Ao(P,0),P.serverProps=null,T!==null&&(T=Pa(T),P.serverTail.push(T)))}function vt(P){var T="",q=ms;throw q!==null&&(ms=null,T=Kt(q)),ei(gt(Error(`Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:

- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.

It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.

https://react.dev/link/hydration-mismatch`+T),P)),ZI}function qt(P,T){if(!B0)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");Rf(P.stateNode,P.type,P.memoizedProps,T,P)||vt(P)}function Zt(P){for(gp=P.return;gp;)switch(gp.tag){case 5:case 13:Wd=!1;return;case 27:case 3:Wd=!0;return;default:gp=gp.return}}function nn(P){if(!B0||P!==gp)return!1;if(!ja)return Zt(P),ja=!0,!1;var T=P.tag;if(os?T!==3&&T!==27&&(T!==5||gl(P.type)&&!Pf(P.type,P.memoizedProps))&&Ma&&(zn(P),vt(P)):T!==3&&(T!==5||gl(P.type)&&!Pf(P.type,P.memoizedProps))&&Ma&&(zn(P),vt(P)),Zt(P),T===13){if(!B0)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(P=P.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Ma=Ha(P)}else Ma=os&&T===27?S0(P.type,Ma):gp?Kp(P.stateNode):null;return!0}function zn(P){for(var T=Ma;T;){var q=Ao(P,0),de=Pa(T);q.serverTail.push(de),T=de.type==="Suspense"?Ha(T):Kp(T)}}function Nn(){B0&&(Ma=gp=null,z2=ja=!1)}function Co(){var P=Ff;return P!==null&&(J1===null?J1=P:J1.push.apply(J1,P),Ff=null),P}function ei(P){Ff===null?Ff=[P]:Ff.push(P)}function ro(){var P=ms;if(P!==null){ms=null;for(var T=Kt(P);0<P.children.length;)P=P.children[0];Lt(P.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:

- A server/client branch \`if (typeof window !== 'undefined')\`.
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.

It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.

%s%s`,"https://react.dev/link/hydration-mismatch",T)})}}function To(P,T){return P===T&&(P!==0||1/P===1/T)||P!==P&&T!==T}function yo(){eC=dp=null,J2=!1}function Ro(P,T,q){jc?(R(Lf,T._currentValue,P),T._currentValue=q,R(B3,T._currentRenderer,P),T._currentRenderer!==void 0&&T._currentRenderer!==null&&T._currentRenderer!==b3&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),T._currentRenderer=b3):(R(Lf,T._currentValue2,P),T._currentValue2=q,R(iy,T._currentRenderer2,P),T._currentRenderer2!==void 0&&T._currentRenderer2!==null&&T._currentRenderer2!==b3&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),T._currentRenderer2=b3)}function On(P,T){var q=Lf.current;jc?(P._currentValue=q,q=B3.current,k(B3,T),P._currentRenderer=q):(P._currentValue2=q,q=iy.current,k(iy,T),P._currentRenderer2=q),k(Lf,T)}function uo(P,T,q){for(;P!==null;){var de=P.alternate;if((P.childLanes&T)!==T?(P.childLanes|=T,de!==null&&(de.childLanes|=T)):de!==null&&(de.childLanes&T)!==T&&(de.childLanes|=T),P===q)break;P=P.return}P!==q&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Oo(P,T,q,de){var Se=P.child;for(Se!==null&&(Se.return=P);Se!==null;){var Ne=Se.dependencies;if(Ne!==null){var ut=Se.child;Ne=Ne.firstContext;e:for(;Ne!==null;){var Ft=Ne;Ne=Se;for(var Tn=0;Tn<T.length;Tn++)if(Ft.context===T[Tn]){Ne.lanes|=q,Ft=Ne.alternate,Ft!==null&&(Ft.lanes|=q),uo(Ne.return,q,P),de||(ut=null);break e}Ne=Ft.next}}else if(Se.tag===18){if(ut=Se.return,ut===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");ut.lanes|=q,Ne=ut.alternate,Ne!==null&&(Ne.lanes|=q),uo(ut,q,P),ut=null}else ut=Se.child;if(ut!==null)ut.return=Se;else for(ut=Se;ut!==null;){if(ut===P){ut=null;break}if(Se=ut.sibling,Se!==null){Se.return=ut.return,ut=Se;break}ut=ut.return}Se=ut}}function ko(P,T,q,de){P=null;for(var Se=T,Ne=!1;Se!==null;){if(!Ne){if((Se.flags&524288)!==0)Ne=!0;else if((Se.flags&262144)!==0)break}if(Se.tag===10){var ut=Se.alternate;if(ut===null)throw Error("Should have a current fiber. This is a bug in React.");if(ut=ut.memoizedProps,ut!==null){var Ft=Se.type;Nh(Se.pendingProps.value,ut.value)||(P!==null?P.push(Ft):P=[Ft])}}else if(Se===d5.current){if(ut=Se.alternate,ut===null)throw Error("Should have a current fiber. This is a bug in React.");ut.memoizedState.memoizedState!==Se.memoizedState.memoizedState&&(P!==null?P.push(Kl):P=[Kl])}Se=Se.return}P!==null&&Oo(T,P,q,de),T.flags|=262144}function Ko(P){for(P=P.firstContext;P!==null;){var T=P.context;if(!Nh(jc?T._currentValue:T._currentValue2,P.memoizedValue))return!0;P=P.next}return!1}function mi(P){dp=P,eC=null,P=P.dependencies,P!==null&&(P.firstContext=null)}function Fo(P){return J2&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Rs(dp,P)}function Nr(P,T){return dp===null&&mi(P),Rs(P,T)}function Rs(P,T){var q=jc?T._currentValue:T._currentValue2;if(T={context:T,memoizedValue:q,next:null},eC===null){if(P===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");eC=T,P.dependencies={lanes:0,firstContext:T,_debugThenableState:null},P.flags|=524288}else eC=eC.next=T;return q}function ur(){return{controller:new JS,data:new Map,refCount:0}}function zi(P){P.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),P.refCount++}function bi(P){P.refCount--,0>P.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),P.refCount===0&&l8(ra,function(){P.controller.abort()})}function Ar(){var P=tC;return tC=0,P}function ws(P){var T=tC;return tC=P,T}function ds(P){var T=tC;return tC+=P,T}function Et(P){Rh=_s(),0>P.actualStartTime&&(P.actualStartTime=Rh)}function Gt(P){if(0<=Rh){var T=_s()-Rh;P.actualDuration+=T,P.selfBaseDuration=T,Rh=-1}}function Rt(P){if(0<=Rh){var T=_s()-Rh;P.actualDuration+=T,Rh=-1}}function Ht(){if(0<=Rh){var P=_s()-Rh;Rh=-1,tC+=P}}function Qt(){Rh=_s()}function Nt(P){for(var T=P.child;T;)P.actualDuration+=T.actualDuration,T=T.sibling}function _n(P){P!==$p&&P.next===null&&($p===null?ry=$p=P:$p=$p.next=P),S3=!0,Jn.actQueue!==null?G1||(G1=!0,jo()):W2||(W2=!0,jo())}function qn(P,T){if(!R4&&S3){R4=!0;do for(var q=!1,de=ry;de!==null;){if(P!==0){var Se=de.pendingLanes;if(Se===0)var Ne=0;else{var ut=de.suspendedLanes,Ft=de.pingedLanes;Ne=(1<<31-pl(42|P)+1)-1,Ne&=Se&~(ut&~Ft),Ne=Ne&201326741?Ne&201326741|1:Ne?Ne|2:0}Ne!==0&&(q=!0,Io(de,Ne))}else Ne=YA,Ne=Y(de,de===wl?Ne:0,de.cancelPendingCommit!==null||de.timeoutHandle!==E0),(Ne&3)===0||W(de,Ne)||(q=!0,Io(de,Ne));de=de.next}while(q);R4=!1}}function En(){Rn()}function Rn(){S3=G1=W2=!1;var P=0;sy!==0&&(Za()&&(P=sy),sy=0);for(var T=us(),q=null,de=ry;de!==null;){var Se=de.next,Ne=Hn(de,T);Ne===0?(de.next=null,q===null?ry=Se:q.next=Se,Se===null&&($p=q)):(q=de,(P!==0||(Ne&3)!==0)&&(S3=!0)),de=Se}qn(P)}function Hn(P,T){for(var q=P.suspendedLanes,de=P.pingedLanes,Se=P.expirationTimes,Ne=P.pendingLanes&-62914561;0<Ne;){var ut=31-pl(Ne),Ft=1<<ut,Tn=Se[ut];Tn===-1?((Ft&q)===0||(Ft&de)!==0)&&(Se[ut]=te(Ft,T)):Tn<=T&&(P.expiredLanes|=Ft),Ne&=~Ft}if(T=wl,q=YA,q=Y(P,P===T?q:0,P.cancelPendingCommit!==null||P.timeoutHandle!==E0),de=P.callbackNode,q===0||P===T&&(ml===p8||ml===C9)||P.cancelPendingCommit!==null)return de!==null&&gi(de),P.callbackNode=null,P.callbackPriority=0;if((q&3)===0||W(P,q)){if(T=q&-q,T!==P.callbackPriority||Jn.actQueue!==null&&de!==g8)gi(de);else return T;switch(pe(q)){case 2:case 8:q=yu;break;case 32:q=Dh;break;case 268435456:q=V2;break;default:q=Dh}return de=Lo.bind(null,P),Jn.actQueue!==null?(Jn.actQueue.push(de),q=g8):q=ny(q,de),P.callbackPriority=T,P.callbackNode=q,T}return de!==null&&gi(de),P.callbackPriority=2,P.callbackNode=null,2}function Lo(P,T){if(O1=Tm=!1,qd!==cC&&qd!==py)return P.callbackNode=null,P.callbackPriority=0,null;var q=P.callbackNode;if(jC()&&P.callbackNode!==q)return null;var de=YA;return de=Y(P,P===wl?de:0,P.cancelPendingCommit!==null||P.timeoutHandle!==E0),de===0?null:(JE(P,de,T),Hn(P,us()),P.callbackNode!=null&&P.callbackNode===q?Lo.bind(null,P):null)}function Io(P,T){if(jC())return null;Tm=O1,O1=!1,JE(P,T,!0)}function gi(P){P!==g8&&P!==null&&x3(P)}function jo(){Jn.actQueue!==null&&Jn.actQueue.push(function(){return Rn(),null}),zI?rc(function(){(sc&(V1|z1))!==Zp?ny(Jd,En):Rn()}):ny(Jd,En)}function oi(){return sy===0&&(sy=j()),sy}function Ji(P,T){if(D_===null){var q=D_=[];ay=0,Ay=oi(),Y1={status:"pending",value:void 0,then:function(de){q.push(de)}}}return ay++,T.then(wi,wi),T}function wi(){if(--ay===0&&D_!==null){Y1!==null&&(Y1.status="fulfilled");var P=D_;D_=null,Ay=0,Y1=null;for(var T=0;T<P.length;T++)(0,P[T])()}}function Br(P,T){var q=[],de={status:"pending",value:null,reason:null,then:function(Se){q.push(Se)}};return P.then(function(){de.status="fulfilled",de.value=T;for(var Se=0;Se<q.length;Se++)(0,q[Se])(T)},function(Se){for(de.status="rejected",de.reason=Se,Se=0;Se<q.length;Se++)(0,q[Se])(void 0)}),de}function gr(){var P=m5.current;return P!==null?P:wl.pooledCache}function oa(P,T){T===null?R(m5,m5.current,P):R(m5,T.pool,P)}function hs(){var P=gr();return P===null?null:{parent:jc?Wn._currentValue:Wn._currentValue2,pool:P}}function Li(P,T){if(Nh(P,T))return!0;if(typeof P!="object"||P===null||typeof T!="object"||T===null)return!1;var q=Object.keys(P),de=Object.keys(T);if(q.length!==de.length)return!1;for(de=0;de<q.length;de++){var Se=q[de];if(!m9.call(T,Se)||!Nh(P[Se],T[Se]))return!1}return!0}function ys(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function dr(P){return P=P.status,P==="fulfilled"||P==="rejected"}function cA(){}function vA(P,T,q){Jn.actQueue!==null&&(Jn.didUsePromise=!0);var de=P.thenables;switch(q=de[q],q===void 0?de.push(T):q!==T&&(P.didWarnAboutUncachedPromise||(P.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),T.then(cA,cA),T=q),T.status){case"fulfilled":return T.value;case"rejected":throw P=T.reason,H0(P),P;default:if(typeof T.status=="string")T.then(cA,cA);else{if(P=wl,P!==null&&100<P.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");P=T,P.status="pending",P.then(function(Se){if(T.status==="pending"){var Ne=T;Ne.status="fulfilled",Ne.value=Se}},function(Se){if(T.status==="pending"){var Ne=T;Ne.status="rejected",Ne.reason=Se}})}switch(T.status){case"fulfilled":return T.value;case"rejected":throw P=T.reason,H0(P),P}throw N_=T,w3=!0,v3}}function Yl(){if(N_===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var P=N_;return N_=null,w3=!1,P}function H0(P){if(P===v3||P===ed)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function ph(){for(var P=oC,T=P3=oC=0;T<P;){var q=Hf[T];Hf[T++]=null;var de=Hf[T];Hf[T++]=null;var Se=Hf[T];Hf[T++]=null;var Ne=Hf[T];if(Hf[T++]=null,de!==null&&Se!==null){var ut=de.pending;ut===null?Se.next=Se:(Se.next=ut.next,ut.next=Se),de.pending=Se}Ne!==0&&Nd(q,Se,Ne)}}function Xh(P,T,q,de){Hf[oC++]=P,Hf[oC++]=T,Hf[oC++]=q,Hf[oC++]=de,P3|=de,P.lanes|=de,P=P.alternate,P!==null&&(P.lanes|=de)}function Bl(P,T,q,de){return Xh(P,T,q,de),il(P)}function fc(P,T){return Xh(P,null,null,T),il(P)}function Nd(P,T,q){P.lanes|=q;var de=P.alternate;de!==null&&(de.lanes|=q);for(var Se=!1,Ne=P.return;Ne!==null;)Ne.childLanes|=q,de=Ne.alternate,de!==null&&(de.childLanes|=q),Ne.tag===22&&(P=Ne.stateNode,P===null||P._visibility&1||(Se=!0)),P=Ne,Ne=Ne.return;return P.tag===3?(Ne=P.stateNode,Se&&T!==null&&(Se=31-pl(q),P=Ne.hiddenUpdates,de=P[Se],de===null?P[Se]=[T]:de.push(T),T.lane=q|536870912),Ne):null}function il(P){if(eQ>fte)throw tQ=eQ=0,Ik=kK=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");tQ>xM&&(tQ=0,Ik=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),P.alternate===null&&(P.flags&4098)!==0&&o5(P);for(var T=P,q=T.return;q!==null;)T.alternate===null&&(T.flags&4098)!==0&&o5(P),T=q,q=T.return;return T.tag===3?T.stateNode:null}function Ul(P){P.updateQueue={baseState:P.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function m_(P,T){P=P.updateQueue,T.updateQueue===P&&(T.updateQueue={baseState:P.baseState,firstBaseUpdate:P.firstBaseUpdate,lastBaseUpdate:P.lastBaseUpdate,shared:P.shared,callbacks:null})}function ag(P){return{lane:P,tag:j2,payload:null,callback:null,next:null}}function Rd(P,T,q){var de=P.updateQueue;if(de===null)return null;if(de=de.shared,k4===de&&!_9){var Se=w(P);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.

Please update the following component: %s`,Se),_9=!0}return(sc&V1)!==Zp?(Se=de.pending,Se===null?T.next=T:(T.next=Se.next,Se.next=T),de.pending=T,T=il(P),Nd(P,null,q),T):(Xh(P,de,T,q),il(P))}function mh(P,T,q){if(T=T.updateQueue,T!==null&&(T=T.shared,(q&4194048)!==0)){var de=T.lanes;de&=P.pendingLanes,q|=de,T.lanes=q,ge(P,q)}}function mm(P,T){var q=P.updateQueue,de=P.alternate;if(de!==null&&(de=de.updateQueue,q===de)){var Se=null,Ne=null;if(q=q.firstBaseUpdate,q!==null){do{var ut={lane:q.lane,tag:q.tag,payload:q.payload,callback:null,next:null};Ne===null?Se=Ne=ut:Ne=Ne.next=ut,q=q.next}while(q!==null);Ne===null?Se=Ne=T:Ne=Ne.next=T}else Se=Ne=T;q={baseState:de.baseState,firstBaseUpdate:Se,lastBaseUpdate:Ne,shared:de.shared,callbacks:de.callbacks},P.updateQueue=q;return}P=q.lastBaseUpdate,P===null?q.firstBaseUpdate=T:P.next=T,q.lastBaseUpdate=T}function gu(){if(F4){var P=Y1;if(P!==null)throw P}}function Ag(P,T,q,de){F4=!1;var Se=P.updateQueue;q2=!1,k4=Se.shared;var Ne=Se.firstBaseUpdate,ut=Se.lastBaseUpdate,Ft=Se.shared.pending;if(Ft!==null){Se.shared.pending=null;var Tn=Ft,_o=Tn.next;Tn.next=null,ut===null?Ne=_o:ut.next=_o,ut=Tn;var di=P.alternate;di!==null&&(di=di.updateQueue,Ft=di.lastBaseUpdate,Ft!==ut&&(Ft===null?di.firstBaseUpdate=_o:Ft.next=_o,di.lastBaseUpdate=Tn))}if(Ne!==null){var li=Se.baseState;ut=0,di=_o=Tn=null,Ft=Ne;do{var vi=Ft.lane&-536870913,Ws=vi!==Ft.lane;if(Ws?(YA&vi)===vi:(de&vi)===vi){vi!==0&&vi===Ay&&(F4=!0),di!==null&&(di=di.next={lane:0,tag:Ft.tag,payload:Ft.payload,callback:null,next:null});e:{vi=P;var ya=Ft,od=T,iQ=q;switch(ya.tag){case WS:if(ya=ya.payload,typeof ya=="function"){J2=!0;var T3=ya.call(iQ,li,od);if(vi.mode&8){Me(!0);try{ya.call(iQ,li,od)}finally{Me(!1)}}J2=!1,li=T3;break e}li=ya;break e;case $2:vi.flags=vi.flags&-65537|128;case j2:if(T3=ya.payload,typeof T3=="function"){if(J2=!0,ya=T3.call(iQ,li,od),vi.mode&8){Me(!0);try{T3.call(iQ,li,od)}finally{Me(!1)}}J2=!1}else ya=T3;if(ya==null)break e;li=al({},li,ya);break e;case Of:q2=!0}}vi=Ft.callback,vi!==null&&(P.flags|=64,Ws&&(P.flags|=8192),Ws=Se.callbacks,Ws===null?Se.callbacks=[vi]:Ws.push(vi))}else Ws={lane:vi,tag:Ft.tag,payload:Ft.payload,callback:Ft.callback,next:null},di===null?(_o=di=Ws,Tn=li):di=di.next=Ws,ut|=vi;if(Ft=Ft.next,Ft===null){if(Ft=Se.shared.pending,Ft===null)break;Ws=Ft,Ft=Ws.next,Ws.next=null,Se.lastBaseUpdate=Ws,Se.shared.pending=null}}while(!0);di===null&&(Tn=li),Se.baseState=Tn,Se.firstBaseUpdate=_o,Se.lastBaseUpdate=di,Ne===null&&(Se.shared.lanes=0),ox|=ut,P.lanes=ut,P.memoizedState=li}k4=null}function C0(P,T){if(typeof P!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+P);P.call(T)}function FC(P,T){var q=P.shared.hiddenCallbacks;if(q!==null)for(P.shared.hiddenCallbacks=null,P=0;P<q.length;P++)C0(q[P],T)}function O0(P,T){var q=P.callbacks;if(q!==null)for(P.callbacks=null,P=0;P<q.length;P++)C0(q[P],T)}function __(P,T){var q=Yf;R(X2,q,P),R(Gf,T,P),Yf=q|T.baseLanes}function Qp(P){R(X2,Yf,P),R(Gf,Gf.current,P)}function _1(P){Yf=X2.current,k(Gf,P),k(X2,P)}function tr(){var P=co;re===null?re=[P]:re.push(P)}function Vo(){var P=co;if(re!==null&&(X++,re[X]!==P)){var T=w(fs);if(!d8.has(T)&&(d8.add(T),re!==null)){for(var q="",de=0;de<=X;de++){var Se=re[de],Ne=de===X?P:Se;for(Se=de+1+". "+Se;30>Se.length;)Se+=" ";Se+=Ne+`
`,q+=Se}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks

   Previous render            Next render
   ------------------------------------------------------
%s   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`,T,q)}}}function wA(P){P==null||cs(P)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",co,typeof P)}function Td(){var P=w(fs);jS.has(P)||(jS.add(P),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",P))}function da(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Zh(P,T){if(me)return!1;if(T===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",co),!1;P.length!==T.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.

Previous: %s
Incoming: %s`,co,"["+T.join(", ")+"]","["+P.join(", ")+"]");for(var q=0;q<T.length&&q<P.length;q++)if(!Nh(P[q],T[q]))return!1;return!0}function mf(P,T,q,de,Se,Ne){tx=Ne,fs=T,re=P!==null?P._debugHookTypes:null,X=-1,me=P!==null&&P.type!==T.type,(Object.prototype.toString.call(q)==="[object AsyncFunction]"||Object.prototype.toString.call(q)==="[object AsyncGeneratorFunction]")&&(Ne=w(fs),ex.has(Ne)||(ex.add(Ne),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",Ne===null?"An unknown Component":"<"+Ne+">"))),T.memoizedState=null,T.updateQueue=null,T.lanes=0,Jn.H=P!==null&&P.memoizedState!==null?wt:re!==null?ft:We,nd=Ne=(T.mode&8)!==yA;var ut=ci(q,de,Se);if(nd=!1,Th&&(ut=_f(T,q,de,Se)),Ne){Me(!0);try{ut=_f(T,q,de,Se)}finally{Me(!1)}}return LC(P,T),ut}function LC(P,T){T._debugHookTypes=re,T.dependencies===null?R_!==null&&(T.dependencies={lanes:0,firstContext:null,_debugThenableState:R_}):T.dependencies._debugThenableState=R_,Jn.H=He;var q=Ec!==null&&Ec.next!==null;if(tx=0,re=co=u0=Ec=fs=null,X=-1,P!==null&&(P.flags&65011712)!==(T.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),iC=!1,Fm=0,R_=null,q)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");P===null||xu||(P=P.dependencies,P!==null&&Ko(P)&&(xu=!0)),w3?(w3=!1,P=!0):P=!1,P&&(T=w(T)||"Unknown",f9.has(T)||ex.has(T)||(f9.add(T),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function _f(P,T,q,de){fs=P;var Se=0;do{if(Th&&(R_=null),Fm=0,Th=!1,Se>=f5)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(Se+=1,me=!1,u0=Ec=null,P.updateQueue!=null){var Ne=P.updateQueue;Ne.lastEffect=null,Ne.events=null,Ne.stores=null,Ne.memoCache!=null&&(Ne.memoCache.index=0)}X=-1,Jn.H=zt,Ne=ci(T,q,de)}while(Th);return Ne}function _m(){var P=Jn.H,T=P.useState()[0];return T=typeof T.then=="function"?G0(T):T,P=P.useState()[0],(Ec!==null?Ec.memoizedState:null)!==P&&(fs.flags|=1024),T}function du(){var P=_5!==0;return _5=0,P}function cg(P,T,q){T.updateQueue=P.updateQueue,T.flags=(T.mode&16)!==yA?T.flags&-402655237:T.flags&-2053,P.lanes&=~q}function Ug(P){if(iC){for(P=P.memoizedState;P!==null;){var T=P.queue;T!==null&&(T.pending=null),P=P.next}iC=!1}tx=0,re=u0=Ec=fs=null,X=-1,co=null,Th=!1,Fm=_5=0,R_=null}function Vc(){var P={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return u0===null?fs.memoizedState=u0=P:u0=u0.next=P,u0}function ha(){if(Ec===null){var P=fs.alternate;P=P!==null?P.memoizedState:null}else P=Ec.next;var T=u0===null?fs.memoizedState:u0.next;if(T!==null)u0=T,Ec=P;else{if(P===null)throw fs.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");Ec=P,P={memoizedState:Ec.memoizedState,baseState:Ec.baseState,baseQueue:Ec.baseQueue,queue:Ec.queue,next:null},u0===null?fs.memoizedState=u0=P:u0=u0.next=P}return u0}function BI(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function G0(P){var T=Fm;return Fm+=1,R_===null&&(R_=ys()),P=vA(R_,P,T),T=fs,(u0===null?T.memoizedState:u0.next)===null&&(T=T.alternate,Jn.H=T!==null&&T.memoizedState!==null?wt:We),P}function PA(P){if(P!==null&&typeof P=="object"){if(typeof P.then=="function")return G0(P);if(P.$$typeof===mg)return Fo(P)}throw Error("An unsupported type was passed to use(): "+String(P))}function _h(P){var T=null,q=fs.updateQueue;if(q!==null&&(T=q.memoCache),T==null){var de=fs.alternate;de!==null&&(de=de.updateQueue,de!==null&&(de=de.memoCache,de!=null&&(T={data:de.data.map(function(Se){return Se.slice()}),index:0})))}if(T==null&&(T={data:[],index:0}),q===null&&(q=BI(),fs.updateQueue=q),q.memoCache=T,q=T.data[T.index],q===void 0||me)for(q=T.data[T.index]=Array(P),de=0;de<P;de++)q[de]=Kd;else q.length!==P&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",q.length,P);return T.index++,q}function n0(P,T){return typeof T=="function"?T(P):T}function HC(P,T,q){var de=Vc();if(q!==void 0){var Se=q(T);if(nd){Me(!0);try{q(T)}finally{Me(!1)}}}else Se=T;return de.memoizedState=de.baseState=Se,P={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P,lastRenderedState:Se},de.queue=P,P=P.dispatch=Fd.bind(null,fs,P),[de.memoizedState,P]}function f1(P){var T=ha();return fm(T,Ec,P)}function fm(P,T,q){var de=P.queue;if(de===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");de.lastRenderedReducer=q;var Se=P.baseQueue,Ne=de.pending;if(Ne!==null){if(Se!==null){var ut=Se.next;Se.next=Ne.next,Ne.next=ut}T.baseQueue!==Se&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),T.baseQueue=Se=Ne,de.pending=null}if(Ne=P.baseState,Se===null)P.memoizedState=Ne;else{T=Se.next;var Ft=ut=null,Tn=null,_o=T,di=!1;do{var li=_o.lane&-536870913;if(li!==_o.lane?(YA&li)===li:(tx&li)===li){var vi=_o.revertLane;if(vi===0)Tn!==null&&(Tn=Tn.next={lane:0,revertLane:0,action:_o.action,hasEagerState:_o.hasEagerState,eagerState:_o.eagerState,next:null}),li===Ay&&(di=!0);else if((tx&vi)===vi){_o=_o.next,vi===Ay&&(di=!0);continue}else li={lane:0,revertLane:_o.revertLane,action:_o.action,hasEagerState:_o.hasEagerState,eagerState:_o.eagerState,next:null},Tn===null?(Ft=Tn=li,ut=Ne):Tn=Tn.next=li,fs.lanes|=vi,ox|=vi;li=_o.action,nd&&q(Ne,li),Ne=_o.hasEagerState?_o.eagerState:q(Ne,li)}else vi={lane:li,revertLane:_o.revertLane,action:_o.action,hasEagerState:_o.hasEagerState,eagerState:_o.eagerState,next:null},Tn===null?(Ft=Tn=vi,ut=Ne):Tn=Tn.next=vi,fs.lanes|=li,ox|=li;_o=_o.next}while(_o!==null&&_o!==T);if(Tn===null?ut=Ne:Tn.next=Ft,!Nh(Ne,P.memoizedState)&&(xu=!0,di&&(q=Y1,q!==null)))throw q;P.memoizedState=Ne,P.baseState=ut,P.baseQueue=Tn,de.lastRenderedState=Ne}return Se===null&&(de.lanes=0),[P.memoizedState,de.dispatch]}function vp(P){var T=ha(),q=T.queue;if(q===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");q.lastRenderedReducer=P;var de=q.dispatch,Se=q.pending,Ne=T.memoizedState;if(Se!==null){q.pending=null;var ut=Se=Se.next;do Ne=P(Ne,ut.action),ut=ut.next;while(ut!==Se);Nh(Ne,T.memoizedState)||(xu=!0),T.memoizedState=Ne,T.baseQueue===null&&(T.baseState=Ne),q.lastRenderedState=Ne}return[Ne,de]}function ku(P,T,q){var de=fs,Se=Vc();if(ja){if(q===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var Ne=q();Z2||Ne===q()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Z2=!0)}else{if(Ne=T(),Z2||(q=T(),Nh(Ne,q)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Z2=!0)),wl===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(YA&124)!==0||rt(de,T,Ne)}return Se.memoizedState=Ne,q={value:Ne,getSnapshot:T},Se.queue=q,fh(an.bind(null,de,q,P),[P]),de.flags|=2048,MA(zl|zu,Fa(),Ot.bind(null,de,q,Ne,T),null),Ne}function ot(P,T,q){var de=fs,Se=ha(),Ne=ja;if(Ne){if(q===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");q=q()}else if(q=T(),!Z2){var ut=T();Nh(q,ut)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Z2=!0)}(ut=!Nh((Ec||Se).memoizedState,q))&&(Se.memoizedState=q,xu=!0),Se=Se.queue;var Ft=an.bind(null,de,Se,P);if(Hr(2048,zu,Ft,[P]),Se.getSnapshot!==T||ut||u0!==null&&u0.memoizedState.tag&zl){if(de.flags|=2048,MA(zl|zu,Fa(),Ot.bind(null,de,Se,q,T),null),wl===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ne||(tx&124)!==0||rt(de,T,q)}return q}function rt(P,T,q){P.flags|=16384,P={getSnapshot:T,value:q},T=fs.updateQueue,T===null?(T=BI(),fs.updateQueue=T,T.stores=[P]):(q=T.stores,q===null?T.stores=[P]:q.push(P))}function Ot(P,T,q,de){T.value=q,T.getSnapshot=de,Dn(T)&&Xn(P)}function an(P,T,q){return q(function(){Dn(T)&&Xn(P)})}function Dn(P){var T=P.getSnapshot;P=P.value;try{var q=T();return!Nh(P,q)}catch{return!0}}function Xn(P){var T=fc(P,2);T!==null&&s0(T,P,2)}function oo(P){var T=Vc();if(typeof P=="function"){var q=P;if(P=q(),nd){Me(!0);try{q()}finally{Me(!1)}}}return T.memoizedState=T.baseState=P,T.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n0,lastRenderedState:P},T}function vo(P){P=oo(P);var T=P.queue,q=_2.bind(null,fs,T);return T.dispatch=q,[P.memoizedState,q]}function Xo(P){var T=Vc();T.memoizedState=T.baseState=P;var q={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return T.queue=q,T=tp.bind(null,fs,!0,q),q.dispatch=T,[P,T]}function Ti(P,T){var q=ha();return ir(q,Ec,P,T)}function ir(P,T,q,de){return P.baseState=q,fm(P,Ec,typeof de=="function"?de:n0)}function Gs(P,T){var q=ha();return Ec!==null?ir(q,Ec,P,T):(q.baseState=P,[P,q.queue.dispatch])}function qr(P,T,q,de,Se){if(Im(P))throw Error("Cannot update form state while rendering.");if(P=T.action,P!==null){var Ne={payload:Se,action:P,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(ut){Ne.listeners.push(ut)}};Jn.T!==null?q(!0):Ne.isTransition=!1,de(Ne),q=T.pending,q===null?(Ne.next=T.pending=Ne,ps(T,Ne)):(Ne.next=q.next,T.pending=q.next=Ne)}}function ps(P,T){var q=T.action,de=T.payload,Se=P.state;if(T.isTransition){var Ne=Jn.T,ut={};Jn.T=ut,Jn.T._updatedFibers=new Set;try{var Ft=q(Se,de),Tn=Jn.S;Tn!==null&&Tn(ut,Ft),Ic(P,T,Ft)}catch(_o){ka(P,T,_o)}finally{Jn.T=Ne,Ne===null&&ut._updatedFibers&&(P=ut._updatedFibers.size,ut._updatedFibers.clear(),10<P&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{ut=q(Se,de),Ic(P,T,ut)}catch(_o){ka(P,T,_o)}}function Ic(P,T,q){q!==null&&typeof q=="object"&&typeof q.then=="function"?(q.then(function(de){lc(P,T,de)},function(de){return ka(P,T,de)}),T.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):lc(P,T,q)}function lc(P,T,q){T.status="fulfilled",T.value=q,gn(T),P.state=q,T=P.pending,T!==null&&(q=T.next,q===T?P.pending=null:(q=q.next,T.next=q,ps(P,q)))}function ka(P,T,q){var de=P.pending;if(P.pending=null,de!==null){de=de.next;do T.status="rejected",T.reason=q,gn(T),T=T.next;while(T!==de)}P.action=null}function gn(P){P=P.listeners;for(var T=0;T<P.length;T++)(0,P[T])()}function bn(P,T){return T}function go(P,T){if(ja){var q=wl.formState;if(q!==null){e:{var de=fs;if(ja){if(Ma){var Se=Up(Ma,Wd);if(Se){Ma=Kp(Se),de=GA(Se);break e}}vt(de)}de=!1}de&&(T=q[0])}}q=Vc(),q.memoizedState=q.baseState=T,de={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bn,lastRenderedState:T},q.queue=de,q=_2.bind(null,fs,de),de.dispatch=q,de=oo(!1);var Ne=tp.bind(null,fs,!1,de.queue);return de=Vc(),Se={state:T,dispatch:null,action:P,pending:null},de.queue=Se,q=qr.bind(null,fs,Se,Ne,q),Se.dispatch=q,de.memoizedState=P,[T,q,!1]}function Go(P){var T=ha();return hr(T,Ec,P)}function hr(P,T,q){if(T=fm(P,T,bn)[0],P=f1(n0)[0],typeof T=="object"&&T!==null&&typeof T.then=="function")try{var de=G0(T)}catch(ut){throw ut===v3?ed:ut}else de=T;T=ha();var Se=T.queue,Ne=Se.dispatch;return q!==T.memoizedState&&(fs.flags|=2048,MA(zl|zu,Fa(),ia.bind(null,Se,q),null)),[de,Ne,P]}function ia(P,T){P.action=T}function lA(P){var T=ha(),q=Ec;if(q!==null)return hr(T,q,P);ha(),T=T.memoizedState,q=ha();var de=q.queue.dispatch;return q.memoizedState=P,[T,de,!1]}function MA(P,T,q,de){return P={tag:P,create:q,deps:de,inst:T,next:null},T=fs.updateQueue,T===null&&(T=BI(),fs.updateQueue=T),q=T.lastEffect,q===null?T.lastEffect=P.next=P:(de=q.next,q.next=P,P.next=de,T.lastEffect=P),P}function Fa(){return{destroy:void 0,resource:void 0}}function La(P){var T=Vc();return P={current:P},T.memoizedState=P}function Y0(P,T,q,de){var Se=Vc();de=de===void 0?null:de,fs.flags|=P,Se.memoizedState=MA(zl|T,Fa(),q,de)}function Hr(P,T,q,de){var Se=ha();de=de===void 0?null:de;var Ne=Se.memoizedState.inst;Ec!==null&&de!==null&&Zh(de,Ec.memoizedState.deps)?Se.memoizedState=MA(T,Ne,q,de):(fs.flags|=P,Se.memoizedState=MA(zl|T,Ne,q,de))}function fh(P,T){(fs.mode&16)!==yA&&(fs.mode&64)===yA?Y0(276826112,zu,P,T):Y0(8390656,zu,P,T)}function Ih(P,T){var q=4194308;return(fs.mode&16)!==yA&&(q|=134217728),Y0(q,X0,P,T)}function DA(P,T){if(typeof T=="function"){P=P();var q=T(P);return function(){typeof q=="function"?q():T(null)}}if(T!=null)return T.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(T).join(", ")+"}"),P=P(),T.current=P,function(){T.current=null}}function OC(P,T,q){typeof T!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",T!==null?typeof T:"null"),q=q!=null?q.concat([P]):null;var de=4194308;(fs.mode&16)!==yA&&(de|=134217728),Y0(de,X0,DA.bind(null,T,P),q)}function bI(P,T,q){typeof T!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",T!==null?typeof T:"null"),q=q!=null?q.concat([P]):null,Hr(4,X0,DA.bind(null,T,P),q)}function hu(P,T){return Vc().memoizedState=[P,T===void 0?null:T],P}function lg(P,T){var q=ha();T=T===void 0?null:T;var de=q.memoizedState;return T!==null&&Zh(T,de[1])?de[0]:(q.memoizedState=[P,T],P)}function wp(P,T){var q=Vc();T=T===void 0?null:T;var de=P();if(nd){Me(!0);try{P()}finally{Me(!1)}}return q.memoizedState=[de,T],de}function kd(P,T){var q=ha();T=T===void 0?null:T;var de=q.memoizedState;if(T!==null&&Zh(T,de[1]))return de[0];if(de=P(),nd){Me(!0);try{P()}finally{Me(!1)}}return q.memoizedState=[de,T],de}function ff(P,T){var q=Vc();return Pp(q,P,T)}function I1(P,T){var q=ha();return SI(q,Ec.memoizedState,P,T)}function p2(P,T){var q=ha();return Ec===null?Pp(q,P,T):SI(q,Ec.memoizedState,P,T)}function Pp(P,T,q){return q===void 0||(tx&1073741824)!==0?P.memoizedState=T:(P.memoizedState=q,P=b_(),fs.lanes|=P,ox|=P,q)}function SI(P,T,q,de){return Nh(q,T)?q:Gf.current!==null?(P=Pp(P,q,de),Nh(P,T)||(xu=!0),P):(tx&42)===0?(xu=!0,P.memoizedState=q):(P=b_(),fs.lanes|=P,ox|=P,T)}function Mp(P,T,q,de,Se){var Ne=$g();za(Ne!==0&&8>Ne?Ne:8);var ut=Jn.T,Ft={};Jn.T=Ft,tp(P,!1,T,q),Ft._updatedFibers=new Set;try{var Tn=Se(),_o=Jn.S;if(_o!==null&&_o(Ft,Tn),Tn!==null&&typeof Tn=="object"&&typeof Tn.then=="function"){var di=Br(Tn,de);o0(P,T,di,sl(P))}else o0(P,T,de,sl(P))}catch(li){o0(P,T,{then:function(){},status:"rejected",reason:li},sl(P))}finally{za(Ne),Jn.T=ut,ut===null&&Ft._updatedFibers&&(P=Ft._updatedFibers.size,Ft._updatedFibers.clear(),10<P&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function f_(P){var T=P.memoizedState;if(T!==null)return T;T={memoizedState:Qh,baseState:Qh,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:n0,lastRenderedState:Qh},next:null};var q={};return T.next={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:n0,lastRenderedState:q},next:null},P.memoizedState=T,P=P.alternate,P!==null&&(P.memoizedState=T),T}function U0(){var P=oo(!1);return P=Mp.bind(null,fs,P.queue,!0,!1),Vc().memoizedState=P,[!1,P]}function S4(){var P=f1(n0)[0],T=ha().memoizedState;return[typeof P=="boolean"?P:G0(P),T]}function ep(){var P=vp(n0)[0],T=ha().memoizedState;return[typeof P=="boolean"?P:G0(P),T]}function If(){return Fo(Kl)}function A3(){var P=Vc(),T=wl.identifierPrefix;if(ja){var q=Js,de=Or;q=(de&~(1<<32-pl(de)-1)).toString(32)+q,T="«"+T+"R"+q,q=_5++,0<q&&(T+="H"+q.toString(32)),T+="»"}else q=pp++,T="«"+T+"r"+q.toString(32)+"»";return P.memoizedState=T}function m2(){return Vc().memoizedState=KE.bind(null,fs)}function KE(P,T){for(var q=P.return;q!==null;){switch(q.tag){case 24:case 3:var de=sl(q);P=ag(de);var Se=Rd(q,P,de);Se!==null&&(s0(Se,q,de),mh(Se,q,de)),q=ur(),T!=null&&Se!==null&&console.error("The seed argument is not enabled outside experimental channels."),P.payload={cache:q};return}q=q.return}}function Fd(P,T,q){var de=arguments;typeof de[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),de=sl(P);var Se={lane:de,revertLane:0,action:q,hasEagerState:!1,eagerState:null,next:null};Im(P)?pu(T,Se):(Se=Bl(P,T,Se,de),Se!==null&&(s0(Se,P,de),K0(Se,T,de))),Re(P,de)}function _2(P,T,q){var de=arguments;typeof de[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),de=sl(P),o0(P,T,q,de),Re(P,de)}function o0(P,T,q,de){var Se={lane:de,revertLane:0,action:q,hasEagerState:!1,eagerState:null,next:null};if(Im(P))pu(T,Se);else{var Ne=P.alternate;if(P.lanes===0&&(Ne===null||Ne.lanes===0)&&(Ne=T.lastRenderedReducer,Ne!==null)){var ut=Jn.H;Jn.H=In;try{var Ft=T.lastRenderedState,Tn=Ne(Ft,q);if(Se.hasEagerState=!0,Se.eagerState=Tn,Nh(Tn,Ft))return Xh(P,T,Se,0),wl===null&&ph(),!1}catch{}finally{Jn.H=ut}}if(q=Bl(P,T,Se,de),q!==null)return s0(q,P,de),K0(q,T,de),!0}return!1}function tp(P,T,q,de){if(Jn.T===null&&Ay===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),de={lane:2,revertLane:oi(),action:de,hasEagerState:!1,eagerState:null,next:null},Im(P)){if(T)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else T=Bl(P,q,de,2),T!==null&&s0(T,P,2);Re(P,2)}function Im(P){var T=P.alternate;return P===fs||T!==null&&T===fs}function pu(P,T){Th=iC=!0;var q=P.pending;q===null?T.next=T:(T.next=q.next,q.next=T),P.pending=T}function K0(P,T,q){if((q&4194048)!==0){var de=T.lanes;de&=P.pendingLanes,q|=de,T.lanes=q,ge(P,q)}}function zc(P){var T=vr;return P!=null&&(vr=T===null?P:T.concat(P)),T}function np(P,T,q){for(var de=Object.keys(P.props),Se=0;Se<de.length;Se++){var Ne=de[Se];if(Ne!=="children"&&Ne!=="key"){T===null&&(T=H2(P,q.mode,0),T._debugInfo=vr,T.return=q),Lt(T,function(ut){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ut)},Ne);break}}}function y0(P){var T=dy;return dy+=1,rC===null&&(rC=ys()),vA(rC,P,T)}function Cm(P,T){T=T.props.ref,P.ref=T!==void 0?T:null}function Dp(P,T){throw T.$$typeof===ai?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.`):(P=Object.prototype.toString.call(T),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead."))}function Kg(P,T){var q=w(P)||"Component";z[q]||(z[q]=!0,T=T.displayName||T.name||"Component",P.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
  root.render(%s)`,T,T,T):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
  <%s>{%s}</%s>`,T,T,q,T,q))}function Ld(P,T){var q=w(P)||"Component";se[q]||(se[q]=!0,T=String(T),P.tag===3?console.error(`Symbols are not valid as a React child.
  root.render(%s)`,T):console.error(`Symbols are not valid as a React child.
  <%s>%s</%s>`,q,T,q))}function f2(P){function T(fn,mn){if(P){var vn=fn.deletions;vn===null?(fn.deletions=[mn],fn.flags|=16):vn.push(mn)}}function q(fn,mn){if(!P)return null;for(;mn!==null;)T(fn,mn),mn=mn.sibling;return null}function de(fn){for(var mn=new Map;fn!==null;)fn.key!==null?mn.set(fn.key,fn):mn.set(fn.index,fn),fn=fn.sibling;return mn}function Se(fn,mn){return fn=v1(fn,mn),fn.index=0,fn.sibling=null,fn}function Ne(fn,mn,vn){return fn.index=vn,P?(vn=fn.alternate,vn!==null?(vn=vn.index,vn<mn?(fn.flags|=67108866,mn):vn):(fn.flags|=67108866,mn)):(fn.flags|=1048576,mn)}function ut(fn){return P&&fn.alternate===null&&(fn.flags|=67108866),fn}function Ft(fn,mn,vn,Do){return mn===null||mn.tag!==6?(mn=vf(vn,fn.mode,Do),mn.return=fn,mn._debugOwner=fn,mn._debugTask=fn._debugTask,mn._debugInfo=vr,mn):(mn=Se(mn,vn),mn.return=fn,mn._debugInfo=vr,mn)}function Tn(fn,mn,vn,Do){var cr=vn.type;return cr===P1?(mn=di(fn,mn,vn.props.children,Do,vn.key),np(vn,mn,fn),mn):mn!==null&&(mn.elementType===cr||GI(mn,vn)||typeof cr=="object"&&cr!==null&&cr.$$typeof===jg&&gy(cr)===mn.type)?(mn=Se(mn,vn.props),Cm(mn,vn),mn.return=fn,mn._debugOwner=vn._owner,mn._debugInfo=vr,mn):(mn=H2(vn,fn.mode,Do),Cm(mn,vn),mn.return=fn,mn._debugInfo=vr,mn)}function _o(fn,mn,vn,Do){return mn===null||mn.tag!==4||mn.stateNode.containerInfo!==vn.containerInfo||mn.stateNode.implementation!==vn.implementation?(mn=YI(vn,fn.mode,Do),mn.return=fn,mn._debugInfo=vr,mn):(mn=Se(mn,vn.children||[]),mn.return=fn,mn._debugInfo=vr,mn)}function di(fn,mn,vn,Do,cr){return mn===null||mn.tag!==7?(mn=mu(vn,fn.mode,Do,cr),mn.return=fn,mn._debugOwner=fn,mn._debugTask=fn._debugTask,mn._debugInfo=vr,mn):(mn=Se(mn,vn),mn.return=fn,mn._debugInfo=vr,mn)}function li(fn,mn,vn){if(typeof mn=="string"&&mn!==""||typeof mn=="number"||typeof mn=="bigint")return mn=vf(""+mn,fn.mode,vn),mn.return=fn,mn._debugOwner=fn,mn._debugTask=fn._debugTask,mn._debugInfo=vr,mn;if(typeof mn=="object"&&mn!==null){switch(mn.$$typeof){case v_:return vn=H2(mn,fn.mode,vn),Cm(vn,mn),vn.return=fn,fn=zc(mn._debugInfo),vn._debugInfo=vr,vr=fn,vn;case Al:return mn=YI(mn,fn.mode,vn),mn.return=fn,mn._debugInfo=vr,mn;case jg:var Do=zc(mn._debugInfo);return mn=gy(mn),fn=li(fn,mn,vn),vr=Do,fn}if(cs(mn)||S(mn))return vn=mu(mn,fn.mode,vn,null),vn.return=fn,vn._debugOwner=fn,vn._debugTask=fn._debugTask,fn=zc(mn._debugInfo),vn._debugInfo=vr,vr=fn,vn;if(typeof mn.then=="function")return Do=zc(mn._debugInfo),fn=li(fn,y0(mn),vn),vr=Do,fn;if(mn.$$typeof===mg)return li(fn,Nr(fn,mn),vn);Dp(fn,mn)}return typeof mn=="function"&&Kg(fn,mn),typeof mn=="symbol"&&Ld(fn,mn),null}function vi(fn,mn,vn,Do){var cr=mn!==null?mn.key:null;if(typeof vn=="string"&&vn!==""||typeof vn=="number"||typeof vn=="bigint")return cr!==null?null:Ft(fn,mn,""+vn,Do);if(typeof vn=="object"&&vn!==null){switch(vn.$$typeof){case v_:return vn.key===cr?(cr=zc(vn._debugInfo),fn=Tn(fn,mn,vn,Do),vr=cr,fn):null;case Al:return vn.key===cr?_o(fn,mn,vn,Do):null;case jg:return cr=zc(vn._debugInfo),vn=gy(vn),fn=vi(fn,mn,vn,Do),vr=cr,fn}if(cs(vn)||S(vn))return cr!==null?null:(cr=zc(vn._debugInfo),fn=di(fn,mn,vn,Do,null),vr=cr,fn);if(typeof vn.then=="function")return cr=zc(vn._debugInfo),fn=vi(fn,mn,y0(vn),Do),vr=cr,fn;if(vn.$$typeof===mg)return vi(fn,mn,Nr(fn,vn),Do);Dp(fn,vn)}return typeof vn=="function"&&Kg(fn,vn),typeof vn=="symbol"&&Ld(fn,vn),null}function Ws(fn,mn,vn,Do,cr){if(typeof Do=="string"&&Do!==""||typeof Do=="number"||typeof Do=="bigint")return fn=fn.get(vn)||null,Ft(mn,fn,""+Do,cr);if(typeof Do=="object"&&Do!==null){switch(Do.$$typeof){case v_:return vn=fn.get(Do.key===null?vn:Do.key)||null,fn=zc(Do._debugInfo),mn=Tn(mn,vn,Do,cr),vr=fn,mn;case Al:return fn=fn.get(Do.key===null?vn:Do.key)||null,_o(mn,fn,Do,cr);case jg:var gc=zc(Do._debugInfo);return Do=gy(Do),mn=Ws(fn,mn,vn,Do,cr),vr=gc,mn}if(cs(Do)||S(Do))return vn=fn.get(vn)||null,fn=zc(Do._debugInfo),mn=di(mn,vn,Do,cr,null),vr=fn,mn;if(typeof Do.then=="function")return gc=zc(Do._debugInfo),mn=Ws(fn,mn,vn,y0(Do),cr),vr=gc,mn;if(Do.$$typeof===mg)return Ws(fn,mn,vn,Nr(mn,Do),cr);Dp(mn,Do)}return typeof Do=="function"&&Kg(mn,Do),typeof Do=="symbol"&&Ld(mn,Do),null}function ya(fn,mn,vn,Do){if(typeof vn!="object"||vn===null)return Do;switch(vn.$$typeof){case v_:case Al:d(fn,mn,vn);var cr=vn.key;if(typeof cr!="string")break;if(Do===null){Do=new Set,Do.add(cr);break}if(!Do.has(cr)){Do.add(cr);break}Lt(mn,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",cr)});break;case jg:vn=gy(vn),ya(fn,mn,vn,Do)}return Do}function od(fn,mn,vn,Do){for(var cr=null,gc=null,Ms=null,xa=mn,sa=mn=0,Eu=null;xa!==null&&sa<vn.length;sa++){xa.index>sa?(Eu=xa,xa=null):Eu=xa.sibling;var Hh=vi(fn,xa,vn[sa],Do);if(Hh===null){xa===null&&(xa=Eu);break}cr=ya(fn,Hh,vn[sa],cr),P&&xa&&Hh.alternate===null&&T(fn,xa),mn=Ne(Hh,mn,sa),Ms===null?gc=Hh:Ms.sibling=Hh,Ms=Hh,xa=Eu}if(sa===vn.length)return q(fn,xa),ja&&bt(fn,sa),gc;if(xa===null){for(;sa<vn.length;sa++)xa=li(fn,vn[sa],Do),xa!==null&&(cr=ya(fn,xa,vn[sa],cr),mn=Ne(xa,mn,sa),Ms===null?gc=xa:Ms.sibling=xa,Ms=xa);return ja&&bt(fn,sa),gc}for(xa=de(xa);sa<vn.length;sa++)Eu=Ws(xa,fn,sa,vn[sa],Do),Eu!==null&&(cr=ya(fn,Eu,vn[sa],cr),P&&Eu.alternate!==null&&xa.delete(Eu.key===null?sa:Eu.key),mn=Ne(Eu,mn,sa),Ms===null?gc=Eu:Ms.sibling=Eu,Ms=Eu);return P&&xa.forEach(function(y5){return T(fn,y5)}),ja&&bt(fn,sa),gc}function iQ(fn,mn,vn,Do){if(vn==null)throw Error("An iterable object provided no iterator.");for(var cr=null,gc=null,Ms=mn,xa=mn=0,sa=null,Eu=null,Hh=vn.next();Ms!==null&&!Hh.done;xa++,Hh=vn.next()){Ms.index>xa?(sa=Ms,Ms=null):sa=Ms.sibling;var y5=vi(fn,Ms,Hh.value,Do);if(y5===null){Ms===null&&(Ms=sa);break}Eu=ya(fn,y5,Hh.value,Eu),P&&Ms&&y5.alternate===null&&T(fn,Ms),mn=Ne(y5,mn,xa),gc===null?cr=y5:gc.sibling=y5,gc=y5,Ms=sa}if(Hh.done)return q(fn,Ms),ja&&bt(fn,xa),cr;if(Ms===null){for(;!Hh.done;xa++,Hh=vn.next())Ms=li(fn,Hh.value,Do),Ms!==null&&(Eu=ya(fn,Ms,Hh.value,Eu),mn=Ne(Ms,mn,xa),gc===null?cr=Ms:gc.sibling=Ms,gc=Ms);return ja&&bt(fn,xa),cr}for(Ms=de(Ms);!Hh.done;xa++,Hh=vn.next())sa=Ws(Ms,fn,xa,Hh.value,Do),sa!==null&&(Eu=ya(fn,sa,Hh.value,Eu),P&&sa.alternate!==null&&Ms.delete(sa.key===null?xa:sa.key),mn=Ne(sa,mn,xa),gc===null?cr=sa:gc.sibling=sa,gc=sa);return P&&Ms.forEach(function(_ye){return T(fn,_ye)}),ja&&bt(fn,xa),cr}function T3(fn,mn,vn,Do){if(typeof vn=="object"&&vn!==null&&vn.type===P1&&vn.key===null&&(np(vn,null,fn),vn=vn.props.children),typeof vn=="object"&&vn!==null){switch(vn.$$typeof){case v_:var cr=zc(vn._debugInfo);e:{for(var gc=vn.key;mn!==null;){if(mn.key===gc){if(gc=vn.type,gc===P1){if(mn.tag===7){q(fn,mn.sibling),Do=Se(mn,vn.props.children),Do.return=fn,Do._debugOwner=vn._owner,Do._debugInfo=vr,np(vn,Do,fn),fn=Do;break e}}else if(mn.elementType===gc||GI(mn,vn)||typeof gc=="object"&&gc!==null&&gc.$$typeof===jg&&gy(gc)===mn.type){q(fn,mn.sibling),Do=Se(mn,vn.props),Cm(Do,vn),Do.return=fn,Do._debugOwner=vn._owner,Do._debugInfo=vr,fn=Do;break e}q(fn,mn);break}else T(fn,mn);mn=mn.sibling}vn.type===P1?(Do=mu(vn.props.children,fn.mode,Do,vn.key),Do.return=fn,Do._debugOwner=fn,Do._debugTask=fn._debugTask,Do._debugInfo=vr,np(vn,Do,fn),fn=Do):(Do=H2(vn,fn.mode,Do),Cm(Do,vn),Do.return=fn,Do._debugInfo=vr,fn=Do)}return fn=ut(fn),vr=cr,fn;case Al:e:{for(cr=vn,vn=cr.key;mn!==null;){if(mn.key===vn)if(mn.tag===4&&mn.stateNode.containerInfo===cr.containerInfo&&mn.stateNode.implementation===cr.implementation){q(fn,mn.sibling),Do=Se(mn,cr.children||[]),Do.return=fn,fn=Do;break e}else{q(fn,mn);break}else T(fn,mn);mn=mn.sibling}Do=YI(cr,fn.mode,Do),Do.return=fn,fn=Do}return ut(fn);case jg:return cr=zc(vn._debugInfo),vn=gy(vn),fn=T3(fn,mn,vn,Do),vr=cr,fn}if(cs(vn))return cr=zc(vn._debugInfo),fn=od(fn,mn,vn,Do),vr=cr,fn;if(S(vn)){if(cr=zc(vn._debugInfo),gc=S(vn),typeof gc!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ms=gc.call(vn);return Ms===vn?(fn.tag!==0||Object.prototype.toString.call(fn.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ms)!=="[object Generator]")&&(D||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),D=!0):vn.entries!==gc||sC||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),sC=!0),fn=iQ(fn,mn,Ms,Do),vr=cr,fn}if(typeof vn.then=="function")return cr=zc(vn._debugInfo),fn=T3(fn,mn,y0(vn),Do),vr=cr,fn;if(vn.$$typeof===mg)return T3(fn,mn,Nr(fn,vn),Do);Dp(fn,vn)}return typeof vn=="string"&&vn!==""||typeof vn=="number"||typeof vn=="bigint"?(cr=""+vn,mn!==null&&mn.tag===6?(q(fn,mn.sibling),Do=Se(mn,cr),Do.return=fn,fn=Do):(q(fn,mn),Do=vf(cr,fn.mode,Do),Do.return=fn,Do._debugOwner=fn,Do._debugTask=fn._debugTask,Do._debugInfo=vr,fn=Do),ut(fn)):(typeof vn=="function"&&Kg(fn,vn),typeof vn=="symbol"&&Ld(fn,vn),q(fn,mn))}return function(fn,mn,vn,Do){var cr=vr;vr=null;try{dy=0;var gc=T3(fn,mn,vn,Do);return rC=null,gc}catch(Eu){if(Eu===v3||Eu===ed)throw Eu;var Ms=l(29,Eu,null,fn.mode);Ms.lanes=Do,Ms.return=fn;var xa=Ms._debugInfo=vr;if(Ms._debugOwner=fn._debugOwner,Ms._debugTask=fn._debugTask,xa!=null){for(var sa=xa.length-1;0<=sa;sa--)if(typeof xa[sa].stack=="string"){Ms._debugOwner=xa[sa],Ms._debugTask=xa[sa].debugTask;break}}return Ms}finally{vr=cr}}}function Np(P){var T=P.alternate;R(Zn,Zn.current&on,P),R(pt,P,P),St===null&&(T===null||Gf.current!==null||T.memoizedState!==null)&&(St=P)}function QI(P){if(P.tag===22){if(R(Zn,Zn.current,P),R(pt,P,P),St===null){var T=P.alternate;T!==null&&T.memoizedState!==null&&(St=P)}}else V0(P)}function V0(P){R(Zn,Zn.current,P),R(pt,pt.current,P)}function Vg(P){k(pt,P),St===P&&(St=null),k(Zn,P)}function op(P){for(var T=P;T!==null;){if(T.tag===13){var q=T.memoizedState;if(q!==null&&(q=q.dehydrated,q===null||j0(q)||w_(q)))return T}else if(T.tag===19&&T.memoizedProps.revealOrder!==void 0){if((T.flags&128)!==0)return T}else if(T.child!==null){T.child.return=T,T=T.child;continue}if(T===P)break;for(;T.sibling===null;){if(T.return===null||T.return===P)return null;T=T.return}T.sibling.return=T.return,T=T.sibling}return null}function bs(P){if(P!==null&&typeof P!="function"){var T=String(P);mr.has(T)||(mr.add(T),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",P))}}function Zo(P,T,q,de){var Se=P.memoizedState,Ne=q(de,Se);if(P.mode&8){Me(!0);try{Ne=q(de,Se)}finally{Me(!1)}}Ne===void 0&&(T=Q(T)||"Component",Mn.has(T)||(Mn.add(T),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",T))),Se=Ne==null?Se:al({},Se,Ne),P.memoizedState=Se,P.lanes===0&&(P.updateQueue.baseState=Se)}function ip(P,T,q,de,Se,Ne,ut){var Ft=P.stateNode;if(typeof Ft.shouldComponentUpdate=="function"){if(q=Ft.shouldComponentUpdate(de,Ne,ut),P.mode&8){Me(!0);try{q=Ft.shouldComponentUpdate(de,Ne,ut)}finally{Me(!1)}}return q===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",Q(T)||"Component"),q}return T.prototype&&T.prototype.isPureReactComponent?!Li(q,de)||!Li(Se,Ne):!0}function vI(P,T,q,de){var Se=T.state;typeof T.componentWillReceiveProps=="function"&&T.componentWillReceiveProps(q,de),typeof T.UNSAFE_componentWillReceiveProps=="function"&&T.UNSAFE_componentWillReceiveProps(q,de),T.state!==Se&&(P=w(P)||"Component",Gn.has(P)||(Gn.add(P),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",P)),nA.enqueueReplaceState(T,T.state,null))}function nc(P,T){var q=T;if("ref"in T){q={};for(var de in T)de!=="ref"&&(q[de]=T[de])}if(P=P.defaultProps){q===T&&(q=al({},q));for(var Se in P)q[Se]===void 0&&(q[Se]=P[Se])}return q}function i0(P,T){try{gs=T.source?w(T.source):null,kh=null;var q=T.value;if(Jn.actQueue!==null)Jn.thrownErrors.push(q);else{var de=P.onUncaughtError;de(q,{componentStack:T.stack})}}catch(Se){setTimeout(function(){throw Se})}}function Cf(P,T,q){try{gs=q.source?w(q.source):null,kh=w(T);var de=P.onCaughtError;de(q.value,{componentStack:q.stack,errorBoundary:T.tag===1?T.stateNode:null})}catch(Se){setTimeout(function(){throw Se})}}function ug(P,T,q){return q=ag(q),q.tag=$2,q.payload={element:null},q.callback=function(){Lt(T.source,i0,P,T)},q}function wI(P){return P=ag(P),P.tag=$2,P}function rp(P,T,q,de){var Se=q.type.getDerivedStateFromError;if(typeof Se=="function"){var Ne=de.value;P.payload=function(){return Se(Ne)},P.callback=function(){Hu(q),Lt(de.source,Cf,T,q,de)}}var ut=q.stateNode;ut!==null&&typeof ut.componentDidCatch=="function"&&(P.callback=function(){Hu(q),Lt(de.source,Cf,T,q,de),typeof Se!="function"&&(Om===null?Om=new Set([this]):Om.add(this)),Gr(this,de),typeof Se=="function"||(q.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",w(q)||"Unknown")})}function Rp(P,T,q,de,Se){if(q.flags|=32768,Ae&&Qf(P,Se),de!==null&&typeof de=="object"&&typeof de.then=="function"){if(T=q.alternate,T!==null&&ko(T,q,Se,!0),ja&&(z2=!0),q=pt.current,q!==null){switch(q.tag){case 13:return St===null?R2():q.alternate===null&&_l===nx&&(_l=hte),q.flags&=-257,q.flags|=65536,q.lanes=Se,de===hp?q.flags|=16384:(T=q.updateQueue,T===null?q.updateQueue=new Set([de]):T.add(de),Sf(P,de,Se)),!1;case 22:return q.flags|=65536,de===hp?q.flags|=16384:(T=q.updateQueue,T===null?(T={transitions:null,markerInstances:null,retryQueue:new Set([de])},q.updateQueue=T):(q=T.retryQueue,q===null?T.retryQueue=new Set([de]):q.add(de)),Sf(P,de,Se)),!1}throw Error("Unexpected Suspense handler tag ("+q.tag+"). This is a bug in React.")}return Sf(P,de,Se),R2(),!1}if(ja)return z2=!0,T=pt.current,T!==null?((T.flags&65536)===0&&(T.flags|=256),T.flags|=65536,T.lanes=Se,de!==ZI&&ei(gt(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:de}),q))):(de!==ZI&&ei(gt(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:de}),q)),P=P.current.alternate,P.flags|=65536,Se&=-Se,P.lanes|=Se,de=gt(de,q),Se=ug(P.stateNode,de,Se),mm(P,Se),_l!==M3&&(_l=em)),!1;var Ne=gt(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:de}),q);if(AC===null?AC=[Ne]:AC.push(Ne),_l!==M3&&(_l=em),T===null)return!0;de=gt(de,q),q=T;do{switch(q.tag){case 3:return q.flags|=65536,P=Se&-Se,q.lanes|=P,P=ug(q.stateNode,de,P),mm(q,P),!1;case 1:if(T=q.type,Ne=q.stateNode,(q.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||Ne!==null&&typeof Ne.componentDidCatch=="function"&&(Om===null||!Om.has(Ne))))return q.flags|=65536,Se&=-Se,q.lanes|=Se,Se=wI(Se),rp(Se,P,q,de),mm(q,Se),!1}q=q.return}while(q!==null);return!1}function oc(P,T,q,de){T.child=P===null?Fe(T,null,q,de):xe(T,P.child,q,de)}function gg(P,T,q,de,Se){q=q.render;var Ne=T.ref;if("ref"in de){var ut={};for(var Ft in de)Ft!=="ref"&&(ut[Ft]=de[Ft])}else ut=de;return mi(T),Qe(T),de=mf(P,T,q,ut,Ne,Se),Ft=du(),Pe(),P!==null&&!xu?(cg(P,T,Se),Fu(P,T,Se)):(ja&&Ft&&Dt(T),T.flags|=1,oc(P,T,de,Se),T.child)}function Cc(P,T,q,de,Se){if(P===null){var Ne=q.type;return typeof Ne=="function"&&!zr(Ne)&&Ne.defaultProps===void 0&&q.compare===null?(q=$C(Ne),T.tag=15,T.type=q,kp(T,Ne),pa(P,T,q,de,Se)):(P=Bh(q.type,null,de,T,T.mode,Se),P.ref=T.ref,P.return=T,T.child=P)}if(Ne=P.child,!sp(P,Se)){var ut=Ne.memoizedProps;if(q=q.compare,q=q!==null?q:Li,q(ut,de)&&P.ref===T.ref)return Fu(P,T,Se)}return T.flags|=1,P=v1(Ne,de),P.ref=T.ref,P.return=T,T.child=P}function pa(P,T,q,de,Se){if(P!==null){var Ne=P.memoizedProps;if(Li(Ne,de)&&P.ref===T.ref&&T.type===P.type)if(xu=!1,T.pendingProps=de=Ne,sp(P,Se))(P.flags&131072)!==0&&(xu=!0);else return T.lanes=P.lanes,Fu(P,T,Se)}return rl(P,T,q,de,Se)}function c3(P,T,q){var de=T.pendingProps,Se=de.children,Ne=P!==null?P.memoizedState:null;if(de.mode==="hidden"){if((T.flags&128)!==0){if(de=Ne!==null?Ne.baseLanes|q:q,P!==null){for(Se=T.child=P.child,Ne=0;Se!==null;)Ne=Ne|Se.lanes|Se.childLanes,Se=Se.sibling;T.childLanes=Ne&~de}else T.childLanes=0,T.child=null;return PI(P,T,de,q)}if((q&536870912)!==0)T.memoizedState={baseLanes:0,cachePool:null},P!==null&&oa(T,Ne!==null?Ne.cachePool:null),Ne!==null?__(T,Ne):Qp(T),QI(T);else return T.lanes=T.childLanes=536870912,PI(P,T,Ne!==null?Ne.baseLanes|q:q,q)}else Ne!==null?(oa(T,Ne.cachePool),__(T,Ne),V0(T),T.memoizedState=null):(P!==null&&oa(T,null),Qp(T),V0(T));return oc(P,T,Se,q),T.child}function PI(P,T,q,de){var Se=gr();return Se=Se===null?null:{parent:jc?Wn._currentValue:Wn._currentValue2,pool:Se},T.memoizedState={baseLanes:q,cachePool:Se},P!==null&&oa(T,null),Qp(T),QI(T),P!==null&&ko(P,T,de,!0),null}function Tp(P,T){var q=T.ref;if(q===null)P!==null&&P.ref!==null&&(T.flags|=4194816);else{if(typeof q!="function"&&typeof q!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(P===null||P.ref!==q)&&(T.flags|=4194816)}}function rl(P,T,q,de,Se){if(q.prototype&&typeof q.prototype.render=="function"){var Ne=Q(q)||"Unknown";MK[Ne]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",Ne,Ne),MK[Ne]=!0)}return T.mode&8&&nC.recordLegacyContextWarning(T,null),P===null&&(kp(T,T.type),q.contextTypes&&(Ne=Q(q)||"Unknown",Aye[Ne]||(Aye[Ne]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",Ne)))),mi(T),Qe(T),q=mf(P,T,q,de,void 0,Se),de=du(),Pe(),P!==null&&!xu?(cg(P,T,Se),Fu(P,T,Se)):(ja&&de&&Dt(T),T.flags|=1,oc(P,T,q,Se),T.child)}function IA(P,T,q,de,Se,Ne){return mi(T),Qe(T),X=-1,me=P!==null&&P.type!==T.type,T.updateQueue=null,q=_f(T,de,q,Se),LC(P,T),de=du(),Pe(),P!==null&&!xu?(cg(P,T,Ne),Fu(P,T,Ne)):(ja&&de&&Dt(T),T.flags|=1,oc(P,T,q,Ne),T.child)}function uA(P,T,q,de,Se){switch(c(T)){case!1:var Ne=T.stateNode,ut=new T.type(T.memoizedProps,Ne.context).state;Ne.updater.enqueueSetState(Ne,ut,null);break;case!0:T.flags|=128,T.flags|=65536,Ne=Error("Simulated error coming from DevTools");var Ft=Se&-Se;if(T.lanes|=Ft,ut=wl,ut===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");Ft=wI(Ft),rp(Ft,ut,T,gt(Ne,T)),mm(T,Ft)}if(mi(T),T.stateNode===null){if(ut=zp,Ne=q.contextType,"contextType"in q&&Ne!==null&&(Ne===void 0||Ne.$$typeof!==mg)&&!Mo.has(q)&&(Mo.add(q),Ft=Ne===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof Ne!="object"?" However, it is set to a "+typeof Ne+".":Ne.$$typeof===Mm?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(Ne).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",Q(q)||"Component",Ft)),typeof Ne=="object"&&Ne!==null&&(ut=Fo(Ne)),Ne=new q(de,ut),T.mode&8){Me(!0);try{Ne=new q(de,ut)}finally{Me(!1)}}if(ut=T.memoizedState=Ne.state!==null&&Ne.state!==void 0?Ne.state:null,Ne.updater=nA,T.stateNode=Ne,Ne._reactInternals=T,Ne._reactInternalInstance=Qo,typeof q.getDerivedStateFromProps=="function"&&ut===null&&(ut=Q(q)||"Component",jn.has(ut)||(jn.add(ut),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",ut,Ne.state===null?"null":"undefined",ut))),typeof q.getDerivedStateFromProps=="function"||typeof Ne.getSnapshotBeforeUpdate=="function"){var Tn=Ft=ut=null;if(typeof Ne.componentWillMount=="function"&&Ne.componentWillMount.__suppressDeprecationWarning!==!0?ut="componentWillMount":typeof Ne.UNSAFE_componentWillMount=="function"&&(ut="UNSAFE_componentWillMount"),typeof Ne.componentWillReceiveProps=="function"&&Ne.componentWillReceiveProps.__suppressDeprecationWarning!==!0?Ft="componentWillReceiveProps":typeof Ne.UNSAFE_componentWillReceiveProps=="function"&&(Ft="UNSAFE_componentWillReceiveProps"),typeof Ne.componentWillUpdate=="function"&&Ne.componentWillUpdate.__suppressDeprecationWarning!==!0?Tn="componentWillUpdate":typeof Ne.UNSAFE_componentWillUpdate=="function"&&(Tn="UNSAFE_componentWillUpdate"),ut!==null||Ft!==null||Tn!==null){Ne=Q(q)||"Component";var _o=typeof q.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";br.has(Ne)||(br.add(Ne),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.

%s uses %s but also contains the following legacy lifecycles:%s%s%s

The above lifecycles should be removed. Learn more about this warning here:
https://react.dev/link/unsafe-component-lifecycles`,Ne,_o,ut!==null?`
  `+ut:"",Ft!==null?`
  `+Ft:"",Tn!==null?`
  `+Tn:""))}}Ne=T.stateNode,ut=Q(q)||"Component",Ne.render||(q.prototype&&typeof q.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",ut):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",ut)),!Ne.getInitialState||Ne.getInitialState.isReactClassApproved||Ne.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",ut),Ne.getDefaultProps&&!Ne.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",ut),Ne.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",ut),q.childContextTypes&&!Un.has(q)&&(Un.add(q),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",ut)),q.contextTypes&&!Cn.has(q)&&(Cn.add(q),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",ut)),typeof Ne.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",ut),q.prototype&&q.prototype.isPureReactComponent&&typeof Ne.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",Q(q)||"A pure component"),typeof Ne.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",ut),typeof Ne.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",ut),typeof Ne.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",ut),typeof Ne.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",ut),Ft=Ne.props!==de,Ne.props!==void 0&&Ft&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",ut),Ne.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",ut,ut),typeof Ne.getSnapshotBeforeUpdate!="function"||typeof Ne.componentDidUpdate=="function"||wr.has(q)||(wr.add(q),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",Q(q))),typeof Ne.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",ut),typeof Ne.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",ut),typeof q.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",ut),(Ft=Ne.state)&&(typeof Ft!="object"||cs(Ft))&&console.error("%s.state: must be set to an object or null",ut),typeof Ne.getChildContext=="function"&&typeof q.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",ut),Ne=T.stateNode,Ne.props=de,Ne.state=T.memoizedState,Ne.refs={},Ul(T),ut=q.contextType,Ne.context=typeof ut=="object"&&ut!==null?Fo(ut):zp,Ne.state===de&&(ut=Q(q)||"Component",tA.has(ut)||(tA.add(ut),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",ut))),T.mode&8&&nC.recordLegacyContextWarning(T,Ne),nC.recordUnsafeLifecycleWarnings(T,Ne),Ne.state=T.memoizedState,ut=q.getDerivedStateFromProps,typeof ut=="function"&&(Zo(T,q,ut,de),Ne.state=T.memoizedState),typeof q.getDerivedStateFromProps=="function"||typeof Ne.getSnapshotBeforeUpdate=="function"||typeof Ne.UNSAFE_componentWillMount!="function"&&typeof Ne.componentWillMount!="function"||(ut=Ne.state,typeof Ne.componentWillMount=="function"&&Ne.componentWillMount(),typeof Ne.UNSAFE_componentWillMount=="function"&&Ne.UNSAFE_componentWillMount(),ut!==Ne.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",w(T)||"Component"),nA.enqueueReplaceState(Ne,Ne.state,null)),Ag(T,de,Ne,Se),gu(),Ne.state=T.memoizedState),typeof Ne.componentDidMount=="function"&&(T.flags|=4194308),(T.mode&16)!==yA&&(T.flags|=134217728),Ne=!0}else if(P===null){Ne=T.stateNode;var di=T.memoizedProps;Ft=nc(q,di),Ne.props=Ft;var li=Ne.context;Tn=q.contextType,ut=zp,typeof Tn=="object"&&Tn!==null&&(ut=Fo(Tn)),_o=q.getDerivedStateFromProps,Tn=typeof _o=="function"||typeof Ne.getSnapshotBeforeUpdate=="function",di=T.pendingProps!==di,Tn||typeof Ne.UNSAFE_componentWillReceiveProps!="function"&&typeof Ne.componentWillReceiveProps!="function"||(di||li!==ut)&&vI(T,Ne,de,ut),q2=!1;var vi=T.memoizedState;Ne.state=vi,Ag(T,de,Ne,Se),gu(),li=T.memoizedState,di||vi!==li||q2?(typeof _o=="function"&&(Zo(T,q,_o,de),li=T.memoizedState),(Ft=q2||ip(T,q,Ft,de,vi,li,ut))?(Tn||typeof Ne.UNSAFE_componentWillMount!="function"&&typeof Ne.componentWillMount!="function"||(typeof Ne.componentWillMount=="function"&&Ne.componentWillMount(),typeof Ne.UNSAFE_componentWillMount=="function"&&Ne.UNSAFE_componentWillMount()),typeof Ne.componentDidMount=="function"&&(T.flags|=4194308),(T.mode&16)!==yA&&(T.flags|=134217728)):(typeof Ne.componentDidMount=="function"&&(T.flags|=4194308),(T.mode&16)!==yA&&(T.flags|=134217728),T.memoizedProps=de,T.memoizedState=li),Ne.props=de,Ne.state=li,Ne.context=ut,Ne=Ft):(typeof Ne.componentDidMount=="function"&&(T.flags|=4194308),(T.mode&16)!==yA&&(T.flags|=134217728),Ne=!1)}else{Ne=T.stateNode,m_(P,T),ut=T.memoizedProps,Tn=nc(q,ut),Ne.props=Tn,_o=T.pendingProps,vi=Ne.context,li=q.contextType,Ft=zp,typeof li=="object"&&li!==null&&(Ft=Fo(li)),di=q.getDerivedStateFromProps,(li=typeof di=="function"||typeof Ne.getSnapshotBeforeUpdate=="function")||typeof Ne.UNSAFE_componentWillReceiveProps!="function"&&typeof Ne.componentWillReceiveProps!="function"||(ut!==_o||vi!==Ft)&&vI(T,Ne,de,Ft),q2=!1,vi=T.memoizedState,Ne.state=vi,Ag(T,de,Ne,Se),gu();var Ws=T.memoizedState;ut!==_o||vi!==Ws||q2||P!==null&&P.dependencies!==null&&Ko(P.dependencies)?(typeof di=="function"&&(Zo(T,q,di,de),Ws=T.memoizedState),(Tn=q2||ip(T,q,Tn,de,vi,Ws,Ft)||P!==null&&P.dependencies!==null&&Ko(P.dependencies))?(li||typeof Ne.UNSAFE_componentWillUpdate!="function"&&typeof Ne.componentWillUpdate!="function"||(typeof Ne.componentWillUpdate=="function"&&Ne.componentWillUpdate(de,Ws,Ft),typeof Ne.UNSAFE_componentWillUpdate=="function"&&Ne.UNSAFE_componentWillUpdate(de,Ws,Ft)),typeof Ne.componentDidUpdate=="function"&&(T.flags|=4),typeof Ne.getSnapshotBeforeUpdate=="function"&&(T.flags|=1024)):(typeof Ne.componentDidUpdate!="function"||ut===P.memoizedProps&&vi===P.memoizedState||(T.flags|=4),typeof Ne.getSnapshotBeforeUpdate!="function"||ut===P.memoizedProps&&vi===P.memoizedState||(T.flags|=1024),T.memoizedProps=de,T.memoizedState=Ws),Ne.props=de,Ne.state=Ws,Ne.context=Ft,Ne=Tn):(typeof Ne.componentDidUpdate!="function"||ut===P.memoizedProps&&vi===P.memoizedState||(T.flags|=4),typeof Ne.getSnapshotBeforeUpdate!="function"||ut===P.memoizedProps&&vi===P.memoizedState||(T.flags|=1024),Ne=!1)}if(Ft=Ne,Tp(P,T),ut=(T.flags&128)!==0,Ft||ut){if(Ft=T.stateNode,Ho(T),ut&&typeof q.getDerivedStateFromError!="function")q=null,Rh=-1;else{if(Qe(T),q=pr(Ft),T.mode&8){Me(!0);try{pr(Ft)}finally{Me(!1)}}Pe()}T.flags|=1,P!==null&&ut?(T.child=xe(T,P.child,null,Se),T.child=xe(T,null,q,Se)):oc(P,T,q,Se),T.memoizedState=Ft.state,P=T.child}else P=Fu(P,T,Se);return Se=T.stateNode,Ne&&Se.props!==de&&($S||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",w(T)||"a component"),$S=!0),P}function ym(P,T,q,de){return Nn(),T.flags|=256,oc(P,T,q,de),T.child}function kp(P,T){T&&T.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
  %s.childContextTypes = ...`,T.displayName||T.name||"Component"),typeof T.getDerivedStateFromProps=="function"&&(P=Q(T)||"Unknown",cye[P]||(console.error("%s: Function components do not support getDerivedStateFromProps.",P),cye[P]=!0)),typeof T.contextType=="object"&&T.contextType!==null&&(T=Q(T)||"Unknown",aye[T]||(console.error("%s: Function components do not support contextType.",T),aye[T]=!0))}function C1(P){return{baseLanes:P,cachePool:hs()}}function xm(P,T,q){return P=P!==null?P.childLanes&~q:0,T&&(P|=Q0),P}function I2(P,T,q){var de=T.pendingProps;A(T)&&(T.flags|=128);var Se=!1,Ne=(T.flags&128)!==0,ut;if((ut=Ne)||(ut=P!==null&&P.memoizedState===null?!1:(Zn.current&Pn)!==0),ut&&(Se=!0,T.flags&=-129),ut=(T.flags&32)!==0,T.flags&=-33,P===null){if(ja){if(Se?Np(T):V0(T),ja){var Ft=Ma,Tn;(Tn=!Ft)||(Tn=Vp(Ft,Wd),Tn!==null?(it(),T.memoizedState={dehydrated:Tn,treeContext:eA!==null?{id:Or,overflow:Js}:null,retryLane:536870912,hydrationErrors:null},Ne=l(18,null,null,yA),Ne.stateNode=Tn,Ne.return=T,T.child=Ne,gp=T,Ma=null,Tn=!0):Tn=!1,Tn=!Tn),Tn&&(qe(T,Ft),vt(T))}if(Ft=T.memoizedState,Ft!==null&&(Ft=Ft.dehydrated,Ft!==null))return w_(Ft)?T.lanes=32:T.lanes=536870912,null;Vg(T)}return Ft=de.children,de=de.fallback,Se?(V0(T),Se=T.mode,Ft=I_({mode:"hidden",children:Ft},Se),de=mu(de,Se,q,null),Ft.return=T,de.return=T,Ft.sibling=de,T.child=Ft,Se=T.child,Se.memoizedState=C1(q),Se.childLanes=xm(P,ut,q),T.memoizedState=dte,de):(Np(T),y1(T,Ft))}if(Tn=P.memoizedState,Tn!==null&&(Ft=Tn.dehydrated,Ft!==null)){if(Ne)T.flags&256?(Np(T),T.flags&=-257,T=MI(P,T,q)):T.memoizedState!==null?(V0(T),T.child=P.child,T.flags|=128,T=null):(V0(T),Se=de.fallback,Ft=T.mode,de=I_({mode:"visible",children:de.children},Ft),Se=mu(Se,Ft,q,null),Se.flags|=2,de.return=T,Se.return=T,de.sibling=Se,T.child=de,xe(T,P.child,null,q),de=T.child,de.memoizedState=C1(q),de.childLanes=xm(P,ut,q),T.memoizedState=dte,T=Se);else if(Np(T),ja&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug."),w_(Ft))Ft=$0(Ft),ut=Ft.digest,Se=Ft.message,de=Ft.stack,Ft=Ft.componentStack,Se=Error(Se||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),Se.stack=de||"",Se.digest=ut,ut=Ft===void 0?null:Ft,de={value:Se,source:null,stack:ut},typeof ut=="string"&&L1.set(Se,de),ei(de),T=MI(P,T,q);else if(xu||ko(P,T,q,!1),ut=(q&P.childLanes)!==0,xu||ut){if(ut=wl,ut!==null&&(de=q&-q,de=(de&42)!==0?1:_e(de),de=(de&(ut.suspendedLanes|q))!==0?0:de,de!==0&&de!==Tn.retryLane))throw Tn.retryLane=de,fc(P,de),s0(ut,P,de),uc;j0(Ft)||R2(),T=MI(P,T,q)}else j0(Ft)?(T.flags|=192,T.child=P.child,T=null):(P=Tn.treeContext,B0&&(Ma=vh(Ft),gp=T,ja=!0,Ff=null,z2=!1,ms=null,Wd=!1,P!==null&&(it(),zo[Bi++]=Or,zo[Bi++]=Js,zo[Bi++]=eA,Or=P.id,Js=P.overflow,eA=T)),T=y1(T,de.children),T.flags|=4096);return T}return Se?(V0(T),Se=de.fallback,Ft=T.mode,Tn=P.child,Ne=Tn.sibling,de=v1(Tn,{mode:"hidden",children:de.children}),de.subtreeFlags=Tn.subtreeFlags&65011712,Ne!==null?Se=v1(Ne,Se):(Se=mu(Se,Ft,q,null),Se.flags|=2),Se.return=T,de.return=T,de.sibling=Se,T.child=de,de=Se,Se=T.child,Ft=P.child.memoizedState,Ft===null?Ft=C1(q):(Tn=Ft.cachePool,Tn!==null?(Ne=jc?Wn._currentValue:Wn._currentValue2,Tn=Tn.parent!==Ne?{parent:Ne,pool:Ne}:Tn):Tn=hs(),Ft={baseLanes:Ft.baseLanes|q,cachePool:Tn}),Se.memoizedState=Ft,Se.childLanes=xm(P,ut,q),T.memoizedState=dte,de):(Np(T),q=P.child,P=q.sibling,q=v1(q,{mode:"visible",children:de.children}),q.return=T,q.sibling=null,P!==null&&(ut=T.deletions,ut===null?(T.deletions=[P],T.flags|=16):ut.push(P)),T.child=q,T.memoizedState=null,q)}function y1(P,T){return T=I_({mode:"visible",children:T},P.mode),T.return=P,P.child=T}function I_(P,T){return P=l(22,P,null,T),P.lanes=0,P.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},P}function MI(P,T,q){return xe(T,P.child,null,q),P=y1(T,T.pendingProps.children),P.flags|=2,T.memoizedState=null,P}function VE(P,T,q){P.lanes|=T;var de=P.alternate;de!==null&&(de.lanes|=T),uo(P.return,T,q)}function GC(P,T){var q=cs(P);return P=!q&&typeof S(P)=="function",q||P?(q=q?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",q,T,q),!1):!0}function YC(P,T,q,de,Se){var Ne=P.memoizedState;Ne===null?P.memoizedState={isBackwards:T,rendering:null,renderingStartTime:0,last:de,tail:q,tailMode:Se}:(Ne.isBackwards=T,Ne.rendering=null,Ne.renderingStartTime=0,Ne.last=de,Ne.tail=q,Ne.tailMode=Se)}function yf(P,T,q){var de=T.pendingProps,Se=de.revealOrder,Ne=de.tail;if(de=de.children,Se!==void 0&&Se!=="forwards"&&Se!=="backwards"&&Se!=="together"&&!lye[Se])if(lye[Se]=!0,typeof Se=="string")switch(Se.toLowerCase()){case"together":case"forwards":case"backwards":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',Se,Se.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',Se,Se.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',Se)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',Se);Ne===void 0||gte[Ne]||(Ne!=="collapsed"&&Ne!=="hidden"?(gte[Ne]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',Ne)):Se!=="forwards"&&Se!=="backwards"&&(gte[Ne]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',Ne)));e:if((Se==="forwards"||Se==="backwards")&&de!==void 0&&de!==null&&de!==!1)if(cs(de)){for(var ut=0;ut<de.length;ut++)if(!GC(de[ut],ut))break e}else if(ut=S(de),typeof ut=="function"){if(ut=ut.call(de))for(var Ft=ut.next(),Tn=0;!Ft.done;Ft=ut.next()){if(!GC(Ft.value,Tn))break e;Tn++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Se);if(oc(P,T,de,q),de=Zn.current,(de&Pn)!==0)de=de&on|Pn,T.flags|=128;else{if(P!==null&&(P.flags&128)!==0)e:for(P=T.child;P!==null;){if(P.tag===13)P.memoizedState!==null&&VE(P,q,T);else if(P.tag===19)VE(P,q,T);else if(P.child!==null){P.child.return=P,P=P.child;continue}if(P===T)break e;for(;P.sibling===null;){if(P.return===null||P.return===T)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}de&=on}switch(R(Zn,de,T),Se){case"forwards":for(q=T.child,Se=null;q!==null;)P=q.alternate,P!==null&&op(P)===null&&(Se=q),q=q.sibling;q=Se,q===null?(Se=T.child,T.child=null):(Se=q.sibling,q.sibling=null),YC(T,!1,Se,q,Ne);break;case"backwards":for(q=null,Se=T.child,T.child=null;Se!==null;){if(P=Se.alternate,P!==null&&op(P)===null){T.child=Se;break}P=Se.sibling,Se.sibling=q,q=Se,Se=P}YC(T,!0,q,null,Ne);break;case"together":YC(T,!1,null,null,void 0);break;default:T.memoizedState=null}return T.child}function Fu(P,T,q){if(P!==null&&(T.dependencies=P.dependencies),Rh=-1,ox|=T.lanes,(q&T.childLanes)===0)if(P!==null){if(ko(P,T,q,!1),(q&T.childLanes)===0)return null}else return null;if(P!==null&&T.child!==P.child)throw Error("Resuming work not yet implemented.");if(T.child!==null){for(P=T.child,q=v1(P,P.pendingProps),T.child=q,q.return=T;P.sibling!==null;)P=P.sibling,q=q.sibling=v1(P,P.pendingProps),q.return=T;q.sibling=null}return T.child}function sp(P,T){return(P.lanes&T)!==0?!0:(P=P.dependencies,!!(P!==null&&Ko(P)))}function xf(P,T,q){switch(T.tag){case 3:pn(T,T.stateNode.containerInfo),Ro(T,Wn,P.memoizedState.cache),Nn();break;case 27:case 5:It(T);break;case 4:pn(T,T.stateNode.containerInfo);break;case 10:Ro(T,T.type,T.memoizedProps.value);break;case 12:(q&T.childLanes)!==0&&(T.flags|=4),T.flags|=2048;var de=T.stateNode;de.effectDuration=-0,de.passiveEffectDuration=-0;break;case 13:if(de=T.memoizedState,de!==null)return de.dehydrated!==null?(Np(T),T.flags|=128,null):(q&T.child.childLanes)!==0?I2(P,T,q):(Np(T),P=Fu(P,T,q),P!==null?P.sibling:null);Np(T);break;case 19:var Se=(P.flags&128)!==0;if(de=(q&T.childLanes)!==0,de||(ko(P,T,q,!1),de=(q&T.childLanes)!==0),Se){if(de)return yf(P,T,q);T.flags|=128}if(Se=T.memoizedState,Se!==null&&(Se.rendering=null,Se.tail=null,Se.lastEffect=null),R(Zn,Zn.current,T),de)break;return null;case 22:case 23:return T.lanes=0,c3(P,T,q);case 24:Ro(T,Wn,P.memoizedState.cache)}return Fu(P,T,q)}function C2(P,T,q){if(T._debugNeedsRemount&&P!==null){q=Bh(T.type,T.key,T.pendingProps,T._debugOwner||null,T.mode,T.lanes),q._debugStack=T._debugStack,q._debugTask=T._debugTask;var de=T.return;if(de===null)throw Error("Cannot swap the root fiber.");if(P.alternate=null,T.alternate=null,q.index=T.index,q.sibling=T.sibling,q.return=T.return,q.ref=T.ref,q._debugInfo=T._debugInfo,T===de.child)de.child=q;else{var Se=de.child;if(Se===null)throw Error("Expected parent to have a child.");for(;Se.sibling!==T;)if(Se=Se.sibling,Se===null)throw Error("Expected to find the previous sibling.");Se.sibling=q}return T=de.deletions,T===null?(de.deletions=[P],de.flags|=16):T.push(P),q.flags|=2,q}if(P!==null)if(P.memoizedProps!==T.pendingProps||T.type!==P.type)xu=!0;else{if(!sp(P,q)&&(T.flags&128)===0)return xu=!1,xf(P,T,q);xu=(P.flags&131072)!==0}else xu=!1,(de=ja)&&(it(),de=(T.flags&1048576)!==0),de&&(de=T.index,it(),Ct(T,to,de));switch(T.lanes=0,T.tag){case 16:e:if(de=T.pendingProps,P=gy(T.elementType),T.type=P,typeof P=="function")zr(P)?(de=nc(P,de),T.tag=1,T.type=P=$C(P),T=uA(null,T,P,de,q)):(T.tag=0,kp(T,P),T.type=P=$C(P),T=rl(null,T,P,de,q));else{if(P!=null){if(Se=P.$$typeof,Se===_g){T.tag=11,T.type=P=L2(P),T=gg(null,T,P,de,q);break e}else if(Se===RA){T.tag=14,T=Cc(null,T,P,de,q);break e}}throw T="",P!==null&&typeof P=="object"&&P.$$typeof===jg&&(T=" Did you wrap a component in React.lazy() more than once?"),P=Q(P)||P,Error("Element type is invalid. Received a promise that resolves to: "+P+". Lazy element type must resolve to a class or function."+T)}return T;case 0:return rl(P,T,T.type,T.pendingProps,q);case 1:return de=T.type,Se=nc(de,T.pendingProps),uA(P,T,de,Se,q);case 3:e:{if(pn(T,T.stateNode.containerInfo),P===null)throw Error("Should have a current fiber. This is a bug in React.");var Ne=T.pendingProps;Se=T.memoizedState,de=Se.element,m_(P,T),Ag(T,Ne,null,q);var ut=T.memoizedState;if(Ne=ut.cache,Ro(T,Wn,Ne),Ne!==Se.cache&&Oo(T,[Wn],q,!0),gu(),Ne=ut.element,B0&&Se.isDehydrated)if(Se={element:Ne,isDehydrated:!1,cache:ut.cache},T.updateQueue.baseState=Se,T.memoizedState=Se,T.flags&256){T=ym(P,T,Ne,q);break e}else if(Ne!==de){de=gt(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),T),ei(de),T=ym(P,T,Ne,q);break e}else for(B0&&(Ma=jI(T.stateNode.containerInfo),gp=T,ja=!0,Ff=null,z2=!1,ms=null,Wd=!0),P=Fe(T,null,Ne,q),T.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Nn(),Ne===de){T=Fu(P,T,q);break e}oc(P,T,Ne,q)}T=T.child}return T;case 26:if(xc)return Tp(P,T),P===null?(P=T1(T.type,null,T.pendingProps,null))?T.memoizedState=P:ja||(T.stateNode=qI(T.type,T.pendingProps,Yt(Bg.current),T)):T.memoizedState=T1(T.type,P.memoizedProps,T.pendingProps,P.memoizedState),null;case 27:if(os)return It(T),P===null&&os&&ja&&(Se=Yt(Bg.current),de=et(),Se=T.stateNode=l0(T.type,T.pendingProps,Se,de,!1),z2||(de=y3(Se,T.type,T.pendingProps,de),de!==null&&(Ao(T,0).serverProps=de)),gp=T,Wd=!0,Ma=R1(T.type,Se,Ma)),oc(P,T,T.pendingProps.children,q),Tp(P,T),P===null&&(T.flags|=4194304),T.child;case 5:return P===null&&ja&&(Ne=et(),de=qc(T.type,T.pendingProps,Ne),Se=Ma,(ut=!Se)||(ut=Cu(Se,T.type,T.pendingProps,Wd),ut!==null?(T.stateNode=ut,z2||(Ne=y3(ut,T.type,T.pendingProps,Ne),Ne!==null&&(Ao(T,0).serverProps=Ne)),gp=T,Ma=u5(ut),Wd=!1,Ne=!0):Ne=!1,ut=!Ne),ut&&(de&&qe(T,Se),vt(T))),It(T),Se=T.type,Ne=T.pendingProps,ut=P!==null?P.memoizedProps:null,de=Ne.children,Pf(Se,Ne)?de=null:ut!==null&&Pf(Se,ut)&&(T.flags|=32),T.memoizedState!==null&&(Se=mf(P,T,_m,null,null,q),jc?Kl._currentValue=Se:Kl._currentValue2=Se),Tp(P,T),oc(P,T,de,q),T.child;case 6:return P===null&&ja&&(P=T.pendingProps,q=et(),P=Yu(P,q),q=Ma,(de=!q)||(de=N4(q,T.pendingProps,Wd),de!==null?(T.stateNode=de,gp=T,Ma=null,de=!0):de=!1,de=!de),de&&(P&&qe(T,q),vt(T))),null;case 13:return I2(P,T,q);case 4:return pn(T,T.stateNode.containerInfo),de=T.pendingProps,P===null?T.child=xe(T,null,de,q):oc(P,T,de,q),T.child;case 11:return gg(P,T,T.type,T.pendingProps,q);case 7:return oc(P,T,T.pendingProps,q),T.child;case 8:return oc(P,T,T.pendingProps.children,q),T.child;case 12:return T.flags|=4,T.flags|=2048,de=T.stateNode,de.effectDuration=-0,de.passiveEffectDuration=-0,oc(P,T,T.pendingProps.children,q),T.child;case 10:return de=T.type,Se=T.pendingProps,Ne=Se.value,"value"in Se||uye||(uye=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Ro(T,de,Ne),oc(P,T,Se.children,q),T.child;case 9:return Se=T.type._context,de=T.pendingProps.children,typeof de!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),mi(T),Se=Fo(Se),Qe(T),de=ci(de,Se,void 0),Pe(),T.flags|=1,oc(P,T,de,q),T.child;case 14:return Cc(P,T,T.type,T.pendingProps,q);case 15:return pa(P,T,T.type,T.pendingProps,q);case 19:return yf(P,T,q);case 31:return de=T.pendingProps,q=T.mode,de={mode:de.mode,children:de.children},P===null?(P=I_(de,q),P.ref=T.ref,T.child=P,P.return=T,T=P):(P=v1(P.child,de),P.ref=T.ref,T.child=P,P.return=T,T=P),T;case 22:return c3(P,T,q);case 24:return mi(T),de=Fo(Wn),P===null?(Se=gr(),Se===null&&(Se=wl,Ne=ur(),Se.pooledCache=Ne,zi(Ne),Ne!==null&&(Se.pooledCacheLanes|=q),Se=Ne),T.memoizedState={parent:de,cache:Se},Ul(T),Ro(T,Wn,Se)):((P.lanes&q)!==0&&(m_(P,T),Ag(T,null,null,q),gu()),Se=P.memoizedState,Ne=T.memoizedState,Se.parent!==de?(Se={parent:de,cache:de},T.memoizedState=Se,T.lanes===0&&(T.memoizedState=T.updateQueue.baseState=Se),Ro(T,Wn,de)):(de=Ne.cache,Ro(T,Wn,de),de!==Se.cache&&Oo(T,[Wn],q,!0))),oc(P,T,T.pendingProps.children,q),T.child;case 29:throw T.pendingProps}throw Error("Unknown unit of work tag ("+T.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function $s(P){P.flags|=4}function DI(P,T){if(P!==null&&P.child===T.child)return!1;if((T.flags&16)!==0)return!0;for(P=T.child;P!==null;){if((P.flags&13878)!==0||(P.subtreeFlags&13878)!==0)return!0;P=P.sibling}return!1}function y2(P,T,q,de){if(cl)for(q=T.child;q!==null;){if(q.tag===5||q.tag===6)ZC(P,q.stateNode);else if(!(q.tag===4||os&&q.tag===27)&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===T)break;for(;q.sibling===null;){if(q.return===null||q.return===T)return;q=q.return}q.sibling.return=q.return,q=q.sibling}else if(Ou)for(var Se=T.child;Se!==null;){if(Se.tag===5){var Ne=Se.stateNode;q&&de&&(Ne=zs(Ne,Se.type,Se.memoizedProps)),ZC(P,Ne)}else if(Se.tag===6)Ne=Se.stateNode,q&&de&&(Ne=Rm(Ne,Se.memoizedProps)),ZC(P,Ne);else if(Se.tag!==4){if(Se.tag===22&&Se.memoizedState!==null)Ne=Se.child,Ne!==null&&(Ne.return=Se),y2(P,Se,!0,!0);else if(Se.child!==null){Se.child.return=Se,Se=Se.child;continue}}if(Se===T)break;for(;Se.sibling===null;){if(Se.return===null||Se.return===T)return;Se=Se.return}Se.sibling.return=Se.return,Se=Se.sibling}}function x1(P,T,q,de){var Se=!1;if(Ou)for(var Ne=T.child;Ne!==null;){if(Ne.tag===5){var ut=Ne.stateNode;q&&de&&(ut=zs(ut,Ne.type,Ne.memoizedProps)),Fc(P,ut)}else if(Ne.tag===6)ut=Ne.stateNode,q&&de&&(ut=Rm(ut,Ne.memoizedProps)),Fc(P,ut);else if(Ne.tag!==4){if(Ne.tag===22&&Ne.memoizedState!==null)Se=Ne.child,Se!==null&&(Se.return=Ne),x1(P,Ne,!0,!0),Se=!0;else if(Ne.child!==null){Ne.child.return=Ne,Ne=Ne.child;continue}}if(Ne===T)break;for(;Ne.sibling===null;){if(Ne.return===null||Ne.return===T)return Se;Ne=Ne.return}Ne.sibling.return=Ne.return,Ne=Ne.sibling}return Se}function dg(P,T){if(Ou&&DI(P,T)){P=T.stateNode;var q=P.containerInfo,de=Nf();x1(de,T,!1,!1),P.pendingChildren=de,$s(T),_a(q,de)}}function x2(P,T,q,de){if(cl)P.memoizedProps!==de&&$s(T);else if(Ou){var Se=P.stateNode,Ne=P.memoizedProps;if((P=DI(P,T))||Ne!==de){var ut=et();Ne=Gu(Se,q,Ne,de,!P,null),Ne===Se?T.stateNode=Se:(I3(Ne,q,de,ut)&&$s(T),T.stateNode=Ne,P?y2(Ne,T,!1,!1):$s(T))}else T.stateNode=Se}}function zE(P,T,q){if(fu(T,q)){if(P.flags|=16777216,!Si(T,q))if(WE())P.flags|=8192;else throw N_=hp,T4}else P.flags&=-16777217}function E2(P,T){if(gA(T)){if(P.flags|=16777216,!Us(T))if(WE())P.flags|=8192;else throw N_=hp,T4}else P.flags&=-16777217}function NI(P,T){T!==null&&(P.flags|=4),P.flags&16384&&(T=P.tag!==22?J():536870912,P.lanes|=T,Fh|=T)}function Fp(P,T){if(!ja)switch(P.tailMode){case"hidden":T=P.tail;for(var q=null;T!==null;)T.alternate!==null&&(q=T),T=T.sibling;q===null?P.tail=null:q.sibling=null;break;case"collapsed":q=P.tail;for(var de=null;q!==null;)q.alternate!==null&&(de=q),q=q.sibling;de===null?T||P.tail===null?P.tail=null:P.tail.sibling=null:de.sibling=null}}function qs(P){var T=P.alternate!==null&&P.alternate.child===P.child,q=0,de=0;if(T)if((P.mode&2)!==yA){for(var Se=P.selfBaseDuration,Ne=P.child;Ne!==null;)q|=Ne.lanes|Ne.childLanes,de|=Ne.subtreeFlags&65011712,de|=Ne.flags&65011712,Se+=Ne.treeBaseDuration,Ne=Ne.sibling;P.treeBaseDuration=Se}else for(Se=P.child;Se!==null;)q|=Se.lanes|Se.childLanes,de|=Se.subtreeFlags&65011712,de|=Se.flags&65011712,Se.return=P,Se=Se.sibling;else if((P.mode&2)!==yA){Se=P.actualDuration,Ne=P.selfBaseDuration;for(var ut=P.child;ut!==null;)q|=ut.lanes|ut.childLanes,de|=ut.subtreeFlags,de|=ut.flags,Se+=ut.actualDuration,Ne+=ut.treeBaseDuration,ut=ut.sibling;P.actualDuration=Se,P.treeBaseDuration=Ne}else for(Se=P.child;Se!==null;)q|=Se.lanes|Se.childLanes,de|=Se.subtreeFlags,de|=Se.flags,Se.return=P,Se=Se.sibling;return P.subtreeFlags|=de,P.childLanes=q,T}function RI(P,T,q){var de=T.pendingProps;switch(kt(T),T.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(T),null;case 1:return qs(T),null;case 3:return q=T.stateNode,de=null,P!==null&&(de=P.memoizedState.cache),T.memoizedState.cache!==de&&(T.flags|=2048),On(Wn,T),be(T),q.pendingContext&&(q.context=q.pendingContext,q.pendingContext=null),(P===null||P.child===null)&&(nn(T)?(ro(),$s(T)):P===null||P.memoizedState.isDehydrated&&(T.flags&256)===0||(T.flags|=1024,Co())),dg(P,T),qs(T),null;case 26:if(xc){q=T.type;var Se=T.memoizedState;return P===null?($s(T),Se!==null?(qs(T),E2(T,Se)):(qs(T),zE(T,q,de))):Se?Se!==P.memoizedState?($s(T),qs(T),E2(T,Se)):(qs(T),T.flags&=-16777217):(cl?P.memoizedProps!==de&&$s(T):x2(P,T,q,de),qs(T),zE(T,q,de)),null}case 27:if(os){if(Bt(T),q=Yt(Bg.current),Se=T.type,P!==null&&T.stateNode!=null)cl?P.memoizedProps!==de&&$s(T):x2(P,T,Se,de);else{if(!de){if(T.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return qs(T),null}P=et(),nn(T)?qt(T,P):(P=l0(Se,de,q,P,!0),T.stateNode=P,$s(T))}return qs(T),null}case 5:if(Bt(T),q=T.type,P!==null&&T.stateNode!=null)x2(P,T,q,de);else{if(!de){if(T.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return qs(T),null}P=et(),nn(T)?qt(T,P):(Se=Yt(Bg.current),Se=f3(q,de,Se,P,T),y2(Se,T,!1,!1),T.stateNode=Se,I3(Se,q,de,P)&&$s(T))}return qs(T),zE(T,T.type,T.pendingProps),null;case 6:if(P&&T.stateNode!=null)q=P.memoizedProps,cl?q!==de&&$s(T):Ou&&(q!==de?(P=Yt(Bg.current),q=et(),T.stateNode=UI(de,P,q,T),$s(T)):T.stateNode=P.stateNode);else{if(typeof de!="string"&&T.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(P=Yt(Bg.current),q=et(),nn(T)){if(!B0)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");P=T.stateNode,q=T.memoizedProps,Se=!z2,de=null;var Ne=gp;if(Ne!==null)switch(Ne.tag){case 3:Se&&(Se=Tf(P,q,de),Se!==null&&(Ao(T,0).serverProps=Se));break;case 27:case 5:de=Ne.memoizedProps,Se&&(Se=Tf(P,q,de),Se!==null&&(Ao(T,0).serverProps=Se))}xs(P,q,T,de)||vt(T)}else T.stateNode=UI(de,P,q,T)}return qs(T),null;case 13:if(de=T.memoizedState,P===null||P.memoizedState!==null&&P.memoizedState.dehydrated!==null){if(Se=nn(T),de!==null&&de.dehydrated!==null){if(P===null){if(!Se)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(!B0)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");if(Se=T.memoizedState,Se=Se!==null?Se.dehydrated:null,!Se)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");Lc(Se,T),qs(T),(T.mode&2)!==yA&&de!==null&&(Se=T.child,Se!==null&&(T.treeBaseDuration-=Se.treeBaseDuration))}else ro(),Nn(),(T.flags&128)===0&&(T.memoizedState=null),T.flags|=4,qs(T),(T.mode&2)!==yA&&de!==null&&(Se=T.child,Se!==null&&(T.treeBaseDuration-=Se.treeBaseDuration));Se=!1}else Se=Co(),P!==null&&P.memoizedState!==null&&(P.memoizedState.hydrationErrors=Se),Se=!0;if(!Se)return T.flags&256?(Vg(T),T):(Vg(T),null)}return Vg(T),(T.flags&128)!==0?(T.lanes=q,(T.mode&2)!==yA&&Nt(T),T):(q=de!==null,P=P!==null&&P.memoizedState!==null,q&&(de=T.child,Se=null,de.alternate!==null&&de.alternate.memoizedState!==null&&de.alternate.memoizedState.cachePool!==null&&(Se=de.alternate.memoizedState.cachePool.pool),Ne=null,de.memoizedState!==null&&de.memoizedState.cachePool!==null&&(Ne=de.memoizedState.cachePool.pool),Ne!==Se&&(de.flags|=2048)),q!==P&&q&&(T.child.flags|=8192),NI(T,T.updateQueue),qs(T),(T.mode&2)!==yA&&q&&(P=T.child,P!==null&&(T.treeBaseDuration-=P.treeBaseDuration)),null);case 4:return be(T),dg(P,T),P===null&&Vd(T.stateNode.containerInfo),qs(T),null;case 10:return On(T.type,T),qs(T),null;case 19:if(k(Zn,T),Se=T.memoizedState,Se===null)return qs(T),null;if(de=(T.flags&128)!==0,Ne=Se.rendering,Ne===null)if(de)Fp(Se,!1);else{if(_l!==nx||P!==null&&(P.flags&128)!==0)for(P=T.child;P!==null;){if(Ne=op(P),Ne!==null){for(T.flags|=128,Fp(Se,!1),P=Ne.updateQueue,T.updateQueue=P,NI(T,P),T.subtreeFlags=0,P=q,q=T.child;q!==null;)D4(q,P),q=q.sibling;return R(Zn,Zn.current&on|Pn,T),T.child}P=P.sibling}Se.tail!==null&&us()>L4&&(T.flags|=128,de=!0,Fp(Se,!1),T.lanes=4194304)}else{if(!de)if(P=op(Ne),P!==null){if(T.flags|=128,de=!0,P=P.updateQueue,T.updateQueue=P,NI(T,P),Fp(Se,!0),Se.tail===null&&Se.tailMode==="hidden"&&!Ne.alternate&&!ja)return qs(T),null}else 2*us()-Se.renderingStartTime>L4&&q!==536870912&&(T.flags|=128,de=!0,Fp(Se,!1),T.lanes=4194304);Se.isBackwards?(Ne.sibling=T.child,T.child=Ne):(P=Se.last,P!==null?P.sibling=Ne:T.child=Ne,Se.last=Ne)}return Se.tail!==null?(P=Se.tail,Se.rendering=P,Se.tail=P.sibling,Se.renderingStartTime=us(),P.sibling=null,q=Zn.current,q=de?q&on|Pn:q&on,R(Zn,q,T),P):(qs(T),null);case 22:case 23:return Vg(T),_1(T),de=T.memoizedState!==null,P!==null?P.memoizedState!==null!==de&&(T.flags|=8192):de&&(T.flags|=8192),de?(q&536870912)!==0&&(T.flags&128)===0&&(qs(T),T.subtreeFlags&6&&(T.flags|=8192)):qs(T),q=T.updateQueue,q!==null&&NI(T,q.retryQueue),q=null,P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(q=P.memoizedState.cachePool.pool),de=null,T.memoizedState!==null&&T.memoizedState.cachePool!==null&&(de=T.memoizedState.cachePool.pool),de!==q&&(T.flags|=2048),P!==null&&k(m5,T),null;case 24:return q=null,P!==null&&(q=P.memoizedState.cache),T.memoizedState.cache!==q&&(T.flags|=2048),On(Wn,T),qs(T),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+T.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Ch(P,T){switch(kt(T),T.tag){case 1:return P=T.flags,P&65536?(T.flags=P&-65537|128,(T.mode&2)!==yA&&Nt(T),T):null;case 3:return On(Wn,T),be(T),P=T.flags,(P&65536)!==0&&(P&128)===0?(T.flags=P&-65537|128,T):null;case 26:case 27:case 5:return Bt(T),null;case 13:if(Vg(T),P=T.memoizedState,P!==null&&P.dehydrated!==null){if(T.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");Nn()}return P=T.flags,P&65536?(T.flags=P&-65537|128,(T.mode&2)!==yA&&Nt(T),T):null;case 19:return k(Zn,T),null;case 4:return be(T),null;case 10:return On(T.type,T),null;case 22:case 23:return Vg(T),_1(T),P!==null&&k(m5,T),P=T.flags,P&65536?(T.flags=P&-65537|128,(T.mode&2)!==yA&&Nt(T),T):null;case 24:return On(Wn,T),null;case 25:return null;default:return null}}function C_(P,T){switch(kt(T),T.tag){case 3:On(Wn,T),be(T);break;case 26:case 27:case 5:Bt(T);break;case 4:be(T);break;case 13:Vg(T);break;case 19:k(Zn,T);break;case 10:On(T.type,T);break;case 22:case 23:Vg(T),_1(T),P!==null&&k(m5,T);break;case 24:On(Wn,T)}}function yh(P){return(P.mode&2)!==yA}function Em(P,T){yh(P)?(Qt(),TI(T,P),Ht()):TI(T,P)}function z0(P,T,q){yh(P)?(Qt(),Ef(q,P,T),Ht()):Ef(q,P,T)}function TI(P,T){try{var q=T.updateQueue,de=q!==null?q.lastEffect:null;if(de!==null){var Se=de.next;q=Se;do{if((q.tag&P)===P&&((P&zu)!==td?G!==null&&typeof G.markComponentPassiveEffectMountStarted=="function"&&G.markComponentPassiveEffectMountStarted(T):(P&X0)!==td&&G!==null&&typeof G.markComponentLayoutEffectMountStarted=="function"&&G.markComponentLayoutEffectMountStarted(T),de=void 0,(P&vl)!==td&&(EM=!0),de=Lt(T,ly,q),(P&vl)!==td&&(EM=!1),(P&zu)!==td?G!==null&&typeof G.markComponentPassiveEffectMountStopped=="function"&&G.markComponentPassiveEffectMountStopped():(P&X0)!==td&&G!==null&&typeof G.markComponentLayoutEffectMountStopped=="function"&&G.markComponentLayoutEffectMountStopped(),de!==void 0&&typeof de!="function")){var Ne=void 0;Ne=(q.tag&X0)!==0?"useLayoutEffect":(q.tag&vl)!==0?"useInsertionEffect":"useEffect";var ut=void 0;ut=de===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof de.then=="function"?`

It looks like you wrote `+Ne+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:

`+Ne+`(() => {
  async function fetchData() {
    // You can await here
    const response = await MyAPI.getData(someId);
    // ...
  }
  fetchData();
}, [someId]); // Or [] if effect doesn't need props or state

Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+de,Lt(T,function(Ft,Tn){console.error("%s must not return anything besides a function, which is used for clean-up.%s",Ft,Tn)},Ne,ut)}q=q.next}while(q!==Se)}}catch(Ft){NA(T,T.return,Ft)}}function Ef(P,T,q){try{var de=T.updateQueue,Se=de!==null?de.lastEffect:null;if(Se!==null){var Ne=Se.next;de=Ne;do{if((de.tag&P)===P){var ut=de.inst,Ft=ut.destroy;Ft!==void 0&&(ut.destroy=void 0,(P&zu)!==td?G!==null&&typeof G.markComponentPassiveEffectUnmountStarted=="function"&&G.markComponentPassiveEffectUnmountStarted(T):(P&X0)!==td&&G!==null&&typeof G.markComponentLayoutEffectUnmountStarted=="function"&&G.markComponentLayoutEffectUnmountStarted(T),(P&vl)!==td&&(EM=!0),Se=T,Lt(Se,uy,Se,q,Ft),(P&vl)!==td&&(EM=!1),(P&zu)!==td?G!==null&&typeof G.markComponentPassiveEffectUnmountStopped=="function"&&G.markComponentPassiveEffectUnmountStopped():(P&X0)!==td&&G!==null&&typeof G.markComponentLayoutEffectUnmountStopped=="function"&&G.markComponentLayoutEffectUnmountStopped())}de=de.next}while(de!==Ne)}}catch(Tn){NA(T,T.return,Tn)}}function Q4(P,T){yh(P)?(Qt(),TI(T,P),Ht()):TI(T,P)}function B2(P,T,q){yh(P)?(Qt(),Ef(q,P,T),Ht()):Ef(q,P,T)}function Lp(P){var T=P.updateQueue;if(T!==null){var q=P.stateNode;P.type.defaultProps||"ref"in P.memoizedProps||$S||(q.props!==P.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(P)||"instance"),q.state!==P.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(P)||"instance"));try{Lt(P,O0,T,q)}catch(de){NA(P,P.return,de)}}}function ma(P,T,q){return P.getSnapshotBeforeUpdate(T,q)}function b2(P,T){var q=T.memoizedProps,de=T.memoizedState;T=P.stateNode,P.type.defaultProps||"ref"in P.memoizedProps||$S||(T.props!==P.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(P)||"instance"),T.state!==P.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(P)||"instance"));try{var Se=nc(P.type,q,P.elementType===P.type),Ne=Lt(P,ma,T,Se,de);q=gye,Ne!==void 0||q.has(P.type)||(q.add(P.type),Lt(P,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",w(P))})),T.__reactInternalSnapshotBeforeUpdate=Ne}catch(ut){NA(P,P.return,ut)}}function Hd(P,T,q){q.props=nc(P.type,P.memoizedProps),q.state=P.memoizedState,yh(P)?(Qt(),Lt(P,qp,P,T,q),Ht()):Lt(P,qp,P,T,q)}function E1(P){var T=P.ref;if(T!==null){switch(P.tag){case 26:case 27:case 5:var q=fg(P.stateNode);break;case 30:q=P.stateNode;break;default:q=P.stateNode}if(typeof T=="function")if(yh(P))try{Qt(),P.refCleanup=T(q)}finally{Ht()}else P.refCleanup=T(q);else typeof T=="string"?console.error("String refs are no longer supported."):T.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",w(P)),T.current=q}}function kI(P,T){try{Lt(P,E1,P)}catch(q){NA(P,T,q)}}function Od(P,T){var q=P.ref,de=P.refCleanup;if(q!==null)if(typeof de=="function")try{if(yh(P))try{Qt(),Lt(P,de)}finally{Ht(P)}else Lt(P,de)}catch(Se){NA(P,T,Se)}finally{P.refCleanup=null,P=P.alternate,P!=null&&(P.refCleanup=null)}else if(typeof q=="function")try{if(yh(P))try{Qt(),Lt(P,q,null)}finally{Ht(P)}else Lt(P,q,null)}catch(Se){NA(P,T,Se)}else q.current=null}function B1(P,T,q,de){var Se=P.memoizedProps,Ne=Se.id,ut=Se.onCommit;Se=Se.onRender,T=T===null?"mount":"update",Tm&&(T="nested-update"),typeof Se=="function"&&Se(Ne,T,P.actualDuration,P.treeBaseDuration,P.actualStartTime,q),typeof ut=="function"&&ut(P.memoizedProps.id,T,de,q)}function FI(P,T,q,de){var Se=P.memoizedProps;P=Se.id,Se=Se.onPostCommit,T=T===null?"mount":"update",Tm&&(T="nested-update"),typeof Se=="function"&&Se(P,T,de,q)}function UC(P){var T=P.type,q=P.memoizedProps,de=P.stateNode;try{Lt(P,Yi,de,T,q,P)}catch(Se){NA(P,P.return,Se)}}function S2(P,T,q){try{Lt(P,c5,P.stateNode,P.type,q,T,P)}catch(de){NA(P,P.return,de)}}function KC(P){return P.tag===5||P.tag===3||(xc?P.tag===26:!1)||(os?P.tag===27&&dl(P.type):!1)||P.tag===4}function l3(P){e:for(;;){for(;P.sibling===null;){if(P.return===null||KC(P.return))return null;P=P.return}for(P.sibling.return=P.return,P=P.sibling;P.tag!==5&&P.tag!==6&&P.tag!==18;){if(os&&P.tag===27&&dl(P.type)||P.flags&2||P.child===null||P.tag===4)continue e;P.child.return=P,P=P.child}if(!(P.flags&2))return P.stateNode}}function y_(P,T,q){var de=P.tag;if(de===5||de===6)P=P.stateNode,T?M1(q,P,T):WI(q,P);else if(de!==4&&(os&&de===27&&dl(P.type)&&(q=P.stateNode,T=null),P=P.child,P!==null))for(y_(P,T,q),P=P.sibling;P!==null;)y_(P,T,q),P=P.sibling}function ap(P,T,q){var de=P.tag;if(de===5||de===6)P=P.stateNode,T?Df(q,P,T):ll(q,P);else if(de!==4&&(os&&de===27&&dl(P.type)&&(q=P.stateNode),P=P.child,P!==null))for(ap(P,T,q),P=P.sibling;P!==null;)ap(P,T,q),P=P.sibling}function u3(P){if(cl){for(var T,q=P.return;q!==null;){if(KC(q)){T=q;break}q=q.return}if(T==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(T.tag){case 27:if(os){T=T.stateNode,q=l3(P),ap(P,q,T);break}case 5:q=T.stateNode,T.flags&32&&(yg(q),T.flags&=-33),T=l3(P),ap(P,T,q);break;case 3:case 4:T=T.stateNode.containerInfo,q=l3(P),y_(P,q,T);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}}function Q2(P,T,q){P=P.containerInfo;try{Lt(T,fa,P,q)}catch(de){NA(T,T.return,de)}}function Gd(P){var T=P.stateNode,q=P.memoizedProps;try{Lt(P,k1,P.type,q,T,P)}catch(de){NA(P,P.return,de)}}function Yd(P,T){for(Ig(P.containerInfo),k_=T;k_!==null;)if(P=k_,T=P.child,(P.subtreeFlags&1024)!==0&&T!==null)T.return=P,k_=T;else for(;k_!==null;){T=P=k_;var q=T.alternate,de=T.flags;switch(T.tag){case 0:break;case 11:case 15:break;case 1:(de&1024)!==0&&q!==null&&b2(T,q);break;case 3:(de&1024)!==0&&cl&&zd(T.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((de&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(T=P.sibling,T!==null){T.return=P.return,k_=T;break}k_=P.return}}function b1(P,T,q){var de=q.flags;switch(q.tag){case 0:case 11:case 15:zg(P,q),de&4&&Em(q,X0|zl);break;case 1:if(zg(P,q),de&4)if(P=q.stateNode,T===null)q.type.defaultProps||"ref"in q.memoizedProps||$S||(P.props!==q.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(q)||"instance"),P.state!==q.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(q)||"instance")),yh(q)?(Qt(),Lt(q,Ca,q,P),Ht()):Lt(q,Ca,q,P);else{var Se=nc(q.type,T.memoizedProps);T=T.memoizedState,q.type.defaultProps||"ref"in q.memoizedProps||$S||(P.props!==q.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(q)||"instance"),P.state!==q.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(q)||"instance")),yh(q)?(Qt(),Lt(q,Wi,q,P,Se,T,P.__reactInternalSnapshotBeforeUpdate),Ht()):Lt(q,Wi,q,P,Se,T,P.__reactInternalSnapshotBeforeUpdate)}de&64&&Lp(q),de&512&&kI(q,q.return);break;case 3:if(T=Ar(),zg(P,q),de&64&&(de=q.updateQueue,de!==null)){if(Se=null,q.child!==null)switch(q.child.tag){case 27:case 5:Se=fg(q.child.stateNode);break;case 1:Se=q.child.stateNode}try{Lt(q,O0,de,Se)}catch(ut){NA(q,q.return,ut)}}P.effectDuration+=ws(T);break;case 27:os&&T===null&&de&4&&Gd(q);case 26:case 5:zg(P,q),T===null&&de&4&&UC(q),de&512&&kI(q,q.return);break;case 12:if(de&4){de=Ar(),zg(P,q),P=q.stateNode,P.effectDuration+=ds(de);try{Lt(q,B1,q,T,u8,P.effectDuration)}catch(ut){NA(q,q.return,ut)}}else zg(P,q);break;case 13:zg(P,q),de&4&&Bm(P,q),de&64&&(P=q.memoizedState,P!==null&&(P=P.dehydrated,P!==null&&(q=e5.bind(null,q),N1(P,q))));break;case 22:if(de=q.memoizedState!==null||I9,!de){T=T!==null&&T.memoizedState!==null||mp,Se=I9;var Ne=mp;I9=de,(mp=T)&&!Ne?Va(P,q,(q.subtreeFlags&8772)!==0):zg(P,q),I9=Se,mp=Ne}break;case 30:break;default:zg(P,q)}}function v4(P){var T=P.alternate;T!==null&&(P.alternate=null,v4(T)),P.child=null,P.deletions=null,P.sibling=null,P.tag===5&&(T=P.stateNode,T!==null&&Vs(T)),P.stateNode=null,P._debugOwner=null,P.return=null,P.dependencies=null,P.memoizedProps=null,P.memoizedState=null,P.pendingProps=null,P.stateNode=null,P.updateQueue=null}function Hp(P,T,q){for(q=q.child;q!==null;)VC(P,T,q),q=q.sibling}function VC(P,T,q){if(Ku&&typeof Ku.onCommitFiberUnmount=="function")try{Ku.onCommitFiberUnmount(up,q)}catch(Ne){V||(V=!0,console.error("React instrumentation encountered an error: %s",Ne))}switch(q.tag){case 26:if(xc){mp||Od(q,T),Hp(P,T,q),q.memoizedState?U2(q.memoizedState):q.stateNode&&kf(q.stateNode);break}case 27:if(os){mp||Od(q,T);var de=Xp,Se=hy;dl(q.type)&&(Xp=q.stateNode,hy=!1),Hp(P,T,q),Lt(q,Ph,q.stateNode),Xp=de,hy=Se;break}case 5:mp||Od(q,T);case 6:if(cl){if(de=Xp,Se=hy,Xp=null,Hp(P,T,q),Xp=de,hy=Se,Xp!==null)if(hy)try{Lt(q,Iu,Xp,q.stateNode)}catch(Ne){NA(q,T,Ne)}else try{Lt(q,ul,Xp,q.stateNode)}catch(Ne){NA(q,T,Ne)}}else Hp(P,T,q);break;case 18:cl&&Xp!==null&&(hy?qg(Xp,q.stateNode):wh(Xp,q.stateNode));break;case 4:cl?(de=Xp,Se=hy,Xp=q.stateNode.containerInfo,hy=!0,Hp(P,T,q),Xp=de,hy=Se):(Ou&&Q2(q.stateNode,q,Nf()),Hp(P,T,q));break;case 0:case 11:case 14:case 15:mp||Ef(vl,q,T),mp||z0(q,T,X0),Hp(P,T,q);break;case 1:mp||(Od(q,T),de=q.stateNode,typeof de.componentWillUnmount=="function"&&Hd(q,T,de)),Hp(P,T,q);break;case 21:Hp(P,T,q);break;case 22:mp=(de=mp)||q.memoizedState!==null,Hp(P,T,q),mp=de;break;default:Hp(P,T,q)}}function Bm(P,T){if(B0&&T.memoizedState===null&&(P=T.alternate,P!==null&&(P=P.memoizedState,P!==null&&(P=P.dehydrated,P!==null))))try{Lt(T,Ps,P)}catch(q){NA(T,T.return,q)}}function Xr(P){switch(P.tag){case 13:case 19:var T=P.stateNode;return T===null&&(T=P.stateNode=new dye),T;case 22:return P=P.stateNode,T=P._retryCache,T===null&&(T=P._retryCache=new dye),T;default:throw Error("Unexpected Suspense handler tag ("+P.tag+"). This is a bug in React.")}}function v2(P,T){var q=Xr(P);T.forEach(function(de){var Se=u9.bind(null,P,de);if(!q.has(de)){if(q.add(de),Ae)if(lM!==null&&uM!==null)Qf(uM,lM);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");de.then(Se,Se)}})}function Ts(P,T){var q=T.deletions;if(q!==null)for(var de=0;de<q.length;de++){var Se=P,Ne=T,ut=q[de];if(cl){var Ft=Ne;e:for(;Ft!==null;){switch(Ft.tag){case 27:if(os){if(dl(Ft.type)){Xp=Ft.stateNode,hy=!1;break e}break}case 5:Xp=Ft.stateNode,hy=!1;break e;case 3:case 4:Xp=Ft.stateNode.containerInfo,hy=!0;break e}Ft=Ft.return}if(Xp===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");VC(Se,Ne,ut),Xp=null,hy=!1}else VC(Se,Ne,ut);Se=ut,Ne=Se.alternate,Ne!==null&&(Ne.return=null),Se.return=null}if(T.subtreeFlags&13878)for(T=T.child;T!==null;)S1(T,P),T=T.sibling}function S1(P,T){var q=P.alternate,de=P.flags;switch(P.tag){case 0:case 11:case 14:case 15:Ts(T,P),CA(P),de&4&&(Ef(vl|zl,P,P.return),TI(vl|zl,P),z0(P,P.return,X0|zl));break;case 1:Ts(T,P),CA(P),de&512&&(mp||q===null||Od(q,q.return)),de&64&&I9&&(P=P.updateQueue,P!==null&&(de=P.callbacks,de!==null&&(q=P.shared.hiddenCallbacks,P.shared.hiddenCallbacks=q===null?de:q.concat(de))));break;case 26:if(xc){var Se=I5;Ts(T,P),CA(P),de&512&&(mp||q===null||Od(q,q.return)),de&4&&(de=q!==null?q.memoizedState:null,T=P.memoizedState,q===null?T===null?P.stateNode===null?P.stateNode=K2(Se,P.type,P.memoizedProps,P):ty(Se,P.type,P.stateNode):P.stateNode=Xg(Se,T,P.memoizedProps):de!==T?(de===null?q.stateNode!==null&&kf(q.stateNode):U2(de),T===null?ty(Se,P.type,P.stateNode):Xg(Se,T,P.memoizedProps)):T===null&&P.stateNode!==null&&S2(P,P.memoizedProps,q.memoizedProps));break}case 27:if(os){Ts(T,P),CA(P),de&512&&(mp||q===null||Od(q,q.return)),q!==null&&de&4&&S2(P,P.memoizedProps,q.memoizedProps);break}case 5:if(Ts(T,P),CA(P),de&512&&(mp||q===null||Od(q,q.return)),cl){if(P.flags&32){T=P.stateNode;try{Lt(P,yg,T)}catch(di){NA(P,P.return,di)}}de&4&&P.stateNode!=null&&(T=P.memoizedProps,S2(P,T,q!==null?q.memoizedProps:T)),de&1024&&(DK=!0,P.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."))}break;case 6:if(Ts(T,P),CA(P),de&4&&cl){if(P.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");de=P.memoizedProps,q=q!==null?q.memoizedProps:de,T=P.stateNode;try{Lt(P,A5,T,q,de)}catch(di){NA(P,P.return,di)}}break;case 3:if(Se=Ar(),xc){ls();var Ne=I5;I5=$I(T.containerInfo),Ts(T,P),I5=Ne}else Ts(T,P);if(CA(P),de&4){if(cl&&B0&&q!==null&&q.memoizedState.isDehydrated)try{Lt(P,Ja,T.containerInfo)}catch(di){NA(P,P.return,di)}if(Ou){de=T.containerInfo,q=T.pendingChildren;try{Lt(P,fa,de,q)}catch(di){NA(P,P.return,di)}}}DK&&(DK=!1,x0(P)),T.effectDuration+=ws(Se);break;case 4:xc?(q=I5,I5=$I(P.stateNode.containerInfo),Ts(T,P),CA(P),I5=q):(Ts(T,P),CA(P)),de&4&&Ou&&Q2(P.stateNode,P,P.stateNode.pendingChildren);break;case 12:de=Ar(),Ts(T,P),CA(P),P.stateNode.effectDuration+=ds(de);break;case 13:Ts(T,P),CA(P),P.child.flags&8192&&P.memoizedState!==null!=(q!==null&&q.memoizedState!==null)&&(RK=us()),de&4&&(de=P.updateQueue,de!==null&&(P.updateQueue=null,v2(P,de)));break;case 22:Se=P.memoizedState!==null;var ut=q!==null&&q.memoizedState!==null,Ft=I9,Tn=mp;if(I9=Ft||Se,mp=Tn||ut,Ts(T,P),mp=Tn,I9=Ft,CA(P),de&8192&&(T=P.stateNode,T._visibility=Se?T._visibility&-2:T._visibility|1,Se&&(q===null||ut||I9||mp||Ss(P)),cl)){e:if(q=null,cl)for(T=P;;){if(T.tag===5||xc&&T.tag===26){if(q===null){ut=q=T;try{Ne=ut.stateNode,Se?Lt(ut,ss,Ne):Lt(ut,l5,ut.stateNode,ut.memoizedProps)}catch(di){NA(ut,ut.return,di)}}}else if(T.tag===6){if(q===null){ut=T;try{var _o=ut.stateNode;Se?Lt(ut,D1,_o):Lt(ut,Yp,_o,ut.memoizedProps)}catch(di){NA(ut,ut.return,di)}}}else if((T.tag!==22&&T.tag!==23||T.memoizedState===null||T===P)&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===P)break e;for(;T.sibling===null;){if(T.return===null||T.return===P)break e;q===T&&(q=null),T=T.return}q===T&&(q=null),T.sibling.return=T.return,T=T.sibling}}de&4&&(de=P.updateQueue,de!==null&&(q=de.retryQueue,q!==null&&(de.retryQueue=null,v2(P,q))));break;case 19:Ts(T,P),CA(P),de&4&&(de=P.updateQueue,de!==null&&(P.updateQueue=null,v2(P,de)));break;case 30:break;case 21:break;default:Ts(T,P),CA(P)}}function CA(P){var T=P.flags;if(T&2){try{Lt(P,u3,P)}catch(q){NA(P,P.return,q)}P.flags&=-3}T&4096&&(P.flags&=-4097)}function x0(P){if(P.subtreeFlags&1024)for(P=P.child;P!==null;){var T=P;x0(T),T.tag===5&&T.flags&1024&&VI(T.stateNode),P=P.sibling}}function zg(P,T){if(T.subtreeFlags&8772)for(T=T.child;T!==null;)b1(P,T.alternate,T),T=T.sibling}function bm(P){switch(P.tag){case 0:case 11:case 14:case 15:z0(P,P.return,X0),Ss(P);break;case 1:Od(P,P.return);var T=P.stateNode;typeof T.componentWillUnmount=="function"&&Hd(P,P.return,T),Ss(P);break;case 27:os&&Lt(P,Ph,P.stateNode);case 26:case 5:Od(P,P.return),Ss(P);break;case 22:P.memoizedState===null&&Ss(P);break;case 30:Ss(P);break;default:Ss(P)}}function Ss(P){for(P=P.child;P!==null;)bm(P),P=P.sibling}function ic(P,T,q,de){var Se=q.flags;switch(q.tag){case 0:case 11:case 15:Va(P,q,de),Em(q,X0);break;case 1:if(Va(P,q,de),T=q.stateNode,typeof T.componentDidMount=="function"&&Lt(q,Ca,q,T),T=q.updateQueue,T!==null){P=q.stateNode;try{Lt(q,FC,T,P)}catch(Ne){NA(q,q.return,Ne)}}de&&Se&64&&Lp(q),kI(q,q.return);break;case 27:os&&Gd(q);case 26:case 5:Va(P,q,de),de&&T===null&&Se&4&&UC(q),kI(q,q.return);break;case 12:if(de&&Se&4){Se=Ar(),Va(P,q,de),de=q.stateNode,de.effectDuration+=ds(Se);try{Lt(q,B1,q,T,u8,de.effectDuration)}catch(Ne){NA(q,q.return,Ne)}}else Va(P,q,de);break;case 13:Va(P,q,de),de&&Se&4&&Bm(P,q);break;case 22:q.memoizedState===null&&Va(P,q,de),kI(q,q.return);break;case 30:break;default:Va(P,q,de)}}function Va(P,T,q){for(q=q&&(T.subtreeFlags&8772)!==0,T=T.child;T!==null;)ic(P,T.alternate,T,q),T=T.sibling}function LI(P,T){var q=null;P!==null&&P.memoizedState!==null&&P.memoizedState.cachePool!==null&&(q=P.memoizedState.cachePool.pool),P=null,T.memoizedState!==null&&T.memoizedState.cachePool!==null&&(P=T.memoizedState.cachePool.pool),P!==q&&(P!=null&&zi(P),q!=null&&bi(q))}function Lu(P,T){P=null,T.alternate!==null&&(P=T.alternate.memoizedState.cache),T=T.memoizedState.cache,T!==P&&(zi(T),P!=null&&bi(P))}function Jg(P,T,q,de){if(T.subtreeFlags&10256)for(T=T.child;T!==null;)x_(P,T,q,de),T=T.sibling}function x_(P,T,q,de){var Se=T.flags;switch(T.tag){case 0:case 11:case 15:Jg(P,T,q,de),Se&2048&&Q4(T,zu|zl);break;case 1:Jg(P,T,q,de);break;case 3:var Ne=Ar();Jg(P,T,q,de),Se&2048&&(q=null,T.alternate!==null&&(q=T.alternate.memoizedState.cache),T=T.memoizedState.cache,T!==q&&(zi(T),q!=null&&bi(q))),P.passiveEffectDuration+=ws(Ne);break;case 12:if(Se&2048){Se=Ar(),Jg(P,T,q,de),P=T.stateNode,P.passiveEffectDuration+=ds(Se);try{Lt(T,FI,T,T.alternate,u8,P.passiveEffectDuration)}catch(Ft){NA(T,T.return,Ft)}}else Jg(P,T,q,de);break;case 13:Jg(P,T,q,de);break;case 23:break;case 22:Ne=T.stateNode;var ut=T.alternate;T.memoizedState!==null?Ne._visibility&2?Jg(P,T,q,de):Ud(P,T):Ne._visibility&2?Jg(P,T,q,de):(Ne._visibility|=2,hg(P,T,q,de,(T.subtreeFlags&10256)!==0)),Se&2048&&LI(ut,T);break;case 24:Jg(P,T,q,de),Se&2048&&Lu(T.alternate,T);break;default:Jg(P,T,q,de)}}function hg(P,T,q,de,Se){for(Se=Se&&(T.subtreeFlags&10256)!==0,T=T.child;T!==null;)xh(P,T,q,de,Se),T=T.sibling}function xh(P,T,q,de,Se){var Ne=T.flags;switch(T.tag){case 0:case 11:case 15:hg(P,T,q,de,Se),Q4(T,zu);break;case 23:break;case 22:var ut=T.stateNode;T.memoizedState!==null?ut._visibility&2?hg(P,T,q,de,Se):Ud(P,T):(ut._visibility|=2,hg(P,T,q,de,Se)),Se&&Ne&2048&&LI(T.alternate,T);break;case 24:hg(P,T,q,de,Se),Se&&Ne&2048&&Lu(T.alternate,T);break;default:hg(P,T,q,de,Se)}}function Ud(P,T){if(T.subtreeFlags&10256)for(T=T.child;T!==null;){var q=P,de=T,Se=de.flags;switch(de.tag){case 22:Ud(q,de),Se&2048&&LI(de.alternate,de);break;case 24:Ud(q,de),Se&2048&&Lu(de.alternate,de);break;default:Ud(q,de)}T=T.sibling}}function Ks(P){if(P.subtreeFlags&gM)for(P=P.child;P!==null;)E_(P),P=P.sibling}function E_(P){switch(P.tag){case 26:Ks(P),P.flags&gM&&(P.memoizedState!==null?Zr(I5,P.memoizedState,P.memoizedProps):c0(P.type,P.memoizedProps));break;case 5:Ks(P),P.flags&gM&&c0(P.type,P.memoizedProps);break;case 3:case 4:if(xc){var T=I5;I5=$I(P.stateNode.containerInfo),Ks(P),I5=T}else Ks(P);break;case 22:P.memoizedState===null&&(T=P.alternate,T!==null&&T.memoizedState!==null?(T=gM,gM=16777216,Ks(P),gM=T):Ks(P));break;default:Ks(P)}}function Eh(P){var T=P.alternate;if(T!==null&&(P=T.child,P!==null)){T.child=null;do T=P.sibling,P.sibling=null,P=T;while(P!==null)}}function B_(P){var T=P.deletions;if((P.flags&16)!==0){if(T!==null)for(var q=0;q<T.length;q++){var de=T[q];k_=de,w2(de,P)}Eh(P)}if(P.subtreeFlags&10256)for(P=P.child;P!==null;)w4(P),P=P.sibling}function w4(P){switch(P.tag){case 0:case 11:case 15:B_(P),P.flags&2048&&B2(P,P.return,zu|zl);break;case 3:var T=Ar();B_(P),P.stateNode.passiveEffectDuration+=ws(T);break;case 12:T=Ar(),B_(P),P.stateNode.passiveEffectDuration+=ds(T);break;case 22:T=P.stateNode,P.memoizedState!==null&&T._visibility&2&&(P.return===null||P.return.tag!==13)?(T._visibility&=-3,J0(P)):B_(P);break;default:B_(P)}}function J0(P){var T=P.deletions;if((P.flags&16)!==0){if(T!==null)for(var q=0;q<T.length;q++){var de=T[q];k_=de,w2(de,P)}Eh(P)}for(P=P.child;P!==null;)Sm(P),P=P.sibling}function Sm(P){switch(P.tag){case 0:case 11:case 15:B2(P,P.return,zu),J0(P);break;case 22:var T=P.stateNode;T._visibility&2&&(T._visibility&=-3,J0(P));break;default:J0(P)}}function w2(P,T){for(;k_!==null;){var q=k_,de=q;switch(de.tag){case 0:case 11:case 15:B2(de,T,zu);break;case 23:case 22:de.memoizedState!==null&&de.memoizedState.cachePool!==null&&(de=de.memoizedState.cachePool.pool,de!=null&&zi(de));break;case 24:bi(de.memoizedState.cache)}if(de=q.child,de!==null)de.return=q,k_=de;else e:for(q=P;k_!==null;){de=k_;var Se=de.sibling,Ne=de.return;if(v4(de),de===q){k_=null;break e}if(Se!==null){Se.return=Ne,k_=Se;break e}k_=Ne}}}function g3(P){var T=bl(P);if(T!=null){if(typeof T.memoizedProps["data-testname"]!="string")throw Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");return T}if(P=Mf(P),P===null)throw Error("Could not find React container within specified host subtree.");return P.stateNode.current}function Wg(P,T){var q=P.tag;switch(T.$$typeof){case gk:if(P.type===T.value)return!0;break;case dM:e:{for(T=T.value,P=[P,0],q=0;q<P.length;){var de=P[q++],Se=de.tag,Ne=P[q++],ut=T[Ne];if(Se!==5&&Se!==26&&Se!==27||!Dm(de)){for(;ut!=null&&Wg(de,ut);)Ne++,ut=T[Ne];if(Ne===T.length){T=!0;break e}else for(de=de.child;de!==null;)P.push(de,Ne),de=de.sibling}}T=!1}return T;case h8:if((q===5||q===26||q===27)&&JI(P.stateNode,T.value))return!0;break;case dk:if((q===5||q===6||q===26||q===27)&&(P=Cg(P),P!==null&&0<=P.indexOf(T.value)))return!0;break;case NK:if((q===5||q===26||q===27)&&(P=P.memoizedProps["data-testname"],typeof P=="string"&&P.toLowerCase()===T.value.toLowerCase()))return!0;break;default:throw Error("Invalid selector type specified.")}return!1}function r0(P){switch(P.$$typeof){case gk:return"<"+(Q(P.value)||"Unknown")+">";case dM:return":has("+(r0(P)||"")+")";case h8:return'[role="'+P.value+'"]';case dk:return'"'+P.value+'"';case NK:return'[data-testname="'+P.value+'"]';default:throw Error("Invalid selector type specified.")}}function P2(P,T){var q=[];P=[P,0];for(var de=0;de<P.length;){var Se=P[de++],Ne=Se.tag,ut=P[de++],Ft=T[ut];if(Ne!==5&&Ne!==26&&Ne!==27||!Dm(Se)){for(;Ft!=null&&Wg(Se,Ft);)ut++,Ft=T[ut];if(ut===T.length)q.push(Se);else for(Se=Se.child;Se!==null;)P.push(Se,ut),Se=Se.sibling}}return q}function zC(P,T){if(!b0)throw Error("Test selector API is not supported by this renderer.");P=g3(P),P=P2(P,T),T=[],P=Array.from(P);for(var q=0;q<P.length;){var de=P[q++],Se=de.tag;if(Se===5||Se===26||Se===27)Dm(de)||T.push(de.stateNode);else for(de=de.child;de!==null;)P.push(de),de=de.sibling}return T}function W0(){b0&&hk.forEach(function(P){return P()})}function M2(){var P=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return P||Jn.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),P}function sl(P){if((sc&V1)!==Zp&&YA!==0)return YA&-YA;var T=Jn.T;return T!==null?(T._updatedFibers||(T._updatedFibers=new Set),T._updatedFibers.add(P),P=Ay,P!==0?P:oi()):Xa()}function b_(){Q0===0&&(Q0=(YA&536870912)===0||ja?j():536870912);var P=pt.current;return P!==null&&(P.flags|=32),Q0}function s0(P,T,q){if(EM&&console.error("useInsertionEffect must not schedule updates."),yM&&(B9=!0),(P===wl&&(ml===p8||ml===C9)||P.cancelPendingCommit!==null)&&(Qm(P,0),Bf(P,YA,Q0,!1)),ie(P,q),(sc&V1)!==0&&P===wl){if(M_)switch(T.tag){case 0:case 11:case 15:P=xA&&w(xA)||"Unknown",Ite.has(P)||(Ite.add(P),T=w(T)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",T,P,P));break;case 1:nQ||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),nQ=!0)}}else Ae&&ue(P,T,q),d9(T),P===wl&&((sc&V1)===Zp&&(fl|=q),_l===M3&&Bf(P,YA,Q0,!1)),_n(P)}function JE(P,T,q){if((sc&(V1|z1))!==Zp)throw Error("Should not already be working.");var de=!q&&(T&124)===0&&(T&P.expiredLanes)===0||W(P,T),Se=de?l9(P,T):h3(P,T,!0),Ne=de;do{if(Se===nx){C5&&!de&&Bf(P,T,0,!1);break}else{if(q=P.current.alternate,Ne&&!JC(q)){Se=h3(P,T,!1),Ne=!1;continue}if(Se===em){if(Ne=T,P.errorRecoveryDisabledLanes&Ne)var ut=0;else ut=P.pendingLanes&-536870913,ut=ut!==0?ut:ut&536870912?536870912:0;if(ut!==0){T=ut;e:{Se=P;var Ft=ut;ut=AC;var Tn=B0&&Se.current.memoizedState.isDehydrated;if(Tn&&(Qm(Se,Ft).flags|=256),Ft=h3(Se,Ft,!1),Ft!==em){if(_k&&!Tn){Se.errorRecoveryDisabledLanes|=Ne,fl|=Ne,Se=M3;break e}Se=J1,J1=ut,Se!==null&&(J1===null?J1=Se:J1.push.apply(J1,Se))}Se=Ft}if(Ne=!1,Se!==em)continue}}if(Se===pM){Qm(P,0),Bf(P,T,0,!0);break}e:{switch(de=P,Se){case nx:case pM:throw Error("Root did not complete. This is a bug in React.");case M3:if((T&4194048)!==T)break;case mM:Bf(de,T,Q0,!Hm);break e;case em:J1=null;break;case hte:case _M:break;default:throw Error("Unknown root exit status.")}if(Jn.actQueue!==null)F2(de,q,T,J1,m8,fk,Q0,fl,Fh);else{if((T&62914560)===T&&(Ne=RK+XS-us(),10<Ne)){if(Bf(de,T,Q0,!Hm),Y(de,0,!0)!==0)break e;de.timeoutHandle=C3(d3.bind(null,de,q,J1,m8,fk,T,Q0,fl,Fh,Hm,Se,y9,-0,0),Ne);break e}d3(de,q,J1,m8,fk,T,Q0,fl,Fh,Hm,Se,D3,-0,0)}}}break}while(!0);_n(P)}function d3(P,T,q,de,Se,Ne,ut,Ft,Tn,_o,di,li,vi,Ws){if(P.timeoutHandle=E0,li=T.subtreeFlags,(li&8192||(li&16785408)===16785408)&&(lp(),E_(T),li=$c(),li!==null)){P.cancelPendingCommit=li(F2.bind(null,P,T,Ne,q,de,Se,ut,Ft,Tn,di,ZS,vi,Ws)),Bf(P,Ne,ut,!_o);return}F2(P,T,Ne,q,de,Se,ut,Ft,Tn)}function JC(P){for(var T=P;;){var q=T.tag;if((q===0||q===11||q===15)&&T.flags&16384&&(q=T.updateQueue,q!==null&&(q=q.stores,q!==null)))for(var de=0;de<q.length;de++){var Se=q[de],Ne=Se.getSnapshot;Se=Se.value;try{if(!Nh(Ne(),Se))return!1}catch{return!1}}if(q=T.child,T.subtreeFlags&16384&&q!==null)q.return=T,T=q;else{if(T===P)break;for(;T.sibling===null;){if(T.return===null||T.return===P)return!0;T=T.return}T.sibling.return=T.return,T=T.sibling}}return!0}function Bf(P,T,q,de){T&=~mte,T&=~fl,P.suspendedLanes|=T,P.pingedLanes&=~T,de&&(P.warmLanes|=T),de=P.expirationTimes;for(var Se=T;0<Se;){var Ne=31-pl(Se),ut=1<<Ne;de[Ne]=-1,Se&=~ut}q!==0&&le(P,q,T)}function D2(){return(sc&(V1|z1))===Zp?(qn(0),!1):!0}function WC(){if(xA!==null){if(ml===aC)var P=xA.return;else P=xA,yo(),Ug(P),rC=null,dy=0,P=xA;for(;P!==null;)C_(P.alternate,P),P=P.return;xA=null}}function Qm(P,T){var q=P.timeoutHandle;q!==E0&&(P.timeoutHandle=E0,KI(q)),q=P.cancelPendingCommit,q!==null&&(P.cancelPendingCommit=null,q()),WC(),wl=P,xA=q=v1(P.current,null),YA=T,ml=aC,_p=null,Hm=!1,C5=W(P,T),_k=!1,_l=nx,Fh=Q0=mte=fl=ox=0,J1=AC=null,fk=!1,(T&8)!==0&&(T|=T&32);var de=P.entangledLanes;if(de!==0)for(P=P.entanglements,de&=T;0<de;){var Se=31-pl(de),Ne=1<<Se;T|=P[Se],de&=~Ne}return Yf=T,ph(),T=p5(),1e3<T-Ia&&(Jn.recentlyCreatedOwnerStacks=0,Ia=T),nC.discardPendingWarnings(),q}function N2(P,T){fs=null,Jn.H=He,Jn.getCurrentStack=null,M_=!1,H1=null,T===v3||T===ed?(T=Yl(),ml=pk):T===T4?(T=Yl(),ml=pye):ml=T===uc?mk:T!==null&&typeof T=="object"&&typeof T.then=="function"?qS:fM,_p=T;var q=xA;if(q===null)_l=pM,i0(P,gt(T,P.current));else switch(q.mode&2&&Gt(q),Pe(),ml){case fM:G!==null&&typeof G.markComponentErrored=="function"&&G.markComponentErrored(q,T,YA);break;case p8:case C9:case pk:case qS:case IM:G!==null&&typeof G.markComponentSuspended=="function"&&G.markComponentSuspended(q,T,YA)}}function WE(){var P=pt.current;return P===null?!0:(YA&4194048)===YA?St===null:(YA&62914560)===YA||(YA&536870912)!==0?P===St:!1}function jE(){var P=Jn.H;return Jn.H=He,P===null?He:P}function $E(){var P=Jn.A;return Jn.A=wot,P}function R2(){_l=M3,Hm||(YA&4194048)!==YA&&pt.current!==null||(C5=!0),(ox&134217727)===0&&(fl&134217727)===0||wl===null||Bf(wl,YA,Q0,!1)}function h3(P,T,q){var de=sc;sc|=V1;var Se=jE(),Ne=$E();if(wl!==P||YA!==T){if(Ae){var ut=P.memoizedUpdaters;0<ut.size&&(Qf(P,YA),ut.clear()),fe(P,T)}m8=null,Qm(P,T)}we(T),T=!1,ut=_l;e:do try{if(ml!==aC&&xA!==null){var Ft=xA,Tn=_p;switch(ml){case mk:WC(),ut=mM;break e;case pk:case p8:case C9:case qS:pt.current===null&&(T=!0);var _o=ml;if(ml=aC,_p=null,T2(P,Ft,Tn,_o),q&&C5){ut=nx;break e}break;default:_o=ml,ml=aC,_p=null,T2(P,Ft,Tn,_o)}}p3(),ut=_l;break}catch(di){N2(P,di)}while(!0);return T&&P.shellSuspendCounter++,yo(),sc=de,Jn.H=Se,Jn.A=Ne,Te(),xA===null&&(wl=null,YA=0,ph()),ut}function p3(){for(;xA!==null;)P4(xA)}function l9(P,T){var q=sc;sc|=V1;var de=jE(),Se=$E();if(wl!==P||YA!==T){if(Ae){var Ne=P.memoizedUpdaters;0<Ne.size&&(Qf(P,YA),Ne.clear()),fe(P,T)}m8=null,L4=us()+CM,Qm(P,T)}else C5=W(P,T);we(T);e:do try{if(ml!==aC&&xA!==null)t:switch(T=xA,Ne=_p,ml){case fM:ml=aC,_p=null,T2(P,T,Ne,fM);break;case p8:case C9:if(dr(Ne)){ml=aC,_p=null,bf(T);break}T=function(){ml!==p8&&ml!==C9||wl!==P||(ml=IM),_n(P)},Ne.then(T,T);break e;case pk:ml=IM;break e;case pye:ml=pte;break e;case IM:dr(Ne)?(ml=aC,_p=null,bf(T)):(ml=aC,_p=null,T2(P,T,Ne,IM));break;case pte:var ut=null;switch(xA.tag){case 26:ut=xA.memoizedState;case 5:case 27:var Ft=xA,Tn=Ft.type,_o=Ft.pendingProps;if(ut?Us(ut):Si(Tn,_o)){ml=aC,_p=null;var di=Ft.sibling;if(di!==null)xA=di;else{var li=Ft.return;li!==null?(xA=li,k2(li)):xA=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}ml=aC,_p=null,T2(P,T,Ne,pte);break;case qS:ml=aC,_p=null,T2(P,T,Ne,qS);break;case mk:WC(),_l=mM;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Jn.actQueue!==null?p3():qE();break}catch(vi){N2(P,vi)}while(!0);return yo(),Jn.H=de,Jn.A=Se,sc=q,xA!==null?(G!==null&&typeof G.markRenderYielded=="function"&&G.markRenderYielded(),nx):(Te(),wl=null,YA=0,ph(),_l)}function qE(){for(;xA!==null&&!F1();)P4(xA)}function P4(P){var T=P.alternate;(P.mode&2)!==yA?(Et(P),T=Lt(P,C2,T,P,Yf),Gt(P)):T=Lt(P,C2,T,P,Yf),P.memoizedProps=P.pendingProps,T===null?k2(P):xA=T}function bf(P){var T=Lt(P,XE,P);P.memoizedProps=P.pendingProps,T===null?k2(P):xA=T}function XE(P){var T=P.alternate,q=(P.mode&2)!==yA;switch(q&&Et(P),P.tag){case 15:case 0:T=IA(T,P,P.pendingProps,P.type,void 0,YA);break;case 11:T=IA(T,P,P.pendingProps,P.type.render,P.ref,YA);break;case 5:Ug(P);default:C_(T,P),P=xA=D4(P,Yf),T=C2(T,P,Yf)}return q&&Gt(P),T}function T2(P,T,q,de){yo(),Ug(T),rC=null,dy=0;var Se=T.return;try{if(Rp(P,Se,T,q,YA)){_l=pM,i0(P,gt(q,P.current)),xA=null;return}}catch(Ne){if(Se!==null)throw xA=Se,Ne;_l=pM,i0(P,gt(q,P.current)),xA=null;return}T.flags&32768?(ja||de===fM?P=!0:C5||(YA&536870912)!==0?P=!1:(Hm=P=!0,(de===p8||de===C9||de===pk||de===qS)&&(de=pt.current,de!==null&&de.tag===13&&(de.flags|=16384))),Ap(T,P)):k2(T)}function k2(P){var T=P;do{if((T.flags&32768)!==0){Ap(T,Hm);return}var q=T.alternate;if(P=T.return,Et(T),q=Lt(T,RI,q,T,Yf),(T.mode&2)!==yA&&Rt(T),q!==null){xA=q;return}if(T=T.sibling,T!==null){xA=T;return}xA=T=P}while(T!==null);_l===nx&&(_l=_M)}function Ap(P,T){do{var q=Ch(P.alternate,P);if(q!==null){q.flags&=32767,xA=q;return}if((P.mode&2)!==yA){Rt(P),q=P.actualDuration;for(var de=P.child;de!==null;)q+=de.actualDuration,de=de.sibling;P.actualDuration=q}if(q=P.return,q!==null&&(q.flags|=32768,q.subtreeFlags=0,q.deletions=null),!T&&(P=P.sibling,P!==null)){xA=P;return}xA=P=q}while(P!==null);_l=mM,xA=null}function F2(P,T,q,de,Se,Ne,ut,Ft,Tn){P.cancelPendingCommit=null;do jC();while(qd!==cC);if(nC.flushLegacyContextWarning(),nC.flushPendingUnsafeLifecycleWarnings(),(sc&(V1|z1))!==Zp)throw Error("Should not already be working.");if(G!==null&&typeof G.markCommitStarted=="function"&&G.markCommitStarted(q),T===null)he();else{if(q===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),T===P.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(Ne=T.lanes|T.childLanes,Ne|=P3,ne(P,q,Ne,ut,Ft,Tn),P===wl&&(xA=wl=null,YA=0),_8=T,Uf=P,E9=q,_te=Ne,TK=Se,mye=de,(T.subtreeFlags&10256)!==0||(T.flags&10256)!==0?(P.callbackNode=null,P.callbackPriority=0,Q_(Dh,function(){return vm(),null})):(P.callbackNode=null,P.callbackPriority=0),u8=_s(),de=(T.flags&13878)!==0,(T.subtreeFlags&13878)!==0||de){de=Jn.T,Jn.T=null,Se=$g(),za(2),ut=sc,sc|=z1;try{Yd(P,T,q)}finally{sc=ut,za(Se),Jn.T=de}}qd=W1,m3(),HI(),kc()}}function m3(){if(qd===W1){qd=cC;var P=Uf,T=_8,q=E9,de=(T.flags&13878)!==0;if((T.subtreeFlags&13878)!==0||de){de=Jn.T,Jn.T=null;var Se=$g();za(2);var Ne=sc;sc|=z1;try{lM=q,uM=P,S1(T,P),uM=lM=null,s5(P.containerInfo)}finally{sc=Ne,za(Se),Jn.T=de}}P.current=T,qd=$d}}function HI(){if(qd===$d){qd=cC;var P=Uf,T=_8,q=E9,de=(T.flags&8772)!==0;if((T.subtreeFlags&8772)!==0||de){de=Jn.T,Jn.T=null;var Se=$g();za(2);var Ne=sc;sc|=z1;try{G!==null&&typeof G.markLayoutEffectsStarted=="function"&&G.markLayoutEffectsStarted(q),lM=q,uM=P,b1(P,T.alternate,T),uM=lM=null,G!==null&&typeof G.markLayoutEffectsStopped=="function"&&G.markLayoutEffectsStopped()}finally{sc=Ne,za(Se),Jn.T=de}}qd=Hc}}function kc(){if(qd===x9||qd===Hc){qd=cC,Wp();var P=Uf,T=_8,q=E9,de=mye,Se=(T.subtreeFlags&10256)!==0||(T.flags&10256)!==0;Se?qd=py:(qd=cC,_8=Uf=null,M4(P,P.pendingLanes),tQ=0,Ik=null);var Ne=P.pendingLanes;if(Ne===0&&(Om=null),Se||n5(P),Se=pe(q),T=T.stateNode,Ku&&typeof Ku.onCommitFiberRoot=="function")try{var ut=(T.current.flags&128)===128;switch(Se){case 2:var Ft=Jd;break;case 8:Ft=yu;break;case 32:Ft=Dh;break;case 268435456:Ft=V2;break;default:Ft=Dh}Ku.onCommitFiberRoot(up,T,Ft,ut)}catch(li){V||(V=!0,console.error("React instrumentation encountered an error: %s",li))}if(Ae&&P.memoizedUpdaters.clear(),W0(),de!==null){ut=Jn.T,Ft=$g(),za(2),Jn.T=null;try{var Tn=P.onRecoverableError;for(T=0;T<de.length;T++){var _o=de[T],di=S_(_o.stack);Lt(_o.source,Tn,_o.value,di)}}finally{Jn.T=ut,za(Ft)}}(E9&3)!==0&&jC(),_n(P),Ne=P.pendingLanes,(q&4194090)!==0&&(Ne&42)!==0?(O1=!0,P===kK?eQ++:(eQ=0,kK=P)):eQ=0,qn(0),he()}}function S_(P){return P={componentStack:P},Object.defineProperty(P,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),P}function M4(P,T){(P.pooledCacheLanes&=T)===0&&(T=P.pooledCache,T!=null&&(P.pooledCache=null,bi(T)))}function jC(P){return m3(),HI(),kc(),vm()}function vm(){if(qd!==py)return!1;var P=Uf,T=_te;_te=0;var q=pe(E9),de=32>q?32:q;q=Jn.T;var Se=$g();try{za(de),Jn.T=null,de=TK,TK=null;var Ne=Uf,ut=E9;if(qd=cC,_8=Uf=null,E9=0,(sc&(V1|z1))!==Zp)throw Error("Cannot flush passive effects while already rendering.");yM=!0,B9=!1,G!==null&&typeof G.markPassiveEffectsStarted=="function"&&G.markPassiveEffectsStarted(ut);var Ft=sc;if(sc|=z1,w4(Ne.current),x_(Ne,Ne.current,ut,de),G!==null&&typeof G.markPassiveEffectsStopped=="function"&&G.markPassiveEffectsStopped(),n5(Ne),sc=Ft,qn(0,!1),B9?Ne===Ik?tQ++:(tQ=0,Ik=Ne):tQ=0,B9=yM=!1,Ku&&typeof Ku.onPostCommitFiberRoot=="function")try{Ku.onPostCommitFiberRoot(up,Ne)}catch(_o){V||(V=!0,console.error("React instrumentation encountered an error: %s",_o))}var Tn=Ne.current.stateNode;return Tn.effectDuration=0,Tn.passiveEffectDuration=0,!0}finally{za(Se),Jn.T=q,M4(P,T)}}function ZE(P,T,q){T=gt(q,T),T=ug(P.stateNode,T,2),P=Rd(P,T,2),P!==null&&(ie(P,2),_n(P))}function NA(P,T,q){if(EM=!1,P.tag===3)ZE(P,P,q);else{for(;T!==null;){if(T.tag===3){ZE(T,P,q);return}if(T.tag===1){var de=T.stateNode;if(typeof T.type.getDerivedStateFromError=="function"||typeof de.componentDidCatch=="function"&&(Om===null||!Om.has(de))){P=gt(q,P),q=wI(2),de=Rd(T,q,2),de!==null&&(rp(q,de,T,P),ie(de,2),_n(de));return}}T=T.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.

Error message:

%s`,q)}}function Sf(P,T,q){var de=P.pingCache;if(de===null){de=P.pingCache=new hye;var Se=new Set;de.set(T,Se)}else Se=de.get(T),Se===void 0&&(Se=new Set,de.set(T,Se));Se.has(q)||(_k=!0,Se.add(q),de=OI.bind(null,P,T,q),Ae&&Qf(P,q),T.then(de,de))}function OI(P,T,q){var de=P.pingCache;de!==null&&de.delete(T),P.pingedLanes|=P.suspendedLanes&q,P.warmLanes&=~q,M2()&&Jn.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).

When testing, code that resolves suspended data should be wrapped into act(...):

act(() => {
  /* finish loading suspended data */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),wl===P&&(YA&q)===q&&(_l===M3||_l===hte&&(YA&62914560)===YA&&us()-RK<XS?(sc&V1)===Zp&&Qm(P,0):mte|=q,Fh===YA&&(Fh=0)),_n(P)}function Q1(P,T){T===0&&(T=J()),P=fc(P,T),P!==null&&(ie(P,T),_n(P))}function e5(P){var T=P.memoizedState,q=0;T!==null&&(q=T.retryLane),Q1(P,q)}function u9(P,T){var q=0;switch(P.tag){case 13:var de=P.stateNode,Se=P.memoizedState;Se!==null&&(q=Se.retryLane);break;case 19:de=P.stateNode;break;case 22:de=P.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}de!==null&&de.delete(T),Q1(P,q)}function t5(P,T,q){if((T.subtreeFlags&67117056)!==0)for(T=T.child;T!==null;){var de=P,Se=T,Ne=Se.type===Wc;Ne=q||Ne,Se.tag!==22?Se.flags&67108864?Ne&&Lt(Se,g9,de,Se,(Se.mode&64)===yA):t5(de,Se,Ne):Se.memoizedState===null&&(Ne&&Se.flags&8192?Lt(Se,g9,de,Se):Se.subtreeFlags&67108864&&Lt(Se,t5,de,Se,Ne)),T=T.sibling}}function g9(P,T){var q=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0;Me(!0);try{bm(T),q&&Sm(T),ic(P,T.alternate,T,!1),q&&xh(P,T,0,null,!1,0)}finally{Me(!1)}}function n5(P){var T=!0;P.current.mode&24||(T=!1),t5(P,P.current,T)}function o5(P){if((sc&V1)===Zp){var T=P.tag;if(T===3||T===1||T===0||T===11||T===14||T===15){if(T=w(P)||"ReactComponent",Lh!==null){if(Lh.has(T))return;Lh.add(T)}else Lh=new Set([T]);Lt(P,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")})}}}function Qf(P,T){Ae&&P.memoizedUpdaters.forEach(function(q){ue(P,q,T)})}function Q_(P,T){var q=Jn.actQueue;return q!==null?(q.push(T),FK):ny(P,T)}function d9(P){M2()&&Jn.actQueue===null&&Lt(P,function(){console.error(`An update to %s inside a test was not wrapped in act(...).

When testing, code that causes React state updates should be wrapped into act(...):

act(() => {
  /* fire events that update state */
});
/* assert on the output */

This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,w(P))})}function $C(P){if(bg===null)return P;var T=bg(P);return T===void 0?P:T.current}function L2(P){if(bg===null)return P;var T=bg(P);return T===void 0?P!=null&&typeof P.render=="function"&&(T=$C(P.render),P.render!==T)?(T={$$typeof:_g,render:T},P.displayName!==void 0&&(T.displayName=P.displayName),T):P:T.current}function GI(P,T){if(bg===null)return!1;var q=P.elementType;T=T.type;var de=!1,Se=typeof T=="object"&&T!==null?T.$$typeof:null;switch(P.tag){case 1:typeof T=="function"&&(de=!0);break;case 0:(typeof T=="function"||Se===jg)&&(de=!0);break;case 11:(Se===_g||Se===jg)&&(de=!0);break;case 14:case 15:(Se===RA||Se===jg)&&(de=!0);break;default:return!1}return!!(de&&(P=bg(q),P!==void 0&&P===bg(T)))}function Hu(P){bg!==null&&typeof WeakSet=="function"&&(N3===null&&(N3=new WeakSet),N3.add(P))}function wm(P,T,q){var de=P.alternate,Se=P.child,Ne=P.sibling,ut=P.tag,Ft=P.type,Tn=null;switch(ut){case 0:case 15:case 1:Tn=Ft;break;case 11:Tn=Ft.render}if(bg===null)throw Error("Expected resolveFamily to be set during hot reload.");var _o=!1;Ft=!1,Tn!==null&&(Tn=bg(Tn),Tn!==void 0&&(q.has(Tn)?Ft=!0:T.has(Tn)&&(ut===1?Ft=!0:_o=!0))),N3!==null&&(N3.has(P)||de!==null&&N3.has(de))&&(Ft=!0),Ft&&(P._debugNeedsRemount=!0),(Ft||_o)&&(de=fc(P,2),de!==null&&s0(de,P,2)),Se===null||Ft||wm(Se,T,q),Ne!==null&&wm(Ne,T,q)}function i5(P,T,q,de){this.tag=P,this.key=q,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=T,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=de,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,Ck||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function zr(P){return P=P.prototype,!(!P||!P.isReactComponent)}function v1(P,T){var q=P.alternate;switch(q===null?(q=l(P.tag,T,P.key,P.mode),q.elementType=P.elementType,q.type=P.type,q.stateNode=P.stateNode,q._debugOwner=P._debugOwner,q._debugStack=P._debugStack,q._debugTask=P._debugTask,q._debugHookTypes=P._debugHookTypes,q.alternate=P,P.alternate=q):(q.pendingProps=T,q.type=P.type,q.flags=0,q.subtreeFlags=0,q.deletions=null,q.actualDuration=-0,q.actualStartTime=-1.1),q.flags=P.flags&65011712,q.childLanes=P.childLanes,q.lanes=P.lanes,q.child=P.child,q.memoizedProps=P.memoizedProps,q.memoizedState=P.memoizedState,q.updateQueue=P.updateQueue,T=P.dependencies,q.dependencies=T===null?null:{lanes:T.lanes,firstContext:T.firstContext,_debugThenableState:T._debugThenableState},q.sibling=P.sibling,q.index=P.index,q.ref=P.ref,q.refCleanup=P.refCleanup,q.selfBaseDuration=P.selfBaseDuration,q.treeBaseDuration=P.treeBaseDuration,q._debugInfo=P._debugInfo,q._debugNeedsRemount=P._debugNeedsRemount,q.tag){case 0:case 15:q.type=$C(P.type);break;case 1:q.type=$C(P.type);break;case 11:q.type=L2(P.type)}return q}function D4(P,T){P.flags&=65011714;var q=P.alternate;return q===null?(P.childLanes=0,P.lanes=T,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null,P.selfBaseDuration=0,P.treeBaseDuration=0):(P.childLanes=q.childLanes,P.lanes=q.lanes,P.child=q.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=q.memoizedProps,P.memoizedState=q.memoizedState,P.updateQueue=q.updateQueue,P.type=q.type,T=q.dependencies,P.dependencies=T===null?null:{lanes:T.lanes,firstContext:T.firstContext,_debugThenableState:T._debugThenableState},P.selfBaseDuration=q.selfBaseDuration,P.treeBaseDuration=q.treeBaseDuration),P}function Bh(P,T,q,de,Se,Ne){var ut=0,Ft=P;if(typeof P=="function")zr(P)&&(ut=1),Ft=$C(Ft);else if(typeof P=="string")xc&&os?(ut=et(),ut=xg(P,q,ut)?26:XI(P)?27:5):xc?(ut=et(),ut=xg(P,q,ut)?26:5):ut=os&&XI(P)?27:5;else e:switch(P){case qC:return T=l(31,q,T,Se),T.elementType=qC,T.lanes=Ne,T;case P1:return mu(q.children,Se,Ne,T);case Wc:ut=8,Se|=24;break;case Gp:return P=q,de=Se,typeof P.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof P.id),T=l(12,P,T,de|2),T.elementType=Gp,T.lanes=Ne,T.stateNode={effectDuration:0,passiveEffectDuration:0},T;case O2:return T=l(13,q,T,Se),T.elementType=O2,T.lanes=Ne,T;case G2:return T=l(19,q,T,Se),T.elementType=G2,T.lanes=Ne,T;default:if(typeof P=="object"&&P!==null)switch(P.$$typeof){case A0:case mg:ut=10;break e;case Mm:ut=9;break e;case _g:ut=11,Ft=L2(Ft);break e;case RA:ut=14;break e;case jg:ut=16,Ft=null;break e}Ft="",(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(Ft+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),P===null?q="null":cs(P)?q="array":P!==void 0&&P.$$typeof===v_?(q="<"+(Q(P.type)||"Unknown")+" />",Ft=" Did you accidentally export a JSX literal instead of a component?"):q=typeof P,ut=de?typeof de.tag=="number"?w(de):typeof de.name=="string"?de.name:null:null,ut&&(Ft+=`

Check the render method of \``+ut+"`."),ut=29,q=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(q+"."+Ft)),Ft=null}return T=l(ut,q,T,Se),T.elementType=P,T.type=Ft,T.lanes=Ne,T._debugOwner=de,T}function H2(P,T,q){return T=Bh(P.type,P.key,P.props,P._owner,T,q),T._debugOwner=P._owner,T._debugStack=P._debugStack,T._debugTask=P._debugTask,T}function mu(P,T,q,de){return P=l(7,P,de,T),P.lanes=q,P}function vf(P,T,q){return P=l(6,P,null,T),P.lanes=q,P}function YI(P,T,q){return T=l(4,P.children!==null?P.children:[],P.key,T),T.lanes=q,T.stateNode={containerInfo:P.containerInfo,pendingChildren:null,implementation:P.implementation},T}function bh(P,T,q,de,Se,Ne,ut,Ft){for(this.tag=1,this.containerInfo=P,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=E0,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oe(0),this.hiddenUpdates=oe(null),this.identifierPrefix=de,this.onUncaughtError=Se,this.onCaughtError=Ne,this.onRecoverableError=ut,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Ft,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,P=this.pendingUpdatersLaneMap=[],T=0;31>T;T++)P.push(new Set);this._debugRootType=q?"hydrateRoot()":"createRoot()"}function _3(P,T,q,de,Se,Ne,ut,Ft,Tn,_o,di,li){return P=new bh(P,T,q,ut,Ft,Tn,_o,li),T=1,Ne===!0&&(T|=24),Ae&&(T|=2),Ne=l(3,null,null,T),P.current=Ne,Ne.stateNode=P,T=ur(),zi(T),P.pooledCache=T,zi(T),Ne.memoizedState={element:de,isDehydrated:q,cache:T},Ul(Ne),P}function cp(P){return""+P}function Jc(P){return P?(P=zp,P):zp}function r5(P,T,q,de){return Gi(T.current,2,P,T,q,de),2}function Gi(P,T,q,de,Se,Ne){if(Ku&&typeof Ku.onScheduleFiberRoot=="function")try{Ku.onScheduleFiberRoot(up,de,q)}catch(ut){V||(V=!0,console.error("React instrumentation encountered an error: %s",ut))}G!==null&&typeof G.markRenderScheduled=="function"&&G.markRenderScheduled(T),Se=Jc(Se),de.context===null?de.context=Se:de.pendingContext=Se,M_&&H1!==null&&!BM&&(BM=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.

Check the render method of %s.`,w(H1)||"Unknown")),de=ag(T),de.payload={element:q},Ne=Ne===void 0?null:Ne,Ne!==null&&(typeof Ne!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",Ne),de.callback=Ne),q=Rd(P,de,T),q!==null&&(s0(q,P,T),mh(q,P,T))}function pg(P,T){if(P=P.memoizedState,P!==null&&P.dehydrated!==null){var q=P.retryLane;P.retryLane=q!==0&&q<T?q:T}}function Pm(P,T){pg(P,T),(P=P.alternate)&&pg(P,T)}function Op(){return H1}function Sh(){for(var P=new Map,T=1,q=0;31>q;q++){var de=O(T);P.set(T,de),T*=2}return P}var Ys={},w1=L3(),a0=ane(),al=Object.assign,ai=Symbol.for("react.element"),v_=Symbol.for("react.transitional.element"),Al=Symbol.for("react.portal"),P1=Symbol.for("react.fragment"),Wc=Symbol.for("react.strict_mode"),Gp=Symbol.for("react.profiler"),A0=Symbol.for("react.provider"),Mm=Symbol.for("react.consumer"),mg=Symbol.for("react.context"),_g=Symbol.for("react.forward_ref"),O2=Symbol.for("react.suspense"),G2=Symbol.for("react.suspense_list"),RA=Symbol.for("react.memo"),jg=Symbol.for("react.lazy"),qC=Symbol.for("react.activity"),Kd=Symbol.for("react.memo_cache_sentinel"),h9=Symbol.iterator,yc=Symbol.for("react.client.reference"),cs=Array.isArray,Jn=w1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,c8=n.rendererVersion,wf=n.rendererPackageName,XC=n.extraDevToolsConfig,fg=n.getPublicInstance,Y2=n.getRootHostContext,_u=n.getChildHostContext,Ig=n.prepareForCommit,s5=n.resetAfterCommit,f3=n.createInstance;n.cloneMutableInstance;var ZC=n.appendInitialChild,I3=n.finalizeInitialChildren,Pf=n.shouldSetTextContent,UI=n.createTextInstance;n.cloneMutableTextInstance;var C3=n.scheduleTimeout,KI=n.cancelTimeout,E0=n.noTimeout,jc=n.isPrimaryRenderer;n.warnsIfNotActing;var cl=n.supportsMutation,Ou=n.supportsPersistence,B0=n.supportsHydration,bl=n.getInstanceFromNode;n.beforeActiveInstanceBlur;var Vd=n.preparePortalMount;n.prepareScopeUpdate,n.getInstanceFromScope;var za=n.setCurrentUpdatePriority,$g=n.getCurrentUpdatePriority,Xa=n.resolveUpdatePriority;n.trackSchedulerEvent,n.resolveEventType,n.resolveEventTimeStamp;var Za=n.shouldAttemptEagerTransition,Vs=n.detachDeletedInstance;n.requestPostPaintCallback;var fu=n.maySuspendCommit,Si=n.preloadInstance,lp=n.startSuspendingCommit,c0=n.suspendInstance;n.suspendOnActiveViewTransition;var $c=n.waitForCommitToBeReady,Qh=n.NotPendingTransition,Kl=n.HostTransitionContext,VI=n.resetFormInstance,p9=n.bindToConsole,zI=n.supportsMicrotasks,rc=n.scheduleMicrotask,b0=n.supportsTestSelectors,Mf=n.findFiberRoot,a5=n.getBoundingRect,Cg=n.getTextContent,Dm=n.isHiddenSubtree,JI=n.matchAccessibilityRole,ey=n.setFocusIfFocusable,Nm=n.setupIntersectionObserver,ll=n.appendChild,WI=n.appendChildToContainer,A5=n.commitTextUpdate,Yi=n.commitMount,c5=n.commitUpdate,Df=n.insertBefore,M1=n.insertInContainerBefore,ul=n.removeChild,Iu=n.removeChildFromContainer,yg=n.resetTextContent,ss=n.hideInstance,D1=n.hideTextInstance,l5=n.unhideInstance,Yp=n.unhideTextInstance;n.cancelViewTransitionName,n.cancelRootViewTransitionName,n.restoreRootViewTransitionName,n.cloneRootViewTransitionContainer,n.removeRootViewTransitionClone,n.measureClonedInstance,n.hasInstanceChanged,n.hasInstanceAffectedParent,n.startViewTransition,n.startGestureTransition,n.stopGestureTransition,n.getCurrentGestureOffset,n.subscribeToGestureDirection,n.createViewTransitionInstance;var zd=n.clearContainer;n.createFragmentInstance,n.updateFragmentInstanceFiber,n.commitNewChildToFragmentInstance,n.deleteChildFromFragmentInstance;var Gu=n.cloneInstance,Nf=n.createContainerChildSet,Fc=n.appendChildToContainerChildSet,_a=n.finalizeContainerChildren,fa=n.replaceContainerChildren,zs=n.cloneHiddenInstance,Rm=n.cloneHiddenTextInstance,j0=n.isSuspenseInstancePending,w_=n.isSuspenseInstanceFallback,$0=n.getSuspenseInstanceFallbackErrorDetails,N1=n.registerSuspenseInstanceRetry,Up=n.canHydrateFormStateMarker,GA=n.isFormStateMarkerMatching,Kp=n.getNextHydratableSibling,S0=n.getNextHydratableSiblingAfterSingleton,u5=n.getFirstHydratableChild,jI=n.getFirstHydratableChildWithinContainer,vh=n.getFirstHydratableChildWithinSuspenseInstance,R1=n.getFirstHydratableChildWithinSingleton,Cu=n.canHydrateInstance,N4=n.canHydrateTextInstance,Vp=n.canHydrateSuspenseInstance,Rf=n.hydrateInstance,xs=n.hydrateTextInstance,Lc=n.hydrateSuspenseInstance,Ha=n.getNextHydratableInstanceAfterSuspenseInstance,Ja=n.commitHydratedContainer,Ps=n.commitHydratedSuspenseInstance,wh=n.clearSuspenseBoundary,qg=n.clearSuspenseBoundaryFromContainer,gl=n.shouldDeleteUnhydratedTailInstances,y3=n.diffHydratedPropsForDevWarnings,Tf=n.diffHydratedTextForDevWarnings,Pa=n.describeHydratableInstanceForDevWarnings,qc=n.validateHydratableInstance,Yu=n.validateHydratableTextInstance,xc=n.supportsResources,xg=n.isHostHoistableType,$I=n.getHoistableRoot,T1=n.getResource,Xg=n.acquireResource,U2=n.releaseResource,K2=n.hydrateHoistable,ty=n.mountHoistable,kf=n.unmountHoistable,qI=n.createHoistableInstance,ls=n.prepareToCommitHoistables,gA=n.mayResourceSuspendCommit,Us=n.preloadResource,Zr=n.suspendResource,os=n.supportsSingletons,l0=n.resolveSingletonInstance,k1=n.acquireSingletonInstance,Ph=n.releaseSingletonInstance,XI=n.isHostSingletonType,dl=n.isSingletonScope,hl=[],Sl=[],Uu=-1,zp={};Object.freeze(zp);var pl=Math.clz32?Math.clz32:F,Jp=Math.log,P_=Math.LN2,Vl=256,Mh=4194304,ny=a0.unstable_scheduleCallback,x3=a0.unstable_cancelCallback,F1=a0.unstable_shouldYield,Wp=a0.unstable_requestPaint,us=a0.unstable_now,Jd=a0.unstable_ImmediatePriority,yu=a0.unstable_UserBlockingPriority,Dh=a0.unstable_NormalPriority,V2=a0.unstable_IdlePriority,g5=a0.log,oy=a0.unstable_setDisableYieldValue,up=null,Ku=null,G=null,V=!1,Ae=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Be=0,Oe,Je,Tt,ln,wn,$o,Ai;Ee.__reactDisabledLog=!0;var Qi,Ni,Xs=!1,jp=new(typeof WeakMap=="function"?WeakMap:Map),L1=new WeakMap,Eg=[],Yn=0,Qn=null,to=0,zo=[],Bi=0,eA=null,Or=1,Js="",Qs=M(null),Wa=M(null),Bg=M(null),d5=M(null),E3=/["'&<>\n\t]|^\s|\s$/,H1=null,M_=!1,gp=null,Ma=null,ja=!1,z2=!1,ms=null,Ff=null,Wd=!1,ZI=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),Ia=0;if(typeof performance=="object"&&typeof performance.now=="function")var h5=performance,p5=function(){return h5.now()};else{var zS=Date;p5=function(){return zS.now()}}var Nh=typeof Object.is=="function"?Object.is:To,yA=0,Lf=M(null),B3=M(null),iy=M(null),b3={},dp=null,eC=null,J2=!1,JS=typeof AbortController<"u"?AbortController:function(){var P=[],T=this.signal={aborted:!1,addEventListener:function(q,de){P.push(de)}};this.abort=function(){T.aborted=!0,P.forEach(function(q){return q()})}},l8=a0.unstable_scheduleCallback,ra=a0.unstable_NormalPriority,Wn={$$typeof:mg,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},_s=a0.unstable_now,u8=-0,Rh=-1.1,tC=-0,Tm=!1,O1=!1,ry=null,$p=null,W2=!1,G1=!1,S3=!1,R4=!1,sy=0,g8={},D_=null,ay=0,Ay=0,Y1=null,Q3=Jn.S;Jn.S=function(P,T){typeof T=="object"&&T!==null&&typeof T.then=="function"&&Ji(P,T),Q3!==null&&Q3(P,T)};var m5=M(null),m9=Object.prototype.hasOwnProperty,nC={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},km=[],jd=[],Vu=[],Pi=[],Zg=[],Ql=[],q0=new Set;nC.recordUnsafeLifecycleWarnings=function(P,T){q0.has(P.type)||(typeof T.componentWillMount=="function"&&T.componentWillMount.__suppressDeprecationWarning!==!0&&km.push(P),P.mode&8&&typeof T.UNSAFE_componentWillMount=="function"&&jd.push(P),typeof T.componentWillReceiveProps=="function"&&T.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Vu.push(P),P.mode&8&&typeof T.UNSAFE_componentWillReceiveProps=="function"&&Pi.push(P),typeof T.componentWillUpdate=="function"&&T.componentWillUpdate.__suppressDeprecationWarning!==!0&&Zg.push(P),P.mode&8&&typeof T.UNSAFE_componentWillUpdate=="function"&&Ql.push(P))},nC.flushPendingUnsafeLifecycleWarnings=function(){var P=new Set;0<km.length&&(km.forEach(function(Ft){P.add(w(Ft)||"Component"),q0.add(Ft.type)}),km=[]);var T=new Set;0<jd.length&&(jd.forEach(function(Ft){T.add(w(Ft)||"Component"),q0.add(Ft.type)}),jd=[]);var q=new Set;0<Vu.length&&(Vu.forEach(function(Ft){q.add(w(Ft)||"Component"),q0.add(Ft.type)}),Vu=[]);var de=new Set;0<Pi.length&&(Pi.forEach(function(Ft){de.add(w(Ft)||"Component"),q0.add(Ft.type)}),Pi=[]);var Se=new Set;0<Zg.length&&(Zg.forEach(function(Ft){Se.add(w(Ft)||"Component"),q0.add(Ft.type)}),Zg=[]);var Ne=new Set;if(0<Ql.length&&(Ql.forEach(function(Ft){Ne.add(w(Ft)||"Component"),q0.add(Ft.type)}),Ql=[]),0<T.size){var ut=f(T);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.

Please update the following components: %s`,ut)}0<de.size&&(ut=f(de),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state

Please update the following components: %s`,ut)),0<Ne.size&&(ut=f(Ne),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.

Please update the following components: %s`,ut)),0<P.size&&(ut=f(P),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,ut)),0<q.size&&(ut=f(q),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,ut)),0<Se.size&&(ut=f(Se),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.

Please update the following components: %s`,ut))};var cy=new Map,U1=new Set;nC.recordLegacyContextWarning=function(P,T){for(var q=null,de=P;de!==null;)de.mode&8&&(q=de),de=de.return;q===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!U1.has(P.type)&&(de=cy.get(q),P.type.contextTypes!=null||P.type.childContextTypes!=null||T!==null&&typeof T.getChildContext=="function")&&(de===void 0&&(de=[],cy.set(q,de)),de.push(P))},nC.flushLegacyContextWarning=function(){cy.forEach(function(P){if(P.length!==0){var T=P[0],q=new Set;P.forEach(function(Se){q.add(w(Se)||"Component"),U1.add(Se.type)});var de=f(q);Lt(T,function(){console.error(`Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: %s

Learn more about this warning here: https://react.dev/link/legacy-context`,de)})}})},nC.discardPendingWarnings=function(){km=[],jd=[],Vu=[],Pi=[],Zg=[],Ql=[],cy=new Map};var v3=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),T4=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),ed=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),hp={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},N_=null,w3=!1,td=0,zl=1,vl=2,X0=4,zu=8,Hf=[],oC=0,P3=0,j2=0,WS=1,Of=2,$2=3,q2=!1,_9=!1,k4=null,F4=!1,Gf=M(null),X2=M(0),Z2,d8=new Set,f9=new Set,ex=new Set,jS=new Set,tx=0,fs=null,Ec=null,u0=null,iC=!1,Th=!1,nd=!1,_5=0,Fm=0,R_=null,pp=0,f5=25,co=null,re=null,X=-1,me=!1,He={readContext:Fo,use:PA,useCallback:da,useContext:da,useEffect:da,useImperativeHandle:da,useLayoutEffect:da,useInsertionEffect:da,useMemo:da,useReducer:da,useRef:da,useState:da,useDebugValue:da,useDeferredValue:da,useTransition:da,useSyncExternalStore:da,useId:da,useHostTransitionStatus:da,useFormState:da,useActionState:da,useOptimistic:da,useMemoCache:da,useCacheRefresh:da},We=null,ft=null,wt=null,zt=null,en=null,In=null,po=null;We={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co="useCallback",tr(),wA(T),hu(P,T)},useContext:function(P){return co="useContext",tr(),Fo(P)},useEffect:function(P,T){return co="useEffect",tr(),wA(T),fh(P,T)},useImperativeHandle:function(P,T,q){return co="useImperativeHandle",tr(),wA(q),OC(P,T,q)},useInsertionEffect:function(P,T){co="useInsertionEffect",tr(),wA(T),Y0(4,vl,P,T)},useLayoutEffect:function(P,T){return co="useLayoutEffect",tr(),wA(T),Ih(P,T)},useMemo:function(P,T){co="useMemo",tr(),wA(T);var q=Jn.H;Jn.H=en;try{return wp(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co="useReducer",tr();var de=Jn.H;Jn.H=en;try{return HC(P,T,q)}finally{Jn.H=de}},useRef:function(P){return co="useRef",tr(),La(P)},useState:function(P){co="useState",tr();var T=Jn.H;Jn.H=en;try{return vo(P)}finally{Jn.H=T}},useDebugValue:function(){co="useDebugValue",tr()},useDeferredValue:function(P,T){return co="useDeferredValue",tr(),ff(P,T)},useTransition:function(){return co="useTransition",tr(),U0()},useSyncExternalStore:function(P,T,q){return co="useSyncExternalStore",tr(),ku(P,T,q)},useId:function(){return co="useId",tr(),A3()},useFormState:function(P,T){return co="useFormState",tr(),Td(),go(P,T)},useActionState:function(P,T){return co="useActionState",tr(),go(P,T)},useOptimistic:function(P){return co="useOptimistic",tr(),Xo(P)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co="useCacheRefresh",tr(),m2()}},ft={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co="useCallback",Vo(),hu(P,T)},useContext:function(P){return co="useContext",Vo(),Fo(P)},useEffect:function(P,T){return co="useEffect",Vo(),fh(P,T)},useImperativeHandle:function(P,T,q){return co="useImperativeHandle",Vo(),OC(P,T,q)},useInsertionEffect:function(P,T){co="useInsertionEffect",Vo(),Y0(4,vl,P,T)},useLayoutEffect:function(P,T){return co="useLayoutEffect",Vo(),Ih(P,T)},useMemo:function(P,T){co="useMemo",Vo();var q=Jn.H;Jn.H=en;try{return wp(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co="useReducer",Vo();var de=Jn.H;Jn.H=en;try{return HC(P,T,q)}finally{Jn.H=de}},useRef:function(P){return co="useRef",Vo(),La(P)},useState:function(P){co="useState",Vo();var T=Jn.H;Jn.H=en;try{return vo(P)}finally{Jn.H=T}},useDebugValue:function(){co="useDebugValue",Vo()},useDeferredValue:function(P,T){return co="useDeferredValue",Vo(),ff(P,T)},useTransition:function(){return co="useTransition",Vo(),U0()},useSyncExternalStore:function(P,T,q){return co="useSyncExternalStore",Vo(),ku(P,T,q)},useId:function(){return co="useId",Vo(),A3()},useActionState:function(P,T){return co="useActionState",Vo(),go(P,T)},useFormState:function(P,T){return co="useFormState",Vo(),Td(),go(P,T)},useOptimistic:function(P){return co="useOptimistic",Vo(),Xo(P)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co="useCacheRefresh",Vo(),m2()}},wt={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co="useCallback",Vo(),lg(P,T)},useContext:function(P){return co="useContext",Vo(),Fo(P)},useEffect:function(P,T){co="useEffect",Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co="useImperativeHandle",Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co="useInsertionEffect",Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co="useLayoutEffect",Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co="useMemo",Vo();var q=Jn.H;Jn.H=In;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co="useReducer",Vo();var de=Jn.H;Jn.H=In;try{return f1(P,T,q)}finally{Jn.H=de}},useRef:function(){return co="useRef",Vo(),ha().memoizedState},useState:function(){co="useState",Vo();var P=Jn.H;Jn.H=In;try{return f1(n0)}finally{Jn.H=P}},useDebugValue:function(){co="useDebugValue",Vo()},useDeferredValue:function(P,T){return co="useDeferredValue",Vo(),I1(P,T)},useTransition:function(){return co="useTransition",Vo(),S4()},useSyncExternalStore:function(P,T,q){return co="useSyncExternalStore",Vo(),ot(P,T,q)},useId:function(){return co="useId",Vo(),ha().memoizedState},useFormState:function(P){return co="useFormState",Vo(),Td(),Go(P)},useActionState:function(P){return co="useActionState",Vo(),Go(P)},useOptimistic:function(P,T){return co="useOptimistic",Vo(),Ti(P,T)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co="useCacheRefresh",Vo(),ha().memoizedState}},zt={readContext:function(P){return Fo(P)},use:PA,useCallback:function(P,T){return co="useCallback",Vo(),lg(P,T)},useContext:function(P){return co="useContext",Vo(),Fo(P)},useEffect:function(P,T){co="useEffect",Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co="useImperativeHandle",Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co="useInsertionEffect",Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co="useLayoutEffect",Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co="useMemo",Vo();var q=Jn.H;Jn.H=po;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co="useReducer",Vo();var de=Jn.H;Jn.H=po;try{return vp(P,T,q)}finally{Jn.H=de}},useRef:function(){return co="useRef",Vo(),ha().memoizedState},useState:function(){co="useState",Vo();var P=Jn.H;Jn.H=po;try{return vp(n0)}finally{Jn.H=P}},useDebugValue:function(){co="useDebugValue",Vo()},useDeferredValue:function(P,T){return co="useDeferredValue",Vo(),p2(P,T)},useTransition:function(){return co="useTransition",Vo(),ep()},useSyncExternalStore:function(P,T,q){return co="useSyncExternalStore",Vo(),ot(P,T,q)},useId:function(){return co="useId",Vo(),ha().memoizedState},useFormState:function(P){return co="useFormState",Vo(),Td(),lA(P)},useActionState:function(P){return co="useActionState",Vo(),lA(P)},useOptimistic:function(P,T){return co="useOptimistic",Vo(),Gs(P,T)},useHostTransitionStatus:If,useMemoCache:_h,useCacheRefresh:function(){return co="useCacheRefresh",Vo(),ha().memoizedState}},en={readContext:function(P){return m(),Fo(P)},use:function(P){return p(),PA(P)},useCallback:function(P,T){return co="useCallback",p(),tr(),hu(P,T)},useContext:function(P){return co="useContext",p(),tr(),Fo(P)},useEffect:function(P,T){return co="useEffect",p(),tr(),fh(P,T)},useImperativeHandle:function(P,T,q){return co="useImperativeHandle",p(),tr(),OC(P,T,q)},useInsertionEffect:function(P,T){co="useInsertionEffect",p(),tr(),Y0(4,vl,P,T)},useLayoutEffect:function(P,T){return co="useLayoutEffect",p(),tr(),Ih(P,T)},useMemo:function(P,T){co="useMemo",p(),tr();var q=Jn.H;Jn.H=en;try{return wp(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co="useReducer",p(),tr();var de=Jn.H;Jn.H=en;try{return HC(P,T,q)}finally{Jn.H=de}},useRef:function(P){return co="useRef",p(),tr(),La(P)},useState:function(P){co="useState",p(),tr();var T=Jn.H;Jn.H=en;try{return vo(P)}finally{Jn.H=T}},useDebugValue:function(){co="useDebugValue",p(),tr()},useDeferredValue:function(P,T){return co="useDeferredValue",p(),tr(),ff(P,T)},useTransition:function(){return co="useTransition",p(),tr(),U0()},useSyncExternalStore:function(P,T,q){return co="useSyncExternalStore",p(),tr(),ku(P,T,q)},useId:function(){return co="useId",p(),tr(),A3()},useFormState:function(P,T){return co="useFormState",p(),tr(),go(P,T)},useActionState:function(P,T){return co="useActionState",p(),tr(),go(P,T)},useOptimistic:function(P){return co="useOptimistic",p(),tr(),Xo(P)},useMemoCache:function(P){return p(),_h(P)},useHostTransitionStatus:If,useCacheRefresh:function(){return co="useCacheRefresh",tr(),m2()}},In={readContext:function(P){return m(),Fo(P)},use:function(P){return p(),PA(P)},useCallback:function(P,T){return co="useCallback",p(),Vo(),lg(P,T)},useContext:function(P){return co="useContext",p(),Vo(),Fo(P)},useEffect:function(P,T){co="useEffect",p(),Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co="useImperativeHandle",p(),Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co="useInsertionEffect",p(),Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co="useLayoutEffect",p(),Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co="useMemo",p(),Vo();var q=Jn.H;Jn.H=In;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co="useReducer",p(),Vo();var de=Jn.H;Jn.H=In;try{return f1(P,T,q)}finally{Jn.H=de}},useRef:function(){return co="useRef",p(),Vo(),ha().memoizedState},useState:function(){co="useState",p(),Vo();var P=Jn.H;Jn.H=In;try{return f1(n0)}finally{Jn.H=P}},useDebugValue:function(){co="useDebugValue",p(),Vo()},useDeferredValue:function(P,T){return co="useDeferredValue",p(),Vo(),I1(P,T)},useTransition:function(){return co="useTransition",p(),Vo(),S4()},useSyncExternalStore:function(P,T,q){return co="useSyncExternalStore",p(),Vo(),ot(P,T,q)},useId:function(){return co="useId",p(),Vo(),ha().memoizedState},useFormState:function(P){return co="useFormState",p(),Vo(),Go(P)},useActionState:function(P){return co="useActionState",p(),Vo(),Go(P)},useOptimistic:function(P,T){return co="useOptimistic",p(),Vo(),Ti(P,T)},useMemoCache:function(P){return p(),_h(P)},useHostTransitionStatus:If,useCacheRefresh:function(){return co="useCacheRefresh",Vo(),ha().memoizedState}},po={readContext:function(P){return m(),Fo(P)},use:function(P){return p(),PA(P)},useCallback:function(P,T){return co="useCallback",p(),Vo(),lg(P,T)},useContext:function(P){return co="useContext",p(),Vo(),Fo(P)},useEffect:function(P,T){co="useEffect",p(),Vo(),Hr(2048,zu,P,T)},useImperativeHandle:function(P,T,q){return co="useImperativeHandle",p(),Vo(),bI(P,T,q)},useInsertionEffect:function(P,T){return co="useInsertionEffect",p(),Vo(),Hr(4,vl,P,T)},useLayoutEffect:function(P,T){return co="useLayoutEffect",p(),Vo(),Hr(4,X0,P,T)},useMemo:function(P,T){co="useMemo",p(),Vo();var q=Jn.H;Jn.H=In;try{return kd(P,T)}finally{Jn.H=q}},useReducer:function(P,T,q){co="useReducer",p(),Vo();var de=Jn.H;Jn.H=In;try{return vp(P,T,q)}finally{Jn.H=de}},useRef:function(){return co="useRef",p(),Vo(),ha().memoizedState},useState:function(){co="useState",p(),Vo();var P=Jn.H;Jn.H=In;try{return vp(n0)}finally{Jn.H=P}},useDebugValue:function(){co="useDebugValue",p(),Vo()},useDeferredValue:function(P,T){return co="useDeferredValue",p(),Vo(),p2(P,T)},useTransition:function(){return co="useTransition",p(),Vo(),ep()},useSyncExternalStore:function(P,T,q){return co="useSyncExternalStore",p(),Vo(),ot(P,T,q)},useId:function(){return co="useId",p(),Vo(),ha().memoizedState},useFormState:function(P){return co="useFormState",p(),Vo(),lA(P)},useActionState:function(P){return co="useActionState",p(),Vo(),lA(P)},useOptimistic:function(P,T){return co="useOptimistic",p(),Vo(),Gs(P,T)},useMemoCache:function(P){return p(),_h(P)},useHostTransitionStatus:If,useCacheRefresh:function(){return co="useCacheRefresh",Vo(),ha().memoizedState}};var wo={"react-stack-bottom-frame":function(P,T,q){var de=M_;M_=!0;try{return P(T,q)}finally{M_=de}}},ci=wo["react-stack-bottom-frame"].bind(wo),Hi={"react-stack-bottom-frame":function(P){var T=M_;M_=!0;try{return P.render()}finally{M_=T}}},pr=Hi["react-stack-bottom-frame"].bind(Hi),Wr={"react-stack-bottom-frame":function(P,T){try{T.componentDidMount()}catch(q){NA(P,P.return,q)}}},Ca=Wr["react-stack-bottom-frame"].bind(Wr),rr={"react-stack-bottom-frame":function(P,T,q,de,Se){try{T.componentDidUpdate(q,de,Se)}catch(Ne){NA(P,P.return,Ne)}}},Wi=rr["react-stack-bottom-frame"].bind(rr),Mi={"react-stack-bottom-frame":function(P,T){var q=T.stack;P.componentDidCatch(T.value,{componentStack:q!==null?q:""})}},Gr=Mi["react-stack-bottom-frame"].bind(Mi),Bc={"react-stack-bottom-frame":function(P,T,q){try{q.componentWillUnmount()}catch(de){NA(P,T,de)}}},qp=Bc["react-stack-bottom-frame"].bind(Bc),T_={"react-stack-bottom-frame":function(P){P.resourceKind!=null&&console.error("Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",P.resourceKind);var T=P.create;return P=P.inst,T=T(),P.destroy=T}},ly=T_["react-stack-bottom-frame"].bind(T_),K1={"react-stack-bottom-frame":function(P,T,q){try{q()}catch(de){NA(P,T,de)}}},uy=K1["react-stack-bottom-frame"].bind(K1),Lm={"react-stack-bottom-frame":function(P){var T=P._init;return T(P._payload)}},gy=Lm["react-stack-bottom-frame"].bind(Lm),rC=null,dy=0,vr=null,sC,D=sC=!1,H={},z={},se={};d=function(P,T,q){if(q!==null&&typeof q=="object"&&q._store&&(!q._store.validated&&q.key==null||q._store.validated===2)){if(typeof q._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");q._store.validated=1;var de=w(P),Se=de||"null";if(!H[Se]){H[Se]=!0,q=q._owner,P=P._debugOwner;var Ne="";P&&typeof P.tag=="number"&&(Se=w(P))&&(Ne=`

Check the render method of \``+Se+"`."),Ne||de&&(Ne=`

Check the top-level render call using <`+de+">.");var ut="";q!=null&&P!==q&&(de=null,typeof q.tag=="number"?de=w(q):typeof q.name=="string"&&(de=q.name),de&&(ut=" It was passed a child from "+de+".")),Lt(T,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',Ne,ut)})}}};var xe=f2(!0),Fe=f2(!1),pt=M(null),St=null,on=1,Pn=2,Zn=M(0),Qo={},Gn=new Set,jn=new Set,wr=new Set,br=new Set,tA=new Set,Mn=new Set,Cn=new Set,Un=new Set,Mo=new Set,mr=new Set;Object.freeze(Qo);var nA={enqueueSetState:function(P,T,q){P=P._reactInternals;var de=sl(P),Se=ag(de);Se.payload=T,q!=null&&(bs(q),Se.callback=q),T=Rd(P,Se,de),T!==null&&(s0(T,P,de),mh(T,P,de)),Re(P,de)},enqueueReplaceState:function(P,T,q){P=P._reactInternals;var de=sl(P),Se=ag(de);Se.tag=WS,Se.payload=T,q!=null&&(bs(q),Se.callback=q),T=Rd(P,Se,de),T!==null&&(s0(T,P,de),mh(T,P,de)),Re(P,de)},enqueueForceUpdate:function(P,T){P=P._reactInternals;var q=sl(P),de=ag(q);de.tag=Of,T!=null&&(bs(T),de.callback=T),T=Rd(P,de,q),T!==null&&(s0(T,P,q),mh(T,P,q)),G!==null&&typeof G.markForceUpdateScheduled=="function"&&G.markForceUpdateScheduled(P,q)}},es=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(T))return}else if(typeof e=="object"&&typeof e.emit=="function"){e.emit("uncaughtException",P);return}console.error(P)},gs=null,kh=null,uc=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),xu=!1,MK={},aye={},Aye={},cye={},$S=!1,lye={},gte={},dte={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},uye=!1,gye=null;gye=new Set;var I9=!1,mp=!1,DK=!1,dye=typeof WeakSet=="function"?WeakSet:Set,k_=null,lM=null,uM=null,Xp=null,hy=!1,I5=null,gM=8192,wot={getCacheForType:function(P){var T=Fo(Wn),q=T.data.get(P);return q===void 0&&(q=P(),T.data.set(P,q)),q},getOwner:function(){return H1}},gk=0,dM=1,h8=2,NK=3,dk=4;if(typeof Symbol=="function"&&Symbol.for){var hM=Symbol.for;gk=hM("selector.component"),dM=hM("selector.has_pseudo_class"),h8=hM("selector.role"),NK=hM("selector.test_id"),dk=hM("selector.text")}var hk=[],hye=typeof WeakMap=="function"?WeakMap:Map,Zp=0,V1=2,z1=4,nx=0,pM=1,em=2,hte=3,M3=4,mM=6,_M=5,sc=Zp,wl=null,xA=null,YA=0,aC=0,fM=1,p8=2,pk=3,pye=4,pte=5,qS=6,IM=7,mk=8,C9=9,ml=aC,_p=null,Hm=!1,C5=!1,_k=!1,Yf=0,_l=nx,ox=0,fl=0,mte=0,Q0=0,Fh=0,AC=null,J1=null,fk=!1,RK=0,XS=300,L4=1/0,CM=500,m8=null,Om=null,D3=0,ZS=1,y9=2,cC=0,W1=1,$d=2,Hc=3,x9=4,py=5,qd=0,Uf=null,_8=null,E9=0,_te=0,TK=null,mye=null,fte=50,eQ=0,kK=null,yM=!1,B9=!1,xM=50,tQ=0,Ik=null,EM=!1,Lh=null,nQ=!1,Ite=new Set,FK={},bg=null,N3=null,Ck=!1;try{var yk=Object.preventExtensions({})}catch{Ck=!0}var BM=!1,LK={},f8=null,oQ=null,Cte=null,I8=null,R3=null,bM=null,SM=null,QM=null,vM=null;return f8=function(P,T,q,de){T=o(P,T),T!==null&&(q=i(T.memoizedState,q,0,de),T.memoizedState=q,T.baseState=q,P.memoizedProps=al({},P.memoizedProps),q=fc(P,2),q!==null&&s0(q,P,2))},oQ=function(P,T,q){T=o(P,T),T!==null&&(q=a(T.memoizedState,q,0),T.memoizedState=q,T.baseState=q,P.memoizedProps=al({},P.memoizedProps),q=fc(P,2),q!==null&&s0(q,P,2))},Cte=function(P,T,q,de){T=o(P,T),T!==null&&(q=r(T.memoizedState,q,de),T.memoizedState=q,T.baseState=q,P.memoizedProps=al({},P.memoizedProps),q=fc(P,2),q!==null&&s0(q,P,2))},I8=function(P,T,q){P.pendingProps=i(P.memoizedProps,T,0,q),P.alternate&&(P.alternate.pendingProps=P.pendingProps),T=fc(P,2),T!==null&&s0(T,P,2)},R3=function(P,T){P.pendingProps=a(P.memoizedProps,T,0),P.alternate&&(P.alternate.pendingProps=P.pendingProps),T=fc(P,2),T!==null&&s0(T,P,2)},bM=function(P,T,q){P.pendingProps=r(P.memoizedProps,T,q),P.alternate&&(P.alternate.pendingProps=P.pendingProps),T=fc(P,2),T!==null&&s0(T,P,2)},SM=function(P){var T=fc(P,2);T!==null&&s0(T,P,2)},QM=function(P){c=P},vM=function(P){A=P},Ys.attemptContinuousHydration=function(P){if(P.tag===13){var T=fc(P,67108864);T!==null&&s0(T,P,67108864),Pm(P,67108864)}},Ys.attemptHydrationAtCurrentPriority=function(P){if(P.tag===13){var T=sl(P);T=_e(T);var q=fc(P,T);q!==null&&s0(q,P,T),Pm(P,T)}},Ys.attemptSynchronousHydration=function(P){switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var T=U(P.pendingLanes);if(T!==0){for(P.pendingLanes|=2,P.entangledLanes|=2;T;){var q=1<<31-pl(T);P.entanglements[1]|=q,T&=~q}_n(P),(sc&(V1|z1))===Zp&&(L4=us()+CM,qn(0))}}break;case 13:T=fc(P,2),T!==null&&s0(T,P,2),D2(),Pm(P,2)}},Ys.batchedUpdates=function(P,T){return P(T)},Ys.createComponentSelector=function(P){return{$$typeof:gk,value:P}},Ys.createContainer=function(P,T,q,de,Se,Ne,ut,Ft,Tn,_o){return _3(P,T,!1,null,q,de,Ne,ut,Ft,Tn,_o,null)},Ys.createHasPseudoClassSelector=function(P){return{$$typeof:dM,value:P}},Ys.createHydrationContainer=function(P,T,q,de,Se,Ne,ut,Ft,Tn,_o,di,li,vi){return P=_3(q,de,!0,P,Se,Ne,Ft,Tn,_o,di,li,vi),P.context=Jc(null),q=P.current,de=sl(q),de=_e(de),Se=ag(de),Se.callback=T??null,Rd(q,Se,de),T=de,P.current.lanes=T,ie(P,T),_n(P),P},Ys.createPortal=function(P,T,q){var de=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{cp(de);var Se=!1}catch{Se=!0}return Se&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&de[Symbol.toStringTag]||de.constructor.name||"Object"),cp(de)),{$$typeof:Al,key:de==null?null:""+de,children:P,containerInfo:T,implementation:q}},Ys.createRoleSelector=function(P){return{$$typeof:h8,value:P}},Ys.createTestNameSelector=function(P){return{$$typeof:NK,value:P}},Ys.createTextSelector=function(P){return{$$typeof:dk,value:P}},Ys.defaultOnCaughtError=function(P){var T=gs?"The above error occurred in the <"+gs+"> component.":"The above error occurred in one of your React components.",q="React will try to recreate this component tree from scratch using the error boundary you provided, "+((kh||"Anonymous")+".");typeof P=="object"&&P!==null&&typeof P.environmentName=="string"?p9("error",[`%o

%s

%s
`,P,T,q],P.environmentName)():console.error(`%o

%s

%s
`,P,T,q)},Ys.defaultOnRecoverableError=function(P){es(P)},Ys.defaultOnUncaughtError=function(P){es(P),console.warn(`%s

%s
`,gs?"An error occurred in the <"+gs+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)},Ys.deferredUpdates=function(P){var T=Jn.T,q=$g();try{return za(32),Jn.T=null,P()}finally{za(q),Jn.T=T}},Ys.discreteUpdates=function(P,T,q,de,Se){var Ne=Jn.T,ut=$g();try{return za(2),Jn.T=null,P(T,q,de,Se)}finally{za(ut),Jn.T=Ne,sc===Zp&&(L4=us()+CM)}},Ys.findAllNodes=zC,Ys.findBoundingRects=function(P,T){if(!b0)throw Error("Test selector API is not supported by this renderer.");T=zC(P,T),P=[];for(var q=0;q<T.length;q++)P.push(a5(T[q]));for(T=P.length-1;0<T;T--){q=P[T];for(var de=q.x,Se=de+q.width,Ne=q.y,ut=Ne+q.height,Ft=T-1;0<=Ft;Ft--)if(T!==Ft){var Tn=P[Ft],_o=Tn.x,di=_o+Tn.width,li=Tn.y,vi=li+Tn.height;if(de>=_o&&Ne>=li&&Se<=di&&ut<=vi){P.splice(T,1);break}else if(de!==_o||q.width!==Tn.width||vi<Ne||li>ut){if(!(Ne!==li||q.height!==Tn.height||di<de||_o>Se)){_o>de&&(Tn.width+=_o-de,Tn.x=de),di<Se&&(Tn.width=Se-_o),P.splice(T,1);break}}else{li>Ne&&(Tn.height+=li-Ne,Tn.y=Ne),vi<ut&&(Tn.height=ut-li),P.splice(T,1);break}}}return P},Ys.findHostInstance=function(P){var T=P._reactInternals;if(T===void 0)throw typeof P.render=="function"?Error("Unable to find node on an unmounted component."):(P=Object.keys(P).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+P));return P=x(T),P===null?null:fg(P.stateNode)},Ys.findHostInstanceWithNoPortals=function(P){return P=y(P),P=P!==null?B(P):null,P===null?null:fg(P.stateNode)},Ys.findHostInstanceWithWarning=function(P,T){var q=P._reactInternals;if(q===void 0)throw typeof P.render=="function"?Error("Unable to find node on an unmounted component."):(P=Object.keys(P).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+P));if(P=x(q),P===null)return null;if(P.mode&8){var de=w(q)||"Component";LK[de]||(LK[de]=!0,Lt(P,function(){q.mode&8?console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",T,T,de):console.error("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://react.dev/link/strict-mode-find-node",T,T,de)}))}return fg(P.stateNode)},Ys.flushPassiveEffects=jC,Ys.flushSyncFromReconciler=function(P){var T=sc;sc|=1;var q=Jn.T,de=$g();try{if(za(2),Jn.T=null,P)return P()}finally{za(de),Jn.T=q,sc=T,(sc&(V1|z1))===Zp&&qn(0)}},Ys.flushSyncWork=D2,Ys.focusWithin=function(P,T){if(!b0)throw Error("Test selector API is not supported by this renderer.");for(P=g3(P),T=P2(P,T),T=Array.from(T),P=0;P<T.length;){var q=T[P++],de=q.tag;if(!Dm(q)){if((de===5||de===26||de===27)&&ey(q.stateNode))return!0;for(q=q.child;q!==null;)T.push(q),q=q.sibling}}return!1},Ys.getFindAllNodesFailureDescription=function(P,T){if(!b0)throw Error("Test selector API is not supported by this renderer.");var q=0,de=[];P=[g3(P),0];for(var Se=0;Se<P.length;){var Ne=P[Se++],ut=Ne.tag,Ft=P[Se++],Tn=T[Ft];if((ut!==5&&ut!==26&&ut!==27||!Dm(Ne))&&(Wg(Ne,Tn)&&(de.push(r0(Tn)),Ft++,Ft>q&&(q=Ft)),Ft<T.length))for(Ne=Ne.child;Ne!==null;)P.push(Ne,Ft),Ne=Ne.sibling}if(q<T.length){for(P=[];q<T.length;q++)P.push(r0(T[q]));return`findAllNodes was able to match part of the selector:
  `+(de.join(" > ")+`

No matching component was found for:
  `)+P.join(" > ")}return null},Ys.getPublicRootInstance=function(P){if(P=P.current,!P.child)return null;switch(P.child.tag){case 27:case 5:return fg(P.child.stateNode);default:return P.child.stateNode}},Ys.injectIntoDevTools=function(){var P={bundleType:1,version:c8,rendererPackageName:wf,currentDispatcherRef:Jn,reconcilerVersion:"19.1.0"};return XC!==null&&(P.rendererConfig=XC),P.overrideHookState=f8,P.overrideHookStateDeletePath=oQ,P.overrideHookStateRenamePath=Cte,P.overrideProps=I8,P.overridePropsDeletePath=R3,P.overridePropsRenamePath=bM,P.scheduleUpdate=SM,P.setErrorHandler=QM,P.setSuspenseHandler=vM,P.scheduleRefresh=g,P.scheduleRoot=u,P.setRefreshHandler=h,P.getCurrentFiber=Op,P.getLaneLabelMap=Sh,P.injectProfilingHooks=ve,ye(P)},Ys.isAlreadyRendering=function(){return(sc&(V1|z1))!==Zp},Ys.observeVisibleRects=function(P,T,q,de){function Se(){var _o=zC(P,T);Ne.forEach(function(di){0>_o.indexOf(di)&&Tn(di)}),_o.forEach(function(di){0>Ne.indexOf(di)&&Ft(di)})}if(!b0)throw Error("Test selector API is not supported by this renderer.");var Ne=zC(P,T);q=Nm(Ne,q,de);var ut=q.disconnect,Ft=q.observe,Tn=q.unobserve;return hk.push(Se),{disconnect:function(){var _o=hk.indexOf(Se);0<=_o&&hk.splice(_o,1),ut()}}},Ys.shouldError=function(P){return c(P)},Ys.shouldSuspend=function(P){return A(P)},Ys.startHostTransition=function(P,T,q,de){if(P.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var Se=f_(P).queue;Mp(P,Se,T,Qh,q===null?_:function(){Jn.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var Ne=f_(P).next.queue;return o0(P,Ne,{},sl(P)),q(de)})},Ys.updateContainer=function(P,T,q,de){var Se=T.current,Ne=sl(Se);return Gi(Se,Ne,P,T,q,de),Ne},Ys.updateContainerSync=r5,Ys},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0}))})(qBe)),qBe.exports}var cpt;function rJn(){if(cpt)return Gre.exports;cpt=1;var t={env:{}};return t.env.NODE_ENV==="production"?Gre.exports=oJn():Gre.exports=iJn(),Gre.exports}var sJn=rJn();const aJn=_y(sJn);var Yre={exports:{}},k8={};var lpt;function AJn(){return lpt||(lpt=1,k8.ConcurrentRoot=1,k8.ContinuousEventPriority=8,k8.DefaultEventPriority=32,k8.DiscreteEventPriority=2,k8.IdleEventPriority=268435456,k8.LegacyRoot=0,k8.NoEventPriority=0),k8}var F8={},upt;function cJn(){if(upt)return F8;upt=1;var t={env:{}};return t.env.NODE_ENV!=="production"&&(F8.ConcurrentRoot=1,F8.ContinuousEventPriority=8,F8.DefaultEventPriority=32,F8.DiscreteEventPriority=2,F8.IdleEventPriority=268435456,F8.LegacyRoot=0,F8.NoEventPriority=0),F8}var gpt;function lJn(){if(gpt)return Yre.exports;gpt=1;var t={env:{}};return t.env.NODE_ENV==="production"?Yre.exports=AJn():Yre.exports=cJn(),Yre.exports}var XBe=lJn();const uJn=Object.keys({a:1,b:0,c:0,d:1,e:0,f:0,m11:1,m12:0,m13:0,m14:0,m21:0,m22:1,m23:0,m24:0,m31:0,m32:0,m33:1,m34:0,m41:0,m42:0,m43:0,m44:1,is2D:!0,isIdentity:!0}),dpt=t=>(t instanceof Float64Array||t instanceof Float32Array||Array.isArray(t)&&t.every(e=>typeof e=="number"))&&[6,16].some(e=>t.length===e),hpt=t=>typeof DOMMatrix<"u"&&t instanceof DOMMatrix||t instanceof Sy||typeof t=="object"&&uJn.every(e=>t&&e in t),Ure=(t,e)=>{if(!dpt(t))throw TypeError(`CSSMatrix: "${Array.from(t).join(",")}" must be an array with 6/16 numbers.`);if(t.length===16){const[A,c,l,u,g,h,d,p,m,_,f,I,C,y,x,E]=t;return nz(e??new Sy,A,c,l,u,g,h,d,p,m,_,f,I,C,y,x,E)}const[n,o,i,r,s,a]=t;return nz(e??new Sy,n,o,0,0,i,r,0,0,0,0,1,0,s,a,0,1)},nz=(t,e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m)=>(t.m11=e,t.a=e,t.m21=r,t.c=r,t.m31=c,t.m41=h,t.e=h,t.m12=n,t.b=n,t.m22=s,t.d=s,t.m32=l,t.m42=d,t.f=d,t.m13=o,t.m23=a,t.m33=u,t.m43=p,t.m14=i,t.m24=A,t.m34=g,t.m44=m,t),ZBe=(t,e,n,o,i,r,s,a,A,c,l,u,g,h,d,p)=>nz(new Sy,t,e,n,o,i,r,s,a,A,c,l,u,g,h,d,p),Kre=(t,e)=>{if(hpt(t))return nz(e??new Sy,t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44);throw TypeError(`CSSMatrix: "${JSON.stringify(t)}" is not a DOMMatrix / CSSMatrix / JSON compatible object.`)},e9e=t=>{if(typeof t!="string")throw TypeError(`CSSMatrix: "${JSON.stringify(t)}" is not a string.`);const e=String(t).replace(/\s/g,""),n=new Sy,o=`CSSMatrix: invalid transform string "${t}"`,i=/([\w-]+)\(([^)]*)\)/g;let r=0,s;for(;s=i.exec(e);){const a=s[1],A=s[2];if(r+=s[0].length,!A)throw TypeError(o);const c=A.split(",").map(m=>m.includes("rad")?parseFloat(m)*(180/Math.PI):parseFloat(m)),[l,u,g,h]=c,d=[l,u,g],p=[l,u,g,h];if(a==="perspective"&&l&&[u,g].every(m=>m===void 0))n.m34=-1/l;else if(a.includes("matrix")&&[6,16].includes(c.length)&&c.every(m=>!Number.isNaN(+m))){const m=c.map(_=>Math.abs(_)<1e-6?0:_);n.multiplySelf(Ure(m))}else if(a==="translate3d"&&d.every(m=>!Number.isNaN(+m)))n.translateSelf(l,u,g);else if(a==="translate"&&l&&g===void 0)n.translateSelf(l,u||0,0);else if(a==="rotate3d"&&p.every(m=>!Number.isNaN(+m))&&h)n.rotateAxisAngleSelf(l,u,g,h);else if(a==="rotate"&&l&&[u,g].every(m=>m===void 0))n.rotateSelf(0,0,l);else if(a==="scale3d"&&d.every(m=>!Number.isNaN(+m))&&d.some(m=>m!==1))n.scaleSelf(l,u,g);else if(a==="scale"&&!Number.isNaN(l)&&(l!==1||u!==1)&&g===void 0){const m=Number.isNaN(+u)?l:u;n.scaleSelf(l,m,1)}else if(a==="skew"&&(l||!Number.isNaN(l)&&u)&&g===void 0)n.skewSelf(l,u||0);else if(["translate","rotate","scale","skew"].some(m=>a.includes(m))&&/[XYZ]/.test(a)&&l&&[u,g].every(m=>m===void 0))if(a==="skewX"||a==="skewY")n[a==="skewX"?"skewXSelf":"skewYSelf"](l);else{const m=a.replace(/[XYZ]/,""),_=a.replace(m,""),f=["X","Y","Z"].indexOf(_),I=m==="scale"?1:0,C=m+"Self",y=[f===0?l:I,f===1?l:I,f===2?l:I];n[C](...y)}else throw TypeError(o)}if(r!==e.length)throw TypeError(o);return n},gJn=(t,e)=>e?[t.a,t.b,t.c,t.d,t.e,t.f]:[t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44],dJn=(t,e,n)=>{const o=new Sy;return o.m41=t,o.e=t,o.m42=e,o.f=e,o.m43=n,o},t9e=(t,e,n)=>{const o=new Sy,i=Math.PI/180,r=t*i,s=e*i,a=n*i,A=Math.cos(r),c=-Math.sin(r),l=Math.cos(s),u=-Math.sin(s),g=Math.cos(a),h=-Math.sin(a),d=l*g,p=-l*h;o.m11=d,o.a=d,o.m12=p,o.b=p,o.m13=u;const m=c*u*g+A*h;o.m21=m,o.c=m;const _=A*g-c*u*h;return o.m22=_,o.d=_,o.m23=-c*l,o.m31=c*h-A*u*g,o.m32=c*g+A*u*h,o.m33=A*l,o},n9e=(t=0,e=0,n=0,o=0)=>{const i=new Sy,r=Math.sqrt(t*t+e*e+n*n);if(r===0)return i;const s=t/r,a=e/r,A=n/r,c=o*(Math.PI/360),l=Math.sin(c),u=Math.cos(c),g=l*l,h=s*s,d=a*a,p=A*A,m=1-2*(d+p)*g;i.m11=m,i.a=m;const _=2*(s*a*g+A*l*u);i.m12=_,i.b=_,i.m13=2*(s*A*g-a*l*u);const f=2*(a*s*g-A*l*u);i.m21=f,i.c=f;const I=1-2*(p+h)*g;return i.m22=I,i.d=I,i.m23=2*(a*A*g+s*l*u),i.m31=2*(A*s*g+a*l*u),i.m32=2*(A*a*g-s*l*u),i.m33=1-2*(h+d)*g,i},hJn=(t,e,n)=>{const o=new Sy;return o.m11=t,o.a=t,o.m22=e,o.d=e,o.m33=n,o},o9e=(t,e)=>{const n=new Sy;if(t){const o=t*Math.PI/180,i=Math.tan(o);n.m21=i,n.c=i}if(e){const o=e*Math.PI/180,i=Math.tan(o);n.m12=i,n.b=i}return n},pJn=t=>o9e(t,0),mJn=t=>o9e(0,t),ppt=(t,e,n)=>{const o=e.m11*t.m11+e.m12*t.m21+e.m13*t.m31+e.m14*t.m41,i=e.m11*t.m12+e.m12*t.m22+e.m13*t.m32+e.m14*t.m42,r=e.m11*t.m13+e.m12*t.m23+e.m13*t.m33+e.m14*t.m43,s=e.m11*t.m14+e.m12*t.m24+e.m13*t.m34+e.m14*t.m44,a=e.m21*t.m11+e.m22*t.m21+e.m23*t.m31+e.m24*t.m41,A=e.m21*t.m12+e.m22*t.m22+e.m23*t.m32+e.m24*t.m42,c=e.m21*t.m13+e.m22*t.m23+e.m23*t.m33+e.m24*t.m43,l=e.m21*t.m14+e.m22*t.m24+e.m23*t.m34+e.m24*t.m44,u=e.m31*t.m11+e.m32*t.m21+e.m33*t.m31+e.m34*t.m41,g=e.m31*t.m12+e.m32*t.m22+e.m33*t.m32+e.m34*t.m42,h=e.m31*t.m13+e.m32*t.m23+e.m33*t.m33+e.m34*t.m43,d=e.m31*t.m14+e.m32*t.m24+e.m33*t.m34+e.m34*t.m44,p=e.m41*t.m11+e.m42*t.m21+e.m43*t.m31+e.m44*t.m41,m=e.m41*t.m12+e.m42*t.m22+e.m43*t.m32+e.m44*t.m42,_=e.m41*t.m13+e.m42*t.m23+e.m43*t.m33+e.m44*t.m43,f=e.m41*t.m14+e.m42*t.m24+e.m43*t.m34+e.m44*t.m44;return n.m11=o,n.a=o,n.m21=a,n.c=a,n.m31=u,n.m41=p,n.e=p,n.m12=i,n.b=i,n.m22=A,n.d=A,n.m32=g,n.m42=m,n.f=m,n.m13=r,n.m23=c,n.m33=h,n.m43=_,n.m14=s,n.m24=l,n.m34=d,n.m44=f,n},mpt=(t,e)=>ppt(t,e,new Sy);var Sy=class{static Translate=dJn;static Rotate=t9e;static RotateAxisAngle=n9e;static Scale=hJn;static SkewX=pJn;static SkewY=mJn;static Skew=o9e;static Multiply=mpt;static fromArray=Ure;static fromMatrix=Kre;static fromString=e9e;static toArray=gJn;static isCompatibleArray=dpt;static isCompatibleObject=hpt;constructor(t){if(t){if(typeof t=="string"&&t.length&&t!=="none")return e9e(t);if(Array.isArray(t)||t instanceof Float64Array||t instanceof Float32Array)return Ure(t);if(typeof t=="object")return Kre(t)}return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this.m11=1,this.m12=0,this.m13=0,this.m14=0,this.m21=0,this.m22=1,this.m23=0,this.m24=0,this.m31=0,this.m32=0,this.m33=1,this.m34=0,this.m41=0,this.m42=0,this.m43=0,this.m44=1,this}get isIdentity(){return this.m11===1&&this.m12===0&&this.m13===0&&this.m14===0&&this.m21===0&&this.m22===1&&this.m23===0&&this.m24===0&&this.m31===0&&this.m32===0&&this.m33===1&&this.m34===0&&this.m41===0&&this.m42===0&&this.m43===0&&this.m44===1}get is2D(){return this.m31===0&&this.m32===0&&this.m33===1&&this.m34===0&&this.m43===0&&this.m44===1}setMatrixValue(t){if(typeof t=="string"&&t.length&&t!=="none"){const e=e9e(t);return nz(this,e.m11,e.m12,e.m13,e.m14,e.m21,e.m22,e.m23,e.m24,e.m31,e.m32,e.m33,e.m34,e.m41,e.m42,e.m43,e.m44)}return Array.isArray(t)||t instanceof Float64Array||t instanceof Float32Array?Ure(t,this):typeof t=="object"?Kre(t,this):this}toFloat32Array(t){return t?new Float32Array([this.a,this.b,this.c,this.d,this.e,this.f]):new Float32Array([this.m11,this.m12,this.m13,this.m14,this.m21,this.m22,this.m23,this.m24,this.m31,this.m32,this.m33,this.m34,this.m41,this.m42,this.m43,this.m44])}toFloat64Array(t){return t?new Float64Array([this.a,this.b,this.c,this.d,this.e,this.f]):new Float64Array([this.m11,this.m12,this.m13,this.m14,this.m21,this.m22,this.m23,this.m24,this.m31,this.m32,this.m33,this.m34,this.m41,this.m42,this.m43,this.m44])}toString(){const{is2D:t}=this,e=this.toFloat64Array(t).join(", ");return`${t?"matrix":"matrix3d"}(${e})`}toJSON(){const{is2D:t,isIdentity:e}=this;return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,m11:this.m11,m12:this.m12,m13:this.m13,m14:this.m14,m21:this.m21,m22:this.m22,m23:this.m23,m24:this.m24,m31:this.m31,m32:this.m32,m33:this.m33,m34:this.m34,m41:this.m41,m42:this.m42,m43:this.m43,m44:this.m44,is2D:t,isIdentity:e}}multiply(t){return mpt(this,t)}translate(t,e,n){const o=e??0,i=n??0,{m11:r,m12:s,m13:a,m14:A,m21:c,m22:l,m23:u,m24:g,m31:h,m32:d,m33:p,m34:m,m41:_,m42:f,m43:I,m44:C}=this,y=t*r+o*c+i*h+_,x=t*s+o*l+i*d+f,E=t*a+o*u+i*p+I,B=t*A+o*g+i*m+C;return ZBe(r,s,a,A,c,l,u,g,h,d,p,m,y,x,E,B)}scale(t,e,n){const o=e??t,i=n??1,{m41:r,m42:s,m43:a,m44:A}=this;return ZBe(this.m11*t,this.m12*t,this.m13*t,this.m14*t,this.m21*o,this.m22*o,this.m23*o,this.m24*o,this.m31*i,this.m32*i,this.m33*i,this.m34*i,r,s,a,A)}rotate(t,e,n){let o=t,i=e||0,r=n||0;return typeof t=="number"&&typeof e>"u"&&typeof n>"u"&&(r=o,o=0,i=0),this.multiply(t9e(o,i,r))}rotateAxisAngle(t=0,e=0,n=0,o=0){if([t,e,n,o].some(i=>!Number.isFinite(i)))throw new TypeError("CSSMatrix: expecting 4 values");return Math.sqrt(t*t+e*e+n*n)===0?Kre(this):this.multiply(n9e(t,e,n,o))}skewX(t){return this.skew(t,0)}skewY(t){return this.skew(0,t)}skew(t,e){const n=t?Math.tan(t*Math.PI/180):0,o=e?Math.tan(e*Math.PI/180):0,{m11:i,m12:r,m13:s,m14:a,m21:A,m22:c,m23:l,m24:u}=this;return ZBe(i+o*A,r+o*c,s+o*l,a+o*u,n*i+A,n*r+c,n*s+l,n*a+u,this.m31,this.m32,this.m33,this.m34,this.m41,this.m42,this.m43,this.m44)}multiplySelf(t){return ppt(this,t,this),this}translateSelf(t,e,n){const o=e??0,i=n??0,{m11:r,m12:s,m13:a,m14:A,m21:c,m22:l,m23:u,m24:g,m31:h,m32:d,m33:p,m34:m,m41:_,m42:f,m43:I,m44:C}=this,y=t*r+o*c+i*h+_,x=t*s+o*l+i*d+f,E=t*a+o*u+i*p+I,B=t*A+o*g+i*m+C;return this.m41=y,this.e=y,this.m42=x,this.f=x,this.m43=E,this.m44=B,this}scaleSelf(t,e,n){const o=e??t,i=n??1;return this.m11*=t,this.a*=t,this.m12*=t,this.b*=t,this.m13*=t,this.m14*=t,this.m21*=o,this.c*=o,this.m22*=o,this.d*=o,this.m23*=o,this.m24*=o,this.m31*=i,this.m32*=i,this.m33*=i,this.m34*=i,this}rotateSelf(t,e,n){let o=t,i=e||0,r=n||0;return typeof t=="number"&&typeof e>"u"&&typeof n>"u"&&(r=o,o=0,i=0),this.multiplySelf(t9e(o,i,r))}rotateAxisAngleSelf(t=0,e=0,n=0,o=0){if([t,e,n,o].some(i=>!Number.isFinite(i)))throw new TypeError("CSSMatrix: expecting 4 values");return Math.sqrt(t*t+e*e+n*n)===0?this:this.multiplySelf(n9e(t,e,n,o))}skewXSelf(t){return this.skewSelf(t,0)}skewYSelf(t){return this.skewSelf(0,t)}skewSelf(t,e){const n=t?Math.tan(t*Math.PI/180):0,o=e?Math.tan(e*Math.PI/180):0,{m11:i,m12:r,m13:s,m14:a,m21:A,m22:c,m23:l,m24:u}=this,g=i+o*A,h=r+o*c,d=s+o*l,p=a+o*u,m=n*i+A,_=n*r+c,f=n*s+l,I=n*a+u;return this.m11=g,this.a=g,this.m12=h,this.b=h,this.m13=d,this.m14=p,this.m21=m,this.c=m,this.m22=_,this.d=_,this.m23=f,this.m24=I,this}transformPoint(t){const e=this.m11*t.x+this.m21*t.y+this.m31*t.z+this.m41*t.w,n=this.m12*t.x+this.m22*t.y+this.m32*t.z+this.m42*t.w,o=this.m13*t.x+this.m23*t.y+this.m33*t.z+this.m43*t.w,i=this.m14*t.x+this.m24*t.y+this.m34*t.z+this.m44*t.w;return typeof DOMPoint<"u"&&t instanceof DOMPoint?new DOMPoint(e,n,o,i):{x:e,y:n,z:o,w:i}}};var _Jn="2.3.3";const j9=([t,e],[n,o],i)=>[t+(n-t)*i,e+(o-e)*i],Vre=(t,e)=>Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])),PF=(t,e,n,o)=>Vre([t,e],[n,o]),zre=(t,e,n,o,i)=>{let r={x:t,y:e};if(typeof i=="number"){const s=Vre([t,e],[n,o]);if(i<=0)r={x:t,y:e};else if(i>=s)r={x:n,y:o};else{const[a,A]=j9([t,e],[n,o],i/s);r={x:a,y:A}}}return r},i9e=(t,e,n,o)=>{const{min:i,max:r}=Math;return[i(t,n),i(e,o),r(t,n),r(e,o)]},fJn={getLineBBox:i9e,getLineLength:PF,getPointAtLineLength:zre},oz=[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],r9e=[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],Jre=t=>{const e=[];for(let n=t,o=n.length,i=o-1;o>1;o-=1,i-=1){const r=[];for(let s=0;s<i;s+=1)r.push({x:i*(n[s+1].x-n[s].x),y:i*(n[s+1].y-n[s].y),t:0});e.push(r),n=r}return e},Wre=(t,e)=>{if(e===0)return t[0].t=0,t[0];const n=t.length-1;if(e===1)return t[n].t=1,t[n];const o=1-e;let i=t;if(n===0)return t[0].t=e,t[0];if(n===1)return{x:o*i[0].x+e*i[1].x,y:o*i[0].y+e*i[1].y,t:e};const r=o*o,s=e*e;let a=0,A=0,c=0,l=0;return n===2?(i=[i[0],i[1],i[2],{x:0,y:0}],a=r,A=o*e*2,c=s):n===3&&(a=r*o,A=r*e*3,c=o*s*3,l=e*s),{x:a*i[0].x+A*i[1].x+c*i[2].x+l*i[3].x,y:a*i[0].y+A*i[1].y+c*i[2].y+l*i[3].y,t:e}},_pt=(t,e)=>{const n=t(e),o=n.x*n.x+n.y*n.y;return Math.sqrt(o)},fpt=t=>jre(t,1),jre=(t,e)=>{const n=e/2,o=oz.length;let i=0;for(let r=0,s;r<o;r++)s=n*oz[r]+n,i+=r9e[r]*_pt(t,s);return n*i},$re=t=>{const e=[];for(let n=0,o=t.length,i=2;n<o;n+=i)e.push({x:t[n],y:t[n+1]});return e},IJn=(t,e)=>{const n=Jre($re(t));return jre(o=>Wre(n[0],o),e)},s9e=(t,e)=>{const n=Jre($re(t)),o=s=>Wre(n[0],s);let i=0,r=1;for(let s=0;s<25;s+=1){const a=(i+r)/2;jre(o,a)<e?i=a:r=a}return(i+r)/2},iz=t=>{const e=$re(t),n=Jre(e);return fpt(o=>Wre(n[0],o))},CJn=1e-8,qre=([t,e,n])=>{const o=Math.min(t,n),i=Math.max(t,n);if(e>=t?n>=e:n<=e)return[o,i];const r=(t*n-e*e)/(t-2*e+n);return r<o?[r,i]:[o,r]},a9e=([t,e,n,o])=>{const i=t-3*e+3*n-o;if(Math.abs(i)<1e-8)return t===o&&t===e?[t,o]:qre([t,-.5*t+1.5*e,t-3*e+3*n]);const r=-t*n+t*o-e*n-e*o+e*e+n*n;if(r<=0)return[Math.min(t,o),Math.max(t,o)];const s=Math.sqrt(r);let a=Math.min(t,o),A=Math.max(t,o);const c=t-2*e+n;for(let l=(c+s)/i,u=1;u<=2;l=(c-s)/i,u++)if(l>0&&l<1){const g=t*(1-l)*(1-l)*(1-l)+e*3*(1-l)*(1-l)*l+n*3*(1-l)*l*l+o*l*l*l;g<a&&(a=g),g>A&&(A=g)}return[a,A]},yJn={bezierLength:fpt,bezierLengthAtT:jre,calculateBezier:_pt,CBEZIER_MINMAX_EPSILON:CJn,computeBezier:Wre,Cvalues:r9e,deriveBezier:Jre,getBezierLength:iz,getBezierLengthAtT:IJn,getBezierPoints:$re,getTAtBezierLength:s9e,minmaxC:a9e,minmaxQ:qre,Tvalues:oz},Xre=(t,e,n)=>{const o=n<0?-1:1,i=Math.abs(n),r=Math.PI/2;let s=0,a=i,A=0;for(;a>0;){const c=Math.min(r,a),l=c/2;let u=0;for(let g=0,h=oz.length;g<h;g+=1){const d=A+l*oz[g]+l;u+=r9e[g]*Math.sqrt((t*Math.sin(d))**2+(e*Math.cos(d))**2)}s+=l*u,A+=c,a-=c}return o*s},Zre=(t,e,n,o)=>Xre(t,e,o)-Xre(t,e,n),xJn=(t,e,n)=>Math.abs(Xre(t,e,n)),ID=(t,e,n,o,i,r)=>{const{sin:s,cos:a}=Math,A=a(i),c=s(i),l=n*a(r),u=o*s(r);return[t+A*l-c*u,e+c*l+A*u]},A9e=(t,e)=>{const{x:n,y:o}=t,{x:i,y:r}=e,s=n*i+o*r,a=Math.sqrt((n**2+o**2)*(i**2+r**2));return(n*r-o*i<0?-1:1)*Math.acos(s/a)},ese=(t,e,n,o,i,r,s,a,A)=>{const{abs:c,sin:l,cos:u,sqrt:g,PI:h}=Math;let d=c(n),p=c(o);const m=(i%360+360)%360*(h/180);if(t===a&&e===A)return{rx:d,ry:p,startAngle:0,endAngle:0,center:{x:a,y:A}};if(d===0||p===0)return{rx:d,ry:p,startAngle:0,endAngle:0,center:{x:(a+t)/2,y:(A+e)/2}};const _=(t-a)/2,f=(e-A)/2,I={x:u(m)*_+l(m)*f,y:-l(m)*_+u(m)*f},C=I.x**2/d**2+I.y**2/p**2;C>1&&(d*=g(C),p*=g(C));let y=(d**2*p**2-d**2*I.y**2-p**2*I.x**2)/(d**2*I.y**2+p**2*I.x**2);y=y<0?0:y;const x=(r!==s?1:-1)*g(y),E={x:x*(d*I.y/p),y:x*(-(p*I.x)/d)},B={x:u(m)*E.x-l(m)*E.y+(t+a)/2,y:l(m)*E.x+u(m)*E.y+(e+A)/2},S={x:(I.x-E.x)/d,y:(I.y-E.y)/p},Q=A9e({x:1,y:0},S),w={x:(-I.x-E.x)/d,y:(-I.y-E.y)/p};let M=A9e(S,w);return!s&&M>0?M-=2*h:s&&M<0&&(M+=2*h),M%=2*h,{center:B,startAngle:Q,endAngle:Q+M,rx:d,ry:p}},c9e=(t,e,n,o,i,r,s,a,A)=>{const{rx:c,ry:l,startAngle:u,endAngle:g}=ese(t,e,n,o,i,r,s,a,A);return Math.abs(Zre(c,l,u,g))},Ipt=(t,e,n,o,i,r,s,a,A,c)=>{let l={x:t,y:e};const{center:u,rx:g,ry:h,startAngle:d,endAngle:p}=ese(t,e,n,o,i,r,s,a,A);if(typeof c=="number"){const m=p-d,_=Math.abs(Zre(g,h,d,p));if(c<=0)l={x:t,y:e};else if(c>=_)l={x:a,y:A};else{if(t===a&&e===A)return{x:a,y:A};if(g===0||h===0)return zre(t,e,a,A,c);const{PI:f,cos:I,sin:C}=Math,y=(i%360+360)%360*(f/180);let x=0,E=1;for(let w=0;w<25;w+=1){const M=(x+E)/2;Math.abs(Zre(g,h,d,d+m*M))<c?x=M:E=M}const B=d+m*((x+E)/2),S=g*I(B),Q=h*C(B);l={x:I(y)*S-C(y)*Q+u.x,y:C(y)*S+I(y)*Q+u.y}}}return l},Cpt=(t,e,n,o,i,r,s,a,A)=>{const{center:c,rx:l,ry:u,startAngle:g,endAngle:h}=ese(t,e,n,o,i,r,s,a,A),d=h-g,{min:p,max:m,tan:_,atan2:f,PI:I}=Math,{x:C,y}=c,x=i*I/180,E=_(x),B=f(-u*E,l),S=B,Q=B+I,w=f(u,l*E),M=w+I,k=[a],R=[A];let F=p(t,a),O=m(t,a),U=p(e,A),Y=m(e,A);const W=h-d*1e-5,te=ID(C,y,l,u,x,W),j=h-d*.99999,J=ID(C,y,l,u,x,j);if(te[0]>O||J[0]>O){const oe=ID(C,y,l,u,x,S);k.push(oe[0]),R.push(oe[1])}if(te[0]<F||J[0]<F){const oe=ID(C,y,l,u,x,Q);k.push(oe[0]),R.push(oe[1])}if(te[1]<U||J[1]<U){const oe=ID(C,y,l,u,x,M);k.push(oe[0]),R.push(oe[1])}if(te[1]>Y||J[1]>Y){const oe=ID(C,y,l,u,x,w);k.push(oe[0]),R.push(oe[1])}return F=p.apply([],k),U=p.apply([],R),O=m.apply([],k),Y=m.apply([],R),[F,U,O,Y]},EJn={angleBetween:A9e,arcLength:xJn,arcLengthAtAngle:Xre,arcLengthBetween:Zre,arcPoint:ID,getArcBBox:Cpt,getArcLength:c9e,getArcProps:ese,getPointAtArcLength:Ipt},ypt=([t,e,n,o,i,r,s,a],A)=>{const c=1-A;return{x:c**3*t+3*c**2*A*n+3*c*A**2*i+A**3*s,y:c**3*e+3*c**2*A*o+3*c*A**2*r+A**3*a}},CD=(t,e,n,o,i,r,s,a)=>iz([t,e,n,o,i,r,s,a]),tse=(t,e,n,o,i,r,s,a,A)=>{const c=typeof A=="number";let l={x:t,y:e};if(c){const u=[t,e,n,o,i,r,s,a],g=iz(u);if(!(A<=0))if(A>=g)l={x:s,y:a};else{const h=s9e(u,A);l=ypt(u,h)}}return l},rz=(t,e,n,o,i,r,s,a)=>{const A=a9e([t,n,i,s]),c=a9e([e,o,r,a]);return[A[0],c[0],A[1],c[1]]},BJn={getCubicBBox:rz,getCubicLength:CD,getPointAtCubicLength:tse,getPointAtCubicSegmentLength:ypt},xpt=([t,e,n,o,i,r],s)=>{const a=1-s;return{x:a**2*t+2*a*s*n+s**2*i,y:a**2*e+2*a*s*o+s**2*r}},nse=(t,e,n,o,i,r)=>iz([t,e,n,o,i,r]),Ept=(t,e,n,o,i,r,s)=>{const a=typeof s=="number";let A={x:t,y:e};if(a){const c=[t,e,n,o,i,r],l=iz(c);if(!(s<=0))if(s>=l)A={x:i,y:r};else{const u=s9e(c,s);A=xpt(c,u)}}return A},l9e=(t,e,n,o,i,r)=>{const s=qre([t,n,i]),a=qre([e,o,r]);return[s[0],a[0],s[1],a[1]]},bJn={getPointAtQuadLength:Ept,getPointAtQuadSegmentLength:xpt,getQuadBBox:l9e,getQuadLength:nse},MF=t=>{const e=t.length;let n=-1,o,i=t[e-1],r=0;for(;++n<e;)o=i,i=t[n],r+=o[1]*i[0]-o[0]*i[1];return r/2},SJn={polygonArea:MF,polygonLength:t=>t.reduce((e,n,o)=>o?e+Vre(t[o-1],n):0,0),polygonCentroid:t=>{if(t.length===0)return[0,0];let e=0,n=0;for(const[i,r]of t)e+=i,n+=r;const o=t.length;return[e/o,n/o]}},sz=(t,e,n)=>{const{sin:o,cos:i}=Math;return{x:t*i(n)-e*o(n),y:t*o(n)+e*i(n)}},Qu=(t,e)=>{const n=e>=1?10**e:1;return e>0?Math.round(t*n)/n:Math.round(t)},FQ={origin:[0,0,0],round:4},DF={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},u9e=t=>{let e=t.pathValue[t.segmentStart],n=e.toLowerCase();const{data:o}=t;let i=0;for(;o.length-i>=DF[n];){if(n==="m"&&o.length-i>2){const r=new Array(3);r[0]=e,r[1]=o[i],r[2]=o[i+1],t.segments.push(r),i+=2,n="l",e=e==="m"?"l":"L"}else{const r=DF[n],s=new Array(r+1);s[0]=e;for(let a=0;a<r;a+=1)s[a+1]=o[i+a];t.segments.push(s),i+=r}if(!DF[n])break}},K_="SVGPathCommanderError",Bpt=t=>{const{index:e,pathValue:n}=t,o=n.charCodeAt(e);if(o===48){t.param=0,t.index+=1;return}if(o===49){t.param=1,t.index+=1;return}t.err=`${K_}: invalid Arc flag "${n[e]}", expecting 0 or 1 at index ${e}`},LQ=t=>t>=48&&t<=57,HQ="Invalid path value",bpt=t=>{const{max:e,pathValue:n,index:o}=t;let i=o,r=!1,s=!1,a=!1,A=!1,c;if(i>=e){t.err=`${K_}: ${HQ} at index ${i}, "pathValue" is missing param`;return}if(c=n.charCodeAt(i),(c===43||c===45)&&(i+=1,c=n.charCodeAt(i)),!LQ(c)&&c!==46){t.err=`${K_}: ${HQ} at index ${i}, "${n[i]}" is not a number`;return}if(c!==46){if(r=c===48,i+=1,c=n.charCodeAt(i),r&&i<e&&c&&LQ(c)){t.err=`${K_}: ${HQ} at index ${o}, "${n[o]}" illegal number`;return}for(;i<e&&LQ(n.charCodeAt(i));)i+=1,s=!0;c=n.charCodeAt(i)}if(c===46){for(A=!0,i+=1;LQ(n.charCodeAt(i));)i+=1,a=!0;c=n.charCodeAt(i)}if(c===101||c===69){if(A&&!s&&!a){t.err=`${K_}: ${HQ} at index ${i}, "${n[i]}" invalid float exponent`;return}if(i+=1,c=n.charCodeAt(i),(c===43||c===45)&&(i+=1),i<e&&LQ(n.charCodeAt(i)))for(;i<e&&LQ(n.charCodeAt(i));)i+=1;else{t.err=`${K_}: ${HQ} at index ${i}, "${n[i]}" invalid integer exponent`;return}}t.index=i,t.param=QJn(n,o,i)},QJn=(t,e,n)=>{let o=e,i=1,r=0,s=0,a=0,A=!1,c=1,l=0;const u=t.charCodeAt(o);for(u===43?o+=1:u===45&&(i=-1,o+=1);o<n;o+=1){const h=t.charCodeAt(o);if(h===46)A=!0;else if(h===101||h===69){o+=1;const d=t.charCodeAt(o);for(d===43?o+=1:d===45&&(c=-1,o+=1);o<n;o+=1)l=l*10+(t.charCodeAt(o)-48)}else{const d=h-48;(d!==0||r!==0)&&(a+=1),r=r*10+d,A&&(s+=1)}}if(a>15||a===0)return+t.slice(e,n);const g=c*l-s;return g>22||g<-22?+t.slice(e,n):g>=0?i*r*10**g:i*r/10**-g},Spt=t=>[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279,10,13,8232,8233,32,9,11,12,160].includes(t),NF=t=>{const{pathValue:e,max:n}=t;for(;t.index<n&&Spt(e.charCodeAt(t.index));)t.index+=1},Qpt=t=>{switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}},vpt=t=>LQ(t)||t===43||t===45||t===46,wpt=t=>(t|32)===97,Ppt=t=>{switch(t|32){case 109:case 77:return!0;default:return!1}},g9e=t=>{const{max:e,pathValue:n,index:o,segments:i}=t,r=n.charCodeAt(o),s=DF[n[o].toLowerCase()];if(t.segmentStart=o,!Qpt(r)){t.err=`${K_}: ${HQ} "${n[o]}" is not a path command at index ${o}`;return}const a=i[i.length-1];if(!Ppt(r)&&a?.[0]?.toLocaleLowerCase()==="z"){t.err=`${K_}: ${HQ} "${n[o]}" is not a MoveTo path command at index ${o}`;return}if(t.index+=1,NF(t),t.data=[],!s){u9e(t);return}for(;;){for(let A=s;A>0;A-=1){if(wpt(r)&&(A===3||A===4)?Bpt(t):bpt(t),t.err.length)return;t.data.push(t.param),NF(t),t.index<e&&n.charCodeAt(t.index)===44&&(t.index+=1,NF(t))}if(t.index>=t.max||!vpt(n.charCodeAt(t.index)))break}u9e(t)};var d9e=class{constructor(t){this.segments=[],this.pathValue=t,this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}};const lx=t=>{if(typeof t!="string")return t.slice(0);const e=new d9e(t);for(NF(e);e.index<e.max&&!e.err.length;)g9e(e);if(!e.err.length)e.segments.length&&(e.segments[0][0]="M");else throw TypeError(e.err);return e.segments},az=(t,e,n,o)=>{const[i]=t,r=i.toUpperCase();if(e===0||r===i)return t;if(r==="A")return[r,t[1],t[2],t[3],t[4],t[5],t[6]+n,t[7]+o];if(r==="V")return[r,t[1]+o];if(r==="H")return[r,t[1]+n];if(r==="L")return[r,t[1]+n,t[2]+o];if(r==="C")return[r,t[1]+n,t[2]+o,t[3]+n,t[4]+o,t[5]+n,t[6]+o];{const s=[],a=t.length;for(let A=1;A<a;A+=1)s.push(t[A]+(A%2?n:o));return[r].concat(s)}},Qy=(t,e)=>{let n=0,o=0,i=0,r=0,s=0;for(;s<t.length;){const a=t[s],[A]=a,c=A.charCodeAt(0),l=c>=97,u=l?String.fromCharCode(c-32):A,g=e(a,s,n,o);if(g===!1)break;if(u==="Z")n=i,o=r;else if(u==="H")n=a[1]+(l?n:0);else if(u==="V")o=a[1]+(l?o:0);else{const h=a.length;n=a[h-2]+(l?n:0),o=a[h-1]+(l?o:0),u==="M"&&(i=n,r=o)}g&&(t[s]=g),s+=1}return t},ose=t=>{const e=lx(t);return Qy(e,az)},h9e=(t,e,n,o)=>{const[i]=t,r=i.toLowerCase();if(e===0||i===r)return t;if(r==="a")return[r,t[1],t[2],t[3],t[4],t[5],t[6]-n,t[7]-o];if(r==="v")return[r,t[1]-o];if(r==="h")return[r,t[1]-n];if(r==="l")return[r,t[1]-n,t[2]-o];{const s=[],a=t.length;for(let A=1;A<a;A+=1)s.push(t[A]-(A%2?n:o));return[r].concat(s)}},Mpt=t=>{const e=lx(t);return Qy(e,h9e)},Az=(t,e,n,o,i,r,s,a,A,c)=>{let l=t,u=e,g=n,h=o,d=a,p=A;const m=Math.PI*120/180,_=Math.PI/180*(+i||0);let f=[],I,C,y,x,E;if(c)[C,y,x,E]=c;else{I=sz(l,u,-_),l=I.x,u=I.y,I=sz(d,p,-_),d=I.x,p=I.y;const j=(l-d)/2,J=(u-p)/2;let oe=j*j/(g*g)+J*J/(h*h);oe>1&&(oe=Math.sqrt(oe),g*=oe,h*=oe);const ie=g*g,ne=h*h,le=(r===s?-1:1)*Math.sqrt(Math.abs((ie*ne-ie*J*J-ne*j*j)/(ie*J*J+ne*j*j)));x=le*g*J/h+(l+d)/2,E=le*-h*j/g+(u+p)/2,C=Math.asin(((u-E)/h*10**9>>0)/10**9),y=Math.asin(((p-E)/h*10**9>>0)/10**9),C=l<x?Math.PI-C:C,y=d<x?Math.PI-y:y,C<0&&(C=Math.PI*2+C),y<0&&(y=Math.PI*2+y),s&&C>y&&(C-=Math.PI*2),!s&&y>C&&(y-=Math.PI*2)}let B=y-C;if(Math.abs(B)>m){const j=y,J=d,oe=p;y=C+m*(s&&y>C?1:-1),d=x+g*Math.cos(y),p=E+h*Math.sin(y),f=Az(d,p,g,h,i,0,s,J,oe,[y,j,x,E])}B=y-C;const S=Math.cos(C),Q=Math.sin(C),w=Math.cos(y),M=Math.sin(y),k=Math.tan(B/4),R=4/3*g*k,F=4/3*h*k,O=[l,u],U=[l+R*Q,u-F*S],Y=[d+R*M,p-F*w],W=[d,p];if(U[0]=2*O[0]-U[0],U[1]=2*O[1]-U[1],c)return[U[0],U[1],Y[0],Y[1],W[0],W[1]].concat(f);f=[U[0],U[1],Y[0],Y[1],W[0],W[1]].concat(f);const te=[];for(let j=0,J=f.length;j<J;j+=1)te[j]=j%2?sz(f[j-1],f[j],_).y:sz(f[j],f[j+1],_).x;return te},Dpt=(t,e,n,o,i,r)=>{const s=.3333333333333333,a=2/3;return[s*t+a*n,s*e+a*o,s*i+a*n,s*r+a*o,i,r]},p9e=(t,e,n,o)=>{const i=j9([t,e],[n,o],.3333333333333333),r=j9([t,e],[n,o],2/3);return[i[0],i[1],r[0],r[1],n,o]},Npt=(t,e)=>{const n=t[0],o=t.slice(1).map(Number),[i,r]=o,{x1:s,y1:a}=e;return"TQ".includes(n)||(e.qx=null,e.qy=null),n==="M"?(e.mx=i,e.my=r,e.x=i,e.y=r,t):n==="A"?["C"].concat(Az(s,a,o[0],o[1],o[2],o[3],o[4],o[5],o[6])):n==="Q"?(e.qx=i,e.qy=r,["C"].concat(Dpt(s,a,o[0],o[1],o[2],o[3]))):n==="L"?["C"].concat(p9e(s,a,i,r)):n==="Z"?["C"].concat(p9e(s,a,e.mx,e.my)):t},ise=(t,e)=>{const[n]=t,o=n.toUpperCase(),i=n!==o,{x1:r,y1:s,x2:a,y2:A,x:c,y:l}=e,u=t.slice(1);let g=u.map((h,d)=>h+(i?d%2?l:c:0));if("TQ".includes(o)||(e.qx=null,e.qy=null),o==="A")return g=u.slice(0,-2).concat(u[5]+(i?c:0),u[6]+(i?l:0)),["A"].concat(g);if(o==="H")return["L",t[1]+(i?c:0),s];if(o==="V")return["L",r,t[1]+(i?l:0)];if(o==="L")return["L",t[1]+(i?c:0),t[2]+(i?l:0)];if(o==="M")return["M",t[1]+(i?c:0),t[2]+(i?l:0)];if(o==="C")return["C"].concat(g);if(o==="S"){const h=r*2-a,d=s*2-A;return e.x1=h,e.y1=d,["C",h,d].concat(g)}else if(o==="T"){const h=e.qx!=null?r*2-e.qx:r,d=e.qy!=null?s*2-e.qy:s;return e.qx=h,e.qy=d,["Q",h,d].concat(g)}else if(o==="Q"){const[h,d]=g;return e.qx=h,e.qy=d,["Q"].concat(g)}else if(o==="Z")return["Z"];return t},rse={mx:0,my:0,x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},OQ=t=>{const e={...rse},n=lx(t);return Qy(n,(o,i,r,s)=>{e.x=r,e.y=s;const a=ise(o,e);a[0]==="M"&&(e.mx=a[1],e.my=a[2]);let A=Npt(a,e);A[0]==="C"&&A.length>7&&(n.splice(i+1,0,["C"].concat(A.slice(7))),A=A.slice(0,7));const c=A.length;return e.x1=+A[c-2],e.y1=+A[c-1],e.x2=+A[c-4]||e.x1,e.y2=+A[c-3]||e.y1,A})},m9e=(t,e)=>{const n=t.length;let{round:o}=FQ,i=t[0],r="";o=e==="off"||typeof e=="number"&&e>=0?e:typeof o=="number"&&o>=0?o:"off";const s=o==="off"?0:10**o;for(let a=0;a<n;a+=1){i=t[a];const A=i[0],c=i.length;if(r+=A,o==="off")for(let l=1;l<c;l+=1)r+=i[l],l!==c-1&&(r+=" ");else for(let l=1;l<c;l+=1)r+=Math.round(i[l]*s)/s,l!==c-1&&(r+=" ")}return r},_9e=t=>{if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};const e=lx(t);let n="M",o=0,i=0;const{max:r,min:s}=Math;let a=1/0,A=1/0,c=-1/0,l=-1/0,u=0,g=0,h=0,d=0,p=0,m=0,_=0,f=0,I=null,C=null;Qy(e,(E,B,S,Q)=>{[n]=E;const w=n.charCodeAt(0),M=w>=97,k=M?String.fromCharCode(w-32):n,R=M?az(E,B,S,Q):E,F=k==="V"?["L",S,R[1]]:k==="H"?["L",R[1],Q]:R;if([n]=F,k!=="T"&&k!=="Q"&&(I=null,C=null),n==="M")[,o,i]=F,u=o,g=i,h=o,d=i;else if(n==="L")[u,g,h,d]=i9e(S,Q,F[1],F[2]);else if(n==="A")[u,g,h,d]=Cpt(S,Q,F[1],F[2],F[3],F[4],F[5],F[6],F[7]);else if(n==="S"){const O=p*2-_,U=m*2-f;[u,g,h,d]=rz(S,Q,O,U,F[1],F[2],F[3],F[4])}else n==="C"?[u,g,h,d]=rz(S,Q,F[1],F[2],F[3],F[4],F[5],F[6]):n==="T"?(I=I===null?S:p*2-I,C=C===null?Q:m*2-C,[u,g,h,d]=l9e(S,Q,I,C,F[1],F[2])):n==="Q"?(I=F[1],C=F[2],[u,g,h,d]=l9e(S,Q,F[1],F[2],F[3],F[4])):n==="Z"&&([u,g,h,d]=i9e(S,Q,o,i));if(a=s(u,a),A=s(g,A),c=r(h,c),l=r(d,l),n==="Z")p=o,m=i;else{const O=F.length;p=F[O-2],m=F[O-1]}n==="C"?(_=F[3],f=F[4]):n==="S"?(_=F[1],f=F[2]):(_=p,f=m)});const y=c-a,x=l-A;return{width:y,height:x,x:a,y:A,x2:c,y2:l,cx:a+y/2,cy:A+x/2,cz:Math.max(y,x)+Math.min(y,x)/2}},L8=t=>{const e=lx(t);let n=0,o=0,i=0,r=0,s=null,a=null,A="M",c=0,l=0,u=0;return Qy(e,(g,h,d,p)=>{[A]=g;const m=A.toUpperCase(),_=m!==A?az(g,h,d,p):g.slice(0),f=m==="V"?["L",d,_[1]]:m==="H"?["L",_[1],p]:_;if([A]=f,"TQ".includes(m)||(s=null,a=null),A==="M")[,c,l]=f;else if(A==="L")u+=PF(d,p,f[1],f[2]);else if(A==="A")u+=c9e(d,p,f[1],f[2],f[3],f[4],f[5],f[6],f[7]);else if(A==="S"){const I=n*2-i,C=o*2-r;u+=CD(d,p,I,C,f[1],f[2],f[3],f[4])}else A==="C"?u+=CD(d,p,f[1],f[2],f[3],f[4],f[5],f[6]):A==="T"?(s=s===null?d:n*2-s,a=a===null?p:o*2-a,u+=nse(d,p,s,a,f[1],f[2])):A==="Q"?(s=f[1],a=f[2],u+=nse(d,p,f[1],f[2],f[3],f[4])):A==="Z"&&(u+=PF(d,p,c,l));[n,o]=A==="Z"?[c,l]:f.slice(-2),[i,r]=A==="C"?[f[3],f[4]]:A==="S"?[f[1],f[2]]:[n,o]}),u},f9e=1e-5,j4=t=>{const e=lx(t),n={...rse};return Qy(e,(o,i,r,s)=>{n.x=r,n.y=s;const a=ise(o,n),A=a.length;return n.x1=+a[A-2],n.y1=+a[A-1],n.x2=+a[A-4]||n.x1,n.y2=+a[A-3]||n.y1,a})},cz=(t,e)=>{const n=j4(t);let o=!1,i=[],[r,s]=n[0].slice(1);const a=typeof e=="number";let A={x:r,y:s},c=0,l=A,u=0;return!a||e<1e-5?A:(Qy(n,(g,h,d,p)=>{const m=g[0];if(o=m==="M",i=o?i:[d,p].concat(g.slice(1)),o?([,r,s]=g,A={x:r,y:s},c=0):m==="L"?(A=zre(i[0],i[1],i[2],i[3],e-u),c=PF(i[0],i[1],i[2],i[3])):m==="A"?(A=Ipt(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],e-u),c=c9e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8])):m==="C"?(A=tse(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],e-u),c=CD(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7])):m==="Q"?(A=Ept(i[0],i[1],i[2],i[3],i[4],i[5],e-u),c=nse(i[0],i[1],i[2],i[3],i[4],i[5])):m==="Z"&&(i=[d,p,r,s],A=zre(i[0],i[1],i[2],i[3],e-u),c=PF(i[0],i[1],i[2],i[3])),u<e)l=A;else return!1;u+=c}),l)},I9e=(t,e)=>{const n=lx(t);let o=n.slice(0),i=L8(o),r=o.length-1,s=0,a=0,A=n[0];if(r<=0||!e||!Number.isFinite(e))return{segment:A,index:0,length:a,lengthAtSegment:s};if(e>=i)return o=n.slice(0,-1),s=L8(o),a=i-s,A=n[r],{segment:A,index:r,length:a,lengthAtSegment:s};const c=[];for(;r>0;)A=o[r],o=o.slice(0,-1),s=L8(o),a=i-s,i=s,c.push({segment:A,index:r,length:a,lengthAtSegment:s}),r-=1;return c.find(({lengthAtSegment:l})=>l<=e)},sse=(t,e)=>{const n=lx(t),o=j4(n),i=L8(o),r=I=>{const C=I.x-e.x,y=I.y-e.y;return C*C+y*y};let s=8,a,A={x:0,y:0},c=0,l=0,u=1/0;for(let I=0;I<=i;I+=s)a=cz(o,I),c=r(a),c<u&&(A=a,l=I,u=c);s/=2;let g,h,d=0,p=0,m=0,_=0;for(;s>1e-6&&(d=l-s,g=cz(o,d),m=r(g),p=l+s,h=cz(o,p),_=r(h),d>=0&&m<u?(A=g,l=d,u=m):p<=i&&_<u?(A=h,l=p,u=_):s/=2,!(s<1e-5)););const f=I9e(n,l);return{closest:A,distance:Math.sqrt(u),segment:f}},vJn=(t,e)=>sse(t,e).closest,wJn=(t,e,n,o,i,r,s,a)=>3*((a-e)*(n+i)-(s-t)*(o+r)+o*(t-i)-n*(e-r)+a*(i+t/3)-s*(r+e/3))/20,Rpt=t=>{let e=0,n=0,o=0;return OQ(t).map(i=>i[0]==="M"?([,e,n]=i,0):(o=wJn(e,n,i[1],i[2],i[3],i[4],i[5],i[6]),[e,n]=i.slice(-2),o)).reduce((i,r)=>i+r,0)},PJn=t=>Rpt(OQ(t))>=0,MJn=(t,e)=>I9e(t,e).segment,DJn=(t,e)=>sse(t,e).segment,lz=t=>Array.isArray(t)&&t.every(e=>{const n=e[0].toLowerCase();return DF[n]===e.length-1&&"achlmqstvz".includes(n)&&e.slice(1).every(Number.isFinite)})&&t.length>0,Tpt=t=>lz(t)&&t.every(([e])=>e===e.toUpperCase()),ase=t=>Tpt(t)&&t.every(([e])=>"ACLMQZ".includes(e)),uz=t=>ase(t)&&t.every(([e])=>"MLVHZ".includes(e)),NJn=t=>ase(t)&&t.every(([e])=>"MC".includes(e)),RJn=(t,e)=>{const{distance:n}=sse(t,e);return Math.abs(n)<f9e},TJn=t=>lz(t)&&t.slice(1).every(([e])=>e===e.toLowerCase()),kpt=t=>{if(typeof t!="string"||!t.length)return!1;const e=new d9e(t);for(NF(e);e.index<e.max&&!e.err.length;)g9e(e);return!e.err.length&&"mM".includes(e.segments[0][0])};function RF(t){const e=[];let[n,o]=[0,0];return Qy(t,i=>{const r=i[0];if(r==="M")[n,o]=[i[1],i[2]],e.push([n,o]);else if(r==="L")e.push([i[1],i[2]]);else if(r==="C")e.push([i[5],i[6]]);else if(r==="A")e.push([i[6],i[7]]);else if(r==="Z")e.push([n,o]);else throw new TypeError(`${K_}: path command "${r}" is not supported`)}),e}const gz={line:["x1","y1","x2","y2"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],rect:["width","height","x","y","rx","ry"],polygon:["points"],polyline:["points"],glyph:["d"]},Fpt=t=>t!=null&&typeof t=="object"&&t.nodeType===1,kJn=t=>{let{x1:e,y1:n,x2:o,y2:i}=t;return[e,n,o,i]=[e,n,o,i].map(r=>+r),[["M",e,n],["L",o,i]]},FJn=t=>{const e=[],n=(t.points||"").trim().split(/[\s|,]/).map(i=>+i);let o=0;for(;o<n.length;)e.push([o?"L":"M",n[o],n[o+1]]),o+=2;return t.type==="polygon"?[...e,["z"]]:e},LJn=t=>{let{cx:e,cy:n,r:o}=t;return[e,n,o]=[e,n,o].map(i=>+i),[["M",e-o,n],["a",o,o,0,1,0,2*o,0],["a",o,o,0,1,0,-2*o,0]]},HJn=t=>{let{cx:e,cy:n}=t,o=t.rx||0,i=t.ry||o;return[e,n,o,i]=[e,n,o,i].map(r=>+r),[["M",e-o,n],["a",o,i,0,1,0,2*o,0],["a",o,i,0,1,0,-2*o,0]]},OJn=t=>{const e=+t.x||0,n=+t.y||0,o=+t.width,i=+t.height;let r=+(t.rx||0),s=+(t.ry||r);return r||s?(r*2>o&&(r-=(r*2-o)/2),s*2>i&&(s-=(s*2-i)/2),[["M",e+r,n],["h",o-r*2],["s",r,0,r,s],["v",i-s*2],["s",0,s,-r,s],["h",-o+r*2],["s",-r,0,-r,-s],["v",-i+s*2],["s",0,-s,r,-s]]):[["M",e,n],["h",o],["v",i],["H",e],["Z"]]},Lpt=t=>{const e=Object.keys(gz),n=Fpt(t),o=n?t.tagName:null;if(o&&[...e,"path"].every(A=>o!==A))throw TypeError(`${K_}: "${o}" is not SVGElement`);const i=n?o:t.type,r=gz[i],s={type:i};n?r.forEach(A=>{s[A]=t.getAttribute(A)}):Object.assign(s,t);let a=[];return i==="circle"?a=LJn(s):i==="ellipse"?a=HJn(s):["polyline","polygon"].includes(i)?a=FJn(s):i==="rect"?a=OJn(s):i==="line"?a=kJn(s):["glyph","path"].includes(i)&&(a=lx(n?t.getAttribute("d")||"":t.d||"")),lz(a)&&a.length?a:!1},GJn=(t,e,n)=>{const o=n||document,i=Object.keys(gz),r=Fpt(t),s=r?t.tagName:null;if(s==="path")throw TypeError(`${K_}: "${s}" is already SVGPathElement`);if(s&&i.every(d=>s!==d))throw TypeError(`${K_}: "${s}" is not SVGElement`);const a=o.createElementNS("http://www.w3.org/2000/svg","path"),A=r?s:t.type,c=gz[A],l={type:A},u=FQ.round,g=Lpt(t),h=g&&g.length?m9e(g,u):"";if(r){c.forEach(d=>{l[d]=t.getAttribute(d)});for(let d=0;d<t.attributes.length;d++){const p=t.attributes[d];p&&!c.includes(p.name)&&a.setAttribute(p.name,p.value)}}else Object.assign(l,t),Object.keys(l).forEach(d=>{!c.includes(d)&&d!=="type"&&a.setAttribute(d.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),l[d])});return kpt(h)?(a.setAttribute("d",h),e&&r&&(t.before(a,t),t.remove()),a):!1},C9e=t=>{if(typeof t=="string"){const e=t.match(/[Mm]/g);return e?e.length>1:!1}if(lz(t)){let e=0;for(const n of t)if(n[0].toUpperCase()==="M"&&(e++,e>1))return!0;return!1}throw new TypeError(K_+": expected string or PathArray")};function TF(t){return ase(t)&&t.every(([e])=>"MLVH".includes(e))}const y9e=t=>t[t.length-1][0].toUpperCase()==="Z",Hpt=(t,e,n,o)=>{const[i]=t,{round:r}=FQ,s=r,a=e.slice(1),{x1:A,y1:c,x2:l,y2:u,x:g,y:h}=n,[d,p]=a.slice(-2),m=t;if("TQ".includes(i)||(n.qx=null,n.qy=null),i==="L"){if(Qu(g,s)===Qu(d,s))return["V",p];if(Qu(h,s)===Qu(p,s))return["H",d]}else if(i==="C"){const[_,f]=a;if(n.x1=_,n.y1=f,"CS".includes(o)&&(Qu(_,s)===Qu(A*2-l,s)&&Qu(f,s)===Qu(c*2-u,s)||Qu(A,s)===Qu(l*2-g,s)&&Qu(c,s)===Qu(u*2-h,s)))return["S",a[2],a[3],a[4],a[5]]}else if(i==="Q"){const[_,f]=a;if(n.qx=_,n.qy=f,"QT".includes(o)&&Qu(_,s)===Qu(A*2-l,s)&&Qu(f,s)===Qu(c*2-u,s))return["T",a[2],a[3]]}return m},Ase=(t,e)=>{const n=t.slice(1).map(o=>Qu(o,e));return[t[0]].concat(n)},Opt=(t,e)=>{const n=ose(t),o=typeof e=="number"&&e>=0?e:2,i={...rse},r=[];let s="M",a="Z";return Qy(n,(A,c,l,u)=>{i.x=l,i.y=u;const g=ise(A,i);let h=A;if(s=A[0],r[c]=s,c){a=r[c-1];const p=Hpt(A,g,i,a),m=Ase(p,o),_=m.join(""),f=h9e(p,c,l,u),I=Ase(f,o),C=I.join("");h=_.length<C.length?m:I}const d=g.length;return i.x1=+g[d-2],i.y1=+g[d-1],i.x2=+g[d-4]||i.x1,i.y2=+g[d-3]||i.y1,h})},yD=t=>{const e=ose(t),n=j4(e),o=e.length,i=e[o-1][0]==="Z",r=Qy(e,(s,a)=>{const A=n[a],c=a&&e[a-1],l=c&&c[0],u=e[a+1],g=u&&u[0],h=s[0],[d,p]=n[a?a-1:o-1].slice(-2);let m=s;switch(h){case"M":m=i?["Z"]:[h,d,p];break;case"A":m=[h,s[1],s[2],s[3],s[4],s[5]===1?0:1,d,p];break;case"C":u&&g==="S"?m=["S",s[1],s[2],d,p]:m=[h,s[3],s[4],s[1],s[2],d,p];break;case"S":l&&"CS".includes(l)&&(!u||g!=="S")?m=["C",A[3],A[4],A[1],A[2],d,p]:m=[h,A[1],A[2],d,p];break;case"Q":u&&g==="T"?m=["T",d,p]:m=[h,s[1],s[2],d,p];break;case"T":l&&"QT".includes(l)&&(!u||g!=="T")?m=["Q",A[1],A[2],d,p]:m=[h,d,p];break;case"Z":m=["M",d,p];break;case"H":m=[h,d];break;case"V":m=[h,p];break;default:m=[h].concat(s.slice(1,-2),d,p)}return m});return i?r.reverse():[r[0]].concat(r.slice(1).reverse())},cse=t=>{const e=[],n=lx(t);let o=[],i=-1,r=0,s=0,a=0,A=0;return Qy(n,(c,l,u,g)=>{const h=c[0],d=h.toUpperCase(),p=h===h.toLowerCase(),m=c.slice(1);d==="M"?(i+=1,[r,s]=m,r+=p?u:0,s+=p?g:0,a=r,A=s,o=[p?[d,a,A]:c]):(d==="Z"?(r=a,s=A):d==="H"?([,r]=c,r+=p?u:0):d==="V"?([,s]=c,s+=p?g:0):([r,s]=c.slice(-2),r+=p?u:0,s+=p?g:0),o.push(c)),e[i]=o}),e},Gpt=t=>{let e=new Sy;const{origin:n}=t,[o,i]=n,{translate:r}=t,{rotate:s}=t,{skew:a}=t,{scale:A}=t;return Array.isArray(r)&&r.length>=2&&r.every(c=>!Number.isNaN(+c))&&r.some(c=>c!==0)?e=e.translate(...r):typeof r=="number"&&!Number.isNaN(r)&&(e=e.translate(r)),(s||a||A)&&(e=e.translate(o,i),Array.isArray(s)&&s.length>=2&&s.every(c=>!Number.isNaN(+c))&&s.some(c=>c!==0)?e=e.rotate(...s):typeof s=="number"&&!Number.isNaN(s)&&(e=e.rotate(s)),Array.isArray(a)&&a.length===2&&a.every(c=>!Number.isNaN(+c))&&a.some(c=>c!==0)?(e=a[0]?e.skewX(a[0]):e,e=a[1]?e.skewY(a[1]):e):typeof a=="number"&&!Number.isNaN(a)&&(e=e.skewX(a)),Array.isArray(A)&&A.length>=2&&A.every(c=>!Number.isNaN(+c))&&A.some(c=>c!==1)?e=e.scale(...A):typeof A=="number"&&!Number.isNaN(A)&&(e=e.scale(A)),e=e.translate(-o,-i)),e},YJn=(t,e)=>{if(t.is2D)return[t.a*e[0]+t.c*e[1]+t.e*e[3],t.b*e[0]+t.d*e[1]+t.f*e[3],0,1];let n=Sy.Translate(e[0],e[1],e[2]);return[,,,n.m44]=e,n=t.multiply(n),[n.m41,n.m42,n.m43,n.m44]},x9e=(t,e,n)=>{const[o,i,r]=n,[s,a,A]=YJn(t,[e[0],e[1],0,1]),c=s-o,l=a-i,u=A-r;return[c*(Math.abs(r)/Math.abs(u)||1)+o,l*(Math.abs(r)/Math.abs(u)||1)+i]},UJn=(t,e,n,o,i,r,s,a,A)=>{const c=[];let l=0,u=0,g=0,h=0,d=0,p=0,m=0,_=0;for(let f=0,I=t.length;f<I;f+=1){const C=t[f],y=C[0],x=y.charCodeAt(0),E=x>=97,B=E?String.fromCharCode(x-32):y,S=f===0&&E?y:B;if(B==="Z"){c.push(["Z"]),d=m,p=_;continue}if(B==="V"){const Q=C[1]+(E?p:0);g=e*d+o*Q+r-a+a,h=n*d+i*Q+s-A+A,l!==g&&u!==h?c.push(["L",g,h]):u===h?c.push(["H",g]):l===g?c.push(["V",h]):c.push(["L",d,Q]),p=Q,l=g,u=h;continue}if(B==="H"){const Q=C[1]+(E?d:0);g=e*Q+o*p+r-a+a,h=n*Q+i*p+s-A+A,l!==g&&u!==h?c.push(["L",g,h]):u===h?c.push(["H",g]):l===g?c.push(["V",h]):c.push(["L",Q,p]),d=Q,l=g,u=h;continue}if(B==="A"){const Q=C[6]+(E?d:0),w=C[7]+(E?p:0),M=Az(d,p,C[1],C[2],C[3],C[4],C[5],Q,w),k=M.length;let R=0;if(k>0)do{const F=["C"],O=R+6;for(let U=R;U<O;U+=2)g=e*M[U]+o*M[U+1]+r-a+a,h=n*M[U]+i*M[U+1]+s-A+A,F.push(g,h);c.push(F),R=O}while(R<k);else c.push(["C"]);k>0?(d=M[k-2],p=M[k-1]):(d=Q,p=w),l=g,u=h;continue}if(B==="L"){const Q=C[1]+(E?d:0),w=C[2]+(E?p:0);g=e*Q+o*w+r-a+a,h=n*Q+i*w+s-A+A,l!==g&&u!==h?c.push(["L",g,h]):u===h?c.push(["H",g]):l===g?c.push(["V",h]):c.push(["L",Q,w]),d=Q,p=w,l=g,u=h;continue}{const Q=[S],w=C.length;for(let M=1;M<w;M+=2){const k=C[M]+(E?d:0),R=C[M+1]+(E?p:0);g=e*k+o*R+r-a+a,h=n*k+i*R+s-A+A,Q.push(g,h)}c.push(Q),d=C[w-2]+(E?d:0),p=C[w-1]+(E?p:0),B==="M"&&(m=d,_=p),l=g,u=h}}return c},Ypt=(t,e)=>{const n=lx(t),o=e&&Object.keys(e);if(!e||o&&!o.length)return n.slice(0);e.origin||Object.assign(e,{origin:FQ.origin});const i=e.origin,r=Gpt(e);if(r.isIdentity)return n.slice(0);if(r.is2D)return UJn(n,r.a,r.b,r.c,r.d,r.e,r.f,i[0],i[1]);let s=0,a=0,A=0,c=0,l=0,u=0;return Qy(n,(g,h,d,p)=>{const[m]=g,_=m.toUpperCase(),f=_!==m?az(g,h,d,p):g.slice(0);let I=_==="A"?["C"].concat(Az(d,p,f[1],f[2],f[3],f[4],f[5],f[6],f[7])):_==="V"?["L",d,f[1]]:_==="H"?["L",f[1],p]:f;if(I[0]==="C"&&I.length>7){const C=I.slice(0,7);n.splice(h+1,0,["C"].concat(I.slice(7))),I=C}if(I[0]==="L")[A,c]=x9e(r,[I[1],I[2]],i),s!==A&&a!==c?I=["L",A,c]:a===c?I=["H",A]:s===A&&(I=["V",c]);else for(l=1,u=I.length;l<u;l+=2)[A,c]=x9e(r,[+I[l],+I[l+1]],i),I[l]=A,I[l+1]=c;return s=A,a=c,I})},KJn=t=>{const e=t.slice(1).map((n,o,i)=>o?i[o-1].slice(-2).concat(n.slice(1)):t[0].slice(1).concat(n.slice(1))).map(n=>n.map((o,i)=>n[n.length-i-2*(1-i%2)])).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map(n=>["C"].concat(n.slice(2))))},E9e=(t,e)=>{let{round:n}=FQ;return n=e==="off"||typeof e=="number"&&e>=0?e:typeof n=="number"&&n>=0?n:"off",n==="off"?t.slice(0):Qy(t,o=>Ase(o,n))},B9e=t=>{const e=lx(t);if(y9e(e)){const n=j4(e),o=e.length,i=o-2,[r,s]=n[0].slice(1),[a,A]=n[i].slice(-2);r===a&&s===A&&e.splice(o-1,1)}};function Upt(t,e,n,o,i,r,s,a,A){const[c,l]=j9([t,e],[n,o],A),[u,g]=j9([n,o],[i,r],A),[h,d]=j9([i,r],[s,a],A),[p,m]=j9([c,l],[u,g],A),[_,f]=j9([u,g],[h,d],A),[I,C]=j9([p,m],[_,f],A);return[[t,e,c,l,p,m,I,C],[I,C,_,f,h,d,s,a]]}const Kpt=t=>{const e=j4(t);if(!uz(e)&&!TF(e))throw TypeError(`${K_}: pathValue is not a polyline/polygon`);if(!y9e(e))return e;const n=[e[0]],[o,i]=e[0].slice(1);for(let r=1;r<e.length;r++){const s=e[r];s[0].toUpperCase()==="Z"?n.push(["L",o,i]):n.push(s)}return n};function VJn(t,e,n,o,i){if(i<=1)return[[t,e,n,o]];const r=[],s=n-t,a=o-e;let A=t,c=e,l=0;for(;l<i;){const u=1/(i-l),g=t+u*s,h=e+u*a;r.push([A,c,g,h]),A=g,c=h,l++}return r}function Vpt(t,e){if(e<=1)throw new TypeError(`${K_}: target must be >= 2`);const n=L8(t);if(n===0)return Array(t.length).fill(1);const o=n/e,i=TF(t),r=[1],s=[0];Qy(t,(c,l,u,g)=>{if(l>0){const[h,d]=c.slice(-2),p=i?PF(u,g,h,d):CD(u,g,c[1],c[2],c[3],c[4],c[5],c[6]);s.push(p),r.push(1)}});let a=1;for(let c=1;c<s.length;c++){const l=s[c],u=l>o?Math.round(l/o):1;r[c]=u,a+=u}let A=e-a;if(A!==0){const c=[];for(let u=1;u<s.length;u++)s[u]>0&&c.push([u,s[u]]);const l=c.length;if(A<0){c.sort((u,g)=>u[1]-g[1]);for(let u=0;u<l;u++){const g=c[u][0];if(r[g]>1&&c[u][1]>0&&(r[g]--,A++),A===0)break;u===l-1&&(u=0)}}else if(A>0){c.sort((u,g)=>g[1]-u[1]);for(let u=0;u<l;u++){const g=c[u][0];if(c[u][1]>0&&(r[g]++,A--),A===0)break;u===l-1&&(u=0)}}}return r}function zpt(t,e){if(t.length<2||e<=1)return t;const n=Vpt(t,e),o=[t[0]],i=t.length;let r=t[0][1],s=t[0][2];for(let a=1;a<i;a++){const[A,c]=t[a].slice(1),l=n[a];if(l>=1){const u=VJn(r,s,A,c,l);for(const g of u)o.push(["L",g[2],g[3]])}r=A,s=c}return o.length!==e&&console.warn(`${K_}: requested ${e} segments, got ${o.length}. Adjusted on last segment.`),o}function zJn(t,e,n,o,i,r,s,a,A){if(A<=1)return[[t,e,n,o,i,r,s,a]];const c=[];let l=t,u=e,g=n,h=o,d=i,p=r,m=s,_=a,f=0;for(;f<A;){const I=1/(A-f),[C,y]=Upt(l,u,g,h,d,p,m,_,I);c.push(C),[l,u,g,h,d,p,m,_]=y,f++}return c}function Jpt(t,e){if(t.length<2||e<=1)return t;const n=Vpt(t,e),o=[t[0]],i=t.length;let r=t[0][1],s=t[0][2];for(let a=1;a<i;a++){const A=t[a],[c,l]=A.slice(-2),u=n[a];if(u>=1){const g=zJn(r,s,A[1],A[2],A[3],A[4],A[5],A[6],u);for(const h of g)o.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}r=c,s=l}return o.length!==e&&console.warn(`${K_}: requested ${e} segments, got ${o.length}.`),o}function JJn(t){const e=t.length,n=e-1;let o;const i=[];for(let r=0;r<e;r++){o=[];for(let s=0;s<e;s++){let a=r+s,A;if(s===0||t[a]&&t[a][0]==="M"){A=t[a],o.push(["M",...A.slice(-2)]);continue}a>=e&&(a-=n),o.push(t[a])}i.push(o)}return i}function WJn(t,e,n){const o=n||JJn(t);if(t.length!==e.length)throw new TypeError(K_+": paths must have the same number of segments after equalization");let i=0,r=1/0;for(let s=0;s<o.length;s++){const a=o[s],A=a.length;let c=0;for(let l=0;l<A;l++){const u=a[l],g=e[l],h=u.slice(-2),d=g.slice(-2),p=h[0]-d[0],m=h[1]-d[1];c+=p*p+m*m}c<r&&(r=c,i=s)}return o[i]}const jJn={mode:"auto",sampleSize:10,roundValues:4,reverse:!0,close:!1,target:void 0},b9e=(t,e,n={})=>{const{close:o,mode:i,reverse:r,roundValues:s,target:a}=Object.assign(jJn,n);let A=j4(t),c=j4(e);B9e(A),B9e(c);let l=(uz(A)||TF(A))&&(uz(c)||TF(c));l&&i==="auto"?(A=Kpt(A),c=Kpt(c)):(l=!1,A=OQ(A),c=OQ(c));const u=MF(RF(A)),g=MF(RF(c));r!==!1&&Math.sign(u)!==Math.sign(g)&&(c=yD(c));const h=A.length,d=c.length,p=Math.max(h,d);let m=p;if(typeof a!="number"){const I=(L8(A)+L8(c))/2,C=I/Math.max(h,d),y=Math.max(p,Math.round(I/Math.max(C,1)));m=Math.min(y,Math.max(h,d)*3)}else a>=p?m=a:console.warn('equalizeSegments "target" option: '+a+", expected >= "+p);let _=A,f=c;return l?(_=zpt(A,m),f=zpt(c,m)):(_=Jpt(A,m),f=Jpt(c,m)),f=WJn(f,_),typeof s=="number"&&s!==4&&(_=E9e(_,s),f=E9e(f,s)),o&&(_.push(["Z"]),f.push(["Z"])),[_,f]},$4=(t,[e,n])=>{const[o,i,r,s]=t;return e>=o&&e<=r&&n>=i&&n<=s},S9e=(t,e)=>{const[n,o,i,r]=t,[s,a,A,c]=e;return $4(e,[n,o])||$4(e,[i,o])||$4(e,[n,r])||$4(e,[i,r])||$4(t,[s,a])||$4(t,[A,a])||$4(t,[s,c])||$4(t,[A,c])||(n<A&&n>s||s<i&&s>n)&&(o<c&&o>a||a<r&&a>o)},Wpt=([t,e])=>[["M",t,e],["L",t+.001,e],["L",t+.001,e+.001],["L",t,e+.001],["L",t,e],["Z"]];function $Jn(t,e){const n=t.bbox,o=[];for(let r=0;r<e.length;r++){const{bbox:s,size:a}=e[r],A=n.cx-s.cx,c=n.cy-s.cy,l=Math.sqrt(A*A+c*c),u=Math.abs(t.size-a)/Math.max(t.size,a,1e-6),g=$4([n.x,n.y,n.x2,n.y2],[s.cx,s.cy])||$4([s.x,s.y,s.x2,s.y2],[n.cx,n.cy]),h=S9e([n.x,n.y,n.x2,n.y2],[s.x,s.y,s.x2,s.y2]);o.push({index:r,hasOverlap:g,boxIntersect:h,sizeDifference:u,centeredDistance:l})}const i=o.filter(r=>r.hasOverlap&&r.boxIntersect);if(i.length>0){let r=i[0];for(let s=1;s<i.length;s++)i[s].centeredDistance<r.centeredDistance&&(r=i[s]);return e.splice(r.index,1)[0]}return null}function jpt(t,e){const n=[];for(t.sort((o,i)=>i.size-o.size),e.sort((o,i)=>i.size-o.size);t.length>0;){const o=t.shift(),i=$Jn(o,e);if(i)n.push([o.path,i.path]);else{const r=[o.bbox.cx,o.bbox.cy];n.push([o.path,Wpt(r)])}}for(;e.length>0;){const o=e.shift(),i=[o.bbox.cx,o.bbox.cy];n.push([Wpt(i),o.path])}return n}const $pt=t=>{const e=[],n=[];for(const o of t){const i=MF(RF(o)),r=_9e(o),s={isPoly:uz(o)||TF(o),size:r.width*r.height,path:o,signedArea:i,area:Math.abs(i),bbox:r};i>0?e.push(s):n.push(s)}return{outers:e,inners:n}},qJn={mode:"auto",roundValues:4,close:!1,sampleSize:10},XJn=(t,e,n={})=>{const o=Object.assign(qJn,n),i=j4(t),r=j4(e),s=C9e(i),a=C9e(r);if(!s&&!a)return b9e(i,r,o);const A=MF(RF(i)),c=MF(RF(r));let l=i,u=r;Math.sign(A)<0&&(l=yD(l)),Math.sign(c)<0&&(u=yD(u));const g=cse(l),h=cse(u),{outers:d,inners:p}=$pt(g),{outers:m,inners:_}=$pt(h),f=jpt(d,m),I=jpt(p,_),C=[];for(const[y,x]of[...f,...I]){const[E,B]=b9e(y,x,{...o,reverse:!1});C.push([E,B])}return[C.map(y=>y[0]).flat(),C.map(y=>y[1]).flat()]},ZJn=(t,e,n,o,i,r,s,a)=>{if(Math.max(t,n)<Math.min(i,s)||Math.min(t,n)>Math.max(i,s)||Math.max(e,o)<Math.min(r,a)||Math.min(e,o)>Math.max(r,a))return;const A=(t*o-e*n)*(i-s)-(t-n)*(i*a-r*s),c=(t*o-e*n)*(r-a)-(e-o)*(i*a-r*s),l=(t-n)*(r-a)-(e-o)*(i-s);if(!l)return;const u=A/l,g=c/l,h=Qu(u,2),d=Qu(g,2);if(!(h<Qu(Math.min(t,n),2)||h>Qu(Math.max(t,n),2)||h<Qu(Math.min(i,s),2)||h>Qu(Math.max(i,s),2)||d<Qu(Math.min(e,o),2)||d>Qu(Math.max(e,o),2)||d<Qu(Math.min(r,a),2)||d>Qu(Math.max(r,a),2)))return{x:u,y:g}},eWn=(t,e,n)=>{const o=rz(...t),i=rz(...e),{justCount:r,epsilon:s}=Object.assign({justCount:!0,epsilon:f9e},n);if(!S9e(o,i))return r?0:[];const a=CD(...t),A=CD(...e),c=Math.max(a/5>>0,1),l=Math.max(A/5>>0,1),u=[],g=[],h={};let d=r?0:[];for(let p=0;p<c+1;p++){const m=tse(...t,p/c*a);u.push({x:m.x,y:m.y,t:p/c})}for(let p=0;p<l+1;p++){const m=tse(...e,p/l*A);g.push({x:m.x,y:m.y,t:p/l})}for(let p=0;p<c;p++)for(let m=0;m<l;m++){const _=1+s,f=u[p],I=u[p+1],C=g[m],y=g[m+1],x=Math.abs(I.x-f.x)<.001?"y":"x",E=Math.abs(y.x-C.x)<.001?"y":"x",B=ZJn(f.x,f.y,I.x,I.y,C.x,C.y,y.x,y.y);if(B){if(h[B.x.toFixed(4)]==B.y.toFixed(4))continue;h[B.x.toFixed(4)]=B.y.toFixed(4);const S=f.t+Math.abs((B[x]-f[x])/(I[x]-f[x]))*(I.t-f.t),Q=C.t+Math.abs((B[E]-C[E])/(y[E]-C[E]))*(y.t-C.t);S>=0&&S<=_&&Q>=0&&Q<=_&&(r?d++:d.push({x:B.x,y:B.y,t1:Math.min(S,1),t2:Math.min(Q,1)}))}}return d},tWn=(t,e,n=!0)=>{const o=OQ(t),i=OQ(e);let r=0,s=0,a=0,A=0,c=0,l=0,u=0,g=0,h=[r,s,r,s,c,l,c,l],d=[a,A,a,A,u,g,u,g],p=0;const m=[],_=o.length,f=i.length;for(let I=0;I<_;I++){const C=o[I];if(C[0]=="M")r=C[1],s=C[2],c=r,l=s;else{C[0]=="C"?(h=[r,s,C[1],C[2],C[3],C[4],C[5],C[6]],r=h[6],s=h[7]):(h=[r,s,r,s,c,l,c,l],r=c,s=l);for(let y=0;y<f;y++){const x=i[y];x[0]=="M"?(a=x[1],A=x[2],u=a,g=A):x[0]=="C"&&(d=[a,A,x[1],x[2],x[3],x[4],x[5],x[6]],a=d[6],A=d[7]);const E=eWn(h,d,{justCount:n});n?p+=E:m.push(...E)}}}return n?p:m};var nWn=class{constructor(t,e){const n=e||{},o=typeof t>"u";if(o||!t.length)throw TypeError(`${K_}: "pathValue" is ${o?"undefined":"empty"}`);this.segments=lx(t);const{round:i,origin:r}=n;let s;Number.isInteger(i)||i==="off"?s=i:s=FQ.round;let a=FQ.origin;if(Array.isArray(r)&&r.length>=2){const[A,c,l]=r.map(Number);a=[Number.isNaN(A)?0:A,Number.isNaN(c)?0:c,Number.isNaN(l)?0:l]}return this.round=s,this.origin=a,this}get bbox(){return _9e(this.segments)}get length(){return L8(this.segments)}getBBox(){return this.bbox}getTotalLength(){return this.length}getPointAtLength(t){return cz(this.segments,t)}toAbsolute(){const{segments:t}=this;return this.segments=ose(t),this}toRelative(){const{segments:t}=this;return this.segments=Mpt(t),this}toCurve(){const{segments:t}=this;return this.segments=OQ(t),this}reverse(t){const{segments:e}=this,n=cse(e),o=n.length>1?n:!1,i=o?o.map((s,a)=>t?a?yD(s):s.slice(0):yD(s)):e.slice(0);let r=[];return o?r=i.flat(1):r=t?e:yD(e),this.segments=r.slice(0),this}normalize(){const{segments:t}=this;return this.segments=j4(t),this}optimize(){const{segments:t}=this,e=this.round==="off"?2:this.round;return this.segments=Opt(t,e),this}transform(t){if(!t||typeof t!="object"||typeof t=="object"&&!["translate","rotate","skew","scale"].some(a=>a in t))return this;const{segments:e,origin:[n,o,i]}=this,r={};for(const[a,A]of Object.entries(t))a==="skew"&&Array.isArray(A)||(a==="rotate"||a==="translate"||a==="origin"||a==="scale")&&Array.isArray(A)?r[a]=A.map(Number):a!=="origin"&&typeof Number(A)=="number"&&(r[a]=Number(A));const{origin:s}=r;if(Array.isArray(s)&&s.length>=2){const[a,A,c]=s.map(Number);r.origin=[Number.isNaN(a)?n:a,Number.isNaN(A)?o:A,c||i]}else r.origin=[n,o,i];return this.segments=Ypt(e,r),this}flipX(){const{cx:t,cy:e}=this.bbox;return this.transform({rotate:[0,180,0],origin:[t,e,0]}),this}flipY(){const{cx:t,cy:e}=this.bbox;return this.transform({rotate:[180,0,0],origin:[t,e,0]}),this}toString(){return m9e(this.segments,this.round)}dispose(){Object.keys(this).forEach(t=>delete this[t])}static options=FQ;static CSSMatrix=Sy;static arcTools=EJn;static bezierTools=yJn;static cubicTools=BJn;static lineTools=fJn;static polygonTools=SJn;static quadTools=bJn;static pathToAbsolute=ose;static pathToRelative=Mpt;static pathToCurve=OQ;static pathToString=m9e;static distanceSquareRoot=Vre;static midPoint=j9;static rotateVector=sz;static roundTo=Qu;static parsePathString=lx;static finalizeSegment=u9e;static invalidPathValue=HQ;static isArcCommand=wpt;static isDigit=LQ;static isDigitStart=vpt;static isMoveCommand=Ppt;static isPathCommand=Qpt;static isSpace=Spt;static paramsCount=DF;static paramsParser=rse;static PathParser=d9e;static scanFlag=Bpt;static scanParam=bpt;static scanSegment=g9e;static skipSpaces=NF;static distanceEpsilon=f9e;static fixPath=B9e;static getClosestPoint=vJn;static getDrawDirection=PJn;static getPathArea=Rpt;static getPathBBox=_9e;static getPointAtLength=cz;static getPropertiesAtLength=I9e;static getPropertiesAtPoint=sse;static getSegmentAtLength=MJn;static getSegmentOfPoint=DJn;static getTotalLength=L8;static isAbsoluteArray=Tpt;static isCurveArray=NJn;static isPolygonArray=uz;static isNormalizedArray=ase;static isPathArray=lz;static isPointInStroke=RJn;static isRelativeArray=TJn;static isValidPath=kpt;static samplePolygon=RF;static shapeParams=gz;static shapeToPath=GJn;static shapeToPathArray=Lpt;static absolutizeSegment=az;static arcToCubic=Az;static getSVGMatrix=Gpt;static iterate=Qy;static lineToCubic=p9e;static normalizePath=j4;static normalizeSegment=ise;static optimizePath=Opt;static projection2d=x9e;static quadToCubic=Dpt;static relativizeSegment=h9e;static reverseCurve=KJn;static reversePath=yD;static roundPath=E9e;static roundSegment=Ase;static segmentToCubic=Npt;static shortenSegment=Hpt;static splitPath=cse;static equalizePaths=XJn;static equalizeSegments=b9e;static splitCubicSegment=Upt;static transformPath=Ypt;static isPointInsideBBox=$4;static pathsIntersection=tWn;static boundingBoxIntersect=S9e;static isMultiPath=C9e;static isClosedPath=y9e;static isPolylineArray=TF;static version=_Jn},lse=nWn;function kF(){return new Q9e}class Q9e{index={};array=[];size(){return this.array.length}empty(){return this.array.length===0}itemAt(e){return this.array[e]}contains(e){return this.index[e.id()]!==void 0}find(e){const n=this.index[e.id()];return n===void 0?void 0:this.array[n]}setDefault(e,n){const o=this.index[e.id()];if(o===void 0){const i=new use(e,n());return this.index[e.id()]=this.array.length,this.array.push(i),i}else return this.array[o]}insert(e,n){const o=new use(e,n),i=this.index[e.id()];return i===void 0?(this.index[e.id()]=this.array.length,this.array.push(o)):this.array[i]=o,o}erase(e){const n=this.index[e.id()];if(n===void 0)return;this.index[e.id()]=void 0;const o=this.array[n],i=this.array.pop();return o!==i&&(this.array[n]=i,this.index[i.first.id()]=n),o}copy(){const e=new Q9e;for(let n=0;n<this.array.length;n++){const o=this.array[n].copy();e.array[n]=o,e.index[o.first.id()]=n}return e}}class use{first;second;constructor(e,n){this.first=e,this.second=n}copy(){return new use(this.first,this.second)}}class gse{constructor(e=""){this._name=e}id(){return this._id}name(){return this._name}setName(e){this._name=e}context(){return this._context}setContext(e){this._context=e}value(){return this._value}setValue(e){this._value=e}plus(e){return new Gh(this,e)}minus(e){return new Gh(this,typeof e=="number"?-e:[-1,e])}multiply(e){return new Gh([e,this])}divide(e){return new Gh([1/e,this])}toJSON(){return{name:this._name,value:this._value}}toString(){return this._context+"["+this._name+":"+this._value+"]"}_name;_value=0;_context=null;_id=oWn++}let oWn=0;class Gh{constructor(){let e=iWn(arguments);this._terms=e.terms,this._constant=e.constant}terms(){return this._terms}constant(){return this._constant}value(){let e=this._constant;for(let n=0,o=this._terms.size();n<o;n++){let i=this._terms.itemAt(n);e+=i.first.value()*i.second}return e}plus(e){return new Gh(this,e)}minus(e){return new Gh(this,typeof e=="number"?-e:[-1,e])}multiply(e){return new Gh([e,this])}divide(e){return new Gh([1/e,this])}isConstant(){return this._terms.size()==0}toString(){let e=this._terms.array.map(function(n){return n.second+"*"+n.first.toString()}).join(" + ");return!this.isConstant()&&this._constant!==0&&(e+=" + "),e+=this._constant,e}_terms;_constant}function iWn(t){let e=0,n=()=>0,o=kF();for(let i=0,r=t.length;i<r;++i){let s=t[i];if(typeof s=="number")e+=s;else if(s instanceof gse)o.setDefault(s,n).second+=1;else if(s instanceof Gh){e+=s.constant();let a=s.terms();for(let A=0,c=a.size();A<c;A++){let l=a.itemAt(A);o.setDefault(l.first,n).second+=l.second}}else if(s instanceof Array){if(s.length!==2)throw new Error("array must have length 2");let a=s[0],A=s[1];if(typeof a!="number")throw new Error("array item 0 must be a number");if(A instanceof gse)o.setDefault(A,n).second+=a;else if(A instanceof Gh){e+=A.constant()*a;let c=A.terms();for(let l=0,u=c.size();l<u;l++){let g=c.itemAt(l);o.setDefault(g.first,n).second+=g.second*a}}else throw new Error("array item 1 must be a variable or expression")}else throw new Error("invalid Expression argument: "+s)}return{terms:o,constant:e}}class wg{static create(e,n,o,i=1){let r=0;return r+=Math.max(0,Math.min(1e3,e*i))*1e6,r+=Math.max(0,Math.min(1e3,n*i))*1e3,r+=Math.max(0,Math.min(1e3,o*i)),r}static required=wg.create(1e3,1e3,1e3);static strong=wg.create(1,0,0);static medium=wg.create(0,1,0);static weak=wg.create(0,0,1);static clip(e){return Math.max(0,Math.min(wg.required,e))}}var V_;(function(t){t[t.Le=0]="Le",t[t.Ge=1]="Ge",t[t.Eq=2]="Eq"})(V_||(V_={}));class ux{constructor(e,n,o,i=wg.required){this._operator=n,this._strength=wg.clip(i),o===void 0&&e instanceof Gh?this._expression=e:this._expression=e.minus(o)}id(){return this._id}expression(){return this._expression}op(){return this._operator}strength(){return this._strength}toString(){return this._expression.toString()+" "+["<=",">=","="][this._operator]+" 0 ("+this._strength.toString()+")"}_expression;_operator;_strength;_id=rWn++}let rWn=0;class qpt{maxIterations=1e3;constructor(){}createConstraint(e,n,o,i=wg.required){let r=new ux(e,n,o,i);return this.addConstraint(r),r}addConstraint(e){if(this._cnMap.find(e)!==void 0)throw new Error("duplicate constraint");let o=this._createRow(e),i=o.row,r=o.tag,s=this._chooseSubject(i,r);if(s.type()===Rl.Invalid&&i.allDummies())if(dse(i.constant()))s=r.marker;else throw new Error("unsatisfiable constraint");if(s.type()===Rl.Invalid){if(!this._addWithArtificialVariable(i))throw new Error("unsatisfiable constraint")}else i.solveFor(s),this._substitute(s,i),this._rowMap.insert(s,i);this._cnMap.insert(e,r),this._optimize(this._objective)}removeConstraint(e){let n=this._cnMap.erase(e);if(n===void 0)throw new Error("unknown constraint");this._removeConstraintEffects(e,n.second);let o=n.second.marker,i=this._rowMap.erase(o);if(i===void 0){let r=this._getMarkerLeavingSymbol(o);if(r.type()===Rl.Invalid)throw new Error("failed to find leaving row");i=this._rowMap.erase(r),i.second.solveForEx(r,o),this._substitute(o,i.second)}this._optimize(this._objective)}hasConstraint(e){return this._cnMap.contains(e)}getConstraints(){return this._cnMap.array.map(({first:e})=>e)}addEditVariable(e,n){if(this._editMap.find(e)!==void 0)throw new Error("duplicate edit variable");if(n=wg.clip(n),n===wg.required)throw new Error("bad required strength");let i=new Gh(e),r=new ux(i,V_.Eq,void 0,n);this.addConstraint(r);let a={tag:this._cnMap.find(r).second,constraint:r,constant:0};this._editMap.insert(e,a)}removeEditVariable(e){let n=this._editMap.erase(e);if(n===void 0)throw new Error("unknown edit variable");this.removeConstraint(n.second.constraint)}hasEditVariable(e){return this._editMap.contains(e)}suggestValue(e,n){let o=this._editMap.find(e);if(o===void 0)throw new Error("unknown edit variable");let i=this._rowMap,r=o.second,s=n-r.constant;r.constant=n;let a=r.tag.marker,A=i.find(a);if(A!==void 0){A.second.add(-s)<0&&this._infeasibleRows.push(a),this._dualOptimize();return}let c=r.tag.other;if(A=i.find(c),A!==void 0){A.second.add(s)<0&&this._infeasibleRows.push(c),this._dualOptimize();return}for(let l=0,u=i.size();l<u;++l){let g=i.itemAt(l),h=g.second,d=h.coefficientFor(a);d!==0&&h.add(s*d)<0&&g.first.type()!==Rl.External&&this._infeasibleRows.push(g.first)}this._dualOptimize()}updateVariables(){let e=this._varMap,n=this._rowMap;for(let o=0,i=e.size();o<i;++o){let r=e.itemAt(o),s=n.find(r.second);s!==void 0?r.first.setValue(s.second.constant()):r.first.setValue(0)}}_getVarSymbol(e){let n=()=>this._makeSymbol(Rl.External);return this._varMap.setDefault(e,n).second}_createRow(e){let n=e.expression(),o=new hse(n.constant()),i=n.terms();for(let A=0,c=i.size();A<c;++A){let l=i.itemAt(A);if(!dse(l.second)){let u=this._getVarSymbol(l.first),g=this._rowMap.find(u);g!==void 0?o.insertRow(g.second,l.second):o.insertSymbol(u,l.second)}}let r=this._objective,s=e.strength(),a={marker:GQ,other:GQ};switch(e.op()){case V_.Le:case V_.Ge:{let A=e.op()===V_.Le?1:-1,c=this._makeSymbol(Rl.Slack);if(a.marker=c,o.insertSymbol(c,A),s<wg.required){let l=this._makeSymbol(Rl.Error);a.other=l,o.insertSymbol(l,-A),r.insertSymbol(l,s)}break}case V_.Eq:{if(s<wg.required){let A=this._makeSymbol(Rl.Error),c=this._makeSymbol(Rl.Error);a.marker=A,a.other=c,o.insertSymbol(A,-1),o.insertSymbol(c,1),r.insertSymbol(A,s),r.insertSymbol(c,s)}else{let A=this._makeSymbol(Rl.Dummy);a.marker=A,o.insertSymbol(A)}break}}return o.constant()<0&&o.reverseSign(),{row:o,tag:a}}_chooseSubject(e,n){let o=e.cells();for(let r=0,s=o.size();r<s;++r){let a=o.itemAt(r);if(a.first.type()===Rl.External)return a.first}let i=n.marker.type();return(i===Rl.Slack||i===Rl.Error)&&e.coefficientFor(n.marker)<0?n.marker:(i=n.other.type(),(i===Rl.Slack||i===Rl.Error)&&e.coefficientFor(n.other)<0?n.other:GQ)}_addWithArtificialVariable(e){let n=this._makeSymbol(Rl.Slack);this._rowMap.insert(n,e.copy()),this._artificial=e.copy(),this._optimize(this._artificial);let o=dse(this._artificial.constant());this._artificial=null;let i=this._rowMap.erase(n);if(i!==void 0){let s=i.second;if(s.isConstant())return o;let a=this._anyPivotableSymbol(s);if(a.type()===Rl.Invalid)return!1;s.solveForEx(n,a),this._substitute(a,s),this._rowMap.insert(a,s)}let r=this._rowMap;for(let s=0,a=r.size();s<a;++s)r.itemAt(s).second.removeSymbol(n);return this._objective.removeSymbol(n),o}_substitute(e,n){let o=this._rowMap;for(let i=0,r=o.size();i<r;++i){let s=o.itemAt(i);s.second.substitute(e,n),s.second.constant()<0&&s.first.type()!==Rl.External&&this._infeasibleRows.push(s.first)}this._objective.substitute(e,n),this._artificial&&this._artificial.substitute(e,n)}_optimize(e){let n=0;for(;n<this.maxIterations;){let o=this._getEnteringSymbol(e);if(o.type()===Rl.Invalid)return;let i=this._getLeavingSymbol(o);if(i.type()===Rl.Invalid)throw new Error("the objective is unbounded");let r=this._rowMap.erase(i).second;r.solveForEx(i,o),this._substitute(o,r),this._rowMap.insert(o,r),n++}throw new Error("solver iterations exceeded")}_dualOptimize(){let e=this._rowMap,n=this._infeasibleRows;for(;n.length!==0;){let o=n.pop(),i=e.find(o);if(i!==void 0&&i.second.constant()<0){let r=this._getDualEnteringSymbol(i.second);if(r.type()===Rl.Invalid)throw new Error("dual optimize failed");let s=i.second;e.erase(o),s.solveForEx(o,r),this._substitute(r,s),e.insert(r,s)}}}_getEnteringSymbol(e){let n=e.cells();for(let o=0,i=n.size();o<i;++o){let r=n.itemAt(o),s=r.first;if(r.second<0&&s.type()!==Rl.Dummy)return s}return GQ}_getDualEnteringSymbol(e){let n=Number.MAX_VALUE,o=GQ,i=e.cells();for(let r=0,s=i.size();r<s;++r){let a=i.itemAt(r),A=a.first,c=a.second;if(c>0&&A.type()!==Rl.Dummy){let u=this._objective.coefficientFor(A)/c;u<n&&(n=u,o=A)}}return o}_getLeavingSymbol(e){let n=Number.MAX_VALUE,o=GQ,i=this._rowMap;for(let r=0,s=i.size();r<s;++r){let a=i.itemAt(r),A=a.first;if(A.type()!==Rl.External){let c=a.second,l=c.coefficientFor(e);if(l<0){let u=-c.constant()/l;u<n&&(n=u,o=A)}}}return o}_getMarkerLeavingSymbol(e){let n=Number.MAX_VALUE,o=n,i=n,r=GQ,s=r,a=r,A=r,c=this._rowMap;for(let l=0,u=c.size();l<u;++l){let g=c.itemAt(l),h=g.second,d=h.coefficientFor(e);if(d===0)continue;let p=g.first;if(p.type()===Rl.External)A=p;else if(d<0){let m=-h.constant()/d;m<o&&(o=m,s=p)}else{let m=h.constant()/d;m<i&&(i=m,a=p)}}return s!==r?s:a!==r?a:A}_removeConstraintEffects(e,n){n.marker.type()===Rl.Error&&this._removeMarkerEffects(n.marker,e.strength()),n.other.type()===Rl.Error&&this._removeMarkerEffects(n.other,e.strength())}_removeMarkerEffects(e,n){let o=this._rowMap.find(e);o!==void 0?this._objective.insertRow(o.second,-n):this._objective.insertSymbol(e,-n)}_anyPivotableSymbol(e){let n=e.cells();for(let o=0,i=n.size();o<i;++o){let r=n.itemAt(o),s=r.first.type();if(s===Rl.Slack||s===Rl.Error)return r.first}return GQ}_makeSymbol(e){return new Xpt(e,this._idTick++)}_cnMap=sWn();_rowMap=aWn();_varMap=AWn();_editMap=cWn();_infeasibleRows=[];_objective=new hse;_artificial=null;_idTick=0}function dse(t){let e=1e-8;return t<0?-t<e:t<e}function sWn(){return kF()}function aWn(){return kF()}function AWn(){return kF()}function cWn(){return kF()}var Rl;(function(t){t[t.Invalid=0]="Invalid",t[t.External=1]="External",t[t.Slack=2]="Slack",t[t.Error=3]="Error",t[t.Dummy=4]="Dummy"})(Rl||(Rl={}));let Xpt=class{constructor(e,n){this._id=n,this._type=e}id(){return this._id}type(){return this._type}_id;_type},GQ=new Xpt(Rl.Invalid,-1);class hse{constructor(e=0){this._constant=e}cells(){return this._cellMap}constant(){return this._constant}isConstant(){return this._cellMap.empty()}allDummies(){let e=this._cellMap;for(let n=0,o=e.size();n<o;++n)if(e.itemAt(n).first.type()!==Rl.Dummy)return!1;return!0}copy(){let e=new hse(this._constant);return e._cellMap=this._cellMap.copy(),e}add(e){return this._constant+=e}insertSymbol(e,n=1){let o=this._cellMap.setDefault(e,()=>0);dse(o.second+=n)&&this._cellMap.erase(e)}insertRow(e,n=1){this._constant+=e._constant*n;let o=e._cellMap;for(let i=0,r=o.size();i<r;++i){let s=o.itemAt(i);this.insertSymbol(s.first,s.second*n)}}removeSymbol(e){this._cellMap.erase(e)}reverseSign(){this._constant=-this._constant;let e=this._cellMap;for(let n=0,o=e.size();n<o;++n){let i=e.itemAt(n);i.second=-i.second}}solveFor(e){let n=this._cellMap,i=-1/n.erase(e).second;this._constant*=i;for(let r=0,s=n.size();r<s;++r)n.itemAt(r).second*=i}solveForEx(e,n){this.insertSymbol(e,-1),this.solveFor(n)}coefficientFor(e){let n=this._cellMap.find(e);return n!==void 0?n.second:0}substitute(e,n){let o=this._cellMap.erase(e);o!==void 0&&this.insertRow(n,o.second)}_cellMap=kF();_constant}function Zpt(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}function dz(t,e){if(!e.subcircuit_id&&!e.source_group_id)return[...t];let n=e;if(e.subcircuit_id){const a=new Set([e.subcircuit_id]),A=new Map,c=new Map;for(const u of t)if(u.type==="source_group"){const g=u.source_group_id,h=u.subcircuit_id;h&&c.set(g,h);const d=u.parent_source_group_id;d&&(A.has(d)||A.set(d,[]),A.get(d).push(g))}let l;for(const[u,g]of c)if(g===e.subcircuit_id){l=u;break}if(l){const u=g=>{const h=A.get(g)||[];for(const d of h){const p=c.get(d);p&&a.add(p),u(d)}};u(l),n={...e,subcircuit_ids:Array.from(a)}}}const o=new Map;for(const a of t){const A=`${a.type}_id`,c=a[A];typeof c=="string"&&o.set(c,a)}const i=new Map;for(const a of t){const A=Object.entries(a);for(const[c,l]of A)if(c!=="parent_source_group_id"){if(c.endsWith("_id")&&typeof l=="string"){const u=o.get(l);Zpt(i,a,u)}else if(c.endsWith("_ids")&&Array.isArray(l)){for(const u of l)if(typeof u=="string"){const g=o.get(u);Zpt(i,a,g)}}}}const r=[],s=new Set;for(const a of t){let A=!1;(n.subcircuit_id&&"subcircuit_id"in a&&a.subcircuit_id===n.subcircuit_id||n.subcircuit_ids&&"subcircuit_id"in a&&a.subcircuit_id&&n.subcircuit_ids.includes(a.subcircuit_id)||n.source_group_id&&"source_group_id"in a&&a.source_group_id===n.source_group_id||n.source_group_id&&"member_source_group_ids"in a&&Array.isArray(a.member_source_group_ids)&&a.member_source_group_ids.includes(n.source_group_id))&&(A=!0),A&&(r.push(a),s.add(a))}for(;r.length>0;){const a=r.shift(),A=i.get(a);if(A)for(const c of A)s.has(c)||(s.add(c),r.push(c))}return t.filter(a=>s.has(a))}var vy=((t,e={})=>{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split("_").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=>{if(s==="toArray")return()=>(n.editCount=o.editCount,n);if(s==="editCount")return o.editCount;if(s==="subtree")return A=>vy(dz(n,A),e);if(s==="insert")return A=>{const c=A.type;if(!c)throw new Error("insert requires an element with a type");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts&&(R9[c]??U4).parse(u),n.push(u),o.editCount++,u};if(s==="insertAll")return A=>A.map(c=>i.insert(c));const a=s;return{get:A=>n.find(c=>c.type===a&&c[`${a}_id`]===A),getUsing:A=>{const c=Object.keys(A);if(c.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const l=c[0],u=l.replace("_id",""),g=n.find(h=>h.type===u&&h[l]===A[l]);return g?n.find(h=>h.type===a&&h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=>{const c=Object.keys(A);return n.find(l=>l.type===a&&c.every(u=>l[u]===A[u]))},list:A=>{const c=A?Object.keys(A):[];return n.filter(l=>l.type===a&&c.every(u=>l[u]===A[u]))},insert:A=>{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts&&(R9[a]??U4).parse(l),n.push(l),o.editCount++,l},delete:A=>{const c=n.find(l=>l[`${a}_id`]===A);c&&(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=>{const l=n.find(u=>u.type===a&&u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=>{if(a==="source_component")return n.find(c=>c.type==="source_component"&&c.name===A.replace(/\./g,""));if(a==="pcb_port"||a==="source_port"||a==="schematic_port"){const[c,l]=A.replace(/\./g,"").split(/[\s\>]+/),u=n.find(h=>h.type==="source_component"&&h.name===c);if(!u)return null;const g=n.find(h=>h.type==="source_port"&&h.source_component_id===u.source_component_id&&(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a==="source_port")return g;if(a==="pcb_port")return n.find(h=>h.type==="pcb_port"&&h.source_port_id===g.source_port_id);if(a==="schematic_port")return n.find(h=>h.type==="schematic_port"&&h.source_port_id===g.source_port_id)}}}}});return i});vy.unparsed=vy;var Mr=vy,Xc=vy;function v9e(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var w9e=((t,e={})=>{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const s of t){const a=s.type,A=s[`${a}_id`];if(!A)continue;const c=Number.parseInt(A.split("_").pop()||"");Number.isNaN(c)||(n.counts[a]=Math.max(n.counts[a]??0,c))}const i=e.indexConfig||{},r=n.indexes;if(i.byId&&(r.byId=new Map),i.byType&&(r.byType=new Map),i.byRelation&&(r.byRelation=new Map),i.bySubcircuit&&(r.bySubcircuit=new Map),i.byCustomField&&i.byCustomField.length>0){r.byCustomField=new Map;for(const s of i.byCustomField)r.byCustomField.set(s,new Map)}for(const s of t){if(i.byId){const a=v9e(s);r.byId.set(a,s)}if(i.byType){const a=r.byType.get(s.type)||[];a.push(s),r.byType.set(s.type,a)}if(i.byRelation){const a=Object.entries(s);for(const[A,c]of a)if(A.endsWith("_id")&&A!==`${s.type}_id`&&typeof c=="string"){const l=r.byRelation.get(A)||new Map,u=l.get(c)||[];u.push(s),l.set(c,u),r.byRelation.set(A,l)}}if(i.bySubcircuit&&"subcircuit_id"in s){const a=s.subcircuit_id;if(a&&typeof a=="string"){const A=r.bySubcircuit.get(a)||[];A.push(s),r.bySubcircuit.set(a,A)}}if(i.byCustomField&&r.byCustomField){for(const a of i.byCustomField)if(a in s){const A=s[a];if(A!==void 0&&(typeof A=="string"||typeof A=="number")){const c=String(A),l=r.byCustomField.get(a),u=l.get(c)||[];u.push(s),l.set(c,u)}}}}t._internal_store_indexed=n}const o=new Proxy({},{get:(i,r)=>{if(r==="toArray")return()=>(t.editCount=n.editCount,t);if(r==="editCount")return n.editCount;if(r==="insert")return a=>{const{type:A,...c}=a;if(!A)throw new Error("insert requires an element with a type");return delete c[`${A}_id`],o[A].insert(c)};if(r==="insertAll")return a=>a.map(A=>o.insert(A));if(r==="subtree")return a=>w9e(dz(t,a),e);const s=r;return{get:a=>{const A=e.indexConfig||{};return A.byId&&n.indexes.byId?n.indexes.byId.get(`${s}:${a}`)||null:A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(l=>l[`${s}_id`]===a)||null:t.find(c=>c.type===s&&c[`${s}_id`]===a)||null},getUsing:a=>{const A=e.indexConfig||{},c=Object.keys(a);if(c.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const l=c[0],u=l.replace("_id","");if(A.byRelation&&n.indexes.byRelation){const h=n.indexes.byRelation.get(l);if(h){const p=(h.get(a[l])||[]).find(_=>_.type===u);if(!p)return null;const m=p[`${s}_id`];return A.byId&&n.indexes.byId?n.indexes.byId.get(`${s}:${m}`)||null:A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(f=>f[`${s}_id`]===m)||null:t.find(_=>_.type===s&&_[`${s}_id`]===m)||null}}const g=t.find(h=>h.type===u&&h[l]===a[l]);return g&&t.find(h=>h.type===s&&h[`${s}_id`]===g[`${s}_id`])||null},getWhere:a=>{const A=e.indexConfig||{},c=Object.keys(a);if(c.length===1&&A.byCustomField&&n.indexes.byCustomField){const l=c[0],u=n.indexes.byCustomField.get(l);if(u){const g=String(a[l]);return(u.get(g)||[]).find(d=>d.type===s)||null}}if("subcircuit_id"in a&&A.bySubcircuit&&n.indexes.bySubcircuit){const l=a.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).find(g=>g.type===s&&c.every(h=>g[h]===a[h]))||null}return A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(u=>c.every(g=>u[g]===a[g]))||null:t.find(l=>l.type===s&&c.every(u=>l[u]===a[u]))||null},list:a=>{const A=e.indexConfig||{},c=a?Object.keys(a):[];if(c.length===0&&A.byType&&n.indexes.byType)return(n.indexes.byType.get(s)||[]).slice();if(c.length===1&&c[0]==="subcircuit_id"&&A.bySubcircuit&&n.indexes.bySubcircuit){const u=a.subcircuit_id;return(n.indexes.bySubcircuit.get(u)||[]).filter(h=>h.type===s)}let l;return A.byType&&n.indexes.byType?l=n.indexes.byType.get(s)||[]:l=t.filter(u=>u.type===s),c.length>0?l.filter(u=>c.every(g=>u[g]===a[g])):l.slice()},insert:a=>{n.counts[s]??=-1,n.counts[s]++;const A=n.counts[s],c={type:s,[`${s}_id`]:`${s}_${A}`,...a};e.validateInserts&&(R9[s]??U4).parse(c),t.push(c),n.editCount++;const l=e.indexConfig||{};if(l.byId&&n.indexes.byId){const u=v9e(c);n.indexes.byId.set(u,c)}if(l.byType&&n.indexes.byType){const u=n.indexes.byType.get(s)||[];u.push(c),n.indexes.byType.set(s,u)}if(l.byRelation&&n.indexes.byRelation){const u=Object.entries(c);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${c.type}_id`&&typeof h=="string"){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.push(c),d.set(h,p),n.indexes.byRelation.set(g,d)}}if(l.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c){const u=c.subcircuit_id;if(u&&typeof u=="string"){const g=n.indexes.bySubcircuit.get(u)||[];g.push(c),n.indexes.bySubcircuit.set(u,g)}}if(l.byCustomField&&n.indexes.byCustomField){for(const u of l.byCustomField)if(u in c){const g=c[u];if(g!==void 0&&(typeof g=="string"||typeof g=="number")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.push(c),d.set(h,p)}}}return c},delete:a=>{const A=e.indexConfig||{};let c;if(A.byId&&n.indexes.byId?c=n.indexes.byId.get(`${s}:${a}`):A.byType&&n.indexes.byType?c=(n.indexes.byType.get(s)||[]).find(g=>g[`${s}_id`]===a):c=t.find(u=>u[`${s}_id`]===a),!c)return;const l=t.indexOf(c);if(l>=0&&(t.splice(l,1),n.editCount++),A.byId&&n.indexes.byId){const u=v9e(c);n.indexes.byId.delete(u)}if(A.byType&&n.indexes.byType){const g=(n.indexes.byType.get(s)||[]).filter(h=>h[`${s}_id`]!==a);n.indexes.byType.set(s,g)}if(A.byRelation&&n.indexes.byRelation)for(const[u,g]of n.indexes.byRelation.entries())for(const[h,d]of g.entries()){const p=d.filter(m=>m!==c);p.length===0?g.delete(h):g.set(h,p)}if(A.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c){const u=c.subcircuit_id;if(u){const h=(n.indexes.bySubcircuit.get(u)||[]).filter(d=>d!==c);h.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,h)}}if(A.byCustomField&&n.indexes.byCustomField)for(const u of n.indexes.byCustomField.values())for(const[g,h]of u.entries()){const d=h.filter(p=>p!==c);d.length===0?u.delete(g):u.set(g,d)}},update:(a,A)=>{const c=e.indexConfig||{};let l;if(c.byId&&n.indexes.byId?l=n.indexes.byId.get(`${s}:${a}`):c.byType&&n.indexes.byType?l=(n.indexes.byType.get(s)||[]).find(g=>g[`${s}_id`]===a):l=t.find(u=>u.type===s&&u[`${s}_id`]===a),!l)return null;if(c.byRelation&&n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${l.type}_id`&&typeof h=="string"&&g in A&&A[g]!==h){const d=n.indexes.byRelation.get(g);if(d){const m=(d.get(h)||[]).filter(_=>_!==l);m.length===0?d.delete(h):d.set(h,m)}}}if(c.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in l&&"subcircuit_id"in A){const u=l.subcircuit_id,g=A.subcircuit_id;if(u!==g){const d=(n.indexes.bySubcircuit.get(u)||[]).filter(p=>p!==l);d.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,d)}}if(c.byCustomField&&n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l&&u in A&&l[u]!==A[u]){const g=n.indexes.byCustomField.get(u);if(g){const h=String(l[u]),p=(g.get(h)||[]).filter(m=>m!==l);p.length===0?g.delete(h):g.set(h,p)}}}if(Object.assign(l,A),n.editCount++,c.byRelation&&n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${l.type}_id`&&typeof h=="string"&&g in A){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p),n.indexes.byRelation.set(g,d))}}if(c.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in l&&"subcircuit_id"in A){const u=l.subcircuit_id;if(u&&typeof u=="string"){const g=n.indexes.bySubcircuit.get(u)||[];g.includes(l)||(g.push(l),n.indexes.bySubcircuit.set(u,g))}}if(c.byCustomField&&n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l&&u in A){const g=l[u];if(g!==void 0&&(typeof g=="string"||typeof g=="number")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p))}}}return l},select:a=>{if(s==="source_component")return t.find(A=>A.type==="source_component"&&A.name===a.replace(/\./g,""))||null;if(s==="pcb_port"||s==="source_port"||s==="schematic_port"){const[A,c]=a.replace(/\./g,"").split(/[\s\>]+/),l=t.find(g=>g.type==="source_component"&&g.name===A);if(!l)return null;const u=t.find(g=>g.type==="source_port"&&g.source_component_id===l.source_component_id&&(g.name===c||(g.port_hints??[]).includes(c)));if(!u)return null;if(s==="source_port")return u;if(s==="pcb_port")return t.find(g=>g.type==="pcb_port"&&g.source_port_id===u.source_port_id)||null;if(s==="schematic_port")return t.find(g=>g.type==="schematic_port"&&g.source_port_id===u.source_port_id)||null}return null}}}});return o});w9e.unparsed=w9e;var lWn=t=>{if(t==="up")return"right";if(t==="right")return"down";if(t==="down")return"left";if(t==="left")return"up";throw new Error(`Invalid direction: ${t}`)},uWn=t=>{if(t==="up")return"left";if(t==="left")return"down";if(t==="down")return"right";if(t==="right")return"up";throw new Error(`Invalid direction: ${t}`)},gWn=(t,e)=>{for(;e>0;)t=lWn(t),e--;for(;e<0;)t=uWn(t),e++;return t},dWn=t=>{if(t==="top"||t==="up")return"bottom";if(t==="bottom"||t==="down")return"top";if(t==="left")return"right";if(t==="right")return"left";throw new Error(`Invalid sideOrDir: ${t}`)},emt=t=>Math.round(t/(Math.PI/2)),hWn=t=>{switch(t){case"from_left":return{x:-1,y:0};case"from_right":return{x:1,y:0};case"from_top":return{x:0,y:1};case"from_bottom":return{x:0,y:-1}}},pWn=({x:t,y:e})=>t>0?"from_right":t<0?"from_left":e>0?"from_top":"from_bottom",mWn=(t,e)=>{if(!t)return t;if(t==="from_above"||t==="from_below")return e.isFlipped?t==="from_above"?"from_below":"from_above":t;let{x:n,y:o}=hWn(t),i=Math.round(e.rotationDegrees/90);for(;i>0;)[n,o]=[-o,n],i--;for(;i<0;)[n,o]=[o,-n],i++;return e.isFlipped&&(o=-o),pWn({x:n,y:o})},_Wn=(t,e)=>{if(t.type==="schematic_component")t.center=Bn(e,t.center);else if(t.type==="schematic_port")t.center=Bn(e,t.center),t.facing_direction&&(t.facing_direction=gWn(t.facing_direction,-(Math.atan2(e.b,e.a)/Math.PI)*2));else if(t.type==="schematic_text")t.position=Bn(e,t.position);else if(t.type==="schematic_trace"){const n=t;n.route=(n.route??[]).map(o=>{const i=Bn(e,o);return o.x=i.x,o.y=i.y,o}),Array.isArray(n.junctions)&&(n.junctions=n.junctions.map(o=>{const i=Bn(e,o);return o.x=i.x,o.y=i.y,o})),Array.isArray(n.edges)&&(n.edges=n.edges.map(o=>(o.from=Bn(e,o.from),o.to=Bn(e,o.to),o)))}else if(t.type==="schematic_box"){const{x:n,y:o}=Bn(e,{x:t.x,y:t.y});t.x=n,t.y=o}else if(t.type==="schematic_line"){const{x:n,y:o}=Bn(e,{x:t.x1,y:t.y1}),{x:i,y:r}=Bn(e,{x:t.x2,y:t.y2});t.x1=n,t.y1=o,t.x2=i,t.y2=r}return t},tmt=(t,e)=>t.map(n=>_Wn(n,e)),fWn=(t,e)=>{const n=wxe(e),o=Math.abs(emt(n.rotation.angle))%2===1,i=n.rotation.angle/Math.PI*180,r=n.scale.sy<0;if(t.type==="pcb_plated_hole"||t.type==="pcb_hole"||t.type==="pcb_via"||t.type==="pcb_smtpad"||t.type==="pcb_solder_paste"||t.type==="pcb_port"){const{x:s,y:a}=Bn(e,{x:Number(t.x),y:Number(t.y)});t.x=s,t.y=a,t.type==="pcb_smtpad"&&t.shape==="polygon"&&Array.isArray(t.points)&&(t.points=t.points.map(A=>{const c=Bn(e,{x:A.x,y:A.y});return{x:c.x,y:c.y}}))}else if(t.type==="pcb_keepout"||t.type==="pcb_board")t.center=Bn(e,t.center);else if(t.type==="pcb_silkscreen_text"||t.type==="pcb_fabrication_note_text"||t.type==="pcb_note_text")t.anchor_position=Bn(e,t.anchor_position);else if(t.type==="pcb_copper_text")t.anchor_position&&(t.anchor_position=Bn(e,t.anchor_position));else if(t.type==="pcb_courtyard_rect")t.center=Bn(e,t.center),t.ccw_rotation=((t.ccw_rotation??0)+i)%360;else if(t.type==="pcb_silkscreen_circle"||t.type==="pcb_silkscreen_rect"||t.type==="pcb_silkscreen_pill"||t.type==="pcb_silkscreen_oval"||t.type==="pcb_note_rect"||t.type==="pcb_courtyard_circle")t.center=Bn(e,t.center);else if(t.type==="pcb_component")t.center=Bn(e,t.center),t.rotation=t.rotation+i,t.rotation=t.rotation%360,t.cable_insertion_center&&(t.cable_insertion_center=Bn(e,t.cable_insertion_center)),t.insertion_direction=mWn(t.insertion_direction,{rotationDegrees:i,isFlipped:r}),o&&([t.width,t.height]=[t.height,t.width]);else if(t.type==="pcb_courtyard_outline")t.outline=t.outline.map(s=>{const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_courtyard_polygon")t.points=t.points.map(s=>{const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_trace")t.route=t.route.map(s=>{if(!("x"in s))return s.start=Bn(e,s.start),s.end=Bn(e,s.end),s;const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_silkscreen_path"||t.type==="pcb_trace_hint"||t.type==="pcb_fabrication_note_path"||t.type==="pcb_note_path")t.route=t.route.map(s=>{const a=Bn(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_silkscreen_line"||t.type==="pcb_note_line"){const s={x:t.x1,y:t.y1},a={x:t.x2,y:t.y2},A=Bn(e,s),c=Bn(e,a);t.x1=A.x,t.y1=A.y,t.x2=c.x,t.y2=c.y}else if(t.type==="cad_component"){const s=Bn(e,{x:t.position.x,y:t.position.y});t.position.x=s.x,t.position.y=s.y}return t},FF=(t,e)=>{const n=wxe(e),o=emt(n.rotation.angle),i=Math.abs(o)%2===1;let r=t.map(s=>fWn(s,e));return i&&(r=r.map(s=>((s.type==="pcb_smtpad"||s.type==="pcb_solder_paste")&&(s.shape==="rect"||s.shape==="pill")&&([s.width,s.height]=[s.height,s.width]),s))),r},hz=t=>{const e=t.type;return t[`${e}_id`]},IWn=(t,e)=>t.find(n=>hz(n)===e)??null,pse=(t,e)=>{const n=vy(t).pcb_port.get(e);if(!n)return`pcb_port[#${e}]`;const o=n.pcb_component_id?vy(t).pcb_component.get(n.pcb_component_id):void 0;if(!o)return`pcb_port[#${e}]`;const i=vy(t).source_component.get(o.source_component_id);if(!i)return`pcb_port[#${e}]`;const r=vy(t).source_port.get(n.source_port_id);if(!r)return`pcb_port[#${e}]`;let s;return r?.port_hints&&r.port_hints.length>0||r.port_hints&&r.port_hints.length>0?s=r.port_hints[0]:s=e,`pcb_port[.${i.name} > .${s}]`};function CWn(t,e){const n=vy(t).pcb_smtpad.get(e);return!n||!n.pcb_port_id?`smtpad[${e}]`:pse(t,n.pcb_port_id)}function P9e(t,e){const n=vy(t).pcb_trace.get(e);if(!n)return`trace[${e}]`;const o=n.route.flatMap(s=>[s.start_pcb_port_id,s.end_pcb_port_id]).filter(Boolean);if(o.length===0)return`trace[${e}]`;function i(s){const a=vy(t).pcb_port.get(s);if(!a)return null;const A=a.pcb_component_id?vy(t).pcb_component.get(a.pcb_component_id):void 0;if(!A)return null;const c=vy(t).source_component.get(A.source_component_id);if(!c)return null;const l=vy(t).source_port.get(a.source_port_id),u=l?.port_hints?l.port_hints[1]:"";return{componentName:c.name,portHint:u}}return`trace[${o.map(s=>{const a=i(s);return a?`.${a.componentName} > port.${a.portHint}`:`port[${s}]`}).join(", ")}]`}var eI=(t,e)=>{if(typeof e=="string"){const n=IWn(t,e);return eI(t,n)}switch(e.type){case"pcb_port":return pse(t,e.pcb_port_id);case"pcb_smtpad":return CWn(t,e.pcb_smtpad_id);case"pcb_trace":return P9e(t,e.pcb_trace_id);case"source_component":return`source_component[${e.name}]`;default:return`${e.type}[#${hz(e)}]`}},M9e=(t,e)=>({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),pz=(t,e,n)=>{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},nmt=(t,e,n,o,i)=>{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=>({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=>u.x)),minY:Math.min(...l.map(u=>u.y)),maxX:Math.max(...l.map(u=>u.x)),maxY:Math.max(...l.map(u=>u.y))}},yWn=(t,e,n,o,i)=>{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=Math.hypot(r*A,s*c),u=Math.hypot(r*c,s*A);return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},xWn=(t,e,n,o,i)=>{const r=Math.min(n,o)/2,s=Math.max(n,o)/2-r,a=i*Math.PI/180,A=n>=o?{x:s,y:0}:{x:0,y:s},c={x:A.x*Math.cos(a)-A.y*Math.sin(a),y:A.x*Math.sin(a)+A.y*Math.cos(a)},l=Math.abs(c.x)+r,u=Math.abs(c.y)+r;return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},mse=t=>t.length===0?null:{minX:Math.min(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxX:Math.max(...t.map(e=>e.x)),maxY:Math.max(...t.map(e=>e.y))},D9e=t=>Array.isArray(t)?t.flatMap(e=>!e||typeof e!="object"?[]:"x"in e&&"y"in e&&typeof e.x=="number"&&typeof e.y=="number"?[{x:e.x,y:e.y}]:"start"in e&&"end"in e?[e.start,e.end].filter(o=>!!(o&&typeof o=="object"&&"x"in o&&"y"in o&&typeof o.x=="number"&&typeof o.y=="number")):[]):[],EWn=t=>{if(!t.type.startsWith("pcb_"))return null;if(t.type==="pcb_smtpad"&&t.shape==="polygon"&&Array.isArray(t.points))return mse(t.points);if(t.type==="pcb_hole"&&t.hole_shape==="circle")return pz(t.x,t.y,t.hole_diameter);if(t.type==="pcb_plated_hole"){let u;if("outer_diameter"in t&&typeof t.outer_diameter=="number"?u=pz(t.x,t.y,t.outer_diameter):"hole_diameter"in t&&typeof t.hole_diameter=="number"&&(u=pz(t.x,t.y,t.hole_diameter)),(t.shape==="oval"||t.shape==="pill")&&typeof t.outer_width=="number"&&typeof t.outer_height=="number"&&(u=(t.shape==="pill"?xWn:yWn)(t.x,t.y,t.outer_width,t.outer_height,t.ccw_rotation??0)),"rect_pad_width"in t&&typeof t.rect_pad_width=="number"&&"rect_pad_height"in t&&typeof t.rect_pad_height=="number"){const g=nmt(t.x,t.y,t.rect_pad_width,t.rect_pad_height,"rect_ccw_rotation"in t?t.rect_ccw_rotation??0:0);u=u?M9e(u,g):g}if("hole_diameter"in t&&typeof t.hole_diameter=="number"){const g=pz(t.x+("hole_offset_x"in t?t.hole_offset_x??0:0),t.y+("hole_offset_y"in t?t.hole_offset_y??0:0),t.hole_diameter);u=u?M9e(u,g):g}if(u)return u}const e=t,n=mse(D9e(e.route));if(n)return n;const o=mse(D9e(e.outline));if(o)return o;const i=mse(D9e(e.points));if(i)return i;let r,s,a,A;"x"in t&&"y"in t&&(r=Number(t.x),s=Number(t.y)),"outer_diameter"in t&&(a=Number(t.outer_diameter),A=Number(t.outer_diameter)),"width"in t&&(a=Number(t.width)),"height"in t&&(A=Number(t.height)),"center"in t&&t.center&&typeof t.center=="object"&&"x"in t.center&&"y"in t.center&&(r=Number(t.center.x),s=Number(t.center.y));let c=0;if("rotation"in t&&typeof t.rotation=="number"&&(c=t.rotation),"ccw_rotation"in t&&typeof t.ccw_rotation=="number"&&(c=t.ccw_rotation),r!==void 0&&s!==void 0)return a!==void 0&&A!==void 0?c?nmt(r,s,a,A,c):{minX:r-a/2,minY:s-A/2,maxX:r+a/2,maxY:s+A/2}:"radius"in t&&typeof t.radius=="number"?pz(r,s,t.radius*2):{minX:r,minY:s,maxX:r,maxY:s};const l=[e.anchor_position,e.position].filter(u=>!!(u&&typeof u=="object"&&"x"in u&&"y"in u&&typeof u.x=="number"&&typeof u.y=="number")).at(0);return l?{minX:l.x,minY:l.y,maxX:l.x,maxY:l.y}:null},H8=t=>{let e={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};for(const n of t){const o=EWn(n);o&&(e=M9e(e,o))}return e},BWn=t=>{if(t.width&&t.height&&t.center){const a=t.width/2,A=t.height/2;return{minX:t.center.x-a,minY:t.center.y-A,maxX:t.center.x+a,maxY:t.center.y+A,width:t.width,height:t.height,center:{x:t.center.x,y:t.center.y}}}if(!t.outline||t.outline.length===0)throw new Error("Unable to compute board bounds. pcb_board must include width/height/center or a non-empty outline.");let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const a of t.outline)e=Math.min(e,a.x),n=Math.min(n,a.y),o=Math.max(o,a.x),i=Math.max(i,a.y);const r=o-e,s=i-n;return{minX:e,minY:n,maxX:o,maxY:i,width:r,height:s,center:{x:e+r/2,y:n+s/2}}};function omt(t){const e=new Map,n=new Map,o=new Map;for(const A of t)switch(A.type){case"pcb_board":o.set(A.pcb_board_id,A);break;case"source_group":{const c=A.parent_subcircuit_id??A.parent_source_group_id;n.set(A.source_group_id,A.subcircuit_id??c),A.is_subcircuit&&A.subcircuit_id&&n.set(A.subcircuit_id,c);break}case"pcb_group":n.set(A.pcb_group_id,A.subcircuit_id??A.source_group_id);break;case"pcb_component":n.set(A.pcb_component_id,A.subcircuit_id??A.pcb_group_id);break;case"pcb_trace":n.set(A.pcb_trace_id,A.subcircuit_id??A.pcb_group_id??A.pcb_component_id);break;case"pcb_via":n.set(A.pcb_via_id,A.subcircuit_id??A.pcb_group_id??A.pcb_trace_id);break}const i=[...o.values()];for(const A of i)e.set(A.pcb_board_id,A),A.subcircuit_id&&e.set(A.subcircuit_id,A);const r=i.length===1?i[0]:void 0,s=new Set;function a(A){if(e.has(A))return e.get(A);if(!n.has(A)||s.has(A))return;s.add(A);const c=n.get(A);let l=r;return c&&(l=a(c)),s.delete(A),e.set(A,l),l}for(const A of n.keys())a(A);return e}var bWn=.1,imt=.18,$9=.2,xD=({minX:t,minY:e,maxX:n,maxY:o})=>{const i=n-t,r=o-e;return{minX:t,minY:e,maxX:n,maxY:o,width:i,height:r,center:{x:t+i/2,y:e+r/2}}},SWn=t=>{const e=.12*(imt/.18),n=.12*(imt/.18);return t.length*e+n},QWn=t=>{const e=SWn(t.text),n=t.anchor_position;if(!n){const o=t.anchor_side==="top"||t.anchor_side==="bottom",i=o?$9:e,r=o?e:$9;return xD({minX:t.center.x-i/2,minY:t.center.y-r/2,maxX:t.center.x+i/2,maxY:t.center.y+r/2})}switch(t.anchor_side){case"left":return xD({minX:n.x,minY:n.y-$9/2,maxX:n.x+e,maxY:n.y+$9/2});case"right":return xD({minX:n.x-e,minY:n.y-$9/2,maxX:n.x,maxY:n.y+$9/2});case"top":return xD({minX:n.x-$9/2,minY:n.y-e,maxX:n.x+$9/2,maxY:n.y});case"bottom":return xD({minX:n.x-$9/2,minY:n.y,maxX:n.x+$9/2,maxY:n.y+e})}},vWn=t=>{if(t.type==="schematic_component")return xD({minX:t.center.x-t.size.width/2,minY:t.center.y-t.size.height/2,maxX:t.center.x+t.size.width/2,maxY:t.center.y+t.size.height/2});if(t.type==="schematic_net_label")return QWn(t);const e=[...t.edges.flatMap(o=>[o.from,o.to]),...t.junctions];if(e.length===0)return null;const n=bWn/2;return xD({minX:Math.min(...e.map(o=>o.x))-n,minY:Math.min(...e.map(o=>o.y))-n,maxX:Math.max(...e.map(o=>o.x))+n,maxY:Math.max(...e.map(o=>o.y))+n})};function wWn(t){let e=0;if(t.length==0)return e;for(var n=0;n<t.length;n++){var o=t.charCodeAt(n);e=(e<<5)-e+o,e=e&e}return Math.abs(e)}var rmt=[["#69d2e7","#a7dbd8","#e0e4cc","#f38630","#fa6900"],["#fe4365","#fc9d9a","#f9cdad","#c8c8a9","#83af9b"],["#ecd078","#d95b43","#c02942","#542437","#53777a"],["#556270","#4ecdc4","#c7f464","#ff6b6b","#c44d58"],["#774f38","#e08e79","#f1d4af","#ece5ce","#c5e0dc"],["#e8ddcb","#cdb380","#036564","#033649","#031634"],["#490a3d","#bd1550","#e97f02","#f8ca00","#8a9b0f"],["#594f4f","#547980","#45ada8","#9de0ad","#e5fcc2"],["#00a0b0","#6a4a3c","#cc333f","#eb6841","#edc951"],["#e94e77","#d68189","#c6a49a","#c6e5d9","#f4ead5"],["#3fb8af","#7fc7af","#dad8a7","#ff9e9d","#ff3d7f"],["#d9ceb2","#948c75","#d5ded9","#7a6a53","#99b2b7"],["#ffffff","#cbe86b","#f2e9e1","#1c140d","#cbe86b"],["#efffcd","#dce9be","#555152","#2e2633","#99173c"],["#343838","#005f6b","#008c9e","#00b4cc","#00dffc"],["#413e4a","#73626e","#b38184","#f0b49e","#f7e4be"],["#ff4e50","#fc913a","#f9d423","#ede574","#e1f5c4"],["#99b898","#fecea8","#ff847c","#e84a5f","#2a363b"],["#655643","#80bca3","#f6f7bd","#e6ac27","#bf4d28"],["#00a8c6","#40c0cb","#f9f2e7","#aee239","#8fbe00"],["#351330","#424254","#64908a","#e8caa4","#cc2a41"],["#554236","#f77825","#d3ce3d","#f1efa5","#60b99a"],["#5d4157","#838689","#a8caba","#cad7b2","#ebe3aa"],["#8c2318","#5e8c6a","#88a65e","#bfb35a","#f2c45a"],["#fad089","#ff9c5b","#f5634a","#ed303c","#3b8183"],["#ff4242","#f4fad2","#d4ee5e","#e1edb9","#f0f2eb"],["#f8b195","#f67280","#c06c84","#6c5b7b","#355c7d"],["#d1e751","#ffffff","#000000","#4dbce9","#26ade4"],["#1b676b","#519548","#88c425","#bef202","#eafde6"],["#5e412f","#fcebb6","#78c0a8","#f07818","#f0a830"],["#bcbdac","#cfbe27","#f27435","#f02475","#3b2d38"],["#452632","#91204d","#e4844a","#e8bf56","#e2f7ce"],["#eee6ab","#c5bc8e","#696758","#45484b","#36393b"],["#f0d8a8","#3d1c00","#86b8b1","#f2d694","#fa2a00"],["#2a044a","#0b2e59","#0d6759","#7ab317","#a0c55f"],["#f04155","#ff823a","#f2f26f","#fff7bd","#95cfb7"],["#b9d7d9","#668284","#2a2829","#493736","#7b3b3b"],["#bbbb88","#ccc68d","#eedd99","#eec290","#eeaa88"],["#b3cc57","#ecf081","#ffbe40","#ef746f","#ab3e5b"],["#a3a948","#edb92e","#f85931","#ce1836","#009989"],["#300030","#480048","#601848","#c04848","#f07241"],["#67917a","#170409","#b8af03","#ccbf82","#e33258"],["#aab3ab","#c4cbb7","#ebefc9","#eee0b7","#e8caaf"],["#e8d5b7","#0e2430","#fc3a51","#f5b349","#e8d5b9"],["#ab526b","#bca297","#c5ceae","#f0e2a4","#f4ebc3"],["#607848","#789048","#c0d860","#f0f0d8","#604848"],["#b6d8c0","#c8d9bf","#dadabd","#ecdbbc","#fedcba"],["#a8e6ce","#dcedc2","#ffd3b5","#ffaaa6","#ff8c94"],["#3e4147","#fffedf","#dfba69","#5a2e2e","#2a2c31"],["#fc354c","#29221f","#13747d","#0abfbc","#fcf7c5"],["#cc0c39","#e6781e","#c8cf02","#f8fcc1","#1693a7"],["#1c2130","#028f76","#b3e099","#ffeaad","#d14334"],["#a7c5bd","#e5ddcb","#eb7b59","#cf4647","#524656"],["#dad6ca","#1bb0ce","#4f8699","#6a5e72","#563444"],["#5c323e","#a82743","#e15e32","#c0d23e","#e5f04c"],["#edebe6","#d6e1c7","#94c7b6","#403b33","#d3643b"],["#fdf1cc","#c6d6b8","#987f69","#e3ad40","#fcd036"],["#230f2b","#f21d41","#ebebbc","#bce3c5","#82b3ae"],["#b9d3b0","#81bda4","#b28774","#f88f79","#f6aa93"],["#3a111c","#574951","#83988e","#bcdea5","#e6f9bc"],["#5e3929","#cd8c52","#b7d1a3","#dee8be","#fcf7d3"],["#1c0113","#6b0103","#a30006","#c21a01","#f03c02"],["#000000","#9f111b","#b11623","#292c37","#cccccc"],["#382f32","#ffeaf2","#fcd9e5","#fbc5d8","#f1396d"],["#e3dfba","#c8d6bf","#93ccc6","#6cbdb5","#1a1f1e"],["#f6f6f6","#e8e8e8","#333333","#990100","#b90504"],["#1b325f","#9cc4e4","#e9f2f9","#3a89c9","#f26c4f"],["#a1dbb2","#fee5ad","#faca66","#f7a541","#f45d4c"],["#c1b398","#605951","#fbeec2","#61a6ab","#accec0"],["#5e9fa3","#dcd1b4","#fab87f","#f87e7b","#b05574"],["#951f2b","#f5f4d7","#e0dfb1","#a5a36c","#535233"],["#8dccad","#988864","#fea6a2","#f9d6ac","#ffe9af"],["#2d2d29","#215a6d","#3ca2a2","#92c7a3","#dfece6"],["#413d3d","#040004","#c8ff00","#fa023c","#4b000f"],["#eff3cd","#b2d5ba","#61ada0","#248f8d","#605063"],["#ffefd3","#fffee4","#d0ecea","#9fd6d2","#8b7a5e"],["#cfffdd","#b4dec1","#5c5863","#a85163","#ff1f4c"],["#9dc9ac","#fffec7","#f56218","#ff9d2e","#919167"],["#4e395d","#827085","#8ebe94","#ccfc8e","#dc5b3e"],["#a8a7a7","#cc527a","#e8175d","#474747","#363636"],["#f8edd1","#d88a8a","#474843","#9d9d93","#c5cfc6"],["#046d8b","#309292","#2fb8ac","#93a42a","#ecbe13"],["#f38a8a","#55443d","#a0cab5","#cde9ca","#f1edd0"],["#a70267","#f10c49","#fb6b41","#f6d86b","#339194"],["#ff003c","#ff8a00","#fabe28","#88c100","#00c176"],["#ffedbf","#f7803c","#f54828","#2e0d23","#f8e4c1"],["#4e4d4a","#353432","#94ba65","#2790b0","#2b4e72"],["#0ca5b0","#4e3f30","#fefeeb","#f8f4e4","#a5b3aa"],["#4d3b3b","#de6262","#ffb88c","#ffd0b3","#f5e0d3"],["#fffbb7","#a6f6af","#66b6ab","#5b7c8d","#4f2958"],["#edf6ee","#d1c089","#b3204d","#412e28","#151101"],["#9d7e79","#ccac95","#9a947c","#748b83","#5b756c"],["#fcfef5","#e9ffe1","#cdcfb7","#d6e6c3","#fafbe3"],["#9cddc8","#bfd8ad","#ddd9ab","#f7af63","#633d2e"],["#30261c","#403831","#36544f","#1f5f61","#0b8185"],["#aaff00","#ffaa00","#ff00aa","#aa00ff","#00aaff"],["#d1313d","#e5625c","#f9bf76","#8eb2c5","#615375"],["#ffe181","#eee9e5","#fad3b2","#ffba7f","#ff9c97"],["#73c8a9","#dee1b6","#e1b866","#bd5532","#373b44"],["#805841","#dcf7f3","#fffcdd","#ffd8d8","#f5a2a2"]],PWn=t=>{let{x:e,y:n,width:o,height:i}={...t,...t.size,...t.center,...t.position};if(t.x1!==void 0&&t.x2!==void 0&&t.y1!==void 0&&t.y2!==void 0&&(e=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2,o=Math.abs(t.x1-t.x2),i=Math.abs(t.y1-t.y2)),t.points&&Array.isArray(t.points)&&t.points.length>0){const a=t.points.map(h=>h.x),A=t.points.map(h=>h.y),c=Math.min(...a),l=Math.max(...a),u=Math.min(...A),g=Math.max(...A);e=(c+l)/2,n=(u+g)/2,o=l-c,i=g-u}const r=t.text||t.name||t.source?.text||t.source?.name||"?",s=t;return e===void 0||n===void 0?null:(o===void 0&&("radius"in t?(o=t.radius*2,i=t.radius*2):"outer_diameter"in t?(o=t.outer_diameter,i=t.outer_diameter):"rect_pad_width"in t&&"rect_pad_height"in t?(o=t.rect_pad_width,i=t.rect_pad_height,"hole_diameter"in t&&(o=Math.max(o,t.hole_diameter),i=Math.max(i,t.hole_diameter))):"hole_diameter"in t&&(o=t.hole_diameter,i=t.hole_diameter)),(o===void 0||i===void 0)&&(o=.1,i=.1),{x:e,y:n,width:o,height:i,title:r,content:s,bg_color:rmt[wWn(t.type||r)%rmt.length]?.[4]??"#f00"})},MWn=t=>!!t,N9e=t=>{const e=t.filter(c=>c.type.startsWith("pcb_")||c.type.startsWith("schematic_")).concat(t.filter(c=>c.type==="pcb_trace"||c.type==="schematic_trace").flatMap(c=>c.route)).map(c=>PWn(c)).filter(MWn);if(e.length===0)return{center:{x:0,y:0},width:0,height:0};let n=e[0].x-e[0].width/2,o=e[0].x+e[0].width/2,i=e[0].y-e[0].height/2,r=e[0].y+e[0].height/2;for(const c of e.slice(1))n=Math.min(n,c.x-c.width/2),o=Math.max(o,c.x+c.width/2),i=Math.min(i,c.y-c.height/2),r=Math.max(r,c.y+c.height/2);const s=o-n,a=r-i;return{center:{x:n+s/2,y:i+a/2},width:s,height:a}},Yh=t=>t[`${t.type}_id`],smt=(t,e,n)=>{const o=t.find(l=>l.type==="pcb_component"&&l.pcb_component_id===e);if(!o)return;const i="center"in o?o.center:{x:o.x,y:o.y},r=n.x-i.x,s=n.y-i.y,a=t.filter(l=>l.type==="pcb_port"&&l.pcb_component_id===e).map(l=>l.pcb_port_id),A=t.filter(l=>{if(l===o)return!0;const u=l;return!!(u.pcb_component_id===e||Array.isArray(u.pcb_component_ids)&&u.pcb_component_ids.includes(e)||u.pcb_port_id&&a.includes(u.pcb_port_id)||Array.isArray(u.pcb_port_ids)&&u.pcb_port_ids.some(g=>a.includes(g))||u.start_pcb_port_id&&a.includes(u.start_pcb_port_id)||u.end_pcb_port_id&&a.includes(u.end_pcb_port_id)||Array.isArray(u.route)&&u.route.some(g=>g.start_pcb_port_id&&a.includes(g.start_pcb_port_id)||g.end_pcb_port_id&&a.includes(g.end_pcb_port_id)))}),c=pA(r,s);FF(A,c)},amt=(t,e)=>{const n=[],o=t.filter(i=>i.type==="source_group"&&i.parent_source_group_id===e).map(i=>i.source_group_id);n.push(...o);for(const i of o)n.push(...amt(t,i));return n},Amt=(t,e,n)=>{const o=[e,...amt(t,e)],i=new Set;for(const g of o)dz(t,{source_group_id:g}).forEach(d=>i.add(d));const r=Array.from(i).filter(g=>g.type==="pcb_port").map(g=>g.pcb_port_id);t.filter(g=>{if(g.type!=="pcb_trace"||i.has(g))return!1;const h=g;return!!(h.start_pcb_port_id&&r.includes(h.start_pcb_port_id)||h.end_pcb_port_id&&r.includes(h.end_pcb_port_id)||Array.isArray(h.route)&&h.route.some(d=>d.start_pcb_port_id&&r.includes(d.start_pcb_port_id)||d.end_pcb_port_id&&r.includes(d.end_pcb_port_id)))}).forEach(g=>i.add(g));const a=Array.from(i).filter(g=>g.type.startsWith("pcb_"));if(a.length===0)return;const{center:A}=N9e(a),c=n.x-A.x,l=n.y-A.y,u=pA(c,l);FF(a,u)},DWn=(t,e,n)=>{const o=t.find(l=>l.type==="schematic_component"&&l.schematic_component_id===e);if(!o)return;const i="center"in o?o.center:{x:o.x,y:o.y},r=n.x-i.x,s=n.y-i.y,a=t.filter(l=>l.type==="schematic_port"&&l.schematic_component_id===e).map(l=>l.schematic_port_id),A=t.filter(l=>{if(l===o)return!0;const u=l;return!!(u.schematic_component_id===e||Array.isArray(u.schematic_component_ids)&&u.schematic_component_ids.includes(e)||u.schematic_port_id&&a.includes(u.schematic_port_id)||Array.isArray(u.schematic_port_ids)&&u.schematic_port_ids.some(g=>a.includes(g))||u.start_schematic_port_id&&a.includes(u.start_schematic_port_id)||u.end_schematic_port_id&&a.includes(u.end_schematic_port_id)||Array.isArray(u.route)&&u.route.some(g=>g.start_schematic_port_id&&a.includes(g.start_schematic_port_id)||g.end_schematic_port_id&&a.includes(g.end_schematic_port_id)))}),c=pA(r,s);tmt(A,c)},cmt=(t,e)=>{const n=[],o=t.filter(i=>i.type==="source_group"&&i.parent_source_group_id===e).map(i=>i.source_group_id);n.push(...o);for(const i of o)n.push(...cmt(t,i));return n},NWn=(t,e,n)=>{const o=[e,...cmt(t,e)],i=new Set;for(const g of o)dz(t,{source_group_id:g}).forEach(d=>i.add(d));const r=Array.from(i).filter(g=>g.type==="schematic_port").map(g=>g.schematic_port_id);t.filter(g=>{if(g.type!=="schematic_trace"||i.has(g))return!1;const h=g;return!!(h.start_schematic_port_id&&r.includes(h.start_schematic_port_id)||h.end_schematic_port_id&&r.includes(h.end_schematic_port_id)||Array.isArray(h.route)&&h.route.some(d=>d.start_schematic_port_id&&r.includes(d.start_schematic_port_id)||d.end_schematic_port_id&&r.includes(d.end_schematic_port_id)))}).forEach(g=>i.add(g));const a=Array.from(i).filter(g=>g.type.startsWith("schematic_"));if(a.length===0)return;const{center:A}=N9e(a),c=n.x-A.x,l=n.y-A.y,u=pA(c,l);tmt(a,u)},mz=(t,e)=>{const n=new Map,o=new Set;for(const c of t)c.type==="source_group"&&o.add(c.source_group_id);const i=[];for(const c of t)if(c.type==="source_group"&&c.parent_source_group_id){const l=c.parent_source_group_id,u=c.source_group_id;if(!o.has(l))i.push(u),n.has(u)||n.set(u,[]);else{const g=n.get(l)??[];g.push(u),n.set(l,g),n.has(u)||n.set(u,[])}}for(const c of t)c.type==="source_group"&&!n.has(c.source_group_id)&&n.set(c.source_group_id,[]);const r=new Map,s=()=>{for(const[c,l]of n)if(!r.has(c)&&l.every(u=>r.has(u)))return c;return null};let a=null;for(;;){const c=s();if(!c)break;const u={nodeType:"group",sourceGroup:t.find(g=>g.type==="source_group"&&g.source_group_id===c),otherChildElements:[],childNodes:[...n.get(c)?.map(g=>r.get(g))??[],...t.filter(g=>g.type==="source_component"&&g.source_group_id===c).map(g=>({nodeType:"component",sourceComponent:g,childNodes:[],otherChildElements:[...t.filter(h=>h.type==="pcb_component"&&h.source_component_id===g.source_component_id)]}))]};r.set(c,u),a=c}if(!a)return console.warn("No groups were processed, returning tree without sourceGroup"),{nodeType:"group",childNodes:[],otherChildElements:t};let A=null;return e&&e.source_group_id!==void 0?A=e.source_group_id:i.length>0?A=i[0]:A=a,A?r.get(A):(console.warn("No valid root group found, returning tree without sourceGroup"),{nodeType:"group",childNodes:[],otherChildElements:t})};function lmt(t,e={}){if(t.length===0)return{width:0,height:0};const n=e.direction??"row",o=e.columnGap??0,i=e.rowGap??0;if(n==="row"||n==="row-reverse"){const a=t.reduce((c,l)=>c+l.width,0)+o*Math.max(0,t.length-1),A=t.reduce((c,l)=>Math.max(c,l.height),0);return{width:a,height:A}}else{const a=t.reduce((c,l)=>c+l.height,0)+i*Math.max(0,t.length-1);return{width:t.reduce((c,l)=>Math.max(c,l.width),0),height:a}}}function umt(t){if(t.type==="pcb_smtpad")return[`${t.layer}_copper`];if(t.type==="pcb_trace"){if(!t.route||!Array.isArray(t.route))return[];const e=new Set;for(const n of t.route)"layer"in n&&n.layer&&e.add(`${n.layer}_copper`);return Array.from(e)}return t.type==="pcb_copper_pour"?[`${t.layer}_copper`]:t.type==="pcb_copper_text"?[`${t.layer}_copper`]:t.type==="pcb_silkscreen_text"||t.type==="pcb_silkscreen_rect"||t.type==="pcb_silkscreen_circle"||t.type==="pcb_silkscreen_line"||t.type==="pcb_silkscreen_path"?[`${t.layer}_silkscreen`]:t.type==="pcb_fabrication_note_text"||t.type==="pcb_fabrication_note_rect"||t.type==="pcb_fabrication_note_path"?[`${t.layer}_fabrication_note`]:t.type==="pcb_courtyard_circle"||t.type==="pcb_courtyard_polygon"||t.type==="pcb_courtyard_rect"||t.type==="pcb_courtyard_outline"?[`${t.layer}_courtyard`]:t.type==="pcb_note_rect"||t.type==="pcb_note_path"||t.type==="pcb_note_text"||t.type==="pcb_note_line"||t.type==="pcb_note_dimension"?[`${t.layer}_user_note`]:[]}var gx=1e-9,RWn=(t,e,n)=>Math.max(e,Math.min(n,t)),TWn=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),_z=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r<=gx)return TWn(t,e);const s=RWn(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return Math.hypot(t.x-(e.x+s*o),t.y-(e.y+s*i))},fz=(t,e,n)=>(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),Iz=(t,e,n)=>Math.abs(fz(e,n,t))>gx?!1:t.x>=Math.min(e.x,n.x)-gx&&t.x<=Math.max(e.x,n.x)+gx&&t.y>=Math.min(e.y,n.y)-gx&&t.y<=Math.max(e.y,n.y)+gx,kWn=(t,e,n,o)=>{const i=fz(t,e,n),r=fz(t,e,o),s=fz(n,o,t),a=fz(n,o,e);return(i>gx&&r<-gx||i<-gx&&r>gx)&&(s>gx&&a<-gx||s<-gx&&a>gx)?!0:Iz(n,t,e)||Iz(o,t,e)||Iz(t,n,o)||Iz(e,n,o)},LF=t=>{const e=[];if(t.points.length<2)return e;for(let n=0;n<t.points.length;n+=1){const o=t.points[n],i=t.points[(n+1)%t.points.length];!o||!i||e.push([o,i])}return e},R9e=(t,e)=>{for(const[o,i]of LF(e))if(Iz(t,o,i))return!0;let n=!1;for(let o=0,i=e.points.length-1;o<e.points.length;i=o++){const r=e.points[o],s=e.points[i];if(!r||!s)continue;r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},FWn=(t,e)=>Math.max(0,Math.hypot(t.x-e.x,t.y-e.y)-t.radius-e.radius),LWn=(t,e)=>{if(t.points.length<3||e.points.length<3)return Number.POSITIVE_INFINITY;for(const[r,s]of LF(t))for(const[a,A]of LF(e))if(kWn(r,s,a,A))return 0;const n=t.points[0],o=e.points[0];if(n&&R9e(n,e)||o&&R9e(o,t))return 0;let i=Number.POSITIVE_INFINITY;for(const[r,s]of LF(t))for(const[a,A]of LF(e))i=Math.min(i,_z(r,a,A),_z(s,a,A),_z(a,r,s),_z(A,r,s));return i},gmt=(t,e)=>{if(e.points.length<3)return Number.POSITIVE_INFINITY;if(R9e({x:t.x,y:t.y},e))return 0;let n=Number.POSITIVE_INFINITY;for(const[o,i]of LF(e))n=Math.min(n,_z({x:t.x,y:t.y},o,i));return Math.max(0,n-t.radius)},T9e={leftside_top:{side:"leftside",alignment:"top"},leftside_bottom:{side:"leftside",alignment:"bottom"},rightside_top:{side:"rightside",alignment:"top"},rightside_bottom:{side:"rightside",alignment:"bottom"},topside_left:{side:"topside",alignment:"left"},topside_right:{side:"topside",alignment:"right"},bottomside_left:{side:"bottomside",alignment:"left"},bottomside_right:{side:"bottomside",alignment:"right"}},HWn=Object.keys(T9e),OWn=t=>{if(typeof t.x=="number"&&typeof t.y=="number")return{x:t.x,y:t.y};if(t.points&&t.points.length>0){const e=t.points.map(o=>o.x),n=t.points.map(o=>o.y);return{x:(Math.min(...e)+Math.max(...e))/2,y:(Math.min(...n)+Math.max(...n))/2}}return null},GWn=t=>{for(const e of t.port_hints??[]){const n=String(e).trim().match(/^(?:pin)?(\d+)$/i);if(n)return Number.parseInt(n[1],10)}return null},YWn=(t,e,n)=>{const o=t.map(f=>f.x),i=t.map(f=>f.y),r=Math.min(...o),s=Math.max(...o),a=Math.min(...i),A=Math.max(...i),c=(r+s)/2,l=(a+A)/2,u=s-r,g=A-a,h=Math.max(u,g,1)*1e-6,{side:d,alignment:p}=T9e[n],m=d==="leftside"&&Math.abs(e.x-r)<=h||d==="rightside"&&Math.abs(e.x-s)<=h||d==="topside"&&Math.abs(e.y-A)<=h||d==="bottomside"&&Math.abs(e.y-a)<=h,_=p==="left"&&(u<=h||e.x<c-h)||p==="right"&&(u<=h||e.x>c+h)||p==="top"&&(g<=h||e.y>l+h)||p==="bottom"&&(g<=h||e.y<l-h);return m&&_},dmt=t=>{const n=t.filter(g=>g.type==="pcb_smtpad"||g.type==="pcb_plated_hole").map(g=>({center:OWn(g),pinNumber:GWn(g)})),o=n.find(g=>g.pinNumber===1)?.center,i=n.map(g=>g.center).filter(g=>g!==null);if(!o||i.length===0)return null;const r=HWn.filter(g=>YWn(i,o,g));if(r.length===1)return r[0];if(r.length===0)return null;let s;for(const g of n)!g.center||g.pinNumber===null||g.pinNumber<=1||(!s||g.pinNumber<s.pinNumber)&&(s={center:g.center,pinNumber:g.pinNumber});if(!s)return null;const a=i.map(g=>g.x),A=i.map(g=>g.y),l=Math.max(Math.max(...a)-Math.min(...a),Math.max(...A)-Math.min(...A),1)*1e-6;if(n.length===2&&s.pinNumber===2){const g=s.center.x-o.x,h=s.center.y-o.y;if(Math.abs(h)<=l&&Math.abs(g)>l)return g>0?"topside_left":"bottomside_right";if(Math.abs(g)<=l&&Math.abs(h)>l)return h>0?"leftside_bottom":"rightside_top"}const u=r.filter(g=>{const{side:h}=T9e[g];return h==="leftside"||h==="rightside"?Math.abs(s.center.x-o.x)<=l:Math.abs(s.center.y-o.y)<=l});return u.length===1?u[0]:null},hmt=(t,e)=>{const n=e*Math.PI/180;return{x:t.x*Math.cos(n)-t.y*Math.sin(n),y:t.x*Math.sin(n)+t.y*Math.cos(n)}},k9e=({x:t,y:e,width:n,height:o,ccwRotation:i})=>{const r=n/2,s=o/2;return[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(a=>{const A=hmt(a,i);return{x:t+A.x,y:e+A.y}})},O8=t=>{const e=t.type==="pcb_plated_hole"?t.outer_width:t.width,n=t.type==="pcb_plated_hole"?t.outer_height:t.height,o=t.type==="pcb_plated_hole"?Math.min(e,n)/2:t.radius,i=t.type==="pcb_plated_hole"||t.shape==="rotated_pill"?t.ccw_rotation:0,r=Math.max(Math.max(e,n)/2-o,0),s=e>=n?{x:r,y:0}:{x:0,y:r},a=hmt(s,i);return{start:{x:t.x-a.x,y:t.y-a.y},end:{x:t.x+a.x,y:t.y+a.y},radius:o}},Cz=t=>{if(t.type==="pcb_smtpad"){if(t.shape==="polygon")return t.points;if(t.shape==="rotated_rect")return k9e({x:t.x,y:t.y,width:t.width,height:t.height,ccwRotation:t.ccw_rotation})}if(t.type==="pcb_plated_hole"&&"rect_pad_width"in t&&"rect_pad_height"in t)return k9e({x:t.x,y:t.y,width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:"rect_ccw_rotation"in t&&typeof t.rect_ccw_rotation=="number"?t.rect_ccw_rotation:0});throw new Error(`Expected polygonal pad geometry, got ${t.type} with shape "${t.shape}"`)},pmt=t=>t.map((e,n)=>[e,t[(n+1)%t.length]]),F9e=(t,e,n,o)=>{const i=V4(t,e,n,o);if(i)return{distance:0,pointOnA:i,pointOnB:i,center:i};const r=[{pointOnA:t,pointOnB:SQ(t,n,o)},{pointOnA:e,pointOnB:SQ(e,n,o)},{pointOnA:SQ(n,t,e),pointOnB:n},{pointOnA:SQ(o,t,e),pointOnB:o}];let s=r[0],a=bxe(s.pointOnA,s.pointOnB);for(const A of r.slice(1)){const c=bxe(A.pointOnA,A.pointOnB);c<a&&(s=A,a=c)}return{distance:xV(t,e,n,o),pointOnA:s.pointOnA,pointOnB:s.pointOnB,center:{x:(s.pointOnA.x+s.pointOnB.x)/2,y:(s.pointOnA.y+s.pointOnB.y)/2}}},L9e=(t,e,n)=>{if(n.length<3)return{distance:Number.POSITIVE_INFINITY,center:t,tracePoint:t,obstaclePoint:t};const o=pmt(n).map(([r,s])=>V4(t,e,r,s)).filter(r=>r!==null);if(o.length>0){const r=e.x-t.x,s=e.y-t.y,a=r*r+s*s;return o.sort((A,c)=>{const l=((A.x-t.x)*r+(A.y-t.y)*s)/a,u=((c.x-t.x)*r+(c.y-t.y)*s)/a;return l-u}),{distance:0,center:o[0],tracePoint:o[0],obstaclePoint:o[0]}}if(nD(t,n)||nD(e,n)){const r={x:(t.x+e.x)/2,y:(t.y+e.y)/2};return{distance:0,center:r,tracePoint:r,obstaclePoint:r}}let i=F9e(t,e,n[0],n[1]);for(const[r,s]of pmt(n).slice(1)){const a=F9e(t,e,r,s);a.distance<i.distance&&(i=a)}return{distance:i.distance,center:i.center,tracePoint:i.pointOnA,obstaclePoint:i.pointOnB}},UWn=(t,e)=>{const n=O8(e),o=F9e({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},n.start,n.end);return{distance:o.distance,center:o.center,radius:n.radius,tracePoint:o.pointOnA,obstaclePoint:o.pointOnB}};function mmt(t,e){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}var H9e=1e-9,q9=1e-9;function KWn(t,e){const n=(t.y-e.start.y)*(e.end.x-e.start.x)-(t.x-e.start.x)*(e.end.y-e.start.y);if(Math.abs(n)>H9e)return!1;const o=(t.x-e.start.x)*(e.end.x-e.start.x)+(t.y-e.start.y)*(e.end.y-e.start.y);if(o<-H9e)return!1;const i=(e.end.x-e.start.x)**2+(e.end.y-e.start.y)**2;return o<=i+H9e}function O9e(t,e){let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o],s=e[i];if(KWn(t,{start:r,end:s}))return!0;r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n}function G9e(t,e){if(e.type==="pcb_smtpad"){if(e.shape==="circle")return mmt(t,e)<=e.radius+q9;if(e.shape==="rect"){const n=e.width/2,o=e.height/2;return Math.abs(t.x-e.x)<=n+q9&&Math.abs(t.y-e.y)<=o+q9}if(e.shape==="rotated_rect")return O9e(t,Cz(e));if(e.shape==="pill"||e.shape==="rotated_pill"){if(e.shape==="rotated_pill"){const A=O8(e);return Zd(t,A.start,A.end)<=A.radius+q9}const n=e.width/2,o=e.height/2,i=e.radius;if(Math.abs(t.x-e.x)<=n-i+q9&&Math.abs(t.y-e.y)<=o+q9)return!0;const r=Math.max(Math.abs(t.x-e.x)-(n-i),0),s=Math.max(Math.abs(t.y-e.y)-(o-i),0),a=i+q9;return r*r+s*s<=a*a}if(e.shape==="polygon")return O9e(t,e.points)}if(e.type==="pcb_plated_hole"){if(e.shape==="circle")return mmt(t,e)<=e.outer_diameter/2+q9;if("rect_pad_width"in e&&"rect_pad_height"in e)return O9e(t,Cz(e));if(e.shape==="oval"||e.shape==="pill")return Math.abs(t.x-e.x)<=e.outer_width/2+q9&&Math.abs(t.y-e.y)<=e.outer_height/2+q9}return!1}function _mt(t,e,n,o){return Math.sqrt((n-t)**2+(o-e)**2)}var fmt=t=>{const e=t.filter(r=>r.type==="pcb_port"),n=t.filter(r=>r.type==="pcb_smtpad"),o=t.filter(r=>r.type==="pcb_trace");function i(r,s={}){const a=s.traceWidth||0,A=e.find(c=>_mt(c.x,c.y,r.x,r.y)<.01);if(A)return A.pcb_port_id;if(s.isFirstOrLastPoint){const c=n.find(l=>{if(l.shape==="rect")return Math.abs(r.x-l.x)<l.width/2+a/2&&Math.abs(r.y-l.y)<l.height/2+a/2;if(l.shape==="circle")return _mt(r.x,r.y,l.x,l.y)<l.radius;if(l.shape==="pill"||l.shape==="rotated_pill")return G9e(r,l)});if(c)return c.pcb_port_id??null}return null}for(const r of o)for(let s=0;s<r.route.length;s++){const a=r.route[s],A=s===0||s===r.route.length-1;if(a.route_type==="wire"){if(!a.start_pcb_port_id&&s===0){const c=i(a,{isFirstOrLastPoint:A,traceWidth:a.width});c&&(a.start_pcb_port_id=c)}if(!a.end_pcb_port_id&&s===r.route.length-1){const c=i(a,{isFirstOrLastPoint:A,traceWidth:a.width});c&&(a.end_pcb_port_id=c)}}}},Imt=/\b(?:pcb|source|schematic|subcircuit)_[a-z0-9_]+\b/i,_se=(t,e,n)=>!t||t===e||Imt.test(t)?n:t,Cmt=(t,e)=>{for(const n of t){const o=_se(n,e,"");if(o)return o}return""},HF=(t,e)=>_se(eI(t,e),e,"component"),fse=(t,e)=>{const n=t.find(o=>o.type==="pcb_port"&&o.pcb_port_id===e);if(n?.type==="pcb_port"){const o=t.find(a=>a.type==="source_port"&&a.source_port_id===n.source_port_id),i=o?.type==="source_port"?t.find(a=>a.type==="source_component"&&a.source_component_id===o.source_component_id):null,r=Cmt([i?.type==="source_component"?i.name:null],i?.type==="source_component"?i.source_component_id:""),s=Cmt([o?.type==="source_port"?o.name:null,o?.type==="source_port"?o.pin_number?.toString():null,o?.type==="source_port"?o.port_hints?.[0]:null],o?.type==="source_port"?o.source_port_id:"");if(r&&s)return`${r}.${s}`;if(s)return s}return _se(pse(t,e)??eI(t,e),e,"port")},VWn=(t,e)=>_se(eI(t,e),e,"element"),zWn=t=>Imt.test(t);function JWn(t,e,n){const o=e.type==="pcb_smtpad"?"SMD pad":"through-hole pad",i=e.pcb_port_id?fse(t,e.pcb_port_id):null,r=H8([e]),s=(r.minX+r.maxX)/2,a=(r.minY+r.maxY)/2,A=`(${s.toFixed(2)}mm, ${a.toFixed(2)}mm)`;return i?`${o} ${i} at ${A}`:`${o} #${n+1} at ${A}`}function WWn(t){fmt(t);const e=t.filter(c=>c.type==="source_trace"),n=t.filter(c=>c.type==="pcb_port"),o=t.filter(c=>c.type==="source_net"),i=[],r=Vf(t),s=new qne(t),a=new Map;for(const c of n)a.set(c.source_port_id,c);const A=new Map(o.map(c=>[c.source_net_id,c.name]));for(const c of e){const l=c.connected_source_port_ids;if(l.length===1&&c.connected_source_net_ids.length>0){const m=a.get(l[0]);if(!m)continue;if(s.getAllTracesConnectedToPort(m.pcb_port_id).length===0){const f=c.connected_source_net_ids.map(C=>A.get(C)).filter(C=>!!C),I=f.length>0?`net [${f.join(", ")}]`:"its connected net";i.push({type:"pcb_port_not_connected_error",message:`Port [${fse(t,m.pcb_port_id)}] is not connected to ${I} by a PCB trace.`,error_type:"pcb_port_not_connected_error",pcb_port_ids:[m.pcb_port_id],pcb_component_ids:m.pcb_component_id?[m.pcb_component_id]:[],pcb_port_not_connected_error_id:`pcb_port_not_connected_error_trace_${c.source_trace_id}`})}continue}if(l.length<2)continue;const u=[];for(const m of l){const _=a.get(m);_&&u.push(_)}if(u.length<2)continue;const g=u[0],h=r.getNetConnectedToId(g.pcb_port_id);r.getIdsConnectedToNet(h).filter(m=>t.some(_=>_.type==="pcb_trace"&&("pcb_trace_id"in _&&_.pcb_trace_id===m||"route_id"in _&&_.route_id===m))).length===0&&new Set(u.map(_=>_.pcb_component_id)).size>1&&i.push({type:"pcb_port_not_connected_error",message:`Ports [${u.map(_=>fse(t,_.pcb_port_id)).join(", ")}] are not connected together through the same net.`,error_type:"pcb_port_not_connected_error",pcb_port_ids:u.map(_=>_.pcb_port_id),pcb_component_ids:u.map(_=>_.pcb_component_id).filter(_=>_!==void 0),pcb_port_not_connected_error_id:`pcb_port_not_connected_error_trace_${c.source_trace_id}`})}return i}var G8={min_trace_width:.1,min_via_hole_edge_to_via_hole_edge_clearance:.1,min_trace_to_pad_edge_clearance:.1,min_pad_edge_to_pad_edge_clearance:.1,min_board_edge_clearance:.2},jWn=.1,ymt=G8.min_trace_width,q4=.005,X9=t=>t.find(e=>e.type==="pcb_board"),Y8=(t,e)=>t?.[e],Z9=t=>t.type==="pcb_keepout"?t.shape==="outline"?{minX:Math.min(...t.outline.map(e=>e.x)),minY:Math.min(...t.outline.map(e=>e.y)),maxX:Math.max(...t.outline.map(e=>e.x)),maxY:Math.max(...t.outline.map(e=>e.y))}:t.shape==="circle"?{minX:t.center.x-t.radius,minY:t.center.y-t.radius,maxX:t.center.x+t.radius,maxY:t.center.y+t.radius}:{minX:t.center.x-t.width/2,minY:t.center.y-t.height/2,maxX:t.center.x+t.width/2,maxY:t.center.y+t.height/2}:H8([t]),Y9e=t=>{if(t.type==="pcb_keepout"&&t.shape!=="outline")return t.center;const e=Z9(t);return zne({x:e.minX,y:e.minY},{x:e.maxX,y:e.maxY})},$Wn=t=>{if(t.type==="pcb_keepout"&&t.shape==="circle")return t.radius;const e=Z9(t);return Math.min(e.maxX-e.minX,e.maxY-e.minY)/2},ED=t=>t.type==="pcb_via"||t.shape==="circle",BD=t=>t.type==="pcb_smtpad"&&(t.shape==="pill"||t.shape==="rotated_pill")||t.type==="pcb_plated_hole"&&(t.shape==="oval"||t.shape==="pill"),bD=t=>{const e=Y9e(t);return{kind:"circle",x:e.x,y:e.y,radius:$Wn(t)}},SD=t=>{if(t.type==="pcb_keepout"){if(t.shape==="outline")return{kind:"polygon",points:t.outline};if(t.shape!=="rect")throw new Error(`Expected rectangular keepout, got ${t.shape}`);return{kind:"polygon",points:[{x:t.center.x-t.width/2,y:t.center.y-t.height/2},{x:t.center.x+t.width/2,y:t.center.y-t.height/2},{x:t.center.x+t.width/2,y:t.center.y+t.height/2},{x:t.center.x-t.width/2,y:t.center.y+t.height/2}]}}if(t.type==="pcb_smtpad"&&(t.shape==="polygon"||t.shape==="rotated_rect"))return{kind:"polygon",points:Cz(t)};if(t.type==="pcb_plated_hole"&&"rect_pad_width"in t&&"rect_pad_height"in t)return{kind:"polygon",points:Cz(t)};const e=Z9(t);return{kind:"polygon",points:[{x:e.minX,y:e.minY},{x:e.maxX,y:e.minY},{x:e.maxX,y:e.maxY},{x:e.minX,y:e.maxY}]}},YQ=(t,e)=>{if(BD(t)&&BD(e)){const n=O8(t),o=O8(e);return xV(n.start,n.end,o.start,o.end)-n.radius-o.radius}if(BD(t)&&ED(e)){const n=O8(t);return Vne(n.start,n.end,bD(e))-n.radius}if(ED(t)&&BD(e)){const n=O8(e);return Vne(n.start,n.end,bD(t))-n.radius}if(BD(t)){const n=O8(t);return L9e(n.start,n.end,SD(e).points).distance-n.radius}if(BD(e)){const n=O8(e);return L9e(n.start,n.end,SD(t).points).distance-n.radius}return ED(t)&&ED(e)?FWn(bD(t),bD(e)):ED(t)?gmt(bD(t),SD(e)):ED(e)?gmt(bD(e),SD(t)):LWn(SD(t),SD(e))},OF=t=>[...Xc(t).pcb_smtpad.list(),...Xc(t).pcb_plated_hole.list()],xmt=t=>Xc(t).pcb_trace.list().flatMap(n=>{const o=[];for(let i=0;i<n.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.route_type==="wire"&&s.route_type==="wire"&&r.layer===s.layer&&o.push({type:"pcb_trace_segment",pcb_trace_id:n.pcb_trace_id,_pcbTrace:n,thickness:"width"in r?r.width:"width"in s?s.width:ymt,layer:r.layer,x1:r.x,y1:r.y,x2:s.x,y2:s.y})}return o}),U9e=({tracePoint:t,obstaclePoint:e,traceRadius:n,obstacleRadius:o})=>{const i=e.x-t.x,r=e.y-t.y,s=Math.hypot(i,r);if(s===0)return zne(t,e);const a=i/s,A=r/s;if(s<=n+o){const u=Math.max(-n,s-o),g=Math.min(n,s+o),h=(u+g)/2;return{x:t.x+a*h,y:t.y+A*h}}const c={x:t.x+a*n,y:t.y+A*n},l={x:e.x-a*o,y:e.y-A*o};return zne(c,l)},Ise=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=t.thickness/2;if(e.type==="pcb_via"||ED(e)){const s=e.type==="pcb_via"?{x:e.x,y:e.y,radius:e.outer_diameter/2}:bD(e),a=SQ(s,n,o);return{gap:Vne(n,o,s)-i,center:U9e({tracePoint:a,obstaclePoint:s,traceRadius:i,obstacleRadius:s.radius})}}if(BD(e)){const s=UWn(t,e);return{gap:s.distance-i-s.radius,center:U9e({tracePoint:s.tracePoint,obstaclePoint:s.obstaclePoint,traceRadius:i,obstacleRadius:s.radius})}}const r=L9e(n,o,SD(e).points);return{gap:r.distance-i,center:U9e({tracePoint:r.tracePoint,obstaclePoint:r.obstaclePoint,traceRadius:i,obstacleRadius:0})}},Cse=t=>t<=0,qWn=(t,e)=>Ise({x1:t.x,y1:t.y,x2:t.x,y2:t.y,thickness:t.outer_diameter},e).center,yz=class{buckets;objectsById;getBounds;getId;CELL_SIZE=.4;constructor({objects:t,getBounds:e,getId:n,CELL_SIZE:o}){this.buckets=new Map,this.objectsById=new Map,this.getBounds=e,this.getId=n??(()=>this._getNextId()),this.CELL_SIZE=o??this.CELL_SIZE;for(const i of t)this.addObject(i)}_idCounter=0;_getNextId(){return`${this._idCounter++}`}addObject(t){const e=this.getBounds(t),n=this.getId(t),o={...t,spatialIndexId:n};this.objectsById.set(n,o);const i=Math.floor(e.minX/this.CELL_SIZE),r=Math.floor(e.minY/this.CELL_SIZE),s=Math.floor(e.maxX/this.CELL_SIZE),a=Math.floor(e.maxY/this.CELL_SIZE);for(let A=i;A<=s;A++)for(let c=r;c<=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l);u?u.push(o):this.buckets.set(l,[o])}}removeObject(t){const e=this.objectsById.get(t);if(!e)return!1;this.objectsById.delete(t);const n=this.getBounds(e),o=Math.floor(n.minX/this.CELL_SIZE),i=Math.floor(n.minY/this.CELL_SIZE),r=Math.floor(n.maxX/this.CELL_SIZE),s=Math.floor(n.maxY/this.CELL_SIZE);for(let a=o;a<=r;a++)for(let A=i;A<=s;A++){const c=`${a}x${A}`,l=this.buckets.get(c);if(l){const u=l.findIndex(g=>g.spatialIndexId===t);u!==-1&&(l.splice(u,1),l.length===0&&this.buckets.delete(c))}}return!0}getBucketKey(t,e){return`${Math.floor(t/this.CELL_SIZE)}x${Math.floor(e/this.CELL_SIZE)}`}getObjectsInBounds(t,e=0){const n=[],o=new Set,i=Math.floor((t.minX-e)/this.CELL_SIZE),r=Math.floor((t.minY-e)/this.CELL_SIZE),s=Math.floor((t.maxX+e)/this.CELL_SIZE),a=Math.floor((t.maxY+e)/this.CELL_SIZE);for(let A=i;A<=s;A++)for(let c=r;c<=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l)||[];for(const g of u){const h=g.spatialIndexId;o.has(h)||(o.add(h),n.push(g))}}return n}};function dx(t){return t.type==="pcb_trace_segment"?[t.layer]:t.type==="pcb_smtpad"?[t.layer]:t.type==="pcb_plated_hole"?Array.isArray(t.layers)?t.layers:[...Kk]:t.type==="pcb_hole"?[...Kk]:t.type==="pcb_via"?Array.isArray(t.layers)?t.layers:[...Kk]:t.type==="pcb_keepout"?Array.isArray(t.layers)?t.layers:[]:[]}var Emt=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=e.minX,r=e.minY,s=e.maxX,a=e.maxY;if(n.x===o.x&&n.y===o.y){const B=Math.max(i,Math.min(s,n.x)),S=Math.max(r,Math.min(a,n.y));return B===n.x&&S===n.y?{x:n.x,y:n.y}:{x:B,y:S}}const A=o.x-n.x,c=o.y-n.y,l=A!==0?(i-n.x)/A:Number.NEGATIVE_INFINITY,u=A!==0?(s-n.x)/A:Number.POSITIVE_INFINITY,g=c!==0?(r-n.y)/c:Number.NEGATIVE_INFINITY,h=c!==0?(a-n.y)/c:Number.POSITIVE_INFINITY,d=Math.max(Math.min(l,u),Math.min(g,h)),p=Math.min(Math.max(l,u),Math.max(g,h));if(d<=p&&p>=0&&d<=1){const B=Math.max(0,Math.min(1,d));return{x:n.x+B*A,y:n.y+B*c}}const m={x:Math.max(i,Math.min(s,n.x)),y:Math.max(r,Math.min(a,n.y))},_={x:Math.max(i,Math.min(s,o.x)),y:Math.max(r,Math.min(a,o.y))},f=(m.x-n.x)**2+(m.y-n.y)**2,I=(_.x-o.x)**2+(_.y-o.y)**2,C=[{start:{x:i,y:r},end:{x:s,y:r}},{start:{x:s,y:r},end:{x:s,y:a}},{start:{x:s,y:a},end:{x:i,y:a}},{start:{x:i,y:a},end:{x:i,y:r}}];let y=Math.min(f,I),x=f<=I?m:_;const E=(B,S,Q)=>Math.max(S,Math.min(Q,B));for(const B of C){const S={x:o.x-n.x,y:o.y-n.y},Q={x:B.end.x-B.start.x,y:B.end.y-B.start.y},w={x:n.x-B.start.x,y:n.y-B.start.y},M=S.x*S.x+S.y*S.y,k=S.x*Q.x+S.y*Q.y,R=S.x*w.x+S.y*w.y,F=Q.x*Q.x+Q.y*Q.y,O=Q.x*w.x+Q.y*w.y,U=M*F-k*k;if(Math.abs(U)<1e-10)continue;let Y=(k*O-F*R)/U,W=(M*O-k*R)/U;Y=E(Y,0,1),W=E(W,0,1);const te={x:n.x+Y*S.x,y:n.y+Y*S.y},j={x:B.start.x+W*Q.x,y:B.start.y+W*Q.y},J=te.x-j.x,oe=te.y-j.y,ie=J*J+oe*oe;ie<y&&(y=ie,x={x:(te.x+j.x)/2,y:(te.y+j.y)/2})}return x},XWn=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i={x:e.x1,y:e.y1},r={x:e.x2,y:e.y2},s={x:o.x-n.x,y:o.y-n.y},a={x:r.x-i.x,y:r.y-i.y},A=s.x*s.x+s.y*s.y,c=a.x*a.x+a.y*a.y;if(A===0||c===0){if(A===0&&c===0)return{x:(n.x+i.x)/2,y:(n.y+i.y)/2};if(A===0){const B=e7(((n.x-i.x)*a.x+(n.y-i.y)*a.y)/c,0,1),S={x:i.x+B*a.x,y:i.y+B*a.y};return{x:(n.x+S.x)/2,y:(n.y+S.y)/2}}const x=e7(((i.x-n.x)*s.x+(i.y-n.y)*s.y)/A,0,1),E={x:n.x+x*s.x,y:n.y+x*s.y};return{x:(E.x+i.x)/2,y:(E.y+i.y)/2}}const l={x:n.x-i.x,y:n.y-i.y},u=s.x*s.x+s.y*s.y,g=s.x*a.x+s.y*a.y,h=s.x*l.x+s.y*l.y,d=a.x*a.x+a.y*a.y,p=a.x*l.x+a.y*l.y,m=u*d-g*g;if(m<1e-10)return ZWn(n,o,i,r,s,a,A,c);let _=(g*p-d*h)/m,f=(u*p-g*h)/m;_=e7(_,0,1),f=e7(f,0,1),f=(_*g+p)/d,f=e7(f,0,1),_=(f*g-h)/u,_=e7(_,0,1);const I={x:n.x+_*s.x,y:n.y+_*s.y},C={x:i.x+f*a.x,y:i.y+f*a.y};return{x:(I.x+C.x)/2,y:(I.y+C.y)/2}},ZWn=(t,e,n,o,i,r,s,a)=>{let A=((n.x-t.x)*i.x+(n.y-t.y)*i.y)/s;A=e7(A,0,1);const c={x:t.x+A*i.x,y:t.y+A*i.y};let l=((o.x-t.x)*i.x+(o.y-t.y)*i.y)/s;l=e7(l,0,1);const u={x:t.x+l*i.x,y:t.y+l*i.y};let g=((t.x-n.x)*r.x+(t.y-n.y)*r.y)/a;g=e7(g,0,1);const h={x:n.x+g*r.x,y:n.y+g*r.y};let d=((e.x-n.x)*r.x+(e.y-n.y)*r.y)/a;d=e7(d,0,1);const p={x:n.x+d*r.x,y:n.y+d*r.y},_=[{pointA:c,pointB:n,distance:Math.sqrt((c.x-n.x)**2+(c.y-n.y)**2)},{pointA:u,pointB:o,distance:Math.sqrt((u.x-o.x)**2+(u.y-o.y)**2)},{pointA:t,pointB:h,distance:Math.sqrt((t.x-h.x)**2+(t.y-h.y)**2)},{pointA:e,pointB:p,distance:Math.sqrt((e.x-p.x)**2+(e.y-p.y)**2)}].reduce((f,I)=>I.distance<f.distance?I:f);return{x:(_.pointA.x+_.pointB.x)/2,y:(_.pointA.y+_.pointB.y)/2}},e7=(t,e,n)=>Math.max(e,Math.min(n,t)),GF=t=>{if(t.type==="pcb_trace_segment")return{minX:Math.min(t.x1,t.x2),minY:Math.min(t.y1,t.y2),maxX:Math.max(t.x1,t.x2),maxY:Math.max(t.y1,t.y2)};if(t.type==="pcb_smtpad"||t.type==="pcb_plated_hole"){if(t.type==="pcb_smtpad"&&(t.shape==="rotated_rect"||t.shape==="polygon")||t.type==="pcb_plated_hole"&&"rect_pad_width"in t&&"rect_pad_height"in t){const n=Cz(t);return{minX:Math.min(...n.map(o=>o.x)),minY:Math.min(...n.map(o=>o.y)),maxX:Math.max(...n.map(o=>o.x)),maxY:Math.max(...n.map(o=>o.y))}}if(t.type==="pcb_smtpad"&&t.shape==="rotated_pill"){const n=O8(t);return{minX:Math.min(n.start.x,n.end.x)-n.radius,minY:Math.min(n.start.y,n.end.y)-n.radius,maxX:Math.max(n.start.x,n.end.x)+n.radius,maxY:Math.max(n.start.y,n.end.y)+n.radius}}}return H8([t])};function K9e(t){return t.route_type!=="wire"?[]:[t.start_pcb_port_id,t.end_pcb_port_id].filter(e=>!!e)}function ejn(t){const e=new Set;for(const n of t.route)for(const o of K9e(n))e.add(o);return Array.from(e)}function yse(t){const e=new Set;for(const n of t)for(const o of ejn(n))e.add(o);return Array.from(e)}var tjn=t=>{if(t.type==="pcb_via"||t.type==="pcb_plated_hole"&&t.shape==="circle")return t.outer_diameter/2;if(t.type==="pcb_hole"&&t.hole_shape==="circle")return t.hole_diameter/2;if(t.type==="pcb_smtpad"&&t.shape==="circle")return t.radius;throw new Error(`Could not determine radius of element: ${JSON.stringify(t)}`)},njn=t=>t.type==="pcb_port"?t.pcb_port_id:t.type==="pcb_smtpad"?t.pcb_smtpad_id:t.pcb_plated_hole_id;function ojn(t,{connMap:e,minClearance:n}={}){const o=[];fmt(t),e??=Vf(t);const i=X9(t);n??=Y8(i,"min_trace_to_pad_edge_clearance")??jWn;const s=Xc(t).pcb_trace.list().flatMap(C=>{const y=[];for(let x=0;x<C.route.length-1;x++){const E=C.route[x],B=C.route[x+1];E.route_type==="wire"&&B.route_type==="wire"&&E.layer===B.layer&&y.push({type:"pcb_trace_segment",pcb_trace_id:C.pcb_trace_id,_pcbTrace:C,thickness:"width"in E?E.width:"width"in B?B.width:ymt,layer:E.layer,x1:E.x,y1:E.y,x2:B.x,y2:B.y})}return y}),a=Xc(t).pcb_smtpad.list(),A=Xc(t).pcb_plated_hole.list(),c=Xc(t).pcb_port.list(),l=Xc(t).pcb_hole.list(),u=Xc(t).pcb_via.list(),g=Xc(t).pcb_keepout.list(),h=[...c,...a,...A],d=new Map;for(const C of g){const y=new Set(C.excluded_pcb_component_ids??[]);y.size!==0&&d.set(C.pcb_keepout_id,h.filter(x=>x.pcb_component_id&&y.has(x.pcb_component_id)).map(njn))}const p=[...s,...a,...A,...l,...u,...g],m=new yz({objects:p,getBounds:GF}),_=C=>eI(t,C),f=(C,y,x)=>Cse(x)?`PCB trace ${C} overlaps with ${y} (accidental contact)`:`PCB trace ${C} is too close to ${y} (gap: ${x.toFixed(3)}mm)`,I=new Set;for(const C of s){const y=n,x=GF(C),E=m.getObjectsInBounds(x,y+C.thickness/2);if(!(C.x1===C.x2&&C.y1===C.y2))for(const B of E){if(!dx(B).includes(C.layer)||B.type==="pcb_keepout"&&(d.get(B.pcb_keepout_id)??[]).some(M=>e.areIdsConnected(C.pcb_trace_id,M)))continue;if(B.type==="pcb_trace_segment"){const M=B;if(C.layer!==M.layer||e.areIdsConnected(C.pcb_trace_id,M.pcb_trace_id))continue;const k=xV({x:C.x1,y:C.y1},{x:C.x2,y:C.y2},{x:M.x1,y:M.y1},{x:M.x2,y:M.y2})-C.thickness/2-M.thickness/2;if(k>n-q4)continue;const R=`overlap_${C.pcb_trace_id}_${M.pcb_trace_id}`,F=`overlap_${M.pcb_trace_id}_${C.pcb_trace_id}`;if(I.has(R)||I.has(F))continue;I.add(R),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:f(_(C.pcb_trace_id),_(M.pcb_trace_id),k),pcb_trace_id:C.pcb_trace_id,source_trace_id:"",pcb_trace_error_id:R,pcb_component_ids:[],center:XWn(C,M),pcb_port_ids:yse([C._pcbTrace,M._pcbTrace])});continue}const S=Yh(B);if(e.areIdsConnected(C.pcb_trace_id,"pcb_trace_id"in B?B.pcb_trace_id:S))continue;if(B.type==="pcb_smtpad"||B.type==="pcb_plated_hole"||B.type==="pcb_via"){const{gap:M,center:k}=Ise(C,B);if(!Cse(M))continue;const R=`overlap_${C.pcb_trace_id}_${S}`;if(I.has(R))continue;I.add(R),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:f(_(C.pcb_trace_id),`${B.type} "${_(S)}"`,M),pcb_trace_id:C.pcb_trace_id,center:k,source_trace_id:"",pcb_trace_error_id:R,pcb_component_ids:["pcb_component_id"in B?B.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...yse([C._pcbTrace]),"pcb_port_id"in B?B.pcb_port_id:void 0].filter(Boolean)});continue}if(B.type==="pcb_hole"){const M=tjn(B),R=Vne({x:C.x1,y:C.y1},{x:C.x2,y:C.y2},{x:B.x,y:B.y,radius:M})-C.thickness/2;if(R>n-q4)continue;const F=`overlap_${C.pcb_trace_id}_${S}`;if(I.has(F))continue;I.add(F),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:f(_(C.pcb_trace_id),`${B.type} "${_(Yh(B))}"`,R),pcb_trace_id:C.pcb_trace_id,center:Emt(C,GF(B)),source_trace_id:"",pcb_trace_error_id:F,pcb_component_ids:["pcb_component_id"in B?B.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...yse([C._pcbTrace]),"pcb_port_id"in B?B.pcb_port_id:void 0].filter(Boolean)})}const w=_ct({x:C.x1,y:C.y1},{x:C.x2,y:C.y2},GF(B))-C.thickness/2;if(w+q4<y){const M=`overlap_${C.pcb_trace_id}_${S}`;if(I.has(M))continue;I.add(M),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:f(_(C.pcb_trace_id),`${B.type} "${_(Yh(B))}"`,w),pcb_trace_id:C.pcb_trace_id,source_trace_id:"",pcb_trace_error_id:M,pcb_component_ids:["pcb_component_id"in B?B.pcb_component_id:void 0].filter(Boolean),center:Emt(C,GF(B)),pcb_port_ids:[...yse([C._pcbTrace]),"pcb_port_id"in B?B.pcb_port_id:void 0].filter(Boolean)})}}}return o}var xse=t=>t,hx=1e-9,YF=t=>t.length<3?null:new Ip(t.map(({x:e,y:n})=>new Gc(e,n))),ijn=t=>{const e=t.filter((i,r)=>{const s=t[r-1];return!s||Math.abs(s.x-i.x)>hx||Math.abs(s.y-i.y)>hx});if(e.length>1&&Math.abs(e[0].x-e.at(-1).x)<=hx&&Math.abs(e[0].y-e.at(-1).y)<=hx&&e.pop(),e.length<3)return null;const n=[];for(let i=0;i<e.length;i++){const r=e[i],s=e[(i+1)%e.length],a=new Gc(r.x,r.y),A=new Gc(s.x,s.y),c=r.bulge??0;if(Math.abs(c)<=hx){n.push(new _D(a,A));continue}const l=a.distanceTo(A)[0];if(l<=hx)continue;const u={x:(r.x+s.x)/2,y:(r.y+s.y)/2},g={x:-(s.y-r.y)/l,y:(s.x-r.x)/l},h=l*(1-c*c)/(4*c),d=new Gc(u.x+g.x*h,u.y+g.y*h),p=l*(1+c*c)/(4*Math.abs(c));n.push(new T8(d,p,Math.atan2(r.y-d.y,r.x-d.x),Math.atan2(s.y-d.y,s.x-d.x),c>0))}if(n.length<3)return null;const o=new Ip;return o.addFace(n),o},rjn=t=>{if(t.outline&&t.outline.length>=3)return YF(t.outline);if(!t.center||typeof t.width!="number"||typeof t.height!="number")return null;const e=t.width/2,n=t.height/2;return YF([{x:t.center.x-e,y:t.center.y-n},{x:t.center.x+e,y:t.center.y-n},{x:t.center.x+e,y:t.center.y+n},{x:t.center.x-e,y:t.center.y+n}])},Ese=({x:t,y:e,width:n,height:o,ccwRotationDegrees:i=0})=>{const r=n/2,s=o/2,a=F9(i,t,e);return YF([{x:t-r,y:e-s},{x:t+r,y:e-s},{x:t+r,y:e+s},{x:t-r,y:e+s}].map(A=>Bn(a,A)))},V9e=({x:t,y:e,width:n,height:o,cornerRadius:i,ccwRotationDegrees:r=0})=>{const s=Math.max(0,Math.min(i,n/2,o/2));if(s<=hx){const d=Ese({x:t,y:e,width:n,height:o,ccwRotationDegrees:r});return d?{kind:"shapes",shapes:[d]}:null}const a=[],A=n-2*s,c=o-2*s;if(A>hx){const d=Ese({x:t,y:e,width:A,height:o,ccwRotationDegrees:r});d&&a.push(d)}if(c>hx){const d=Ese({x:t,y:e,width:n,height:c,ccwRotationDegrees:r});d&&a.push(d)}const l=A/2,u=c/2,g=F9(r,t,e),h=[{x:t-l,y:e-u},{x:t+l,y:e-u},{x:t+l,y:e+u},{x:t-l,y:e+u}].map(d=>Bn(g,d)).filter((d,p,m)=>m.findIndex(_=>Math.abs(_.x-d.x)<=hx&&Math.abs(_.y-d.y)<=hx)===p);return a.push(...h.map(d=>new fD(new Gc(d.x,d.y),s))),a.length>0?{kind:"shapes",shapes:a}:null},z9e=({x:t,y:e,width:n,height:o,radius:i,ccwRotationDegrees:r=0})=>{const s=Math.max(Math.max(n,o)/2-i,0),a=n>=o?{x:s,y:0}:{x:0,y:s},A=Bn(F9(r),a);return s<=hx?{kind:"shapes",shapes:[new fD(new Gc(t,e),i)]}:{kind:"pill",centerLine:new _D(new Gc(t-A.x,e-A.y),new Gc(t+A.x,e+A.y)),radius:i}},sjn=t=>{switch(t.shape){case"circle":return{kind:"shapes",shapes:[new fD(new Gc(t.x,t.y),t.radius)]};case"rect":return V9e({x:t.x,y:t.y,width:t.width,height:t.height,cornerRadius:t.rect_border_radius??t.corner_radius??0});case"rotated_rect":return V9e({x:t.x,y:t.y,width:t.width,height:t.height,cornerRadius:t.rect_border_radius??t.corner_radius??0,ccwRotationDegrees:t.ccw_rotation});case"pill":return z9e({x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius});case"rotated_pill":return z9e({x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius,ccwRotationDegrees:t.ccw_rotation});case"polygon":{const e=YF(t.points);return e?{kind:"shapes",shapes:[e]}:null}}},ajn=(t,e)=>{switch(t.shape){case"circle":return{kind:"shapes",shapes:[new fD(new Gc(t.x,t.y),t.outer_diameter/2)]};case"oval":case"pill":return z9e({x:t.x,y:t.y,width:t.outer_width,height:t.outer_height,radius:Math.min(t.outer_width/2,t.outer_height/2),ccwRotationDegrees:t.ccw_rotation});case"circular_hole_with_rect_pad":case"pill_hole_with_rect_pad":case"rotated_pill_hole_with_rect_pad":return V9e({x:t.x,y:t.y,width:t.rect_pad_width,height:t.rect_pad_height,cornerRadius:t.rect_border_radius??0,ccwRotationDegrees:"rect_ccw_rotation"in t?t.rect_ccw_rotation??0:0});case"hole_with_polygon_pad":{const n=t.ccw_rotation??e,o=F9(n),i=YF(t.pad_outline.map(r=>{const s=Bn(o,r);return{x:t.x+s.x,y:t.y+s.y}}));return i?{kind:"shapes",shapes:[i]}:null}}},Ajn=(t,e)=>{if(t.type==="pcb_via")return{kind:"shapes",shapes:[new fD(new Gc(t.x,t.y),t.outer_diameter/2)]};if(t.type==="pcb_smtpad")return sjn(t);if(t.type==="pcb_plated_hole")return ajn(t,t.pcb_component_id?e.get(xse(t.pcb_component_id))??0:0);let n;switch(t.shape){case"rect":n=Ese({x:t.center.x,y:t.center.y,width:t.width,height:t.height,ccwRotationDegrees:t.rotation??0});break;case"polygon":n=YF(t.points);break;case"brep":n=ijn(t.brep_shape.outer_ring.vertices);break}return n?{kind:"shapes",shapes:[n]}:null},cjn=t=>t.type==="pcb_via"?t.pcb_via_id:t.type==="pcb_smtpad"?t.pcb_smtpad_id:t.type==="pcb_plated_hole"?t.pcb_plated_hole_id:t.pcb_copper_pour_id,ljn=t=>t.type==="pcb_via"?"Via":t.type==="pcb_smtpad"?"SMT pad":t.type==="pcb_plated_hole"?"Plated hole":"Copper pour",ujn=(t,e)=>{if(e.kind==="shapes"){const r=e.shapes.every(s=>t.contains(s));return{isInside:r,clearance:r?Math.min(...e.shapes.map(s=>t.distanceTo(s)[0])):0}}const o=t.distanceTo(e.centerLine)[0]-e.radius,i=t.contains(e.centerLine)&&o>=-hx;return{isInside:i,clearance:i?Math.max(0,o):0}};function gjn(t){const e=X9(t);if(!e)return[];const n=rjn(e);if(!n)return[];const o=Y8(e,"min_board_edge_clearance")??G8.min_board_edge_clearance;if(o===void 0)return[];const i=new Set(t.filter(A=>A.type==="pcb_component").filter(A=>A.is_allowed_to_be_off_board).map(A=>xse(A.pcb_component_id))),r=t.filter(A=>A.type==="pcb_via"||A.type==="pcb_smtpad"||A.type==="pcb_plated_hole"||A.type==="pcb_copper_pour"),s=new Map(t.filter(A=>A.type==="pcb_component").map(A=>[xse(A.pcb_component_id),A.rotation])),a=[];for(const A of r){if((A.type==="pcb_smtpad"||A.type==="pcb_plated_hole")&&A.pcb_component_id&&i.has(xse(A.pcb_component_id)))continue;const c=Ajn(A,s);if(!c)continue;const{isInside:l,clearance:u}=ujn(n,c);if(l&&u+hx>=o)continue;const g=cjn(A),h=ljn(A);a.push({type:"pcb_placement_error",pcb_placement_error_id:`copper_too_close_to_board_edge_${g}`,error_type:"pcb_placement_error",message:`${h} ${g} violates copper-to-board-edge clearance (measured ${u.toFixed(3)}mm, required ${o.toFixed(3)}mm)`})}return a}function Bmt(t){return t.area()>=0}function bmt({center:t,size:e,rotationDeg:n=0}){const o=t.x,i=t.y,r=e.width/2,s=e.height/2,a=[new Gc(o-r,i-s),new Gc(o+r,i-s),new Gc(o+r,i+s),new Gc(o-r,i+s)];let A=new Ip(a);if(n){const c=F9(n,o,i),l=a.map(u=>{const g=Bn(c,{x:u.x,y:u.y});return new Gc(g.x,g.y)});A=new Ip(l)}return Bmt(A)||A.reverse(),A}function djn({board:t}){if(t.outline&&t.outline.length>0){const e=t.outline.map(o=>new Gc(o.x,o.y)),n=new Ip(e);return Bmt(n)||n.reverse(),n}return t.center&&typeof t.width=="number"&&typeof t.height=="number"?bmt({center:t.center,size:{width:t.width,height:t.height},rotationDeg:0}):null}function hjn({circuitJson:t,component:e}){if(e.source_component_id){const n=t.find(o=>o.type==="source_component"&&o.source_component_id===e.source_component_id);if(n&&"name"in n&&n.name)return n.name}return HF(t,e.pcb_component_id)}function pjn(t,e,n,o,i,r){const s=new Gc(n.x,n.y);if(!e.contains(s)){const p=e.distanceTo(s);return Array.isArray(p)?p[0]:Number(p)||0}const a=o/2,A=i/2,c=[{x:n.x-a,y:n.y-A},{x:n.x+a,y:n.y-A},{x:n.x+a,y:n.y+A},{x:n.x-a,y:n.y+A}],l=[];for(let p=0;p<4;p++){const m=(p+1)%4;l.push({x:(c[p].x+c[m].x)/2,y:(c[p].y+c[m].y)/2})}const u=F9(r,n.x,n.y),g=p=>{const m=Bn(u,p);return new Gc(m.x,m.y)},h=c.concat(l).map(g);let d=0;for(const p of h)if(!e.contains(p)){const m=e.distanceTo(p),_=Array.isArray(m)?m[0]:Number(m)||0;_>d&&(d=_)}if(d>0)return d;try{const p=YBe.intersect(t,e);let m=0;p?Array.isArray(p)?m=p.reduce((f,I)=>f+(typeof I.area=="function"?I.area():0),0):typeof p.area=="function"?m=p.area():m=0:m=0;const _=t.area();if(m>0&&m<_){const f=1-m/_,I=Math.abs(o),C=Math.abs(i);return Math.min(I,C)*f}else return .1}catch{return .1}}function mjn({componentPoly:t,boardPoly:e}){const n=e.box,o=t.box;let i=0,r=0;if(o.xmin<n.xmin?i=n.xmin-o.xmin:o.xmax>n.xmax&&(i=n.xmax-o.xmax),o.ymin<n.ymin?r=n.ymin-o.ymin:o.ymax>n.ymax&&(r=n.ymax-o.ymax),i===0&&r===0)return null;const s=i>=0?"right":"left",a=r>=0?"up":"down",A=Math.abs(Math.round(i*100)/100),c=Math.abs(Math.round(r*100)/100);return A>0&&c>0?`Try moving it ${A}mm ${s} and ${c}mm ${a} to fit within the board edge.`:A>0?`Try moving it ${A}mm ${s} to fit within the board edge.`:`Try moving it ${c}mm ${a} to fit within the board edge.`}function _jn(t){const e=t.find(r=>r.type==="pcb_board");if(!e)return[];const n=djn({board:e});if(!n)return[];const o=t.filter(r=>r.type==="pcb_component");if(o.length===0)return[];const i=[];for(const r of o){if(r.is_allowed_to_be_off_board||!r.center||typeof r.width!="number"||typeof r.height!="number"||r.width<=0||r.height<=0)continue;const s=bmt({center:r.center,size:{width:r.width,height:r.height},rotationDeg:0});if(s.area()===0||n.contains(s))continue;const A=pjn(s,n,r.center,r.width,r.height,0),c=hjn({circuitJson:t,component:r}),l=Math.round(A*100)/100,u=mjn({componentPoly:s,boardPoly:n});i.push({type:"pcb_component_outside_board_error",error_type:"pcb_component_outside_board_error",pcb_component_outside_board_error_id:`pcb_component_outside_board_${r.pcb_component_id}`,message:`Component ${c} extends outside board boundaries by ${l}mm.${u?` ${u}`:""}`,pcb_component_id:r.pcb_component_id,pcb_board_id:e.pcb_board_id,component_center:r.center,component_bounds:{min_x:s.box.xmin,max_x:s.box.xmax,min_y:s.box.ymin,max_y:s.box.ymax},subcircuit_id:r.subcircuit_id,source_component_id:r.source_component_id})}return i}var Smt=32;function Qmt({center:t,width:e,height:n,rotation:o=0}){const i=e/2,r=n/2,s=[{x:t.x-i,y:t.y-r},{x:t.x+i,y:t.y-r},{x:t.x+i,y:t.y+r},{x:t.x-i,y:t.y+r}],a=F9(o,t.x,t.y);return new Ip(s.map(A=>{const c=o?Bn(a,A):A;return new Gc(c.x,c.y)}))}function fjn({center:t,radius:e}){return new Ip(Array.from({length:Smt},(n,o)=>{const i=2*Math.PI*o/Smt;return new Gc(t.x+Math.cos(i)*e,t.y+Math.sin(i)*e)}))}function Ijn(t){return t.shape==="rect"?Qmt({center:t.center,width:t.width,height:t.height,rotation:t.rotation??0}):t.shape==="circle"?fjn({center:t.center,radius:t.radius}):t.shape==="polygon"?new Ip(t.points.map(e=>new Gc(e.x,e.y))):null}function vmt(t){return{minX:t.box.xmin,minY:t.box.ymin,maxX:t.box.xmax,maxY:t.box.ymax}}function Cjn(t,e){if(!z4(vmt(t),vmt(e)))return!1;if(t.contains(e)||e.contains(t))return!0;try{const n=YBe.intersect(t,e);return Array.isArray(n)?n.some(o=>o.area()>0):n.area()>0}catch{return!1}}function yjn(t){const e=t.filter(r=>r.type==="pcb_cutout"),n=t.filter(r=>r.type==="pcb_component");if(e.length===0||n.length===0)return[];const o=e.map(r=>({cutout:r,polygon:Ijn(r)})).filter(r=>r.polygon!==null&&r.polygon.area()>0),i=[];for(const r of n){if(!r.center||r.width<=0||r.height<=0)continue;const s=Qmt({center:r.center,width:r.width,height:r.height});for(const{cutout:a,polygon:A}of o){if(a.pcb_component_id===r.pcb_component_id||!Cjn(s,A))continue;const c=HF(t,r.pcb_component_id),l=a.pcb_cutout_id;i.push({type:"pcb_placement_error",pcb_placement_error_id:`component_over_cutout_${r.pcb_component_id}_${l}`,error_type:"pcb_placement_error",message:`Component ${c} overlaps with pcb_cutout [${l}]`,subcircuit_id:r.subcircuit_id})}}return i}var xjn=t=>"pcb_component_id"in t&&t.pcb_component_id?t.pcb_component_id:Yh(t),Ejn=(t,e)=>{if("pcb_component_id"in e&&e.pcb_component_id){const n=t.find(r=>r.type==="pcb_component"&&r.pcb_component_id===e.pcb_component_id),o=n?.type==="pcb_component"?t.find(r=>r.type==="source_component"&&r.source_component_id===n.source_component_id):void 0;return`component ${o?.type==="source_component"&&o.name?o.name:HF(t,e.pcb_component_id)}`}return e.type==="pcb_via"?`via ${e.pcb_via_id}`:`${e.type} ${Yh(e)}`};function Bjn(t){const e=Xc(t).pcb_keepout.list();if(e.length===0)return[];const n=[...OF(t),...Xc(t).pcb_via.list()],o=new Map;for(const i of e){const r=new Set(i.excluded_pcb_component_ids??[]);for(const s of n){const a="pcb_component_id"in s?s.pcb_component_id:void 0;if(a&&r.has(a)||!dx(s).some(u=>i.layers.includes(u))||YQ(s,i)>q4)continue;const l=`copper_over_keepout_${xjn(s)}_${i.pcb_keepout_id}`;o.has(l)||o.set(l,{type:"pcb_placement_error",pcb_placement_error_id:l,error_type:"pcb_placement_error",message:`Copper for ${Ejn(t,s)} overlaps ${i.description?`PCB keepout "${i.description}"`:"a PCB keepout"}`,subcircuit_id:s.subcircuit_id??i.subcircuit_id})}}return[...o.values()]}function xz(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function wmt(t,e){return xz(t,e)<=q4}function bjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=>a.type==="pcb_via");if(o.length<2)return[];const i=X9(t);n??=Y8(i,"min_via_hole_edge_to_via_hole_edge_clearance")??G8.min_via_hole_edge_to_via_hole_edge_clearance,e??=Vf(t);const r=[],s=new Set;for(let a=0;a<o.length;a++)for(let A=a+1;A<o.length;A++){const c=o[a],l=o[A];if(wmt(c,l)||!e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=xz(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+q4>=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join("_");s.has(g)||(s.add(g),r.push({type:"pcb_via_clearance_error",pcb_error_id:`same_net_vias_close_${g}`,message:`Vias ${eI(t,c.pcb_via_id)} and ${eI(t,l.pcb_via_id)} are too close together (gap: ${u.toFixed(3)}mm)`,error_type:"pcb_via_clearance_error",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function Sjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=>a.type==="pcb_via");if(o.length<2)return[];const i=X9(t);n??=Y8(i,"min_via_hole_edge_to_via_hole_edge_clearance")??G8.min_via_hole_edge_to_via_hole_edge_clearance,e??=Vf(t);const r=[],s=new Set;for(let a=0;a<o.length;a++)for(let A=a+1;A<o.length;A++){const c=o[a],l=o[A];if(wmt(c,l)||e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=xz(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+q4>=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join("_");s.has(g)||(s.add(g),r.push({type:"pcb_via_clearance_error",pcb_error_id:`different_net_vias_close_${g}`,message:`Vias ${eI(t,c.pcb_via_id)} and ${eI(t,l.pcb_via_id)} from different nets are too close together (gap: ${u.toFixed(3)}mm)`,error_type:"pcb_via_clearance_error",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function Qjn(t){const e=[],n=t.filter(a=>a.type==="source_trace"),o=t.filter(a=>a.type==="pcb_trace"),i=t.filter(a=>a.type==="pcb_port"),r=new Map(i.map(a=>[a.source_port_id,a])),s=Vf(t);for(const a of n){if(!a.connected_source_port_ids?.length||(a.connected_source_net_ids?.length??0)>0||a.connected_source_port_ids.length<2)continue;if(!o.some(c=>s.areIdsConnected(a.source_trace_id,c.pcb_trace_id))){const c=a.connected_source_port_ids.map(u=>r.get(u)).filter(u=>u!==void 0),l=Array.from(new Set(c.map(u=>u.pcb_component_id).filter(u=>u!==void 0)));e.push({type:"pcb_trace_missing_error",pcb_trace_missing_error_id:`pcb_trace_missing_${a.source_trace_id}`,error_type:"pcb_trace_missing_error",message:`Trace [${a.display_name&&!zWn(a.display_name)?a.display_name:"trace"}] is not connected (it has no PCB trace)`,source_trace_id:a.source_trace_id,pcb_component_ids:l,pcb_port_ids:c.map(u=>u.pcb_port_id)})}}return e}var Ez=1e-9;function vjn(t,e){const n=new Map,o=OF(t),i=t.filter(u=>u.type==="pcb_trace"),r=t.filter(u=>u.type==="pcb_via"),a=t.find(u=>u.type==="pcb_board")?.num_layers,c=["top",...Kk.filter(u=>u.startsWith("inner")).slice(0,a===void 0?void 0:Math.max(0,a-2)),...a===1?[]:["bottom"]],l=(u,g,h)=>{if(![h.x,h.y].every(Number.isFinite))return;const d=e.getNetConnectedToId(u);if(!d)return;const p=o.some(I=>{if(e.getNetConnectedToId(Yh(I))!==d||!dx(I).some(y=>g.includes(y)))return!1;if(h.radius===void 0)return G9e(h,I);const C={type:"pcb_via",pcb_via_id:u,x:h.x,y:h.y,outer_diameter:h.radius*2,hole_diameter:0,layers:g};return YQ(C,I)<=Ez}),m=new Set;for(const I of i)if(!(I.route_thickness_mode==="interpolated"||e.getNetConnectedToId(I.pcb_trace_id)!==d))for(let C=1;C<I.route.length;C++){const y=I.route[C-1],x=I.route[C];if(y.route_type!=="wire"||x.route_type!=="wire"||y.layer!==x.layer||!g.includes(y.layer)||!Number.isFinite(y.width)||y.width<=0||Math.hypot(y.x-x.x,y.y-x.y)<=Ez)continue;const E=h.radius===void 0?0:h.radius+y.width/2;if(Zd(h,y,x)<=E+Ez){m.add(I.pcb_trace_id);break}}const _={...h,touchesPad:p,touchingTraceIds:m},f=n.get(d)??new Map;for(const I of g){const C=f.get(I)??[];C.push(_),f.set(I,C)}n.set(d,f)};for(const u of r)!Number.isFinite(u.outer_diameter)||u.outer_diameter<=0||l(u.pcb_via_id,dx(u),{x:u.x,y:u.y,ownerTraceId:u.pcb_trace_id,radius:u.outer_diameter/2});for(const u of t)if(u.type==="pcb_trace")for(const g of u.route){if(g.route_type!=="via"||r.some(m=>Math.hypot(m.x-g.x,m.y-g.y)<=Ez&&(m.pcb_trace_id===u.pcb_trace_id||!m.pcb_trace_id&&e.areIdsConnected(m.pcb_via_id,u.pcb_trace_id))))continue;const h=c.indexOf(g.from_layer),d=c.indexOf(g.to_layer);if(h<0||d<0)continue;const p=g.outer_diameter;p!==void 0&&(!Number.isFinite(p)||p<=0)||l(u.pcb_trace_id,c.slice(Math.min(h,d),Math.max(h,d)+1),{x:g.x,y:g.y,ownerTraceId:u.pcb_trace_id,radius:p===void 0?void 0:p/2})}return n}function Pmt({point:t,width:e,ownerTrace:n,index:o,connectivity:i}){if(t.route_type!=="wire"||!Number.isFinite(e)||e<=0)return!1;const r=i.getNetConnectedToId(n.pcb_trace_id);return r?(o.get(r)?.get(t.layer)??[]).some(s=>{if(s.ownerTraceId===n.pcb_trace_id||!s.touchesPad&&![...s.touchingTraceIds].some(A=>A!==n.pcb_trace_id))return!1;const a=s.radius===void 0?0:s.radius+e/2;return Math.hypot(t.x-s.x,t.y-s.y)<=a+Ez}):!1}var Mmt=1e-9,Dmt=1e-9;function UF(t,e){return t.route_type==="wire"&&dx(e).includes(t.layer)&&G9e(t,e)}function wjn(t,e){const n=new Map;for(const o of t){if(o.route_thickness_mode==="interpolated")continue;const i=e.getNetConnectedToId(o.pcb_trace_id);if(i)for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];if(s.route_type!=="wire"||a.route_type!=="wire"||s.layer!==a.layer||Math.hypot(s.x-a.x,s.y-a.y)<=Dmt)continue;const A=n.get(i)??new Map,c=A.get(s.layer)??[];c.push({trace:o,start:s,end:a}),A.set(s.layer,c),n.set(i,A)}}return n}function Nmt(t,e){if(t.route_thickness_mode==="interpolated")return;let n=e==="start"?0:t.route.length-2;const o=e==="start"?1:-1;for(;n>=0&&n<t.route.length-1;){const i=t.route[n],r=t.route[n+1];if(i?.route_type!=="wire"||r?.route_type!=="wire"||i.layer!==r.layer)return;if(Math.hypot(i.x-r.x,i.y-r.y)>Dmt)return i.width;n+=o}}function Rmt({point:t,endpointTraceCopperWidth:e,ownerTrace:n,traceWireSegmentsByNetAndLayer:o,fullConnectivityMap:i}){if(t.route_type!=="wire")return!1;const r=i.getNetConnectedToId(n.pcb_trace_id);if(!r)return!1;const s=o.get(r)?.get(t.layer)??[];for(const a of s){if(a.trace.pcb_trace_id===n.pcb_trace_id)continue;const A=e/2+a.start.width/2+Mmt;if(Zd(t,a.start,a.end)<=A)return!0}return!1}function Tmt(t){return t.route_type==="through_pad"?{x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2}:{x:t.x,y:t.y}}function kmt(t,e,n,o){return e.some(i=>!i.pcb_port_id||i.pcb_port_id===n?!1:o.get(i.pcb_port_id)?.some(s=>UF(t,s))??!1)}function Pjn({firstPoint:t,lastPoint:e,port:n,expectedPorts:o,padMap:i}){let r;const s=t.route_type==="wire"?t:void 0,a=e.route_type==="wire"?e:void 0,A=K9e(t).includes(n.pcb_port_id),c=K9e(e).includes(n.pcb_port_id);A&&s?r=s:c&&a||kmt(t,o,n.pcb_port_id,i)&&a?r=a:kmt(e,o,n.pcb_port_id,i)&&s?r=s:s&&a?r=xz(s,n)<=xz(a,n)?s:a:s?r=s:a&&(r=a);const l=Tmt(t),u=Tmt(e);return r?{x:r.x,y:r.y}:{x:(l.x+u.x)/2,y:(l.y+u.y)/2}}function Mjn(t){const e=[],n=t.filter(C=>C.type==="pcb_port"),o=t.filter(C=>C.type==="pcb_trace"),i=t.filter(C=>C.type==="source_trace"),r=t.filter(C=>C.type==="pcb_smtpad"),s=t.filter(C=>C.type==="pcb_plated_hole"),a=new Map,A=new qne(t);let c,l;const u=()=>(c??=Vf(t),c),g=()=>(l??=wjn(o,u()),l);let h;const d=()=>(h??=vjn(t,u()),h),p=new Set;for(const C of r)C.pcb_port_id&&a.set(C.pcb_port_id,[...a.get(C.pcb_port_id)??[],C]);for(const C of s)C.pcb_port_id&&a.set(C.pcb_port_id,[...a.get(C.pcb_port_id)??[],C]);const m=new Map,_=new Map;for(const C of o){const y=new Set,x=C.route[0],E=C.route.at(-1);for(const B of[x,E])if(B)for(const[S,Q]of a)Q.some(w=>UF(B,w))&&y.add(S);m.set(C.pcb_trace_id,y);for(const B of y){const S=_.get(B)??new Set;S.add(C.pcb_trace_id),_.set(B,S)}}const f=new Map,I=C=>{const y=f.get(C.pcb_trace_id);if(y)return y;const x=new Set,E=[C.pcb_trace_id];for(;E.length>0;){const S=E.pop();if(!x.has(S)){x.add(S);for(const Q of A.getAllTracesConnectedToTrace(S))x.has(Q.pcb_trace_id)||E.push(Q.pcb_trace_id);for(const Q of m.get(S)??[])for(const w of _.get(Q)??[])x.has(w)||E.push(w)}}const B=o.filter(S=>x.has(S.pcb_trace_id));for(const S of B)f.set(S.pcb_trace_id,B);return B};for(const C of o){if(C.route.length===0)continue;const y=C.route[0],x=C.route[C.route.length-1],E=i.find(Q=>Q.source_trace_id===C.source_trace_id),B=E?n.filter(Q=>E.connected_source_port_ids?.includes(Q.source_port_id)):[];for(let Q=1;Q<C.route.length-1;Q++){const w=C.route[Q-1],M=C.route[Q],k=C.route[Q+1];if(M.route_type==="via"){const R=w.route_type==="wire",F=k.route_type==="wire";if(R&&F){const O=Math.abs(w.x-M.x)<.01&&Math.abs(w.y-M.y)<.01,U=Math.abs(k.x-M.x)<.01&&Math.abs(k.y-M.y)<.01;if(!O||!U){const Y=P9e(t,C.pcb_trace_id);e.push({type:"pcb_trace_error",message:`Via in trace [${Y}] is misaligned at position {x: ${M.x}, y: ${M.y}}.`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`misaligned_via_${C.pcb_trace_id}_${Q}`,pcb_component_ids:[],pcb_port_ids:[]})}}}}const S=P9e(t,C.pcb_trace_id);if(E&&B.length>0){if(p.has(E.source_trace_id))continue;p.add(E.source_trace_id)}for(const Q of B){if(!Q.pcb_port_id)continue;const w=a.get(Q.pcb_port_id);if(!w?.length||I(C).some(F=>m.get(F.pcb_trace_id)?.has(Q.pcb_port_id)))continue;const k=w.some(F=>UF(y,F)),R=w.some(F=>UF(x,F));if(!k&&!R){const F=pse(t,Q.pcb_port_id).replace("pcb_port",""),O=w[0].type.replace(/pcb_/,""),U=Pjn({firstPoint:y,lastPoint:x,port:Q,expectedPorts:B,padMap:a});e.push({type:"pcb_trace_error",message:`Trace [${S}] is missing a connection to ${O}${F}`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`missing_connection_${C.pcb_trace_id}_${Q.pcb_port_id}`,center:U,pcb_component_ids:[],pcb_port_ids:[Q.pcb_port_id]})}}if(B.length===0){let Q=!1,w=!1;for(const W of a.values())W.some(te=>UF(y,te))&&(Q=!0),W.some(te=>UF(x,te))&&(w=!0);const M=Q?void 0:Nmt(C,"start"),k=w?void 0:Nmt(C,"end"),R=M!==void 0&&Rmt({point:y,endpointTraceCopperWidth:M,ownerTrace:C,traceWireSegmentsByNetAndLayer:g(),fullConnectivityMap:u()}),F=k!==void 0&&Rmt({point:x,endpointTraceCopperWidth:k,ownerTrace:C,traceWireSegmentsByNetAndLayer:g(),fullConnectivityMap:u()}),O=Q||R||M!==void 0&&Pmt({point:y,width:M,ownerTrace:C,index:d(),connectivity:u()}),U=w||F||k!==void 0&&Pmt({point:x,width:k,ownerTrace:C,index:d(),connectivity:u()}),Y=y.route_type==="wire"&&x.route_type==="wire"&&y.layer===x.layer&&Math.hypot(y.x-x.x,y.y-x.y)<=Mmt;!O&&y.route_type==="wire"&&e.push({type:"pcb_trace_error",message:`Trace [${S}] has disconnected endpoint at (${y.x.toFixed(2)}, ${y.y.toFixed(2)})`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${C.pcb_trace_id}_start`,center:{x:y.x,y:y.y},pcb_component_ids:[],pcb_port_ids:[]}),!U&&x.route_type==="wire"&&!(Y&&!O)&&e.push({type:"pcb_trace_error",message:`Trace [${S}] has disconnected endpoint at (${x.x.toFixed(2)}, ${x.y.toFixed(2)})`,source_trace_id:E?.source_trace_id||C.source_trace_id||`!${C.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:C.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${C.pcb_trace_id}_end`,center:{x:x.x,y:x.y},pcb_component_ids:[],pcb_port_ids:[]})}}return e}function Djn(t){if(t.outline&&t.outline.length>0)return t.outline.map(e=>({x:e.x,y:e.y}));if(t.center&&typeof t.width=="number"&&typeof t.height=="number"){const e=t.center.x,n=t.center.y,o=t.width/2,i=t.height/2;return[{x:e-o,y:n-i},{x:e+o,y:n-i},{x:e+o,y:n+i},{x:e-o,y:n+i}]}return null}function Njn(t,e={}){const n=[],o=X9(t);if(!o)return n;const i=e.margin??Y8(o,"min_board_edge_clearance")??G8.min_board_edge_clearance,r=Djn(o);if(!r)return n;const s=Xc(t).pcb_trace.list();for(const a of s)if(!(a.route.length<2))for(let A=0;A<a.route.length-1;A++){const c=a.route[A],l=a.route[A+1];if(c.route_type!=="wire"||l.route_type!=="wire")continue;const u="width"in c?c.width:"width"in l?l.width:.1,g={x:c.x,y:c.y},h={x:l.x,y:l.y};let d=Number.POSITIVE_INFINITY;for(let m=0;m<r.length;m++){const _=r[m],f=r[(m+1)%r.length],I=xV(g,h,_,f);I<d&&(d=I)}const p=u/2+i;if(d<p){const m={type:"pcb_trace_error",error_type:"pcb_trace_error",pcb_trace_error_id:`trace_too_close_to_board_${a.pcb_trace_id}_segment_${A}`,message:`Trace too close to board edge (${d.toFixed(3)}mm < ${p.toFixed(3)}mm required, margin: ${i}mm)`,pcb_trace_id:a.pcb_trace_id,source_trace_id:a.source_trace_id||"",center:{x:(g.x+h.x)/2,y:(g.y+h.y)/2},pcb_component_ids:[],pcb_port_ids:[]};n.push(m)}}return n}var J9e=t=>t.type==="pcb_courtyard_circle"||t.type==="pcb_courtyard_outline"||t.type==="pcb_courtyard_polygon"||t.type==="pcb_courtyard_rect",Rjn=t=>{switch(t.type){case"pcb_courtyard_circle":return t.pcb_courtyard_circle_id;case"pcb_courtyard_outline":return t.pcb_courtyard_outline_id;case"pcb_courtyard_polygon":return t.pcb_courtyard_polygon_id;case"pcb_courtyard_rect":return t.pcb_courtyard_rect_id}},Fmt=t=>{const e={type:"pcb_keepout",pcb_keepout_id:Rjn(t),layers:[t.layer]};if(t.type==="pcb_courtyard_circle")return{...e,shape:"circle",center:t.center,radius:t.radius};const n=t.type==="pcb_courtyard_rect"?k9e({x:t.center.x,y:t.center.y,width:t.width,height:t.height,ccwRotation:t.ccw_rotation??0}):t.type==="pcb_courtyard_polygon"?t.points:t.outline;return{...e,shape:"outline",outline:n,stroke_width:0}};function Lmt(t){return J9e(t)?[t.layer]:dx(t)}function Tjn(t,e){return t.length===0||e.length===0?!0:t.some(n=>e.includes(n))}function kjn(t,e){const n=Lmt(t),o=Lmt(e);if(!Tjn(n,o))return!1;if(t.type==="pcb_smtpad"&&e.type==="pcb_smtpad")return YQ(t,e)<=0;if(t.type==="pcb_plated_hole"&&J9e(e))return YQ(t,Fmt(e))<=0;if(J9e(t)&&e.type==="pcb_plated_hole")return YQ(e,Fmt(t))<=0;const i=H8([t]),r=H8([e]);return z4(i,r)}var W9e=t=>t.type==="pcb_courtyard_circle"||t.type==="pcb_courtyard_outline"||t.type==="pcb_courtyard_polygon"||t.type==="pcb_courtyard_rect",Hmt=t=>t.type==="pcb_hole"||t.type==="pcb_plated_hole",Omt=(t,e)=>{if("pcb_port_id"in e&&e.pcb_port_id)return fse(t,e.pcb_port_id);const n=Yh(e),o=VWn(t,n);return o==="element"?`[${n}]`:o};function Fjn(t){const e=[],n=Vf(t),o=Xc(t).pcb_smtpad.list(),i=Xc(t).pcb_plated_hole.list(),r=Xc(t).pcb_hole.list(),s=t.filter(W9e),a=new Map;for(const c of o){const l=c.pcb_component_id||`standalone_pad_${Yh(c)}`;a.has(l)||a.set(l,{component_id:l,elements:[]}),a.get(l).elements.push(c)}for(const c of i){const l=c.pcb_component_id||`standalone_plated_hole_${Yh(c)}`;a.has(l)||a.set(l,{component_id:l,elements:[]}),a.get(l).elements.push(c)}for(const c of r){const l=c.pcb_component_id||`standalone_hole_${Yh(c)}`;a.has(l)||a.set(l,{component_id:l,elements:[c]})}for(const c of s){const l=c.pcb_component_id;a.has(l)||a.set(l,{component_id:l,elements:[]}),a.get(l).elements.push(c)}for(const[c,l]of a)l.elements.length>0&&(l.bounds=H8(l.elements));const A=Array.from(a.values());for(let c=0;c<A.length;c++)for(let l=c+1;l<A.length;l++){const u=A[c],g=A[l];if(!(!u.bounds||!g.bounds)&&z4(u.bounds,g.bounds))for(const h of u.elements)for(const d of g.elements){const p=Yh(h),m=Yh(d);if(!((W9e(h)||W9e(d))&&!Hmt(h)&&!Hmt(d))&&!(h.type==="pcb_smtpad"&&d.type==="pcb_smtpad"&&n.areIdsConnected(p,m))&&kjn(h,d)){const _=Omt(t,h),f=Omt(t,d),I={type:"pcb_footprint_overlap_error",pcb_error_id:`pcb_footprint_overlap_${p}_${m}`,error_type:"pcb_footprint_overlap_error",message:`${h.type} ${_} overlaps with ${d.type} ${f}`,pcb_component_ids:[h.pcb_component_id,d.pcb_component_id].filter(C=>!!C)};(h.type==="pcb_smtpad"||d.type==="pcb_smtpad")&&(I.pcb_smtpad_ids=[],h.type==="pcb_smtpad"&&I.pcb_smtpad_ids.push(p),d.type==="pcb_smtpad"&&I.pcb_smtpad_ids.push(m)),(h.type==="pcb_plated_hole"||d.type==="pcb_plated_hole")&&(I.pcb_plated_hole_ids=[],h.type==="pcb_plated_hole"&&I.pcb_plated_hole_ids.push(p),d.type==="pcb_plated_hole"&&I.pcb_plated_hole_ids.push(m)),(h.type==="pcb_hole"||d.type==="pcb_hole")&&(I.pcb_hole_ids=[],h.type==="pcb_hole"&&I.pcb_hole_ids.push(p),d.type==="pcb_hole"&&I.pcb_hole_ids.push(m)),e.push(I)}}}return e}var Ljn=new Set(["pcb_courtyard_circle","pcb_courtyard_outline","pcb_courtyard_polygon","pcb_courtyard_pill","pcb_courtyard_rect"]);function Hjn(t){const e=new Set(t.filter(o=>o.type==="source_manually_placed_via").map(o=>o.source_manually_placed_via_id)),n=new Set(t.filter(o=>Ljn.has(o.type)).flatMap(o=>"pcb_component_id"in o&&o.pcb_component_id?[o.pcb_component_id]:[]));return t.filter(o=>o.type==="pcb_component").filter(o=>!n.has(o.pcb_component_id)&&(!o.source_component_id||!e.has(o.source_component_id))).map(o=>{const i=o.source_component_id?t.find(s=>s.type==="source_component"&&s.source_component_id===o.source_component_id):void 0,r=i?.type==="source_component"?i.name:HF(t,o.pcb_component_id);return{type:"pcb_component_missing_courtyard_warning",pcb_component_missing_courtyard_warning_id:`pcb_component_missing_courtyard_warning_${o.pcb_component_id}`,warning_type:"pcb_component_missing_courtyard_warning",message:`${r} has no courtyard`,pcb_component_id:o.pcb_component_id,source_component_id:o.source_component_id,subcircuit_id:o.subcircuit_id}})}var Ojn=1.6,Gmt=t=>t.route_type==="through_pad"?t.start:{x:t.x,y:t.y},Gjn=t=>{if(t.trace_length!==void 0)return t.trace_length;let e=0;for(let n=0;n<t.route.length;n++){const o=t.route[n];if(!o)continue;if(o.route_type==="via"){e+=Ojn;continue}const i=t.route[n+1];if(!i)continue;const r=Gmt(o),s=Gmt(i);e+=Math.hypot(s.x-r.x,s.y-r.y)}return e},Yjn=t=>{const e=new Set;for(const n of t.route)n.route_type==="wire"&&(n.start_pcb_port_id&&e.add(n.start_pcb_port_id),n.end_pcb_port_id&&e.add(n.end_pcb_port_id));return e},Ujn=t=>{const e=t.filter(c=>c.type==="source_trace"),n=t.filter(c=>c.type==="pcb_trace"),o=t.filter(c=>c.type==="pcb_port"),i=new Map(e.map(c=>[c.source_trace_id,c])),r=new Map;for(const c of o){if(!c.source_port_id)continue;const l=r.get(c.source_port_id)??new Set;l.add(c.pcb_port_id),r.set(c.source_port_id,l)}const s=new Map;for(const c of n){if(!c.source_trace_id)continue;const l=s.get(c.source_trace_id)??[];l.push(c),s.set(c.source_trace_id,l)}const a=new Map;for(const c of e){if(c.connected_source_port_ids.length!==2)continue;const l=c.connected_source_port_ids.map(g=>r.get(g));if(l.some(g=>!g?.size))continue;const u=new Set((s.get(c.source_trace_id)??[]).filter(g=>{const h=Yjn(g);return l.every(d=>[...d].some(p=>h.has(p)))}).map(g=>g.pcb_trace_id));u.size>0&&a.set(c.source_trace_id,u)}const A=[];for(const c of n){if(!c.source_trace_id)continue;const l=i.get(c.source_trace_id);if(!l)continue;const u=l.max_length;if(typeof u!="number")continue;const g=a.get(l.source_trace_id);if(g&&!g.has(c.pcb_trace_id))continue;const h=Gjn(c);h<=u||A.push({type:"pcb_trace_too_long_warning",pcb_trace_too_long_warning_id:`pcb_trace_too_long_warning_${c.pcb_trace_id}`,warning_type:"pcb_trace_too_long_warning",message:`PCB trace is ${h.toFixed(2)}mm long, exceeding the ${u}mm maximum`,pcb_trace_id:c.pcb_trace_id,source_trace_id:l.source_trace_id,source_net_id:l.connected_source_net_ids[0],actual_trace_length:h,maximum_trace_length:u,subcircuit_id:c.subcircuit_id??l.subcircuit_id})}return A},Kjn=t=>{const e=t.filter(r=>r.type==="source_trace"),n=t.filter(r=>r.type==="pcb_trace"),o=t.filter(r=>r.type==="pcb_port"),i=[];for(const r of e){const s=r.max_via_count;if(typeof s!="number")continue;const a=n.filter(l=>l.source_trace_id===r.source_trace_id);if(a.length===0)continue;const A=a.reduce((l,u)=>l+u.route.filter(g=>g.route_type==="via").length,0);if(A<=s)continue;const c=o.filter(l=>l.source_port_id!==void 0&&r.connected_source_port_ids.includes(l.source_port_id));i.push({type:"pcb_trace_error",pcb_trace_error_id:`max_via_count_exceeded_${r.source_trace_id}`,error_type:"pcb_trace_error",message:`PCB trace uses ${A} vias, exceeding the ${s} maximum`,pcb_trace_id:a[0].pcb_trace_id,source_trace_id:r.source_trace_id,pcb_component_ids:[...new Set(c.map(l=>l.pcb_component_id).filter(l=>l!==void 0))],pcb_port_ids:c.map(l=>l.pcb_port_id),subcircuit_id:a[0].subcircuit_id??r.subcircuit_id})}return i};function Vjn(t,{connMap:e,minClearance:n}={}){const o=OF(t);if(o.length<2)return[];const i=X9(t);n??=Y8(i,"min_pad_edge_to_pad_edge_clearance")??G8.min_pad_edge_to_pad_edge_clearance,e??=Vf(t);const r=new yz({objects:o,getBounds:Z9,getId:a=>Yh(a)}),s=new Map;for(const a of o){const A=Yh(a),c=r.getObjectsInBounds(Z9(a),n);for(const l of c){const u=Yh(l);if(A===u||!dx(a).some(_=>dx(l).includes(_))||e.areIdsConnected(A,u))continue;const g=[A,u].sort().join("_"),h=YQ(a,l);if(h+q4>=n)continue;const d=Y9e(a),p=Y9e(l),m={type:"pcb_pad_pad_clearance_error",pcb_pad_pad_clearance_error_id:`pad_pad_clearance_${g}`,error_type:"pcb_pad_pad_clearance_error",message:`Pads ${eI(t,A)} and ${eI(t,u)} are too close (clearance: ${hQ(h)}, minimum: ${hQ(n)})`,pcb_pad_ids:[A,u],minimum_clearance:n,actual_clearance:h,center:{x:(d.x+p.x)/2,y:(d.y+p.y)/2}};s.has(g)||s.set(g,m)}}return Array.from(s.values())}function zjn(t,{connMap:e,minClearance:n}={}){const o=OF(t),i=xmt(t);if(o.length===0||i.length===0)return[];const r=X9(t);n??=Y8(r,"min_trace_to_pad_edge_clearance")??G8.min_trace_to_pad_edge_clearance,e??=Vf(t);const s=new yz({objects:o,getBounds:Z9,getId:c=>Yh(c)}),a=new Map,A=new Set;for(const c of i){const l=s.getObjectsInBounds(GF(c),n+c.thickness/2);for(const u of l){const g=Yh(u);if(!dx(u).includes(c.layer)||e.areIdsConnected(c.pcb_trace_id,g))continue;const h=`${g}_${c.pcb_trace_id}`,{gap:d,center:p}=Ise(c,u);if(Cse(d)){a.delete(h),A.add(h);continue}if(A.has(h)||d+q4>=n)continue;const m={type:"pcb_pad_trace_clearance_error",pcb_pad_trace_clearance_error_id:`pad_trace_clearance_${h}`,error_type:"pcb_pad_trace_clearance_error",message:`Pad ${eI(t,g)} and trace ${eI(t,c.pcb_trace_id)} are too close (clearance: ${hQ(d)}, minimum: ${hQ(n)})`,pcb_pad_id:g,pcb_trace_id:c.pcb_trace_id,minimum_clearance:n,actual_clearance:d,center:p},_=a.get(h);(!_||d<_.gap)&&a.set(h,{error:m,gap:d})}}return Array.from(a.values()).map(({error:c})=>c)}function Jjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(A=>A.type==="pcb_via"),i=xmt(t);if(o.length===0||i.length===0)return[];const r=X9(t);n??=Y8(r,"min_trace_to_pad_edge_clearance")??G8.min_trace_to_pad_edge_clearance,e??=Vf(t);const s=new Map,a=new Set;for(const A of o)for(const c of i){if(!dx(A).includes(c.layer)||e.areIdsConnected(c.pcb_trace_id,A.pcb_via_id))continue;const l=`${A.pcb_via_id}_${c.pcb_trace_id}`,{gap:u,center:g}=Ise(c,A);if(Cse(u)){s.delete(l),a.add(l);continue}if(a.has(l)||u+q4>=n)continue;const h={type:"pcb_via_trace_clearance_error",pcb_via_trace_clearance_error_id:`via_trace_clearance_${l}`,error_type:"pcb_via_trace_clearance_error",message:`Via ${eI(t,A.pcb_via_id)} and trace ${eI(t,c.pcb_trace_id)} are too close (clearance: ${hQ(u)}, minimum: ${hQ(n)})`,pcb_via_id:A.pcb_via_id,pcb_trace_id:c.pcb_trace_id,minimum_clearance:n,actual_clearance:u,center:g},d=s.get(l);(!d||u<d.gap)&&s.set(l,{error:h,gap:u})}return Array.from(s.values()).map(({error:A})=>A)}function Wjn(t,{connMap:e,minClearance:n}={}){const o=t.filter(c=>c.type==="pcb_via"),i=OF(t);if(o.length===0||i.length===0)return[];const r=X9(t),s=n??Y8(r,"min_pad_edge_to_pad_edge_clearance")??G8.min_pad_edge_to_pad_edge_clearance;e??=Vf(t);const a=new yz({objects:i,getBounds:Z9,getId:Yh}),A=[];for(const c of o){const l=a.getObjectsInBounds(Z9(c),s);for(const u of l){const g=Yh(u);if(!dx(c).some(d=>dx(u).includes(d))||e.areIdsConnected(c.pcb_via_id,g))continue;const h=YQ(c,u);h+q4>=s||A.push({type:"pcb_pad_pad_clearance_error",pcb_pad_pad_clearance_error_id:`via_pad_clearance_${c.pcb_via_id}_${g}`,error_type:"pcb_pad_pad_clearance_error",message:`Via ${eI(t,c.pcb_via_id)} and pad ${eI(t,g)} are too close (clearance: ${hQ(h)}, minimum: ${hQ(s)})`,pcb_pad_ids:[c.pcb_via_id,g],minimum_clearance:s,actual_clearance:h,center:qWn(c,u)})}}return A}function jjn(t){const e=X9(t);if(e&&"is_via_in_pad_allowed"in e&&e.is_via_in_pad_allowed===!0)return[];const n=t.filter(A=>A.type==="pcb_via"),o=OF(t);if(n.length===0||o.length===0)return[];const i=Vf(t),r=new Map(o.map((A,c)=>[Yh(A),c])),s=new yz({objects:o,getBounds:Z9,getId:Yh}),a=[];for(const A of n){const c=s.getObjectsInBounds(Z9(A));for(const l of c){const u=Yh(l),g=dx(A),h=dx(l);if(!g.some(m=>h.includes(m))||i.areIdsConnected(A.pcb_via_id,u)||YQ(A,l)>0)continue;const d=r.get(u)??0,p=JWn(t,l,d);a.push({type:"pcb_placement_error",pcb_placement_error_id:`via_in_pad_${A.pcb_via_id}_${u}`,error_type:"pcb_placement_error",message:`Via copper at (${A.x.toFixed(2)}mm, ${A.y.toFixed(2)}mm) overlaps ${p}`,subcircuit_id:A.subcircuit_id??l.subcircuit_id})}}return a}var Ymt=t=>{const e=new Set;for(const n of t)n.type==="pcb_pad_trace_clearance_error"&&typeof n.pcb_trace_id=="string"&&typeof n.pcb_pad_id=="string"&&e.add(`overlap_${n.pcb_trace_id}_${n.pcb_pad_id}`),n.type==="pcb_via_trace_clearance_error"&&typeof n.pcb_trace_id=="string"&&typeof n.pcb_via_id=="string"&&e.add(`overlap_${n.pcb_trace_id}_${n.pcb_via_id}`);return t.filter(n=>{const o=n;return!(o.type==="pcb_trace_error"&&typeof o.pcb_trace_error_id=="string"&&e.has(o.pcb_trace_error_id))})};function $jn(t){const e=[],n=t.filter(a=>"source_component_id"in a&&(a.type==="source_component"||a.type.startsWith("source_simple_"))),o=t.filter(a=>a.type==="source_port"),i=t.filter(a=>a.type==="source_trace"),r=new Set;for(const a of i)for(const A of a.connected_source_port_ids??[])r.add(A);const s=new Map;for(const a of n)"internally_connected_source_port_ids"in a&&a.internally_connected_source_port_ids&&s.set(a.source_component_id,a.internally_connected_source_port_ids);for(const a of s.values())for(const A of a)if(A.some(c=>r.has(c)))for(const c of A)r.add(c);for(const a of o)if(a.must_be_connected===!0&&!r.has(a.source_port_id)){const c=n.find(l=>l.source_component_id===a.source_component_id)?.name??"Unknown";e.push({type:"source_pin_must_be_connected_error",source_pin_must_be_connected_error_id:`source_pin_must_be_connected_error_${a.source_port_id}`,error_type:"source_pin_must_be_connected_error",message:`Port ${a.name} on ${c} must be connected but is floating`,source_component_id:a.source_component_id??"",source_port_id:a.source_port_id,subcircuit_id:a.subcircuit_id})}return e}function qjn(t){const e=t.filter(r=>r.type==="source_component"&&(r.ftype==="simple_push_button"||r.ftype==="simple_switch")),n=t.filter(r=>r.type==="source_port"),o=t.filter(r=>r.type==="schematic_port"),i=[];for(const r of e){const s=o.flatMap(c=>{const l=n.find(u=>u.source_port_id===c.source_port_id&&u.source_component_id===r.source_component_id);return l?[l]:[]});if(s.length!==2)continue;const a=s[0].subcircuit_connectivity_map_key,A=s[1].subcircuit_connectivity_map_key;a&&a===A&&i.push(dV.parse({type:"source_component_misconfigured_error",message:`Switch ${r.name} has both schematic contacts connected to the same net. Check internallyConnectedPins and the footprint pin mapping.`,source_component_ids:[r.source_component_id],source_port_ids:s.map(c=>c.source_port_id),is_fatal:!0}))}return i}var Xjn=["must_be_connected","provides_power","requires_power","provides_ground","requires_ground","provides_voltage","requires_voltage","do_not_connect","include_in_board_pinout","can_use_internal_pullup","is_using_internal_pullup","needs_external_pullup","can_use_internal_pulldown","is_using_internal_pulldown","needs_external_pulldown","can_use_open_drain","is_using_open_drain","can_use_push_pull","is_using_push_pull","should_have_decoupling_capacitor","recommended_decoupling_capacitor_capacitance","is_configured_for_i2c_sda","is_configured_for_i2c_scl","is_configured_for_spi_mosi","is_configured_for_spi_miso","is_configured_for_spi_sck","is_configured_for_spi_cs","is_configured_for_uart_tx","is_configured_for_uart_rx","supports_i2c_sda","supports_i2c_scl","supports_spi_mosi","supports_spi_miso","supports_spi_sck","supports_spi_cs","supports_uart_tx","supports_uart_rx"];function Zjn(t){return Xjn.some(e=>t[e]!==void 0)}function e$n(t){const e=[],n=Xc(t),o=n.source_component.list(),i=n.source_port.list(),r=new Map;for(const s of i){if(!s.source_component_id)continue;const a=r.get(s.source_component_id)??[];a.push(s),r.set(s.source_component_id,a)}for(const s of o){if(s.ftype!=="simple_chip")continue;const a=r.get(s.source_component_id)??[];a.length===0||a.some(c=>Zjn(c))||e.push({type:"source_component_pins_underspecified_warning",source_component_pins_underspecified_warning_id:`source_component_pins_underspecified_warning_${s.source_component_id}`,warning_type:"source_component_pins_underspecified_warning",message:`All pins on ${s.name} are underspecified (no pinAttributes set)`,source_component_id:s.source_component_id,source_port_ids:a.map(c=>c.source_port_id),subcircuit_id:a[0]?.subcircuit_id})}return e}var Umt=(t,e)=>t.ftype==="simple_chip"&&e.filter(n=>n.do_not_connect!==!0).length>=2;function t$n(t){const e=[],n=Xc(t),o=n.source_component.list(),i=n.source_port.list(),r=new Map;for(const s of i){if(!s.source_component_id)continue;const a=r.get(s.source_component_id)??[];a.push(s),r.set(s.source_component_id,a)}for(const s of o){const a=r.get(s.source_component_id)??[];!Umt(s,a)||a.some(c=>c.requires_power===!0)||e.push({type:"source_no_power_pin_defined_warning",source_no_power_pin_defined_warning_id:`source_no_power_pin_defined_warning_${s.source_component_id}`,warning_type:"source_no_power_pin_defined_warning",message:`${s.name} has no pin with requires_power=true`,source_component_id:s.source_component_id,source_port_ids:a.map(c=>c.source_port_id),subcircuit_id:a[0]?.subcircuit_id})}return e}function n$n(t){const e=[],n=Xc(t),o=n.source_component.list(),i=n.source_port.list(),r=new Map;for(const s of i){if(!s.source_component_id)continue;const a=r.get(s.source_component_id)??[];a.push(s),r.set(s.source_component_id,a)}for(const s of o){const a=r.get(s.source_component_id)??[];!Umt(s,a)||a.some(c=>c.requires_ground===!0)||e.push({type:"source_no_ground_pin_defined_warning",source_no_ground_pin_defined_warning_id:`source_no_ground_pin_defined_warning_${s.source_component_id}`,warning_type:"source_no_ground_pin_defined_warning",message:`${s.name} has no pin with requires_ground=true`,source_component_id:s.source_component_id,source_port_ids:a.map(c=>c.source_port_id),subcircuit_id:a[0]?.subcircuit_id})}return e}var o$n=.2,Kmt=3,i$n=1e-9;function r$n(t){const e=t.filter(a=>a.type==="schematic_component"),n=t.filter(a=>a.type==="schematic_port"),o=t.filter(a=>a.type==="source_component"),i=new Map(o.map(a=>[a.source_component_id,a])),r=new Map;for(const a of n){if(!a.schematic_component_id)continue;const A=r.get(a.schematic_component_id)??[];A.push(a),r.set(a.schematic_component_id,A)}const s=[];for(const a of e){if(!a.is_box_with_pins||a.size.height<=0)continue;const A=(r.get(a.schematic_component_id)??[]).filter(I=>I.side_of_component==="left"||I.side_of_component==="right");if(A.length<2)continue;const c=A.map(I=>I.center.y),l=Math.max(...c),u=Math.min(...c),g=a.center.y+a.size.height/2,h=a.center.y-a.size.height/2,p=(a.pin_spacing??o$n)*Kmt,m={top:g-l,bottom:u-h},f=(a.source_component_id?i.get(a.source_component_id):void 0)?.name??a.schematic_component_id;for(const I of["top","bottom"]){const C=m[I];if(C<=p+i$n||C<=0)continue;const y=I==="top"?"above":"below",x=`excessive_${I}_padding`;s.push({type:"schematic_component_styling_warning",schematic_component_styling_warning_id:`schematic_component_styling_warning_${a.schematic_component_id}_${x}`,warning_type:"schematic_component_styling_warning",message:`${f} has excessive empty space ${y} its pins (${C.toFixed(2)}mm, more than ${Kmt} pin spacings)`,schematic_component_id:a.schematic_component_id,styling_issue_type:x,schematic_port_ids:A.map(E=>E.schematic_port_id),source_component_id:a.source_component_id,schematic_sheet_id:a.schematic_sheet_id,subcircuit_id:a.subcircuit_id})}}return s}var s$n=t=>/^unnamed_[a-z0-9_-]+\d+$/i.test(t),a$n=(t,e)=>{const{center:n,size:o}=e,i=1e-9;return t.position.x>=n.x-o.width/2-i&&t.position.x<=n.x+o.width/2+i&&t.position.y>=n.y-o.height/2-i&&t.position.y<=n.y+o.height/2+i};function A$n(t){const e=t.filter(A=>A.type==="schematic_component"),n=t.filter(A=>A.type==="source_component"),o=t.filter(A=>A.type==="schematic_text"),i=new Map(n.map(A=>[A.source_component_id,A])),r=new Map,s=[];for(const A of o){if(!A.schematic_component_id){A.schematic_symbol_id&&s.push(A);continue}const c=r.get(A.schematic_component_id)??new Set;c.add(A.text.trim()),r.set(A.schematic_component_id,c)}const a=[];for(const A of e){if(!A.source_component_id)continue;const c=i.get(A.source_component_id);if(!c)continue;const l=new Set([c.name,c.display_name].map(p=>p?.trim()).filter(p=>!!p)),u=[...l].find(p=>!s$n(p)),g=r.get(A.schematic_component_id),h=[...l].some(p=>g?.has(p))||s.some(p=>l.has(p.text.trim())&&a$n(p,A));if(u&&h)continue;const d=u??"Schematic component";a.push({type:"schematic_component_styling_warning",schematic_component_styling_warning_id:`schematic_component_styling_warning_${A.schematic_component_id}_missing_reference_designator_text`,warning_type:"schematic_component_styling_warning",message:`${d} is missing schematic reference designator text. For a custom symbol, add name="{REFDES}" inside the symbol.`,schematic_component_id:A.schematic_component_id,styling_issue_type:"missing_reference_designator_text",source_component_id:A.source_component_id,schematic_sheet_id:A.schematic_sheet_id,subcircuit_id:A.subcircuit_id})}return a}var KF=1e-9,c$n=t=>t.display_pin_label??`pin ${t.pin_number}`;function l$n(t){const e=t.filter(a=>a.type==="schematic_component"),n=t.filter(a=>a.type==="schematic_port"),o=t.filter(a=>a.type==="source_component"),i=new Map(o.map(a=>[a.source_component_id,a])),r=new Map;for(const a of n){if(!a.schematic_component_id)continue;const A=r.get(a.schematic_component_id)??[];A.push(a),r.set(a.schematic_component_id,A)}const s=[];for(const a of e){if(a.is_box_with_pins===!1||a.size.width<=0||a.size.height<=0)continue;const A=a.center.x-a.size.width/2,c=a.center.x+a.size.width/2,l=a.center.y-a.size.height/2,u=a.center.y+a.size.height/2,h=(r.get(a.schematic_component_id)??[]).filter(C=>C.side_of_component==="left"||C.side_of_component==="right"?C.center.y<l-KF||C.center.y>u+KF:C.side_of_component==="top"||C.side_of_component==="bottom"?C.center.x<A-KF||C.center.x>c+KF:!1).sort((C,y)=>{const x=C.side_of_component==="left"||C.side_of_component==="right",E=y.side_of_component==="left"||y.side_of_component==="right";return x&&E?y.center.y-C.center.y:!x&&!E?C.center.x-y.center.x:x?-1:1});if(h.length===0)continue;const d=Math.max(a.size.height,...h.filter(C=>C.side_of_component==="left"||C.side_of_component==="right").map(C=>2*Math.abs(C.center.y-a.center.y))),p=Math.max(a.size.width,...h.filter(C=>C.side_of_component==="top"||C.side_of_component==="bottom").map(C=>2*Math.abs(C.center.x-a.center.x))),m=[];d>a.size.height+KF&&m.push(`increase schHeight to at least ${d.toFixed(2)}mm`),p>a.size.width+KF&&m.push(`increase schWidth to at least ${p.toFixed(2)}mm`);const f=(a.source_component_id?i.get(a.source_component_id):void 0)?.name??a.schematic_component_id,I=h.map(c$n).join(", ");s.push({type:"schematic_component_styling_warning",schematic_component_styling_warning_id:`schematic_component_styling_warning_${a.schematic_component_id}_ports_outside_body`,warning_type:"schematic_component_styling_warning",message:`${f} has schematic pins outside its body (${I}); ${m.join(" and ")}`,schematic_component_id:a.schematic_component_id,styling_issue_type:"ports_outside_body",schematic_port_ids:h.map(C=>C.schematic_port_id),source_component_id:a.source_component_id,schematic_sheet_id:a.schematic_sheet_id,subcircuit_id:a.subcircuit_id})}return s}function Bse(t,e){const n=new Map,o=new Map;for(const c of t){const l=Yh(c);o.set(l,c),"pcb_component_id"in c&&c.pcb_component_id&&n.set(l,c.pcb_component_id)}const i=e.flatMap(c=>c.type==="pcb_footprint_overlap_error"?c.related_errors??[c]:[c]),r=new Map,s=new Map;for(const c of i){let l;if(c.type==="pcb_footprint_overlap_error"){if(c.pcb_keepout_ids?.length)continue;const h=c,d=[...c.pcb_smtpad_ids??[],...c.pcb_plated_hole_ids??[],...c.pcb_hole_ids??[]];if(d.some(p=>!n.has(p)))continue;l=h.pcb_component_ids??d.map(p=>n.get(p))}else if(c.type==="pcb_pad_pad_clearance_error"){if(c.pcb_pad_ids.some(h=>!n.has(h)))continue;l=c.pcb_pad_ids.map(h=>n.get(h))}else if(c.type==="pcb_courtyard_overlap_error")l=c.pcb_component_ids;else continue;if(l=[...new Set(l)].sort(),l.length!==2)continue;const u=JSON.stringify(l);s.set(c,u);const g=r.get(u)??[];g.push(c),r.set(u,g)}const a=new Map;for(const[c,l]of r){const u=l.filter(f=>f.type==="pcb_footprint_overlap_error");if(l.length<2||u.length===0)continue;const g=JSON.parse(c),h=g.map(f=>{const I=o.get(f),C=I?.type==="pcb_component"?o.get(I.source_component_id):void 0;return C?.type==="source_component"?C.name:f}),p=[[u.length,"footprint overlap"],[l.filter(f=>f.type==="pcb_pad_pad_clearance_error").length,"pad clearance violation"],[l.filter(f=>f.type==="pcb_courtyard_overlap_error").length,"courtyard conflict"]].filter(([f])=>f>0).map(([f,I])=>`${f} ${I}${f===1?"":"s"}`),m={type:"pcb_footprint_overlap_error",error_type:"pcb_footprint_overlap_error",pcb_error_id:`pcb_component_overlap_${g.join("_")}`,pcb_component_ids:g,message:`${h.join(" overlaps ")}: ${p.join(", ")}. Move the components apart.`,related_errors:l};l.some(f=>f.is_fatal)&&(m.is_fatal=!0);const _=new Set;for(const f of l)if(f.type==="pcb_footprint_overlap_error")for(const I of[...f.pcb_smtpad_ids??[],...f.pcb_plated_hole_ids??[],...f.pcb_hole_ids??[]])_.add(I);else if(f.type==="pcb_pad_pad_clearance_error")for(const I of f.pcb_pad_ids)_.add(I);for(const[f,I]of[["pcb_smtpad_ids","pcb_smtpad"],["pcb_plated_hole_ids","pcb_plated_hole"],["pcb_hole_ids","pcb_hole"]]){const C=[..._].filter(y=>o.get(y)?.type===I).sort();C.length&&(m[f]=C)}a.set(c,m)}const A=new Set;return i.flatMap(c=>{const l=s.get(c),u=l===void 0?void 0:a.get(l);return!u||l===void 0?[c]:A.has(l)?[]:(A.add(l),[u])})}function u$n(t){const e=new Map,n=s=>{let a=s;for(;e.has(a)&&e.get(a)!==a;)a=e.get(a);for(;e.has(s)&&e.get(s)!==a;){const A=e.get(s);e.set(s,a),s=A}return a},o=s=>{if(s.length<2)return;const a=n(s[0]);for(const A of s.slice(1))e.set(n(A),a)},i=new Map;for(const s of t){if(s.type==="source_net"&&s.name.trim()){const a=i.get(s.name)??[];a.push(s),i.set(s.name,a)}if(s.type==="source_trace"&&o([...s.connected_source_net_ids.map(a=>`net:${a}`),...s.connected_source_port_ids.map(a=>`port:${a}`)]),s.type==="source_component_internal_connection"&&o(s.source_port_ids.map(a=>`port:${a}`)),s.type==="source_component")for(const a of s.internally_connected_source_port_ids??[])o(a.map(A=>`port:${A}`))}const r=[];for(const[s,a]of i){const A=new Set(a.map(l=>n(`net:${l.source_net_id}`)));if(A.size<2)continue;const c=a.map(l=>l.source_net_id).sort();r.push({type:"source_confusing_net_name_warning",source_confusing_net_name_warning_id:`source_confusing_net_name_warning_${c[0]}`,warning_type:"source_confusing_net_name_warning",message:`Nets named "${s}" are not all connected (${A.size} separate electrical networks). Connect them or use distinct names to avoid confusion.`,source_net_ids:c,net_name:s,...a.every(l=>l.subcircuit_id===a[0].subcircuit_id)?{subcircuit_id:a[0].subcircuit_id}:{}})}return r}function g$n(t){switch(t.insertion_direction){case"from_left":return"x-";case"from_right":return"x+";case"from_top":return"y+";case"from_bottom":return"y-";case"from_above":case"from_below":return null;default:return null}}function d$n(t){if(t.insertion_direction)return g$n(t);if(!t.center||!t.cable_insertion_center)return null;const e=t.cable_insertion_center.x-t.center.x,n=t.cable_insertion_center.y-t.center.y;return Math.abs(e)<1e-6&&Math.abs(n)<1e-6?null:Math.abs(e)>=Math.abs(n)?e>=0?"x+":"x-":n>=0?"y+":"y-"}function h$n(t,e){if(!t.center)return null;const n=[{direction:"x-",distance:t.center.x-e.minX},{direction:"x+",distance:e.maxX-t.center.x},{direction:"y-",distance:t.center.y-e.minY},{direction:"y+",distance:e.maxY-t.center.y}];return n.sort((o,i)=>o.distance-i.distance),n[0]?.direction??null}function Vmt(t){const e=t.find(r=>r.type==="pcb_board");if(!e)return[];const n=(()=>{try{return BWn(e)}catch{return null}})();if(!n)return[];const o=[],i=t.filter(r=>r.type==="pcb_component");for(const r of i){const s=d$n(r),a=h$n(r,n);if(!s||!a||s===a)continue;const A=HF(t,r.pcb_component_id);o.push({type:"pcb_connector_not_in_accessible_orientation_warning",warning_type:"pcb_connector_not_in_accessible_orientation_warning",pcb_connector_not_in_accessible_orientation_warning_id:`pcb_connector_not_in_accessible_orientation_warning_${r.pcb_component_id}`,message:`${A} is facing ${s} but should face ${a} so the connector is accessible from the board edge`,pcb_component_id:r.pcb_component_id,source_component_id:r.source_component_id,pcb_board_id:e.pcb_board_id,facing_direction:s,recommended_facing_direction:a,subcircuit_id:r.subcircuit_id})}return o}function zmt(t){if(t.type==="pcb_courtyard_rect"){const e=t.width/2,n=t.height/2,o=[{x:-e,y:-n},{x:+e,y:-n},{x:+e,y:+n},{x:-e,y:+n}],i=(t.ccw_rotation??0)*Math.PI/180,r=Math.cos(i),s=Math.sin(i);return o.map(({x:a,y:A})=>({x:t.center.x+a*r-A*s,y:t.center.y+a*s+A*r}))}return t.type==="pcb_courtyard_circle"?Array.from({length:32},(n,o)=>{const i=2*Math.PI*o/32;return{x:t.center.x+t.radius*Math.cos(i),y:t.center.y+t.radius*Math.sin(i)}}):t.outline}function Jmt(t,e){const n=t.find(i=>i.type==="pcb_component"&&i.pcb_component_id===e);if(n?.type!=="pcb_component")return e;const o=t.find(i=>i.type==="source_component"&&i.source_component_id===n.source_component_id);return o?.type==="source_component"&&o.name?o.name:e}function p$n(t,e){if(t.some(n=>nD(n,e))||e.some(n=>nD(n,t)))return!0;for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];for(let r=0;r<e.length;r++){const s=e[r],a=e[(r+1)%e.length];if(X1(o,i,s,a))return!0}}return!1}function m$n(t){const e=t.filter(r=>r.type==="pcb_courtyard_rect"||r.type==="pcb_courtyard_circle"||r.type==="pcb_courtyard_outline"),n=new Map;for(const r of e){const s=r.pcb_component_id;n.has(s)||n.set(s,[]),n.get(s).push(r)}const o=Array.from(n.keys()),i=[];for(let r=0;r<o.length;r++)for(let s=r+1;s<o.length;s++){const a=o[r],A=o[s];let c=!1;e:for(const l of n.get(a))for(const u of n.get(A)){if("layer"in l&&"layer"in u&&l.layer!==u.layer)continue;const g=zmt(l),h=zmt(u);if(p$n(g,h)){c=!0;break e}}c&&i.push({type:"pcb_courtyard_overlap_error",pcb_error_id:`pcb_courtyard_overlap_${a}_${A}`,error_type:"pcb_courtyard_overlap_error",message:`Courtyard of ${Jmt(t,a)} overlaps with courtyard of ${Jmt(t,A)}`,pcb_component_ids:[a,A]})}return i}var _$n=t=>t.type==="pcb_courtyard_circle"||t.type==="pcb_courtyard_outline"||t.type==="pcb_courtyard_polygon"||t.type==="pcb_courtyard_rect",f$n=(t,e)=>{if(e.type==="pcb_courtyard_circle"){const o=t.x-e.center.x,i=t.y-e.center.y;return o*o+i*i<=e.radius*e.radius}if(e.type==="pcb_courtyard_rect"){const o=-1*(e.ccw_rotation??0)*Math.PI/180,i=t.x-e.center.x,r=t.y-e.center.y,s=i*Math.cos(o)-r*Math.sin(o),a=i*Math.sin(o)+r*Math.cos(o);return Math.abs(s)<=e.width/2&&Math.abs(a)<=e.height/2}const n=e.type==="pcb_courtyard_polygon"?e.points:e.outline;return nD(t,n)},I$n=(t,e)=>{const n=t.find(i=>i.type==="pcb_component"&&i.pcb_component_id===e),o=t.find(i=>i.type==="source_component"&&i.source_component_id===n?.source_component_id);return(o&&"name"in o?o.name:void 0)??HF(t,e)};function C$n(t){const e=t.filter(A=>A.type==="source_component"&&A.ftype==="simple_test_point"),n=new Set(e.map(A=>A.source_component_id)),o=new Map(e.map(A=>[A.source_component_id,A.name])),i=t.filter(A=>A.type==="pcb_component"&&n.has(A.source_component_id)),r=t.filter(_$n),s=[],a=new Set;for(const A of i)for(const c of r){if(c.pcb_component_id===A.pcb_component_id||c.layer!==A.layer||!f$n(A.center,c))continue;const l=`${A.pcb_component_id}:${c.pcb_component_id}`;if(a.has(l))continue;a.add(l);const u=o.get(A.source_component_id)??"Test point",g=I$n(t,c.pcb_component_id);s.push({type:"pcb_placement_error",pcb_placement_error_id:`testpoint_in_courtyard_${A.pcb_component_id}_${c.pcb_component_id}`,error_type:"pcb_placement_error",message:`Test point ${u} is not accessible because it is inside the courtyard of ${g}`,subcircuit_id:A.subcircuit_id})}return s}async function Wmt(t,{consolidateOverlaps:e=!0}={}){const n=[...gjn(t),...jjn(t),..._jn(t),...yjn(t),...Bjn(t),...Fjn(t),...Hjn(t),...Vjn(t),...m$n(t),...Vmt(t),...C$n(t)];return e?Bse(t,n):n}async function y$n(t){return[...$jn(t),...u$n(t),...qjn(t)]}async function x$n(t){return[...r$n(t),...A$n(t),...l$n(t)]}async function E$n(t){return[...e$n(t),...t$n(t),...n$n(t)]}async function jmt(t){return[...WWn(t),...Qjn(t),...Ujn(t),...Kjn(t),...ojn(t),...zjn(t),...Jjn(t),...Wjn(t),...bjn(t),...Sjn(t),...Mjn(t),...Njn(t)]}var $mt=()=>({minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),QD=(t,e,n)=>{t.minX=Math.min(t.minX,e),t.maxX=Math.max(t.maxX,e),t.minY=Math.min(t.minY,n),t.maxY=Math.max(t.maxY,n)},vD=(t,e,n,o,i)=>{QD(t,e-o/2,n-i/2),QD(t,e+o/2,n+i/2)},qmt=t=>Number.isFinite(t.minX)&&Number.isFinite(t.maxX)&&Number.isFinite(t.minY)&&Number.isFinite(t.maxY),B$n=t=>t.find(e=>e.type==="pcb_component"),b$n=(t,e)=>e?t.filter(n=>"pcb_component_id"in n&&n.pcb_component_id===e):[],S$n=t=>{switch(t){case"from_left":case"from_x_neg":return"left";case"from_right":case"from_x_pos":return"right";case"from_top":case"from_y_pos":case"from_front":return"top";case"from_bottom":case"from_y_neg":case"from_back":return"bottom";case"from_above":case"from_z_pos":return"above";case"from_below":case"from_z_neg":return"below";default:return}},Q$n=t=>{if("insertion_direction"in t)return typeof t.insertion_direction=="string"?t.insertion_direction:void 0},v$n=(t,e)=>{const n=$mt();for(const o of t){if(o.type==="pcb_smtpad"){if("points"in o)for(const i of o.points)QD(n,i.x,i.y);else"x"in o&&"y"in o&&"width"in o&&"height"in o?vD(n,o.x,o.y,o.width,o.height):"x"in o&&"y"in o&&"radius"in o&&vD(n,o.x,o.y,o.radius*2,o.radius*2);continue}if(o.type==="pcb_plated_hole"){"outer_width"in o&&"outer_height"in o?vD(n,o.x,o.y,o.outer_width,o.outer_height):"outer_diameter"in o&&vD(n,o.x,o.y,o.outer_diameter,o.outer_diameter);continue}if(o.type==="pcb_hole"){"hole_diameter"in o?vD(n,o.x,o.y,o.hole_diameter,o.hole_diameter):"hole_width"in o&&"hole_height"in o&&vD(n,o.x,o.y,o.hole_width,o.hole_height);continue}if(o.type==="pcb_silkscreen_path"){for(const i of o.route)QD(n,i.x,i.y);continue}o.type==="pcb_component"&&vD(n,o.center.x,o.center.y,o.width,o.height)}return qmt(n)?n:e},w$n=(t,e)=>{const n=$mt();for(const o of t){if(o.type==="pcb_smtpad"&&("x"in o&&"y"in o&&QD(n,o.x,o.y),"points"in o))for(const i of o.points)QD(n,i.x,i.y);o.type==="pcb_plated_hole"&&o.pcb_port_id&&QD(n,o.x,o.y)}return qmt(n)?n:e},P$n=t=>{const e=B$n(t);if(!e)return{x:0,y:0,side:"bottom"};const n={minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2},o=b$n(t,e.pcb_component_id),i=v$n(o,n),r=w$n(o,n),s={left:r.minX-i.minX,right:i.maxX-r.maxX,top:i.maxY-r.maxY,bottom:r.minY-i.minY},a=Object.entries(s).sort((d,p)=>p[1]-d[1])[0]?.[0]??"bottom",A=S$n(Q$n(e))??a,c=i.maxX-i.minX,l=i.maxY-i.minY,u=Math.max(.4,Math.min(c,l)*.08),g=(i.minX+i.maxX)/2,h=(i.minY+i.maxY)/2;return A==="above"||A==="below"?{x:g,y:h,side:A,pcbComponentId:e.pcb_component_id}:A==="top"?{x:g,y:i.maxY+u,side:A,pcbComponentId:e.pcb_component_id}:A==="left"?{x:i.minX-u,y:h,side:A,pcbComponentId:e.pcb_component_id}:A==="right"?{x:i.maxX+u,y:h,side:A,pcbComponentId:e.pcb_component_id}:{x:g,y:i.minY-u,side:"bottom",pcbComponentId:e.pcb_component_id}};function U8(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var j9e={exports:{}},Xmt;function M$n(){return Xmt||(Xmt=1,(function(t,e){(function(n){t.exports=n()})(function(){return(function n(o,i,r){function s(c,l){if(!i[c]){if(!o[c]){var u=typeof U8=="function"&&U8;if(!l&&u)return u(c,!0);if(a)return a(c,!0);throw new Error("Cannot find module '"+c+"'")}l=i[c]={exports:{}},o[c][0].call(l.exports,function(g){var h=o[c][1][g];return s(h||g)},l,l.exports,n,o,i,r)}return i[c].exports}for(var a=typeof U8=="function"&&U8,A=0;A<r.length;A++)s(r[A]);return s})({1:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d=n("crypto");function p(x,E){E=f(x,E);var B;return(B=E.algorithm!=="passthrough"?d.createHash(E.algorithm):new y).write===void 0&&(B.write=B.update,B.end=B.update),C(E,B).dispatch(x),B.update||B.end(""),B.digest?B.digest(E.encoding==="buffer"?void 0:E.encoding):(x=B.read(),E.encoding!=="buffer"?x.toString(E.encoding):x)}(i=o.exports=p).sha1=function(x){return p(x)},i.keys=function(x){return p(x,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},i.MD5=function(x){return p(x,{algorithm:"md5",encoding:"hex"})},i.keysMD5=function(x){return p(x,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var m=d.getHashes?d.getHashes().slice():["sha1","md5"],_=(m.push("passthrough"),["buffer","hex","binary","base64"]);function f(x,E){var B={};if(B.algorithm=(E=E||{}).algorithm||"sha1",B.encoding=E.encoding||"hex",B.excludeValues=!!E.excludeValues,B.algorithm=B.algorithm.toLowerCase(),B.encoding=B.encoding.toLowerCase(),B.ignoreUnknown=E.ignoreUnknown===!0,B.respectType=E.respectType!==!1,B.respectFunctionNames=E.respectFunctionNames!==!1,B.respectFunctionProperties=E.respectFunctionProperties!==!1,B.unorderedArrays=E.unorderedArrays===!0,B.unorderedSets=E.unorderedSets!==!1,B.unorderedObjects=E.unorderedObjects!==!1,B.replacer=E.replacer||void 0,B.excludeKeys=E.excludeKeys||void 0,x===void 0)throw new Error("Object argument required.");for(var S=0;S<m.length;++S)m[S].toLowerCase()===B.algorithm.toLowerCase()&&(B.algorithm=m[S]);if(m.indexOf(B.algorithm)===-1)throw new Error('Algorithm "'+B.algorithm+'"  not supported. supported values: '+m.join(", "));if(_.indexOf(B.encoding)===-1&&B.algorithm!=="passthrough")throw new Error('Encoding "'+B.encoding+'"  not supported. supported values: '+_.join(", "));return B}function I(x){if(typeof x=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(x))!=null}function C(x,E,B){B=B||[];function S(Q){return E.update?E.update(Q,"utf8"):E.write(Q,"utf8")}return{dispatch:function(Q){return this["_"+((Q=x.replacer?x.replacer(Q):Q)===null?"null":typeof Q)](Q)},_object:function(Q){var w,M=Object.prototype.toString.call(Q),k=/\[object (.*)\]/i.exec(M);if(k=(k=k?k[1]:"unknown:["+M+"]").toLowerCase(),0<=(M=B.indexOf(Q)))return this.dispatch("[CIRCULAR:"+M+"]");if(B.push(Q),a!==void 0&&a.isBuffer&&a.isBuffer(Q))return S("buffer:"),S(Q);if(k==="object"||k==="function"||k==="asyncfunction")return M=Object.keys(Q),x.unorderedObjects&&(M=M.sort()),x.respectType===!1||I(Q)||M.splice(0,0,"prototype","__proto__","constructor"),x.excludeKeys&&(M=M.filter(function(R){return!x.excludeKeys(R)})),S("object:"+M.length+":"),w=this,M.forEach(function(R){w.dispatch(R),S(":"),x.excludeValues||w.dispatch(Q[R]),S(",")});if(!this["_"+k]){if(x.ignoreUnknown)return S("["+k+"]");throw new Error('Unknown object type "'+k+'"')}this["_"+k](Q)},_array:function(Q,R){R=R!==void 0?R:x.unorderedArrays!==!1;var M=this;if(S("array:"+Q.length+":"),!R||Q.length<=1)return Q.forEach(function(F){return M.dispatch(F)});var k=[],R=Q.map(function(F){var O=new y,U=B.slice();return C(x,O,U).dispatch(F),k=k.concat(U.slice(B.length)),O.read().toString()});return B=B.concat(k),R.sort(),this._array(R,!1)},_date:function(Q){return S("date:"+Q.toJSON())},_symbol:function(Q){return S("symbol:"+Q.toString())},_error:function(Q){return S("error:"+Q.toString())},_boolean:function(Q){return S("bool:"+Q.toString())},_string:function(Q){S("string:"+Q.length+":"),S(Q.toString())},_function:function(Q){S("fn:"),I(Q)?this.dispatch("[native]"):this.dispatch(Q.toString()),x.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(Q.name)),x.respectFunctionProperties&&this._object(Q)},_number:function(Q){return S("number:"+Q.toString())},_xml:function(Q){return S("xml:"+Q.toString())},_null:function(){return S("Null")},_undefined:function(){return S("Undefined")},_regexp:function(Q){return S("regex:"+Q.toString())},_uint8array:function(Q){return S("uint8array:"),this.dispatch(Array.prototype.slice.call(Q))},_uint8clampedarray:function(Q){return S("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(Q))},_int8array:function(Q){return S("int8array:"),this.dispatch(Array.prototype.slice.call(Q))},_uint16array:function(Q){return S("uint16array:"),this.dispatch(Array.prototype.slice.call(Q))},_int16array:function(Q){return S("int16array:"),this.dispatch(Array.prototype.slice.call(Q))},_uint32array:function(Q){return S("uint32array:"),this.dispatch(Array.prototype.slice.call(Q))},_int32array:function(Q){return S("int32array:"),this.dispatch(Array.prototype.slice.call(Q))},_float32array:function(Q){return S("float32array:"),this.dispatch(Array.prototype.slice.call(Q))},_float64array:function(Q){return S("float64array:"),this.dispatch(Array.prototype.slice.call(Q))},_arraybuffer:function(Q){return S("arraybuffer:"),this.dispatch(new Uint8Array(Q))},_url:function(Q){return S("url:"+Q.toString())},_map:function(Q){return S("map:"),Q=Array.from(Q),this._array(Q,x.unorderedSets!==!1)},_set:function(Q){return S("set:"),Q=Array.from(Q),this._array(Q,x.unorderedSets!==!1)},_file:function(Q){return S("file:"),this.dispatch([Q.name,Q.size,Q.type,Q.lastModfied])},_blob:function(){if(x.ignoreUnknown)return S("[blob]");throw Error(`Hashing Blob objects is currently not supported
(see https://github.com/puleos/object-hash/issues/26)
Use "options.replacer" or "options.ignoreUnknown"
`)},_domwindow:function(){return S("domwindow")},_bigint:function(Q){return S("bigint:"+Q.toString())},_process:function(){return S("process")},_timer:function(){return S("timer")},_pipe:function(){return S("pipe")},_tcp:function(){return S("tcp")},_udp:function(){return S("udp")},_tty:function(){return S("tty")},_statwatcher:function(){return S("statwatcher")},_securecontext:function(){return S("securecontext")},_connection:function(){return S("connection")},_zlib:function(){return S("zlib")},_context:function(){return S("context")},_nodescript:function(){return S("nodescript")},_httpparser:function(){return S("httpparser")},_dataview:function(){return S("dataview")},_signal:function(){return S("signal")},_fsevent:function(){return S("fsevent")},_tlswrap:function(){return S("tlswrap")}}}function y(){return{buf:"",write:function(x){this.buf+=x},end:function(x){this.buf+=x},read:function(){return this.buf}}}i.writeToStream=function(x,E,B){return B===void 0&&(B=E,E={}),C(E=f(x,E),B).dispatch(x)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){(function(d){var p=typeof Uint8Array<"u"?Uint8Array:Array,m=43,_=47,f=48,I=97,C=65,y=45,x=95;function E(B){return B=B.charCodeAt(0),B===m||B===y?62:B===_||B===x?63:B<f?-1:B<f+10?B-f+26+26:B<C+26?B-C:B<I+26?B-I+26:void 0}d.toByteArray=function(B){var S,Q;if(0<B.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var w=B.length,w=B.charAt(w-2)==="="?2:B.charAt(w-1)==="="?1:0,M=new p(3*B.length/4-w),k=0<w?B.length-4:B.length,R=0;function F(O){M[R++]=O}for(S=0;S<k;S+=4,0)F((16711680&(Q=E(B.charAt(S))<<18|E(B.charAt(S+1))<<12|E(B.charAt(S+2))<<6|E(B.charAt(S+3))))>>16),F((65280&Q)>>8),F(255&Q);return w==2?F(255&(Q=E(B.charAt(S))<<2|E(B.charAt(S+1))>>4)):w==1&&(F((Q=E(B.charAt(S))<<10|E(B.charAt(S+1))<<4|E(B.charAt(S+2))>>2)>>8&255),F(255&Q)),M},d.fromByteArray=function(B){var S,Q,w,M,k=B.length%3,R="";function F(O){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O)}for(S=0,w=B.length-k;S<w;S+=3)Q=(B[S]<<16)+(B[S+1]<<8)+B[S+2],R+=F((M=Q)>>18&63)+F(M>>12&63)+F(M>>6&63)+F(63&M);switch(k){case 1:R=(R+=F((Q=B[B.length-1])>>2))+F(Q<<4&63)+"==";break;case 2:R=(R=(R+=F((Q=(B[B.length-2]<<8)+B[B.length-1])>>10))+F(Q>>4&63))+F(Q<<2&63)+"="}return R}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,o,i){(function(r,s,m,A,c,l,u,g,h){var d=n("base64-js"),p=n("ieee754");function m(ue,fe,pe){if(!(this instanceof m))return new m(ue,fe,pe);var ye,Me,ve,he,Qe=typeof ue;if(fe==="base64"&&Qe=="string")for(ue=(he=ue).trim?he.trim():he.replace(/^\s+|\s+$/g,"");ue.length%4!=0;)ue+="=";if(Qe=="number")ye=Y(ue);else if(Qe=="string")ye=m.byteLength(ue,fe);else{if(Qe!="object")throw new Error("First argument needs to be a number, array or string.");ye=Y(ue.length)}if(m._useTypedArrays?Me=m._augment(new Uint8Array(ye)):((Me=this).length=ye,Me._isBuffer=!0),m._useTypedArrays&&typeof ue.byteLength=="number")Me._set(ue);else if(W(he=ue)||m.isBuffer(he)||he&&typeof he=="object"&&typeof he.length=="number")for(ve=0;ve<ye;ve++)m.isBuffer(ue)?Me[ve]=ue.readUInt8(ve):Me[ve]=ue[ve];else if(Qe=="string")Me.write(ue,0,fe);else if(Qe=="number"&&!m._useTypedArrays&&!pe)for(ve=0;ve<ye;ve++)Me[ve]=0;return Me}function _(ue,fe,pe,ye){return m._charsWritten=oe((function(Me){for(var ve=[],he=0;he<Me.length;he++)ve.push(255&Me.charCodeAt(he));return ve})(fe),ue,pe,ye)}function f(ue,fe,pe,ye){return m._charsWritten=oe((function(Me){for(var ve,he,Qe=[],Pe=0;Pe<Me.length;Pe++)he=Me.charCodeAt(Pe),ve=he>>8,he=he%256,Qe.push(he),Qe.push(ve);return Qe})(fe),ue,pe,ye)}function I(ue,fe,pe){var ye="";pe=Math.min(ue.length,pe);for(var Me=fe;Me<pe;Me++)ye+=String.fromCharCode(ue[Me]);return ye}function C(ue,fe,pe,ve){ve||(_e(typeof pe=="boolean","missing or invalid endian"),_e(fe!=null,"missing offset"),_e(fe+1<ue.length,"Trying to read beyond buffer length"));var Me,ve=ue.length;if(!(ve<=fe))return pe?(Me=ue[fe],fe+1<ve&&(Me|=ue[fe+1]<<8)):(Me=ue[fe]<<8,fe+1<ve&&(Me|=ue[fe+1])),Me}function y(ue,fe,pe,ve){ve||(_e(typeof pe=="boolean","missing or invalid endian"),_e(fe!=null,"missing offset"),_e(fe+3<ue.length,"Trying to read beyond buffer length"));var Me,ve=ue.length;if(!(ve<=fe))return pe?(fe+2<ve&&(Me=ue[fe+2]<<16),fe+1<ve&&(Me|=ue[fe+1]<<8),Me|=ue[fe],fe+3<ve&&(Me+=ue[fe+3]<<24>>>0)):(fe+1<ve&&(Me=ue[fe+1]<<16),fe+2<ve&&(Me|=ue[fe+2]<<8),fe+3<ve&&(Me|=ue[fe+3]),Me+=ue[fe]<<24>>>0),Me}function x(ue,fe,pe,ye){if(ye||(_e(typeof pe=="boolean","missing or invalid endian"),_e(fe!=null,"missing offset"),_e(fe+1<ue.length,"Trying to read beyond buffer length")),!(ue.length<=fe))return ye=C(ue,fe,pe,!0),32768&ye?-1*(65535-ye+1):ye}function E(ue,fe,pe,ye){if(ye||(_e(typeof pe=="boolean","missing or invalid endian"),_e(fe!=null,"missing offset"),_e(fe+3<ue.length,"Trying to read beyond buffer length")),!(ue.length<=fe))return ye=y(ue,fe,pe,!0),2147483648&ye?-1*(4294967295-ye+1):ye}function B(ue,fe,pe,ye){return ye||(_e(typeof pe=="boolean","missing or invalid endian"),_e(fe+3<ue.length,"Trying to read beyond buffer length")),p.read(ue,fe,pe,23,4)}function S(ue,fe,pe,ye){return ye||(_e(typeof pe=="boolean","missing or invalid endian"),_e(fe+7<ue.length,"Trying to read beyond buffer length")),p.read(ue,fe,pe,52,8)}function Q(ue,fe,pe,ye,Me){if(Me||(_e(fe!=null,"missing value"),_e(typeof ye=="boolean","missing or invalid endian"),_e(pe!=null,"missing offset"),_e(pe+1<ue.length,"trying to write beyond buffer length"),ne(fe,65535)),Me=ue.length,!(Me<=pe))for(var ve=0,he=Math.min(Me-pe,2);ve<he;ve++)ue[pe+ve]=(fe&255<<8*(ye?ve:1-ve))>>>8*(ye?ve:1-ve)}function w(ue,fe,pe,ye,Me){if(Me||(_e(fe!=null,"missing value"),_e(typeof ye=="boolean","missing or invalid endian"),_e(pe!=null,"missing offset"),_e(pe+3<ue.length,"trying to write beyond buffer length"),ne(fe,4294967295)),Me=ue.length,!(Me<=pe))for(var ve=0,he=Math.min(Me-pe,4);ve<he;ve++)ue[pe+ve]=fe>>>8*(ye?ve:3-ve)&255}function M(ue,fe,pe,ye,Me){Me||(_e(fe!=null,"missing value"),_e(typeof ye=="boolean","missing or invalid endian"),_e(pe!=null,"missing offset"),_e(pe+1<ue.length,"Trying to write beyond buffer length"),le(fe,32767,-32768)),ue.length<=pe||Q(ue,0<=fe?fe:65535+fe+1,pe,ye,Me)}function k(ue,fe,pe,ye,Me){Me||(_e(fe!=null,"missing value"),_e(typeof ye=="boolean","missing or invalid endian"),_e(pe!=null,"missing offset"),_e(pe+3<ue.length,"Trying to write beyond buffer length"),le(fe,2147483647,-2147483648)),ue.length<=pe||w(ue,0<=fe?fe:4294967295+fe+1,pe,ye,Me)}function R(ue,fe,pe,ye,Me){Me||(_e(fe!=null,"missing value"),_e(typeof ye=="boolean","missing or invalid endian"),_e(pe!=null,"missing offset"),_e(pe+3<ue.length,"Trying to write beyond buffer length"),ge(fe,34028234663852886e22,-34028234663852886e22)),ue.length<=pe||p.write(ue,fe,pe,ye,23,4)}function F(ue,fe,pe,ye,Me){Me||(_e(fe!=null,"missing value"),_e(typeof ye=="boolean","missing or invalid endian"),_e(pe!=null,"missing offset"),_e(pe+7<ue.length,"Trying to write beyond buffer length"),ge(fe,17976931348623157e292,-17976931348623157e292)),ue.length<=pe||p.write(ue,fe,pe,ye,52,8)}i.Buffer=m,i.SlowBuffer=m,i.INSPECT_MAX_BYTES=50,m.poolSize=8192,m._useTypedArrays=(function(){try{var ue=new ArrayBuffer(0),fe=new Uint8Array(ue);return fe.foo=function(){return 42},fe.foo()===42&&typeof fe.subarray=="function"}catch{return!1}})(),m.isEncoding=function(ue){switch(String(ue).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},m.isBuffer=function(ue){return!(ue==null||!ue._isBuffer)},m.byteLength=function(ue,fe){var pe;switch(ue+="",fe||"utf8"){case"hex":pe=ue.length/2;break;case"utf8":case"utf-8":pe=j(ue).length;break;case"ascii":case"binary":case"raw":pe=ue.length;break;case"base64":pe=J(ue).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":pe=2*ue.length;break;default:throw new Error("Unknown encoding")}return pe},m.concat=function(ue,fe){if(_e(W(ue),`Usage: Buffer.concat(list, [totalLength])
list should be an Array.`),ue.length===0)return new m(0);if(ue.length===1)return ue[0];if(typeof fe!="number")for(Me=fe=0;Me<ue.length;Me++)fe+=ue[Me].length;for(var pe=new m(fe),ye=0,Me=0;Me<ue.length;Me++){var ve=ue[Me];ve.copy(pe,ye),ye+=ve.length}return pe},m.prototype.write=function(ue,fe,pe,ye){isFinite(fe)?isFinite(pe)||(ye=pe,pe=void 0):(Pe=ye,ye=fe,fe=pe,pe=Pe),fe=Number(fe)||0;var Me,ve,he,Qe,Pe=this.length-fe;switch((!pe||Pe<(pe=Number(pe)))&&(pe=Pe),ye=String(ye||"utf8").toLowerCase()){case"hex":Me=(function(we,Te,Re,Ee){Re=Number(Re)||0;var ke=we.length-Re;(!Ee||ke<(Ee=Number(Ee)))&&(Ee=ke),_e((ke=Te.length)%2==0,"Invalid hex string"),ke/2<Ee&&(Ee=ke/2);for(var Ce=0;Ce<Ee;Ce++){var Le=parseInt(Te.substr(2*Ce,2),16);_e(!isNaN(Le),"Invalid hex string"),we[Re+Ce]=Le}return m._charsWritten=2*Ce,Ce})(this,ue,fe,pe);break;case"utf8":case"utf-8":ve=this,he=fe,Qe=pe,Me=m._charsWritten=oe(j(ue),ve,he,Qe);break;case"ascii":case"binary":Me=_(this,ue,fe,pe);break;case"base64":ve=this,he=fe,Qe=pe,Me=m._charsWritten=oe(J(ue),ve,he,Qe);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":Me=f(this,ue,fe,pe);break;default:throw new Error("Unknown encoding")}return Me},m.prototype.toString=function(ue,fe,pe){var ye,Me,ve,he,Qe=this;if(ue=String(ue||"utf8").toLowerCase(),fe=Number(fe)||0,(pe=pe!==void 0?Number(pe):Qe.length)===fe)return"";switch(ue){case"hex":ye=(function(Pe,we,Te){var Re=Pe.length;(!we||we<0)&&(we=0),(!Te||Te<0||Re<Te)&&(Te=Re);for(var Ee="",ke=we;ke<Te;ke++)Ee+=te(Pe[ke]);return Ee})(Qe,fe,pe);break;case"utf8":case"utf-8":ye=(function(Pe,we,Te){var Re="",Ee="";Te=Math.min(Pe.length,Te);for(var ke=we;ke<Te;ke++)Pe[ke]<=127?(Re+=ie(Ee)+String.fromCharCode(Pe[ke]),Ee=""):Ee+="%"+Pe[ke].toString(16);return Re+ie(Ee)})(Qe,fe,pe);break;case"ascii":case"binary":ye=I(Qe,fe,pe);break;case"base64":Me=Qe,he=pe,ye=(ve=fe)===0&&he===Me.length?d.fromByteArray(Me):d.fromByteArray(Me.slice(ve,he));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ye=(function(Pe,we,Te){for(var Re=Pe.slice(we,Te),Ee="",ke=0;ke<Re.length;ke+=2)Ee+=String.fromCharCode(Re[ke]+256*Re[ke+1]);return Ee})(Qe,fe,pe);break;default:throw new Error("Unknown encoding")}return ye},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},m.prototype.copy=function(ue,fe,pe,ye){if(fe=fe||0,(ye=ye||ye===0?ye:this.length)!==(pe=pe||0)&&ue.length!==0&&this.length!==0){_e(pe<=ye,"sourceEnd < sourceStart"),_e(0<=fe&&fe<ue.length,"targetStart out of bounds"),_e(0<=pe&&pe<this.length,"sourceStart out of bounds"),_e(0<=ye&&ye<=this.length,"sourceEnd out of bounds"),ye>this.length&&(ye=this.length);var Me=(ye=ue.length-fe<ye-pe?ue.length-fe+pe:ye)-pe;if(Me<100||!m._useTypedArrays)for(var ve=0;ve<Me;ve++)ue[ve+fe]=this[ve+pe];else ue._set(this.subarray(pe,pe+Me),fe)}},m.prototype.slice=function(ue,fe){var pe=this.length;if(ue=U(ue,pe,0),fe=U(fe,pe,pe),m._useTypedArrays)return m._augment(this.subarray(ue,fe));for(var ye=fe-ue,Me=new m(ye,void 0,!0),ve=0;ve<ye;ve++)Me[ve]=this[ve+ue];return Me},m.prototype.get=function(ue){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(ue)},m.prototype.set=function(ue,fe){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(ue,fe)},m.prototype.readUInt8=function(ue,fe){if(fe||(_e(ue!=null,"missing offset"),_e(ue<this.length,"Trying to read beyond buffer length")),!(ue>=this.length))return this[ue]},m.prototype.readUInt16LE=function(ue,fe){return C(this,ue,!0,fe)},m.prototype.readUInt16BE=function(ue,fe){return C(this,ue,!1,fe)},m.prototype.readUInt32LE=function(ue,fe){return y(this,ue,!0,fe)},m.prototype.readUInt32BE=function(ue,fe){return y(this,ue,!1,fe)},m.prototype.readInt8=function(ue,fe){if(fe||(_e(ue!=null,"missing offset"),_e(ue<this.length,"Trying to read beyond buffer length")),!(ue>=this.length))return 128&this[ue]?-1*(255-this[ue]+1):this[ue]},m.prototype.readInt16LE=function(ue,fe){return x(this,ue,!0,fe)},m.prototype.readInt16BE=function(ue,fe){return x(this,ue,!1,fe)},m.prototype.readInt32LE=function(ue,fe){return E(this,ue,!0,fe)},m.prototype.readInt32BE=function(ue,fe){return E(this,ue,!1,fe)},m.prototype.readFloatLE=function(ue,fe){return B(this,ue,!0,fe)},m.prototype.readFloatBE=function(ue,fe){return B(this,ue,!1,fe)},m.prototype.readDoubleLE=function(ue,fe){return S(this,ue,!0,fe)},m.prototype.readDoubleBE=function(ue,fe){return S(this,ue,!1,fe)},m.prototype.writeUInt8=function(ue,fe,pe){pe||(_e(ue!=null,"missing value"),_e(fe!=null,"missing offset"),_e(fe<this.length,"trying to write beyond buffer length"),ne(ue,255)),fe>=this.length||(this[fe]=ue)},m.prototype.writeUInt16LE=function(ue,fe,pe){Q(this,ue,fe,!0,pe)},m.prototype.writeUInt16BE=function(ue,fe,pe){Q(this,ue,fe,!1,pe)},m.prototype.writeUInt32LE=function(ue,fe,pe){w(this,ue,fe,!0,pe)},m.prototype.writeUInt32BE=function(ue,fe,pe){w(this,ue,fe,!1,pe)},m.prototype.writeInt8=function(ue,fe,pe){pe||(_e(ue!=null,"missing value"),_e(fe!=null,"missing offset"),_e(fe<this.length,"Trying to write beyond buffer length"),le(ue,127,-128)),fe>=this.length||(0<=ue?this.writeUInt8(ue,fe,pe):this.writeUInt8(255+ue+1,fe,pe))},m.prototype.writeInt16LE=function(ue,fe,pe){M(this,ue,fe,!0,pe)},m.prototype.writeInt16BE=function(ue,fe,pe){M(this,ue,fe,!1,pe)},m.prototype.writeInt32LE=function(ue,fe,pe){k(this,ue,fe,!0,pe)},m.prototype.writeInt32BE=function(ue,fe,pe){k(this,ue,fe,!1,pe)},m.prototype.writeFloatLE=function(ue,fe,pe){R(this,ue,fe,!0,pe)},m.prototype.writeFloatBE=function(ue,fe,pe){R(this,ue,fe,!1,pe)},m.prototype.writeDoubleLE=function(ue,fe,pe){F(this,ue,fe,!0,pe)},m.prototype.writeDoubleBE=function(ue,fe,pe){F(this,ue,fe,!1,pe)},m.prototype.fill=function(ue,fe,pe){if(fe=fe||0,pe=pe||this.length,_e(typeof(ue=typeof(ue=ue||0)=="string"?ue.charCodeAt(0):ue)=="number"&&!isNaN(ue),"value is not a number"),_e(fe<=pe,"end < start"),pe!==fe&&this.length!==0){_e(0<=fe&&fe<this.length,"start out of bounds"),_e(0<=pe&&pe<=this.length,"end out of bounds");for(var ye=fe;ye<pe;ye++)this[ye]=ue}},m.prototype.inspect=function(){for(var ue=[],fe=this.length,pe=0;pe<fe;pe++)if(ue[pe]=te(this[pe]),pe===i.INSPECT_MAX_BYTES){ue[pe+1]="...";break}return"<Buffer "+ue.join(" ")+">"},m.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(m._useTypedArrays)return new m(this).buffer;for(var ue=new Uint8Array(this.length),fe=0,pe=ue.length;fe<pe;fe+=1)ue[fe]=this[fe];return ue.buffer};var O=m.prototype;function U(ue,fe,pe){return typeof ue!="number"?pe:fe<=(ue=~~ue)?fe:0<=ue||0<=(ue+=fe)?ue:0}function Y(ue){return(ue=~~Math.ceil(+ue))<0?0:ue}function W(ue){return(Array.isArray||function(fe){return Object.prototype.toString.call(fe)==="[object Array]"})(ue)}function te(ue){return ue<16?"0"+ue.toString(16):ue.toString(16)}function j(ue){for(var fe=[],pe=0;pe<ue.length;pe++){var ye=ue.charCodeAt(pe);if(ye<=127)fe.push(ue.charCodeAt(pe));else for(var Me=pe,ve=(55296<=ye&&ye<=57343&&pe++,encodeURIComponent(ue.slice(Me,pe+1)).substr(1).split("%")),he=0;he<ve.length;he++)fe.push(parseInt(ve[he],16))}return fe}function J(ue){return d.toByteArray(ue)}function oe(ue,fe,pe,ye){for(var Me=0;Me<ye&&!(Me+pe>=fe.length||Me>=ue.length);Me++)fe[Me+pe]=ue[Me];return Me}function ie(ue){try{return decodeURIComponent(ue)}catch{return"�"}}function ne(ue,fe){_e(typeof ue=="number","cannot write a non-number as a number"),_e(0<=ue,"specified a negative value for writing an unsigned value"),_e(ue<=fe,"value is larger than maximum value for type"),_e(Math.floor(ue)===ue,"value has a fractional component")}function le(ue,fe,pe){_e(typeof ue=="number","cannot write a non-number as a number"),_e(ue<=fe,"value larger than maximum allowed value"),_e(pe<=ue,"value smaller than minimum allowed value"),_e(Math.floor(ue)===ue,"value has a fractional component")}function ge(ue,fe,pe){_e(typeof ue=="number","cannot write a non-number as a number"),_e(ue<=fe,"value larger than maximum allowed value"),_e(pe<=ue,"value smaller than minimum allowed value")}function _e(ue,fe){if(!ue)throw new Error(fe||"Failed assertion")}m._augment=function(ue){return ue._isBuffer=!0,ue._get=ue.get,ue._set=ue.set,ue.get=O.get,ue.set=O.set,ue.write=O.write,ue.toString=O.toString,ue.toLocaleString=O.toString,ue.toJSON=O.toJSON,ue.copy=O.copy,ue.slice=O.slice,ue.readUInt8=O.readUInt8,ue.readUInt16LE=O.readUInt16LE,ue.readUInt16BE=O.readUInt16BE,ue.readUInt32LE=O.readUInt32LE,ue.readUInt32BE=O.readUInt32BE,ue.readInt8=O.readInt8,ue.readInt16LE=O.readInt16LE,ue.readInt16BE=O.readInt16BE,ue.readInt32LE=O.readInt32LE,ue.readInt32BE=O.readInt32BE,ue.readFloatLE=O.readFloatLE,ue.readFloatBE=O.readFloatBE,ue.readDoubleLE=O.readDoubleLE,ue.readDoubleBE=O.readDoubleBE,ue.writeUInt8=O.writeUInt8,ue.writeUInt16LE=O.writeUInt16LE,ue.writeUInt16BE=O.writeUInt16BE,ue.writeUInt32LE=O.writeUInt32LE,ue.writeUInt32BE=O.writeUInt32BE,ue.writeInt8=O.writeInt8,ue.writeInt16LE=O.writeInt16LE,ue.writeInt16BE=O.writeInt16BE,ue.writeInt32LE=O.writeInt32LE,ue.writeInt32BE=O.writeInt32BE,ue.writeFloatLE=O.writeFloatLE,ue.writeFloatBE=O.writeFloatBE,ue.writeDoubleLE=O.writeDoubleLE,ue.writeDoubleBE=O.writeDoubleBE,ue.fill=O.fill,ue.inspect=O.inspect,ue.toArrayBuffer=O.toArrayBuffer,ue}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,o,i){(function(r,s,d,A,c,l,u,g,h){var d=n("buffer").Buffer,p=4,m=new d(p);m.fill(0),o.exports={hash:function(_,f,I,C){for(var y=f((function(Q,w){Q.length%p!=0&&(M=Q.length+(p-Q.length%p),Q=d.concat([Q,m],M));for(var M,k=[],R=w?Q.readInt32BE:Q.readInt32LE,F=0;F<Q.length;F+=p)k.push(R.call(Q,F));return k})(_=d.isBuffer(_)?_:new d(_),C),8*_.length),f=C,x=new d(I),E=f?x.writeInt32BE:x.writeInt32LE,B=0;B<y.length;B++)E.call(x,y[B],4*B,!0);return x}}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(n,o,i){(function(r,s,d,A,c,l,u,g,h){var d=n("buffer").Buffer,p=n("./sha"),m=n("./sha256"),_=n("./rng"),f={sha1:p,sha256:m,md5:n("./md5")},I=64,C=new d(I);function y(Q,w){var M=f[Q=Q||"sha1"],k=[];return M||x("algorithm:",Q,"is not yet supported"),{update:function(R){return d.isBuffer(R)||(R=new d(R)),k.push(R),R.length,this},digest:function(R){var F=d.concat(k),F=w?(function(O,U,Y){d.isBuffer(U)||(U=new d(U)),d.isBuffer(Y)||(Y=new d(Y)),U.length>I?U=O(U):U.length<I&&(U=d.concat([U,C],I));for(var W=new d(I),te=new d(I),j=0;j<I;j++)W[j]=54^U[j],te[j]=92^U[j];return Y=O(d.concat([W,Y])),O(d.concat([te,Y]))})(M,w,F):M(F);return k=null,R?F.toString(R):F}}}function x(){var Q=[].slice.call(arguments).join(" ");throw new Error([Q,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}C.fill(0),i.createHash=function(Q){return y(Q)},i.createHmac=y,i.randomBytes=function(Q,w){if(!w||!w.call)return new d(_(Q));try{w.call(this,void 0,new d(_(Q)))}catch(M){w(M)}};var E,B=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],S=function(Q){i[Q]=function(){x("sorry,",Q,"is not implemented yet")}};for(E in B)S(B[E])}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d=n("./helpers");function p(x,E){x[E>>5]|=128<<E%32,x[14+(E+64>>>9<<4)]=E;for(var B=1732584193,S=-271733879,Q=-1732584194,w=271733878,M=0;M<x.length;M+=16){var k=B,R=S,F=Q,O=w,B=_(B,S,Q,w,x[M+0],7,-680876936),w=_(w,B,S,Q,x[M+1],12,-389564586),Q=_(Q,w,B,S,x[M+2],17,606105819),S=_(S,Q,w,B,x[M+3],22,-1044525330);B=_(B,S,Q,w,x[M+4],7,-176418897),w=_(w,B,S,Q,x[M+5],12,1200080426),Q=_(Q,w,B,S,x[M+6],17,-1473231341),S=_(S,Q,w,B,x[M+7],22,-45705983),B=_(B,S,Q,w,x[M+8],7,1770035416),w=_(w,B,S,Q,x[M+9],12,-1958414417),Q=_(Q,w,B,S,x[M+10],17,-42063),S=_(S,Q,w,B,x[M+11],22,-1990404162),B=_(B,S,Q,w,x[M+12],7,1804603682),w=_(w,B,S,Q,x[M+13],12,-40341101),Q=_(Q,w,B,S,x[M+14],17,-1502002290),B=f(B,S=_(S,Q,w,B,x[M+15],22,1236535329),Q,w,x[M+1],5,-165796510),w=f(w,B,S,Q,x[M+6],9,-1069501632),Q=f(Q,w,B,S,x[M+11],14,643717713),S=f(S,Q,w,B,x[M+0],20,-373897302),B=f(B,S,Q,w,x[M+5],5,-701558691),w=f(w,B,S,Q,x[M+10],9,38016083),Q=f(Q,w,B,S,x[M+15],14,-660478335),S=f(S,Q,w,B,x[M+4],20,-405537848),B=f(B,S,Q,w,x[M+9],5,568446438),w=f(w,B,S,Q,x[M+14],9,-1019803690),Q=f(Q,w,B,S,x[M+3],14,-187363961),S=f(S,Q,w,B,x[M+8],20,1163531501),B=f(B,S,Q,w,x[M+13],5,-1444681467),w=f(w,B,S,Q,x[M+2],9,-51403784),Q=f(Q,w,B,S,x[M+7],14,1735328473),B=I(B,S=f(S,Q,w,B,x[M+12],20,-1926607734),Q,w,x[M+5],4,-378558),w=I(w,B,S,Q,x[M+8],11,-2022574463),Q=I(Q,w,B,S,x[M+11],16,1839030562),S=I(S,Q,w,B,x[M+14],23,-35309556),B=I(B,S,Q,w,x[M+1],4,-1530992060),w=I(w,B,S,Q,x[M+4],11,1272893353),Q=I(Q,w,B,S,x[M+7],16,-155497632),S=I(S,Q,w,B,x[M+10],23,-1094730640),B=I(B,S,Q,w,x[M+13],4,681279174),w=I(w,B,S,Q,x[M+0],11,-358537222),Q=I(Q,w,B,S,x[M+3],16,-722521979),S=I(S,Q,w,B,x[M+6],23,76029189),B=I(B,S,Q,w,x[M+9],4,-640364487),w=I(w,B,S,Q,x[M+12],11,-421815835),Q=I(Q,w,B,S,x[M+15],16,530742520),B=C(B,S=I(S,Q,w,B,x[M+2],23,-995338651),Q,w,x[M+0],6,-198630844),w=C(w,B,S,Q,x[M+7],10,1126891415),Q=C(Q,w,B,S,x[M+14],15,-1416354905),S=C(S,Q,w,B,x[M+5],21,-57434055),B=C(B,S,Q,w,x[M+12],6,1700485571),w=C(w,B,S,Q,x[M+3],10,-1894986606),Q=C(Q,w,B,S,x[M+10],15,-1051523),S=C(S,Q,w,B,x[M+1],21,-2054922799),B=C(B,S,Q,w,x[M+8],6,1873313359),w=C(w,B,S,Q,x[M+15],10,-30611744),Q=C(Q,w,B,S,x[M+6],15,-1560198380),S=C(S,Q,w,B,x[M+13],21,1309151649),B=C(B,S,Q,w,x[M+4],6,-145523070),w=C(w,B,S,Q,x[M+11],10,-1120210379),Q=C(Q,w,B,S,x[M+2],15,718787259),S=C(S,Q,w,B,x[M+9],21,-343485551),B=y(B,k),S=y(S,R),Q=y(Q,F),w=y(w,O)}return Array(B,S,Q,w)}function m(x,E,B,S,Q,w){return y((E=y(y(E,x),y(S,w)))<<Q|E>>>32-Q,B)}function _(x,E,B,S,Q,w,M){return m(E&B|~E&S,x,E,Q,w,M)}function f(x,E,B,S,Q,w,M){return m(E&S|B&~S,x,E,Q,w,M)}function I(x,E,B,S,Q,w,M){return m(E^B^S,x,E,Q,w,M)}function C(x,E,B,S,Q,w,M){return m(B^(E|~S),x,E,Q,w,M)}function y(x,E){var B=(65535&x)+(65535&E);return(x>>16)+(E>>16)+(B>>16)<<16|65535&B}o.exports=function(x){return d.hash(x,p,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){o.exports=function(d){for(var p,m=new Array(d),_=0;_<d;_++)(3&_)==0&&(p=4294967296*Math.random()),m[_]=p>>>((3&_)<<3)&255;return m}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d=n("./helpers");function p(f,I){f[I>>5]|=128<<24-I%32,f[15+(I+64>>9<<4)]=I;for(var C,y,x,E=Array(80),B=1732584193,S=-271733879,Q=-1732584194,w=271733878,M=-1009589776,k=0;k<f.length;k+=16){for(var R=B,F=S,O=Q,U=w,Y=M,W=0;W<80;W++){E[W]=W<16?f[k+W]:_(E[W-3]^E[W-8]^E[W-14]^E[W-16],1);var te=m(m(_(B,5),(te=S,y=Q,x=w,(C=W)<20?te&y|~te&x:!(C<40)&&C<60?te&y|te&x|y&x:te^y^x)),m(m(M,E[W]),(C=W)<20?1518500249:C<40?1859775393:C<60?-1894007588:-899497514)),M=w,w=Q,Q=_(S,30),S=B,B=te}B=m(B,R),S=m(S,F),Q=m(Q,O),w=m(w,U),M=m(M,Y)}return Array(B,S,Q,w,M)}function m(f,I){var C=(65535&f)+(65535&I);return(f>>16)+(I>>16)+(C>>16)<<16|65535&C}function _(f,I){return f<<I|f>>>32-I}o.exports=function(f){return d.hash(f,p,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){function d(I,C){var y=(65535&I)+(65535&C);return(I>>16)+(C>>16)+(y>>16)<<16|65535&y}function p(I,C){var y,x=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),B=new Array(64);I[C>>5]|=128<<24-C%32,I[15+(C+64>>9<<4)]=C;for(var S,Q,w=0;w<I.length;w+=16){for(var M=E[0],k=E[1],R=E[2],F=E[3],O=E[4],U=E[5],Y=E[6],W=E[7],te=0;te<64;te++)B[te]=te<16?I[te+w]:d(d(d((Q=B[te-2],_(Q,17)^_(Q,19)^f(Q,10)),B[te-7]),(Q=B[te-15],_(Q,7)^_(Q,18)^f(Q,3))),B[te-16]),y=d(d(d(d(W,_(Q=O,6)^_(Q,11)^_(Q,25)),O&U^~O&Y),x[te]),B[te]),S=d(_(S=M,2)^_(S,13)^_(S,22),M&k^M&R^k&R),W=Y,Y=U,U=O,O=d(F,y),F=R,R=k,k=M,M=d(y,S);E[0]=d(M,E[0]),E[1]=d(k,E[1]),E[2]=d(R,E[2]),E[3]=d(F,E[3]),E[4]=d(O,E[4]),E[5]=d(U,E[5]),E[6]=d(Y,E[6]),E[7]=d(W,E[7])}return E}var m=n("./helpers"),_=function(I,C){return I>>>C|I<<32-C},f=function(I,C){return I>>>C};o.exports=function(I){return m.hash(I,p,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){i.read=function(d,p,m,_,w){var I,C,y=8*w-_-1,x=(1<<y)-1,E=x>>1,B=-7,S=m?w-1:0,Q=m?-1:1,w=d[p+S];for(S+=Q,I=w&(1<<-B)-1,w>>=-B,B+=y;0<B;I=256*I+d[p+S],S+=Q,B-=8);for(C=I&(1<<-B)-1,I>>=-B,B+=_;0<B;C=256*C+d[p+S],S+=Q,B-=8);if(I===0)I=1-E;else{if(I===x)return C?NaN:1/0*(w?-1:1);C+=Math.pow(2,_),I-=E}return(w?-1:1)*C*Math.pow(2,I-_)},i.write=function(d,p,m,_,f,M){var C,y,x=8*M-f-1,E=(1<<x)-1,B=E>>1,S=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,Q=_?0:M-1,w=_?1:-1,M=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(y=isNaN(p)?1:0,C=E):(C=Math.floor(Math.log(p)/Math.LN2),p*(_=Math.pow(2,-C))<1&&(C--,_*=2),2<=(p+=1<=C+B?S/_:S*Math.pow(2,1-B))*_&&(C++,_/=2),E<=C+B?(y=0,C=E):1<=C+B?(y=(p*_-1)*Math.pow(2,f),C+=B):(y=p*Math.pow(2,B-1)*Math.pow(2,f),C=0));8<=f;d[m+Q]=255&y,Q+=w,y/=256,f-=8);for(C=C<<f|y,x+=f;0<x;d[m+Q]=255&C,Q+=w,C/=256,x-=8);d[m+Q-w]|=128*M}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(n,o,i){(function(r,s,a,A,c,l,u,g,h){var d,p,m;function _(){}(r=o.exports={}).nextTick=(p=typeof window<"u"&&window.setImmediate,m=typeof window<"u"&&window.postMessage&&window.addEventListener,p?function(f){return window.setImmediate(f)}:m?(d=[],window.addEventListener("message",function(f){var I=f.source;I!==window&&I!==null||f.data!=="process-tick"||(f.stopPropagation(),0<d.length&&d.shift()())},!0),function(f){d.push(f),window.postMessage("process-tick","*")}):function(f){setTimeout(f,0)}),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=_,r.addListener=_,r.once=_,r.off=_,r.removeListener=_,r.removeAllListeners=_,r.emit=_,r.binding=function(f){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(f){throw new Error("process.chdir is not supported")}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(j9e)),j9e.exports}var D$n=M$n();const $9e=_y(D$n);var N$n={env:{}},R$n=Object.create,q9e=Object.defineProperty,T$n=Object.getOwnPropertyDescriptor,Zmt=Object.getOwnPropertyNames,k$n=Object.getPrototypeOf,F$n=Object.prototype.hasOwnProperty,nm=(t,e)=>function(){return e||(0,t[Zmt(t)[0]])((e={exports:{}}).exports,e),e.exports},e_t=(t,e)=>{for(var n in e)q9e(t,n,{get:e[n],enumerable:!0})},X9e=(t,e,n)=>(n=t!=null?R$n(k$n(t)):{},((o,i,r,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of Zmt(i))F$n.call(o,a)||a===r||q9e(o,a,{get:()=>i[a],enumerable:!(s=T$n(i,a))||s.enumerable});return o})(!e&&t&&t.__esModule?n:q9e(n,"default",{value:t,enumerable:!0}),t)),L$n=nm({"node_modules/is-buffer/index.js"(t,e){function n(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}e.exports=function(o){return o!=null&&(n(o)||(function(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),H$n=nm({"node_modules/kind-of/index.js"(t,e){var n=L$n(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return"undefined";if(i===null)return"null";if(i===!0||i===!1||i instanceof Boolean)return"boolean";if(typeof i=="string"||i instanceof String)return"string";if(typeof i=="number"||i instanceof Number)return"number";if(typeof i=="function"||i instanceof Function)return"function";if(Array.isArray!==void 0&&Array.isArray(i))return"array";if(i instanceof RegExp)return"regexp";if(i instanceof Date)return"date";var r=o.call(i);return r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":n(i)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object"}}}),O$n=nm({"node_modules/rename-keys/index.js"(t,e){(function(){function n(o,i){if(typeof i!="function")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[i(s,o[s])||s]=o[s]);return r}e!==void 0&&e.exports?e.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):window.rename=n})()}}),G$n=nm({"node_modules/deep-rename-keys/index.js"(t,e){var n=H$n(),o=O$n();e.exports=function i(r,s){var a=n(r);if(a!=="object"&&a!=="array")throw new Error("expected an object");var A=[];for(var c in a==="object"&&(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)==="object"||n(l)==="array"?A[c]=i(l,s):A[c]=l}return A}}}),Y$n=nm({"node_modules/xml-reader/node_modules/eventemitter3/index.js"(t,e){var n=Object.prototype.hasOwnProperty,o="~";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)&&c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u<g;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once&&this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p<_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p<I;p++)switch(m[p].once&&this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f<_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l&&!g.once||c&&g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h<p;h++)(g[h].fn!==A||l&&!g[h].once||c&&g[h].context!==c)&&d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]&&(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0&&(e.exports=s)}}),U$n=nm({"node_modules/xml-lexer/node_modules/eventemitter3/index.js"(t,e){var n=Object.prototype.hasOwnProperty,o="~";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)&&c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u<g;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once&&this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p<_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p<I;p++)switch(m[p].once&&this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f<_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l&&!g.once||c&&g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h<p;h++)(g[h].fn!==A||l&&!g[h].once||c&&g[h].context!==c)&&d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]&&(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0&&(e.exports=s)}}),K$n=nm({"node_modules/xml-lexer/dist/lexer.js"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=U$n(),i=function(){},r={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},s={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},a={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},A={" ":s.space,"	":s.space,"\n":s.space,"\r":s.space,"<":s.lt,">":s.gt,'"':s.quote,"'":s.quote,"=":s.equal,"/":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x="",E="",B="",S="",Q="",w="",M=function(R,F){if(E[0]!=="?"&&E[0]!=="!"){var O={type:R,value:F};c.debug&&console.log("emit:",O),C.emit("data",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()&&M(a.text,x),E="",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)==="]]>"&&(M(a.text,x.slice(0,-3)),x="",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E="",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x="",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)==="![CDATA["&&(y=r.cdata,x="",E="")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x="",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x="",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(p,s.slash,function(){Q=!0,S="",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(m,s.char,function(R){S="",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S="",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=""),x="",y=r.data}),n(_,s.char,function(R){w="",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x="",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug&&console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O<F;O++)k(R[O])},C}}}}),V$n=nm({"node_modules/xml-reader/dist/reader.js"(t,e){var n=Y$n(),o=K$n(),i=o.Type,r={element:"element",text:"text"},s=function(A){return Object.assign({name:"",type:r.element,value:"",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream&&_===l&&(l.children=[],u.parent=null),A.emitTopLevelOnly&&_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit("tag",u.name,u)),u===l&&(c.removeAllListeners("data"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u&&u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]="";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on("data",d),l=s(),u=null,g="",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:":"});var l=a(c),u=void 0;return l.on("done",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}}),bse=nm({"node_modules/binary-search-bounds/search-bounds.js"(t,e){function n(A,c,l,u,g){for(var h=g+1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)>=0?(h=d,g=d-1):u=d+1}return h}function o(A,c,l,u,g){for(var h=g+1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)>0?(h=d,g=d-1):u=d+1}return h}function i(A,c,l,u,g){for(var h=u-1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)<0?(h=d,u=d+1):g=d-1}return h}function r(A,c,l,u,g){for(var h=u-1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)<=0?(h=d,u=d+1):g=d-1}return h}function s(A,c,l,u,g){for(;u<=g;){var h=u+g>>>1,d=A[h],p=l!==void 0?l(d,c):d-c;if(p===0)return h;p<=0?u=h+1:g=h-1}return-1}function a(A,c,l,u,g,h){return typeof l=="function"?h(A,c,l,u===void 0?0:0|u,g===void 0?A.length-1:0|g):h(A,c,void 0,l===void 0?0:0|l,u===void 0?A.length-1:0|u)}e.exports={ge:function(A,c,l,u,g){return a(A,c,l,u,g,n)},gt:function(A,c,l,u,g){return a(A,c,l,u,g,o)},lt:function(A,c,l,u,g){return a(A,c,l,u,g,i)},le:function(A,c,l,u,g){return a(A,c,l,u,g,r)},eq:function(A,c,l,u,g){return a(A,c,l,u,g,s)}}}}),Z9e=nm({"node_modules/two-product/two-product.js"(t,e){e.exports=function(o,i,r){var s=o*i,a=n*o,A=a-(a-o),c=o-A,l=n*i,u=l-(l-i),g=i-u,h=c*g-(s-A*u-c*u-A*g);return r?(r[0]=h,r[1]=s,r):[h,s]};var n=+(Math.pow(2,27)+1)}}),t_t=nm({"node_modules/robust-sum/robust-sum.js"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1&&r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=o[u],m=g(p);d<m?(a=h,(l+=1)<i&&(d=g(h=n[l]))):(a=p,(u+=1)<r&&(m=g(p=o[u]))),l<i&&d<m||u>=r?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l<i&&u<r;)d<m?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=o[u]))),(y=(a=x)-(C=(I=s+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l<i;)(y=(a=x)-(C=(I=(s=h)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)<i&&(h=n[l]);for(;u<r;)(y=(a=x)-(C=(I=(s=p)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)<r&&(p=o[u]);return x&&(A[c++]=x),E&&(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),z$n=nm({"node_modules/two-sum/two-sum.js"(t,e){e.exports=function(n,o,i){var r=n+o,s=r-n,a=o-s,A=n-(r-s);return i?(i[0]=A+a,i[1]=r,i):[A+a,r]}}}),n_t=nm({"node_modules/robust-scale/robust-scale.js"(t,e){var n=Z9e(),o=z$n();e.exports=function(i,r){var s=i.length;if(s===1){var a=n(i[0],r);return a[0]?a:[a[1]]}var A=new Array(2*s),c=[.1,.1],l=[.1,.1],u=0;n(i[0],r,c),c[0]&&(A[u++]=c[0]);for(var g=1;g<s;++g){n(i[g],r,l);var h=c[1];o(h,l[0],c),c[0]&&(A[u++]=c[0]);var d=l[1],p=c[1],m=d+p,_=p-(m-d);c[1]=m,_&&(A[u++]=_)}return c[1]&&(A[u++]=c[1]),u===0&&(A[u++]=0),A.length=u,A}}}),o_t=nm({"node_modules/robust-subtract/robust-diff.js"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1&&r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],-o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=-o[u],m=g(p);d<m?(a=h,(l+=1)<i&&(d=g(h=n[l]))):(a=p,(u+=1)<r&&(m=g(p=-o[u]))),l<i&&d<m||u>=r?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=-o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l<i&&u<r;)d<m?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=-o[u]))),(y=(a=x)-(C=(I=s+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l<i;)(y=(a=x)-(C=(I=(s=h)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)<i&&(h=n[l]);for(;u<r;)(y=(a=x)-(C=(I=(s=p)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)<r&&(p=-o[u]);return x&&(A[c++]=x),E&&(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),J$n=nm({"node_modules/robust-orientation/orientation.js"(t,e){var n=Z9e(),o=t_t(),i=n_t(),r=o_t();function s(p,m,_,f){return function(I,C,y){var x=p(p(m(C[1],y[0]),m(-y[1],C[0])),p(m(I[1],C[0]),m(-C[1],I[0]))),E=p(m(I[1],y[0]),m(-y[1],I[0])),B=f(x,E);return B[B.length-1]}}function a(p,m,_,f){return function(I,C,y,x){var E=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2])))),B=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2])))),S=f(E,B);return S[S.length-1]}}function A(p,m,_,f){return function(I,C,y,x,E){var B=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),C[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),-y[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),x[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),-E[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-C[3])))),p(p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),x[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),-E[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),I[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-C[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-x[3]))))),S=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-y[3])),p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),x[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-E[3]))),p(p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),I[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),-C[3])),p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-E[3])))),Q=f(B,S);return Q[Q.length-1]}}function c(p){return(p===3?s:p===4?a:A)(o,n,i,r)}var l=c(3),u=c(4),g=[function(){return 0},function(){return 0},function(p,m){return m[0]-p[0]},function(p,m,_){var f,I=(p[1]-_[1])*(m[0]-_[0]),C=(p[0]-_[0])*(m[1]-_[1]),y=I-C;if(I>0){if(C<=0)return y;f=I+C}else{if(!(I<0)||C>=0)return y;f=-(I+C)}var x=33306690738754716e-32*f;return y>=x||y<=-x?y:l(p,m,_)},function(p,m,_,f){var I=p[0]-f[0],C=m[0]-f[0],y=_[0]-f[0],x=p[1]-f[1],E=m[1]-f[1],B=_[1]-f[1],S=p[2]-f[2],Q=m[2]-f[2],w=_[2]-f[2],M=C*B,k=y*E,R=y*x,F=I*B,O=I*E,U=C*x,Y=S*(M-k)+Q*(R-F)+w*(O-U),W=7771561172376103e-31*((Math.abs(M)+Math.abs(k))*Math.abs(S)+(Math.abs(R)+Math.abs(F))*Math.abs(Q)+(Math.abs(O)+Math.abs(U))*Math.abs(w));return Y>W||-Y>W?Y:u(p,m,_,f)}];function h(p){var m=g[p.length];return m||(m=g[p.length]=c(p.length)),m.apply(void 0,p)}function d(p,m,_,f,I,C,y){return function(x,E,B,S,Q){switch(arguments.length){case 0:case 1:return 0;case 2:return f(x,E);case 3:return I(x,E,B);case 4:return C(x,E,B,S);case 5:return y(x,E,B,S,Q)}for(var w=new Array(arguments.length),M=0;M<arguments.length;++M)w[M]=arguments[M];return p(w)}}(function(){for(;g.length<=5;)g.push(c(g.length));e.exports=d.apply(void 0,[h].concat(g));for(var p=0;p<=5;++p)e.exports[p]=g[p]})()}}),W$n=nm({"node_modules/cdt2d/lib/monotone.js"(t,e){var n=bse(),o=J$n()[3];function i(g,h,d,p,m){this.a=g,this.b=h,this.idx=d,this.lowerIds=p,this.upperIds=m}function r(g,h,d,p){this.a=g,this.b=h,this.type=d,this.idx=p}function s(g,h){var d=g.a[0]-h.a[0]||g.a[1]-h.a[1]||g.type-h.type;return d||(g.type!==0&&(d=o(g.a,g.b,h.b))?d:g.idx-h.idx)}function a(g,h){return o(g.a,g.b,h)}function A(g,h,d,p,m){for(var _=n.lt(h,p,a),f=n.gt(h,p,a),I=_;I<f;++I){for(var C=h[I],y=C.lowerIds,x=y.length;x>1&&o(d[y[x-2]],d[y[x-1]],p)>0;)g.push([y[x-1],y[x-2],m]),x-=1;y.length=x,y.push(m);var E=C.upperIds;for(x=E.length;x>1&&o(d[E[x-2]],d[E[x-1]],p)<0;)g.push([E[x-2],E[x-1],m]),x-=1;E.length=x,E.push(m)}}function c(g,h){var d;return(d=g.a[0]<h.a[0]?o(g.a,g.b,h.a):o(h.b,h.a,g.a))?d:(d=h.b[0]<g.b[0]?o(g.a,g.b,h.b):o(h.b,h.a,g.b))||g.idx-h.idx}function l(g,h,d){var p=n.le(g,d,c),m=g[p],_=m.upperIds,f=_[_.length-1];m.upperIds=[f],g.splice(p+1,0,new i(d.a,d.b,d.idx,[f],_))}function u(g,h,d){var p=d.a;d.a=d.b,d.b=p;var m=n.eq(g,d,c),_=g[m];g[m-1].upperIds=_.upperIds,g.splice(m,1)}e.exports=function(g,h){for(var d=g.length,p=h.length,m=[],_=0;_<d;++_)m.push(new r(g[_],null,0,_));for(_=0;_<p;++_){var f=h[_],I=g[f[0]],C=g[f[1]];I[0]<C[0]?m.push(new r(I,C,2,_),new r(C,I,1,_)):I[0]>C[0]&&m.push(new r(C,I,2,_),new r(I,C,1,_))}m.sort(s);for(var y=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),x=[new i([y,1],[y,0],-1,[],[])],E=[],B=(_=0,m.length);_<B;++_){var S=m[_],Q=S.type;Q===0?A(E,x,g,S.a,S.idx):Q===2?l(x,g,S):u(x,g,S)}return E}}}),j$n=nm({"node_modules/cdt2d/lib/triangulation.js"(t,e){var n=bse();function o(s,a){this.stars=s,this.edges=a}e.exports=function(s,a){for(var A=new Array(s),c=0;c<s;++c)A[c]=[];return new o(A,a)};var i=o.prototype;function r(s,a,A){for(var c=1,l=s.length;c<l;c+=2)if(s[c-1]===a&&s[c]===A)return s[c-1]=s[l-2],s[c]=s[l-1],void(s.length=l-2)}i.isConstraint=(function(){var s=[0,0];function a(A,c){return A[0]-c[0]||A[1]-c[1]}return function(A,c){return s[0]=Math.min(A,c),s[1]=Math.max(A,c),n.eq(this.edges,s,a)>=0}})(),i.removeTriangle=function(s,a,A){var c=this.stars;r(c[s],a,A),r(c[a],A,s),r(c[A],s,a)},i.addTriangle=function(s,a,A){var c=this.stars;c[s].push(a,A),c[a].push(A,s),c[A].push(s,a)},i.opposite=function(s,a){for(var A=this.stars[a],c=1,l=A.length;c<l;c+=2)if(A[c]===s)return A[c-1];return-1},i.flip=function(s,a){var A=this.opposite(s,a),c=this.opposite(a,s);this.removeTriangle(s,a,A),this.removeTriangle(a,s,c),this.addTriangle(s,c,A),this.addTriangle(a,A,c)},i.edges=function(){for(var s=this.stars,a=[],A=0,c=s.length;A<c;++A)for(var l=s[A],u=0,g=l.length;u<g;u+=2)a.push([l[u],l[u+1]]);return a},i.cells=function(){for(var s=this.stars,a=[],A=0,c=s.length;A<c;++A)for(var l=s[A],u=0,g=l.length;u<g;u+=2){var h=l[u],d=l[u+1];A<Math.min(h,d)&&a.push([A,h,d])}return a}}}),$$n=nm({"node_modules/robust-in-sphere/in-sphere.js"(t,e){var n=Z9e(),o=t_t(),i=o_t(),r=n_t();function s(d){return(d===3?a:d===4?A:d===5?c:l)(o,i,n,r)}function a(d,p,m,_){return function(f,I,C){var y=m(f[0],f[0]),x=_(y,I[0]),E=_(y,C[0]),B=m(I[0],I[0]),S=_(B,f[0]),Q=_(B,C[0]),w=m(C[0],C[0]),M=_(w,f[0]),k=_(w,I[0]),R=d(p(k,Q),p(S,x)),F=p(M,E),O=p(R,F);return O[O.length-1]}}function A(d,p,m,_){return function(f,I,C,y){var x=d(m(f[0],f[0]),m(f[1],f[1])),E=_(x,I[0]),B=_(x,C[0]),S=_(x,y[0]),Q=d(m(I[0],I[0]),m(I[1],I[1])),w=_(Q,f[0]),M=_(Q,C[0]),k=_(Q,y[0]),R=d(m(C[0],C[0]),m(C[1],C[1])),F=_(R,f[0]),O=_(R,I[0]),U=_(R,y[0]),Y=d(m(y[0],y[0]),m(y[1],y[1])),W=_(Y,f[0]),te=_(Y,I[0]),j=_(Y,C[0]),J=d(d(_(p(j,U),I[1]),d(_(p(te,k),-C[1]),_(p(O,M),y[1]))),d(_(p(te,k),f[1]),d(_(p(W,S),-I[1]),_(p(w,E),y[1])))),oe=d(d(_(p(j,U),f[1]),d(_(p(W,S),-C[1]),_(p(F,B),y[1]))),d(_(p(O,M),f[1]),d(_(p(F,B),-I[1]),_(p(w,E),C[1])))),ie=p(J,oe);return ie[ie.length-1]}}function c(d,p,m,_){return function(f,I,C,y,x){var E=d(m(f[0],f[0]),d(m(f[1],f[1]),m(f[2],f[2]))),B=_(E,I[0]),S=_(E,C[0]),Q=_(E,y[0]),w=_(E,x[0]),M=d(m(I[0],I[0]),d(m(I[1],I[1]),m(I[2],I[2]))),k=_(M,f[0]),R=_(M,C[0]),F=_(M,y[0]),O=_(M,x[0]),U=d(m(C[0],C[0]),d(m(C[1],C[1]),m(C[2],C[2]))),Y=_(U,f[0]),W=_(U,I[0]),te=_(U,y[0]),j=_(U,x[0]),J=d(m(y[0],y[0]),d(m(y[1],y[1]),m(y[2],y[2]))),oe=_(J,f[0]),ie=_(J,I[0]),ne=_(J,C[0]),le=_(J,x[0]),ge=d(m(x[0],x[0]),d(m(x[1],x[1]),m(x[2],x[2]))),_e=_(ge,f[0]),ue=_(ge,I[0]),fe=_(ge,C[0]),pe=_(ge,y[0]),ye=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),I[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),-C[2]),_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),y[2]))),d(_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),-x[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-I[2])))),d(d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),y[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),-x[2]),_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),f[2]))),d(_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-I[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-y[2]))))),Me=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-C[2])),d(_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),y[2]),_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-x[2]))),d(d(_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),f[2]),_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),-I[2])),d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-x[2])))),ve=p(ye,Me);return ve[ve.length-1]}}function l(d,p,m,_){return function(f,I,C,y,x,E){var B=d(d(m(f[0],f[0]),m(f[1],f[1])),d(m(f[2],f[2]),m(f[3],f[3]))),S=_(B,I[0]),Q=_(B,C[0]),w=_(B,y[0]),M=_(B,x[0]),k=_(B,E[0]),R=d(d(m(I[0],I[0]),m(I[1],I[1])),d(m(I[2],I[2]),m(I[3],I[3]))),F=_(R,f[0]),O=_(R,C[0]),U=_(R,y[0]),Y=_(R,x[0]),W=_(R,E[0]),te=d(d(m(C[0],C[0]),m(C[1],C[1])),d(m(C[2],C[2]),m(C[3],C[3]))),j=_(te,f[0]),J=_(te,I[0]),oe=_(te,y[0]),ie=_(te,x[0]),ne=_(te,E[0]),le=d(d(m(y[0],y[0]),m(y[1],y[1])),d(m(y[2],y[2]),m(y[3],y[3]))),ge=_(le,f[0]),_e=_(le,I[0]),ue=_(le,C[0]),fe=_(le,x[0]),pe=_(le,E[0]),ye=d(d(m(x[0],x[0]),m(x[1],x[1])),d(m(x[2],x[2]),m(x[3],x[3]))),Me=_(ye,f[0]),ve=_(ye,I[0]),he=_(ye,C[0]),Qe=_(ye,y[0]),Pe=_(ye,E[0]),we=d(d(m(E[0],E[0]),m(E[1],E[1])),d(m(E[2],E[2]),m(E[3],E[3]))),Te=_(we,f[0]),Re=_(we,I[0]),Ee=_(we,C[0]),ke=_(we,y[0]),Ce=_(we,x[0]),Le=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),I[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),y[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),f[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-I[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),C[3])),d(_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),E[3]))))),Ye=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),f[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),C[3]),_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),f[3]))),d(d(_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),-I[3]),_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),C[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),x[3]))))),tt=p(Le,Ye);return tt[tt.length-1]}}var u=[function(){return 0},function(){return 0},function(){return 0}];function g(d){var p=u[d.length];return p||(p=u[d.length]=s(d.length)),p.apply(void 0,d)}function h(d,p,m,_,f,I,C,y){return function(x,E,B,S,Q,w){switch(arguments.length){case 0:case 1:return 0;case 2:return _(x,E);case 3:return f(x,E,B);case 4:return I(x,E,B,S);case 5:return C(x,E,B,S,Q);case 6:return y(x,E,B,S,Q,w)}for(var M=new Array(arguments.length),k=0;k<arguments.length;++k)M[k]=arguments[k];return d(M)}}(function(){for(;u.length<=6;)u.push(s(u.length));e.exports=h.apply(void 0,[g].concat(u));for(var d=0;d<=6;++d)e.exports[d]=u[d]})()}}),q$n=nm({"node_modules/cdt2d/lib/delaunay.js"(t,e){var n=$$n()[4];bse();function o(i,r,s,a,A,c){var l=r.opposite(a,A);if(!(l<0)){if(A<a){var u=a;a=A,A=u,u=c,c=l,l=u}r.isConstraint(a,A)||n(i[a],i[A],i[c],i[l])<0&&s.push(a,A)}}e.exports=function(i,r){for(var s=[],a=i.length,A=r.stars,c=0;c<a;++c)for(var l=A[c],u=1;u<l.length;u+=2)if(!((p=l[u])<c)&&!r.isConstraint(c,p)){for(var g=l[u-1],h=-1,d=1;d<l.length;d+=2)if(l[d-1]===p){h=l[d];break}h<0||n(i[c],i[p],i[g],i[h])<0&&s.push(c,p)}for(;s.length>0;){for(var p=s.pop(),m=(g=-1,h=-1,l=A[c=s.pop()],1);m<l.length;m+=2){var _=l[m-1],f=l[m];_===p?h=f:f===p&&(g=_)}g<0||h<0||n(i[c],i[p],i[g],i[h])>=0||(r.flip(c,p),o(i,r,s,g,c,h),o(i,r,s,c,h,g),o(i,r,s,h,p,g),o(i,r,s,p,g,h))}}}}),X$n=nm({"node_modules/cdt2d/lib/filter.js"(t,e){var n=bse();function o(r,s,a,A,c,l,u){this.cells=r,this.neighbor=s,this.flags=A,this.constraint=a,this.active=c,this.next=l,this.boundary=u}function i(r,s){return r[0]-s[0]||r[1]-s[1]||r[2]-s[2]}e.exports=function(r,s,a){var A=(function(y,x){for(var E=y.cells(),B=E.length,S=0;S<B;++S){var Q=(te=E[S])[0],w=te[1],M=te[2];w<M?w<Q&&(te[0]=w,te[1]=M,te[2]=Q):M<Q&&(te[0]=M,te[1]=Q,te[2]=w)}E.sort(i);var k=new Array(B);for(S=0;S<k.length;++S)k[S]=0;var R=[],F=[],O=new Array(3*B),U=new Array(3*B),Y=null;x&&(Y=[]);var W=new o(E,O,U,k,R,F,Y);for(S=0;S<B;++S)for(var te=E[S],j=0;j<3;++j){Q=te[j],w=te[(j+1)%3];var J=O[3*S+j]=W.locate(w,Q,y.opposite(w,Q)),oe=U[3*S+j]=y.isConstraint(Q,w);J<0&&(oe?F.push(S):(R.push(S),k[S]=1),x&&Y.push([w,Q,-1]))}return W})(r,a);if(s===0)return a?A.cells.concat(A.boundary):A.cells;for(var c=1,l=A.active,u=A.next,g=A.flags,h=A.cells,d=A.constraint,p=A.neighbor;l.length>0||u.length>0;){for(;l.length>0;){var m=l.pop();if(g[m]!==-c){g[m]=c,h[m];for(var _=0;_<3;++_){var f=p[3*m+_];f>=0&&g[f]===0&&(d[3*m+_]?u.push(f):(l.push(f),g[f]=c))}}}var I=u;u=l,l=I,u.length=0,c=-c}var C=(function(y,x,E){for(var B=0,S=0;S<y.length;++S)x[S]===E&&(y[B++]=y[S]);return y.length=B,y})(h,g,s);return a?C.concat(A.boundary):C},o.prototype.locate=(function(){var r=[0,0,0];return function(s,a,A){var c=s,l=a,u=A;return a<A?a<s&&(c=a,l=A,u=s):A<s&&(c=A,l=s,u=a),c<0?-1:(r[0]=c,r[1]=l,r[2]=u,n.eq(this.cells,r,i))}})()}}),Z$n=nm({"node_modules/cdt2d/cdt2d.js"(t,e){var n=W$n(),o=j$n(),i=q$n(),r=X$n();function s(c){return[Math.min(c[0],c[1]),Math.max(c[0],c[1])]}function a(c,l){return c[0]-l[0]||c[1]-l[1]}function A(c,l,u){return l in c?c[l]:u}e.exports=function(c,l,u){Array.isArray(l)?(u=u||{},l=l||[]):(u=l||{},l=[]);var g=!!A(u,"delaunay",!0),h=!!A(u,"interior",!0),d=!!A(u,"exterior",!0),p=!!A(u,"infinity",!1);if(!h&&!d||c.length===0)return[];var m=n(c,l);if(g||h!==d||p){for(var _=o(c.length,(function(C){return C.map(s).sort(a)})(l)),f=0;f<m.length;++f){var I=m[f];_.addTriangle(I[0],I[1],I[2])}return g&&i(c,_),d?h?p?r(_,0,p):_.cells():r(_,1,p):r(_,-1)}return m}}});function i_t(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function r_t(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}X9e(G$n()),X9e(V$n()),new TextEncoder,(()=>{const t=new Uint8Array(4);new Uint32Array(t.buffer)[0]=1,t[0]})();var eqn=new Uint16Array([255]),tqn=(new Uint8Array(eqn.buffer)[0],new Uint16Array([255]));new Uint8Array(tqn.buffer)[0],new TextDecoder("latin1");function px(){return px=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},px.apply(null,arguments)}function Sse(t,e){return(Sse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n})(t,e)}function s_t(t){return(s_t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function a_t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a_t=function(){return!!t})()}function e7e(t){var e=typeof Map=="function"?new Map:void 0;return e7e=function(n){if(n===null||!(function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,o)}function o(){return(function(i,r,s){if(a_t())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var A=new(i.bind.apply(i,a));return s&&Sse(A,s.prototype),A})(n,arguments,s_t(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Sse(o,n)},e7e(t)}var nqn={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).

`,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).

`,3:`Passed an incorrect argument to a color function, please pass a string representation of a color.

`,4:`Couldn't generate valid rgb string from %s, it returned %s.

`,5:`Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.

`,6:`Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).

`,7:`Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).

`,8:`Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.

`,9:`Please provide a number of steps to the modularScale helper.

`,10:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.

`,11:`Invalid value passed as base to modularScale, expected number or em string but got "%s"

`,12:`Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.

`,13:`Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.

`,14:`Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.

`,15:`Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.

`,16:`You must provide a template to this method.

`,17:`You passed an unsupported selector state to this method.

`,18:`minScreen and maxScreen must be provided as stringified numbers with the same units.

`,19:`fromSize and toSize must be provided as stringified numbers with the same units.

`,20:`expects either an array of objects or a single object with the properties prop, fromSize, and toSize.

`,21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:`fontFace expects a name of a font-family.

`,24:`fontFace expects either the path to the font file(s) or a name of a local copy.

`,25:`fontFace expects localFonts to be an array.

`,26:`fontFace expects fileFormats to be an array.

`,27:`radialGradient requries at least 2 color-stops to properly render.

`,28:`Please supply a filename to retinaImage() as the first argument.

`,29:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.

`,30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation

`,32:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')

`,33:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation

`,34:`borderRadius expects a radius value as a string or number as the second argument.

`,35:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.

`,36:`Property must be a string value.

`,37:`Syntax Error at %s.

`,38:`Formula contains a function that needs parentheses at %s.

`,39:`Formula is missing closing parenthesis at %s.

`,40:`Formula has too many closing parentheses at %s.

`,41:`All values in a formula must have the same unit or be unitless.

`,42:`Please provide a number of steps to the modularScale helper.

`,43:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.

`,44:`Invalid value passed as base to modularScale, expected number or em/rem string but got %s.

`,45:`Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.

`,46:`Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.

`,47:`minScreen and maxScreen must be provided as stringified numbers with the same units.

`,48:`fromSize and toSize must be provided as stringified numbers with the same units.

`,49:`Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.

`,50:`Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.

`,51:`Expects the first argument object to have the properties prop, fromSize, and toSize.

`,52:`fontFace expects either the path to the font file(s) or a name of a local copy.

`,53:`fontFace expects localFonts to be an array.

`,54:`fontFace expects fileFormats to be an array.

`,55:`fontFace expects a name of a font-family.

`,56:`linearGradient requries at least 2 color-stops to properly render.

`,57:`radialGradient requries at least 2 color-stops to properly render.

`,58:`Please supply a filename to retinaImage() as the first argument.

`,59:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.

`,60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:`Property must be a string value.

`,62:`borderRadius expects a radius value as a string or number as the second argument.

`,63:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.

`,64:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.

`,65:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').

`,66:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.

`,67:`You must provide a template to this method.

`,68:`You passed an unsupported selector state to this method.

`,69:`Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.

`,70:`Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.

`,71:`Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.

`,72:`Passed invalid base value %s to %s(), please pass a value like "12px" or 12.

`,73:`Please provide a valid CSS variable.

`,74:`CSS variable not found and no default was provided.

`,75:`important requires a valid style object, got a %s instead.

`,76:`fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.

`,77:`remToPx expects a value in "rem" but you provided it in "%s".

`,78:`base must be set in "px" or "%" but you set it in "%s".
`};function oqn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o,i=e[0],r=[];for(o=1;o<e.length;o+=1)r.push(e[o]);return r.forEach(function(s){i=i.replace(/%[a-z]/,s)}),i}var t7=(function(t){var e,n;function o(i){var r;if(N$n.env.NODE_ENV==="production")r=t.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+i+" for more information.")||this;else{for(var s=arguments.length,a=new Array(s>1?s-1:0),A=1;A<s;A++)a[A-1]=arguments[A];r=t.call(this,oqn.apply(void 0,[nqn[i]].concat(a)))||this}return(function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c})(r)}return n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,Sse(e,n),o})(e7e(Error));function t7e(t){return Math.round(255*t)}function iqn(t,e,n){return t7e(t)+","+t7e(e)+","+t7e(n)}function Qse(t,e,n,o){if(o===void 0&&(o=iqn),e===0)return o(n,n,n);var i=(t%360+360)%360/60,r=(1-Math.abs(2*n-1))*e,s=r*(1-Math.abs(i%2-1)),a=0,A=0,c=0;i>=0&&i<1?(a=r,A=s):i>=1&&i<2?(a=s,A=r):i>=2&&i<3?(A=r,c=s):i>=3&&i<4?(A=s,c=r):i>=4&&i<5?(a=s,c=r):i>=5&&i<6&&(a=r,c=s);var l=n-r/2;return o(a+l,A+l,c+l)}var A_t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},rqn=/^#[a-fA-F0-9]{6}$/,sqn=/^#[a-fA-F0-9]{8}$/,aqn=/^#[a-fA-F0-9]{3}$/,Aqn=/^#[a-fA-F0-9]{4}$/,n7e=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,cqn=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,lqn=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,uqn=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function wD(t){if(typeof t!="string")throw new t7(3);var e=(function(g){if(typeof g!="string")return g;var h=g.toLowerCase();return A_t[h]?"#"+A_t[h]:g})(t);if(e.match(rqn))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(sqn)){var n=parseFloat((parseInt(""+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16),alpha:n}}if(e.match(aqn))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};if(e.match(Aqn)){var o=parseFloat((parseInt(""+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16),alpha:o}}var i=n7e.exec(e);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var r=cqn.exec(e.substring(0,50));if(r)return{red:parseInt(""+r[1],10),green:parseInt(""+r[2],10),blue:parseInt(""+r[3],10),alpha:parseFloat(""+r[4])>1?parseFloat(""+r[4])/100:parseFloat(""+r[4])};var s=lqn.exec(e);if(s){var a="rgb("+Qse(parseInt(""+s[1],10),parseInt(""+s[2],10)/100,parseInt(""+s[3],10)/100)+")",A=n7e.exec(a);if(!A)throw new t7(4,e,a);return{red:parseInt(""+A[1],10),green:parseInt(""+A[2],10),blue:parseInt(""+A[3],10)}}var c=uqn.exec(e.substring(0,50));if(c){var l="rgb("+Qse(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",u=n7e.exec(l);if(!u)throw new t7(4,e,l);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10),alpha:parseFloat(""+c[4])>1?parseFloat(""+c[4])/100:parseFloat(""+c[4])}}throw new t7(5)}function UQ(t){return(function(e){var n,o=e.red/255,i=e.green/255,r=e.blue/255,s=Math.max(o,i,r),a=Math.min(o,i,r),A=(s+a)/2;if(s===a)return e.alpha!==void 0?{hue:0,saturation:0,lightness:A,alpha:e.alpha}:{hue:0,saturation:0,lightness:A};var c=s-a,l=A>.5?c/(2-s-a):c/(s+a);switch(s){case o:n=(i-r)/c+(i<r?6:0);break;case i:n=(r-o)/c+2;break;default:n=(o-i)/c+4}return n*=60,e.alpha!==void 0?{hue:n,saturation:l,lightness:A,alpha:e.alpha}:{hue:n,saturation:l,lightness:A}})(wD(t))}var o7e=function(t){return t.length===7&&t[1]===t[2]&&t[3]===t[4]&&t[5]===t[6]?"#"+t[1]+t[3]+t[5]:t};function PD(t){var e=t.toString(16);return e.length===1?"0"+e:e}function i7e(t){return PD(Math.round(255*t))}function gqn(t,e,n){return o7e("#"+i7e(t)+i7e(e)+i7e(n))}function c_t(t,e,n){return Qse(t,e,n,gqn)}function r7e(t,e,n){if(typeof t=="number"&&typeof e=="number"&&typeof n=="number")return o7e("#"+PD(t)+PD(e)+PD(n));if(typeof t=="object"&&e===void 0&&n===void 0)return o7e("#"+PD(t.red)+PD(t.green)+PD(t.blue));throw new t7(6)}function vse(t,e,n,o){if(typeof t=="string"&&typeof e=="number"){var i=wD(t);return"rgba("+i.red+","+i.green+","+i.blue+","+e+")"}if(typeof t=="number"&&typeof e=="number"&&typeof n=="number"&&typeof o=="number")return o>=1?r7e(t,e,n):"rgba("+t+","+e+","+n+","+o+")";if(typeof t=="object"&&e===void 0&&n===void 0&&o===void 0)return t.alpha>=1?r7e(t.red,t.green,t.blue):"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")";throw new t7(7)}function KQ(t){if(typeof t!="object")throw new t7(8);if((function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"})(t))return vse(t);if((function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||e.alpha===void 0)})(t))return r7e(t);if((function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"})(t))return(function(e,n,o,i){if(typeof e=="object"&&n===void 0&&o===void 0&&i===void 0)return e.alpha>=1?c_t(e.hue,e.saturation,e.lightness):"rgba("+Qse(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new t7(2)})(t);if((function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||e.alpha===void 0)})(t))return(function(e,n,o){if(typeof e=="object"&&n===void 0&&o===void 0)return c_t(e.hue,e.saturation,e.lightness);throw new t7(1)})(t);throw new t7(8)}function l_t(t,e,n){return function(){var o=n.concat(Array.prototype.slice.call(arguments));return o.length>=e?t.apply(this,o):l_t(t,e,o)}}function K3(t){return l_t(t,t.length,[])}K3(function(t,e){if(e==="transparent")return e;var n=UQ(e);return KQ(px({},n,{hue:n.hue+parseFloat(t)}))});function VF(t,e,n){return Math.max(t,Math.min(e,n))}K3(function(t,e){if(e==="transparent")return e;var n=UQ(e);return KQ(px({},n,{lightness:VF(0,1,n.lightness-parseFloat(t))}))}),K3(function(t,e){if(e==="transparent")return e;var n=UQ(e);return KQ(px({},n,{saturation:VF(0,1,n.saturation-parseFloat(t))}))}),K3(function(t,e){if(e==="transparent")return e;var n=UQ(e);return KQ(px({},n,{lightness:VF(0,1,n.lightness+parseFloat(t))}))});var u_t=K3(function(t,e,n){if(e==="transparent")return n;if(n==="transparent")return e;if(t===0)return n;var o=wD(e),i=px({},o,{alpha:typeof o.alpha=="number"?o.alpha:1}),r=wD(n),s=px({},r,{alpha:typeof r.alpha=="number"?r.alpha:1}),a=i.alpha-s.alpha,A=2*parseFloat(t)-1,c=((A*a===-1?A:A+a)/(1+A*a)+1)/2,l=1-c;return vse({red:Math.floor(i.red*c+s.red*l),green:Math.floor(i.green*c+s.green*l),blue:Math.floor(i.blue*c+s.blue*l),alpha:i.alpha*parseFloat(t)+s.alpha*(1-parseFloat(t))})});K3(function(t,e){if(e==="transparent")return e;var n=wD(e);return vse(px({},n,{alpha:VF(0,1,(100*(typeof n.alpha=="number"?n.alpha:1)+100*parseFloat(t))/100)}))}),K3(function(t,e){if(e==="transparent")return e;var n=UQ(e);return KQ(px({},n,{saturation:VF(0,1,n.saturation+parseFloat(t))}))}),K3(function(t,e){return e==="transparent"?e:KQ(px({},UQ(e),{hue:parseFloat(t)}))}),K3(function(t,e){return e==="transparent"?e:KQ(px({},UQ(e),{lightness:parseFloat(t)}))}),K3(function(t,e){return e==="transparent"?e:KQ(px({},UQ(e),{saturation:parseFloat(t)}))}),K3(function(t,e){return e==="transparent"?e:u_t(parseFloat(t),"rgb(0, 0, 0)",e)}),K3(function(t,e){return e==="transparent"?e:u_t(parseFloat(t),"rgb(255, 255, 255)",e)});var Bz=K3(function(t,e){if(e==="transparent")return e;var n=wD(e);return vse(px({},n,{alpha:VF(0,1,+(100*(typeof n.alpha=="number"?n.alpha:1)-100*parseFloat(t)).toFixed(2)/100)}))}),g_t={0:"M0.301025 0.257813 L0.206593 0.283385 L0.122042 0.361307 L0.075923 0.474441 L0.064942 0.642221 L0.091296 0.78289 L0.159376 0.899463 L0.257104 0.961214 L0.344948 0.961214 L0.442678 0.899463 L0.510757 0.78289 L0.537111 0.642221 L0.526131 0.474441 L0.480012 0.361307 L0.39546 0.283385 L0.301025 0.257813",1:"M0.220426 0.40845 L0.381626 0.270996 L0.381626 0.948966",2:"M0.110409 0.39212 L0.125621 0.342293 L0.170571 0.295823 L0.244237 0.26431 L0.291518 0.257813 L0.373319 0.263799 L0.434683 0.290705 L0.468239 0.331966 L0.480292 0.379913 L0.479492 0.411806 L0.465088 0.465192 L0.402571 0.568988 L0.245134 0.766438 L0.07959 0.948045 L0.522462 0.948045",3:"M0.081606 0.345073 L0.119154 0.315633 L0.178996 0.284091 L0.255265 0.257813 L0.349133 0.263062 L0.43127 0.289348 L0.48994 0.336662 L0.525141 0.394491 L0.513407 0.457577 L0.466472 0.504892 L0.384334 0.541692 L0.290464 0.56272 L0.20833 0.573235 L0.290464 0.583749 L0.384334 0.610035 L0.466472 0.652092 L0.519274 0.709922 L0.531007 0.773007 L0.50754 0.841351 L0.454738 0.899179 L0.3726 0.946494 L0.310412 0.961214 L0.209503 0.959111 L0.127367 0.946494 L0.071046 0.929671",4:"M0.418494 0.270996 L0.048828 0.724199 L0.553224 0.724199 M0.414181 0.578167 L0.414181 0.94897",5:"M0.074951 0.270996 L0.074951 0.614701 L0.267655 0.5695 L0.405247 0.586502 L0.460002 0.617189 L0.498028 0.660731 L0.527101 0.779401 L0.513352 0.841049 L0.477274 0.889568 L0.406378 0.93463 L0.324445 0.958337 L0.247399 0.962139 L0.182516 0.949767 L0.130068 0.925508 L0.074951 0.875607 M0.074951 0.270996 L0.527101 0.270996",6:"M0.428549 0.257813 L0.341433 0.285053 L0.26073 0.312099 L0.192188 0.360182 L0.138902 0.410969 L0.098219 0.500422 L0.070249 0.584267 L0.067264 0.670716 L0.065164 0.756863 L0.087163 0.820973 L0.108168 0.861042 L0.157916 0.913131 L0.210981 0.948192 L0.29279 0.961214 L0.384548 0.956206 L0.456409 0.924151 L0.507262 0.881077 L0.5349 0.821975 L0.537111 0.771889 L0.521634 0.718798 L0.498418 0.67372 L0.463042 0.636657 L0.414398 0.613617 L0.34696 0.598591 L0.28284 0.595587 L0.215403 0.605604 L0.145756 0.641665 L0.109274 0.678729 L0.064942 0.724006",7:"M0.071534 0.270996 L0.530519 0.270996 L0.495935 0.291702 L0.477752 0.305407 L0.435186 0.346112 L0.412067 0.374136 L0.388565 0.40796 L0.365315 0.448098 L0.342943 0.495062 L0.322081 0.549366 L0.303364 0.611524 L0.287416 0.68205 L0.270077 0.80465 L0.26253 0.94897",8:"M0.286761 0.257813 L0.210684 0.27162 L0.1414 0.305622 L0.092494 0.382125 L0.111513 0.450128 L0.16857 0.502193 L0.228345 0.539382 L0.377781 0.594635 L0.470161 0.645637 L0.52586 0.706203 L0.538087 0.792269 L0.506841 0.87621 L0.438915 0.927212 L0.339743 0.961214 L0.263666 0.959089 L0.174004 0.929337 L0.102003 0.881523 L0.063965 0.811395 L0.066682 0.741266 L0.102003 0.671139 L0.180797 0.608448 L0.259591 0.580822 L0.358762 0.548945 L0.456576 0.49688 L0.486463 0.446941 L0.487822 0.362999 L0.453859 0.302434 L0.384574 0.265245 L0.286761 0.257813",9:"M0.511026 0.437812 L0.491026 0.347812 L0.451026 0.297812 L0.391026 0.267812 L0.311026 0.257813 L0.231026 0.267812 L0.161026 0.297812 L0.111026 0.347812 L0.091026 0.417812 L0.111026 0.487812 L0.161026 0.537812 L0.231026 0.567812 L0.311026 0.577812 L0.391026 0.557812 L0.451026 0.517812 L0.491026 0.477812 L0.511026 0.437812 M0.510026 0.438812 L0.434026 0.636812 L0.381026 0.777812 L0.337026 0.879812 L0.301026 0.957812","!":"M0.301026 0.270996 L0.301026 0.749566 M0.251466 0.94897 L0.350587 0.94897",'"':"M0.16504 0.270996 L0.16504 0.523022 M0.437013 0.270996 L0.437013 0.523022","#":"M0.20958 0.282227 L0.146515 0.949754 M0.461844 0.282227 L0.398779 0.949754 M0.032999 0.526969 L0.600587 0.452796 M0.001465 0.82366 L0.569055 0.749486",$:"M0.307121 0.240234 L0.307121 1.083502 M0.490031 0.415915 L0.404676 0.328075 L0.23396 0.310507 L0.136407 0.398347 L0.099828 0.521324 L0.124213 0.591596 L0.197379 0.644299 L0.429061 0.697003 L0.502224 0.749708 L0.526613 0.837547 L0.477836 0.960526 L0.355897 1.013228 L0.197379 0.99566 L0.112021 0.942957 L0.07544 0.837547","'":"M0.301026 0.270996 L0.301026 0.523022","(":"M0.413087 0.241211 L0.372337 0.28347 L0.331589 0.334184 L0.290838 0.393349 L0.25009 0.460965 L0.219528 0.528584 L0.199153 0.5962 L0.188966 0.655364 L0.199153 0.714529 L0.219528 0.782146 L0.25009 0.849764 L0.290838 0.91738 L0.331589 0.976544 L0.372337 1.027258 L0.413087 1.069491",")":"M0.188966 0.241211 L0.229716 0.28347 L0.270466 0.334184 L0.311213 0.393349 L0.351964 0.460965 L0.382526 0.528584 L0.4029 0.5962 L0.413087 0.655364 L0.4029 0.714529 L0.382526 0.782146 L0.351964 0.849764 L0.311213 0.91738 L0.270466 0.976544 L0.229716 1.027258 L0.188966 1.069491","*":"M0.301026 0.458702 L0.301026 0.681942 M0.301026 0.458702 L0.520997 0.536834 M0.301026 0.458702 L0.439954 0.257813 M0.301026 0.458702 L0.162098 0.257813 M0.301026 0.458702 L0.081055 0.536834","+":"M0.042969 0.66845 L0.559083 0.66845 M0.301023 0.428223 L0.301023 0.908661",",":"M0.38672 0.852051 L0.215333 1.030661 L0.301025 1.119971","-":"M0.173829 0.686035 L0.428224 0.686035",".":"M0.362549 0.851074 L0.239503 0.851074","/":"M0.062501 1.035249 L0.539551 0.270996","<":"M0.559083 0.441895 L0.042969 0.66939 L0.042969 0.66939 L0.559083 0.896902","=":"M0.042969 0.545898 L0.559083 0.545898 M0.042969 0.80837 L0.559083 0.80837",">":"M0.042969 0.441895 L0.559083 0.66939 L0.559083 0.66939 L0.042969 0.896902",A:"M0.018067 0.94897 L0.290179 0.270996 L0.583986 0.94897 M0.155303 0.684521 L0.433548 0.684521",B:"M0.063965 0.94897 L0.063965 0.278953 L0.209356 0.270996 L0.342486 0.294394 L0.432179 0.37292 L0.418224 0.48773 L0.312686 0.549166 L0.084728 0.575531 L0.306377 0.589434 L0.468877 0.647456 L0.538087 0.736658 L0.5324 0.85202 L0.501247 0.902983 L0.42355 0.944398 L0.063965 0.94897",C:"M0.529054 0.419847 L0.498425 0.345196 L0.442238 0.292341 L0.33583 0.257813 L0.257199 0.268357 L0.187906 0.303748 L0.120243 0.385432 L0.072998 0.599844 L0.110073 0.815385 L0.165381 0.902183 L0.222883 0.942801 L0.334904 0.961214 L0.43253 0.937679 L0.504816 0.868999 L0.529054 0.772065",D:"M0.064454 0.94897 L0.071838 0.285078 L0.171217 0.270996 L0.247348 0.272633 L0.37101 0.306078 L0.462461 0.378304 L0.514748 0.475555 L0.535591 0.576392 L0.537599 0.652313 L0.528065 0.717381 L0.508562 0.772419 L0.445948 0.855695 L0.362356 0.90871 L0.225203 0.945862 L0.064454 0.94897",E:"M0.080078 0.270996 L0.080078 0.94897 M0.080078 0.270996 L0.521974 0.270996 M0.080078 0.609981 L0.389405 0.609981 M0.080078 0.94897 L0.521974 0.94897",F:"M0.086426 0.270996 L0.086426 0.94897 M0.091304 0.275607 L0.515626 0.275607 M0.091304 0.607677 L0.447344 0.607677",G:"M0.498034 0.284943 L0.374621 0.257813 L0.244219 0.268648 L0.160577 0.311997 L0.094556 0.398116 L0.056397 0.58404 L0.076752 0.785532 L0.120865 0.858197 L0.188947 0.916734 L0.271008 0.953591 L0.357069 0.961214 L0.43715 0.932047 L0.501262 0.858539 L0.545656 0.648611 L0.329595 0.648131",H:"M0.066895 0.270996 L0.066895 0.94897 M0.066895 0.595658 L0.530009 0.595658 M0.535157 0.270996 L0.535157 0.94897",I:"M0.301026 0.270996 L0.301026 0.94897",J:"M0.506839 0.270996 L0.507814 0.782193 L0.498468 0.846168 L0.480733 0.880789 L0.455864 0.90832 L0.426095 0.929408 L0.360746 0.954812 L0.302508 0.962139 L0.223573 0.953638 L0.16538 0.930312 L0.137072 0.907715 L0.116428 0.880312 L0.102822 0.848819 L0.095633 0.813947 L0.094239 0.776413",K:"M0.035401 0.270996 L0.035401 0.94897 M0.502258 0.316194 L0.035401 0.687823 M0.212484 0.582361 L0.566652 0.933903",L:"M0.07544 0.270996 L0.07544 0.94897 L0.526613 0.94897",M:"M0.042481 0.94897 L0.042481 0.270996 L0.301027 0.712492 L0.559571 0.270996 L0.559571 0.94897",N:"M0.067871 0.94897 L0.067871 0.270996 L0.534181 0.94897 L0.525031 0.270996",O:"M0.287293 0.961214 L0.19843 0.933567 L0.1172 0.849451 L0.057129 0.563945 L0.114348 0.350255 L0.18455 0.289392 L0.306101 0.257813 L0.42054 0.29572 L0.487543 0.365003 L0.544923 0.625294 L0.516366 0.789624 L0.465476 0.884596 L0.375084 0.949287 L0.287293 0.961214",P:"M0.070557 0.94897 L0.070557 0.28379 L0.20704 0.270996 L0.329134 0.278993 L0.408525 0.300514 L0.444022 0.317908 L0.500637 0.368929 L0.525796 0.423728 L0.531496 0.50384 L0.508934 0.554205 L0.473724 0.582043 L0.417577 0.604365 L0.336375 0.620372 L0.226014 0.629268 L0.082368 0.630258",Q:"M0.282435 1.050813 L0.195447 1.019646 L0.115933 0.924817 L0.057129 0.602943 L0.113139 0.362034 L0.18186 0.293418 L0.300844 0.257813 L0.412868 0.300553 L0.478457 0.37866 L0.534625 0.672103 L0.506671 0.857367 L0.456855 0.964437 L0.368371 1.037368 L0.282435 1.050813 M0.341225 0.815559 L0.544923 1.070653",R:"M0.034912 0.944112 L0.034912 0.288556 L0.227127 0.270996 L0.362038 0.276867 L0.443423 0.294907 L0.477644 0.309614 L0.505809 0.328757 L0.526616 0.352817 L0.544963 0.418061 L0.543241 0.475921 L0.524463 0.517817 L0.49076 0.546518 L0.444265 0.564799 L0.355195 0.578739 L0.047653 0.589627 M0.303054 0.617306 L0.56714 0.94897",S:"M0.483037 0.364333 L0.407613 0.267477 L0.22883 0.257813 L0.128623 0.327565 L0.087712 0.455539 L0.104656 0.518727 L0.168054 0.573307 L0.41928 0.617318 L0.503796 0.669342 L0.535157 0.759324 L0.493846 0.900055 L0.367668 0.961214 L0.205436 0.956661 L0.116711 0.907038 L0.066895 0.790334",T:"M0.022949 0.270996 L0.579103 0.270996 M0.309284 0.270996 L0.309284 0.94897",U:"M0.072022 0.270996 L0.07308 0.648875 L0.080372 0.75167 L0.099024 0.827813 L0.134786 0.885729 L0.181571 0.924023 L0.251464 0.95168 L0.339655 0.962139 L0.401553 0.951668 L0.45232 0.924086 L0.482701 0.891771 L0.495745 0.870529 L0.515699 0.81637 L0.525014 0.744626 L0.530031 0.272017",V:"M0.027832 0.270996 L0.320083 0.94897 L0.57422 0.270996",W:"M0 0.270996 L0.079799 0.940377 L0.285198 0.472884 L0.505255 0.94897 L0.602052 0.270996",X:"M0.009034 0.270996 L0.586805 0.94897 M0.593019 0.270996 L0.015246 0.94897",Y:"M0.018067 0.270996 L0.293132 0.574135 M0.583986 0.271959 L0.294954 0.57606 L0.305277 0.94897",Z:"M0.053711 0.270996 L0.548341 0.270996 L0.053711 0.94897 L0.548341 0.94897","[":"M0.404542 0.240234 L0.197511 0.240234 L0.197511 1.069424 L0.404542 1.069424","\\":"M0.062501 0.270996 L0.539551 1.035249","]":"M0.19751 0.240234 L0.404542 0.240234 L0.404542 1.069424 L0.19751 1.069424","^":"M0.035156 0.523931 L0.301024 0.270996 L0.566896 0.523931",_:"M0 1.160601 L0.602052 1.160601",a:"M0.527101 0.439941 L0.527101 0.973965 M0.527101 0.553824 L0.451366 0.477535 L0.376759 0.439941 L0.263722 0.439941 L0.187989 0.477535 L0.112255 0.553824 L0.074951 0.66881 L0.074951 0.745099 L0.112255 0.85898 L0.187989 0.93527 L0.263722 0.973965 L0.376759 0.973965 L0.451366 0.93527 L0.527101 0.85898",b:"M0.07666 0.240234 L0.07666 0.959985 M0.07666 0.582737 L0.151822 0.514237 L0.225865 0.480483 L0.338045 0.480483 L0.413211 0.514237 L0.488374 0.582737 L0.525392 0.685983 L0.525392 0.754485 L0.488374 0.856739 L0.413211 0.92524 L0.338045 0.959985 L0.225865 0.959985 L0.151822 0.92524 L0.07666 0.856739",c:"M0.512452 0.553823 L0.441624 0.477535 L0.371854 0.439941 L0.26614 0.439941 L0.195312 0.477535 L0.124486 0.553823 L0.0896 0.668808 L0.0896 0.745099 L0.124486 0.858979 L0.195312 0.93527 L0.26614 0.973965 L0.371854 0.973965 L0.441624 0.93527 L0.512452 0.858979",d:"M0.525392 0.240234 L0.525392 0.959985 M0.525392 0.582737 L0.450232 0.514237 L0.376189 0.480483 L0.264006 0.480483 L0.188844 0.514237 L0.11368 0.582737 L0.076661 0.685983 L0.076661 0.754485 L0.11368 0.856739 L0.188844 0.92524 L0.264006 0.959985 L0.376189 0.959985 L0.450232 0.92524 L0.525392 0.856739",e:"M0.059571 0.668808 L0.542482 0.668808 M0.542482 0.592521 L0.502641 0.516231 L0.461594 0.477535 L0.381914 0.439941 L0.261186 0.439941 L0.180299 0.477535 L0.099412 0.553823 L0.059571 0.668808 L0.059571 0.745099 L0.099412 0.858979 L0.180299 0.93527 L0.261186 0.973965 L0.381914 0.973965 L0.461594 0.93527 L0.542482 0.858979",f:"M0.512941 0.240234 L0.406984 0.240234 L0.301026 0.274346 L0.248047 0.374731 L0.248047 0.946817 M0.089112 0.476088 L0.459965 0.476088",g:"M0.525392 0.439941 L0.525392 0.989395 L0.488373 1.091918 L0.45023 1.126757 L0.376189 1.160601 L0.264004 1.160601 L0.188844 1.126757 L0.113681 1.058075 L0.076661 0.954555 M0.525392 0.542467 L0.45023 0.473786 L0.376189 0.439941 L0.264004 0.439941 L0.188844 0.473786 L0.113681 0.542467 L0.076661 0.645988 L0.076661 0.714669 L0.113681 0.817193 L0.188844 0.885875 L0.264004 0.920713 L0.376189 0.920713 L0.45023 0.885875 L0.525392 0.817193",h:"M0.092041 0.240234 L0.092041 0.946817 M0.092041 0.61058 L0.205937 0.509225 L0.282214 0.476086 L0.396109 0.476086 L0.47187 0.509225 L0.510011 0.61058 L0.510011 0.946817",i:"M0.261026 0.240234 L0.341026 0.240234 M0.300978 0.476089 L0.300978 0.946817",j:"M0.3853 0.240234 L0.447023 0.240234 M0.416159 0.465708 L0.416159 1.011689 L0.383887 1.108586 L0.252832 1.140264 L0.15503 1.108586",k:"M0.065186 0.240234 L0.065186 0.946817 M0.493824 0.476086 L0.065186 0.812323 M0.236758 0.677829 L0.536867 0.946817",l:"M0.301026 0.234863 L0.301026 0.946441",m:"M0.050538 0.439941 L0.050538 0.960796 M0.050538 0.588758 L0.114405 0.476607 L0.157178 0.439941 L0.236864 0.439941 L0.279637 0.476607 L0.32241 0.588758 L0.32241 0.960796 M0.32241 0.588758 L0.386281 0.476607 L0.428467 0.439941 L0.50874 0.439941 L0.551515 0.476607 L0.551515 0.960796",n:"M0.092041 0.439941 L0.092041 0.960796 M0.092041 0.588758 L0.205936 0.476607 L0.282216 0.439941 L0.396113 0.439941 L0.471871 0.476607 L0.510011 0.588758 L0.510011 0.960796",o:"M0.247175 0.439941 L0.175178 0.477535 L0.103186 0.553823 L0.066895 0.668808 L0.066895 0.745099 L0.103186 0.858979 L0.175178 0.93527 L0.247175 0.973965 L0.354874 0.973965 L0.426872 0.93527 L0.498866 0.858979 L0.535157 0.745099 L0.535157 0.668808 L0.498866 0.553823 L0.426872 0.477535 L0.354874 0.439941 L0.247175 0.439941",p:"M0.076904 0.439941 L0.076904 1.154244 M0.076904 0.541563 L0.151986 0.473487 L0.225944 0.439941 L0.338005 0.439941 L0.413087 0.473487 L0.488166 0.541563 L0.525148 0.644169 L0.525148 0.712246 L0.488166 0.813866 L0.413087 0.881942 L0.338005 0.916471 L0.225944 0.916471 L0.151986 0.881942 L0.076904 0.813866",q:"M0.525148 0.441895 L0.525148 1.156195 M0.525148 0.5435 L0.450067 0.47544 L0.376106 0.441895 L0.264042 0.441895 L0.188966 0.47544 L0.113885 0.5435 L0.076905 0.646108 L0.076905 0.714187 L0.113885 0.815809 L0.188966 0.883886 L0.264042 0.918418 L0.376106 0.918418 L0.450067 0.883886 L0.525148 0.815809",r:"M0.107422 0.439941 L0.107422 0.960796 M0.107422 0.663164 L0.155824 0.551014 L0.252626 0.476607 L0.349428 0.439941 L0.49463 0.439941",s:"M0.475556 0.477535 L0.400757 0.439941 L0.276092 0.439941 L0.176361 0.477535 L0.101563 0.553823 L0.101563 0.630112 L0.176361 0.668808 L0.301024 0.668808 L0.425688 0.745099 L0.50049 0.821387 L0.50049 0.897677 L0.425688 0.93527 L0.325956 0.973965 L0.201295 0.973965 L0.126496 0.93527 L0.101563 0.858979",t:"M0.246032 0.297852 L0.246032 0.826549 L0.301023 0.919323 L0.411011 0.950848 L0.520997 0.950848 M0.081055 0.515799 L0.466004 0.515799",u:"M0.092041 0.454102 L0.092041 0.826134 L0.13018 0.937211 L0.205936 0.974954 L0.319832 0.974954 L0.396113 0.937211 L0.510011 0.826134 M0.510011 0.454102 L0.510011 0.974954",v:"M0.048828 0.453125 L0.301026 0.961719 M0.553224 0.453125 L0.301026 0.961719",w:"M0 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.451539 0.961719 M0.602052 0.453125 L0.451539 0.961719",x:"M0.03711 0.453125 L0.564943 0.961719 M0.564943 0.453125 L0.03711 0.961719",y:"M0.084618 0.453125 L0.320232 0.921476 M0.55713 0.453125 L0.320232 0.921476 L0.242119 1.055289 L0.163369 1.122196 L0.084618 1.155166 L0.044922 1.155166",z:"M0.505373 0.452148 L0.09668 0.961651 M0.09668 0.452148 L0.505373 0.452148 M0.09668 0.961651 L0.505373 0.961651"},d_t={};for(const t in g_t){d_t[t]=[];const e=g_t[t].split("M").slice(1).map(n=>n.split("L").map(o=>o.trim().split(" ").map(parseFloat)));for(const n of e)for(let o=0;o<n.length-1;o++)d_t[t].push({x1:n[o][0],y1:1-n[o][1],x2:n[o+1][0],y2:1-n[o+1][1]})}var MD=(t,e)=>({...t,rects:[...t.rects??[],...e.rects??[]],points:[...t.points??[],...e.points??[]],lines:[...t.lines??[],...e.lines??[]],infiniteLines:[...t.infiniteLines??[],...e.infiniteLines??[]],polygons:[...t.polygons??[],...e.polygons??[]],circles:[...t.circles??[],...e.circles??[]],arrows:[...t.arrows??[],...e.arrows??[]],texts:[...t.texts??[],...e.texts??[]]});function s7e(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;if(t.arrows)for(const n of t.arrows)n.step=e;return t}var zA=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved&&this.iterations>=this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>=this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function eh(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var n7=class extends zA{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null&&(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()&&(this.step(),!this.failed&&!this.solved););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??"none"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex>this.pipelineDef.findIndex(A=>A.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n&&(s7e(n,0),e=1);let o=null;this.solved&&(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=>{const a=this[r.solverName],A=a?.visualize();return A?(s7e(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved&&o&&(s7e(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=>r.points||[]),rects:i.flatMap(r=>r.rects||[]),lines:i.flatMap(r=>r.lines||[]),circles:i.flatMap(r=>r.circles||[]),texts:i.flatMap(r=>r.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},dqn=class{constructor(e=1/0,n=Float64Array,o=Uint32Array){const i=e!==1/0;this.ids=i?new o(e):[],this.values=i?new n(e):[],this.capacity=e,this.length=0}clear(){this.length=0}push(e,n){if(this.length===this.capacity)throw new RangeError("Queue is at capacity.");let o=this.length++;for(;o>0;){const i=o-1>>1,r=this.values[i];if(n>=r)break;this.ids[o]=this.ids[i],this.values[o]=r,o=i}this.ids[o]=e,this.values[o]=n}pop(){if(this.length===0)return;const e=this.ids,n=this.values,o=e[0],i=--this.length;if(i>0){const r=e[i],s=n[i];let a=0;const A=i>>1;for(;a<A;){const c=1+(a<<1),l=c+1,u=c+(+(l<i)&+(n[l]<n[c]));if(n[u]>=s)break;e[a]=e[u],n[a]=n[u],a=u}e[a]=r,n[a]=s}return o}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){Array.isArray(this.ids)&&(this.ids.length=this.length),Array.isArray(this.values)&&(this.values.length=this.length)}},h_t=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],X4=class ZEn{static from(e,n=0){if(n%8!=0)throw new Error("byteOffset must be 8-byte aligned.");if(!e||e.byteLength===void 0||"buffer"in e)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[o,i]=new Uint8Array(e,n+0,2);if(o!==251)throw new Error("Data does not appear to be in a Flatbush format.");const r=i>>4;if(r!==3)throw new Error(`Got v${r} data when expected v3.`);const s=h_t[15&i];if(!s)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,n+2,1),[A]=new Uint32Array(e,n+4,1);return new ZEn(A,a,s,void 0,e,n)}constructor(e,n=16,o=Float64Array,i=ArrayBuffer,r,s=0){if(e===void 0)throw new Error("Missing required argument: numItems.");if(isNaN(e)||e<=0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.byteOffset=s;let a=e,A=a;this._levelBounds=[4*a];do a=Math.ceil(a/this.nodeSize),A+=a,this._levelBounds.push(4*A);while(a!==1);this.ArrayType=o,this.IndexArrayType=A<16384?Uint16Array:Uint32Array;const c=h_t.indexOf(o),l=4*A*o.BYTES_PER_ELEMENT;if(c<0)throw new Error(`Unexpected typed array class: ${o}.`);const u=o,g=this.IndexArrayType;if(r)this.data=r,this._boxes=new u(r,s+8,4*A),this._indices=new g(r,s+8+l,A),this._pos=4*A,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const h=this.data=new i(8+l+A*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new u(h,8,4*A),this._indices=new g(h,8+l,A),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(h,0,2).set([251,48+c]),new Uint16Array(h,2,1)[0]=n,new Uint32Array(h,4,1)[0]=e}this._queue=new dqn}add(e,n,o=e,i=n){const r=this._pos,s=r>>2,a=this._boxes;return this._indices[s]=s,a[r]=e,a[r+1]=n,a[r+2]=o,a[r+3]=i,this._pos=r+4,e<this.minX&&(this.minX=e),n<this.minY&&(this.minY=n),o>this.maxX&&(this.maxX=o),i>this.maxY&&(this.maxY=i),s}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);const e=this._boxes;if(this.numItems<=this.nodeSize)return e[this._pos++]=this.minX,e[this._pos++]=this.minY,e[this._pos++]=this.maxX,void(e[this._pos++]=this.maxY);const{numItems:n,minX:o,minY:i,nodeSize:r,_indices:s,_levelBounds:a}=this,A=this.maxX-o||1,c=this.maxY-i||1,l=new Int32Array(n),u=65535/A,g=65535/c;for(let d=0,p=0;d<n;d++){const m=e[p++],_=e[p++],f=u*((m+e[p++])/2-o)|0,I=g*((_+e[p++])/2-i)|0;l[d]=mqn(f,I)}(function(d,p,m,_,f,I){const C=[_,f];for(;C.length;){const y=C.pop()||0,x=C.pop()||0;if(y-x<=I&&Math.floor(x/I)>=Math.floor(y/I))continue;const E=d[x],B=d[x+y>>1],S=d[y],Q=E>B!=E>S?E:B<E!=B<S?B:S;let w=x-1,M=y+1;for(;;){do w++;while(d[w]<Q);do M--;while(d[M]>Q);if(w>=M)break;pqn(d,p,m,w,M)}C.push(x,M,M+1,y)}})(l,e,s,0,n-1,r);let h=4*n;for(let d=0,p=0;d<a.length-1;d++){const m=a[d];for(;p<m;){const _=p;let f=e[p++],I=e[p++],C=e[p++],y=e[p++];for(let x=1;x<r&&p<m;x++)f=Math.min(f,e[p++]),I=Math.min(I,e[p++]),C=Math.max(C,e[p++]),y=Math.max(y,e[p++]);s[h>>2]=_,e[h++]=f,e[h++]=I,e[h++]=C,e[h++]=y}}this._pos=h}search(e,n,o,i,r){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");const{_boxes:s,_levelBounds:a,_indices:A,nodeSize:c}=this,l=4*this.numItems;let u=s.length-4,g=a.length-1;const h=[],d=[];let p=!1;for(;u!==void 0;){const m=Math.min(u+4*c,a[g]),_=u>=l;if(p)this._collectContained(u,m,g,l,d,r);else for(let f=u;f<m;f+=4){const I=s[f];if(o<I)continue;const C=s[f+1];if(i<C)continue;const y=s[f+2];if(e>y)continue;const x=s[f+3];if(n>x)continue;const E=0|A[f>>2];if(_){const B=+(e<=I&&n<=C&&o>=y&&i>=x);h.push(E|B,g-1)}else(r===void 0||r(E,I,C,y,x))&&d.push(E)}g=h.pop(),u=h.pop(),u!==void 0&&(p=!(1&~u),u&=-2)}return d}_collectContained(e,n,o,i,r,s){const a=this._boxes,A=this._indices;let c=e;for(let u=o;u>0;u--)c=A[c>>2];const l=Math.min(c+(n-e)*this.nodeSize**o,i);if(s===void 0)for(;c<l;c+=4)r.push(0|A[c>>2]);else for(;c<l;c+=4){const u=0|A[c>>2];s(u,a[c],a[c+1],a[c+2],a[c+3])&&r.push(u)}}neighbors(e,n,o=1/0,i=1/0,r){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");const{_boxes:s,_levelBounds:a,_indices:A,_queue:c,nodeSize:l}=this,u=4*this.numItems,g=4*l,h=[],d=o===1;let p=i*i;for(c.push(s.length-4<<1,0);c.length;){const m=c.ids[0];if(1&m){if(c.pop(),h.push(m>>1),h.length===o)break;continue}c.pop();const _=m>>1,f=_<u,I=Math.min(_+g,hqn(_,a));for(let C=_;C<I;C+=4){const y=s[C],x=s[C+1],E=s[C+2],B=s[C+3],S=Math.max(Math.max(y-e,e-E),0),Q=Math.max(Math.max(x-n,n-B),0),w=S*S+Q*Q;if(w>p)continue;const M=0|A[C>>2];f?(r===void 0||r(M))&&(c.push(M<<1|1,w),d&&w<p&&(p=w)):c.push(M<<1,w)}}return c.clear(),h}};function hqn(t,e){let n=0,o=e.length-1;for(;n<o;){const i=n+o>>1;e[i]>t?o=i:n=i+1}return e[n]}function pqn(t,e,n,o,i){const r=t[o];t[o]=t[i],t[i]=r;const s=4*o,a=4*i,A=e[s],c=e[s+1],l=e[s+2],u=e[s+3];e[s]=e[a],e[s+1]=e[a+1],e[s+2]=e[a+2],e[s+3]=e[a+3],e[a]=A,e[a+1]=c,e[a+2]=l,e[a+3]=u;const g=n[o];n[o]=n[i],n[i]=g}function mqn(t,e){let n=t^e,o=65535^n,i=65535^(t|e),r=t&(65535^e),s=n|o>>1,a=n>>1^n,A=i^i>>1^o&r>>1,c=r^n&i>>1^r>>1;return n=s&s>>2^a&a>>2,o=s&a>>2^a&(s^a)>>2,i=A^s&A>>2^a&c>>2,r=c^a&A>>2^(s^a)&c>>2,s=n&n>>4^o&o>>4,a=n&o>>4^o&(n^o)>>4,A=i^n&i>>4^o&r>>4,c=r^o&i>>4^(n^o)&r>>4,i=A^s&A>>8^a&c>>8,r=c^a&A>>8^(s^a)&c>>8,i^=i>>1,r^=r>>1,n=t^e,o=r|65535^(n|i),n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),o=16711935&(o|o<<8),o=252645135&(o|o<<4),o=858993459&(o|o<<2),o=1431655765&(o|o<<1),((o<<1|n)>>>0)-2147483648}var Z4=1e-4,bz=[{facingDirection:"x-",dx:-1,dy:0,startX:-.5,startY:.5,endX:-.5,endY:-.5},{facingDirection:"x+",dx:1,dy:0,startX:.5,startY:.5,endX:.5,endY:-.5},{facingDirection:"y-",dx:0,dy:-1,startX:-.5,startY:-.5,endX:.5,endY:-.5},{facingDirection:"y+",dx:0,dy:1,startX:.5,startY:.5,endX:-.5,endY:.5}],_qn={"x-":bz.find(t=>t.facingDirection==="x-"),"x+":bz.find(t=>t.facingDirection==="x+"),"y-":bz.find(t=>t.facingDirection==="y-"),"y+":bz.find(t=>t.facingDirection==="y+")},fqn={"x-":{x:-1,y:0},"x+":{x:1,y:0},"y-":{x:0,y:-1},"y+":{x:0,y:1}},a7e=(t,e)=>{const{dir:n,amt:o}=e,i=fqn[n];return t.map(r=>({x:r.x+i.x*o,y:r.y+i.y*o}))},Sz=1e-4;function p_t(t){const e=[];for(const n of t)for(const o of bz){let i={x:n.center.x+n.width*o.startX,y:n.center.y+n.height*o.startY},r={x:n.center.x+n.width*o.endX,y:n.center.y+n.height*o.endY};i.x>r.x&&([i,r]=[r,i]),Math.abs(i.x-r.x)<Sz&&i.y>r.y&&([i,r]=[r,i]);for(const s of n.availableZ)e.push({parent:n,start:i,end:r,facingDirection:o.facingDirection,z:s})}return e}var Iqn=class extends zA{constructor(e){super(),this.input=e;const n=this.input.targetMeshNodes??this.input.allMeshNodes,o=new Set(n.map(r=>r.capacityMeshNodeId)),i=this.input.allMeshNodes.filter(r=>!o.has(r.capacityMeshNodeId));this.unprocessedEdges=p_t(n),this.allEdges=[...this.unprocessedEdges,...p_t(i)],this.edgeSpatialIndex=new X4(this.allEdges.length);for(const r of this.allEdges)this.edgeSpatialIndex.add(r.start.x,r.start.y,r.end.x,r.end.y);this.edgeSpatialIndex.finish()}input;allEdges;unprocessedEdges=[];segmentsWithAdjacentEmptySpace=[];edgeSpatialIndex;lastCandidateEdge=null;lastOverlappingEdges=null;lastUncoveredSegments=null;_step(){if(this.unprocessedEdges.length===0)return this.solved=!0,this.lastCandidateEdge=null,this.lastOverlappingEdges=null,void(this.lastUncoveredSegments=null);const e=this.unprocessedEdges.shift();this.lastCandidateEdge=e;const n=this.edgeSpatialIndex.search(e.start.x-Sz,e.start.y-Sz,e.end.x+Sz,e.end.y+Sz).map(i=>this.allEdges[i]).filter(i=>i.z===e.z);this.lastOverlappingEdges=n;const o=(function(i,r){const s=Math.abs(i.start.y-i.end.y)<Z4,a=Math.abs(i.start.x-i.end.x)<Z4;if(!s&&!a)return[];const A=s?"x":"y",c=s?"y":"x",l=i.start[c],u=i.start[A],g=i.end[A],h=Math.min(u,g),d=Math.max(u,g),p=C=>Math.max(h,Math.min(d,C)),m=[];for(const C of r){if(C===i)continue;const y=Math.abs(C.start.y-C.end.y)<Z4,x=Math.abs(C.start.x-C.end.x)<Z4;if(A==="x"&&!y||A==="y"&&!x||Math.abs(C.start[c]-l)>Z4)continue;const E=Math.min(C.start[A],C.end[A]),B=Math.max(C.start[A],C.end[A]),S=p(E),Q=p(B);Q-S>Z4&&m.push({s:S,e:Q})}if(m.length===0)return[{...i,start:{...i.start},end:{...i.end}}];m.sort((C,y)=>C.s-y.s);const _=[];for(const C of m){const y=_[_.length-1];!y||C.s>y.e+Z4?_.push({...C}):y.e=Math.max(y.e,C.e)}const f=[];let I=h;for(const C of _)if(C.s>I+Z4&&f.push({s:I,e:C.s}),I=Math.max(I,C.e),I>=d-Z4)break;return d>I+Z4&&f.push({s:I,e:d}),f.length===0?[]:f.filter(C=>C.e-C.s>Z4).map(C=>{const y=A==="x"?{x:C.s,y:l}:{x:l,y:C.s},x=A==="x"?{x:C.e,y:l}:{x:l,y:C.e};return{parent:i.parent,facingDirection:i.facingDirection,start:y,end:x,z:i.z}})})(e,n);this.lastUncoveredSegments=o,this.segmentsWithAdjacentEmptySpace.push(...o)}getOutput(){return{segmentsWithAdjacentEmptySpace:this.segmentsWithAdjacentEmptySpace}}visualize(){const e={title:"FindSegmentsWithAdjacentEmptySpace",coordinateSystem:"cartesian",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]};for(const n of this.input.allMeshNodes)e.rects.push({center:n.center,width:n.width,height:n.height,stroke:"rgba(0, 0, 0, 0.1)"});for(const n of this.unprocessedEdges)e.lines.push({points:a7e([n.start,n.end],{dir:n.facingDirection,amt:-.1}),strokeColor:"rgba(0, 0, 255, 0.5)",strokeDash:"5 5"});for(const n of this.segmentsWithAdjacentEmptySpace)e.lines.push({points:[n.start,n.end],strokeColor:"rgba(0,255,0, 0.5)"});if(this.lastCandidateEdge&&e.lines.push({points:[this.lastCandidateEdge.start,this.lastCandidateEdge.end],strokeColor:"blue"}),this.lastOverlappingEdges)for(const n of this.lastOverlappingEdges)e.lines.push({points:a7e([n.start,n.end],{dir:n.facingDirection,amt:.05}),strokeColor:"red",strokeDash:"2 2"});if(this.lastUncoveredSegments)for(const n of this.lastUncoveredSegments)e.lines.push({points:a7e([n.start,n.end],{dir:n.facingDirection,amt:-.05}),strokeColor:"green",strokeDash:"2 2"});return e}};function m_t(t,e,n=0,o=t.length-1,i=Cqn){for(;o>n;){if(o-n>600){const A=o-n+1,c=e-n+1,l=Math.log(A),u=.5*Math.exp(2*l/3),g=.5*Math.sqrt(l*u*(A-u)/A)*(c-A/2<0?-1:1);m_t(t,e,Math.max(n,Math.floor(e-c*u/A+g)),Math.min(o,Math.floor(e+(A-c)*u/A+g)),i)}const r=t[e];let s=n,a=o;for(Qz(t,n,e),i(t[o],r)>0&&Qz(t,n,o);s<a;){for(Qz(t,s,a),s++,a--;i(t[s],r)<0;)s++;for(;i(t[a],r)>0;)a--}i(t[n],r)===0?Qz(t,n,a):(a++,Qz(t,a,o)),a<=e&&(n=a+1),e<=a&&(o=a-1)}}function Qz(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function Cqn(t,e){return t<e?-1:t>e?1:0}var vz=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const o=[];if(!Pse(e,n))return o;const i=this.toBBox,r=[];for(;n;){for(let s=0;s<n.children.length;s++){const a=n.children[s],A=n.leaf?i(a):a;Pse(e,A)&&(n.leaf?o.push(a):c7e(e,A)?this._all(a,o):r.push(a))}n=r.pop()}return o}collides(e){let n=this.data;if(!Pse(e,n))return!1;const o=[];for(;n;){for(let i=0;i<n.children.length;i++){const r=n.children[i],s=n.leaf?this.toBBox(r):r;if(Pse(e,s)){if(n.leaf||c7e(e,s))return!0;o.push(r)}}n=o.pop()}return!1}load(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(let o=0;o<e.length;o++)this.insert(e[o]);return this}let n=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){const o=this.data;this.data=n,n=o}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=JF([]),this}remove(e,n){if(!e)return this;let o=this.data;const i=this.toBBox(e),r=[],s=[];let a,A,c;for(;o||r.length;){if(o||(o=r.pop(),A=r[r.length-1],a=s.pop(),c=!0),o.leaf){const l=yqn(e,o.children,n);if(l!==-1)return o.children.splice(l,1),r.push(o),this._condense(r),this}c||o.leaf||!c7e(o,i)?A?(a++,o=A.children[a],c=!1):o=null:(r.push(o),s.push(a),a=0,A=o,o=o.children[0])}return this}toBBox(e){return e}compareMinX(e,n){return e.minX-n.minX}compareMinY(e,n){return e.minY-n.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,n){const o=[];for(;e;)e.leaf?n.push(...e.children):o.push(...e.children),e=o.pop();return n}_build(e,n,o,i){const r=o-n+1;let s,a=this._maxEntries;if(r<=a)return s=JF(e.slice(n,o+1)),zF(s,this.toBBox),s;i||(i=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,i-1))),s=JF([]),s.leaf=!1,s.height=i;const A=Math.ceil(r/a),c=A*Math.ceil(Math.sqrt(a));__t(e,n,o,c,this.compareMinX);for(let l=n;l<=o;l+=c){const u=Math.min(l+c-1,o);__t(e,l,u,A,this.compareMinY);for(let g=l;g<=u;g+=A){const h=Math.min(g+A-1,u);s.children.push(this._build(e,g,h,i-1))}}return zF(s,this.toBBox),s}_chooseSubtree(e,n,o,i){for(;i.push(n),!n.leaf&&i.length-1!==o;){let r,s=1/0,a=1/0;for(let A=0;A<n.children.length;A++){const c=n.children[A],l=A7e(c),u=Bqn(e,c)-l;u<a?(a=u,s=l<s?l:s,r=c):u===a&&l<s&&(s=l,r=c)}n=r||n.children[0]}return n}_insert(e,n,o){const i=o?e:this.toBBox(e),r=[],s=this._chooseSubtree(i,this.data,n,r);for(s.children.push(e),Pz(s,i);n>=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(i,r,n)}_split(e,n){const o=e[n],i=o.children.length,r=this._minEntries;this._chooseSplitAxis(o,r,i);const s=this._chooseSplitIndex(o,r,i),a=JF(o.children.splice(s,o.children.length-s));a.height=o.height,a.leaf=o.leaf,zF(o,this.toBBox),zF(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(o,a)}_splitRoot(e,n){this.data=JF([e,n]),this.data.height=e.height+1,this.data.leaf=!1,zF(this.data,this.toBBox)}_chooseSplitIndex(e,n,o){let i,r=1/0,s=1/0;for(let a=n;a<=o-n;a++){const A=wz(e,0,a,this.toBBox),c=wz(e,a,o,this.toBBox),l=bqn(A,c),u=A7e(A)+A7e(c);l<r?(r=l,i=a,s=u<s?u:s):l===r&&u<s&&(s=u,i=a)}return i||o-n}_chooseSplitAxis(e,n,o){const i=e.leaf?this.compareMinX:xqn,r=e.leaf?this.compareMinY:Eqn;this._allDistMargin(e,n,o,i)<this._allDistMargin(e,n,o,r)&&e.children.sort(i)}_allDistMargin(e,n,o,i){e.children.sort(i);const r=this.toBBox,s=wz(e,0,n,r),a=wz(e,o-n,o,r);let A=wse(s)+wse(a);for(let c=n;c<o-n;c++){const l=e.children[c];Pz(s,e.leaf?r(l):l),A+=wse(s)}for(let c=o-n-1;c>=n;c--){const l=e.children[c];Pz(a,e.leaf?r(l):l),A+=wse(a)}return A}_adjustParentBBoxes(e,n,o){for(let i=o;i>=0;i--)Pz(n[i],e)}_condense(e){for(let n,o=e.length-1;o>=0;o--)e[o].children.length===0?o>0?(n=e[o-1].children,n.splice(n.indexOf(e[o]),1)):this.clear():zF(e[o],this.toBBox)}};function yqn(t,e,n){if(!n)return e.indexOf(t);for(let o=0;o<e.length;o++)if(n(t,e[o]))return o;return-1}function zF(t,e){wz(t,0,t.children.length,e,t)}function wz(t,e,n,o,i){i||(i=JF(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let r=e;r<n;r++){const s=t.children[r];Pz(i,t.leaf?o(s):s)}return i}function Pz(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function xqn(t,e){return t.minX-e.minX}function Eqn(t,e){return t.minY-e.minY}function A7e(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function wse(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Bqn(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function bqn(t,e){const n=Math.max(t.minX,e.minX),o=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,r-o)}function c7e(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function Pse(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function JF(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function __t(t,e,n,o,i){const r=[e,n];for(;r.length;){if((n=r.pop())-(e=r.pop())<=o)continue;const s=e+Math.ceil((n-e)/o/2)*o;m_t(t,s,e,n,i),r.push(e,s,s,n)}}var f_t=t=>({minX:Math.min(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxX:Math.max(...t.map(e=>e.x)),maxY:Math.max(...t.map(e=>e.y))});function Uh(t,e,n,o){const i=Mse(t,e,n),r=Mse(t,e,o),s=Mse(n,o,t),a=Mse(n,o,e);return i!==r&&s!==a||!(i!==0||!Dse(t,n,e))||!(r!==0||!Dse(t,o,e))||!(s!==0||!Dse(n,t,o))||!(a!==0||!Dse(n,e,o))}function Mse(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o>0?1:2}function Dse(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function wc(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return no(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;return i=Math.max(0,Math.min(1,i)),no(t,{x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)})}function no(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function DD(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=o.x-n.x,a=o.y-n.y,A=t.x-n.x,c=t.y-n.y,l=i*a-r*s;if(Math.abs(l)<1e-10)return null;const u=(c*s-A*a)/l,g=(i*c-r*A)/l,h=1e-9;return u>=-1e-9&&u<=1+h&&g>=-1e-9&&g<=1+h?{x:t.x+u*i,y:t.y+u*r}:null}var I_t=t=>{if("minX"in t)return t;const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,minY:t.center.y-n,maxX:t.center.x+e,maxY:t.center.y+n}},l7e=t=>[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}],C_t=t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];e.push([o,i])}return e},Sqn=(t,e,n)=>{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)>1e-9)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i<0)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return r!==0&&!(i>r)},y_t=(t,e)=>t.x>=e.minX&&t.x<=e.maxX&&t.y>=e.minY&&t.y<=e.maxY,Mz=(t,e)=>{if(e.length<3)return!1;const n=C_t(e);for(const[i,r]of n)if(Sqn(t,i,r))return!0;let o=!1;for(let i=0,r=e.length-1;i<e.length;r=i++){const s=e[i].x,a=e[i].y,A=e[r].x,c=e[r].y;a>t.y!=c>t.y&&t.x<(A-s)*(t.y-a)/(c-a)+s&&(o=!o)}return o},x_t=(t,e)=>{const n=l7e(t),o=[[n[0],n[1]],[n[1],n[2]],[n[2],n[3]],[n[3],n[0]]],i=C_t(e);for(const[r,s]of i)for(const[a,A]of o)if(Uh(r,s,a,A))return!0;return!1},Nse=(t,e)=>((n,o)=>!(o.length<3)&&(!!o.some(i=>y_t(i,n))||!!l7e(n).some(i=>Mz(i,o))||x_t(n,o)))(I_t(t),e),E_t=(t,e)=>((n,o)=>!(o.length<3)&&!!l7e(n).every(i=>Mz(i,o))&&!x_t(n,o))(I_t(t),e);function Is(t){const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,maxX:t.center.x+e,minY:t.center.y-n,maxY:t.center.y+n}}function V3(t,e,n){return Math.max(e,Math.min(n,t))}function M5(t,e,n,o){if(t.x===e.x&&t.y===e.y)return wc(t,n,o);if(n.x===o.x&&n.y===o.y)return wc(n,t,e);if(Uh(t,e,n,o))return 0;const i=[wc(t,n,o),wc(e,n,o),wc(n,t,e),wc(o,t,e)];return Math.min(...i)}function Dz(t,e,n){const o={x:n.minX,y:n.minY},i={x:n.maxX,y:n.minY},r={x:n.minX,y:n.maxY},s={x:n.maxX,y:n.maxY};if(Uh(t,e,o,i)||Uh(t,e,i,s)||Uh(t,e,s,r)||Uh(t,e,r,o)||t.x>=n.minX&&t.x<=n.maxX&&t.y>=n.minY&&t.y<=n.maxY&&e.x>=n.minX&&e.x<=n.maxX&&e.y>=n.minY&&e.y<=n.maxY)return 0;const a=[wc(o,t,e),wc(i,t,e),wc(r,t,e),wc(s,t,e)];if(t.x>=n.minX&&t.x<=n.maxX&&t.y>=n.minY&&t.y<=n.maxY||e.x>=n.minX&&e.x<=n.maxX&&e.y>=n.minY&&e.y<=n.maxY)return 0;if(t.x<n.minX||t.x>n.maxX||t.y<n.minY||t.y>n.maxY){const A=V3(t.x,n.minX,n.maxX),c=V3(t.y,n.minY,n.maxY);a.push(no(t,{x:A,y:c}))}if(e.x<n.minX||e.x>n.maxX||e.y<n.minY||e.y>n.maxY){const A=V3(e.x,n.minX,n.maxX),c=V3(e.y,n.minY,n.maxY);a.push(no(e,{x:A,y:c}))}return Math.min(...a)}function K8(t,e,n){const o=n.width/2,i=n.height/2;return Dz(t,e,{minX:n.center.x-o,maxX:n.center.x+o,minY:n.center.y-i,maxY:n.center.y+i})}function Nz(t,e,n){const o={x:n.x,y:n.y};if(t.x===e.x&&t.y===e.y)return Math.max(0,no(t,o)-n.radius);const i=e.x-t.x,r=e.y-t.y,s=o.x-t.x,a=o.y-t.y,A=i*i+r*r,c=Math.max(0,Math.min(1,(i*s+r*a)/A)),l=no({x:t.x+c*i,y:t.y+c*r},o);return Math.max(0,l-n.radius)}function z_(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r===0)return{x:e.x,y:e.y};let s=((t.x-e.x)*o+(t.y-e.y)*i)/r;return s=Math.max(0,Math.min(1,s)),{x:e.x+s*o,y:e.y+s*i}}var u7e=(t,e)=>{const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n**2+o**2);return{x:n/i,y:o/i}};function o7(t,e){const n=e.width/2,o=e.height/2,i=e.center.x-n,r=e.center.x+n,s=e.center.y-o,a=e.center.y+o;return t.x>=i&&t.x<=r&&t.y>=s&&t.y<=a?0:no(t,{x:V3(t.x,i,r),y:V3(t.y,s,a)})}function V8(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function B_t(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}var WF=(t,e)=>!(t.maxX<e.minX||e.maxX<t.minX||t.maxY<e.minY||e.maxY<t.minY),Pg=t=>{const{center:e,width:n,height:o}=t,i=n/2,r=o/2;return{minX:e.x-i,maxX:e.x+i,minY:e.y-r,maxY:e.y+r}},i7=1e-4,Qqn=class extends zA{constructor(e){super(),this.input=e,this.unprocessedSegments=[...this.input.segmentsWithAdjacentEmptySpace],this.rectSpatialIndex=new vz,this.rectSpatialIndex.load(this.input.boardVoid?.boardVoidRects.map((n,o)=>({capacityMeshNodeId:`void-rect-${o}`,center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,availableZ:Array.from({length:this.input.boardVoid?.layerCount||0},(i,r)=>r),layer:"void",minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height}))||[]),this.rectSpatialIndex.load(this.input.inputMeshNodes.map(n=>({...n,minX:n.center.x-n.width/2,minY:n.center.y-n.height/2,maxX:n.center.x+n.width/2,maxY:n.center.y+n.height/2})))}input;unprocessedSegments=[];expandedSegments=[];lastSegment=null;lastSearchBounds=null;lastCollidingNodes=null;lastSearchCorner1=null;lastSearchCorner2=null;lastExpandedSegment=null;rectSpatialIndex;_step(){if(this.unprocessedSegments.length===0)return void(this.solved=!0);const e=this.unprocessedSegments.shift();this.lastSegment=e;const{dx:n,dy:o}=_qn[e.facingDirection],i=e.end.x-e.start.x,r=e.end.y-e.start.y,s=Math.sqrt(i**2+r**2),a=i/s,A=r/s;let c=null,l=1;const u={x:e.start.x+n*i7+a*i7*10,y:e.start.y+o*i7+A*i7*10},g={x:e.end.x+n*i7-a*i7*10,y:e.end.y+o*i7-A*i7*10};for(this.lastSearchCorner1=u,this.lastSearchCorner2=g;(!c||c.length===0)&&l<1e3;){const C=f_t([u,g,{x:u.x+n*l,y:u.y+o*l},{x:g.x+n*l,y:g.y+o*l}]);this.lastSearchBounds=C,c=this.rectSpatialIndex.search(C).filter(y=>y.availableZ.includes(e.z)).filter(y=>y.capacityMeshNodeId!==e.parent.capacityMeshNodeId),l*=4}if(!c||c.length===0)return;this.lastCollidingNodes=c;let h=1/0;for(const C of c){const y=K8(e.start,e.end,C);y<h&&(h=y)}const d=h,p=f_t([e.start,e.end,{x:e.start.x+n*d,y:e.start.y+o*d},{x:e.end.x+n*d,y:e.end.y+o*d}]),m={x:(p.minX+p.maxX)/2,y:(p.minY+p.maxY)/2},_=p.maxX-p.minX,f=p.maxY-p.minY,I={segment:e,newNode:{capacityMeshNodeId:`new-${e.parent.capacityMeshNodeId}-${this.expandedSegments.length}`,center:m,width:_,height:f,availableZ:[e.z],layer:e.parent.layer}};this.lastExpandedSegment=I,_<i7||f<i7||(this.expandedSegments.push(I),this.rectSpatialIndex.insert({...I.newNode,...p}))}getOutput(){return{expandedSegments:this.expandedSegments}}visualize(){const e={title:"ExpandEdgesToEmptySpace",coordinateSystem:"cartesian",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]};for(const n of this.input.inputMeshNodes)e.rects.push({center:n.center,width:n.width,height:n.height,stroke:"rgba(0, 0, 0, 0.1)",layer:`z${n.availableZ.join(",")}`,label:[`node ${n.capacityMeshNodeId}`,`z:${n.availableZ.join(",")}`].join(`
`)});for(const{newNode:n}of this.expandedSegments)e.rects.push({center:n.center,width:n.width,height:n.height,fill:"green",label:`expandedSegment (z=${n.availableZ.join(",")})`,layer:`z${n.availableZ.join(",")}`});if(this.lastSegment&&e.lines.push({points:[this.lastSegment.start,this.lastSegment.end],strokeColor:"rgba(0, 0, 255, 0.5)"}),this.lastSearchBounds&&e.rects.push({center:{x:(this.lastSearchBounds.minX+this.lastSearchBounds.maxX)/2,y:(this.lastSearchBounds.minY+this.lastSearchBounds.maxY)/2},width:this.lastSearchBounds.maxX-this.lastSearchBounds.minX,height:this.lastSearchBounds.maxY-this.lastSearchBounds.minY,fill:"rgba(0, 0, 255, 0.25)"}),this.lastSearchCorner1&&this.lastSearchCorner2&&(e.points.push({x:this.lastSearchCorner1.x,y:this.lastSearchCorner1.y,color:"rgba(0, 0, 255, 0.5)",label:["searchCorner1",`z=${this.lastSegment?.z}`].join(`
`)}),e.points.push({x:this.lastSearchCorner2.x,y:this.lastSearchCorner2.y,color:"rgba(0, 0, 255, 0.5)",label:["searchCorner2",`z=${this.lastSegment?.z}`].join(`
`)})),this.lastExpandedSegment&&e.rects.push({center:this.lastExpandedSegment.newNode.center,width:this.lastExpandedSegment.newNode.width,height:this.lastExpandedSegment.newNode.height,fill:"purple",label:`expandedSegment (z=${this.lastExpandedSegment.segment.z})`}),this.lastCollidingNodes)for(const n of this.lastCollidingNodes)e.rects.push({center:n.center,width:n.width,height:n.height,fill:"rgba(255, 0, 0, 0.5)"});return e}},vqn=class extends n7{findSegmentsWithAdjacentEmptySpaceSolver;expandEdgesToEmptySpaceSolver;outputNodes=[];passExpandedCounts=[];currentPassNodes=[];currentTargetNodes=[];currentPassIndex=0;expandedNodeIds=new Set;maxGapFillPasses=1;pipelineDef=[eh("findSegmentsWithAdjacentEmptySpaceSolver",Iqn,e=>[{allMeshNodes:e.currentPassNodes,targetMeshNodes:e.currentTargetNodes}],{onSolved:()=>{}}),eh("expandEdgesToEmptySpaceSolver",Qqn,e=>[{inputMeshNodes:e.currentPassNodes,segmentsWithAdjacentEmptySpace:e.findSegmentsWithAdjacentEmptySpaceSolver.getOutput().segmentsWithAdjacentEmptySpace,boardVoid:e.inputProblem.boardVoid}],{onSolved:e=>{e.completePass()}})];_setup(){this.outputNodes=[...this.inputProblem.meshNodes],this.currentPassNodes=[...this.inputProblem.meshNodes],this.currentTargetNodes=[...this.inputProblem.meshNodes],this.passExpandedCounts=[],this.currentPassIndex=0,this.expandedNodeIds.clear();const e=this.inputProblem.maxGapFillPasses;this.maxGapFillPasses=Number.isFinite(e)?Math.max(1,Math.floor(e)):1}completePass(){const e=(this.expandEdgesToEmptySpaceSolver?.getOutput().expandedSegments??[]).map(n=>n.newNode);for(const n of e)this.expandedNodeIds.add(n.capacityMeshNodeId);this.passExpandedCounts.push(e.length),this.currentPassNodes=[...this.currentPassNodes,...e],this.currentTargetNodes=e,this.outputNodes=this.currentPassNodes,e.length===0||this.currentPassIndex+1>=this.maxGapFillPasses||(this.currentPassIndex+=1,this.currentPipelineStageIndex=-1)}getOutput(){return{outputNodes:this.outputNodes.length?this.outputNodes:this.inputProblem.meshNodes}}initialVisualize(){const e={title:"GapFillSolverPipeline - Initial",coordinateSystem:"cartesian",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]};for(const n of this.inputProblem.meshNodes)e.rects.push({center:n.center,width:n.width,height:n.height,stroke:"rgba(0, 0, 0, 0.3)",fill:"rgba(100, 100, 100, 0.1)",layer:`z${n.availableZ.join(",")}`,label:[`node ${n.capacityMeshNodeId}`,`z:${n.availableZ.join(",")}`].join(`
`)});return e}finalVisualize(){const e={title:"GapFillSolverPipeline - Final",coordinateSystem:"cartesian",rects:[],points:[],lines:[],circles:[],infiniteLines:[],polygons:[],arrows:[],texts:[]},{outputNodes:n}=this.getOutput();for(const o of n){const i=this.expandedNodeIds.has(o.capacityMeshNodeId);e.rects.push({center:o.center,width:o.width,height:o.height,stroke:i?"rgba(0, 128, 0, 0.8)":"rgba(0, 0, 0, 0.3)",fill:i?"rgba(0, 200, 0, 0.3)":"rgba(100, 100, 100, 0.1)",layer:`z${o.availableZ.join(",")}`,label:[`${i?"[expanded] ":""}node ${o.capacityMeshNodeId}`,`z:${o.availableZ.join(",")}`].join(`
`)})}return e}};function b_t(t){const e=t.toLowerCase();if(e==="top")return-1e6;if(e==="bottom")return 1e6;const n=/^inner(\d+)$/i.exec(e);return n?parseInt(n[1],10)||0:100+e.charCodeAt(0)}function g7e(t){const e=(function(c){return Array.from(new Set(c)).sort((l,u)=>{const g=b_t(l),h=b_t(u);return g!==h?g-h:l.localeCompare(u)})})((t.obstacles??[]).flatMap(c=>c.layers??[])),n=Math.max(1,t.layerCount||e.length||1),o=Array.from({length:n},(c,l)=>l===0?"top":l===n-1?"bottom":`inner${l}`),i=[],r=new Set,s=c=>{const l=c.toLowerCase();r.has(l)||(r.add(l),i.push(c))};o.forEach(s),e.forEach(s);const a=i.slice(0,n),A=new Map;return a.forEach((c,l)=>A.set(c.toLowerCase(),l)),i.slice(a.length).forEach(c=>{const l=c.toLowerCase();A.set(l,(u=>{if(a.length<=1||u==="top")return 0;if(u==="bottom")return a.length-1;const g=/^inner(\d+)$/i.exec(u);if(g){if(a.length<=2)return a.length-1;const h=parseInt(g[1],10),d=a.length-2;return Math.min(d,Math.max(1,Number.isFinite(h)?h:1))}return 0})(l))}),{layerNames:a,zIndexByName:A}}function d7e(t,e){if(t.zLayers?.length)return Array.from(new Set(t.zLayers)).sort((o,i)=>o-i);const n=(t.layers??[]).map(o=>e.get(o.toLowerCase())).filter(o=>typeof o=="number");return Array.from(new Set(n)).sort((o,i)=>o-i)}function h7e(t){const e=t.width,n=t.height;return typeof e!="number"||typeof n!="number"?null:{x:t.center.x-e/2,y:t.center.y-n/2,width:e,height:n}}var Rse=t=>{const e=[{fill:"#dbeafe",stroke:"#3b82f6"},{fill:"#fef3c7",stroke:"#f59e0b"},{fill:"#d1fae5",stroke:"#10b981"},{fill:"#e9d5ff",stroke:"#a855f7"},{fill:"#fed7aa",stroke:"#f97316"},{fill:"#fecaca",stroke:"#ef4444"}];return e[Math.min(...t)%e.length]},Fi=1e-9,S_t=(t,e)=>t>e+Fi,Q_t=(t,e)=>t>e-Fi,v_t=(t,e)=>t<e-Fi,w_t=(t,e)=>t<e+Fi;function Rz(t,e){return!(t.x+t.width<=e.x+Fi||e.x+e.width<=t.x+Fi||t.y+t.height<=e.y+Fi||e.y+e.height<=t.y+Fi)}function Tse(t,e){const n=e.x,o=e.x+e.width,i=e.y,r=e.y+e.height;if(t.x>=n&&t.x<=o&&t.y>=i&&t.y<=r)return Math.min(t.x-n,o-t.x,t.y-i,r-t.y);const s=t.x<n?n-t.x:t.x>o?t.x-o:0,a=t.y<i?i-t.y:t.y>r?t.y-r:0;return s===0?a:a===0?s:Math.hypot(s,a)}function P_t(t,e){const n=Math.max(t[0],e[0]),o=Math.min(t[1],e[1]);return o>n+Fi?[n,o]:null}function M_t(t,e){if(!Rz(t,e))return[t];const n=P_t([t.x,t.x+t.width],[e.x,e.x+e.width]),o=P_t([t.y,t.y+t.height],[e.y,e.y+e.height]);if(!n||!o)return[t];const[i,r]=n,[s,a]=o,A=[];i>t.x+Fi&&A.push({x:t.x,y:t.y,width:i-t.x,height:t.height}),t.x+t.width>r+Fi&&A.push({x:r,y:t.y,width:t.x+t.width-r,height:t.height});const c=Math.max(0,r-i);return c>Fi&&s>t.y+Fi&&A.push({x:i,y:t.y,width:c,height:s-t.y}),c>Fi&&t.y+t.height>a+Fi&&A.push({x:i,y:a,width:c,height:t.y+t.height-a}),A.filter(l=>l.width>Fi&&l.height>Fi)}var p7e=(t,e)=>!e||e<=0?t:{x:t.x-e,y:t.y-e,width:t.width+2*e,height:t.height+2*e},jF=t=>({x:t.center.x-t.width/2,y:t.center.y-t.height/2,width:t.width,height:t.height}),D_t=t=>t.width*t.height,m7e=t=>({...t,center:{...t.center},availableZ:[...t.availableZ]}),wqn=(t,e,n)=>({...t,capacityMeshNodeId:n,center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,availableZ:[...t.availableZ],layer:`z${t.availableZ.join(",")}`}),_7e=t=>!t._containsObstacle&&!t._containsTarget,N_t=(t,e)=>t.availableZ.length===1&&t.availableZ[0]===e,Pqn=(t,e)=>Math.abs(t.x-e.x)<=Fi&&Math.abs(t.y-e.y)<=Fi&&Math.abs(t.width-e.width)<=Fi&&Math.abs(t.height-e.height)<=Fi,R_t=(t,e)=>{let n=[t];for(const o of e){if(n.length===0)return n;const i=[];for(const r of n)i.push(...M_t(r,o));n=i}return n},T_t=(t,e)=>R_t(t,e).length===0,Mqn=class extends zA{constructor(e){super(),this.input=e}input;outputNodes=[];promotedNodeIds=new Set;residualNodeIds=new Set;_setup(){this.outputNodes=this.input.meshNodes.map(m7e),this.promotedNodeIds.clear(),this.residualNodeIds.clear()}_step(){this.outputNodes=this.processOuterLayerContainmentMerges(),this.solved=!0}processOuterLayerContainmentMerges(){const e=this.input.simpleRouteJson,n=Math.max(1,e.layerCount||1);if(n<3)return this.input.meshNodes.map(m7e);const o=n-1,i=Math.max(e.minViaDiameter??0,e.minTraceWidth||0),r=this.input.meshNodes.map(m7e),s=this.buildObstaclesByLayer(n),a=r.filter(p=>_7e(p)&&(N_t(p,0)||N_t(p,o))),A=r.filter(p=>!a.includes(p)),c=new Map;c.set(0,r.filter(p=>_7e(p)&&p.availableZ.includes(0)).map(jF)),c.set(o,r.filter(p=>_7e(p)&&p.availableZ.includes(o)).map(jF));const l=[],u=[],g=a.filter(p=>p.width+Fi>=i&&p.height+Fi>=i).sort((p,m)=>D_t(jF(m))-D_t(jF(p)));for(const p of g){const m=p.availableZ[0],_=m===0?o:0,f=jF(p),I=c.get(_)??[];this.isTransitCompatibleAcrossIntermediateLayers({rect:f,fromZ:m,toZ:_,obstaclesByLayer:s})&&T_t(f,I)&&(l.push({...p,availableZ:[0,o],layer:`z0,${o}`}),u.push(f),this.promotedNodeIds.add(p.capacityMeshNodeId))}let h=0;const d=[];for(const p of a){if(this.promotedNodeIds.has(p.capacityMeshNodeId))continue;const m=jF(p),_=R_t(m,u);if(_.length===1&&Pqn(_[0],m))d.push(p);else for(const f of _){const I=wqn(p,f,`${p.capacityMeshNodeId}-outer-merge-${h++}`);d.push(I),this.residualNodeIds.add(I.capacityMeshNodeId)}}return[...A,...l,...d]}buildObstaclesByLayer(e){const n=Array.from({length:e},()=>[]);for(const o of this.input.simpleRouteJson.obstacles??[]){const i=h7e(o);if(!i)continue;const r=p7e(i,this.input.obstacleClearance??0),s=d7e(o,this.input.zIndexByName);for(const a of s)a<0||a>=e||n[a].push({obstacle:o,rect:r})}return n}isTransitCompatibleAcrossIntermediateLayers(e){const{rect:n,fromZ:o,toZ:i,obstaclesByLayer:r}=e,s=Math.min(o,i),a=Math.max(o,i);if(a-s<2)return!1;for(let A=s+1;A<a;A++){const c=(r[A]??[]).filter(u=>Rz(u.rect,n));if(c.length===0||c.some(u=>!u.obstacle.isCopperPour))return!1;const l=c.filter(u=>u.obstacle.isCopperPour).map(u=>u.rect);if(!T_t(n,l))return!1}return!0}getOutput(){return{outputNodes:this.outputNodes}}visualize(){return{title:"OuterLayerContainmentMergeSolver",coordinateSystem:"cartesian",rects:this.outputNodes.map(e=>{const n=Rse(e.availableZ),o=this.promotedNodeIds.has(e.capacityMeshNodeId),i=this.residualNodeIds.has(e.capacityMeshNodeId);return{center:e.center,width:e.width,height:e.height,stroke:o?"rgba(22, 163, 74, 0.95)":i?"rgba(37, 99, 235, 0.95)":n.stroke,fill:e._containsObstacle?"rgba(239, 68, 68, 0.35)":o?"rgba(34, 197, 94, 0.28)":i?"rgba(59, 130, 246, 0.18)":n.fill,layer:`z${e.availableZ.join(",")}`,label:[`node ${e.capacityMeshNodeId}`,`z:${e.availableZ.join(",")}`].join(`
`)}}),points:[],lines:[],texts:[]}}},kse=1e-9,Dqn=t=>Math.abs(t.rect.x+t.rect.width/2-t.startX)<kse&&Math.abs(t.rect.y+t.rect.height/2-t.startY)<kse&&Math.abs(t.rect.width-t.initialW)<kse&&Math.abs(t.rect.height-t.initialH)<kse,Nqn=({rect:t,bounds:e})=>({x:t.x,y:t.y,width:e.x+e.width-t.x,height:t.height}),Rqn=({rect:t,bounds:e})=>({x:t.x,y:t.y,width:t.width,height:e.y+e.height-t.y}),Tqn=({rect:t,bounds:e})=>({x:e.x,y:t.y,width:t.x-e.x,height:t.height}),kqn=({rect:t,bounds:e})=>({x:t.x,y:e.y,width:t.width,height:t.y-e.y}),Fse=(t,e=1e-6)=>Math.round(t/e)*e,Fqn=t=>({x:Fse(t.x),y:Fse(t.y),width:Fse(t.width),height:Fse(t.height)});function Lqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.x+n.width-e.x;for(const a of o)if(e.y+e.height>a.y+Fi&&a.y+a.height>e.y+Fi){if(Q_t(a.x,e.x+e.width))r=Math.min(r,a.x-e.x);else if(a.x+a.width>e.x+e.width-Fi&&a.x<e.x+e.width+Fi)return 0}let s=Math.max(0,r-e.width);if(s<=0)return 0;if(i!=null){const a=e.width,A=e.height;a>=A&&(s=Math.min(s,i*A-a))}return Math.max(0,s)}function Hqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.y+n.height-e.y;for(const a of o)if(e.x+e.width>a.x+Fi&&a.x+a.width>e.x+Fi){if(Q_t(a.y,e.y+e.height))r=Math.min(r,a.y-e.y);else if(a.y+a.height>e.y+e.height-Fi&&a.y<e.y+e.height+Fi)return 0}let s=Math.max(0,r-e.height);if(s<=0)return 0;if(i!=null){const a=e.width,A=e.height;A>=a&&(s=Math.min(s,i*a-A))}return Math.max(0,s)}function Oqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.x;for(const a of o)if(e.y+e.height>a.y+Fi&&a.y+a.height>e.y+Fi){if(w_t(a.x+a.width,e.x))r=Math.max(r,a.x+a.width);else if(a.x<e.x+Fi&&a.x+a.width>e.x-Fi)return 0}let s=Math.max(0,e.x-r);if(s<=0)return 0;if(i!=null){const a=e.width,A=e.height;a>=A&&(s=Math.min(s,i*A-a))}return Math.max(0,s)}function Gqn(t){const{r:e,bounds:n,blockers:o,maxAspect:i}=t;let r=n.y;for(const a of o)if(e.x+e.width>a.x+Fi&&a.x+a.width>e.x+Fi){if(w_t(a.y+a.height,e.y))r=Math.max(r,a.y+a.height);else if(a.y<e.y+Fi&&a.y+a.height>e.y-Fi)return 0}let s=Math.max(0,e.y-r);if(s<=0)return 0;if(i!=null){const a=e.width,A=e.height;A>=a&&(s=Math.min(s,i*a-A))}return Math.max(0,s)}var k_t=t=>{const{rect:e,seen:n,blockers:o}=t;n.has(e)||(n.add(e),o.push(e))};function F_t(t){const{startX:e,startY:n,gridSize:o,bounds:i,obsticalIndexByLayer:r,placedIndexByLayer:s,initialCellRatio:a,maxAspectRatio:A,minReq:c}=t,l=Math.max(1e-9,o*a),u=Math.max(l,c.width),g=Math.max(l,c.height),h=[],d=new Set,p=s.length,m=C=>{const y=(x=>{const{bounds:E,rect:B}=x,S=Math.max(E.x,B.x),Q=Math.max(E.y,B.y),w=Math.min(E.x+E.width,B.x+B.width),M=Math.min(E.y+E.height,B.y+B.height);return w<=S+Fi||M<=Q+Fi?null:{minX:S,minY:Q,maxX:w,maxY:M}})({bounds:i,rect:C});if(y)for(const x of t.zLayers){const E=r[x];if(E)for(const S of E.search(y))k_t({rect:S,seen:d,blockers:h});const B=s[x];if(B)for(const S of B.search(y))S.zLayers.length>=p&&(Dqn({rect:S,startX:e,startY:n,initialW:u,initialH:g})||k_t({rect:S,seen:d,blockers:h}))}},_=[{ox:0,oy:0},{ox:-u,oy:0},{ox:0,oy:-g},{ox:-u,oy:-g},{ox:-u/2,oy:-g/2}];let f=null,I=0;e:for(const C of _){let y={x:e+C.ox,y:n+C.oy,width:u,height:g};if(m(y),v_t(y.x,i.x)||v_t(y.y,i.y)||S_t(y.x+y.width,i.x+i.width)||S_t(y.y+y.height,i.y+i.height))continue;for(const Q of h)if(Rz(y,Q))continue e;const x=1e-6,E=1e3;let B=!0,S=0;for(;B&&S<E;){S++,B=!1;const Q={bounds:i,blockers:h,maxAspect:A};m(Nqn({rect:y,bounds:i}));const w=Lqn({...Q,r:y});w>x&&(y={...y,width:y.width+w},m(y),B=!0),m(Rqn({rect:y,bounds:i}));const M=Hqn({...Q,r:y});M>x&&(y={...y,height:y.height+M},m(y),B=!0),m(Tqn({rect:y,bounds:i}));const k=Oqn({...Q,r:y});k>x&&(y={x:y.x-k,y:y.y,width:y.width+k,height:y.height},m(y),B=!0),m(kqn({rect:y,bounds:i}));const R=Gqn({...Q,r:y});R>x&&(y={x:y.x,y:y.y-R,width:y.width,height:y.height+R},m(y),B=!0)}if(y.width+Fi>=c.width&&y.height+Fi>=c.height){const Q=y.width*y.height;Q>I&&(f=Fqn(y),I=Q)}}return f}function Yqn(t){const e=Math.max(t.width,t.height);return[e/8,e/16,e/32]}function f7e(t){const e={minX:t.point.x,minY:t.point.y,maxX:t.point.x,maxY:t.point.y};for(let n=0;n<t.layerCount;n++){const o=t.obstacleIndexByLayer[n],i=!!o&&o.collides(e),r=t.placedIndexByLayer[n],s=!!r&&r.collides(e);if(!i&&!s)return!1}return!0}function I7e(t){const{x:e,y:n,z:o,layerCount:i,minSpan:r,maxSpan:s,obstacleIndexByLayer:a,additionalBlockersByLayer:A}=t,c=h=>{const d={minX:e,minY:n,maxX:e,maxY:n},p=a[h];return p&&p.collides(d)?!1:!(A?.[h]??[]).some(m=>{return(f={x:e,y:n}).x>=(_=m).x-Fi&&f.x<=_.x+_.width+Fi&&f.y>=_.y-Fi&&f.y<=_.y+_.height+Fi;var _,f})};let l=o,u=o;for(;l-1>=0&&c(l-1);)l--;for(;u+1<i&&c(u+1);)u++;if(typeof s=="number"){const h=((d,p,m)=>Math.max(p,Math.min(m,d)))(s,1,i);for(;u-l+1>h;)o-l>u-o?l++:u--}const g=[];for(let h=l;h<=u;h++)g.push(h);return g.length>=r?g:[]}var Uqn=(t,e=1e-6)=>Math.round(t/e)*e,eB=(t,e=1e-6)=>Math.round(t/e)*e,Kqn=t=>"minX"in t?{x:t.minX,y:t.minY,width:t.maxX-t.minX,height:t.maxY-t.minY}:t;function VQ(t){const{lineStart:e,lineEnd:n,coveringIntervals:o,minSegmentLength:i}=t,r=eB(e),s=eB(n),a=o.map(g=>{const h=eB(g.start),d=eB(g.end);return{start:Math.min(h,d),end:Math.max(h,d)}}).filter(g=>g.end>g.start+Fi);if(a.length===0)return[{start:r,end:s,center:(r+s)/2}];const A=[...a].sort((g,h)=>g.start-h.start),c=[];let l={...A[0]};for(let g=1;g<A.length;g++){const h=A[g];h.start<=l.end+Fi?l.end=Math.max(l.end,h.end):(c.push(l),l={...h})}c.push(l);const u=[];if(c[0].start>r+Fi){const g=r,h=c[0].start;h-g>=i&&u.push({start:g,end:h,center:(g+h)/2})}for(let g=0;g<c.length-1;g++){const h=c[g].end,d=c[g+1].start;d-h>=i&&u.push({start:h,end:d,center:(h+d)/2})}if(c[c.length-1].end<s-Fi){const g=c[c.length-1].end,h=s;h-g>=i&&u.push({start:g,end:h,center:(g+h)/2})}return u}function Vqn(t){const{bounds:e,minSize:n,layerCount:o,obstacleIndexByLayer:i,placedIndexByLayer:r,hardPlacedByLayer:s}=t,a=[],A=Math.max(.15*n,3*Fi),c=new Set,l=Array.from({length:o},(g,h)=>[...i[h]?.all()??[],...s[h]??[]].map(Kqn));function u(g){const h=eB(g.x),d=eB(g.y),{z:p}=g,m=h,_=d;if(m<e.x+Fi||_<e.y+Fi||m>e.x+e.width-Fi||_>e.y+e.height-Fi||(function(E){return f7e({layerCount:o,obstacleIndexByLayer:i,placedIndexByLayer:r,point:E})})({x:m,y:_}))return;const f=l[p]??[];let I=Tse({x:m,y:_},e);for(const E of f)I=Math.min(I,Tse({x:m,y:_},E));const C=eB(I),y=(E=>`${E.z}|${E.x.toFixed(6)}|${E.y.toFixed(6)}`)({x:m,y:_,z:p});if(c.has(y))return;c.add(y);const x=I7e({x:m,y:_,z:p,layerCount:o,minSpan:1,maxSpan:void 0,obstacleIndexByLayer:i,additionalBlockersByLayer:s});a.push({x:m,y:_,z:p,distance:C,zSpanLen:x.length,isEdgeSeed:!0})}for(let g=0;g<o;g++){const h=(l[g]??[]).map(w=>({x:eB(w.x),y:eB(w.y),width:eB(w.width),height:eB(w.height)})),d=[{x:e.x+A,y:e.y+A},{x:e.x+e.width-A,y:e.y+A},{x:e.x+A,y:e.y+e.height-A},{x:e.x+e.width-A,y:e.y+e.height-A}];for(const w of d)u({x:w.x,y:w.y,z:g});const p=e.y+A,m=h.filter(w=>w.y<=p&&w.y+w.height>=p).map(w=>({start:Math.max(e.x,w.x),end:Math.min(e.x+e.width,w.x+w.width)})),_=VQ({lineStart:e.x+A,lineEnd:e.x+e.width-A,coveringIntervals:m,minSegmentLength:.5*n});for(const w of _){const M=w.end-w.start;M>=n&&(u({x:w.center,y:p,z:g}),M>1.5*n&&(u({x:w.start+.4*n,y:p,z:g}),u({x:w.end-.4*n,y:p,z:g})))}const f=e.y+e.height-A,I=h.filter(w=>w.y<=f&&w.y+w.height>=f).map(w=>({start:Math.max(e.x,w.x),end:Math.min(e.x+e.width,w.x+w.width)})),C=VQ({lineStart:e.x+A,lineEnd:e.x+e.width-A,coveringIntervals:I,minSegmentLength:.5*n});for(const w of C){const M=w.end-w.start;M>=n&&(u({x:w.center,y:f,z:g}),M>1.5*n&&(u({x:w.start+.4*n,y:f,z:g}),u({x:w.end-.4*n,y:f,z:g})))}const y=e.x+A,x=h.filter(w=>w.x<=y&&w.x+w.width>=y).map(w=>({start:Math.max(e.y,w.y),end:Math.min(e.y+e.height,w.y+w.height)})),E=VQ({lineStart:e.y+A,lineEnd:e.y+e.height-A,coveringIntervals:x,minSegmentLength:.5*n});for(const w of E){const M=w.end-w.start;M>=n&&(u({x:y,y:w.center,z:g}),M>1.5*n&&(u({x:y,y:w.start+.4*n,z:g}),u({x:y,y:w.end-.4*n,z:g})))}const B=e.x+e.width-A,S=h.filter(w=>w.x<=B&&w.x+w.width>=B).map(w=>({start:Math.max(e.y,w.y),end:Math.min(e.y+e.height,w.y+w.height)})),Q=VQ({lineStart:e.y+A,lineEnd:e.y+e.height-A,coveringIntervals:S,minSegmentLength:.5*n});for(const w of Q){const M=w.end-w.start;M>=n&&(u({x:B,y:w.center,z:g}),M>1.5*n&&(u({x:B,y:w.start+.4*n,z:g}),u({x:B,y:w.end-.4*n,z:g})))}for(const w of h){const M=w.x-A;if(M>e.x+Fi&&M<e.x+e.width-Fi){const O=h.filter(Y=>Y!==w&&Y.x<=M&&Y.x+Y.width>=M).map(Y=>({start:Math.max(w.y,Y.y),end:Math.min(w.y+w.height,Y.y+Y.height)})),U=VQ({lineStart:w.y,lineEnd:w.y+w.height,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:M,y:Y.center,z:g})}const k=w.x+w.width+A;if(k>e.x+Fi&&k<e.x+e.width-Fi){const O=h.filter(Y=>Y!==w&&Y.x<=k&&Y.x+Y.width>=k).map(Y=>({start:Math.max(w.y,Y.y),end:Math.min(w.y+w.height,Y.y+Y.height)})),U=VQ({lineStart:w.y,lineEnd:w.y+w.height,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:k,y:Y.center,z:g})}const R=w.y-A;if(R>e.y+Fi&&R<e.y+e.height-Fi){const O=h.filter(Y=>Y!==w&&Y.y<=R&&Y.y+Y.height>=R).map(Y=>({start:Math.max(w.x,Y.x),end:Math.min(w.x+w.width,Y.x+Y.width)})),U=VQ({lineStart:w.x,lineEnd:w.x+w.width,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:Y.center,y:R,z:g})}const F=w.y+w.height+A;if(F>e.y+Fi&&F<e.y+e.height-Fi){const O=h.filter(Y=>Y!==w&&Y.y<=F&&Y.y+Y.height>=F).map(Y=>({start:Math.max(w.x,Y.x),end:Math.min(w.x+w.width,Y.x+Y.width)})),U=VQ({lineStart:w.x,lineEnd:w.x+w.width,coveringIntervals:O,minSegmentLength:.5*n});for(const Y of U)u({x:Y.center,y:F,z:g})}}}return a.sort((g,h)=>h.zSpanLen-g.zSpanLen||h.distance-g.distance||g.z-h.z||g.x-h.x||g.y-h.y),a}function zqn(t){const e=Array.from({length:t.layerCount},()=>[]);for(const n of t.placed)if(n.zLayers.length>=t.layerCount)for(const o of n.zLayers)e[o].push(n.rect);return e}var $F=(t,e)=>({...t,minX:t.x,minY:t.y,maxX:t.x+t.width,maxY:t.y+t.height,zLayers:e.zLayers});function L_t(t,e){const n=t.placed[e],{rect:o,zLayers:i}=n,r=t.layerCount,s=[],a=[];for(let c=0;c<t.placed.length;c++){if(c===e)continue;const l=t.placed[c];if(l.zLayers.length>=r)continue;const u=l.zLayers.filter(m=>i.includes(m));if(u.length===0||!Rz(l.rect,o))continue;const g=M_t(l.rect,o);s.push(c);const h=l.zLayers.filter(m=>!i.includes(m));h.length>0&&a.push({rect:l.rect,zLayers:h});const d=Math.min(t.options.minSingle.width,t.options.minMulti.width),p=Math.min(t.options.minSingle.height,t.options.minMulti.height);for(const m of g)m.width+Fi>=d&&m.height+Fi>=p&&a.push({rect:m,zLayers:u.slice()})}const A=(c,l)=>c.minX===l.minX&&c.minY===l.minY&&c.maxX===l.maxX&&c.maxY===l.maxY;s.sort((c,l)=>l-c).forEach(c=>{const l=t.placed.splice(c,1)[0];if(t.placedIndexByLayer)for(const u of l.zLayers){const g=t.placedIndexByLayer[u];g&&g.remove($F(l.rect,{zLayers:l.zLayers}),A)}});for(const c of a){t.placed.push(c);for(const l of c.zLayers)if(t.placedIndexByLayer){const u=t.placedIndexByLayer[l];u&&u.insert($F(c.rect,{zLayers:c.zLayers.slice()}))}}}var Jqn=class extends zA{constructor(e){super(),this.input=e}input;srj;layerNames;layerCount;bounds;options;boardVoidRects;gridIndex;candidates;placed;placedIndexByLayer;hardPlacedByLayer;expansionIndex;edgeAnalysisDone;totalSeedsThisGrid;consumedSeedsThisGrid;_setup(){const e=this.input.simpleRouteJson,n=this.input.gridOptions??{},o=this.input.layerNames&&this.input.zIndexByName,{layerNames:i}=o?{layerNames:this.input.layerNames,zIndexByName:this.input.zIndexByName}:g7e({obstacles:e.obstacles,layerCount:e.layerCount}),r=Math.max(1,i.length,e.layerCount||1),s={x:e.bounds.minX,y:e.bounds.minY,width:e.bounds.maxX-e.bounds.minX,height:e.bounds.maxY-e.bounds.minY},a=Math.max(.01,e.minTraceWidth||.15),A={gridSizes:[],initialCellRatio:.2,maxAspectRatio:3,minSingle:{width:2*a,height:2*a},minMulti:{width:4*a,height:4*a,minLayers:Math.min(2,Math.max(1,e.layerCount||1))},preferMultiLayer:!0,maxMultiLayerSpan:void 0,...n,gridSizes:n.gridSizes??Yqn(s)};this.srj=e,this.layerNames=i,this.layerCount=r,this.bounds=s,this.options=A,this.boardVoidRects=this.input.boardVoidRects,this.gridIndex=0,this.candidates=[],this.placed=[],this.placedIndexByLayer=Array.from({length:r},()=>new vz),this.hardPlacedByLayer=Array.from({length:r},()=>[]),this.expansionIndex=0,this.edgeAnalysisDone=!1,this.totalSeedsThisGrid=0,this.consumedSeedsThisGrid=0,this.stats={gridIndex:this.gridIndex}}_step(){this._stepGrid(),this.stats.gridIndex=this.gridIndex,this.stats.placed=this.placed.length}_stepGrid(){const{gridSizes:e,initialCellRatio:n,maxAspectRatio:o,minSingle:i,minMulti:r,preferMultiLayer:s,maxMultiLayerSpan:a}=this.options,A=e[this.gridIndex];if(this.candidates.length===0&&this.consumedSeedsThisGrid===0&&(this.candidates=(function(h){const{bounds:d,gridSize:p,layerCount:m,obstacleIndexByLayer:_,placedIndexByLayer:f,hardPlacedByLayer:I}=h,C=new Map,y=Array.from({length:m},(E,B)=>[..._[B]?.all()??[],...I[B]??[]]);for(let E=d.x;E<d.x+d.width;E+=p)for(let B=d.y;B<d.y+d.height;B+=p){if(Math.abs(E-d.x)<Fi||Math.abs(B-d.y)<Fi||E>d.x+d.width-p-Fi||B>d.y+d.height-p-Fi||f7e({layerCount:m,obstacleIndexByLayer:_,placedIndexByLayer:f,point:{x:E,y:B}}))continue;let S=[],Q=0;for(let Y=0;Y<m;Y++){const W=I7e({x:E,y:B,z:Y,layerCount:m,minSpan:1,maxSpan:void 0,obstacleIndexByLayer:_,additionalBlockersByLayer:I});W.length>S.length&&(S=W,Q=Y)}const w=S.length?S[Math.floor(S.length/2)]:Q,M=y[w]??[];let k=Tse({x:E,y:B},d);for(const Y of M)k=Math.min(k,Tse({x:E,y:B},Y));const R=Uqn(k),F=`${E.toFixed(6)}|${B.toFixed(6)}`,O={x:E,y:B,z:w,distance:R,zSpanLen:S.length},U=C.get(F);(!U||O.zSpanLen>(U.zSpanLen??0)||O.zSpanLen===U.zSpanLen&&O.distance>U.distance)&&C.set(F,O)}const x=Array.from(C.values());return x.sort((E,B)=>B.zSpanLen-E.zSpanLen||B.distance-E.distance||E.z-B.z||E.x-B.x||E.y-B.y),x})({bounds:this.bounds,gridSize:A,layerCount:this.layerCount,hardPlacedByLayer:this.hardPlacedByLayer,obstacleIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer}),this.totalSeedsThisGrid=this.candidates.length,this.consumedSeedsThisGrid=0),this.consumedSeedsThisGrid>=this.candidates.length){if(this.gridIndex+1<e.length)return this.gridIndex+=1,this.candidates=[],this.totalSeedsThisGrid=0,void(this.consumedSeedsThisGrid=0);if(!this.edgeAnalysisDone){const h=Math.min(i.width,i.height);return this.candidates=Vqn({bounds:this.bounds,minSize:h,layerCount:this.layerCount,obstacleIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,hardPlacedByLayer:this.hardPlacedByLayer}),this.edgeAnalysisDone=!0,this.totalSeedsThisGrid=this.candidates.length,void(this.consumedSeedsThisGrid=0)}return this.candidates=[],this.solved=!0,void(this.expansionIndex=0)}const c=this.candidates[this.consumedSeedsThisGrid++];if(f7e({layerCount:this.layerCount,obstacleIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,point:{x:c.x,y:c.y}}))return;const l=I7e({x:c.x,y:c.y,z:c.z,layerCount:this.layerCount,minSpan:r.minLayers,maxSpan:a,obstacleIndexByLayer:this.input.obstacleIndexByLayer,additionalBlockersByLayer:this.hardPlacedByLayer}),u=[];l.length>=r.minLayers&&u.push({kind:"multi",layers:l,minReq:{width:r.width,height:r.height}}),u.push({kind:"single",layers:[c.z],minReq:{width:i.width,height:i.height}});const g=s?u:u.reverse();for(const h of g){const d=F_t({startX:c.x,startY:c.y,gridSize:A,bounds:this.bounds,obsticalIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,initialCellRatio:n,maxAspectRatio:o,minReq:h.minReq,zLayers:h.layers});if(!d)continue;const p={rect:d,zLayers:[...h.layers]},m=this.placed.push(p)-1;for(const _ of h.layers){const f=this.placedIndexByLayer[_];f&&f.insert($F(d,{zLayers:p.zLayers}))}return L_t({layerCount:this.layerCount,placed:this.placed,options:this.options,placedIndexByLayer:this.placedIndexByLayer},m),void(this.hardPlacedByLayer=zqn({layerCount:this.layerCount,placed:this.placed}))}}computeProgress(){if(this.solved)return 1;const e=this.options.gridSizes.length,n=this.gridIndex/(e+1),o=Math.max(1,this.totalSeedsThisGrid),i=o?this.consumedSeedsThisGrid/o:1;return Math.min(.999,n+i*(1/(e+1)))}getOutput(){return{layerNames:this.layerNames,layerCount:this.layerCount,bounds:this.bounds,options:this.options,boardVoidRects:this.boardVoidRects,gridIndex:this.gridIndex,candidates:this.candidates,placed:this.placed,expansionIndex:this.expansionIndex,edgeAnalysisDone:this.edgeAnalysisDone,totalSeedsThisGrid:this.totalSeedsThisGrid,consumedSeedsThisGrid:this.consumedSeedsThisGrid,obstacles:this.srj.obstacles,obstacleClearance:this.input.obstacleClearance}}visualize(){const e=[],n=[],o=[],i=this.srj??this.input.simpleRouteJson,r=i.bounds.minX,s=i.bounds.maxX,a=i.bounds.minY,A=i.bounds.maxY;i.outline&&i.outline.length>1?o.push({points:[...i.outline,i.outline[0]],strokeColor:"#111827",strokeWidth:.01,label:"outline"}):e.push({center:{x:(r+s)/2,y:(a+A)/2},width:s-r,height:A-a,fill:"none",stroke:"#111827",label:"board"});for(const c of i.obstacles??[])c.type!=="rect"&&c.type!=="oval"||e.push({center:{x:c.center.x,y:c.center.y},width:c.width,height:c.height,fill:"#fee2e2",stroke:"#ef4444",layer:"obstacle",label:"obstacle"});if(this.boardVoidRects){let c=null;if(i.outline&&i.outline.length>0){const l=i.outline.map(d=>d.x),u=i.outline.map(d=>d.y),g=Math.min(...l),h=Math.min(...u);c={x:g,y:h,width:Math.max(...l)-g,height:Math.max(...u)-h}}for(const l of this.boardVoidRects)c&&!Rz(l,c)||e.push({center:{x:l.x+l.width/2,y:l.y+l.height/2},width:l.width,height:l.height,fill:"rgba(0, 0, 0, 0.5)",stroke:"none",label:"void"})}if(this.candidates?.length)for(const c of this.candidates)n.push({x:c.x,y:c.y,label:`z:${c.z}`});if(this.placed?.length)for(const c of this.placed){const l=Rse(c.zLayers);e.push({center:{x:c.rect.x+c.rect.width/2,y:c.rect.y+c.rect.height/2},width:c.rect.width,height:c.rect.height,fill:l.fill,stroke:l.stroke,layer:`z${c.zLayers.join(",")}`,label:`free
z:${c.zLayers.join(",")}`})}return{title:"RectDiff Grid",coordinateSystem:"cartesian",rects:e,points:n,lines:o}}},Wqn=(t,e)=>t.minX===e.minX&&t.minY===e.minY&&t.maxX===e.maxX&&t.maxY===e.maxY,jqn=class extends zA{constructor(e){super(),this.input=e}input;placedIndexByLayer=[];_meshNodes=[];_setup(){this.stats={gridIndex:this.input.gridIndex},this.placedIndexByLayer=Array.from({length:this.input.layerCount},()=>new vz);for(const e of this.input.placed)for(const n of e.zLayers){const o=this.placedIndexByLayer[n];o&&o.insert($F(e.rect,{zLayers:e.zLayers}))}}_step(){this.solved||(this._stepExpansion(),this.stats.gridIndex=this.input.gridIndex,this.stats.placed=this.input.placed.length,this.input.expansionIndex>=this.input.placed.length&&this.finalizeIfNeeded())}_stepExpansion(){if(this.input.expansionIndex>=this.input.placed.length)return;const e=this.input.expansionIndex,n=this.input.placed[e],o=this.input.options.gridSizes[this.input.options.gridSizes.length-1],i=n.rect,r=F_t({startX:n.rect.x+n.rect.width/2,startY:n.rect.y+n.rect.height/2,gridSize:o,bounds:this.input.bounds,obsticalIndexByLayer:this.input.obstacleIndexByLayer,placedIndexByLayer:this.placedIndexByLayer,initialCellRatio:0,maxAspectRatio:null,minReq:{width:n.rect.width,height:n.rect.height},zLayers:n.zLayers});if(r){this.input.placed[e]={rect:r,zLayers:n.zLayers};for(const s of n.zLayers){const a=this.placedIndexByLayer[s];a&&(a.remove($F(i,{zLayers:n.zLayers}),Wqn),a.insert($F(r,{zLayers:n.zLayers})))}L_t({layerCount:this.input.layerCount,placed:this.input.placed,options:this.input.options,placedIndexByLayer:this.placedIndexByLayer},e)}this.input.expansionIndex+=1}finalizeIfNeeded(){if(this.solved)return;const e=(function(n){const o=n.placed.map(i=>({minX:i.rect.x,minY:i.rect.y,maxX:i.rect.x+i.rect.width,maxY:i.rect.y+i.rect.height,zLayers:[...i.zLayers].sort((r,s)=>r-s)}));for(const i of n.obstacles??[]){const r=h7e(i);if(!r)continue;const s=n.obstacleClearance?{x:r.x-n.obstacleClearance,y:r.y-n.obstacleClearance,width:r.width+2*n.obstacleClearance,height:r.height+2*n.obstacleClearance}:r,a=i.zLayers?.length&&i.zLayers.length>0?i.zLayers:d7e(i,n.zIndexByName);o.push({minX:s.x,minY:s.y,maxX:s.x+s.width,maxY:s.y+s.height,zLayers:[...new Set(a)].sort((A,c)=>A-c),isObstacle:!0,connectedTo:[...i.connectedTo]})}return o})({placed:this.input.placed,obstacles:this.input.obstacles,zIndexByName:this.input.zIndexByName,boardVoidRects:this.input.boardVoidRects,obstacleClearance:this.input.obstacleClearance});this._meshNodes=(function(n){let o=0;const i=[];for(const r of n){const s=Math.max(0,r.maxX-r.minX),a=Math.max(0,r.maxY-r.minY);s<=0||a<=0||r.zLayers.length===0||i.push({capacityMeshNodeId:"cmn_"+o++,center:{x:(r.minX+r.maxX)/2,y:(r.minY+r.maxY)/2},width:s,height:a,layer:"top",availableZ:r.zLayers.slice(),_containsObstacle:r.isObstacle,_containsTarget:r.isObstacle,...r.connectedTo?.length?{_connectedTo:[...r.connectedTo]}:{}})}return i})(e),this.solved=!0}computeProgress(){if(this.solved)return 1;const e=this.input.options.gridSizes.length,n=e/(e+1),o=Math.max(1,this.input.placed.length),i=o?this.input.expansionIndex/o:1;return Math.min(.999,n+i*(1/(e+1)))}getOutput(){return this.solved?{meshNodes:this._meshNodes}:{meshNodes:this.input.placed.map((e,n)=>({capacityMeshNodeId:`expand-preview-${n}`,center:{x:e.rect.x+e.rect.width/2,y:e.rect.y+e.rect.height/2},width:e.rect.width,height:e.rect.height,availableZ:e.zLayers.slice(),layer:`z${e.zLayers.join(",")}`}))}}visualize(){const e=[];for(const n of this.input.placed??[])e.push({center:{x:n.rect.x+n.rect.width/2,y:n.rect.y+n.rect.height/2},width:n.rect.width,height:n.rect.height,stroke:"rgba(37, 99, 235, 0.9)",fill:"rgba(191, 219, 254, 0.5)",layer:`z${n.zLayers.join(",")}`,label:`expanded
z:${n.zLayers.join(",")}`});return{title:"RectDiff Expansion",coordinateSystem:"cartesian",rects:e,points:[],lines:[]}}},$qn=class extends n7{rectDiffSeedingSolver;rectDiffExpansionSolver;obstacleIndexByLayer;layerNames;zIndexByName;constructor(e){super(e);const{obstacleIndexByLayer:n,layerNames:o,zIndexByName:i}=(r=>{const{srj:s,boardVoidRects:a,obstacleClearance:A}=r,{layerNames:c,zIndexByName:l}=g7e({obstacles:s.obstacles,layerCount:s.layerCount}),u=Math.max(1,c.length,s.layerCount||1),g=(s.bounds.minX,s.bounds.minY,s.bounds.maxX,s.bounds.minX,s.bounds.maxY,s.bounds.minY,Array.from({length:u},()=>new vz)),h=(d,p)=>{const m={...d,minX:d.x,minY:d.y,maxX:d.x+d.width,maxY:d.y+d.height,zLayers:[p]};g[p]?.insert(m)};if(s.outline&&s.outline.length>2)for(const d of a??[])for(let p=0;p<u;p++)h(d,p);for(const d of s.obstacles??[]){const p=h7e(d);if(!p)continue;const m=p7e(p,A??0),_=d7e(d,l),f=_.filter(I=>I<0||I>=u);if(f.length)throw new Error(`RectDiff: obstacle uses z-layer indices ${f.join(",")} outside 0-${u-1}`);d.zLayers&&d.zLayers.length!==0||!_.length||(d.zLayers=_);for(const I of _)h(m,I)}return{obstacleIndexByLayer:g,layerNames:c,zIndexByName:l}})({srj:{bounds:e.bounds,obstacles:e.obstacles,connections:e.connections,outline:e.outline?.outline,layerCount:e.layerCount,minTraceWidth:e.minTraceWidth},boardVoidRects:e.boardVoidRects,obstacleClearance:e.obstacleClearance});this.obstacleIndexByLayer=n,this.layerNames=e.layerNames??o,this.zIndexByName=e.zIndexByName??i}pipelineDef=[eh("rectDiffSeedingSolver",Jqn,e=>[{simpleRouteJson:{bounds:e.inputProblem.bounds,obstacles:e.inputProblem.obstacles,connections:e.inputProblem.connections,outline:e.inputProblem.outline?.outline,layerCount:e.inputProblem.layerCount,minTraceWidth:e.inputProblem.minTraceWidth},gridOptions:e.inputProblem.gridOptions,obstacleIndexByLayer:e.obstacleIndexByLayer,boardVoidRects:e.inputProblem.boardVoidRects,layerNames:e.layerNames,zIndexByName:e.zIndexByName,obstacleClearance:e.inputProblem.obstacleClearance}]),eh("rectDiffExpansionSolver",jqn,e=>{const n=e.rectDiffSeedingSolver?.getOutput();if(!n)throw new Error("RectDiffSeedingSolver did not produce output");return[{layerNames:n.layerNames??[],boardVoidRects:e.inputProblem.boardVoidRects??[],layerCount:e.inputProblem.layerCount,bounds:n.bounds,candidates:n.candidates,consumedSeedsThisGrid:n.placed.length,totalSeedsThisGrid:n.candidates.length,placed:n.placed,edgeAnalysisDone:n.edgeAnalysisDone,gridIndex:n.gridIndex,expansionIndex:n.expansionIndex,obstacleIndexByLayer:e.obstacleIndexByLayer,options:n.options,zIndexByName:e.zIndexByName,layerNamesCanonical:e.layerNames,obstacles:e.inputProblem.obstacles,obstacleClearance:e.inputProblem.obstacleClearance}]})];getConstructorParams(){return[this.inputProblem]}getOutput(){return this.rectDiffExpansionSolver?this.rectDiffExpansionSolver.getOutput():this.rectDiffSeedingSolver?{meshNodes:this.rectDiffSeedingSolver.getOutput().placed.map((e,n)=>({capacityMeshNodeId:`grid-${n}`,center:{x:e.rect.x+e.rect.width/2,y:e.rect.y+e.rect.height/2},width:e.rect.width,height:e.rect.height,availableZ:e.zLayers,layer:`z${e.zLayers.join(",")}`}))}:{meshNodes:[]}}visualize(){return this.rectDiffExpansionSolver?this.rectDiffExpansionSolver.visualize():this.rectDiffSeedingSolver?this.rectDiffSeedingSolver.visualize():{title:"RectDiff Grid Pipeline",coordinateSystem:"cartesian",rects:[],points:[],lines:[]}}},H_t=t=>{const{srj:e,clearance:n}=t,o=n??0;if(o<=0)return{title:"Obstacle Clearance",coordinateSystem:"cartesian",rects:[]};const i=[];for(const r of e.obstacles??[]){if(r.type!=="rect"&&r.type!=="oval")continue;const s={x:r.center.x-r.width/2-o,y:r.center.y-r.height/2-o,width:r.width+2*o,height:r.height+2*o};i.push({center:{x:s.x+s.width/2,y:s.y+s.height/2},width:s.width,height:s.height,stroke:"rgba(202, 138, 4, 0.9)",fill:"rgba(234, 179, 8, 0.15)",layer:"obstacle-clearance",label:`clearance
z:${(r.zLayers??[]).join(",")||"all"}`})}return{title:"Obstacle Clearance",coordinateSystem:"cartesian",rects:i}};function qqn(t,e,n={}){if(!e||e.length<3)return[];const o=e.length>120,i=o?(function(h,d){const p=f=>Math.round(f/d)*d,m=new Set,_=[];for(const f of h){const I=p(f.x),C=p(f.y),y=`${I},${C}`;m.has(y)||(m.add(y),_.push({x:I,y:C}))}return _})(e,Math.max(t.width,t.height)/120):e,r=new Set([t.x,t.x+t.width]),s=new Set([t.y,t.y+t.height]);for(const h of i)r.add(h.x),s.add(h.y);(function({polygon:h,xs:d,ys:p,minGridSize:m}){const _=[];let f=0;for(let C=0;C<h.length;C++){const y=h[C],x=h[(C+1)%h.length],E=Math.abs(x.x-y.x),B=Math.abs(x.y-y.y);if(E<=Fi||B<=Fi)continue;const S=Math.max(E,B);_.push({start:y,end:x,span:S}),f+=S}if(_.length===0)return;const I=Math.max(m,f/256);for(const{start:C,end:y,span:x}of _){const E=Math.max(1,Math.ceil(x/I));for(let B=1;B<E;B++){const S=B/E;d.add(C.x+(y.x-C.x)*S),p.add(C.y+(y.y-C.y)*S)}}})({polygon:i,xs:r,ys:s,minGridSize:Math.max(Fi,n.minGridSize??Math.max(t.width,t.height)/256)});const a=Array.from(r).sort((h,d)=>h-d),A=Array.from(s).sort((h,d)=>h-d),c=[];for(let h=0;h<a.length-1;h++)for(let d=0;d<A.length-1;d++){const p=a[h],m=a[h+1],_=A[d],f=A[d+1],I=(p+m)/2,C=(_+f)/2;I>=t.x&&I<=t.x+t.width&&C>=t.y&&C<=t.y+t.height&&((o?[{x:I,y:C}]:[{x:I,y:C},{x:p,y:_},{x:m,y:_},{x:p,y:f},{x:m,y:f}]).every(y=>Mz(y,e))||c.push({x:p,y:_,width:m-p,height:f-_}))}const l=[];c.sort((h,d)=>Math.abs(h.y-d.y)>Fi?h.y-d.y:h.x-d.x);let u=null;for(const h of c){if(!u){u=h;continue}const d=Math.abs(u.y-h.y)<Fi,p=Math.abs(u.height-h.height)<Fi,m=Math.abs(u.x+u.width-h.x)<Fi;d&&p&&m?u.width+=h.width:(l.push(u),u=h)}u&&l.push(u),l.sort((h,d)=>Math.abs(h.x-d.x)>Fi?h.x-d.x:h.y-d.y);const g=[];u=null;for(const h of l){if(!u){u=h;continue}const d=Math.abs(u.x-h.x)<Fi,p=Math.abs(u.width-h.width)<Fi,m=Math.abs(u.y+u.height-h.y)<Fi;d&&p&&m?u.height+=h.height:(g.push(u),u=h)}return u&&g.push(u),g}var qF=class extends n7{rectDiffGridSolverPipeline;gapFillSolver;outerLayerContainmentMergeSolver;boardVoidRects;zIndexByName;layerNames;pipelineDef=[eh("rectDiffGridSolverPipeline",$qn,e=>[{bounds:e.inputProblem.simpleRouteJson.bounds,obstacles:e.inputProblem.simpleRouteJson.obstacles,connections:e.inputProblem.simpleRouteJson.connections,outline:e.inputProblem.simpleRouteJson.outline?{outline:e.inputProblem.simpleRouteJson.outline}:void 0,layerCount:e.inputProblem.simpleRouteJson.layerCount,gridOptions:e.inputProblem.gridOptions,boardVoidRects:e.boardVoidRects,layerNames:e.layerNames,zIndexByName:e.zIndexByName,minTraceWidth:e.inputProblem.simpleRouteJson.minTraceWidth,obstacleClearance:e.inputProblem.obstacleClearance}]),eh("gapFillSolver",vqn,e=>[{meshNodes:e.rectDiffGridSolverPipeline?.getOutput().meshNodes??[],boardVoid:{boardVoidRects:e.boardVoidRects||[],layerCount:e.inputProblem.simpleRouteJson.layerCount||0},maxGapFillPasses:e.inputProblem.maxGapFillPasses}]),eh("outerLayerContainmentMergeSolver",Mqn,e=>[{meshNodes:e.gapFillSolver?.getOutput().outputNodes??e.rectDiffGridSolverPipeline?.getOutput().meshNodes??[],simpleRouteJson:e.inputProblem.simpleRouteJson,zIndexByName:e.zIndexByName??new Map,obstacleClearance:e.inputProblem.obstacleClearance}])];_setup(){const{zIndexByName:e,layerNames:n}=g7e({obstacles:this.inputProblem.simpleRouteJson.obstacles,layerCount:this.inputProblem.simpleRouteJson.layerCount});if(this.zIndexByName=e,this.layerNames=n,this.inputProblem.simpleRouteJson.outline){const o=Math.max(0,this.inputProblem.simpleRouteJson.minBoardEdgeClearance??0);this.boardVoidRects=qqn({x:this.inputProblem.simpleRouteJson.bounds.minX-o,y:this.inputProblem.simpleRouteJson.bounds.minY-o,width:this.inputProblem.simpleRouteJson.bounds.maxX-this.inputProblem.simpleRouteJson.bounds.minX+2*o,height:this.inputProblem.simpleRouteJson.bounds.maxY-this.inputProblem.simpleRouteJson.bounds.minY+2*o},this.inputProblem.simpleRouteJson.outline??[],{minGridSize:this.inputProblem.simpleRouteJson.minTraceWidth}).map(i=>p7e(i,o))}}getConstructorParams(){return[this.inputProblem]}getOutput(){const e=this.outerLayerContainmentMergeSolver?.getOutput();if(e)return{meshNodes:e.outputNodes};const n=this.gapFillSolver?.getOutput();return n?{meshNodes:n.outputNodes}:this.rectDiffGridSolverPipeline?this.rectDiffGridSolverPipeline.getOutput():{meshNodes:[]}}initialVisualize(){const e=(function(i,r="RectDiff"){const s=[],a=[],A=i.bounds.minX,c=i.bounds.maxX,l=i.bounds.minY,u=i.bounds.maxY;i.outline&&i.outline.length>1?a.push({points:[...i.outline,i.outline[0]],strokeColor:"#111827",strokeWidth:.01,label:"outline"}):s.push({center:{x:(A+c)/2,y:(l+u)/2},width:c-A,height:u-l,fill:"none",stroke:"#111827",label:"board"});for(const g of i.obstacles??[])if(g.type==="rect"||g.type==="oval"){const h=(g.zLayers??[]).join(",")||"all";s.push({center:{x:g.center.x,y:g.center.y},width:g.width,height:g.height,fill:"#fee2e2",stroke:"#ef4444",layer:"obstacle",label:`obstacle
z:${h}`})}return{title:r,coordinateSystem:"cartesian",rects:s,points:[],lines:a}})(this.inputProblem.simpleRouteJson,"RectDiffPipeline - Initial"),n=H_t({srj:this.inputProblem.simpleRouteJson,clearance:this.inputProblem.obstacleClearance}),o={rects:(this.rectDiffGridSolverPipeline?.getOutput().meshNodes??[]).map(i=>({center:i.center,width:i.width,height:i.height,stroke:"rgba(0, 0, 0, 0.3)",fill:"rgba(100, 100, 100, 0.1)",layer:`z${i.availableZ.join(",")}`,label:[`node ${i.capacityMeshNodeId}`,`z:${i.availableZ.join(",")}`].join(`
`)}))};return MD(MD(e,n),o)}finalVisualize(){return(({srj:e,meshNodes:n,obstacleClearance:o})=>{const i=(({srj:a})=>({title:"SimpleRoute Outline",coordinateSystem:"cartesian",lines:a.outline&&a.outline.length>1?[{points:[...a.outline,a.outline[0]],strokeColor:"#111827",strokeWidth:.1,label:"outline"}]:[{points:[{x:a.bounds.minX,y:a.bounds.minY},{x:a.bounds.maxX,y:a.bounds.minY},{x:a.bounds.maxX,y:a.bounds.maxY},{x:a.bounds.minX,y:a.bounds.maxY},{x:a.bounds.minX,y:a.bounds.minY}],strokeColor:"#111827",strokeWidth:.1,label:"bounds"}]}))({srj:e}),r=H_t({srj:e,clearance:o}),s=n.map(a=>({center:a.center,width:a.width,height:a.height,stroke:Rse(a.availableZ).stroke,fill:a._containsObstacle?"#fca5a5":Rse(a.availableZ).fill,layer:`z${a.availableZ.join(",")}`,label:`node ${a.capacityMeshNodeId}
z:${a.availableZ.join(",")}`}));return MD(MD({title:"RectDiffPipeline - Final",coordinateSystem:"cartesian",rects:s,lines:[],points:[],texts:[]},i),r)})({srj:this.inputProblem.simpleRouteJson,meshNodes:this.getOutput().meshNodes,obstacleClearance:this.inputProblem.obstacleClearance})}},Xqn=class{cacheHitsByPrefix={};cacheMissesByPrefix={};isSyncCache=!0;cacheHits=0;cacheMisses=0;cache=new Map;getCachedSolutionSync(e){const n=this.cache.get(e);if(n!==void 0){this.cacheHits++;const o=e.split(":")[0];return this.cacheHitsByPrefix[o]=(this.cacheHitsByPrefix[o]||0)+1,structuredClone(n)}{this.cacheMisses++;const o=e.split(":")[0];return void(this.cacheMissesByPrefix[o]=(this.cacheMissesByPrefix[o]||0)+1)}}async getCachedSolution(e){return this.getCachedSolutionSync(e)}setCachedSolutionSync(e,n){this.cache.set(e,structuredClone(n))}async setCachedSolution(e,n){this.setCachedSolutionSync(e,n)}clearCache(){this.cache.clear(),this.cacheHits=0,this.cacheMisses=0,this.cacheHitsByPrefix={},this.cacheMissesByPrefix={}}getAllCacheKeys(){return Array.from(this.cache.keys())}},C7e="tscircuit_autorouter_cache_",Zqn=class{isSyncCache=!0;cacheHits=0;cacheMisses=0;cacheHitsByPrefix={};cacheMissesByPrefix={};constructor(){}getKey(e){return`${C7e}${e}`}getCachedSolutionSync(e){if(typeof localStorage>"u")return;const n=this.getKey(e);try{const o=localStorage.getItem(n);if(o!==null){const i=JSON.parse(o);this.cacheHits++;const r=e.split(":")[0];return this.cacheHitsByPrefix[r]=(this.cacheHitsByPrefix[r]||0)+1,i}{this.cacheMisses++;const i=e.split(":")[0];return void(this.cacheMissesByPrefix[i]=(this.cacheMissesByPrefix[i]||0)+1)}}catch(o){console.error(`Error getting cached solution sync for ${n}:`,o),this.cacheMisses++;const i=e.split(":")[0];return void(this.cacheMissesByPrefix[i]=(this.cacheMissesByPrefix[i]||0)+1)}}async getCachedSolution(e){return this.getCachedSolutionSync(e)}setCachedSolutionSync(e,n){if(typeof localStorage>"u")return;const o=this.getKey(e);try{const i=JSON.stringify(n);localStorage.setItem(o,i)}catch(i){console.error(`Error setting cached solution sync for ${o}:`,i),i instanceof DOMException&&(i.name==="QuotaExceededError"||i.name==="NS_ERROR_DOM_QUOTA_REACHED")&&console.warn(`LocalStorage quota exceeded. Failed to cache solution for ${o}. Consider clearing the cache.`)}}async setCachedSolution(e,n){this.setCachedSolutionSync(e,n)}clearCache(){if(typeof localStorage<"u")try{const e=[];for(let n=0;n<localStorage.length;n++){const o=localStorage.key(n);o?.startsWith(C7e)&&e.push(o)}e.forEach(n=>localStorage.removeItem(n)),console.log(`Cleared ${e.length} items from LocalStorage cache.`)}catch(e){console.error("Error clearing LocalStorage cache:",e)}finally{this.cacheHits=0,this.cacheMisses=0,this.cacheHitsByPrefix={},this.cacheMissesByPrefix={}}}getAllCacheKeys(){const e=[];for(let n=0;n<1e4;n++){const o=localStorage.key(n);if(!o)break;o.includes(C7e)&&e.push(o)}return e}};function eXn(){return globalThis.TSCIRCUIT_AUTOROUTER_LOCAL_STORAGE_CACHE||Lse(),globalThis.TSCIRCUIT_AUTOROUTER_LOCAL_STORAGE_CACHE}function tB(){return globalThis.TSCIRCUIT_AUTOROUTER_IN_MEMORY_CACHE||Lse(),globalThis.TSCIRCUIT_AUTOROUTER_IN_MEMORY_CACHE}function Lse(){globalThis.TSCIRCUIT_AUTOROUTER_LOCAL_STORAGE_CACHE??=new Zqn,globalThis.TSCIRCUIT_AUTOROUTER_IN_MEMORY_CACHE??=new Xqn}function Tz(t){const e={minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2};for(const n of t.portPoints)n.x<e.minX&&(e.minX=n.x),n.x>e.maxX&&(e.maxX=n.x),n.y<e.minY&&(e.minY=n.y),n.y>e.maxY&&(e.maxY=n.y);return e}var O_t=(t,e)=>t<=e?[t,e]:[e,t],y7e=t=>`${t[0]}|${t[1]}`,tXn=({portPointId:t,currentNodeId:e,inputNodes:n})=>{let o;if(t)for(const s of n){const a=s.portPoints.find(A=>A.portPointId===t);if(a?.connectionNodeIds){o=a.connectionNodeIds;break}}if(!o||o.length!==2)return[e,e];const[i,r]=o;return i&&r?O_t(i,r):[e,e]},x7e=1e-6,zQ=(t,e)=>Math.abs(t-e)<=x7e,nXn=({nodeAId:t,nodeBId:e,nodeBounds:n})=>{if(t===e)return null;const o=n.get(t),i=n.get(e);if(!o||!i)return null;const r=O_t(t,e),s=y7e(r);if(zQ(o.maxX,i.minX)||zQ(i.maxX,o.minX)){const a=Math.max(o.minY,i.minY),A=Math.min(o.maxY,i.maxY),c=A-a;if(c>x7e){const l=zQ(o.maxX,i.minX)?o.maxX:o.minX;return{ownerNodeIds:r,ownerPairKey:s,orientation:"vertical",x1:l,y1:a,x2:l,y2:A,center:{x:l,y:(a+A)/2},length:c,nodeSideByOwnerId:zQ(o.maxX,i.minX)?{[t]:"right",[e]:"left"}:{[t]:"left",[e]:"right"}}}}if(zQ(o.maxY,i.minY)||zQ(i.maxY,o.minY)){const a=Math.max(o.minX,i.minX),A=Math.min(o.maxX,i.maxX),c=A-a;if(c>x7e){const l=zQ(o.maxY,i.minY)?o.maxY:o.minY;return{ownerNodeIds:r,ownerPairKey:s,orientation:"horizontal",x1:a,y1:l,x2:A,y2:l,center:{x:(a+A)/2,y:l},length:c,nodeSideByOwnerId:zQ(o.maxY,i.minY)?{[t]:"top",[e]:"bottom"}:{[t]:"bottom",[e]:"top"}}}}return null},oXn=({portPoint:t,ownerNodeIds:e,inputNodes:n})=>{for(const o of e){const i=n.find(s=>s.capacityMeshNodeId===o);if(i?._containsTarget||i?.portPoints.find(s=>s.portPointId===t.portPointId)?.connectionNodeIds?.some(s=>n.find(a=>a.capacityMeshNodeId===s)?._containsTarget))return!0}return!1},XF=1e-6,kz=class extends zA{constructor(e){super(),this.input=e;for(const o of e.nodeWithPortPoints)this.mapOfNodeIdToBounds.set(o.capacityMeshNodeId,Tz(o));const n=new Map;for(const o of e.nodeWithPortPoints)for(const i of o.portPoints){if(!i.portPointId)continue;const r=tXn({portPointId:i.portPointId,currentNodeId:o.capacityMeshNodeId,inputNodes:e.inputNodesWithPortPoints}),s=y7e(r),a=this.mapOfOwnerPairToPortPoints.get(s)??[];a.some(A=>A.portPointId&&A.portPointId===i.portPointId)||a.push({...i,ownerNodeIds:r,ownerPairKey:s}),this.mapOfOwnerPairToPortPoints.set(s,a),n.set(s,r)}this.mapOfOwnerPairToSharedEdge=(({ownerPairs:o,nodeBounds:i})=>{const r=new Map;for(const s of o){const[a,A]=s;if(a===A)continue;const c=nXn({nodeAId:a,nodeBId:A,nodeBounds:i});c&&r.set(y7e(s),c)}return r})({ownerPairs:Array.from(n.values()),nodeBounds:this.mapOfNodeIdToBounds}),this.ownerPairsToProcess=Array.from(this.mapOfOwnerPairToSharedEdge.keys()),this.ownerPairsToProcess.sort((o,i)=>{const r=this.mapOfOwnerPairToSharedEdge.get(o),s=this.mapOfOwnerPairToSharedEdge.get(i);return r.center.x-s.center.x||r.center.y-s.center.y})}input;getSolverName(){return"UniformPortDistributionSolver"}mapOfNodeIdToBounds=new Map;mapOfOwnerPairToPortPoints=new Map;mapOfOwnerPairToSharedEdge=new Map;ownerPairsToProcess=[];currentOwnerPairBeingProcessed=null;redistributedNodes=[];step(){if(this.ownerPairsToProcess.length===0)return this.rebuildNodes(),void(this.solved=!0);this.currentOwnerPairBeingProcessed=this.ownerPairsToProcess.shift();const e=this.currentOwnerPairBeingProcessed,n=this.mapOfOwnerPairToSharedEdge.get(e);if(!n||(({sharedEdge:s,obstacles:a})=>{for(const A of a){const c=A.center.x-A.width/2,l=A.center.x+A.width/2,u=A.center.y-A.height/2,g=A.center.y+A.height/2;if(s.orientation!=="vertical"){if(Math.abs(s.y1-u)<XF||Math.abs(s.y1-g)<XF){const h=Math.max(s.x1,c);if(Math.min(s.x2,l)-h>XF)return!0}}else if(Math.abs(s.x1-c)<XF||Math.abs(s.x1-l)<XF){const h=Math.max(s.y1,u);if(Math.min(s.y2,g)-h>XF)return!0}}return!1})({sharedEdge:n,obstacles:this.input.obstacles}))return;const o=this.mapOfOwnerPairToPortPoints.get(e)??[],i=[];for(const s of o)oXn({portPoint:s,ownerNodeIds:s.ownerNodeIds,inputNodes:this.input.inputNodesWithPortPoints})||i.push(s);const r=(({sharedEdge:s,portPoints:a})=>{if(a.length===0)return[];const A=new Map;for(const u of a){const g=u.z??0,h=A.get(g)??[];h.push(u),A.set(g,h)}const c=[],l=Array.from(A.keys()).sort((u,g)=>u-g);for(const u of l){const g=A.get(u),h=g.length;g.sort((d,p)=>s.orientation==="horizontal"?d.x-p.x:d.y-p.y);for(let d=0;d<h;d++){const p=(2*d+1)/(2*h),m=s.orientation==="horizontal"?s.x1+s.length*p:s.x1,_=s.orientation==="horizontal"?s.y1:s.y1+s.length*p;c.push({...g[d],x:m,y:_})}}return c})({sharedEdge:n,portPoints:i});this.mapOfOwnerPairToPortPoints.set(e,r)}rebuildNodes(){const e=new Map;for(const o of this.mapOfOwnerPairToPortPoints.values())for(const i of o)i.portPointId&&e.set(i.portPointId,{x:i.x,y:i.y});const n=o=>{if(o.portPointId&&e.has(o.portPointId)){const i=e.get(o.portPointId);return{...o,x:i.x,y:i.y}}return o};this.redistributedNodes=this.input.nodeWithPortPoints.map(o=>({...o,portPoints:o.portPoints.map(n),portPointsInPairs:o.portPointsInPairs?.map(([i,r])=>[n(i),n(r)])}))}getOutput=()=>this.redistributedNodes;visualize(){return(({obstacles:e,nodeWithPortPoints:n,mapOfOwnerPairToPortPoints:o,mapOfOwnerPairToSharedEdge:i,ownerPairsToProcess:r,currentOwnerPairBeingProcessed:s,mapOfNodeIdToBounds:a})=>{const A=e.filter(p=>!p.isCopperPour).map(p=>({...p,fill:"#ec000070"})),c=[],l=[],u=new Map,g=new Map,h=new Map,d=p=>p.portPointId?u.get(p.portPointId)??{x:p.x,y:p.y}:{x:p.x,y:p.y};for(const p of n)for(const m of p.portPoints)m.portPointId&&(u.set(m.portPointId,{x:m.x,y:m.y}),g.set(m.portPointId,m.z??0));for(const p of o.values())for(const m of p)m.portPointId&&(u.set(m.portPointId,{x:m.x,y:m.y}),g.set(m.portPointId,m.z??0),h.set(m.portPointId,`${m.ownerNodeIds[0]}&${m.ownerNodeIds[1]}`));n.forEach(p=>{const m=a.get(p.capacityMeshNodeId);if(m){const _=(m.minX+m.maxX)/2,f=(m.minY+m.maxY)/2,I=m.maxX-m.minX,C=m.maxY-m.minY;A.push({center:{x:_,y:f},width:I,height:C,fill:"#00000030",label:`${p.capacityMeshNodeId}`})}p.portPoints.forEach(_=>{if(!_.portPointId)return;const f=u.get(_.portPointId),I=g.get(_.portPointId)??0,C=h.get(_.portPointId)??`${p.capacityMeshNodeId}&${p.capacityMeshNodeId}`;c.push({x:f.x,y:f.y,label:`z:${I}
o:${C}`}),p.portPointsInPairs?.length||p.portPoints.forEach(y=>{if(y.portPointId&&_!==y&&_.connectionName===y.connectionName){const x=u.get(y.portPointId);l.push({points:[f,x],strokeColor:"#fff822c9"})}})}),p.portPointsInPairs?.forEach(([_,f])=>{l.push({points:[d(_),d(f)],strokeColor:"#fff822c9"})})});for(const p of r){const m=i.get(p);m&&l.push({points:[{x:m.x1,y:m.y1},{x:m.x2,y:m.y2}],strokeColor:"orange",strokeWidth:.01})}if(s){const p=i.get(s);p&&(l.push({points:[{x:p.x1,y:p.y1},{x:p.x2,y:p.y2}],strokeColor:"red",strokeWidth:.03}),c.push({x:p.center.x,y:p.center.y,label:p.ownerPairKey}))}for(const p of i.values())l.push({points:[{x:p.x1,y:p.y1},{x:p.x2,y:p.y2}],strokeColor:"#33b5ff80",strokeWidth:.006});return{rects:A,lines:l,points:c}})({obstacles:this.input.obstacles,nodeWithPortPoints:this.input.nodeWithPortPoints,mapOfOwnerPairToPortPoints:this.mapOfOwnerPairToPortPoints,mapOfOwnerPairToSharedEdge:this.mapOfOwnerPairToSharedEdge,ownerPairsToProcess:this.ownerPairsToProcess,currentOwnerPairBeingProcessed:this.currentOwnerPairBeingProcessed,mapOfNodeIdToBounds:this.mapOfNodeIdToBounds})}},Hse=(t,e,n)=>t.connectedTo.some(o=>o===e.connectionName||o===e.rootConnectionName||(n?.areIdsConnected(e.connectionName,o)??!1)||e.rootConnectionName!==void 0&&(n?.areIdsConnected(e.rootConnectionName,o)??!1));function E7e(t){return"layers"in t&&Array.isArray(t.layers)}function ND(t){return"layer"in t&&typeof t.layer=="string"}function tI(t){return E7e(t)?t.layers[0]:t.layer}function RD(t){return E7e(t)?t.layers:[t.layer]}var Kh=(t,e)=>{if(t===1&&e===1)return"inner1";if(t<0||t>=e)throw new Error(`Invalid z "${t}" for layer count: ${e}`);return t===0?"top":t===e-1?"bottom":`inner${t}`},iXn=(t,e)=>!!t&&!!e&&Math.abs(t.x-e.x)<=1e-12&&Math.abs(t.y-e.y)<=1e-12,Ose=(t,e)=>o7(t,e)<=1e-6,rXn=(t,e,n,o)=>e.toNextSegmentType==="through_obstacle"||(o.connectedMultilayerObstacles?o.connectedMultilayerObstacles.some(i=>Ose(e,i)&&Ose(n,i)):o.obstacles?.some(i=>(r=>(r.__zLayers?.length??r.layers?.length??0)>1)(i)&&Ose(e,i)&&Ose(n,i)&&Hse(i,t,o.connMap))??!1),G_t=({endpoint:t,endpointLayer:e,connectionPoints:n,tolerance:o})=>{let i;for(const r of n){if(!ND(r)||!r.terminalVia||r.layer!==e)continue;const s=no(r,t);s>o||(!i||s<i.distance)&&(i={point:r,distance:s})}return i?.point},nB=(t,e,n={})=>{const o=[];if(t.route.length===0)return o;let i=[],r=t.route[0].z;for(let a=0;a<t.route.length;a++){const A=t.route[a];if(A.z!==r){const c=i[i.length-1],l=Kh(r,e);for(const g of i)o.push({route_type:"wire",x:g.x,y:g.y,width:g.traceThickness??t.traceThickness,layer:l});const u=Kh(A.z,e);c&&rXn(t,c,A,n)?o.push({route_type:"through_obstacle",start:{x:c.x,y:c.y},end:{x:A.x,y:A.y},from_layer:l,to_layer:u,width:c.traceThickness??t.traceThickness,...c.toNextSegmentCircuitJsonMetadata?{circuitJsonMetadata:c.toNextSegmentCircuitJsonMetadata}:{}}):t.vias.some(g=>Math.abs(g.x-A.x)<.001&&Math.abs(g.y-A.y)<.001)&&o.push({route_type:"via",x:A.x,y:A.y,from_layer:l,to_layer:u,via_diameter:t.viaDiameter,...n.defaultViaHoleDiameter!==void 0?{via_hole_diameter:n.defaultViaHoleDiameter}:{}}),i=[A],r=A.z}else iXn(i[i.length-1],A)||i.push(A)}const s=Kh(r,e);for(const a of i)o.push({route_type:"wire",x:a.x,y:a.y,width:a.traceThickness??t.traceThickness,layer:s});if(t.jumpers&&t.jumpers.length>0){const a=Kh(t.route[0]?.z??0,e);for(const A of t.jumpers)o.push({route_type:"jumper",start:A.start,end:A.end,footprint:A.footprint,layer:a})}return(({route:a,hdRoute:A,layerCount:c,connectionPoints:l=[],tolerance:u=.25,defaultViaHoleDiameter:g})=>{if(a.length===0||A.route.length===0||!l.length||!l.some(w=>ND(w)&&w.terminalVia))return a;const h=a.filter(w=>w.route_type!=="jumper"),d=a.filter(w=>w.route_type==="jumper");if(h.length===0)return a;const p=A.route[0],m=A.route[A.route.length-1],_=Kh(p.z,c),f=Kh(m.z,c),I=G_t({endpoint:p,endpointLayer:_,connectionPoints:l,tolerance:u}),C=G_t({endpoint:m,endpointLayer:f,connectionPoints:l,tolerance:u}),y=[],x=[],E=h[0],B=h[h.length-1],S=p.traceThickness??A.traceThickness,Q=m.traceThickness??A.traceThickness;return I?.terminalVia&&(y.push({route_type:"via",x:I.x,y:I.y,from_layer:I.layer,to_layer:I.terminalVia.toLayer,via_diameter:I.terminalVia.viaDiameter??A.viaDiameter,...g!==void 0?{via_hole_diameter:g}:{}}),E?.route_type==="wire"&&E.layer===I.layer&&no(E,I)<=.001||y.push({route_type:"wire",x:I.x,y:I.y,width:S,layer:I.layer})),C?.terminalVia&&(B?.route_type==="wire"&&B.layer===C.layer&&no(B,C)<=.001||x.push({route_type:"wire",x:C.x,y:C.y,width:Q,layer:C.layer}),x.push({route_type:"via",x:C.x,y:C.y,from_layer:C.layer,to_layer:C.terminalVia.toLayer,via_diameter:C.terminalVia.viaDiameter??A.viaDiameter,...g!==void 0?{via_hole_diameter:g}:{}})),[...y,...h,...x,...d]})({route:o,hdRoute:t,layerCount:e,connectionPoints:n.connectionPoints,tolerance:n.terminalViaAttachTolerance,defaultViaHoleDiameter:n.defaultViaHoleDiameter})},Y_t=["blue","orange","purple","cyan","magenta","yellowgreen","darkgoldenrod","deeppink"],Jf=(t,e)=>{const n={};for(let o=0;o<t.connections.length;o++){const i=t.connections[o],r=e?.getNetConnectedToId(i.name);r&&!n[r]&&(n[r]=`hsl(${300*o/t.connections.length}, 100%, 50%)`),n[i.name]=(r?n[r]:null)??`hsl(${340*o/t.connections.length}, 100%, 50%)`}return n},Es=(t,e)=>{try{return Bz(e,t)}catch(n){return console.error(n),t}},Fz=(t,e=1)=>{if(!t)return"rgba(0, 0, 0, 0.5)";const n=300*t.split("").reduce((o,i)=>o+i.charCodeAt(0),0)/t.length%360;return e<1?`hsla(${n}, 100%, 50%, ${e})`:`hsl(${n}, 100%, 50%)`},U_t=t=>{const e=new Set;return t.filter(n=>!e.has(n)&&(e.add(n),!0))},Lz=(t,e,n)=>{if(!e)return;const o=t.get(e);o?o.includes(n)||o.push(n):t.set(e,[n])},z8=t=>{const e=new Map;for(const n of t.connections){const o=n.__rootConnectionNames??[n.name];for(const i of o){Lz(e,n.name,i),Lz(e,i,i),Lz(e,n.__netConnectionName,i);for(const r of n.pointsToConnect)Lz(e,r.pointId,i),Lz(e,r.pcb_port_id,i)}}return n=>((o,i=[])=>{const r=U_t(i).join(", ");return o.layers.map(s=>r?`${s}
${r}`:s).join(`
`)})(n,((o,i)=>U_t([...o.connectedTo.flatMap(r=>i.get(r)??[]),...(o.offBoardConnectsTo??[]).flatMap(r=>i.get(r)??[])]))(n,e))},Kr=(t,e)=>t==="top"?0:t==="bottom"?e-1:parseInt(t.slice(5));function Hz(t,e){return[...new Set(t)].filter(n=>Number.isInteger(n)&&n>=0&&n<e).sort((n,o)=>n-o)}function Oz(t,e){return Hz(t.map(n=>Kr(n,e)),e)}var Gz=(t,e)=>`z${Oz(t,e).join(",")}`,J8=(t,e)=>Gz(RD(t),e),K_t=(t,e)=>t.__zLayers&&t.__zLayers.length>0?Hz(t.__zLayers,e):Oz(t.layers,e),r7=(t,e)=>`z${K_t(t,e).join(",")}`,V_t=(...t)=>t.find(e=>typeof e=="number"&&Number.isFinite(e)),om=t=>{const e=V_t(t.min_via_hole_diameter,t.minViaHoleDiameter),n=V_t(t.min_via_pad_diameter,t.minViaPadDiameter,t.minViaDiameter),o=Math.max(n??t.minViaDiameter??.3,e??0);return{padDiameter:o,holeDiameter:e??.5*o}},W8={"0603":{length:1.65,width:.95,padLength:.8,padWidth:.95},1206:{length:3.2,width:1.6,padLength:.6,padWidth:1.6},"1206x4_pair":{length:2.7,width:.5,padLength:.8,padWidth:.5}},z_t={top:"red",bottom:"blue",inner1:"green",inner2:"yellow",inner3:"orange",inner4:"purple",inner5:"cyan",inner6:"magenta",inner7:"lime",inner8:"brown"};function J_t(t){if(Object.hasOwn(z_t,t))return z_t[t];const e=/^inner([1-9]\d*)$/.exec(t);if(e)return`hsl(${137*Number(e[1])%360}, 70%, 45%)`;throw new Error(`No visualization color for layer "${t}"`)}var mx=(t,e={})=>{const n=[],o=[],i=[],r=[],s=Jf(t),a=e.traceColorMode??"layer",A=t.layerCount,c=om(t),l=z8(t);if(t.connections)for(const u of t.connections)for(const g of u.pointsToConnect){const h=RD(g),d=u.__rootConnectionNames??[u.name];i.push({x:g.x,y:g.y,color:s[u.name],layer:J8(g,A),label:[u.name,d.join(", "),h.join(",")].join(`
`)})}if(t.traces)for(const u of t.traces){let g=t.minTraceWidth;const h=u.route.filter(m=>m.route_type==="jumper"),d=(m,_)=>{for(const I of h){const C=Math.abs(m.x-I.start.x)<.01&&Math.abs(m.y-I.start.y)<.01&&Math.abs(_.x-I.end.x)<.01&&Math.abs(_.y-I.end.y)<.01,y=Math.abs(m.x-I.end.x)<.01&&Math.abs(m.y-I.end.y)<.01&&Math.abs(_.x-I.start.x)<.01&&Math.abs(_.y-I.start.y)<.01;if(C||y)return!0}return!1};for(const m of u.route)if(m.route_type==="via"){const _=Kr(m.from_layer,A),f=Kr(m.to_layer,A),I=(m.via_diameter??c.padDiameter)/2,C=Array.from({length:Math.abs(f-_)+1},(y,x)=>Math.min(_,f)+x);o.push({center:{x:m.x,y:m.y},radius:I,fill:a==="net"?s[u.connection_name]:"blue",stroke:"none",layer:`z${C.join(",")}`})}else if(m.route_type==="through_obstacle"){const _=s[u.connection_name]??"purple";n.push({points:[m.start,m.end],strokeColor:Es(_,.35),strokeWidth:m.width,strokeDash:[.1,.1],layer:Gz([m.from_layer,m.to_layer],A),label:`${u.connection_name} through_obstacle`})}let p;for(let m=0;m<u.route.length-1;m++){const _=u.route[m],f=u.route[m+1];if(_.route_type==="jumper"){p=void 0;const I=s[u.connection_name]??"rgba(255, 165, 0, 0.8)",C=_.footprint,y=W8[C==="1206x4_pair"?"1206x4_pair":"0603"]??W8["0603"],x=_.end.x-_.start.x,E=_.end.y-_.start.y,B=Math.abs(x)>Math.abs(E),S=B?y.padLength:y.padWidth,Q=B?y.padWidth:y.padLength;r.push({center:_.start,width:S,height:Q,fill:Es(I,.5),stroke:"rgba(0, 0, 0, 0.5)",layer:Gz([_.layer],A)}),r.push({center:_.end,width:S,height:Q,fill:Es(I,.5),stroke:"rgba(0, 0, 0, 0.5)",layer:Gz([_.layer],A)}),n.push({points:[_.start,_.end],strokeColor:"rgba(100, 100, 100, 0.8)",strokeWidth:.3*y.padWidth,layer:Gz([_.layer],A)})}else if(_.route_type==="wire"&&f.route_type==="wire"&&f.layer===_.layer){if(d({x:_.x,y:_.y},{x:f.x,y:f.y})){p=void 0;continue}g=_.width;const I=_.layer==="top",C=a==="net"?s[u.connection_name]:J_t(_.layer),y=`z${Kr(_.layer,A)}`;if(p&&p.layer===y&&p.strokeWidth===g){p.points.push({x:f.x,y:f.y});continue}p={points:[{x:_.x,y:_.y},{x:f.x,y:f.y}],layer:y,strokeWidth:g,strokeColor:I?C:Es(C,.5),...a==="net"?{label:u.connection_name}:{},...I?{}:{strokeDash:[.2,.2]}},n.push(p)}else p=void 0}}for(const u of t.obstacles){if(u.isCopperPour)continue;const g=K_t(u,A);if(g.length===0)throw new Error(`Cannot visualize obstacle "${u.obstacleId??"unknown"}" without a valid layer: layers=${u.layers.join(",")}, __zLayers=${u.__zLayers?.join(",")??"unset"}, layerCount=${A}`);const h=J_t((g.length===1?Kh(g[0],A):null)==="bottom"?"bottom":"top"),d=.5**g.length;r.push({center:u.center,width:u.width,height:u.height,ccwRotationDegrees:u.ccwRotationDegrees,fill:Es(h,d),layer:r7(u,A),label:l(u)})}if(t.jumpers)for(const u of t.jumpers)for(const g of u.pads)r.push({center:g.center,width:g.width,height:g.height,ccwRotationDegrees:g.ccwRotationDegrees,fill:"rgba(255, 165, 0, 0.3)",stroke:"rgba(255, 165, 0, 0.8)",layer:r7(g,A)});return{rects:r,circles:o,lines:n,points:i}};function sXn([t,e],[n,o],{lineThickness:i=0}={}){return i===0?W_t(t,e,n,o):(function(s,a,A,c){if(s.x===a.x&&s.y===a.y)return ZF(s,A,c);if(A.x===c.x&&A.y===c.y)return ZF(A,s,a);if(W_t(s,a,A,c))return 0;const l=[ZF(s,A,c),ZF(a,A,c),ZF(A,s,a),ZF(c,s,a)];return Math.min(...l)})(t,e,n,o)<=i}function W_t(t,e,n,o){const i=Gse(t,e,n),r=Gse(t,e,o),s=Gse(n,o,t),a=Gse(n,o,e);return i!==r&&s!==a||!(i!==0||!Yse(t,n,e))||!(r!==0||!Yse(t,o,e))||!(s!==0||!Yse(n,t,o))||!(a!==0||!Yse(n,e,o))}function Gse(t,e,n){const o=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return o===0?0:o>0?1:2}function Yse(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function ZF(t,e,n){const o=(n.x-e.x)**2+(n.y-e.y)**2;if(o===0)return j_t(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;return i=Math.max(0,Math.min(1,i)),j_t(t,{x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)})}function j_t(t,e){const n=t.x-e.x,o=t.y-e.y;return Math.sqrt(n*n+o*o)}function $_t(t){const e=new Map;let n=0;function o(i){for(const[,s]of e)if(s.has(i))return s;const r=new Set;return e.set("connectivity_net"+n++,r),r}for(const i of t){let r=null;for(const s of i){if(r){if(!r.has(s)){const a=o(s);if(a!==r){for(const A of a)r.add(A);e.delete(Array.from(e.entries()).find(([,A])=>A===a)[0])}}}else r=o(s);r.add(s)}}return Object.fromEntries(Array.from(e.entries()).map(([i,r])=>[i,Array.from(r)]))}var TD=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s&&o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){this.netMap[i].push(...this.netMap[r]),this.netMap[r]=this.netMap[i];for(const s of this.netMap[i])this.idToNetMap[s]=i}}for(const r of n)this.netMap[i].includes(r)||this.netMap[i].push(r),this.idToNetMap[r]=i}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return!!i&&(o===i||i===e||i===e)}areAllIdsConnected(e){const n=this.getNetConnectedToId(e[0]);for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}},eL=t=>{const e=[];for(const o of t)if(o.type==="source_trace")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type==="pcb_port"){const{pcb_port_id:i,source_port_id:r}=o;r&&i&&e.push([r,i])}else if(o.type==="pcb_smtpad"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_plated_hole"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_trace"){const{pcb_trace_id:i,source_trace_id:r}=o;r&&i&&e.push([i,r])}const n=$_t(e);return new TD(n)},aXn=class{circuitJson;traceIdToElm;portIdToElm;connMap;constructor(e){this.circuitJson=e||[],this.traceIdToElm=new Map,this.portIdToElm=new Map,e?(this._buildTraceMap(),this._buildPortMap(),this.connMap=this._buildTraceConnectivityMap()):this.connMap=new TD({})}_buildPortMap(){for(const e of this.circuitJson)e.type==="pcb_port"&&this.portIdToElm.set(e.pcb_port_id,e)}_buildTraceMap(){for(const e of this.circuitJson)e.type==="pcb_trace"&&this.traceIdToElm.set(e.pcb_trace_id,e)}_buildTraceConnectivityMap(){const e=[],n=Array.from(this.traceIdToElm.keys());for(let o=0;o<n.length;o++)for(let i=o+1;i<n.length;i++){const r=this.traceIdToElm.get(n[o]),s=this.traceIdToElm.get(n[i]);this._arePcbTracesConnected(r,s)&&e.push([n[o],n[i]])}for(const o of this.portIdToElm.values())for(const i of this.traceIdToElm.values())for(const r of i.route)r.route_type==="wire"&&(r.start_pcb_port_id===o.pcb_port_id?e.push([o.pcb_port_id,i.pcb_trace_id]):r.end_pcb_port_id===o.pcb_port_id&&e.push([i.pcb_trace_id,o.pcb_port_id]));return new TD($_t(e))}addTrace(e){this.traceIdToElm.set(e.pcb_trace_id,e);const n=[];for(const o of e.route)o.route_type==="wire"&&(o.start_pcb_port_id&&n.push([o.start_pcb_port_id,e.pcb_trace_id]),o.end_pcb_port_id&&n.push([o.end_pcb_port_id,e.pcb_trace_id]));this.connMap.addConnections(n)}_arePcbTracesConnected(e,n){for(let o=0;o<e.route.length-1;o++){const i=e.route[o],r=e.route[o+1];if(i.route_type==="wire"&&r.route_type==="wire")for(let s=0;s<n.route.length-1;s++){const a=n.route[s],A=n.route[s+1];if(a.route_type==="wire"&&A.route_type==="wire"&&sXn([i,r],[a,A],{lineThickness:(i.width+a.width)/2}))return!0}}return!1}areTracesConnected(e,n){return this.connMap.areIdsConnected(e,n)}getAllTracesConnectedToTrace(e){const n=this.connMap.getNetConnectedToId(e);return n?this.connMap.getIdsConnectedToNet(n).filter(o=>this.traceIdToElm.has(o)).map(o=>this.traceIdToElm.get(o)):[]}getAllTracesConnectedToPort(e){const n=this.connMap.getNetConnectedToId(e);return n?this.connMap.getIdsConnectedToNet(n).filter(o=>this.traceIdToElm.has(o)).map(o=>this.traceIdToElm.get(o)):[]}},q_t=t=>`${Math.round(100*t.x)},${Math.round(100*t.y)}`,Jm=t=>{const e=new TD({});for(const n of t.connections){for(const o of n.__rootConnectionNames??[])e.addConnections([[n.name,o]]);n.__netConnectionName&&e.addConnections([[n.name,n.__netConnectionName]]);for(const o of n.pointsToConnect)e.addConnections([[n.name,`${q_t(o)}:${"layers"in o?o.layers.map(i=>Kr(i,t.layerCount)).sort().join("-"):Kr(o.layer,t.layerCount)}`]]),"pcb_port_id"in o&&o.pcb_port_id&&e.addConnections([[n.name,o.pcb_port_id]]),o.pointId&&e.addConnections([[n.name,o.pointId]])}for(const n of t.obstacles){const o=n.offBoardConnectsTo??[],i=Array.from(new Set([n.obstacleId,...n.connectedTo,...o,`${q_t(n.center)}:${n.layers.map(r=>Kr(r,t.layerCount)).sort().join("-")}`].filter(Boolean)));i.length>0&&e.addConnections([i])}for(const n of t.traces??[]){const o=Array.from(new Set([n.pcb_trace_id,n.connection_name,...n.connectsTo??[]].filter(Boolean)));o.length>0&&e.addConnections([o])}return e},JQ=t=>{const e=new TD({});for(const n of t.connections){const o=n.externallyConnectedPointIds??[];e.addConnections(o)}for(const n of t.traces??[]){const o=n.connectsTo??[];o.length!==0&&e.addConnections([[n.pcb_trace_id,...o]])}return e},yr=class{MAX_ITERATIONS=1e3;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};pendingEffects;cacheHit;cacheKey;cacheToSolveSpaceTransform;getSolverName(){return this.constructor.name}step(){if(!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,console.error(this.error),this.failed=!0,e}!this.solved&&this.iterations>this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations (MAX_ITERATIONS=${this.MAX_ITERATIONS})`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function tL(t){const e=new Map;for(const n of t)for(const o of n.nodeIds)e.set(o,[...e.get(o)??[],n]);return e}var kD=class extends yr{getSolverName(){return"AvailableSegmentPointSolver"}nodes;edges;traceWidth;obstacleMargin;minPortSpacing;nodeMap;nodeEdgeMap;sharedEdgeSegments=[];edgeSegmentMap=new Map;portPointMap=new Map;colorMap;shouldReturnCrampedPortPoints;constructor({nodes:e,edges:n,traceWidth:o,obstacleMargin:i,colorMap:r,shouldReturnCrampedPortPoints:s}){super(),this.nodes=e,this.edges=n,this.traceWidth=o,this.obstacleMargin=i??.15,this.shouldReturnCrampedPortPoints=s,this.minPortSpacing=this.traceWidth+this.obstacleMargin,this.colorMap=r??{},this.nodeMap=new Map(e.map(a=>[a.capacityMeshNodeId,a])),this.nodeEdgeMap=tL(n),this.MAX_ITERATIONS=1}_step(){this.computeAllSharedEdgeSegments(),this.solved=!0}computeAllSharedEdgeSegments(){for(const e of this.edges){const[n,o]=e.nodeIds,i=this.nodeMap.get(n),r=this.nodeMap.get(o);if(!i||!r)continue;const s=this.computeSharedEdgeSegment(e,i,r);if(s){this.sharedEdgeSegments.push(s),this.edgeSegmentMap.set(e.capacityMeshEdgeId,s);for(const a of s.portPoints)this.portPointMap.set(a.segmentPortPointId,a)}}}computeSharedEdgeSegment(e,n,o){const i=this.findOverlappingSegment(n,o);if(!i)return null;const r=n.availableZ.filter(f=>o.availableZ.includes(f));if(r.length===0)return null;const s=Math.sqrt((i.end.x-i.start.x)**2+(i.end.y-i.start.y)**2),a=!!(n._isNarrowQfpPadGap||o._isNarrowQfpPadGap),A=3*this.minPortSpacing/4,c=Math.max(0,s-2*A);if(c<=0&&!n._containsTarget&&!o._containsTarget){if(!this.shouldReturnCrampedPortPoints)return null;const f=[];for(const I of r)f.push({segmentPortPointId:`${e.capacityMeshEdgeId}_pp0_z${I}_cramped`,x:(i.start.x+i.end.x)/2,y:(i.start.y+i.end.y)/2,availableZ:[I],nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],edgeId:e.capacityMeshEdgeId,connectionName:null,distToCentermostPortOnZ:0,cramped:!0});return{edgeId:e.capacityMeshEdgeId,nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],start:i.start,end:i.end,availableZ:r,portPoints:f}}let l=Math.max(1,Math.floor(c/this.minPortSpacing)+1);if(n._offBoardConnectionId||o._offBoardConnectionId){if(n._offBoardConnectionId&&!o._offBoardConnectionId){if(this.shouldSkipOffBoardPortPoint(n,o))return null}else if(o._offBoardConnectionId&&!n._offBoardConnectionId&&this.shouldSkipOffBoardPortPoint(o,n))return null;l=1}const u=[],g=i.end.x-i.start.x,h=i.end.y-i.start.y,d=(i.start.x+i.end.x)/2,p=(i.start.y+i.end.y)/2;l>5&&(l=5+Math.floor(l/4));const m=[];for(let f=0;f<l;f++){let I;I=s===0||l===1?.5:(A+c*f/(l-1))/s;const C=i.start.x+g*I,y=i.start.y+h*I,x=Math.sqrt((C-d)**2+(y-p)**2);m.push({x:C,y,distToCenter:x})}const _=m.reduce((f,I)=>I.distToCenter<f.distToCenter?I:f);for(let f=0;f<l;f++){const{x:I,y:C}=m[f],y=Math.sqrt((I-_.x)**2+(C-_.y)**2);for(const x of r){const E={segmentPortPointId:`${e.capacityMeshEdgeId}_pp${f}_z${x}`,x:I,y:C,availableZ:[x],nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],edgeId:e.capacityMeshEdgeId,connectionName:null,distToCentermostPortOnZ:y,cramped:a};u.push(E)}}return{edgeId:e.capacityMeshEdgeId,nodeIds:[n.capacityMeshNodeId,o.capacityMeshNodeId],start:i.start,end:i.end,availableZ:r,portPoints:u}}shouldSkipOffBoardPortPoint(e,n){const o=this.nodeEdgeMap.get(n.capacityMeshNodeId)??[];for(const i of o){const r=i.nodeIds[0]===n.capacityMeshNodeId?i.nodeIds[1]:i.nodeIds[0];if(r===e.capacityMeshNodeId)continue;const s=this.nodeMap.get(r);if(s?._offBoardConnectionId!==e._offBoardConnectionId||this.nodes.filter(A=>A._offBoardConnectionId===e._offBoardConnectionId).length!==2)continue;const a={x:(e.center.x+s.center.x)/2,y:(e.center.y+s.center.y)/2};if(a.x>=n.center.x-n.width/2&&a.x<=n.center.x+n.width/2&&a.y>=n.center.y-n.height/2&&a.y<=n.center.y+n.height/2)return!0}return!1}findOverlappingSegment(e,n){const o={start:Math.max(e.center.x-e.width/2,n.center.x-n.width/2),end:Math.min(e.center.x+e.width/2,n.center.x+n.width/2)},i={start:Math.max(e.center.y-e.height/2,n.center.y-n.height/2),end:Math.min(e.center.y+e.height/2,n.center.y+n.height/2)},r=o.end-o.start,s=i.end-i.start;if(r<-1e-4||s<-1e-4)return null;if(r<s){const a=(o.start+o.end)/2;return{start:{x:a,y:i.start},end:{x:a,y:i.end}}}{const a=(i.start+i.end)/2;return{start:{x:o.start,y:a},end:{x:o.end,y:a}}}}getAvailablePortPointsBetweenNodes(e,n){const o=this.edges.find(r=>r.nodeIds[0]===e&&r.nodeIds[1]===n||r.nodeIds[0]===n&&r.nodeIds[1]===e);if(!o)return[];const i=this.edgeSegmentMap.get(o.capacityMeshEdgeId);return i?i.portPoints.filter(r=>r.connectionName===null):[]}getPortPointsForEdge(e,n){const o=this.edges.find(r=>r.nodeIds[0]===e&&r.nodeIds[1]===n||r.nodeIds[0]===n&&r.nodeIds[1]===e);return o?this.edgeSegmentMap.get(o.capacityMeshEdgeId)?.portPoints??[]:[]}assignPortPoint(e,n,o){const i=this.portPointMap.get(e);return!!i&&i.connectionName===null&&(i.connectionName=n,i.rootConnectionName=o,!0)}releasePortPoint(e){const n=this.portPointMap.get(e);return!!n&&(n.connectionName=null,n.rootConnectionName=void 0,!0)}getAvailablePortCountForEdge(e,n){return this.getAvailablePortPointsBetweenNodes(e,n).length}getOutput(){return this.sharedEdgeSegments}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const n of this.sharedEdgeSegments){e.lines.push({points:[n.start,n.end],strokeColor:"rgba(100, 100, 100, 0.5)"});for(const o of n.portPoints){const i=o.connectionName?this.colorMap[o.connectionName]??"blue":"rgba(0, 200, 0, 0.7)";o.cramped?e.rects.push({center:{x:o.x,y:o.y},width:.1,height:.1,fill:i,layer:`z${o.availableZ.join(",")}`,label:`cramped ${o.segmentPortPointId}`}):e.circles.push({center:{x:o.x,y:o.y},radius:this.traceWidth/2,fill:i,layer:`z${o.availableZ.join(",")}`,label:[o.segmentPortPointId,o.connectionName,o.availableZ.join(","),`cd: ${o.distToCentermostPortOnZ}`,`connects: ${o.nodeIds.join(",")}`].filter(Boolean).join(`
`)})}}return e}};function Use(t,e){const n=t.center.x-t.width/2,o=t.center.x+t.width/2,i=t.center.y-t.height/2,r=t.center.y+t.height/2,s=e.center.x-e.width/2,a=e.center.x+e.width/2,A=e.center.y-e.height/2,c=e.center.y+e.height/2,l=.001,u=(Math.abs(o-s)<l||Math.abs(n-a)<l)&&Math.min(r,c)-Math.max(i,A)>=l,g=(Math.abs(r-A)<l||Math.abs(i-c)<l)&&Math.min(o,a)-Math.max(n,s)>=l;return u||g}var AXn=class extends yr{constructor(e){super(),this.nodes=e,this.edges=[]}nodes;getSolverName(){return"CapacityMeshEdgeSolver"}edges;nodeMap;getNextCapacityMeshEdgeId(){return`ce${this.edges.length}`}_step(){this.edges=[];for(let e=0;e<this.nodes.length;e++)for(let n=e+1;n<this.nodes.length;n++)!(this.nodes[e]._strawNode&&this.nodes[n]._strawNode&&this.nodes[e]._strawParentCapacityMeshNodeId===this.nodes[n]._strawParentCapacityMeshNodeId)&&Use(this.nodes[e],this.nodes[n])&&this.doNodesHaveSharedLayer(this.nodes[e],this.nodes[n])&&this.edges.push({capacityMeshEdgeId:this.getNextCapacityMeshEdgeId(),nodeIds:[this.nodes[e].capacityMeshNodeId,this.nodes[n].capacityMeshNodeId]});this.handleTargetNodes(),this.solved=!0}handleTargetNodes(){const e=this.nodes.filter(o=>o._containsTarget),n=new Map(this.nodes.map(o=>[o.capacityMeshNodeId,o]));for(let o=0;o<e.length;o++)for(let i=o+1;i<e.length;i++){const r=e[o],s=e[i];this.doNodesHaveSharedLayer(r,s)&&this.doNodesTouchOrOverlap(r,s)&&(this.hasEdgeBetween(r,s)||this.edges.push({capacityMeshEdgeId:this.getNextCapacityMeshEdgeId(),nodeIds:[r.capacityMeshNodeId,s.capacityMeshNodeId]}))}for(const o of e)if(!(!o._containsObstacle||!o._targetConnectionName)&&!this.edges.some(i=>{if(!i.nodeIds.includes(o.capacityMeshNodeId))return!1;const r=i.nodeIds[0]===o.capacityMeshNodeId?i.nodeIds[1]:i.nodeIds[0],s=n.get(r);return!!s&&!s._containsObstacle&&!s._containsTarget&&this.doNodesHaveSharedLayer(o,s)}))throw new Error(`Target obstacle region "${o.capacityMeshNodeId}" for connection "${o._targetConnectionName}" has no bordering routing edge`)}doNodesHaveSharedLayer(e,n){return e.availableZ.some(o=>n.availableZ.includes(o))}hasEdgeBetween(e,n){return this.edges.some(o=>o.nodeIds.includes(e.capacityMeshNodeId)&&o.nodeIds.includes(n.capacityMeshNodeId))}doNodesTouchOrOverlap(e,n){const i=e.center.x-e.width/2,r=e.center.x+e.width/2,s=e.center.y-e.height/2,a=e.center.y+e.height/2,A=n.center.x-n.width/2,c=n.center.x+n.width/2,l=n.center.y-n.height/2,u=n.center.y+n.height/2;return i<=c+.001&&r+.001>=A&&s<=u+.001&&a+.001>=l}visualize(){const e=new Map;for(const o of this.edges)for(const i of o.nodeIds)e.set(i,1+(e.get(i)??0));const n={lines:[],points:[],rects:this.nodes.map(o=>{const i=Math.min(...o.availableZ);return{width:Math.max(o.width-2,.8*o.width),height:Math.max(o.height-2,.8*o.height),center:{x:o.center.x+i*o.width*.05,y:o.center.y-i*o.width*.05},fill:o._containsObstacle?"rgba(255,0,0,0.1)":{"0,1":"rgba(0,0,0,0.1)",0:"rgba(0,200,200, 0.1)",1:"rgba(0,0,200, 0.1)"}[o.availableZ.join(",")]??"rgba(0,200,200,0.1)",label:[o.capacityMeshNodeId,`availableZ: ${o.availableZ.join(",")}`,`target? ${o._containsTarget??!1}`,`obs? ${o._containsObstacle??!1}`,`conn: ${e.get(o.capacityMeshNodeId)??0}`].join(`
`),layer:`z${o.availableZ.join(",")}`}}),circles:[]};if(!this.nodeMap){this.nodeMap=new Map;for(const o of this.nodes)this.nodeMap.set(o.capacityMeshNodeId,o)}for(const o of this.edges){const i=this.nodeMap.get(o.nodeIds[0]),r=this.nodeMap.get(o.nodeIds[1]);if(i?.center&&r?.center){const s=Math.min(...i.availableZ),a=Math.min(...r.availableZ),A={x:i.center.x+s*i.width*.05,y:i.center.y-s*i.width*.05},c={x:r.center.x+a*r.width*.05,y:r.center.y-a*r.width*.05},l=Array.from(new Set([...i.availableZ,...r.availableZ])).sort();n.lines.push({layer:`z${l.join(",")}`,points:[A,c],strokeDash:i.availableZ.join(",")===r.availableZ.join(",")?void 0:"10 5"})}}return n}},B7e=class{constructor(e){this.nodes=e,this.buckets=new Map;for(const n of e){const o=n.center.x-n.width/2,i=n.center.y-n.height/2,r=n.center.x+n.width/2,s=n.center.y+n.height/2,a=Math.floor(o/this.CELL_SIZE),A=Math.floor(r/this.CELL_SIZE),c=Math.floor(i/this.CELL_SIZE),l=Math.floor(s/this.CELL_SIZE);for(let u=a;u<=A;u++)for(let g=c;g<=l;g++){const h=`${u}x${g}`,d=this.buckets.get(h);d?d.push(n):this.buckets.set(h,[n])}}}nodes;buckets;CELL_SIZE=.4;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getNodesInArea(e,n,o,i){const r=[],s=new Set,a=e-o/2,A=n-i/2,c=e+o/2,l=n+i/2,u=Math.floor(a/this.CELL_SIZE),g=Math.floor(c/this.CELL_SIZE),h=Math.floor(A/this.CELL_SIZE),d=Math.floor(l/this.CELL_SIZE);for(let p=u;p<=g;p++)for(let m=h;m<=d;m++){const _=`${p}x${m}`,f=this.buckets.get(_)||[];for(const I of f)s.has(I.capacityMeshNodeId)||(s.add(I.capacityMeshNodeId),r.push(I))}return r}},WQ=class extends AXn{constructor(e){super(e),this.nodes=e,this.MAX_ITERATIONS=1e7,this.nodeTree=new B7e(this.nodes),this.currentNodeIndex=0,this.edgeSet=new Set}nodes;getSolverName(){return"CapacityMeshEdgeSolver2_NodeTreeOptimization"}nodeTree;currentNodeIndex;edgeSet;_step(){if(this.currentNodeIndex>=this.nodes.length)return this.handleTargetNodes(),void(this.solved=!0);const e=this.nodes[this.currentNodeIndex],n=this.nodeTree.getNodesInArea(e.center.x,e.center.y,2*e.width,2*e.height);for(const o of n){if(!Use(e,o))continue;const i=e._strawNode&&o._strawNode&&e._strawParentCapacityMeshNodeId===o._strawParentCapacityMeshNodeId;e.capacityMeshNodeId===o.capacityMeshNodeId||i||!this.doNodesHaveSharedLayer(e,o)||this.edgeSet.has(`${e.capacityMeshNodeId}-${o.capacityMeshNodeId}`)||(this.edgeSet.add(`${e.capacityMeshNodeId}-${o.capacityMeshNodeId}`),this.edgeSet.add(`${o.capacityMeshNodeId}-${e.capacityMeshNodeId}`),this.edges.push({capacityMeshEdgeId:this.getNextCapacityMeshEdgeId(),nodeIds:[e.capacityMeshNodeId,o.capacityMeshNodeId]}))}this.currentNodeIndex++}},Il=(...t)=>{const e={points:[],lines:[],circles:[],rects:[],polygons:[],infiniteLines:[],arrows:[],texts:[]};return t.forEach((n,o)=>{n&&(n.lines&&(e.lines=[...e.lines||[],...n.lines.map(i=>({...i,step:o}))]),n.points&&(e.points=[...e.points||[],...n.points.map(i=>({...i,step:o}))]),n.circles&&(e.circles=[...e.circles||[],...n.circles.map(i=>({...i,step:o}))]),n.rects&&(e.rects=[...e.rects||[],...n.rects.map(i=>({...i,step:o}))]),n.polygons&&(e.polygons=[...e.polygons||[],...n.polygons.map(i=>({...i,step:o}))]),n.infiniteLines&&(e.infiniteLines=[...e.infiniteLines||[],...n.infiniteLines.map(i=>({...i,step:o}))]),n.arrows&&(e.arrows=[...e.arrows||[],...n.arrows.map(i=>({...i,step:o}))]),n.texts&&(e.texts=[...e.texts||[],...n.texts.map(i=>({...i,step:o}))]))}),e};function Kse(t,e,n){const o=[];let i=null;for(let r=0;r<t.length;r++){const s=t[r];i?i.z===s.z?i.points.push({x:s.x,y:s.y}):(o.push(i),i={points:[{x:s.x,y:s.y}],z:s.z,connectionName:e,color:n}):i={points:[{x:s.x,y:s.y}],z:s.z,connectionName:e,color:n},r===t.length-1&&i&&o.push(i)}return o}function s7(t,e){return{x:t.a*e.x+t.b*e.y+t.c,y:t.d*e.x+t.e*e.y+t.f}}var b7e=(t,e,n)=>{const[o,i]=t;if(o===i)return;const r=((s,a)=>{const A=s.portPointId??`${s.connectionName}:${s.x}:${s.y}:${s.z}`,c=a.portPointId??`${a.connectionName}:${a.x}:${a.y}:${a.z}`;return A<c?`${A}|${c}`:`${c}|${A}`})(o,i);e.has(r)||(e.add(r),n.push(t))},X_t=(t,e,n)=>{for(let o=0;o<t.length-1;o++)b7e([t[o],t[o+1]],e,n)},Z_t=t=>{const e=[],n=new Set,o=(s=>{const a=new Map;for(const A of s)A.portPointId&&a.set(A.portPointId,A);return a})(t);for(const s of t){if(s.prevPortPointId){const a=o.get(s.prevPortPointId);a&&a.connectionName===s.connectionName&&b7e([a,s],n,e)}if(s.nextPortPointId){const a=o.get(s.nextPortPointId);a&&a.connectionName===s.connectionName&&b7e([s,a],n,e)}}if(e.length===0)return X_t(t,n,e),e;const i=(s=>{const a=new Set;for(const[A,c]of s)A.portPointId&&a.add(A.portPointId),c.portPointId&&a.add(c.portPointId);return a})(e),r=t.filter(s=>!s.portPointId||!i.has(s.portPointId));return X_t(r,n,e),e};function Vse(t,e,n){return Math.max(e,Math.min(n,t))}function eft(t){const e=t.planeSize*t.layers,n=t.connectionCount,o=Math.sqrt(n),i=Math.max(1,t.maxIterations),r=Vse(Math.round(e*(8+1.2*o)),15e4,12e6),s=Vse(Math.round(r*t.effort),15e4,12e6),a=Vse(Math.round(.2*i),15e4,2e6);return{maxIterationsIters:Math.max(1,Math.min(i,Math.max(a,s))),baseSearchBudgetIters:Vse(Math.round(e*(10+.8*o)*t.effort),5e4,4e6)}}function tft(t,e){for(let n=t;n;n=n.prev)if(n.id===e)return!0;return!1}var cXn=class{f=[];seq=[];id=[];n=0;push(e,n,o){let i=this.n++;for(this.f[i]=e,this.seq[i]=n,this.id[i]=o;i>0;){const r=i-1>>1;if(this.less(r,i))break;this.swap(i,r),i=r}}pop(){const e=this.id[0];return this.n--,this.n>0&&(this.f[0]=this.f[this.n],this.seq[0]=this.seq[this.n],this.id[0]=this.id[this.n],this.siftDown(0)),e}get size(){return this.n}clear(){this.n=0}siftDown(e){for(;;){const n=2*e+1,o=n+1;if(n>=this.n)return;let i=n;if(o<this.n&&!this.less(n,o)&&(i=o),this.less(e,i))return;this.swap(e,i),e=i}}less(e,n){const o=this.f[e],i=this.f[n];return o!==i?o<i:this.seq[e]<this.seq[n]}swap(e,n){const o=this.f[e];this.f[e]=this.f[n],this.f[n]=o;const i=this.seq[e];this.seq[e]=this.seq[n],this.seq[n]=i;const r=this.id[e];this.id[e]=this.id[n],this.id[n]=r}},lXn=[-1,-1,-1,0,0,1,1,1],uXn=[-1,0,1,-1,1,-1,0,1],S7e=class extends zA{getSolverName(){return"HighDensitySolverA01"}nodeWithPortPoints;cellSizeMm;viaDiameter;MAX_RIPS;maxCellCount;traceThickness;traceMargin;viaMinDistFromBorder;showPenaltyMap;showUsedCellMap;effort;stepMultiplier;hyperParameters;initialPenaltyFn;rows;cols;layers;gridOrigin;gridToBoundsTransform;availableZ;zToLayer;layerToZ;connNameToId;connIdToName;connIdToRootNet;overlapFriendlyRootNets;planeSize;usedCellsFlat;portOwnerFlat;usedDiagFlat;penalty2d;visitedStamp;sharedCrossRootPortCells;stamp=0;viaOffsetsDr;viaOffsetsDc;viaOffsetsLen;minViaRow;maxViaRow;minViaCol;maxViaCol;usedIndicesByConn;usedDiagIndicesByConn;unsolvedSegs;solvedRoutes;activeConnSeg=null;activeConnId=-1;crossLayerSearch=!1;nodePool;heap;seqCounter=0;_viaOccs=[];ripCount;totalRipEvents=0;searchIterations=0;consecutiveSkips=0;penaltyCap;baseSearchBudgetIters;_moveCost=0;_moveRipped=null;get unsolvedConnections(){return this.unsolvedSegs}get solvedConnectionsMap(){return this.solvedRoutes}get activeConnection(){if(!this.activeConnSeg)return null;const e=this.activeConnSeg;return{connectionName:this.connIdToName[e.connId]??"",start:{row:e.startRow,col:e.startCol,z:e.startZ,x:0,y:0},end:{row:e.endRow,col:e.endCol,z:e.endZ,x:0,y:0}}}get openSet(){return{length:this.heap?.size??0}}get gridStats(){return{cells:this.planeSize||0,layers:this.layers||0,states:(this.planeSize||0)*(this.layers||0)}}constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.cellSizeMm=e.cellSizeMm,this.viaDiameter=e.viaDiameter,this.maxCellCount=e.maxCellCount,this.traceThickness=e.traceThickness??.1,this.traceMargin=e.traceMargin??.15,this.viaMinDistFromBorder=e.viaMinDistFromBorder??.15,this.showPenaltyMap=e.showPenaltyMap??!1,this.showUsedCellMap=e.showUsedCellMap??!1,this.effort=e.effort??1,this.stepMultiplier=Math.max(1,Math.floor(e.stepMultiplier??1)),this.hyperParameters={shuffleSeed:0,ripCost:10,ripTracePenalty:.5,ripViaPenalty:.75,viaBaseCost:.1,greedyMultiplier:1.5,...e.hyperParameters},this.MAX_ITERATIONS=1e8,this.MAX_RIPS=200,this.initialPenaltyFn=e.initialPenaltyFn}getConstructorParams(){return[{nodeWithPortPoints:this.nodeWithPortPoints,cellSizeMm:this.cellSizeMm,viaDiameter:this.viaDiameter,maxCellCount:this.maxCellCount,stepMultiplier:this.stepMultiplier,traceThickness:this.traceThickness,traceMargin:this.traceMargin,viaMinDistFromBorder:this.viaMinDistFromBorder,showPenaltyMap:this.showPenaltyMap,showUsedCellMap:this.showUsedCellMap,effort:this.effort,hyperParameters:this.hyperParameters,initialPenaltyFn:this.initialPenaltyFn}]}_setup(){const{nodeWithPortPoints:e,cellSizeMm:n}=this,{width:o,height:i,center:r}=e;this.availableZ=e.availableZ??[...new Set(e.portPoints.map(d=>d.z))].sort((d,p)=>d-p),this.rows=Math.floor(i/n),this.cols=Math.floor(o/n),this.layers=this.availableZ.length,this.planeSize=this.rows*this.cols;const s=this.layers*this.planeSize;if(this.maxCellCount!==void 0&&s>this.maxCellCount)return this.error=`Cell count ${s} exceeds maxCellCount ${this.maxCellCount}`,void(this.failed=!0);const a=this.layers*Math.max(0,this.rows-1)*Math.max(0,this.cols-1)*2;this.zToLayer=new Map,this.layerToZ=new Map;for(let d=0;d<this.availableZ.length;d++){const p=this.availableZ[d];this.zToLayer.set(p,d),this.layerToZ.set(d,p)}if(this.gridOrigin={x:r.x-o/2,y:r.y-i/2},this.gridToBoundsTransform=(function(d){const{originX:p,originY:m,rows:_,cols:f,cellSizeMm:I,width:C,height:y}=d;let x,E,B,S;return f>1?(x=C/((f-1)*I),E=p*(1-x)-.5*I*x):(x=1,E=p+C/2-(p+.5*I)),_>1?(B=y/((_-1)*I),S=m*(1-B)-.5*I*B):(B=1,S=m+y/2-(m+.5*I)),{a:x,b:0,c:E,d:0,e:B,f:S}})({originX:this.gridOrigin.x,originY:this.gridOrigin.y,rows:this.rows,cols:this.cols,cellSizeMm:n,width:o,height:i}),this.connNameToId=new Map,this.connIdToName=[],this.connIdToRootNet=[],this.overlapFriendlyRootNets=new Set,this.penalty2d=new Float64Array(this.planeSize),this.initialPenaltyFn)for(let d=0;d<this.rows;d++){const p=d*this.cols;for(let m=0;m<this.cols;m++){const _=this.gridOrigin.x+(m+.5)*n,f=this.gridOrigin.y+(d+.5)*n,I=(m+.5)/this.cols,C=(d+.5)/this.rows;this.penalty2d[p+m]=this.initialPenaltyFn({x:_,y:f,px:I,py:C,row:d,col:m})}}this.usedCellsFlat=new Int32Array(s).fill(-1),this.portOwnerFlat=new Int32Array(s).fill(-1),this.usedDiagFlat=new Int32Array(a).fill(-1),this.visitedStamp=new Uint32Array(s),this.stamp=0;const A=Math.ceil(this.viaDiameter/2/n),c=A*A,l=[],u=[];for(let d=-A;d<=A;d++)for(let p=-A;p<=A;p++)d*d+p*p<=c&&(l.push(d),u.push(p));if(this.viaOffsetsLen=l.length,this.viaOffsetsDr=new Int32Array(l),this.viaOffsetsDc=new Int32Array(u),this.viaMinDistFromBorder>0){const d=Math.ceil(this.viaMinDistFromBorder/n);this.minViaRow=d,this.maxViaRow=this.rows-1-d,this.minViaCol=d,this.maxViaCol=this.cols-1-d}else this.minViaRow=0,this.maxViaRow=this.rows-1,this.minViaCol=0,this.maxViaCol=this.cols-1;this.unsolvedSegs=this.buildConnectionSegs(),this.sharedCrossRootPortCells=new Set;const g=new Map;for(const d of this.nodeWithPortPoints.portPoints){const p=this.connNameToId.get(d.connectionName);if(p===void 0)continue;const m=this.pointToCell(d),_=(m.z*this.rows+m.row)*this.cols+m.col,f=this.connIdToRootNet[p],I=g.get(_);I===void 0?g.set(_,f):I!==f&&this.sharedCrossRootPortCells.add(_);const C=this.portOwnerFlat[_];this.portOwnerFlat[_]=C===-1||C===p?p:-2}this.solvedRoutes=new Map,this.usedIndicesByConn=[],this.usedDiagIndicesByConn=[],this.ripCount=[],this.consecutiveSkips=0,this.penaltyCap=.5*this.hyperParameters.ripCost,this.shuffleConnections();const h=eft({planeSize:this.planeSize,layers:this.layers,connectionCount:this.unsolvedSegs.length,effort:this.effort,maxIterations:this.MAX_ITERATIONS});this.baseSearchBudgetIters=h.baseSearchBudgetIters,this.MAX_ITERATIONS=h.maxIterationsIters,this.activeConnSeg=null,this.activeConnId=-1,this.nodePool=[],this.heap=new cXn,this.seqCounter=0}_step(){for(let e=0;e<this.stepMultiplier;e++){if(this.solved||this.failed)return;this.stepOnce()}}stepOnce(){if(!this.activeConnSeg){if(this.unsolvedSegs.length===0)return void(this.solved=!0);const C=this.unsolvedSegs.shift();this.activeConnSeg=C,this.activeConnId=C.connId,this.crossLayerSearch=C.startZ!==C.endZ,this.nodePool=[],this.heap.clear(),this.seqCounter=0,this.searchIterations=0,this.nextStamp();const y=this.computeH(C.startZ,C.startRow,C.startCol,C.endZ,C.endRow,C.endCol)*this.hyperParameters.greedyMultiplier;return this.nodePool.push({z:C.startZ,row:C.startRow,col:C.startCol,g:0,f:y,parentIdx:-1,ripped:null}),void this.heap.push(y,this.seqCounter++,0)}this.searchIterations++;const e=this.ripCount[this.activeConnId]??0,n=Math.round(this.baseSearchBudgetIters*(1+.25*Math.min(e,10)));if(this.searchIterations>n){const C=this.penalty2d;for(let y=0;y<C.length;y++)C[y]=.9*C[y];return this.unsolvedSegs.push(this.activeConnSeg),this.activeConnSeg=null,this.activeConnId=-1,this.heap.clear(),this.nodePool=[],this.consecutiveSkips++,void(this.consecutiveSkips>=3*this.unsolvedSegs.length&&(this.error=`Convergence failure: ${this.unsolvedSegs.length} connections stuck`,this.failed=!0))}if(this.heap.size===0)return this.error=`No path found for ${this.connIdToName[this.activeConnId]}`,void(this.failed=!0);const o=this.heap.pop(),i=this.nodePool[o],{z:r,row:s,col:a,g:A,ripped:c}=i,l=(r*this.rows+s)*this.cols+a;if(this.visitedStamp[l]===this.stamp)return;this.visitedStamp[l]=this.stamp;const u=this.activeConnSeg;if(r===u.endZ&&s===u.endRow&&a===u.endCol)return this.finalizeRoute(o),this.activeConnSeg=null,void(this.activeConnId=-1);const g=u.endZ,h=u.endRow,d=u.endCol,p=this.activeConnId,m=this.rows,_=this.cols,f=(this.cellSizeMm,this.visitedStamp),I=this.stamp;for(let C=0;C<8;C++){const y=s+lXn[C],x=a+uXn[C];if(y<0||y>=m||x<0||x>=_||f[(r*m+y)*_+x]===I||(this.computeMoveCostAndRips(p,r,s,a,r,y,x,c),this._moveCost<0))continue;const E=A+this._moveCost,B=E+this.computeH(r,y,x,g,h,d)*this.hyperParameters.greedyMultiplier,S=this.nodePool.length;this.nodePool.push({z:r,row:y,col:x,g:E,f:B,parentIdx:o,ripped:this._moveRipped}),this.heap.push(B,this.seqCounter++,S)}if(s>=this.minViaRow&&s<=this.maxViaRow&&a>=this.minViaCol&&a<=this.maxViaCol)for(let C=0;C<this.layers;C++){if(C===r||f[(C*m+s)*_+a]===I||(this.computeMoveCostAndRips(p,r,s,a,C,s,a,c),this._moveCost<0))continue;const y=A+this._moveCost,x=y+this.computeH(C,s,a,g,h,d)*this.hyperParameters.greedyMultiplier,E=this.nodePool.length;this.nodePool.push({z:C,row:s,col:a,g:y,f:x,parentIdx:o,ripped:this._moveRipped}),this.heap.push(x,this.seqCounter++,E)}}computeMoveCostAndRips(e,n,o,i,r,s,a,A){let c=0,l=A;const u=this.cols;if(n!==r){c+=this.hyperParameters.viaBaseCost,c+=Math.min(this.penalty2d[s*u+a],this.penaltyCap);const g=(r*this.rows+s)*u+a,h=this.portOwnerFlat[g],d=this.connIdToRootNet[h]===this.connIdToRootNet[e]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]),p=this.activeConnSeg,m=!!p&&r===p.endZ&&s===p.endRow&&a===p.endCol;if(h>=0&&h!==e&&!d&&!m)return this._moveCost=-1,void(this._moveRipped=l);this.fillViaOccupants(s,a,e);const _=this._viaOccs;for(let f=0;f<_.length;f++){const I=_[f];tft(l,I)||(c+=this.hyperParameters.ripCost,l={id:I,prev:l}),c+=this.hyperParameters.ripViaPenalty}}else{const g=o>s?o-s:s-o,h=i>a?i-a:a-i;c+=(g+h>1?Math.SQRT2:1)*this.cellSizeMm,c+=Math.min(this.penalty2d[s*u+a],this.penaltyCap);const d=(r*this.rows+s)*u+a,p=this.portOwnerFlat[d],m=this.connIdToRootNet[p]===this.connIdToRootNet[e]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]),_=this.activeConnSeg,f=!!_&&r===_.endZ&&s===_.endRow&&a===_.endCol;if(p>=0&&p!==e&&!m&&!f)return this._moveCost=-1,void(this._moveRipped=l);const I=this.usedCellsFlat[d],C=this.connIdToRootNet[I]===this.connIdToRootNet[e]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]);if(I===-1||I===e||C||(tft(l,I)||(c+=this.hyperParameters.ripCost,l={id:I,prev:l}),c+=this.hyperParameters.ripTracePenalty),g===1&&h===1){const y=o<s?o:s,x=i<a?i:a,E=1^(o<s&&i<a||o>s&&i>a?0:1),B=this.cols-1,S=2*((r*(this.rows-1)+y)*B+x),Q=this.usedDiagFlat[S+E],w=this.connIdToRootNet[Q]===this.connIdToRootNet[e]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[e]);if(Q!==-1&&Q!==e&&!w)return this._moveCost=-1,void(this._moveRipped=l)}}this._moveCost=c,this._moveRipped=l}fillViaOccupants(e,n,o){const i=this._viaOccs;i.length=0;const r=this.rows,s=this.cols,a=this.viaOffsetsDr,A=this.viaOffsetsDc,c=this.viaOffsetsLen,l=this.usedCellsFlat;for(let u=0;u<this.layers;u++){const g=u*this.planeSize;for(let h=0;h<c;h++){const d=e+a[h],p=n+A[h];if(d<0||p<0||d>=r||p>=s)continue;const m=l[g+d*s+p];if(m===-1||m===o||this.connIdToRootNet[m]===this.connIdToRootNet[o]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[o]))continue;let _=!1;for(let f=0;f<i.length;f++)if(i[f]===m){_=!0;break}_||i.push(m)}}}shouldSkipFixedPortHalo(e,n){const o=this.portOwnerFlat[e];return o===n?!1:o===-2?!0:o<0?!1:!(this.connIdToRootNet[o]===this.connIdToRootNet[n]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[n]))}nextStamp(){this.stamp=this.stamp+1>>>0,this.stamp===0&&(this.visitedStamp.fill(0),this.stamp=1)}computeH(e,n,o,i,r,s){const a=Math.abs(n-r)+Math.abs(o-s);if(e===i)return a*this.cellSizeMm;if(!this.crossLayerSearch)return a*this.cellSizeMm+this.hyperParameters.viaBaseCost;const A=Math.max(this.minViaRow,Math.min(this.maxViaRow,n)),c=Math.max(this.minViaCol,Math.min(this.maxViaCol,o)),l=Math.max(this.minViaRow,Math.min(this.maxViaRow,r)),u=Math.max(this.minViaCol,Math.min(this.maxViaCol,s)),g=Math.abs(n-A)+Math.abs(o-c)+Math.abs(A-r)+Math.abs(c-s),h=Math.abs(n-l)+Math.abs(o-u)+Math.abs(l-r)+Math.abs(u-s);return Math.max(Math.min(g,h),a)*this.cellSizeMm+this.hyperParameters.viaBaseCost}internConn(e,n){const o=this.connNameToId.get(e);if(o!==void 0)return o;const i=this.connIdToName.length;var r;return this.connIdToName.push(e),this.connIdToRootNet.push((r=e,n??r.replace(/_mst\d+$/,""))),this.connNameToId.set(e,i),i}buildConnectionSegs(){const e=new Map;for(const i of this.nodeWithPortPoints.portPoints){const r=i.connectionName;e.has(r)||e.set(r,{points:[],rootConnectionName:i.rootConnectionName}),e.get(r).points.push(i)}const n=[],o=new Set;for(const[i,r]of e){const s=r.points,a=Z_t(s);if(a.length===0)continue;const A=this.internConn(i,r.rootConnectionName);for(const[c,l]of a){const u=this.pointToCell(c),g=this.pointToCell(l),h=`${u.z}:${u.row}:${u.col}`,d=`${g.z}:${g.row}:${g.col}`,p=h<d?`${h}|${d}`:`${d}|${h}`,m=r.rootConnectionName??i,_=`${m}|${p}`;o.has(_)?this.overlapFriendlyRootNets.add(m):(o.add(_),n.push({connId:A,startZ:u.z,startRow:u.row,startCol:u.col,startPoint:c,endZ:g.z,endRow:g.row,endCol:g.col,endPoint:l}))}}return n}pointToCell(e){const n=Math.max(0,Math.min(this.cols-1,Math.round((e.x-this.gridOrigin.x)/this.cellSizeMm-.5))),o=Math.max(0,Math.min(this.rows-1,Math.round((e.y-this.gridOrigin.y)/this.cellSizeMm-.5)));return{z:this.zToLayer.get(e.z)??0,row:o,col:n}}shuffleConnections(){const e=this.unsolvedSegs;let n=this.hyperParameters.shuffleSeed;const o=()=>(n=1664525*n+1013904223&4294967295,(n>>>0)/4294967295);for(let i=e.length-1;i>0;i--){const r=Math.floor(o()*(i+1)),s=e[i];e[i]=e[r],e[r]=s}}finalizeRoute(e){this.consecutiveSkips=Math.max(0,this.consecutiveSkips-1);const n=[];let o=e;for(;o>=0;){const E=this.nodePool[o];n.push({z:E.z,row:E.row,col:E.col}),o=E.parentIdx}for(n.reverse();n.length>1;){const E=n[0],B=(E.z*this.rows+E.row)*this.cols+E.col;if(!this.sharedCrossRootPortCells.has(B))break;n.shift()}for(;n.length>1;){const E=n[n.length-1],B=(E.z*this.rows+E.row)*this.cols+E.col;if(!this.sharedCrossRootPortCells.has(B))break;n.pop()}const i=[];for(let E=1;E<n.length;E++)n[E].z!==n[E-1].z&&i.push({row:n[E].row,col:n[E].col});const r=n[0],s=n[n.length-1],a=this.activeConnId,A=[];for(let E=this.nodePool[e].ripped;E;E=E.prev)A.push(E.id);for(let E=0;E<A.length;E++)if(this.ripTrace(A[E]),this.failed)return;const c=Math.ceil(this.traceMargin/this.cellSizeMm),l=[],u=this.rows,g=this.cols,h=this.usedCellsFlat;for(let E=0;E<n.length;E++){const B=n[E];for(let S=-c;S<=c;S++)for(let Q=-c;Q<=c;Q++){const w=B.row+S,M=B.col+Q;if(w<0||w>=u||M<0||M>=g)continue;const k=(B.z*u+w)*g+M;if((w!==B.row||M!==B.col)&&this.shouldSkipFixedPortHalo(k,a))continue;const R=h[k],F=this.connIdToRootNet[R]===this.connIdToRootNet[a]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[a]);(R===-1||R===a||F)&&(h[k]=a,l.push(k))}}const d=[],p=this.viaOffsetsDr,m=this.viaOffsetsDc,_=this.viaOffsetsLen;for(let E=0;E<i.length;E++){const B=i[E];for(let S=0;S<this.layers;S++){const Q=S*this.planeSize;for(let w=0;w<_;w++){const M=B.row+p[w],k=B.col+m[w];if(M<0||M>=u||k<0||k>=g)continue;const R=Q+M*g+k;if((M!==B.row||k!==B.col)&&this.shouldSkipFixedPortHalo(R,a))continue;const F=h[R],O=this.connIdToRootNet[F]===this.connIdToRootNet[a]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[a]);if(F!==-1&&F!==a&&!O){let U=!1;for(let Y=0;Y<d.length;Y++)if(d[Y]===F){U=!0;break}U||d.push(F)}h[R]=a,l.push(R)}}}const f=[],I=this.cols-1;for(let E=1;E<n.length;E++){const B=n[E-1],S=n[E];if(B.z!==S.z)continue;const Q=B.row>S.row?B.row-S.row:S.row-B.row,w=B.col>S.col?B.col-S.col:S.col-B.col;if(Q!==1||w!==1)continue;const M=B.row<S.row?B.row:S.row,k=B.col<S.col?B.col:S.col,R=B.row<S.row&&B.col<S.col||B.row>S.row&&B.col>S.col?0:1,F=1^R,O=2*((B.z*(this.rows-1)+M)*I+k),U=O+F,Y=this.usedDiagFlat[U],W=this.connIdToRootNet[Y]===this.connIdToRootNet[a]&&this.overlapFriendlyRootNets.has(this.connIdToRootNet[a]);if(Y!==-1&&Y!==a&&!W)continue;const te=O+R;this.usedDiagFlat[te]=a,f.push(te)}for(;this.usedIndicesByConn.length<=a;)this.usedIndicesByConn.push([]);const C=this.usedIndicesByConn[a]??[];for(C.push(...l),this.usedIndicesByConn[a]=C;this.usedDiagIndicesByConn.length<=a;)this.usedDiagIndicesByConn.push([]);const y=this.usedDiagIndicesByConn[a]??[];y.push(...f),this.usedDiagIndicesByConn[a]=y;const x=this.solvedRoutes.get(a)??[];x.push({connId:a,startZ:r.z,startRow:r.row,startCol:r.col,startPoint:this.activeConnSeg.startPoint,endZ:s.z,endRow:s.row,endCol:s.col,endPoint:this.activeConnSeg.endPoint,cells:n,viaCells:i}),this.solvedRoutes.set(a,x);for(let E=0;E<d.length;E++)if(this.ripTrace(d[E]),this.failed)return;if(A.length>0||d.length>0){const E=this.penalty2d,B=this.penaltyCap;if(this.totalRipEvents>50)for(let S=0;S<E.length;S++)E[S]=.99*E[S];else for(let S=0;S<E.length;S++)E[S]>B&&(E[S]=.5*E[S])}}ripTrace(e){for(;this.ripCount.length<=e;)this.ripCount.push(0);if(this.ripCount[e]++,this.totalRipEvents++,this.totalRipEvents>=this.MAX_RIPS)return this.error=`Convergence failure: exceeded MAX_RIPS ${this.MAX_RIPS}`,void(this.failed=!0);const n=this.solvedRoutes.get(e)??[];if(n.length>0){const r=this.cols;for(const s of n){for(let a=0;a<s.cells.length;a++){const A=s.cells[a],c=A.row*r+A.col;this.penalty2d[c]=this.penalty2d[c]+this.hyperParameters.ripTracePenalty}for(let a=0;a<s.viaCells.length;a++){const A=s.viaCells[a],c=A.row*r+A.col;this.penalty2d[c]=this.penalty2d[c]+this.hyperParameters.ripViaPenalty}}}const o=this.usedIndicesByConn[e];if(o){const r=this.usedCellsFlat;for(let s=0;s<o.length;s++){const a=o[s];r[a]===e&&(r[a]=-1)}this.usedIndicesByConn[e]=[]}const i=this.usedDiagIndicesByConn[e];if(i){const r=this.usedDiagFlat;for(let s=0;s<i.length;s++){const a=i[s];r[a]===e&&(r[a]=-1)}this.usedDiagIndicesByConn[e]=[]}if(n.length>0){this.solvedRoutes.delete(e);for(const r of n)this.unsolvedSegs.push({connId:e,startZ:r.startZ,startRow:r.startRow,startCol:r.startCol,startPoint:r.startPoint,endZ:r.endZ,endRow:r.endRow,endCol:r.endCol,endPoint:r.endPoint})}}visualize(){const e=["red","blue","orange","green"],n=[],o=[],i=[],r=[],{width:s,height:a,center:A}=this.nodeWithPortPoints;r.push({center:{x:A.x,y:A.y},width:s,height:a,stroke:"gray"});const c=this.gridToBoundsTransform;if(this.showPenaltyMap&&this.penalty2d){let g=0;for(let h=0;h<this.penalty2d.length;h++)this.penalty2d[h]>g&&(g=this.penalty2d[h]);if(g>0)for(let h=0;h<this.rows;h++)for(let d=0;d<this.cols;d++){const p=this.penalty2d[h*this.cols+d];if(p<=0)continue;const m=Math.min(.6,p/g*.6),_=s7(c,{x:this.gridOrigin.x+(d+.5)*this.cellSizeMm,y:this.gridOrigin.y+(h+.5)*this.cellSizeMm});r.push({center:_,width:this.cellSizeMm*c.a,height:this.cellSizeMm*c.e,fill:`rgba(255,165,0,${m.toFixed(3)})`})}}if(this.showUsedCellMap&&this.usedCellsFlat)for(let g=0;g<this.layers;g++)for(let h=0;h<this.rows;h++)for(let d=0;d<this.cols;d++){if(this.usedCellsFlat[(g*this.rows+h)*this.cols+d]===-1)continue;const p=s7(c,{x:this.gridOrigin.x+(d+.5)*this.cellSizeMm,y:this.gridOrigin.y+(h+.5)*this.cellSizeMm});r.push({center:p,width:this.cellSizeMm*c.a,height:this.cellSizeMm*c.e,fill:"rgba(0,0,255,0.5)"})}for(const g of this.nodeWithPortPoints.portPoints)n.push({x:g.x,y:g.y,color:e[g.z]??"gray",label:g.connectionName});const l=["rgba(255,0,0,0.75)","rgba(0,0,255,0.75)","rgba(255,165,0,0.75)","rgba(0,128,0,0.75)"],u=this.getOutput();for(const g of u){if(g.route.length<2)continue;let h=0;for(let d=1;d<g.route.length;d++){const p=g.route[d-1];g.route[d].z!==p.z&&(d-h>=2&&o.push({points:g.route.slice(h,d).map(m=>({x:m.x,y:m.y})),strokeColor:l[p.z]??"rgba(128,128,128,0.75)",strokeWidth:this.traceThickness}),h=d)}if(g.route.length-h>=2){const d=g.route[h].z;o.push({points:g.route.slice(h).map(p=>({x:p.x,y:p.y})),strokeColor:l[d]??"rgba(128,128,128,0.75)",strokeWidth:this.traceThickness})}}for(const g of u)for(const h of g.vias)i.push({center:{x:h.x,y:h.y},radius:this.viaDiameter/2,fill:"rgba(0,0,0,0.3)",stroke:"black"});if(this.activeConnSeg&&this.visitedStamp){const g=this.stamp;for(let h=0;h<this.layers;h++)for(let d=0;d<this.rows;d++)for(let p=0;p<this.cols;p++){if(this.visitedStamp[(h*this.rows+d)*this.cols+p]!==g)continue;const m=s7(c,{x:this.gridOrigin.x+(p+.5)*this.cellSizeMm,y:this.gridOrigin.y+(d+.5)*this.cellSizeMm});n.push({x:m.x,y:m.y,color:"rgba(0,0,255,0.2)"})}}return{points:n,lines:o,circles:i,rects:r,coordinateSystem:"cartesian",title:`HighDensityA01 [${this.solvedRoutes?.size??0} solved, ${this.unsolvedSegs?.length??0} remaining]`}}getOutput(){const e=this.gridToBoundsTransform,n=[];for(const[o,i]of this.solvedRoutes??[]){const r=this.connIdToName[o];for(const s of i){const a=s.cells.map(A=>{const c=this.gridOrigin.x+(A.col+.5)*this.cellSizeMm,l=this.gridOrigin.y+(A.row+.5)*this.cellSizeMm,u=s7(e,{x:c,y:l});return{x:u.x,y:u.y,z:this.layerToZ.get(A.z)??A.z}});a.length>0&&(a[0]={...s.startPoint},a.length>1&&(a[a.length-1]={...s.endPoint})),n.push({connectionName:r,rootConnectionName:this.connIdToRootNet[o],regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:a,vias:s.viaCells.map(A=>{const c=this.gridOrigin.x+(A.col+.5)*this.cellSizeMm,l=this.gridOrigin.y+(A.row+.5)*this.cellSizeMm;return s7(e,{x:c,y:l})})})}}return n}},Q7e=["left","top","right","bottom","middle"],gXn=class{f=new Float64Array(1024);seq=new Uint32Array(1024);id=new Int32Array(1024);n=0;push(e,n,o){this.ensureCapacity(this.n+1);let i=this.n++;for(this.f[i]=e,this.seq[i]=n,this.id[i]=o;i>0;){const r=i-1>>1;if(this.less(r,i))break;this.swap(i,r),i=r}}pop(){const e=this.id[0];return this.n--,this.n>0&&(this.f[0]=this.f[this.n],this.seq[0]=this.seq[this.n],this.id[0]=this.id[this.n],this.siftDown(0)),e}get size(){return this.n}clear(){this.n=0}ensureCapacity(e){if(e<=this.f.length)return;let n=this.f.length;for(;n<e;)n*=2;const o=new Float64Array(n);o.set(this.f),this.f=o;const i=new Uint32Array(n);i.set(this.seq),this.seq=i;const r=new Int32Array(n);r.set(this.id),this.id=r}siftDown(e){for(;;){const n=2*e+1,o=n+1;if(n>=this.n)return;let i=n;if(o<this.n&&!this.less(n,o)&&(i=o),this.less(e,i))return;this.swap(e,i),e=i}}less(e,n){const o=this.f[e],i=this.f[n];return o!==i?o<i:this.seq[e]<this.seq[n]}swap(e,n){const o=this.f[e];this.f[e]=this.f[n],this.f[n]=o;const i=this.seq[e];this.seq[e]=this.seq[n],this.seq[n]=i;const r=this.id[e];this.id[e]=this.id[n],this.id[n]=r}},dXn=class{z=new Int32Array(1024);cellId=new Int32Array(1024);g=new Float64Array(1024);parent=new Int32Array(1024);ripHead=new Int32Array(1024).fill(-1);ripCount=new Int32Array(1024);length=0;clear(){this.length=0}push(e,n,o,i,r,s){this.ensureCapacity(this.length+1);const a=this.length++;return this.z[a]=e,this.cellId[a]=n,this.g[a]=o,this.parent[a]=i,this.ripHead[a]=r,this.ripCount[a]=s,a}ensureCapacity(e){if(e<=this.z.length)return;let n=this.z.length;for(;n<e;)n*=2;const o=new Int32Array(n);o.set(this.z),this.z=o;const i=new Int32Array(n);i.set(this.cellId),this.cellId=i;const r=new Float64Array(n);r.set(this.g),this.g=r;const s=new Int32Array(n);s.set(this.parent),this.parent=s;const a=new Int32Array(n);a.fill(-1),a.set(this.ripHead.subarray(0,this.length)),this.ripHead=a;const A=new Int32Array(n);A.set(this.ripCount.subarray(0,this.length)),this.ripCount=A}},hXn=class{connId=new Int32Array(1024);prev=new Int32Array(1024).fill(-1);length=0;clear(){this.length=0}append(e,n){this.ensureCapacity(this.length+1);const o=this.length++;return this.connId[o]=n,this.prev[o]=e,o}contains(e,n){for(let o=e;o>=0;o=this.prev[o])if(this.connId[o]===n)return!0;return!1}collect(e,n){n.length=0;for(let o=e;o>=0;o=this.prev[o])n.push(this.connId[o])}ensureCapacity(e){if(e<=this.connId.length)return;let n=this.connId.length;for(;n<e;)n*=2;const o=new Int32Array(n);o.set(this.connId),this.connId=o;const i=new Int32Array(n);i.fill(-1),i.set(this.prev.subarray(0,this.length)),this.prev=i}};function a7(t,e,n){return Math.max(e,Math.min(n,t))}function zse(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return;t.push(e)}function nft(t,e){for(let n=0;n<t.length;n++)if(t[n].cellId===e.cellId)return;t.push(e)}function v7e(t,e,n,o,i,r,s){const a=t-a7(t,o,r),A=e-a7(e,i,s);return a*a+A*A<=n*n}var w7e=class extends zA{getSolverName(){return"HighDensitySolverA03"}nodeWithPortPoints;highResolutionCellSize;highResolutionCellThickness;lowResolutionCellSize;viaDiameter;MAX_RIPS;maxCellCount;traceThickness;traceMargin;viaMinDistFromBorder;showPenaltyMap;showUsedCellMap;effort;stepMultiplier;hyperParameters;initialPenaltyFn;boundsMinX;boundsMaxX;boundsMinY;boundsMaxY;gridToBoundsTransform;availableZ;zToLayer;layerToZ;layers;fineRows;fineCols;lowScale;bandRows;bandCols;regions;planeSize;cellCenterX;cellCenterY;cellMinX;cellMinY;cellMaxX;cellMaxY;cellWidth;cellHeight;cellRegion;cellRow;cellCol;viaAllowed;neighborOffset;neighborIds;neighborCosts;usedCellsFlat;sharedCellsFlat;portOwnerFlat;penalty2d;ripStateBuckets;visitedStamp;bestGStamp;bestGValue;visitedFlatStamp;sharedCrossRootPortFlat;stamp=0;connNameToId;connIdToName;connIdToRootNet;overlapFriendlyRootNets;usedIndicesByConn;unsolvedSegs;solvedRoutes;activeConnSeg=null;activeConnId=-1;nodePool;heap;ripChain;seqCounter=0;_viaOccs=[];_cellOccs=[];_rippedIds=[];ripCount;totalRipEvents=0;searchIterations=0;consecutiveSkips=0;penaltyCap;baseSearchBudgetIters;_moveCost=0;_moveRippedHead=-1;_moveRipCount=0;traceKeepoutRadius;viaKeepoutRadius;get unsolvedConnections(){return this.unsolvedSegs}get solvedConnectionsMap(){const e=new Map;for(let n=0;n<this.solvedRoutes.length;n++){const o=this.getSolvedRoutesForConn(n);o.length>0&&e.set(n,o)}return e}get activeConnection(){if(!this.activeConnSeg)return null;const e=this.activeConnSeg.startCellId,n=this.activeConnSeg.endCellId;return{connectionName:this.connIdToName[this.activeConnSeg.connId]??"",start:{cellId:e,region:Q7e[this.cellRegion[e]],row:this.cellRow[e],col:this.cellCol[e],x:this.cellCenterX[e],y:this.cellCenterY[e],z:this.activeConnSeg.startZ},end:{cellId:n,region:Q7e[this.cellRegion[n]],row:this.cellRow[n],col:this.cellCol[n],x:this.cellCenterX[n],y:this.cellCenterY[n],z:this.activeConnSeg.endZ}}}get openSet(){return{length:this.heap?.size??0}}get gridStats(){return{cells:this.planeSize||0,layers:this.layers||0,states:(this.planeSize||0)*(this.layers||0),ripStateBuckets:this.ripStateBuckets||0,neighborEdges:this.neighborIds?.length??0,regionCounts:this.regions?Object.fromEntries(this.regions.map(e=>[e.name,e.rows*e.cols])):{}}}constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.highResolutionCellSize=e.highResolutionCellSize??.1,this.highResolutionCellThickness=Math.max(1,Math.floor(e.highResolutionCellThickness??8)),this.lowResolutionCellSize=e.lowResolutionCellSize??.4,this.viaDiameter=e.viaDiameter,this.maxCellCount=e.maxCellCount,this.traceThickness=e.traceThickness??.1,this.traceMargin=e.traceMargin??.15,this.viaMinDistFromBorder=e.viaMinDistFromBorder??.15,this.showPenaltyMap=e.showPenaltyMap??!1,this.showUsedCellMap=e.showUsedCellMap??!1,this.effort=e.effort??1,this.stepMultiplier=Math.max(1,Math.floor(e.stepMultiplier??1)),this.hyperParameters={shuffleSeed:0,ripCost:8,ripTracePenalty:.5,ripViaPenalty:.75,viaBaseCost:.1,greedyMultiplier:1.5,...e.hyperParameters},this.MAX_ITERATIONS=1e8,this.MAX_RIPS=200,this.initialPenaltyFn=e.initialPenaltyFn}getConstructorParams(){return[{nodeWithPortPoints:this.nodeWithPortPoints,highResolutionCellSize:this.highResolutionCellSize,highResolutionCellThickness:this.highResolutionCellThickness,lowResolutionCellSize:this.lowResolutionCellSize,viaDiameter:this.viaDiameter,maxCellCount:this.maxCellCount,stepMultiplier:this.stepMultiplier,traceThickness:this.traceThickness,traceMargin:this.traceMargin,viaMinDistFromBorder:this.viaMinDistFromBorder,showPenaltyMap:this.showPenaltyMap,showUsedCellMap:this.showUsedCellMap,effort:this.effort,hyperParameters:this.hyperParameters,initialPenaltyFn:this.initialPenaltyFn}]}_setup(){const{nodeWithPortPoints:e}=this,{width:n,height:o,center:i}=e,r=this.lowResolutionCellSize/this.highResolutionCellSize,s=Math.round(r);if(!Number.isFinite(r)||r<=0||Math.abs(r-s)>1e-9)return this.error="lowResolutionCellSize must be a positive integer multiple of highResolutionCellSize",void(this.failed=!0);this.lowScale=Math.max(1,s),this.availableZ=e.availableZ??[...new Set(e.portPoints.map(h=>h.z))].sort((h,d)=>h-d),this.layers=this.availableZ.length,this.zToLayer=new Map,this.layerToZ=new Map;for(let h=0;h<this.availableZ.length;h++){const d=this.availableZ[h];this.zToLayer.set(d,h),this.layerToZ.set(h,d)}this.boundsMinX=i.x-n/2,this.boundsMaxX=i.x+n/2,this.boundsMinY=i.y-o/2,this.boundsMaxY=i.y+o/2,this.traceKeepoutRadius=this.traceMargin+this.traceThickness/2,this.viaKeepoutRadius=this.viaDiameter/2+this.traceKeepoutRadius,this.buildFiveRegionGrid(n,o),this.gridToBoundsTransform=this.computeGridToBoundsTransform();const a=this.layers*this.planeSize;if(this.maxCellCount!==void 0&&a>this.maxCellCount)return this.error=`Cell count ${a} exceeds maxCellCount ${this.maxCellCount}`,void(this.failed=!0);this.connNameToId=new Map,this.connIdToName=[],this.connIdToRootNet=[],this.overlapFriendlyRootNets=new Set,this.unsolvedSegs=this.buildConnectionSegs(),this.penalty2d=new Float64Array(this.planeSize);const A=n>0?1/n:0,c=o>0?1/o:0;for(let h=0;h<this.planeSize;h++){let d=0;this.initialPenaltyFn&&(d+=this.initialPenaltyFn({x:this.cellCenterX[h],y:this.cellCenterY[h],px:(this.cellCenterX[h]-this.boundsMinX)*A,py:(this.cellCenterY[h]-this.boundsMinY)*c,cellId:h,region:Q7e[this.cellRegion[h]],row:this.cellRow[h],col:this.cellCol[h]})),this.penalty2d[h]=d}this.usedCellsFlat=new Int32Array(a).fill(-1),this.sharedCellsFlat=Array.from({length:a},()=>{}),this.portOwnerFlat=new Int32Array(a).fill(-1),this.sharedCrossRootPortFlat=new Uint8Array(a),this.ripStateBuckets=1;const l=a;this.visitedStamp=new Uint32Array(l),this.bestGStamp=new Uint32Array(l),this.bestGValue=new Float64Array(l),this.visitedFlatStamp=new Uint32Array(a),this.stamp=0;const u=new Map;for(const h of this.nodeWithPortPoints.portPoints){const d=this.connNameToId.get(h.connectionName);if(d===void 0)continue;const p=this.pointToCell(h),m=p.z*this.planeSize+p.cellId,_=this.connIdToRootNet[d],f=u.get(m);f===void 0?u.set(m,_):f!==_&&(this.sharedCrossRootPortFlat[m]=1);const I=this.portOwnerFlat[m];this.portOwnerFlat[m]=I===-1||I===d?d:-2}this.solvedRoutes=[],this.usedIndicesByConn=[],this.ripCount=[],this.consecutiveSkips=0,this.penaltyCap=.5*this.hyperParameters.ripCost,this.shuffleConnections();const g=eft({planeSize:this.planeSize,layers:this.layers,connectionCount:this.unsolvedSegs.length,effort:this.effort,maxIterations:this.MAX_ITERATIONS});this.baseSearchBudgetIters=g.baseSearchBudgetIters,this.MAX_ITERATIONS=g.maxIterationsIters,this.activeConnSeg=null,this.activeConnId=-1,this.nodePool=new dXn,this.heap=new gXn,this.ripChain=new hXn,this.seqCounter=0}_step(){for(let e=0;e<this.stepMultiplier;e++){if(this.solved||this.failed)return;this.stepOnce()}}buildFiveRegionGrid(e,n){this.fineCols=Math.max(1,Math.ceil(e/this.highResolutionCellSize)),this.fineRows=Math.max(1,Math.ceil(n/this.highResolutionCellSize)),this.bandCols=Math.min(this.highResolutionCellThickness,Math.floor(this.fineCols/2)),this.bandRows=Math.min(this.highResolutionCellThickness,Math.floor(this.fineRows/2));const o=Math.max(0,this.fineCols-2*this.bandCols),i=Math.max(0,this.fineRows-2*this.bandRows),r=o,s=o;this.regions=[{id:0,name:"left",fineOriginRow:0,fineOriginCol:0,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:1,name:"top",fineOriginRow:0,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:r,cellScale:1,rows:this.bandRows,cols:r,offset:0},{id:2,name:"right",fineOriginRow:0,fineOriginCol:this.fineCols-this.bandCols,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:3,name:"bottom",fineOriginRow:this.fineRows-this.bandRows,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:s,cellScale:1,rows:this.bandRows,cols:s,offset:0},{id:4,name:"middle",fineOriginRow:this.bandRows,fineOriginCol:this.bandCols,fineRows:i,fineCols:o,cellScale:this.lowScale,rows:i>0?Math.ceil(i/this.lowScale):0,cols:o>0?Math.ceil(o/this.lowScale):0,offset:0}];let a=0;for(let y=0;y<this.regions.length;y++)this.regions[y].offset=a,a+=this.regions[y].rows*this.regions[y].cols;this.planeSize=a,this.cellCenterX=new Float64Array(this.planeSize),this.cellCenterY=new Float64Array(this.planeSize),this.cellMinX=new Float64Array(this.planeSize),this.cellMinY=new Float64Array(this.planeSize),this.cellMaxX=new Float64Array(this.planeSize),this.cellMaxY=new Float64Array(this.planeSize),this.cellWidth=new Float64Array(this.planeSize),this.cellHeight=new Float64Array(this.planeSize),this.cellRegion=new Uint8Array(this.planeSize),this.cellRow=new Int32Array(this.planeSize),this.cellCol=new Int32Array(this.planeSize),this.viaAllowed=new Uint8Array(this.planeSize);for(let y=0;y<this.regions.length;y++){const x=this.regions[y];for(let E=0;E<x.rows;E++){const B=x.fineOriginRow+E*x.cellScale,S=Math.min(x.fineOriginRow+x.fineRows,B+x.cellScale),Q=this.boundsMinY+B*this.highResolutionCellSize,w=Math.min(this.boundsMaxY,this.boundsMinY+S*this.highResolutionCellSize);for(let M=0;M<x.cols;M++){const k=x.fineOriginCol+M*x.cellScale,R=Math.min(x.fineOriginCol+x.fineCols,k+x.cellScale),F=this.boundsMinX+k*this.highResolutionCellSize,O=Math.min(this.boundsMaxX,this.boundsMinX+R*this.highResolutionCellSize),U=this.cellIdFor(x.id,E,M);this.cellCenterX[U]=(F+O)/2,this.cellCenterY[U]=(Q+w)/2,this.cellMinX[U]=F,this.cellMinY[U]=Q,this.cellMaxX[U]=O,this.cellMaxY[U]=w,this.cellWidth[U]=O-F,this.cellHeight[U]=w-Q,this.cellRegion[U]=x.id,this.cellRow[U]=E,this.cellCol[U]=M;const Y=Math.min(this.cellCenterX[U]-this.boundsMinX,this.boundsMaxX-this.cellCenterX[U],this.cellCenterY[U]-this.boundsMinY,this.boundsMaxY-this.cellCenterY[U]);this.viaAllowed[U]=Y>=this.viaMinDistFromBorder?1:0}}}const A=Array.from({length:this.planeSize},()=>[]),c=(y,x)=>{if(y===x||y<0||x<0)return;const E=this.cellCenterX[y]-this.cellCenterX[x],B=this.cellCenterY[y]-this.cellCenterY[x],S=Math.hypot(E,B);nft(A[y],{cellId:x,cost:S}),nft(A[x],{cellId:y,cost:S})};for(let y=0;y<this.regions.length;y++){const x=this.regions[y];for(let E=0;E<x.rows;E++)for(let B=0;B<x.cols;B++){const S=this.cellIdFor(x.id,E,B);E+1<x.rows&&c(S,this.cellIdFor(x.id,E+1,B)),B+1<x.cols&&c(S,this.cellIdFor(x.id,E,B+1))}}const l=this.regions[0],u=this.regions[1],g=this.regions[2],h=this.regions[3],d=this.regions[4],p=l.rows>0&&l.cols>0,m=u.rows>0&&u.cols>0,_=g.rows>0&&g.cols>0,f=h.rows>0&&h.cols>0,I=d.rows>0&&d.cols>0;if(p&&m)for(let y=0;y<this.bandRows;y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(1,y,0));if(m&&_)for(let y=0;y<this.bandRows;y++)c(this.cellIdFor(1,y,u.cols-1),this.cellIdFor(2,y,0));if(p&&f)for(let y=this.fineRows-this.bandRows;y<this.fineRows;y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(3,y-(this.fineRows-this.bandRows),0));if(f&&_)for(let y=this.fineRows-this.bandRows;y<this.fineRows;y++)c(this.cellIdFor(3,y-(this.fineRows-this.bandRows),h.cols-1),this.cellIdFor(2,y,0));if(p&&I)for(let y=this.bandRows;y<this.fineRows-this.bandRows;y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(4,Math.floor((y-this.bandRows)/this.lowScale),0));if(_&&I)for(let y=this.bandRows;y<this.fineRows-this.bandRows;y++)c(this.cellIdFor(4,Math.floor((y-this.bandRows)/this.lowScale),d.cols-1),this.cellIdFor(2,y,0));if(m&&I)for(let y=this.bandCols;y<this.fineCols-this.bandCols;y++)c(this.cellIdFor(1,u.rows-1,y-this.bandCols),this.cellIdFor(4,0,Math.floor((y-this.bandCols)/this.lowScale)));if(f&&I)for(let y=this.bandCols;y<this.fineCols-this.bandCols;y++)c(this.cellIdFor(4,d.rows-1,Math.floor((y-this.bandCols)/this.lowScale)),this.cellIdFor(3,0,y-this.bandCols));if(!I&&!m&&!f&&p&&_)for(let y=0;y<Math.min(l.rows,g.rows);y++)c(this.cellIdFor(0,y,l.cols-1),this.cellIdFor(2,y,0));if(!I&&!p&&!_&&m&&f)for(let y=0;y<Math.min(u.cols,h.cols);y++)c(this.cellIdFor(1,u.rows-1,y),this.cellIdFor(3,0,y));const C=this.flattenNeighborLists(A);this.neighborOffset=C.offset,this.neighborIds=C.ids,this.neighborCosts=C.costs}cellIdFor(e,n,o){const i=this.regions[e];return i.offset+n*i.cols+o}stepOnce(){if(!this.activeConnSeg){if(this.unsolvedSegs.length===0)return void(this.solved=!0);const I=this.unsolvedSegs.shift();this.activeConnSeg=I,this.activeConnId=I.connId,this.nodePool.clear(),this.ripChain.clear(),this.heap.clear(),this.seqCounter=0,this.searchIterations=0,this.nextStamp();const C=this.computeH(I.startZ,I.startCellId,I.endZ,I.endCellId)*this.hyperParameters.greedyMultiplier,y=this.nodePool.push(I.startZ,I.startCellId,0,-1,-1,0),x=I.startZ*this.planeSize+I.startCellId,E=this.getSearchStateIdx(x,0);return this.bestGStamp[E]=this.stamp,this.bestGValue[E]=0,void this.heap.push(C,this.seqCounter++,y)}this.searchIterations++;const e=this.ripCount[this.activeConnId]??0,n=Math.round(this.baseSearchBudgetIters*(1+.25*Math.min(e,10)));if(this.searchIterations>n){const I=this.penalty2d;for(let C=0;C<I.length;C++)I[C]=.9*I[C];return this.unsolvedSegs.push(this.activeConnSeg),this.activeConnSeg=null,this.activeConnId=-1,this.heap.clear(),this.nodePool.clear(),this.consecutiveSkips++,void(this.consecutiveSkips>=Math.max(3,3*this.unsolvedSegs.length)&&(this.error=`Convergence failure: ${this.unsolvedSegs.length} connections stuck`,this.failed=!0))}if(this.heap.size===0)return this.error=`No path found for ${this.connIdToName[this.activeConnId]}`,void(this.failed=!0);const o=this.heap.pop(),i=this.nodePool.z[o],r=this.nodePool.cellId[o],s=this.nodePool.g[o],a=this.nodePool.ripHead[o],A=this.nodePool.ripCount[o],c=i*this.planeSize+r,l=this.getSearchStateIdx(c,A);if(this.visitedStamp[l]===this.stamp)return;this.visitedStamp[l]=this.stamp,this.visitedFlatStamp[c]=this.stamp;const u=this.activeConnSeg;if(i===u.endZ&&r===u.endCellId)return this.finalizeRoute(o),this.activeConnSeg=null,void(this.activeConnId=-1);const g=this.visitedStamp,h=this.stamp,d=this.activeConnId,p=u.endZ,m=u.endCellId,_=this.neighborOffset[r],f=this.neighborOffset[r+1];for(let I=_;I<f;I++){const C=this.neighborIds[I],y=i*this.planeSize+C;if(this.computeMoveCostAndRips(d,i,C,!1,a,A,this.neighborCosts[I]),this._moveCost<0)continue;const x=this.getSearchStateIdx(y,this._moveRipCount);if(g[x]===h)continue;const E=s+this._moveCost;if(this.bestGStamp[x]===h&&E>=this.bestGValue[x])continue;this.bestGStamp[x]=h,this.bestGValue[x]=E;const B=E+this.computeH(i,C,p,m)*this.hyperParameters.greedyMultiplier,S=this.nodePool.push(i,C,E,o,this._moveRippedHead,this._moveRipCount);this.heap.push(B,this.seqCounter++,S)}if(this.viaAllowed[r])for(let I=0;I<this.layers;I++){if(I===i)continue;const C=I*this.planeSize+r;if(this.computeMoveCostAndRips(d,I,r,!0,a,A,0),this._moveCost<0)continue;const y=this.getSearchStateIdx(C,this._moveRipCount);if(g[y]===h)continue;const x=s+this._moveCost;if(this.bestGStamp[y]===h&&x>=this.bestGValue[y])continue;this.bestGStamp[y]=h,this.bestGValue[y]=x;const E=x+this.computeH(I,r,p,m)*this.hyperParameters.greedyMultiplier,B=this.nodePool.push(I,r,x,o,this._moveRippedHead,this._moveRipCount);this.heap.push(E,this.seqCounter++,B)}}computeMoveCostAndRips(e,n,o,i,r,s,a){let A=0,c=r,l=s;const u=n*this.planeSize+o;if(i){A+=this.hyperParameters.viaBaseCost,A+=Math.min(this.penalty2d[o],this.penaltyCap);const g=this.portOwnerFlat[u],h=this.allowSharedUse(e,g),d=this.activeConnSeg,p=!!d&&n===d.endZ&&o===d.endCellId;if(g>=0&&g!==e&&!h&&!p)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillViaOccupants(o,e);const m=this._viaOccs;for(let _=0;_<m.length;_++){const f=m[_];this.ripChain.contains(c,f)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,f),l++),A+=this.hyperParameters.ripViaPenalty}}else{A+=a,A+=Math.min(this.penalty2d[o],this.penaltyCap);const g=this.portOwnerFlat[u],h=this.allowSharedUse(e,g),d=this.activeConnSeg,p=!!d&&n===d.endZ&&o===d.endCellId;if(g>=0&&g!==e&&!h&&!p)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillTraceOccupants(u,e,this._cellOccs);for(let m=0;m<this._cellOccs.length;m++){const _=this._cellOccs[m];this.ripChain.contains(c,_)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,_),l++),A+=this.hyperParameters.ripTracePenalty}}this._moveCost=A,this._moveRippedHead=c,this._moveRipCount=l}fillViaOccupants(e,n){const o=this._viaOccs;o.length=0;const i=this.cellCenterX[e],r=this.cellCenterY[e];this.forEachCellNearCircle(i,r,this.viaKeepoutRadius,s=>{if(v7e(i,r,this.viaKeepoutRadius,this.cellMinX[s],this.cellMinY[s],this.cellMaxX[s],this.cellMaxY[s]))for(let a=0;a<this.layers;a++)this.pushFlatOccupants(a*this.planeSize+s,n,o)})}fillTraceOccupants(e,n,o){o.length=0,this.pushFlatOccupants(e,n,o)}pushFlatOccupants(e,n,o){const i=this.usedCellsFlat[e];i===-1||i===n||this.allowSharedUse(n,i)||zse(o,i);const r=this.sharedCellsFlat[e];if(r)for(let s=0;s<r.length;s++){const a=r[s];a!==n&&(this.allowSharedUse(n,a)||zse(o,a))}}addSharedOccupant(e,n){if(this.usedCellsFlat[e]===n)return;let o=this.sharedCellsFlat[e];o||(o=[],this.sharedCellsFlat[e]=o),zse(o,n)}replaceOccupants(e,n){this.usedCellsFlat[e]=n,this.sharedCellsFlat[e]=void 0}removeOccupant(e,n){const o=this.sharedCellsFlat[e];if(this.usedCellsFlat[e]===n)return void(o&&o.length>0?(this.usedCellsFlat[e]=o.pop(),o.length===0&&(this.sharedCellsFlat[e]=void 0)):this.usedCellsFlat[e]=-1);if(!o)return;const i=o.indexOf(n);i!==-1&&(o.splice(i,1),o.length===0&&(this.sharedCellsFlat[e]=void 0))}allowSharedUse(e,n){return n<0?!1:this.connIdToRootNet[n]===this.connIdToRootNet[e]}shouldSkipFixedPortHalo(e,n){const o=this.portOwnerFlat[e];return o!==n&&(o===-2||!(o<0)&&!this.allowSharedUse(n,o))}nextStamp(){this.stamp=this.stamp+1>>>0,this.stamp===0&&(this.visitedStamp.fill(0),this.bestGStamp.fill(0),this.visitedFlatStamp.fill(0),this.stamp=1)}getSearchStateIdx(e,n){return e}computeH(e,n,o,i){const r=Math.hypot(this.cellCenterX[n]-this.cellCenterX[i],this.cellCenterY[n]-this.cellCenterY[i]);return e===o?r:r+this.hyperParameters.viaBaseCost}internConn(e,n){const o=this.connNameToId.get(e);if(o!==void 0)return o;const i=this.connIdToName.length;var r;return this.connIdToName.push(e),this.connIdToRootNet.push((r=e,n??r.replace(/_mst\d+$/,""))),this.connNameToId.set(e,i),i}buildConnectionSegs(){const e=new Map;for(const i of this.nodeWithPortPoints.portPoints){const r=i.connectionName;e.has(r)||e.set(r,{points:[],rootConnectionName:i.rootConnectionName}),e.get(r).points.push(i)}const n=[],o=new Set;for(const[i,r]of e){const s=r.points,a=Z_t(s);if(a.length===0)continue;const A=this.internConn(i,r.rootConnectionName);for(const[c,l]of a){const u=this.pointToCell(c),g=this.pointToCell(l),h=`${u.z}:${u.cellId}`,d=`${g.z}:${g.cellId}`,p=h<d?`${h}|${d}`:`${d}|${h}`,m=r.rootConnectionName??i,_=`${m}|${p}`;o.has(_)?this.overlapFriendlyRootNets.add(m):(o.add(_),n.push({connId:A,startZ:u.z,startCellId:u.cellId,startPoint:c,endZ:g.z,endCellId:g.cellId,endPoint:l}))}}return n}pointToCell(e){const n=a7(Math.floor((e.x-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),o=a7(Math.floor((e.y-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);let i=4;n<this.bandCols?i=0:n>=this.fineCols-this.bandCols?i=2:o<this.bandRows?i=1:o>=this.fineRows-this.bandRows&&(i=3);const r=this.regions[i],s=o-r.fineOriginRow,a=n-r.fineOriginCol,A=a7(Math.floor(s/r.cellScale),0,Math.max(0,r.rows-1)),c=a7(Math.floor(a/r.cellScale),0,Math.max(0,r.cols-1));return{z:this.zToLayer.get(e.z)??0,cellId:this.cellIdFor(i,A,c)}}shuffleConnections(){const e=this.unsolvedSegs;let n=this.hyperParameters.shuffleSeed>>>0;const o=()=>(n=Math.imul(n,1664525)+1013904223>>>0,n/4294967295);for(let i=e.length-1;i>0;i--){const r=Math.floor(o()*(i+1)),s=e[i];e[i]=e[r],e[r]=s}}finalizeRoute(e){this.consecutiveSkips=Math.max(0,this.consecutiveSkips-1);const n=[];let o=e;for(;o>=0;){const l=this.nodePool.z[o],u=this.nodePool.cellId[o];n.push(l*this.planeSize+u),o=this.nodePool.parent[o]}for(n.reverse();n.length>1&&this.sharedCrossRootPortFlat[n[0]];)n.shift();for(;n.length>1&&this.sharedCrossRootPortFlat[n[n.length-1]];)n.pop();const i=this.extractViaCellIds(n),r=this.activeConnId;this.ripChain.collect(this.nodePool.ripHead[e],this._rippedIds);for(let l=0;l<this._rippedIds.length;l++)if(this.ripTrace(this._rippedIds[l]),this.failed)return;const s=[];for(let l=0;l<n.length;l++){const u=n[l],g=Math.floor(u/this.planeSize),h=u-g*this.planeSize;this.markTraceFootprint(r,g,h,s)}const a=[];for(let l=0;l<i.length;l++)this.markViaFootprint(r,i[l],s,a);for(;this.usedIndicesByConn.length<=r;)this.usedIndicesByConn.push(void 0);const A=this.usedIndicesByConn[r]??[];for(A.push(...s),this.usedIndicesByConn[r]=A;this.solvedRoutes.length<=r;)this.solvedRoutes.push(void 0);const c=this.solvedRoutes[r]??[];c.push({connId:r,states:Int32Array.from(n),viaCellIds:Int32Array.from(i),startPoint:this.activeConnSeg.startPoint,endPoint:this.activeConnSeg.endPoint}),this.solvedRoutes[r]=c;for(let l=0;l<a.length;l++)if(this.ripTrace(a[l]),this.failed)return;if(this._rippedIds.length>0||a.length>0){const l=this.penalty2d,u=this.penaltyCap;if(this.totalRipEvents>50)for(let g=0;g<l.length;g++)l[g]=.99*l[g];else for(let g=0;g<l.length;g++)l[g]>u&&(l[g]=.5*l[g])}}extractViaCellIds(e){const n=[];for(let o=1;o<e.length;o++){const i=e[o-1],r=e[o],s=Math.floor(i/this.planeSize),a=Math.floor(r/this.planeSize);s!==a&&n.push(r-a*this.planeSize)}return n}markTraceFootprint(e,n,o,i){const r=this.cellCenterX[o],s=this.cellCenterY[o];this.forEachCellNearCircle(r,s,this.traceKeepoutRadius,a=>{if(!v7e(r,s,this.traceKeepoutRadius,this.cellMinX[a],this.cellMinY[a],this.cellMaxX[a],this.cellMaxY[a]))return;const A=n*this.planeSize+a;if(a!==o&&this.shouldSkipFixedPortHalo(A,e))return;const c=this.usedCellsFlat[A],l=this.allowSharedUse(e,c);(c===-1||c===e||l)&&(c!==-1&&c!==e?this.addSharedOccupant(A,e):this.usedCellsFlat[A]=e,i.push(A))})}markViaFootprint(e,n,o,i){const r=this.cellCenterX[n],s=this.cellCenterY[n];this.forEachCellNearCircle(r,s,this.viaKeepoutRadius,a=>{if(v7e(r,s,this.viaKeepoutRadius,this.cellMinX[a],this.cellMinY[a],this.cellMaxX[a],this.cellMaxY[a]))for(let A=0;A<this.layers;A++){const c=A*this.planeSize+a;if(a!==n&&this.shouldSkipFixedPortHalo(c,e))continue;if(this.fillTraceOccupants(c,e,this._cellOccs),this._cellOccs.length>0){for(let u=0;u<this._cellOccs.length;u++)zse(i,this._cellOccs[u]);this.replaceOccupants(c,e),o.push(c);continue}const l=this.usedCellsFlat[c];l!==-1&&l!==e?this.addSharedOccupant(c,e):this.usedCellsFlat[c]=e,o.push(c)}})}forEachCellNearCircle(e,n,o,i){const r=a7(Math.floor((e-o-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),s=a7(Math.floor((e+o-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),a=a7(Math.floor((n-o-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1),A=a7(Math.floor((n+o-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);for(let c=0;c<this.regions.length;c++){const l=this.regions[c];if(l.rows===0||l.cols===0)continue;const u=Math.max(a,l.fineOriginRow),g=Math.min(A,l.fineOriginRow+l.fineRows-1),h=Math.max(r,l.fineOriginCol),d=Math.min(s,l.fineOriginCol+l.fineCols-1);if(u>g||h>d)continue;const p=Math.floor((u-l.fineOriginRow)/l.cellScale),m=Math.floor((g-l.fineOriginRow)/l.cellScale),_=Math.floor((h-l.fineOriginCol)/l.cellScale),f=Math.floor((d-l.fineOriginCol)/l.cellScale);for(let I=p;I<=m;I++)for(let C=_;C<=f;C++)i(this.cellIdFor(l.id,I,C))}}ripTrace(e){for(;this.ripCount.length<=e;)this.ripCount.push(0);if(this.ripCount[e]++,this.totalRipEvents++,this.totalRipEvents>=this.MAX_RIPS)return this.error=`Convergence failure: exceeded MAX_RIPS ${this.MAX_RIPS}`,void(this.failed=!0);const n=this.getSolvedRoutesForConn(e);if(n.length>0)for(const i of n){for(let r=0;r<i.states.length;r++){const s=i.states[r]%this.planeSize;this.penalty2d[s]=this.penalty2d[s]+this.hyperParameters.ripTracePenalty}for(let r=0;r<i.viaCellIds.length;r++){const s=i.viaCellIds[r];this.penalty2d[s]=this.penalty2d[s]+this.hyperParameters.ripViaPenalty}}const o=this.usedIndicesByConn[e];if(o){for(let i=0;i<o.length;i++)this.removeOccupant(o[i],e);this.usedIndicesByConn[e]=void 0}if(n.length>0){this.solvedRoutes[e]=void 0;for(const i of n){const r=i.states[0],s=i.states[i.states.length-1],a=Math.floor(r/this.planeSize),A=Math.floor(s/this.planeSize);this.unsolvedSegs.push({connId:e,startZ:a,startCellId:r-a*this.planeSize,startPoint:i.startPoint,endZ:A,endCellId:s-A*this.planeSize,endPoint:i.endPoint})}}}flattenNeighborLists(e){const n=new Int32Array(e.length+1);let o=0;for(let a=0;a<e.length;a++)n[a]=o,o+=e[a].length;n[e.length]=o;const i=new Int32Array(o),r=new Float32Array(o);let s=0;for(let a=0;a<e.length;a++){const A=e[a];for(let c=0;c<A.length;c++){const l=A[c];i[s]=l.cellId,r[s]=l.cost,s++}}return{offset:n,ids:i,costs:r}}visualize(){const e=["red","blue","orange","green"],n=this.gridToBoundsTransform,o=[],i=[],r=[],s=[];if(s.push({center:{x:this.nodeWithPortPoints.center.x,y:this.nodeWithPortPoints.center.y},width:this.nodeWithPortPoints.width,height:this.nodeWithPortPoints.height,stroke:"gray"}),this.showPenaltyMap&&this.penalty2d){let c=0;for(let l=0;l<this.penalty2d.length;l++)this.penalty2d[l]>c&&(c=this.penalty2d[l]);if(c>0)for(let l=0;l<this.planeSize;l++){const u=this.penalty2d[l];if(u<=0)continue;const g=s7(n,{x:this.cellCenterX[l],y:this.cellCenterY[l]}),h=Math.min(.6,u/c*.6);s.push({center:g,width:this.cellWidth[l]*n.a,height:this.cellHeight[l]*n.e,fill:`rgba(255,165,0,${h.toFixed(3)})`})}}if(this.showUsedCellMap&&this.usedCellsFlat)for(let c=0;c<this.layers;c++){const l=c*this.planeSize;for(let u=0;u<this.planeSize;u++){if(this.usedCellsFlat[l+u]===-1)continue;const g=s7(n,{x:this.cellCenterX[u],y:this.cellCenterY[u]});s.push({center:g,width:this.cellWidth[u]*n.a,height:this.cellHeight[u]*n.e,fill:"rgba(0,0,255,0.5)"})}}for(const c of this.nodeWithPortPoints.portPoints)o.push({x:c.x,y:c.y,color:e[c.z]??"gray",label:c.connectionName});const a=["rgba(255,0,0,0.75)","rgba(0,0,255,0.75)","rgba(255,165,0,0.75)","rgba(0,128,0,0.75)"],A=this.getOutput();for(const c of A){if(c.route.length<2)continue;let l=0;for(let u=1;u<c.route.length;u++){const g=c.route[u-1];c.route[u].z!==g.z&&(u-l>=2&&i.push({points:c.route.slice(l,u).map(h=>({x:h.x,y:h.y})),strokeColor:a[g.z]??"rgba(128,128,128,0.75)",strokeWidth:this.traceThickness}),l=u)}if(c.route.length-l>=2){const u=c.route[l].z;i.push({points:c.route.slice(l).map(g=>({x:g.x,y:g.y})),strokeColor:a[u]??"rgba(128,128,128,0.75)",strokeWidth:this.traceThickness})}}for(const c of A)for(const l of c.vias)r.push({center:{x:l.x,y:l.y},radius:this.viaDiameter/2,fill:"rgba(0,0,0,0.3)",stroke:"black"});if(this.activeConnSeg&&this.visitedFlatStamp){const c=this.stamp;for(let l=0;l<this.layers;l++){const u=l*this.planeSize;for(let g=0;g<this.planeSize;g++){if(this.visitedFlatStamp[u+g]!==c)continue;const h=s7(n,{x:this.cellCenterX[g],y:this.cellCenterY[g]});o.push({x:h.x,y:h.y,color:"rgba(0,0,255,0.2)"})}}}return{points:o,lines:i,circles:r,rects:s,coordinateSystem:"cartesian",title:`HighDensityA03 [${this.getSolvedRouteCount()} solved, ${this.unsolvedSegs?.length??0} remaining]`}}getOutput(){const e=this.gridToBoundsTransform,n=[];for(let o=0;o<this.solvedRoutes.length;o++){const i=this.getSolvedRoutesForConn(o);if(i.length===0)continue;const r=this.connIdToName[o];for(const s of i){const a=Array.from(s.states,A=>{const c=Math.floor(A/this.planeSize),l=A-c*this.planeSize,u=s7(e,{x:this.cellCenterX[l],y:this.cellCenterY[l]});return{x:u.x,y:u.y,z:this.layerToZ.get(c)??c}});a.length>0&&(a[0]={...s.startPoint},a.length>1&&(a[a.length-1]={...s.endPoint})),n.push({connectionName:r,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:a,vias:Array.from(s.viaCellIds,A=>s7(e,{x:this.cellCenterX[A],y:this.cellCenterY[A]}))})}}return n}getSolvedRoutesForConn(e){const n=this.solvedRoutes[e];return n?Array.isArray(n)?n:[n]:[]}getSolvedRouteCount(){let e=0;for(let n=0;n<this.solvedRoutes.length;n++)e+=this.getSolvedRoutesForConn(n).length;return e}computeGridToBoundsTransform(){let e=1/0,n=-1/0,o=1/0,i=-1/0;for(let u=0;u<this.planeSize;u++){const g=this.cellCenterX[u],h=this.cellCenterY[u];g<e&&(e=g),g>n&&(n=g),h<o&&(o=h),h>i&&(i=h)}const r=n-e,s=i-o,a=this.boundsMaxX-this.boundsMinX,A=this.boundsMaxY-this.boundsMinY,c=r>0?a/r:1,l=s>0?A/s:1;return{a:c,b:0,c:r>0?this.boundsMinX-c*e:(this.boundsMinX+this.boundsMaxX)/2-e,d:0,e:l,f:s>0?this.boundsMinY-l*o:(this.boundsMinY+this.boundsMaxY)/2-o}}},P7e=t=>({minX:Math.min(t[0].x,t[1].x),maxX:Math.max(t[0].x,t[1].x),minY:Math.min(t[0].y,t[1].y),maxY:Math.max(t[0].y,t[1].y)});function Jse(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function nL(t,e,n){const o=Jse(e,n);if(o===0)return Jse(t,e);let i=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/o;return i=Math.max(0,Math.min(1,i)),Jse(t,{x:e.x+i*(n.x-e.x),y:e.y+i*(n.y-e.y)})}function pXn(t,e,n,o){if(Uh(t,e,n,o))return 0;const i={x:t.x,y:t.y},r={x:e.x,y:e.y},s={x:n.x,y:n.y},a={x:o.x,y:o.y};return Math.min(nL(i,s,a),nL(r,s,a),nL(s,i,r),nL(a,i,r))}var oB=class{segmentBuckets;viaBuckets;CELL_SIZE;maximumCopperRadius=0;constructor(e,n=1){this.segmentBuckets=new Map,this.viaBuckets=new Map,this.CELL_SIZE=n;for(const o of e)if(o&&o.connectionName){if(this.maximumCopperRadius=Math.max(this.maximumCopperRadius,o.traceThickness/2,o.viaDiameter/2),o.route&&o.route.length>=2)for(let i=0;i<o.route.length-1;i++){const r=o.route[i],s=o.route[i+1];if(r.x===s.x&&r.y===s.y||r.insideJumperPad&&s.insideJumperPad)continue;const a=[r,s],A=P7e(a),c={segmentId:`${o.connectionName}-seg-${i}`,segment:a,parentRoute:o},l=Math.floor(A.minX/this.CELL_SIZE),u=Math.floor((A.maxX+1e-9)/this.CELL_SIZE),g=Math.floor(A.minY/this.CELL_SIZE),h=Math.floor((A.maxY+1e-9)/this.CELL_SIZE);for(let d=l;d<=u;d++)for(let p=g;p<=h;p++){const m=`${d}x${p}`;let _=this.segmentBuckets.get(m);_||(_=[],this.segmentBuckets.set(m,_)),_.push(c)}}if(o.vias&&o.vias.length>0)for(let i=0;i<o.vias.length;i++){const r=o.vias[i];if(r==null)continue;const s={viaId:`${o.connectionName}-via-${i}`,x:r.x,y:r.y,parentRoute:o},a=`${Math.floor(r.x/this.CELL_SIZE)}x${Math.floor(r.y/this.CELL_SIZE)}`;let A=this.viaBuckets.get(a);A||(A=[],this.viaBuckets.set(a,A)),A.push(s)}}else console.warn("Skipping route with missing data:",o)}getConflictingRoutesForSegment(e,n,o){const i=P7e([e,n]),r=o+this.maximumCopperRadius,s=i.minX-r,a=i.minY-r,A=i.maxX+r,c=i.maxY+r,l=Math.floor(s/this.CELL_SIZE),u=Math.floor((A+1e-9)/this.CELL_SIZE),g=Math.floor(a/this.CELL_SIZE),h=Math.floor((c+1e-9)/this.CELL_SIZE),d=new Map,p=new Set,m=new Set,_={x:e.x,y:e.y},f={x:n.x,y:n.y};for(let C=l;C<=u;C++)for(let y=g;y<=h;y++){const x=`${C}x${y}`,E=this.segmentBuckets.get(x);if(E)for(const S of E){if(p.has(S.segmentId))continue;p.add(S.segmentId);const Q=S.parentRoute,[w,M]=S.segment;if(e.z!==n.z||w.z!==M.z||w.z!==e.z)continue;const k=o+Q.traceThickness/2,R=k*k,F=pXn(e,n,w,M);if(F<R){const O=Q.connectionName,U=d.get(O);(!U||F<U.minDistSq)&&d.set(O,{route:Q,minDistSq:F})}}const B=this.viaBuckets.get(x);if(B)for(const S of B){if(m.has(S.viaId))continue;m.add(S.viaId);const Q=S.parentRoute,w={x:S.x,y:S.y},M=o+Q.viaDiameter/2,k=M*M,R=nL(w,_,f);if(R<k){const F=Q.connectionName,O=d.get(F);(!O||R<O.minDistSq)&&d.set(F,{route:Q,minDistSq:R})}}}const I=[];for(const C of d.values())I.push({conflictingRoute:C.route,distance:Math.sqrt(C.minDistSq)});return I}removeRoute(e){for(const[n,o]of this.segmentBuckets){const i=o.filter(r=>r.parentRoute.connectionName!==e);i.length===0?this.segmentBuckets.delete(n):i.length!==o.length&&this.segmentBuckets.set(n,i)}for(const[n,o]of this.viaBuckets){const i=o.filter(r=>r.parentRoute.connectionName!==e);i.length===0?this.viaBuckets.delete(n):i.length!==o.length&&this.viaBuckets.set(n,i)}}addRoute(e){if(!e||!e.connectionName)return void console.warn("Skipping route with missing data:",e);if(this.maximumCopperRadius=Math.max(this.maximumCopperRadius,e.traceThickness/2,e.viaDiameter/2),e.route&&e.route.length>=2)for(let n=0;n<e.route.length-1;n++){const o=e.route[n],i=e.route[n+1];if(o.x===i.x&&o.y===i.y||o.insideJumperPad&&i.insideJumperPad)continue;const r=[o,i],s=P7e(r),a={segmentId:`${e.connectionName}-seg-${n}`,segment:r,parentRoute:e},A=Math.floor(s.minX/this.CELL_SIZE),c=Math.floor((s.maxX+1e-9)/this.CELL_SIZE),l=Math.floor(s.minY/this.CELL_SIZE),u=Math.floor((s.maxY+1e-9)/this.CELL_SIZE);for(let g=A;g<=c;g++)for(let h=l;h<=u;h++){const d=`${g}x${h}`;let p=this.segmentBuckets.get(d);p||(p=[],this.segmentBuckets.set(d,p)),p.push(a)}}if(e.vias&&e.vias.length>0)for(let n=0;n<e.vias.length;n++){const o=e.vias[n];if(o==null)continue;const i={viaId:`${e.connectionName}-via-${n}`,x:o.x,y:o.y,parentRoute:e},r=`${Math.floor(o.x/this.CELL_SIZE)}x${Math.floor(o.y/this.CELL_SIZE)}`;let s=this.viaBuckets.get(r);s||(s=[],this.viaBuckets.set(r,s)),s.push(i)}}getConflictingRoutesNearPoint(e,n){const o=n+this.maximumCopperRadius,i=e.x-o,r=e.y-o,s=e.x+o,a=e.y+o,A=Math.floor(i/this.CELL_SIZE),c=Math.floor((s+1e-9)/this.CELL_SIZE),l=Math.floor(r/this.CELL_SIZE),u=Math.floor((a+1e-9)/this.CELL_SIZE),g=new Map,h=new Set,d=new Set;for(let m=A;m<=c;m++)for(let _=l;_<=u;_++){const f=`${m}x${_}`,I=this.segmentBuckets.get(f);if(I)for(const y of I){if(h.has(y.segmentId))continue;h.add(y.segmentId);const x=y.segment[0],E=y.segment[1];if(x.z!==E.z||x.z!==e.z)continue;const B=y.parentRoute,S={x:y.segment[0].x,y:y.segment[0].y},Q={x:y.segment[1].x,y:y.segment[1].y},w=n+B.traceThickness/2,M=w*w,k=nL(e,S,Q);if(k<M){const R=B.connectionName,F=g.get(R);(!F||k<F.minDistSq)&&g.set(R,{route:B,minDistSq:k})}}const C=this.viaBuckets.get(f);if(C)for(const y of C){if(d.has(y.viaId))continue;d.add(y.viaId);const x=y.parentRoute,E={x:y.x,y:y.y},B=n+x.viaDiameter/2,S=B*B,Q=Jse(e,E);if(Q<S){const w=x.connectionName,M=g.get(w);(!M||Q<M.minDistSq)&&g.set(w,{route:x,minDistSq:Q})}}}const p=[];for(const m of g.values())p.push({conflictingRoute:m.route,distance:Math.sqrt(m.minDistSq)});return p}};function M7e(t){let e=t;for(let i=0;i<10;i++)e=16807*e%2147483647;let n=e;e=(69069*t+1)%2147483647;for(let i=0;i<10;i++)e=48271*e%2147483647;let o=e;return()=>{let i=n;n=o,i^=i<<23,i^=i>>>17,i^=o,i^=o>>>26,o=i;const r=(n+o)/4294967296;return r-Math.floor(r)}}var mXn={1:[[0]],2:[[0,1],[1,0]],3:[[0,1,2],[2,0,1],[1,0,2],[0,2,1],[1,2,0],[2,1,0]],4:[[0,1,2,3],[2,0,1,3],[1,3,2,0],[3,0,1,2],[0,2,1,3],[2,1,3,0],[3,0,2,1],[1,2,0,3],[3,1,0,2],[0,3,2,1],[2,3,0,1],[2,3,1,0],[1,2,3,0],[3,1,2,0],[0,1,3,2],[0,2,3,1],[0,3,1,2],[1,0,2,3],[1,0,3,2],[1,3,0,2],[2,0,3,1],[2,1,0,3],[3,2,0,1],[3,2,1,0]]};function D5(t,e){if(e===0||t.length===0)return t;if(t.length<=4){const i=mXn[t.length];return i[e%i.length].map(r=>t[r])}const n=M7e(e),o=t.slice();for(let i=0;i<o.length;i++){const r=Math.floor(n()*o.length),s=Math.floor(n()*(i+1));[o[r],o[s]]=[o[s],o[r]]}return o}var _Xn=t=>{let e=1/0;const n=t.portPoints;for(let o=0;o<n.length;o++)for(let i=o+1;i<n.length;i++){const r=n[o],s=n[i];if(r.z!==s.z||r.rootConnectionName&&r.rootConnectionName===s.rootConnectionName)continue;const a=Math.sqrt((r.x-s.x)**2+(r.y-s.y)**2);e=Math.min(e,a)}return e===1/0?0:e},fXn=class{heap=[];constructor(e){this.heap=[];for(const n of e)this.enqueue(n)}dequeue(){if(this.heap.length===0)return null;const e=this.heap[0];return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.heapifyDown(),e}peek(){return this.heap.length===0?null:this.heap[0]}enqueue(e){this.heap.push(e),this.heapifyUp()}heapifyUp(){let e=this.heap.length-1;const n=this.heap[e];for(;e>0;){const o=Math.floor((e-1)/2),i=this.heap[o];if(i.f<=n.f)break;this.heap[e]=i,e=o}this.heap[e]=n}heapifyDown(){let e=0;const n=this.heap.length,o=this.heap[e];if(o){for(;;){const i=2*e+1;if(i>=n)break;const r=i+1;let s=i;if(r<n&&this.heap[r].f<this.heap[i].f&&(s=r),o.f<this.heap[s].f)break;this.heap[e]=this.heap[s],e=s}this.heap[e]=o}}getTopN(e){return[...this.heap].sort((n,o)=>n.f-o.f).slice(0,e)}},oL=(t,e,n=[])=>[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`
`),IXn=class extends yr{getSolverName(){return"SingleHighDensityRouteSolver"}obstacleRoutes;bounds;boundsSize;boundsCenter;A;B;straightLineDistance;viaDiameter;traceThickness;obstacleMargin;layerCount;availableZ;minCellSize=.05;cellStep=.05;GREEDY_MULTIPLER=1.1;numRoutes;VIA_PENALTY_FACTOR=.3;CELL_SIZE_FACTOR;NEARBY_SEGMENT_CLEARANCE;exploredNodes;viasInPathByNode=new WeakMap;gridMinXIndex;gridMinYIndex;gridWidth;gridHeight;candidates;connectionName;rootConnectionName;regionId;solvedPath=null;futureConnections;hyperParameters;connMap;obstacleSegments=[];obstacleSegmentIndex=null;obstacleSegmentsByLayer=new Map;obstacleSegmentIndexByLayer=new Map;obstacleVias=[];obstacleViaIndex=null;debug_exploredNodesOrdered;debug_nodesTooCloseToObstacle;debug_nodePathToParentIntersectsObstacle;debugEnabled;initialNodeGridOffset;constructor(e){super(),this.bounds=e.bounds,this.connMap=e.connMap,this.hyperParameters=e.hyperParameters??{},this.CELL_SIZE_FACTOR=this.hyperParameters.CELL_SIZE_FACTOR??1,this.boundsSize={width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY},this.boundsCenter={x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},this.connectionName=e.connectionName,this.rootConnectionName=e.rootConnectionName,this.regionId=e.regionId,this.obstacleRoutes=e.obstacleRoutes,this.A=e.A,this.B=e.B,this.viaDiameter=e.viaDiameter??.3,this.traceThickness=e.traceThickness??.15,this.obstacleMargin=e.obstacleMargin??.15,this.layerCount=e.layerCount??2,this.availableZ=e.availableZ&&e.availableZ.length>0?[...new Set(e.availableZ)].sort((g,h)=>g-h):Array.from({length:this.layerCount},(g,h)=>h),this.exploredNodes=new Set,this.straightLineDistance=no(this.A,this.B),this.futureConnections=e.futureConnections??[],this.NEARBY_SEGMENT_CLEARANCE=e.nearbySegmentClearance??.15,this.debugEnabled=e.captureSearchDebug??!0,this.MAX_ITERATIONS=1e4,this.debug_exploredNodesOrdered=[],this.debug_nodesTooCloseToObstacle=new Set,this.debug_nodePathToParentIntersectsObstacle=new Set,this.numRoutes=this.obstacleRoutes.length+this.futureConnections.length,this.buildObstacleIndexes();const n=Math.ceil(5*(this.numRoutes+1));let o=this.boundsSize.width/this.cellStep,i=this.boundsSize.height/this.cellStep;for(;o*i>n**2&&!(2*this.cellStep>e.minDistBetweenEnteringPoints);)this.cellStep*=2,o=this.boundsSize.width/this.cellStep,i=this.boundsSize.height/this.cellStep;this.cellStep*=this.CELL_SIZE_FACTOR,this.gridMinXIndex=Math.round(this.bounds.minX/this.cellStep)-1,this.gridMinYIndex=Math.round(this.bounds.minY/this.cellStep)-1;const r=Math.round(this.bounds.maxX/this.cellStep)+1,s=Math.round(this.bounds.maxY/this.cellStep)+1;this.gridWidth=r-this.gridMinXIndex+1,this.gridHeight=s-this.gridMinYIndex+1;const a=Math.abs(this.A.x-this.bounds.minX)<.001&&Math.abs(this.B.x-this.bounds.minX)<.001||Math.abs(this.A.x-this.bounds.maxX)<.001&&Math.abs(this.B.x-this.bounds.maxX)<.001||Math.abs(this.A.y-this.bounds.minY)<.001&&Math.abs(this.B.y-this.bounds.minY)<.001||Math.abs(this.A.y-this.bounds.maxY)<.001&&Math.abs(this.B.y-this.bounds.maxY)<.001;this.futureConnections&&this.futureConnections.length===0&&this.obstacleRoutes.length===0&&!a&&this.handleSimpleCases();const A={x:Math.round(e.A.x/(this.cellStep/2))*(this.cellStep/2),y:Math.round(e.A.y/(this.cellStep/2))*(this.cellStep/2)};this.initialNodeGridOffset={x:A.x-Math.round(e.A.x/this.cellStep)*this.cellStep,y:A.y-Math.round(e.A.y/this.cellStep)*this.cellStep};const c={...e.A,z:e.A.z??0,g:0,h:0,f:0,parent:null},l={...e.A,...A,z:e.A.z??0,g:0,h:0,f:0,parent:c},u=(Math.abs(l.x-e.A.x)>1e-9||Math.abs(l.y-e.A.y)>1e-9)&&(this.isNodeTooCloseToObstacle(l)||this.isNodeTooCloseToEdge(l,!1)||this.doesPathToParentIntersectObstacle(l));this.candidates=new fXn([u?c:l])}handleSimpleCases(){this.solved=!0;const{A:e,B:n}=this,o=e.z===n.z?[e,n]:[e,{...this.boundsCenter,z:this.A.z},{...this.boundsCenter,z:n.z},n];this.solvedPath={connectionName:this.connectionName,rootConnectionName:this.rootConnectionName,regionId:this.regionId,route:o,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:this.A.z===this.B.z?[]:[this.boundsCenter]}}get viaPenaltyDistance(){return this.cellStep+this.straightLineDistance*this.VIA_PENALTY_FACTOR}isNodeTooCloseToObstacle(e,n,o,i){if(n??=this.obstacleMargin,o&&e.parent){const c=this.getViasInNodePath(e.parent);for(const l of c)if(no(e,l)<this.viaDiameter/2+n)return!0}const r=this.traceThickness+n,s=i?.segments??(o?this.obstacleSegments:this.obstacleSegmentsByLayer.get(e.z)),a=i?.segmentIds??(o?this.obstacleSegmentIndex:this.obstacleSegmentIndexByLayer.get(e.z))?.search(e.x-r,e.y-r,e.x+r,e.y+r)??[];if(s)for(const c of a){const l=s[c];if(l&&!l.connectedToCurrentConnection&&(o||l.z===e.z)&&(!i||!(e.x+r<l.minX||e.y+r<l.minY||e.x-r>l.maxX||e.y-r>l.maxY))&&wc(e,l.A,l.B)<r)return!0}const A=this.viaDiameter/2+this.traceThickness/2+n;if(this.obstacleViaIndex){const c=this.obstacleViaIndex.search(e.x-A,e.y-A,e.x+A,e.y+A);for(const l of c){const u=this.obstacleVias[l];if(u&&no(e,u)<A)return!0}}return!1}isNodeTooCloseToEdge(e,n){const o=n?this.viaDiameter/2+this.obstacleMargin/2:this.obstacleMargin/2,i=e.x<this.bounds.minX+o||e.x>this.bounds.maxX-o||e.y<this.bounds.minY+o||e.y>this.bounds.maxY-o;return!(i&&!n&&(no(e,this.B)<2*o||no(e,this.A)<2*o))&&i}doesPathToParentIntersectObstacle(e,n){const o=e.parent;if(!o)return!1;const i=n?.segments??this.obstacleSegmentsByLayer.get(e.z);if(!i)return!1;const r=e.z===o.z&&this.obstacleSegments.length>0?this.NEARBY_SEGMENT_CLEARANCE:0,s=Math.min(e.x,o.x),a=Math.max(e.x,o.x),A=Math.min(e.y,o.y),c=Math.max(e.y,o.y),l=n?.segmentIds??this.obstacleSegmentIndexByLayer.get(e.z)?.search(s-r,A-r,a+r,c+r)??[];for(const u of l){const g=i[u];if(g&&!g.connectedToCurrentConnection&&!(g.z!==e.z||n&&(a+r<g.minX||c+r<g.minY||s-r>g.maxX||A-r>g.maxY))&&(Uh(e,o,g.A,g.B)||r>0&&yXn(e,o,g.A,g.B)<r))return!0}return!1}getPlanarObstacleQuery(e){const n=e.parent;if(!n)return;const o=this.obstacleSegmentIndexByLayer.get(e.z),i=this.obstacleSegmentsByLayer.get(e.z);if(!o||!i)return;const r=this.traceThickness+this.obstacleMargin,s=e.z===n.z&&this.obstacleSegments.length>0?this.NEARBY_SEGMENT_CLEARANCE:0;return{segments:i,segmentIds:o.search(Math.min(e.x-r,n.x-s),Math.min(e.y-r,n.y-s),Math.max(e.x+r,n.x+s),Math.max(e.y+r,n.y+s))}}buildObstacleIndexes(){if(this.obstacleRoutes.length===0)return this.obstacleSegmentIndex=null,this.obstacleSegmentsByLayer.clear(),this.obstacleSegmentIndexByLayer.clear(),void(this.obstacleViaIndex=null);const e=[],n=[];for(const o of this.obstacleRoutes){const i=this.connMap?.areIdsConnected?.(this.connectionName,o.connectionName)??!1;for(const r of CXn(o))e.push({...r,minX:Math.min(r.A.x,r.B.x),minY:Math.min(r.A.y,r.B.y),maxX:Math.max(r.A.x,r.B.x),maxY:Math.max(r.A.y,r.B.y),connectedToCurrentConnection:i});for(const r of o.vias)n.push(r)}if(this.obstacleSegments=e,this.obstacleVias=n,this.obstacleSegmentsByLayer.clear(),this.obstacleSegmentIndexByLayer.clear(),e.length>0){const o=new X4(e.length);for(const i of e)o.add(i.minX,i.minY,i.maxX,i.maxY);o.finish(),this.obstacleSegmentIndex=o;for(const i of e){if(i.connectedToCurrentConnection)continue;const r=this.obstacleSegmentsByLayer.get(i.z);r?r.push(i):this.obstacleSegmentsByLayer.set(i.z,[i])}for(const[i,r]of this.obstacleSegmentsByLayer){const s=new X4(r.length);for(const a of r)s.add(a.minX,a.minY,a.maxX,a.maxY);s.finish(),this.obstacleSegmentIndexByLayer.set(i,s)}}else this.obstacleSegmentIndex=null;if(n.length>0){const o=new X4(n.length);for(const i of n)o.add(i.x,i.y,i.x,i.y);o.finish(),this.obstacleViaIndex=o}else this.obstacleViaIndex=null}computeH(e){return no(e,this.B)+(e.z!==this.B.z?this.viaPenaltyDistance:0)}computeG(e){return(e.parent?.g??0)+(e.z===e.parent?.z?0:this.viaPenaltyDistance)+no(e,e.parent)}computeF(e,n){return e+n*this.GREEDY_MULTIPLER}setNodeCosts(e){e.g=this.computeG(e),e.h=this.computeH(e),e.f=this.computeF(e.g,e.h)}getNodeKey(e){const n=Math.round(e.x/this.cellStep)-this.gridMinXIndex,o=Math.round(e.y/this.cellStep)-this.gridMinYIndex;return(e.z*this.gridHeight+o)*this.gridWidth+n}getNeighbors(e){const n=[],{maxX:o,minX:i,maxY:r,minY:s}=this.bounds;for(let a=-1;a<=1;a++)for(let A=-1;A<=1;A++){if(a===0&&A===0)continue;const c={x:oft(e.x+a*this.cellStep,i,o),y:oft(e.y+A*this.cellStep,s,r),z:e.z,g:e.g,h:e.h,f:e.f,parent:e},l=this.getNodeKey(c);if(this.exploredNodes.has(l))continue;const u=this.getPlanarObstacleQuery(c);this.isNodeTooCloseToObstacle(c,void 0,!1,u)?(this.debugEnabled&&this.debug_nodesTooCloseToObstacle.add(l),this.exploredNodes.add(l)):this.isNodeTooCloseToEdge(c,!1)?this.exploredNodes.add(l):this.doesPathToParentIntersectObstacle(c,u)?(this.debugEnabled&&this.debug_nodePathToParentIntersectsObstacle.add(l),this.exploredNodes.add(l)):(this.setNodeCosts(c),n.push(c))}for(const a of this.availableZ){if(a===e.z)continue;const A={x:e.x,y:e.y,z:a,g:e.g,h:e.h,f:e.f,parent:e};this.exploredNodes.has(this.getNodeKey(A))||this.isNodeTooCloseToObstacle(A,this.viaDiameter/2+this.obstacleMargin/2,!0)||this.isNodeTooCloseToEdge(A,!0)||(this.setNodeCosts(A),n.push(A))}return n}getNodePath(e){const n=[];for(;e;)n.push(e),e=e.parent;return n}getViasInNodePath(e){const n=this.viasInPathByNode.get(e);if(n)return n;const o=e.parent,i=o?this.getViasInNodePath(o):[],r=o&&e.z!==o.z?[{x:e.x,y:e.y},...i]:i;return this.viasInPathByNode.set(e,r),r}setSolvedPath(e){const n=this.getNodePath(e);n.reverse();const o=[];for(let i=0;i<n.length-1;i++)n[i].z!==n[i+1].z&&o.push({x:n[i].x,y:n[i].y});this.solvedPath={connectionName:this.connectionName,rootConnectionName:this.rootConnectionName,regionId:this.regionId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:n.map(i=>({x:i.x,y:i.y,z:i.z})).concat([this.B]),vias:o}}computeProgress(e,n,o){if(n===void 0||o===void 0)return Number.NaN;o||(n+=this.viaPenaltyDistance);const i=1-n/this.straightLineDistance;return Math.max(this.progress||0,2/Math.PI*Math.atan(.112*i/(1-i)))}_step(){let e=this.candidates.dequeue(),n=e?this.getNodeKey(e):void 0;for(;e&&n&&this.exploredNodes.has(n);)e=this.candidates.dequeue(),n=e?this.getNodeKey(e):void 0;if(!e||!n)return this.failed=!0,void(this.error="Ran out of candidate nodes to explore");this.exploredNodes.add(n),this.debugEnabled&&this.debug_exploredNodesOrdered.push({key:n,x:Math.round(e.x/this.cellStep)*this.cellStep+this.initialNodeGridOffset.x,y:Math.round(e.y/this.cellStep)*this.cellStep+this.initialNodeGridOffset.y,z:e.z});const o=no(e,this.B);this.progress=this.computeProgress(e,o,e.z===this.B.z),o<=this.cellStep*Math.SQRT2&&e.z===this.B.z&&!this.doesPathToParentIntersectObstacle({...e,parent:e,x:this.B.x,y:this.B.y})&&(this.solved=!0,this.setSolvedPath(e));const i=this.getNeighbors(e);for(const r of i)this.candidates.enqueue(r)}visualize(){const e={lines:[],points:[],rects:[],circles:[]};e.points.push({x:this.A.x,y:this.A.y,label:oL(this.connectionName,this.rootConnectionName,["Input A",`z: ${this.A.z}`]),color:"orange"}),e.points.push({x:this.B.x,y:this.B.y,label:oL(this.connectionName,this.rootConnectionName,["Input B",`z: ${this.B.z}`]),color:"orange"}),e.lines.push({points:[this.A,this.B],strokeColor:"rgba(255, 0, 0, 0.5)",label:oL(this.connectionName,this.rootConnectionName,["Direct Input Connection"])});for(let n=0;n<this.obstacleRoutes.length;n++){const o=this.obstacleRoutes[n];for(let i=0;i<o.route.length-1;i++){const r=o.route[i].z;e.lines.push({points:[o.route[i],o.route[i+1]],strokeColor:r===0?"rgba(255, 0, 0, 0.75)":"rgba(255, 128, 0, 0.25)",strokeWidth:o.traceThickness,label:oL(o.connectionName,o.rootConnectionName,["Obstacle Route"]),layer:`obstacle${n.toString()}`})}}for(let n=0;n<this.debug_exploredNodesOrdered.length;n++){const{key:o,x:i,y:r,z:s}=this.debug_exploredNodesOrdered[n];this.debug_nodesTooCloseToObstacle.has(o)||this.debug_nodePathToParentIntersectsObstacle.has(o)||e.rects.push({center:{x:i+s*this.cellStep/20,y:r+s*this.cellStep/20},fill:s===0?`rgba(255,0,255,${.3-n/this.debug_exploredNodesOrdered.length*.2})`:`rgba(0,0,255,${.3-n/this.debug_exploredNodesOrdered.length*.2})`,width:.9*this.cellStep,height:.9*this.cellStep,label:`Explored (z=${s})`})}if(this.candidates.peek()){const n=this.candidates.peek();e.rects.push({center:{x:n.x+n.z*this.cellStep/20,y:n.y+n.z*this.cellStep/20},fill:"rgba(0, 255, 0, 0.8)",width:.9*this.cellStep,height:.9*this.cellStep,label:`Next (z=${n.z})`})}for(const n of this.obstacleRoutes)for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:this.viaDiameter/2,fill:"rgba(255, 0, 0, 0.5)",label:"Via"});if(this.solvedPath){e.lines.push({points:this.solvedPath.route,strokeColor:"green",label:oL(this.solvedPath.connectionName,this.solvedPath.rootConnectionName,["Solved Route"])});for(const n of this.solvedPath.vias)e.circles.push({center:n,radius:this.viaDiameter/2,fill:"green",label:oL(this.solvedPath.connectionName,this.solvedPath.rootConnectionName,["Via"])})}return e}};function CXn(t){const e=[];for(let n=0;n<t.route.length-1;n++)t.route[n].z===t.route[n+1].z&&e.push({z:t.route[n].z,A:t.route[n],B:t.route[n+1]});return e}function oft(t,e,n){return Math.max(e,Math.min(t,n))}function yXn(t,e,n,o){return Math.min(wc(t,n,o),wc(e,n,o),wc(n,t,e),wc(o,t,e))}var ift=class extends IXn{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR=2;FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR=1;FUTURE_CONNECTION_PROXIMITY_VD=10;MISALIGNED_DIST_PENALTY_FACTOR=5;VIA_PENALTY_FACTOR_2=1;FLIP_TRACE_ALIGNMENT_DIRECTION=!1;FUTURE_CONNECTION_VIA_TRACE_CLEARANCE=.1;futureConnectionPoints;futureConnectionSegmentsCache=null;constructor(e){super({...e,nearbySegmentClearance:e.nearbySegmentClearance??(e.traceThickness??.15)/2+(e.obstacleMargin??.15)});for(const i in e.hyperParameters)this[i]=e.hyperParameters[i];const n=this.boundsSize.width/this.viaDiameter,o=Math.max(1,this.numRoutes);this.VIA_PENALTY_FACTOR=n/o*.3*this.VIA_PENALTY_FACTOR_2,this.futureConnectionPoints=this.futureConnections.flatMap(i=>i.points)}getClosestFutureConnectionPoint(e){let n=1/0,o=null;for(const i of this.futureConnectionPoints){const r=no(e,i)+(e.z!==i.z?this.viaPenaltyDistance:0);r<n&&(n=r,o=i)}return o}getFutureConnectionSegments(){if(this.futureConnectionSegmentsCache)return this.futureConnectionSegmentsCache;const e=[];for(const n of this.futureConnections){if(n.connectionName===this.connectionName||(this.connMap?.areIdsConnected?.(this.connectionName,n.connectionName)??!1))continue;const[o,...i]=n.points;if(o)for(const r of i)Math.abs(o.x-r.x)<1e-9&&Math.abs(o.y-r.y)<1e-9||e.push({connectionName:n.connectionName,start:o,end:r})}return this.futureConnectionSegmentsCache=e,e}isViaTooCloseToFutureConnectionTrace(e){const n=this.viaDiameter/2+this.traceThickness/2+this.FUTURE_CONNECTION_VIA_TRACE_CLEARANCE;for(const o of this.getFutureConnectionSegments())if(wc(e,o.start,o.end)<n)return!0;return!1}isNodeTooCloseToObstacle(e,n,o,i){return!!super.isNodeTooCloseToObstacle(e,n,o,i)||!(!o||!this.isViaTooCloseToFutureConnectionTrace(e))}diminishCloseToGoal(e){const n=no(e,this.B);return 1-Math.exp(-n/this.straightLineDistance*5)}getFutureConnectionPenalty(e,n){let o=0;const i=this.getClosestFutureConnectionPoint(e),r=no(e,this.B);if(i){const s=no(e,i);if(r<=s)return 0;const a=s/(this.viaDiameter*this.FUTURE_CONNECTION_PROXIMITY_VD);o=(n?this.straightLineDistance*this.FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:this.straightLineDistance*this.FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR)*Math.exp(5*-a)}return o}computeH(e){const n=no(e,this.B)**1.6;return this.straightLineDistance,n+(e.z!==this.B.z?this.viaPenaltyDistance:0)+this.getFutureConnectionPenalty(e,e.z!==e.parent?.z)}computeG(e){const n=Math.abs(e.x-e.parent.x),o=Math.abs(e.y-e.parent.y),i=Math.sqrt(n**2+o**2),r=e.z%2==0,s=this.FLIP_TRACE_ALIGNMENT_DIRECTION?r?n:o:r?o:n;return(e.parent?.g??0)+(e.z===e.parent?.z?0:this.viaPenaltyDistance)+i+s*this.MISALIGNED_DIST_PENALTY_FACTOR+this.getFutureConnectionPenalty(e,e.z!==e.parent?.z)}setNodeCosts(e){const n=Math.abs(e.x-e.parent.x),o=Math.abs(e.y-e.parent.y),i=Math.sqrt(n**2+o**2),r=e.z%2==0,s=this.FLIP_TRACE_ALIGNMENT_DIRECTION?r?n:o:r?o:n,a=(e.parent?.g??0)+(e.z===e.parent?.z?0:this.viaPenaltyDistance)+i+s*this.MISALIGNED_DIST_PENALTY_FACTOR,A=no(e,this.B)**1.6+(e.z!==this.B.z?this.viaPenaltyDistance:0),c=this.getFutureConnectionPenalty(e,e.z!==e.parent?.z);e.g=a+c,e.h=A+c,e.f=this.computeF(e.g,e.h)}},D7e=(t,e,n=[])=>[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`
`),xXn=t=>`${t.x.toFixed(6)},${t.y.toFixed(6)},${t.z}`,N7e=t=>{const e=new Set,n=[];for(const o of t){const i=xXn(o);e.has(i)||(e.add(i),n.push(o))}return n},Wse=class extends yr{getSolverName(){return"IntraNodeRouteSolver"}nodeWithPortPoints;colorMap;unsolvedConnections;originalConnectionPointsByName;rootConnectionNameByConnectionName;totalConnections;solvedRoutes;failedSubSolvers;hyperParameters;minDistBetweenEnteringPoints;viaDiameter;traceWidth;obstacleMargin;captureSearchDebug;rerouteAttemptsByConnection;POSTROUTE_VIA_TRACE_CLEARANCE=.1;MAX_POSTROUTE_REPAIR_ATTEMPTS=2;activeSubSolver=null;connMap;get failedSolvers(){return this.failedSubSolvers}get activeSolver(){return this.activeSubSolver}constructor(e){const{nodeWithPortPoints:n,colorMap:o}=e;super(),this.nodeWithPortPoints=n,this.colorMap=o??{},this.solvedRoutes=[],this.hyperParameters=e.hyperParameters??{},this.failedSubSolvers=[],this.connMap=e.connMap,this.viaDiameter=e.viaDiameter??.3,this.traceWidth=e.traceWidth??.15,this.obstacleMargin=e.obstacleMargin??.15,this.captureSearchDebug=e.captureSearchDebug??!0;const i=new Map;this.rootConnectionNameByConnectionName=new Map;for(const{connectionName:r,rootConnectionName:s,x:a,y:A,z:c}of n.portPoints)s&&this.rootConnectionNameByConnectionName.set(r,s),i.set(r,[...i.get(r)??[],{x:a,y:A,z:c??0}]);this.originalConnectionPointsByName=new Map(Array.from(i.entries()).map(([r,s])=>[r,N7e(s)])),this.unsolvedConnections=Array.from(i.entries().map(([r,s])=>({connectionName:r,rootConnectionName:this.rootConnectionNameByConnectionName.get(r),points:N7e(s)}))),this.rerouteAttemptsByConnection=new Map,this.hyperParameters.SHUFFLE_SEED&&(this.unsolvedConnections=D5(this.unsolvedConnections,this.hyperParameters.SHUFFLE_SEED??0),this.unsolvedConnections=this.unsolvedConnections.map(({points:r,...s},a)=>({...s,points:D5(r,7117*a+(this.hyperParameters.SHUFFLE_SEED??0))}))),this.totalConnections=this.unsolvedConnections.length,this.MAX_ITERATIONS=1e3*this.totalConnections**1.5,this.minDistBetweenEnteringPoints=_Xn(this.nodeWithPortPoints)}computeProgress(){return(this.solvedRoutes.length+(this.activeSubSolver?.progress||0))/this.totalConnections}getSingleRouteSolverOpts(e){const{connectionName:n,rootConnectionName:o,points:i}=e;return{connectionName:n,rootConnectionName:o,regionId:this.nodeWithPortPoints.capacityMeshNodeId,minDistBetweenEnteringPoints:this.minDistBetweenEnteringPoints,bounds:Tz(this.nodeWithPortPoints),A:{x:i[0].x,y:i[0].y,z:i[0].z},B:{x:i[i.length-1].x,y:i[i.length-1].y,z:i[i.length-1].z},obstacleRoutes:this.connMap?this.solvedRoutes.filter(r=>!this.connMap.areIdsConnected(r.connectionName,n)):this.solvedRoutes,futureConnections:this.unsolvedConnections,layerCount:this.nodeWithPortPoints.portPoints.reduce((r,s)=>Math.max(r,(s.z??0)+1),2),availableZ:this.nodeWithPortPoints.availableZ&&this.nodeWithPortPoints.availableZ.length>0?this.nodeWithPortPoints.availableZ:[...new Set(this.nodeWithPortPoints.portPoints.map(r=>r.z??0))].sort((r,s)=>r-s),hyperParameters:this.hyperParameters,connMap:this.connMap,viaDiameter:this.viaDiameter,traceThickness:this.traceWidth,obstacleMargin:this.obstacleMargin,captureSearchDebug:this.captureSearchDebug}}trySolveSamePointLayerChange(e){const n=this.getSingleRouteSolverOpts(e),o=new ift(n),{A:i,B:r}=n,s={x:i.x,y:i.y};if(!EXn(o,s,i))return!1;const a=[{x:i.x,y:i.y,z:i.z},{...s,z:i.z},{...s,z:r.z},{x:r.x,y:r.y,z:r.z}].filter((A,c,l)=>c===0||Math.abs(A.x-l[c-1].x)>1e-6||Math.abs(A.y-l[c-1].y)>1e-6||A.z!==l[c-1].z);return this.solvedRoutes.push({connectionName:e.connectionName,rootConnectionName:e.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:a,vias:[{x:s.x,y:s.y}]}),!0}queueExtraBranchesForMultiPointConnection(e){const[n,...o]=N7e(e.points);if(!n||o.length<=1)return!1;for(const i of o)this.unsolvedConnections.push({connectionName:e.connectionName,rootConnectionName:e.rootConnectionName,points:[n,i]});return!0}getAvailableZLayers(){return this.nodeWithPortPoints.availableZ&&this.nodeWithPortPoints.availableZ.length>0?[...new Set(this.nodeWithPortPoints.availableZ)].sort((e,n)=>e-n):[...new Set(this.nodeWithPortPoints.portPoints.map(e=>e.z??0))].sort((e,n)=>e-n)}getFirstSolvedViaTraceConflict(){if(this.solvedRoutes.length<2)return null;const e=new oB(this.solvedRoutes),n=this.getAvailableZLayers();for(const o of this.solvedRoutes){const i=o.viaDiameter/2+this.POSTROUTE_VIA_TRACE_CLEARANCE;for(const r of o.vias)for(const s of n){const a=e.getConflictingRoutesNearPoint({x:r.x,y:r.y,z:s},i).filter(({conflictingRoute:A})=>A.connectionName!==o.connectionName&&!this.connMap?.areIdsConnected(o.connectionName,A.connectionName));if(a.length>0)return{route:o,via:r,conflictingRoute:a[0].conflictingRoute}}}return null}queueConnectionForPostrouteRepair(e){const n=this.originalConnectionPointsByName.get(e);return!(!n||n.length<2)&&(this.solvedRoutes=this.solvedRoutes.filter(o=>o.connectionName!==e),this.unsolvedConnections.push({connectionName:e,rootConnectionName:this.rootConnectionNameByConnectionName.get(e),points:n.map(o=>({...o}))}),this.rerouteAttemptsByConnection.set(e,(this.rerouteAttemptsByConnection.get(e)??0)+1),!0)}_step(){if(this.activeSubSolver)return this.activeSubSolver.step(),this.progress=this.computeProgress(),void(this.activeSubSolver.solved?(this.solvedRoutes.push(this.activeSubSolver.solvedPath),this.activeSubSolver=null):this.activeSubSolver.failed&&(this.failedSubSolvers.push(this.activeSubSolver),this.activeSubSolver=null,this.error=this.failedSubSolvers.map(n=>n.error).join(`
`),this.failed=!0));const e=this.unsolvedConnections.pop();if(this.progress=this.computeProgress(),!e){const n=this.getFirstSolvedViaTraceConflict();if(n){if((this.rerouteAttemptsByConnection.get(n.route.connectionName)??0)>=this.MAX_POSTROUTE_REPAIR_ATTEMPTS)return this.error=["Post-route via/trace clearance repair exceeded retry budget",`route: ${n.route.connectionName}`,`conflicts with: ${n.conflictingRoute.connectionName}`,`via: (${n.via.x.toFixed(3)}, ${n.via.y.toFixed(3)})`].join(`
`),void(this.failed=!0);if(this.queueConnectionForPostrouteRepair(n.route.connectionName))return void(this.progress=this.computeProgress())}return void(this.solved=this.failedSubSolvers.length===0)}if(e.points.length!==1&&!(e.points.length>2&&this.queueExtraBranchesForMultiPointConnection(e))){if(e.points.length===2){const[n,o]=e.points,i=Math.abs(n.x-o.x)<1e-6,r=Math.abs(n.y-o.y)<1e-6;if(i&&r&&n.z===o.z||i&&r&&n.z!==o.z&&this.trySolveSamePointLayerChange(e))return}this.activeSubSolver=new ift(this.getSingleRouteSolverOpts(e))}}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const a of this.nodeWithPortPoints.portPoints)e.points.push({x:a.x,y:a.y,label:D7e(a.connectionName,a.rootConnectionName,[`layer: ${a.z}`]),color:this.colorMap[a.connectionName]??"blue"});for(let a=0;a<this.solvedRoutes.length;a++){const A=this.solvedRoutes[a];if(A.route.length>0){const c=this.colorMap[A.connectionName]??"blue",l=A.rootConnectionName??this.rootConnectionNameByConnectionName.get(A.connectionName);for(let u=0;u<A.route.length-1;u++){const g=A.route[u],h=A.route[u+1];e.lines.push({points:[g,h],label:D7e(A.connectionName,l,[`layer: ${g.z}`]),strokeColor:g.z===0?Es(c,.2):Es(c,.8),layer:`route-layer-${g.z}`,step:a,strokeWidth:A.traceThickness})}for(const u of A.vias)e.circles.push({center:{x:u.x,y:u.y},radius:A.viaDiameter/2,fill:Es(c,.5),layer:"via",step:a,label:D7e(A.connectionName,l,["via"])})}}const n=Tz(this.nodeWithPortPoints),{minX:o,minY:i,maxX:r,maxY:s}=n;return e.lines.push({points:[{x:o,y:i},{x:r,y:i},{x:r,y:s},{x:o,y:s},{x:o,y:i}],strokeColor:"rgba(255, 0, 0, 0.25)",strokeDash:"4 4",layer:"border"}),e}},EXn=(t,e,n,o)=>{const i={x:e.x,y:e.y,z:n.z,parent:{x:n.x,y:n.y,z:n.z,g:0,h:0,f:0,parent:null},g:0,h:0,f:0};return!t.isNodeTooCloseToObstacle(i,t.viaDiameter/2+t.obstacleMargin/2,!0)&&!t.isNodeTooCloseToEdge(i,!0)},N5=t=>Math.round(200*t)/200,R7e=t=>typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t));Lse();var T7e=class extends Wse{getSolverName(){return"CachedIntraNodeRouteSolver"}cacheProvider;cacheHit=!1;hasAttemptedToUseCache=!1;initialUnsolvedConnections;constructor(e){super(e),this.cacheProvider=e.cacheProvider===void 0?tB():e.cacheProvider,this.initialUnsolvedConnections=R7e(this.unsolvedConnections),(this.solved||this.failed)&&this.cacheProvider&&!this.cacheHit&&this.saveToCacheSync()}_step(){if(!this.hasAttemptedToUseCache&&this.cacheProvider&&this.attemptToUseCacheSync())return;const e=this.solved,n=this.failed;super._step(),!this.cacheProvider||this.cacheHit||!this.solved&&!this.failed||e||n||this.saveToCacheSync()}computeCacheKeyAndTransform(){const e=this.nodeWithPortPoints.center,n=this.initialUnsolvedConnections.map(({connectionName:c,rootConnectionName:l,points:u})=>({connectionName:c,rootConnectionName:l,points:u.map(g=>({connectionName:c,x:N5(g.x-e.x),y:N5(g.y-e.y),z:g.z??0}))})),o=[...this.nodeWithPortPoints.portPoints].sort((c,l)=>c.connectionName!==l.connectionName?c.connectionName.localeCompare(l.connectionName):(c.portPointId??"")!==(l.portPointId??"")?(c.portPointId??"").localeCompare(l.portPointId??""):c.x!==l.x?c.x-l.x:c.y!==l.y?c.y-l.y:(c.z??0)-(l.z??0)).map(c=>({connectionName:c.connectionName,rootConnectionName:c.rootConnectionName,portPointId:c.portPointId,prevPortPointId:c.prevPortPointId,nextPortPointId:c.nextPortPointId,x:N5(c.x-e.x),y:N5(c.y-e.y),z:c.z??0})),i=Object.fromEntries(Object.entries(this.hyperParameters??{}).filter(([,c])=>c!==void 0).sort(([c],[l])=>c.localeCompare(l))),r=this.connMap?this.initialUnsolvedConnections.map(({connectionName:c})=>({connectionName:c,connectedIds:[...new Set(this.connMap.getIdsConnectedToNet(c)??[])].sort()})):void 0,s={cacheSchemaVersion:4,node:{width:N5(this.nodeWithPortPoints.width),height:N5(this.nodeWithPortPoints.height),center:{x:N5(this.nodeWithPortPoints.center.x),y:N5(this.nodeWithPortPoints.center.y)},availableZ:this.nodeWithPortPoints.availableZ?[...this.nodeWithPortPoints.availableZ].sort():void 0,portPoints:o},normalizedConnections:n,normalizedHyperParameters:i,minDistBetweenEnteringPoints:N5(this.minDistBetweenEnteringPoints),traceWidth:N5(this.traceWidth),viaDiameter:N5(this.viaDiameter),obstacleMargin:N5(this.obstacleMargin),normalizedConnMap:r},a=`intranode-solver:${$9e(s,{respectType:!1,unorderedObjects:!1})}`,A={};return this.cacheKey=a,this.cacheToSolveSpaceTransform=A,{cacheKey:a,cacheToSolveSpaceTransform:A}}applyCachedSolution(e){e.success?(this.solvedRoutes=R7e(e.solvedRoutes),this.solved=!0,this.failed=!1):(this.solvedRoutes=[],this.failedSubSolvers=[],this.solved=!1,this.failed=!0,this.error=e.error??this.error),this.unsolvedConnections=[],this.activeSubSolver=null,this.cacheHit=!0,this.progress=1}attemptToUseCacheSync(){if(this.hasAttemptedToUseCache=!0,!this.cacheProvider?.isSyncCache)return!1;if(!this.cacheKey)try{this.computeCacheKeyAndTransform()}catch(e){return console.error("Error computing cache key:",e),!1}if(!this.cacheKey)return console.error("Failed to compute cache key."),!1;try{const e=this.cacheProvider.getCachedSolutionSync(this.cacheKey);if(e!=null)return this.applyCachedSolution(e),!0}catch(e){console.error("Error attempting to use cache:",e)}return!1}saveToCacheSync(){if(!this.cacheProvider?.isSyncCache)return;if(!this.cacheKey)try{this.computeCacheKeyAndTransform()}catch(n){return void console.error("Error computing cache key during save:",n)}if(!this.cacheKey)return void console.error("Failed to compute cache key before saving.");const e=this.failed?{success:!1,error:this.error??void 0}:{success:!0,solvedRoutes:R7e(this.solvedRoutes)};try{this.cacheProvider.setCachedSolutionSync(this.cacheKey,e)}catch(n){console.error("Error saving solution to cache:",n)}}},rft=(t,e)=>{const n={};return t.portPoints.forEach((o,i)=>{n[o.connectionName]=`hsl(${360*i/t.portPoints.length}, 100%, 50%)`}),n},BXn=class extends yr{getSolverName(){return"ViaPossibilitiesSolver2"}bounds;maxViaCount;portPairMap;colorMap;nodeWidth;availableZ;hyperParameters;VIA_INTERSECTION_BUFFER_DISTANCE=.05;PLACEHOLDER_WALL_BUFFER_DISTANCE=.1;NEW_HEAD_WALL_BUFFER_DISTANCE=.05;viaDiameter;unprocessedConnections;completedPaths=new Map;placeholderPaths=new Map;currentHead;currentConnectionName;currentPath;currentViaCount;constructor({nodeWithPortPoints:e,colorMap:n,hyperParameters:o,viaDiameter:i}){super(),this.MAX_ITERATIONS=1e5,this.colorMap=n??rft(e),this.maxViaCount=5,this.bounds=Tz(e),this.nodeWidth=this.bounds.maxX-this.bounds.minX,this.portPairMap=(s=>{const a=new Map;return s.portPoints.forEach(A=>{a.has(A.connectionName)?a.get(A.connectionName).end=A:a.set(A.connectionName,{start:A,end:null,connectionName:A.connectionName})}),a})(e),this.stats.solutionsFound=0,this.availableZ=e.availableZ??[0,1],this.hyperParameters=o??{SHUFFLE_SEED:0},this.viaDiameter=i??.3,this.unprocessedConnections=Array.from(this.portPairMap.keys()).sort(),o?.SHUFFLE_SEED&&(this.unprocessedConnections=D5(this.unprocessedConnections,o.SHUFFLE_SEED));for(const[s,{start:a,end:A}]of this.portPairMap.entries())if(a.z===A.z){const c=Math.abs(a.x-A.x)<1e-9,l=Math.abs(a.y-A.y)<1e-9;c||l?this.placeholderPaths.set(s,[a,this._padByPlaceholderWallBuffer(a),this._padByPlaceholderWallBuffer(A),A]):this.placeholderPaths.set(s,[a,A])}else{const c=(a.x+A.x)/2,l=(a.y+A.y)/2,u=this._padByPlaceholderWallBuffer({x:c,y:l,z:a.z}),g=this._padByPlaceholderWallBuffer({x:c,y:l,z:A.z});this.placeholderPaths.set(s,[a,this._padByPlaceholderWallBuffer(a),u,g,this._padByPlaceholderWallBuffer(A),A])}this.currentConnectionName=this.unprocessedConnections.pop();const r=this.portPairMap.get(this.currentConnectionName).start;this.currentHead=this._padByNewHeadWallBuffer(r),this.currentPath=[r,this.currentHead],this.currentViaCount=0,this.placeholderPaths.delete(this.currentConnectionName)}_padByNewHeadWallBuffer(e){return{x:V3(e.x,this.bounds.minX+this.NEW_HEAD_WALL_BUFFER_DISTANCE,this.bounds.maxX-this.NEW_HEAD_WALL_BUFFER_DISTANCE),y:V3(e.y,this.bounds.minY+this.NEW_HEAD_WALL_BUFFER_DISTANCE,this.bounds.maxY-this.NEW_HEAD_WALL_BUFFER_DISTANCE),z:e.z}}_padByPlaceholderWallBuffer(e){return{x:V3(e.x,this.bounds.minX+this.PLACEHOLDER_WALL_BUFFER_DISTANCE,this.bounds.maxX-this.PLACEHOLDER_WALL_BUFFER_DISTANCE),y:V3(e.y,this.bounds.minY+this.PLACEHOLDER_WALL_BUFFER_DISTANCE,this.bounds.maxY-this.PLACEHOLDER_WALL_BUFFER_DISTANCE),z:e.z}}_step(){if(this.solved)return;const e=this.portPairMap.get(this.currentConnectionName).end,n=[this.currentHead,e];let o=null,i=null;const r=a=>{for(const A of a.values())for(let c=0;c<A.length-1;c++){const l=[A[c],A[c+1]];if(l[0].x===l[1].x&&l[0].y===l[1].y||l[0].z!==this.currentHead.z)continue;const u=DD(n[0],n[1],l[0],l[1]);if(u){const g=no(this.currentHead,u);if(g<1e-6)continue;(!o||g<o.dist)&&(o={point:u,dist:g},i=l[0].z)}}};r(this.completedPaths),r(this.placeholderPaths);const s=this.currentHead.z!==e.z;if((o||s)&&(this.currentViaCount++,this.currentViaCount>=this.maxViaCount))return this.failed=!0,void(this.error=`Exceeded max via count of ${this.maxViaCount}`);if(o){let a;const A=o.dist;if(A<=this.VIA_INTERSECTION_BUFFER_DISTANCE+1e-6)a=V8(this.currentHead,o.point);else{const g=o.point,h=g.x-this.currentHead.x,d=g.y-this.currentHead.y,p=(A-this.VIA_INTERSECTION_BUFFER_DISTANCE)/A;a={x:this.currentHead.x+h*p,y:this.currentHead.y+d*p}}const c=this.availableZ.find(g=>g!==i);if(c===void 0)return this.error="Could not determine next Z level for via placement!",void(this.failed=!0);const l={...a,z:this.currentHead.z},u={...a,z:c};this.currentPath.push(l,u),this.currentHead=u}else if(s){let a;const A=no(this.currentHead,e);if(A<this.VIA_INTERSECTION_BUFFER_DISTANCE)a=V8(this.currentHead,e);else{const g=e.x-this.currentHead.x,h=e.y-this.currentHead.y,d=(A-this.VIA_INTERSECTION_BUFFER_DISTANCE)/A;a={x:this.currentHead.x+g*d,y:this.currentHead.y+h*d}}const c=e.z,l={...a,z:this.currentHead.z},u={...a,z:c};this.currentPath.push(l,u),this.currentHead=u}else if(this.currentPath.push(e),this.completedPaths.set(this.currentConnectionName,this.currentPath),this.unprocessedConnections.length===0)this.solved=!0,this.stats.solutionsFound=1;else{this.currentConnectionName=this.unprocessedConnections.pop();const{start:a}=this.portPairMap.get(this.currentConnectionName);this.currentHead=this._padByNewHeadWallBuffer(a),this.currentPath=[a,this.currentHead],this.currentViaCount=0,this.placeholderPaths.delete(this.currentConnectionName)}}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:"Via Possibilities Solver State",coordinateSystem:"cartesian"},n=this.colorMap;e.lines.push({points:[{x:this.bounds.minX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.minY}],strokeColor:"gray",strokeWidth:.01});for(const[i,{start:r,end:s}]of this.portPairMap.entries()){const a=this.colorMap[i]??"black";e.points.push({x:r.x,y:r.y,color:a,label:`Port: ${i} Start (z${r.z})`}),e.points.push({x:s.x,y:s.y,color:a,label:`Port: ${i} End (z${s.z})`})}const o=(i,r)=>{for(const[s,a]of i.entries()){const A=n[s]??"black";for(let c=0;c<a.length-1;c++){const l=a[c],u=a[c+1];l.x===u.x&&l.y===u.y&&l.z!==u.z?e.circles.push({center:{x:l.x,y:l.y},radius:this.viaDiameter/2,fill:Es(A,.5),label:`${r}: ${s} Via (z${l.z}->z${u.z})`}):e.lines.push({points:[l,u],strokeColor:Es(A,.5),strokeDash:l.z===0?void 0:[.1,.1],strokeWidth:.1,label:`${r}: ${s} (z${l.z})`})}}};if(o(this.placeholderPaths,"Placeholder"),o(this.completedPaths,"Completed"),this.currentPath&&this.currentPath.length>0){const i=n[this.currentConnectionName]??"orange";for(let r=0;r<this.currentPath.length-1;r++){const s=this.currentPath[r],a=this.currentPath[r+1];s.x===a.x&&s.y===a.y&&s.z!==a.z?e.circles.push({center:{x:s.x,y:s.y},radius:this.viaDiameter/2,fill:Es(i,.5),label:`Current: ${this.currentConnectionName} Via (z${s.z}->z${a.z})`}):e.lines.push({points:[s,a],strokeColor:Es(i,.5),strokeWidth:.15,strokeDash:"2,2",label:`Current: ${this.currentConnectionName} (z${s.z})`})}e.points.push({x:this.currentHead.x,y:this.currentHead.y,color:"green",label:`Current Head: ${this.currentConnectionName} (z${this.currentHead.z})`})}return e}},jse=t=>Math.round(1e4*t),sft=t=>{let e=0,n=[];const o=[];for(const r of t.portPoints){if(n.some(a=>a.connectionName===r.connectionName)||o.some(a=>a.connectionName===r.connectionName))continue;const s={connectionName:r.connectionName,z:r.z,points:[{x:jse(r.x),y:jse(r.y),z:r.z}]};for(const a of t.portPoints)r.connectionName===a.connectionName&&(r.x===a.x&&r.y===a.y||s.points.push({x:jse(a.x),y:jse(a.y),z:a.z}));s.points.some(a=>a.z!==s.z)?o.push(s):n.push(s)}n=n.filter(r=>r.points.length>1);for(let r=0;r<n.length;r++)for(let s=r+1;s<n.length;s++){const a=n[r],A=n[s];a.z===A.z&&Uh(a.points[0],a.points[1],A.points[0],A.points[1])&&e++}let i=0;for(let r=0;r<o.length;r++)for(let s=r+1;s<o.length;s++){const a=o[r],A=o[s];Uh(a.points[0],a.points[1],A.points[0],A.points[1])&&i++}return{numSameLayerCrossings:e,numEntryExitLayerChanges:o.length,numTransitionPairCrossings:i}},bXn=t=>{const{start:e,end:n,segmentsPerPolyline:o,viaPositions:i,viaCount:r,availableZ:s}=t,a=(function(h,d){const p=new Array(h).fill(0);if(d===0)return p;if(d===h)return p.fill(1);if(d<=h/2){const m=Math.floor(h/d),_=Math.floor((h-(m*(d-1)+1))/2);for(let f=0;f<d;f++)p[_+f*m]=1}else{const m=h-d,_=Math.floor(h/m),f=Math.floor((h-(_*(m-1)+1))/2);p.fill(1);for(let I=0;I<m;I++)p[f+I*_]=0}return p})(o,r),A=a.map(()=>null);let c=0,l=e.z1;const u=s.indexOf(e.z1);for(let h=0;h<a.length;h++)if(a[h]===1){const d=s[(u+c+1)%s.length];A[h]={...i[c],z1:l,z2:d},l=d,c++}let g=e;for(let h=0;h<A.length;h++){if(A[h]){g=A[h];continue}let d=n,p=A.length;for(let I=h+1;I<A.length;I++)if(A[I]){d=A[I],p=I;break}const m=p-h,_=d.x-g.x,f=d.y-g.y;for(let I=1/(m+1),C=0;h+C!==p;I+=1/(m+1),C++)A[h+C]={x:g.x+_*I,y:g.y+f*I,z1:g.z2,z2:g.z2}}return A},iL=1e-9;function $se(t,e){return Math.abs(t-e)<iL}function k7e(t){return`${Math.round(t.x/iL)}:${Math.round(t.y/iL)}`}function F7e(t,e,n,o){return t*o-e*n}function SXn(t,e,n,o){const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-n.x,y:o.y-n.y},s=F7e(i.x,i.y,r.x,r.y),a={x:n.x-t.x,y:n.y-t.y};if($se(s,0))return null;const A=F7e(a.x,a.y,r.x,r.y)/s,c=F7e(a.x,a.y,i.x,i.y)/s;return A>=-1e-9&&A<=1+iL&&c>=-1e-9&&c<=1+iL?{x:t.x+A*i.x,y:t.y+A*i.y}:null}function aft(t,e,n){return $se(Math.hypot(t.x-e.x,t.y-e.y)+Math.hypot(t.x-n.x,t.y-n.y),Math.hypot(e.x-n.x,e.y-n.y))}function QXn(t,e){const n=[],o=new Map;for(const d of t){const p=[d.start,...d.mPoints,d.end];for(let _=0;_<p.length-1;_++){const f=p[_],I=p[_+1],C=f.z2;if(n.push({start:{x:f.x,y:f.y},end:{x:I.x,y:I.y},connectionName:d.connectionName,layer:C}),f.z1!==f.z2){const y=k7e(f);o.has(y)||o.set(y,{point:f,connectionName:d.connectionName})}}const m=p[p.length-1];if(m.z1!==m.z2){const _=k7e(m);o.has(_)||o.set(_,{point:m,connectionName:d.connectionName})}}const i=[{start:{x:e.minX,y:e.minY},end:{x:e.maxX,y:e.minY},connectionName:null,layer:0},{start:{x:e.maxX,y:e.minY},end:{x:e.maxX,y:e.maxY},connectionName:null,layer:0},{start:{x:e.maxX,y:e.maxY},end:{x:e.minX,y:e.maxY},connectionName:null,layer:0},{start:{x:e.minX,y:e.maxY},end:{x:e.minX,y:e.minY},connectionName:null,layer:0}];n.push(...i);const r=new Map;let s=0;function a(d,p){const m=k7e(d);let _=r.get(m);if(!_){const f=o.has(m);_={id:s++,x:d.x,y:d.y,isVia:f,connectionNames:new Set,outgoingEdges:[]},r.set(m,_),f&&o.get(m)&&_.connectionNames.add(o.get(m).connectionName)}return p&&_.connectionNames.add(p),_}for(const d of n)a(d.start,d.connectionName),a(d.end,d.connectionName);const A=new Map;for(const d of n)A.set(d,[]);for(let d=0;d<n.length;d++)for(let p=d+1;p<n.length;p++){if(n[d].layer!==n[p].layer)continue;const m=SXn(n[d].start,n[d].end,n[p].start,n[p].end);m&&(a(m),aft(m,n[d].start,n[d].end)&&A.get(n[d]).push(m),aft(m,n[p].start,n[p].end)&&A.get(n[p]).push(m))}const c=[];let l=0;for(const d of n){const p=[d.start,...A.get(d),d.end];p.sort((_,f)=>{const I=d.end.x-d.start.x,C=d.end.y-d.start.y;return Math.abs(I)>Math.abs(C)?(_.x-d.start.x)/I-(f.x-d.start.x)/I:Math.abs(C)<iL?0:(_.y-d.start.y)/C-(f.y-d.start.y)/C});const m=[];if(p.length>0){m.push(p[0]);for(let _=1;_<p.length;_++)$se(p[_].x,p[_-1].x)&&$se(p[_].y,p[_-1].y)||m.push(p[_])}for(let _=0;_<m.length-1;_++){const f=m[_],I=m[_+1],C=a(f,d.connectionName),y=a(I,d.connectionName);if(C===y)continue;const x={id:l++,origin:C,twin:null,next:null,face:null,connectionName:d.connectionName,layer:d.layer,visited:!1},E={id:l++,origin:y,twin:x,next:null,face:null,connectionName:d.connectionName,layer:d.layer,visited:!1};x.twin=E,c.push(x,E),C.outgoingEdges.push(x),y.outgoingEdges.push(E)}}for(const d of r.values()){d.outgoingEdges.sort((m,_)=>{const f=m.twin.origin,I=_.twin.origin;return Math.atan2(f.y-d.y,f.x-d.x)-Math.atan2(I.y-d.y,I.x-d.x)});const p=d.outgoingEdges.length;for(let m=0;m<p;m++){const _=d.outgoingEdges[m],f=d.outgoingEdges[(m-1+p)%p];_.twin&&(_.twin.next=f)}}let u=0,g=null,h=-1/0;for(const d of c){if(d.visited)continue;const p={id:u++,outerComponent:d,innerComponents:[],isOuterFace:!1};let m=d;const _=[],f=[],I=new Set;let C=0;do{if(!m||m.visited){console.warn("Face traversal encountered visited edge or null, breaking loop.",p.id),_.length=0;break}m.visited=!0,m.face=p,_.push(m),f.push(m.origin),m.connectionName!==null&&I.add(m.connectionName);const y=m.origin,x=m.twin.origin;C+=y.x*x.y-x.x*y.y,m=m.next}while(m!==d&&m!==null);if(m===d){if(C=.5*Math.abs(C),C>h&&(h=C,g&&(g.isOuterFace=!1),g=p,p.isOuterFace=!0),!p.isOuterFace&&_.length>0&&[...I].filter(y=>y!==null).length>1){let y=!1;for(const x of f)if(x.isVia){y=!0;break}if(!y)return!0}}else console.warn(`Face ${p.id} did not close properly.`),u--}return!1}var Aft=t=>{if(t.length===0)return[[]];const e=[];for(let n=0;n<t.length;n++){const o=t[n],i=[...t.slice(0,n),...t.slice(n+1)],r=Aft(i);for(const s of r)e.push([o,...s])}return e},L7e=1e-9;function qse(t,e,n=1e-9){return Math.abs(t-e)<n}function H7e(t,e,n,o){return t*o-e*n}function vXn(t,e,n,o){const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-n.x,y:o.y-n.y},s=H7e(i.x,i.y,r.x,r.y);if(qse(s,0))return null;const a={x:n.x-t.x,y:n.y-t.y},A=H7e(a.x,a.y,r.x,r.y)/s,c=H7e(a.x,a.y,i.x,i.y)/s;return A<-1e-9||A>1+L7e||c<-1e-9||c>1+L7e?null:{x:t.x+A*i.x,y:t.y+A*i.y}}function wXn(t){let e=0;for(let n=0,o=t.length;n<o;++n){const i=(n+1)%o;e+=t[n].x*t[i].y-t[i].x*t[n].y}return .5*e}function PXn(t){let e=0,n=0,o=0;for(let i=0,r=t.length;i<r;++i){const s=(i+1)%r,a=t[i].x*t[s].y-t[s].x*t[i].y;e+=a,n+=(t[i].x+t[s].x)*a,o+=(t[i].y+t[s].y)*a}return e*=.5,qse(e,0)?null:(n/=6*e,o/=6*e,{x:n,y:o})}var MXn=class{x;y;out;connectionNames;constructor(e,n){this.x=e,this.y=n,this.out=[],this.connectionNames=new Set}},cft=class{orig;dest;twin;next;visited;constructor(e,n){this.orig=e,this.dest=n,this.twin=null,this.next=null,this.visited=!1}};function DXn(t,e){const n=[...e,{start:{x:t.minX,y:t.minY},end:{x:t.maxX,y:t.minY}},{start:{x:t.maxX,y:t.minY},end:{x:t.maxX,y:t.maxY}},{start:{x:t.maxX,y:t.maxY},end:{x:t.minX,y:t.maxY}},{start:{x:t.minX,y:t.maxY},end:{x:t.minX,y:t.minY}}],o=n.map(()=>[]);for(let u=0;u<n.length;++u){const g=n[u];o[u].push(g.start,g.end)}for(let u=0;u<n.length;++u)for(let g=u+1;g<n.length;++g){const h=vXn(n[u].start,n[u].end,n[g].start,n[g].end);h&&(o[u].push(h),o[g].push(h))}const i=new Map,r=[];function s(u){const g=(function(h,d=1e-9){return`${Math.round(h.x/d)}:${Math.round(h.y/d)}`})(u);if(!i.has(g)){const h=r.length;return i.set(g,h),r.push(new MXn(u.x,u.y)),h}return i.get(g)}const a=[];for(let u=0;u<n.length;++u){const g=n[u],h=o[u].slice();h.sort((d,p)=>{const m=g.end.x-g.start.x,_=g.end.y-g.start.y;return(qse(Math.abs(m),0)?(d.y-g.start.y)/_:(d.x-g.start.x)/m)-(qse(Math.abs(m),0)?(p.y-g.start.y)/_:(p.x-g.start.x)/m)});for(let d=0;d<h.length-1;++d){const p=h[d],m=h[d+1],_=s(p),f=s(m);_!==f&&(a.push([_,f]),g.connectionName&&(r[_].connectionNames.add(g.connectionName),r[f].connectionNames.add(g.connectionName)))}}const A=[];for(const[u,g]of a){const h=new cft(u,g),d=new cft(g,u);h.twin=A.length+1,d.twin=A.length;const p=A.length;A.push(h,d),r[u].out.push(p),r[g].out.push(p+1)}for(let u=0;u<r.length;++u){const g=r[u];g.out.sort((d,p)=>{const m=A[d],_=A[p],f=r[m.dest],I=r[_.dest];return Math.atan2(f.y-g.y,f.x-g.x)-Math.atan2(I.y-g.y,I.x-g.x)});const h=g.out.length;for(let d=0;d<h;++d){const p=g.out[d],m=g.out[(d-1+h)%h],_=A[p];_.twin!==null&&(A[_.twin].next=m)}}const c=[],l=[];for(let u=0;u<A.length;++u){if(A[u].visited)continue;let g=u;const h=[];do{if(g===null)break;const d=A[g];d.visited=!0,h.push(r[d.orig]),g=d.next}while(g!==null&&g!==u&&!A[g].visited);if(!(h.length<3)&&wXn(h)>L7e){const d=PXn(h);d&&(c.push(d),l.push({vertices:h.map(p=>({x:p.x,y:p.y,connectionNames:p.connectionNames.size>0?p.connectionNames:void 0})),centroid:d}))}}return{centroids:c,faces:l,allVertices:r}}function NXn(t,e){if(t>e)throw new Error("oneCount cannot be greater than length");if(t<0||e<0)throw new Error("oneCount and length must be non-negative");const n=[];return(function o(i,r,s){s!==e?(i[s]=0,o(i,r,s+1),r>0&&(i[s]=1,o(i,r-1,s+1))):r===0&&n.push([...i])})(Array(e).fill(0),t,0),n}var RXn=class extends yr{getSolverName(){return"MultiHeadPolyLineIntraNodeSolver"}nodeWithPortPoints;colorMap;hyperParameters;connMap;candidates;bounds;solvedRoutes=[];unsolvedConnections=[];SEGMENTS_PER_POLYLINE;cellSize;MAX_CANDIDATES=5e4;viaDiameter=.3;obstacleMargin=.1;traceWidth=.15;availableZ=[];uniqueConnections=0;BOUNDARY_PADDING;lastCandidate=null;maxViaCount;minViaCount;phase="setup";progress=0;constructor(e){super(),this.MAX_ITERATIONS=1e4,this.nodeWithPortPoints=e.nodeWithPortPoints,this.colorMap=e.colorMap??rft(e.nodeWithPortPoints),this.hyperParameters=e.hyperParameters??{},this.SEGMENTS_PER_POLYLINE=e.hyperParameters?.SEGMENTS_PER_POLYLINE??3,this.BOUNDARY_PADDING=e.hyperParameters?.BOUNDARY_PADDING??.05,this.connMap=e.connMap,this.viaDiameter=e.viaDiameter??this.viaDiameter,this.cellSize=this.nodeWithPortPoints.width/1024,this.candidates=[],this.availableZ=this.nodeWithPortPoints.availableZ??[0,1],this.bounds={minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2};const n=this.nodeWithPortPoints.width*this.nodeWithPortPoints.height,o=(this.viaDiameter+2*this.obstacleMargin+this.traceWidth/2)**2,i=new Set(this.nodeWithPortPoints.portPoints.map(a=>a.connectionName)).size;this.uniqueConnections=i;const{numSameLayerCrossings:r,numEntryExitLayerChanges:s}=sft(this.nodeWithPortPoints);if(this.minViaCount=2*r+s,this.maxViaCount=Math.min(Math.floor(n/o),Math.ceil(1.5*i)),this.minViaCount>this.SEGMENTS_PER_POLYLINE*(i/2))return this.failed=!0,void(this.error=`Not possible to solve problem with given SEGMENTS_PER_POLYLINE (${this.SEGMENTS_PER_POLYLINE}), atleast ${this.minViaCount} vias are required`);this.maxViaCount>this.SEGMENTS_PER_POLYLINE&&(this.maxViaCount=this.SEGMENTS_PER_POLYLINE),this.maxViaCount<this.minViaCount&&(this.maxViaCount=this.minViaCount)}computeMinGapBtwPolyLines(e){const n=[],o=[],i=[];for(let r=0;r<e.length;r++){const s=e[r],a=[s.start,...s.mPoints,s.end],A=new Map(this.availableZ.map(c=>[c,[]]));for(let c=0;c<a.length-1;c++){const l=[a[c],a[c+1]],u=l[0].z2;A.has(u)||A.set(u,[]),A.get(u).push(l)}o.push(A),i.push(a.filter(c=>c.z1!==c.z2))}for(let r=0;r<e.length;r++){const s=o[r],a=i[r];for(let A=r+1;A<e.length;A++){if(this.connMap?.areIdsConnected(e[r].connectionName,e[A].connectionName))continue;const c=o[A],l=i[A];let u=1;for(const g of this.availableZ){const h=s.get(g)??[],d=c.get(g)??[];for(const p of h)for(const m of d)u=Math.min(u,M5(p[0],p[1],m[0],m[1])-this.traceWidth);for(const p of a)for(const m of d)u=Math.min(u,wc(p,m[0],m[1])-this.traceWidth/2-this.viaDiameter/2);for(const p of l)for(const m of h)u=Math.min(u,wc(p,m[0],m[1])-this.traceWidth/2-this.viaDiameter/2);for(const p of a)for(const m of l)u=Math.min(u,no(p,m)-this.viaDiameter)}n.push(u)}}return n}insertCandidate(e){let n=0,o=this.candidates.length-1;for(;n<=o;){const i=Math.floor((n+o)/2);this.candidates[i].f<e.f?n=i+1:o=i-1}this.candidates.splice(n,0,e)}setupInitialPolyLines(){const e=new Map;this.nodeWithPortPoints.portPoints.forEach(s=>{e.has(s.connectionName)?e.get(s.connectionName).end={...s,z1:s.z??0,z2:s.z??0}:e.set(s.connectionName,{start:{...s,z1:s.z??0,z2:s.z??0},end:null})});for(const[s,a]of e.entries())a.end===null&&e.delete(s);if(e.size===0)return this.failed=!0,void(this.error="No port pairs found, can't solve");const n=Array.from(e.entries()),o=((s,a,A,c)=>{const l=[];for(const[,g]of s){const h=g.start.z1!==g.end.z1,d=[];for(let p=0;p<=a;p++){const m=p%2!=0;h&&m?d.push(p):h||m||d.push(p)}l.push(d)}if(l.length===0)return[[]];let u=(g=>{if(!g||g.length===0)return[[]];let h=[[]];for(const d of g){const p=[];for(const m of h)for(const _ of d)p.push([...m,_]);h=p}return h})(l).filter(g=>{for(let h=0;h<g.length;h++)if(g.reduce((d,p)=>d+p,0)<c)return!1;return!0});return u=u.filter(g=>{for(let h=0;h<s.length;h++){const[,d]=s[h];if(d.start.z1!==d.start.z2&&g[h]===0)return!1}return!0}),u=u.filter(g=>{for(let h=0;h<s.length;h++){const[,d]=s[h];if(s[h][1].start.z1===s[h][1].start.z2)for(let p=h+1;p<s.length;p++){if(s[p][1].start.z1!==s[p][1].start.z2)continue;const[,m]=s[p];if(d.start.z1===d.end.z1&&m.start.z1===m.end.z1&&d.start.z1===m.start.z1&&Uh(d.start,d.end,m.start,m.end)&&g[h]+g[p]<2)return!1}}return!0}),u=u.filter(g=>!(g.reduce((h,d)=>h+d,0)>A)),u})(n,this.SEGMENTS_PER_POLYLINE,this.maxViaCount,this.minViaCount),i=(s=>{const{bounds:a,portPairsEntries:A,viaCountVariants:c}=s,{centroids:l}=DXn(a,A.map(([g,h])=>h)),u=[];for(const g of c){const h=g.reduce((m,_)=>m+_,0);let d=l;if(l.length<h){d=[];const m=Math.ceil(Math.sqrt(h)),_=m;for(let f=0;f<m;f++)for(let I=0;I<_;I++)d.push({x:a.minX+(I+1)/(_+1)*(a.maxX-a.minX),y:a.minY+(f+1)/(m+1)*(a.maxY-a.minY)})}const p=NXn(h,d.length);for(const m of p){const _=[];for(let f=0;f<m.length;f++)m[f]===1&&_.push(d[f]);u.push({viaPositions:_,viaCountVariant:g})}}return u})({portPairsEntries:n,viaCountVariants:o,bounds:this.bounds}),r=[];for(const{viaCountVariant:s,viaPositions:a}of i){const A=Aft(a);for(const c of A)r.push({viaCountVariant:s,viaPositions:c})}for(const{viaPositions:s,viaCountVariant:a}of r){const A=[];let c=0;for(let h=0;h<n.length;h++){const[d,p]=n[h],m=a[h],_=s.slice(c,c+m),f=bXn({start:p.start,end:p.end,segmentsPerPolyline:this.SEGMENTS_PER_POLYLINE,viaPositions:_,viaCount:m,availableZ:this.availableZ});c+=m,A.push({connectionName:d,start:p.start,end:p.end,mPoints:f})}if(QXn(A,this.bounds))continue;const l=this.computeMinGapBtwPolyLines(A),u=this.computeH({minGaps:l,forces:[]}),g={polyLines:A,g:0,h:u,f:u,viaCount:a.reduce((h,d)=>h+d,0),minGaps:l};if(this.checkIfSolved(g))return void(this.candidates=[g]);if(this.candidates.push(g),this.candidates.length>this.MAX_CANDIDATES)return}this.candidates.sort((s,a)=>s.f-a.f)}computeG(e,n){return n.g+5e-6+5e-6*n.viaCount*100}computeH(e){let n=0;for(const o of e.forces??[])for(const i of o)for(const r of i.values())n+=r.fx*r.fx+r.fy*r.fy;return n}getNeighbors(e){const{polyLines:n}=e,o=n.length,i=.02,r=.008,s=1e-6,a=Array.from({length:o},(d,p)=>Array.from({length:n[p].mPoints.length},()=>new Map)),A=(d,p,m,_,f)=>{if(p>0&&p<n[d].mPoints.length+1){const I=p-1,C=a[d][I],y=C.get(m)||{fx:0,fy:0};C.set(m,{fx:y.fx+_,fy:y.fy+f})}};for(let d=0;d<o;d++)for(let p=d+1;p<o;p++){const m=n[d],_=n[p],f=[m.start,...m.mPoints,m.end],I=[_.start,..._.mPoints,_.end],C=[],y=[];for(let B=0;B<f.length-1;B++)C.push({p1:f[B],p2:f[B+1],layer:f[B].z2,p1Idx:B,p2Idx:B+1});f.forEach((B,S)=>{B.z1!==B.z2&&y.push({point:B,layers:[B.z1,B.z2],index:S})});const x=[],E=[];for(let B=0;B<I.length-1;B++)x.push({p1:I[B],p2:I[B+1],layer:I[B].z2,p1Idx:B,p2Idx:B+1});I.forEach((B,S)=>{B.z1!==B.z2&&E.push({point:B,layers:[B.z1,B.z2],index:S})});for(const B of C)for(const S of x)if(B.layer===S.layer){if(M5(B.p1,B.p2,S.p1,S.p2)<s)continue;const Q={x:(B.p1.x+B.p2.x)/2,y:(B.p1.y+B.p2.y)/2},w={x:(S.p1.x+S.p2.x)/2,y:(S.p1.y+S.p2.y)/2},M=Q.x-w.x,k=Q.y-w.y;if(M*M+k*k>s){const F=`seg:${p}:${S.p1Idx}:${S.p2Idx}`,O=`seg:${d}:${B.p1Idx}:${B.p2Idx}`,U=(Y,W,te,j,J,oe,ie)=>{const ne=z_(Y,te.p1,te.p2),le=Y.x-ne.x,ge=Y.y-ne.y,_e=le*le+ge*ge;if(_e<=s)return;const ue=Math.sqrt(_e),fe=.02*Math.exp(-6*ue),pe=le/ue*fe,ye=ge/ue*fe;A(j,W,oe,pe,ye),A(J,te.p1Idx,ie,-pe/2,-ye/2),A(J,te.p2Idx,ie,-pe/2,-ye/2)};U(B.p1,B.p1Idx,S,d,p,F,O),U(B.p2,B.p2Idx,S,d,p,F,O),U(S.p1,S.p1Idx,B,p,d,O,F),U(S.p2,S.p2Idx,B,p,d,O,F)}}for(const B of y)for(const S of x)if(B.layers.includes(S.layer)){const Q=z_(B.point,S.p1,S.p2),w=B.point.x-Q.x,M=B.point.y-Q.y,k=w*w+M*M;if(k>s){const R=Math.sqrt(k);let F=2,O=R;R<this.viaDiameter/2?(F*=4,O=Math.max(s,R)):O=Math.max(s,R-this.viaDiameter/2);const U=F*i*Math.exp(-6*O),Y=w/R*U,W=M/R*U,te=`seg:${p}:${S.p1Idx}:${S.p2Idx}`;A(d,B.index,te,Y,W);const j=`via:${d}:${B.index}`;A(p,S.p1Idx,j,-Y/2,-W/2),A(p,S.p2Idx,j,-Y/2,-W/2)}}for(const B of E)for(const S of C)if(B.layers.includes(S.layer)){const Q=z_(B.point,S.p1,S.p2),w=B.point.x-Q.x,M=B.point.y-Q.y,k=w*w+M*M;if(k>s){const R=Math.sqrt(k);let F=2,O=R;R<this.viaDiameter/2?(F*=4,O=Math.max(s,R)):O=Math.max(s,R-this.viaDiameter/2);const U=F*i*Math.exp(-6*O),Y=w/R*U,W=M/R*U,te=`seg:${d}:${S.p1Idx}:${S.p2Idx}`;A(p,B.index,te,Y,W);const j=`via:${p}:${B.index}`;A(d,S.p1Idx,j,-Y/2,-W/2),A(d,S.p2Idx,j,-Y/2,-W/2)}}for(const B of y)for(const S of E)if(B.layers.filter(Q=>S.layers.includes(Q)).length>0){const Q=B.point.x-S.point.x,w=B.point.y-S.point.y,M=Q*Q+w*w;if(M>s){const k=Math.sqrt(M);let R=2,F=k;k<this.viaDiameter?(R*=4,F=Math.max(s,k)):F=Math.max(s,k-this.viaDiameter);const O=R*i*Math.exp(-6*F),U=Q/k*O,Y=w/k*O,W=`via:${p}:${S.index}`,te=`via:${d}:${B.index}`;A(d,B.index,W,U,Y),A(p,S.index,te,-U,-Y)}}}for(let d=0;d<o;d++){const p=n[d],m=[p.start,...p.mPoints,p.end],_=[];if(m.forEach((f,I)=>{f.z1!==f.z2&&_.push({point:f,layers:[f.z1,f.z2],index:I})}),!(_.length<2))for(let f=0;f<_.length;f++)for(let I=f+1;I<_.length;I++){const C=_[f],y=_[I],x=C.point.x-y.point.x,E=C.point.y-y.point.y,B=x*x+E*E;if(B>s){const S=Math.sqrt(B);let Q=2,w=S;S<this.viaDiameter?(Q*=4,w=Math.max(s,S)):w=Math.max(s,S-this.viaDiameter);const M=Q*i*Math.exp(-6*w),k=x/S*M,R=E/S*M,F=`via:${d}:${y.index}`,O=`via:${d}:${C.index}`;A(d,C.index,F,k,R),A(d,y.index,O,-k,-R)}}}const c=n.map(d=>({...d,mPoints:d.mPoints.map(p=>({...p}))}));let l=!1;for(let d=0;d<o;d++)for(let p=0;p<c[d].mPoints.length;p++){const m=c[d].mPoints[p],_=a[d][p],f={fx:0,fy:0};for(const x of _.values())f.fx+=x.fx,f.fy+=x.fy;const I=m.z1!==m.z2;let C=m.x+f.fx,y=m.y+f.fy;if(I){const x=this.viaDiameter/2;let E=0,B=0;const S=this.viaDiameter/2+this.BOUNDARY_PADDING,Q=this.bounds.minX+S,w=this.bounds.maxX-S,M=this.bounds.minY+S,k=this.bounds.maxY-S,R=Q+x-m.x,F=m.x-(w-x),O=M+x-m.y,U=m.y-(k-x);R>0?E=r*(Math.exp(R/(2*this.obstacleMargin))-1):F>0&&(E=-.008*(Math.exp(F/(2*this.obstacleMargin))-1)),O>0?B=r*(Math.exp(O/(2*this.obstacleMargin))-1):U>0&&(B=-.008*(Math.exp(U/(2*this.obstacleMargin))-1)),f.fx+=E,f.fy+=B,C=m.x+f.fx,y=m.y+f.fy}else{const x=this.traceWidth/2+this.BOUNDARY_PADDING;C=Math.max(this.bounds.minX+x,Math.min(this.bounds.maxX-x,C)),y=Math.max(this.bounds.minY+x,Math.min(this.bounds.maxY-x,y))}Math.abs(f.fx)<s&&Math.abs(f.fy)<s||(Math.abs(m.x-C)>s||Math.abs(m.y-y)>s)&&(m.x=C,m.y=y,l=!0)}if(!l)return[];const u=this.computeMinGapBtwPolyLines(c),g=this.computeG(c,e),h=this.computeH({minGaps:u,forces:a});return[{polyLines:c,g,h,f:Math.round(5*g)/5+h,minGaps:u,forces:a,viaCount:e.viaCount}]}checkIfSolved(e){const n=e.minGaps.every(i=>i>=this.obstacleMargin),o=e.polyLines.every(i=>i.mPoints.every(r=>{const s=(r.z1!==r.z2?this.viaDiameter/2:this.traceWidth/2)+this.BOUNDARY_PADDING;return((a,A,c=0)=>a.x>=A.minX+c&&a.x<=A.maxX-c&&a.y>=A.minY+c&&a.y<=A.maxY-c)(r,this.bounds,s)}));return n&&o}tryFinalAcceptance(){const e=this.hyperParameters?.MINIMUM_FINAL_ACCEPTANCE_GAP??void 0;if(!(e===void 0||this.lastCandidate===null||this.lastCandidate.minGaps.length===0))return Math.min(...this.lastCandidate.minGaps)>=e?(this.solved=!0,void this._setSolvedRoutes()):void 0}_step(){if(this.phase==="setup")return this.setupInitialPolyLines(),void(this.phase="solving");const e=this.candidates.shift();if(!e)return this.tryFinalAcceptance(),this.solved?void 0:(this.failed=!0,void(this.error="No candidates left"));if(this.lastCandidate=e,this.checkIfSolved(e))return this.solved=!0,void this._setSolvedRoutes();if(!e)return void(this.failed=!0);const n=this.getNeighbors(e);for(const o of n)this.insertCandidate(o)}visualize(){const e={points:[],lines:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"MultiHeadPolyLineIntraNodeSolver Visualization"};e.lines.push({points:[{x:this.bounds.minX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.minY},{x:this.bounds.maxX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.maxY},{x:this.bounds.minX,y:this.bounds.minY}],strokeColor:"gray"});const n=this.lastCandidate??this.candidates[0];if(n?.hasClosedSameLayerFace){const o=.1*(this.bounds.maxX-this.bounds.minX),i=.1*(this.bounds.maxY-this.bounds.minY);e.rects.push({center:{x:this.bounds.maxX+.6*o,y:this.bounds.maxY+.6*i},width:o,height:i,fill:"red",label:"HAS CLOSED FACE"})}for(const o of this.nodeWithPortPoints.portPoints)e.points.push({x:o.x,y:o.y,label:`${o.connectionName} (Port z=${o.z??0})`,color:this.colorMap[o.connectionName]??"blue"});return n&&n.polyLines.forEach((o,i)=>{const r=this.colorMap[o.connectionName]??"purple",s=[o.start,...o.mPoints,o.end];for(let a=0;a<s.length-1;a++){const A=s[a],c=s[a+1],l=A.z2,u=l===0,g=u?r:Es(r,.5);e.lines.push({points:[A,c],strokeColor:g,strokeWidth:this.traceWidth,strokeDash:u?void 0:[.15,.15],label:`${o.connectionName} segment (z=${l})`})}s.forEach((a,A)=>{const c=a.z1!==a.z2,l=a.z1,u=A>0&&A<s.length-1;let g="",h="";if(u){const d=A-1,p=n.forces?.[i]?.[d];if(p&&p.size>0){const m={fx:0,fy:0};p.forEach((_,f)=>{if(m.fx+=_.fx,m.fy+=_.fy,Math.abs(_.fx)>1e-6||Math.abs(_.fy)>1e-6){const I=f.split(":"),C=I[0],y=parseInt(I[1],10),x=n.polyLines[y],E=this.colorMap[x.connectionName]??"gray",B=20,S={x:a.x+_.fx*B,y:a.y+_.fy*B};let Q=x.connectionName;C==="via"?Q+=` Via ${parseInt(I[2],10)}`:C==="seg"&&(Q+=` Seg ${parseInt(I[2],10)}-${parseInt(I[3],10)}`),e.lines.push({points:[a,S],strokeColor:E,strokeWidth:.02,strokeDash:"2,2",label:`Force by ${Q} on ${o.connectionName} mPoint ${d}`})}}),(Math.abs(m.fx)>1e-6||Math.abs(m.fy)>1e-6)&&(h=`
Net Force: (${m.fx.toFixed(3)}, ${m.fy.toFixed(3)})`)}}if(c)g=`Via (${o.connectionName} z=${a.z1} -> z=${a.z2})${h}`,e.circles.push({center:a,radius:this.viaDiameter/2,fill:Es(r,.5),label:g});else if(u){const d=l===0?r:Es(r,.5);g=`mPoint (${o.connectionName} z=${l})${h}`,e.circles.push({center:a,radius:this.cellSize/8,fill:d,label:g})}})}),e}_setSolvedRoutes(){if(!this.solved||!this.lastCandidate)return[];const e=[];for(const n of this.lastCandidate.polyLines){const o=[],i=[],r=[n.start,...n.mPoints,n.end];for(let s=0;s<r.length;s++){const a=r[s];o.push({x:a.x,y:a.y,z:a.z1}),a.z1!==a.z2&&(i.push({x:a.x,y:a.y}),o.push({x:a.x,y:a.y,z:a.z2}))}e.push({connectionName:n.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:o,vias:i})}this.solvedRoutes=e}},TXn=class extends RXn{getSolverName(){return"MultiHeadPolyLineIntraNodeSolver2"}computeG(e,n){return n.g+5e-6+5e-6*n.viaCount*100}computeH(e){const{minGaps:n}=e;let o=0;for(const i of n)i<0&&(o+=this.obstacleMargin),i<this.obstacleMargin&&(o+=this.obstacleMargin-i);return .011*o}_step(){if(this.phase==="setup")return this.setupInitialPolyLines(),void(this.phase="solving");const e=this.candidates.shift();if(!e)return this.tryFinalAcceptance(),this.solved?void 0:void(this.failed=!0);if(this.lastCandidate=e,this.checkIfSolved(e))return this.solved=!0,void this._setSolvedRoutes();let n=!1,o=0;const i=e.magForceApplied===void 0?1:10;for(let r=0;r<i;r++){const s=this.applyForcesToPolyLines(e.polyLines);if(o+=s.magForceApplied,n=s.lastStepMoved,!s.lastStepMoved)break}if(e.magForceApplied=o,e.minGaps=this.computeMinGapBtwPolyLines(e.polyLines),this.checkIfSolved(e))return this.solved=!0,void this._setSolvedRoutes();e.g=this.computeG(e.polyLines,e),e.h=this.computeH(e),e.f=e.g+e.h,n&&this.insertCandidate(e)}applyForcesToPolyLines(e){let n=0;const o=e.length,i=.02,r=.008,s=1e-6,a=Array.from({length:o},(u,g)=>Array.from({length:e[g].mPoints.length},()=>({fx:0,fy:0}))),A=(u,g,h,d)=>{if(g>0&&g<e[u].mPoints.length+1){const p=g-1;a[u][p].fx+=h,a[u][p].fy+=d}},c=(u,g,h,d,p)=>{const m=z_(u,h.p1,h.p2),_=u.x-m.x,f=u.y-m.y,I=_*_+f*f;if(I<=s)return;const C=Math.sqrt(I),y=.02*Math.exp(-6*C),x=_/C*y,E=f/C*y;A(d,g,x,E),A(p,h.p1Idx,-x/2,-E/2),A(p,h.p2Idx,-x/2,-E/2)};for(let u=0;u<o;u++)for(let g=u+1;g<o;g++){const h=e[u],d=e[g],p=[h.start,...h.mPoints,h.end],m=[d.start,...d.mPoints,d.end],_=[],f=[];for(let y=0;y<p.length-1;y++)_.push({p1:p[y],p2:p[y+1],layer:p[y].z2,p1Idx:y,p2Idx:y+1});p.forEach((y,x)=>{y.z1!==y.z2&&f.push({point:y,layers:[y.z1,y.z2],index:x})});const I=[],C=[];for(let y=0;y<m.length-1;y++)I.push({p1:m[y],p2:m[y+1],layer:m[y].z2,p1Idx:y,p2Idx:y+1});m.forEach((y,x)=>{y.z1!==y.z2&&C.push({point:y,layers:[y.z1,y.z2],index:x})});for(const y of _)for(const x of I)y.layer===x.layer&&(M5(y.p1,y.p2,x.p1,x.p2),c(y.p1,y.p1Idx,x,u,g),c(y.p2,y.p2Idx,x,u,g),c(x.p1,x.p1Idx,y,g,u),c(x.p2,x.p2Idx,y,g,u));for(const y of f)for(const x of I)if(y.layers.includes(x.layer)){const E=z_(y.point,x.p1,x.p2),B=y.point.x-E.x,S=y.point.y-E.y,Q=B*B+S*S;if(Q>s){const w=Math.sqrt(Q);let M=2,k=w;w<this.viaDiameter/2?(M*=4,k=Math.max(s,w)):k=Math.max(s,w-this.viaDiameter/2);const R=M*i*Math.exp(-6*k),F=B/w*R,O=S/w*R;A(u,y.index,F,O),A(g,x.p1Idx,-F/2,-O/2),A(g,x.p2Idx,-F/2,-O/2)}}for(const y of C)for(const x of _)if(y.layers.includes(x.layer)){const E=z_(y.point,x.p1,x.p2),B=y.point.x-E.x,S=y.point.y-E.y,Q=B*B+S*S;if(Q>s){const w=Math.sqrt(Q);let M=2,k=w;w<this.viaDiameter/2?(M*=4,k=Math.max(s,w)):k=Math.max(s,w-this.viaDiameter/2);const R=M*i*Math.exp(-6*k),F=B/w*R,O=S/w*R;A(g,y.index,F,O),A(u,x.p1Idx,-F/2,-O/2),A(u,x.p2Idx,-F/2,-O/2)}}for(const y of f)for(const x of C)if(y.layers.filter(E=>x.layers.includes(E)).length>0){const E=y.point.x-x.point.x,B=y.point.y-x.point.y,S=E*E+B*B;if(S>s){const Q=Math.sqrt(S);let w=2,M=Q;Q<this.viaDiameter?(w*=4,M=Math.max(s,Q)):M=Math.max(s,Q-this.viaDiameter);const k=w*i*Math.exp(-6*M),R=E/Q*k,F=B/Q*k;A(u,y.index,R,F),A(g,x.index,-R,-F)}}}for(let u=0;u<o;u++){const g=e[u],h=[g.start,...g.mPoints,g.end],d=[];if(h.forEach((p,m)=>{p.z1!==p.z2&&d.push({point:p,layers:[p.z1,p.z2],index:m})}),!(d.length<2))for(let p=0;p<d.length;p++)for(let m=p+1;m<d.length;m++){const _=d[p],f=d[m],I=_.point.x-f.point.x,C=_.point.y-f.point.y,y=I*I+C*C;if(y>s){const x=Math.sqrt(y);let E=2,B=x;x<this.viaDiameter?(E*=4,B=Math.max(s,x)):B=Math.max(s,x-this.viaDiameter);const S=E*i*Math.exp(-6*B),Q=I/x*S,w=C/x*S;A(u,_.index,Q,w),A(u,f.index,-Q,-w)}}}let l=!1;for(let u=0;u<o;u++)for(let g=0;g<e[u].mPoints.length;g++){const h=e[u].mPoints[g],d=a[u][g],p=h.z1!==h.z2;let m=d.fx,_=d.fy,f=h.x+m,I=h.y+_;if(p){const C=this.viaDiameter/2;let y=0,x=0;const E=this.viaDiameter/2+this.BOUNDARY_PADDING,B=this.bounds.minX+E,S=this.bounds.maxX-E,Q=this.bounds.minY+E,w=this.bounds.maxY-E,M=B+C-h.x,k=h.x-(S-C),R=Q+C-h.y,F=h.y-(w-C);M>0?y=r*(Math.exp(M/(2*this.obstacleMargin))-1):k>0&&(y=-.008*(Math.exp(k/(2*this.obstacleMargin))-1)),R>0?x=r*(Math.exp(R/(2*this.obstacleMargin))-1):F>0&&(x=-.008*(Math.exp(F/(2*this.obstacleMargin))-1)),m+=y,_+=x,f=h.x+m,I=h.y+_}else{const C=this.traceWidth/2+this.BOUNDARY_PADDING;f=Math.max(this.bounds.minX+C,Math.min(this.bounds.maxX-C,f)),I=Math.max(this.bounds.minY+C,Math.min(this.bounds.maxY-C,I))}Math.abs(m)<s&&Math.abs(_)<s||(n+=Math.sqrt(m*m+_*_),(Math.abs(h.x-f)>s||Math.abs(h.y-I)>s)&&(h.x=f,h.y=I,l=!0))}return{lastStepMoved:l,magForceApplied:n}}},kXn=t=>t.flatMap(e=>`${e.connectionName}-${e.mPoints.map(n=>`${n.x.toFixed(2)},${n.y.toFixed(2)},${n.z1},${n.z2}`)}`).sort().join("|"),FXn=class extends TXn{getSolverName(){return"MultiHeadPolyLineIntraNodeSolver3"}constructor(e){super(e),this.MAX_ITERATIONS=1e3}createInitialCandidateFromSeed(e){const n=new BXn({nodeWithPortPoints:this.nodeWithPortPoints,colorMap:this.colorMap,hyperParameters:{SHUFFLE_SEED:e},viaDiameter:this.viaDiameter});if(n.solve(),n.failed||!n.solved)return this.failed=!0,this.error=`ViaPossibilitiesSolver2 failed with: ${n.error}`,null;const o=[];let i=0;for(const[A,c]of n.completedPaths.entries()){if(c.length<2){console.warn(`Skipping connection "${A}" due to insufficient points (${c.length}) in ViaPossibilitiesSolver2 path.`);continue}const l=c[0],u=c[c.length-1],g=c.slice(1,-1),h=[];let d=0,p=l.z;for(let f=0;f<g.length;f++){const I=g[f],C=f+1<g.length?g[f+1]:u,y=p,x=f+1<g.length&&I.x===C.x&&I.y===C.y&&I.z!==C.z?C.z:I.z;h.push({x:I.x,y:I.y,z1:y,z2:x}),y!==x?(d++,f++,p=x):p=I.z}i+=d;const m=this.SEGMENTS_PER_POLYLINE;let _=h.length+1;for(;_<m;){let f=-1,I=-1,C=null,y=null;const x=[{...l,z1:l.z,z2:l.z,connectionName:A},...h,{...u,z1:u.z,z2:u.z,connectionName:A}];for(let w=0;w<x.length-1;w++){const M=x[w],k=x[w+1];if(M.x===k.x&&M.y===k.y)continue;const R=no(M,k);R>f&&(f=R,I=w,C=M,y=k)}if(I===-1||!C||!y){console.warn(`Could not find longest segment for ${A} while trying to reach ${m} segments.`);break}const E=(C.x+y.x)/2,B=(C.y+y.y)/2,S=C.z2,Q={x:E,y:B,z1:S,z2:S};h.splice(I,0,Q),_++}o.push({connectionName:A,start:{...l,z1:l.z,z2:l.z},end:{...u,z1:u.z,z2:u.z},mPoints:h})}if(o.length===0)return this.failed=!0,this.error="No valid polylines generated from ViaPossibilitiesSolver2.",console.error(this.error),null;const r=this.computeMinGapBtwPolyLines(o),s=this.computeH({minGaps:r,forces:[]}),a={polyLines:o,g:0,h:s,f:0+s,viaCount:i,minGaps:r};return a.g=this.computeG(o,a),a.f=a.g+a.h,a}setupInitialPolyLines(){this.candidates=[];const e=Math.min(2e3,(function(o){if(!Number.isInteger(o)||o<0)throw new RangeError("n must be a non-negative integer");let i=1;for(let r=2;r<=o;r++)i*=r;return i})(this.uniqueConnections)),n=new Set;for(let o=0;o<e;o++){const i=this.createInitialCandidateFromSeed(o);if(!i)continue;const r=kXn(i.polyLines);n.has(r)||(n.add(r),this.candidates.push(i))}this.candidates.sort((o,i)=>o.f-i.f)}},lft=t=>t.portPointId??`${t.connectionName}:${t.x}:${t.y}:${t.z}`,O7e=(t,e)=>{const[n,o]=t;if(n===o)return!1;const i=(r=>{const[s,a]=r,A=lft(s),c=lft(a);return A<c?`${A}|${c}`:`${c}|${A}`})(t);return!e.seenPairKeys.has(i)&&(e.seenPairKeys.add(i),e.pairs.push(t),!0)},uft=(t,e)=>{for(let n=0;n<t.length-1;n++)O7e([t[n],t[n+1]],e)},Yz=t=>{const e=[],n=new Set,o=new Map(t.filter(a=>typeof a.portPointId=="string").map(a=>[a.portPointId,a])),i={pairs:e,seenPairKeys:n};for(const a of t){if(a.prevPortPointId){const A=o.get(a.prevPortPointId);A&&A.connectionName===a.connectionName&&O7e([A,a],i)}if(a.nextPortPointId){const A=o.get(a.nextPortPointId);A&&A.connectionName===a.connectionName&&O7e([a,A],i)}}if(e.length===0)return uft(t,i),e;const r=new Set(e.flatMap(([a,A])=>[a.portPointId,A.portPointId]).filter(Boolean)),s=t.filter(a=>!a.portPointId||!r.has(a.portPointId));return uft(s,i),e},A7=1e-6,gft=.02,Uz=t=>`${t.x.toFixed(6)},${t.y.toFixed(6)}`,FD=(t,e)=>Math.abs(t.x-e.x)<A7&&Math.abs(t.y-e.y)<A7,dft=t=>({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2}),LXn=(t,e)=>t.x>=e.minX-A7&&t.x<=e.maxX+A7&&t.y>=e.minY-A7&&t.y<=e.maxY+A7,HXn=(t,e,n)=>{for(const o of n)if(!FD(o,t)&&!FD(o,e)&&wc(o,t,e)<1e-4)return!0;return!1},OXn=(t,e,n)=>{for(const o of n)if(!(FD(t,o.A)||FD(t,o.B)||FD(e,o.A)||FD(e,o.B))&&Uh(t,e,o.A,o.B))return!0;return!1},GXn=(t,e)=>{const n=[];for(const o of t){const i=o.rootConnectionName??o.connectionName;if(i!==e)for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];s.z===a.z&&n.push({A:{x:s.x,y:s.y},B:{x:a.x,y:a.y},rootConnectionName:i})}}return n},YXn=(t,e)=>t.portPoints.filter(n=>(n.rootConnectionName??n.connectionName)!==e).map(n=>({x:n.x,y:n.y}));function*hft(t,e=t.length){if(e<=1)yield t.slice();else for(let n=0;n<e;n++)[t[n],t[e-1]]=[t[e-1],t[n]],yield*hft(t,e-1),[t[n],t[e-1]]=[t[e-1],t[n]]}var UXn=({A:t,B:e,bounds:n,obstacleSegments:o,foreignPorts:i})=>{const r=[{x:t.x,y:t.y},{x:e.x,y:e.y},{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},{x:n.minX,y:n.minY},{x:n.maxX,y:n.minY},{x:n.maxX,y:n.maxY},{x:n.minX,y:n.maxY}],s=[...o.flatMap(m=>[m.A,m.B]),...i,{x:t.x,y:t.y},{x:e.x,y:e.y}];for(const m of s)for(const _ of[-.02,0,gft])for(const f of[-.02,0,gft]){const I={x:m.x+_,y:m.y+f};LXn(I,n)&&r.push(I)}const a=(m=>{const _=new Set,f=[];for(const I of m){const C=Uz(I);_.has(C)||(_.add(C),f.push(I))}return f})(r),A=Uz(t),c=Uz(e),l=new Map(a.map(m=>[Uz(m),m])),u=new Map,g=new Map,h=new Set;for(const m of a){const _=Uz(m);u.set(_,_===A?0:1/0),g.set(_,null),h.add(_)}for(;h.size>0;){let m=null,_=1/0;for(const I of h){const C=u.get(I)??1/0;(C<_-A7||Math.abs(C-_)<=A7&&(m===null||I<m))&&(_=C,m=I)}if(!m||_===1/0||(h.delete(m),m===c))break;const f=l.get(m);for(const I of h){const C=l.get(I);if(FD(f,C)||OXn(f,C,o)||HXn(f,C,i))continue;const y=_+no(f,C),x=u.get(I)??1/0,E=g.get(I);(y<x-A7||Math.abs(y-x)<=A7&&(E==null||m<E))&&(u.set(I,y),g.set(I,m))}}if((u.get(c)??1/0)===1/0)return null;const d=[];let p=c;for(;p;)d.push(l.get(p)),p=g.get(p)??null;return d.reverse(),d.map(m=>({x:m.x,y:m.y,z:t.z}))},pft=class extends yr{getSolverName(){return"SingleLayerNoDifferentRootIntersectionsIntraNodeSolver"}nodeWithPortPoints;traceWidth;viaDiameter;solvedRoutes=[];constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.traceWidth=e.traceWidth??.15,this.viaDiameter=e.viaDiameter??.3,this.MAX_ITERATIONS=1}static isApplicable(e){if((r=>r.availableZ?.length?[...new Set(r.availableZ)].sort((s,a)=>s-a):[...new Set(r.portPoints.map(s=>s.z??0))].sort((s,a)=>s-a))(e).length!==1||e.portPoints.length>12)return!1;const o=dft(e);if(e.portPoints.some(r=>((s,a)=>Math.abs(s.y-a.minY)<.001?"top":Math.abs(s.x-a.maxX)<.001?"right":Math.abs(s.y-a.maxY)<.001?"bottom":Math.abs(s.x-a.minX)<.001?"left":null)(r,o)===null))return!1;const i=new Map;for(const r of e.portPoints)i.set(r.connectionName,(i.get(r.connectionName)??0)+1);return[...i.values()].some(r=>r>2)}buildTaskGroups(){const e=new Map;for(const n of this.nodeWithPortPoints.portPoints){const o=e.get(n.connectionName)??[];o.push(n),e.set(n.connectionName,o)}return e}trySolveNode(){const e=dft(this.nodeWithPortPoints),n=this.buildTaskGroups(),o=Array.from(n.entries()).flatMap(([r,s])=>Yz(s).map(([a,A])=>({connectionName:r,rootConnectionName:a.rootConnectionName??A.rootConnectionName??r,A:a,B:A}))),i=o.length<=6?hft(o.slice()):[o];for(const r of i){const s=[];let a=!1;for(const A of r){const c=GXn(s,A.rootConnectionName),l=YXn(this.nodeWithPortPoints,A.rootConnectionName),u=UXn({A:A.A,B:A.B,bounds:e,obstacleSegments:c,foreignPorts:l});if(!u||u.length<2){a=!0;break}s.push({connectionName:A.connectionName,rootConnectionName:A.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:u,vias:[]})}if(!a)return s}return null}_step(){const e=this.trySolveNode();if(!e)return this.failed=!0,void(this.error="Failed to find a single-layer route set without different-root intersections");this.solvedRoutes=e,this.stats={routeCount:e.length,distinctRoots:new Set(e.map(n=>n.rootConnectionName??n.connectionName)).size},this.solved=!0}visualize(){return{lines:this.solvedRoutes.map(e=>({points:e.route,strokeColor:"cyan",strokeWidth:e.traceThickness,label:`${e.connectionName}
root: ${e.rootConnectionName??e.connectionName}`})),points:this.nodeWithPortPoints.portPoints.map(e=>({x:e.x,y:e.y,color:"blue",label:`${e.connectionName}
root: ${e.rootConnectionName??e.connectionName}`})),rects:[],circles:[]}}},mft=t=>t.min<=t.max?V3(t.value,t.min,t.max):t.value,KXn=class extends yr{getSolverName(){return"SingleTransitionIntraNodeSolver"}nodeWithPortPoints;routes;viaDiameter;traceThickness;obstacleMargin;solvedRoutes=[];bounds;constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.viaDiameter=e?.viaDiameter??.3,this.traceThickness=e?.traceThickness??.15,this.obstacleMargin=e?.obstacleMargin??.1,this.routes=this.extractRoutesFromNode(),this.bounds=this.calculateBounds(),this.routes.length!==1)return this.failed=!0,void(this.error=`Expected 1 route, but got ${this.routes.length}`);const n=this.routes[0];if(n.A.z===void 0||n.B.z===void 0)return this.failed=!0,void(this.error="Route points should have predefined z values");if(n.A.z===n.B.z)return this.failed=!0,void(this.error="Only one route provided, but it has no transition");const o=this.viaDiameter/2+this.obstacleMargin,i={x:mft({value:(n.A.x+n.B.x)/2,min:this.bounds.minX+o,max:this.bounds.maxX-o}),y:mft({value:(n.A.y+n.B.y)/2,min:this.bounds.minY+o,max:this.bounds.maxY-o})};this.solvedRoutes.push(this.createTransitionRoute({start:n.A,end:n.B,via:i,connectionName:n.connectionName})),this.solved=!0}extractRoutesFromNode(){const e=[],n=this.nodeWithPortPoints.portPoints,o=new Map;for(const i of n){const{connectionName:r}=i;o.has(r)||o.set(r,[]),o.get(r).push(i)}for(const[i,r]of o.entries())for(const[s,a]of Yz(r))e.push({A:{...s},B:{...a},connectionName:i});return e}calculateBounds(){return{minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2}}createTransitionRoute(e){const{start:n,end:o,via:i,connectionName:r}=e,s=[{x:n.x,y:n.y,z:n.z},{x:i.x,y:i.y,z:n.z},{x:i.x,y:i.y,z:o.z},{x:o.x,y:o.y,z:o.z}];return{connectionName:r,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:s,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[i]}}_step(){this.solved=!0}visualize(){const e={lines:[],points:[],rects:[],circles:[]};if(e.rects.push({center:{x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY,stroke:"rgba(0, 0, 0, 0.5)",fill:"rgba(240, 240, 240, 0.1)",label:"PCB Bounds"}),this.routes.length>0)for(const n of this.routes)e.points.push({x:n.A.x,y:n.A.y,label:`${n.connectionName} start (z=${n.A.z})`,color:"orange"}),e.points.push({x:n.B.x,y:n.B.y,label:`${n.connectionName} end (z=${n.B.z})`,color:"orange"}),e.lines.push({points:[n.A,n.B],strokeColor:"rgba(255, 0, 0, 0.5)",label:`${n.connectionName} direct`});for(let n=0;n<this.solvedRoutes.length;n++){const o=this.solvedRoutes[n],i="rgba(0, 255, 0, 0.75)";for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];e.lines.push({points:[s,a],strokeColor:i,strokeDash:s.z!==o.route[0].z?[.2,.2]:void 0,strokeWidth:o.traceThickness,label:`${o.connectionName} z=${s.z}`})}for(const r of o.vias)e.circles.push({center:r,radius:this.viaDiameter/2,fill:"rgba(0, 0, 255, 0.8)",stroke:"black",label:"Solved Via"}),e.circles.push({center:r,radius:this.viaDiameter/2+this.obstacleMargin,fill:"rgba(0, 0, 255, 0.3)",stroke:"black",label:"Via Margin"})}return e}},c7=(t,e=2)=>{const n=Array.from({length:e},(o,i)=>i);return t.map(o=>{const i=Hz(o.__zLayers??(o.layers?Oz(o.layers,e):void 0)??n,e);return{...o,__zLayers:i.length>0?i:n}})},_ft=1e-6,fft=t=>{const{point:e,obstacle:n}=t,o=n.width/2+_ft,i=n.height/2+_ft;return Math.abs(e.x-n.center.x)<=o&&Math.abs(e.y-n.center.y)<=i},VXn=class e5n extends yr{getSolverName(){return"SingleTransitionThroughObstacleIntraNodeSolver"}nodeWithPortPoints;routes;obstacles;viaDiameter;traceThickness;connMap;solvedRoutes=[];constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.obstacles=c7(e.obstacles??[],e.layerCount??2),this.connMap=e.connMap,this.viaDiameter=e.viaDiameter??.3,this.traceThickness=e.traceThickness??.15,this.routes=this.extractRoutesFromNode(),this.routes.length===0)return this.failed=!0,void(this.error="Expected at least 1 route");if(this.routes.some(o=>o.A.z===void 0||o.B.z===void 0))return this.failed=!0,void(this.error="Route points should have predefined z values");if(!this.routes.some(o=>o.A.z!==o.B.z))return this.failed=!0,void(this.error="No route transitions through an obstacle");const n=this.routes.map(o=>this.getContainingThroughObstacle(o));if(n.some(o=>!o))return this.failed=!0,void(this.error="No same-net multilayer obstacle contains every route");this.solvedRoutes.push(...this.routes.map((o,i)=>({connectionName:o.connectionName,rootConnectionName:o.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:o.A.x,y:o.A.y,z:o.A.z,...o.A.z!==o.B.z?{toNextSegmentType:"through_obstacle",...n[i].circuitJsonMetadata?{toNextSegmentCircuitJsonMetadata:n[i].circuitJsonMetadata}:{}}:{}},{x:o.B.x,y:o.B.y,z:o.B.z}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]}))),this.solved=!0}static isApplicable(e){return new e5n(e).solved}extractRoutesFromNode(){const e=[],n=new Map;for(const o of this.nodeWithPortPoints.portPoints){const{connectionName:i}=o;n.has(i)||n.set(i,[]),n.get(i).push(o)}for(const[o,i]of n.entries())for(const[r,s]of Yz(i))e.push({A:{...r},B:{...s},connectionName:o,rootConnectionName:r.rootConnectionName??s.rootConnectionName});return e}getContainingThroughObstacle(e){const n=e.A.z,o=e.B.z;return n===void 0||o===void 0?null:this.obstacles.find(i=>{return!(i.__zLayers.length<2)&&!(!i.__zLayers.includes(n)||!i.__zLayers.includes(o))&&!!(r={obstacle:i,connectionName:e.connectionName,connMap:this.connMap}).obstacle.connectedTo.some(s=>s===r.connectionName||(r.connMap?.areIdsConnected(r.connectionName,s)??!1))&&fft({point:e.A,obstacle:i})&&fft({point:e.B,obstacle:i});var r})??null}_step(){this.solved=!0}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const n of this.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:"rgba(128, 0, 128, 0.2)",stroke:"rgba(128, 0, 128, 0.6)",label:`through obstacle candidate
z: ${n.__zLayers.join(",")}`});for(const n of this.solvedRoutes){e.lines.push({points:n.route,strokeColor:"rgba(0, 180, 0, 0.8)",strokeDash:"4, 3",strokeWidth:n.traceThickness,label:`${n.connectionName} through_obstacle`});for(const o of n.route)e.points.push({x:o.x,y:o.y,color:"green",label:`${n.connectionName}
z: ${o.z}`})}return e}},R5=1e-6,Ift=({value:t,min:e,max:n})=>t>=e&&t<=n,Xse=({value:t,target:e,epsilon:n})=>Math.abs(t-e)<=n,Cft=({point:t,bounds:e,epsilon:n=1e-6})=>{if(![t.x,t.y,e.minX,e.maxX,e.minY,e.maxY].every(u=>(({value:g})=>Number.isFinite(g))({value:u}))||t.x<e.minX-n||t.x>e.maxX+n||t.y<e.minY-n||t.y>e.maxY+n)return"outside";const o=Xse({value:t.x,target:e.minX,epsilon:n}),i=Xse({value:t.x,target:e.maxX,epsilon:n}),r=Xse({value:t.y,target:e.minY,epsilon:n}),s=Xse({value:t.y,target:e.maxY,epsilon:n}),a=o||i,A=r||s;if(a&&A)return"on-boundary";const c=Ift({value:t.y,min:e.minY,max:e.maxY}),l=Ift({value:t.x,min:e.minX,max:e.maxX});return a&&c||A&&l?"on-boundary":"inside"};function zXn(t,e,n,o,i){const r={x:(t.x+e.x+n.x)/3,y:(t.y+e.y+n.y)/3},s=(f,I)=>Math.sqrt((I.x-f.x)**2+(I.y-f.y)**2),a=f=>{const I=s(f,t),C=s(f,e),y=s(f,n),x=f.x>=i.minX&&f.x<=i.maxX&&f.y>=i.minY&&f.y<=i.maxY;return I>=o&&C>=o&&y>=o&&x};if(a(r))return r;const A=(f,I,C)=>{const y=f.x-I.x,x=f.y-I.y,E=Math.sqrt(y*y+x*x);return E<1e-10?{x:I.x+C,y:I.y}:{x:I.x+y/E*C,y:I.y+x/E*C}},c=(f,I,C)=>{const y=I.x-f.x,x=I.y-f.y,E=Math.sqrt(y*y+x*x);if(E>2*C-1e-10||E<1e-10)return[];const B=E*E/(2*E),S=Math.sqrt(Math.max(0,C*C-B*B)),Q=f.x+y*B/E,w=f.y+x*B/E,M={x:Q+S*x/E,y:w-S*y/E},k={x:Q-S*x/E,y:w+S*y/E},R=[],F=1e-6;return Math.abs(s(M,f)-C)<F&&Math.abs(s(M,I)-C)<F&&R.push(M),Math.abs(s(k,f)-C)<F&&Math.abs(s(k,I)-C)<F&&R.push(k),R},l=[A(r,t,o),A(r,e,o),A(r,n,o),...c(t,e,o),...c(e,n,o),...c(n,t,o)],u=l.filter(a);if(u.length>0){const f=u.filter(I=>!(C=>Math.abs(C.x-i.minX)<1e-6||Math.abs(C.x-i.maxX)<1e-6||Math.abs(C.y-i.minY)<1e-6||Math.abs(C.y-i.maxY)<1e-6)(I));if(f.length>0)return f.sort((I,C)=>s(I,r)-s(C,r)),f[0]}let g=null,h=1/0;for(let f=i.minX+1;f<i.maxX;f+=5)for(let I=i.minY+1;I<i.maxY;I+=5){const C={x:f,y:I};if(a(C)){const y=s(C,r);y<h&&(h=y,g=C)}}if(g!==null)return g;const d=[];for(let f=0;f<=100;f++){const I=f/100;d.push({x:i.minX+I*(i.maxX-i.minX),y:i.minY}),d.push({x:i.maxX,y:i.minY+I*(i.maxY-i.minY)}),d.push({x:i.maxX-I*(i.maxX-i.minX),y:i.maxY}),d.push({x:i.minX,y:i.maxY-I*(i.maxY-i.minY)})}const p=d.filter(a);if(p.length>0)return p.sort((f,I)=>s(f,r)-s(I,r)),p[0];let m=1/0,_={x:i.minX,y:i.minY};for(const f of[...l,...d])if(f.x>=i.minX&&f.x<=i.maxX&&f.y>=i.minY&&f.y<=i.maxY){const I=Math.max(0,o-s(f,t))+Math.max(0,o-s(f,e))+Math.max(0,o-s(f,n));I<m&&(m=I,_=f)}return _}function LD(t,e,n){const o=yft(e,t,n.center,n.radius),i=yft(t,e,n.center,n.radius),r=jQ(o,e),s=jQ(t,i),a=1e-6;let A;if(r>a&&s>a){A={x:(o.x+i.x)/2,y:(o.y+i.y)/2};const c=jQ(o,A),l=jQ(i,A);if(Math.abs(c-l)>.5*Math.min(c,l)){const g=jQ(t,o),h=jQ(e,i),d=g+h;if(d>a){const p=h/d,m=g/d;A={x:o.x*p+i.x*m,y:o.y*p+i.y*m}}}const u=jQ(A,n.center);if(u<1.05*n.radius){const g={x:(A.x-n.center.x)/u,y:(A.y-n.center.y)/u};A={x:n.center.x+g.x*n.radius*1.2,y:n.center.y+g.y*n.radius*1.2}}}else{const c={x:(t.x+e.x)/2,y:(t.y+e.y)/2},l=jQ(c,n.center);if(l<1.1*n.radius){const u={x:(c.x-n.center.x)/l,y:(c.y-n.center.y)/l};A={x:n.center.x+u.x*n.radius*1.2,y:n.center.y+u.y*n.radius*1.2}}else A=c}return{B:o,D:i,E:A}}function yft(t,e,n,o){const i=[n.x-t.x,n.y-t.y],r=Math.sqrt(i[0]*i[0]+i[1]*i[1]);if(r<=o){if(r<1e-8){const m=[e.x-t.x,e.y-t.y],_=Math.sqrt(m[0]*m[0]+m[1]*m[1]);return _<1e-8?{x:n.x+o,y:n.y}:{x:n.x+m[0]/_*o,y:n.y+m[1]/_*o}}const p=[i[0]/r,i[1]/r];return{x:n.x-p[0]*o,y:n.y-p[1]*o}}const s=[e.x-t.x,e.y-t.y],a=Math.sqrt(r*r-o*o),A=[i[0]/r,i[1]/r],c=[-A[1],A[0]],l=[A[1],-A[0]],u=s[0]*c[0]+s[1]*c[1]>s[0]*l[0]+s[1]*l[1]?c:l,g=o/r,h=a/r,d=[A[0]*h+u[0]*g,A[1]*h+u[1]*g];return{x:t.x+a*d[0],y:t.y+a*d[1]}}function jQ(t,e){const n=e.x-t.x,o=e.y-t.y;return Math.sqrt(n*n+o*o)}var pC=1e-9;function xft(t,e,n,o="cw"){const i=Kz(t,n),r=Kz(e,n);return Math.abs(r-i)<pC?{left:0,top:0,right:0,bottom:0}:(function(s,a,A,c){const l=A.maxX-A.minX,u=A.maxY-A.minY;if(l<pC&&u<pC)return{left:0,top:0,right:0,bottom:0};const g=2*(l+u);if(g<pC)return{left:0,top:0,right:0,bottom:0};const h=l/g*(2*Math.PI),d=(l+u)/g*(2*Math.PI),p=(l+l+u)/g*(2*Math.PI),m=2*Math.PI,_=[{name:"top",start:0,end:h,length:l},{name:"right",start:h,end:d,length:u},{name:"bottom",start:d,end:p,length:l},{name:"left",start:p,end:m,length:u}],f={left:0,top:0,right:0,bottom:0},I=(C,y,x,E,B)=>{const S=y>2*Math.PI-pC?2*Math.PI:y;if(S<=C+pC)return 0;if(B){const Q=Math.max(C,x),w=Math.min(S,2*Math.PI),M=Math.max(0,w-Q),k=Math.max(C,0),R=Math.min(S,E);return M+Math.max(0,R-k)}{const Q=Math.max(C,x),w=Math.min(S,E);return Math.max(0,w-Q)}};for(const C of _){const y=C.end-C.start;if(y<pC||C.length<pC)continue;let x=0;if(c==="cw"){const E=s>a+pC;x=I(C.start,C.end,s,a,E)}else{const E=a>s+pC;x=I(C.start,C.end,a,s,E)}if(x>pC){const E=x/y;f[C.name]+=Math.max(0,Number.isFinite(E)?E:0)}}for(const C in f)f[C]=Math.max(0,Math.min(1,f[C]));return f})(i,r,n,o)}function Kz(t,e){const n=e.maxX-e.minX,o=e.maxY-e.minY;if(n<pC&&o<pC)return 0;const i=2*(n+o);if(i<pC)return 0;let r=0;if(Math.abs(t.y-e.maxY)<=R5&&t.x>=e.minX-R5&&t.x<=e.maxX+R5)r=Math.max(0,Math.min(n,t.x-e.minX));else if(Math.abs(t.x-e.maxX)<=R5&&t.y>=e.minY-R5&&t.y<=e.maxY+R5)r=n+Math.max(0,Math.min(o,e.maxY-t.y));else if(Math.abs(t.y-e.minY)<=R5&&t.x>=e.minX-R5&&t.x<=e.maxX+R5)r=n+o+Math.max(0,Math.min(n,e.maxX-t.x));else{if(!(Math.abs(t.x-e.minX)<=R5&&t.y>=e.minY-R5&&t.y<=e.maxY+R5))throw new Error(`Point (${t.x}, ${t.y}) does not lie on the boundary defined by ${JSON.stringify(e)}`);r=n+o+n+Math.max(0,Math.min(o,t.y-e.minY))}return r=Math.max(0,Math.min(i,r)),i>pC?r/i*(2*Math.PI):0}function JXn(t,e,n,o){return(function({angleA:i,angleB:r,angleC:s}){const a=Math.cos(i),A=Math.sin(i),c=Math.cos(r),l=Math.sin(r),u=Math.cos(s);return(c-a)*(Math.sin(s)-A)-(l-A)*(u-a)<0?"ccw":"cw"})({angleA:Kz(t,o),angleB:Kz(e,o),angleC:Kz(n,o)})}var WXn=class extends yr{getSolverName(){return"SingleTransitionCrossingRouteSolver"}nodeWithPortPoints;routes;viaDiameter;traceThickness;obstacleMargin;layerCount=2;debugViaPositions;solvedRoutes=[];bounds;constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.viaDiameter=e?.viaDiameter??.3,this.traceThickness=e?.traceThickness??.15,this.obstacleMargin=e?.obstacleMargin??.1,this.layerCount=e?.layerCount??2,this.debugViaPositions=[],this.routes=this.extractRoutesFromNode(),this.bounds=this.calculateBounds(),this.routes.length!==2)return this.failed=!0,void(this.error=`Expected 2 routes, but got ${this.routes.length}`);const n=this.routes.flatMap(a=>[a.A,a.B]).map(a=>this.getPortPointBoundsPosition(a));if(n.includes("outside"))return this.failed=!0,void(this.error="Invalid route input: SingleTransitionCrossingRouteSolver received port point(s) outside node bounds");if(n.includes("inside"))return void(this.failed=!0);this.routes=this.routes.map(a=>({...a,A:this.snapPortPointToBounds(a.A),B:this.snapPortPointToBounds(a.B)}));const[o,i]=this.routes,r=o.A.z!==o.B.z,s=i.A.z!==i.B.z;return r&&s||!r&&!s?(this.failed=!0,void(this.error="Exactly one route must have a layer transition")):void 0}extractRoutesFromNode(){const e=[],n=this.nodeWithPortPoints.portPoints,o=new Map;for(const i of n){const{connectionName:r}=i;o.has(r)||o.set(r,[]),o.get(r)?.push(i)}for(const[i,r]of o.entries())r.length===2&&e.push({A:{...r[0],z:r[0].z??0},B:{...r[1],z:r[1].z??0},connectionName:i});return e}calculateBounds(){return{minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2}}getPortPointBoundsPosition(e){return Cft({point:e,bounds:this.bounds})}snapPortPointToBounds(e){const n=V3(e.x,this.bounds.minX,this.bounds.maxX),o=V3(e.y,this.bounds.minY,this.bounds.maxY);return[{distance:Math.abs(e.y-this.bounds.maxY),point:{...e,x:n,y:this.bounds.maxY}},{distance:Math.abs(e.x-this.bounds.maxX),point:{...e,x:this.bounds.maxX,y:o}},{distance:Math.abs(e.y-this.bounds.minY),point:{...e,x:n,y:this.bounds.minY}},{distance:Math.abs(e.x-this.bounds.minX),point:{...e,x:this.bounds.minX,y:o}}].reduce((i,r)=>r.distance<i.distance?r:i).point}doRoutesCross(e,n){return Uh(e.A,e.B,n.A,n.B)}calculateViaPosition(e,n){const o=n.A.z,i=e.A.z!==o?e.A:e.B,r=2*this.obstacleMargin+this.viaDiameter/2+this.traceThickness,s=this.obstacleMargin+this.viaDiameter/2,a=n.A,A=i,c=n.B,l=JXn(a,A,c,this.bounds),u=(function(h,d,p,m,_){const f=xft(h,d,m,_),I=xft(d,p,m,_),C={left:Math.min(1,f.left+I.left),top:Math.min(1,f.top+I.top),right:Math.min(1,f.right+I.right),bottom:Math.min(1,f.bottom+I.bottom)};for(const y in C)Math.abs(C[y])<pC&&(C[y]=0);return C})(a,A,c,this.bounds,l),g={minX:this.bounds.minX+(u.left>.5?r:s),minY:this.bounds.minY+(u.bottom>.5?r:s),maxX:this.bounds.maxX-(u.right>.5?r:s),maxY:this.bounds.maxY-(u.top>.5?r:s)};return g.maxY<g.minY&&(g.minY=(g.minY+g.maxY)/2,g.maxY=g.minY),g.maxX<g.minX&&(g.minX=(g.minX+g.maxX)/2,g.maxX=g.minX),zXn(a,A,c,r,g)}createTransitionRoute(e,n,o,i){const r=[{x:e.x,y:e.y,z:e.z??0},{x:o.x,y:o.y,z:e.z??0},{x:o.x,y:o.y,z:n.z??0},{x:n.x,y:n.y,z:n.z??0}];return{connectionName:i,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:r,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[o]}}createFlatRoute(e,n,o,i,r,s){i.z,e.z;const a=this.viaDiameter/2+this.traceThickness/2+this.obstacleMargin,A=((_,f,I,C)=>{const y=I.x-_.x,x=I.y-_.y;return((E,B)=>({x:(E.x+B.x)/2,y:(E.y+B.y)/2}))({x:_.x+y*f,y:_.y+x*f},{x:I.x-y*C,y:I.y-x*C})})(o,this.viaDiameter,i.z!==e.z?i:r,this.traceThickness),c={center:{x:o.x,y:o.y},radius:a},l=LD(e,A,c).E,u=LD(A,n,c).E,g=LD(e,l,c).E,h=LD(l,A,c).E,d=LD(A,u,c).E,p=LD(u,n,c).E,m=LD(h,d,c).E;return{connectionName:s,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:e.x,y:e.y,z:e.z??0},{x:g.x,y:g.y,z:e.z??0},{x:l.x,y:l.y,z:e.z??0},{x:h.x,y:h.y,z:e.z??0},{x:m.x,y:m.y,z:e.z??0},{x:d.x,y:d.y,z:e.z??0},{x:u.x,y:u.y,z:e.z??0},{x:p.x,y:p.y,z:e.z??0},{x:n.x,y:n.y,z:n.z??0}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]}}trySolve(){const[e,n]=this.routes,o=e.A.z!==e.B.z,i=o?e:n,r=o?n:e,s=this.calculateViaPosition(i,r);if(!s)return!1;this.debugViaPositions.push({via:s});const a=this.createTransitionRoute(i.A,i.B,s,i.connectionName),A=this.createFlatRoute(r.A,r.B,s,i.A,i.B,r.connectionName);return this.solvedRoutes.push(a,A),!0}_step(){if(!this.doRoutesCross(this.routes[0],this.routes[1]))return this.failed=!0,void(this.error="Can only solve routes that have a single transition crossing");this.trySolve()?this.solved=!0:(this.failed=!0,this.error="Failed to find a valid via position and route path")}visualize(){const e={lines:[],points:[],rects:[],circles:[]};e.rects.push({center:{x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY,stroke:"rgba(0, 0, 0, 0.5)",fill:"rgba(240, 240, 240, 0.1)",label:"PCB Bounds"});for(const n of this.routes)e.points.push({x:n.A.x,y:n.A.y,label:`${n.connectionName} start (z=${n.A.z})`,color:"orange"}),e.points.push({x:n.B.x,y:n.B.y,label:`${n.connectionName} end (z=${n.B.z})`,color:"orange"}),e.lines.push({points:[n.A,n.B],strokeColor:"rgba(255, 0, 0, 0.5)",label:`${n.connectionName} direct`});for(let n=0;n<this.debugViaPositions.length;n++){const{via:o}=this.debugViaPositions[n];e.circles.push({center:o,radius:this.viaDiameter/2,fill:"rgba(255, 165, 0, 0.7)",stroke:"rgba(0, 0, 0, 0.5)",label:`Computed Via (attempt ${n+1})`});const i=this.viaDiameter/2+this.obstacleMargin;e.circles.push({center:o,radius:i,stroke:"rgba(255, 165, 0, 0.7)",fill:"rgba(0, 0, 0, 0)",label:"Safety Margin"})}for(let n=0;n<this.solvedRoutes.length;n++){const o=this.solvedRoutes[n],i=n%2==0?"rgba(0, 255, 0, 0.75)":"rgba(255, 0, 255, 0.75)";for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];e.lines.push({points:[s,a],strokeColor:i,strokeDash:s.z!==o.route[0].z?[.2,.2]:void 0,strokeWidth:o.traceThickness,label:`${o.connectionName} z=${s.z}`})}for(const r of o.vias)e.circles.push({center:r,radius:this.viaDiameter/2,fill:"rgba(0, 0, 255, 0.8)",stroke:"black",label:"Solved Via"}),e.circles.push({center:r,radius:this.viaDiameter/2+this.obstacleMargin,fill:"rgba(0, 0, 255, 0.3)",stroke:"black",label:"Via Margin"})}return e}getSolvedRoutes(){return this.solvedRoutes}};function jXn({A:t,B:e,C:n,D:o,E:i,F:r,radius:s,margin:a,subdivisions:A=0}){const c=(E,B)=>({x:(E.x+B.x)/2,y:(E.y+B.y)/2}),l=(E,B,S)=>{const Q=B.x-E.x,w=B.y-E.y,M=Math.sqrt(Q*Q+w*w),k=Q/M,R=w/M,F=-R,O=k;return{midpoint:{x:(E.x+B.x)/2,y:(E.y+B.y)/2},A_Opp:{x:E.x-k*S,y:E.y-R*S},A_Right:{x:E.x+F*S,y:E.y+O*S},A_Left:{x:E.x-F*S,y:E.y-O*S},B_Opp:{x:B.x+k*S,y:B.y+R*S},B_Right:{x:B.x+F*S,y:B.y+O*S},B_Left:{x:B.x-F*S,y:B.y-O*S}}},u=(E,B)=>{const S=no(E,B.start),Q=no(E,B.end),w=no(B.start,B.end);return Math.abs(S+Q-w)<1e-4},g=(E,B)=>{const{start:S,end:Q}=E,{start:w,end:M}=B;if(u(S,B)||u(Q,B)||u(w,E)||u(M,E))return!0;const k=Q.x-S.x,R=Q.y-S.y,F=M.x-w.x,O=M.y-w.y,U=k*O-R*F;if(Math.abs(U)<1e-4)return!1;const Y=w.x-S.x,W=w.y-S.y,te=(Y*O-W*F)/U,j=(Y*R-W*k)/U;return te>0&&te<1&&j>0&&j<1},h=(E,B)=>{const S=[];for(let w=0;w<E.length-1;w++)S.push({start:E[w],end:E[w+1]});const Q=[];for(let w=0;w<B.length-1;w++)Q.push({start:B[w],end:B[w+1]});for(const w of S)for(const M of Q)if(g(w,M))return!0;return!1},d=E=>{let B=0;for(let S=1;S<E.length;S++){const Q=E[S].x-E[S-1].x,w=E[S].y-E[S-1].y;B+=Math.sqrt(Q*Q+w*w)}return B},p=(E,B)=>{const{start:S,end:Q}=E,w=Q.x-S.x,M=Q.y-S.y,k=w*w+M*M;if(k===0)return{...S,t:0};const R=Math.max(0,Math.min(1,((B.x-S.x)*w+(B.y-S.y)*M)/k));return{x:S.x+R*w,y:S.y+R*M,t:R}},m=(E,B,S)=>{const Q=p(E,B);if(no(Q,B)>=S)return Q;const w=Q.x-B.x,M=Q.y-B.y,k=Math.sqrt(w*w+M*M);if(k===0){const R=E.end.x-E.start.x,F=E.end.y-E.start.y,O=Math.sqrt(R*R+F*F);return{x:B.x+S*R/O,y:B.y+S*F/O,t:Q.t,isSpecial:!0,specialType:B===t?"A":"B"}}return{x:B.x+S*w/k,y:B.y+S*M/k,t:Q.t,isSpecial:!0,specialType:B===t?"A":"B"}},_=l(t,e,s),f=l(t,e,s+a),I=(E,B,S,Q,w)=>{const M=E.points;if(M.length<2)return M;const k=S+Q,R=[M[0]];for(let F=0;F<M.length-1;F++){const O={start:M[F],end:M[F+1]};if(wc(B,O.start,O.end)<k){const U=p(O,B),Y=U.x-B.x,W=U.y-B.y,te=Math.sqrt(Y*Y+W*W);let j=null;if(te>1e-6)j={x:B.x+k*Y/te,y:B.y+k*W/te};else{const J=O.end.x-O.start.x,oe=O.end.y-O.start.y,ie=Math.sqrt(J*J+oe*oe);ie>1e-6&&(j={x:B.x+k*J/ie,y:B.y+k*oe/ie})}j&&no(O.start,j)>s/10&&R.push(j)}no(R[R.length-1],O.end)>s/10&&R.push(O.end)}if(R.length>1){const F=[R[0]];for(let O=1;O<R.length;O++)no(F[F.length-1],R[O])>s/10&&F.push(R[O]);return F}return R},C=(()=>{const E=[[n,_.B_Left,_.B_Opp,_.B_Right,c(_.midpoint,c(_.B_Right,_.A_Right)),c(_.midpoint,c(_.A_Left,_.B_Left)),_.A_Left,_.A_Opp,_.A_Right,o],[n,_.B_Right,_.B_Opp,_.B_Left,c(_.midpoint,c(_.A_Left,_.B_Left)),c(_.midpoint,c(_.A_Right,_.B_Right)),_.A_Right,_.A_Opp,_.A_Left,o],[o,_.B_Left,_.B_Opp,_.B_Right,c(_.midpoint,c(_.A_Right,_.B_Right)),c(_.midpoint,c(_.A_Left,_.B_Left)),_.A_Left,_.A_Opp,_.A_Right,n],[o,_.B_Right,_.B_Opp,_.B_Left,c(_.midpoint,c(_.A_Left,_.B_Left)),c(_.midpoint,c(_.A_Right,_.B_Right)),_.A_Right,_.A_Opp,_.A_Left,n]],B=[];for(let W=0;W<E.length;W++){const te=E[W],j={start:te[0],end:te[1]},J={start:te[te.length-2],end:te[te.length-1]},oe={start:te[3],end:te[4]};g(j,J)||g(j,oe)||g(J,oe)||B.push({index:W+1,path:te,length:d(te)})}if(B.length===0)return{index:0,path:[]};const S=B.sort((W,te)=>W.length-te.length)[0],Q=[...S.path],w=Q[0],M=no(w,Q[2]),k=no(w,Q[3]),R=M<k?2:3;(M<no(w,Q[1])||k<no(w,Q[1]))&&Q.splice(1,R-1);const F=Q[Q.length-1],O=no(F,Q[Q.length-3]),U=no(F,Q[Q.length-4]),Y=O<U?Q.length-3:Q.length-4;return(O<no(F,Q[Q.length-2])||U<no(F,Q[Q.length-2]))&&Q.splice(Y+1,Q.length-Y-2),{index:S.index,path:Q,startsAt:Q[0]===n?"C":"D",goesTo:Q[Q.length-1]===n?"C":"D"}})(),y=A>0?((E,B)=>{if(E.length<2)return E;const S=[E[0]];for(let Q=0;Q<E.length-1;Q++){const w={start:E[Q],end:E[Q+1]},M={x:(w.start.x+w.end.x)/2,y:(w.start.y+w.end.y)/2},k=no(M,t),R=no(M,e);if((k<=s||R<=s)&&Math.abs(k-R)>1e-4){const F=p(w,t),O=p(w,e),U=no(F,t),Y=no(O,e)<s,W=U<s?m(w,t,s):null,te=Y?m(w,e,s):null;let j=[];if(no(w.start,w.end)>s/2&&B>0)for(let J=1;J<=B;J++){const oe=J/(B+1),ie={x:w.start.x+oe*(w.end.x-w.start.x),y:w.start.y+oe*(w.end.y-w.start.y),t:oe,isSpecial:!1},ne=no(ie,t),le=no(ie,e);ne<s||le<s||W&&Math.abs(ie.t-W.t)<.1||te&&Math.abs(ie.t-te.t)<.1||j.push(ie)}if(W&&j.push(W),te&&j.push(te),j.sort((J,oe)=>J.t-oe.t),j.length>1){const J=[j[0]];for(let oe=1;oe<j.length;oe++){const ie=J[J.length-1],ne=j[oe];no(ie,ne)>s/10&&J.push(ne)}j=J}j.forEach(J=>S.push(J))}S.push(E[Q+1])}if(S.length>1){const Q=[S[0]];for(let w=1;w<S.length;w++){const M=Q[Q.length-1],k=S[w];no(M,k)>s/10&&Q.push(k)}return Q}return S})(C.path,A):C.path;let x=(()=>{if(C.path.length===0)return null;const E=(()=>{const M=c(_.A_Right,_.B_Right),k=c(_.B_Left,_.A_Left);return[{startsAt:"E",goesTo:"B",points:[i,e]},{startsAt:"E",goesTo:"A",points:[i,t]},{startsAt:"F",goesTo:"B",points:[r,e]},{startsAt:"F",goesTo:"A",points:[r,t]},{startsAt:"E",goesTo:"B",points:[i,M,e]},{startsAt:"E",goesTo:"A",points:[i,M,t]},{startsAt:"F",goesTo:"B",points:[r,M,e]},{startsAt:"F",goesTo:"A",points:[r,M,t]},{startsAt:"E",goesTo:"B",points:[i,k,e]},{startsAt:"E",goesTo:"A",points:[i,k,t]},{startsAt:"F",goesTo:"B",points:[r,k,e]},{startsAt:"F",goesTo:"A",points:[r,k,t]},{startsAt:"E",goesTo:"B",points:[i,f.A_Right,M,e]},{startsAt:"F",goesTo:"B",points:[r,f.B_Right,M,e]},{startsAt:"E",goesTo:"A",points:[i,f.B_Left,k,t]},{startsAt:"F",goesTo:"A",points:[r,f.A_Left,k,t]},{startsAt:"E",goesTo:"B",points:[i,f.A_Left,k,e]},{startsAt:"E",goesTo:"A",points:[i,f.B_Right,M,t]},{startsAt:"E",goesTo:"B",points:[i,f.A_Opp,f.A_Right,M,e]},{startsAt:"E",goesTo:"A",points:[i,f.B_Opp,f.B_Left,k,t]},{startsAt:"F",goesTo:"B",points:[r,f.A_Opp,f.A_Left,k,e]},{startsAt:"F",goesTo:"A",points:[r,f.B_Opp,f.B_Right,M,t]},{startsAt:"F",goesTo:"A",points:[r,f.B_Opp,f.B_Left,k,t]},{startsAt:"E",goesTo:"B",points:[i,f.A_Opp,f.A_Left,k,e]},{startsAt:"E",goesTo:"A",points:[i,f.B_Opp,f.B_Right,M,t]},{startsAt:"E",goesTo:"B",points:[i,f.A_Left,f.A_Opp,f.A_Right,M,e]},{startsAt:"E",goesTo:"A",points:[i,f.B_Right,f.B_Opp,f.B_Left,k,t]},{startsAt:"F",goesTo:"B",points:[r,f.A_Right,f.A_Opp,f.A_Left,k,e]},{startsAt:"F",goesTo:"A",points:[r,f.B_Left,f.B_Opp,f.B_Right,M,t]},{startsAt:"F",goesTo:"A",points:[r,f.B_Right,f.B_Opp,f.B_Left,k,t]},{startsAt:"E",goesTo:"B",points:[i,f.A_Right,f.A_Opp,f.A_Left,k,e]},{startsAt:"E",goesTo:"A",points:[i,f.B_Left,f.B_Opp,f.B_Right,M,t]}].map((R,F)=>({...R,index:F}))})(),B=E.filter(M=>M.startsAt==="E"),S=E.filter(M=>M.startsAt==="F"),Q=[],w=[];for(const M of B)if(!h(M.points,C.path)){Q.push(M);break}for(const M of S)if(!h(M.points,C.path)){w.push(M);break}return Q.length===0||w.length===0?null:{line1:Q[0],line2:w[0]}})();if(x){const E=x.line1.goesTo==="A"?e:t,B=x.line2.goesTo==="A"?e:t,S=I(x.line1,E,s,a),Q=I(x.line2,B,s,a);x={line1:{...x.line1,points:S},line2:{...x.line2,points:Q}}}return{jPair:x,optimalPath:{startsAt:C.startsAt,goesTo:C.goesTo,points:y}}}var $Xn=class extends yr{getSolverName(){return"TwoCrossingRoutesHighDensitySolver"}nodeWithPortPoints;routes;viaDiameter;traceThickness;obstacleMargin;layerCount=2;debugViaPositions;escapeLayer=1;solvedRoutes=[];bounds;constructor(e){if(super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.viaDiameter=e?.viaDiameter??.3,this.traceThickness=e?.traceThickness??.15,this.obstacleMargin=e?.obstacleMargin??.1,this.layerCount=e?.layerCount??2,this.debugViaPositions=[],this.routes=this.extractRoutesFromNode(),this.bounds=this.calculateBounds(),this.routes.length!==2)return this.failed=!0,void(this.error=`Expected 2 routes, but got ${this.routes.length}`);const[n,o]=this.routes;if(n.startPort.z!==n.endPort.z)return this.failed=!0,void(this.error="Route A must start and end on the same layer");if(o.startPort.z!==o.endPort.z)return this.failed=!0,void(this.error="Route B must start and end on the same layer");if(n.startPort.z!==o.startPort.z)return this.failed=!0,void(this.error="Both routes must be on the same layer");n.startPort.z===0?this.escapeLayer=1:this.escapeLayer=0}extractRoutesFromNode(){const e=[],n=this.nodeWithPortPoints.portPoints,o=new Map;for(const i of n){const{connectionName:r}=i;o.has(r)||o.set(r,[]),o.get(r)?.push(i)}for(const[i,r]of o.entries())r.length===2&&e.push({startPort:{...r[0],z:r[0].z??0},endPort:{...r[1],z:r[1].z??0},connectionName:i});return e}calculateBounds(){return{minX:this.nodeWithPortPoints.center.x-this.nodeWithPortPoints.width/2,maxX:this.nodeWithPortPoints.center.x+this.nodeWithPortPoints.width/2,minY:this.nodeWithPortPoints.center.y-this.nodeWithPortPoints.height/2,maxY:this.nodeWithPortPoints.center.y+this.nodeWithPortPoints.height/2}}doRoutesCross(e,n){return Uh(e.startPort,e.endPort,n.startPort,n.endPort)}calculateViaPositions(e,n){const o=this.bounds.maxX-this.bounds.minX,i=this.bounds.maxY-this.bounds.minY,r=this.bounds.minX,s=this.bounds.minY,a={width:o-2*this.obstacleMargin-this.viaDiameter,height:i-2*this.obstacleMargin-this.viaDiameter,x:r+this.obstacleMargin+this.viaDiameter/2,y:s+this.obstacleMargin+this.viaDiameter/2},A=this.viaDiameter+this.obstacleMargin,c=n.startPort,l=n.endPort,u=[{x:a.x,y:a.y},{x:a.x+a.width,y:a.y},{x:a.x+a.width,y:a.y+a.height},{x:a.x,y:a.y+a.height}],g=(C,y)=>no(C,y),h=[];u.forEach((C,y)=>{g(C,c)>=A&&g(C,l)>=A&&h.push({...C,type:"corner",index:y})});const d=[{p1:u[0],p2:u[1]},{p1:u[1],p2:u[2]},{p1:u[2],p2:u[3]},{p1:u[3],p2:u[0]}];if([c,l].forEach((C,y)=>{d.forEach((x,E)=>{((B,S)=>{const Q=B.x,w=B.y,M=B.r,k=S.p1.x,R=S.p1.y,F=S.p2.x,O=S.p2.y;if(Math.abs(F-k)<.001){const ge=k,_e=M*M-(ge-Q)**2;if(_e<0)return[];if(Math.abs(_e)<.001){const ye=w;return ye>=Math.min(R,O)&&ye<=Math.max(R,O)?[{x:ge,y:ye}]:[]}const ue=w+Math.sqrt(_e),fe=w-Math.sqrt(_e),pe=[];return ue>=Math.min(R,O)&&ue<=Math.max(R,O)&&pe.push({x:ge,y:ue}),fe>=Math.min(R,O)&&fe<=Math.max(R,O)&&pe.push({x:ge,y:fe}),pe}const U=(O-R)/(F-k),Y=R-U*k,W=1+U*U,te=2*(U*Y-U*w-Q),j=te*te-4*W*(Q*Q+(Y-w)*(Y-w)-M*M);if(j<0)return[];if(Math.abs(j)<.001){const ge=-te/(2*W),_e=U*ge+Y;return ge>=Math.min(k,F)&&ge<=Math.max(k,F)&&_e>=Math.min(R,O)&&_e<=Math.max(R,O)?[{x:ge,y:_e}]:[]}const J=(-te+Math.sqrt(j))/(2*W),oe=(-te-Math.sqrt(j))/(2*W),ie=U*J+Y,ne=U*oe+Y,le=[];return J>=Math.min(k,F)&&J<=Math.max(k,F)&&ie>=Math.min(R,O)&&ie<=Math.max(R,O)&&le.push({x:J,y:ie}),oe>=Math.min(k,F)&&oe<=Math.max(k,F)&&ne>=Math.min(R,O)&&ne<=Math.max(R,O)&&le.push({x:oe,y:ne}),le})({...C,r:A},x).forEach(B=>{g(B,y===0?l:c)>=A&&h.push({...B,type:"intersection",circle:y,edge:E})})})}),h.length<2){const C=.8*A;if(u.forEach((y,x)=>{g(y,c)>=C&&g(y,l)>=C&&!h.some(E=>E.x===y.x&&E.y===y.y)&&h.push({...y,type:"relaxed_corner",index:x})}),h.length<2){const y=[...u].sort((x,E)=>{const B=Math.min(g(x,c),g(x,l));return Math.min(g(E,c),g(E,l))-B});for(const x of y)if(!h.some(E=>E.x===x.x&&E.y===x.y)&&(h.push({...x,type:"forced_corner"}),h.length>=2))break}}if(h.length<2)return null;let p=0,m=[h[0],h[h.length>1?1:0]];for(let C=0;C<h.length;C++)for(let y=C+1;y<h.length;y++){const x=g(h[C],h[y]);x>p&&(p=x,m=[h[C],h[y]])}let _={x:m[0].x,y:m[0].y},f={x:m[1].x,y:m[1].y};const I=no(_,e.startPort);return no(f,e.startPort)<I&&([_,f]=[f,_]),{via1:_,via2:f}}trySolveAOverB(e,n,o=!1){const i=o?this.calculateViaPositions(e,n):this.calculateViaPositions(n,e);if(!i)return!1;this.debugViaPositions.push(i);const{via1:r,via2:s}=this.pushViasFromEndpoints(this.moveViasAsCloseAsPossible(i));this.debugViaPositions.push({via1:r,via2:s});const{jPair:a,optimalPath:A}=jXn({A:r,B:s,C:e.startPort,D:e.endPort,E:n.startPort,F:n.endPort,radius:this.viaDiameter/2+this.obstacleMargin+this.traceThickness/2*1.5,margin:2*this.obstacleMargin+this.traceThickness/2*1.5,subdivisions:1});if(!a)return!1;const c={connectionName:e.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:A.points.map(u=>({x:u.x,y:u.y,z:e.startPort.z??0})),traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]};a.line2.points.reverse();const l={connectionName:n.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[...a.line1.points.map(u=>({x:u.x,y:u.y,z:n.startPort.z??0})),{...a.line1.points[a.line1.points.length-1],z:this.escapeLayer},{...a.line2.points[0],z:this.escapeLayer},...a.line2.points.map(u=>({x:u.x,y:u.y,z:n.startPort.z??0}))],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[r,s]};return this.solvedRoutes.push(c,l),!0}pushViasFromEndpoints(e){const n={...e.via1},o={...e.via2},i=[this.routes[0].startPort,this.routes[0].endPort,this.routes[1].startPort,this.routes[1].endPort],r=this.getMinDistanceBetweenViaCenters(),s=this.viaDiameter/2+2*this.traceThickness+2*this.obstacleMargin;for(let A=0;A<10;A++){let c=!1,l=!1;const u=.9**A;for(const h of i){const d=no(n,h);if(d<s){const m=(s-d)*u,_=n.x-h.x,f=n.y-h.y,I=Math.sqrt(_*_+f*f);I>1e-6&&(n.x+=_/I*m,n.y+=f/I*m,c=!0)}const p=no(o,h);if(p<s){const m=(s-p)*u,_=o.x-h.x,f=o.y-h.y,I=Math.sqrt(_*_+f*f);I>1e-6&&(o.x+=_/I*m,o.y+=f/I*m,l=!0)}}const g=no(n,o);if(g<r){const h=(r-g)/2,d=o.x-n.x,p=o.y-n.y,m=Math.sqrt(d*d+p*p);m>1e-6?(n.x-=d/m*h,n.y-=p/m*h,o.x+=d/m*h,o.y+=p/m*h,c=!0,l=!0):(n.x-=h,o.x+=h,c=!0,l=!0)}if(!c&&!l)break}const a=no(n,o);if(a<r){const A=(r-a)/2,c=o.x-n.x,l=o.y-n.y,u=Math.sqrt(c*c+l*l);u>1e-6?(n.x-=c/u*A,n.y-=l/u*A,o.x+=c/u*A,o.y+=l/u*A):(n.x-=A,o.x+=A)}return{via1:n,via2:o}}getMinDistanceBetweenViaCenters(){return this.viaDiameter+this.traceThickness+2*this.obstacleMargin}moveViasAsCloseAsPossible(e){const{via1:n,via2:o}=e,i=this.getMinDistanceBetweenViaCenters(),r=no(n,o);if(r<=i)return e;const s=o.x-n.x,a=o.y-n.y,A=Math.sqrt(s*s+a*a),c=s/A,l=a/A,u=(n.x,o.x,n.y,o.y,(r-i)/2);return{via1:{x:n.x+c*u,y:n.y+l*u},via2:{x:o.x-c*u,y:o.y-l*u}}}handleRoutesDontCross(){const[e,n]=this.routes,o={connectionName:e.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:e.startPort.x,y:e.startPort.y,z:e.startPort.z??0},{x:e.endPort.x,y:e.endPort.y,z:e.endPort.z??0}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]},i={connectionName:n.connectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,route:[{x:n.startPort.x,y:n.startPort.y,z:n.startPort.z??0},{x:n.endPort.x,y:n.endPort.y,z:n.endPort.z??0}],traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,vias:[]};this.solvedRoutes.push(o,i),this.solved=!0}_step(){if(this.routes.length!==2)return void(this.failed=!0);const[e,n]=this.routes;this.doRoutesCross(e,n)?this.trySolveAOverB(e,n)||this.trySolveAOverB(n,e)||this.trySolveAOverB(e,n,!0)||this.trySolveAOverB(n,e,!0)?this.solved=!0:(this.failed=!0,this.error="All crossover strategies failed"):this.handleRoutesDontCross()}visualize(){const e={lines:[],points:[],rects:[],circles:[]};e.rects.push({center:{x:(this.bounds.minX+this.bounds.maxX)/2,y:(this.bounds.minY+this.bounds.maxY)/2},width:this.bounds.maxX-this.bounds.minX,height:this.bounds.maxY-this.bounds.minY,stroke:"rgba(0, 0, 0, 0.5)",fill:"rgba(240, 240, 240, 0.1)"});for(const[n,o]of[["Route A",this.routes[0]],["Route B",this.routes[1]]])e.points.push({x:o.startPort.x,y:o.startPort.y,label:`${n}
${o.connectionName} start`,color:"orange"}),e.points.push({x:o.endPort.x,y:o.endPort.y,label:`${n}
${o.connectionName} end`,color:"orange"}),e.lines.push({points:[o.startPort,o.endPort],strokeColor:"rgba(255, 0, 0, 0.5)",label:`${n}
${o.connectionName} direct`});for(let n=0;n<this.debugViaPositions.length;n++){const{via1:o,via2:i}=this.debugViaPositions[n],r=["rgba(255, 165, 0, 0.3)","rgba(128, 0, 128, 0.3)"],s=r[n%r.length];e.circles.push({center:o,radius:this.viaDiameter/2,fill:s,stroke:"rgba(0, 0, 0, 0.3)",label:`Computed Via A (attempt ${n+1})`}),e.circles.push({center:i,radius:this.viaDiameter/2,fill:s,stroke:"rgba(0, 0, 0, 0.3)",label:`Computed Via B (attempt ${n+1})`});const a=this.viaDiameter/2+this.obstacleMargin;e.circles.push({center:o,radius:a,stroke:s,fill:"rgba(0, 0, 0, 0)",label:`Debug Via 1 Safety Margin (attempt ${n+1})`}),e.circles.push({center:i,radius:a,stroke:s,fill:"rgba(0, 0, 0, 0)",label:`Debug Via 2 Safety Margin (attempt ${n+1})`}),e.lines.push({points:[this.routes[n%2].startPort,o,i,this.routes[n%2].endPort],strokeColor:`${s.substring(0,s.lastIndexOf(","))}, 0.3)`,strokeDash:[5,5],label:`Potential Route (attempt ${n+1})`})}for(let n=0;n<this.solvedRoutes.length;n++){const o=this.solvedRoutes[n],i=n%2==0?"rgba(0, 255, 0, 0.75)":"rgba(255, 0, 255, 0.75)";for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];e.lines.push({points:[s,a],strokeColor:i,strokeDash:s.z===1?[.2,.2]:void 0,strokeWidth:o.traceThickness,label:`${o.connectionName} z=${s.z}`}),s._label&&e.points.push({x:s.x,y:s.y,label:s._label})}for(const r of o.vias)e.circles.push({center:r,radius:this.viaDiameter/2,fill:"rgba(0, 0, 255, 0.8)",stroke:"black",label:"Solved Via"}),e.circles.push({center:r,radius:this.viaDiameter/2+this.obstacleMargin,fill:"rgba(0, 0, 255, 0.3)",stroke:"black",label:"Solved Via Margin"})}return e}getSolvedRoutes(){return this.solvedRoutes}},Zse=class extends yr{getSolverName(){return"HyperParameterSupervisorSolver"}GREEDY_MULTIPLIER=1.2;MIN_SUBSTEPS=1;supervisedSolvers;winningSolver;getHyperParameterDefs(){throw new Error("Not implemented")}getCombinationDefs(){return null}getHyperParameterCombinations(e){e||(e=this.getHyperParameterDefs());const n=[];if(e.length===0)return[{}];const[o,...i]=e,r=this.getHyperParameterCombinations(i);return o.possibleValues.forEach(s=>{r.forEach(a=>{n.push({...a,...s})})}),n}initializeSolvers(){const e=this.getHyperParameterDefs(),n=this.getCombinationDefs()??[e.map(o=>o.name)];this.supervisedSolvers=[];for(const o of n){const i=this.getHyperParameterCombinations(e.filter(r=>o.includes(r.name)));for(const r of i){const s=this.generateSolver(r),a=this.computeG(s);this.supervisedSolvers.push({hyperParameters:r,solver:s,h:0,g:a,f:a})}}}generateSolver(e){throw new Error("Not implemented")}computeG(e){return e.iterations/e.MAX_ITERATIONS}computeH(e){return 1-(e.progress||0)}computeF(e,n){return e+n*this.GREEDY_MULTIPLIER}getSupervisedSolverWithBestFitness(){let e=1/0,n=null;for(const o of this.supervisedSolvers??[]){if(o.solver.solved)return o;if(o.solver.failed)continue;const i=o.f;i<e&&(e=i,n=o)}return n}getFailureMessage(){return`All solvers failed in hyper solver. Example failures: ${this.supervisedSolvers?.sort((e,n)=>n.f-e.f)?.slice(0,5).map(e=>e.solver.error).join(", ")}`}_step(){this.supervisedSolvers||this.initializeSolvers();const e=this.getSupervisedSolverWithBestFitness();if(!e)return this.failed=!0,void(this.error=this.getFailureMessage());for(let n=0;n<this.MIN_SUBSTEPS;n++)e.solver.step();this.activeSubSolver=e.solver,e.g=this.computeG(e.solver),e.h=this.computeH(e.solver),e.f=this.computeF(e.g,e.h),e.solver.solved&&(this.solved=!0,this.winningSolver=e.solver,this.onSolve?.(e))}onSolve(e){}visualize(){const e=this.getSupervisedSolverWithBestFitness();let n={lines:[],circles:[],points:[],rects:[]};return e&&(n=e.solver.visualize()),n}},z3=t=>`${t.x.toFixed(6)},${t.y.toFixed(6)},${t.z}`,qXn=t=>[t.route[0],t.route[t.route.length-1]],eae=(t,e,n)=>{const o=new Map,i=(a,A)=>{o.has(a)||o.set(a,new Set),o.has(A)||o.set(A,new Set),o.get(a).add(A),o.get(A).add(a)};for(const a of t)if(a.connectionName===e&&a.route.length!==0){if(a.route.length===1){const A=z3(a.route[0]);o.has(A)||o.set(A,new Set);continue}for(let A=0;A<a.route.length-1;A++)i(z3(a.route[A]),z3(a.route[A+1]))}const r=new Set([n]),s=[n];for(;s.length>0;){const a=s.pop();for(const A of o.get(a)??[])r.has(A)||(r.add(A),s.push(A))}return r},G7e=Array.from({length:6},(t,e)=>e),Vz=class extends Zse{getSolverName(){return"PortfolioSingleIntraNodeSolver"}constructorParams;solvedRoutes=[];nodeWithPortPoints;connMap;effort;adaptiveSearchExpanded=!1;getSolvedSegmentCount(e){const n=e.solvedConnectionsMap;if(!(n instanceof Map))return null;let o=0;for(const i of n.values())Array.isArray(i)&&(o+=i.length);return o}getNodeSegmentCount(){return Math.max(1,this.nodeWithPortPoints.portPointsInPairs?.length??new Set(this.nodeWithPortPoints.portPoints.map(e=>e.connectionName)).size)}getCandidateProgress(e){const n=this.getSolvedSegmentCount(e);return n!==null?Math.min(1,n/this.getNodeSegmentCount()):Math.max(0,Math.min(1,e.progress||0))}getTotalCandidateWork(){return(this.supervisedSolvers??[]).reduce((e,{solver:n})=>e+n.iterations,0)}getDynamicExpansionWorkBudget(){return Math.max(1,...(this.supervisedSolvers??[]).map(({solver:e})=>e.MAX_ITERATIONS))}constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.connMap=e.connMap,this.constructorParams=e,this.effort=e.effort??1,this.MAX_ITERATIONS=2e7*this.effort,this.GREEDY_MULTIPLIER=5,this.MIN_SUBSTEPS=100}getCombinationDefs(){return[["throughObstacle"],["singleLayerNoDifferentRootIntersections"],["multiHeadPolyLine"],["majorCombinations","orderings6","cellSizeFactor"],["noVias"],["orderings50"],["flipTraceAlignmentDirection","orderings6"],["closedFormSingleTrace"],["highDensityA01"],["highDensityA03"]]}getHyperParameterDefs(){return[{name:"singleLayerNoDifferentRootIntersections",possibleValues:[{SINGLE_LAYER_NO_DIFFERENT_ROOT_INTERSECTIONS:!0}]},{name:"majorCombinations",possibleValues:[{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR:2,FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:1,FUTURE_CONNECTION_PROXIMITY_VD:10,MISALIGNED_DIST_PENALTY_FACTOR:5},{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR:1,FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:.5,FUTURE_CONNECTION_PROXIMITY_VD:5,MISALIGNED_DIST_PENALTY_FACTOR:2},{FUTURE_CONNECTION_PROX_TRACE_PENALTY_FACTOR:10,FUTURE_CONNECTION_PROX_VIA_PENALTY_FACTOR:1,FUTURE_CONNECTION_PROXIMITY_VD:5,MISALIGNED_DIST_PENALTY_FACTOR:10,VIA_PENALTY_FACTOR_2:1}]},{name:"orderings6",possibleValues:G7e.map(e=>({SHUFFLE_SEED:e}))},{name:"cellSizeFactor",possibleValues:[{CELL_SIZE_FACTOR:.5},{CELL_SIZE_FACTOR:1}]},{name:"flipTraceAlignmentDirection",possibleValues:[{FLIP_TRACE_ALIGNMENT_DIRECTION:!0}]},{name:"noVias",possibleValues:[{CELL_SIZE_FACTOR:2,VIA_PENALTY_FACTOR_2:10}]},{name:"orderings50",possibleValues:Array.from({length:20},(e,n)=>({SHUFFLE_SEED:100+n}))},{name:"throughObstacle",possibleValues:[{THROUGH_OBSTACLE:!0}]},{name:"closedFormSingleTrace",possibleValues:[{CLOSED_FORM_SINGLE_TRANSITION:!0}]},{name:"multiHeadPolyLine",possibleValues:[{MULTI_HEAD_POLYLINE_SOLVER:!0,SEGMENTS_PER_POLYLINE:6,BOUNDARY_PADDING:.05},{MULTI_HEAD_POLYLINE_SOLVER:!0,SEGMENTS_PER_POLYLINE:6,BOUNDARY_PADDING:-.05,ITERATION_PENALTY:1e4,MINIMUM_FINAL_ACCEPTANCE_GAP:.001}]},{name:"highDensityA01",possibleValues:[{HIGH_DENSITY_A01:!0,SHUFFLE_SEED:G7e[0]}]},{name:"highDensityA03",possibleValues:[{HIGH_DENSITY_A03:!0}]}]}initializeCandidateBudget(e){const n=e.setup;typeof n=="function"&&n.call(e)}refreshDynamicIterationLimit(){const e=(this.supervisedSolvers??[]).reduce((n,{solver:o})=>{if(o.solved||o.failed)return n;const i=Math.max(0,o.MAX_ITERATIONS-o.iterations+1);return n+Math.ceil(i/this.MIN_SUBSTEPS)},0);this.MAX_ITERATIONS=Math.max(this.iterations+1,this.iterations+e),this.stats.dynamicSupervisorIterationLimit=this.MAX_ITERATIONS}initializeSolvers(){super.initializeSolvers();for(const{solver:e}of this.supervisedSolvers??[])this.initializeCandidateBudget(e);this.stats.dynamicExpansionWorkBudget=this.getDynamicExpansionWorkBudget(),this.refreshDynamicIterationLimit()}addSupervisedCandidate(e){const n=this.generateSolver(e);this.initializeCandidateBudget(n);const o=this.computeG(n);this.supervisedSolvers.push({hyperParameters:e,solver:n,h:0,g:o,f:o})}expandAdaptiveSearch(){if(!this.adaptiveSearchExpanded){this.adaptiveSearchExpanded=!0;for(const e of G7e.slice(1))this.addSupervisedCandidate({HIGH_DENSITY_A01:!0,SHUFFLE_SEED:e});this.refreshDynamicIterationLimit(),this.stats.adaptiveSearchExpanded=!0,this.stats.adaptiveSearchExpandedAtIteration=this.iterations,this.stats.candidateWorkAtExpansion=this.getTotalCandidateWork(),this.stats.bestProgressAtExpansion=Math.max(0,...(this.supervisedSolvers??[]).map(({solver:e})=>this.getCandidateProgress(e)))}}shouldExpandPortfolio(){if(this.adaptiveSearchExpanded)return!1;const e=this.getDynamicExpansionWorkBudget();return this.stats.dynamicExpansionWorkBudget=e,this.getTotalCandidateWork()>=e}_step(){this.supervisedSolvers||this.initializeSolvers(),this.adaptiveSearchExpanded||this.getSupervisedSolverWithBestFitness()||this.expandAdaptiveSearch(),super._step(),this.solved||this.failed||!this.shouldExpandPortfolio()||this.expandAdaptiveSearch()}computeG(e){return e instanceof S7e||e instanceof w7e?e.iterations/1e6:e?.hyperParameters?.MULTI_HEAD_POLYLINE_SOLVER?1e3+((e.hyperParameters?.ITERATION_PENALTY??0)+e.iterations)/1e4+1e4*(e.hyperParameters.SEGMENTS_PER_POLYLINE-3):e.iterations/1e4}computeH(e){return this.adaptiveSearchExpanded?1-this.getCandidateProgress(e):1-(e.progress||0)}generateSolver(e){if(e.SINGLE_LAYER_NO_DIFFERENT_ROOT_INTERSECTIONS){if(!pft.isApplicable(this.nodeWithPortPoints)){const n=new Wse({nodeWithPortPoints:this.nodeWithPortPoints,connMap:this.connMap,traceWidth:this.constructorParams.traceWidth,viaDiameter:this.constructorParams.viaDiameter,obstacleMargin:this.constructorParams.obstacleMargin});return n.failed=!0,n.error="Single-layer no-different-root-intersection solver not applicable",n}return new pft({nodeWithPortPoints:this.nodeWithPortPoints,traceWidth:this.constructorParams.traceWidth,viaDiameter:this.constructorParams.viaDiameter})}return e.HIGH_DENSITY_A01?new S7e({nodeWithPortPoints:this.nodeWithPortPoints,cellSizeMm:.1,viaDiameter:this.constructorParams.viaDiameter??.3,viaMinDistFromBorder:(this.constructorParams.viaDiameter??.3)/2,traceMargin:.1,traceThickness:this.constructorParams.traceWidth??.15,effort:this.effort,hyperParameters:{shuffleSeed:e.SHUFFLE_SEED??0}}):e.HIGH_DENSITY_A03?new w7e({nodeWithPortPoints:this.nodeWithPortPoints,highResolutionCellSize:.1,highResolutionCellThickness:8,lowResolutionCellSize:.4,viaDiameter:this.constructorParams.viaDiameter??.3,viaMinDistFromBorder:(this.constructorParams.viaDiameter??.3)/2,traceMargin:.1,traceThickness:.1,effort:this.effort,hyperParameters:e}):e.CLOSED_FORM_TWO_TRACE_SAME_LAYER?new $Xn({nodeWithPortPoints:this.nodeWithPortPoints,viaDiameter:this.constructorParams.viaDiameter}):e.CLOSED_FORM_TWO_TRACE_TRANSITION_CROSSING?new WXn({nodeWithPortPoints:this.nodeWithPortPoints,viaDiameter:this.constructorParams.viaDiameter}):e.CLOSED_FORM_SINGLE_TRANSITION?new KXn({nodeWithPortPoints:this.nodeWithPortPoints,viaDiameter:this.constructorParams.viaDiameter}):e.THROUGH_OBSTACLE?new VXn({nodeWithPortPoints:this.nodeWithPortPoints,obstacles:this.constructorParams.obstacles,connMap:this.connMap,layerCount:this.constructorParams.layerCount,viaDiameter:this.constructorParams.viaDiameter,traceThickness:this.constructorParams.traceWidth}):e.MULTI_HEAD_POLYLINE_SOLVER?new FXn({nodeWithPortPoints:this.nodeWithPortPoints,connMap:this.connMap,hyperParameters:e,viaDiameter:this.constructorParams.viaDiameter}):new T7e({...this.constructorParams,hyperParameters:e})}onSolve(e){let n;n=e.solver instanceof S7e||e.solver instanceof w7e?e.solver.getOutput():e.solver.solvedRoutes;const o=n.map(i=>{const r=this.nodeWithPortPoints.portPoints.find(s=>s.connectionName===i.connectionName);return r?.rootConnectionName?{...i,rootConnectionName:r.rootConnectionName}:i});this.solvedRoutes=((i,r)=>{const s=[...i],a=new Map;for(const A of r.portPoints){const c=a.get(A.connectionName)??[];c.push(A),a.set(A.connectionName,c)}for(const[A,c]of a){if(c.length<=1)continue;const l=c[0]?.rootConnectionName??A,u=new Set(c.map(z3));let g=eae(s,A,z3(c[0]));for(const h of c.slice(1)){const d=z3(h);if(g.has(d))continue;const p=s.find(m=>{if((m.rootConnectionName??m.connectionName)!==l||m.connectionName===A)return!1;const[_,f]=qXn(m);if(!_||!f)return!1;const I=z3(_),C=z3(f);return g.has(I)&&C===d||g.has(C)&&I===d||u.has(I)&&u.has(C)&&(I===d||C===d)});p&&(s.push({...p,connectionName:A,rootConnectionName:l,route:p.route.map(m=>({...m,connectionName:A,rootConnectionName:l})),vias:p.vias.map(m=>({...m})),jumpers:p.jumpers?.map(m=>({...m,start:{...m.start},end:{...m.end}}))}),g=eae(s,A,z3(c[0])))}}return s})(o,this.nodeWithPortPoints)}};function Eft(t,e,n,o,i){const r=n-e,s=i-o,a=1e-6;if(Math.abs(t.y-i)<a)return t.x-e;if(Math.abs(t.x-n)<a)return r+(i-t.y);if(Math.abs(t.y-o)<a)return r+s+(n-t.x);if(Math.abs(t.x-e)<a)return 2*r+s+(t.y-o);const A=Math.abs(t.y-i),c=Math.abs(t.x-n),l=Math.abs(t.y-o),u=Math.abs(t.x-e),g=Math.min(A,c,l,u);return g===A?Math.max(0,Math.min(r,t.x-e)):g===c?r+Math.max(0,Math.min(s,i-t.y)):g===l?r+s+Math.max(0,Math.min(r,n-t.x)):2*r+s+Math.max(0,Math.min(s,t.y-o))}function tae(t,e,n=1e-6){return Math.abs(t-e)<n}function Bft(t){if(t.length<2)return 0;const e=t.map(([o,i])=>o<i?[o,i]:[i,o]);let n=0;for(let o=0;o<e.length;o++){const[i,r]=e[o];for(let s=o+1;s<e.length;s++){const[a,A]=e[s];tae(i,a)||tae(i,A)||tae(r,a)||tae(r,A)||(i<a&&a<r&&r<A||a<i&&i<A&&A<r)&&n++}}return n}var Wm=t=>{const e=t.center.x-t.width/2,n=t.center.x+t.width/2,o=t.center.y-t.height/2,i=t.center.y+t.height/2,r=new Map;for(const l of t.portPoints){const u=r.get(l.connectionName)??[];u.some(g=>g.x===l.x&&g.y===l.y&&g.z===l.z)||u.push({x:l.x,y:l.y,z:l.z}),r.set(l.connectionName,u)}const s=new Map,a=[];let A=0;for(const[l,u]of r){if(u.length<2)continue;const g=u[0],h=u[1],d=Eft(g,e,n,o,i),p=Eft(h,e,n,o,i);if(g.z===h.z){const m=g.z,_=s.get(m)??[];_.push([d,p]),s.set(m,_)}else A++,a.push([d,p])}let c=0;for(const[l,u]of s)c+=Bft(u);return{numSameLayerCrossings:c,numEntryExitLayerChanges:A,numTransitionPairCrossings:Bft(a)}},bft=t=>t.availableZ?.length?[...new Set(t.availableZ)].sort((e,n)=>e-n):[...new Set(t.portPoints.map(e=>e.z??0))].sort((e,n)=>e-n),Sft=t=>bft(t).length===1&&Wm(t).numSameLayerCrossings>0,Qft=(t,e,n)=>{const o=new Map,[i]=bft(t);for(const r of t.portPoints)o.set(r.connectionName,[...o.get(r.connectionName)??[],r]);return Array.from(o.entries()).flatMap(([r,s])=>{if(s.length<2)return[];const a=s[0],A=s[s.length-1];return[{connectionName:r,rootConnectionName:a.rootConnectionName,regionId:t.capacityMeshNodeId,traceThickness:e,viaDiameter:n,route:[{x:a.x,y:a.y,z:i??a.z??0},{x:A.x,y:A.y,z:i??A.z??0}],vias:[]}]})},XXn=Qft,zz=(t,e,n)=>({...t,x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),Y7e=(t,e,n)=>zz(t,e,n),nae=["#dc2626","#2563eb","#16a34a","#ca8a04","#9333ea","#0891b2"],vft=(t,e,n=[])=>[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`
`),U7e=class extends yr{getSolverName(){return"GrowShrinkHighDensityIntraNodeSolver"}constructorParams;nodeWithPortPoints;solvedRoutes=[];failedSolvers=[];activeSubSolver=null;winningSolver;scaleFactor=1;growthAttempts=0;maxGrowthAttempts;constructor(e){if(super(),this.constructorParams=e,this.nodeWithPortPoints=e.nodeWithPortPoints,this.maxGrowthAttempts=e.maxGrowthAttempts??3,this.MAX_ITERATIONS=2e7*(e.effort??1)*(this.maxGrowthAttempts+1),Sft(this.nodeWithPortPoints)){if(!e.fallbackToInvalidGeometryOnFailure)return this.failed=!0,this.progress=1,void(this.error="GrowShrinkHighDensityIntraNodeSolver cannot route an impossible single-layer crossing");this.solvedRoutes=XXn(this.nodeWithPortPoints,e.traceWidth??.15,e.viaDiameter??.3),this.solved=!0,this.progress=1,this.stats={invalidGeometryFallback:!0,reason:"single-layer node has same-layer crossings"}}}getConstructorParams(){return this.constructorParams}createActiveSubSolver(){const{growShrinkSolutionValidator:e,...n}=this.constructorParams;var o,i;this.activeSubSolver=new Vz({...n,nodeWithPortPoints:(o=this.nodeWithPortPoints,i=this.scaleFactor,{...o,width:o.width*i,height:o.height*i,portPoints:o.portPoints.map(r=>Y7e(r,o.center,i)),portPointsInPairs:o.portPointsInPairs?.map(([r,s])=>[Y7e(r,o.center,i),Y7e(s,o.center,i)])})}),this.constructorParams.maxInnerIterationsPerGrowthAttempt&&(this.activeSubSolver.MAX_ITERATIONS=this.constructorParams.maxInnerIterationsPerGrowthAttempt)}acceptSolution(e){const n=this.scaleFactor===1?e.solvedRoutes:e.solvedRoutes.map(o=>((i,r,s)=>({...i,route:i.route.map(a=>zz(a,r,s)),vias:i.vias.map(a=>zz(a,r,s)),jumpers:i.jumpers?.map(a=>({...a,start:zz(a.start,r,s),end:zz(a.end,r,s)}))}))(o,this.nodeWithPortPoints.center,1/this.scaleFactor));return this.constructorParams.growShrinkSolutionValidator&&!this.constructorParams.growShrinkSolutionValidator(n)?(e.solved=!1,e.failed=!0,e.error="High-density scale solution rejected by validator",!1):(this.winningSolver=e,this.solvedRoutes=n,this.solved=!0,this.failed=!1,!0)}computeProgress(){return Math.min(.99,(this.growthAttempts+(this.activeSubSolver?.progress??0))/(this.maxGrowthAttempts+1))}_step(){if(this.activeSubSolver||this.createActiveSubSolver(),this.activeSubSolver.step(),this.activeSubSolver.solved&&this.acceptSolution(this.activeSubSolver))this.activeSubSolver=null;else if(this.activeSubSolver.failed){if(this.failedSolvers.push(this.activeSubSolver),this.error=this.activeSubSolver.error,this.activeSubSolver=null,this.growthAttempts>=this.maxGrowthAttempts)return this.constructorParams.fallbackToInvalidGeometryOnFailure?(this.solvedRoutes=Qft(this.nodeWithPortPoints,this.constructorParams.traceWidth??.15,this.constructorParams.viaDiameter??.3),this.solved=!0,this.failed=!1,this.progress=1,this.stats={...this.stats,invalidGeometryFallback:!0,reason:"growth attempts exhausted",lastError:this.error},void(this.error=null)):(this.failed=!0,void(this.error=`GrowShrinkHighDensityIntraNodeSolver failed after resizing to ${this.scaleFactor}x. Last error: ${this.error}`));this.growthAttempts++,this.scaleFactor*=2}}visualize(){const e=this.activeSubSolver?.visualize()??this.winningSolver?.visualize();return e||(this.solvedRoutes.length>0?{title:this.stats.invalidGeometryFallback?"Invalid same-layer crossing geometry":"Grow/shrink high density routes",lines:this.solvedRoutes.flatMap((n,o)=>n.route.slice(0,-1).map((i,r)=>({points:[i,n.route[r+1]],strokeColor:nae[o%nae.length],strokeWidth:n.traceThickness,layer:`z${i.z}`,label:vft(n.connectionName,n.rootConnectionName,[`z${i.z}`,this.stats.invalidGeometryFallback?"invalid fallback route":void 0].filter(Boolean))}))),points:this.nodeWithPortPoints.portPoints.map(n=>({x:n.x,y:n.y,color:nae[Math.max(0,this.solvedRoutes.findIndex(o=>o.connectionName===n.connectionName))%nae.length],label:vft(n.connectionName,n.rootConnectionName,[`z${n.z}`])})),rects:[{center:this.nodeWithPortPoints.center,width:this.nodeWithPortPoints.width,height:this.nodeWithPortPoints.height,fill:this.stats.invalidGeometryFallback?"rgba(245, 158, 11, 0.12)":"rgba(14, 165, 233, 0.08)",stroke:this.stats.invalidGeometryFallback?"rgba(217, 119, 6, 0.8)":"rgba(14, 165, 233, 0.55)",label:[this.nodeWithPortPoints.capacityMeshNodeId,this.stats.reason].filter(Boolean).join(`
`)}],circles:[]}:e??{lines:[],points:[],rects:[],circles:[]})}},wft=(t,e,n=[])=>[t,e?`rootConnectionName: ${e}`:void 0,...n].filter(Boolean).join(`
`),HD=class extends yr{getSolverName(){return"HighDensitySolver"}unsolvedNodePortPoints;routes;colorMap;defaultViaDiameter=.3;defaultTraceThickness=.15;viaDiameter;traceWidth;obstacleMargin;effort;obstacles;layerCount;useGrowShrinkHighDensityIntraNodeSolver;preserveTerminalPcbPortIds;growShrinkMaxInnerIterationsPerGrowthAttempt;growShrinkFallbackToInvalidGeometryOnFailure;growShrinkSolutionValidator;captureSearchDebug;failedSolvers;activeSubSolver=null;connMap;nodePfById;nodeSolveMetadataById;constructor({nodePortPoints:e,colorMap:n,connMap:o,viaDiameter:i,traceWidth:r,obstacleMargin:s,effort:a,nodePfById:A,obstacles:c,layerCount:l,useGrowShrinkHighDensityIntraNodeSolver:u,preserveTerminalPcbPortIds:g,growShrinkMaxInnerIterationsPerGrowthAttempt:h,growShrinkFallbackToInvalidGeometryOnFailure:d,growShrinkSolutionValidator:p,captureSearchDebug:m}){super(),this.unsolvedNodePortPoints=e,this.colorMap=n??{},this.connMap=o,this.routes=[],this.failedSolvers=[],this.effort=a??1,this.viaDiameter=i??this.defaultViaDiameter,this.traceWidth=r??this.defaultTraceThickness,this.obstacleMargin=s??.15,this.obstacles=c??[],this.layerCount=l??2,this.useGrowShrinkHighDensityIntraNodeSolver=u??!1,this.preserveTerminalPcbPortIds=g??!1,this.growShrinkMaxInnerIterationsPerGrowthAttempt=h,this.growShrinkFallbackToInvalidGeometryOnFailure=d??!1,this.growShrinkSolutionValidator=p,this.captureSearchDebug=m??!0,this.MAX_ITERATIONS=1e7*this.effort*(this.useGrowShrinkHighDensityIntraNodeSolver?4:1),this.nodePfById=A instanceof Map?new Map(A):new Map(Object.entries(A??{})),this.nodeSolveMetadataById=new Map,this.stats={solverNodeCount:{},difficultNodePfs:{},highDensityResizeCount:0}}getSolvedNodeSolverType(e){return e instanceof U7e&&e.winningSolver?this.getSolvedNodeSolverType(e.winningSolver):e instanceof Vz&&e.winningSolver?this.getConcreteSolverTypeName(e.winningSolver):this.getConcreteSolverTypeName(e)}recordNodeSolveMetadata(e,n){const o=e.nodeWithPortPoints,i=this.nodePfById.get(o.capacityMeshNodeId)??null;this.nodeSolveMetadataById.set(o.capacityMeshNodeId,{node:o,status:n,solverType:this.getSolvedNodeSolverType(e),iterations:e.iterations,routeCount:e.solvedRoutes.length,nodePf:i,error:e.error??void 0})}createNodeMarkerLabel(e,n){return["hd_node_marker",`node: ${e}`,`status: ${n.status}`,`solver: ${n.solverType}`,`iterations: ${n.iterations}`,`routes: ${n.routeCount}`,`nodePf: ${n.nodePf??"n/a"}`,`portPoints: ${n.node.portPoints.length}`,...n.error?[`error: ${n.error}`]:[]].join(`
`)}getConcreteSolverTypeName(e){if(e instanceof T7e){const n=this.getIntraNodeStrategyName(e.hyperParameters);return e.cacheHit?`${n} [cached]`:n}return e instanceof Wse?this.getIntraNodeStrategyName(e.hyperParameters):e.getSolverName()}getIntraNodeStrategyName(e){return e?.MULTI_HEAD_POLYLINE_SOLVER?"MultiHeadPolyLineIntraNodeSolver3":e?.SINGLE_LAYER_NO_DIFFERENT_ROOT_INTERSECTIONS?"SingleLayerNoDifferentRootIntersectionsIntraNodeSolver":e?.CLOSED_FORM_SINGLE_TRANSITION?"SingleTransitionIntraNodeSolver":e?.CLOSED_FORM_TWO_TRACE_SAME_LAYER?"TwoCrossingRoutesHighDensitySolver":e?.CLOSED_FORM_TWO_TRACE_TRANSITION_CROSSING?"SingleTransitionCrossingRouteSolver":e?.HIGH_DENSITY_A01?"HighDensitySolverA01":e?.HIGH_DENSITY_A03?"HighDensitySolverA03":"SingleHighDensityRouteSolver6_VertHorzLayer_FutureCost"}recordSolvedNodeStats(e,n){const o=this.getSolvedNodeSolverType(e),i=this.stats.solverNodeCount,r=this.stats.difficultNodePfs;i[o]=(i[o]??0)+1;const s=this.nodePfById.get(n.capacityMeshNodeId)??null;s!==null&&s>.05&&(r[o]||(r[o]=[]),r[o].push(s))}recordResizeStats(e){e instanceof U7e&&(this.stats.highDensityResizeCount=(this.stats.highDensityResizeCount??0)+e.growthAttempts)}getSolvedRoutesWithTerminalPcbPortIds(e){const n=e.nodeWithPortPoints.portPoints.filter(i=>i.pcb_port_id!==void 0);if(n.length===0)return e.solvedRoutes;const o=(i,r)=>{const s=n.filter(A=>A.connectionName===i.connectionName&&A.x===r.x&&A.y===r.y&&A.z===r.z);if(s.length>1)throw new Error(`HighDensitySolver found multiple PCB terminals at an endpoint of "${i.connectionName}"`);const a=s[0];if(a?.pcb_port_id)return a.pcb_port_id};return e.solvedRoutes.map(i=>({...i,startPcbPortId:i.route[0]?o(i,i.route[0]):void 0,endPcbPortId:i.route.length>1?o(i,i.route[i.route.length-1]):void 0}))}_step(){if(this.updateCacheStats(),this.activeSubSolver)return this.activeSubSolver.step(),this.activeSubSolver.solved?(this.routes.push(...this.preserveTerminalPcbPortIds?this.getSolvedRoutesWithTerminalPcbPortIds(this.activeSubSolver):this.activeSubSolver.solvedRoutes),this.recordNodeSolveMetadata(this.activeSubSolver,"solved"),this.recordSolvedNodeStats(this.activeSubSolver,this.activeSubSolver.nodeWithPortPoints),this.recordResizeStats(this.activeSubSolver),this.activeSubSolver=null):this.activeSubSolver.failed&&(this.recordNodeSolveMetadata(this.activeSubSolver,"failed"),this.recordResizeStats(this.activeSubSolver),this.failedSolvers.push(this.activeSubSolver),this.activeSubSolver=null),void this.updateCacheStats();if(this.unsolvedNodePortPoints.length===0)return this.failedSolvers.length>0?(this.solved=!1,this.failed=!0,this.error=`Failed to solve ${this.failedSolvers.length} nodes, ${this.failedSolvers.slice(0,5).map(n=>n.nodeWithPortPoints.capacityMeshNodeId)}. err0: ${this.failedSolvers[0].error}.`,void this.updateCacheStats()):(this.solved=!0,void this.updateCacheStats());const e={nodeWithPortPoints:this.unsolvedNodePortPoints.pop(),colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:this.effort,obstacles:this.obstacles,layerCount:this.layerCount,maxInnerIterationsPerGrowthAttempt:this.growShrinkMaxInnerIterationsPerGrowthAttempt,fallbackToInvalidGeometryOnFailure:this.growShrinkFallbackToInvalidGeometryOnFailure,growShrinkSolutionValidator:this.growShrinkSolutionValidator,captureSearchDebug:this.captureSearchDebug};this.activeSubSolver=this.useGrowShrinkHighDensityIntraNodeSolver?new U7e(e):new Vz(e),this.updateCacheStats()}updateCacheStats(){const e=tB();this.stats.intraNodeCacheHits=e.cacheHits,this.stats.intraNodeCacheMisses=e.cacheMisses}visualize(){let e={lines:[],points:[],rects:[],circles:[]};for(const n of this.routes){const o=Kse(n.route,n.connectionName,this.colorMap[n.connectionName]);for(const i of o)e.lines.push({points:i.points,label:wft(n.connectionName,n.rootConnectionName),strokeColor:i.z===0?i.color:Es(i.color,.5),layer:`z${i.z}`,strokeWidth:n.traceThickness,strokeDash:i.z!==0?[.1,.3]:void 0});for(const i of n.vias)e.circles.push({center:i,layer:"z0,1",radius:n.viaDiameter/2,fill:this.colorMap[n.connectionName],label:wft(n.connectionName,n.rootConnectionName,["via"])})}if(this.solved||this.failed)for(const[n,o]of this.nodeSolveMetadataById){const i=o.node.center.x-o.node.width/2,r=o.node.center.x+o.node.width/2,s=o.node.center.y-o.node.height/2,a=o.node.center.y+o.node.height/2,A=this.createNodeMarkerLabel(n,o),c=o.status==="solved"?"blue":"red";if(e.lines.push({points:[{x:i,y:s},{x:r,y:s}],layer:"hd_node_boundaries",strokeColor:c,strokeDash:"6, 4",strokeWidth:.03,label:A},{points:[{x:r,y:s},{x:r,y:a}],layer:"hd_node_boundaries",strokeColor:c,strokeDash:"6, 4",strokeWidth:.03,label:A},{points:[{x:r,y:a},{x:i,y:a}],layer:"hd_node_boundaries",strokeColor:c,strokeDash:"6, 4",strokeWidth:.03,label:A},{points:[{x:i,y:a},{x:i,y:s}],layer:"hd_node_boundaries",strokeColor:c,strokeDash:"6, 4",strokeWidth:.03,label:A}),o.status==="solved")e.points.push({x:o.node.center.x,y:o.node.center.y,color:c,layer:"hd_node_markers",label:A});else{e.lines.push({points:[{x:0,y:0},{x:o.node.center.x,y:o.node.center.y}],layer:"hd_failed_node_guides",strokeColor:"red",strokeDash:"8, 6",strokeWidth:.05,label:A});const l=Math.max(.1*o.node.width,.12),u=Math.max(.1*o.node.height,.12);e.rects.push({center:o.node.center,layer:"hd_node_markers",width:l,height:u,fill:"red",label:A})}}return this.activeSubSolver&&(e=Il(e,this.activeSubSolver.visualize())),e}};function Pft(t,e){const n=[],o=e.filter(r=>r._containsTarget),i=new Map;for(const r of t.connections){const s=[];for(const a of r.pointsToConnect){let A=e[0],c=Number.MAX_VALUE;for(const l of o){const u=Math.sqrt((l.center.x-a.x)**2+(l.center.y-a.y)**2);u<c&&(c=u,A=l)}s.push(A)}if(s.length<2)throw new Error(`Not enough nodes for connection "${r.name}", only ${s.length} found`);i.set(r.name,s.map(a=>a.capacityMeshNodeId)),n.push({connection:r,nodeIds:[s[0].capacityMeshNodeId,s[s.length-1].capacityMeshNodeId],straightLineDistance:no(s[0].center,s[s.length-1].center)})}return{unshuffledConnectionsWithResults:n,connectionNameToGoalNodeIds:i}}function Mft(t,e){const n=new Map(e.map(u=>[u.capacityMeshNodeId,u])),o=e.map(u=>(u.width+u.height)/2).filter(u=>Number.isFinite(u)&&u>0),i=o.length>0?o.reduce((u,g)=>u+g,0)/o.length:1,r=e.filter(u=>u._offBoardConnectionId),s=new Map,a=new Map,A=new Map;for(const u of e)a.set(u.capacityMeshNodeId,[]),A.set(u.capacityMeshNodeId,[]);for(const u of e)for(const g of u.portPoints){s.set(g.portPointId,g);for(const h of g.connectionNodeIds){const d=a.get(h);d&&!d.some(p=>p.portPointId===g.portPointId)&&d.push(g)}}const{unshuffledConnectionsWithResults:c,connectionNameToGoalNodeIds:l}=Pft(t,e);return{nodeMap:n,avgNodePitch:i,offBoardNodes:r,portPointMap:s,nodePortPointsMap:a,nodeAssignedPortPoints:A,unshuffledConnectionsWithResults:c,connectionNameToGoalNodeIds:l}}var l7=(t,e=1,n={})=>{const o=n.viaDiameter??.3,i="width"in t?t.width:t,r=n.obstacleMargin??.2,s="height"in t&&typeof t.height=="number"?t.height:i;if(!Number.isFinite(i)||!Number.isFinite(s)||i<=0||s<=0)return 0;const a=Math.min(i,s)/(o+r),A=(Math.sqrt(i*s)*Math.min(1.2,Math.max(.85,a**.05))/(o/2+r)/2)**1.1*e;return Number.isFinite(A)?t.availableZ?.length===1&&A>1?1:A:0},$Q=(t,e=.5,n=16)=>{let o=0,i=t;for(;o<n&&!(l7({width:i})<=e);)i/=2,o++;return Math.max(1,o)},wy=(t,e,n,o)=>{if(t?._containsTarget)return 0;if((t.availableZ?.length??2)===1&&(e>0||n>0||o>0))return 1;const i=((.82*e+.41*n+.2*o)/2)**1.1;if(!Number.isFinite(i))return 1;const r=l7(t);if(!Number.isFinite(r)||r<=0)return i>0?1:0;const s=i/r;if(Number.isNaN(s))throw new Error("calculateNodeProbabilityOfFailure returned NaN");return Number.isFinite(s)?s:i>0?1:0};function Dft(t,e,n){let o=0;const i=.99999;for(const r of t){const s=e.get(r.capacityMeshNodeId);if(!s||s._containsTarget)continue;const a=Wm(r),A=Math.min(wy(s,a.numSameLayerCrossings,a.numEntryExitLayerChanges,a.numTransitionPairCrossings),i);o+=Math.log(1-A)}return o}function Nft(t,e){if(e._containsTarget)return 0;const n=Wm(t);return wy(e,n.numSameLayerCrossings,n.numEntryExitLayerChanges,n.numTransitionPairCrossings)}function Rft(t,e,n,o,i){const r=n-e,s=i-o,a=1e-6;if(Math.abs(t.y-i)<a)return t.x-e;if(Math.abs(t.x-n)<a)return r+(i-t.y);if(Math.abs(t.y-o)<a)return r+s+(n-t.x);if(Math.abs(t.x-e)<a)return 2*r+s+(t.y-o);const A=Math.abs(t.y-i),c=Math.abs(t.x-n),l=Math.abs(t.y-o),u=Math.abs(t.x-e),g=Math.min(A,c,l,u);return g===A?Math.max(0,Math.min(r,t.x-e)):g===c?r+Math.max(0,Math.min(s,i-t.y)):g===l?r+s+Math.max(0,Math.min(r,n-t.x)):2*r+s+Math.max(0,Math.min(s,t.y-o))}var ZXn=1.6*3.2,Jz=(t,e)=>{const n=Math.ceil(e/2),o=Math.min(t.width,t.height),i=Math.max(t.width,t.height),r=(Math.floor(o/1.6)+.1)*(Math.floor(i/3.2)+.1)/ZXn;return Math.min(1,n/r)};function K7e(t,e,n,o){const i=e.x-n/2,r=e.x+n/2,s=e.y-o/2,a=e.y+o/2,A=Math.abs(t.y-a),c=Math.abs(t.x-r),l=Math.abs(t.y-s),u=Math.abs(t.x-i),g=Math.min(A,c,l,u);return g>.001?"interior":g===A?"top":g===c?"right":g===l?"bottom":"left"}function Tft(t,e,n,o,i){const r=K7e(t,n,o,i),s=K7e(e,n,o,i);return r!=="interior"&&r===s}function kft(t,e,n,o,i){const r=K7e(t,n,o,i);let s;if(r==="top"||r==="bottom"){const c=o;s=Math.abs(e.x-t.x)/c}else{const c=i;s=Math.abs(e.y-t.y)/c}s=Math.min(1,Math.max(0,s));const a=(t.x+e.x)/2,A=(t.y+e.y)/2;return{x:a+(n.x-a)*s,y:A+(n.y-A)*s}}function oae(t){return"computeNodePf"in t&&typeof t.computeNodePf=="function"}function V7e(t){const e={lines:[],points:[],rects:[],circles:[]};for(const o of t.inputNodes){let i=0,r=0,s={numSameLayerCrossings:0,numEntryExitLayerChanges:0,numTransitionPairCrossings:0},a=0;if(oae(t)){i=t.computeNodePf(o),r=t.nodeMemoryPfMap.get(o.capacityMeshNodeId)??0;const u=t.buildNodeWithPortPointsForCrossing(o);s=Wm(u);const g=new Set,h=t.nodeAssignedPortPoints.get(o.capacityMeshNodeId)??[];for(const d of h)d.connectionName&&g.add(d.connectionName);a=g.size}else{i=t.nodePfMap.get(o.capacityMeshNodeId)??0;const u=t.nodeAssignedPortPoints.get(o.capacityMeshNodeId)??[],g={capacityMeshNodeId:o.capacityMeshNodeId,center:o.center,width:o.width,height:o.height,portPoints:u,availableZ:o.availableZ};s=Wm(g);const h=new Set;for(const d of u)d.connectionName&&h.add(d.connectionName);a=h.size}const A=Math.min(255,Math.floor(512*i)),c=Math.max(0,255-Math.floor(512*i));let l=`rgba(${A}, ${c}, ${c}, ${i<.001?"0.1":"0.3"})`;o._containsObstacle&&(l="rgba(255, 0, 0, 0.3)"),o._offBoardConnectedCapacityMeshNodeIds?.length&&(l="rgba(255, 165, 0, 0.3)"),e.rects.push({center:o.center,width:o.width-.2,height:o.height-.2,layer:`z${o.availableZ.join(",")}`,fill:l,label:`${o.capacityMeshNodeId}
pf: ${i.toFixed(3)}, memPf: ${r.toFixed(3)}
C#: ${a}
xSame: ${s.numSameLayerCrossings}, xLC: ${s.numEntryExitLayerChanges}, xTransition: ${s.numTransitionPairCrossings}
obCmid: ${o._offBoardConnectedCapacityMeshNodeIds?.join(",")}
obs: ${o._containsObstacle?"yes":"no"}`})}if(oae(t))for(const[o,i]of t.portPointMap){const r=t.assignedPortPoints.get(o),s=r?t.colorMap[r.connectionName]??"blue":"rgba(150, 150, 150, 0.5)";e.circles.push({center:{x:i.x,y:i.y},radius:.05,fill:s,layer:`z${i.z}`,label:[o,`conn: ${r?.connectionName}`,`cd: ${i.distToCentermostPortOnZ}`,`connects: ${i.connectionNodeIds.join(",")}`,`rootConn: ${r?.rootConnectionName}`].filter(Boolean).join(`
`)})}const n=oae(t)?t.connectionsWithResults:t.connectionResults;for(const o of n){if(!o.path)continue;const i=o.connection,r=t.colorMap[i.name]??"blue",s=[];for(const a of o.path)s.push({x:a.point.x,y:a.point.y,z:a.z,nodeId:a.currentNodeId});for(let a=0;a<s.length-1;a++){const A=s[a],c=s[a+1],l=A.z===c.z,u=A.z;let g;g=l?u===0?void 0:"10 5":"3 3 10";const h=A.nodeId?t.nodeMap.get(A.nodeId):null;if(h&&Tft(A,c,h.center,h.width,h.height)){const d=kft(A,c,h.center,h.width,h.height);e.lines.push({points:[{x:A.x,y:A.y},{x:d.x,y:d.y}],strokeColor:r,strokeDash:g}),e.lines.push({points:[{x:d.x,y:d.y},{x:c.x,y:c.y}],strokeColor:r,strokeDash:g})}else e.lines.push({points:[{x:A.x,y:A.y},{x:c.x,y:c.y}],strokeColor:r,strokeDash:g})}}if(oae(t)&&!t.solved&&t.candidates&&t.candidates.length>0){const o=t.currentConnection,i=o?t.colorMap[o.connection.name]??"blue":"blue";if(o){const[s,a]=o.nodeIds,A=t.nodeMap.get(s),c=t.nodeMap.get(a),l=o.connection.pointsToConnect[0],u=o.connection.pointsToConnect[o.connection.pointsToConnect.length-1];if(A&&c){const g=l?{x:l.x,y:l.y}:A.center,h=u?{x:u.x,y:u.y}:c.center;e.lines.push({points:[g,h],strokeColor:Es(i,.5),strokeDash:"5 5"}),e.points.push({x:g.x,y:g.y,color:i,label:[`Start: ${o.connection.name}`,`${o.connection.__rootConnectionNames?.[0]}`].join(`
`)}),e.points.push({x:h.x,y:h.y,color:i,label:[`End: ${o.connection.name}`,`${o.connection.__rootConnectionNames?.[0]}`].join(`
`)}),e.circles.push({center:h,radius:.08,stroke:i,label:`Goal: ${o.connection.name}`})}}const r=[...t.candidates].sort((s,a)=>s.f-a.f).slice(0,1);for(const s of r){const a=[];let A=s;for(;A;)a.unshift({x:A.point.x,y:A.point.y,z:A.z,lastMoveWasOffBoard:A.lastMoveWasOffBoard,nodeId:A.currentNodeId}),A=A.prevCandidate;for(let c=0;c<a.length-1;c++){const l=a[c],u=a[c+1],g=l.z===u.z,h=l.z;let d;d=u.lastMoveWasOffBoard?"2 2":g?h===0?void 0:"10 5":"3 3 10";const p=l.nodeId?t.nodeMap.get(l.nodeId):null,m=.02*l.z;if(p&&Tft(l,u,p.center,p.width,p.height)){const _=kft(l,u,p.center,p.width,p.height);e.lines.push({points:[{x:l.x+m,y:l.y+m},{x:_.x+m,y:_.y+m}],strokeColor:Es(i,.25),strokeDash:d}),e.lines.push({points:[{x:_.x+m,y:_.y+m},{x:u.x+m,y:u.y+m}],strokeColor:Es(i,.25),strokeDash:d})}else e.lines.push({points:[{x:l.x+m,y:l.y+m},{x:u.x+m,y:u.y+m}],strokeColor:Es(i,.25),strokeDash:d})}if(a.length>=1){const c=a[a.length-1];let l=0,u=0,g=0,h=0,d=0,p=0;const m=t.nodeMap.get(s.prevCandidate?.currentNodeId);if(m&&s.prevCandidate&&s.portPoint&&o){const S=o.connection.name,Q={x:s.prevCandidate.point.x,y:s.prevCandidate.point.y,z:s.prevCandidate.z,connectionName:S},w={x:s.portPoint.x,y:s.portPoint.y,z:s.portPoint.z,connectionName:S},M=t.buildNodeWithPortPointsForCrossing(m,[Q,w]),k=sft(M);g=k.numSameLayerCrossings,h=k.numTransitionPairCrossings,d=k.numEntryExitLayerChanges;const R=t.capacityMeshNodeMap.get(m.capacityMeshNodeId);R&&(u=t.JUMPER_PF_FN_ENABLED&&m.availableZ.length===1?Jz(R,g):wy(R,g,d,h),l=u**2*t.NODE_PF_FACTOR),p=s.prevCandidate.g>0?s.g-s.prevCandidate.g:s.g}if(!o)continue;const[_,f]=o.nodeIds,I=t.nodeMap.get(f),C=I?Math.sqrt((c.x-I.center.x)**2+(c.y-I.center.y)**2):0,y=t.avgNodePitch>0?C/t.avgNodePitch:0,x=y*t.BASE_CANDIDATE_COST,E=t.nodeMemoryPfMap.get(s.currentNodeId)??0,B=-Math.log(1-E)*t.MEMORY_PF_FACTOR;e.circles.push({center:c,radius:.03,fill:Es(i,.25),layer:`z${s.z}`,label:[`f: ${s.f.toFixed(2)}`,`g: ${s.g.toFixed(2)} (nodeDelta: ${p.toFixed(2)})`,`h: ${s.h.toFixed(2)}`,`  dist: ${C.toFixed(2)}`,`  estHops: ${y.toFixed(1)}`,`  estStepCost: ${x.toFixed(2)}`,`  memRiskCost: ${B.toFixed(2)}`,`z: ${s.z}`,`node: ${s.currentNodeId}`,`Cost(Pf): ${l.toFixed(3)}`,`Pf: ${u.toFixed(3)}`,`xSame: ${g}, xTrans: ${h}, xLC: ${d}`,`routeOffBoard=${t.currentConnectionShouldRouteOffBoard}`,`offBoardTouched=${s.hasTouchedOffBoardNode??!1}`,`lastMoveWasOffBoard=${s.lastMoveWasOffBoard??!1}`].join(`
`)})}}}return e}function Fft(t,e,n){let o=0;const i=.99999;for(const r of t){const s=e.get(r.capacityMeshNodeId);if(!s||s._containsTarget)continue;const a=Wm(r),A=Math.min(Jz(s,a.numSameLayerCrossings),i);o+=Math.log(1-A)}return o}var eZn=class extends yr{constructor(e){super(),this.input=e;const{simpleRouteJson:n,capacityMeshNodes:o,inputNodes:i,colorMap:r,nodeMemoryPfMap:s,hyperParameters:a,precomputedInitialParams:A,fixedRoutes:c}=e;if(this.input=structuredClone(e),this.MAX_ITERATIONS=1e8,this.simpleRouteJson=n,this.inputNodes=i,this.colorMap=r??{},this.capacityMeshNodeMap=new Map(o.map(l=>[l.capacityMeshNodeId,l])),this.nodeMemoryPfMap=s??new Map,this.hyperParameters=a??{},A){this.nodeMap=A.nodeMap,this.avgNodePitch=A.avgNodePitch,this.offBoardNodes=A.offBoardNodes,this.portPointMap=A.portPointMap,this.nodePortPointsMap=A.nodePortPointsMap,this.connectionNameToGoalNodeIds=A.connectionNameToGoalNodeIds;const{nodeAssignedPortPoints:l}=(function(u){const g=new Map;for(const[h,d]of u.nodeAssignedPortPoints)g.set(h,[...d]);return{nodeAssignedPortPoints:g}})(A);this.nodeAssignedPortPoints=l,this.connectionsWithResults=D5(structuredClone(A.unshuffledConnectionsWithResults),this.hyperParameters.SHUFFLE_SEED??0)}else{this.nodeMap=new Map(i.map(h=>[h.capacityMeshNodeId,h]));const l=i.map(h=>(h.width+h.height)/2).filter(h=>Number.isFinite(h)&&h>0);this.avgNodePitch=l.length>0?l.reduce((h,d)=>h+d,0)/l.length:1,this.offBoardNodes=i.filter(h=>h._offBoardConnectionId),this.portPointMap=new Map,this.nodePortPointsMap=new Map;for(const h of i)this.nodePortPointsMap.set(h.capacityMeshNodeId,[]),this.nodeAssignedPortPoints.set(h.capacityMeshNodeId,[]);for(const h of i)for(const d of h.portPoints){this.portPointMap.set(d.portPointId,d);for(const p of d.connectionNodeIds){const m=this.nodePortPointsMap.get(p);m&&!m.some(_=>_.portPointId===d.portPointId)&&m.push(d)}}const{connectionsWithResults:u,connectionNameToGoalNodeIds:g}=this.getConnectionsWithNodes();this.connectionsWithResults=u,this.connectionNameToGoalNodeIds=g}if(c&&c.length>0){for(const l of c)if(this.connectionsWithResults.push(l),l.portPoints)for(const u of l.portPoints)u.portPointId&&this.assignedPortPoints.set(u.portPointId,{connectionName:u.connectionName,rootConnectionName:u.rootConnectionName})}for(const l of this.connectionsWithResults)l.path?this.processedConnectionQueue.push(l):this.unprocessedConnectionQueue.push(l);this.totalConnectionCount=this.connectionsWithResults.length}input;getSolverName(){return"PortPointPathingSolver"}hyperParameters;simpleRouteJson;inputNodes;nodeMap;nodePortPointsMap;portPointMap;connectionsWithResults=[];failedConnection=null;assignedPortPoints=new Map;nodeAssignedPortPoints=new Map;PORT_POINT_REUSE_FACTOR=1e3;BASE_COST_FOR_NOT_GOING_OFF_BOARD=100;get NODE_PF_FACTOR(){return this.hyperParameters.NODE_PF_FACTOR??50}get RANDOM_WALK_DISTANCE(){return this.hyperParameters.RANDOM_WALK_DISTANCE??0}get MEMORY_PF_FACTOR(){return this.hyperParameters.MEMORY_PF_FACTOR??0}get CENTER_OFFSET_FOCUS_SHIFT(){return this.hyperParameters.CENTER_OFFSET_FOCUS_SHIFT??0}get RANDOM_COST_MAGNITUDE(){return this.hyperParameters.RANDOM_COST_MAGNITUDE??0}get BASE_CANDIDATE_COST(){return this.hyperParameters.BASE_CANDIDATE_COST??0}get NODE_PF_MAX_PENALTY(){return this.hyperParameters.NODE_PF_MAX_PENALTY??1e4}get FORCE_CENTER_FIRST(){return this.hyperParameters.FORCE_CENTER_FIRST??!0}get FORCE_OFF_BOARD_FREQUENCY(){return this.offBoardNodes.length===0?0:this.hyperParameters.FORCE_OFF_BOARD_FREQUENCY??0}get FORCE_OFF_BOARD_SEED(){return this.hyperParameters.FORCE_OFF_BOARD_SEED??0}get NODE_MAX_PF(){return Math.min(.99999,1-Math.exp(-this.NODE_PF_MAX_PENALTY))}get CENTER_OFFSET_DIST_PENALTY_FACTOR(){return this.hyperParameters.CENTER_OFFSET_DIST_PENALTY_FACTOR??0}get STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR(){return this.hyperParameters.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR??0}colorMap;get GREEDY_MULTIPLIER(){return this.hyperParameters.GREEDY_MULTIPLIER??1.3}MAX_CANDIDATES_IN_MEMORY=5e3;get MAX_ITERATIONS_PER_PATH(){return this.hyperParameters.MAX_ITERATIONS_PER_PATH??1e4}ITERATIONS_PER_MM_FOR_PATH=30;BASE_ITERATIONS_PER_PATH=1e4;get RIPPING_ENABLED(){return this.hyperParameters.RIPPING_ENABLED??!1}get RIPPING_PF_THRESHOLD(){const e=this.hyperParameters.START_RIPPING_PF_THRESHOLD,n=this.hyperParameters.END_RIPPING_PF_THRESHOLD;if(e!==void 0&&n!==void 0){const o=this.MAX_RIPS;return e+(o>0?this.totalRipCount/o:0)*(n-e)}return this.hyperParameters.RIPPING_PF_THRESHOLD??.3}get MAX_RIPS(){return this.hyperParameters.MAX_RIPS??100}get RANDOM_RIP_FRACTION(){return this.hyperParameters.RANDOM_RIP_FRACTION??0}get JUMPER_PF_FN_ENABLED(){return this.hyperParameters.JUMPER_PF_FN_ENABLED??!1}jumpersPerMmSquared=.1;testedRipConnections=new Map;totalRipCount=0;get MIN_ALLOWED_BOARD_SCORE(){return this.hyperParameters.MIN_ALLOWED_BOARD_SCORE??-1e4}nodeMemoryPfMap;unprocessedConnectionQueue=[];processedConnectionQueue=[];currentConnection=null;totalConnectionCount=0;currentPathIterations=0;candidates;visitedPortPoints;connectionNameToGoalNodeIds;capacityMeshNodeMap;avgNodePitch;currentConnectionShouldRouteOffBoard=!1;activeCandidateStraightLineDistance;offBoardNodes=[];baseNodeCostCache=new Map;getConstructorParams(){return this.input}clearCostCaches(){this.baseNodeCostCache.clear()}clampPf(e){return Number.isFinite(e)?Math.min(Math.max(e,0),.999999):.999999}pfToFailureCost(e){const n=this.clampPf(e);return n>=this.NODE_MAX_PF?this.NODE_PF_MAX_PENALTY:-Math.log(1-n)}getBaseNodeFailureCost(e){const n=this.baseNodeCostCache.get(e);if(n!=null)return n;const o=this.nodeMap.get(e);if(!o)return 0;const i=this.computeNodePf(o),r=this.pfToFailureCost(i);return this.baseNodeCostCache.set(e,r),r}computeBoardScore(){const e=this.getNodesWithPortPoints();return this.JUMPER_PF_FN_ENABLED?Fft(e,this.capacityMeshNodeMap):Dft(e,this.capacityMeshNodeMap)}getMaxIterationsForCurrentPath(){const e=this.activeCandidateStraightLineDistance??0;return Math.min(this.BASE_ITERATIONS_PER_PATH+this.ITERATIONS_PER_MM_FOR_PATH*e,this.MAX_ITERATIONS_PER_PATH)}getNodeDeltaFailureCostForSegment(e,n,o){const i=this.nodeMap.get(e);if(!i)return 0;const r=this.getBaseNodeFailureCost(e),s=this.computeNodePf(i,[n,o]),a=this.pfToFailureCost(s),A=Math.max(0,a-r);return s>=this.NODE_MAX_PF?this.NODE_PF_MAX_PENALTY:A*this.NODE_PF_FACTOR}getConnectionsWithNodes(){const{unshuffledConnectionsWithResults:e,connectionNameToGoalNodeIds:n}=Pft(this.simpleRouteJson,this.inputNodes);return{connectionsWithResults:D5(e,this.hyperParameters.SHUFFLE_SEED??0),connectionNameToGoalNodeIds:n}}buildNodeWithPortPointsForCrossing(e,n){const o=this.nodeAssignedPortPoints.get(e.capacityMeshNodeId)??[],i=n?[...o,...n]:o;return{capacityMeshNodeId:e.capacityMeshNodeId,center:e.center,width:e.width,height:e.height,portPoints:i,availableZ:e.availableZ}}computeNodePf(e,n){if(e._containsTarget)return 0;const o=this.buildNodeWithPortPointsForCrossing(e,n),i=Wm(o);return this.JUMPER_PF_FN_ENABLED&&e.availableZ.length===1?Jz(this.capacityMeshNodeMap.get(e.capacityMeshNodeId),i.numSameLayerCrossings):wy(this.capacityMeshNodeMap.get(e.capacityMeshNodeId),i.numSameLayerCrossings,i.numEntryExitLayerChanges,i.numTransitionPairCrossings)}getPortPointReusePenalty(e,n){const o=this.assignedPortPoints.get(e);return o?n===o.rootConnectionName?0:this.PORT_POINT_REUSE_FACTOR:0}getOtherNodeId(e,n){const[o,i]=e.connectionNodeIds;return o===n?i:i===n?o:null}computeG(e,n,o,i,r){const s=e.currentNodeId,a=e.point,A={x:a.x,y:a.y,z:e.z,connectionName:i,rootConnectionName:r},c={x:n.x,y:n.y,z:n.z,connectionName:i,rootConnectionName:r},l=this.getNodeDeltaFailureCostForSegment(s,A,c);return e.g+l}computeGToEndTarget(e,n,o,i){const r=e.currentNodeId,s={x:e.point.x,y:e.point.y,z:e.z,connectionName:o,rootConnectionName:i},a={x:n.x,y:n.y,z:e.z,connectionName:o,rootConnectionName:i},A=this.getNodeDeltaFailureCostForSegment(r,s,a);return e.g+A}computeDistanceToNearestOffBoardNode(e){if(this.offBoardNodes.length===0)return 1/0;let n=1/0;for(const o of this.offBoardNodes){const i=no(e,o.center);i<n&&(n=i)}return n}computeH(e,n,o,i,r,s){if(this.RANDOM_WALK_DISTANCE>0&&r<this.RANDOM_WALK_DISTANCE)return 0;if(this.currentConnectionShouldRouteOffBoard&&!s)return this.BASE_COST_FOR_NOT_GOING_OFF_BOARD+this.computeDistanceToNearestOffBoardNode(e);const a=this.nodeMap.get(o);if(!a)return 0;const A=no(e,a.center),c=this.avgNodePitch>0?A/this.avgNodePitch:0,l=this.clampPf(this.nodeMemoryPfMap.get(n)??0),u=this.pfToFailureCost(l)*this.MEMORY_PF_FACTOR,g=c*this.BASE_CANDIDATE_COST,h=this.CENTER_OFFSET_DIST_PENALTY_FACTOR*e.distToCentermostPortOnZ**2;let d=0;if(this.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR>0&&this.currentConnection){const p=wc(e,this.currentConnection.connection.pointsToConnect[0],this.currentConnection.connection.pointsToConnect[1]);d=this.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR*p}return A+g+u+h+d}getVisitedPortPointKey(e,n){return this.currentConnectionShouldRouteOffBoard&&n?`${e}:touched_off_board`:e}getAvailableExitPortPoints(e,n){const o=this.currentConnection?.connection.__rootConnectionNames?.[0],i=this.nodePortPointsMap.get(e)??[],r=[];for(const s of i){const a=this.getVisitedPortPointKey(s.portPointId,n);if(this.visitedPortPoints?.has(a))continue;const A=this.assignedPortPoints.get(s.portPointId);A&&A?.rootConnectionName!==o||r.push(s)}return r}getAvailableExitPortPointsWithOmissions(e,n,o){const i=this.nodePortPointsMap.get(e)??[],r=this.currentConnection?.connection.__rootConnectionNames?.[0],s=new Map;for(const A of i){const c=this.getVisitedPortPointKey(A.portPointId,o);if(this.visitedPortPoints?.has(c))continue;const l=this.getOtherNodeId(A,e);if(!l)continue;this.nodeMap.get(l);const u=`${l}|${A.z}`,g=s.get(u)??[];g.push(A),s.set(u,g)}const a=[];for(const[,A]of s){A.sort((p,m)=>p.distToCentermostPortOnZ-m.distToCentermostPortOnZ);const c=A[0];if(!c)continue;const l=this.assignedPortPoints.get(c.portPointId),u=l&&l.rootConnectionName===r;if(!l||u){a.push(c);continue}const g=[...A].sort((p,m)=>p.x!==m.x?p.x-m.x:p.y-m.y),h=[];let d=[];for(const p of g){const m=this.assignedPortPoints.get(p.portPointId);!m||m.rootConnectionName===r?d.push(p):d.length>0&&(h.push(d),d=[])}d.length>0&&h.push(d);for(const p of h){const m=Math.floor(p.length/2);a.push(p[m])}}return a}getAvailableExitPortPointsForOffboardConnection(e,n){const o=this.nodeMap.get(e);if(!o)return[];const i=this.currentConnection?.connection.__rootConnectionNames?.[0],r=[];for(const s of o?._offBoardConnectedCapacityMeshNodeIds??[]){if(s===e||!this.nodeMap.get(s))continue;const a=this.nodePortPointsMap.get(s)??[];for(const A of a){const c=this.getVisitedPortPointKey(A.portPointId,n);if(this.visitedPortPoints?.has(c))continue;const l=this.assignedPortPoints.get(A.portPointId);l&&l.rootConnectionName!==i||r.push({...A,throughNodeId:s})}}return r}canTravelThroughObstacle(e,n,o){return this.connectionNameToGoalNodeIds.get(n)?.includes(e.capacityMeshNodeId)||!!e._offBoardConnectionId}isAtEndGoal(e,n){return e===n}getBacktrackedPath(e){const n=[];let o=e;for(;o;){if(o.lastMoveWasOffBoard&&o.throughNodeId){const i=this.nodeMap.get(o.throughNodeId),r=o.prevCandidate?this.nodeMap.get(o.prevCandidate.currentNodeId):null;n.push(o),i&&n.push({prevCandidate:null,portPoint:null,currentNodeId:o.throughNodeId,point:i.center,z:o.z,f:0,g:0,h:0,distanceTraveled:0}),r&&r._offBoardConnectionId&&n.push({prevCandidate:null,portPoint:null,currentNodeId:o.prevCandidate.currentNodeId,point:r.center,z:o.z,f:0,g:0,h:0,distanceTraveled:0})}else n.push(o);o=o.prevCandidate}return n.reverse()}assignPortPointsForPath(e,n,o){const i=[];for(let A=0;A<e.length;A++){const c=e[A];if(!c.portPoint){const g=A===0,h=A===e.length-1;if(!g&&!h){const d={x:c.point.x,y:c.point.y,z:c.z,connectionName:n,rootConnectionName:o};i.push(d);const p=this.nodeAssignedPortPoints.get(c.currentNodeId)??[];p.push(d),this.nodeAssignedPortPoints.set(c.currentNodeId,p)}continue}const l=c.portPoint;this.assignedPortPoints.set(l.portPointId,{connectionName:n,rootConnectionName:o});const u={portPointId:l.portPointId,x:l.x,y:l.y,z:l.z,connectionName:n,rootConnectionName:o,prevPortPointId:l.prevPortPointId,nextPortPointId:l.nextPortPointId};i.push(u);for(const g of l.connectionNodeIds){const h=this.nodeAssignedPortPoints.get(g)??[];h.push(u),this.nodeAssignedPortPoints.set(g,h)}}const r=i.map(A=>A.portPointId).filter(A=>!!A);let s=0;for(const A of i)A.portPointId&&(A.prevPortPointId=r[s-1],A.nextPortPointId=r[s+1],s+=1);const a=Array.from(new Set(e.map(A=>A.currentNodeId)));for(const A of a){const c=this.nodeMap.get(A);if(c&&c._offBoardConnectionId)for(const l of c?._offBoardConnectedCapacityMeshNodeIds??[]){const u=this.nodePortPointsMap.get(l)??[];for(const g of u)this.assignedPortPoints.set(g.portPointId,{connectionName:n,rootConnectionName:o})}}return i}addTargetPointsToNodes(e,n){const o=e[0],i=e[e.length-1],r=n.pointsToConnect[0],s=n.pointsToConnect[n.pointsToConnect.length-1];if(o&&r){const a=this.nodeAssignedPortPoints.get(o.currentNodeId)??[];a.push({x:r.x,y:r.y,z:o.z,connectionName:n.name,rootConnectionName:n.__rootConnectionNames?.[0]}),this.nodeAssignedPortPoints.set(o.currentNodeId,a)}if(i&&s){const a=this.nodeAssignedPortPoints.get(i.currentNodeId)??[];a.push({x:s.x,y:s.y,z:i.z,connectionName:n.name,rootConnectionName:n.__rootConnectionNames?.[0]}),this.nodeAssignedPortPoints.set(i.currentNodeId,a)}}isPortPointInPathChain(e,n){let o=e;for(;o;){if(o.portPoint?.portPointId===n)return!0;o=o.prevCandidate}return!1}isNodeInPathChain(e,n){let o=e;for(;o;){if(o.currentNodeId===n)return!0;o=o.prevCandidate}return!1}_step(){if(this.currentConnection||(this.currentConnection=this.unprocessedConnectionQueue.shift()??null),!this.currentConnection){const h=this.computeBoardScore();return this.stats={boardScore:h,totalRipCount:this.totalRipCount},h<this.MIN_ALLOWED_BOARD_SCORE?(this.failedConnection=null,this.failed=!0,void(this.error=`Board score ${h.toFixed(2)} is less than MIN_ALLOWED_BOARD_SCORE ${this.MIN_ALLOWED_BOARD_SCORE.toFixed(2)}`)):void(this.solved=!0)}const e=this.currentConnection;this.activeCandidateStraightLineDistance=e.straightLineDistance,this.currentPathIterations++;const n=this.getMaxIterationsForCurrentPath();if(this.currentPathIterations>n)return this.failedConnection=e,this.processedConnectionQueue.push(e),this.currentConnection=null,this.candidates=null,this.visitedPortPoints=null,this.currentPathIterations=0,this.failed=!0,void(this.error=`Exceeded max iterations for path (${n}) on connection ${e.connection.name}`);const[o,i]=e.nodeIds,r=this.nodeMap.get(o),s=this.nodeMap.get(i);if(!r||!s)return this.processedConnectionQueue.push(e),this.currentConnection=null,void(this.currentPathIterations=0);const a=e.connection.name,A=e.connection.__rootConnectionNames?.[0],c=e.connection.pointsToConnect[0];if(!this.candidates){if(this.clearCostCaches(),this.FORCE_OFF_BOARD_FREQUENCY>0){const h=M7e(17*(this.hyperParameters.SHUFFLE_SEED??0)+this.FORCE_OFF_BOARD_SEED+this.processedConnectionQueue.length);this.currentConnectionShouldRouteOffBoard=h()<this.FORCE_OFF_BOARD_FREQUENCY}else this.currentConnectionShouldRouteOffBoard=!1;this.candidates=[],this.visitedPortPoints=new Set;for(const h of r.availableZ){const d=c?{x:c.x,y:c.y}:r.center,p={portPointId:`start:${o}:${h}`,x:d.x,y:d.y,z:h,connectionNodeIds:[o,o],distToCentermostPortOnZ:0},m=this.computeH(p,o,i,h,0,!1),_=0+m*this.GREEDY_MULTIPLIER;this.candidates.push({prevCandidate:null,portPoint:null,currentNodeId:o,point:d,z:h,f:_,g:0,h:m,distanceTraveled:0,hasTouchedOffBoardNode:!1})}}this.candidates.sort((h,d)=>h.f-d.f);let l,u=this.candidates.shift();for(;u?.portPoint&&this.visitedPortPoints;){const h=this.getVisitedPortPointKey(u.portPoint.portPointId,u.hasTouchedOffBoardNode);if(!this.visitedPortPoints.has(h))break;u=this.candidates.shift()}if(this.candidates.length>this.MAX_CANDIDATES_IN_MEMORY&&this.candidates.splice(this.MAX_CANDIDATES_IN_MEMORY,this.candidates.length-this.MAX_CANDIDATES_IN_MEMORY),!u)return this.error=`Ran out of candidates on connection ${a}`,this.failedConnection=e,this.processedConnectionQueue.push(e),this.currentConnection=null,this.candidates=null,this.visitedPortPoints=null,this.currentPathIterations=0,void(this.failed=!0);if(u.portPoint&&this.visitedPortPoints){const h=this.getVisitedPortPointKey(u.portPoint.portPointId,u.hasTouchedOffBoardNode);this.visitedPortPoints.add(h)}if(this.isAtEndGoal(u.currentNodeId,i)){const h=e.connection.pointsToConnect[e.connection.pointsToConnect.length-1],d=h?{x:h.x,y:h.y}:s.center,p=this.computeGToEndTarget(u,d,a,A),m={prevCandidate:u,portPoint:null,currentNodeId:i,point:d,z:u.z,g:p,h:0,f:p,distanceTraveled:u.distanceTraveled+no(u.point,d)},_=this.getBacktrackedPath(m);return e.path=_,e.portPoints=this.assignPortPointsForPath(_,a,A),this.addTargetPointsToNodes(_,e.connection),this.clearCostCaches(),this.RIPPING_ENABLED&&this.processRippingForPath(_,a),this.processedConnectionQueue.push(e),this.currentConnection=null,this.progress=this.processedConnectionQueue.length/this.totalConnectionCount,this.candidates=null,this.visitedPortPoints=null,void(this.currentPathIterations=0)}const g=this.nodeMap.get(u.currentNodeId);l=g?._offBoardConnectionId?this.getAvailableExitPortPointsForOffboardConnection(u.currentNodeId,u.hasTouchedOffBoardNode):this.FORCE_CENTER_FIRST?this.getAvailableExitPortPointsWithOmissions(u.currentNodeId,i,u.hasTouchedOffBoardNode):this.getAvailableExitPortPoints(u.currentNodeId,u.hasTouchedOffBoardNode);for(const h of l){if(this.isPortPointInPathChain(u,h.portPointId)||this.visitedPortPoints?.has(h.portPointId))continue;const d=this.getOtherNodeId(h,h.throughNodeId??u.currentNodeId);if(!d||this.isNodeInPathChain(u,d))continue;const p="throughNodeId"in h?h.throughNodeId:void 0,m=p?this.nodeMap.get(p):null,_=this.nodeMap.get(d);if(!_||_._containsObstacle&&!this.canTravelThroughObstacle(_,a,A))continue;const f=this.computeG(u,h,d,a,A);if(!this.RIPPING_ENABLED&&f>-this.MIN_ALLOWED_BOARD_SCORE)continue;const I=u.distanceTraveled+no(u.point,h),C=u.hasTouchedOffBoardNode||!!_._offBoardConnectionId,y=this.computeH(h,d,i,h.z,I,C),x=f+y*this.GREEDY_MULTIPLIER,E=!!g?._offBoardConnectionId&&!!m?._offBoardConnectionId;this.candidates.push({prevCandidate:u,portPoint:h,currentNodeId:d,point:{x:h.x,y:h.y},z:h.z,f:x,g:f,h:y,distanceTraveled:I,lastMoveWasOffBoard:E,throughNodeId:E?p:void 0,hasTouchedOffBoardNode:C||!!_._offBoardConnectionId||!!g?._offBoardConnectionId})}}getNodesWithPortPoints(){const e=[];for(const n of this.inputNodes){const o=this.nodeAssignedPortPoints.get(n.capacityMeshNodeId)??[];o.length>0&&e.push({capacityMeshNodeId:n.capacityMeshNodeId,center:n.center,width:n.width,height:n.height,portPoints:o,availableZ:n.availableZ})}return e}getConnectionsInNode(e,n){const o=[],i=new Set;for(const r of this.connectionsWithResults)if(r.path&&r.connection.name!==n&&!i.has(r.connection.name)){for(const s of r.path)if(s.currentNodeId===e){o.push(r),i.add(r.connection.name);break}}return o}computeNodePfWithoutConnection(e,n){if(e._containsTarget)return{pf:0,totalCrossings:0};const o=(this.nodeAssignedPortPoints.get(e.capacityMeshNodeId)??[]).filter(a=>a.connectionName!==n),i={capacityMeshNodeId:e.capacityMeshNodeId,center:e.center,width:e.width,height:e.height,portPoints:o,availableZ:e.availableZ},r=Wm(i),s=r.numSameLayerCrossings+r.numEntryExitLayerChanges+r.numTransitionPairCrossings;return{pf:wy(this.capacityMeshNodeMap.get(e.capacityMeshNodeId),r.numSameLayerCrossings,r.numEntryExitLayerChanges,r.numTransitionPairCrossings),totalCrossings:s}}computeNodeCrossings(e){if(e._containsTarget)return 0;const n=this.buildNodeWithPortPointsForCrossing(e),o=Wm(n);return o.numSameLayerCrossings+o.numEntryExitLayerChanges+o.numTransitionPairCrossings}ripConnection(e){const n=e.connection.name;for(const[o,i]of this.assignedPortPoints.entries())i.connectionName===n&&this.assignedPortPoints.delete(o);for(const[o,i]of this.nodeAssignedPortPoints.entries()){const r=i.filter(s=>s.connectionName!==n);this.nodeAssignedPortPoints.set(o,r)}e.path=void 0,e.portPoints=void 0}requeueConnection(e){this.totalRipCount++;const n=this.processedConnectionQueue.indexOf(e);if(n!==-1)return this.processedConnectionQueue.splice(n,1),this.unprocessedConnectionQueue.push(e),!0;const o=this.unprocessedConnectionQueue.indexOf(e);return o!==-1&&(this.unprocessedConnectionQueue.splice(o,1),this.unprocessedConnectionQueue.unshift(e)),!0}processRippingForPath(e,n){const o=Array.from(new Set(e.map(r=>r.currentNodeId)));let i=!1;for(const r of o){if(this.totalRipCount>this.MAX_RIPS)break;const s=this.nodeMap.get(r);if(!s)continue;let a=this.computeNodePf(s);if(a<=this.RIPPING_PF_THRESHOLD)continue;this.testedRipConnections.has(r)||this.testedRipConnections.set(r,new Set);const A=this.testedRipConnections.get(r),c=D5(this.getConnectionsInNode(r,n),(this.hyperParameters.SHUFFLE_SEED??0)+this.processedConnectionQueue.length);for(const l of c){if(a<=this.RIPPING_PF_THRESHOLD)break;const u=l.connection.name;A.add(u);const{pf:g}=this.computeNodePfWithoutConnection(s,u);if(this.ripConnection(l),!this.requeueConnection(l))return;a=g,i=!0,this.clearCostCaches()}}i&&this.RANDOM_RIP_FRACTION>0&&this.processRandomRipping(n)}processRandomRipping(e){const n=this.processedConnectionQueue.filter(r=>r.path!==void 0&&r.connection.name!==e);if(n.length===0)return;const o=Math.max(1,Math.floor(this.RANDOM_RIP_FRACTION*n.length)),i=D5(n,(this.hyperParameters.SHUFFLE_SEED??0)+this.totalRipCount+this.processedConnectionQueue.length);for(let r=0;r<o&&r<i.length&&!(this.totalRipCount>this.MAX_RIPS);r++){const s=i[r];if(this.ripConnection(s),!this.requeueConnection(s))return;this.clearCostCaches()}}visualize(){let e={};if(this.failed){const n=this.failedConnection?.connection.pointsToConnect[0],o=this.failedConnection?.connection.pointsToConnect[1];n&&o&&(e={lines:[{points:[n,o],label:`Failed Connection ${this.failedConnection?.connection.name}`,strokeWidth:1,strokeColor:"red",strokeDash:[2,2]}]})}return MD(V7e(this),e)}},z7e=class extends Zse{getSolverName(){return"HyperPortPointPathingSolver"}params;precomputedInitialParams;constructor(e){super(),this.params=e,this.MAX_ITERATIONS=1e8,this.GREEDY_MULTIPLIER=1.2,this.MIN_SUBSTEPS=50,this.precomputedInitialParams=e.precomputedInitialParams??Mft(e.simpleRouteJson,e.inputNodes)}getHyperParameterDefs(){const e=this.params.numShuffleSeeds??50;return[{name:"SHUFFLE_SEED",possibleValues:Array.from({length:e},(n,o)=>({SHUFFLE_SEED:o+1700*(this.params.hyperParameters?.SHUFFLE_SEED??0)}))}]}getCombinationDefs(){return[["SHUFFLE_SEED"]]}generateSolver(e){return new eZn({simpleRouteJson:this.params.simpleRouteJson,capacityMeshNodes:this.params.capacityMeshNodes,inputNodes:this.params.inputNodes,colorMap:this.params.colorMap,nodeMemoryPfMap:this.params.nodeMemoryPfMap,hyperParameters:{...this.params.hyperParameters,...e,MIN_ALLOWED_BOARD_SCORE:this.params.minAllowedBoardScore??e.MIN_ALLOWED_BOARD_SCORE??this.params.hyperParameters?.MIN_ALLOWED_BOARD_SCORE},precomputedInitialParams:this.precomputedInitialParams,fixedRoutes:this.params.fixedRoutes})}computeG(e){return-e.computeBoardScore()}computeH(e){const n=e.progress||0;return n<.1?0:-(e.computeBoardScore()/n)*(1-n)}getNodesWithPortPoints(){if(this.winningSolver)return this.winningSolver.getNodesWithPortPoints();const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.getNodesWithPortPoints():[]}get connectionsWithResults(){if(this.winningSolver)return this.winningSolver.connectionsWithResults;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.connectionsWithResults:[]}get inputNodes(){if(this.winningSolver)return this.winningSolver.inputNodes;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.inputNodes:this.params.inputNodes}get nodeMap(){if(this.winningSolver)return this.winningSolver.nodeMap;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.nodeMap:new Map(this.params.inputNodes.map(n=>[n.capacityMeshNodeId,n]))}get assignedPortPoints(){if(this.winningSolver)return this.winningSolver.assignedPortPoints;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.assignedPortPoints:new Map}get nodeAssignedPortPoints(){if(this.winningSolver)return this.winningSolver.nodeAssignedPortPoints;const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.nodeAssignedPortPoints:new Map}computeNodePf(e){if(this.winningSolver)return this.winningSolver.computeNodePf(e);const n=this.getSupervisedSolverWithBestFitness();return n?n.solver.computeNodePf(e):null}computeBoardScore(){if(this.winningSolver)return this.winningSolver.computeBoardScore();const e=this.getSupervisedSolverWithBestFitness();return e?e.solver.computeBoardScore():0}onSolve(e){this.stats={...e.solver.stats,winningHyperParameters:this.winningSolver?.hyperParameters}}visualize(){return this.winningSolver?this.winningSolver.visualize():super.visualize()}};function Lft(t){let e=t;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,1|n),n^=n+Math.imul(n^n>>>7,61|n),((n^n>>>14)>>>0)/4294967296}}var tZn=[{SHUFFLE_SEED:100,NODE_PF_FACTOR:100,NODE_PF_MAX_PENALTY:100,MEMORY_PF_FACTOR:0,EXPANSION_DEGREES:10,FORCE_CENTER_FIRST:!0,FORCE_OFF_BOARD_FREQUENCY:0,CENTER_OFFSET_DIST_PENALTY_FACTOR:0}],nZn=class extends yr{getSolverName(){return"MultiSectionPortPointOptimizer"}simpleRouteJson;inputNodes;capacityMeshNodes;capacityMeshEdges;colorMap;nodeMap;capacityMeshNodeMap;connectionResults;assignedPortPoints;nodeAssignedPortPoints;sections=[];activeSubSolver=null;currentSection=null;sectionScoreBeforeOptimization=0;currentSectionCenterNodeId=null;currentScheduleIndex=0;nodePfMap=new Map;attemptsToFixNode=new Map;sectionAttempts=0;MAX_ATTEMPTS_PER_NODE=100;MAX_SECTION_ATTEMPTS=15;ACCEPTABLE_PF=.05;FRACTION_TO_REPLACE=.2;JUMPER_PF_FN_ENABLED=!1;SHUFFLE_SEEDS_PER_SECTION=null;ALWAYS_RIP_INTERSECTIONS=!0;effort=1;HYPERPARAMETER_SCHEDULE=tZn;constructor(e){super(),this.MAX_ITERATIONS=1e6,this.simpleRouteJson=e.simpleRouteJson,this.inputNodes=e.inputNodes,this.capacityMeshNodes=e.capacityMeshNodes,this.capacityMeshEdges=e.capacityMeshEdges,this.colorMap=e.colorMap??{},this.effort=e.effort??1,e.FRACTION_TO_REPLACE!==void 0&&(this.FRACTION_TO_REPLACE=e.FRACTION_TO_REPLACE),e.ALWAYS_RIP_INTERSECTIONS!==void 0&&(this.ALWAYS_RIP_INTERSECTIONS=e.ALWAYS_RIP_INTERSECTIONS),e.MAX_ATTEMPTS_PER_NODE!==void 0&&(this.MAX_ATTEMPTS_PER_NODE=e.MAX_ATTEMPTS_PER_NODE),e.MAX_SECTION_ATTEMPTS!==void 0&&(this.MAX_SECTION_ATTEMPTS=e.MAX_SECTION_ATTEMPTS),e.HYPERPARAMETER_SCHEDULE!==void 0&&(this.HYPERPARAMETER_SCHEDULE=e.HYPERPARAMETER_SCHEDULE),this.JUMPER_PF_FN_ENABLED=e.JUMPER_PF_FN_ENABLED??this.JUMPER_PF_FN_ENABLED,this.SHUFFLE_SEEDS_PER_SECTION=e.SHUFFLE_SEEDS_PER_SECTION,this.nodeMap=new Map(e.inputNodes.map(o=>[o.capacityMeshNodeId,o])),this.capacityMeshNodeMap=new Map(e.capacityMeshNodes.map(o=>[o.capacityMeshNodeId,o])),this.connectionResults=[...e.initialConnectionResults],this.assignedPortPoints=new Map(e.initialAssignedPortPoints),this.nodeAssignedPortPoints=new Map(e.initialNodeAssignedPortPoints),this.nodePfMap=this.computeInitialPfMap();const n=this.computeBoardScore();this.stats.successfulOptimizations=0,this.stats.failedOptimizations=0,this.stats.nodesExamined=0,this.stats.sectionAttempts=0,this.stats.sectionScores={},this.stats.initialBoardScore=n,this.stats.currentBoardScore=n,this.stats.errors=0}computeInitialPfMap(){const e=new Map;for(const n of this.capacityMeshNodes){const o=this.nodeAssignedPortPoints.get(n.capacityMeshNodeId)??[];if(o.length===0)continue;const i={capacityMeshNodeId:n.capacityMeshNodeId,center:n.center,width:n.width,height:n.height,portPoints:o,availableZ:n.availableZ},r=this.JUMPER_PF_FN_ENABLED&&n.availableZ.length===1?Jz(n,Wm(i).numSameLayerCrossings):Nft(i,n);e.set(n.capacityMeshNodeId,r)}return e}computeBoardScore(){const e=this.getNodesWithPortPoints();return this.computeScoreForNodes(e)}computeScoreForNodes(e){return this.JUMPER_PF_FN_ENABLED?Fft(e,this.capacityMeshNodeMap):Dft(e,this.capacityMeshNodeMap)}recomputePfForNodes(e){for(const n of e){const o=this.capacityMeshNodeMap.get(n);if(!o)continue;const i=this.nodeAssignedPortPoints.get(n)??[];if(i.length===0){this.nodePfMap.set(n,0);continue}const r={center:o.center,width:o.width,height:o.height,portPoints:i,availableZ:o.availableZ},s=this.JUMPER_PF_FN_ENABLED&&o.availableZ.length===1?Jz(o,Wm(r).numSameLayerCrossings):Nft(r,o);this.nodePfMap.set(n,s)}}getCreatePortPointSectionInput(){return{inputNodes:this.inputNodes,capacityMeshNodes:this.capacityMeshNodes,capacityMeshEdges:this.capacityMeshEdges,nodeMap:this.nodeMap,connectionResults:this.connectionResults}}createSection(e){return(function(n,o){const{inputNodes:i,capacityMeshNodes:r,capacityMeshEdges:s,connectionResults:a}=n,{centerOfSectionCapacityNodeId:A,expansionDegrees:c}=o,l=new Map;for(const C of s){const[y,x]=C.nodeIds;l.has(y)||l.set(y,new Set),l.has(x)||l.set(x,new Set),l.get(y).add(x),l.get(x).add(y)}const u=new Set,g=new Set,h=[];for(h.push({nodeId:A,depth:0}),g.add(A);h.length>0;){const{nodeId:C,depth:y}=h.shift();if(u.add(C),y<c){const x=l.get(C)??new Set;for(const E of x)g.has(E)||(g.add(E),h.push({nodeId:E,depth:y+1}))}}const d=i.filter(C=>u.has(C.capacityMeshNodeId)),p=r.filter(C=>u.has(C.capacityMeshNodeId)),m=[],_=[];for(const C of s){const[y,x]=C.nodeIds,E=u.has(y),B=u.has(x);E&&B?m.push(C):(E||B)&&_.push(C)}const f=d.map(C=>{const y=C.portPoints.filter(x=>{const[E,B]=x.connectionNodeIds,S=u.has(E),Q=u.has(B);return S||Q});return{...C,portPoints:y}}),I=(function(C,y){const x=[];for(const E of C){if(!E.path||E.path.length===0)continue;const B=E.connection.name,S=E.connection.__rootConnectionNames?.[0],Q=[];for(let Y=0;Y<E.path.length;Y++){const W=E.path[Y];y.has(W.currentNodeId)&&Q.push(Y)}if(Q.length===0)continue;const w=Q[0],M=Q[Q.length-1];let k=w,R=M;if(w>0){const Y=E.path[0].currentNodeId;(E.nodeIds[0]===Y||E.nodeIds[1]===Y)&&(k=0)}if(M<E.path.length-1){const Y=E.path.length-1,W=E.path[Y].currentNodeId;(E.nodeIds[0]===W||E.nodeIds[1]===W)&&(R=Y)}const F=E.path.slice(k,R+1),O=k>0,U=R<E.path.length-1;x.push({connectionName:B,rootConnectionName:S,points:F.map(Y=>({x:Y.point.x,y:Y.point.y,z:Y.z,nodeId:Y.currentNodeId,portPointId:Y.portPoint?.portPointId})),originalStartIndex:k,originalEndIndex:R,hasEntryFromOutside:O,hasExitToOutside:U})}return x})(a??[],u);return{centerNodeId:A,expansionDegrees:c,nodeIds:u,inputNodes:f,capacityMeshNodes:p,internalEdges:m,boundaryEdges:_,sectionPaths:I}})(this.getCreatePortPointSectionInput(),e)}getSectionNodesWithPortPoints(e){const n=[];for(const o of e.nodeIds){const i=this.nodeMap.get(o),r=this.capacityMeshNodeMap.get(o);if(!i||!r)continue;const s=this.nodeAssignedPortPoints.get(o)??[];s.length>0&&n.push({capacityMeshNodeId:o,center:i.center,width:i.width,height:i.height,portPoints:s,availableZ:i.availableZ})}return n}getNodesWithPortPoints(){const e=[];for(const n of this.inputNodes){const o=this.nodeAssignedPortPoints.get(n.capacityMeshNodeId)??[];o.length>0&&e.push({capacityMeshNodeId:n.capacityMeshNodeId,center:n.center,width:n.width,height:n.height,portPoints:o,availableZ:n.availableZ})}return e}findHighestPfNode(){let e=null,n=0;for(const[o,i]of this.nodePfMap.entries())i*(1-(this.attemptsToFixNode.get(o)??0)/this.MAX_ATTEMPTS_PER_NODE)**2>n&&(n=i,e=o);return!e||n<this.ACCEPTABLE_PF?null:e}currentSectionCutPathInfo=new Map;currentSectionKeptPortPoints=new Map;currentSectionFixedRoutes=[];determineConnectionsToRip(e,n){const o=31337*this.sectionAttempts,i=Lft(o);if(this.FRACTION_TO_REPLACE>=1)return new Set(n);const r=(function(A,c){const l=Lft(c),u=[...A];for(let g=u.length-1;g>0;g--){const h=Math.floor(l()*(g+1));[u[g],u[h]]=[u[h],u[g]]}return u})(n,o),s=Math.max(1,Math.ceil(r.length*this.FRACTION_TO_REPLACE)),a=new Set(r.slice(0,s));if(this.ALWAYS_RIP_INTERSECTIONS){const A=(function(c){const{section:l,nodePfMap:u,capacityMeshNodeMap:g,nodeAssignedPortPoints:h,acceptablePf:d}=c,p=[];for(const m of l.nodeIds){if((u.get(m)??0)<=d)continue;const _=g.get(m);if(!_)continue;const f=h.get(m)??[];if(f.length<2)continue;const I=_.center.x-_.width/2,C=_.center.x+_.width/2,y=_.center.y-_.height/2,x=_.center.y+_.height/2,E=new Map;for(const Q of f){const w=E.get(Q.connectionName)??[];w.some(M=>M.x===Q.x&&M.y===Q.y&&M.z===Q.z)||w.push({x:Q.x,y:Q.y,z:Q.z}),E.set(Q.connectionName,w)}const B=new Map;for(const[Q,w]of E){if(w.length<2)continue;const M=w[0],k=w[1];if(M.z!==k.z)continue;const R=Rft(M,I,C,y,x),F=Rft(k,I,C,y,x),O=M.z,U=B.get(O)??[];U.push({connectionName:Q,t1:R,t2:F}),B.set(O,U)}const S=1e-6;for(const[,Q]of B){const w=Q.map(M=>({connectionName:M.connectionName,a:Math.min(M.t1,M.t2),b:Math.max(M.t1,M.t2)}));for(let M=0;M<w.length;M++){const{connectionName:k,a:R,b:F}=w[M];for(let O=M+1;O<w.length;O++){const{connectionName:U,a:Y,b:W}=w[O];Math.abs(R-Y)<S||Math.abs(R-W)<S||Math.abs(F-Y)<S||Math.abs(F-W)<S||(R<Y&&Y<F&&F<W||Y<R&&R<W&&W<F)&&p.push([k,U])}}}}return p})({section:e,nodePfMap:this.nodePfMap,capacityMeshNodeMap:this.capacityMeshNodeMap,nodeAssignedPortPoints:this.nodeAssignedPortPoints,acceptablePf:this.ACCEPTABLE_PF});for(const[c,l]of A){if(a.has(c)||a.has(l))continue;const u=n.includes(c),g=n.includes(l);if(u&&g){const h=i()<.5;a.add(h?c:l)}else u?a.add(c):g&&a.add(l)}}return this.stats.lastRipCount=a.size,a}createSectionSimpleRouteJson(e){const n=[];this.currentSectionCutPathInfo.clear(),this.currentSectionKeptPortPoints.clear(),this.currentSectionFixedRoutes=[];const o=[],i=[];for(const A of this.connectionResults){if(!A.path||A.path.length===0)continue;const[c,l]=A.nodeIds,u=e.nodeIds.has(c),g=e.nodeIds.has(l);u&&g&&(i.push(A),o.push(A.connection.name))}const r=[];for(const A of e.sectionPaths){if(!A.hasEntryFromOutside&&!A.hasExitToOutside||A.points.length<2)continue;const c=this.connectionResults.find(l=>l.connection.name===A.connectionName);c&&(r.push({sectionPath:A,originalResult:c}),o.includes(A.connectionName)||o.push(A.connectionName))}const s=this.determineConnectionsToRip(e,o);for(const A of i)s.has(A.connection.name)&&n.push(A.connection);for(const{sectionPath:A,originalResult:c}of r){if(!s.has(A.connectionName))continue;const l=`__cut__${A.connectionName}__${A.originalStartIndex}`;this.colorMap[l]=this.colorMap[A.connectionName];const u=A.points[0],g=A.points[A.points.length-1],h={name:l,__rootConnectionNames:[A.rootConnectionName??A.connectionName],pointsToConnect:[{x:u.x,y:u.y,layers:[`layer${u.z+1}`]},{x:g.x,y:g.y,layers:[`layer${g.z+1}`]}]};n.push(h),this.currentSectionCutPathInfo.set(l,{sectionPath:A,originalConnectionResult:c})}const a=new Set(o.filter(A=>!s.has(A)));if(a.size>0){for(const A of e.nodeIds){const c=(this.nodeAssignedPortPoints.get(A)??[]).filter(l=>a.has(l.connectionName));c.length>0&&this.currentSectionKeptPortPoints.set(A,c)}for(const A of i)a.has(A.connection.name)&&this.currentSectionFixedRoutes.push(A);for(const{sectionPath:A,originalResult:c}of r)if(a.has(A.connectionName)){const l={connection:{name:A.connectionName,__rootConnectionNames:A.rootConnectionName?[A.rootConnectionName]:void 0,pointsToConnect:c.connection.pointsToConnect},path:A.points.map(u=>({prevCandidate:null,portPoint:null,currentNodeId:u.nodeId,point:{x:u.x,y:u.y},z:u.z,f:0,g:0,h:0,distanceTraveled:0})),portPoints:A.points.map(u=>({portPointId:u.portPointId,x:u.x,y:u.y,z:u.z,connectionName:A.connectionName,rootConnectionName:A.rootConnectionName})),nodeIds:c.nodeIds,straightLineDistance:c.straightLineDistance};this.currentSectionFixedRoutes.push(l)}}return{...this.simpleRouteJson,connections:n}}prepareSectionInputNodesForCutPaths(e){const n=new Set;for(const[,o]of this.currentSectionCutPathInfo.entries()){const{sectionPath:i}=o;if(i.points.length===0)continue;const r=i.points[0].nodeId;n.add(r);const s=i.points[i.points.length-1].nodeId;n.add(s)}return e.inputNodes.map(o=>n.has(o.capacityMeshNodeId)?{...o,_containsTarget:!0}:o)}getHyperParametersForScheduleIndex(e,n){const o=this.HYPERPARAMETER_SCHEDULE[e];return{...o,SHUFFLE_SEED:(o.SHUFFLE_SEED??0)+17*n}}createSectionSolver(e){const n=this.createSectionSimpleRouteJson(e),o=this.prepareSectionInputNodesForCutPaths(e),i=Mft(n,o);for(const[r,s]of this.currentSectionKeptPortPoints){const a=i.nodeAssignedPortPoints.get(r)??[];i.nodeAssignedPortPoints.set(r,[...a,...s])}return new z7e({simpleRouteJson:n,inputNodes:o,capacityMeshNodes:e.capacityMeshNodes,colorMap:this.colorMap,nodeMemoryPfMap:this.nodePfMap,numShuffleSeeds:this.SHUFFLE_SEEDS_PER_SECTION??2*n.connections.length*this.effort,hyperParameters:{...this.getHyperParametersForScheduleIndex(this.currentScheduleIndex,this.sectionAttempts)},precomputedInitialParams:i,fixedRoutes:this.currentSectionFixedRoutes})}reattachSection(e,n,o,i){const r=[],s=[];for(const A of n)A.connection.name.startsWith("__cut__")?s.push(A):r.push(A);const a=new Set(r.map(A=>A.connection.name));this.connectionResults=this.connectionResults.filter(A=>!a.has(A.connection.name)),this.connectionResults.push(...r);for(const[A,c]of this.nodeAssignedPortPoints.entries()){if(!e.nodeIds.has(A))continue;const l=c.filter(u=>!a.has(u.connectionName));this.nodeAssignedPortPoints.set(A,l)}for(const[A,c]of this.assignedPortPoints.entries())a.has(c.connectionName)&&this.assignedPortPoints.delete(A);for(const A of s){const c=this.currentSectionCutPathInfo.get(A.connection.name);if(!c||!A.path)continue;const{sectionPath:l,originalConnectionResult:u}=c,g=u.path;if(!g)continue;const h=l.connectionName;for(const[f,I]of this.nodeAssignedPortPoints.entries()){const C=I.filter(y=>y.connectionName!==h||!e.nodeIds.has(f));this.nodeAssignedPortPoints.set(f,C)}const d=g.slice(0,l.originalStartIndex),p=g.slice(l.originalEndIndex+1),m=[];let _=d.length>0?d[d.length-1]:null;for(const f of A.path){const I={...f,prevCandidate:_};m.push(I),_=I}if(p.length>0&&m.length>0&&(p[0]={...p[0],prevCandidate:m[m.length-1]}),u.path=[...d,...m,...p],A.portPoints)for(const f of A.portPoints){const I={...f,connectionName:h,rootConnectionName:l.rootConnectionName??h};for(const C of e.inputNodes)for(const y of C.portPoints)if(Math.abs(y.x-f.x)<.001&&Math.abs(y.y-f.y)<.001&&y.z===f.z){for(const x of y.connectionNodeIds){const E=this.nodeAssignedPortPoints.get(x)??[];E.push(I),this.nodeAssignedPortPoints.set(x,E)}break}}}for(const[A,c]of o.entries())c.connectionName.startsWith("__cut__")||this.assignedPortPoints.set(A,c);for(const[A,c]of i.entries()){const l=c.filter(u=>!u.connectionName.startsWith("__cut__"));if(l.length>0){const u=this.nodeAssignedPortPoints.get(A)??[];this.nodeAssignedPortPoints.set(A,[...u,...l])}}}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved||this.activeSubSolver.failed){if(this.activeSubSolver.failed){if(this.currentScheduleIndex++,this.activeSubSolver.error&&this.stats.errors++,this.currentScheduleIndex<this.HYPERPARAMETER_SCHEDULE.length&&this.currentSectionCenterNodeId){const l=this.HYPERPARAMETER_SCHEDULE[this.currentScheduleIndex];this.currentSection=this.createSection({centerOfSectionCapacityNodeId:this.currentSectionCenterNodeId,expansionDegrees:l.EXPANSION_DEGREES}),this.activeSubSolver=this.createSectionSolver(this.currentSection)}else this.stats.failedOptimizations++,this.activeSubSolver=null,this.currentSection=null,this.currentSectionCenterNodeId=null,this.currentScheduleIndex=0;return}const i=this.activeSubSolver.getNodesWithPortPoints().map(l=>({...l,portPoints:l.portPoints.map(u=>{if(u.connectionName.startsWith("__cut__")){const g=u.connectionName.slice(7),h=g.lastIndexOf("__"),d=h>=0?g.slice(0,h):g;return{...u,connectionName:d}}return u})})),r=new Set;for(const l of i)for(const u of l.portPoints)r.add(u.connectionName);const s=this.getSectionNodesWithPortPoints(this.currentSection).map(l=>({...l,portPoints:l.portPoints.filter(u=>r.has(u.connectionName))})).filter(l=>l.portPoints.length>0),a=this.computeScoreForNodes(s),A=this.computeScoreForNodes(i),c=`attempt${this.sectionAttempts}`;if(this.stats.lastSectionScore=A,A>a){const l=this.stats.currentBoardScore;this.stats.lastBoardScore=l;const u=[...this.connectionResults],g=new Map(this.assignedPortPoints),h=new Map(Array.from(this.nodeAssignedPortPoints.entries()).map(([p,m])=>[p,[...m]]));this.reattachSection(this.currentSection,this.activeSubSolver.connectionsWithResults,this.activeSubSolver.assignedPortPoints,this.activeSubSolver.nodeAssignedPortPoints),this.recomputePfForNodes(this.currentSection.nodeIds);const d=this.computeBoardScore();this.stats.sectionScores[c]=d,d>l?(this.stats.successfulOptimizations++,this.stats.currentBoardScore=d):(this.connectionResults=u,this.assignedPortPoints=g,this.nodeAssignedPortPoints=h,this.recomputePfForNodes(this.currentSection.nodeIds),this.stats.failedOptimizations++),this.activeSubSolver=null,this.currentSection=null,this.currentSectionCenterNodeId=null,this.currentScheduleIndex=0}else if(this.currentScheduleIndex++,this.currentScheduleIndex<this.HYPERPARAMETER_SCHEDULE.length&&this.currentSectionCenterNodeId){const l=this.HYPERPARAMETER_SCHEDULE[this.currentScheduleIndex];this.currentSection=this.createSection({centerOfSectionCapacityNodeId:this.currentSectionCenterNodeId,expansionDegrees:l.EXPANSION_DEGREES}),this.activeSubSolver=this.createSectionSolver(this.currentSection)}else this.stats.failedOptimizations++,this.activeSubSolver=null,this.currentSection=null,this.currentSectionCenterNodeId=null,this.currentScheduleIndex=0}return}if(this.sectionAttempts>=this.MAX_SECTION_ATTEMPTS)return void(this.solved=!0);const e=this.findHighestPfNode();if(!e)return void(this.solved=!0);this.sectionAttempts++,this.stats.sectionAttempts=this.sectionAttempts,this.stats.nodesExamined++,this.attemptsToFixNode.set(e,(this.attemptsToFixNode.get(e)??0)+1),this.currentSectionCenterNodeId=e,this.currentScheduleIndex=0;const n=this.HYPERPARAMETER_SCHEDULE[this.currentScheduleIndex];this.currentSection=this.createSection({centerOfSectionCapacityNodeId:e,expansionDegrees:n.EXPANSION_DEGREES});const o=this.getSectionNodesWithPortPoints(this.currentSection);if(this.sectionScoreBeforeOptimization=this.computeScoreForNodes(o),this.createSectionSimpleRouteJson(this.currentSection).connections.length===0)return this.currentSection=null,void(this.currentSectionCenterNodeId=null);this.activeSubSolver=this.createSectionSolver(this.currentSection)}computeProgress(){return this.sectionAttempts/this.MAX_SECTION_ATTEMPTS}visualize(){return this.solved?V7e(this):this.activeSubSolver?this.activeSubSolver.visualize():this.currentSection?(function(e,n){const o={lines:[],points:[],rects:[],circles:[]};for(const i of e.inputNodes){const r=i.capacityMeshNodeId===e.centerNodeId,s=r?"rgba(0, 200, 0, 0.3)":"rgba(200, 200, 200, 0.3)";o.rects.push({center:i.center,width:.9*i.width,height:.9*i.height,layer:`z${i.availableZ.join(",")}`,fill:s,label:`${i.capacityMeshNodeId}${r?" (CENTER)":""}`})}for(const i of e.inputNodes)for(const r of i.portPoints)o.circles.push({center:{x:r.x,y:r.y},radius:.05,fill:"rgba(150, 150, 150, 0.5)",layer:`z${r.z}`,label:[r.portPointId,`cd: ${r.distToCentermostPortOnZ}`,`connects: ${r.connectionNodeIds.join(",")}`].filter(Boolean).join(`
`)});for(const i of e.sectionPaths){const r=n?.[i.connectionName]??"blue";for(let s=0;s<i.points.length-1;s++){const a=i.points[s],A=i.points[s+1],c=a.z===A.z,l=a.z;let u;u=c?l===0?"5 5":"10 5":"3 3 10",o.lines.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:r,strokeDash:u})}}return o})(this.currentSection,this.colorMap):V7e(this)}},Hft=class{parent={};constructor(e){for(const n of e)this.parent[n]=n}find(e){return this.parent[e]===e?e:this.parent[e]=this.find(this.parent[e])}union(e,n){const o=this.find(e),i=this.find(n);o!==i&&(this.parent[i]=o)}getGroup(e){const n=this.find(e),o=[];for(const i in this.parent)this.find(i)===n&&o.push(i);return o}},oZn=class{point;left=null;right=null;constructor(e){this.point=e}},iZn=class{root=null;constructor(e){e.length>0&&(this.root=this.buildTree(e,0))}buildTree(e,n){const o=n%2==0?"x":"y";e.sort((s,a)=>s[o]-a[o]);const i=Math.floor(e.length/2),r=new oZn(e[i]);return i>0&&(r.left=this.buildTree(e.slice(0,i),n+1)),i<e.length-1&&(r.right=this.buildTree(e.slice(i+1),n+1)),r}findNearestNeighbor(e){if(!this.root)throw new Error("Tree is empty");const n=this.root.point,o=this.distance(e,n);return this.nearestNeighborSearch(this.root,e,0,n,o),n}nearestNeighborSearch(e,n,o,i,r){if(!e)return i;const s=o%2?"x":"y",a=this.distance(n,e.point);a<r&&(i=e.point,r=a);const A=n[s]-e.point[s],c=A<=0?e.left:e.right,l=A<=0?e.right:e.left;return i=this.nearestNeighborSearch(c,n,o+1,i,r),r=this.distance(n,i),Math.abs(A)<r&&(i=this.nearestNeighborSearch(l,n,o+1,i,r)),i}findKNearestNeighbors(e,n){if(!this.root)return[];const o=[];return this.kNearestNeighborSearch(this.root,e,0,o,n),o.sort((i,r)=>i.distance-r.distance).slice(0,n).map(i=>i.point)}kNearestNeighborSearch(e,n,o,i,r){if(!e)return;const s=o%2?"x":"y",a=this.distance(n,e.point);i.push({point:e.point,distance:a});const A=n[s]-e.point[s],c=A<=0?e.left:e.right,l=A<=0?e.right:e.left;this.kNearestNeighborSearch(c,n,o+1,i,r);let u=1/0;i.length>=r&&(i.sort((g,h)=>g.distance-h.distance),u=i[r-1]?.distance||1/0),(Math.abs(A)<u||i.length<r)&&this.kNearestNeighborSearch(l,n,o+1,i,r)}distance(e,n){return Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2)}},rZn=class{parent=new Map;rank=new Map;constructor(e){for(const n of e){const o=this.pointToKey(n);this.parent.set(o,o),this.rank.set(o,0)}}pointToKey(e){return`${e.x},${e.y}`}find(e){const n=this.pointToKey(e);if(!this.parent.has(n))throw new Error(`Point ${n} not found in DisjointSet`);let o=n;for(;o!==this.parent.get(o);)o=this.parent.get(o);let i=n;for(;i!==o;){const r=this.parent.get(i);this.parent.set(i,o),i=r}return o}union(e,n){const o=this.find(e),i=this.find(n);if(o===i)return!1;const r=this.rank.get(o)||0,s=this.rank.get(i)||0;return r<s?this.parent.set(o,i):r>s?this.parent.set(i,o):(this.parent.set(i,o),this.rank.set(o,r+1)),!0}};function Oft(t,e={}){if(t.length<=1)return[];const n=[...t],o=new iZn(n),i=[],r=Math.min(10,t.length-1);for(const A of n){const c=o.findKNearestNeighbors(A,r+1);for(const l of c){if(A.x===l.x&&A.y===l.y)continue;const u=Math.sqrt((A.x-l.x)**2+(A.y-l.y)**2);i.push({from:A,to:l,weight:u})}}e.extraEdges&&i.push(...e.extraEdges),i.sort((A,c)=>A.weight-c.weight);const s=new rZn(n),a=[];for(const A of i)if(s.union(A.from,A.to)&&(a.push(A),a.length===n.length-1))break;return a}var sZn=(t,e)=>{const n=new Map;for(const i of t.pointsToConnect){if(!i.pointId)continue;const r=e.getNetConnectedToId(i.pointId);if(!r)continue;const s=n.get(r)??[];s.push(i),n.set(r,s)}const o=[];for(const i of n.values()){const r=i[0];if(r)for(const s of i.slice(1))o.push({from:r,to:s,weight:0})}return o},Gft=(t,e)=>({zeroWeightEdges:sZn(t,e),arePointsConnected:(n,o)=>!!(n.pointId&&o.pointId&&((i,r,s)=>{const a=i.getNetConnectedToId(r);return!!a&&a===i.getNetConnectedToId(s)})(e,n.pointId,o.pointId))});function iae(t){if(t.pointId)return t.pointId;let e="";return ND(t)?e=t.layer:E7e(t)&&t.layers&&(e=t.layers.sort().join("-")),`${t.x.toFixed(4)},${t.y.toFixed(4)},${e}`}function Yft(t){if(t.length===0)return[];const e=t.map((s,a)=>`conn_${a}`),n=new Hft(e),o=new Map;t.forEach((s,a)=>{const A=`conn_${a}`;s.pointsToConnect.forEach(c=>{const l=iae(c);o.has(l)||o.set(l,[]),o.get(l).push(A)})});for(const s of o.values())if(s.length>1){const a=s[0];for(let A=1;A<s.length;A++)n.union(a,s[A])}const i=new Map;t.forEach((s,a)=>{const A=`conn_${a}`,c=n.find(A);i.has(c)||i.set(c,[]),i.get(c).push(s)});const r=[];for(const s of i.values()){if(s.length===1){r.push(s[0]);continue}const a=new Map,A=new Set;let c=!1;const l=[],u=new Set;let g;s.forEach(d=>{d.pointsToConnect.forEach(m=>a.set(iae(m),m));const p=d.__rootConnectionNames;if(p&&p.length>0)for(const m of p)A.add(m);else A.add(d.name);d.isOffBoard&&(c=!0),d.externallyConnectedPointIds&&l.push(...d.externallyConnectedPointIds),d.__netConnectionName&&u.add(d.__netConnectionName),g===void 0&&d.nominalTraceWidth!==void 0&&(g=d.nominalTraceWidth)});const h={name:s.map(d=>d.name).join("__"),pointsToConnect:Array.from(a.values()),isOffBoard:c,externallyConnectedPointIds:l.length>0?l:void 0,__netConnectionName:u.size>0?Array.from(u).join("__"):void 0,__rootConnectionNames:Array.from(A),nominalTraceWidth:g};r.push(h)}return r}var J7e=class extends yr{constructor(e,n={},o){super(),this.ogSrj=e,this.colorMap=n;const i=new Map;for(const s of e.buses??[])if(s.traceWidth!==void 0)for(const a of s.connectionNames)i.set(a,Math.max(i.get(a)??0,s.traceWidth));const r=e.connections.map(s=>{const a=i.get(s.name);return a===void 0?s:{...s,nominalTraceWidth:Math.max(s.nominalTraceWidth??0,a)}});this.unprocessedConnections=Yft(r),this.newConnections=[],this.initiallyConnectedMap=o}ogSrj;colorMap;getSolverName(){return"NetToPointPairsSolver"}unprocessedConnections;newConnections;initiallyConnectedMap;_step(){if(this.unprocessedConnections.length===0)return void(this.solved=!0);const e=this.unprocessedConnections.pop(),{zeroWeightEdges:n,arePointsConnected:o}=Gft(e,this.initiallyConnectedMap);if(e.pointsToConnect.length===2){const[s,a]=e.pointsToConnect;return s&&a&&o(s,a)?void 0:void this.newConnections.push({...e,__rootConnectionNames:e.__rootConnectionNames??[e.name]})}const i=Oft(e.pointsToConnect,{extraEdges:n});let r=0;for(const s of i)o(s.from,s.to)||this.newConnections.push({...e,pointsToConnect:[s.from,s.to],name:`${e.name}_mst${r++}`,__rootConnectionNames:e.__rootConnectionNames??[e.name],__netConnectionName:e.__netConnectionName})}getNewSimpleRouteJson(){return{...structuredClone(this.ogSrj),connections:structuredClone(this.newConnections)}}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"Net To Point Pairs Visualization"};return this.unprocessedConnections.forEach(n=>{n.pointsToConnect.forEach(s=>{e.points.push({x:s.x,y:s.y,color:"red",label:s.pcb_port_id??s.pointId})});const o=n.pointsToConnect.length**2,i=M7e(0),r=new Set;for(let s=0;s<Math.max(o,2*n.pointsToConnect.length);s++){const a=Math.floor(i()*n.pointsToConnect.length),A=Math.floor(i()*n.pointsToConnect.length);r.has(`${a}-${A}`)||(r.add(`${a}-${A}`),e.lines.push({points:[n.pointsToConnect[a],n.pointsToConnect[A]],strokeColor:"rgba(255,0,0,0.25)",label:n.name}))}}),this.newConnections.forEach(n=>{const o=this.colorMap?.[n.name]||"blue";n.pointsToConnect.forEach(i=>{e.points.push({x:i.x,y:i.y,color:o,label:i.pcb_port_id??i.pointId})});for(let i=0;i<n.pointsToConnect.length-1;i++)for(let r=i+1;r<n.pointsToConnect.length;r++)e.lines.push({points:[n.pointsToConnect[i],n.pointsToConnect[r]],strokeColor:o,label:n.name})}),e}},rL=class extends J7e{constructor(e,n={},o){const i=e.connections.flatMap(c=>c.pointsToConnect),r=new Map;for(const c of i)c.pointId&&r.set(c.pointId,c);const s=i.map(c=>c.pointId).filter(c=>!!c),a=new Hft(s),A=[];for(const c of e.connections)c.isOffBoard?c.pointsToConnect.length>=2&&c.pointsToConnect[0].pointId&&c.pointsToConnect[1].pointId&&a.union(c.pointsToConnect[0].pointId,c.pointsToConnect[1].pointId):A.push(c);super({...e,connections:A},n,o),this.ogSrj=e,this.colorMap=n,this.connectionPointDsu=a,this.connectionPointMap=r,this.ogSrj=e}ogSrj;colorMap;getSolverName(){return"NetToPointPairsSolver2_OffBoardConnection"}connectionPointDsu;connectionPointMap;_findBestConnectionPointsFromDisjointSets(e,n){if(!e.pointId||!n.pointId)return{pointsToConnect:[e,n]};const o=this.connectionPointDsu.getGroup(e.pointId).map(A=>this.connectionPointMap.get(A)),i=this.connectionPointDsu.getGroup(n.pointId).map(A=>this.connectionPointMap.get(A));let r=e,s=n,a=1/0;for(const A of o)for(const c of i){const l=Math.sqrt(Math.pow(A.x-c.x,2)+Math.pow(A.y-c.y,2));l<a&&(a=l,r=A,s=c)}return{pointsToConnect:[r,s]}}_step(){if(this.unprocessedConnections.length===0)return void(this.solved=!0);const e=this.unprocessedConnections.pop(),{zeroWeightEdges:n,arePointsConnected:o}=Gft(e,this.initiallyConnectedMap);if(e.pointsToConnect.length===2){const[s,a]=e.pointsToConnect;if(s&&a&&o(s,a))return;const A=this._findBestConnectionPointsFromDisjointSets(e.pointsToConnect[0],e.pointsToConnect[1]);return void this.newConnections.push({...e,pointsToConnect:A.pointsToConnect,__rootConnectionNames:e.__rootConnectionNames??[e.name]})}const i=Oft(e.pointsToConnect,{extraEdges:n});let r=0;for(const s of i){if(o(s.from,s.to))continue;const a=this._findBestConnectionPointsFromDisjointSets(s.from,s.to);this.newConnections.push({...e,pointsToConnect:a.pointsToConnect,name:`${e.name}_mst${r++}`,__rootConnectionNames:e.__rootConnectionNames??[e.name],__netConnectionName:e.__netConnectionName})}}},W7e=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s&&o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){const s=this.netMap[i],a=this.netMap[r];if(s&&a){s.push(...a),this.netMap[r]=s;for(const A of s)this.idToNetMap[A]=i}}}for(const r of n){const s=this.netMap[i];s&&!s.includes(r)&&s.push(r),this.idToNetMap[r]=i}}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return!!i&&(o===i||i===e||i===e)}areAllIdsConnected(e){if(e.length===0)return!0;const n=this.getNetConnectedToId(e[0]);if(!n)return!1;for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}};function aZn(t,e={}){const n=[],o=[],i=e.color??"gray",r=e.label,s=W8[t.footprint]??W8["0603"],a=t.end.x-t.start.x,A=t.end.y-t.start.y,c=Math.abs(a)>Math.abs(A),l=c?s.padLength:s.padWidth,u=c?s.padWidth:s.padLength;return n.push({center:t.start,width:l,height:u,fill:Es(i,.5),stroke:"rgba(0, 0, 0, 0.5)",layer:"jumper",label:r?`${r} (start)`:void 0}),n.push({center:t.end,width:l,height:u,fill:Es(i,.5),stroke:"rgba(0, 0, 0, 0.5)",layer:"jumper",label:r?`${r} (end)`:void 0}),o.push({points:[t.start,t.end],strokeColor:"rgba(100, 100, 100, 0.8)",strokeWidth:.3*s.padWidth,layer:"jumper-body"}),{rects:n,lines:o}}function _x(t,e={}){const n={rects:[],lines:[]};for(const o of t){const{rects:i,lines:r}=aZn(o,e);n.rects.push(...i),n.lines.push(...r)}return n}var rae=1e5,Wz=.001,Uft=class extends yr{getSolverName(){return"SingleHighDensityRouteStitchSolver"}mergedHdRoute;remainingHdRoutes;start;end;colorMap;constructor(e){if(super(),this.remainingHdRoutes=[...e.hdRoutes],this.colorMap=e.colorMap??{},e.hdRoutes.length===0){this.start=e.start,this.end=e.end;const A=[{x:e.start.x,y:e.start.y,z:e.start.z}],c=[];return e.start.z!==e.end.z&&(A.push({x:e.start.x,y:e.start.y,z:e.end.z}),c.push({x:e.start.x,y:e.start.y})),A.push({x:e.end.x,y:e.end.y,z:e.end.z}),this.mergedHdRoute={connectionName:e.connectionName,rootConnectionName:e.hdRoutes[0]?.rootConnectionName,route:A,vias:c,jumpers:[],viaDiameter:e.defaultViaDiameter??.3,traceThickness:e.defaultTraceThickness??.15},void(this.solved=!0)}let n=1/0,o=e.hdRoutes[0],i="start-to-end";for(const A of e.hdRoutes){const c=A.route[0],l=A.route[A.route.length-1],u=no(e.start,c),g=no(e.start,l),h=no(e.end,c),d=no(e.end,l),p=Math.min(u,g,h,d);p<n&&(n=p,o=A,i=Math.min(h,d)<Math.min(u,g)?"end-to-start":"start-to-end")}i==="start-to-end"?(this.start=e.start,this.end=e.end):(this.start=e.end,this.end=e.start);const r=o.route[0],s=o.route[o.route.length-1],a=no(this.start,r)<=no(this.start,s)?r:s;this.mergedHdRoute={connectionName:e.connectionName,rootConnectionName:o.rootConnectionName,route:[{x:this.start.x,y:this.start.y,z:a.z}],vias:[],jumpers:[],viaDiameter:o.viaDiameter,traceThickness:o.traceThickness}}getDisjointedRoute(){for(const e of this.remainingHdRoutes)if([e.route[0],e.route[e.route.length-1]].some(n=>!this.remainingHdRoutes.some(o=>o===e?!1:[o.route[0],o.route[o.route.length-1]].some(i=>i.z===n.z&&no(n,i)<.001))))return{firstRoute:e};return{firstRoute:this.remainingHdRoutes[0]}}_step(){if(this.remainingHdRoutes.length===0){const a=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1];return this.mergedHdRoute.route.push({x:this.end.x,y:this.end.y,z:a.z}),void(this.solved=!0)}const e=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1];let n=-1,o="first",i=1/0;for(let a=0;a<this.remainingHdRoutes.length;a++){const A=this.remainingHdRoutes[a],c=A.route[0],l=A.route[A.route.length-1],u=no(e,c),g=no(e,l);let h=1/0;h=e.z===c.z?u<Wz?u:rae+u:u<Wz?1e3+u:rae+u,h<i&&(i=h,n=a,o="first");let d=1/0;d=e.z===l.z?g<Wz?g:rae+g:g<Wz?1e3+g:rae+g,d<i&&(i=d,n=a,o="last")}if(n===-1)return void(this.remainingHdRoutes=[]);const r=this.remainingHdRoutes[n];let s;this.remainingHdRoutes.splice(n,1),s=o==="first"?r.route:[...r.route].reverse(),no(e,s[0])<Wz&&e.z===s[0].z?this.mergedHdRoute.route.push(...s.slice(1)):this.mergedHdRoute.route.push(...s),this.mergedHdRoute.vias.push(...r.vias),r.jumpers&&this.mergedHdRoute.jumpers.push(...r.jumpers)}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:"Single High Density Route Stitch Solver"};if(e.points?.push({x:this.start.x,y:this.start.y,color:"green",label:"Start"},{x:this.end.x,y:this.end.y,color:"red",label:"End"}),this.mergedHdRoute&&this.mergedHdRoute.route.length>1){e.lines?.push({points:this.mergedHdRoute.route.map(n=>({x:n.x,y:n.y})),strokeColor:"green"});for(const n of this.mergedHdRoute.route)e.points?.push({x:n.x,y:n.y,color:"green"});for(const n of this.mergedHdRoute.vias)e.circles?.push({center:{x:n.x,y:n.y},radius:this.mergedHdRoute.viaDiameter/2,fill:"green"});if(this.mergedHdRoute.jumpers&&this.mergedHdRoute.jumpers.length>0){const n=_x(this.mergedHdRoute.jumpers,{color:"green",label:this.mergedHdRoute.connectionName});e.rects.push(...n.rects??[]),e.lines.push(...n.lines??[])}}for(const[n,o]of this.remainingHdRoutes.entries()){const i=this.colorMap[o.connectionName]??"gray";e.lines?.push({points:o.route.map(r=>({x:r.x,y:r.y})),strokeColor:i});for(let r=0;r<o.route.length;r++){const s=o.route[r];e.points?.push({x:s.x+(n%2-.5)/500+(r%8-4)/1e3,y:s.y+(n%2-.5)/500+(r%8-4)/1e3,color:i,label:`Route ${o.connectionName} ${s===o.route[0]?"First":s===o.route[o.route.length-1]?"Last":""}`})}for(const r of o.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:o.viaDiameter/2,fill:i});if(o.jumpers&&o.jumpers.length>0){const r=_x(o.jumpers,{color:i,label:o.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}return e}},sL=t=>`${Math.round(100*t.x)},${Math.round(100*t.y)},${Math.round(100*t.z)}`,AZn=t=>({startHash:sL(t.route[0]),endHash:sL(t.route[t.route.length-1])}),j7e=class extends yr{getSolverName(){return"MultipleHighDensityRouteStitchSolver"}unsolvedRoutes;activeSolver=null;mergedHdRoutes=[];colorMap={};defaultTraceThickness;defaultViaDiameter;getClosestEndpointHash(e,n){let o=null,i=1/0;for(const r of e){const s=[r.route[0],r.route[r.route.length-1]];for(const a of s){const A=no(n,a);A<i&&(i=A,o=sL(a))}}return o}selectRoutesAlongEndpointPath(e,n,o){if(e.length<=2)return e;const i=this.getClosestEndpointHash(e,n),r=this.getClosestEndpointHash(e,o);if(!i||!r||i===r)return e;const s=new Map;for(let g=0;g<e.length;g++){const{startHash:h,endHash:d}=AZn(e[g]),p=s.get(h)??[];p.push({nextHash:d,routeIndex:g}),s.set(h,p);const m=s.get(d)??[];m.push({nextHash:h,routeIndex:g}),s.set(d,m)}const a=[i],A=new Set([i]),c=new Map;for(;a.length>0;){const g=a.shift();if(g===r)break;for(const h of s.get(g)??[])A.has(h.nextHash)||(A.add(h.nextHash),c.set(h.nextHash,{prevHash:g,routeIndex:h.routeIndex}),a.push(h.nextHash))}if(!A.has(r))return e;const l=new Set;let u=r;for(;u!==i;){const g=c.get(u);if(!g)return e;l.add(g.routeIndex),u=g.prevHash}return l.size===0?e:e.filter((g,h)=>l.has(h))}constructor(e){super(),this.colorMap=e.colorMap??{};const n=e.hdRoutes[0];this.defaultTraceThickness=n?.traceThickness??.15,this.defaultViaDiameter=n?.viaDiameter??e.defaultViaDiameter??.3;const o=new W7e({}),i=[],r=new Map;for(let A=0;A<e.hdRoutes.length;A++){const c=e.hdRoutes[A],l=c.route[0],u=c.route[c.route.length-1];i.push([`route_island_${A}`,`${c.connectionName}:${sL(l)}`,`${c.connectionName}:${sL(u)}`])}o.addConnections(i);for(const A of i)for(const c of A.slice(1))r.set(c,(r.get(c)??0)+1);this.unsolvedRoutes=[];const s=Array.from(new Set(Object.values(o.idToNetMap)));for(const A of s){const c=o.getIdsConnectedToNet(A),l=e.hdRoutes.filter((_,f)=>c.includes(`route_island_${f}`));if(l.length===0)continue;const u=e.connections.find(_=>_.name===l[0].connectionName),g=l.flatMap(_=>[_.route[0],_.route[_.route.length-1]]),h=[];for(const _ of g){const f=`${l[0].connectionName}:${sL(_)}`;r.get(f)===1&&h.push(_)}if(h.length===0){console.log("no possible endpoints, can't stitch");continue}let d,p;h.length!==2?(d={...u.pointsToConnect[0],z:Kr(tI(u.pointsToConnect[0]),e.layerCount)},p={...u.pointsToConnect[1],z:Kr(tI(u.pointsToConnect[1]),e.layerCount)}):(d=h[0],p=h[1],no(d,u.pointsToConnect[1])<no(p,u.pointsToConnect[0])&&([d,p]=[p,d]));const m=this.selectRoutesAlongEndpointPath(l,d,p);this.unsolvedRoutes.push({connectionName:l[0].connectionName,hdRoutes:m,start:d,end:p})}const a=new Map;for(const A of this.unsolvedRoutes){const c=a.get(A.connectionName);c?c.push(A):a.set(A.connectionName,[A])}this.unsolvedRoutes=Array.from(a.entries()).flatMap(([A,c])=>{if(!c.some(d=>d.hdRoutes.some(p=>p.route.length<2)))return c;const l=e.connections.find(d=>d.name===A);if(!l)return c;const u={...l.pointsToConnect[0],z:Kr(tI(l.pointsToConnect[0]),e.layerCount)},g={...l.pointsToConnect[1],z:Kr(tI(l.pointsToConnect[1]),e.layerCount)},h=c.flatMap(d=>d.hdRoutes);return[{connectionName:A,hdRoutes:this.selectRoutesAlongEndpointPath(h,u,g),start:u,end:g}]}),this.MAX_ITERATIONS=1e5}_step(){if(this.activeSolver)return this.activeSolver.step(),void(this.activeSolver.solved?(this.activeSolver instanceof Uft&&this.mergedHdRoutes.push(this.activeSolver.mergedHdRoute),this.activeSolver=null):this.activeSolver.failed&&(this.failed=!0,this.error=this.activeSolver.error));const e=this.unsolvedRoutes.pop();e?this.activeSolver=new Uft({connectionName:e.connectionName,hdRoutes:e.hdRoutes,start:e.start,end:e.end,colorMap:this.colorMap,defaultTraceThickness:this.defaultTraceThickness,defaultViaDiameter:this.defaultViaDiameter}):this.solved=!0}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:"Multiple High Density Route Stitch Solver"};if(this.activeSolver){const n=this.activeSolver.visualize();n.points?.length&&e.points?.push(...n.points),n.lines?.length&&e.lines?.push(...n.lines),n.circles?.length&&e.circles?.push(...n.circles),n.rects?.length&&(e.rects||(e.rects=[]),e.rects.push(...n.rects))}for(const[n,o]of this.mergedHdRoutes.entries()){const i=this.colorMap[o.connectionName]??`hsl(120, 100%, ${40+10*n%40}%)`;for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1],A=s.z!==0?Es(i,.5):i;e.lines?.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:A,strokeWidth:o.traceThickness})}for(const r of o.route){const s=r.z!==0?Es(i,.5):i;e.points?.push({x:r.x,y:r.y,color:s})}for(const r of o.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:o.viaDiameter/2,fill:i});if(o.jumpers&&o.jumpers.length>0){const r=_x(o.jumpers,{color:i,label:o.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}for(const n of this.unsolvedRoutes){const o=this.colorMap[n.connectionName]??"gray";e.points?.push({x:n.start.x,y:n.start.y,color:o,label:`${n.connectionName} Start (z=${n.start.z})`},{x:n.end.x,y:n.end.y,color:o,label:`${n.connectionName} End (z=${n.end.z})`}),e.lines?.push({points:[{x:n.start.x,y:n.start.y},{x:n.end.x,y:n.end.y}],strokeColor:o,strokeDash:"2 2"});for(const i of n.hdRoutes){i.route.length>1&&e.lines?.push({points:i.route.map(r=>({x:r.x,y:r.y})),strokeColor:Es(o,.5),strokeDash:"10 5"});for(const r of i.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:i.viaDiameter/2,fill:o});if(i.jumpers&&i.jumpers.length>0){const r=_x(i.jumpers,{color:o,label:i.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}}return e}},jz=class{tree;constructor(e=9){this.tree=new vz(e)}insert(e,n,o,i,r){this.tree.insert({minX:n,minY:o,maxX:i,maxY:r,data:e})}bulkLoad(e){const n=e.map(({item:o,minX:i,minY:r,maxX:s,maxY:a})=>({minX:i,minY:r,maxX:s,maxY:a,data:o}));this.tree.load(n)}search(e,n,o,i){return this.tree.search({minX:e,minY:n,maxX:o,maxY:i}).map(r=>r.data)}clear(){this.tree.clear()}},Kft=class{index;items=[];currentIndex=0;capacity;constructor(e){this.capacity=Math.max(1,e),this.index=new X4(this.capacity)}insert(e,n,o,i,r){if(this.currentIndex>=this.index.numItems)throw new Error("Exceeded initial capacity");this.items[this.currentIndex]=e,this.index.add(n,o,i,r),this.currentIndex++}finish(){this.index.finish()}search(e,n,o,i){return this.index.search(e,n,o,i).map(r=>this.items[r]||null).filter(Boolean)}clear(){this.items=[],this.currentIndex=0,this.index=new X4(this.capacity)}},OD=class{idx;storage=[];constructor(e="native",n=[]){e==="flatbush"?n.length===0?(this.idx=new jz,e="rbush"):this.idx=new Kft(n.length):this.idx=e==="rbush"?new jz:new class{shi=new cZn(n);insert(o){}search(o,i,r,s){const a=(o+r)/2,A=(i+s)/2,c=r-o,l=s-i;return this.shi.getNodesInArea(a,A,c,l)}clear(){}},n.forEach(o=>this.insert(o)),e==="flatbush"&&n.length>0&&this.idx.finish?.()}insert(e){this.storage.push(e),this.idx.insert(e,e.center.x-e.width/2,e.center.y-e.height/2,e.center.x+e.width/2,e.center.y+e.height/2)}search(e){return this.idx.search(e.minX,e.minY,e.maxX,e.maxY)}searchArea(e,n,o,i){return this.search({minX:e-o/2,minY:n-i/2,maxX:e+o/2,maxY:n+i/2})}},cZn=class{constructor(e){this.obstacles=e,this.buckets=new Map;for(let n=0;n<e.length;n++){const o=e[n],i=o.center.x-o.width/2,r=o.center.y-o.height/2,s=o.center.x+o.width/2,a=o.center.y+o.height/2;for(let A=i;A<=s;A+=this.CELL_SIZE)for(let c=r;c<=a;c+=this.CELL_SIZE){const l=this.getBucketKey(A,c),u=this.buckets.get(l);u?u.push([o,n]):this.buckets.set(l,[[o,n]])}}}obstacles;buckets;CELL_SIZE=.4;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getNodesInArea(e,n,o,i){const r=[],s=new Set,a=n-i/2,A=e+o/2,c=n+i/2;for(let l=e-o/2;l<=A;l+=this.CELL_SIZE)for(let u=a;u<=c;u+=this.CELL_SIZE){const g=this.getBucketKey(l,u),h=this.buckets.get(g)||[];for(const d of h)s.has(d[1])||(s.add(d[1]),r.push(d[0]))}return r}},Vft=(t,e)=>{const n=[],o=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y),r=e.x>t.x?1:-1,s=e.y>t.y?1:-1,a={x:e.x-r*Math.abs(e.y-t.y),y:t.y};(a.x-t.x)*r>=0&&(a.x-e.x)*r<=0&&n.push([t,a,e]);const A={x:t.x,y:e.y-s*Math.abs(e.x-t.x)};(A.y-t.y)*s>=0&&(A.y-e.y)*s<=0&&n.push([t,A,e]);const c=Math.min(o,i),l={x:t.x+r*c,y:t.y+s*c};return(l.x-t.x)*r>=0&&(l.x-e.x)*r<=0&&(l.y-t.y)*s>=0&&(l.y-e.y)*s<=0&&n.push([t,l,e]),n};function qQ(t,e,n,o){if(Uh(t,e,n,o))return 0;const i=sae(t,n,o),r=sae(e,n,o),s=sae(n,t,e),a=sae(o,t,e);return Math.min(i,r,s,a)}function sae(t,e,n){const o={x:n.x-e.x,y:n.y-e.y},i=zft({x:t.x-e.x,y:t.y-e.y},o);if(i<=0)return $7e(t,e);const r=zft(o,o);if(r<=i)return $7e(t,n);const s=i/r;return $7e(t,{x:e.x+s*o.x,y:e.y+s*o.y})}function zft(t,e){return t.x*e.x+t.y*e.y}function $7e(t,e){const n=e.x-t.x,o=e.y-t.y;return Math.sqrt(n*n+o*o)}var aae=1e-6,q7e=(t,e,n)=>wc(t,e,n)<=aae,Aae=(t,e)=>Math.abs(t.x-e.x)<=aae&&Math.abs(t.y-e.y)<=aae,X7e=(t,e)=>{if(!e||e.length<3)return!1;for(let o=0;o<e.length;o++){const i=e[o],r=e[(o+1)%e.length];if(q7e(t,i,r))return!0}let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o],s=e[i];r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},$z=({start:t,end:e,polygon:n,margin:o=.2})=>{if(!n||n.length<3)return!1;const i=X7e(t,n),r=X7e(e,n);if(!i||!r)return!0;for(let s=0;s<n.length;s++){const a=n[s],A=n[(s+1)%n.length],c=q7e(t,a,A),l=q7e(e,a,A);if(c&&l)continue;if(!Uh(t,e,a,A)){if(!c&&!l&&qQ(t,e,a,A)<o-aae)return!0;continue}const u=DD(t,e,a,A);if((!u||!(c&&Aae(u,t)||l&&Aae(u,e)))&&(!u||!Aae(u,t)&&!Aae(u,e)))return!0}return!1},qz=t=>{const e=[],n=t.route;if(n.length===0)return[];let o={startIndex:0,endIndex:-1,z:n[0].z,points:[n[0]]};for(let i=1;i<n.length;i++)n[i].z===o.z?o.points.push(n[i]):(o.endIndex=i-1,e.push(o),o={startIndex:i,endIndex:-1,z:n[i].z,points:[n[i]]});return o.endIndex=n.length-1,e.push(o),e},Jft=({endpointX:t,endpointY:e,targetZ:n,endpointPcbPortId:o,terminalLayerIndicesByPcbPortId:i,obstacleSHI:r,route:s,connMap:a})=>{const A=o?i?.get(o):void 0;if(A&&!A.has(n))return!1;const c=[s.connectionName,s.rootConnectionName].filter(u=>u!==void 0),l=r.searchArea(t,e,2,2).filter(u=>{if(!c.some(m=>u.connectedTo.some(_=>_===m||a.areIdsConnected(m,_))))return!1;const g=u.width/2+.05,h=u.height/2+.05,d=Math.abs(t-u.center.x)<=g,p=Math.abs(e-u.center.y)<=h;return d&&p});return l.length>0&&l.some(u=>u.__zLayers?.includes(n))},GD=({currentSection:t,targetZ:e,route:n,hdRouteSHI:o,obstacleSHI:i,connMap:r,defaultTraceThickness:s,obstacleMargin:a,traceMargin:A,shouldCheckStaticGeometryForSegment:c})=>{const l=n.traceThickness??s,u=A??0,g=[n.connectionName,n.rootConnectionName].filter(h=>h!==void 0);for(let h=0;h<t.points.length-1;h++){const d={...t.points[h],z:e},p={...t.points[h+1],z:e},m=o.getConflictingRoutesForSegment(d,p,l/2+u);for(const{conflictingRoute:C,distance:y}of m){const x=[C.connectionName,C.rootConnectionName].filter(B=>B!==void 0);if(g.some(B=>x.some(S=>S===B||r.areIdsConnected(S,B))))continue;const E=C.traceThickness??s;if(y<l/2+(u>0?Math.max(E/2,C.viaDiameter/2):E/2)+u)return!1}if(c?.(d,p)===!1)continue;const _={centerX:(d.x+p.x)/2,centerY:(d.y+p.y)/2,width:Math.abs(d.x-p.x),height:Math.abs(d.y-p.y)},f=l/2+a,I=i.searchArea(_.centerX,_.centerY,_.width+2*f,_.height+2*f);for(const C of I)if(!g.some(y=>C.connectedTo.some(x=>x===y||r.areIdsConnected(x,y)))&&!(C.__zLayers?.includes(e)&&(Math.abs(d.x-C.center.x)<.01&&Math.abs(d.y-C.center.y)<.01||Math.abs(p.x-C.center.x)<.01&&Math.abs(p.y-C.center.y)<.01))&&K8(d,p,C)<f)return!1}return!0},lZn=class extends yr{getSolverName(){return"SingleRouteUselessViaRemovalSolver"}obstacleSHI;hdRouteSHI;unsimplifiedRoute;connMap;outline;terminalLayerIndicesByPcbPortId;routeSections;currentSectionIndex;TRACE_THICKNESS=.15;OBSTACLE_MARGIN=.1;GEOMETRY_SHORTCUT_TRACE_MARGIN=.1;GEOMETRY_SHORTCUT_OBSTACLE_MARGIN=.15;MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH=4;ENABLE_GEOMETRY_SHORTCUTS=!0;ENABLE_OBSTACLE_DETOUR_SHORTCUTS=!1;PRESERVE_ROUTE_ENDPOINTS=!1;geometryShortcutsApplied=0;multilayerSectionsCollapsed=0;obstacleDetourCandidatesValidated=0;constructor(e){super(),this.currentSectionIndex=0,this.obstacleSHI=e.obstacleSHI,this.hdRouteSHI=e.hdRouteSHI,this.unsimplifiedRoute=e.unsimplifiedRoute,this.connMap=e.connMap,this.outline=e.outline,this.terminalLayerIndicesByPcbPortId=e.terminalLayerIndicesByPcbPortId,this.GEOMETRY_SHORTCUT_TRACE_MARGIN=e.geometryShortcutTraceMargin??this.GEOMETRY_SHORTCUT_TRACE_MARGIN,this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN=e.geometryShortcutObstacleMargin??this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,this.ENABLE_GEOMETRY_SHORTCUTS=e.enableGeometryShortcuts??!0,this.ENABLE_OBSTACLE_DETOUR_SHORTCUTS=e.enableObstacleDetourShortcuts??!1,this.PRESERVE_ROUTE_ENDPOINTS=e.preserveRouteEndpoints??!1,this.routeSections=qz(this.unsimplifiedRoute)}getPathLength(e){let n=0;for(let o=1;o<e.length;o++)n+=Math.hypot(e[o].x-e[o-1].x,e[o].y-e[o-1].y);return n}normalizeShortcutPath(e,n,o){const i=e.filter((r,s)=>{const a=e[s-1];return!a||r.x!==a.x||r.y!==a.y});return i.map((r,s)=>s===0?{...n}:s===i.length-1?{...o}:{x:r.x,y:r.y,z:n.z})}shortcutCrossesOutline(e){if(!this.outline||this.outline.length<3)return!1;for(let n=1;n<e.length;n++)if($z({start:e[n-1],end:e[n],polygon:this.outline}))return!0;return!1}getObstacleDetourPaths(e,n,o,i){const r=(this.unsimplifiedRoute.traceThickness??this.TRACE_THICKNESS)/2+this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN+1e-6,s=this.MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH/2+r,a=Math.min(e.x,n.x)-s,A=Math.max(e.x,n.x)+s,c=Math.min(e.y,n.y)-s,l=Math.max(e.y,n.y)+s,u=this.obstacleSHI.search({minX:a,minY:c,maxX:A,maxY:l}).filter(_=>_.__zLayers?.includes(o));if(u.length===0)return[];const g=new Set,h=new Set;for(const _ of u)g.add(_.center.x-_.width/2-r),g.add(_.center.x+_.width/2+r),h.add(_.center.y-_.height/2-r),h.add(_.center.y+_.height/2+r);const d=[],p=new Set,m=_=>{let f=0;for(let E=1;E<_.length;E++)f+=Math.hypot(_[E].x-_[E-1].x,_[E].y-_[E-1].y);if(f>i)return;const I=this.normalizeShortcutPath(_,e,n);let C=0,y=-1;for(let E=0;E<I.length-1;E++){const B=I[E+1].x-I[E].x,S=I[E+1].y-I[E].y,Q=B*B+S*S;Q>y&&(C=E,y=Q)}const x=I.map(E=>`${E.x}:${E.y}`).join("|");p.has(x)||(p.add(x),d.push({path:I,length:f,longestSegmentIndex:C}))};for(const _ of h)m([e,{x:e.x,y:_},{x:n.x,y:_},n]);for(const _ of g)m([e,{x:_,y:e.y},{x:_,y:n.y},n]);return d}getDirectGeometryShortcut(e,n,o){let i=null;for(let r=0;r<e.points.length;r++){const s=e.points[r];for(let a=0;a<o.points.length;a++){const A=o.points[a],c=[...e.points.slice(r),...n.points,...o.points.slice(0,a+1)];if(!c.some(l=>l.insideJumperPad||l.toNextSegmentType))for(const l of Vft(s,A)){const u=this.normalizeShortcutPath(l,s,A),g=this.getPathLength(c)-this.getPathLength(u);if(g<-1e-6||this.shortcutCrossesOutline(u))continue;const h={startIndex:e.startIndex+r,endIndex:o.startIndex+a,z:e.z,points:u};GD({currentSection:h,targetZ:e.z,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,traceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN})&&(!i||g>i.savedLength)&&(i={path:u,previousPointIndex:r,nextPointIndex:a,savedLength:g})}}}return i}getObstacleDetourShortcut(e,n,o){const i=e.points.length-1,r=[];for(let l=0;l<=i;l++)r.push([l,0]);for(let l=1;l<o.points.length;l++)r.push([i,l]);const s=[];for(const[l,u]of r){const g=e.points[l],h=o.points[u],d=[...e.points.slice(l),...n.points,...o.points.slice(0,u+1)];if(d.some(m=>m.insideJumperPad||m.toNextSegmentType))continue;const p=this.getPathLength(d);for(const{path:m,length:_,longestSegmentIndex:f}of this.getObstacleDetourPaths(g,h,e.z,p+this.MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH+1e-6)){const I=p-_;I<-this.MAX_GEOMETRY_SHORTCUT_ADDED_LENGTH-1e-6||s.push({path:m,previousPointIndex:l,nextPointIndex:u,savedLength:I,validationFirstSegmentIndex:f})}}s.sort((l,u)=>u.savedLength-l.savedLength);let a=0;const A=s.length>=256,c=(({targetZ:l,route:u,hdRouteSHI:g,obstacleSHI:h,connMap:d,defaultTraceThickness:p,obstacleMargin:m,traceMargin:_,useNumericSegmentKeys:f})=>{const I=u.traceThickness??p,C=I/2+_,y=I/2+m,x=u.connectionName,E=u.rootConnectionName,B=new Map,S=new WeakMap,Q=new WeakMap,w=f?new Map:void 0;let M=0;const k=O=>{let U=w.get(O.x);U||(U=new Map,w.set(O.x,U));let Y=U.get(O.y);return Y===void 0&&(Y=M++,U.set(O.y,Y)),Y},R=(O,U)=>{if(f){const Y=k(O),W=k(U),te=Math.max(Y,W);return te*(te+1)/2+Math.min(Y,W)}return O.x<U.x||O.x===U.x&&O.y<=U.y?`${O.x}:${O.y}|${U.x}:${U.y}`:`${U.x}:${U.y}|${O.x}:${O.y}`},F=O=>O===x||d.areIdsConnected(O,x)||E!==void 0&&(O===E||d.areIdsConnected(O,E));return(O,U)=>{const Y=O.length-1;for(let W=0;W<Y;W++){const te=W-1,j=U===0?W:W===0?U:te>=U?te+1:te,J=O[j],oe=O[j+1],ie=R(J,oe),ne=B.get(ie);if(ne!==void 0){if(!ne)return!1;continue}const le=J.z===l?J:{...J,z:l},ge=oe.z===l?oe:{...oe,z:l},_e={centerX:(le.x+ge.x)/2,centerY:(le.y+ge.y)/2,width:Math.abs(le.x-ge.x),height:Math.abs(le.y-ge.y)},ue=h.searchArea(_e.centerX,_e.centerY,_e.width+2*y,_e.height+2*y);for(const pe of ue){let ye=S.get(pe);if(ye===void 0&&(ye=pe.connectedTo.some(F),S.set(pe,ye)),!ye&&(!pe.__zLayers?.includes(l)||!(Math.abs(le.x-pe.center.x)<.01&&Math.abs(le.y-pe.center.y)<.01||Math.abs(ge.x-pe.center.x)<.01&&Math.abs(ge.y-pe.center.y)<.01))&&K8(le,ge,pe)<y)return B.set(ie,!1),!1}const fe=g.getConflictingRoutesForSegment(le,ge,C);for(const{conflictingRoute:pe,distance:ye}of fe){let Me=Q.get(pe);if(Me===void 0&&(Me=F(pe.connectionName)||pe.rootConnectionName!==void 0&&F(pe.rootConnectionName),Q.set(pe,Me)),Me)continue;const ve=pe.traceThickness??p,he=Math.max(ve/2,pe.viaDiameter/2);if(ye<I/2+he+_)return B.set(ie,!1),!1}B.set(ie,!0)}return!0}})({targetZ:e.z,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,traceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN,useNumericSegmentKeys:A});for(const l of s){a++;const{path:u}=l;if(c(u,l.validationFirstSegmentIndex??0)&&!this.shortcutCrossesOutline(u))return this.obstacleDetourCandidatesValidated+=a,this.stats.obstacleDetourCandidatesValidated=this.obstacleDetourCandidatesValidated,l}return this.obstacleDetourCandidatesValidated+=a,this.stats.obstacleDetourCandidatesValidated=this.obstacleDetourCandidatesValidated,null}findGeometryShortcut(e,n,o){if(this.unsimplifiedRoute.jumpers?.length)return null;if(this.ENABLE_GEOMETRY_SHORTCUTS){const i=this.getDirectGeometryShortcut(e,n,o);if(i)return i}return this.ENABLE_OBSTACLE_DETOUR_SHORTCUTS?this.getObstacleDetourShortcut(e,n,o):null}applyGeometryShortcut(e){const n=this.routeSections[this.currentSectionIndex-1],o=this.routeSections[this.currentSectionIndex+1],i=[...n.points.slice(0,e.previousPointIndex),...e.path,...o.points.slice(e.nextPointIndex+1)].filter((r,s,a)=>{const A=a[s-1];return!A||r.x!==A.x||r.y!==A.y||r.z!==A.z});this.routeSections.splice(this.currentSectionIndex-1,3,{startIndex:n.startIndex,endIndex:o.endIndex,z:n.z,points:i}),this.geometryShortcutsApplied++,this.stats.geometryShortcutsApplied=this.geometryShortcutsApplied,this.stats.viasRemovedByGeometryShortcuts=2*this.geometryShortcutsApplied,this.currentSectionIndex=Math.max(0,this.currentSectionIndex-1)}findMultilayerSectionCollapse(e,n,o){if(e.z===o.z||this.unsimplifiedRoute.jumpers?.length)return null;const i=e.points[e.points.length-1];if(i?.insideJumperPad||i?.toNextSegmentType||n.points.some(s=>s.insideJumperPad||s.toNextSegmentType))return null;const r=[{targetZ:e.z,mergeWith:"previous"},{targetZ:o.z,mergeWith:"next"}];for(const s of r)if(s.targetZ!==n.z&&GD({currentSection:n,targetZ:s.targetZ,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,traceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN}))return s;return null}applyMultilayerSectionCollapse(e){const n=this.routeSections[this.currentSectionIndex-1],o=this.routeSections[this.currentSectionIndex],i=this.routeSections[this.currentSectionIndex+1],r=o.points.map(a=>({...a,z:e.targetZ})),s=a=>a.filter((A,c)=>{const l=a[c-1];return!l||A.x!==l.x||A.y!==l.y||A.z!==l.z});e.mergeWith==="previous"?this.routeSections.splice(this.currentSectionIndex-1,2,{startIndex:n.startIndex,endIndex:o.endIndex,z:e.targetZ,points:s([...n.points,...r])}):this.routeSections.splice(this.currentSectionIndex,2,{startIndex:o.startIndex,endIndex:i.endIndex,z:e.targetZ,points:s([...r,...i.points])}),this.multilayerSectionsCollapsed++,this.stats.multilayerSectionsCollapsed=this.multilayerSectionsCollapsed,this.stats.viasRemovedByMultilayerSectionCollapses=this.multilayerSectionsCollapsed,this.currentSectionIndex=Math.max(0,this.currentSectionIndex-1)}_step(){if(this.currentSectionIndex>=this.routeSections.length)return void(this.solved=!0);if(this.currentSectionIndex===0&&this.routeSections.length>1){const s=this.routeSections[0],a=this.routeSections[1];if(!this.PRESERVE_ROUTE_ENDPOINTS&&s.z!==a.z){const A=a.z,c=s.points[0];if(Jft({endpointX:c.x,endpointY:c.y,targetZ:A,endpointPcbPortId:this.unsimplifiedRoute.startPcbPortId,terminalLayerIndicesByPcbPortId:this.terminalLayerIndicesByPcbPortId,obstacleSHI:this.obstacleSHI,route:this.unsimplifiedRoute,connMap:this.connMap})&&GD({currentSection:s,targetZ:A,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.OBSTACLE_MARGIN}))return s.z=A,s.points=s.points.map(l=>({...l,z:A})),void(this.currentSectionIndex=2)}return void this.currentSectionIndex++}if(this.currentSectionIndex===this.routeSections.length-1){if(!this.PRESERVE_ROUTE_ENDPOINTS&&this.routeSections.length>=2){const s=this.routeSections[this.routeSections.length-1],a=this.routeSections[this.routeSections.length-2];if(s.z!==a.z){const A=a.z,c=s.points[s.points.length-1];Jft({endpointX:c.x,endpointY:c.y,targetZ:A,endpointPcbPortId:this.unsimplifiedRoute.endPcbPortId,terminalLayerIndicesByPcbPortId:this.terminalLayerIndicesByPcbPortId,obstacleSHI:this.obstacleSHI,route:this.unsimplifiedRoute,connMap:this.connMap})&&GD({currentSection:s,targetZ:A,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.OBSTACLE_MARGIN})&&(s.z=A,s.points=s.points.map(l=>({...l,z:A})))}}return void(this.solved=!0)}const e=this.routeSections[this.currentSectionIndex-1],n=this.routeSections[this.currentSectionIndex],o=this.routeSections[this.currentSectionIndex+1];if(e.z!==o.z){const s=this.findMultilayerSectionCollapse(e,n,o);return s?void this.applyMultilayerSectionCollapse(s):void this.currentSectionIndex++}const i=e.z;if(GD({currentSection:n,targetZ:i,route:this.unsimplifiedRoute,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,connMap:this.connMap,defaultTraceThickness:this.TRACE_THICKNESS,obstacleMargin:this.OBSTACLE_MARGIN}))return n.z=i,n.points=n.points.map(s=>({...s,z:i})),void(this.currentSectionIndex+=2);const r=this.findGeometryShortcut(e,n,o);r?this.applyGeometryShortcut(r):this.currentSectionIndex++}getConstructorParams(){return{obstacleSHI:this.obstacleSHI,hdRouteSHI:this.hdRouteSHI,unsimplifiedRoute:this.unsimplifiedRoute,connMap:this.connMap,outline:this.outline,geometryShortcutTraceMargin:this.GEOMETRY_SHORTCUT_TRACE_MARGIN,geometryShortcutObstacleMargin:this.GEOMETRY_SHORTCUT_OBSTACLE_MARGIN,enableGeometryShortcuts:this.ENABLE_GEOMETRY_SHORTCUTS,enableObstacleDetourShortcuts:this.ENABLE_OBSTACLE_DETOUR_SHORTCUTS,preserveRouteEndpoints:this.PRESERVE_ROUTE_ENDPOINTS,terminalLayerIndicesByPcbPortId:this.terminalLayerIndicesByPcbPortId}}getOptimizedHdRoute(){const e=this.routeSections.flatMap(o=>o.points),n=[];for(let o=0;o<e.length-1;o++)e[o].z!==e[o+1].z&&n.push({x:e[o].x,y:e[o].y});return{connectionName:this.unsimplifiedRoute.connectionName,rootConnectionName:this.unsimplifiedRoute.rootConnectionName,startPcbPortId:this.unsimplifiedRoute.startPcbPortId,endPcbPortId:this.unsimplifiedRoute.endPcbPortId,route:e,traceThickness:this.unsimplifiedRoute.traceThickness,vias:n,viaDiameter:this.unsimplifiedRoute.viaDiameter,jumpers:this.unsimplifiedRoute.jumpers}}visualize(){const e={circles:[],lines:[],points:[],rects:[],coordinateSystem:"cartesian",title:"Single Route Useless Via Removal Solver"};for(let n=0;n<this.routeSections.length;n++){const o=this.routeSections[n];e.lines.push({points:o.points,strokeWidth:this.TRACE_THICKNESS,strokeColor:n===this.currentSectionIndex?"orange":o.z===0?"red":"blue"})}return e}},uZn=class extends yr{constructor(e){super(),this.input=e,this.input={...e,obstacles:c7(e.obstacles,e.layerCount)},this.MAX_ITERATIONS=1e6,this.unsimplifiedHdRoutes=e.unsimplifiedHdRoutes,this.optimizedHdRoutes=[],this.unprocessedRoutes=[...e.unsimplifiedHdRoutes],this.obstacleSHI=new OD("flatbush",this.input.obstacles),this.hdRouteSHI=new oB([...this.unsimplifiedHdRoutes,...e.otherHdRoutes??[]])}input;getSolverName(){return"UselessViaRemovalSolver"}unsimplifiedHdRoutes;optimizedHdRoutes;unprocessedRoutes;activeSubSolver=null;obstacleSHI=null;hdRouteSHI=null;_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const n=this.activeSubSolver.getOptimizedHdRoute();this.hdRouteSHI.removeRoute(n.connectionName),this.hdRouteSHI.addRoute(n),this.optimizedHdRoutes.push(n),this.activeSubSolver=null}else(this.activeSubSolver.failed||this.activeSubSolver.error)&&(this.error=this.activeSubSolver.error,this.failed=!0);return}const e=this.unprocessedRoutes.shift();e?this.activeSubSolver=new lZn({hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,unsimplifiedRoute:e,connMap:this.input.connMap,outline:this.input.outline,geometryShortcutTraceMargin:this.input.geometryShortcutTraceMargin,geometryShortcutObstacleMargin:this.input.geometryShortcutObstacleMargin,enableGeometryShortcuts:this.input.enableGeometryShortcuts,enableObstacleDetourShortcuts:this.input.enableObstacleDetourShortcuts,preserveRouteEndpoints:this.input.preserveRouteEndpoints,terminalLayerIndicesByPcbPortId:this.input.terminalLayerIndicesByPcbPortId}):this.solved=!0}getOptimizedHdRoutes(){return this.optimizedHdRoutes}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"Useless Via Removal Solver"};for(const n of this.input.obstacles){let o="rgba(128, 128, 128, 0.2)";const i=n.__zLayers?.includes(0),r=n.__zLayers?.includes(1);i&&r?o="rgba(128, 0, 128, 0.2)":i?o="rgba(255, 0, 0, 0.2)":r&&(o="rgba(0, 0, 255, 0.2)"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(", ")})`})}for(const n of this.optimizedHdRoutes){if(n.route.length===0)continue;const o=this.input.colorMap[n.connectionName]||"#888888";for(let i=0;i<n.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.z===s.z&&e.lines.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:r.z===0?"red":"blue",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${r.z})`})}for(const i of n.vias)e.circles.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,fill:"rgba(255, 0, 255, 0.5)",label:`${n.connectionName} via`});if(n.jumpers&&n.jumpers.length>0){const i=_x(n.jumpers,{color:o,label:n.connectionName});e.rects.push(...i.rects??[]),e.lines.push(...i.lines??[])}}return this.activeSubSolver&&e.lines.push(...this.activeSubSolver.visualize().lines??[]),e}},gZn=class extends yr{getSolverName(){return"SingleSimplifiedPathSolver"}newRoute;newVias;headIndex=0;tailIndex=0;inputRoute;otherHdRoutes;obstacles;connMap;colorMap;outline;minBoardEdgeClearance;constructor(e){super(),this.inputRoute=e.inputRoute,this.otherHdRoutes=e.otherHdRoutes,this.obstacles=e.obstacles,this.connMap=e.connMap,this.colorMap=e.colorMap,this.outline=e.outline,this.minBoardEdgeClearance=e.minBoardEdgeClearance??.2,this.newRoute=[this.inputRoute.route[0]],this.newVias=[]}getConstructorParams(){return{inputRoute:this.inputRoute,otherHdRoutes:this.otherHdRoutes,obstacles:this.obstacles,connMap:this.connMap.netMap,colorMap:this.colorMap,outline:this.outline,minBoardEdgeClearance:this.minBoardEdgeClearance}}get simplifiedRoute(){return{connectionName:this.inputRoute.connectionName,rootConnectionName:this.inputRoute.rootConnectionName,startPcbPortId:this.inputRoute.startPcbPortId,endPcbPortId:this.inputRoute.endPcbPortId,traceThickness:this.inputRoute.traceThickness,viaDiameter:this.inputRoute.viaDiameter,route:this.newRoute,vias:this.newVias,jumpers:this.inputRoute.jumpers}}isValidPath(e){throw new Error("Not implemented")}_step(){throw new Error("Not implemented")}getVisualsForNewRouteAndObstacles(){const e={lines:[],points:[],circles:[],rects:[],coordinateSystem:"cartesian",title:"Simplified Path Solver"};for(let n=0;n<this.inputRoute.route.length-1;n++)e.lines.push({points:[{x:this.inputRoute.route[n].x,y:this.inputRoute.route[n].y},{x:this.inputRoute.route[n+1].x,y:this.inputRoute.route[n+1].y}],strokeColor:"rgba(255, 0, 0, 0.8)",strokeDash:this.inputRoute.route[n].z===1?"5, 5":void 0,layer:`z${this.inputRoute.route[n].z.toString()}`});for(let n=0;n<this.newRoute.length;n++)n<this.newRoute.length-1&&e.lines.push({points:[{x:this.newRoute[n].x,y:this.newRoute[n].y},{x:this.newRoute[n+1].x,y:this.newRoute[n+1].y}],strokeWidth:.15,strokeColor:"rgba(0, 255, 0, 0.8)",strokeDash:this.newRoute[n].z===1?[.4,.4]:void 0,layer:`z${this.newRoute[n].z.toString()}`}),e.points.push({x:this.newRoute[n].x,y:this.newRoute[n].y,color:"rgba(0, 255, 0, 0.8)",label:`z: ${this.newRoute[n].z}`,layer:`z${this.newRoute[n].z.toString()}`});for(const n of this.newVias)e.circles.push({center:n,radius:this.inputRoute.viaDiameter/2,fill:"rgba(0, 0, 255, 0.5)"});for(const n of this.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:n.layers?.includes("top")?"rgba(255, 0, 0, 0.3)":n.layers?.includes("bottom")?"rgba(0, 0, 255, 0.3)":"rgba(128, 128, 128, 0.3)"});for(const n of this.otherHdRoutes)for(let o=0;o<n.route.length-1;o++)e.lines.push({points:[{x:n.route[o].x,y:n.route[o].y},{x:n.route[o+1].x,y:n.route[o+1].y}],strokeWidth:.15,strokeColor:n.route[o].z===0?"rgba(255, 0, 255, 0.5)":n.route[o].z===1?"rgba(128, 0, 128, 0.5)":"rgba(0, 0, 255, 0.5)",layer:`z${n.route[o].z.toString()}`});if("filteredObstaclePathSegments"in this){const n=this.filteredObstaclePathSegments;for(const[o,i]of n)e.lines.push({points:[o,i]})}return e}},dZn=t=>({minX:Math.min(t[0].x,t[1].x),maxX:Math.max(t[0].x,t[1].x),minY:Math.min(t[0].y,t[1].y),maxY:Math.max(t[0].y,t[1].y)}),Wft=class{constructor(e,n=.4){this.segments=e,this.buckets=new Map,this.SEGMENT_MARGIN=n;const o=new Map;for(const i of e){const r=this.getSegmentKey(i);if(o.has(r))continue;o.set(r,i);const s=dZn(i),a=Math.floor(s.minX/this.CELL_SIZE),A=Math.floor(s.maxX/this.CELL_SIZE),c=Math.floor(s.minY/this.CELL_SIZE),l=Math.floor(s.maxY/this.CELL_SIZE);for(let u=a;u<=A;u++)for(let g=c;g<=l;g++){const h=`${u}x${g}`,d=this.buckets.get(h),p=[i[0],i[1],r];d?d.push(p):this.buckets.set(h,[p])}}}segments;buckets;CELL_SIZE=.4;SEGMENT_MARGIN;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getSegmentKey(e){return`${e[0].x}-${e[0].y}-${e[0].z}-${e[1].x}-${e[1].y}-${e[1].z}`}getSegmentsThatCouldIntersect(e,n){const o=[],i=new Set,r=Math.min(e.x,n.x)-this.SEGMENT_MARGIN,s=Math.min(e.y,n.y)-this.SEGMENT_MARGIN,a=Math.max(e.x,n.x)+this.SEGMENT_MARGIN,A=Math.max(e.y,n.y)+this.SEGMENT_MARGIN,c=Math.floor(r/this.CELL_SIZE),l=Math.floor(a/this.CELL_SIZE),u=Math.floor(s/this.CELL_SIZE),g=Math.floor(A/this.CELL_SIZE);for(let h=c;h<=l;h++)for(let d=u;d<=g;d++){const p=`${h}x${d}`,m=this.buckets.get(p);if(m)for(const _ of m){const f=_[2];i.has(f)||(i.add(f),o.push(_))}}return o}},hZn=class extends gZn{pathSegments=[];totalPathLength=0;headDistanceAlongPath=0;tailDistanceAlongPath=0;minStepSize=.25;lastValidPath=null;lastValidPathHeadDistance=0;STEP_SIZE_REDUCTION_FACTOR=.25;maxStepSize=4;currentStepSize=this.maxStepSize;lastHeadMoveDistance=0;cachedValidPathSegments;filteredObstacles=[];filteredObstaclePathSegments=[];traceThicknessByObstacleSegmentId=new Map;filteredVias=[];filteredJumperPads=[];jumperPadPointIndices=new Set;segmentTree;OBSTACLE_MARGIN=.1;TRACE_THICKNESS=.15;useTraceWidthAwareClearance=!1;clearanceTraceThickness=this.TRACE_THICKNESS;TAIL_JUMP_RATIO=.8;isSameNetRoute(e){const n=[this.inputRoute.connectionName,this.inputRoute.rootConnectionName].filter(i=>i!==void 0),o=[e.connectionName,e.rootConnectionName].filter(i=>i!==void 0);return n.some(i=>o.some(r=>i===r||this.connMap.areIdsConnected(i,r)))}constructor(e){if(super(e),this.cachedValidPathSegments=new Set,this.useTraceWidthAwareClearance=e.useTraceWidthAwareClearance??!1,this.clearanceTraceThickness=this.useTraceWidthAwareClearance?this.inputRoute.traceThickness:this.TRACE_THICKNESS,this.inputRoute.route.length<=1)return this.newRoute=[...this.inputRoute.route],void(this.solved=!0);const n=this.inputRoute.route.reduce((a,A)=>(a.minX=Math.min(a.minX,A.x),a.maxX=Math.max(a.maxX,A.x),a.minY=Math.min(a.minY,A.y),a.maxY=Math.max(a.maxY,A.y),a),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0}),o=this.useTraceWidthAwareClearance?Math.max(0,...this.otherHdRoutes.flatMap(a=>[a.traceThickness,...a.route.map(A=>A.traceThickness??a.traceThickness)])):this.TRACE_THICKNESS,i=this.useTraceWidthAwareClearance?this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2+o/2:this.OBSTACLE_MARGIN+this.TRACE_THICKNESS,r={center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY};this.filteredObstacles=this.obstacles.filter(a=>!a.connectedTo.some(A=>this.connMap.areIdsConnected(this.inputRoute.connectionName,A))).filter(a=>a.connectedTo.some(A=>this.connMap.areIdsConnected(this.inputRoute.connectionName,A))?!1:(function(A,c){const l=Is(A),u=Is(c),g=Math.max(l.minX-u.maxX,u.minX-l.maxX,0),h=Math.max(l.minY-u.maxY,u.minY-l.maxY,0);return Math.hypot(g,h)})(r,a)<this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2),this.filteredObstaclePathSegments=this.otherHdRoutes.flatMap(a=>{if(this.isSameNetRoute(a))return[];const A=a.route,c=[];for(let l=0;l<A.length-1;l++){const u=A[l],g=A[l+1];if(Dz(u,g,n)<=i){c.push([u,g]);const h=`${u.x}-${u.y}-${u.z}-${g.x}-${g.y}-${g.z}`;if(this.useTraceWidthAwareClearance){const d=Math.max(u.traceThickness??a.traceThickness,g.traceThickness??a.traceThickness);this.traceThicknessByObstacleSegmentId.set(h,Math.max(this.traceThicknessByObstacleSegmentId.get(h)??0,d))}}}return c}),this.segmentTree=this.useTraceWidthAwareClearance?new Wft(this.filteredObstaclePathSegments,i):new Wft(this.filteredObstaclePathSegments),this.filteredVias=this.otherHdRoutes.flatMap(a=>{if(this.isSameNetRoute(a))return[];const A=a.vias,c=[];for(const l of A){const u=this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2+a.viaDiameter/2,g=l.x-u,h=l.x+u,d=l.y-u,p=l.y+u;g<=n.maxX&&h>=n.minX&&d<=n.maxY&&p>=n.minY&&c.push({...l,diameter:a.viaDiameter})}return c});const s=(a,A)=>{const c=[];for(const l of a){const u=W8[l.footprint]??W8["0603"],g=l.end.x-l.start.x,h=l.end.y-l.start.y,d=Math.abs(g)>Math.abs(h),p=d?u.padLength:u.padWidth,m=d?u.padWidth:u.padLength,_=this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2;l.start.x-p/2-_<=n.maxX&&l.start.x+p/2+_>=n.minX&&l.start.y-m/2-_<=n.maxY&&l.start.y+m/2+_>=n.minY&&c.push({center:l.start,width:p,height:m,connectionName:A}),l.end.x-p/2-_<=n.maxX&&l.end.x+p/2+_>=n.minX&&l.end.y-m/2-_<=n.maxY&&l.end.y+m/2+_>=n.minY&&c.push({center:l.end,width:p,height:m,connectionName:A})}return c};if(this.filteredJumperPads=this.otherHdRoutes.flatMap(a=>this.isSameNetRoute(a)?[]:s(a.jumpers??[],a.connectionName)),this.inputRoute.jumpers&&this.inputRoute.jumpers.length>0){this.filteredJumperPads.push(...s(this.inputRoute.jumpers,this.inputRoute.connectionName));for(const a of this.inputRoute.jumpers)for(let A=0;A<this.inputRoute.route.length;A++){const c=this.inputRoute.route[A];(Math.abs(c.x-a.start.x)<.01&&Math.abs(c.y-a.start.y)<.01||Math.abs(c.x-a.end.x)<.01&&Math.abs(c.y-a.end.y)<.01)&&this.jumperPadPointIndices.add(A)}}this.computePathSegments()}computePathSegments(){let e=0;for(let n=0;n<this.inputRoute.route.length-1;n++){const o=this.inputRoute.route[n],i=this.inputRoute.route[n+1],r=Math.sqrt((i.x-o.x)**2+(i.y-o.y)**2)+n/1e4;this.pathSegments.push({start:o,end:i,length:r,startDistance:e,endDistance:e+r}),e+=r}this.totalPathLength=e}arePointsEqual(e,n){return e.x===n.x&&e.y===n.y&&e.z===n.z}getPointAtDistance(e){e=Math.max(0,Math.min(e,this.totalPathLength));const n=this.pathSegments.find(i=>e>=i.startDistance&&e<=i.endDistance);if(!n)return this.inputRoute.route[this.inputRoute.route.length-1];const o=(e-n.startDistance)/n.length;return{x:n.start.x+o*(n.end.x-n.start.x),y:n.start.y+o*(n.end.y-n.start.y),z:o<.5?n.start.z:n.end.z}}getNearestIndexForDistance(e){if(e<=0)return 0;if(e>=this.totalPathLength)return this.inputRoute.route.length-1;const n=this.pathSegments.findIndex(r=>e>=r.startDistance&&e<=r.endDistance);if(n===-1)return 0;const o=this.pathSegments[n],i=(o.startDistance+o.endDistance)/2;return e>i?n+1:n}isValidPathSegment(e,n){for(const i of this.filteredObstacles)if(i.__zLayers?.includes(e.z)&&K8(e,n,i)<this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2)return!1;const o=this.segmentTree.getSegmentsThatCouldIntersect(e,n);for(const[i,r,s]of o)if(i.z===e.z&&r.z===e.z){const a=qQ({x:e.x,y:e.y},{x:n.x,y:n.y},{x:i.x,y:i.y},{x:r.x,y:r.y});if(!this.useTraceWidthAwareClearance){if(a<this.OBSTACLE_MARGIN+this.TRACE_THICKNESS)return!1;continue}const A=this.traceThicknessByObstacleSegmentId.get(s);if(A===void 0)throw new Error(`Missing trace thickness for segment "${s}"`);if(a<this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2+A/2)return!1}for(const i of this.filteredVias)if(wc(i,e,n)<this.OBSTACLE_MARGIN+i.diameter/2+this.clearanceTraceThickness/2)return!1;for(const i of this.filteredJumperPads)if(K8(e,n,i)<this.OBSTACLE_MARGIN+this.clearanceTraceThickness/2)return!1;return!(this.outline&&this.outline.length>=3&&$z({start:{x:e.x,y:e.y},end:{x:n.x,y:n.y},polygon:this.outline,margin:this.minBoardEdgeClearance+this.inputRoute.traceThickness/2}))}isValidPath(e){if(e.length<2)return!0;for(let n=0;n<e.length-1;n++)if(e[n].z!==e[n+1].z)return!1;for(let n=0;n<e.length-1;n++)if(!this.isValidPathSegment(e[n],e[n+1]))return!1;return!0}find45DegreePath(e,n){if(this.arePointsEqual(e,n))return[e];if(e.z!==n.z)return null;const o=Vft({x:e.x,y:e.y},{x:n.x,y:n.y});for(const i of o){const r=i.map(s=>({x:s.x,y:s.y,z:e.z}));if(this.isValidPath(r))return r}return null}addPathToResult(e){if(e.length!==0){for(let n=0;n<e.length;n++)n===0&&this.newRoute.length>0&&this.arePointsEqual(this.newRoute[this.newRoute.length-1],e[n])||this.newRoute.push(e[n]);this.currentStepSize=this.maxStepSize}}appendOriginalRouteSlice(e,n){const o=this.pathSegments.findIndex(i=>e>=i.startDistance&&e<=i.endDistance);if(o===-1)throw new Error(`Could not find path segment containing distance ${e}`);for(let i=o+1;i<=n&&i<this.inputRoute.route.length;i++){const r=this.inputRoute.route[i],s=this.newRoute[this.newRoute.length-1];s&&this.arePointsEqual(s,r)||this.newRoute.push({...r})}}moveHead(e){this.lastHeadMoveDistance=e,this.headDistanceAlongPath=Math.min(this.headDistanceAlongPath+e,this.totalPathLength)}stepBackAndReduceStepSize(){this.headDistanceAlongPath=Math.max(this.tailDistanceAlongPath,this.headDistanceAlongPath-this.lastHeadMoveDistance),this.currentStepSize=Math.max(this.minStepSize,this.currentStepSize*this.STEP_SIZE_REDUCTION_FACTOR)}_step(){const e=this.tailDistanceAlongPath>=this.totalPathLength,n=this.headDistanceAlongPath>=this.totalPathLength;if(e){const h=this.inputRoute.route[this.inputRoute.route.length-1];return this.newRoute.length!==0&&this.arePointsEqual(this.newRoute[this.newRoute.length-1],h)||this.newRoute.push(h),void(this.solved=!0)}if(n){const h=this.getPointAtDistance(this.tailDistanceAlongPath),d=this.inputRoute.route[this.inputRoute.route.length-1],p=this.find45DegreePath(h,d);if(p)return this.addPathToResult(p),void(this.solved=!0);const m=this.lastValidPath?this.lastValidPathHeadDistance:this.tailDistanceAlongPath;return this.lastValidPath&&(this.addPathToResult(this.lastValidPath),this.lastValidPath=null),this.getNearestIndexForDistance(m),this.appendOriginalRouteSlice(m,this.inputRoute.route.length-1),this.tailDistanceAlongPath=this.totalPathLength,this.headDistanceAlongPath=this.totalPathLength,void(this.solved=!0)}this.moveHead(this.currentStepSize);const o=this.getPointAtDistance(this.tailDistanceAlongPath),i=this.getPointAtDistance(this.headDistanceAlongPath),r=this.getNearestIndexForDistance(this.tailDistanceAlongPath),s=this.getNearestIndexForDistance(this.headDistanceAlongPath);let a=!1,A=-1;for(let h=r;h<s;h++)if(h+1<this.inputRoute.route.length&&this.inputRoute.route[h].z!==this.inputRoute.route[h+1].z){a=!0;const d=h;A=this.pathSegments[d].startDistance;break}if(a&&this.lastHeadMoveDistance>this.minStepSize)return void this.stepBackAndReduceStepSize();let c=!1,l=-1,u=-1;for(let h=r+1;h<=s;h++)if(this.jumperPadPointIndices.has(h)){c=!0,l=h,u=h>0&&h-1<this.pathSegments.length?this.pathSegments[h-1].endDistance:this.pathSegments[0]?.startDistance??0;break}if(c&&this.lastHeadMoveDistance>this.minStepSize)return void this.stepBackAndReduceStepSize();if(c&&l>=0){const h=this.inputRoute.route[l];this.lastValidPath&&(this.addPathToResult(this.lastValidPath),this.lastValidPath=null);const d=this.newRoute[this.newRoute.length-1];return d&&d.x===h.x&&d.y===h.y||this.newRoute.push({x:h.x,y:h.y,z:h.z}),this.currentStepSize=this.maxStepSize,this.tailDistanceAlongPath=u,this.headDistanceAlongPath=this.tailDistanceAlongPath,this.lastValidPath=null,void(this.lastValidPathHeadDistance=this.tailDistanceAlongPath)}if(a&&A>0){const h=this.lastValidPath?this.lastValidPathHeadDistance:this.tailDistanceAlongPath,d=this.getNearestIndexForDistance(A)+1,p=this.inputRoute.route[d],m={x:p.x,y:p.y};this.lastValidPath&&(this.addPathToResult(this.lastValidPath),this.lastValidPath=null);const _=this.newRoute[this.newRoute.length-1],f={x:m.x,y:m.y,z:_.z};if(!this.arePointsEqual(_,f)){const C=this.find45DegreePath(_,f);C?this.addPathToResult(C):this.appendOriginalRouteSlice(h,d-1)}this.newVias.push(m),this.newRoute.push({x:m.x,y:m.y,z:p.z}),this.currentStepSize=this.maxStepSize;const I=this.pathSegments.findIndex(C=>C.start===p);if(I!==-1)this.tailDistanceAlongPath=this.pathSegments[I].startDistance,this.headDistanceAlongPath=this.tailDistanceAlongPath,this.lastValidPath=null,this.lastValidPathHeadDistance=this.tailDistanceAlongPath;else if(d<this.inputRoute.route.length){if(d===this.inputRoute.route.length-1)return void(this.solved=!0);console.warn("Fallback used for tailDistanceAlongPath after layer change");const C=this.pathSegments.find(y=>y.start===this.inputRoute.route[d]);C?(this.tailDistanceAlongPath=C.startDistance,this.headDistanceAlongPath=this.tailDistanceAlongPath,this.lastValidPath=null,this.lastValidPathHeadDistance=this.tailDistanceAlongPath):(console.error(`[${this.inputRoute.connectionName}] Could not find segment start after layer change. Path might be incomplete.
            Index sought: ${d}, Point: (${this.inputRoute.route[d].x.toFixed(3)}, ${this.inputRoute.route[d].y.toFixed(3)}, z=${this.inputRoute.route[d].z})
            Route Length: ${this.inputRoute.route.length}, Path Segments: ${this.pathSegments.length}`),this.solved=!0)}else console.warn("Layer change occurred at the end of the path."),this.solved=!0;return}const g=this.find45DegreePath(o,i);if(!g&&this.lastHeadMoveDistance>this.minStepSize)this.stepBackAndReduceStepSize();else{if(!g&&!this.lastValidPath){const h=this.getPointAtDistance(this.tailDistanceAlongPath);this.tailDistanceAlongPath+=this.minStepSize,this.moveHead(this.minStepSize);const d=this.getNearestIndexForDistance(this.tailDistanceAlongPath),p=this.inputRoute.route[d],m=this.inputRoute.route[this.inputRoute.route.length-1];return void(this.arePointsEqual(h,p)||this.arePointsEqual(p,m)||this.newRoute.push(p))}if(g)return this.lastValidPath=g,void(this.lastValidPathHeadDistance=this.headDistanceAlongPath);this.lastValidPath&&(this.addPathToResult(this.lastValidPath),this.lastValidPath=null,this.tailDistanceAlongPath=this.lastValidPathHeadDistance,this.moveHead(this.minStepSize))}}visualize(){const e=this.getVisualsForNewRouteAndObstacles(),n=this.getPointAtDistance(this.tailDistanceAlongPath),o=this.getPointAtDistance(this.headDistanceAlongPath);e.points.push({x:n.x,y:n.y,color:"yellow",label:["Tail",`z: ${n.z}`].join(`
`)}),e.points.push({x:o.x,y:o.y,color:"orange",label:["Head",`z: ${o.z}`].join(`
`)});const i=this.getPointAtDistance(this.headDistanceAlongPath+this.currentStepSize);e.points.push({x:i.x,y:i.y,color:"red",label:["Tentative Head",`z: ${i.z}`].join(`
`)});let r=0;for(;r<this.totalPathLength;){const s=this.getPointAtDistance(r);e.circles.push({center:{x:s.x,y:s.y},radius:.05,fill:"rgba(100, 100, 100, 0.5)"}),r+=this.totalPathLength/20}if(this.lastValidPath&&this.lastValidPath.length>1)for(let s=0;s<this.lastValidPath.length-1;s++)e.lines.push({points:[{x:this.lastValidPath[s].x,y:this.lastValidPath[s].y},{x:this.lastValidPath[s+1].x,y:this.lastValidPath[s+1].y}],strokeColor:"rgba(0, 255, 255, 0.9)",strokeDash:"3, 3"});return e}},pZn=class extends yr{getSolverName(){return"MultiSimplifiedPathSolver"}simplifiedHdRoutes;currentUnsimplifiedHdRouteIndex=0;activeSubSolver=null;unsimplifiedHdRoutes;otherHdRoutes;obstacles;connMap;colorMap;outline;minBoardEdgeClearance;defaultViaDiameter;useTraceWidthAwareClearance;constructor(e){super(),this.MAX_ITERATIONS=1e8,this.unsimplifiedHdRoutes=e.unsimplifiedHdRoutes,this.otherHdRoutes=e.otherHdRoutes??[];const n=Math.max(2,...[...e.unsimplifiedHdRoutes,...this.otherHdRoutes].flatMap(o=>o.route.map(i=>i.z+1)))||2;this.obstacles=c7(e.obstacles,n),this.connMap=e.connMap||new TD({}),this.colorMap=e.colorMap||{},this.outline=e.outline,this.minBoardEdgeClearance=e.minBoardEdgeClearance??.2,this.defaultViaDiameter=e.defaultViaDiameter??.3,this.useTraceWidthAwareClearance=e.useTraceWidthAwareClearance??!1,this.simplifiedHdRoutes=[]}_step(){const e=this.unsimplifiedHdRoutes[this.currentUnsimplifiedHdRouteIndex];if(!this.activeSubSolver)return e?(this.activeSubSolver=new hZn({inputRoute:e,otherHdRoutes:this.otherHdRoutes.concat(this.unsimplifiedHdRoutes.slice(this.currentUnsimplifiedHdRouteIndex+1).concat(this.simplifiedHdRoutes)),obstacles:this.obstacles,connMap:this.connMap,colorMap:this.colorMap,outline:this.outline,minBoardEdgeClearance:this.minBoardEdgeClearance,useTraceWidthAwareClearance:this.useTraceWidthAwareClearance}),void this.currentUnsimplifiedHdRouteIndex++):void(this.solved=!0);this.activeSubSolver.step(),this.activeSubSolver.solved&&(this.simplifiedHdRoutes.push(this.activeSubSolver.simplifiedRoute),this.activeSubSolver=null)}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const e={lines:[],points:[],circles:[],rects:[],coordinateSystem:"cartesian",title:"Multi Simplified Path Solver"};for(const n of this.unsimplifiedHdRoutes)if(!this.simplifiedHdRoutes.some(o=>o.connectionName===n.connectionName)){for(let o=0;o<n.route.length-1;o++)e.lines.push({points:[{x:n.route[o].x,y:n.route[o].y},{x:n.route[o+1].x,y:n.route[o+1].y}],strokeColor:n.route[o].z===1?"rgba(0, 0, 255, 0.4)":"rgba(255, 0, 0, 0.4)",strokeWidth:.15,strokeDash:n.route[o].z===1?[.5,.5]:void 0});for(const o of n.vias||[])e.circles.push({center:o,radius:(n.viaDiameter??this.defaultViaDiameter)/2,fill:"rgba(0, 0, 255, 0.4)"})}for(const n of this.simplifiedHdRoutes){const o=this.colorMap?.[n.connectionName]||"rgba(128, 128, 128, 0.8)";for(let i=0;i<n.route.length-1;i++)e.lines.push({points:[{x:n.route[i].x,y:n.route[i].y},{x:n.route[i+1].x,y:n.route[i+1].y}],strokeWidth:.15,strokeColor:o,strokeDash:n.route[i].z===1?[.5,.5]:void 0,step:1});for(const i of n.vias||[])e.circles.push({center:i,radius:n.viaDiameter/2,fill:"rgba(0, 0, 255, 0.5)",step:1})}for(const n of this.unsimplifiedHdRoutes){for(let o=0;o<n.route.length-1;o++)e.lines.push({points:[{x:n.route[o].x,y:n.route[o].y},{x:n.route[o+1].x,y:n.route[o+1].y}],strokeWidth:.15,strokeColor:"rgba(255, 0, 0, 0.2)",strokeDash:[.5,.5],step:0,layer:`z${n.route[o].z.toString()}`});for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:n.viaDiameter/2,fill:"rgba(255, 0, 0, 0.2)",step:0})}for(const n of this.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:n.layers?.includes("top")?"rgba(255, 0, 0, 0.3)":n.layers?.includes("bottom")?"rgba(0, 0, 255, 0.3)":"rgba(128, 128, 128, 0.3)"});if(this.currentUnsimplifiedHdRouteIndex<this.unsimplifiedHdRoutes.length){const n=this.unsimplifiedHdRoutes[this.currentUnsimplifiedHdRouteIndex];n.route.length>0&&e.circles.push({center:{x:n.route[0].x,y:n.route[0].y},radius:.2,fill:"yellow",label:"Current"})}return e}},mZn=(t,e)=>{for(let n=0;n<t.route.length-1;n++){const o=t.route[n],i=t.route[n+1];if(o.z===i.z||o.x!==e.x||o.y!==e.y||i.x!==e.x||i.y!==e.y)continue;let r=n;for(;r>0&&t.route[r-1].x===e.x&&t.route[r-1].y===e.y;)r--;let s=n+1;for(;s<t.route.length-1&&t.route[s+1].x===e.x&&t.route[s+1].y===e.y;)s++;if(r===0||s===t.route.length-1)return!0}return!1},Z7e=(t,e,n)=>n?.get(e.connectionName)??t.idToNetMap[e.connectionName]??(e.rootConnectionName?t.idToNetMap[e.rootConnectionName]:void 0),_Zn=(t,e,n)=>{for(const o of e.connectedTo)if(o===n.net||t.idToNetMap[o]===n.net||t.areIdsConnected(o,n.net))return!0;return!1},fZn=(t,e,n)=>{const o=n.mergedViaHdRoutes[t.routeIndex];if(!o)throw new Error(`SameNetViaMergerSolver could not find route for via at index ${t.routeIndex}`);const i=new Set;for(let r=1;r<o.route.length;r++){const s=o.route[r-1],a=o.route[r];s.z!==a.z&&s.x===t.x&&s.y===t.y&&a.x===t.x&&a.y===t.y&&(i.add(s.z),i.add(a.z))}if(i.size===0)throw new Error(`SameNetViaMergerSolver could not find transition layers for via at (${t.x}, ${t.y})`);for(const r of i){const s=o.traceThickness,a={x:t.x,y:t.y,z:r},A={x:e.x,y:e.y,z:r};if(a.x===A.x&&a.y===A.y)continue;const c=n.hdRouteSHI.getConflictingRoutesForSegment(a,A,s/2);for(const{conflictingRoute:h,distance:d}of c)if(h.connectionName!==o.connectionName&&Z7e(n.connMap,h,n.netByConnectionName)!==t.net&&d<s/2+h.traceThickness/2)return!1;const l={centerX:(a.x+A.x)/2,centerY:(a.y+A.y)/2,width:Math.abs(a.x-A.x),height:Math.abs(a.y-A.y)},u=s/2+.1,g=n.obstacleSHI.searchArea(l.centerX,l.centerY,l.width+2*u,l.height+2*u);for(const h of g){if(!h.__zLayers)throw new Error(`SameNetViaMergerSolver found obstacle without zLayers near via at (${t.x}, ${t.y})`);if(h.__zLayers.includes(r)&&!_Zn(n.connMap,h,t)&&K8(a,A,h)<u)return!1}}return!0},jft=class extends yr{constructor(e){if(super(),this.input=e,!e.connMap)throw new Error("SameNetViaMergerSolver requires connMap");this.input={...e,obstacles:c7(e.obstacles,e.layerCount)},this.MAX_ITERATIONS=1e6,this.inputHdRoutes=this.input.inputHdRoutes,this.mergedViaHdRoutes=structuredClone(this.inputHdRoutes),this.unprocessedRoutes=[...this.input.inputHdRoutes],this.colorMap=this.input.colorMap,this.outline=this.input.outline,this.obstacles=this.input.obstacles,this.obstacleSHI=new OD("flatbush",this.input.obstacles),this.hdRouteSHI=this.createHdRouteSpatialIndex(),this.vias=[],this.offendingVias=[],this.connMap=e.connMap,this.netByConnectionName=e.netByConnectionName,this.viasByNet=new Map,this.rebuildVias()}input;getSolverName(){return"SameNetViaMergerSolver"}inputHdRoutes;mergedViaHdRoutes;unprocessedRoutes;vias;offendingVias;currentViaRoutes=[];connMap;colorMap;outline;obstacles;viasByNet;netByConnectionName;obstacleSHI;hdRouteSHI;createHdRouteSpatialIndex(){return new oB([...this.mergedViaHdRoutes,...this.input.otherHdRoutes??[]])}rebuildVias(){this.vias=[],this.viasByNet=new Map;const e=(n,o,i)=>{if(n.vias.length===0)return;const r=i?((s,a,A)=>{const c=Z7e(s,a,A);if(!c)throw new Error(`SameNetViaMergerSolver could not find net for route "${a.connectionName}"`);return c})(this.connMap,n,this.netByConnectionName):Z7e(this.connMap,n,this.netByConnectionName);if(r)for(let s=0;s<n.vias.length;s++){const a=n.vias[s],A=[...new Set(n.route.map(u=>u.z))];if(A.length===0)throw new Error(`SameNetViaMergerSolver found via on route "${n.connectionName}" with no route points`);const c={x:a.x,y:a.y,diameter:n.viaDiameter,net:r,layers:A,routeIndex:o,mutable:i&&!(this.input.preserveRouteEndpoints&&mZn(n,a))};this.vias.push(c);const l=this.viasByNet.get(c.net);l?l.push(c):this.viasByNet.set(c.net,[c])}};for(let n=0;n<this.mergedViaHdRoutes.length;n++)e(this.mergedViaHdRoutes[n],n,!0);for(let n=0;n<(this.input.otherHdRoutes?.length??0);n++)e(this.input.otherHdRoutes[n],this.mergedViaHdRoutes.length+n,!1)}getViaKey(e){return[e.mutable?"mutable":"immutable",e.routeIndex,e.x,e.y,e.layers.join(","),e.net].join(":")}dedupeRouteVias(e){const n=new Set;e.vias=e.vias.filter(o=>{const i=`${o.x}:${o.y}`;return!n.has(i)&&(n.add(i),!0)})}getOffendingViaGroupsBatch(){const e=[],n=new Set,o=[];for(const i of this.viasByNet.values()){if(i.length<2)continue;const r=Math.max(1e-6,...i.map(a=>a.diameter)),s=new Map;for(let a=0;a<i.length;a++){const A=i[a],c=`${Math.floor(A.x/r)}:${Math.floor(A.y/r)}`,l=s.get(c);l?l.push(a):s.set(c,[a])}for(let a=0;a<i.length;a++){const A=i[a],c=Math.floor(A.x/r),l=Math.floor(A.y/r),u=Math.ceil(2.5),g=[];for(let h=-u;h<=u;h++)for(let d=-u;d<=u;d++){const p=s.get(`${c+h}:${l+d}`);if(p)for(const m of p){if(m===a)continue;const _=i[m];if(!_.mutable)continue;const f=A.x-_.x,I=A.y-_.y,C=f*f+I*I,y=A.diameter/2+_.diameter/2,x=2.5*y;C!==0?(C<=y*y||C<=x*x&&fZn(_,A,{connMap:this.connMap,mergedViaHdRoutes:this.mergedViaHdRoutes,hdRouteSHI:this.hdRouteSHI,obstacleSHI:this.obstacleSHI,netByConnectionName:this.netByConnectionName}))&&g.push(_):A.mutable||g.push(_)}}g.length>0&&o.push({keep:A,remove:g})}}o.sort((i,r)=>r.remove.length!==i.remove.length?r.remove.length-i.remove.length:i.keep.mutable!==r.keep.mutable?i.keep.mutable?1:-1:r.keep.layers.length!==i.keep.layers.length?r.keep.layers.length-i.keep.layers.length:i.keep.routeIndex-r.keep.routeIndex);for(const i of o){const r=this.getViaKey(i.keep);if(n.has(r))continue;const s=i.remove.filter(a=>!n.has(this.getViaKey(a)));if(s.length!==0){e.push({keep:i.keep,remove:s}),n.add(r);for(const a of s)n.add(this.getViaKey(a))}}return e}moveViaTo(e,n,o=!0){if(!e.mutable)throw new Error("SameNetViaMergerSolver cannot mutate an immutable via anchor");const i=this.mergedViaHdRoutes[e.routeIndex];if(!i)throw new Error(`SameNetViaMergerSolver could not find route for via at index ${e.routeIndex}`);const r=i.route,s=new Set;let a=!1;for(let A=r.length-1;A>=1;A--){const c=r[A-1],l=r[A];if(c.z===l.z||c.x!==e.x||c.y!==e.y||l.x!==e.x||l.y!==e.y)continue;let u=A-1;for(;u>0&&r[u-1].x===e.x&&r[u-1].y===e.y;)u--;let g=A;for(;g<r.length-1&&r[g+1].x===e.x&&r[g+1].y===e.y;)g++;for(let h=u;h<=g;h++)s.add(h)}if(s.size===0)throw new Error(`SameNetViaMergerSolver could not find route transition for via at (${e.x}, ${e.y}) on route "${i.connectionName}"`);for(const A of s){const c=r[A];r[A]={...c,x:n.x,y:n.y}}if(i.vias=i.vias.flatMap(A=>A.x!==e.x||A.y!==e.y?A:(a=!0,n.mutable?[{x:n.x,y:n.y}]:[])),!a)throw new Error(`SameNetViaMergerSolver could not find via at (${e.x}, ${e.y}) on route "${i.connectionName}"`);this.dedupeRouteVias(i),o&&this.rebuildVias()}_step(){const e=this.getOffendingViaGroupsBatch();if(e.length===0)return void(this.solved=!0);let n=0;for(const o of e)for(const i of o.remove)this.moveViaTo(i,o.keep,!1),n++;this.rebuildVias(),this.hdRouteSHI=this.createHdRouteSpatialIndex(),this.stats.mergedViaGroups=e.length,this.stats.mergedViaCount=n}getMergedViaHdRoutes(){return this.mergedViaHdRoutes}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"Same Net Via Merger Solver"};for(const n of this.input.obstacles){if(!n.__zLayers)throw new Error("SameNetViaMergerSolver found obstacle without zLayers while visualizing");let o="rgba(128, 128, 128, 0.2)";const i=n.__zLayers.includes(0),r=n.__zLayers.includes(1);i&&r?o="rgba(128, 0, 128, 0.2)":i?o="rgba(255, 0, 0, 0.2)":r&&(o="rgba(0, 0, 255, 0.2)"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(", ")})`})}for(const n of this.mergedViaHdRoutes){if(n.route.length===0)continue;const o=this.input.colorMap[n.connectionName];if(!o)throw new Error(`SameNetViaMergerSolver could not find color for route "${n.connectionName}"`);for(let i=0;i<n.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.z===s.z&&e.lines.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:r.z===0?"rgba(255, 0, 0, 0.5)":"rgba(0, 0, 255, 0.5)",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${r.z})`})}for(const i of n.vias)e.circles.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,fill:"rgba(255, 0, 255, 0.5)",label:`${n.connectionName} via`});if(n.jumpers&&n.jumpers.length>0){const i=_x(n.jumpers,{color:o,label:n.connectionName});if(!i.rects||!i.lines)throw new Error(`SameNetViaMergerSolver expected jumper graphics for route "${n.connectionName}"`);e.rects.push(...i.rects),e.lines.push(...i.lines)}}return e}},IZn={getConflictingRoutesForSegment:()=>[],getConflictingRoutesNearPoint:()=>[]},Py=1e-6,Xz=(t,e)=>{const n=`${t.x}:${t.y}:${t.z}`,o=`${e.x}:${e.y}:${e.z}`;return n<o?`${n}|${o}`:`${o}|${n}`},$ft=t=>{const e=new Set;for(let n=1;n<t.route.length;n++){const o=t.route[n-1],i=t.route[n];o.z===i.z&&e.add(Xz(o,i))}return e},e6e=t=>t.filter((e,n)=>{const o=t[n-1];return!o||e.x!==o.x||e.y!==o.y||e.z!==o.z}),t6e=t=>{const e=[],n=new Set;for(let o=1;o<t.length;o++){const i=t[o-1],r=t[o];if(i.z===r.z||i.toNextSegmentType==="through_obstacle")continue;if(i.x!==r.x||i.y!==r.y)throw new Error(`CrossingViaReductionSolver found a layer transition without a via at route point ${o}`);const s=`${r.x}:${r.y}`;n.has(s)||(n.add(s),e.push({x:r.x,y:r.y}))}return e},n6e=t=>{const e=[t.connectionName];return t.rootConnectionName&&e.push(t.rootConnectionName),e},o6e=(t,e,n)=>{const o=n6e(t),i=n6e(e);return o.some(r=>i.some(s=>r===s||n.areIdsConnected(r,s)))},CZn=(t,e,n)=>{const o=n6e(e);return t.connectedTo.some(i=>o.some(r=>i===r||n.areIdsConnected(i,r)))},qft=t=>{let e=0;for(let n=1;n<t.length;n++)e+=Math.hypot(t[n].x-t[n-1].x,t[n].y-t[n-1].y);return e},Xft=(t,e)=>{const n=qft(t);if(e<=Py||e>=n-Py)return null;let o=0;for(let i=1;i<t.length;i++){const r=t[i-1],s=t[i],a=Math.hypot(s.x-r.x,s.y-r.y);if(o+a<e-Py){o+=a;continue}const A=e-o;if(A<=Py)return{prefix:t.slice(0,i).map(u=>({...u})),suffix:t.slice(i-1).map(u=>({...u})),point:{...r}};if(a-A<=Py)return{prefix:t.slice(0,i+1).map(u=>({...u})),suffix:t.slice(i).map(u=>({...u})),point:{...s}};const c=A/a,l={x:r.x+(s.x-r.x)*c,y:r.y+(s.y-r.y)*c,z:r.z};return{prefix:[...t.slice(0,i),l].map(u=>({...u})),suffix:[l,...t.slice(i)].map(u=>({...u})),point:l}}return null},yZn=(t,e,n,o)=>{const i=DD(t,e,n,o);if(!i)return null;const r=Math.hypot(i.x-t.x,i.y-t.y),s=Math.hypot(i.x-e.x,i.y-e.y),a=Math.hypot(i.x-n.x,i.y-n.y),A=Math.hypot(i.x-o.x,i.y-o.y);return Math.min(r,s,a,A)<=Py?null:r},Zft=t=>t.points.some(e=>e.insideJumperPad||e.toNextSegmentType),e1t=({sections:t,sectionIndex:e,side:n})=>{const o=t[e],i=n==="start"?t[e-1]:t[e+1];if(!i)return null;const r=n==="start"?o.points[0]:o.points.at(-1),s=n==="start"?i.points.at(-1):i.points[0];return r.x!==s.x||r.y!==s.y?null:i.z},t1t=({sections:t,sectionIndex:e,targetZ:n,side:o})=>e1t({sections:t,sectionIndex:e,side:o})===n,n1t=({baseIndexes:t,otherCandidateRoutes:e,ignoredConnectionNames:n,originalRouteSegmentKeys:o})=>{const i=new oB([...e]);return{getConflictingRoutesForSegment:(r,s,a)=>{const A=o.has(Xz(r,s));return[...A?[]:t.mutableRoutes.getConflictingRoutesForSegment(r,s,a).filter(({conflictingRoute:c})=>!n.has(c.connectionName)),...A?[]:t.immutableRoutes?.getConflictingRoutesForSegment(r,s,a)??[],...i.getConflictingRoutesForSegment(r,s,a)]},getConflictingRoutesNearPoint:(r,s)=>[...t.mutableRoutes.getConflictingRoutesNearPoint(r,s).filter(({conflictingRoute:a})=>!n.has(a.connectionName)),...t.immutableRoutes?.getConflictingRoutesNearPoint(r,s)??[],...i.getConflictingRoutesNearPoint(r,s)]}},xZn=class extends yr{input;obstacleSHI;traceMargin;obstacleMargin;reducedHdRoutes;getSolverName(){return"CrossingViaReductionSolver"}constructor(e){super(),this.input={...e,obstacles:c7(e.obstacles,e.layerCount)},this.traceMargin=e.traceMargin??.1,this.obstacleMargin=e.obstacleMargin??.15,this.reducedHdRoutes=structuredClone([...e.inputHdRoutes]),this.obstacleSHI=new OD("flatbush",[...this.input.obstacles]),this.MAX_ITERATIONS=1e6}collapseDetourSection({route:e,section:n,targetZ:o}){const i=n.points.map(s=>({...s,z:o})),r=e6e([...e.route.slice(0,n.startIndex).map(s=>({...s})),...i,...e.route.slice(n.endIndex+1).map(s=>({...s}))]);return{...e,route:r,vias:t6e(r)}}relocateTransitionVia({route:e,section:n,targetZ:o,side:i,newViaDistance:r}){const s=Xft(n.points,r);if(!s)return null;const a=i==="start"?o:n.z,A=i==="start"?n.z:o,c=[...s.prefix.map(u=>({...u,z:a})),...s.suffix.map(u=>({...u,z:A}))],l=e6e([...e.route.slice(0,n.startIndex).map(u=>({...u})),...c,...e.route.slice(n.endIndex+1).map(u=>({...u}))]);return{route:{...e,route:l,vias:t6e(l)},relocatedVia:{x:s.point.x,y:s.point.y}}}relocateTransitionVias({route:e,sections:n,crossingGroups:o,detourZ:i,detourTraceThickness:r}){const s=new Map;for(const u of o){const g=s.get(u.transitionSectionIndex)??[];g.push(u),s.set(u.transitionSectionIndex,g)}const a=[],A=[],c=e.viaDiameter/2+r/2+this.traceMargin+Py;for(const[u,g]of s){if(g.length!==1)return null;const h=n[u],d=g[0];if(!t1t({sections:n,sectionIndex:u,targetZ:i,side:d.side}))return null;const p=d.side==="start"?Math.max(...d.crossingDistances)+c:Math.min(...d.crossingDistances)-c,m=Xft(h.points,p);if(!m)return null;const _=d.side==="start"?i:h.z,f=d.side==="start"?h.z:i;a.push({section:h,points:[...m.prefix.map(I=>({...I,z:_})),...m.suffix.map(I=>({...I,z:f}))]}),A.push({x:m.point.x,y:m.point.y})}let l=e.route.map(u=>({...u}));for(const u of a.sort((g,h)=>h.section.startIndex-g.section.startIndex))l=[...l.slice(0,u.section.startIndex),...u.points,...l.slice(u.section.endIndex+1)];return l=e6e(l),{route:{...e,route:l,vias:t6e(l)},relocatedVias:A}}routeIsClear(e,n,o){for(const i of qz(e)){for(let r=1;r<i.points.length;r++){const s=i.points[r-1],a=i.points[r];if(!o.has(Xz(s,a))&&this.input.outline&&$z({start:s,end:a,polygon:[...this.input.outline],margin:e.traceThickness/2}))return!1}if(!GD({currentSection:i,targetZ:i.z,route:e,hdRouteSHI:n,obstacleSHI:this.obstacleSHI,connMap:this.input.connMap,defaultTraceThickness:e.traceThickness,obstacleMargin:this.obstacleMargin,traceMargin:this.traceMargin,shouldCheckStaticGeometryForSegment:(r,s)=>!o.has(Xz(r,s))}))return!1}return!0}relocatedViaIsClear(e,n,o){const i=e.viaDiameter/2;for(let a=0;a<this.input.layerCount;a++)if(o.getConflictingRoutesNearPoint({...n,z:a},i+this.traceMargin).some(({conflictingRoute:A})=>!o6e(e,A,this.input.connMap)))return!1;const r=i+this.obstacleMargin,s=this.obstacleSHI.searchArea(n.x,n.y,2*r,2*r);for(const a of s)if(!CZn(a,e,this.input.connMap)&&K8(n,n,a)<r)return!1;if(this.input.outline){for(let a=0;a<this.input.outline.length;a++)if(wc(n,this.input.outline[a],this.input.outline[(a+1)%this.input.outline.length])<i+this.traceMargin)return!1}return!0}changedSectionsAreStaticallyClear(e,n){for(const o of qz(e))if(o.points.some((i,r)=>{const s=o.points[r-1];return s!==void 0&&!n.has(Xz(s,i))})){if(this.input.outline){for(let i=1;i<o.points.length;i++)if($z({start:o.points[i-1],end:o.points[i],polygon:[...this.input.outline],margin:e.traceThickness/2}))return!1}if(!GD({currentSection:o,targetZ:o.z,route:e,hdRouteSHI:IZn,obstacleSHI:this.obstacleSHI,connMap:this.input.connMap,defaultTraceThickness:e.traceThickness,obstacleMargin:Math.min(this.obstacleMargin,.1),traceMargin:this.traceMargin}))return!1}return!0}candidateIsClear(e,n){const o=[{routeIndex:e.detourRouteIndex,route:e.detourRoute},...e.transitionUpdates],i=new Set(o.map(({routeIndex:a})=>this.reducedHdRoutes[a].connectionName)),r=$ft(this.reducedHdRoutes[e.detourRouteIndex]),s=n1t({baseIndexes:n,otherCandidateRoutes:e.transitionUpdates.map(({route:a})=>a),ignoredConnectionNames:i,originalRouteSegmentKeys:r});if(this.stats.candidateClearanceChecks=(this.stats.candidateClearanceChecks??0)+1,!this.routeIsClear(e.detourRoute,s,r))return!1;for(const a of e.transitionUpdates){const A=$ft(this.reducedHdRoutes[a.routeIndex]),c=n1t({baseIndexes:n,otherCandidateRoutes:o.filter(({routeIndex:l})=>l!==a.routeIndex).map(({route:l})=>l),ignoredConnectionNames:i,originalRouteSegmentKeys:A});if(!this.routeIsClear(a.route,c,A)||a.relocatedVias.some(l=>!this.relocatedViaIsClear(a.route,l,c)))return!1}return this.changedSectionsAreStaticallyClear(e.detourRoute,r)}candidateRoutesHaveNoExternalCopperConflicts(e,n){const o=[e.detourRoute,...e.transitionUpdates.map(({route:s})=>s)],i=new Set(o.map(({connectionName:s})=>s)),r=[n.mutableRoutes,...n.immutableRoutes?[n.immutableRoutes]:[]];for(const s of o)for(const a of qz(s))for(let A=1;A<a.points.length;A++){const c=a.points[A-1],l=a.points[A];for(const u of r)if(u.getConflictingRoutesForSegment(c,l,s.traceThickness/2+this.traceMargin).some(({conflictingRoute:g})=>!i.has(g.connectionName)&&!o6e(s,g,this.input.connMap)))return!1}return!0}buildTransitionSegmentIndex(e,n){const o=[];for(let r=0;r<this.reducedHdRoutes.length;r++){if(this.reducedHdRoutes[r].jumpers?.length)continue;const s=e[r];for(let a=0;a<s.length;a++){const A=s[a];if(!Zft(A))for(const c of["start","end"]){const l=e1t({sections:s,sectionIndex:a,side:c});if(l===null||l===A.z||!n.has(`${A.z}:${l}`))continue;let u=0;for(let g=1;g<A.points.length;g++){const h=A.points[g-1],d=A.points[g],p=Math.hypot(d.x-h.x,d.y-h.y);p>Py&&o.push({routeIndex:r,sectionIndex:a,side:c,adjacentZ:l,start:h,end:d,distanceFromSectionStart:u}),u+=p}}}}if(this.stats.transitionSegmentsIndexed=(this.stats.transitionSegmentsIndexed??0)+o.length,o.length===0)return null;const i=new Kft(o.length);for(const r of o)i.insert(r,Math.min(r.start.x,r.end.x),Math.min(r.start.y,r.end.y),Math.max(r.start.x,r.end.x),Math.max(r.start.y,r.end.y));return i.finish(),i}getIndexedCrossingGroups({detourRouteIndex:e,detourSection:n,targetZ:o,transitionSegmentIndex:i}){const r=new Map;for(let s=1;s<n.points.length;s++){const a=n.points[s-1],A=n.points[s];if(Math.hypot(A.x-a.x,A.y-a.y)<=Py)continue;this.stats.indexedDetourSegmentQueries=(this.stats.indexedDetourSegmentQueries??0)+1;const c=i.search(Math.min(a.x,A.x)-Py,Math.min(a.y,A.y)-Py,Math.max(a.x,A.x)+Py,Math.max(a.y,A.y)+Py);for(const l of c){if(l.routeIndex===e||l.start.z!==o||l.adjacentZ!==n.z)continue;this.stats.exactSegmentIntersectionChecks=(this.stats.exactSegmentIntersectionChecks??0)+1;const u=yZn(l.start,l.end,a,A);if(u===null)continue;const g=`${l.routeIndex}:${l.sectionIndex}:${l.side}`;let h=r.get(g);h||(h={transitionRouteIndex:l.routeIndex,transitionSectionIndex:l.sectionIndex,side:l.side,crossingDistances:[]},r.set(g,h)),h.crossingDistances.push(l.distanceFromSectionStart+u)}}return[...r.values()].sort((s,a)=>s.transitionRouteIndex!==a.transitionRouteIndex?s.transitionRouteIndex-a.transitionRouteIndex:s.transitionSectionIndex!==a.transitionSectionIndex?s.transitionSectionIndex-a.transitionSectionIndex:s.side===a.side?0:s.side==="start"?-1:1)}tryCreateCandidate({detourRouteIndex:e,detourSection:n,targetZ:o,transitionRouteIndex:i,transitionSection:r,transitionSections:s,transitionSectionIndex:a,side:A,crossingDistances:c,baseClearanceIndexes:l}){if(!t1t({sections:s,sectionIndex:a,targetZ:n.z,side:A}))return null;const u=this.reducedHdRoutes[e],g=this.reducedHdRoutes[i];if(c.length===0)return null;const h=g.viaDiameter/2+u.traceThickness/2+this.traceMargin+Py,d=A==="start"?Math.max(...c)+h:Math.min(...c)-h,p=this.relocateTransitionVia({route:g,section:r,targetZ:n.z,side:A,newViaDistance:d});if(!p)return null;const m=this.collapseDetourSection({route:u,section:n,targetZ:o});if(u.vias.length+g.vias.length-m.vias.length-p.route.vias.length!==2)return null;const _={detourRouteIndex:e,detourRoute:m,transitionUpdates:[{routeIndex:i,route:p.route,relocatedVias:[p.relocatedVia]}]};return this.candidateIsClear(_,l)?_:null}tryCreateMultiCrossingCandidate({detourRouteIndex:e,detourSection:n,targetZ:o,crossingGroups:i,sectionsByRoute:r,baseClearanceIndexes:s}){if(i.length<2)return null;const a=this.reducedHdRoutes[e],A=[],c=new Map;for(const g of i){const h=c.get(g.transitionRouteIndex)??[];h.push(g),c.set(g.transitionRouteIndex,h)}for(const[g,h]of c){const d=this.reducedHdRoutes[g],p=this.relocateTransitionVias({route:d,sections:r[g],crossingGroups:h,detourZ:n.z,detourTraceThickness:a.traceThickness});if(!p)return null;A.push({routeIndex:g,route:p.route,relocatedVias:p.relocatedVias})}const l=this.collapseDetourSection({route:a,section:n,targetZ:o});if(a.vias.length+[...c.keys()].reduce((g,h)=>g+this.reducedHdRoutes[h].vias.length,0)-(l.vias.length+A.reduce((g,{route:h})=>g+h.vias.length,0))!==2)return null;this.stats.multiCrossingCandidates=(this.stats.multiCrossingCandidates??0)+1;const u={detourRouteIndex:e,detourRoute:l,transitionUpdates:A};return this.candidateIsClear(u,s)?this.candidateRoutesHaveNoExternalCopperConflicts(u,s)?(this.stats.multiCrossingReductions=(this.stats.multiCrossingReductions??0)+1,this.stats.transitionRoutesMovedByMultiCrossingReductions=(this.stats.transitionRoutesMovedByMultiCrossingReductions??0)+A.length,u):(this.stats.multiCrossingPreexistingConflictRejections=(this.stats.multiCrossingPreexistingConflictRejections??0)+1,null):null}findCrossingReduction(){const e=this.reducedHdRoutes.map(s=>qz(s)),n=[],o=new Set;for(let s=0;s<this.reducedHdRoutes.length;s++){if(this.reducedHdRoutes[s].jumpers?.length)continue;const a=e[s];for(let A=1;A<a.length-1;A++){const c=a[A-1],l=a[A],u=a[A+1];c.z!==u.z||c.z===l.z||Zft(l)||(n.push({routeIndex:s,section:l,targetZ:c.z}),o.add(`${c.z}:${l.z}`))}}if(n.length===0)return null;const i=this.buildTransitionSegmentIndex(e,o);if(!i)return null;let r=null;for(const s of n){const a=s.routeIndex,A=s.section,c=this.reducedHdRoutes[a],l=this.getIndexedCrossingGroups({detourRouteIndex:a,detourSection:A,targetZ:s.targetZ,transitionSegmentIndex:i}).filter(({transitionRouteIndex:h})=>{const d=this.reducedHdRoutes[h];return!d.jumpers?.length&&!o6e(c,d,this.input.connMap)}),u=new Map;for(const h of l){const d=`${h.transitionRouteIndex}:${h.transitionSectionIndex}`,p=u.get(d)??[];p.push(h),u.set(d,p)}if(u.size>1){r??={mutableRoutes:new oB(this.reducedHdRoutes),immutableRoutes:this.input.otherHdRoutes?.length?new oB([...this.input.otherHdRoutes]):null};let h=[{groups:[],movement:0}];const d=p=>{const m=this.reducedHdRoutes[p.transitionRouteIndex],_=e[p.transitionRouteIndex][p.transitionSectionIndex],f=m.viaDiameter/2+c.traceThickness/2+this.traceMargin+Py,I=p.side==="start"?Math.max(...p.crossingDistances)+f:Math.min(...p.crossingDistances)-f;return p.side==="start"?I:qft(_.points)-I};for(const p of u.values()){const m=p.map(_=>({group:_,movement:d(_)})).sort((_,f)=>_.movement-f.movement);h=h.flatMap(_=>m.map(f=>({groups:[..._.groups,f.group],movement:_.movement+f.movement}))).sort((_,f)=>_.movement-f.movement).slice(0,4)}for(const p of h){const m=this.tryCreateMultiCrossingCandidate({detourRouteIndex:a,detourSection:A,targetZ:s.targetZ,crossingGroups:p.groups,sectionsByRoute:e,baseClearanceIndexes:r});if(m)return m}continue}const g=u.values().next().value??[];for(const h of g){const d=h.transitionRouteIndex,p=e[d],m=p[h.transitionSectionIndex];r??={mutableRoutes:new oB(this.reducedHdRoutes),immutableRoutes:this.input.otherHdRoutes?.length?new oB([...this.input.otherHdRoutes]):null};const _=this.tryCreateCandidate({detourRouteIndex:a,detourSection:A,targetZ:s.targetZ,transitionRouteIndex:d,transitionSection:m,transitionSections:p,transitionSectionIndex:h.transitionSectionIndex,side:h.side,crossingDistances:h.crossingDistances,baseClearanceIndexes:r});if(_)return _}}return null}_step(){const e=this.findCrossingReduction();if(e){this.reducedHdRoutes[e.detourRouteIndex]=e.detourRoute;for(const n of e.transitionUpdates)this.reducedHdRoutes[n.routeIndex]=n.route;this.stats.crossingViaReductions=(this.stats.crossingViaReductions??0)+1,this.stats.viasRemovedByCrossingReductions=(this.stats.viasRemovedByCrossingReductions??0)+2}else this.solved=!0}getReducedHdRoutes(){return this.reducedHdRoutes}visualize(){const e={lines:[],circles:[],rects:[],coordinateSystem:"cartesian",title:"Crossing Via Reduction Solver"};for(const n of this.input.obstacles)e.rects.push({center:n.center,width:n.width,height:n.height,fill:"rgba(128, 128, 128, 0.2)"});for(const n of this.reducedHdRoutes){for(let o=1;o<n.route.length;o++){const i=n.route[o-1],r=n.route[o];i.z===r.z&&e.lines.push({points:[i,r],strokeColor:i.z===0?"#d32f2f":"#3367a8",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${i.z})`})}for(const o of n.vias)e.circles.push({center:o,radius:n.viaDiameter/2,fill:"#ff20d6",label:`${n.connectionName} via`})}return e}},cae=1e-6,i6e=(t,e)=>Math.abs(t.x-e.center.x)<=e.width/2+cae&&Math.abs(t.y-e.center.y)<=e.height/2+cae,o1t=t=>(t.__zLayers?.length??t.layers?.length??0)>1,j8=class extends yr{constructor(e){if(super(),this.simplificationConfig=e,this.simplificationConfig={...e,obstacles:c7(e.obstacles,e.layerCount)},this.hdRoutes=this.markThroughObstacleSegments(e.hdRoutes),e.preserveRouteEndpoints){const n=new Map;for(const o of e.hdRoutes){const i=o.route[0],r=o.route.at(-1);if(!i||!r)throw new Error(`TraceSimplificationSolver cannot preserve endpoints for empty route "${o.connectionName}"`);if(n.has(o.connectionName))throw new Error(`TraceSimplificationSolver cannot preserve endpoints for duplicate route "${o.connectionName}"`);n.set(o.connectionName,{start:{...i},end:{...r}})}this.preservedRouteEndpoints=n}this.MAX_ITERATIONS=1e8}simplificationConfig;getSolverName(){return"TraceSimplificationSolver"}hdRoutes=[];preservedRouteEndpoints;simplificationPipelineLoops=0;MAX_SIMPLIFICATION_PIPELINE_LOOPS=2;PHASE_ORDER=["via_removal","crossing_via_reduction","via_merging","path_simplification"];currentPhase="via_removal";extractResult=null;get simplifiedHdRoutes(){return this.hdRoutes}validatePreservedRouteEndpoints(e){if(!this.preservedRouteEndpoints)return;if(e.length!==this.preservedRouteEndpoints.size)throw new Error(`TraceSimplificationSolver changed the preserved route set (expected ${this.preservedRouteEndpoints.size}, got ${e.length})`);const n=new Set,o=(i,r)=>Math.abs(i.x-r.x)<=cae&&Math.abs(i.y-r.y)<=cae&&i.z===r.z;for(const i of e){if(n.has(i.connectionName))throw new Error(`TraceSimplificationSolver produced duplicate preserved route "${i.connectionName}"`);n.add(i.connectionName);const r=this.preservedRouteEndpoints.get(i.connectionName),s=i.route[0],a=i.route.at(-1);if(!(r&&s&&a&&o(s,r.start)&&o(a,r.end)))throw new Error(`TraceSimplificationSolver changed a preserved endpoint for route "${i.connectionName}"`)}}isSameNetObstacle(e,n){return n.connectedTo.some(o=>o===e.connectionName||o===e.rootConnectionName||this.simplificationConfig.connMap.areIdsConnected(e.connectionName,o)||e.rootConnectionName!==void 0&&this.simplificationConfig.connMap.areIdsConnected(e.rootConnectionName,o))}getSameNetObstacleForSegment(e,n,o){return this.simplificationConfig.obstacles.find(i=>o1t(i)&&this.isSameNetObstacle(e,i)&&i6e(n,i)&&i6e(o,i))}isViaInsideSameNetObstacle(e,n){return this.simplificationConfig.obstacles.some(o=>o1t(o)&&this.isSameNetObstacle(e,o)&&i6e(n,o))}markThroughObstacleSegments(e){return e.map(n=>({...n,route:n.route.map((o,i,r)=>{const s=r[i+1],a=s&&o.z!==s.z&&this.getSameNetObstacleForSegment(n,o,s);if(a)return{...o,toNextSegmentType:"through_obstacle",...a.circuitJsonMetadata?{toNextSegmentCircuitJsonMetadata:a.circuitJsonMetadata}:{}};const A={...o};return delete A.toNextSegmentType,delete A.toNextSegmentCircuitJsonMetadata,A}),vias:n.vias.filter(o=>!this.isViaInsideSameNetObstacle(n,o))}))}_step(){if(this.simplificationPipelineLoops>=this.MAX_SIMPLIFICATION_PIPELINE_LOOPS)this.solved=!0;else{if(this.activeSubSolver){if(this.activeSubSolver.step(),!this.activeSubSolver.failed&&!this.activeSubSolver.solved)return;if(this.activeSubSolver.solved){if(this.extractResult){const e=this.extractResult(this.activeSubSolver);this.validatePreservedRouteEndpoints(e),this.hdRoutes=this.markThroughObstacleSegments(e)}if(this.activeSubSolver=null,this.extractResult=null,this.currentPhase==="via_removal"?this.currentPhase=this.simplificationConfig.enableCrossingViaReduction?"crossing_via_reduction":"via_merging":this.currentPhase==="crossing_via_reduction"?this.currentPhase="via_merging":this.currentPhase==="via_merging"?this.currentPhase="path_simplification":(this.currentPhase="via_removal",this.simplificationPipelineLoops++),this.simplificationPipelineLoops>=this.MAX_SIMPLIFICATION_PIPELINE_LOOPS)return void(this.solved=!0)}else if(this.activeSubSolver.failed)return this.failed=!0,void(this.error=this.activeSubSolver.error??"Sub-solver failed without error message")}if(!this.activeSubSolver&&!this.solved)switch(this.currentPhase){case"via_removal":this.activeSubSolver=new uZn({unsimplifiedHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],obstacles:[...this.simplificationConfig.obstacles],colorMap:{...this.simplificationConfig.colorMap},layerCount:this.simplificationConfig.layerCount,connMap:this.simplificationConfig.connMap,outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,geometryShortcutTraceMargin:.1,geometryShortcutObstacleMargin:this.simplificationConfig.minTraceToPadEdgeClearance??.15,enableGeometryShortcuts:this.simplificationPipelineLoops>0,enableObstacleDetourShortcuts:this.simplificationConfig.enableCrossingViaReduction===!0&&this.simplificationPipelineLoops>0,preserveRouteEndpoints:this.simplificationConfig.preserveRouteEndpoints,terminalLayerIndicesByPcbPortId:this.simplificationConfig.terminalLayerIndicesByPcbPortId}),this.extractResult=e=>e.getOptimizedHdRoutes()??[];break;case"crossing_via_reduction":this.activeSubSolver=new xZn({inputHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],obstacles:[...this.simplificationConfig.obstacles],connMap:this.simplificationConfig.connMap,layerCount:this.simplificationConfig.layerCount,outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,traceMargin:.1,obstacleMargin:this.simplificationConfig.minTraceToPadEdgeClearance??.15}),this.extractResult=e=>e.getReducedHdRoutes();break;case"via_merging":this.activeSubSolver=new jft({inputHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],netByConnectionName:this.simplificationConfig.netByConnectionName,obstacles:[...this.simplificationConfig.obstacles],colorMap:{...this.simplificationConfig.colorMap},layerCount:this.simplificationConfig.layerCount,connMap:this.simplificationConfig.connMap,outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,preserveRouteEndpoints:this.simplificationConfig.preserveRouteEndpoints}),this.extractResult=e=>e.getMergedViaHdRoutes()??[];break;case"path_simplification":this.activeSubSolver=new pZn({unsimplifiedHdRoutes:this.hdRoutes,otherHdRoutes:[...this.simplificationConfig.otherHdRoutes??[]],obstacles:[...this.simplificationConfig.obstacles],connMap:this.simplificationConfig.connMap,colorMap:{...this.simplificationConfig.colorMap},outline:this.simplificationConfig.outline?[...this.simplificationConfig.outline]:void 0,minBoardEdgeClearance:this.simplificationConfig.minBoardEdgeClearance,defaultViaDiameter:this.simplificationConfig.defaultViaDiameter,useTraceWidthAwareClearance:this.simplificationConfig.useTraceWidthAwareClearance}),this.extractResult=e=>e.simplifiedHdRoutes;break;default:this.failed=!0,this.error=`Unknown phase: ${this.currentPhase}`}}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"Trace Simplification Solver"};for(const n of this.simplificationConfig.obstacles){let o="rgba(128, 128, 128, 0.2)";const i=n.__zLayers?.includes(0),r=n.__zLayers?.includes(1);i&&r?o="rgba(128, 0, 128, 0.2)":i?o="rgba(255, 0, 0, 0.2)":r&&(o="rgba(0, 0, 255, 0.2)"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(", ")})`})}for(const n of this.simplificationConfig.otherHdRoutes??[]){for(let o=0;o<n.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z&&e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:i.z===0?"rgba(160, 32, 32, 0.55)":"rgba(32, 32, 160, 0.55)",strokeWidth:n.traceThickness,strokeDash:[.08,.08],label:`${n.connectionName} immutable (z=${i.z})`})}for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:n.viaDiameter/2,fill:"rgba(96, 96, 96, 0.45)",label:`${n.connectionName} immutable via`})}for(const n of this.hdRoutes)if(n.route.length!==0){for(let o=0;o<n.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z&&e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:i.z===0?"red":"blue",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${i.z})`})}for(const o of n.vias)e.circles.push({center:{x:o.x,y:o.y},radius:n.viaDiameter/2,fill:"rgba(255, 0, 255, 0.5)",label:`${n.connectionName} via`});if(n.jumpers&&n.jumpers.length>0){const o=_x(n.jumpers,{color:"orange",label:n.connectionName});e.rects.push(...o.rects??[]),e.lines.push(...o.lines??[])}}return e}},J3=1e-9,aL=class extends yr{getSolverName(){return"TraceWidthSolver"}hdRoutes;hdRoutesWithWidths=[];nominalTraceWidth;minTraceWidth;obstacleMargin;TRACE_WIDTH_SCHEDULE;connectionNominalTraceWidthMap;unprocessedRoutes=[];processedRoutes=[];currentTrace=null;cursorPosition=null;currentTraceSegmentIndex=0;currentTraceSegmentT=0;currentScheduleIndex=0;currentTargetWidth=0;hasInsufficientClearance=!1;lastCollidingObstacles=[];lastCollidingRoutes=[];lastClearance=1/0;obstacles=[];obstacleSHI;hdRouteSHI;connMap;colorMap;constructor(e){super(),this.MAX_ITERATIONS=1e6,this.hdRoutes=[...e.hdRoutes],this.minTraceWidth=e.minTraceWidth,this.obstacleMargin=e.obstacleMargin??.15,this.nominalTraceWidth=0,this.TRACE_WIDTH_SCHEDULE=[],this.unprocessedRoutes=[...this.hdRoutes],this.connMap=e.connMap,this.colorMap=e.colorMap;const n=e.layerCount;this.obstacles=c7(e.obstacles??[],n),this.connectionNominalTraceWidthMap=new Map;for(const o of e.connection)o.nominalTraceWidth!==void 0&&this.connectionNominalTraceWidthMap.set(o.name,o.nominalTraceWidth);this.obstacles.length>0&&(this.obstacleSHI=new OD("flatbush",this.obstacles)),this.hdRouteSHI=new oB(this.hdRoutes)}getNominalTraceWidthForRoute(e){const n=this.connectionNominalTraceWidthMap.get(e.connectionName);return n!==void 0?n:e.rootConnectionName?this.connectionNominalTraceWidthMap.get(e.rootConnectionName):void 0}_step(){if(!this.currentTrace){const e=this.unprocessedRoutes.shift();if(!e)return this.hdRoutesWithWidths=this.processedRoutes,void(this.solved=!0);const n=this.getNominalTraceWidthForRoute(e);if(n===void 0){const i=e.traceThickness??this.minTraceWidth;return this.processedRoutes.push(this.createRouteWithWidth(e,i)),void(this.currentTrace=null)}this.currentTrace=e,this.nominalTraceWidth=n;const o=(this.nominalTraceWidth+this.minTraceWidth)/2;return this.TRACE_WIDTH_SCHEDULE=[this.nominalTraceWidth,o],this.currentTrace.route.length<2?(this.processedRoutes.push(this.createRouteWithWidth(this.currentTrace,this.minTraceWidth)),void(this.currentTrace=null)):(this.currentScheduleIndex=0,this.currentTargetWidth=this.TRACE_WIDTH_SCHEDULE[0],void this.initializeCursor())}if(!this.stepCursorForward())return void this.finalizeCurrentTrace(this.currentTargetWidth);this.getClearanceAtPosition(this.cursorPosition)<this.currentTargetWidth/2+this.obstacleMargin&&(this.hasInsufficientClearance=!0,this.currentScheduleIndex++,this.currentScheduleIndex<this.TRACE_WIDTH_SCHEDULE.length?(this.currentTargetWidth=this.TRACE_WIDTH_SCHEDULE[this.currentScheduleIndex],this.initializeCursor()):this.finalizeCurrentTrace(this.minTraceWidth))}initializeCursor(){if(!this.currentTrace)return;const e=this.currentTrace.route[0];this.cursorPosition={...e},this.currentTraceSegmentIndex=0,this.currentTraceSegmentT=0,this.hasInsufficientClearance=!1}stepCursorForward(){if(!this.currentTrace||!this.cursorPosition)return!1;const e=this.currentTrace.route;let n=.1;for(;n>0;){if(this.currentTraceSegmentIndex>=e.length-1)return!1;const o=e[this.currentTraceSegmentIndex],i=e[this.currentTraceSegmentIndex+1];if(o.insideJumperPad&&i.insideJumperPad){this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0;continue}const r=i.x-o.x,s=i.y-o.y,a=Math.sqrt(r*r+s*s);if(a===0){this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0;continue}const A=this.currentTraceSegmentT*a,c=a-A;if(n<=c){const l=A+n;return this.currentTraceSegmentT=l/a,this.cursorPosition={x:o.x+r*this.currentTraceSegmentT,y:o.y+s*this.currentTraceSegmentT,z:o.z},!0}if(n-=c,this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0,this.currentTraceSegmentIndex>=e.length-1){const l=e[e.length-1];return this.cursorPosition={...l},!1}}return!0}isObstacleOwnJumperPad(e){if(!this.currentTrace?.jumpers)return!1;for(const n of this.currentTrace.jumpers){const o=Math.sqrt((e.center.x-n.start.x)**2+(e.center.y-n.start.y)**2),i=Math.sqrt((e.center.x-n.end.x)**2+(e.center.y-n.end.y)**2),r=Math.max(e.width,e.height)/2+.01;if(o<r||i<r)return!0}return!1}getClearanceAtPosition(e){if(!this.currentTrace)return 1/0;const n=this.currentTrace.rootConnectionName??this.currentTrace.connectionName,o=2*this.nominalTraceWidth;let i=1/0;if(this.lastCollidingObstacles=[],this.lastCollidingRoutes=[],this.obstacleSHI){const s=this.obstacleSHI.searchArea(e.x,e.y,o,o);for(const a of s){if(a.__zLayers&&!a.__zLayers.includes(e.z)||a.connectedTo.includes(n)||a.obstacleId&&this.connMap?.areIdsConnected(n,a.obstacleId))continue;let A=!1;if(this.connMap){for(const m of a.connectedTo)if(this.connMap.areIdsConnected(n,m)){A=!0;break}}if(A||this.isObstacleOwnJumperPad(a))continue;const c=a.center.x-a.width/2,l=a.center.x+a.width/2,u=a.center.y-a.height/2,g=a.center.y+a.height/2,h=Math.max(c-e.x,0,e.x-l),d=Math.max(u-e.y,0,e.y-g),p=Math.sqrt(h*h+d*d);p<this.currentTargetWidth/2+this.obstacleMargin&&this.lastCollidingObstacles.push(a),p<i&&(i=p)}}const r=this.hdRouteSHI.getConflictingRoutesNearPoint({x:e.x,y:e.y,z:e.z},o);for(const{conflictingRoute:s,distance:a}of r){const A=s.rootConnectionName??s.connectionName;if(A===n||this.connMap?.areIdsConnected(n,A))continue;const c=a-(s.traceThickness??.15)/2;c<this.currentTargetWidth/2+this.obstacleMargin&&this.lastCollidingRoutes.push(s),c<i&&(i=c)}return this.lastClearance=i,i}isObstacleOnPointLayer(e,n){return!e.__zLayers||e.__zLayers.includes(n.z)}getAdjacentNonCoincidentRoutePoint(e,n){const o=e.route[n];if(!o)return;const i=n===0?1:-1;for(let r=n+i;r>=0&&r<e.route.length;r+=i){const s=e.route[r];if(no(s,o)>J3)return s}}getObstacleWidthAlongVector(e,n){const o=(e.ccwRotationDegrees??0)*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=i,a=r,A=-r,c=i;return Math.abs(n.x*s+n.y*a)*e.width+Math.abs(n.x*A+n.y*c)*e.height}getTerminalPadWidthLimit(e,n,o){const i=e.route[n];if(!i)return;const r=this.getAdjacentNonCoincidentRoutePoint(e,n);if(!r)return;const s=n===0?u7e(i,r):u7e(r,i);if(no(s,{x:0,y:0})<=J3)return;const a={x:-s.y,y:s.x};let A;for(const c of this.obstacles){if(!this.isObstacleOnPointLayer(c,i)||!Hse(c,e,this.connMap)||o7(i,c)>J3)continue;const l=this.getObstacleWidthAlongVector(c,a);if(l<=J3)continue;const u=this.getObstacleWidthAlongVector(c,s)/2;(!A||l<A.width||Math.abs(l-A.width)<=J3&&u>A.neckDistance)&&(A={width:l,neckDistance:u})}return!A||A.width>=o-J3?void 0:A}getRouteDistanceInfo(e){const n=[0];let o=0;for(let i=1;i<e.length;i++){const r=e[i-1];o+=no(e[i],r),n.push(o)}return{distances:n,totalDistance:o}}interpolateRoutePointAtDistance(e,n,o){for(let i=1;i<e.length;i++){const r=n[i-1],s=n[i],a=s-r;if(o>s+J3)continue;const A=e[i-1],c=e[i];if(a<=J3)return{...c};const l=Math.max(0,Math.min(1,(o-r)/a));return{x:A.x+(c.x-A.x)*l,y:A.y+(c.y-A.y)*l,z:A.z}}return{...e[e.length-1]}}getTaperWidthAtDistance({distanceFromStart:e,totalDistance:n,startLimit:o,endLimit:i,taperDistance:r,traceWidth:s}){let a=s;if(o!==void 0&&e<=r){const A=Math.min(o.neckDistance,r);if(e<=A)a=Math.min(a,o.width);else{const c=(e-A)/Math.max(r-A,J3);a=Math.min(a,o.width+(s-o.width)*c)}}if(i!==void 0){const A=n-e;if(A<=r){const c=Math.min(i.neckDistance,r);if(A<=c)a=Math.min(a,i.width);else{const l=(A-c)/Math.max(r-c,J3);a=Math.min(a,i.width+(s-i.width)*l)}}}return a}createTerminalTaperedRoute(e,n){if(e.route.length<2)return e.route.map(l=>({...l,traceThickness:l.traceThickness??n}));const o=this.getTerminalPadWidthLimit(e,0,n),i=this.getTerminalPadWidthLimit(e,e.route.length-1,n),{distances:r,totalDistance:s}=this.getRouteDistanceInfo(e.route);if(s<=J3){const l=Math.min(o?.width??n,i?.width??n);return e.route.map(u=>({...u,traceThickness:l}))}const a=Math.min(Math.max(2*n,.75),s/2),A=r.map((l,u)=>({distanceFromStart:l,originalPointIndex:u})),c=[];if(o!==void 0){c.push(o.neckDistance);for(let l=0;l<=8;l++)c.push(a*l/8)}if(i!==void 0){c.push(s-i.neckDistance);for(let l=0;l<=8;l++)c.push(s-a+a*l/8)}for(const l of c){const u=Math.max(0,Math.min(s,l));A.some(g=>Math.abs(g.distanceFromStart-u)<=J3)||A.push({distanceFromStart:u})}return A.sort((l,u)=>{const g=l.distanceFromStart-u.distanceFromStart;return Math.abs(g)>J3?g:(l.originalPointIndex??1/0)-(u.originalPointIndex??1/0)}),A.map(l=>{const{distanceFromStart:u}=l,g=l.originalPointIndex!==void 0?{...e.route[l.originalPointIndex]}:this.interpolateRoutePointAtDistance(e.route,r,u);return g.traceThickness=this.getTaperWidthAtDistance({distanceFromStart:u,totalDistance:s,startLimit:o,endLimit:i,taperDistance:a,traceWidth:n}),g})}createRouteWithWidth(e,n){return{connectionName:e.connectionName,rootConnectionName:e.rootConnectionName,traceThickness:n,viaDiameter:e.viaDiameter,route:this.createTerminalTaperedRoute(e,n),vias:[...e.vias],jumpers:e.jumpers}}finalizeCurrentTrace(e){if(!this.currentTrace)return;const n=this.createRouteWithWidth(this.currentTrace,e);this.processedRoutes.push(n),this.currentTrace=null,this.cursorPosition=null,this.hasInsufficientClearance=!1}visualize(){const e={lines:[],points:[],circles:[],rects:[],coordinateSystem:"cartesian",title:`Trace Width Solver (schedule: [${this.TRACE_WIDTH_SCHEDULE.map(i=>i.toFixed(2)).join(", ")}]mm, fallback: ${this.minTraceWidth.toFixed(2)}mm, margin: ${this.obstacleMargin.toFixed(2)}mm)`},n=new Set(this.lastCollidingObstacles.map(i=>i.obstacleId)),o=new Set(this.lastCollidingRoutes.map(i=>i.connectionName));for(const i of this.obstacles){const r=n.has(i.obstacleId),s=i.__zLayers?.includes(0),a=i.__zLayers?.includes(1);let A;A=r?"rgba(255, 0, 0, 0.6)":s&&a?"rgba(128, 0, 128, 0.15)":s?"rgba(255, 0, 0, 0.15)":a?"rgba(0, 0, 255, 0.15)":"rgba(128, 128, 128, 0.15)",e.rects.push({center:i.center,width:i.width,height:i.height,fill:A,stroke:r?"red":void 0,label:r?`COLLIDING: ${i.obstacleId??"obstacle"}`:`${i.obstacleId??"obstacle"} (Z: ${i.__zLayers?.join(", ")})`})}for(const i of this.processedRoutes){if(i.route.length===0)continue;const r=i.traceThickness===this.nominalTraceWidth,s=i.traceThickness===this.TRACE_WIDTH_SCHEDULE[1],a=r?"green":s?"yellow":"orange";for(let A=0;A<i.route.length-1;A++){const c=i.route[A],l=i.route[A+1];c.insideJumperPad&&l.insideJumperPad||c.z===l.z&&e.lines.push({points:[{x:c.x,y:c.y},{x:l.x,y:l.y}],strokeColor:a,strokeWidth:c.traceThickness??i.traceThickness,label:`${i.connectionName} (w=${(c.traceThickness??i.traceThickness).toFixed(2)})`})}for(const A of i.vias)e.circles.push({center:{x:A.x,y:A.y},radius:i.viaDiameter/2,fill:"rgba(255, 0, 255, 0.5)",label:`${i.connectionName} via`});if(i.jumpers&&i.jumpers.length>0){const A=_x(i.jumpers,{color:a,label:i.connectionName});e.rects.push(...A.rects??[]),e.lines.push(...A.lines??[])}}if(this.currentTrace){for(let i=0;i<this.currentTrace.route.length-1;i++){const r=this.currentTrace.route[i],s=this.currentTrace.route[i+1];r.insideJumperPad&&s.insideJumperPad||r.z===s.z&&e.lines.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:"cyan",strokeWidth:this.currentTrace.traceThickness??this.minTraceWidth,label:`Processing: ${this.currentTrace.connectionName}`})}this.cursorPosition&&(e.circles.push({center:{x:this.cursorPosition.x,y:this.cursorPosition.y},radius:this.currentTargetWidth/2,stroke:this.hasInsufficientClearance?"red":"green",fill:"none",label:`Testing width: ${this.currentTargetWidth.toFixed(2)}mm (clearance: ${this.lastClearance.toFixed(2)}mm)`}),e.points.push({x:this.cursorPosition.x,y:this.cursorPosition.y,color:"orange",label:"Cursor"}))}for(const i of this.unprocessedRoutes){if(i.route.length===0)continue;const r=o.has(i.connectionName);for(let s=0;s<i.route.length-1;s++){const a=i.route[s],A=i.route[s+1];a.z===A.z&&e.lines.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:r?"rgba(255, 0, 0, 0.8)":"rgba(128, 128, 128, 0.3)",strokeWidth:i.traceThickness??this.minTraceWidth,label:r?`COLLIDING: ${i.connectionName}`:i.connectionName})}}return e}getHdRoutesWithWidths(){return this.hdRoutesWithWidths}},EZn=class extends yr{getSolverName(){return"CapacityEdgeToPortSegmentSolver"}nodes;edges;capacityPaths;nodeMap;nodeEdgeMap;unprocessedNodeIds;nodePortSegments;colorMap;constructor({nodes:t,edges:e,capacityPaths:n,colorMap:o}){super(),this.nodes=t,this.edges=e,this.nodeMap=new Map(t.map(i=>[i.capacityMeshNodeId,i])),this.nodeEdgeMap=tL(e),this.capacityPaths=n,this.colorMap=o??{},this.unprocessedNodeIds=[...new Set(n.flatMap(i=>i.nodeIds))],this.nodePortSegments=new Map}step(){const t=this.unprocessedNodeIds.pop();if(!t)return void(this.solved=!0);const e=[];for(const r of this.capacityPaths){const s=r.nodeIds.indexOf(t);s!==-1&&e.push({path:r,indexOfNodeInPath:s})}const n=this.nodeMap.get(t),o=[];for(const{path:r,indexOfNodeInPath:s}of e){const a=r.nodeIds[s-1],A=r.nodeIds[s+1];for(const c of[a,A]){const l=this.nodeMap.get(c);if(!l)continue;const u=BZn(n,l),g=l.availableZ.filter(d=>n.availableZ.includes(d));if(g.length===0)continue;const h={capacityMeshNodeId:t,start:u.start,end:u.end,connectionNames:[r.connectionName],rootConnectionNames:r.rootConnectionName?[r.rootConnectionName]:void 0,availableZ:g};o.push(h)}}const i=(function(r){const s=[],a=r.map(A=>({...A,connectionNames:[...A.connectionNames],rootConnectionNames:A.rootConnectionNames?[...A.rootConnectionNames]:[],availableZ:[...A.availableZ].sort((c,l)=>c-l)}));for(;a.length>0;){const A=a.pop();let c=!1;for(let l=0;l<s.length;l++){const u=s[l],g=lae(u.start,A.start)&&lae(u.end,A.end)||lae(u.start,A.end)&&lae(u.end,A.start),h=bZn(u.availableZ,A.availableZ);if(g&&h){const d=new Set(u.connectionNames);A.connectionNames.forEach(m=>d.add(m)),u.connectionNames=Array.from(d);const p=new Set(u.rootConnectionNames||[]);A.rootConnectionNames?.forEach(m=>p.add(m)),u.rootConnectionNames=Array.from(p),c=!0;break}}c||s.push(A)}return s})(o);this.nodePortSegments.set(t,i)}visualize(){const t={lines:[],points:[],rects:[],circles:[]};return this.nodePortSegments.forEach((e,n)=>{this.nodeMap.get(n),e.forEach(o=>{o.start.x,o.end.x;for(let i=0;i<o.connectionNames.length;i++){const r={x:.05*Math.max(...o.availableZ),y:.05*Math.max(...o.availableZ)},s={x:(o.start.x+o.end.x)/2,y:(o.start.y+o.end.y)/2},a={x:s.x+r.x,y:s.y+r.y};r.x>0&&t.lines.push({points:[s,a],strokeColor:"rgba(0, 0, 0, 0.25)",strokeDash:"5 5"}),t.points.push({x:a.x,y:a.y,label:`${n}: ${o.connectionNames.join(", ")}
availableZ: ${o.availableZ.join(",")}
nodePortSegmentId: ${o.nodePortSegmentId}`}),t.lines.push({points:[o.start,o.end],strokeColor:Es(this.colorMap[o.connectionNames[i]],.6)})}})}),t}};function BZn(t,e){const n={start:Math.max(t.center.x-t.width/2,e.center.x-e.width/2),end:Math.min(t.center.x+t.width/2,e.center.x+e.width/2)},o={start:Math.max(t.center.y-t.height/2,e.center.y-e.height/2),end:Math.min(t.center.y+t.height/2,e.center.y+e.height/2)};if(n.end-n.start<o.end-o.start){const i=(n.start+n.end)/2;return{start:{x:i,y:o.start},end:{x:i,y:o.end}}}{const i=(o.start+o.end)/2;return{start:{x:n.start,y:i},end:{x:n.end,y:i}}}}var i1t=1e-9;function lae(t,e){return Math.abs(t.x-e.x)<i1t&&Math.abs(t.y-e.y)<i1t}function bZn(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var SZn=class{constructor(e){this.targets=e,this.buckets=new Map;for(let n=0;n<e.length;n++){const o=e[n],i=Math.floor(o.bounds.minX/this.CELL_SIZE)*this.CELL_SIZE,r=Math.floor(o.bounds.minY/this.CELL_SIZE)*this.CELL_SIZE,s=o.bounds.maxX,a=o.bounds.maxY;for(let A=i;A<=s;A+=this.CELL_SIZE)for(let c=r;c<=a;c+=this.CELL_SIZE){const l=this.getBucketKey(A,c),u=this.buckets.get(l);u?u.push([o,n]):this.buckets.set(l,[[o,n]])}}}targets;buckets;CELL_SIZE=5;getBucketKey(e,n){return`${Math.floor(e/this.CELL_SIZE)}x${Math.floor(n/this.CELL_SIZE)}`}getTargetsInArea(e,n,o,i){const r=[],s=new Set,a=Math.floor((e-o/2)/this.CELL_SIZE)*this.CELL_SIZE,A=Math.floor((n-i/2)/this.CELL_SIZE)*this.CELL_SIZE,c=e+o/2,l=n+i/2;for(let u=a;u<=c;u+=this.CELL_SIZE)for(let g=A;g<=l;g+=this.CELL_SIZE){const h=this.getBucketKey(u,g),d=this.buckets.get(h)||[];for(const p of d)s.has(p[1])||(s.add(p[1]),r.push(p[0]))}return r}},QZn=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.MAX_DEPTH=n?.capacityDepth??this.MAX_DEPTH,this.MAX_ITERATIONS=1e5,this.layerCount=e.layerCount??2,this.outlinePolygon=e.outline&&e.outline.length>=3?e.outline:void 0;const o={x:(e.bounds.minX+e.bounds.maxX)/2,y:(e.bounds.minY+e.bounds.maxY)/2},i={width:e.bounds.maxX-e.bounds.minX,height:e.bounds.maxY-e.bounds.minY},r=Math.max(i.width,i.height);this.unfinishedNodes=[{capacityMeshNodeId:this.getNextNodeId(),center:o,width:r,height:r,layer:"top",availableZ:Array.from({length:this.layerCount},(a,A)=>A),_depth:0,_containsTarget:!0,_containsObstacle:!0,_completelyInsideObstacle:!1}],this.finishedNodes=[],this.nodeToXYOverlappingObstaclesMap=new Map,this.obstacleZLayersByObstacle=new WeakMap;const s=c7(this.srj.obstacles,this.layerCount);for(const[a,A]of this.srj.obstacles.entries())this.obstacleZLayersByObstacle.set(A,s[a].__zLayers);this.obstacleTree=new OD("flatbush",this.srj.obstacles),this.targets=this.computeTargets(),this.targetTree=new SZn(this.targets)}srj;opts;getSolverName(){return"CapacityMeshNodeSolver"}unfinishedNodes;finishedNodes;nodeToXYOverlappingObstaclesMap;layerCount;outlinePolygon;MAX_DEPTH=4;targets;targetTree;obstacleTree;obstacleZLayersByObstacle;computeTargets(){const e=[];for(const n of this.srj.connections)for(const o of n.pointsToConnect){const i=RD(o),r=this.obstacleTree.searchArea(o.x,o.y,.01,.01).filter(A=>{const c=this.getObstacleZLayers(A);return!(!c||c.length===0)&&c.some(l=>i.some(u=>l===Kr(u,this.layerCount)))});let s={minX:o.x-.005,minY:o.y-.005,maxX:o.x+.005,maxY:o.y+.005};r.length>0&&(s={minX:Math.min(...r.map(A=>A.center.x-A.width/2)),minY:Math.min(...r.map(A=>A.center.y-A.height/2)),maxX:Math.max(...r.map(A=>A.center.x+A.width/2)),maxY:Math.max(...r.map(A=>A.center.y+A.height/2))});const a={...o,connectionName:n.name,availableZ:i.map(A=>Kr(A,this.layerCount)),bounds:s};e.push(a)}return e}getNodeBounds(e){const n=e.width/2,o=e.height/2;return{minX:e.center.x-n,maxX:e.center.x+n,minY:e.center.y-o,maxY:e.center.y+o}}getNodeRect(e){return{center:{x:e.center.x,y:e.center.y},width:e.width,height:e.height}}_nextNodeCounter=0;getNextNodeId(){return"cn"+this._nextNodeCounter++}getCapacityFromDepth(e){return(this.MAX_DEPTH-e+1)**2}getTargetIfNodeContainsTarget(e){const n=e.width>4*this.targetTree.CELL_SIZE?this.targets:this.targetTree.getTargetsInArea(e.center.x,e.center.y,e.width,e.height);for(const o of n)if(o.bounds.minX<=e.center.x+e.width/2&&o.bounds.maxX>=e.center.x-e.width/2&&o.bounds.minY<=e.center.y+e.height/2&&o.bounds.maxY>=e.center.y-e.height/2&&o.availableZ.some(i=>e.availableZ.includes(i)))return o;return null}getXYOverlappingObstacles(e){const n=this.nodeToXYOverlappingObstaclesMap.get(e.capacityMeshNodeId);if(n)return n;const o=[],i=this.getNodeBounds(e),r=i.minX,s=i.maxX,a=i.minY,A=i.maxY,c=e._parent?this.getXYOverlappingObstacles(e._parent):this.srj.obstacles;for(const l of c){const u=l.center.x-l.width/2,g=l.center.x+l.width/2,h=l.center.y-l.height/2,d=l.center.y+l.height/2;(s>=u&&r<=g&&A>=h&&a<=d||r>=u&&s<=g&&a>=h&&A<=d||u>=r&&g<=s&&h>=a&&d<=A)&&o.push(l)}return this.nodeToXYOverlappingObstaclesMap.set(e.capacityMeshNodeId,o),o}getXYZOverlappingObstacles(e){const n=this.getXYOverlappingObstacles(e),o=[];for(const i of n)e.availableZ.some(r=>this.getObstacleZLayers(i).includes(r))&&o.push(i);return o}doesNodeOverlapObstacle(e){if(this.getXYZOverlappingObstacles(e).length>0)return!0;const n=this.getNodeBounds(e);if(this.outlinePolygon){const o=this.getNodeRect(e);if(!E_t(o,this.outlinePolygon))return!0}return n.minX<this.srj.bounds.minX||n.maxX>this.srj.bounds.maxX||n.minY<this.srj.bounds.minY||n.maxY>this.srj.bounds.maxY}isNodeCompletelyInsideObstacle(e){const n=this.getXYZOverlappingObstacles(e),o=this.getNodeBounds(e);if(this.outlinePolygon){const i=this.getNodeRect(e);if(!Nse(i,this.outlinePolygon))return!0}for(const i of n){const r=i.center.x-i.width/2,s=i.center.x+i.width/2,a=i.center.y-i.height/2,A=i.center.y+i.height/2;if(o.minX>=r&&o.maxX<=s&&o.minY>=a&&o.maxY<=A)return!0}return!1}getChildNodes(e){if(e._depth===this.MAX_DEPTH)return[];const n=[],o={width:e.width/2,height:e.height/2},i=[{x:e.center.x-o.width/2,y:e.center.y-o.height/2},{x:e.center.x+o.width/2,y:e.center.y-o.height/2},{x:e.center.x-o.width/2,y:e.center.y+o.height/2},{x:e.center.x+o.width/2,y:e.center.y+o.height/2}];for(const r of i){const s={capacityMeshNodeId:this.getNextNodeId(),center:r,width:o.width,height:o.height,layer:e.layer,availableZ:e.availableZ,_depth:(e._depth??0)+1,_parent:e};s._containsObstacle=this.doesNodeOverlapObstacle(s);const a=this.getTargetIfNodeContainsTarget(s);a&&(s._targetConnectionName=a.connectionName,s.availableZ=a.availableZ,s._containsTarget=!0),s._containsObstacle&&(s._completelyInsideObstacle=this.isNodeCompletelyInsideObstacle(s)),s._completelyInsideObstacle&&!s._containsTarget||n.push(s)}return n}shouldNodeBeXYSubdivided(e){return!(e._depth>=this.MAX_DEPTH)&&(!!e._containsTarget||!(!e._containsObstacle||e._completelyInsideObstacle))}_step(){const e=this.unfinishedNodes.pop();if(!e)return void(this.solved=!0);const n=this.getChildNodes(e),o=[],i=[];for(const r of n){const s=this.shouldNodeBeXYSubdivided(r);s?i.push(r):s||r._containsObstacle?!s&&r._containsTarget&&o.push(r):o.push(r)}this.unfinishedNodes.push(...i),this.finishedNodes.push(...o)}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"Capacity Mesh Visualization"};if(this.outlinePolygon&&this.outlinePolygon.length>=2){const o=this.outlinePolygon.map(i=>({x:i.x,y:i.y}));o.push({...o[0]}),e.lines.push({points:o,strokeColor:"rgba(0, 136, 255, 0.95)",label:"outline"});for(const i of this.outlinePolygon)e.points.push({x:i.x,y:i.y,color:"rgba(0, 136, 255, 0.95)"})}for(const o of this.srj.obstacles){if(o.isCopperPour)continue;const i=this.getObstacleZLayers(o);e.rects.push({center:o.center,width:o.width,height:o.height,fill:i.length===1&&i.includes(1)?"rgba(0,0,255,0.3)":"rgba(255,0,0,0.3)",stroke:"red",label:["obstacle",`z: ${i.join(",")}`].join(`
`)})}const n=[...this.finishedNodes,...this.unfinishedNodes];for(const o of n){const i=Math.min(...o.availableZ),r=this.unfinishedNodes.length>0&&o===this.unfinishedNodes[this.unfinishedNodes.length-1];e.rects.push({center:{x:o.center.x+i*o.width*.05,y:o.center.y-i*o.width*.05},width:Math.max(o.width-2,.8*o.width),height:Math.max(o.height-2,.8*o.height),fill:o._containsObstacle?"rgba(255,0,0,0.1)":{"0,1":"rgba(0,0,0,0.1)",0:"rgba(0,200,200, 0.1)",1:"rgba(0,0,200, 0.1)"}[o.availableZ.join(",")]??"rgba(0,200,200,0.1)",stroke:r?"rgba(255,165,0,0.5)":void 0,label:[o.capacityMeshNodeId,`availableZ: ${o.availableZ.join(",")}`,`target? ${o._containsTarget??!1}`,`obs? ${o._containsObstacle??!1}`,`${o.width.toFixed(2)}x${o.height.toFixed(2)}`,`capacity: ${l7(o).toFixed(2)}`].join(`
`)})}return e.rects.sort((o,i)=>o.center.y-i.center.y),this.srj.connections.forEach((o,i)=>{const r=Y_t[i%Y_t.length];for(const s of o.pointsToConnect){const a=RD(s);e.points.push({x:s.x,y:s.y,label:`conn-${i} (${a.join(",")})`,color:r})}}),e}getObstacleZLayers(e){return this.obstacleZLayersByObstacle.get(e)??[]}},vZn=class extends QZn{constructor(e,n={}){super(e,n),this.srj=e,this.opts=n,this.VIA_DIAMETER=om(e).padDiameter}srj;opts;getSolverName(){return"CapacityMeshNodeSolver2_NodeUnderObstacle"}VIA_DIAMETER=.6;OBSTACLE_MARGIN=.1;OVERLAP_THRESHOLD_FOR_SINGLE_LAYER_NODES=.2;isNodeCompletelyOutsideBounds(e){if(this.outlinePolygon){const n=this.getNodeRect(e);if(!Nse(n,this.outlinePolygon))return!0}return e.center.x+e.width/2<this.srj.bounds.minX||e.center.x-e.width/2>this.srj.bounds.maxX||e.center.y+e.height/2<this.srj.bounds.minY||e.center.y-e.height/2>this.srj.bounds.maxY}isNodePartiallyOutsideBounds(e){if(this.outlinePolygon){const n=this.getNodeRect(e);return!!Nse(n,this.outlinePolygon)&&!E_t(n,this.outlinePolygon)}return e.center.x-e.width/2<this.srj.bounds.minX||e.center.x+e.width/2>this.srj.bounds.maxX||e.center.y-e.height/2<this.srj.bounds.minY||e.center.y+e.height/2>this.srj.bounds.maxY}getObstacleCoveragePercentage(e){const n=this.getXYZOverlappingObstacles(e);if(n.length===0)return 0;const o=e.center.x-e.width/2,i=e.center.x+e.width/2,r=e.center.y-e.height/2,s=e.center.y+e.height/2,a=e.width*e.height;let A=0;for(const c of n){const l=Math.max(o,c.center.x-c.width/2),u=Math.min(i,c.center.x+c.width/2),g=Math.max(r,c.center.y-c.height/2),h=Math.min(s,c.center.y+c.height/2);l<u&&g<h&&(A+=(u-l)*(h-g))}return A/a}shouldFilterSingleLayerNodeForObstacle(e){return e.availableZ.length!==1||!e._containsObstacle?!1:this.getObstacleCoveragePercentage(e)>this.OVERLAP_THRESHOLD_FOR_SINGLE_LAYER_NODES}shouldFilterNodeForObstacle(e){return!!e._containsObstacle&&(e.availableZ.length!==1||this.shouldFilterSingleLayerNodeForObstacle(e))}createChildNodeAtPosition(e,n){const o={capacityMeshNodeId:this.getNextNodeId(),center:n.center,width:n.width,height:n.height,layer:e.layer,availableZ:n.availableZ,_depth:n._depth??(e._depth??0)+1,_parent:e},i=this.getXYZOverlappingObstacles(o);o._containsObstacle=i.length>0||this.isNodePartiallyOutsideBounds(o);const r=this.getTargetIfNodeContainsTarget(o);return r&&(o._targetConnectionName=r.connectionName,o._containsTarget=!0),o._containsObstacle&&(o._completelyInsideObstacle=this.isNodeCompletelyInsideObstacle(o)),o}getZSubdivisionChildNodes(e){if(e.availableZ.length===1)return[];const n=[],o=e.availableZ.map(i=>[i]);for(const i of o){const r=this.createChildNodeAtPosition(e,{center:{...e.center},width:e.width,height:e.height,availableZ:i,_depth:e._depth});this.isNodeCompletelyOutsideBounds(r)||n.push(r)}return n}getChildNodes(e){if(e._depth>=this.MAX_DEPTH)return[];const n=[],o={width:e.width/2,height:e.height/2},i=[{x:e.center.x-o.width/2,y:e.center.y-o.height/2},{x:e.center.x+o.width/2,y:e.center.y-o.height/2},{x:e.center.x-o.width/2,y:e.center.y+o.height/2},{x:e.center.x+o.width/2,y:e.center.y+o.height/2}];for(const r of i){const s=this.createChildNodeAtPosition(e,{center:r,width:o.width,height:o.height,availableZ:e.availableZ});this.isNodeCompletelyOutsideBounds(s)||n.push(s)}return n}shouldNodeBeXYSubdivided(e){return!(e._depth>=this.MAX_DEPTH)&&(!!e._containsTarget||e.availableZ.length===1&&e._depth<=this.MAX_DEPTH||!(!e._containsObstacle||e._completelyInsideObstacle))}_step(){const e=this.unfinishedNodes.pop();if(!e)return void(this.solved=!0);const n=this.getChildNodes(e),o=[],i=[];for(const r of n){const s=this.shouldNodeBeXYSubdivided(r),a=r.availableZ.length>1&&!s&&(r._containsObstacle||r.width<this.VIA_DIAMETER+this.OBSTACLE_MARGIN);if(s)i.push(r);else if(s||this.shouldFilterNodeForObstacle(r)||a)if(!s&&r._containsTarget)if(a){const A=this.getZSubdivisionChildNodes(r);o.push(...A.filter(c=>c._containsTarget||!this.shouldFilterNodeForObstacle(c)))}else o.push(r);else a&&o.push(...this.getZSubdivisionChildNodes(r).filter(A=>!this.shouldFilterNodeForObstacle(A)));else o.push(r)}this.unfinishedNodes.push(...i),this.finishedNodes.push(...o)}},wZn=class extends yr{getSolverName(){return"CapacitySegmentToPointSolver"}unsolvedSegments;solvedSegments;nodeMap;colorMap;constructor({segments:e,colorMap:n,nodes:o}){super(),this.MAX_ITERATIONS=1e5,this.unsolvedSegments=e,this.solvedSegments=[],this.colorMap=n??{},this.nodeMap=Object.fromEntries(o.map(i=>[i.capacityMeshNodeId,i]))}_step(){let e=!1;const n=[...this.unsolvedSegments];for(const o of n){const i=o.connectionNames.length;if((!("assignedPoints"in o)||o.assignedPoints?.length!==i)&&i===1){const r={x:(o.start.x+o.end.x)/2,y:(o.start.y+o.end.y)/2,z:o.availableZ[0]};o.assignedPoints=[{connectionName:o.connectionNames[0],rootConnectionName:o.rootConnectionNames?.[0],point:r}],this.unsolvedSegments.splice(this.unsolvedSegments.indexOf(o),1),this.solvedSegments.push(o),e=!0}}if(!e&&n.length>0){let o=n[0];for(const c of n)c.connectionNames.length<o.connectionNames.length&&(o=c);const i=[...o.connectionNames].sort(),r=o.end.x-o.start.x,s=o.end.y-o.start.y,a=i.length,A=[];for(let c=1;c<=a;c++){const l=c/(a+1);A.push({x:o.start.x+r*l,y:o.start.y+s*l,z:o.availableZ[0]})}o.assignedPoints=i.map((c,l)=>({connectionName:c,rootConnectionName:o.rootConnectionNames?.[o.connectionNames.indexOf(c)],point:A[l]})),this.unsolvedSegments.splice(this.unsolvedSegments.indexOf(o),1),this.solvedSegments.push(o),e=!0}this.unsolvedSegments.length===0&&(this.solved=!0)}getNodesWithPortPoints(){if(!this.solved)throw new Error("CapacitySegmentToPointSolver not solved, can't give port points yet");const e=new Map;for(const n of this.solvedSegments){const o=n.capacityMeshNodeId,i=this.nodeMap[o];e.has(o)||e.set(o,{capacityMeshNodeId:o,portPoints:[],center:i.center,width:i.width,height:i.height}),e.get(o).portPoints.push(...n.assignedPoints.map(r=>({...r.point,connectionName:r.connectionName})))}return Array.from(e.values())}visualize(){const e={points:[],lines:this.solvedSegments.map(i=>({points:[i.start,i.end],step:4})),rects:[],circles:[],coordinateSystem:"cartesian",title:"Capacity Segment to Point Solver"};for(let i=0;i<this.solvedSegments.length;i++){const r=this.solvedSegments[i];for(let s=0;s<r.assignedPoints.length;s++){const a=r.assignedPoints[s],A={x:a.point.x,y:a.point.y},c={x:a.point.x+.05*a.point.z,y:a.point.y+.05*a.point.z};a.point.z!==0&&e.lines.push({points:[A,c],strokeColor:"rgba(0, 0, 0, 0.25)",strokeDash:"5 5",step:4}),e.points.push({x:c.x,y:c.y,label:[`${r.capacityMeshNodeId}-${a.connectionName}`,`z: ${r.availableZ.join(",")}`,`nodePortSegmentId: ${r.nodePortSegmentId}`].join(`
`),color:this.colorMap[a.connectionName],step:4})}}const n=[],o={};for(const i of this.solvedSegments){const r=i.capacityMeshNodeId;o[r]||(o[r]={});for(const s of i.assignedPoints)o[r][s.connectionName]||(o[r][s.connectionName]=[]),o[r][s.connectionName].push({x:s.point.x,y:s.point.y})}for(const i in o)for(const r in o[i]){const s=o[i][r];s.length>1&&n.push({points:s,step:4,strokeDash:"5 5",strokeColor:this.colorMap[r]||"#000"})}return e.lines.push(...n),e}},Wf=(t,e={})=>{const n=Math.min(...t.availableZ);return{center:!e.rectMargin||e.zOffset?{x:t.center.x+n*t.width*(e.zOffset??.05),y:t.center.y-n*t.width*(e.zOffset??.05)}:t.center,width:e.rectMargin?t.width-2*e.rectMargin:Math.max(t.width-.5,.8*t.width),height:e.rectMargin?t.height-2*e.rectMargin:Math.max(t.height-.5,.8*t.height),fill:t._containsObstacle?"rgba(255,0,0,0.1)":{"0,1":"rgba(0,0,0,0.1)",0:"rgba(0,200,200, 0.1)",1:"rgba(0,0,200, 0.1)"}[t.availableZ.join(",")]??"rgba(0,200,200,0.1)",layer:`z${t.availableZ.join(",")}`,label:[t.capacityMeshNodeId,`availableZ: ${t.availableZ.join(",")}`,t._containsTarget?"containsTarget":"",t._containsObstacle?"containsObstacle":""].filter(Boolean).join(`
`)}},PZn=class extends yr{getSolverName(){return"CapacityPathingSolver"}connectionsWithNodes;usedNodeCapacityMap;simpleRouteJson;nodes;edges;GREEDY_MULTIPLIER=1.1;MAX_CANDIDATES_IN_MEMORY=1e5;nodeMap;nodeEdgeMap;connectionNameToGoalNodeIds;colorMap;maxDepthOfNodes;activeCandidateStraightLineDistance;debug_lastNodeCostMap;hyperParameters;constructor({simpleRouteJson:e,nodes:n,edges:o,colorMap:i,MAX_ITERATIONS:r=1e6,hyperParameters:s={}}){super(),this.MAX_ITERATIONS=r,this.simpleRouteJson=e,this.nodes=n,this.edges=o,this.colorMap=i??{};const{connectionsWithNodes:a,connectionNameToGoalNodeIds:A}=this.getConnectionsWithNodes();this.connectionsWithNodes=a,this.connectionNameToGoalNodeIds=A,this.hyperParameters=s,this.usedNodeCapacityMap=new Map(this.nodes.map(c=>[c.capacityMeshNodeId,0])),this.nodeMap=new Map(this.nodes.map(c=>[c.capacityMeshNodeId,c])),this.nodeEdgeMap=tL(this.edges),this.maxDepthOfNodes=Math.max(...this.nodes.map(c=>c._depth??0)),this.debug_lastNodeCostMap=new Map}getTotalCapacity(e){const n=e._depth??0;return(this.maxDepthOfNodes-n+1)**2}getConnectionsWithNodes(){const e=[],n=this.nodes.filter(i=>i._containsTarget),o=new Map;for(const i of this.simpleRouteJson.connections){const r=[];for(const s of i.pointsToConnect){let a=this.nodes[0],A=Number.MAX_VALUE;for(const c of n){const l=Math.sqrt((c.center.x-s.x)**2+(c.center.y-s.y)**2);l<A&&(A=l,a=c)}r.push(a)}if(r.length<2)throw new Error(`Not enough nodes for connection "${i.name}", only ${r.length} found`);o.set(i.name,r.map(s=>s.capacityMeshNodeId)),e.push({connection:i,nodes:r,pathFound:!1,straightLineDistance:no(r[0].center,r[r.length-1].center)})}return e.sort((i,r)=>i.straightLineDistance-r.straightLineDistance),{connectionsWithNodes:e,connectionNameToGoalNodeIds:o}}currentConnectionIndex=0;candidates;visitedNodes;computeG(e,n,o){return e.g+this.getDistanceBetweenNodes(e.node,n)}computeH(e,n,o){return this.getDistanceBetweenNodes(n,o)}getBacktrackedPath(e){const n=[];let o=e;for(;o;)n.push(o.node),o=o.prevCandidate;return n}getNeighboringNodes(e){return this.nodeEdgeMap.get(e.capacityMeshNodeId).flatMap(n=>n.nodeIds.filter(o=>o!==e.capacityMeshNodeId)).map(n=>this.nodeMap.get(n))}getCapacityPaths(){const e=[];for(const n of this.connectionsWithNodes){const o=n.path;o&&e.push({capacityPathId:n.connection.name,connectionName:n.connection.name,rootConnectionName:n.connection.__rootConnectionNames?.[0],nodeIds:o.map(i=>i.capacityMeshNodeId)})}return e}doesNodeHaveCapacityForTrace(e,n){const o=this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0,i=this.getTotalCapacity(e);if(e.availableZ.length===1&&!e._containsTarget&&o>0)return!1;let r=0;return e.availableZ.length>1&&n.availableZ.length===1&&(r+=.5),o+r<i}canTravelThroughObstacle(e,n){return this.connectionNameToGoalNodeIds.get(n)?.includes(e.capacityMeshNodeId)??!1}getDistanceBetweenNodes(e,n){return Math.sqrt((e.center.x-n.center.x)**2+(e.center.y-n.center.y)**2)}reduceCapacityAlongPath(e){for(const n of e.path??[])this.usedNodeCapacityMap.set(n.capacityMeshNodeId,this.usedNodeCapacityMap.get(n.capacityMeshNodeId)+1)}isConnectedToEndGoal(e,n){return this.nodeEdgeMap.get(e.capacityMeshNodeId).some(o=>o.nodeIds.includes(n.capacityMeshNodeId))}_step(){const e=this.connectionsWithNodes[this.currentConnectionIndex];if(!e)return void(this.solved=!0);const[n,o]=e.nodes;this.candidates||(this.candidates=[{prevCandidate:null,node:n,f:0,g:0,h:0}],this.debug_lastNodeCostMap=new Map,this.visitedNodes=new Set([n.capacityMeshNodeId]),this.activeCandidateStraightLineDistance=no(n.center,o.center)),this.candidates.sort((s,a)=>s.f-a.f);const i=this.candidates.shift();if(this.candidates.length>this.MAX_CANDIDATES_IN_MEMORY&&this.candidates.splice(this.MAX_CANDIDATES_IN_MEMORY,this.candidates.length-this.MAX_CANDIDATES_IN_MEMORY),!i)return console.error(`Ran out of candidates on connection ${e.connection.name}`),this.currentConnectionIndex++,this.candidates=null,this.visitedNodes=null,void(this.failed=!0);if(this.isConnectedToEndGoal(i.node,o))return e.path=this.getBacktrackedPath({prevCandidate:i,node:o,f:0,g:0,h:0}),this.reduceCapacityAlongPath(e),this.currentConnectionIndex++,this.candidates=null,void(this.visitedNodes=null);const r=this.getNeighboringNodes(i.node);for(const s of r){if(this.visitedNodes?.has(s.capacityMeshNodeId)||!this.doesNodeHaveCapacityForTrace(s,i.node))continue;const a=this.connectionsWithNodes[this.currentConnectionIndex].connection.name;if(s._containsObstacle&&!this.canTravelThroughObstacle(s,a))continue;const A=this.computeG(i,s,o),c=this.computeH(i,s,o),l=A+c*this.GREEDY_MULTIPLIER;this.debug_lastNodeCostMap.set(s.capacityMeshNodeId,{f:l,g:A,h:c});const u={prevCandidate:i,node:s,f:l,g:A,h:c};this.candidates.push(u)}this.visitedNodes.add(i.node.capacityMeshNodeId)}visualize(){const e={lines:[],points:[],rects:[],circles:[]};if(this.connectionsWithNodes)for(let o=0;o<this.connectionsWithNodes.length;o++){const i=this.connectionsWithNodes[o];if(i.path&&i.path.length>0){const r=i.path.map(({center:{x:s,y:a},width:A,availableZ:c})=>({x:s+.005*A*(o%10+o%19),y:a+.005*A*(o%10+o%19),availableZ:c}));e.lines.push({points:r,strokeColor:this.colorMap[i.connection.name]});for(let s=0;s<r.length;s++){const a=r[s];e.points.push({x:a.x,y:a.y,label:[`conn: ${i.connection.name}`,`node: ${i.path[s].capacityMeshNodeId}`,`z: ${a.availableZ.join(",")}`].join(`
`)})}}}for(const o of this.nodes){const i=this.usedNodeCapacityMap.get(o.capacityMeshNodeId)??0,r=this.getTotalCapacity(o),s=this.debug_lastNodeCostMap.get(o.capacityMeshNodeId);e.rects.push({...Wf(o,{rectMargin:.025,zOffset:.01}),label:[`${o.capacityMeshNodeId}`,`${i}/${r}`,`${o.width.toFixed(2)}x${o.height.toFixed(2)}`,`g: ${s?.g!==void 0?s.g.toFixed(2):"?"}`,`h: ${s?.h!==void 0?s.h.toFixed(2):"?"}`,`f: ${s?.f!==void 0?s.f.toFixed(2):"?"}`,`z: ${o.availableZ.join(", ")}`].join(`
`),stroke:i>r+.5?"red":void 0})}if(this.connectionsWithNodes){for(const o of this.connectionsWithNodes)if(o.connection?.pointsToConnect)for(const i of o.connection.pointsToConnect)e.points.push({x:i.x,y:i.y,label:[`pointsToConnect ${o.connection.name}`].join(`
`)})}let n=this.connectionsWithNodes[this.currentConnectionIndex];if(!this.candidates&&this.currentConnectionIndex>0&&!this.connectionsWithNodes[this.currentConnectionIndex-1].path&&(n=this.connectionsWithNodes[this.currentConnectionIndex-1]),n){const[o,i]=n.connection.pointsToConnect;e.lines.push({points:[{x:o.x,y:o.y},{x:i.x,y:i.y}],strokeColor:"red",strokeDash:"10 5"})}if(this.candidates){const o=this.candidates.slice(0,5),i=this.connectionsWithNodes[this.currentConnectionIndex].connection.name;o.forEach((r,s)=>{const a=.5*(1-s/5),A=this.getBacktrackedPath(r);e.lines.push({points:A.map(({center:{x:c,y:l}})=>({x:c,y:l})),strokeColor:Es(this.colorMap[i]??"red",1-a)})})}return e}},MZn=class extends PZn{getSolverName(){return"CapacityPathingSolver5"}NEGATIVE_CAPACITY_PENALTY_FACTOR=1;REDUCED_CAPACITY_PENALTY_FACTOR=1;constructor(...t){super(...t),this.GREEDY_MULTIPLIER=2.5}get maxCapacityFactor(){return this.hyperParameters.MAX_CAPACITY_FACTOR??1}getTotalCapacity(t){return l7(t,this.maxCapacityFactor)}getNodeCapacityPenalty(t){const e=t.width+t.height,n=.05,o=this.getTotalCapacity(t)-(this.usedNodeCapacityMap.get(t.capacityMeshNodeId)??0);return o>2?n:(e-n)*Math.max(1,(2-o)/(e-n))+n}getDistanceBetweenNodes(t,e){const n=t.center.x-e.center.x,o=t.center.y-e.center.y;return Math.sqrt(n**2+o**2)}computeG(t,e,n){return t.g+this.getDistanceBetweenNodes(t.node,e)+this.getNodeCapacityPenalty(e)}computeH(t,e,n){return this.getDistanceBetweenNodes(e,n)+this.getNodeCapacityPenalty(e)}},r1t=class extends MZn{getSolverName(){return"CapacityPathingGreedySolver"}doesNodeHaveCapacityForTrace(e,n){return!0}getNodeCapacityPenalty(e){const n=this.getTotalCapacity(e)-(this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0)-1;if(n>0)return 0;let o=1;return e.availableZ.length===1&&(o=10),(.05+2*Math.abs(n))*o}};function s1t(t,e,n){const o=e.x-t.x,i=e.y-t.y;if(Math.abs(o)<1e-9&&Math.abs(i)<1e-9)return t;const r=n.width/2,s=n.height/2,a=n.center.x-r,A=n.center.x+r,c=n.center.y-s,l=n.center.y+s;let u=0,g=1/0;if(Math.abs(o)>1e-9){const h=(a-t.x)/o,d=(A-t.x)/o;u=Math.max(u,Math.min(h,d)),g=Math.min(g,Math.max(h,d))}else if(t.x<a||t.x>A)return t;if(Math.abs(i)>1e-9){const h=(c-t.y)/i,d=(l-t.y)/i;u=Math.max(u,Math.min(h,d)),g=Math.min(g,Math.max(h,d))}else if(t.y<c||t.y>l)return t;return g<u||u===1/0||u<-1e9?t:{x:t.x+o*u,y:t.y+i*u}}function DZn(t,e){const n=t.center,o=e.center,i=s1t(n,o,t),r=s1t(o,n,e),s=o.x-n.x,a=o.y-n.y,A=Math.sqrt(s*s+a*a);let c=i,l=r;if(A>1e-9){const u={x:s/A,y:a/A},g=.3*t.width,h=.3*e.width;g+h<Math.sqrt((r.x-i.x)**2+(r.y-i.y)**2)?(c={x:i.x+u.x*g,y:i.y+u.y*g},l={x:r.x-u.x*h,y:r.y-u.y*h}):(c=i,l=r)}return{lineStart:c,lineEnd:l}}var uae=t=>{const{usedCapacity:e,totalCapacity:n,layerCount:o}=t;if(e<n||n<1&&e<=1)return 0;if(o===1&&e>1)return 1-.01**e;const i=e/n-1;return 1-Math.exp(-2*i)},r6e=(t,e,n)=>{if(n._containsTarget||t<=e)return 0;const o=1-uae({usedCapacity:t,totalCapacity:e,layerCount:n.availableZ.length});return o<=0?-1e9:Math.log(o)},Zz=({totalNodeCapacityMap:t,usedNodeCapacityMap:e,nodeMap:n,sectionNodeIds:o})=>{let i=0;const r=o??new Set(e.keys());for(const s of r){if(!t.has(s))continue;const a=n.get(s);if(!a)continue;const A=t.get(s),c=e.get(s)??0;i+=r6e(c,A,a)}return i};function s6e({sectionNodes:t,sectionEdges:e,sectionConnectionTerminals:n,completedPaths:o,nodeMap:i,colorMap:r,centerNodeId:s,title:a,nodeOpacity:A=.1,usedNodeCapacityMap:c,totalCapacityMap:l}){const u={points:[],lines:[],rects:[],circles:[],title:a},g=new Set(t.map(h=>h.capacityMeshNodeId));for(const h of t){let d=`rgba(128, 128, 128, ${A})`,p=`rgba(128, 128, 128, ${A})`;const m=h.availableZ??[],_=m.includes(0),f=m.includes(1);_&&f?(d=`rgba(128, 0, 128, ${A})`,p=`rgba(128, 0, 128, ${A})`):_?(d=`rgba(0, 0, 255, ${A})`,p=`rgba(0, 0, 255, ${A})`):f&&(d=`rgba(255, 0, 0, ${A})`,p=`rgba(255, 0, 0, ${A})`),s&&h.capacityMeshNodeId===s&&(d=`rgba(0, 255, 0, ${A})`,p=`rgba(0, 128, 0, ${A})`),u.rects.push({...Wf(h),fill:d,stroke:p,label:`${h.capacityMeshNodeId}
(Section Node)
Z: ${m.join(",")}`});const I=u.rects.length-1;if(c&&l){const C=c.get(h.capacityMeshNodeId)??0,y=l.get(h.capacityMeshNodeId)??0,x=y>0?(C/y*100).toFixed(1):"N/A",E=uae({usedCapacity:C,totalCapacity:y,layerCount:h.availableZ.length});u.rects[I].label+=`
${C.toFixed(1)} / ${y.toFixed(1)}
${x}% (Pf: ${(100*E).toFixed(1)}%)`,E>.2&&(u.rects[I].stroke=Es("red",.7*(.8+A)))}}for(const h of e){const[d,p]=h.nodeIds,m=i.get(d),_=i.get(p);if(m&&_){const{lineStart:f,lineEnd:I}=DZn(m,_);u.lines.push({points:[f,I],strokeColor:`rgba(0, 0, 0, ${.2*Math.min(1,A/.1)})`})}}return n.forEach((h,d)=>{const p=i.get(h.startNodeId),m=i.get(h.endNodeId),_=r[h.connectionName]??"black",f=p&&g.has(p.capacityMeshNodeId),I=m&&g.has(m.capacityMeshNodeId),C=(d+d/50)%5;let y=0,x=0,E=0,B=0;if(f&&p){const S=.02*Math.min(p.width,p.height);y=S*C,x=S*C,u.points.push({x:p.center.x+y,y:p.center.y+x,color:_,label:`Start: ${h.connectionName}
(${h.startNodeId})`}),u.lines.push({points:[{x:p.center.x,y:p.center.y},{x:p.center.x+y,y:p.center.y+x}],strokeColor:"gray",strokeDash:"2 2"})}if(I&&m){const S=.02*Math.min(m.width,m.height);E=S*C,B=S*C,u.points.push({x:m.center.x+E,y:m.center.y+B,color:_,label:`End: ${h.connectionName}
(${h.endNodeId})`}),u.lines.push({points:[{x:m.center.x,y:m.center.y},{x:m.center.x+E,y:m.center.y+B}],strokeColor:"gray",strokeDash:"2 2"})}f&&I&&p&&m&&u.lines.push({points:[{x:p.center.x+y,y:p.center.y+x},{x:m.center.x+E,y:m.center.y+B}],strokeColor:_,strokeDash:"5 5"})}),o&&o.forEach((h,d)=>{if(h.path&&h.path.length>0){const p=r[h.connectionName]??"gray",m={x:(d+d/50)%5*.03,y:(d+d/50)%5*.03};u.lines.push({points:h.path.map(({center:{x:_,y:f}})=>({x:_+m.x,y:f+m.y})),strokeColor:Es(p,.2)})}}),u}var NZn=class extends yr{getSolverName(){return"CapacityPathingSingleSectionSolver"}GREEDY_MULTIPLIER=1.5;sectionNodes;sectionEdges;sectionConnectionTerminals;nodeMap;nodeEdgeMap;colorMap;usedNodeCapacityMap;totalNodeCapacityMap;centerNodeId;currentSectionScore=0;MAX_CANDIDATES_IN_MEMORY=1e4;currentConnectionIndex=0;candidates=null;visitedNodes=null;queuedNodes=null;activeCandidateStraightLineDistance;debug_lastNodeCostMap=new Map;maxCapacityFactor=1;constructor(e){super(),this.MAX_ITERATIONS=1e4,this.centerNodeId=e.centerNodeId,this.sectionNodes=e.sectionNodes,this.sectionEdges=e.sectionEdges,this.sectionConnectionTerminals=e.sectionConnectionTerminals.map(o=>({...o,path:void 0})),this.nodeMap=e.nodeMap??new Map(this.sectionNodes.map(o=>[o.capacityMeshNodeId,o])),this.nodeEdgeMap=e.nodeEdgeMap??tL(this.sectionEdges),this.colorMap=e.colorMap??{},this.usedNodeCapacityMap=new Map(this.sectionNodes.map(o=>[o.capacityMeshNodeId,0])),this.totalNodeCapacityMap=new Map(this.sectionNodes.map(o=>[o.capacityMeshNodeId,this.getTotalCapacity(o)]));const n=new Set(this.sectionNodes.map(o=>o.capacityMeshNodeId));this.currentSectionScore=Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:n}),e.hyperParameters?.SHUFFLE_SEED&&(this.sectionConnectionTerminals=D5(this.sectionConnectionTerminals,e.hyperParameters?.SHUFFLE_SEED))}getTotalCapacity(e){return l7(e,this.maxCapacityFactor)}getNodeCapacityPenalty(e){if(!this.nodeMap.has(e.capacityMeshNodeId))return 1/0;const n=this.getTotalCapacity(e)-(this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0)-1;if(n>0)return 0;let o=1;return e.availableZ.length===1&&(o=10),(.05+n**2*4)*o}getDistanceBetweenNodes(e,n){const o=e.center.x-n.center.x,i=e.center.y-n.center.y;return Math.sqrt(o**2+i**2)}computeG(e,n,o){return e.g+this.getDistanceBetweenNodes(e.node,n)+this.getNodeCapacityPenalty(n)}computeH(e,n,o){return this.getDistanceBetweenNodes(n,o)+this.getNodeCapacityPenalty(n)}getBacktrackedPath(e){const n=[];let o=e;for(;o;){if(n.push(o.node),!this.nodeMap.has(o.node.capacityMeshNodeId)){console.warn("Backtracked path went outside section bounds");break}o=o.prevCandidate}return n.reverse()}getNeighboringNodes(e){return this.nodeMap.has(e.capacityMeshNodeId)?this.nodeEdgeMap.get(e.capacityMeshNodeId)?.flatMap(n=>n.nodeIds.filter(o=>o!==e.capacityMeshNodeId)).map(n=>this.nodeMap.get(n)).filter(Boolean)??[]:[]}isConnectedToEndGoal(e,n){return!(!this.nodeMap.has(e.capacityMeshNodeId)||!this.nodeMap.has(n.capacityMeshNodeId))&&(this.nodeEdgeMap.get(e.capacityMeshNodeId)??[]).some(o=>o.nodeIds.includes(n.capacityMeshNodeId))}doesNodeHaveCapacityForTrace(e,n){return!0}reduceCapacityAlongPath(e){for(const n of e)if(this.usedNodeCapacityMap.has(n.capacityMeshNodeId)){const o=n.capacityMeshNodeId,i=this.nodeMap.get(o);if(!i){console.warn(`Node ${o} from path not found in section's nodeMap during score update.`);continue}const r=this.totalNodeCapacityMap.get(o),s=this.usedNodeCapacityMap.get(o)??0,a=r6e(s,r,i);this.currentSectionScore-=a;const A=s+1;this.usedNodeCapacityMap.set(o,A);const c=r6e(A,r,i);this.currentSectionScore+=c}}getSolvedSectionScore(){return this.currentSectionScore}_step(){const e=this.sectionConnectionTerminals[this.currentConnectionIndex];if(!e)return void(this.solved=!0);const n=this.nodeMap.get(e.startNodeId),o=this.nodeMap.get(e.endNodeId);if(!n||!o)return console.error(`Start or end node not found in section for connection ${e.connectionName}`),this.currentConnectionIndex++,this.candidates=null,void(this.visitedNodes=null);this.candidates||this._setupAStar(n,o);const i=this.candidates;if(i.length===0)return void this._handleCandidatesExhausted(e);i.sort((a,A)=>a.f-A.f);const r=i.shift();if(i.length>this.MAX_CANDIDATES_IN_MEMORY&&i.splice(this.MAX_CANDIDATES_IN_MEMORY,i.length-this.MAX_CANDIDATES_IN_MEMORY),this.visitedNodes.add(r.node.capacityMeshNodeId),r.node.capacityMeshNodeId===o.capacityMeshNodeId)return void this._handleGoalReached(r,e,o);const s=this.getNeighboringNodes(r.node);for(const a of s){if(this.queuedNodes?.has(a.capacityMeshNodeId)||!this.doesNodeHaveCapacityForTrace(a,r.node))continue;if(a._containsObstacle){const g=a.capacityMeshNodeId===e.startNodeId,h=a.capacityMeshNodeId===e.endNodeId;if(!g&&!h)continue}const A=this.computeG(r,a,o),c=this.computeH(r,a,o),l=A+c*this.GREEDY_MULTIPLIER;this.debug_lastNodeCostMap.set(a.capacityMeshNodeId,{f:l,g:A,h:c});const u={prevCandidate:r,node:a,f:l,g:A,h:c};this.queuedNodes?.add(a.capacityMeshNodeId),i.push(u)}}computeProgress(){const e=this.sectionConnectionTerminals.length;if(e===0)return 1;let n=this.currentConnectionIndex/e;if(this.currentConnectionIndex<e&&this.candidates&&this.candidates.length>0&&this.activeCandidateStraightLineDistance&&this.activeCandidateStraightLineDistance>0){const o=this.candidates.reduce((i,r)=>r.f<i.f?r:i);n+=Math.max(0,Math.min(1,1-o.h/this.activeCandidateStraightLineDistance))/e}else this.solved&&(n=1);return Math.min(1,n)}_setupAStar(e,n){this.candidates=[{prevCandidate:null,node:e,f:0,g:0,h:0}],this.visitedNodes=new Set([e.capacityMeshNodeId]),this.debug_lastNodeCostMap=new Map,this.activeCandidateStraightLineDistance=no(e.center,n.center);const o=this.computeH(null,e,n);this.candidates[0].h=o,this.candidates[0].f=o*this.GREEDY_MULTIPLIER,this.debug_lastNodeCostMap.set(e.capacityMeshNodeId,{f:this.candidates[0].f,g:0,h:o}),this.queuedNodes=new Set([e.capacityMeshNodeId])}_handleCandidatesExhausted(e){console.error(`Ran out of candidates for section connection ${e.connectionName}`),this.currentConnectionIndex++,this.candidates=null,this.visitedNodes=null,this.queuedNodes=null}_handleGoalReached(e,n,o){const i=this.getBacktrackedPath(e);n.path=i,this.reduceCapacityAlongPath(i),this.currentConnectionIndex++,this.candidates=null,this.visitedNodes=null,this.queuedNodes=null}visualize(){const e=this.sectionConnectionTerminals.filter(o=>o.path&&o.path.length>0).map(o=>({connectionName:o.connectionName,path:o.path})),n=s6e({sectionNodes:this.sectionNodes,sectionEdges:this.sectionEdges,sectionConnectionTerminals:this.sectionConnectionTerminals,completedPaths:e,nodeMap:this.nodeMap,colorMap:this.colorMap,centerNodeId:null,title:`Section Pathing: Conn ${this.currentConnectionIndex+1}/${this.sectionConnectionTerminals.length} (${this.sectionNodes.length} nodes)`,nodeOpacity:.1});for(const o of this.sectionNodes){const i=n.rects.findIndex(r=>r.label?.includes(o.capacityMeshNodeId));if(i!==-1){const r=this.debug_lastNodeCostMap.get(o.capacityMeshNodeId),s=this.usedNodeCapacityMap.get(o.capacityMeshNodeId)??0,a=this.getTotalCapacity(o),A=`${s.toFixed(1)}/${a.toFixed(1)}`,c=r?`f:${r.f.toFixed(1)} g:${r.g.toFixed(1)} h:${r.h.toFixed(1)}`:"cost:?";n.rects[i].label=[o.capacityMeshNodeId,`Cap: ${A}`,c,`Z: ${o.availableZ.join(",")}`].join(`
`),s>a&&(n.rects[i].stroke=Es("red",.7))}}if(this.candidates&&this.candidates.length>0){const o=this.candidates.slice().sort((a,A)=>a.f-A.f).slice(0,5),i=this.sectionConnectionTerminals[this.currentConnectionIndex],r=i?.connectionName??"unknown",s=this.colorMap[r]??"purple";o.forEach((a,A)=>{const c=.8*(1-A/5),l=this.getBacktrackedPath(a);l.length>0&&n.lines.push({points:l.map(({center:{x:u,y:g}})=>({x:u,y:g})),strokeColor:Es(s,1-c),strokeWidth:.05})})}return n}},gae=t=>Array.from({length:t},(e,n)=>n),RZn=class extends Zse{getSolverName(){return"HyperCapacityPathingSingleSectionSolver"}constructorParams;constructor(e){super(),this.MAX_ITERATIONS=1e5,this.constructorParams=e}computeG(e){return-e.getSolvedSectionScore()}computeH(e){return 0}getCombinationDefs(){const e=this.constructorParams.sectionConnectionTerminals.length;return e===2?[["orderings2_for2"]]:e===3?[["orderings6_for3"]]:e===4?[["orderings24_for4"]]:[["orderings30"]]}getFailureMessage(){return`All CapacityPathingSingleSection solvers failed for "${this.centerNodeId}"`}getHyperParameterDefs(){return[{name:"orderings2_for2",possibleValues:gae(2).map(e=>({SHUFFLE_SEED:e}))},{name:"orderings6_for3",possibleValues:gae(6).map(e=>({SHUFFLE_SEED:e}))},{name:"orderings24_for4",possibleValues:gae(24).map(e=>({SHUFFLE_SEED:e}))},{name:"orderings30",possibleValues:gae(30).map(e=>({SHUFFLE_SEED:e}))}]}generateSolver(e){return new NZn({...this.constructorParams,hyperParameters:{...this.constructorParams.hyperParameters,...e}})}onSolve({solver:e}){this.winningSolver=e}get centerNodeId(){return this.constructorParams.centerNodeId}get sectionNodes(){return this.constructorParams.sectionNodes}get sectionConnectionTerminals(){return this.winningSolver?.sectionConnectionTerminals}},TZn=t=>Math.floor(10*t)/10,kZn=class extends RZn{cacheHit=!1;cacheProvider;hasAttemptedToUseCache=!1;sectionNodeIdSet;cachedSectionConnectionTerminals=null;sectionScore=0;constructor(e){e.nodeMap=e.nodeMap??new Map(e.sectionNodes.map(n=>[n.capacityMeshNodeId,n])),super(e),this.sectionNodeIdSet=new Set(e.sectionNodes.map(n=>n.capacityMeshNodeId)),this.cacheProvider=e.cacheProvider===void 0?tB():e.cacheProvider}_step(){!this.hasAttemptedToUseCache&&this.cacheProvider&&this.attemptToUseCacheSync()||(super._step(),(this.solved||this.failed)&&this.cacheProvider&&this.saveToCacheSync())}_computeBfsOrderingOfNodesInSection(){const e=new Set(this.constructorParams.centerNodeId),n=[],o=[{ancestorCapacitySum:0,capacity:0,g:0,capacityMeshNodeId:this.constructorParams.centerNodeId}];for(;o.length>0;){o.sort((s,a)=>a.g-s.g);const i=o.pop();if(!i)break;n.push(i.capacityMeshNodeId);const r=this.constructorParams.nodeEdgeMap.get(i.capacityMeshNodeId).flatMap(s=>s.nodeIds).filter(s=>!e.has(s)).filter(s=>this.sectionNodeIdSet.has(s));for(const s of r){e.add(s);const a=this.constructorParams.nodeMap.get(s),A=l7(a);o.push({ancestorCapacitySum:i.g,capacity:A,g:i.g+A,capacityMeshNodeId:s})}}return n}computeCacheKeyAndTransform(){const e=this._computeBfsOrderingOfNodesInSection(),n=new Map,o=new Map;e.forEach((g,h)=>{const d=`node${h}`;n.set(g,d),o.set(d,g)});const i={};for(const g of e){const h=n.get(g),d=this.constructorParams.nodeMap.get(g),p=l7(d);i[h]=TZn(p).toFixed(1)}const r=new Set,s=[];for(const g of e){const h=n.get(g),d=this.constructorParams.nodeEdgeMap.get(g)??[];for(const p of d){const m=p.nodeIds.find(_=>_!==g);if(this.sectionNodeIdSet.has(m)){const _=[h,n.get(m)].sort(),f=`${_[0]}-${_[1]}`;r.has(f)||(s.push(_),r.add(f))}}}s.sort((g,h)=>g[0]!==h[0]?g[0].localeCompare(h[0]):g[1].localeCompare(h[1]));const a={},A=new Map,c=new Map;for(const g of this.constructorParams.sectionConnectionTerminals){const h=n.get(g.startNodeId),d=n.get(g.endNodeId),[p,m]=[h,d].sort(),_=`${p}->${m}`,f=c.get(_)??0;c.set(_,f+1);const I=`${p}->${m}::${f}`;a[I]={start:p,end:m},A.set(I,g.connectionName)}const l=`capacitypathing:${$9e({node_capacity_map:i,node_edge_map:s,terminals:a})}`,u={cacheSpaceToRealConnectionId:A,cacheSpaceToRealNodeId:o};return this.cacheKey=l,this.cacheToSolveSpaceTransform=u,{cacheKey:l,cacheToSolveSpaceTransform:u}}applyCachedSolution(e){if(!this.cacheToSolveSpaceTransform)return console.error("Cache transform not available, cannot apply cached solution."),void(this.failed=!0);if(!e.success)return this.failed=!0,void(this.cacheHit=!0);this.cachedSectionConnectionTerminals=[];const{cacheSpaceToRealNodeId:n,cacheSpaceToRealConnectionId:o}=this.cacheToSolveSpaceTransform;for(const[i,r]of Object.entries(e.solutionPaths)){const s=o.get(i);if(!s){console.warn(`Could not find real connection name for ${i}`);continue}const a=this.constructorParams.sectionConnectionTerminals.find(c=>c.connectionName===s);if(!a){console.warn(`Could not find original terminal for connection name ${s}`);continue}const A=r.map(c=>{const l=n.get(c);if(!l)throw new Error(`Could not map cache node ID ${c} to real node ID for connection ${s}`);const u=this.constructorParams.nodeMap.get(l);if(!u)throw new Error(`Could not find node with ID ${l} in nodeMap for connection ${s}`);return u});this.cachedSectionConnectionTerminals.push({...a,path:A})}this.sectionScore=e.sectionScore,this.solved=!0,this.cacheHit=!0}attemptToUseCacheSync(){if(this.hasAttemptedToUseCache=!0,!this.cacheProvider?.isSyncCache)return console.log("Cache provider is not synchronous, skipping sync cache check."),!1;if(this.cacheKey||this.computeCacheKeyAndTransform(),!this.cacheKey)return console.error("Failed to compute cache key."),!1;try{const e=this.cacheProvider.getCachedSolutionSync(this.cacheKey);if(e)return this.applyCachedSolution(e),!0}catch(e){console.error("Error attempting to use cache:",e)}return!1}saveToCacheSync(){if(!this.cacheKey)return void console.error("Cannot save to cache without cache key.");if(!this.cacheToSolveSpaceTransform)return void console.error("Cache transform not available, cannot save solution to cache.");let e;if(this.failed)e={success:!1};else{if(!this.solved)return;{const n={},{cacheSpaceToRealNodeId:o,cacheSpaceToRealConnectionId:i}=this.cacheToSolveSpaceTransform,r=new Map;for(const[A,c]of o)r.set(c,A);const s=new Map;for(const[A,c]of i)s.set(c,A);const a=[];if(super.sectionConnectionTerminals){for(const A of super.sectionConnectionTerminals)if(A.path&&A.path.length>0){const c=A.path.map(l=>l.capacityMeshNodeId);a.push([A.connectionName,c])}}for(const[A,c]of a){const l=s.get(A);if(!l){console.warn(`Could not find cache space connection ID for ${A} when saving to cache.`);continue}const u=c.map(g=>{const h=r.get(g);if(!h)throw new Error(`Could not map real node ID ${g} to cache node ID for connection ${A} when saving to cache.`);return h});n[l]=u}e={success:!0,sectionScore:this.sectionScore,solutionPaths:n}}}try{this.cacheProvider?.setCachedSolutionSync(this.cacheKey,e)}catch(n){console.error("Error saving solution to cache:",n)}}get sectionConnectionTerminals(){return this.cacheHit&&this.solved&&this.cachedSectionConnectionTerminals?(console.log("returning the cached section connection terminals"),this.cachedSectionConnectionTerminals):super.sectionConnectionTerminals}visualize(){return this.cacheHit?s6e({sectionNodes:this.constructorParams.sectionNodes,sectionEdges:this.constructorParams.sectionEdges,sectionConnectionTerminals:this.cachedSectionConnectionTerminals,completedPaths:this.cachedSectionConnectionTerminals.map(e=>({connectionName:e.connectionName,path:e.path})),nodeMap:this.constructorParams.nodeMap,colorMap:this.constructorParams.colorMap,title:"CachedHyperCapacityPathingSingleSectionSolver"}):super.visualize()}},FZn=class extends yr{getSolverName(){return"CapacityPathingMultiSectionSolver"}simpleRouteJson;nodes;edges;nodeEdgeMap;connectionsWithNodes=[];colorMap;initialSolver;cacheProvider;stage="initialization";nodeMap=new Map;allNodeIdsSet;usedNodeCapacityMap=new Map;totalNodeCapacityMap=new Map;nodeCapacityPercentMap=new Map;nodeOptimizationAttemptCountMap=new Map;currentSection=null;sectionSolver=null;currentScheduleIndex=0;stats;OPTIMIZATION_SCHEDULE=[{MAX_ATTEMPTS_PER_NODE:1,MAX_EXPANSION_DEGREES:3,MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE:.05},{MAX_ATTEMPTS_PER_NODE:2,MAX_EXPANSION_DEGREES:5,MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE:.2},{MAX_ATTEMPTS_PER_NODE:3,MAX_EXPANSION_DEGREES:7,MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE:.9}];get currentSchedule(){return this.OPTIMIZATION_SCHEDULE[this.currentScheduleIndex]??null}constructor(e){super(),this.stats={successfulOptimizations:0,failedOptimizations:0,failedSectionSolvers:0,startingScore:0,scheduleScores:this.OPTIMIZATION_SCHEDULE.map(({MAX_EXPANSION_DEGREES:n})=>({maxExpansionDegrees:n,endingScore:0,endingHighestNodePf:0,sectionAttempts:0})),cacheHits:0,cacheMisses:0},this.MAX_ITERATIONS=e.MAX_ITERATIONS??1e7,this.cacheProvider=e.cacheProvider,this.simpleRouteJson=e.simpleRouteJson,this.nodes=e.nodes,this.edges=e.edges,this.nodeEdgeMap=tL(this.edges),this.colorMap=e.colorMap??{},this.nodeMap=new Map(this.nodes.map(n=>[n.capacityMeshNodeId,n])),this.nodeEdgeMap=tL(this.edges),this.initialSolver=e.initialPathingSolver||new r1t({simpleRouteJson:this.simpleRouteJson,nodes:this.nodes,edges:this.edges,colorMap:this.colorMap}),this.activeSubSolver=this.initialSolver;for(const n of this.nodes){const o=this.initialSolver.getTotalCapacity(n);this.totalNodeCapacityMap.set(n.capacityMeshNodeId,o)}this.allNodeIdsSet=new Set(this.nodes.map(n=>n.capacityMeshNodeId))}_stepInitialization(){if(this.initialSolver?.step(),this.initialSolver?.failed)return this.failed=!0,void(this.error=this.initialSolver.error);if(this.initialSolver?.solved){this.usedNodeCapacityMap=new Map(this.initialSolver.usedNodeCapacityMap);for(const e of this.nodes){const n=this.totalNodeCapacityMap.get(e.capacityMeshNodeId)??0,o=this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0,i=n>0?o/n:0;this.nodeCapacityPercentMap.set(e.capacityMeshNodeId,i),this.nodeOptimizationAttemptCountMap.set(e.capacityMeshNodeId,0)}this.connectionsWithNodes=this.initialSolver.connectionsWithNodes,this.stats.startingScore=Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:this.allNodeIdsSet}),this.stage="section-optimization"}}_getNextNodeToOptimize(){let e=0,n=null;for(const o of this.nodes){if(o._containsTarget)continue;const i=this.nodeOptimizationAttemptCountMap.get(o.capacityMeshNodeId),r=this.totalNodeCapacityMap.get(o.capacityMeshNodeId),s=uae({usedCapacity:this.usedNodeCapacityMap.get(o.capacityMeshNodeId)??0,totalCapacity:r,layerCount:o.availableZ.length}),a=s/(i+1);i<this.currentSchedule.MAX_ATTEMPTS_PER_NODE&&a>e&&s>this.currentSchedule.MINIMUM_PROBABILITY_OF_FAILURE_TO_OPTIMIZE&&(e=a,n=o.capacityMeshNodeId)}return n}getOverallScore(){let e=0;for(const n of this.nodes){if(n._containsTarget)continue;const o=this.totalNodeCapacityMap.get(n.capacityMeshNodeId),i=uae({usedCapacity:this.usedNodeCapacityMap.get(n.capacityMeshNodeId)??0,totalCapacity:o,layerCount:n.availableZ.length});i>e&&(e=i)}return{highestNodePf:e,score:Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:this.allNodeIdsSet})}}_stepSectionOptimization(){if(!this.sectionSolver){const e=this._getNextNodeToOptimize();if(!e){const{highestNodePf:o,score:i}=this.getOverallScore();return this.stats.scheduleScores[this.currentScheduleIndex].endingHighestNodePf=o,this.stats.scheduleScores[this.currentScheduleIndex].endingScore=i,this.currentScheduleIndex++,void(this.currentSchedule||(this.solved=!0))}const n=(o=>{const{centerNodeId:i,connectionsWithNodes:r,nodeMap:s,edges:a,nodeEdgeMap:A,expansionDegrees:c}=o,l=new Set,u=[{nodeId:i,depth:0}];l.add(i);let g=0;for(;g<u.length;){const{nodeId:m,depth:_}=u[g++];if(_>=c)continue;const f=A.get(m)?.flatMap(I=>I.nodeIds.filter(C=>C!==m))??[];for(const I of f)l.has(I)||(l.add(I),u.push({nodeId:I,depth:_+1}))}const h=Array.from(l).map(m=>s.get(m)),d=a.filter(m=>{const[_,f]=m.nodeIds;return l.has(_)&&l.has(f)}),p=[];for(const m of r){if(!m.path)continue;let _=null,f=null;for(const I of m.path)if(l.has(I.capacityMeshNodeId)){_=I.capacityMeshNodeId;break}for(let I=m.path.length-1;I>=0;I--){const C=m.path[I];if(l.has(C.capacityMeshNodeId)){f=C.capacityMeshNodeId;break}}_&&f&&p.push({connectionName:m.connection.name,startNodeId:_,endNodeId:f})}return{sectionConnectionTerminals:p,sectionNodes:h,sectionEdges:d,centerNodeId:i}})({centerNodeId:e,connectionsWithNodes:this.connectionsWithNodes,nodeMap:this.nodeMap,edges:this.edges,expansionDegrees:this.currentSchedule.MAX_EXPANSION_DEGREES,nodeEdgeMap:this.nodeEdgeMap});this.stats.scheduleScores[this.currentScheduleIndex].sectionAttempts++,this.currentSection=n,this.sectionSolver=new kZn({sectionNodes:this.currentSection.sectionNodes,sectionEdges:this.currentSection.sectionEdges,sectionConnectionTerminals:this.currentSection.sectionConnectionTerminals,colorMap:this.colorMap,centerNodeId:this.currentSection.centerNodeId,nodeEdgeMap:this.nodeEdgeMap,hyperParameters:{EXPANSION_DEGREES:this.currentSchedule.MAX_EXPANSION_DEGREES},cacheProvider:this.cacheProvider}),this.activeSubSolver=this.sectionSolver,this.nodeOptimizationAttemptCountMap.set(e,(this.nodeOptimizationAttemptCountMap.get(e)??0)+1)}if(this.sectionSolver.step(),(this.sectionSolver.failed||this.sectionSolver.solved)&&(this.sectionSolver.cacheHit?this.stats.cacheHits++:this.stats.cacheMisses++),this.sectionSolver.failed)return console.warn(`Section solver failed for node ${this.currentSection.centerNodeId}. Error: ${this.sectionSolver.error}`),this.stats.failedSectionSolvers++,this.stats.failedOptimizations++,this.sectionSolver=null,void(this.activeSubSolver=null);if(this.sectionSolver.solved){const e=this.sectionSolver.sectionConnectionTerminals,n=this.sectionSolver.sectionNodes,o=this.sectionSolver.centerNodeId;if(this.sectionSolver=null,this.activeSubSolver=null,!e)return void console.warn(`Pathing sub-solver for section ${this.currentSection.centerNodeId} did not complete successfully. Discarding results.`);const i=new Set(n.map(A=>A.capacityMeshNodeId)),r=Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeMap:this.nodeMap,sectionNodeIds:i}),s=new Map(this.usedNodeCapacityMap),a=e;for(const A of a){const c=this.connectionsWithNodes.find(l=>l.connection.name===A.connectionName);if(c?.path){for(const l of c.path)if(i.has(l.capacityMeshNodeId)){const u=s.get(l.capacityMeshNodeId)??0;s.set(l.capacityMeshNodeId,Math.max(0,u-1))}}}for(const A of a)if(A.path)for(const c of A.path)i.has(c.capacityMeshNodeId)&&s.set(c.capacityMeshNodeId,(s.get(c.capacityMeshNodeId)??0)+1);Zz({totalNodeCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:s,nodeMap:this.nodeMap,sectionNodeIds:i})>r?(this.stats.successfulOptimizations++,this._mergeSolvedSectionPaths({centerNodeId:o,sectionConnectionTerminals:e}),this._recalculateNodeCapacityUsage()):this.stats.failedOptimizations++}}_mergeSolvedSectionPaths({centerNodeId:e,sectionConnectionTerminals:n}){for(const o of n){if(!o.path){console.warn(`No path found for connection ${o.connectionName} in section ${e}`);continue}const i=this.connectionsWithNodes.find(d=>d.connection.name===o.connectionName);if(!i||!i.path){console.warn(`Original connection or path not found for ${o.connectionName} while merging section ${e}`);continue}const r=i.path,s=o.path,a=r.findIndex(d=>d.capacityMeshNodeId===o.startNodeId),A=r.findIndex(d=>d.capacityMeshNodeId===o.endNodeId);if(a===-1||A===-1){console.warn(`Could not find start/end nodes (${o.startNodeId}/${o.endNodeId}) in original path for ${o.connectionName}`);continue}const[c,l]=a<=A?[a,A]:[A,a],u=r.slice(0,c),g=r.slice(l+1);let h=s;if(s.length>0&&r[c]&&s[0].capacityMeshNodeId!==r[c].capacityMeshNodeId){if(s[s.length-1].capacityMeshNodeId!==r[c].capacityMeshNodeId){console.warn(`New section path for ${o.connectionName} doesn't align with original path boundaries. Skipping merge for this connection.`);continue}h=[...s].reverse()}i.path=[...u,...h,...g]}}_recalculateNodeCapacityUsage(){this.usedNodeCapacityMap.clear();for(const e of this.connectionsWithNodes)if(e.path)for(const n of e.path)this.usedNodeCapacityMap.set(n.capacityMeshNodeId,(this.usedNodeCapacityMap.get(n.capacityMeshNodeId)??0)+1);for(const e of this.nodes){const n=this.totalNodeCapacityMap.get(e.capacityMeshNodeId)??0,o=this.usedNodeCapacityMap.get(e.capacityMeshNodeId)??0,i=n>0?o/n:0;this.nodeCapacityPercentMap.set(e.capacityMeshNodeId,i)}}getCapacityPaths(){const e=[];for(const n of this.connectionsWithNodes){const o=n.path;o&&e.push({capacityPathId:n.connection.name,connectionName:n.connection.name,nodeIds:o.map(i=>i.capacityMeshNodeId)})}return e}_step(){this.iterations>=this.MAX_ITERATIONS-1?this.solved=!0:this.stage==="initialization"?this._stepInitialization():this.stage==="section-optimization"&&this._stepSectionOptimization()}visualize(){const e=this.connectionsWithNodes.filter(n=>n.path&&n.path.length>0).map(n=>({connectionName:n.connection.name,path:n.path}));return s6e({nodeMap:this.nodeMap,sectionConnectionTerminals:this.connectionsWithNodes.map(n=>({connectionName:n.connection.name,startNodeId:n.path?.[0]?.capacityMeshNodeId,endNodeId:n.path?.[n.path.length-1]?.capacityMeshNodeId})),completedPaths:e,sectionNodes:this.nodes,sectionEdges:this.edges,colorMap:this.colorMap,totalCapacityMap:this.totalNodeCapacityMap,usedNodeCapacityMap:this.usedNodeCapacityMap,nodeOpacity:.05,title:"Capacity Pathing Multi-Section Solver (Solved)"})}},LZn=class extends yr{getSolverName(){return"DeadEndSolver"}removedNodeIds;targetNodeIds;leaves;leavesIndex;adjacencyList;nodeMap;nodes;edges;constructor({nodes:e,edges:n}){super(),this.MAX_ITERATIONS=e.length,this.nodes=e,this.edges=n,this.removedNodeIds=new Set,this.targetNodeIds=new Set(e.filter(o=>o._containsTarget).map(o=>o.capacityMeshNodeId)),this.adjacencyList=new Map(e.map(({capacityMeshNodeId:o})=>[o,new Set]));for(const{nodeIds:[o,i]}of n)this.adjacencyList.get(o).add(i),this.adjacencyList.get(i).add(o);this.leavesIndex=0,this.leaves=[...this.adjacencyList.entries()].filter(([o,i])=>i.size===1).filter(([o,i])=>!this.targetNodeIds.has(o)).map(([o,i])=>o)}_step(){if(this.leavesIndex===this.leaves.length)return void(this.solved=!0);const e=this.leaves[this.leavesIndex],n=this.adjacencyList.get(e);if(!n||n.size===0)return this.removedNodeIds.add(e),this.adjacencyList.delete(e),this.leavesIndex+=1,void(this.leavesIndex===this.leaves.length&&(this.solved=!0));const[o]=n,i=o?this.adjacencyList.get(o):void 0;if(!o||!i)return this.removedNodeIds.add(e),this.adjacencyList.delete(e),this.leavesIndex+=1,void(this.leavesIndex===this.leaves.length&&(this.solved=!0));i.delete(e),this.removedNodeIds.add(e),this.adjacencyList.delete(e),i.size!==1||this.targetNodeIds.has(o)||this.leaves.push(o),this.leavesIndex+=1,this.leavesIndex===this.leaves.length&&(this.solved=!0)}visualize(){if(!this.nodeMap){this.nodeMap=new Map;for(const o of this.nodes)this.nodeMap.set(o.capacityMeshNodeId,o)}const e=new Map;for(const o of this.edges)for(const i of o.nodeIds)e.set(i,1+(e.get(i)??0));const n={lines:[],points:[],rects:this.nodes.map(o=>{const i=Math.min(...o.availableZ);return{width:Math.max(o.width-2,.8*o.width),height:Math.max(o.height-2,.8*o.height),center:{x:o.center.x+i*o.width*.05,y:o.center.y-i*o.width*.05},fill:o._containsObstacle?"rgba(255,0,0,0.1)":{"0,1":"rgba(0,0,0,0.1)",0:"rgba(0,200,200, 0.1)",1:"rgba(0,0,200, 0.1)"}[o.availableZ.join(",")]??"rgba(0,200,200,0.1)",label:[o.capacityMeshNodeId,`availableZ: ${o.availableZ.join(",")}`,`target? ${o._containsTarget??!1}`,`obs? ${o._containsObstacle??!1}`,`conn: ${e.get(o.capacityMeshNodeId)??0}`].join(`
`),layer:`z${o.availableZ.join(",")}`}}),circles:[]};for(const o of this.edges){const i=this.nodeMap.get(o.nodeIds[0]),r=this.nodeMap.get(o.nodeIds[1]);if(i?.center&&r?.center){const s=Math.min(...i.availableZ),a=Math.min(...r.availableZ),A={x:i.center.x+s*i.width*.05,y:i.center.y-s*i.width*.05},c={x:r.center.x+a*r.width*.05,y:r.center.y-a*r.width*.05},l=Array.from(new Set([...i.availableZ,...r.availableZ])).sort();n.lines.push({layer:`z${l.join(",")}`,points:[A,c],strokeDash:i.availableZ.join(",")===r.availableZ.join(",")?void 0:"10 5",strokeColor:o.nodeIds.some(u=>this.removedNodeIds.has(u))?Es("black",.9):void 0})}}return n}},HZn=class extends j7e{getSolverName(){return"NoOffBoardMultipleHighDensityRouteStitchSolver"}constructor(e){super(e),this.unsolvedRoutes=[];const n=new Map;for(const o of e.hdRoutes){const i=n.get(o.connectionName)||[];i.push(o),n.set(o.connectionName,i)}for(const[o,i]of n.entries()){const r=e.connections.find(A=>A.name===o);if(!r)continue;const s={...r.pointsToConnect[0],z:Kr(tI(r.pointsToConnect[0]),e.layerCount)},a={...r.pointsToConnect[1],z:Kr(tI(r.pointsToConnect[1]),e.layerCount)};this.unsolvedRoutes.push({connectionName:o,hdRoutes:i,start:s,end:a})}for(const o of e.connections)n.has(o.name)||this.unsolvedRoutes.push({connectionName:o.name,hdRoutes:[],start:{...o.pointsToConnect[0],z:Kr(tI(o.pointsToConnect[0]),e.layerCount)},end:{...o.pointsToConnect[1],z:Kr(tI(o.pointsToConnect[1]),e.layerCount)}})}},dae=.005,OZn=class extends yr{getSolverName(){return"SingleLayerNodeMergerSolver"}nodeMap;currentBatchNodeIds;absorbedNodeIds;nextBatchNodeIds;batchHadModifications;hasComputedAdjacentNodeIds=!1;newNodes;constructor(e){super(),this.nodeMap=new Map,this.MAX_ITERATIONS=1e5;for(const o of e)this.nodeMap.set(o.capacityMeshNodeId,o);this.newNodes=[],this.absorbedNodeIds=new Set;const n=[];for(const o of e)o.availableZ.length>1?(this.newNodes.push(o),this.absorbedNodeIds.add(o.capacityMeshNodeId)):n.push([o,o.width*o.height]);n.sort((o,i)=>o[1]-i[1]);for(const[o,i]of n){const r={...o,center:{...o.center}};this.nodeMap.set(o.capacityMeshNodeId,r)}this.currentBatchNodeIds=n.map(([o])=>o.capacityMeshNodeId),this.nextBatchNodeIds=[],this.batchHadModifications=!1}computeAdjacentNodeIdsForFirstBatch(e){const n=Math.max(...e.map(i=>Math.max(...i.availableZ))),o=[];for(let i=0;i<=n;i++)o.push(new B7e(e.filter(r=>r.availableZ[0]===i)));for(const i of e){const r=[],s=o[i.availableZ[0]].getNodesInArea(i.center.x,i.center.y,4*i.width,4*i.height);for(const a of s)a._containsTarget&&a._targetConnectionName!==i._targetConnectionName||i._containsTarget&&(!a._containsTarget||a._targetConnectionName!==i._targetConnectionName)||a.capacityMeshNodeId!==i.capacityMeshNodeId&&Use(i,a)&&r.push(a);i._adjacentNodeIds=r.map(a=>a.capacityMeshNodeId)}}getAdjacentSameLayerUnprocessedNodes(e){return this.getAdjacentSameLayerUnprocessedNodes2(e)}getAdjacentSameLayerUnprocessedNodes2(e){const n=[],o=Array.from(new Set((e._adjacentNodeIds??[]).map(i=>this.nodeMap.get(i)))).filter(i=>i&&i.capacityMeshNodeId!==e.capacityMeshNodeId);o.sort((i,r)=>i.width*i.height-r.width*r.height);for(const i of o)this.absorbedNodeIds.has(i.capacityMeshNodeId)||n.push(i);return n}_step(){this.hasComputedAdjacentNodeIds||(this.computeAdjacentNodeIdsForFirstBatch(this.currentBatchNodeIds.map(l=>this.nodeMap.get(l))),this.hasComputedAdjacentNodeIds=!0);let e=this.currentBatchNodeIds.pop();for(;e&&this.absorbedNodeIds.has(e);)e=this.currentBatchNodeIds.pop();if(!e)return this.batchHadModifications?(this.currentBatchNodeIds=this.nextBatchNodeIds.sort((l,u)=>{const g=this.nodeMap.get(l),h=this.nodeMap.get(u);return g.width*g.height-h.width*h.height}),this.nextBatchNodeIds=[],void(this.batchHadModifications=!1)):(this.solved=!0,void this.newNodes.push(...this.nextBatchNodeIds.map(l=>this.nodeMap.get(l))));const n=this.nodeMap.get(e);let o=!1;const i=this.getAdjacentSameLayerUnprocessedNodes(n);if(i.length===0)return void this.nextBatchNodeIds.push(e);const r=l=>{for(const u of l)this.absorbedNodeIds.add(u.capacityMeshNodeId);n._adjacentNodeIds=Array.from(new Set([...n._adjacentNodeIds??[],...l.flatMap(u=>u._adjacentNodeIds??[])].filter(u=>u!==n.capacityMeshNodeId&&!this.absorbedNodeIds.has(u))))},s=i.filter(l=>l.center.x<n.center.x&&Math.abs(l.center.y-n.center.y)<n.height/2);if(s.length>0){const{width:l,height:u}=s[0],g=s.every(h=>h.width===l&&h.height===u);Math.abs(s.reduce((h,d)=>h+d.height,0)-n.height)<dae&&g&&(n.width+=l,n.center.x=n.center.x-l/2,r(s),o=!0)}const a=i.filter(l=>l.center.x>n.center.x&&Math.abs(l.center.y-n.center.y)<n.height/2);if(a.length>0&&!o){const{width:l,height:u}=a[0],g=a.every(h=>h.width===l&&h.height===u);Math.abs(a.reduce((h,d)=>h+d.height,0)-n.height)<dae&&g&&(n.width+=l,n.center.x=n.center.x+l/2,r(a),o=!0)}const A=i.filter(l=>l.center.y>n.center.y&&Math.abs(l.center.x-n.center.x)<n.width/2);if(A.length>0&&!o){const{width:l,height:u}=A[0],g=A.every(h=>h.width===l&&h.height===u);Math.abs(A.reduce((h,d)=>h+d.width,0)-n.width)<dae&&g&&(n.height+=u,n.center.y=n.center.y+u/2,r(A),o=!0)}const c=i.filter(l=>l.center.y<n.center.y&&Math.abs(l.center.x-n.center.x)<n.width/2);if(c.length>0&&!o){const{width:l,height:u}=c[0],g=c.every(h=>h.width===l&&h.height===u);Math.abs(c.reduce((h,d)=>h+d.width,0)-n.width)<dae&&g&&(n.height+=u,n.center.y=n.center.y-u/2,r(c),o=!0)}o?(this.batchHadModifications=!0,this.currentBatchNodeIds.push(e)):this.nextBatchNodeIds.unshift(e)}visualize(){const e={circles:[],lines:[],points:[],rects:[],coordinateSystem:"cartesian",title:"Same Layer Node Merger"};for(const i of this.newNodes)e.rects.push(Wf(i));const n=this.currentBatchNodeIds[this.currentBatchNodeIds.length-1];let o;n&&(o=this.getAdjacentSameLayerUnprocessedNodes(this.nodeMap.get(n)));for(const i of this.currentBatchNodeIds){const r=this.nodeMap.get(i);if(!this.absorbedNodeIds.has(i)&&r){const s=Wf(r,{rectMargin:.01});i===n?s.stroke="rgba(0, 255, 0, 0.8)":o?.some(a=>a.capacityMeshNodeId===i)?s.stroke="rgba(128, 0, 128, 0.8)":s.stroke="rgba(255, 165, 0, 0.8)",s.layer=`z${r.availableZ.join(",")}`,s.label=`${s.label}
(unprocessed)`,e.rects.push(s)}}for(const i of this.nextBatchNodeIds){const r=this.nodeMap.get(i);if(!this.absorbedNodeIds.has(i)&&r){const s=Wf(r,{rectMargin:.01});s.layer=`z${r.availableZ.join(",")}`,s.stroke="rgba(0, 217, 255, 0.8)",s.label=`${s.label}
x: ${r.center.x}, y: ${r.center.y}
${r.width}x${r.height}
(next batch)`,e.rects.push(s)}}return e}},GZn=class extends yr{getSolverName(){return"StrawSolver"}multiLayerNodes;strawNodes;skippedNodes;unprocessedNodes;strawSize;nodeIdCounter;constructor(e){super(),this.MAX_ITERATIONS=1e5,this.strawSize=e.strawSize??.5,this.multiLayerNodes=[],this.strawNodes=[],this.skippedNodes=[],this.nodeIdCounter=0,this.unprocessedNodes=[];for(const n of e.nodes)n.availableZ.length===1?this.unprocessedNodes.push(n):this.multiLayerNodes.push(n)}getCapacityOfMultiLayerNodesWithinBounds(e){let n=0;for(const o of this.multiLayerNodes){const i=o.center.x-o.width/2,r=o.center.x+o.width/2,s=o.center.y-o.height/2,a=o.center.y+o.height/2,A=Math.max(e.minX,i),c=Math.min(e.maxX,r),l=Math.max(e.minY,s),u=Math.min(e.maxY,a);if(A<c&&l<u){const g=(c-A)*(u-l)/(o.width*o.height);n+=l7(o)*g}}return n}getSurroundingCapacities(e){const n=Math.min(e.width,e.height);return{leftSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x-e.width/2-n,maxX:e.center.x-e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2}),rightSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x+e.width/2,maxX:e.center.x+e.width/2+n,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2}),topSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2-n,maxY:e.center.y-e.height/2}),bottomSurroundingCapacity:this.getCapacityOfMultiLayerNodesWithinBounds({minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y+e.height/2,maxY:e.center.y+e.height/2+n})}}createStrawsForNode(e){const n=[],{leftSurroundingCapacity:o,rightSurroundingCapacity:i,topSurroundingCapacity:r,bottomSurroundingCapacity:s}=this.getSurroundingCapacities(e);if(1*(o+i)>r+s){const a=Math.floor(e.height/this.strawSize),A=e.height/a;for(let c=0;c<a;c++){const l=e.center.y-e.height/2+c*A+A/2;n.push({capacityMeshNodeId:`${e.capacityMeshNodeId}_straw${c}`,center:{x:e.center.x,y:l},width:e.width,height:A,layer:e.layer,availableZ:[...e.availableZ],_depth:e._depth,_strawNode:!0,_strawParentCapacityMeshNodeId:e.capacityMeshNodeId})}}else{const a=Math.floor(e.width/this.strawSize),A=e.width/a;for(let c=0;c<a;c++){const l=e.center.x-e.width/2+c*A+A/2;n.push({capacityMeshNodeId:`${e.capacityMeshNodeId}_straw${c}`,center:{x:l,y:e.center.y},width:A,height:e.height,layer:e.layer,availableZ:[...e.availableZ],_depth:e._depth,_strawNode:!0,_strawParentCapacityMeshNodeId:e.capacityMeshNodeId})}}return n}getResultNodes(){return[...this.multiLayerNodes,...this.strawNodes,...this.skippedNodes]}_step(){const e=this.unprocessedNodes.pop();if(!e)return void(this.solved=!0);if(e.width<this.strawSize&&e.height<this.strawSize)return void this.skippedNodes.push(e);if(e._containsTarget)return void this.skippedNodes.push(e);const n=this.createStrawsForNode(e);this.strawNodes.push(...n),n.length===0&&this.strawNodes.push(e)}visualize(){const e={rects:[],lines:[],points:[],circles:[],title:"Straw Solver"};for(const n of this.unprocessedNodes)e.rects.push({center:n.center,width:n.width,height:n.height,fill:"rgba(200, 200, 200, 0.5)",stroke:"rgba(0, 0, 0, 0.5)",label:`${n.capacityMeshNodeId}
Unprocessed
${n.width}x${n.height}`});for(const n of this.strawNodes){const o=n.availableZ[0]===0?"rgba(0, 150, 255, 0.5)":"rgba(255, 100, 0, 0.5)";e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,stroke:"rgba(0, 0, 0, 0.5)",label:`${n.capacityMeshNodeId}
Layer: ${n.availableZ[0]}
${n.width}x${n.height}`,layer:`z${n.availableZ.join(",")}`})}for(const n of this.multiLayerNodes)e.rects.push({center:n.center,width:.9*n.width,height:.9*n.height,fill:"rgba(100, 255, 100, 0.5)",stroke:"rgba(0, 0, 0, 0.5)",layer:`z${n.availableZ.join(",")}`,label:`${n.capacityMeshNodeId}
Layers: ${n.availableZ.join(",")}
${n.width}x${n.height}`});return e}};function a1t(t){const{nodeId:e,nodeIdToSegmentIds:n,segmentIdToNodeIds:o,hops:i}=t;if(i===0)return[e];const r=new Set([e]),s=[{nodeId:e,remainingHops:i}];for(;s.length>0;){const{nodeId:a,remainingHops:A}=s.shift();if(A===0)continue;const c=n.get(a)||[];for(const l of c){const u=o.get(l)||[];for(const g of u)r.has(g)||(r.add(g),s.push({nodeId:g,remainingHops:A-1}))}}return Array.from(r)}var a6e=t=>Array.from(t.entries()).map(([e,{x:n,y:o,z:i}])=>`${e}(${n?.toFixed(3)??""},${o?.toFixed(3)??""},${i??""})`).sort().join("&"),YZn=(t,e,n,o)=>{const i=Math.min(t,e),r=Math.max(t,e),s=Math.min(n,o);return i<=Math.max(n,o)&&r>=s},hae=(t,e,n,o)=>{const i=[],r=new Map(t.originalPointMap);for(const[s,a]of n.entries()){const A=r.get(s);r.set(s,{x:a.x??A.x,y:a.y??A.y,z:a.z??A.z})}for(const s of t.allNodeIds){if(!e.get(s))continue;const a=t.segmentPairsInNode.get(s);for(const A of a){const c=r.get(A[0]),l=r.get(A[1]);c.z!==l.z&&i.push({type:"transition_via",segmentPoints:A,capacityMeshNodeId:s,probabilityOfFailure:0})}for(let A=0;A<a.length;A++)for(let c=A+1;c<a.length;c++){const l=a[A],u=a[c],g=r.get(l[0]),h=r.get(l[1]),d=r.get(u[0]),p=r.get(u[1]);if(!YZn(g.z,h.z,d.z,p.z))continue;const m=Uh(g,h,d,p),_=g.z===h.z&&d.z===p.z&&g.z===d.z;m&&(_?i.push({type:"same_layer_crossing",segmentPoints:[l,u],capacityMeshNodeId:s,crossingLine1:l,crossingLine2:u,probabilityOfFailure:0}):g.z===h.z&&d.z!==p.z?i.push({type:"single_transition_crossing",segmentPoints:[l,u],capacityMeshNodeId:s,sameLayerCrossingLine:l,transitionCrossingLine:u,probabilityOfFailure:0}):g.z!==h.z&&d.z===p.z?i.push({type:"single_transition_crossing",segmentPoints:[l,u],capacityMeshNodeId:s,sameLayerCrossingLine:u,transitionCrossingLine:l,probabilityOfFailure:0}):g.z!==h.z&&d.z!==p.z&&i.push({type:"double_transition_crossing",segmentPoints:[l,u],capacityMeshNodeId:s,crossingLine1:l,crossingLine2:u,probabilityOfFailure:0}))}}return i},A1t=(t,e,n)=>{if(e.type==="change_layer")for(const o of e.segmentPointIds){const i=t.get(o)||{};t.set(o,{...i,z:e.newZ})}else if(e.type==="swap_position_on_segment"){const[o,i]=e.segmentPointIds,r=n(o),s=n(i),a=t.get(o)||{},A=t.get(i)||{};t.set(o,{...a,x:s.x,y:s.y}),t.set(i,{...A,x:r.x,y:r.y})}else if(e.type==="combined")for(const o of e.operations)A1t(t,o,n)},c1t=(t,e)=>{const n=new Map,o=new Map,i=new Map;let r=0;for(const s of t)for(const a of s.assignedPoints){const A={segmentPointId:"SP"+r++,segmentId:s.nodePortSegmentId,capacityMeshNodeIds:e.get(s.nodePortSegmentId),connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,x:a.point.x,y:a.point.y,z:a.point.z,directlyConnectedSegmentPointIds:[]};n.set(A.segmentPointId,A);for(const c of A.capacityMeshNodeIds)o.set(c,[...o.get(c)??[],A.segmentPointId]);i.set(s.nodePortSegmentId,[...i.get(s.nodePortSegmentId)??[],A.segmentPointId])}return{segmentPointMap:n,nodeToSegmentPointMap:o,segmentToSegmentPointMap:i}},UZn=class extends yr{getSolverName(){return"UnravelSectionSolver"}nodeMap;dedupedSegments;dedupedSegmentMap;MUTABLE_HOPS=1;unravelSection;candidates=[];lastProcessedCandidate=null;bestCandidate=null;originalCandidate;rootNodeId;nodeIdToSegmentIds;segmentIdToNodeIds;colorMap;tunedNodeCapacityMap;MAX_CANDIDATES=500;iterationsSinceImprovement=0;hyperParameters;selectedCandidateIndex=null;queuedOrExploredCandidatePointModificationHashes=new Set;constructorParams;constructor(e){if(super(),this.constructorParams=e,this.MUTABLE_HOPS=e.MUTABLE_HOPS??this.MUTABLE_HOPS,this.MAX_ITERATIONS=5e4,this.hyperParameters={...e.hyperParameters,MAX_ITERATIONS_WITHOUT_IMPROVEMENT:200},this.nodeMap=e.nodeMap,this.dedupedSegments=e.dedupedSegments,e.dedupedSegmentMap)this.dedupedSegmentMap=e.dedupedSegmentMap;else{this.dedupedSegmentMap=new Map;for(const n of this.dedupedSegments)this.dedupedSegmentMap.set(n.nodePortSegmentId,n)}this.nodeIdToSegmentIds=e.nodeIdToSegmentIds,this.segmentIdToNodeIds=e.segmentIdToNodeIds,this.rootNodeId=e.rootNodeId,this.colorMap=e.colorMap??{},this.unravelSection=this.createUnravelSection({segmentPointMap:e.segmentPointMap,nodeToSegmentPointMap:e.nodeToSegmentPointMap,segmentToSegmentPointMap:e.segmentToSegmentPointMap}),this.tunedNodeCapacityMap=new Map;for(const n of this.unravelSection.allNodeIds)this.tunedNodeCapacityMap.set(n,l7(this.nodeMap.get(n)));this.originalCandidate=this.createInitialCandidate(),this.candidates=[this.originalCandidate]}getConstructorParams(){return{...this.constructorParams,segmentPointMap:this.unravelSection.segmentPointMap,nodeToSegmentPointMap:this.unravelSection.segmentPointsInNode,segmentToSegmentPointMap:this.unravelSection.segmentPointsInSegment}}createUnravelSection(e){const n=a1t({nodeId:this.rootNodeId,nodeIdToSegmentIds:this.nodeIdToSegmentIds,segmentIdToNodeIds:this.segmentIdToNodeIds,hops:this.MUTABLE_HOPS}),o=a1t({nodeId:this.rootNodeId,nodeIdToSegmentIds:this.nodeIdToSegmentIds,segmentIdToNodeIds:this.segmentIdToNodeIds,hops:this.MUTABLE_HOPS+1}),i=Array.from(new Set(o).difference(new Set(n)));e?.segmentPointMap||(e=c1t(this.dedupedSegments,this.segmentIdToNodeIds));const r=new Map;for(const h of o)r.set(h,e.nodeToSegmentPointMap.get(h));const s=new Map;for(const h of o)for(const d of r.get(h)){const p=e.segmentPointMap.get(d);s.set(d,p)}const a=Array.from(s.values()),A=new Map;for(const h of a)A.set(h.segmentId,[...A.get(h.segmentId)??[],h.segmentPointId]);for(const[h,d]of r.entries())for(let p=0;p<d.length;p++){const m=e.segmentPointMap.get(d[p]);for(let _=p+1;_<d.length;_++){const f=e.segmentPointMap.get(d[_]);f.segmentPointId!==m.segmentPointId&&f.segmentId!==m.segmentId&&f.connectionName===m.connectionName&&(f.directlyConnectedSegmentPointIds.includes(m.segmentPointId)||(m.directlyConnectedSegmentPointIds.push(f.segmentPointId),f.directlyConnectedSegmentPointIds.push(m.segmentPointId)))}}const c=new Map;for(const h of o)c.set(h,[]);for(const h of a)for(const d of h.capacityMeshNodeIds){const p=c.get(d);if(p)for(const m of h.directlyConnectedSegmentPointIds){const _=e.segmentPointMap.get(m);_.segmentPointId!==h.segmentPointId&&_.capacityMeshNodeIds.some(f=>f===d)&&(p.some(([f,I])=>f===h.segmentPointId&&I===_.segmentPointId||f===_.segmentPointId&&I===h.segmentPointId)||p.push([h.segmentPointId,_.segmentPointId]))}}const l=new Set;for(const h of n)for(const d of this.nodeIdToSegmentIds.get(h))this.segmentIdToNodeIds.get(d).every(p=>!this.nodeMap.get(p)._containsTarget)&&l.add(d);const u=new Set;for(const h of a){const d=h.capacityMeshNodeIds.some(_=>n.includes(_)),p=this.dedupedSegmentMap.get(h.segmentId),m=p&&p.availableZ.length>1;(d||m)&&u.add(h.segmentPointId)}const g=new Set;for(const h of a)if(h.capacityMeshNodeIds.some(d=>this.nodeMap.get(d)?._containsTarget)){const d=this.dedupedSegmentMap.get(h.segmentId);d&&d.availableZ.length===1&&g.add(h.segmentPointId)}return{allNodeIds:o,mutableNodeIds:n,immutableNodeIds:i,mutableSegmentIds:l,segmentPairsInNode:c,segmentPointMap:s,segmentPointsInNode:r,segmentPointsInSegment:A,originalPointMap:s,mutableSegmentPointIds:u,zLockedSegmentPointIds:g}}createInitialCandidate(){const e=new Map,n=hae(this.unravelSection,this.nodeMap,e),o=this.computeG({issues:n,originalCandidate:{},operationsPerformed:0,operation:{}});return{pointModifications:e,g:o,h:0,f:o,operationsPerformed:0,candidateHash:a6e(e),issues:hae(this.unravelSection,this.nodeMap,e)}}get nextCandidate(){return this.candidates[0]??null}getPointInCandidate(e,n){const o=this.unravelSection.segmentPointMap.get(n),i=e.pointModifications.get(n);return{x:i?.x??o.x,y:i?.y??o.y,z:i?.z??o.z,segmentId:o.segmentId}}getConnectionSegmentPointIds(e){const n=[];for(const[o,i]of this.unravelSection.segmentPointMap.entries())i.connectionName===e&&n.push(o);return n}canConnectionUseLayer(e,n){for(const o of e){const i=this.unravelSection.segmentPointMap.get(o),r=this.dedupedSegmentMap.get(i.segmentId);if(!r||!r.availableZ.includes(n))return!1}return!0}getOperationsForIssue(e,n){const o=[];if(n.type==="transition_via"){const[i,r]=n.segmentPoints,s=this.getPointInCandidate(e,i),a=this.getPointInCandidate(e,r),A=this.unravelSection.segmentPointMap.get(i),c=(this.unravelSection.segmentPointMap.get(r),this.dedupedSegmentMap.get(s.segmentId).availableZ),l=this.dedupedSegmentMap.get(a.segmentId).availableZ,u=this.unravelSection.zLockedSegmentPointIds.has(i),g=this.unravelSection.zLockedSegmentPointIds.has(r),h=this.getConnectionSegmentPointIds(A.connectionName);if(this.canConnectionUseLayer(h,a.z)){const d=h.filter(p=>this.unravelSection.mutableSegmentPointIds.has(p)&&!this.unravelSection.zLockedSegmentPointIds.has(p));d.length>0&&o.push({type:"change_layer",newZ:a.z,segmentPointIds:d})}if(this.canConnectionUseLayer(h,s.z)){const d=h.filter(p=>this.unravelSection.mutableSegmentPointIds.has(p)&&!this.unravelSection.zLockedSegmentPointIds.has(p));d.length>0&&o.push({type:"change_layer",newZ:s.z,segmentPointIds:d})}this.unravelSection.mutableSegmentPointIds.has(i)&&!u&&c.includes(a.z)&&o.push({type:"change_layer",newZ:a.z,segmentPointIds:[i]}),this.unravelSection.mutableSegmentPointIds.has(r)&&!g&&l.includes(s.z)&&o.push({type:"change_layer",newZ:s.z,segmentPointIds:[r]})}if(n.type==="same_layer_crossing"){const[i,r]=n.crossingLine1,[s,a]=n.crossingLine2,A=[],c=this.unravelSection.segmentPointMap.get(i),l=this.unravelSection.segmentPointMap.get(r),u=this.unravelSection.segmentPointMap.get(s),g=this.unravelSection.segmentPointMap.get(a),h=this.unravelSection.mutableSegmentPointIds.has(i),d=this.unravelSection.mutableSegmentPointIds.has(r),p=this.unravelSection.mutableSegmentPointIds.has(s),m=this.unravelSection.mutableSegmentPointIds.has(a),_=this.unravelSection.zLockedSegmentPointIds.has(i),f=this.unravelSection.zLockedSegmentPointIds.has(r),I=this.unravelSection.zLockedSegmentPointIds.has(s),C=this.unravelSection.zLockedSegmentPointIds.has(a);h&&p&&c.segmentId===u.segmentId&&A.push([i,s]),h&&m&&c.segmentId===g.segmentId&&A.push([i,a]),d&&p&&l.segmentId===u.segmentId&&A.push([r,s]),d&&m&&l.segmentId===g.segmentId&&A.push([r,a]);for(const[k,R]of A)o.push({type:"swap_position_on_segment",segmentPointIds:[k,R]});const y=this.getConnectionSegmentPointIds(c.connectionName),x=this.getConnectionSegmentPointIds(u.connectionName),E=new Set;for(const k of this.unravelSection.segmentPointMap.values()){const R=this.dedupedSegmentMap.get(k.segmentId);if(R)for(const F of R.availableZ)E.add(F)}for(const k of E)if(k!==c.z&&this.canConnectionUseLayer(y,k)){const R=y.filter(F=>this.unravelSection.mutableSegmentPointIds.has(F)&&!this.unravelSection.zLockedSegmentPointIds.has(F));R.length>0&&o.push({type:"change_layer",newZ:k,segmentPointIds:R})}for(const k of E)if(k!==u.z&&this.canConnectionUseLayer(x,k)){const R=x.filter(F=>this.unravelSection.mutableSegmentPointIds.has(F)&&!this.unravelSection.zLockedSegmentPointIds.has(F));R.length>0&&o.push({type:"change_layer",newZ:k,segmentPointIds:R})}const B=this.dedupedSegmentMap.get(c.segmentId),S=this.dedupedSegmentMap.get(l.segmentId),Q=this.dedupedSegmentMap.get(u.segmentId),w=this.dedupedSegmentMap.get(g.segmentId),M=(k,R)=>k.every(F=>F.availableZ.includes(R));if(h&&d&&!_&&!f){const k=c.z===0?1:0;M([B,S],k)&&o.push({type:"change_layer",newZ:k,segmentPointIds:[i,r]})}if(p&&m&&!I&&!C){const k=u.z===0?1:0;M([Q,w],k)&&o.push({type:"change_layer",newZ:k,segmentPointIds:[s,a]})}if(h&&!_){const k=c.z===0?1:0;B.availableZ.includes(k)&&o.push({type:"change_layer",newZ:k,segmentPointIds:[i]})}if(d&&!f){const k=l.z===0?1:0;S.availableZ.includes(k)&&o.push({type:"change_layer",newZ:k,segmentPointIds:[r]})}if(p&&!I){const k=u.z===0?1:0;Q.availableZ.includes(k)&&o.push({type:"change_layer",newZ:k,segmentPointIds:[s]})}if(m&&!C){const k=g.z===0?1:0;w.availableZ.includes(k)&&o.push({type:"change_layer",newZ:k,segmentPointIds:[a]})}}return o}computeG(e){const{issues:n,originalCandidate:o,operationsPerformed:i,operation:r}=e,s=new Map;for(const c of n){s.has(c.capacityMeshNodeId)||s.set(c.capacityMeshNodeId,{numTransitionCrossings:0,numSameLayerCrossings:0,numEntryExitLayerChanges:0});const l=s.get(c.capacityMeshNodeId);c.type==="transition_via"?l.numTransitionCrossings++:c.type==="same_layer_crossing"?l.numSameLayerCrossings++:c.type==="double_transition_crossing"||c.type==="single_transition_crossing"?l.numEntryExitLayerChanges++:c.type}let a=0;for(const[c,{numEntryExitLayerChanges:l,numSameLayerCrossings:u,numTransitionCrossings:g}]of s){const h=this.nodeMap.get(c),d=Math.min(wy(h,u,l,g),.999999);a+=Math.log(1-d)}var A;return(A=a)<-Math.LN2?Math.log(1-Math.exp(A)):Math.log(-Math.expm1(A))}getUnexploredNeighborByApplyingOperation(e,n){const o=new Map(e.pointModifications);A1t(o,n,A=>this.getPointInCandidate(e,A));const i=a6e(o);if(this.queuedOrExploredCandidatePointModificationHashes.has(i))return null;const r=hae(this.unravelSection,this.nodeMap,o),s=e.operationsPerformed+1,a=this.computeG({issues:r,originalCandidate:e,operationsPerformed:s,operation:n});return{issues:r,g:a,h:0,f:a,pointModifications:o,candidateHash:i,operationsPerformed:s}}getNeighborOperationsForCandidate(e){return e.issues.flatMap(n=>this.getOperationsForIssue(e,n))}getNeighbors(e){const n=[],o=this.getNeighborOperationsForCandidate(e);for(const i of o){const r=this.getUnexploredNeighborByApplyingOperation(e,i);r&&n.push(r)}return n}_step(){const e=this.candidates.shift();this.iterationsSinceImprovement++,this.iterationsSinceImprovement>this.hyperParameters.MAX_ITERATIONS_WITHOUT_IMPROVEMENT?this.solved=!0:e?(this.lastProcessedCandidate=e,e.f<(this.bestCandidate?.f??1/0)&&(this.bestCandidate=e,this.iterationsSinceImprovement=0),this.getNeighbors(e).forEach(n=>{this.queuedOrExploredCandidatePointModificationHashes.has(n.candidateHash)||(this.queuedOrExploredCandidatePointModificationHashes.add(n.candidateHash),this.candidates.push(n))}),this.candidates.sort((n,o)=>n.f-o.f),this.candidates.length=Math.min(this.candidates.length,this.MAX_CANDIDATES)):this.solved=!0}visualize(){const e={points:[],lines:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"Unravel Section Solver"};let n=null;if(n=this.selectedCandidateIndex!==null?this.selectedCandidateIndex==="best"?this.bestCandidate:this.selectedCandidateIndex==="original"?this.originalCandidate:this.candidates[this.selectedCandidateIndex]:this.solved?this.bestCandidate:this.lastProcessedCandidate||this.candidates[0],!n)return e;const o=new Map;for(const[r,s]of this.unravelSection.segmentPointMap){const a={...s},A=n.pointModifications.get(r);A&&(A.x!==void 0&&(a.x=A.x),A.y!==void 0&&(a.y=A.y),A.z!==void 0&&(a.z=A.z)),o.set(r,a)}for(const[r,s]of o)e.points.push({x:s.x,y:s.y,label:`${r}
Segment: ${s.segmentId} ${this.unravelSection.mutableSegmentIds.has(s.segmentId)?"MUTABLE":"IMMUTABLE"}
Layer: ${s.z}`,color:this.colorMap[s.connectionName]||"#000"});const i=new Map;for(const r of this.unravelSection.allNodeIds)i.set(r,{numTransitionCrossings:0,numSameLayerCrossings:0,numEntryExitLayerChanges:0,estPf:0});for(const r of n.issues){const s=i.get(r.capacityMeshNodeId);r.type==="transition_via"?s.numTransitionCrossings++:r.type==="same_layer_crossing"?s.numSameLayerCrossings++:r.type!=="double_transition_crossing"&&r.type!=="single_transition_crossing"||s.numEntryExitLayerChanges++}for(const[r,s]of i.entries()){const a=this.nodeMap.get(r);s.estPf=wy(a,s.numSameLayerCrossings,s.numEntryExitLayerChanges,s.numTransitionCrossings)}for(const r of this.unravelSection.allNodeIds){const s=this.nodeMap.get(r),a=this.unravelSection.mutableNodeIds.includes(r),A=i.get(r),c=[`${r} (${a?"MUT":"IMM"})`,`${s.width.toFixed(2)}x${s.height.toFixed(2)}`,`Pf: ${A.estPf.toFixed(3)}`,`TC: ${A.numTransitionCrossings}`,`SLC: ${A.numSameLayerCrossings}`,`EELC: ${A.numEntryExitLayerChanges}`].join(`
`);e.rects.push({center:s.center,label:c,color:a?"green":"red",width:s.width/8,height:s.height/8})}for(const[r,s]of this.unravelSection.segmentPointsInSegment){if(s.length<=1)continue;const a=s.map(A=>o.get(A));for(let A=0;A<a.length-1;A++)e.lines.push({points:[{x:a[A].x,y:a[A].y},{x:a[A+1].x,y:a[A+1].y}],strokeColor:this.colorMap[r]||"#000"})}for(const[r,s]of o)for(const a of s.directlyConnectedSegmentPointIds)if(r<a){const A=o.get(a);if(!A)continue;const c=s.z===A.z,l=s.z;let u;u=c?l===0?void 0:"10 5":"3 3 10",e.lines.push({points:[{x:s.x,y:s.y},{x:A.x,y:A.y}],strokeDash:u,strokeColor:this.colorMap[s.connectionName]||"#000"})}for(const r of n.issues){const s=this.nodeMap.get(r.capacityMeshNodeId);if(r.type==="transition_via")for(const a of r.segmentPoints){const A=o.get(a);e.circles.push({center:{x:A.x,y:A.y},radius:s.width/16,stroke:"#ff0000",fill:"rgba(255, 0, 0, 0.2)",label:`Via Issue
${a}
Layer: ${A.z}`})}else if(r.type==="same_layer_crossing")for(const[a,A]of[r.crossingLine1,r.crossingLine2]){const c=o.get(a),l=o.get(A);e.lines.push({points:[{x:c.x,y:c.y},{x:l.x,y:l.y}],strokeColor:"rgba(255,0,0,0.2)",strokeWidth:s.width/32})}}for(const[r,s]of n.pointModifications){const a=o.get(r),A=this.unravelSection.segmentPointMap.get(r);e.circles.push({center:{x:a.x,y:a.y},radius:.05,stroke:"#0000ff",fill:"rgba(0, 0, 255, 0.2)",label:`${r}
Original: (${A.x.toFixed(2)}, ${A.y.toFixed(2)}, ${A.z})
New: (${a.x.toFixed(2)}, ${a.y.toFixed(2)}, ${a.z})`})}return e}},pae=t=>(Math.round(20*t)/20).toFixed(2),l1t=t=>(Math.round(1e3*t)/1e3).toFixed(3);Lse();var KZn=class extends UZn{cacheHit=!1;cacheProvider;hasAttemptedToUseCache=!1;constructor(e){super(e),this.cacheProvider=e.cacheProvider===void 0?eXn():e.cacheProvider}_step(){!this.hasAttemptedToUseCache&&this.cacheProvider&&this.attemptToUseCacheSync()||(super._step(),(this.solved||this.failed)&&this.cacheProvider&&this.saveToCacheSync())}computeCacheKeyAndTransform(){const e=this.nodeMap.get(this.rootNodeId),n=r_t(-e.center.x,-e.center.y),o=new Map,i=new Map,r=new Map,s=new Map,a=new Map,A=new Map;let c=0,l=0,u=0;const g=[...this.unravelSection.allNodeIds].sort((I,C)=>{const y=this.nodeMap.get(I),x=this.nodeMap.get(C);return y.center.x!==x.center.x?y.center.x-x.center.x:y.center.y-x.center.y});for(const I of g){const C="node_"+c++;o.set(I,C),i.set(C,I)}const h=[...Array.from(this.unravelSection.segmentPointMap.entries()).sort(([,I],[,C])=>I.x!==C.x?I.x-C.x:I.y-C.y).map(([I])=>I)].sort();for(const I of h){const C="sp_"+u++;a.set(I,C),A.set(C,I);const y=this.unravelSection.segmentPointMap.get(I).segmentId;if(!r.has(y)){const x="seg_"+l++;r.set(y,x),s.set(x,y)}}const d={};for(const[I,C]of o.entries()){const y=this.nodeMap.get(I),x=i_t(n,y.center);d[C]={width:y.width,height:y.height,availableZ:y.availableZ,center:{x:pae(x.x),y:pae(x.y)}}}const p={};for(const[I,C]of a.entries()){const y=this.unravelSection.segmentPointMap.get(I),x=i_t(n,{x:y.x,y:y.y});p[C]={x:pae(x.x),y:pae(x.y),z:y.z}}const m={hyperParameters:this.hyperParameters,normalizedNodes:d,normalizedSegmentPoints:p,mutableHops:this.MUTABLE_HOPS},_=`unravelsec:${$9e(m)}`,f={realToCacheTransform:n,nodeIdMap:o,segmentIdMap:r,segmentPointIdMap:a,reverseNodeIdMap:i,reverseSegmentIdMap:s,reverseSegmentPointIdMap:A};return this.cacheKey=_,this.cacheToSolveSpaceTransform=f,{cacheKey:_,cacheToSolveSpaceTransform:f}}applyCachedSolution(e){if(e.success===!1)return void(this.failed=!0);if(!this.cacheToSolveSpaceTransform)return void console.error("Cache transform not available to apply cached solution.");const{reverseSegmentPointIdMap:n,reverseNodeIdMap:o}=this.cacheToSolveSpaceTransform,i=new Map;for(const[s,a]of e.bestCandidatePointModificationsDelta){const A=n.get(s);if(!A){console.warn(`Could not find original ID for normalized SP ID: ${s} when applying cache.`);continue}const c=this.unravelSection.segmentPointMap.get(A);if(!c){console.warn(`Could not find original segment point for ID: ${A} when applying cache.`);continue}const l={};if(a.dx!==void 0){const u=parseFloat(a.dx);Number.isNaN(u)?console.warn(`Failed to parse cached dx coordinate: ${a.dx}`):l.x=c.x+u}if(a.dy!==void 0){const u=parseFloat(a.dy);Number.isNaN(u)?console.warn(`Failed to parse cached dy coordinate: ${a.dy}`):l.y=c.y+u}a.dz!==void 0&&(l.z=c.z+a.dz),Object.keys(l).length>0&&i.set(A,l)}const r=hae(this.unravelSection,this.nodeMap,i);this.bestCandidate={pointModifications:i,issues:r,f:e.bestCandidateF,g:e.bestCandidateF,h:0,operationsPerformed:-1,candidateHash:a6e(i)},this.cacheHit=!0,this.solved=!0}attemptToUseCacheSync(){if(this.hasAttemptedToUseCache=!0,!this.cacheProvider?.isSyncCache)return console.log("Cache provider is not synchronous, skipping sync cache check."),!1;if(this.cacheKey||this.computeCacheKeyAndTransform(),!this.cacheKey)return console.error("Failed to compute cache key."),!1;try{const e=this.cacheProvider.getCachedSolutionSync(this.cacheKey);if(e)return this.applyCachedSolution(e),!0}catch(e){console.error("Error attempting to use cache:",e)}return!1}saveToCacheSync(){if(this.failed)return void this.cacheProvider?.setCachedSolutionSync(this.cacheKey,{success:!1});if(!this.bestCandidate)return;const{segmentPointIdMap:e}=this.cacheToSolveSpaceTransform,n=[];for(const[i,r]of this.bestCandidate.pointModifications.entries()){const s=e.get(i);if(!s){console.warn(`Could not find normalized ID for original SP ID: ${i} when saving to cache.`);continue}const a=this.unravelSection.segmentPointMap.get(i);if(!a){console.warn(`Could not find original segment point for ID: ${i} when saving cache.`);continue}const A={};let c=!1;if(r.x!==void 0){const l=r.x-a.x,u=l1t(l);parseFloat(u)!==0&&(A.dx=u,c=!0)}if(r.y!==void 0){const l=r.y-a.y,u=l1t(l);parseFloat(u)!==0&&(A.dy=u,c=!0)}if(r.z!==void 0){const l=r.z-a.z;l!==0&&(A.dz=l,c=!0)}c&&n.push([s,A])}const o={success:!0,bestCandidatePointModificationsDelta:n,bestCandidateF:this.bestCandidate.f};this.cacheProvider?.setCachedSolutionSync(this.cacheKey,o)}},VZn=class extends yr{getSolverName(){return"UnravelMultiSectionSolver"}nodeMap;dedupedSegmentMap;dedupedSegments;nodeIdToSegmentIds;segmentIdToNodeIds;nodeToSegmentPointMap;segmentToSegmentPointMap;colorMap;tunedNodeCapacityMap;MAX_NODE_ATTEMPTS=2;MUTABLE_HOPS=1;ACCEPTABLE_PF=.05;MAX_ITERATIONS_WITHOUT_IMPROVEMENT=200;nodePfMap;attemptsToFixNode;activeSubSolver=null;segmentPointMap;cacheProvider=null;constructor({assignedSegments:e,colorMap:n,nodes:o,cacheProvider:i}){super(),this.stats.successfulOptimizations=0,this.stats.failedOptimizations=0,this.stats.cacheHits=0,this.stats.cacheMisses=0,this.cacheProvider=i??null,this.MAX_ITERATIONS=1e6,this.dedupedSegments=(A=>{const c=[],l=new Map;let u=-1;for(const g of A){const h=`${g.start.x}-${g.start.y}-${g.end.x}-${g.end.y}-${g.availableZ.join(",")}`,d=l.get(h);d?g.nodePortSegmentId=d.nodePortSegmentId:(u++,g.nodePortSegmentId=`SEG${u}`,l.set(h,g),c.push(g))}return c})(e),this.dedupedSegmentMap=new Map;for(const A of this.dedupedSegments)this.dedupedSegmentMap.set(A.nodePortSegmentId,A);this.nodeMap=new Map;for(const A of o)this.nodeMap.set(A.capacityMeshNodeId,A);this.nodeIdToSegmentIds=new Map,this.segmentIdToNodeIds=new Map,this.attemptsToFixNode=new Map;for(const A of e)this.segmentIdToNodeIds.set(A.nodePortSegmentId,[...this.segmentIdToNodeIds.get(A.nodePortSegmentId)??[],A.capacityMeshNodeId]),this.nodeIdToSegmentIds.set(A.capacityMeshNodeId,[...this.nodeIdToSegmentIds.get(A.capacityMeshNodeId)??[],A.nodePortSegmentId]);this.colorMap=n??{},this.tunedNodeCapacityMap=new Map;for(const[A,c]of this.nodeMap)this.tunedNodeCapacityMap.set(A,l7(c));const{segmentPointMap:r,nodeToSegmentPointMap:s,segmentToSegmentPointMap:a}=c1t(this.dedupedSegments,this.segmentIdToNodeIds);this.segmentPointMap=r,this.nodeToSegmentPointMap=s,this.segmentToSegmentPointMap=a,this.nodePfMap=this.computeInitialPfMap()}computeInitialPfMap(){const e=new Map;for(const[n,o]of this.nodeMap.entries())e.set(n,this.computeNodePf(o));return e}computeNodePf(e){const{numSameLayerCrossings:n,numEntryExitLayerChanges:o,numTransitionCrossings:i}=(r=>{let s=0,a=0,A=0;const c=new Map;for(const g of r)c.has(g.connectionName)||c.set(g.connectionName,[]),c.get(g.connectionName).push(g);const l=[],u=[];for(const[g,h]of c.entries()){if(h.length<2)continue;const d=h[0];for(let p=1;p<h.length;p++){const m=h[p],_={connectionName:g,z:d.z,points:[d,m]};d.z!==m.z?(a++,u.push({connectionName:g,points:[d,m]})):l.push(_)}}for(let g=0;g<l.length;g++)for(let h=g+1;h<l.length;h++){const d=l[g],p=l[h];d.z===p.z&&Uh(d.points[0],d.points[1],p.points[0],p.points[1])&&s++}for(let g=0;g<u.length;g++)for(let h=g+1;h<u.length;h++){const d=u[g],p=u[h];Uh(d.points[0],d.points[1],p.points[0],p.points[1])&&A++}for(let g=0;g<u.length;g++)for(let h=0;h<l.length;h++){const d=u[g],p=l[h];Uh(d.points[0],d.points[1],p.points[0],p.points[1])&&A++}return{numSameLayerCrossings:s,numEntryExitLayerChanges:a,numTransitionCrossings:A}})((this.nodeToSegmentPointMap.get(e.capacityMeshNodeId)??[]).map(r=>this.segmentPointMap.get(r)));return wy(e,n,o,i)}_step(){if(this.iterations>=this.MAX_ITERATIONS-1)return void(this.solved=!0);if(!this.activeSubSolver){let i=null,r=0;for(const[s,a]of this.nodePfMap.entries())a*(1-(this.attemptsToFixNode.get(s)??0)/this.MAX_NODE_ATTEMPTS)>r&&(r=a,i=s);if(!i||r<this.ACCEPTABLE_PF)return void(this.solved=!0);this.attemptsToFixNode.set(i,(this.attemptsToFixNode.get(i)??0)+1),this.activeSubSolver=new KZn({dedupedSegments:this.dedupedSegments,dedupedSegmentMap:this.dedupedSegmentMap,nodeMap:this.nodeMap,nodeIdToSegmentIds:this.nodeIdToSegmentIds,segmentIdToNodeIds:this.segmentIdToNodeIds,colorMap:this.colorMap,rootNodeId:i,MUTABLE_HOPS:this.MUTABLE_HOPS,segmentPointMap:this.segmentPointMap,nodeToSegmentPointMap:this.nodeToSegmentPointMap,segmentToSegmentPointMap:this.segmentToSegmentPointMap,cacheProvider:this.cacheProvider})}this.activeSubSolver.step();const{bestCandidate:e,originalCandidate:n,lastProcessedCandidate:o}=this.activeSubSolver;if(this.activeSubSolver.failed)return this.stats.failedOptimizations+=1,void(this.activeSubSolver=null);if(this.activeSubSolver.solved){if(this.activeSubSolver.cacheHit?this.stats.cacheHits+=1:this.stats.cacheMisses+=1,e&&e.g<n.g){this.stats.successfulOptimizations+=1;for(const[i,r]of e.pointModifications.entries()){const s=this.segmentPointMap.get(i);s.x=r.x??s.x,s.y=r.y??s.y,s.z=r.z??s.z}for(const i of this.activeSubSolver.unravelSection.allNodeIds)this.nodePfMap.set(i,this.computeNodePf(this.nodeMap.get(i)))}else this.stats.failedOptimizations+=1;this.activeSubSolver=null}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:"cartesian",title:"Unravel Multi Section Solver"};for(const[r,s]of this.nodeMap.entries()){const a=this.nodePfMap.get(r)||0,A=Math.min(a,1),c=`rgb(${Math.floor(255*A)}, ${Math.floor(255*(1-A))}, 0)`;(this.attemptsToFixNode.get(r)??0)===0&&A===0||e.rects.push({center:s.center,label:[r,`${s.width.toFixed(2)}x${s.height.toFixed(2)}`,`Pf: ${a.toFixed(3)}`].join(`
`),color:c,width:s.width/8,height:s.height/8})}for(const r of this.segmentPointMap.values()){const s=this.dedupedSegmentMap.get(r.segmentId);e.points.push({x:r.x,y:r.y,label:[r.segmentPointId,r.segmentId,`z: ${r.z}`,`segment.availableZ: ${s?.availableZ.join(",")}`].join(`
`),color:this.colorMap[r.connectionName]||"#000"})}const n=new Map;for(const r of this.segmentPointMap.values())n.has(r.segmentId)||n.set(r.segmentId,[]),n.get(r.segmentId).push(r);for(const[r,s]of n.entries()){if(s.length<2)continue;const a=[...s].sort((A,c)=>A.x!==c.x?A.x-c.x:A.y-c.y);for(let A=0;A<a.length-1;A++)e.lines.push({points:[{x:a[A].x,y:a[A].y},{x:a[A+1].x,y:a[A+1].y}],strokeColor:this.colorMap[r]||"#000"})}const o=new Set,i=Array.from(this.segmentPointMap.values());for(let r=0;r<i.length;r++){const s=i[r];for(let a=r+1;a<i.length;a++){const A=i[a];if(!(s.connectionName!==A.connectionName||s.segmentId===A.segmentId)&&s.capacityMeshNodeIds.some(c=>A.capacityMeshNodeIds.includes(c))){const c=`${s.segmentPointId}-${A.segmentPointId}`;if(o.has(c))continue;o.add(c);const l=s.z===A.z,u=s.z;let g;g=l?u===0?void 0:"10 5":"3 3 10",e.lines.push({points:[{x:s.x,y:s.y},{x:A.x,y:A.y}],strokeDash:g,strokeColor:this.colorMap[s.connectionName]||"#666"})}}}return e}getNodesWithPortPoints(){if(!this.solved)throw new Error("CapacitySegmentToPointSolver not solved, can't give port points yet");const e=new Map;for(const n of this.dedupedSegments){const o=n.nodePortSegmentId;for(const i of this.segmentIdToNodeIds.get(o)){const r=this.nodeMap.get(i);e.has(i)||e.set(i,{capacityMeshNodeId:i,portPoints:[],center:r.center,width:r.width,height:r.height})}}for(const n of this.segmentPointMap.values())for(const o of n.capacityMeshNodeIds){const i=e.get(o);i&&i.portPoints.push({x:n.x,y:n.y,z:n.z,connectionName:n.connectionName,rootConnectionName:n.rootConnectionName})}return Array.from(e.values())}};function fx(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var zZn=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.srj=e,this.opts={...n},this.MAX_ITERATIONS=1e8,this.viaDiameter=om(e).padDiameter,this.minTraceWidth=e.minTraceWidth;const o=this.opts;if(o.capacityDepth===void 0){const i=e.bounds.maxX-e.bounds.minX,r=e.bounds.maxY-e.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.connMap=Jm(e),this.colorMap=Jf(e,this.connMap),this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return"AutoroutingPipeline1_OriginalUnravel"}netToPointPairsSolver;nodeSolver;nodeTargetMerger;edgeSolver;initialPathingSolver;pathingOptimizer;edgeToPortSegmentSolver;colorMap;segmentToPointSolver;unravelMultiSectionSolver;segmentToPointOptimizer;highDensityRouteSolver;highDensityStitchSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;viaDiameter;minTraceWidth;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[fx("netToPointPairsSolver",rL,e=>[e.srj,e.colorMap,JQ(e.srj)],{onSolved:e=>{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,this.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),fx("nodeSolver",vZn,e=>[e.netToPointPairsSolver?.getNewSimpleRouteJson()||e.srj,e.opts],{onSolved:e=>{e.capacityNodes=e.nodeSolver?.finishedNodes}}),fx("singleLayerNodeMerger",OZn,e=>[e.nodeSolver?.finishedNodes],{onSolved:e=>{e.capacityNodes=e.singleLayerNodeMerger?.newNodes}}),fx("strawSolver",GZn,e=>[{nodes:e.singleLayerNodeMerger?.newNodes}],{onSolved:e=>{e.capacityNodes=e.strawSolver?.getResultNodes()}}),fx("edgeSolver",WQ,e=>[e.capacityNodes],{onSolved:e=>{e.capacityEdges=e.edgeSolver?.edges}}),fx("deadEndSolver",LZn,e=>[{nodes:e.capacityNodes,edges:e.capacityEdges}],{onSolved:e=>{const n=e.deadEndSolver?.removedNodeIds;e.capacityNodes=e.capacityNodes.filter(o=>!n.has(o.capacityMeshNodeId)),e.capacityEdges=e.capacityEdges.filter(o=>o.nodeIds.every(i=>!n.has(i)))}}),fx("initialPathingSolver",r1t,e=>[{simpleRouteJson:e.srjWithPointPairs,nodes:e.capacityNodes,edges:e.capacityEdges||[],colorMap:e.colorMap,hyperParameters:{MAX_CAPACITY_FACTOR:1}}]),fx("pathingOptimizer",FZn,e=>[{initialPathingSolver:e.initialPathingSolver,simpleRouteJson:e.srjWithPointPairs,nodes:e.capacityNodes,edges:e.capacityEdges||[],colorMap:e.colorMap,cacheProvider:e.cacheProvider,hyperParameters:{MAX_CAPACITY_FACTOR:1}}]),fx("edgeToPortSegmentSolver",EZn,e=>[{nodes:e.capacityNodes,edges:e.capacityEdges||[],capacityPaths:e.pathingOptimizer?.getCapacityPaths()||[],colorMap:e.colorMap}]),fx("segmentToPointSolver",wZn,e=>{const n=[];return e.edgeToPortSegmentSolver?.nodePortSegments&&e.edgeToPortSegmentSolver.nodePortSegments.forEach(o=>{n.push(...o)}),[{segments:n,colorMap:e.colorMap,nodes:e.capacityNodes}]}),fx("unravelMultiSectionSolver",VZn,e=>[{assignedSegments:e.segmentToPointSolver?.solvedSegments||[],colorMap:e.colorMap,nodes:e.capacityNodes,cacheProvider:this.cacheProvider}]),fx("highDensityRouteSolver",HD,e=>[{nodePortPoints:e.unravelMultiSectionSolver?.getNodesWithPortPoints()??e.segmentToPointOptimizer?.getNodesWithPortPoints()??[],colorMap:e.colorMap,connMap:e.connMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth}]),fx("highDensityStitchSolver",HZn,e=>[{connections:e.srjWithPointPairs.connections,hdRoutes:e.highDensityRouteSolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter}]),fx("traceSimplificationSolver",j8,e=>[{hdRoutes:e.highDensityStitchSolver.mergedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();const e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeTargetMerger?.visualize(),i=this.singleLayerNodeMerger?.visualize(),r=this.strawSolver?.visualize(),s=this.edgeSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.initialPathingSolver?.visualize(),c=this.pathingOptimizer?.visualize(),l=this.edgeToPortSegmentSolver?.visualize(),u=this.segmentToPointSolver?.visualize(),g=this.unravelMultiSectionSolver?.visualize()??this.segmentToPointOptimizer?.visualize(),h=this.highDensityRouteSolver?.visualize(),d=this.highDensityStitchSolver?.visualize(),p=this.traceSimplificationSolver?.visualize(),m=this.srj.outline,_=[];if(_.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),m&&m.length>=2){const y=m.map(x=>({x:x.x,y:x.y}));y.push({...y[0]}),_.push({points:y,strokeColor:"rgba(0, 136, 255, 0.95)"})}const f=z8(this.srj),I={points:[...this.srj.connections.flatMap(y=>y.pointsToConnect.map(x=>({...x,layer:J8(x,this.srj.layerCount),label:`${y.name} ${x.pcb_port_id??""}`})))],rects:[...(this.srj.obstacles??[]).filter(y=>!y.isCopperPour).map(y=>({...y,fill:y.layers?.includes("top")?"rgba(255,0,0,0.25)":y.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(y,this.srj.layerCount),label:f(y)}))],lines:_},C=[I,e,n,o,i,r,s,a,A,c,l,u,g,h?Il(I,h):null,d,p,this.solved?Il({lines:_},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...C)}preview(){if(this.highDensityRouteSolver){const e=[];for(let n=this.highDensityRouteSolver.routes.length-1;n>=0;n--){const o=this.highDensityRouteSolver.routes[n];if(e.push({points:o.route.map(i=>({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length>200)break}return{lines:e}}if(this.pathingOptimizer){const e=[];for(const n of this.pathingOptimizer.connectionsWithNodes)n.path&&e.push({points:n.path.map(o=>({x:o.center.x,y:o.center.y})),strokeColor:this.colorMap[n.connection.name]});return{lines:e}}return this.netToPointPairsSolver?this.netToPointPairsSolver?.visualize():{}}_getOutputHdRoutes(){return this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error("Cannot get output before solving is complete");const e=[],n=this._getOutputHdRoutes();for(const o of this.netToPointPairsSolver?.newConnections??[]){const i=o.__netConnectionName??this.srj.connections.find(s=>s.name===o.name)?.__netConnectionName,r=n.filter(s=>s.connectionName===o.name);for(let s=0;s<r.length;s++){const a=r[s],A={type:"pcb_trace",pcb_trace_id:`${o.name}_${s}`,connection_name:i??o.__rootConnectionNames?.[0]??o.name,route:nB(a,this.srj.layerCount)};e.push(A)}}return e}getOutputSimpleRouteJson(){return{...this.srj,traces:this.getOutputSimplifiedPcbTraces()}}};function mae(t){const{pos:e,segments:n,dir:o,keepoutRadius:i}=t;let r=1/0;const s=i/4,a={x:e.x-o.x*s,y:e.y-o.y*s},A={x:e.x+o.x*s,y:e.y+o.y*s};for(const c of n){const l=M5(a,A,c.start,c.end);r=Math.min(r,l)}return r}function JZn(t,e,n,o){const i=_ae(n,o,t),r=_ae(n,o,e),s=_ae(t,e,n),a=_ae(t,e,o);if((i>0&&r<0||i<0&&r>0)&&(s>0&&a<0||s<0&&a>0))return!0;const A=1e-4;return!!(Math.abs(i)<A&&fae(n,o,t))||!!(Math.abs(r)<A&&fae(n,o,e))||!!(Math.abs(s)<A&&fae(t,e,n))||!!(Math.abs(a)<A&&fae(t,e,o))}function _ae(t,e,n){return(n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y)}function fae(t,e,n){return n.x>=Math.min(t.x,e.x)-1e-4&&n.x<=Math.max(t.x,e.x)+1e-4&&n.y>=Math.min(t.y,e.y)-1e-4&&n.y<=Math.max(t.y,e.y)+1e-4}function A6e(t,e,n){for(const o of n)if(JZn(t,e,o.start,o.end))return!1;return!0}var XQ=1e-4;function c6e(t){const e=t.width/2,n=t.height/2,o=t.center.x,i=t.center.y,r={x:o-e,y:i+n},s={x:o+e,y:i+n},a={x:o-e,y:i-n},A={x:o+e,y:i-n};return[{start:r,end:s},{start:s,end:A},{start:A,end:a},{start:a,end:r}]}function WZn(t,e,n=.1){const o=e.x-t.x,i=e.y-t.y,r=Math.sqrt(o*o+i*i);if(r===0)return[];const s=-(i/r),a=o/r,A=n/2;return[{start:{x:t.x+s*A,y:t.y+a*A},end:{x:e.x+s*A,y:e.y+a*A}},{start:{x:t.x-s*A,y:t.y-a*A},end:{x:e.x-s*A,y:e.y-a*A}}]}function jZn(t,e,n){const o=Math.hypot(t.start.x-e.x,t.start.y-e.y),i=Math.hypot(t.end.x-e.x,t.end.y-e.y);if(o<=n||i<=n)return!0;const r=t.end.x-t.start.x,s=t.end.y-t.start.y,a=r*r+s*s;if(a===0)return!1;const A=Math.max(0,Math.min(1,((e.x-t.start.x)*r+(e.y-t.start.y)*s)/a)),c=t.start.x+A*r,l=t.start.y+A*s;return Math.hypot(c-e.x,l-e.y)<=n}function $Zn(t,e,n){if(!n||n.length===0)return!1;for(const o of n){const i=Math.abs(t.x-o.start.x)<XQ&&Math.abs(t.y-o.start.y)<XQ&&Math.abs(e.x-o.end.x)<XQ&&Math.abs(e.y-o.end.y)<XQ,r=Math.abs(t.x-o.end.x)<XQ&&Math.abs(t.y-o.end.y)<XQ&&Math.abs(e.x-o.start.x)<XQ&&Math.abs(e.y-o.start.y)<XQ;if(i||r)return!0}return!1}function qZn(t,e,n,o,i){const r=[];for(let s=0;s<t.length-1;s++){const a=t[s],A=t[s+1];$Zn(a,A,i)||jZn({start:a,end:A},n,o+e)&&r.push(...WZn(a,A,e))}return r}var Iae=1e-4;function XZn(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=o.x-n.x,a=o.y-n.y,A=i*a-r*s;if(Math.abs(A)<1e-10)return null;const c=n.x-t.x,l=n.y-t.y,u=(c*a-l*s)/A,g=(c*r-l*i)/A,h=1e-6;return u>h&&u<.999999&&g>h&&g<.999999?{x:t.x+u*i,y:t.y+u*r}:null}function ZZn(t,e){if(!e||e.length===0)return!1;for(const n of e)if(Math.abs(t.x-n.start.x)<Iae&&Math.abs(t.y-n.start.y)<Iae||Math.abs(t.x-n.end.x)<Iae&&Math.abs(t.y-n.end.y)<Iae)return!0;return!1}function eeo(t,e,n,o){if(!o||o.length===0)return!1;for(let i=e;i<=n;i++)if(i>=0&&i<t.length&&ZZn(t[i],o))return!0;return!1}var W3=1e-4,u1t=class extends yr{constructor(e){super(),this.input=e;const n=e.srj?.layerCount??2;this.input={...e,obstacles:c7(e.obstacles,n)},this.MAX_ITERATIONS=1e6,this.originalHdRoutes=[...this.input.hdRoutes],this.hdRoutes=this.input.hdRoutes,this.KEEPOUT_RADIUS_SCHEDULE=e.keepoutRadiusSchedule??[.3,.5,.5],this.currentKeepoutRadius=this.KEEPOUT_RADIUS_SCHEDULE[0]??.15,this.unprocessedRoutes=[...this.hdRoutes],this.smoothedCursorRoutes=[...this.unprocessedRoutes];const o=[...this.input.obstacles,...this.getJumperPadObstacles()];this.obstacleSHI=new OD("flatbush",o),this.boardOutlineRoutes=this.createBoardOutlineRoutes(),this.hdRouteSHI=new oB([...this.hdRoutes,...this.boardOutlineRoutes]);for(const[i,r,s]of this.hdRoutes.flatMap(a=>[[a.route[0],a.connectionName,a.rootConnectionName],[a.route[a.route.length-1],a.connectionName,a.rootConnectionName]])){const a=this.obstacleSHI.searchArea(i.x,i.y,.01,.01).filter(c=>c.__zLayers?.includes(i.z));if(a.length===0)continue;const A=a[0];this.input.connMap.addConnections([[r,s,...A.offBoardConnectsTo??[],A.obstacleId,...A.connectedTo].filter(Boolean)])}}input;getSolverName(){return"TraceKeepoutSolver"}originalHdRoutes;hdRoutes;redrawnHdRoutes=[];KEEPOUT_RADIUS_SCHEDULE;currentScheduleIndex=0;currentKeepoutRadius;unprocessedRoutes=[];smoothedCursorRoutes=[];processedRoutes=[];currentTrace=null;cursorPosition=null;lastCursorPosition=null;drawPosition=null;currentTraceSegmentIndex=0;currentTraceSegmentT=0;recordedDrawPositions=[];lastCollidingSegments=[];currentTraceJumperSegments=new Map;obstacleSHI;hdRouteSHI;boardOutlineRoutes=[];getSmoothDistance(){return this.currentKeepoutRadius}getJumperPadObstacles(){const e=[];if(!this.input.jumpers)return e;for(const n of this.input.jumpers)for(const o of n.pads)e.push({...o,__zLayers:[0]});return e}buildJumperSegmentMap(e){const n=new Map;if(!e.jumpers||e.jumpers.length===0)return n;const o=e.route;for(const i of e.jumpers){let r=-1,s=1/0;for(let a=0;a<o.length-1;a++){const A=o[a],c=o[a+1],l=Math.sqrt((A.x-i.start.x)**2+(A.y-i.start.y)**2),u=Math.sqrt((c.x-i.end.x)**2+(c.y-i.end.y)**2),g=l+u,h=Math.sqrt((A.x-i.end.x)**2+(A.y-i.end.y)**2),d=Math.sqrt((c.x-i.start.x)**2+(c.y-i.start.y)**2),p=h+d,m=Math.min(g,p);(g<=p?l:h)<1&&(g<=p?u:d)<1&&m<s&&(s=m,r=a)}r>=0&&n.set(r,i)}return n}_step(){if(!this.currentTrace){const r=this.unprocessedRoutes.shift();if(!r)return this.currentScheduleIndex++,this.currentScheduleIndex<this.KEEPOUT_RADIUS_SCHEDULE.length?(this.currentKeepoutRadius=this.KEEPOUT_RADIUS_SCHEDULE[this.currentScheduleIndex],this.unprocessedRoutes=D5([...this.processedRoutes],this.currentScheduleIndex),this.smoothedCursorRoutes=[...this.unprocessedRoutes],this.processedRoutes=[],void(this.hdRouteSHI=new oB([...this.unprocessedRoutes,...this.boardOutlineRoutes]))):(this.redrawnHdRoutes=this.processedRoutes,void(this.solved=!0));if(this.currentTrace=r,this.currentTrace.route.length<2)return this.processedRoutes.push(this.currentTrace),void(this.currentTrace=null);this.currentTraceJumperSegments=this.buildJumperSegmentMap(this.currentTrace);const s=this.currentTrace.route[0];return this.cursorPosition={...s},this.lastCursorPosition={...s},this.drawPosition={x:s.x,y:s.y},this.currentTraceSegmentIndex=0,this.currentTraceSegmentT=0,void(this.recordedDrawPositions=[{...s}])}this.lastCursorPosition={...this.cursorPosition};const e=this.stepCursorForward();if(e==="end")return void this.finalizeCurrentTrace();if(e==="jumper")return void(this.drawPosition={x:this.cursorPosition.x,y:this.cursorPosition.y});const n=this.getCollidingSegments(this.cursorPosition);this.lastCollidingSegments=n;const o=(function(r){const{cursorPosition:s,lastCursorPosition:a,collidingSegments:A,keepoutRadius:c}=r;if(A.length===0)return null;const l=1e-4,u=s.x-a.x,g=s.y-a.y,h=Math.sqrt(u*u+g*g),d=h>l?{x:u/h,y:g/h}:{x:1,y:0},p=-d.y,m=d.x,_=mae({pos:s,segments:A,dir:d,keepoutRadius:c});if(_>=c)return null;for(let F=1;F<=20;F++){const O=F/20*c,U={x:s.x+p*O,y:s.y+m*O},Y=mae({pos:U,segments:A,dir:d,keepoutRadius:c}),W={x:s.x-p*O,y:s.y-m*O},te=mae({pos:W,segments:A,dir:d,keepoutRadius:c}),j=Y>=c&&A6e(s,U,A),J=te>=c&&A6e(s,W,A);if(j&&J)return Y>=te?U:W;if(j)return U;if(J)return W}const f=c,I=[];for(let F=-60;F<=60;F++){const O=F/60*f,U={x:s.x+p*O,y:s.y+m*O},Y=mae({pos:U,segments:A,dir:d,keepoutRadius:c}),W=A6e(s,U,A);I.push({pos:U,clearance:Y,dist:Math.abs(O),pathClear:W,index:F})}const C=I.filter(F=>F.pathClear),y=I.findIndex(F=>F.index===0),x=y>=0?y:Math.floor(I.length/2);let E=null;for(let F=x+1;F<I.length-1;F++){const O=I[F-1],U=I[F],Y=I[F+1];if(U.clearance>=O.clearance&&U.clearance>=Y.clearance){E=U;break}}let B=null;for(let F=x-1;F>0;F--){const O=I[F-1],U=I[F],Y=I[F+1];if(U.clearance>=O.clearance&&U.clearance>=Y.clearance){B=U;break}}let S=null,Q=null;if(C.length>0){const F=C.findIndex(U=>U.index===0),O=F>=0?F:Math.floor(C.length/2);for(let U=O+1;U<C.length-1;U++){const Y=C[U-1],W=C[U],te=C[U+1];if(W.clearance>=Y.clearance&&W.clearance>=te.clearance){S=W;break}}for(let U=O-1;U>0;U--){const Y=C[U-1],W=C[U],te=C[U+1];if(W.clearance>=Y.clearance&&W.clearance>=te.clearance){Q=W;break}}}const w=[E,B,S,Q,I.find(F=>F.index===0)].filter(F=>F!=null),M=new Set,k=w.filter(F=>{const O=`${F.pos.x.toFixed(6)},${F.pos.y.toFixed(6)}`;return!M.has(O)&&(M.add(O),!0)});if(k.length===0){let F=I[0];if(!F)return null;for(const O of I)O.clearance>F.clearance&&(F=O);return Math.sqrt((F.pos.x-s.x)**2+(F.pos.y-s.y)**2)>l?F.pos:null}let R;if(_<.15*c){R=k[0];for(const F of k)F.clearance>R.clearance&&(R=F)}else{const F=k.filter(U=>U.pathClear),O=F.length>0?F:k;R=O[0];for(const U of O)U.clearance>R.clearance&&(R=U)}return Math.sqrt((R.pos.x-s.x)**2+(R.pos.y-s.y)**2)>l?R.pos:null})({cursorPosition:this.cursorPosition,lastCursorPosition:this.lastCursorPosition,collidingSegments:n,keepoutRadius:this.currentKeepoutRadius});this.drawPosition=o??{...this.cursorPosition};const i=this.recordedDrawPositions[this.recordedDrawPositions.length-1];if(i&&this.drawPosition){const r={x:i.x,y:i.y,z:i.z},s={x:this.drawPosition.x,y:this.drawPosition.y,z:this.cursorPosition.z};this.segmentIntersectsOtherRoutes(r,s)&&(this.drawPosition={...this.cursorPosition})}this.recordedDrawPositions.push({x:this.drawPosition.x,y:this.drawPosition.y,z:this.cursorPosition.z})}getStepDistance(){return this.currentKeepoutRadius/2}getJumperAtCurrentSegmentStart(){return this.currentTraceSegmentT>W3?null:this.currentTraceJumperSegments.get(this.currentTraceSegmentIndex)??null}stepCursorForward(){if(!this.currentTrace||!this.cursorPosition)return"end";const e=this.currentTrace.route;let n=this.getStepDistance();for(;n>0;){if(this.currentTraceSegmentIndex>=e.length-1)return"end";const o=this.getJumperAtCurrentSegmentStart();if(o){const u=e[this.currentTraceSegmentIndex],g=e[this.currentTraceSegmentIndex+1],h=Math.sqrt((u.x-o.start.x)**2+(u.y-o.start.y)**2),d=Math.sqrt((u.x-o.end.x)**2+(u.y-o.end.y)**2),p=h<=d?o.start:o.end,m=h<=d?o.end:o.start;return this.recordedDrawPositions.push({x:p.x,y:p.y,z:u.z,insideJumperPad:!0}),this.recordedDrawPositions.push({x:m.x,y:m.y,z:g.z,insideJumperPad:!0}),this.cursorPosition={x:m.x,y:m.y,z:g.z},this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0,"jumper"}const i=e[this.currentTraceSegmentIndex],r=e[this.currentTraceSegmentIndex+1],s=r.x-i.x,a=r.y-i.y,A=Math.sqrt(s*s+a*a);if(A===0){this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0;continue}const c=this.currentTraceSegmentT*A,l=A-c;if(n<=l){const u=c+n;return this.currentTraceSegmentT=u/A,this.cursorPosition={x:i.x+s*this.currentTraceSegmentT,y:i.y+a*this.currentTraceSegmentT,z:i.z},"stepped"}if(n-=l,this.currentTraceSegmentIndex++,this.currentTraceSegmentT=0,this.currentTraceSegmentIndex>=e.length-1){const u=e[e.length-1];return this.cursorPosition={...u},"end"}}return"stepped"}getCollidingSegments(e){if(!this.currentTrace)return[];const n=this.currentTrace.rootConnectionName??this.currentTrace.connectionName,o=2*this.currentKeepoutRadius,i=[],r=this.obstacleSHI.searchArea(e.x,e.y,o,o).filter(a=>a.__zLayers?.includes(e.z));for(const a of r){if(a.__zLayers&&!a.__zLayers.includes(e.z)||a.connectedTo.includes(n)||a.obstacleId&&this.input.connMap.areIdsConnected(n,a.obstacleId))continue;let A=!1;for(const c of a.connectedTo)if(this.input.connMap.areIdsConnected(n,c)){A=!0;break}A||i.push(...c6e(a))}const s=this.hdRouteSHI.getConflictingRoutesNearPoint({x:e.x,y:e.y,z:e.z},o);for(const{conflictingRoute:a}of s){const A=a.rootConnectionName??a.connectionName;if(A===n||this.input.connMap.areIdsConnected(n,A))continue;const c=a.traceThickness??.15;i.push(...qZn(a.route,c,{x:e.x,y:e.y},o,a.jumpers))}return i}positionHasCollision(e,n=0){const o=this.getCollidingSegments(e);for(const i of o)if(wc(e,i.start,i.end)<=this.currentKeepoutRadius+n)return!0;return!1}segmentIntersectsOtherRoutes(e,n){if(!this.currentTrace)return!1;const o=this.currentTrace.rootConnectionName??this.currentTrace.connectionName,i=[...this.unprocessedRoutes,...this.smoothedCursorRoutes,...this.processedRoutes];for(const r of i)if((r.rootConnectionName??r.connectionName)!==o)for(let s=0;s<r.route.length-1;s++){const a=r.route[s],A=r.route[s+1];if((a.z===e.z||A.z===e.z)&&(!a.insideJumperPad||!A.insideJumperPad)&&Uh({x:e.x,y:e.y},{x:n.x,y:n.y},{x:a.x,y:a.y},{x:A.x,y:A.y}))return!0}return!1}finalizeCurrentTrace(){if(!this.currentTrace)return;const e=this.currentTrace.route[this.currentTrace.route.length-1],n=this.recordedDrawPositions[this.recordedDrawPositions.length-1];n&&n.x===e.x&&n.y===e.y||this.recordedDrawPositions.push({...e});const o=(function(r,s){if(r.length<4)return r;let a=[...r],A=!0;for(;A;){A=!1;for(let c=0;c<a.length-1&&!A;c++){const l=a[c],u=a[c+1];if(l.z===u.z)for(let g=c+2;g<a.length-1&&!A;g++){if(g===c+1)continue;const h=a[g],d=a[g+1];if(h.z!==d.z||l.z!==h.z)continue;const p=XZn(l,u,h,d);if(p){if(eeo(a,c+1,g,s))continue;const m=[];for(let _=0;_<=c;_++)m.push(a[_]);m.push({x:p.x,y:p.y,z:l.z});for(let _=g+1;_<a.length;_++)m.push(a[_]);a=m,A=!0}}}}return a})(this.simplifyRoute(this.recordedDrawPositions,this.currentTrace.jumpers),this.currentTrace.jumpers),i={connectionName:this.currentTrace.connectionName,rootConnectionName:this.currentTrace.rootConnectionName,traceThickness:this.currentTrace.traceThickness,viaDiameter:this.currentTrace.viaDiameter,route:o,vias:[...this.currentTrace.vias],jumpers:this.currentTrace.jumpers};this.processedRoutes.push(i),this.hdRouteSHI.removeRoute(this.currentTrace.connectionName),this.hdRouteSHI.addRoute(i),this.currentTrace=null,this.cursorPosition=null,this.lastCursorPosition=null,this.drawPosition=null,this.recordedDrawPositions=[]}isJumperEndpoint(e,n){if(!n||n.length===0)return!1;for(const o of n)if(Math.abs(e.x-o.start.x)<W3&&Math.abs(e.y-o.start.y)<W3||Math.abs(e.x-o.end.x)<W3&&Math.abs(e.y-o.end.y)<W3)return!0;return!1}simplifyRoute(e,n){if(e.length<=2)return e;const o=[e[0]];for(let i=1;i<e.length-1;i++){const r=o[o.length-1],s=e[i],a=e[i+1];if(this.isJumperEndpoint(s,n)){o.push(s);continue}if(s.z!==r.z||s.z!==a.z){o.push(s);continue}const A=s.x-r.x,c=s.y-r.y,l=a.x-s.x,u=A*(a.y-s.y)-c*l;Math.abs(u)>1e-6&&o.push(s)}return o.push(e[e.length-1]),o}createBoardOutlineRoutes(){const e=[];if(!this.input.srj)return e;const{outline:n,bounds:o}=this.input.srj;let i;i=n&&n.length>=3?n:[{x:o.minX,y:o.minY},{x:o.maxX,y:o.minY},{x:o.maxX,y:o.maxY},{x:o.minX,y:o.maxY}];const r=this.input.srj.layerCount??2;for(let s=0;s<i.length;s++){const a=i[s],A=i[(s+1)%i.length];for(let c=0;c<r;c++)e.push({connectionName:`__board_outline___${s}_z${c}`,traceThickness:.01,viaDiameter:0,route:[{x:a.x,y:a.y,z:c},{x:A.x,y:A.y,z:c}],vias:[]})}return e}visualize(){const e={lines:[],points:[],rects:[],circles:[],coordinateSystem:"cartesian",title:`Trace Keepout Solver (radius: ${this.currentKeepoutRadius.toFixed(2)})`};for(const n of this.originalHdRoutes)if(n.route.length!==0)for(let o=0;o<n.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z&&e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:"rgba(0,0,0,0.25)",strokeWidth:1.5*(n.traceThickness??.15)})}if(this.input.jumpers)for(const n of this.input.jumpers){for(const o of n.pads){const i=o.connectedTo.length>0?o.connectedTo.join(", "):"unused",r=o.connectedTo.length>0?this.input.colorMap[o.connectedTo[0]]||"#888888":"rgba(128, 128, 128, 0.5)";e.rects.push({center:o.center,width:o.width,height:o.height,fill:r,stroke:"rgba(0, 0, 0, 0.5)",label:`Jumper pad (${i})`})}n.pads.length>=2&&e.lines.push({points:[n.pads[0].center,n.pads[1].center],strokeColor:"rgba(100, 100, 100, 0.8)",strokeWidth:.2,label:"Jumper body"})}for(const n of this.input.obstacles){let o="rgba(128, 128, 128, 0.2)";const i=n.__zLayers?.includes(0),r=n.__zLayers?.includes(1);i&&r?o="rgba(128, 0, 128, 0.2)":i?o="rgba(255, 0, 0, 0.2)":r&&(o="rgba(0, 0, 255, 0.2)"),e.rects.push({center:n.center,width:n.width,height:n.height,fill:o,label:`Obstacle (Z: ${n.__zLayers?.join(", ")})`})}if(this.input.srj){const{outline:n,bounds:o}=this.input.srj;let i;i=n&&n.length>=3?n:[{x:o.minX,y:o.minY},{x:o.maxX,y:o.minY},{x:o.maxX,y:o.maxY},{x:o.minX,y:o.maxY}];for(let r=0;r<i.length;r++){const s=i[r],a=i[(r+1)%i.length];e.lines.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:"rgba(0, 128, 0, 0.6)",strokeWidth:.1,label:"Board outline"})}}for(const n of this.processedRoutes){if(n.route.length===0)continue;const o=this.input.colorMap[n.connectionName]||"#888888",i=new Set;if(n.jumpers&&n.jumpers.length>0)for(const r of n.jumpers)for(let s=0;s<n.route.length-1;s++){const a=n.route[s],A=n.route[s+1],c=Math.abs(a.x-r.start.x)<W3&&Math.abs(a.y-r.start.y)<W3&&Math.abs(A.x-r.end.x)<W3&&Math.abs(A.y-r.end.y)<W3,l=Math.abs(a.x-r.end.x)<W3&&Math.abs(a.y-r.end.y)<W3&&Math.abs(A.x-r.start.x)<W3&&Math.abs(A.y-r.start.y)<W3;if(c||l){i.add(s);break}}for(let r=0;r<n.route.length-1;r++){const s=n.route[r],a=n.route[r+1];i.has(r)?e.lines.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:"rgba(128, 128, 128, 0.6)",strokeDash:"2 2",label:`${n.connectionName} (jumper segment - fixed)`}):s.z===a.z&&e.lines.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:s.z===0?"red":"blue",strokeWidth:n.traceThickness,label:`${n.connectionName} (z=${s.z})`})}for(const r of n.vias)e.circles.push({center:{x:r.x,y:r.y},radius:n.viaDiameter/2,fill:"rgba(255, 0, 255, 0.5)",label:`${n.connectionName} via`});if(n.jumpers&&n.jumpers.length>0){const r=_x(n.jumpers,{color:o,label:n.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}if(this.currentTrace&&this.recordedDrawPositions.length>0){this.input.colorMap[this.currentTrace.connectionName];for(let n=0;n<this.recordedDrawPositions.length-1;n++){const o=this.recordedDrawPositions[n],i=this.recordedDrawPositions[n+1];e.lines.push({points:[{x:o.x,y:o.y},{x:i.x,y:i.y}],strokeColor:"green",strokeWidth:this.currentTrace.traceThickness})}if(this.cursorPosition&&(e.circles.push({center:{x:this.cursorPosition.x,y:this.cursorPosition.y},radius:this.currentKeepoutRadius,stroke:"orange",fill:"none"}),e.points.push({x:this.cursorPosition.x,y:this.cursorPosition.y,color:"orange",label:"Cursor"}),this.lastCursorPosition)){const n=this.cursorPosition.x-this.lastCursorPosition.x,o=this.cursorPosition.y-this.lastCursorPosition.y,i=Math.sqrt(n*n+o*o),r=i>1e-4?{x:n/i,y:o/i}:{x:1,y:0},s=this.currentKeepoutRadius/4,a={x:this.cursorPosition.x-r.x*s,y:this.cursorPosition.y-r.y*s},A={x:this.cursorPosition.x+r.x*s,y:this.cursorPosition.y+r.y*s};e.lines.push({points:[a,A],strokeColor:"cyan",strokeWidth:.05,label:"Projected segment"})}this.drawPosition&&e.points.push({x:this.drawPosition.x,y:this.drawPosition.y,color:"lime",label:"Draw"});for(const n of this.lastCollidingSegments)e.lines.push({points:[{x:n.start.x,y:n.start.y},{x:n.end.x,y:n.end.y}],strokeColor:"rgba(255, 0, 255, 0.8)",strokeWidth:.02,label:"Colliding segment"})}if(!this.solved){for(const n of this.smoothedCursorRoutes)if(n.route.length!==0)for(let o=0;o<n.route.length-1;o++){const i=n.route[o],r=n.route[o+1];i.z===r.z&&e.lines.push({points:[{x:i.x,y:i.y},{x:r.x,y:r.y}],strokeColor:"gray"})}}return e}getRedrawnHdRoutes(){return this.redrawnHdRoutes}},g1t=class extends yr{constructor(e){super(),this.input=e,this.unprocessedObstacles=c7(this.input.srj.obstacles,this.input.srj.layerCount).filter(n=>n.offBoardConnectsTo&&n.offBoardConnectsTo.length>0),this.unprocessedObstacles.forEach((n,o)=>{n.obstacleId=n.obstacleId??`__obs${o}`}),this.offBoardConnMap=new W7e({}),this.offBoardConnMap.addConnections(this.unprocessedObstacles.filter(n=>n.offBoardConnectsTo?.length).map(n=>[n.obstacleId,...n.offBoardConnectsTo??[]])),this.nodeTree=new B7e(this.input.capacityMeshNodes)}input;getSolverName(){return"RelateNodesToOffBoardConnectionsSolver"}unprocessedObstacles;nodeTree;offBoardConnMap;nodesInNet=new Map;lastProcessedObstacle;_step(){const e=this.unprocessedObstacles.pop();if(this.lastProcessedObstacle=e,!e)return void(this.solved=!0);const n=this.offBoardConnMap.getNetConnectedToId(e.obstacleId),o=this.nodeTree.getNodesInArea(e.center.x,e.center.y,.01,.01).filter(a=>a.availableZ.some(A=>e.__zLayers?.includes(A))).filter(a=>Math.abs(a.center.x-e.center.x)<.01&&Math.abs(a.center.y-e.center.y)<.01),i=o.map(a=>a.capacityMeshNodeId),r=this.nodesInNet.get(n)??[],s=[...r.map(a=>a.capacityMeshNodeId),...i];for(const a of r)a._offBoardConnectedCapacityMeshNodeIds=s;for(const a of o)a._offBoardConnectedCapacityMeshNodeIds=s,a._offBoardConnectionId=n;this.nodesInNet.set(n,[...r,...o])}getOutput(){return{capacityNodes:this.input.capacityMeshNodes}}visualize(){const e={rects:[],lines:[],points:[],circles:[]},n=new Set;for(const[o,i]of this.nodesInNet)for(const r of i)n.add(r.capacityMeshNodeId);for(const o of this.input.capacityMeshNodes)n.has(o.capacityMeshNodeId)||e.rects.push({center:o.center,width:o.width-.1,height:o.height-.1,fill:"rgba(0, 0, 0, 0.2)"});this.lastProcessedObstacle&&e.rects.push({center:this.lastProcessedObstacle.center,width:this.lastProcessedObstacle.width,height:this.lastProcessedObstacle.height,fill:"rgba(255, 0, 0, 0.5)"});for(const[o,i]of this.nodesInNet.entries()){for(const r of i)e.rects.push({center:r.center,width:r.width,height:r.height,fill:Fz(o,.2),label:`OffBoardConn: ${o}`});for(const r of i)for(const s of i)r.capacityMeshNodeId!==s.capacityMeshNodeId&&e.lines.push({points:[r.center,s.center],strokeColor:Fz(o,1)})}return e}},Cae=.1,yae=.1;function xae(t,e,n,o,i,r){return(i-t)*(o-e)-(r-e)*(n-t)}function Eae(t,e,n,o,i,r){return Math.min(t,n)<=i&&i<=Math.max(t,n)&&Math.min(e,o)<=r&&r<=Math.max(e,o)}function teo(t,e,n,o,i,r,s,a){const A=xae(i,r,s,a,t,e),c=xae(i,r,s,a,n,o),l=xae(t,e,n,o,i,r),u=xae(t,e,n,o,s,a);return(A>0&&c<0||A<0&&c>0)&&(l>0&&u<0||l<0&&u>0)||!(A!==0||!Eae(i,r,s,a,t,e))||!(c!==0||!Eae(i,r,s,a,n,o))||!(l!==0||!Eae(t,e,n,o,i,r))||!(u!==0||!Eae(t,e,n,o,s,a))}function neo(t,e,n,o,i,r){const s=i-n,a=r-o,A=t-n,c=e-o,l=s*s+a*a;if(l===0)return{x:n,y:o,distSq:A*A+c*c};let u=(A*s+c*a)/l;u=Math.max(0,Math.min(1,u));const g=n+u*s,h=o+u*a,d=t-g,p=e-h;return{x:g,y:h,distSq:d*d+p*p}}var oeo=class extends yr{getSolverName(){return"SimpleHighDensitySolver"}unsolvedNodes;allNodes;routes;colorMap;traceWidth;viaDiameter;numMovablePoints;currentNode=null;lastNode=null;currentNodeStep=0;routesInProgress=[];pushMargin;currentNodeBounds=null;constructor({nodePortPoints:e,colorMap:n,traceWidth:o=.1,viaDiameter:i=.3,pushMargin:r=.3,numMovablePoints:s=2}){if(super(),s<1||s>3)throw new Error(`numMovablePoints must be 1, 2, or 3, got ${s}`);this.allNodes=[...e],this.unsolvedNodes=[...e],this.colorMap=n??{},this.routes=[],this.traceWidth=o,this.viaDiameter=i,this.numMovablePoints=s,this.pushMargin=r,this.MAX_ITERATIONS=10*e.length+1}_step(){if(this.currentNode===null){if(this.unsolvedNodes.length===0)return void(this.solved=!0);this.lastNode=this.currentNode,this.currentNode=this.unsolvedNodes.pop(),this.currentNodeStep=0,this.routesInProgress=[],this._initializeRoutesForCurrentNode()}this.currentNodeStep>0&&this._runForceDirectedStep(),this.currentNodeStep++,this.currentNodeStep>=10&&(this._finalizeRoutesForCurrentNode(),this.lastNode=this.currentNode,this.currentNode=null)}_initializeRoutesForCurrentNode(){const e=this.currentNode,n=e.center.x-e.width/2,o=e.center.x+e.width/2,i=e.center.y-e.height/2,r=e.center.y+e.height/2;this.currentNodeBounds={minX:n,maxX:o,minY:i,maxY:r};const s=new Map;for(const a of e.portPoints)s.has(a.connectionName)||s.set(a.connectionName,[]),s.get(a.connectionName).push({x:a.x,y:a.y,z:a.z,rootConnectionName:a.rootConnectionName});for(const[a,A]of s){if(A.length<2)continue;const c=A[0],l=A[A.length-1],u=c.z,g=l.x-c.x,h=l.y-c.y,d=Math.sqrt(g*g+h*h),p=d>0?g/d:0,m=d>0?h/d:0,_=[];this.numMovablePoints>=1&&_.push({x:c.x+p*yae,y:c.y+m*yae,z:u,rootConnectionName:c.rootConnectionName,connectionName:a}),this.numMovablePoints>=2&&_.push({x:l.x-p*yae,y:l.y-m*yae,z:u,rootConnectionName:c.rootConnectionName,connectionName:a}),this.numMovablePoints>=3&&_.push({x:c.x+g/2,y:c.y+h/2,z:u,rootConnectionName:c.rootConnectionName,connectionName:a}),this.routesInProgress.push({connectionName:a,rootConnectionName:c.rootConnectionName,startPoint:{x:c.x,y:c.y,z:u},endPoint:{x:l.x,y:l.y,z:u},movablePoints:_})}}_runForceDirectedStep(){const e=this.currentNodeBounds,n=[];for(const A of this.routesInProgress)n.push(...A.movablePoints);const o=new Map;for(const A of n)o.set(A,{fx:0,fy:0});const i=.3+this.pushMargin,r=new Map;for(const A of this.routesInProgress){const c=[{x:A.startPoint.x,y:A.startPoint.y,movablePoint:null}];A.movablePoints.length===1?c.push({x:A.movablePoints[0].x,y:A.movablePoints[0].y,movablePoint:A.movablePoints[0]}):A.movablePoints.length===2?(c.push({x:A.movablePoints[0].x,y:A.movablePoints[0].y,movablePoint:A.movablePoints[0]}),c.push({x:A.movablePoints[1].x,y:A.movablePoints[1].y,movablePoint:A.movablePoints[1]})):A.movablePoints.length===3&&(c.push({x:A.movablePoints[0].x,y:A.movablePoints[0].y,movablePoint:A.movablePoints[0]}),c.push({x:A.movablePoints[2].x,y:A.movablePoints[2].y,movablePoint:A.movablePoints[2]}),c.push({x:A.movablePoints[1].x,y:A.movablePoints[1].y,movablePoint:A.movablePoints[1]})),c.push({x:A.endPoint.x,y:A.endPoint.y,movablePoint:null}),r.set(A,c)}for(const A of n){const c=o.get(A),l=A.x-e.minX,u=e.maxX-A.x,g=e.maxY-A.y,h=A.y-e.minY;l<i&&(c.fx+=Cae*(i-l)),u<i&&(c.fx-=Cae*(i-u)),h<i&&(c.fy+=Cae*(i-h)),g<i&&(c.fy-=Cae*(i-g));for(const d of this.routesInProgress){if(d.rootConnectionName===A.rootConnectionName)continue;const p=r.get(d);for(let m=0;m<p.length-1;m++){const _=p[m],f=p[m+1],I=neo(A.x,A.y,_.x,_.y,f.x,f.y),C=Math.sqrt(I.distSq);if(C>0&&C<2*i){const y=A.x-I.x,x=A.y-I.y,E=.002/I.distSq,B=E*y,S=E*x;c.fx+=B,c.fy+=S;const Q=_.movablePoint,w=f.movablePoint;if(Q&&w){const M=o.get(Q),k=o.get(w);M.fx-=B/2,M.fy-=S/2,k.fx-=B/2,k.fy-=S/2}else if(Q){const M=o.get(Q);M.fx-=B,M.fy-=S}else if(w){const M=o.get(w);M.fx-=B,M.fy-=S}}}}}const s=A=>A.movablePoint?{x:A.movablePoint.x,y:A.movablePoint.y}:{x:A.x,y:A.y},a=A=>{let c=null;for(const h of this.routesInProgress)if(h.movablePoints.includes(A)){c=h;break}if(!c)return!1;const l=r.get(c);let u=-1;for(let h=0;h<l.length;h++)if(l[h].movablePoint===A){u=h;break}if(u===-1)return!1;const g=[];if(u>0){const h=s(l[u-1]);g.push({ax:h.x,ay:h.y,bx:A.x,by:A.y})}if(u<l.length-1){const h=s(l[u+1]);g.push({ax:A.x,ay:A.y,bx:h.x,by:h.y})}for(const h of this.routesInProgress){if(h.rootConnectionName===c.rootConnectionName)continue;const d=r.get(h);for(let p=0;p<d.length-1;p++){const m=s(d[p]),_=s(d[p+1]);for(const f of g)if(teo(f.ax,f.ay,f.bx,f.by,m.x,m.y,_.x,_.y))return!0}}return!1};for(const A of n){const c=o.get(A);A.forceX=c.fx,A.forceY=c.fy;const l=A.x,u=A.y;A.x+=c.fx,A.y+=c.fy,A.x=Math.max(e.minX,Math.min(e.maxX,A.x)),A.y=Math.max(e.minY,Math.min(e.maxY,A.y)),a(A)&&(A.x=l,A.y=u)}}_finalizeRoutesForCurrentNode(){for(const e of this.routesInProgress){const{connectionName:n,rootConnectionName:o,startPoint:i,endPoint:r,movablePoints:s}=e,a=[{x:i.x,y:i.y,z:i.z}];s.length===1?a.push({x:s[0].x,y:s[0].y,z:s[0].z}):s.length===2?(a.push({x:s[0].x,y:s[0].y,z:s[0].z}),a.push({x:s[1].x,y:s[1].y,z:s[1].z})):s.length===3&&(a.push({x:s[0].x,y:s[0].y,z:s[0].z}),a.push({x:s[2].x,y:s[2].y,z:s[2].z}),a.push({x:s[1].x,y:s[1].y,z:s[1].z})),a.push({x:r.x,y:r.y,z:r.z});const A={connectionName:n,rootConnectionName:o,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:a,vias:[]};this.routes.push(A)}this.routesInProgress=[]}_getNodeBounds(e){return{minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2}}visualize(){const e={lines:[],points:[],rects:[],circles:[]};for(const n of this.unsolvedNodes){if(n===this.currentNode)continue;const o=this._getNodeBounds(n);e.rects.push({center:{x:(o.minX+o.maxX)/2,y:(o.minY+o.maxY)/2},width:o.maxX-o.minX,height:o.maxY-o.minY,fill:"rgba(0, 0, 0, 0.08)",stroke:"rgba(0, 0, 0, 0.2)",label:n.capacityMeshNodeId})}if(this.lastNode){const n=this._getNodeBounds(this.lastNode);e.rects.push({center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY,fill:"rgba(0, 200, 0, 0.15)",stroke:"rgba(0, 0, 255, 0.6)"})}if(this.currentNode){const n=this._getNodeBounds(this.currentNode);e.rects.push({center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY,fill:"rgba(0, 200, 0, 0.15)",stroke:"rgba(0, 200, 0, 0.6)"})}for(const n of this.unsolvedNodes){const o=new Map;for(const i of n.portPoints)o.has(i.connectionName)||o.set(i.connectionName,[]),o.get(i.connectionName).push({x:i.x,y:i.y});for(const[i,r]of o)r.length<2||e.lines.push({points:r.map(s=>({x:s.x,y:s.y})),label:i,strokeColor:"gray",strokeWidth:this.traceWidth})}for(const n of this.routes){const o=Kse(n.route,n.connectionName,this.colorMap[n.connectionName]);for(const r of o)e.lines.push({points:r.points,label:r.connectionName,strokeColor:r.z===0?r.color:Es(r.color,.75),layer:`z${r.z}`,strokeWidth:n.traceThickness,strokeDash:r.z!==0?"10, 5":void 0});const i=n.route;for(let r=0;r<i.length;r++){const s=i[r],a=r===0,A=r===i.length-1,c=!a&&!A;let l;l=a?"start":A?"end":`M${r}`,e.points.push({x:s.x,y:s.y,label:l,color:c?"orange":"blue"})}}for(const n of this.routesInProgress){const{startPoint:o,endPoint:i,movablePoints:r,connectionName:s}=n,a=this.colorMap[s]??"gray",A=[{x:o.x,y:o.y}];r.length===1?A.push({x:r[0].x,y:r[0].y}):r.length===2?(A.push({x:r[0].x,y:r[0].y}),A.push({x:r[1].x,y:r[1].y})):r.length===3&&(A.push({x:r[0].x,y:r[0].y}),A.push({x:r[2].x,y:r[2].y}),A.push({x:r[1].x,y:r[1].y})),A.push({x:i.x,y:i.y}),e.lines.push({points:A,label:s,strokeColor:a,strokeWidth:this.traceWidth}),e.points.push({x:o.x,y:o.y,label:"start",color:"blue"});for(let c=0;c<r.length;c++){const l=r[c];if(e.points.push({x:l.x,y:l.y,label:`M${c+1}`,color:"orange"}),l.forceX!==void 0&&l.forceY!==void 0&&Math.sqrt(l.forceX*l.forceX+l.forceY*l.forceY)>.001){e.lines.push({points:[{x:l.x,y:l.y},{x:l.x+l.forceX*5,y:l.y+l.forceY*5}],strokeColor:"red",strokeWidth:.02,label:`F${c+1}`});const g=.05,h=l.x+l.forceX*5,d=l.y+l.forceY*5,p=Math.atan2(l.forceY,l.forceX);e.lines.push({points:[{x:h,y:d},{x:h-g*Math.cos(p-Math.PI/6),y:d-g*Math.sin(p-Math.PI/6)}],strokeColor:"red",strokeWidth:.02}),e.lines.push({points:[{x:h,y:d},{x:h-g*Math.cos(p+Math.PI/6),y:d-g*Math.sin(p+Math.PI/6)}],strokeColor:"purple",strokeWidth:.02})}}e.points.push({x:i.x,y:i.y,label:"end",color:"blue"})}return e}},d1t=({connMap:t,connectionsWithResults:e,inputNodes:n,obstacles:o})=>{const i=o.filter(a=>a.offBoardConnectsTo?.length);if(i.length===0)return;const r=new TD({});r.addConnections(i.map((a,A)=>[a.obstacleId??`__obs${A}`,...a.offBoardConnectsTo??[]]));const s=new Map(n.map(a=>[a.capacityMeshNodeId,a]));for(const a of e){if(!a.path)continue;const A=a.connection.rootConnectionName??a.connection.name,c=new Set;for(const l of a.path){const u=s.get(l.currentNodeId);if(u?._offBoardConnectionId&&c.add(u._offBoardConnectionId),l.throughNodeId){const g=s.get(l.throughNodeId);g?._offBoardConnectionId&&c.add(g._offBoardConnectionId)}}for(const l of c){const u=r.getIdsConnectedToNet(l);u?.length&&t.addConnections([[A,...u]])}}};function T5(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var ieo=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.srj=e,this.opts={...n},this.viaDiameter=om(e).padDiameter,this.minTraceWidth=e.minTraceWidth;const o=this.opts;if(this.effort=o.effort??1,this.MAX_ITERATIONS=1e8*this.effort,o.capacityDepth===void 0){const i=e.bounds.maxX-e.bounds.minX,r=e.bounds.maxY-e.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.connMap=Jm(e),this.colorMap=Jf(e,this.connMap),this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return"AssignableAutoroutingPipeline2"}netToPointPairsSolver;nodeSolver;nodeTargetMerger;edgeSolver;relateNodesToOffBoardConnections;colorMap;highDensityRouteSolver;simpleHighDensityRouteSolver;highDensitySolver;highDensityStitchSolver;singleLayerNodeMerger;offboardPathFragmentSolver;strawSolver;deadEndSolver;traceSimplificationSolver;traceKeepoutSolver;traceWidthSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;viaDiameter;minTraceWidth;effort;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[T5("netToPointPairsSolver",J7e,e=>[e.srj,e.colorMap,JQ(e.srj)],{onSolved:e=>{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,this.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),T5("nodeSolver",qF,e=>[{simpleRouteJson:e.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:e=>{e.capacityNodes=e.nodeSolver?.getOutput().meshNodes??[]}}),T5("relateNodesToOffBoardConnections",g1t,e=>[{capacityMeshNodes:e.capacityNodes,srj:e.srj}],{onSolved:e=>{e.capacityNodes=e.relateNodesToOffBoardConnections?.getOutput().capacityNodes}}),T5("edgeSolver",WQ,e=>[e.capacityNodes],{onSolved:e=>{e.capacityEdges=e.edgeSolver?.edges}}),T5("availableSegmentPointSolver",kD,e=>[{nodes:e.capacityNodes,edges:e.capacityEdges||[],traceWidth:e.minTraceWidth,colorMap:e.colorMap,shouldReturnCrampedPortPoints:!1}]),T5("portPointPathingSolver",z7e,e=>{const n=e.capacityNodes.map(r=>({capacityMeshNodeId:r.capacityMeshNodeId,center:r.center,width:r.width,height:r.height,portPoints:[],availableZ:r.availableZ,_containsTarget:r._containsTarget,_containsObstacle:r._containsObstacle,_offBoardConnectionId:r._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:r._offBoardConnectedCapacityMeshNodeIds})),o=new Map(n.map(r=>[r.capacityMeshNodeId,r])),i=e.availableSegmentPointSolver;for(const r of i.sharedEdgeSegments)for(const s of r.portPoints){const[a,A]=s.nodeIds,c={portPointId:s.segmentPortPointId,x:s.x,y:s.y,z:s.availableZ[0]??0,connectionNodeIds:[a,A],distToCentermostPortOnZ:s.distToCentermostPortOnZ,connectsToOffBoardNode:r.nodeIds.some(u=>o.get(u)?._offBoardConnectionId)},l=o.get(a);l&&l.portPoints.push(c)}return[{simpleRouteJson:e.srjWithPointPairs,inputNodes:n,capacityMeshNodes:e.capacityNodes,colorMap:e.colorMap,numShuffleSeeds:100*e.effort,hyperParameters:{JUMPER_PF_FN_ENABLED:!1,NODE_PF_FACTOR:100,NODE_PF_MAX_PENALTY:100,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,FORCE_CENTER_FIRST:!0}}]},{onSolved:e=>{const n=e.portPointPathingSolver;n&&d1t({connMap:e.connMap,connectionsWithResults:n.connectionsWithResults,inputNodes:n.inputNodes,obstacles:e.srj.obstacles})}}),T5("multiSectionPortPointOptimizer",nZn,e=>{const n=e.portPointPathingSolver;return[{simpleRouteJson:e.srjWithPointPairs,inputNodes:n.inputNodes,capacityMeshNodes:e.capacityNodes,capacityMeshEdges:e.capacityEdges,colorMap:e.colorMap,initialConnectionResults:n.connectionsWithResults,initialAssignedPortPoints:n.assignedPortPoints,initialNodeAssignedPortPoints:n.nodeAssignedPortPoints}]}),T5("highDensitySolver",oeo,e=>[{nodePortPoints:e.multiSectionPortPointOptimizer?.getNodesWithPortPoints()??e.portPointPathingSolver?.getNodesWithPortPoints()??[],colorMap:e.colorMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth,connMap:e.connMap}]),T5("highDensityStitchSolver",j7e,e=>[{connections:e.srjWithPointPairs.connections,hdRoutes:e.highDensitySolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter}]),T5("traceSimplificationSolver",j8,e=>[{hdRoutes:e.highDensityStitchSolver?.mergedHdRoutes??e.highDensitySolver?.routes??e.highDensityRouteSolver?.routes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,iterations:2}]),T5("traceKeepoutSolver",u1t,e=>[{hdRoutes:e.traceSimplificationSolver?.simplifiedHdRoutes??[],obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,srj:e.srj}]),T5("traceWidthSolver",aL,e=>[{hdRoutes:e.traceKeepoutSolver?.redrawnHdRoutes??[],connection:e.srj.connections,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,minTraceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15,layerCount:e.srj.layerCount}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();const e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeTargetMerger?.visualize(),i=this.singleLayerNodeMerger?.visualize(),r=this.strawSolver?.visualize(),s=this.edgeSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.availableSegmentPointSolver?.visualize(),c=this.offboardPathFragmentSolver?.visualize(),l=this.portPointPathingSolver?.visualize(),u=this.multiSectionPortPointOptimizer?.visualize(),g=this.highDensityRouteSolver?.visualize(),h=this.highDensitySolver?.visualize(),d=this.simpleHighDensityRouteSolver?.visualize(),p=this.highDensityStitchSolver?.visualize(),m=this.traceSimplificationSolver?.visualize(),_=this.traceKeepoutSolver?.visualize(),f=this.traceWidthSolver?.visualize(),I=this.srj.outline,C=[];if(C.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),I&&I.length>=2){const B=I.map(S=>({x:S.x,y:S.y}));B.push({...B[0]}),C.push({points:B,strokeColor:"rgba(0, 136, 255, 0.95)"})}const y=z8(this.srj),x={points:[...this.srj.connections.flatMap(B=>B.pointsToConnect.map(S=>({...S,layer:J8(S,this.srj.layerCount),label:`${B.name} ${S.pcb_port_id??""}`})))],rects:[...(this.srj.obstacles??[]).filter(B=>!B.isCopperPour).map(B=>({...B,fill:B.layers?.includes("top")?"rgba(255,0,0,0.25)":B.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(B,this.srj.layerCount),label:y(B)}))],lines:C},E=[x,e,n,o,i,r,s,a,A,c,l,u,g?Il(x,g):null,h?Il(x,h):null,d?Il(x,d):null,p,m,_,f,this.solved?Il({lines:C},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...E)}preview(){const e=this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes;if(e){const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];if(n.push({points:i.route.map(r=>({x:r.x,y:r.y})),strokeColor:this.colorMap[i.connectionName]}),n.length>200)break}return{lines:n}}if(this.portPointPathingSolver){const n=[];for(const o of this.portPointPathingSolver.connectionsWithResults)o.path&&n.push({points:o.path.map(i=>({x:i.point.x,y:i.point.y})),strokeColor:this.colorMap[o.connection.name]});return{lines:n}}return this.netToPointPairsSolver?this.netToPointPairsSolver?.visualize():{}}_getOutputHdRoutes(){return this.traceWidthSolver?.hdRoutesWithWidths??this.traceKeepoutSolver?.redrawnHdRoutes??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver?.mergedHdRoutes??this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes}getConnectedOffboardObstacles(){const e={},n=new Set(this.srj.connections.flatMap(o=>o.__rootConnectionNames??[o.name]));for(const[o,i]of this.srj.obstacles.entries()){if(!i.offBoardConnectsTo?.length)continue;const r=i.obstacleId??`__obs${o}`,s=this.connMap.getNetConnectedToId(r);if(!s)continue;const a=this.connMap.getIdsConnectedToNet(s).find(A=>n.has(A));a&&(e[r]=a)}return e}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver&&!this.simpleHighDensityRouteSolver&&!this.highDensitySolver)throw new Error("Cannot get output before solving is complete");const e=[],n=this._getOutputHdRoutes();for(const o of this.netToPointPairsSolver?.newConnections??[]){const i=o.__netConnectionName??this.srj.connections.find(s=>s.name===o.name)?.__netConnectionName,r=n.filter(s=>s.connectionName===o.name);for(let s=0;s<r.length;s++){const a=r[s],A={type:"pcb_trace",pcb_trace_id:`${o.name}_${s}`,connection_name:i??o.__rootConnectionNames?.[0]??o.name,route:nB(a,this.srj.layerCount)};e.push(A)}}return e}getOutputSimpleRouteJson(){return{...this.srj,traces:this.getOutputSimplifiedPcbTraces()}}},reo=class extends yr{getSolverName(){return"MultipleHighDensityRouteStitchSolver2"}unsolvedRoutes;mergedHdRoutes=[];colorMap={};defaultTraceThickness;defaultViaDiameter;constructor(e){super(),this.colorMap=e.colorMap??{};const n=e.hdRoutes[0];this.defaultTraceThickness=n?.traceThickness??.15,this.defaultViaDiameter=n?.viaDiameter??e.defaultViaDiameter??.3;const o=new Map;for(const r of e.connectionPathResults)o.set(r.connection.name,r);const i=new Map;for(const r of e.hdRoutes){const s=i.get(r.connectionName);s?s.push(r):i.set(r.connectionName,[r])}this.unsolvedRoutes=[];for(const[r,s]of i.entries()){const a=e.connections.find(g=>g.name===r);if(!a)continue;const A=o.get(r);let c=[];A?.path&&(c=A.path.map(g=>g.currentNodeId));const l={...a.pointsToConnect[0],z:Kr(tI(a.pointsToConnect[0]),e.layerCount)},u={...a.pointsToConnect[1],z:Kr(tI(a.pointsToConnect[1]),e.layerCount)};this.unsolvedRoutes.push({connectionName:r,hdRoutes:s,nodeOrder:c,start:l,end:u})}this.MAX_ITERATIONS=1e5}_step(){const e=this.unsolvedRoutes.pop();if(!e)return void(this.solved=!0);const n=this.stitchOrderedRoutes(e);this.mergedHdRoutes.push(n)}stitchOrderedRoutes(e){const{connectionName:n,hdRoutes:o,nodeOrder:i,start:r,end:s}=e;if(o.length===0)return{connectionName:n,traceThickness:this.defaultTraceThickness,viaDiameter:this.defaultViaDiameter,route:[r,s],vias:[],jumpers:[]};let a;a=i.length>0?this.orderRoutesByNodePath(o,i,r,n):this.orderRoutesByProximity(o,r);const A=[],c=[],l=[];A.push({x:r.x,y:r.y,z:r.z});for(let g=0;g<a.length;g++){const h=a[g],d=A[A.length-1],p=h.route[0],m=h.route[h.route.length-1],_=no(d,p),f=no(d,m),I=Math.min(_,f);if(g>0&&I>1)continue;let C;C=_<=f?[...h.route]:[...h.route].reverse(),C.length>0&&no(d,C[0])<.001&&(C=C.slice(1)),A.push(...C),c.push(...h.vias),h.jumpers&&l.push(...h.jumpers)}const u=no(A[A.length-1],s);return u>.001&&u<1&&A.push({x:s.x,y:s.y,z:s.z}),{connectionName:n,rootConnectionName:o[0]?.rootConnectionName,traceThickness:o[0]?.traceThickness??this.defaultTraceThickness,viaDiameter:o[0]?.viaDiameter??this.defaultViaDiameter,route:A,vias:c,jumpers:l}}orderRoutesByNodePath(e,n,o,i){if(e.length===0)return[];const r=new Set(e);let s=null,a=1/0;for(const _ of r){const f=_.route[0],I=_.route[_.route.length-1],C=Math.min(no(o,f),no(o,I));C<a&&(a=C,s=_)}if(!s)return[];r.delete(s);const A=s.route[0],c=s.route[s.route.length-1];let l,u;no(o,A)<=no(o,c)?(l=A,u=c):(l=c,u=A);const g=(_,f)=>{let I=0;for(const C of r){if(C===f)continue;const y=C.route[0],x=C.route[C.route.length-1];(no(_,y)<10||no(_,x)<10)&&I++}return I},h=[s];let d=u;for(;r.size>0;){let _=null,f=1/0,I=-1;for(const C of r){const y=C.route[0],x=C.route[C.route.length-1],E=no(d,y),B=no(d,x),S=Math.min(E,B);if(S>=10)continue;const Q=g(E<=B?x:y,C),w=Q===0,M=I===0,k=S-f;let R=!1;R=_===null||!!(!w&&M&&k<5)||!(w&&!M&&k>-5)&&S<f,R&&(f=S,_=C,I=Q)}if(!_)break;{h.push(_),r.delete(_);const C=_.route[0],y=_.route[_.route.length-1];d=no(d,C)<=no(d,y)?y:C}}const p=[];for(d=l;r.size>0;){let _=null,f=1/0,I=-1;const C=no(d,o);for(const y of r){const x=y.route[0],E=y.route[y.route.length-1],B=no(d,x),S=no(d,E),Q=Math.min(B,S);if(Q>=10)continue;const w=B<=S?E:x;if(no(w,o)>C+2)continue;const M=g(w,y),k=M===0,R=I===0,F=Q-f;let O=!1;O=_===null||!!(!k&&R&&F<5)||!(k&&!R&&F>-5)&&Q<f,O&&(f=Q,_=y,I=M)}if(!_)break;{p.unshift(_),r.delete(_);const y=_.route[0],x=_.route[_.route.length-1];d=no(d,y)<=no(d,x)?x:y}}const m=[...p,...h];if(r.size>0){const _=[...r].map(f=>{const I=f.route[0],C=f.route[f.route.length-1];return`start=(${I.x.toFixed(2)},${I.y.toFixed(2)}) end=(${C.x.toFixed(2)},${C.y.toFixed(2)})`});console.warn(`[StitchSolver] Skipped ${r.size} routes for connection ${e[0]?.connectionName??"?"}, skipped routes: ${_.join("; ")}`)}return m}orderRoutesByProximity(e,n){const o=new Set(e),i=[];let r=n;for(;o.size>0;){let s=null,a=1/0,A=!1;for(const c of o){const l=c.route[0],u=c.route[c.route.length-1],g=no(r,l),h=no(r,u);g<a&&(a=g,s=c,A=!1),h<a&&(a=h,s=c,A=!0)}if(!s)break;{i.push(s),o.delete(s);const c=s.route[0],l=s.route[s.route.length-1];r=A?c:l}}return i}visualize(){const e={points:[],lines:[],circles:[],rects:[],title:"Multiple High Density Route Stitch Solver 2"};for(const[n,o]of this.mergedHdRoutes.entries()){const i=this.colorMap[o.connectionName]??`hsl(120, 100%, ${40+10*n%40}%)`;for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1],A=s.z!==0?Es(i,.5):i;e.lines?.push({points:[{x:s.x,y:s.y},{x:a.x,y:a.y}],strokeColor:A,strokeWidth:o.traceThickness})}for(const r of o.route){const s=r.z!==0?Es(i,.5):i;e.points?.push({x:r.x,y:r.y,color:s})}for(const r of o.vias)e.circles?.push({center:{x:r.x,y:r.y},radius:o.viaDiameter/2,fill:i});if(o.jumpers&&o.jumpers.length>0){const r=_x(o.jumpers,{color:i,label:o.connectionName});e.rects.push(...r.rects??[]),e.lines.push(...r.lines??[])}}for(const n of this.unsolvedRoutes){const o=this.colorMap[n.connectionName]??"gray";e.points?.push({x:n.start.x,y:n.start.y,color:o,label:`${n.connectionName} Start`},{x:n.end.x,y:n.end.y,color:o,label:`${n.connectionName} End`});for(let i=0;i<n.hdRoutes.length;i++){const r=n.hdRoutes[i];if(r.route.length>1&&e.lines?.push({points:r.route.map(s=>({x:s.x,y:s.y})),strokeColor:Es(o,.5),strokeDash:"10 5",label:`segment ${i}`}),r.jumpers&&r.jumpers.length>0){const s=_x(r.jumpers,{color:o,label:r.connectionName});e.rects.push(...s.rects??[]),e.lines.push(...s.lines??[])}}}return e}},seo=Object.create,h1t=Object.defineProperty,aeo=Object.getOwnPropertyDescriptor,p1t=Object.getOwnPropertyNames,Aeo=Object.getPrototypeOf,ceo=Object.prototype.hasOwnProperty,YD=(t,e)=>function(){return e||(0,t[p1t(t)[0]])((e={exports:{}}).exports,e),e.exports},m1t=(t,e,n)=>(n=t!=null?seo(Aeo(t)):{},((o,i,r,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of p1t(i))ceo.call(o,a)||a===r||h1t(o,a,{get:()=>i[a],enumerable:!(s=aeo(i,a))||s.enumerable});return o})(t&&t.__esModule?n:h1t(n,"default",{value:t,enumerable:!0}),t)),leo=YD({"node_modules/is-buffer/index.js"(t,e){function n(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}e.exports=function(o){return o!=null&&(n(o)||(function(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),ueo=YD({"node_modules/kind-of/index.js"(t,e){var n=leo(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return"undefined";if(i===null)return"null";if(i===!0||i===!1||i instanceof Boolean)return"boolean";if(typeof i=="string"||i instanceof String)return"string";if(typeof i=="number"||i instanceof Number)return"number";if(typeof i=="function"||i instanceof Function)return"function";if(Array.isArray!==void 0&&Array.isArray(i))return"array";if(i instanceof RegExp)return"regexp";if(i instanceof Date)return"date";var r=o.call(i);return r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":n(i)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object"}}}),geo=YD({"node_modules/rename-keys/index.js"(t,e){(function(){function n(o,i){if(typeof i!="function")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[i(s,o[s])||s]=o[s]);return r}e!==void 0&&e.exports?e.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):window.rename=n})()}}),deo=YD({"node_modules/deep-rename-keys/index.js"(t,e){var n=ueo(),o=geo();e.exports=function i(r,s){var a=n(r);if(a!=="object"&&a!=="array")throw new Error("expected an object");var A=[];for(var c in a==="object"&&(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)==="object"||n(l)==="array"?A[c]=i(l,s):A[c]=l}return A}}}),_1t=YD({"node_modules/eventemitter3/index.js"(t,e){var n=Object.prototype.hasOwnProperty,o="~";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)&&c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u<g;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once&&this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p<_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p<I;p++)switch(m[p].once&&this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f<_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l&&!g.once||c&&g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h<p;h++)(g[h].fn!==A||l&&!g[h].once||c&&g[h].context!==c)&&d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]&&(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0&&(e.exports=s)}}),heo=YD({"node_modules/xml-lexer/dist/lexer.js"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=_1t(),i=function(){},r={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},s={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},a={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},A={" ":s.space,"	":s.space,"\n":s.space,"\r":s.space,"<":s.lt,">":s.gt,'"':s.quote,"'":s.quote,"=":s.equal,"/":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x="",E="",B="",S="",Q="",w="",M=function(R,F){if(E[0]!=="?"&&E[0]!=="!"){var O={type:R,value:F};c.debug&&console.log("emit:",O),C.emit("data",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()&&M(a.text,x),E="",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)==="]]>"&&(M(a.text,x.slice(0,-3)),x="",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E="",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x="",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)==="![CDATA["&&(y=r.cdata,x="",E="")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x="",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x="",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(p,s.slash,function(){Q=!0,S="",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(m,s.char,function(R){S="",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S="",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=""),x="",y=r.data}),n(_,s.char,function(R){w="",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x="",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug&&console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O<F;O++)k(R[O])},C}}}}),peo=YD({"node_modules/xml-reader/dist/reader.js"(t,e){var n=_1t(),o=heo(),i=o.Type,r={element:"element",text:"text"},s=function(A){return Object.assign({name:"",type:r.element,value:"",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream&&_===l&&(l.children=[],u.parent=null),A.emitTopLevelOnly&&_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit("tag",u.name,u)),u===l&&(c.removeAllListeners("data"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u&&u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]="";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on("data",d),l=s(),u=null,g="",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:":"});var l=a(c),u=void 0;return l.on("done",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}}),meo=(m1t(deo()),m1t(peo()),class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(t){throw this.error=`${this.constructor.name} error: ${t}`,this.failed=!0,t}!this.solved&&this.iterations>=this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>=this.MAX_ITERATIONS&&(this.error=`${this.constructor.name} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}getOutput(){return null}solve(){const t=Date.now();for(;!this.solved&&!this.failed;)this.step();const e=Date.now();this.timeToSolve=e-t}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}}),l6e=t=>t?`hsl(${(e=>{let n=0;for(let o=0;o<e.length;o++)n=779*e.charCodeAt(o)+((n<<5)-n);return n})(t)%360}, 100%, 50%)`:"rgba(0, 0, 0, 0.5)",_eo=t=>[[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY}],[{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY}],[{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}],[{x:t.minX,y:t.maxY},{x:t.minX,y:t.minY}]];function f1t(t,e){const{minX:n,maxX:o,minY:i,maxY:r}=e,s=o-n,a=r-i,A=1e-6;return Math.abs(t.y-r)<A?t.x-n:Math.abs(t.x-o)<A?s+(r-t.y):Math.abs(t.y-i)<A?s+a+(o-t.x):Math.abs(t.x-n)<A?2*s+a+(t.y-i):0}function I1t(t,e){const{minX:n,maxX:o,minY:i,maxY:r}=e,s=1e-6,a=Math.abs(t.y-r)<s,A=Math.abs(t.y-i)<s,c=Math.abs(t.x-o)<s,l=Math.abs(t.x-n)<s;if(a&&c)return{x:-Math.SQRT1_2,y:-Math.SQRT1_2};if(a&&l)return{x:Math.SQRT1_2,y:-Math.SQRT1_2};if(A&&c)return{x:-Math.SQRT1_2,y:Math.SQRT1_2};if(A&&l)return{x:Math.SQRT1_2,y:Math.SQRT1_2};if(a)return{x:0,y:-1};if(A)return{x:0,y:1};if(c)return{x:-1,y:0};if(l)return{x:1,y:0};const u=(i+r)/2,g=(n+o)/2-t.x,h=u-t.y,d=Math.hypot(g,h);return d>0?{x:g/d,y:h/d}:{x:0,y:-1}}function Bae(t,e,n,o,i,r,s,a,A,c){for(let l=0;l<=c;l++){const u=l/c,g=1-u,h=g*g,d=h*g,p=u*u,m=p*u,_=2*l;A[_]=d*t+3*h*u*n+3*g*p*i+m*s,A[_+1]=d*e+3*h*u*o+3*g*p*r+m*a}}function feo(t,e,n,o,i){const r=[];for(let s=0;s<=i;s++){const a=s/i,A=1-a,c=A*A,l=c*A,u=a*a,g=u*a;r.push({x:l*t.x+3*c*a*e.x+3*A*u*n.x+g*o.x,y:l*t.y+3*c*a*e.y+3*A*u*n.y+g*o.y})}return r}function bae(t,e,n,o,i,r){const s=i-n,a=r-o,A=s*s+a*a;if(A===0){const g=t-n,h=e-o;return g*g+h*h}const c=Math.max(0,Math.min(1,((t-n)*s+(e-o)*a)/A)),l=t-(n+c*s),u=e-(o+c*a);return l*l+u*u}function Sae(t,e,n,o,i,r,s,a){const A=(s-i)*(e-r)-(a-r)*(t-i),c=(s-i)*(o-r)-(a-r)*(n-i),l=(n-t)*(r-e)-(o-e)*(i-t),u=(n-t)*(a-e)-(o-e)*(s-t);return(A>0&&c<0||A<0&&c>0)&&(l>0&&u<0||l<0&&u>0)?0:Math.min(bae(t,e,i,r,s,a),bae(n,o,i,r,s,a),bae(i,r,t,e,n,o),bae(s,a,t,e,n,o))}function Ieo(t,e,n,o,i,r,s,a){const A=(s-i)*(e-r)-(a-r)*(t-i),c=(s-i)*(o-r)-(a-r)*(n-i),l=(n-t)*(r-e)-(o-e)*(i-t),u=(n-t)*(a-e)-(o-e)*(s-t);return(A>0&&c<0||A<0&&c>0)&&(l>0&&u<0||l<0&&u>0)}function Ceo(t,e,n,o,i){const r=g=>(g%i+i)%i,s=r(t),a=r(e),A=r(n),c=r(o),[l,u]=s<a?[s,a]:[a,s];return A>l&&A<u&&c>l&&c<u}function C1t(t,e){let n=1/0,o=-1/0,i=1/0,r=-1/0;for(let s=0;s<e;s++){const a=t[2*s],A=t[2*s+1];a<n&&(n=a),a>o&&(o=a),A<i&&(i=A),A>r&&(r=A)}return{minX:n,maxX:o,minY:i,maxY:r}}var y1t=class extends meo{constructor(e){super(),this.problem=e;for(const n of this.problem.obstacles)n.outerSegments=_eo(n);this.precomputeObstacles()}outputTraces=[];traces=[];optimizationStep=0;maxOptimizationSteps=100;sampledPoints=[];traceBounds=[];obstacleSegments=new Float64Array(0);obstacleNetworkIds=[];numObstacleSegments=0;collisionPairs=[];lastCost=1/0;stagnantSteps=0;effectiveTraceToTraceSpacing=0;getConstructorParams(){return this.problem}precomputeObstacles(){const{obstacles:e}=this.problem;let n=0;for(const i of e)i.outerSegments&&(n+=i.outerSegments.length);this.obstacleSegments=new Float64Array(4*n),this.obstacleNetworkIds=[],this.numObstacleSegments=n;let o=0;for(const i of e)if(i.outerSegments)for(const r of i.outerSegments)this.obstacleSegments[o++]=r[0].x,this.obstacleSegments[o++]=r[0].y,this.obstacleSegments[o++]=r[1].x,this.obstacleSegments[o++]=r[1].y,this.obstacleNetworkIds.push(i.networkId)}initializeTraces(){const{bounds:e,waypointPairs:n}=this.problem,{minX:o,maxX:i,minY:r,maxY:s}=e,a=i-o,A=s-r,c=2*a+2*A,l=(function(m){return{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2}})(e),u=n.map((m,_)=>({pair:m,t1:f1t(m.start,e),t2:f1t(m.end,e),idx:_})),g=u.map(()=>[]),h=u.map(()=>[]);for(const m of u)for(const _ of u)if(m.idx!==_.idx){if(m.pair.networkId&&_.pair.networkId&&m.pair.networkId===_.pair.networkId)continue;Ceo(_.t1,_.t2,m.t1,m.t2,c)&&(g[m.idx].push(_.idx),h[_.idx].push(m.idx))}const d=g.map(m=>m.length),p=Math.max(...d,1);this.traces=u.map(({pair:m,t1:_,t2:f,idx:I})=>{const C=I1t(m.start,e),y=I1t(m.end,e),x=Math.hypot(m.end.x-m.start.x,m.end.y-m.start.y),E=d[I]/p,B=(m.start.x+m.end.x)/2,S=(m.start.y+m.end.y)/2,Q=x*(.25+.15*(1-Math.hypot(B-l.x,S-l.y)/Math.hypot(a/2,A/2)))*(1-.3*E),w=.05*Math.min(a,A),M=Math.max(w,Q),k=Math.max(w,Q);return{waypointPair:m,ctrl1:{x:m.start.x+M*C.x,y:m.start.y+M*C.y},ctrl2:{x:m.end.x+k*y.x,y:m.end.y+k*y.y},networkId:m.networkId,t1:_,t2:f,perpDir1:C,perpDir2:y,d1:M,d2:k,containedBy:g[I],contains:h[I]}}),this.sampledPoints=this.traces.map(()=>new Float64Array(12)),this.traceBounds=this.traces.map(()=>({minX:0,maxX:0,minY:0,maxY:0})),this.updateSampledTraces(),this.updateCollisionPairs()}updateSampledTraces(){for(let e=0;e<this.traces.length;e++){const n=this.traces[e];Bae(n.waypointPair.start.x,n.waypointPair.start.y,n.ctrl1.x,n.ctrl1.y,n.ctrl2.x,n.ctrl2.y,n.waypointPair.end.x,n.waypointPair.end.y,this.sampledPoints[e],5),this.traceBounds[e]=C1t(this.sampledPoints[e],6)}}updateSingleTraceSample(e){const n=this.traces[e];Bae(n.waypointPair.start.x,n.waypointPair.start.y,n.ctrl1.x,n.ctrl1.y,n.ctrl2.x,n.ctrl2.y,n.waypointPair.end.x,n.waypointPair.end.y,this.sampledPoints[e],5),this.traceBounds[e]=C1t(this.sampledPoints[e],6)}updateControlPointsFromDistances(e){const n=this.traces[e],{minX:o,maxX:i,minY:r,maxY:s}=this.problem.bounds,a=1e-6;let A=n.waypointPair.start.x+n.d1*n.perpDir1.x,c=n.waypointPair.start.y+n.d1*n.perpDir1.y,l=n.waypointPair.end.x+n.d2*n.perpDir2.x,u=n.waypointPair.end.y+n.d2*n.perpDir2.y;const g=n.waypointPair.start;Math.abs(g.x-o)<a&&(A=Math.max(A,o)),Math.abs(g.x-i)<a&&(A=Math.min(A,i)),Math.abs(g.y-r)<a&&(c=Math.max(c,r)),Math.abs(g.y-s)<a&&(c=Math.min(c,s));const h=n.waypointPair.end;Math.abs(h.x-o)<a&&(l=Math.max(l,o)),Math.abs(h.x-i)<a&&(l=Math.min(l,i)),Math.abs(h.y-r)<a&&(u=Math.max(u,r)),Math.abs(h.y-s)<a&&(u=Math.min(u,s)),A=Math.max(o,Math.min(i,A)),c=Math.max(r,Math.min(s,c)),l=Math.max(o,Math.min(i,l)),u=Math.max(r,Math.min(s,u)),n.ctrl1.x=A,n.ctrl1.y=c,n.ctrl2.x=l,n.ctrl2.y=u}updateCollisionPairs(){const e=this.effectiveTraceToTraceSpacing;this.collisionPairs=[];for(let n=0;n<this.traces.length;n++)for(let o=n+1;o<this.traces.length;o++){const i=this.traces[n],r=this.traces[o];if(i.networkId&&r.networkId&&i.networkId===r.networkId)continue;const s=this.traceBounds[n],a=this.traceBounds[o];s.maxX+e>=a.minX&&a.maxX+e>=s.minX&&s.maxY+e>=a.minY&&a.maxY+e>=s.minY&&this.collisionPairs.push([n,o])}}computeTotalCost(){const{preferredObstacleToTraceSpacing:e}=this.problem,n=this.effectiveTraceToTraceSpacing,o=n**2,i=e**2;let r=0;for(const[s,a]of this.collisionPairs){const A=this.sampledPoints[s],c=this.sampledPoints[a];for(let l=0;l<5;l++){const u=A[2*l],g=A[2*l+1],h=A[2*(l+1)],d=A[2*(l+1)+1];for(let p=0;p<5;p++){const m=Sae(u,g,h,d,c[2*p],c[2*p+1],c[2*(p+1)],c[2*(p+1)+1]);m<o&&(r+=(n-Math.sqrt(m))**2,m<1e-18&&(r+=20*o))}}}for(let s=0;s<this.traces.length;s++){const a=this.traces[s],A=this.sampledPoints[s],c=this.traceBounds[s];for(let l=0;l<this.numObstacleSegments;l++){if(a.networkId&&this.obstacleNetworkIds[l]&&a.networkId===this.obstacleNetworkIds[l])continue;const u=4*l,g=this.obstacleSegments[u],h=this.obstacleSegments[u+1],d=this.obstacleSegments[u+2],p=this.obstacleSegments[u+3],m=Math.min(g,d),_=Math.max(g,d),f=Math.min(h,p),I=Math.max(h,p);if(!(c.maxX+e<m||_+e<c.minX||c.maxY+e<f||I+e<c.minY))for(let C=0;C<5;C++){const y=Sae(A[2*C],A[2*C+1],A[2*(C+1)],A[2*(C+1)+1],g,h,d,p);y<i&&(r+=(e-Math.sqrt(y))**2,y<1e-18&&(r+=20*i))}}}return r}computeCostForTrace(e){const{preferredObstacleToTraceSpacing:n}=this.problem,o=this.effectiveTraceToTraceSpacing,i=o**2,r=n**2,s=this.traces[e],a=this.sampledPoints[e],A=this.traceBounds[e];let c=0;for(let l=0;l<this.traces.length;l++){if(l===e)continue;const u=this.traces[l];if(s.networkId&&u.networkId&&s.networkId===u.networkId)continue;const g=this.traceBounds[l];if(A.maxX+o<g.minX||g.maxX+o<A.minX||A.maxY+o<g.minY||g.maxY+o<A.minY)continue;const h=this.sampledPoints[l];for(let d=0;d<5;d++){const p=a[2*d],m=a[2*d+1],_=a[2*(d+1)],f=a[2*(d+1)+1];for(let I=0;I<5;I++){const C=Sae(p,m,_,f,h[2*I],h[2*I+1],h[2*(I+1)],h[2*(I+1)+1]);C<i&&(c+=(o-Math.sqrt(C))**2,C<1e-18&&(c+=20*i))}}}for(let l=0;l<this.numObstacleSegments;l++){if(s.networkId&&this.obstacleNetworkIds[l]&&s.networkId===this.obstacleNetworkIds[l])continue;const u=4*l,g=this.obstacleSegments[u],h=this.obstacleSegments[u+1],d=this.obstacleSegments[u+2],p=this.obstacleSegments[u+3],m=Math.min(g,d),_=Math.max(g,d),f=Math.min(h,p),I=Math.max(h,p);if(!(A.maxX+n<m||_+n<A.minX||A.maxY+n<f||I+n<A.minY))for(let C=0;C<5;C++){const y=Sae(a[2*C],a[2*C+1],a[2*(C+1)],a[2*(C+1)+1],g,h,d,p);y<r&&(c+=(n-Math.sqrt(y))**2,y<1e-18&&(c+=20*r))}}return c}tracesIntersect(e,n){const o=this.traces[e],i=this.traces[n],r=15,s=new Float64Array(32),a=new Float64Array(32);Bae(o.waypointPair.start.x,o.waypointPair.start.y,o.ctrl1.x,o.ctrl1.y,o.ctrl2.x,o.ctrl2.y,o.waypointPair.end.x,o.waypointPair.end.y,s,r),Bae(i.waypointPair.start.x,i.waypointPair.start.y,i.ctrl1.x,i.ctrl1.y,i.ctrl2.x,i.ctrl2.y,i.waypointPair.end.x,i.waypointPair.end.y,a,r);for(let A=0;A<r;A++){const c=s[2*A],l=s[2*A+1],u=s[2*(A+1)],g=s[2*(A+1)+1];for(let h=0;h<r;h++)if(Ieo(c,l,u,g,a[2*h],a[2*h+1],a[2*(h+1)],a[2*(h+1)+1]))return!0}return!1}findIntersectingPairs(){const e=[];for(let n=0;n<this.traces.length;n++)for(let o=n+1;o<this.traces.length;o++){const i=this.traces[n],r=this.traces[o];if(i.networkId&&r.networkId&&i.networkId===r.networkId)continue;const s=this.traceBounds[n],a=this.traceBounds[o];s.maxX<a.minX||a.maxX<s.minX||s.maxY<a.minY||a.maxY<s.minY||this.tracesIntersect(n,o)&&e.push([n,o])}return e}resolveIntersections(){const{bounds:e,preferredTraceToTraceSpacing:n}=this.problem,{minX:o,maxX:i,minY:r,maxY:s}=e,a=Math.min(i-o,s-r),A=.02*a,c=1.5*a,l=this.findIntersectingPairs();if(l.length===0)return 0;let u=0;for(const[g,h]of l){const d=this.traces[g],p=this.traces[h];if(!this.tracesIntersect(g,h))continue;let m,_;d.containedBy.includes(h)?(m=h,_=g):p.containedBy.includes(g)||(d.d1+d.d2)/2<(p.d1+p.d2)/2?(m=g,_=h):(m=h,_=g);const f=this.traces[m],I=this.traces[_],C=f.d1,y=f.d2,x=I.d1,E=I.d2,B=2*n,S=[{innerMult:1,outerMult:0},{innerMult:0,outerMult:1},{innerMult:.5,outerMult:.5},{innerMult:2,outerMult:0},{innerMult:1,outerMult:1},{innerMult:3,outerMult:0},{innerMult:2,outerMult:1},{innerMult:4,outerMult:0}];let Q=this.computeTotalCost(),w=null;for(const M of S)if(f.d1=C,f.d2=y,I.d1=x,I.d2=E,I.d1=Math.min(c,x+B*M.innerMult),I.d2=Math.min(c,E+B*M.innerMult),f.d1=Math.max(A,C-B*M.outerMult),f.d2=Math.max(A,y-B*M.outerMult),this.updateControlPointsFromDistances(_),this.updateControlPointsFromDistances(m),this.updateSingleTraceSample(_),this.updateSingleTraceSample(m),!this.tracesIntersect(m,_)){const k=this.computeTotalCost();(w===null||k<Q)&&(Q=k,w=M)}w?(I.d1=Math.min(c,x+B*w.innerMult),I.d2=Math.min(c,E+B*w.innerMult),f.d1=Math.max(A,C-B*w.outerMult),f.d2=Math.max(A,y-B*w.outerMult),this.updateControlPointsFromDistances(_),this.updateControlPointsFromDistances(m),this.updateSingleTraceSample(_),this.updateSingleTraceSample(m),u++):(f.d1=C,f.d2=y,I.d1=x,I.d2=E,this.updateControlPointsFromDistances(m),this.updateControlPointsFromDistances(_),this.updateSingleTraceSample(m),this.updateSingleTraceSample(_))}return u}optimizeStep(){const{bounds:e}=this.problem,{minX:n,maxX:o,minY:i,maxY:r}=e,s=Math.min(o-n,r-i),a=this.effectiveTraceToTraceSpacing,A=4*(1-this.optimizationStep/this.maxOptimizationSteps)+.5,c=.02*s,l=1.5*s,u=[];for(let g=0;g<this.traces.length;g++)u.push({idx:g,cost:this.computeCostForTrace(g)});u.sort((g,h)=>h.cost-g.cost);for(const{idx:g,cost:h}of u){if(h===0)continue;const d=this.traces[g],p=h>100?2:1,m=[A*p,1.5*A*p,.5*A];for(const _ of m){const f=h>100?[_,-_,2*_,2*-_,3*_,3*-_,2*a,2*-a]:[_,-_,2*_,2*-_];let I=this.computeCostForTrace(g),C=d.d1,y=d.d2;const x=d.d1,E=d.d2;for(const B of f){d.d1=Math.max(c,Math.min(l,x+B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const S=this.computeCostForTrace(g);S<I&&(I=S,C=d.d1,y=E),d.d1=x,this.updateControlPointsFromDistances(g),d.d2=Math.max(c,Math.min(l,E+B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const Q=this.computeCostForTrace(g);Q<I&&(I=Q,C=x,y=d.d2),d.d2=E,this.updateControlPointsFromDistances(g),d.d1=Math.max(c,Math.min(l,x+B)),d.d2=Math.max(c,Math.min(l,E+B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const w=this.computeCostForTrace(g);w<I&&(I=w,C=d.d1,y=d.d2),d.d1=x,d.d2=E,this.updateControlPointsFromDistances(g),d.d1=Math.max(c,Math.min(l,x+B)),d.d2=Math.max(c,Math.min(l,E-B)),this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g);const M=this.computeCostForTrace(g);M<I&&(I=M,C=d.d1,y=d.d2),d.d1=x,d.d2=E,this.updateControlPointsFromDistances(g)}if(d.d1=C,d.d2=y,this.updateControlPointsFromDistances(g),this.updateSingleTraceSample(g),I<.9*h)break}}this.optimizationStep%10==0&&this.updateCollisionPairs()}buildOutputTraces(){this.outputTraces=this.traces.map(e=>({waypointPair:e.waypointPair,points:feo(e.waypointPair.start,e.ctrl1,e.ctrl2,e.waypointPair.end,20),networkId:e.networkId}))}_step(){if(this.traces.length===0&&(this.effectiveTraceToTraceSpacing=3*this.problem.preferredTraceToTraceSpacing,this.initializeTraces(),this.lastCost=this.computeTotalCost(),this.stagnantSteps=0),this.optimizationStep<this.maxOptimizationSteps){const n=3+-2*(this.optimizationStep/this.maxOptimizationSteps);this.effectiveTraceToTraceSpacing=this.problem.preferredTraceToTraceSpacing*n,this.optimizeStep(),this.optimizationStep++,this.optimizationStep%10==0&&this.resolveIntersections()>0&&this.updateCollisionPairs();const o=this.computeTotalCost();o===0?this.optimizationStep=this.maxOptimizationSteps:o>=.99*this.lastCost?(this.stagnantSteps++,this.stagnantSteps>10&&(this.resolveIntersections()>0?(this.updateCollisionPairs(),this.stagnantSteps=0):this.stagnantSteps>15&&(this.optimizationStep=this.maxOptimizationSteps))):this.stagnantSteps=0,this.lastCost=o}this.optimizationStep>=this.maxOptimizationSteps&&(this.resolveIntersections(),this.buildOutputTraces(),this.solved=!0)}visualize(){return this.traces.length>0&&this.buildOutputTraces(),((e,n=[])=>{const o={arrows:[],circles:[],lines:[],rects:[],coordinateSystem:"cartesian",points:[],texts:[],title:"Curvy Trace Problem"};o.lines.push({points:[{x:e.bounds.minX,y:e.bounds.minY},{x:e.bounds.maxX,y:e.bounds.minY},{x:e.bounds.maxX,y:e.bounds.maxY},{x:e.bounds.minX,y:e.bounds.maxY},{x:e.bounds.minX,y:e.bounds.minY}],strokeColor:"rgba(0, 0, 0, 0.1)"});for(const i of e.waypointPairs)o.points.push({...i.start,label:`start ${i.networkId??""}`,color:l6e(i.networkId)}),o.points.push({...i.end,label:`end ${i.networkId??""}`,color:l6e(i.networkId)});for(const i of e.obstacles)o.rects.push({center:i.center,width:i.maxX-i.minX,height:i.maxY-i.minY,fill:"rgba(128, 128, 128, 0.3)",stroke:"rgba(128, 128, 128, 0.8)",label:`netId: ${i.networkId}`});for(const i of n)o.lines.push({points:i.points,strokeColor:l6e(i.networkId)});return o})(this.problem,this.outputTraces)}},x1t=class extends yr{getSolverName(){return"CurvyIntraNodeSolver"}nodeWithPortPoints;colorMap;traceWidth;viaDiameter;adjacentObstacles;routes=[];curvyTraceSolver;phase="initializing";constructor(e){super(),this.nodeWithPortPoints=e.nodeWithPortPoints,this.colorMap=e.colorMap??{},this.traceWidth=e.traceWidth??.15,this.viaDiameter=e.viaDiameter??.3,this.adjacentObstacles=e.adjacentObstacles??[],this.MAX_ITERATIONS=1e3}_step(){switch(this.phase){case"initializing":this._initializeCurvySolver();break;case"solving":this._stepCurvySolver();break;case"done":this.solved=!0}}_initializeCurvySolver(){const e=this.nodeWithPortPoints,n={minX:e.center.x-e.width/2,minY:e.center.y-e.height/2,maxX:e.center.x+e.width/2,maxY:e.center.y+e.height/2},o=new Map;for(const s of e.portPoints)o.has(s.connectionName)||o.set(s.connectionName,[]),o.get(s.connectionName).push(s);const i=[];for(const[s,a]of o){if(a.length<2)continue;const A=a[0],c=a[a.length-1];i.push({start:{x:A.x,y:A.y},end:{x:c.x,y:c.y},networkId:s})}if(i.length===0)return void(this.phase="done");const r={bounds:n,waypointPairs:i,obstacles:this.adjacentObstacles.map(s=>({minX:s.minX,minY:s.minY,maxX:s.maxX,maxY:s.maxY,center:{x:(s.minX+s.maxX)/2,y:(s.minY+s.maxY)/2},networkId:s.networkId})),preferredTraceToTraceSpacing:2*this.traceWidth,preferredObstacleToTraceSpacing:2*this.traceWidth};this.curvyTraceSolver=new y1t(r),this.phase="solving"}_stepCurvySolver(){this.curvyTraceSolver?(this.activeSubSolver=this.curvyTraceSolver,this.curvyTraceSolver.step(),this.curvyTraceSolver.solved?(this._convertOutputTraces(),this.phase="done"):this.curvyTraceSolver.failed&&(this.error=this.curvyTraceSolver.error,this.failed=!0)):this.phase="done"}_convertOutputTraces(){if(!this.curvyTraceSolver)return;const e=this.nodeWithPortPoints,n=new Map;for(const o of e.portPoints){const i=o.connectionName;n.has(i)||n.set(i,{connectionName:o.connectionName,rootConnectionName:o.rootConnectionName,z:o.z})}for(const o of this.curvyTraceSolver.outputTraces){const i=o.networkId??"",r=n.get(i);if(!r)continue;const s={connectionName:r.connectionName,rootConnectionName:r.rootConnectionName,traceThickness:this.traceWidth,viaDiameter:this.viaDiameter,route:o.points.map(a=>({x:a.x,y:a.y,z:r.z})),vias:[]};this.routes.push(s)}}getConstructorParams(){return{nodeWithPortPoints:this.nodeWithPortPoints,colorMap:this.colorMap,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter,adjacentObstacles:this.adjacentObstacles}}visualize(){const e={lines:[],points:[],rects:[],circles:[]},n=this.nodeWithPortPoints;e.rects.push({center:n.center,width:n.width,height:n.height,fill:"rgba(0, 200, 0, 0.1)",stroke:"rgba(0, 200, 0, 0.5)",label:n.capacityMeshNodeId});for(const o of this.adjacentObstacles)e.rects.push({center:{x:(o.minX+o.maxX)/2,y:(o.minY+o.maxY)/2},width:o.maxX-o.minX,height:o.maxY-o.minY,fill:"rgba(255, 0, 0, 0.1)",stroke:"rgba(255, 0, 0, 0.3)",label:`obstacle: ${o.networkId??""}`});if(this.curvyTraceSolver){const o=this.curvyTraceSolver.visualize();o.lines&&e.lines.push(...o.lines),o.points&&e.points.push(...o.points),o.rects&&e.rects.push(...o.rects),o.circles&&e.circles.push(...o.circles)}for(const o of this.routes){const i=this.colorMap[o.connectionName]??"gray";e.lines.push({points:o.route.map(r=>({x:r.x,y:r.y})),strokeColor:i,strokeWidth:this.traceWidth,label:o.connectionName})}for(const o of n.portPoints){const i=this.colorMap[o.connectionName]??"gray";e.points.push({x:o.x,y:o.y,color:i,label:o.connectionName})}return e}},yeo=Object.create,E1t=Object.defineProperty,xeo=Object.getOwnPropertyDescriptor,B1t=Object.getOwnPropertyNames,Eeo=Object.getPrototypeOf,Beo=Object.prototype.hasOwnProperty,j3=(t,e)=>function(){return e||(0,t[B1t(t)[0]])((e={exports:{}}).exports,e),e.exports},Qae=j3({"node_modules/binary-search-bounds/search-bounds.js"(t,e){function n(A,c,l,u,g){for(var h=g+1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)>=0?(h=d,g=d-1):u=d+1}return h}function o(A,c,l,u,g){for(var h=g+1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)>0?(h=d,g=d-1):u=d+1}return h}function i(A,c,l,u,g){for(var h=u-1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)<0?(h=d,u=d+1):g=d-1}return h}function r(A,c,l,u,g){for(var h=u-1;u<=g;){var d=u+g>>>1,p=A[d];(l!==void 0?l(p,c):p-c)<=0?(h=d,u=d+1):g=d-1}return h}function s(A,c,l,u,g){for(;u<=g;){var h=u+g>>>1,d=A[h],p=l!==void 0?l(d,c):d-c;if(p===0)return h;p<=0?u=h+1:g=h-1}return-1}function a(A,c,l,u,g,h){return typeof l=="function"?h(A,c,l,u===void 0?0:0|u,g===void 0?A.length-1:0|g):h(A,c,void 0,l===void 0?0:0|l,u===void 0?A.length-1:0|u)}e.exports={ge:function(A,c,l,u,g){return a(A,c,l,u,g,n)},gt:function(A,c,l,u,g){return a(A,c,l,u,g,o)},lt:function(A,c,l,u,g){return a(A,c,l,u,g,i)},le:function(A,c,l,u,g){return a(A,c,l,u,g,r)},eq:function(A,c,l,u,g){return a(A,c,l,u,g,s)}}}}),u6e=j3({"node_modules/two-product/two-product.js"(t,e){e.exports=function(o,i,r){var s=o*i,a=n*o,A=a-(a-o),c=o-A,l=n*i,u=l-(l-i),g=i-u,h=c*g-(s-A*u-c*u-A*g);return r?(r[0]=h,r[1]=s,r):[h,s]};var n=+(Math.pow(2,27)+1)}}),b1t=j3({"node_modules/robust-sum/robust-sum.js"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1&&r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=o[u],m=g(p);d<m?(a=h,(l+=1)<i&&(d=g(h=n[l]))):(a=p,(u+=1)<r&&(m=g(p=o[u]))),l<i&&d<m||u>=r?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l<i&&u<r;)d<m?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=o[u]))),(y=(a=x)-(C=(I=s+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l<i;)(y=(a=x)-(C=(I=(s=h)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)<i&&(h=n[l]);for(;u<r;)(y=(a=x)-(C=(I=(s=p)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)<r&&(p=o[u]);return x&&(A[c++]=x),E&&(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),beo=j3({"node_modules/two-sum/two-sum.js"(t,e){e.exports=function(n,o,i){var r=n+o,s=r-n,a=o-s,A=n-(r-s);return i?(i[0]=A+a,i[1]=r,i):[A+a,r]}}}),S1t=j3({"node_modules/robust-scale/robust-scale.js"(t,e){var n=u6e(),o=beo();e.exports=function(i,r){var s=i.length;if(s===1){var a=n(i[0],r);return a[0]?a:[a[1]]}var A=new Array(2*s),c=[.1,.1],l=[.1,.1],u=0;n(i[0],r,c),c[0]&&(A[u++]=c[0]);for(var g=1;g<s;++g){n(i[g],r,l);var h=c[1];o(h,l[0],c),c[0]&&(A[u++]=c[0]);var d=l[1],p=c[1],m=d+p,_=p-(m-d);c[1]=m,_&&(A[u++]=_)}return c[1]&&(A[u++]=c[1]),u===0&&(A[u++]=0),A.length=u,A}}}),Q1t=j3({"node_modules/robust-subtract/robust-diff.js"(t,e){e.exports=function(n,o){var i=0|n.length,r=0|o.length;if(i===1&&r===1)return(function(B,S){var Q=B+S,w=Q-B,M=Q-w,k=S-w,R=B-M,F=R+k;return F?[F,Q]:[Q]})(n[0],-o[0]);var s,a,A=new Array(i+r),c=0,l=0,u=0,g=Math.abs,h=n[l],d=g(h),p=-o[u],m=g(p);d<m?(a=h,(l+=1)<i&&(d=g(h=n[l]))):(a=p,(u+=1)<r&&(m=g(p=-o[u]))),l<i&&d<m||u>=r?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=-o[u])));for(var _,f,I=s+a,C=I-s,y=a-C,x=y,E=I;l<i&&u<r;)d<m?(s=h,(l+=1)<i&&(d=g(h=n[l]))):(s=p,(u+=1)<r&&(m=g(p=-o[u]))),(y=(a=x)-(C=(I=s+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_;for(;l<i;)(y=(a=x)-(C=(I=(s=h)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(l+=1)<i&&(h=n[l]);for(;u<r;)(y=(a=x)-(C=(I=(s=p)+a)-s))&&(A[c++]=y),x=E-((_=E+I)-(f=_-E))+(I-f),E=_,(u+=1)<r&&(p=-o[u]);return x&&(A[c++]=x),E&&(A[c++]=E),c||(A[c++]=0),A.length=c,A}}}),Seo=j3({"node_modules/robust-orientation/orientation.js"(t,e){var n=u6e(),o=b1t(),i=S1t(),r=Q1t();function s(p,m,_,f){return function(I,C,y){var x=p(p(m(C[1],y[0]),m(-y[1],C[0])),p(m(I[1],C[0]),m(-C[1],I[0]))),E=p(m(I[1],y[0]),m(-y[1],I[0])),B=f(x,E);return B[B.length-1]}}function a(p,m,_,f){return function(I,C,y,x){var E=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2])))),B=p(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2])))),S=f(E,B);return S[S.length-1]}}function A(p,m,_,f){return function(I,C,y,x,E){var B=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),C[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),-y[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),x[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),-E[3]),p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-x[2]),_(p(m(C[1],x[0]),m(-x[1],C[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-C[3])))),p(p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),x[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),-E[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),C[2]),p(_(p(m(C[1],x[0]),m(-x[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),x[2]))),I[3]))),p(_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-C[3]),p(_(p(_(p(m(C[1],x[0]),m(-x[1],C[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),x[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-x[3]))))),S=p(p(p(_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),y[2]),p(_(p(m(y[1],E[0]),m(-E[1],y[0])),-x[2]),_(p(m(y[1],x[0]),m(-x[1],y[0])),E[2]))),I[3]),_(p(_(p(m(x[1],E[0]),m(-E[1],x[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-x[2]),_(p(m(I[1],x[0]),m(-x[1],I[0])),E[2]))),-y[3])),p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),x[3]),_(p(_(p(m(y[1],x[0]),m(-x[1],y[0])),I[2]),p(_(p(m(I[1],x[0]),m(-x[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),x[2]))),-E[3]))),p(p(_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),C[2]),p(_(p(m(C[1],E[0]),m(-E[1],C[0])),-y[2]),_(p(m(C[1],y[0]),m(-y[1],C[0])),E[2]))),I[3]),_(p(_(p(m(y[1],E[0]),m(-E[1],y[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-y[2]),_(p(m(I[1],y[0]),m(-y[1],I[0])),E[2]))),-C[3])),p(_(p(_(p(m(C[1],E[0]),m(-E[1],C[0])),I[2]),p(_(p(m(I[1],E[0]),m(-E[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),E[2]))),y[3]),_(p(_(p(m(C[1],y[0]),m(-y[1],C[0])),I[2]),p(_(p(m(I[1],y[0]),m(-y[1],I[0])),-C[2]),_(p(m(I[1],C[0]),m(-C[1],I[0])),y[2]))),-E[3])))),Q=f(B,S);return Q[Q.length-1]}}function c(p){return(p===3?s:p===4?a:A)(o,n,i,r)}var l=c(3),u=c(4),g=[function(){return 0},function(){return 0},function(p,m){return m[0]-p[0]},function(p,m,_){var f,I=(p[1]-_[1])*(m[0]-_[0]),C=(p[0]-_[0])*(m[1]-_[1]),y=I-C;if(I>0){if(C<=0)return y;f=I+C}else{if(!(I<0)||C>=0)return y;f=-(I+C)}var x=33306690738754716e-32*f;return y>=x||y<=-x?y:l(p,m,_)},function(p,m,_,f){var I=p[0]-f[0],C=m[0]-f[0],y=_[0]-f[0],x=p[1]-f[1],E=m[1]-f[1],B=_[1]-f[1],S=p[2]-f[2],Q=m[2]-f[2],w=_[2]-f[2],M=C*B,k=y*E,R=y*x,F=I*B,O=I*E,U=C*x,Y=S*(M-k)+Q*(R-F)+w*(O-U),W=7771561172376103e-31*((Math.abs(M)+Math.abs(k))*Math.abs(S)+(Math.abs(R)+Math.abs(F))*Math.abs(Q)+(Math.abs(O)+Math.abs(U))*Math.abs(w));return Y>W||-Y>W?Y:u(p,m,_,f)}];function h(p){var m=g[p.length];return m||(m=g[p.length]=c(p.length)),m.apply(void 0,p)}function d(p,m,_,f,I,C,y){return function(x,E,B,S,Q){switch(arguments.length){case 0:case 1:return 0;case 2:return f(x,E);case 3:return I(x,E,B);case 4:return C(x,E,B,S);case 5:return y(x,E,B,S,Q)}for(var w=new Array(arguments.length),M=0;M<arguments.length;++M)w[M]=arguments[M];return p(w)}}(function(){for(;g.length<=5;)g.push(c(g.length));e.exports=d.apply(void 0,[h].concat(g));for(var p=0;p<=5;++p)e.exports[p]=g[p]})()}}),Qeo=j3({"node_modules/cdt2d/lib/monotone.js"(t,e){var n=Qae(),o=Seo()[3];function i(g,h,d,p,m){this.a=g,this.b=h,this.idx=d,this.lowerIds=p,this.upperIds=m}function r(g,h,d,p){this.a=g,this.b=h,this.type=d,this.idx=p}function s(g,h){var d=g.a[0]-h.a[0]||g.a[1]-h.a[1]||g.type-h.type;return d||(g.type!==0&&(d=o(g.a,g.b,h.b))?d:g.idx-h.idx)}function a(g,h){return o(g.a,g.b,h)}function A(g,h,d,p,m){for(var _=n.lt(h,p,a),f=n.gt(h,p,a),I=_;I<f;++I){for(var C=h[I],y=C.lowerIds,x=y.length;x>1&&o(d[y[x-2]],d[y[x-1]],p)>0;)g.push([y[x-1],y[x-2],m]),x-=1;y.length=x,y.push(m);var E=C.upperIds;for(x=E.length;x>1&&o(d[E[x-2]],d[E[x-1]],p)<0;)g.push([E[x-2],E[x-1],m]),x-=1;E.length=x,E.push(m)}}function c(g,h){var d;return(d=g.a[0]<h.a[0]?o(g.a,g.b,h.a):o(h.b,h.a,g.a))?d:(d=h.b[0]<g.b[0]?o(g.a,g.b,h.b):o(h.b,h.a,g.b))||g.idx-h.idx}function l(g,h,d){var p=n.le(g,d,c),m=g[p],_=m.upperIds,f=_[_.length-1];m.upperIds=[f],g.splice(p+1,0,new i(d.a,d.b,d.idx,[f],_))}function u(g,h,d){var p=d.a;d.a=d.b,d.b=p;var m=n.eq(g,d,c),_=g[m];g[m-1].upperIds=_.upperIds,g.splice(m,1)}e.exports=function(g,h){for(var d=g.length,p=h.length,m=[],_=0;_<d;++_)m.push(new r(g[_],null,0,_));for(_=0;_<p;++_){var f=h[_],I=g[f[0]],C=g[f[1]];I[0]<C[0]?m.push(new r(I,C,2,_),new r(C,I,1,_)):I[0]>C[0]&&m.push(new r(C,I,2,_),new r(I,C,1,_))}m.sort(s);for(var y=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),x=[new i([y,1],[y,0],-1,[],[])],E=[],B=(_=0,m.length);_<B;++_){var S=m[_],Q=S.type;Q===0?A(E,x,g,S.a,S.idx):Q===2?l(x,g,S):u(x,g,S)}return E}}}),veo=j3({"node_modules/cdt2d/lib/triangulation.js"(t,e){var n=Qae();function o(s,a){this.stars=s,this.edges=a}e.exports=function(s,a){for(var A=new Array(s),c=0;c<s;++c)A[c]=[];return new o(A,a)};var i=o.prototype;function r(s,a,A){for(var c=1,l=s.length;c<l;c+=2)if(s[c-1]===a&&s[c]===A)return s[c-1]=s[l-2],s[c]=s[l-1],void(s.length=l-2)}i.isConstraint=(function(){var s=[0,0];function a(A,c){return A[0]-c[0]||A[1]-c[1]}return function(A,c){return s[0]=Math.min(A,c),s[1]=Math.max(A,c),n.eq(this.edges,s,a)>=0}})(),i.removeTriangle=function(s,a,A){var c=this.stars;r(c[s],a,A),r(c[a],A,s),r(c[A],s,a)},i.addTriangle=function(s,a,A){var c=this.stars;c[s].push(a,A),c[a].push(A,s),c[A].push(s,a)},i.opposite=function(s,a){for(var A=this.stars[a],c=1,l=A.length;c<l;c+=2)if(A[c]===s)return A[c-1];return-1},i.flip=function(s,a){var A=this.opposite(s,a),c=this.opposite(a,s);this.removeTriangle(s,a,A),this.removeTriangle(a,s,c),this.addTriangle(s,c,A),this.addTriangle(a,A,c)},i.edges=function(){for(var s=this.stars,a=[],A=0,c=s.length;A<c;++A)for(var l=s[A],u=0,g=l.length;u<g;u+=2)a.push([l[u],l[u+1]]);return a},i.cells=function(){for(var s=this.stars,a=[],A=0,c=s.length;A<c;++A)for(var l=s[A],u=0,g=l.length;u<g;u+=2){var h=l[u],d=l[u+1];A<Math.min(h,d)&&a.push([A,h,d])}return a}}}),weo=j3({"node_modules/robust-in-sphere/in-sphere.js"(t,e){var n=u6e(),o=b1t(),i=Q1t(),r=S1t();function s(d){return(d===3?a:d===4?A:d===5?c:l)(o,i,n,r)}function a(d,p,m,_){return function(f,I,C){var y=m(f[0],f[0]),x=_(y,I[0]),E=_(y,C[0]),B=m(I[0],I[0]),S=_(B,f[0]),Q=_(B,C[0]),w=m(C[0],C[0]),M=_(w,f[0]),k=_(w,I[0]),R=d(p(k,Q),p(S,x)),F=p(M,E),O=p(R,F);return O[O.length-1]}}function A(d,p,m,_){return function(f,I,C,y){var x=d(m(f[0],f[0]),m(f[1],f[1])),E=_(x,I[0]),B=_(x,C[0]),S=_(x,y[0]),Q=d(m(I[0],I[0]),m(I[1],I[1])),w=_(Q,f[0]),M=_(Q,C[0]),k=_(Q,y[0]),R=d(m(C[0],C[0]),m(C[1],C[1])),F=_(R,f[0]),O=_(R,I[0]),U=_(R,y[0]),Y=d(m(y[0],y[0]),m(y[1],y[1])),W=_(Y,f[0]),te=_(Y,I[0]),j=_(Y,C[0]),J=d(d(_(p(j,U),I[1]),d(_(p(te,k),-C[1]),_(p(O,M),y[1]))),d(_(p(te,k),f[1]),d(_(p(W,S),-I[1]),_(p(w,E),y[1])))),oe=d(d(_(p(j,U),f[1]),d(_(p(W,S),-C[1]),_(p(F,B),y[1]))),d(_(p(O,M),f[1]),d(_(p(F,B),-I[1]),_(p(w,E),C[1])))),ie=p(J,oe);return ie[ie.length-1]}}function c(d,p,m,_){return function(f,I,C,y,x){var E=d(m(f[0],f[0]),d(m(f[1],f[1]),m(f[2],f[2]))),B=_(E,I[0]),S=_(E,C[0]),Q=_(E,y[0]),w=_(E,x[0]),M=d(m(I[0],I[0]),d(m(I[1],I[1]),m(I[2],I[2]))),k=_(M,f[0]),R=_(M,C[0]),F=_(M,y[0]),O=_(M,x[0]),U=d(m(C[0],C[0]),d(m(C[1],C[1]),m(C[2],C[2]))),Y=_(U,f[0]),W=_(U,I[0]),te=_(U,y[0]),j=_(U,x[0]),J=d(m(y[0],y[0]),d(m(y[1],y[1]),m(y[2],y[2]))),oe=_(J,f[0]),ie=_(J,I[0]),ne=_(J,C[0]),le=_(J,x[0]),ge=d(m(x[0],x[0]),d(m(x[1],x[1]),m(x[2],x[2]))),_e=_(ge,f[0]),ue=_(ge,I[0]),fe=_(ge,C[0]),pe=_(ge,y[0]),ye=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),I[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),-C[2]),_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),y[2]))),d(_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),-x[2]),d(_(d(_(p(pe,le),I[1]),d(_(p(ue,O),-y[1]),_(p(ie,F),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-I[2])))),d(d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),y[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),-x[2]),_(d(_(p(ne,te),I[1]),d(_(p(ie,F),-C[1]),_(p(W,R),y[1]))),f[2]))),d(_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-I[2]),d(_(d(_(p(ie,F),f[1]),d(_(p(oe,Q),-I[1]),_(p(k,B),y[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-y[2]))))),Me=d(d(d(_(d(_(p(pe,le),C[1]),d(_(p(fe,j),-y[1]),_(p(ne,te),x[1]))),f[2]),_(d(_(p(pe,le),f[1]),d(_(p(_e,w),-y[1]),_(p(oe,Q),x[1]))),-C[2])),d(_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),y[2]),_(d(_(p(ne,te),f[1]),d(_(p(oe,Q),-C[1]),_(p(Y,S),y[1]))),-x[2]))),d(d(_(d(_(p(fe,j),I[1]),d(_(p(ue,O),-C[1]),_(p(W,R),x[1]))),f[2]),_(d(_(p(fe,j),f[1]),d(_(p(_e,w),-C[1]),_(p(Y,S),x[1]))),-I[2])),d(_(d(_(p(ue,O),f[1]),d(_(p(_e,w),-I[1]),_(p(k,B),x[1]))),C[2]),_(d(_(p(W,R),f[1]),d(_(p(Y,S),-I[1]),_(p(k,B),C[1]))),-x[2])))),ve=p(ye,Me);return ve[ve.length-1]}}function l(d,p,m,_){return function(f,I,C,y,x,E){var B=d(d(m(f[0],f[0]),m(f[1],f[1])),d(m(f[2],f[2]),m(f[3],f[3]))),S=_(B,I[0]),Q=_(B,C[0]),w=_(B,y[0]),M=_(B,x[0]),k=_(B,E[0]),R=d(d(m(I[0],I[0]),m(I[1],I[1])),d(m(I[2],I[2]),m(I[3],I[3]))),F=_(R,f[0]),O=_(R,C[0]),U=_(R,y[0]),Y=_(R,x[0]),W=_(R,E[0]),te=d(d(m(C[0],C[0]),m(C[1],C[1])),d(m(C[2],C[2]),m(C[3],C[3]))),j=_(te,f[0]),J=_(te,I[0]),oe=_(te,y[0]),ie=_(te,x[0]),ne=_(te,E[0]),le=d(d(m(y[0],y[0]),m(y[1],y[1])),d(m(y[2],y[2]),m(y[3],y[3]))),ge=_(le,f[0]),_e=_(le,I[0]),ue=_(le,C[0]),fe=_(le,x[0]),pe=_(le,E[0]),ye=d(d(m(x[0],x[0]),m(x[1],x[1])),d(m(x[2],x[2]),m(x[3],x[3]))),Me=_(ye,f[0]),ve=_(ye,I[0]),he=_(ye,C[0]),Qe=_(ye,y[0]),Pe=_(ye,E[0]),we=d(d(m(E[0],E[0]),m(E[1],E[1])),d(m(E[2],E[2]),m(E[3],E[3]))),Te=_(we,f[0]),Re=_(we,I[0]),Ee=_(we,C[0]),ke=_(we,y[0]),Ce=_(we,x[0]),Le=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),I[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-y[2])),d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),x[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),y[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),I[2]),_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-E[2]))),f[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-I[3]),_(d(d(_(d(_(p(ke,pe),I[1]),d(_(p(Re,W),-y[1]),_(p(_e,U),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-E[2]))),C[3])),d(_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),E[3]))))),Ye=d(d(d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),C[2]),_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),-y[2])),d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),x[2]),_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),-E[2]))),f[3]),d(_(d(d(_(d(_(p(Ce,Pe),y[1]),d(_(p(ke,pe),-x[1]),_(p(Qe,fe),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-y[2])),d(_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),x[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-E[2]))),-C[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),y[3]))),d(d(_(d(d(_(d(_(p(ke,pe),C[1]),d(_(p(Ee,ne),-y[1]),_(p(ue,oe),E[1]))),f[2]),_(d(_(p(ke,pe),f[1]),d(_(p(Te,k),-y[1]),_(p(ge,w),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-E[2]))),-x[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),E[3])),d(_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),I[2]),_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),x[2]),_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),-E[2]))),f[3]),_(d(d(_(d(_(p(Ce,Pe),C[1]),d(_(p(Ee,ne),-x[1]),_(p(he,ie),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-C[2])),d(_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),x[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-E[2]))),-I[3])))),d(d(d(_(d(d(_(d(_(p(Ce,Pe),I[1]),d(_(p(Re,W),-x[1]),_(p(ve,Y),E[1]))),f[2]),_(d(_(p(Ce,Pe),f[1]),d(_(p(Te,k),-x[1]),_(p(Me,M),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),x[2]),_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),-E[2]))),C[3]),_(d(d(_(d(_(p(Ee,ne),I[1]),d(_(p(Re,W),-C[1]),_(p(J,O),E[1]))),f[2]),_(d(_(p(Ee,ne),f[1]),d(_(p(Te,k),-C[1]),_(p(j,Q),E[1]))),-I[2])),d(_(d(_(p(Re,W),f[1]),d(_(p(Te,k),-I[1]),_(p(F,S),E[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-E[2]))),-x[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),E[3]),_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),I[2]),_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),-C[2])),d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),y[2]),_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),-x[2]))),f[3]))),d(d(_(d(d(_(d(_(p(Qe,fe),C[1]),d(_(p(he,ie),-y[1]),_(p(ue,oe),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-C[2])),d(_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),y[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-x[2]))),-I[3]),_(d(d(_(d(_(p(Qe,fe),I[1]),d(_(p(ve,Y),-y[1]),_(p(_e,U),x[1]))),f[2]),_(d(_(p(Qe,fe),f[1]),d(_(p(Me,M),-y[1]),_(p(ge,w),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),y[2]),_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),-x[2]))),C[3])),d(_(d(d(_(d(_(p(he,ie),I[1]),d(_(p(ve,Y),-C[1]),_(p(J,O),x[1]))),f[2]),_(d(_(p(he,ie),f[1]),d(_(p(Me,M),-C[1]),_(p(j,Q),x[1]))),-I[2])),d(_(d(_(p(ve,Y),f[1]),d(_(p(Me,M),-I[1]),_(p(F,S),x[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-x[2]))),-y[3]),_(d(d(_(d(_(p(ue,oe),I[1]),d(_(p(_e,U),-C[1]),_(p(J,O),y[1]))),f[2]),_(d(_(p(ue,oe),f[1]),d(_(p(ge,w),-C[1]),_(p(j,Q),y[1]))),-I[2])),d(_(d(_(p(_e,U),f[1]),d(_(p(ge,w),-I[1]),_(p(F,S),y[1]))),C[2]),_(d(_(p(J,O),f[1]),d(_(p(j,Q),-I[1]),_(p(F,S),C[1]))),-y[2]))),x[3]))))),tt=p(Le,Ye);return tt[tt.length-1]}}var u=[function(){return 0},function(){return 0},function(){return 0}];function g(d){var p=u[d.length];return p||(p=u[d.length]=s(d.length)),p.apply(void 0,d)}function h(d,p,m,_,f,I,C,y){return function(x,E,B,S,Q,w){switch(arguments.length){case 0:case 1:return 0;case 2:return _(x,E);case 3:return f(x,E,B);case 4:return I(x,E,B,S);case 5:return C(x,E,B,S,Q);case 6:return y(x,E,B,S,Q,w)}for(var M=new Array(arguments.length),k=0;k<arguments.length;++k)M[k]=arguments[k];return d(M)}}(function(){for(;u.length<=6;)u.push(s(u.length));e.exports=h.apply(void 0,[g].concat(u));for(var d=0;d<=6;++d)e.exports[d]=u[d]})()}}),Peo=j3({"node_modules/cdt2d/lib/delaunay.js"(t,e){var n=weo()[4];Qae();function o(i,r,s,a,A,c){var l=r.opposite(a,A);if(!(l<0)){if(A<a){var u=a;a=A,A=u,u=c,c=l,l=u}r.isConstraint(a,A)||n(i[a],i[A],i[c],i[l])<0&&s.push(a,A)}}e.exports=function(i,r){for(var s=[],a=i.length,A=r.stars,c=0;c<a;++c)for(var l=A[c],u=1;u<l.length;u+=2)if(!((p=l[u])<c)&&!r.isConstraint(c,p)){for(var g=l[u-1],h=-1,d=1;d<l.length;d+=2)if(l[d-1]===p){h=l[d];break}h<0||n(i[c],i[p],i[g],i[h])<0&&s.push(c,p)}for(;s.length>0;){for(var p=s.pop(),m=(g=-1,h=-1,l=A[c=s.pop()],1);m<l.length;m+=2){var _=l[m-1],f=l[m];_===p?h=f:f===p&&(g=_)}g<0||h<0||n(i[c],i[p],i[g],i[h])>=0||(r.flip(c,p),o(i,r,s,g,c,h),o(i,r,s,c,h,g),o(i,r,s,h,p,g),o(i,r,s,p,g,h))}}}}),Meo=j3({"node_modules/cdt2d/lib/filter.js"(t,e){var n=Qae();function o(r,s,a,A,c,l,u){this.cells=r,this.neighbor=s,this.flags=A,this.constraint=a,this.active=c,this.next=l,this.boundary=u}function i(r,s){return r[0]-s[0]||r[1]-s[1]||r[2]-s[2]}e.exports=function(r,s,a){var A=(function(y,x){for(var E=y.cells(),B=E.length,S=0;S<B;++S){var Q=(te=E[S])[0],w=te[1],M=te[2];w<M?w<Q&&(te[0]=w,te[1]=M,te[2]=Q):M<Q&&(te[0]=M,te[1]=Q,te[2]=w)}E.sort(i);var k=new Array(B);for(S=0;S<k.length;++S)k[S]=0;var R=[],F=[],O=new Array(3*B),U=new Array(3*B),Y=null;x&&(Y=[]);var W=new o(E,O,U,k,R,F,Y);for(S=0;S<B;++S)for(var te=E[S],j=0;j<3;++j){Q=te[j],w=te[(j+1)%3];var J=O[3*S+j]=W.locate(w,Q,y.opposite(w,Q)),oe=U[3*S+j]=y.isConstraint(Q,w);J<0&&(oe?F.push(S):(R.push(S),k[S]=1),x&&Y.push([w,Q,-1]))}return W})(r,a);if(s===0)return a?A.cells.concat(A.boundary):A.cells;for(var c=1,l=A.active,u=A.next,g=A.flags,h=A.cells,d=A.constraint,p=A.neighbor;l.length>0||u.length>0;){for(;l.length>0;){var m=l.pop();if(g[m]!==-c){g[m]=c,h[m];for(var _=0;_<3;++_){var f=p[3*m+_];f>=0&&g[f]===0&&(d[3*m+_]?u.push(f):(l.push(f),g[f]=c))}}}var I=u;u=l,l=I,u.length=0,c=-c}var C=(function(y,x,E){for(var B=0,S=0;S<y.length;++S)x[S]===E&&(y[B++]=y[S]);return y.length=B,y})(h,g,s);return a?C.concat(A.boundary):C},o.prototype.locate=(function(){var r=[0,0,0];return function(s,a,A){var c=s,l=a,u=A;return a<A?a<s&&(c=a,l=A,u=s):A<s&&(c=A,l=s,u=a),c<0?-1:(r[0]=c,r[1]=l,r[2]=u,n.eq(this.cells,r,i))}})()}}),Deo=j3({"node_modules/cdt2d/cdt2d.js"(t,e){var n=Qeo(),o=veo(),i=Peo(),r=Meo();function s(c){return[Math.min(c[0],c[1]),Math.max(c[0],c[1])]}function a(c,l){return c[0]-l[0]||c[1]-l[1]}function A(c,l,u){return l in c?c[l]:u}e.exports=function(c,l,u){Array.isArray(l)?(u=u||{},l=l||[]):(u=l||{},l=[]);var g=!!A(u,"delaunay",!0),h=!!A(u,"interior",!0),d=!!A(u,"exterior",!0),p=!!A(u,"infinity",!1);if(!h&&!d||c.length===0)return[];var m=n(c,l);if(g||h!==d||p){for(var _=o(c.length,(function(C){return C.map(s).sort(a)})(l)),f=0;f<m.length;++f){var I=m[f];_.addTriangle(I[0],I[1],I[2])}return g&&i(c,_),d?h?p?r(_,0,p):_.cells():r(_,1,p):r(_,-1)}return m}}}),v1t=t=>t.map(e=>({connectionId:e.connectionId,startRegionId:e.startRegion.regionId,endRegionId:e.endRegion.regionId,mutuallyConnectedNetworkId:e.mutuallyConnectedNetworkId})),w1t=t=>({ports:t.ports.map(e=>({portId:e.portId,region1Id:e.region1.regionId,region2Id:e.region2.regionId,d:e.d})),regions:t.regions.map(e=>({regionId:e.regionId,pointIds:e.ports.map(n=>n.portId),d:e.d}))}),g6e=({port:t,boundaryRegionMap:e})=>{let n=e.get(t.portId);if(!n){const o=typeof t.d?.x=="number"?t.d.x:0,i=typeof t.d?.y=="number"?t.d.y:0;n={regionId:`__section_boundary__${t.portId}`,ports:[],d:{isBoundaryRegion:!0,boundaryPortId:t.portId,...t.d,center:{x:o,y:i},bounds:{minX:o-.05,maxX:o+.05,minY:i-.05,maxY:i+.05}},assignments:[]},e.set(t.portId,n)}return n},Neo=t=>{const{sectionRoute:e,graph:n}=t,o=new Set(n.ports.map(a=>a.portId)),i=e.globalRoute.path.slice(e.sectionStartIndex,e.sectionEndIndex+1).filter(a=>o.has(a.port.portId)),r=[];let s=e.sectionConnection.startRegion;for(let a=0;a<i.length;a++){const A=i[a],c=n.ports.find(u=>u.portId===A.port.portId),l=c.region1===s?c.region2:c.region1;r.push({port:c,g:0,h:0,f:0,hops:a,ripRequired:A.ripRequired,parent:a>0?r[a-1]:void 0,lastPort:a>0?r[a-1].port:void 0,lastRegion:a>0?s:void 0,nextRegion:l}),s=l}return{connection:e.sectionConnection,path:r,requiredRip:e.globalRoute.requiredRip}},Reo=(t,e)=>{let n=-1,o=-1;for(let i=0;i<t.path.length;i++){const r=t.path[i];(r.lastRegion&&e.has(r.lastRegion.regionId)||r.nextRegion&&e.has(r.nextRegion.regionId))&&(n===-1&&(n=i),o=i)}return n===-1?null:{startIndex:n,endIndex:o}},Teo=t=>{const{graph:e,solvedRoutes:n,centralRegion:o,expansionHopsFromCentralRegion:i}=t,r=(({centralRegion:d,expansionHopsFromCentralRegion:p})=>{const m=new Set([d.regionId]),_=[{region:d,hops:0}];for(;_.length>0;){const{region:f,hops:I}=_.shift();if(!(I>=p+1))for(const C of f.ports){const y=C.region1===f?C.region2:C.region1;m.has(y.regionId)||(m.add(y.regionId),_.push({region:y,hops:I+1}))}}return m})({centralRegion:o,expansionHopsFromCentralRegion:i}),s=new Map,a=new Map,A=[];for(const d of e.regions)r.has(d.regionId)&&s.set(d.regionId,{regionId:d.regionId,ports:[],d:d.d?structuredClone(d.d):d.d,assignments:[]});for(const d of e.ports){const p=r.has(d.region1.regionId),m=r.has(d.region2.regionId);if(!p&&!m)continue;if(p&&m){const C={portId:d.portId,region1:s.get(d.region1.regionId),region2:s.get(d.region2.regionId),d:d.d};C.region1.ports.push(C),C.region2.ports.push(C),A.push(C);continue}const _=p?d.region1:d.region2,f=g6e({port:d,boundaryRegionMap:a}),I={portId:d.portId,region1:s.get(_.regionId),region2:f,d:d.d};I.region1.ports.push(I),I.region2.ports.push(I),A.push(I)}const c={regions:[...s.values(),...a.values()],ports:A},l=[],u=[],g=[];for(const d of n){const p=Reo(d,r);if(!p)continue;const m=d.path[p.startIndex],_=d.path[p.endIndex];g.push({solvedRoute:d,solvedPathStartIndex:p.startIndex,solvedPathEndIndex:p.endIndex,startCandidate:m,endCandidate:_})}const h=new Map(c.regions.map(d=>[d.regionId,d]));for(const{solvedRoute:d,solvedPathStartIndex:p,solvedPathEndIndex:m,startCandidate:_,endCandidate:f}of g){let I,C,y,x;if(r.has(d.connection.startRegion.regionId))I=d.connection.startRegion.regionId,C=h.get(I);else{const Q=g6e({port:_.port,boundaryRegionMap:a});I=Q.regionId,C=Q,h.has(I)||h.set(I,Q)}if(r.has(d.connection.endRegion.regionId))y=d.connection.endRegion.regionId,x=h.get(y);else{const Q=g6e({port:f.port,boundaryRegionMap:a});y=Q.regionId,x=Q,h.has(y)||h.set(y,Q)}if(!C)throw console.error("[getSectionOfHyperGraphAsHyperGraph] CRITICAL ERROR: startRegion not found!"),console.error(`  Looking for: ${I}`),console.error(`  Route connection: ${d.connection.connectionId}`),console.error(`  Original startRegion: ${d.connection.startRegion.regionId}`),console.error(`  startCandidate port: ${_.port.portId}`),console.error("  Available regions in sectionRegionMap:",Array.from(h.keys())),new Error(`startRegion ${I} not found in sectionRegionMap`);if(!x)throw console.error("[getSectionOfHyperGraphAsHyperGraph] CRITICAL ERROR: endRegion not found!"),console.error(`  Looking for: ${y}`),console.error(`  Route connection: ${d.connection.connectionId}`),console.error(`  Original endRegion: ${d.connection.endRegion.regionId}`),console.error(`  endCandidate port: ${f.port.portId}`),console.error("  Available regions in sectionRegionMap:",Array.from(h.keys())),new Error(`endRegion ${y} not found in sectionRegionMap`);const E={connectionId:d.connection.connectionId,mutuallyConnectedNetworkId:d.connection.mutuallyConnectedNetworkId,startRegion:C,endRegion:x},B=d.path.slice(p,m+1),S={globalRoute:d,globalConnection:d.connection,sectionConnection:E,sectionStartIndex:p,sectionEndIndex:m};l.push({...S,canRemainFixedInSectionSolve:B.every(Q=>c.ports.some(w=>w.portId===Q.port.portId)),sectionRoute:Neo({sectionRoute:S,graph:c})}),u.push(E)}return{centralRegionId:o.regionId,sectionRegionIds:r,graph:c,connections:u,sectionRoutes:l}},P1t=class{heap=[];maxSize;constructor(e=[],n=1e4){if(this.maxSize=n,e.length>0){this.heap=[...e].sort((o,i)=>o.f-i.f).slice(0,this.maxSize);for(let o=Math.floor(this.heap.length/2)-1;o>=0;o--)this._siftDown(o)}}get size(){return this.heap.length}isEmpty(){return this.heap.length===0}peek(){return this.isEmpty()?null:this.heap[0]??null}peekMany(e){return[...this.heap].sort((n,o)=>n.f-o.f).slice(0,e)}dequeue(){if(this.isEmpty())return null;const e=this.heap[0],n=this.heap.pop();return this.heap.length===0&&n!==void 0||n!==void 0&&(this.heap[0]=n,this._siftDown(0)),e}enqueue(e){this.heap.length>=this.maxSize||(this.heap.push(e),this._siftUp(this.heap.length-1))}_siftUp(e){let n=e;for(;n>0;){const o=this._parentIndex(n);if(this.heap[o].f<=this.heap[n].f)break;this._swap(n,o),n=o}}_siftDown(e){let n=e;const o=this.heap.length;for(;;){const i=this._leftChildIndex(n),r=this._rightChildIndex(n);let s=n;if(i<o&&this.heap[i].f<this.heap[s].f&&(s=i),r<o&&this.heap[r].f<this.heap[s].f&&(s=r),s===n)break;this._swap(n,s),n=s}}_swap(e,n){[this.heap[e],this.heap[n]]=[this.heap[n],this.heap[e]]}_parentIndex(e){return Math.floor((e-1)/2)}_leftChildIndex(e){return 2*e+1}_rightChildIndex(e){return 2*e+2}},M1t=t=>{for(const e of t.regions)e.assignments=[];for(const e of t.ports)e.assignment=void 0},d6e=({graph:t,connections:e,solvedRoutes:n})=>{const o=new Map(t.ports.map(a=>[a.portId,a])),i=new Map(t.regions.map(a=>[a.regionId,a])),r=new Map(e.map(a=>[a.connectionId,a])),s=n.map(a=>{const A=[];for(const c of a.path){const l={port:o.get(c.port.portId),g:c.g,h:c.h,f:c.f,hops:c.hops,ripRequired:c.ripRequired};c.lastPort&&(l.lastPort=o.get(c.lastPort.portId)),c.lastRegion&&(l.lastRegion=i.get(c.lastRegion.regionId)),c.nextRegion&&(l.nextRegion=i.get(c.nextRegion.regionId));const u=A[A.length-1];u&&(l.parent=u),A.push(l)}return{path:A,connection:r.get(a.connection.connectionId),requiredRip:a.requiredRip}});M1t(t),t.solvedRoutes=s;for(const a of s)for(const A of a.path){if(A.port.assignment={solvedRoute:a,connection:a.connection},!A.lastPort||!A.lastRegion)continue;const c={regionPort1:A.lastPort,regionPort2:A.port,region:A.lastRegion,connection:a.connection,solvedRoute:a};A.lastRegion.assignments??=[],A.lastRegion.assignments.push(c)}return s},D1t=class extends zA{constructor(e){super(),this.input=e,this.graph=(o=>{if(o.ports.length>0&&"region1"in o.ports[0]&&typeof o.ports[0].region1=="object")return o;const i=new Map,r=new Map;for(const s of o.regions){const{assignments:a,...A}=s;r.set(s.regionId,{...A,d:A.d?structuredClone(A.d):A.d,ports:[],assignments:void 0})}for(const s of o.ports){const a=r.get(s.region1Id??s.region1?.regionId),A=r.get(s.region2Id??s.region2?.regionId),c={portId:s.portId,region1:a,region2:A,d:s.d};i.set(s.portId,c),a.ports.push(c),A.ports.push(c)}return{ports:Array.from(i.values()),regions:Array.from(r.values())}})(e.inputGraph),M1t(this.graph),this.connections=((o,i)=>{const r=[];for(const s of o)"startRegionId"in s?r.push({connectionId:s.connectionId,mutuallyConnectedNetworkId:s.mutuallyConnectedNetworkId??s.connectionId,startRegion:i.regions.find(a=>a.regionId===s.startRegionId),endRegion:i.regions.find(a=>a.regionId===s.endRegionId)}):r.push(s);return r})(e.inputConnections,this.graph),e.inputSolvedRoutes?this.solvedRoutes=d6e({graph:this.graph,connections:this.connections,solvedRoutes:e.inputSolvedRoutes}):this.graph.solvedRoutes=this.solvedRoutes,e.greedyMultiplier!==void 0&&(this.greedyMultiplier=e.greedyMultiplier),e.rippingEnabled!==void 0&&(this.rippingEnabled=e.rippingEnabled),e.ripCost!==void 0&&(this.ripCost=e.ripCost);const n=new Set(this.solvedRoutes.map(o=>o.connection.connectionId));this.unprocessedConnections=this.connections.filter(o=>!n.has(o.connectionId)),this.candidateQueue=new P1t,this.unprocessedConnections.length===0?this.solved=!0:this.beginNewConnection()}getSolverName(){return"HyperGraphSolver"}graph;connections;candidateQueue;unprocessedConnections;solvedRoutes=[];currentConnection=null;currentEndRegion=null;greedyMultiplier=1;rippingEnabled=!1;ripCost=0;lastCandidate=null;visitedPointsForCurrentConnection=new Map;getConstructorParams(){return{inputGraph:w1t(this.graph),inputConnections:v1t(this.connections),greedyMultiplier:this.greedyMultiplier,rippingEnabled:this.rippingEnabled,ripCost:this.ripCost,inputSolvedRoutes:this.solvedRoutes}}computeH(e){return this.estimateCostToEnd(e.port)}estimateCostToEnd(e){return 0}getPortUsagePenalty(e){return 0}computeIncreasedRegionCostIfPortsAreUsed(e,n,o){return 0}getRipsRequiredForPortUsage(e,n,o){return[]}isRipRequiredForPortUsage(e,n,o){return!1}isTransitionAllowed(e,n,o){return!0}computeG(e){return e.parent.g+this.computeIncreasedRegionCostIfPortsAreUsed(e.lastRegion,e.lastPort,e.port)+(e.ripRequired?this.ripCost:0)+this.getPortUsagePenalty(e.port)}selectCandidatesForEnteringRegion(e){return e}computeRoutesToRip(e){const n=this.computeCrossingRoutes(e),o=this.computePortOverlapRoutes(e);return new Set([...n,...o])}computePortOverlapRoutes(e){const n=new Set;for(const o of e.path)o.port.assignment&&o.port.assignment.connection.mutuallyConnectedNetworkId!==e.connection.mutuallyConnectedNetworkId&&n.add(o.port.assignment.solvedRoute);return n}computeCrossingRoutes(e){const n=new Set;for(const o of e.path){if(!o.lastPort||!o.lastRegion)continue;const i=this.getRipsRequiredForPortUsage(o.lastRegion,o.lastPort,o.port);for(const r of i)n.add(r.solvedRoute)}return n}getNextCandidates(e){const n=e.nextRegion,o=e.port,i={};for(const s of n.ports){if(s===e.port||!this.isTransitionAllowed(n,o,s))continue;const a=s.assignment&&s.assignment.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId||this.isRipRequiredForPortUsage(n,o,s),A={port:s,hops:e.hops+1,parent:e,lastRegion:n,nextRegion:s.region1===n?s.region2:s.region1,lastPort:o,ripRequired:a};!this.rippingEnabled&&A.ripRequired||(i[A.nextRegion.regionId]??=[],i[A.nextRegion.regionId].push(A))}const r=[];for(const s in i){const a=i[s];r.push(...this.selectCandidatesForEnteringRegion(a))}for(const s of r)s.g=this.computeG(s),s.h=this.computeH(s),s.f=s.g+s.h*this.greedyMultiplier;return r}processSolvedRoute(e){const n={path:[],connection:this.currentConnection,requiredRip:!1};let o=e,i=!1;for(;o;)i||=!!o.ripRequired,n.path.unshift(o),o=o.parent;i&&(n.requiredRip=!0);const r=this.computeRoutesToRip(n);if(r.size>0){n.requiredRip=!0;for(const s of r)this.ripSolvedRoute(s)}for(const s of n.path){if(s.port.assignment={solvedRoute:n,connection:this.currentConnection},!s.lastPort)continue;const a={regionPort1:s.lastPort,regionPort2:s.port,region:s.lastRegion,connection:this.currentConnection,solvedRoute:n};s.lastRegion.assignments?.push(a)}this.solvedRoutes.push(n),this.routeSolvedHook(n)}routeSolvedHook(e){}routeStartedHook(e){}ripSolvedRoute(e){for(const n of e.path.map(o=>o.port))n.ripCount=(n.ripCount??0)+1,n.region1.assignments=n.region1.assignments?.filter(o=>o.regionPort1!==n&&o.regionPort2!==n),n.region2.assignments=n.region2.assignments?.filter(o=>o.regionPort1!==n&&o.regionPort2!==n),n.assignment=void 0;this.solvedRoutes=this.solvedRoutes.filter(n=>n!==e),this.unprocessedConnections.push(e.connection)}beginNewConnection(){this.currentConnection=this.unprocessedConnections.shift(),this.currentEndRegion=this.currentConnection.endRegion,this.candidateQueue=new P1t,this.visitedPointsForCurrentConnection.clear(),this.routeStartedHook(this.currentConnection);for(const e of this.currentConnection.startRegion.ports)this.candidateQueue.enqueue({port:e,g:0,h:0,f:0,hops:0,ripRequired:!1,nextRegion:e.region1===this.currentConnection.startRegion?e.region2:e.region1})}_step(){let e=this.candidateQueue.dequeue();if(!e)return this.failed=!0,void(this.error="Ran out of candidates");let n=this.visitedPointsForCurrentConnection.get(e.port.portId);for(;e&&n!==void 0&&!(e.g<n)&&(e=this.candidateQueue.dequeue(),e);)n=this.visitedPointsForCurrentConnection.get(e.port.portId);if(!e)return this.failed=!0,void(this.error="Ran out of candidates");if(this.lastCandidate=e,this.visitedPointsForCurrentConnection.set(e.port.portId,e.g),e.nextRegion===this.currentEndRegion)return this.processSolvedRoute(e),this.unprocessedConnections.length===0?void(this.solved=!0):void this.beginNewConnection();const o=this.getNextCandidates(e);for(const i of o)this.candidateQueue.enqueue(i)}};function keo(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function h6e(t,e,n,o,i){const r=n-e,s=i-o,a=1e-6;if(Math.abs(t.y-i)<a)return t.x-e;if(Math.abs(t.x-n)<a)return r+(i-t.y);if(Math.abs(t.y-o)<a)return r+s+(n-t.x);if(Math.abs(t.x-e)<a)return 2*r+s+(t.y-o);const A=Math.abs(t.y-i),c=Math.abs(t.x-n),l=Math.abs(t.y-o),u=Math.abs(t.x-e),g=Math.min(A,c,l,u);return g===A?Math.max(0,Math.min(r,t.x-e)):g===c?r+Math.max(0,Math.min(s,i-t.y)):g===l?r+s+Math.max(0,Math.min(r,n-t.x)):2*r+s+Math.max(0,Math.min(s,t.y-o))}function Feo(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=t.x-e.x,s=t.y-e.y,a=o*o+i*i,A=a>0?(c=(r*o+s*i)/a,l=0,u=1,Math.max(l,Math.min(u,c))):0;var c,l,u;return{u:A,d2:keo(t,{x:e.x+A*o,y:e.y+A*i})}}function N1t(t){const e=t.d.polygon;if(!e||e.length<3)return null;const n=t.d.polygonPerimeterCache;if(n)return n;const o=(function(i){const r=i.length,s=new Array(r),a=new Array(r+1);a[0]=0;for(let A=0;A<r;A++){const c=i[A],l=i[(A+1)%r],u=Math.hypot(l.x-c.x,l.y-c.y);s[A]=u,a[A+1]=a[A]+u}return{edgeLengths:s,cumulative:a,perimeter:a[r]}})(e);return t.d.polygonPerimeterCache=o,o}function R1t(t){const e=N1t(t);if(e)return e.perimeter;const{minX:n,maxX:o,minY:i,maxY:r}=t.d.bounds;return 2*(o-n)+2*(r-i)}function ZQ(t,e){if(t.region1===e){if(typeof t.region1T=="number")return t.region1T;const n=p6e(t.d,e);return t.region1T=n,n}if(t.region2===e){if(typeof t.region2T=="number")return t.region2T;const n=p6e(t.d,e);return t.region2T=n,n}return p6e(t.d,e)}function p6e(t,e){const n=e.d.polygon;if(n&&n.length>=3){const a=N1t(e);if(a)return(function(A,c,l,u=1e-6){let g=0,h=0,d=Number.POSITIVE_INFINITY;const p=u*u;for(let m=0;m<c.length;m++){const _=Feo(A,c[m],c[(m+1)%c.length]);if(_.d2<=p){g=m,h=_.u,d=_.d2;break}_.d2<d&&(g=m,h=_.u,d=_.d2)}return l.cumulative[g]+h*l.edgeLengths[g]})(t,n,a)}const{minX:o,maxX:i,minY:r,maxY:s}=e.d.bounds;return h6e(t,o,i,r,s)}function vae(t,e,n=1e-6){return Math.abs(t-e)<n}function ev(t,e){return(t%e+e)%e}function wae(t,e,n,o){const i=Math.abs(ev(t-e,n));return i<o||n-i<o}function T1t(t,e,n,o,i){const r=ev(t,o),s=ev(e,o),a=ev(n,o);return!(Math.abs(s-a)<i)&&(s<a?s<r&&r<a:r>s||r<a)}function m6e(t,e,n){if(typeof n=="number"&&n>0){let[a,A]=t,[c,l]=e;return a=ev(a,n),A=ev(A,n),c=ev(c,n),l=ev(l,n),wae(a,c,n,1e-6)||wae(a,l,n,1e-6)||wae(A,c,n,1e-6)||wae(A,l,n,1e-6)?!1:T1t(c,a,A,n,1e-12)!==T1t(l,a,A,n,1e-12)}const[o,i]=t[0]<t[1]?t:[t[1],t[0]],[r,s]=e[0]<e[1]?e:[e[1],e[0]];return!(vae(o,r)||vae(o,s)||vae(i,r)||vae(i,s))&&(o<r&&r<i&&i<s||r<o&&o<s&&s<i)}var k1t=t=>{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){const{bounds:s}=r.d;e=Math.min(e,s.minX),n=Math.max(n,s.maxX),o=Math.min(o,s.minY),i=Math.max(i,s.maxY)}return{minX:e,maxX:n,minY:o,maxY:i}},F1t=(t,e,n,o)=>{const i={portId:t,region1:e,region2:n,d:{x:o.x,y:o.y}};return e.ports.push(i),n.ports.push(i),i},L1t=(t,e,n)=>({regionId:t,ports:[],d:{bounds:{minX:e-.2,maxX:e+.2,minY:n-.2,maxY:n+.2},center:{x:e,y:n},isPad:!1,isConnectionRegion:!0}}),tv=.01,$8=(t,e,n)=>Math.max(e,Math.min(n,t)),H1t=(t,e,n)=>e==="left"?Math.abs(t.x-n.minX)<tv:e==="right"?Math.abs(t.x-n.maxX)<tv:e==="top"?Math.abs(t.y-n.maxY)<tv:Math.abs(t.y-n.minY)<tv,Leo=(t,e,n,o)=>{const i=o.x-n.x,r=o.y-n.y,s=t-n.x,a=e-n.y,A=i*i+r*r,c=A>0?$8((s*i+a*r)/A,0,1):0,l=n.x+c*i,u=n.y+c*r,g=t-l,h=e-u;return{x:l,y:u,d2:g*g+h*h}},Heo=(t,e,n,o,i)=>{const r=n.d.polygon;if(r&&r.length>=3){const c=new Set(i);let l=null;for(let u=0;u<r.length;u++){const g=r[u],h=r[(u+1)%r.length];if(i.length>0&&!i.some(p=>H1t(g,p,o)&&H1t(h,p,o)&&c.has(p)))continue;const d=Leo(t,e,g,h);(!l||d.d2<l.d2)&&(l=d)}if(l)return l}const s=n.d.bounds,a=[];if(i.length>0)for(const c of i)c==="left"?a.push({side:c,x:s.minX,y:$8(e,s.minY,s.maxY)}):c==="right"?a.push({side:c,x:s.maxX,y:$8(e,s.minY,s.maxY)}):c==="top"?a.push({side:c,x:$8(t,s.minX,s.maxX),y:s.maxY}):a.push({side:c,x:$8(t,s.minX,s.maxX),y:s.minY});a.length===0&&a.push({side:"left",x:s.minX,y:$8(e,s.minY,s.maxY)},{side:"right",x:s.maxX,y:$8(e,s.minY,s.maxY)},{side:"top",x:$8(t,s.minX,s.maxX),y:s.maxY},{side:"bottom",x:$8(t,s.minX,s.maxX),y:s.minY});let A=null;for(const c of a){if(i.length>0&&!i.includes(c.side))continue;const l=t-c.x,u=e-c.y,g=l*l+u*u;(!A||g<A.d2)&&(A={x:c.x,y:c.y,d2:g})}return A},O1t=(t,e,n,o)=>{const i=((A,c,l)=>{const u=[];return Math.abs(A-l.minX)<tv&&u.push("left"),Math.abs(A-l.maxX)<tv&&u.push("right"),Math.abs(c-l.maxY)<tv&&u.push("top"),Math.abs(c-l.minY)<tv&&u.push("bottom"),u})(t,e,o);let r=null,s=Number.POSITIVE_INFINITY,a={x:t,y:e};for(const A of n){if(A.d.isPad||A.d.isThroughJumper)continue;const c=A.d.bounds;if(!(Math.abs(c.minX-o.minX)<.01||Math.abs(c.maxX-o.maxX)<.01||Math.abs(c.minY-o.minY)<.01||Math.abs(c.maxY-o.maxY)<.01))continue;const l=Heo(t,e,A,o,i);if(!l)continue;const u=Math.sqrt(l.d2);u<s&&(s=u,r=A,a={x:l.x,y:l.y})}return r?{region:r,portPosition:a}:null},Oeo=class extends zA{constructor(e){super(),this.input=e,this.graph=e.hyperGraphSolver.graph;const n=e.inputSolvedRoutes,o=e.hyperGraphSolver.connections;this.connections=o,this.solvedRoutes=d6e({graph:this.graph,connections:this.connections,solvedRoutes:n}),this.maxAttemptsPerRegion=e.MAX_ATTEMPTS_PER_REGION,this.maxSectionAttempts=e.MAX_ATTEMPTS_PER_SECTION??500,this.iterations+=this.iterations*(e.effort??1),this.fractionToReplace=e.FRACTION_TO_REPLACE??.2,this.alwaysRipConflicts=e.alwaysRipConflicts??!0}graph;connections;solvedRoutes;activeSection=null;baselineSectionCost=1/0;baselineGlobalCost=1/0;regionAttemptCounts=new Map;sectionAttempts=0;maxAttemptsPerRegion;maxSectionAttempts;fractionToReplace;alwaysRipConflicts;random=(e=>{let n=e;return()=>(n=1664525*n+1013904223>>>0,n/4294967295)})(31337);getSolverName(){return"HyperGraphSectionOptimizer"}getConstructorParams(){return{inputGraph:w1t(this.graph),inputConnections:v1t(this.connections),inputSolvedRoutes:this.solvedRoutes,expansionHopsFromCentralRegion:this.input.expansionHopsFromCentralRegion,maxAttemptsPerRegion:this.maxAttemptsPerRegion,maxSectionAttempts:this.maxSectionAttempts,effort:this.input.effort,fractionToReplace:this.fractionToReplace,alwaysRipConflicts:this.alwaysRipConflicts,ACCEPTABLE_COST:this.input.ACCEPTABLE_REGION_COST}}getOutput(){return this.solvedRoutes}_setup(){this.beginSectionSolve()}visualize(){return this.activeSubSolver?this.activeSubSolver.visualize():{title:"HyperGraphSectionOptimizer",points:[],lines:[],rects:[],circles:[],texts:[],polygons:[],arrows:[]}}getCostOfRegionWithAttempts(e){const n=this.regionAttemptCounts.get(e.regionId)??0;return this.input.regionCost(e)+1e4*n}computeCostOfSection({section:e,solvedRoutes:n}){if(this.input.computeSolvedGraphCost)return this.input.computeSolvedGraphCost(n);const o=this.input.createHyperGraphSolver({inputGraph:e.graph,inputConnections:e.connections,inputSolvedRoutes:n});let i=0;for(const r of o.graph.regions)i+=this.input.regionCost(r);return i}computeSolvedGraphCost(e){if(this.input.computeSolvedGraphCost)return this.input.computeSolvedGraphCost(e);const n=this.input.createHyperGraphSolver({inputGraph:this.graph,inputConnections:this.connections,inputSolvedRoutes:e});let o=0;for(const i of n.graph.regions)o+=this.input.regionCost(i);return o}determineConnectionsToRip(e,n){const o=e.sectionRoutes.map(A=>A.globalConnection.connectionId);if(this.fractionToReplace>=1)return new Set(o);const i=[...o];for(let A=i.length-1;A>0;A--){const c=Math.floor(this.random()*(A+1));[i[A],i[c]]=[i[c],i[A]]}const r=Math.max(1,Math.ceil(i.length*this.fractionToReplace)),s=new Set(i.slice(0,r));if(!this.alwaysRipConflicts)return s;const a=new Map(e.graph.regions.map(A=>[A.regionId,A]));for(const A of e.sectionRoutes)for(const c of A.sectionRoute.path){if(!c.lastPort||!c.lastRegion)continue;const l=a.get(c.lastRegion.regionId);if(!l)continue;n.currentConnection=A.globalConnection;const u=n.getRipsRequiredForPortUsage(l,c.lastPort,c.port);for(const g of u){const h=A.globalConnection.connectionId,d=g.connection.connectionId;s.has(h)||s.has(d)||s.add(this.random()<.5?h:d)}}return s}getNextCentralRegion(){let e=null,n=1/0;for(const o of this.graph.regions){if((o.assignments?.length??0)===0||(this.regionAttemptCounts.get(o.regionId)??0)>=this.maxAttemptsPerRegion||this.input.regionCost(o)<this.input.ACCEPTABLE_REGION_COST)continue;const i=this.getCostOfRegionWithAttempts(o);i>=n||(n=i,e=o)}return e}beginSectionSolve(){if(this.sectionAttempts>=this.maxSectionAttempts)return console.log(`Reached max section attempts (${this.maxSectionAttempts}), stopping optimization`),void(this.solved=!0);const e=this.getNextCentralRegion();if(!e)return void(this.solved=!0);if(this.sectionAttempts++,this.activeSection=Teo({graph:this.graph,solvedRoutes:this.solvedRoutes,centralRegion:e,expansionHopsFromCentralRegion:this.input.expansionHopsFromCentralRegion}),!this.activeSection)return;if(this.activeSection.connections.length===0)return this.regionAttemptCounts.set(e.regionId,(this.regionAttemptCounts.get(e.regionId)??0)+1),void(this.activeSection=null);const n=this.activeSection.sectionRoutes.filter(a=>a.canRemainFixedInSectionSolve),o=this.input.createHyperGraphSolver({inputGraph:this.activeSection.graph,inputConnections:this.activeSection.connections,inputSolvedRoutes:n.map(a=>a.sectionRoute)}),i=this.determineConnectionsToRip(this.activeSection,o);for(const a of this.activeSection.sectionRoutes)a.canRemainFixedInSectionSolve||i.add(a.globalConnection.connectionId);const r=this.activeSection.sectionRoutes.filter(a=>a.canRemainFixedInSectionSolve&&!i.has(a.globalConnection.connectionId)).map(a=>a.sectionRoute),s=[...r,...this.activeSection.sectionRoutes.filter(a=>i.has(a.globalConnection.connectionId)).map(a=>a.sectionRoute)];this.baselineSectionCost=this.computeCostOfSection({section:this.activeSection,solvedRoutes:s}),this.baselineGlobalCost=this.computeSolvedGraphCost(this.solvedRoutes),this.activeSubSolver=this.input.createHyperGraphSolver({inputGraph:this.activeSection.graph,inputConnections:this.activeSection.connections,inputSolvedRoutes:r});for(const a of this.activeSubSolver.connections)a.startRegion&&a.endRegion||console.error({startRegion:a.startRegion?.regionId,endRegion:a.endRegion?.regionId})}_step(){if(!this.activeSubSolver)return void this.beginSectionSolve();if(this.activeSubSolver.step(),!this.activeSection)return;if(this.activeSubSolver.failed){this.failedSubSolvers??=[],this.failedSubSolvers.push(this.activeSubSolver);const a=this.regionAttemptCounts.get(this.activeSection.centralRegionId)??0;return this.regionAttemptCounts.set(this.activeSection.centralRegionId,a+1),this.activeSubSolver=null,this.activeSection=null,this.baselineSectionCost=1/0,void(this.baselineGlobalCost=1/0)}if(!this.activeSubSolver.solved)return;const e=this.activeSubSolver.solvedRoutes,n=this.computeCostOfSection({section:this.activeSection,solvedRoutes:e}),o=(a=>{const{solvedRoutes:A,section:c,replacementSolvedRoutes:l}=a,u=new Map(l.map(g=>[g.connection.connectionId,g]));return A.map(g=>{const h=c.sectionRoutes.find(m=>m.globalConnection.connectionId===g.connection.connectionId);if(!h)return g;const d=u.get(g.connection.connectionId);if(!d)return g;const p=[...g.path.slice(0,h.sectionStartIndex),...d.path,...g.path.slice(h.sectionEndIndex+1)].map(m=>({port:m.port,g:m.g,h:m.h,f:m.f,hops:m.hops,ripRequired:m.ripRequired,lastPort:m.lastPort,lastRegion:m.lastRegion,nextRegion:m.nextRegion}));for(let m=0;m<p.length;m++)p[m].parent=m>0?p[m-1]:void 0;return{connection:g.connection,path:p,requiredRip:g.requiredRip||d.requiredRip}})})({solvedRoutes:this.solvedRoutes,section:this.activeSection,replacementSolvedRoutes:e}),i=this.computeSolvedGraphCost(o),r=n<=this.baselineSectionCost,s=i<this.baselineGlobalCost;if(r&&s){this.solvedRoutes=o;const a=this.input.hyperGraphSolver;if(!a)return;a.solvedRoutes=d6e({graph:a.graph,connections:a.connections,solvedRoutes:this.solvedRoutes});for(const A of this.activeSection.sectionRegionIds)this.regionAttemptCounts.set(A,0);this.baselineSectionCost=n,this.baselineGlobalCost=i}else{const a=this.regionAttemptCounts.get(this.activeSection.centralRegionId)??0;this.regionAttemptCounts.set(this.activeSection.centralRegionId,a+1)}this.activeSubSolver=null,this.activeSection=null,this.baselineSectionCost=1/0,this.baselineGlobalCost=1/0}};function AL(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function G1t(t){return t===void 0}function Pae(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function _6e(...t){const e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch((t=Array.isArray(t[0])?t[0]:t).length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t;return _6e(e(n,o),...i)}}}var{cos:Geo,sin:Yeo}=Math,f6e=t=>({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),Y1t=(t,e)=>{const n=t.regions.map(s=>{const{bounds:a,center:A,...c}=s.d,l=[{x:a.minX,y:a.minY},{x:a.maxX,y:a.minY},{x:a.minX,y:a.maxY},{x:a.maxX,y:a.maxY}].map(h=>AL(e,h)),u={minX:Math.min(...l.map(h=>h.x)),maxX:Math.max(...l.map(h=>h.x)),minY:Math.min(...l.map(h=>h.y)),maxY:Math.max(...l.map(h=>h.y))},g=AL(e,A);return{...s,ports:[],d:{...c,bounds:u,center:g}}}),o=new Map;for(let s=0;s<t.regions.length;s++)o.set(t.regions[s],n[s]);const i=t.ports.map(s=>{const a=AL(e,s.d),A=o.get(s.region1),c=o.get(s.region2),l={...s,region1:A,region2:c,d:a};return A.ports.push(l),c.ports.push(l),l}),r=t.jumperLocations?.map(s=>{const a=AL(e,s.center),A=s.padRegions.map(h=>o.get(h)),c=AL(e,{x:1,y:0}),l=AL(e,{x:0,y:0}),u=c.x-l.x,g=c.y-l.y;return{center:a,orientation:Math.abs(g)>Math.abs(u)?s.orientation==="horizontal"?"vertical":"horizontal":s.orientation,padRegions:A}});return{regions:n,ports:i,...r&&{jumperLocations:r}}},I6e=(t,e=.8)=>{let n=0;for(let o=0;o<t.length;o++)n=17777*t.charCodeAt(o)+((n<<5)-n);return`hsla(${Math.abs(n)%360}, 70%, 50%, ${e})`},Ueo=t=>{const e=(i=>{const r=((s,a)=>{const A={arrows:[],circles:[],title:"Jumper Graph",lines:[],points:[],rects:[],texts:[],polygons:[],coordinateSystem:"cartesian"};for(const c of s.regions){const{bounds:l,isPad:u,isThroughJumper:g,isConnectionRegion:h,polygon:d}=c.d,p=(l.minX+l.maxX)/2,m=(l.minY+l.maxY)/2,_=l.maxX-l.minX,f=l.maxY-l.minY;let I;if(I=h?"rgba(255, 100, 255, 0.6)":g?"rgba(100, 200, 100, 0.5)":u?"rgba(255, 200, 100, 0.5)":"rgba(200, 200, 255, 0.1)",d&&d.length>=3){const C=d;A.polygons.push({points:C,fill:I})}else A.rects.push({center:{x:p,y:m},width:_-.1,height:f-.1,fill:I})}if(!a?.hidePortPoints)for(const c of s.ports){const l=c.region1.regionId.split(":").pop()??c.region1.regionId,u=c.region2.regionId.split(":").pop()??c.region2.regionId;A.circles.push({center:{x:c.d.x,y:c.d.y},radius:.05,fill:"rgba(128, 128, 128, 0.5)",label:`${l}-${u}`})}if(!a?.hideRegionPortLines)for(const c of s.ports){const l={x:(c.region1.d.bounds.minX+c.region1.d.bounds.maxX)/2,y:(c.region1.d.bounds.minY+c.region1.d.bounds.maxY)/2},u={x:(c.region2.d.bounds.minX+c.region2.d.bounds.maxX)/2,y:(c.region2.d.bounds.minY+c.region2.d.bounds.maxY)/2};A.lines.push({points:[l,{x:c.d.x,y:c.d.y},u],strokeColor:"rgba(100, 100, 100, 0.3)"})}if(a?.connections&&!a?.hideConnectionLines)for(const c of a.connections){const l=c.startRegion,u=c.endRegion,g={x:(l.d.bounds.minX+l.d.bounds.maxX)/2,y:(l.d.bounds.minY+l.d.bounds.maxY)/2},h={x:(u.d.bounds.minX+u.d.bounds.maxX)/2,y:(u.d.bounds.minY+u.d.bounds.maxY)/2},d=(g.x+h.x)/2,p=(g.y+h.y)/2;A.lines.push({points:[g,h],strokeColor:"rgba(255, 50, 150, 0.8)",strokeDash:"3 3"}),A.points.push({x:d,y:p,color:"rgba(200, 0, 100, 1)",label:c.connectionId})}return A})(i.graph,{connections:i.connections,...i.hideInitialGeometry?{hideRegionPortLines:!0,hideConnectionLines:!0,hidePortPoints:!0}:{}});if(!i.hideInitialGeometry)for(const s of r.polygons)s.stroke="rgba(128, 128, 128, 0.5)",s.strokeWidth=.03;i.title&&(r.title=i.title);for(const s of i.priorSolvedRoutes??[]){const a=s.path.map(A=>{const c=A.port;return{x:c.d.x,y:c.d.y}});a.length!==0&&r.lines.push({points:a,strokeColor:"rgba(80, 80, 80, 0.45)",strokeDash:"4 4"})}for(const s of i.solvedRoutes){const a=I6e(s.connection.connectionId),A=[];for(const c of s.path){const l=c.port;A.push({x:l.d.x,y:l.d.y})}A.length>0&&r.lines.push({points:A,strokeColor:a})}return r})({graph:{regions:t.graph.regions,ports:t.graph.ports},connections:t.connections,solvedRoutes:t.solvedRoutes,hideInitialGeometry:t.iterations>0});if(t.currentConnection&&!t.solved){const i=I6e(t.currentConnection.connectionId),r=t.currentConnection.startRegion,s=t.currentConnection.endRegion;if(!r?.d||!s?.d)return e;const a={x:(r.d.bounds.minX+r.d.bounds.maxX)/2,y:(r.d.bounds.minY+r.d.bounds.maxY)/2},A={x:(s.d.bounds.minX+s.d.bounds.maxX)/2,y:(s.d.bounds.minY+s.d.bounds.maxY)/2};e.lines.push({points:[a,A],strokeColor:i,strokeDash:"10 5"}),e.points.push({x:a.x-.1,y:a.y+.1,color:i,label:[t.currentConnection.connectionId,"start"].join(`
`)}),e.points.push({x:A.x-.1,y:A.y+.1,color:i,label:[t.currentConnection.connectionId,"end"].join(`
`)})}const n=t.candidateQueue.peekMany(10);for(let i=0;i<n.length;i++){const r=n[i],s=r.port,a=i===0;e.points.push({x:s.d.x,y:s.d.y,color:a?"green":"rgba(128, 128, 128, 0.25)",label:[r.port.portId,`g: ${r.g.toFixed(2)}`,`h: ${r.h.toFixed(2)}`,`f: ${r.f.toFixed(2)}`].join(`
`)})}const o=n[0];if(!t.solved&&o&&t.currentConnection){const i=I6e(t.currentConnection.connectionId),r=[];let s=o;for(;s;){const a=s.port;r.unshift({x:a.d.x,y:a.d.y}),s=s.parent}r.length>1&&e.lines.push({points:r,strokeColor:i})}return e},Keo=.034685181009478865,Veo=0,zeo=4.072520483177124,Jeo=0,Weo=35.38577539020022,jeo=.5518001238069296,$eo=class extends D1t{getSolverName(){return"JumperGraphSolver"}UNIT_OF_COST="hops";portUsagePenalty=Keo;portUsagePenaltySq=Veo;crossingPenalty=zeo;crossingPenaltySq=Jeo;ripCost=Weo;baseMaxIterations=4e3;additionalMaxIterationsPerConnection=2e3;additionalMaxIterationsPerCrossing=2e3;constructor(e){super({greedyMultiplier:jeo,rippingEnabled:!0,...e}),this.ripCost=e.ripCost??this.ripCost,this.portUsagePenalty=e.portUsagePenalty??this.portUsagePenalty,this.crossingPenalty=e.crossingPenalty??this.crossingPenalty,this.baseMaxIterations=e.baseMaxIterations??this.baseMaxIterations,this.additionalMaxIterationsPerConnection=e.additionalMaxIterationsPerConnection??this.additionalMaxIterationsPerConnection;const n=(function(o,i){if(i.length<2)return 0;let r=1/0,s=-1/0,a=1/0,A=-1/0;for(const h of o.regions){const d=h;d.d?.bounds?(r=Math.min(r,d.d.bounds.minX),s=Math.max(s,d.d.bounds.maxX),a=Math.min(a,d.d.bounds.minY),A=Math.max(A,d.d.bounds.maxY)):d.d?.center&&(r=Math.min(r,d.d.center.x),s=Math.max(s,d.d.center.x),a=Math.min(a,d.d.center.y),A=Math.max(A,d.d.center.y))}const c=new Map;for(const h of o.regions){const d=h;d.d?.center&&c.set(h.regionId,d.d.center)}const l=[],u=2*(s-r)+2*(A-a);for(const h of i){let d,p;if("startRegion"in h&&h.startRegion){const f=h.startRegion,I=h.endRegion;d=f.d?.center,p=I.d?.center}else"startRegionId"in h&&(d=c.get(h.startRegionId),p=c.get(h.endRegionId));if(!d||!p)continue;const m=h6e(d,r,s,a,A),_=h6e(p,r,s,a,A);l.push([m,_])}let g=0;for(let h=0;h<l.length;h++)for(let d=h+1;d<l.length;d++)m6e(l[h],l[d],u)&&g++;return g})(this.graph,e.inputConnections);this.MAX_ITERATIONS=this.baseMaxIterations+e.inputConnections.length*this.additionalMaxIterationsPerConnection+n*this.additionalMaxIterationsPerCrossing,this.populateDistanceToEndMaps()}populateDistanceToEndMaps(){const e=new Set(this.connections.map(n=>n.endRegion));for(const n of e){const o=new Map,i=[];for(o.set(n.regionId,0),i.push({region:n,distance:0});i.length>0;){const{region:r,distance:s}=i.shift();for(const a of r.ports){const A=a.region1===r?a.region2:a.region1;o.has(A.regionId)||(o.set(A.regionId,s+1),i.push({region:A,distance:s+1}))}}for(const r of this.graph.ports){r.distanceToEndMap||(r.distanceToEndMap={});const s=o.get(r.region1.regionId)??1/0,a=o.get(r.region2.regionId)??1/0;r.distanceToEndMap[n.regionId]=Math.min(s,a)}}}estimateCostToEnd(e){const n=this.currentEndRegion.regionId;return e.distanceToEndMap[n]}getPortUsagePenalty(e){const n=e.ripCount??0;return n*this.portUsagePenalty+n*this.portUsagePenaltySq}isTransitionAllowed(e,n,o){if(!e.d.isPad)return!0;const i=r=>!!(r.region1===e?r.region2:r.region1).d.isThroughJumper;return i(n)||i(o)}computeIncreasedRegionCostIfPortsAreUsed(e,n,o){if(e.d.isPad){const r=(e.assignments??[]).filter(s=>s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId).length;return r>0?r*this.crossingPenalty+r*this.crossingPenaltySq:0}const i=(function(r,s,a){const A=R1t(r),c=[ZQ(s,r),ZQ(a,r)];let l=0;const u=r.assignments??[];for(const g of u)m6e(c,[ZQ(g.regionPort1,r),ZQ(g.regionPort2,r)],A)&&l++;return l})(e,n,o);return i*this.crossingPenalty+i*this.crossingPenaltySq}getRipsRequiredForPortUsage(e,n,o){if(e.d.isPad)return(e.assignments??[]).filter(s=>s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId);const i=(function(s,a,A){const c=R1t(s),l=[ZQ(a,s),ZQ(A,s)],u=[],g=s.assignments??[];for(const h of g)m6e(l,[ZQ(h.regionPort1,s),ZQ(h.regionPort2,s)],c)&&u.push(h);return u})(e,n,o),r=i.filter(s=>s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId);if(!e.d.isThroughJumper)return r;for(const s of e.assignments??[])s.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId&&r.push(s);return r}isRipRequiredForPortUsage(e,n,o){if(!e.d.isThroughJumper&&!e.d.isPad)return!1;for(const i of e.assignments??[])if(i.connection.mutuallyConnectedNetworkId!==this.currentConnection.mutuallyConnectedNetworkId)return!0;return!1}routeSolvedHook(e){}routeStartedHook(e){}visualize(){return Ueo(this)}},qeo={padWidth:.8,outerPadHeight:.5,innerPadHeight:.4,leftPadCenterX:-.9,rightPadCenterX:.9,row1CenterY:-1.2,row2CenterY:-.4,row3CenterY:.4,row4CenterY:1.2},Xeo=({cols:t,rows:e,marginX:n,marginY:o,innerColChannelPointCount:i=1,innerRowChannelPointCount:r=1,regionsBetweenPads:s=!1,outerPaddingX:a=.5,outerPaddingY:A=.5,outerChannelXPointCount:c,outerChannelYPointCount:l,orientation:u="vertical",center:g,bounds:h,parallelTracesUnderJumperCount:d=2})=>{const p=[],m=[],{padWidth:_,outerPadHeight:f,innerPadHeight:I,leftPadCenterX:C,rightPadCenterX:y,row1CenterY:x,row2CenterY:E,row3CenterY:B,row4CenterY:S}=qeo,Q=_/2,w=f/2,M=I/2,k=y-C+_,R=k+n,F=S-x+f,O=F+o;let U=a,Y=A;if(h){const _e=t*k+(t-1)*n,ue=e*F+(e-1)*o;U=((u==="horizontal"?h.maxY-h.minY:h.maxX-h.minX)-_e)/2,Y=((u==="horizontal"?h.maxX-h.minX:h.maxY-h.minY)-ue)/2}const W=c,te=l,j=[],J=[],oe=(_e,ue,fe,pe)=>({regionId:_e,ports:[],d:{bounds:ue,center:f6e(ue),isPad:fe,isThroughJumper:pe}}),ie=(_e,ue,fe)=>{const pe=ue.d.bounds,ye=fe.d.bounds;let Me,ve;Math.abs(pe.maxX-ye.minX)<.001?(Me=pe.maxX,ve=(Math.max(pe.minY,ye.minY)+Math.min(pe.maxY,ye.maxY))/2):Math.abs(pe.minX-ye.maxX)<.001?(Me=pe.minX,ve=(Math.max(pe.minY,ye.minY)+Math.min(pe.maxY,ye.maxY))/2):Math.abs(pe.maxY-ye.minY)<.001?(Me=(Math.max(pe.minX,ye.minX)+Math.min(pe.maxX,ye.maxX))/2,ve=pe.maxY):(Me=(Math.max(pe.minX,ye.minX)+Math.min(pe.maxX,ye.maxX))/2,ve=pe.minY);const he={portId:_e,region1:ue,region2:fe,d:{x:Me,y:ve}};return ue.ports.push(he),fe.ports.push(he),he},ne=(_e,ue,fe,pe)=>{if(pe<=0)return[];if(pe===1)return[ie(_e,ue,fe)];const ye=ue.d.bounds,Me=fe.d.bounds,ve=[];let he,Qe,Pe,we;Math.abs(ye.maxX-Me.minX)<.001?(he=!0,Qe=ye.maxX,Pe=Math.max(ye.minY,Me.minY),we=Math.min(ye.maxY,Me.maxY)):Math.abs(ye.minX-Me.maxX)<.001?(he=!0,Qe=ye.minX,Pe=Math.max(ye.minY,Me.minY),we=Math.min(ye.maxY,Me.maxY)):Math.abs(ye.maxY-Me.minY)<.001?(he=!1,Qe=ye.maxY,Pe=Math.max(ye.minX,Me.minX),we=Math.min(ye.maxX,Me.maxX)):(he=!1,Qe=ye.minY,Pe=Math.max(ye.minX,Me.minX),we=Math.min(ye.maxX,Me.maxX));for(let Te=0;Te<pe;Te++){const Re=Pe+(Te+.5)/pe*(we-Pe),Ee={portId:`${_e}:${Te}`,region1:ue,region2:fe,d:{x:he?Qe:Re,y:he?Re:Qe}};ue.ports.push(Ee),fe.ports.push(Ee),ve.push(Ee)}return ve};for(let _e=0;_e<e;_e++){j[_e]=[];for(let ue=0;ue<t;ue++){const fe=`cell_${_e}_${ue}`,pe=ue*R,ye=-_e*O,Me=pe+C,ve=ye+x,he=pe+C,Qe=ye+E,Pe=pe+C,we=ye+B,Te=pe+C,Re=ye+S,Ee=pe+y,ke=ye+S,Ce=pe+y,Le=ye+B,Ye=pe+y,tt=ye+E,At=pe+y,at=ye+x,nt=(zi,bi,Ar)=>({minX:zi-Q,maxX:zi+Q,minY:bi-Ar,maxY:bi+Ar}),gt=nt(Me,ve,w),bt=nt(he,Qe,M),Ct=nt(Pe,we,M),Dt=nt(Te,Re,w),kt=nt(Ee,ke,w),it=nt(Ce,Le,M),Yt=nt(Ye,tt,M),pn=nt(At,at,w),be={minX:gt.maxX,maxX:pn.minX,minY:gt.minY,maxY:Dt.maxY},et=.3,It={minX:Me,maxX:At,minY:ve-et/2,maxY:ve+et/2},Bt={minX:he,maxX:Ye,minY:Qe-et/2,maxY:Qe+et/2},mt={minX:Pe,maxX:Ce,minY:we-et/2,maxY:we+et/2},st={minX:Te,maxX:Ee,minY:Re-et/2,maxY:Re+et/2},xt=gt.minX,Xe=pn.maxX,Ze=gt.minY,dt=Dt.maxY,Ut=oe(`${fe}:pad1`,gt,!0),Wt=oe(`${fe}:pad2`,bt,!0),Xt=oe(`${fe}:pad3`,Ct,!0),Jt=oe(`${fe}:pad4`,Dt,!0),yn=oe(`${fe}:pad5`,kt,!0),An=oe(`${fe}:pad6`,it,!0),kn=oe(`${fe}:pad7`,Yt,!0),$n=oe(`${fe}:pad8`,pn,!0),ht=oe(`${fe}:underjumper`,be,!1),Kt=oe(`${fe}:throughjumper1`,It,!1,!0),rn=oe(`${fe}:throughjumper2`,Bt,!1,!0),Lt=oe(`${fe}:throughjumper3`,mt,!1,!0),Ho=oe(`${fe}:throughjumper4`,st,!1,!0);p.push(Ut,Wt,Xt,Jt,yn,An,kn,$n,ht,Kt,rn,Lt,Ho);const Ao=(Me+At)/2,qe=(ve+Re)/2;J.push({center:{x:Ao,y:qe},orientation:"vertical",padRegions:[Ut,Wt,Xt,Jt,yn,An,kn,$n]});let vt=null,qt=null,Zt=null,nn=null,zn=null,Nn=null;s&&(vt=oe(`${fe}:L-BP12`,{minX:gt.minX,maxX:gt.maxX,minY:gt.maxY,maxY:bt.minY},!1),qt=oe(`${fe}:L-BP23`,{minX:bt.minX,maxX:bt.maxX,minY:bt.maxY,maxY:Ct.minY},!1),Zt=oe(`${fe}:L-BP34`,{minX:Ct.minX,maxX:Ct.maxX,minY:Ct.maxY,maxY:Dt.minY},!1),nn=oe(`${fe}:R-BP87`,{minX:pn.minX,maxX:pn.maxX,minY:pn.maxY,maxY:Yt.minY},!1),zn=oe(`${fe}:R-BP76`,{minX:Yt.minX,maxX:Yt.maxX,minY:Yt.maxY,maxY:it.minY},!1),Nn=oe(`${fe}:R-BP65`,{minX:it.minX,maxX:it.maxX,minY:it.maxY,maxY:kt.minY},!1),p.push(vt,qt,Zt,nn,zn,Nn));const Co=ue===0,ei=_e===e-1,ro=ue===t-1;let To;ro?To=Xe+U:To=(ue+1)*R+C-Q;let yo=null;_e===0&&(yo=oe(`${fe}:T`,{minX:Co?xt-U:xt,maxX:To,minY:dt,maxY:dt+Y},!1),p.push(yo));let Ro=null;Ro=oe(`${fe}:B`,{minX:Co?xt-U:xt,maxX:To,minY:Ze-(ei?Y:o),maxY:Ze},!1),p.push(Ro);let On=null;Co&&(On=oe(`${fe}:L`,{minX:xt-U,maxX:xt,minY:Ze,maxY:dt},!1),p.push(On));const uo=oe(`${fe}:R`,{minX:Xe,maxX:To,minY:Ze,maxY:dt},!1);if(p.push(uo),j[_e][ue]={pad1:Ut,pad2:Wt,pad3:Xt,pad4:Jt,pad5:yn,pad6:An,pad7:kn,pad8:$n,underjumper:ht,throughjumper1:Kt,throughjumper2:rn,throughjumper3:Lt,throughjumper4:Ho,top:yo,bottom:Ro,left:On,right:uo,leftBP12:vt,leftBP23:qt,leftBP34:Zt,rightBP87:nn,rightBP76:zn,rightBP65:Nn},yo)if(On&&m.push(...ne(`${fe}:T-L`,yo,On,W)),m.push(...ne(`${fe}:T-R`,yo,uo,ro?W:i)),m.push(ie(`${fe}:T-P4`,yo,Jt)),m.push(ie(`${fe}:T-P5`,yo,yn)),s){const zi=ht.d.bounds,bi=(zi.maxX-zi.minX)/(d+1);for(let Ar=1;Ar<=d;Ar++){const ws={portId:`${fe}:T-UJ${Ar}`,region1:yo,region2:ht,d:{x:zi.minX+bi*Ar,y:zi.maxY}};yo.ports.push(ws),ht.ports.push(ws),m.push(ws)}}else m.push(ie(`${fe}:T-UJ`,yo,ht));if(Ro)if(On&&m.push(...ne(`${fe}:B-L`,Ro,On,W)),m.push(...ne(`${fe}:B-R`,Ro,uo,ro?W:i)),m.push(ie(`${fe}:B-P1`,Ro,Ut)),m.push(ie(`${fe}:B-P8`,Ro,$n)),s){const zi=ht.d.bounds,bi=(zi.maxX-zi.minX)/(d+1);for(let Ar=1;Ar<=d;Ar++){const ws={portId:`${fe}:B-UJ${Ar}`,region1:Ro,region2:ht,d:{x:zi.minX+bi*Ar,y:zi.minY}};Ro.ports.push(ws),ht.ports.push(ws),m.push(ws)}}else m.push(ie(`${fe}:B-UJ`,Ro,ht));On&&(m.push(ie(`${fe}:L-P1`,On,Ut)),m.push(ie(`${fe}:L-P2`,On,Wt)),m.push(ie(`${fe}:L-P3`,On,Xt)),m.push(ie(`${fe}:L-P4`,On,Jt))),m.push(ie(`${fe}:R-P5`,uo,yn)),m.push(ie(`${fe}:R-P6`,uo,An)),m.push(ie(`${fe}:R-P7`,uo,kn)),m.push(ie(`${fe}:R-P8`,uo,$n)),s&&(On&&(m.push(ie(`${fe}:L-BP12`,On,vt)),m.push(ie(`${fe}:L-BP23`,On,qt)),m.push(ie(`${fe}:L-BP34`,On,Zt))),m.push(ie(`${fe}:UJ-LBP12`,vt,ht)),m.push(ie(`${fe}:UJ-LBP23`,qt,ht)),m.push(ie(`${fe}:UJ-LBP34`,Zt,ht)),m.push(ie(`${fe}:R-BP87`,uo,nn)),m.push(ie(`${fe}:R-BP76`,uo,zn)),m.push(ie(`${fe}:R-BP65`,uo,Nn)),m.push(ie(`${fe}:UJ-RBP87`,nn,ht)),m.push(ie(`${fe}:UJ-RBP76`,zn,ht)),m.push(ie(`${fe}:UJ-RBP65`,Nn,ht)));const Oo={portId:`${fe}:TJ1-P1`,region1:Kt,region2:Ut,d:{x:Me,y:ve}};Kt.ports.push(Oo),Ut.ports.push(Oo),m.push(Oo);const ko={portId:`${fe}:TJ1-P8`,region1:Kt,region2:$n,d:{x:At,y:at}};Kt.ports.push(ko),$n.ports.push(ko),m.push(ko);const Ko={portId:`${fe}:TJ2-P2`,region1:rn,region2:Wt,d:{x:he,y:Qe}};rn.ports.push(Ko),Wt.ports.push(Ko),m.push(Ko);const mi={portId:`${fe}:TJ2-P7`,region1:rn,region2:kn,d:{x:Ye,y:tt}};rn.ports.push(mi),kn.ports.push(mi),m.push(mi);const Fo={portId:`${fe}:TJ3-P3`,region1:Lt,region2:Xt,d:{x:Pe,y:we}};Lt.ports.push(Fo),Xt.ports.push(Fo),m.push(Fo);const Nr={portId:`${fe}:TJ3-P6`,region1:Lt,region2:An,d:{x:Ce,y:Le}};Lt.ports.push(Nr),An.ports.push(Nr),m.push(Nr);const Rs={portId:`${fe}:TJ4-P4`,region1:Ho,region2:Jt,d:{x:Te,y:Re}};Ho.ports.push(Rs),Jt.ports.push(Rs),m.push(Rs);const ur={portId:`${fe}:TJ4-P5`,region1:Ho,region2:yn,d:{x:Ee,y:ke}};if(Ho.ports.push(ur),yn.ports.push(ur),m.push(ur),ue>0){const zi=j[_e][ue-1];m.push(ie(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:R-P1`,zi.right,Ut)),m.push(ie(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:R-P2`,zi.right,Wt)),m.push(ie(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:R-P3`,zi.right,Xt)),m.push(ie(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:R-P4`,zi.right,Jt)),s&&(m.push(ie(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:R-LBP12`,zi.right,vt)),m.push(ie(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:R-LBP23`,zi.right,qt)),m.push(ie(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:R-LBP34`,zi.right,Zt))),yo&&zi.top&&m.push(...ne(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:T-T`,zi.top,yo,te)),Ro&&zi.bottom&&m.push(...ne(`cell_${_e}_${ue-1}->cell_${_e}_${ue}:B-B`,zi.bottom,Ro,ei?te:r))}if(_e>0){const zi=j[_e-1][ue];if(On&&m.push(...ne(`cell_${_e-1}_${ue}->cell_${_e}_${ue}:B-L`,zi.bottom,On,W)),m.push(ie(`cell_${_e-1}_${ue}->cell_${_e}_${ue}:B-P4`,zi.bottom,Jt)),s){const bi=ht.d.bounds,Ar=(bi.maxX-bi.minX)/(d+1);for(let ws=1;ws<=d;ws++){const ds=bi.minX+Ar*ws,Et={portId:`cell_${_e-1}_${ue}->cell_${_e}_${ue}:B-UJ${ws}`,region1:zi.bottom,region2:ht,d:{x:ds,y:bi.maxY}};zi.bottom.ports.push(Et),ht.ports.push(Et),m.push(Et)}}else m.push(ie(`cell_${_e-1}_${ue}->cell_${_e}_${ue}:B-UJ`,zi.bottom,ht));m.push(ie(`cell_${_e-1}_${ue}->cell_${_e}_${ue}:B-P5`,zi.bottom,yn)),m.push(...ne(`cell_${_e-1}_${ue}->cell_${_e}_${ue}:B-R`,zi.bottom,uo,ro?W:i))}}}let le={regions:p,ports:m,jumperLocations:J};const ge=u==="horizontal";if(ge||g!==void 0||h!==void 0){const _e=k1t(le.regions),ue=f6e(_e),fe=[];let pe;pe=g||(h?f6e(h):ue),fe.push(Pae(pe.x,pe.y)),ge&&fe.push((function(Me,ve,he){const Qe=Geo(Me),Pe=Yeo(Me),we={a:Qe,c:-Pe,e:0,b:Pe,d:Qe,f:0};return G1t(ve)||G1t(he)?we:_6e([Pae(ve,he),we,Pae(-ve,-he)])})(-Math.PI/2)),fe.push(Pae(-ue.x,-ue.y));const ye=(function(...Me){return _6e(...Me)})(...fe);le=Y1t(le,ye)}return le},U1t=!0,eJ={CCW:-1,CW:1,NOT_ORIENTABLE:0},Zeo=2*Math.PI,Mae=Object.freeze({__proto__:null,BOUNDARY:2,CCW:U1t,CONTAINS:3,CW:!1,END_VERTEX:2,INSIDE:1,INTERLACE:4,NOT_VERTEX:0,ORIENTATION:eJ,OUTSIDE:0,OVERLAP_OPPOSITE:2,OVERLAP_SAME:1,PIx2:Zeo,START_VERTEX:1}),u7=1e-6;function K1t(t){u7=t}function V1t(){return u7}function C6e(t){return t<u7&&t>-u7}function UD(t,e){return t-e<u7&&t-e>-u7}function z1t(t,e){return t-e>u7}function J1t(t,e){return t-e<-u7}var Ve={Utils:Object.freeze({__proto__:null,DECIMALS:3,EQ:UD,EQ_0:C6e,GE:function(t,e){return t-e>-u7},GT:z1t,LE:function(t,e){return t-e<u7},LT:J1t,getTolerance:V1t,setTolerance:K1t}),Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in Mae)Ve[t]=Mae[t];Object.defineProperty(Ve,"DP_TOL",{get:function(){return V1t()},set:function(t){K1t(t)}});var ld=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}};Ve.Errors=ld;var y6e=class{constructor(e,n){this.first=e,this.last=n||this.first}[Symbol.iterator](){let e;return{next:()=>(e=e?e.next:this.first,{value:e,done:e===void 0})}}get size(){let e=0;for(let n of this)e++;return e}toArray(e=void 0,n=void 0){let o=[],i=e||this.first,r=n||this.last,s=i;if(s===void 0)return o;do o.push(s),s=s.next;while(s!==r.next);return o}append(e){return this.isEmpty()?this.first=e:(e.prev=this.last,this.last.next=e),this.last=e,this.last.next=void 0,this.first.prev=void 0,this}insert(e,n){if(this.isEmpty())this.first=e,this.last=e;else if(n==null)e.next=this.first,this.first.prev=e,this.first=e;else{let o=n.next;n.next=e,o&&(o.prev=e),e.prev=n,e.next=o,this.last===n&&(this.last=e)}return this.last.next=void 0,this.first.prev=void 0,this}remove(e){return e===this.first&&e===this.last?(this.first=void 0,this.last=void 0):(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this.first&&(this.first=e.next),e===this.last&&(this.last=e.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(e){let n=e,o=e;do{if(n!=e&&n===o)throw ld.INFINITE_LOOP;n=n.next,o=o.next.next}while(n!=e)}},W1t={stroke:"black"},eto=class{constructor(t=W1t){for(const e in t)this[e]=t[e];this.stroke=t.stroke??W1t.stroke}toAttributesString(){return Object.keys(this).reduce((t,e)=>t+(this[e]!==void 0?this.toAttrString(e,this[e]):""),"")}toAttrString(t,e){const n=t==="className"?"class":this.convertCamelToKebabCase(t);return e===null?`${n} `:`${n}="${e.toString()}" `}convertCamelToKebabCase(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}};function KD(t){return new eto(t).toAttributesString()}function cL(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ve.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ve.Point(g,h))}return n}function VD(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ve.Utils.EQ(i,e.r))n.push(o);else if(Ve.Utils.LT(i,e.r)){let r,s,a=Math.sqrt(e.r*e.r-i*i);r=t.norm.rotate90CCW().multiply(a),s=o.translate(r),n.push(s),r=t.norm.rotate90CW().multiply(a),s=o.translate(r),n.push(s)}return n}function lL(t,e){let n=[];for(let o of e.toSegments()){let i=tJ(o,t);for(let r of i)iIt(r,n)||n.push(r)}return n}function Dae(t,e){let n=[];if(lL(t,e.box).length===0)return n;let o=VD(t,new Ve.Circle(e.pc,e.r));for(let i of o)i.on(e)&&n.push(i);return n}function tJ(t,e){let n=[];return t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e)?n:cL(new Ve.Line(t.ps,t.pe),e)}function Nae(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new Ve.Line(t.ps,t.pe),i=new Ve.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),!e.ps.on(t)||e.ps.equalTo(t.ps)||e.ps.equalTo(t.pe)||n.push(e.ps),!e.pe.on(t)||e.pe.equalTo(t.ps)||e.pe.equalTo(t.pe)||n.push(e.pe);else{let r=cL(o,i);r.length>0&&j1t(r[0],t)&&j1t(r[0],e)&&n.push(r[0])}return n}function j1t(t,e){const n=e.box;return Ve.Utils.LE(t.x,n.xmax)&&Ve.Utils.GE(t.x,n.xmin)&&Ve.Utils.LE(t.y,n.ymax)&&Ve.Utils.GE(t.y,n.ymin)}function Rae(t,e){let n=[];if(t.isZeroLength()){let[i,r]=t.ps.distanceTo(e.pc);return Ve.Utils.EQ(i,e.r)&&n.push(t.ps),n}let o=VD(new Ve.Line(t.ps,t.pe),e);for(let i of o)i.on(t)&&n.push(i);return n}function uL(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=VD(new Ve.Line(t.ps,t.pe),new Ve.Circle(e.pc,e.r));for(let i of o)i.on(t)&&i.on(e)&&n.push(i);return n}function $1t(t,e){let n=[],o=new Ve.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ve.Utils.EQ_0(i)||Ve.Utils.EQ_0(r))return n;if(Ve.Utils.EQ_0(o.x)&&Ve.Utils.EQ_0(o.y)&&Ve.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s,a=t.pc.distanceTo(e.pc)[0];if(Ve.Utils.GT(a,i+r)||Ve.Utils.LT(a,Math.abs(i-r)))return n;if(o.x/=a,o.y/=a,Ve.Utils.EQ(a,i+r)||Ve.Utils.EQ(a,Math.abs(i-r)))return s=t.pc.translate(i*o.x,i*o.y),n.push(s),n;let A=i*i/(2*a)-r*r/(2*a)+a/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return s=c.translate(o.rotate90CCW().multiply(l)),n.push(s),s=c.translate(o.rotate90CW().multiply(l)),n.push(s),n}function q1t(t,e){let n=[];if(t.pc.equalTo(e.pc)&&Ve.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new Ve.Circle(t.pc,t.r),i=new Ve.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)&&s.on(e)&&n.push(s);return n}function x6e(t,e){let n=[];if(e.pc.equalTo(t.pc)&&Ve.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=$1t(e,new Ve.Circle(t.pc,t.r));for(let i of o)i.on(t)&&n.push(i);return n}function X1t(t,e){return t.isSegment?Nae(t.shape,e):uL(e,t.shape)}function Z1t(t,e){return t.isSegment?uL(t.shape,e):q1t(t.shape,e)}function eIt(t,e){return t.isSegment?tJ(t.shape,e):Dae(e,t.shape)}function tto(t,e){return t.isSegment?Rae(t.shape,e):x6e(t.shape,e)}function E6e(t,e){let n=[];for(let o of e.edges)for(let i of X1t(o,t))n.push(i);return n}function B6e(t,e){let n=[];for(let o of e.edges)for(let i of Z1t(o,t))n.push(i);return n}function nJ(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of eIt(o,t))iIt(i,n)||n.push(i);return t.sortPoints(n)}function tIt(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of tto(o,t))n.push(i);return n}function nIt(t,e){return t.isSegment?X1t(e,t.shape):t.isArc?Z1t(e,t.shape):t.isLine?eIt(e,t.shape):t.isRay?(n=e,o=t.shape,n.isSegment?b6e(o,n.shape):S6e(o,n.shape)):[];var n,o}function oIt(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...nIt(t,i)];return n}function iIt(t,e){return e.some(n=>n.equalTo(t))}function nv(t){return new Ve.Line(t.start,t.norm)}function b6e(t,e){return tJ(e,nv(t)).filter(n=>t.contains(n))}function S6e(t,e){return Dae(nv(t),e).filter(n=>t.contains(n))}function rIt(t,e){return VD(nv(t),e).filter(n=>t.contains(n))}function sIt(t,e){return cL(nv(t),e).filter(n=>t.contains(n))}function aIt(t,e){return nJ(nv(t),e).filter(n=>t.contains(n))}function AIt(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw ld.UNSUPPORTED_SHAPE_TYPE}function gL(t,e){let n=[];for(let o of e)n=[...n,...AIt(t,o.shape)];return n}var zD=class zte extends y6e{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,i=s=>s instanceof Ve.Segment||s instanceof Ve.Arc||s instanceof Ve.Ray,r=s=>s instanceof Ve.Segment||s instanceof Ve.Arc;if(!(o===1&&(s=>s instanceof Ve.Segment||s instanceof Ve.Arc||s instanceof Ve.Ray||s instanceof Ve.Line)(n[0])||o>1&&i(n[0])&&i(n[o-1])&&n.slice(1,o-1).every(r)))throw Ve.Errors.ILLEGAL_PARAMETERS;this.isInfinite=n.some(s=>s instanceof Ve.Ray||s instanceof Ve.Line);for(let s of n){let a=new Ve.Edge(s);this.append(a)}this.setArcLength()}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new Ve.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new zte(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ve.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Point){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Line){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Circle){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Segment){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Arc){const[n,o]=Ve.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ve.Multiline)return Ve.Distance.multiline2multiline(this,e);throw Ve.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ve.Multiline?(function(n,o){let i=[];for(let r of n)for(let s of o)i=[...i,...AIt(r.shape,s.shape)];return i})(this,e):gL(e,this)}contains(e){if(e instanceof Ve.Point)return this.edges.some(n=>n.shape.contains(e));throw Ve.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new zte(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new Ve.Point){return new zte(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new Ve.Matrix){return new zte(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
<path ${KD({fill:"none",...e})} d="`;n+=`
M${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`" >
</path>`,n}};Ve.Multiline=zD;function dL(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;r=i[0]===null?0:i[1]===null?t.shape.length:i[0].length;let s,a=0;UD(r,0)&&(a|=1),UD(r,t.shape.length)&&(a|=2),s=r===1/0?i[0].coord(e):2&a&&t.next&&t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function oJ(t){t.int_points1_sorted=ov(t.int_points1),t.int_points2_sorted=ov(t.int_points2)}function ov(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(nto)}function nto(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function Q6e(t){if(t.int_points1.length<2)return;let e,n,o,i,r=!1;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a<t.int_points1_sorted.length&&(o=t.int_points1_sorted[a],UD(o.arc_length,e.arc_length));a++)o.id!==-1&&(i=t.int_points2[o.id],i.id!==-1&&o.edge_before===e.edge_before&&o.edge_after===e.edge_after&&i.edge_before===n.edge_before&&i.edge_after===n.edge_after&&(o.id=-1,i.id=-1,r=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!UD(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let A=t.int_points1[a.id];A.edge_before===e.edge_before&&A.edge_after===e.edge_after&&a.edge_before===n.edge_before&&a.edge_after===n.edge_after&&(A.id=-1,a.id=-1,r=!0)}r&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function v6e(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=2),e.edge_after&&(e.edge_after.bvStart=2)}function w6e(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function hL(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&o.face===n&&(i=t[s],i.pt.equalTo(o.pt)&&i.edge_before===o.edge_before&&i.edge_after===o.edge_after);s++)r++;return r}function pL(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=1),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=2),1&n.is_vertex){n.edge_before=o.prev,o.prev&&(n.is_vertex=2);continue}if(2&n.is_vertex)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof zD&&1&n.is_vertex&&(n.edge_after=t.first)}}function cIt(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}Ve.multiline=(...t)=>new Ve.Multiline(...t);var{INSIDE:g7,OUTSIDE:d7,BOUNDARY:jf,OVERLAP_SAME:oto,OVERLAP_OPPOSITE:ito}=Mae,{NOT_VERTEX:Ghr,START_VERTEX:lIt,END_VERTEX:uIt}=Mae;function P6e(t,e){let n=e.clone().reverse(),[o]=iJ(t,n,3,!0);return o}function gIt(t,e){let[n]=iJ(t,e,2,!0);return n}function dIt(t,e){let[n,o]=iJ(t,e,2,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=>a.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=>a.shape)];return[i,r]}function M6e(t,e){let[n]=iJ(t,e,3,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=>r.shape)];return o}function hIt(t,e){let n=t.clone(),o=e.clone(),i=pIt(n,o);return oJ(i),pL(n,i.int_points1_sorted),pL(o,i.int_points2_sorted),Q6e(i),oJ(i),[i.int_points1_sorted.map(r=>r.pt),i.int_points2_sorted.map(r=>r.pt)]}function rto(t,e,n,o){let i=mIt(t,n.int_points1),r=mIt(e,n.int_points2);for(_It(i,e),_It(r,t),v6e(n.int_points1),v6e(n.int_points2),w6e(n.int_points1,e),w6e(n.int_points2,t);sto(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,A,c,l=s.int_points1.length;for(let u=0;u<l;u++){let g=s.int_points1_sorted[u];g.face!==a&&(A=u,a=g.face);let h,d=u,p=hL(s.int_points1_sorted,u,a);h=d+p<l&&s.int_points1_sorted[d+p].face===a?d+p:A;let m=hL(s.int_points1_sorted,h,a);c=null;for(let E=h;E<h+m;E++){let B=s.int_points1_sorted[E];if(B.face===a&&s.int_points2[B.id].face===s.int_points2[g.id].face){c=B;break}}if(c===null)continue;let _=g.edge_after,f=c.edge_before;if(_.bv!==2||f.bv!==2||_!==f)continue;let I=s.int_points2[g.id],C=s.int_points2[c.id],y=I.edge_after,x=C.edge_before;y.bv===2&&x.bv===2&&y===x||(I=s.int_points2[c.id],C=s.int_points2[g.id],y=I.edge_after,x=C.edge_before),y.bv===2&&x.bv===2&&y===x&&_.setOverlap(y)}})(n),D6e(t,o,n.int_points1_sorted,!0),D6e(e,o,n.int_points2_sorted,!1),fIt(t,i,o,!0),fIt(e,r,o,!1)}function iJ(t,e,n,o){let i=t.clone(),r=e.clone(),s=pIt(i,r);return oJ(s),pL(i,s.int_points1_sorted),pL(r,s.int_points2_sorted),Q6e(s),oJ(s),rto(i,r,s,n),o&&(function(a,A,c){(function(l,u,g,h){for(let d of u.faces){for(let p of d)l.edges.add(p);h.find(p=>p.face===d)===void 0&&l.addFace(d.first,d.last)}})(a,A,0,c.int_points2),(function(l,u,g){if(g.int_points1.length!==0)for(let h=0;h<g.int_points1.length;h++){let d=g.int_points1[h],p=g.int_points2[h];if(d.edge_before!==void 0&&d.edge_after===void 0&&p.edge_before===void 0&&p.edge_after!==void 0&&(d.edge_before.next=p.edge_after,p.edge_after.prev=d.edge_before,d.edge_after=p.edge_after,p.edge_before=d.edge_before),p.edge_before!==void 0&&p.edge_after===void 0&&d.edge_before===void 0&&d.edge_after!==void 0&&(p.edge_before.next=d.edge_after,d.edge_after.prev=p.edge_before,p.edge_after=d.edge_after,d.edge_before=p.edge_before),d.edge_before!==void 0&&d.edge_after===void 0)for(let m of g.int_points1_sorted)m!==d&&m.edge_before===void 0&&m.edge_after!==void 0&&m.pt.equalTo(d.pt)&&(d.edge_before.next=m.edge_after,m.edge_after.prev=d.edge_before,d.edge_after=m.edge_after,m.edge_before=d.edge_before);if(p.edge_before!==void 0&&p.edge_after===void 0)for(let m of g.int_points2_sorted)m!==p&&m.edge_before===void 0&&m.edge_after!==void 0&&m.pt.equalTo(p.pt)&&(p.edge_before.next=m.edge_after,m.edge_after.prev=p.edge_before,p.edge_after=m.edge_after,m.edge_before=p.edge_before)}})(0,0,c),N6e(a,c.int_points1),N6e(A,c.int_points2),R6e(a,c.int_points1,c.int_points2),R6e(a,c.int_points2,c.int_points1)})(i,r,s),[i,r]}function pIt(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)dL(o,a,n.int_points1),dL(r,a,n.int_points2)}}return n}function mIt(t,e){let n=[];for(let o of t.faces)e.find(i=>i.face===o)||n.push(o);return n}function _It(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function sto(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u<c;u++){let g=o[u];g.face!==s&&(a=u,s=g.face);let h,d=u,p=hL(o,u,s);h=d+p<c&&o[d+p].face===s?d+p:a;let m=hL(o,h,s);A=null;for(let I=h;I<h+m;I++){let C=o[I];if(C.face===s&&i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv!==jf||f.bv==jf)if(_.bv==jf||f.bv!==jf){if(_.bv===jf&&f.bv===jf&&_!=f||_.bv===g7&&f.bv===d7||_.bv===d7&&f.bv===g7){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===jf&&f.bv===jf&&_!=f){let I,C=_.next;for(;C!=f;){if(C.bv!=jf){if(I===void 0)I=C.bv;else if(C.bv!=I)throw ld.UNRESOLVED_BOUNDARY_CONFLICT}C=C.next}I!=null&&(_.bv=I,f.bv=I);continue}if(_.bv===g7&&f.bv===d7||_.bv===d7&&f.bv===g7){let I=_;for(;I!=f;){if(I.bvStart===_.bv&&I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C<10*Ve.DP_TOL){dL(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex&lIt)x.edge_after=I,x.edge_before=I.prev,I.bvStart=jf,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex&uIt)x.edge_after=I.next,I.bvEnd=jf,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=jf,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);dL(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex&lIt)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex&uIt)B.edge_after=E.next;else{let S=i.find(w=>w.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S&&(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=jf,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=jf,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}oJ(r),l=!0;break}}I=I.next}if(l)break;throw ld.UNRESOLVED_BOUNDARY_CONFLICT}}else f.bv=_.bv;else _.bv=f.bv}return l}function D6e(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A<n.length;A++){if(s=n[A],s.face!==i&&(r=A,i=s.face),i.isEmpty())continue;let c,l=A,u=hL(n,A,i);c=l+u<n.length&&n[l+u].face===s.face?l+u:r,a=n[c];let g=c,h=hL(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===g7&&p.bv===g7&&e===1||d.bv===d7&&p.bv===d7&&e===2||(d.bv===d7||p.bv===d7)&&e===3&&!o||(d.bv===g7||p.bv===g7)&&e===3&&o||d.bv===jf&&p.bv===jf&&d.overlap&oto&&o||d.bv===jf&&p.bv===jf&&d.overlap&ito){t.removeChain(i,d,p);for(let m=l;m<l+u;m++)n[m].edge_after=void 0;for(let m=g;m<g+h;m++)n[m].edge_before=void 0}A+=u-1}}function N6e(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function R6e(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{y6e.testInfiniteLoop(i)}catch{throw ld.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function fIt(t,e,n,o){for(let i of e){let r=i.first.bv;(n===1&&r===g7||n===3&&r===g7&&o||n===3&&r===d7&&!o||n===2&&r===d7)&&t.deleteFace(i)}}var ato=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:hIt,innerClip:dIt,intersect:gIt,outerClip:M6e,removeNotRelevantChains:D6e,removeOldFaces:N6e,restoreFaces:R6e,subtract:P6e,unify:function(t,e){let[n]=iJ(t,e,1,!0);return n}}),Ato=RegExp("T.F..FFF.|T.F...F.."),cto=RegExp("T........|.T.......|...T.....|....T...."),lto=RegExp("FT.......|F..T.....|F...T...."),uto=RegExp("T.F..F..."),gto=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF..."),mL=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(e){this.m[0]=e}get I2B(){return this.m[1]}set I2B(e){this.m[1]=e}get I2E(){return this.m[2]}set I2E(e){this.m[2]=e}get B2I(){return this.m[3]}set B2I(e){this.m[3]=e}get B2B(){return this.m[4]}set B2B(e){this.m[4]=e}get B2E(){return this.m[5]}set B2E(e){this.m[5]=e}get E2I(){return this.m[6]}set E2I(e){this.m[6]=e}get E2B(){return this.m[7]}set E2B(e){this.m[7]=e}get E2E(){return this.m[8]}set E2E(e){this.m[8]=e}toString(){return this.m.map(e=>e instanceof Array&&e.length>0?"T":e instanceof Array&&e.length===0?"F":"*").join("")}equal(){return Ato.test(this.toString())}intersect(){return cto.test(this.toString())}touch(){return lto.test(this.toString())}inside(){return uto.test(this.toString())}covered(){return gto.test(this.toString())}};function rJ(t,e){let n,o=new Ve.Ray(e),i=new Ve.Line(o.pt,o.norm);const r=new Ve.Box(o.box.xmin-Ve.DP_TOL,o.box.ymin-Ve.DP_TOL,o.box.xmax+Ve.DP_TOL,o.box.ymax+Ve.DP_TOL);if(t.box.not_intersect(r))return Ve.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ve.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ve.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ve.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=>J1t(l.pt.x,u.pt.x)?-1:z1t(l.pt.x,u.pt.x)?1:l.face_index<u.face_index?-1:l.face_index>u.face_index?1:l.edge.arc_length<u.edge.arc_length?-1:l.edge.arc_length>u.edge.arc_length?1:0);let c=0;for(let l=0;l<A.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;C6e(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;C6e(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.edge.shape instanceof Ve.Segment)c++;else{let g=u.edge.shape.box;UD(u.pt.y,g.ymin)||UD(u.pt.y,g.ymax)||c++}}return n=c%2==1?1:0,n}function IIt(t,e){return _L(t,e).intersect()}function CIt(t,e){return _L(t,e).inside()}function yIt(t,e){return _L(t,e).covered()}function xIt(t,e){return yIt(e,t)}function _L(t,e){return t instanceof Ve.Line&&e instanceof Ve.Line?(function(n,o){let i=new mL,r=cL(n,o);return r.length===0?n.contains(o.pt)&&o.contains(n.pt)?(i.I2I=[n],i.I2E=[],i.E2I=[]):(i.I2I=[],i.I2E=[n],i.E2I=[o]):(i.I2I=r,i.I2E=n.split(r),i.E2I=o.split(r)),i})(t,e):t instanceof Ve.Line&&e instanceof Ve.Circle?(function(n,o){let i=new mL,r=VD(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new zD([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ve.Polygon([o.toArc()]).cutWithLine(n)}return i})(t,e):t instanceof Ve.Line&&e instanceof Ve.Box?(function(n,o){let i=new mL,r=lL(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new zD([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();o.toSegments().some(c=>c.contains(r[0])&&c.contains(r[1]))?(i.I2I=[],i.I2B=[A[1]],i.I2E=[A[0],A[2]],i.E2I=[o]):(i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ve.Polygon(o.toSegments()).cutWithLine(n))}return i})(t,e):t instanceof Ve.Line&&e instanceof Ve.Polygon?(function(n,o){let i=new mL,r=nJ(n,o),s=new zD([n]),a=r.length>0?r.slice():n.sortPoints(r);return s.split(a),[...s].forEach(A=>A.setInclusion(o)),i.I2I=[...s].filter(A=>A.bv===Ve.INSIDE).map(A=>A.shape),i.I2B=[...s].slice(1).map(A=>A.bv===Ve.BOUNDARY?A.shape:A.shape.start),i.I2E=[...s].filter(A=>A.bv===Ve.OUTSIDE).map(A=>A.shape),i.E2I=o.cutWithLine(n),i})(t,e):(t instanceof Ve.Segment||t instanceof Ve.Arc)&&e instanceof Ve.Polygon?EIt(t,e):(t instanceof Ve.Segment||t instanceof Ve.Arc)&&(e instanceof Ve.Circle||e instanceof Ve.Box)?EIt(t,new Ve.Polygon(e)):t instanceof Ve.Polygon&&e instanceof Ve.Polygon?Tae(t,e):(t instanceof Ve.Circle||t instanceof Ve.Box)&&(e instanceof Ve.Circle||e instanceof Ve.Box)?Tae(new Ve.Polygon(t),new Ve.Polygon(e)):(t instanceof Ve.Circle||t instanceof Ve.Box)&&e instanceof Ve.Polygon?Tae(new Ve.Polygon(t),e):t instanceof Ve.Polygon&&(e instanceof Ve.Circle||e instanceof Ve.Box)?Tae(t,new Ve.Polygon(e)):void 0}function EIt(t,e){let n=new mL,o=(function(s,a){return s instanceof Ve.Line?nJ(s,a):s instanceof Ve.Segment?E6e(s,a):s instanceof Ve.Arc?B6e(s,a):[]})(t,e),i=o.length>0?o.slice():t.sortPoints(o),r=new zD([t]);r.split(i),[...r].forEach(s=>s.setInclusion(e)),n.I2I=[...r].filter(s=>s.bv===Ve.INSIDE).map(s=>s.shape),n.I2B=[...r].slice(1).map(s=>s.bv===Ve.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=>s.bv===Ve.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(rJ(e,s)){case Ve.INSIDE:n.B2I.push(s);break;case Ve.BOUNDARY:n.B2B.push(s);break;case Ve.OUTSIDE:n.B2E.push(s)}return n}function Tae(t,e){let n=new mL,[o,i]=hIt(t,e),r=gIt(t,e),s=P6e(t,e),a=P6e(e,t),[A,c]=dIt(t,e),l=M6e(t,e),u=M6e(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var dto=Object.freeze({__proto__:null,contain:function(t,e){return CIt(e,t)},cover:xIt,covered:yIt,disjoint:function(t,e){return!IIt(t,e)},equal:function(t,e){return _L(t,e).equal()},inside:CIt,intersect:IIt,relate:_L,touch:function(t,e){return _L(t,e).touch()}}),sJ=class Tk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new Tk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new Tk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new Tk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw ld.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new Tk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new Tk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new Tk(e,0,0,n,0,0))}equalTo(e){return!!Ve.Utils.EQ(this.tx,e.tx)&&!!Ve.Utils.EQ(this.ty,e.ty)&&!!Ve.Utils.EQ(this.a,e.a)&&!!Ve.Utils.EQ(this.b,e.b)&&!!Ve.Utils.EQ(this.c,e.c)&&!!Ve.Utils.EQ(this.d,e.d)}};Ve.Matrix=sJ,Ve.matrix=(...t)=>new Ve.Matrix(...t);var hto=class{constructor(e,n){this.low=e,this.high=n}get max(){return this.clone()}less_than(e){return this.low<e.low||this.low===e.low&&this.high<e.high}equal_to(e){return this.low===e.low&&this.high===e.high}intersect(e){return!this.not_intersect(e)}not_intersect(e){return this.high<e.low||e.high<this.low}merge(e){const n=this.low===void 0?e.low:this.low<e.low?this.low:e.low,o=this.high===void 0?e.high:this.high>e.high?this.high:e.high,i=this.clone();return i.low=n,i.high=o,i}output(){return[this.low,this.high]}comparable_less_than(e,n){return e<n}},pto=class t5n extends hto{clone(){return new t5n(this.low,this.high)}},iv=class{constructor(e,n,o=null,i=null,r=null,s=0){if(this.left=o,this.right=i,this.parent=r,this.color=s,this.item={key:void 0,values:[]},n!==void 0&&this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,A]=e;if(!Number.isNaN(a)&&!Number.isNaN(A)){let c=a,l=A;c>l&&([c,l]=[l,c]),this.item.key=new pto(c,l)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===0}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n&&o&&n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(n,i.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(i.high,n)}},T6e=class n5n{constructor(){this.root=null,this.nil_node=new iv}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new iv(e));if(o)return o.item.values.push(n),o;const i=new iv(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new iv(e));return!!o&&(arguments.length<2||n===e||o.item.values.some(i=>i&&i.equal_to?i.equal_to(n):i===n))}remove(e,n=e){const o=this.tree_search(this.root,new iv(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=>r&&r.equal_to?r.equal_to(n):r===n);return i>=0?(o.item.values.splice(i,1),o.item.values.length===0&&this.tree_delete(o),o):void 0}search(e,n=(o,i)=>o===i?i.output():o){const o=new iv(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new iv(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new n5n;return this.tree_walk(this.root,o=>{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=>o===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new iv(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0&&this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root&&o.parent!=null&&o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0&&(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0&&(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null&&e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i&&i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:(o&&!i.less_than(o)||(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null&&i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1&&(n.left.color===0&&n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===0&&n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,i=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==i)throw new Error("Red-black height property violated");return n+=o,n}},mto=class extends Set{constructor(e){super(e),this.index=new T6e,this.forEach(n=>this.index.insert(n))}add(e){let n=this.size;const{key:o,value:i}=e,r=o||e.box,s=i||e;return super.add(s),this.size>n&&this.index.insert(r,s),this}delete(e){const{key:n,value:o}=e,i=n||e.box,r=o||e;let s=super.delete(r);return s&&this.index.remove(i,r),s}clear(){super.clear(),this.index=new T6e}search(e){return this.index.search(e)}hit(e){let n=new Ve.Box(e.x-1,e.y-1,e.x+1,e.y+1);return this.index.search(n).filter(o=>e.on(o))}svg(){return[...this].reduce((e,n)=>e+n.svg(),"")}};Ve.PlanarSet=mto;var rv=class{get name(){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...e){return this.transform(new sJ().translate(...e))}rotate(e,n=new Ve.Point){return this.transform(new sJ().rotate(e,n.x,n.y))}scale(e,n){return this.transform(new sJ().scale(e,n))}transform(...e){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(e={}){throw ld.CANNOT_INVOKE_ABSTRACT_METHOD}};Ve.Point=class o5n extends rv{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number")return this.x=n[0],void(this.y=n[1])}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1]);throw ld.ILLEGAL_PARAMETERS}}get box(){return new Ve.Box(this.x,this.y,this.x,this.y)}clone(){return new Ve.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ve.Utils.EQ(this.x,e.x)&&Ve.Utils.EQ(this.y,e.y)}lessThan(e){return!!Ve.Utils.LT(this.y,e.y)||!(!Ve.Utils.EQ(this.y,e.y)||!Ve.Utils.LT(this.x,e.x))}transform(e){return new Ve.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ve.Vector(this,e.pt);if(Ve.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ve.Vector(e.pt,this);return Ve.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof o5n){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ve.Segment(this,e)]}return e instanceof Ve.Line?Ve.Distance.point2line(this,e):e instanceof Ve.Circle?Ve.Distance.point2circle(this,e):e instanceof Ve.Segment?Ve.Distance.point2segment(this,e):e instanceof Ve.Arc?Ve.Distance.point2arc(this,e):e instanceof Ve.Polygon?Ve.Distance.point2polygon(this,e):e instanceof Ve.PlanarSet?Ve.Distance.shape2planarSet(this,e):e instanceof Ve.Multiline?Ve.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof Ve.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ve.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
<circle cx="${this.x}" cy="${this.y}" r="${n}"
            ${KD({fill:"red",...e})} />`}},Ve.point=(...t)=>new Ve.Point(...t),Ve.Vector=class extends rv{constructor(...t){if(super(),this.x=0,this.y=0,t.length!==0){if(t.length===1&&t[0]instanceof Array&&t[0].length===2){let e=t[0];if(typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1])}if(t.length===1&&t[0]instanceof Object&&t[0].name==="vector"){let{x:e,y:n}=t[0];return this.x=e,void(this.y=n)}if(t.length===1&&t[0]instanceof Object&&t[0].name==="segment"){let{start:e,end:n}=t[0];return this.x=n.x-e.x,void(this.y=n.y-e.y)}if(t.length===2){let e=t[0],n=t[1];if(typeof e=="number"&&typeof n=="number")return this.x=e,void(this.y=n);if(e instanceof Ve.Point&&n instanceof Ve.Point)return this.x=n.x-e.x,void(this.y=n.y-e.y)}throw ld.ILLEGAL_PARAMETERS}}clone(){return new Ve.Vector(this.x,this.y)}get slope(){let t=Math.atan2(this.y,this.x);return t<0&&(t=2*Math.PI+t),t}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ve.Utils.EQ_0(this.length)}equalTo(t){return Ve.Utils.EQ(this.x,t.x)&&Ve.Utils.EQ(this.y,t.y)}multiply(t){return new Ve.Vector(t*this.x,t*this.y)}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}normalize(){if(this.isZeroLength())throw ld.ZERO_DIVISION;return new Ve.Vector(this.x/this.length,this.y/this.length)}rotate(t,e=new Ve.Point){if(e.x===0&&e.y===0)return this.transform(new sJ().rotate(t));throw ld.OPERATION_IS_NOT_SUPPORTED}transform(t){return new Ve.Vector(t.transform([this.x,this.y]))}rotate90CCW(){return new Ve.Vector(-this.y,this.x)}rotate90CW(){return new Ve.Vector(this.y,-this.x)}invert(){return new Ve.Vector(-this.x,-this.y)}add(t){return new Ve.Vector(this.x+t.x,this.y+t.y)}subtract(t){return new Ve.Vector(this.x-t.x,this.y-t.y)}angleTo(t){let e=this.normalize(),n=t.normalize(),o=Math.atan2(e.cross(n),e.dot(n));return o<0&&(o+=2*Math.PI),o}projectionOn(t){let e=t.normalize(),n=this.dot(e);return e.multiply(n)}get name(){return"vector"}};var BIt=(...t)=>new Ve.Vector(...t);Ve.vector=BIt,Ve.Segment=class dit extends rv{constructor(...e){if(super(),this.ps=new Ve.Point,this.pe=new Ve.Point,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===4){let n=e[0];return this.ps=new Ve.Point(n[0],n[1]),void(this.pe=new Ve.Point(n[2],n[3]))}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{ps:n,pe:o}=e[0];return this.ps=new Ve.Point(n.x,n.y),void(this.pe=new Ve.Point(o.x,o.y))}if(!(e.length===1&&e[0]instanceof Ve.Point)){if(e.length===2&&e[0]instanceof Ve.Point&&e[1]instanceof Ve.Point)return this.ps=e[0].clone(),void(this.pe=e[1].clone());if(e.length===4)return this.ps=new Ve.Point(e[0],e[1]),void(this.pe=new Ve.Point(e[2],e[3]));throw ld.ILLEGAL_PARAMETERS}this.ps=e[0].clone()}}clone(){return new Ve.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ve.Vector(this.start,this.end).slope}get box(){return new Ve.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)&&this.pe.equalTo(e.pe)}contains(e){return Ve.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Line?tJ(this,e):e instanceof Ve.Ray?b6e(e,this):e instanceof Ve.Segment?Nae(this,e):e instanceof Ve.Circle?Rae(this,e):e instanceof Ve.Box?(function(n,o){let i=[];for(let r of o.toSegments()){let s=Nae(r,n);for(let a of s)i.push(a)}return i})(this,e):e instanceof Ve.Arc?uL(this,e):e instanceof Ve.Polygon?E6e(this,e):e instanceof Ve.Multiline?gL(this,e):void 0}distanceTo(e){if(e instanceof Ve.Point){let[n,o]=Ve.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Circle){let[n,o]=Ve.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ve.Line){let[n,o]=Ve.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ve.Segment){let[n,o]=Ve.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ve.Arc){let[n,o]=Ve.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ve.Polygon){let[n,o]=Ve.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ve.PlanarSet){let[n,o]=Ve.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ve.Multiline)return Ve.Distance.shape2multiline(this,e)}tangentInStart(){return new Ve.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ve.Vector(this.end,this.start).normalize()}reverse(){return new dit(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ve.Segment(this.start,e),new Ve.Segment(e,this.end)]}middle(){return new Ve.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e>this.length||e<0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ve.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ve.Distance.point2segment(e,this);return n}definiteIntegral(e=0){return(this.end.x-this.start.x)*(this.start.y-e+(this.end.y-e))/2}transform(e=new Ve.Matrix){return new dit(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ve.Line(this.start,this.end).sortPoints(e)}get name(){return"segment"}svg(e={}){return`
<line x1="${this.start.x}" y1="${this.start.y}" x2="${this.end.x}" y2="${this.end.y}" ${KD(e)} />`}},Ve.segment=(...t)=>new Ve.Segment(...t);var{vector:aJ}=Ve;Ve.Line=class i5n extends rv{constructor(...e){if(super(),this.pt=new Ve.Point,this.norm=new Ve.Vector(0,1),e.length!==0){if(e.length===1&&e[0]instanceof Object&&e[0].name==="line"){let{pt:n,norm:o}=e[0];return this.pt=new Ve.Point(n),void(this.norm=new Ve.Vector(o))}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ve.Point&&o instanceof Ve.Point)return this.pt=n,this.norm=i5n.points2norm(n,o),void(this.norm.dot(aJ(this.pt.x,this.pt.y))>=0&&this.norm.invert());if(n instanceof Ve.Point&&o instanceof Ve.Vector){if(Ve.Utils.EQ_0(o.x)&&Ve.Utils.EQ_0(o.y))throw ld.ILLEGAL_PARAMETERS;return this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(aJ(this.pt.x,this.pt.y))>=0&&this.norm.invert())}if(n instanceof Ve.Vector&&o instanceof Ve.Point){if(Ve.Utils.EQ_0(n.x)&&Ve.Utils.EQ_0(n.y))throw ld.ILLEGAL_PARAMETERS;return this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(aJ(this.pt.x,this.pt.y))>=0&&this.norm.invert())}}throw ld.ILLEGAL_PARAMETERS}}clone(){return new Ve.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ve.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ve.Vector(this.norm.y,-this.norm.x).slope}get standard(){return[this.norm.x,this.norm.y,this.norm.dot(aJ(this.pt.x,this.pt.y))]}parallelTo(e){return Ve.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)&&this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ve.Vector(this.pt,e);return Ve.Utils.EQ_0(this.norm.dot(n))}coord(e){return aJ(e.x,e.y).cross(this.norm)}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Line?cL(this,e):e instanceof Ve.Ray?sIt(e,this):e instanceof Ve.Circle?VD(this,e):e instanceof Ve.Box?lL(this,e):e instanceof Ve.Segment?tJ(e,this):e instanceof Ve.Arc?Dae(this,e):e instanceof Ve.Polygon?nJ(this,e):e instanceof Ve.Multiline?gL(this,e):void 0}distanceTo(e){if(e instanceof Ve.Point){let[n,o]=Ve.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Circle){let[n,o]=Ve.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Segment){let[n,o]=Ve.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ve.Arc){let[n,o]=Ve.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ve.Polygon){let[n,o]=Ve.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ve.Point)return[new Ve.Ray(e,this.norm),new Ve.Ray(e,this.norm)];{let n=new Ve.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ve.Point){return new Ve.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ve.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=>this.coord(n)<this.coord(o)?-1:this.coord(n)>this.coord(o)?1:0)}get name(){return"line"}svg(e,n={}){let o=lL(this,e);if(o.length===0)return"";let i=o[0],r=o.length===2?o[1]:o.find(s=>!s.equalTo(i));return r===void 0&&(r=i),new Ve.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw ld.ILLEGAL_PARAMETERS;return new Ve.Vector(e,n).normalize().rotate90CCW()}},Ve.line=(...t)=>new Ve.Line(...t),Ve.Circle=class extends rv{constructor(...t){if(super(),this.pc=new Ve.Point,this.r=1,t.length===1&&t[0]instanceof Object&&t[0].name==="circle"){let{pc:e,r:n}=t[0];this.pc=new Ve.Point(e),this.r=n}else{let[e,n]=[...t];e&&e instanceof Ve.Point&&(this.pc=e.clone()),n!==void 0&&(this.r=n)}}clone(){return new Ve.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ve.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(t){return t instanceof Ve.Point?Ve.Utils.LE(t.distanceTo(this.center)[0],this.r):t instanceof Ve.Segment?Ve.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&Ve.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ve.Arc?this.intersect(t).length===0&&Ve.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&Ve.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ve.Circle?this.intersect(t).length===0&&Ve.Utils.LE(t.r,this.r)&&Ve.Utils.LE(t.center.distanceTo(this.center)[0],this.r):void 0}toArc(t=!0){return new Ve.Arc(this.center,this.r,Math.PI,-Math.PI,t)}scale(t,e){if(t!==e||this.pc.x!==0||this.pc.y!==0)throw ld.OPERATION_IS_NOT_SUPPORTED;return new Ve.Circle(this.pc,this.r*t)}transform(t=new Ve.Matrix){return new Ve.Circle(this.pc.transform(t),this.r)}intersect(t){return t instanceof Ve.Point?this.contains(t)?[t]:[]:t instanceof Ve.Line?VD(t,this):t instanceof Ve.Ray?rIt(t,this):t instanceof Ve.Segment?Rae(t,this):t instanceof Ve.Circle?$1t(t,this):t instanceof Ve.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=Rae(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ve.Arc?x6e(t,this):t instanceof Ve.Polygon?tIt(this,t):t instanceof Ve.Multiline?gL(this,t):void 0}distanceTo(t){if(t instanceof Ve.Point){let[e,n]=Ve.Distance.point2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Circle){let[e,n]=Ve.Distance.circle2circle(this,t);return[e,n]}if(t instanceof Ve.Line){let[e,n]=Ve.Distance.circle2line(this,t);return[e,n]}if(t instanceof Ve.Segment){let[e,n]=Ve.Distance.segment2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Arc){let[e,n]=Ve.Distance.arc2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Polygon){let[e,n]=Ve.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ve.PlanarSet){let[e,n]=Ve.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ve.Multiline){let[e,n]=Ve.Distance.shape2multiline(this,t);return[e,n]}}get name(){return"circle"}svg(t={}){return`
<circle cx="${this.pc.x}" cy="${this.pc.y}" r="${this.r}"
                ${KD({fill:"none",...t})} />`}},Ve.circle=(...t)=>new Ve.Circle(...t),Ve.Arc=class extends rv{constructor(...t){if(super(),this.pc=new Ve.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,t.length!==0)if(t.length===1&&t[0]instanceof Object&&t[0].name==="arc"){let{pc:e,r:n,startAngle:o,endAngle:i,counterClockwise:r}=t[0];this.pc=new Ve.Point(e.x,e.y),this.r=n,this.startAngle=o,this.endAngle=i,this.counterClockwise=r}else{let[e,n,o,i,r]=[...t];e&&e instanceof Ve.Point&&(this.pc=e.clone()),n!==void 0&&(this.r=n),o!==void 0&&(this.startAngle=o),i!==void 0&&(this.endAngle=i),r!==void 0&&(this.counterClockwise=r)}}clone(){return new Ve.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let t=this.startAngle,e=this.endAngle;if(Ve.Utils.EQ(Math.abs(t-e),Ve.PIx2))return Ve.PIx2;Math.abs(t)>Ve.PIx2&&(t-=Math.trunc(t/Ve.PIx2)*Ve.PIx2),t<0&&(t+=Ve.PIx2),Math.abs(e)>Ve.PIx2&&(e-=Math.trunc(e/Ve.PIx2)*Ve.PIx2),e<0&&(e+=Ve.PIx2);let n=this.counterClockwise?e-t:t-e;return n<0&&(n+=Ve.PIx2),n}get start(){return new Ve.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ve.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let t=this.breakToFunctional().reduce((e,n)=>e.merge(n.start.box),new Ve.Box);return t=t.merge(this.end.box),t}contains(t){if(!Ve.Utils.EQ(this.pc.distanceTo(t)[0],this.r))return!1;if(t.equalTo(this.start))return!0;let e=new Ve.Vector(this.pc,t).slope,n=new Ve.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise);return Ve.Utils.LE(n.length,this.length)}split(t){if(this.start.equalTo(t))return[null,this.clone()];if(this.end.equalTo(t))return[this.clone(),null];let e=new Ve.Vector(this.pc,t).slope;return[new Ve.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise),new Ve.Arc(this.pc,this.r,e,this.endAngle,this.counterClockwise)]}middle(){let t=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ve.Arc(this.pc,this.r,this.startAngle,t,this.counterClockwise).end}pointAtLength(t){if(t>this.length||t<0)return null;if(t===0)return this.start;if(t===this.length)return this.end;let e=t/this.length,n=this.counterClockwise?this.startAngle+this.sweep*e:this.startAngle-this.sweep*e;return new Ve.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(t){return t instanceof Ve.Point?this.contains(t)?[t]:[]:t instanceof Ve.Line?Dae(t,this):t instanceof Ve.Ray?S6e(t,this):t instanceof Ve.Circle?x6e(this,t):t instanceof Ve.Segment?uL(t,this):t instanceof Ve.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=uL(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ve.Arc?q1t(this,t):t instanceof Ve.Polygon?B6e(this,t):t instanceof Ve.Multiline?gL(this,t):void 0}distanceTo(t){if(t instanceof Ve.Point){let[e,n]=Ve.Distance.point2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Circle){let[e,n]=Ve.Distance.arc2circle(this,t);return[e,n]}if(t instanceof Ve.Line){let[e,n]=Ve.Distance.arc2line(this,t);return[e,n]}if(t instanceof Ve.Segment){let[e,n]=Ve.Distance.segment2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ve.Arc){let[e,n]=Ve.Distance.arc2arc(this,t);return[e,n]}if(t instanceof Ve.Polygon){let[e,n]=Ve.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ve.PlanarSet){let[e,n]=Ve.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ve.Multiline)return Ve.Distance.shape2multiline(this,t)}breakToFunctional(){let t=[],e=[0,Math.PI/2,Math.PI,3*Math.PI/2],n=this.startAngle,o=this.endAngle;Ve.Utils.EQ(Math.abs(n-o),Ve.PIx2)&&(o=n),Math.abs(n)>Ve.PIx2&&(n-=Math.trunc(n/Ve.PIx2)*Ve.PIx2),n<0&&(n+=Ve.PIx2),Math.abs(o)>Ve.PIx2&&(o-=Math.trunc(o/Ve.PIx2)*Ve.PIx2),o<0&&(o+=Ve.PIx2);let i,r,s,a=n;this.counterClockwise?(r=Math.ceil(n/(Math.PI/2))%4,s=1):(r=Math.floor(n/(Math.PI/2))%4,s=-1);for(let A=0,c=r;A<4;A++,c=(c+s+4)%4){if(i=e[c],i===a)continue;let l=this.counterClockwise?i-n:n-i;if(l<0&&(l+=Ve.PIx2),l>this.sweep)break;t.push(new Ve.Arc(this.pc,this.r,a,i,this.counterClockwise)),a=i}return t.length===0?(t.push(this),t):(i=o,a!==i&&t.push(new Ve.Arc(this.pc,this.r,a,i,this.counterClockwise)),t)}tangentInStart(){let t=new Ve.Vector(this.pc,this.start),e=this.counterClockwise?Math.PI/2:-Math.PI/2;return t.rotate(e).normalize()}tangentInEnd(){let t=new Ve.Vector(this.pc,this.end),e=this.counterClockwise?-Math.PI/2:Math.PI/2;return t.rotate(e).normalize()}reverse(){return new Ve.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(t=new Ve.Matrix){let e=this.start.transform(t),n=this.end.transform(t),o=this.pc.transform(t),i=this.counterClockwise;return t.a*t.d<0&&(i=!i),Ve.Arc.arcSE(o,e,n,i)}static arcSE(t,e,n,o){let{vector:i}=Ve,r=i(t,e).slope,s=i(t,n).slope;Ve.Utils.EQ(r,s)&&(s+=2*Math.PI,o=!0);let a=i(t,e).length;return new Ve.Arc(t,a,r,s,o)}definiteIntegral(t=0){return this.breakToFunctional().reduce((e,n)=>e+n.circularSegmentDefiniteIntegral(t),0)}circularSegmentDefiniteIntegral(t){let e=new Ve.Segment(this.start,this.end).definiteIntegral(t),n=Ve.Utils.EQ(this.sweep,Ve.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?e-n:e+n}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(t){let{vector:e}=Ve;return t.slice().sort((n,o)=>{let i=e(this.pc,n).slope,r=e(this.pc,o).slope;return i<r?-1:i>r?1:0})}get name(){return"arc"}svg(t={}){let e=this.sweep<=Math.PI?"0":"1",n=this.counterClockwise?"1":"0";return Ve.Utils.EQ(this.sweep,2*Math.PI)?new Ve.Circle(this.pc,this.r).svg(t):`
<path d="M${this.start.x},${this.start.y}
                             A${this.r},${this.r} 0 ${e},${n} ${this.end.x},${this.end.y}"
                    ${KD({fill:"none",...t})} />`}},Ve.arc=(...t)=>new Ve.Arc(...t),Ve.Box=class Jte extends rv{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new Jte(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ve.Point(this.xmin,this.ymin)}get high(){return new Ve.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ve.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax<e.xmin||this.xmin>e.xmax||this.ymax<e.ymin||this.ymin>e.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new Jte(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!this.low.lessThan(e.low)||!(!this.low.equalTo(e.low)||!this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)&&this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e<=0?this.clone():new Jte(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ve.Point(this.xmin,this.ymin),new Ve.Point(this.xmax,this.ymin),new Ve.Point(this.xmax,this.ymax),new Ve.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ve.Segment(e[0],e[1]),new Ve.Segment(e[1],e[2]),new Ve.Segment(e[2],e[3]),new Ve.Segment(e[3],e[0])]}rotate(e,n=new Ve.Point){throw ld.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ve.Matrix){return this.toPoints().map(n=>n.transform(e)).reduce((n,o)=>n.merge(o.box),new Jte)}contains(e){return e instanceof Ve.Point?e.x>=this.xmin&&e.x<=this.xmax&&e.y>=this.ymin&&e.y<=this.ymax:e instanceof Ve.Segment?e.vertices.every(n=>this.contains(n)):e instanceof Ve.Box?e.toSegments().every(n=>this.contains(n)):e instanceof Ve.Circle?this.contains(e.box):e instanceof Ve.Arc?e.vertices.every(n=>this.contains(n))&&this.toSegments().every(n=>uL(n,e).length===0):!(e instanceof Ve.Line||e instanceof Ve.Ray)&&(e instanceof Ve.Multiline?e.toShapes().every(n=>this.contains(n)):e instanceof Ve.Polygon?this.contains(e.box):void 0)}distanceTo(e){const n=this.toSegments().map(i=>i.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=>{i[0]<o[0]&&(o=i)}),o}get name(){return"box"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`
<rect x="${this.xmin}" y="${this.ymin}" width="${n}" height="${o}"
                ${KD({fill:"none",...e})} />`}},Ve.box=(...t)=>new Ve.Box(...t),Ve.Edge=class{constructor(t){this.shape=t,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ve.Segment}get isArc(){return this.shape instanceof Ve.Arc}get isLine(){return this.shape instanceof Ve.Line}get isRay(){return this.shape instanceof Ve.Ray}middle(){return this.shape.middle()}pointAtLength(t){return this.shape.pointAtLength(t)}contains(t){return this.shape.contains(t)}setInclusion(t){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ve.Line||this.shape instanceof Ve.Ray)return this.bv=Ve.OUTSIDE,this.bv;if(this.bvStart===void 0&&(this.bvStart=rJ(t,this.start)),this.bvEnd===void 0&&(this.bvEnd=rJ(t,this.end)),this.bvStart===Ve.OUTSIDE||this.bvEnd==Ve.OUTSIDE)this.bv=Ve.OUTSIDE;else if(this.bvStart===Ve.INSIDE||this.bvEnd==Ve.INSIDE)this.bv=Ve.INSIDE;else{let e=rJ(t,this.middle());this.bv=e}return this.bv}setOverlap(t){let e,n=this.shape,o=t.shape;n instanceof Ve.Segment&&o instanceof Ve.Segment?n.start.equalTo(o.start)&&n.end.equalTo(o.end)?e=Ve.OVERLAP_SAME:n.start.equalTo(o.end)&&n.end.equalTo(o.start)&&(e=Ve.OVERLAP_OPPOSITE):(n instanceof Ve.Arc&&o instanceof Ve.Arc||n instanceof Ve.Segment&&o instanceof Ve.Arc||n instanceof Ve.Arc&&o instanceof Ve.Segment)&&(n.start.equalTo(o.start)&&n.end.equalTo(o.end)&&n.middle().equalTo(o.middle())?e=Ve.OVERLAP_SAME:n.start.equalTo(o.end)&&n.end.equalTo(o.start)&&n.middle().equalTo(o.middle())&&(e=Ve.OVERLAP_OPPOSITE)),this.overlap===void 0&&(this.overlap=e),t.overlap===void 0&&(t.overlap=e)}svg(){if(this.shape instanceof Ve.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ve.Arc){let t,e=this.shape,n=e.counterClockwise?"1":"0";if(Ve.Utils.EQ(e.sweep,2*Math.PI)){let o=e.counterClockwise?1:-1,i=new Ve.Arc(e.pc,e.r,e.startAngle,e.startAngle+o*Math.PI,e.counterClockwise),r=new Ve.Arc(e.pc,e.r,e.startAngle+o*Math.PI,e.endAngle,e.counterClockwise);return t="0",` A${i.r},${i.r} 0 ${t},${n} ${i.end.x},${i.end.y}
                    A${r.r},${r.r} 0 ${t},${n} ${r.end.x},${r.end.y}`}return t=e.sweep<=Math.PI?"0":"1",` A${e.r},${e.r} 0 ${t},${n} ${e.end.x},${e.end.y}`}}toJSON(){return this.shape.toJSON()}};var _to=class extends y6e{constructor(e,n){super(e,n),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let e;return{next:()=>{let n=e||this.first,o=!this.first||!!e&&e===this.first;return e=n?n.next:void 0,{value:n,done:o}}}}append(e){return super.append(e),this.setCircularLinks(),this}insert(e,n){return super.insert(e,n),this.setCircularLinks(),this}remove(e){return super.remove(e),this}};Ve.Face=class Wte extends _to{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=>i instanceof Ve.Point)){let i=Wte.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=>i instanceof Array&&i.length===2)){let i=o.map(s=>new Ve.Point(s[0],s[1])),r=Wte.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=>i instanceof Ve.Segment||i instanceof Ve.Arc))this.shapes2face(e.edges,o);else if(o.every(i=>i.name==="segment"||i.name==="arc")){let i=[];for(let r of o){let s;s=r.name==="segment"?new Ve.Segment(r):new Ve.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof Wte){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ve.Circle)this.shapes2face(e.edges,[n[0].toArc(U1t)]);else if(n[0]instanceof Ve.Box){let o=n[0];this.shapes2face(e.edges,[new Ve.Segment(new Ve.Point(o.xmin,o.ymin),new Ve.Point(o.xmax,o.ymin)),new Ve.Segment(new Ve.Point(o.xmax,o.ymin),new Ve.Point(o.xmax,o.ymax)),new Ve.Segment(new Ve.Point(o.xmax,o.ymax),new Ve.Point(o.xmin,o.ymax)),new Ve.Segment(new Ve.Point(o.xmin,o.ymax),new Ve.Point(o.xmin,o.ymin))])}}n.length===2&&n[0]instanceof Ve.Edge&&n[1]instanceof Ve.Edge&&(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=>e.shape.start.clone())}get shapes(){return this.edges.map(e=>e.shape.clone())}get box(){if(this._box===void 0){let e=new Ve.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e>this.perimeter||e<0)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o<e.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ve.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ve.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0&&(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ve.Utils.EQ_0(e)?this._orientation=eJ.NOT_ORIENTABLE:Ve.Utils.LT(e,0)?this._orientation=eJ.CCW:this._orientation=eJ.CW}return this._orientation}isSimple(e){return Wte.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ve.Segment&&a.shape instanceof Ve.Segment&&(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if((!c.equalTo(r.start)||!c.equalTo(a.end)||a!==r.prev)&&(!c.equalTo(r.end)||!c.equalTo(a.start)||a!==r.next)&&(i.push(c),o))break;if(i.length>0&&o)break}if(i.length>0&&o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)&&(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ve.Polygon(this.shapes)}toJSON(){return this.edges.map(e=>e.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=" z",e}},Ve.Ray=class r5n extends rv{constructor(...e){if(super(),this.pt=new Ve.Point,this.norm=new Ve.Vector(0,1),e.length!==0&&(e.length>=1&&e[0]instanceof Ve.Point&&(this.pt=e[0].clone()),e.length!==1)){if(!(e.length===2&&e[1]instanceof Ve.Vector))throw ld.ILLEGAL_PARAMETERS;this.norm=e[1].clone()}}clone(){return new r5n(this.pt,this.norm)}get slope(){return new Ve.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ve.Box(e>Math.PI/2&&e<3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e>=0&&e<=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e>=Math.PI/2&&e<=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e>=Math.PI&&e<=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ve.Vector(this.pt,e);return Ve.Utils.EQ_0(this.norm.dot(n))&&Ve.Utils.GE(n.cross(this.norm),0)}coord(e){return BIt(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ve.Segment(this.pt,e),new Ve.Ray(e,this.norm)]:[]}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Segment?b6e(this,e):e instanceof Ve.Arc?S6e(this,e):e instanceof Ve.Line?sIt(this,e):e instanceof Ve.Ray?(o=e,cL(nv(n=this),nv(o)).filter(i=>n.contains(i)).filter(i=>o.contains(i))):e instanceof Ve.Circle?rIt(this,e):e instanceof Ve.Box?(function(i,r){return lL(nv(i),r).filter(s=>i.contains(s))})(this,e):e instanceof Ve.Polygon?aIt(this,e):e instanceof Ve.Multiline?gL(this,e):void 0;var n,o}rotate(e,n=new Ve.Point){return new Ve.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ve.Ray(this.pt.transform(e),this.norm.clone())}get name(){return"ray"}svg(e,n={}){let o=lL(new Ve.Line(this.pt,this.norm),e);return o=o.filter(i=>this.contains(i)),o.length===0||o.length===2?"":new Ve.Segment(this.pt,o[0]).svg(n)}},Ve.ray=(...t)=>new Ve.Ray(...t),Ve.Polygon=class YM{constructor(){this.faces=new Ve.PlanarSet,this.edges=new Ve.PlanarSet;let e=[...arguments];if(e.length===1&&(e[0]instanceof Array&&e[0].length>0||e[0]instanceof Ve.Circle||e[0]instanceof Ve.Box)){let n=e[0];if(e[0]instanceof Array&&e[0].every(o=>o instanceof Array))if(n.every(o=>o instanceof Array&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"))this.faces.add(new Ve.Face(this,n));else for(let o of n)if(o instanceof Array&&o[0]instanceof Array&&o[0].every(i=>i instanceof Array&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"))for(let i of o)this.faces.add(new Ve.Face(this,i));else this.faces.add(new Ve.Face(this,o));else this.faces.add(new Ve.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=>e.merge(n.box),new Ve.Box)}get vertices(){return[...this.faces].flatMap(e=>e.vertices)}clone(){let e=new YM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new YM;return e.forEach(o=>[...o.faces].forEach(i=>n.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=>n+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ve.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next!==n){for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}else this.deleteFace(e)}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ve.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e&&(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const n=this.splitToIslands().flatMap(o=>o._cutSingleIsland(e)).filter(o=>o.isValid()&&o.isEmpty()===!1);return this.createFromArray(n)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i,r,s={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=nIt(a,A);for(let l of c)dL(a,l,s.int_points1),dL(A,l,s.int_points2)}if(s.int_points1.length===0)return n;s.int_points1_sorted=ov(s.int_points1),s.int_points2_sorted=ov(s.int_points2),pL(o,s.int_points1_sorted),pL(n,s.int_points2_sorted),Q6e(s),s.int_points1_sorted=ov(s.int_points1),s.int_points2_sorted=ov(s.int_points2),v6e(s.int_points1),w6e(s.int_points1,n);for(let a of s.int_points1_sorted)a.edge_before&&a.edge_after&&a.edge_before.bv===a.edge_after.bv&&(s.int_points2[a.id]=-1,a.id=-1);if(s.int_points1=s.int_points1.filter(a=>a.id>=0),s.int_points2=s.int_points2.filter(a=>a.id>=0),s.int_points1.forEach((a,A)=>{a.id=A}),s.int_points2.forEach((a,A)=>{a.id=A}),s.int_points1.length===0)return n;s.int_points1_sorted=ov(s.int_points1),s.int_points2_sorted=ov(s.int_points2);for(let a=1;a<s.int_points1_sorted.length;a++)if(r=s.int_points1_sorted[a],i=s.int_points1_sorted[a-1],r.edge_before&&r.edge_before.bv===1){let A=i.edge_after,c=r.edge_before,l=o.getChain(A,c);cIt(s.int_points2[i.id],s.int_points2[r.id],l),l.forEach(u=>n.edges.add(u)),l=l.reverse().map(u=>new Ve.Edge(u.shape.reverse()));for(let u=0;u<l.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];cIt(s.int_points2[r.id],s.int_points2[i.id],l),l.forEach(u=>n.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new zD([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=>r.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=>[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=>s.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size<=1)return this.clone();const e=this.splitToIslands(),n=new YM;return e.forEach(o=>{o.faces.forEach(i=>n.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?eJ.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=>{this.isOuter(n)&&e++}),e>1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ve.Point){let n=rJ(this,e);return n===1||n===2}return xIt(this,e)}distanceTo(e){if(e instanceof Ve.Point){let[n,o]=Ve.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Circle||e instanceof Ve.Line||e instanceof Ve.Segment||e instanceof Ve.Arc){let[n,o]=Ve.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ve.Polygon){let n,o,i=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let r of this.edges){let s=i[0];[n,o]=Ve.Distance.shape2planarSet(r.shape,e.edges,s),Ve.Utils.LT(n,s)&&(i=[n,o])}return i}}intersect(e){return e instanceof Ve.Point?this.contains(e)?[e]:[]:e instanceof Ve.Line?nJ(e,this):e instanceof Ve.Ray?aIt(e,this):e instanceof Ve.Circle?tIt(e,this):e instanceof Ve.Segment?E6e(e,this):e instanceof Ve.Arc?B6e(e,this):e instanceof Ve.Polygon?(function(n,o){let i=[];if(n.isEmpty()||o.isEmpty()||n.box.not_intersect(o.box))return i;for(let r of n.edges)i=[...i,...oIt(r,o)];return i})(e,this):e instanceof Ve.Multiline?(function(n,o){let i=[];if(o.isEmpty()||n.size===0)return i;for(let r of n)i=[...i,...oIt(r,o)];return i})(e,this):void 0}translate(e){let n=new YM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.translate(e)));return n}rotate(e=0,n=new Ve.Point){let o=new YM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.rotate(e,n)));return o}scale(e,n){let o=new YM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.scale(e,n)));return o}transform(e=new Ve.Matrix){let n=new YM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.transform(e)));return n}toJSON(){return[...this.faces].map(e=>e.toJSON())}toArray(){return[...this.faces].map(e=>e.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=>e+n.svg(),"")}svg(e={}){let n=`
<path ${KD({fillRule:"evenodd",fill:"lightcyan",...e})} d="`;for(let o of this.faces)n+=`
${o.svg()}`;return n+=`" >
</path>`,n}},Ve.polygon=(...t)=>new Ve.Polygon(...t);var{Circle:k6e,Line:bIt,Point:SIt,Vector:kae,Utils:F6e}=Ve;Ve.Inversion=class Kye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new kae(e.pc,n),i=e.r*e.r,r=o.dot(o);return F6e.EQ_0(r)?new SIt(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(F6e.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new kae(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new bIt(s,r)}{let i=new kae(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new k6e(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(F6e.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new kae(e.pc,i.end);return s=s.multiply(r/o),new k6e(e.pc.translate(s),r)}}inverse(e){return e instanceof SIt?Kye.inversePoint(this.circle,e):e instanceof k6e?Kye.inverseCircle(this.circle,e):e instanceof bIt?Kye.inverseLine(this.circle,e):void 0}},Ve.inversion=t=>new Ve.Inversion(t),Ve.Distance=class Tr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ve.Vector(e,o).length,new Ve.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ve.Utils.EQ_0(o))return[n.r,new Ve.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ve.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ve.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return Tr.point2point(e,n.start);let o,i,r=new Ve.Vector(n.start,n.end),s=new Ve.Vector(n.start,e),a=new Ve.Vector(n.end,e),A=r.dot(s),c=-r.dot(a);if(Ve.Utils.GE(A,0)&&Ve.Utils.GE(c,0)){let l=n.tangentInStart();return o=Math.abs(l.cross(s)),i=n.start.translate(l.multiply(l.dot(s))),[o,new Ve.Segment(e,i)]}return A<0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o,i,r=new Ve.Circle(n.pc,n.r),s=[];return[o,i]=Tr.point2circle(e,r),i.end.on(n)&&s.push(Tr.point2circle(e,r)),s.push(Tr.point2point(e,n.start)),s.push(Tr.point2point(e,n.end)),Tr.sort(s),s[0]}static point2edge(e,n){return n.shape instanceof Ve.Segment?Tr.point2segment(e,n.shape):Tr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let i=[];return i.push(Tr.point2line(e.start,n)),i.push(Tr.point2line(e.end,n)),Tr.sort(i),i[0]}static segment2segment(e,n){let o=Nae(e,n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let i,r,s=[];return[i,r]=Tr.point2segment(n.start,e),s.push([i,r.reverse()]),[i,r]=Tr.point2segment(n.end,e),s.push([i,r.reverse()]),s.push(Tr.point2segment(e.start,n)),s.push(Tr.point2segment(e.end,n)),Tr.sort(s),s[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Line(e.ps,e.pe),[r,s]=Tr.point2line(n.center,i);if(Ve.Utils.GE(r,n.r)&&s.end.on(e))return Tr.point2circle(s.end,n);{let[a,A]=Tr.point2circle(e.start,n),[c,l]=Tr.point2circle(e.end,n);return Ve.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Line(e.ps,e.pe),r=new Ve.Circle(n.pc,n.r),[s,a]=Tr.point2line(r.center,i);if(Ve.Utils.GE(s,r.r)&&a.end.on(e)){let[u,g]=Tr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A,c,l=[];return l.push(Tr.point2arc(e.start,n)),l.push(Tr.point2arc(e.end,n)),[A,c]=Tr.point2segment(n.start,e),l.push([A,c.reverse()]),[A,c]=Tr.point2segment(n.end,e),l.push([A,c.reverse()]),Tr.sort(l),l[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return Tr.point2point(i.start,r.start)}{let i=new Ve.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(Tr.point2point(r[0],s[0])),a.push(Tr.point2point(r[0],s[1])),a.push(Tr.point2point(r[1],s[0])),a.push(Tr.point2point(r[1],s[1])),Tr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let[i,r]=Tr.point2line(e.center,n),[s,a]=Tr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Circle(e.center,e.r),[r,s]=Tr.point2line(i.center,n);if(!Ve.Utils.GE(r,i.r)){let a=[];return a.push(Tr.point2line(e.start,n)),a.push(Tr.point2line(e.end,n)),Tr.sort(a),a[0]}{let[a,A]=Tr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Circle(e.center,e.r),[r,s]=Tr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(Tr.point2circle(e.start,n)),a.push(Tr.point2circle(e.end,n)),Tr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ve.Segment(o[0],o[0])];let i=new Ve.Circle(e.center,e.r),r=new Ve.Circle(n.center,n.r),[s,a]=Tr.circle2circle(i,r);if(a.start.on(e)&&a.end.on(n))return[s,a];{let A,c,l=[];return[A,c]=Tr.point2arc(e.start,n),c.end.on(n)&&l.push([A,c]),[A,c]=Tr.point2arc(e.end,n),c.end.on(n)&&l.push([A,c]),[A,c]=Tr.point2arc(n.start,e),c.end.on(e)&&l.push([A,c.reverse()]),[A,c]=Tr.point2arc(n.end,e),c.end.on(e)&&l.push([A,c.reverse()]),[A,c]=Tr.point2point(e.start,n.start),l.push([A,c]),[A,c]=Tr.point2point(e.start,n.end),l.push([A,c]),[A,c]=Tr.point2point(e.end,n.start),l.push([A,c]),[A,c]=Tr.point2point(e.end,n.end),l.push([A,c]),Tr.sort(l),l[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n.edges){let[r,s]=Tr.point2edge(e,i);Ve.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ve.Utils.LT(r,o[0])&&(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ve.Utils.LT(s,o[0])&&(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin;return[r,a*a+A*A]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let A of n){[r,s]=Tr.box2box_minmax(e.box,A.item.key);for(let c of A.item.values)c instanceof Ve.Edge?i.insert([r,s],c.shape):i.insert([r,s],c);Ve.Utils.LT(s,o)&&(o=s)}if(n.length===0)return o;let a=[...n.map(A=>A.left.isNil()?void 0:A.left).filter(A=>A!==void 0),...n.map(A=>A.right.isNil()?void 0:A.right).filter(A=>A!==void 0)].filter(A=>{let[c,l]=Tr.box2box_minmax(e.box,A.max);return Ve.Utils.LE(c,o)});return o=Tr.minmax_tree_process_level(e,a,o,i)}static minmax_tree(e,n,o){let i=new T6e,r=[n.index.root],s=o<Number.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=Tr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null&&!n.isNil()){if([i,r]=Tr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ve.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=Tr.distanceToArray(e,n.item.values);return Ve.Utils.LT(s,i[0])&&(i=[s,a]),[i,r]=Tr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ve.Segment],r=!1;if(n instanceof Ve.PlanarSet){let s=Tr.minmax_tree(e,n,o);[i,r]=Tr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=>Ve.Utils.LT(n[0],o[0])?-1:Ve.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ve.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of n){let[r,s]=Tr.distance(e,i.shape);Ve.Utils.LT(r,o[0])&&(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ve.Segment];for(let i of e)for(let r of n){let[s,a]=Tr.distance(i.shape,r.shape);Ve.Utils.LT(s,o[0])&&(o=[s,a])}return o}};var{Multiline:fto,Point:QIt,Segment:Ito,Polygon:vIt}=Ve;function L6e(t){return new QIt(t.split(" ").map(Number))}function wIt(t){return t.split(", ").map(L6e)}function H6e(t){const e=wIt(t);let n=[];for(let o=0;o<e.length-1;o++)n.push(new Ito(e[o],e[o+1]));return new fto(n)}function PIt(t){const e=t.replace(/\(\(/,"").replace(/\)\)$/,"").split("), ("),n=new vIt;let o;return e.forEach((i,r)=>{let s=i.split(", ").map(A=>new QIt(A.split(" ").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o&&a.reverse()}),n}function Cto(t){return t.startsWith("POLYGON")?PIt(t.replace(/^POLYGON /,"")):(function(e){const n=e.split(/\)\), \(\(/).map(i=>"(("+i+"))").map(PIt),o=new vIt;return n.reduce((i,r)=>[...i,...r?.faces],[]).forEach(i=>o.addFace([...i?.shapes])),o})(t.replace(/^MULTIPOLYGON \(\(\((.*)\)\)\)$/,"$1"))}function MIt(t){return t.split(`
`)?.every(e=>e.includes("POINT"))}function DIt(t){return t.split(`
`)?.every(e=>e.includes("LINESTRING"))}Ve.isWktString=function(t){return t.startsWith("POINT")||MIt(t)||t.startsWith("LINESTRING")||DIt(t)||t.startsWith("MULTILINESTRING")||t.startsWith("POLYGON")||t.startsWith("MULTIPOINT")||t.startsWith("MULTIPOLYGON")||t.startsWith("GEOMETRYCOLLECTION")},Ve.parseWKT=function t(e){if(e.startsWith("POINT"))return L6e(e.replace(/^POINT \(/,"").replace(/\)$/,""));if(e.startsWith("MULTIPOINT"))return wIt(e.replace(/^MULTIPOINT \(/,"").replace(/\)$/,""));if(e.startsWith("LINESTRING"))return H6e(e.replace(/^LINESTRING \(/,"").replace(/\)$/,""));if(e.startsWith("MULTILINESTRING"))return(function(n){return n.replace(/\(\(/,"").replace(/\)\)$/,"").split("), (").map(H6e)})(e.replace(/^MULTILINESTRING /,""));if(e.startsWith("POLYGON")||e.startsWith("MULTIPOLYGON"))return Cto(e);if(e.startsWith("GEOMETRYCOLLECTION")){const n=/(?<type>POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \((?:[^\(\)]|\([^\)]*\))*\)/g,o=e.match(n);return o[0].startsWith("GEOMETRYCOLLECTION")&&(o[0]=o[0].replace("GEOMETRYCOLLECTION (","")),o.map(t).map(i=>i instanceof Array?i:[i]).reduce((i,r)=>[...i,...r],[])}return MIt(e)?(function(n){return n.split(`
`).map(o=>o.match(/\(([^)]+)\)/)[1]).map(L6e)})(e):DIt(e)?(function(n){return n.split(`
`).map(o=>o.match(/\(([^)]+)\)/)[1]).map(H6e).reduce((o,i)=>[...o,...i],[])})(e):[]},Ve.BooleanOperations=ato,Ve.Relations=dto,JD=Deo(),NIt=1,O6e=JD!=null?yeo(Eeo(JD)):{},((t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of B1t(e))Beo.call(t,i)||i===n||E1t(t,i,{get:()=>e[i],enumerable:!(o=xeo(e,i))||o.enumerable})})(!NIt&&JD&&JD.__esModule?O6e:E1t(O6e,"default",{value:JD,enumerable:!0}),JD);var JD,NIt,O6e,yto=Object.create,RIt=Object.defineProperty,xto=Object.getOwnPropertyDescriptor,TIt=Object.getOwnPropertyNames,Eto=Object.getPrototypeOf,Bto=Object.prototype.hasOwnProperty,WD=(t,e)=>function(){return e||(0,t[TIt(t)[0]])((e={exports:{}}).exports,e),e.exports},kIt=(t,e,n)=>(n=t!=null?yto(Eto(t)):{},((o,i,r,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of TIt(i))Bto.call(o,a)||a===r||RIt(o,a,{get:()=>i[a],enumerable:!(s=xto(i,a))||s.enumerable});return o})(t&&t.__esModule?n:RIt(n,"default",{value:t,enumerable:!0}),t)),bto=WD({"node_modules/is-buffer/index.js"(t,e){function n(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}e.exports=function(o){return o!=null&&(n(o)||(function(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),Sto=WD({"node_modules/kind-of/index.js"(t,e){var n=bto(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return"undefined";if(i===null)return"null";if(i===!0||i===!1||i instanceof Boolean)return"boolean";if(typeof i=="string"||i instanceof String)return"string";if(typeof i=="number"||i instanceof Number)return"number";if(typeof i=="function"||i instanceof Function)return"function";if(Array.isArray!==void 0&&Array.isArray(i))return"array";if(i instanceof RegExp)return"regexp";if(i instanceof Date)return"date";var r=o.call(i);return r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":n(i)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object"}}}),Qto=WD({"node_modules/rename-keys/index.js"(t,e){(function(){function n(o,i){if(typeof i!="function")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[i(s,o[s])||s]=o[s]);return r}e!==void 0&&e.exports?e.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):window.rename=n})()}}),vto=WD({"node_modules/deep-rename-keys/index.js"(t,e){var n=Sto(),o=Qto();e.exports=function i(r,s){var a=n(r);if(a!=="object"&&a!=="array")throw new Error("expected an object");var A=[];for(var c in a==="object"&&(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)==="object"||n(l)==="array"?A[c]=i(l,s):A[c]=l}return A}}}),FIt=WD({"node_modules/eventemitter3/index.js"(t,e){var n=Object.prototype.hasOwnProperty,o="~";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)&&c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u<g;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once&&this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p<_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p<I;p++)switch(m[p].once&&this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f<_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l&&!g.once||c&&g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h<p;h++)(g[h].fn!==A||l&&!g[h].once||c&&g[h].context!==c)&&d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]&&(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0&&(e.exports=s)}}),wto=WD({"node_modules/xml-lexer/dist/lexer.js"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=FIt(),i=function(){},r={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},s={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},a={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},A={" ":s.space,"	":s.space,"\n":s.space,"\r":s.space,"<":s.lt,">":s.gt,'"':s.quote,"'":s.quote,"=":s.equal,"/":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x="",E="",B="",S="",Q="",w="",M=function(R,F){if(E[0]!=="?"&&E[0]!=="!"){var O={type:R,value:F};c.debug&&console.log("emit:",O),C.emit("data",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()&&M(a.text,x),E="",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)==="]]>"&&(M(a.text,x.slice(0,-3)),x="",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E="",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x="",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)==="![CDATA["&&(y=r.cdata,x="",E="")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x="",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x="",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(p,s.slash,function(){Q=!0,S="",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(m,s.char,function(R){S="",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S="",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=""),x="",y=r.data}),n(_,s.char,function(R){w="",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x="",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug&&console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O<F;O++)k(R[O])},C}}}}),Pto=WD({"node_modules/xml-reader/dist/reader.js"(t,e){var n=FIt(),o=wto(),i=o.Type,r={element:"element",text:"text"},s=function(A){return Object.assign({name:"",type:r.element,value:"",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream&&_===l&&(l.children=[],u.parent=null),A.emitTopLevelOnly&&_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit("tag",u.name,u)),u===l&&(c.removeAllListeners("data"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u&&u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]="";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on("data",d),l=s(),u=null,g="",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:":"});var l=a(c),u=void 0;return l.on("done",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}}),Mto=(kIt(vto()),kIt(Pto()),Object.create),LIt=Object.defineProperty,Dto=Object.getOwnPropertyDescriptor,HIt=Object.getOwnPropertyNames,Nto=Object.getPrototypeOf,Rto=Object.prototype.hasOwnProperty,jD=(t,e)=>function(){return e||(0,t[HIt(t)[0]])((e={exports:{}}).exports,e),e.exports},OIt=(t,e,n)=>(n=t!=null?Mto(Nto(t)):{},((o,i,r,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of HIt(i))Rto.call(o,a)||a===r||LIt(o,a,{get:()=>i[a],enumerable:!(s=Dto(i,a))||s.enumerable});return o})(t&&t.__esModule?n:LIt(n,"default",{value:t,enumerable:!0}),t)),Tto=jD({"node_modules/is-buffer/index.js"(t,e){function n(o){return!!o.constructor&&typeof o.constructor.isBuffer=="function"&&o.constructor.isBuffer(o)}e.exports=function(o){return o!=null&&(n(o)||(function(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&n(i.slice(0,0))})(o)||!!o._isBuffer)}}}),kto=jD({"node_modules/kind-of/index.js"(t,e){var n=Tto(),o=Object.prototype.toString;e.exports=function(i){if(i===void 0)return"undefined";if(i===null)return"null";if(i===!0||i===!1||i instanceof Boolean)return"boolean";if(typeof i=="string"||i instanceof String)return"string";if(typeof i=="number"||i instanceof Number)return"number";if(typeof i=="function"||i instanceof Function)return"function";if(Array.isArray!==void 0&&Array.isArray(i))return"array";if(i instanceof RegExp)return"regexp";if(i instanceof Date)return"date";var r=o.call(i);return r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":n(i)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object"}}}),Fto=jD({"node_modules/rename-keys/index.js"(t,e){(function(){function n(o,i){if(typeof i!="function")return o;var r={};for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[i(s,o[s])||s]=o[s]);return r}e!==void 0&&e.exports?e.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):window.rename=n})()}}),Lto=jD({"node_modules/deep-rename-keys/index.js"(t,e){var n=kto(),o=Fto();e.exports=function i(r,s){var a=n(r);if(a!=="object"&&a!=="array")throw new Error("expected an object");var A=[];for(var c in a==="object"&&(r=o(r,s),A={}),r)if(r.hasOwnProperty(c)){var l=r[c];n(l)==="object"||n(l)==="array"?A[c]=i(l,s):A[c]=l}return A}}}),GIt=jD({"node_modules/eventemitter3/index.js"(t,e){var n=Object.prototype.hasOwnProperty,o="~";function i(){}function r(a,A,c){this.fn=a,this.context=A,this.once=c||!1}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(o=!1)),s.prototype.eventNames=function(){var a,A,c=[];if(this._eventsCount===0)return c;for(A in a=this._events)n.call(a,A)&&c.push(o?A.slice(1):A);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},s.prototype.listeners=function(a,A){var c=o?o+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u<g;u++)h[u]=l[u].fn;return h},s.prototype.emit=function(a,A,c,l,u,g){var h=o?o+a:a;if(!this._events[h])return!1;var d,p,m=this._events[h],_=arguments.length;if(m.fn){switch(m.once&&this.removeListener(a,m.fn,void 0,!0),_){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,A),!0;case 3:return m.fn.call(m.context,A,c),!0;case 4:return m.fn.call(m.context,A,c,l),!0;case 5:return m.fn.call(m.context,A,c,l,u),!0;case 6:return m.fn.call(m.context,A,c,l,u,g),!0}for(p=1,d=new Array(_-1);p<_;p++)d[p-1]=arguments[p];m.fn.apply(m.context,d)}else{var f,I=m.length;for(p=0;p<I;p++)switch(m[p].once&&this.removeListener(a,m[p].fn,void 0,!0),_){case 1:m[p].fn.call(m[p].context);break;case 2:m[p].fn.call(m[p].context,A);break;case 3:m[p].fn.call(m[p].context,A,c);break;case 4:m[p].fn.call(m[p].context,A,c,l);break;default:if(!d)for(f=1,d=new Array(_-1);f<_;f++)d[f-1]=arguments[f];m[p].fn.apply(m[p].context,d)}}return!0},s.prototype.on=function(a,A,c){var l=new r(A,c||this),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.once=function(a,A,c){var l=new r(A,c||this,!0),u=o?o+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},s.prototype.removeListener=function(a,A,c,l){var u=o?o+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new i:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn!==A||l&&!g.once||c&&g.context!==c||(--this._eventsCount===0?this._events=new i:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h<p;h++)(g[h].fn!==A||l&&!g[h].once||c&&g[h].context!==c)&&d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new i:delete this._events[u]}return this},s.prototype.removeAllListeners=function(a){var A;return a?(A=o?o+a:a,this._events[A]&&(--this._eventsCount===0?this._events=new i:delete this._events[A])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=o,s.EventEmitter=s,e!==void 0&&(e.exports=s)}}),Hto=jD({"node_modules/xml-lexer/dist/lexer.js"(t,e){function n(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var o=GIt(),i=function(){},r={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},s={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},a={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},A={" ":s.space,"	":s.space,"\n":s.space,"\r":s.space,"<":s.lt,">":s.gt,'"':s.quote,"'":s.quote,"=":s.equal,"/":s.slash};e.exports={State:r,Action:s,Type:a,create:function(c){var l,u,g,h,d,p,m,_,f,I;c=Object.assign({debug:!1},c);var C=new o,y=r.data,x="",E="",B="",S="",Q="",w="",M=function(R,F){if(E[0]!=="?"&&E[0]!=="!"){var O={type:R,value:F};c.debug&&console.log("emit:",O),C.emit("data",O)}};C.stateMachine=(n(I={},r.data,(n(l={},s.lt,function(){x.trim()&&M(a.text,x),E="",Q=!1,y=r.tagBegin}),n(l,s.char,function(R){x+=R}),l)),n(I,r.cdata,n({},s.char,function(R){(x+=R).substr(-3)==="]]>"&&(M(a.text,x.slice(0,-3)),x="",y=r.data)})),n(I,r.tagBegin,(n(u={},s.space,i),n(u,s.char,function(R){E=R,y=r.tagName}),n(u,s.slash,function(){E="",Q=!0}),u)),n(I,r.tagName,(n(g={},s.space,function(){Q?y=r.tagEnd:(y=r.attributeNameStart,M(a.openTag,E))}),n(g,s.gt,function(){M(Q?a.closeTag:a.openTag,E),x="",y=r.data}),n(g,s.slash,function(){y=r.tagEnd,M(a.openTag,E)}),n(g,s.char,function(R){(E+=R)==="![CDATA["&&(y=r.cdata,x="",E="")}),g)),n(I,r.tagEnd,(n(h={},s.gt,function(){M(a.closeTag,E),x="",y=r.data}),n(h,s.char,i),h)),n(I,r.attributeNameStart,(n(d={},s.char,function(R){B=R,y=r.attributeName}),n(d,s.gt,function(){x="",y=r.data}),n(d,s.space,i),n(d,s.slash,function(){Q=!0,y=r.tagEnd}),d)),n(I,r.attributeName,(n(p={},s.space,function(){y=r.attributeNameEnd}),n(p,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(p,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(p,s.slash,function(){Q=!0,S="",M(a.attributeName,B),M(a.attributeValue,S),y=r.tagEnd}),n(p,s.char,function(R){B+=R}),p)),n(I,r.attributeNameEnd,(n(m={},s.space,i),n(m,s.equal,function(){M(a.attributeName,B),y=r.attributeValueBegin}),n(m,s.gt,function(){S="",M(a.attributeName,B),M(a.attributeValue,S),x="",y=r.data}),n(m,s.char,function(R){S="",M(a.attributeName,B),M(a.attributeValue,S),B=R,y=r.attributeName}),m)),n(I,r.attributeValueBegin,(n(_={},s.space,i),n(_,s.quote,function(R){w=R,S="",y=r.attributeValue}),n(_,s.gt,function(){M(a.attributeValue,S=""),x="",y=r.data}),n(_,s.char,function(R){w="",S=R,y=r.attributeValue}),_)),n(I,r.attributeValue,(n(f={},s.space,function(R){w?S+=R:(M(a.attributeValue,S),y=r.attributeNameStart)}),n(f,s.quote,function(R){w===R?(M(a.attributeValue,S),y=r.attributeNameStart):S+=R}),n(f,s.gt,function(R){w?S+=R:(M(a.attributeValue,S),x="",y=r.data)}),n(f,s.slash,function(R){w?S+=R:(M(a.attributeValue,S),Q=!0,y=r.tagEnd)}),n(f,s.char,function(R){S+=R}),f)),I);var k=function(R){c.debug&&console.log(y,R);var F=C.stateMachine[y],O=F[(function(U){return A[U]||s.char})(R)]||F[s.error]||F[s.char];O(R)};return C.write=function(R){for(var F=R.length,O=0;O<F;O++)k(R[O])},C}}}}),Oto=jD({"node_modules/xml-reader/dist/reader.js"(t,e){var n=GIt(),o=Hto(),i=o.Type,r={element:"element",text:"text"},s=function(A){return Object.assign({name:"",type:r.element,value:"",parent:null,attributes:{},children:[]},A)},a=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new n,d=function(p){switch(p.type){case i.openTag:if(u===null)(u=l).name=p.value;else{var m=s({name:p.value,parent:u});u.children.push(m),u=m}break;case i.closeTag:var _=u.parent;if(A.parentNodes||(u.parent=null),u.name!==p.value)break;A.stream&&_===l&&(l.children=[],u.parent=null),A.emitTopLevelOnly&&_!==l||(h.emit(A.tagPrefix+u.name,u),h.emit("tag",u.name,u)),u===l&&(c.removeAllListeners("data"),h.emit(A.doneEvent,u),l=null),u=_;break;case i.text:u&&u.children.push(s({type:r.text,value:p.value,parent:A.parentNodes?u:null}));break;case i.attributeName:g=p.value,u.attributes[g]="";break;case i.attributeValue:u.attributes[g]=p.value}};return h.reset=function(){(c=o.create({debug:A.debug})).on("data",d),l=s(),u=null,g="",h.parse=c.write},h.reset(),h};e.exports={parseSync:function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:":"});var l=a(c),u=void 0;return l.on("done",function(g){u=g}),l.parse(A),u},create:a,NodeType:r}}});OIt(Lto()),OIt(Oto());function G6e(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;return t}var AJ=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved&&this.iterations>=this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>=this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function Fae(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var Gto=class extends AJ{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null&&(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()&&(this.step(),!this.failed&&!this.solved););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??"none"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex>this.pipelineDef.findIndex(A=>A.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n&&(G6e(n,0),e=1);let o=null;this.solved&&(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=>{const a=this[r.solverName],A=a?.visualize();return A?(G6e(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved&&o&&(G6e(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=>r.points||[]),rects:i.flatMap(r=>r.rects||[]),lines:i.flatMap(r=>r.lines||[]),circles:i.flatMap(r=>r.circles||[]),texts:i.flatMap(r=>r.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},Y6e=(t,e,n)=>(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),YIt=(t,e)=>{const n=[...new Set(t)].map(r=>{const s=e[r];return s?{i:r,x:s.x,y:s.y}:null}).filter(r=>r!==null);if(n.sort((r,s)=>r.x-s.x||r.y-s.y),n.length<=2)return n.map(r=>r.i);const o=[],i=[];for(const r of n){for(;o.length>=2;){const s=o[o.length-2],a=o[o.length-1];if(!s||!a||Y6e(s,a,r)>1e-10)break;o.pop()}o.push(r)}for(let r=n.length-1;r>=0;r--){const s=n[r];if(s){for(;i.length>=2;){const a=i[i.length-2],A=i[i.length-1];if(!a||!A||Y6e(a,A,s)>1e-10)break;i.pop()}i.push(s)}}return o.pop(),i.pop(),o.concat(i).map(r=>r.i)},UIt=t=>t!==void 0,Yto=class extends AJ{input;output=null;constructor(e){super(),this.input=e}_step(){const{regions:e,hulls:n}={regions:(o=this.input).cells.map(i=>i.map(r=>o.pts[r]).filter(UIt)),hulls:o.cells.map(i=>YIt(i,o.pts).map(r=>o.pts[r]).filter(UIt))};var o;this.output={pts:this.input.pts,validTris:this.input.validTris,regions:e,hulls:n,depths:this.input.depths},this.stats={regions:e.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const e=this.output;return e?{points:e.pts.map(n=>({x:n.x,y:n.y,color:"#3b82f6"})),lines:e.regions.flatMap(n=>n.flatMap((o,i)=>{const r=n[(i+1)%n.length];return r?[{points:[o,r],strokeColor:"#0f766e"}]:[]})),rects:[],circles:[],texts:[{x:4,y:12,text:`regions: ${e.regions.length}`,color:"#1f2937"}]}:{points:[],lines:[],rects:[],circles:[],texts:[]}}},Lae=(t,e,n)=>{const o=Math.cos(n.ccwRotation),i=Math.sin(n.ccwRotation);return{x:n.center.x+t*o-e*i,y:n.center.y+t*i+e*o}},Uto=(t,e=[],n,o=[])=>{const i=[],{minX:r,maxX:s,minY:a,maxY:A}=t;i.push({x:r,y:a},{x:s,y:a},{x:s,y:A},{x:r,y:A});for(let c=1;c<10;c++){const l=c/10;i.push({x:r+l*(s-r),y:a}),i.push({x:s,y:a+l*(A-a)}),i.push({x:s-l*(s-r),y:A}),i.push({x:r,y:A-l*(A-a)})}for(const c of e){const l=c.diameter/2+n;for(let u=0;u<24;u++){const g=2*Math.PI*u/24;i.push({x:c.center.x+l*Math.cos(g),y:c.center.y+l*Math.sin(g)})}}for(const c of o){const l=c.width/2+n,u=c.height/2+n,g=Math.max(2,Math.ceil(Math.max(2*l,2*u)/20));for(let h=0;h<g;h++){const d=h/g;i.push(Lae(2*d*l-l,-u,c)),i.push(Lae(l,2*d*u-u,c)),i.push(Lae(l-2*d*l,u,c)),i.push(Lae(-l,u-2*d*u,c))}}return i.map((c,l)=>({x:c.x+1e-6*(l%7-3),y:c.y+1e-6*(l%5-2)}))},Kto=class extends AJ{input;output=null;constructor(e){super(),this.input=e}_step(){const e=this.input.vias??[],n=this.input.rects??[];this.output={pts:Uto(this.input.bounds,e,this.input.clearance,n)},this.stats={points:this.output.pts.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const e=(this.output?.pts??[]).map(n=>({x:n.x,y:n.y,color:"#2563eb"}));return{points:e,lines:[],rects:[],circles:(this.input.vias??[]).map(n=>({center:{x:n.center.x,y:n.center.y},radius:n.diameter/2+this.input.clearance,stroke:"#ef4444"})),texts:[{x:this.input.bounds.minX+6,y:this.input.bounds.minY+12,text:`sample points: ${e.length}`,color:"#1f2937"}]}}},Vto=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r<1e-10)return Math.hypot(t.x-e.x,t.y-e.y);let s=((t.x-e.x)*o+(t.y-e.y)*i)/r;return s=Math.max(0,Math.min(1,s)),Math.hypot(t.x-e.x-s*o,t.y-e.y-s*i)},KIt=(t,e)=>{if(t.length<=3)return 0;const n=YIt(t,e),o=new Set(n),i=n.map(s=>e[s]).filter(s=>!!s);let r=0;for(const s of t){if(o.has(s))continue;const a=e[s];if(!a)continue;let A=Number.POSITIVE_INFINITY;for(let c=0;c<i.length;c++){const l=i[c],u=i[(c+1)%i.length];l&&u&&(A=Math.min(A,Vto(a,l,u)))}r=Math.max(r,A)}return r},U6e=(t,e)=>t<e?1e5*t+e:1e5*e+t,zto=(t,e)=>{const n=t.map((u,g)=>[u,t[(g+1)%t.length]]),o=e.map((u,g)=>[u,e[(g+1)%e.length]]),i=new Set;for(const[u,g]of n)if(g!==void 0)for(const[h,d]of o)d!==void 0&&u===d&&g===h&&i.add(U6e(u,g));if(i.size===0)return null;const r=[];for(const[u,g]of n)g!==void 0&&(i.has(U6e(u,g))||r.push([u,g]));for(const[u,g]of o)g!==void 0&&(i.has(U6e(u,g))||r.push([u,g]));if(r.length===0)return null;const s=new Map;for(const[u,g]of r)s.set(u,g);const a=r[0]?.[0];if(a===void 0)return null;const A=[a];let c=s.get(a),l=0;for(;c!==void 0&&c!==a&&l++<r.length+5;)A.push(c),c=s.get(c);return c!==a||A.length!==r.length?null:A},Jto=(t,e)=>t<e?1e5*t+e:1e5*e+t,Wto=class extends AJ{input;output=null;constructor(t){super(),this.input=t}_step(){const t=((e,n,o)=>{if(!e.length)return{cells:[],depths:[]};const i=e.map(([A,c,l])=>{const u=n[A],g=n[c],h=n[l];return u&&g&&h&&Y6e(u,g,h)<0?[A,l,c]:[A,c,l]});let r=!0,s=0;for(;r&&s++<800;){r=!1;const A=new Map,c=i.map(()=>new Set);for(let d=0;d<i.length;d++){const p=i[d];if(p)for(let m=0;m<p.length;m++){const _=p[m],f=p[(m+1)%p.length];if(_===void 0||f===void 0)continue;const I=Jto(_,f);if(A.has(I)){const C=A.get(I);C!==void 0&&(c[d]?.add(C),c[C]?.add(d))}else A.set(I,d)}}let l=-1,u=-1,g=null,h=Number.POSITIVE_INFINITY;for(let d=0;d<i.length;d++){const p=c[d];if(p)for(const m of p){if(m<=d)continue;const _=zto(i[d]??[],i[m]??[]);if(!_)continue;const f=KIt(_,n);f<=o+1e-6&&f<h&&(h=f,l=d,u=m,g=_)}}if(l<0||u<0||!g)break;i[l]=g,i.splice(u,1),r=!0}const a=i.map(A=>KIt(A,n));return{cells:i,depths:a}})(this.input.validTris,this.input.pts,this.input.concavityTolerance);this.output={pts:this.input.pts,validTris:this.input.validTris,cells:t.cells,depths:t.depths},this.stats={mergedCells:t.cells.length,maxDepth:t.depths.length?Math.max(...t.depths):0},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const t=this.output?.cells??[];return{points:this.input.pts.map(e=>({x:e.x,y:e.y,color:"#3b82f6"})),lines:t.flatMap(e=>e.flatMap((n,o)=>{const i=this.input.pts[n],r=e[(o+1)%e.length],s=r===void 0?void 0:this.input.pts[r];return i&&s?[{points:[i,s],strokeColor:"#10b981"}]:[]})),rects:[],circles:[],texts:[{x:4,y:12,text:`merged cells: ${t.length}`,color:"#1f2937"}]}}},VIt=(t,e,n)=>{const o=2*(t.x*(e.y-n.y)+e.x*(n.y-t.y)+n.x*(t.y-e.y));if(Math.abs(o)<1e-10)return{x:0,y:0,r2:1e18};const i=t.x*t.x+t.y*t.y,r=e.x*e.x+e.y*e.y,s=n.x*n.x+n.y*n.y,a=(i*(e.y-n.y)+r*(n.y-t.y)+s*(t.y-e.y))/o,A=(i*(n.x-e.x)+r*(t.x-n.x)+s*(e.x-t.x))/o;return{x:a,y:A,r2:(t.x-a)**2+(t.y-A)**2}},jto=(t,e,n)=>[t.a,t.b,t.c].includes(e)&&[t.a,t.b,t.c].includes(n),$to=(t,e,n,o=[],i,r=[])=>t.filter(([s,a,A])=>{const c=e[s],l=e[a],u=e[A];return!c||!l||!u?!1:((g,h,d,p=[],m,_=[])=>{const{minX:f,maxX:I,minY:C,maxY:y}=d;if(g<f-.1||g>I+.1||h<C-.1||h>y+.1)return!1;for(const x of p){const E=x.diameter/2+m;if((g-x.center.x)**2+(h-x.center.y)**2<E*E-.1)return!1}for(const x of _){const E=x.width/2+m,B=x.height/2+m,S=g-x.center.x,Q=h-x.center.y,w=Math.cos(x.ccwRotation),M=Math.sin(x.ccwRotation),k=S*w+Q*M,R=-S*M+Q*w;if(Math.abs(k)<E-.1&&Math.abs(R)<B-.1)return!1}return!0})((c.x+l.x+u.x)/3,(c.y+l.y+u.y)/3,n,o,i,r)}),qto=class extends AJ{input;output=null;constructor(t){super(),this.input=t}_step(){const t=this.input.vias??[],e=this.input.rects??[],n=(i=>{const r=i.map((_,f)=>({..._,i:f}));if(r.length<3)return[];let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(const _ of r)s=Math.min(s,_.x),a=Math.min(a,_.y),A=Math.max(A,_.x),c=Math.max(c,_.y);const l=Math.max(A-s,c-a)||1,u=(s+A)/2,g=(a+c)/2,h={x:u-30*l,y:g-l,i:-1},d={x:u,y:g+30*l,i:-2},p={x:u+30*l,y:g-l,i:-3};let m=[{a:h,b:d,c:p,cc:VIt(h,d,p)}];for(const _ of r){const f=m.filter(y=>{const x=_.x-y.cc.x,E=_.y-y.cc.y;return x*x+E*E<y.cc.r2+1e-6}),I=new Set(f),C=[];for(const y of f){const x=[[y.a,y.b],[y.b,y.c],[y.c,y.a]];for(const[E,B]of x){let S=!1;for(const Q of f)if(Q!==y&&jto(Q,E,B)){S=!0;break}S||C.push([E,B])}}m=m.filter(y=>!I.has(y));for(const[y,x]of C)m.push({a:y,b:x,c:_,cc:VIt(y,x,_)})}return m.filter(_=>_.a.i>=0&&_.b.i>=0&&_.c.i>=0).map(_=>[_.a.i,_.b.i,_.c.i])})(this.input.pts),o=$to(n,this.input.pts,this.input.bounds,t,this.input.clearance,e);this.output={pts:this.input.pts,validTris:o},this.stats={candidateTriangles:n.length,validTriangles:o.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){return this.output}visualize(){const t=this.output?.validTris??[];return{points:this.input.pts.map(e=>({x:e.x,y:e.y,color:"#2563eb"})),lines:t.flatMap(([e,n,o])=>{const i=this.input.pts[e],r=this.input.pts[n],s=this.input.pts[o];return i&&r&&s?[{points:[i,r],strokeColor:"#64748b"},{points:[r,s],strokeColor:"#64748b"},{points:[s,i],strokeColor:"#64748b"}]:[]}),rects:[],circles:[],texts:[{x:this.input.bounds.minX+6,y:this.input.bounds.minY+12,text:`valid triangles: ${t.length}`,color:"#1f2937"}]}}},Xto=class extends Gto{pipelineDef=[Fae("generatePoints",Kto,t=>[t.inputProblem]),Fae("triangulate",qto,t=>{const e=t.getStageOutput("generatePoints");if(!e)throw new Error("generatePoints output missing");return[{pts:e.pts,bounds:t.inputProblem.bounds,vias:t.inputProblem.vias,rects:t.inputProblem.rects,clearance:t.inputProblem.clearance}]}),Fae("mergeCells",Wto,t=>{const e=t.getStageOutput("triangulate");if(!e)throw new Error("triangulate output missing");return[{pts:e.pts,validTris:e.validTris,concavityTolerance:t.inputProblem.concavityTolerance}]}),Fae("buildRegions",Yto,t=>{const e=t.getStageOutput("mergeCells");if(!e)throw new Error("mergeCells output missing");return[e]})];getConstructorParams(){return[this.inputProblem]}getOutput(){return this.getStageOutput("buildRegions")??null}visualize(){const t=this.getOutput();return t?{points:t.pts.map(e=>({x:e.x,y:e.y,color:"#38b6ff"})),lines:t.regions.flatMap(e=>e.map((n,o)=>{const i=e[(o+1)%e.length]??n;return{points:[{x:n.x,y:n.y},{x:i.x,y:i.y}],strokeColor:"#4ecb82"}})),rects:[],circles:(this.inputProblem.vias??[]).map(e=>({center:{x:e.center.x,y:e.center.y},radius:e.diameter/2,stroke:"#ff6b6b"})),texts:[{x:this.inputProblem.bounds.minX+8,y:this.inputProblem.bounds.minY+16,text:`regions=${t.regions.length}`,color:"#ffffff"}]}:{points:[],lines:[],rects:[],circles:[],texts:[]}}},K6e=1e-9,Zto=(t,e)=>{const n=[jIt(t)],o=[];let i=e.maxSplitsPerRegion??32;for(;n.length>0;){const r=n.pop();if(!r)continue;if(r.length<4){o.push(r);continue}const s=eno(r,e);if(!s||i<=0){o.push(r);continue}const[a,A]=nno(r,s.i,s.j);i-=1,n.push(a,A)}return o},eno=(t,e)=>{const n=ono(t);if(!n)return null;const{triangles:o}=n,i=ano(t);if(i<=K6e)return null;const r=Math.sqrt(i),s=o.map(A=>Ano(t[A[0]],t[A[1]],t[A[2]]));let a=null;for(const A of n.internalEdges){const{i:c,j:l,triA:u,triB:g}=A,h=cno(t[c],t[l])/r;if(h>e.maxNeckRatio)continue;const d=tno(u,g,o.length,n.triangleAdjacency,s),p=i-d,m=Math.min(d,p)/i;if(m<e.minSplitBalanceRatio)continue;const _=h/Math.max(m,K6e);(!a||_<a.score)&&(a={i:c,j:l,score:_})}return a?{i:a.i,j:a.j}:null},tno=(t,e,n,o,i)=>{const r=new Array(n).fill(!1),s=[t];r[e]=!0;let a=0;for(;s.length>0;){const A=s.pop();if(A===void 0||r[A])continue;r[A]=!0,a+=i[A]??0;const c=o[A]??[];for(const l of c)r[l]||s.push(l)}return a},nno=(t,e,n)=>[zIt(t,e,n),zIt(t,n,e)],zIt=(t,e,n)=>{const o=[],i=t.length;let r=e;for(o.push(t[r]);r!==n;)r=(r+1)%i,o.push(t[r]);return jIt(o)},ono=t=>{const e=t.length;if(e<3)return null;const n=new Set;for(let a=0;a<e;a++){const A=(a+1)%e;n.add(WIt(a,A))}const o=ino(t);if(!o||o.length===0)return null;const i=new Map;o.forEach((a,A)=>{for(let c=0;c<3;c++){const l=a[c],u=a[(c+1)%3],g=WIt(l,u),h=i.get(g);h?h.push(A):i.set(g,[A])}});const r=Array.from({length:o.length},()=>[]),s=[];for(const[a,A]of i.entries()){if(n.has(a)||A.length!==2)continue;const[c,l]=a.split("_"),u=Number(c),g=Number(l),h=A[0],d=A[1];s.push({i:u,j:g,triA:h,triB:d});const p=r[h],m=r[d];p&&p.push(d),m&&m.push(h)}return{triangles:o,internalEdges:s,triangleAdjacency:r}},ino=t=>{const e=t.length;if(e<3)return null;const n=Math.sign(JIt(t));if(n===0)return null;const o=[...Array(e).keys()];n<0&&o.reverse();const i=[];let r=0;for(;o.length>3&&r<e*e;){let s=!1;for(let a=0;a<o.length;a++){const A=o[(a-1+o.length)%o.length],c=o[a],l=o[(a+1)%o.length];if(A===void 0||c===void 0||l===void 0)continue;const u=t[A],g=t[c],h=t[l];if(!u||!g||!h||!rno(u,g,h))continue;let d=!1;for(const p of o){if(p===A||p===c||p===l)continue;const m=t[p];if(m&&sno(m,u,g,h)){d=!0;break}}if(!d){i.push([A,c,l]),o.splice(a,1),s=!0;break}}if(!s)return null;r+=1}if(o.length===3){const[s,a,A]=o;s!==void 0&&a!==void 0&&A!==void 0&&i.push([s,a,A])}return i},rno=(t,e,n)=>cJ(t,e,n)>K6e,sno=(t,e,n,o)=>{const i=cJ(e,n,t),r=cJ(n,o,t),s=cJ(o,e,t);return i>=-1e-9&&r>=-1e-9&&s>=-1e-9},cJ=(t,e,n)=>(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),JIt=t=>{let e=0;for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];o&&i&&(e+=o.x*i.y-i.x*o.y)}return e/2},ano=t=>Math.abs(JIt(t)),Ano=(t,e,n)=>Math.abs(cJ(t,e,n))/2,cno=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),WIt=(t,e)=>t<e?`${t}_${e}`:`${e}_${t}`,jIt=t=>{if(t.length<2)return t;const e=t[0],n=t[t.length-1];return e&&n&&e.x===n.x&&e.y===n.y?t.slice(0,-1):t},$3={pattern:"grid",pitchX:2.2,pitchY:1.8,staggerAxis:"x",staggerOffset:1.1,staggerOffsetX:1.1,padWidth:.9,padHeight:1,padGap:.35,viaDiameter:.3,clearance:.2,concavityTolerance:.3,boundsPadding:1.2,orientation:"horizontal",portSpacing:.25,maxNeckRatio:0,minSplitBalanceRatio:.2},lno=(t,e)=>{let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const s of t)for(const a of s.padCenters){const A=e.orientation==="horizontal"?e.padWidth/2:e.padHeight/2,c=e.orientation==="horizontal"?e.padHeight/2:e.padWidth/2;a.x-A<n&&(n=a.x-A),a.y-c<o&&(o=a.y-c),a.x+A>i&&(i=a.x+A),a.y+c>r&&(r=a.y+c)}return{minX:n-e.boundsPadding,minY:o-e.boundsPadding,maxX:i+e.boundsPadding,maxY:r+e.boundsPadding}},uno=t=>t.pattern==="staggered"?(e=>{const n=[],o=[],i=e.padGap/2+e.padWidth/2,r=-(e.cols-1)*e.pitchX/2,s=-(e.rows-1)*e.pitchY/2;for(let a=0;a<e.rows;a++){const A=e.staggerAxis==="x"&&a%2==1?e.staggerOffset:0;for(let c=0;c<e.cols;c++){const l=e.staggerAxis==="y"&&c%2==1?e.staggerOffset:0,u={x:r+c*e.pitchX+A,y:s+a*e.pitchY+l},g=e.orientation==="horizontal"?{x:u.x-i,y:u.y}:{x:u.x,y:u.y-i},h=e.orientation==="horizontal"?{x:u.x+i,y:u.y}:{x:u.x,y:u.y+i};n.push({jumperId:`jumper_r${a}_c${c}`,center:u,orientation:e.orientation,padCenters:[g,h]}),o.push({center:g,diameter:e.viaDiameter},{center:h,diameter:e.viaDiameter})}}return{jumpers:n,vias:o,bounds:lno(n,e)}})(t):(e=>{const n=[],o=[],i=e.padGap/2+e.padWidth/2,r=-(e.cols-1)*e.pitchX/2,s=-(e.rows-1)*e.pitchY/2;for(let a=0;a<e.rows;a++)for(let A=0;A<e.cols;A++){const c={x:r+A*e.pitchX,y:s+a*e.pitchY},l=e.orientation==="horizontal"?{x:c.x-i,y:c.y}:{x:c.x,y:c.y-i},u=e.orientation==="horizontal"?{x:c.x+i,y:c.y}:{x:c.x,y:c.y+i},g=`jumper_r${a}_c${A}`;n.push({jumperId:g,center:c,orientation:e.orientation,padCenters:[l,u]}),o.push({center:l,diameter:e.viaDiameter},{center:u,diameter:e.viaDiameter})}return{jumpers:n,vias:o,bounds:{minX:r-i-e.padWidth/2-e.boundsPadding,maxX:r+(e.cols-1)*e.pitchX+i+e.padWidth/2+e.boundsPadding,minY:s-i-e.padHeight/2-e.boundsPadding,maxY:s+(e.rows-1)*e.pitchY+i+e.padHeight/2+e.boundsPadding}}})(t),$It=t=>({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),V6e=t=>[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}],sv=(t,e,n)=>Math.abs(t-e)<=n,Hae=(t,e,n)=>sv(t.x,e.x,n)&&sv(t.y,e.y,n),gno=t=>t.map((e,n)=>{const o=(i=>{let r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(const c of i)c.x<r&&(r=c.x),c.y<s&&(s=c.y),c.x>a&&(a=c.x),c.y>A&&(A=c.y);return{minX:r,minY:s,maxX:a,maxY:A}})(e);return{regionId:`top_${n}`,ports:[],d:{bounds:o,center:$It(o),polygon:e,isPad:!1}}}),dno=t=>{const e=t.end.x-t.start.x,n=t.end.y-t.start.y;return Math.hypot(e,n)},fL=(t,e)=>({x:t.start.x+(t.end.x-t.start.x)*e,y:t.start.y+(t.end.y-t.start.y)*e}),qIt=(t,e,n)=>{const o=[];if(!t.d.polygon||!e.d.polygon)return o;for(let i=0;i<t.d.polygon.length;i++){const r=t.d.polygon[i],s=t.d.polygon[(i+1)%t.d.polygon.length];if(r&&s)for(let a=0;a<e.d.polygon.length;a++){const A=e.d.polygon[a],c=e.d.polygon[(a+1)%e.d.polygon.length];if(!A||!c)continue;const l=_no({start:r,end:s},{start:A,end:c},n);l&&(o.some(u=>mno(u,l,n))||o.push(l))}}return o},hno=(t,e)=>{const n=[];for(const o of t){let i=o,r=!0;for(;r;){r=!1;for(let s=0;s<n.length;s++){const a=n[s];if(!a)continue;const A=pno(i,a,e);if(A){i=A,n.splice(s,1),r=!0;break}}}n.push(i)}return n},pno=(t,e,n)=>{const o=t.end.x-t.start.x,i=t.end.y-t.start.y,r=e.end.x-e.start.x,s=e.end.y-e.start.y,a=o**2+i**2;if(a<=n**2||!sv(o*s-i*r,0,n))return null;const A=e.start.x-t.start.x,c=e.start.y-t.start.y,l=e.end.x-t.start.x,u=e.end.y-t.start.y,g=o*u-i*l;if(!sv(o*c-i*A,0,n)||!sv(g,0,n))return null;const h=(A*o+c*i)/a,d=(l*o+u*i)/a,p=Math.min(h,d),m=Math.max(h,d),_=n/Math.sqrt(a);if(p>1+_||m<0-_)return null;const f=Math.min(0,p),I=Math.max(1,m);return{start:fL(t,f),end:fL(t,I)}},mno=(t,e,n)=>Hae(t.start,e.start,n)&&Hae(t.end,e.end,n)||Hae(t.start,e.end,n)&&Hae(t.end,e.start,n),_no=(t,e,n)=>{const o=t.end.x-t.start.x,i=t.end.y-t.start.y,r=e.end.x-e.start.x,s=e.end.y-e.start.y,a=o**2+i**2;if(a<=n**2||!sv(o*s-i*r,0,n))return null;const A=e.start.x-t.start.x,c=e.start.y-t.start.y,l=e.end.x-t.start.x,u=e.end.y-t.start.y,g=o*u-i*l;if(!sv(o*c-i*A,0,n)||!sv(g,0,n))return null;const h=(A*o+c*i)/a,d=(l*o+u*i)/a,p=Math.max(0,Math.min(h,d)),m=Math.min(1,Math.max(h,d));return m-p<=n/Math.sqrt(a)?null:{start:fL(t,p),end:fL(t,m)}},fno=(t,e,n)=>{const o=Math.max(t.minX,e.minX),i=Math.min(t.maxX,e.maxX),r=Math.max(t.minY,e.minY),s=Math.min(t.maxY,e.maxY);return i<o-n||s<r-n?null:{minX:o,maxX:i,minY:r,maxY:s}},Ino=t=>{const e=(d=>{const p=d.orientation??$3.orientation,m=d.staggerAxis??$3.staggerAxis,_=d.padWidth??$3.padWidth,f=d.padHeight??$3.padHeight,I=d.padGap??$3.padGap,C=d.clearance??$3.clearance,y=d.colSpacing??d.pitchX??$3.pitchX,x=d.rowSpacing??d.pitchY??$3.pitchY,E=(B=_,S=f,Q=I,p==="horizontal"?{x:Q+2*B,y:S}:{x:S,y:Q+2*B});var B,S,Q;const w=C,M=((F,O,U,Y,W)=>F==="horizontal"?O==="x"?W+2*U:Y:O==="x"?Y:W+2*U)(p,m,_,f,I)/2,k=d.staggerOffset??d.staggerOffsetX??M,R={...$3,...d,orientation:p,staggerAxis:m,pitchX:Math.max(y,E.x+w),pitchY:Math.max(x,E.y+w),padWidth:_,padHeight:f,padGap:I,staggerOffset:k,staggerOffsetX:k,concavityTolerance:d.concavityTolerance??$3.concavityTolerance,clearance:C,portSpacing:d.portSpacing??$3.portSpacing,maxNeckRatio:d.maxNeckRatio??$3.maxNeckRatio,minSplitBalanceRatio:d.minSplitBalanceRatio??$3.minSplitBalanceRatio};if(R.cols<=0||R.rows<=0)throw new Error("rows and cols must be > 0");if(!Number.isFinite(R.portSpacing)||R.portSpacing<=0)throw new Error("portSpacing must be > 0");if(!Number.isFinite(R.maxNeckRatio)||R.maxNeckRatio<0)throw new Error("maxNeckRatio must be >= 0");if(!Number.isFinite(R.minSplitBalanceRatio)||R.minSplitBalanceRatio<0||R.minSplitBalanceRatio>.5)throw new Error("minSplitBalanceRatio must be between 0 and 0.5");return R})(t),n=uno(e),o=e.orientation==="horizontal"?e.padWidth:e.padHeight,i=e.orientation==="horizontal"?e.padHeight:e.padWidth,r=n.jumpers.flatMap(d=>d.padCenters.map(p=>({center:p,width:o,height:i,ccwRotation:0}))),s=new Xto({bounds:n.bounds,rects:r,clearance:0,concavityTolerance:e.concavityTolerance});s.solve();const a=s.getOutput();if(!a)throw new Error(s.error??"ConvexRegionsSolver failed");const A=((d,p)=>{if(p.maxNeckRatio<=0)return d;const m=[];for(const _ of d)m.push(...Zto(_,p));return m})(a.regions,{maxNeckRatio:e.maxNeckRatio,minSplitBalanceRatio:e.minSplitBalanceRatio}),c=gno(A),l=((d,p)=>d.flatMap(m=>{const[_,f]=m.padCenters,I=p.orientation==="horizontal"?p.padWidth/2:p.padHeight/2,C=p.orientation==="horizontal"?p.padHeight/2:p.padWidth/2,y={minX:_.x-I,maxX:_.x+I,minY:_.y-C,maxY:_.y+C},x={minX:f.x-I,maxX:f.x+I,minY:f.y-C,maxY:f.y+C},E=I/2,B=C/2,S=p.orientation==="horizontal"?{minX:Math.min(_.x,f.x),maxX:Math.max(_.x,f.x),minY:m.center.y-B,maxY:m.center.y+B}:{minX:m.center.x-E,maxX:m.center.x+E,minY:Math.min(_.y,f.y),maxY:Math.max(_.y,f.y)};return[{regionId:`${m.jumperId}_pad1`,ports:[],d:{bounds:y,center:_,polygon:V6e(y),isPad:!0,isThroughJumper:!1}},{regionId:`${m.jumperId}_bridge`,ports:[],d:{bounds:S,center:m.center,polygon:V6e(S),isPad:!1,isThroughJumper:!0}},{regionId:`${m.jumperId}_pad2`,ports:[],d:{bounds:x,center:f,polygon:V6e(x),isPad:!0,isThroughJumper:!1}}]}))(n.jumpers,{orientation:e.orientation,padWidth:e.padWidth,padHeight:e.padHeight}),u=((d,p,m=1e-5)=>{const _=[];let f=0;for(let I=0;I<d.length;I++){const C=d[I];if(C?.d.polygon)for(let y=I+1;y<d.length;y++){const x=d[y];if(!x?.d.polygon)continue;const E=qIt(C,x,m);for(const B of E){const S=dno(B),Q=Math.floor(S/p),w=Math.max(1,Q-1);for(let M=0;M<w;M++){const k=fL(B,(M+1)/(w+1));_.push({portId:"tp_"+f++,region1:C,region2:x,d:{x:k.x,y:k.y}})}}}}return _})(c,e.portSpacing),g=((d,p,m=1e-5)=>{const _=[];let f=0,I=0;const C=d.filter(x=>x.d.isPad),y=d.filter(x=>x.d.isThroughJumper&&!x.d.isPad);for(const x of C)for(const E of p){const B=qIt(x,E,m),S=hno(B,m);for(const Q of S){const w=fL(Q,.5);_.push({portId:"jp_"+f++,region1:x,region2:E,d:{x:w.x,y:w.y}})}}for(const x of y)for(const E of C){const B=fno(x.d.bounds,E.d.bounds,m);if(!B)continue;const S=$It(B);_.push({portId:"jip_"+I++,region1:E,region2:x,d:{x:S.x,y:S.y}})}return _})(l,c),h=[...u,...g];return(d=>{for(const p of d)p.region1.ports.push(p),p.region2.ports.push(p)})(h),{regions:[...c,...l],ports:h,jumperLocations:n.jumpers.map((d,p)=>({center:d.center,orientation:d.orientation,padRegions:[l[3*p],l[3*p+2]].filter(m=>!!m)})),topLayerRegions:c,jumperRegions:l,jumpers:n.jumpers,vias:n.vias,bounds:n.bounds}},Cno=class extends yr{getSolverName(){return"JumperPrepatternSolver2_HyperGraph"}constructorParams;nodeWithPortPoints;colorMap;traceWidth;obstacleMargin;hyperParameters;jumperGraphSolver=null;xyConnections=[];graphBounds=null;jumperLocations=[];solvedRoutes=[];jumpers=[];phase="jumperGraph";curvySolvers=[];currentCurvySolverIndex=0;routeInfos=[];regionCurvedPaths=new Map;constructor(t){super(),this.constructorParams=t,this.nodeWithPortPoints=t.nodeWithPortPoints,this.colorMap=t.colorMap??{},this.traceWidth=t.traceWidth??.15,this.obstacleMargin=t.obstacleMargin??.15,this.hyperParameters=t.hyperParameters??{},this.MAX_ITERATIONS=1e6,Object.keys(this.colorMap).length===0&&(this.colorMap=this._buildColorMap())}getConstructorParams(){return this.constructorParams}_buildColorMap(){const t=["#e6194b","#3cb44b","#ffe119","#4363d8","#f58231","#911eb4","#46f0f0","#f032e6","#bcf60c","#fabebe"],e={},n=new Set;for(const i of this.nodeWithPortPoints.portPoints)n.add(i.connectionName);let o=0;for(const i of Array.from(n))e[i]=t[o%t.length],o++;return e}_normalizeRegionPolygonsToBounds(t){for(const e of t.regions){const n=e.d,o=n?.polygon,i=n?.bounds;if(!o||o.length===0||!i)continue;let r=1/0,s=1/0;for(const c of o)r=Math.min(r,c.x),s=Math.min(s,c.y);const a=i.minX-r,A=i.minY-s;(Math.abs(a)>1e-12||Math.abs(A)>1e-12)&&(n.polygon=o.map(c=>({x:c.x+a,y:c.y+A}))),n.polygonPerimeterCache&&(n.polygonPerimeterCache=void 0)}return t}_getPatternConfig(){return{cols:this.hyperParameters.COLS??1,rows:this.hyperParameters.ROWS??1}}_generate0603Grid(t,e,n,o){const i=e==="horizontal"?t.rows:t.cols,r=e==="horizontal"?t.cols:t.rows,s=o.maxX-o.minX,a=o.maxY-o.minY,A=.35,c=this.hyperParameters.TRACE_CHANNELS_BETWEEN_JUMPERS??1,l=this.traceWidth*c+2*this.obstacleMargin,u=e==="horizontal"?2.15:1,g=e==="horizontal"?1:2.15,h=e==="horizontal"?"x":"y",d=n==="staggered",p=d&&h==="x"?u/2:d?g/2:0,m=Math.max(0,s-1),_=Math.max(0,a-1),f=Math.max(0,m-(d&&h==="x"?p:0)),I=Math.max(0,_-(d&&h==="y"?p:0)),C=i>1?Math.max(u+l,(f-u)/(i-1)):u,y=r>1?Math.max(g+l,(I-g)/(r-1)):g,x=Ino({cols:i,rows:r,orientation:e,pattern:n,staggerAxis:h,colSpacing:C,rowSpacing:y,padWidth:.9,padHeight:1,padGap:A,clearance:l,boundsPadding:0,maxNeckRatio:.4,minSplitBalanceRatio:.2}),E=x.bounds,B=(E.minX+E.maxX)/2,S=(E.minY+E.maxY)/2,Q=r_t((o.minX+o.maxX)/2-B,(o.minY+o.maxY)/2-S);return this._normalizeRegionPolygonsToBounds(Y1t(x,Q))}_initializeGraph(){const t=this.nodeWithPortPoints,e=this._getPatternConfig(),n=this.hyperParameters.ORIENTATION??"vertical",o=this.hyperParameters.JUMPER_TYPE??"1206x4",i=this.hyperParameters.PATTERN??"grid",r={minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2};let s;if(this.graphBounds=r,o==="0603"){const c=this._generate0603Grid(e,n,i,r);if(!c)return this.error=`0603 grid (${e.cols}x${e.rows}) is too large to fit in node bounds`,this.failed=!0,!1;s=c}else s=Xeo({cols:e.cols,rows:e.rows,marginX:Math.max(1.2,.3*e.cols),marginY:Math.max(1.2,.3*e.rows),outerPaddingX:.4,outerPaddingY:.4,parallelTracesUnderJumperCount:2,innerColChannelPointCount:3,innerRowChannelPointCount:3,outerChannelXPointCount:3,outerChannelYPointCount:3,regionsBetweenPads:!0,orientation:n,bounds:r});if(s.regions.length>0){let c=1/0,l=-1/0,u=1/0,g=-1/0;for(const d of s.regions){if(!d.d?.isPad)continue;const p=d.d?.bounds;p&&(c=Math.min(c,p.minX),l=Math.max(l,p.maxX),u=Math.min(u,p.minY),g=Math.max(g,p.maxY))}const h=o==="0603"?.5:1;if(c-h<r.minX||l+h>r.maxX||u-h<r.minY||g+h>r.maxY)return this.error=`baseGraph bounds (${c.toFixed(2)}, ${u.toFixed(2)}, ${l.toFixed(2)}, ${g.toFixed(2)}) exceed node bounds (${r.minX.toFixed(2)}, ${r.minY.toFixed(2)}, ${r.maxX.toFixed(2)}, ${r.maxY.toFixed(2)})`,this.failed=!0,!1}this.jumperLocations=s.jumperLocations?.map(c=>({center:c.center,orientation:c.orientation,padRegions:c.padRegions}))??[];const a=new Map;for(const c of t.portPoints){const l=a.get(c.connectionName);l?l.points.push(c):a.set(c.connectionName,{points:[c],rootConnectionName:c.rootConnectionName})}this.xyConnections=[];for(const[c,l]of Array.from(a.entries()))l.points.length<2||this.xyConnections.push({start:{x:l.points[0].x,y:l.points[0].y},end:{x:l.points[1].x,y:l.points[1].y},connectionId:c});if(this.xyConnections.length===0)return this.solved=!0,!0;const A=((c,l)=>{const u=[...c.regions],g=[...c.ports],h=[],d=k1t(c.regions);for(const p of l){const{start:m,end:_,connectionId:f}=p,I=L1t(`conn:${f}:start`,m.x,m.y);u.push(I);const C=L1t(`conn:${f}:end`,_.x,_.y);u.push(C);const y=O1t(m.x,m.y,c.regions,d);if(y){const B=F1t(`conn:${f}:start-port`,I,y.region,y.portPosition);g.push(B)}const x=O1t(_.x,_.y,c.regions,d);if(x){const B=F1t(`conn:${f}:end-port`,C,x.region,x.portPosition);g.push(B)}const E={connectionId:f,mutuallyConnectedNetworkId:f,startRegion:I,endRegion:C};h.push(E)}return{regions:u,ports:g,connections:h}})(s,this.xyConnections);return this.jumperGraphSolver=new $eo({inputGraph:{regions:A.regions,ports:A.ports},inputConnections:A.connections}),this.jumperGraphSolver.MAX_ITERATIONS*=3,!0}_step(){switch(this.phase){case"jumperGraph":this._stepJumperGraph();break;case"curvyTrace":this._stepCurvyTrace();break;case"done":this.solved=!0}}_stepJumperGraph(){if(!this.jumperGraphSolver){if(this._initializeGraph(),this.solved)return;if(!this.jumperGraphSolver)return void(this.failed=!0)}this.activeSubSolver=this.jumperGraphSolver,this.jumperGraphSolver.step(),this.jumperGraphSolver.solved?(this._initializeCurvyTraceSolvers(),this.curvySolvers.length>0?this.phase="curvyTrace":(this._finalizeCurvyTraceResults(),this.phase="done",this.solved=!0)):this.jumperGraphSolver.failed&&(this.error=this.jumperGraphSolver.error,this.failed=!0)}_stepCurvyTrace(){if(this.currentCurvySolverIndex>=this.curvySolvers.length)return this._finalizeCurvyTraceResults(),this.phase="done",void(this.solved=!0);const t=this.curvySolvers[this.currentCurvySolverIndex],e=t.solver;if(this.activeSubSolver=e,e.step(),e.solved){const n=t.regionId;this.regionCurvedPaths.has(n)||this.regionCurvedPaths.set(n,new Map);for(const o of e.outputTraces){const i=o.networkId??"",r=o.points.map(a=>({x:a.x,y:a.y})),s={path:r,start:r[0]??{x:0,y:0},end:r[r.length-1]??{x:0,y:0}};this.regionCurvedPaths.get(n).has(i)||this.regionCurvedPaths.get(n).set(i,[]),this.regionCurvedPaths.get(n).get(i).push(s)}this.currentCurvySolverIndex++}else e.failed&&this.currentCurvySolverIndex++}_initializeCurvyTraceSolvers(){if(!this.jumperGraphSolver)return;const t=new Set,e=[];for(const o of this.jumperLocations)for(const i of o.padRegions){const r=i.d.bounds,s=i.d.center;e.push({minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY,center:{x:s.x,y:s.y},networkIds:[]})}const n=new Map;for(let o=0;o<this.jumperGraphSolver.solvedRoutes.length;o++){const i=this.jumperGraphSolver.solvedRoutes[o],r=i.connection.connectionId,s=this.nodeWithPortPoints.portPoints.find(u=>u.connectionName===r)?.rootConnectionName,a=[],A=[];let c=null,l=null;for(let u=0;u<i.path.length;u++){const g=i.path[u],h=g.port,d=g.lastRegion,p=h.region1,m=h.region2;let _;if(d)p&&p.regionId!==d.regionId?_=p:m&&m.regionId!==d.regionId&&(_=m);else{const f=i.path[u+1],I=f?.lastRegion;if(I&&(p&&p.regionId===I.regionId?_=p:m&&m.regionId===I.regionId&&(_=m)),!_){const C=y=>y?.regionId?.startsWith("conn:");_=!p||C(p)||p.d?.isPad||p.d?.isThroughJumper?!m||C(m)||m.d?.isPad||m.d?.isThroughJumper?!p||p.d?.isPad||p.d?.isThroughJumper?(!m||m.d?.isPad||m.d?.isThroughJumper)&&p||m:p:m:p}}if(_&&(!c||_.regionId!==c.regionId)){if(c&&l){A.push({regionId:c.regionId,region:c,entryPort:l,exitPort:h});const f=c.regionId;n.has(f)||n.set(f,[]),n.get(f).push({regionId:c.regionId,region:c,routeIndex:o,connectionName:r,rootConnectionName:s,entryPort:l,exitPort:h})}c=_,l=h}if(d?.d?.isThroughJumper&&!t.has(d.regionId)){t.add(d.regionId);const f=d.d.bounds,I=d.d.center,C=f.maxX-f.minX>f.maxY-f.minY,y=(this.hyperParameters.JUMPER_TYPE??"1206x4")==="0603"?"0603":"1206x4_pair";C?a.push({route_type:"jumper",start:{x:f.minX,y:I.y},end:{x:f.maxX,y:I.y},footprint:y}):a.push({route_type:"jumper",start:{x:I.x,y:f.minY},end:{x:I.x,y:f.maxY},footprint:y})}}if(c&&l){const u=i.path[i.path.length-1];A.push({regionId:c.regionId,region:c,entryPort:l,exitPort:u?.port||null})}this.routeInfos.push({connectionId:r,rootConnectionName:s,jumpers:a,traversals:A})}for(let o=0;o<this.routeInfos.length;o++){const i=this.routeInfos[o],r=i.rootConnectionName??i.connectionId;for(const s of i.jumpers){const a=[s.start,s.end];for(const A of a)for(const c of e){const l=Math.abs(c.center.x-A.x),u=Math.abs(c.center.y-A.y);l<.1&&u<.1&&(c.networkIds.includes(r)||c.networkIds.push(r))}}}for(const[o,i]of n){if(i.length===0)continue;const r=i[0].region;if(r.d.isPad||r.d.isThroughJumper)continue;const s=r.d.bounds,a=[];for(const g of i)a.push({start:{x:g.entryPort.d.x,y:g.entryPort.d.y},end:{x:g.exitPort.d.x,y:g.exitPort.d.y},networkId:g.rootConnectionName??g.connectionName});const A=.01,c=e.filter(g=>g.minX<=s.maxX+A&&g.maxX>=s.minX-A&&g.minY<=s.maxY+A&&g.maxY>=s.minY-A).map(g=>{const h=i.map(p=>p.rootConnectionName??p.connectionName),d=g.networkIds.find(p=>h.includes(p));return{minX:g.minX,minY:g.minY,maxX:g.maxX,maxY:g.maxY,center:g.center,networkId:d}}),l={bounds:s,waypointPairs:a,obstacles:c,preferredTraceToTraceSpacing:2*this.traceWidth,preferredObstacleToTraceSpacing:2*this.traceWidth},u=new y1t(l);this.curvySolvers.push({solver:u,regionId:o,traversals:i.map(g=>({routeIndex:g.routeIndex,connectionName:g.connectionName,rootConnectionName:g.rootConnectionName}))})}}_finalizeCurvyTraceResults(){const t=(e,n)=>Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);for(let e=0;e<this.routeInfos.length;e++){const n=this.routeInfos[e],o=[];for(const i of n.traversals){const r=i.regionId,s=n.rootConnectionName??n.connectionId,a=this.regionCurvedPaths.get(r)?.get(s);let A=null;if(a&&a.length>0){const c={x:i.entryPort.d.x,y:i.entryPort.d.y},l=i.exitPort?{x:i.exitPort.d.x,y:i.exitPort.d.y}:null;let u=null,g=1/0;for(const h of a){const d=t(h.start,c)+(l?t(h.end,l):0);d<g&&(g=d,u=h)}u&&g<.5&&(A=u.path)}if(A&&A.length>0)for(let c=o.length>0?1:0;c<A.length;c++)o.push({x:A[c].x,y:A[c].y,z:0});else o.length===0&&o.push({x:i.entryPort.d.x,y:i.entryPort.d.y,z:0}),i.exitPort&&o.push({x:i.exitPort.d.x,y:i.exitPort.d.y,z:0})}this.solvedRoutes.push({connectionName:n.connectionId,rootConnectionName:n.rootConnectionName,traceThickness:this.traceWidth,route:o,jumpers:n.jumpers})}}getOutput(){return this.solvedRoutes}getOutputJumpers(){if(this.jumpers.length>0)return this.jumpers;const t=new Map;for(const o of this.solvedRoutes)for(const i of o.jumpers){const r=[i.start,i.end];for(const s of r){const a=`${s.x.toFixed(3)},${s.y.toFixed(3)}`,A=t.get(a)??[];o.rootConnectionName&&!A.includes(o.rootConnectionName)&&A.push(o.rootConnectionName),A.includes(o.connectionName)||A.push(o.connectionName),t.set(a,A)}}const e=this.hyperParameters.JUMPER_TYPE??"1206x4",n=W8[e==="0603"?"0603":"1206x4_pair"];for(const o of this.jumperLocations){const i=o.orientation==="horizontal",r=o.padRegions.map(a=>{const A=a.d.bounds,c=a.d.center,l=A.maxX-A.minX,u=A.maxY-A.minY,g=`${c.x.toFixed(3)},${c.y.toFixed(3)}`;return{type:"rect",center:c,width:l,height:u,layers:["top"],connectedTo:[...t.get(g)??[]]}}),s={jumper_footprint:e,center:o.center,orientation:o.orientation,width:i?n.length:n.width,height:i?n.width:n.length,pads:r};this.jumpers.push(s)}return this.jumpers=this.jumpers.filter(o=>o.pads.some(i=>i.connectedTo.length>0)),this.jumpers}visualize(){if(this.jumperGraphSolver&&!this.solved)return this.jumperGraphSolver.visualize();const t={lines:[],points:[],rects:[],circles:[]},e=this.nodeWithPortPoints,n={minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2};t.lines.push({points:[{x:n.minX,y:n.minY},{x:n.maxX,y:n.minY},{x:n.maxX,y:n.maxY},{x:n.minX,y:n.maxY},{x:n.minX,y:n.minY}],strokeColor:"rgba(255, 0, 0, 0.25)",strokeDash:"4 4",layer:"border"});for(const o of e.portPoints)t.points.push({x:o.x,y:o.y,label:o.connectionName,color:this.colorMap[o.connectionName]??"blue"});for(const o of this.solvedRoutes){const i=this.colorMap[o.connectionName]??"blue";for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];t.lines.push({points:[s,a],strokeColor:Es(i,.2),strokeWidth:o.traceThickness,layer:"route-layer-0"})}for(const r of o.jumpers)this._drawJumperPads(t,r,Es(i,.5))}return t}_drawJumperPads(t,e,n){const o=W8[e.footprint],i=e.end.x-e.start.x,r=e.end.y-e.start.y,s=Math.abs(i)>Math.abs(r),a=s?o.padLength:o.padWidth,A=s?o.padWidth:o.padLength;t.rects.push({center:{x:e.start.x,y:e.start.y},width:a,height:A,fill:n,stroke:"rgba(0, 0, 0, 0.5)",layer:"jumper"}),t.rects.push({center:{x:e.end.x,y:e.end.y},width:a,height:A,fill:n,stroke:"rgba(0, 0, 0, 0.5)",layer:"jumper"}),t.lines.push({points:[e.start,e.end],strokeColor:"rgba(100, 100, 100, 0.8)",strokeWidth:.3*o.padWidth,layer:"jumper-body"})}},yno=class extends Zse{constructorParams;nodeWithPortPoints;colorMap;traceWidth;obstacleMargin;connMap;baseHyperParameters;availableJumperTypes;solvedRoutes=[];jumpers=[];constructor(t){super(),this.constructorParams=t,this.nodeWithPortPoints=t.nodeWithPortPoints,this.colorMap=t.colorMap??{},this.traceWidth=t.traceWidth??.15,this.obstacleMargin=t.obstacleMargin??.15,this.connMap=t.connMap,this.baseHyperParameters=t.hyperParameters??{},this.availableJumperTypes=t.availableJumperTypes??["0603"],this.MAX_ITERATIONS=1e6,this.GREEDY_MULTIPLIER=1,this.MIN_SUBSTEPS=1e3}getConstructorParams(){return this.constructorParams}getHyperParameterDefs(){const t=[],e=this.nodeWithPortPoints,n=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"vertical",1);t.push({name:"0603_max_rows_and_cols_vert_1trace_grid",possibleValues:[{JUMPER_TYPE:"0603",COLS:n.cols,ROWS:n.rows,ORIENTATION:"vertical",PATTERN:"grid",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const o=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"vertical",1,"staggered");t.push({name:"0603_max_rows_and_cols_vert_1trace_staggered",possibleValues:[{JUMPER_TYPE:"0603",COLS:o.cols,ROWS:o.rows,ORIENTATION:"vertical",PATTERN:"staggered",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const i=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"vertical",2);t.push({name:"0603_max_rows_and_cols_vert_2trace_grid",possibleValues:[{JUMPER_TYPE:"0603",COLS:i.cols,ROWS:i.rows,ORIENTATION:"vertical",PATTERN:"grid",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]});const r=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"vertical",2,"staggered");t.push({name:"0603_max_rows_and_cols_vert_2trace_staggered",possibleValues:[{JUMPER_TYPE:"0603",COLS:r.cols,ROWS:r.rows,ORIENTATION:"vertical",PATTERN:"staggered",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]});const s=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"horizontal",1);t.push({name:"0603_max_rows_and_cols_horz_1trace_grid",possibleValues:[{JUMPER_TYPE:"0603",COLS:s.cols,ROWS:s.rows,ORIENTATION:"horizontal",PATTERN:"grid",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const a=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"horizontal",1,"staggered");t.push({name:"0603_max_rows_and_cols_horz_1trace_staggered",possibleValues:[{JUMPER_TYPE:"0603",COLS:a.cols,ROWS:a.rows,ORIENTATION:"horizontal",PATTERN:"staggered",TRACE_CHANNELS_BETWEEN_JUMPERS:1}]});const A=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"horizontal",2);t.push({name:"0603_max_rows_and_cols_horz_2trace_grid",possibleValues:[{JUMPER_TYPE:"0603",COLS:A.cols,ROWS:A.rows,ORIENTATION:"horizontal",PATTERN:"grid",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]});const c=this.calculateMax0603ConfigWithTraceChannels(e.width,e.height,"horizontal",2,"staggered");return t.push({name:"0603_max_rows_and_cols_horz_2trace_staggered",possibleValues:[{JUMPER_TYPE:"0603",COLS:c.cols,ROWS:c.rows,ORIENTATION:"horizontal",PATTERN:"staggered",TRACE_CHANNELS_BETWEEN_JUMPERS:2}]}),t.push({name:"1206x4",possibleValues:[{JUMPER_TYPE:"1206x4"}]}),t.push({name:"1206x4_cols",possibleValues:[1,2,3,4,6,8,10].map(l=>({COLS:l}))}),t.push({name:"1206x4_rows",possibleValues:[1,2,3,4,8].map(l=>({ROWS:l}))}),t.push({name:"orientation",possibleValues:[{ORIENTATION:"vertical"},{ORIENTATION:"horizontal"}]}),t}isValidCombination(t){const{JUMPER_TYPE:e,COLS:n,ROWS:o}=t,i=[1,2,4,6,8],r=[1,2,3,4,6,8,10],s=[1,2,3,4,8];return e==="0603"?i.includes(n)&&i.includes(o):e==="1206x4"&&r.includes(n)&&s.includes(o)}getCombinationDefs(){return[["0603_max_rows_and_cols_vert_1trace_grid"],["0603_max_rows_and_cols_vert_1trace_staggered"],["0603_max_rows_and_cols_horz_1trace_grid"],["0603_max_rows_and_cols_horz_1trace_staggered"],["0603_max_rows_and_cols_vert_2trace_grid"],["0603_max_rows_and_cols_vert_2trace_staggered"],["0603_max_rows_and_cols_horz_2trace_grid"],["0603_max_rows_and_cols_horz_2trace_staggered"],["1206x4","1206x4_cols","1206x4_rows","orientation"]]}calculateMax0603ConfigWithTraceChannels(t,e,n,o,i="grid"){const r=this.traceWidth*o+2*this.obstacleMargin,s=n==="horizontal"?2.15:1,a=n==="horizontal"?1:2.15,A=n==="horizontal"?"x":"y",c=i==="staggered"&&A==="x"?s/2:i==="staggered"?a/2:0,l=Math.max(0,t-1),u=Math.max(0,e-1),g=Math.max(0,l-(i==="staggered"&&A==="x"?c:0)),h=Math.max(0,u-(i==="staggered"&&A==="y"?c:0)),d=s+r,p=a+r,m=Math.max(1,Math.floor(1+(g-s)/d)),_=Math.max(1,Math.floor(1+(h-a)/p));return n==="vertical"?{cols:m,rows:_}:{cols:_,rows:m}}initializeSolvers(){const t=this.getHyperParameterDefs(),e=this.getCombinationDefs();this.supervisedSolvers=[];for(const n of e){const o=n.some(s=>s.startsWith("0603_max_rows_and_cols_")),i=n.includes("1206x4");if(o&&!this.availableJumperTypes.includes("0603")||i&&!this.availableJumperTypes.includes("1206x4"))continue;const r=this.getHyperParameterCombinations(t.filter(s=>n.includes(s.name)));for(const s of r){const a=this.generateSolver(s),A=this.computeG(a);this.supervisedSolvers.push({hyperParameters:s,solver:a,h:0,g:A,f:A})}}}generateSolver(t){return new Cno({nodeWithPortPoints:this.nodeWithPortPoints,colorMap:this.colorMap,traceWidth:this.traceWidth,hyperParameters:{COLS:t.COLS,ROWS:t.ROWS,ORIENTATION:t.ORIENTATION,JUMPER_TYPE:t.JUMPER_TYPE,PATTERN:t.PATTERN,TRACE_CHANNELS_BETWEEN_JUMPERS:t.TRACE_CHANNELS_BETWEEN_JUMPERS},obstacleMargin:this.obstacleMargin})}computeG(t){const e=t.hyperParameters.COLS*t.hyperParameters.ROWS;return t.iterations/1e4+.25*e}computeH(t){return 1-(t.progress||0)}onSolve(t){this.solvedRoutes=t.solver.solvedRoutes,this.jumpers=t.solver.getOutputJumpers()}getOutput(){return this.solvedRoutes}getOutputJumpers(){return this.jumpers}visualize(){return this.winningSolver?this.winningSolver.visualize():super.visualize()}};function xno(t){return{connectionName:t.connectionName,rootConnectionName:t.rootConnectionName,regionId:t.regionId,traceThickness:t.traceThickness,viaDiameter:0,route:t.route,vias:[],jumpers:t.jumpers}}var Eno=class extends yr{getSolverName(){return"JumperHighDensitySolver"}allNodes;nodeAnalyses;routes;colorMap;traceWidth;obstacleMargin;viaDiameter;connMap;hyperParameters;availableJumperTypes;capacityMeshNodes;capacityMeshEdges;capacityMeshNodeMap;nodeAdjacencyMap;nodesWithoutCrossings;nodesWithCrossings;curvyIntraNodeSolvers;currentCurvySolverIndex;jumperSolvers;currentJumperSolverIndex;phase;jumpers=[];constructor({nodePortPoints:t,colorMap:e,traceWidth:n=.15,obstacleMargin:o=.15,viaDiameter:i=.3,connMap:r,hyperParameters:s,capacityMeshNodes:a=[],capacityMeshEdges:A=[],availableJumperTypes:c}){super(),this.allNodes=[...t],this.colorMap=e??{},this.routes=[],this.traceWidth=n,this.obstacleMargin=o,this.viaDiameter=i,this.connMap=r,this.hyperParameters=s,this.capacityMeshNodes=a,this.capacityMeshEdges=A,this.availableJumperTypes=c??["0603"],this.capacityMeshNodeMap=new Map(a.map(g=>[g.capacityMeshNodeId,g])),this.nodeAdjacencyMap=this._buildNodeAdjacencyMap(),this.nodesWithoutCrossings=[],this.nodesWithCrossings=[],this.nodeAnalyses=[],this.curvyIntraNodeSolvers=[],this.currentCurvySolverIndex=0,this.jumperSolvers=[],this.currentJumperSolverIndex=0,this.phase="analyzing",this._analyzeNodes();const l=1e3*this.nodesWithoutCrossings.length,u=1e5*this.nodesWithCrossings.length;this.MAX_ITERATIONS=l+u+100}_buildNodeAdjacencyMap(){const t=new Map;for(const e of this.capacityMeshEdges){const[n,o]=e.nodeIds;t.has(n)||t.set(n,new Set),t.has(o)||t.set(o,new Set),t.get(n).add(o),t.get(o).add(n)}return t}_analyzeNodes(){for(const t of this.allNodes){const e=Wm(t),n={node:t,hasCrossings:e.numSameLayerCrossings>0,numSameLayerCrossings:e.numSameLayerCrossings};this.nodeAnalyses.push(n),e.numSameLayerCrossings>0?this.nodesWithCrossings.push(t):this.nodesWithoutCrossings.push(t)}this.nodesWithoutCrossings.length>0?(this.phase="curvy",this._initializeCurvySolvers()):this.nodesWithCrossings.length>0?(this.phase="jumpers",this._initializeJumperSolvers()):this.phase="done"}_step(){switch(this.phase){case"analyzing":this.nodesWithoutCrossings.length>0?(this.phase="curvy",this._initializeCurvySolvers()):this.nodesWithCrossings.length>0?(this.phase="jumpers",this._initializeJumperSolvers()):this.phase="done";break;case"curvy":this._stepCurvySolvers();break;case"jumpers":this._stepJumperSolvers();break;case"done":this.solved=!0}}_getAdjacentObstacles(t){const e=[],n=this.nodeAdjacencyMap.get(t.capacityMeshNodeId);if(!n||n.size===0)return e;const o=new Map(this.allNodes.map(i=>[i.capacityMeshNodeId,i]));for(const i of n){const r=this.capacityMeshNodeMap.get(i);if(!r||!r._containsObstacle&&!r._containsTarget)continue;const s=r.center.x-r.width/2,a=r.center.y-r.height/2,A=r.center.x+r.width/2,c=r.center.y+r.height/2;let l;if(r._containsTarget)if(r._targetConnectionName)l=r._targetConnectionName;else{const u=o.get(i);u&&u.portPoints.length>0&&(l=u.portPoints[0].rootConnectionName??u.portPoints[0].connectionName)}e.push({minX:s,minY:a,maxX:A,maxY:c,networkId:l})}return e}_initializeCurvySolvers(){for(const t of this.nodesWithoutCrossings){const e=this._getAdjacentObstacles(t),n=new x1t({nodeWithPortPoints:t,colorMap:this.colorMap,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter,adjacentObstacles:e});this.curvyIntraNodeSolvers.push(n)}}_stepCurvySolvers(){if(this.curvyIntraNodeSolvers.length===0)return this.phase=this.nodesWithCrossings.length>0?"jumpers":"done",void(this.phase==="jumpers"&&this._initializeJumperSolvers());const t=this.curvyIntraNodeSolvers[this.currentCurvySolverIndex];if(this.activeSubSolver=t,!t)return this.phase=this.nodesWithCrossings.length>0?"jumpers":"done",void(this.phase==="jumpers"&&this._initializeJumperSolvers());if(t.step(),t.solved){this.routes.push(...t.routes),this.currentCurvySolverIndex++;for(let e=this.currentCurvySolverIndex;e<this.curvyIntraNodeSolvers.length;e++){this.curvyIntraNodeSolvers[e];const n=this.nodesWithoutCrossings[e],o=this._getAdjacentObstacles(n),i=new x1t({nodeWithPortPoints:n,colorMap:this.colorMap,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter,adjacentObstacles:o});this.curvyIntraNodeSolvers[e]=i}this.currentCurvySolverIndex>=this.curvyIntraNodeSolvers.length&&(this.phase=this.nodesWithCrossings.length>0?"jumpers":"done",this.phase==="jumpers"&&this._initializeJumperSolvers())}else t.failed&&(this.error=`CurvyIntraNodeSolver failed for node: ${t.nodeWithPortPoints.capacityMeshNodeId}: ${t.error}`,this.failed=!0)}_initializeJumperSolvers(){for(const t of this.nodesWithCrossings){const e=new yno({nodeWithPortPoints:t,colorMap:this.colorMap,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,connMap:this.connMap,availableJumperTypes:this.availableJumperTypes});this.jumperSolvers.push(e)}}_stepJumperSolvers(){if(this.jumperSolvers.length===0)return this.phase="done",void(this.solved=!0);const t=this.jumperSolvers[this.currentJumperSolverIndex];if(this.activeSubSolver=t,!t)return this.phase="done",void(this.solved=!0);if(t.step(),t.solved){for(const e of t.solvedRoutes)this.routes.push(xno(e));this.jumpers.push(...t.getOutputJumpers()),this.currentJumperSolverIndex++,this.currentJumperSolverIndex>=this.jumperSolvers.length&&(this.phase="done",this.solved=!0)}else t.failed&&(this.error=`HyperJumperPrepatternSolver2 failed for node: ${t.nodeWithPortPoints.capacityMeshNodeId}: ${t.error}`,this.failed=!0)}computeProgress(){const t=this.allNodes.length;if(t===0)return 1;let e=0;e+=this.currentCurvySolverIndex;const n=this.curvyIntraNodeSolvers[this.currentCurvySolverIndex];n&&(e+=n.progress),e+=this.currentJumperSolverIndex;const o=this.jumperSolvers[this.currentJumperSolverIndex];return o&&(e+=o.progress),e/t}getConstructorParams(){return{nodePortPoints:this.allNodes,colorMap:this.colorMap,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,viaDiameter:this.viaDiameter,connMap:this.connMap,hyperParameters:this.hyperParameters,capacityMeshNodes:this.capacityMeshNodes,capacityMeshEdges:this.capacityMeshEdges,availableJumperTypes:this.availableJumperTypes}}getOutputJumpers(){return this.jumpers}visualize(){const t={lines:[],points:[],rects:[],circles:[]};if(this.failed&&this.activeSubSolver)return this.activeSubSolver.visualize();if(this.phase==="curvy"&&this.curvyIntraNodeSolvers[this.currentCurvySolverIndex])return this.curvyIntraNodeSolvers[this.currentCurvySolverIndex].visualize();if(this.phase==="jumpers"&&this.jumperSolvers[this.currentJumperSolverIndex])return this.jumperSolvers[this.currentJumperSolverIndex].visualize();for(const e of this.routes){const n=e.rootConnectionName??e.connectionName,o=Kse(e.route,e.connectionName,this.colorMap[n]);for(const i of o)t.lines.push({points:i.points,label:i.connectionName,strokeColor:i.z===0?i.color:Es(i.color??"gray",.75),layer:`z${i.z}`,strokeWidth:e.traceThickness,strokeDash:i.z!==0?"10, 5":void 0});for(const i of e.vias)t.circles.push({center:i,radius:e.viaDiameter/2,fill:Es(this.colorMap[n]??"gray",.5),layer:"via"});if("jumpers"in e&&e.jumpers)for(const i of e.jumpers){const r=this.colorMap[n]??"gray",s=i.footprint??"1206",a=W8[s],A=i.end.x-i.start.x,c=i.end.y-i.start.y,l=Math.abs(A)>Math.abs(c),u=l?a.padLength:a.padWidth,g=l?a.padWidth:a.padLength;t.rects.push({center:i.start,width:u,height:g,fill:Es(r,.5),stroke:"rgba(0, 0, 0, 0.5)",layer:"jumper"}),t.rects.push({center:i.end,width:u,height:g,fill:Es(r,.5),stroke:"rgba(0, 0, 0, 0.5)",layer:"jumper"}),t.lines.push({points:[i.start,i.end],strokeColor:"rgba(100, 100, 100, 0.8)",strokeWidth:.3*a.padWidth,layer:"jumper-body"})}}for(const e of this.nodeAnalyses){const n=e.node;n.center.x,n.width,n.center.x,n.width,n.center.y,n.height,n.center.y,n.height,t.rects.push({center:n.center,width:n.width,height:n.height,fill:e.hasCrossings?"rgba(255, 200, 0, 0.1)":"rgba(0, 200, 0, 0.1)",stroke:e.hasCrossings?"rgba(255, 150, 0, 0.5)":"rgba(0, 150, 0, 0.5)",label:[n.capacityMeshNodeId,e.hasCrossings?`crossings: ${e.numSameLayerCrossings}`:"no crossings"].join(`
`)})}return t}};function q8(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var Bno=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e,this.srj=t,this.opts={...e},this.viaDiameter=om(t).padDiameter,this.minTraceWidth=t.minTraceWidth;const n=this.opts;if(this.effort=n.effort??1,this.MAX_ITERATIONS=1e8*this.effort,n.capacityDepth===void 0){const o=t.bounds.maxX-t.bounds.minX,i=t.bounds.maxY-t.bounds.minY,r=Math.max(o,i),s=n.targetMinCapacity??.5;n.capacityDepth=$Q(r,s)}this.connMap=Jm(t),this.colorMap=Jf(t,this.connMap),this.cacheProvider=n.cacheProvider===void 0?tB():n.cacheProvider===null?null:n.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return"AssignableAutoroutingPipeline3"}netToPointPairsSolver;traceKeepoutSolver;nodeSolver;nodeTargetMerger;edgeSolver;relateNodesToOffBoardConnections;colorMap;highDensityRouteSolver;simpleHighDensityRouteSolver;highDensitySolver;highDensityStitchSolver;singleLayerNodeMerger;offboardPathFragmentSolver;strawSolver;deadEndSolver;traceSimplificationSolver;traceWidthSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;viaDiameter;minTraceWidth;effort;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[q8("netToPointPairsSolver",J7e,t=>[t.srj,t.colorMap,JQ(t.srj)],{onSolved:t=>{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,this.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),q8("nodeSolver",qF,t=>[{simpleRouteJson:t.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:t=>{t.capacityNodes=t.nodeSolver?.getOutput().meshNodes??[]}}),q8("relateNodesToOffBoardConnections",g1t,t=>[{capacityMeshNodes:t.capacityNodes,srj:t.srj}],{onSolved:t=>{t.capacityNodes=t.relateNodesToOffBoardConnections?.getOutput().capacityNodes}}),q8("edgeSolver",WQ,t=>[t.capacityNodes],{onSolved:t=>{t.capacityEdges=t.edgeSolver?.edges}}),q8("availableSegmentPointSolver",kD,t=>[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!1}]),q8("portPointPathingSolver",z7e,t=>{const e=t.capacityNodes.map(i=>({capacityMeshNodeId:i.capacityMeshNodeId,center:i.center,width:i.width,height:i.height,portPoints:[],availableZ:i.availableZ,_containsTarget:i._containsTarget,_containsObstacle:i._containsObstacle,_offBoardConnectionId:i._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:i._offBoardConnectedCapacityMeshNodeIds})),n=new Map(e.map(i=>[i.capacityMeshNodeId,i])),o=t.availableSegmentPointSolver;for(const i of o.sharedEdgeSegments)for(const r of i.portPoints){const[s,a]=r.nodeIds,A={portPointId:r.segmentPortPointId,x:r.x,y:r.y,z:r.availableZ[0]??0,connectionNodeIds:[s,a],distToCentermostPortOnZ:r.distToCentermostPortOnZ,connectsToOffBoardNode:i.nodeIds.some(l=>n.get(l)?._offBoardConnectionId)},c=n.get(s);c&&c.portPoints.push(A)}return[{simpleRouteJson:t.srjWithPointPairs,inputNodes:e,capacityMeshNodes:t.capacityNodes,colorMap:t.colorMap,numShuffleSeeds:10*t.effort,hyperParameters:{JUMPER_PF_FN_ENABLED:!0,NODE_PF_FACTOR:100,MAX_RIPS:100*t.effort,RIPPING_ENABLED:!0,MAX_RIPPING_PF_THRESHOLD:.9,MIN_RIPPING_PF_THRESHOLD:.1,RANDOM_RIP_FRACTION:.05,NODE_PF_MAX_PENALTY:1e3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:0,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,FORCE_CENTER_FIRST:!0}}]},{onSolved:t=>{const e=t.portPointPathingSolver;e&&d1t({connMap:t.connMap,connectionsWithResults:e.connectionsWithResults,inputNodes:e.inputNodes,obstacles:t.srj.obstacles})}}),q8("highDensitySolver",Eno,t=>[{nodePortPoints:t.multiSectionPortPointOptimizer?.getNodesWithPortPoints()??t.portPointPathingSolver?.getNodesWithPortPoints()??[],colorMap:t.colorMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,connMap:t.connMap,capacityMeshNodes:t.capacityNodes??[],capacityMeshEdges:t.capacityEdges??[],availableJumperTypes:t.srj.availableJumperTypes}]),q8("highDensityStitchSolver",reo,t=>[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensitySolver.routes,connectionPathResults:t.multiSectionPortPointOptimizer?.connectionResults??t.portPointPathingSolver?.connectionsWithResults??[],colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter}]),q8("traceKeepoutSolver",u1t,t=>[{hdRoutes:t.traceSimplificationSolver?.simplifiedHdRoutes??t.highDensityStitchSolver?.mergedHdRoutes??[],obstacles:t.srj.obstacles,jumpers:t.highDensitySolver?.getOutputJumpers()??[],connMap:t.connMap,colorMap:t.colorMap,srj:t.srj}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.netToPointPairsSolver?.visualize(),e=this.nodeSolver?.visualize(),n=this.nodeTargetMerger?.visualize(),o=this.singleLayerNodeMerger?.visualize(),i=this.strawSolver?.visualize(),r=this.edgeSolver?.visualize(),s=this.traceKeepoutSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.availableSegmentPointSolver?.visualize(),c=this.offboardPathFragmentSolver?.visualize(),l=this.portPointPathingSolver?.visualize(),u=this.multiSectionPortPointOptimizer?.visualize(),g=this.highDensityRouteSolver?.visualize(),h=this.highDensitySolver?.visualize(),d=this.simpleHighDensityRouteSolver?.visualize(),p=this.highDensityStitchSolver?.visualize(),m=this.traceSimplificationSolver?.visualize(),_=this.traceWidthSolver?.visualize(),f=this.srj.outline,I=[];if(I.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),f&&f.length>=2){const E=f.map(B=>({x:B.x,y:B.y}));E.push({...E[0]}),I.push({points:E,strokeColor:"rgba(0, 136, 255, 0.95)"})}const C=z8(this.srj),y={points:[...this.srj.connections.flatMap(E=>E.pointsToConnect.map(B=>({...B,layer:J8(B,this.srj.layerCount),label:`${E.name} ${B.pcb_port_id??""}`})))],rects:[...(this.srj.obstacles??[]).filter(E=>!E.isCopperPour).map(E=>({...E,fill:E.layers?.includes("top")?"rgba(255,0,0,0.25)":E.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(E,this.srj.layerCount),label:C(E)}))],lines:I},x=[y,t,e,n,o,i,r,a,A,c,l,u,g?Il(y,g):null,h?Il(y,h):null,d?Il(y,d):null,p,m,s,_,this.solved?Il({lines:I},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...x)}preview(){const t=this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes;if(t){const e=[];for(let n=t.length-1;n>=0;n--){const o=t[n];if(e.push({points:o.route.map(i=>({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length>200)break}return{lines:e}}if(this.portPointPathingSolver){const e=[];for(const n of this.portPointPathingSolver.connectionsWithResults)n.path&&e.push({points:n.path.map(o=>({x:o.point.x,y:o.point.y})),strokeColor:this.colorMap[n.connection.name]});return{lines:e}}return this.netToPointPairsSolver?this.netToPointPairsSolver?.visualize():{}}_getOutputHdRoutes(){return this.traceWidthSolver?.hdRoutesWithWidths??this.traceKeepoutSolver?.redrawnHdRoutes??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver?.mergedHdRoutes??this.highDensitySolver?.routes??this.simpleHighDensityRouteSolver?.routes??this.highDensityRouteSolver?.routes}getConnectedOffboardObstacles(){const t={},e=new Set(this.srj.connections.flatMap(n=>n.__rootConnectionNames??[n.name]));for(const[n,o]of this.srj.obstacles.entries()){if(!o.offBoardConnectsTo?.length)continue;const i=o.obstacleId??`__obs${n}`;o.obstacleId=i;const r=this.connMap.getNetConnectedToId(i);if(!r)continue;const s=this.connMap.getIdsConnectedToNet(r).find(a=>e.has(a));s&&(t[i]=s)}return t}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver&&!this.simpleHighDensityRouteSolver&&!this.highDensitySolver)throw new Error("Cannot get output before solving is complete");const t=[],e=this._getOutputHdRoutes();for(const n of this.netToPointPairsSolver?.newConnections??[]){const o=n.__netConnectionName??this.srj.connections.find(r=>r.name===n.name)?.__netConnectionName,i=e.filter(r=>r.connectionName===n.name);for(let r=0;r<i.length;r++){const s=i[r],a={type:"pcb_trace",pcb_trace_id:`${n.name}_${r}`,connection_name:o??n.__rootConnectionNames?.[0]??n.name,route:nB(s,this.srj.layerCount)};t.push(a)}}return t}getOutputJumpers(){return this.highDensitySolver?this.highDensitySolver.getOutputJumpers():[]}getOutputSimpleRouteJson(){const t=this.getOutputJumpers();return{...this.srj,traces:this.getOutputSimplifiedPcbTraces(),jumpers:t.length>0?t:void 0}}},XIt=t=>{const{candidates:e,mapOfCapacityMeshNodeIdToRef:n}=t;let o=!0;for(const i of e){let r=!1;i.port.nodeIds.forEach(s=>{const a=n.get(s);if(!a)throw new Error(`Could not find capacity mesh node for id ${s}`);a._containsObstacle&&(r=!0)}),r||(o=!1)}return o},ZIt=t=>t.depth+1e3*t.countOfCrampedPortPointsInPath,eCt=class extends zA{constructor(t){if(super(),this.input=t,this.input.depthLimit<1)throw new Error("Depth limit must be at least 1");this._setup()}input;queue=[];resultExploredPortPoints=[];currentExploredPortPoints=null;visitedExploredPortPoints=new Map;getSolverName(){return"singleTargetNecessaryCrampedPortPointSolver"}_setup(){const t=this.input.mapOfCapacityMeshNodeIdToSegmentPortPoints.get(this.input.target.capacityMeshNodeId)??[];for(const e of t){if(this.input.shouldIgnoreCrampedPortPoints&&e.cramped)continue;const n={port:e,depth:1,parent:null,countOfCrampedPortPointsInPath:e.cramped?1:0},o=this.visitedExploredPortPoints.get(e);(!o||this.getCandidateCost(n)<this.getCandidateCost(o))&&(this.visitedExploredPortPoints.set(e,n),this.queue.push(n))}}_step(){if(this.queue.length===0)return this.currentExploredPortPoints=null,void(this.solved=!0);for(;this.queue.length>0;){if(this.currentExploredPortPoints=this.queue.shift(),this.visitedExploredPortPoints.get(this.currentExploredPortPoints.port)!==this.currentExploredPortPoints)continue;if(this.currentExploredPortPoints.depth===this.input.depthLimit){this.resultExploredPortPoints.push(this.currentExploredPortPoints);continue}const t=this.currentExploredPortPoints.port.nodeIds.map(e=>{const n=this.input.mapOfCapacityMeshNodeIdToRef.get(e);if(!n)throw new Error(`Could not find capacity mesh node for id ${e}`);return n}).flatMap(e=>this.input.mapOfCapacityMeshNodeIdToSegmentPortPoints.get(e.capacityMeshNodeId)??[]);for(const e of t){if(this.input.shouldIgnoreCrampedPortPoints&&e.cramped)continue;const n={port:e,depth:this.currentExploredPortPoints.depth+1,parent:this.currentExploredPortPoints,countOfCrampedPortPointsInPath:this.currentExploredPortPoints.countOfCrampedPortPointsInPath+(e.cramped?1:0)},o=this.visitedExploredPortPoints.get(e);o&&this.getCandidateCost(o)<=this.getCandidateCost(n)||(this.visitedExploredPortPoints.set(e,n),this.queue.push(n))}}this.solved=!0}getCandidateCost(t){return t.depth+1e3*t.countOfCrampedPortPointsInPath}getOutput(){return this.resultExploredPortPoints}visualize(){const t={points:[],rects:[]};for(const e of this.visitedExploredPortPoints.keys())t.points.push({...e,color:e.cramped?"blue":"green"});return t}},lJ=class extends zA{constructor(t){super(),this.input=t,this._setup()}input;unprocessedTargets=[];targetNode=[];currentTarget;crampedPortPointsToKeep=new Set;candidatesAtDepth=[];isRunningCrampedPass=!1;filteredOutput;activeSubSolver=null;nodeMap=new Map;mapOfCapacityMeshNodeIdToSegmentPortPoints=new Map;getSolverName(){return"multiTargetNecessaryCrampedPortPointSolver"}_setup(){this.targetNode=this.input.capacityMeshNodes.filter(t=>t._containsObstacle),this.targetNode=this.targetNode.filter(t=>{for(const e of this.input.simpleRouteJson.connections)for(const n of e.pointsToConnect)if(o7(n,t)<=0)return!0;return!1}),this.unprocessedTargets=[...this.targetNode],this.unprocessedTargets.sort((t,e)=>t.center.x-e.center.x);for(const t of this.input.capacityMeshNodes)this.nodeMap.set(t.capacityMeshNodeId,t);for(const t of this.input.sharedEdgeSegments)for(const e of t.portPoints){const n=e.nodeIds;for(const o of n){if(!this.nodeMap.get(o))throw new Error(`Could not find capacity mesh node for id ${o}`);const i=this.mapOfCapacityMeshNodeIdToSegmentPortPoints.get(o)||[];this.mapOfCapacityMeshNodeIdToSegmentPortPoints.set(o,[...i,e])}}}_step(){if(this.activeSubSolver){if(this.activeSubSolver._step(),!this.activeSubSolver.solved)return;if(this.activeSubSolver.failed)return this.failed=!0,void(this.error=this.activeSubSolver.error);if(this.candidatesAtDepth=this.activeSubSolver.getOutput(),this.activeSubSolver=null,!this.currentTarget)return this.failed=!0,void(this.error="Missing current capacity mesh node while finishing BFS");if(!this.isRunningCrampedPass)return XIt({candidates:this.candidatesAtDepth,mapOfCapacityMeshNodeIdToRef:this.nodeMap})||this.candidatesAtDepth.length===0?(this.isRunningCrampedPass=!0,void(this.activeSubSolver=new eCt({target:this.currentTarget,depthLimit:3,shouldIgnoreCrampedPortPoints:!1,mapOfCapacityMeshNodeIdToSegmentPortPoints:this.mapOfCapacityMeshNodeIdToSegmentPortPoints,mapOfCapacityMeshNodeIdToRef:this.nodeMap}))):void(this.currentTarget=void 0);let t=this.candidatesAtDepth.filter(e=>{const n=e.port;return n.nodeIds.map(o=>{const i=this.nodeMap.get(o);if(!i)throw this.failed=!0,this.error=`Could not find capacity mesh node for id ${o}`,new Error(`Could not find capacity mesh node for id ${o}`);return i}).every(o=>!o._containsObstacle)&&n.cramped});if(XIt({candidates:t,mapOfCapacityMeshNodeIdToRef:this.nodeMap})&&(this.error=`All candidates are blocked by obstacles even after including cramped port points for capacity mesh node ${this.currentTarget.capacityMeshNodeId}`),this.candidatesAtDepth=[...t].sort((e,n)=>{const o=ZIt(e)-ZIt(n);return o!==0?o:this.getCandidateExitCapacity(n)-this.getCandidateExitCapacity(e)}),this.candidatesAtDepth.length===0)this.error=`No candidates found for capacity mesh node ${this.currentTarget.capacityMeshNodeId} even after including cramped port points`;else{const e=new Map;for(const o of this.candidatesAtDepth){if(!o.parent)throw new Error(`Missing parent for cramped escape candidate ${o.port.segmentPortPointId}`);const i=`${o.parent.port.segmentPortPointId}->${o.port.segmentPortPointId}`;if(!e.has(i)&&(e.set(i,o),e.size===5))break}const n=[...e.values()];for(const o of n)this.keepCandidatePath(o)}return this.isRunningCrampedPass=!1,void(this.currentTarget=void 0)}if(!this.currentTarget)return this.currentTarget=this.unprocessedTargets.shift(),this.currentTarget?(this.isRunningCrampedPass=!1,this.candidatesAtDepth=[],void(this.activeSubSolver=new eCt({target:this.currentTarget,depthLimit:2,shouldIgnoreCrampedPortPoints:!0,mapOfCapacityMeshNodeIdToSegmentPortPoints:this.mapOfCapacityMeshNodeIdToSegmentPortPoints,mapOfCapacityMeshNodeIdToRef:this.nodeMap}))):void(this.solved=!0)}getOutput(){return this.filteredOutput||(this.filteredOutput=this.input.sharedEdgeSegments.map(t=>({...t,portPoints:t.portPoints.flatMap(e=>!e.cramped||this.crampedPortPointsToKeep.has(e)?[e]:this.isMultilayerEscapePort(e)?[{...e,tinyHypergraphPortPenalty:1e3}]:[])}))),this.filteredOutput}getCandidateExitCapacity(t){if(!t.parent)throw new Error(`Missing parent for cramped escape candidate ${t.port.segmentPortPointId}`);const e=new Set(t.parent.port.nodeIds),n=t.port.nodeIds.filter(o=>!e.has(o)).map(o=>{const i=this.nodeMap.get(o);if(!i)throw new Error(`Could not find capacity mesh node for id ${o}`);return i});if(n.length===0)throw new Error(`Could not find exit node for cramped escape candidate ${t.port.segmentPortPointId}`);return Math.max(0,...n.map(o=>o.width*o.height*o.availableZ.length))}keepCandidatePath(t){this.crampedPortPointsToKeep.add(t.port);let e=t.parent;for(;e;)this.crampedPortPointsToKeep.add(e.port),e=e.parent}isMultilayerEscapePort(t){return t.nodeIds.some(e=>(this.nodeMap.get(e)?.availableZ.length??0)>1)}visualize(){const t={rects:[],points:[]};for(const e of this.targetNode)t.rects.push({...e,fill:this.currentTarget?.capacityMeshNodeId===e.capacityMeshNodeId?"rgba(255, 0, 0, 0.5)":"rgba(255, 0, 0, 0.2)"});for(const e of this.candidatesAtDepth)t.points.push({...e.port,color:e.port.cramped?"blue":"green"});for(const e of this.crampedPortPointsToKeep)t.points.push({...e,color:"blue"});return this.activeSubSolver?MD(t,this.activeSubSolver.visualize()):t}},IL=t=>`${t.x.toFixed(4)},${t.y.toFixed(4)}`,tCt=t=>t.netIsAssignable===!0&&(t.layers?.length??0)>1,bno=(t,e)=>t.connectedTo?.find(n=>n.startsWith("pcb_via"))??t.obstacleId??`assignable_via_${e}`,Sno=t=>[...new Set(t.obstacle.layers.map(e=>Kr(e,t.layerCount)))].sort((e,n)=>e-n),Qno=t=>IL(t.center),nCt=t=>new Set(t.filter(tCt).map(Qno));function k5(t,e){if(t==null)throw new Error(e)}function z6e(t,e){const n=[];for(const o of t)e.includes(o)&&n.push(o);return n}function oCt(t){return o7(t.point,t.region.d)<=.001&&z6e(("layers"in t.point?t.point.layers:[t.point.layer]).map(e=>Kr(e,t.layerCount)),t.region.d.availableZ).length>0}function iCt({graph:t,point:e,layerCount:n}){const o=t.regions.filter(r=>oCt({point:e,region:r,layerCount:n})),i=(function({point:r,layerCount:s}){const a=("layers"in r?r.layers:[r.layer]).map(A=>Kr(A,s));return[...new Set(a)]})({point:e,layerCount:n});return o.find(r=>(function({region:s,pointZLayers:a}){return s.ports.some(A=>a.includes(A.d.z)&&z6e(a,A.region1.d.availableZ).length>0&&z6e(a,A.region2.d.availableZ).length>0)})({region:r,pointZLayers:i}))??o[0]}var rCt=(t,e)=>{const n=t.getNetConnectedToId(e);if(!n)throw new Error(`Could not resolve net ID for connection "${e}"`);return n},vno=t=>{const e=t.graph.regions.filter(i=>i.d.availableZ.includes(t.z)&&!i.d._assignableVia).map(i=>({region:i,distance:o7(t.point,i.d)})).sort((i,r)=>i.distance-r.distance||i.region.d.width*i.region.d.height-r.region.d.width*r.region.d.height),n=e[0]?.distance;if(n===void 0)return[];const o=Math.max(n+1e-6,t.viaRadius+.15);return e.filter(i=>i.distance<=o).slice(0,4).map(i=>i.region)};function uJ(t){const e={ports:[],regions:[]},n=[];for(const o of t.capacityMeshNodes){const i=o._connectedTo?.map(r=>rCt(t.connectivityMap,r));e.regions.push({regionId:o.capacityMeshNodeId,d:i?{...o,_connectedTo:[...new Set(i)]}:o,ports:[]})}for(const o of t.segmentPortPoints){const[i,r]=o.nodeIds,s=e.regions.find(A=>A.regionId===i),a=e.regions.find(A=>A.regionId===r);k5(s,`Could not find region with id ${i} for segment port point ${o.segmentPortPointId}`),k5(a,`Could not find region with id ${r} for segment port point ${o.segmentPortPointId}`);for(const A of o.availableZ){const c=o._preloadedTracePortAssignments?.filter(g=>g.z===A),l={portId:`${o.segmentPortPointId}::${A}`,x:o.x,y:o.y,z:A,distToCentermostPortOnZ:o.distToCentermostPortOnZ,cramped:o.cramped,regions:[s,a],tinyHypergraphPortPenalty:o.tinyHypergraphPortPenalty,_preloadedFixedNetIds:c&&c.length>0?[...new Set(c.map(g=>g.fixedNetId))].sort():void 0,_preloadedTracePortAssignments:c},u={portId:o.segmentPortPointId,d:l,region1:s,region2:a};e.ports.push(u),s.ports.push(u),a.ports.push(u)}}(o=>{for(const[i,r]of o.assignableViaObstacles.entries()){if(!tCt(r))continue;const s=Sno({obstacle:r,layerCount:o.layerCount});if(s.length<2)continue;const a=`assignable-via:${bno(r,i)}`,A=Math.min(r.width,r.height)/2,c={regionId:a,d:{capacityMeshNodeId:a,center:{...r.center},width:r.width,height:r.height,layer:`z${s.join(",")}`,availableZ:s,_containsObstacle:!1,_completelyInsideObstacle:!1,_containsTarget:!1,_assignableVia:!0,_assignedViaObstacle:r},ports:[]},l=[];for(const u of s)for(const g of vno({graph:o.graph,point:r.center,z:u,viaRadius:A})){const h={portId:`${a}:port:${g.regionId}:z${u}`,x:r.center.x,y:r.center.y,z:u,distToCentermostPortOnZ:0,cramped:!1,regions:[g,c]},d={portId:h.portId,d:h,region1:g,region2:c};l.push(d),g.ports.push(d)}if(new Set(l.map(u=>u.d.z)).size<2)for(const u of l)u.region1.ports=u.region1.ports.filter(g=>g!==u);else c.ports.push(...l),o.graph.regions.push(c),o.graph.ports.push(...l)}})({graph:e,assignableViaObstacles:t.assignableViaObstacles??[],layerCount:t.layerCount});for(const o of t.simpleRouteJsonConnections){const[i,r]=o.pointsToConnect,s=iCt({graph:e,point:i,layerCount:t.layerCount}),a=iCt({graph:e,point:r,layerCount:t.layerCount});k5(s,`Could not find start region for connection "${o.name}"`),k5(a,`Could not find end region for connection "${o.name}"`),n.push({connectionId:o.name,mutuallyConnectedNetworkId:rCt(t.connectivityMap,o.name),startRegion:s,endRegion:a,simpleRouteConnection:o})}return{graph:e,connections:n}}function wno(t,e){const n={lines:[],points:[]};if(!t)return n;let o=t.shift();if(!o)return n;const i=[];n.points.push({...o.port.d,color:"rgb(255, 50, 50)",label:`g: ${o.g}
h: ${o.h}
f: ${o.f}
ripRequired: ${o.ripRequired}`});do i.push({x:o.port.d.x,y:o.port.d.y,z:o.port.d.z}),o=o.parent;while(o);i.reverse();const r=i[0]?.z??0;i.unshift({x:e.x,y:e.y,z:r});for(let s=0;s<i.length-1;s++){const a=i[s],A=i[s+1];let c;c=a.z===A.z?a.z===0?void 0:"10 5":"3 3 10",n.lines.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:"rgba(255, 250, 50, 1)",strokeWidth:.01,strokeDash:c})}for(const s of t)n.points.push({...s.port.d,color:"rgb(0, 64, 255)",label:`${s.port.portId}
g: ${s.g}
h: ${s.h}
f: ${s.f}
ripRequired: ${s.ripRequired}`});return n}function Pno(t,e){const n={lines:[],points:[]};for(const o of t){const i=e[o.connection.connectionId]??"rgba(255, 50, 50, 1)",r=[{x:o.connection.startRegion.d.center.x,y:o.connection.startRegion.d.center.y,z:o.connection.startRegion.d?.availableZ?.[0]??0}];for(const s of o.path)r.push({x:s.port.d.x,y:s.port.d.y,z:s.port.d.z});r.push({x:o.connection.endRegion.d.center.x,y:o.connection.endRegion.d.center.y,z:o.connection.endRegion.d?.availableZ?.[0]??0});for(let s=0;s<r.length-1;s++){const a=r[s],A=r[s+1];let c;c=a.z===A.z?a.z===0?void 0:"10 5":"3 3 10";const l={points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:i,strokeWidth:.01,strokeDash:c};n.lines.push(l)}}return n}function Mno(t,e){const n={lines:[],points:[]};for(const o of t){const i=o.startRegion.d.center,r=o.endRegion.d.center,s=(i.x+r.x)/2,a=(i.y+r.y)/2,A=e[o.connectionId]??"rgba(255, 50, 150, 0.8)";n.points.push({x:s,y:a,color:A,label:o.connectionId}),n.lines.push({points:[i,r],strokeColor:A,strokeWidth:.1,strokeDash:(o.startRegion.d?.availableZ?.[0]??0)===0?void 0:"10 5"})}return n}function Dno(t){const e={rects:[],points:[]};for(const n of t.regions)e.rects.push({center:n.d.center,width:n.d.width,height:n.d.height,fill:"rgba(200, 200, 200, 0.5)",label:n.regionId});for(const n of t.ports)e.points.push({x:n.d.x,y:n.d.y,color:"rgba(4, 90, 20, 0.3)",label:n.portId});return e}var sCt=class extends D1t{constructor(e){super({inputConnections:e.connections,inputGraph:e.graph,inputSolvedRoutes:e.inputSolvedRoutes,greedyMultiplier:e.weights.GREEDY_MULTIPLIER,ripCost:e.weights.RIPPING_PF_COST,rippingEnabled:e.flags.RIPPING_ENABLED}),this.params=e,this.regionMemoryPfMap=e.opts?.regionMemoryPfMap??new Map,this.baseRegionFailureCostMap=new Map,this.regionRipCountMap=new Map,this.totalRipCount=0,e.weights.MAX_ITERATIONS_PER_PATH>0&&(this.MAX_ITERATIONS=e.weights.MAX_ITERATIONS_PER_PATH*e.effort)}params;regionMemoryPfMap;baseRegionFailureCostMap;regionRipCountMap;totalRipCount;estimateCostToEnd(e){const n=this.currentEndRegion;return k5(n,"Current end region is undefined"),no(e.d,n.d.center)}computeH(e){const n=e,o=this.computeDistanceTraveled(n);if(this.params.weights.RANDOM_WALK_DISTANCE>0&&o<this.params.weights.RANDOM_WALK_DISTANCE)return 0;const i=this.estimateCostToEnd(e.port),r=(e.port.d.distToCentermostPortOnZ-this.params.weights.CENTER_OFFSET_FOCUS_SHIFT)*this.params.weights.CENTER_OFFSET_DIST_PENALTY_FACTOR,s=e.nextRegion?.regionId??e.lastRegion?.regionId,a=s?this.regionMemoryPfMap.get(s)??0:0;return i+r+this.computeMemoryPfPenalty(a)+this.computeDeviation(e)*this.params.weights.STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR}computeIncreasedRegionCostIfPortsAreUsed(e,n,o){const i=this.currentConnection;k5(i,"Current connection is undefined");const r=this.getBaseRegionFailureCost(e),s=this.computeRegionPfWithAdditionalSegment(e,n,o,i.connectionId,i.mutuallyConnectedNetworkId);if(s>=this.NODE_MAX_PF)return this.params.weights.NODE_PF_MAX_PENALTY;const a=this.pfToFailureCost(s),A=Math.max(0,a-r);return Math.min(this.params.weights.NODE_PF_MAX_PENALTY,A*this.params.weights.NODE_PF_FACTOR)}computeG(e){const n=e;let o=super.computeG(e);return n.lastPort&&n.lastPort.d.z!==n.port.d.z&&(o+=this.params.weights.LAYER_CHANGE_COST),n.nextRegion!==this.currentEndRegion?o:o+this.computeEndRegionCloseCost(n)}getPortUsagePenalty(e){const n=e.assignment;if(!n)return 0;const o=this.currentConnection?.mutuallyConnectedNetworkId;return n.connection.mutuallyConnectedNetworkId===o?0:.5*Math.max(1,this.params.weights.NODE_PF_FACTOR)+this.params.weights.BASE_CANDIDATE_COST}getRipsRequiredForPortUsage(e,n,o){const i=e.assignments??[];return i.length===0?[]:i.filter(r=>r.connection.mutuallyConnectedNetworkId!==this.currentConnection?.mutuallyConnectedNetworkId&&r.regionPort1!==n&&r.regionPort2!==n&&r.regionPort1!==o&&r.regionPort2!==o&&Uh(r.regionPort1.d,r.regionPort2.d,n.d,o.d))}selectCandidatesForEnteringRegion(e){const n=this.currentConnection?.startRegion,o=this.currentConnection?.endRegion;k5(n,"Current connection or start region is undefined"),k5(o,"Current connection or end region is undefined");const i=e.filter(a=>{const A=a.nextRegion;return!A?.d._containsObstacle||A===n||A===o});let r=this.params.flags.FORCE_CENTER_FIRST?this.getCenterFirstEnteringRegionCandidates(i):i;const s=-this.params.weights.MIN_ALLOWED_BOARD_SCORE;if(s>0){const a=r.filter(A=>A.g+A.h<=s);a.length>0&&(r=a)}return r}routeSolvedHook(e){this.baseRegionFailureCostMap.clear();const n=new Set;for(const r of e.path){const s=r.lastRegion;s&&n.add(s)}for(const r of n){const s=this.computeRegionPfFromAssignments(r);this.regionMemoryPfMap.set(r.regionId,s)}if(!e.requiredRip||this.unprocessedConnections.length<2)return;const[o,...i]=this.unprocessedConnections;this.unprocessedConnections=[...i,o]}computeRoutesToRip(e){const n=super.computePortOverlapRoutes(e),o=new Set(n),i=new Map;e.path.map(c=>{if(!c.lastPort||!c.lastRegion)return;const l=this.getRipsRequiredForPortUsage(c.lastRegion,c.lastPort,c.port);if(l.length===0)return null;const u=i.get(c.lastRegion)??new Set;for(const g of l)u.add(g.solvedRoute);i.set(c.lastRegion,u)});const r=e.path.flatMap(c=>c.lastRegion?[c.lastRegion]:[]),s=Array.from(new Set([...i.keys(),...r])),a=this.params.weights.SHUFFLE_SEED+this.iterations+this.solvedRoutes.length+this.totalRipCount,A=D5(s,a);for(const c of A){if(this.totalRipCount>=this.params.weights.MAX_RIPS)break;const l=this.getRegionRippingPfThreshold(c.regionId);let u=this.computeRegionPf({region:c,newlySolvedRoute:e,routesToRip:o});if(this.regionMemoryPfMap.set(c.regionId,u),u<=l)continue;const g=new Set;let h=0;for(;u>l&&!(this.totalRipCount>=this.params.weights.MAX_RIPS);){if(!c.assignments||c.assignments.length===0)throw new Error("We are trying to rip a region with no assignments, this should not happen");const d=c.assignments.map(m=>{const _=m.solvedRoute;return m.connection.connectionId===e.connection.connectionId?null:o.has(_)?void 0:_}).filter(m=>!!m);if(d.length===0)break;const p=D5(d,a+h+g.size)[0];if(!p)break;g.add(p.connection),o.add(p),this.totalRipCount++,h++,this.regionRipCountMap.set(c.regionId,(this.regionRipCountMap.get(c.regionId)??0)+1),u=this.computeRegionPf({region:c,newlySolvedRoute:e,routesToRip:o}),this.regionMemoryPfMap.set(c.regionId,u)}}if(o.size>n.size){if(this.totalRipCount>=this.params.weights.MAX_RIPS)return o;const c=this.solvedRoutes.filter(h=>!o.has(h)&&h.connection.connectionId!==e.connection.connectionId);if(c.length===0)return o;const l=Math.max(1,Math.floor(this.params.weights.RANDOM_RIP_FRACTION*c.length)),u=D5(c,a);let g=0;for(const h of u){if(g>=l||this.totalRipCount>=this.params.weights.MAX_RIPS)break;o.has(h)||(o.add(h),g++,this.totalRipCount++)}}return o}computeDeviation(e){const n=this.currentConnection?.startRegion.d.center,o=this.currentConnection?.endRegion.d.center;return k5(n,"Current connection or start region is undefined"),k5(o,"Current connection or end region is undefined"),wc(e.port.d,n,o)}computeDistanceTraveled(e){let n=0,o=e;for(;o?.parent;)n+=no(o.parent.port.d,o.port.d),o=o.parent;return n}computeMemoryPfPenalty(e){const n=Math.min(Math.max(e,0),.999999),o=Math.min(this.params.weights.NODE_PF_MAX_PENALTY,-Math.log(1-n));return o*this.params.weights.MEMORY_PF_FACTOR+o*this.params.weights.NODE_PF_FACTOR*.01}computeEndRegionCloseCost(e){const n=this.currentConnection,o=this.currentEndRegion;k5(n,"Current connection is undefined"),k5(o,"Current end region is undefined");const i=n.endRegion.d.center,r={portId:`end-target:${n.connectionId}`,region1:o,region2:o,d:{portId:`end-target:${n.connectionId}`,x:i.x,y:i.y,z:e.port.d.z,distToCentermostPortOnZ:0,regions:[o,o]}};return this.computeIncreasedRegionCostIfPortsAreUsed(o,e.port,r)}getCenterFirstEnteringRegionCandidates(e){const n=new Map;for(const i of e){const r=i.port.d.z,s=n.get(r)??[];s.push(i),n.set(r,s)}const o=[];for(const i of n.values()){const r=i.sort((c,l)=>c.port.d.distToCentermostPortOnZ-l.port.d.distToCentermostPortOnZ)[0];if(!r)continue;if(this.isPortAvailableForCurrentNet(r.port)){o.push(r);continue}const s=i.sort((c,l)=>c.port.d.x!==l.port.d.x?c.port.d.x-l.port.d.x:c.port.d.y-l.port.d.y),a=[];let A=[];for(const c of s)this.isPortAvailableForCurrentNet(c.port)?A.push(c):A.length>0&&(a.push(A),A=[]);A.length>0&&a.push(A);for(const c of a)o.push(c[Math.floor(c.length/2)])}return o}isPortAvailableForCurrentNet(e){const n=e.assignment;if(!n)return!0;const o=this.currentConnection?.mutuallyConnectedNetworkId;return n.connection.mutuallyConnectedNetworkId===o}computeRegionPfFromAssignments(e){const n=this.getRegionAssignedPortPoints(e),o={...e.d,portPoints:n},i=Wm(o),r=e.d;return wy(r,i.numSameLayerCrossings,i.numEntryExitLayerChanges,i.numTransitionPairCrossings)}clampPf(e){return Math.min(Math.max(e,0),.999999)}get NODE_MAX_PF(){return Math.min(.99999,1-Math.exp(-this.params.weights.NODE_PF_MAX_PENALTY))}pfToFailureCost(e){const n=this.clampPf(e);return n>=this.NODE_MAX_PF?this.params.weights.NODE_PF_MAX_PENALTY:-Math.log(1-n)}getBaseRegionFailureCost(e){const n=this.baseRegionFailureCostMap.get(e.regionId);if(n!=null)return n;const o=this.computeRegionPfFromAssignments(e),i=this.pfToFailureCost(o);return this.baseRegionFailureCostMap.set(e.regionId,i),i}getRegionAssignedPortPoints(e){return(e.assignments??[]).flatMap(n=>{const o=n.regionPort1.d,i=n.regionPort2.d,r=n.connection.connectionId,s=n.connection.simpleRouteConnection?.__rootConnectionNames?.[0];return[{x:o.x,y:o.y,z:o.z,connectionName:r,rootConnectionName:s},{x:i.x,y:i.y,z:i.z,connectionName:r,rootConnectionName:s}]})}computeRegionPfWithAdditionalSegment(e,n,o,i,r){const s=this.getRegionAssignedPortPoints(e),a=[{x:n.d.x,y:n.d.y,z:n.d.z,connectionName:i,rootConnectionName:r},{x:o.d.x,y:o.d.y,z:o.d.z,connectionName:i,rootConnectionName:r}],A={...e.d,portPoints:[...s,...a]},c=Wm(A);return wy(e.d,c.numSameLayerCrossings,c.numEntryExitLayerChanges,c.numTransitionPairCrossings)}getRegionRippingPfThreshold(e){const n=this.regionRipCountMap.get(e)??0,o=Math.max(1,Math.floor(this.params.weights.MAX_RIPS/10)),i=Math.min(1,n/o);return(this.params.weights.START_RIPPING_PF_THRESHOLD||.3)*(1-i)+(this.params.weights.END_RIPPING_PF_THRESHOLD||1)*i}computeRegionPf({region:e,newlySolvedRoute:n,routesToRip:o}){const i=[...(e.assignments??[]).filter(A=>!o.has(A.solvedRoute)).flatMap(A=>{const c=A.regionPort1,l=A.regionPort2,u=A.connection.connectionId,g=A.connection.simpleRouteConnection?.__rootConnectionNames?.[0];return[{x:c.d.x,y:c.d.y,z:c.d.z,connectionName:u,rootConnectionName:g},{x:l.d.x,y:l.d.y,z:l.d.z,connectionName:u,rootConnectionName:g}]}),...n.path.flatMap(A=>{if(!A.lastPort||A.lastRegion!==e)return[];const c=A.lastPort,l=A.port;return[{x:c.d.x,y:c.d.y,z:c.d.z,connectionName:n.connection.connectionId,rootConnectionName:n.connection.simpleRouteConnection?.__rootConnectionNames?.[0]},{x:l.d.x,y:l.d.y,z:l.d.z,connectionName:n.connection.connectionId,rootConnectionName:n.connection.simpleRouteConnection?.__rootConnectionNames?.[0]}]})],r={capacityMeshNodeId:e.d.capacityMeshNodeId,center:e.d.center,width:e.d.width,height:e.d.height,portPoints:i,availableZ:e.d.availableZ},s=Wm(r),a=e.d;return wy(a,s.numSameLayerCrossings,s.numEntryExitLayerChanges,s.numTransitionPairCrossings)}computeNodePf(e){const n=this.getOutput().nodesWithPortPoints.find(r=>r.capacityMeshNodeId===e.capacityMeshNodeId),o=this.params.graph.regions.find(r=>r.d.capacityMeshNodeId===e.capacityMeshNodeId);if(!n||!o)return null;const i=Wm(n);return wy(o.d,i.numSameLayerCrossings,i.numEntryExitLayerChanges,i.numTransitionPairCrossings)}getOutput(){new Map(this.params.graph.regions.map(r=>[r.regionId,r]));const e=new Set;for(const r of this.params.connections)e.add(r.startRegion.regionId),e.add(r.endRegion.regionId);const n=new Map;for(const r of this.solvedRoutes){const s=r.path;if(s.length===0)continue;const a=s[0]?.port,A=s[s.length-1]?.port;if(!a||!A)continue;const c=r.connection.connectionId,l=r.connection,u=l.simpleRouteConnection?.__rootConnectionNames?.[0],g=r.connection.startRegion.regionId,h=r.connection.endRegion.regionId,d=n.get(g)??[];d.push({portPointId:a.d.portId,x:a.d.x,y:a.d.y,z:a.d.z,connectionName:c,rootConnectionName:u}),n.set(g,d);const p=n.get(h)??[];p.push({portPointId:A.d.portId,x:A.d.x,y:A.d.y,z:A.d.z,connectionName:c,rootConnectionName:u}),n.set(h,p)}const o=[],i=[];for(const r of this.params.graph.regions){const s=(r.assignments??[]).flatMap(l=>{const u=l.connection.connectionId,g=l.connection.simpleRouteConnection?.__rootConnectionNames?.[0];return[{portPointId:l.regionPort1.d.portId,x:l.regionPort1.d.x,y:l.regionPort1.d.y,z:l.regionPort1.d.z,connectionName:u,rootConnectionName:g,nextPortPointId:l.regionPort2.d.portId},{portPointId:l.regionPort2.d.portId,x:l.regionPort2.d.x,y:l.regionPort2.d.y,z:l.regionPort2.d.z,connectionName:u,rootConnectionName:g,prevPortPointId:l.regionPort1.d.portId}]}),a=[];if(r.d._containsObstacle&&e.has(r.regionId)){const l=n.get(r.regionId)??[],u=[];for(const h of l)s.some(d=>d.connectionName===h.connectionName&&d.rootConnectionName===h.rootConnectionName&&d.portPointId===h.portPointId)||u.push(h);s.push(...u);const g=new Map;for(const h of s){const d=`${h.connectionName}::${h.rootConnectionName??""}`,p=g.get(d)??[];p.push(h),g.set(d,p)}for(const[h,d]of g.entries()){const[p,m=""]=h.split("::"),_=d[0];if(!_)continue;const f={portPointId:`center:${r.regionId}:${p}:${m}`,x:r.d.center.x,y:r.d.center.y,z:_.z,connectionName:p,rootConnectionName:m||void 0};if(d.length>=2){const I=d[d.length-1];_.portPointId&&(_.nextPortPointId=f.portPointId,f.prevPortPointId=_.portPointId),I.portPointId&&(I.prevPortPointId=f.portPointId,f.nextPortPointId=I.portPointId)}a.push(f)}}const A=[...s,...a];A.length>0&&o.push({capacityMeshNodeId:r.d.capacityMeshNodeId,center:r.d.center,width:r.d.width,height:r.d.height,portPoints:A,availableZ:r.d.availableZ});const c=r.ports.map(l=>{const u=l.d,g=l.d.regions.some(h=>!!h.d._offBoardConnectionId);return{portPointId:l.d.portId,x:l.d.x,y:l.d.y,z:l.d.z,prevPortPointId:u.prevPortPointId,nextPortPointId:u.nextPortPointId,connectionNodeIds:l.d.regions.map(h=>h.regionId),distToCentermostPortOnZ:l.d.distToCentermostPortOnZ,connectsToOffBoardNode:g}});i.push({capacityMeshNodeId:r.d.capacityMeshNodeId,center:r.d.center,width:r.d.width,height:r.d.height,portPoints:c,availableZ:r.d.availableZ,_containsObstacle:r.d._containsObstacle,_containsTarget:r.d._containsTarget,_offBoardConnectionId:r.d._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:r.d._offBoardConnectedCapacityMeshNodeIds})}return{nodesWithPortPoints:o,inputNodeWithPortPoints:i}}visualize(){return(function(e){let n={};return n=e.reduce((o,i)=>o&&i?MD(o,i):{},n),n||{}})([Dno(this.params.graph),this.visualizePfOverlay(),Mno(this.params.connections,this.params.colorMap??{}),wno(this.candidateQueue.peekMany(100),this.currentConnection?.startRegion.d.center),Pno(this.solvedRoutes,this.params.colorMap??{})])}visualizePfOverlay(){const e=this.getOutput(),n=e?.inputNodeWithPortPoints??[],o=new Map((e?.nodesWithPortPoints??[]).map(r=>[r.capacityMeshNodeId,r])),i={rects:[]};for(const r of n){const s=this.computeNodePf(r),a=s??0,A=o.get(r.capacityMeshNodeId),c=A?Wm(A):{numSameLayerCrossings:0,numEntryExitLayerChanges:0,numTransitionPairCrossings:0},l=Math.min(255,Math.floor(512*a)),u=Math.max(0,255-Math.floor(512*a));let g=`rgba(${l}, ${u}, ${u}, ${a<.001?"0.1":"0.3"})`;r._containsObstacle&&(g="rgba(255, 0, 0, 0.3)"),r._offBoardConnectedCapacityMeshNodeIds?.length&&(g="rgba(255, 165, 0, 0.3)"),i.rects.push({center:r.center,width:r.width-.2,height:r.height-.2,layer:`z${r?.availableZ?.join(",")}`,fill:g,label:`${r.capacityMeshNodeId}
pf: ${s===null?"n/a":s.toFixed(3)}
xSame: ${c.numSameLayerCrossings}, xLC: ${c.numEntryExitLayerChanges}, xTransition: ${c.numTransitionPairCrossings}`})}return i}},Nno=t=>{if(!t.assignments||t.assignments.length===0)return t.d?.assignment?0:1;const e=t.assignments.flatMap(i=>{const r=i.regionPort1.d,s=i.regionPort2.d,a=i.connection.connectionId,A=i.connection,c=A.simpleRouteConnection?.__rootConnectionNames?.[0];return[{x:r.x,y:r.y,z:r.z,connectionName:a,rootConnectionName:c},{x:s.x,y:s.y,z:s.z,connectionName:a,rootConnectionName:c}]}),n={...t.d,portPoints:e},o=Wm(n);return wy(t.d,o.numSameLayerCrossings,o.numEntryExitLayerChanges,o.numTransitionPairCrossings)};function F5(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var Rno=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n,this.srj=e,this.opts={...n},this.viaDiameter=om(e).padDiameter,this.minTraceWidth=e.minTraceWidth;const o=this.opts;if(this.effort=o.effort??1,this.MAX_ITERATIONS=1e8*this.effort,o.capacityDepth===void 0){const i=e.bounds.maxX-e.bounds.minX,r=e.bounds.maxY-e.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.connMap=Jm(e),this.colorMap=Jf(e,this.connMap),this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;netToPointPairsSolver;nodeSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityStitchSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;hyperGraphSectionOptimizer;viaDiameter;minTraceWidth;effort;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithPointPairs;capacityNodes=null;capacityEdges=null;cacheProvider=null;pipelineDef=[F5("netToPointPairsSolver",rL,e=>[e.srj,e.colorMap,JQ(e.srj)],{onSolved:e=>{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,this.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),F5("nodeSolver",qF,e=>[{simpleRouteJson:e.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:e=>{e.capacityNodes=e.nodeSolver?.getOutput().meshNodes??[]}}),F5("edgeSolver",WQ,e=>[e.capacityNodes],{onSolved:e=>{e.capacityEdges=e.edgeSolver?.edges}}),F5("availableSegmentPointSolver",kD,e=>[{nodes:e.capacityNodes,edges:e.capacityEdges||[],traceWidth:e.minTraceWidth,colorMap:e.colorMap,shouldReturnCrampedPortPoints:!0}]),F5("necessaryCrampedPortPointSolver",lJ,e=>[{capacityMeshNodes:e.capacityNodes,sharedEdgeSegments:e.availableSegmentPointSolver.getOutput(),simpleRouteJson:e.srjWithPointPairs}]),F5("portPointPathingSolver",sCt,e=>{const n=e.necessaryCrampedPortPointSolver?.getOutput()??e.availableSegmentPointSolver.getOutput(),{graph:o,connections:i}=uJ({capacityMeshNodes:e.capacityNodes,layerCount:e.srj.layerCount,connectivityMap:e.connMap,segmentPortPoints:n.flatMap(r=>r.portPoints),simpleRouteJsonConnections:e.srjWithPointPairs.connections});return[{graph:o,connections:i,layerCount:e.srj.layerCount,effort:e.effort,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),F5("hyperGraphSectionOptimizer",Oeo,e=>{const n=e.portPointPathingSolver;return[{hyperGraphSolver:n,inputSolvedRoutes:n.solvedRoutes,expansionHopsFromCentralRegion:1,createHyperGraphSolver:o=>new sCt({graph:o.inputGraph,connections:o.inputConnections,inputSolvedRoutes:o.inputSolvedRoutes,layerCount:e.srj.layerCount,effort:e.effort,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}),regionCost:Nno,effort:e.effort,ACCEPTABLE_REGION_COST:.1,MAX_ATTEMPTS_PER_REGION:Math.max(3,3*e.effort),MAX_ATTEMPTS_PER_SECTION:Math.max(50,50*e.effort),FRACTION_TO_REPLACE:1,alwaysRipConflicts:!0}]}),F5("uniformPortDistributionSolver",kz,e=>[{nodeWithPortPoints:e.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:e.minTraceWidth,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount}]),F5("highDensityRouteSolver",HD,e=>[{nodePortPoints:e.uniformPortDistributionSolver?.getOutput()??[],nodePfById:new Map((e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(n=>[n.capacityMeshNodeId,e.portPointPathingSolver?.computeNodePf(n)??null])),colorMap:e.colorMap,connMap:e.connMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth}]),F5("highDensityStitchSolver",j7e,e=>[{connections:e.srjWithPointPairs.connections,hdRoutes:e.highDensityRouteSolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter}]),F5("traceSimplificationSolver",j8,e=>[{hdRoutes:e.highDensityStitchSolver.mergedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,iterations:2}]),F5("traceWidthSolver",aL,e=>[{hdRoutes:e.traceSimplificationSolver.simplifiedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,minTraceWidth:e.minTraceWidth,connection:e.srj.connections,layerCount:e.srj.layerCount}])];getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();const e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeTargetMerger?.visualize(),i=this.singleLayerNodeMerger?.visualize(),r=this.strawSolver?.visualize(),s=this.edgeSolver?.visualize(),a=this.deadEndSolver?.visualize(),A=this.availableSegmentPointSolver?.visualize(),c=this.portPointPathingSolver?.visualize(),l=this.multiSectionPortPointOptimizer?.visualize(),u=this.uniformPortDistributionSolver?.visualize(),g=this.highDensityRouteSolver?.visualize(),h=this.highDensityStitchSolver?.visualize(),d=this.traceSimplificationSolver?.visualize(),p=this.necessaryCrampedPortPointSolver?.visualize(),m=this.highDensityRouteSolver?.visualize(),_=this.srj.outline,f=[];if(f.push({points:[{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.minY??-50},{x:this.srj.bounds?.maxX??50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.maxY??50},{x:this.srj.bounds?.minX??-50,y:this.srj.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),_&&_.length>=2){const x=_.map(E=>({x:E.x,y:E.y}));x.push({...x[0]}),f.push({points:x,strokeColor:"rgba(0, 136, 255, 0.95)"})}const I=z8(this.srj),C={points:[...this.srj.connections.flatMap(x=>x.pointsToConnect.map(E=>({...E,layer:J8(E,this.srj.layerCount),label:`${x.name} ${E.pcb_port_id??""}`})))],rects:[...(this.srj.obstacles??[]).filter(x=>!x.isCopperPour).map(x=>({...x,fill:x.layers?.includes("top")?"rgba(255,0,0,0.25)":x.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(x,this.srj.layerCount),label:I(x)}))],lines:f},y=[C,e,n,o,i,r,s,a,A,p,c,m,l,u,g?Il(C,g):null,h,d,this.solved?Il({lines:f},mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...y)}preview(){if(this.highDensityRouteSolver){const e=[];for(let n=this.highDensityRouteSolver.routes.length-1;n>=0;n--){const o=this.highDensityRouteSolver.routes[n];if(e.push({points:o.route.map(i=>({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length>200)break}return{lines:e}}return this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():{}}_getOutputHdRoutes(){return this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error("Cannot get output before solving is complete");const e=[],n=this._getOutputHdRoutes();for(const o of this.netToPointPairsSolver?.newConnections??[]){const i=o.__netConnectionName??this.srj.connections.find(s=>s.name===o.name)?.__netConnectionName,r=n.filter(s=>s.connectionName===o.name);for(let s=0;s<r.length;s++){const a=r[s],A={type:"pcb_trace",pcb_trace_id:`${o.name}_${s}`,connection_name:i??o.__rootConnectionNames?.[0]??o.name,route:nB(a,this.srj.layerCount)};e.push(A)}}return e}getOutputSimpleRouteJson(){return{...this.srj,traces:this.getOutputSimplifiedPcbTraces()}}},Tno=class{MAX_ITERATIONS=1e3;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};pendingEffects;cacheHit;cacheKey;cacheToSolveSpaceTransform;getSolverName(){return this.constructor.name}step(){if(!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,console.error(this.error),this.failed=!0,e}!this.solved&&this.iterations>this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations (MAX_ITERATIONS=${this.MAX_ITERATIONS})`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}},kno=(t,e)=>{const n=l=>l===" "||l===`
`||l==="\r"||l==="	",o=l=>{let u=0,g=l.length;for(;u<g&&n(l[u]);)u+=1;for(;g>u&&n(l[g-1]);)g-=1;return l.slice(u,g)},i=l=>{const u=[];let g=0,h=0;for(let d=0;d<l.length;d+=1){const p=l[d];p!=="("?p!==")"?p===","&&h===0&&(u.push(o(l.slice(g,d))),g=d+1):h>0&&(h-=1):h+=1}return u.push(o(l.slice(g))),u},r=l=>{return`${u=l,Math.min(1,Math.max(0,u))}`;var u},s=(l=>{const u=o(l);if(!u.startsWith("#"))return null;const g=u.slice(1);if(g.length!==3&&g.length!==6)return null;for(const h of g){const d=h.toLowerCase();if(!(d>="0"&&d<="9")&&!(d>="a"&&d<="f"))return null}if(g.length===3){const[h,d,p]=g;return{r:Number.parseInt(h+h,16),g:Number.parseInt(d+d,16),b:Number.parseInt(p+p,16)}}return{r:Number.parseInt(g.slice(0,2),16),g:Number.parseInt(g.slice(2,4),16),b:Number.parseInt(g.slice(4,6),16)}})(e);if(s)return`rgba(${s.r}, ${s.g}, ${s.b}, ${r(1-t)})`;const a=(l=>{const u=o(l),g=u.indexOf("(");return g<=0||u[u.length-1]!==")"?null:{name:o(u.slice(0,g)).toLowerCase(),args:i(u.slice(g+1,-1))}})(e);if(!a)return e;const{name:A,args:c}=a;if(A==="hsl"||A==="rgb")return c.length!==3?e:`${A}a(${c[0]}, ${c[1]}, ${c[2]}, ${r(1-t)})`;if(A==="hsla"||A==="rgba"){if(c.length!==4)return e;const l=(u=>{const g=o(u);if(!g)return null;const h=Number.parseFloat(g);return Number.isFinite(h)?h:null})(c[3]);return l===null?e:`${A}(${c[0]}, ${c[1]}, ${c[2]}, ${r(l-t)})`}return e},Fno=(t,e)=>{try{return kno(e,t)}catch(n){return console.error(n),t}},aCt=t=>t.rootConnectionName??t.connectionName,gJ=t=>{const e=[];for(let n=0;n<t.route.length-1;n+=1){const o=t.route[n],i=t.route[n+1];if(!o||!i||o.z===i.z||Math.abs(o.x-i.x)>1e-6||Math.abs(o.y-i.y)>1e-6)continue;const r={x:Math.round(1e3*o.x)/1e3,y:Math.round(1e3*o.y)/1e3},s=e.at(-1);s&&s.x===r.x&&s.y===r.y||e.push(r)}return e},CL=(t,e,n=.001)=>Math.abs(t.x-e.x)<=n&&Math.abs(t.y-e.y)<=n,J6e=(t,e)=>({minX:t.center.x-t.width/2+e,maxX:t.center.x+t.width/2-e,minY:t.center.y-t.height/2+e,maxY:t.center.y+t.height/2-e}),W6e=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),dJ=(t,e)=>t.x*e.x+t.y*e.y,ACt=(t,e,n)=>({x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}),X8=t=>{const e=[];for(let n=0;n<t.length;n+=1){const o=t[n];if(o)for(let i=0;i<o.route.length-1;i+=1){const r=o.route[i],s=o.route[i+1];r&&s&&(r.z!==s.z||CL(r,s)||e.push({routeIndex:n,rootConnectionName:aCt(o),startIndex:i,endIndex:i+1,start:r,end:s,z:r.z,traceRadius:(o.traceThickness??.1)/2}))}}return e},hJ=(t,e,n=1e-6)=>{const o=e.end.x-e.start.x,i=e.end.y-e.start.y,r=o*o+i*i;if(r<=n)return{x:e.start.x,y:e.start.y,t:0};const s=((t.x-e.start.x)*o+(t.y-e.start.y)*i)/r,a=(A=s,Math.max(0,Math.min(A,1)));var A;return{x:e.start.x+o*a,y:e.start.y+i*a,t:a}},av=(t,e,n=1e-6)=>{const o=W6e(t.end,t.start),i=W6e(e.end,e.start),r=W6e(t.start,e.start),s=dJ(o,o),a=dJ(o,i),A=dJ(i,i),c=dJ(o,r),l=dJ(i,r),u=s*A-a*a,g=n;let h,d,p=u,m=u;u<=g?(h=0,p=1,d=l,m=A):(h=a*l-A*c,d=s*l-a*c,h<0?(h=0,d=l,m=A):h>p&&(h=p,d=l+a,m=A)),d<0?(d=0,-c<0?h=0:-c>s?h=p:(h=-c,p=s)):d>m&&(d=m,-c+a<0?h=0:-c+a>s?h=p:(h=-c+a,p=s));const _=Math.abs(h)<=g?0:h/p,f=Math.abs(d)<=g?0:d/m,I=ACt(t.start,t.end,_),C=ACt(e.start,e.end,f),y=hJ(t.start,e,n),x=hJ(t.end,e,n),E=hJ(e.start,t,n),B=hJ(e.end,t,n);return[{leftT:_,rightT:f,leftPoint:I,rightPoint:C},{leftT:0,rightT:y.t,leftPoint:t.start,rightPoint:y},{leftT:1,rightT:x.t,leftPoint:t.end,rightPoint:x},{leftT:E.t,rightT:0,leftPoint:E,rightPoint:e.start},{leftT:B.t,rightT:1,leftPoint:B,rightPoint:e.end}].sort((S,Q)=>Math.hypot(S.leftPoint.x-S.rightPoint.x,S.leftPoint.y-S.rightPoint.y)-Math.hypot(Q.leftPoint.x-Q.rightPoint.x,Q.leftPoint.y-Q.rightPoint.y))},h7=1e-6,pJ=t=>{const e=[];for(const n of t){const o=e[n.routeIndex]??[];o[n.startIndex]=n,e[n.routeIndex]=o}return e},cCt=(t,e)=>t<e?[t,e]:[e,t],Oae=(t,e)=>t.some(([n,o])=>n===e[0]&&o===e[1]),lCt=(t,e,n)=>{let o,i=Number.POSITIVE_INFINITY;for(const r of t){if(r.routeIndex!==e.routeIndex||r.z!==e.z||r.endIndex!==e.startIndex&&r.startIndex!==e.endIndex)continue;const[s]=av(r,n);if(!s)continue;const a=Math.hypot(s.leftPoint.x-s.rightPoint.x,s.leftPoint.y-s.rightPoint.y);a>=i||(i=a,o=r)}return o},uCt=(t,e)=>{const n=X8(e),o=X8(t),i=pJ(o),r=[];for(let s=0;s<n.length;s+=1){const a=n[s];if(a)for(let A=s+1;A<n.length;A+=1){const c=n[A];if(!c||a.z!==c.z||a.rootConnectionName===c.rootConnectionName||Math.max(a.start.x,a.end.x)<Math.min(c.start.x,c.end.x)||Math.max(c.start.x,c.end.x)<Math.min(a.start.x,a.end.x)||Math.max(a.start.y,a.end.y)<Math.min(c.start.y,c.end.y)||Math.max(c.start.y,c.end.y)<Math.min(a.start.y,a.end.y))continue;const[l]=av(a,c);if(!l||Math.hypot(l.leftPoint.x-l.rightPoint.x,l.leftPoint.y-l.rightPoint.y)>h7||l.leftT<=h7||l.leftT>=.999999||l.rightT<=h7||l.rightT>=.999999)continue;const u=i[a.routeIndex]?.[a.startIndex],g=i[c.routeIndex]?.[c.startIndex];if(!u||!g)continue;const[h]=av(u,g);if(!h||Math.hypot(h.leftPoint.x-h.rightPoint.x,h.leftPoint.y-h.rightPoint.y)<=h7)continue;const d=lCt(o,u,g),p=lCt(o,g,u),m=d?[u,d]:[u],_=p?[g,p]:[g];for(const f of m)for(const I of _){const C={leftRouteIndex:a.routeIndex,leftStartPointIndex:f.startIndex,rightRouteIndex:c.routeIndex,rightStartPointIndex:I.startIndex};r.some(y=>y.leftRouteIndex===C.leftRouteIndex&&y.leftStartPointIndex===C.leftStartPointIndex&&y.rightRouteIndex===C.rightRouteIndex&&y.rightStartPointIndex===C.rightStartPointIndex)||r.push(C)}}}return r},j6e=t=>{const e=X8(t),n=[];for(let o=0;o<e.length;o+=1){const i=e[o];if(i)for(let r=o+1;r<e.length;r+=1){const s=e[r];if(!s||i.z!==s.z||i.rootConnectionName===s.rootConnectionName)continue;const[a]=av(i,s);if(a&&Math.hypot(a.leftPoint.x-a.rightPoint.x,a.leftPoint.y-a.rightPoint.y)+h7<i.traceRadius+s.traceRadius){const A=cCt(i.routeIndex,s.routeIndex);Oae(n,A)||n.push(A)}}}return n},$6e=(t,e)=>e<=1||e>=t-2,gCt=(t,e)=>e.some(n=>$6e(t,n)),Gae=.2,q6e=.4,Lno=.65+.05,Yae=.03,dCt=1e3,Wu=1e-6,X6e=.015,hCt=t=>Math.round(t*dCt)/dCt,Z6e=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),pCt=(t,e)=>({x:t.x*e,y:t.y*e}),mCt=(t,e)=>t.x*e.x+t.y*e.y,Hno=(t,e,n)=>({x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}),$D=t=>Math.max(0,Math.min(t,1)),yL=(t,e,n)=>Math.max(e,Math.min(t,n)),_Ct=(t,e)=>{const n=(o=>Math.hypot(o.x,o.y))(t);return n<=e||n<=Wu?t:pCt(t,e/n)},fCt=(t,e=0)=>({minX:t.center.x-t.width/2-e,maxX:t.center.x+t.width/2+e,minY:t.center.y-t.height/2-e,maxY:t.center.y+t.height/2+e}),Ono=(t,e,n=0)=>{const o=fCt(e,n);return t.x>=o.minX&&t.x<=o.maxX&&t.y>=o.minY&&t.y<=o.maxY},Gno=(t,e,n)=>{if(t.regionId){const s=e.findIndex(a=>a.capacityMeshNodeId===t.regionId);if(s!==-1)return s}const o=[...t.route.map(({x:s,y:a})=>({x:s,y:a})),...t.vias.map(({x:s,y:a})=>({x:s,y:a}))];let i=-1,r=Number.POSITIVE_INFINITY;for(let s=0;s<e.length;s++){const a=e[s];if(!a||!o.every(c=>Ono(c,a,n)))continue;const A=a.width*a.height;A<r&&(r=A,i=s)}return i},ICt=(t,e,n,o)=>{const i=((r,s,a)=>{const A=Math.min(Math.abs(r.originalX-a.minX),Math.abs(a.maxX-r.originalX)),c=Math.min(Math.abs(r.originalY-a.minY),Math.abs(a.maxY-r.originalY));return Math.abs(A-c)<=Wu?Math.abs(s.x-r.x)>=Math.abs(s.y-r.y)?"y":"x":A<c?"y":"x"})(t,e,n);return _Ct(i==="x"?{x:1.1*(t.x-e.x)*o,y:0}:{x:0,y:1.1*(t.y-e.y)*o},.06*o)},xL=(t,e,n,o,i=3.5,r=.2,s=.4)=>{const a=Math.max(t,0);if(a>=s)return 0;const A=a/r;if(A<1){const u=1-A;return e*u**3*(1+u*i)}const c=(a-r)/Math.max(s-r,Wu),l=e*n*Math.exp(-c*o);return l<1e-5?0:l},Yno=(t,e)=>{const n=t.boundaryPadding>0?.001:0,o=e.minX+t.boundaryPadding+n,i=e.maxX-t.boundaryPadding-n,r=e.minY+t.boundaryPadding+n,s=e.maxY-t.boundaryPadding-n;t.x=yL(t.x,o,i),t.y=yL(t.y,r,s)},e8e=(t,e)=>{for(const n of t)for(const o of n.nodes)Yno(o,e)},CCt=t=>t.kind==="via"?.4:.25,Uno=t=>(t.kind,.5),yCt=t=>t.kind==="via"?12:3.5,Kno=t=>t.kind==="via"?.18:.06,Vno=t=>t.kind==="via"?1.35:1.05,zno=(t,e)=>t.kind==="via"?3*e:e,t8e=(t,e,n,o)=>{const i=2*e;t[i]=(t[i]??0)+n,t[i+1]=(t[i+1]??0)+o},qD=(t,e,n,o,i,r)=>{if(t.fixed||t8e(o,t.node.forceIndex,e,n),!t.fixed&&i&&r!==void 0){const s=2*r;i[s]=(i[s]??0)+e,i[s+1]=(i[s+1]??0)+n}},xCt=(t,e,n,o,i=.5)=>{const{startNode:r,endNode:s}=t,a=1-$D(i),A=$D(i),c=r.fixed?0:a,l=s.fixed?0:A,u=c+l;if(!(u<=Wu)){if(!r.fixed&&c>0){const g=c/u;t8e(o,r.forceIndex,e*g,n*g)}if(!s.fixed&&l>0){const g=l/u;t8e(o,s.forceIndex,e*g,n*g)}}},Jno=(t,e,n,o,i)=>{if(e.fixed)return{x:0,y:0};const{minX:r,maxX:s,minY:a,maxY:A}=t,c=(d=>d.kind==="via"?.65:Gae)(e),l=(d=>d.kind==="via"?Lno:q6e)(e),u=(d=>d.kind==="via"?.015:.08)(e),g=(d=>d.kind==="via"?80:20)(e),h=yCt(e);return{x:xL(n-r,Yae,u,g,h,c,l)*i-xL(s-n,Yae,u,g,h,c,l)*i,y:xL(o-a,Yae,u,g,h,c,l)*i-xL(A-o,Yae,u,g,h,c,l)*i}},Wno=t=>{if(t.length===0)return null;const e=new X4(t.length);for(const n of t){const{startNode:o,endNode:i}=n;e.add(Math.min(o.x,i.x),Math.min(o.y,i.y),Math.max(o.x,i.x),Math.max(o.y,i.y))}return e.finish(),{index:e,segments:t}},ECt=t=>{const e=new Map,n=new Map;for(const o of t){const i=n.get(o.z)??[];i.push(o),n.set(o.z,i)}for(const[o,i]of n){const r=Wno(i);r&&e.set(o,r)}return{byLayer:e}},BCt=(t,e,n,o,i)=>{const r=a=>({candidateIndexes:a.index.search(n-i,o-i,n+i,o+i),segments:a.segments});if(e.kind==="point"){const a=t.byLayer.get(e.z);return a?[r(a)]:[]}const s=[];for(const a of t.byLayer.values())s.push(r(a));return s},jno=t=>{const e=[];for(let n=0;n<t.length;n+=1){const o=t[n];if(!o)continue;const i=new Set;for(let r=0;r<o.route.length-1;r+=1){const s=o.route[r],a=o.route[r+1];if(!s||!a||s.z===a.z||!CL(s,a))continue;const A=[r,r+1];for(let u=r-1;u>=0;u-=1){const g=o.route[u];if(!g||!CL(g,s))break;A.push(u)}for(let u=r+2;u<o.route.length;u+=1){const g=o.route[u];if(!g||!CL(g,s))break;A.push(u)}const c=[...new Set(A)].sort((u,g)=>u-g);let l=!1;for(const u of c)if(i.has(u)){l=!0;break}if(!l){for(const u of c)i.add(u);e.push({routeIndex:n,rootConnectionName:aCt(o),pointIndexes:c,x:s.x,y:s.y,radius:(o.viaDiameter??.3)/2,movable:!gCt(o.route.length,c)})}}}return e},n8e=t=>{const{routes:e,via:n,dx:o,dy:i,node:r}=t;if(!n.movable)return!1;n.x+=o,n.y+=i,((a,A)=>{const c=J6e(A,a.radius+Wu);a.x=yL(a.x,c.minX,c.maxX),a.y=yL(a.y,c.minY,c.maxY)})(n,r);const s=e[n.routeIndex];if(!s)return!1;for(const a of n.pointIndexes){const A=s.route[a];A&&(A.x=n.x,A.y=n.y)}return!0},$no=t=>{const{routes:e,node:n,vias:o}=t;let i=!1;for(let r=0;r<o.length;r+=1){const s=o[r];if(s)for(let a=r+1;a<o.length;a+=1){const A=o[a];if(!A)continue;const c=s.radius+A.radius+.1+X6e,l=s.x-A.x,u=s.y-A.y,g=Math.hypot(l,u),h=c-g;if(h<=0)continue;const d=1.61803398875*(97*r+13*a),p=g>Wu?l/g:Math.cos(d),m=g>Wu?u/g:Math.sin(d),_=Number(s.movable)+Number(A.movable);if(_===0)continue;const f=Math.min(.04,h/_);i=n8e({routes:e,via:s,dx:p*f,dy:m*f,node:n})||i,i=n8e({routes:e,via:A,dx:-p*f,dy:-m*f,node:n})||i}}return i},qno=t=>{const{routes:e,node:n,vias:o,segments:i}=t;let r=!1;for(let s=0;s<o.length;s+=1){const a=o[s];if(a?.movable)for(const A of i){if(a.rootConnectionName===A.rootConnectionName)continue;const c=hJ(a,A),l=a.x-c.x,u=a.y-c.y,g=Math.hypot(l,u),h=a.radius+A.traceRadius+.1+X6e-g;if(h<=0)continue;const d=A.end.x-A.start.x,p=A.end.y-A.start.y,m=Math.hypot(d,p),_=s%2==0?1:-1,f=g>Wu?l/g:m>Wu?-p/m*_:1,I=g>Wu?u/g:m>Wu?d/m*_:0,C=Math.min(.04,h);r=n8e({routes:e,via:a,dx:f*C,dy:I*C,node:n})||r}}return r},bCt=t=>{const{routes:e,routeIndex:n,pointIndex:o,dx:i,dy:r,node:s}=t,a=e[n];if(!a||o<=0||o>=a.route.length-1)return!1;const A=((u,g,h=.001)=>{const d=u[g];if(!d)return[];const p=[g];for(let m=g-1;m>=0;m-=1){const _=u[m];if(!_||!CL(_,d,h))break;p.push(m)}for(let m=g+1;m<u.length;m+=1){const _=u[m];if(!_||!CL(_,d,h))break;p.push(m)}return[...new Set(p)]})(a.route,o);if(gCt(a.route.length,A))return!1;const c=J6e(s,Wu);let l=!1;for(const u of A){const g=a.route[u];g&&(g.x=yL(g.x+i,c.minX,c.maxX),g.y=yL(g.y+r,c.minY,c.maxY),l=!0)}return l},o8e=t=>{const{routes:e,segment:n,dx:o,dy:i,node:r,t:s}=t,a=1-$D(s),A=$D(s),c=bCt({routes:e,routeIndex:n.routeIndex,pointIndex:n.startIndex,dx:o*a,dy:i*a,node:r}),l=bCt({routes:e,routeIndex:n.routeIndex,pointIndex:n.endIndex,dx:o*A,dy:i*A,node:r});return c||l},SCt=t=>{const{routes:e,node:n,segments:o,movableRouteIndexes:i}=t;let r=!1;for(let s=0;s<o.length;s+=1){const a=o[s];if(a)for(let A=s+1;A<o.length;A+=1){const c=o[A];if(!c||a.z!==c.z||a.rootConnectionName===c.rootConnectionName)continue;const l=a.traceRadius+c.traceRadius+.1+X6e;if(Math.max(a.start.x,a.end.x)+l<=Math.min(c.start.x,c.end.x)||Math.max(c.start.x,c.end.x)+l<=Math.min(a.start.x,a.end.x)||Math.max(a.start.y,a.end.y)+l<=Math.min(c.start.y,c.end.y)||Math.max(c.start.y,c.end.y)+l<=Math.min(a.start.y,a.end.y))continue;const[u]=av(a,c);if(!u)continue;const g=u.leftPoint.x-u.rightPoint.x,h=u.leftPoint.y-u.rightPoint.y,d=Math.hypot(g,h),p=l-d;if(p<=0)continue;const m=!i||i.has(a.routeIndex),_=!i||i.has(c.routeIndex),f=Number(m)+Number(_);if(f===0)continue;const I=a.end.x-a.start.x,C=a.end.y-a.start.y,y=Math.hypot(I,C),x=(s+A)%2==0?1:-1,E=d>Wu?g/d:y>Wu?-C/y*x:1,B=d>Wu?h/d:y>Wu?I/y*x:0,S=Math.min(.025,p/f);m&&(r=o8e({routes:e,segment:a,dx:E*S,dy:B*S,node:n,t:u.leftT})||r),_&&(r=o8e({routes:e,segment:c,dx:-E*S,dy:-B*S,node:n,t:u.rightT})||r)}}return r},QCt=(t,e)=>{for(let n=0;n<10;n+=1){const o=jno(e),i=X8(e),r=$no({routes:e,node:t,vias:o}),s=qno({routes:e,node:t,vias:o,segments:i}),a=SCt({routes:e,node:t,segments:i});if(!r&&!s&&!a)break}for(const n of e)n.vias=gJ(n);return e},Xno=(t,e,n)=>{for(let o=0;o<10&&SCt({routes:e,node:t,segments:X8(e),movableRouteIndexes:n});o+=1);for(const o of n){const i=e[o];i&&(i.vias=gJ(i))}return e},vCt=(t,e,n,o,i,r=3,s=.02)=>{for(let a=0;a<r;a+=1){i.fill(0);const A=ECt(o);for(let c=0;c<n.length;c+=1){const l=n[c];if(!l||l.kind!=="via")continue;const u=l.node;for(let g=c+1;g<n.length;g+=1){const h=n[g];if(!h||h.kind!=="via"||l.rootConnectionName===h.rootConnectionName)continue;const d=h.node,p=u.x-d.x,m=u.y-d.y;if(Math.abs(p)>=Gae||Math.abs(m)>=Gae)continue;const _=Math.hypot(p,m),f=Gae-_;if(f<=0)continue;let I=0,C=0;if(_>Wu){const B=1/_;I=p*B,C=m*B}else{const B=1.61803398875*(1009*a+97*c+13*g);I=Math.cos(B),C=Math.sin(B)}const y=Math.min(s,.9*f),x=I*y,E=C*y;qD(l,x,E,i),qD(h,-x,-E,i)}}for(let c=0;c<n.length;c+=1){const l=n[c];if(!l)continue;const u=l.node,g=CCt(l),h=BCt(A,l,u.x,u.y,g);for(const d of h)for(const p of d.candidateIndexes){const m=d.segments[p];if(!m||l.rootConnectionName===m.rootConnectionName)continue;const{startNode:_,endNode:f}=m,I=f.x-_.x,C=f.y-_.y,y=I*I+C*C;if(y<=Wu)continue;const x=u.x-_.x,E=u.y-_.y,B=$D((x*I+E*C)/y),S=_.x+I*B,Q=_.y+C*B,w=u.x-S,M=u.y-Q,k=Math.hypot(w,M),R=g-k;if(R<=0)continue;const F=1009*a+97*c+13*m.obstacleIndex;let O=0,U=0;if(k>Wu){const j=1/k;O=w*j,U=M*j}else{const j=-C,J=I,oe=Math.hypot(j,J);if(oe>Wu){const ie=(F%2==0?1:-1)/oe;O=j*ie,U=J*ie}else{const ie=1.61803398875*F;O=Math.cos(ie),U=Math.sin(ie)}}const Y=Math.min(zno(l,s),R*Vno(l)),W=O*Y,te=U*Y;qD(l,W,te,i),xCt(m,-W,-te,i,B)}}for(let c=0;c<e.length;c+=1){const l=e[c];if(l)for(let u=0;u<l.nodes.length;u+=1){const g=l.nodes[u];if(!g||g.fixed)continue;const h=2*g.forceIndex;let d=i[h]??0,p=i[h+1]??0;const m=Math.hypot(d,p);if(m>s&&m>Wu){const _=s/m;d*=_,p*=_}g.x+=d,g.y+=p}}e8e(e,t)}},wCt=(t,e,n,o)=>{const{mutableRoutes:i,totalNodeCount:r}=(h=>{let d=0;return{mutableRoutes:h.map(p=>{const m=[],_=new Int32Array(p.route.length);_.fill(-1);for(let f=0;f<p.route.length;f+=1){const I=p.route[f];if(!I)continue;const C=p.route[f-1],y=m.at(-1),x=m.length-1;y&&C&&C.x===I.x&&C.y===I.y?(C.z!==I.z&&(y.boundaryPadding=Math.max(y.boundaryPadding,p.viaDiameter/2)),y.pointIndexes.push(f),y.fixed||=$6e(p.route.length,f),_[f]=x):(m.push({x:I.x,y:I.y,originalX:I.x,originalY:I.y,boundaryPadding:0,pointIndexes:[f],fixed:$6e(p.route.length,f),forceIndex:d}),_[f]=m.length-1,d+=1)}return{route:p,rootConnectionName:p.rootConnectionName??p.connectionName,nodes:m,pointNodeIndexes:_}}),totalNodeCount:d}})(e),s=(h=>{const d=[];for(let p=0;p<h.length;p+=1){const m=h[p];if(m)for(let _=0;_<m.nodes.length;_+=1){const f=m.nodes[_],I=f?.pointIndexes[0],C=I===void 0?void 0:m.route.route[I];f&&C&&(f.pointIndexes.length>1?d.push({kind:"via",routeIndex:p,rootConnectionName:m.rootConnectionName,node:f,fixed:f.fixed}):d.push({kind:"point",routeIndex:p,rootConnectionName:m.rootConnectionName,node:f,z:C.z,fixed:f.fixed}))}}return d})(i),a=(h=>{const d=[];for(let p=0;p<h.length;p+=1){const m=h[p];if(m)for(let _=0;_<m.nodes.length-1;_+=1){const f=m.nodes[_],I=m.nodes[_+1],C=f?.pointIndexes[0],y=C===void 0?void 0:m.route.route[C];f&&I&&y&&d.push({obstacleIndex:d.length,rootConnectionName:m.rootConnectionName,z:y.z,startNode:f,endNode:I})}}return d})(i),A=new Float64Array(2*r),c=new Float64Array(2*r),l=o?.includeForceVectors??!0;e8e(i,t);let u=[];for(let h=0;h<n;h+=1){const d=n<=1?0:h/Math.max(n-1,1),p=.25+.75*(1-d),m=1-d,_=l&&h===n-1,f=_?new Float64Array(2*s.length):void 0;A.fill(0);for(let C=0;C<s.length;C+=1){const y=s[C];if(!y||y.kind!=="via")continue;const x=y.node;for(let E=C+1;E<s.length;E+=1){const B=s[E];if(!B||B.kind!=="via"||y.rootConnectionName===B.rootConnectionName)continue;const S=B.node,Q=x.x-S.x,w=x.y-S.y;if(Math.abs(Q)>=q6e||Math.abs(w)>=q6e)continue;const M=Math.hypot(Q,w);let k=0,R=0;if(M>Wu){const Y=1/M;k=Q*Y,R=w*Y}else{const Y=1.61803398875*(97*C+13*E);k=Math.cos(Y),R=Math.sin(Y)}const F=xL(M,.034,.08,18)*p;if(F<=0)continue;const O=k*F,U=R*F;qD(y,O,U,A,f,C),qD(B,-O,-U,A,f,E)}}const I=ECt(a);for(let C=0;C<s.length;C+=1){const y=s[C];if(!y)continue;const x=y.node,E=Uno(y),B=BCt(I,y,x.x,x.y,E);for(const S of B)for(const Q of S.candidateIndexes){const w=S.segments[Q];if(!w||y.rootConnectionName===w.rootConnectionName)continue;const{startNode:M,endNode:k}=w,R=k.x-M.x,F=k.y-M.y,O=R*R+F*F;if(O<=Wu)continue;const U=x.x-M.x,Y=x.y-M.y,W=$D((U*R+Y*F)/O),te=M.x+R*W,j=M.y+F*W,J=x.x-te,oe=x.y-j,ie=Math.hypot(J,oe),ne=97*C+13*w.obstacleIndex;let le=0,ge=0;if(ie>Wu){const pe=1/ie;le=J*pe,ge=oe*pe}else{const pe=-F,ye=R,Me=Math.hypot(pe,ye);if(Me>Wu){const ve=(ne%2==0?1:-1)/Me;le=pe*ve,ge=ye*ve}else{const ve=1.61803398875*ne;le=Math.cos(ve),ge=Math.sin(ve)}}const _e=xL(ie,Kno(y),.08,18,yCt(y),CCt(y),E)*p;if(_e<=0)continue;const ue=le*_e,fe=ge*_e;qD(y,ue,fe,A,f,C),xCt(w,-ue,-fe,A,W)}}_&&(u=new Array(s.length));for(let C=0;C<s.length;C+=1){const y=s[C];if(!y)continue;const x=y.node,E=Jno(t,y,x.x,x.y,p);if(qD(y,E.x,E.y,A,f,C),_&&f){const B=2*C;u[C]={kind:y.kind,routeIndex:y.routeIndex,rootConnectionName:y.rootConnectionName,x:x.x,y:x.y,dx:f[B]??0,dy:f[B+1]??0}}}for(let C=0;C<i.length;C+=1){const y=i[C];if(!y)continue;const x=y.nodes.length-2;for(let E=0;E<y.nodes.length;E+=1){const B=y.nodes[E];if(!B||B.fixed)continue;const S=2*B.forceIndex;let Q=(A[S]??0)+.14*(B.originalX-B.x),w=(A[S+1]??0)+.14*(B.originalY-B.y),M=0,k=0,R=0,F=0;const O=y.nodes[E-1],U=y.nodes[E+1];if(O||U){let J=0,oe=0,ie=0;if(O&&(J+=O.x,oe+=O.y,ie+=1),U&&(J+=U.x,oe+=U.y,ie+=1),ie>0){const ne=1/ie;Q+=.22*(J*ne-B.x),w+=.22*(oe*ne-B.y)}}if(O&&U&&m>0){const J=Z6e(U,O),oe=mCt(J,J);if(oe>Wu){const ie=$D(mCt(Z6e(B,O),J)/oe),ne=Hno(O,U,ie),le=_Ct(pCt(Z6e(ne,B),.55*m),.02*m);M=le.x,k=le.y}}if(m>0){if(E===1&&O?.fixed){const J=ICt(O,B,t,m);R+=J.x,F+=J.y}if(E===x&&U?.fixed){const J=ICt(U,B,t,m);R+=J.x,F+=J.y}}let Y=.85*Q*p,W=.85*w*p;const te=Math.hypot(Y,W),j=.012*p;if(te>j&&te>Wu){const J=j/te;Y*=J,W*=J}B.x+=Y+M+R,B.y+=W+k+F}}e8e(i,t),vCt(t,i,s,a,c,3,.02)}return vCt(t,i,s,a,c,8,.03),{routes:(h=>h.map(({route:d,nodes:p,pointNodeIndexes:m})=>{const _=d.route.map((I,C)=>{const y=m[C]??-1,x=y>=0?p[y]:void 0;return x?{...I,x:hCt(x.x),y:hCt(x.y)}:I}),f={...d,route:_,vias:[]};return f.vias=gJ(f),f}))(i),forceVectors:u,stepsCompleted:n}},mJ=class extends Tno{sampleEntries;originalHdRoutes;originalNodeWithPortPoints;colorMap;totalStepsPerNode;nodeAssignmentMargin;improvedRoutesByIndex=new Map;activeSampleIndex=0;latestVisualization={};constructor(e){super(),this.originalHdRoutes=e.hdRoutes,this.originalNodeWithPortPoints=e.nodeWithPortPoints,this.colorMap=e.colorMap??{},this.totalStepsPerNode=e.totalStepsPerNode??60,this.nodeAssignmentMargin=e.nodeAssignmentMargin??.2;const n=new Map;for(let o=0;o<e.hdRoutes.length;o++){const i=Gno(e.hdRoutes[o],e.nodeWithPortPoints,this.nodeAssignmentMargin);if(i===-1)continue;const r=n.get(i)??[];r.push(o),n.set(i,r)}this.sampleEntries=Array.from(n.entries()).map(([o,i])=>({node:e.nodeWithPortPoints[o],routeIndexes:i})),this.MAX_ITERATIONS=Math.max(10*this.sampleEntries.length,1e3),this.stats={nodeAssignmentMargin:this.nodeAssignmentMargin,sampleCount:this.sampleEntries.length,improvedNodeCount:0,improvedRouteCount:0,totalStepsPerNode:this.totalStepsPerNode}}getSolverName(){return"HighDensityForceImproveSolver"}getConstructorParams(){return[{nodeWithPortPoints:this.originalNodeWithPortPoints,hdRoutes:this.originalHdRoutes,totalStepsPerNode:this.totalStepsPerNode,nodeAssignmentMargin:this.nodeAssignmentMargin,colorMap:this.colorMap}]}_step(){const e=this.sampleEntries[this.activeSampleIndex];if(!e)return void(this.solved=!0);const n=fCt(e.node),o=e.routeIndexes.map(a=>this.originalHdRoutes[a]),i=wCt(n,o,this.totalStepsPerNode,{includeForceVectors:!0});QCt(e.node,i.routes);const r=uCt(o,i.routes);let s=r.length===0?i:wCt(n,((a,A)=>{const{routes:c,node:l,selectors:u}=a,g=structuredClone(c),h=X8(c),d=pJ(h),p=u.flatMap(m=>{const _=d[m.leftRouteIndex]?.[m.leftStartPointIndex],f=d[m.rightRouteIndex]?.[m.rightStartPointIndex];if(!_||!f)return[];const[I]=av(_,f);if(!I)return[];const C=I.leftPoint.x-I.rightPoint.x,y=I.leftPoint.y-I.rightPoint.y,x=Math.hypot(C,y);return x<=h7?[]:[{selector:m,directionX:C/x,directionY:y/x,requiredDistance:_.traceRadius+f.traceRadius+.015}]});for(let m=0;m<3;m+=1){const _=X8(g),f=pJ(_);for(const I of p){const C=f[I.selector.leftRouteIndex]?.[I.selector.leftStartPointIndex],y=f[I.selector.rightRouteIndex]?.[I.selector.rightStartPointIndex];if(!C||!y)continue;const[x]=av(C,y);if(!x)continue;const E=(x.leftPoint.x-x.rightPoint.x)*I.directionX+(x.leftPoint.y-x.rightPoint.y)*I.directionY,B=I.requiredDistance-E;if(B<=0)continue;const S=Math.min(.025,B/2);A({routes:g,segment:C,dx:I.directionX*S,dy:I.directionY*S,node:l,t:x.leftT}),A({routes:g,segment:y,dx:-I.directionX*S,dy:-I.directionY*S,node:l,t:x.rightT})}}for(const m of g)m.vias=gJ(m);return g})({routes:o,node:e.node,selectors:r},o8e),this.totalStepsPerNode,{includeForceVectors:!0});if(s!==i){QCt(e.node,s.routes);const a=uCt(o,s.routes);if(a.length>0){const A=((c,l)=>{const{originalRoutes:u,guardedRoutes:g,node:h,crossingSelectors:d,protectedSelectors:p}=c,m=pJ(X8(u)),_=pJ(X8(g)),f=j6e(g),I=p.map(({leftRouteIndex:y,rightRouteIndex:x})=>cCt(y,x)),C=J6e(h,h7);for(const y of d){const x=_[y.leftRouteIndex]?.[y.leftStartPointIndex],E=_[y.rightRouteIndex]?.[y.rightStartPointIndex];if(!x||!E)continue;const[B]=av(x,E);if(!(!B||Math.hypot(B.leftPoint.x-B.rightPoint.x,B.leftPoint.y-B.rightPoint.y)>h7||B.leftT<=h7||B.leftT>=.999999||B.rightT<=h7||B.rightT>=.999999))for(const S of["right","left"]){const Q=S==="left"?y.leftRouteIndex:y.rightRouteIndex,w=S==="left"?y.leftStartPointIndex:y.rightStartPointIndex,M=S==="left"?y.rightRouteIndex:y.leftRouteIndex,k=S==="left"?y.rightStartPointIndex:y.leftStartPointIndex,R=u[Q],F=g[Q],O=m[M]?.[k],U=_[M]?.[k];if(!(R&&F&&O&&U))continue;const Y=R.route[w]?.z,W=[];for(let te=w-2;te<=w+3;te+=1){const j=R.route[te];!j||te<=0||te>=R.route.length-1||j.z!==Y||[R.route[te-1],R.route[te+1]].some(J=>J&&J.z!==j.z)||W.push(te)}if(W.length!==0)for(const[te,j]of[[O.start,U.start],[O.end,U.end]])for(const J of[1.51,1.25,1.75,2]){const oe=[...g],ie=structuredClone(F);oe[Q]=ie;let ne=!0;for(const ue of W){const fe=R.route[ue],pe=ie.route[ue];if(!fe||!pe)continue;const ye=j.x+(fe.x-te.x)*J,Me=j.y+(fe.y-te.y)*J;if(ye<=C.minX||ye>=C.maxX||Me<=C.minY||Me>=C.maxY){ne=!1;break}pe.x=ye,pe.y=Me}if(!ne)continue;ie.vias=gJ(ie);let le=oe,ge=j6e(le);const _e=new Set;for(const[ue,fe]of ge)Oae(f,[ue,fe])||(ue===Q&&fe!==Q?_e.add(fe):fe===Q&&ue!==Q&&_e.add(ue));if(_e.size>0){const ue=l(h,structuredClone(oe),_e),fe=j6e(ue);I.every(pe=>!Oae(fe,pe))&&fe.length<ge.length&&(le=ue,ge=fe)}if(I.every(ue=>!Oae(ge,ue))&&ge.length<f.length)return le}}}})({originalRoutes:o,guardedRoutes:s.routes,node:e.node,crossingSelectors:a,protectedSelectors:[...r,...a]},Xno);A&&(s={...s,routes:A})}}for(let a=0;a<e.routeIndexes.length;a++)this.improvedRoutesByIndex.set(e.routeIndexes[a],s.routes[a]);this.latestVisualization=PCt({node:e.node,routes:s.routes,forceVectors:s.forceVectors,colorMap:this.colorMap}),this.activeSampleIndex+=1,this.stats={nodeAssignmentMargin:this.nodeAssignmentMargin,sampleCount:this.sampleEntries.length,improvedNodeCount:this.activeSampleIndex,improvedRouteCount:this.improvedRoutesByIndex.size,totalStepsPerNode:this.totalStepsPerNode},this.activeSampleIndex>=this.sampleEntries.length&&(this.solved=!0)}getOutput(){return this.originalHdRoutes.map((e,n)=>this.improvedRoutesByIndex.get(n)??e)}visualize(){return this.solved?PCt({routes:this.getOutput(),colorMap:this.colorMap}):this.latestVisualization}},PCt=t=>{const e=[],n=[],o=[];t.node&&o.push({center:t.node.center,width:t.node.width,height:t.node.height,stroke:"rgba(14,165,233,0.7)",fill:"rgba(14,165,233,0.04)",label:t.node.capacityMeshNodeId});for(const i of t.routes){const r=t.colorMap?.[i.connectionName]??"#0ea5e9";for(let s=0;s<i.route.length-1;s++){const a=i.route[s],A=i.route[s+1];a.z===A.z&&e.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeColor:a.z===0?r:Fno(r,.5),strokeWidth:i.traceThickness,layer:`z${a.z}`,strokeDash:a.z!==0?[.1,.3]:void 0})}for(const s of i.vias)n.push({center:{x:s.x,y:s.y},radius:i.viaDiameter/2,stroke:r,fill:"rgba(14,165,233,0.12)"})}for(const i of t.forceVectors??[])e.push({points:[{x:i.x,y:i.y},{x:i.x+5*i.dx,y:i.y+5*i.dy}],strokeColor:"rgba(244,63,94,0.85)",strokeWidth:.06,strokeDash:[.08,.08]});return{lines:e,circles:n,rects:o}},_J=.005,i8e=1e-6,Uae=(t,e)=>({minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}),MCt=t=>Uae({minX:Math.min(t.start.x,t.end.x),minY:Math.min(t.start.y,t.end.y),maxX:Math.max(t.start.x,t.end.x),maxY:Math.max(t.start.y,t.end.y)},t.width/2),Kae=t=>{const e=t.diameter/2;return{minX:t.x-e,minY:t.y-e,maxX:t.x+e,maxY:t.y+e}},r8e=t=>({minX:t.x-t.width/2,minY:t.y-t.height/2,maxX:t.x+t.width/2,maxY:t.y+t.height/2}),DCt=(t,e)=>`${t}:${e}`,s8e=class{constructor(e){this.cellSize=e}cellSize;cells=new Map;insert(e,n){const o=Math.floor(n.minX/this.cellSize),i=Math.floor(n.maxX/this.cellSize),r=Math.floor(n.minY/this.cellSize),s=Math.floor(n.maxY/this.cellSize);for(let a=o;a<=i;a+=1)for(let A=r;A<=s;A+=1){const c=DCt(a,A),l=this.cells.get(c);l?l.push(e):this.cells.set(c,[e])}}query(e){const n=Math.floor(e.minX/this.cellSize),o=Math.floor(e.maxX/this.cellSize),i=Math.floor(e.minY/this.cellSize),r=Math.floor(e.maxY/this.cellSize),s=new Set;for(let a=n;a<=o;a+=1)for(let A=i;A<=r;A+=1){const c=this.cells.get(DCt(a,A));if(c)for(const l of c)s.add(l)}return[...s]}},Zno=(t,e)=>{const n=DD(t.start,t.end,e.start,e.end);if(n)return n;const o=[{left:t.start,right:z_(t.start,e.start,e.end)},{left:t.end,right:z_(t.end,e.start,e.end)},{left:z_(e.start,t.start,t.end),right:e.start},{left:z_(e.end,t.start,t.end),right:e.end}];let i={left:t.start,right:e.start},r=Number.POSITIVE_INFINITY;for(const s of o){const a=Math.hypot(s.left.x-s.right.x,s.left.y-s.right.y);a<r&&(i=s,r=a)}return{x:(i.left.x+i.right.x)/2,y:(i.left.y+i.right.y)/2}},NCt=(t,e)=>{const n=z_(e,t.start,t.end);return{x:(n.x+e.x)/2,y:(n.y+e.y)/2}},eoo=(t,e)=>{const n=z_({x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2},t.start,t.end),o=Math.max(e.minX,Math.min(e.maxX,n.x)),i=Math.max(e.minY,Math.min(e.maxY,n.y));return{x:(n.x+o)/2,y:(n.y+i)/2}},too=t=>{const e=new Set;for(const n of t.route)n.route_type==="wire"&&(n.start_pcb_port_id&&e.add(n.start_pcb_port_id),n.end_pcb_port_id&&e.add(n.end_pcb_port_id));return[...e]},a8e=(t,e,n)=>n<0?`PCB trace ${t} overlaps with ${e} (accidental contact)`:`PCB trace ${t} is too close to ${e} (gap: ${n.toFixed(3)}mm)`,fJ=class{constructor(e,n={}){if(this.srj=e,this.traceClearance=n.traceClearance??.1,this.viaClearance=Math.max(n.viaClearance??.1,.1),this.viaToPadClearance=n.viaToPadClearance??this.srj.minViaEdgeToPadEdgeClearance??.1,this.connMap=n.connMap,this.includeTraceViaOwnerMetadata=n.includeTraceViaOwnerMetadata??!1,this.cellSize=n.spatialCellSize??this.getDefaultSpatialCellSize(),!Number.isFinite(this.traceClearance)||this.traceClearance<0)throw new Error("traceClearance must be a non-negative finite number");if(!Number.isFinite(this.viaClearance))throw new Error("viaClearance must be a finite number");if(!Number.isFinite(this.viaToPadClearance)||this.viaToPadClearance<0)throw new Error("viaToPadClearance must be a non-negative finite number");if(!Number.isFinite(this.cellSize)||this.cellSize<=0)throw new Error("spatialCellSize must be a positive finite number");this.compileConnectionAliases(),this.obstacles=this.compileStaticObstacles(),this.indexStaticObstacles()}srj;traceClearance;viaClearance;viaToPadClearance;cellSize;connMap;includeTraceViaOwnerMetadata;canonicalNetByAlias=new Map;connMapNetByCanonicalNet=new Map;obstacles;obstacleIndexesByLayer=new Map;lastRunStats={traceCount:0,segmentCount:0,viaCount:0,obstacleCount:0,broadPhaseCandidateCount:0,exactCheckCount:0};getDefaultSpatialCellSize(){const e=Math.max(0,this.srj.bounds.maxX-this.srj.bounds.minX),n=Math.max(0,this.srj.bounds.maxY-this.srj.bounds.minY);return Math.max(.25,Math.max(e,n)/64,(this.srj.minViaDiameter??.3)+Math.max(this.traceClearance,this.viaToPadClearance))}compileConnectionAliases(){const e=new Map;for(const n of this.srj.connections){const o=n.netConnectionName??n.rootConnectionName??n.name,i=[n.name,n.rootConnectionName,n.netConnectionName,...n.mergedConnectionNames??[],...n.pointsToConnect.flatMap(r=>[r.pointId,r.pcb_port_id])];for(const r of i){if(!r)continue;this.canonicalNetByAlias.set(r,o);const s=this.connMap?.getNetConnectedToId(r);if(!s)continue;let a=e.get(o);a||(a=new Set,e.set(o,a)),a.add(s)}this.canonicalNetByAlias.set(o,o)}for(const[n,o]of e)o.size===1&&this.connMapNetByCanonicalNet.set(n,o.values().next().value)}resolveNetId(e){const n=this.connMap?.getNetConnectedToId(e);if(n)return n;const o=this.canonicalNetByAlias.get(e);return o?this.connMapNetByCanonicalNet.get(o)??o:e}areConnected(e,n){return e===n||!!this.connMap?.areIdsConnected(e,n)||this.resolveNetId(e)===this.resolveNetId(n)}compileStaticObstacles(){const e=[],n=new Set,o=new Set;for(const i of this.srj.obstacles){if(i.layers.length===0)continue;const r=i.connectedTo.find(h=>h.startsWith("pcb_smtpad_")),s=i.connectedTo.find(h=>h.startsWith("pcb_plated_hole_")),a=i.connectedTo.find(h=>h.startsWith("pcb_port_"));if(!r&&!s&&!a)continue;const A=i.layers.length>1,c=A?"pcb_plated_hole":"pcb_smtpad",l=A?s??`pcb_plated_hole_${i.center.x.toFixed(3)}_${i.center.y.toFixed(3)}`:r??`pcb_smtpad_${i.center.x.toFixed(3)}_${i.center.y.toFixed(3)}`,u=A?o:n;if(u.has(l))continue;u.add(l);const g=A&&Math.abs(i.width-i.height)<.001;e.push({kind:"obstacle",obstacleType:c,obstacleId:l,connectedTo:i.connectedTo,x:i.center.x,y:i.center.y,width:i.width,height:i.height,...g?{radius:Math.max(i.width,i.height)/2}:{},layers:i.layers,...a?{pcbPortId:a}:{}})}return e}indexStaticObstacles(){for(const e of this.obstacles){const n=Uae(r8e(e),Math.max(this.traceClearance,this.viaToPadClearance));for(const o of e.layers){let i=this.obstacleIndexesByLayer.get(o);i||(i=new s8e(this.cellSize),this.obstacleIndexesByLayer.set(o,i)),i.insert(e,n)}}}collectDynamicGeometry(e){const n=[],o=[],i=new Set;for(const r of e){const s=this.resolveNetId(r.connection_name),a=too(r);for(let A=0;A<r.route.length-1;A+=1){const c=r.route[A],l=r.route[A+1];c?.route_type==="wire"&&l?.route_type==="wire"&&c.layer===l.layer&&(Math.abs(c.x-l.x)<=i8e&&Math.abs(c.y-l.y)<=i8e||n.push({kind:"trace_segment",order:n.length,traceId:r.pcb_trace_id,netId:s,start:{x:c.x,y:c.y},end:{x:l.x,y:l.y},width:noo(c,l),layer:c.layer,pcbPortIds:a}))}for(const A of r.route){if(A.route_type!=="via")continue;const c=`${A.x},${A.y},${A.from_layer},${A.to_layer}`;i.has(c)||(i.add(c),o.push({kind:"via",order:o.length,viaId:`via_${o.length}`,traceId:r.pcb_trace_id,netId:s,x:A.x,y:A.y,diameter:A.via_diameter??this.srj.minViaDiameter??.3,layers:[A.from_layer,A.to_layer]}))}}return{segments:n,vias:o}}buildDynamicIndexes(e,n){const o=new Map,i=(r,s,a)=>{let A=o.get(r);A||(A=new s8e(this.cellSize),o.set(r,A)),A.insert(s,Uae(a,this.traceClearance))};for(const r of e)i(r.layer,r,MCt(r));for(const r of n)for(const s of r.layers)i(s,r,Kae(r));return o}obstacleSharesNet(e,n){return n.connectedTo.some(o=>this.areConnected(e,o))}checkTracePair(e,n){if(this.areConnected(e.netId,n.netId))return;this.lastRunStats.exactCheckCount+=1;const o=M5(e.start,e.end,n.start,n.end)-e.width/2-n.width/2;if(o>this.traceClearance-_J)return;const i=`overlap_${e.traceId}_${n.traceId}`;return{type:"pcb_trace_error",error_type:"pcb_trace_error",message:a8e(e.traceId,`PCB trace ${n.traceId}`,o),pcb_trace_id:e.traceId,source_trace_id:"",pcb_trace_error_id:i,minimum_clearance:this.traceClearance,actual_clearance:o,pcb_component_ids:[],pcb_port_ids:[...new Set([...e.pcbPortIds,...n.pcbPortIds])],center:Zno(e,n)}}checkTraceVia(e,n){if(this.areConnected(e.netId,n.netId))return;this.lastRunStats.exactCheckCount+=1;const o=Nz(e.start,e.end,{x:n.x,y:n.y,radius:n.diameter/2})-e.width/2;if(o>this.traceClearance-_J)return;const i=`overlap_${e.traceId}_${n.viaId}`;return{type:"pcb_trace_error",error_type:"pcb_trace_error",message:a8e(e.traceId,`pcb_via "${n.viaId}"`,o),pcb_trace_id:e.traceId,...this.includeTraceViaOwnerMetadata?{pcb_trace_ids:[e.traceId,n.traceId],pcb_via_id:n.viaId,pcb_via_ids:[n.viaId]}:{},source_trace_id:"",pcb_trace_error_id:i,minimum_clearance:this.traceClearance,actual_clearance:o,pcb_component_ids:[],pcb_port_ids:e.pcbPortIds,center:NCt(e,n)}}checkTraceObstacle(e,n){if(this.obstacleSharesNet(e.netId,n))return;this.lastRunStats.exactCheckCount+=1;const o=r8e(n),i=(n.radius===void 0?Dz(e.start,e.end,o):Nz(e.start,e.end,{x:n.x,y:n.y,radius:n.radius}))-e.width/2;if(i+_J>=this.traceClearance)return;const r=`overlap_${e.traceId}_${n.obstacleId}`;return{type:"pcb_trace_error",error_type:"pcb_trace_error",message:a8e(e.traceId,`${n.obstacleType} "${n.obstacleId}"`,i),pcb_trace_id:e.traceId,source_trace_id:"",pcb_trace_error_id:r,minimum_clearance:this.traceClearance,actual_clearance:i,pcb_component_ids:[],pcb_port_ids:[...new Set([...e.pcbPortIds,...n.pcbPortId?[n.pcbPortId]:[]])],center:n.radius===void 0?eoo(e,o):NCt(e,n)}}checkViaObstacle(e,n){if(this.obstacleSharesNet(e.netId,n))return;this.lastRunStats.exactCheckCount+=1;const o=r8e(n),i=(n.radius===void 0?Math.hypot(Math.max(o.minX-e.x,0,e.x-o.maxX),Math.max(o.minY-e.y,0,e.y-o.maxY)):Math.hypot(e.x-n.x,e.y-n.y)-n.radius)-e.diameter/2;if(i+_J>=this.viaToPadClearance)return;const r=`via_pad_clearance_${e.viaId}_${n.obstacleId}`,s={x:(e.x+n.x)/2,y:(e.y+n.y)/2};return{type:"pcb_pad_pad_clearance_error",error_type:"pcb_pad_pad_clearance_error",pcb_pad_pad_clearance_error_id:r,message:`pcb_via "${e.viaId}" and ${n.obstacleType} "${n.obstacleId}" are too close (gap: ${i.toFixed(3)}mm)`,pcb_trace_id:e.traceId,pcb_pad_ids:[e.viaId,n.obstacleId],pcb_via_ids:[e.viaId],minimum_clearance:this.viaToPadClearance,actual_clearance:i,center:s}}checkViaPairs(e){if(e.length<2)return[];const n=[],o=new s8e(this.cellSize);for(const i of e)o.insert(i,Uae(Kae(i),this.viaClearance));for(const i of e)for(const r of o.query(Kae(i))){if(this.lastRunStats.broadPhaseCandidateCount+=1,r.order<=i.order)continue;this.lastRunStats.exactCheckCount+=1;const s=Math.hypot(i.x-r.x,i.y-r.y);if(s<=i8e)continue;const a=s-i.diameter/2-r.diameter/2;if(a+_J>=this.viaClearance)continue;const A=this.areConnected(i.netId,r.netId),c=[i.viaId,r.viaId].sort().join("_"),l={x:(i.x+r.x)/2,y:(i.y+r.y)/2};n.push({type:"pcb_via_clearance_error",error_type:"pcb_via_clearance_error",pcb_error_id:`${A?"same_net":"different_net"}_vias_close_${c}`,message:`Vias ${i.viaId} and ${r.viaId}${A?"":" from different nets"} are too close together (gap: ${a.toFixed(3)}mm)`,pcb_via_ids:[i.viaId,r.viaId],...this.includeTraceViaOwnerMetadata?{pcb_trace_ids:[i.traceId,r.traceId]}:{},pcb_via_pair_net_relation:A?"same_net":"different_net",minimum_clearance:this.viaClearance,actual_clearance:a,pcb_center:l,center:l})}return n}evaluate(e){return this.evaluateInternal(e,!0)}evaluateLegacy(e){return this.evaluateInternal(e,!1)}evaluateInternal(e,n){const{segments:o,vias:i}=this.collectDynamicGeometry(e),r=this.buildDynamicIndexes(o,i),s=[],a=[];this.lastRunStats={traceCount:e.length,segmentCount:o.length,viaCount:i.length,obstacleCount:this.obstacles.length,broadPhaseCandidateCount:0,exactCheckCount:0};for(const g of o){const h=MCt(g),d=r.get(g.layer)?.query(h)??[],p=this.obstacleIndexesByLayer.get(g.layer)?.query(h)??[];for(const m of d){if(this.lastRunStats.broadPhaseCandidateCount+=1,m.kind==="trace_segment"&&m.order<=g.order)continue;const _=m.kind==="trace_segment"?this.checkTracePair(g,m):this.checkTraceVia(g,m);_&&s.push(_)}for(const m of p){this.lastRunStats.broadPhaseCandidateCount+=1;const _=this.checkTraceObstacle(g,m);_&&s.push(_)}}const A=this.checkViaPairs(i);if(n)for(const g of i){const h=new Set;for(const d of g.layers){const p=this.obstacleIndexesByLayer.get(d)?.query(Kae(g))??[];for(const m of p){if(h.has(m))continue;h.add(m),this.lastRunStats.broadPhaseCandidateCount+=1;const _=this.checkViaObstacle(g,m);_&&a.push(_)}}}const c=new Map;for(const g of s){const h=String(g.pcb_trace_error_id),d=c.get(h),p=Number(g.actual_clearance);if(!d){c.set(h,{...g,first_contact_center:g.center,first_contact_message:g.message,first_actual_clearance:p,worst_contact_center:g.center,worst_contact_message:g.message,worst_actual_clearance:p});continue}const m=Number(d.worst_actual_clearance);(p<m||!Number.isFinite(m))&&(d.worst_contact_center=g.center,d.worst_contact_message=g.message,d.worst_actual_clearance=p)}const l=[...c.values()].map(g=>({...g,center:typeof g.worst_contact_center=="object"?g.worst_contact_center:g.center,message:typeof g.worst_contact_message=="string"?g.worst_contact_message:g.message,actual_clearance:typeof g.worst_actual_clearance=="number"?g.worst_actual_clearance:g.actual_clearance}));l.push(...a),l.push(...A);const u=l.filter(g=>g.center);return{errors:l,errorsWithCenters:u,locationAwareErrors:u}}},noo=(t,e)=>t.width??e.width??.1,ooo=[1,1.75,-1],ioo=[1,1.75,-1],roo=8/3,Dr=1e-6,bA=.001,IJ=.14,CJ=.035,My=.015,A8e=t=>t.minTraceToPadEdgeClearance??.16,c8e=t=>t.minViaEdgeToPadEdgeClearance??.1,RCt=t=>Math.max(48,Math.round(48*Math.max(1,t))),soo=t=>t>=2?ooo:ioo,aoo=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s&&o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){this.netMap[i].push(...this.netMap[r]),this.netMap[r]=this.netMap[i];for(const s of this.netMap[i])this.idToNetMap[s]=i}}for(const r of n)this.netMap[i].includes(r)||this.netMap[i].push(r),this.idToNetMap[r]=i}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return!!i&&(o===i||i===e||i===e)}areAllIdsConnected(e){const n=this.getNetConnectedToId(e[0]);for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}},l8e=t=>{const e=[];for(const o of t)if(o.type==="source_trace")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type==="pcb_port"){const{pcb_port_id:i,source_port_id:r}=o;r&&i&&e.push([r,i])}else if(o.type==="pcb_smtpad"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_plated_hole"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_trace"){const{pcb_trace_id:i,source_trace_id:r}=o,s=Array.isArray(o.route)?o.route.filter(a=>a&&a.route_type==="wire"):[];if(r&&i&&e.push([i,r]),Array.isArray(s)){const a=s.find(c=>c?.start_pcb_port_id)?.start_pcb_port_id,A=s.find(c=>c?.end_pcb_port_id)?.end_pcb_port_id;a&&i&&A&&e.push([a,i,A])}}else if(o.type==="pcb_via"){const{pcb_via_id:i,pcb_trace_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="source_component"&&o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=(function(o){const i=new Map;let r=0;function s(a){for(const[,c]of i)if(c.has(a))return c;const A=new Set;return i.set("connectivity_net"+r++,A),A}for(const a of o){let A=null;for(const c of a){if(A){if(!A.has(c)){const l=s(c);if(l!==A){for(const u of l)A.add(u);i.delete(Array.from(i.entries()).find(([,u])=>u===l)[0])}}}else A=s(c);A.add(c)}}return Object.fromEntries(Array.from(i.entries()).map(([a,A])=>[a,Array.from(A)]))})(e);return new aoo(n)},Vae={};e_t(Vae,{all_layers:()=>LJ,any_circuit_element:()=>B3t,any_soup_element:()=>aAe,any_source_component:()=>vyt,asset:()=>y8e,base_circuit_json_error:()=>Wl,battery_capacity:()=>nyt,brep_shape:()=>$8e,cadModelDefaultDirectionMap:()=>zio,cad_component:()=>i3t,cad_model_axis_directions:()=>o3t,cad_model_formats:()=>Vio,capacitance:()=>I8e,circuit_json_footprint_load_error:()=>Pxt,current:()=>vL,distance:()=>ao,duration_ms:()=>wL,experiment_type:()=>u3t,external_footprint_load_error:()=>wxt,frequency:()=>tN,getZodPrefixedIdWithDefault:()=>So,inductance:()=>eyt,kicadAt:()=>nAe,kicadEffects:()=>oyt,kicadFont:()=>x8e,kicadFootprintAttributes:()=>ryt,kicadFootprintMetadata:()=>Ayt,kicadFootprintModel:()=>ayt,kicadFootprintPad:()=>syt,kicadFootprintProperties:()=>iyt,kicadProperty:()=>FJ,kicadSymbolEffects:()=>uyt,kicadSymbolMetadata:()=>dyt,kicadSymbolPinNames:()=>lyt,kicadSymbolPinNumbers:()=>cyt,kicadSymbolProperties:()=>gyt,kicadSymbolProperty:()=>uv,layer_ref:()=>WA,layer_string:()=>W8e,length:()=>Di,manufacturing_drc_properties:()=>x2t,ms:()=>J_,ninePointAnchor:()=>ob,parseAndConvertSiUnit:()=>L5,pcbRenderLayer:()=>Iio,pcb_autorouting_error:()=>Dxt,pcb_board:()=>$2t,pcb_breakout_point:()=>Fxt,pcb_component:()=>E2t,pcb_component_invalid_layer_error:()=>Jxt,pcb_component_not_on_board_edge_error:()=>zxt,pcb_component_outside_board_error:()=>Vxt,pcb_connector_not_in_accessible_orientation_warning:()=>Txt,pcb_copper_pour:()=>Kxt,pcb_copper_pour_brep:()=>Yxt,pcb_copper_pour_polygon:()=>Uxt,pcb_copper_pour_rect:()=>Gxt,pcb_copper_text:()=>ixt,pcb_courtyard_circle:()=>t3t,pcb_courtyard_outline:()=>Zxt,pcb_courtyard_overlap_error:()=>yxt,pcb_courtyard_pill:()=>n3t,pcb_courtyard_polygon:()=>e3t,pcb_courtyard_rect:()=>Xxt,pcb_cutout:()=>Qxt,pcb_cutout_circle:()=>Bxt,pcb_cutout_path:()=>Sxt,pcb_cutout_polygon:()=>bxt,pcb_cutout_rect:()=>Ext,pcb_fabrication_note_dimension:()=>hxt,pcb_fabrication_note_path:()=>gxt,pcb_fabrication_note_rect:()=>dxt,pcb_fabrication_note_text:()=>uxt,pcb_footprint_overlap_error:()=>Cxt,pcb_ground_plane:()=>Lxt,pcb_ground_plane_region:()=>Hxt,pcb_group:()=>Mxt,pcb_hole:()=>P2t,pcb_hole_circle_or_square_shape:()=>bio,pcb_hole_circle_shape:()=>Eio,pcb_hole_oval_shape:()=>Sio,pcb_hole_pill_shape:()=>Qio,pcb_hole_rect_shape:()=>Bio,pcb_hole_rotated_pill_shape:()=>vio,pcb_keepout:()=>xxt,pcb_manual_edit_conflict_warning:()=>Nxt,pcb_missing_footprint_error:()=>vxt,pcb_net:()=>W2t,pcb_note_dimension:()=>Ixt,pcb_note_line:()=>fxt,pcb_note_path:()=>_xt,pcb_note_rect:()=>mxt,pcb_note_text:()=>pxt,pcb_pad_pad_clearance_error:()=>$xt,pcb_pad_trace_clearance_error:()=>qxt,pcb_panel:()=>q2t,pcb_panelization_placement_error:()=>Z2t,pcb_placement_error:()=>X2t,pcb_plated_hole:()=>M2t,pcb_port:()=>D2t,pcb_port_not_connected_error:()=>J2t,pcb_port_not_matched_error:()=>z2t,pcb_route_hint:()=>C2t,pcb_route_hints:()=>xio,pcb_silkscreen_circle:()=>sxt,pcb_silkscreen_graphic:()=>cxt,pcb_silkscreen_graphic_brep:()=>Axt,pcb_silkscreen_line:()=>txt,pcb_silkscreen_oval:()=>axt,pcb_silkscreen_path:()=>nxt,pcb_silkscreen_pill:()=>lxt,pcb_silkscreen_rect:()=>rxt,pcb_silkscreen_text:()=>oxt,pcb_smtpad:()=>R2t,pcb_smtpad_pill:()=>N2t,pcb_solder_paste:()=>T2t,pcb_text:()=>k2t,pcb_thermal_spoke:()=>Oxt,pcb_trace:()=>G2t,pcb_trace_error:()=>K2t,pcb_trace_hint:()=>ext,pcb_trace_missing_error:()=>V2t,pcb_trace_route_point:()=>O2t,pcb_trace_route_point_through_pad:()=>H2t,pcb_trace_route_point_via:()=>L2t,pcb_trace_route_point_wire:()=>F2t,pcb_trace_too_long_warning:()=>U2t,pcb_trace_warning:()=>Y2t,pcb_via:()=>j2t,pcb_via_clearance_error:()=>Wxt,pcb_via_trace_clearance_error:()=>jxt,point:()=>_r,point3:()=>nb,point_with_bulge:()=>I2t,port_arrangement:()=>$yt,position:()=>_io,position3:()=>fio,resistance:()=>tAe,ring:()=>j8e,rotation:()=>im,route_hint_point:()=>y2t,schematic_arc:()=>n2t,schematic_box:()=>Vyt,schematic_circle:()=>t2t,schematic_component:()=>qyt,schematic_component_port_arrangement_by_sides:()=>jyt,schematic_component_port_arrangement_by_size:()=>Wyt,schematic_debug_line:()=>l2t,schematic_debug_object:()=>g2t,schematic_debug_object_base:()=>rAe,schematic_debug_point:()=>u2t,schematic_debug_rect:()=>c2t,schematic_error:()=>a2t,schematic_group:()=>p2t,schematic_layout_error:()=>A2t,schematic_line:()=>Zyt,schematic_manual_edit_conflict_warning:()=>h2t,schematic_net_label:()=>s2t,schematic_path:()=>zyt,schematic_pin_styles:()=>Jyt,schematic_port:()=>r2t,schematic_rect:()=>e2t,schematic_sheet:()=>f2t,schematic_symbol:()=>Xyt,schematic_table:()=>m2t,schematic_table_cell:()=>_2t,schematic_text:()=>i2t,schematic_trace:()=>o2t,schematic_voltage_probe:()=>d2t,simulation_ac_current_source:()=>c3t,simulation_ac_voltage_source:()=>s3t,simulation_current_probe:()=>f3t,simulation_current_source:()=>l3t,simulation_dc_current_source:()=>A3t,simulation_dc_voltage_source:()=>r3t,simulation_experiment:()=>d3t,simulation_op_amp:()=>C3t,simulation_oscilloscope_trace:()=>E3t,simulation_spice_subcircuit:()=>y3t,simulation_switch:()=>m3t,simulation_transient_current_graph:()=>p3t,simulation_transient_voltage_graph:()=>h3t,simulation_unknown_experiment_error:()=>I3t,simulation_voltage_probe:()=>_3t,simulation_voltage_source:()=>a3t,size:()=>C8e,source_ambiguous_port_reference:()=>Tyt,source_board:()=>Ryt,source_component_base:()=>vu,source_component_internal_connection:()=>Pyt,source_component_misconfigured_error:()=>J8e,source_component_pins_underspecified_warning:()=>Gyt,source_failed_to_create_component_error:()=>Eyt,source_group:()=>Dyt,source_i2c_misconfigured_error:()=>z8e,source_interconnect:()=>Syt,source_invalid_component_property_error:()=>G8e,source_manually_placed_via:()=>Fyt,source_missing_manufacturer_part_number_warning:()=>K8e,source_missing_property_error:()=>xyt,source_net:()=>Nyt,source_no_ground_pin_defined_warning:()=>Oyt,source_no_power_pin_defined_warning:()=>Hyt,source_part_not_found_warning:()=>Kyt,source_pcb_ground_plane:()=>kyt,source_pin_attributes:()=>Iyt,source_pin_missing_trace_warning:()=>U8e,source_pin_must_be_connected_error:()=>Yyt,source_port:()=>wyt,source_project_metadata:()=>O8e,source_property_ignored_warning:()=>Byt,source_refdes_convention_warning:()=>V8e,source_simple_ammeter:()=>fyt,source_simple_battery:()=>v8e,source_simple_capacitor:()=>E8e,source_simple_chip:()=>S8e,source_simple_connector:()=>yyt,source_simple_crystal:()=>Cyt,source_simple_current_source:()=>myt,source_simple_diode:()=>iAe,source_simple_fiducial:()=>hyt,source_simple_fuse:()=>_yt,source_simple_ground:()=>pyt,source_simple_inductor:()=>w8e,source_simple_led:()=>b8e,source_simple_mosfet:()=>F8e,source_simple_op_amp:()=>L8e,source_simple_pin_header:()=>D8e,source_simple_pinout:()=>N8e,source_simple_potentiometer:()=>M8e,source_simple_power_source:()=>Q8e,source_simple_push_button:()=>P8e,source_simple_resistor:()=>B8e,source_simple_resonator:()=>R8e,source_simple_switch:()=>H8e,source_simple_test_point:()=>k8e,source_simple_transistor:()=>T8e,source_simple_voltage_probe:()=>byt,source_simple_voltage_source:()=>Qyt,source_trace:()=>Myt,source_trace_not_connected_error:()=>Y8e,source_unnamed_trace_warning:()=>Lyt,spice_simulation_options:()=>g3t,supplier_footprint_mismatch_warning:()=>kxt,supplier_name:()=>oAe,time:()=>mio,timestamp:()=>tyt,unknown_error_finding_part:()=>Uyt,visible_layer:()=>W_,voltage:()=>tb,wave_shape:()=>X8e});var zae=t=>{const e=Math.round(1e3*t)/1e3;return`${Number(e.toFixed(3))}mm`},TCt=new Map([["T",1e12],["G",1e9],["M",1e6],["K",1e3],["k",1e3],["",1],["m",.001],["µ",1e-6],["μ",1e-6],["u",1e-6],["n",1e-9],["p",1e-12],["f",1e-15]]),Aoo=[...TCt.keys()];function kCt(t){return TCt.get(t)}var FCt={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,mohm:.001,mOhm:.001,milliohm:.001,Ω:1,ohm:1,Ohm:1,kΩ:1e3,KΩ:1e3,kohm:1e3,kOhm:1e3,KOhm:1e3,Kohm:1e3,MΩ:1e6,Mohm:1e6,MOhm:1e6,megohm:1e6,Megohm:1e6,GΩ:1e9,Gohm:1e9,GOhm:1e9,TΩ:1e12,Tohm:1e12,TOhm:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,μA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,μF:1e-6,uF:1e-6,mF:.001,F:1,kF:1e3,KF:1e3,MF:1e6}},H:{baseUnit:"H",variants:{pH:1e-12,nH:1e-9,µH:1e-6,μH:1e-6,uH:1e-6,mH:.001,H:1,kH:1e3,KH:1e3,MH:1e6}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,μs:.001,ms:1,s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,μm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},u8e=new Set;for(const[t,e]of Object.entries(FCt)){u8e.add(t);for(const n of Object.keys(e.variants))u8e.add(n)}function L5(t,e){if(t==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t=="string"&&t.match(/^-?[\d.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t=="number")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t=="object"&&"x"in t&&"y"in t){const c=L5(t.x,e),l=L5(t.x,e),u=L5(t.y,e);return l.value===null||u.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:c.parsedUnit,unitOfValue:c.unitOfValue,value:{x:l.value,y:u.value}}}const n=t.toString().split("").reverse().join(""),o=n.match(/[^\d\s]+/)?.[0];if(!o)throw new Error(`Could not determine unit: "${t}"`);const i=o.split("").reverse().join(""),r=t.slice(0,-i.length),s=kCt(i);if(e&&s!=null)return{parsedUnit:null,unitOfValue:e,value:Number.parseFloat(r)*s};if(s!=null&&!u8e.has(i))return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(r)*s};const{baseUnit:a,conversionFactor:A}=(function(c){for(const l of Object.values(FCt)){if(c in l.variants)return{baseUnit:l.baseUnit,conversionFactor:l.variants[c]};for(const[u,g]of Object.entries(l.variants)){if(!c.endsWith(u))continue;const h=kCt(c.slice(0,-u.length));if(h!=null)return{baseUnit:l.baseUnit,conversionFactor:h*g}}}return{baseUnit:c,conversionFactor:1}})(i);return{parsedUnit:i,unitOfValue:a,value:A*Number.parseFloat(r)}}var Cl,Ix,g8e;Aoo.filter(t=>t!=="").sort((t,e)=>e.length-t.length).map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");var N={};e_t(N,{BRAND:()=>Doo,DIRTY:()=>jae,EMPTY_PATH:()=>uoo,INVALID:()=>ea,NEVER:()=>pio,OK:()=>Dy,ParseStatus:()=>Cx,Schema:()=>JA,ZodAny:()=>bL,ZodArray:()=>eN,ZodBigInt:()=>EJ,ZodBoolean:()=>BJ,ZodBranded:()=>_8e,ZodCatch:()=>TJ,ZodDate:()=>bJ,ZodDefault:()=>RJ,ZodDiscriminatedUnion:()=>KCt,ZodEffects:()=>rB,ZodEnum:()=>DJ,ZodError:()=>iB,ZodFirstPartyTypeKind:()=>aa,ZodFunction:()=>zCt,ZodIntersection:()=>wJ,ZodIssueCode:()=>hi,ZodLazy:()=>PJ,ZodLiteral:()=>MJ,ZodMap:()=>Xae,ZodNaN:()=>eAe,ZodNativeEnum:()=>NJ,ZodNever:()=>eb,ZodNull:()=>QJ,ZodNullable:()=>lv,ZodNumber:()=>xJ,ZodObject:()=>H5,ZodOptional:()=>m7,ZodParsedType:()=>xr,ZodPipeline:()=>f8e,ZodPromise:()=>QL,ZodReadonly:()=>kJ,ZodRecord:()=>VCt,ZodSchema:()=>JA,ZodSet:()=>Zae,ZodString:()=>BL,ZodSymbol:()=>$ae,ZodTransformer:()=>rB,ZodTuple:()=>cv,ZodType:()=>JA,ZodUndefined:()=>SJ,ZodUnion:()=>vJ,ZodUnknown:()=>ZD,ZodVoid:()=>qae,addIssueToContext:()=>nr,any:()=>Goo,array:()=>Voo,bigint:()=>koo,boolean:()=>XCt,coerce:()=>hio,custom:()=>jCt,date:()=>Foo,datetimeRegex:()=>UCt,defaultErrorMap:()=>EL,discriminatedUnion:()=>joo,effect:()=>ZCt,enum:()=>iio,function:()=>tio,getErrorMap:()=>Jae,getParsedType:()=>Z8,instanceof:()=>Roo,intersection:()=>$oo,isAborted:()=>d8e,isAsync:()=>yJ,isDirty:()=>h8e,isValid:()=>XD,late:()=>Noo,lazy:()=>nio,literal:()=>oio,makeIssue:()=>Wae,map:()=>Zoo,nan:()=>Too,nativeEnum:()=>rio,never:()=>Uoo,null:()=>Ooo,nullable:()=>Aio,number:()=>qCt,object:()=>zoo,objectUtil:()=>g8e,oboolean:()=>dio,onumber:()=>gio,optional:()=>aio,ostring:()=>uio,pipeline:()=>lio,preprocess:()=>cio,promise:()=>sio,quotelessJson:()=>coo,record:()=>Xoo,set:()=>eio,setErrorMap:()=>loo,strictObject:()=>Joo,string:()=>$Ct,symbol:()=>Loo,transformer:()=>ZCt,tuple:()=>qoo,undefined:()=>Hoo,union:()=>Woo,unknown:()=>Yoo,util:()=>Cl,void:()=>Koo}),(Ix=Cl||(Cl={})).assertEqual=t=>{},Ix.assertIs=function(t){},Ix.assertNever=function(t){throw new Error},Ix.arrayToEnum=t=>{const e={};for(const n of t)e[n]=n;return e},Ix.getValidEnumValues=t=>{const e=Ix.objectKeys(t).filter(o=>typeof t[t[o]]!="number"),n={};for(const o of e)n[o]=t[o];return Ix.objectValues(n)},Ix.objectValues=t=>Ix.objectKeys(t).map(function(e){return t[e]}),Ix.objectKeys=typeof Object.keys=="function"?t=>Object.keys(t):t=>{const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e},Ix.find=(t,e)=>{for(const n of t)if(e(n))return n},Ix.isInteger=typeof Number.isInteger=="function"?t=>Number.isInteger(t):t=>typeof t=="number"&&Number.isFinite(t)&&Math.floor(t)===t,Ix.joinValues=function(t,e=" | "){return t.map(n=>typeof n=="string"?`'${n}'`:n).join(e)},Ix.jsonStringifyReplacer=(t,e)=>typeof e=="bigint"?e.toString():e,(g8e||(g8e={})).mergeShapes=(t,e)=>({...t,...e});var xr=Cl.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Z8=t=>{switch(typeof t){case"undefined":return xr.undefined;case"string":return xr.string;case"number":return Number.isNaN(t)?xr.nan:xr.number;case"boolean":return xr.boolean;case"function":return xr.function;case"bigint":return xr.bigint;case"symbol":return xr.symbol;case"object":return Array.isArray(t)?xr.array:t===null?xr.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?xr.promise:typeof Map<"u"&&t instanceof Map?xr.map:typeof Set<"u"&&t instanceof Set?xr.set:typeof Date<"u"&&t instanceof Date?xr.date:xr.object;default:return xr.unknown}},hi=Cl.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),coo=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),iB=class s5n extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(r){return r.message},o={_errors:[]},i=r=>{for(const s of r.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)o._errors.push(n(s));else{let a=o,A=0;for(;A<s.path.length;){const c=s.path[A];A===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],A++}}};return i(this),o}static assert(e){if(!(e instanceof s5n))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Cl.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)if(i.path.length>0){const r=i.path[0];n[r]=n[r]||[],n[r].push(e(i))}else o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}};iB.create=t=>new iB(t);var EL=(t,e)=>{let n;switch(t.code){case hi.invalid_type:n=t.received===xr.undefined?"Required":`Expected ${t.expected}, received ${t.received}`;break;case hi.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Cl.jsonStringifyReplacer)}`;break;case hi.unrecognized_keys:n=`Unrecognized key(s) in object: ${Cl.joinValues(t.keys,", ")}`;break;case hi.invalid_union:n="Invalid input";break;case hi.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Cl.joinValues(t.options)}`;break;case hi.invalid_enum_value:n=`Invalid enum value. Expected ${Cl.joinValues(t.options)}, received '${t.received}'`;break;case hi.invalid_arguments:n="Invalid function arguments";break;case hi.invalid_return_type:n="Invalid function return type";break;case hi.invalid_date:n="Invalid date";break;case hi.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Cl.assertNever(t.validation):n=t.validation!=="regex"?`Invalid ${t.validation}`:"Invalid";break;case hi.too_small:n=t.type==="array"?`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"||t.type==="bigint"?`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:"Invalid input";break;case hi.too_big:n=t.type==="array"?`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:"Invalid input";break;case hi.custom:n="Invalid input";break;case hi.invalid_intersection_types:n="Intersection results could not be merged";break;case hi.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case hi.not_finite:n="Number must be finite";break;default:n=e.defaultError,Cl.assertNever(t)}return{message:n}},LCt=EL;function loo(t){LCt=t}function Jae(){return LCt}var Wae=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,r=[...n,...i.path||[]],s={...i,path:r};if(i.message!==void 0)return{...i,path:r,message:i.message};let a="";const A=o.filter(c=>!!c).slice().reverse();for(const c of A)a=c(s,{data:e,defaultError:a}).message;return{...i,path:r,message:a}},uoo=[];function nr(t,e){const n=Jae(),o=Wae({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===EL?void 0:EL].filter(i=>!!i)});t.common.issues.push(o)}var rs,HCt,Cx=class a5n{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){if(i.status==="aborted")return ea;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const r=await i.key,s=await i.value;o.push({key:r,value:s})}return a5n.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:r,value:s}=i;if(r.status==="aborted"||s.status==="aborted")return ea;r.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),r.value==="__proto__"||s.value===void 0&&!i.alwaysSet||(o[r.value]=s.value)}return{status:e.value,value:o}}},ea=Object.freeze({status:"aborted"}),jae=t=>({status:"dirty",value:t}),Dy=t=>({status:"valid",value:t}),d8e=t=>t.status==="aborted",h8e=t=>t.status==="dirty",XD=t=>t.status==="valid",yJ=t=>typeof Promise<"u"&&t instanceof Promise;(HCt=rs||(rs={})).errToObj=t=>typeof t=="string"?{message:t}:t||{},HCt.toString=t=>typeof t=="string"?t:t?.message;var p7=class{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},OCt=(t,e)=>{if(XD(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new iB(t.common.issues);return this._error=n,this._error}}};function SA(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(r,s)=>{const{message:a}=t;return r.code==="invalid_enum_value"?{message:a??s.defaultError}:s.data===void 0?{message:a??o??s.defaultError}:r.code!=="invalid_type"?{message:s.defaultError}:{message:a??n??s.defaultError}},description:i}}var p8e,JA=class{get description(){return this._def.description}_getType(e){return Z8(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Z8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Cx,ctx:{common:e.parent.common,data:e.data,parsedType:Z8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(yJ(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){const o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z8(e)},i=this._parseSync({data:e,path:o.path,parent:o});return OCt(o,i)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z8(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:n});return XD(o)?{value:o.value}:{issues:n.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(o=>XD(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z8(e)},i=this._parse({data:e,path:o.path,parent:o}),r=await(yJ(i)?i:Promise.resolve(i));return OCt(o,r)}refine(e,n){const o=i=>typeof n=="string"||n===void 0?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,r)=>{const s=e(i),a=()=>r.addIssue({code:hi.custom,...o(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(A=>!!A||(a(),!1)):!!s||(a(),!1)})}refinement(e,n){return this._refinement((o,i)=>!!e(o)||(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new rB({schema:this,typeName:aa.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return m7.create(this,this._def)}nullable(){return lv.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eN.create(this)}promise(){return QL.create(this,this._def)}or(e){return vJ.create([this,e],this._def)}and(e){return wJ.create(this,e,this._def)}transform(e){return new rB({...SA(this._def),schema:this,typeName:aa.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new RJ({...SA(this._def),innerType:this,defaultValue:n,typeName:aa.ZodDefault})}brand(){return new _8e({typeName:aa.ZodBranded,type:this,...SA(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new TJ({...SA(this._def),innerType:this,catchValue:n,typeName:aa.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return f8e.create(this,e)}readonly(){return kJ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},goo=/^c[^\s-]{8,}$/i,doo=/^[0-9a-z]+$/,hoo=/^[0-9A-HJKMNP-TV-Z]{26}$/i,poo=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,moo=/^[a-z0-9_-]{21}$/i,_oo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,foo=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?: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}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Eoo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Boo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,boo=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,GCt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Soo=new RegExp(`^${GCt}$`);function YCt(t){let e="[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t.precision?"+":"?"}`}function Qoo(t){return new RegExp(`^${YCt(t)}$`)}function UCt(t){let e=`${GCt}T${YCt(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function voo(t,e){return!(e!=="v4"&&e||!Coo.test(t))||!(e!=="v6"&&e||!xoo.test(t))}function woo(t,e){if(!_oo.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(o));return typeof i=="object"&&i!==null&&(!("typ"in i)||i?.typ==="JWT")&&!!i.alg&&(!e||i.alg===e)}catch{return!1}}function Poo(t,e){return!(e!=="v4"&&e||!yoo.test(t))||!(e!=="v6"&&e||!Eoo.test(t))}var BL=class jte extends JA{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==xr.string){const i=this._getOrReturnCtx(e);return nr(i,{code:hi.invalid_type,expected:xr.string,received:i.parsedType}),ea}const n=new Cx;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const r=e.data.length>i.value,s=e.data.length<i.value;(r||s)&&(o=this._getOrReturnCtx(e,o),r?nr(o,{code:hi.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&nr(o,{code:hi.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Ioo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"email",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")p8e||(p8e=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),p8e.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"emoji",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")poo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"uuid",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")moo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"nanoid",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")goo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"cuid",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")doo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"cuid2",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")hoo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"ulid",code:hi.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),nr(o,{validation:"url",code:hi.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"regex",code:hi.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?UCt(i).test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Soo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Qoo(i).test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?foo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"duration",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?voo(e.data,i.version)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"ip",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?woo(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"jwt",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?Poo(e.data,i.version)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"cidr",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Boo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"base64",code:hi.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?boo.test(e.data)||(o=this._getOrReturnCtx(e,o),nr(o,{validation:"base64url",code:hi.invalid_string,message:i.message}),n.dirty()):Cl.assertNever(i);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:hi.invalid_string,...rs.errToObj(o)})}_addCheck(e){return new jte({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...rs.errToObj(e)})}url(e){return this._addCheck({kind:"url",...rs.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...rs.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...rs.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...rs.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...rs.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...rs.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...rs.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...rs.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...rs.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...rs.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...rs.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...rs.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...rs.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:e?.precision===void 0?null:e?.precision,...rs.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...rs.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...rs.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...rs.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...rs.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...rs.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...rs.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...rs.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...rs.errToObj(n)})}nonempty(e){return this.min(1,rs.errToObj(e))}trim(){return new jte({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new jte({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new jte({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};function Moo(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o;return Number.parseInt(t.toFixed(i).replace(".",""))%Number.parseInt(e.toFixed(i).replace(".",""))/10**i}BL.create=t=>new BL({checks:[],typeName:aa.ZodString,coerce:t?.coerce??!1,...SA(t)});var xJ=class hit extends JA{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==xr.number){const i=this._getOrReturnCtx(e);return nr(i,{code:hi.invalid_type,expected:xr.number,received:i.parsedType}),ea}let n;const o=new Cx;for(const i of this._def.checks)i.kind==="int"?Cl.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Moo(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.not_finite,message:i.message}),o.dirty()):Cl.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,rs.toString(n))}gt(e,n){return this.setLimit("min",e,!1,rs.toString(n))}lte(e,n){return this.setLimit("max",e,!0,rs.toString(n))}lt(e,n){return this.setLimit("max",e,!1,rs.toString(n))}setLimit(e,n,o,i){return new hit({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:rs.toString(i)}]})}_addCheck(e){return new hit({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:rs.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:rs.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:rs.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:rs.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:rs.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:rs.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:rs.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:rs.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:rs.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Cl.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}};xJ.create=t=>new xJ({checks:[],typeName:aa.ZodNumber,coerce:t?.coerce||!1,...SA(t)});var EJ=class pit extends JA{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==xr.bigint)return this._getInvalidInput(e);let n;const o=new Cx;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),nr(n,{code:hi.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Cl.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return nr(n,{code:hi.invalid_type,expected:xr.bigint,received:n.parsedType}),ea}gte(e,n){return this.setLimit("min",e,!0,rs.toString(n))}gt(e,n){return this.setLimit("min",e,!1,rs.toString(n))}lte(e,n){return this.setLimit("max",e,!0,rs.toString(n))}lt(e,n){return this.setLimit("max",e,!1,rs.toString(n))}setLimit(e,n,o,i){return new pit({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:rs.toString(i)}]})}_addCheck(e){return new pit({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:rs.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:rs.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:rs.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:rs.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:rs.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};EJ.create=t=>new EJ({checks:[],typeName:aa.ZodBigInt,coerce:t?.coerce??!1,...SA(t)});var BJ=class extends JA{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xr.boolean){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.boolean,received:e.parsedType}),ea}return Dy(t.data)}};BJ.create=t=>new BJ({typeName:aa.ZodBoolean,coerce:t?.coerce||!1,...SA(t)});var bJ=class A5n extends JA{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==xr.date){const i=this._getOrReturnCtx(e);return nr(i,{code:hi.invalid_type,expected:xr.date,received:i.parsedType}),ea}if(Number.isNaN(e.data.getTime()))return nr(this._getOrReturnCtx(e),{code:hi.invalid_date}),ea;const n=new Cx;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),nr(o,{code:hi.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Cl.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new A5n({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:rs.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:rs.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};bJ.create=t=>new bJ({checks:[],coerce:t?.coerce||!1,typeName:aa.ZodDate,...SA(t)});var $ae=class extends JA{_parse(t){if(this._getType(t)!==xr.symbol){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.symbol,received:e.parsedType}),ea}return Dy(t.data)}};$ae.create=t=>new $ae({typeName:aa.ZodSymbol,...SA(t)});var SJ=class extends JA{_parse(t){if(this._getType(t)!==xr.undefined){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.undefined,received:e.parsedType}),ea}return Dy(t.data)}};SJ.create=t=>new SJ({typeName:aa.ZodUndefined,...SA(t)});var QJ=class extends JA{_parse(t){if(this._getType(t)!==xr.null){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.null,received:e.parsedType}),ea}return Dy(t.data)}};QJ.create=t=>new QJ({typeName:aa.ZodNull,...SA(t)});var bL=class extends JA{constructor(){super(...arguments),this._any=!0}_parse(t){return Dy(t.data)}};bL.create=t=>new bL({typeName:aa.ZodAny,...SA(t)});var ZD=class extends JA{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Dy(t.data)}};ZD.create=t=>new ZD({typeName:aa.ZodUnknown,...SA(t)});var eb=class extends JA{_parse(t){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.never,received:e.parsedType}),ea}};eb.create=t=>new eb({typeName:aa.ZodNever,...SA(t)});var qae=class extends JA{_parse(t){if(this._getType(t)!==xr.undefined){const e=this._getOrReturnCtx(t);return nr(e,{code:hi.invalid_type,expected:xr.void,received:e.parsedType}),ea}return Dy(t.data)}};qae.create=t=>new qae({typeName:aa.ZodVoid,...SA(t)});var eN=class Vye extends JA{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==xr.array)return nr(n,{code:hi.invalid_type,expected:xr.array,received:n.parsedType}),ea;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(nr(n,{code:s?hi.too_big:hi.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(nr(n,{code:hi.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(nr(n,{code:hi.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new p7(n,s,n.path,a)))).then(s=>Cx.mergeArray(o,s));const r=[...n.data].map((s,a)=>i.type._parseSync(new p7(n,s,n.path,a)));return Cx.mergeArray(o,r)}get element(){return this._def.type}min(e,n){return new Vye({...this._def,minLength:{value:e,message:rs.toString(n)}})}max(e,n){return new Vye({...this._def,maxLength:{value:e,message:rs.toString(n)}})}length(e,n){return new Vye({...this._def,exactLength:{value:e,message:rs.toString(n)}})}nonempty(e){return this.min(1,e)}};function SL(t){if(t instanceof H5){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=m7.create(SL(o))}return new H5({...t._def,shape:()=>e})}return t instanceof eN?new eN({...t._def,type:SL(t.element)}):t instanceof m7?m7.create(SL(t.unwrap())):t instanceof lv?lv.create(SL(t.unwrap())):t instanceof cv?cv.create(t.items.map(e=>SL(e))):t}eN.create=(t,e)=>new eN({type:t,minLength:null,maxLength:null,exactLength:null,typeName:aa.ZodArray,...SA(e)});var H5=class v9 extends JA{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Cl.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==xr.object){const A=this._getOrReturnCtx(e);return nr(A,{code:hi.invalid_type,expected:xr.object,received:A.parsedType}),ea}const{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:r}=this._getCached(),s=[];if(!(this._def.catchall instanceof eb&&this._def.unknownKeys==="strip"))for(const A in o.data)r.includes(A)||s.push(A);const a=[];for(const A of r){const c=i[A],l=o.data[A];a.push({key:{status:"valid",value:A},value:c._parse(new p7(o,l,o.path,A)),alwaysSet:A in o.data})}if(this._def.catchall instanceof eb){const A=this._def.unknownKeys;if(A==="passthrough")for(const c of s)a.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(A==="strict")s.length>0&&(nr(o,{code:hi.unrecognized_keys,keys:s}),n.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const A=this._def.catchall;for(const c of s){const l=o.data[c];a.push({key:{status:"valid",value:c},value:A._parse(new p7(o,l,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const A=[];for(const c of a){const l=await c.key,u=await c.value;A.push({key:l,value:u,alwaysSet:c.alwaysSet})}return A}).then(A=>Cx.mergeObjectSync(n,A)):Cx.mergeObjectSync(n,a)}get shape(){return this._def.shape()}strict(e){return rs.errToObj,new v9({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{const i=this._def.errorMap?.(n,o).message??o.defaultError;return n.code==="unrecognized_keys"?{message:rs.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new v9({...this._def,unknownKeys:"strip"})}passthrough(){return new v9({...this._def,unknownKeys:"passthrough"})}extend(e){return new v9({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new v9({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:aa.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new v9({...this._def,catchall:e})}pick(e){const n={};for(const o of Cl.objectKeys(e))e[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new v9({...this._def,shape:()=>n})}omit(e){const n={};for(const o of Cl.objectKeys(this.shape))e[o]||(n[o]=this.shape[o]);return new v9({...this._def,shape:()=>n})}deepPartial(){return SL(this)}partial(e){const n={};for(const o of Cl.objectKeys(this.shape)){const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}return new v9({...this._def,shape:()=>n})}required(e){const n={};for(const o of Cl.objectKeys(this.shape))if(e&&!e[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof m7;)i=i._def.innerType;n[o]=i}return new v9({...this._def,shape:()=>n})}keyof(){return JCt(Cl.objectKeys(this.shape))}};H5.create=(t,e)=>new H5({shape:()=>t,unknownKeys:"strip",catchall:eb.create(),typeName:aa.ZodObject,...SA(e)}),H5.strictCreate=(t,e)=>new H5({shape:()=>t,unknownKeys:"strict",catchall:eb.create(),typeName:aa.ZodObject,...SA(e)}),H5.lazycreate=(t,e)=>new H5({shape:t,unknownKeys:"strip",catchall:eb.create(),typeName:aa.ZodObject,...SA(e)});var vJ=class extends JA{_parse(t){const{ctx:e}=this._processInputParams(t),n=this._def.options;if(e.common.async)return Promise.all(n.map(async o=>{const i={...e,common:{...e.common,issues:[]},parent:null};return{result:await o._parseAsync({data:e.data,path:e.path,parent:i}),ctx:i}})).then(function(o){for(const r of o)if(r.result.status==="valid")return r.result;for(const r of o)if(r.result.status==="dirty")return e.common.issues.push(...r.ctx.common.issues),r.result;const i=o.map(r=>new iB(r.ctx.common.issues));return nr(e,{code:hi.invalid_union,unionErrors:i}),ea});{let o;const i=[];for(const s of n){const a={...e,common:{...e.common,issues:[]},parent:null},A=s._parseSync({data:e.data,path:e.path,parent:a});if(A.status==="valid")return A;A.status!=="dirty"||o||(o={result:A,ctx:a}),a.common.issues.length&&i.push(a.common.issues)}if(o)return e.common.issues.push(...o.ctx.common.issues),o.result;const r=i.map(s=>new iB(s));return nr(e,{code:hi.invalid_union,unionErrors:r}),ea}}get options(){return this._def.options}};vJ.create=(t,e)=>new vJ({options:t,typeName:aa.ZodUnion,...SA(e)});var Av=t=>t instanceof PJ?Av(t.schema):t instanceof rB?Av(t.innerType()):t instanceof MJ?[t.value]:t instanceof DJ?t.options:t instanceof NJ?Cl.objectValues(t.enum):t instanceof RJ?Av(t._def.innerType):t instanceof SJ?[void 0]:t instanceof QJ?[null]:t instanceof m7?[void 0,...Av(t.unwrap())]:t instanceof lv?[null,...Av(t.unwrap())]:t instanceof _8e||t instanceof kJ?Av(t.unwrap()):t instanceof TJ?Av(t._def.innerType):[],KCt=class c5n extends JA{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==xr.object)return nr(n,{code:hi.invalid_type,expected:xr.object,received:n.parsedType}),ea;const o=this.discriminator,i=n.data[o],r=this.optionsMap.get(i);return r?n.common.async?r._parseAsync({data:n.data,path:n.path,parent:n}):r._parseSync({data:n.data,path:n.path,parent:n}):(nr(n,{code:hi.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ea)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const r of n){const s=Av(r.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,r)}}return new c5n({typeName:aa.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...SA(o)})}};function m8e(t,e){const n=Z8(t),o=Z8(e);if(t===e)return{valid:!0,data:t};if(n===xr.object&&o===xr.object){const i=Cl.objectKeys(e),r=Cl.objectKeys(t).filter(a=>i.indexOf(a)!==-1),s={...t,...e};for(const a of r){const A=m8e(t[a],e[a]);if(!A.valid)return{valid:!1};s[a]=A.data}return{valid:!0,data:s}}if(n===xr.array&&o===xr.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let r=0;r<t.length;r++){const s=m8e(t[r],e[r]);if(!s.valid)return{valid:!1};i.push(s.data)}return{valid:!0,data:i}}return n===xr.date&&o===xr.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var wJ=class extends JA{_parse(t){const{status:e,ctx:n}=this._processInputParams(t),o=(i,r)=>{if(d8e(i)||d8e(r))return ea;const s=m8e(i.value,r.value);return s.valid?((h8e(i)||h8e(r))&&e.dirty(),{status:e.value,value:s.data}):(nr(n,{code:hi.invalid_intersection_types}),ea)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,r])=>o(i,r)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};wJ.create=(t,e,n)=>new wJ({left:t,right:e,typeName:aa.ZodIntersection,...SA(n)});var cv=class l5n extends JA{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==xr.array)return nr(o,{code:hi.invalid_type,expected:xr.array,received:o.parsedType}),ea;if(o.data.length<this._def.items.length)return nr(o,{code:hi.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ea;!this._def.rest&&o.data.length>this._def.items.length&&(nr(o,{code:hi.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((r,s)=>{const a=this._def.items[s]||this._def.rest;return a?a._parse(new p7(o,r,o.path,s)):null}).filter(r=>!!r);return o.common.async?Promise.all(i).then(r=>Cx.mergeArray(n,r)):Cx.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new l5n({...this._def,rest:e})}};cv.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cv({items:t,typeName:aa.ZodTuple,rest:null,...SA(e)})};var VCt=class u5n extends JA{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==xr.object)return nr(o,{code:hi.invalid_type,expected:xr.object,received:o.parsedType}),ea;const i=[],r=this._def.keyType,s=this._def.valueType;for(const a in o.data)i.push({key:r._parse(new p7(o,a,o.path,a)),value:s._parse(new p7(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?Cx.mergeObjectAsync(n,i):Cx.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return new u5n(n instanceof JA?{keyType:e,valueType:n,typeName:aa.ZodRecord,...SA(o)}:{keyType:BL.create(),valueType:e,typeName:aa.ZodRecord,...SA(n)})}},Xae=class extends JA{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:e,ctx:n}=this._processInputParams(t);if(n.parsedType!==xr.map)return nr(n,{code:hi.invalid_type,expected:xr.map,received:n.parsedType}),ea;const o=this._def.keyType,i=this._def.valueType,r=[...n.data.entries()].map(([s,a],A)=>({key:o._parse(new p7(n,s,n.path,[A,"key"])),value:i._parse(new p7(n,a,n.path,[A,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const a of r){const A=await a.key,c=await a.value;if(A.status==="aborted"||c.status==="aborted")return ea;A.status!=="dirty"&&c.status!=="dirty"||e.dirty(),s.set(A.value,c.value)}return{status:e.value,value:s}})}{const s=new Map;for(const a of r){const A=a.key,c=a.value;if(A.status==="aborted"||c.status==="aborted")return ea;A.status!=="dirty"&&c.status!=="dirty"||e.dirty(),s.set(A.value,c.value)}return{status:e.value,value:s}}}};Xae.create=(t,e,n)=>new Xae({valueType:e,keyType:t,typeName:aa.ZodMap,...SA(n)});var Zae=class mit extends JA{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==xr.set)return nr(o,{code:hi.invalid_type,expected:xr.set,received:o.parsedType}),ea;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(nr(o,{code:hi.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(nr(o,{code:hi.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const r=this._def.valueType;function s(A){const c=new Set;for(const l of A){if(l.status==="aborted")return ea;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const a=[...o.data.values()].map((A,c)=>r._parse(new p7(o,A,o.path,c)));return o.common.async?Promise.all(a).then(A=>s(A)):s(a)}min(e,n){return new mit({...this._def,minSize:{value:e,message:rs.toString(n)}})}max(e,n){return new mit({...this._def,maxSize:{value:e,message:rs.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};Zae.create=(t,e)=>new Zae({valueType:t,minSize:null,maxSize:null,typeName:aa.ZodSet,...SA(e)});var zCt=class zye extends JA{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==xr.function)return nr(n,{code:hi.invalid_type,expected:xr.function,received:n.parsedType}),ea;function o(a,A){return Wae({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Jae(),EL].filter(c=>!!c),issueData:{code:hi.invalid_arguments,argumentsError:A}})}function i(a,A){return Wae({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Jae(),EL].filter(c=>!!c),issueData:{code:hi.invalid_return_type,returnTypeError:A}})}const r={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof QL){const a=this;return Dy(async function(...A){const c=new iB([]),l=await a._def.args.parseAsync(A,r).catch(g=>{throw c.addIssue(o(A,g)),c}),u=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(u,r).catch(g=>{throw c.addIssue(i(u,g)),c})})}{const a=this;return Dy(function(...A){const c=a._def.args.safeParse(A,r);if(!c.success)throw new iB([o(A,c.error)]);const l=Reflect.apply(s,this,c.data),u=a._def.returns.safeParse(l,r);if(!u.success)throw new iB([i(l,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new zye({...this._def,args:cv.create(e).rest(ZD.create())})}returns(e){return new zye({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new zye({args:e||cv.create([]).rest(ZD.create()),returns:n||ZD.create(),typeName:aa.ZodFunction,...SA(o)})}},PJ=class extends JA{get schema(){return this._def.getter()}_parse(t){const{ctx:e}=this._processInputParams(t);return this._def.getter()._parse({data:e.data,path:e.path,parent:e})}};PJ.create=(t,e)=>new PJ({getter:t,typeName:aa.ZodLazy,...SA(e)});var MJ=class extends JA{_parse(t){if(t.data!==this._def.value){const e=this._getOrReturnCtx(t);return nr(e,{received:e.data,code:hi.invalid_literal,expected:this._def.value}),ea}return{status:"valid",value:t.data}}get value(){return this._def.value}};function JCt(t,e){return new DJ({values:t,typeName:aa.ZodEnum,...SA(e)})}MJ.create=(t,e)=>new MJ({value:t,typeName:aa.ZodLiteral,...SA(e)});var DJ=class _it extends JA{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return nr(n,{expected:Cl.joinValues(o),received:n.parsedType,code:hi.invalid_type}),ea}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return nr(n,{received:n.data,code:hi.invalid_enum_value,options:o}),ea}return Dy(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return _it.create(e,{...this._def,...n})}exclude(e,n=this._def){return _it.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}};DJ.create=JCt;var NJ=class extends JA{_parse(t){const e=Cl.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==xr.string&&n.parsedType!==xr.number){const o=Cl.objectValues(e);return nr(n,{expected:Cl.joinValues(o),received:n.parsedType,code:hi.invalid_type}),ea}if(this._cache||(this._cache=new Set(Cl.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Cl.objectValues(e);return nr(n,{received:n.data,code:hi.invalid_enum_value,options:o}),ea}return Dy(t.data)}get enum(){return this._def.values}};NJ.create=(t,e)=>new NJ({values:t,typeName:aa.ZodNativeEnum,...SA(e)});var QL=class extends JA{unwrap(){return this._def.type}_parse(t){const{ctx:e}=this._processInputParams(t);if(e.parsedType!==xr.promise&&e.common.async===!1)return nr(e,{code:hi.invalid_type,expected:xr.promise,received:e.parsedType}),ea;const n=e.parsedType===xr.promise?e.data:Promise.resolve(e.data);return Dy(n.then(o=>this._def.type.parseAsync(o,{path:e.path,errorMap:e.common.contextualErrorMap})))}};QL.create=(t,e)=>new QL({type:t,typeName:aa.ZodPromise,...SA(e)});var rB=class extends JA{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===aa.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:e,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:r=>{nr(n,r),r.fatal?e.abort():e.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const r=o.transform(n.data,i);if(n.common.async)return Promise.resolve(r).then(async s=>{if(e.value==="aborted")return ea;const a=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return a.status==="aborted"?ea:a.status==="dirty"||e.value==="dirty"?jae(a.value):a});{if(e.value==="aborted")return ea;const s=this._def.schema._parseSync({data:r,path:n.path,parent:n});return s.status==="aborted"?ea:s.status==="dirty"||e.value==="dirty"?jae(s.value):s}}if(o.type==="refinement"){const r=s=>{const a=o.refinement(s,i);if(n.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?ea:(s.status==="dirty"&&e.dirty(),r(s.value),{status:e.value,value:s.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?ea:(s.status==="dirty"&&e.dirty(),r(s.value).then(()=>({status:e.value,value:s.value}))))}if(o.type==="transform"){if(n.common.async===!1){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!XD(r))return ea;const s=o.transform(r.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:e.value,value:s}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(r=>XD(r)?Promise.resolve(o.transform(r.value,i)).then(s=>({status:e.value,value:s})):ea)}Cl.assertNever(o)}};rB.create=(t,e,n)=>new rB({schema:t,typeName:aa.ZodEffects,effect:e,...SA(n)}),rB.createWithPreprocess=(t,e,n)=>new rB({schema:e,effect:{type:"preprocess",transform:t},typeName:aa.ZodEffects,...SA(n)});var m7=class extends JA{_parse(t){return this._getType(t)===xr.undefined?Dy(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};m7.create=(t,e)=>new m7({innerType:t,typeName:aa.ZodOptional,...SA(e)});var lv=class extends JA{_parse(t){return this._getType(t)===xr.null?Dy(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lv.create=(t,e)=>new lv({innerType:t,typeName:aa.ZodNullable,...SA(e)});var RJ=class extends JA{_parse(t){const{ctx:e}=this._processInputParams(t);let n=e.data;return e.parsedType===xr.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:e.path,parent:e})}removeDefault(){return this._def.innerType}};RJ.create=(t,e)=>new RJ({innerType:t,typeName:aa.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...SA(e)});var TJ=class extends JA{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return yJ(i)?i.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new iB(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new iB(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};TJ.create=(t,e)=>new TJ({innerType:t,typeName:aa.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...SA(e)});var eAe=class extends JA{_parse(e){if(this._getType(e)!==xr.nan){const n=this._getOrReturnCtx(e);return nr(n,{code:hi.invalid_type,expected:xr.nan,received:n.parsedType}),ea}return{status:"valid",value:e.data}}};eAe.create=t=>new eAe({typeName:aa.ZodNaN,...SA(t)});var Doo=Symbol("zod_brand"),_8e=class extends JA{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}},f8e=class g5n extends JA{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ea:i.status==="dirty"?(n.dirty(),jae(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ea:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new g5n({in:e,out:n,typeName:aa.ZodPipeline})}},kJ=class extends JA{_parse(e){const n=this._def.innerType._parse(e),o=i=>(XD(i)&&(i.value=Object.freeze(i.value)),i);return yJ(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}};function WCt(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function jCt(t,e={},n){return t?bL.create().superRefine((o,i)=>{const r=t(o);if(r instanceof Promise)return r.then(s=>{if(!s){const a=WCt(e,o),A=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:A})}});if(!r){const s=WCt(e,o),a=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:a})}}):bL.create()}kJ.create=(t,e)=>new kJ({innerType:t,typeName:aa.ZodReadonly,...SA(e)});var aa,Yc,Noo={object:H5.lazycreate};(Yc=aa||(aa={})).ZodString="ZodString",Yc.ZodNumber="ZodNumber",Yc.ZodNaN="ZodNaN",Yc.ZodBigInt="ZodBigInt",Yc.ZodBoolean="ZodBoolean",Yc.ZodDate="ZodDate",Yc.ZodSymbol="ZodSymbol",Yc.ZodUndefined="ZodUndefined",Yc.ZodNull="ZodNull",Yc.ZodAny="ZodAny",Yc.ZodUnknown="ZodUnknown",Yc.ZodNever="ZodNever",Yc.ZodVoid="ZodVoid",Yc.ZodArray="ZodArray",Yc.ZodObject="ZodObject",Yc.ZodUnion="ZodUnion",Yc.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Yc.ZodIntersection="ZodIntersection",Yc.ZodTuple="ZodTuple",Yc.ZodRecord="ZodRecord",Yc.ZodMap="ZodMap",Yc.ZodSet="ZodSet",Yc.ZodFunction="ZodFunction",Yc.ZodLazy="ZodLazy",Yc.ZodLiteral="ZodLiteral",Yc.ZodEnum="ZodEnum",Yc.ZodEffects="ZodEffects",Yc.ZodNativeEnum="ZodNativeEnum",Yc.ZodOptional="ZodOptional",Yc.ZodNullable="ZodNullable",Yc.ZodDefault="ZodDefault",Yc.ZodCatch="ZodCatch",Yc.ZodPromise="ZodPromise",Yc.ZodBranded="ZodBranded",Yc.ZodPipeline="ZodPipeline",Yc.ZodReadonly="ZodReadonly";var Roo=(t,e={message:`Input not instance of ${t.name}`})=>jCt(n=>n instanceof t,e),$Ct=BL.create,qCt=xJ.create,Too=eAe.create,koo=EJ.create,XCt=BJ.create,Foo=bJ.create,Loo=$ae.create,Hoo=SJ.create,Ooo=QJ.create,Goo=bL.create,Yoo=ZD.create,Uoo=eb.create,Koo=qae.create,Voo=eN.create,zoo=H5.create,Joo=H5.strictCreate,Woo=vJ.create,joo=KCt.create,$oo=wJ.create,qoo=cv.create,Xoo=VCt.create,Zoo=Xae.create,eio=Zae.create,tio=zCt.create,nio=PJ.create,oio=MJ.create,iio=DJ.create,rio=NJ.create,sio=QL.create,ZCt=rB.create,aio=m7.create,Aio=lv.create,cio=rB.createWithPreprocess,lio=f8e.create,uio=()=>$Ct().optional(),gio=()=>qCt().optional(),dio=()=>XCt().optional(),hio={string:t=>BL.create({...t,coerce:!0}),number:t=>xJ.create({...t,coerce:!0}),boolean:t=>BJ.create({...t,coerce:!0}),bigint:t=>EJ.create({...t,coerce:!0}),date:t=>bJ.create({...t,coerce:!0})},pio=ea,tAe=N.string().or(N.number()).transform(t=>L5(t,"Ω").value),I8e=N.string().or(N.number()).transform(t=>L5(t,"F").value).transform(t=>Number.parseFloat(t.toPrecision(12))),eyt=N.string().or(N.number()).transform(t=>L5(t,"H").value),tb=N.string().or(N.number()).transform(t=>L5(t,"V").value),Di=N.string().or(N.number()).transform(t=>L5(t).value),tN=N.string().or(N.number()).transform(t=>L5(t,"Hz").value),ao=Di,vL=N.string().or(N.number()).transform(t=>L5(t,"A").value),wL=N.string().or(N.number()).transform(t=>L5(t).value),mio=wL,J_=wL,tyt=N.string().datetime(),im=N.string().or(N.number()).transform(t=>typeof t=="number"?t:t.endsWith("deg")?Number.parseFloat(t.split("deg")[0]):t.endsWith("rad")?180*Number.parseFloat(t.split("rad")[0])/Math.PI:Number.parseFloat(t)),nyt=N.number().or(N.string().endsWith("mAh")).transform(t=>{if(typeof t=="string"){const e=t.replace("mAh",""),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error("Invalid capacity");return n}return t}).describe("Battery capacity in mAh"),_r=N.object({x:ao,y:ao}),_io=_r,nb=N.object({x:ao,y:ao,z:ao}),fio=nb,C8e=N.object({width:N.number(),height:N.number()}),So=t=>N.string().optional().default(()=>`${t}_${(e=>{const n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:e},()=>n[Math.floor(62*Math.random())]).join("")})(10)}`),ob=N.enum(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),Iio=N.enum(["top_silkscreen","bottom_silkscreen","top_copper","bottom_copper","top_soldermask","bottom_soldermask","top_fabrication_note","bottom_fabrication_note","top_user_note","bottom_user_note","top_courtyard","bottom_courtyard","inner1_copper","inner2_copper","inner3_copper","inner4_copper","inner5_copper","inner6_copper","inner7_copper","inner8_copper","edge_cuts","drill"]),y8e=N.object({project_relative_path:N.string(),url:N.string(),mimetype:N.string()}),nAe=_r.extend({rotation:im.optional()}),x8e=N.object({size:_r.optional(),thickness:ao.optional()}),oyt=N.object({font:x8e.optional()}),FJ=N.object({value:N.string(),at:nAe.optional(),layer:N.string().optional(),uuid:N.string().optional(),hide:N.boolean().optional(),effects:oyt.optional()}),iyt=N.object({Reference:FJ.optional(),Value:FJ.optional(),Datasheet:FJ.optional(),Description:FJ.optional()}),ryt=N.object({through_hole:N.boolean().optional(),smd:N.boolean().optional(),exclude_from_pos_files:N.boolean().optional(),exclude_from_bom:N.boolean().optional()}),syt=N.object({name:N.string(),type:N.string(),shape:N.string().optional(),at:nAe.optional(),size:_r.optional(),drill:ao.optional(),layers:N.array(N.string()).optional(),removeUnusedLayers:N.boolean().optional(),uuid:N.string().optional()}),ayt=N.object({path:N.string(),offset:nb.optional(),scale:nb.optional(),rotate:nb.optional()}),Ayt=N.object({footprintName:N.string().optional(),version:N.union([N.number(),N.string()]).optional(),generator:N.string().optional(),generatorVersion:N.union([N.number(),N.string()]).optional(),layer:N.string().optional(),properties:iyt.optional(),attributes:ryt.optional(),pads:N.array(syt).optional(),embeddedFonts:N.boolean().optional(),model:ayt.optional()}),cyt=N.object({hide:N.boolean().optional()}),lyt=N.object({offset:ao.optional(),hide:N.boolean().optional()}),uyt=N.object({font:x8e.optional(),justify:N.union([N.string(),N.array(N.string())]).optional(),hide:N.boolean().optional()}),uv=N.object({value:N.string(),id:N.union([N.number(),N.string()]).optional(),at:nAe.optional(),effects:uyt.optional()}),gyt=N.object({Reference:uv.optional(),Value:uv.optional(),Footprint:uv.optional(),Datasheet:uv.optional(),Description:uv.optional(),ki_keywords:uv.optional(),ki_fp_filters:uv.optional()}),dyt=N.object({symbolName:N.string().optional(),extends:N.string().optional(),pinNumbers:cyt.optional(),pinNames:lyt.optional(),excludeFromSim:N.boolean().optional(),inBom:N.boolean().optional(),onBoard:N.boolean().optional(),properties:gyt.optional(),embeddedFonts:N.boolean().optional()}),Wl=N.object({error_type:N.string(),message:N.string(),is_fatal:N.boolean().optional()}),oAe=N.enum(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),vu=N.object({type:N.literal("source_component"),ftype:N.string().optional(),source_component_id:N.string(),name:N.string(),manufacturer_part_number:N.string().optional(),supplier_part_numbers:N.record(oAe,N.array(N.string())).optional(),display_value:N.string().optional(),display_name:N.string().optional(),are_pins_interchangeable:N.boolean().optional(),internally_connected_source_port_ids:N.array(N.array(N.string())).optional(),source_group_id:N.string().optional(),subcircuit_id:N.string().optional()}),E8e=vu.extend({ftype:N.literal("simple_capacitor"),capacitance:I8e,max_voltage_rating:tb.optional(),display_capacitance:N.string().optional(),max_decoupling_trace_length:ao.optional()}),B8e=vu.extend({ftype:N.literal("simple_resistor"),resistance:tAe,display_resistance:N.string().optional()}),iAe=vu.extend({ftype:N.literal("simple_diode")}),hyt=vu.extend({ftype:N.literal("simple_fiducial")}),b8e=iAe.extend({ftype:N.literal("simple_led"),color:N.string().optional(),wavelength:N.string().optional()}),pyt=vu.extend({ftype:N.literal("simple_ground")}),S8e=vu.extend({ftype:N.literal("simple_chip")}),Q8e=vu.extend({ftype:N.literal("simple_power_source"),voltage:tb}),myt=vu.extend({ftype:N.literal("simple_current_source"),current:vL,frequency:tN.optional(),peak_to_peak_current:vL.optional(),wave_shape:N.enum(["sine","square","triangle","sawtooth","dc"]).optional().default("dc"),phase:N.number().optional(),duty_cycle:N.number().min(0).max(1).optional()}),_yt=vu.extend({ftype:N.literal("simple_fuse"),current_rating_amps:N.number().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:N.number().describe("Voltage rating in volts, e.g. ±5V would be 5")}),fyt=vu.extend({ftype:N.literal("simple_ammeter")}),Iyt=N.object({must_be_connected:N.boolean().optional(),provides_power:N.boolean().optional(),requires_power:N.boolean().optional(),provides_ground:N.boolean().optional(),requires_ground:N.boolean().optional(),provides_voltage:N.union([N.string(),N.number()]).optional(),requires_voltage:N.union([N.string(),N.number()]).optional(),do_not_connect:N.boolean().optional(),include_in_board_pinout:N.boolean().optional(),can_use_internal_pullup:N.boolean().optional(),is_using_internal_pullup:N.boolean().optional(),needs_external_pullup:N.boolean().optional(),can_use_internal_pulldown:N.boolean().optional(),is_using_internal_pulldown:N.boolean().optional(),needs_external_pulldown:N.boolean().optional(),can_use_open_drain:N.boolean().optional(),is_using_open_drain:N.boolean().optional(),can_use_push_pull:N.boolean().optional(),is_using_push_pull:N.boolean().optional(),should_have_decoupling_capacitor:N.boolean().optional(),recommended_decoupling_capacitor_capacitance:N.union([N.string(),N.number()]).optional(),is_configured_for_i2c_sda:N.boolean().optional(),is_configured_for_i2c_scl:N.boolean().optional(),is_configured_for_spi_mosi:N.boolean().optional(),is_configured_for_spi_miso:N.boolean().optional(),is_configured_for_spi_sck:N.boolean().optional(),is_configured_for_spi_cs:N.boolean().optional(),is_configured_for_uart_tx:N.boolean().optional(),is_configured_for_uart_rx:N.boolean().optional(),supports_i2c_sda:N.boolean().optional(),supports_i2c_scl:N.boolean().optional(),supports_spi_mosi:N.boolean().optional(),supports_spi_miso:N.boolean().optional(),supports_spi_sck:N.boolean().optional(),supports_spi_cs:N.boolean().optional(),supports_uart_tx:N.boolean().optional(),supports_uart_rx:N.boolean().optional()}),v8e=vu.extend({ftype:N.literal("simple_battery"),capacity:nyt}),w8e=vu.extend({ftype:N.literal("simple_inductor"),inductance:eyt,display_inductance:N.string().optional(),max_current_rating:N.number().optional()}),P8e=vu.extend({ftype:N.literal("simple_push_button")}),M8e=vu.extend({ftype:N.literal("simple_potentiometer"),max_resistance:tAe,display_max_resistance:N.string().optional()}),Cyt=vu.extend({ftype:N.literal("simple_crystal"),frequency:N.number().describe("Frequency in Hz"),load_capacitance:N.number().optional().describe("Load capacitance in pF"),pin_variant:N.enum(["two_pin","four_pin"]).optional()}),D8e=vu.extend({ftype:N.literal("simple_pin_header"),pin_count:N.number(),gender:N.enum(["male","female"]).optional().default("male")}),yyt=vu.extend({ftype:N.literal("simple_connector"),standard:N.enum(["usb_c","m2"]).optional()}),N8e=vu.extend({ftype:N.literal("simple_pinout")}),R8e=vu.extend({ftype:N.literal("simple_resonator"),load_capacitance:I8e,equivalent_series_resistance:tAe.optional(),frequency:tN}),T8e=vu.extend({ftype:N.literal("simple_transistor"),transistor_type:N.enum(["npn","pnp"])}),k8e=vu.extend({ftype:N.literal("simple_test_point"),footprint_variant:N.enum(["pad","through_hole"]).optional(),pad_shape:N.enum(["rect","circle"]).optional(),pad_diameter:N.union([N.number(),N.string()]).optional(),hole_diameter:N.union([N.number(),N.string()]).optional(),width:N.union([N.number(),N.string()]).optional(),height:N.union([N.number(),N.string()]).optional()}),F8e=vu.extend({ftype:N.literal("simple_mosfet"),channel_type:N.enum(["n","p"]),mosfet_mode:N.enum(["enhancement","depletion"])}),L8e=vu.extend({ftype:N.literal("simple_op_amp")}),H8e=vu.extend({ftype:N.literal("simple_switch")}),O8e=N.object({type:N.literal("source_project_metadata"),name:N.string().optional(),software_used_string:N.string().optional(),project_url:N.string().optional(),source_filesystem_md5_hash:N.string().optional(),created_at:tyt.optional()}),xyt=Wl.extend({type:N.literal("source_missing_property_error"),source_missing_property_error_id:So("source_missing_property_error"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal("source_missing_property_error").default("source_missing_property_error")}).describe("The source code is missing a property"),Eyt=Wl.extend({type:N.literal("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:So("source_failed_to_create_component_error"),error_type:N.literal("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:N.string().optional(),subcircuit_id:N.string().optional(),parent_source_component_id:N.string().optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),schematic_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),G8e=Wl.extend({type:N.literal("source_invalid_component_property_error"),source_invalid_component_property_error_id:So("source_invalid_component_property_error"),source_component_id:N.string(),property_name:N.string(),property_value:N.unknown().optional(),expected_format:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal("source_invalid_component_property_error").default("source_invalid_component_property_error")}).describe("The source component property is invalid"),Y8e=Wl.extend({type:N.literal("source_trace_not_connected_error"),source_trace_not_connected_error_id:So("source_trace_not_connected_error"),error_type:N.literal("source_trace_not_connected_error").default("source_trace_not_connected_error"),subcircuit_id:N.string().optional(),source_group_id:N.string().optional(),source_trace_id:N.string().optional(),connected_source_port_ids:N.array(N.string()).optional(),selectors_not_found:N.array(N.string()).optional()}).describe("Occurs when a source trace selector does not match any ports"),Byt=N.object({type:N.literal("source_property_ignored_warning"),source_property_ignored_warning_id:So("source_property_ignored_warning"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal("source_property_ignored_warning").default("source_property_ignored_warning"),message:N.string()}).describe("The source property was ignored"),U8e=N.object({type:N.literal("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:So("source_pin_missing_trace_warning"),warning_type:N.literal("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:N.string(),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),K8e=N.object({type:N.literal("source_missing_manufacturer_part_number_warning"),source_missing_manufacturer_part_number_warning_id:So("source_missing_manufacturer_part_number_warning"),warning_type:N.literal("source_missing_manufacturer_part_number_warning").default("source_missing_manufacturer_part_number_warning"),message:N.string(),source_component_id:N.string(),standard:N.string(),subcircuit_id:N.string().optional()}).describe("Warning emitted when a standard connector is missing manufacturer part number"),V8e=N.object({type:N.literal("source_refdes_convention_warning"),source_refdes_convention_warning_id:So("source_refdes_convention_warning"),warning_type:N.literal("source_refdes_convention_warning").default("source_refdes_convention_warning"),message:N.string(),source_component_id:N.string(),refdes:N.string(),source_component_ftype:N.string(),expected_prefixes:N.array(N.string()),actual_prefix:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Warning emitted when a source component reference designator does not match the component type convention"),byt=vu.extend({ftype:N.literal("simple_voltage_probe")}),Syt=vu.extend({ftype:N.literal("interconnect")}),z8e=Wl.extend({type:N.literal("source_i2c_misconfigured_error"),source_i2c_misconfigured_error_id:So("source_i2c_misconfigured_error"),error_type:N.literal("source_i2c_misconfigured_error").default("source_i2c_misconfigured_error"),source_port_ids:N.array(N.string())}).describe("Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net"),J8e=Wl.extend({type:N.literal("source_component_misconfigured_error"),source_component_misconfigured_error_id:So("source_component_misconfigured_error"),error_type:N.literal("source_component_misconfigured_error").default("source_component_misconfigured_error"),source_component_ids:N.array(N.string()),source_port_ids:N.array(N.string()).optional()}).describe("Error emitted when one or more source components have an invalid or conflicting configuration"),Qyt=vu.extend({ftype:N.literal("simple_voltage_source"),voltage:tb,frequency:tN.optional(),peak_to_peak_voltage:tb.optional(),wave_shape:N.enum(["sinewave","square","triangle","sawtooth"]).optional(),phase:im.optional(),duty_cycle:N.number().optional().describe("Duty cycle as a fraction (0 to 1)"),pulse_delay:J_.optional(),rise_time:J_.optional(),fall_time:J_.optional(),pulse_width:J_.optional(),period:J_.optional()}),vyt=N.union([B8e,E8e,iAe,hyt,b8e,pyt,S8e,Q8e,myt,fyt,v8e,w8e,P8e,M8e,Cyt,D8e,yyt,N8e,R8e,H8e,T8e,k8e,F8e,L8e,_yt,byt,Syt,Qyt,O8e,xyt,G8e,Eyt,Y8e,Byt,U8e,K8e,V8e,z8e,J8e]),wyt=N.object({type:N.literal("source_port"),pin_number:N.number().optional(),port_hints:N.array(N.string()).optional(),name:N.string(),source_port_id:N.string(),source_component_id:N.string().optional(),source_group_id:N.string().optional(),most_frequently_referenced_by_name:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}).merge(Iyt),Pyt=N.object({type:N.literal("source_component_internal_connection"),source_component_internal_connection_id:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}),Myt=N.object({type:N.literal("source_trace"),source_trace_id:N.string(),connected_source_port_ids:N.array(N.string()),connected_source_net_ids:N.array(N.string()),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),max_length:N.number().optional(),name:N.string().optional(),min_trace_thickness:N.number().optional(),display_name:N.string().optional()}),Dyt=N.object({type:N.literal("source_group"),source_group_id:N.string(),subcircuit_id:N.string().optional(),parent_subcircuit_id:N.string().optional(),parent_source_group_id:N.string().optional(),is_subcircuit:N.boolean().optional(),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),was_automatically_named:N.boolean().optional()}),Nyt=N.object({type:N.literal("source_net"),source_net_id:N.string(),name:N.string(),member_source_group_ids:N.array(N.string()),is_power:N.boolean().optional(),is_ground:N.boolean().optional(),is_digital_signal:N.boolean().optional(),is_analog_signal:N.boolean().optional(),is_positive_voltage_source:N.boolean().optional(),trace_width:N.number().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),Ryt=N.object({type:N.literal("source_board"),source_board_id:N.string(),source_group_id:N.string(),title:N.string().optional()}).describe("Defines a board in the source domain"),Tyt=Wl.extend({type:N.literal("source_ambiguous_port_reference"),source_ambiguous_port_reference_id:So("source_ambiguous_port_reference"),error_type:N.literal("source_ambiguous_port_reference").default("source_ambiguous_port_reference"),source_port_id:N.string().optional(),source_component_id:N.string().optional()}).describe("Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous"),kyt=N.object({type:N.literal("source_pcb_ground_plane"),source_pcb_ground_plane_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional()}).describe("Defines a ground plane in the source domain"),LJ=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6","inner7","inner8"],W8e=N.enum(LJ),WA=W8e.or(N.object({name:W8e})).transform(t=>typeof t=="string"?t:t.name),W_=N.enum(["top","bottom"]),Fyt=N.object({type:N.literal("source_manually_placed_via"),source_manually_placed_via_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional()}).describe("Defines a via that is manually placed in the source domain"),Lyt=N.object({type:N.literal("source_unnamed_trace_warning"),source_unnamed_trace_warning_id:So("source_unnamed_trace_warning"),warning_type:N.literal("source_unnamed_trace_warning").default("source_unnamed_trace_warning"),message:N.string(),source_trace_id:N.string(),subcircuit_id:N.string().optional()}).describe("Warning emitted when a source trace is missing a name"),Hyt=N.object({type:N.literal("source_no_power_pin_defined_warning"),source_no_power_pin_defined_warning_id:So("source_no_power_pin_defined_warning"),warning_type:N.literal("source_no_power_pin_defined_warning").default("source_no_power_pin_defined_warning"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Warning emitted when a chip has no source ports with requires_power=true"),Oyt=N.object({type:N.literal("source_no_ground_pin_defined_warning"),source_no_ground_pin_defined_warning_id:So("source_no_ground_pin_defined_warning"),warning_type:N.literal("source_no_ground_pin_defined_warning").default("source_no_ground_pin_defined_warning"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Warning emitted when a chip has no source ports marked as ground pins"),Gyt=N.object({type:N.literal("source_component_pins_underspecified_warning"),source_component_pins_underspecified_warning_id:So("source_component_pins_underspecified_warning"),warning_type:N.literal("source_component_pins_underspecified_warning").default("source_component_pins_underspecified_warning"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Warning emitted when all ports on a source component are underspecified"),Yyt=Wl.extend({type:N.literal("source_pin_must_be_connected_error"),source_pin_must_be_connected_error_id:So("source_pin_must_be_connected_error"),error_type:N.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe("Error emitted when a pin with mustBeConnected attribute is not connected to any trace"),Uyt=Wl.extend({type:N.literal("unknown_error_finding_part"),unknown_error_finding_part_id:So("unknown_error_finding_part"),error_type:N.literal("unknown_error_finding_part").default("unknown_error_finding_part"),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when an unexpected error occurs while finding a part"),Kyt=N.object({type:N.literal("source_part_not_found_warning"),source_part_not_found_warning_id:So("source_part_not_found_warning"),warning_type:N.literal("source_part_not_found_warning").default("source_part_not_found_warning"),message:N.string(),source_component_id:N.string().optional(),subcircuit_id:N.string().optional(),supplier_name:oAe.optional(),manufacturer_part_number:N.string().optional(),supplier_part_number:N.string().optional(),part_name:N.string().optional()}).describe("Warning emitted when a requested part can not be found"),Vyt=N.object({type:N.literal("schematic_box"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),width:ao,height:ao,is_dashed:N.boolean().default(!1),x:ao,y:ao,subcircuit_id:N.string().optional()}).describe("Draws a box on the schematic"),zyt=N.object({type:N.literal("schematic_path"),schematic_path_id:So("schematic_path"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),fill_color:N.string().optional(),is_filled:N.boolean().optional(),is_dashed:N.boolean().default(!1),stroke_width:ao.nullable().optional(),stroke_color:N.string().optional(),dash_length:ao.optional(),dash_gap:ao.optional(),points:N.array(_r),subcircuit_id:N.string().optional()}),Jyt=N.record(N.object({left_margin:Di.optional(),right_margin:Di.optional(),top_margin:Di.optional(),bottom_margin:Di.optional()})),Wyt=N.object({left_size:N.number(),right_size:N.number(),top_size:N.number().optional(),bottom_size:N.number().optional()}),jyt=N.object({left_side:N.object({pins:N.array(N.number()),direction:N.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:N.object({pins:N.array(N.number()),direction:N.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:N.object({pins:N.array(N.number()),direction:N.enum(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:N.object({pins:N.array(N.number()),direction:N.enum(["left-to-right","right-to-left"]).optional()}).optional()}),$yt=N.union([Wyt,jyt]),qyt=N.object({type:N.literal("schematic_component"),size:C8e,center:_r,source_component_id:N.string().optional(),schematic_component_id:N.string(),schematic_sheet_id:N.string().optional(),schematic_symbol_id:N.string().optional(),pin_spacing:Di.optional(),pin_styles:Jyt.optional(),box_width:Di.optional(),symbol_name:N.string().optional(),port_arrangement:$yt.optional(),port_labels:N.record(N.string()).optional(),symbol_display_value:N.string().optional(),subcircuit_id:N.string().optional(),schematic_group_id:N.string().optional(),is_schematic_group:N.boolean().optional(),source_group_id:N.string().optional(),is_box_with_pins:N.boolean().optional().default(!0)}),Cio=N.object({kicad_symbol:dyt.optional()}).catchall(N.unknown()),Xyt=N.object({type:N.literal("schematic_symbol"),schematic_symbol_id:N.string(),name:N.string().optional(),metadata:Cio.optional()}).describe("Defines a named schematic symbol that can be referenced by components."),Zyt=N.object({type:N.literal("schematic_line"),schematic_line_id:So("schematic_line"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),x1:ao,y1:ao,x2:ao,y2:ao,stroke_width:ao.nullable().optional(),color:N.string().default("#000000"),is_dashed:N.boolean().default(!1),dash_length:ao.optional(),dash_gap:ao.optional(),subcircuit_id:N.string().optional()}).describe("Draws a styled line on the schematic"),e2t=N.object({type:N.literal("schematic_rect"),schematic_rect_id:So("schematic_rect"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:_r,width:ao,height:ao,rotation:im.default(0),stroke_width:ao.nullable().optional(),color:N.string().default("#000000"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe("Draws a styled rectangle on the schematic"),t2t=N.object({type:N.literal("schematic_circle"),schematic_circle_id:So("schematic_circle"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:_r,radius:ao,stroke_width:ao.nullable().optional(),color:N.string().default("#000000"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe("Draws a styled circle on the schematic"),n2t=N.object({type:N.literal("schematic_arc"),schematic_arc_id:So("schematic_arc"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:_r,radius:ao,start_angle_degrees:im,end_angle_degrees:im,direction:N.enum(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:ao.nullable().optional(),color:N.string().default("#000000"),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe("Draws a styled arc on the schematic"),o2t=N.object({type:N.literal("schematic_trace"),schematic_trace_id:N.string(),schematic_sheet_id:N.string().optional(),source_trace_id:N.string().optional(),junctions:N.array(N.object({x:N.number(),y:N.number()})),edges:N.array(N.object({from:N.object({x:N.number(),y:N.number()}),to:N.object({x:N.number(),y:N.number()}),is_crossing:N.boolean().optional(),from_schematic_port_id:N.string().optional(),to_schematic_port_id:N.string().optional()})),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),yio=N.enum(["center","left","right","top","bottom"]),i2t=N.object({type:N.literal("schematic_text"),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),schematic_text_id:N.string(),text:N.string(),font_size:N.number().default(.18),position:N.object({x:ao,y:ao}),rotation:N.number().default(0),anchor:N.union([yio.describe("legacy"),ob]).default("center"),color:N.string().default("#000000"),subcircuit_id:N.string().optional()}),r2t=N.object({type:N.literal("schematic_port"),schematic_port_id:N.string(),source_port_id:N.string(),schematic_sheet_id:N.string().optional(),schematic_component_id:N.string().optional(),center:_r,facing_direction:N.enum(["up","down","left","right"]).optional(),distance_from_component_edge:N.number().optional(),side_of_component:N.enum(["top","bottom","left","right"]).optional(),true_ccw_index:N.number().optional(),pin_number:N.number().optional(),display_pin_label:N.string().optional(),subcircuit_id:N.string().optional(),is_connected:N.boolean().optional(),has_input_arrow:N.boolean().optional(),has_output_arrow:N.boolean().optional(),is_drawn_with_inversion_circle:N.boolean().optional()}).describe("Defines a port on a schematic component"),s2t=N.object({type:N.literal("schematic_net_label"),schematic_net_label_id:So("schematic_net_label"),schematic_sheet_id:N.string().optional(),schematic_trace_id:N.string().optional(),source_trace_id:N.string().optional(),source_net_id:N.string(),center:_r,anchor_position:_r.optional(),anchor_side:N.enum(["top","bottom","left","right"]),text:N.string(),symbol_name:N.string().optional(),is_movable:N.boolean().optional(),subcircuit_id:N.string().optional()}),a2t=Wl.extend({type:N.literal("schematic_error"),schematic_error_id:N.string(),error_type:N.literal("schematic_port_not_found").default("schematic_port_not_found"),subcircuit_id:N.string().optional()}).describe("Defines a schematic error on the schematic"),A2t=Wl.extend({type:N.literal("schematic_layout_error"),schematic_layout_error_id:So("schematic_layout_error"),error_type:N.literal("schematic_layout_error").default("schematic_layout_error"),source_group_id:N.string(),schematic_group_id:N.string(),subcircuit_id:N.string().optional()}).describe("Error emitted when schematic layout fails for a group"),rAe=N.object({type:N.literal("schematic_debug_object"),label:N.string().optional(),subcircuit_id:N.string().optional()}),c2t=rAe.extend({shape:N.literal("rect"),center:_r,size:C8e}),l2t=rAe.extend({shape:N.literal("line"),start:_r,end:_r}),u2t=rAe.extend({shape:N.literal("point"),center:_r}),g2t=N.discriminatedUnion("shape",[c2t,l2t,u2t]),d2t=N.object({type:N.literal("schematic_voltage_probe"),schematic_voltage_probe_id:N.string(),schematic_sheet_id:N.string().optional(),source_component_id:N.string().optional(),name:N.string().optional(),position:_r,schematic_trace_id:N.string(),voltage:tb.optional(),subcircuit_id:N.string().optional(),color:N.string().optional(),label_alignment:ob.optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),h2t=N.object({type:N.literal("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:So("schematic_manual_edit_conflict_warning"),warning_type:N.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:N.string(),schematic_component_id:N.string(),schematic_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),p2t=N.object({type:N.literal("schematic_group"),schematic_group_id:So("schematic_group"),schematic_sheet_id:N.string().optional(),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Di,height:Di,center:_r,schematic_component_ids:N.array(N.string()),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),description:N.string().optional()}).describe("Defines a group of components on the schematic"),m2t=N.object({type:N.literal("schematic_table"),schematic_table_id:So("schematic_table"),schematic_sheet_id:N.string().optional(),anchor_position:_r,column_widths:N.array(ao),row_heights:N.array(ao),cell_padding:ao.optional(),border_width:ao.optional(),subcircuit_id:N.string().optional(),schematic_component_id:N.string().optional(),anchor:ob.optional()}).describe("Defines a table on the schematic"),_2t=N.object({type:N.literal("schematic_table_cell"),schematic_table_cell_id:So("schematic_table_cell"),schematic_sheet_id:N.string().optional(),schematic_table_id:N.string(),start_row_index:N.number(),end_row_index:N.number(),start_column_index:N.number(),end_column_index:N.number(),text:N.string().optional(),center:_r,width:ao,height:ao,horizontal_align:N.enum(["left","center","right"]).optional(),vertical_align:N.enum(["top","middle","bottom"]).optional(),font_size:ao.optional(),subcircuit_id:N.string().optional()}).describe("Defines a cell within a schematic_table"),f2t=N.object({type:N.literal("schematic_sheet"),schematic_sheet_id:So("schematic_sheet"),name:N.string().optional(),sheet_index:N.number().optional(),subcircuit_id:N.string().optional(),outline_color:N.string().optional()}).describe("Defines a schematic sheet or page that components can be placed on"),I2t=N.object({x:ao,y:ao,bulge:N.number().optional()}),j8e=N.object({vertices:N.array(I2t)}),$8e=N.object({outer_ring:j8e,inner_rings:N.array(j8e).default([])}),C2t=N.object({x:ao,y:ao,via:N.boolean().optional(),via_to_layer:WA.optional()}),xio=N.array(C2t),y2t=N.object({x:ao,y:ao,via:N.boolean().optional(),to_layer:WA.optional(),trace_width:ao.optional()}),x2t=N.object({min_trace_width:Di.optional(),min_board_edge_clearance:Di.optional(),min_via_hole_edge_to_via_hole_edge_clearance:Di.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:Di.optional(),min_trace_to_pad_edge_clearance:Di.optional(),min_pad_edge_to_pad_edge_clearance:Di.optional(),min_same_net_trace_edge_to_trace_edge_clearance:Di.optional(),min_different_net_trace_edge_to_trace_edge_clearance:Di.optional(),min_via_edge_to_pad_edge_clearance:Di.optional(),min_via_hole_diameter:Di.optional(),min_via_pad_diameter:Di.optional()}),E2t=N.object({type:N.literal("pcb_component"),pcb_component_id:So("pcb_component"),source_component_id:N.string(),center:_r,layer:WA,rotation:im,display_offset_x:N.string().optional().describe("How to display the x offset for this part, usually corresponding with how the user specified it"),display_offset_y:N.string().optional().describe("How to display the y offset for this part, usually corresponding with how the user specified it"),width:Di,height:Di,do_not_place:N.boolean().optional(),is_allowed_to_be_off_board:N.boolean().optional(),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),position_mode:N.enum(["packed","relative_to_group_anchor","relative_to_another_component","none"]).optional(),anchor_position:_r.optional(),anchor_alignment:ob.optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),cable_insertion_center:_r.optional(),insertion_direction:N.enum(["from_above","from_left","from_right","from_front","from_back"]).optional(),metadata:N.object({kicad_footprint:Ayt.optional()}).optional(),obstructs_within_bounds:N.boolean().default(!0).describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath")}).describe("Defines a component on the PCB"),B2t=N.object({type:N.literal("pcb_hole"),pcb_hole_id:So("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("circle"),hole_diameter:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Eio=B2t.describe("Defines a circular hole on the PCB"),b2t=N.object({type:N.literal("pcb_hole"),pcb_hole_id:So("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("rect"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Bio=b2t.describe("Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."),S2t=N.object({type:N.literal("pcb_hole"),pcb_hole_id:So("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.enum(["circle","square"]),hole_diameter:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),bio=S2t.describe("Defines a circular or square hole on the PCB"),Q2t=N.object({type:N.literal("pcb_hole"),pcb_hole_id:So("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("oval"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Sio=Q2t.describe("Defines an oval hole on the PCB"),v2t=N.object({type:N.literal("pcb_hole"),pcb_hole_id:So("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("pill"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Qio=v2t.describe("Defines a pill-shaped hole on the PCB"),w2t=N.object({type:N.literal("pcb_hole"),pcb_hole_id:So("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("rotated_pill"),hole_width:N.number(),hole_height:N.number(),x:ao,y:ao,ccw_rotation:im,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),vio=w2t.describe("Defines a rotated pill-shaped hole on the PCB"),P2t=S2t.or(Q2t).or(v2t).or(w2t).or(B2t).or(b2t),wio=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("circle"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_diameter:N.number(),hole_diameter:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Pio=N.object({type:N.literal("pcb_plated_hole"),shape:N.enum(["oval","pill"]),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_width:N.number(),outer_height:N.number(),hole_width:N.number(),hole_height:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,ccw_rotation:im,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Mio=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("circular_hole_with_rect_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal("circle"),pad_shape:N.literal("rect"),hole_diameter:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So("pcb_plated_hole"),soldermask_margin:N.number().optional(),rect_ccw_rotation:im.optional()}),Dio=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("pill_hole_with_rect_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal("pill"),pad_shape:N.literal("rect"),hole_width:N.number(),hole_height:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Nio=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("rotated_pill_hole_with_rect_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal("rotated_pill"),pad_shape:N.literal("rect"),hole_width:N.number(),hole_height:N.number(),hole_ccw_rotation:im,rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),rect_ccw_rotation:im,hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Rio=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("hole_with_polygon_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.enum(["circle","oval","pill","rotated_pill"]),hole_diameter:N.number().optional(),hole_width:N.number().optional(),hole_height:N.number().optional(),pad_outline:N.array(N.object({x:ao,y:ao})).min(3),hole_offset_x:ao.default(0),hole_offset_y:ao.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ao,y:ao,layers:N.array(WA),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:So("pcb_plated_hole"),soldermask_margin:N.number().optional(),ccw_rotation:im.optional()}),M2t=N.union([wio,Pio,Mio,Dio,Nio,Rio]),D2t=N.object({type:N.literal("pcb_port"),pcb_port_id:So("pcb_port"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_port_id:N.string(),pcb_component_id:N.string().optional(),x:ao,y:ao,layers:N.array(WA),is_board_pinout:N.boolean().optional()}).describe("Defines a port on the PCB"),Tio=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("circle"),pcb_smtpad_id:So("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,radius:N.number(),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),kio=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("rect"),pcb_smtpad_id:So("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),Fio=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("rotated_rect"),pcb_smtpad_id:So("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),ccw_rotation:im,layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),N2t=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("pill"),pcb_smtpad_id:So("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),radius:N.number(),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Lio=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("rotated_pill"),pcb_smtpad_id:So("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),radius:N.number(),ccw_rotation:im,layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Hio=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("polygon"),pcb_smtpad_id:So("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),points:N.array(_r),layer:WA,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),R2t=N.discriminatedUnion("shape",[Tio,kio,Fio,Lio,N2t,Hio]).describe("Defines an SMT pad on the PCB"),Oio=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("circle"),pcb_solder_paste_id:So("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,radius:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Gio=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("rect"),pcb_solder_paste_id:So("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Yio=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("pill"),pcb_solder_paste_id:So("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),radius:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Uio=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("rotated_rect"),pcb_solder_paste_id:So("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),ccw_rotation:ao,layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Kio=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("oval"),pcb_solder_paste_id:So("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ao,y:ao,width:N.number(),height:N.number(),layer:WA,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),T2t=N.union([Oio,Gio,Yio,Uio,Kio]).describe("Defines solderpaste on the PCB"),k2t=N.object({type:N.literal("pcb_text"),pcb_text_id:So("pcb_text"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),text:N.string(),center:_r,layer:WA,width:Di,height:Di,lines:N.number(),align:N.enum(["bottom-left"])}).describe("Defines text on the PCB"),F2t=N.object({route_type:N.literal("wire"),x:ao,y:ao,width:ao,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),start_pcb_port_id:N.string().optional(),end_pcb_port_id:N.string().optional(),layer:WA}),L2t=N.object({route_type:N.literal("via"),x:ao,y:ao,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),hole_diameter:ao.optional(),outer_diameter:ao.optional(),from_layer:WA,to_layer:WA}),H2t=N.object({route_type:N.literal("through_pad"),start:_r,end:_r,width:ao,start_layer:WA,end_layer:WA,pcb_smtpad_id:N.string().optional(),pcb_plated_hole_id:N.string().optional()}),O2t=N.union([F2t,L2t,H2t]),G2t=N.object({type:N.literal("pcb_trace"),source_trace_id:N.string().optional(),pcb_component_id:N.string().optional(),pcb_trace_id:So("pcb_trace"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),route_thickness_mode:N.enum(["constant","interpolated"]).default("constant").optional(),route_order_index:N.number().optional(),should_round_corners:N.boolean().optional(),trace_length:N.number().optional(),highlight_color:N.string().optional(),route:N.array(O2t)}).describe("Defines a trace on the PCB"),Y2t=N.object({type:N.literal("pcb_trace_warning"),pcb_trace_warning_id:So("pcb_trace_warning"),warning_type:N.literal("pcb_trace_warning").default("pcb_trace_warning"),message:N.string(),center:_r.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines a trace warning on the PCB"),U2t=N.object({type:N.literal("pcb_trace_too_long_warning"),pcb_trace_too_long_warning_id:So("pcb_trace_too_long_warning"),warning_type:N.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),message:N.string(),pcb_trace_id:N.string(),source_net_id:N.string().optional(),source_trace_id:N.string().optional(),actual_trace_length:ao,maximum_trace_length:ao,subcircuit_id:N.string().optional()}).describe("Warning emitted when a PCB trace is longer than its maximum allowed length"),K2t=Wl.extend({type:N.literal("pcb_trace_error"),pcb_trace_error_id:So("pcb_trace_error"),error_type:N.literal("pcb_trace_error").default("pcb_trace_error"),center:_r.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines a trace error on the PCB"),V2t=Wl.extend({type:N.literal("pcb_trace_missing_error"),pcb_trace_missing_error_id:So("pcb_trace_missing_error"),error_type:N.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),center:_r.optional(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),z2t=Wl.extend({type:N.literal("pcb_port_not_matched_error"),pcb_error_id:So("pcb_error"),error_type:N.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),J2t=Wl.extend({type:N.literal("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:So("pcb_port_not_connected_error"),error_type:N.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),pcb_port_ids:N.array(N.string()),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),W2t=N.object({type:N.literal("pcb_net"),pcb_net_id:So("pcb_net"),source_net_id:N.string().optional(),highlight_color:N.string().optional()}).describe("Defines a net on the PCB"),j2t=N.object({type:N.literal("pcb_via"),pcb_via_id:So("pcb_via"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),x:ao,y:ao,outer_diameter:ao.default("0.6mm"),hole_diameter:ao.default("0.25mm"),from_layer:WA.optional(),to_layer:WA.optional(),layers:N.array(WA),pcb_trace_id:N.string().optional(),net_is_assignable:N.boolean().optional(),net_assigned:N.boolean().optional(),is_tented:N.boolean().optional()}).describe("Defines a via on the PCB"),$2t=N.object({type:N.literal("pcb_board"),pcb_board_id:So("pcb_board"),pcb_panel_id:N.string().optional(),carrier_pcb_board_id:N.string().optional(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),is_mounted_to_carrier_board:N.boolean().optional(),width:Di.optional(),height:Di.optional(),center:_r,display_offset_x:N.string().optional().describe("How to display the x offset for this board, usually corresponding with how the user specified it"),display_offset_y:N.string().optional().describe("How to display the y offset for this board, usually corresponding with how the user specified it"),thickness:Di.optional().default(1.4),num_layers:N.number().optional().default(4),outline:N.array(_r).optional(),shape:N.enum(["rect","polygon"]).optional(),material:N.enum(["fr4","fr1"]).default("fr4"),solder_mask_color:N.string().optional(),silkscreen_color:N.string().optional(),anchor_position:_r.optional(),anchor_alignment:ob.optional(),position_mode:N.enum(["relative_to_panel_anchor","none"]).optional()}).merge(x2t).describe("Defines the board outline of the PCB"),q2t=N.object({type:N.literal("pcb_panel"),pcb_panel_id:So("pcb_panel"),width:Di,height:Di,center:_r,thickness:Di.optional().default(1.4),covered_with_solder_mask:N.boolean().optional().default(!0)}).describe("Defines a PCB panel that can contain multiple boards"),X2t=Wl.extend({type:N.literal("pcb_placement_error"),pcb_placement_error_id:So("pcb_placement_error"),error_type:N.literal("pcb_placement_error").default("pcb_placement_error"),subcircuit_id:N.string().optional()}).describe("Defines a placement error on the PCB"),Z2t=Wl.extend({type:N.literal("pcb_panelization_placement_error"),pcb_panelization_placement_error_id:So("pcb_panelization_placement_error"),error_type:N.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),pcb_panel_id:N.string().optional(),pcb_board_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Defines a panelization placement error on the PCB"),ext=N.object({type:N.literal("pcb_trace_hint"),pcb_trace_hint_id:So("pcb_trace_hint"),pcb_port_id:N.string(),pcb_component_id:N.string(),route:N.array(y2t),subcircuit_id:N.string().optional()}).describe("A hint that can be used during generation of a PCB trace"),txt=N.object({type:N.literal("pcb_silkscreen_line"),pcb_silkscreen_line_id:So("pcb_silkscreen_line"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),stroke_width:ao.default("0.1mm"),x1:ao,y1:ao,x2:ao,y2:ao,layer:W_}).describe("Defines a silkscreen line on the PCB"),nxt=N.object({type:N.literal("pcb_silkscreen_path"),pcb_silkscreen_path_id:So("pcb_silkscreen_path"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,route:N.array(_r),stroke_width:Di}).describe("Defines a silkscreen path on the PCB"),oxt=N.object({type:N.literal("pcb_silkscreen_text"),pcb_silkscreen_text_id:So("pcb_silkscreen_text"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ao.default("0.2mm"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Di,top:Di,bottom:Di,right:Di}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:N.number().optional(),layer:WA,is_mirrored:N.boolean().default(!1).optional(),anchor_position:_r.default({x:0,y:0}),anchor_alignment:ob.default("center")}).describe("Defines silkscreen text on the PCB"),ixt=N.object({type:N.literal("pcb_copper_text"),pcb_copper_text_id:So("pcb_copper_text"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ao.default("0.2mm"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Di,top:Di,bottom:Di,right:Di}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:N.number().optional(),layer:WA,is_mirrored:N.boolean().default(!1).optional(),anchor_position:_r.default({x:0,y:0}),anchor_alignment:ob.default("center")}).describe("Defines copper text on the PCB"),rxt=N.object({type:N.literal("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:So("pcb_silkscreen_rect"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:WA,stroke_width:Di.default("1mm"),corner_radius:Di.optional(),is_filled:N.boolean().default(!0).optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),ccw_rotation:N.number().optional()}).describe("Defines a silkscreen rect on the PCB"),sxt=N.object({type:N.literal("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:So("pcb_silkscreen_circle"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius:Di,layer:W_,stroke_width:Di.default("1mm"),is_filled:N.boolean().optional()}).describe("Defines a silkscreen circle on the PCB"),axt=N.object({type:N.literal("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:So("pcb_silkscreen_oval"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius_x:ao,radius_y:ao,layer:W_,ccw_rotation:im.optional()}).describe("Defines a silkscreen oval on the PCB"),Axt=N.object({type:N.literal("pcb_silkscreen_graphic"),pcb_silkscreen_graphic_id:So("pcb_silkscreen_graphic"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,image_asset:y8e.optional()}).extend({shape:N.literal("brep"),brep_shape:$8e}).describe("Defines a BRep silkscreen graphic on the PCB"),cxt=N.discriminatedUnion("shape",[Axt]).describe("Defines a silkscreen graphic on the PCB"),lxt=N.object({type:N.literal("pcb_silkscreen_pill"),pcb_silkscreen_pill_id:So("pcb_silkscreen_pill"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:WA,ccw_rotation:N.number().optional()}).describe("Defines a silkscreen pill on the PCB"),uxt=N.object({type:N.literal("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:So("pcb_fabrication_note_text"),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ao.default("1mm"),pcb_component_id:N.string(),text:N.string(),ccw_rotation:N.number().optional(),layer:W_,anchor_position:_r.default({x:0,y:0}),anchor_alignment:N.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:N.string().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),gxt=N.object({type:N.literal("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:So("pcb_fabrication_note_path"),pcb_component_id:N.string(),subcircuit_id:N.string().optional(),layer:WA,route:N.array(_r),stroke_width:Di,color:N.string().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),dxt=N.object({type:N.literal("pcb_fabrication_note_rect"),pcb_fabrication_note_rect_id:So("pcb_fabrication_note_rect"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:W_,stroke_width:Di.default("0.1mm"),corner_radius:Di.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe("Defines a fabrication note rectangle on the PCB"),hxt=N.object({type:N.literal("pcb_fabrication_note_dimension"),pcb_fabrication_note_dimension_id:So("pcb_fabrication_note_dimension"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,from:_r,to:_r,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset:Di.optional(),offset_distance:Di.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:Di.default("1mm"),color:N.string().optional(),arrow_size:Di.default("1mm")}).describe("Defines a measurement annotation within PCB fabrication notes"),pxt=N.object({type:N.literal("pcb_note_text"),pcb_note_text_id:So("pcb_note_text"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ao.default("1mm"),text:N.string().optional(),anchor_position:_r.default({x:0,y:0}),anchor_alignment:N.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),layer:W_.default("top"),is_mirrored_from_top_view:N.boolean().optional(),color:N.string().optional()}).describe("Defines a documentation note in text on the PCB"),mxt=N.object({type:N.literal("pcb_note_rect"),pcb_note_rect_id:So("pcb_note_rect"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),center:_r,width:Di,height:Di,layer:W_.default("top"),stroke_width:Di.default("0.1mm"),corner_radius:Di.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe("Defines a rectangular documentation note on the PCB"),_xt=N.object({type:N.literal("pcb_note_path"),pcb_note_path_id:So("pcb_note_path"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),route:N.array(_r),layer:W_.default("top"),stroke_width:Di.default("0.1mm"),color:N.string().optional()}).describe("Defines a polyline documentation note on the PCB"),fxt=N.object({type:N.literal("pcb_note_line"),pcb_note_line_id:So("pcb_note_line"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),x1:ao,y1:ao,x2:ao,y2:ao,layer:W_.default("top"),stroke_width:ao.default("0.1mm"),color:N.string().optional(),is_dashed:N.boolean().optional()}).describe("Defines a straight documentation note line on the PCB"),Ixt=N.object({type:N.literal("pcb_note_dimension"),pcb_note_dimension_id:So("pcb_note_dimension"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),from:_r,to:_r,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset_distance:Di.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:Di.default("1mm"),layer:W_.default("top"),color:N.string().optional(),arrow_size:Di.default("1mm")}).describe("Defines a measurement annotation within PCB documentation notes"),Cxt=Wl.extend({type:N.literal("pcb_footprint_overlap_error"),pcb_error_id:So("pcb_error"),error_type:N.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),pcb_smtpad_ids:N.array(N.string()).optional(),pcb_plated_hole_ids:N.array(N.string()).optional(),pcb_hole_ids:N.array(N.string()).optional(),pcb_keepout_ids:N.array(N.string()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),yxt=Wl.extend({type:N.literal("pcb_courtyard_overlap_error"),pcb_error_id:So("pcb_error"),error_type:N.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),pcb_component_ids:N.tuple([N.string(),N.string()])}).describe("Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"),xxt=N.object({type:N.literal("pcb_keepout"),shape:N.literal("rect"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:ao,height:ao,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()}).or(N.object({type:N.literal("pcb_keepout"),shape:N.literal("circle"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius:ao,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()})),sAe=N.object({type:N.literal("pcb_cutout"),pcb_cutout_id:So("pcb_cutout"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_board_id:N.string().optional(),pcb_panel_id:N.string().optional()}),Ext=sAe.extend({shape:N.literal("rect"),center:_r,width:Di,height:Di,rotation:im.optional(),corner_radius:Di.optional()}),Bxt=sAe.extend({shape:N.literal("circle"),center:_r,radius:Di}),bxt=sAe.extend({shape:N.literal("polygon"),points:N.array(_r)}),Sxt=sAe.extend({shape:N.literal("path"),route:N.array(_r),slot_width:Di,slot_length:Di.optional(),space_between_slots:Di.optional(),slot_corner_radius:Di.optional()}),Qxt=N.discriminatedUnion("shape",[Ext,Bxt,bxt,Sxt]).describe("Defines a cutout on the PCB, removing board material."),vxt=Wl.extend({type:N.literal("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:So("pcb_missing_footprint_error"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:N.string()}).describe("Defines a missing footprint error on the PCB"),wxt=Wl.extend({type:N.literal("external_footprint_load_error"),external_footprint_load_error_id:So("external_footprint_load_error"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),error_type:N.literal("external_footprint_load_error").default("external_footprint_load_error")}).describe("Defines an error when an external footprint fails to load"),Pxt=Wl.extend({type:N.literal("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:So("circuit_json_footprint_load_error"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),circuit_json:N.array(N.any()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),Mxt=N.object({type:N.literal("pcb_group"),pcb_group_id:So("pcb_group"),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Di.optional(),height:Di.optional(),center:_r,display_offset_x:N.string().optional().describe("How to display the x offset for this group, usually corresponding with how the user specified it"),display_offset_y:N.string().optional().describe("How to display the y offset for this group, usually corresponding with how the user specified it"),outline:N.array(_r).optional(),anchor_position:_r.optional(),anchor_alignment:ob.default("center"),position_mode:N.enum(["packed","relative_to_group_anchor","none"]).optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),pcb_component_ids:N.array(N.string()),child_layout_mode:N.enum(["packed","none"]).optional(),name:N.string().optional(),description:N.string().optional(),layout_mode:N.string().optional(),autorouter_configuration:N.object({trace_clearance:Di}).optional(),autorouter_used_string:N.string().optional()}).describe("Defines a group of components on the PCB"),Dxt=Wl.extend({type:N.literal("pcb_autorouting_error"),pcb_error_id:So("pcb_autorouting_error"),error_type:N.literal("pcb_autorouting_error").default("pcb_autorouting_error"),subcircuit_id:N.string().optional()}).describe("The autorouting has failed to route a portion of the board"),Nxt=N.object({type:N.literal("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:So("pcb_manual_edit_conflict_warning"),warning_type:N.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:N.string(),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),Rxt=N.enum(["x-","x+","y+","y-"]),Txt=N.object({type:N.literal("pcb_connector_not_in_accessible_orientation_warning"),pcb_connector_not_in_accessible_orientation_warning_id:So("pcb_connector_not_in_accessible_orientation_warning"),warning_type:N.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),message:N.string(),pcb_component_id:N.string(),source_component_id:N.string().optional(),pcb_board_id:N.string().optional(),facing_direction:Rxt,recommended_facing_direction:Rxt,subcircuit_id:N.string().optional()}).describe("Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"),kxt=N.object({type:N.literal("supplier_footprint_mismatch_warning"),supplier_footprint_mismatch_warning_id:So("supplier_footprint_mismatch_warning"),warning_type:N.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),message:N.string(),source_component_id:N.string(),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),supplier_name:oAe.optional(),supplier_part_number:N.string().optional(),supplier_footprint_url:N.string().optional(),footprint_copper_intersection_over_union:N.number()}).describe("Warning emitted when a supplier part footprint does not match the expected footprint"),Fxt=N.object({type:N.literal("pcb_breakout_point"),pcb_breakout_point_id:So("pcb_breakout_point"),pcb_group_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional(),source_port_id:N.string().optional(),source_net_id:N.string().optional(),x:ao,y:ao}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),Lxt=N.object({type:N.literal("pcb_ground_plane"),pcb_ground_plane_id:So("pcb_ground_plane"),source_pcb_ground_plane_id:N.string(),source_net_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Defines a ground plane on the PCB"),Hxt=N.object({type:N.literal("pcb_ground_plane_region"),pcb_ground_plane_region_id:So("pcb_ground_plane_region"),pcb_ground_plane_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:WA,points:N.array(_r)}).describe("Defines a polygon region of a ground plane"),Oxt=N.object({type:N.literal("pcb_thermal_spoke"),pcb_thermal_spoke_id:So("pcb_thermal_spoke"),pcb_ground_plane_id:N.string(),shape:N.string(),spoke_count:N.number(),spoke_thickness:ao,spoke_inner_diameter:ao,spoke_outer_diameter:ao,pcb_plated_hole_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),q8e=N.object({type:N.literal("pcb_copper_pour"),pcb_copper_pour_id:So("pcb_copper_pour"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:WA,source_net_id:N.string().optional(),covered_with_solder_mask:N.boolean().optional().default(!0)}),Gxt=q8e.extend({shape:N.literal("rect"),center:_r,width:Di,height:Di,rotation:im.optional()}),Yxt=q8e.extend({shape:N.literal("brep"),brep_shape:$8e}),Uxt=q8e.extend({shape:N.literal("polygon"),points:N.array(_r)}),Kxt=N.discriminatedUnion("shape",[Gxt,Yxt,Uxt]).describe("Defines a copper pour on the PCB."),Vxt=Wl.extend({type:N.literal("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:So("pcb_component_outside_board_error"),error_type:N.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:_r,component_bounds:N.object({min_x:N.number(),max_x:N.number(),min_y:N.number(),max_y:N.number()}),subcircuit_id:N.string().optional(),source_component_id:N.string().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),zxt=Wl.extend({type:N.literal("pcb_component_not_on_board_edge_error"),pcb_component_not_on_board_edge_error_id:So("pcb_component_not_on_board_edge_error"),error_type:N.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:_r,pad_to_nearest_board_edge_distance:N.number(),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when a component that must be placed on the board edge is centered away from the edge"),Jxt=Wl.extend({type:N.literal("pcb_component_invalid_layer_error"),pcb_component_invalid_layer_error_id:So("pcb_component_invalid_layer_error"),error_type:N.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),pcb_component_id:N.string().optional(),source_component_id:N.string(),layer:WA,subcircuit_id:N.string().optional()}).describe("Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"),Wxt=Wl.extend({type:N.literal("pcb_via_clearance_error"),pcb_error_id:So("pcb_error"),error_type:N.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),pcb_via_ids:N.array(N.string()).min(2),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when vias are closer than the allowed clearance"),jxt=Wl.extend({type:N.literal("pcb_via_trace_clearance_error"),pcb_via_trace_clearance_error_id:So("pcb_via_trace_clearance_error"),error_type:N.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),pcb_via_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when a via and trace are closer than the allowed clearance"),$xt=Wl.extend({type:N.literal("pcb_pad_pad_clearance_error"),pcb_pad_pad_clearance_error_id:So("pcb_pad_pad_clearance_error"),error_type:N.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),pcb_pad_ids:N.array(N.string()).min(2),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when pads are closer than the allowed clearance"),qxt=Wl.extend({type:N.literal("pcb_pad_trace_clearance_error"),pcb_pad_trace_clearance_error_id:So("pcb_pad_trace_clearance_error"),error_type:N.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),pcb_pad_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ao.optional(),actual_clearance:ao.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when a pad and trace are closer than allowed clearance"),Xxt=N.object({type:N.literal("pcb_courtyard_rect"),pcb_courtyard_rect_id:So("pcb_courtyard_rect"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,layer:W_,ccw_rotation:im.optional(),color:N.string().optional()}).describe("Defines a courtyard rectangle on the PCB"),Zxt=N.object({type:N.literal("pcb_courtyard_outline"),pcb_courtyard_outline_id:So("pcb_courtyard_outline"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,outline:N.array(_r).min(2)}).describe("Defines a courtyard outline on the PCB"),e3t=N.object({type:N.literal("pcb_courtyard_polygon"),pcb_courtyard_polygon_id:So("pcb_courtyard_polygon"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:W_,points:N.array(_r).min(3),color:N.string().optional()}).describe("Defines a courtyard polygon on the PCB"),t3t=N.object({type:N.literal("pcb_courtyard_circle"),pcb_courtyard_circle_id:So("pcb_courtyard_circle"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,radius:Di,layer:W_,color:N.string().optional()}).describe("Defines a courtyard circle on the PCB"),n3t=N.object({type:N.literal("pcb_courtyard_pill"),pcb_courtyard_pill_id:So("pcb_courtyard_pill"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:_r,width:Di,height:Di,radius:Di,layer:W_,color:N.string().optional()}).describe("Defines a courtyard pill on the PCB"),Vio=["obj","stl","3mf","gltf","glb","step","wrl"],o3t=["x+","x-","y+","y-","z+","z-"],zio={obj:"z+",stl:"z+","3mf":"z+",gltf:"y+",glb:"y+",step:"z+",wrl:"y+"},i3t=N.object({type:N.literal("cad_component"),cad_component_id:N.string(),pcb_component_id:N.string(),source_component_id:N.string(),position:nb,rotation:nb.optional(),size:nb.optional(),layer:WA.optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),model_obj_url:N.string().optional(),model_stl_url:N.string().optional(),model_3mf_url:N.string().optional(),model_gltf_url:N.string().optional(),model_glb_url:N.string().optional(),model_step_url:N.string().optional(),model_wrl_url:N.string().optional(),model_asset:y8e.optional(),model_unit_to_mm_scale_factor:N.number().optional(),model_board_normal_direction:N.enum(o3t).optional().describe(`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`),model_origin_position:nb.optional(),model_origin_alignment:N.enum(["unknown","center","center_of_component_on_board_surface","bottom_center_of_component"]).optional(),model_object_fit:N.enum(["contain_within_bounds","fill_bounds"]).optional().default("contain_within_bounds"),model_jscad:N.any().optional(),show_as_translucent_model:N.boolean().optional(),show_as_bounding_box:N.boolean().optional(),anchor_alignment:N.enum(["center","center_of_component_on_board_surface"]).optional().default("center")}).describe("Defines a component on the PCB"),X8e=N.enum(["sinewave","square","triangle","sawtooth"]),Jio=N.union([N.string(),N.number()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),r3t=N.object({type:N.literal("simulation_voltage_source"),simulation_voltage_source_id:So("simulation_voltage_source"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),voltage:tb}).describe("Defines a DC voltage source for simulation"),s3t=N.object({type:N.literal("simulation_voltage_source"),simulation_voltage_source_id:So("simulation_voltage_source"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),voltage:tb.optional(),frequency:tN.optional(),peak_to_peak_voltage:tb.optional(),wave_shape:X8e.optional(),phase:im.optional(),duty_cycle:Jio.optional(),pulse_delay:J_.optional(),rise_time:J_.optional(),fall_time:J_.optional(),pulse_width:J_.optional(),period:J_.optional()}).describe("Defines an AC voltage source for simulation"),a3t=N.union([r3t,s3t]).describe("Defines a voltage source for simulation"),Wio=N.union([N.string(),N.number()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),A3t=N.object({type:N.literal("simulation_current_source"),simulation_current_source_id:So("simulation_current_source"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),current:vL}).describe("Defines a DC current source for simulation"),c3t=N.object({type:N.literal("simulation_current_source"),simulation_current_source_id:So("simulation_current_source"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),current:vL.optional(),frequency:tN.optional(),peak_to_peak_current:vL.optional(),wave_shape:X8e.optional(),phase:im.optional(),duty_cycle:Wio.optional()}).describe("Defines an AC current source for simulation"),l3t=N.union([A3t,c3t]).describe("Defines a current source for simulation"),u3t=N.union([N.literal("spice_dc_sweep"),N.literal("spice_dc_operating_point"),N.literal("spice_transient_analysis"),N.literal("spice_ac_analysis")]),g3t=N.object({method:N.enum(["trap","gear"]).optional(),reltol:N.union([N.number(),N.string()]).optional(),abstol:N.union([N.number(),N.string()]).optional(),vntol:N.union([N.number(),N.string()]).optional()}).describe("SPICE solver options for a simulation experiment"),d3t=N.object({type:N.literal("simulation_experiment"),simulation_experiment_id:So("simulation_experiment"),name:N.string(),experiment_type:u3t,time_per_step:wL.optional(),start_time_ms:J_.optional(),end_time_ms:J_.optional(),spice_options:g3t.optional()}).describe("Defines a simulation experiment configuration"),h3t=N.object({type:N.literal("simulation_transient_voltage_graph"),simulation_transient_voltage_graph_id:So("simulation_transient_voltage_graph"),simulation_experiment_id:N.string(),timestamps_ms:N.array(N.number()).optional(),voltage_levels:N.array(N.number()),source_component_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),time_per_step:wL,start_time_ms:J_,end_time_ms:J_,name:N.string().optional(),color:N.string().optional()}).describe("Stores voltage measurements over time for a simulation"),p3t=N.object({type:N.literal("simulation_transient_current_graph"),simulation_transient_current_graph_id:So("simulation_transient_current_graph"),simulation_experiment_id:N.string(),timestamps_ms:N.array(N.number()).optional(),current_levels:N.array(N.number()),source_component_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),time_per_step:wL,start_time_ms:J_,end_time_ms:J_,name:N.string().optional(),color:N.string().optional()}).describe("Stores current measurements over time for a simulation"),m3t=N.object({type:N.literal("simulation_switch"),simulation_switch_id:So("simulation_switch"),source_component_id:N.string().optional(),closes_at:J_.optional(),opens_at:J_.optional(),starts_closed:N.boolean().optional(),switching_frequency:tN.optional()}).describe("Defines a switch for simulation timing control"),_3t=N.object({type:N.literal("simulation_voltage_probe"),simulation_voltage_probe_id:So("simulation_voltage_probe"),source_component_id:N.string().optional(),name:N.string().optional(),signal_input_source_port_id:N.string().optional(),signal_input_source_net_id:N.string().optional(),reference_input_source_port_id:N.string().optional(),reference_input_source_net_id:N.string().optional(),subcircuit_id:N.string().optional(),color:N.string().optional()}).describe("Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.").superRefine((t,e)=>{if(t.reference_input_source_port_id||t.reference_input_source_net_id){const n=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,o=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;n&&o?e.addIssue({code:N.ZodIssueCode.custom,message:"Cannot mix port and net connections in a differential probe."}):n?t.signal_input_source_port_id&&t.reference_input_source_port_id||e.addIssue({code:N.ZodIssueCode.custom,message:"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."}):o&&(t.signal_input_source_net_id&&t.reference_input_source_net_id||e.addIssue({code:N.ZodIssueCode.custom,message:"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."}))}else!!t.signal_input_source_port_id==!!t.signal_input_source_net_id&&e.addIssue({code:N.ZodIssueCode.custom,message:"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."})}),f3t=N.object({type:N.literal("simulation_current_probe"),simulation_current_probe_id:So("simulation_current_probe"),source_component_id:N.string().optional(),name:N.string().optional(),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),subcircuit_id:N.string().optional(),color:N.string().optional()}).describe("Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint.").superRefine((t,e)=>{const n=!!t.positive_source_port_id,o=!!t.negative_source_port_id,i=!!t.positive_source_net_id,r=!!t.negative_source_net_id,s=n||o,a=i||r;s&&a?e.addIssue({code:N.ZodIssueCode.custom,message:"Cannot mix port and net connections in a current probe."}):s?n&&o||e.addIssue({code:N.ZodIssueCode.custom,message:"Current probe using source ports requires both positive_source_port_id and negative_source_port_id."}):a?i&&r||e.addIssue({code:N.ZodIssueCode.custom,message:"Current probe using source nets requires both positive_source_net_id and negative_source_net_id."}):e.addIssue({code:N.ZodIssueCode.custom,message:"A current probe must have either positive/negative source port ids or positive/negative source net ids."})}),I3t=Wl.extend({type:N.literal("simulation_unknown_experiment_error"),simulation_unknown_experiment_error_id:So("simulation_unknown_experiment_error"),error_type:N.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),simulation_experiment_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("An unknown error occurred during the simulation experiment."),C3t=N.object({type:N.literal("simulation_op_amp"),simulation_op_amp_id:So("simulation_op_amp"),source_component_id:N.string().optional(),inverting_input_source_port_id:N.string(),non_inverting_input_source_port_id:N.string(),output_source_port_id:N.string(),positive_supply_source_port_id:N.string(),negative_supply_source_port_id:N.string()}).describe("Defines a simple ideal operational amplifier for simulation"),y3t=N.object({type:N.literal("simulation_spice_subcircuit"),simulation_spice_subcircuit_id:So("simulation_spice_subcircuit"),source_component_id:N.string(),spice_pin_to_source_port_map:N.record(N.string(),N.string()),subcircuit_source:N.string()}).describe("Defines a custom SPICE subcircuit model for simulation"),x3t=t=>t!==void 0,E3t=N.object({type:N.literal("simulation_oscilloscope_trace"),simulation_oscilloscope_trace_id:So("simulation_oscilloscope_trace"),simulation_transient_voltage_graph_id:N.string().optional(),simulation_transient_current_graph_id:N.string().optional(),simulation_voltage_probe_id:N.string().optional(),simulation_current_probe_id:N.string().optional(),display_name:N.string().optional(),color:N.string().optional(),display_center_value:N.number().optional(),display_center_offset_divs:N.number().optional(),volts_per_div:N.number().positive().optional(),amps_per_div:N.number().positive().optional()}).describe("Defines how a simulation measurement is rendered as an oscilloscope-style trace.").superRefine((t,e)=>{const n=[t.simulation_transient_voltage_graph_id,t.simulation_voltage_probe_id].filter(x3t).length,o=[t.simulation_transient_current_graph_id,t.simulation_current_probe_id].filter(x3t).length;n+o!==1&&e.addIssue({code:N.ZodIssueCode.custom,message:"An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."}),n>0&&t.amps_per_div!==void 0&&e.addIssue({code:N.ZodIssueCode.custom,message:"Voltage oscilloscope traces must use volts_per_div, not amps_per_div."}),o>0&&t.volts_per_div!==void 0&&e.addIssue({code:N.ZodIssueCode.custom,message:"Current oscilloscope traces must use amps_per_div, not volts_per_div."})}),B3t=N.union([Myt,wyt,Pyt,vyt,Nyt,Dyt,S8e,E8e,iAe,b8e,B8e,Q8e,v8e,w8e,D8e,N8e,R8e,H8e,T8e,k8e,F8e,L8e,M8e,P8e,kyt,Fyt,Ryt,O8e,G8e,Y8e,U8e,Lyt,K8e,V8e,Hyt,Oyt,Gyt,Yyt,Uyt,Kyt,z8e,J8e,Tyt,E2t,P2t,vxt,wxt,Pxt,Nxt,Txt,kxt,M2t,xxt,D2t,W2t,k2t,G2t,Y2t,U2t,j2t,R2t,T2t,$2t,q2t,Mxt,ext,txt,nxt,oxt,lxt,ixt,rxt,sxt,axt,cxt,K2t,V2t,X2t,Z2t,z2t,J2t,Wxt,jxt,$xt,qxt,gxt,uxt,dxt,hxt,pxt,mxt,_xt,fxt,Ixt,Dxt,Cxt,yxt,Fxt,Qxt,Lxt,Hxt,Oxt,Kxt,Vxt,zxt,Jxt,Xxt,Zxt,e3t,t3t,n3t,Vyt,i2t,Zyt,e2t,t2t,n2t,qyt,Xyt,r2t,o2t,zyt,a2t,A2t,s2t,g2t,d2t,h2t,p2t,f2t,m2t,_2t,i3t,a3t,l3t,d3t,h3t,p3t,m3t,_3t,f3t,E3t,I3t,C3t,y3t]),aAe=B3t;function b3t(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}var yx=(t,e={})=>{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split("_").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=>{if(s==="toArray")return()=>(n.editCount=o.editCount,n);if(s==="editCount")return o.editCount;if(s==="subtree")return A=>yx((function(c,l){if(!l.subcircuit_id&&!l.source_group_id)return[...c];let u=l;if(l.subcircuit_id){const m=new Set([l.subcircuit_id]),_=new Map,f=new Map;for(const C of c)if(C.type==="source_group"){const y=C.source_group_id,x=C.subcircuit_id;x&&f.set(y,x);const E=C.parent_source_group_id;E&&(_.has(E)||_.set(E,[]),_.get(E).push(y))}let I;for(const[C,y]of f)if(y===l.subcircuit_id){I=C;break}if(I){const C=y=>{const x=_.get(y)||[];for(const E of x){const B=f.get(E);B&&m.add(B),C(E)}};C(I),u={...l,subcircuit_ids:Array.from(m)}}}const g=new Map;for(const m of c){const _=m[`${m.type}_id`];typeof _=="string"&&g.set(_,m)}const h=new Map;for(const m of c){const _=Object.entries(m);for(const[f,I]of _)if(f!=="parent_source_group_id"){if(f.endsWith("_id")&&typeof I=="string")b3t(h,m,g.get(I));else if(f.endsWith("_ids")&&Array.isArray(I))for(const C of I)typeof C=="string"&&b3t(h,m,g.get(C))}}const d=[],p=new Set;for(const m of c){let _=!1;(u.subcircuit_id&&"subcircuit_id"in m&&m.subcircuit_id===u.subcircuit_id||u.subcircuit_ids&&"subcircuit_id"in m&&m.subcircuit_id&&u.subcircuit_ids.includes(m.subcircuit_id)||u.source_group_id&&"source_group_id"in m&&m.source_group_id===u.source_group_id||u.source_group_id&&"member_source_group_ids"in m&&Array.isArray(m.member_source_group_ids)&&m.member_source_group_ids.includes(u.source_group_id))&&(_=!0),_&&(d.push(m),p.add(m))}for(;d.length>0;){const m=d.shift(),_=h.get(m);if(_)for(const f of _)p.has(f)||(p.add(f),d.push(f))}return c.filter(m=>p.has(m))})(n,A),e);if(s==="insert")return A=>{const c=A.type;if(!c)throw new Error("insert requires an element with a type");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts&&(Vae[c]??aAe).parse(u),n.push(u),o.editCount++,u};if(s==="insertAll")return A=>A.map(c=>i.insert(c));const a=s;return{get:A=>n.find(c=>c.type===a&&c[`${a}_id`]===A),getUsing:A=>{const c=Object.keys(A);if(c.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const l=c[0],u=l.replace("_id",""),g=n.find(h=>h.type===u&&h[l]===A[l]);return g?n.find(h=>h.type===a&&h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=>{const c=Object.keys(A);return n.find(l=>l.type===a&&c.every(u=>l[u]===A[u]))},list:A=>{const c=A?Object.keys(A):[];return n.filter(l=>l.type===a&&c.every(u=>l[u]===A[u]))},insert:A=>{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts&&(Vae[a]??aAe).parse(l),n.push(l),o.editCount++,l},delete:A=>{const c=n.find(l=>l[`${a}_id`]===A);c&&(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=>{const l=n.find(u=>u.type===a&&u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=>{if(a==="source_component")return n.find(c=>c.type==="source_component"&&c.name===A.replace(/\./g,""));if(a==="pcb_port"||a==="source_port"||a==="schematic_port"){const[c,l]=A.replace(/\./g,"").split(/[\s\>]+/),u=n.find(h=>h.type==="source_component"&&h.name===c);if(!u)return null;const g=n.find(h=>h.type==="source_port"&&h.source_component_id===u.source_component_id&&(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a==="source_port")return g;if(a==="pcb_port")return n.find(h=>h.type==="pcb_port"&&h.source_port_id===g.source_port_id);if(a==="schematic_port")return n.find(h=>h.type==="schematic_port"&&h.source_port_id===g.source_port_id)}}}}});return i};yx.unparsed=yx;var nI=yx;function Z8e(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var S3t=(t,e={})=>{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const r of t){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split("_").pop()||"");Number.isNaN(A)||(n.counts[s]=Math.max(n.counts[s]??0,A))}const o=e.indexConfig||{},i=n.indexes;if(o.byId&&(i.byId=new Map),o.byType&&(i.byType=new Map),o.byRelation&&(i.byRelation=new Map),o.bySubcircuit&&(i.bySubcircuit=new Map),o.byCustomField&&o.byCustomField.length>0){i.byCustomField=new Map;for(const r of o.byCustomField)i.byCustomField.set(r,new Map)}for(const r of t){if(o.byId){const s=Z8e(r);i.byId.set(s,r)}if(o.byType){const s=i.byType.get(r.type)||[];s.push(r),i.byType.set(r.type,s)}if(o.byRelation){const s=Object.entries(r);for(const[a,A]of s)if(a.endsWith("_id")&&a!==`${r.type}_id`&&typeof A=="string"){const c=i.byRelation.get(a)||new Map,l=c.get(A)||[];l.push(r),c.set(A,l),i.byRelation.set(a,c)}}if(o.bySubcircuit&&"subcircuit_id"in r){const s=r.subcircuit_id;if(s&&typeof s=="string"){const a=i.bySubcircuit.get(s)||[];a.push(r),i.bySubcircuit.set(s,a)}}if(o.byCustomField&&i.byCustomField){for(const s of o.byCustomField)if(s in r){const a=r[s];if(a!==void 0&&(typeof a=="string"||typeof a=="number")){const A=String(a),c=i.byCustomField.get(s),l=c.get(A)||[];l.push(r),c.set(A,l)}}}}t._internal_store_indexed=n}return new Proxy({},{get:(o,i)=>{if(i==="toArray")return()=>(t.editCount=n.editCount,t);if(i==="editCount")return n.editCount;const r=i;return{get:s=>{const a=e.indexConfig||{};return a.byId&&n.indexes.byId?n.indexes.byId.get(`${r}:${s}`)||null:a.byType&&n.indexes.byType?(n.indexes.byType.get(r)||[]).find(A=>A[`${r}_id`]===s)||null:t.find(A=>A.type===r&&A[`${r}_id`]===s)||null},getUsing:s=>{const a=e.indexConfig||{},A=Object.keys(s);if(A.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const c=A[0],l=c.replace("_id","");if(a.byRelation&&n.indexes.byRelation){const g=n.indexes.byRelation.get(c);if(g){const h=(g.get(s[c])||[]).find(p=>p.type===l);if(!h)return null;const d=h[`${r}_id`];return a.byId&&n.indexes.byId?n.indexes.byId.get(`${r}:${d}`)||null:a.byType&&n.indexes.byType?(n.indexes.byType.get(r)||[]).find(p=>p[`${r}_id`]===d)||null:t.find(p=>p.type===r&&p[`${r}_id`]===d)||null}}const u=t.find(g=>g.type===l&&g[c]===s[c]);return u&&t.find(g=>g.type===r&&g[`${r}_id`]===u[`${r}_id`])||null},getWhere:s=>{const a=e.indexConfig||{},A=Object.keys(s);if(A.length===1&&a.byCustomField&&n.indexes.byCustomField){const c=A[0],l=n.indexes.byCustomField.get(c);if(l){const u=String(s[c]);return(l.get(u)||[]).find(g=>g.type===r)||null}}if("subcircuit_id"in s&&a.bySubcircuit&&n.indexes.bySubcircuit){const c=s.subcircuit_id;return(n.indexes.bySubcircuit.get(c)||[]).find(l=>l.type===r&&A.every(u=>l[u]===s[u]))||null}return a.byType&&n.indexes.byType?(n.indexes.byType.get(r)||[]).find(c=>A.every(l=>c[l]===s[l]))||null:t.find(c=>c.type===r&&A.every(l=>c[l]===s[l]))||null},list:s=>{const a=e.indexConfig||{},A=s?Object.keys(s):[];if(A.length===0&&a.byType&&n.indexes.byType)return n.indexes.byType.get(r)||[];if(A.length===1&&A[0]==="subcircuit_id"&&a.bySubcircuit&&n.indexes.bySubcircuit){const l=s.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).filter(u=>u.type===r)}let c;return c=a.byType&&n.indexes.byType?n.indexes.byType.get(r)||[]:t.filter(l=>l.type===r),A.length>0?c.filter(l=>A.every(u=>l[u]===s[u])):c},insert:s=>{n.counts[r]??=-1,n.counts[r]++;const a=n.counts[r],A={type:r,[`${r}_id`]:`${r}_${a}`,...s};e.validateInserts&&(Vae[r]??aAe).parse(A),t.push(A),n.editCount++;const c=e.indexConfig||{};if(c.byId&&n.indexes.byId){const l=Z8e(A);n.indexes.byId.set(l,A)}if(c.byType&&n.indexes.byType){const l=n.indexes.byType.get(r)||[];l.push(A),n.indexes.byType.set(r,l)}if(c.byRelation&&n.indexes.byRelation){const l=Object.entries(A);for(const[u,g]of l)if(u.endsWith("_id")&&u!==`${A.type}_id`&&typeof g=="string"){const h=n.indexes.byRelation.get(u)||new Map,d=h.get(g)||[];d.push(A),h.set(g,d),n.indexes.byRelation.set(u,h)}}if(c.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in A){const l=A.subcircuit_id;if(l&&typeof l=="string"){const u=n.indexes.bySubcircuit.get(l)||[];u.push(A),n.indexes.bySubcircuit.set(l,u)}}if(c.byCustomField&&n.indexes.byCustomField){for(const l of c.byCustomField)if(l in A){const u=A[l];if(u!==void 0&&(typeof u=="string"||typeof u=="number")){const g=String(u),h=n.indexes.byCustomField.get(l),d=h.get(g)||[];d.push(A),h.set(g,d)}}}return A},delete:s=>{const a=e.indexConfig||{};let A;if(a.byId&&n.indexes.byId?A=n.indexes.byId.get(`${r}:${s}`):a.byType&&n.indexes.byType?A=(n.indexes.byType.get(r)||[]).find(u=>u[`${r}_id`]===s):A=t.find(l=>l[`${r}_id`]===s),!A)return;const c=t.indexOf(A);if(c>=0&&(t.splice(c,1),n.editCount++),a.byId&&n.indexes.byId){const l=Z8e(A);n.indexes.byId.delete(l)}if(a.byType&&n.indexes.byType){const l=(n.indexes.byType.get(r)||[]).filter(u=>u[`${r}_id`]!==s);n.indexes.byType.set(r,l)}if(a.byRelation&&n.indexes.byRelation)for(const[l,u]of n.indexes.byRelation.entries())for(const[g,h]of u.entries()){const d=h.filter(p=>p!==A);d.length===0?u.delete(g):u.set(g,d)}if(a.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in A){const l=A.subcircuit_id;if(l){const u=(n.indexes.bySubcircuit.get(l)||[]).filter(g=>g!==A);u.length===0?n.indexes.bySubcircuit.delete(l):n.indexes.bySubcircuit.set(l,u)}}if(a.byCustomField&&n.indexes.byCustomField)for(const l of n.indexes.byCustomField.values())for(const[u,g]of l.entries()){const h=g.filter(d=>d!==A);h.length===0?l.delete(u):l.set(u,h)}},update:(s,a)=>{const A=e.indexConfig||{};let c;if(A.byId&&n.indexes.byId?c=n.indexes.byId.get(`${r}:${s}`):A.byType&&n.indexes.byType?c=(n.indexes.byType.get(r)||[]).find(u=>u[`${r}_id`]===s):c=t.find(l=>l.type===r&&l[`${r}_id`]===s),!c)return null;if(A.byRelation&&n.indexes.byRelation){const l=Object.entries(c);for(const[u,g]of l)if(u.endsWith("_id")&&u!==`${c.type}_id`&&typeof g=="string"&&u in a&&a[u]!==g){const h=n.indexes.byRelation.get(u);if(h){const d=(h.get(g)||[]).filter(p=>p!==c);d.length===0?h.delete(g):h.set(g,d)}}}if(A.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c&&"subcircuit_id"in a){const l=c.subcircuit_id;if(l!==a.subcircuit_id){const u=(n.indexes.bySubcircuit.get(l)||[]).filter(g=>g!==c);u.length===0?n.indexes.bySubcircuit.delete(l):n.indexes.bySubcircuit.set(l,u)}}if(A.byCustomField&&n.indexes.byCustomField){for(const l of A.byCustomField)if(l in c&&l in a&&c[l]!==a[l]){const u=n.indexes.byCustomField.get(l);if(u){const g=String(c[l]),h=(u.get(g)||[]).filter(d=>d!==c);h.length===0?u.delete(g):u.set(g,h)}}}if(Object.assign(c,a),n.editCount++,A.byRelation&&n.indexes.byRelation){const l=Object.entries(c);for(const[u,g]of l)if(u.endsWith("_id")&&u!==`${c.type}_id`&&typeof g=="string"&&u in a){const h=n.indexes.byRelation.get(u)||new Map,d=h.get(g)||[];d.includes(c)||(d.push(c),h.set(g,d),n.indexes.byRelation.set(u,h))}}if(A.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c&&"subcircuit_id"in a){const l=c.subcircuit_id;if(l&&typeof l=="string"){const u=n.indexes.bySubcircuit.get(l)||[];u.includes(c)||(u.push(c),n.indexes.bySubcircuit.set(l,u))}}if(A.byCustomField&&n.indexes.byCustomField){for(const l of A.byCustomField)if(l in c&&l in a){const u=c[l];if(u!==void 0&&(typeof u=="string"||typeof u=="number")){const g=String(u),h=n.indexes.byCustomField.get(l),d=h.get(g)||[];d.includes(c)||(d.push(c),h.set(g,d))}}}return c},select:s=>{if(r==="source_component")return t.find(a=>a.type==="source_component"&&a.name===s.replace(/\./g,""))||null;if(r==="pcb_port"||r==="source_port"||r==="schematic_port"){const[a,A]=s.replace(/\./g,"").split(/[\s\>]+/),c=t.find(u=>u.type==="source_component"&&u.name===a);if(!c)return null;const l=t.find(u=>u.type==="source_port"&&u.source_component_id===c.source_component_id&&(u.name===A||(u.port_hints??[]).includes(A)));if(!l)return null;if(r==="source_port")return l;if(r==="pcb_port")return t.find(u=>u.type==="pcb_port"&&u.source_port_id===l.source_port_id)||null;if(r==="schematic_port")return t.find(u=>u.type==="schematic_port"&&u.source_port_id===l.source_port_id)||null}return null}}}})};S3t.unparsed=S3t;var Q3t=t=>t[`${t.type}_id`];function ebe(t,e){const n=yx(t).pcb_trace.get(e);if(!n)return`trace[${e}]`;const o=n.route.flatMap(i=>[i.start_pcb_port_id,i.end_pcb_port_id]).filter(Boolean);return o.length===0?`trace[${e}]`:`trace[${o.map(i=>{const r=(function(s){const a=yx(t).pcb_port.get(s);if(!a)return null;const A=a.pcb_component_id?yx(t).pcb_component.get(a.pcb_component_id):void 0;if(!A)return null;const c=yx(t).source_component.get(A.source_component_id);if(!c)return null;const l=yx(t).source_port.get(a.source_port_id),u=l?.port_hints?l.port_hints[1]:"";return{componentName:c.name,portHint:u}})(i);return r?`.${r.componentName} > port.${r.portHint}`:`port[${i}]`}).join(", ")}]`}var tbe=(t,e)=>{const n=yx(t).pcb_port.get(e);if(!n)return`pcb_port[#${e}]`;const o=n.pcb_component_id?yx(t).pcb_component.get(n.pcb_component_id):void 0;if(!o)return`pcb_port[#${e}]`;const i=yx(t).source_component.get(o.source_component_id);if(!i)return`pcb_port[#${e}]`;const r=yx(t).source_port.get(n.source_port_id);if(!r)return`pcb_port[#${e}]`;let s;return s=r?.port_hints&&r.port_hints.length>0||r.port_hints&&r.port_hints.length>0?r.port_hints[0]:e,`pcb_port[.${i.name} > .${s}]`},Ny=(t,e)=>{if(typeof e=="string"){const n=((o,i)=>o.find(r=>Q3t(r)===i)??null)(t,e);return Ny(t,n)}switch(e.type){case"pcb_port":return tbe(t,e.pcb_port_id);case"pcb_smtpad":return(function(n,o){const i=yx(n).pcb_smtpad.get(o);return i&&i.pcb_port_id?tbe(n,i.pcb_port_id):`smtpad[${o}]`})(t,e.pcb_smtpad_id);case"pcb_trace":return ebe(t,e.pcb_trace_id);case"source_component":return`source_component[${e.name}]`;default:return`${e.type}[#${Q3t(e)}]`}},v3t=(t,e)=>({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),AAe=(t,e,n)=>{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},jio=(t,e,n,o,i)=>{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=>({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=>u.x)),minY:Math.min(...l.map(u=>u.y)),maxX:Math.max(...l.map(u=>u.x)),maxY:Math.max(...l.map(u=>u.y))}},nbe=t=>{let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){if(!r.type.startsWith("pcb_"))continue;if(r.type==="pcb_smtpad"&&r.shape==="polygon"&&Array.isArray(r.points)){for(const l of r.points)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y);continue}if(r.type==="pcb_hole"&&r.hole_shape==="circle"){const l=AAe(r.x,r.y,r.hole_diameter);e=Math.min(e,l.minX),n=Math.min(n,l.minY),o=Math.max(o,l.maxX),i=Math.max(i,l.maxY);continue}if(r.type==="pcb_plated_hole"){let l;if("outer_diameter"in r&&typeof r.outer_diameter=="number"?l=AAe(r.x,r.y,r.outer_diameter):"hole_diameter"in r&&typeof r.hole_diameter=="number"&&(l=AAe(r.x,r.y,r.hole_diameter)),"rect_pad_width"in r&&typeof r.rect_pad_width=="number"&&"rect_pad_height"in r&&typeof r.rect_pad_height=="number"){const u=jio(r.x,r.y,r.rect_pad_width,r.rect_pad_height,"rect_ccw_rotation"in r?r.rect_ccw_rotation??0:0);l=l?v3t(l,u):u}if("hole_diameter"in r&&typeof r.hole_diameter=="number"){const u=AAe(r.x+("hole_offset_x"in r?r.hole_offset_x??0:0),r.y+("hole_offset_y"in r?r.hole_offset_y??0:0),r.hole_diameter);l=l?v3t(l,u):u}if(l){e=Math.min(e,l.minX),n=Math.min(n,l.minY),o=Math.max(o,l.maxX),i=Math.max(i,l.maxY);continue}}let s,a,A,c;if("x"in r&&"y"in r&&(s=Number(r.x),a=Number(r.y)),"outer_diameter"in r&&(A=Number(r.outer_diameter),c=Number(r.outer_diameter)),"width"in r&&(A=Number(r.width)),"height"in r&&(c=Number(r.height)),"center"in r&&(s=r.center.x,a=r.center.y),s!==void 0&&a!==void 0)e=Math.min(e,s),n=Math.min(n,a),o=Math.max(o,s),i=Math.max(i,a),A!==void 0&&c!==void 0&&(e=Math.min(e,s-A/2),n=Math.min(n,a-c/2),o=Math.max(o,s+A/2),i=Math.max(i,a+c/2)),"radius"in r&&(e=Math.min(e,s-r.radius),n=Math.min(n,a-r.radius),o=Math.max(o,s+r.radius),i=Math.max(i,a+r.radius));else if(r.type==="pcb_trace")for(const l of r.route)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y);else if(r.type==="pcb_courtyard_outline")for(const l of r.outline)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y);else if(r.type==="pcb_courtyard_polygon")for(const l of r.points)e=Math.min(e,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),i=Math.max(i,l.y)}return{minX:e,minY:n,maxX:o,maxY:i}},gv=t=>t[`${t.type}_id`],w3t={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,ms:1,s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},obe=new Set;for(const[t,e]of Object.entries(w3t)){obe.add(t);for(const n of Object.keys(e.variants))obe.add(n)}var P3t={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12};function sB(t){if(t==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof t=="string"&&t.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(t),parsedUnit:null,unitOfValue:null};if(typeof t=="number")return{value:t,parsedUnit:null,unitOfValue:null};if(typeof t=="object"&&"x"in t&&"y"in t){const{parsedUnit:a,unitOfValue:A}=sB(t.x),c=sB(t.x),l=sB(t.y);return c.value===null||l.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:a,unitOfValue:A,value:{x:c.value,y:l.value}}}const e=t.toString().split("").reverse().join(""),n=e.match(/[^\d\s]+/)?.[0];if(!n)throw new Error(`Could not determine unit: "${t}"`);const o=n.split("").reverse().join(""),i=t.slice(0,-o.length);if(o in P3t&&!obe.has(o)){const a=P3t[o];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(i)*a}}const{baseUnit:r,conversionFactor:s}=(function(a){for(const[A,c]of Object.entries(w3t))if(a in c.variants)return{baseUnit:c.baseUnit,conversionFactor:c.variants[a]};return{baseUnit:a,conversionFactor:1}})(o);return{parsedUnit:o,unitOfValue:r,value:s*Number.parseFloat(i)}}var ibe=N.string().or(N.number()).transform(t=>sB(t).value),M3t=N.string().or(N.number()).transform(t=>sB(t).value).transform(t=>Number.parseFloat(t.toPrecision(12))),$io=N.string().or(N.number()).transform(t=>sB(t).value),dv=N.string().or(N.number()).transform(t=>sB(t).value),Ui=N.string().or(N.number()).transform(t=>sB(t).value),PL=N.string().or(N.number()).transform(t=>sB(t).value),ho=Ui,HJ=N.string().or(N.number()).transform(t=>sB(t).value),rbe=N.string().or(N.number()).transform(t=>sB(t).value),ML=rbe,qio=N.string().datetime(),jm=N.string().or(N.number()).transform(t=>typeof t=="number"?t:t.endsWith("deg")?Number.parseFloat(t.split("deg")[0]):t.endsWith("rad")?180*Number.parseFloat(t.split("rad")[0])/Math.PI:Number.parseFloat(t)),Xio=N.number().or(N.string().endsWith("mAh")).transform(t=>{if(typeof t=="string"){const e=t.replace("mAh",""),n=Number.parseFloat(e);if(Number.isNaN(n))throw new Error("Invalid capacity");return n}return t}).describe("Battery capacity in mAh"),Lr=N.object({x:ho,y:ho}),nN=N.object({x:ho,y:ho,z:ho}),D3t=N.object({width:N.number(),height:N.number()}),Yo=t=>N.string().optional().default(()=>`${t}_${(e=>{const n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:e},()=>n[Math.floor(62*Math.random())]).join("")})(10)}`),hv=N.enum(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),Zio=(N.enum(["top_silkscreen","bottom_silkscreen","top_copper","bottom_copper","top_soldermask","bottom_soldermask","top_fabrication_note","bottom_fabrication_note","top_user_note","bottom_user_note","top_courtyard","bottom_courtyard","inner1_copper","inner2_copper","inner3_copper","inner4_copper","inner5_copper","inner6_copper","edge_cuts","drill"]),N.object({project_relative_path:N.string(),url:N.string(),mimetype:N.string()})),sbe=Lr.extend({rotation:jm.optional()}),N3t=N.object({size:Lr.optional(),thickness:ho.optional()}),ero=N.object({font:N3t.optional()}),cAe=N.object({value:N.string(),at:sbe.optional(),layer:N.string().optional(),uuid:N.string().optional(),hide:N.boolean().optional(),effects:ero.optional()}),tro=N.object({Reference:cAe.optional(),Value:cAe.optional(),Datasheet:cAe.optional(),Description:cAe.optional()}),nro=N.object({through_hole:N.boolean().optional(),smd:N.boolean().optional(),exclude_from_pos_files:N.boolean().optional(),exclude_from_bom:N.boolean().optional()}),oro=N.object({name:N.string(),type:N.string(),shape:N.string().optional(),at:sbe.optional(),size:Lr.optional(),drill:ho.optional(),layers:N.array(N.string()).optional(),removeUnusedLayers:N.boolean().optional(),uuid:N.string().optional()}),iro=N.object({path:N.string(),offset:nN.optional(),scale:nN.optional(),rotate:nN.optional()}),rro=N.object({footprintName:N.string().optional(),version:N.union([N.number(),N.string()]).optional(),generator:N.string().optional(),generatorVersion:N.union([N.number(),N.string()]).optional(),layer:N.string().optional(),properties:tro.optional(),attributes:nro.optional(),pads:N.array(oro).optional(),embeddedFonts:N.boolean().optional(),model:iro.optional()}),sro=N.object({hide:N.boolean().optional()}),aro=N.object({offset:ho.optional(),hide:N.boolean().optional()}),Aro=N.object({font:N3t.optional(),justify:N.union([N.string(),N.array(N.string())]).optional(),hide:N.boolean().optional()}),oN=N.object({value:N.string(),id:N.union([N.number(),N.string()]).optional(),at:sbe.optional(),effects:Aro.optional()}),cro=N.object({Reference:oN.optional(),Value:oN.optional(),Footprint:oN.optional(),Datasheet:oN.optional(),Description:oN.optional(),ki_keywords:oN.optional(),ki_fp_filters:oN.optional()}),lro=N.object({symbolName:N.string().optional(),extends:N.string().optional(),pinNumbers:sro.optional(),pinNames:aro.optional(),excludeFromSim:N.boolean().optional(),inBom:N.boolean().optional(),onBoard:N.boolean().optional(),properties:cro.optional(),embeddedFonts:N.boolean().optional()}),N0=N.object({error_type:N.string(),message:N.string(),is_fatal:N.boolean().optional()}),R3t=N.enum(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Mg=N.object({type:N.literal("source_component"),ftype:N.string().optional(),source_component_id:N.string(),name:N.string(),manufacturer_part_number:N.string().optional(),supplier_part_numbers:N.record(R3t,N.array(N.string())).optional(),display_value:N.string().optional(),display_name:N.string().optional(),are_pins_interchangeable:N.boolean().optional(),internally_connected_source_port_ids:N.array(N.array(N.string())).optional(),source_group_id:N.string().optional(),subcircuit_id:N.string().optional()}),T3t=Mg.extend({ftype:N.literal("simple_capacitor"),capacitance:M3t,max_voltage_rating:dv.optional(),display_capacitance:N.string().optional(),max_decoupling_trace_length:ho.optional()}),k3t=Mg.extend({ftype:N.literal("simple_resistor"),resistance:ibe,display_resistance:N.string().optional()}),abe=Mg.extend({ftype:N.literal("simple_diode")}),uro=Mg.extend({ftype:N.literal("simple_fiducial")}),F3t=abe.extend({ftype:N.literal("simple_led"),color:N.string().optional(),wavelength:N.string().optional()}),gro=Mg.extend({ftype:N.literal("simple_ground")}),L3t=Mg.extend({ftype:N.literal("simple_chip")}),H3t=Mg.extend({ftype:N.literal("simple_power_source"),voltage:dv}),dro=Mg.extend({ftype:N.literal("simple_current_source"),current:HJ,frequency:PL.optional(),peak_to_peak_current:HJ.optional(),wave_shape:N.enum(["sine","square","triangle","sawtooth","dc"]).optional().default("dc"),phase:N.number().optional(),duty_cycle:N.number().min(0).max(1).optional()}),hro=N.object({must_be_connected:N.boolean().optional(),provides_power:N.boolean().optional(),requires_power:N.boolean().optional(),provides_ground:N.boolean().optional(),requires_ground:N.boolean().optional(),provides_voltage:N.union([N.string(),N.number()]).optional(),requires_voltage:N.union([N.string(),N.number()]).optional(),do_not_connect:N.boolean().optional(),include_in_board_pinout:N.boolean().optional(),can_use_internal_pullup:N.boolean().optional(),is_using_internal_pullup:N.boolean().optional(),needs_external_pullup:N.boolean().optional(),can_use_internal_pulldown:N.boolean().optional(),is_using_internal_pulldown:N.boolean().optional(),needs_external_pulldown:N.boolean().optional(),can_use_open_drain:N.boolean().optional(),is_using_open_drain:N.boolean().optional(),can_use_push_pull:N.boolean().optional(),is_using_push_pull:N.boolean().optional(),should_have_decoupling_capacitor:N.boolean().optional(),recommended_decoupling_capacitor_capacitance:N.union([N.string(),N.number()]).optional(),is_configured_for_i2c_sda:N.boolean().optional(),is_configured_for_i2c_scl:N.boolean().optional(),is_configured_for_spi_mosi:N.boolean().optional(),is_configured_for_spi_miso:N.boolean().optional(),is_configured_for_spi_sck:N.boolean().optional(),is_configured_for_spi_cs:N.boolean().optional(),is_configured_for_uart_tx:N.boolean().optional(),is_configured_for_uart_rx:N.boolean().optional(),supports_i2c_sda:N.boolean().optional(),supports_i2c_scl:N.boolean().optional(),supports_spi_mosi:N.boolean().optional(),supports_spi_miso:N.boolean().optional(),supports_spi_sck:N.boolean().optional(),supports_spi_cs:N.boolean().optional(),supports_uart_tx:N.boolean().optional(),supports_uart_rx:N.boolean().optional()}),pro=Mg.extend({ftype:N.literal("simple_fuse"),current_rating_amps:N.number().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:N.number().describe("Voltage rating in volts, e.g. ±5V would be 5")}),O3t=Mg.extend({ftype:N.literal("simple_battery"),capacity:Xio}),G3t=Mg.extend({ftype:N.literal("simple_inductor"),inductance:$io,display_inductance:N.string().optional(),max_current_rating:N.number().optional()}),Y3t=Mg.extend({ftype:N.literal("simple_push_button")}),U3t=Mg.extend({ftype:N.literal("simple_potentiometer"),max_resistance:ibe,display_max_resistance:N.string().optional()}),mro=Mg.extend({ftype:N.literal("simple_crystal"),frequency:N.number().describe("Frequency in Hz"),load_capacitance:N.number().optional().describe("Load capacitance in pF"),pin_variant:N.enum(["two_pin","four_pin"]).optional()}),K3t=Mg.extend({ftype:N.literal("simple_pin_header"),pin_count:N.number(),gender:N.enum(["male","female"]).optional().default("male")}),_ro=Mg.extend({ftype:N.literal("simple_connector"),standard:N.enum(["usb_c","m2"]).optional()}),V3t=Mg.extend({ftype:N.literal("simple_pinout")}),z3t=Mg.extend({ftype:N.literal("simple_resonator"),load_capacitance:M3t,equivalent_series_resistance:ibe.optional(),frequency:PL}),J3t=Mg.extend({ftype:N.literal("simple_transistor"),transistor_type:N.enum(["npn","pnp"])}),W3t=Mg.extend({ftype:N.literal("simple_test_point"),footprint_variant:N.enum(["pad","through_hole"]).optional(),pad_shape:N.enum(["rect","circle"]).optional(),pad_diameter:N.union([N.number(),N.string()]).optional(),hole_diameter:N.union([N.number(),N.string()]).optional(),width:N.union([N.number(),N.string()]).optional(),height:N.union([N.number(),N.string()]).optional()}),j3t=Mg.extend({ftype:N.literal("simple_mosfet"),channel_type:N.enum(["n","p"]),mosfet_mode:N.enum(["enhancement","depletion"])}),$3t=Mg.extend({ftype:N.literal("simple_op_amp")}),q3t=Mg.extend({ftype:N.literal("simple_switch")}),X3t=N.object({type:N.literal("source_project_metadata"),name:N.string().optional(),software_used_string:N.string().optional(),project_url:N.string().optional(),created_at:qio.optional()}),fro=N0.extend({type:N.literal("source_missing_property_error"),source_missing_property_error_id:Yo("source_missing_property_error"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal("source_missing_property_error").default("source_missing_property_error")}).describe("The source code is missing a property"),Iro=N0.extend({type:N.literal("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:Yo("source_failed_to_create_component_error"),error_type:N.literal("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:N.string().optional(),subcircuit_id:N.string().optional(),parent_source_component_id:N.string().optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),schematic_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),Z3t=N0.extend({type:N.literal("source_invalid_component_property_error"),source_invalid_component_property_error_id:Yo("source_invalid_component_property_error"),source_component_id:N.string(),property_name:N.string(),property_value:N.unknown().optional(),expected_format:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal("source_invalid_component_property_error").default("source_invalid_component_property_error")}).describe("The source component property is invalid"),eEt=N0.extend({type:N.literal("source_trace_not_connected_error"),source_trace_not_connected_error_id:Yo("source_trace_not_connected_error"),error_type:N.literal("source_trace_not_connected_error").default("source_trace_not_connected_error"),subcircuit_id:N.string().optional(),source_group_id:N.string().optional(),source_trace_id:N.string().optional(),connected_source_port_ids:N.array(N.string()).optional(),selectors_not_found:N.array(N.string()).optional()}).describe("Occurs when a source trace selector does not match any ports"),Cro=N.object({type:N.literal("source_property_ignored_warning"),source_property_ignored_warning_id:Yo("source_property_ignored_warning"),source_component_id:N.string(),property_name:N.string(),subcircuit_id:N.string().optional(),error_type:N.literal("source_property_ignored_warning").default("source_property_ignored_warning"),message:N.string()}).describe("The source property was ignored"),tEt=N.object({type:N.literal("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:Yo("source_pin_missing_trace_warning"),warning_type:N.literal("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:N.string(),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),nEt=N.object({type:N.literal("source_missing_manufacturer_part_number_warning"),source_missing_manufacturer_part_number_warning_id:Yo("source_missing_manufacturer_part_number_warning"),warning_type:N.literal("source_missing_manufacturer_part_number_warning").default("source_missing_manufacturer_part_number_warning"),message:N.string(),source_component_id:N.string(),standard:N.string(),subcircuit_id:N.string().optional()}).describe("Warning emitted when a standard connector is missing manufacturer part number"),yro=Mg.extend({ftype:N.literal("simple_voltage_probe")}),xro=Mg.extend({ftype:N.literal("interconnect")}),oEt=N0.extend({type:N.literal("source_i2c_misconfigured_error"),source_i2c_misconfigured_error_id:Yo("source_i2c_misconfigured_error"),error_type:N.literal("source_i2c_misconfigured_error").default("source_i2c_misconfigured_error"),source_port_ids:N.array(N.string())}).describe("Error emitted when incompatible I2C pins (e.g. SDA and SCL) are connected to the same net"),Ero=Mg.extend({ftype:N.literal("simple_voltage_source"),voltage:dv,frequency:PL.optional(),peak_to_peak_voltage:dv.optional(),wave_shape:N.enum(["sinewave","square","triangle","sawtooth"]).optional(),phase:jm.optional(),duty_cycle:N.number().optional().describe("Duty cycle as a fraction (0 to 1)")}),Bro=N.union([k3t,T3t,abe,uro,F3t,gro,L3t,H3t,dro,O3t,G3t,Y3t,U3t,mro,K3t,_ro,V3t,z3t,q3t,J3t,W3t,j3t,$3t,pro,yro,xro,Ero,X3t,fro,Z3t,Iro,eEt,Cro,tEt,nEt,oEt]),bro=N.object({type:N.literal("source_port"),pin_number:N.number().optional(),port_hints:N.array(N.string()).optional(),name:N.string(),source_port_id:N.string(),source_component_id:N.string().optional(),source_group_id:N.string().optional(),most_frequently_referenced_by_name:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}).merge(hro),Sro=N.object({type:N.literal("source_component_internal_connection"),source_component_internal_connection_id:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}),Qro=N.object({type:N.literal("source_trace"),source_trace_id:N.string(),connected_source_port_ids:N.array(N.string()),connected_source_net_ids:N.array(N.string()),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),max_length:N.number().optional(),min_trace_thickness:N.number().optional(),display_name:N.string().optional()}),vro=N.object({type:N.literal("source_group"),source_group_id:N.string(),subcircuit_id:N.string().optional(),parent_subcircuit_id:N.string().optional(),parent_source_group_id:N.string().optional(),is_subcircuit:N.boolean().optional(),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),was_automatically_named:N.boolean().optional()}),wro=N.object({type:N.literal("source_net"),source_net_id:N.string(),name:N.string(),member_source_group_ids:N.array(N.string()),is_power:N.boolean().optional(),is_ground:N.boolean().optional(),is_digital_signal:N.boolean().optional(),is_analog_signal:N.boolean().optional(),is_positive_voltage_source:N.boolean().optional(),trace_width:N.number().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),Pro=N.object({type:N.literal("source_board"),source_board_id:N.string(),source_group_id:N.string(),title:N.string().optional()}).describe("Defines a board in the source domain"),Mro=N0.extend({type:N.literal("source_ambiguous_port_reference"),source_ambiguous_port_reference_id:Yo("source_ambiguous_port_reference"),error_type:N.literal("source_ambiguous_port_reference").default("source_ambiguous_port_reference"),source_port_id:N.string().optional(),source_component_id:N.string().optional()}).describe("Error emitted when a port hint matches multiple non-overlapping pads, making the port reference ambiguous"),Dro=N.object({type:N.literal("source_pcb_ground_plane"),source_pcb_ground_plane_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional()}).describe("Defines a ground plane in the source domain"),lAe=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],iEt=N.enum(lAe),Pc=iEt.or(N.object({name:iEt})).transform(t=>typeof t=="string"?t:t.name),mC=N.enum(["top","bottom"]),Nro=N.object({type:N.literal("source_manually_placed_via"),source_manually_placed_via_id:N.string(),source_group_id:N.string(),source_net_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional()}).describe("Defines a via that is manually placed in the source domain"),Rro=N.object({type:N.literal("source_no_power_pin_defined_warning"),source_no_power_pin_defined_warning_id:Yo("source_no_power_pin_defined_warning"),warning_type:N.literal("source_no_power_pin_defined_warning").default("source_no_power_pin_defined_warning"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Warning emitted when a chip has no source ports with requires_power=true"),Tro=N.object({type:N.literal("source_no_ground_pin_defined_warning"),source_no_ground_pin_defined_warning_id:Yo("source_no_ground_pin_defined_warning"),warning_type:N.literal("source_no_ground_pin_defined_warning").default("source_no_ground_pin_defined_warning"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Warning emitted when a chip has no source ports marked as ground pins"),kro=N.object({type:N.literal("source_component_pins_underspecified_warning"),source_component_pins_underspecified_warning_id:Yo("source_component_pins_underspecified_warning"),warning_type:N.literal("source_component_pins_underspecified_warning").default("source_component_pins_underspecified_warning"),message:N.string(),source_component_id:N.string(),source_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Warning emitted when all ports on a source component are underspecified"),Fro=N0.extend({type:N.literal("source_pin_must_be_connected_error"),source_pin_must_be_connected_error_id:Yo("source_pin_must_be_connected_error"),error_type:N.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),source_component_id:N.string(),source_port_id:N.string(),subcircuit_id:N.string().optional()}).describe("Error emitted when a pin with mustBeConnected attribute is not connected to any trace"),Lro=N0.extend({type:N.literal("unknown_error_finding_part"),unknown_error_finding_part_id:Yo("unknown_error_finding_part"),error_type:N.literal("unknown_error_finding_part").default("unknown_error_finding_part"),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when an unexpected error occurs while finding a part"),Hro=N.object({type:N.literal("schematic_box"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),width:ho,height:ho,is_dashed:N.boolean().default(!1),x:ho,y:ho,subcircuit_id:N.string().optional()}).describe("Draws a box on the schematic"),Oro=N.object({type:N.literal("schematic_path"),schematic_path_id:Yo("schematic_path"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),fill_color:N.string().optional(),is_filled:N.boolean().optional(),stroke_width:ho.nullable().optional(),stroke_color:N.string().optional(),points:N.array(Lr),subcircuit_id:N.string().optional()}),Gro=N.record(N.object({left_margin:Ui.optional(),right_margin:Ui.optional(),top_margin:Ui.optional(),bottom_margin:Ui.optional()})),Yro=N.object({left_size:N.number(),right_size:N.number(),top_size:N.number().optional(),bottom_size:N.number().optional()}),Uro=N.object({left_side:N.object({pins:N.array(N.number()),direction:N.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:N.object({pins:N.array(N.number()),direction:N.enum(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:N.object({pins:N.array(N.number()),direction:N.enum(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:N.object({pins:N.array(N.number()),direction:N.enum(["left-to-right","right-to-left"]).optional()}).optional()}),Kro=N.union([Yro,Uro]),Vro=N.object({type:N.literal("schematic_component"),size:D3t,center:Lr,source_component_id:N.string().optional(),schematic_component_id:N.string(),schematic_symbol_id:N.string().optional(),pin_spacing:Ui.optional(),pin_styles:Gro.optional(),box_width:Ui.optional(),symbol_name:N.string().optional(),port_arrangement:Kro.optional(),port_labels:N.record(N.string()).optional(),symbol_display_value:N.string().optional(),subcircuit_id:N.string().optional(),schematic_group_id:N.string().optional(),is_schematic_group:N.boolean().optional(),source_group_id:N.string().optional(),is_box_with_pins:N.boolean().optional().default(!0)}),zro=N.object({kicad_symbol:lro.optional()}).catchall(N.unknown()),Jro=N.object({type:N.literal("schematic_symbol"),schematic_symbol_id:N.string(),name:N.string().optional(),metadata:zro.optional()}).describe("Defines a named schematic symbol that can be referenced by components."),Wro=N.object({type:N.literal("schematic_line"),schematic_line_id:Yo("schematic_line"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),x1:ho,y1:ho,x2:ho,y2:ho,stroke_width:ho.nullable().optional(),color:N.string().default("#000000"),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe("Draws a styled line on the schematic"),jro=N.object({type:N.literal("schematic_rect"),schematic_rect_id:Yo("schematic_rect"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:Lr,width:ho,height:ho,rotation:jm.default(0),stroke_width:ho.nullable().optional(),color:N.string().default("#000000"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe("Draws a styled rectangle on the schematic"),$ro=N.object({type:N.literal("schematic_circle"),schematic_circle_id:Yo("schematic_circle"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:Lr,radius:ho,stroke_width:ho.nullable().optional(),color:N.string().default("#000000"),is_filled:N.boolean().default(!1),fill_color:N.string().optional(),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe("Draws a styled circle on the schematic"),qro=N.object({type:N.literal("schematic_arc"),schematic_arc_id:Yo("schematic_arc"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),center:Lr,radius:ho,start_angle_degrees:jm,end_angle_degrees:jm,direction:N.enum(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:ho.nullable().optional(),color:N.string().default("#000000"),is_dashed:N.boolean().default(!1),subcircuit_id:N.string().optional()}).describe("Draws a styled arc on the schematic"),Xro=N.object({type:N.literal("schematic_trace"),schematic_trace_id:N.string(),source_trace_id:N.string().optional(),junctions:N.array(N.object({x:N.number(),y:N.number()})),edges:N.array(N.object({from:N.object({x:N.number(),y:N.number()}),to:N.object({x:N.number(),y:N.number()}),is_crossing:N.boolean().optional(),from_schematic_port_id:N.string().optional(),to_schematic_port_id:N.string().optional()})),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional()}),Zro=N.enum(["center","left","right","top","bottom"]),eso=N.object({type:N.literal("schematic_text"),schematic_component_id:N.string().optional(),schematic_symbol_id:N.string().optional(),schematic_text_id:N.string(),text:N.string(),font_size:N.number().default(.18),position:N.object({x:ho,y:ho}),rotation:N.number().default(0),anchor:N.union([Zro.describe("legacy"),hv]).default("center"),color:N.string().default("#000000"),subcircuit_id:N.string().optional()}),tso=N.object({type:N.literal("schematic_port"),schematic_port_id:N.string(),source_port_id:N.string(),schematic_component_id:N.string().optional(),center:Lr,facing_direction:N.enum(["up","down","left","right"]).optional(),distance_from_component_edge:N.number().optional(),side_of_component:N.enum(["top","bottom","left","right"]).optional(),true_ccw_index:N.number().optional(),pin_number:N.number().optional(),display_pin_label:N.string().optional(),subcircuit_id:N.string().optional(),is_connected:N.boolean().optional(),has_input_arrow:N.boolean().optional(),has_output_arrow:N.boolean().optional(),is_drawn_with_inversion_circle:N.boolean().optional()}).describe("Defines a port on a schematic component"),nso=N.object({type:N.literal("schematic_net_label"),schematic_net_label_id:Yo("schematic_net_label"),schematic_trace_id:N.string().optional(),source_trace_id:N.string().optional(),source_net_id:N.string(),center:Lr,anchor_position:Lr.optional(),anchor_side:N.enum(["top","bottom","left","right"]),text:N.string(),symbol_name:N.string().optional(),is_movable:N.boolean().optional(),subcircuit_id:N.string().optional()}),oso=N0.extend({type:N.literal("schematic_error"),schematic_error_id:N.string(),error_type:N.literal("schematic_port_not_found").default("schematic_port_not_found"),subcircuit_id:N.string().optional()}).describe("Defines a schematic error on the schematic"),iso=N0.extend({type:N.literal("schematic_layout_error"),schematic_layout_error_id:Yo("schematic_layout_error"),error_type:N.literal("schematic_layout_error").default("schematic_layout_error"),source_group_id:N.string(),schematic_group_id:N.string(),subcircuit_id:N.string().optional()}).describe("Error emitted when schematic layout fails for a group"),Abe=N.object({type:N.literal("schematic_debug_object"),label:N.string().optional(),subcircuit_id:N.string().optional()}),rso=Abe.extend({shape:N.literal("rect"),center:Lr,size:D3t}),sso=Abe.extend({shape:N.literal("line"),start:Lr,end:Lr}),aso=Abe.extend({shape:N.literal("point"),center:Lr}),Aso=N.discriminatedUnion("shape",[rso,sso,aso]),cso=N.object({type:N.literal("schematic_voltage_probe"),schematic_voltage_probe_id:N.string(),source_component_id:N.string().optional(),name:N.string().optional(),position:Lr,schematic_trace_id:N.string(),voltage:dv.optional(),subcircuit_id:N.string().optional(),color:N.string().optional(),label_alignment:hv.optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),lso=N.object({type:N.literal("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:Yo("schematic_manual_edit_conflict_warning"),warning_type:N.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:N.string(),schematic_component_id:N.string(),schematic_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),uso=N.object({type:N.literal("schematic_group"),schematic_group_id:Yo("schematic_group"),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Ui,height:Ui,center:Lr,schematic_component_ids:N.array(N.string()),show_as_schematic_box:N.boolean().optional(),name:N.string().optional(),description:N.string().optional()}).describe("Defines a group of components on the schematic"),gso=N.object({type:N.literal("schematic_table"),schematic_table_id:Yo("schematic_table"),anchor_position:Lr,column_widths:N.array(ho),row_heights:N.array(ho),cell_padding:ho.optional(),border_width:ho.optional(),subcircuit_id:N.string().optional(),schematic_component_id:N.string().optional(),anchor:hv.optional()}).describe("Defines a table on the schematic"),dso=N.object({type:N.literal("schematic_table_cell"),schematic_table_cell_id:Yo("schematic_table_cell"),schematic_table_id:N.string(),start_row_index:N.number(),end_row_index:N.number(),start_column_index:N.number(),end_column_index:N.number(),text:N.string().optional(),center:Lr,width:ho,height:ho,horizontal_align:N.enum(["left","center","right"]).optional(),vertical_align:N.enum(["top","middle","bottom"]).optional(),font_size:ho.optional(),subcircuit_id:N.string().optional()}).describe("Defines a cell within a schematic_table"),hso=N.object({type:N.literal("schematic_sheet"),schematic_sheet_id:Yo("schematic_sheet"),name:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Defines a schematic sheet or page that components can be placed on"),pso=N.object({x:ho,y:ho,bulge:N.number().optional()}),rEt=N.object({vertices:N.array(pso)}),mso=N.object({outer_ring:rEt,inner_rings:N.array(rEt).default([])}),_so=N.object({x:ho,y:ho,via:N.boolean().optional(),via_to_layer:Pc.optional()}),fso=(N.array(_so),N.object({x:ho,y:ho,via:N.boolean().optional(),to_layer:Pc.optional(),trace_width:ho.optional()})),Iso=N.object({min_trace_width:Ui.optional(),min_board_edge_clearance:Ui.optional(),min_via_hole_edge_to_via_hole_edge_clearance:Ui.optional(),min_plated_hole_drill_edge_to_drill_edge_clearance:Ui.optional(),min_trace_to_pad_edge_clearance:Ui.optional(),min_pad_edge_to_pad_edge_clearance:Ui.optional(),min_same_net_trace_edge_to_trace_edge_clearance:Ui.optional(),min_different_net_trace_edge_to_trace_edge_clearance:Ui.optional(),min_via_hole_diameter:Ui.optional(),min_via_pad_diameter:Ui.optional()}),Cso=N.object({type:N.literal("pcb_component"),pcb_component_id:Yo("pcb_component"),source_component_id:N.string(),center:Lr,layer:Pc,rotation:jm,display_offset_x:N.string().optional().describe("How to display the x offset for this part, usually corresponding with how the user specified it"),display_offset_y:N.string().optional().describe("How to display the y offset for this part, usually corresponding with how the user specified it"),width:Ui,height:Ui,do_not_place:N.boolean().optional(),is_allowed_to_be_off_board:N.boolean().optional(),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),position_mode:N.enum(["packed","relative_to_group_anchor","relative_to_another_component","none"]).optional(),anchor_position:Lr.optional(),anchor_alignment:hv.optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),cable_insertion_center:Lr.optional(),insertion_direction:N.enum(["from_above","from_left","from_right","from_front","from_back"]).optional(),metadata:N.object({kicad_footprint:rro.optional()}).optional(),obstructs_within_bounds:N.boolean().default(!0).describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath")}).describe("Defines a component on the PCB"),sEt=N.object({type:N.literal("pcb_hole"),pcb_hole_id:Yo("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("circle"),hole_diameter:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),aEt=(sEt.describe("Defines a circular hole on the PCB"),N.object({type:N.literal("pcb_hole"),pcb_hole_id:Yo("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("rect"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),AEt=(aEt.describe("Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."),N.object({type:N.literal("pcb_hole"),pcb_hole_id:Yo("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.enum(["circle","square"]),hole_diameter:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),cEt=(AEt.describe("Defines a circular or square hole on the PCB"),N.object({type:N.literal("pcb_hole"),pcb_hole_id:Yo("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("oval"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),lEt=(cEt.describe("Defines an oval hole on the PCB"),N.object({type:N.literal("pcb_hole"),pcb_hole_id:Yo("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("pill"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),uEt=(lEt.describe("Defines a pill-shaped hole on the PCB"),N.object({type:N.literal("pcb_hole"),pcb_hole_id:Yo("pcb_hole"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_component_id:N.string().optional(),hole_shape:N.literal("rotated_pill"),hole_width:N.number(),hole_height:N.number(),x:ho,y:ho,ccw_rotation:jm,is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()})),yso=(uEt.describe("Defines a rotated pill-shaped hole on the PCB"),AEt.or(cEt).or(lEt).or(uEt).or(sEt).or(aEt)),xso=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("circle"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_diameter:N.number(),hole_diameter:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Eso=N.object({type:N.literal("pcb_plated_hole"),shape:N.enum(["oval","pill"]),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),outer_width:N.number(),outer_height:N.number(),hole_width:N.number(),hole_height:N.number(),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,ccw_rotation:jm,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Bso=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("circular_hole_with_rect_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal("circle"),pad_shape:N.literal("rect"),hole_diameter:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo("pcb_plated_hole"),soldermask_margin:N.number().optional(),rect_ccw_rotation:jm.optional()}),bso=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("pill_hole_with_rect_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal("pill"),pad_shape:N.literal("rect"),hole_width:N.number(),hole_height:N.number(),rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Sso=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("rotated_pill_hole_with_rect_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.literal("rotated_pill"),pad_shape:N.literal("rect"),hole_width:N.number(),hole_height:N.number(),hole_ccw_rotation:jm,rect_pad_width:N.number(),rect_pad_height:N.number(),rect_border_radius:N.number().optional(),rect_ccw_rotation:jm,hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo("pcb_plated_hole"),soldermask_margin:N.number().optional()}),Qso=N.object({type:N.literal("pcb_plated_hole"),shape:N.literal("hole_with_polygon_pad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),hole_shape:N.enum(["circle","oval","pill","rotated_pill"]),hole_diameter:N.number().optional(),hole_width:N.number().optional(),hole_height:N.number().optional(),pad_outline:N.array(N.object({x:ho,y:ho})).min(3),hole_offset_x:ho.default(0),hole_offset_y:ho.default(0),is_covered_with_solder_mask:N.boolean().optional(),x:ho,y:ho,layers:N.array(Pc),port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),pcb_plated_hole_id:Yo("pcb_plated_hole"),soldermask_margin:N.number().optional(),ccw_rotation:jm.optional()}),vso=N.union([xso,Eso,Bso,bso,Sso,Qso]),wso=N.object({type:N.literal("pcb_port"),pcb_port_id:Yo("pcb_port"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_port_id:N.string(),pcb_component_id:N.string().optional(),x:ho,y:ho,layers:N.array(Pc),is_board_pinout:N.boolean().optional()}).describe("Defines a port on the PCB"),Pso=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("circle"),pcb_smtpad_id:Yo("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,radius:N.number(),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Mso=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("rect"),pcb_smtpad_id:Yo("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),Dso=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("rotated_rect"),pcb_smtpad_id:Yo("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),rect_border_radius:N.number().optional(),corner_radius:N.number().optional(),ccw_rotation:jm,layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional(),soldermask_margin_left:N.number().optional(),soldermask_margin_top:N.number().optional(),soldermask_margin_right:N.number().optional(),soldermask_margin_bottom:N.number().optional()}),Nso=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("pill"),pcb_smtpad_id:Yo("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),radius:N.number(),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Rso=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("rotated_pill"),pcb_smtpad_id:Yo("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),radius:N.number(),ccw_rotation:jm,layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),Tso=N.object({type:N.literal("pcb_smtpad"),shape:N.literal("polygon"),pcb_smtpad_id:Yo("pcb_smtpad"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),points:N.array(Lr),layer:Pc,port_hints:N.array(N.string()).optional(),pcb_component_id:N.string().optional(),pcb_port_id:N.string().optional(),is_covered_with_solder_mask:N.boolean().optional(),soldermask_margin:N.number().optional()}),kso=N.discriminatedUnion("shape",[Pso,Mso,Dso,Rso,Nso,Tso]).describe("Defines an SMT pad on the PCB"),Fso=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("circle"),pcb_solder_paste_id:Yo("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,radius:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Lso=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("rect"),pcb_solder_paste_id:Yo("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Hso=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("pill"),pcb_solder_paste_id:Yo("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),radius:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Oso=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("rotated_rect"),pcb_solder_paste_id:Yo("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),ccw_rotation:ho,layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Gso=N.object({type:N.literal("pcb_solder_paste"),shape:N.literal("oval"),pcb_solder_paste_id:Yo("pcb_solder_paste"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),x:ho,y:ho,width:N.number(),height:N.number(),layer:Pc,pcb_component_id:N.string().optional(),pcb_smtpad_id:N.string().optional()}),Yso=N.union([Fso,Lso,Hso,Oso,Gso]).describe("Defines solderpaste on the PCB"),Uso=N.object({type:N.literal("pcb_text"),pcb_text_id:Yo("pcb_text"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),text:N.string(),center:Lr,layer:Pc,width:Ui,height:Ui,lines:N.number(),align:N.enum(["bottom-left"])}).describe("Defines text on the PCB"),Kso=N.object({route_type:N.literal("wire"),x:ho,y:ho,width:ho,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),start_pcb_port_id:N.string().optional(),end_pcb_port_id:N.string().optional(),layer:Pc}),Vso=N.object({route_type:N.literal("via"),x:ho,y:ho,copper_pour_id:N.string().optional(),is_inside_copper_pour:N.boolean().optional(),hole_diameter:ho.optional(),outer_diameter:ho.optional(),from_layer:Pc,to_layer:Pc}),zso=N.union([Kso,Vso]),Jso=N.object({type:N.literal("pcb_trace"),source_trace_id:N.string().optional(),pcb_component_id:N.string().optional(),pcb_trace_id:Yo("pcb_trace"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),route_thickness_mode:N.enum(["constant","interpolated"]).default("constant").optional(),route_order_index:N.number().optional(),should_round_corners:N.boolean().optional(),trace_length:N.number().optional(),highlight_color:N.string().optional(),route:N.array(zso)}).describe("Defines a trace on the PCB"),Wso=N.object({type:N.literal("pcb_trace_warning"),pcb_trace_warning_id:Yo("pcb_trace_warning"),warning_type:N.literal("pcb_trace_warning").default("pcb_trace_warning"),message:N.string(),center:Lr.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines a trace warning on the PCB"),jso=N0.extend({type:N.literal("pcb_trace_error"),pcb_trace_error_id:Yo("pcb_trace_error"),error_type:N.literal("pcb_trace_error").default("pcb_trace_error"),center:Lr.optional(),pcb_trace_id:N.string(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines a trace error on the PCB"),$so=N0.extend({type:N.literal("pcb_trace_missing_error"),pcb_trace_missing_error_id:Yo("pcb_trace_missing_error"),error_type:N.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),center:Lr.optional(),source_trace_id:N.string(),pcb_component_ids:N.array(N.string()),pcb_port_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),qso=N0.extend({type:N.literal("pcb_port_not_matched_error"),pcb_error_id:Yo("pcb_error"),error_type:N.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),Xso=N0.extend({type:N.literal("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:Yo("pcb_port_not_connected_error"),error_type:N.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),pcb_port_ids:N.array(N.string()),pcb_component_ids:N.array(N.string()),subcircuit_id:N.string().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),Zso=N.object({type:N.literal("pcb_net"),pcb_net_id:Yo("pcb_net"),source_net_id:N.string().optional(),highlight_color:N.string().optional()}).describe("Defines a net on the PCB"),eao=N.object({type:N.literal("pcb_via"),pcb_via_id:Yo("pcb_via"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),x:ho,y:ho,outer_diameter:ho.default("0.6mm"),hole_diameter:ho.default("0.25mm"),from_layer:Pc.optional(),to_layer:Pc.optional(),layers:N.array(Pc),pcb_trace_id:N.string().optional(),net_is_assignable:N.boolean().optional(),net_assigned:N.boolean().optional(),is_tented:N.boolean().optional()}).describe("Defines a via on the PCB"),tao=N.object({type:N.literal("pcb_board"),pcb_board_id:Yo("pcb_board"),pcb_panel_id:N.string().optional(),carrier_pcb_board_id:N.string().optional(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),is_mounted_to_carrier_board:N.boolean().optional(),width:Ui.optional(),height:Ui.optional(),center:Lr,display_offset_x:N.string().optional().describe("How to display the x offset for this board, usually corresponding with how the user specified it"),display_offset_y:N.string().optional().describe("How to display the y offset for this board, usually corresponding with how the user specified it"),thickness:Ui.optional().default(1.4),num_layers:N.number().optional().default(4),outline:N.array(Lr).optional(),shape:N.enum(["rect","polygon"]).optional(),material:N.enum(["fr4","fr1"]).default("fr4"),anchor_position:Lr.optional(),anchor_alignment:hv.optional(),position_mode:N.enum(["relative_to_panel_anchor","none"]).optional()}).merge(Iso).describe("Defines the board outline of the PCB"),nao=N.object({type:N.literal("pcb_panel"),pcb_panel_id:Yo("pcb_panel"),width:Ui,height:Ui,center:Lr,thickness:Ui.optional().default(1.4),covered_with_solder_mask:N.boolean().optional().default(!0)}).describe("Defines a PCB panel that can contain multiple boards"),oao=N0.extend({type:N.literal("pcb_placement_error"),pcb_placement_error_id:Yo("pcb_placement_error"),error_type:N.literal("pcb_placement_error").default("pcb_placement_error"),subcircuit_id:N.string().optional()}).describe("Defines a placement error on the PCB"),iao=N0.extend({type:N.literal("pcb_panelization_placement_error"),pcb_panelization_placement_error_id:Yo("pcb_panelization_placement_error"),error_type:N.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),pcb_panel_id:N.string().optional(),pcb_board_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Defines a panelization placement error on the PCB"),rao=N.object({type:N.literal("pcb_trace_hint"),pcb_trace_hint_id:Yo("pcb_trace_hint"),pcb_port_id:N.string(),pcb_component_id:N.string(),route:N.array(fso),subcircuit_id:N.string().optional()}).describe("A hint that can be used during generation of a PCB trace"),sao=N.object({type:N.literal("pcb_silkscreen_line"),pcb_silkscreen_line_id:Yo("pcb_silkscreen_line"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),stroke_width:ho.default("0.1mm"),x1:ho,y1:ho,x2:ho,y2:ho,layer:mC}).describe("Defines a silkscreen line on the PCB"),aao=N.object({type:N.literal("pcb_silkscreen_path"),pcb_silkscreen_path_id:Yo("pcb_silkscreen_path"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,route:N.array(Lr),stroke_width:Ui}).describe("Defines a silkscreen path on the PCB"),Aao=N.object({type:N.literal("pcb_silkscreen_text"),pcb_silkscreen_text_id:Yo("pcb_silkscreen_text"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ho.default("0.2mm"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Ui,top:Ui,bottom:Ui,right:Ui}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:N.number().optional(),layer:Pc,is_mirrored:N.boolean().default(!1).optional(),anchor_position:Lr.default({x:0,y:0}),anchor_alignment:hv.default("center")}).describe("Defines silkscreen text on the PCB"),cao=N.object({type:N.literal("pcb_copper_text"),pcb_copper_text_id:Yo("pcb_copper_text"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ho.default("0.2mm"),pcb_component_id:N.string(),text:N.string(),is_knockout:N.boolean().default(!1).optional(),knockout_padding:N.object({left:Ui,top:Ui,bottom:Ui,right:Ui}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:N.number().optional(),layer:Pc,is_mirrored:N.boolean().default(!1).optional(),anchor_position:Lr.default({x:0,y:0}),anchor_alignment:hv.default("center")}).describe("Defines copper text on the PCB"),lao=N.object({type:N.literal("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:Yo("pcb_silkscreen_rect"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:Pc,stroke_width:Ui.default("1mm"),corner_radius:Ui.optional(),is_filled:N.boolean().default(!0).optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),ccw_rotation:N.number().optional()}).describe("Defines a silkscreen rect on the PCB"),uao=N.object({type:N.literal("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:Yo("pcb_silkscreen_circle"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius:Ui,layer:mC,stroke_width:Ui.default("1mm"),is_filled:N.boolean().optional()}).describe("Defines a silkscreen circle on the PCB"),gao=N.object({type:N.literal("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:Yo("pcb_silkscreen_oval"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius_x:ho,radius_y:ho,layer:mC,ccw_rotation:jm.optional()}).describe("Defines a silkscreen oval on the PCB"),dao=N.object({type:N.literal("pcb_silkscreen_pill"),pcb_silkscreen_pill_id:Yo("pcb_silkscreen_pill"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:Pc,ccw_rotation:N.number().optional()}).describe("Defines a silkscreen pill on the PCB"),hao=N.object({type:N.literal("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:Yo("pcb_fabrication_note_text"),subcircuit_id:N.string().optional(),pcb_group_id:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ho.default("1mm"),pcb_component_id:N.string(),text:N.string(),layer:mC,anchor_position:Lr.default({x:0,y:0}),anchor_alignment:N.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:N.string().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),pao=N.object({type:N.literal("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:Yo("pcb_fabrication_note_path"),pcb_component_id:N.string(),subcircuit_id:N.string().optional(),layer:Pc,route:N.array(Lr),stroke_width:Ui,color:N.string().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),mao=N.object({type:N.literal("pcb_fabrication_note_rect"),pcb_fabrication_note_rect_id:Yo("pcb_fabrication_note_rect"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:mC,stroke_width:Ui.default("0.1mm"),corner_radius:Ui.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe("Defines a fabrication note rectangle on the PCB"),_ao=N.object({type:N.literal("pcb_fabrication_note_dimension"),pcb_fabrication_note_dimension_id:Yo("pcb_fabrication_note_dimension"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,from:Lr,to:Lr,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset:Ui.optional(),offset_distance:Ui.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:Ui.default("1mm"),color:N.string().optional(),arrow_size:Ui.default("1mm")}).describe("Defines a measurement annotation within PCB fabrication notes"),fao=N.object({type:N.literal("pcb_note_text"),pcb_note_text_id:Yo("pcb_note_text"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:ho.default("1mm"),text:N.string().optional(),anchor_position:Lr.default({x:0,y:0}),anchor_alignment:N.enum(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),layer:mC.default("top"),is_mirrored_from_top_view:N.boolean().optional(),color:N.string().optional()}).describe("Defines a documentation note in text on the PCB"),Iao=N.object({type:N.literal("pcb_note_rect"),pcb_note_rect_id:Yo("pcb_note_rect"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:mC.default("top"),stroke_width:Ui.default("0.1mm"),corner_radius:Ui.optional(),is_filled:N.boolean().optional(),has_stroke:N.boolean().optional(),is_stroke_dashed:N.boolean().optional(),color:N.string().optional()}).describe("Defines a rectangular documentation note on the PCB"),Cao=N.object({type:N.literal("pcb_note_path"),pcb_note_path_id:Yo("pcb_note_path"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),route:N.array(Lr),layer:mC.default("top"),stroke_width:Ui.default("0.1mm"),color:N.string().optional()}).describe("Defines a polyline documentation note on the PCB"),yao=N.object({type:N.literal("pcb_note_line"),pcb_note_line_id:Yo("pcb_note_line"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),text:N.string().optional(),x1:ho,y1:ho,x2:ho,y2:ho,layer:mC.default("top"),stroke_width:ho.default("0.1mm"),color:N.string().optional(),is_dashed:N.boolean().optional()}).describe("Defines a straight documentation note line on the PCB"),xao=N.object({type:N.literal("pcb_note_dimension"),pcb_note_dimension_id:Yo("pcb_note_dimension"),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),name:N.string().optional(),from:Lr,to:Lr,text:N.string().optional(),text_ccw_rotation:N.number().optional(),offset_distance:Ui.optional(),offset_direction:N.object({x:N.number(),y:N.number()}).optional(),font:N.literal("tscircuit2024").default("tscircuit2024"),font_size:Ui.default("1mm"),layer:mC.default("top"),color:N.string().optional(),arrow_size:Ui.default("1mm")}).describe("Defines a measurement annotation within PCB documentation notes"),Eao=N0.extend({type:N.literal("pcb_footprint_overlap_error"),pcb_error_id:Yo("pcb_error"),error_type:N.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),pcb_smtpad_ids:N.array(N.string()).optional(),pcb_plated_hole_ids:N.array(N.string()).optional(),pcb_hole_ids:N.array(N.string()).optional(),pcb_keepout_ids:N.array(N.string()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),Bao=N0.extend({type:N.literal("pcb_courtyard_overlap_error"),pcb_error_id:Yo("pcb_error"),error_type:N.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),pcb_component_ids:N.tuple([N.string(),N.string()])}).describe("Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"),bao=N.object({type:N.literal("pcb_keepout"),shape:N.literal("rect"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:ho,height:ho,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()}).or(N.object({type:N.literal("pcb_keepout"),shape:N.literal("circle"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius:ho,pcb_keepout_id:N.string(),layers:N.array(N.string()),description:N.string().optional()})),uAe=N.object({type:N.literal("pcb_cutout"),pcb_cutout_id:Yo("pcb_cutout"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),pcb_board_id:N.string().optional(),pcb_panel_id:N.string().optional()}),Sao=uAe.extend({shape:N.literal("rect"),center:Lr,width:Ui,height:Ui,rotation:jm.optional(),corner_radius:Ui.optional()}),Qao=uAe.extend({shape:N.literal("circle"),center:Lr,radius:Ui}),vao=uAe.extend({shape:N.literal("polygon"),points:N.array(Lr)}),wao=uAe.extend({shape:N.literal("path"),route:N.array(Lr),slot_width:Ui,slot_length:Ui.optional(),space_between_slots:Ui.optional(),slot_corner_radius:Ui.optional()}),Pao=N.discriminatedUnion("shape",[Sao,Qao,vao,wao]).describe("Defines a cutout on the PCB, removing board material."),Mao=N0.extend({type:N.literal("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:Yo("pcb_missing_footprint_error"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:N.string()}).describe("Defines a missing footprint error on the PCB"),Dao=N0.extend({type:N.literal("external_footprint_load_error"),external_footprint_load_error_id:Yo("external_footprint_load_error"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),error_type:N.literal("external_footprint_load_error").default("external_footprint_load_error")}).describe("Defines an error when an external footprint fails to load"),Nao=N0.extend({type:N.literal("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:Yo("circuit_json_footprint_load_error"),pcb_component_id:N.string(),source_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),error_type:N.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),circuit_json:N.array(N.any()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),Rao=N.object({type:N.literal("pcb_group"),pcb_group_id:Yo("pcb_group"),source_group_id:N.string(),is_subcircuit:N.boolean().optional(),subcircuit_id:N.string().optional(),width:Ui.optional(),height:Ui.optional(),center:Lr,display_offset_x:N.string().optional().describe("How to display the x offset for this group, usually corresponding with how the user specified it"),display_offset_y:N.string().optional().describe("How to display the y offset for this group, usually corresponding with how the user specified it"),outline:N.array(Lr).optional(),anchor_position:Lr.optional(),anchor_alignment:hv.default("center"),position_mode:N.enum(["packed","relative_to_group_anchor","none"]).optional(),positioned_relative_to_pcb_group_id:N.string().optional(),positioned_relative_to_pcb_board_id:N.string().optional(),pcb_component_ids:N.array(N.string()),child_layout_mode:N.enum(["packed","none"]).optional(),name:N.string().optional(),description:N.string().optional(),layout_mode:N.string().optional(),autorouter_configuration:N.object({trace_clearance:Ui}).optional(),autorouter_used_string:N.string().optional()}).describe("Defines a group of components on the PCB"),Tao=N0.extend({type:N.literal("pcb_autorouting_error"),pcb_error_id:Yo("pcb_autorouting_error"),error_type:N.literal("pcb_autorouting_error").default("pcb_autorouting_error"),subcircuit_id:N.string().optional()}).describe("The autorouting has failed to route a portion of the board"),kao=N.object({type:N.literal("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:Yo("pcb_manual_edit_conflict_warning"),warning_type:N.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:N.string(),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),source_component_id:N.string()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),gEt=N.enum(["x-","x+","y+","y-"]),Fao=N.object({type:N.literal("pcb_connector_not_in_accessible_orientation_warning"),pcb_connector_not_in_accessible_orientation_warning_id:Yo("pcb_connector_not_in_accessible_orientation_warning"),warning_type:N.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),message:N.string(),pcb_component_id:N.string(),source_component_id:N.string().optional(),pcb_board_id:N.string().optional(),facing_direction:gEt,recommended_facing_direction:gEt,subcircuit_id:N.string().optional()}).describe("Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"),Lao=N.object({type:N.literal("supplier_footprint_mismatch_warning"),supplier_footprint_mismatch_warning_id:Yo("supplier_footprint_mismatch_warning"),warning_type:N.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),message:N.string(),source_component_id:N.string(),pcb_component_id:N.string().optional(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),supplier_name:R3t.optional(),supplier_part_number:N.string().optional(),supplier_footprint_url:N.string().optional(),footprint_copper_intersection_over_union:N.number()}).describe("Warning emitted when a supplier part footprint does not match the expected footprint"),Hao=N.object({type:N.literal("pcb_breakout_point"),pcb_breakout_point_id:Yo("pcb_breakout_point"),pcb_group_id:N.string(),subcircuit_id:N.string().optional(),source_trace_id:N.string().optional(),source_port_id:N.string().optional(),source_net_id:N.string().optional(),x:ho,y:ho}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),Oao=N.object({type:N.literal("pcb_ground_plane"),pcb_ground_plane_id:Yo("pcb_ground_plane"),source_pcb_ground_plane_id:N.string(),source_net_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Defines a ground plane on the PCB"),Gao=N.object({type:N.literal("pcb_ground_plane_region"),pcb_ground_plane_region_id:Yo("pcb_ground_plane_region"),pcb_ground_plane_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:Pc,points:N.array(Lr)}).describe("Defines a polygon region of a ground plane"),Yao=N.object({type:N.literal("pcb_thermal_spoke"),pcb_thermal_spoke_id:Yo("pcb_thermal_spoke"),pcb_ground_plane_id:N.string(),shape:N.string(),spoke_count:N.number(),spoke_thickness:ho,spoke_inner_diameter:ho,spoke_outer_diameter:ho,pcb_plated_hole_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),cbe=N.object({type:N.literal("pcb_copper_pour"),pcb_copper_pour_id:Yo("pcb_copper_pour"),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:Pc,source_net_id:N.string().optional(),covered_with_solder_mask:N.boolean().optional().default(!0)}),Uao=cbe.extend({shape:N.literal("rect"),center:Lr,width:Ui,height:Ui,rotation:jm.optional()}),Kao=cbe.extend({shape:N.literal("brep"),brep_shape:mso}),Vao=cbe.extend({shape:N.literal("polygon"),points:N.array(Lr)}),zao=N.discriminatedUnion("shape",[Uao,Kao,Vao]).describe("Defines a copper pour on the PCB."),Jao=N0.extend({type:N.literal("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:Yo("pcb_component_outside_board_error"),error_type:N.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:Lr,component_bounds:N.object({min_x:N.number(),max_x:N.number(),min_y:N.number(),max_y:N.number()}),subcircuit_id:N.string().optional(),source_component_id:N.string().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),Wao=N0.extend({type:N.literal("pcb_component_not_on_board_edge_error"),pcb_component_not_on_board_edge_error_id:Yo("pcb_component_not_on_board_edge_error"),error_type:N.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),pcb_component_id:N.string(),pcb_board_id:N.string(),component_center:Lr,pad_to_nearest_board_edge_distance:N.number(),source_component_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when a component that must be placed on the board edge is centered away from the edge"),jao=N0.extend({type:N.literal("pcb_component_invalid_layer_error"),pcb_component_invalid_layer_error_id:Yo("pcb_component_invalid_layer_error"),error_type:N.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),pcb_component_id:N.string().optional(),source_component_id:N.string(),layer:Pc,subcircuit_id:N.string().optional()}).describe("Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"),$ao=N0.extend({type:N.literal("pcb_via_clearance_error"),pcb_error_id:Yo("pcb_error"),error_type:N.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),pcb_via_ids:N.array(N.string()).min(2),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),pcb_center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when vias are closer than the allowed clearance"),qao=N0.extend({type:N.literal("pcb_via_trace_clearance_error"),pcb_via_trace_clearance_error_id:Yo("pcb_via_trace_clearance_error"),error_type:N.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),pcb_via_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when a via and trace are closer than the allowed clearance"),Xao=N0.extend({type:N.literal("pcb_pad_pad_clearance_error"),pcb_pad_pad_clearance_error_id:Yo("pcb_pad_pad_clearance_error"),error_type:N.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),pcb_pad_ids:N.array(N.string()).min(2),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when pads are closer than the allowed clearance"),Zao=N0.extend({type:N.literal("pcb_pad_trace_clearance_error"),pcb_pad_trace_clearance_error_id:Yo("pcb_pad_trace_clearance_error"),error_type:N.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),pcb_pad_id:N.string(),pcb_trace_id:N.string(),minimum_clearance:ho.optional(),actual_clearance:ho.optional(),center:N.object({x:N.number().optional(),y:N.number().optional()}).optional(),subcircuit_id:N.string().optional()}).describe("Error emitted when a pad and trace are closer than allowed clearance"),eAo=N.object({type:N.literal("pcb_courtyard_rect"),pcb_courtyard_rect_id:Yo("pcb_courtyard_rect"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,width:Ui,height:Ui,layer:mC,ccw_rotation:jm.optional(),color:N.string().optional()}).describe("Defines a courtyard rectangle on the PCB"),tAo=N.object({type:N.literal("pcb_courtyard_outline"),pcb_courtyard_outline_id:Yo("pcb_courtyard_outline"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,outline:N.array(Lr).min(2)}).describe("Defines a courtyard outline on the PCB"),nAo=N.object({type:N.literal("pcb_courtyard_polygon"),pcb_courtyard_polygon_id:Yo("pcb_courtyard_polygon"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),layer:mC,points:N.array(Lr).min(3),color:N.string().optional()}).describe("Defines a courtyard polygon on the PCB"),oAo=N.object({type:N.literal("pcb_courtyard_circle"),pcb_courtyard_circle_id:Yo("pcb_courtyard_circle"),pcb_component_id:N.string(),pcb_group_id:N.string().optional(),subcircuit_id:N.string().optional(),center:Lr,radius:Ui,layer:mC,color:N.string().optional()}).describe("Defines a courtyard circle on the PCB"),iAo=N.object({type:N.literal("cad_component"),cad_component_id:N.string(),pcb_component_id:N.string(),source_component_id:N.string(),position:nN,rotation:nN.optional(),size:nN.optional(),layer:Pc.optional(),subcircuit_id:N.string().optional(),footprinter_string:N.string().optional(),model_obj_url:N.string().optional(),model_stl_url:N.string().optional(),model_3mf_url:N.string().optional(),model_gltf_url:N.string().optional(),model_glb_url:N.string().optional(),model_step_url:N.string().optional(),model_wrl_url:N.string().optional(),model_asset:Zio.optional(),model_unit_to_mm_scale_factor:N.number().optional(),model_board_normal_direction:N.enum(["x+","x-","y+","y-","z+","z-"]).optional().describe(`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`),model_origin_position:nN.optional(),model_origin_alignment:N.enum(["unknown","center","center_of_component_on_board_surface","bottom_center_of_component"]).optional(),model_object_fit:N.enum(["contain_within_bounds","fill_bounds"]).optional().default("contain_within_bounds"),model_jscad:N.any().optional(),show_as_translucent_model:N.boolean().optional(),anchor_alignment:N.enum(["center","center_of_component_on_board_surface"]).optional().default("center")}).describe("Defines a component on the PCB"),dEt=N.enum(["sinewave","square","triangle","sawtooth"]),rAo=N.union([N.string(),N.number()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),sAo=N.object({type:N.literal("simulation_voltage_source"),simulation_voltage_source_id:Yo("simulation_voltage_source"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),voltage:dv}).describe("Defines a DC voltage source for simulation"),aAo=N.object({type:N.literal("simulation_voltage_source"),simulation_voltage_source_id:Yo("simulation_voltage_source"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),voltage:dv.optional(),frequency:PL.optional(),peak_to_peak_voltage:dv.optional(),wave_shape:dEt.optional(),phase:jm.optional(),duty_cycle:rAo.optional()}).describe("Defines an AC voltage source for simulation"),AAo=N.union([sAo,aAo]).describe("Defines a voltage source for simulation"),cAo=N.union([N.string(),N.number()]).transform(t=>typeof t=="string"?t.endsWith("%")?parseFloat(t.slice(0,-1))/100:parseFloat(t):t).pipe(N.number().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),lAo=N.object({type:N.literal("simulation_current_source"),simulation_current_source_id:Yo("simulation_current_source"),is_dc_source:N.literal(!0).optional().default(!0),positive_source_port_id:N.string().optional(),negative_source_port_id:N.string().optional(),positive_source_net_id:N.string().optional(),negative_source_net_id:N.string().optional(),current:HJ}).describe("Defines a DC current source for simulation"),uAo=N.object({type:N.literal("simulation_current_source"),simulation_current_source_id:Yo("simulation_current_source"),is_dc_source:N.literal(!1),terminal1_source_port_id:N.string().optional(),terminal2_source_port_id:N.string().optional(),terminal1_source_net_id:N.string().optional(),terminal2_source_net_id:N.string().optional(),current:HJ.optional(),frequency:PL.optional(),peak_to_peak_current:HJ.optional(),wave_shape:dEt.optional(),phase:jm.optional(),duty_cycle:cAo.optional()}).describe("Defines an AC current source for simulation"),gAo=N.union([lAo,uAo]).describe("Defines a current source for simulation"),dAo=N.union([N.literal("spice_dc_sweep"),N.literal("spice_dc_operating_point"),N.literal("spice_transient_analysis"),N.literal("spice_ac_analysis")]),hAo=N.object({type:N.literal("simulation_experiment"),simulation_experiment_id:Yo("simulation_experiment"),name:N.string(),experiment_type:dAo,time_per_step:rbe.optional(),start_time_ms:ML.optional(),end_time_ms:ML.optional()}).describe("Defines a simulation experiment configuration"),pAo=N.object({type:N.literal("simulation_transient_voltage_graph"),simulation_transient_voltage_graph_id:Yo("simulation_transient_voltage_graph"),simulation_experiment_id:N.string(),timestamps_ms:N.array(N.number()).optional(),voltage_levels:N.array(N.number()),source_component_id:N.string().optional(),subcircuit_connectivity_map_key:N.string().optional(),time_per_step:rbe,start_time_ms:ML,end_time_ms:ML,name:N.string().optional(),color:N.string().optional()}).describe("Stores voltage measurements over time for a simulation"),mAo=N.object({type:N.literal("simulation_switch"),simulation_switch_id:Yo("simulation_switch"),source_component_id:N.string().optional(),closes_at:ML.optional(),opens_at:ML.optional(),starts_closed:N.boolean().optional(),switching_frequency:PL.optional()}).describe("Defines a switch for simulation timing control"),_Ao=N.object({type:N.literal("simulation_voltage_probe"),simulation_voltage_probe_id:Yo("simulation_voltage_probe"),source_component_id:N.string().optional(),name:N.string().optional(),signal_input_source_port_id:N.string().optional(),signal_input_source_net_id:N.string().optional(),reference_input_source_port_id:N.string().optional(),reference_input_source_net_id:N.string().optional(),subcircuit_id:N.string().optional(),color:N.string().optional()}).describe("Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points.").superRefine((t,e)=>{if(t.reference_input_source_port_id||t.reference_input_source_net_id){const n=!!t.signal_input_source_port_id||!!t.reference_input_source_port_id,o=!!t.signal_input_source_net_id||!!t.reference_input_source_net_id;n&&o?e.addIssue({code:N.ZodIssueCode.custom,message:"Cannot mix port and net connections in a differential probe."}):n?t.signal_input_source_port_id&&t.reference_input_source_port_id||e.addIssue({code:N.ZodIssueCode.custom,message:"Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."}):o&&(t.signal_input_source_net_id&&t.reference_input_source_net_id||e.addIssue({code:N.ZodIssueCode.custom,message:"Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."}))}else!!t.signal_input_source_port_id==!!t.signal_input_source_net_id&&e.addIssue({code:N.ZodIssueCode.custom,message:"A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."})}),fAo=N0.extend({type:N.literal("simulation_unknown_experiment_error"),simulation_unknown_experiment_error_id:Yo("simulation_unknown_experiment_error"),error_type:N.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),simulation_experiment_id:N.string().optional(),subcircuit_id:N.string().optional()}).describe("An unknown error occurred during the simulation experiment."),IAo=N.object({type:N.literal("simulation_op_amp"),simulation_op_amp_id:Yo("simulation_op_amp"),source_component_id:N.string().optional(),inverting_input_source_port_id:N.string(),non_inverting_input_source_port_id:N.string(),output_source_port_id:N.string(),positive_supply_source_port_id:N.string(),negative_supply_source_port_id:N.string()}).describe("Defines a simple ideal operational amplifier for simulation"),hEt=(N.union([Qro,bro,Sro,Bro,wro,vro,L3t,T3t,abe,F3t,k3t,H3t,O3t,G3t,K3t,V3t,z3t,q3t,J3t,W3t,j3t,$3t,U3t,Y3t,Dro,Nro,Pro,X3t,Z3t,eEt,tEt,nEt,Rro,Tro,kro,Fro,Lro,oEt,Mro,Cso,yso,Mao,Dao,Nao,kao,Fao,Lao,vso,bao,wso,Zso,Uso,Jso,Wso,eao,kso,Yso,tao,nao,Rao,rao,sao,aao,Aao,dao,cao,lao,uao,gao,jso,$so,oao,iao,qso,Xso,$ao,qao,Xao,Zao,pao,hao,mao,_ao,fao,Iao,Cao,yao,xao,Tao,Eao,Bao,Hao,Pao,Oao,Gao,Yao,zao,Jao,Wao,jao,eAo,tAo,nAo,oAo,Hro,eso,Wro,jro,$ro,qro,Vro,Jro,tso,Xro,Oro,oso,iso,nso,Aso,cso,lso,uso,hso,gso,dso,iAo,AAo,gAo,hAo,pAo,mAo,_Ao,fAo,IAo]),!0),OJ={CCW:-1,CW:1,NOT_ORIENTABLE:0},CAo=2*Math.PI,gAe=Object.freeze({__proto__:null,BOUNDARY:2,CCW:hEt,CONTAINS:3,CW:!1,END_VERTEX:2,INSIDE:1,INTERLACE:4,NOT_VERTEX:0,ORIENTATION:OJ,OUTSIDE:0,OVERLAP_OPPOSITE:2,OVERLAP_SAME:1,PIx2:CAo,START_VERTEX:1}),_7=1e-6;function pEt(t){_7=t}function mEt(){return _7}function lbe(t){return t<_7&&t>-_7}function iN(t,e){return t-e<_7&&t-e>-_7}function _Et(t,e){return t-e>_7}function fEt(t,e){return t-e<-_7}var Ke={Utils:Object.freeze({__proto__:null,DECIMALS:3,EQ:iN,EQ_0:lbe,GE:function(t,e){return t-e>-_7},GT:_Et,LE:function(t,e){return t-e<_7},LT:fEt,getTolerance:mEt,setTolerance:pEt}),Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in gAe)Ke[t]=gAe[t];Object.defineProperty(Ke,"DP_TOL",{get:function(){return mEt()},set:function(t){pEt(t)}});var ud=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}};Ke.Errors=ud;var ube=class{constructor(t,e){this.first=t,this.last=e||this.first}[Symbol.iterator](){let t;return{next:()=>(t=t?t.next:this.first,{value:t,done:t===void 0})}}get size(){let t=0;for(let e of this)t++;return t}toArray(t=void 0,e=void 0){let n=[],o=t||this.first,i=e||this.last,r=o;if(r===void 0)return n;do n.push(r),r=r.next;while(r!==i.next);return n}append(t){return this.isEmpty()?this.first=t:(t.prev=this.last,this.last.next=t),this.last=t,this.last.next=void 0,this.first.prev=void 0,this}insert(t,e){if(this.isEmpty())this.first=t,this.last=t;else if(e==null)t.next=this.first,this.first.prev=t,this.first=t;else{let n=e.next;e.next=t,n&&(n.prev=t),t.prev=e,t.next=n,this.last===e&&(this.last=t)}return this.last.next=void 0,this.first.prev=void 0,this}remove(t){return t===this.first&&t===this.last?(this.first=void 0,this.last=void 0):(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this.first&&(this.first=t.next),t===this.last&&(this.last=t.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(t){let e=t,n=t;do{if(e!=t&&e===n)throw ud.INFINITE_LOOP;e=e.next,n=n.next.next}while(e!=t)}},IEt={stroke:"black"},yAo=class{constructor(t=IEt){for(const e in t)this[e]=t[e];this.stroke=t.stroke??IEt.stroke}toAttributesString(){return Object.keys(this).reduce((t,e)=>t+(this[e]!==void 0?this.toAttrString(e,this[e]):""),"")}toAttrString(t,e){const n=t==="className"?"class":this.convertCamelToKebabCase(t);return e===null?`${n} `:`${n}="${e.toString()}" `}convertCamelToKebabCase(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}};function rN(t){return new yAo(t).toAttributesString()}function DL(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ke.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ke.Point(g,h))}return n}function sN(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ke.Utils.EQ(i,e.r))n.push(o);else if(Ke.Utils.LT(i,e.r)){let r,s,a=Math.sqrt(e.r*e.r-i*i);r=t.norm.rotate90CCW().multiply(a),s=o.translate(r),n.push(s),r=t.norm.rotate90CW().multiply(a),s=o.translate(r),n.push(s)}return n}function NL(t,e){let n=[];for(let o of e.toSegments()){let i=GJ(o,t);for(let r of i)PEt(r,n)||n.push(r)}return n}function dAe(t,e){let n=[];if(NL(t,e.box).length===0)return n;let o=sN(t,new Ke.Circle(e.pc,e.r));for(let i of o)i.on(e)&&n.push(i);return n}function GJ(t,e){let n=[];return t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e)?n:DL(new Ke.Line(t.ps,t.pe),e)}function hAe(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new Ke.Line(t.ps,t.pe),i=new Ke.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),!e.ps.on(t)||e.ps.equalTo(t.ps)||e.ps.equalTo(t.pe)||n.push(e.ps),!e.pe.on(t)||e.pe.equalTo(t.ps)||e.pe.equalTo(t.pe)||n.push(e.pe);else if(o.parallelTo(i)){const r=new Ke.Vector(t.ps,t.pe),s=new Ke.Vector(e.ps,e.pe),a=new Ke.Vector(t.ps,e.ps),A=r.cross(s);if(!Ke.Utils.EQ_0(A)){const c=a.cross(s)/A,l=a.cross(r)/A;Ke.Utils.GE(c,0)&&Ke.Utils.LE(c,1)&&Ke.Utils.GE(l,0)&&Ke.Utils.LE(l,1)&&n.push(CEt(t.ps.translate(r.multiply(c)),t,e))}}else{let r=DL(o,i);r.length>0&&yEt(r[0],t)&&yEt(r[0],e)&&n.push(CEt(r[0],t,e))}return n}function CEt(t,e,n){for(const o of[e.ps,e.pe,n.ps,n.pe])if(t.equalTo(o))return o;return t}function yEt(t,e){const n=e.box;return Ke.Utils.LE(t.x,n.xmax)&&Ke.Utils.GE(t.x,n.xmin)&&Ke.Utils.LE(t.y,n.ymax)&&Ke.Utils.GE(t.y,n.ymin)}function pAe(t,e){let n=[];if(t.isZeroLength()){let[i,r]=t.ps.distanceTo(e.pc);return Ke.Utils.EQ(i,e.r)&&n.push(t.ps),n}let o=sN(new Ke.Line(t.ps,t.pe),e);for(let i of o)i.on(t)&&n.push(i);return n}function RL(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=sN(new Ke.Line(t.ps,t.pe),new Ke.Circle(e.pc,e.r));for(let i of o)i.on(t)&&i.on(e)&&n.push(i);return n}function xEt(t,e){let n=[],o=new Ke.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ke.Utils.EQ_0(i)||Ke.Utils.EQ_0(r))return n;if(Ke.Utils.EQ_0(o.x)&&Ke.Utils.EQ_0(o.y)&&Ke.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s,a=t.pc.distanceTo(e.pc)[0];if(Ke.Utils.GT(a,i+r)||Ke.Utils.LT(a,Math.abs(i-r)))return n;if(o.x/=a,o.y/=a,Ke.Utils.EQ(a,i+r)||Ke.Utils.EQ(a,Math.abs(i-r)))return s=t.pc.translate(i*o.x,i*o.y),n.push(s),n;let A=i*i/(2*a)-r*r/(2*a)+a/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return s=c.translate(o.rotate90CCW().multiply(l)),n.push(s),s=c.translate(o.rotate90CW().multiply(l)),n.push(s),n}function EEt(t,e){let n=[];if(t.pc.equalTo(e.pc)&&Ke.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new Ke.Circle(t.pc,t.r),i=new Ke.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)&&s.on(e)&&n.push(s);return n}function gbe(t,e){let n=[];if(e.pc.equalTo(t.pc)&&Ke.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=xEt(e,new Ke.Circle(t.pc,t.r));for(let i of o)i.on(t)&&n.push(i);return n}function BEt(t,e){return t.isSegment?hAe(t.shape,e):RL(e,t.shape)}function bEt(t,e){return t.isSegment?RL(t.shape,e):EEt(t.shape,e)}function SEt(t,e){return t.isSegment?GJ(t.shape,e):dAe(e,t.shape)}function xAo(t,e){return t.isSegment?pAe(t.shape,e):gbe(t.shape,e)}function dbe(t,e){let n=[];for(let o of e.edges)for(let i of BEt(o,t))n.push(i);return n}function hbe(t,e){let n=[];for(let o of e.edges)for(let i of bEt(o,t))n.push(i);return n}function YJ(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of SEt(o,t))PEt(i,n)||n.push(i);return t.sortPoints(n)}function QEt(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of xAo(o,t))n.push(i);return n}function vEt(t,e){return t.isSegment?BEt(e,t.shape):t.isArc?bEt(e,t.shape):t.isLine?SEt(e,t.shape):t.isRay?(n=e,o=t.shape,n.isSegment?pbe(o,n.shape):mbe(o,n.shape)):[];var n,o}function wEt(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...vEt(t,i)];return n}function PEt(t,e){return e.some(n=>n.equalTo(t))}function pv(t){return new Ke.Line(t.start,t.norm)}function pbe(t,e){return GJ(e,pv(t)).filter(n=>t.contains(n))}function mbe(t,e){return dAe(pv(t),e).filter(n=>t.contains(n))}function MEt(t,e){return sN(pv(t),e).filter(n=>t.contains(n))}function DEt(t,e){return DL(pv(t),e).filter(n=>t.contains(n))}function NEt(t,e){return YJ(pv(t),e).filter(n=>t.contains(n))}function REt(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw ud.UNSUPPORTED_SHAPE_TYPE}function TL(t,e){let n=[];for(let o of e)n=[...n,...REt(t,o.shape)];return n}var aN=class $te extends ube{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,i=s=>s instanceof Ke.Segment||s instanceof Ke.Arc||s instanceof Ke.Ray,r=s=>s instanceof Ke.Segment||s instanceof Ke.Arc;if(!(o===1&&(s=>s instanceof Ke.Segment||s instanceof Ke.Arc||s instanceof Ke.Ray||s instanceof Ke.Line)(n[0])||o>1&&i(n[0])&&i(n[o-1])&&n.slice(1,o-1).every(r)))throw Ke.Errors.ILLEGAL_PARAMETERS;this.isInfinite=n.some(s=>s instanceof Ke.Ray||s instanceof Ke.Line);for(let s of n){let a=new Ke.Edge(s);this.append(a)}this.setArcLength()}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new Ke.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new $te(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ke.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Ke.Point){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Line){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Circle){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Segment){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Arc){const[n,o]=Ke.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ke.Box){const[n,o]=Ke.Distance.shape2multiline(new Ke.Polygon(e),this);return[n,o.reverse()]}if(e instanceof Ke.Multiline)return Ke.Distance.multiline2multiline(this,e);throw Ke.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ke.Multiline?(function(n,o){let i=[];for(let r of n)for(let s of o)i=[...i,...REt(r.shape,s.shape)];return i})(this,e):TL(e,this)}contains(e){if(e instanceof Ke.Point)return this.edges.some(n=>n.shape.contains(e));throw Ke.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new $te(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new Ke.Point){return new $te(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new Ke.Matrix){return new $te(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
<path ${rN({fill:"none",...e})} d="`;n+=`
M${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`" >
</path>`,n}};Ke.Multiline=aN;function kL(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;r=i[0]===null?0:i[1]===null?t.shape.length:i[0].length;let s,a=0;iN(r,0)&&(a|=1),iN(r,t.shape.length)&&(a|=2),s=r===1/0?i[0].coord(e):2&a&&t.next&&t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:s,edge_before:t,edge_after:void 0,face:t.face,is_vertex:a})}function UJ(t){t.int_points1_sorted=mv(t.int_points1),t.int_points2_sorted=mv(t.int_points2)}function mv(t){let e=new Map,n=0;for(let o of t)e.has(o.face)||(e.set(o.face,n),n++);for(let o of t)o.faceId=e.get(o.face);return t.slice().sort(EAo)}function EAo(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function _be(t){if(t.int_points1.length<2)return;let e,n,o,i,r=!1;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){e=t.int_points1_sorted[s],n=t.int_points2[e.id];for(let a=s+1;a<t.int_points1_sorted.length&&(o=t.int_points1_sorted[a],iN(o.arc_length,e.arc_length));a++)o.id!==-1&&(i=t.int_points2[o.id],i.id!==-1&&o.edge_before===e.edge_before&&o.edge_after===e.edge_after&&i.edge_before===n.edge_before&&i.edge_after===n.edge_after&&(o.id=-1,i.id=-1,r=!0))}n=t.int_points2_sorted[0],e=t.int_points1[n.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(n.id===-1||!iN(a.arc_length,n.arc_length)){n=a,e=t.int_points1[n.id];continue}let A=t.int_points1[a.id];A.edge_before===e.edge_before&&A.edge_after===e.edge_after&&a.edge_before===n.edge_before&&a.edge_after===n.edge_after&&(A.id=-1,a.id=-1,r=!0)}r&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function fbe(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=2),e.edge_after&&(e.edge_after.bvStart=2)}function Ibe(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function FL(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&o.face===n&&(i=t[s],i.pt.equalTo(o.pt)&&i.edge_before===o.edge_before&&i.edge_after===o.edge_after);s++)r++;return r}function LL(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=0,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=1),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=2),1&n.is_vertex){n.edge_before=o.prev,o.prev&&(n.is_vertex=2);continue}if(2&n.is_vertex)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof aN&&1&n.is_vertex&&(n.edge_after=t.first)}}function TEt(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}Ke.multiline=(...t)=>new Ke.Multiline(...t);var{INSIDE:f7,OUTSIDE:I7,BOUNDARY:$f,OVERLAP_SAME:BAo,OVERLAP_OPPOSITE:bAo}=gAe,{NOT_VERTEX:Yhr,START_VERTEX:kEt,END_VERTEX:FEt}=gAe;function Cbe(t,e){let n=e.clone().reverse(),[o]=KJ(t,n,3,!0);return o}function LEt(t,e){let[n]=KJ(t,e,2,!0);return n}function HEt(t,e){let[n,o]=KJ(t,e,2,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=>a.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=>a.shape)];return[i,r]}function ybe(t,e){let[n]=KJ(t,e,3,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=>r.shape)];return o}function OEt(t,e){let n=t.clone(),o=e.clone(),i=GEt(n,o);return UJ(i),LL(n,i.int_points1_sorted),LL(o,i.int_points2_sorted),_be(i),UJ(i),[i.int_points1_sorted.map(r=>r.pt),i.int_points2_sorted.map(r=>r.pt)]}function SAo(t,e,n,o){let i=YEt(t,n.int_points1),r=YEt(e,n.int_points2);for(UEt(i,e),UEt(r,t),fbe(n.int_points1),fbe(n.int_points2),Ibe(n.int_points1,e),Ibe(n.int_points2,t);QAo(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););(function(s){let a,A,c,l=s.int_points1.length;for(let u=0;u<l;u++){let g=s.int_points1_sorted[u];g.face!==a&&(A=u,a=g.face);let h,d=u,p=FL(s.int_points1_sorted,u,a);h=d+p<l&&s.int_points1_sorted[d+p].face===a?d+p:A;let m=FL(s.int_points1_sorted,h,a);c=null;for(let E=h;E<h+m;E++){let B=s.int_points1_sorted[E];if(B.face===a&&s.int_points2[B.id].face===s.int_points2[g.id].face){c=B;break}}if(c===null)continue;let _=g.edge_after,f=c.edge_before;if(_.bv!==2||f.bv!==2||_!==f)continue;let I=s.int_points2[g.id],C=s.int_points2[c.id],y=I.edge_after,x=C.edge_before;y.bv===2&&x.bv===2&&y===x||(I=s.int_points2[c.id],C=s.int_points2[g.id],y=I.edge_after,x=C.edge_before),y.bv===2&&x.bv===2&&y===x&&_.setOverlap(y)}})(n),xbe(t,o,n.int_points1_sorted,!0),xbe(e,o,n.int_points2_sorted,!1),KEt(t,i,o,!0),KEt(e,r,o,!1)}function KJ(t,e,n,o){let i=t.clone(),r=e.clone(),s=GEt(i,r);return UJ(s),LL(i,s.int_points1_sorted),LL(r,s.int_points2_sorted),_be(s),UJ(s),SAo(i,r,s,n),o&&(function(a,A,c){(function(l,u,g,h){for(let d of u.faces){for(let p of d)l.edges.add(p);h.find(p=>p.face===d)===void 0&&l.addFace(d.first,d.last)}})(a,A,0,c.int_points2),(function(l,u,g){if(g.int_points1.length!==0)for(let h=0;h<g.int_points1.length;h++){let d=g.int_points1[h],p=g.int_points2[h];if(d.edge_before!==void 0&&d.edge_after===void 0&&p.edge_before===void 0&&p.edge_after!==void 0&&(d.edge_before.next=p.edge_after,p.edge_after.prev=d.edge_before,d.edge_after=p.edge_after,p.edge_before=d.edge_before),p.edge_before!==void 0&&p.edge_after===void 0&&d.edge_before===void 0&&d.edge_after!==void 0&&(p.edge_before.next=d.edge_after,d.edge_after.prev=p.edge_before,p.edge_after=d.edge_after,d.edge_before=p.edge_before),d.edge_before!==void 0&&d.edge_after===void 0)for(let m of g.int_points1_sorted)m!==d&&m.edge_before===void 0&&m.edge_after!==void 0&&m.pt.equalTo(d.pt)&&(d.edge_before.next=m.edge_after,m.edge_after.prev=d.edge_before,d.edge_after=m.edge_after,m.edge_before=d.edge_before);if(p.edge_before!==void 0&&p.edge_after===void 0)for(let m of g.int_points2_sorted)m!==p&&m.edge_before===void 0&&m.edge_after!==void 0&&m.pt.equalTo(p.pt)&&(p.edge_before.next=m.edge_after,m.edge_after.prev=p.edge_before,p.edge_after=m.edge_after,m.edge_before=p.edge_before)}})(0,0,c),Ebe(a,c.int_points1),Ebe(A,c.int_points2),Bbe(a,c.int_points1,c.int_points2),Bbe(a,c.int_points2,c.int_points1),VEt(a),VEt(A)})(i,r,s),[i,r]}function GEt(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)kL(o,a,n.int_points1),kL(r,a,n.int_points2)}}return n}function YEt(t,e){let n=[];for(let o of t.faces)e.find(i=>i.face===o)||n.push(o);return n}function UEt(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function QAo(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u<c;u++){let g=o[u];g.face!==s&&(a=u,s=g.face);let h,d=u,p=FL(o,u,s);h=d+p<c&&o[d+p].face===s?d+p:a;let m=FL(o,h,s);A=null;for(let I=h;I<h+m;I++){let C=o[I];if(C.face===s&&i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv!==$f||f.bv==$f)if(_.bv==$f||f.bv!==$f){if(_.bv===$f&&f.bv===$f&&_!=f||_.bv===f7&&f.bv===I7||_.bv===I7&&f.bv===f7){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===$f&&f.bv===$f&&_!=f){let I,C=_.next;for(;C!=f;){if(C.bv!=$f){if(I===void 0)I=C.bv;else if(C.bv!=I)throw ud.UNRESOLVED_BOUNDARY_CONFLICT}C=C.next}I!=null&&(_.bv=I,f.bv=I);continue}if(_.bv===f7&&f.bv===I7||_.bv===I7&&f.bv===f7){let I=_;for(;I!=f;){if(I.bvStart===_.bv&&I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C<10*Ke.DP_TOL){kL(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex&kEt)x.edge_after=I,x.edge_before=I.prev,I.bvStart=$f,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex&FEt)x.edge_after=I.next,I.bvEnd=$f,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=$f,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);kL(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex&kEt)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex&FEt)B.edge_after=E.next;else{let S=i.find(w=>w.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S&&(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=$f,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=$f,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}UJ(r),l=!0;break}}I=I.next}if(l)break;throw ud.UNRESOLVED_BOUNDARY_CONFLICT}}else f.bv=_.bv;else _.bv=f.bv}return l}function xbe(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A<n.length;A++){if(s=n[A],s.face!==i&&(r=A,i=s.face),i.isEmpty())continue;let c,l=A,u=FL(n,A,i);c=l+u<n.length&&n[l+u].face===s.face?l+u:r,a=n[c];let g=c,h=FL(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===f7&&p.bv===f7&&e===1||d.bv===I7&&p.bv===I7&&e===2||(d.bv===I7||p.bv===I7)&&e===3&&!o||(d.bv===f7||p.bv===f7)&&e===3&&o||d.bv===$f&&p.bv===$f&&d.overlap&BAo&&o||d.bv===$f&&p.bv===$f&&d.overlap&bAo){t.removeChain(i,d,p);for(let m=l;m<l+u;m++)n[m].edge_after=void 0;for(let m=g;m<g+h;m++)n[m].edge_before=void 0}A+=u-1}}function Ebe(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function Bbe(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{ube.testInfiniteLoop(i)}catch{throw ud.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function KEt(t,e,n,o){for(let i of e){let r=i.first.bv;(n===1&&r===f7||n===3&&r===f7&&o||n===3&&r===I7&&!o||n===2&&r===I7)&&t.deleteFace(i)}}function VEt(t){const e=[];for(const n of t.edges)n.face&&t.faces.has(n.face)||e.push(n);for(const n of e)t.edges.delete(n)}var vAo=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:2,BOOLEAN_SUBTRACT:3,BOOLEAN_UNION:1,calculateIntersections:OEt,innerClip:HEt,intersect:LEt,outerClip:ybe,removeNotRelevantChains:xbe,removeOldFaces:Ebe,restoreFaces:Bbe,subtract:Cbe,unify:function(t,e){let[n]=KJ(t,e,1,!0);return n}}),wAo=RegExp("T.F..FFF.|T.F...F.."),PAo=RegExp("T........|.T.......|...T.....|....T...."),MAo=RegExp("FT.......|F..T.....|F...T...."),DAo=RegExp("T.F..F..."),NAo=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF..."),HL=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=>t instanceof Array&&t.length>0?"T":t instanceof Array&&t.length===0?"F":"*").join("")}equal(){return wAo.test(this.toString())}intersect(){return PAo.test(this.toString())}touch(){return MAo.test(this.toString())}inside(){return DAo.test(this.toString())}covered(){return NAo.test(this.toString())}};function VJ(t,e){let n,o=new Ke.Ray(e),i=new Ke.Line(o.pt,o.norm);const r=new Ke.Box(o.box.xmin-Ke.DP_TOL,o.box.ymin-Ke.DP_TOL,o.box.xmax+Ke.DP_TOL,o.box.ymax+Ke.DP_TOL);if(t.box.not_intersect(r))return Ke.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ke.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ke.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ke.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=>fEt(l.pt.x,u.pt.x)?-1:_Et(l.pt.x,u.pt.x)?1:l.face_index<u.face_index?-1:l.face_index>u.face_index?1:l.edge.arc_length<u.edge.arc_length?-1:l.edge.arc_length>u.edge.arc_length?1:0);let c=0;for(let l=0;l<A.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;lbe(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;lbe(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.edge.shape instanceof Ke.Segment)c++;else{let g=u.edge.shape.box;iN(u.pt.y,g.ymin)||iN(u.pt.y,g.ymax)||c++}}return n=c%2==1?1:0,n}function zEt(t,e){return OL(t,e).intersect()}function JEt(t,e){return OL(t,e).inside()}function WEt(t,e){return OL(t,e).covered()}function jEt(t,e){return WEt(e,t)}function OL(t,e){return t instanceof Ke.Line&&e instanceof Ke.Line?(function(n,o){let i=new HL,r=DL(n,o);return r.length===0?n.contains(o.pt)&&o.contains(n.pt)?(i.I2I=[n],i.I2E=[],i.E2I=[]):(i.I2I=[],i.I2E=[n],i.E2I=[o]):(i.I2I=r,i.I2E=n.split(r),i.E2I=o.split(r)),i})(t,e):t instanceof Ke.Line&&e instanceof Ke.Circle?(function(n,o){let i=new HL,r=sN(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new aN([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ke.Polygon([o.toArc()]).cutWithLine(n)}return i})(t,e):t instanceof Ke.Line&&e instanceof Ke.Box?(function(n,o){let i=new HL,r=NL(n,o);if(r.length===0)i.I2I=[],i.I2B=[],i.I2E=[n],i.E2I=[o];else if(r.length===1)i.I2I=[],i.I2B=r,i.I2E=n.split(r),i.E2I=[o];else{let s=new aN([n]),a=n.sortPoints(r);s.split(a);let A=s.toShapes();o.toSegments().some(c=>c.contains(r[0])&&c.contains(r[1]))?(i.I2I=[],i.I2B=[A[1]],i.I2E=[A[0],A[2]],i.E2I=[o]):(i.I2I=[A[1]],i.I2B=a,i.I2E=[A[0],A[2]],i.E2I=new Ke.Polygon(o.toSegments()).cutWithLine(n))}return i})(t,e):t instanceof Ke.Line&&e instanceof Ke.Polygon?(function(n,o){let i=new HL,r=YJ(n,o),s=new aN([n]),a=r.length>0?r.slice():n.sortPoints(r);return s.split(a),[...s].forEach(A=>A.setInclusion(o)),i.I2I=[...s].filter(A=>A.bv===Ke.INSIDE).map(A=>A.shape),i.I2B=[...s].slice(1).map(A=>A.bv===Ke.BOUNDARY?A.shape:A.shape.start),i.I2E=[...s].filter(A=>A.bv===Ke.OUTSIDE).map(A=>A.shape),i.E2I=o.cutWithLine(n),i})(t,e):(t instanceof Ke.Segment||t instanceof Ke.Arc)&&e instanceof Ke.Polygon?$Et(t,e):(t instanceof Ke.Segment||t instanceof Ke.Arc)&&(e instanceof Ke.Circle||e instanceof Ke.Box)?$Et(t,new Ke.Polygon(e)):t instanceof Ke.Polygon&&e instanceof Ke.Polygon?mAe(t,e):(t instanceof Ke.Circle||t instanceof Ke.Box)&&(e instanceof Ke.Circle||e instanceof Ke.Box)?mAe(new Ke.Polygon(t),new Ke.Polygon(e)):(t instanceof Ke.Circle||t instanceof Ke.Box)&&e instanceof Ke.Polygon?mAe(new Ke.Polygon(t),e):t instanceof Ke.Polygon&&(e instanceof Ke.Circle||e instanceof Ke.Box)?mAe(t,new Ke.Polygon(e)):void 0}function $Et(t,e){let n=new HL,o=(function(s,a){return s instanceof Ke.Line?YJ(s,a):s instanceof Ke.Segment?dbe(s,a):s instanceof Ke.Arc?hbe(s,a):[]})(t,e),i=o.length>0?o.slice():t.sortPoints(o),r=new aN([t]);r.split(i),[...r].forEach(s=>s.setInclusion(e)),n.I2I=[...r].filter(s=>s.bv===Ke.INSIDE).map(s=>s.shape),n.I2B=[...r].slice(1).map(s=>s.bv===Ke.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=>s.bv===Ke.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(VJ(e,s)){case Ke.INSIDE:n.B2I.push(s);break;case Ke.BOUNDARY:n.B2B.push(s);break;case Ke.OUTSIDE:n.B2E.push(s)}return n}function mAe(t,e){let n=new HL,[o,i]=OEt(t,e),r=LEt(t,e),s=Cbe(t,e),a=Cbe(e,t),[A,c]=HEt(t,e),l=ybe(t,e),u=ybe(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var RAo=Object.freeze({__proto__:null,contain:function(t,e){return JEt(e,t)},cover:jEt,covered:WEt,disjoint:function(t,e){return!zEt(t,e)},equal:function(t,e){return OL(t,e).equal()},inside:JEt,intersect:zEt,relate:OL,touch:function(t,e){return OL(t,e).touch()}}),zJ=class kk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new kk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new kk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new kk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length!=1||isNaN(e[0].x)||isNaN(e[0].y)){if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw ud.ILLEGAL_PARAMETERS;n=e[0],o=e[1]}else n=e[0].x,o=e[0].y;return this.multiply(new kk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new kk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new kk(e,0,0,n,0,0))}equalTo(e){return!!Ke.Utils.EQ(this.tx,e.tx)&&!!Ke.Utils.EQ(this.ty,e.ty)&&!!Ke.Utils.EQ(this.a,e.a)&&!!Ke.Utils.EQ(this.b,e.b)&&!!Ke.Utils.EQ(this.c,e.c)&&!!Ke.Utils.EQ(this.d,e.d)}};Ke.Matrix=zJ,Ke.matrix=(...t)=>new Ke.Matrix(...t);var TAo=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low<t.low||this.low===t.low&&this.high<t.high}equal_to(t){return this.low===t.low&&this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high<t.low||t.high<this.low}merge(t){const e=this.low===void 0?t.low:this.low<t.low?this.low:t.low,n=this.high===void 0?t.high:this.high>t.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t<e}},kAo=class d5n extends TAo{clone(){return new d5n(this.low,this.high)}},_v=class{constructor(t,e,n=null,o=null,i=null,r=0){if(this.left=n,this.right=o,this.parent=i,this.color=r,this.item={key:void 0,values:[]},e!==void 0&&this.item.values.push(e),t!==void 0)if(Array.isArray(t)){const[s,a]=t;if(!Number.isNaN(s)&&!Number.isNaN(a)){let A=s,c=a;A>c&&([A,c]=[c,A]),this.item.key=new kAo(A,c)}}else this.item.key=t;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===0}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(t){const e=this.requireKey(),n=t.requireKey();return e.less_than(n)}_value_equal(t){const e=this.item.values[0],n=t.item.values[0];return e&&n&&e.equal_to?e.equal_to(n):e===n}equal_to(t){const e=this.requireKey(),n=t.requireKey();return e.equal_to(n)}intersect(t){const e=this.requireKey(),n=t.requireKey();return e.intersect(n)}copy_data(t){this.item.key=t.item.key,this.item.values=t.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(t){if(!this.left)return!0;const e=this.left.max?this.left.max.high:this.left.item.key.high,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(e,o.low)}not_intersect_right_subtree(t){if(!this.right)return!0;const e=this.right.max?this.right.max.low:this.right.item.key.low,n=this.requireKey(),o=t.requireKey();return n.comparable_less_than(o.high,e)}},bbe=class h5n{constructor(){this.root=null,this.nil_node=new _v}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new _v(e));if(o)return o.item.values.push(n),o;const i=new _v(e,n,this.nil_node,this.nil_node,null,1);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new _v(e));return!!o&&(arguments.length<2||n===e||o.item.values.some(i=>i&&i.equal_to?i.equal_to(n):i===n))}remove(e,n=e){const o=this.tree_search(this.root,new _v(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=>r&&r.equal_to?r.equal_to(n):r===n);return i>=0?(o.item.values.splice(i,1),o.item.values.length===0&&this.tree_delete(o),o):void 0}search(e,n=(o,i)=>o===i?i.output():o){const o=new _v(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new _v(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new h5n;return this.tree_walk(this.root,o=>{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=>o===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new _v(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,n=e.less_than(n)?n.left:n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===1;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===1?(n.parent.color=0,o.color=0,n.parent.parent.color=1,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=0,n.parent.parent.color=1,this.rotate_left(n.parent.parent)));this.root.color=0}tree_delete(e){let n,o;n=e.left===this.nil_node||e.right===this.nil_node?e:this.tree_successor(e),o=n.left!==this.nil_node?n.left:n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===0&&this.delete_fixup(o)}delete_fixup(e){let n,o=e;for(;o!==this.root&&o.parent!=null&&o.color===0;)o===o.parent.left?(n=o.parent.right,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_left(o.parent),n=o.parent.right),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.right.color===0&&(n.color=1,n.left.color=0,this.rotate_right(n),n=o.parent.right),n.color=o.parent.color,o.parent.color=0,n.right.color=0,this.rotate_left(o.parent),o=this.root)):(n=o.parent.left,n.color===1&&(n.color=0,o.parent.color=1,this.rotate_right(o.parent),n=o.parent.left),n.left.color===0&&n.right.color===0?(n.color=1,o=o.parent):(n.left.color===0&&(n.color=1,n.right.color=0,this.rotate_left(n),n=o.parent.left),n.color=o.parent.color,o.parent.color=0,n.left.color=0,this.rotate_right(o.parent),o=this.root));o.color=0}tree_search(e,n){if(e!=null&&e!==this.nil_node)return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i&&i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:(o&&!i.less_than(o)||(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right===this.nil_node||e.not_intersect_right_subtree(n)||this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left===this.nil_node||e.not_intersect_left_subtree(n)||(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),o||e.right===this.nil_node||e.not_intersect_right_subtree(n)||(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null&&i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===1&&(n.left.color===0&&n.right.color===0||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===0&&n++,o=e.left!==this.nil_node?this.testBlackHeightProperty(e.left):1,i=e.right!==this.nil_node?this.testBlackHeightProperty(e.right):1,o!==i)throw new Error("Red-black height property violated");return n+=o,n}},FAo=class extends Set{constructor(t){super(t),this.index=new bbe,this.forEach(e=>this.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,i=n||t.box,r=o||t;return super.add(r),this.size>e&&this.index.insert(i,r),this}delete(t){const{key:e,value:n}=t,o=e||t.box,i=n||t;let r=super.delete(i);return r&&this.index.remove(o,i),r}clear(){super.clear(),this.index=new bbe}search(t){return this.index.search(t)}hit(t){let e=new Ke.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(n=>t.on(n))}svg(){return[...this].reduce((t,e)=>t+e.svg(),"")}};Ke.PlanarSet=FAo;var fv=class{get name(){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new zJ().translate(...t))}rotate(t,e=new Ke.Point){return this.transform(new zJ().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new zJ().scale(t,e))}transform(...t){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw ud.CANNOT_INVOKE_ABSTRACT_METHOD}};Ke.Point=class p5n extends fv{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number")return this.x=n[0],void(this.y=n[1])}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];return this.x=n,void(this.y=o)}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1]);throw ud.ILLEGAL_PARAMETERS}}get box(){return new Ke.Box(this.x,this.y,this.x,this.y)}clone(){return new Ke.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ke.Utils.EQ(this.x,e.x)&&Ke.Utils.EQ(this.y,e.y)}lessThan(e){return!!Ke.Utils.LT(this.y,e.y)||!(!Ke.Utils.EQ(this.y,e.y)||!Ke.Utils.LT(this.x,e.x))}transform(e){return new Ke.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ke.Vector(this,e.pt);if(Ke.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ke.Vector(e.pt,this);return Ke.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof p5n){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ke.Segment(this,e)]}return e instanceof Ke.Line?Ke.Distance.point2line(this,e):e instanceof Ke.Circle?Ke.Distance.point2circle(this,e):e instanceof Ke.Segment?Ke.Distance.point2segment(this,e):e instanceof Ke.Arc?Ke.Distance.point2arc(this,e):e instanceof Ke.Box?Ke.Distance.point2polygon(this,new Ke.Polygon(e)):e instanceof Ke.Polygon?Ke.Distance.point2polygon(this,e):e instanceof Ke.PlanarSet?Ke.Distance.shape2planarSet(this,e):e instanceof Ke.Multiline?Ke.Distance.shape2multiline(this,e):void 0}on(e){if(e instanceof Ke.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ke.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
<circle cx="${this.x}" cy="${this.y}" r="${n}"
            ${rN({fill:"red",...e})} />`}};var LAo=(...t)=>new Ke.Point(...t);Ke.point=LAo,Ke.Vector=class extends fv{constructor(...t){if(super(),this.x=0,this.y=0,t.length!==0){if(t.length===1&&t[0]instanceof Array&&t[0].length===2){let e=t[0];if(typeof e[0]=="number"&&typeof e[1]=="number")return this.x=e[0],void(this.y=e[1])}if(t.length===1&&t[0]instanceof Object&&t[0].name==="vector"){let{x:e,y:n}=t[0];return this.x=e,void(this.y=n)}if(t.length===1&&t[0]instanceof Object&&t[0].name==="segment"){let{start:e,end:n}=t[0];return this.x=n.x-e.x,void(this.y=n.y-e.y)}if(t.length===2){let e=t[0],n=t[1];if(typeof e=="number"&&typeof n=="number")return this.x=e,void(this.y=n);if(e instanceof Ke.Point&&n instanceof Ke.Point)return this.x=n.x-e.x,void(this.y=n.y-e.y)}throw ud.ILLEGAL_PARAMETERS}}clone(){return new Ke.Vector(this.x,this.y)}get slope(){let t=Math.atan2(this.y,this.x);return t<0&&(t=2*Math.PI+t),t}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ke.Utils.EQ_0(this.length)}equalTo(t){return Ke.Utils.EQ(this.x,t.x)&&Ke.Utils.EQ(this.y,t.y)}multiply(t){return new Ke.Vector(t*this.x,t*this.y)}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}normalize(){if(this.isZeroLength())throw ud.ZERO_DIVISION;return new Ke.Vector(this.x/this.length,this.y/this.length)}rotate(t,e=new Ke.Point){if(e.x===0&&e.y===0)return this.transform(new zJ().rotate(t));throw ud.OPERATION_IS_NOT_SUPPORTED}transform(t){return new Ke.Vector(t.transform([this.x,this.y]))}rotate90CCW(){return new Ke.Vector(-this.y,this.x)}rotate90CW(){return new Ke.Vector(this.y,-this.x)}invert(){return new Ke.Vector(-this.x,-this.y)}add(t){return new Ke.Vector(this.x+t.x,this.y+t.y)}subtract(t){return new Ke.Vector(this.x-t.x,this.y-t.y)}angleTo(t){let e=this.normalize(),n=t.normalize(),o=Math.atan2(e.cross(n),e.dot(n));return o<0&&(o+=2*Math.PI),o}projectionOn(t){let e=t.normalize(),n=this.dot(e);return e.multiply(n)}get name(){return"vector"}};var qEt=(...t)=>new Ke.Vector(...t);Ke.vector=qEt,Ke.Segment=class fit extends fv{constructor(...e){if(super(),this.ps=new Ke.Point,this.pe=new Ke.Point,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===4){let n=e[0];return this.ps=new Ke.Point(n[0],n[1]),void(this.pe=new Ke.Point(n[2],n[3]))}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{ps:n,pe:o}=e[0];return this.ps=new Ke.Point(n.x,n.y),void(this.pe=new Ke.Point(o.x,o.y))}if(!(e.length===1&&e[0]instanceof Ke.Point)){if(e.length===2&&e[0]instanceof Ke.Point&&e[1]instanceof Ke.Point)return this.ps=e[0].clone(),void(this.pe=e[1].clone());if(e.length===4)return this.ps=new Ke.Point(e[0],e[1]),void(this.pe=new Ke.Point(e[2],e[3]));throw ud.ILLEGAL_PARAMETERS}this.ps=e[0].clone()}}clone(){return new Ke.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ke.Vector(this.start,this.end).slope}get box(){return new Ke.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)&&this.pe.equalTo(e.pe)}contains(e){return Ke.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Line?GJ(this,e):e instanceof Ke.Ray?pbe(e,this):e instanceof Ke.Segment?hAe(this,e):e instanceof Ke.Circle?pAe(this,e):e instanceof Ke.Box?(function(n,o){let i=[];for(let r of o.toSegments()){let s=hAe(r,n);for(let a of s)i.push(a)}return i})(this,e):e instanceof Ke.Arc?RL(this,e):e instanceof Ke.Polygon?dbe(this,e):e instanceof Ke.Multiline?TL(this,e):void 0}distanceTo(e){if(e instanceof Ke.Point){let[n,o]=Ke.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Circle){let[n,o]=Ke.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ke.Line){let[n,o]=Ke.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ke.Segment){let[n,o]=Ke.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ke.Arc){let[n,o]=Ke.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ke.Box){let[n,o]=Ke.Distance.shape2polygon(this,new Ke.Polygon(e));return[n,o]}if(e instanceof Ke.Polygon){let[n,o]=Ke.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ke.PlanarSet){let[n,o]=Ke.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ke.Multiline)return Ke.Distance.shape2multiline(this,e)}tangentInStart(){return new Ke.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ke.Vector(this.end,this.start).normalize()}reverse(){return new fit(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ke.Segment(this.start,e),new Ke.Segment(e,this.end)]}middle(){return new Ke.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e>this.length||e<0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ke.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ke.Distance.point2segment(e,this);return n}definiteIntegral(e=0){return(this.end.x-this.start.x)*(this.start.y-e+(this.end.y-e))/2}transform(e=new Ke.Matrix){return new fit(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ke.Line(this.start,this.end).sortPoints(e)}get name(){return"segment"}svg(e={}){return`
<line x1="${this.start.x}" y1="${this.start.y}" x2="${this.end.x}" y2="${this.end.y}" ${rN(e)} />`}};var HAo=(...t)=>new Ke.Segment(...t);Ke.segment=HAo;var{vector:JJ}=Ke;Ke.Line=class m5n extends fv{constructor(...e){if(super(),this.pt=new Ke.Point,this.norm=new Ke.Vector(0,1),e.length!==0){if(e.length===1&&e[0]instanceof Object&&e[0].name==="line"){let{pt:n,norm:o}=e[0];return this.pt=new Ke.Point(n),void(this.norm=new Ke.Vector(o))}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ke.Point&&o instanceof Ke.Point)return this.pt=n,this.norm=m5n.points2norm(n,o),void(this.norm.dot(JJ(this.pt.x,this.pt.y))>=0&&this.norm.invert());if(n instanceof Ke.Point&&o instanceof Ke.Vector){if(Ke.Utils.EQ_0(o.x)&&Ke.Utils.EQ_0(o.y))throw ud.ILLEGAL_PARAMETERS;return this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(JJ(this.pt.x,this.pt.y))>=0&&this.norm.invert())}if(n instanceof Ke.Vector&&o instanceof Ke.Point){if(Ke.Utils.EQ_0(n.x)&&Ke.Utils.EQ_0(n.y))throw ud.ILLEGAL_PARAMETERS;return this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),void(this.norm.dot(JJ(this.pt.x,this.pt.y))>=0&&this.norm.invert())}}throw ud.ILLEGAL_PARAMETERS}}clone(){return new Ke.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ke.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ke.Vector(this.norm.y,-this.norm.x).slope}get standard(){return[this.norm.x,this.norm.y,this.norm.dot(JJ(this.pt.x,this.pt.y))]}parallelTo(e){return Ke.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)&&this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ke.Vector(this.pt,e);return Ke.Utils.EQ_0(this.norm.dot(n))}coord(e){return JJ(e.x,e.y).cross(this.norm)}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Line?DL(this,e):e instanceof Ke.Ray?DEt(e,this):e instanceof Ke.Circle?sN(this,e):e instanceof Ke.Box?NL(this,e):e instanceof Ke.Segment?GJ(e,this):e instanceof Ke.Arc?dAe(this,e):e instanceof Ke.Polygon?YJ(this,e):e instanceof Ke.Multiline?TL(this,e):void 0}distanceTo(e){if(e instanceof Ke.Point){let[n,o]=Ke.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Circle){let[n,o]=Ke.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Segment){let[n,o]=Ke.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ke.Arc){let[n,o]=Ke.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ke.Box){let[n,o]=Ke.Distance.shape2polygon(this,new Ke.Polygon(e));return[n,o]}if(e instanceof Ke.Polygon){let[n,o]=Ke.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ke.Point)return[new Ke.Ray(e,this.norm),new Ke.Ray(e,this.norm)];{let n=new Ke.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ke.Point){return new Ke.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ke.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=>this.coord(n)<this.coord(o)?-1:this.coord(n)>this.coord(o)?1:0)}get name(){return"line"}svg(e,n={}){let o=NL(this,e);if(o.length===0)return"";let i=o[0],r=o.length===2?o[1]:o.find(s=>!s.equalTo(i));return r===void 0&&(r=i),new Ke.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw ud.ILLEGAL_PARAMETERS;return new Ke.Vector(e,n).normalize().rotate90CCW()}};var OAo=(...t)=>new Ke.Line(...t);Ke.line=OAo,Ke.Circle=class extends fv{constructor(...t){if(super(),this.pc=new Ke.Point,this.r=1,t.length===1&&t[0]instanceof Object&&t[0].name==="circle"){let{pc:e,r:n}=t[0];this.pc=new Ke.Point(e),this.r=n}else{let[e,n]=[...t];e&&e instanceof Ke.Point&&(this.pc=e.clone()),n!==void 0&&(this.r=n)}}clone(){return new Ke.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ke.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(t){return t instanceof Ke.Point?Ke.Utils.LE(t.distanceTo(this.center)[0],this.r):t instanceof Ke.Segment?Ke.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&Ke.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ke.Arc?this.intersect(t).length===0&&Ke.Utils.LE(t.start.distanceTo(this.center)[0],this.r)&&Ke.Utils.LE(t.end.distanceTo(this.center)[0],this.r):t instanceof Ke.Circle?this.intersect(t).length===0&&Ke.Utils.LE(t.r,this.r)&&Ke.Utils.LE(t.center.distanceTo(this.center)[0],this.r):void 0}toArc(t=!0){return new Ke.Arc(this.center,this.r,Math.PI,-Math.PI,t)}scale(t,e){if(t!==e||this.pc.x!==0||this.pc.y!==0)throw ud.OPERATION_IS_NOT_SUPPORTED;return new Ke.Circle(this.pc,this.r*t)}transform(t=new Ke.Matrix){return new Ke.Circle(this.pc.transform(t),this.r)}intersect(t){return t instanceof Ke.Point?this.contains(t)?[t]:[]:t instanceof Ke.Line?sN(t,this):t instanceof Ke.Ray?MEt(t,this):t instanceof Ke.Segment?pAe(t,this):t instanceof Ke.Circle?xEt(t,this):t instanceof Ke.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=pAe(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ke.Arc?gbe(t,this):t instanceof Ke.Polygon?QEt(this,t):t instanceof Ke.Multiline?TL(this,t):void 0}distanceTo(t){if(t instanceof Ke.Point){let[e,n]=Ke.Distance.point2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Circle){let[e,n]=Ke.Distance.circle2circle(this,t);return[e,n]}if(t instanceof Ke.Line){let[e,n]=Ke.Distance.circle2line(this,t);return[e,n]}if(t instanceof Ke.Segment){let[e,n]=Ke.Distance.segment2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Arc){let[e,n]=Ke.Distance.arc2circle(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Box){let[e,n]=Ke.Distance.shape2polygon(this,new Ke.Polygon(t));return[e,n]}if(t instanceof Ke.Polygon){let[e,n]=Ke.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ke.PlanarSet){let[e,n]=Ke.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ke.Multiline){let[e,n]=Ke.Distance.shape2multiline(this,t);return[e,n]}}get name(){return"circle"}svg(t={}){return`
<circle cx="${this.pc.x}" cy="${this.pc.y}" r="${this.r}"
                ${rN({fill:"none",...t})} />`}},Ke.circle=(...t)=>new Ke.Circle(...t),Ke.Arc=class extends fv{constructor(...t){if(super(),this.pc=new Ke.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,t.length!==0)if(t.length===1&&t[0]instanceof Object&&t[0].name==="arc"){let{pc:e,r:n,startAngle:o,endAngle:i,counterClockwise:r}=t[0];this.pc=new Ke.Point(e.x,e.y),this.r=n,this.startAngle=o,this.endAngle=i,this.counterClockwise=r}else{let[e,n,o,i,r]=[...t];e&&e instanceof Ke.Point&&(this.pc=e.clone()),n!==void 0&&(this.r=n),o!==void 0&&(this.startAngle=o),i!==void 0&&(this.endAngle=i),r!==void 0&&(this.counterClockwise=r)}}clone(){return new Ke.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let t=this.startAngle,e=this.endAngle;if(Ke.Utils.EQ(Math.abs(t-e),Ke.PIx2))return Ke.PIx2;Math.abs(t)>Ke.PIx2&&(t-=Math.trunc(t/Ke.PIx2)*Ke.PIx2),t<0&&(t+=Ke.PIx2),Math.abs(e)>Ke.PIx2&&(e-=Math.trunc(e/Ke.PIx2)*Ke.PIx2),e<0&&(e+=Ke.PIx2);let n=this.counterClockwise?e-t:t-e;return n<0&&(n+=Ke.PIx2),n}get start(){return new Ke.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ke.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let t=this.breakToFunctional().reduce((e,n)=>e.merge(n.start.box),new Ke.Box);return t=t.merge(this.end.box),t}contains(t){if(!Ke.Utils.EQ(this.pc.distanceTo(t)[0],this.r))return!1;if(t.equalTo(this.start))return!0;let e=new Ke.Vector(this.pc,t).slope,n=new Ke.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise);return Ke.Utils.LE(n.length,this.length)}split(t){if(this.start.equalTo(t))return[null,this.clone()];if(this.end.equalTo(t))return[this.clone(),null];let e=new Ke.Vector(this.pc,t).slope;return[new Ke.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise),new Ke.Arc(this.pc,this.r,e,this.endAngle,this.counterClockwise)]}middle(){let t=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ke.Arc(this.pc,this.r,this.startAngle,t,this.counterClockwise).end}pointAtLength(t){if(t>this.length||t<0)return null;if(t===0)return this.start;if(t===this.length)return this.end;let e=t/this.length,n=this.counterClockwise?this.startAngle+this.sweep*e:this.startAngle-this.sweep*e;return new Ke.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(t){return t instanceof Ke.Point?this.contains(t)?[t]:[]:t instanceof Ke.Line?dAe(t,this):t instanceof Ke.Ray?mbe(t,this):t instanceof Ke.Circle?gbe(this,t):t instanceof Ke.Segment?RL(t,this):t instanceof Ke.Box?(function(e,n){let o=[];for(let i of n.toSegments()){let r=RL(i,e);for(let s of r)o.push(s)}return o})(this,t):t instanceof Ke.Arc?EEt(this,t):t instanceof Ke.Polygon?hbe(this,t):t instanceof Ke.Multiline?TL(this,t):void 0}distanceTo(t){if(t instanceof Ke.Point){let[e,n]=Ke.Distance.point2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Circle){let[e,n]=Ke.Distance.arc2circle(this,t);return[e,n]}if(t instanceof Ke.Line){let[e,n]=Ke.Distance.arc2line(this,t);return[e,n]}if(t instanceof Ke.Segment){let[e,n]=Ke.Distance.segment2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ke.Arc){let[e,n]=Ke.Distance.arc2arc(this,t);return[e,n]}if(t instanceof Ke.Box){let[e,n]=Ke.Distance.shape2polygon(this,new Ke.Polygon(t));return[e,n]}if(t instanceof Ke.Polygon){let[e,n]=Ke.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ke.PlanarSet){let[e,n]=Ke.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ke.Multiline)return Ke.Distance.shape2multiline(this,t)}breakToFunctional(){let t=[],e=[0,Math.PI/2,Math.PI,3*Math.PI/2],n=this.startAngle,o=this.endAngle;Ke.Utils.EQ(Math.abs(n-o),Ke.PIx2)&&(o=n),Math.abs(n)>Ke.PIx2&&(n-=Math.trunc(n/Ke.PIx2)*Ke.PIx2),n<0&&(n+=Ke.PIx2),Math.abs(o)>Ke.PIx2&&(o-=Math.trunc(o/Ke.PIx2)*Ke.PIx2),o<0&&(o+=Ke.PIx2);let i,r,s,a=n;this.counterClockwise?(r=Math.ceil(n/(Math.PI/2))%4,s=1):(r=Math.floor(n/(Math.PI/2))%4,s=-1);for(let A=0,c=r;A<4;A++,c=(c+s+4)%4){if(i=e[c],i===a)continue;let l=this.counterClockwise?i-n:n-i;if(l<0&&(l+=Ke.PIx2),l>this.sweep)break;t.push(new Ke.Arc(this.pc,this.r,a,i,this.counterClockwise)),a=i}return t.length===0?(t.push(this),t):(i=o,a!==i&&t.push(new Ke.Arc(this.pc,this.r,a,i,this.counterClockwise)),t)}tangentInStart(){let t=new Ke.Vector(this.pc,this.start),e=this.counterClockwise?Math.PI/2:-Math.PI/2;return t.rotate(e).normalize()}tangentInEnd(){let t=new Ke.Vector(this.pc,this.end),e=this.counterClockwise?-Math.PI/2:Math.PI/2;return t.rotate(e).normalize()}reverse(){return new Ke.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(t=new Ke.Matrix){let e=this.start.transform(t),n=this.end.transform(t),o=this.pc.transform(t),i=this.counterClockwise;return t.a*t.d<0&&(i=!i),Ke.Arc.arcSE(o,e,n,i)}static arcSE(t,e,n,o){let{vector:i}=Ke,r=i(t,e).slope,s=i(t,n).slope;Ke.Utils.EQ(r,s)&&(s+=2*Math.PI,o=!0);let a=i(t,e).length;return new Ke.Arc(t,a,r,s,o)}definiteIntegral(t=0){return this.breakToFunctional().reduce((e,n)=>e+n.circularSegmentDefiniteIntegral(t),0)}circularSegmentDefiniteIntegral(t){let e=new Ke.Segment(this.start,this.end).definiteIntegral(t),n=Ke.Utils.EQ(this.sweep,Ke.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?e-n:e+n}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(t){let{vector:e}=Ke;return t.slice().sort((n,o)=>{let i=e(this.pc,n).slope,r=e(this.pc,o).slope;return i<r?-1:i>r?1:0})}get name(){return"arc"}svg(t={}){let e=this.sweep<=Math.PI?"0":"1",n=this.counterClockwise?"1":"0";return Ke.Utils.EQ(this.sweep,2*Math.PI)?new Ke.Circle(this.pc,this.r).svg(t):`
<path d="M${this.start.x},${this.start.y}
                             A${this.r},${this.r} 0 ${e},${n} ${this.end.x},${this.end.y}"
                    ${rN({fill:"none",...t})} />`}},Ke.arc=(...t)=>new Ke.Arc(...t),Ke.Box=class qte extends fv{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new qte(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ke.Point(this.xmin,this.ymin)}get high(){return new Ke.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ke.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax<e.xmin||this.xmin>e.xmax||this.ymax<e.ymin||this.ymin>e.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new qte(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!this.low.lessThan(e.low)||!(!this.low.equalTo(e.low)||!this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)&&this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e<=0?this.clone():new qte(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ke.Point(this.xmin,this.ymin),new Ke.Point(this.xmax,this.ymin),new Ke.Point(this.xmax,this.ymax),new Ke.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ke.Segment(e[0],e[1]),new Ke.Segment(e[1],e[2]),new Ke.Segment(e[2],e[3]),new Ke.Segment(e[3],e[0])]}rotate(e,n=new Ke.Point){throw ud.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ke.Matrix){return this.toPoints().map(n=>n.transform(e)).reduce((n,o)=>n.merge(o.box),new qte)}contains(e){return e instanceof Ke.Point?e.x>=this.xmin&&e.x<=this.xmax&&e.y>=this.ymin&&e.y<=this.ymax:e instanceof Ke.Segment?e.vertices.every(n=>this.contains(n)):e instanceof Ke.Box?e.toSegments().every(n=>this.contains(n)):e instanceof Ke.Circle?this.contains(e.box):e instanceof Ke.Arc?e.vertices.every(n=>this.contains(n))&&this.toSegments().every(n=>RL(n,e).length===0):!(e instanceof Ke.Line||e instanceof Ke.Ray)&&(e instanceof Ke.Multiline?e.toShapes().every(n=>this.contains(n)):e instanceof Ke.Polygon?this.contains(e.box):void 0)}distanceTo(e){const n=this.toSegments().map(i=>i.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=>{i[0]<o[0]&&(o=i)}),o}get name(){return"box"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`
<rect x="${this.xmin}" y="${this.ymin}" width="${n}" height="${o}"
                ${rN({fill:"none",...e})} />`}},Ke.box=(...t)=>new Ke.Box(...t),Ke.Edge=class{constructor(t){this.shape=t,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ke.Segment}get isArc(){return this.shape instanceof Ke.Arc}get isLine(){return this.shape instanceof Ke.Line}get isRay(){return this.shape instanceof Ke.Ray}middle(){return this.shape.middle()}pointAtLength(t){return this.shape.pointAtLength(t)}contains(t){return this.shape.contains(t)}setInclusion(t){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ke.Line||this.shape instanceof Ke.Ray)return this.bv=Ke.OUTSIDE,this.bv;if(this.bvStart===void 0&&(this.bvStart=VJ(t,this.start)),this.bvEnd===void 0&&(this.bvEnd=VJ(t,this.end)),this.bvStart===Ke.OUTSIDE||this.bvEnd==Ke.OUTSIDE)this.bv=Ke.OUTSIDE;else if(this.bvStart===Ke.INSIDE||this.bvEnd==Ke.INSIDE)this.bv=Ke.INSIDE;else{let e=VJ(t,this.middle());this.bv=e}return this.bv}setOverlap(t){let e,n=this.shape,o=t.shape;n instanceof Ke.Segment&&o instanceof Ke.Segment?n.start.equalTo(o.start)&&n.end.equalTo(o.end)?e=Ke.OVERLAP_SAME:n.start.equalTo(o.end)&&n.end.equalTo(o.start)&&(e=Ke.OVERLAP_OPPOSITE):(n instanceof Ke.Arc&&o instanceof Ke.Arc||n instanceof Ke.Segment&&o instanceof Ke.Arc||n instanceof Ke.Arc&&o instanceof Ke.Segment)&&(n.start.equalTo(o.start)&&n.end.equalTo(o.end)&&n.middle().equalTo(o.middle())?e=Ke.OVERLAP_SAME:n.start.equalTo(o.end)&&n.end.equalTo(o.start)&&n.middle().equalTo(o.middle())&&(e=Ke.OVERLAP_OPPOSITE)),this.overlap===void 0&&(this.overlap=e),t.overlap===void 0&&(t.overlap=e)}svg(){if(this.shape instanceof Ke.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ke.Arc){let t,e=this.shape,n=e.counterClockwise?"1":"0";if(Ke.Utils.EQ(e.sweep,2*Math.PI)){let o=e.counterClockwise?1:-1,i=new Ke.Arc(e.pc,e.r,e.startAngle,e.startAngle+o*Math.PI,e.counterClockwise),r=new Ke.Arc(e.pc,e.r,e.startAngle+o*Math.PI,e.endAngle,e.counterClockwise);return t="0",` A${i.r},${i.r} 0 ${t},${n} ${i.end.x},${i.end.y}
                    A${r.r},${r.r} 0 ${t},${n} ${r.end.x},${r.end.y}`}return t=e.sweep<=Math.PI?"0":"1",` A${e.r},${e.r} 0 ${t},${n} ${e.end.x},${e.end.y}`}}toJSON(){return this.shape.toJSON()}};var GAo=class extends ube{constructor(t,e){super(t,e),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let t;return{next:()=>{let e=t||this.first,n=!this.first||!!t&&t===this.first;return t=e?e.next:void 0,{value:e,done:n}}}}append(t){return super.append(t),this.setCircularLinks(),this}insert(t,e){return super.insert(t,e),this.setCircularLinks(),this}remove(t){return super.remove(t),this}};Ke.Face=class Xte extends GAo{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=>i instanceof Ke.Point)){let i=Xte.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=>i instanceof Array&&i.length===2)){let i=o.map(s=>new Ke.Point(s[0],s[1])),r=Xte.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=>i instanceof Ke.Segment||i instanceof Ke.Arc))this.shapes2face(e.edges,o);else if(o.every(i=>i.name==="segment"||i.name==="arc")){let i=[];for(let r of o){let s;s=r.name==="segment"?new Ke.Segment(r):new Ke.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof Xte){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ke.Circle)this.shapes2face(e.edges,[n[0].toArc(hEt)]);else if(n[0]instanceof Ke.Box){let o=n[0];this.shapes2face(e.edges,[new Ke.Segment(new Ke.Point(o.xmin,o.ymin),new Ke.Point(o.xmax,o.ymin)),new Ke.Segment(new Ke.Point(o.xmax,o.ymin),new Ke.Point(o.xmax,o.ymax)),new Ke.Segment(new Ke.Point(o.xmax,o.ymax),new Ke.Point(o.xmin,o.ymax)),new Ke.Segment(new Ke.Point(o.xmin,o.ymax),new Ke.Point(o.xmin,o.ymin))])}}n.length===2&&n[0]instanceof Ke.Edge&&n[1]instanceof Ke.Edge&&(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=>e.shape.start.clone())}get shapes(){return this.edges.map(e=>e.shape.clone())}get box(){if(this._box===void 0){let e=new Ke.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e>this.perimeter||e<0)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o<e.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ke.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ke.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0&&(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ke.Utils.EQ_0(e)?this._orientation=OJ.NOT_ORIENTABLE:Ke.Utils.LT(e,0)?this._orientation=OJ.CCW:this._orientation=OJ.CW}return this._orientation}isSimple(e){return Xte.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ke.Segment&&a.shape instanceof Ke.Segment&&(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if((!c.equalTo(r.start)||!c.equalTo(a.end)||a!==r.prev)&&(!c.equalTo(r.end)||!c.equalTo(a.start)||a!==r.next)&&(i.push(c),o))break;if(i.length>0&&o)break}if(i.length>0&&o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)&&(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ke.Polygon(this.shapes)}toJSON(){return this.edges.map(e=>e.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=" z",e}},Ke.Ray=class _5n extends fv{constructor(...e){if(super(),this.pt=new Ke.Point,this.norm=new Ke.Vector(0,1),e.length!==0&&(e.length>=1&&e[0]instanceof Ke.Point&&(this.pt=e[0].clone()),e.length!==1)){if(!(e.length===2&&e[1]instanceof Ke.Vector))throw ud.ILLEGAL_PARAMETERS;this.norm=e[1].clone()}}clone(){return new _5n(this.pt,this.norm)}get slope(){return new Ke.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ke.Box(e>Math.PI/2&&e<3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e>=0&&e<=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e>=Math.PI/2&&e<=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e>=Math.PI&&e<=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ke.Vector(this.pt,e);return Ke.Utils.EQ_0(this.norm.dot(n))&&Ke.Utils.GE(n.cross(this.norm),0)}coord(e){return qEt(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ke.Segment(this.pt,e),new Ke.Ray(e,this.norm)]:[]}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Segment?pbe(this,e):e instanceof Ke.Arc?mbe(this,e):e instanceof Ke.Line?DEt(this,e):e instanceof Ke.Ray?(o=e,DL(pv(n=this),pv(o)).filter(s=>n.contains(s)).filter(s=>o.contains(s))):e instanceof Ke.Circle?MEt(this,e):e instanceof Ke.Box?(r=e,NL(pv(i=this),r).filter(s=>i.contains(s))):e instanceof Ke.Polygon?NEt(this,e):e instanceof Ke.Multiline?TL(this,e):void 0;var n,o,i,r}rotate(e,n=new Ke.Point){return new Ke.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ke.Ray(this.pt.transform(e),this.norm.clone())}get name(){return"ray"}svg(e,n={}){let o=NL(new Ke.Line(this.pt,this.norm),e);return o=o.filter(i=>this.contains(i)),o.length===0||o.length===2?"":new Ke.Segment(this.pt,o[0]).svg(n)}},Ke.ray=(...t)=>new Ke.Ray(...t);var YAo=class UM{constructor(){this.faces=new Ke.PlanarSet,this.edges=new Ke.PlanarSet;let e=[...arguments];if(e.length===1&&(e[0]instanceof Array&&e[0].length>0||e[0]instanceof Ke.Circle||e[0]instanceof Ke.Box)){let n=e[0];if(e[0]instanceof Array&&e[0].every(o=>o instanceof Array))if(n.every(o=>o instanceof Array&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"))this.faces.add(new Ke.Face(this,n));else for(let o of n)if(o instanceof Array&&o[0]instanceof Array&&o[0].every(i=>i instanceof Array&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"))for(let i of o)this.faces.add(new Ke.Face(this,i));else this.faces.add(new Ke.Face(this,o));else this.faces.add(new Ke.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=>e.merge(n.box),new Ke.Box)}get vertices(){return[...this.faces].flatMap(e=>e.vertices)}clone(){let e=new UM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new UM;return e.forEach(o=>[...o.faces].forEach(i=>n.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=>n+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ke.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next!==n){for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}else this.deleteFace(e)}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ke.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e&&(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const n=this.splitToIslands().flatMap(o=>o._cutSingleIsland(e)).filter(o=>o.isValid()&&o.isEmpty()===!1);return this.createFromArray(n)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i,r,s={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=vEt(a,A);for(let l of c)kL(a,l,s.int_points1),kL(A,l,s.int_points2)}if(s.int_points1.length===0)return n;s.int_points1_sorted=mv(s.int_points1),s.int_points2_sorted=mv(s.int_points2),LL(o,s.int_points1_sorted),LL(n,s.int_points2_sorted),_be(s),s.int_points1_sorted=mv(s.int_points1),s.int_points2_sorted=mv(s.int_points2),fbe(s.int_points1),Ibe(s.int_points1,n);for(let a of s.int_points1_sorted)a.edge_before&&a.edge_after&&a.edge_before.bv===a.edge_after.bv&&(s.int_points2[a.id]=-1,a.id=-1);if(s.int_points1=s.int_points1.filter(a=>a.id>=0),s.int_points2=s.int_points2.filter(a=>a.id>=0),s.int_points1.forEach((a,A)=>{a.id=A}),s.int_points2.forEach((a,A)=>{a.id=A}),s.int_points1.length===0)return n;s.int_points1_sorted=mv(s.int_points1),s.int_points2_sorted=mv(s.int_points2);for(let a=1;a<s.int_points1_sorted.length;a++)if(r=s.int_points1_sorted[a],i=s.int_points1_sorted[a-1],r.edge_before&&r.edge_before.bv===1){let A=i.edge_after,c=r.edge_before,l=o.getChain(A,c);TEt(s.int_points2[i.id],s.int_points2[r.id],l),l.forEach(u=>n.edges.add(u)),l=l.reverse().map(u=>new Ke.Edge(u.shape.reverse()));for(let u=0;u<l.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];TEt(s.int_points2[r.id],s.int_points2[i.id],l),l.forEach(u=>n.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new aN([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=>r.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=>[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=>s.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size<=1)return this.clone();const e=this.splitToIslands(),n=new UM;return e.forEach(o=>{o.faces.forEach(i=>n.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?OJ.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=>{this.isOuter(n)&&e++}),e>1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ke.Point){let n=VJ(this,e);return n===1||n===2}return jEt(this,e)}distanceTo(e){if(e instanceof Ke.Point){let[n,o]=Ke.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Circle||e instanceof Ke.Line||e instanceof Ke.Segment||e instanceof Ke.Arc){let[n,o]=Ke.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ke.Box)return this.distanceTo(new Ke.Polygon(e));if(e instanceof Ke.Polygon){let n,o,i=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let r of this.edges){let s=i[0];[n,o]=Ke.Distance.shape2planarSet(r.shape,e.edges,s),Ke.Utils.LT(n,s)&&(i=[n,o])}return i}}intersect(e){return e instanceof Ke.Point?this.contains(e)?[e]:[]:e instanceof Ke.Line?YJ(e,this):e instanceof Ke.Ray?NEt(e,this):e instanceof Ke.Circle?QEt(e,this):e instanceof Ke.Segment?dbe(e,this):e instanceof Ke.Arc?hbe(e,this):e instanceof Ke.Polygon?(function(n,o){let i=[];if(n.isEmpty()||o.isEmpty()||n.box.not_intersect(o.box))return i;for(let r of n.edges)i=[...i,...wEt(r,o)];return i})(e,this):e instanceof Ke.Multiline?(function(n,o){let i=[];if(o.isEmpty()||n.size===0)return i;for(let r of n)i=[...i,...wEt(r,o)];return i})(e,this):void 0}translate(e){let n=new UM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.translate(e)));return n}rotate(e=0,n=new Ke.Point){let o=new UM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.rotate(e,n)));return o}scale(e,n){let o=new UM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.scale(e,n)));return o}transform(e=new Ke.Matrix){let n=new UM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.transform(e)));return n}toJSON(){return[...this.faces].map(e=>e.toJSON())}toArray(){return[...this.faces].map(e=>e.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=>e+n.svg(),"")}svg(e={}){let n=`
<path ${rN({fillRule:"evenodd",fill:"lightcyan",...e})} d="`;for(let o of this.faces)n+=`
${o.svg()}`;return n+=`" >
</path>`,n}};Ke.Polygon=YAo,Ke.polygon=(...t)=>new Ke.Polygon(...t);var{Circle:Sbe,Line:XEt,Point:ZEt,Vector:_Ae,Utils:Qbe}=Ke;Ke.Inversion=class Jye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new _Ae(e.pc,n),i=e.r*e.r,r=o.dot(o);return Qbe.EQ_0(r)?new ZEt(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(Qbe.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new _Ae(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new XEt(s,r)}{let i=new _Ae(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new Sbe(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(Qbe.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new _Ae(e.pc,i.end);return s=s.multiply(r/o),new Sbe(e.pc.translate(s),r)}}inverse(e){return e instanceof ZEt?Jye.inversePoint(this.circle,e):e instanceof Sbe?Jye.inverseCircle(this.circle,e):e instanceof XEt?Jye.inverseLine(this.circle,e):void 0}},Ke.inversion=t=>new Ke.Inversion(t),Ke.Distance=class kr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ke.Vector(e,o).length,new Ke.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ke.Utils.EQ_0(o))return[n.r,new Ke.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ke.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ke.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return kr.point2point(e,n.start);let o,i,r=new Ke.Vector(n.start,n.end),s=new Ke.Vector(n.start,e),a=new Ke.Vector(n.end,e),A=r.dot(s),c=-r.dot(a);if(Ke.Utils.GE(A,0)&&Ke.Utils.GE(c,0)){let l=n.tangentInStart();return o=Math.abs(l.cross(s)),i=n.start.translate(l.multiply(l.dot(s))),[o,new Ke.Segment(e,i)]}return A<0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o,i,r=new Ke.Circle(n.pc,n.r),s=[];return[o,i]=kr.point2circle(e,r),i.end.on(n)&&s.push(kr.point2circle(e,r)),s.push(kr.point2point(e,n.start)),s.push(kr.point2point(e,n.end)),kr.sort(s),s[0]}static point2edge(e,n){return n.shape instanceof Ke.Segment?kr.point2segment(e,n.shape):kr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let i=[];return i.push(kr.point2line(e.start,n)),i.push(kr.point2line(e.end,n)),kr.sort(i),i[0]}static segment2segment(e,n){let o=hAe(e,n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let i,r,s=[];return[i,r]=kr.point2segment(n.start,e),s.push([i,r.reverse()]),[i,r]=kr.point2segment(n.end,e),s.push([i,r.reverse()]),s.push(kr.point2segment(e.start,n)),s.push(kr.point2segment(e.end,n)),kr.sort(s),s[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Line(e.ps,e.pe),[r,s]=kr.point2line(n.center,i);if(Ke.Utils.GE(r,n.r)&&s.end.on(e))return kr.point2circle(s.end,n);{let[a,A]=kr.point2circle(e.start,n),[c,l]=kr.point2circle(e.end,n);return Ke.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Line(e.ps,e.pe),r=new Ke.Circle(n.pc,n.r),[s,a]=kr.point2line(r.center,i);if(Ke.Utils.GE(s,r.r)&&a.end.on(e)){let[u,g]=kr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A,c,l=[];return l.push(kr.point2arc(e.start,n)),l.push(kr.point2arc(e.end,n)),[A,c]=kr.point2segment(n.start,e),l.push([A,c.reverse()]),[A,c]=kr.point2segment(n.end,e),l.push([A,c.reverse()]),kr.sort(l),l[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return kr.point2point(i.start,r.start)}{let i=new Ke.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(kr.point2point(r[0],s[0])),a.push(kr.point2point(r[0],s[1])),a.push(kr.point2point(r[1],s[0])),a.push(kr.point2point(r[1],s[1])),kr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let[i,r]=kr.point2line(e.center,n),[s,a]=kr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Circle(e.center,e.r),[r,s]=kr.point2line(i.center,n);if(!Ke.Utils.GE(r,i.r)){let a=[];return a.push(kr.point2line(e.start,n)),a.push(kr.point2line(e.end,n)),kr.sort(a),a[0]}{let[a,A]=kr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Circle(e.center,e.r),[r,s]=kr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(kr.point2circle(e.start,n)),a.push(kr.point2circle(e.end,n)),kr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ke.Segment(o[0],o[0])];let i=new Ke.Circle(e.center,e.r),r=new Ke.Circle(n.center,n.r),[s,a]=kr.circle2circle(i,r);if(a.start.on(e)&&a.end.on(n))return[s,a];{let A,c,l=[];return[A,c]=kr.point2arc(e.start,n),c.end.on(n)&&l.push([A,c]),[A,c]=kr.point2arc(e.end,n),c.end.on(n)&&l.push([A,c]),[A,c]=kr.point2arc(n.start,e),c.end.on(e)&&l.push([A,c.reverse()]),[A,c]=kr.point2arc(n.end,e),c.end.on(e)&&l.push([A,c.reverse()]),[A,c]=kr.point2point(e.start,n.start),l.push([A,c]),[A,c]=kr.point2point(e.start,n.end),l.push([A,c]),[A,c]=kr.point2point(e.end,n.start),l.push([A,c]),[A,c]=kr.point2point(e.end,n.end),l.push([A,c]),kr.sort(l),l[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n.edges){let[r,s]=kr.point2edge(e,i);Ke.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ke.Utils.LT(r,o[0])&&(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ke.Utils.LT(s,o[0])&&(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin;return[r,a*a+A*A]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let A of n){[r,s]=kr.box2box_minmax(e.box,A.item.key);for(let c of A.item.values)c instanceof Ke.Edge?i.insert([r,s],c.shape):i.insert([r,s],c);Ke.Utils.LT(s,o)&&(o=s)}if(n.length===0)return o;let a=[...n.map(A=>A.left.isNil()?void 0:A.left).filter(A=>A!==void 0),...n.map(A=>A.right.isNil()?void 0:A.right).filter(A=>A!==void 0)].filter(A=>{let[c,l]=kr.box2box_minmax(e.box,A.max);return Ke.Utils.LE(c,o)});return o=kr.minmax_tree_process_level(e,a,o,i)}static minmax_tree(e,n,o){let i=new bbe,r=[n.index.root],s=o<Number.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=kr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null&&!n.isNil()){if([i,r]=kr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ke.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=kr.distanceToArray(e,n.item.values);return Ke.Utils.LT(s,i[0])&&(i=[s,a]),[i,r]=kr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ke.Segment],r=!1;if(n instanceof Ke.PlanarSet){let s=kr.minmax_tree(e,n,o);[i,r]=kr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=>Ke.Utils.LT(n[0],o[0])?-1:Ke.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ke.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of n){let[r,s]=kr.distance(e,i.shape);Ke.Utils.LT(r,o[0])&&(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ke.Segment];for(let i of e)for(let r of n){let[s,a]=kr.distance(i.shape,r.shape);Ke.Utils.LT(s,o[0])&&(o=[s,a])}return o}};var{Multiline:UAo,Point:e5t,Segment:KAo,Polygon:t5t}=Ke;function vbe(t){return new e5t(t.split(" ").map(Number))}function n5t(t){return t.split(", ").map(vbe)}function wbe(t){const e=n5t(t);let n=[];for(let o=0;o<e.length-1;o++)n.push(new KAo(e[o],e[o+1]));return new UAo(n)}function o5t(t){const e=t.replace(/\(\(/,"").replace(/\)\)$/,"").split("), ("),n=new t5t;let o;return e.forEach((i,r)=>{let s=i.split(", ").map(A=>new e5t(A.split(" ").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o&&a.reverse()}),n}function VAo(t){return t.startsWith("POLYGON")?o5t(t.replace(/^POLYGON /,"")):(function(e){const n=e.split(/\)\), \(\(/).map(i=>"(("+i+"))").map(o5t),o=new t5t;return n.reduce((i,r)=>[...i,...r?.faces],[]).forEach(i=>o.addFace([...i?.shapes])),o})(t.replace(/^MULTIPOLYGON \(\(\((.*)\)\)\)$/,"$1"))}function i5t(t){return t.split(`
`)?.every(e=>e.includes("POINT"))}function r5t(t){return t.split(`
`)?.every(e=>e.includes("LINESTRING"))}function s5t(t,e,n,o){return Math.sqrt((n-t)**2+(o-e)**2)}Ke.isWktString=function(t){return t.startsWith("POINT")||i5t(t)||t.startsWith("LINESTRING")||r5t(t)||t.startsWith("MULTILINESTRING")||t.startsWith("POLYGON")||t.startsWith("MULTIPOINT")||t.startsWith("MULTIPOLYGON")||t.startsWith("GEOMETRYCOLLECTION")},Ke.parseWKT=function t(e){if(e.startsWith("POINT"))return vbe(e.replace(/^POINT \(/,"").replace(/\)$/,""));if(e.startsWith("MULTIPOINT"))return n5t(e.replace(/^MULTIPOINT \(/,"").replace(/\)$/,""));if(e.startsWith("LINESTRING"))return wbe(e.replace(/^LINESTRING \(/,"").replace(/\)$/,""));if(e.startsWith("MULTILINESTRING"))return(function(n){return n.replace(/\(\(/,"").replace(/\)\)$/,"").split("), (").map(wbe)})(e.replace(/^MULTILINESTRING /,""));if(e.startsWith("POLYGON")||e.startsWith("MULTIPOLYGON"))return VAo(e);if(e.startsWith("GEOMETRYCOLLECTION")){const n=/(?<type>POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \((?:[^\(\)]|\([^\)]*\))*\)/g,o=e.match(n);return o[0].startsWith("GEOMETRYCOLLECTION")&&(o[0]=o[0].replace("GEOMETRYCOLLECTION (","")),o.map(t).map(i=>i instanceof Array?i:[i]).reduce((i,r)=>[...i,...r],[])}return i5t(e)?(function(n){return n.split(`
`).map(o=>o.match(/\(([^)]+)\)/)[1]).map(vbe)})(e):r5t(e)?(function(n){return n.split(`
`).map(o=>o.match(/\(([^)]+)\)/)[1]).map(wbe).reduce((o,i)=>[...o,...i],[])})(e):[]},Ke.BooleanOperations=vAo,Ke.Relations=RAo;var zAo=class{buckets;objectsById;getBounds;getId;CELL_SIZE=.4;constructor({objects:t,getBounds:e,getId:n,CELL_SIZE:o}){this.buckets=new Map,this.objectsById=new Map,this.getBounds=e,this.getId=n??(()=>this._getNextId()),this.CELL_SIZE=o??this.CELL_SIZE;for(const i of t)this.addObject(i)}_idCounter=0;_getNextId(){return""+this._idCounter++}addObject(t){const e=this.getBounds(t),n=this.getId(t),o={...t,spatialIndexId:n};this.objectsById.set(n,o);const i=Math.floor(e.minX/this.CELL_SIZE),r=Math.floor(e.minY/this.CELL_SIZE),s=Math.floor(e.maxX/this.CELL_SIZE),a=Math.floor(e.maxY/this.CELL_SIZE);for(let A=i;A<=s;A++)for(let c=r;c<=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l);u?u.push(o):this.buckets.set(l,[o])}}removeObject(t){const e=this.objectsById.get(t);if(!e)return!1;this.objectsById.delete(t);const n=this.getBounds(e),o=Math.floor(n.minX/this.CELL_SIZE),i=Math.floor(n.minY/this.CELL_SIZE),r=Math.floor(n.maxX/this.CELL_SIZE),s=Math.floor(n.maxY/this.CELL_SIZE);for(let a=o;a<=r;a++)for(let A=i;A<=s;A++){const c=`${a}x${A}`,l=this.buckets.get(c);if(l){const u=l.findIndex(g=>g.spatialIndexId===t);u!==-1&&(l.splice(u,1),l.length===0&&this.buckets.delete(c))}}return!0}getBucketKey(t,e){return`${Math.floor(t/this.CELL_SIZE)}x${Math.floor(e/this.CELL_SIZE)}`}getObjectsInBounds(t,e=0){const n=[],o=new Set,i=Math.floor((t.minX-e)/this.CELL_SIZE),r=Math.floor((t.minY-e)/this.CELL_SIZE),s=Math.floor((t.maxX+e)/this.CELL_SIZE),a=Math.floor((t.maxY+e)/this.CELL_SIZE);for(let A=i;A<=s;A++)for(let c=r;c<=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l)||[];for(const g of u){const h=g.spatialIndexId;o.has(h)||(o.add(h),n.push(g))}}return n}},a5t=.1,JAo=.1,WAo=a5t,jAo=a5t,GL=.005;function $Ao(t){return t.type==="pcb_trace_segment"||t.type==="pcb_smtpad"?[t.layer]:t.type==="pcb_plated_hole"?Array.isArray(t.layers)?t.layers:[...lAe]:t.type==="pcb_hole"?[...lAe]:t.type==="pcb_via"?Array.isArray(t.layers)?t.layers:[...lAe]:t.type==="pcb_keepout"&&Array.isArray(t.layers)?t.layers:[]}var A5t=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=e.minX,r=e.minY,s=e.maxX,a=e.maxY;if(n.x===o.x&&n.y===o.y){const B=Math.max(i,Math.min(s,n.x)),S=Math.max(r,Math.min(a,n.y));return B===n.x&&S===n.y?{x:n.x,y:n.y}:{x:B,y:S}}const A=o.x-n.x,c=o.y-n.y,l=A!==0?(i-n.x)/A:Number.NEGATIVE_INFINITY,u=A!==0?(s-n.x)/A:Number.POSITIVE_INFINITY,g=c!==0?(r-n.y)/c:Number.NEGATIVE_INFINITY,h=c!==0?(a-n.y)/c:Number.POSITIVE_INFINITY,d=Math.max(Math.min(l,u),Math.min(g,h)),p=Math.min(Math.max(l,u),Math.max(g,h));if(d<=p&&p>=0&&d<=1){const B=Math.max(0,Math.min(1,d));return{x:n.x+B*A,y:n.y+B*c}}const m={x:Math.max(i,Math.min(s,n.x)),y:Math.max(r,Math.min(a,n.y))},_={x:Math.max(i,Math.min(s,o.x)),y:Math.max(r,Math.min(a,o.y))},f=(m.x-n.x)**2+(m.y-n.y)**2,I=(_.x-o.x)**2+(_.y-o.y)**2,C=[{start:{x:i,y:r},end:{x:s,y:r}},{start:{x:s,y:r},end:{x:s,y:a}},{start:{x:s,y:a},end:{x:i,y:a}},{start:{x:i,y:a},end:{x:i,y:r}}];let y=Math.min(f,I),x=f<=I?m:_;const E=(B,S,Q)=>Math.max(S,Math.min(Q,B));for(const B of C){const S={x:o.x-n.x,y:o.y-n.y},Q={x:B.end.x-B.start.x,y:B.end.y-B.start.y},w={x:n.x-B.start.x,y:n.y-B.start.y},M=S.x*S.x+S.y*S.y,k=S.x*Q.x+S.y*Q.y,R=S.x*w.x+S.y*w.y,F=Q.x*Q.x+Q.y*Q.y,O=Q.x*w.x+Q.y*w.y,U=M*F-k*k;if(Math.abs(U)<1e-10)continue;let Y=(k*O-F*R)/U,W=(M*O-k*R)/U;Y=E(Y,0,1),W=E(W,0,1);const te={x:n.x+Y*S.x,y:n.y+Y*S.y},j={x:B.start.x+W*Q.x,y:B.start.y+W*Q.y},J=te.x-j.x,oe=te.y-j.y,ie=J*J+oe*oe;ie<y&&(y=ie,x={x:(te.x+j.x)/2,y:(te.y+j.y)/2})}return x},qAo=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i={x:e.x1,y:e.y1},r={x:e.x2,y:e.y2},s={x:o.x-n.x,y:o.y-n.y},a={x:r.x-i.x,y:r.y-i.y},A=s.x*s.x+s.y*s.y,c=a.x*a.x+a.y*a.y;if(A===0||c===0){if(A===0&&c===0)return{x:(n.x+i.x)/2,y:(n.y+i.y)/2};if(A===0){const Q=C7(((n.x-i.x)*a.x+(n.y-i.y)*a.y)/c,0,1),w={x:i.x+Q*a.x,y:i.y+Q*a.y};return{x:(n.x+w.x)/2,y:(n.y+w.y)/2}}const B=C7(((i.x-n.x)*s.x+(i.y-n.y)*s.y)/A,0,1),S={x:n.x+B*s.x,y:n.y+B*s.y};return{x:(S.x+i.x)/2,y:(S.y+i.y)/2}}const l=n.x-i.x,u=n.y-i.y,g=s.x*s.x+s.y*s.y,h=s.x*a.x+s.y*a.y,d=s.x*l+s.y*u,p=a.x*a.x+a.y*a.y,m=a.x*l+a.y*u,_=g*p-h*h;if(_<1e-10)return XAo(n,o,i,r,s,a,A,c);let f=(h*m-p*d)/_,I=(g*m-h*d)/_;f=C7(f,0,1),I=C7(I,0,1),I=(f*h+m)/p,I=C7(I,0,1),f=(I*h-d)/g,f=C7(f,0,1);const C=n.x+f*s.x,y=n.y+f*s.y,x=i.x+I*a.x,E=i.y+I*a.y;return{x:(C+x)/2,y:(y+E)/2}},XAo=(t,e,n,o,i,r,s,a)=>{let A=((n.x-t.x)*i.x+(n.y-t.y)*i.y)/s;A=C7(A,0,1);const c={x:t.x+A*i.x,y:t.y+A*i.y};let l=((o.x-t.x)*i.x+(o.y-t.y)*i.y)/s;l=C7(l,0,1);const u={x:t.x+l*i.x,y:t.y+l*i.y};let g=((t.x-n.x)*r.x+(t.y-n.y)*r.y)/a;g=C7(g,0,1);const h={x:n.x+g*r.x,y:n.y+g*r.y};let d=((e.x-n.x)*r.x+(e.y-n.y)*r.y)/a;d=C7(d,0,1);const p={x:n.x+d*r.x,y:n.y+d*r.y},m=[{pointA:c,pointB:n,distance:Math.sqrt((c.x-n.x)**2+(c.y-n.y)**2)},{pointA:u,pointB:o,distance:Math.sqrt((u.x-o.x)**2+(u.y-o.y)**2)},{pointA:t,pointB:h,distance:Math.sqrt((t.x-h.x)**2+(t.y-h.y)**2)},{pointA:e,pointB:p,distance:Math.sqrt((e.x-p.x)**2+(e.y-p.y)**2)}].reduce((_,f)=>f.distance<_.distance?f:_);return{x:(m.pointA.x+m.pointB.x)/2,y:(m.pointA.y+m.pointB.y)/2}},C7=(t,e,n)=>Math.max(e,Math.min(n,t)),WJ=t=>t.type==="pcb_trace_segment"?{minX:Math.min(t.x1,t.x2),minY:Math.min(t.y1,t.y2),maxX:Math.max(t.x1,t.x2),maxY:Math.max(t.y1,t.y2)}:nbe([t]);function ZAo(t){const e=new Set;for(const n of t.route)n.route_type==="wire"&&(n.start_pcb_port_id&&e.add(n.start_pcb_port_id),n.end_pcb_port_id&&e.add(n.end_pcb_port_id));return Array.from(e)}function Pbe(t){const e=new Set;for(const n of t)for(const o of ZAo(n))e.add(o);return Array.from(e)}var eco=t=>{if(t.type==="pcb_via"||t.type==="pcb_plated_hole"&&t.shape==="circle")return t.outer_diameter/2;if(t.type==="pcb_hole"&&t.hole_shape==="circle")return t.hole_diameter/2;if(t.type==="pcb_smtpad"&&t.shape==="circle")return t.radius;throw new Error(`Could not determine radius of element: ${JSON.stringify(t)}`)};function tco(t,{connMap:e,minClearance:n=.1}={}){const o=[];(p=>{const m=p.filter(C=>C.type==="pcb_port"),_=p.filter(C=>C.type==="pcb_smtpad"),f=p.filter(C=>C.type==="pcb_trace");function I(C,y={}){const x=y.traceWidth||0,E=m.find(B=>s5t(B.x,B.y,C.x,C.y)<.01);if(E)return E.pcb_port_id;if(y.isFirstOrLastPoint){const B=_.find(S=>S.shape==="rect"?Math.abs(C.x-S.x)<S.width/2+x/2&&Math.abs(C.y-S.y)<S.height/2+x/2:S.shape==="circle"?s5t(C.x,C.y,S.x,S.y)<S.radius:void 0);if(B)return B.pcb_port_id??null}return null}for(const C of f)for(let y=0;y<C.route.length;y++){const x=C.route[y],E=y===0||y===C.route.length-1;if(x.route_type==="wire"){if(!x.start_pcb_port_id&&y===0){const B=I(x,{isFirstOrLastPoint:E,traceWidth:x.width});B&&(x.start_pcb_port_id=B)}if(!x.end_pcb_port_id&&y===C.route.length-1){const B=I(x,{isFirstOrLastPoint:E,traceWidth:x.width});B&&(x.end_pcb_port_id=B)}}}})(t),e??=l8e(t);const i=nI(t).pcb_trace.list().flatMap(p=>{const m=[];for(let _=0;_<p.route.length-1;_++){const f=p.route[_],I=p.route[_+1];f.route_type==="wire"&&I.route_type==="wire"&&f.layer===I.layer&&m.push({type:"pcb_trace_segment",pcb_trace_id:p.pcb_trace_id,_pcbTrace:p,thickness:"width"in f?f.width:"width"in I?I.width:JAo,layer:f.layer,x1:f.x,y1:f.y,x2:I.x,y2:I.y})}return m}),r=nI(t).pcb_smtpad.list(),s=nI(t).pcb_plated_hole.list(),a=nI(t).pcb_hole.list(),A=nI(t).pcb_via.list(),c=nI(t).pcb_keepout.list(),l=[...i,...r,...s,...a,...A,...c],u=new zAo({objects:l,getBounds:WJ}),g=p=>Ny(t,p),h=(p,m,_)=>_<0?`PCB trace ${p} overlaps with ${m} (accidental contact)`:`PCB trace ${p} is too close to ${m} (gap: ${_.toFixed(3)}mm)`,d=new Set;for(const p of i){const m=n,_=WJ(p),f=u.getObjectsInBounds(_,m+p.thickness/2);if(p.x1!==p.x2||p.y1!==p.y2)for(const I of f){if(!$Ao(I).includes(p.layer))continue;if(I.type==="pcb_trace_segment"){const x=I;if(p.layer!==x.layer||e.areIdsConnected(p.pcb_trace_id,x.pcb_trace_id))continue;const E=M5({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},{x:x.x1,y:x.y1},{x:x.x2,y:x.y2})-p.thickness/2-x.thickness/2;if(E>n-GL)continue;const B=`overlap_${p.pcb_trace_id}_${x.pcb_trace_id}`,S=`overlap_${x.pcb_trace_id}_${p.pcb_trace_id}`;if(d.has(B)||d.has(S))continue;d.add(B),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:h(g(p.pcb_trace_id),g(x.pcb_trace_id),E),pcb_trace_id:p.pcb_trace_id,source_trace_id:"",pcb_trace_error_id:B,pcb_component_ids:[],center:qAo(p,x),pcb_port_ids:Pbe([p._pcbTrace,x._pcbTrace])});continue}const C=gv(I);if(e.areIdsConnected(p.pcb_trace_id,"pcb_trace_id"in I?I.pcb_trace_id:C))continue;if(I.type==="pcb_via"||I.type==="pcb_plated_hole"&&I.shape==="circle"||I.type==="pcb_hole"||I.type==="pcb_smtpad"&&I.shape==="circle"){const x=eco(I),E=Nz({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},{x:I.x,y:I.y,radius:x})-p.thickness/2;if(E>n-GL)continue;const B=`overlap_${p.pcb_trace_id}_${C}`;if(d.has(B))continue;d.add(B),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:h(g(p.pcb_trace_id),`${I.type} "${g(gv(I))}"`,E),pcb_trace_id:p.pcb_trace_id,center:A5t(p,WJ(I)),source_trace_id:"",pcb_trace_error_id:B,pcb_component_ids:["pcb_component_id"in I?I.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...Pbe([p._pcbTrace]),"pcb_port_id"in I?I.pcb_port_id:void 0].filter(Boolean)})}const y=Dz({x:p.x1,y:p.y1},{x:p.x2,y:p.y2},WJ(I))-p.thickness/2;if(y+GL<m){const x=`overlap_${p.pcb_trace_id}_${C}`;if(d.has(x))continue;d.add(x),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:h(g(p.pcb_trace_id),`${I.type} "${g(gv(I))}"`,y),pcb_trace_id:p.pcb_trace_id,source_trace_id:"",pcb_trace_error_id:x,pcb_component_ids:["pcb_component_id"in I?I.pcb_component_id:void 0].filter(Boolean),center:A5t(p,WJ(I)),pcb_port_ids:[...Pbe([p._pcbTrace]),"pcb_port_id"in I?I.pcb_port_id:void 0].filter(Boolean)})}}}return o}function Mbe(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function c5t(t,e){return Mbe(t,e)<=GL}function nco(t,{connMap:e,minClearance:n=WAo}={}){const o=t.filter(s=>s.type==="pcb_via");if(o.length<2)return[];e??=l8e(t);const i=[],r=new Set;for(let s=0;s<o.length;s++)for(let a=s+1;a<o.length;a++){const A=o[s],c=o[a];if(c5t(A,c)||!e.areIdsConnected(A.pcb_via_id,c.pcb_via_id))continue;const l=Mbe(A,c)-A.outer_diameter/2-c.outer_diameter/2;if(l+GL>=n)continue;const u=[A.pcb_via_id,c.pcb_via_id].sort().join("_");r.has(u)||(r.add(u),i.push({type:"pcb_via_clearance_error",pcb_error_id:`same_net_vias_close_${u}`,message:`Vias ${Ny(t,A.pcb_via_id)} and ${Ny(t,c.pcb_via_id)} are too close together (gap: ${l.toFixed(3)}mm)`,error_type:"pcb_via_clearance_error",pcb_via_ids:[A.pcb_via_id,c.pcb_via_id],minimum_clearance:n,actual_clearance:l,pcb_center:{x:(A.x+c.x)/2,y:(A.y+c.y)/2}}))}return i}function oco(t,{connMap:e,minClearance:n=jAo}={}){const o=t.filter(s=>s.type==="pcb_via");if(o.length<2)return[];e??=l8e(t);const i=[],r=new Set;for(let s=0;s<o.length;s++)for(let a=s+1;a<o.length;a++){const A=o[s],c=o[a];if(c5t(A,c)||e.areIdsConnected(A.pcb_via_id,c.pcb_via_id))continue;const l=Mbe(A,c)-A.outer_diameter/2-c.outer_diameter/2;if(l+GL>=n)continue;const u=[A.pcb_via_id,c.pcb_via_id].sort().join("_");r.has(u)||(r.add(u),i.push({type:"pcb_via_clearance_error",pcb_error_id:`different_net_vias_close_${u}`,message:`Vias ${Ny(t,A.pcb_via_id)} and ${Ny(t,c.pcb_via_id)} from different nets are too close together (gap: ${l.toFixed(3)}mm)`,error_type:"pcb_via_clearance_error",pcb_via_ids:[A.pcb_via_id,c.pcb_via_id],minimum_clearance:n,actual_clearance:l,pcb_center:{x:(A.x+c.x)/2,y:(A.y+c.y)/2}}))}return i}var Dbe=t=>({minSpacing:t,minClearance:t}),xx={traceClearance:.1,viaClearance:.1},l5t=t=>(e=>"layer"in e)(t)?[t.layer]:t.layers,O5=(t,e)=>t===0?"top":t===e-1?"bottom":`inner${t}`;function ico(t,e,n){let o,i=Number.POSITIVE_INFINITY;for(const r of e){const s=n.get(r);if(!s)continue;const a=Math.hypot(s.x-t.x,s.y-t.y);a<i&&(i=a,o=r)}return o??e[0]}function rco(t){const e=[],n=new Set,o=new Set,i=(function(r){const s=new Map;for(const a of r.connections)for(const A of a.pointsToConnect)A.pcb_port_id&&s.set(A.pcb_port_id,{x:A.x,y:A.y});return s})(t);for(const r of t.obstacles){const s=r.connectedTo,a=s.find(_=>_.startsWith("pcb_smtpad_")),A=s.find(_=>_.startsWith("pcb_plated_hole_")),c=s.filter(_=>_.startsWith("pcb_port_")),l=ico(r.center,c,i);if(!a&&!A&&!l)continue;const u=r.layers;if(u.length===0)continue;const g=r.width,h=r.height,d=r.center.x,p=r.center.y;if(u.length>1){const _=A??`pcb_plated_hole_${d.toFixed(3)}_${p.toFixed(3)}`;if(o.has(_))continue;if(o.add(_),Math.abs(g-h)<.001){e.push({type:"pcb_plated_hole",pcb_plated_hole_id:_,shape:"circle",outer_diameter:Math.max(g,h),hole_diameter:Math.max(.5*Math.min(g,h),.1),x:d,y:p,layers:u,...l?{pcb_port_id:l}:{}});continue}e.push({type:"pcb_plated_hole",pcb_plated_hole_id:_,shape:"circular_hole_with_rect_pad",hole_shape:"circle",hole_diameter:Math.max(.5*Math.min(g,h),.1),rect_pad_width:g,rect_pad_height:h,hole_offset_x:0,hole_offset_y:0,x:d,y:p,layers:u,...l?{pcb_port_id:l}:{}});continue}const m=a??`pcb_smtpad_${d.toFixed(3)}_${p.toFixed(3)}`;n.has(m)||(n.add(m),e.push({type:"pcb_smtpad",pcb_smtpad_id:m,layer:u[0],shape:"rect",width:g,height:h,x:d,y:p,...l?{pcb_port_id:l}:{}}))}return e}function sco(t,e,n=.1,o=t.minViaDiameter??.3){const i=[];i.push(...(function(s,a){const A=[];return s.connections.forEach(c=>{const l=c.pointsToConnect.filter(p=>p.pcb_port_id).map(p=>p.pcb_port_id).filter(Boolean),u=c.netConnectionName||c.rootConnectionName||c.name,g=[],h=a.find(p=>(p.connection_name??p.connectionName)===c.name);if(h){const p=_=>"route_type"in _&&_.route_type==="jumper"?_.start:"x"in _&&"y"in _?{x:_.x,y:_.y}:{x:0,y:0},m=[p(h.route[0]),p(h.route[h.route.length-1])];for(const _ of m)for(const f of s.obstacles)o7(_,f)<=0&&g.push(f)}const d=A.find(p=>p.type==="source_trace"&&p.source_trace_id===u);if(d){const p=d;p.connected_source_port_ids=[...new Set([...p.connected_source_port_ids,...l])]}else A.push({type:"source_trace",source_trace_id:u,connected_source_port_ids:l.concat(g.flatMap(p=>[`obstacle_${p.center.x.toFixed(3)}_${p.center.y.toFixed(3)}_${p.layers.join(".")}`,...p.connectedTo])),connected_source_net_ids:[]})}),A})(t,e)),i.push(...(function(s){const a=new Map;return s.connections.forEach(A=>{A.pointsToConnect.forEach(c=>{c.pcb_port_id&&a.set(c.pcb_port_id,{type:"pcb_port",pcb_port_id:c.pcb_port_id,source_port_id:c.pcb_port_id,x:c.x,y:c.y,layers:l5t(c)})})}),Array.from(a.values())})(t)),i.push(...rco(t)),i.push(...(function(s,a=.3){const A=[],c=new Set;return s.length>0&&("type"in s[0]&&s[0].type==="pcb_trace"?s.forEach(l=>{l.route.forEach(u=>{if(u.route_type==="via"){const g=u.via_diameter??a,h=`${u.x},${u.y},${u.from_layer},${u.to_layer}`;c.has(h)||(A.push({type:"pcb_via",pcb_via_id:`via_${A.length}`,pcb_trace_id:l.pcb_trace_id,x:u.x,y:u.y,outer_diameter:g,hole_diameter:.5*g,layers:[u.from_layer,u.to_layer]}),c.add(h))}})}):s.forEach((l,u)=>{const g=`trace_${u}`,h=l.viaDiameter??a;for(let d=1;d<l.route.length;d++){const p=l.route[d-1],m=l.route[d];if(p.z!==m.z&&Math.abs(p.x-m.x)<.01&&Math.abs(p.y-m.y)<.01){const _=O5(p.z,2),f=O5(m.z,2),I=`${m.x},${m.y},${_},${f}`;c.has(I)||(A.push({type:"pcb_via",pcb_via_id:`via_${A.length}`,pcb_trace_id:g,x:m.x,y:m.y,outer_diameter:h,hole_diameter:.5*h,layers:[_,f]}),c.add(I))}}})),A})(e,o));const r=new Map;return t.connections.forEach(s=>{r.set(s.name,s.netConnectionName||s.rootConnectionName||s.name)}),e.length>0&&("type"in e[0]&&e[0].type==="pcb_trace"?e.forEach(s=>{const a=s.connection_name;i.push((function(A,c){return{type:"pcb_trace",pcb_trace_id:A.pcb_trace_id,source_trace_id:c,route:A.route.map(l=>l.route_type==="wire"?{route_type:"wire",x:l.x,y:l.y,width:l.width,layer:l.layer,start_pcb_port_id:l.start_pcb_port_id,end_pcb_port_id:l.end_pcb_port_id}:l.route_type==="via"?{route_type:"via",x:l.x,y:l.y,from_layer:l.from_layer,to_layer:l.to_layer}:null).filter(l=>l!==null)}})(s,r.get(a)||a))}):e.forEach((s,a)=>{const A=s.connectionName,c=(function(l,u,g,h=.1){const d=[];if(!l.jumpers||l.jumpers.length===0)return[{type:"pcb_trace",pcb_trace_id:u,source_trace_id:g,route:l.route.map((f,I)=>{const C=I===0,y=I===l.route.length-1;return{route_type:"wire",x:f.x,y:f.y,width:h,layer:O5(f.z,2),...C&&f.pcb_port_id?{start_pcb_port_id:f.pcb_port_id}:{},...y&&f.pcb_port_id?{end_pcb_port_id:f.pcb_port_id}:{}}})}];const p=[];for(const f of l.jumpers){let I=-1,C=-1;for(let y=0;y<l.route.length;y++){const x=l.route[y];Math.abs(x.x-f.start.x)<.01&&Math.abs(x.y-f.start.y)<.01&&(I=y),Math.abs(x.x-f.end.x)<.01&&Math.abs(x.y-f.end.y)<.01&&(C=y)}I!==-1&&C!==-1&&(I>C&&([I,C]=[C,I]),p.push({startIdx:I,endIdx:C}))}p.sort((f,I)=>f.startIdx-I.startIdx);let m=0,_=0;for(const{startIdx:f,endIdx:I}of p){if(f>=m){const C=l.route.slice(m,f+1);C.length>0&&(d.push({type:"pcb_trace",pcb_trace_id:`${u}_${_}`,source_trace_id:g,route:C.map((y,x)=>{const E=x===0&&m===0;return{route_type:"wire",x:y.x,y:y.y,width:h,layer:O5(y.z,2),...E&&y.pcb_port_id?{start_pcb_port_id:y.pcb_port_id}:{}}})}),_++)}m=I}if(m<l.route.length){const f=l.route.slice(m);f.length>0&&d.push({type:"pcb_trace",pcb_trace_id:`${u}_${_}`,source_trace_id:g,route:f.map((I,C)=>{const y=C===f.length-1;return{route_type:"wire",x:I.x,y:I.y,width:h,layer:O5(I.z,2),...y&&I.pcb_port_id?{end_pcb_port_id:I.pcb_port_id}:{}}})})}return d})(s,`trace_${a}`,r.get(A)||A,n);i.push(...c)})),i}var aB=t=>t.rootConnectionName??t.connectionName,jJ=(t,e)=>{if(t&&e)return t.getNetConnectedToId(e)},AB=(t,e,n)=>{if(!e)return!1;if(t===e||n?.areIdsConnected(t,e))return!0;const o=jJ(n,t),i=jJ(n,e);return!(!o||o!==e&&o!==i)||!(!i||i!==t&&i!==o)},Ry=(t,e,n)=>e.connectedTo?.some(o=>AB(t,o,n))??!1,y7=(t,e,n)=>Math.max(e,Math.min(t,n)),AN=(t,e)=>{t.x=y7(t.x,e.minX,e.maxX),t.y=y7(t.y,e.minY,e.maxY)},cN=(t,e)=>({minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}),u5t=(t,e)=>({minCellX:Math.floor(t.minX/e),maxCellX:Math.floor(t.maxX/e),minCellY:Math.floor(t.minY/e),maxCellY:Math.floor(t.maxY/e)}),g5t=(t,e)=>`${t}:${e}`,Nbe=(t,e,n)=>{const o=new Map;for(let i=0;i<t.length;i+=1){const r=t[i];if(!r)continue;const s=u5t(e(r),n);for(let a=s.minCellX;a<=s.maxCellX;a+=1)for(let A=s.minCellY;A<=s.maxCellY;A+=1){const c=g5t(a,A),l=o.get(c);l?l.push(i):o.set(c,[i])}}return o},YL=(t,e,n)=>{const o=new Set,i=u5t(e,n);for(let r=i.minCellX;r<=i.maxCellX;r+=1)for(let s=i.minCellY;s<=i.maxCellY;s+=1){const a=t.get(g5t(r,s));if(a)for(const A of a)o.add(A)}return[...o].sort((r,s)=>r-s)},d5t=1e-6,aco=(t,e,n)=>{if(t.length===0)return[];const o=n?.traceThickness??.1,i=t[0],r=t.at(-1),s=l=>{if(l.pcb_port_id)return l.pcb_port_id;const u=O5(l.z,e);return n?.connectionPoints?.find(g=>{return g.pcb_port_id&&(h=g,d=l,Math.abs(h.x-d.x)<=d5t&&Math.abs(h.y-d.y)<=d5t)&&l5t(g).includes(u);var h,d})?.pcb_port_id},a=s(i),A=s(r),c=[{route_type:"wire",x:i.x,y:i.y,width:o,layer:O5(i.z,e),...a?{start_pcb_port_id:a}:{},...t.length===1&&A?{end_pcb_port_id:A}:{}}];for(let l=1;l<t.length;l+=1){const u=t[l-1],g=t[l];u&&g&&(u.z===g.z||u.x!==g.x||u.y!==g.y?c.push({route_type:"wire",x:g.x,y:g.y,width:o,layer:O5(g.z,e),...l===t.length-1&&A?{end_pcb_port_id:A}:{}}):c.push({route_type:"via",x:g.x,y:g.y,from_layer:O5(u.z,e),to_layer:O5(g.z,e),...n?.viaDiameter?{via_diameter:n.viaDiameter}:{}}))}return c},h5t=t=>({...t,route:t.route.map(e=>({...e})),vias:t.vias.map(e=>({...e}))}),x7=t=>t.map(h5t),UL=(t,e)=>{const n=new Set(e);return t.map((o,i)=>n.has(i)?h5t(o):o)},j_=(t,e)=>Math.abs(t.x-e.x)<=bA&&Math.abs(t.y-e.y)<=bA,Aco=["pcb_smtpad","pcb_plated_hole","pcb_hole","pcb_keepout"],Ty=t=>typeof t.type=="string"?t.type:typeof t.error_type=="string"?t.error_type:void 0,Rbe=t=>{if(Ty(t)==="pcb_pad_trace_clearance_error")return!0;const e=typeof t.message=="string"?t.message.toLowerCase():"";return(e.includes("pcb_trace")||e.includes("pcb trace"))&&Aco.some(n=>e.includes(n))},Tbe=t=>{const e=typeof t.message=="string"?t.message:"",n=e.match(/gap: (-?\d+(?:\.\d+)?)mm/),o=e.match(/required: (-?\d+(?:\.\d+)?)mm/);if(n&&o){const i=Number.parseFloat(n[1]),r=Number.parseFloat(o[1]);if(Number.isFinite(i)&&Number.isFinite(r))return Math.max(0,r-i)}if(n){const i=Number.parseFloat(n[1]),r=xx.traceClearance;if(Number.isFinite(i))return Math.max(0,r-i)}return 1},p5t={projectEngineError:t=>({...t,center:typeof t.first_contact_center=="object"?t.first_contact_center:t.center,message:typeof t.first_contact_message=="string"?t.first_contact_message:t.message,actual_clearance:typeof t.first_actual_clearance=="number"?t.first_actual_clearance:t.actual_clearance}),getErrorSeverity:Tbe},cco={projectEngineError:t=>t,getErrorSeverity:t=>{const e=Number(t.minimum_clearance),n=Number(t.worst_actual_clearance);return Number.isFinite(e)&&Number.isFinite(n)?Math.max(0,e-n):Tbe(t)}},KL=(t,e=Tbe)=>t.reduce((n,o)=>n+e(o),0),m5t=(t,e,n,o,i,r=p5t)=>{const s=i&&!n?t:((h,d)=>d?{...h,connections:h.connections.map(p=>{const m=jJ(d,p.name)??jJ(d,p.rootConnectionName)??p.netConnectionName;return m?{...p,netConnectionName:m}:p}),obstacles:h.obstacles.map(p=>{const m=new Set(p.connectedTo);for(const _ of p.connectedTo){const f=jJ(d,_);f&&m.add(f)}return{...p,connectedTo:[...m]}})}:h)(t,o),{traces:a,traceRouteIndexById:A}=((h,d)=>{const p=[],m=new Map,_=new Map;for(let f=0;f<d.length;f+=1){const I=d[f];if(!I)continue;const C=_.get(I.connectionName);C?C.push({route:I,routeIndex:f}):_.set(I.connectionName,[{route:I,routeIndex:f}])}for(const f of h.connections){const I=_.get(f.name)??[];for(let C=0;C<I.length;C+=1){const y=I[C];if(!y)continue;const x=`${f.name}_${C}`;p.push({type:"pcb_trace",pcb_trace_id:x,connection_name:f.netConnectionName??f.rootConnectionName??f.name,route:aco(y.route.route,h.layerCount,{traceThickness:y.route.traceThickness??f.nominalTraceWidth??h.nominalTraceWidth??h.minTraceWidth,viaDiameter:y.route.viaDiameter??h.minViaDiameter,connectionPoints:f.pointsToConnect})}),m.set(x,y.routeIndex)}}return{traces:p,traceRouteIndexById:m}})(s,e),c=n?.({srj:s,routes:e,traces:a});if(c){const h=Array.isArray(c)?c:c.errors,d=Array.isArray(c)?c:c.errorsWithCenters??c.errors;return{errors:d,count:h.length,issueScore:KL(d,r.getErrorSeverity),legacyIssueScore:KL(d.filter(p=>!Ex(p)),r.getErrorSeverity),traceRouteIndexById:A}}const l=i?.evaluate(a)??((h,d={})=>{const p=Math.max(d.viaClearance??.1,.1),m=[...tco(h,Dbe(d.traceClearance)),...nco(h,Dbe(p)),...oco(h,Dbe(p))],_=h.filter(y=>y.type==="pcb_via"),f=new Map(_.map(y=>[y.pcb_via_id,y])),I=m.map(y=>{if("center"in y&&y.center)return y;if("pcb_center"in y&&y.pcb_center)return{...y,center:y.pcb_center};if("pcb_via_ids"in y&&Array.isArray(y.pcb_via_ids)){const[x,E]=y.pcb_via_ids;if(typeof x!="string"||typeof E!="string")return y;const B=f.get(x),S=f.get(E);if(B&&S)return{...y,center:{x:(B.x+S.x)/2,y:(B.y+S.y)/2}}}if("pcb_error_id"in y&&typeof y.pcb_error_id=="string"&&(y.pcb_error_id.startsWith("same_net_vias_close_")||y.pcb_error_id.startsWith("different_net_vias_close_"))){const x=y.pcb_error_id.replace("same_net_vias_close_","").replace("different_net_vias_close_","").split("_").filter(Boolean);if(x.length===2){const E=x[0],B=x[1];if(!E||!B)return y;const S=f.get(E),Q=f.get(B);if(S&&Q)return{...y,center:{x:(S.x+Q.x)/2,y:(S.y+Q.y)/2}}}}return y}),C=I.filter(y=>!!y.center);return{errors:m,errorsWithCenters:I,locationAwareErrors:C}})(sco(s,a,s.minTraceWidth,s.minViaDiameter),{traceClearance:s.minTraceToPadEdgeClearance??xx.traceClearance,viaClearance:s.minTraceToPadEdgeClearance??xx.viaClearance}),u=l.errors,g=(l.errorsWithCenters.length>0?l.errorsWithCenters:l.errors).map(h=>r.projectEngineError(h));return{errors:g,count:u.length,issueScore:KL(g,r.getErrorSeverity),legacyIssueScore:KL(g.filter(h=>!Ex(h)),r.getErrorSeverity),traceRouteIndexById:A}},E7=(t,e,n,o,i)=>m5t(t,e,n,o,i,p5t),lco=(t,e,n,o,i)=>m5t(t,e,n,o,i,cco),Iv=(t,e=.3)=>{const n=[];for(let o=0;o<t.length;o+=1){const i=t[o];if(!i)continue;const r=new Set;for(let s=0;s<i.route.length-1;s+=1){const a=i.route[s],A=i.route[s+1];if(!a||!A||a.z===A.z||!j_(a,A))continue;const c=[s,s+1];for(let h=s-1;h>=0;h-=1){const d=i.route[h];if(!d||!j_(d,a))break;c.push(h)}for(let h=s+2;h<i.route.length;h+=1){const d=i.route[h];if(!d||!j_(d,a))break;c.push(h)}const l=[...new Set(c)];if(l.some(h=>r.has(h)))continue;for(const h of l)r.add(h);const u=l.filter(h=>h===0||h===i.route.length-1),g=u.some(h=>!!i.route[h]?.pcb_port_id);n.push({routeIndex:o,rootConnectionName:aB(i),pointIndexes:l,zLayers:[...new Set(l.map(h=>i.route[h].z))],x:a.x,y:a.y,radius:(i.viaDiameter??e)/2,movable:u.length===0,canCanonicalize:u.length===0||!g})}}return n},fAe=(t,e)=>{const n=[];for(let o=0;o<t.route.length-1;o+=1){const i=t.route[o],r=t.route[o+1];i&&r&&(i.z!==r.z||j_(i,r)||n.push({routeIndex:e,rootConnectionName:aB(t),startIndex:o,endIndex:o+1,start:i,end:r,z:i.z,radius:(t.traceThickness??.1)/2}))}return n},$J=t=>t.flatMap((e,n)=>fAe(e,n)),IAe=t=>({minX:t.x,minY:t.y,maxX:t.x,maxY:t.y}),lN=t=>({minX:Math.min(t.start.x,t.end.x),minY:Math.min(t.start.y,t.end.y),maxX:Math.max(t.start.x,t.end.x),maxY:Math.max(t.start.y,t.end.y)}),_5t=t=>({minX:t.center.x-t.width/2,minY:t.center.y-t.height/2,maxX:t.center.x+t.width/2,maxY:t.center.y+t.height/2}),VL=(t,e)=>{if(t.zLayers&&t.zLayers.length>0)return t.zLayers;const n=Array.from({length:e},(o,i)=>i).filter(o=>t.layers.includes(O5(o,e)));return n.length>0?n:Array.from({length:e},(o,i)=>i)},f5t=(t,e,n)=>{const o=e.reduce((s,a)=>Math.max(s,a.radius),(t.minViaDiameter??.3)/2),i=n.reduce((s,a)=>Math.max(s,a.radius),t.minTraceWidth/2),r=xx.traceClearance+My;return Math.max(2*o+.2+My,o+i+r,2*i+r,i+A8e(t)+My,o+c8e(t)+My)},I5t=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r<=Dr)return{x:e.x,y:e.y,t:0};const s=y7(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return{x:e.x+o*s,y:e.y+i*s,t:s}},G5=(t,e)=>I5t(t,e.start,e.end),Cv=(t,e)=>{const n=e.width/2,o=e.height/2,i=Math.max(Math.abs(t.x-e.center.x)-n,0),r=Math.max(Math.abs(t.y-e.center.y)-o,0);return Math.hypot(i,r)},CAe=(t,e)=>t.x>=e.center.x-e.width/2-bA&&t.x<=e.center.x+e.width/2+bA&&t.y>=e.center.y-e.height/2-bA&&t.y<=e.center.y+e.height/2+bA,kbe=(t,e,n,o)=>t.obstacles.find(i=>Ry(aB(e),i,o)&&VL(i,t.layerCount).includes(n.z)&&CAe(n,i)),yAe=(t,e,n=.6,o)=>{let i;for(const r of t.obstacles){if(o&&!o(r))continue;const s=Cv(e,r);s>n||(!i||s<i.distance)&&(i={obstacle:r,distance:s})}return i?.obstacle},xAe=(t,e,n)=>{const o=e.width/2,i=e.height/2,r=y7(t.x,e.center.x-o,e.center.x+o),s=y7(t.y,e.center.y-i,e.center.y+i);let a=t.x-r,A=t.y-s,c=Math.hypot(a,A);c<=Dr&&(o-Math.abs(t.x-e.center.x)<i-Math.abs(t.y-e.center.y)?(a=t.x>=e.center.x?1:-1,A=0,c=0):(a=0,A=t.y>=e.center.y?1:-1,c=0));const l=n-c;if(l<=0)return;const u=Math.hypot(a,A);return{direction:{x:u>Dr?a/u:1,y:u>Dr?A/u:0},penetration:l}},C5t=(t,e,n,o)=>{const i=e.message;if(typeof i!="string"||!i.includes("pcb_"))return n;const r=Array.isArray(e.pcb_pad_ids)?e.pcb_pad_ids.filter(a=>typeof a=="string"):[],s=t.obstacles.find(a=>r.some(A=>a.connectedTo.includes(A))&&!0);return s?s.center:yAe(t,n,.6,o)?.center??n},y5t=(t,e)=>{const n=t.route[e];if(!n)return[];const o=[e];for(let i=e-1;i>=0;i-=1){const r=t.route[i];if(!r||!j_(r,n))break;o.push(i)}for(let i=e+1;i<t.route.length;i+=1){const r=t.route[i];if(!r||!j_(r,n))break;o.push(i)}return[...new Set(o)]},Fbe=(t,e)=>{if(e<=0||e>=t.route.length-1)return;const n=y5t(t,e);return n.includes(0)||n.includes(t.route.length-1)?void 0:n},zL=(t,e)=>t.x>=e.minX-bA&&t.x<=e.maxX+bA&&t.y>=e.minY-bA&&t.y<=e.maxY+bA,Lbe=(t,e)=>Math.min(t.x-e.minX,e.maxX-t.x,t.y-e.minY,e.maxY-t.y),uco=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=t.x-e.x,s=o*(t.y-e.y)-i*r;if(Math.abs(s)>bA)return!1;const a=Math.min(e.x,n.x)-bA,A=Math.max(e.x,n.x)+bA,c=Math.min(e.y,n.y)-bA,l=Math.max(e.y,n.y)+bA;return t.x>=a&&t.x<=A&&t.y>=c&&t.y<=l},qJ=(t,e)=>{if(e.length<3)return!0;for(let o=0;o<e.length;o+=1){const i=e[o],r=e[(o+1)%e.length];if(i&&r&&uco(t,i,r))return!0}let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o,o+=1){const r=e[o],s=e[i];!r||!s||r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},x5t=(t,e)=>{const n=Math.hypot(t,e);if(!(n<=Dr))return{x:t/n,y:e/n}},E5t=(t,e)=>t.outline&&t.outline.length>=3?((n,o)=>{const i=qJ(n,o);let r;for(let u=0;u<o.length;u+=1){const g=o[u],h=o[(u+1)%o.length];if(!g||!h)continue;const d=I5t(n,g,h),p=Math.hypot(n.x-d.x,n.y-d.y);(!r||p<r.distance)&&(r={projection:d,start:g,end:h,distance:p})}if(!r)return;const s=x5t(i?n.x-r.projection.x:r.projection.x-n.x,i?n.y-r.projection.y:r.projection.y-n.y);if(s)return s;const a=r.end.x-r.start.x,A=r.end.y-r.start.y,c=Math.hypot(a,A);if(c<=Dr)return;const l=(u=>{let g=0;for(let h=0;h<u.length;h+=1){const d=u[h],p=u[(h+1)%u.length];d&&p&&(g+=d.x*p.y-p.x*d.y)}return g/2})(o)>=0;return{x:l?-A/c:A/c,y:l?a/c:-a/c}})(e,t.outline):((n,o)=>{const i=n.x-o.minX,r=o.maxX-n.x,s=n.y-o.minY,a=o.maxY-n.y,A=Math.min(i,r,s,a);let c=0,l=0;return i<=A+bA&&(c+=1),r<=A+bA&&(c-=1),s<=A+bA&&(l+=1),a<=A+bA&&(l-=1),x5t(c,l)})(e,t.bounds),B5t=(t,e)=>t.outline&&t.outline.length>=3?qJ(e,t.outline):zL(e,t.bounds),ky=(t,e)=>{if(t.outline&&t.outline.length>=3){const n=((o,i)=>{let r=Number.POSITIVE_INFINITY;for(let s=0;s<i.length;s+=1){const a=i[s],A=i[(s+1)%i.length];a&&A&&(r=Math.min(r,wc(o,a,A)))}return r})(e,t.outline);return qJ(e,t.outline)?n:-n}return Lbe(e,t.bounds)},ib=(t,e,n)=>{if(Math.abs(e.x-n.x)<=bA&&Math.abs(e.y-n.y)<=bA)return Math.min(ky(t,e),ky(t,n));if(t.outline&&t.outline.length>=3){if(!qJ(e,t.outline)||!qJ(n,t.outline))return Math.min(ky(t,e),ky(t,n));let o=Number.POSITIVE_INFINITY;for(let i=0;i<t.outline.length;i+=1){const r=t.outline[i],s=t.outline[(i+1)%t.outline.length];r&&s&&(o=Math.min(o,M5(e,n,r,s)))}return o}return zL(e,t.bounds)&&zL(n,t.bounds)?Math.min(Lbe(e,t.bounds),Lbe(n,t.bounds)):Math.min(ky(t,e),ky(t,n))},JL=(t,e)=>e+Math.max(.16,t.defaultObstacleMargin??0,xx.traceClearance),EAe=(t,e,n)=>e<t-bA&&Math.min(t,e)<=n+bA,b5t=(t,e,n,o,i)=>{const r=t*n.x+e*n.y,s=-Math.max(0,o-i);if(r>=s-bA)return{x:t,y:e};const a=s-r;return{x:t+n.x*a,y:e+n.y*a}},Hbe=(t,e,n,o,i)=>{const r=E5t(t,e);return r?b5t(n,o,r,ky(t,e),JL(t,i)):{x:n,y:o}},S5t=(t,e,n,o)=>{const i=[...new Set(n)].sort((A,c)=>A-c);if(i.length===0)return Number.POSITIVE_INFINITY;const r=new Set(i),s=A=>o?.get(A)??e.route[A];let a=Number.POSITIVE_INFINITY;for(const A of i){const c=s(A);c&&(a=Math.min(a,ky(t,c)))}for(let A=0;A<e.route.length-1;A+=1){if(!r.has(A)&&!r.has(A+1))continue;const c=s(A),l=s(A+1);c&&l&&(a=Math.min(a,ib(t,c,l)))}return a},BAe=(t,e,n,o,i,r)=>{const s=[...new Set(n)].sort((g,h)=>g-h);if(s.length===0)return;const a=((g,h,d,p,m,_)=>{const f=[...new Set(d)].sort((y,x)=>y-x);let I={x:p,y:m};const C=JL(g,_);for(let y=0;y<Math.max(1,f.length);y+=1){let x=!1;for(const E of f){const B=h.route[E];if(!B)continue;const S=E5t(g,B);if(!S)continue;const Q=b5t(I.x,I.y,S,ky(g,B),C);(Math.abs(Q.x-I.x)>Dr||Math.abs(Q.y-I.y)>Dr)&&(I=Q,x=!0)}if(!x)break}return I})(t,e,s,o,i,r);if(Math.abs(a.x)<=Dr&&Math.abs(a.y)<=Dr)return;const A=new Map;for(const g of s){const h=e.route[g];if(!h)continue;const d={x:h.x+a.x,y:h.y+a.y};A.set(g,d)}const c=S5t(t,e,s),l=S5t(t,e,s,A);if(l<r-bA)return;const u=JL(t,r);return EAe(c,l,u)?void 0:a},bAe=(t,e,n,o,i,r,s)=>{const a=t[e];if(!a)return!1;const A=Fbe(a,n);if(!A)return!1;const c=BAe(r,a,A,o,i,s);if(!c)return!1;let l=!1;for(const u of A){const g=a.route[u];g&&(g.x+=c.x,g.y+=c.y,AN(g,r.bounds),l=!0)}return l},Q5t=(t,e,n,o,i,r)=>Fbe(e,n)??((s,a,A,c,l,u)=>{const g=a.route[A];if(!g||g.pcb_port_id||A!==0&&A!==a.route.length-1)return;const h=kbe(s,a,g,u);if(!h)return;const d={...g,x:g.x+c,y:g.y+l};return B5t(s,d)&&CAe(d,h)?y5t(a,A):void 0})(t,e,n,o,i,r),v5t=(t,e,n,o,i,r)=>{const s=BAe(i,t,e,n,o,r);if(!s)return!1;let a=!1;for(const A of e){const c=t.route[A];c&&(c.x+=s.x,c.y+=s.y,AN(c,i.bounds),a=!0)}return a},w5t=(t,e,n,o,i,r)=>{const s=e.route[n];if(!s||s.pcb_port_id)return!1;const a=kbe(t,e,s,r);return!!a&&CAe({...s,x:s.x+o,y:s.y+i},a)},gco=(t,e,n,o)=>{const i=e.route[n];if(i&&!i.pcb_port_id)return kbe(t,e,i,o)},P5t=(t,e,n,o,i,r,s)=>{const a=t[e];if(!a||a.route.length===0)return!1;const A=((h,d,p,m,_)=>{let f=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY;for(const x of[0,d.route.length-1]){const E=d.route[x],B=gco(h,d,x,_);if(!E||!B)return;f=Math.max(f,B.center.x-B.width/2-E.x),I=Math.min(I,B.center.x+B.width/2-E.x),C=Math.max(C,B.center.y-B.height/2-E.y),y=Math.min(y,B.center.y+B.height/2-E.y)}if(!(f>I||C>y))return{x:y7(p,f,I),y:y7(m,C,y)}})(i,a,n,o,s);if(!A)return!1;const c=a.route.map((h,d)=>d),l=BAe(i,a,c,A.x,A.y,r);if(!l)return!1;const u=a.route.length-1;if(!w5t(i,a,0,l.x,l.y,s)||!w5t(i,a,u,l.x,l.y,s))return!1;let g=!1;for(const h of a.route)h.x+=l.x,h.y+=l.y,AN(h,i.bounds),g=!0;return g},M5t=(t,e,n)=>{const o=e.x-t.x,i=e.y-t.y,r=n.x-e.x,s=n.y-e.y;return Math.abs(o*s-i*r)<=bA},D5t=(t,e)=>{if(t.z!==e.z)return!1;const n=e.end.x-e.start.x,o=e.end.y-e.start.y,i=t.x-e.start.x,r=t.y-e.start.y;return Math.abs(n*r-o*i)<=bA},dco=(t,e)=>{const n=((i,r)=>{const s=r.end.x-r.start.x,a=r.end.y-r.start.y,A=Math.max(bA,.12*(i.traceThickness??.1)),c=Math.abs(a)<=A,l=Math.abs(s)<=A;let u=r.startIndex,g=r.endIndex;if(c||l){const h=c?(r.start.y+r.end.y)/2:(r.start.x+r.end.x)/2;for(;u>0;){const d=i.route[u-1];if(!d||d.z!==r.z||Math.abs((c?d.y:d.x)-h)>A)break;u-=1}for(;g<i.route.length-1;){const d=i.route[g+1];if(!d||d.z!==r.z||Math.abs((c?d.y:d.x)-h)>A)break;g+=1}return Array.from({length:g-u+1},(d,p)=>u+p)}for(;u>0;){const h=i.route[u-1],d=i.route[u],p=i.route[u+1];if(!(h&&d&&p&&h.z===r.z&&D5t(h,r)&&M5t(h,d,p)))break;u-=1}for(;g<i.route.length-1;){const h=i.route[g-1],d=i.route[g],p=i.route[g+1];if(!(h&&d&&p&&p.z===r.z&&D5t(p,r)&&M5t(h,d,p)))break;g+=1}return Array.from({length:g-u+1},(h,d)=>u+d)})(t,e);if(n.length<=2)return;const o=[];for(const i of n){const r=Fbe(t,i);if(!r)return;o.push(...r)}return[...new Set(o)]},Obe=(t,e)=>e>0&&e<t.route.length-1&&!((n,o)=>{const i=n.route[o];if(!i)return!1;const r=n.route[o-1],s=n.route[o+1];return r&&r.z!==i.z&&j_(r,i)||s&&s.z!==i.z&&j_(s,i)})(t,e),N5t=(t,e,n)=>{const o=t.route[e.startIndex],i=t.route[e.endIndex];return!(!o||!i)&&o.z===e.z&&i.z===e.z&&!!((r,s)=>lN(r).maxX>=s.minX-bA&&lN(r).minX<=s.maxX+bA&&lN(r).maxY>=s.minY-bA&&lN(r).minY<=s.maxY+bA)(e,n)&&(Obe(t,e.startIndex)||Obe(t,e.endIndex))},hco=(t,e,n,o,i,r,s)=>{const a=t[e.routeIndex];if(!a)return!1;const A=((c,l,u,g)=>{const h=cN(_5t(u),g);let d=l.startIndex,p=l.startIndex;for(;d>0;){const _={...l,startIndex:d-1,endIndex:d,start:c.route[d-1],end:c.route[d]};if(!c.route[d-1]||!N5t(c,_,h))break;d-=1}for(;p<c.route.length-2;){const _={...l,startIndex:p+1,endIndex:p+2,start:c.route[p+1],end:c.route[p+2]};if(!c.route[p+2]||!N5t(c,_,h))break;p+=1}const m=[];for(let _=d;_<=p+1;_+=1)Obe(c,_)&&m.push(_);return[...new Set(m)]})(a,e,n,o);return!(A.length<=2)&&v5t(a,A,i,r,s,e.radius)},R5t=(t,e)=>{const n=G5(e,t),o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i),s=t.end.x-t.start.x,a=t.end.y-t.start.y,A=Math.hypot(s,a),c=t.routeIndex%2==0?1:-1;return{projection:n,direction:r>Dr?{x:o/r,y:i/r}:A>Dr?{x:-a/A*c,y:s/A*c}:{x:1,y:0}}},Gbe=(t,e,n,o,i)=>{const r=t[e.routeIndex];if(!r)return!1;const s=Hbe(i,e,n,o,e.radius);if(Math.abs(s.x)<=Dr&&Math.abs(s.y)<=Dr)return!1;const a={x:e.x+s.x,y:e.y+s.y},A=ky(i,e),c=ky(i,a);if(c<e.radius-bA)return!1;const l=JL(i,e.radius);if(EAe(A,c,l))return!1;e.x+=s.x,e.y+=s.y,AN(e,i.bounds);for(const u of e.pointIndexes){const g=r.route[u];g&&(g.x=e.x,g.y=e.y)}return!0},T5t=(t,e)=>{const n=Iv(t),o=n.find(i=>i.routeIndex===e.routeIndex&&i.pointIndexes.some(r=>e.pointIndexes.includes(r)));return o?n.filter(i=>i.rootConnectionName===o.rootConnectionName&&Math.hypot(i.x-o.x,i.y-o.y)<=bA):[]},WL=(t,e,n,o,i)=>e.movable&&T5t(t,e).length<=1&&Gbe(t,e,n,o,i),pco=(t,e,n,o,i=1)=>{const{projection:r,direction:s}=R5t(e,n),a=IJ*i,A=1-r.t,c=r.t,l=bAe(t,e.routeIndex,e.startIndex,s.x*a*A,s.y*a*A,o,e.radius),u=bAe(t,e.routeIndex,e.endIndex,s.x*a*c,s.y*a*c,o,e.radius);return!(!l&&!u)||((g,h,d,p,m)=>{const _=g[h.routeIndex];if(!_)return!1;const{projection:f,direction:I}=R5t(h,d),C=Hbe(p,f,I.x*IJ*m,I.y*IJ*m,h.radius);if(Math.abs(C.x)<=Dr&&Math.abs(C.y)<=Dr)return!1;const y={..._.route[h.startIndex],x:f.x+C.x,y:f.y+C.y};if(AN(y,p.bounds),wc(y,h.start,h.end)<=bA)return!1;const x=_.route[h.startIndex],E=_.route[h.endIndex];if(!x||!E)return!1;const B=ib(p,x,E),S=Math.min(ky(p,y),ib(p,x,y),ib(p,y,E));if(S<h.radius-bA)return!1;const Q=JL(p,h.radius);return!EAe(B,S,Q)&&(_.route.splice(h.endIndex,0,y),!0)})(t,e,n,o,i)},mco=(t,e,n,o,i,r=1)=>{const s=e.radius+A8e(o)+My,a=O5t(e,n,s);if(!a)return!1;const A=Math.min(.3*Math.abs(r),a.penetration+My),c=a.direction.x*A,l=a.direction.y*A,u=t[e.routeIndex];if(!u)return!1;const g=!(S=>{for(let Q=0;Q<S.route.length-1;Q+=1){const w=S.route[Q],M=S.route[Q+1];if(w&&M&&w.z!==M.z&&j_(w,M))return!0}return!1})(u);if(g&&P5t(t,e.routeIndex,c,l,o,e.radius,i)||hco(t,e,n,s,c,l,o)||((S,Q,w,M,k)=>{const R=S[Q.routeIndex];if(!R)return!1;const F=dco(R,Q);return!!F&&v5t(R,F,w,M,k,Q.radius)})(t,e,c,l,o)||((S,Q,w,M,k,R)=>{const F=S[Q.routeIndex];if(!F)return!1;const O=Q5t(k,F,Q.startIndex,w,M,R),U=Q5t(k,F,Q.endIndex,w,M,R);if(!O||!U)return!1;const Y=[...new Set([...O,...U])],W=BAe(k,F,Y,w,M,Q.radius);if(!W)return!1;let te=!1;for(const j of Y){const J=F.route[j];J&&(J.x+=W.x,J.y+=W.y,AN(J,k.bounds),te=!0)}return te})(t,e,c,l,o,i)||!g&&P5t(t,e.routeIndex,c,l,o,e.radius,i))return!0;const d=n.width/2,p=n.height/2,m=(Math.abs(a.direction.y)>=Math.abs(a.direction.x)?[{...u.route[e.startIndex],x:n.center.x-d-s,y:n.center.y+a.direction.y*(p+s)},{...u.route[e.startIndex],x:n.center.x+d+s,y:n.center.y+a.direction.y*(p+s)}]:[{...u.route[e.startIndex],x:n.center.x+a.direction.x*(d+s),y:n.center.y-p-s},{...u.route[e.startIndex],x:n.center.x+a.direction.x*(d+s),y:n.center.y+p+s}]).map(S=>{const{t:Q}=G5(S,e),w={x:e.start.x+(e.end.x-e.start.x)*Q,y:e.start.y+(e.end.y-e.start.y)*Q},M=Hbe(o,w,S.x-w.x,S.y-w.y,e.radius);return S.x=w.x+M.x,S.y=w.y+M.y,AN(S,o.bounds),{point:S,t:Q,moved:Math.abs(M.x)>Dr||Math.abs(M.y)>Dr,awayFromObstacleMotion:M.x*a.direction.x+M.y*a.direction.y}}).sort((S,Q)=>S.t-Q.t);if(!m.some(({moved:S})=>S)||!m.some(({awayFromObstacleMotion:S})=>S>bA))return!1;const _=m.map(({point:S})=>S);if(_.every(S=>wc(S,e.start,e.end)<=bA)||_.some(S=>!B5t(o,S)))return!1;const f=u.route[e.startIndex],I=u.route[e.endIndex],C=_[0],y=_[1];if(!(f&&I&&C&&y))return!1;const x=ib(o,f,I),E=Math.min(ky(o,C),ky(o,y),ib(o,f,C),ib(o,C,y),ib(o,y,I));if(E<e.radius-bA)return!1;const B=JL(o,e.radius);return!EAe(x,E,B)&&(u.route.splice(e.endIndex,0,..._),!0)},B7=(t,e,n)=>{let o;for(const i of t){if(n!==void 0&&i.routeIndex!==n)continue;const r=G5(e,i),s=Math.hypot(r.x-e.x,r.y-e.y);(!o||s<o.distance)&&(o={segment:i,distance:s})}return o?.segment},XJ=(t,e,n)=>{let o;for(const i of t){if(n!==void 0&&i.routeIndex!==n)continue;const r=Math.hypot(i.x-e.x,i.y-e.y);(!o||r<o.distance)&&(o={via:i,distance:r})}return o?.via},_co=(t,e)=>{const n=t.map(o=>({via:o,distance:Math.hypot(o.x-e.x,o.y-e.y)})).sort((o,i)=>o.distance-i.distance).slice(0,2).map(({via:o})=>o);return n.length===2?n:void 0},Ybe=(t,e,n,o)=>{const i=e.x-n.x,r=e.y-n.y,s=Math.hypot(i,r);return WL(t,e,(s>Dr?i/s:1)*IJ,(s>Dr?r/s:0)*IJ,o)},k5t=(t,e)=>{const n=G5(t.start,e),o=G5(t.end,e),i=G5(e.start,t),r=G5(e.end,t);return[{leftT:0,rightT:n.t,leftPoint:t.start,rightPoint:n},{leftT:1,rightT:o.t,leftPoint:t.end,rightPoint:o},{leftT:i.t,rightT:0,leftPoint:i,rightPoint:e.start},{leftT:r.t,rightT:1,leftPoint:r,rightPoint:e.end}].sort((s,a)=>Math.hypot(s.leftPoint.x-s.rightPoint.x,s.leftPoint.y-s.rightPoint.y)-Math.hypot(a.leftPoint.x-a.rightPoint.x,a.leftPoint.y-a.rightPoint.y))},ZJ=(t,e,n,o,i,r)=>{const s=y7(r,0,1),a=1-s,A=s,c=bAe(t,e.routeIndex,e.startIndex,n*a,o*a,i,e.radius),l=bAe(t,e.routeIndex,e.endIndex,n*A,o*A,i,e.radius);return c||l},F5t=(t,e,n,o,i,r=.035,s=!1)=>{if(!s&&AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const a=e.radius+n.radius+.2+My,A=e.x-n.x,c=e.y-n.y,l=Math.hypot(A,c),u=a-l;if(u<=0)return!1;const g=1.618*(97*e.routeIndex+13*n.routeIndex),h=l>Dr?A/l:Math.cos(g),d=l>Dr?c/l:Math.sin(g),p=Number(e.movable)+Number(n.movable);if(p===0)return!1;const m=Math.min(r,u/p),_=WL(t,e,h*m,d*m,o),f=WL(t,n,-h*m,-d*m,o);return _||f},fco=(t,e,n,o,i)=>{if(!AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const[r,s]=e.canCanonicalize?n.canCanonicalize&&e.routeIndex<=n.routeIndex?[e,n]:[n,e]:[e,n];return((a,A,c,l)=>{if(!c.canCanonicalize)return!1;const u=A.x-c.x,g=A.y-c.y;if(!c.movable&&Math.hypot(u,g)>c.radius+bA)return!1;const h=a[c.routeIndex];if(!h)return!1;const d={x:c.x,y:c.y},p=c.pointIndexes.map(m=>{const _=h.route[m];return _?{pointIndex:m,x:_.x,y:_.y}:void 0});if(Gbe(a,c,u,g,l)&&j_(c,A))return!0;c.x=d.x,c.y=d.y;for(const m of p){if(!m)continue;const _=h.route[m.pointIndex];_&&(_.x=m.x,_.y=m.y)}return!1})(t,r,s,o)},Ube=(t,e,n,o,i,r=.035,s=2,a=!1)=>{if(AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const A=G5(e,n),c=e.x-A.x,l=e.y-A.y,u=Math.hypot(c,l),g=e.radius+n.radius+xx.traceClearance+My-u;if(g<=0)return!1;const h=n.end.x-n.start.x,d=n.end.y-n.start.y,p=Math.hypot(h,d),m=e.routeIndex%2==0?1:-1,_=u>Dr?c/u:p>Dr?-d/p*m:1,f=u>Dr?l/u:p>Dr?h/p*m:0,I=Math.min(r,g/s),C=a?((x,E,B,S,Q)=>{const w=T5t(x,E);if(w.length===0||w.some(k=>!k.movable||x[k.routeIndex]===void 0))return!1;const M=w.reduce((k,R)=>R.radius>k.radius?R:k);if(!Gbe(x,M,B,S,Q))return!1;for(const k of w){if(k===M)continue;k.x=M.x,k.y=M.y;const R=x[k.routeIndex];for(const F of k.pointIndexes){const O=R.route[F];O&&(O.x=M.x,O.y=M.y)}}return!0})(t,e,_*I,f*I,o):WL(t,e,_*I,f*I,o),y=ZJ(t,n,-_*I,-f*I,o,A.t);return C||y},L5t=(t,e,n,o,i)=>{if(e.z!==n.z||AB(e.rootConnectionName,n.rootConnectionName,i))return!1;const[r]=k5t(e,n);if(!r)return!1;const s=r.leftPoint.x-r.rightPoint.x,a=r.leftPoint.y-r.rightPoint.y,A=Math.hypot(s,a),c=e.radius+n.radius+xx.traceClearance+My-A;if(c<=0)return!1;const l=e.end.x-e.start.x,u=e.end.y-e.start.y,g=Math.hypot(l,u),h=(e.routeIndex+n.routeIndex)%2==0?1:-1,d=A>Dr?s/A:g>Dr?-u/g*h:1,p=A>Dr?a/A:g>Dr?l/g*h:0,m=Math.min(CJ,c/2),_=ZJ(t,e,d*m,p*m,o,r.leftT),f=ZJ(t,n,-d*m,-p*m,o,r.rightT);return _||f},eW=(t,e,n)=>VL(t,n).includes(e.z),H5t=(t,e,n,o,i)=>{const r=e[n];if(!r)return;const s=fAe(r,n);if(s.length===0)return;const a=aB(r),A=B7(s,o);if(!A)return;const c=yAe(t,o,.6,g=>!Ry(a,g,i)&&eW(g,A,t.layerCount));if(c)return{obstacle:c,segment:A};const l=yAe(t,o,.6,g=>!Ry(a,g,i)&&s.some(h=>eW(g,h,t.layerCount)));if(!l)return;const u=B7(s.filter(g=>eW(l,g,t.layerCount)),o);return u?{obstacle:l,segment:u}:void 0},O5t=(t,e,n)=>{const o=e.width/2,i=e.height/2,r=[{x:e.center.x-o,y:e.center.y-i},{x:e.center.x+o,y:e.center.y-i},{x:e.center.x+o,y:e.center.y+i},{x:e.center.x-o,y:e.center.y+i}],s=[e.center,...r].map(l=>G5(l,t)),a=[{point:t.start,t:0},{point:t.end,t:1},{point:{x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2},t:.5},...s.map(l=>({point:{x:l.x,y:l.y},t:l.t}))];let A;const c=Math.hypot(t.end.x-t.start.x,t.end.y-t.start.y);for(const l of a){const u=xAe(l.point,e,n);if(!u)continue;const g=c>Dr?Math.abs(((t.end.x-t.start.x)*u.direction.y-(t.end.y-t.start.y)*u.direction.x)/c):0;(!A||u.penetration>A.penetration+Dr||Math.abs(u.penetration-A.penetration)<=Dr&&g>A.normality)&&(A={...u,normality:g,t:l.t})}return A},Ico=(t,e,n,o=!1)=>{let i=!1;const r=Iv(e),s=$J(e),a=f5t(t,r,s),A=Math.max(1,2*a),c=Nbe(r,IAe,A),l=Nbe(s,lN,A);for(let u=0;u<r.length;u+=1){const g=r[u];if(!g)continue;const h=YL(c,cN(IAe(g),a),A);for(const d of h){if(d<=u)continue;const p=r[d];p&&(i=F5t(e,g,p,t,n,CJ,o)||i)}}for(let u=0;u<r.length;u+=1){const g=r[u];if(!g)continue;const h=YL(l,cN(IAe(g),a),A);for(const d of h){const p=s[d];p&&(i=Ube(e,g,p,t,n)||i)}}for(let u=0;u<s.length;u+=1){const g=s[u];if(!g)continue;const h=YL(l,cN(lN(g),a),A);for(const d of h){if(d<=u)continue;const p=s[d];p&&(i=L5t(e,g,p,t,n)||i)}}return((u,g,h,d,p,m,_,f)=>{let I=!1;const C=u.minTraceWidth/2+A8e(u)+My,y=(u.minViaDiameter??.3)/2+c8e(u)+My;for(const x of u.obstacles){if(x.isCopperPour)continue;const E=_5t(x),B=YL(p,cN(E,y),_);for(const Q of B){const w=h[Q];if(!w||Ry(w.rootConnectionName,x,f))continue;const M=xAe(w,x,y);if(!M)continue;const k=Math.min(CJ,M.penetration);I=WL(g,w,M.direction.x*k,M.direction.y*k,u)||I}const S=YL(m,cN(E,C),_);for(const Q of S){const w=d[Q];if(!w||Ry(w.rootConnectionName,x,f)||!eW(x,w,u.layerCount))continue;const M=O5t(w,x,C);if(!M)continue;const k=Math.min(CJ,M.penetration);I=ZJ(g,w,M.direction.x*k,M.direction.y*k,u,M.t)||I}}return I})(t,e,r,s,c,l,A,n)||i},G5t=(t,e,n,o=1,i,r=!1,s=!0)=>{const a=x7(e),A=Math.max(2,Math.round(12*Math.max(1,n)*o));let c=!1;for(let l=0;l<A&&Ico(t,a,i,r);l+=1)c=!0;return c&&s&&((l,u,g)=>{let h=!1;const d=Iv(u),p=$J(u),m=f5t(l,d,p),_=Math.max(1,2*m),f=Nbe(p,lN,_);for(const I of d){const C=YL(f,cN(IAe(I),m),_);for(const y of C){const x=p[y];x&&(h=Ube(u,I,x,l,g,CJ,1.75)||h)}}})(t,a,i),c?rb(a):e},Cco=t=>{const e=[];for(let n=0;n<t.route.length-1;n+=1){const o=t.route[n],i=t.route[n+1];if(!o||!i||o.toNextSegmentType==="through_obstacle"||o.z===i.z||!j_(o,i))continue;const r={x:o.x,y:o.y},s=e.at(-1);s&&j_(s,r)||e.push(r)}return e},Y5t=t=>({...t,vias:Cco(t)}),rb=t=>t.map(Y5t),jL=(t,e)=>{const n=new Set(e);return t.map((o,i)=>n.has(i)?Y5t(o):o)},U5t=t=>{const e=t.pcb_trace_id;if(typeof e!="string")return;const n=e.match(/^trace_(\d+)/);return n?Number.parseInt(n[1],10):void 0},tW=t=>{const e=t.center??t.pcb_center;if(!e||typeof e!="object")return;const n=e;return typeof n.x=="number"&&typeof n.y=="number"?{x:n.x,y:n.y}:void 0},Kbe=(t,e=!0)=>t.errors.filter(n=>(o=>Ty(o)==="pcb_via_clearance_error"||Array.isArray(o.pcb_via_ids))(n)&&(e||!Ex(n))).length,Ex=t=>Ty(t)==="pcb_pad_pad_clearance_error"&&Array.isArray(t.pcb_via_ids)&&t.pcb_via_ids.length===1,K5t=t=>{const e=Object.entries(t).filter(([o,i])=>o!=="source_trace_id"&&(o.endsWith("_id")||o.endsWith("_ids"))&&i!==void 0&&i!=="").sort(([o],[i])=>o.localeCompare(i)),n=typeof t.message=="string"?t.message.replace(/-?\d+\.\d+/g,"#"):"";return JSON.stringify([Ty(t),e,n])},Bx=t=>Math.max(t.errors.filter(e=>!Ex(e)).length,t.count-t.errors.filter(Ex).length),V5t=t=>{const e=Bx(t);return e>0?e:t.count},z5t=t=>{if(Bx(t)===0)return t.issueScore;const e=t.errors.filter(n=>!Ex(n));return t.errors.some(Ex)?KL(e):t.legacyIssueScore??KL(e)},nW=(t,e)=>{const n=Bx(t),o=Bx(e);return n!==o?n<o:!(n>0)&&t.count<e.count},J5t=t=>{const e=t.filter(n=>!Ex(n));return e.length>0?e:t},uN=(t,e)=>{const n=t.pcb_trace_id;return typeof n=="string"?e.get(n)??U5t(t):U5t(t)},$L=(t,e,n,o,i)=>{const r=n.pcb_port_id;if(!r)return!1;const s=(i??e.viaDiameter)/2;return t.obstacles.some(a=>{const A=VL(a,t.layerCount);return!(A.length!==1||A[0]!==n.z||!a.connectedTo.includes(r)||n.x-s<a.center.x-a.width/2-Dr||n.x+s>a.center.x+a.width/2+Dr||n.y-s<a.center.y-a.height/2-Dr||n.y+s>a.center.y+a.height/2+Dr)&&(Ry(aB(e),a,o)||Ry(e.connectionName,a,o))})},W5t=[0,1,-1,2,-2,3,-3,4],j5t=W5t.flatMap(t=>W5t.map(e=>[t,e])).sort(([t,e],[n,o])=>Math.abs(t)+Math.abs(e)-Math.abs(n)-Math.abs(o)),$5t=j5t.length,q5t=(t,e,n)=>t.x-e>=n.minX-Dr&&t.x+e<=n.maxX+Dr&&t.y-e>=n.minY-Dr&&t.y+e<=n.maxY+Dr,Y5=(t,e)=>{const n=t.at(-1);n&&j_(n,e)&&n.z===e.z&&n.pcb_port_id===e.pcb_port_id||t.push(e)},yco=(t,e,n,o,i,r,s,a=0)=>{const A=Ty(n);if(A!=="pcb_pad_trace_clearance_error"&&A!=="pcb_trace_error"||i<0||i>=t.layerCount)return!1;const c=e[o];if(!c||c.route.length<2)return!1;const l=c.route.map(U=>({...U})),u=l[0],g=l.at(-1);if(!u||!g)return!1;const h=tW(n);if(!h)return!1;const d=Rbe(n),p=d?H5t(t,e,o,h,s):void 0,m=d?p?.segment:B7(fAe(c,o),h);if(!m||m.z===i)return!1;let _=m.startIndex,f=m.endIndex;const I=r==="full"?l.length:r;for(let U=0;U<I;U+=1){let Y=!1;if(l[_-1]?.z===m.z&&(_-=1,Y=!0),l[f+1]?.z===m.z&&(f+=1,Y=!0),!Y)break}const C=_===0&&u.pcb_port_id,y=f===l.length-1&&g.pcb_port_id,x=c.viaDiameter/2,E=j5t[a%$5t],B=U=>{const Y=U==="start"?u:g,W=((J,oe,ie,ne)=>{const le=ie.pcb_port_id;if(le)return J.obstacles.find(ge=>{const _e=VL(ge,J.layerCount);return!(_e.length!==1||_e[0]!==ie.z||!ge.connectedTo.includes(le)||!CAe(ie,ge))&&(Ry(aB(oe),ge,ne)||Ry(oe.connectionName,ge,ne))})})(t,c,Y,s),te=((J,oe)=>{const ie=oe==="start"?J[0]:J.at(-1);if(!ie)return;const ne=oe==="start"?Array.from({length:J.length-1},(le,ge)=>ge+1):Array.from({length:J.length-1},(le,ge)=>J.length-ge-2);for(const le of ne){const ge=J[le];if(!ge)continue;const _e=ge.x-ie.x,ue=ge.y-ie.y,fe=Math.hypot(_e,ue);if(!(fe<=Dr))return{x:_e/fe,y:ue/fe}}})(l,U);if(!W||!te)return;const j=((J,oe,ie,ne)=>{let le=0,ge=Math.hypot(oe.width,oe.height)+2*ne;const _e=ne+Dr,ue=fe=>({x:J.x+ie.x*fe,y:J.y+ie.y*fe});if(!(Cv(ue(ge),oe)<_e)){for(;ge-le>Dr;){const fe=(le+ge)/2;Cv(ue(fe),oe)>=_e?ge=fe:le=fe}return ue(ge)}})(Y,W,((J,oe)=>{const ie=oe*Math.PI/4,ne=Math.cos(ie),le=Math.sin(ie);return{x:J.x*ne-J.y*le,y:J.x*le+J.y*ne}})(te,U==="start"?E[0]:E[1]),x);return!j||!q5t(j,x,t.bounds)||Cv(j,W)+Dr<x?void 0:j},S=C?B("start"):void 0,Q=y?B("end"):void 0;if(C&&!S||y&&!Q)return!1;const w=[];for(let U=0;U<_;U+=1)Y5(w,l[U]);const M=l[_],k=_>0&&j_(l[_-1],M),R=l[f],F=f<l.length-1&&j_(l[f+1],R);C?(Y5(w,u),Y5(w,{...u,...S,pcb_port_id:void 0}),Y5(w,{...u,...S,z:i,pcb_port_id:void 0})):(k||Y5(w,{...M,pcb_port_id:void 0}),Y5(w,{...M,z:i,pcb_port_id:void 0}));const O=y?f-1:f;for(let U=_+1;U<=O;U+=1)Y5(w,{...l[U],z:i,pcb_port_id:void 0});y?(Y5(w,{...g,...Q,z:i,pcb_port_id:void 0}),Y5(w,{...g,...Q,pcb_port_id:void 0}),Y5(w,g)):F||Y5(w,{...R,pcb_port_id:void 0});for(let U=f+1;U<l.length;U+=1)Y5(w,l[U]);for(let U=1;U<w.length-1;U+=1)w[U].pcb_port_id=void 0;return c.route=w,!0},xco=(t,e,n,o,i,r,s)=>{const a=Ty(n);if(a!=="pcb_pad_trace_clearance_error"&&a!=="pcb_trace_error"||i<0||i>=t.layerCount)return!1;const A=uN(n,o);if(A===void 0)return!1;const c=e[A];if(!c||c.route.length<2)return!1;const l=c.route[0],u=c.route.at(-1);if(!l||!u||l.z!==u.z||i===l.z||c.route.some(h=>h.z!==l.z)||!l.pcb_port_id||!u.pcb_port_id||!$L(t,c,l,r,s)||!$L(t,c,u,r,s))return!1;const g=c.route.map(h=>({...h}));return c.route=[g[0],{...g[0],z:i,pcb_port_id:void 0},...g.slice(1,-1).map(h=>({...h,z:i})),{...g.at(-1),z:i,pcb_port_id:void 0},g.at(-1)],!0},Eco=(t,e,n,o,i,r,s)=>{if(Ty(n)!=="pcb_pad_trace_clearance_error")return!1;const a=uN(n,o);if(a===void 0)return!1;const A=e[a];if(!A||A.route.length<4)return!1;const c=A.route.map(m=>({...m}));if(i==="start"){const m=c[0];if(!$L(t,A,m,r,s))return!1;let _=-1;for(let x=1;x<c.length;x+=1)if(c[x].z!==m.z){_=x;break}if(_<=0)return!1;const f=_-1;if(!j_(c[f],c[_]))return!1;let I=_;for(;I+1<c.length&&j_(c[_],c[I+1]);)I+=1;const C=c[I].z,y=c.slice(f,I+1).map(x=>x.z);return A.route=[m,...y.slice(1).map(x=>({...m,z:x,pcb_port_id:void 0})),...c.slice(1,f+1).map(x=>({...x,z:C})),...c.slice(I+1)],!0}const l=c.at(-1);if(!$L(t,A,l,r,s))return!1;let u=-1;for(let m=c.length-2;m>=0;m-=1)if(c[m].z!==l.z){u=m;break}if(u<0||u>=c.length-1)return!1;const g=u+1;if(!j_(c[u],c[g]))return!1;let h=u;for(;h-1>=0&&j_(c[u],c[h-1]);)h-=1;const d=c[h].z,p=c.slice(h,g+1).map(m=>m.z);return A.route=[...c.slice(0,h+1),...c.slice(g+1,-1).map(m=>({...m,z:d})),{...l,z:d,pcb_port_id:void 0},...p.slice(1,-1).map(m=>({...l,z:m,pcb_port_id:void 0})),l],!0},oW=(t,e)=>{const n=t.pcb_trace_id;if(typeof n!="string"||Array.isArray(t.pcb_via_ids)&&t.pcb_via_ids.length>0)return;const o=Array.isArray(t.pcb_trace_ids)?t.pcb_trace_ids.filter(c=>typeof c=="string"):[],i=t.pcb_trace_error_id,r=`overlap_${n}_`,s=typeof i=="string"&&i.startsWith(r)?i.slice(r.length):void 0,a=[n,...o,...s?[s]:[]],A=[...new Set(a.map(c=>e.get(c)).filter(c=>c!==void 0))];return A.length>=2?[A[0],A[1]]:void 0},Bco=(t,e,n,o,i)=>{if(Ty(n)!=="pcb_trace_error")return;const r=oW(n,o);if(!r)return;const s=n.worst_contact_center??n.center;if(!s||typeof s!="object")return;const a=s;if(typeof a.x!="number"||typeof a.y!="number")return;const A={x:a.x,y:a.y},c=$J(e),l=B7(c,A,r[0]),u=B7(c,A,r[1]);if(!l||!u||l.z!==u.z)return;const[g]=k5t(l,u);if(!g)return;const h=g.leftPoint.x-g.rightPoint.x,d=g.leftPoint.y-g.rightPoint.y,p=Math.hypot(h,d),m=Number(n.minimum_clearance),_=Number.isFinite(m)?m:xx.traceClearance,f=l.radius+u.radius+_-p;if(f<=Dr)return;const I=i===0?l:u,C=i===0?g.leftT:g.rightT,y=(1-C)**2+C**2;if(y<=Dr)return;const x=f/y,E=i===0?g.leftPoint:g.rightPoint,B=i===0?g.rightPoint:g.leftPoint,S=i===0?1:-1,Q=I.end.x-I.start.x,w=I.end.y-I.start.y,M=Math.hypot(Q,w),k=(I.routeIndex+(i===0?u.routeIndex:l.routeIndex))%2==0?1:-1,R=p>Dr?(E.x-B.x)/p:M>Dr?-w/M*k*S:S,F=p>Dr?(E.y-B.y)/p:M>Dr?Q/M*k*S:0;return ZJ(e,I,R*x,F*x,t,C)?{movedRouteIndex:I.routeIndex}:void 0},bco=t=>{const{srj:e,via:n,segment:o,initialTarget:i,requiredTraceDistance:r,requiredObstacleDistance:s,connMap:a}=t,A=e.obstacles.filter(u=>!u.isCopperPour&&!Ry(n.rootConnectionName,u,a)&&VL(u,e.layerCount).some(g=>n.zLayers.includes(g))),c=A.filter(u=>!!xAe(i,u,s));return[i,...c.flatMap(u=>(g=>{const{point:h,obstacle:d,requiredDistance:p}=g,m=d.center.x-d.width/2,_=d.center.x+d.width/2,f=d.center.y-d.height/2,I=d.center.y+d.height/2,C=Math.max(m-h.x,h.x-_,0),y=Math.max(f-h.y,h.y-I,0),x=[];if(C<p){const E=Math.sqrt(p*p-C*C);x.push({x:h.x,y:f-E-Dr},{x:h.x,y:I+E+Dr})}if(y<p){const E=Math.sqrt(p*p-y*y);x.push({x:m-E-Dr,y:h.y},{x:_+E+Dr,y:h.y})}return x})({point:i,obstacle:u,requiredDistance:s}))].filter(u=>{if(!q5t(u,n.radius,e.bounds))return!1;const g=G5(u,o);return!(Math.hypot(u.x-g.x,u.y-g.y)<r-Dr)&&A.every(h=>Cv(u,h)>=s-Dr)}).sort((u,g)=>Math.hypot(u.x-n.x,u.y-n.y)-Math.hypot(g.x-n.x,g.y-n.y))[0]},Sco=(t,e,n,o,i,r)=>{if(Ty(n)!=="pcb_trace_error")return!1;const s=typeof n.pcb_trace_error_id=="string"?n.pcb_trace_error_id.toLowerCase():"",a=typeof n.message=="string"?n.message.toLowerCase():"";if(!(typeof n.pcb_via_id=="string"||Array.isArray(n.pcb_via_ids)||s.includes("_via_")||a.includes("via"))||uN(n,o)!==i||oW(n,o))return!1;const A=n.worst_contact_center??n.center;if(!A||typeof A!="object")return!1;const c=A;if(typeof c.x!="number"||typeof c.y!="number")return!1;const l={x:c.x,y:c.y},u=B7($J(e),l,i),g=XJ(Iv(e),l);if(!u||!g||!g.movable||AB(g.rootConnectionName,u.rootConnectionName,r))return!1;const h=G5(g,u),d=g.x-h.x,p=g.y-h.y,m=Math.hypot(d,p),_=Number(n.minimum_clearance),f=Number.isFinite(_)?_:xx.traceClearance,I=g.radius+u.radius+f-m;if(I<=Dr)return!1;const C=u.end.x-u.start.x,y=u.end.y-u.start.y,x=Math.hypot(C,y),E=g.routeIndex%2==0?1:-1,B=m>Dr?d/m:x>Dr?-y/x*E:1,S=m>Dr?p/m:x>Dr?C/x*E:0,Q=g.radius+u.radius+f+My,w=g.radius+c8e(t)+My,M={x:g.x+B*(I+My),y:g.y+S*(I+My)},k=bco({srj:t,via:g,segment:u,initialTarget:M,requiredTraceDistance:Q,requiredObstacleDistance:w,connMap:r});return!!k&&WL(e,g,k.x-g.x,k.y-g.y,t)},Vbe=(t,e,n)=>{if(Ty(e)!=="pcb_trace_error")return;const o=tW(e),i=t[n];if(!o||!i)return;const r=B7(fAe(i,n),o);return r?{center:o,route:i,segment:r}:void 0},X5t=(t,e,n,o)=>{const i=Vbe(t,e,n);if(!i)return;const{route:r,segment:s}=i,a=Math.max(0,s.startIndex-o),A=Math.min(r.route.length-1,s.endIndex+o),c=r.route.slice(a,A+1),l=c[0],u=c.at(-1);return l&&u&&!c.some(g=>g.z!==l.z)&&l.z===u.z?{route:r,spanStartIndex:a,spanEndIndex:A,start:l,end:u}:void 0},Qco=(t,e,n,o,i,r,s=0,a,A)=>{if(r<0||r>=t.layerCount)return!1;const c=oW(n,o);if(!c)return!1;const l=c[i],u=Vbe(e,n,l);if(!u||u.segment.z===r)return!1;const{route:g,segment:h}=u;let d=h.startIndex,p=h.endIndex;for(let I=0;I<s;I+=1)g.route[d-1]?.z===h.z&&(d-=1),g.route[p+1]?.z===h.z&&(p+=1);if(d===0&&g.route[0]?.pcb_port_id&&!$L(t,g,g.route[0],a,A)||p===g.route.length-1&&g.route.at(-1)?.pcb_port_id&&!$L(t,g,g.route.at(-1),a,A))return!1;const m=g.route[d],_=g.route[p];if(!m||!_||m.z!==_.z)return!1;const f=g.route.slice(d,p+1).map(I=>({...I,z:r,pcb_port_id:void 0}));return g.route.splice(d,p-d+1,{...m},...f,{..._}),!0},vco=(t,e,n,o,i,r)=>{if(o<=0||i<=0)return!1;const s=Vbe(t,e,n);if(!s)return!1;const{center:a,route:A,segment:c}=s,l=c.end.x-c.start.x,u=c.end.y-c.start.y,g=Math.hypot(l,u);if(g<=Dr)return!1;const h=G5(a,c),d=y7(h.t-o/g,.02,.98),p=y7(h.t+o/g,.02,.98);if(d>=p)return!1;const m=E=>({x:c.start.x+l*E,y:c.start.y+u*E,z:c.z}),_=m(d),f=m(p),I=-u/g*r,C=l/g*r,y=A.route[c.startIndex],x=A.route[c.endIndex];return A.route.splice(c.startIndex,2,{...y},_,{..._,x:_.x+I*i,y:_.y+C*i},{...f,x:f.x+I*i,y:f.y+C*i},f,{...x}),!0},wco=(t,e,n,o,i,r,s,a=!1)=>{if(!Number.isInteger(i)||i<0||i>=t.layerCount)return!1;const A=tW(n),c=e[o],l=c?.route[0],u=c?.route.at(-1);if(!c||!A||!l||!u||l.z!==u.z||l.z===i||c.jumpers?.length||c.route.some(Y=>Y.z!==l.z||Y.toNextSegmentType==="through_obstacle"))return!1;const g=u.x-l.x,h=u.y-l.y,d=Math.hypot(g,h);if(d<=Dr||d>8)return!1;const p=g/d,m=h/d,_=m*r,f=-p*r,I=Y=>(Y.x-A.x)*p+(Y.y-A.y)*m,C=(Y,W,te)=>({x:A.x+p*Y+_*W,y:A.y+m*Y+f*W,z:te}),y=(c.viaDiameter??t.minViaDiameter??.3)+(t.minTraceToPadEdgeClearance??xx.traceClearance??.1),x=(a?1.25:-.75)*y,E=(a?-.75:1.25)*y,B=I(l)+.5*y*s,S=I(u)+y*s,Q=C(B,x,l.z),w=C(S,E,l.z),M=C(B,2*y,i),k=C(S,2*y,i),R=[{...l},Q,{...Q,z:i},M,k,{...w,z:i},w,{...u}],F=t.minBoardEdgeClearance??0,O=(c.viaDiameter??t.minViaDiameter??.3)/2,U=c.traceThickness/2;if([Q,w].some(Y=>ky(t,Y)+bA<O+F))return!1;for(let Y=0;Y<R.length-1;Y+=1){const W=R[Y],te=R[Y+1];if(W.z===te.z&&ib(t,W,te)+bA<U+F)return!1}return c.route.splice(0,c.route.length,...R),!0},Pco=(t,e,n,o,i,r,s)=>{if(!Number.isInteger(i)||i<1||r<=0)return!1;const a=X5t(e,n,o,i);if(!a)return!1;const{route:A,spanStartIndex:c,spanEndIndex:l,start:u,end:g}=a,h=g.x-u.x,d=g.y-u.y,p=Math.hypot(h,d);if(p<=Dr)return!1;const m=-d/p*s*r,_=h/p*s*r,f={...u,x:u.x+m,y:u.y+_,pcb_port_id:void 0},I={...g,x:g.x+m,y:g.y+_,pcb_port_id:void 0};return!(!zL(f,t.bounds)||!zL(I,t.bounds))&&(A.route.splice(c,l-c+1,{...u},f,I,{...g}),!0)},Mco=(t,e,n,o,i,r)=>{if(!Number.isInteger(i)||i<0)return!1;const s=X5t(e,n,o,i);if(!s)return!1;const{route:a,spanStartIndex:A,spanEndIndex:c,start:l,end:u}=s;return!(Math.hypot(r.x-l.x,r.y-l.y)<=Dr||Math.hypot(r.x-u.x,r.y-u.y)<=Dr||!zL(r,t.bounds))&&(a.route.splice(A,c-A+1,{...l},{x:r.x,y:r.y,z:l.z},{...u}),!0)},b7=(t,e,n,o,i,r)=>{if(r){const A=Bx(t),c=Bx(r);if(A!==c)return A<c}const s=V5t(t),a=z5t(t);return s<n||s===n&&a<o||s===n&&e<i},Z5t=(t,e,n,o,i,r,s=!0,a=!1,A=!0,c=!1)=>{let l=!1;const u=Iv(e),g=$J(e);for(const h of n){const d=tW(h);if(!d)continue;let p=d;const m=h.pcb_via_ids,_=Ty(h)==="pcb_via_clearance_error",f=Ex(h),I=Array.isArray(m)&&m.length>0,C=!_&&!f&&I&&(typeof h.pcb_trace_id=="string"||Array.isArray(h.pcb_trace_ids)),y=c&&C;if(I&&!C){p=C5t(t,h,d);const R=uN(h,o),F=m.length>1?_co(u,d):void 0;if(F){const O=a&&Ty(h)==="pcb_via_clearance_error"&&h.pcb_via_pair_net_relation==="same_net",U=s&&Ty(h)==="pcb_via_clearance_error";l=(O?fco(e,F[0],F[1],t,r):F5t(e,F[0],F[1],t,r,.16*Math.abs(i),U))||l}else{const O=XJ(u,d,R);O&&(l=Ybe(e,O,p,t)||l)}continue}const x=h.pcb_trace_id,E=uN(h,o);if(y&&E===void 0)continue;const B=Array.isArray(h.pcb_trace_ids)?h.pcb_trace_ids.filter(R=>typeof R=="string"):[];if(y&&typeof x=="string"&&E!==void 0&&B.includes(x)&&B.some(R=>R!==x&&!o.has(R))){const R=XJ(u,d,E);if(R){l=Ybe(e,R,d,t)||l;continue}}const S=s&&!C?oW(h,o):void 0;if(S){const R=B7(g,d,S[0]),F=B7(g,d,S[1]);if(R&&F&&L5t(e,R,F,t,r)){l=!0;continue}}const Q=Rbe(h),w=Q&&E!==void 0?H5t(t,e,E,d,r):void 0,M=Q?w?.segment:B7(g,d,E);if(M){const R=Q?w?.obstacle:yAe(t,d);if(Q&&!R)continue;p=Q?R?.center??d:C5t(t,h,d);const F=y?void 0:XJ(u,d),O=Ty(h)==="pcb_via_trace_clearance_error",U=typeof h.pcb_trace_error_id=="string"?h.pcb_trace_error_id.toLowerCase():"",Y=typeof h.message=="string"?h.message.toLowerCase():"",W=O||typeof h.pcb_via_id=="string"||Array.isArray(h.pcb_via_ids)||U.includes("_via_")||Y.includes("via"),te=Array.isArray(h.pcb_port_ids)&&h.pcb_port_ids.length>0;if(F&&!AB(F.rootConnectionName,M.rootConnectionName,r)&&(O||Math.hypot(F.x-d.x,F.y-d.y)<.45)&&Ube(e,F,M,t,r,.3*Math.abs(i),1,A)&&(l=!0,W&&!te))continue;l=(R!==void 0&&(Q||!Ry(M.rootConnectionName,R,r)&&eW(R,M,t.layerCount))?mco(e,M,R,t,r,i):pco(e,M,p,t,i))||l}const k=y?void 0:XJ(u,d);k&&Math.hypot(k.x-d.x,k.y-d.y)<.35&&(l=Ybe(e,k,p,t)||l)}return l},$_=1e-6,iW=.006,Dco=[1,.5,.25,.1,.05,.025],qL=(t,e)=>(e.traceThickness??t.minTraceWidth)/2,SAe=t=>t.minTraceToPadEdgeClearance??.1,e4t=(t,e)=>e.viaDiameter??t.minViaDiameter??.3,yv=(t,e)=>no(t,e)<$_,t4t=t=>{const e=[],n=o=>{e.some(i=>yv(i,o))||e.push({x:o.x,y:o.y})};for(const o of t.vias)n(o);for(let o=0;o<t.route.length-1;o+=1){const i=t.route[o],r=t.route[o+1];i&&r&&i.z!==r.z&&yv(i,r)&&n(i)}return e},QAe=t=>no({x:0,y:0},t)<$_?{x:0,y:0}:u7e({x:0,y:0},t),n4t=(t,e)=>{if(t.zLayers&&t.zLayers.length>0)return t.zLayers;const n=Array.from({length:e},(o,i)=>i).filter(o=>t.layers.includes(O5(o,e)));return n.length>0?n:Array.from({length:e},(o,i)=>i)},zbe=(t,e,n)=>AB(aB(t),aB(e),n)||AB(aB(t),e.connectionName,n)||AB(t.connectionName,aB(e),n)||AB(t.connectionName,e.connectionName,n),o4t=(t,e,n)=>Ry(aB(t),e,n)||Ry(t.connectionName,e,n),Nco=(t,e,n,o)=>!n.pcb_port_id&&t.obstacles.some(i=>o4t(e,i,o)&&n4t(i,t.layerCount).includes(n.z)&&((r,s)=>r.x>=s.center.x-s.width/2-$_&&r.x<=s.center.x+s.width/2+$_&&r.y>=s.center.y-s.height/2-$_&&r.y<=s.center.y+s.height/2+$_)(n,i)),i4t=(t,e,n,o,i)=>{if(!((s,a)=>s.zLayers.includes(a))(i,n.z))return Number.POSITIVE_INFINITY;const r=qL(t,e);return i.kind==="pad"?K8(n,o,i.obstacle)-(SAe(t)+r+iW):wc(i.center,n,o)-(SAe(t)+r+i.diameter/2+iW)},Rco=(t,e,n)=>{const o=n.kind==="pad"?n.obstacle.center:n.center,i=z_(o,t,e);let r=QAe({x:i.x-o.x,y:i.y-o.y});if(Math.abs(r.x)<$_&&Math.abs(r.y)<$_){const s=e.x-t.x,a=e.y-t.y,A=V8(t,e),c=QAe({x:-a,y:s}),l={x:-c.x,y:-c.y};r=no({x:A.x+c.x,y:A.y+c.y},o)>=no({x:A.x+l.x,y:A.y+l.y},o)?c:l}return r},rW=(t,e,n,o)=>{if(n<=0||n>=e.route.length-1){const a=e.route[n];return!a||!Nco(t,e,a,o)}const i=e.route[n];if(!i||i.insideJumperPad)return!0;const r=e.route[n-1],s=e.route[n+1];return!(!r||r.z===i.z)||!(!s||s.z===i.z)||e.vias.some(a=>yv(a,i))},r4t=(t,e,n)=>{let o=0;for(let i=0;i<e.route.length-1;i+=1){const r=e.route[i],s=e.route[i+1];if(r&&s&&r.z===s.z&&!yv(r,s))for(const a of n){const A=i4t(t,e,r,s,a);!(A>=0)&&(o+=A*A,a.kind==="pad")&&K8(r,s,a.obstacle)<$_&&(o+=.01/(wc(a.obstacle.center,r,s)+.01))}}return o},s4t=(t,e,n,o)=>{let i=0;for(let r=0;r<e.route.length-1;r+=1){const s=e.route[r],a=e.route[r+1];if(s&&a&&s.z===a.z&&!yv(s,a)){for(const A of n)if(!zbe(e,A,o)){for(let c=0;c<A.route.length-1;c+=1){const l=A.route[c],u=A.route[c+1];if(!l||!u||l.z!==s.z||u.z!==s.z||yv(l,u))continue;const g=M5(s,a,l,u)-qL(t,e)-qL(t,A),h=SAe(t)+iW-g;h>0&&(i+=h*h)}for(const c of t4t(A)){const l=wc(c,s,a)-qL(t,e)-e4t(t,A)/2,u=SAe(t)+iW-l;u>0&&(i+=u*u)}}}}return i},Tco=(t,e,n,o,i)=>{const r=e.route.map(()=>({x:0,y:0}));for(let s=0;s<e.route.length-1;s+=1){const a=e.route[s],A=e.route[s+1];if(a&&A&&a.z===A.z&&!yv(a,A)){for(const c of n){const l=i4t(t,e,a,A,c);if(l>=0)continue;const u=Rco(a,A,c);if(Math.abs(u.x)<$_&&Math.abs(u.y)<$_)continue;const g=!rW(t,e,s,i),h=!rW(t,e,s+1,i);if(!g&&!h)continue;const d=-l,p=g&&h?.5:g?1:0,m=g&&h?.5:h?1:0;r[s].x+=u.x*d*p,r[s].y+=u.y*d*p,r[s+1].x+=u.x*d*m,r[s+1].y+=u.y*d*m}for(const c of o)if(!zbe(e,c,i))for(let l=0;l<c.route.length-1;l+=1){const u=c.route[l],g=c.route[l+1];if(!u||!g||u.z!==a.z||g.z!==a.z||yv(u,g))continue;const h=M5(a,A,u,g)-qL(t,e)-qL(t,c),d=t.minTraceToPadEdgeClearance+iW-h;if(d<=0)continue;const p=V8(a,A),m=z_(p,u,g);let _=QAe({x:p.x-m.x,y:p.y-m.y});if(Math.abs(_.x)<$_&&Math.abs(_.y)<$_){const x=A.x-a.x,E=A.y-a.y;_=QAe({x:-E,y:x})}const f=!rW(t,e,s,i),I=!rW(t,e,s+1,i);if(!f&&!I)continue;const C=f&&I?.5:f?1:0,y=f&&I?.5:I?1:0;r[s].x+=_.x*d*C,r[s].y+=_.y*d*C,r[s+1].x+=_.x*d*y,r[s+1].y+=_.y*d*y}}}return r},kco=(t,e,n,o,i)=>({...e,route:e.route.map((r,s)=>{if(rW(t,e,s,i))return{...r};const a=((A,c)=>{const l=no({x:0,y:0},A);if(l<=c||l<$_)return A;const u=c/l;return{x:A.x*u,y:A.y*u}})(n[s]??{x:0,y:0},.5);return{...r,x:r.x+a.x*o,y:r.y+a.y*o}}),vias:e.vias.map(r=>({...r})),jumpers:e.jumpers?[...e.jumpers]:void 0}),Fco=(t,e)=>e.route.every(n=>n.x>=t.bounds.minX-$_&&n.x<=t.bounds.maxX+$_&&n.y>=t.bounds.minY-$_&&n.y<=t.bounds.maxY+$_),Lco=(t,e,n,o,i)=>{const r=((c,l,u,g)=>{const h=[];for(const p of c.obstacles)p.isCopperPour||o4t(u,p,g)||h.push({kind:"pad",obstacle:p,zLayers:n4t(p,c.layerCount)});const d=Array.from({length:c.layerCount},(p,m)=>m);for(const p of l)if(p!==u&&!zbe(u,p,g))for(const m of t4t(p))h.push({kind:"via",center:{x:m.x,y:m.y},diameter:e4t(c,p),zLayers:d,connectionName:p.connectionName,rootConnectionName:p.rootConnectionName});return h})(t,e,n,i),s=e.filter((c,l)=>l!==o&&c!==n);let a=n,A=r4t(t,a,r)+s4t(t,a,s,i);for(let c=0;c<160&&!(A<=$_);c+=1){const l=Tco(t,a,r,s,i);if(l.every(h=>no(h,{x:0,y:0})<1e-9))break;let u=null,g=A;for(const h of Dco){const d=kco(t,a,l,h,i),p=r4t(t,d,r)+s4t(t,d,s,i);if(p<A-1e-6&&Fco(t,d)){u=d,g=p;break}}if(!u)break;a=u,A=g}return a},xv=1e-6,Hco=[1,.5,.25,.1,.05,.025],Oco=(t,e)=>t.some(n=>e.includes(n)),Gco=(t,e,n,o)=>(Ry(t.rootConnectionName,n,o)||Ry(e.connectionName,n,o))&&Cv(t,n)<=xv,a4t=(t,e,n,o)=>{const i=[],r=e[n.routeIndex];if(!r)return i;for(const s of t.obstacles){if(s.isCopperPour||Gco(n,r,s,o))continue;const a=VL(s,t.layerCount);Oco(n.zLayers,a)&&i.push({obstacle:s})}return i},Yco=(t,e,n)=>Cv(e,n.obstacle)-(e.radius+t.minViaEdgeToPadEdgeClearance+.006),A4t=(t,e,n,o)=>Iv(e,t.minViaDiameter).filter(i=>i.routeIndex===n).reduce((i,r)=>i+((s,a,A,c)=>{let l=0;for(const u of a4t(s,a,A,c)){const g=Yco(s,A,u);!(g>=0)&&(l+=g*g,Cv(A,u.obstacle)<xv)&&(l+=.01/(no(A,u.obstacle.center)+.01))}return l})(t,e,r,o),0),Uco=(t,e,n,o)=>{const i=e[n];if(!i)return[];const r=i.route.map(()=>({x:0,y:0})),s=Iv(e,t.minViaDiameter).filter(a=>a.routeIndex===n);for(const a of s)if(a.movable)for(const A of a4t(t,e,a,o)){const c=a.radius+t.minViaEdgeToPadEdgeClearance+.006,l=xAe(a,A.obstacle,c);if(l)for(const u of a.pointIndexes)r[u].x+=l.direction.x*l.penetration,r[u].y+=l.direction.y*l.penetration}return r},Kco=(t,e,n,o)=>{const i=new Set(Iv([e],t.minViaDiameter).flatMap(r=>r.movable?r.pointIndexes:[]));return{...e,route:e.route.map((r,s)=>{if(!i.has(s))return{...r};const a=((A,c)=>{const l=no({x:0,y:0},A);if(l<=c||l<xv)return A;const u=c/l;return{x:A.x*u,y:A.y*u}})(n[s]??{x:0,y:0},.5);return{...r,x:r.x+a.x*o,y:r.y+a.y*o}}),vias:e.vias.map(r=>({...r})),jumpers:e.jumpers?[...e.jumpers]:void 0}},Vco=(t,e)=>e.route.every(n=>n.x>=t.bounds.minX-xv&&n.x<=t.bounds.maxX+xv&&n.y>=t.bounds.minY-xv&&n.y<=t.bounds.maxY+xv),zco=(t,e,n,o,i)=>{let r=n,s=A4t(t,e,o,i);for(let a=0;a<160&&!(s<=xv);a+=1){const A=Uco(t,e,o,i);if(A.every(u=>no(u,{x:0,y:0})<1e-9))break;let c=null,l=s;for(const u of Hco){const g=Kco(t,r,A,u),h=[...e];h[o]=g;const d=A4t(t,h,o,i);if(d<s-1e-6&&Vco(t,g)){c=g,l=d;break}}if(!c)break;e[o]=c,r=c,s=l}return r},Jco=[.2,.4,.8,1.2].flatMap(t=>[.2,.3,.45,.6].flatMap(e=>[-1,1].map(n=>({halfSpan:t,offset:e,directionSign:n})))),c4t=Jco.flatMap(t=>[0,1].map(e=>({kind:"segment",routeSide:e,...t}))),Jbe=[1,-1].flatMap(t=>[1,-1].flatMap(e=>[!1,!0].flatMap(n=>[0,1].map(o=>({routeSide:o,normalDirectionSign:t,tangentDirectionSign:e,reverseEndpointOffsets:n}))))),Wco=[...[0,1].map(t=>({kind:"displacementChain",routeSide:t})),...[-1,1].flatMap(t=>[0,1].map(e=>({kind:"segment",routeSide:e,halfSpan:.4,offset:1.2,directionSign:t}))),...[-1,1].flatMap(t=>[0,1].map(e=>({kind:"span",routeSide:e,spanExpansion:3,offset:1.8,directionSign:t}))),...[{dx:-2.4,dy:-.4},{dx:-2.4,dy:.4},{dx:2.4,dy:-.4},{dx:2.4,dy:.4},{dx:-.4,dy:-2.4},{dx:-.4,dy:2.4},{dx:.4,dy:-2.4},{dx:.4,dy:2.4}].flatMap(t=>[0,1].map(e=>({kind:"waypoint",routeSide:e,spanExpansion:2,...t}))),...[{dx:-.17,dy:0},{dx:.17,dy:0},{dx:0,dy:-.17},{dx:0,dy:.17}].flatMap(t=>[0,1].map(e=>({kind:"waypoint",routeSide:e,spanExpansion:0,...t}))),...c4t],Wbe=[0,1,2],S7=class extends zA{srj;inputHdRoutes;guardedInputHdRoutes;connMap;effort;drcEvaluator;referenceDrcEvaluator;autoroutingDrcEngine;viaHoleDiameter;configuredMaxIterations;enableBroadFallback;enableLargeBoardBroadFallback;enableTargetedErrorSweep;enablePostSolveClearanceRelaxation;enableSafeTraceLayerMoves;enableViaInPadLayerMoves;enableTraceViaOwnerTargeting;outputHdRoutes;initialDrcIssueCount;initialRepairDrcIssueCount;initialLowCountErrorsHaveMovableTraces=!1;broadForceAccepted=!1;targetedForceAccepted=!1;candidateAttempts=0;viaInPadCandidateAttempts=0;viaInPadCandidatesAccepted=0;padTopologyErrorCursor=0;safeTraceLayerCursorByErrorId=new Map;traceLayerCorridorCursorByErrorId=new Map;tracePairDetourCursorByErrorId=new Map;errorCursor=0;stalledIterations=0;bestDrcIssueCountSeen;bestDrcIssueScoreSeen;lastDrcCountImprovementCheckIteration=0;drcCountPlateauChecks=0;largeBoardBroadFallbackMisses=0;outputSnapshot;legacyCleanCheckpoint;viaPadRepairRolledBack=!1;referenceInputDrcIssueCount;referenceCandidateDrcIssueCount;referenceCandidateRolledBack=!1;referenceInputSnapshot;inputSnapshot;constructor(t){if(super(),this.srj=t.srj,this.inputHdRoutes=t.hdRoutes,this.guardedInputHdRoutes=rb(x7(t.hdRoutes)),this.connMap=t.connMap,this.effort=t.effort??1,this.drcEvaluator=t.drcEvaluator,this.referenceDrcEvaluator=t.referenceDrcEvaluator,this.autoroutingDrcEngine=t.autoroutingDrcEngine??(t.drcEvaluator?void 0:new fJ(t.srj,{connMap:t.connMap,traceClearance:t.srj.minTraceToPadEdgeClearance??xx.traceClearance,viaClearance:t.srj.minTraceToPadEdgeClearance??xx.viaClearance,includeTraceViaOwnerMetadata:t.enableTraceViaOwnerTargeting??!1})),t.viaHoleDiameter!==void 0&&(!Number.isFinite(t.viaHoleDiameter)||t.viaHoleDiameter<=0))throw new Error("viaHoleDiameter must be a positive finite number");this.viaHoleDiameter=t.viaHoleDiameter,this.configuredMaxIterations=t.maxIterations,this.enableBroadFallback=t.enableBroadFallback??!0,this.enableLargeBoardBroadFallback=t.enableLargeBoardBroadFallback??!0,this.enableTargetedErrorSweep=t.enableTargetedErrorSweep??!1,this.enablePostSolveClearanceRelaxation=t.enablePostSolveClearanceRelaxation??!0,this.enableSafeTraceLayerMoves=t.enableSafeTraceLayerMoves??!1,this.enableViaInPadLayerMoves=t.enableViaInPadLayerMoves??!1,this.enableTraceViaOwnerTargeting=t.enableTraceViaOwnerTargeting??!1,this.outputHdRoutes=t.hdRoutes,this.referenceDrcEvaluator&&(this.referenceInputSnapshot=this.getReferenceDrcSnapshot(this.inputHdRoutes)),this.MAX_ITERATIONS=this.configuredMaxIterations??RCt(this.effort)}getConstructorParams(){return[{srj:this.srj,hdRoutes:this.inputHdRoutes,connMap:this.connMap,effort:this.effort,drcEvaluator:this.drcEvaluator,referenceDrcEvaluator:this.referenceDrcEvaluator,autoroutingDrcEngine:this.autoroutingDrcEngine,viaHoleDiameter:this.viaHoleDiameter,maxIterations:this.configuredMaxIterations,enableBroadFallback:this.enableBroadFallback,enableLargeBoardBroadFallback:this.enableLargeBoardBroadFallback,enableTargetedErrorSweep:this.enableTargetedErrorSweep,enablePostSolveClearanceRelaxation:this.enablePostSolveClearanceRelaxation,enableSafeTraceLayerMoves:this.enableSafeTraceLayerMoves,enableViaInPadLayerMoves:this.enableViaInPadLayerMoves,enableTraceViaOwnerTargeting:this.enableTraceViaOwnerTargeting}]}updateStats(t){this.stats={initialDrcIssueCount:this.initialDrcIssueCount??t.count,finalDrcIssueCount:t.count,globalDrcForceImproveMaxIterations:this.MAX_ITERATIONS,globalDrcForceImproveBroadForceAccepted:this.broadForceAccepted,globalDrcForceImproveTargetedForceAccepted:this.targetedForceAccepted,globalDrcForceImproveCandidateAttempts:this.candidateAttempts,globalDrcForceImproveViaInPadCandidateAttempts:this.viaInPadCandidateAttempts,globalDrcForceImproveViaInPadCandidatesAccepted:this.viaInPadCandidatesAccepted,globalDrcForceImproveStalledIterations:this.stalledIterations,globalDrcForceImproveBestDrcIssueCountSeen:this.bestDrcIssueCountSeen??t.count,globalDrcForceImproveBestDrcIssueScoreSeen:this.bestDrcIssueScoreSeen??t.issueScore,globalDrcForceImproveDrcCountPlateauChecks:this.drcCountPlateauChecks,globalDrcForceImproveLargeBoardBroadFallbackMisses:this.largeBoardBroadFallbackMisses,globalDrcForceImproveViaPadRepairRolledBack:this.viaPadRepairRolledBack,globalDrcForceImproveReferenceInputDrcIssueCount:this.referenceInputDrcIssueCount,globalDrcForceImproveReferenceCandidateDrcIssueCount:this.referenceCandidateDrcIssueCount,globalDrcForceImproveReferenceCandidateRolledBack:this.referenceCandidateRolledBack}}finishAtLegacyCleanCheckpoint(){const t=this.legacyCleanCheckpoint;return!!t&&(this.outputHdRoutes=t.routes,this.outputSnapshot=t.snapshot,this.viaPadRepairRolledBack=!0,this.updateStats(t.snapshot),this.solved=!0,!0)}increaseMaxIterationsForDrcIssueCount(t){this.configuredMaxIterations===void 0?this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,((e,n)=>Math.max(RCt(n),Math.ceil(e*roo*Math.max(1,n))))(t,this.effort),((e,n)=>e>120&&n>0?192:48)(this.inputHdRoutes.length,t)):this.MAX_ITERATIONS=this.configuredMaxIterations}getSnapshot(t){return(this.initialLowCountErrorsHaveMovableTraces?lco:E7)(this.srj,t,this.drcEvaluator,this.connMap,this.autoroutingDrcEngine)}getReferenceDrcSnapshot(t){const e={traces:[],srj:this.srj,routes:t,hdRoutes:t},n=this.referenceDrcEvaluator?.getCachedResult?.(e);if(n){const o=Array.isArray(n)?n:n.errors;return{errors:o,count:o.length}}return E7(this.srj,t,this.referenceDrcEvaluator,this.connMap,this.autoroutingDrcEngine)}getViaIssueCount(t){return Kbe(t,!1)}getRepairIssueCount(t){return V5t(t)}getRepairIssueScore(t){return z5t(t)}acceptSolvedRoutes(t,e){const n=this.enablePostSolveClearanceRelaxation?((c,l,u)=>{if(c.minTraceToPadEdgeClearance===void 0||c.minTraceToPadEdgeClearance<=0)return l;let g=!1;const h=x7(l);for(let d=0;d<4;d+=1)for(let p=0;p<h.length;p+=1){const m=h[p];if(!m)continue;const _=Lco(c,h,m,p,u);_!==m&&(h[p]=_,g=!0)}return g?h:l})(this.srj,t,this.connMap):t,o=this.enablePostSolveClearanceRelaxation?((c,l,u)=>{if(c.minViaEdgeToPadEdgeClearance===void 0||c.minViaEdgeToPadEdgeClearance<=0)return l;let g=!1;const h=x7(l);for(let d=0;d<4;d+=1)for(let p=0;p<h.length;p+=1){const m=h[p];if(!m)continue;const _=zco(c,h,m,p,u);_!==m&&(h[p]=_,g=!0)}return g?rb(h):l})(this.srj,n,this.connMap):t,i=o===t?e:this.getSnapshot(o),r=i.count<e.count||i.count===e.count&&i.issueScore<=e.issueScore;let s=r?o:t,a=r?i:e;const A=this.inputSnapshot??this.getSnapshot(this.guardedInputHdRoutes);if(this.referenceDrcEvaluator){const c=this.referenceInputSnapshot,l=this.getReferenceDrcSnapshot(s);this.referenceInputDrcIssueCount=c.count,this.referenceCandidateDrcIssueCount=l.count,l.count>c.count&&(s=this.guardedInputHdRoutes,a=A,this.referenceCandidateRolledBack=!0)}this.outputHdRoutes=s,this.outputSnapshot=a,this.stalledIterations=0,this.updateStats(a),this.solved=!0}updateDrcCountPlateauState(t){const e=this.getRepairIssueCount(t),n=this.getRepairIssueScore(t);this.bestDrcIssueCountSeen??=e,this.bestDrcIssueScoreSeen??=n;const o=this.initialRepairDrcIssueCount??e,i=this.inputHdRoutes.length>120&&o>0;if((o>=20||i)&&this.iterations<192)return(e<this.bestDrcIssueCountSeen||e===this.bestDrcIssueCountSeen&&n<this.bestDrcIssueScoreSeen)&&(this.bestDrcIssueCountSeen=e,this.bestDrcIssueScoreSeen=n),void(i&&this.largeBoardBroadFallbackMisses>=2&&(this.solved=!0));const r=(s=>s>=20?8:s<=2?1:2)(o);if(!(this.iterations-this.lastDrcCountImprovementCheckIteration<r)){if(this.lastDrcCountImprovementCheckIteration=this.iterations,e<this.bestDrcIssueCountSeen||e===this.bestDrcIssueCountSeen&&n<this.bestDrcIssueScoreSeen)return this.bestDrcIssueCountSeen=e,this.bestDrcIssueScoreSeen=n,void(this.drcCountPlateauChecks=0);this.drcCountPlateauChecks+=1,this.drcCountPlateauChecks>=2&&(this.solved=!0)}}_step(){let t=this.outputHdRoutes,e=this.outputSnapshot??this.getSnapshot(t);const n=Bx(e);if(this.legacyCleanCheckpoint&&n>0)return void this.finishAtLegacyCleanCheckpoint();if(!this.legacyCleanCheckpoint&&n===0&&e.errors.some(Ex)&&(this.legacyCleanCheckpoint={routes:rb(x7(t)),snapshot:e}),this.initialDrcIssueCount===void 0){this.inputSnapshot=e,this.initialDrcIssueCount=e.count,this.initialRepairDrcIssueCount=this.getRepairIssueCount(e);const R=J5t(e.errors);this.initialLowCountErrorsHaveMovableTraces=this.initialRepairDrcIssueCount>0&&this.initialRepairDrcIssueCount<=3&&R.every(F=>uN(F,e.traceRouteIndexById)!==void 0),this.initialLowCountErrorsHaveMovableTraces&&(e=this.getSnapshot(t)),this.bestDrcIssueCountSeen=this.getRepairIssueCount(e),this.bestDrcIssueScoreSeen=this.getRepairIssueScore(e),this.increaseMaxIterationsForDrcIssueCount(this.getRepairIssueCount(e))}if(e.count===0)return void this.acceptSolvedRoutes(t,e);let o=this.getRepairIssueCount(e),i=this.getRepairIssueScore(e),r=this.getViaIssueCount(e);const s=e.errors.filter(R=>!!tW(R));if(s.length===0)return void this.acceptSolvedRoutes(t,e);const a=(A=this.effort,Math.max(1,Math.round(3*Math.max(1,A))));var A;let c=0,l=0,u=!1,g=!1,h=!1;const d=J5t(s),p=this.enableTargetedErrorSweep?d.find(R=>R.type==="pcb_via_clearance_error"&&R.pcb_via_pair_net_relation==="same_net"):void 0,m=this.enableTargetedErrorSweep&&(this.iterations-1)%8==0,_=p??(m?d.find(R=>R.type==="pcb_via_clearance_error"):void 0),f=_?[_,...d.filter(R=>R!==_)]:d,I=Math.min(f.length,Math.max(1,Math.ceil(this.effort))),C=_?0:this.errorCursor%f.length,y=this.enableTargetedErrorSweep?((R,F)=>{const O=Math.max(2,Math.round(12*Math.max(1,F)));return R.filter(U=>Ty(U)==="pcb_trace_error").slice(0,O)})(s,this.effort):[],x=o<=1||this.initialLowCountErrorsHaveMovableTraces,E=!this.initialLowCountErrorsHaveMovableTraces&&o<=8&&this.srj.layerCount>1,B=_?[]:s.filter(R=>R.type==="pcb_pad_trace_clearance_error"||(this.enableSafeTraceLayerMoves||x||E)&&R.type==="pcb_trace_error"),S=B.map((R,F)=>B[(this.padTopologyErrorCursor+F)%B.length]);for(const R of this.enableSafeTraceLayerMoves||this.enableViaInPadLayerMoves?S:[]){const F=!this.enableSafeTraceLayerMoves||l>=a,O=!this.enableViaInPadLayerMoves||c>=a;if(g||F&&O)break;let U;this.padTopologyErrorCursor=(B.indexOf(R)+1)%B.length;const Y=typeof R.pcb_trace_error_id=="string"?R.pcb_trace_error_id:typeof R.pcb_trace_id=="string"?R.pcb_trace_id:void 0,W=uN(R,e.traceRouteIndexById),te=oW(R,e.traceRouteIndexById);if(this.enableSafeTraceLayerMoves&&W!==void 0){const J=te??[W],oe=J.length*this.srj.layerCount*Wbe.length,ie=J.length*this.srj.layerCount*$5t,ne=oe+ie,le=Rbe(R),ge=le?0:oe,_e=le?ie:0;let ue=Y?this.safeTraceLayerCursorByErrorId.get(Y)??0:0,fe=0;for(;l<a&&fe<ne;){const pe=ue;ue=(ue+1)%ne,fe+=1;const ye=pe>=ge&&pe<ge+ie,Me=pe-(ye?ge:_e),ve=Me%J.length,he=Math.floor(Me/J.length),Qe=he%this.srj.layerCount,Pe=ye?"full":Wbe[Math.floor(he/this.srj.layerCount)%Wbe.length],we=ye?Math.floor(he/this.srj.layerCount):0,Te=J[ve],Re=UL(t,[Te]);if(!yco(this.srj,Re,R,Te,Qe,Pe,this.connMap,we))continue;const Ee=jL(Re,[Te]);l+=1,this.candidateAttempts+=1;const ke=this.getSnapshot(Ee),Ce=this.getViaIssueCount(ke),Le=U?.snapshot??e;Ce<=(U?.viaIssueCount??r)&&nW(ke,Le)&&(U={routes:Ee,snapshot:ke,viaIssueCount:Ce,usesViaInPad:!1})}Y&&this.safeTraceLayerCursorByErrorId.set(Y,ue)}if(this.enableSafeTraceLayerMoves&&E&&Y&&te){let J=this.traceLayerCorridorCursorByErrorId.get(Y)??0,oe=0;for(;c<a&&oe<Jbe.length;){const ie=Jbe[J%Jbe.length];J+=1,oe+=1;const ne=te[ie.routeSide],le=t[ne]?.route[0]?.z;if(le===void 0)continue;const ge=(le+1)%this.srj.layerCount,_e=UL(t,[ne]);if(!wco(this.srj,_e,R,ne,ge,ie.normalDirectionSign,ie.tangentDirectionSign,ie.reverseEndpointOffsets))continue;const ue=jL(_e,[ne]);c+=1,this.candidateAttempts+=1;const fe=this.getSnapshot(ue),pe=this.getViaIssueCount(fe),ye=U?.snapshot??e;pe<=(U?.viaIssueCount??r)&&nW(fe,ye)&&(U={routes:ue,snapshot:fe,viaIssueCount:pe,usesViaInPad:!1})}this.traceLayerCorridorCursorByErrorId.set(Y,J)}if(this.enableSafeTraceLayerMoves&&x&&Y&&(this.initialLowCountErrorsHaveMovableTraces&&(te||W!==void 0)||!this.initialLowCountErrorsHaveMovableTraces&&te)){const J=this.initialLowCountErrorsHaveMovableTraces?Wco:c4t,oe=te??[W];let ie=this.tracePairDetourCursorByErrorId.get(Y)??0,ne=0;for(;c<a&&ne<J.length;){const le=J[ie%J.length];ie+=1,ne+=1;const ge=oe[le.routeSide];if(ge===void 0)continue;const _e=this.initialLowCountErrorsHaveMovableTraces&&R.worst_contact_center?{...R,center:R.worst_contact_center,message:R.worst_contact_message??R.message,actual_clearance:R.worst_actual_clearance??R.actual_clearance}:R;if(le.kind==="displacementChain"){const Qe=x7(t),Pe=Bco(this.srj,Qe,_e,e.traceRouteIndexById,le.routeSide);if(!Pe)continue;u=!0,c+=1,this.candidateAttempts+=1;let we=rb(Qe),Te=this.getSnapshot(we),Re=this.getViaIssueCount(Te),Ee=this.getRepairIssueCount(Te);if(Ee>0&&Ee<=3&&c<a){const Le=x7(we);let Ye=!1;for(const tt of Te.errors)Ye=Sco(this.srj,Le,tt,Te.traceRouteIndexById,Pe.movedRouteIndex,this.connMap)||Ye;if(Ye){c+=1,this.candidateAttempts+=1;const tt=rb(Le),At=this.getSnapshot(tt),at=this.getViaIssueCount(At);b7(At,at,Ee,this.getRepairIssueScore(Te),Re,Te)&&(we=tt,Te=At,Re=at,Ee=this.getRepairIssueCount(Te))}}const ke=U?this.getRepairIssueCount(U.snapshot):o,Ce=U?this.getRepairIssueScore(U.snapshot):i;if(b7(Te,Re,ke,Ce,U?.viaIssueCount??r,U?.snapshot??e)&&(U={routes:we,snapshot:Te,viaIssueCount:Re,usesViaInPad:!1}),Ee===0)break;continue}const ue=UL(t,[ge]);if(!(le.kind==="segment"?vco(ue,_e,ge,le.halfSpan,le.offset,le.directionSign):le.kind==="span"?Pco(this.srj,ue,_e,ge,le.spanExpansion,le.offset,le.directionSign):Mco(this.srj,ue,_e,ge,le.spanExpansion,{x:_e.center.x+le.dx,y:_e.center.y+le.dy})))continue;const fe=jL(ue,[ge]);u=!0,c+=1,this.candidateAttempts+=1;const pe=this.getSnapshot(fe),ye=this.getViaIssueCount(pe),Me=U?this.getRepairIssueCount(U.snapshot):o,ve=U?this.getRepairIssueScore(U.snapshot):i,he=U?.viaIssueCount??r;(this.initialLowCountErrorsHaveMovableTraces?b7(pe,ye,Me,ve,he,U?.snapshot??e):ye<=he&&nW(pe,U?.snapshot??e))&&(U={routes:fe,snapshot:pe,viaIssueCount:ye,usesViaInPad:!1})}this.tracePairDetourCursorByErrorId.set(Y,ie)}for(const J of this.enableViaInPadLayerMoves?["start","end"]:[]){if(c>=a||W===void 0)break;const oe=UL(t,[W]);if(!Eco(this.srj,oe,R,e.traceRouteIndexById,J,this.connMap,this.viaHoleDiameter))continue;const ie=jL(oe,[W]);this.viaInPadCandidateAttempts+=1,c+=1,this.candidateAttempts+=1;const ne=this.getSnapshot(ie),le=this.getViaIssueCount(ne),ge=U?this.getRepairIssueCount(U.snapshot):o,_e=U?this.getRepairIssueScore(U.snapshot):i;b7(ne,le,ge,_e,U?.viaIssueCount??r,U?.snapshot??e)&&(U={routes:ie,snapshot:ne,viaIssueCount:le,usesViaInPad:!0})}const j=this.enableViaInPadLayerMoves?this.srj.layerCount:0;for(let J=0;J<j&&!(c>=a)&&W!==void 0;J+=1){const oe=UL(t,[W]);if(!xco(this.srj,oe,R,e.traceRouteIndexById,J,this.connMap,this.viaHoleDiameter))continue;const ie=jL(oe,[W]);this.viaInPadCandidateAttempts+=1,c+=1,this.candidateAttempts+=1;const ne=this.getSnapshot(ie),le=this.getViaIssueCount(ne),ge=U?this.getRepairIssueCount(U.snapshot):o,_e=U?this.getRepairIssueScore(U.snapshot):i;b7(ne,le,ge,_e,U?.viaIssueCount??r,U?.snapshot??e)&&(U={routes:ie,snapshot:ne,viaIssueCount:le,usesViaInPad:!0})}if(this.enableViaInPadLayerMoves&&x&&te){const J=this.iterations%2==0?[0,1]:[1,0],oe=this.iterations%3;for(const ie of J)for(let ne=0;ne<this.srj.layerCount&&!(c>=a);ne+=1){const le=te[ie],ge=UL(t,[le]);if(!Qco(this.srj,ge,R,e.traceRouteIndexById,ie,ne,oe,this.connMap,this.viaHoleDiameter))continue;const _e=jL(ge,[le]);this.viaInPadCandidateAttempts+=1,c+=1,this.candidateAttempts+=1;const ue=this.getSnapshot(_e),fe=this.getViaIssueCount(ue),pe=U?this.getRepairIssueCount(U.snapshot):o,ye=U?this.getRepairIssueScore(U.snapshot):i;b7(ue,fe,pe,ye,U?.viaIssueCount??r,U?.snapshot??e)&&(U={routes:_e,snapshot:ue,viaIssueCount:fe,usesViaInPad:!0})}}U&&(t=U.routes,e=U.snapshot,o=this.getRepairIssueCount(e),i=this.getRepairIssueScore(e),r=U.viaIssueCount,this.targetedForceAccepted=!0,U.usesViaInPad&&(this.viaInPadCandidatesAccepted+=1),g=!0)}if(!g&&y.length>=2){const R=x7(t);let F=!1;for(const O of y)F=Z5t(this.srj,R,[O],e.traceRouteIndexById,1,this.connMap,!0,this.enableTargetedErrorSweep,!1,this.enableTraceViaOwnerTargeting)||F;if(F){const O=rb(R);c+=1,this.candidateAttempts+=1;const U=this.getSnapshot(O),Y=this.getViaIssueCount(U);if(b7(U,Y,o,i,r,e)&&(t=O,e=U,o=this.getRepairIssueCount(U),i=this.getRepairIssueScore(U),r=Y,this.targetedForceAccepted=!0,g=!0,U.count===0))return void this.acceptSolvedRoutes(t,e)}}for(let R=0;R<I&&c<a&&!g;R+=1){const F=(C+R)%f.length,O=f[F];if(!O)continue;this.errorCursor=(F+1)%f.length;const U=o===1;for(const Y of soo(this.effort)){if(c>=a)break;const W=x7(t);if(!Z5t(this.srj,W,[O],e.traceRouteIndexById,Y,this.connMap,!0,this.enableTargetedErrorSweep,U,this.enableTraceViaOwnerTargeting))continue;const te=rb(W);c+=1,this.candidateAttempts+=1;const j=this.getSnapshot(te),J=this.getViaIssueCount(j);if(b7(j,J,o,i,r,e)){if(t=te,e=j,o=this.getRepairIssueCount(j),i=this.getRepairIssueScore(j),r=J,this.targetedForceAccepted=!0,g=!0,j.count===0)return void this.acceptSolvedRoutes(t,e);break}}if(g)break}const Q=t.length<=120,w=(M=s.length,Math.max(16,Math.min(64,2*M)));var M;const k=this.enableLargeBoardBroadFallback&&this.MAX_ITERATIONS>=192&&!Q&&this.stalledIterations>0&&this.stalledIterations%w===0;if(this.enableBroadFallback&&!g&&(Q||this.effort>=2&&this.stalledIterations>=2||k)){h=k;for(const R of[1,2]){const F=G5t(this.srj,t,this.effort,R,this.connMap,this.drcEvaluator===void 0,!1);if(F===t)continue;const O=this.getSnapshot(F),U=this.getViaIssueCount(O);if(b7(O,U,o,i,r,e)&&(t=F,e=O,o=this.getRepairIssueCount(O),i=this.getRepairIssueScore(O),r=U,this.broadForceAccepted=!0,g=!0,O.count===0))return void this.acceptSolvedRoutes(t,e)}}g?this.largeBoardBroadFallbackMisses=0:h&&(this.largeBoardBroadFallbackMisses+=1),this.outputHdRoutes=t,this.outputSnapshot=e,this.stalledIterations=g?0:this.stalledIterations+1,u||this.updateDrcCountPlateauState(e),this.updateStats(e),(this.solved||o===0)&&this.acceptSolvedRoutes(t,e)}tryFinalAcceptance(){const t=this.outputSnapshot??this.getSnapshot(this.outputHdRoutes);this.legacyCleanCheckpoint&&Bx(t)>0&&this.finishAtLegacyCleanCheckpoint()||this.acceptSolvedRoutes(this.outputHdRoutes,t)}getOutput(){return this.outputHdRoutes}visualize(){return super.visualize()}preview(){return this.visualize()}},jbe=class extends zA{params;inputHdRoutes;guardedInputHdRoutes;broadMaxIterations;broadPassMultiplier;autoroutingDrcEngine;legacyDrcEvaluator;outputHdRoutes;phase="start";inputSnapshot;baselineSolver;baselineSnapshot;broadInputSnapshot;broadSnapshot;broadSolver;safeTraceLayerInputRoutes;safeTraceLayerInputSnapshot;safeTraceLayerSolver;safeTraceLayerPhaseAccepted=!1;mixedSafeTraceLayerSolver;mixedSafeTraceLayerPhaseAccepted=!1;legacySafeTraceLayerRoutes;legacySafeTraceLayerSnapshot;legacySafeTraceLayerSelectedSolver;viaInPadSolver;portfolioSelectedSolver;selectedSolver;referenceInputDrcIssueCount;referenceCandidateDrcIssueCount;referenceCandidateRolledBack=!1;mixedReferenceInputDrcIssueCount;mixedReferenceCandidateDrcIssueCount;referenceInputSnapshot;constructor(e){if(super(),!Number.isFinite(e.broadPassMultiplier))throw new Error("broadPassMultiplier must be a finite number");if(e.broadPassMultiplier<=0)throw new Error("broadPassMultiplier must be greater than zero");if(!Number.isInteger(e.broadMaxIterations))throw new Error("broadMaxIterations must be an integer");if(e.broadMaxIterations<=0)throw new Error("broadMaxIterations must be greater than zero");if(e.viaInPadMaxIterations!==void 0&&!Number.isInteger(e.viaInPadMaxIterations))throw new Error("viaInPadMaxIterations must be an integer");if(e.viaInPadMaxIterations!==void 0&&e.viaInPadMaxIterations<=0)throw new Error("viaInPadMaxIterations must be greater than zero");this.autoroutingDrcEngine=e.autoroutingDrcEngine??(e.drcEvaluator?void 0:new fJ(e.srj,{connMap:e.connMap,traceClearance:e.srj.minTraceToPadEdgeClearance??xx.traceClearance,viaClearance:e.srj.minTraceToPadEdgeClearance??xx.viaClearance,includeTraceViaOwnerMetadata:e.enableTraceViaOwnerTargeting??!1})),this.legacyDrcEvaluator=n=>{const o=e.drcEvaluator?.evaluateLegacy??e.drcEvaluator,i=o?o(n):this.autoroutingDrcEngine.evaluateLegacy(n.traces),r=Array.isArray(i)?i:i.errors,s=Array.isArray(i)?i:i.errorsWithCenters??i.errors;return{errors:r.filter(a=>!Ex(a)),errorsWithCenters:s.filter(a=>!Ex(a))}},this.params={...e,autoroutingDrcEngine:this.autoroutingDrcEngine},this.inputHdRoutes=e.hdRoutes,this.guardedInputHdRoutes=rb(x7(e.hdRoutes)),this.broadMaxIterations=e.broadMaxIterations,this.broadPassMultiplier=e.broadPassMultiplier,this.outputHdRoutes=e.hdRoutes,this.params.referenceDrcEvaluator&&(this.referenceInputSnapshot=this.getReferenceDrcSnapshot(this.inputHdRoutes))}getConstructorParams(){return[{...this.params,hdRoutes:this.inputHdRoutes}]}stepBranch(e,n){if(this.activeSubSolver=e,e.step(),e.failed)throw new Error(`${n} DRC repair branch failed: ${e.error}`)}getReferenceDrcSnapshot(e){const n={traces:[],srj:this.params.srj,routes:e,hdRoutes:e},o=this.params.referenceDrcEvaluator?.getCachedResult?.(n);if(o){const i=Array.isArray(o)?o:o.errors;return{errors:i,count:i.length}}return E7(this.params.srj,e,this.params.referenceDrcEvaluator,this.params.connMap,this.autoroutingDrcEngine)}finishWithOutput(e,n,o){let i=e,r=n;if(this.params.referenceDrcEvaluator){const s=this.referenceInputSnapshot,a=this.getReferenceDrcSnapshot(i);this.referenceInputDrcIssueCount=s.count,this.referenceCandidateDrcIssueCount=a.count,(a.count>s.count||a.count===s.count&&((A,c)=>{const l=new Set(c.map(K5t));return A.some(u=>!l.has(K5t(u)))})(a.errors,s.errors))&&(i=this.guardedInputHdRoutes,r=this.inputSnapshot,this.referenceCandidateRolledBack=!0)}this.outputHdRoutes=i,this.selectedSolver=o,this.activeSubSolver=null,this.phase="done",this.progress=1,this.stats={...this.portfolioSelectedSolver?.stats??{},...o?.stats??{},finalDrcIssueCount:r.count,drcBranchPortfolioInitialDrcIssueCount:this.inputSnapshot?.count??n.count,drcBranchPortfolioBaselineDrcIssueCount:this.baselineSnapshot?.count??n.count,drcBranchPortfolioBroadInitialDrcIssueCount:this.broadInputSnapshot?.count,drcBranchPortfolioBroadFinalDrcIssueCount:this.broadSnapshot?.count,drcBranchPortfolioBroadMaxIterations:this.broadMaxIterations,drcBranchPortfolioBroadBranchAttempted:!!this.broadSolver,drcBranchPortfolioBroadBranchAccepted:this.portfolioSelectedSolver!==void 0&&this.portfolioSelectedSolver===this.broadSolver,drcBranchPortfolioSafeTraceLayerPhaseAttempted:!!this.safeTraceLayerSolver,drcBranchPortfolioSafeTraceLayerPhaseAccepted:this.safeTraceLayerPhaseAccepted,drcBranchPortfolioMixedSafeTraceLayerPhaseAttempted:!!this.mixedSafeTraceLayerSolver,drcBranchPortfolioMixedSafeTraceLayerPhaseAccepted:this.mixedSafeTraceLayerPhaseAccepted,drcBranchPortfolioViaInPadPhaseAttempted:!!this.viaInPadSolver,drcBranchPortfolioViaInPadMaxIterations:this.params.viaInPadMaxIterations,drcBranchPortfolioFinalNonViaPadDrcIssueCount:Bx(r),drcBranchPortfolioReferenceInputDrcIssueCount:this.referenceInputDrcIssueCount,drcBranchPortfolioReferenceCandidateDrcIssueCount:this.referenceCandidateDrcIssueCount,drcBranchPortfolioReferenceCandidateRolledBack:this.referenceCandidateRolledBack,drcBranchPortfolioMixedReferenceInputDrcIssueCount:this.mixedReferenceInputDrcIssueCount,drcBranchPortfolioMixedReferenceCandidateDrcIssueCount:this.mixedReferenceCandidateDrcIssueCount},this.solved=!0}startBaselineBranch(){this.baselineSolver=new S7({...this.params,hdRoutes:this.inputHdRoutes,drcEvaluator:this.legacyDrcEvaluator,referenceDrcEvaluator:void 0,enableSafeTraceLayerMoves:!1,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.baselineSolver,this.phase="baseline"}startSafeTraceLayerPhase(e,n,o){this.portfolioSelectedSolver=o,this.params.enableSafeTraceLayerMoves?(this.safeTraceLayerInputRoutes=e,this.safeTraceLayerInputSnapshot=n,this.safeTraceLayerSolver=new S7({...this.params,hdRoutes:e,drcEvaluator:this.legacyDrcEvaluator,referenceDrcEvaluator:void 0,maxIterations:this.params.viaInPadMaxIterations??this.params.maxIterations,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.safeTraceLayerSolver,this.phase="safeTraceLayer"):this.startViaInPadPhase(e,n,o)}startViaInPadPhase(e,n,o){this.portfolioSelectedSolver=o;const i=this.params.enableViaInPadLayerMoves&&this.params.viaInPadDrcEvaluator!==void 0;n.errors.some(Ex)||i?(this.viaInPadSolver=new S7({...this.params,hdRoutes:e,drcEvaluator:this.params.viaInPadDrcEvaluator??this.params.drcEvaluator,maxIterations:this.params.viaInPadMaxIterations??this.params.maxIterations,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!1,enableViaInPadLayerMoves:this.params.enableViaInPadLayerMoves}),this.activeSubSolver=this.viaInPadSolver,this.phase="viaInPad"):this.finishWithOutput(e,n,o)}startMixedSafeTraceLayerPhase(e,n,o){this.legacySafeTraceLayerRoutes=e,this.legacySafeTraceLayerSnapshot=n,this.legacySafeTraceLayerSelectedSolver=o,this.mixedSafeTraceLayerSolver=new S7({...this.params,hdRoutes:this.safeTraceLayerInputRoutes,drcEvaluator:this.params.drcEvaluator,referenceDrcEvaluator:void 0,maxIterations:this.params.viaInPadMaxIterations??this.params.maxIterations,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.mixedSafeTraceLayerSolver,this.phase="mixedSafeTraceLayer"}startBroadBranch(){const e=G5t(this.params.srj,this.inputHdRoutes,this.params.effort??1,this.broadPassMultiplier,this.params.connMap);this.broadInputSnapshot=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),nW(this.broadInputSnapshot,this.baselineSnapshot)?(this.broadSolver=new S7({...this.params,hdRoutes:e,drcEvaluator:this.legacyDrcEvaluator,referenceDrcEvaluator:void 0,maxIterations:this.broadMaxIterations,enableSafeTraceLayerMoves:!1,enableViaInPadLayerMoves:!1}),this.activeSubSolver=this.broadSolver,this.phase="broad"):this.startSafeTraceLayerPhase(this.baselineSolver.getOutput(),this.baselineSnapshot,this.baselineSolver)}_step(){if(this.phase==="start")return this.inputSnapshot=E7(this.params.srj,this.inputHdRoutes,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),Bx(this.inputSnapshot)===0?void this.startViaInPadPhase(this.inputHdRoutes,this.inputSnapshot):void this.startBaselineBranch();if(this.phase==="baseline"){if(this.stepBranch(this.baselineSolver,"baseline"),!this.baselineSolver.solved)return;const e=this.baselineSolver.getOutput();return this.baselineSnapshot=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),Bx(this.baselineSnapshot)===0?void this.startViaInPadPhase(e,this.baselineSnapshot,this.baselineSolver):void(this.params.enableSafeTraceLayerMoves&&this.baselineSnapshot.count<=3?this.startSafeTraceLayerPhase(e,this.baselineSnapshot,this.baselineSolver):this.startBroadBranch())}if(this.phase==="broad"){if(this.stepBranch(this.broadSolver,"broad"),!this.broadSolver.solved)return;const e=this.broadSolver.getOutput();return this.broadSnapshot=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),nW(this.broadSnapshot,this.baselineSnapshot)?void this.startSafeTraceLayerPhase(e,this.broadSnapshot,this.broadSolver):void this.startSafeTraceLayerPhase(this.baselineSolver.getOutput(),this.baselineSnapshot,this.baselineSolver)}if(this.phase==="safeTraceLayer"){if(this.stepBranch(this.safeTraceLayerSolver,"safe trace-layer"),!this.safeTraceLayerSolver.solved)return;const e=this.safeTraceLayerSolver.getOutput(),n=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),o=Kbe(this.safeTraceLayerInputSnapshot),i=Kbe(n);this.safeTraceLayerPhaseAccepted=i<=o&&b7(n,i,this.safeTraceLayerInputSnapshot.count,this.safeTraceLayerInputSnapshot.issueScore,o);const r=this.safeTraceLayerPhaseAccepted?e:this.safeTraceLayerInputRoutes,s=this.safeTraceLayerPhaseAccepted?n:this.safeTraceLayerInputSnapshot,a=this.safeTraceLayerPhaseAccepted?this.safeTraceLayerSolver:this.portfolioSelectedSolver;return s.count>0&&!this.broadInputSnapshot?void this.startBroadBranch():Bx(s)>0&&this.safeTraceLayerInputSnapshot.errors.some(Ex)?void this.startMixedSafeTraceLayerPhase(r,s,a):void this.startViaInPadPhase(r,s,a)}if(this.phase==="mixedSafeTraceLayer"){if(this.stepBranch(this.mixedSafeTraceLayerSolver,"mixed safe trace-layer"),!this.mixedSafeTraceLayerSolver.solved)return;const e=this.mixedSafeTraceLayerSolver.getOutput(),n=E7(this.params.srj,e,this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine),o=Bx(n)<=Bx(this.legacySafeTraceLayerSnapshot);let i=!0;if(this.params.referenceDrcEvaluator){const r=this.getReferenceDrcSnapshot(this.legacySafeTraceLayerRoutes),s=this.getReferenceDrcSnapshot(e);this.mixedReferenceInputDrcIssueCount=r.count,this.mixedReferenceCandidateDrcIssueCount=s.count,i=s.count<=r.count}return this.mixedSafeTraceLayerPhaseAccepted=o&&i,void this.startViaInPadPhase(this.mixedSafeTraceLayerPhaseAccepted?e:this.legacySafeTraceLayerRoutes,this.mixedSafeTraceLayerPhaseAccepted?n:this.legacySafeTraceLayerSnapshot,this.mixedSafeTraceLayerPhaseAccepted?this.mixedSafeTraceLayerSolver:this.legacySafeTraceLayerSelectedSolver)}if(this.phase==="viaInPad"){if(this.stepBranch(this.viaInPadSolver,"via-in-pad"),!this.viaInPadSolver.solved)return;const e=this.viaInPadSolver.getOutput(),n=E7(this.params.srj,e,this.params.viaInPadDrcEvaluator??this.params.drcEvaluator,this.params.connMap,this.autoroutingDrcEngine);this.finishWithOutput(e,n,this.viaInPadSolver)}}getOutput(){return this.outputHdRoutes}visualize(){return(this.activeSubSolver??this.selectedSolver)?.visualize()??super.visualize()}preview(){return(this.activeSubSolver??this.selectedSolver)?.preview()??this.visualize()}},vAe=class extends yr{constructor(t,e,n=Number.POSITIVE_INFINITY,o=.010000000000000002){super(),this.nodes=t,this.maxNodeDimension=e,this.maxNodeRatio=n,this.minNodeArea=o,this.outputNodes=[]}nodes;maxNodeDimension;maxNodeRatio;minNodeArea;outputNodes;getSolverName(){return"NodeDimensionSubdivisionSolver"}getSubdivisionGrid(t){const e=Number.isFinite(this.maxNodeDimension)&&this.maxNodeDimension>0,n=Number.isFinite(this.maxNodeRatio)&&this.maxNodeRatio>0;let o=e?Math.max(1,Math.ceil(t.width/this.maxNodeDimension)):1,i=e?Math.max(1,Math.ceil(t.height/this.maxNodeDimension)):1;if(n&&t.width>0&&t.height>0)for(;;){const r=t.width/o,s=t.height/i;if((r>=s?r/s:s/r)<=this.maxNodeRatio)break;r>=s?o++:i++}return{cols:o,rows:i}}shouldRemoveNode(t){const e=Number.isFinite(this.minNodeArea)&&this.minNodeArea>0;if(!Number.isFinite(t.width)||!Number.isFinite(t.height))return!0;if(!e||t.width*t.height>=this.minNodeArea)return!1;if(Math.min(t.width,t.height)<.002)return!0;if(t._containsTarget)return!1;let n=0;for(const o of this.nodes)if(o.capacityMeshNodeId!==t.capacityMeshNodeId&&t.availableZ.some(i=>o.availableZ.includes(i))&&Use(t,o)&&(o._containsTarget||(n++,n>=2)))return!1;return!0}subdivideNode(t){if(this.shouldRemoveNode(t))return[];const{cols:e,rows:n}=this.getSubdivisionGrid(t);if(e===1&&n===1)return[t];const o=t.width/e,i=t.height/n,r=t.center.x-t.width/2,s=t.center.y-t.height/2,a=[];for(let A=0;A<n;A++)for(let c=0;c<e;c++)a.push({...t,capacityMeshNodeId:`${t.capacityMeshNodeId}__sub_${A}_${c}`,center:{x:r+o*(c+.5),y:s+i*(A+.5)},width:o,height:i,availableZ:[...t.availableZ]});return a}_step(){const t=this.nodes.length;let e=0,n=0,o=0;for(const i of this.nodes){const r=!Number.isFinite(i.width)||!Number.isFinite(i.height),s=this.subdivideNode(i);s.length!==0?(s.length>1&&e++,this.outputNodes.push(...s)):r?o++:n++}this.stats={inputNodeCount:t,outputNodeCount:this.outputNodes.length,subdividedNodeCount:e,removedSmallNodeCount:n,removedInvalidNodeCount:o,maxNodeDimension:this.maxNodeDimension,maxNodeRatio:this.maxNodeRatio,minNodeArea:this.minNodeArea},this.solved=!0}visualize(){return{rects:this.outputNodes.map(t=>({center:t.center,width:t.width,height:t.height,label:`${t.capacityMeshNodeId}
${t.width.toFixed(2)}x${t.height.toFixed(2)}`,layer:`z${t.availableZ.join(",")}`,fill:"rgba(0, 200, 255, 0.08)",stroke:"rgba(0, 120, 180, 0.5)"}))}}},cB=t=>{const e=[...new Set(t.filter(n=>typeof n=="number"&&Number.isInteger(n)&&n>=0))].sort((n,o)=>n-o);if(e.length!==0)return`z${e.join(",")}`},$be=t=>{const e=[];for(let n=0;n<31;n++)t&1<<n&&e.push(n);return e},Ev=t=>typeof t=="object"&&t!==null,l4t=t=>Ev(t)?{...t}:t===void 0?{}:{value:t},gN=(t,e)=>{const n=t.topology.regionMetadata?.[e];if(Ev(n)){if(typeof n.serializedRegionId=="string")return n.serializedRegionId;if(typeof n.regionId=="string")return n.regionId;if(typeof n.capacityMeshNodeId=="string")return n.capacityMeshNodeId}return`region-${e}`},XL=(t,e)=>{const n=t.topology.portMetadata?.[e];if(Ev(n)){if(typeof n.serializedPortId=="string")return n.serializedPortId;if(typeof n.portId=="string")return(o=n.portId).includes("::")?o.slice(0,o.indexOf("::")):o}var o;return`port-${e}`},u4t=(t,e)=>{const n=t.problem.routeMetadata?.[e];return Ev(n)&&typeof n.connectionId=="string"?n.connectionId:`route-${e}`},jco=(t,e)=>{const n=l4t(t.topology.regionMetadata?.[e]);if(Ev(n.center)||(n.center={x:t.topology.regionCenterX[e],y:t.topology.regionCenterY[e]}),typeof n.width!="number"&&(n.width=t.topology.regionWidth[e]),typeof n.height!="number"&&(n.height=t.topology.regionHeight[e]),!Array.isArray(n.availableZ)){const o=t.topology.regionAvailableZMask?.[e]??0;o!==0&&(n.availableZ=$be(o))}return n.layer=cB(Array.isArray(n.availableZ)?n.availableZ:[])??cB((t.topology.regionIncidentPorts[e]??[]).map(o=>t.topology.portZ[o]))??"z0",n},$co=(t,e)=>{const n=l4t(t.topology.portMetadata?.[e]);return typeof n.x!="number"&&(n.x=t.topology.portX[e]),typeof n.y!="number"&&(n.y=t.topology.portY[e]),typeof n.z!="number"&&(n.z=t.topology.portZ[e]),n.layer=cB([t.topology.portZ[e]])??"z0",n},g4t=(t,e,n)=>{const o=(t.topology.incidentPortRegion[e]??[]).find(i=>i!==n);if(o===void 0)throw new Error(`Port ${e} is not incident to a region outside route region ${n}`);return o},qco=(t,e,n)=>{const{orderedPortIds:o,orderedRegionIds:i}=((u,g,h)=>{if(h.length===0)throw new Error(`Route ${g} has no solved segments`);const d=u.problem.routeStartPort[g],p=u.problem.routeEndPort[g],m=new Map;h.forEach((C,y)=>{const x={...C,segmentIndex:y},E=m.get(C.fromPortId)??[];E.push(x),m.set(C.fromPortId,E);const B=m.get(C.toPortId)??[];B.push(x),m.set(C.toPortId,B)});const _=[d],f=[],I=(C,y,x)=>{if(C===p)return!0;for(const E of m.get(C)??[]){if(y.has(E.segmentIndex))continue;const B=E.fromPortId===C?E.toPortId:E.fromPortId;if(!x.has(B)){if(y.add(E.segmentIndex),x.add(B),f.push(E.regionId),_.push(B),I(B,y,x))return!0;_.pop(),f.pop(),x.delete(B),y.delete(E.segmentIndex)}}return!1};if(!I(d,new Set,new Set([d])))throw new Error(`Route ${g} is not a single ordered path from ${d} to ${p}`);return{orderedPortIds:_,orderedRegionIds:f}})(t,e,n),r=i[0],s=i[i.length-1];if(r===void 0||s===void 0)throw new Error(`Route ${e} could not determine endpoint regions`);const a=gN(t,g4t(t,o[0],r)),A=gN(t,g4t(t,o[o.length-1],s)),c=((u,g,h,d)=>{const p=u.problem.routeMetadata?.[g];return{connectionId:u4t(u,g),startRegionId:(Ev(p)&&typeof p.startRegionId=="string"?p.startRegionId:void 0)??h,endRegionId:(Ev(p)&&typeof p.endRegionId=="string"?p.endRegionId:void 0)??d,mutuallyConnectedNetworkId:(Ev(p)&&typeof p.mutuallyConnectedNetworkId=="string"?p.mutuallyConnectedNetworkId:void 0)??`net-${u.problem.routeNet[g]}`}})(t,e,a,A),l=o.map((u,g)=>{const h={portId:XL(t,u),g,h:0,f:g,hops:g,ripRequired:!1,nextRegionId:g<i.length?gN(t,i[g]):c.endRegionId};return g>0&&(h.lastPortId=XL(t,o[g-1]),h.lastRegionId=gN(t,i[g-1])),h});return{connection:c,solvedRoute:{connection:c,path:l,requiredRip:!1}}},Xco=t=>{if(!t.solved||t.failed)throw new Error("convertToSerializedHyperGraph requires a solved, non-failed solver");const{topology:e}=t,n=(s=>{const a=Array.from({length:s.problem.routeCount},()=>[]);return s.state.regionSegments.forEach((A,c)=>{for(const[l,u,g]of A)a[l].push({regionId:c,fromPortId:u,toPortId:g})}),a})(t),o=Array.from({length:e.regionCount},(s,a)=>{const A=t.state.regionSegments[a].map(([c,l,u])=>({regionPort1Id:XL(t,l),regionPort2Id:XL(t,u),connectionId:u4t(t,c)}));return{regionId:gN(t,a),pointIds:e.regionIncidentPorts[a].map(c=>XL(t,c)),d:jco(t,a),...A.length>0&&{assignments:A}}}),i=Array.from({length:e.portCount},(s,a)=>{const[A,c]=e.incidentPortRegion[a]??[];if(A===void 0||c===void 0)throw new Error(`Port ${a} is missing incident regions`);return{portId:XL(t,a),region1Id:gN(t,A),region2Id:gN(t,c),d:$co(t,a)}}),r=n.map((s,a)=>qco(t,a,s));return{regions:o,ports:i,connections:r.map(({connection:s})=>s),solvedRoutes:r.map(({solvedRoute:s})=>s)}},d4t=.3,h4t=t=>t>0&&!(t&t-1),Zco=(t,e,n,o,i,r=0,s=.3,a=0)=>(2*e+1*n+1*o)*(s+.15)**2*(1+i/5)/t+(h4t(r)?10*e:0)+a*(i/elo(r))**2*.1**2/t,elo=t=>{if(t===0)return 2;let e=t>>>0,n=0;for(;e!==0;)n+=1&e,e>>>=1;return n},p4t=(t,e,n,o,i,r)=>{const{netIds:s,lesserAngles:a,greaterAngles:A,layerMasks:c}=t;let l=0,u=0;for(let g=0;g<s.length;g++)e!==s[g]&&(n<a[g]&&a[g]<o)!=(n<A[g]&&A[g]<o)&&((i&c[g])!==0?l++:u++);return[l,u,r]},tlo=(t,e,n)=>{const o=t.routeStartPort[e],i=t.routeEndPort[e],r=new Map;for(const{fromPortId:A,toPortId:c}of n){const l=r.get(A)??new Set;l.add(c),r.set(A,l);const u=r.get(c)??new Set;u.add(A),r.set(c,u)}const s=new Set,a=[o];for(;a.length>0;){const A=a.pop();if(!s.has(A)){s.add(A);for(const c of r.get(A)??[])a.push(c)}}if(!s.has(i))throw new Error(`Initial assignments for route ${e} do not connect ${o} to ${i}`);if(n.some(({fromPortId:A,toPortId:c})=>!s.has(A)||!s.has(c)))throw new Error(`Initial assignments for route ${e} contain disconnected segments`)},m4t=({topology:t,problem:e,state:n,routeSuccessCountByRouteId:o,appendSegmentToRegionCache:i})=>{const r=e.initialAssignments??[];if(r.length===0)return;const s=new Map;for(const A of r){const{routeId:c,regionId:l,fromPortId:u,toPortId:g}=A;if(!Number.isInteger(c)||c<0||c>=e.routeCount)throw new Error(`Initial assignment references invalid route ${c}`);if(!Number.isInteger(l)||l<0||l>=t.regionCount)throw new Error(`Initial assignment references invalid region ${l}`);for(const d of[u,g]){if(!Number.isInteger(d)||d<0||d>=t.portCount)throw new Error(`Initial assignment references invalid port ${d}`);if(!t.incidentPortRegion[d]?.includes(l))throw new Error(`Initial assignment port ${d} is not incident to region ${l}`)}const h=s.get(c)??[];h.push(A),s.set(c,h)}for(const[A,c]of s)tlo(e,A,c);const a=new Set(s.keys());for(const{routeId:A,regionId:c,fromPortId:l,toPortId:u}of r){const g=e.routeNet[A];for(const h of[l,u]){const d=n.portAssignment[h];if(d!==-1&&d!==g)throw new Error(`Initial assignment port ${h} is assigned to multiple nets`);n.portAssignment[h]=g}n.currentRouteNetId=g,n.regionSegments[c].push([A,l,u]),i(c,l,u)}n.currentRouteNetId=void 0,n.unroutedRoutes=n.unroutedRoutes.filter(A=>!a.has(A));for(const A of a)o[A]=1;return{initialAssignmentCount:r.length,initiallyRoutedRouteCount:a.size}},_4t=class{constructor(t,e){this.items=t,this.compare=e}items;compare;get length(){return this.items.length}toArray(){return[...this.items]}clear(){this.items.length=0}queue(t){this.items.push(t),this.siftUp(this.items.length-1)}dequeue(){const t=this.items[0];if(t===void 0)return;const e=this.items.pop();return this.items.length>0&&(this.items[0]=e,this.siftDown(0)),t}siftUp(t){let e=t;for(;e>0;){const n=e-1>>1,o=this.items[n],i=this.items[e];if(this.compare(o,i)<=0)return;this.items[n]=i,this.items[e]=o,e=n}}siftDown(t){let e=t;const n=this.items.length;for(;;){const o=2*e+1;if(o>=n)return;const i=o+1;let r=o;i<n&&this.compare(this.items[i],this.items[o])<0&&(r=i);const s=this.items[e],a=this.items[r];if(this.compare(s,a)<=0)return;this.items[e]=a,this.items[r]=s,e=r}}},wAe=(t,e)=>{const n=[...t],o=(i=>{let r=i>>>0;return()=>{r+=1831565813;let s=r;return s=Math.imul(s^s>>>15,1|s),s^=s+Math.imul(s^s>>>7,61|s),((s^s>>>14)>>>0)/4294967296}})(e);for(let i=n.length-1;i>0;i--){const r=Math.floor(o()*(i+1));[n[i],n[r]]=[n[r],n[i]]}return n},f4t=(t,e)=>t.routeMetadata?.[e],nlo=t=>t?.simpleRouteConnection?.pointsToConnect?.map(({pointId:e})=>typeof e=="string"?e:null).filter(e=>e!==null)??[],olo=(t,e)=>{const n=f4t(t,e)?.connectionId;return typeof n=="string"?n:`route-${e}`},ilo=(t,e,n)=>{const o=t.portEndpointNetIds[n];if(!o)return!1;for(const i of o)if(i!==e)return!0;return!1},I4t=(t,e,n)=>{const o=t.regionNetId[n];return o!==-1&&o!==e},rlo=t=>[...new Set(t.routeIds)].filter(e=>!((n,o)=>{const{topology:i,problem:r,problemSetup:s,portAssignment:a,maxPrecheckHops:A}=n,c=r.routeNet[o],l=r.routeStartPort[o],u=r.routeEndPort[o];if(l===u)return!0;const g=n.getStartingNextRegionId(o,l);if(g===void 0)return!1;const h=[{portId:l,nextRegionId:g}],d=new Set([l*i.regionCount+g]);for(let p=0;p<h.length;p++){const m=h[p];if(!I4t(r,c,m.nextRegionId))for(const _ of i.regionIncidentPorts[m.nextRegionId]??[]){const f=a[_];if(ilo(s,c,_))continue;if(_===u){if(f!==-1&&f!==c)continue;return!0}if(_===m.portId||f!==-1&&f!==c||r.portSectionMask[_]===0)continue;const I=i.incidentPortRegion[_]??[],C=I[0]===m.nextRegionId?I[1]:I[0];if(C===void 0||I4t(r,c,C))continue;const y=_*i.regionCount+C;if(!d.has(y)){if(d.size>=A)return!0;d.add(y),h.push({portId:_,nextRegionId:C})}}}return!1})(t,e)).map(e=>t.getRouteSummary(e)),C4t=t=>{const e=new Array(t);for(let n=0;n<t;n++)e[n]=n;return e},qbe="rgba(220, 38, 38, 0.98)",y4t="rgba(220, 38, 38, 0.18)",Xbe=(...t)=>t.filter(e=>!!e).join(`
`),x4t=(t,e)=>{const n=.005*t.topology.portZ[e];return{x:t.topology.portX[e]+n,y:t.topology.portY[e]+n}},E4t=(t,e)=>cB([t.topology.portZ[e]])??"z0",B4t=(t,e)=>{const n=t.topology.portMetadata?.[e];return`port: ${n?.serializedPortId??n?.portId??`port-${e}`}`},b4t=(t,e)=>`z: ${t.topology.portZ[e]}`,slo=(t,e)=>((n,o,i)=>{const r=n.topology.portZ[o],s=n.topology.portZ[i];return r===s?`z: ${r}`:`z: ${r} -> ${s}`})(t,t.problem.routeStartPort[e],t.problem.routeEndPort[e]),alo=(t,e)=>`net: ${t.problem.routeNet[e]}`,PAe=.05,Alo={r:255,g:64,b:64,a:.72},MAe="rgba(220, 38, 38, 0.98)",S4t="rgba(220, 38, 38, 0.12)",Q4t="10 6",q_=(...t)=>t.filter(e=>!!e).join(`
`),v4t=t=>Math.min(1,Math.max(0,t)),Zbe=(t,e,n)=>Math.round(t+(e-t)*n),w4t=({r:t,g:e,b:n,a:o})=>`rgba(${t}, ${e}, ${n}, ${o})`,dN=(t,e)=>{const n=t.problem.routeMetadata?.[e];return n?.connectionId??n?.mutuallyConnectedNetworkId??`route-${e}`},eSe=t=>typeof t.centerRouteId=="number",tSe=(t,e)=>eSe(t)?e===t.centerRouteId?1:.5:1,P4t=(t,e)=>{const n=t.match(/^(rgba|hsla)\((.*),\s*([0-9]*\.?[0-9]+)\)$/);if(!n)return t;const[,o,i,r]=n,s=v4t(Number(r)*e);return`${o}(${i}, ${Number(s.toFixed(3))})`},hN=(t,e,n=.8)=>((o,i,r=.8)=>{const s=`${o.problem.routeNet[i]}:${dN(o,i)}`;let a=0;for(let A=0;A<s.length;A++)a=17777*s.charCodeAt(A)+((a<<5)-a);return`hsla(${Math.abs(a)%360}, 70%, 50%, ${r})`})(t,e,n*tSe(t,e)),M4t=(t,e)=>`net: ${t.problem.routeNet[e]}`,D4t=(t,e)=>{const n=t.topology.regionMetadata?.[e],o=n?.polygon;if(Array.isArray(o)&&o.length>=3){const c=o.map(u=>u.x),l=o.map(u=>u.y);return{minX:Math.min(...c),maxX:Math.max(...c),minY:Math.min(...l),maxY:Math.max(...l)}}const i=n?.bounds;if(i&&typeof i.minX=="number"&&typeof i.maxX=="number"&&typeof i.minY=="number"&&typeof i.maxY=="number")return i;const r=t.topology.regionWidth[e],s=t.topology.regionHeight[e],a=t.topology.regionCenterX[e],A=t.topology.regionCenterY[e];return{minX:a-r/2,maxX:a+r/2,minY:A-s/2,maxY:A+s/2}},N4t=(t,e)=>({x:t.topology.regionCenterX[e],y:t.topology.regionCenterY[e]}),R4t=(t,e)=>{const n=t.topology.regionMetadata?.[e],o=Array.isArray(n?.availableZ)?n.availableZ.filter(s=>typeof s=="number"&&Number.isInteger(s)&&s>=0):[];if(o.length>0)return cB(o)??"z0";const i=$be(t.topology.regionAvailableZMask?.[e]??0);if(i.length>0)return cB(i)??"z0";const r=[...new Set((t.topology.regionIncidentPorts[e]??[]).map(s=>t.topology.portZ[s]))].sort((s,a)=>s-a);return cB(r)??"z0"},T4t=(t,e)=>{const n=t.state.regionIntersectionCaches[e],o=n?.existingRegionCost??0,i=t.state.regionCongestionCost[e]??0,r=t.problem.regionNetId[e];return q_(`region: region-${e}`,`net: ${r===-1?"free":`${r}`}`,t.getAdditionalRegionLabel(e),`cost: ${o.toFixed(3)}`,`congestion: ${i.toFixed(3)}`,`same layer X: ${n?.existingSameLayerIntersections??0}`,`trans X: ${n?.existingCrossingLayerIntersections??0}`,`entry exit X: ${n?.existingEntryExitLayerChanges??0}`)},k4t=(t,e)=>{const n=t.topology.regionMetadata?.[e];return n?.isConnectionRegion?{r:255,g:100,b:255,a:.6}:n?.isThroughJumper?{r:100,g:200,b:100,a:.5}:n?.isPad?{r:255,g:200,b:100,a:.5}:n?.layer==="bottom"?{r:52,g:152,b:219,a:.08}:{r:200,g:200,b:255,a:.1}},clo=(t,e)=>{const n=k4t(t,e),o=v4t(t.state.regionIntersectionCaches[e]?.existingRegionCost??0);return w4t((r=Alo,s=o**.8,{r:Zbe((i=n).r,r.r,s),g:Zbe(i.g,r.g,s),b:Zbe(i.b,r.b,s),a:Number((i.a+(r.a-i.a)*s).toFixed(3))}));var i,r,s},U5=(t,e)=>{const n=((i,r)=>({x:i.topology.portX[r],y:i.topology.portY[r]}))(t,e),o=.005*t.topology.portZ[e];return{x:n.x+o,y:n.y+o}},sW=U5,bx=(t,e)=>cB([t.topology.portZ[e]])??"z0",ZL=(t,e)=>{const n=t.topology.portMetadata?.[e];return`port: ${n?.serializedPortId??n?.portId??`port-${e}`}`},F4t=(t,e,n)=>{if(n!==void 0)return`net: ${t.problem.routeNet[n]}`;const o=t.state.portAssignment[e];if(o>=0)return`net: ${o}`;const i=new Set;for(let r=0;r<t.problem.routeCount;r++)t.problem.routeStartPort[r]!==e&&t.problem.routeEndPort[r]!==e||i.add(t.problem.routeNet[r]);return i.size!==0?`net: ${Array.from(i).sort((r,s)=>r-s).join(", ")}`:void 0},sb=(t,e)=>`z: ${t.topology.portZ[e]}`,L4t=(t,e,n)=>{const o=t.topology.portZ[e],i=t.topology.portZ[n];return o===i?`z: ${o}`:`z: ${o} -> ${i}`},nSe=(t,e)=>L4t(t,t.problem.routeStartPort[e],t.problem.routeEndPort[e]),DAe=(t,e,n)=>q_(ZL(t,e),((o,i)=>{const r=o.topology.incidentPortRegion[i]?.[0],s=o.topology.incidentPortRegion[i]?.[1];return`connects: region-${r??"?"} <-> region-${s??"?"}`})(t,e),F4t(t,e,n)),llo=(t,e,n,o)=>{const i=t.topology.portZ[n];return i!==t.topology.portZ[o]?{strokeColor:P4t("rgba(22, 160, 133, 0.95)",tSe(t,e)),strokeDash:"2 4 2"}:i>0?{strokeColor:P4t("rgba(52, 152, 219, 0.95)",tSe(t,e)),strokeDash:"3 2"}:{strokeColor:hN(t,e)}},H4t=(t,e)=>{for(let n=0;n<t.state.regionSegments.length;n++){const o=t.state.regionSegments[n]??[];for(const[i,r,s]of o)e.lines.push({points:[U5(t,r),U5(t,s)],label:q_(`route: ${dN(t,i)}`,`region: region-${n}`,L4t(t,r,s)),layer:bx(t,r),...llo(t,i,r,s)})}},O4t=(t,e)=>{const n=new Set;for(let o=0;o<t.state.regionSegments.length;o++){const i=t.state.regionSegments[o]??[];for(const[r,s,a]of i)for(const A of[s,a]){const c=`${r}:${A}`;if(n.has(c))continue;n.add(c);const l=U5(t,A);e.points.push({x:l.x,y:l.y,color:hN(t,r,1),layer:bx(t,A),label:q_(`route: ${dN(t,r)}`,ZL(t,A),F4t(t,A,r),sb(t,A))})}}},ulo=(t,e)=>{for(let n=0;n<t.problem.routeCount;n++)if(t.problem.routeStartPort[n]===e||t.problem.routeEndPort[n]===e)return!0;return!1},glo=(t,e,n)=>{const o=((s,a)=>{const A=new Set;for(let c=0;c<a.length;c++)if(a[c]===1)for(const l of s.topology.incidentPortRegion[c]??[])A.add(l);return A})(t,n),i="rgba(245, 158, 11, 0.95)",r="rgba(245, 158, 11, 0.08)";for(const s of o){const a=t.topology.regionMetadata?.[s],A=a?.polygon,c=D4t(t,s),l=N4t(t,s),u=c.maxX-c.minX,g=c.maxY-c.minY,h=R4t(t,s),d=q_("section region",T4t(t,s));Array.isArray(A)&&A.length>=3?e.polygons.push({points:A,fill:r,stroke:i,strokeWidth:2,layer:h,label:d}):e.rects.push({center:l,width:Math.max(u-PAe,.05),height:Math.max(g-PAe,.05),fill:r,stroke:i,layer:h,label:d})}for(let s=0;s<n.length;s++)n[s]===1&&e.circles.push({center:sW(t,s),radius:.07,fill:"rgba(251, 191, 36, 0.18)",stroke:i,layer:bx(t,s),label:q_(DAe(t,s),sb(t,s),"section port")})},NAe=(t,e={})=>{const n={arrows:[],circles:[],infiniteLines:[],lines:[],points:[],polygons:[],rects:[],texts:[],title:"Tiny HyperGraph",coordinateSystem:"cartesian"},o=((a,A)=>{if(!A?.highlightSectionMask)return;const c=A.sectionPortMask??a.problem.portSectionMask;if(c.length!==a.topology.portCount)return;let l=0,u=0;for(let g=0;g<c.length;g++)c[g]===1?l+=1:u+=1;return l!==0&&u!==0?c:void 0})(t,e),i=(a=>{const A=a.getStaticallyUnroutableRoutes();if(A.length!==0)return new Set(A.map(c=>c.routeId))})(t);for(let a=0;a<t.topology.regionCount;a++){const A=t.topology.regionMetadata?.[a],c=A?.polygon,l=D4t(t,a),u=N4t(t,a),g=l.maxX-l.minX,h=l.maxY-l.minY,d=R4t(t,a),p=w4t(k4t(t,a));Array.isArray(c)&&c.length>=3?n.polygons.push({points:c,fill:p,layer:d}):n.rects.push({center:u,width:Math.max(g-PAe,.05),height:Math.max(h-PAe,.05),fill:clo(t,a),layer:d,label:T4t(t,a)})}if(((a,A,c)=>{for(let l=0;l<a.problem.routeCount;l++){if(c&&!c.has(l))continue;const u=a.problem.routeStartPort[l],g=a.problem.routeEndPort[l],h=U5(a,u),d=U5(a,g),p=hN(a,l),m=dN(a,l),_=M4t(a,l);A.points.push({x:h.x,y:h.y,color:p,layer:bx(a,u),label:q_(`route: ${m}`,_,"endpoint: start",ZL(a,u),sb(a,u))}),A.points.push({x:d.x,y:d.y,color:p,layer:bx(a,g),label:q_(`route: ${m}`,_,"endpoint: end",ZL(a,g),sb(a,g))})}})(t,n,i),t.iterations===0){for(const a of n.polygons)a.stroke="rgba(128, 128, 128, 0.5)";for(const a of n.rects)a.stroke="rgba(128, 128, 128, 0.5)"}if(t.iterations===0){for(let a=0;a<t.topology.portCount;a++){const A=o?.[a]===1;e.showOnlySectionPortsOnIdle&&!A||n.circles.push({center:sW(t,a),radius:.05,fill:t.topology.portZ[a]>0?"rgba(52, 152, 219, 0.55)":"rgba(128, 128, 128, 0.5)",layer:bx(t,a),label:q_(DAe(t,a),sb(t,a))})}if(i)((a,A)=>{for(const c of a.getStaticallyUnroutableRoutes()){const{routeId:l,connectionId:u,startPortId:g,endPortId:h}=c,d=x4t(a,g),p=x4t(a,h),m=Xbe(`static reachability failed: ${u}`,alo(a,l),c.startRegionId?`startRegionId: ${c.startRegionId}`:void 0,c.endRegionId?`endRegionId: ${c.endRegionId}`:void 0,c.pointIds.length>=2?`points: ${c.pointIds.join(" -> ")}`:void 0,slo(a,l));A.lines.push({points:[d,p],strokeColor:qbe,strokeDash:"8 4",label:m}),A.circles.push({center:d,radius:.12,fill:y4t,stroke:qbe,layer:E4t(a,g),label:Xbe(m,"endpoint: start",B4t(a,g),b4t(a,g))}),A.circles.push({center:p,radius:.12,fill:y4t,stroke:qbe,layer:E4t(a,h),label:Xbe(m,"endpoint: end",B4t(a,h),b4t(a,h))})}})(t,n);else{const a=new Set;for(const A of t.state.regionSegments)for(const[c]of A)a.add(c);if(a.size>0&&(H4t(t,n),O4t(t,n)),e.showInitialRouteHints!==!1){const A=new Set(t.state.unroutedRoutes);t.state.currentRouteId!==void 0&&A.add(t.state.currentRouteId),((c,l,u)=>{for(let g=0;g<c.problem.routeCount;g++){if(u&&!u.has(g))continue;const h=c.problem.routeStartPort[g],d=c.problem.routeEndPort[g],p=U5(c,h),m=U5(c,d),_={x:(p.x+m.x)/2,y:(p.y+m.y)/2};l.lines.push({points:[p,m],strokeColor:hN(c,g),strokeDash:"3 3",layer:bx(c,h),label:q_(dN(c,g),nSe(c,g))}),l.points.push({x:_.x,y:_.y,color:hN(c,g,1),layer:bx(c,h),label:q_(dN(c,g),nSe(c,g))})}})(t,n,A)}}}else H4t(t,n),O4t(t,n),(a=>eSe(a)&&a.showUnassignedPortsInVisualization===!0)(t)&&((a,A)=>{for(let c=0;c<a.topology.portCount;c++)a.state.portAssignment[c]>=0||ulo(a,c)||A.circles.push({center:sW(a,c),radius:.04,fill:a.topology.portZ[c]>0?"rgba(52, 152, 219, 0.2)":"rgba(128, 128, 128, 0.2)",stroke:a.topology.portZ[c]>0?"rgba(52, 152, 219, 0.6)":"rgba(128, 128, 128, 0.6)",layer:bx(a,c),label:q_(DAe(a,c),sb(a,c),"state: unassigned")})})(t,n),eSe(t)||(((a,A)=>{const c=a.state.currentRouteId;if(c===void 0||a.solved)return;const l=a.problem.routeStartPort[c],u=a.problem.routeEndPort[c],g=U5(a,l),h=U5(a,u),d=hN(a,c),p=dN(a,c);A.lines.push({points:[g,h],strokeColor:d,strokeDash:"10 5",label:q_(p,nSe(a,c))})})(t,n),((a,A)=>{if(a.solved)return;const c=a.state.currentRouteId,l=a.state.candidateQueue.toArray().sort((d,p)=>d.f-p.f).slice(0,10);for(let d=0;d<l.length;d++){const p=l[d],m=U5(a,p.portId),_=d===0;A.points.push({x:m.x,y:m.y,color:_?"green":"rgba(128, 128, 128, 0.25)",layer:bx(a,p.portId),label:q_(DAe(a,p.portId,c),sb(a,p.portId),`g: ${p.g.toFixed(2)}`,`h: ${p.h.toFixed(2)}`,`f: ${p.f.toFixed(2)}`)})}const u=l[0];if(!u)return;const g=[];let h=u;for(;h;)g.unshift(U5(a,h.portId)),h=h.prevCandidate;g.length>1&&A.lines.push({points:g,strokeColor:c!==void 0?hN(a,c):"rgba(0, 160, 120, 0.9)"})})(t,n));o&&glo(t,n,o),((a,A)=>{if(a.failed)for(const c of a.getNeverSuccessfullyRoutedRoutes()){const{routeId:l,connectionId:u,attempts:g,startPortId:h,endPortId:d}=c,p=M4t(a,l),m=sW(a,h),_=sW(a,d),f=q_(`never routed: ${u}`,`attempts: ${g}`,p,c.startRegionId?`startRegionId: ${c.startRegionId}`:void 0,c.endRegionId?`endRegionId: ${c.endRegionId}`:void 0);A.lines.push({points:[{x:0,y:0},{x:m.x,y:m.y}],strokeColor:MAe,strokeDash:Q4t,layer:bx(a,h),label:q_(f,"origin guide","endpoint: start")}),A.circles.push({center:m,radius:1,fill:S4t,stroke:MAe,layer:bx(a,h),label:q_(f,"endpoint: start",ZL(a,h),sb(a,h))}),A.lines.push({points:[{x:0,y:0},{x:_.x,y:_.y}],strokeColor:MAe,strokeDash:Q4t,layer:bx(a,d),label:q_(f,"origin guide","endpoint: end")}),A.circles.push({center:_,radius:1,fill:S4t,stroke:MAe,layer:bx(a,d),label:q_(f,"endpoint: end",ZL(a,d),sb(a,d))})}})(t,n);const r=t.state.unroutedRoutes.length+(t.state.currentRouteId===void 0?0:1),s=o?o.reduce((a,A)=>a+ +(A===1),0):0;return n.title=["Tiny HyperGraph",`iter=${t.iterations}`,`pending=${r}`,o?`sectionPorts=${s}`:void 0,i?`staticReachabilityFailed=${i.size}`:void 0,t.failed?"failed":t.solved?"solved":"running"].filter(Boolean).join(" | "),n},oSe=5e4,aW=()=>({netIds:new Int32Array(0),lesserAngles:new Int32Array(0),greaterAngles:new Int32Array(0),layerMasks:new Int32Array(0),existingCrossingLayerIntersections:0,existingSameLayerIntersections:0,existingEntryExitLayerChanges:0,existingRegionCost:0,existingSegmentCount:0}),dlo=t=>({netIds:new Int32Array(t.netIds),lesserAngles:new Int32Array(t.lesserAngles),greaterAngles:new Int32Array(t.greaterAngles),layerMasks:new Int32Array(t.layerMasks),existingCrossingLayerIntersections:t.existingCrossingLayerIntersections,existingSameLayerIntersections:t.existingSameLayerIntersections,existingEntryExitLayerChanges:t.existingEntryExitLayerChanges,existingRegionCost:t.existingRegionCost,existingSegmentCount:t.existingSegmentCount}),AW=t=>{return{portAssignment:new Int32Array(t.portAssignment),regionSegments:(e=t.regionSegments,e.map(n=>n.map(([o,i,r])=>[o,i,r]))),regionIntersectionCaches:t.regionIntersectionCaches.map(dlo),regionCongestionCost:new Float64Array(t.regionCongestionCost),ripCount:t.ripCount};var e},G4t=(t,e)=>{e&&(e.minViaPadDiameter!==void 0&&(t.minViaPadDiameter=e.minViaPadDiameter),e.DISTANCE_TO_COST!==void 0&&(t.DISTANCE_TO_COST=e.DISTANCE_TO_COST),e.RIP_THRESHOLD_START!==void 0&&(t.RIP_THRESHOLD_START=e.RIP_THRESHOLD_START),e.RIP_THRESHOLD_END!==void 0&&(t.RIP_THRESHOLD_END=e.RIP_THRESHOLD_END),e.RIP_THRESHOLD_RAMP_ATTEMPTS!==void 0&&(t.RIP_THRESHOLD_RAMP_ATTEMPTS=e.RIP_THRESHOLD_RAMP_ATTEMPTS),e.RIP_CONGESTION_REGION_COST_FACTOR!==void 0&&(t.RIP_CONGESTION_REGION_COST_FACTOR=e.RIP_CONGESTION_REGION_COST_FACTOR),e.TRACE_DENSITY_COST_FACTOR!==void 0&&(t.TRACE_DENSITY_COST_FACTOR=Math.max(0,e.TRACE_DENSITY_COST_FACTOR)),e.USE_LAZY_ROUTE_HEURISTIC!==void 0&&(t.USE_LAZY_ROUTE_HEURISTIC=e.USE_LAZY_ROUTE_HEURISTIC),e.USE_SPARSE_CANDIDATE_STORAGE!==void 0&&(t.USE_SPARSE_CANDIDATE_STORAGE=e.USE_SPARSE_CANDIDATE_STORAGE),e.MAX_ITERATIONS!==void 0&&(t.MAX_ITERATIONS=e.MAX_ITERATIONS),e.VERBOSE!==void 0&&(t.VERBOSE=e.VERBOSE),e.STATIC_REACHABILITY_PRECHECK!==void 0&&(t.STATIC_REACHABILITY_PRECHECK=e.STATIC_REACHABILITY_PRECHECK),e.STATIC_REACHABILITY_PRECHECK_MAX_HOPS!==void 0&&(t.STATIC_REACHABILITY_PRECHECK_MAX_HOPS=e.STATIC_REACHABILITY_PRECHECK_MAX_HOPS),e.ACCEPT_BEST_SOLUTION_ON_TIMEOUT!==void 0&&(t.ACCEPT_BEST_SOLUTION_ON_TIMEOUT=e.ACCEPT_BEST_SOLUTION_ON_TIMEOUT),e.GREEDY_FINAL_ROUTE_ITERS!==void 0&&(t.GREEDY_FINAL_ROUTE_ITERS=e.GREEDY_FINAL_ROUTE_ITERS),e.PARTIAL_RIP_ENABLED!==void 0&&(t.PARTIAL_RIP_ENABLED=e.PARTIAL_RIP_ENABLED),e.PARTIAL_RIP_MIN_ROUTE_COUNT!==void 0&&(t.PARTIAL_RIP_MIN_ROUTE_COUNT=e.PARTIAL_RIP_MIN_ROUTE_COUNT),e.PARTIAL_RIP_MAX_ROUTE_COUNT!==void 0&&(t.PARTIAL_RIP_MAX_ROUTE_COUNT=e.PARTIAL_RIP_MAX_ROUTE_COUNT),e.PARTIAL_RIP_MAX_DISTANCE!==void 0&&(t.PARTIAL_RIP_MAX_DISTANCE=e.PARTIAL_RIP_MAX_DISTANCE),e.PARTIAL_RIP_QUALITY_MAX_DISTANCE!==void 0&&(t.PARTIAL_RIP_QUALITY_MAX_DISTANCE=e.PARTIAL_RIP_QUALITY_MAX_DISTANCE),e.PARTIAL_RIP_MAX_ATTEMPTS!==void 0&&(t.PARTIAL_RIP_MAX_ATTEMPTS=e.PARTIAL_RIP_MAX_ATTEMPTS),e.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS!==void 0&&(t.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS=e.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS),e.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT!==void 0&&(t.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT=e.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT),e.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO!==void 0&&(t.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO=e.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO),e.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO!==void 0&&(t.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO=e.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO),e.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO!==void 0&&(t.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO=e.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO),e.OUTSIDE_IN_ROUTING!==void 0&&(t.OUTSIDE_IN_ROUTING=e.OUTSIDE_IN_ROUTING),e.OUTSIDE_IN_MAX_DISTANCE!==void 0&&(t.OUTSIDE_IN_MAX_DISTANCE=e.OUTSIDE_IN_MAX_DISTANCE))},RAe=t=>({minViaPadDiameter:t.minViaPadDiameter,DISTANCE_TO_COST:t.DISTANCE_TO_COST,RIP_THRESHOLD_START:t.RIP_THRESHOLD_START,RIP_THRESHOLD_END:t.RIP_THRESHOLD_END,RIP_THRESHOLD_RAMP_ATTEMPTS:t.RIP_THRESHOLD_RAMP_ATTEMPTS,RIP_CONGESTION_REGION_COST_FACTOR:t.RIP_CONGESTION_REGION_COST_FACTOR,TRACE_DENSITY_COST_FACTOR:t.TRACE_DENSITY_COST_FACTOR,USE_LAZY_ROUTE_HEURISTIC:t.USE_LAZY_ROUTE_HEURISTIC,USE_SPARSE_CANDIDATE_STORAGE:t.USE_SPARSE_CANDIDATE_STORAGE,MAX_ITERATIONS:t.MAX_ITERATIONS,VERBOSE:t.VERBOSE,STATIC_REACHABILITY_PRECHECK:t.STATIC_REACHABILITY_PRECHECK,STATIC_REACHABILITY_PRECHECK_MAX_HOPS:t.STATIC_REACHABILITY_PRECHECK_MAX_HOPS,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:t.ACCEPT_BEST_SOLUTION_ON_TIMEOUT,GREEDY_FINAL_ROUTE_ITERS:t.GREEDY_FINAL_ROUTE_ITERS,PARTIAL_RIP_ENABLED:t.PARTIAL_RIP_ENABLED,PARTIAL_RIP_MIN_ROUTE_COUNT:t.PARTIAL_RIP_MIN_ROUTE_COUNT,PARTIAL_RIP_MAX_ROUTE_COUNT:t.PARTIAL_RIP_MAX_ROUTE_COUNT,PARTIAL_RIP_MAX_DISTANCE:t.PARTIAL_RIP_MAX_DISTANCE,PARTIAL_RIP_QUALITY_MAX_DISTANCE:t.PARTIAL_RIP_QUALITY_MAX_DISTANCE,PARTIAL_RIP_MAX_ATTEMPTS:t.PARTIAL_RIP_MAX_ATTEMPTS,PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS:t.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS,PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT:t.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT,PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO:t.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO,PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO:t.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO,PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO:t.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO,OUTSIDE_IN_ROUTING:t.OUTSIDE_IN_ROUTING,OUTSIDE_IN_MAX_DISTANCE:t.OUTSIDE_IN_MAX_DISTANCE}),hlo=(t,e)=>t.f-e.f,Bv=class extends zA{constructor(t,e,n){super(),this.topology=t,this.problem=e,G4t(this,n);let o=1;const i=new Int32Array(t.portCount).fill(-1),r=new Int32Array(t.portCount).fill(-1);for(let A=0;A<t.portCount;A++){const c=t.incidentPortRegion[A]??[];c.length>o&&(o=c.length),i[A]=c[0]??-1,r[A]=c[1]??-1}this.candidateHopSlotStride=o,this.candidateFirstRegionByPortId=i,this.candidateSecondRegionByPortId=r;const s=t.portCount*o;this.candidateHopCapacity=s,this.state={portAssignment:new Int32Array(t.portCount).fill(-1),regionSegments:Array.from({length:t.regionCount},()=>[]),regionIntersectionCaches:Array.from({length:t.regionCount},()=>aW()),currentRouteId:void 0,currentRouteNetId:void 0,unroutedRoutes:C4t(e.routeCount),candidateQueue:new _4t([],hlo),candidateBestCostByHopId:this.USE_SPARSE_CANDIDATE_STORAGE?new Map:new Float64Array(s),candidateBestCostGenerationByHopId:this.USE_SPARSE_CANDIDATE_STORAGE?new Map:new Uint32Array(s),candidateBestCostGeneration:1,goalPortId:-1,ripCount:0,regionCongestionCost:new Float64Array(t.regionCount).fill(0)},this.routeAttemptCountByRouteId=new Uint32Array(e.routeCount),this.routeSuccessCountByRouteId=new Uint32Array(e.routeCount);const a=m4t({topology:t,problem:e,state:this.state,routeSuccessCountByRouteId:this.routeSuccessCountByRouteId,appendSegmentToRegionCache:(A,c,l)=>this.appendSegmentToRegionCache(A,c,l)});a&&(this.stats={...this.stats,...a})}topology;problem;state;candidateHopSlotStride;candidateHopCapacity;candidateFirstRegionByPortId;candidateSecondRegionByPortId;candidateOverflowBestCost;_problemSetup;routeAttemptCountByRouteId;routeSuccessCountByRouteId;bestSolvedStateSnapshot;bestSolvedStateSummary;hasLoggedNeverSuccessfullyRoutedRoutes=!1;staticallyUnroutableRoutes=[];segmentGeometryScratch={lesserAngle:0,greaterAngle:0,layerMask:0,entryExitLayerChanges:0};ADD_SEGMENT_DISTANCE_TO_G=!1;DISTANCE_TO_COST=.05;minViaPadDiameter=d4t;RIP_THRESHOLD_START=.05;RIP_THRESHOLD_END=.8;RIP_THRESHOLD_RAMP_ATTEMPTS=50;RIP_CONGESTION_REGION_COST_FACTOR=.1;TRACE_DENSITY_COST_FACTOR=0;USE_LAZY_ROUTE_HEURISTIC=!1;USE_SPARSE_CANDIDATE_STORAGE=!1;MAX_ITERATIONS=1e6;VERBOSE=!1;STATIC_REACHABILITY_PRECHECK=!0;STATIC_REACHABILITY_PRECHECK_MAX_HOPS=16;ACCEPT_BEST_SOLUTION_ON_TIMEOUT=!0;GREEDY_FINAL_ROUTE_ITERS=4;PARTIAL_RIP_ENABLED=!1;PARTIAL_RIP_MIN_ROUTE_COUNT=0;PARTIAL_RIP_MAX_ROUTE_COUNT=Number.POSITIVE_INFINITY;PARTIAL_RIP_MAX_DISTANCE=12;PARTIAL_RIP_QUALITY_MAX_DISTANCE;PARTIAL_RIP_MAX_ATTEMPTS=Number.POSITIVE_INFINITY;PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS=0;PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT=Number.POSITIVE_INFINITY;PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO=0;PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO=.2;PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO=.1;OUTSIDE_IN_ROUTING=!1;OUTSIDE_IN_MAX_DISTANCE=24;get problemSetup(){return this._problemSetup||(this._problemSetup=this.computeProblemSetup()),this._problemSetup}computeProblemSetup(){const{topology:t,problem:e}=this,n=this.USE_LAZY_ROUTE_HEURISTIC?void 0:new Float64Array(t.portCount*e.routeCount),o=t.portX,i=t.portY,r=Array.from({length:t.portCount},()=>new Set),s=new Int32Array(t.portCount).fill(-1),a=(A,c)=>{r[A].add(c);const l=s[A];l===-1?s[A]=c:l!==c&&(s[A]=-2)};for(let A=0;A<e.routeCount;A++){const c=e.routeNet[A];if(a(e.routeStartPort[A],c),a(e.routeEndPort[A],c),n){const l=e.routeEndPort[A],u=o[l],g=i[l];for(let h=0;h<t.portCount;h++){const d=o[h]-u,p=i[h]-g;n[h*e.routeCount+A]=Math.sqrt(d*d+p*p)*this.DISTANCE_TO_COST}}}return{portHCostToEndOfRoute:n,portEndpointNetIds:r,portEndpointReservationNetId:s}}_setup(){if(this.problemSetup,this.STATIC_REACHABILITY_PRECHECK){const t=rlo({topology:this.topology,problem:this.problem,problemSetup:this.problemSetup,portAssignment:this.state.portAssignment,routeIds:this.state.unroutedRoutes,maxPrecheckHops:Math.max(0,this.STATIC_REACHABILITY_PRECHECK_MAX_HOPS),getStartingNextRegionId:(e,n)=>this.getStartingNextRegionId(e,n),getRouteSummary:e=>this.getRouteSummary(e)});this.staticallyUnroutableRoutes=t,t.length>0&&(this.failed=!0,this.error=(e=>{const n=e.slice(0,5).map(i=>{const r=i.pointIds.length>=2?`${i.pointIds[0]}->${i.pointIds[1]}`:`${i.startPortId}->${i.endPortId}`;return`${i.connectionId} (${r})`}).join(", "),o=e.length-5;return["Static reachability precheck failed:",`${e.length} route(s) have no legal path under the current reservation and start-region rules`,o>0?`${n}, +${o} more`:n].join(" ")})(t),this.stats={...this.stats,staticallyUnroutableRouteCount:t.length})}}_step(){const{problem:t,topology:e,state:n}=this;if(n.currentRouteId===void 0){if(n.unroutedRoutes.length===0)return void this.onAllRoutesRouted();n.currentRouteId=n.unroutedRoutes.shift(),n.currentRouteNetId=t.routeNet[n.currentRouteId],this.routeAttemptCountByRouteId[n.currentRouteId]+=1,this.resetCandidateBestCosts();const s=this.getRouteStartPortId(n.currentRouteId);n.candidateQueue.clear();const a=this.getStartingNextRegionId(n.currentRouteId,s);if(a===void 0)return this.failed=!0,void(this.error=`Start port ${s} has no incident regions`);this.setCandidateBestCost(this.getHopId(s,a),0),n.candidateQueue.queue({nextRegionId:a,portId:s,f:0,g:0,h:0}),n.goalPortId=this.getRouteEndPortId(n.currentRouteId)}const o=n.candidateQueue.dequeue();if(!o)return void this.onOutOfCandidates();const i=this.getHopId(o.portId,o.nextRegionId);if(o.g>this.getCandidateBestCost(i)||this.isRegionReservedForDifferentNet(o.nextRegionId))return;const r=e.regionIncidentPorts[o.nextRegionId];for(const s of r){const a=n.portAssignment[s];if(this.isPortReservedForDifferentNet(s))continue;if(s===n.goalPortId){if(a!==-1&&a!==n.currentRouteNetId)continue;return void this.onPathFound(o)}if(a!==-1&&a!==n.currentRouteNetId||s===o.portId||t.portSectionMask[s]===0)continue;const A=e.incidentPortRegion[s][0]===o.nextRegionId?e.incidentPortRegion[s][1]:e.incidentPortRegion[s][0];if(A===void 0||this.isRegionReservedForDifferentNet(A))continue;const c=this.getHopId(s,A);if(n.candidateQueue.isClosedHop?.(s,A)===!0)continue;const l=this.getCandidateBestCost(c);if(o.g>=l)continue;const u=this.computeG(o,s,l);if(!Number.isFinite(u)||u>=l)continue;const g=this.computeH(s),h={prevRegionId:o.nextRegionId,nextRegionId:A,portId:s,g:u,h:g,f:u+g,prevCandidate:o};if(s===n.goalPortId)return void this.onPathFound(h);this.setCandidateBestCost(c,u),n.candidateQueue.queue(h)}}resetCandidateBestCosts(){const{state:t}=this;if(this.candidateOverflowBestCost?.clear(),t.candidateBestCostGeneration===4294967295)return t.candidateBestCostByHopId instanceof Map&&t.candidateBestCostByHopId.clear(),t.candidateBestCostGenerationByHopId instanceof Map?t.candidateBestCostGenerationByHopId.clear():t.candidateBestCostGenerationByHopId.fill(0),void(t.candidateBestCostGeneration=1);t.candidateBestCostGeneration+=1}getCandidateBestCost(t){if(t<0)return this.candidateOverflowBestCost?.get(t)??Number.POSITIVE_INFINITY;const{state:e}=this,n=e.candidateBestCostGenerationByHopId;return(n instanceof Map?n.get(t):n[t])===e.candidateBestCostGeneration?e.candidateBestCostByHopId instanceof Map?e.candidateBestCostByHopId.get(t):e.candidateBestCostByHopId[t]:Number.POSITIVE_INFINITY}setCandidateBestCost(t,e){if(t<0)return this.candidateOverflowBestCost||(this.candidateOverflowBestCost=new Map),void this.candidateOverflowBestCost.set(t,e);const{state:n}=this;n.candidateBestCostGenerationByHopId instanceof Map?n.candidateBestCostGenerationByHopId.set(t,n.candidateBestCostGeneration):n.candidateBestCostGenerationByHopId[t]=n.candidateBestCostGeneration,n.candidateBestCostByHopId instanceof Map?n.candidateBestCostByHopId.set(t,e):n.candidateBestCostByHopId[t]=e}getHopId(t,e){const n=t*this.candidateHopSlotStride;if(this.candidateFirstRegionByPortId[t]===e)return n;if(this.candidateSecondRegionByPortId[t]===e)return n+1;const o=this.topology.incidentPortRegion[t];for(let i=2;i<(o?.length??0);i++)if(o[i]===e)return n+i;return-(t*this.topology.regionCount+e)-1}getStartingNextRegionId(t,e){const n=this.topology.incidentPortRegion[e]??[],o=this.problem.routeNet[t];return n.find(i=>this.problem.regionNetId[i]===-1)??n.find(i=>this.problem.regionNetId[i]===o)??n[0]}getRouteStartPortId(t){return this.problem.routeStartPort[t]}getRouteEndPortId(t){return this.problem.routeEndPort[t]}isPortReservedForDifferentNet(t){const e=this.problemSetup.portEndpointReservationNetId[t]??-1;return e===-2||e!==-1&&e!==this.state.currentRouteNetId}isRegionReservedForDifferentNet(t){const e=this.problem.regionNetId[t];return e!==-1&&e!==this.state.currentRouteNetId}isKnownSingleLayerRegion(t){const e=this.topology.regionAvailableZMask?.[t]??0;return h4t(e)}computeRegionCostForRegion(t,e,n,o,i){return((r,s,a,A,c,l,u=0,g=.3,h=0)=>Zco(r*s,a,A,c,l,u,g,h))(this.topology.regionWidth[t],this.topology.regionHeight[t],e,n,o,i,this.topology.regionAvailableZMask?.[t]??0,this.minViaPadDiameter,this.TRACE_DENSITY_COST_FACTOR)}populateSegmentGeometryScratch(t,e,n){const{topology:o}=this,i=this.segmentGeometryScratch,r=this.candidateFirstRegionByPortId[e]===t||this.candidateSecondRegionByPortId[e]!==t?o.portAngleForRegion1[e]:o.portAngleForRegion2?.[e]??o.portAngleForRegion1[e],s=this.candidateFirstRegionByPortId[n]===t||this.candidateSecondRegionByPortId[n]!==t?o.portAngleForRegion1[n]:o.portAngleForRegion2?.[n]??o.portAngleForRegion1[n],a=o.portZ[e],A=o.portZ[n];return i.lesserAngle=r<s?r:s,i.greaterAngle=r<s?s:r,i.layerMask=1<<a|1<<A,i.entryExitLayerChanges=a!==A?1:0,i}appendSegmentToRegionCache(t,e,n){const{state:o}=this,i=o.regionIntersectionCaches[t],r=this.populateSegmentGeometryScratch(t,e,n),[s,a,A]=p4t(i,o.currentRouteNetId,r.lesserAngle,r.greaterAngle,r.layerMask,r.entryExitLayerChanges),c=i.netIds.length+1,l=new Int32Array(c);l.set(i.netIds),l[c-1]=o.currentRouteNetId;const u=new Int32Array(c);u.set(i.lesserAngles),u[c-1]=r.lesserAngle;const g=new Int32Array(c);g.set(i.greaterAngles),g[c-1]=r.greaterAngle;const h=new Int32Array(c);h.set(i.layerMasks),h[c-1]=r.layerMask;const d=i.existingSameLayerIntersections+s,p=i.existingCrossingLayerIntersections+a,m=i.existingEntryExitLayerChanges+A,_=u.length;o.regionIntersectionCaches[t]={netIds:l,lesserAngles:u,greaterAngles:g,layerMasks:h,existingSameLayerIntersections:d,existingCrossingLayerIntersections:p,existingEntryExitLayerChanges:m,existingSegmentCount:_,existingRegionCost:this.computeRegionCostForRegion(t,d,p,m,_)}}getSolvedPathSegments(t){const{state:e}=this,n=[];let o=t;for(;o;)n.unshift(o),o=o.prevCandidate;const i=[];for(let s=1;s<n.length;s++)i.push({regionId:n[s-1].nextRegionId,fromPortId:n[s-1].portId,toPortId:n[s].portId});const r=n[n.length-1];return r&&r.portId!==e.goalPortId&&i.push({regionId:r.nextRegionId,fromPortId:r.portId,toPortId:e.goalPortId}),i}resetRoutingStateForRerip(){const{topology:t,problem:e,state:n}=this;n.portAssignment.fill(-1),n.regionSegments=Array.from({length:t.regionCount},()=>[]),n.regionIntersectionCaches=Array.from({length:t.regionCount},()=>aW()),n.currentRouteNetId=void 0,n.currentRouteId=void 0,n.unroutedRoutes=wAe(C4t(e.routeCount),n.ripCount),n.candidateQueue.clear(),this.resetCandidateBestCosts(),n.goalPortId=-1}getMaxRegionCost(){const{topology:t,state:e}=this;let n=0;for(let o=0;o<t.regionCount;o++){const i=e.regionIntersectionCaches[o]?.existingRegionCost??0;n=Math.max(n,i)}return n}getRouteMetadata(t){return this.problem.routeMetadata?.[t]}getRouteConnectionId(t){const e=this.getRouteMetadata(t)?.connectionId;return typeof e=="string"?e:`route-${t}`}getRouteSummary(t){return(({problem:e,routeId:n,getRouteMetadata:o,getRouteConnectionId:i})=>{const r=o?.(n)??f4t(e,n);return{routeId:n,connectionId:i?.(n)??olo(e,n),startPortId:e.routeStartPort[n],endPortId:e.routeEndPort[n],startRegionId:typeof r?.startRegionId=="string"?r.startRegionId:void 0,endRegionId:typeof r?.endRegionId=="string"?r.endRegionId:void 0,pointIds:nlo(r)}})({problem:this.problem,routeId:t,getRouteMetadata:e=>this.getRouteMetadata(e),getRouteConnectionId:e=>this.getRouteConnectionId(e)})}getAdditionalRegionLabel(t){}getNeverSuccessfullyRoutedRoutes(){const t=[];for(let e=0;e<this.problem.routeCount;e++){const n=this.routeAttemptCountByRouteId[e];n===0||this.routeSuccessCountByRouteId[e]>0||t.push({...this.getRouteSummary(e),attempts:n})}return t}getStaticallyUnroutableRoutes(){return this.staticallyUnroutableRoutes}logNeverSuccessfullyRoutedRoutes(){if(!this.VERBOSE||this.hasLoggedNeverSuccessfullyRoutedRoutes)return;const t=this.getNeverSuccessfullyRoutedRoutes();if(this.hasLoggedNeverSuccessfullyRoutedRoutes=!0,t.length!==0){console.log(["[TinyHyperGraphSolver:never-routed-summary]",`count=${t.length}`].join(" "));for(const e of t){const n=e.pointIds.length>=2?`${e.pointIds[0]}->${e.pointIds[1]}`:"unknown";console.log(["[TinyHyperGraphSolver:never-routed]",`routeId=${e.routeId}`,`connectionId=${e.connectionId}`,`attempts=${e.attempts}`,`pointPath=${n}`,`startRegionId=${e.startRegionId??"unknown"}`,`endRegionId=${e.endRegionId??"unknown"}`].join(" "))}}}logRipEvent(t,e,n={}){this.VERBOSE&&console.log(["[TinyHyperGraphSolver:rip]",`ripCount=${this.state.ripCount}`,`maxRegionCostBeforeRip=${e.toFixed(3)}`,`reason=${t}`,...Object.entries(n).map(([o,i])=>`${o}=${typeof i=="number"?Number.isInteger(i)?String(i):i.toFixed(3):i}`)].join(" "))}compareRegionCostSummaries(t,e){return t.maxRegionCost!==e.maxRegionCost?t.maxRegionCost-e.maxRegionCost:t.totalRegionCost-e.totalRegionCost}captureBestSolvedState(t){this.bestSolvedStateSummary&&this.compareRegionCostSummaries(t,this.bestSolvedStateSummary)>=0||this.replaceBestSolvedState(t)}replaceBestSolvedState(t){this.bestSolvedStateSummary=t,this.bestSolvedStateSnapshot=AW({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches,regionCongestionCost:this.state.regionCongestionCost,ripCount:this.state.ripCount})}restoreBestSolvedState(){if(!this.bestSolvedStateSnapshot)return;const t=AW(this.bestSolvedStateSnapshot);this.state.portAssignment=t.portAssignment,this.state.regionSegments=t.regionSegments,this.state.regionIntersectionCaches=t.regionIntersectionCaches,this.state.regionCongestionCost=t.regionCongestionCost,this.state.ripCount=t.ripCount,this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=[],this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1}getRemainingRouteIdsForGreedyFinalRoute(){const t=new Set(this.state.unroutedRoutes);return this.state.currentRouteId!==void 0&&t.add(this.state.currentRouteId),[...t]}applySnapshotToGreedyFinalRouteSolver(t,e,n){const o=AW(e);t.state.portAssignment=o.portAssignment,t.state.regionSegments=o.regionSegments,t.state.regionIntersectionCaches=o.regionIntersectionCaches,t.state.regionCongestionCost=o.regionCongestionCost,t.state.ripCount=0,t.state.currentRouteId=void 0,t.state.currentRouteNetId=void 0,t.state.unroutedRoutes=[...n],t.state.candidateQueue.clear(),t.resetCandidateBestCosts(),t.state.goalPortId=-1}summarizeSolvedState(t){let e=0,n=0;for(const o of t.state.regionIntersectionCaches){const i=o.existingRegionCost;e=Math.max(e,i),n+=i}return{maxRegionCost:e,totalRegionCost:n}}tryGreedyFinalRouteAcceptance(){const t=Math.max(0,Math.floor(this.GREEDY_FINAL_ROUTE_ITERS));if(t===0)return!1;const e=this.getRemainingRouteIdsForGreedyFinalRoute();if(e.length===0)return!1;const n=AW({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches,regionCongestionCost:this.state.regionCongestionCost,ripCount:this.state.ripCount});for(let o=0;o<t;o++){const i=o===0?e:wAe(e,this.state.ripCount+o),r=new plo(this.topology,this.problem,{...RAe(this),ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!1,GREEDY_FINAL_ROUTE_ITERS:0,MAX_ITERATIONS:oSe,RIP_THRESHOLD_RAMP_ATTEMPTS:0,STATIC_REACHABILITY_PRECHECK:!1});if(this.applySnapshotToGreedyFinalRouteSolver(r,n,i),r.solve(),r.solved&&!r.failed)return this.bestSolvedStateSnapshot=AW({portAssignment:r.state.portAssignment,regionSegments:r.state.regionSegments,regionIntersectionCaches:r.state.regionIntersectionCaches,regionCongestionCost:r.state.regionCongestionCost,ripCount:r.state.ripCount}),this.bestSolvedStateSummary=this.summarizeSolvedState(r),this.restoreBestSolvedState(),this.stats={...this.stats,acceptedGreedyFinalRouteOnTimeout:!0,greedyFinalRouteIter:o,greedyFinalRouteRemainingRouteCount:e.length,greedyFinalRouteMaxIterations:oSe,neverSuccessfullyRoutedRouteCount:0,maxRegionCost:this.bestSolvedStateSummary.maxRegionCost,totalRegionCost:this.bestSolvedStateSummary.totalRegionCost,bestMaxRegionCost:this.bestSolvedStateSummary.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary.totalRegionCost},this.solved=!0,this.failed=!1,this.error=null,!0}return this.stats={...this.stats,greedyFinalRouteAttemptCount:t,greedyFinalRouteRemainingRouteCount:e.length,greedyFinalRouteMaxIterations:oSe},!1}onAllRoutesRouted(){const{topology:t,state:e}=this,n=this.RIP_THRESHOLD_RAMP_ATTEMPTS<=0?1:Math.min(1,e.ripCount/this.RIP_THRESHOLD_RAMP_ATTEMPTS),o=this.RIP_THRESHOLD_START+(this.RIP_THRESHOLD_END-this.RIP_THRESHOLD_START)*n,i=[],r=new Float64Array(t.regionCount);let s=0,a=0;for(let A=0;A<t.regionCount;A++){const c=e.regionIntersectionCaches[A]?.existingRegionCost??0;r[A]=c,s=Math.max(s,c),a+=c,c>o&&i.push(A)}if(this.captureBestSolvedState({maxRegionCost:s,totalRegionCost:a}),this.stats={...this.stats,currentRipThreshold:o,hotRegionCount:i.length,maxRegionCost:s,totalRegionCost:a,bestMaxRegionCost:this.bestSolvedStateSummary?.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary?.totalRegionCost,ripCount:e.ripCount},i.length===0||e.ripCount>=this.RIP_THRESHOLD_RAMP_ATTEMPTS)this.solved=!0;else{for(let A=0;A<t.regionCount;A++)e.regionCongestionCost[A]+=r[A]*this.RIP_CONGESTION_REGION_COST_FACTOR;e.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:e.ripCount,maxRegionCostBeforeRip:s,reripRegionCount:i.length},this.logRipEvent("hot_regions",s,{hotRegionCount:i.length,currentRipThreshold:o})}}onOutOfCandidates(){const{topology:t,state:e}=this,n=e.currentRouteId,o=this.getMaxRegionCost();for(let i=0;i<t.regionCount;i++){const r=e.regionIntersectionCaches[i]?.existingRegionCost??0;e.regionCongestionCost[i]+=r*this.RIP_CONGESTION_REGION_COST_FACTOR}e.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:e.ripCount,maxRegionCost:o,maxRegionCostBeforeRip:o,reripReason:"out_of_candidates"},this.logRipEvent("out_of_candidates",o,{...n===void 0?{}:{routeId:n,connectionId:this.getRouteConnectionId(n)}})}onPathFound(t){const{state:e}=this,n=e.currentRouteId;if(n===void 0)return;this.routeSuccessCountByRouteId[n]+=1;const o=this.getSolvedPathSegments(t);for(const{regionId:i,fromPortId:r,toPortId:s}of o)e.regionSegments[i].push([n,r,s]),e.portAssignment[r]=e.currentRouteNetId,e.portAssignment[s]=e.currentRouteNetId,this.appendSegmentToRegionCache(i,r,s);e.candidateQueue.clear(),e.currentRouteNetId=void 0,e.currentRouteId=void 0}computeG(t,e,n=Number.POSITIVE_INFINITY,o){const{state:i,topology:r}=this,s=t.nextRegionId,a=i.regionIntersectionCaches[s];let A=0;if(this.ADD_SEGMENT_DISTANCE_TO_G){let x=o;if(x===void 0){const E=r.portX[t.portId]-r.portX[e],B=r.portY[t.portId]-r.portY[e];x=Math.sqrt(E*E+B*B)}A=x*this.DISTANCE_TO_COST}if(t.g+i.regionCongestionCost[s]+(this.problem.portPenalty?.[e]??0)+A>n+1e-9)return Number.POSITIVE_INFINITY;const c=t.portId,l=this.candidateFirstRegionByPortId[c]===s||this.candidateSecondRegionByPortId[c]!==s?r.portAngleForRegion1[c]:r.portAngleForRegion2?.[c]??r.portAngleForRegion1[c],u=this.candidateFirstRegionByPortId[e]===s||this.candidateSecondRegionByPortId[e]!==s?r.portAngleForRegion1[e]:r.portAngleForRegion2?.[e]??r.portAngleForRegion1[e],g=l<u?l:u,h=l<u?u:l,d=r.portZ[c],p=r.portZ[e],m=1<<d|1<<p,_=d!==p?1:0,[f,I,C]=p4t(a,i.currentRouteNetId,g,h,m,_);if(f>0&&this.isKnownSingleLayerRegion(s))return Number.POSITIVE_INFINITY;const y=this.computeRegionCostForRegion(s,a.existingSameLayerIntersections+f,a.existingCrossingLayerIntersections+I,a.existingEntryExitLayerChanges+C,a.existingSegmentCount+1)-a.existingRegionCost;return t.g+y+i.regionCongestionCost[s]+(this.problem.portPenalty?.[e]??0)+A}tryFinalAcceptance(){const t=this.getNeverSuccessfullyRoutedRoutes();if(this.stats={...this.stats,neverSuccessfullyRoutedRouteCount:t.length},this.ACCEPT_BEST_SOLUTION_ON_TIMEOUT&&this.bestSolvedStateSnapshot&&this.bestSolvedStateSummary)return this.restoreBestSolvedState(),this.stats={...this.stats,acceptedBestSolutionOnTimeout:!0,maxRegionCost:this.bestSolvedStateSummary.maxRegionCost,totalRegionCost:this.bestSolvedStateSummary.totalRegionCost,bestMaxRegionCost:this.bestSolvedStateSummary.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary.totalRegionCost},this.solved=!0,this.failed=!1,void(this.error=null);this.ACCEPT_BEST_SOLUTION_ON_TIMEOUT&&this.tryGreedyFinalRouteAcceptance()||this.logNeverSuccessfullyRoutedRoutes()}computeH(t){const e=this.problemSetup.portHCostToEndOfRoute;if(e)return e[t*this.problem.routeCount+this.state.currentRouteId];const n=this.getRouteEndPortId(this.state.currentRouteId),o=this.topology.portX[t]-this.topology.portX[n],i=this.topology.portY[t]-this.topology.portY[n];return Math.sqrt(o*o+i*i)*this.DISTANCE_TO_COST}visualize(){return NAe(this)}getOutput(){return Xco(this)}},plo=class extends Bv{computeG(t,e){return t.g}},mlo=class{constructor(t,e){this.regionCount=t,this.compactHopIndex=e,e&&(this.hopStateGeneration=new Uint32Array(e.hopCapacity),this.hopIndexOrClosed=new Int32Array(e.hopCapacity))}regionCount;compactHopIndex;items=[];indexByHopId=new Map;closedHopIds=new Set;hopStateGeneration;hopIndexOrClosed;currentHopStateGeneration=1;get length(){return this.items.length}toArray(){return[...this.items]}clear(){this.items.length=0,this.indexByHopId.clear(),this.closedHopIds.clear(),this.hopStateGeneration&&(this.currentHopStateGeneration===4294967295?(this.hopStateGeneration.fill(0),this.currentHopStateGeneration=1):this.currentHopStateGeneration+=1)}isClosedHop(t,e){return this.isHopClosed(this.getHopIdFromValues(t,e))}queue(t){const e=this.getHopId(t);if(this.isHopClosed(e))return;const n=this.getQueuedHopIndex(e);if(n!==void 0){const i=this.items[n];return t.g>=i.g?void 0:(this.items[n]=t,void(t.f<=i.f?this.siftUp(n):this.siftDown(n)))}const o=this.items.length;this.items.push(t),this.siftUp(o)}dequeue(){const t=this.items[0];if(!t)return;const e=this.getHopId(t);this.closeHop(e);const n=this.items.pop();return this.items.length>0&&(this.items[0]=n,this.siftDown(0)),t}getHopId(t){return this.getHopIdFromValues(t.portId,t.nextRegionId)}getHopIdFromValues(t,e){const n=this.compactHopIndex;if(!n)return t*this.regionCount+e;const o=t*n.hopSlotStride;if(n.firstRegionByPortId[t]===e)return o;if(n.secondRegionByPortId[t]===e)return o+1;const i=n.incidentPortRegion[t];for(let r=2;r<(i?.length??0);r++)if(i[r]===e)return o+r;return-(t*this.regionCount+e)-1}getQueuedHopIndex(t){if(t>=0&&this.hopStateGeneration?.[t]===this.currentHopStateGeneration){const e=this.hopIndexOrClosed[t];return e>=0?e:void 0}return this.indexByHopId.get(t)}isHopClosed(t){return t>=0&&this.hopStateGeneration?.[t]===this.currentHopStateGeneration?this.hopIndexOrClosed[t]===-1:this.closedHopIds.has(t)}setQueuedHopIndex(t,e){if(t>=0&&this.hopStateGeneration)return this.hopStateGeneration[t]=this.currentHopStateGeneration,void(this.hopIndexOrClosed[t]=e);this.indexByHopId.set(t,e)}closeHop(t){if(t>=0&&this.hopStateGeneration)return this.hopStateGeneration[t]=this.currentHopStateGeneration,void(this.hopIndexOrClosed[t]=-1);this.indexByHopId.delete(t),this.closedHopIds.add(t)}siftUp(t){const e=this.items[t];let n=t;for(;n>0;){const o=n-1>>1,i=this.items[o];if(i.f<=e.f)break;this.items[n]=i,this.setQueuedHopIndex(this.getHopId(i),n),n=o}this.items[n]=e,this.setQueuedHopIndex(this.getHopId(e),n)}siftDown(t){const e=this.items[t];let n=t;for(;;){const o=2*n+1;if(o>=this.items.length)break;const i=o+1,r=i<this.items.length&&this.items[i].f<this.items[o].f?i:o,s=this.items[r];if(e.f<=s.f)break;this.items[n]=s,this.setQueuedHopIndex(this.getHopId(s),n),n=r}this.items[n]=e,this.setQueuedHopIndex(this.getHopId(e),n)}},_lo=class extends Bv{constructor(t,e,n){super(t,e,n),this.ADD_SEGMENT_DISTANCE_TO_G=!0}_setup(){super._setup(),this.state.candidateQueue=new mlo(this.topology.regionCount,{hopCapacity:this.candidateHopCapacity,hopSlotStride:this.candidateHopSlotStride,firstRegionByPortId:this.candidateFirstRegionByPortId,secondRegionByPortId:this.candidateSecondRegionByPortId,incidentPortRegion:this.topology.incidentPortRegion})}onPathFound(t){const e=this.state.goalPortId;if(t.portId===e)return void super.onPathFound(t);const n=this.computeG(t,e);if(!Number.isFinite(n))return;const o=this.getHopId(e,t.nextRegionId);n>=this.getCandidateBestCost(o)||(this.setCandidateBestCost(o,n),this.state.candidateQueue.queue({prevRegionId:t.nextRegionId,nextRegionId:t.nextRegionId,portId:e,g:n,h:0,f:n,prevCandidate:t}))}},flo=new Set,Ilo=class extends _lo{partialRipRoutePlans=new Map;outsideInRouteSearch;oneSidedFallbackRouteId;partialRipWindowDistance;partialRipCount=0;partiallyRippedRouteCount=0;partiallyRippedSegmentCount=0;retainedPartialRipSegmentCount=0;outsideInRouteCount=0;outsideInCompletedRouteCount=0;outsideInFallbackRouteCount=0;outsideInForwardExpansionCount=0;outsideInReverseExpansionCount=0;outsideInDistancePruneCount=0;completedRoundSummaries=[];firstCompletedRoundSummary;partialRipQualityBaselineSummary;bestSolvedRoundSummary;partialRipTargetReached=!1;useComplexityAwareSelection=!1;constructor(t,e,n){super(t,e,n),n?.PARTIAL_RIP_ENABLED===void 0&&(this.PARTIAL_RIP_ENABLED=!0),n?.OUTSIDE_IN_ROUTING===void 0&&(this.OUTSIDE_IN_ROUTING=!0),this.PARTIAL_RIP_ENABLED&&n?.PARTIAL_RIP_MAX_ATTEMPTS===void 0&&(this.PARTIAL_RIP_MAX_ATTEMPTS=10),(e.routeCount<Math.max(0,this.PARTIAL_RIP_MIN_ROUTE_COUNT)||e.routeCount>Math.max(0,this.PARTIAL_RIP_MAX_ROUTE_COUNT))&&(this.PARTIAL_RIP_ENABLED=!1,this.OUTSIDE_IN_ROUTING=!1),this.useComplexityAwareSelection=e.routeCount>=Math.max(0,this.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT)}getRouteStartPortId(t){return this.PARTIAL_RIP_ENABLED?this.partialRipRoutePlans.get(t)?.activeStartPortId??super.getRouteStartPortId(t):super.getRouteStartPortId(t)}getRouteEndPortId(t){return this.PARTIAL_RIP_ENABLED?this.partialRipRoutePlans.get(t)?.activeEndPortId??super.getRouteEndPortId(t):super.getRouteEndPortId(t)}getStartingNextRegionId(t,e){if(!this.PARTIAL_RIP_ENABLED)return super.getStartingNextRegionId(t,e);const n=this.partialRipRoutePlans.get(t);return n&&n.activeStartPortId===e?n.forcedStartRegionId:super.getStartingNextRegionId(t,e)}getEndingNextRegionId(t,e){const n=this.partialRipRoutePlans.get(t);return n&&n.activeEndPortId===e?n.forcedEndRegionId:super.getStartingNextRegionId(t,e)}computeH(t){if(!this.PARTIAL_RIP_ENABLED)return super.computeH(t);const e=this.state.currentRouteId;if(e===void 0||!this.partialRipRoutePlans.has(e))return super.computeH(t);const n=this.getRouteEndPortId(e),o=this.topology.portX[t]-this.topology.portX[n],i=this.topology.portY[t]-this.topology.portY[n];return Math.sqrt(o*o+i*i)*this.DISTANCE_TO_COST}onPathFound(t){if(!this.PARTIAL_RIP_ENABLED&&!this.OUTSIDE_IN_ROUTING)return void super.onPathFound(t);const e=this.state.currentRouteId,n=e!==void 0&&this.outsideInRouteSearch?.routeId===e;super.onPathFound(t),e!==void 0&&this.state.currentRouteId===void 0&&(this.partialRipRoutePlans.delete(e),n&&(this.outsideInCompletedRouteCount+=1),this.oneSidedFallbackRouteId===e&&(this.oneSidedFallbackRouteId=void 0)),this.outsideInRouteSearch=void 0,this.publishOutsideInStats()}resetRoutingStateForRerip(){this.PARTIAL_RIP_ENABLED||this.OUTSIDE_IN_ROUTING?(this.partialRipRoutePlans.clear(),this.outsideInRouteSearch=void 0,this.oneSidedFallbackRouteId=void 0,super.resetRoutingStateForRerip()):super.resetRoutingStateForRerip()}clearPartialRipPlans(t){for(const e of t)this.partialRipRoutePlans.delete(e)}getRouteIdsPreferredForPreservation(){return flo}getCommittedRouteSegments(t){const e=[];for(let A=0;A<this.state.regionSegments.length;A++)for(const[c,l,u]of this.state.regionSegments[A]??[])c===t&&e.push({segmentIndex:e.length,regionId:A,fromPortId:l,toPortId:u});if(e.length===0)return;const n=new Map;for(const A of e)for(const c of[A.fromPortId,A.toPortId]){const l=n.get(c)??[];l.push(A.segmentIndex),n.set(c,l)}const o=this.problem.routeEndPort[t],i=[],r=new Set,s=new Set([this.problem.routeStartPort[t]]),a=A=>{if(A===o)return!0;for(const c of n.get(A)??[]){if(r.has(c))continue;const l=e[c],u=l.fromPortId===A?l.toPortId:l.fromPortId;if(!s.has(u)){if(r.add(c),s.add(u),i.push({regionId:l.regionId,fromPortId:A,toPortId:u}),a(u))return!0;i.pop(),s.delete(u),r.delete(c)}}return!1};return a(this.problem.routeStartPort[t])&&r.size===e.length?i:void 0}getSegmentDistance(t){const e=this.topology.portX[t.fromPortId]-this.topology.portX[t.toPortId],n=this.topology.portY[t.fromPortId]-this.topology.portY[t.toPortId];return Math.sqrt(e*e+n*n)}getPartialRipWindow(t,e,n){let o,i=Number.NEGATIVE_INFINITY;for(let l=0;l<t.length;l++){const u=t[l];if(!e.has(u.regionId))continue;const g=n[u.regionId]??0;g>i&&(i=g,o=l)}if(o===void 0)return;const r=Math.max(0,this.partialRipWindowDistance??this.PARTIAL_RIP_MAX_DISTANCE);let s=o,a=o,A=this.getSegmentDistance(t[o])/2,c=A;for(;s>0;){const l=this.getSegmentDistance(t[s-1]);if(A+l>r)break;s-=1,A+=l}for(;a+1<t.length;){const l=this.getSegmentDistance(t[a+1]);if(c+l>r)break;a+=1,c+=l}return{startIndex:s,endIndex:a}}appendRetainedSegment(t,e,n){t[n.regionId].push([e,n.fromPortId,n.toPortId])}preparePartialRip(t,e){if(!this.PARTIAL_RIP_ENABLED||t.length===0)return!1;const n=new Set(t);if(this.partialRipWindowDistance===void 0){let l=0;for(const h of t)l=Math.max(l,e[h]??0);const u=Math.max(0,this.PARTIAL_RIP_MAX_DISTANCE),g=Math.max(u,this.PARTIAL_RIP_QUALITY_MAX_DISTANCE??2*u);this.partialRipWindowDistance=l<=1.5*this.RIP_THRESHOLD_END?g:u}const o=new Set;for(const l of t)for(const[u]of this.state.regionSegments[l]??[])o.add(u);if(o.size===0)return!1;const i=this.getRouteIdsPreferredForPreservation(),r=[...o].some(l=>!i.has(l)),s=Array.from({length:this.topology.regionCount},()=>[]),a=new Map;let A=0,c=0;for(let l=0;l<this.problem.routeCount;l++){const u=this.getCommittedRouteSegments(l);if(!u)return!1;if(!o.has(l)||r&&i.has(l)){for(const p of u)this.appendRetainedSegment(s,l,p),c+=1;continue}const g=this.getPartialRipWindow(u,n,e);if(!g)return!1;for(let p=0;p<u.length;p++){const m=u[p];p>=g.startIndex&&p<=g.endIndex?A+=1:(this.appendRetainedSegment(s,l,m),c+=1)}const h=u[g.startIndex],d=u[g.endIndex];a.set(l,{routeId:l,activeStartPortId:h.fromPortId,activeEndPortId:d.toPortId,forcedStartRegionId:h.regionId,forcedEndRegionId:d.regionId,rippedSegmentCount:g.endIndex-g.startIndex+1,retainedSegmentCount:u.length-(g.endIndex-g.startIndex+1)})}return a.size!==0&&A!==0&&(this.partialRipRoutePlans=a,this.rebuildRetainedRoutingState(s,[...a.keys()]),this.partialRipCount+=1,this.partiallyRippedRouteCount+=a.size,this.partiallyRippedSegmentCount+=A,this.retainedPartialRipSegmentCount+=c,this.publishPartialRipStats(),!0)}rebuildRetainedRoutingState(t,e){this.state.portAssignment.fill(-1),this.state.regionSegments=Array.from({length:this.topology.regionCount},()=>[]),this.state.regionIntersectionCaches=Array.from({length:this.topology.regionCount},()=>aW()),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=e,this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1,this.outsideInRouteSearch=void 0,this.oneSidedFallbackRouteId=void 0;for(let n=0;n<t.length;n++)for(const[o,i,r]of t[n]??[]){const s=this.problem.routeNet[o];this.state.currentRouteNetId=s;for(const a of[i,r]){const A=this.state.portAssignment[a];if(A!==-1&&A!==s)throw new Error(`OutsideInPartialRipTinyHyperGraphSolver: retained port ${a} belongs to multiple nets`);this.state.portAssignment[a]=s}this.state.regionSegments[n].push([o,i,r]),this.appendSegmentToRegionCache(n,i,r)}this.state.currentRouteNetId=void 0}publishPartialRipStats(){this.stats={...this.stats,partialRipCount:this.partialRipCount,partiallyRippedRouteCount:this.partiallyRippedRouteCount,partiallyRippedSegmentCount:this.partiallyRippedSegmentCount,retainedPartialRipSegmentCount:this.retainedPartialRipSegmentCount,partialRipMaxDistance:this.partialRipWindowDistance??this.PARTIAL_RIP_MAX_DISTANCE,partialRipBaseMaxDistance:this.PARTIAL_RIP_MAX_DISTANCE,partialRipQualityMaxDistance:this.PARTIAL_RIP_QUALITY_MAX_DISTANCE??2*this.PARTIAL_RIP_MAX_DISTANCE,partialRipMaxAttempts:this.PARTIAL_RIP_MAX_ATTEMPTS}}publishOutsideInStats(){this.stats={...this.stats,outsideInRouteCount:this.outsideInRouteCount,outsideInCompletedRouteCount:this.outsideInCompletedRouteCount,outsideInFallbackRouteCount:this.outsideInFallbackRouteCount,outsideInForwardExpansionCount:this.outsideInForwardExpansionCount,outsideInReverseExpansionCount:this.outsideInReverseExpansionCount,outsideInDistancePruneCount:this.outsideInDistancePruneCount,outsideInMaxDistance:this.OUTSIDE_IN_MAX_DISTANCE}}createOutsideInFrontier(t,e,n){const o=new _4t([],(A,c)=>A.f===c.f?A.g-c.g:A.f-c.f),i=this.topology.portX[t]-this.topology.portX[n],r=this.topology.portY[t]-this.topology.portY[n],s=Math.sqrt(i*i+r*r)*this.DISTANCE_TO_COST,a={portId:t,nextRegionId:e,f:s,g:0,h:s,travelDistance:0};return o.queue(a),{queue:o,bestCostByHopId:new Map([[this.getHopId(t,e),0]]),settledByPortId:new Map,settledByRegionId:new Map,targetPortId:n}}startOutsideInRouteSearch(t){const e=this.getRouteStartPortId(t),n=this.getRouteEndPortId(t),o=this.getStartingNextRegionId(t,e),i=this.getEndingNextRegionId(t,n);return o!==void 0&&i!==void 0&&(this.state.goalPortId=n,this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.outsideInRouteSearch={routeId:t,forward:this.createOutsideInFrontier(e,o,n),reverse:this.createOutsideInFrontier(n,i,e),expandForwardNext:!0,distanceLimitHit:!1,bestJoinedCost:Number.POSITIVE_INFINITY},this.outsideInRouteCount+=1,this.publishOutsideInStats(),!0)}dequeueFreshCandidate(t){for(;t.queue.length>0;){const e=t.queue.dequeue(),n=this.getHopId(e.portId,e.nextRegionId);if(e.g<=(t.bestCostByHopId.get(n)??1/0))return e}}recordSettledCandidate(t,e){const n=t.settledByPortId.get(e.portId);(!n||e.g<n.g)&&t.settledByPortId.set(e.portId,e);const o=t.settledByRegionId.get(e.nextRegionId)??[];o.push(e),o.sort((i,r)=>i.g-r.g),o.length>16&&(o.length=16),t.settledByRegionId.set(e.nextRegionId,o)}getCandidatePath(t){const e=[];let n=t;for(;n;)e.push(n),n=n.prevCandidate;return e.reverse(),e}buildJoinedCandidate(t,e){const n=this.getCandidatePath(t),o=this.getCandidatePath(e),i=n.map(({portId:A})=>A),r=n.slice(0,-1).map(({nextRegionId:A})=>A);if(t.portId!==e.portId){if(t.nextRegionId!==e.nextRegionId)return;const A=this.topology.portX[t.portId]-this.topology.portX[e.portId],c=this.topology.portY[t.portId]-this.topology.portY[e.portId],l=Math.sqrt(A*A+c*c);if(t.travelDistance+e.travelDistance+l>2*this.OUTSIDE_IN_MAX_DISTANCE)return;const u=this.computeG(t,e.portId);if(!Number.isFinite(u))return;r.push(t.nextRegionId),i.push(e.portId)}for(let A=o.length-2;A>=0;A--){const c=o[A];r.push(c.nextRegionId),i.push(c.portId)}if(new Set(i).size!==i.length||r.length+1!==i.length)return;let s={portId:i[0],nextRegionId:r[0],f:0,g:0,h:0};for(let A=1;A<i.length;A++)s={portId:i[A],prevRegionId:r[A-1],nextRegionId:r[A]??r[A-1],prevCandidate:s,f:0,g:0,h:0};const a=t.portId===e.portId?0:this.computeG(t,e.portId)-t.g;return{candidate:s,cost:t.g+e.g+a}}considerOutsideInJoins(t,e){const n=this.outsideInRouteSearch,o=e?n.reverse:n.forward,i=s=>{!s||s.cost>=n.bestJoinedCost||(n.bestJoinedCandidate=s.candidate,n.bestJoinedCost=s.cost,n.remainingPostMeetingExpansions=24)},r=o.settledByPortId.get(t.portId);r&&i(e?this.buildJoinedCandidate(t,r):this.buildJoinedCandidate(r,t));for(const s of o.settledByRegionId.get(t.nextRegionId)??[])i(e?this.buildJoinedCandidate(t,s):this.buildJoinedCandidate(s,t))}commitBestOutsideInJoin(){const t=this.outsideInRouteSearch?.bestJoinedCandidate;return!!t&&(this.onPathFound(t),!0)}expandOutsideInFrontier(t){const e=this.outsideInRouteSearch,n=t?e.forward:e.reverse,o=this.dequeueFreshCandidate(n);if(!o)return!1;if(t?this.outsideInForwardExpansionCount+=1:this.outsideInReverseExpansionCount+=1,this.isRegionReservedForDifferentNet(o.nextRegionId))return!0;this.recordSettledCandidate(n,o),this.considerOutsideInJoins(o,t);for(const i of this.topology.regionIncidentPorts[o.nextRegionId]??[]){if(i===o.portId||this.isPortReservedForDifferentNet(i))continue;const r=this.state.portAssignment[i];if(r!==-1&&r!==this.state.currentRouteNetId||i!==n.targetPortId&&this.problem.portSectionMask[i]===0)continue;const s=this.topology.portX[o.portId]-this.topology.portX[i],a=this.topology.portY[o.portId]-this.topology.portY[i],A=Math.sqrt(s*s+a*a),c=o.travelDistance+A;if(c>this.OUTSIDE_IN_MAX_DISTANCE){e.distanceLimitHit=!0,this.outsideInDistancePruneCount+=1;continue}const l=this.topology.incidentPortRegion[i]?.[0]===o.nextRegionId?this.topology.incidentPortRegion[i]?.[1]:this.topology.incidentPortRegion[i]?.[0];if(l===void 0||this.isRegionReservedForDifferentNet(l))continue;const u=this.getHopId(i,l),g=n.bestCostByHopId.get(u)??1/0;if(o.g>=g)continue;const h=this.computeG(o,i,g,A);if(!Number.isFinite(h)||h>=g)continue;n.bestCostByHopId.set(u,h);const d=this.topology.portX[i]-this.topology.portX[n.targetPortId],p=this.topology.portY[i]-this.topology.portY[n.targetPortId],m=Math.sqrt(d*d+p*p)*this.DISTANCE_TO_COST;n.queue.queue({portId:i,prevRegionId:o.nextRegionId,nextRegionId:l,prevCandidate:o,f:h+m,g:h,h:m,travelDistance:c})}return!0}fallBackToOneSidedRouteSearch(){const t=this.state.currentRouteId;t!==void 0&&(this.outsideInRouteSearch=void 0,this.outsideInFallbackRouteCount+=1,this.oneSidedFallbackRouteId=t,this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.goalPortId=-1,this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.unroutedRoutes.unshift(t),this.publishOutsideInStats())}_step(){if(!this.OUTSIDE_IN_ROUTING)return void super._step();const t=this.state.currentRouteId??this.state.unroutedRoutes[0];if(t!==void 0&&!this.partialRipRoutePlans.has(t))return void super._step();if(this.oneSidedFallbackRouteId!==void 0)return void super._step();if(this.state.currentRouteId===void 0){if(this.state.unroutedRoutes.length===0)return void this.onAllRoutesRouted();const o=this.state.unroutedRoutes.shift();if(this.state.currentRouteId=o,this.state.currentRouteNetId=this.problem.routeNet[o],this.routeAttemptCountByRouteId[o]+=1,!this.startOutsideInRouteSearch(o))return this.failed=!0,void(this.error=`Route ${o} has an endpoint without an incident region`)}const e=this.outsideInRouteSearch;if(!e)return;let n=this.expandOutsideInFrontier(e.expandForwardNext);if(this.state.currentRouteId!==void 0&&(n||(n=this.expandOutsideInFrontier(!e.expandForwardNext),this.state.currentRouteId!==void 0)))if(e.expandForwardNext=!e.expandForwardNext,e.bestJoinedCandidate&&(e.remainingPostMeetingExpansions=(e.remainingPostMeetingExpansions??1)-1,(e.remainingPostMeetingExpansions??0)<=0))this.commitBestOutsideInJoin();else{if(!n&&e.forward.queue.length===0&&e.reverse.queue.length===0){if(this.commitBestOutsideInJoin())return;this.outsideInRouteSearch=void 0,e.distanceLimitHit?this.fallBackToOneSidedRouteSearch():this.onOutOfCandidates()}this.publishOutsideInStats()}}shouldReplaceBestSolvedState(t){const e=this.bestSolvedRoundSummary;if(!e)return!0;if(!this.useComplexityAwareSelection)return this.compareRegionCostSummaries(t,e)<0;const n=this.partialRipQualityBaselineSummary;if(!n)return this.compareRegionCostSummaries(t,e)<0;const o=this.firstCompletedRoundSummary??n,i=o.maxRegionCost*(1+Math.max(0,this.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO)),r=o.totalRegionCost*(1+Math.max(0,this.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO)),s=t.maxRegionCost<=i&&t.totalRegionCost<=r;return s!==(e.maxRegionCost<=i&&e.totalRegionCost<=r)?s:s&&t.segmentCount!==e.segmentCount?t.segmentCount<e.segmentCount:this.compareRegionCostSummaries(t,e)<0}onAllRoutesRouted(){if(!this.PARTIAL_RIP_ENABLED)return void super.onAllRoutesRouted();const{state:t,topology:e}=this,n=Math.min(this.RIP_THRESHOLD_RAMP_ATTEMPTS,this.PARTIAL_RIP_MAX_ATTEMPTS),o=Math.max(0,this.RIP_THRESHOLD_RAMP_ATTEMPTS),i=o<=0?1:Math.min(1,t.ripCount/o),r=this.RIP_THRESHOLD_START+(this.RIP_THRESHOLD_END-this.RIP_THRESHOLD_START)*i,s=new Float64Array(e.regionCount),a=[];let A=0,c=0,l=0,u=0,g=0;for(let S=0;S<e.regionCount;S++){const Q=t.regionIntersectionCaches[S]?.existingRegionCost??0;s[S]=Q,A=Math.max(A,Q),c+=Q;const w=t.regionSegments[S]?.length??0;l+=w,u=Math.max(u,w),g+=w*w,Q>r&&a.push(S)}const h={maxRegionCost:A,totalRegionCost:c},d={...h,ripCount:t.ripCount,segmentCount:l,maxRegionSegmentCount:u,squaredRegionSegmentCount:g};this.completedRoundSummaries.push(d),this.firstCompletedRoundSummary??=d,this.partialRipQualityBaselineSummary===void 0&&t.ripCount>=Math.max(0,this.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS)&&(this.partialRipQualityBaselineSummary=d),this.shouldReplaceBestSolvedState(d)&&(this.replaceBestSolvedState(h),this.bestSolvedRoundSummary=d);const p=this.firstCompletedRoundSummary,m=this.partialRipQualityBaselineSummary??p,_=Math.max(0,this.PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO),f=Math.max(0,this.PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO),I=m.maxRegionCost*(1-_),C=m.totalRegionCost*(1+f),y=this.useComplexityAwareSelection&&t.ripCount>m.ripCount&&_>0&&A<=I&&c<=C&&l<=m.segmentCount;if(y&&(this.partialRipTargetReached=!0),this.stats={...this.stats,currentRipThreshold:r,hotRegionCount:a.length,maxRegionCost:A,totalRegionCost:c,bestMaxRegionCost:this.bestSolvedStateSummary?.maxRegionCost,bestTotalRegionCost:this.bestSolvedStateSummary?.totalRegionCost,ripCount:t.ripCount,completedRoundSummaries:this.completedRoundSummaries.map(S=>({...S})),firstMaxRegionCost:p.maxRegionCost,firstTotalRegionCost:p.totalRegionCost,firstSegmentCount:p.segmentCount,firstMaxRegionSegmentCount:p.maxRegionSegmentCount,firstSquaredRegionSegmentCount:p.squaredRegionSegmentCount,partialRipQualityBaselineRipCount:m.ripCount,partialRipQualityBaselineMaxRegionCost:m.maxRegionCost,partialRipQualityBaselineTotalRegionCost:m.totalRegionCost,partialRipQualityBaselineSegmentCount:m.segmentCount,partialRipQualityBaselineMaxRegionSegmentCount:m.maxRegionSegmentCount,partialRipQualityBaselineSquaredRegionSegmentCount:m.squaredRegionSegmentCount,bestSolvedSegmentCount:this.bestSolvedRoundSummary?.segmentCount,bestSolvedMaxRegionSegmentCount:this.bestSolvedRoundSummary?.maxRegionSegmentCount,bestSolvedSquaredRegionSegmentCount:this.bestSolvedRoundSummary?.squaredRegionSegmentCount,partialRipTargetMaxRegionCost:I,partialRipMaxTargetTotalRegionCost:C,partialRipComplexityAwareSelection:this.useComplexityAwareSelection,partialRipComplexitySelectionMinRouteCount:this.PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT,partialRipMaxRegionCostGrowthRatio:this.PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO,partialRipTargetReached:this.partialRipTargetReached},this.publishPartialRipStats(),a.length===0||y||t.ripCount>=n)return this.restoreBestSolvedState(),void(this.solved=!0);for(let S=0;S<e.regionCount;S++)t.regionCongestionCost[S]+=s[S]*this.RIP_CONGESTION_REGION_COST_FACTOR;const x=t.ripCount<Math.max(0,this.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS);t.ripCount+=1;const E=!x&&this.preparePartialRip(a,s);E||this.resetRoutingStateForRerip();const B=x?"warmup_full":E?"partial":"full_fallback";this.stats={...this.stats,ripCount:t.ripCount,maxRegionCostBeforeRip:A,reripRegionCount:a.length,reripMode:B,partialRipWarmupFullRipAttempts:this.PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS},this.logRipEvent("hot_regions",A,{hotRegionCount:a.length,currentRipThreshold:r,reripMode:B,partialRouteCount:E?this.partialRipRoutePlans.size:0})}},Y4t=t=>{const e=typeof t.d?.netId=="number"?t.d.netId:typeof t.d?.NetId=="number"?t.d.NetId:void 0;return Number.isFinite(e)?e:void 0},Clo=t=>{const e=new Set;for(const r of t.connections??[])e.add(r.startRegionId),e.add(r.endRegionId);const n=new Set(t.regions.filter(r=>(s=>{if(s.d?._containsObstacle!==!0)return!1;const a=Y4t(s);return a===void 0||a===-1})(r)&&!e.has(r.regionId)).map(r=>r.regionId));if(n.size===0)return t;const o=t.ports.filter(r=>!n.has(r.region1Id)&&!n.has(r.region2Id)),i=(t.connections??[]).find(r=>n.has(r.startRegionId)||n.has(r.endRegionId));if(i)throw new Error(`Connection "${i.connectionId}" references full-obstacle region`);return{...t,regions:t.regions.filter(r=>!n.has(r.regionId)),ports:o}},U4t=t=>{const e=t.d?.bounds;if(e)return e;const n=t.d?.center,o=t.d?.width,i=t.d?.height;return n&&typeof n.x=="number"&&typeof n.y=="number"&&typeof o=="number"&&typeof i=="number"?{minX:n.x-o/2,maxX:n.x+o/2,minY:n.y-i/2,maxY:n.y+i/2}:{minX:0,maxX:0,minY:0,maxY:0}},K4t=t=>Number(t.d?.x??0),V4t=t=>Number(t.d?.y??0),z4t=(t,e)=>{if(!e)return 0;const n=U4t(e),o=K4t(t),i=V4t(t),r=n.minX<=o&&o<=n.maxX,s=n.minY<=i&&i<=n.maxY;if(s&&o>=n.maxX){const p=Math.max(n.maxY-n.minY,1e-9),m=(i-n.minY)/p;return Math.round(9e3*m)}if(r&&i>=n.maxY){const p=Math.max(n.maxX-n.minX,1e-9),m=(n.maxX-o)/p;return 9e3+Math.round(9e3*m)}if(s&&o<=n.minX){const p=Math.max(n.maxY-n.minY,1e-9),m=(n.maxY-i)/p;return 18e3+Math.round(9e3*m)}if(r&&i<=n.minY){const p=Math.max(n.maxX-n.minX,1e-9),m=(o-n.minX)/p;return 27e3+Math.round(9e3*m)}const a=Math.abs(o-n.minX),A=Math.abs(o-n.maxX),c=Math.abs(i-n.minY),l=Math.abs(i-n.maxY),u=Math.min(a,A,c,l),g=Math.max(n.maxX-n.minX,1e-9),h=Math.max(n.maxY-n.minY,1e-9);if(u===A){const p=(i-n.minY)/h;return Math.round(9e3*p)}if(u===l){const p=(n.maxX-o)/g;return 9e3+Math.round(9e3*p)}if(u===a){const p=(n.maxY-i)/h;return 18e3+Math.round(9e3*p)}const d=(o-n.minX)/g;return 27e3+Math.round(9e3*d)},J4t=(t,e)=>{if(t)return[...t.pointIds].sort((n,o)=>{const i=e.get(n),r=e.get(o),s=Number(i?.d?.distToCentermostPortOnZ??Number.POSITIVE_INFINITY),a=Number(r?.d?.distToCentermostPortOnZ??Number.POSITIVE_INFINITY);if(s!==a)return s-a;const A=Number(i?.d?.z??0),c=Number(r?.d?.z??0);return A!==c?A-c:n.localeCompare(o)})[0]},iSe=t=>{const e=Clo(t),n=new Map,o=new Map,i=new Map,r=new Map((e.solvedRoutes??[]).map(_e=>[_e.connection.connectionId,_e]));e.regions.forEach((_e,ue)=>{n.set(_e.regionId,ue)}),e.ports.forEach((_e,ue)=>{o.set(_e.portId,ue),i.set(_e.portId,_e)});const s=e.regions.length,a=e.ports.length,A=e.regions.map(_e=>_e.pointIds.map(ue=>o.get(ue)).filter(ue=>ue!==void 0)),c=Array.from({length:a},()=>[]),l=new Float64Array(s),u=new Float64Array(s),g=new Float64Array(s),h=new Float64Array(s),d=new Int32Array(s),p=new Int32Array(s).fill(-1),m=new Int8Array(s);e.regions.forEach((_e,ue)=>{const fe=(ye=>{const Me=U4t(ye),ve=typeof ye.d?.width=="number"?ye.d.width:Me.maxX-Me.minX,he=typeof ye.d?.height=="number"?ye.d.height:Me.maxY-Me.minY;return{centerX:typeof ye.d?.center?.x=="number"?ye.d.center.x:(Me.minX+Me.maxX)/2,centerY:typeof ye.d?.center?.y=="number"?ye.d.center.y:(Me.minY+Me.maxY)/2,width:ve,height:he}})(_e);l[ue]=fe.width,u[ue]=fe.height,g[ue]=fe.centerX,h[ue]=fe.centerY,d[ue]=(ye=>{const Me=ye.d?.availableZ;if(!Array.isArray(Me))return 0;let ve=0;for(const he of Me)!Number.isInteger(he)||he<0||he>=31||(ve|=1<<he);return ve})(_e);const pe=Y4t(_e);pe!==void 0&&(p[ue]=pe,m[ue]=1)});const _=new Int32Array(a),f=new Int32Array(a),I=new Float64Array(a),C=new Float64Array(a),y=new Int32Array(a);e.ports.forEach((_e,ue)=>{const fe=n.get(_e.region1Id),pe=n.get(_e.region2Id);if(fe===void 0||pe===void 0)throw new Error(`Port "${_e.portId}" references missing regions "${_e.region1Id}" or "${_e.region2Id}"`);c[ue]=[fe,pe],I[ue]=K4t(_e),C[ue]=V4t(_e),y[ue]=(ye=>{const Me=Number(ye.d?.z??0);return Number.isFinite(Me)?Me:0})(_e),_[ue]=z4t(_e,e.regions[fe]),f[ue]=z4t(_e,e.regions[pe])});const x=e.regions.map((_e,ue)=>((fe,pe)=>{const ye=fe.d&&typeof fe.d=="object"&&!Array.isArray(fe.d)?{...fe.d}:{value:fe.d};return ye.layer=pe,Object.defineProperty(ye,"serializedRegionId",{value:fe.regionId,enumerable:!1,configurable:!0,writable:!0}),ye})(_e,(fe=>cB($be(d[fe]))??cB((A[fe]??[]).map(pe=>y[pe]))??"z0")(ue))),E=e.ports.map((_e,ue)=>((fe,pe)=>{const ye=fe.d&&typeof fe.d=="object"&&!Array.isArray(fe.d)?{...fe.d}:{value:fe.d};return ye.layer=pe,Object.defineProperty(ye,"serializedPortId",{value:fe.portId,enumerable:!1,configurable:!0,writable:!0}),ye})(_e,cB([y[ue]])??"z0")),B=e.connections??[],S=new Map;let Q=0;const w=_e=>{const ue=_e.mutuallyConnectedNetworkId??_e.connectionId;let fe=S.get(ue);return fe===void 0&&(fe=Q++,S.set(ue,fe)),fe},M=Array.from({length:s},()=>new Set),k=(_e,ue)=>{const fe=n.get(_e);if(fe===void 0)throw new Error(`Connection references missing region "${_e}"`);M[fe].add(ue)};B.forEach(_e=>{const ue=w(_e);k(_e.startRegionId,ue),k(_e.endRegionId,ue)}),M.forEach((_e,ue)=>{m[ue]!==1&&_e.size===1&&(p[ue]=[..._e][0])});const R=B.map(_e=>{const ue=r.get(_e.connectionId),fe=((pe,ye)=>pe.ports.filter(Me=>Me.region1Id===ye.startRegionId&&Me.region2Id===ye.endRegionId||Me.region2Id===ye.startRegionId&&Me.region1Id===ye.endRegionId).map(Me=>Me.portId))(e,_e);return{connection:_e,solvedRoute:ue,sharedPortIds:fe}}).filter(({solvedRoute:_e,sharedPortIds:ue})=>ue.length===0||(_e?.path.length??0)>1),F=R.length,O=new Map(R.map(({connection:_e},ue)=>[_e.connectionId,ue])),U=new Int8Array(a).fill(1),Y=new Int32Array(F),W=new Int32Array(F),te=new Int32Array(F);R.forEach(({connection:_e,solvedRoute:ue},fe)=>{const pe=J4t(e.regions.find(Pe=>Pe.regionId===_e.startRegionId),i),ye=J4t(e.regions.find(Pe=>Pe.regionId===_e.endRegionId),i),Me=ue?.path[0]?.portId??pe,ve=ue?.path[ue.path.length-1]?.portId??ye,he=Me!==void 0?o.get(Me):void 0,Qe=ve!==void 0?o.get(ve):void 0;if(he===void 0||Qe===void 0)throw new Error(`Connection "${_e.connectionId}" could not be mapped to route endpoints`);Y[fe]=he,W[fe]=Qe,te[fe]=w(_e)});const j={portCount:a,regionCount:s,regionIncidentPorts:A,incidentPortRegion:c,regionWidth:l,regionHeight:u,regionCenterX:g,regionCenterY:h,regionAvailableZMask:d,regionMetadata:x,portAngleForRegion1:_,portAngleForRegion2:f,portX:I,portY:C,portZ:y,portMetadata:E},J=e.regions.flatMap((_e,ue)=>(_e.assignments??[]).map(fe=>{const pe=O.get(fe.connectionId);if(pe===void 0)throw new Error(`Region "${_e.regionId}" assignment references unknown routable connection "${fe.connectionId}"`);const ye=o.get(fe.regionPort1Id),Me=o.get(fe.regionPort2Id);if(ye===void 0||Me===void 0)throw new Error(`Region "${_e.regionId}" assignment references missing port "${ye===void 0?fe.regionPort1Id:fe.regionPort2Id}"`);if(!A[ue]?.includes(ye)||!A[ue]?.includes(Me))throw new Error(`Region "${_e.regionId}" assignment ports must both belong to the region`);return{routeId:pe,regionId:ue,fromPortId:ye,toPortId:Me}})),oe=Float64Array.from(e.ports,_e=>{const ue=Number(_e.d?.tinyHypergraphPortPenalty??0);return Number.isFinite(ue)&&ue>0?ue:0}),ie=oe.some(_e=>_e>0),ne={routeCount:F,portSectionMask:U,routeMetadata:R.map(({connection:_e})=>_e),routeStartPort:Y,routeEndPort:W,routeNet:te,regionNetId:p,...J.length>0&&{initialAssignments:J},...ie&&{portPenalty:oe}},le=[],ge=[];for(const{solvedRoute:_e}of R){if(!_e){le.push([]),ge.push([]);continue}const ue=[],fe=[];for(let pe=1;pe<_e.path.length;pe++){const ye=_e.path[pe-1],Me=_e.path[pe],ve=ye?.portId,he=Me?.portId,Qe=ve!==void 0?o.get(ve):void 0,Pe=he!==void 0?o.get(he):void 0;if(Qe===void 0||Pe===void 0)continue;const we=typeof ye?.nextRegionId=="string"?ye.nextRegionId:typeof Me?.lastRegionId=="string"?Me.lastRegionId:void 0;ue.push([Qe,Pe]),fe.push(we!==void 0?n.get(we):void 0)}le.push(ue),ge.push(fe)}return{topology:j,problem:ne,solution:{solvedRoutePathSegments:le,solvedRoutePathRegionIds:ge}}},eH=t=>typeof t=="object"&&t!==null,tH=t=>Array.isArray(t)?t.map(e=>tH(e)):eH(t)?Object.fromEntries(Object.entries(t).map(([e,n])=>[e,tH(n)])):t,ylo=t=>eH(t)?{...t}:t===void 0?{}:{value:t},bv=(t,e=0)=>typeof t=="number"&&Number.isFinite(t)?t:e,cW=t=>({x:bv(t.d?.x),y:bv(t.d?.y)}),W4t=t=>[t.region1Id,t.region2Id].sort().join("\0"),xlo=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),j4t=t=>{const e=Math.hypot(t.x,t.y);if(!(e<=1e-9))return{x:t.x/e,y:t.y/e}},$4t=t=>{const e=t?.d?.center;if(eH(e))return{x:bv(e.x),y:bv(e.y)};const n=(o=>{const i=o?.d?.bounds;if(eH(i)&&typeof i.minX=="number"&&typeof i.maxX=="number"&&typeof i.minY=="number"&&typeof i.maxY=="number")return{minX:i.minX,maxX:i.maxX,minY:i.minY,maxY:i.maxY};const r=o?.d?.center,s=bv(o?.d?.width),a=bv(o?.d?.height);if(eH(r)){const A=bv(r.x),c=bv(r.y);return{minX:A-s/2,maxX:A+s/2,minY:c-a/2,maxY:c+a/2}}return{minX:0,maxX:0,minY:0,maxY:0}})(t);return{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2}},Elo=(t,e)=>{const n=W4t(t),o=cW(t);let i,r=Number.POSITIVE_INFINITY;for(const s of e){if(s.portId===t.portId||W4t(s)!==n)continue;const a=xlo(o,cW(s));a<=1e-9||a>=r||(i=s,r=a)}return i},Blo=(t,e,n)=>{const o=cW(t);if(e){const i=cW(e),r=j4t({x:o.x-i.x,y:o.y-i.y});if(r)return r}return((i,r)=>{const s=$4t(r.get(i.region1Id)),a=$4t(r.get(i.region2Id));return j4t({x:-(a.y-s.y),y:a.x-s.x})??{x:1,y:0}})(t,n)},blo=(t,e,n)=>{const o=`${t}::dup${e}`;if(!n.has(o))return n.add(o),o;for(let i=2;;i++){const r=`${o}-${i}`;if(!n.has(r))return n.add(r),r}},Slo=(t,e,n)=>{const o=t.indexOf(e);o!==-1?t.splice(o+1,0,...n):t.push(...n)},Qlo=(t,e)=>{const n=t.portMetadata?.[e];if(eH(n)){if(typeof n.serializedPortId=="string")return n.serializedPortId;if(typeof n.portId=="string")return n.portId}return`port-${e}`},vlo=(t,e)=>({routeCount:1,portSectionMask:new Int8Array(t.portSectionMask),routeMetadata:t.routeMetadata===void 0?void 0:[t.routeMetadata[e]],routeStartPort:Int32Array.from([t.routeStartPort[e]]),routeEndPort:Int32Array.from([t.routeEndPort[e]]),routeNet:Int32Array.from([t.routeNet[e]]),regionNetId:new Int32Array(t.regionNetId),portPenalty:t.portPenalty===void 0?void 0:new Float64Array(t.portPenalty)}),wlo=t=>{const e=new Set;for(const n of t.state.regionSegments)for(const[,o,i]of n)e.add(o),e.add(i);return e.size===0&&t.problem.routeCount===1&&(e.add(t.problem.routeStartPort[0]),e.add(t.problem.routeEndPort[0])),e},Plo=class extends zA{constructor(t,e={}){super(),this.serializedHyperGraph=t,this.options=e}serializedHyperGraph;options;revisedSerializedHyperGraph;report={portUseCounts:{},duplicatedPorts:[]};getDuplicatePortProximity(){return this.options.duplicatePortProximity??.05}getIndividualRouteSolveOptions(){return{RIP_THRESHOLD_RAMP_ATTEMPTS:0,STATIC_REACHABILITY_PRECHECK:!1,...this.options.routeSolveOptions}}getPortUseCounts(){const{topology:t,problem:e}=iSe(this.serializedHyperGraph);this.options.useSerializedPortPenalties===!1&&(e.portPenalty=void 0);const n=new Map;for(let o=0;o<e.routeCount;o++){const i=vlo(e,o),r=new Bv(t,i,this.getIndividualRouteSolveOptions());if(r.solve(),!r.solved||r.failed)throw new Error(`Route ${o} could not be solved independently: ${r.error??"unknown error"}`);for(const s of wlo(r)){const a=Qlo(t,s);n.set(a,(n.get(a)??0)+1)}}return n}duplicateCongestedPorts(t){const e=this.getDuplicatePortProximity();if(!(e>0))throw new Error("duplicatePortProximity must be greater than zero");const{solvedRoutes:n,...o}=this.serializedHyperGraph,i=this.serializedHyperGraph.regions.map(l=>({...l,pointIds:[...l.pointIds],d:tH(l.d)})),r=this.serializedHyperGraph.ports.map(l=>({...l,d:tH(l.d)})),s=new Map(i.map(l=>[l.regionId,l])),a=new Map(r.map(l=>[l.portId,l])),A=new Set(r.map(l=>l.portId)),c=[];for(const[l,u]of[...t.entries()].sort(([g],[h])=>g.localeCompare(h))){if(u<=1)continue;const g=a.get(l);if(!g)continue;const h=u-1,d=Elo(g,this.serializedHyperGraph.ports),p=Blo(g,d,s),m=cW(g),_=[];for(let f=1;f<=h;f++){const I=blo(l,f,A),C=e*f/(h+1),y=ylo(tH(g.d));y.x=m.x+p.x*C,y.y=m.y+p.y*C,y.duplicatedFromPortId=l,y.duplicateIndex=f,y.duplicatePortUseCount=u,y.duplicatePortProximity=e,y.repairReason="congested-port",r.push({...g,portId:I,d:y}),_.push(I)}for(const f of[g.region1Id,g.region2Id]){const I=s.get(f);I&&Slo(I.pointIds,l,_)}c.push({sourcePortId:l,duplicatePortIds:_,useCount:u})}return this.report={portUseCounts:Object.fromEntries([...t.entries()].sort()),duplicatedPorts:c},{...o,regions:i,ports:r,connections:this.serializedHyperGraph.connections===void 0?void 0:tH(this.serializedHyperGraph.connections)}}_setup(){try{const t=this.getPortUseCounts();this.revisedSerializedHyperGraph=this.duplicateCongestedPorts(t),this.stats={...this.stats,duplicateSourcePortCount:this.report.duplicatedPorts.length,duplicatedPortCount:this.report.duplicatedPorts.reduce((e,n)=>e+n.duplicatePortIds.length,0)},this.solved=!0}catch(t){this.failed=!0,this.error=t instanceof Error?t.message:String(t)}}_step(){this.failed||(this.solved=!0)}getOutput(){if(!this.revisedSerializedHyperGraph||this.failed)throw new Error("DuplicateCongestedPortSolver does not have a repaired topology output");return this.revisedSerializedHyperGraph}},rSe=(t,e)=>{const n=t.owners.size-e.owners.size;if(n!==0)return n;const o=t.distance-e.distance;return o!==0?o:t.queueOrder-e.queueOrder},Mlo=class{heap=[];push(t){this.heap.push(t);let e=this.heap.length-1;for(;e>0;){const n=Math.floor((e-1)/2);if(rSe(this.heap[n],this.heap[e])<=0)break;[this.heap[n],this.heap[e]]=[this.heap[e],this.heap[n]],e=n}}pop(){const t=this.heap[0],e=this.heap.pop();if(!t||!e)return null;if(this.heap.length===0)return t;this.heap[0]=e;let n=0;for(;;){const o=2*n+1,i=o+1;let r=n;if(o<this.heap.length&&rSe(this.heap[o],this.heap[r])<0&&(r=o),i<this.heap.length&&rSe(this.heap[i],this.heap[r])<0&&(r=i),r===n)break;[this.heap[n],this.heap[r]]=[this.heap[r],this.heap[n]],n=r}return t}},q4t=(t,e)=>!(t.distance>e.distance)&&((n,o)=>{if(n.size>o.size)return!1;for(const i of n)if(!o.has(i))return!1;return!0})(t.owners,e.owners),Dlo=(t,e)=>{const n=[],o=[];let i=t;for(;i!==null;)n.push(i.state),i.incomingHop!==null&&o.push(i.incomingHop),i=i.parent;return n.reverse(),o.reverse(),{found:!0,states:n,hops:o,owners:new Set(t.owners),distance:t.distance,expandedLabelCount:e}},Nlo=t=>{for(;;){const e=t.pop();if(e===null)return null;if(e.active)return e}},X4t=(t,e)=>{G4t(t,e),e&&(e.MAX_RIPS!==void 0&&(t.MAX_RIPS=e.MAX_RIPS),e.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT!==void 0&&(t.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT=e.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT),e.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST!==void 0&&(t.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST=e.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST))},Z4t=t=>t.map(e=>e.map(([n,o,i])=>[n,o,i])),Rlo=t=>({netIds:new Int32Array(t.netIds),lesserAngles:new Int32Array(t.lesserAngles),greaterAngles:new Int32Array(t.greaterAngles),layerMasks:new Int32Array(t.layerMasks),existingCrossingLayerIntersections:t.existingCrossingLayerIntersections,existingSameLayerIntersections:t.existingSameLayerIntersections,existingEntryExitLayerChanges:t.existingEntryExitLayerChanges,existingRegionCost:t.existingRegionCost,existingSegmentCount:t.existingSegmentCount}),sSe=t=>({portAssignment:new Int32Array(t.portAssignment),regionSegments:Z4t(t.regionSegments),regionIntersectionCaches:t.regionIntersectionCaches.map(Rlo)}),aSe=(t,e)=>{const n=sSe(e);t.state.portAssignment=n.portAssignment,t.state.regionSegments=n.regionSegments,t.state.regionIntersectionCaches=n.regionIntersectionCaches},eBt=t=>{let e=0,n=0;for(let o=0;o<t.length;o++){const i=t[o]?.existingRegionCost??0;e=Math.max(e,i),n+=i}return{maxRegionCost:e,totalRegionCost:n}},tBt=(t,e)=>t.maxRegionCost!==e.maxRegionCost?t.maxRegionCost-e.maxRegionCost:t.totalRegionCost-e.totalRegionCost,Tlo=(t,e,n)=>{const o=t.incidentPortRegion[e]??[],i=t.incidentPortRegion[n]??[],r=o.find(s=>i.includes(s));if(r===void 0)throw new Error(`Ports ${e} and ${n} do not share a region`);return r},nBt=(t,e,n,o)=>{const i=n.solvedRoutePathSegments[o]??[],r=n.solvedRoutePathRegionIds?.[o]??[],s=e.routeStartPort[o],a=e.routeEndPort[o];if(i.length===0){if(s===a)return{orderedPortIds:[s],orderedRegionIds:[]};throw new Error(`Route ${o} does not have an existing solved path`)}const A=new Map;i.forEach(([d,p],m)=>{const _={segmentIndex:m,fromPortId:d,toPortId:p,regionId:r[m]},f=A.get(d)??[];f.push(_),A.set(d,f);const I=A.get(p)??[];I.push(_),A.set(p,I)});const c=[s],l=[],u=new Set;let g,h=s;for(;h!==a;){const d=(A.get(h)??[]).filter(({segmentIndex:_,fromPortId:f,toPortId:I})=>u.has(_)?!1:(f===h?I:f)!==g);if(d.length!==1)throw new Error(`Route ${o} is not a single ordered path from ${s} to ${a}`);const p=d[0],m=p.fromPortId===h?p.toPortId:p.fromPortId;u.add(p.segmentIndex),l.push(p.regionId??Tlo(t,p.fromPortId,p.toPortId)),c.push(m),g=h,h=m}if(u.size!==i.length)throw new Error(`Route ${o} contains disconnected solved segments`);return{orderedPortIds:c,orderedRegionIds:l}},oBt=(t,e,n,o)=>{const i=new Bv(t,e,o);return((r,s)=>{r.state.portAssignment.fill(-1),r.state.regionSegments=Array.from({length:r.topology.regionCount},()=>[]),r.state.regionIntersectionCaches=Array.from({length:r.topology.regionCount},()=>aW()),r.state.currentRouteId=void 0,r.state.currentRouteNetId=void 0,r.state.unroutedRoutes=[],r.state.candidateQueue.clear(),r.resetCandidateBestCosts(),r.state.goalPortId=-1,r.state.ripCount=0,r.state.regionCongestionCost.fill(0);for(let a=0;a<s.length;a++)for(const[A,c,l]of s[a]??[])r.state.currentRouteNetId=r.problem.routeNet[A],r.state.regionSegments[a].push([A,c,l]),r.state.portAssignment[c]=r.state.currentRouteNetId,r.state.portAssignment[l]=r.state.currentRouteNetId,r.appendSegmentToRegionCache(a,c,l);r.state.currentRouteId=void 0,r.state.currentRouteNetId=void 0,r.solved=!0,r.failed=!1,r.error=null})(i,n),i},iBt=(t,e,n)=>{const o=new Int32Array(e.routeStartPort),i=new Int32Array(e.routeEndPort),r=Array.from({length:e.routeCount},(a,A)=>({routeId:A,fixedSegments:[]})),s=[];for(let a=0;a<e.routeCount;a++){const A=r[a],{orderedPortIds:c,orderedRegionIds:l}=nBt(t,e,n,a),u=[];let g;for(let m=0;m<c.length;m++){const _=c[m],f=e.portSectionMask[_]===1;f&&g===void 0?g=m:f||g===void 0||(u.push({startIndex:g,endIndex:m-1}),g=void 0)}if(g!==void 0&&u.push({startIndex:g,endIndex:c.length-1}),u.length===0){for(let m=1;m<c.length;m++)A.fixedSegments.push({regionId:l[m-1],fromPortId:c[m-1],toPortId:c[m]});continue}if(u.length>1)throw new Error(`Route ${a} enters the section multiple times; only one contiguous section span is currently supported`);const h=u[0],d=Math.max(0,h.startIndex-1),p=Math.min(c.length-1,h.endIndex+1);if(p<=d)throw new Error(`Route ${a} does not have a valid section span`);for(let m=1;m<=d;m++)A.fixedSegments.push({regionId:l[m-1],fromPortId:c[m-1],toPortId:c[m]});for(let m=p+1;m<c.length;m++)A.fixedSegments.push({regionId:l[m-1],fromPortId:c[m-1],toPortId:c[m]});A.activeStartPortId=c[d],A.activeEndPortId=c[p],A.forcedStartRegionId=l[d],o[a]=A.activeStartPortId,i[a]=A.activeEndPortId,s.push(a)}return{sectionProblem:{routeCount:e.routeCount,portSectionMask:new Int8Array(e.portSectionMask),routeMetadata:e.routeMetadata,routeStartPort:o,routeEndPort:i,routeNet:new Int32Array(e.routeNet),regionNetId:new Int32Array(e.regionNetId),portPenalty:e.portPenalty===void 0?void 0:new Float64Array(e.portPenalty)},routePlans:r,activeRouteIds:s}},klo=(t,e,n)=>iBt(t,e,n).activeRouteIds,Flo=class extends Bv{constructor(t,e,n,o,i,r,s,a){super(t,e,a),this.routePlans=n,this.activeRouteIds=o,this.mutableRegionIds=i,this.immutableRegionSummary=r,this.baselineSummary=s,X4t(this,a),this.state.unroutedRoutes=[...o],this.applyFixedSegments(),this.fixedSnapshot=sSe({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches})}routePlans;activeRouteIds;mutableRegionIds;immutableRegionSummary;baselineSummary;bestSnapshot;fixedSnapshot;bestSummary;baselineBeatRipCount;previousBestMaxRegionCost=Number.POSITIVE_INFINITY;ripsSinceBestMaxRegionCostImprovement=0;MAX_RIPS=Number.POSITIVE_INFINITY;MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT=Number.POSITIVE_INFINITY;EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST=Number.POSITIVE_INFINITY;applyFixedSegments(){for(const t of this.routePlans)for(const{regionId:e,fromPortId:n,toPortId:o}of t.fixedSegments)this.state.currentRouteNetId=this.problem.routeNet[t.routeId],this.state.regionSegments[e].push([t.routeId,n,o]),this.state.portAssignment[n]=this.state.currentRouteNetId,this.state.portAssignment[o]=this.state.currentRouteNetId,this.appendSegmentToRegionCache(e,n,o);this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0}captureBestState(t){this.bestSummary&&tBt(t,this.bestSummary)>=0||(this.bestSummary=t,this.bestSnapshot=sSe({portAssignment:this.state.portAssignment,regionSegments:this.state.regionSegments,regionIntersectionCaches:this.state.regionIntersectionCaches}))}restoreBestState(){this.bestSnapshot&&(aSe(this,this.bestSnapshot),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=[],this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1)}getStartingNextRegionId(t,e){const n=this.routePlans[t]?.forcedStartRegionId;return n!==void 0?n:super.getStartingNextRegionId(t,e)}resetRoutingStateForRerip(){if(!this.fixedSnapshot)return super.resetRoutingStateForRerip(),this.state.unroutedRoutes=wAe([...this.activeRouteIds],this.state.ripCount),void this.applyFixedSegments();aSe(this,this.fixedSnapshot),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=wAe([...this.activeRouteIds],this.state.ripCount),this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1}onAllRoutesRouted(){const{state:t}=this,e=Math.min(this.MAX_RIPS,this.RIP_THRESHOLD_RAMP_ATTEMPTS),n=e<=0?1:Math.min(1,t.ripCount/e),o=this.RIP_THRESHOLD_START+(this.RIP_THRESHOLD_END-this.RIP_THRESHOLD_START)*n,i=[],r=new Float64Array(this.mutableRegionIds.length);let s=0,a=0;for(let u=0;u<this.mutableRegionIds.length;u++){const g=this.mutableRegionIds[u],h=t.regionIntersectionCaches[g]?.existingRegionCost??0;r[u]=h,s=Math.max(s,h),a+=h,h>o&&i.push(g)}const A=Math.max(this.immutableRegionSummary.maxRegionCost,s),c=this.immutableRegionSummary.totalRegionCost+a;this.captureBestState({maxRegionCost:A,totalRegionCost:c});const l=this.bestSummary??{maxRegionCost:A,totalRegionCost:c};if(l.maxRegionCost<this.previousBestMaxRegionCost-Number.EPSILON?(this.previousBestMaxRegionCost=l.maxRegionCost,this.ripsSinceBestMaxRegionCostImprovement=0):this.ripsSinceBestMaxRegionCostImprovement+=1,this.baselineBeatRipCount===void 0&&l.maxRegionCost<this.baselineSummary.maxRegionCost-Number.EPSILON&&(this.baselineBeatRipCount=t.ripCount),this.stats={...this.stats,activeRouteCount:this.activeRouteIds.length,currentRipThreshold:o,hotRegionCount:i.length,maxRegionCost:A,totalRegionCost:c,bestMaxRegionCost:l.maxRegionCost,bestTotalRegionCost:l.totalRegionCost,ripCount:t.ripCount},i.length===0||t.ripCount>=e||this.ripsSinceBestMaxRegionCostImprovement>=this.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT||this.baselineBeatRipCount!==void 0&&t.ripCount-this.baselineBeatRipCount>=this.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST)return this.restoreBestState(),void(this.solved=!0);for(let u=0;u<this.mutableRegionIds.length;u++){const g=this.mutableRegionIds[u];t.regionCongestionCost[g]+=r[u]*this.RIP_CONGESTION_REGION_COST_FACTOR}t.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:t.ripCount,reripRegionCount:i.length}}onOutOfCandidates(){const{state:t}=this;for(const e of this.mutableRegionIds){const n=t.regionIntersectionCaches[e]?.existingRegionCost??0;t.regionCongestionCost[e]+=n*this.RIP_CONGESTION_REGION_COST_FACTOR}t.ripCount+=1,this.resetRoutingStateForRerip(),this.stats={...this.stats,ripCount:t.ripCount,reripReason:"out_of_candidates"}}tryFinalAcceptance(){if(this.bestSnapshot)return this.restoreBestState(),void(this.solved=!0);this.fixedSnapshot&&aSe(this,this.fixedSnapshot),this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=[...this.activeRouteIds],this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1,this.stats={...this.stats,acceptedFixedSectionStateOnTimeout:!0},this.solved=!0}visualize(){return NAe(this,{highlightSectionMask:!0,showInitialRouteHints:!1,showOnlySectionPortsOnIdle:!0})}},lW=class extends zA{constructor(t,e,n,o){super(),this.topology=t,this.problem=e,this.initialSolution=n,X4t(this,o),this.baselineSolver=((i,r,s,a)=>{const A=Array.from({length:i.regionCount},()=>[]);for(let c=0;c<r.routeCount;c++){const{orderedPortIds:l,orderedRegionIds:u}=nBt(i,r,s,c);for(let g=1;g<l.length;g++){const h=l[g-1],d=l[g];A[u[g-1]].push([c,h,d])}}return oBt(i,r,A,a)})(t,e,n,RAe(this)),this.baselineSummary=eBt(this.baselineSolver.state.regionIntersectionCaches),this.sectionRegionIds=((i,r)=>{const s=new Set;for(let a=0;a<r.portSectionMask.length;a++)if(r.portSectionMask[a]===1)for(const A of i.incidentPortRegion[a]??[])s.add(A);return[...s]})(t,e),this.sectionBaselineSummary=((i,r)=>{let s=0,a=0;for(const A of r){const c=i[A]?.existingRegionCost??0;s=Math.max(s,c),a+=c}return{maxRegionCost:s,totalRegionCost:a}})(this.baselineSolver.state.regionIntersectionCaches,this.sectionRegionIds),this.outsideSectionBaselineSummary=((i,r)=>{const s=new Set(r);let a=0,A=0;for(let c=0;c<i.length;c++){if(s.has(c))continue;const l=i[c]?.existingRegionCost??0;a=Math.max(a,l),A+=l}return{maxRegionCost:a,totalRegionCost:A}})(this.baselineSolver.state.regionIntersectionCaches,this.sectionRegionIds),this.applySectionRipPolicy()}topology;problem;initialSolution;baselineSolver;baselineSummary;sectionBaselineSummary;outsideSectionBaselineSummary;sectionRegionIds;optimizedSolver;sectionSolver;activeRouteIds=[];DISTANCE_TO_COST=.05;minViaPadDiameter=d4t;VERBOSE=!1;RIP_THRESHOLD_START=.05;RIP_THRESHOLD_END=.8;RIP_THRESHOLD_RAMP_ATTEMPTS=50;MAX_RIPS=Number.POSITIVE_INFINITY;MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT=10;EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST=10;RIP_CONGESTION_REGION_COST_FACTOR=.1;MAX_ITERATIONS=1e6;STATIC_REACHABILITY_PRECHECK=!1;STATIC_REACHABILITY_PRECHECK_MAX_HOPS=16;ACCEPT_BEST_SOLUTION_ON_TIMEOUT=!0;GREEDY_FINAL_ROUTE_ITERS=4;applySectionRipPolicy(){this.RIP_THRESHOLD_START=.05,this.RIP_THRESHOLD_END=Math.max(this.RIP_THRESHOLD_START,this.sectionBaselineSummary.maxRegionCost),this.MAX_RIPS=Math.min(this.MAX_RIPS,20)}_setup(){this.applySectionRipPolicy();const{sectionProblem:t,routePlans:e,activeRouteIds:n}=iBt(this.topology,this.problem,this.initialSolution);if(this.activeRouteIds=n,n.length===0)return this.optimizedSolver=this.baselineSolver,this.stats={...this.stats,activeRouteCount:0,initialMaxRegionCost:this.baselineSummary.maxRegionCost,finalMaxRegionCost:this.baselineSummary.maxRegionCost,optimized:!1},void(this.solved=!0);var o;this.sectionSolver=new Flo(this.topology,t,e,n,this.sectionRegionIds,this.outsideSectionBaselineSummary,this.baselineSummary,{...RAe(o=this),MAX_RIPS:o.MAX_RIPS,MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT:o.MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT,EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST:o.EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST}),this.activeSubSolver=this.sectionSolver,this.stats={...this.stats,sectionBaselineMaxRegionCost:this.sectionBaselineSummary.maxRegionCost,sectionBaselineTotalRegionCost:this.sectionBaselineSummary.totalRegionCost,effectiveRipThresholdStart:this.RIP_THRESHOLD_START,effectiveRipThresholdEnd:this.RIP_THRESHOLD_END,effectiveMaxRips:this.MAX_RIPS}}_step(){if(!this.sectionSolver)return void(this.solved=!0);if(this.sectionSolver.step(),this.stats={...this.stats,...this.sectionSolver.stats,activeRouteCount:this.activeRouteIds.length},this.sectionSolver.failed)return this.optimizedSolver=this.baselineSolver,this.stats={...this.stats,initialMaxRegionCost:this.baselineSummary.maxRegionCost,initialTotalRegionCost:this.baselineSummary.totalRegionCost,finalMaxRegionCost:this.baselineSummary.maxRegionCost,finalTotalRegionCost:this.baselineSummary.totalRegionCost,optimized:!1,sectionSearchFailedFallbackToBaseline:!0,sectionSearchError:this.sectionSolver.error},void(this.solved=!0);if(!this.sectionSolver.solved)return;const t=oBt(this.topology,this.problem,Z4t(this.sectionSolver.state.regionSegments),RAe(this)),e=eBt(t.state.regionIntersectionCaches),n=tBt(e,this.baselineSummary)<0;this.optimizedSolver=n?t:this.baselineSolver;const o=n?e:this.baselineSummary;this.stats={...this.stats,initialMaxRegionCost:this.baselineSummary.maxRegionCost,initialTotalRegionCost:this.baselineSummary.totalRegionCost,candidateMaxRegionCost:e.maxRegionCost,candidateTotalRegionCost:e.totalRegionCost,finalMaxRegionCost:o.maxRegionCost,finalTotalRegionCost:o.totalRegionCost,optimized:n},this.solved=!0}tryFinalAcceptance(){this.optimizedSolver=this.baselineSolver,this.stats={...this.stats,initialMaxRegionCost:this.baselineSummary.maxRegionCost,initialTotalRegionCost:this.baselineSummary.totalRegionCost,finalMaxRegionCost:this.baselineSummary.maxRegionCost,finalTotalRegionCost:this.baselineSummary.totalRegionCost,optimized:!1,sectionSolverTimeoutFallbackToBaseline:!0},this.solved=!0,this.failed=!1,this.error=null}getSolvedSolver(){if(!this.solved||this.failed||!this.optimizedSolver)throw new Error("TinyHyperGraphSectionSolver does not have a solved output yet");return this.optimizedSolver}visualize(){return this.optimizedSolver?NAe(this.optimizedSolver,{highlightSectionMask:!0}):this.sectionSolver?this.sectionSolver.visualize():NAe(this.baselineSolver,{highlightSectionMask:!0,showInitialRouteHints:!1,showOnlySectionPortsOnIdle:!0})}getOutput(){return this.getSolvedSolver().getOutput()}},Llo=["self-touch","onehop-all","onehop-touch","twohop-all","twohop-touch"],Hlo={"self-all":0,"self-touch":0,"onehop-all":1,"onehop-touch":1,"twohop-all":2,"twohop-touch":2,"threehop-all":3,"threehop-touch":3,"fourhop-all":4,"fourhop-touch":4},Olo=(t,e)=>{const n=new Set(e);for(const o of e)for(const i of t.regionIncidentPorts[o]??[])for(const r of t.incidentPortRegion[i]??[])n.add(r);return[...n]},Glo=(t,e,n)=>{let o=[...new Set(e)];for(let i=0;i<n;i+=1)o=Olo(t,o);return o},Ylo=(t,e,n)=>e.flatMap(o=>n.map(i=>((r,s,a)=>({label:`hot-${s}-${a}`,family:a,regionIds:Glo(r,[s],Hlo[a]),portSelectionRule:a.endsWith("-all")?"all-incident-regions-selected":"touches-selected-region"}))(t,o,i))),Ulo={RIP_THRESHOLD_RAMP_ATTEMPTS:5},Klo={DISTANCE_TO_COST:.05,RIP_THRESHOLD_RAMP_ATTEMPTS:16,RIP_CONGESTION_REGION_COST_FACTOR:.1,MAX_ITERATIONS:5e4,MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT:6,EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST:Number.POSITIVE_INFINITY},ASe=t=>t.state.regionIntersectionCaches.reduce((e,n)=>Math.max(e,n.existingRegionCost),0),Vlo=(t,e)=>{const n=iSe(t),o=new lW(n.topology,n.problem,n.solution,e);return ASe(o.baselineSolver)},zlo=(t,e,n)=>{const o=new Set(e);return Int8Array.from({length:t.portCount},(i,r)=>{const s=t.incidentPortRegion[r]??[];return n==="touches-selected-region"?s.some(a=>o.has(a))?1:0:s.length>0&&s.every(a=>o.has(a))?1:0})},Jlo=(t,e)=>({routeCount:t.routeCount,portSectionMask:e,routeMetadata:t.routeMetadata,routeStartPort:new Int32Array(t.routeStartPort),routeEndPort:new Int32Array(t.routeEndPort),routeNet:new Int32Array(t.routeNet),regionNetId:new Int32Array(t.regionNetId),portPenalty:t.portPenalty===void 0?void 0:new Float64Array(t.portPenalty)}),Wlo=(t,e,n,o,i,r)=>{const s=performance.now(),a=performance.now(),A=new lW(e,n,o,r),c=ASe(A.baselineSolver),l=performance.now()-a;let u,g,h=c,d=new Int8Array(e.portCount),p=0,m=0,_=0,f=0,I=0,C=0,y=0;const x=new Set,E=i?.maxHotRegions??r.MAX_HOT_REGIONS??2;for(const B of((S,Q,w,M)=>{const k=S.state.regionIntersectionCaches.map((R,F)=>({regionId:F,regionCost:R.existingRegionCost})).filter(({regionCost:R})=>R>0).sort((R,F)=>F.regionCost-R.regionCost).slice(0,w).map(({regionId:R})=>R);return Ylo(Q,k,M)})(t,e,E,i?.candidateFamilies??[...Llo])){const S=Jlo(n,zlo(e,B.regionIds,B.portSelectionRule));p+=1;const Q=S.portSectionMask.join(",");if(x.has(Q))_+=1;else{x.add(Q);try{const w=performance.now(),M=klo(e,S,o);if(f+=performance.now()-w,M.length===0)continue;m+=1;const k=performance.now(),R=new lW(e,S,o,r);I+=performance.now()-k;const F=performance.now();if(R.solve(),C+=performance.now()-F,R.failed||!R.solved)continue;if(Number(R.stats.finalMaxRegionCost??ASe(R.getSolvedSolver()))<h-1e-9){const O=performance.now(),U=Vlo(R.getOutput(),r);y+=performance.now()-O,U<h-1e-9&&(h=U,d=new Int8Array(S.portSectionMask),u=B.label,g=B.family)}}catch{}}}return{portSectionMask:d,baselineMaxRegionCost:c,finalMaxRegionCost:h,generatedCandidateCount:p,candidateCount:m,duplicateCandidateCount:_,totalMs:performance.now()-s,baselineEvaluationMs:l,candidateEligibilityMs:f,candidateInitMs:I,candidateSolveMs:C,candidateReplayScoreMs:y,winningCandidateLabel:u,winningCandidateFamily:g}},jlo=class extends n7{initialVisualizationSolver;selectedSectionMask;selectedSectionCandidateLabel;selectedSectionCandidateFamily;constructor(t){super(t),this.MAX_ITERATIONS=2e5}loadHyperGraph(t){return iSe(t)}getSolveGraphOptions(){return{...Ulo,...this.inputProblem.minViaPadDiameter===void 0?{}:{minViaPadDiameter:this.inputProblem.minViaPadDiameter},...this.inputProblem.solveGraphOptions}}getSectionSolverOptions(){return{...Klo,...this.inputProblem.minViaPadDiameter===void 0?{}:{minViaPadDiameter:this.inputProblem.minViaPadDiameter},...this.inputProblem.sectionSolverOptions}}pipelineDef=[{solverName:"solveGraph",solverClass:Bv,getConstructorParams:t=>{const{topology:e,problem:n}=t.loadHyperGraph(t.inputProblem.serializedHyperGraph);return[e,n,t.getSolveGraphOptions()]}},{solverName:"optimizeSection",solverClass:lW,getConstructorParams:t=>t.getSectionStageParams()}];getSectionStageParams(){const t=this.getStageOutput("solveGraph");if(!t)throw new Error("solveGraph did not produce a solved serialized hypergraph");const e=this.getSolver("solveGraph");if(!e)throw new Error("solveGraph solver is unavailable");const n=this.getSectionSolverOptions(),{topology:o,problem:i,solution:r}=this.loadHyperGraph(t),s=this.inputProblem.createSectionMask?this.inputProblem.createSectionMask({serializedHyperGraph:this.inputProblem.serializedHyperGraph,solvedSerializedHyperGraph:t,solvedSolver:e,topology:o,problem:i,solution:r}):(()=>{const a=Wlo(e,o,i,r,this.inputProblem.sectionSearchConfig,n);return this.selectedSectionCandidateLabel=a.winningCandidateLabel,this.selectedSectionCandidateFamily=a.winningCandidateFamily,this.stats={...this.stats,sectionSearchGeneratedCandidateCount:a.generatedCandidateCount,sectionSearchCandidateCount:a.candidateCount,sectionSearchDuplicateCandidateCount:a.duplicateCandidateCount,sectionSearchBaselineMaxRegionCost:a.baselineMaxRegionCost,sectionSearchFinalMaxRegionCost:a.finalMaxRegionCost,sectionSearchDelta:a.baselineMaxRegionCost-a.finalMaxRegionCost,selectedSectionCandidateLabel:a.winningCandidateLabel??null,selectedSectionCandidateFamily:a.winningCandidateFamily??null,sectionSearchMs:a.totalMs,sectionSearchBaselineEvaluationMs:a.baselineEvaluationMs,sectionSearchCandidateEligibilityMs:a.candidateEligibilityMs,sectionSearchCandidateInitMs:a.candidateInitMs,sectionSearchCandidateSolveMs:a.candidateSolveMs,sectionSearchCandidateReplayScoreMs:a.candidateReplayScoreMs},a.portSectionMask})();return this.selectedSectionMask=new Int8Array(s),i.portSectionMask=new Int8Array(s),this.stats={...this.stats,sectionMaskPortCount:[...s].filter(a=>a===1).length},[o,i,r,n]}getInitialVisualizationSolver(){if(!this.initialVisualizationSolver){const{topology:t,problem:e}=this.loadHyperGraph(this.inputProblem.serializedHyperGraph);this.initialVisualizationSolver=new Bv(t,e,this.getSolveGraphOptions())}return this.initialVisualizationSolver}initialVisualize(){return this.getInitialVisualizationSolver().visualize()}visualize(){return this.iterations===0?this.initialVisualize()??super.visualize():super.visualize()}getOutput(){return this.getStageOutput("optimizeSection")??this.getStageOutput("solveGraph")??null}tryFinalAcceptance(){this.getStageOutput("solveGraph")&&(this.stats={...this.stats,acceptedSolveGraphOutputOnSectionPipelineTimeout:!0},this.activeSubSolver=void 0,this.solved=!0,this.failed=!1,this.error=null)}},$lo=class extends Ilo{failedOwnerPairCounts=new Map;selectiveReripStats={selectiveRipCount:0,selectivelyRippedRouteCount:0,globalReripCount:0,alternateBlockerSearchCount:0,alternateOwnerCount:0,failedOwnerPairCount:0,maxFailedOwnerPairCount:0,failedOwnerPairs:[],lastDirectOwnerRouteIds:[],lastRepeatedOwnerRouteIds:[],lastAlternateOwnerRouteIds:[],lastRippedRouteIds:[],lastRelaxedSearchExpandedLabelCount:0,lastAlternateSearchExpandedLabelCount:0};selectiveReripCongestionUpdateCount=0;constructor(t,e,n){super(t,e,n)}getSelectiveReripStats(){return{...this.selectiveReripStats,failedOwnerPairs:this.selectiveReripStats.failedOwnerPairs.map(t=>({...t})),lastDirectOwnerRouteIds:[...this.selectiveReripStats.lastDirectOwnerRouteIds],lastRepeatedOwnerRouteIds:[...this.selectiveReripStats.lastRepeatedOwnerRouteIds],lastAlternateOwnerRouteIds:[...this.selectiveReripStats.lastAlternateOwnerRouteIds],lastRippedRouteIds:[...this.selectiveReripStats.lastRippedRouteIds]}}onOutOfCandidates(){const t=this.state.currentRouteId;if(t===void 0)throw new Error("SelectiveReripTinyHyperGraphSolver: candidate search exhausted without a current route");const e=this.findRelaxedBlockerPathPreferringPreservedRoutes();if(!e.found||e.owners.size===0)return this.selectiveReripStats.globalReripCount+=1,this.selectiveReripStats.globalReripReason=e.found?"no_blocker_path":e.reason,this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=[],this.selectiveReripStats.lastRepeatedOwnerRouteIds=[],this.selectiveReripStats.lastAlternateOwnerRouteIds=[],this.selectiveReripStats.lastRippedRouteIds=[],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=0,super.onOutOfCandidates(),void this.publishSelectiveReripStats();const n=[...e.owners],o=[];for(const A of n)this.incrementFailedOwnerPair(t,A)>=2&&o.push(A);if(n.some(A=>this.hasFailedOwnerPath(A,t)))return this.selectiveReripStats.globalReripCount+=1,this.selectiveReripStats.globalReripReason="failed_owner_cycle",this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=n,this.selectiveReripStats.lastRepeatedOwnerRouteIds=o,this.selectiveReripStats.lastAlternateOwnerRouteIds=[],this.selectiveReripStats.lastRippedRouteIds=[],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=0,this.failedOwnerPairCounts.clear(),super.onOutOfCandidates(),void this.publishSelectiveReripStats();let i;if(o.length>0&&(this.selectiveReripStats.alternateBlockerSearchCount+=1,i=this.findRelaxedBlockerPathPreferringPreservedRoutes(new Set(o)),!i.found))return this.selectiveReripStats.globalReripCount+=1,this.selectiveReripStats.globalReripReason=i.reason,this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=n,this.selectiveReripStats.lastRepeatedOwnerRouteIds=o,this.selectiveReripStats.lastAlternateOwnerRouteIds=[],this.selectiveReripStats.lastRippedRouteIds=[],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=i.expandedLabelCount,super.onOutOfCandidates(),void this.publishSelectiveReripStats();const r=i?.found?[...i.owners]:void 0,s=(function(A){const c=new Set(A.alternateOwnerRouteIds??A.directOwnerRouteIds);if(c.delete(A.failedRouteId),c.size===0)throw new Error(`SelectiveReripTinyHyperGraphSolver: route ${A.failedRouteId} has blocker resources but no distinct committed owner can be reripped`);return c})({failedRouteId:t,directOwnerRouteIds:n,alternateOwnerRouteIds:r});this.clearPartialRipPlans(s);const a=(r??[]).filter(A=>!e.owners.has(A));this.selectiveReripCongestionUpdateCount<1&&(this.addCongestionCostForSelectiveRerip(),this.selectiveReripCongestionUpdateCount+=1),this.rebuildCommittedState(s),this.state.ripCount+=1,this.state.currentRouteId=void 0,this.state.currentRouteNetId=void 0,this.state.unroutedRoutes=(function(A){const c=A.pendingRouteIds.filter(u=>u!==A.failedRouteId&&!A.rippedRouteIds.has(u)),l=[...A.rippedRouteIds].filter(u=>u!==A.failedRouteId);return[A.failedRouteId,...c,...l]})({failedRouteId:t,pendingRouteIds:this.state.unroutedRoutes,rippedRouteIds:s}),this.state.candidateQueue.clear(),this.resetCandidateBestCosts(),this.state.goalPortId=-1,this.selectiveReripStats.selectiveRipCount+=1,this.selectiveReripStats.selectivelyRippedRouteCount+=s.size,this.selectiveReripStats.alternateOwnerCount+=a.length,this.selectiveReripStats.lastFailedRouteId=t,this.selectiveReripStats.lastDirectOwnerRouteIds=n,this.selectiveReripStats.lastRepeatedOwnerRouteIds=o,this.selectiveReripStats.lastAlternateOwnerRouteIds=a,this.selectiveReripStats.lastRippedRouteIds=[...s],this.selectiveReripStats.lastRelaxedSearchExpandedLabelCount=e.expandedLabelCount,this.selectiveReripStats.lastAlternateSearchExpandedLabelCount=i?.expandedLabelCount??0,this.publishSelectiveReripStats()}addCongestionCostForSelectiveRerip(){for(let t=0;t<this.topology.regionCount;t++){const e=this.state.regionIntersectionCaches[t]?.existingRegionCost??0;this.state.regionCongestionCost[t]+=e*this.RIP_CONGESTION_REGION_COST_FACTOR}}findRelaxedBlockerPath(t=new Set){const e=this.state.currentRouteId,n=this.state.currentRouteNetId;if(e===void 0||n===void 0)throw new Error("SelectiveReripTinyHyperGraphSolver: blocker search requires a current route and net");const o=this.getRouteStartPortId(e),i=this.getRouteEndPortId(e),r=this.getStartingNextRegionId(e,o);if(r===void 0)throw new Error(`SelectiveReripTinyHyperGraphSolver: route ${this.describeRoute(e)} has no starting region for blocker search`);const s=this.getPortOwners();return(a=>{const A=a.maxExpandedLabels??Number.POSITIVE_INFINITY;if(A!==Number.POSITIVE_INFINITY&&(!Number.isInteger(A)||A<0))throw new Error("maxExpandedLabels must be a non-negative integer");const c=new Map,l=new Mlo;let u=0,g=0;const h={state:a.start,stateKey:a.getStateKey(a.start),owners:new Set,distance:0,parent:null,incomingHop:null,queueOrder:u++,active:!0};for(c.set(h.stateKey,[h]),l.push(h);;){const d=Nlo(l);if(d===null)return{found:!1,reason:"no_path",expandedLabelCount:g};if(a.isGoal(d.state))return Dlo(d,g);if(g>=A)return{found:!1,reason:"expansion_limit",expandedLabelCount:g};g++;for(const p of a.getHops(d.state)){if(!Number.isFinite(p.distance)||p.distance<0)throw new Error("Distinct-owner blocker hops require finite distances >= 0");const m=new Set(d.owners);for(const y of p.owners??[])m.add(y);const _=d.distance+p.distance;if(!Number.isFinite(_))throw new Error("Distinct-owner blocker path distance overflowed");const f={state:p.state,stateKey:a.getStateKey(p.state),owners:m,distance:_,parent:d,incomingHop:p,queueOrder:u++,active:!0},I=c.get(f.stateKey)??[];if(I.some(y=>q4t(y,f)))continue;const C=[];for(const y of I)q4t(f,y)?y.active=!1:C.push(y);C.push(f),c.set(f.stateKey,C),l.push(f)}}})({start:{portId:o,nextRegionId:r},getStateKey:({portId:a,nextRegionId:A})=>this.getHopId(a,A),isGoal:({portId:a})=>a===i,getHops:a=>this.getRelaxedSearchHops({state:a,goalPortId:i,routeNetId:n,portOwners:s,forbiddenOwnerRouteIds:t}),maxExpandedLabels:this.getRelaxedSearchExpansionLimit()})}findRelaxedBlockerPathPreferringPreservedRoutes(t=new Set){const e=this.getRouteIdsPreferredForPreservation();if(e.size===0)return this.findRelaxedBlockerPath(t);const n=new Set(t);for(const i of e)n.add(i);const o=this.findRelaxedBlockerPath(n);return o.found&&o.owners.size>0?o:this.findRelaxedBlockerPath(t)}getRelaxedSearchExpansionLimit(){let t=0;for(const n of this.topology.incidentPortRegion)t+=n.length;const e=Math.max(4,Math.ceil(Math.log2(this.problem.routeCount+1)));return Math.max(4096,t*e*4)}getRelaxedSearchHops(t){const{state:e,goalPortId:n,routeNetId:o}=t;if(this.isRegionReservedForDifferentNet(e.nextRegionId))return[];const i=[];for(const r of this.topology.regionIncidentPorts[e.nextRegionId]??[]){if(r===e.portId||this.isPortReservedForDifferentNet(r)||r!==n&&this.problem.portSectionMask[r]===0)continue;const s=this.getHopBlockerResources({regionId:e.nextRegionId,fromPortId:e.portId,toPortId:r,routeNetId:o,portOwners:t.portOwners}),a=[...new Set(s.flatMap(c=>c.owners))];if(a.some(c=>t.forbiddenOwnerRouteIds.has(c)))continue;let A=e.nextRegionId;if(r!==n){const[c,l]=this.topology.incidentPortRegion[r]??[];if(A=c===e.nextRegionId?l:c,A===void 0||this.isRegionReservedForDifferentNet(A))continue}i.push({state:{portId:r,nextRegionId:A},distance:Math.hypot(this.topology.portX[e.portId]-this.topology.portX[r],this.topology.portY[e.portId]-this.topology.portY[r]),owners:a,data:{resources:s}})}return i}getHopBlockerResources(t){const e=[],n=this.state.portAssignment[t.toPortId];if(n!==-1&&n!==t.routeNetId){const i=[...t.portOwners.get(t.toPortId)??new Set].filter(r=>this.problem.routeNet[r]!==t.routeNetId);if(i.length===0)throw new Error(`SelectiveReripTinyHyperGraphSolver: port ${t.toPortId} is assigned to foreign net ${n} without a committed route owner`);e.push({kind:"port",portId:t.toPortId,owners:i})}const o=this.getHardBlockedCrossingOwners(t.regionId,t.fromPortId,t.toPortId);return o.length>0&&e.push({kind:"same_layer_intersection",regionId:t.regionId,fromPortId:t.fromPortId,toPortId:t.toPortId,owners:o}),e}getPortOwners(){const t=new Map;for(const e of this.state.regionSegments)for(const[n,o,i]of e)for(const r of[o,i]){const s=t.get(r)??new Set;s.add(n),t.set(r,s)}return t}getHardBlockedCrossingOwners(t,e,n){if(!this.isKnownSingleLayerRegion(t))return[];const o=this.state.currentRouteNetId;if(o===void 0)throw new Error("SelectiveReripTinyHyperGraphSolver: crossing ownership requires a current route net");const i=new Set;for(const[r,s,a]of this.state.regionSegments[t]??[])this.problem.routeNet[r]!==o&&this.segmentsCrossOnSameLayer(t,e,n,s,a)&&i.add(r);return[...i]}segmentsCrossOnSameLayer(t,e,n,o,i){const r={...this.populateSegmentGeometryScratch(t,e,n)},s={...this.populateSegmentGeometryScratch(t,o,i)};return(r.layerMask&s.layerMask)===0||r.lesserAngle===s.lesserAngle||r.lesserAngle===s.greaterAngle||r.greaterAngle===s.lesserAngle||r.greaterAngle===s.greaterAngle?!1:(r.lesserAngle<s.lesserAngle&&s.lesserAngle<r.greaterAngle)!=(r.lesserAngle<s.greaterAngle&&s.greaterAngle<r.greaterAngle)}rebuildCommittedState(t){this.state.regionSegments=this.state.regionSegments.map(e=>e.filter(([n])=>!t.has(n))),this.state.portAssignment.fill(-1),this.state.regionIntersectionCaches=Array.from({length:this.topology.regionCount},()=>aW());for(let e=0;e<this.state.regionSegments.length;e++)for(const[n,o,i]of this.state.regionSegments[e]){const r=this.problem.routeNet[n];this.state.currentRouteNetId=r;for(const s of[o,i]){const a=this.state.portAssignment[s];if(a!==-1&&a!==r)throw new Error(`SelectiveReripTinyHyperGraphSolver: rebuilding committed routes found cross-net ownership at port ${s} between net ${a} and net ${r}`);this.state.portAssignment[s]=r}this.appendSegmentToRegionCache(e,o,i)}this.state.currentRouteNetId=void 0}incrementFailedOwnerPair(t,e){const n=this.failedOwnerPairCounts.get(t)??new Map,o=(n.get(e)??0)+1;return n.set(e,o),this.failedOwnerPairCounts.set(t,n),o}hasFailedOwnerPath(t,e){const n=[t],o=new Set;for(;n.length>0;){const i=n.pop();if(i===e)return!0;o.has(i)||(o.add(i),n.push(...this.failedOwnerPairCounts.get(i)?.keys()??[]))}return!1}publishSelectiveReripStats(){const t=[];for(const[e,n]of this.failedOwnerPairCounts)for(const[o,i]of n)t.push({failedRouteId:e,ownerRouteId:o,count:i});t.sort((e,n)=>e.failedRouteId-n.failedRouteId||e.ownerRouteId-n.ownerRouteId),this.selectiveReripStats.failedOwnerPairs=t,this.selectiveReripStats.failedOwnerPairCount=t.length,this.selectiveReripStats.maxFailedOwnerPairCount=Math.max(0,...t.map(({count:e})=>e)),this.stats={...this.stats,...this.getSelectiveReripStats()}}describeRoute(t){const e=this.problem.routeMetadata?.[t]?.connectionId;return e===void 0?String(t):`${t} (${String(e)})`}},rBt=class extends $lo{initialAssignmentRouteIds;getRouteIdsPreferredForPreservation(){return this.initialAssignmentRouteIds||(this.initialAssignmentRouteIds=new Set((this.problem.initialAssignments??[]).map(t=>t.routeId))),this.initialAssignmentRouteIds}resetRoutingStateForRerip(){super.resetRoutingStateForRerip(),this.problem.initialAssignments?.length&&m4t({topology:this.topology,problem:this.problem,state:this.state,routeSuccessCountByRouteId:this.routeSuccessCountByRouteId,appendSegmentToRegionCache:(t,e,n)=>this.appendSegmentToRegionCache(t,e,n)})}},Sv=t=>{if(typeof t!="object"||t===null)return!1;const e=t,n=e.preloadedTraceSection;return typeof e.connectionId=="string"&&typeof n?.traceId=="string"&&typeof n.startRoutePosition=="number"&&typeof n.endRoutePosition=="number"&&typeof n.startPoint?.x=="number"&&typeof n.startPoint.y=="number"&&typeof n.startPoint.z=="number"&&typeof n.endPoint?.x=="number"&&typeof n.endPoint.y=="number"&&typeof n.endPoint.z=="number"},qlo=(t,e)=>`__tscircuit_preloaded_trace__:${JSON.stringify([t,e])}`,cSe=t=>[t.region1Id,t.region2Id],sBt=(t,e)=>{const n=new Set(cSe(e));return cSe(t).filter(o=>n.has(o))},Xlo=(t,e,n)=>{const o=t[e],i=t[e+1],r=sBt(o.port,i.port);if(r.length===0)return;if(r.length===1)return r[0];const s=t[e+2];if(s){const a=new Set(sBt(i.port,s.port)),A=r.find(c=>a.has(c));if(A)return A}return n&&r.includes(n)?n:[...r].sort()[0]},aBt=(t,e)=>cSe(t).find(n=>n!==e)??e,ABt=t=>{const e=new Set((t.connections??[]).filter(Sv).map(i=>i.connectionId)),n=t.ports.filter(i=>(i.d?._preloadedTracePortAssignments?.length??0)>0).length,o=t.regions.reduce((i,r)=>i+(r.assignments??[]).filter(s=>e.has(s.connectionId)).length,0);return{preloadedTraceCount:e.size,preloadedPortCount:n,preloadedAssignmentCount:o}},cBt=t=>typeof t=="object"&&t!==null?t:{},lSe=t=>typeof t=="object"&&t!==null?t:{},TAe=1e-6,uSe={DISTANCE_TO_COST:.05,RIP_THRESHOLD_START:.05,RIP_THRESHOLD_END:.8,RIP_CONGESTION_REGION_COST_FACTOR:.1,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!0,GREEDY_FINAL_ROUTE_ITERS:4,PARTIAL_RIP_MIN_ROUTE_COUNT:100,PARTIAL_RIP_MAX_ROUTE_COUNT:350,PARTIAL_RIP_MAX_ATTEMPTS:7,PARTIAL_RIP_WARMUP_FULL_RIP_ATTEMPTS:1,PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT:100,PARTIAL_RIP_TARGET_MAX_COST_IMPROVEMENT_RATIO:.02,PARTIAL_RIP_MAX_REGION_COST_GROWTH_RATIO:.05,PARTIAL_RIP_MAX_TOTAL_COST_GROWTH_RATIO:.1},Zlo={DISTANCE_TO_COST:.05,RIP_THRESHOLD_START:.05,RIP_THRESHOLD_END:.8,RIP_CONGESTION_REGION_COST_FACTOR:.1,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!0,GREEDY_FINAL_ROUTE_ITERS:4,MAX_RIPS_WITHOUT_MAX_REGION_COST_IMPROVEMENT:6,EXTRA_RIPS_AFTER_BEATING_BASELINE_MAX_REGION_COST:Number.POSITIVE_INFINITY},gSe=t=>Math.max(t,.01),dSe=t=>Number.isFinite(t)?{minViaPadDiameter:t}:{},e0o=(t,e)=>{const n=gSe(t);return{...uSe,...dSe(e),USE_SPARSE_CANDIDATE_STORAGE:!1,RIP_THRESHOLD_RAMP_ATTEMPTS:Math.ceil(10*n),MAX_ITERATIONS:Math.ceil(2e6*n)}},t0o=(t,e)=>{const n=gSe(t);return{...Zlo,...dSe(e),USE_SPARSE_CANDIDATE_STORAGE:!1,RIP_THRESHOLD_RAMP_ATTEMPTS:Math.ceil(16*n),MAX_ITERATIONS:Math.ceil(1e6*n)}},lBt=t=>(t.solveGraphOptions?.MAX_ITERATIONS??1e6)+(t.sectionSolverOptions?.MAX_ITERATIONS??1e6)+1e6,n0o=t=>t.mutuallyConnectedNetworkId,hSe=(t,e)=>t.simpleRouteConnection?.pointsToConnect[e],uBt=t=>{const e=hSe(t.routeMetadata,t.endpointIndex);if(!e)return t.fallbackZ;const n=RD(e).map(o=>Kr(o,t.layerCount));return t.regionAvailableZ.find(o=>n.includes(o))??t.fallbackZ},o0o=(t,e)=>{const n=t.d,o=n.bounds;return{capacityMeshNodeId:t.d.capacityMeshNodeId,center:{x:t.d.center.x,y:t.d.center.y},width:t.d.width,height:t.d.height,availableZ:[...t.d.availableZ],...o?{bounds:{minX:o.minX,maxX:o.maxX,minY:o.minY,maxY:o.maxY}}:{},_containsObstacle:t.d._containsObstacle,_containsTarget:t.d._containsTarget,_offBoardConnectionId:t.d._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:t.d._offBoardConnectedCapacityMeshNodeIds===void 0?void 0:[...t.d._offBoardConnectedCapacityMeshNodeIds],_qfpRegionType:n._qfpRegionType,_isNarrowQfpPadGap:n._isNarrowQfpPadGap,...e!==void 0?{netId:e}:{}}},i0o=t=>{const e=t.d;return{portId:t.d.portId,x:t.d.x,y:t.d.y,z:t.d.z,prevPortPointId:e.prevPortPointId,nextPortPointId:e.nextPortPointId,distToCentermostPortOnZ:t.d.distToCentermostPortOnZ,tinyHypergraphPortPenalty:t.d.tinyHypergraphPortPenalty,cramped:t.d.cramped,_preloadedFixedNetIds:t.d._preloadedFixedNetIds,_preloadedTracePortAssignments:t.d._preloadedTracePortAssignments}},r0o=t=>{const e=(function(){const A=new Map;return c=>{const l=c.mutuallyConnectedNetworkId;let u=A.get(l);return u===void 0&&(u=A.size,A.set(l,u)),u}})(),n=(function(A){const c=new Map,l=new Set,u=new Map;for(const h of A.params.connections){const d=h.mutuallyConnectedNetworkId,p=A.getNetIndex({connectionId:h.connectionId,mutuallyConnectedNetworkId:d});for(const m of[h.connectionId,d])u.set(m,p);for(const m of h.simpleRouteConnection.pointsToConnect)for(const _ of A.params.graph.regions){if(!oCt({point:m,region:_,layerCount:A.params.layerCount}))continue;if(m.pcb_port_id===void 0&&_.d._containsTarget!==!0){l.add(_.regionId);continue}let f=c.get(_.regionId);f||(f=new Set,c.set(_.regionId,f)),f.add(p)}}for(const h of A.params.graph.regions)for(const d of h.d._connectedTo??[]){const p=u.get(d);if(p===void 0)continue;let m=c.get(h.regionId);m||(m=new Set,c.set(h.regionId,m)),m.add(p)}const g=new Map;for(const h of l)g.set(h,-1);for(const[h,d]of c)d.size===1&&g.set(h,[...d][0]);return g})({params:t,getNetIndex:e}),o=t.graph.regions.map(A=>({regionId:A.regionId,pointIds:A.ports.map(c=>c.d.portId),d:o0o(A,n.get(A.regionId))})),i=t.graph.ports.map(A=>({portId:A.d.portId,region1Id:A.region1.regionId,region2Id:A.region2.regionId,d:i0o(A)})),r=t.connections.map(A=>({connectionId:A.connectionId,mutuallyConnectedNetworkId:A.mutuallyConnectedNetworkId,startRegionId:A.startRegion.regionId,endRegionId:A.endRegion.regionId,simpleRouteConnection:A.simpleRouteConnection})),s=[];for(const A of t.connections){const c={connectionId:A.connectionId,mutuallyConnectedNetworkId:A.mutuallyConnectedNetworkId,simpleRouteConnection:A.simpleRouteConnection},l=e(c),u=hSe(c,0),g=hSe(c,1),h=A.startRegion.d.availableZ[0]??0,d=A.endRegion.d.availableZ[0]??0,p=uBt({routeMetadata:c,endpointIndex:0,fallbackZ:h,regionAvailableZ:A.startRegion.d.availableZ,layerCount:t.layerCount}),m=uBt({routeMetadata:c,endpointIndex:1,fallbackZ:d,regionAvailableZ:A.endRegion.d.availableZ,layerCount:t.layerCount}),_=`tiny-terminal:start-region:${A.connectionId}`,f=`tiny-terminal:end-region:${A.connectionId}`,I=`tiny-terminal:start-port:${A.connectionId}`,C=`tiny-terminal:end-port:${A.connectionId}`;o.push({regionId:_,pointIds:[I],d:{capacityMeshNodeId:_,center:{x:u?.x??A.startRegion.d.center.x,y:u?.y??A.startRegion.d.center.y},width:TAe,height:TAe,availableZ:[p],_containsTarget:!0,_tinyTerminal:!0,_tinyTerminalNetId:A.mutuallyConnectedNetworkId,netId:l}}),o.push({regionId:f,pointIds:[C],d:{capacityMeshNodeId:f,center:{x:g?.x??A.endRegion.d.center.x,y:g?.y??A.endRegion.d.center.y},width:TAe,height:TAe,availableZ:[m],_containsTarget:!0,_tinyTerminal:!0,_tinyTerminalNetId:A.mutuallyConnectedNetworkId,netId:l}}),i.push({portId:I,region1Id:A.startRegion.regionId,region2Id:_,d:{portId:I,x:u?.x??A.startRegion.d.center.x,y:u?.y??A.startRegion.d.center.y,z:p,distToCentermostPortOnZ:0,_tinyTerminal:!0,...t.preserveTerminalPcbPortIds&&u?.pcb_port_id?{pcb_port_id:u.pcb_port_id}:{}}}),i.push({portId:C,region1Id:A.endRegion.regionId,region2Id:f,d:{portId:C,x:g?.x??A.endRegion.d.center.x,y:g?.y??A.endRegion.d.center.y,z:m,distToCentermostPortOnZ:0,_tinyTerminal:!0,...t.preserveTerminalPcbPortIds&&g?.pcb_port_id?{pcb_port_id:g.pcb_port_id}:{}}});const y=o.find(E=>E.regionId===A.startRegion.regionId),x=o.find(E=>E.regionId===A.endRegion.regionId);y?.pointIds.push(I),x?.pointIds.push(C),s.push({connection:{connectionId:A.connectionId},path:[{portId:I},{portId:C}]})}const a={regions:o,ports:i,connections:r,solvedRoutes:s};return(A=>{const c=new Map,l=new Map,u=new Set((A.connections??[]).flatMap(_=>[_.startRegionId,_.endRegionId])),g=new Set(A.regions.filter(_=>{const f=typeof _.d?.netId=="number"?_.d.netId:typeof _.d?.NetId=="number"?_.d.NetId:void 0;return _.d?._containsObstacle===!0&&(f===void 0||f===-1)&&!u.has(_.regionId)}).map(_=>_.regionId));let h=0;for(const _ of A.ports){const f=_.d,I=f?._preloadedTracePortAssignments??[];if(I.length>0&&h++,!g.has(_.region1Id)&&!g.has(_.region2Id))for(const C of I){const y=l.get(C.traceId);if(y!==void 0&&y!==C.fixedNetId)throw new Error(`Preloaded trace "${C.traceId}" maps to multiple canonical nets`);l.set(C.traceId,C.fixedNetId);const x=c.get(C.traceId)??[];x.push({port:_,assignment:C}),c.set(C.traceId,x)}}const d=new Map(A.regions.map(_=>[_.regionId,_])),p=A.connections??=[],m=A.solvedRoutes??=[];for(const[_,f]of c){f.sort((E,B)=>E.assignment.routePosition-B.assignment.routePosition||E.assignment.z-B.assignment.z||E.port.portId.localeCompare(B.port.portId));const I=f.filter(({port:E},B)=>B===0||E.portId!==f[B-1].port.portId);if(I.length<2)continue;const C=[];let y;for(let E=0;E<I.length-1;E++){const B=I[E],S=I[E+1];if(B.assignment.z===S.assignment.z&&Math.abs(B.assignment.routePosition-S.assignment.routePosition)<=1e-6){y=void 0;continue}const Q=Xlo(I,E,y);Q?(C.push({regionId:Q,from:B,to:S}),y=Q):y=void 0}const x=[];for(const E of C){const B=x.at(-1);B&&B.at(-1).to.port.portId===E.from.port.portId?B.push(E):x.push([E])}for(const[E,B]of x.entries()){const S=qlo(_,E);for(const F of B){const O=d.get(F.regionId);if(!O)throw new Error(`Preloaded trace "${_}" references missing region "${F.regionId}"`);O.assignments=[...O.assignments??[],{regionPort1Id:F.from.port.portId,regionPort2Id:F.to.port.portId,connectionId:S}]}const Q=B[0],w=B.at(-1),M=Q.from.port,k=w.to.port,R={connectionId:S,mutuallyConnectedNetworkId:l.get(_)??_,startRegionId:aBt(M,Q.regionId),endRegionId:aBt(k,w.regionId),preloadedTraceSection:{traceId:_,startRoutePosition:Q.from.assignment.routePosition,endRoutePosition:w.to.assignment.routePosition,startPoint:{x:Q.from.assignment.tracePoint.x,y:Q.from.assignment.tracePoint.y,z:Q.from.assignment.z},endPoint:{x:w.to.assignment.tracePoint.x,y:w.to.assignment.tracePoint.y,z:w.to.assignment.z}}};p.push(R),m.push({requiredRip:!1,connection:R,path:[M,k].map(F=>({portId:F.portId,g:0,h:0,f:0,hops:0,ripRequired:!1}))})}}})(a),a},gBt=t=>{const e=new Map;for(let n=0;n<t.problem.routeNet.length;n++){const o=t.problem.routeMetadata?.[n],i=o?.mutuallyConnectedNetworkId;if(typeof i!="string"||i.length===0)throw new Error(`Tiny hypergraph route ${n} is missing a net ID`);e.set(i,t.problem.routeNet[n])}for(let n=0;n<t.problem.regionNetId.length;n++){const o=t.topology.regionMetadata?.[n]?._tinyTerminalNetId;if(typeof o!="string")continue;const i=e.get(o);i!==void 0&&(t.problem.regionNetId[n]=i)}},dBt=t=>{const e=new Map;t.topology.regionMetadata?.forEach((o,i)=>{typeof o.serializedRegionId=="string"&&e.set(o.serializedRegionId,i)});const n=new Set;for(const o of t.problem.routeMetadata??[])Sv(o)||(typeof o.startRegionId=="string"&&n.add(o.startRegionId),typeof o.endRegionId=="string"&&n.add(o.endRegionId));for(const o of t.problem.routeMetadata??[])if(Sv(o))for(const i of[o.startRegionId,o.endRegionId]){if(typeof i!="string"||n.has(i))continue;const r=e.get(i);if(r===void 0)continue;const s=t.topology.regionMetadata?.[r];typeof s?.netId=="number"||typeof s?.NetId=="number"||(t.problem.regionNetId[r]=-1)}},hBt=t=>{if(t.problem.metadataPortPenaltiesApplied)return 0;let e=0,n=t.problem.portPenalty!==void 0;for(let i=0;i<t.topology.portCount;i++){const r=Number(t.topology.portMetadata?.[i]?.tinyHypergraphPortPenalty),s=Number.isFinite(r)&&r>0?r:0;s>0&&e++,t.problem.portPenalty?.[i]!==s&&(n=!1)}if(n)return t.problem.metadataPortPenaltiesApplied=!0,e;e=0;const o=t.problem.portPenalty?new Float64Array(t.problem.portPenalty):new Float64Array(t.topology.portCount);for(let i=0;i<t.topology.portCount;i++){const r=Number(t.topology.portMetadata?.[i]?.tinyHypergraphPortPenalty);!Number.isFinite(r)||r<=0||(o[i]+=r,e++)}return e>0&&(t.problem.portPenalty=o),t.problem.metadataPortPenaltiesApplied=!0,e},pBt=class extends jlo{configuredSolvers=new WeakSet;duplicatePortPenaltyCount=0;metadataPortPenaltyCount=0;crampedPortPenaltyCount=0;preloadedPortCount=0;preloadedFixedSegmentCount=0;crampedPortTraversalPenalty;useSelectiveReripRouting;constructor(t,e){super(t),this.useSelectiveReripRouting=e,this.crampedPortTraversalPenalty=150;const n=ABt(t.serializedHyperGraph);if(this.preloadedPortCount=n.preloadedPortCount,this.preloadedFixedSegmentCount=n.preloadedAssignmentCount,e){const o=this.pipelineDef.find(i=>i.solverName==="solveGraph");if(!o)throw new Error("Tiny hypergraph pipeline is missing the solveGraph stage");o.solverClass=rBt}this.MAX_ITERATIONS=lBt(t)}loadHyperGraph(t){const e=super.loadHyperGraph(t);((r,s)=>{const a=new Map;for(const A of s.connections??[])Sv(A)&&a.set(A.connectionId,A.preloadedTraceSection);for(const A of r.problem.routeMetadata??[]){const c=a.get(A.connectionId);c&&(A.preloadedTraceSection=c)}})(e,this.inputProblem.serializedHyperGraph);const n=hBt(e),{duplicatePortPenaltyCount:o,crampedPortPenaltyCount:i}=((r,s)=>{let a=0,A=0;const c=r.problem.portPenalty?new Float64Array(r.problem.portPenalty):new Float64Array(r.topology.portCount);for(let l=0;l<r.topology.portCount;l++){const u=r.topology.portMetadata?.[l];typeof u?.duplicatedFromPortId=="string"&&(c[l]+=150,a++),u?.cramped&&s>0&&(c[l]+=s,A++)}return(a>0||A>0)&&(r.problem.portPenalty=c),{duplicatePortPenaltyCount:a,crampedPortPenaltyCount:A}})(e,this.crampedPortTraversalPenalty);return gBt(e),dBt(e),this.metadataPortPenaltyCount=Math.max(this.metadataPortPenaltyCount,n),this.duplicatePortPenaltyCount=Math.max(this.duplicatePortPenaltyCount,o),this.crampedPortPenaltyCount=Math.max(this.crampedPortPenaltyCount,i),e}_step(){super._step(),this.configureSolver(this.activeSubSolver)}getInitialVisualizationSolver(){if(this.useSelectiveReripRouting&&!this.initialVisualizationSolver){const{topology:e,problem:n}=this.loadHyperGraph(this.inputProblem.serializedHyperGraph);this.initialVisualizationSolver=new rBt(e,n,this.getSolveGraphOptions())}const t=super.getInitialVisualizationSolver();return this.configureSolver(t),t}getSolvedTinySolver(){const t=this.getSolver("optimizeSection");if(t?.solved&&!t.failed)return t.getSolvedSolver();const e=this.getSolver("solveGraph");if(e?.solved&&!e.failed)return e;throw new Error("TinyHyperGraph section pipeline does not have a solved graph")}configureSolver(t){if(t&&!this.configuredSolvers.has(t)){if(t instanceof lW||t instanceof Bv){const e=t;hBt(e),gBt(e),dBt(e)}this.configuredSolvers.add(t)}}},kAe=class extends yr{constructor(t){super(),this.params=t;const e=(l=>l.map(u=>{const g=u.simpleRouteConnection;if(!g)throw new Error(`TinyHypergraphPortPointPathingSolver requires a SimpleRouteConnection for "${u.connectionId}"`);const h=u.mutuallyConnectedNetworkId;if(!h)throw new Error(`TinyHypergraphPortPointPathingSolver requires a net ID for "${u.connectionId}"`);return{...u,mutuallyConnectedNetworkId:h,simpleRouteConnection:g}}))(t.connections),n=t.flags.USE_SELECTIVE_RERIP_ROUTING?(function(l,u){const g=new Map;for(const h of l){const d=u(h);g.set(d,(g.get(d)??0)+1)}return l.map((h,d)=>({connection:h,index:d})).sort((h,d)=>(g.get(u(d.connection))??0)-(g.get(u(h.connection))??0)||h.index-d.index).map(({connection:h})=>h)})(e,n0o):e;this.rootConnectionNameByConnectionId=new Map(n.map(l=>[l.connectionId,l.simpleRouteConnection.__rootConnectionNames?.[0]]));const o=r0o({...t,connections:n});this.originalPreloadedSegmentKeysByConnectionId=(l=>{const u=new Map;for(const g of l.connections??[])Sv(g)&&u.set(g.connectionId,new Set);for(const g of l.regions)for(const h of g.assignments??[]){const d=u.get(h.connectionId);if(!d)continue;const[p,m]=[h.regionPort1Id,h.regionPort2Id].sort();d.add(JSON.stringify([g.regionId,p,m]))}return u})(o);const i=ABt(o),r=i.preloadedPortCount>0,s=r&&t.flags.USE_PARTIAL_RIP_ROUTING_WITH_PRELOADED_TRACES===!0,a=s?Math.max(o.connections?.length??0,i.preloadedAssignmentCount):void 0;let A=o;if(n.length<=180){const l=new Plo(o,{duplicatePortProximity:.05,useSerializedPortPenalties:!1,routeSolveOptions:{...dSe(t.minViaPadDiameter),USE_SPARSE_CANDIDATE_STORAGE:!1,ACCEPT_BEST_SOLUTION_ON_TIMEOUT:!0,GREEDY_FINAL_ROUTE_ITERS:4,MAX_ITERATIONS:Math.ceil(2e6*gSe(t.effort)),RIP_THRESHOLD_RAMP_ATTEMPTS:0,STATIC_REACHABILITY_PRECHECK:!0}});if(l.solve(),l.failed)this.duplicateCongestedPortError=l.error??"unknown error";else{this.duplicateCongestedPortReport=l.report,A=l.getOutput();for(const u of A.ports){const g=lSe(u.d);typeof g.duplicatedFromPortId=="string"&&(delete g._preloadedFixedNetIds,delete g._preloadedTracePortAssignments)}}}else this.duplicateCongestedPortError=`Skipped for ${n.length} connections`;this.duplicatedPortCount=this.duplicateCongestedPortReport?.duplicatedPorts.reduce((l,u)=>l+u.duplicatePortIds.length,0)??0;const c=((l,u,g,h=!0,d)=>{const p=l.connections?.length??0,m=d??p,_=uSe.PARTIAL_RIP_MIN_ROUTE_COUNT,f=uSe.PARTIAL_RIP_MAX_ROUTE_COUNT,I=h&&m>=_&&m<=f;return{serializedHyperGraph:l,createSectionMask:({topology:C})=>new Int8Array(C.portCount),solveGraphOptions:{...e0o(u,g),...I?{PARTIAL_RIP_MIN_ROUTE_COUNT:0,PARTIAL_RIP_MAX_ROUTE_COUNT:Number.POSITIVE_INFINITY,PARTIAL_RIP_COMPLEXITY_SELECTION_MIN_ROUTE_COUNT:0}:{PARTIAL_RIP_ENABLED:!1,OUTSIDE_IN_ROUTING:!1}},sectionSolverOptions:t0o(u,g)}})({...A,solvedRoutes:o.solvedRoutes},t.effort,t.minViaPadDiameter,!r||s,a);this.tinyPipelineSolver=new pBt(c,t.flags.USE_SELECTIVE_RERIP_ROUTING===!0),this.primaryTinyPipelineSolver=this.tinyPipelineSolver,n.length>=30&&n.length<=99&&(this.alternativeTinyPipelineInput={...c,solveGraphOptions:{...c.solveGraphOptions,TRACE_DENSITY_COST_FACTOR:1}}),this.MAX_ITERATIONS=lBt(c)*(this.alternativeTinyPipelineInput?2:1),this.originalRegionById=new Map(t.graph.regions.map(l=>[l.regionId,l])),this.originalRegionIds=new Set(this.originalRegionById.keys()),this.inputNodeWithPortPoints=((l,u)=>{const g=new Map(u.regions.map(d=>[d.regionId,d])),h=new Map(u.ports.map(d=>[d.portId,d]));return l.graph.regions.map(d=>{const p=g.get(d.regionId),m=(p?.pointIds??d.ports.map(_=>_.d.portId)).map(_=>h.get(_)).filter(_=>_&&!lSe(_.d)._tinyTerminal).map(_=>{const f=_,I=lSe(f.d),C=g.get(f.region1Id),y=g.get(f.region2Id),x=!!(cBt(C?.d)._offBoardConnectionId??cBt(y?.d)._offBoardConnectionId);return{portPointId:f.portId,x:Number(I.x??0),y:Number(I.y??0),z:Number(I.z??0),prevPortPointId:typeof I.prevPortPointId=="string"?I.prevPortPointId:void 0,nextPortPointId:typeof I.nextPortPointId=="string"?I.nextPortPointId:void 0,connectionNodeIds:[f.region1Id,f.region2Id],distToCentermostPortOnZ:Number(I.distToCentermostPortOnZ??0),cramped:!!I.cramped,connectsToOffBoardNode:x}});return{capacityMeshNodeId:d.d.capacityMeshNodeId,center:d.d.center,width:d.d.width,height:d.d.height,portPoints:m,availableZ:d.d.availableZ,_containsObstacle:d.d._containsObstacle,_containsTarget:d.d._containsTarget,_offBoardConnectionId:d.d._offBoardConnectionId,_offBoardConnectedCapacityMeshNodeIds:d.d._offBoardConnectedCapacityMeshNodeIds,_qfpRegionType:d.d._qfpRegionType,_isNarrowQfpPadGap:d.d._isNarrowQfpPadGap}})})(t,A)}params;tinyPipelineSolver;primaryTinyPipelineSolver;alternativeTinyPipelineSolver;alternativeTinyPipelineInput;candidatePortfolioPhase="primary";primaryCandidateSummary;alternativeCandidateSummary;alternativeCandidateEvaluated=!1;selectedCandidate="primary";duplicateCongestedPortReport;duplicateCongestedPortError;duplicatedPortCount=0;inputNodeWithPortPoints;originalRegionById;originalRegionIds;rootConnectionNameByConnectionId;originalPreloadedSegmentKeysByConnectionId;getSolverName(){return"TinyHypergraphPortPointPathingSolver"}getChangedPreloadedRouteIds(t){const e=new Map,n=new Map;for(let i=0;i<t.problem.routeCount;i++){const r=this.getRouteMetadata(t,i);Sv(r)&&(e.set(r.connectionId,i),n.set(i,new Set))}for(let i=0;i<t.state.regionSegments.length;i++){const r=t.topology.regionMetadata?.[i]?.serializedRegionId;for(const[s,a,A]of t.state.regionSegments[i]??[]){const c=n.get(s);if(!c)continue;const l=t.topology.portMetadata?.[a]?.serializedPortId,u=t.topology.portMetadata?.[A]?.serializedPortId;if(typeof r!="string"||typeof l!="string"||typeof u!="string")throw new Error(`Tiny hypergraph preloaded route ${s} has a segment without serialized topology IDs`);const[g,h]=[l,u].sort();c.add(JSON.stringify([r,g,h]))}}const o=new Set;for(const[i,r]of this.originalPreloadedSegmentKeysByConnectionId){const s=e.get(i);if(s===void 0)throw new Error(`Tiny hypergraph lost preloaded trace section "${i}"`);const a=n.get(s);if(r.size>0&&a.size===0)throw new Error(`Tiny hypergraph lost preloaded trace section "${i}"`);(r.size!==a.size||[...r].some(A=>!a.has(A)))&&o.add(s)}return o}summarizePipelineCandidate(t){const e=t.getSolvedTinySolver();let n=0,o=0,i=0,r=0,s=0,a=0;const A=e.topology.regionMetadata??[];for(let c=0;c<e.state.regionSegments.length;c++){const l=e.state.regionSegments[c];s+=l.length;for(const[,_,f]of l)e.topology.portZ[_]!==e.topology.portZ[f]&&(a+=1);const u=A[c]?.capacityMeshNodeId;if(!u||!this.originalRegionIds.has(u))continue;const g=this.originalRegionById.get(u);if(!g||l.length===0)continue;const h=l.map(([_,f,I])=>[this.createAssignedPortPoint(e,_,f),this.createAssignedPortPoint(e,_,I)]),d={capacityMeshNodeId:g.d.capacityMeshNodeId,center:g.d.center,width:g.d.width,height:g.d.height,portPoints:h.flat(),availableZ:g.d.availableZ},p=Wm(d),m=wy(g.d,p.numSameLayerCrossings,p.numEntryExitLayerChanges,p.numTransitionPairCrossings);n+=m,o+=m*m,i=Math.max(i,m),r+=d.portPoints.length**2}return{nodePfSum:n,nodePfSquaredSum:o,nodePfMax:i,squaredNodePortPointCount:r,segmentCount:s,layerChangeCount:a,changedPreloadedTraceSectionCount:this.getChangedPreloadedRouteIds(e).size}}shouldEvaluateAlternative(t){const e=this.primaryTinyPipelineSolver.getSolvedTinySolver().problem.routeCount;return this.alternativeTinyPipelineInput!==void 0&&((n,o)=>n.nodePfSum>4&&n.nodePfMax>1&&n.squaredNodePortPointCount/Math.max(1,o)>=125)(t,e)}shouldSelectAlternative(t,e){return((n,o,i)=>{if(o.changedPreloadedTraceSectionCount>n.changedPreloadedTraceSectionCount)return!1;const r=i>40?.92:.95,s=o.nodePfSum<=.9*n.nodePfSum&&o.nodePfSquaredSum<=.85*n.nodePfSquaredSum&&o.nodePfMax<=.85*n.nodePfMax&&o.squaredNodePortPointCount<.98*n.squaredNodePortPointCount&&o.segmentCount<=.97*n.segmentCount;return o.nodePfSum<=1.03*n.nodePfSum&&o.nodePfSquaredSum<=1.06*n.nodePfSquaredSum&&(o.squaredNodePortPointCount<n.squaredNodePortPointCount*r||s)})(t,e,this.primaryTinyPipelineSolver.getSolvedTinySolver().problem.routeCount)}finishCandidatePortfolio(){this.candidatePortfolioPhase="complete",this.solved=this.tinyPipelineSolver.solved,this.failed=this.tinyPipelineSolver.failed,this.error=this.tinyPipelineSolver.error??null}getSolveGraphBenchmarkMetrics(){const t=this.tinyPipelineSolver.getSolver("solveGraph");if(!t)return;const e=t.state.regionSegments.map(r=>r.length),n=this.selectedCandidate==="alternative"?this.alternativeCandidateSummary:this.primaryCandidateSummary,o=t.stats,i=this.tinyPipelineSolver.getStageStats().solveGraph;return{routeCount:t.problem.routeCount,traceDensityCandidateEvaluated:this.alternativeCandidateEvaluated,traceDensityCandidateSelected:this.selectedCandidate==="alternative",downstreamNodePfSum:n?.nodePfSum,downstreamNodePfSquaredSum:n?.nodePfSquaredSum,downstreamNodePfMax:n?.nodePfMax,downstreamSquaredNodePortPointCount:n?.squaredNodePortPointCount,changedPreloadedTraceSectionCount:n?.changedPreloadedTraceSectionCount,iterations:t.iterations,timeMs:i?.timeSpent,ripCount:o.ripCount,partialRipCount:o.partialRipCount,partiallyRippedRouteCount:o.partiallyRippedRouteCount,partiallyRippedSegmentCount:o.partiallyRippedSegmentCount,retainedPartialRipSegmentCount:o.retainedPartialRipSegmentCount,firstMaxRegionCost:o.firstMaxRegionCost,bestMaxRegionCost:o.bestMaxRegionCost,firstTotalRegionCost:o.firstTotalRegionCost,bestTotalRegionCost:o.bestTotalRegionCost,firstSegmentCount:o.firstSegmentCount,bestSolvedSegmentCount:o.bestSolvedSegmentCount,bestSolvedMaxRegionSegmentCount:o.bestSolvedMaxRegionSegmentCount,bestSolvedSquaredRegionSegmentCount:o.bestSolvedSquaredRegionSegmentCount,finalMaxRegionSegmentCount:Math.max(0,...e),finalSquaredRegionSegmentCount:e.reduce((r,s)=>r+s*s,0),finalSegmentCount:n?.segmentCount,finalLayerChangeCount:n?.layerChangeCount,warmupFullRipAttempts:o.partialRipWarmupFullRipAttempts,complexityAwareSelection:o.partialRipComplexityAwareSelection,targetReached:o.partialRipTargetReached,outsideInCompletedRouteCount:o.outsideInCompletedRouteCount,outsideInFallbackRouteCount:o.outsideInFallbackRouteCount,outsideInForwardExpansionCount:o.outsideInForwardExpansionCount,outsideInReverseExpansionCount:o.outsideInReverseExpansionCount}}_step(){this.tinyPipelineSolver.step(),this.candidatePortfolioPhase==="primary"&&this.primaryTinyPipelineSolver.failed?(this.alternativeTinyPipelineInput=void 0,this.finishCandidatePortfolio()):this.candidatePortfolioPhase==="primary"&&this.primaryTinyPipelineSolver.solved?(this.primaryCandidateSummary=this.summarizePipelineCandidate(this.primaryTinyPipelineSolver),this.shouldEvaluateAlternative(this.primaryCandidateSummary)?(this.alternativeCandidateEvaluated=!0,this.alternativeTinyPipelineSolver=new pBt(this.alternativeTinyPipelineInput,this.params.flags.USE_SELECTIVE_RERIP_ROUTING===!0),this.tinyPipelineSolver=this.alternativeTinyPipelineSolver,this.candidatePortfolioPhase="alternative"):(this.alternativeTinyPipelineInput=void 0,this.finishCandidatePortfolio())):this.candidatePortfolioPhase==="alternative"&&(this.tinyPipelineSolver.solved||this.tinyPipelineSolver.failed)&&(this.tinyPipelineSolver.solved&&!this.tinyPipelineSolver.failed&&(this.alternativeCandidateSummary=this.summarizePipelineCandidate(this.tinyPipelineSolver)),this.alternativeCandidateSummary&&this.primaryCandidateSummary&&this.shouldSelectAlternative(this.primaryCandidateSummary,this.alternativeCandidateSummary)?(this.selectedCandidate="alternative",this.primaryTinyPipelineSolver=void 0,this.alternativeTinyPipelineSolver=void 0):(this.tinyPipelineSolver=this.primaryTinyPipelineSolver,this.alternativeTinyPipelineSolver=void 0),this.alternativeTinyPipelineInput=void 0,this.finishCandidatePortfolio());const t=this.tinyPipelineSolver.getSolver("optimizeSection"),e=this.getCurrentTinySolver();this.solved=this.candidatePortfolioPhase==="complete"&&this.tinyPipelineSolver.solved,this.failed=this.candidatePortfolioPhase==="complete"&&this.tinyPipelineSolver.failed,this.error=this.failed?this.tinyPipelineSolver.error??null:null,this.progress=this.candidatePortfolioPhase==="complete"?1:this.candidatePortfolioPhase==="alternative"?.5+.5*this.tinyPipelineSolver.progress:this.alternativeTinyPipelineInput?.5*this.tinyPipelineSolver.progress:this.tinyPipelineSolver.progress,this.stats={duplicateCongestedPortSourceCount:this.duplicateCongestedPortReport?.duplicatedPorts.length??0,duplicateCongestedPortCount:this.duplicateCongestedPortReport?.duplicatedPorts.reduce((n,o)=>n+o.duplicatePortIds.length,0)??0,duplicateCongestedPortFallbackToOriginal:!!this.duplicateCongestedPortError,duplicateCongestedPortPenalty:this.duplicatedPortCount>0?150:0,duplicateCongestedPortPenaltyCount:this.tinyPipelineSolver.duplicatePortPenaltyCount,metadataPortPenaltyCount:this.tinyPipelineSolver.metadataPortPenaltyCount,crampedPortPenalty:this.tinyPipelineSolver.crampedPortTraversalPenalty,crampedPortPenaltyCount:this.tinyPipelineSolver.crampedPortPenaltyCount,preloadedPortCount:this.tinyPipelineSolver.preloadedPortCount,preloadedFixedSegmentCount:this.tinyPipelineSolver.preloadedFixedSegmentCount,duplicateCongestedPortError:this.duplicateCongestedPortError,candidatePortfolioPhase:this.candidatePortfolioPhase,candidatePortfolioSelectedCandidate:this.selectedCandidate,candidatePortfolioPrimarySummary:this.primaryCandidateSummary,candidatePortfolioAlternativeSummary:this.alternativeCandidateSummary,...this.tinyPipelineSolver.stats??{},...e?.stats??{},...t?.stats??{},currentStage:this.tinyPipelineSolver.getCurrentStageName(),stageStats:this.tinyPipelineSolver.getStageStats()},this.activeSubSolver=this.tinyPipelineSolver.activeSubSolver??null}preview(){return this.visualize()}getCurrentTinySolver(){const t=this.tinyPipelineSolver.getSolver("optimizeSection");return t?.solved&&!t.failed?t.getSolvedSolver():this.tinyPipelineSolver.getSolver("solveGraph")||void 0}getSolvedTinySolver(){return this.tinyPipelineSolver.getSolvedTinySolver()}getRouteMetadata(t,e){return t.problem.routeMetadata?.[e]}createAssignedPortPoint(t,e,n){const o=this.getRouteMetadata(t,e),i=o?(a=>a.simpleRouteConnection?.name??a.connectionId)(o):`route-${e}`,r=o?this.rootConnectionNameByConnectionId.get(o.connectionId)??o.mutuallyConnectedNetworkId:void 0,s=t.topology.portMetadata?.[n];return{portPointId:String(s?.serializedPortId??s?.portId??`tiny-port-${n}`),x:t.topology.portX[n],y:t.topology.portY[n],z:t.topology.portZ[n],connectionName:i,rootConnectionName:r,...this.params.preserveTerminalPcbPortIds&&typeof s?.pcb_port_id=="string"?{pcb_port_id:s.pcb_port_id}:{},prevPortPointId:typeof s?.prevPortPointId=="string"?s.prevPortPointId:void 0,nextPortPointId:typeof s?.nextPortPointId=="string"?s.nextPortPointId:void 0}}getOutput(){const t=this.getSolvedTinySolver(),e=[],n=t.state.regionSegments,o=t.topology.regionMetadata??[],i=this.getChangedPreloadedRouteIds(t);for(let s=0;s<n.length;s++){const a=o[s]?.capacityMeshNodeId;if(!a||!this.originalRegionIds.has(a))continue;const A=this.originalRegionById.get(a);if(!A)continue;const c=n[s].filter(([u])=>{const g=this.getRouteMetadata(t,u);return!Sv(g)||i.has(u)}).map(([u,g,h])=>{const d=this.createAssignedPortPoint(t,u,g),p=this.createAssignedPortPoint(t,u,h);return d.portPointId&&p.portPointId&&(d.nextPortPointId=p.portPointId,p.prevPortPointId=d.portPointId),[d,p]}),l=c.flat();l.length!==0&&e.push({capacityMeshNodeId:A.d.capacityMeshNodeId,center:A.d.center,width:A.d.width,height:A.d.height,portPoints:l,portPointsInPairs:c,availableZ:A.d.availableZ})}const r=[...i].map(s=>{const a=this.getRouteMetadata(t,s);if(!Sv(a))throw new Error(`Changed preloaded hypergraph route ${s} is missing section metadata`);const A=a.preloadedTraceSection;return{connectionName:a.connectionId,traceId:A.traceId,startRoutePosition:A.startRoutePosition,endRoutePosition:A.endRoutePosition,connection:{name:a.connectionId,__rootConnectionNames:[a.mutuallyConnectedNetworkId],pointsToConnect:[{x:A.startPoint.x,y:A.startPoint.y,layer:Kh(A.startPoint.z,this.params.layerCount)},{x:A.endPoint.x,y:A.endPoint.y,layer:Kh(A.endPoint.z,this.params.layerCount)}]}}});return this.stats.changedPreloadedTraceSectionCount=r.length,{nodesWithPortPoints:e,inputNodeWithPortPoints:this.inputNodeWithPortPoints,changedPreloadedTraceSections:r}}computeNodePf(t){const e=this.getOutput().nodesWithPortPoints.find(i=>i.capacityMeshNodeId===t.capacityMeshNodeId),n=this.originalRegionById.get(t.capacityMeshNodeId);if(!e||!n)return null;const o=Wm(e);return wy(n.d,o.numSameLayerCrossings,o.numEntryExitLayerChanges,o.numTransitionPairCrossings)}tryFinalAcceptance(){}getConstructorParams(){return[this.params]}visualize(){return this.tinyPipelineSolver.visualize()}},uW=(t,e)=>{if(!t||t==="none")return t;try{const n=wD(t);return`rgba(${n.red},${n.green},${n.blue},${e})`}catch{return Es(t,1-e)}},ab=({srj:t,opacity:e=.25,visualizationOptions:n={}})=>{const o=mx({...t,obstacles:[]},n);return{...o,points:[],lines:o.lines?.map(i=>({...i,strokeColor:uW(i.strokeColor,e)})),rects:o.rects?.map(i=>({...i,fill:uW(i.fill,e),stroke:uW(i.stroke,e)})),circles:o.circles?.map(i=>({...i,fill:uW(i.fill,e),stroke:uW(i.stroke,e)}))}};function pSe(t,e){return t.x>=e.center.x-e.width/2&&t.x<=e.center.x+e.width/2&&t.y>=e.center.y-e.height/2&&t.y<=e.center.y+e.height/2}var mSe="escape-via:",q3=1e-4,s0o=t=>t.obstacleId??[t.layers.join("."),t.center.x.toFixed(4),t.center.y.toFixed(4),t.width.toFixed(4),t.height.toFixed(4)].join(":"),mBt=(t,e,n=1e-4)=>no(t,e)<=n,FAe=class extends yr{constructor(e,n={}){super(),this.ogSrj=e,this.viaDiameter=n.viaDiameter??om(e).padDiameter,this.viaRadius=this.viaDiameter/2,this.minTraceWidth=n.minTraceWidth??e.minTraceWidth,this.obstacleMargin=n.obstacleMargin??e.defaultObstacleMargin??.15,this.requiredViaToPadClearance=Math.max(this.obstacleMargin,e.minViaEdgeToPadEdgeClearance??0),this.escapeOffset=this.viaRadius+Math.max(this.minTraceWidth/2,this.requiredViaToPadClearance),this.requiredTraceClearance=this.minTraceWidth/2+this.obstacleMargin/2,this.requiredViaToViaClearance=this.viaDiameter+this.obstacleMargin,this.outputSrj=e,this.escapeViaMetadataByPointId=new Map,this.createdEscapeVias=[]}ogSrj;getSolverName(){return"EscapeViaLocationSolver"}viaDiameter;viaRadius;minTraceWidth;obstacleMargin;escapeOffset;requiredTraceClearance;requiredViaToPadClearance;requiredViaToViaClearance;outputSrj;escapeViaMetadataByPointId;createdEscapeVias;nextEscapeViaIndex=0;getConnectionNetIds(e){return new Set([e.name,...e.__rootConnectionNames??[],e.__netConnectionName].filter(n=>!!n))}obstacleMatchesConnectionNet(e,n){return e.connectedTo.some(o=>n.has(o))}getObstacleZs(e){return e.__zLayers&&e.__zLayers.length>0?e.__zLayers:e.layers.map(n=>Kr(n,this.ogSrj.layerCount))}getViaSpanLayers(e,n){const o=Kr(e,this.ogSrj.layerCount),i=Kr(n,this.ogSrj.layerCount),r=Math.min(o,i),s=Math.max(o,i),a=Array.from({length:s-r+1},(A,c)=>r+c);return{__zLayers:a,layers:a.map(A=>Kh(A,this.ogSrj.layerCount))}}createEscapeViaObstacle(e){const{escapeVia:n,connectionNetIds:o}=e,{layers:i,__zLayers:r}=this.getViaSpanLayers(n.sourceLayer,n.targetLayer);return{obstacleId:`escape-via-obstacle:${n.pointId}`,type:"rect",layers:i,__zLayers:r,center:{x:n.x,y:n.y},width:this.viaDiameter,height:this.viaDiameter,connectedTo:Array.from(o)}}selectSourceObstacle(e){const{point:n,sourceLayer:o,connectionNetIds:i}=e;return this.ogSrj.obstacles.filter(r=>!r.isCopperPour&&r.layers.includes(o)&&pSe(n,r)).sort((r,s)=>{const a=r.connectedTo.includes(n.pointId??"")||r.connectedTo.includes(n.pcb_port_id??"")||this.obstacleMatchesConnectionNet(r,i);return a!==(s.connectedTo.includes(n.pointId??"")||s.connectedTo.includes(n.pcb_port_id??"")||this.obstacleMatchesConnectionNet(s,i))?a?-1:1:r.width*r.height-s.width*s.height})[0]}getCandidatePositions(e,n){if(!n)return this.dedupeCandidatePositions([{x:e.x+this.escapeOffset,y:e.y},{x:e.x-this.escapeOffset,y:e.y},{x:e.x,y:e.y+this.escapeOffset},{x:e.x,y:e.y-this.escapeOffset},{x:e.x+this.escapeOffset,y:e.y+this.escapeOffset},{x:e.x+this.escapeOffset,y:e.y-this.escapeOffset},{x:e.x-this.escapeOffset,y:e.y+this.escapeOffset},{x:e.x-this.escapeOffset,y:e.y-this.escapeOffset}]);const o=n.center.x-n.width/2,i=n.center.x+n.width/2,r=n.center.y-n.height/2,s=n.center.y+n.height/2,a=o-this.escapeOffset,A=i+this.escapeOffset,c=r-this.escapeOffset,l=s+this.escapeOffset,u=this.getEdgeSamples(r,s,e.y),g=this.getEdgeSamples(o,i,e.x),h=[];for(const d of u)h.push({x:a,y:d},{x:A,y:d});for(const d of g)h.push({x:d,y:c},{x:d,y:l});return this.dedupeCandidatePositions(h)}dedupeCandidatePositions(e){const n=[];for(const o of e)n.some(i=>mBt(i,o))||n.push(o);return n}pushEdgeSample(e,n,o,i){const r=Math.max(o,Math.min(i,n));e.some(s=>Math.abs(s-r)<=q3)||e.push(r)}getEdgeSamples(e,n,o){const i=[],r=n-e;if(this.pushEdgeSample(i,o,e,n),r<=q3)return i;this.pushEdgeSample(i,e,e,n),this.pushEdgeSample(i,n,e,n),this.pushEdgeSample(i,(e+n)/2,e,n);const s=Math.max(e,Math.min(n,o)),a=Math.max(this.requiredViaToViaClearance,q3),A=Math.ceil(r/a);for(let c=1;c<=A;c++){const l=c*a;this.pushEdgeSample(i,s+l,e,n),this.pushEdgeSample(i,s-l,e,n)}return i}isInsideBoard(e){return e.x>=this.ogSrj.bounds.minX+this.viaRadius&&e.x<=this.ogSrj.bounds.maxX-this.viaRadius&&e.y>=this.ogSrj.bounds.minY+this.viaRadius&&e.y<=this.ogSrj.bounds.maxY-this.viaRadius&&(!(this.ogSrj.outline&&this.ogSrj.outline.length>=3)||X7e(e,this.ogSrj.outline))}hasClearEscapePath(e){const{sourcePoint:n,candidate:o,sourceLayer:i,sourceObstacle:r}=e;if(this.ogSrj.outline&&this.ogSrj.outline.length>=3&&$z({start:n,end:o,polygon:this.ogSrj.outline,margin:this.requiredTraceClearance}))return!1;for(const s of this.ogSrj.obstacles){if(s===r||!s.layers.includes(i))continue;if(pSe(o,s))return!1;const a=c6e(s);if(Math.min(...a.map(A=>qQ(n,o,A.start,A.end)))+q3<this.requiredTraceClearance)return!1}return!0}getBoardBoundarySegments(){if(this.ogSrj.outline&&this.ogSrj.outline.length>=3)return this.ogSrj.outline.map((r,s)=>({start:r,end:this.ogSrj.outline[(s+1)%this.ogSrj.outline.length]}));const{minX:e,maxX:n,minY:o,maxY:i}=this.ogSrj.bounds;return[{start:{x:e,y:o},end:{x:n,y:o}},{start:{x:n,y:o},end:{x:n,y:i}},{start:{x:n,y:i},end:{x:e,y:i}},{start:{x:e,y:i},end:{x:e,y:o}}]}getRayProbeDistance(){const{minX:e,maxX:n,minY:o,maxY:i}=this.ogSrj.bounds;return 2*Math.hypot(n-e,i-o)+this.viaDiameter}getRayIntersectionDistance(e){const{rayStart:n,rayEnd:o,segmentStart:i,segmentEnd:r}=e;if(!Uh(n,o,i,r))return null;const s=DD(n,o,i,r);if(!s)return null;const a=no(n,s);return a<=q3?null:a}getProjectedFreeSpace(e){const{sourcePoint:n,candidate:o}=e,i=o.x-n.x,r=o.y-n.y;return Math.abs(i)<=q3||Math.abs(r)<=q3?this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:i,y:r},travelDistance:no(n,o)}):Math.min(this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:0,y:Math.sign(r)},travelDistance:Math.abs(r)}),this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:Math.sign(i),y:Math.sign(r)},travelDistance:no(n,o)}),this.getProjectedFreeSpaceAlongDirection({...e,direction:{x:Math.sign(i),y:0},travelDistance:Math.abs(i)}))}getProjectedFreeSpaceAlongDirection(e){const{sourcePoint:n,sourceLayer:o,sourceObstacle:i,direction:r,travelDistance:s}=e,a=Math.hypot(r.x,r.y);if(a<=q3||s<=q3)return 0;const A=this.getRayProbeDistance(),c=r.x/a,l=r.y/a,u={x:n.x+c*A,y:n.y+l*A};let g=Number.POSITIVE_INFINITY;for(const h of this.ogSrj.obstacles)if(h!==i&&h.layers.includes(o))for(const d of c6e(h)){const p=this.getRayIntersectionDistance({rayStart:n,rayEnd:u,segmentStart:d.start,segmentEnd:d.end});p!==null&&(g=Math.min(g,p))}for(const h of this.getBoardBoundarySegments()){const d=this.getRayIntersectionDistance({rayStart:n,rayEnd:u,segmentStart:h.start,segmentEnd:h.end});d!==null&&(g=Math.min(g,d))}return Number.isFinite(g)?Math.max(0,g-s):0}getMinBlockingClearance(e){const{candidate:n,connectionNetIds:o,sourceZ:i,targetZ:r}=e,s=Math.min(i,r),a=Math.max(i,r);let A=Number.POSITIVE_INFINITY;for(const c of this.ogSrj.obstacles){const l=this.getObstacleZs(c);if(!l.some(g=>g>=s&&g<=a)||c.isCopperPour&&!l.includes(i))continue;const u=o7(n,c)-this.viaRadius;if(A=Math.min(A,u),A+q3<this.requiredViaToPadClearance)return A}return A}getMinPlacedEscapeViaClearance(e){let n=Number.POSITIVE_INFINITY;for(const o of this.createdEscapeVias){const i=no(e,o)-this.viaDiameter;if(n=Math.min(n,i),n+q3<this.obstacleMargin)return n}return n}selectPointOwner(e){const{point:n,groupConnections:o,matchingCopperPours:i}=e,r=iae(n),s=o.map(a=>({connection:a,pointIndex:a.pointsToConnect.findIndex(A=>iae(A)===r)})).filter(a=>a.pointIndex!==-1);return s.length===0?null:(s.sort((a,A)=>{const c=i.some(l=>this.obstacleMatchesConnectionNet(l,this.getConnectionNetIds(a.connection)));return c!==i.some(l=>this.obstacleMatchesConnectionNet(l,this.getConnectionNetIds(A.connection)))?c?-1:1:a.pointIndex-A.pointIndex}),s[0])}findBestEscapeViaCandidate(e){const{connection:n,point:o,pointIndex:i,matchingCopperPours:r,connectionNetIds:s,sourceObstacle:a}=e;if(!ND(o))return null;const A=o.layer,c=Kr(A,this.ogSrj.layerCount),l=a??this.selectSourceObstacle({point:o,sourceLayer:A,connectionNetIds:s}),u=this.getCandidatePositions(o,l);let g=null;for(const h of r){const d=h.layers[0];if(!d||d===A)continue;const p=Kr(d,this.ogSrj.layerCount),m=s0o(h);for(const _ of u){if(!this.isInsideBoard(_)||!pSe(_,h)||!this.hasClearEscapePath({sourcePoint:o,candidate:_,sourceLayer:A,sourceObstacle:l}))continue;const f=this.getMinBlockingClearance({candidate:_,connectionNetIds:s,sourceZ:c,targetZ:p});if(f+q3<this.requiredViaToPadClearance)continue;const I=this.getMinPlacedEscapeViaClearance(_);if(I+q3<this.obstacleMargin)continue;const C=this.getProjectedFreeSpace({sourcePoint:o,candidate:_,sourceLayer:A,sourceObstacle:l}),y=Math.min(C,3),x=100*f-no(o,_)-.5*Math.abs(p-c)+2*y+(Number.isFinite(I)?10*Math.min(I,this.requiredViaToViaClearance):0);(!g||x>g.score)&&(g={pointId:`${mSe}${n.name}:${o.pointId??`p${i}`}:${d}:${this.nextEscapeViaIndex++}`,x:_.x,y:_.y,connectionName:n.name,rootConnectionName:n.__rootConnectionNames?.[0]??n.name,sourcePointIndex:i,sourcePointId:o.pointId,sourceLayer:A,targetLayer:d,targetPourKey:m,score:x})}}return g}buildPointPlacementPlans(e){const{mergedConnection:n,groupConnections:o,matchingCopperPours:i,connectionNetIds:r}=e,s=[];for(const a of n.pointsToConnect){const A=this.selectPointOwner({point:a,groupConnections:o,matchingCopperPours:i});if(!A)continue;const c=ND(a)?this.selectSourceObstacle({point:a,sourceLayer:a.layer,connectionNetIds:r}):void 0,l=ND(a)?this.getCandidatePositions(a,c).length:0;s.push({point:a,pointOwner:A,sourceObstacle:c,candidateCount:l})}return s.sort((a,A)=>{if(a.candidateCount!==A.candidateCount)return a.candidateCount-A.candidateCount;const c=(a.sourceObstacle?.width??0)*(a.sourceObstacle?.height??0),l=(A.sourceObstacle?.width??0)*(A.sourceObstacle?.height??0);return c!==l?c-l:a.pointOwner.pointIndex-A.pointOwner.pointIndex})}_step(){const e=this.ogSrj.obstacles.filter(a=>a.isCopperPour),n=this.ogSrj.connections,o=n.map(a=>structuredClone(a)),i=new Map(o.map(a=>[a.name,a])),r=structuredClone(this.ogSrj.obstacles),s=Yft([...n]);for(const a of s){const A=new Set(a.__rootConnectionNames??[a.name]),c=n.filter(p=>(p.__rootConnectionNames??[p.name]).some(m=>A.has(m)));if(c.length===0)continue;const l=new Set;for(const p of c)for(const m of this.getConnectionNetIds(p))l.add(m);const u=e.filter(p=>this.obstacleMatchesConnectionNet(p,l));if(u.length===0)continue;const g=new Map,h=new Map,d=this.buildPointPlacementPlans({mergedConnection:a,groupConnections:c,matchingCopperPours:u,connectionNetIds:l});for(const{point:p,pointOwner:m,sourceObstacle:_}of d){const f=this.findBestEscapeViaCandidate({connection:m.connection,point:p,pointIndex:m.pointIndex,matchingCopperPours:u,connectionNetIds:l,sourceObstacle:_});if(!f)continue;const I=i.get(m.connection.name);if(!I||I.pointsToConnect.some(y=>ND(y)&&y.layer===f.sourceLayer&&mBt(y,f)))continue;I.pointsToConnect.push({x:f.x,y:f.y,layer:f.sourceLayer,pointId:f.pointId,terminalVia:{toLayer:f.targetLayer,viaDiameter:this.viaDiameter}}),this.escapeViaMetadataByPointId.set(f.pointId,f),this.createdEscapeVias.push(f),r.push(this.createEscapeViaObstacle({escapeVia:f,connectionNetIds:this.getConnectionNetIds(m.connection)}));const C=g.get(f.targetPourKey);C?C.push(f.pointId):g.set(f.targetPourKey,[f.pointId]),h.has(f.targetPourKey)||h.set(f.targetPourKey,m.connection.name)}for(const[p,m]of g.entries()){if(m.length<=1)continue;const _=h.get(p);if(!_)continue;const f=i.get(_);f&&(f.externallyConnectedPointIds=[...f.externallyConnectedPointIds??[],m])}}this.outputSrj={...structuredClone(this.ogSrj),connections:o,obstacles:r},this.solved=!0}getOutputSimpleRouteJson(){return structuredClone(this.outputSrj)}getEscapeViaMetadataByPointId(){return new Map(this.escapeViaMetadataByPointId)}visualize(){return{title:"Escape Via Location Solver",points:this.outputSrj.connections.flatMap(e=>e.pointsToConnect.map(n=>({x:n.x,y:n.y,color:n.pointId?.startsWith(mSe)===!0?"#0f766e":"#dc2626",label:n.pointId?.startsWith(mSe)===!0?`${e.name}
escape via`:e.name}))),lines:this.createdEscapeVias.map(e=>{const n=this.outputSrj.connections.find(o=>o.name===e.connectionName)?.pointsToConnect[e.sourcePointIndex]??null;return{points:n?[{x:n.x,y:n.y},{x:e.x,y:e.y}]:[{x:e.x,y:e.y}],strokeColor:"#0f766e"}}),circles:this.createdEscapeVias.map(e=>({center:{x:e.x,y:e.y},radius:this.viaRadius,strokeColor:"#0f766e",label:`${e.connectionName}
${e.targetLayer}`})),rects:this.outputSrj.obstacles.filter(e=>!e.isCopperPour).map(e=>({...e,fill:"rgba(220,38,38,0.12)"}))}}},a0o=t=>({...t}),Qv=t=>({...t,route:t.route?.map(a0o),vias:t.vias?.map(e=>({...e}))}),lB=t=>t.map(Qv),_Bt="#0000FF",_Se=.15,Qr=1e-6,gW=.1,nH=["top","bottom","left","right"],fSe=t=>t.x*t.x+t.y*t.y,LAe=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),vv=(t,e,n)=>{const o=LAe(n,e),i=fSe(o);if(i<=Qr)return Math.sqrt(fSe(LAe(t,e)));const r=(a=LAe(t,e),A=o,s=(a.x*A.x+a.y*A.y)/i,Math.max(0,Math.min(1,s)));var s,a,A;const c={x:e.x+o.x*r,y:e.y+o.y*r};return Math.sqrt(fSe(LAe(t,c)))},Ab=t=>t?.z===1?"bottom":"top",A0o=(t,e,n)=>(t.z??0)===(e.z??0)&&(e.z??0)===(n.z??0)&&(t.x===e.x&&e.x===n.x||t.y===e.y&&e.y===n.y),HAe=(t,e,n)=>{const o=n?.get(t);if(o)return o;const i=t.route??[],r=t.traceThickness??_Se;let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=!1;const u=(h,d,p)=>{s=Math.min(s,h-p),a=Math.min(a,d-p),A=Math.max(A,h+p),c=Math.max(c,d+p),l=!0},g={segments:[],segmentsByLayer:{top:[],bottom:[]},vias:(t.vias??[]).map(h=>{const d=(h.diameter??t.viaDiameter??.3)/2;return u(h.x,h.y,d),{center:{x:h.x,y:h.y},radius:d,routeIndex:e}}),bounds:{minX:0,minY:0,maxX:0,maxY:0}};for(let h=0;h<i.length-1;){const d=i[h];let p=h+1,m=i[p];const _=r/2;for(d&&u(d.x,d.y,_),m&&u(m.x,m.y,_);p<i.length-1;){const C=i[p],y=i[p+1];if(!d||!C||!y||Ab(d)!==Ab(C)||Ab(C)!==Ab(y)||!A0o(d,C,y))break;p+=1,m=y,u(y.x,y.y,_)}if(!d||!m){h+=1;continue}const f=Ab(d),I={start:d,end:m,routeIndex:e,pointIndex:h,endPointIndex:p,thickness:r,halfThickness:_,layer:f,minX:Math.min(d.x,m.x)-_,maxX:Math.max(d.x,m.x)+_,minY:Math.min(d.y,m.y)-_,maxY:Math.max(d.y,m.y)+_};g.segments.push(I),g.segmentsByLayer[f].push(I),h=p}if(!l)for(const h of i)u(h.x,h.y,r/2);return g.bounds=l?{minX:s,minY:a,maxX:A,maxY:c}:{minX:0,minY:0,maxX:0,maxY:0},n?.set(t,g),g},OAe=(t,e,n)=>e.x<=Math.max(t.x,n.x)+Qr&&e.x>=Math.min(t.x,n.x)-Qr&&e.y<=Math.max(t.y,n.y)+Qr&&e.y>=Math.min(t.y,n.y)-Qr,GAe=(t,e,n)=>(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y),ISe=(t,e,n,o)=>((i,r,s,a)=>{const A=GAe(i,r,s),c=GAe(i,r,a),l=GAe(s,a,i),u=GAe(s,a,r);return!!(Math.abs(A)<=Qr&&OAe(i,s,r))||!!(Math.abs(c)<=Qr&&OAe(i,a,r))||!!(Math.abs(l)<=Qr&&OAe(s,i,a))||!!(Math.abs(u)<=Qr&&OAe(s,r,a))||A>0!=c>0&&l>0!=u>0})(t,e,n,o)?0:Math.min(vv(t,n,o),vv(e,n,o),vv(n,t,e),vv(o,t,e)),Q7=(t,e)=>Math.abs(t.x-e.x)<=Qr&&Math.abs(t.y-e.y)<=Qr,fBt=(t,e)=>Q7(t.start,e.start)||Q7(t.start,e.end)||Q7(t.end,e.start)||Q7(t.end,e.end),IBt=t=>{if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=>!!n);return Array.from(new Set(e))},c0o=(t,e)=>{const n=IBt(t),o=IBt(e);return n.length!==0&&o.length!==0&&n.some(i=>o.includes(i))},l0o=(t,e,n)=>t.minX-n<=e.maxX&&t.maxX+n>=e.minX&&t.minY-n<=e.maxY&&t.maxY+n>=e.minY,u0o=(t,e,n)=>{const o=n+t.halfThickness+e.halfThickness-Qr;return t.minX-n<=e.maxX&&t.maxX+n>=e.minX&&t.minY-n<=e.maxY&&t.maxY+n>=e.minY&&o>0},CBt=(t,e,n,o)=>{const i=o+n.halfThickness+e-Qr,r=t.x-i,s=t.x+i,a=t.y-i,A=t.y+i;return r<=n.maxX&&s>=n.minX&&a<=n.maxY&&A>=n.minY},g0o=(t,e)=>{const n=new WeakMap,o=t.map((a,A)=>HAe(a,A,n)),i=[],r=new Set,s=a=>{r.has(a.label)||(r.add(a.label),i.push(a))};for(let a=0;a<o.length;a+=1){const A=o[a];if(A)for(let c=a+1;c<o.length;c+=1){const l=o[c];if(l&&!c0o(t[a],t[c])&&l0o(A.bounds,l.bounds,e)){for(const u of["top","bottom"]){const g=A.segmentsByLayer[u],h=l.segmentsByLayer[u];for(const d of g)for(const p of h){if(fBt(d,p)||!u0o(d,p,e))continue;const m=e+(d.thickness+p.thickness)/2-Qr;ISe(d.start,d.end,p.start,p.end)>=m||s({center:{x:(Math.max(d.minX-e,p.minX-e)+Math.min(d.maxX+e,p.maxX+e))/2,y:(Math.max(d.minY-e,p.minY-e)+Math.min(d.maxY+e,p.maxY+e))/2},label:`trace-violation:${a}:s${d.pointIndex}:${c}:s${p.pointIndex}:${u}`})}}for(const u of A.segments)for(const[g,h]of l.vias.entries()){if(!CBt(h.center,h.radius,u,e))continue;const d=e+u.halfThickness+h.radius-Qr;vv(h.center,u.start,u.end)>=d||s({center:h.center,label:`trace-violation:${a}:s${u.pointIndex}:${c}:v${g}`})}for(const u of l.segments)for(const[g,h]of A.vias.entries()){if(!CBt(h.center,h.radius,u,e))continue;const d=e+u.halfThickness+h.radius-Qr;vv(h.center,u.start,u.end)>=d||s({center:h.center,label:`trace-violation:${a}:v${g}:${c}:s${u.pointIndex}`})}}}}return(a=>{const A=[];for(const c of a){const l=A.find(u=>{return g=u.center,h=c.center,Math.hypot(g.x-h.x,g.y-h.y)<=.28;var g,h});l?(l.center={x:(l.center.x*l.count+c.center.x)/(l.count+1),y:(l.center.y*l.count+c.center.y)/(l.count+1)},l.labels.push(c.label),l.count+=1):A.push({center:c.center,labels:[c.label],count:1})}return A.map((c,l)=>({center:c.center,radius:Math.min(.3,.2+.035*Math.sqrt(c.count-1)),stroke:"#f59e0b",fill:"rgba(245, 158, 11, 0.46)",label:c.count===1?c.labels[0]:`trace-violations:${l}:count-${c.count}`}))})(i)},wv=({routeIndexes:t,layers:e,routePointIndexes:n})=>`${t[0]}:${e[0]}:${n[0].join(",")}:${t[1]}:${e[1]}:${n[1].join(",")}`,YAe=(t,e,n,o,i,r,s)=>{const a=((c,l,u,g,h,d)=>c<u?`${c}:${l}:${h.join(",")}:${u}:${g}:${d.join(",")}`:`${u}:${g}:${d.join(",")}:${c}:${l}:${h.join(",")}`)(e,n,o,i,r,s),A=t.get(a);if(A){const[c,l]=e<o?[r,s]:[s,r];for(const u of c)A.routePointIndexes[0].includes(u)||A.routePointIndexes[0].push(u);for(const u of l)A.routePointIndexes[1].includes(u)||A.routePointIndexes[1].push(u);return A.routePointIndexes[0].sort((u,g)=>u-g),void A.routePointIndexes[1].sort((u,g)=>u-g)}e<o?t.set(a,{routeIndexes:[e,o],layers:[n,i],routePointIndexes:[[...new Set(r)].sort((c,l)=>c-l),[...new Set(s)].sort((c,l)=>c-l)]}):t.set(a,{routeIndexes:[o,e],layers:[i,n],routePointIndexes:[[...new Set(s)].sort((c,l)=>c-l),[...new Set(r)].sort((c,l)=>c-l)]})},UAe=t=>{const e=[];for(let n=t.pointIndex;n<=t.endPointIndex;n+=1)e.push(n);return e},Pv=(t,e)=>!e||t.some(n=>e.has(n)),KAe=(t,e)=>{const n=t.route??[],o=[];for(let i=0;i<n.length;i+=1){const r=n[i];r&&Math.abs(r.x-e.center.x)<=Qr&&Math.abs(r.y-e.center.y)<=Qr&&o.push(i)}return o},d0o=(t,e,n)=>t.minX-n<=e.maxX&&t.maxX+n>=e.minX&&t.minY-n<=e.maxY&&t.maxY+n>=e.minY,h0o=(t,e,n)=>{const o=n+t.halfThickness+e.halfThickness-Qr;return t.minX-n<=e.maxX&&t.maxX+n>=e.minX&&t.minY-n<=e.maxY&&t.maxY+n>=e.minY&&o>0},yBt=(t,e,n,o)=>{const i=o+n.halfThickness+e-Qr,r=t.x-i,s=t.x+i,a=t.y-i,A=t.y+i;return r<=n.maxX&&s>=n.minX&&a<=n.maxY&&A>=n.minY},p0o=(t,e,n)=>{const o=n+t.radius+e.radius-Qr;return Math.abs(t.center.x-e.center.x)<=o&&Math.abs(t.center.y-e.center.y)<=o},Fy=(t,e,n,o,i)=>{const r=t.map((l,u)=>HAe(l,u,o)),s=new Map;if(e.size===0)return[];const a=Array.from(e),A=new Map,c=l=>{const u=A.get(l);if(u)return u;const g=r[l];if(!g)return[];const h=[];for(let d=0;d<r.length;d+=1){if(d===l)continue;const p=r[d];p&&d0o(g.bounds,p.bounds,n)&&h.push(d)}return A.set(l,h),h};for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.segments){const p=UAe(d);if(Pv(p,h))for(const m of g){if(l>m&&e.has(m))continue;const _=r[m];if(!_)continue;const f=i?.get(m),I=_.segmentsByLayer[d.layer];for(const C of I){const y=UAe(C);if(!Pv(y,f)||fBt(d,C)||!h0o(d,C,n))continue;const x=n+(d.thickness+C.thickness)/2-Qr;ISe(d.start,d.end,C.start,C.end)<x&&YAe(s,d.routeIndex,d.layer,C.routeIndex,C.layer,p,y)}}}}for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.vias){const p=KAe(t[d.routeIndex],d);if(Pv(p,h))for(const m of g){if(l>m&&e.has(m))continue;const _=r[m];if(!_)continue;const f=i?.get(m);for(const I of _.segments){const C=UAe(I);if(!Pv(C,f)||!yBt(d.center,d.radius,I,n))continue;const y=n+I.thickness/2+d.radius-Qr;vv(d.center,I.start,I.end)<y&&YAe(s,I.routeIndex,I.layer,d.routeIndex,"via",C,p)}}}}for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.segments){const p=UAe(d);if(Pv(p,h))for(const m of g){const _=r[m];if(!_)continue;const f=i?.get(m);for(const I of _.vias){const C=KAe(t[I.routeIndex],I);if(!Pv(C,f)||!yBt(I.center,I.radius,d,n))continue;const y=n+d.thickness/2+I.radius-Qr;vv(I.center,d.start,d.end)<y&&YAe(s,d.routeIndex,d.layer,I.routeIndex,"via",p,C)}}}}for(const l of a){const u=r[l];if(!u)continue;const g=c(l),h=i?.get(l);for(const d of u.vias){const p=KAe(t[d.routeIndex],d);if(Pv(p,h))for(const m of g){if(l>m&&e.has(m))continue;const _=r[m];if(!_)continue;const f=i?.get(m);for(const I of _.vias){const C=KAe(t[I.routeIndex],I);if(!Pv(C,f)||!p0o(d,I,n))continue;const y=n+d.radius+I.radius-Qr;Math.hypot(d.center.x-I.center.x,d.center.y-I.center.y)<y&&YAe(s,d.routeIndex,"via",I.routeIndex,"via",p,C)}}}}return Array.from(s.values())},xBt=(t,e)=>t.x>=e.minX-Qr&&t.x<=e.maxX+Qr&&t.y>=e.minY-Qr&&t.y<=e.maxY+Qr,m0o=(t,e,n)=>{switch(e){case"left":return{minX:t.minX,maxX:t.minX+n,minY:t.minY,maxY:t.maxY};case"right":return{minX:t.maxX-n,maxX:t.maxX,minY:t.minY,maxY:t.maxY};case"top":return{minX:t.minX,maxX:t.maxX,minY:t.maxY-n,maxY:t.maxY};case"bottom":return{minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.minY+n}}},_0o=(t,e,n)=>{const o=e.x-t.x,i=e.y-t.y;let r=0,s=1;const a=(c,l)=>{if(Math.abs(c)<=Qr)return l>=-1e-6;const u=l/c;return c<0?!(u>s)&&(u>r&&(r=u),!0):!(u<r)&&(u<s&&(s=u),!0)};if(!(a(-o,t.x-n.minX)&&a(o,n.maxX-t.x)&&a(-i,t.y-n.minY)&&a(i,n.maxY-t.y)))return 0;const A=Math.hypot(o,i);return Math.max(0,s-r)*A},EBt=(t,e)=>nH.filter(n=>{switch(n){case"left":return Math.abs(t.x-e.minX)<=Qr;case"right":return Math.abs(t.x-e.maxX)<=Qr;case"top":return Math.abs(t.y-e.maxY)<=Qr;case"bottom":return Math.abs(t.y-e.minY)<=Qr}return!1}),BBt=(t,e)=>{const n=[];return t.x<e.minX-Qr&&n.push("left"),t.x>e.maxX+Qr&&n.push("right"),t.y>e.maxY+Qr&&n.push("top"),t.y<e.minY-Qr&&n.push("bottom"),n},f0o=(t,e,n)=>{const o=e.x-t.x,i=e.y-t.y;switch(n){case"left":case"right":return Math.abs(o)<=Qr&&Math.abs(i)>Qr;case"top":case"bottom":return Math.abs(i)<=Qr&&Math.abs(o)>Qr}},VAe=(t,e,n)=>{const o=[],i=Math.max(n,Qr),r=Math.min(.1,i/4);for(let s=0;s<t.length;s+=1){const a=t[s],A=a?.route??[];for(let c=0;c<A.length-1;c+=1){const l=A[c],u=A[c+1];if(!l||!u)continue;const g=BBt(l,e),h=BBt(u,e),d=EBt(l,e),p=EBt(u,e),m=nH.filter(I=>!(_0o(l,u,m0o(e,I,i))<=r)&&!!f0o(l,u,I)),_=!xBt(l,e)||!xBt(u,e),f=Array.from(new Set([...m,...g,...h]));(_||f.length!==0)&&o.push({routeIndex:s,connectionName:a.connectionName??a.rootConnectionName??`route-${s}`,segmentIndex:c,touchedSides:f,startSides:d,endSides:p,start:l,end:u})}}return o},CSe=t=>t?.center&&t.width&&t.height?{minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2,width:t.width,height:t.height,center:t.center}:null,bBt=t=>t==="bottom"?_Bt:"#FF0000",ySe=t=>{const e=t.route??[],n=[];if(e.length<2)return n;let o=Ab(e[0]),i=[e[0]];for(let r=1;r<e.length;r+=1){const s=e[r],a=Ab(s);a===o?i.push(s):(i.length>=2&&n.push({points:i,strokeColor:bBt(o),strokeWidth:t.traceThickness??_Se,label:t.connectionName??"route"}),o=a,i=[e[r-1],s])}return i.length>=2&&n.push({points:i,strokeColor:bBt(o),strokeWidth:t.traceThickness??_Se,label:t.connectionName??"route"}),n},I0o=(t,e)=>({title:`HighDensityRepair02 Initial State (margin=${e})`,routes:t}),zAe=t=>{const e=[];for(const n of t){const o=e[e.length-1];o&&o.z===n.z&&Q7(o,n)||e.push(n)}return e},C0o=(t,e,n)=>{const o=Math.max(0,t.minX-e.maxX,e.minX-t.maxX),i=Math.max(0,t.minY-e.maxY,e.minY-t.maxY);return Math.hypot(o,i)<=n+Qr},SBt=(t,e)=>{let n=Number.POSITIVE_INFINITY;for(const o of t.segments)for(const i of e.segments){if(o.layer!==i.layer)continue;const r=ISe(o.start,o.end,i.start,i.end)-(o.thickness+i.thickness)/2;n=Math.min(n,r)}return n},xSe=({currentRoutes:t,candidateRoutes:e,candidateRouteIndexes:n,maximumAllowedClearance:o})=>{const i=new WeakMap,r=new WeakMap,s=[],a=Array.from(n).sort((u,g)=>u-g),A=t.map((u,g)=>HAe(u,g,i)),c=e.map((u,g)=>HAe(u,g,r)),l=new Set;for(const u of a)for(let g=0;g<e.length;g+=1){if(g===u)continue;const h=Math.min(u,g),d=Math.max(u,g),p=`${h}:${d}`;if(l.has(p))continue;l.add(p);const m=c[h],_=c[d];if(!m||!_||!C0o(m.bounds,_.bounds,o))continue;const f=SBt(m,_);if(!Number.isFinite(f)||f>o+Qr||!A[h]||!A[d])continue;const I=SBt(A[h],A[d]);!Number.isFinite(I)||f>=I-Qr||s.push({routeIndexes:[h,d],previousClearance:I,nextClearance:f})}return s},JAe=.001,y0o=(t,e)=>t.map(n=>{const o=n.route??[];return o.length===0?n:{...n,route:o.map((i,r)=>r===0||r===o.length-1?((s,a)=>{const A={...s};return Math.abs(A.x-a.minX)<=JAe?A.x=a.minX:Math.abs(A.x-a.maxX)<=JAe&&(A.x=a.maxX),Math.abs(A.y-a.minY)<=JAe?A.y=a.minY:Math.abs(A.y-a.maxY)<=JAe&&(A.y=a.maxY),A})(i,e):i)}}),x0o=(t,e)=>Array.from(e).flatMap(n=>ySe(t[n]).map(o=>({...o,strokeColor:"#000000",strokeWidth:o.strokeWidth,label:`candidate:${o.label}`}))),QBt=(t,e,n,o,i)=>{const r="rgba(0, 0, 0, 0)";switch(e){case"left":return{center:{x:t.minX+n/2,y:t.center.y},width:n,height:t.height,stroke:r,fill:o,label:i};case"right":return{center:{x:t.maxX-n/2,y:t.center.y},width:n,height:t.height,stroke:r,fill:o,label:i};case"top":return{center:{x:t.center.x,y:t.maxY-n/2},width:t.width,height:n,stroke:r,fill:o,label:i};case"bottom":return{center:{x:t.center.x,y:t.minY+n/2},width:t.width,height:n,stroke:r,fill:o,label:i}}},E0o=({routes:t,candidateRoutes:e,candidateRouteIndexes:n,originalRoutes:o,boundary:i,side:r,margin:s,rejected:a,rejectionReason:A})=>{const c=Array.from(n).map(l=>e[l].connectionName??`route-${l}`);return{title:a?`${r} move rejected (${A})`:`${r} move accepted`,routes:a?t:e,originalRoutes:o,activeSide:r,candidateRouteNames:c,overlayLines:a?x0o(e,n):[],overlayRects:[QBt(i,r,s,a?"rgba(220, 38, 38, 0.14)":"rgba(16, 185, 129, 0.14)",a?`rejected:${r}`:`accepted:${r}`)]}},B0o=(t,e,n,o)=>{const i=(t?.adjacentObstacles??[]).some(r=>((s,a,A,c)=>{const l=(u=>u.center&&u.width&&u.height?{minX:u.center.x-u.width/2,maxX:u.center.x+u.width/2,minY:u.center.y-u.height/2,maxY:u.center.y+u.height/2}:null)(s);if(!l)return!1;switch(A){case"left":return l.maxX>=a.minX-Qr&&l.minX<=a.minX+c+Qr;case"right":return l.minX<=a.maxX+Qr&&l.maxX>=a.maxX-c-Qr;case"top":return l.minY<=a.maxY+Qr&&l.maxY>=a.maxY-c-Qr;case"bottom":return l.maxY>=a.minY-Qr&&l.minY<=a.minY+c+Qr}})(r,e,n,o));return{hasObstacle:i,moveAmount:i?o:o/2}},b0o=({start:t,end:e,side:n,boundary:o,amount:i,targetAxisValue:r})=>{const s=(({side:a,boundary:A,amount:c,targetAxisValue:l})=>{const u=l??(()=>{switch(a){case"left":return A.minX+c;case"right":return A.maxX-c;case"top":return A.maxY-c;case"bottom":return A.minY+c}})();switch(a){case"left":case"right":return Math.min(Math.max(u,A.minX),A.maxX);case"top":case"bottom":return Math.min(Math.max(u,A.minY),A.maxY)}})({side:n,boundary:o,amount:i,targetAxisValue:r});switch(n){case"left":case"right":return zAe([t,{x:s,y:t.y,z:t.z},{x:s,y:e.y,z:e.z},e]);case"top":case"bottom":return zAe([t,{x:t.x,y:s,z:t.z},{x:e.x,y:s,z:e.z},e])}},S0o=(t,e,n,o,i,r,s,a=!1)=>{const A=t.route??[];if(A.length<2||e.length===0)return Qv(t);const c=a?i:Math.max(i,r),l=((g,h)=>{switch(g){case"left":return{x:h,y:0};case"right":return{x:-h,y:0};case"top":return{x:0,y:-h};case"bottom":return{x:0,y:h}}})(o,c);if(a||(t.vias?.length??0)>0||A.length>2){const g=Qv(t),h=g.route??[];for(const d of e){const p=h[d];p&&(h[d]={...p,x:p.x+l.x,y:p.y+l.y})}for(const d of g.vias??[])e.some(p=>{const m=t.route?.[p];return!!m&&Q7(m,d)})&&(d.x+=l.x,d.y+=l.y);return g}const u=Qv(t);if(A.length===2&&e.length===2&&e[0]===0&&e[1]===1){const g=A[0],h=A[1];return Qv({...t,route:b0o({start:g,end:h,side:o,boundary:n,amount:c,targetAxisValue:s})})}return u},WAe=(t,e,n)=>{switch(n){case"left":return t.x-e.minX;case"right":return e.maxX-t.x;case"top":return e.maxY-t.y;case"bottom":return t.y-e.minY}},vBt=(t,e,n)=>{const o=(i=>{const r=i.route??[];if(r.length===0)return[];const s=[];for(let a=0;a<r.length;a+=1){const A=r[a];if(!A)continue;a===0||a===r.length-1||s.push(A);const c=r[a+1];c&&s.push({x:(A.x+c.x)/2,y:(A.y+c.y)/2})}return s})(t);return o.length===0?Number.POSITIVE_INFINITY:o.reduce((i,r)=>Math.min(i,WAe(r,e,n)),Number.POSITIVE_INFINITY)},wBt=(t,e,n=[])=>{const o=t.route??[],i=[],r=new Set,s=e.length===0||e.includes("via");if(o.length===2)return[0,1];const a=A=>{if(A<=0||A>=o.length-1||r.has(A))return;const c=o[A];c&&(s||e.includes(Ab(c)))&&(r.add(A),i.push(A))};if(n.length>0)for(const A of n)a(A);else for(let A=1;A<o.length-1;A+=1)a(A);for(let A=0;A<i.length;A+=1){const c=i[A],l=o[c];if(l)for(let u=1;u<o.length-1;u+=1){if(r.has(u))continue;const g=o[u];g&&g.z!==l.z&&Q7(g,l)&&(r.add(u),i.push(u))}}return i.sort((A,c)=>A-c),i},PBt=(t,e)=>Math.max(0,...(t.route??[]).map(n=>Math.max(e.minX-n.x,n.x-e.maxX,e.minY-n.y,n.y-e.maxY,0))),oH=(t,e,n,o)=>WAe(t,e,n)<=o+Qr,MBt=(t,e,n,o)=>{const i=t.route??[],r=[],s=new Set;let a=1,A=i.length-2;for(;a<i.length-1&&Q7(i[a],i[0]);)a+=1;for(;A>0&&Q7(i[A],i[i.length-1]);)A-=1;for(let c=a;c<=A;c+=1)oH(i[c],e,n,o)&&(s.add(c),r.push(c));for(let c=0;c<r.length;c+=1){const l=i[r[c]];if(l)for(let u=a;u<=A;u+=1){if(s.has(u))continue;const g=i[u];g&&g.z!==l.z&&Q7(g,l)&&(s.add(u),r.push(u))}}return r.length===0&&i.length===2&&i.some(c=>oH(c,e,n,o))?[0,1]:(r.sort((c,l)=>c-l),r)},Q0o=(t,e,n)=>{const o=t.route??[],i=n===0?o[0]:o[o.length-1];return i?nH.filter(r=>WAe(i,e,r)<=Qr):[]},v0o=(t,e,n)=>{const o=t.route??[],i=e.route??[];if(o.length===0||i.length===0)return!0;for(const r of[0,-1]){const s=Q0o(t,n,r);if(s.length===0)continue;const a=r===0?i[0]:i[i.length-1];if(!a)return!1;for(const A of s)if(WAe(a,n,A)>Qr)return!1}return!0},w0o=(t,e)=>Math.hypot(e.x-t.x,e.y-t.y),DBt=(t,e,n,o)=>{const i=t.route??[];if(i.length===0)return"none";let r=!1;for(let s=0;s<i.length;s+=1){const a=i[s];if(a&&oH(a,e,n,o)){if(s!==0&&s!==i.length-1)return"interior";r=!0}}for(let s=0;s<i.length-1;s+=1){const a=i[s],A=i[s+1];if(a&&A&&oH(a,e,n,o)&&oH(A,e,n,o)&&!(w0o(a,A)<=Qr))return"interior"}return r?"endpoint":"none"},NBt=({currentRoutes:t,routeIndex:e,side:n,moveSide:o=n,boundary:i,margin:r,moveAmount:s,geometryCache:a})=>{const A=t[e],c=(A.route?.length??0)===2,l=MBt(A,i,n,r);if(l.length===0)return null;const u=new Set,g=new Map,h=new Set,d=t.slice();let p=!1,m="overlap";const _=new Set([e]),f=new Map([[e,new Set]]),I=new Map([[e,new Set]]),C=[e];let y=0,x=null,E=null,B=null,S=null;const Q=R=>new Set(R.map(F=>wv(F))),w=()=>x||(x=Fy(t,u,r,a,g),x),M=()=>B||(B=Fy(t,u,0,a,g),B),k=()=>S||(S=Fy(d,u,0,a,g),S);for(;y<C.length&&!p;){const R=C[y];if(y+=1,_.delete(R),u.has(R))continue;const F=d[R],O=Array.from(f.get(R)??[]),U=Array.from(I.get(R)??[]);f.delete(R),I.delete(R);const Y=R===e?MBt(F,i,n,r):wBt(F,O,U);if(Y.length===0){if(R===e)return null;p=!0,m="eventual-overlap";break}const W=F.route??[],te=R===e?void 0:o==="left"||o==="right"?(W[Y[0]]?.x??0)+(o==="left"?s:-s):(W[Y[0]]?.y??0)+(o==="top"?-s:s);d[R]=S0o(F,Y,i,o,s,r,te,R!==e),u.add(R),g.set(R,new Set(Y)),x=null,E=null,B=null,S=null,(F.route?.length??0)===2&&h.add(R);const j=PBt(t[R],i);if(PBt(d[R],i)>j+1e-6){p=!0,m="boundary";break}if(!v0o(t[R],d[R],i)){p=!0,m="endpoint-boundary";break}const J=Fy(d,new Set([R]),r,a,new Map([[R,new Set(Y)]]));for(const oe of J){if(Q(w()).has(wv(oe)))continue;const[ie,ne]=oe.routeIndexes,le=u.has(ie),ge=u.has(ne);if(le&&ge)continue;const _e=le?ne:ie,ue=le?oe.layers[1]:oe.layers[0],fe=le?oe.routePointIndexes[1]:oe.routePointIndexes[0];if(u.has(_e)||_.has(_e)){if(_.has(_e)){const pe=f.get(_e)??new Set;pe.add(ue),f.set(_e,pe);const ye=I.get(_e)??new Set;for(const Me of fe)ye.add(Me);I.set(_e,ye)}}else _.add(_e),C.push(_e),f.set(_e,new Set([ue])),I.set(_e,new Set(fe))}}if(!p&&u.size>1){const R=Q(w()),F=Q(E||(E=Fy(d,u,r,a,g),E));for(const O of F)if(!R.has(O)){p=!0,m="eventual-overlap";break}}if(!p&&u.size>1){const R=Q(M()),F=Q(k());for(const O of F)if(!R.has(O)){p=!0,m="eventual-overlap";break}}if(!p){const R=new Set(Fy(t,u,0,a).map(O=>wv(O))),F=Fy(d,u,0,a);for(const O of F){const U=wv(O);if(!R.has(U)){p=!0,m="eventual-overlap";break}}}return p||(({currentRoutes:F,candidateRoutes:O,candidateRouteIndexes:U,boundary:Y,activeSide:W})=>{const te=nH.filter(J=>J!==W),j=[];for(const J of U){const oe=F[J],ie=O[J];if(oe&&ie)for(const ne of te){const le=vBt(oe,Y,ne),ge=vBt(ie,Y,ne);le>Qr&&ge<=Qr&&j.push({routeIndex:J,side:ne,previousClearance:le,nextClearance:ge})}}return j})({currentRoutes:t,candidateRoutes:d,candidateRouteIndexes:u,boundary:i,activeSide:n}).length>0&&(p=!0,m="boundary-touch"),p||(({currentRoutes:F,candidateRoutes:O,candidateRouteIndexes:U,geometryCache:Y,currentConflicts:W,candidateConflicts:te})=>{const j=W??Fy(F,U,0,Y),J=te??Fy(O,U,0,Y),oe=new Set(j.map(ie=>wv(ie)));return J.filter(ie=>{const ne=wv(ie);if(oe.has(ne))return!1;const[le,ge]=ie.routeIndexes,[_e,ue]=ie.layers,fe=U.has(le),pe=U.has(ge);if(fe&&pe)return!1;const ye=fe?ue:_e,Me=O[fe?ge:le];return!!Me&&wBt(Me,[ye]).length===0})})({currentRoutes:t,candidateRoutes:d,candidateRouteIndexes:u,geometryCache:a,currentConflicts:M(),candidateConflicts:k()}).length>0&&(p=!0,m="fixed-trace-touch"),p||xSe({currentRoutes:t,candidateRoutes:d,candidateRouteIndexes:u,maximumAllowedClearance:Math.min(r/2,gW)}).length>0&&(p=!0,m="trace-clearance"),!p&&((R,F,O,U,Y,W)=>Array.from(O).some(te=>{const j=R[te],J=F[te];return nH.filter(oe=>oe!==Y).some(oe=>{const ie=DBt(j,U,oe,W),ne=DBt(J,U,oe,W);return ie==="none"&&ne!=="none"})}))(t,d,u,i,n,r)&&(p=!0,m="side-regression"),{isTwoPointRoute:c,movableIndexes:l,candidateRouteIndexes:u,movedTwoPointRouteIndexes:h,candidateRoutes:d,rejected:p,rejectionReason:m}},P0o=(t,e,n,o,i)=>{const r=t.route??[];if(e.length===0)return null;if(o==="top"||o==="bottom"){const a=e.reduce((A,c)=>A+(r[c]?.x??n.center.x),0)/e.length;return a<n.center.x-i/2?"right":a>n.center.x+i/2?"left":null}const s=e.reduce((a,A)=>a+(r[A]?.y??n.center.y),0)/e.length;return s>n.center.y+i/2?"bottom":s<n.center.y-i/2?"top":null},M0o=({side:t,sample:e,boundary:n,margin:o,repairedRoutes:i,frames:r,captureProgressFrames:s,lockedTwoPointRoutes:a,geometryCache:A,allowTwoPointWithoutObstacle:c=!1})=>{const{hasObstacle:l,moveAmount:u}=B0o(e,n,t,o);s&&r.push(((d,p,m,_,f,I)=>({title:`${m} boundary analysis: move=${f.toFixed(3)} (${I?"obstacle-side":"clear-side"})`,routes:d,activeSide:m,overlayRects:[QBt(p,m,_,"rgba(245, 158, 11, 0.16)",`strip:${m}`)]}))(lB(i),n,t,o,u,l));const g=new Set;let h=0;for(let d=0;d<i.length;d+=1){if(g.has(d)||a.has(d))continue;const p=i[d];if((p.route?.length??0)===2&&!l&&!c)continue;let m=NBt({currentRoutes:i,routeIndex:d,side:t,boundary:n,margin:o,moveAmount:u,geometryCache:A});if(m){if(m.rejected){const _=P0o(p,m.movableIndexes,n,t,o);if(_){const f=NBt({currentRoutes:i,routeIndex:d,side:t,moveSide:_,boundary:n,margin:o,moveAmount:u,geometryCache:A});f&&!f.rejected&&(m=f)}}if(s&&r.push(E0o({routes:lB(i),candidateRoutes:m.candidateRoutes,candidateRouteIndexes:m.candidateRouteIndexes,originalRoutes:m.rejected?void 0:Array.from(m.candidateRouteIndexes).map(_=>Qv(i[_])),boundary:n,side:t,margin:o,rejected:m.rejected,rejectionReason:m.rejectionReason})),!m.rejected){i.splice(0,i.length,...m.candidateRoutes);for(const _ of m.movedTwoPointRouteIndexes)a.add(_);h+=1}g.add(d)}}return{movesAccepted:h}},dW=(t,e,n,o)=>oH(t,e,n,o),hW=(t,e,n,o)=>{switch(n){case"left":return{...t,x:Math.min(e.minX+o,e.maxX)};case"right":return{...t,x:Math.max(e.maxX-o,e.minX)};case"top":return{...t,y:Math.max(e.maxY-o,e.minY)};case"bottom":return{...t,y:Math.min(e.minY+o,e.maxY)}}},RBt=t=>`${t.routeIndexes[0]}:${t.layers[0]}:${t.routeIndexes[1]}:${t.layers[1]}`,TBt=t=>{if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=>!!n);return Array.from(new Set(e))},kBt=(t,e)=>{const n=TBt(t),o=TBt(e);return n.length!==0&&o.length!==0&&n.some(i=>o.includes(i))},iH=(t,e,n)=>t?VAe([t],e,n).length:0,FBt=(t,e,n,o)=>{const i=new Set(Fy(t,new Set([n]),o).map(wv));return Fy(e,new Set([n]),o).some(r=>!i.has(wv(r)))},LBt=(t,e,n)=>VAe(t,e,n).length,HBt=t=>{if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=>!!n);return Array.from(new Set(e))},OBt=(t,e)=>Fy(t,new Set(t.map((n,o)=>o)),gW,e).filter(n=>!(n.layers[0]==="via"&&n.layers[1]==="via"||((o,i)=>{const r=HBt(o),s=HBt(i);return r.length!==0&&s.length!==0&&r.some(a=>s.includes(a))})(t[n.routeIndexes[0]],t[n.routeIndexes[1]]))).length,D0o=t=>{const e=nH;return[...e.slice(t%e.length),...e.slice(0,t%e.length)]},N0o=(t,e,n=!1)=>{const o=CSe(t?.nodeWithPortPoints),i=o?((g,h)=>g.map(d=>{const p=d.route??[];let m=!1;const _=p.map(f=>{let I=f.x,C=f.y;return I<h.minX?I=h.minX:I>h.maxX&&(I=h.maxX),C<h.minY?C=h.minY:C>h.maxY&&(C=h.maxY),I===f.x&&C===f.y?f:(m=!0,{...f,x:I,y:C})});return m?{...d,route:_}:d}))(y0o(lB(t?.nodeHdRoutes??[]),o),o):lB(t?.nodeHdRoutes??[]),r=Math.max(e??.4,.05),s=lB(i);if(!o)return{boundary:null,baseRoutes:i,repairedRoutes:s,margin:r,frames:[{title:"HighDensityRepair02 Missing Boundary",routes:s}]};const a=n?[I0o(lB(s),r)]:[],A=new WeakMap;let c=LBt(s,o,r);for(let g=0;g<1;g+=1){const h=new Set;let d=0;for(const m of D0o(g)){const{movesAccepted:_}=M0o({side:m,sample:t,boundary:o,frames:a,margin:r,repairedRoutes:s,captureProgressFrames:n,lockedTwoPointRoutes:h,geometryCache:A,allowTwoPointWithoutObstacle:g>=1});d+=_}const p=LBt(s,o,r);if(d===0||p===0||p>=c)break;c=p}const l=lB(s),u=OBt(s,A);return(({routes:g,boundary:h,margin:d,geometryCache:p})=>{const m=VAe(g,h,d);if(m.length===0)return{movesAccepted:0};const _=new Map;for(const B of m){const S=_.get(B.routeIndex)??new Set;for(const Q of B.touchedSides)S.add(Q);_.set(B.routeIndex,S)}const f=[8e-6,.01,d/4,d/2,d+8e-6];let I=0;const C=(B,S,Q)=>{const w=S.route??[];if(w.length<2)return!1;const M={...S,route:zAe(w)};if((M.route?.length??0)<2)return!1;const k=g.slice();if(k[B]=M,iH(k[B],h,d)>=Q)return!1;const R=O=>kBt(g[O.routeIndexes[0]],g[O.routeIndexes[1]]),F=new Set(Fy(g,new Set([B]),0,p).filter(O=>!R(O)).map(RBt));return!Fy(k,new Set([B]),0,p).filter(O=>!R(O)).some(O=>!F.has(RBt(O)))&&!(xSe({currentRoutes:g,candidateRoutes:k,candidateRouteIndexes:new Set([B]),maximumAllowedClearance:Math.min(d/2,gW)}).filter(O=>!kBt(g[O.routeIndexes[0]],g[O.routeIndexes[1]])).length>0||(g[B]=M,0))},y=(B,S,Q,w)=>{if(S.length===0)return!1;for(const M of f){const k=g[B],R=Qv(k),F=R.route??[];let O=!1;for(const U of S){const Y=F[U];Y&&(F[U]=hW(Y,h,Q,M),O=!0)}if(!O)return!1;if(C(B,R,w))return!0}return!1},x=(B,S)=>{const Q=[];return S==="top"||S==="bottom"?(Math.abs(B.x-h.minX)<=Qr&&Q.push("left"),Math.abs(B.x-h.maxX)<=Qr&&Q.push("right")):(Math.abs(B.y-h.minY)<=Qr&&Q.push("bottom"),Math.abs(B.y-h.maxY)<=Qr&&Q.push("top")),Q},E=(B,S,Q)=>{const w=g[B],M=w.route??[];if(M.length!==2)return!1;const[k,R]=M;if(!dW(k,h,S,d)||!dW(R,h,S,d))return!1;const F=x(k,S),O=x(R,S);for(const U of f){let Y=hW(k,h,S,U),W=hW(R,h,S,U);for(const j of F)Y=hW(Y,h,j,U);for(const j of O)W=hW(W,h,j,U);const te={...w,route:[k,Y,W,R]};if(C(B,te,Q))return!0}return!1};for(const[B,S]of _)if(g[B])for(const Q of S){let w=!0;for(;w;){w=!1;const M=g[B].route??[];if(M.length===2){const Y=iH(g[B],h,d);Y>0&&E(B,Q,Y)&&(I+=1);break}if(M.length<3)break;const k=iH(g[B],h,d);if(k===0)break;const R=[];for(let Y=1;Y<M.length-1;Y+=1){const W=M[Y];W&&dW(W,h,Q,d)&&R.push(Y)}if(R.length===0)break;if(y(B,R,Q,k)){I+=1,w=!0;continue}let F=!1,O=k,U=0;for(;U<R.length;){let Y=U;for(;Y+1<R.length&&R[Y+1]===R[Y]+1;)Y+=1;y(B,R.slice(U,Y+1),Q,O)&&(I+=1,F=!0,O=iH(g[B],h,d)),U=Y+1}if(!F){const Y=g[B].route??[];let W=k;for(let te=1;te<Y.length-1;te+=1){const j=Y[te];j&&dW(j,h,Q,d)&&y(B,[te],Q,W)&&(I+=1,F=!0,W=iH(g[B],h,d))}}F&&(w=!0)}}for(const[B,S]of _){const Q=g[B];if(!Q)continue;const w=Q.route??[];if(w.length<=2)continue;const M=iH(g[B],h,d);if(M!==0)for(const k of S){if(!w.every(U=>dW(U,h,k,d)))continue;const R=w[0]?.z;if(!w.every(U=>U.z===R))continue;const F={...Q,route:[w[0],w[w.length-1]]},O=g[B];g[B]=F,E(B,k,M)?I+=1:g[B]=O;break}}})({routes:l,boundary:o,margin:r,geometryCache:A}),OBt(l,A)<=u&&s.splice(0,s.length,...l),(({routes:g,boundary:h,clearanceMargin:d})=>{for(let p=0;p<g.length;p+=1){const m=g[p];if((m.route??[]).length<=2)continue;const _=d,f=Math.max(h.width/2-Qr,0),I=Math.max(h.height/2-Qr,0),C=Math.min(_,f),y=Math.min(_,I),x=Qv(m),E=x.route??[];let B=!1;for(let k=1;k<E.length-1;k+=1){const R=E[k];if(!R)continue;const F=Math.min(Math.max(R.x,h.minX+C),h.maxX-C),O=Math.min(Math.max(R.y,h.minY+y),h.maxY-y);(Math.abs(F-R.x)>Qr||Math.abs(O-R.y)>Qr)&&(R.x=F,R.y=O,B=!0)}if(!B||(x.route=zAe(E),(x.route?.length??0)<2))continue;const S=lB(g);S[p]=x;const Q=FBt(g,S,p,0),w=FBt(g,S,p,d),M=xSe({currentRoutes:g,candidateRoutes:S,candidateRouteIndexes:new Set([p]),maximumAllowedClearance:d}).length>0;Q||w||M||(g[p]=x)}})({routes:s,boundary:o,clearanceMargin:r}),a.push(((g,h,d)=>({title:`HighDensityRepair02 Final State (margin=${d})`,routes:g,originalRoutes:h}))(lB(s),lB(i),r)),{boundary:o,baseRoutes:i,repairedRoutes:s,frames:a,margin:r}},R0o=class extends zA{constructor(t={}){super(),this.params=t,this.showBoundryViolationMarkers=t.showBoundryViolationMarkers??!1}params;frames=[];currentFrameIndex=0;showBoundryViolationMarkers;repairedRoutes=[];_setup(){this.buildFrames();const t=this.getCurrentBoundryViolationCount(),e=this.getCurrentTraceViolationCount();this.stats={boundryViolationCount:t,traceViolationCount:e,margin:this.params.margin??.4,frames:this.frames.length,currentFrame:this.currentFrameIndex}}_step(){if(this.frames.length<=1){const n=this.getCurrentBoundryViolationCount(),o=this.getCurrentTraceViolationCount();return this.showBoundryViolationMarkers=!0,this.stats={...this.stats,boundryViolationCount:n,traceViolationCount:o},void(this.solved=!0)}this.currentFrameIndex<this.frames.length-1&&(this.currentFrameIndex+=1);const t=this.getCurrentBoundryViolationCount(),e=this.getCurrentTraceViolationCount();this.stats={boundryViolationCount:t,traceViolationCount:e,margin:this.params.margin??.4,frames:this.frames.length,currentFrame:this.currentFrameIndex,title:this.frames[this.currentFrameIndex]?.title},this.currentFrameIndex>=this.frames.length-1&&(this.showBoundryViolationMarkers=!0,this.solved=!0)}getConstructorParams(){return[this.params]}getOutput(){const t=this.getCurrentTraceViolationCount();return{margin:this.params.margin??.4,repairedRoutes:this.repairedRoutes,frameCount:this.frames.length,traceViolationCount:t}}setShowBoundryViolationMarkers(t){this.showBoundryViolationMarkers=t}buildFrames(){const t=N0o(this.params.sample,this.params.margin,this.params.captureProgressFrames??!1);this.frames=t.frames,this.repairedRoutes=t.repairedRoutes}getCurrentFrame(){const t=this.params.sample;return this.frames[this.currentFrameIndex]??{title:"HighDensityRepair02",routes:lB(t?.nodeHdRoutes??[])}}getBoundryViolationsForFrame(t){const e=CSe(this.params.sample?.nodeWithPortPoints);return e?VAe(t.routes,e,this.params.margin??.4):[]}getCurrentBoundryViolationCount(){return this.getBoundryViolationsForFrame(this.getCurrentFrame()).length}getRouteNetNames(t){if(!t)return[];const e=[t.connectionName,t.rootConnectionName].filter(n=>!!n);return Array.from(new Set(e))}areRoutesSameNet(t,e){const n=this.getRouteNetNames(t),o=this.getRouteNetNames(e);return n.length!==0&&o.length!==0&&n.some(i=>o.includes(i))}getCurrentTraceViolationCount(){const t=this.getCurrentFrame().routes,e=new Set(t.map((n,o)=>o));return Fy(t,e,gW).filter(n=>!(n.layers[0]==="via"&&n.layers[1]==="via"||this.areRoutesSameNet(t[n.routeIndexes[0]],t[n.routeIndexes[1]]))).length}visualize(){const t=this.params.sample,e=t?.nodeWithPortPoints,n=t?.adjacentObstacles??[],o=this.getCurrentFrame(),i=CSe(e),r=i&&e?.capacityMeshNodeId?[{center:i.center,width:i.width,height:i.height,stroke:"#1d4ed8",fill:"rgba(29, 78, 216, 0.08)",label:e.capacityMeshNodeId}]:i?[{center:i.center,width:i.width,height:i.height,stroke:"#1d4ed8",fill:"rgba(29, 78, 216, 0.08)",label:"capacity-node"}]:[],s=n.filter(g=>g.center&&g.width&&g.height).map((g,h)=>({center:g.center,width:g.width,height:g.height,stroke:g.type==="oval"?"#a855f7":"#dc2626",fill:g.type==="oval"?"rgba(168, 85, 247, 0.12)":"rgba(220, 38, 38, 0.08)",label:g.type?`obstacle:${g.type}:${h}`:`obstacle:${h}`})),a=this.showBoundryViolationMarkers&&i?this.getBoundryViolationsForFrame(o).map(g=>{const h=g.end.x-g.start.x,d=g.end.y-g.start.y,p=Math.max(Math.hypot(h,d),.2),m=Math.abs(h)>=Math.abs(d);return{center:{x:(g.start.x+g.end.x)/2,y:(g.start.y+g.end.y)/2},width:m?p:.18,height:m?.18:p,stroke:"#b45309",fill:"rgba(250, 204, 21, 0.45)",label:`boundry-violation:${g.routeIndex}:${g.segmentIndex}`}}):[],A=this.showBoundryViolationMarkers?g0o(o.routes,gW):[],c=[...(e?.portPoints??[]).map(g=>({x:g.x,y:g.y,color:"#0f766e",label:g.connectionName??g.portPointId??"port-point"})),...o.routes.flatMap(g=>g.route??[]).map(g=>({x:g.x,y:g.y,color:Ab(g)==="bottom"?_Bt:"#0ea5e9",label:""})),...o.overlayPoints??[]],l=[...(o.originalRoutes??[]).flatMap(g=>ySe(g).map(h=>({...h,strokeColor:"#111111",strokeWidth:Math.max(.6*h.strokeWidth,.05),label:`original:${h.label}`}))),...o.routes.filter(g=>(g.route?.length??0)>=2).flatMap(g=>ySe(g)),...o.overlayLines??[]],u=o.routes.flatMap(g=>(g.vias??[]).map(h=>({center:{x:h.x,y:h.y},radius:(h.diameter??g.viaDiameter??.3)/2,stroke:"#7c3aed",fill:"rgba(124, 58, 237, 0.2)",label:g.connectionName?`via:${g.connectionName}`:"via"})));return u.push(...A),{coordinateSystem:"cartesian",title:o.title,rects:[...r,...s,...o.overlayRects??[],...a],points:c,lines:l,circles:u,arrows:o.overlayArrows}}},GBt=(t,e=0)=>({minX:t.center.x-t.width/2-e,maxX:t.center.x+t.width/2+e,minY:t.center.y-t.height/2-e,maxY:t.center.y+t.height/2+e}),T0o=(t,e,n=0)=>{const o=GBt(e,n);return t.x>=o.minX&&t.x<=o.maxX&&t.y>=o.minY&&t.y<=o.maxY},k0o=(t,e)=>t.route.length>0&&e.some(n=>(o=>(o.__zLayers?.length??o.layers?.length??0)>1)(n)&&((o,i)=>o.connectedTo.includes(i.connectionName)||i.rootConnectionName!==void 0&&o.connectedTo.includes(i.rootConnectionName))(n,t)&&t.route.every(o=>((i,r)=>{const s=r.width/2,a=r.height/2;return Math.abs(i.x-r.center.x)<=s&&Math.abs(i.y-r.center.y)<=a})(o,n))),F0o=(t,e,n)=>{if(t.regionId){const i=e.findIndex(r=>r.capacityMeshNodeId===t.regionId);if(i!==-1)return i}const o=[...t.route.map(({x:i,y:r})=>({x:i,y:r})),...t.vias.map(({x:i,y:r})=>({x:i,y:r}))];for(let i=0;i<e.length;i++){const r=e[i];if(o.every(s=>T0o(s,r,n)))return i}return-1},L0o=(t,e)=>({connectionName:t.connectionName??e.connectionName,rootConnectionName:t.rootConnectionName??e.rootConnectionName,...e.startPcbPortId?{startPcbPortId:e.startPcbPortId}:{},...e.endPcbPortId?{endPcbPortId:e.endPcbPortId}:{},regionId:t.capacityMeshNodeId??e.regionId,traceThickness:t.traceThickness??e.traceThickness,viaDiameter:t.viaDiameter??e.viaDiameter,route:t.route?.map(n=>({x:n.x,y:n.y,z:n.z??0}))??e.route,vias:t.vias?.map(n=>({x:n.x,y:n.y}))??e.vias,jumpers:e.jumpers}),H0o=(t,e,n)=>{const o=GBt(t,n);return e.search(o).filter(i=>{return r=o,s=(a=>({minX:a.center.x-a.width/2,maxX:a.center.x+a.width/2,minY:a.center.y-a.height/2,maxY:a.center.y+a.height/2}))(i),r.minX<=s.maxX&&r.maxX>=s.minX&&r.minY<=s.maxY&&r.maxY>=s.minY;var r,s}).map(i=>({type:i.type,center:i.center,width:i.width,height:i.height}))},pW=class extends yr{repairMargin;sampleEntries;originalHdRoutes;originalNodeWithPortPoints;originalObstacles;obstacleSHI;colorMap;repairedRoutesByIndex=new Map;activeSampleIndex=0;activeSubSolver=null;latestVisualization={};constructor(t){super(),this.repairMargin=t.repairMargin??.2,this.originalHdRoutes=t.hdRoutes,this.originalNodeWithPortPoints=t.nodeWithPortPoints,this.originalObstacles=t.obstacles,this.obstacleSHI=new OD("flatbush",this.originalObstacles),this.colorMap=t.colorMap??{};const e=new Map;for(let o=0;o<t.hdRoutes.length;o++){if(k0o(t.hdRoutes[o],t.obstacles))continue;const i=F0o(t.hdRoutes[o],t.nodeWithPortPoints,this.repairMargin);if(i===-1)continue;const r=e.get(i)??[];r.push(o),e.set(i,r)}const n=Array.from(e.entries()).map(([o,i])=>{const r=t.nodeWithPortPoints[o];return{node:r,routeIndexes:i,sample:{nodeWithPortPoints:{capacityMeshNodeId:r.capacityMeshNodeId,center:r.center,width:r.width,height:r.height,portPoints:r.portPoints.map(s=>({x:s.x,y:s.y,z:s.z,connectionName:s.connectionName,portPointId:s.portPointId,prevPortPointId:s.prevPortPointId,nextPortPointId:s.nextPortPointId}))},nodeHdRoutes:i.map(s=>{return{capacityMeshNodeId:(a=t.hdRoutes[s]).regionId,connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,route:a.route.map(A=>({x:A.x,y:A.y,z:A.z})),traceThickness:a.traceThickness,vias:a.vias.map(A=>({x:A.x,y:A.y,diameter:a.viaDiameter})),viaDiameter:a.viaDiameter};var a}),adjacentObstacles:H0o(r,this.obstacleSHI,this.repairMargin)}}});this.sampleEntries=t.maxSampleEntries!==void 0&&n.length>t.maxSampleEntries?[]:n,this.MAX_ITERATIONS=Math.max(1e3*this.sampleEntries.length,1e5),this.stats={sampleCount:this.sampleEntries.length,skippedSampleCount:n.length>this.sampleEntries.length?n.length:0,repairedNodeCount:0,repairedRouteCount:0}}getSolverName(){return"Pipeline4HighDensityRepairSolver"}getConstructorParams(){return[{nodeWithPortPoints:this.sampleEntries.map(t=>t.node),hdRoutes:this.originalHdRoutes,obstacles:this.originalObstacles,repairMargin:this.repairMargin,colorMap:this.colorMap}]}_step(){const t=this.sampleEntries[this.activeSampleIndex];if(t){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.latestVisualization=this.activeSubSolver.visualize(),this.activeSubSolver.failed)return this.failed=!0,this.error=this.activeSubSolver.error??`High density repair failed for node ${t.node.capacityMeshNodeId}`,void(this.activeSubSolver=null);if(!this.activeSubSolver.solved)return;const e=this.activeSubSolver.getOutput().repairedRoutes;for(let n=0;n<t.routeIndexes.length;n++){const o=t.routeIndexes[n],i=this.originalHdRoutes[o],r=e[n];this.repairedRoutesByIndex.set(o,r?L0o(r,i):i)}return this.activeSubSolver=null,this.activeSampleIndex+=1,this.stats={sampleCount:this.sampleEntries.length,repairedNodeCount:this.activeSampleIndex,repairedRouteCount:this.repairedRoutesByIndex.size},void(this.activeSampleIndex>=this.sampleEntries.length&&(this.solved=!0))}this.activeSubSolver=new R0o({sample:t.sample,margin:this.repairMargin}),this.latestVisualization=this.activeSubSolver.visualize()}else this.solved=!0}getOutput(){return this.originalHdRoutes.map((t,e)=>this.repairedRoutesByIndex.get(e)??t)}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();if(!this.solved)return this.latestVisualization;const t=[],e=[];for(const n of this.getOutput()){const o=this.colorMap[n.connectionName]??"#0ea5e9";for(let i=0;i<n.route.length-1;i++){const r=n.route[i],s=n.route[i+1];r.z===s.z&&t.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:r.z===0?o:Es(o,.5),strokeWidth:n.traceThickness,layer:`z${r.z}`,strokeDash:r.z!==0?[.1,.3]:void 0})}for(const i of n.vias)e.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,stroke:o,fill:"rgba(14,165,233,0.12)"})}return{title:"Pipeline4 High Density Repair",lines:t,circles:e}}},mW=1e-6,YBt=({startGap:t,endGap:e,segmentGap:n,requiredGap:o})=>{const i=t<o&&e>=o-mW&&n>=t-mW,r=e<o&&t>=o-mW&&n>=e-mW,s=t<o&&e<o&&n>=Math.min(t,e)-mW;return i||r||s},O0o=class{minClearance;rootsByConnection=new Map;sameNetCache=new Map;segments=[];vias=[];segmentIndexesByLayer;viaIndex;constructor({hdRoutes:t,minClearance:e=.1}){this.minClearance=e;for(const n of t)this.addRoute(n);this.buildSpatialIndexes()}addRoute(t){const e=this.rootsByConnection.get(t.connectionName)??new Set;e.add(t.rootConnectionName??t.connectionName),this.rootsByConnection.set(t.connectionName,e),this.sameNetCache.clear();for(let n=0;n<t.route.length-1;n+=1){const o=t.route[n],i=t.route[n+1];if(o.z!==i.z||o.insideJumperPad&&i.insideJumperPad)continue;const r={connectionName:t.connectionName,start:o,end:i,traceThickness:t.traceThickness};this.segments.push(r),this.insertSegmentIntoSpatialIndex(r)}for(const n of t.vias){const o={connectionName:t.connectionName,x:n.x,y:n.y,diameter:t.viaDiameter};this.vias.push(o),this.insertViaIntoSpatialIndex(o)}}insertSegmentIntoSpatialIndex(t){if(!this.segmentIndexesByLayer)return;let e=this.segmentIndexesByLayer.get(t.start.z);e||(e=new jz,this.segmentIndexesByLayer.set(t.start.z,e));const n=t.traceThickness/2;e.insert(t,Math.min(t.start.x,t.end.x)-n,Math.min(t.start.y,t.end.y)-n,Math.max(t.start.x,t.end.x)+n,Math.max(t.start.y,t.end.y)+n)}insertViaIntoSpatialIndex(t){if(!this.viaIndex)return;const e=t.diameter/2;this.viaIndex.insert(t,t.x-e,t.y-e,t.x+e,t.y+e)}buildSpatialIndexes(){this.segmentIndexesByLayer=new Map;const t=new Map;for(const e of this.segments){const n=t.get(e.start.z);n?n.push(e):t.set(e.start.z,[e])}for(const[e,n]of t){const o=new jz;o.bulkLoad(n.map(i=>{const r=i.traceThickness/2;return{item:i,minX:Math.min(i.start.x,i.end.x)-r,minY:Math.min(i.start.y,i.end.y)-r,maxX:Math.max(i.start.x,i.end.x)+r,maxY:Math.max(i.start.y,i.end.y)+r}})),this.segmentIndexesByLayer.set(e,o)}this.viaIndex=new jz,this.viaIndex.bulkLoad(this.vias.map(e=>{const n=e.diameter/2;return{item:e,minX:e.x-n,minY:e.y-n,maxX:e.x+n,maxY:e.y+n}}))}areSameNet(t,e){if(t===e)return!0;const n=this.sameNetCache.get(t)?.get(e);if(n!==void 0)return n;const o=this.rootsByConnection.get(t),i=this.rootsByConnection.get(e);let r=!1;if(o&&i){for(const a of o)if(i.has(a)){r=!0;break}}let s=this.sameNetCache.get(t);return s||(s=new Map,this.sameNetCache.set(t,s)),s.set(e,r),r}isSegmentClear({connectionName:t,start:e,end:n,traceThickness:o}){const i=o/2,r=this.minClearance+i,s=Math.min(e.x,n.x)-r,a=Math.min(e.y,n.y)-r,A=Math.max(e.x,n.x)+r,c=Math.max(e.y,n.y)+r,l=this.segmentIndexesByLayer?.get(e.z)?.search(s,a,A,c)??[];for(const g of l){if(this.areSameNet(t,g.connectionName))continue;const h=this.minClearance+i+g.traceThickness/2,d=qQ(e,n,g.start,g.end);if(d<h&&!YBt({startGap:wc(e,g.start,g.end),endGap:wc(n,g.start,g.end),segmentGap:d,requiredGap:h}))return!1}const u=this.viaIndex?.search(s,a,A,c)??[];for(const g of u){if(this.areSameNet(t,g.connectionName))continue;const h=this.minClearance+i+g.diameter/2,d=wc(g,e,n);if(d<h&&!YBt({startGap:Math.hypot(e.x-g.x,e.y-g.y),endGap:Math.hypot(n.x-g.x,n.y-g.y),segmentGap:d,requiredGap:h}))return!1}return!0}},_C=1e-9,ESe=1.25,Mv=(t,e)=>t<e?-1:t>e?1:0,v7=(t,e)=>Mv(t.z,e.z)||Mv(t.x,e.x)||Mv(t.y,e.y),UBt=t=>`${t.z.toFixed(6)}:${t.x.toFixed(6)}:${t.y.toFixed(6)}`,KBt=t=>{const e=t.route.map(UBt).join("|"),n=[...t.route].reverse().map(UBt).join("|");return e<=n?e:n},_W=(t,e)=>{const n=t.connectionName.localeCompare(e.connectionName);if(n!==0)return n;const o=(t.rootConnectionName??"").localeCompare(e.rootConnectionName??"");if(o!==0)return o;const i=KBt(t).localeCompare(KBt(e));return i!==0?i:Mv(t.traceThickness,e.traceThickness)||Mv(t.viaDiameter,e.viaDiameter)||Mv(t.route.length,e.route.length)||Mv(t.vias.length,e.vias.length)||Mv(t.jumpers?.length??0,e.jumpers?.length??0)},VBt=1e5,pN=.001,zBt=1.000000001,BSe=class extends yr{getSolverName(){return"SingleHighDensityRouteStitchSolver3"}mergedHdRoute;remainingHdRoutes;start;end;colorMap;allowedLayerTransitionPointKeys;isStitchSegmentClear;stitchClearanceMode;isPlanarStitchClear(t,e){return this.isStitchSegmentClear({connectionName:this.mergedHdRoute.connectionName,start:t,end:e,traceThickness:this.mergedHdRoute.traceThickness})}constructor(t){super();const e=[...t.hdRoutes].sort(_W);if(this.remainingHdRoutes=e,this.colorMap=t.colorMap??{},this.allowedLayerTransitionPointKeys=t.allowedLayerTransitionPointKeys,this.isStitchSegmentClear=t.isStitchSegmentClear,this.stitchClearanceMode=t.stitchClearanceMode,e.length===0){this.start=t.start,this.end=t.end;const h=t.defaultTraceThickness??.15,d=[{x:t.start.x,y:t.start.y,z:t.start.z}],p=[];if(t.start.z!==t.end.z){if(t.allowedLayerTransitionPointKeys&&!t.allowedLayerTransitionPointKeys.has(IL(t.start)))return this.failed=!0,void(this.error=`Layer transition at ${IL(t.start)} is not allowed`);d.push({x:t.start.x,y:t.start.y,z:t.end.z}),p.push({x:t.start.x,y:t.start.y})}const m=d[d.length-1],_={x:t.end.x,y:t.end.y,z:t.end.z},f={connectionName:t.connectionName,start:m,end:_,traceThickness:h};return no(m,_)>pN&&!this.isStitchSegmentClear(f)&&this.stitchClearanceMode==="require_clear"?(this.failed=!0,void(this.error=`Terminal stitch for "${t.connectionName}" violates copper clearance`)):(d.push(_),this.mergedHdRoute={connectionName:t.connectionName,...t.preserveTerminalPcbPortIds&&t.start.pcb_port_id?{startPcbPortId:t.start.pcb_port_id}:{},...t.preserveTerminalPcbPortIds&&t.end.pcb_port_id?{endPcbPortId:t.end.pcb_port_id}:{},rootConnectionName:e[0]?.rootConnectionName,route:d,vias:p,jumpers:[],viaDiameter:t.defaultViaDiameter??.3,traceThickness:h},void(this.solved=!0))}const n=new Set((t.preserveTerminalPcbPortIds?[t.start.pcb_port_id,t.end.pcb_port_id]:[]).filter(h=>h!==void 0));if(t.preserveTerminalPcbPortIds&&t.start.pcb_port_id&&t.start.pcb_port_id===t.end.pcb_port_id)throw new Error(`SingleHighDensityRouteStitchSolver3 received duplicate PCB terminal "${t.start.pcb_port_id}" for "${t.connectionName}"`);const o=e.flatMap(h=>[h.startPcbPortId,h.endPcbPortId]).filter(h=>h!==void 0);if(n.size>0){for(const h of o)if(!n.has(h))throw new Error(`SingleHighDensityRouteStitchSolver3 found unknown PCB terminal "${h}" on "${t.connectionName}"`)}let i=1/0,r=e[0],s="start-to-end";for(const h of e){const d=h.route[0],p=h.route[h.route.length-1],m=no(t.start,d),_=no(t.start,p),f=no(t.end,d),I=no(t.end,p),C=Math.min(m,_,f,I);(C<i-_C||Math.abs(C-i)<=_C&&_W(h,r)<0)&&(i=C,r=h,s=Math.min(f,I)<Math.min(m,_)-_C||Math.abs(Math.min(f,I)-Math.min(m,_))<=_C&&v7(t.end,t.start)<0?"end-to-start":"start-to-end")}s==="start-to-end"?(this.start=t.start,this.end=t.end):(this.start=t.end,this.end=t.start);const a=r.route[0],A=r.route[r.route.length-1],c=no(this.start,a),l=no(this.start,A),u=c<l-_C||Math.abs(c-l)<=_C&&v7(a,A)<=0?a:A,g=u===a?r.startPcbPortId:r.endPcbPortId;if(g&&this.start.pcb_port_id&&g!==this.start.pcb_port_id)throw new Error(`SingleHighDensityRouteStitchSolver3 terminal identity disagrees with route orientation for "${t.connectionName}"`);this.mergedHdRoute={connectionName:t.connectionName,...t.preserveTerminalPcbPortIds&&this.start.pcb_port_id?{startPcbPortId:this.start.pcb_port_id}:{},...t.preserveTerminalPcbPortIds&&this.end.pcb_port_id?{endPcbPortId:this.end.pcb_port_id}:{},rootConnectionName:r.rootConnectionName,route:[{x:this.start.x,y:this.start.y,z:u.z}],vias:[],jumpers:[],viaDiameter:r.viaDiameter,traceThickness:r.traceThickness}}getDisjointedRoute(){for(const t of this.remainingHdRoutes)if([t.route[0],t.route[t.route.length-1]].some(e=>!this.remainingHdRoutes.some(n=>n===t?!1:[n.route[0],n.route[n.route.length-1]].some(o=>o.z===e.z&&no(e,o)<.001))))return{firstRoute:t};return{firstRoute:this.remainingHdRoutes[0]}}_step(){if(this.remainingHdRoutes.length===0){const a=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1],A={...this.end,z:a.z},c=no(a,A);if(c>pN&&c<=ESe){if(!this.isPlanarStitchClear(a,A)&&this.stitchClearanceMode==="require_clear")return this.failed=!0,void(this.error=`Terminal stitch for "${this.mergedHdRoute.connectionName}" violates copper clearance`);this.mergedHdRoute.route.push({x:this.end.x,y:this.end.y,z:a.z})}return void(this.solved=!0)}const t=this.mergedHdRoute.route[this.mergedHdRoute.route.length-1];let e=-1,n="first",o=1/0,i=!1;for(let a=0;a<this.remainingHdRoutes.length;a++){const A=this.remainingHdRoutes[a],c=A.route[0],l=A.route[A.route.length-1],u=no(t,c),g=no(t,l);let h=1/0;if(t.z===c.z){if(u<pN)h=u;else if(u<=1){const p=this.isPlanarStitchClear(t,c);p||this.stitchClearanceMode==="prefer_clear"?h=VBt+(p?0:zBt)+u:i=!0}}else u<pN&&(!this.allowedLayerTransitionPointKeys||this.allowedLayerTransitionPointKeys.has(IL(c)))&&(h=1e3+u);h<o&&(o=h,e=a,n="first");let d=1/0;if(t.z===l.z){if(g<pN)d=g;else if(g<=1){const p=this.isPlanarStitchClear(t,l);p||this.stitchClearanceMode==="prefer_clear"?d=VBt+(p?0:zBt)+g:i=!0}}else g<pN&&(!this.allowedLayerTransitionPointKeys||this.allowedLayerTransitionPointKeys.has(IL(l)))&&(d=1e3+g);d<o&&(o=d,e=a,n="last")}if(e===-1)return i?(this.failed=!0,void(this.error=`Route stitch for "${this.mergedHdRoute.connectionName}" violates copper clearance`)):void(this.remainingHdRoutes=[]);const r=this.remainingHdRoutes[e];let s;this.remainingHdRoutes.splice(e,1),s=n==="first"?r.route:(a=>{const A=[...a].reverse().map(c=>{const{toNextSegmentType:l,...u}=c;return u});for(let c=0;c<a.length-1;c++){const l=a[c]?.toNextSegmentType;if(!l)continue;const u=a.length-c-2;A[u]={...A[u],toNextSegmentType:l}}return A})(r.route),s.length>0&&no(t,s[0])<pN&&t.z===s[0].z?(s[0].toNextSegmentType&&(t.toNextSegmentType=s[0].toNextSegmentType),this.mergedHdRoute.route.push(...s.slice(1))):this.mergedHdRoute.route.push(...s),this.mergedHdRoute.vias.push(...r.vias),r.jumpers&&this.mergedHdRoute.jumpers.push(...r.jumpers)}visualize(){const t={points:[],lines:[],circles:[],rects:[],title:"Single High Density Route Stitch Solver 3"};if(t.points?.push({x:this.start.x,y:this.start.y,color:"green",label:"Start"},{x:this.end.x,y:this.end.y,color:"red",label:"End"}),this.mergedHdRoute&&this.mergedHdRoute.route.length>1){t.lines?.push({points:this.mergedHdRoute.route.map(e=>({x:e.x,y:e.y})),strokeColor:"green"});for(const e of this.mergedHdRoute.route)t.points?.push({x:e.x,y:e.y,color:"green"});for(const e of this.mergedHdRoute.vias)t.circles?.push({center:{x:e.x,y:e.y},radius:this.mergedHdRoute.viaDiameter/2,fill:"green"});if(this.mergedHdRoute.jumpers&&this.mergedHdRoute.jumpers.length>0){const e=_x(this.mergedHdRoute.jumpers,{color:"green",label:this.mergedHdRoute.connectionName});t.rects.push(...e.rects??[]),t.lines.push(...e.lines??[])}}for(const e of this.remainingHdRoutes){t.lines?.push({points:e.route.map(n=>({x:n.x,y:n.y})),strokeColor:"orange"});for(const n of e.route)t.points?.push({x:n.x,y:n.y,color:"orange"});for(const n of e.vias)t.circles?.push({center:{x:n.x,y:n.y},radius:e.viaDiameter/2,fill:"orange"});if(e.jumpers&&e.jumpers.length>0){const n=_x(e.jumpers,{color:"orange",label:e.connectionName});t.rects.push(...n.rects??[]),t.lines.push(...n.lines??[])}}return t}},G0o=class{constructor(t=!1){this.preferSameLayerTerminalEndpoints=t}preferSameLayerTerminalEndpoints;endpointClusters=new Map;getEndpointKey(t,e){const n=this.endpointClusters.get(t)??[];let o,i=1/0;for(const s of n){if(s.point.z!==e.z)continue;const a=no(s.point,e);a<=.1&&(a<i-_C||Math.abs(a-i)<=_C&&(!o||v7(s.point,o.point)<0))&&(o=s,i=a)}if(o)return o.key;const r=`${t}:endpoint_${n.length}`;return n.push({key:r,point:{x:e.x,y:e.y,z:e.z}}),this.endpointClusters.set(t,n),r}getClusters(t){return this.endpointClusters.get(t)??[]}getClosestEndpointKey(t,e,n){const o=e.flatMap(c=>[c.route[0],c.route[c.route.length-1]]),i=o.filter(c=>c.z===n.z),r=this.preferSameLayerTerminalEndpoints&&i.length>0?i:o;let s=null,a=null,A=1/0;for(const c of r){const l=no(n,c),u=this.getEndpointKey(t,c);(l<A-_C||Math.abs(l-A)<=_C&&(s===null||u.localeCompare(s)<0||u===s&&a!==null&&v7(c,a)<0))&&(A=l,s=u,a=c)}return s}},jAe=(t,e,n)=>{const o=t.get(e)??[];o.some(i=>i.nextHash===n.nextHash&&i.routeIndex===n.routeIndex)||(o.push(n),t.set(e,o))},Y0o=t=>{const e=[...t.possibleEndpoints].sort(v7),n=e.reduce((r,s)=>{const a=no(s,t.globalStart),A=no(r,t.globalStart);return a<A-_C||Math.abs(a-A)<=_C&&v7(s,r)<0?s:r}),o=e.filter(r=>r!==n),i=(o.length>0?o:t.possibleEndpoints).reduce((r,s)=>{const a=no(s,t.globalEnd),A=no(r,t.globalEnd);return a<A-_C||Math.abs(a-A)<=_C&&v7(s,r)<0?s:r});return{start:n,end:i}},JBt=t=>{const e=[...t.terminals].sort(v7);let n=e[0],o=no(t.islandEndpoint,n);for(const i of e.slice(1)){const r=no(t.islandEndpoint,i);(r<o-_C||Math.abs(r-o)<=_C&&v7(i,n)<0)&&(n=i,o=r)}return o<=ESe?n:t.islandEndpoint},bSe=t=>{if(t.hdRoutes.length<=2)return t.hdRoutes;const e=[...t.hdRoutes].sort(_W),n=t.endpointIndex.getClosestEndpointKey(t.connectionName,e,t.start),o=t.endpointIndex.getClosestEndpointKey(t.connectionName,e,t.end);if(!n||!o||n===o)return e;const i=new Map;for(let g=0;g<e.length;g++){const h=e[g],d=t.endpointIndex.getEndpointKey(t.connectionName,h.route[0]),p=t.endpointIndex.getEndpointKey(t.connectionName,h.route[h.route.length-1]);jAe(i,d,{nextHash:p,routeIndex:g}),jAe(i,p,{nextHash:d,routeIndex:g})}const r=[...t.endpointIndex.getClusters(t.connectionName)].sort((g,h)=>v7(g.point,h.point));for(let g=0;g<r.length;g++){const h=r[g];for(let d=g+1;d<r.length;d++){const p=r[d];h.point.z===p.point.z&&(no(h.point,p.point)>1||(jAe(i,h.key,{nextHash:p.key,routeIndex:null}),jAe(i,p.key,{nextHash:h.key,routeIndex:null})))}}for(const[g,h]of i.entries())i.set(g,[...h].sort((d,p)=>{if(d.routeIndex===null&&p.routeIndex!==null)return 1;if(d.routeIndex!==null&&p.routeIndex===null)return-1;if(d.routeIndex!==null&&p.routeIndex!==null){const m=_W(e[d.routeIndex],e[p.routeIndex]);if(m!==0)return m}return d.nextHash.localeCompare(p.nextHash)}));const s=[n],a=new Set([n]),A=new Map;for(;s.length>0;){const g=s.shift();if(g===o)break;for(const h of i.get(g)??[])a.has(h.nextHash)||(a.add(h.nextHash),A.set(h.nextHash,{prevHash:g,routeIndex:h.routeIndex}),s.push(h.nextHash))}if(!a.has(o))return e;const c=[];let l=o;for(;l!==n;){const g=A.get(l);if(!g)return e;g.routeIndex!==null&&c.push(g.routeIndex),l=g.prevHash}if(c.length===0)return t.hdRoutes;const u=c.reverse().map(g=>e[g]);return u.length>0&&!t.canStitchBetweenTerminals({connectionName:t.connectionName,hdRoutes:u,start:t.start,end:t.end})?e:u},$Ae=class extends yr{getSolverName(){return"MultipleHighDensityRouteStitchSolver3"}unsolvedRoutes;activeSolver=null;mergedHdRoutes=[];colorMap={};defaultTraceThickness;defaultViaDiameter;allowedLayerTransitionPointKeys;preserveTerminalPcbPortIds;endpointIndex;clearanceValidator;canStitchBetweenTerminals(t){const e=new BSe({connectionName:t.connectionName,hdRoutes:t.hdRoutes,start:t.start,end:t.end,colorMap:this.colorMap,defaultTraceThickness:this.defaultTraceThickness,defaultViaDiameter:this.defaultViaDiameter,allowedLayerTransitionPointKeys:this.allowedLayerTransitionPointKeys,preserveTerminalPcbPortIds:this.preserveTerminalPcbPortIds,isStitchSegmentClear:s=>this.clearanceValidator.isSegmentClear(s),stitchClearanceMode:"require_clear"});for(;!e.solved&&!e.failed&&e.iterations<e.MAX_ITERATIONS;)e.step();if(e.failed)return!1;const n=e.mergedHdRoute.route[0],o=e.mergedHdRoute.route[e.mergedHdRoute.route.length-1],i=no(n,t.start)+no(o,t.end),r=no(n,t.end)+no(o,t.start);return Math.min(i,r)<=ESe}getSharedRootPathRoutes(t){const e=t.rootConnectionName;if(!e)return null;const n=new Set(t.hdRoutes),o=t.allHdRoutes.filter(r=>(r.rootConnectionName??r.connectionName)===e);if(o.every(r=>n.has(r)))return null;const i=bSe({connectionName:t.connectionName,hdRoutes:o,start:t.start,end:t.end,endpointIndex:this.endpointIndex,canStitchBetweenTerminals:r=>this.canStitchBetweenTerminals(r)});return!i.some(r=>!n.has(r))||i.length>=o.length?null:i}constructor(t){super(),this.endpointIndex=new G0o(t.preferSameLayerTerminalEndpoints),this.colorMap=t.colorMap??{},this.allowedLayerTransitionPointKeys=t.allowedLayerTransitionPointKeys,this.preserveTerminalPcbPortIds=t.preserveTerminalPcbPortIds??!1;const e=[...t.hdRoutes].sort(_W);this.clearanceValidator=new O0o({hdRoutes:e});const n=e[0];this.defaultTraceThickness=n?.traceThickness??.15,this.defaultViaDiameter=n?.viaDiameter??t.defaultViaDiameter??.3;const o=new W7e({}),i=[],r=new Map;for(let A=0;A<e.length;A++){const c=e[A],l=c.route[0],u=c.route[c.route.length-1];i.push([`route_island_${A}`,this.endpointIndex.getEndpointKey(c.connectionName,l),this.endpointIndex.getEndpointKey(c.connectionName,u)])}o.addConnections(i);for(const A of i)for(const c of A.slice(1))r.set(c,(r.get(c)??0)+1);this.unsolvedRoutes=[];const s=Array.from(new Set(Object.values(o.idToNetMap)));for(const A of s){const c=o.getIdsConnectedToNet(A),l=e.filter((I,C)=>c.includes(`route_island_${C}`));if(l.length===0)continue;const u=t.connections.find(I=>I.name===l[0].connectionName),g=l.flatMap(I=>[I.route[0],I.route[I.route.length-1]]),h=new Map,d=[];for(const I of g){const C=this.endpointIndex.getEndpointKey(l[0].connectionName,I);h.has(C)||h.set(C,I),r.get(C)===1&&d.push(I)}const p=d.length>0?d:[...h.values()];if(p.length===0)continue;let m,_;if(p.length>=2){const I={...u.pointsToConnect[0],z:Kr(tI(u.pointsToConnect[0]),t.layerCount)},C={...u.pointsToConnect[1],z:Kr(tI(u.pointsToConnect[1]),t.layerCount)};({start:m,end:_}=Y0o({possibleEndpoints:p,globalStart:I,globalEnd:C})),no(m,u.pointsToConnect[1])<no(_,u.pointsToConnect[0])&&([m,_]=[_,m]),m=JBt({islandEndpoint:m,terminals:[I,C]}),_=JBt({islandEndpoint:_,terminals:[I,C]})}else m={...u.pointsToConnect[0],z:Kr(tI(u.pointsToConnect[0]),t.layerCount)},_={...u.pointsToConnect[1],z:Kr(tI(u.pointsToConnect[1]),t.layerCount)};const f=bSe({connectionName:l[0].connectionName,hdRoutes:l,start:m,end:_,endpointIndex:this.endpointIndex,canStitchBetweenTerminals:I=>this.canStitchBetweenTerminals(I)});this.unsolvedRoutes.push({connectionName:l[0].connectionName,hdRoutes:f,start:m,end:_})}const a=new Map;for(const A of this.unsolvedRoutes){const c=a.get(A.connectionName);c?c.push(A):a.set(A.connectionName,[A])}this.unsolvedRoutes=Array.from(a.entries()).flatMap(([A,c])=>{const l=t.connections.find(_=>_.name===A),u=c.some(_=>_.hdRoutes.some(f=>f.route.length<2)),g=c.length>1&&(_=>{for(let f=0;f<_.length;f++)for(let I=f+1;I<_.length;I++){const C=[_[f].start,_[f].end],y=[_[I].start,_[I].end];for(const x of C)for(const E of y)if(x.z===E.z&&no(x,E)<=1)return!0}return!1})(c);if(!l)return c;const h={...l.pointsToConnect[0],z:Kr(tI(l.pointsToConnect[0]),t.layerCount)},d={...l.pointsToConnect[1],z:Kr(tI(l.pointsToConnect[1]),t.layerCount)},p=c.flatMap(_=>_.hdRoutes),m=c.length>1?this.getSharedRootPathRoutes({connectionName:A,rootConnectionName:l.__rootConnectionNames?.[0]??p[0]?.rootConnectionName,hdRoutes:p,allHdRoutes:e,start:h,end:d}):null;return u||g||m?[{connectionName:A,hdRoutes:m??bSe({connectionName:A,hdRoutes:p,start:h,end:d,endpointIndex:this.endpointIndex,canStitchBetweenTerminals:_=>this.canStitchBetweenTerminals(_)}),start:h,end:d}]:c}),this.MAX_ITERATIONS=1e5}_step(){if(this.activeSolver)return this.activeSolver.step(),void(this.activeSolver.solved?(this.activeSolver instanceof BSe&&(this.clearanceValidator.addRoute(this.activeSolver.mergedHdRoute),this.mergedHdRoutes.push(this.activeSolver.mergedHdRoute)),this.activeSolver=null):this.activeSolver.failed&&(this.failed=!0,this.error=this.activeSolver.error));const t=this.unsolvedRoutes.pop();t?this.activeSolver=new BSe({connectionName:t.connectionName,hdRoutes:t.hdRoutes,start:t.start,end:t.end,colorMap:this.colorMap,defaultTraceThickness:this.defaultTraceThickness,defaultViaDiameter:this.defaultViaDiameter,allowedLayerTransitionPointKeys:this.allowedLayerTransitionPointKeys,preserveTerminalPcbPortIds:this.preserveTerminalPcbPortIds,isStitchSegmentClear:e=>this.clearanceValidator.isSegmentClear(e),stitchClearanceMode:"prefer_clear"}):this.solved=!0}visualize(){const t={points:[],lines:[],circles:[],rects:[],title:"Multiple High Density Route Stitch Solver 3"};if(this.activeSolver){const e=this.activeSolver.visualize();e.points?.length&&t.points?.push(...e.points),e.lines?.length&&t.lines?.push(...e.lines),e.circles?.length&&t.circles?.push(...e.circles),e.rects?.length&&(t.rects||(t.rects=[]),t.rects.push(...e.rects))}for(const[e,n]of this.mergedHdRoutes.entries()){const o=this.colorMap[n.connectionName]??`hsl(120, 100%, ${40+10*e%40}%)`;for(let i=0;i<n.route.length-1;i++){const r=n.route[i],s=n.route[i+1],a=r.z!==0?Es(o,.5):o;t.lines?.push({points:[{x:r.x,y:r.y},{x:s.x,y:s.y}],strokeColor:a,strokeWidth:n.traceThickness})}for(const i of n.route){const r=i.z!==0?Es(o,.5):o;t.points?.push({x:i.x,y:i.y,color:r})}for(const i of n.vias)t.circles?.push({center:{x:i.x,y:i.y},radius:n.viaDiameter/2,fill:o});if(n.jumpers&&n.jumpers.length>0){const i=_x(n.jumpers,{color:o,label:n.connectionName});t.rects.push(...i.rects??[]),t.lines.push(...i.lines??[])}}return t}},WBt=t=>(t%360+360)%360,U0o=(t,e)=>{const{ccwRotationDegrees:n,...o}=t,i=(r=>{const s=WBt(r),a=[0,90,180,270];for(const A of a)if(Math.min(Math.abs(s-A),360-Math.abs(s-A))<=.01)return A;return null})(e);return i===90||i===270?{...o,width:t.height,height:t.width}:o},jBt=t=>"layers"in t?t.layers:[t.layer],$Bt=(t,e)=>!(jBt(t).length>0&&!jBt(t).some(n=>e.layers.includes(n)))&&y_t(t,Pg(e)),qBt=(t,e)=>{const{minX:n,maxX:o,minY:i,maxY:r}=Pg(e);return{x:Math.max(n,Math.min(o,t.x)),y:Math.max(i,Math.min(r,t.y))}},K0o=(t,e)=>t.obstacleId??`${t.componentId??"obstacle"}_${e}`;function XBt(t,e=2){const{center:n,width:o,height:i,rotation:r}=t,s=[],a=Math.max(1,Math.ceil(e)),A=r*Math.PI/180,c=Math.cos(A),l=Math.sin(A);if(o>=i){const u=o/a;for(let g=0;g<a;g++){const h=(g-a/2+.5)*u,d=h*c,p=h*l,m=Math.abs(u*c)+Math.abs(i*l),_=Math.abs(u*l)+Math.abs(i*c);s.push({center:{x:n.x+d,y:n.y+p},width:m,height:_})}}else{const u=i/a;for(let g=0;g<a;g++){const h=(g-a/2+.5)*u,d=-h*l,p=h*c,m=Math.abs(o*c)+Math.abs(u*l),_=Math.abs(o*l)+Math.abs(u*c);s.push({center:{x:n.x+d,y:n.y+p},width:m,height:_})}}return s}var ZBt=t=>{if(t.type==="oval")return ZBt({...t,type:"rect"});const e=t.ccwRotationDegrees;if(typeof e!="number"||!Number.isFinite(e))return[t];if((A=>{const c=WBt(A);return[0,90,180,270].some(l=>Math.min(Math.abs(c-l),360-Math.abs(c-l))<=.01)})(e))return[U0o(t,e)];const{ccwRotationDegrees:n,...o}=t,i={center:t.center,width:t.width,height:t.height,rotation:e},r=(A=>{const c=Math.max(A.width,A.height),l=Math.min(A.width,A.height);return A.obstacleId?.startsWith("trace_obstacle_")?Math.max(2,Math.ceil(c/.75)):l<=0?2:c/l<2||l>=.9?null:Math.max(2,Math.ceil(c/.75))})(t),s=t.connectedTo.length>0&&!t.obstacleId?.startsWith("trace_obstacle_")?(A=>{const c=A.rotation*Math.PI/180,l=Math.cos(c),u=Math.sin(c),g=[-1,1].flatMap(S=>[-1,1].map(Q=>{const w=S*(A.width/2),M=Q*(A.height/2);return{x:A.center.x+w*l-M*u,y:A.center.y+w*u+M*l}})),h=[g[0],g[2],g[3],g[1]],d=Math.min(...h.map(S=>S.x)),p=Math.max(...h.map(S=>S.x)),m=Math.min(...h.map(S=>S.y)),_=Math.max(...h.map(S=>S.y)),f=p-d<=_-m?"x":"y",I=f==="x"?d:m,C=f==="x"?p:_,y=Math.max(1,Math.ceil((C-I)/.4)),x=(C-I)/y,E=(S,Q,w)=>{const M=[],k=R=>R[f];for(let R=0;R<S.length;R++){const F=S[R],O=S[(R+1)%S.length],U=k(F),Y=k(O),W=w?U>=Q:U<=Q,te=w?Y>=Q:Y<=Q;if(W&&M.push(F),W===te)continue;const j=(Q-U)/(Y-U);M.push({x:F.x+(O.x-F.x)*j,y:F.y+(O.y-F.y)*j})}return M},B=[];for(let S=0;S<y;S++){const Q=I+S*x,w=S===y-1?C:Q+x,M=E(E(h,Q,!0),w,!1);if(M.length===0)continue;const k=Math.min(...M.map(U=>U.x)),R=Math.max(...M.map(U=>U.x)),F=Math.min(...M.map(U=>U.y)),O=Math.max(...M.map(U=>U.y));B.push({center:{x:(k+R)/2,y:(F+O)/2},width:R-k,height:O-F})}return B})(i):r===null?((A,c)=>{const{center:l,width:u,height:g,rotation:h}=A,d=Math.max(1,Math.ceil(u/c)),p=Math.max(1,Math.ceil(g/c)),m=u/d,_=g/p,f=h*Math.PI/180,I=Math.cos(f),C=Math.sin(f),y=[];for(let x=0;x<d;x++){const E=(x-d/2+.5)*m;for(let B=0;B<p;B++){const S=(B-p/2+.5)*_;y.push({center:{x:l.x+E*I-S*C,y:l.y+E*C+S*I},width:Math.abs(m*I)+Math.abs(_*C),height:Math.abs(m*C)+Math.abs(_*I)})}}return y})(i,(A=>A.obstacleId?.startsWith("trace_obstacle_")?.75:.4)(t)):t.obstacleId?.startsWith("trace_obstacle_")?XBt(i,r):((A,c)=>{const{center:l,width:u,height:g,rotation:h}=A,d=Math.max(u,g),p=Math.min(u,g),m=Math.max(1,Math.ceil(c)),_=d/m,f=h*Math.PI/180,I=Math.cos(f),C=Math.sin(f),y=Math.max(_,.75*p),x=[];for(let E=0;E<m;E++){const B=(E-m/2+.5)*_,S=u>=g?B*I:-B*C,Q=u>=g?B*C:B*I;x.push({center:{x:l.x+S,y:l.y+Q},width:y,height:y})}return x})(i,r),a=t.connectedTo.length>0?s.reduce((A,c,l)=>{const u=s[A],g=(u.center.x-t.center.x)**2+(u.center.y-t.center.y)**2;return(c.center.x-t.center.x)**2+(c.center.y-t.center.y)**2<g?l:A},0):-1;return s.map((A,c)=>({...o,obstacleId:c===a?o.obstacleId:o.obstacleId?`${o.obstacleId}_approx_${c}`:void 0,connectedTo:o.connectedTo,center:A.center,width:A.width,height:A.height}))},e9t=t=>{const e=new Map,n=new Map,o=new Map;for(const[r,s]of t.obstacles.entries()){const a=ZBt(s),A=K0o(s,r);n.set(A,a),o.set(A,s);for(const c of a){const l=[c.center.x.toFixed(6),c.center.y.toFixed(6),c.width.toFixed(6),c.height.toFixed(6),c.layers.join(",")].join(":"),u=e.get(l);u?u.connectedTo=[...new Set([...u.connectedTo,...c.connectedTo])]:e.set(l,c)}}const i=t.connections.map(r=>({...r,pointsToConnect:r.pointsToConnect.map(s=>{const a=(A=>[A.pointId,A.pcb_port_id].filter(c=>!!c))(s);if(a.length===0)return s;for(const[A,c]of o){if(!a.some(h=>c.connectedTo.includes(h))||!$Bt(s,c))continue;const l=n.get(A)??[];if(l.length===0)continue;if(l.some(h=>$Bt(s,h)))return s;let u=l[0],g=Number.POSITIVE_INFINITY;for(const h of l){const d=no(qBt(s,h),s);d<g&&(g=d,u=h)}return{...s,...qBt(s,u)}}return s})}));return{...t,connections:i,obstacles:[...e.values()]}},qAe=.001,t9t=t=>t.route_type==="wire",V0o=t=>t.route_type==="via",z0o=t=>t.route_type==="through_obstacle",n9t=(t,e,n)=>{const o=Kr(t,n),i=Kr(e,n),r=Math.min(o,i),s=Math.max(o,i);return Array.from({length:s-r+1},(a,A)=>Kh(r+A,n))},o9t=({obstacleId:t,start:e,end:n,width:o,layer:i,connectedTo:r})=>{const s=n.x-e.x,a=n.y-e.y,A=Math.hypot(s,a);return A<=qAe?null:{obstacleId:t,type:"rect",layers:[i],center:{x:(e.x+n.x)/2,y:(e.y+n.y)/2},width:A,height:Math.max(o,qAe),ccwRotationDegrees:180*Math.atan2(a,s)/Math.PI,connectedTo:r}};function J0o(t){if(!t)return t;const e=(n=>{if(!n)return[];const o=[],i=om(n);for(const[r,s]of(n.traces??[]).entries()){const a=s.connectsTo??[];for(let A=0;A<s.route.length;A++){const c=s.route[A];if(V0o(c)){const l=c.via_diameter??i.padDiameter;o.push({obstacleId:`trace_obstacle_${s.pcb_trace_id}_${r}_${A}_via`,type:"rect",layers:n9t(c.from_layer,c.to_layer,n.layerCount),center:{x:c.x,y:c.y},width:Math.max(l,qAe),height:Math.max(l,qAe),connectedTo:a});continue}if(z0o(c)){const l=o9t({obstacleId:`trace_obstacle_${s.pcb_trace_id}_${r}_${A}_through`,start:c.start,end:c.end,width:c.width,layer:c.from_layer,connectedTo:a});l&&(l.layers=n9t(c.from_layer,c.to_layer,n.layerCount),o.push(l))}}for(let A=0;A<s.route.length-1;A++){const c=s.route[A],l=s.route[A+1];if(!t9t(c)||!t9t(l)||c.layer!==l.layer)continue;const u=o9t({obstacleId:`trace_obstacle_${s.pcb_trace_id}_${r}_${A}_wire`,start:c,end:l,width:c.width,layer:c.layer,connectedTo:a});u&&o.push(u)}}return o})(t);return e.length===0?t:{...t,obstacles:[...t.obstacles??[],...e]}}function i9t(t,e){const n=(function(o,i){const r=Hz(o.__zLayers??o.zLayers??[],i);if(r.length>0)return r;const s=Oz(o.layers,i);if(s.length>0)return s;throw new Error(`Obstacle "${o.obstacleId??"unknown"}" has no layers on this ${i}-layer board`)})(t,e);return{...t,layers:n.map(o=>Kh(o,e)),zLayers:n,__zLayers:n}}function mN(t){return{...t,obstacles:t.obstacles.map(e=>i9t(e,t.layerCount)),jumpers:t.jumpers?.map(e=>({...e,pads:e.pads.map(n=>i9t(n,t.layerCount))}))}}var r9t=t=>{const e=t.obstacles.filter(i=>!((r,s)=>!(a=>(a.connectedTo?.length??0)>0||(a.offBoardConnectsTo?.length??0)>0||a.netIsAssignable===!0)(r)&&(s.outline&&s.outline.length>=3?!Nse(r,s.outline):!WF({minX:r.center.x-r.width/2,maxX:r.center.x+r.width/2,minY:r.center.y-r.height/2,maxY:r.center.y+r.height/2},s.bounds)))(i,t)),n=e.length!==t.obstacles.length,o=n&&t.outline&&t.outline.length>=3?(i=>{if(i.width&&i.height&&i.center){const u=i.width/2,g=i.height/2;return{minX:i.center.x-u,minY:i.center.y-g,maxX:i.center.x+u,maxY:i.center.y+g,width:i.width,height:i.height,center:{x:i.center.x,y:i.center.y}}}if(!i.outline||i.outline.length===0)throw new Error("Unable to compute board bounds. pcb_board must include width/height/center or a non-empty outline.");let r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(const u of i.outline)r=Math.min(r,u.x),s=Math.min(s,u.y),a=Math.max(a,u.x),A=Math.max(A,u.y);const c=a-r,l=A-s;return{minX:r,minY:s,maxX:a,maxY:A,width:c,height:l,center:{x:r+c/2,y:s+l/2}}})({center:{x:0,y:0},num_layers:t.layerCount,outline:t.outline}):t.bounds;return n?{...t,obstacles:e,bounds:o}:t},XAe=class extends yr{constructor(t,e={}){super(),this.inputSrj=t,this.visualizationOptions=e,this.MAX_ITERATIONS=1}inputSrj;visualizationOptions;outputSrj;_step(){const t=mN(this.inputSrj),e=J0o(t)??t,n=e9t(r9t(e));this.outputSrj=mN(n),this.solved=!0}getOutputSimpleRouteJson(){if(!this.outputSrj)throw new Error("PreprocessSimpleRouteJsonSolver has not solved yet");return this.outputSrj}getConstructorParams(){return[this.inputSrj,this.visualizationOptions]}visualize(){return this.outputSrj?Il(mx({...this.outputSrj,traces:[]},this.visualizationOptions),ab({srj:this.outputSrj,visualizationOptions:this.visualizationOptions})):{lines:[],points:[],rects:[],circles:[]}}};function oI(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var s9t=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e,this.originalSrj=t,this.opts={...e};const n=this.opts;if(this.effort=n.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=n.maxNodeDimension??16,this.maxNodeRatio=n.maxNodeRatio??6,this.minNodeArea=n.minNodeArea??.1**2,this.setSimpleRouteJson(t),n.capacityDepth===void 0){const o=this.srj.bounds.maxX-this.srj.bounds.minX,i=this.srj.bounds.maxY-this.srj.bounds.minY,r=Math.max(o,i),s=n.targetMinCapacity??.5;n.capacityDepth=$Q(r,s)}this.cacheProvider=n.cacheProvider===void 0?tB():n.cacheProvider===null?null:n.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;nodeSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityRepairSolver;highDensityStitchSolver;globalDrcForceImproveSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[oI("preprocessSimpleRouteJsonSolver",XAe,t=>[t.originalSrj],{onSolved:t=>{t.setSimpleRouteJson(t.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),oI("escapeViaLocationSolver",FAe,t=>[t.srj,{viaDiameter:t.viaDiameter,minTraceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=>{t.srjWithEscapeViaLocations=t.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),oI("netToPointPairsSolver",rL,t=>{const e=t.srjWithEscapeViaLocations??t.srj;return[e,t.colorMap,JQ(e)]},{onSolved:t=>{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,t.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),oI("nodeSolver",qF,t=>[{simpleRouteJson:t.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:t=>{t.capacityNodes=t.nodeSolver?.getOutput().meshNodes??[]}}),oI("nodeDimensionSubdivisionSolver",vAe,t=>[t.capacityNodes,t.maxNodeDimension,t.maxNodeRatio,t.minNodeArea],{onSolved:t=>{t.capacityNodes=t.nodeDimensionSubdivisionSolver?.outputNodes??[]}}),oI("edgeSolver",WQ,t=>[t.capacityNodes],{onSolved:t=>{t.capacityEdges=t.edgeSolver?.edges}}),oI("availableSegmentPointSolver",kD,t=>[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!0}]),oI("necessaryCrampedPortPointSolver",lJ,t=>[{capacityMeshNodes:t.capacityNodes,sharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),simpleRouteJson:t.srjWithPointPairs}]),oI("portPointPathingSolver",kAe,t=>{const e=t.necessaryCrampedPortPointSolver?.getOutput()??t.availableSegmentPointSolver.getOutput(),{graph:n,connections:o}=uJ({capacityMeshNodes:t.capacityNodes,layerCount:t.srj.layerCount,connectivityMap:t.connMap,segmentPortPoints:e.flatMap(i=>i.portPoints),simpleRouteJsonConnections:t.srjWithPointPairs.connections});return[{graph:n,connections:o,layerCount:t.srj.layerCount,effort:t.effort,minViaPadDiameter:t.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),oI("uniformPortDistributionSolver",kz,t=>[{nodeWithPortPoints:t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:t.minTraceWidth,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]),oI("highDensityRouteSolver",HD,t=>{const e=t.uniformPortDistributionSolver?.getOutput()??[],n=t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],o=(e.length>0?e:n).map(i=>Sft(i)?{...i,availableZ:Array.from({length:t.srj.layerCount},(r,s)=>s)}:i);return t.highDensityNodePortPoints=structuredClone(o),[{nodePortPoints:o,nodePfById:new Map((t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(i=>[i.capacityMeshNodeId,t.portPointPathingSolver?.computeNodePf(i)??null])),colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount,useGrowShrinkHighDensityIntraNodeSolver:!0}]}),oI("highDensityForceImproveSolver",mJ,t=>[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityRouteSolver.routes,colorMap:t.colorMap,totalStepsPerNode:Math.max(20,Math.round(60*t.effort)),nodeAssignmentMargin:t.srj.defaultObstacleMargin??.2}]),oI("highDensityRepairSolver",pW,t=>[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,obstacles:t.srj.obstacles,colorMap:t.colorMap,repairMargin:t.srj.defaultObstacleMargin??.2}]),oI("highDensityStitchSolver",$Ae,t=>[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensityRepairSolver?.getOutput()??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter}]),oI("traceSimplificationSolver",j8,t=>[{hdRoutes:t.highDensityStitchSolver.mergedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,outline:t.srj.outline,defaultViaDiameter:t.viaDiameter,layerCount:t.srj.layerCount,minTraceToPadEdgeClearance:t.srj.minTraceToPadEdgeClearance,iterations:2}]),oI("traceWidthSolver",aL,t=>[{hdRoutes:t.traceSimplificationSolver.simplifiedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,minTraceWidth:t.minTraceWidth,connection:t.srj.connections,obstacleMargin:t.srj.minTraceToPadEdgeClearance??.15,layerCount:t.srj.layerCount}]),oI("globalDrcForceImproveSolver",S7,t=>[{srj:t.srjWithPointPairs,hdRoutes:t.traceWidthSolver.getHdRoutesWithWidths(),effort:t.effort}])];setSimpleRouteJson(t){this.srj=t;const e=om(this.srj);this.viaDiameter=e.padDiameter,this.viaHoleDiameter=e.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.escapeViaLocationSolver?.visualize(),e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeDimensionSubdivisionSolver?.visualize(),i=this.nodeTargetMerger?.visualize(),r=this.singleLayerNodeMerger?.visualize(),s=this.strawSolver?.visualize(),a=this.edgeSolver?.visualize(),A=this.deadEndSolver?.visualize(),c=this.availableSegmentPointSolver?.visualize(),l=this.portPointPathingSolver?.visualize(),u=this.multiSectionPortPointOptimizer?.visualize(),g=this.uniformPortDistributionSolver?.visualize(),h=this.highDensityRouteSolver?.visualize(),d=this.highDensityForceImproveSolver?.visualize(),p=this.highDensityRepairSolver?.visualize(),m=this.highDensityStitchSolver?.visualize(),_=this.traceSimplificationSolver?.visualize(),f=this.necessaryCrampedPortPointSolver?.visualize(),I=(this.highDensityRouteSolver?.visualize(),this.originalSrj),C=I.outline,y=[];if(y.push({points:[{x:I.bounds?.minX??-50,y:I.bounds?.minY??-50},{x:I.bounds?.maxX??50,y:I.bounds?.minY??-50},{x:I.bounds?.maxX??50,y:I.bounds?.maxY??50},{x:I.bounds?.minX??-50,y:I.bounds?.maxY??50},{x:I.bounds?.minX??-50,y:I.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),C&&C.length>=2){const Q=C.map(w=>({x:w.x,y:w.y}));Q.push({...Q[0]}),y.push({points:Q,strokeColor:"rgba(0, 136, 255, 0.95)"})}const x=z8(I),E={points:[...I.connections.flatMap(Q=>Q.pointsToConnect.map(w=>({...w,layer:J8(w,I.layerCount),label:`${Q.name} ${w.pcb_port_id??""}`})))],rects:[...(I.obstacles??[]).filter(Q=>!Q.isCopperPour).map(Q=>({...Q,fill:Q.layers?.includes("top")?"rgba(255,0,0,0.25)":Q.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(Q,I.layerCount),label:x(Q)}))],lines:y},B=ab({srj:I}),S=[Il(E,B),t,e,n,o,i,r,s,a,A,c,f,l,u,g,h?Il(E,h):null,d,p,m,_,this.solved?Il({lines:y},ab({srj:this.originalSrj}),mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...S)}preview(){if(this.highDensityRouteSolver){const t=[];for(let e=this.highDensityRouteSolver.routes.length-1;e>=0;e--){const n=this.highDensityRouteSolver.routes[e];if(t.push({points:n.route.map(o=>({x:o.x,y:o.y})),strokeColor:this.colorMap[n.connectionName]}),t.length>200)break}return{lines:t}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){return this.globalDrcForceImproveSolver?.getOutput()??this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error("Cannot get output before solving is complete");const t=[],e=this._getOutputHdRoutes();for(const n of this.netToPointPairsSolver?.newConnections??[]){const o=n.__netConnectionName??this.originalSrj.connections.find(r=>r.name===n.name)?.__netConnectionName,i=e.filter(r=>r.connectionName===n.name);for(let r=0;r<i.length;r++){const s=i[r],a={type:"pcb_trace",pcb_trace_id:`${n.name}_${r}`,connection_name:o??n.__rootConnectionNames?.[0]??n.name,route:nB(s,this.srj.layerCount,{connectionPoints:n.pointsToConnect,defaultViaHoleDiameter:this.viaHoleDiameter,obstacles:this.srj.obstacles,connMap:this.connMap})};t.push(a)}}return t}getOutputSimpleRouteJson(){return{...this.originalSrj,traces:this.getOutputSimplifiedPcbTraces()}}},a9t=t=>{const e=[];let n=t;for(;n;)e.push(n),n=n.activeSubSolver;for(let o=e.length-1;o>=0;o--){const i=e[o]?.pendingEffects?.filter(Boolean)??[];if(i.length>0)return i}return[]},ZAe=t=>/\/solve\/?$/.test(t)?t.replace(/\/+$/,""):`${t.replace(/\/+$/,"")}/solve`,W0o=(t,e,n)=>{const o=(i=>{const r=new Map;for(const s of i.portPoints)s.rootConnectionName&&!r.has(s.connectionName)&&r.set(s.connectionName,s.rootConnectionName);return r})(t);return e.map(i=>({connectionName:i.connectionName,rootConnectionName:i.rootConnectionName??o.get(i.connectionName)??void 0,traceThickness:i.traceThickness??n.traceWidth,viaDiameter:i.viaDiameter??n.viaDiameter,route:(i.route??[]).map(r=>({x:r.x,y:r.y,z:r.z,...r.insideJumperPad?{insideJumperPad:!0}:{}})),vias:(i.vias??[]).map(r=>({x:r.x,y:r.y})),...i.jumpers?{jumpers:i.jumpers}:{}}))},SSe=(t,e)=>{if(t.length===0)return null;const n=Math.min(Math.max(e,0),1),o=(t.length-1)*n,i=Math.floor(o),r=Math.ceil(o),s=t[i],a=t[r];return i===r?s:s+(a-s)*(o-i)},rH=t=>new Set(t.portPoints.map(e=>e.connectionName)).size,A9t=t=>!(rH(t)<3)&&(t.availableZ?.length??0)!==1,c9t=t=>t?.MULTI_HEAD_POLYLINE_SOLVER?"MultiHeadPolyLineIntraNodeSolver3":t?.CLOSED_FORM_SINGLE_TRANSITION?"SingleTransitionIntraNodeSolver":t?.CLOSED_FORM_TWO_TRACE_SAME_LAYER?"TwoCrossingRoutesHighDensitySolver":t?.CLOSED_FORM_TWO_TRACE_TRANSITION_CROSSING?"SingleTransitionCrossingRouteSolver":t?.HIGH_DENSITY_A01?"HighDensitySolverA01":t?.HIGH_DENSITY_A03?"HighDensitySolverA03":"SingleHighDensityRouteSolver6_VertHorzLayer_FutureCost",l9t=t=>{if(t instanceof T7e){const n=c9t(t.hyperParameters);return t.cacheHit?`${n} [cached]`:n}if(t instanceof Wse)return c9t(t.hyperParameters);if(t&&typeof t=="object"&&"getSolverName"in t&&typeof t.getSolverName=="function")return t.getSolverName();const e=t?.constructor;return typeof e?.name=="string"?e.name:"unknown"},u9t=t=>t.winningSolver?l9t(t.winningSolver):l9t(t),j0o=class extends yr{getSolverName(){return"Pipeline5HdCacheHighDensitySolver"}unsolvedNodePortPoints;colorMap;connMap;viaDiameter;traceWidth;obstacleMargin;obstacles;layerCount;hdCacheBaseUrl;fetchImpl;nodePfById;routes=[];nodeSolveMetadataById=new Map;launchedRemoteSolves=!1;solvedRoutesByNodeIndex=new Map;failedNodeResults=[];remoteResponseMeasurements=[];constructor({nodePortPoints:t,colorMap:e,connMap:n,viaDiameter:o,traceWidth:i,obstacleMargin:r,obstacles:s,layerCount:a,nodePfById:A,hdCacheBaseUrl:c,fetchImpl:l}){super(),this.unsolvedNodePortPoints=t,this.colorMap=e??{},this.connMap=n,this.viaDiameter=o??.3,this.traceWidth=i??.15,this.obstacleMargin=r??.15,this.obstacles=s??[],this.layerCount=a??2,this.hdCacheBaseUrl=c??"https://hd-cache.tscircuit.com",this.fetchImpl=(l??globalThis.fetch).bind(globalThis),this.nodePfById=A instanceof Map?new Map(A):new Map(Object.entries(A??{})),this.pendingEffects=[],this.stats={localDirectNodeCount:0,localSolvedNodeCount:0,localFallbackNodeCount:0,remoteFallbackNodeCount:0,remoteRequestsStarted:0,remoteRequestsCompleted:0,remoteResponseSampleCount:0,remoteKOrderSampleCount:0,slowestRemoteResponseMs:null,slowestRemoteResponseNodeId:null,p50RemoteResponseMs:null,p50RemoteKOrder:null,p95RemoteKOrder:null,remoteSources:{}}}computeProgress(){return this.unsolvedNodePortPoints.length===0?1:this.nodeSolveMetadataById.size/this.unsolvedNodePortPoints.length}solveNodeLocally(t,e,n={}){const o=new Vz({nodeWithPortPoints:t,colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,obstacles:this.obstacles,layerCount:this.layerCount});if(o.solve(),o.failed){const r=o.error??`Local intra-node solver failed for ${t.capacityMeshNodeId}`,s=rH(t);return this.failedNodeResults.push({node:t,error:n.remoteFailure&&n.resolution==="local-fallback"?`Remote solve failed (${n.remoteFailure}); local fallback failed (${r})`:r}),void this.recordNodeSolveMetadata(t,{status:"failed",resolution:"failed",solverType:u9t(o),supervisorType:o.getSolverName(),iterations:o.iterations,pairCount:s,routeCount:0,remoteAttempt:n.resolution==="local-fallback"?{attempted:!0,endpoint:ZAe(this.hdCacheBaseUrl),source:"error",durationMs:n.remoteDurationMs,error:n.remoteFailure??r}:{attempted:!1},error:r})}this.solvedRoutesByNodeIndex.set(e,o.solvedRoutes);const i=rH(t);this.recordNodeSolveMetadata(t,{status:"solved",resolution:n.resolution??"local",solverType:u9t(o),supervisorType:o.getSolverName(),iterations:o.iterations,pairCount:i,routeCount:o.solvedRoutes.length,remoteAttempt:n.resolution==="local-fallback"?{attempted:!0,endpoint:ZAe(this.hdCacheBaseUrl),source:"error",durationMs:n.remoteDurationMs,error:n.remoteFailure}:{attempted:!1}}),n.resolution==="local-fallback"?(this.stats.localFallbackNodeCount+=1,this.stats.remoteFallbackNodeCount+=1):this.stats.localDirectNodeCount+=1,this.stats.localSolvedNodeCount+=1}async solveNodeViaHdCache(t,e){const n=ZAe(this.hdCacheBaseUrl),o={"content-type":"application/json"},i={nodeWithPortPoints:t},r=JSON.stringify(i),s=Date.now();let a,A,c,l=null,u=null;try{const h=await this.fetchImpl(n,{method:"POST",headers:o,body:r});if(a=h.status,A=h.ok,c=await h.text(),l=Date.now()-s,u=c?JSON.parse(c):null,!h.ok)throw new Error(u?.message??c??`hd-cache request failed with status ${h.status}`);if(!u?.ok||u.routes===null)throw new Error(u?.message??`hd-cache returned no routes for ${t.capacityMeshNodeId}`);const d=W0o(t,u.routes,{traceWidth:this.traceWidth,viaDiameter:this.viaDiameter});this.solvedRoutesByNodeIndex.set(e,d),this.recordNodeSolveMetadata(t,{status:"solved",resolution:"remote",solverType:`hd-cache.tscircuit.com [${u.source}]`,iterations:null,pairCount:rH(t),routeCount:d.length,remoteAttempt:{attempted:!0,endpoint:ZAe(this.hdCacheBaseUrl),source:u.source,durationMs:l}}),this.recordRemoteSource(u.source)}catch(h){l??=Date.now()-s;const d=(p=>p instanceof Error?p.message:String(p))(h);this.recordFailedHdCacheRequest({nodeId:t.capacityMeshNodeId,pairCount:rH(t),failedAt:new Date().toISOString(),durationMs:l,error:d,url:n,request:{method:"POST",headers:o,body:r,bodyJson:i},response:a!==void 0||A!==void 0||c!==void 0||u!==null?{status:a,ok:A,text:c,body:u}:void 0}),this.recordRemoteSource("error"),this.solveNodeLocally(t,e,{resolution:"local-fallback",remoteFailure:d,remoteDurationMs:l})}finally{this.recordRemoteResponseMetrics(t.capacityMeshNodeId,l??Date.now()-s,(g=u?.kOrder,typeof g=="number"&&Number.isFinite(g)?u.kOrder:null)),this.stats.remoteRequestsCompleted+=1}var g}launchRemoteSolves(){const t=[];this.unsolvedNodePortPoints.forEach((e,n)=>{if(!A9t(e))return void this.solveNodeLocally(e,n);const o={name:`hd-cache:${e.capacityMeshNodeId}`,promise:Promise.resolve()};o.promise=this.solveNodeViaHdCache(e,n).finally(()=>{this.pendingEffects=this.pendingEffects?.filter(i=>i!==o)}),t.push(o)}),this.pendingEffects=t,this.stats.remoteRequestsStarted=t.length}recordRemoteSource(t){this.stats.remoteSources[t]=(this.stats.remoteSources[t]??0)+1}recordRemoteResponseMetrics(t,e,n){this.remoteResponseMeasurements.push({nodeId:t,durationMs:e,kOrder:n}),this.stats.remoteResponseSampleCount=this.remoteResponseMeasurements.length,this.stats.remoteKOrderSampleCount=this.remoteResponseMeasurements.filter(s=>s.kOrder!==null).length;let o=null;for(const s of this.remoteResponseMeasurements)(!o||s.durationMs>o.durationMs)&&(o=s);this.stats.slowestRemoteResponseMs=o?.durationMs??null,this.stats.slowestRemoteResponseNodeId=o?.nodeId??null;const i=this.remoteResponseMeasurements.map(s=>s.durationMs).sort((s,a)=>s-a);this.stats.p50RemoteResponseMs=SSe(i,.5);const r=this.remoteResponseMeasurements.map(s=>s.kOrder).filter(s=>s!==null).sort((s,a)=>s-a);this.stats.p50RemoteKOrder=SSe(r,.5),this.stats.p95RemoteKOrder=SSe(r,.95)}recordFailedHdCacheRequest(t){const e=(()=>{if(typeof window>"u")return null;const n=window;return Array.isArray(n.__FAILED_HD_CACHE_REQUESTS)||(n.__FAILED_HD_CACHE_REQUESTS=[]),n.__FAILED_HD_CACHE_REQUESTS})();e&&e.push(t)}recordNodeSolveMetadata(t,e){this.nodeSolveMetadataById.set(t.capacityMeshNodeId,{...e,node:t,nodePf:this.nodePfById.get(t.capacityMeshNodeId)??null})}ensureFailedNodeMetadata(){for(const t of this.failedNodeResults)this.nodeSolveMetadataById.has(t.node.capacityMeshNodeId)||this.recordNodeSolveMetadata(t.node,{status:"failed",resolution:"failed",solverType:"unknown",iterations:null,pairCount:rH(t.node),routeCount:0,remoteAttempt:{attempted:A9t(t.node),source:"error",error:t.error},error:t.error})}getVisibleRoutes(){if(this.solved)return this.routes;const t=[];for(let e=0;e<this.unsolvedNodePortPoints.length;e++)t.push(...this.solvedRoutesByNodeIndex.get(e)??[]);return t}createNodeMarkerLabel(t,e){return["hd_node_marker",`node: ${t}`,`status: ${e.status}`,`resolution: ${e.resolution}`,`solver: ${e.solverType}`,...e.supervisorType?[`supervisor: ${e.supervisorType}`]:[],...e.iterations!==null?[`iterations: ${e.iterations}`]:[],`pairCount: ${e.pairCount}`,`routes: ${e.routeCount}`,`nodePf: ${e.nodePf??"n/a"}`,"remoteAttempted: "+(e.remoteAttempt.attempted?"yes":"no"),...e.remoteAttempt.source?[`remoteSource: ${e.remoteAttempt.source}`]:[],...e.remoteAttempt.durationMs!==void 0?[`remoteDurationMs: ${e.remoteAttempt.durationMs}`]:[],...e.remoteAttempt.error?[`remoteError: ${e.remoteAttempt.error}`]:[],`portPoints: ${e.node.portPoints.length}`,...e.error?[`error: ${e.error}`]:[]].join(`
`)}_step(){if(!this.launchedRemoteSolves)return this.launchedRemoteSolves=!0,void this.launchRemoteSolves();if(!((this.pendingEffects?.length??0)>0)){if(this.failedNodeResults.length>0){this.ensureFailedNodeMetadata();const t=this.failedNodeResults[0];return this.failed=!0,void(this.error=`Failed to solve ${this.failedNodeResults.length} nodes via hd-cache. First failure: ${t?.node.capacityMeshNodeId} (${t?.error})`)}this.routes=[];for(let t=0;t<this.unsolvedNodePortPoints.length;t++)this.routes.push(...this.solvedRoutesByNodeIndex.get(t)??[]);this.solved=!0}}visualize(){const t={lines:[],points:[],rects:[],circles:[]};for(const e of this.getVisibleRoutes()){const n=Kse(e.route,e.connectionName,this.colorMap[e.connectionName]);for(const o of n)t.lines.push({points:o.points,label:o.connectionName,strokeColor:o.z===0?o.color:Es(o.color,.75),layer:`z${o.z}`,strokeWidth:e.traceThickness,strokeDash:o.z!==0?"10, 5":void 0});for(const o of e.vias)t.circles.push({center:o,layer:"z0,1",radius:e.viaDiameter/2,fill:this.colorMap[e.connectionName],label:`${e.connectionName} via`})}for(const[e,n]of this.nodeSolveMetadataById){const o=n.node.center.x-n.node.width/2,i=n.node.center.x+n.node.width/2,r=n.node.center.y-n.node.height/2,s=n.node.center.y+n.node.height/2,a=this.createNodeMarkerLabel(e,n),A=n.status==="solved"?"blue":"red",c=n.status==="solved"?.03:.08;if(t.lines.push({points:[{x:o,y:r},{x:i,y:r}],layer:"hd_node_boundaries",strokeColor:A,strokeDash:"6, 4",strokeWidth:c,label:a},{points:[{x:i,y:r},{x:i,y:s}],layer:"hd_node_boundaries",strokeColor:A,strokeDash:"6, 4",strokeWidth:c,label:a},{points:[{x:i,y:s},{x:o,y:s}],layer:"hd_node_boundaries",strokeColor:A,strokeDash:"6, 4",strokeWidth:c,label:a},{points:[{x:o,y:s},{x:o,y:r}],layer:"hd_node_boundaries",strokeColor:A,strokeDash:"6, 4",strokeWidth:c,label:a}),n.status==="solved")t.points.push({x:n.node.center.x,y:n.node.center.y,color:A,layer:"hd_node_markers",label:a});else{t.lines.push({points:[{x:0,y:0},{x:n.node.center.x,y:n.node.center.y}],layer:"hd_failed_node_guides",strokeColor:A,strokeDash:"8, 6",strokeWidth:.05,label:a});const l=Math.max(n.node.width,1.2),u=Math.max(n.node.height,1.2),g=l/2,h=u/2;t.rects.push({center:n.node.center,layer:"hd_node_markers",width:l,height:u,fill:"rgba(255, 0, 0, 0.3)",stroke:A,label:a}),t.circles.push({center:n.node.center,radius:Math.max(.6*Math.max(l,u),1.1),layer:"hd_node_markers",fill:"rgba(255, 0, 0, 0.08)",stroke:A,label:a}),t.lines.push({points:[{x:n.node.center.x-g,y:n.node.center.y-h},{x:n.node.center.x+g,y:n.node.center.y+h}],layer:"hd_node_markers",strokeColor:A,strokeWidth:.16,label:a},{points:[{x:n.node.center.x-g,y:n.node.center.y+h},{x:n.node.center.x+g,y:n.node.center.y-h}],layer:"hd_node_markers",strokeColor:A,strokeWidth:.16,label:a})}}return t}},$0o=class extends s9t{hdCacheBaseUrl;hdCacheFetch;constructor(t,e={}){super(t,{...e,maxNodeDimension:e.maxNodeDimension??7,maxNodeRatio:e.maxNodeRatio??4}),this.hdCacheBaseUrl=e.hdCacheBaseUrl??"https://hd-cache.tscircuit.com",this.hdCacheFetch=e.hdCacheFetch,this.replaceHighDensityPipelineStep()}replaceHighDensityPipelineStep(){const t=this.pipelineDef.findIndex(e=>e.solverName==="highDensityRouteSolver");if(t===-1)throw new Error("Pipeline4 highDensityRouteSolver step is missing");this.pipelineDef[t]={...this.pipelineDef[t],solverClass:j0o,getConstructorParams:e=>{const n=e.uniformPortDistributionSolver?.getOutput()??[],o=e.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],i=n.length>0?n:o;return e.highDensityNodePortPoints=structuredClone(i),[{nodePortPoints:i,nodePfById:new Map((e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(r=>[r.capacityMeshNodeId,e.portPointPathingSolver?.computeNodePf(r)??null])),colorMap:e.colorMap,connMap:e.connMap,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount,hdCacheBaseUrl:e.hdCacheBaseUrl,fetchImpl:e.hdCacheFetch}]}}}async stepAsync(){if(this.solved||this.failed)return;this.step();const t=a9t(this);t.length!==0&&(await Promise.race(t.map(e=>e.promise.then(()=>e.name,()=>e.name))),this.solved||this.failed||this.step())}async solveAsync(){const t=Date.now();for(;!this.solved&&!this.failed;)await this.stepAsync();this.timeToSolve=Date.now()-t}solve(){throw new Error("AutoroutingPipelineSolver5_HdCache requires async execution. Use solveAsync() or stepAsync().")}};X9e(Z$n(),1);var _N=t=>t.rootConnectionName??t.connectionName,sH=(t,e)=>t.flatMap((n,o)=>_N(n)===e?[o]:[]),uB=(t,e,n,o)=>{const i=(g,h,d)=>{const p=d.x-h.x,m=d.y-h.y,_=g.x-h.x,f=g.y-h.y,I=p**2+m**2,C=I===0?0:Math.max(0,Math.min(1,(_*p+f*m)/I));return Math.hypot(g.x-(h.x+C*p),g.y-(h.y+C*m))},r={x:e.x-t.x,y:e.y-t.y},s={x:o.x-n.x,y:o.y-n.y},a={x:n.x-t.x,y:n.y-t.y},A=(g,h)=>g.x*h.y-g.y*h.x,c=A(r,s),l=Math.hypot(r.x,r.y),u=1e-12*(l*Math.hypot(s.x,s.y)+1);if(Math.abs(c)>u){const g=A(a,s)/c,h=A(a,r)/c;if(g>=-1e-12&&g<=1+1e-12&&h>=-1e-12&&h<=1+1e-12)return 0}else if(l>1e-12&&Math.abs(A(a,r))<=u){const g=Math.abs(r.x)>=Math.abs(r.y),h=Math.min(g?t.x:t.y,g?e.x:e.y),d=Math.max(g?t.x:t.y,g?e.x:e.y),p=Math.min(g?n.x:n.y,g?o.x:o.y),m=Math.max(g?n.x:n.y,g?o.x:o.y);if(Math.max(h,p)<=Math.min(d,m)+1e-12)return 0}return Math.min(i(t,n,o),i(e,n,o),i(n,t,e),i(o,t,e))},QSe=(t,e)=>Math.hypot(e.x-t.x,e.y-t.y),cb=t=>{let e=0;for(let n=0;n<t.route.length-1;n++)e+=QSe(t.route[n],t.route[n+1]);return e},aH=(t,e)=>e.reduce((n,o)=>n+cb(t[o]),0),AH=(t,e)=>{const n=t.__zLayers,o=t.zLayers,i=n!==void 0?n:o;if(i!==void 0){if(!Array.isArray(i)||i.length===0||i.some(r=>!Number.isInteger(r)||r<0||r>=e))throw new Error("Obstacle has invalid z-layer indexes");return i}if(t.layers.length===0)throw new Error("Obstacle has no declared layers");return t.layers.map(r=>{if(r==="top")return 0;if(r==="bottom")return e-1;const s=/^inner(\d+)$/.exec(r),a=s?Number(s[1]):-1;if(a<=0||a>=e-1)throw new Error(`Obstacle has invalid layer name "${r}"`);return a})},cH=t=>{const e=(r,s,a,A)=>{const c=a.center.x-a.width/2-A,l=a.center.x+a.width/2+A,u=a.center.y-a.height/2-A,g=a.center.y+a.height/2+A;if(r.x>=c&&r.x<=l&&r.y>=u&&r.y<=g||s.x>=c&&s.x<=l&&s.y>=u&&s.y<=g)return!0;const h=[{x:c,y:u},{x:l,y:u},{x:l,y:g},{x:c,y:g}];return h.some((d,p)=>uB(r,s,d,h[(p+1)%h.length])===0)};if(t.bounds&&t.meanderPoints.some(r=>r.x<t.bounds.minX||r.x>t.bounds.maxX||r.y<t.bounds.minY||r.y>t.bounds.maxY))return!1;const n=(r,s,a)=>{const A=a.x-s.x,c=a.y-s.y,l=A*A+c*c,u=l===0?0:Math.max(0,Math.min(1,((r.x-s.x)*A+(r.y-s.y)*c)/l));return Math.hypot(r.x-(s.x+u*A),r.y-(s.y+u*c))},o=_N(t.route),i=t.route.traceThickness/2+t.obstacleMargin;for(let r=0;r<t.meanderPoints.length-1;r++){const s=t.meanderPoints[r],a=t.meanderPoints[r+1];for(const A of t.obstacles){if(!AH(A,t.layerCount).includes(s.z))continue;const c=r===0||r===t.meanderPoints.length-2;if((!A.connectedTo.includes(o)||!c)&&e(s,a,A,i))return!1}for(const A of t.routedRoutes){const c=_N(A)===o;for(const l of A.vias){if(l.zLayers&&!l.zLayers.includes(s.z))continue;const u=Math.hypot(l.x-s.x,l.y-s.y)<=1e-8||Math.hypot(l.x-a.x,l.y-a.y)<=1e-8,g=t.route.traceThickness/2+A.viaDiameter/2+t.obstacleMargin;if((!c||!u)&&n(l,s,a)<g)return!1}if(!c)for(let l=0;l<A.route.length-1;l++){const u=A.route[l],g=A.route[l+1];if(s.z!==u.z||s.z!==g.z)continue;const h=t.route.traceThickness/2+A.traceThickness/2+t.obstacleMargin;if(uB(s,a,u,g)<h)return!1}}}return!0},g9t=t=>{const e=[];for(const o of t.routeIndexes){const i=t.routes[o],r=t.minMeanderGap??Math.max(.3,2*i.traceThickness),s=i.traceThickness+r,a=Math.max(t.minimumToothPitch??0,2*s),A=t.minMeanderHeight??s;for(let c=0;c<i.route.length-1;c++){const l=i.route[c],u=i.route[c+1],g=QSe(l,u);if(g<=0||l.z!==u.z)continue;const h=Math.min(Math.max(0,Math.floor(g/a)-1),t.maxToothCount);for(let d=1;d<=h;d++){const p=g/(d+1),m=[p,Math.sqrt(a*p),a].filter((f,I,C)=>C.findIndex(y=>Math.abs(y-f)<1e-9)===I),_=d%2==0?["balanced","negative","positive"]:["negative","positive"];for(const f of m)for(const I of _)e.push({routeIndex:o,segmentIndex:c,segmentLength:g,toothCount:d,maximumDepth:t.maximumDepth,minimumHeight:A,toothPitch:f,placement:I,heightProfile:d>1?"tapered":"uniform"})}}}const n={balanced:0,negative:1,positive:2};return e.sort((o,i)=>o.toothCount-i.toothCount||n[o.placement]-n[i.placement]||i.toothPitch-o.toothPitch||i.segmentLength-o.segmentLength)},q0o=t=>{if(t.centerlineDistanceCost===null)return 0;const e=t.predictedToothDepths.flatMap((_,f)=>_>0?[f]:[]);if(e.length===0)return 0;const n=e.map(_=>t.predictedToothDepths[_]),o=Math.max(...n),i=n.reduce((_,f)=>_+f,0)/n.length,r=Math.sqrt(n.reduce((_,f)=>_+(f-i)**2,0)/n.length),s=e[0],a=(e.at(-1)-s+1)*t.toothPitch,A=o/(t.toothPitch/2),c=t.addedLength/a,l=A/(1+A)*40,u=c/(1+c)*30,g=t.predictedToothDepths.map((_,f)=>Math.sin(Math.PI*(f+1)/(t.predictedToothDepths.length+1))),h=Math.max(...g),d=Math.sqrt(t.predictedToothDepths.reduce((_,f,I)=>_+(f-o*g[I]/h)**2,0)/t.predictedToothDepths.length),p=100-l-u-Math.min(10,(t.heightProfile==="tapered"?d:r)/i*10)-2*(n.length-1)-7*Math.min(1,t.addedLength/t.segmentLength)-100*t.centerlineDistanceCost,m=t.centerlineDistanceCost>0?p:Math.max(0,p);return Math.round(1e6*m)/1e6},lH=t=>{if(t.toothDepths.length!==t.toothCount)throw new Error(`LengthMatchingSolver: expected ${t.toothCount} tooth depths, received ${t.toothDepths.length}`);if(t.toothDepths.some(A=>!Number.isFinite(A)||A<0))throw new Error("LengthMatchingSolver: every meander tooth depth must be a non-negative finite number");const e=t.route.route[t.segmentIndex],n=t.route.route[t.segmentIndex+1],o=QSe(e,n),i=(n.x-e.x)/o,r=(n.y-e.y)/o,s=(o-(t.toothCount-.5)*t.toothPitch)/2,a=[{...e}];for(let A=0;A<t.toothCount;A++){const c=t.toothDepths[A];if(c===0)continue;const l=t.placement==="balanced"?A%2==0?-1:1:t.placement==="negative"?-1:1,u={x:-r*l,y:i*l},g=s+A*t.toothPitch,h=g+t.toothPitch/2,d={...e,x:e.x+i*g,y:e.y+r*g};a.push(d,{...d,x:d.x+u.x*c,y:d.y+u.y*c},{...e,x:e.x+i*h+u.x*c,y:e.y+r*h+u.y*c},{...e,x:e.x+i*h,y:e.y+r*h})}return a.push({...n}),(A=>{if(A.length<3)return A;const c=[{...A[0]}];for(let l=1;l<A.length-1;l++){const u=A[l-1],g=A[l],h=A[l+1],d=Math.hypot(g.x-u.x,g.y-u.y),p=Math.hypot(h.x-g.x,h.y-g.y);if(d===0||p===0)throw new Error("LengthMatchingSolver: meander contains a zero-length segment");const m={x:(g.x-u.x)/d,y:(g.y-u.y)/d},_={x:(h.x-g.x)/p,y:(h.y-g.y)/p};if(Math.abs(m.x*_.y-m.y*_.x)<1e-9){c.push({...g});continue}const f=Math.min(d,p)/2,I={...g,x:g.x-m.x*f,y:g.y-m.y*f},C={...g,x:g.x+_.x*f,y:g.y+_.y*f},y=c.at(-1);I.x===y.x&&I.y===y.y||c.push(I);for(let x=1;x<6;x++){const E=x/6,B=1-E;c.push({...g,x:B**2*I.x+2*B*E*g.x+E**2*C.x,y:B**2*I.y+2*B*E*g.y+E**2*C.y})}c.push(C)}return c.push({...A[A.length-1]}),c})(a)},uH=t=>[...t.route.route.slice(0,t.segmentIndex),...lH(t),...t.route.route.slice(t.segmentIndex+2)],fW=t=>{const e=cb(t.route),n=(()=>{const O=[];for(let U=0;U<t.candidate.toothCount;U++){const Y=Array(t.candidate.toothCount).fill(0);Y[U]=t.candidate.maximumDepth;const W=lH({...t.candidate,route:t.route,toothDepths:Y});if(t.isGeometryValid(W)){O.push(t.candidate.maximumDepth);continue}let te=0,j=t.candidate.maximumDepth;for(let J=0;J<32;J++){const oe=(te+j)/2,ie=Array(t.candidate.toothCount).fill(0);ie[U]=oe;const ne=lH({...t.candidate,route:t.route,toothDepths:ie});t.isGeometryValid(ne)?te=oe:j=oe}O.push(te)}return O})(),o=(O=>{if(O.heightProfile!=="tapered")return Array(O.toothCount).fill(1);const U=Array.from({length:O.toothCount},(W,te)=>Math.sin(Math.PI*(te+1)/(O.toothCount+1))),Y=Math.max(...U);return U.map(W=>W/Y)})(t.candidate),i=t.candidate.maximumDepth,r=n.map((O,U)=>Math.min(O,i*o[U])),s=[.25,.75],a=r.map(O=>O*s[0]),A=r.map(O=>O*s[1]),c=uH({...t.candidate,route:t.route,toothDepths:a}),l=uH({...t.candidate,route:t.route,toothDepths:A}),u=[cb({...t.route,route:c})-e,cb({...t.route,route:l})-e],g=uH({...t.candidate,route:t.route,toothDepths:r}),h=cb({...t.route,route:g})-e,d=(u[1]-u[0])/(s[1]-s[0]),p=u[0]-d*s[0],m=d>0&&Number.isFinite(d)?(t.targetAddedLength-p)/d:0,_=Math.min(t.targetAddedLength,h),f=t.targetAddedLength>0&&_>0?(O=>{let U=0,Y=t.candidate.maximumDepth;for(let te=0;te<32;te++){const j=(U+Y)/2,J=O.maximumToothDepths.map((le,ge)=>Math.min(le,j*O.toothHeightWeights[ge])),oe=uH({...t.candidate,route:t.route,toothDepths:J}),ie=cb({...t.route,route:oe})-O.originalLength,ne=lH({...t.candidate,route:t.route,toothDepths:J});t.isGeometryValid(ne)&&ie<O.targetAddedLength?U=j:Y=j}const W=(U+Y)/2;return{depthLevel:W,toothDepths:O.maximumToothDepths.map((te,j)=>Math.min(te,W*O.toothHeightWeights[j]))}})({maximumToothDepths:n,toothHeightWeights:o,originalLength:e,targetAddedLength:_}):{depthLevel:m*i,toothDepths:r.map(O=>Math.max(0,O*m))},I=f.depthLevel/i,C=f.toothDepths,y=uH({...t.candidate,route:t.route,toothDepths:C}),x=cb({...t.route,route:y})-e,E=Math.abs(_-x),B=lH({...t.candidate,route:t.route,toothDepths:C});let S=0;if(t.getCenterlineDistanceCost&&(S=t.getCenterlineDistanceCost(B)),S!==null&&(!Number.isFinite(S)||S<0))throw new Error("LengthMatchingSolver: meander centerline distance cost must be a non-negative finite number");const Q=Number.isFinite(I)&&I>0&&I<=1,w=C.every(O=>O===0||O>=t.candidate.minimumHeight),M=t.isGeometryValid(B);let k,R=null;S===null?R="no-paired-same-layer-geometry":Q?E>t.lengthTolerance?R="target-error":M?w||(R="below-minimum-height"):R="invalid-geometry":R="invalid-scale",k=R?{valid:!1,invalidReason:R}:{valid:!0,invalidReason:null};const F={...t.candidate,connectionName:t.connectionName,maximumToothDepths:n,sampleScaleFactors:s,sampleAddedLengths:u,slope:d,intercept:p,predictedScaleFactor:I,predictedToothDepths:C,predictedRoute:y,addedLength:x,maximumAddedLength:h,resultingError:E,testedSegment:[{...t.route.route[t.candidate.segmentIndex]},{...t.route.route[t.candidate.segmentIndex+1]}],meanderPoints:B,centerlineDistanceCost:S,qualityScore:0,...k};return{...F,qualityScore:q0o(F)}},X0o=t=>{const e=(c=>{if(c.heightProfile!=="tapered")return Array(c.toothCount).fill(1);const l=Array.from({length:c.toothCount},(g,h)=>Math.sin(Math.PI*(h+1)/(c.toothCount+1))),u=Math.max(...l);return l.map(g=>g/u)})(t.candidate),n=Math.max(...e.map(c=>t.candidate.minimumHeight/c)),o=t.candidate.maximumDepth/2**30,i=e.map(c=>c*(n+o));if(i.some(c=>c>t.candidate.maximumDepth))return null;const r=lH({...t.candidate,route:t.route,toothDepths:i});if(!t.isGeometryValid(r))return null;const s=uH({...t.candidate,route:t.route,toothDepths:i}),a=cb({...t.route,route:s})-cb(t.route),A=fW({...t,targetAddedLength:a});return A.valid?A:null},d9t=t=>{const e=(A,c)=>{const l=A[c.routeIndex];if(!l)throw new Error(`LengthMatchingSolver: dual meander references missing route ${c.routeIndex}`);const u=[...A];return u[c.routeIndex]={...l,route:c.predictedRoute},u},n=(()=>{if(t.targetAddedLength+t.config.lengthTolerance<t.plan.minimumAddedLength||t.targetAddedLength-t.config.lengthTolerance>t.plan.maximumAddedLength)return null;const A=t.plan.attemptOptions.map(u=>Math.min(...u.map(g=>g.attempt.addedLength)));let c=Math.max(0,t.targetAddedLength-t.plan.minimumAddedLength),l=A.map((u,g)=>g);for(;c>1e-9&&l.length>0;){const u=c/l.length;let g=0;const h=[];for(const d of l){const p=Math.max(...t.plan.attemptOptions[d].map(_=>_.attempt.maximumAddedLength))-A[d],m=Math.min(p,u);A[d]+=m,g+=m,p-m>1e-9&&h.push(d)}if(g<=1e-9)break;c-=g,l=h}return c<=t.config.lengthTolerance?A:null})();if(!n)return null;const o=t.plan.attemptOptions.map((A,c)=>({attemptOptions:A,targetAddedLength:n[c]})).sort((A,c)=>c.attemptOptions[0].candidate.routeIndex-A.attemptOptions[0].candidate.routeIndex||c.attemptOptions[0].candidate.segmentIndex-A.attemptOptions[0].candidate.segmentIndex);let i=[...t.routes];const r=[];for(const A of o){const c=A.attemptOptions[0]?.candidate;if(!c)throw new Error("LengthMatchingSolver: empty dual-meander segment options");const l=i[c.routeIndex];if(!l)throw new Error(`LengthMatchingSolver: missing planned dual-meander route ${c.routeIndex}`);let u=null;for(const g of A.attemptOptions){if(g.attempt.addedLength-t.config.lengthTolerance>A.targetAddedLength||g.attempt.maximumAddedLength+t.config.lengthTolerance<A.targetAddedLength)continue;const h=fW({candidate:g.candidate,route:l,connectionName:t.connectionName,targetAddedLength:A.targetAddedLength,lengthTolerance:t.config.lengthTolerance,isGeometryValid:d=>cH({route:l,meanderPoints:d,routedRoutes:t.excludedConnectionName?i.filter(p=>_N(p)!==t.excludedConnectionName):i,...t.config})});h.valid&&(!u||h.qualityScore>u.qualityScore)&&(u=h)}if(!u)return null;i=e(i,u),r.push(u)}const s=r.reduce((A,c)=>A+c.addedLength,0);if(Math.abs(s-t.targetAddedLength)>t.config.lengthTolerance)return null;const a=r[0];if(!a)throw new Error("LengthMatchingSolver: fitted an empty dual-meander plan");return{attempts:[a,...r.slice(1)],routes:i,addedLength:s}},ece=t=>{if(t.length===0)throw new Error("LengthMatchingSolver: cannot score an empty meander plan");return t.reduce((e,n)=>e+n.qualityScore,0)/t.length-3*(t.length-1)},h9t=t=>{const e=i=>[i.candidate.toothCount,i.candidate.placement,i.candidate.heightProfile].join(":"),n=new Map;for(const i of t){const r=e(i),s=`${i.candidate.routeIndex}:${i.candidate.segmentIndex}`,a=n.get(r);if(!a){n.set(r,new Map([[s,[i]]]));continue}const A=a.get(s);A?A.push(i):a.set(s,[i])}const o=[];for(const i of n.values()){const r=[...i.values()].map(s=>({attempts:s,maximumAddedLength:Math.max(...s.map(a=>a.attempt.maximumAddedLength)),minimumAddedLength:Math.min(...s.map(a=>a.attempt.addedLength)),rankingAttempt:s.reduce((a,A)=>A.attempt.qualityScore>a.attempt.qualityScore?A:a)})).sort((s,a)=>a.maximumAddedLength-s.maximumAddedLength);for(const s of r)o.push({attempts:[s.rankingAttempt],attemptOptions:[s.attempts],minimumAddedLength:s.minimumAddedLength,maximumAddedLength:s.maximumAddedLength,rankingQualityScore:s.rankingAttempt.attempt.qualityScore});for(let s=2;s<=r.length;s++){const a=r.slice(0,s),A=a.map(c=>c.rankingAttempt);o.push({attempts:A,attemptOptions:a.map(c=>c.attempts),minimumAddedLength:a.reduce((c,l)=>c+l.minimumAddedLength,0),maximumAddedLength:a.reduce((c,l)=>c+l.maximumAddedLength,0),rankingQualityScore:ece(A.map(c=>c.attempt))})}}return o},tce=class extends Error{connectionName;reason;constructor(t){super(t.message),this.name="LengthMatchingNoSolutionError",this.connectionName=t.connectionName,this.reason=t.reason}},fN=t=>[t.routeIndex,t.segmentIndex,t.toothCount,t.placement,t.toothPitch,t.heightProfile,t.maximumDepth,t.minimumHeight].join(":"),p9t=t=>{const e=new Map,n=[...t.attempts].sort((i,r)=>i.addedLength-r.addedLength);let o=t.targetAddedLength;for(let i=0;i<n.length;i++){const r=n[i],s=Math.min(r.addedLength,o/(n.length-i));e.set(fN(r),{routeIndex:r.routeIndex,segmentIndex:r.segmentIndex,targetAddedLength:s}),o-=s}return e},Z0o=(t,e)=>`z${AH(t,e).join(",")}`,IN=t=>`z${t}`,euo=t=>{if(!t.showAttempt)return;if(!t.attempt)return void(r=>{const s=r.activePair?.candidates[r.activePair.candidateIndex];if(!s)return;const a=r.routes[s.routeIndex];if(!a)return;const A=a.route[s.segmentIndex],c=a.route[s.segmentIndex+1];A&&c&&r.graphics.lines.push({points:[A,c],strokeColor:"rgba(234, 179, 8, 0.6)",strokeWidth:2*a.traceThickness,strokeDash:[.1,.1],layer:IN(A.z)})})(t);const e=t.routes[t.attempt.routeIndex],[n,o]=t.attempt.testedSegment,i=t.theme.getConnectionColor(t.attempt.connectionName);t.graphics.lines.push({points:[n,o],strokeColor:t.theme.getTestedSegmentColor(i),strokeWidth:e.traceThickness,strokeDash:[.15,.15],layer:IN(n.z)}),t.attempt.valid?t.graphics.lines.push({points:t.attempt.meanderPoints.map(({x:r,y:s})=>({x:r,y:s})),strokeColor:"rgba(234, 179, 8, 0.6)",strokeWidth:2*e.traceThickness,strokeDash:[.1,.1],layer:IN(n.z)}):t.graphics.lines.push({points:t.attempt.meanderPoints.map(({x:r,y:s})=>({x:r,y:s})),strokeColor:t.theme.getRejectedCandidateColor(i),strokeWidth:e.traceThickness,strokeDash:[.1,.1],layer:IN(n.z)}),t.graphics.points.push({x:n.x,y:n.y,color:i,layer:IN(n.z)},{x:o.x,y:o.y,color:i,layer:IN(o.z)})},tuo=t=>{const e={lines:[],points:[],rects:[],circles:[]},n=(o=>{for(const i of Object.values(o))Bz(0,i);return{getConnectionColor:(i,r)=>o[i]??(r?o[r]:void 0)??(s=>s?`hsl(${300*s.split("").reduce((a,A)=>a+A.charCodeAt(0),0)/s.length%360}, 100%, 50%)`:"rgba(0, 0, 0, 0.5)")(i),getInnerLayerConnectionColor:i=>Bz(.5,i),getTestedSegmentColor:i=>Bz(.55,i),getRejectedCandidateColor:i=>Bz(.45,i),boardBounds:{fill:"rgba(30,41,59,0.03)",stroke:"rgba(30,41,59,0.55)"},obstacle:{fill:"rgba(255,0,0,0.25)",stroke:"rgba(255,0,0,0.5)"},via:{fill:"blue",stroke:"none"}}})(t.colorMap);return(o=>{for(const i of o.routes){const r=_N(i),s=o.theme.getConnectionColor(r,i.connectionName);for(let A=0;A<i.route.length-1;A++){const c=i.route[A],l=i.route[A+1];c.z===l.z&&o.graphics.lines.push({points:[c,l],strokeColor:c.z===0?s:o.theme.getInnerLayerConnectionColor(s),strokeWidth:i.traceThickness,...c.z===0?{}:{strokeDash:[.2,.2]},layer:IN(c.z)})}const a=[...new Set(i.route.map(A=>A.z))];for(const A of i.vias)o.graphics.circles.push({center:A,radius:i.viaDiameter/2,fill:o.theme.via.fill,stroke:o.theme.via.stroke,layer:`z${(A.zLayers??a).join(",")}`})}})({routes:t.routes,theme:n,graphics:e}),(o=>{if(o.bounds){const{minX:i,maxX:r,minY:s,maxY:a}=o.bounds;o.graphics.rects.push({center:{x:(i+r)/2,y:(s+a)/2},width:r-i,height:a-s,fill:o.theme.boardBounds.fill,stroke:o.theme.boardBounds.stroke,layer:`z${Array.from({length:o.layerCount},(A,c)=>c).join(",")}`})}for(const i of o.obstacles)o.graphics.rects.push({center:i.center,width:i.width,height:i.height,ccwRotationDegrees:i.ccwRotationDegrees,fill:o.theme.obstacle.fill,stroke:o.theme.obstacle.stroke,layer:Z0o(i,o.layerCount)})})({obstacles:t.obstacles,bounds:t.bounds,layerCount:t.layerCount,theme:n,graphics:e}),euo({routes:t.routes,attempt:t.currentAttempt,activePair:t.activePair,showAttempt:!t.solved,theme:n,graphics:e}),{...e}},m9t=class extends zA{constructor(t){super(),this.params=t,this.MAX_ITERATIONS=1e5,this.matchedHdRoutes=t.hdRoutes.map(e=>({...e,route:e.route.map(n=>({...n}))})),this.pairs=t.differentialPairs??[]}params;matchedHdRoutes;pairs;nextPairIndex=0;activePair=null;currentAttempt=null;config=null;candidatesTried=0;getSolverName(){return"LengthMatchingSolver"}startNextPair(){const t=this.pairs[this.nextPairIndex++];if(!t)return void(this.solved=!0);((l,u)=>{if(l.connectionNames[0]===l.connectionNames[1])throw new Error("LengthMatchingSolver: a differential pair must reference two distinct connections");if(!Number.isFinite(l.lengthTolerance)||l.lengthTolerance<0)throw new Error("LengthMatchingSolver: differential pair lengthTolerance must be a non-negative finite number");for(const h of[l.minimumCenterlineDistance,l.maximumCenterlineDistance])if(h!==void 0&&(!Number.isFinite(h)||h<=0))throw new Error("LengthMatchingSolver: differential pair centerline distances must be positive finite numbers");if(l.minimumCenterlineDistance!==void 0&&l.maximumCenterlineDistance!==void 0&&l.minimumCenterlineDistance>l.maximumCenterlineDistance)throw new Error("LengthMatchingSolver: differential pair minimumCenterlineDistance cannot exceed maximumCenterlineDistance");const g=new Map(u.map(h=>[h.name,h]));for(const h of l.connectionNames){const d=g.get(h);if(!d)throw new Error(`LengthMatchingSolver: differential pair references unknown connection "${h}"`);if(d.pointsToConnect.length!==2)throw new Error(`LengthMatchingSolver: differential pair connection "${h}" must have exactly two points before MST splitting`)}})(t,this.params.originalConnections);const e=sH(this.matchedHdRoutes,t.connectionNames[0]),n=sH(this.matchedHdRoutes,t.connectionNames[1]);if(e.length===0&&n.length===0)return;if(e.length===0||n.length===0)throw new Error(`LengthMatchingSolver: differential pair ${t.connectionNames.join("/")} has routed geometry for only one connection`);const o=aH(this.matchedHdRoutes,e),i=aH(this.matchedHdRoutes,n),r=Math.abs(o-i);if(r<=t.lengthTolerance)return;const s=o<i,a=t.connectionNames[s?0:1],A=t.connectionNames[s?1:0],c=g9t({routes:this.matchedHdRoutes,routeIndexes:s?e:n,maximumDepth:this.getConfig().maximumMeanderDepth,minimumToothPitch:this.getConfig().minimumToothPitch,minMeanderGap:this.getConfig().minMeanderGap,minMeanderHeight:this.getConfig().minMeanderHeight,maxToothCount:this.getConfig().maxToothCount});if(c.length===0)throw new tce({message:`LengthMatchingSolver: no same-layer straight segment can tune connection "${a}"`,connectionName:a,reason:"no-meander-candidate"});this.activePair={pair:t,longerConnectionName:A,longerRouteIndexes:s?n:e,shorterConnectionName:a,targetAddedLength:r,remainingAddedLength:r,candidates:c,candidateIndex:0,lastMatchedSegmentIndexByRoute:new Map,partialAttempts:[],fullAttempts:[],plannedAttemptTargets:null,hasMinimumHeightBlockedAttempt:!1}}acceptAttempt(t,e){const n=this.matchedHdRoutes[e.routeIndex];this.matchedHdRoutes[e.routeIndex]={...n,route:e.predictedRoute},t.remainingAddedLength-=e.addedLength,t.lastMatchedSegmentIndexByRoute.set(e.routeIndex,e.segmentIndex),t.candidateIndex=0,t.partialAttempts=[],t.fullAttempts=[],t.plannedAttemptTargets?.delete(fN(e)),t.plannedAttemptTargets?.size===0&&(t.plannedAttemptTargets=null),t.remainingAddedLength<=t.pair.lengthTolerance&&(this.activePair=null)}tryCandidate(t){let e;for(;!e;){const r=t.candidates[t.candidateIndex++];if(!r)break;const s=t.lastMatchedSegmentIndexByRoute.get(r.routeIndex);(s===void 0||r.segmentIndex<s)&&(!t.plannedAttemptTargets||t.plannedAttemptTargets.has(fN(r))&&![...t.plannedAttemptTargets.values()].some(a=>a.routeIndex===r.routeIndex&&a.segmentIndex>r.segmentIndex))&&(e=r)}if(!e){const r=t.fullAttempts.reduce((a,A)=>!a||A.qualityScore>a.qualityScore?A:a,null),s=(a=>{const A=u=>[u.toothCount,u.placement,u.heightProfile].join(":"),c=new Map;for(const u of a.attempts){const g=`${u.routeIndex}:${u.segmentIndex}`,h=A(u),d=c.get(h);if(!d){c.set(h,new Map([[g,[u]]]));continue}const p=d.get(g);p?p.push(u):d.set(g,[u])}let l=null;for(const u of c.values()){const g=[...u.values()].map(d=>({attempts:d,maximumCapacityAttempt:d.reduce((p,m)=>m.addedLength>p.addedLength?m:p)})).sort((d,p)=>p.maximumCapacityAttempt.addedLength-d.maximumCapacityAttempt.addedLength);let h=0;for(let d=0;d<g.length;d++){if(h+=g[d].maximumCapacityAttempt.addedLength,h+a.lengthTolerance<a.targetAddedLength)continue;const p=g.slice(0,d+1),m=p.map(y=>y.maximumCapacityAttempt),_=p9t({attempts:m,targetAddedLength:a.targetAddedLength}),f=p.map(y=>{const x=_.get(fN(y.maximumCapacityAttempt));if(!x)throw new Error(`LengthMatchingSolver: missing capacity target for ${fN(y.maximumCapacityAttempt)}`);const E=y.attempts.filter(B=>B.addedLength+a.lengthTolerance>=x.targetAddedLength);if(E.length===0)throw new Error(`LengthMatchingSolver: no pitch can supply planned target for route ${y.maximumCapacityAttempt.routeIndex} segment ${y.maximumCapacityAttempt.segmentIndex}`);return E.reduce((B,S)=>S.qualityScore>B.qualityScore||S.qualityScore===B.qualityScore&&S.toothPitch>B.toothPitch?S:B)}),I=ece(f);if(!l){l={attempts:f};break}const C=ece(l.attempts);(f.length<l.attempts.length||f.length===l.attempts.length&&I>C)&&(l={attempts:f});break}}return l})({attempts:t.partialAttempts,targetAddedLength:t.remainingAddedLength,lengthTolerance:t.pair.lengthTolerance});if(r&&(!s||r.qualityScore>=ece(s.attempts)))return void this.acceptAttempt(t,r);if(!s){if(!(t.hasMinimumHeightBlockedAttempt&&t.plannedAttemptTargets===null&&t.lastMatchedSegmentIndexByRoute.size===0))throw new tce({message:`LengthMatchingSolver: linear regression exhausted all segment/tooth combinations for "${t.shorterConnectionName}"; required ${t.targetAddedLength.toFixed(4)}mm`,connectionName:t.shorterConnectionName,reason:"meander-search-exhausted"});return this.tryDualMeanderPlan(t)}return t.plannedAttemptTargets=p9t({attempts:s.attempts,targetAddedLength:t.remainingAddedLength}),t.candidateIndex=0,t.partialAttempts=[],void(t.fullAttempts=[])}const n=this.matchedHdRoutes[e.routeIndex],o=this.getConfig(),i=t.plannedAttemptTargets?.get(fN(e));if(t.plannedAttemptTargets!==null&&i===void 0)throw new Error(`LengthMatchingSolver: missing planned target for ${fN(e)}`);this.currentAttempt=fW({candidate:e,route:n,connectionName:t.shorterConnectionName,targetAddedLength:i===void 0?t.remainingAddedLength:i.targetAddedLength,lengthTolerance:t.pair.lengthTolerance,isGeometryValid:r=>cH({route:n,meanderPoints:r,routedRoutes:this.matchedHdRoutes,obstacles:o.obstacles,bounds:o.bounds,layerCount:o.layerCount,obstacleMargin:o.obstacleMargin}),getCenterlineDistanceCost:t.pair.minimumCenterlineDistance===void 0&&t.pair.maximumCenterlineDistance===void 0?void 0:r=>(s=>{let a=0,A=0;for(let c=0;c<s.meanderPoints.length-1;c++){const l=s.meanderPoints[c],u=s.meanderPoints[c+1],g=Math.hypot(u.x-l.x,u.y-l.y);if(g!==0){for(let h=0;h<4;h++){const d=(h+.5)/4,p={x:l.x+(u.x-l.x)*d,y:l.y+(u.y-l.y)*d},m=[];for(const f of s.pairedRoutes)for(let I=0;I<f.route.length-1;I++){const C=f.route[I],y=f.route[I+1];l.z===C.z&&l.z===y.z&&m.push(uB(p,p,C,y))}if(m.length===0)return null;const _=Math.min(...m);A+=g*Math.max(0,(s.minimumCenterlineDistance??Number.NEGATIVE_INFINITY)-_,_-(s.maximumCenterlineDistance??Number.POSITIVE_INFINITY))/4}a+=g}}if(a===0)throw new Error("LengthMatchingSolver: cannot measure a zero-length meander centerline");return A/a})({meanderPoints:r,pairedRoutes:t.longerRouteIndexes.map(s=>this.matchedHdRoutes[s]),minimumCenterlineDistance:t.pair.minimumCenterlineDistance,maximumCenterlineDistance:t.pair.maximumCenterlineDistance})}),this.candidatesTried++,this.currentAttempt.invalidReason==="below-minimum-height"&&(t.hasMinimumHeightBlockedAttempt=!0),this.stats={pair:`${t.pair.connectionNames[0]}/${t.pair.connectionNames[1]}`,candidatesTried:this.candidatesTried,segmentIndex:e.segmentIndex,toothCount:e.toothCount,toothPitch:e.toothPitch,placement:e.placement,predictedScaleFactor:this.currentAttempt.predictedScaleFactor,predictedToothDepths:this.currentAttempt.predictedToothDepths,resultingError:this.currentAttempt.resultingError,qualityScore:this.currentAttempt.qualityScore,accepted:this.currentAttempt.valid},this.currentAttempt.valid&&(t.plannedAttemptTargets===null?t.remainingAddedLength-this.currentAttempt.addedLength<=t.pair.lengthTolerance?t.fullAttempts.push(this.currentAttempt):t.partialAttempts.push(this.currentAttempt):this.acceptAttempt(t,this.currentAttempt))}tryDualMeanderPlan(t){if(t.remainingAddedLength!==t.targetAddedLength)throw new Error(`LengthMatchingSolver: cannot start a dual-meander plan after partially tuning "${t.shorterConnectionName}"`);const e=this.getConfig(),n=g9t({routes:this.matchedHdRoutes,routeIndexes:t.longerRouteIndexes,maximumDepth:e.maximumMeanderDepth,minimumToothPitch:e.minimumToothPitch,minMeanderGap:e.minMeanderGap,minMeanderHeight:e.minMeanderHeight,maxToothCount:e.maxToothCount}),o=(a=>{const A=(C,y)=>C.rankingQualityScore!==y.rankingQualityScore?C.rankingQualityScore>y.rankingQualityScore:C.leftIndex!==y.leftIndex?C.leftIndex<y.leftIndex:C.rightIndex<y.rightIndex,c=(C,y)=>{C.push(y);let x=C.length-1;for(;x>0;){const E=Math.floor((x-1)/2),B=C[E];if(A(B,y))break;C[x]=B,x=E}C[x]=y},l=C=>{const y=C[0],x=C.pop();if(!y||!x||C.length===0)return y;let E=0;for(;;){const B=2*E+1,S=B+1;if(B>=C.length)break;const Q=S<C.length&&A(C[S],C[B])?S:B,w=C[Q];if(A(x,w))break;C[E]=w,E=Q}return C[E]=x,y},u=function*(C){const y=[...C.leftOptions].sort((B,S)=>C.getLeftQualityScore(S)-C.getLeftQualityScore(B)),x=[...C.rightOptions].sort((B,S)=>C.getRightQualityScore(S)-C.getRightQualityScore(B)),E=[];for(let B=0;B<y.length;B++){const S=x[0];if(!S)break;c(E,{leftIndex:B,rightIndex:0,rankingQualityScore:(C.getLeftQualityScore(y[B])+C.getRightQualityScore(S))/2})}for(;E.length>0;){const B=l(E);yield[y[B.leftIndex],x[B.rightIndex]];const S=B.rightIndex+1,Q=x[S];Q&&c(E,{leftIndex:B.leftIndex,rightIndex:S,rankingQualityScore:(C.getLeftQualityScore(y[B.leftIndex])+C.getRightQualityScore(Q))/2})}},g=(C,y)=>{const x=C[y.routeIndex];if(!x)throw new Error(`LengthMatchingSolver: dual meander references missing route ${y.routeIndex}`);const E=[...C];return E[y.routeIndex]={...x,route:y.predictedRoute},E},h=C=>{const y=C.routes[C.attempt.routeIndex];if(!y)throw new Error(`LengthMatchingSolver: cannot validate missing dual-meander route ${C.attempt.routeIndex}`);return cH({route:y,meanderPoints:C.attempt.meanderPoints,routedRoutes:C.routes,...C.config})},d=C=>{const y=C.routes.filter(E=>_N(E)!==C.counterpartConnectionName),x=[];for(const E of C.candidates){const B=C.routes[E.routeIndex];if(!B)throw new Error(`LengthMatchingSolver: dual-meander candidate references missing route ${E.routeIndex}`);const S=X0o({candidate:E,route:B,connectionName:C.connectionName,lengthTolerance:C.config.lengthTolerance,isGeometryValid:Q=>cH({route:B,meanderPoints:Q,routedRoutes:y,...C.config})});S&&x.push({candidate:E,attempt:S})}return x},p={obstacles:a.obstacles,bounds:a.bounds,layerCount:a.layerCount,obstacleMargin:a.obstacleMargin},m=d({candidates:a.shorterCandidates,routes:a.routes,connectionName:a.shorterConnectionName,counterpartConnectionName:a.longerConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}});if(m.length===0)return null;const _=d({candidates:a.longerCandidates,routes:a.routes,connectionName:a.longerConnectionName,counterpartConnectionName:a.shorterConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}}),f=u({leftOptions:_,rightOptions:m,getLeftQualityScore:C=>C.attempt.qualityScore,getRightQualityScore:C=>C.attempt.qualityScore});for(const[C,y]of f){const x=Math.max(C.attempt.addedLength,y.attempt.addedLength-a.originalLengthDifference),E=x+a.originalLengthDifference;if(x-a.lengthTolerance>C.attempt.maximumAddedLength||E-a.lengthTolerance>y.attempt.maximumAddedLength)continue;const B=a.routes[C.candidate.routeIndex];if(!B)throw new Error(`LengthMatchingSolver: missing longer route ${C.candidate.routeIndex}`);const S=a.routes[y.candidate.routeIndex];if(!S)throw new Error(`LengthMatchingSolver: missing shorter route ${y.candidate.routeIndex}`);const Q=a.routes.filter(Y=>_N(Y)!==a.shorterConnectionName),w=fW({candidate:C.candidate,route:B,connectionName:a.longerConnectionName,targetAddedLength:x,lengthTolerance:a.lengthTolerance,isGeometryValid:Y=>cH({route:B,meanderPoints:Y,routedRoutes:Q,...p})});if(!w.valid||Math.abs(w.addedLength-x)>a.lengthTolerance)continue;const M=g(a.routes,w),k=w.addedLength+a.originalLengthDifference,R=fW({candidate:y.candidate,route:S,connectionName:a.shorterConnectionName,targetAddedLength:k,lengthTolerance:a.lengthTolerance,isGeometryValid:Y=>cH({route:S,meanderPoints:Y,routedRoutes:M,...p})});if(!R.valid)continue;const F=g(M,R),O=sH(F,a.longerConnectionName),U=sH(F,a.shorterConnectionName);if(!(Math.abs(aH(F,U)-aH(F,O))>a.lengthTolerance)&&h({attempt:w,routes:F,config:p})&&h({attempt:R,routes:F,config:p}))return{longerAttempts:[w],shorterAttempts:[R]}}const I=u({leftOptions:h9t(_),rightOptions:h9t(m),getLeftQualityScore:C=>C.rankingQualityScore,getRightQualityScore:C=>C.rankingQualityScore});for(const[C,y]of I){if(C.attempts.length===1&&y.attempts.length===1)continue;const x=Math.max(C.minimumAddedLength,y.minimumAddedLength-a.originalLengthDifference),E=x+a.originalLengthDifference;if(x-a.lengthTolerance>C.maximumAddedLength||E-a.lengthTolerance>y.maximumAddedLength)continue;const B=d9t({plan:C,targetAddedLength:x,routes:a.routes,connectionName:a.longerConnectionName,excludedConnectionName:a.shorterConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}});if(!B)continue;const S=d9t({plan:y,targetAddedLength:B.addedLength+a.originalLengthDifference,routes:B.routes,connectionName:a.shorterConnectionName,config:{...p,lengthTolerance:a.lengthTolerance}});if(!S)continue;const Q=sH(S.routes,a.longerConnectionName),w=sH(S.routes,a.shorterConnectionName),M=Math.abs(aH(S.routes,w)-aH(S.routes,Q)),k=[...B.attempts,...S.attempts];if(!(M>a.lengthTolerance||k.some(R=>!h({attempt:R,routes:S.routes,config:p}))))return{longerAttempts:B.attempts,shorterAttempts:S.attempts}}return null})({routes:this.matchedHdRoutes,longerConnectionName:t.longerConnectionName,shorterConnectionName:t.shorterConnectionName,originalLengthDifference:t.targetAddedLength,lengthTolerance:t.pair.lengthTolerance,longerCandidates:n,shorterCandidates:t.candidates,obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount,obstacleMargin:e.obstacleMargin});if(!o)throw new tce({message:`LengthMatchingSolver: linear regression exhausted all segment/tooth combinations for "${t.shorterConnectionName}"; required ${t.targetAddedLength.toFixed(4)}mm`,connectionName:t.shorterConnectionName,reason:"meander-search-exhausted"});const i=[...this.matchedHdRoutes];for(const a of[...o.longerAttempts,...o.shorterAttempts]){const A=this.matchedHdRoutes[a.routeIndex];if(!A)throw new Error(`LengthMatchingSolver: cannot commit dual meander to missing route ${a.routeIndex}`);i[a.routeIndex]={...A,route:a.predictedRoute}}this.matchedHdRoutes=i,this.currentAttempt=o.shorterAttempts[0];const r=o.longerAttempts.reduce((a,A)=>a+A.addedLength,0),s=o.shorterAttempts.reduce((a,A)=>a+A.addedLength,0);this.stats={pair:`${t.pair.connectionNames[0]}/${t.pair.connectionNames[1]}`,mode:"dual-meander",longerAddedLength:r,shorterAddedLength:s,resultingError:Math.abs(s-r-t.targetAddedLength)},this.activePair=null}getConfig(){return this.config||(this.config=(t=>{const e=t.maximumMeanderDepth??5,n=t.maxToothCount??12;if(!Number.isFinite(e)||e<=0)throw new Error("LengthMatchingSolver: maximumMeanderDepth must be a positive finite number");if(t.minimumToothPitch!==void 0&&(!Number.isFinite(t.minimumToothPitch)||t.minimumToothPitch<=0))throw new Error("LengthMatchingSolver: minimumToothPitch must be a positive finite number");if(t.minMeanderGap!==void 0&&(!Number.isFinite(t.minMeanderGap)||t.minMeanderGap<=0))throw new Error("LengthMatchingSolver: minMeanderGap must be a positive finite number");if(t.minMeanderHeight!==void 0&&(!Number.isFinite(t.minMeanderHeight)||t.minMeanderHeight<=0))throw new Error("LengthMatchingSolver: minMeanderHeight must be a positive finite number");if(t.minMeanderHeight!==void 0&&t.minMeanderHeight>e)throw new Error("LengthMatchingSolver: minMeanderHeight cannot exceed maximumMeanderDepth");if(!Number.isFinite(n)||!Number.isInteger(n)||n<=0)throw new Error("LengthMatchingSolver: maxToothCount must be a positive finite integer");return{maximumMeanderDepth:e,minimumToothPitch:t.minimumToothPitch,minMeanderGap:t.minMeanderGap,minMeanderHeight:t.minMeanderHeight,maxToothCount:n,obstacles:t.obstacles??[],bounds:t.bounds,obstacleMargin:t.obstacleMargin??.15,layerCount:t.layerCount??2,colorMap:t.colorMap??{}}})(this.params)),this.config}_step(){this.getConfig(),this.activePair?this.tryCandidate(this.activePair):this.startNextPair()}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved)throw new Error("LengthMatchingSolver: getOutput() called before the solver completed");return{matchedHdRoutes:this.matchedHdRoutes}}getBestEffortOutput(){const t=structuredClone(this.matchedHdRoutes),e=this.activePair?.fullAttempts??[];let n=null;for(const o of e)(!n||o.qualityScore>n.qualityScore)&&(n=o);if(!n)for(const o of this.activePair?.partialAttempts??[])(!n||o.addedLength>n.addedLength||o.addedLength===n.addedLength&&o.qualityScore>n.qualityScore)&&(n=o);if(n){const o=t[n.routeIndex];o&&(t[n.routeIndex]={...o,route:structuredClone(n.predictedRoute)})}return{matchedHdRoutes:t}}computeProgress(){if(this.solved)return 1;if(this.pairs.length===0)return this.config?1:0;const t=Math.max(0,this.nextPairIndex-1),e=this.activePair?this.activePair.candidateIndex/this.activePair.candidates.length:0;return Math.min(.99,(t+e)/this.pairs.length)}visualize(){const t=this.getConfig();return tuo({routes:this.matchedHdRoutes,obstacles:t.obstacles,bounds:t.bounds,layerCount:t.layerCount,colorMap:t.colorMap,activePair:this.activePair,currentAttempt:this.currentAttempt,solved:this.solved})}},Dg=(t,e)=>{if(t==="top")return 0;if(t==="bottom")return e-1;const n=/^inner(\d+)$/.exec(t);if(!n)return-1;const o=Number(n[1]);return o>0&&o<e-1?o:-1},w7=(t,e)=>t===0?"top":t===e-1?"bottom":`inner${t}`,gH=(t,e,n)=>{const o=Dg(t,n),i=Dg(e,n);if(o<0||i<0)return[];const r=Math.min(o,i),s=Math.max(o,i);return Array.from({length:s-r+1},(a,A)=>w7(r+A,n))},vSe=1e-8,qf=(t,e)=>{if(t.route.length===0)throw new Error(`trace "${t.connection_name}" has an empty route`);if(t.route.some(g=>g.route_type!=="wire"&&g.route_type!=="via"))throw new Error(`trace "${t.connection_name}" contains unsupported jumper or through-obstacle geometry`);const n=t.route.findIndex(g=>g.route_type==="wire"),o=t.route[n],i=t.route.findLast(g=>g.route_type==="wire");if(o?.route_type!=="wire"||!i)throw new Error(`trace "${t.connection_name}" must contain a wire point`);const r=[],s=[],a=[],A=[];let c=null,l=o.width;if(n>0){let g=o.layer;for(let d=n-1;d>=0;d--){const p=t.route[d];if(p?.route_type!=="via")throw new Error(`trace "${t.connection_name}" has unsupported geometry before its first wire`);if(g===p.to_layer)g=p.from_layer;else{if(g!==p.from_layer)throw new Error(`trace "${t.connection_name}" has discontinuous leading vias`);g=p.to_layer}}const h=t.route[0];if(h.route_type!=="via")throw new Error(`trace "${t.connection_name}" has an invalid leading entry`);c={x:h.x,y:h.y,layer:g,width:o.width},r.push(c)}for(const g of t.route){if(g.route_type==="wire"){if(!Number.isFinite(g.x)||!Number.isFinite(g.y)||!Number.isFinite(g.width)||g.width<=0||Dg(g.layer,e)<0)throw new Error(`trace "${t.connection_name}" has an invalid wire point`);l=Math.max(l,g.width);const f={x:g.x,y:g.y,layer:g.layer,width:g.width};if(c){if(c.layer!==f.layer)throw new Error(`trace "${t.connection_name}" changes layers without a via`);Math.hypot(c.x-f.x,c.y-f.y)>vSe&&s.push({start:c,end:f,layer:f.layer,width:Math.max(c.width,f.width),connectionName:t.connection_name,terminal:null})}r.push(f),c=f;continue}if(g.route_type!=="via")throw new Error(`trace "${t.connection_name}" contains unsupported route geometry`);if(!c)throw new Error(`trace "${t.connection_name}" has a leading via`);const h=Dg(g.from_layer,e),d=Dg(g.to_layer,e),p=g.via_diameter??c.width;if(!Number.isFinite(g.x)||!Number.isFinite(g.y)||h<0||d<0||h===d||g.via_diameter!==void 0&&(!Number.isFinite(g.via_diameter)||g.via_diameter<=0)||g.via_hole_diameter!==void 0&&(!Number.isFinite(g.via_hole_diameter)||g.via_hole_diameter<=0||g.via_hole_diameter>=p))throw new Error(`trace "${t.connection_name}" has an invalid via`);const m=c.layer===g.from_layer?g.from_layer:c.layer===g.to_layer?g.to_layer:null;if(!m)throw new Error(`trace "${t.connection_name}" has a discontinuous via transition`);Math.hypot(c.x-g.x,c.y-g.y)>vSe&&s.push({start:c,end:g,layer:c.layer,width:c.width,connectionName:t.connection_name,terminal:null});const _=m===g.from_layer?g.to_layer:g.from_layer;A.push({...g,from_layer:m,to_layer:_}),a.push({x:g.x,y:g.y,layers:gH(m,_,e),diameter:p,connectionName:t.connection_name,terminal:r.length===1?"start":null}),c={x:g.x,y:g.y,layer:_,width:c.width},r.push(c)}if(r.length<2||s.length===0)throw new Error(`trace "${t.connection_name}" does not contain a routable path`);s[0].terminal=s.length===1?"both":"start",s[s.length-1].terminal=s.length===1?"both":"end";const u=a.at(-1);return u&&Math.hypot(u.x-i.x,u.y-i.y)<=vSe&&(u.terminal="end"),{source:t,points:r,segments:s,vias:a,transitions:A,width:l,viaDiameter:t.__postProcessingViaDiameter??l,...o.start_pcb_port_id?{startPortId:o.start_pcb_port_id}:{},...i.end_pcb_port_id?{endPortId:i.end_pcb_port_id}:{}}},wSe=(t,e)=>{const n=[],o=[],i=t.route.find(A=>A.route_type==="wire"),r=i?.route_type==="wire"?i.width:null,s={"0603":.95,1206:1.8,"1206x4_pair":1.8};let a=null;for(let A=0;A<t.route.length;A++){const c=t.route[A];if(c.route_type==="wire"){if(!Number.isFinite(c.x)||!Number.isFinite(c.y)||!Number.isFinite(c.width)||c.width<=0||Dg(c.layer,e)<0)throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" has an invalid wire`);if(a&&a.layer!==c.layer)throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" changes layer without a transition`);a&&n.push({start:a,end:c,layer:c.layer,width:Math.max(a.width,c.width),connectionName:t.connection_name,terminal:null}),a=c;continue}if(c.route_type==="via"){const h=gH(c.from_layer,c.to_layer,e),d=a,p=c.via_diameter??d?.width??r;if(!Number.isFinite(c.x)||!Number.isFinite(c.y)||h.length<2||p===null||!Number.isFinite(p)||p<=0||c.via_hole_diameter!==void 0&&(!Number.isFinite(c.via_hole_diameter)||c.via_hole_diameter<=0||p!==null&&c.via_hole_diameter>=p))throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" has an invalid via`);d&&Math.hypot(d.x-c.x,d.y-c.y)>1e-8&&n.push({start:d,end:c,layer:d.layer,width:d.width,connectionName:t.connection_name,terminal:null}),o.push({x:c.x,y:c.y,layers:h,diameter:p,connectionName:t.connection_name,terminal:A===0?"start":A===t.route.length-1?"end":null});const m=t.route.slice(A+1).find(f=>f.route_type==="wire"),_=d?.layer===c.from_layer?c.to_layer:d?.layer===c.to_layer?c.from_layer:m?.route_type!=="wire"||m.layer!==c.from_layer&&m.layer!==c.to_layer?null:m.layer;if(!_)throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" has a discontinuous via`);a={x:c.x,y:c.y,layer:_,width:d?.width??r??p};continue}if(c.route_type==="jumper"){const h=s[c.footprint];if(!Number.isFinite(c.start.x)||!Number.isFinite(c.start.y)||!Number.isFinite(c.end.x)||!Number.isFinite(c.end.y)||Dg(c.layer,e)<0)throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" has an invalid jumper`);if(a&&(a.layer!==c.layer||Math.hypot(a.x-c.start.x,a.y-c.start.y)>1e-8))throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" has a discontinuous jumper`);n.push({start:c.start,end:c.end,layer:c.layer,width:h,connectionName:t.connection_name,terminal:null}),a={...c.end,layer:c.layer,width:h};continue}const l=gH(c.from_layer,c.to_layer,e);if(!Number.isFinite(c.start.x)||!Number.isFinite(c.start.y)||!Number.isFinite(c.end.x)||!Number.isFinite(c.end.y)||!Number.isFinite(c.width)||c.width<=0||l.length<2)throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" has invalid through-obstacle copper`);if(a&&(a.layer!==c.from_layer&&a.layer!==c.to_layer||Math.hypot(a.x-c.start.x,a.y-c.start.y)>1e-8))throw new Error(`PostProcessingSolver: immutable trace "${t.connection_name}" has discontinuous through-obstacle copper`);for(const h of l)n.push({start:c.start,end:c.end,layer:h,width:c.width,connectionName:t.connection_name,terminal:null});const u=a,g=u?.layer===c.to_layer?c.from_layer:c.to_layer;a={...c.end,layer:g,width:c.width}}return{segments:n,vias:o}},nuo=(t,e)=>{const n=wSe(t,e);return[...n.segments.map((o,i)=>({connectionName:`${t.connection_name}#immutable-segment-${i}`,rootConnectionName:t.connection_name,traceThickness:o.width,viaDiameter:o.width,route:[{x:o.start.x,y:o.start.y,z:Dg(o.layer,e),traceThickness:o.width},{x:o.end.x,y:o.end.y,z:Dg(o.layer,e),traceThickness:o.width}],vias:[]})),...n.vias.map((o,i)=>({connectionName:`${t.connection_name}#immutable-via-${i}`,rootConnectionName:t.connection_name,traceThickness:o.diameter,viaDiameter:o.diameter,route:[],vias:[{x:o.x,y:o.y,zLayers:o.layers.map(r=>Dg(r,e))}]}))]},lb=t=>t.segments.reduce((e,n)=>e+Math.hypot(n.end.x-n.start.x,n.end.y-n.start.y),0),_9t=t=>{const{simpleRouteJson:e}=t.params,n=(c=>{const l=new Set(c.reroutedPairs.map(u=>u.connectionNames.join("\0")));return c.declaredPairs.filter(u=>{const g=u.connectionNames.map(p=>c.traces.filter(m=>m.connection_name===p));if(g.some(p=>p.length!==1))return!1;if(l.has(u.connectionNames.join("\0")))return!0;const h=g.map(p=>p[0]);if(h.some(p=>p.route.length<2||p.route[0]?.route_type!=="wire"||!p.route.every(m=>m.route_type==="wire"||m.route_type==="via")))return!1;const d=h.map(p=>lb(qf(p,c.layerCount)));return Math.abs(d[0]-d[1])>u.lengthTolerance+1e-7}).map(u=>structuredClone(u))})({traces:t.result.traces,declaredPairs:e.differentialPairs,reroutedPairs:t.result.reroutedPairs,layerCount:e.layerCount}),o=new Set(n.flatMap(c=>c.connectionNames)),i=[],r=[],s=[],a=new Set;for(let c=0;c<t.result.traces.length;c++){const l=t.result.traces[c];if(!o.has(l.connection_name))continue;const u=l.route.every(S=>S.route_type==="wire"||S.route_type==="via"),g=l.route[0]?.route_type==="wire";if(!u||!g)throw new Error(`PostProcessingSolver: rerouted connection "${l.connection_name}" cannot be bound to LengthMatchingSolver`);const h=qf(l,e.layerCount),d=l.route[0];if(d.route_type!=="wire")throw new Error(`PostProcessingSolver: trace "${l.connection_name}" lost its first wire during binding`);const p=[{x:d.x,y:d.y,z:Dg(d.layer,e.layerCount),traceThickness:d.width}],m=[],_=[];let f=d.layer,I=d.width;for(const S of l.route.slice(1)){if(S.route_type==="wire"){if(S.layer!==f)throw new Error(`PostProcessingSolver: trace "${l.connection_name}" changes layers without a via while binding`);p.push({x:S.x,y:S.y,z:Dg(S.layer,e.layerCount),traceThickness:S.width}),I=S.width;continue}if(S.route_type!=="via")throw new Error(`PostProcessingSolver: trace "${l.connection_name}" contains unsupported bound geometry`);const Q=f===S.from_layer?S.to_layer:f===S.to_layer?S.from_layer:null;if(!Q)throw new Error(`PostProcessingSolver: trace "${l.connection_name}" has a discontinuous bound via`);const w=p.at(-1);Math.hypot(w.x-S.x,w.y-S.y)>1e-8&&p.push({x:S.x,y:S.y,z:Dg(f,e.layerCount),traceThickness:I}),p.push({x:S.x,y:S.y,z:Dg(Q,e.layerCount),traceThickness:I}),m.push({x:S.x,y:S.y,zLayers:gH(S.from_layer,S.to_layer,e.layerCount).map(M=>Dg(M,e.layerCount))}),_.push({...S}),f=Q}if(p.length<2)throw new Error(`PostProcessingSolver: trace "${l.connection_name}" has no bound copper segments`);const C=Math.max(...p.map(S=>S.traceThickness??h.width)),y=h.viaDiameter,x=i.length;i.push({connectionName:l.connection_name,traceThickness:C,viaDiameter:y,route:p,vias:m});const E=p[0],B=p.at(-1);r.push({name:l.connection_name,pointsToConnect:[{x:E.x,y:E.y,layer:d.layer,...h.startPortId?{pcb_port_id:h.startPortId}:{}},{x:B.x,y:B.y,layer:h.points.at(-1).layer,...h.endPortId?{pcb_port_id:h.endPortId}:{}}]}),s.push({traceIndex:c,matchedRouteIndex:x,viaTemplates:_,startEndpoint:{...E},endEndpoint:{...B},...h.startPortId?{startPortId:h.startPortId}:{},...h.endPortId?{endPortId:h.endPortId}:{}}),a.add(l.connection_name)}for(const c of o)if(!a.has(c))throw new Error(`PostProcessingSolver: missing LengthMatchingSolver binding for rerouted connection "${c}"`);for(const c of t.result.traces)o.has(c.connection_name)||i.push(...nuo(c,e.layerCount));const A=Math.max(0,...i.filter(c=>c.route.length>=2).map(c=>c.traceThickness));return{solverParams:{hdRoutes:i,originalConnections:r,differentialPairs:n,obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount,obstacleMargin:A},traceBindings:s,baseTraces:structuredClone(t.result.traces)}},f9t=t=>{const e=new Map;for(const i of t.differentialPairs)for(const r of i.connectionNames){const s=t.hdRoutes.map((a,A)=>({route:a,hdRouteIndex:A})).filter(({route:a})=>a.connectionName===r);s.length===1&&e.set(s[0].hdRouteIndex,r)}const n=t.hdRoutes.map((i,r)=>{const s=[],a=new Map;for(let A=0;A<(i.jumpers?.length??0);A++){const c=i.jumpers[A],l=i.route.map((d,p)=>({point:d,index:p})).filter(({point:d})=>Math.hypot(d.x-c.start.x,d.y-c.start.y)<=1e-8).map(({index:d})=>d),u=i.route.map((d,p)=>({point:d,index:p})).filter(({point:d})=>Math.hypot(d.x-c.end.x,d.y-c.end.y)<=1e-8).map(({index:d})=>d),g=[...l.flatMap(d=>u.filter(p=>p>d).map(p=>({startIndex:d,endIndex:p}))),...u.flatMap(d=>l.filter(p=>p>d).map(p=>({startIndex:d,endIndex:p})))];if(g.length!==1)throw new Error(`PostProcessingSolver: immutable HD route "${i.connectionName}" has an ambiguous jumper traversal`);const h=g[0];if(a.has(h.startIndex)||[...a.values()].some(({endIndex:d})=>h.startIndex<d||h.endIndex<=d))throw new Error(`PostProcessingSolver: immutable HD route "${i.connectionName}" has overlapping or unordered jumpers`);a.set(h.startIndex,{endIndex:h.endIndex,jumperIndex:A})}if(i.route.length>0){const A=i.route[0];s.push({route_type:"wire",x:A.x,y:A.y,width:A.traceThickness??i.traceThickness,layer:w7(A.z,t.layerCount)});for(let g=0;g<i.route.length-1;g++){const h=i.route[g],d=a.get(g);if(d){const f=i.route[d.endIndex],I=i.jumpers[d.jumperIndex];if(h.z!==f.z)throw new Error(`PostProcessingSolver: immutable HD route "${i.connectionName}" changes layers through a jumper`);s.push({route_type:"jumper",start:{x:h.x,y:h.y},end:{x:f.x,y:f.y},footprint:I.footprint,layer:w7(h.z,t.layerCount)}),s.push({route_type:"wire",x:f.x,y:f.y,width:f.traceThickness??i.traceThickness,layer:w7(f.z,t.layerCount)}),g=d.endIndex-1;continue}const p=i.route[g+1],m=w7(h.z,t.layerCount),_=w7(p.z,t.layerCount);h.z!==p.z&&(h.toNextSegmentType==="through_obstacle"?s.push({route_type:"through_obstacle",start:{x:h.x,y:h.y},end:{x:p.x,y:p.y},from_layer:m,to_layer:_,width:h.traceThickness??i.traceThickness}):s.push({route_type:"via",x:p.x,y:p.y,from_layer:m,to_layer:_,via_diameter:i.viaDiameter})),s.push({route_type:"wire",x:p.x,y:p.y,width:p.traceThickness??i.traceThickness,layer:_})}const c=s.filter(g=>g.route_type==="wire"),l=i.startPcbPortId??i.route[0]?.pcb_port_id,u=i.endPcbPortId??i.route.at(-1)?.pcb_port_id;l&&c[0]&&(c[0].start_pcb_port_id=l),u&&c.at(-1)&&(c.at(-1).end_pcb_port_id=u)}return{type:"pcb_trace",pcb_trace_id:`post_processing_hd_route_${r}`,connection_name:i.connectionName,__postProcessingViaDiameter:i.viaDiameter,route:s}}),o=structuredClone(t.obstacles);for(let i=0;i<t.hdRoutes.length;i++){const r=t.hdRoutes[i],s=new Set([r.connectionName,r.rootConnectionName,r.startPcbPortId,r.endPcbPortId,r.route[0]?.pcb_port_id,r.route.at(-1)?.pcb_port_id,e.get(i)].filter(a=>a!==void 0));for(const a of o)a.connectedTo.some(A=>s.has(A))&&(a.connectedTo=[...new Set([...a.connectedTo,...s])])}return{params:{simpleRouteJson:{traces:n,differentialPairs:structuredClone(t.differentialPairs),obstacles:o,bounds:structuredClone(t.bounds),layerCount:t.layerCount},...t.routingGrid?{routingGrid:structuredClone(t.routingGrid)}:{}},routeBindings:[...e.entries()].map(([i,r])=>({hdRouteIndex:i,traceIndex:i,internalConnectionName:r})),sourceHdRoutes:structuredClone(t.hdRoutes)}};function I9t(t){const e=structuredClone(t.model.sourceHdRoutes);for(const n of t.model.routeBindings){const o=t.binding.traceBindings.find(A=>A.traceIndex===n.traceIndex);if(!o)continue;const i=t.result.matchedHdRoutes[o.matchedRouteIndex],r=e[n.hdRouteIndex];if(!i||!r)throw new Error(`PostProcessingSolver: missing matched or source HD route for "${n.internalConnectionName}"`);if(i.connectionName!==n.internalConnectionName)throw new Error(`PostProcessingSolver: matched HD binding changed "${n.internalConnectionName}" to "${i.connectionName}"`);const s=i.route.map(A=>({...A})),a=(A,c)=>{if(A&&c&&(c.pcb_port_id&&(A.pcb_port_id=c.pcb_port_id),c.insideJumperPad&&t.rejectInsideJumperPad))throw new Error(`PostProcessingSolver: cannot restore jumper-pad metadata on rerouted connection "${n.internalConnectionName}"`)};a(s[0],r.route[0]),a(s.at(-1),r.route.at(-1)),e[n.hdRouteIndex]={...r,route:s,vias:structuredClone(i.vias)}}return{hdRoutes:e,postProcessingErrors:[]}}var Dv=class extends Error{connectionNames;reason;constructor(t){super(`PostProcessingSolver: differential pair ${t.connectionNames.join("/")} ${t.message}`),this.name="DifferentialPairRoutingError",this.connectionNames=[t.connectionNames[0],t.connectionNames[1]],this.reason=t.reason}},PSe=class extends Error{connectionNames;reason;constructor(t){super(t.message),this.name="PostProcessingConstraintError",this.connectionNames=[...t.connectionNames],this.reason=t.reason}},C9t=class extends Error{reason="grid-capacity-exhausted";constructor(t){super(t),this.name="PostProcessingGridCapacityError"}},y9t=t=>{const e=75e3*t.simpleRouteJson.differentialPairs.length;if(!Number.isSafeInteger(e))throw new Error("PostProcessingSolver: derived rerouting iteration bound exceeds the safe integer range");const n=Math.min(e,8e4);return Math.max(1,n)},nce=t=>structuredClone(t),x9t=(t,e,n)=>{const o=c=>{const l=-(e.ccwRotationDegrees??0)*Math.PI/180,u=c.x-e.center.x,g=c.y-e.center.y;return{x:u*Math.cos(l)-g*Math.sin(l),y:u*Math.sin(l)+g*Math.cos(l)}},i=o(t.start),r=o(t.end),s=e.width/2+n,a=e.height/2+n;if(Math.abs(i.x)<=s&&Math.abs(i.y)<=a||Math.abs(r.x)<=s&&Math.abs(r.y)<=a)return!0;const A=[{x:-s,y:-a},{x:s,y:-a},{x:s,y:a},{x:-s,y:a}];return A.some((c,l)=>uB(i,r,c,A[(l+1)%A.length])<=1e-7)},ouo=t=>{const e=[],n=[];for(const u of t.immutableTraces){const g=wSe(u,t.layerCount);e.push(...g.segments),n.push(...g.vias)}const o=Array.from({length:t.layerCount},()=>[]);for(const u of e){const g=Dg(u.layer,t.layerCount);o[g].push(u)}const i=(u,g)=>Math.hypot(u.x-g.x,u.y-g.y)<=1e-8,r=(u,g,h)=>{const d=h.x-g.x,p=h.y-g.y,m=d*d+p*p,_=m===0?0:Math.max(0,Math.min(1,((u.x-g.x)*d+(u.y-g.y)*p)/m));return Math.hypot(u.x-g.x-d*_,u.y-g.y-p*_)},s=(u,g,h)=>{const d=-(g.ccwRotationDegrees??0)*Math.PI/180,p=u.x-g.center.x,m=u.y-g.center.y,_=p*Math.cos(d)-m*Math.sin(d),f=p*Math.sin(d)+m*Math.cos(d);return Math.abs(_)<=g.width/2+h&&Math.abs(f)<=g.height/2+h},a=(u,g)=>{const h=Dg(g,t.layerCount);return AH(u,t.layerCount).includes(h)},A=(u,g,h)=>{const d=((m,_,f)=>{const I=Math.hypot(_.x,_.y);if(I<=1e-10)throw new Error("PostProcessingSolver: cannot orient terminal fanout on a zero-length spine");const C=-_.y/I*t.side*t.centerlineSpacing/2,y=_.x/I*t.side*t.centerlineSpacing/2,x=f==="start"?[t.firstStartTerminal,t.secondStartTerminal]:[t.firstEndTerminal,t.secondEndTerminal],E=[t.firstWidth,t.secondWidth],B=[t.firstConnectionName,t.secondConnectionName];return x.map((S,Q)=>{const w=Q===0?1:-1,M={x:m.x+C*w,y:m.y+y*w};return{start:f==="start"?S:M,end:f==="start"?M:S,layer:m.layer,width:E[Q],connectionName:B[Q],terminal:f}})})(u,g,h),p=d.map(m=>h==="start"?m.end:m.start);return d.every(c)&&p.every((m,_)=>t.obstacles.every(f=>!a(f,u.layer)||!s(m,f,1.5*d[_].width+(t.terminalMiterMargin??0))))&&uB(d[0].start,d[0].end,d[1].start,d[1].end)>=d[0].width/2+d[1].width/2-1e-7},c=u=>{const g=u.width/2,h=g+u.width,d=Dg(u.layer,t.layerCount),p=Math.min(u.start.x,u.end.x),m=Math.max(u.start.x,u.end.x),_=Math.min(u.start.y,u.end.y),f=Math.max(u.start.y,u.end.y);for(const I of[u.start,u.end])if(I.x-g<t.bounds.minX||I.x+g>t.bounds.maxX||I.y-g<t.bounds.minY||I.y+g>t.bounds.maxY)return!1;for(const I of t.obstacles){if(!a(I,u.layer))continue;const C=Math.hypot(I.width/2+h,I.height/2+h);if(m<I.center.x-C||p>I.center.x+C||f<I.center.y-C||_>I.center.y+C)continue;const[y,x]=u.connectionName===t.firstConnectionName?[t.firstStartTerminal,t.firstEndTerminal]:[t.secondStartTerminal,t.secondEndTerminal],E=s(y,I,0)&&(s(u.start,I,g+u.width)||s(u.end,I,g+u.width))&&Math.hypot(u.end.x-y.x,u.end.y-y.y)>=Math.hypot(u.start.x-y.x,u.start.y-y.y),B=s(x,I,0)&&(s(u.start,I,g+u.width)||s(u.end,I,g+u.width))&&Math.hypot(u.end.x-x.x,u.end.y-x.y)<=Math.hypot(u.start.x-x.x,u.start.y-x.y);if(!(I.connectedTo.includes(u.connectionName)&&(E||B))&&x9t(u,I,g+u.width))return!1}for(const I of o[d]){const C=u.width/2+I.width/2+Math.max(u.width,I.width);if(!(m+C<Math.min(I.start.x,I.end.x)||p-C>Math.max(I.start.x,I.end.x)||f+C<Math.min(I.start.y,I.end.y)||_-C>Math.max(I.start.y,I.end.y))&&uB(u.start,u.end,I.start,I.end)<C)return!1}for(const I of n)if(I.layers.includes(u.layer)&&r(I,u.start,u.end)<u.width/2+I.diameter/2+u.width)return!1;return!0},l=u=>{const g=u.diameter/2;if(u.x-g<t.bounds.minX||u.x+g>t.bounds.maxX||u.y-g<t.bounds.minY||u.y+g>t.bounds.maxY)return!1;for(const h of t.obstacles)if(u.layers.some(d=>a(h,d))&&!(u.terminal!==null&&h.connectedTo.includes(u.connectionName)&&s(u,h,0))&&s(u,h,g+u.diameter))return!1;for(const h of e){if(!u.layers.includes(h.layer))continue;const d=g+h.width/2+Math.max(u.diameter,h.width);if(r(u,h.start,h.end)<d)return!1}for(const h of n){if(!h.layers.some(p=>u.layers.includes(p)))continue;const d=g+h.diameter/2+Math.max(u.diameter,h.diameter);if(Math.hypot(u.x-h.x,u.y-h.y)<d)return!1}return!0};return{isEdgeValid:(u,g)=>{if(u.layer!==g.layer||!((d,p)=>{const m=Math.hypot(p.x-d.x,p.y-d.y);if(m===0)return[];const _=-(p.y-d.y)/m*t.side*t.centerlineSpacing/2,f=(p.x-d.x)/m*t.side*t.centerlineSpacing/2,I=i(d,t.start),C=i(p,t.end),y=t.terminalFanout?I&&C?"both":I?"start":C?"end":null:null,x=I&&t.terminalFanout?t.firstStartTerminal:{x:d.x+_,y:d.y+f},E=C&&t.terminalFanout?t.firstEndTerminal:{x:p.x+_,y:p.y+f},B=I&&t.terminalFanout?t.secondStartTerminal:{x:d.x-_,y:d.y-f},S=C&&t.terminalFanout?t.secondEndTerminal:{x:p.x-_,y:p.y-f};return[{start:x,end:E,layer:d.layer,width:t.firstWidth,connectionName:t.firstConnectionName,terminal:y},{start:B,end:S,layer:d.layer,width:t.secondWidth,connectionName:t.secondConnectionName,terminal:y}]})(u,g).every(c))return!1;if(t.terminalFanout||t.terminalMiterMargin===void 0)return!0;const h={x:g.x-u.x,y:g.y-u.y};return!(i(u,t.start)&&!A(u,h,"start"))&&!(i(g,t.end)&&!A(g,h,"end"))},isTerminalFanoutValid:A,isViaValid:(u,g,h)=>{const d=Math.hypot(h.x,h.y);if(d<=1e-10)throw new Error("PostProcessingSolver: cannot orient a coupled via on a zero-length spine");const p=gH(u.layer,g,t.layerCount),m=-h.y/d*t.side*t.centerlineSpacing/2,_=h.x/d*t.side*t.centerlineSpacing/2,f=i(u,t.start)?"start":i(u,t.end)?"end":null;return[{x:u.x+m,y:u.y+_,layers:p,diameter:t.firstViaDiameter,connectionName:t.firstConnectionName,terminal:f},{x:u.x-m,y:u.y-_,layers:p,diameter:t.secondViaDiameter,connectionName:t.secondConnectionName,terminal:f}].every(l)}}},MSe=(t,e,n)=>{const i=(u,g)=>{const h=-(g.ccwRotationDegrees??0)*Math.PI/180,d=u.x-g.center.x,p=u.y-g.center.y;return{x:d*Math.cos(h)-p*Math.sin(h),y:d*Math.sin(h)+p*Math.cos(h)}},r=(u,g,h)=>{const d=h.x-g.x,p=h.y-g.y,m=d*d+p*p,_=m===0?0:Math.max(0,Math.min(1,((u.x-g.x)*d+(u.y-g.y)*p)/m));return Math.hypot(u.x-(g.x+_*d),u.y-(g.y+_*p))},s=(u,g,h)=>{const d=Dg(g,h);return AH(u,h).includes(d)},a=(u,g,h)=>{const d=u.width/2;if(u.start.x-d<g.bounds.minX-1e-7||u.start.x+d>g.bounds.maxX+1e-7||u.start.y-d<g.bounds.minY-1e-7||u.start.y+d>g.bounds.maxY+1e-7||u.end.x-d<g.bounds.minX-1e-7||u.end.x+d>g.bounds.maxX+1e-7||u.end.y-d<g.bounds.minY-1e-7||u.end.y+d>g.bounds.maxY+1e-7)return!1;for(const p of g.obstacles){if(!s(p,u.layer,g.layerCount))continue;const m=u.terminal==="both"?[u.start,u.end]:u.terminal==="start"?[u.start]:u.terminal==="end"?[u.end]:[];if(!(p.connectedTo.includes(u.connectionName)&&m.some(_=>{const f=i(_,p);return Math.abs(f.x)<=p.width/2+1e-7&&Math.abs(f.y)<=p.height/2+1e-7}))&&x9t(u,p,d+u.width))return!1}for(const p of h.segments){if(p.layer!==u.layer)continue;const m=u.width/2+p.width/2+Math.max(u.width,p.width);if(uB(u.start,u.end,p.start,p.end)<m-1e-7)return!1}for(const p of h.vias){if(!p.layers.includes(u.layer))continue;const m=u.width/2+p.diameter/2+u.width;if(r(p,u.start,u.end)<m-1e-7)return!1}return!0},A=(u,g,h)=>{const d=u.diameter/2;if(u.x-d<g.bounds.minX-1e-7||u.x+d>g.bounds.maxX+1e-7||u.y-d<g.bounds.minY-1e-7||u.y+d>g.bounds.maxY+1e-7)return!1;for(const p of g.obstacles){if(!u.layers.some(_=>s(p,_,g.layerCount)))continue;const m=i(u,p);if(!(u.terminal!==null&&p.connectedTo.includes(u.connectionName)&&Math.abs(m.x)<=p.width/2+1e-7&&Math.abs(m.y)<=p.height/2+1e-7)&&Math.abs(m.x)<=p.width/2+d+u.diameter&&Math.abs(m.y)<=p.height/2+d+u.diameter)return!1}for(const p of h.segments){if(!u.layers.includes(p.layer))continue;const m=d+p.width/2+Math.max(u.diameter,p.width);if(r(u,p.start,p.end)<m-1e-7)return!1}for(const p of h.vias){if(!p.layers.some(_=>u.layers.includes(_)))continue;const m=d+p.diameter/2+Math.max(u.diameter,p.diameter);if(Math.hypot(u.x-p.x,u.y-p.y)<m-1e-7)return!1}return!0},c=u=>{for(let g=0;g<u.segments.length;g++){const h=u.segments[g];for(let d=g+2;d<u.segments.length;d++){const p=u.segments[d];if(h.layer===p.layer&&!(u.segments.slice(g+1,d).reduce((m,_)=>m+Math.hypot(_.end.x-_.start.x,_.end.y-_.start.y),0)<=h.width+p.width+1e-7)&&uB(h.start,h.end,p.start,p.end)<h.width/2+p.width/2-1e-7)return!0}}for(const g of u.vias)for(const h of u.segments)if(g.layers.includes(h.layer)&&!(Math.hypot(g.x-h.start.x,g.y-h.start.y)<=1e-7||Math.hypot(g.x-h.end.x,g.y-h.end.y)<=1e-7)&&r(g,h.start,h.end)<g.diameter/2+h.width/2-1e-7)return!0;return!1},l=((u,g)=>{const h=[],d=[];for(const p of u){const m=wSe(p,g);h.push(...m.segments),d.push(...m.vias)}return{segments:h,vias:d}})(n.immutableTraces,n.layerCount);if(!((u,g)=>{for(const h of u.segments)for(const d of g.segments){if(h.layer!==d.layer)continue;const p=h.width/2+d.width/2;if(uB(h.start,h.end,d.start,d.end)<p-1e-7)return!1}for(const[h,d]of[[u.vias,g.segments],[g.vias,u.segments]])for(const p of h)for(const m of d)if(p.layers.includes(m.layer)&&r(p,m.start,m.end)<p.diameter/2+m.width/2-1e-7)return!1;for(const h of u.vias)for(const d of g.vias)if(h.layers.some(p=>d.layers.includes(p))&&Math.hypot(h.x-d.x,h.y-d.y)<h.diameter/2+d.diameter/2-1e-7)return!1;return!0})(t,e)||c(t)||c(e))return!1;for(const u of[t,e])if(u.segments.some(g=>!a(g,n,l))||u.vias.some(g=>!A(g,n,l)))return!1;return!0},E9t=[{x:1,y:0},{x:1,y:1},{x:0,y:1},{x:-1,y:1},{x:-1,y:0},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1}],iuo=class{constructor(t){this.input=t;const{bounds:e,grid:n}=t,o={minX:e.minX+n.outerPerimeterWidth,maxX:e.maxX-n.outerPerimeterWidth,minY:e.minY+n.outerPerimeterWidth,maxY:e.maxY-n.outerPerimeterWidth},i=this.createAxis(e.minX,e.maxX,n.outerGridStep,[o.minX,o.maxX]),r=this.createAxis(e.minY,e.maxY,n.outerGridStep,[o.minY,o.maxY]),s=this.createAxis(o.minX,o.maxX,n.innerGridStep,[],t.start.x),a=this.createAxis(o.minY,o.maxY,n.innerGridStep,[],t.start.y),A=this.createGrid(i,r,u=>u.x<=o.minX||u.x>=o.maxX||u.y<=o.minY||u.y>=o.maxY),c=this.createGrid(s,a,()=>!0);this.connectLocalNeighbors(A),this.connectLocalNeighbors(c);for(const u of["left","right","bottom","top"])this.connectBoundaries(u,A,c,o);const l=this.nodes.map((u,g)=>g);this.connectEndpoint(t.start,l),this.connectEndpoint(t.end,l)}input;nodes=[];nodeIdByPoint=new Map;endpointNodeIdByPoint=new Map;getPlanarNeighbors(t){const e=this.endpointNodeIdByPoint.get(this.exactKeyFor(t))??this.nodeIdByPoint.get(this.keyFor(t));if(e===void 0)throw new Error(`PostProcessingSolver: coupled path point (${t.x}, ${t.y}) is not on the composite grid`);return[...this.nodes[e].neighborIds].map(n=>({...this.nodes[n].point,layer:t.layer}))}getNodeCount(){return this.nodes.length}getSearchStateCountUpperBound(t){const e=this.nodes.reduce((n,o)=>n+o.neighborIds.size,0)*t+1;if(!Number.isSafeInteger(e))throw new Error("PostProcessingSolver: composite-grid search-state bound exceeds the safe integer range");return e}createAxis(t,e,n,o,i=t){const r=[t,e,...o].map(a=>({value:a,fixed:!0}));for(let a=Math.ceil((t-i)/n);i+a*n<e-1e-8;a++)r.push({value:i+a*n,fixed:!1});r.sort((a,A)=>a.value-A.value||Number(A.fixed)-Number(a.fixed));const s=[];for(const a of r){const A=s.at(-1);!A||Math.abs(a.value-A.value)>1e-8?s.push(a):a.fixed&&!A.fixed&&(s[s.length-1]=a)}return s.map(a=>a.value)}createGrid(t,e,n){return e.map(o=>t.map(i=>{const r={x:i,y:o};return n(r)?this.addNode(r):null}))}connectLocalNeighbors(t){for(let e=0;e<t.length;e++)for(let n=0;n<(t[e]?.length??0);n++){const o=t[e][n];if(o!==null)for(const i of E9t){const r=t[e+i.y]?.[n+i.x];r!=null&&this.connect(o,r)}}}connectBoundaries(t,e,n,o){const i=t==="left"?o.minX:t==="right"?o.maxX:t==="bottom"?o.minY:o.maxY,r=t==="left"||t==="right",s=l=>Math.abs((r?l.x:l.y)-i)<=1e-8,a=l=>{const u=new Set;for(const g of l)for(const h of g)h!==null&&s(this.nodes[h].point)&&u.add(h);return[...u].sort((g,h)=>{const d=this.nodes[g].point,p=this.nodes[h].point;return(r?d.y-p.y:d.x-p.x)||g-h})},A=a(e),c=a(n);if(A.length===0||c.length===0)throw new Error(`PostProcessingSolver: composite grid has no ${t} boundary bridge candidates`);for(const l of A)this.connect(l,this.findNearestAlongBoundary(l,c,r));for(const l of c)this.connect(l,this.findNearestAlongBoundary(l,A,r))}findNearestAlongBoundary(t,e,n){const o=this.nodes[t].point;let i=e[0],r=Number.POSITIVE_INFINITY;for(const s of e){const a=this.nodes[s].point,A=Math.abs(n?o.y-a.y:o.x-a.x);(A<r-1e-8||Math.abs(A-r)<=1e-8&&s<i)&&(r=A,i=s)}return i}connectEndpoint(t,e){const n=this.nodeIdByPoint.get(this.keyFor(t)),o=n===void 0?null:this.nodes[n].point,i=o?.x===t.x&&o.y===t.y?n:this.nodes.push({point:{x:t.x,y:t.y},neighborIds:new Set})-1;this.endpointNodeIdByPoint.set(this.exactKeyFor(t),i);const r=(s,a)=>{const A=this.nodes[s].point,c=e.filter(l=>l!==s).map(l=>({nodeId:l,distance:Math.hypot(this.nodes[l].point.x-A.x,this.nodes[l].point.y-A.y)})).filter(({distance:l})=>l>1e-10).sort((l,u)=>l.distance-u.distance||l.nodeId-u.nodeId).slice(0,a);if(c.length===0)throw new Error("PostProcessingSolver: composite grid has no endpoint connection candidates");for(const{nodeId:l}of c)this.connect(s,l)};r(i,8);for(const s of E9t){const a={x:t.x+s.x*this.input.grid.innerGridStep,y:t.y+s.y*this.input.grid.innerGridStep};if(a.x<this.input.bounds.minX||a.x>this.input.bounds.maxX||a.y<this.input.bounds.minY||a.y>this.input.bounds.maxY)continue;const A=this.addNode(a);this.connect(i,A),r(A,4)}}addNode(t){const e=this.keyFor(t),n=this.nodeIdByPoint.get(e);if(n!==void 0)return n;const o=this.nodes.length;return this.nodes.push({point:{x:t.x,y:t.y},neighborIds:new Set}),this.nodeIdByPoint.set(e,o),o}connect(t,e){if(t===e)return;const n=this.nodes[t],o=this.nodes[e];n.neighborIds.add(e),o.neighborIds.add(t)}keyFor(t){const e=Object.is(t.x,-0)?0:t.x,n=Object.is(t.y,-0)?0:t.y;return`${e.toFixed(12)}:${n.toFixed(12)}`}exactKeyFor(t){return`${Object.is(t.x,-0)?0:t.x}:${Object.is(t.y,-0)?0:t.y}`}},ruo=class{constructor(t){if(this.input=t,this.startLayer=Dg(t.start.layer,t.layerCount),this.endLayer=Dg(t.end.layer,t.layerCount),this.grid=new iuo(t),this.maxSearchStates=this.grid.getSearchStateCountUpperBound(t.layerCount),this.exploredStateLimit=Math.min(this.maxSearchStates,2e4),this.startLayer<0||this.endLayer<0)return this.queue=[],void(this.status="exhausted");const e={point:t.start,direction:null,cost:0,estimate:this.estimate(t.start),parent:null,sequence:0};this.queue=[e],this.bestCosts.set(this.keyFor(t.start,null),0)}input;queue;bestCosts=new Map;startLayer;endLayer;grid;maxSearchStates;exploredStateLimit;current=null;result=null;status="searching";explored=0;nextSequence=1;isComplete(){return this.status!=="searching"}getPath(){return this.result}getPreviewPath(){return this.current?this.createPath(this.current):[this.input.start]}getExploredCount(){return this.explored}getProgress(){return this.status!=="searching"?1:Math.min(.99,this.explored/this.exploredStateLimit)}getGridNodeCount(){return this.grid.getNodeCount()}step(){if(this.status!=="searching")return;const t=this.popQueue();if(!t)return void(this.status="exhausted");const e=this.bestCosts.get(this.keyFor(t.point,t.direction));if(e===void 0)throw new Error("PostProcessingSolver: coupled path queue contains an untracked state");if(t.cost>e+1e-10)this.queue.length===0&&(this.status="exhausted");else{if(this.current=t,this.explored++,this.explored>this.maxSearchStates)throw new Error(`PostProcessingSolver: coupled path search exceeded its ${this.maxSearchStates}-state graph invariant limit`);if(this.isEnd(t.point)){const n=this.createPath(t);return n[n.length-1]=this.input.end,this.result=this.simplifyPath(n),void(this.status="found")}this.explored>=this.exploredStateLimit?this.status="exhausted":(this.enqueuePlanarNeighbors(t),this.enqueueViaNeighbors(t),this.queue.length===0&&(this.status="exhausted"))}}isEnd(t){return t.layer===this.input.end.layer&&t.x===this.input.end.x&&t.y===this.input.end.y}estimate(t){return Math.hypot(t.x-this.input.end.x,t.y-this.input.end.y)+3*Math.abs(Dg(t.layer,this.input.layerCount)-this.endLayer)}keyFor(t,e){return`${Object.is(t.x,-0)?0:t.x}:${Object.is(t.y,-0)?0:t.y}:${t.layer}:${e?.key??"start"}`}createDirection(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.hypot(n,o);if(i<=1e-10)throw new Error("PostProcessingSolver: composite grid produced a zero-length planar edge");const r=n/i,s=o/i;return{x:r,y:s,key:`${r.toFixed(6)}:${s.toFixed(6)}`}}createPath(t){const e=[];let n=t;for(;n;)e.push(n.point),n=n.parent;return e.reverse()}simplifyPath(t){return t.filter((e,n)=>{if(n===0||n===t.length-1)return!0;const o=t[n-1],i=t[n+1],r={x:e.x-o.x,y:e.y-o.y},s={x:i.x-e.x,y:i.y-e.y},a=r.x*s.y-r.y*s.x,A=Math.hypot(r.x,r.y)*Math.hypot(s.x,s.y);return Math.abs(a)>1e-10*A||e.layer!==o.layer||e.layer!==i.layer})}hasHigherQueuePriority(t,e){return t.estimate!==e.estimate?t.estimate<e.estimate:t.cost!==e.cost?t.cost<e.cost:t.point.x!==e.point.x?t.point.x<e.point.x:t.point.y!==e.point.y?t.point.y<e.point.y:t.point.layer!==e.point.layer?t.point.layer<e.point.layer:t.sequence<e.sequence}pushQueue(t){this.queue.push(t);let e=this.queue.length-1;for(;e>0;){const n=Math.floor((e-1)/2),o=this.queue[n];if(!this.hasHigherQueuePriority(t,o))break;this.queue[e]=o,e=n}this.queue[e]=t}popQueue(){const t=this.queue[0],e=this.queue.pop();if(!t||!e||this.queue.length===0)return t;let n=0;for(;;){const o=2*n+1;if(o>=this.queue.length)break;const i=o+1;let r=o;i<this.queue.length&&this.hasHigherQueuePriority(this.queue[i],this.queue[o])&&(r=i);const s=this.queue[r];if(!this.hasHigherQueuePriority(s,e))break;this.queue[n]=s,n=r}return this.queue[n]=e,t}enqueuePlanarNeighbors(t){for(const e of this.grid.getPlanarNeighbors(t.point)){if(!this.input.isEdgeValid(t.point,e))continue;const n=this.createDirection(t.point,e),o=t.direction===null||t.direction.key===n.key?0:.18,i=t.cost+Math.hypot(e.x-t.point.x,e.y-t.point.y)+o,r=this.keyFor(e,n);(this.bestCosts.get(r)??Number.POSITIVE_INFINITY)<=i||(this.bestCosts.set(r,i),this.pushQueue({point:e,direction:n,cost:i,estimate:i+this.estimate(e),parent:t,sequence:this.nextSequence++}))}}enqueueViaNeighbors(t){if(!t.direction)return;const e=Dg(t.point.layer,this.input.layerCount);for(const n of[e-1,e+1]){if(n<0||n>=this.input.layerCount)continue;const o=w7(n,this.input.layerCount);if(!this.input.isViaValid(t.point,o,t.direction))continue;const i={...t.point,layer:o},r=t.cost+4,s=this.keyFor(i,t.direction);(this.bestCosts.get(s)??Number.POSITIVE_INFINITY)<=r||(this.bestCosts.set(s,r),this.pushQueue({point:i,direction:t.direction,cost:r,estimate:r+this.estimate(i),parent:t,sequence:this.nextSequence++}))}}},B9t=t=>{const e=Math.min(t.bounds.maxX-t.bounds.minX,t.bounds.maxY-t.bounds.minY),n=t.config?.innerGridStep??t.defaultInnerGridStep,o=t.config?.outerGridStep??4*n,i=t.config?.outerPerimeterWidth??Math.min(o,e/4);if(!Number.isFinite(n)||n<1e-4)throw new Error("PostProcessingSolver: routingGrid.innerGridStep must be finite and at least 0.0001");if(!Number.isFinite(o)||o<=n)throw new Error("PostProcessingSolver: routingGrid.outerGridStep must be finite and greater than innerGridStep");if(!Number.isFinite(i)||i<=0||2*i>=e)throw new Error("PostProcessingSolver: routingGrid.outerPerimeterWidth must be finite, positive, and less than half the smaller board extent");const r=t.bounds.maxX-t.bounds.minX,s=t.bounds.maxY-t.bounds.minY;if((Math.ceil(r/o)+4)*(Math.ceil(s/o)+4)+(Math.ceil((r-2*i)/n)+2)*(Math.ceil((s-2*i)/n)+2)+18>25e4)throw new C9t("PostProcessingSolver: valid input exceeds the 250000-node optimization grid capacity");return{innerGridStep:n,outerGridStep:o,outerPerimeterWidth:i}},b9t=t=>{const e=-t.pathDirection.y,n=t.pathDirection.x,o=Math.tan(t.maximumTurnDegrees*Math.PI/180),i=Math.max(0,...t.lanes.map(({point:A,polarity:c})=>{const l=A.x-t.anchor.x,u=A.y-t.anchor.y,g=l*t.escapeDirection.x+u*t.escapeDirection.y,h=l*e+u*n,d=c*t.side*t.centerlineSpacing/2;return g+Math.abs(h-d)/o})),r=t.maxUncoupledLength??i;if(i>r+1e-8)return null;const s=Math.max(.05,Math.min(.25,t.searchStep/2)),a=Math.max(1,Math.ceil((r-i)/s)+1);for(let A=0;A<a;A++){const c=Math.min(r,i+A*s),l={x:t.anchor.x+t.escapeDirection.x*c,y:t.anchor.y+t.escapeDirection.y*c,layer:t.anchor.layer};if(t.lanes.every(({point:u,polarity:g})=>{const h=g*t.side*t.centerlineSpacing/2,d=l.x+e*h,p=l.y+n*h;return t.maxUncoupledLength===void 0||Math.hypot(d-u.x,p-u.y)<=t.maxUncoupledLength+1e-8})&&t.isValid(l))return l}return null},suo=[.75,.5,1,.25,1.25],oce=100,auo=class{constructor(t){this.input=t,this.pairName=t.pair.connectionNames.join("/"),this.prepared=this.prepare()}input;pairName;prepared;candidates=[];result=null;search=null;nextAttempt=0;exploredNodeCount=0;isComplete(){return this.result!==null}getResult(){if(!this.result)throw new Error(`PostProcessingSolver: differential pair ${this.pairName} is not complete`);return this.result}getPreviewPath(){return this.search?.getPreviewPath()??null}getProgress(){if(this.result)return 1;const t=this.prepared.attempts.length,e=this.search?.getProgress()??0;return Math.min(.99,(this.nextAttempt+e)/t)}getStats(){return{phase:this.search?"searching":"candidate-selection",pair:this.pairName,attemptIndex:this.nextAttempt,attemptCount:this.prepared.attempts.length,exploredNodeCount:this.exploredNodeCount+(this.search?.getExploredCount()??0),gridNodeCount:this.search?.getGridNodeCount()??0,acceptedCandidateCount:this.candidates.length}}step(){if(this.result)return;const t=this.prepared;if(!this.search){const i=t.attempts[this.nextAttempt];return i?void(this.search=new ruo(i.input)):void this.complete()}if(this.search.step(),!this.search.isComplete())return;const e=this.search.getPath();this.exploredNodeCount+=this.search.getExploredCount();const n=t.attempts[this.nextAttempt];if(!n)throw new Error(`PostProcessingSolver: differential pair ${this.pairName} lost its active attempt`);if(this.search=null,this.nextAttempt++,!e)return;const o=(i=>{const r=(S,Q)=>Math.hypot(S.x-Q.x,S.y-Q.y)<=1e-8;if(i.path.length<2)throw new Error("PostProcessingSolver: coupled path has fewer than two stations");const s=(S,Q)=>{for(let w=S+Q;w>=0&&w<i.path.length;w+=Q){const M=i.path[w];if(!r(M,i.path[S]))return M}return null},a=S=>{const Q=i.path[S],w=s(S,-1),M=s(S,1),k=(J,oe)=>{const ie=oe.x-J.x,ne=oe.y-J.y,le=Math.hypot(ie,ne);if(le<=1e-10)throw new Error("PostProcessingSolver: cannot offset a zero-length spine");return{x:-ne/le,y:ie/le}},R=i.side*i.centerlineSpacing/2;if(!w||!M){const J=k(w??Q,M??Q);return{x:J.x*R,y:J.y*R}}if(i.terminalFanout&&S===1)return k(w,Q);if(i.terminalFanout&&S===i.path.length-2)return k(Q,M);if(i.terminalFanout&&i.path[S+1]?.layer!==Q.layer)return k(w,Q);const F=k(w,Q),O=k(Q,M),U={x:F.x+O.x,y:F.y+O.y},Y=Math.hypot(U.x,U.y);if(Y<=1e-10)return null;const W=U.x/Y,te=U.y/Y,j=R/(W*F.x+te*F.y);return{x:W*j,y:te*j}},A=i.first.points[0],c=i.first.points.at(-1),l=i.reverseSecond?i.second.points.at(-1):i.second.points[0],u=i.reverseSecond?i.second.points[0]:i.second.points.at(-1),g=[[{route_type:"wire",x:A.x,y:A.y,width:A.width,layer:A.layer}],[{route_type:"wire",x:l.x,y:l.y,width:l.width,layer:l.layer}]],h=[i.first.transitions[0],i.second.transitions[0]];let d=0;const p=i.terminalFanout?1:0,m=i.path.length-2,_=i.path[m],f=i.path[m-1],I=i.terminalFanout&&_?.layer===c.layer&&f?.layer===_.layer,C=i.terminalFanout?I?m-1:i.path.length-1:i.path.length;for(let S=p;S<C;S++){const Q=i.path[S],w=a(S);if(!w)return null;for(const M of[0,1]){const k=M===0?1:-1,R={x:Q.x+w.x*k,y:Q.y+w.y*k},F=g[M],O=i.path[S-1];if(O&&O.layer!==Q.layer){if(!r(O,Q))throw new Error("PostProcessingSolver: a coupled layer transition moved in the plane");const U=[...F].reverse().find(W=>W.route_type==="wire");if(!U)throw new Error("PostProcessingSolver: generated via has no preceding wire");const Y=h[M];F.push({route_type:"via",x:U.x,y:U.y,from_layer:O.layer,to_layer:Q.layer,via_diameter:Y?.via_diameter??(M===0?i.first.viaDiameter:i.second.viaDiameter),...Y?.via_hole_diameter!==void 0?{via_hole_diameter:Y.via_hole_diameter}:{}}),F.push({route_type:"wire",x:U.x,y:U.y,width:M===0?i.first.width:i.second.width,layer:Q.layer})}else{const U=F.at(-1);U?.route_type==="wire"&&r(U,R)&&U.layer===Q.layer||F.push({route_type:"wire",...R,width:M===0?i.first.width:i.second.width,layer:Q.layer})}}i.path[S-1]?.layer!==Q.layer&&S>0&&d++}const y=(S,Q)=>{const w=S.at(-1);if(!w||w.route_type!=="wire")throw new Error("PostProcessingSolver: terminal fanout has no preceding wire");const M=S.at(-2);let k=!1;if(M?.route_type==="wire"&&M.layer===w.layer&&w.layer===Q.layer){const R={x:w.x-M.x,y:w.y-M.y},F={x:Q.x-w.x,y:Q.y-w.y},O=Math.hypot(R.x,R.y),U=Math.hypot(F.x,F.y);if(O>1e-8&&U>1e-8&&Math.abs(R.x*F.x+R.y*F.y)<=1e-8){const Y={x:w.x-R.x/O*U,y:w.y-R.y/O*U};(Y.x-M.x)*(R.x/O)+(Y.y-M.y)*(R.y/O)>1e-8&&(w.x=Y.x,w.y=Y.y,k=!0)}}i.terminalFanout&&!k&&w.x!==Q.x&&w.y!==Q.y&&S.push({route_type:"wire",x:Q.x,y:w.y,width:Q.width,layer:Q.layer}),S.push({route_type:"wire",x:Q.x,y:Q.y,width:Q.width,layer:Q.layer})};y(g[0],c),y(g[1],u),i.reverseSecond&&(g[1]=g[1].reverse().map(S=>S.route_type==="via"?{...S,from_layer:S.to_layer,to_layer:S.from_layer}:S));const x=(S,Q)=>{const w=S.filter(M=>M.route_type==="wire");for(const M of w)delete M.start_pcb_port_id,delete M.end_pcb_port_id;Q.startPortId&&(w[0].start_pcb_port_id=Q.startPortId),Q.endPortId&&(w.at(-1).end_pcb_port_id=Q.endPortId)};x(g[0],i.first),x(g[1],i.second);const E={...i.first.source,route:g[0]},B={...i.second.source,route:g[1]};return{first:E,second:B,firstParsed:qf(E,i.layerCount),secondParsed:qf(B,i.layerCount),edgeGap:i.edgeGap,centerlineDistance:i.centerlineSpacing,bendCount:Math.max(0,i.path.length-d-2),viaPairCount:d}})({first:t.first,second:t.second,reverseSecond:t.reverseSecond,path:e,centerlineSpacing:n.edgeGap+t.first.width/2+t.second.width/2,edgeGap:n.edgeGap,side:n.side,layerCount:this.input.layerCount,terminalFanout:t.terminalFanout});o&&MSe(o.firstParsed,o.secondParsed,t.context)&&this.candidates.push(o)}prepare(){const t=this.input.traces.map((E,B)=>({trace:E,index:B})).filter(({trace:E})=>E.connection_name===this.input.pair.connectionNames[0]),e=this.input.traces.map((E,B)=>({trace:E,index:B})).filter(({trace:E})=>E.connection_name===this.input.pair.connectionNames[1]);if(t.length!==1||e.length!==1)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:"trace-resolution-failure",message:"must resolve each connection_name to exactly one non-branching trace"});if(t[0].index===e[0].index)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:"trace-resolution-failure",message:"resolved both members to one trace"});let n,o;try{n=qf(t[0].trace,this.input.layerCount),o=qf(e[0].trace,this.input.layerCount)}catch(E){throw new Dv({connectionNames:this.input.pair.connectionNames,reason:"invalid-routed-geometry",message:`has unsupported or invalid routed geometry: ${E instanceof Error?E.message:String(E)}`})}const i=n.points[0],r=n.points.at(-1),s=Math.hypot(i.x-o.points[0].x,i.y-o.points[0].y)+Math.hypot(r.x-o.points.at(-1).x,r.y-o.points.at(-1).y),a=Math.hypot(i.x-o.points.at(-1).x,i.y-o.points.at(-1).y)+Math.hypot(r.x-o.points[0].x,r.y-o.points[0].y)+1e-8<s,A=a?o.points.at(-1):o.points[0],c=a?o.points[0]:o.points.at(-1);if(i.layer!==A.layer||r.layer!==c.layer)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:"terminal-layer-mismatch",message:"does not have common paired layers at both terminal stations"});const l={x:(i.x+A.x)/2,y:(i.y+A.y)/2,layer:i.layer},u={x:(r.x+c.x)/2,y:(r.y+c.y)/2,layer:r.layer},g=Math.hypot(u.x-l.x,u.y-l.y);if(g<1e-6)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:"coincident-terminal-midpoints",message:"has coincident terminal-pair midpoints"});const h={x:-(u.y-l.y)/g,y:(u.x-l.x)/g},d=i.x-A.x,p=i.y-A.y,m=d*h.x+p*h.y>=0?1:-1,_=(E,B)=>{const S=E.x-B.x,Q=E.y-B.y,w=Math.hypot(S,Q);return w>1e-8&&Math.abs(S*h.x+Q*h.y)/w<.5},f=_(i,A)&&_(r,c),I={x:h.y,y:-h.x},C=[i,A].some(E=>(E.x-l.x)*I.x+(E.y-l.y)*I.y>1e-8),y={immutableTraces:this.input.traces.filter((E,B)=>B!==t[0].index&&B!==e[0].index),obstacles:this.input.obstacles,bounds:this.input.bounds,layerCount:this.input.layerCount},x=(E=>{const{minimumCenterlineDistance:B,maximumCenterlineDistance:S}=E;if(B===void 0&&S===void 0)return E.legacyCenterlineDistances;const Q=[...B!==void 0&&S!==void 0?[(B+S)/2,B,S,B-.25,S+.25]:B!==void 0?[B,B+.25,B+.5,B-.25,B+1]:[S,S-.25,S-.5,S+.25,S-1],...E.legacyCenterlineDistances];return Q.filter((w,M)=>w>E.minimumPhysicalDistance&&Q.findIndex(k=>Math.abs(k-w)<1e-8)===M)})({minimumCenterlineDistance:this.input.pair.minimumCenterlineDistance,maximumCenterlineDistance:this.input.pair.maximumCenterlineDistance,minimumPhysicalDistance:n.width/2+o.width/2,legacyCenterlineDistances:suo.map(E=>E+n.width/2+o.width/2)}).flatMap(E=>{const B=E-n.width/2-o.width/2;return[m,m===1?-1:1].flatMap(S=>{const Q=B9t({config:this.input.routingGrid,bounds:this.input.bounds,defaultInnerGridStep:Math.max(.25,Math.min(.5,E/2))}),w=(F,O)=>ouo({...y,start:F,end:O,firstConnectionName:n.source.connection_name,secondConnectionName:o.source.connection_name,firstStartTerminal:i,firstEndTerminal:r,secondStartTerminal:A,secondEndTerminal:c,firstWidth:n.width,secondWidth:o.width,firstViaDiameter:n.transitions[0]?.via_diameter??n.viaDiameter,secondViaDiameter:o.transitions[0]?.via_diameter??o.viaDiameter,centerlineSpacing:E,side:S,terminalFanout:f,terminalMiterMargin:this.input.pair.maxUncoupledLength===void 0?void 0:E/2});let M=this.input.pair.maxUncoupledLength===void 0?((F,O)=>{if(!C||f)return l;const U=[{terminal:i,offset:O*F/2},{terminal:A,offset:-O*F/2}],Y=Math.tan(55*Math.PI/180),W=Math.max(...U.map(({terminal:te,offset:j})=>{const J=(te.x-l.x)*I.x+(te.y-l.y)*I.y,oe=(te.x-l.x)*h.x+(te.y-l.y)*h.y;return J+Math.abs(oe-j)/Y}));return{x:l.x+I.x*W,y:l.y+I.y*W,layer:l.layer}})(E,S):l,k=u;if(!f&&this.input.pair.maxUncoupledLength!==void 0){const F=w(l,u),O=b9t({anchor:l,escapeDirection:I,pathDirection:I,centerlineSpacing:E,side:S,lanes:[{point:i,polarity:1},{point:A,polarity:-1}],maxUncoupledLength:this.input.pair.maxUncoupledLength,maximumTurnDegrees:55,searchStep:Q.innerGridStep,isValid:Y=>F.isTerminalFanoutValid(Y,I,"start")}),U=b9t({anchor:u,escapeDirection:{x:-I.x,y:-I.y},pathDirection:I,centerlineSpacing:E,side:S,lanes:[{point:r,polarity:1},{point:c,polarity:-1}],maxUncoupledLength:this.input.pair.maxUncoupledLength,maximumTurnDegrees:45,searchStep:Q.innerGridStep,isValid:Y=>F.isTerminalFanoutValid(Y,I,"end")});if(!O||!U)return[];if(M=O,k=U,(k.x-M.x)*I.x+(k.y-M.y)*I.y<=Q.innerGridStep)return[]}const R=w(M,k);return[{edgeGap:B,side:S,input:{start:M,end:k,bounds:this.input.bounds,layerCount:this.input.layerCount,grid:Q,...R}}]})});return{first:n,second:o,reverseSecond:a,terminalFanout:f,context:y,attempts:x}}complete(){if(this.candidates.length===0)throw new Dv({connectionNames:this.input.pair.connectionNames,reason:"no-valid-candidate",message:"could not be improved without violating bounds, copper clearance, or coupled-via constraints"});this.candidates.sort((t,e)=>this.score(t)-this.score(e)||t.edgeGap-e.edgeGap),this.result={status:"accepted",candidate:this.candidates[0]}}score(t){return(this.input.pair.minimumCenterlineDistance!==void 0||this.input.pair.maximumCenterlineDistance!==void 0?Math.max(0,(this.input.pair.minimumCenterlineDistance??Number.NEGATIVE_INFINITY)-t.centerlineDistance)*oce+Math.max(0,t.centerlineDistance-(this.input.pair.maximumCenterlineDistance??Number.POSITIVE_INFINITY))*oce:t.edgeGap<.5?(.5-t.edgeGap)*oce:t.edgeGap>1?(t.edgeGap-1)*oce:0)+lb(t.firstParsed)+lb(t.secondParsed)+.15*t.bendCount+8*t.viaPairCount}},IW=t=>{const e={lines:[],points:[],rects:[],circles:[]};e.rects.push({center:{x:(t.bounds.minX+t.bounds.maxX)/2,y:(t.bounds.minY+t.bounds.maxY)/2},width:t.bounds.maxX-t.bounds.minX,height:t.bounds.maxY-t.bounds.minY,fill:"rgba(30, 70, 120, 0.04)",stroke:"rgba(30, 70, 120, 0.55)",layer:`z${Array.from({length:t.layerCount},(n,o)=>o).join(",")}`});for(const n of t.obstacles){const o=AH(n,t.layerCount);e.rects.push({center:n.center,width:n.width,height:n.height,ccwRotationDegrees:n.ccwRotationDegrees,fill:"rgba(220, 60, 60, 0.16)",stroke:"rgba(190, 40, 40, 0.75)",layer:`z${o.join(",")}`})}for(let n=0;n<(t.previewPath?.length??0)-1;n++){const o=t.previewPath[n],i=t.previewPath[n+1];if(o.layer!==i.layer)continue;const r=Dg(o.layer,t.layerCount);e.lines.push({points:[o,i],strokeColor:"#16a34a",strokeWidth:.08,strokeDash:[.18,.12],layer:`z${r}`})}for(const n of t.traces){if(t.activeConnectionNames?.includes(n.connection_name))continue;const o="#2563eb";let i=null;for(const r of n.route)if(r.route_type==="wire"){if(i&&i.layer===r.layer){const s=Dg(r.layer,t.layerCount);e.lines.push({points:[i,r],strokeColor:o,strokeWidth:Math.max(i.width,r.width),...s===0?{}:{strokeDash:[.2,.16]},layer:`z${s}`})}i=r}else if(r.route_type==="via"){const s=gH(r.from_layer,r.to_layer,t.layerCount).map(a=>Dg(a,t.layerCount));if(e.circles.push({center:r,radius:(r.via_diameter??i?.width??.2)/2,fill:"rgba(37, 99, 235, 0.45)",stroke:o,layer:`z${s.join(",")}`}),i){const a=i.width;i={x:r.x,y:r.y,layer:r.to_layer,width:a}}}}return e},Auo=class extends zA{constructor(t){super(),this.params=t,this.outputTraces=nce(t.simpleRouteJson.traces),this.MAX_ITERATIONS=y9t(t)}params;outputTraces;reroutedPairs=[];failures=[];nextPairIndex=0;activeConnectionNames=null;activeSession=null;getSolverName(){return"DifferentialPairReroutingSolver"}_step(){const t=this.params.simpleRouteJson.differentialPairs[this.nextPairIndex];if(!t)return void this.finish();this.activeConnectionNames=t.connectionNames;try{if(!this.activeSession)return this.activeSession=new auo({pair:t,traces:this.outputTraces,obstacles:this.params.simpleRouteJson.obstacles,bounds:this.params.simpleRouteJson.bounds,layerCount:this.params.simpleRouteJson.layerCount,routingGrid:this.params.routingGrid}),void(this.stats=this.activeSession.getStats());this.activeSession.step()}catch(n){if(!(n instanceof Dv))throw n;return void this.skipFailedPair(t,n)}if(this.stats=this.activeSession.getStats(),!this.activeSession.isComplete())return;const e=this.activeSession.getResult();this.activeSession=null;for(const n of[e.candidate.first,e.candidate.second]){const o=this.outputTraces.findIndex(i=>i.connection_name===n.connection_name);if(o<0)throw new Error(`DifferentialPairReroutingSolver: accepted replacement for unknown connection "${n.connection_name}"`);this.outputTraces[o]=n}this.reroutedPairs.push(t),this.nextPairIndex++,this.nextPairIndex!==this.params.simpleRouteJson.differentialPairs.length?this.stats={phase:"accepted",pair:t.connectionNames.join("/"),pairIndex:this.nextPairIndex-1,pairCount:this.params.simpleRouteJson.differentialPairs.length}:this.finish()}finish(){this.activeConnectionNames=null,this.solved=!0,this.stats={phase:"complete",acceptedPairCount:this.reroutedPairs.length,skippedPairCount:this.failures.length}}skipFailedPair(t,e){this.failures.push({connectionNames:[...t.connectionNames],reason:e.reason,message:e.message}),this.activeSession=null,this.nextPairIndex++,this.nextPairIndex!==this.params.simpleRouteJson.differentialPairs.length?this.stats={phase:"skipped",pair:t.connectionNames.join("/"),pairIndex:this.nextPairIndex-1,pairCount:this.params.simpleRouteJson.differentialPairs.length,skippedPairCount:this.failures.length}:this.finish()}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved)throw new Error("DifferentialPairReroutingSolver: getOutput() called before completion");return this.getBestEffortOutput()}getBestEffortOutput(){return{traces:nce(this.outputTraces),reroutedPairs:this.reroutedPairs.map(t=>({...t,connectionNames:[...t.connectionNames]})),failures:this.failures.map(t=>({...t,connectionNames:[...t.connectionNames]}))}}computeProgress(){return this.solved?1:this.params.simpleRouteJson.differentialPairs.length===0?0:(this.nextPairIndex+(this.activeSession?.getProgress()??0))/this.params.simpleRouteJson.differentialPairs.length}visualize(){return IW({traces:this.outputTraces,obstacles:this.params.simpleRouteJson.obstacles,bounds:this.params.simpleRouteJson.bounds,layerCount:this.params.simpleRouteJson.layerCount,activeConnectionNames:this.activeConnectionNames,previewPath:this.activeSession?.getPreviewPath()??null})}},K5=1e-8,cuo=class extends zA{constructor(t){super(),this.input=t,this.traces=nce(t.traces),this.MAX_ITERATIONS=Math.max(1,t.reroutedPairs.length+1)}input;traces;nextPairIndex=0;getSolverName(){return"FortyFiveDegreeSimplificationSolver"}_step(){const t=this.input.reroutedPairs[this.nextPairIndex];if(!t)return this.solved=!0,void(this.stats={phase:"complete",simplifiedPairCount:this.nextPairIndex});this.traces=(e=>{const n=e.pair.connectionNames.join("/"),o=e.pair.connectionNames.map(B=>e.traces.map((S,Q)=>({trace:S,index:Q})).filter(({trace:S})=>S.connection_name===B));if(o[0].length!==1||o[1].length!==1)throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} must resolve to exactly two traces`);const i=o[0][0].index,r=o[1][0].index;if(i===r)throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} resolved both members to one trace`);const s=structuredClone(e.traces),a={immutableTraces:s.filter((B,S)=>S!==i&&S!==r),obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount},A=B=>{const S=qf(B[i],e.layerCount),Q=qf(B[r],e.layerCount);let w=0;for(const[M,k]of[[S.segments,Q.segments],[Q.segments,S.segments]])for(const R of M){if(R.terminal!==null)continue;const F=k.filter(O=>O.layer===R.layer);if(F.length===0)throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} lost common-layer interior copper`);w=Math.max(w,Math.min(...F.map(O=>uB(R.start,R.end,O.start,O.end))))}return w},c=B=>{const S=qf(B[i],e.layerCount),Q=qf(B[r],e.layerCount);let w=Number.POSITIVE_INFINITY;for(const[M,k]of[[S.segments,Q.segments],[Q.segments,S.segments]])for(const R of M)if(R.terminal===null)for(const F of k)F.layer===R.layer&&(w=Math.min(w,uB(R.start,R.end,F.start,F.end)-R.width/2-F.width/2));return Number.isFinite(w)?w:null},l=B=>{const S=qf(B[i],e.layerCount),Q=qf(B[r],e.layerCount);return MSe(S,Q,a)};if(!l(s))throw new Error(`FortyFiveDegreeSimplificationSolver: rerouted pair ${n} has invalid complete copper before simplification`);if(e.pair.maxUncoupledLength!==void 0&&e.pair.minimumCenterlineDistance!==void 0&&e.pair.maximumCenterlineDistance!==void 0&&Math.abs(e.pair.minimumCenterlineDistance-e.pair.maximumCenterlineDistance)<=K5)return s;const u=qf(s[i],e.layerCount),g=qf(s[r],e.layerCount),h=Math.abs(lb(u)-lb(g)),d=c(s),p=e.pair.maximumCenterlineDistance??1+u.width/2+g.width/2,m=Math.min(A(s),p),_=B=>{if(!l(B)||A(B)>m+K5)return!1;const S=c(B);return d===null||S===null||S>=d-K5},f=(B,S)=>{const Q=Math.abs(S.x-B.x),w=Math.abs(S.y-B.y),M=S.x>=B.x?1:-1,k=S.y>=B.y?1:-1,R=[],F={x:S.x-M*w,y:B.y};(F.x-B.x)*M>=-1e-8&&(F.x-S.x)*M<=K5&&R.push([B,F,S]);const O={x:B.x,y:S.y-k*Q};(O.y-B.y)*k>=-1e-8&&(O.y-S.y)*k<=K5&&R.push([B,O,S]);const U={x:B.x+M*Math.min(Q,w),y:B.y+k*Math.min(Q,w)};return R.push([B,U,S]),R.map((Y,W)=>{const te=Y.filter((J,oe)=>oe===0||Math.hypot(J.x-Y[oe-1].x,J.y-Y[oe-1].y)>K5),j=te.slice(0,-1).map((J,oe)=>{const ie=te[oe+1],ne=Math.abs(ie.x-J.x),le=Math.abs(ie.y-J.y);return{length:Math.hypot(ne,le),straight:ne<=K5||le<=K5?Math.hypot(ne,le):0}});return{points:te,usableStraightLength:Math.max(0,...j.map(J=>J.straight)),bendCount:Math.max(0,te.length-2),priority:W}}).filter((Y,W,te)=>te.findIndex(j=>JSON.stringify(j.points)===JSON.stringify(Y.points))===W).sort((Y,W)=>W.usableStraightLength-Y.usableStraightLength||Y.bendCount-W.bendCount||Y.priority-W.priority)},I=B=>{const S=[];for(let Q=0;Q<B.route.length-1;Q++){const w=B.route[Q];if(w?.route_type==="wire")for(let M=B.route.length-1;M>=Q+1;M--){if(Q===0||M===B.route.length-1)continue;const k=B.route[M];k?.route_type==="wire"&&k.layer===w.layer&&(B.route.slice(Q+1,M).some(R=>R.route_type!=="wire"||R.layer!==w.layer)||S.push({startIndex:Q,endIndex:M,skippedPointCount:M-Q-1}))}}return S.sort((Q,w)=>w.skippedPointCount-Q.skippedPointCount||Q.startIndex-w.startIndex||w.endIndex-Q.endIndex)},C=(B,S,Q)=>{const w=B.route[S.startIndex],M=B.route[S.endIndex],k=Math.max(w.width,M.width),R=Q.points.slice(1,-1).map(F=>({route_type:"wire",...F,width:k,layer:w.layer}));return{...B,route:[...B.route.slice(0,S.startIndex+1),...R,...B.route.slice(S.endIndex)]}};for(const B of[i,r]){let S=!0;for(;S;){S=!1;const Q=s[B];for(const w of I(Q)){const M=Q.route[w.startIndex],k=Q.route[w.endIndex],R=Q.route.slice(w.startIndex,w.endIndex+1),F=R.slice(0,-1).every((O,U)=>{const Y=R[U+1],W=Math.abs(Y.x-O.x),te=Math.abs(Y.y-O.y);return W<=K5||te<=K5||Math.abs(W-te)<=K5});for(const O of f(M,k)){if(O.points.length>=R.length&&F)continue;const U=C(Q,w,O),Y=[...s];if(Y[B]=U,JSON.stringify(U.route)===JSON.stringify(Q.route))continue;if(_(Y)){s[B]=U,S=!0;break}const W=B===i?r:i,te=s[W],j=I(te).find(ie=>ie.startIndex===w.startIndex&&ie.endIndex===w.endIndex);if(!j)continue;const J=te.route[j.startIndex],oe=te.route[j.endIndex];for(const ie of f(J,oe)){const ne=C(te,j,ie),le=[...Y];if(le[W]=ne,_(le)){s[B]=U,s[W]=ne,S=!0;break}}if(S)break}if(S)break}}}if(!_(s))throw new Error(`FortyFiveDegreeSimplificationSolver: pair ${n} produced invalid complete copper`);const y=qf(s[i],e.layerCount),x=qf(s[r],e.layerCount),E=Math.abs(lb(y)-lb(x));return Math.abs(E-h)>e.pair.lengthTolerance+K5?structuredClone(e.traces):s})({traces:this.traces,pair:t,obstacles:this.input.obstacles,bounds:this.input.bounds,layerCount:this.input.layerCount}),this.nextPairIndex++,this.stats={phase:"simplifying",pair:t.connectionNames.join("/"),pairIndex:this.nextPairIndex-1,pairCount:this.input.reroutedPairs.length}}getConstructorParams(){return[this.input]}getOutput(){if(!this.solved)throw new Error("FortyFiveDegreeSimplificationSolver: getOutput() called before completion");return this.getBestEffortOutput()}getBestEffortOutput(){return{traces:nce(this.traces),reroutedPairs:this.input.reroutedPairs.map(t=>({...t,connectionNames:[...t.connectionNames]}))}}computeProgress(){return this.solved?1:this.input.reroutedPairs.length===0?0:this.nextPairIndex/this.input.reroutedPairs.length}visualize(){return IW({traces:this.traces,obstacles:this.input.obstacles,bounds:this.input.bounds,layerCount:this.input.layerCount,activeConnectionNames:this.input.reroutedPairs[this.nextPairIndex]?.connectionNames??null,previewPath:null})}},luo=class extends zA{constructor(t){super(),this.input=t}input;output=null;visualizationTraces=null;getSolverName(){return"HdRouteReconstructionSolver"}_step(){this.visualizationTraces=(t=>{const{simpleRouteJson:e}=t.params;if(t.result.matchedHdRoutes.length!==t.binding.solverParams.hdRoutes.length)throw new Error("PostProcessingSolver: LengthMatchingSolver changed the search route count");const n=structuredClone(t.binding.baseTraces);for(const o of t.binding.traceBindings){const i=t.result.matchedHdRoutes[o.matchedRouteIndex];if(!i)throw new Error(`PostProcessingSolver: missing matched route at index ${o.matchedRouteIndex}`);const r=n[o.traceIndex];if(!r)throw new Error(`PostProcessingSolver: missing simplified trace binding at index ${o.traceIndex}`);if(r.connection_name!==i.connectionName)throw new Error(`PostProcessingSolver: route binding changed connection "${r.connection_name}" to "${i.connectionName}"`);if(i.route.length<2)throw new Error(`PostProcessingSolver: matched connection "${i.connectionName}" has incomplete geometry`);const s=i.route[0],a=i.route.at(-1);if(Math.hypot(s.x-o.startEndpoint.x,s.y-o.startEndpoint.y)>1e-8||s.z!==o.startEndpoint.z||Math.hypot(a.x-o.endEndpoint.x,a.y-o.endEndpoint.y)>1e-8||a.z!==o.endEndpoint.z)throw new Error(`PostProcessingSolver: matched connection "${i.connectionName}" moved a preserved endpoint`);const A=[];let c=0;const l=g=>({route_type:"wire",x:g.x,y:g.y,width:g.traceThickness??i.traceThickness,layer:w7(g.z,e.layerCount)});A.push(l(i.route[0]));for(let g=1;g<i.route.length;g++){const h=i.route[g-1],d=i.route[g];if(h.z===d.z){A.push(l(d));continue}if(Math.hypot(h.x-d.x,h.y-d.y)>1e-8)throw new Error(`PostProcessingSolver: matched connection "${i.connectionName}" moves while changing layers`);const p=o.viaTemplates[c++];if(!p)throw new Error(`PostProcessingSolver: matched connection "${i.connectionName}" added an unbound via`);if(Math.hypot(p.x-d.x,p.y-d.y)>1e-8)throw new Error(`PostProcessingSolver: matched connection "${i.connectionName}" moved a preserved via`);const m=w7(h.z,e.layerCount),_=w7(d.z,e.layerCount),f=new Set([p.from_layer,p.to_layer]);if(!f.has(m)||!f.has(_))throw new Error(`PostProcessingSolver: matched connection "${i.connectionName}" changed a preserved via span`);A.push({...p}),A.push(l(d))}if(c!==o.viaTemplates.length)throw new Error(`PostProcessingSolver: matched connection "${i.connectionName}" removed a preserved via`);const u=A.filter(g=>g.route_type==="wire");for(const g of u)delete g.start_pcb_port_id,delete g.end_pcb_port_id;o.startPortId&&(u[0].start_pcb_port_id=o.startPortId),o.endPortId&&(u.at(-1).end_pcb_port_id=o.endPortId),n[o.traceIndex]={...r,route:A}}for(const o of t.binding.solverParams.differentialPairs){const i=o.connectionNames.join("/"),r=o.connectionNames.map(u=>n.map((g,h)=>({trace:g,index:h})).filter(({trace:g})=>g.connection_name===u));if(r[0].length!==1||r[1].length!==1)throw new Error(`PostProcessingSolver: reconstructed pair ${i} does not resolve to complete copper`);const s=r[0][0],a=r[1][0],A=qf(s.trace,e.layerCount),c=qf(a.trace,e.layerCount),l=Math.abs(lb(A)-lb(c));if(l>o.lengthTolerance+1e-7)throw new PSe({message:`PostProcessingSolver: reconstructed pair ${i} exceeds length tolerance ${o.lengthTolerance} with error ${l}`,connectionNames:[...o.connectionNames],reason:"length-tolerance-unsatisfied"});if(!MSe(A,c,{immutableTraces:n.filter((u,g)=>g!==s.index&&g!==a.index),obstacles:e.obstacles,bounds:e.bounds,layerCount:e.layerCount}))throw new PSe({message:`PostProcessingSolver: length matching produced invalid complete copper for pair ${i}`,connectionNames:[...o.connectionNames],reason:"invalid-final-copper"})}return n})(this.input),this.output=I9t({...this.input,rejectInsideJumperPad:!0}),this.stats={phase:"complete",routeCount:this.output.hdRoutes.length},this.solved=!0}getConstructorParams(){return[this.input]}getOutput(){if(!this.output||!this.solved)throw new Error("HdRouteReconstructionSolver: getOutput() called before completion");return structuredClone(this.output)}visualize(){const t=this.visualizationTraces??this.input.simplified.traces,{obstacles:e,bounds:n,layerCount:o}=this.input.params.simpleRouteJson;return IW({traces:t,obstacles:e,bounds:n,layerCount:o,activeConnectionNames:null,previewPath:null})}},S9t=class extends n7{differentialPairReroutingSolver;fortyFiveDegreeSimplificationSolver;lengthMatchingSolver;hdRouteReconstructionSolver;lengthMatchingBinding=null;model;fallbackOutput=null;postProcessingErrors=[];pipelineDef=[eh("differentialPairReroutingSolver",Auo,t=>[t.model.params]),eh("fortyFiveDegreeSimplificationSolver",cuo,t=>{const e=t.getStageOutput("differentialPairReroutingSolver");if(!e)throw new Error("PostProcessingSolver: rerouting stage completed without output");const{obstacles:n,bounds:o,layerCount:i}=t.model.params.simpleRouteJson;return[{...e,obstacles:n,bounds:o,layerCount:i}]}),eh("lengthMatchingSolver",m9t,t=>{const e=t.getStageOutput("fortyFiveDegreeSimplificationSolver");if(!e)throw new Error("PostProcessingSolver: 45-degree simplification stage completed without output");return t.lengthMatchingBinding=_9t({result:e,params:t.model.params}),[t.lengthMatchingBinding.solverParams]}),eh("hdRouteReconstructionSolver",luo,t=>{const e=t.getStageOutput("fortyFiveDegreeSimplificationSolver"),n=t.getStageOutput("lengthMatchingSolver");if(!e||!n||!t.lengthMatchingBinding)throw new Error("PostProcessingSolver: reconstruction stage is missing a required binding or output");return[{binding:t.lengthMatchingBinding,result:n,simplified:e,params:t.model.params,model:t.model}]},{onSolved:t=>{const e=t.getStageOutput("differentialPairReroutingSolver");if(!e)throw new Error("PostProcessingSolver: cannot summarize missing rerouting output");t.stats={phase:"complete",acceptedPairCount:e.reroutedPairs.length},e.failures.length>0&&(t.stats.skippedPairCount=e.failures.length,t.stats.postProcessingErrorCount=e.failures.length)}})];constructor(t){super(structuredClone(t));let e=null;try{(function(o){if(!o||typeof o!="object")throw new Error("PostProcessingSolver: params must be an object");if(!Array.isArray(o.hdRoutes))throw new Error("PostProcessingSolver: hdRoutes must be an array");if(!Array.isArray(o.differentialPairs))throw new Error("PostProcessingSolver: differentialPairs must be an array");if(!Array.isArray(o.obstacles))throw new Error("PostProcessingSolver: obstacles must be an array");if(!Number.isInteger(o.layerCount)||o.layerCount<1)throw new Error("PostProcessingSolver: layerCount must be a positive integer");for(const l of o.obstacles){if(!l||typeof l!="object"||l.type!=="rect"||!l.center||!Number.isFinite(l.center.x)||!Number.isFinite(l.center.y)||!Number.isFinite(l.width)||l.width<=0||!Number.isFinite(l.height)||l.height<=0||!Array.isArray(l.layers)||l.layers.some(u=>typeof u!="string")||!Array.isArray(l.connectedTo)||l.connectedTo.some(u=>typeof u!="string"||u.length===0)||l.ccwRotationDegrees!==void 0&&!Number.isFinite(l.ccwRotationDegrees))throw new Error("PostProcessingSolver: obstacle declaration is invalid");AH(l,o.layerCount)}const{minX:i,maxX:r,minY:s,maxY:a}=o.bounds??{};if(![i,r,s,a].every(Number.isFinite)||i>=r||s>=a)throw new Error("PostProcessingSolver: bounds must have finite positive extents");const A=new Set(o.differentialPairs.flatMap(l=>l.connectionNames));for(const l of o.hdRoutes){if(!l||typeof l!="object"||typeof l.connectionName!="string"||l.connectionName.length===0||l.rootConnectionName!==void 0&&(typeof l.rootConnectionName!="string"||l.rootConnectionName.length===0)||!Number.isFinite(l.traceThickness)||l.traceThickness<=0||!Number.isFinite(l.viaDiameter)||l.viaDiameter<0||l.viaDiameter===0&&A.has(l.connectionName)||!Array.isArray(l.route)||!Array.isArray(l.vias)||l.jumpers!==void 0&&!Array.isArray(l.jumpers))throw new Error("PostProcessingSolver: HD route declaration is invalid");if(l.startPcbPortId!==void 0&&(typeof l.startPcbPortId!="string"||l.startPcbPortId.length===0)||l.endPcbPortId!==void 0&&(typeof l.endPcbPortId!="string"||l.endPcbPortId.length===0))throw new Error(`PostProcessingSolver: HD route "${l.connectionName}" has invalid terminal metadata`);for(const u of l.route)if(!u||typeof u!="object"||!Number.isFinite(u.x)||!Number.isFinite(u.y)||!Number.isInteger(u.z)||u.z<0||u.z>=o.layerCount||u.traceThickness!==void 0&&(!Number.isFinite(u.traceThickness)||u.traceThickness<=0))throw new Error(`PostProcessingSolver: HD route "${l.connectionName}" has an invalid route point`);for(const u of l.vias)if(!u||typeof u!="object"||!Number.isFinite(u.x)||!Number.isFinite(u.y)||u.zLayers!==void 0&&(!Array.isArray(u.zLayers)||u.zLayers.some(g=>!Number.isInteger(g)||g<0||g>=o.layerCount)))throw new Error(`PostProcessingSolver: HD route "${l.connectionName}" has an invalid via`);if(l.vias.length>0&&l.viaDiameter<=0)throw new Error(`PostProcessingSolver: HD route "${l.connectionName}" has a non-positive via diameter`);for(const u of l.jumpers??[])if(!(u&&typeof u=="object"&&u.route_type==="jumper"&&Number.isFinite(u.start?.x)&&Number.isFinite(u.start?.y)&&Number.isFinite(u.end?.x)&&Number.isFinite(u.end?.y)&&["0603","1206","1206x4_pair"].includes(u.footprint)))throw new Error(`PostProcessingSolver: HD route "${l.connectionName}" has an invalid jumper`)}const c=new Set;for(const l of o.differentialPairs){if(!l||typeof l!="object"||!Array.isArray(l.connectionNames)||l.connectionNames.length!==2||l.connectionNames[0]===l.connectionNames[1]||!l.connectionNames.every(u=>typeof u=="string"&&u.length>0)||!Number.isFinite(l.lengthTolerance)||l.lengthTolerance<0)throw new Error("PostProcessingSolver: differential pair declaration is invalid");for(const u of[l.minimumCenterlineDistance,l.maximumCenterlineDistance])if(u!==void 0&&(!Number.isFinite(u)||u<=0))throw new Error("PostProcessingSolver: differential pair centerline distances must be positive finite numbers");if(l.maxUncoupledLength!==void 0&&(!Number.isFinite(l.maxUncoupledLength)||l.maxUncoupledLength<0))throw new Error("PostProcessingSolver: differential pair maxUncoupledLength must be a non-negative finite number");if(l.minimumCenterlineDistance!==void 0&&l.maximumCenterlineDistance!==void 0&&l.minimumCenterlineDistance>l.maximumCenterlineDistance)throw new Error("PostProcessingSolver: differential pair minimumCenterlineDistance cannot exceed maximumCenterlineDistance");for(const u of l.connectionNames){if(c.has(u))throw new Error(`PostProcessingSolver: connection "${u}" belongs to multiple differential pairs`);c.add(u)}}for(const l of[.25,.5])B9t({config:o.routingGrid,bounds:o.bounds,defaultInnerGridStep:l})})(t)}catch(o){if(!(o instanceof C9t))throw o;e=o}if(this.model=f9t(t),e)return void this.finishWithBestEffortOutput({stage:"differentialPairReroutingSolver",message:e.message,reason:e.reason});const n=y9t(this.model.params)+Math.max(1,t.differentialPairs.length+1)+1e5+10;if(!Number.isSafeInteger(n))throw new Error("PostProcessingSolver: derived pipeline iteration bound exceeds the safe integer range");this.MAX_ITERATIONS=n}getSolverName(){return"PostProcessingSolver"}getConstructorParams(){return[structuredClone(this.inputProblem)]}_step(){const t=this.getCurrentStageName();try{super._step()}catch(n){const o=this.classifyOptimizationFailure(n,t);if(!o)throw n;return void this.finishWithBestEffortOutput(o)}if(!this.failed)return;const e=this.classifyIterationFailure(this.error,t);if(!e)throw new Error(this.error??"PostProcessingSolver failed without an error message");this.finishWithBestEffortOutput(e)}tryFinalAcceptance(){const t=this.getCurrentStageName();t!=="differentialPairReroutingSolver"&&t!=="lengthMatchingSolver"||this.finishWithBestEffortOutput({stage:t,message:"PostProcessingSolver reached its iteration limit",reason:"iteration-limit-exhausted"})}classifyOptimizationFailure(t,e){return e==="lengthMatchingSolver"&&t instanceof tce?{stage:e,message:t.message,connectionName:t.connectionName,reason:t.reason}:e==="hdRouteReconstructionSolver"&&t instanceof PSe||e==="differentialPairReroutingSolver"&&t instanceof Dv&&t.reason==="no-valid-candidate"?{stage:e,message:t.message,connectionNames:[...t.connectionNames],reason:t.reason}:null}classifyIterationFailure(t,e){return e!=="differentialPairReroutingSolver"&&e!=="lengthMatchingSolver"?null:t&&t.endsWith("ran out of iterations")?{stage:e,message:t,reason:"iteration-limit-exhausted"}:null}createBestEffortOutput(t){let e=this.lengthMatchingBinding;if(!e){const o=this.getStageOutput("fortyFiveDegreeSimplificationSolver")??this.fortyFiveDegreeSimplificationSolver?.getBestEffortOutput(),i=this.getStageOutput("differentialPairReroutingSolver")??this.differentialPairReroutingSolver?.getBestEffortOutput(),r=o??i;r&&(e=_9t({result:r,params:this.model.params}))}if(!e)return{output:{hdRoutes:structuredClone(this.inputProblem.hdRoutes),postProcessingErrors:[]},source:"input-hd-routes"};let n=this.getStageOutput("lengthMatchingSolver");return n||(n=this.lengthMatchingSolver?.getBestEffortOutput()),n&&t.reason!=="invalid-final-copper"||(n={matchedHdRoutes:e.solverParams.hdRoutes}),{output:I9t({binding:e,result:n,model:this.model}),source:"best-effort-hd-routes"}}finishWithBestEffortOutput(t){const e=this.createBestEffortOutput(t),n={type:"post_processing_error",...t,returnedRouteSource:e.source};this.postProcessingErrors.push(n),this.fallbackOutput=e.output,this.activeSubSolver=null,this.error=null,this.failed=!1,this.solved=!0,this.progress=1,this.stats={phase:"complete",postProcessingErrorCount:this.postProcessingErrors.length}}getOutput(){if(!this.solved)throw new Error("PostProcessingSolver: getOutput() called before the solver completed");const t=this.fallbackOutput??this.getStageOutput("hdRouteReconstructionSolver");if(!t)throw new Error("PostProcessingSolver: completed pipeline is missing reconstruction output");const e=this.getStageOutput("differentialPairReroutingSolver")??this.differentialPairReroutingSolver?.getBestEffortOutput(),n=e?.failures??[];let o="input-hd-routes";(e?.reroutedPairs.length??0)>0&&(o="best-effort-hd-routes");const i=[...n.map(s=>({type:"post_processing_error",stage:"differentialPairReroutingSolver",message:s.message,connectionNames:[...s.connectionNames],reason:s.reason,returnedRouteSource:o})),...this.postProcessingErrors],r=structuredClone(t);return r.postProcessingErrors=structuredClone(i),r}initialVisualize(){if(this.fallbackOutput)return{lines:this.fallbackOutput.hdRoutes.map(i=>({points:i.route.map(({x:r,y:s})=>({x:r,y:s})),strokeWidth:i.traceThickness}))};const{traces:t,obstacles:e,bounds:n,layerCount:o}=this.model.params.simpleRouteJson;return IW({traces:structuredClone(t),obstacles:e,bounds:n,layerCount:o,activeConnectionNames:null,previewPath:null})}finalVisualize(){if(this.fallbackOutput)return this.initialVisualize();const t=f9t({...this.inputProblem,hdRoutes:this.getOutput().hdRoutes}),{traces:e,obstacles:n,bounds:o,layerCount:i}=t.params.simpleRouteJson;return IW({traces:e,obstacles:n,bounds:o,layerCount:i,activeConnectionNames:null,previewPath:null})}},CW=class Iit{static generators=new Map;static register(e){Iit.generators.set(e.componentKind,e)}static create(e){const n=e.detectedComponent.componentKind,o=Iit.generators.get(n);if(!o)throw new Error(`No topology generator registered for component kind "${n}"`);return new o(e)}},yW=t=>[t.obstacle.obstacleId??t.obstacle.componentId??"obstacle",t.start.x.toFixed(4),t.start.y.toFixed(4),t.end.x.toFixed(4),t.end.y.toFixed(4),t.expansionDirection.x,t.expansionDirection.y].join(":"),Q9t=t=>{let e=0;for(const n of t)e=31*e+n.charCodeAt(0)>>>0;return e},$m=(t,e)=>`hsla(${Q9t(yW(t))%360},72%,36%,${e})`,xW=t=>{const e=t.expansionDirection;return e.x<0?"left":e.x>0?"right":e.y<0?"bottom":"top"},P7=t=>({x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2}),DSe=t=>{const e=/^bga-gapfill-(\d+)-/.exec(t.capacityMeshNodeId);return e?Number.parseInt(e[1],10):null},v9t=(t,e)=>{const n=P7(t),o=P7(e),i=n.y-o.y;if(Math.abs(i)>1e-6)return i;const r=n.x-o.x;return Math.abs(r)>1e-6?r:yW(t).localeCompare(yW(e))},ice=t=>{const e=[...t].sort(v9t),n=[];let o=e.shift();for(;o&&(n.push(o),e.length!==0);){const i=P7(o);let r=0,s=Number.POSITIVE_INFINITY;for(let a=0;a<e.length;a++){const A=e[a],c=P7(A),l=(c.x-i.x)**2+(c.y-i.y)**2;l<s-1e-9?(s=l,r=a):Math.abs(l-s)<=1e-9&&v9t(A,e[r])<0&&(r=a)}o=e.splice(r,1)[0]}return n},gB=(t,e)=>{const n=yW(t),o=e.findIndex(i=>yW(i)===n);return o>=0?`E${o+1}`:`E${Q9t(n).toString(36).slice(0,4)}`},NSe=t=>t.flatMap(e=>{const n=Pg(e);return[{obstacle:e,start:{x:n.minX,y:n.minY},end:{x:n.minX,y:n.maxY},expansionDirection:{x:-1,y:0}},{obstacle:e,start:{x:n.maxX,y:n.minY},end:{x:n.maxX,y:n.maxY},expansionDirection:{x:1,y:0}},{obstacle:e,start:{x:n.minX,y:n.minY},end:{x:n.maxX,y:n.minY},expansionDirection:{x:0,y:-1}},{obstacle:e,start:{x:n.minX,y:n.maxY},end:{x:n.maxX,y:n.maxY},expansionDirection:{x:0,y:1}}]}),CN=.001,rce=.001,uuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;meshIndex;allEdges=[];queueEdges=[];disconnectedEdges=[];currentEdge=null;lastSearchBounds=null;lastCandidateMeshNodes=[];lastMatchedMeshNode=null;_setup(){const t=Math.max(this.inputProblem.meshNodes.length,1);this.meshIndex=new X4(t);for(const n of this.inputProblem.meshNodes){const o=Pg(n);this.meshIndex.add(o.minX,o.minY,o.maxX,o.maxY)}this.meshIndex.finish();const e=NSe(this.inputProblem.unmarkedComponentObstacles);this.queueEdges=e,this.allEdges=ice(e),this.currentEdge=null,this.lastSearchBounds=null,this.lastCandidateMeshNodes=[],this.lastMatchedMeshNode=null}_step(){const t=this.queueEdges.shift();if(!t)return this.currentEdge=null,this.lastSearchBounds=null,this.lastCandidateMeshNodes=[],this.lastMatchedMeshNode=null,void(this.solved=!0);this.currentEdge=t,this.lastMatchedMeshNode=null;const e=Math.abs(t.start.x-t.end.x)<=CN,n=e?{minX:t.start.x-rce,maxX:t.start.x+rce,minY:Math.min(t.start.y,t.end.y),maxY:Math.max(t.start.y,t.end.y)}:{minX:Math.min(t.start.x,t.end.x),maxX:Math.max(t.start.x,t.end.x),minY:t.start.y-rce,maxY:t.start.y+rce};this.lastSearchBounds=n;const o=this.meshIndex.search(n.minX,n.minY,n.maxX,n.maxY);this.lastCandidateMeshNodes=o.map(r=>this.inputProblem.meshNodes[r]);let i=!1;for(const r of o){const s=this.inputProblem.meshNodes[r],a=Pg(s);if(e){if(!(Math.min(a.maxY,Math.max(t.start.y,t.end.y))-Math.max(a.minY,Math.min(t.start.y,t.end.y))>CN))continue;if(t.expansionDirection.x===-1&&Math.abs(a.maxX-t.start.x)<=CN){i=!0,this.lastMatchedMeshNode=s;break}if(t.expansionDirection.x===1&&Math.abs(a.minX-t.start.x)<=CN){i=!0,this.lastMatchedMeshNode=s;break}continue}if(Math.min(a.maxX,Math.max(t.start.x,t.end.x))-Math.max(a.minX,Math.min(t.start.x,t.end.x))>CN){if(t.expansionDirection.y===-1&&Math.abs(a.maxY-t.start.y)<=CN){i=!0,this.lastMatchedMeshNode=s;break}if(t.expansionDirection.y===1&&Math.abs(a.minY-t.start.y)<=CN){i=!0,this.lastMatchedMeshNode=s;break}}}i||this.disconnectedEdges.push(t)}getOutput(){return this.disconnectedEdges}visualize(){const t=this.disconnectedEdges,e=this.allEdges.length>0?this.allEdges:[...t,...this.currentEdge?[this.currentEdge]:[]],n=this.currentEdge?$m(this.currentEdge,.88):"rgba(40,40,40,0.4)",o=this.inputProblem.meshNodes.map(u=>({...Wf(u,{rectMargin:.01}),fill:u._containsObstacle?"rgba(120,120,120,0.18)":"rgba(120,120,120,0.08)",stroke:u._containsObstacle?"rgba(120,120,120,0.42)":"rgba(120,120,120,0.24)"})),i=this.lastSearchBounds&&this.currentEdge?[{center:(r=this.lastSearchBounds,{x:(r.minX+r.maxX)/2,y:(r.minY+r.maxY)/2}),width:this.lastSearchBounds.maxX-this.lastSearchBounds.minX,height:this.lastSearchBounds.maxY-this.lastSearchBounds.minY,fill:$m(this.currentEdge,.1),stroke:$m(this.currentEdge,.36),label:[gB(this.currentEdge,e),"search band"].join(" ")}]:[];var r;const s=this.lastCandidateMeshNodes.map(u=>({...Wf(u,{rectMargin:.018}),fill:u===this.lastMatchedMeshNode?"rgba(0,180,90,0.24)":this.currentEdge?$m(this.currentEdge,.16):"rgba(80,120,160,0.16)",stroke:u===this.lastMatchedMeshNode?"rgba(0,150,80,0.88)":n,label:[u===this.lastMatchedMeshNode?"matched":"candidate",u.capacityMeshNodeId,`z:${u.availableZ.join(",")}`].join(`
`)})),a=this.inputProblem.unmarkedComponentObstacles.map(u=>({center:u.center,width:u.width,height:u.height,fill:"rgba(160,160,160,0.10)",stroke:"rgba(160,160,160,0.40)",label:u.obstacleId??u.componentId??"obstacle"})),A=t.map(u=>({points:[u.start,u.end],strokeColor:$m(u,.14),strokeWidth:.01,strokeDash:"5 4",label:[gB(u,e),xW(u),"disconnected"].join(" ")})),c=[],l=[];if(this.currentEdge){const u=P7(this.currentEdge);c.push({points:[this.currentEdge.start,this.currentEdge.end],strokeColor:$m(this.currentEdge,1),strokeWidth:.06,label:[gB(this.currentEdge,e),xW(this.currentEdge),"checking"].join(" ")},{points:[u,{x:u.x+.16*this.currentEdge.expansionDirection.x,y:u.y+.16*this.currentEdge.expansionDirection.y}],strokeColor:$m(this.currentEdge,.82),strokeWidth:.02,strokeDash:"3 3"}),l.push({...u,color:$m(this.currentEdge,1),label:gB(this.currentEdge,e)})}return{rects:[...o,...i,...s,...a],lines:[...A,...c],points:l}}},Nv=.001,Rv=.001,sce=1e-6,guo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;meshIndex;meshBounds;expandedNodes=[];_setup(){const t=Math.max(this.inputProblem.meshNodes.length,1);this.meshIndex=new X4(t);let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of this.inputProblem.meshNodes){const s=Pg(r);this.meshIndex.add(s.minX,s.minY,s.maxX,s.maxY),e=Math.min(e,s.minX),n=Math.max(n,s.maxX),o=Math.min(o,s.minY),i=Math.max(i,s.maxY)}this.meshIndex.finish(),this.meshBounds=this.inputProblem.meshNodes.length?{minX:e,maxX:n,minY:o,maxY:i}:{minX:0,maxX:0,minY:0,maxY:0}}getObstacleAvailableZ(t){return t.__zLayers??t.layers.map(e=>Kr(e,this.inputProblem.layerCount))}getSharedOverlapArea(t,e){if(!t.availableZ.some(s=>e.availableZ.includes(s)))return 0;const n=Pg(t),o=Pg(e),i=Math.min(n.maxX,o.maxX)-Math.max(n.minX,o.minX),r=Math.min(n.maxY,o.maxY)-Math.max(n.minY,o.minY);return i<=sce||r<=sce?0:i*r}getNodeObstacleOverlapArea(t,e){const n=this.getObstacleAvailableZ(e);if(!t.availableZ.some(a=>n.includes(a)))return 0;const o=Pg(t),i=Pg(e),r=Math.min(o.maxX,i.maxX)-Math.max(o.minX,i.minX),s=Math.min(o.maxY,i.maxY)-Math.max(o.minY,i.minY);return r<=sce||s<=sce?0:r*s}getClosestMeshNode(t,e){const n=Math.abs(t.start.x-t.end.x)<=Nv,o=this.getObstacleAvailableZ(t.obstacle),i=n?t.expansionDirection.x<0?{minX:this.meshBounds.minX,maxX:t.start.x,minY:Math.min(t.start.y,t.end.y)-Rv,maxY:Math.max(t.start.y,t.end.y)+Rv}:{minX:t.start.x,maxX:this.meshBounds.maxX,minY:Math.min(t.start.y,t.end.y)-Rv,maxY:Math.max(t.start.y,t.end.y)+Rv}:t.expansionDirection.y<0?{minX:Math.min(t.start.x,t.end.x)-Rv,maxX:Math.max(t.start.x,t.end.x)+Rv,minY:this.meshBounds.minY,maxY:t.start.y}:{minX:Math.min(t.start.x,t.end.x)-Rv,maxX:Math.max(t.start.x,t.end.x)+Rv,minY:t.start.y,maxY:this.meshBounds.maxY},r=this.meshIndex.search(i.minX,i.minY,i.maxX,i.maxY);let s=null,a=Number.POSITIVE_INFINITY;const A=[...r.map(c=>this.inputProblem.meshNodes[c]),...e];for(const c of A){if(c._containsObstacle||!c.availableZ.some(g=>o.includes(g)))continue;const l=Pg(c);if((n?Math.min(Math.max(t.start.y,t.end.y),l.maxY)-Math.max(Math.min(t.start.y,t.end.y),l.minY):Math.min(Math.max(t.start.x,t.end.x),l.maxX)-Math.max(Math.min(t.start.x,t.end.x),l.minX))<=Nv)continue;const u=n?t.expansionDirection.x<0?t.start.x-l.maxX:l.minX-t.start.x:t.expansionDirection.y<0?t.start.y-l.maxY:l.minY-t.start.y;u<Nv||u>=a||(a=u,s=c)}return s}createExpandedNode(t,e,n){const o=Pg(e),i=this.getObstacleAvailableZ(t.obstacle);if(Math.abs(t.start.x-t.end.x)<=Nv){const c=Math.max(Math.min(t.start.y,t.end.y),o.minY),l=Math.min(Math.max(t.start.y,t.end.y),o.maxY),u=t.expansionDirection.x<0?o.maxX:t.start.x,g=t.expansionDirection.x<0?t.start.x:o.minX;return g-u<=Nv||l-c<=Nv?null:{capacityMeshNodeId:`bga-gapfill-${n}-${t.obstacle.obstacleId??"no-obstacle"}-${e.capacityMeshNodeId}`,center:{x:(u+g)/2,y:(c+l)/2},width:g-u,height:l-c,layer:`z${i.join(",")}`,availableZ:i}}const r=Math.max(Math.min(t.start.x,t.end.x),o.minX),s=Math.min(Math.max(t.start.x,t.end.x),o.maxX),a=t.expansionDirection.y<0?o.maxY:t.start.y,A=t.expansionDirection.y<0?t.start.y:o.minY;return s-r<=Nv||A-a<=Nv?null:{capacityMeshNodeId:`bga-gapfill-${n}-${t.obstacle.obstacleId??"no-obstacle"}-${e.capacityMeshNodeId}`,center:{x:(r+s)/2,y:(a+A)/2},width:s-r,height:A-a,layer:`z${i.join(",")}`,availableZ:i}}overlapsExistingGeometry(t,e){for(const n of this.inputProblem.meshNodes)if(this.getSharedOverlapArea(t,n)>0)return!0;for(const n of e)if(this.getSharedOverlapArea(t,n)>0)return!0;for(const n of this.inputProblem.edgesWithObstacle)if(this.getNodeObstacleOverlapArea(t,n.obstacle)>0)return!0;return!1}_step(){const t=[];for(const[e,n]of this.inputProblem.edgesWithObstacle.entries()){const o=this.getClosestMeshNode(n,t);if(!o)continue;const i=this.createExpandedNode(n,o,e);i&&(this.overlapsExistingGeometry(i,t)||t.push(i))}this.expandedNodes=t,this.solved=!0}getOutput(){return this.expandedNodes}visualize(){const t=this.inputProblem.edgesWithObstacle,e=ice(t);return{rects:[...this.inputProblem.meshNodes.map(n=>({...Wf(n,{rectMargin:.01}),fill:n._containsObstacle?"rgba(255,0,0,0.16)":"rgba(0,120,255,0.08)",stroke:n._containsObstacle?"rgba(255,0,0,0.35)":"rgba(0,120,255,0.28)"})),...this.expandedNodes.map(n=>{const o=DSe(n),i=o===null?null:t[o]??null;return{...Wf(n,{rectMargin:.012,zOffset:.01}),fill:i?$m(i,.24):"rgba(0,160,100,0.24)",stroke:i?$m(i,.72):"rgba(0,160,100,0.68)",label:[i?gB(i,e):"E?","expanded",n.capacityMeshNodeId,`z:${n.availableZ.join(",")}`].join(`
`)}})],lines:[...this.inputProblem.edgesWithObstacle.map(n=>({points:[n.start,n.end],strokeColor:$m(n,.9),strokeWidth:.034,label:[gB(n,e),xW(n)].join(" ")})),...this.inputProblem.edgesWithObstacle.map(n=>{const o=P7(n);return{points:[o,{x:o.x+.16*n.expansionDirection.x,y:o.y+.16*n.expansionDirection.y}],strokeColor:$m(n,.7),strokeWidth:.016,strokeDash:"3 3"}})],points:this.inputProblem.edgesWithObstacle.map(n=>({...P7(n),color:$m(n,.95),label:gB(n,e)}))}}},yN=.001,duo=class extends n7{constructor(t){super(t),this.inputProblem=t}inputProblem;detectEdgesNotConnectedToMesh;expandUnconnectedEdgesToMesh;pipelineDef=[eh("detectEdgesNotConnectedToMesh",uuo,t=>[t.inputProblem]),eh("expandUnconnectedEdgesToMesh",guo,t=>[{meshNodes:t.inputProblem.meshNodes,edgesWithObstacle:t.detectEdgesNotConnectedToMesh.getOutput(),layerCount:t.inputProblem.layerCount}])];getOutput(){return[...this.inputProblem.meshNodes,...this.expandUnconnectedEdgesToMesh.getOutput()]}getExpandedNodes(){return this.expandUnconnectedEdgesToMesh.getOutput()}getObstacleLayer(t){return`z${(t.obstacle.__zLayers??t.obstacle.layers.map(e=>Kr(e,this.inputProblem.layerCount))).join(",")}`}getObstacleRects(){return this.inputProblem.unmarkedComponentObstacles.map(t=>{const e=t.__zLayers??t.layers.map(n=>Kr(n,this.inputProblem.layerCount));return{center:t.center,width:t.width,height:t.height,fill:"rgba(150,150,150,0.08)",stroke:"rgba(90,90,90,0.42)",label:t.obstacleId??t.componentId??"bga obstacle",layer:`z${e.join(",")}`}})}getBaseMeshRects(){return this.inputProblem.meshNodes.map(t=>({...Wf(t,{rectMargin:.025,zOffset:.01}),fill:t._containsObstacle?"rgba(210,60,60,0.14)":"rgba(80,120,160,0.08)",stroke:t._containsObstacle?"rgba(190,40,40,0.42)":"rgba(80,120,160,0.28)",label:`mesh ${t.capacityMeshNodeId}
z:${t.availableZ.join(",")}`}))}initialVisualize(){const t=NSe(this.inputProblem.unmarkedComponentObstacles),e=ice(t),n=[...t.map(o=>({points:[o.start,o.end],strokeColor:$m(o,.72),strokeWidth:.018,strokeDash:"0.05 0.035",layer:this.getObstacleLayer(o),label:[gB(o,e),xW(o)].join(" ")})),...t.map(o=>{const i=P7(o);return{points:[i,{x:i.x+.18*o.expansionDirection.x,y:i.y+.18*o.expansionDirection.y}],strokeColor:$m(o,.64),strokeWidth:.012,strokeDash:"0.035 0.025",layer:this.getObstacleLayer(o)}})];return{title:"BGA GapFill: candidate obstacle edges",rects:[...this.getBaseMeshRects(),...this.getObstacleRects()],lines:n}}finalVisualize(){const t=this.getStageOutput("detectEdgesNotConnectedToMesh")??[],e=this.getStageOutput("expandUnconnectedEdgesToMesh")??[],n=ice(NSe(this.inputProblem.unmarkedComponentObstacles)),o=new Map;for(const A of e){const c=DSe(A);c!==null&&o.set(c,A)}const i=e.map(A=>{const c=DSe(A),l=c===null?null:t[c]??null,u=l?(({expandedNode:d,edge:p,meshNodes:m})=>{const _=Pg(d),f=Math.abs(p.start.x-p.end.x)<=yN;return m.filter(I=>{if(I._containsObstacle||!d.availableZ.some(y=>I.availableZ.includes(y)))return!1;const C=Pg(I);return f?!(Math.min(_.maxY,C.maxY)-Math.max(_.minY,C.minY)<=yN)&&(p.expansionDirection.x<0?Math.abs(C.maxX-_.minX)<=yN:Math.abs(C.minX-_.maxX)<=yN):!(Math.min(_.maxX,C.maxX)-Math.max(_.minX,C.minX)<=yN)&&(p.expansionDirection.y<0?Math.abs(C.maxY-_.minY)<=yN:Math.abs(C.minY-_.maxY)<=yN)}).map(I=>I.capacityMeshNodeId)})({expandedNode:A,edge:l,meshNodes:this.inputProblem.meshNodes}):[],g=l?gB(l,n):"E?",h=l===null?"rgba(0,160,100,0.72)":$m(l,.72);return{...Wf(A,{rectMargin:.012,zOffset:.01}),fill:l===null?"rgba(0,160,100,0.24)":$m(l,.16),stroke:h,label:[`${g} gap fill`,u.length>0?`to ${u.join(",")}`:"target mesh not adjacent",`z:${A.availableZ.join(",")}`].join(`
`)}}),r=t.map((A,c)=>{const l=o.get(c);return{points:[A.start,A.end],strokeColor:l?$m(A,.68):"rgba(80,80,80,0.14)",strokeWidth:l?.026:.008,...l?{}:{strokeDash:"5 4"},layer:this.getObstacleLayer(A),label:[[gB(A,n),xW(A)].join(" "),l?"filled":"no fill created"].join(`
`)}}),s=t.flatMap((A,c)=>{const l=P7(A),u=o.get(c);return u?[{points:[l,u.center],strokeColor:$m(A,.42),strokeWidth:.012,strokeDash:"0.035 0.025",layer:this.getObstacleLayer(A)}]:[]}),a=t.flatMap((A,c)=>o.has(c)?[{...P7(A),color:$m(A,.82),label:gB(A,n),layer:this.getObstacleLayer(A)}]:[]);return{title:"BGA GapFill: disconnected edges and created mesh",rects:[...this.getBaseMeshRects(),...this.getObstacleRects(),...i],lines:[...r,...s],points:a}}};function w9t(t,e){const n=[];for(let o=0;o<t.length;o++){const i=t[o];n.push(i);const r=t[o+1];if(r===void 0)continue;const s=Math.round((r-i)/e);if(!(s<=1))for(let a=1;a<s;a++){const A=a/s;n.push(Number((i+(r-i)*A).toFixed(6)))}}return n}var dH=.001;function P9t(t){const e=[];for(let r=1;r<t.length;r++){const s=t[r]-t[r-1];s>dH&&e.push(s)}if(e.length===0)return null;const n=Math.min(...e),o=e.filter(r=>r<=1.5*n).sort((r,s)=>r-s),i=Math.floor(o.length/2);return o.length%2==0?(o[i-1]+o[i])/2:o[i]}function M9t(t){return[...new Set(t)].sort((e,n)=>e-n)}function ace(t){return Number(t.toFixed(6))}var huo=class f5n{static fromObstacles(e){if(e.length===0)return null;const n=M9t(e.map(s=>s.center.x)),o=M9t(e.map(s=>s.center.y)),i=P9t(n),r=P9t(o);return i===null||r===null?null:new f5n({obstacles:e,xCoordinates:w9t(n,i),yCoordinates:w9t(o,r),pitchX:i,pitchY:r})}xCoordinates;yCoordinates;pitchX;pitchY;originX;originY;rowCount;colCount;padWidth;padHeight;slots=new Map;constructor(e){this.xCoordinates=e.xCoordinates,this.yCoordinates=e.yCoordinates,this.pitchX=e.pitchX,this.pitchY=e.pitchY,this.originX=this.xCoordinates[0],this.originY=this.yCoordinates[0],this.colCount=this.xCoordinates.length,this.rowCount=this.yCoordinates.length,this.padWidth=e.obstacles[0].width,this.padHeight=e.obstacles[0].height;for(const n of e.obstacles){const o=this.getSlotForObstacle(n);o&&this.slots.set(this.getSlotKey(o.row,o.col),{...o,obstacle:n})}}getSlotKey(e,n){return`${e}:${n}`}getAxisIndex(e,n){let o=-1,i=Number.POSITIVE_INFINITY;for(let r=0;r<e.length;r++){const s=Math.abs(e[r]-n);s<i&&(i=s,o=r)}return i<=dH?o:null}getAxisCoordinate(e,n){return e[n]}hasPadAt(e,n){return this.slots.has(this.getSlotKey(e,n))}getSlotForObstacle(e){const n=this.getAxisIndex(this.yCoordinates,e.center.y),o=this.getAxisIndex(this.xCoordinates,e.center.x);return n===null||o===null||n<0||n>=this.rowCount||o<0||o>=this.colCount?null:{row:n,col:o}}getSlotCenter(e,n){return{x:this.getAxisCoordinate(this.xCoordinates,n),y:this.getAxisCoordinate(this.yCoordinates,e)}}getHorizontalGap(e,n){const o=this.getSlotCenter(e,n),i=this.getSlotCenter(e,n+1),r=Math.abs(i.x-o.x);return{orientation:"horizontal",row:e,col:n,center:{x:ace((o.x+i.x)/2),y:o.y},width:r-this.padWidth,height:this.padHeight,isBetweenTwoPads:this.hasPadAt(e,n)&&this.hasPadAt(e,n+1)}}getVerticalGap(e,n){const o=this.getSlotCenter(e,n),i=this.getSlotCenter(e+1,n),r=Math.abs(i.y-o.y);return{orientation:"vertical",row:e,col:n,center:{x:o.x,y:ace((o.y+i.y)/2)},width:this.padWidth,height:r-this.padHeight,isBetweenTwoPads:this.hasPadAt(e,n)&&this.hasPadAt(e+1,n)}}getDiagonalGap(e,n){const o=this.getSlotCenter(e,n),i=this.getSlotCenter(e+1,n+1),r=Math.abs(i.x-o.x),s=Math.abs(i.y-o.y);return{orientation:"diagonal",row:e,col:n,center:{x:ace((o.x+i.x)/2),y:ace((o.y+i.y)/2)},width:r-this.padWidth,height:s-this.padHeight,isBetweenTwoPads:this.hasPadAt(e,n)&&this.hasPadAt(e+1,n+1)}}getDiagonalGaps(){const e=[];for(let n=0;n<this.rowCount-1;n++)for(let o=0;o<this.colCount-1;o++)e.push(this.getDiagonalGap(n,o));return e.filter(n=>n.width>dH&&n.height>dH)}getAxisGaps(){const e=[];for(let n=0;n<this.rowCount;n++)for(let o=0;o<this.colCount-1;o++)e.push(this.getHorizontalGap(n,o));for(let n=0;n<this.rowCount-1;n++)for(let o=0;o<this.colCount;o++)e.push(this.getVerticalGap(n,o));return e.filter(n=>n.width>dH&&n.height>dH)}getMissingSlots(){const e=[];for(let n=0;n<this.rowCount;n++)for(let o=0;o<this.colCount;o++)this.hasPadAt(n,o)||e.push({row:n,col:o,center:this.getSlotCenter(n,o),width:this.padWidth,height:this.padHeight});return e}};function puo(t){if([t.point.pointId,t.point.pcb_port_id].filter(o=>typeof o=="string").some(o=>t.obstacle.connectedTo.includes(o)))return!0;if(t.obstacle.connectedTo.length===0||o7(t.point,t.obstacle)>.001)return!1;const e=RD(t.point).map(o=>Kr(o,t.layerCount)),n=t.obstacle.layers.map(o=>Kr(o,t.layerCount));return e.some(o=>n.includes(o))}function D9t(t){return t.obstacleId??[t.componentId??"no-component",t.center.x,t.center.y,t.width,t.height,t.layers.join(",")].join(":")}function N9t({componentId:t,orientationKey:e,row:n,col:o,center:i,width:r,height:s}){return["cmn",e,t,n,o,i.x,i.y,r,s].join("_")}function R9t(t){const{componentId:e,bgaGap:n,freeLayers:o,multiLayerThreshold:i}=t,r=n.width>i&&n.height>i;let s="d";n.orientation==="horizontal"&&(s="h"),n.orientation==="vertical"&&(s="v");const a=N9t({componentId:e,orientationKey:s,row:n.row,col:n.col,center:n.center,width:n.width,height:n.height});return n.orientation==="diagonal"&&r||!n.isBetweenTwoPads&&r?[{center:n.center,width:n.width,height:n.height,availableZ:[...o],capacityMeshNodeId:`${a}_all`,layer:""}]:o.map(A=>({center:n.center,width:n.width,height:n.height,availableZ:[A],capacityMeshNodeId:`${a}_${A}`,layer:""}))}function muo(t){const{componentId:e,obstacle:n,freeLayers:o,layerCount:i}=t,r=n.layers.map(A=>Kr(A,i)),s=o.filter(A=>!r.includes(A)),a=D9t(n);return s.map(A=>({capacityMeshNodeId:`free-${e}-${a}-${A}`,center:n.center,width:n.width,height:n.height,layer:`z${A}`,availableZ:[A]}))}function T9t(t,e,n){const o=e.layers.map(s=>Kr(s,n.layerCount)),i=D9t(e),r=(function(s){for(const a of s.srj.connections)for(const A of a.pointsToConnect)if(puo({point:A,obstacle:s.obstacle,layerCount:s.srj.layerCount}))return a.__rootConnectionNames?.[0]??a.name})({obstacle:e,srj:n});return{capacityMeshNodeId:`obstacle-${t}-${i}-${o.join(",")}-${e.center.x}-${e.center.y}`,_containsObstacle:!0,...r?{_containsTarget:!0,_targetConnectionName:r}:{},center:e.center,width:e.width,height:e.height,layer:`z${o.join(",")}`,availableZ:o}}var _uo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;componentObstacles=[];meshNodes=[];getConstructorParams(){return[this.inputProblem]}_step(){const{srj:t,componentBounds:e,componentId:n,markedComponentObstacles:o,unmarkedComponentObstacles:i}=this.inputProblem,r=t.obstacles.filter(g=>g.isCopperPour===!0).filter(g=>WF(Pg(g),e)).flatMap(g=>g.layers.map(h=>Kr(h,t.layerCount))),s=Array.from({length:t.layerCount},(g,h)=>h).filter(g=>!r.includes(g));if(this.componentObstacles=o,o.length===0||s.length===0)return void(this.solved=!0);const a=huo.fromObstacles(o);if(!a)return void(this.solved=!0);const A=a.getAxisGaps(),c=a.getDiagonalGaps(),l=a.getMissingSlots(),u=1.2*(this.inputProblem.viaDiameter??om(t).padDiameter);this.meshNodes=[...A.flatMap(g=>R9t({componentId:n,bgaGap:g,freeLayers:s,multiLayerThreshold:u})),...c.flatMap(g=>R9t({componentId:n,bgaGap:g,freeLayers:s,multiLayerThreshold:u})),...l.flatMap(g=>(function(h){const{componentId:d,missingBgaSlot:p,freeLayers:m,multiLayerThreshold:_}=h,f=N9t({componentId:d,orientationKey:"missing",row:p.row,col:p.col,center:p.center,width:p.width,height:p.height});return p.width>_&&p.height>_?[{center:p.center,width:p.width,height:p.height,availableZ:[...m],capacityMeshNodeId:`${f}_all`,layer:""}]:m.map(I=>({center:p.center,width:p.width,height:p.height,availableZ:[I],capacityMeshNodeId:`${f}_${I}`,layer:""}))})({componentId:n,missingBgaSlot:g,freeLayers:s,multiLayerThreshold:u})),...o.flatMap(g=>[...muo({componentId:n,obstacle:g,freeLayers:s,layerCount:t.layerCount}),T9t(n,g,t)]),...i.flatMap(g=>[T9t(n,g,t)])],this.meshNodes=(function(g){const h=new Map;return g.map(d=>{const p=h.get(d.capacityMeshNodeId)??0;return h.set(d.capacityMeshNodeId,p+1),p===0?d:{...d,capacityMeshNodeId:`${d.capacityMeshNodeId}__dup${p}`}})})(this.meshNodes),this.solved=!0}getOutput(){return this.meshNodes}visualize(){return{rects:[{center:{x:(this.inputProblem.componentBounds.minX+this.inputProblem.componentBounds.maxX)/2,y:(this.inputProblem.componentBounds.minY+this.inputProblem.componentBounds.maxY)/2},width:this.inputProblem.componentBounds.maxX-this.inputProblem.componentBounds.minX,height:this.inputProblem.componentBounds.maxY-this.inputProblem.componentBounds.minY,fill:"rgba(0,0,0,0)",stroke:"rgba(30,30,30,0.65)",label:`component ${this.inputProblem.componentId}`},...this.inputProblem.markedComponentObstacles.map(t=>({center:t.center,width:t.width,height:t.height,fill:"rgba(255,0,0,0.18)",stroke:"rgba(255,0,0,0.52)",label:`pad ${t.obstacleId??"obstacle"}`})),...this.inputProblem.unmarkedComponentObstacles.map(t=>({center:t.center,width:t.width,height:t.height,fill:"rgba(255,140,0,0.14)",stroke:"rgba(255,140,0,0.42)",label:`foreign ${t.obstacleId??"obstacle"}`})),...this.meshNodes.map(t=>({...Wf(t,{rectMargin:.01}),fill:t._containsObstacle?"rgba(255,0,0,0.14)":t.capacityMeshNodeId.includes("missing")?"rgba(0,200,120,0.18)":"rgba(0,120,255,0.12)",stroke:t._containsObstacle?"rgba(255,0,0,0.36)":t.capacityMeshNodeId.includes("missing")?"rgba(0,200,120,0.52)":"rgba(0,120,255,0.38)"}))]}}};function RSe(t){return t.capacityMeshNodeId.startsWith("bga-gapfill-")}function fuo(t){return JSON.stringify({availableZ:[...t.availableZ].sort((e,n)=>e-n),_containsTarget:t._containsTarget??!1,_targetConnectionName:t._targetConnectionName??null,_depth:t._depth??null,_strawNode:t._strawNode??!1,_strawParentCapacityMeshNodeId:t._strawParentCapacityMeshNodeId??null,_qfpRegionType:t._qfpRegionType??null,_isNarrowQfpPadGap:t._isNarrowQfpPadGap??!1,_soicRegionType:t._soicRegionType??null,_offBoardConnectionId:t._offBoardConnectionId??null,_offboardNetName:t._offboardNetName??null,_isVirtualOffboard:t._isVirtualOffboard??!1,_containsObstacle:t._containsObstacle??!1})}function Iuo(t,e){const n=Pg(t);for(const o of e){if(!t.availableZ.some(r=>o.availableZ.includes(r)))continue;const i=Pg(o);if(WF(n,i))return!0}return!1}function Cuo(t){const e=t[0];if(!e)throw new Error("createMergedNode requires at least one source node");let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const s of t){const a=Pg(s);n=Math.min(n,a.minX),o=Math.max(o,a.maxX),i=Math.min(i,a.minY),r=Math.max(r,a.maxY)}return{...e,capacityMeshNodeId:`merge:${t.map(s=>s.capacityMeshNodeId).join(":")}`,center:{x:(n+o)/2,y:(i+r)/2},width:o-n,height:r-i}}function EW(t,e,n){return{center:t.center,width:t.width,height:t.height,fill:e,stroke:e,label:n}}var yuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;obstacleNodes=[];passthroughNodes=[];mergedNodes=[];pendingGroups=[];totalGroupCount=0;processedGroupCount=0;debugFilteredNodes=[];debugMergeEvents=[];currentGroupKey=null;currentRootNodeId=null;lastMergedNodeId=null;_setup(){this.obstacleNodes=this.inputProblem.meshNodes.filter(e=>e._containsObstacle===!0),this.passthroughNodes=[],this.mergedNodes=[],this.pendingGroups=[],this.totalGroupCount=0,this.processedGroupCount=0,this.debugFilteredNodes=[],this.debugMergeEvents=[],this.currentGroupKey=null,this.currentRootNodeId=null,this.lastMergedNodeId=null;const t=new Map;for(const e of this.inputProblem.meshNodes){if(e._containsObstacle===!0){this.passthroughNodes.push(e),this.debugFilteredNodes.push({type:"preserved-obstacle",node:e,reason:"contains-obstacle"});continue}if(RSe(e)){this.passthroughNodes.push(e);continue}if(e.availableZ.length!==this.inputProblem.layerCount){this.passthroughNodes.push(e);continue}let n=!1;for(let r=0;r<this.inputProblem.layerCount;r+=1)if(!e.availableZ.includes(r)){n=!0;break}if(n){this.passthroughNodes.push(e);continue}if(Iuo(e,this.obstacleNodes)){this.passthroughNodes.push(e),this.debugFilteredNodes.push({type:"preserved-overlap",node:e,reason:"overlaps-obstacle"});continue}const o=fuo(e),i=t.get(o);i?i.push(e):t.set(o,[e])}for(const[e,n]of t.entries())n.length<=1?this.passthroughNodes.push(...n):this.pendingGroups.push({groupKey:e,nodes:n});this.pendingGroups.sort((e,n)=>n.nodes.length-e.nodes.length),this.totalGroupCount=this.pendingGroups.length,this.updateStats("setup")}_step(){const t=this.pendingGroups.shift();if(!t)return this.currentGroupKey=null,this.currentRootNodeId=null,this.solved=!0,void this.updateStats("done");const e=t.nodes[0];this.currentGroupKey=t.groupKey,this.currentRootNodeId=e?e.capacityMeshNodeId:null;const n=(function(i){if(!i.nodes[0])return{outputNodes:[],mergeEvents:[]};let r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.POSITIVE_INFINITY;for(const d of i.nodes){r=Math.min(r,d.width),s=Math.min(s,d.height);const p=Pg(d);a=Math.min(a,p.minX),A=Math.min(A,p.minY)}const c=new Map,l=[];for(const d of i.nodes){const p=Pg(d),m=Math.round((p.minX-a)/r),_=Math.round((p.minY-A)/s),f=Math.max(1,Math.round(d.width/r)),I=Math.max(1,Math.round(d.height/s));for(let C=0;C<I;C+=1)for(let y=0;y<f;y+=1)c.set(`${m+y},${_+C}`,d);l.push({col:m,row:_})}l.sort((d,p)=>d.row-p.row||d.col-p.col);const u=new Set,g=[],h=[];for(const d of l){const p=`${d.col},${d.row}`;if(u.has(p))continue;let m=0;for(;;){const B=`${d.col+m},${d.row}`;if(!c.has(B)||u.has(B))break;m+=1}let _=m,f=1,I=1,C=1;for(let B=1;;B+=1){const S=d.row+B-1;let Q=0;for(;Q<_;){const w=`${d.col+Q},${S}`;if(!c.has(w)||u.has(w))break;Q+=1}if(Q===0)break;_=Math.min(_,Q);for(let w=_;w>=1;w-=1){const M=w*r,k=B*s,R=Math.min(M,k);if((R<=1e-6?Number.POSITIVE_INFINITY:Math.max(M,k)/R)>4)continue;const F=w*B;F>C&&(C=F,f=w,I=B);break}}const y=new Map;for(let B=0;B<I;B+=1)for(let S=0;S<f;S+=1){const Q=`${d.col+S},${d.row+B}`,w=c.get(Q);w&&(u.add(Q),y.set(w.capacityMeshNodeId,w))}const x=[...y.values()];if(x.length<=1){const B=x[0];B&&g.push(B);continue}const E=Cuo(x);g.push(E),h.push({type:"merge",groupKey:i.groupKey,sourceNodes:x,mergedNode:E})}return{outputNodes:g,mergeEvents:h}})(t);this.mergedNodes.push(...n.outputNodes),this.processedGroupCount+=1,this.debugMergeEvents.push(...n.mergeEvents);const o=n.mergeEvents[n.mergeEvents.length-1];o&&(this.lastMergedNodeId=o.mergedNode.capacityMeshNodeId),this.updateStats(n.mergeEvents.length>0?"merged-group":"passthrough-group")}computeProgress(){return this.totalGroupCount===0?1:this.processedGroupCount/this.totalGroupCount}updateStats(t){const e=new Set(this.debugMergeEvents.map(o=>o.groupKey)),n={lastAction:t,totalGroupCount:this.totalGroupCount,processedGroupCount:this.processedGroupCount,pendingGroupCount:this.pendingGroups.length,mergedNodeCount:this.mergedNodes.length,passthroughNodeCount:this.passthroughNodes.length,gapFillNodeCount:this.passthroughNodes.filter(RSe).length,preservedObstacleNodeCount:this.debugFilteredNodes.filter(o=>o.type==="preserved-obstacle").length,preservedOverlapNodeCount:this.debugFilteredNodes.filter(o=>o.type==="preserved-overlap").length,mergeCount:this.debugMergeEvents.length,mergedGroupCount:e.size,currentGroupKey:this.currentGroupKey,currentRootNodeId:this.currentRootNodeId,lastMergedNodeId:this.lastMergedNodeId};this.stats=n}getConstructorParams(){return[this.inputProblem]}getOutput(){return[...this.mergedNodes,...this.passthroughNodes]}visualize(){const t=this.getOutput(),e=this.currentRootNodeId?t.find(o=>o.capacityMeshNodeId===this.currentRootNodeId)??null:null,n=this.lastMergedNodeId?t.find(o=>o.capacityMeshNodeId===this.lastMergedNodeId)??null:null;return{rects:[...this.debugFilteredNodes.map(o=>EW(o.node,o.type==="preserved-obstacle"?"rgba(255,64,64,0.35)":"rgba(255,160,64,0.35)",o.reason)),...this.passthroughNodes.map(o=>EW(o,o._containsObstacle?"rgba(255,0,0,0.35)":RSe(o)?"rgba(0,120,255,0.18)":"rgba(160,160,160,0.12)")),...this.mergedNodes.map(o=>EW(o,"rgba(120,120,120,0.14)")),...e?[EW(e,"rgba(255,215,0,0.35)","active-group")]:[],...n?[EW(n,"rgba(0,200,120,0.28)","merged")]:[]]}}},xuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;obstacleQueue=[];obstacleQueueIndex=0;meshNodes=[];_setup(){this.obstacleQueue=this.inputProblem.obstacles,this.obstacleQueueIndex=0,this.meshNodes=[...this.inputProblem.meshNodes]}_step(){if(this.obstacleQueueIndex>=this.obstacleQueue.length)return void(this.solved=!0);const t=this.obstacleQueue[this.obstacleQueueIndex],e=t.layers.map(o=>Kr(o,this.inputProblem.layerCount)),n=[];for(const o of this.meshNodes){if(o._containsObstacle){n.push(o);continue}if(!e.some(r=>o.availableZ.includes(r))){n.push(o);continue}if(!WF(Pg(o),Pg(t))){n.push(o);continue}if(o.availableZ.length===1)continue;const i=o.availableZ.filter(r=>!e.includes(r));for(const r of i){const s={...o,capacityMeshNodeId:`${o.capacityMeshNodeId}:z${r}`,availableZ:[r],layer:`z${r}`};n.push(s)}}this.meshNodes=n,this.obstacleQueueIndex+=1,this.stats={obstaclesProcessed:this.obstacleQueueIndex,obstacleCount:this.obstacleQueue.length,meshNodeCount:this.meshNodes.length}}computeProgress(){return this.obstacleQueue.length===0?1:this.obstacleQueueIndex/this.obstacleQueue.length}getConstructorParams(){return[this.inputProblem]}getOutput(){return this.meshNodes}visualize(){const t=this.obstacleQueueIndex<this.obstacleQueue.length?this.obstacleQueue[this.obstacleQueueIndex]??null:null,e=this.obstacleQueue.slice(0,this.obstacleQueueIndex),n=t?this.obstacleQueue.slice(this.obstacleQueueIndex+1):[];return{rects:[...e.map(o=>({center:o.center,width:o.width,height:o.height,fill:"rgba(160,160,160,0.10)",stroke:"rgba(160,160,160,0.35)",label:`processed ${o.obstacleId??"obstacle"}`})),...t?[{center:t.center,width:t.width,height:t.height,fill:"rgba(255,140,0,0.22)",stroke:"rgba(255,140,0,0.75)",label:`active ${t.obstacleId??"obstacle"}`}]:[],...n.map(o=>({center:o.center,width:o.width,height:o.height,fill:"rgba(255,0,0,0.05)",stroke:"rgba(255,0,0,0.22)",label:`pending ${o.obstacleId??"obstacle"}`})),...this.meshNodes.map(o=>({...Wf(o,{rectMargin:.01}),fill:o._containsObstacle?"rgba(255,0,0,0.18)":"rgba(0,120,255,0.12)",stroke:o._containsObstacle?"rgba(255,0,0,0.45)":"rgba(0,120,255,0.45)"}))]}}};CW.register(class extends n7{constructor(t){super(t),this.inputProblem=t}inputProblem;static componentKind="bga";initialTopologySolver;removeMeshNodeOverlappingWithUnmarkedObstacle;gapfillDueToNodeRemoval;mergeMeshNodes;markedComponentObstacles=[];unmarkedComponentObstacles=[];pipelineDef=[eh("initialTopologySolver",_uo,t=>[{srj:t.inputProblem.inputSrj,componentBounds:t.inputProblem.detectedComponent.bounds,componentId:t.inputProblem.detectedComponent.componentId,markedComponentObstacles:t.markedComponentObstacles,unmarkedComponentObstacles:t.unmarkedComponentObstacles,viaDiameter:t.inputProblem.viaDiameter}]),eh("removeMeshNodeOverlappingWithUnmarkedObstacle",xuo,t=>[{meshNodes:t.initialTopologySolver.getOutput(),obstacles:t.unmarkedComponentObstacles,layerCount:t.inputProblem.inputSrj.layerCount}]),eh("gapfillDueToNodeRemoval",duo,t=>[{meshNodes:t.removeMeshNodeOverlappingWithUnmarkedObstacle.getOutput(),unmarkedComponentObstacles:t.unmarkedComponentObstacles,layerCount:t.inputProblem.inputSrj.layerCount}]),eh("mergeMeshNodes",yuo,t=>[{meshNodes:t.gapfillDueToNodeRemoval.getOutput(),layerCount:t.inputProblem.inputSrj.layerCount}])];_setup(){const t=this.inputProblem.detectedComponent.bounds,e=this.inputProblem.detectedComponent.componentId,n=[],o=[];for(const i of this.inputProblem.inputSrj.obstacles){const r=Pg(i);WF(t,r)&&(i.componentId!==e?o.push(i):n.push(i))}this.markedComponentObstacles=n,this.unmarkedComponentObstacles=o}getConstructorParams(){return[this.inputProblem]}getOutput(){return{routingRegions:this.mergeMeshNodes?.getOutput()??this.gapfillDueToNodeRemoval?.getOutput()??this.removeMeshNodeOverlappingWithUnmarkedObstacle?.getOutput()??[]}}initialVisualize(){return{rects:[{center:{x:(this.inputProblem.detectedComponent.bounds.minX+this.inputProblem.detectedComponent.bounds.maxX)/2,y:(this.inputProblem.detectedComponent.bounds.minY+this.inputProblem.detectedComponent.bounds.maxY)/2},width:this.inputProblem.detectedComponent.bounds.maxX-this.inputProblem.detectedComponent.bounds.minX,height:this.inputProblem.detectedComponent.bounds.maxY-this.inputProblem.detectedComponent.bounds.minY,fill:"rgba(0,0,0,0)",stroke:"rgba(30,30,30,0.65)",label:`bga ${this.inputProblem.detectedComponent.componentId}`},...this.markedComponentObstacles.map(t=>({center:t.center,width:t.width,height:t.height,fill:"rgba(255,0,0,0.18)",stroke:"rgba(255,0,0,0.52)",label:`pad ${t.obstacleId??"obstacle"}`})),...this.unmarkedComponentObstacles.map(t=>({center:t.center,width:t.width,height:t.height,fill:"rgba(255,140,0,0.14)",stroke:"rgba(255,140,0,0.42)",label:`foreign ${t.obstacleId??"obstacle"}`}))]}}finalVisualize(){return{rects:this.getOutput().routingRegions.map(t=>({...Wf(t,{rectMargin:.01}),fill:t._containsObstacle?"rgba(255,0,0,0.16)":"rgba(0,120,255,0.12)",stroke:t._containsObstacle?"rgba(255,0,0,0.36)":"rgba(0,120,255,0.42)"}))}}});var k9t=1e-6;function Ace(t,e){return t.__zLayers&&t.__zLayers.length>0?Hz(t.__zLayers,e):Oz(t.layers,e)}function cce(t){const e=[...t].sort((r,s)=>r-s),n=[];for(let r=1;r<e.length;r++){const s=e[r]-e[r-1];s>k9t&&n.push(s)}const o=n.length>0?Math.max(k9t,Math.min(...n)/4):.001,i=[];for(const r of e){const s=i[i.length-1];(s===void 0||Math.abs(r-s)>o)&&i.push(r)}return i}function TSe(t){return Array.from({length:Math.max(0,t)},(e,n)=>n)}var F9t=1e-6;function L9t(t){return t.maxX-t.minX>F9t&&t.maxY-t.minY>F9t}function H9t(t){return(function(e){const n=Math.min(e.width,e.height),o=Math.max(e.width,e.height);return n<=0?0:o/n})(t)>=1.5}function Euo(t,e){const n=[{side:"top",distance:Math.abs(t.center.y-e.minY)},{side:"right",distance:Math.abs(e.maxX-t.center.x)},{side:"bottom",distance:Math.abs(e.maxY-t.center.y)},{side:"left",distance:Math.abs(t.center.x-e.minX)}];return n.sort((o,i)=>o.distance-i.distance),n[0].side}function Buo(t,e){return t.map((n,o)=>({key:`pad:${n.obstacleId??o}`,bounds:Is(n),regionType:"pad",obstacleZ:Ace(n,e)}))}function buo(t,e){return t.map((n,o)=>({key:`thermal-pad:${n.obstacleId??o}`,bounds:Is(n),regionType:"pad",obstacleZ:Ace(n,e)}))}function O9t(t,e){return!!L9t(t)&&Math.min(t.maxX-t.minX,t.maxY-t.minY)<=e}function lce({side:t,sideObstacles:e,bounds:n,innerBounds:o,narrowThreshold:i}){const r=[];for(let s=0;s<e.length-1;s++){const a=Is(e[s]),A=Is(e[s+1]);let c;c=t==="top"?{minX:a.maxX,maxX:A.minX,minY:n.minY,maxY:o.minY}:t==="right"?{minX:o.maxX,maxX:n.maxX,minY:a.maxY,maxY:A.minY}:t==="bottom"?{minX:a.maxX,maxX:A.minX,minY:o.maxY,maxY:n.maxY}:{minX:n.minX,maxX:o.minX,minY:a.maxY,maxY:A.minY},r.push({key:`${t}-gap-${s}`,bounds:c,regionType:"pad-gap",isNarrowPadGap:O9t(c,i)})}return r}function uce({side:t,sideObstacles:e,thermalPadBounds:n,narrowThreshold:o}){const i=[];for(let r=0;r<e.length;r++){const s=Is(e[r]),a=e[r-1]?Is(e[r-1]):null,A=e[r+1]?Is(e[r+1]):null;let c;c=t==="top"?{minX:a?(a.maxX+s.minX)/2:s.minX,maxX:A?(s.maxX+A.minX)/2:s.maxX,minY:s.maxY,maxY:n.minY}:t==="right"?{minX:n.maxX,maxX:s.minX,minY:a?(a.maxY+s.minY)/2:s.minY,maxY:A?(s.maxY+A.minY)/2:s.maxY}:t==="bottom"?{minX:a?(a.maxX+s.minX)/2:s.minX,maxX:A?(s.maxX+A.minX)/2:s.maxX,minY:n.maxY,maxY:s.minY}:{minX:s.maxX,maxX:n.minX,minY:a?(a.maxY+s.minY)/2:s.minY,maxY:A?(s.maxY+A.minY)/2:s.maxY},i.push({key:`inner-${t}-pad-${r}`,bounds:c,regionType:"pad-gap",isNarrowPadGap:O9t(c,o)})}return i}function Suo({bounds:t,innerBounds:e,sideGroups:n}){const o=n.top[0]?Is(n.top[0]):null,i=n.top.at(-1)?Is(n.top.at(-1)):null,r=n.right[0]?Is(n.right[0]):null,s=n.right.at(-1)?Is(n.right.at(-1)):null,a=n.bottom[0]?Is(n.bottom[0]):null,A=n.bottom.at(-1)?Is(n.bottom.at(-1)):null,c=n.left[0]?Is(n.left[0]):null,l=n.left.at(-1)?Is(n.left.at(-1)):null;return[{key:"corner-nw-outer",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:t.minY,maxY:e.minY}},{key:"corner-nw-top",regionType:"corner",bounds:{minX:e.minX,maxX:o?.minX??e.minX,minY:t.minY,maxY:e.minY}},{key:"corner-nw-left",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:e.minY,maxY:c?.minY??e.minY}},{key:"corner-ne-outer",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:t.minY,maxY:e.minY}},{key:"corner-ne-top",regionType:"corner",bounds:{minX:i?.maxX??e.maxX,maxX:e.maxX,minY:t.minY,maxY:e.minY}},{key:"corner-ne-right",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.minY,maxY:r?.minY??e.minY}},{key:"corner-se-outer",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.maxY,maxY:t.maxY}},{key:"corner-se-right",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:s?.maxY??e.maxY,maxY:e.maxY}},{key:"corner-se-bottom",regionType:"corner",bounds:{minX:A?.maxX??e.maxX,maxX:e.maxX,minY:e.maxY,maxY:t.maxY}},{key:"corner-sw-outer",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:e.maxY,maxY:t.maxY}},{key:"corner-sw-bottom",regionType:"corner",bounds:{minX:e.minX,maxX:a?.minX??e.minX,minY:e.maxY,maxY:t.maxY}},{key:"corner-sw-left",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:l?.maxY??e.maxY,maxY:e.maxY}}]}function Quo({innerBounds:t,thermalPadBounds:e,sideGroups:n}){const o=n.top[0]?Is(n.top[0]):null,i=n.top.at(-1)?Is(n.top.at(-1)):null,r=n.right[0]?Is(n.right[0]):null,s=n.right.at(-1)?Is(n.right.at(-1)):null,a=n.bottom[0]?Is(n.bottom[0]):null,A=n.bottom.at(-1)?Is(n.bottom.at(-1)):null,c=n.left[0]?Is(n.left[0]):null,l=n.left.at(-1)?Is(n.left.at(-1)):null;return[{key:"inner-corner-nw-core",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:t.minY,maxY:e.minY}},{key:"inner-corner-nw-top",regionType:"corner",bounds:{minX:e.minX,maxX:o?.minX??e.minX,minY:t.minY,maxY:e.minY}},{key:"inner-corner-nw-left",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:e.minY,maxY:c?.minY??e.minY}},{key:"inner-corner-ne-core",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:t.minY,maxY:e.minY}},{key:"inner-corner-ne-top",regionType:"corner",bounds:{minX:i?.maxX??e.maxX,maxX:e.maxX,minY:t.minY,maxY:e.minY}},{key:"inner-corner-ne-right",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.minY,maxY:r?.minY??e.minY}},{key:"inner-corner-se-core",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.maxY,maxY:t.maxY}},{key:"inner-corner-se-right",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:s?.maxY??e.maxY,maxY:e.maxY}},{key:"inner-corner-se-bottom",regionType:"corner",bounds:{minX:A?.maxX??e.maxX,maxX:e.maxX,minY:e.maxY,maxY:t.maxY}},{key:"inner-corner-sw-core",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:e.maxY,maxY:t.maxY}},{key:"inner-corner-sw-bottom",regionType:"corner",bounds:{minX:e.minX,maxX:a?.minX??e.minX,minY:e.maxY,maxY:t.maxY}},{key:"inner-corner-sw-left",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:l?.maxY??e.maxY,maxY:e.maxY}}]}CW.register(class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;static componentKind="qfp_thermalpad";output=null;getConstructorParams(){return[this.inputProblem]}_step(){if(this.output)return void(this.solved=!0);const{layerCount:t,obstacles:e}=this.inputProblem.inputSrj,{bounds:n,componentId:o}=this.inputProblem.detectedComponent,i=TSe(t),r=e.filter(f=>f.componentId===o),s=r.length>0?r:e,{padRingObstacles:a,thermalPadObstacles:A}=(function(f){return{padRingObstacles:f.filter(H9t),thermalPadObstacles:f.filter(I=>!H9t(I))}})(s),c=(function(f,I){const C={top:[],right:[],bottom:[],left:[]};for(const y of f)C[Euo(y,I)].push(y);return C.top.sort((y,x)=>y.center.x-x.center.x),C.bottom.sort((y,x)=>y.center.x-x.center.x),C.left.sort((y,x)=>y.center.y-x.center.y),C.right.sort((y,x)=>y.center.y-x.center.y),C})(a,n),l=(function({bounds:f,sideGroups:I}){return{minX:I.left.length>0?Math.max(...I.left.map(C=>Is(C).maxX)):f.minX,maxX:I.right.length>0?Math.min(...I.right.map(C=>Is(C).minX)):f.maxX,minY:I.top.length>0?Math.max(...I.top.map(C=>Is(C).maxY)):f.minY,maxY:I.bottom.length>0?Math.min(...I.bottom.map(C=>Is(C).minY)):f.maxY}})({bounds:n,sideGroups:c}),u=(function(f){return f.length===0?null:f.reduce((I,C)=>{const y=Is(C);return{minX:Math.min(I.minX,y.minX),maxX:Math.max(I.maxX,y.maxX),minY:Math.min(I.minY,y.minY),maxY:Math.max(I.maxY,y.maxY)}},Is(f[0]))})(A);if(!u)return this.failed=!0,void(this.error="QfpThermalPadTopologyGeneratorSolver requires a thermal pad");const g=o,h=this.inputProblem.viaDiameter??om(this.inputProblem.inputSrj).padDiameter,d=this.inputProblem.obstacleMargin??this.inputProblem.inputSrj.defaultObstacleMargin??.15,p=h+2*d,m=this.inputProblem.inputSrj.minTraceWidth+2*d,_=[...Buo(a,t),...buo(A,t),...lce({side:"top",sideObstacles:c.top,bounds:n,innerBounds:l,narrowThreshold:m}),...lce({side:"right",sideObstacles:c.right,bounds:n,innerBounds:l,narrowThreshold:m}),...lce({side:"bottom",sideObstacles:c.bottom,bounds:n,innerBounds:l,narrowThreshold:m}),...lce({side:"left",sideObstacles:c.left,bounds:n,innerBounds:l,narrowThreshold:m}),...uce({side:"top",sideObstacles:c.top,thermalPadBounds:u,narrowThreshold:m}),...uce({side:"right",sideObstacles:c.right,thermalPadBounds:u,narrowThreshold:m}),...uce({side:"bottom",sideObstacles:c.bottom,thermalPadBounds:u,narrowThreshold:m}),...uce({side:"left",sideObstacles:c.left,thermalPadBounds:u,narrowThreshold:m}),...Quo({innerBounds:l,thermalPadBounds:u,sideGroups:c}),...Suo({bounds:n,innerBounds:l,sideGroups:c})].flatMap(f=>(function({nodeId:I,bounds:C,availableZ:y,multiLayerThreshold:x,regionType:E,isNarrowPadGap:B=!1,obstacleZ:S=[]}){if(!L9t(C))return[];const Q=(function(k){return{center:{x:(k.minX+k.maxX)/2,y:(k.minY+k.maxY)/2},width:k.maxX-k.minX,height:k.maxY-k.minY}})(C),w=Math.min(Q.width,Q.height)>x,M=w?[{availableZ:y.filter(k=>!S.includes(k)),containsObstacle:!1},{availableZ:y.filter(k=>S.includes(k)),containsObstacle:!0}].filter(k=>k.availableZ.length>0):y.map(k=>({availableZ:[k],containsObstacle:S.includes(k)}));return M.map(k=>({capacityMeshNodeId:M.length===1?I:w?`${I}:${k.containsObstacle?"obstacle":"free"}`:`${I}:z${k.availableZ[0]}`,center:Q.center,width:Q.width,height:Q.height,layer:`z${k.availableZ.join(",")}`,availableZ:k.availableZ,_qfpRegionType:E,_isNarrowQfpPadGap:B,_containsObstacle:k.containsObstacle}))})({nodeId:`qfp_thermalpad:${g}:${f.key}`,bounds:f.bounds,availableZ:i,multiLayerThreshold:p,regionType:f.regionType,isNarrowPadGap:f.isNarrowPadGap,obstacleZ:f.obstacleZ}));this.output={routingRegions:_},this.stats={componentId:o,layerCount:t,viaDiameter:h,obstacleMargin:d,multiLayerThreshold:p,narrowPadGapThreshold:m,thermalPadCount:A.length,perimeterPadCount:a.length,innerCornerRectCount:_.filter(f=>f.capacityMeshNodeId.includes(":inner-corner-")).length,narrowPadGapNodeCount:_.filter(f=>f._isNarrowQfpPadGap).length,topPadCount:c.top.length,rightPadCount:c.right.length,bottomPadCount:c.bottom.length,leftPadCount:c.left.length,multiLayerNodeCount:_.filter(f=>f.availableZ.length>1).length,totalMeshNodeCount:_.length},this.solved=!0}getOutput(){if(!this.output)throw new Error("QfpThermalPadTopologyGeneratorSolver has not solved yet");return this.output}});var G9t=1e-6;function Y9t(t){return t.maxX-t.minX>G9t&&t.maxY-t.minY>G9t}function vuo(t,e){const n=[{side:"top",distance:Math.abs(t.center.y-e.minY)},{side:"right",distance:Math.abs(e.maxX-t.center.x)},{side:"bottom",distance:Math.abs(e.maxY-t.center.y)},{side:"left",distance:Math.abs(t.center.x-e.minX)}];return n.sort((o,i)=>o.distance-i.distance),n[0].side}function wuo(t,e){return t.map((n,o)=>({key:`pad:${n.obstacleId??o}`,bounds:Is(n),regionType:"pad",obstacleZ:Ace(n,e),connectedTo:[...n.connectedTo]}))}function Puo(t,e){return!!Y9t(t)&&Math.min(t.maxX-t.minX,t.maxY-t.minY)<=e}function gce({side:t,sideObstacles:e,bounds:n,centralBounds:o,narrowThreshold:i}){const r=[];for(let s=0;s<e.length-1;s++){const a=Is(e[s]),A=Is(e[s+1]);let c;c=t==="top"?{minX:a.maxX,maxX:A.minX,minY:n.minY,maxY:o.minY}:t==="right"?{minX:o.maxX,maxX:n.maxX,minY:a.maxY,maxY:A.minY}:t==="bottom"?{minX:a.maxX,maxX:A.minX,minY:o.maxY,maxY:n.maxY}:{minX:n.minX,maxX:o.minX,minY:a.maxY,maxY:A.minY},r.push({key:`${t}-gap-${s}`,bounds:c,regionType:"pad-gap",isNarrowPadGap:Puo(c,i)})}return r}function Muo({bounds:t,centralBounds:e,sideGroups:n}){const o=n.top[0]?Is(n.top[0]):null,i=n.top.at(-1)?Is(n.top.at(-1)):null,r=n.right[0]?Is(n.right[0]):null,s=n.right.at(-1)?Is(n.right.at(-1)):null,a=n.bottom[0]?Is(n.bottom[0]):null,A=n.bottom.at(-1)?Is(n.bottom.at(-1)):null,c=n.left[0]?Is(n.left[0]):null,l=n.left.at(-1)?Is(n.left.at(-1)):null;return[{key:"corner-nw-outer",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:t.minY,maxY:e.minY}},{key:"corner-nw-top",regionType:"corner",bounds:{minX:e.minX,maxX:o?.minX??e.minX,minY:t.minY,maxY:e.minY}},{key:"corner-nw-left",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:e.minY,maxY:c?.minY??e.minY}},{key:"corner-ne-outer",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:t.minY,maxY:e.minY}},{key:"corner-ne-top",regionType:"corner",bounds:{minX:i?.maxX??e.maxX,maxX:e.maxX,minY:t.minY,maxY:e.minY}},{key:"corner-ne-right",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.minY,maxY:r?.minY??e.minY}},{key:"corner-se-outer",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:e.maxY,maxY:t.maxY}},{key:"corner-se-right",regionType:"corner",bounds:{minX:e.maxX,maxX:t.maxX,minY:s?.maxY??e.maxY,maxY:e.maxY}},{key:"corner-se-bottom",regionType:"corner",bounds:{minX:A?.maxX??e.maxX,maxX:e.maxX,minY:e.maxY,maxY:t.maxY}},{key:"corner-sw-outer",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:e.maxY,maxY:t.maxY}},{key:"corner-sw-bottom",regionType:"corner",bounds:{minX:e.minX,maxX:a?.minX??e.minX,minY:e.maxY,maxY:t.maxY}},{key:"corner-sw-left",regionType:"corner",bounds:{minX:t.minX,maxX:e.minX,minY:l?.maxY??e.maxY,maxY:e.maxY}}]}CW.register(class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;static componentKind="qfp";output=null;getConstructorParams(){return[this.inputProblem]}_step(){if(this.output)return void(this.solved=!0);const{layerCount:t,obstacles:e}=this.inputProblem.inputSrj,{bounds:n,componentId:o}=this.inputProblem.detectedComponent,i=TSe(t),r=e.filter(p=>p.componentId===o),s=r.length>0?r:e,a=(function(p,m){const _={top:[],right:[],bottom:[],left:[]};for(const f of p)_[vuo(f,m)].push(f);return _.top.sort((f,I)=>f.center.x-I.center.x),_.bottom.sort((f,I)=>f.center.x-I.center.x),_.left.sort((f,I)=>f.center.y-I.center.y),_.right.sort((f,I)=>f.center.y-I.center.y),_})(s,n),A=(function({bounds:p,sideGroups:m}){return{minX:m.left.length>0?Math.max(...m.left.map(_=>Is(_).maxX)):p.minX,maxX:m.right.length>0?Math.min(...m.right.map(_=>Is(_).minX)):p.maxX,minY:m.top.length>0?Math.max(...m.top.map(_=>Is(_).maxY)):p.minY,maxY:m.bottom.length>0?Math.min(...m.bottom.map(_=>Is(_).minY)):p.maxY}})({bounds:n,sideGroups:a}),c=o,l=this.inputProblem.viaDiameter??om(this.inputProblem.inputSrj).padDiameter,u=this.inputProblem.obstacleMargin??this.inputProblem.inputSrj.defaultObstacleMargin??.15,g=l+2*u,h=this.inputProblem.inputSrj.minTraceWidth+2*u,d=[{key:"center",bounds:A,regionType:"center"},...wuo(s,t),...gce({side:"top",sideObstacles:a.top,bounds:n,centralBounds:A,narrowThreshold:h}),...gce({side:"right",sideObstacles:a.right,bounds:n,centralBounds:A,narrowThreshold:h}),...gce({side:"bottom",sideObstacles:a.bottom,bounds:n,centralBounds:A,narrowThreshold:h}),...gce({side:"left",sideObstacles:a.left,bounds:n,centralBounds:A,narrowThreshold:h}),...Muo({bounds:n,centralBounds:A,sideGroups:a})].flatMap(p=>(function({nodeId:m,bounds:_,availableZ:f,multiLayerThreshold:I,regionType:C,isNarrowPadGap:y=!1,obstacleZ:x=[],connectedTo:E}){if(!Y9t(_))return[];const B=(function(w){return{center:{x:(w.minX+w.maxX)/2,y:(w.minY+w.maxY)/2},width:w.maxX-w.minX,height:w.maxY-w.minY}})(_),S=Math.min(B.width,B.height)>I,Q=S?[{availableZ:f.filter(w=>!x.includes(w)),containsObstacle:!1},{availableZ:f.filter(w=>x.includes(w)),containsObstacle:!0}].filter(w=>w.availableZ.length>0):f.map(w=>({availableZ:[w],containsObstacle:x.includes(w)}));return Q.map(w=>({capacityMeshNodeId:Q.length===1?m:S?`${m}:${w.containsObstacle?"obstacle":"free"}`:`${m}:z${w.availableZ[0]}`,center:B.center,width:B.width,height:B.height,layer:`z${w.availableZ.join(",")}`,availableZ:w.availableZ,_qfpRegionType:C,_isNarrowQfpPadGap:y,_containsObstacle:w.containsObstacle,_connectedTo:w.containsObstacle?E:void 0}))})({nodeId:`qfp:${c}:${p.key}`,bounds:p.bounds,availableZ:i,multiLayerThreshold:g,regionType:p.regionType,isNarrowPadGap:p.isNarrowPadGap,obstacleZ:p.obstacleZ,connectedTo:p.connectedTo}));this.output={routingRegions:d},this.stats={componentId:o,layerCount:t,viaDiameter:l,obstacleMargin:u,multiLayerThreshold:g,narrowPadGapThreshold:h,narrowPadGapNodeCount:d.filter(p=>p._isNarrowQfpPadGap).length,topPadCount:a.top.length,rightPadCount:a.right.length,bottomPadCount:a.bottom.length,leftPadCount:a.left.length,multiLayerNodeCount:d.filter(p=>p.availableZ.length>1).length,totalMeshNodeCount:d.length},this.solved=!0}getOutput(){if(!this.output)throw new Error("QfpTopologyGeneratorSolver has not solved yet");return this.output}});var U9t=1e-6;function Duo({nodeId:t,bounds:e,availableZ:n,multiLayerThreshold:o,regionType:i,obstacleZ:r=[],connectedTo:s}){if(!(function(l){return l.maxX-l.minX>U9t&&l.maxY-l.minY>U9t})(e))return[];const a=(function(l){return{center:{x:(l.minX+l.maxX)/2,y:(l.minY+l.maxY)/2},width:l.maxX-l.minX,height:l.maxY-l.minY}})(e),A=Math.min(a.width,a.height)>o,c=A?[{availableZ:n.filter(l=>!r.includes(l)),containsObstacle:!1},{availableZ:n.filter(l=>r.includes(l)),containsObstacle:!0}].filter(l=>l.availableZ.length>0):n.map(l=>({availableZ:[l],containsObstacle:r.includes(l)}));return c.map(l=>({capacityMeshNodeId:c.length===1?t:A?`${t}:${l.containsObstacle?"obstacle":"free"}`:`${t}:z${l.availableZ[0]}`,center:a.center,width:a.width,height:a.height,layer:`z${l.availableZ.join(",")}`,availableZ:l.availableZ,_soicRegionType:i,_containsObstacle:l.containsObstacle,_connectedTo:l.containsObstacle?s:void 0}))}function K9t(t,e){let n=0,o=Number.POSITIVE_INFINITY;for(let i=0;i<e.length;i++){const r=Math.abs(t-e[i]);r<o&&(n=i,o=r)}return n}function Nuo(t,e){return t.map((n,o)=>({key:`pad:${n.obstacleId??o}`,bounds:Is(n),regionType:"pad",obstacleZ:Ace(n,e),connectedTo:[...n.connectedTo]}))}function kSe(t,e){if(t.componentId!==e.componentId)return!1;const{bounds:n}=e;return t.center.x>=n.minX&&t.center.x<=n.maxX&&t.center.y>=n.minY&&t.center.y<=n.maxY}function V9t({detectedComponent:t,inputSrj:e}){const n=e.obstacles.filter(a=>kSe(a,t)),o=Array.from({length:e.layerCount},(a,A)=>A),i=o.map(a=>Kh(a,e.layerCount)),r=Array.from(new Set(n.flatMap(a=>a.connectedTo))),{bounds:s}=t;return{obstacleId:`${t.componentId}_component_bounds`,componentId:t.componentId,type:"rect",layers:i,__zLayers:o,center:{x:(s.minX+s.maxX)/2,y:(s.minY+s.maxY)/2},width:s.maxX-s.minX,height:s.maxY-s.minY,connectedTo:r}}function dce(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){const s=Is(r);e=Math.min(e,s.minX),n=Math.max(n,s.maxX),o=Math.min(o,s.minY),i=Math.max(i,s.maxY)}return{minX:e,maxX:n,minY:o,maxY:i}}function Ruo(t){const e=t.componentDetectionOutput??[],n=(function({detectedComponents:r,inputSrj:s}){return r.map(a=>{const A=s.obstacles.filter(c=>kSe(c,a));return{componentId:a.componentId,componentKind:a.componentKind,memberObstacleIds:A.map((c,l)=>c.obstacleId??`${a.componentId}:member:${l}`),memberObstacles:A,replacementObstacle:V9t({detectedComponent:a,inputSrj:s})}})})({detectedComponents:e,inputSrj:t.inputSrj}),o=t.globalNoConnectionSrj??(e.length>0?(function({detectedComponents:r,inputSrj:s}){return{...structuredClone(s),obstacles:[...s.obstacles.filter(a=>!r.some(A=>kSe(a,A))),...r.map(a=>V9t({detectedComponent:a,inputSrj:s}))]}})({detectedComponents:e,inputSrj:t.inputSrj}):t.inputSrj)??t.brokenSrj?.componentsAsObstaclesSrj,i=t.components??n??t.brokenSrj?.components??[];if(!o)throw new Error("MultiGraphTopologyPlannerSolver requires globalNoConnectionSrj or detected components");return{globalNoConnectionSrj:o,components:i}}function Tuo({rects:t,components:e}){return t&&e.length!==0?t.filter(n=>!(function(o){return typeof o.label=="string"&&o.label.startsWith("node ")})(n)||!e.some(o=>(function({rect:i,obstacle:r}){if(!i.center||i.width===void 0||i.height===void 0)return!1;const s=1e-9,a=Pg({center:i.center,width:i.width,height:i.height}),A=Pg({center:r.center,width:r.width,height:r.height});return z9t({bounds:a,outerBounds:A,epsilon:s})})({rect:n,obstacle:o.replacementObstacle}))):t}function z9t({bounds:t,outerBounds:e,epsilon:n}){return t.minX>=e.minX-n&&t.maxX<=e.maxX+n&&t.minY>=e.minY-n&&t.maxY<=e.maxY+n}CW.register(class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;static componentKind="soic";output=null;getConstructorParams(){return[this.inputProblem]}_step(){if(this.output)return void(this.solved=!0);const{layerCount:t,obstacles:e}=this.inputProblem.inputSrj,{bounds:n,componentId:o}=this.inputProblem.detectedComponent,i=TSe(t),r=e.filter(_=>_.componentId===o),s=r.length>0?r:e,a=(function(_){const f=cce(_.map(I=>I.center.y)).length;return cce(_.map(I=>I.center.x)).length===2&&f!==2?"vertical-columns":"horizontal-rows"})(s),A=(function({obstacles:_,orientation:f}){const I={left:[],right:[],top:[],bottom:[]};if(f==="vertical-columns"){const y=cce(_.map(x=>x.center.x));for(const x of _)I[K9t(x.center.x,y)===0?"left":"right"].push(x);return I.left.sort((x,E)=>x.center.y-E.center.y),I.right.sort((x,E)=>x.center.y-E.center.y),I}const C=cce(_.map(y=>y.center.y));for(const y of _)I[K9t(y.center.y,C)===0?"top":"bottom"].push(y);return I.top.sort((y,x)=>y.center.x-x.center.x),I.bottom.sort((y,x)=>y.center.x-x.center.x),I})({obstacles:s,orientation:a}),c=(function({bounds:_,orientation:f,sideGroups:I}){return f==="vertical-columns"?{minX:Math.max(...I.left.map(C=>Is(C).maxX)),maxX:Math.min(...I.right.map(C=>Is(C).minX)),minY:_.minY,maxY:_.maxY}:{minX:_.minX,maxX:_.maxX,minY:Math.max(...I.top.map(C=>Is(C).maxY)),maxY:Math.min(...I.bottom.map(C=>Is(C).minY))}})({bounds:n,orientation:a,sideGroups:A}),l=o,u=this.inputProblem.viaDiameter??om(this.inputProblem.inputSrj).padDiameter,g=this.inputProblem.obstacleMargin??this.inputProblem.inputSrj.defaultObstacleMargin??.15,h=2*(u+g),d=a==="vertical-columns"?["left","right"]:["top","bottom"],p=[{key:"center",bounds:c,regionType:"center"},...Nuo(s,t),...d.flatMap(_=>(function({side:f,sideObstacles:I,bounds:C,centralBounds:y}){const x=[];for(let E=0;E<I.length-1;E++){const B=Is(I[E]),S=Is(I[E+1]);let Q;Q=f==="left"?{minX:C.minX,maxX:y.minX,minY:B.maxY,maxY:S.minY}:f==="right"?{minX:y.maxX,maxX:C.maxX,minY:B.maxY,maxY:S.minY}:f==="top"?{minX:B.maxX,maxX:S.minX,minY:C.minY,maxY:y.minY}:{minX:B.maxX,maxX:S.minX,minY:y.maxY,maxY:C.maxY},x.push({key:`${f}-gap-${E}`,bounds:Q,regionType:"pad-gap"})}return x})({side:_,sideObstacles:A[_],bounds:n,centralBounds:c}))],m=p.flatMap(_=>Duo({nodeId:`soic:${l}:${_.key}`,bounds:_.bounds,availableZ:i,multiLayerThreshold:h,regionType:_.regionType,obstacleZ:_.obstacleZ,connectedTo:_.connectedTo}));this.output={routingRegions:m},this.stats={componentId:o,layerCount:t,orientation:a,viaDiameter:u,obstacleMargin:g,multiLayerThreshold:h,firstSidePadCount:A[d[0]].length,secondSidePadCount:A[d[1]].length,multiLayerNodeCount:m.filter(_=>_.availableZ.length>1).length,totalMeshNodeCount:m.length},this.solved=!0}getOutput(){if(!this.output)throw new Error("SoicTopologyGeneratorSolver has not solved yet");return this.output}});var kuo=class extends zA{constructor(t){super(),this.inputProblem=t}inputProblem;activeSubSolver=null;currentIndex=0;componentMeshNodes=[];getConstructorParams(){return[this.inputProblem]}_step(){if(this.activeSubSolver)return this.activeSubSolver.step(),this.activeSubSolver.failed?(this.error=this.activeSubSolver.error,this.failed=!0,void(this.activeSubSolver=null)):this.activeSubSolver.solved?(this.componentMeshNodes.push(this.activeSubSolver.getOutput().routingRegions),this.currentIndex+=1,void(this.activeSubSolver=null)):void 0;if(this.currentIndex>=this.inputProblem.componentSrjs.length)return void(this.solved=!0);const t=this.inputProblem.componentKinds[this.currentIndex],e=this.inputProblem.componentSrjs[this.currentIndex],n={inputSrj:e,detectedComponent:{componentId:this.inputProblem.componentIds[this.currentIndex],componentKind:t,bounds:{__type:"rect",...e.bounds}},viaDiameter:this.inputProblem.viaDiameter,obstacleMargin:this.inputProblem.obstacleMargin};this.activeSubSolver=CW.create(n)}getOutput(){return{componentMeshNodes:this.componentMeshNodes}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.inputProblem.componentSrjs[this.currentIndex]??null,e=this.componentMeshNodes.flatMap(n=>n);return{rects:[...t?[{center:{x:(t.bounds.minX+t.bounds.maxX)/2,y:(t.bounds.minY+t.bounds.maxY)/2},width:t.bounds.maxX-t.bounds.minX,height:t.bounds.maxY-t.bounds.minY,fill:"rgba(0,0,0,0)",stroke:"rgba(255,140,0,0.72)",label:`active component ${this.inputProblem.componentIds[this.currentIndex]??this.currentIndex}`},...t.obstacles.map(n=>({center:n.center,width:n.width,height:n.height,fill:"rgba(255,140,0,0.10)",stroke:"rgba(255,140,0,0.30)",label:n.obstacleId??n.componentId??"obstacle"}))]:[],...e.map(n=>({...Wf(n,{rectMargin:.01}),fill:n._containsObstacle?"rgba(255,0,0,0.14)":"rgba(0,120,255,0.12)",stroke:n._containsObstacle?"rgba(255,0,0,0.34)":"rgba(0,120,255,0.38)"}))]}}},xN=.001;function hce(t){const e=[...t].sort((o,i)=>o-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)>xN)&&n.push(o)}return n}function J9t(t){const e=Math.min(...t),n=Math.max(...t);return!(e<=0)&&n/e<=1.01}function Fuo(t){if(!(function(s){return J9t(s.map(a=>a.width))&&J9t(s.map(a=>a.height))})(t)||!(function(s){return s.every(a=>{const A=Math.min(a.width,a.height),c=Math.max(a.width,a.height);return!(A<=0)&&c/A<=1.5})})(t))return!1;const e=hce(t.map(s=>s.center.y)),n=hce(t.map(s=>s.center.x)),o=e.length,i=n.length;if(o<3||i<3)return!1;const r=o*i;return!((r>0?t.length/r:0)<.5)&&!!(function(s,a,A){if(a.length<3||A.length<3)return!1;const c=new Set(a.slice(1,-1)),l=new Set(A.slice(1,-1));let u=0;for(const g of s)c.has(g.center.y)&&l.has(g.center.x)&&(u+=1);return u>=1})(t,e,n)}function Luo(t){return[Math.round(t.width/xN),Math.round(t.height/xN),t.layers.join(",")].join(":")}function W9t(t){if(t.length<3)return!1;const e=[...t].sort((o,i)=>o-i),n=e[1]-e[0];return!(n<=xN)&&e.every((o,i)=>i===0||Math.abs(o-e[i-1]-n)<=xN)}function Huo(t){const e=(function(o){const i=new Map;for(const r of o){const s=Math.round(r.center.y/xN),a=Math.round(r.center.x/xN),A=i.get(s)??{y:r.center.y,obstaclesByX:new Map};A.obstaclesByX.set(a,r),i.set(s,A)}return[...i.values()]})(t);let n=[];for(const o of e){const i=[...o.obstaclesByX.keys()];if(!W9t([...o.obstaclesByX.values()].map(a=>a.center.x)))continue;const r=e.filter(a=>i.every(A=>a.obstaclesByX.has(A)));if(!W9t(r.map(a=>a.y)))continue;const s=r.flatMap(a=>i.map(A=>a.obstaclesByX.get(A)));s.length>n.length&&(n=s)}return n}function j9t(t){if(Fuo(t))return t;const e=Map.groupBy(t,Luo);let n=[];for(const o of e.values()){const i=Huo(o);i.length>n.length&&(n=i)}return n.length>0?n:null}function $9t(t){const e=Math.min(t.width,t.height),n=Math.max(t.width,t.height);return e>0&&n/e>=1.5}function q9t({perimeterPadObstacles:t,thermalPadObstacles:e}){if(e.length===0)return!0;if(e.length>4)return!1;const n=dce(t),o=n.maxX-n.minX,i=n.maxY-n.minY,r=n.minX+.2*o,s=n.maxX-.2*o,a=n.minY+.2*i,A=n.maxY-.2*i,c=Math.min(...t.map(l=>Math.min(l.width,l.height)));return e.every(l=>{const u=Math.min(l.width,l.height);return l.center.x>=r&&l.center.x<=s&&l.center.y>=a&&l.center.y<=A&&u>c})}function X9t(t){if(t.length<12||t.length>32)return!1;const{counts:e,maxNearestSideRatio:n}=(function(o){const i=dce(o),r=i.maxX-i.minX,s=i.maxY-i.minY,a={top:0,right:0,bottom:0,left:0};if(r<=0||s<=0)return{counts:a,maxNearestSideRatio:1};let A=0;for(const c of o){const l=c.width>c.height,u=[{side:"top",distance:Math.abs(c.center.y-i.minY),axisSpan:s,orientationMatches:!l},{side:"right",distance:Math.abs(i.maxX-c.center.x),axisSpan:r,orientationMatches:l},{side:"bottom",distance:Math.abs(i.maxY-c.center.y),axisSpan:s,orientationMatches:!l},{side:"left",distance:Math.abs(c.center.x-i.minX),axisSpan:r,orientationMatches:l}].filter(g=>g.orientationMatches).sort((g,h)=>g.distance-h.distance)[0];a[u.side]+=1,A=Math.max(A,u.distance/u.axisSpan)}return{counts:a,maxNearestSideRatio:A}})(t);return e.top>=3&&e.right>=3&&e.bottom>=3&&e.left>=3&&n<=.25}function Z9t(t){return{perimeterPadObstacles:(function(n){return n.filter($9t)})(t),thermalPadObstacles:t.filter(n=>!$9t(n))}}function e7t(t){const e=Math.min(...t),n=Math.max(...t);return!(e<=0)&&n/e<=1.01}function t7t(t,e){let n=0,o=Number.POSITIVE_INFINITY;for(let i=0;i<e.length;i++){const r=Math.abs(t-e[i]);r<o&&(n=i,o=r)}return n}function Ouo({memberObstacles:t,inputSrj:e}){if(!(function(r){return e7t(r.map(s=>s.width))&&e7t(r.map(s=>s.height))})(t))return!1;const n=hce(t.map(r=>r.center.y)),o=hce(t.map(r=>r.center.x));if(!(n.length===2&&o.length>=4||o.length===2&&n.length>=4))return!1;const i=(function({memberObstacles:r,rowAxisValues:s,columnAxisValues:a}){if(s.length===2&&a.length>=4){const A=[[],[]];for(const c of r)A[t7t(c.center.y,s)].push(c);return Math.min(...A[1].map(c=>c.center.y-c.height/2))-Math.max(...A[0].map(c=>c.center.y+c.height/2))}if(a.length===2&&s.length>=4){const A=[[],[]];for(const c of r)A[t7t(c.center.x,a)].push(c);return Math.min(...A[1].map(c=>c.center.x-c.width/2))-Math.max(...A[0].map(c=>c.center.x+c.width/2))}return null})({memberObstacles:t,rowAxisValues:n,columnAxisValues:o});return i===null?!1:i>2*(om(e).padDiameter+(e.defaultObstacleMargin??.15))}var Guo=[class I5n{constructor(e){this.params=e}params;static componentKind="qfp_thermalpad";componentKind=I5n.componentKind;static isMatch({memberObstacles:e}){return(function(n){const{perimeterPadObstacles:o,thermalPadObstacles:i}=Z9t(n);return i.length!==0&&!!X9t(o)&&q9t({perimeterPadObstacles:o,thermalPadObstacles:i})})(e)}},class C5n{constructor(e){this.params=e}params;static componentKind="qfp";componentKind=C5n.componentKind;static isMatch({memberObstacles:e}){return(function(n){const{perimeterPadObstacles:o,thermalPadObstacles:i}=Z9t(n);return!(i.length>0)&&!!q9t({perimeterPadObstacles:o,thermalPadObstacles:i})&&X9t(o)})(e)}},class y5n{constructor(e){this.params=e}params;static componentKind="soic";componentKind=y5n.componentKind;static isMatch(e){return Ouo(e)}},class x5n{constructor(e){this.params=e}params;static componentKind="bga";componentKind=x5n.componentKind;static isMatch({memberObstacles:e}){return(function(n){return j9t(n)!==null})(e)}}];function Yuo(t){return(function(e){for(const n of Guo)if(n.isMatch(e))return new n(e);return null})(t)?.componentKind??null}var Uuo=class extends zA{inputSrj;initialized=!1;groupedComponentObstacles={};groupedComponentKinds={};unprocessedComponentIds=[];detectedComponents=[];currentComponentId=null;currentMemberObstacles=[];output=null;constructor({inputSrj:t}){super(),this.inputSrj=t}getConstructorParams(){return[{inputSrj:this.inputSrj}]}_step(){this.initialized?this.output?this.solved=!0:this.currentComponentId!==null||this.unprocessedComponentIds.length>0?this.processNextComponent():(this.finalizeOutput(),this.solved=!0):this.initializeDetectionState()}getOutput(){if(!this.output)throw new Error("ComponentDetectionSolver has not solved yet");return this.output}visualize(){const t=[];t.push(...this.inputSrj.obstacles.filter(n=>!n.componentId).map(n=>({center:n.center,width:n.width,height:n.height,fill:"rgba(120, 120, 120, 0.10)",stroke:"rgba(120, 120, 120, 0.40)",label:n.obstacleId,layer:n.layers.join(","),step:0})));const e=new Set(this.detectedComponents.map(n=>n.componentId));for(const n of this.inputSrj.obstacles){if(!n.componentId||e.has(n.componentId))continue;const o=n.componentId===this.currentComponentId,i=Fz(n.componentId),r=this.groupedComponentKinds[n.componentId];t.push({center:n.center,width:n.width,height:n.height,fill:Es(i,o?.55:.82),stroke:Es(i,o?.1:.45),label:r?`${n.componentId} ${r.toUpperCase()}`:n.componentId,layer:n.layers.join(","),step:o?1:0})}for(const n of this.detectedComponents){const o=Fz(n.componentId);t.push({center:{x:(n.bounds.minX+n.bounds.maxX)/2,y:(n.bounds.minY+n.bounds.maxY)/2},width:n.bounds.maxX-n.bounds.minX,height:n.bounds.maxY-n.bounds.minY,fill:Es(o,.88),stroke:Es(o,.1),label:`${n.componentId} ${n.componentKind.toUpperCase()} region`,step:2})}return{title:this.getVisualizationTitle(),rects:t,lines:[],points:[],circles:[]}}preview(){return this.visualize()}initializeDetectionState(){this.initialized=!0,this.groupedComponentKinds={},this.groupedComponentObstacles=this.groupObstaclesByComponentId({obstacles:this.inputSrj.obstacles}),this.unprocessedComponentIds=Object.keys(this.groupedComponentObstacles).sort(),this.detectedComponents=[],this.currentComponentId=null,this.currentMemberObstacles=[],this.output=null}processNextComponent(){if(!this.currentComponentId){const t=this.unprocessedComponentIds.shift();return t?(this.currentComponentId=t,void(this.currentMemberObstacles=this.groupedComponentObstacles[t]??[])):(this.currentComponentId=null,void(this.currentMemberObstacles=[]))}if(this.currentMemberObstacles.length===0)return this.currentComponentId=null,void(this.currentMemberObstacles=[]);this.detectedComponents.push(this.createDetectedComponent({componentId:this.currentComponentId,componentKind:this.groupedComponentKinds[this.currentComponentId],memberObstacles:this.currentMemberObstacles})),this.currentComponentId=null,this.currentMemberObstacles=[]}finalizeOutput(){this.output=this.detectedComponents.map(t=>({...t,bounds:{...t.bounds}})),this.stats={initialized:this.initialized,totalComponentCount:Object.keys(this.groupedComponentObstacles).length,detectedComponentCount:this.detectedComponents.length,detectedBgaComponentCount:this.detectedComponents.filter(t=>t.componentKind==="bga").length,detectedQfpComponentCount:this.detectedComponents.filter(t=>t.componentKind==="qfp").length,detectedQfpComponentIds:this.detectedComponents.filter(t=>t.componentKind==="qfp").map(t=>t.componentId),detectedQfpThermalPadComponentCount:this.detectedComponents.filter(t=>t.componentKind==="qfp_thermalpad").length,detectedQfpThermalPadComponentIds:this.detectedComponents.filter(t=>t.componentKind==="qfp_thermalpad").map(t=>t.componentId),detectedSoicComponentCount:this.detectedComponents.filter(t=>t.componentKind==="soic").length,detectedSoicComponentIds:this.detectedComponents.filter(t=>t.componentKind==="soic").map(t=>t.componentId),remainingComponentCount:this.unprocessedComponentIds.length,hasActiveComponent:this.currentComponentId!==null}}groupObstaclesByComponentId({obstacles:t}){const e={},n={};for(const i of t)i.componentId&&(e[i.componentId]??=[],e[i.componentId].push(i));const o=Object.entries(e).flatMap(([i,r])=>{const s=this.inputSrj.bounds;if(r.some(A=>!z9t({bounds:Is(A),outerBounds:s,epsilon:0})))return[];const a=Yuo({memberObstacles:r,inputSrj:this.inputSrj});return a?(n[i]=a,[[i,a==="bga"?j9t(r):r]]):[]});return this.groupedComponentKinds=n,Object.fromEntries(o)}createDetectedComponent({componentId:t,componentKind:e,memberObstacles:n}){return{componentId:t,componentKind:e,bounds:{__type:"rect",...dce(n)}}}getVisualizationTitle(){const t=Object.keys(this.groupedComponentObstacles).length||new Set(this.inputSrj.obstacles.map(n=>n.componentId).filter(n=>!!n)).size,e=this.detectedComponents.length;return this.initialized?this.output||this.solved?`Component Detection: done ${e}/${t}`:this.currentComponentId!==null||this.unprocessedComponentIds.length>0?`Component Detection: ${e}/${t} processed`:`Component Detection: finalizing ${e}/${t}`:"Component Detection: setup"}},Kuo=t=>t.componentId&&t.obstacleId?`${t.componentId}
${t.obstacleId}`:t.componentId??t.obstacleId??"obstacle",n7t=class extends n7{rectBoundsComponentDetection;pipelineDef=[eh("rectBoundsComponentDetection",Uuo,t=>[{inputSrj:t.inputProblem.inputSrj}])];getConstructorParams(){return[this.inputProblem]}getOutput(){const t=this.getStageOutput("rectBoundsComponentDetection");if(!t)throw new Error("ComponentDetectionSolver has not solved yet");return t}initialVisualize(){const{bounds:t}=this.inputProblem.inputSrj;return{title:"Component Detection: board and grouped component pads",rects:[{center:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2},width:t.maxX-t.minX,height:t.maxY-t.minY,fill:"rgba(0, 0, 0, 0)",stroke:"rgba(40, 40, 40, 0.7)",label:"Board bounds",step:0},...this.inputProblem.inputSrj.obstacles.map(e=>{const n=e.componentId?Fz(e.componentId):null;return{center:e.center,width:e.width,height:e.height,fill:n?Es(n,.72):"rgba(120, 120, 120, 0.10)",stroke:n?Es(n,.28):"rgba(120, 120, 120, 0.40)",label:Kuo(e),layer:e.layers.join(","),step:e.componentId?1:0}})],lines:[],points:[],circles:[]}}},M7=1e-9;function EN(t){return Pg({center:t.center,width:t.width,height:t.height})}function o7t(t,e){const n={minX:Math.max(t.minX,e.minX),maxX:Math.min(t.maxX,e.maxX),minY:Math.max(t.minY,e.minY),maxY:Math.min(t.maxY,e.maxY)};return FSe(n)?n:null}function FSe(t){const e=t.maxX-t.minX,n=t.maxY-t.minY,o=Number.isFinite(e)&&e>M7,i=Number.isFinite(n)&&n>M7;return o&&i}function Vuo(t){(function(o){if(!Number.isInteger(o.layerCount))throw new Error("TopologyMergingSolver: layerCount must be an integer");if(o.layerCount<=0)throw new Error("TopologyMergingSolver: layerCount must be positive");if(o.nodeGroups.length===0)throw new Error("TopologyMergingSolver: at least one node group is required");const i=new Set;let r=0;for(const s of o.nodeGroups){if(i.has(s.groupId))throw new Error(`TopologyMergingSolver: duplicate topology group id "${s.groupId}"`);if(i.add(s.groupId),r+=s.nodes.length,s.nodes.length===0)throw new Error(`TopologyMergingSolver: topology group "${s.groupId}" is empty`);const a=new Set;for(const A of s.nodes){if(a.has(A.capacityMeshNodeId))throw new Error(`TopologyMergingSolver: duplicate node id "${A.capacityMeshNodeId}" in group "${s.groupId}"`);a.add(A.capacityMeshNodeId),zuo({node:A,groupId:s.groupId,layerCount:o.layerCount})}}if(r===0)throw new Error("TopologyMergingSolver: topology node groups are empty")})(t);const e=[],n=new Map;for(let o=0;o<t.nodeGroups.length;o++){const i=t.nodeGroups[o];for(const r of i.nodes){const s={sourceKey:`${i.groupId}:${r.capacityMeshNodeId}`,groupIndex:o,node:r,bounds:EN(r)};e.push(s),n.set(s.sourceKey,s)}}return{preparedNodes:e,preparedNodeBySourceKey:n}}function zuo({node:t,groupId:e,layerCount:n}){if(!FSe(EN(t)))throw new Error(`TopologyMergingSolver: node "${t.capacityMeshNodeId}" in group "${e}" has invalid bounds`);if(t.availableZ.length===0)throw new Error(`TopologyMergingSolver: node "${t.capacityMeshNodeId}" in group "${e}" has no available layers`);const o=[...new Set(t.availableZ)].sort((s,a)=>s-a),i=o.some(s=>!Number.isInteger(s)||s<0||s>=n),r=o.length===t.availableZ.length&&o.every((s,a)=>s===t.availableZ[a]);if(i||!r)throw new Error(`TopologyMergingSolver: node "${t.capacityMeshNodeId}" in group "${e}" has invalid or unsorted availableZ`)}var Ly=1e-5,hH=4e-5;function i7t({regions:t,preparedNodeBySourceKey:e,nodeGroups:n,provenance:o,preserveSourceIds:i=!0}){i&&(o.groupIndexesByNodeId.clear(),o.sourceKeysByNodeId.clear());const r=[...t].sort((a,A)=>a.bounds.minX-A.bounds.minX||a.bounds.minY-A.bounds.minY||a.bounds.maxX-A.bounds.maxX||a.bounds.maxY-A.bounds.maxY||a.availableZ[0]-A.availableZ[0]),s=new Set;return r.map((a,A)=>{const c=a.sourceKeys.map(p=>{const m=e.get(p);if(!m)throw new Error(`TopologyMergingSolver: missing source node for "${p}"`);return m}),l=c.map(({node:p})=>p),u=(function({sourceNodes:p,isComponentTopologyNode:m}){if(p.length===1)return{_isComponentTopologyNode:!!m||p[0]._isComponentTopologyNode};const _=p.map(E=>E.capacityMeshNodeId),f=LSe(p.map(E=>E._targetConnectionName),"target connection",_),I=LSe(p.map(E=>E._offBoardConnectionId),"off-board connection",_),C=LSe(p.map(E=>E._offboardNetName),"off-board net",_),y=Array.from(new Set(p.flatMap(E=>E._offBoardConnectedCapacityMeshNodeIds??[]))),x=Array.from(new Set(p.flatMap(E=>E._connectedTo??[])));return{_containsObstacle:p.some(E=>E._containsObstacle)||void 0,_completelyInsideObstacle:p.some(E=>E._completelyInsideObstacle)||void 0,_containsTarget:p.some(E=>E._containsTarget)||void 0,_targetConnectionName:f,_isVirtualOffboard:p.some(E=>E._isVirtualOffboard)||void 0,_offboardNetName:C,_offBoardConnectionId:I,_offBoardConnectedCapacityMeshNodeIds:y.length>0?y:void 0,_qfpRegionType:r7t(p.map(E=>E._qfpRegionType)),_isNarrowQfpPadGap:p.some(E=>E._isNarrowQfpPadGap)||void 0,_soicRegionType:r7t(p.map(E=>E._soicRegionType)),_isComponentTopologyNode:m||void 0,_connectedTo:x.length>0?x:void 0}})({sourceNodes:l,isComponentTopologyNode:c.some(({groupIndex:p})=>n[p].isComponent)}),g=i&&c.length===1?c[0].node:null;let d=!!(g&&(function({region:p,sourceNode:m,usedNodeIds:_}){const f=EN(m),I=Math.abs(p.bounds.minX-f.minX)<=Ly&&Math.abs(p.bounds.maxX-f.maxX)<=Ly&&Math.abs(p.bounds.minY-f.minY)<=Ly&&Math.abs(p.bounds.maxY-f.maxY)<=Ly,C=p.availableZ.length===m.availableZ.length&&p.availableZ.every((y,x)=>y===m.availableZ[x]);return I&&C&&!_.has(m.capacityMeshNodeId)})({region:a,sourceNode:g,usedNodeIds:s}))?g.capacityMeshNodeId:`topology_merge_${A}`;for(;s.has(d);)d=`${d}_next`;return s.add(d),i&&(o.groupIndexesByNodeId.set(d,[...new Set(c.map(({groupIndex:p})=>p))]),o.sourceKeysByNodeId.set(d,[...a.sourceKeys])),{...g??l[0],...u,capacityMeshNodeId:d,center:{x:(a.bounds.minX+a.bounds.maxX)/2,y:(a.bounds.minY+a.bounds.maxY)/2},width:a.bounds.maxX-a.bounds.minX,height:a.bounds.maxY-a.bounds.minY,layer:`z${a.availableZ.join(",")}`,availableZ:[...a.availableZ],_adjacentNodeIds:void 0,_parent:void 0,_strawNode:void 0,_strawParentCapacityMeshNodeId:void 0}})}function LSe(t,e,n){const o=Array.from(new Set(t.filter(i=>i!==void 0)));if(o.length>1)throw new Error(`TopologyMergingSolver: conflicting ${e} values for overlapping source nodes ${n.join(", ")}`);return o[0]}function r7t(t){const e=Array.from(new Set(t.filter(n=>n!==void 0)));return e.length===1?e[0]:void 0}function Juo({node:t,sourceKey:e,preparedNodeBySourceKey:n}){const o=n.get(e);if(!o)throw new Error(`TopologyMergingSolver: missing source node for output "${t.capacityMeshNodeId}"`);const i=EN(t),r=i.minX>=o.bounds.minX-hH&&i.maxX<=o.bounds.maxX+hH&&i.minY>=o.bounds.minY-hH&&i.maxY<=o.bounds.maxY+hH,s=t.availableZ.every(a=>o.node.availableZ.includes(a));if(!r||!s)throw new Error(`TopologyMergingSolver: output node "${t.capacityMeshNodeId}" escapes its source geometry or layers`)}function Wuo({groupIndexesA:t,groupIndexesB:e,sourceKeysA:n,sourceKeysB:o,sharedLayers:i,preparedNodeBySourceKey:r}){if(t.length!==1||e.length!==1||t[0]!==e[0]||n.length!==1||o.length!==1||n[0]===o[0])return!1;const s=r.get(n[0]),a=r.get(o[0]);return!s||!a||i.length===0?!1:i.some(A=>s.node.availableZ.includes(A)&&a.node.availableZ.includes(A))&&o7t(s.bounds,a.bounds)!==null}function s7t(t){const e=[...t].sort((o,i)=>o-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)>Ly)&&n.push(o)}return n}function juo(t,e){return e.x>=t.minX-Ly&&e.x<=t.maxX+Ly&&e.y>=t.minY-Ly&&e.y<=t.maxY+Ly}function $uo({coveringNodes:t,nodeGroups:e,layerCount:n}){const o=new Map;for(let i=0;i<n;i++){const r=t.filter(({node:g})=>g.availableZ.includes(i)).sort((g,h)=>g.sourceKey.localeCompare(h.sourceKey));if(r.length===0)continue;const s=new Set(r.map(({groupIndex:g})=>g)),a=r.filter(({node:g})=>g._containsObstacle&&g._containsTarget),A=a.filter(({groupIndex:g})=>!e[g].isComponent),c=new Set(a.map(({groupIndex:g})=>g)),l=a.length>0?A.length>0||c.size===1?"target-passthrough":"target-merged":s.size===1?"passthrough":"merged",u=Zuo({topologyMode:l,nodesOnLayer:r,targetObstacleNodes:a,globalTargetObstacleNodes:A});for(const g of u){const h=JSON.stringify({mode:l,sourceKeys:g}),d=o.get(h);d?d.availableZ.push(i):o.set(h,{availableZ:[i],sourceKeys:g,topologyMode:l,topologySignature:h})}}return[...o.values()]}function a7t(t){return JSON.stringify({availableZ:t.availableZ,topologySignature:t.topologySignature})}function quo(t){return JSON.stringify({mergeKey:a7t(t),minY:t.bounds.minY.toPrecision(15),maxY:t.bounds.maxY.toPrecision(15)})}function Xuo(t){return JSON.stringify({mergeKey:a7t(t),minX:t.bounds.minX.toPrecision(15),maxX:t.bounds.maxX.toPrecision(15)})}function A7t(t,e){const n=new Map;for(const o of t){const i=e==="horizontal"?quo(o):Xuo(o),r=n.get(i)??[];r.push(o),n.set(i,r)}return[...n.values()].flatMap(o=>(function(i,r){const s=[...i].sort((A,c)=>r==="horizontal"?A.bounds.minX-c.bounds.minX:A.bounds.minY-c.bounds.minY),a=[];for(const A of s){const c=a[a.length-1],l=c!==void 0&&(r==="horizontal"?Math.abs(c.bounds.maxX-A.bounds.minX)<=Ly:Math.abs(c.bounds.maxY-A.bounds.minY)<=Ly);c&&l?r==="horizontal"?c.bounds.maxX=A.bounds.maxX:c.bounds.maxY=A.bounds.maxY:a.push({...A,bounds:{...A.bounds},availableZ:[...A.availableZ],sourceKeys:[...A.sourceKeys]})}return a})(o,e))}function Zuo({topologyMode:t,nodesOnLayer:e,targetObstacleNodes:n,globalTargetObstacleNodes:o}){return t==="target-passthrough"?(o.length>0?o:n).map(({sourceKey:i})=>[i]):t==="target-merged"?[n.map(({sourceKey:i})=>i).sort()]:t==="passthrough"?e.map(({sourceKey:i})=>[i]):[e.map(({sourceKey:i})=>i).sort()]}var c7t=class extends zA{constructor(t){super(),this.inputProblem=t,this.MAX_ITERATIONS=1e5;const{preparedNodes:e,preparedNodeBySourceKey:n}=Vuo(t);this.preparedNodes=e,this.preparedNodeBySourceKey=n,this.xCoordinates=s7t(this.preparedNodes.flatMap(({bounds:o})=>[o.minX,o.maxX])),this.stats={inputNodeCount:this.preparedNodes.length,xSlabCount:Math.max(0,this.xCoordinates.length-1),processedXSlabCount:0,atomicRegionCount:0,outputNodeCount:0}}inputProblem;preparedNodes;preparedNodeBySourceKey;outputProvenance={groupIndexesByNodeId:new Map,sourceKeysByNodeId:new Map};xCoordinates;atomicRegions=[];outputNodes=[];currentXIndex=0;getConstructorParams(){return[this.inputProblem]}_step(){if(this.inputProblem.nodeGroups.length===1)return void this.completePassthroughTopology();if(this.currentXIndex<this.xCoordinates.length-1)return this.processCurrentXSlab(),this.currentXIndex+=1,this.stats.processedXSlabCount=this.currentXIndex,void(this.stats.atomicRegionCount=this.atomicRegions.length);const t=(function(e){let n=e;for(;;){const o=A7t(n,"horizontal"),i=A7t(o,"vertical");if(i.length===n.length)return i;n=i}})((function({regions:e,preparedNodeBySourceKey:n}){const o=new Map;for(const r of e)for(const s of r.sourceKeys){const a=o.get(s)??new Set;a.add(r.topologyMode),o.set(s,a)}const i=new Set([...o.entries()].filter(([,r])=>r.size===1&&r.has("target-passthrough")).map(([r])=>r));return i.size===0?e:[...e.filter(r=>r.topologyMode!=="target-passthrough"||!i.has(r.sourceKeys[0])),...[...i].map(r=>{const s=n.get(r);if(!s)throw new Error(`TopologyMergingSolver: missing authoritative target source "${r}"`);return{bounds:{...s.bounds},availableZ:[...s.node.availableZ],sourceKeys:[r],topologyMode:"target-passthrough",topologySignature:JSON.stringify({mode:"target-passthrough",sourceKeys:[r]})}})]})({regions:this.atomicRegions,preparedNodeBySourceKey:this.preparedNodeBySourceKey}));this.outputNodes=i7t({regions:t,preparedNodeBySourceKey:this.preparedNodeBySourceKey,nodeGroups:this.inputProblem.nodeGroups,provenance:this.outputProvenance}),(function({nodes:e,preparedNodeBySourceKey:n,provenance:o}){const i=new Set;for(const r of e){if(i.has(r.capacityMeshNodeId))throw new Error(`TopologyMergingSolver: duplicate output node id "${r.capacityMeshNodeId}"`);if(i.add(r.capacityMeshNodeId),!FSe(EN(r)))throw new Error(`TopologyMergingSolver: output node "${r.capacityMeshNodeId}" has invalid bounds`);if(r.availableZ.length===0)throw new Error(`TopologyMergingSolver: output node "${r.capacityMeshNodeId}" has no available layers`);const s=o.sourceKeysByNodeId.get(r.capacityMeshNodeId);if(!s)throw new Error(`TopologyMergingSolver: missing output provenance for node "${r.capacityMeshNodeId}"`);s.length===1&&Juo({node:r,sourceKey:s[0],preparedNodeBySourceKey:n})}for(let r=0;r<e.length;r++){const s=e[r];for(let a=r+1;a<e.length;a++){const A=e[a],c=s.availableZ.filter(_=>A.availableZ.includes(_));if(c.length===0)continue;const l=o7t(EN(s),EN(A));if(!l)continue;const u=l.maxX-l.minX,g=l.maxY-l.minY;if(u<=hH||g<=hH)continue;const h=o.groupIndexesByNodeId.get(s.capacityMeshNodeId),d=o.groupIndexesByNodeId.get(A.capacityMeshNodeId);if(!h||!d)throw new Error(`TopologyMergingSolver: missing output provenance for overlapping nodes "${s.capacityMeshNodeId}" and "${A.capacityMeshNodeId}"`);const p=o.sourceKeysByNodeId.get(s.capacityMeshNodeId),m=o.sourceKeysByNodeId.get(A.capacityMeshNodeId);if(!p||!m)throw new Error(`TopologyMergingSolver: missing source provenance for overlapping nodes "${s.capacityMeshNodeId}" and "${A.capacityMeshNodeId}"`);if(!Wuo({groupIndexesA:h,groupIndexesB:d,sourceKeysA:p,sourceKeysB:m,sharedLayers:c,preparedNodeBySourceKey:n}))throw new Error(`TopologyMergingSolver: output nodes "${s.capacityMeshNodeId}" and "${A.capacityMeshNodeId}" have an unresolved inter-group overlap on a shared layer`)}}})({nodes:this.outputNodes,preparedNodeBySourceKey:this.preparedNodeBySourceKey,provenance:this.outputProvenance}),this.stats.outputNodeCount=this.outputNodes.length,this.stats.compactedRegionCount=t.length,this.solved=!0}getOutput(){if(!this.solved)throw new Error("TopologyMergingSolver: getOutput() called before the solver completed");return this.outputNodes}computeProgress(){const t=Math.max(1,this.xCoordinates.length-1);return this.solved?1:Math.min(.99,this.currentXIndex/t)}visualize(){const t=this.solved?this.outputNodes:i7t({regions:this.atomicRegions,preparedNodeBySourceKey:this.preparedNodeBySourceKey,nodeGroups:this.inputProblem.nodeGroups,provenance:this.outputProvenance,preserveSourceIds:!1});return{title:`Topology Merging: ${t.length} refined regions`,coordinateSystem:"cartesian",rects:t.map(e=>({...Wf(e,{rectMargin:.01,zOffset:.02}),label:`${e.capacityMeshNodeId}
availableZ: ${e.availableZ.join(",")}
component: ${e._isComponentTopologyNode?"yes":"no"}`})),lines:[],points:[],circles:[],texts:[]}}completePassthroughTopology(){const t=this.inputProblem.nodeGroups[0];this.outputNodes=t.nodes;for(const e of this.outputNodes)this.outputProvenance.groupIndexesByNodeId.set(e.capacityMeshNodeId,[0]),this.outputProvenance.sourceKeysByNodeId.set(e.capacityMeshNodeId,[`${t.groupId}:${e.capacityMeshNodeId}`]);this.stats.processedXSlabCount=this.stats.xSlabCount,this.stats.atomicRegionCount=0,this.stats.compactedRegionCount=0,this.stats.outputNodeCount=this.outputNodes.length,this.stats.passthroughNodeCount=this.outputNodes.length,this.solved=!0}processCurrentXSlab(){const t=this.xCoordinates[this.currentXIndex],e=this.xCoordinates[this.currentXIndex+1];if(e-t<=Ly)return;const n=(t+e)/2,o=this.preparedNodes.filter(({bounds:r})=>n>=r.minX-Ly&&n<=r.maxX+Ly),i=s7t(o.flatMap(({bounds:r})=>[r.minY,r.maxY]));for(let r=0;r<i.length-1;r++){const s=i[r],a=i[r+1];if(a-s<=Ly)continue;const A={x:n,y:(s+a)/2},c=o.filter(({bounds:u})=>juo(u,A));if(c.length===0)continue;const l=$uo({coveringNodes:c,nodeGroups:this.inputProblem.nodeGroups,layerCount:this.inputProblem.layerCount});for(const u of l)this.atomicRegions.push({bounds:{minX:t,maxX:e,minY:s,maxY:a},availableZ:u.availableZ,sourceKeys:u.sourceKeys,topologyMode:u.topologyMode,topologySignature:u.topologySignature})}}};function ego({meshNodes:t,components:e}){return e.length===0?t:t.map(n=>e.some(i=>(function({node:r,component:s}){const{replacementObstacle:a}=s,A=Math.abs(r.center.x-a.center.x)<=M7&&Math.abs(r.center.y-a.center.y)<=M7&&Math.abs(r.width-a.width)<=M7&&Math.abs(r.height-a.height)<=M7;if(s.componentKind!=="qfp"&&s.componentKind!=="qfp_thermalpad"&&s.componentKind!=="soic")return A;const c=a.center.x-a.width/2,l=a.center.x+a.width/2,u=a.center.y-a.height/2,g=a.center.y+a.height/2,h=r.center.x>=c-M7&&r.center.x<=l+M7&&r.center.y>=u-M7&&r.center.y<=g+M7,d=r.width*r.height,p=a.width*a.height,m=h&&d>=.2*p;return A||m})({node:n,component:i}))?{...n,_containsObstacle:void 0,_completelyInsideObstacle:void 0,_containsTarget:void 0,_targetConnectionName:void 0,_connectedTo:void 0}:n)}var l7t=class extends n7{globalTopologySolver;componentTopologyBatchSolver;normalizedInput;pipelineDef=[eh("globalTopologySolver",qF,t=>[t.getGlobalTopologySolverInput()]),eh("componentTopologyBatchSolver",kuo,t=>[{componentSrjs:t.getComponentNoConnectionSrjs(),componentIds:t.normalizedInput.components.map(e=>e.componentId),componentKinds:t.normalizedInput.components.map(e=>e.componentKind),viaDiameter:t.inputProblem.viaDiameter,obstacleMargin:t.inputProblem.obstacleMargin}])];constructor(t){super(t),this.normalizedInput=Ruo(t)}getConstructorParams(){return[this.inputProblem]}getOutput(){const t=ego({meshNodes:this.getStageOutput("globalTopologySolver")?.meshNodes??[],components:this.normalizedInput.components}),e=this.getStageOutput("componentTopologyBatchSolver")?.componentMeshNodes??[],n=this.getComponentNoConnectionSrjs();return{globalNoConnectionSrj:this.normalizedInput.globalNoConnectionSrj,componentNoConnectionSrjs:n,globalMeshNodes:t,componentMeshNodes:e}}finalVisualize(){const t=this.getOutput();return{title:"Topology Planning: generated topology groups",rects:[...t.componentNoConnectionSrjs.flatMap((e,n)=>{const o=this.normalizedInput.components[n]??null;return e.obstacles.map(i=>({center:i.center,width:i.width,height:i.height,fill:"rgba(120, 120, 120, 0.06)",stroke:"rgba(120, 120, 120, 0.35)",label:i.obstacleId??o?.componentId??"component-pad",layer:i.layers.join(",")}))}),...[...t.globalMeshNodes,...t.componentMeshNodes.flat()].map(e=>{const n=this.normalizedInput.components.find(o=>e.capacityMeshNodeId.includes(o.componentId));return{...Wf(e,{rectMargin:.01}),fill:e._containsObstacle?Es("red",.82):"rgba(0, 120, 255, 0.12)",stroke:e._containsObstacle?Es("red",.3):"rgba(0, 120, 255, 0.55)",label:n?`${n.componentKind.toUpperCase()} ${e.capacityMeshNodeId}`:e.capacityMeshNodeId}})],lines:[],points:[],circles:[],texts:[]}}visualize(){return this.filterGlobalRectDiffNodesFromVisualization({visualization:super.visualize()})}preview(){return this.filterGlobalRectDiffNodesFromVisualization({visualization:super.preview()})}getComponentNoConnectionSrjs(){return this.normalizedInput.components.map(t=>(function({inputSrj:e,component:n}){const o=dce(n.memberObstacles),i=Math.max(e.minViaPadDiameter??e.min_via_pad_diameter??e.minViaDiameter??.3,e.defaultObstacleMargin??.15,2*e.minTraceWidth),r=new Set(n.memberObstacles.flatMap(A=>A.connectedTo)),s=e.connections.flatMap(A=>A.pointsToConnect.filter(c=>{const l=[c.pointId,c.pcb_port_id].filter(g=>typeof g=="string").some(g=>r.has(g)),u=c.x>=o.minX-i&&c.x<=o.maxX+i&&c.y>=o.minY-i&&c.y<=o.maxY+i;return l&&u})).reduce((A,c)=>({minX:Math.min(A.minX,c.x),maxX:Math.max(A.maxX,c.x),minY:Math.min(A.minY,c.y),maxY:Math.max(A.maxY,c.y)}),o),a=e.obstacles.filter(A=>WF(Is(A),s)).map(A=>({...A}));return{...structuredClone(e),bounds:s,obstacles:a}})({inputSrj:this.inputProblem.inputSrj,component:t}))}getGlobalTopologySolverInput(){return{simpleRouteJson:this.normalizedInput.globalNoConnectionSrj,maxGapFillPasses:4}}filterGlobalRectDiffNodesFromVisualization({visualization:t}){return{...t,rects:Tuo({rects:t.rects,components:this.normalizedInput.components})}}},HSe=(t,e)=>{if(t)return Object.entries(e).sort(([n],[o])=>o.length-n.length).find(([n])=>t.includes(n))?.[1]},pce=(t,e)=>({...t,points:t.points?.map(n=>({...n,color:HSe(n.label,e)??n.color})),lines:t.lines?.map(n=>({...n,strokeColor:HSe(n.label,e)??n.strokeColor})),circles:t.circles?.map(n=>{const o=HSe(n.label,e);return o?{...n,fill:o,stroke:o}:n})}),u7t=class extends yr{constructor(t){super(),this.topologyPlanningSolver=t,this.solved=t.solved,this.failed=t.failed,this.error=t.error,this.stats=t.stats}topologyPlanningSolver;getOutput(){return this.topologyPlanningSolver.getOutput().componentMeshNodes.flat()}visualize(){return this.topologyPlanningSolver.finalVisualize()??this.topologyPlanningSolver.visualize()}preview(){return this.visualize()}},BN=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(t){throw this.error=`${this.getSolverName()} error: ${t}`,this.failed=!0,t}!this.solved&&this.iterations>=this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>=this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}getOutput(){return null}solve(){const t=Date.now();for(;!this.solved&&!this.failed;)this.step();const e=Date.now();this.timeToSolve=e-t}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}},OSe=t=>t.filter(e=>!!e),g7t=(t,e,n)=>{const o=`${Math.round(100*t.x)},${Math.round(100*t.y)}`,i=e.map(r=>((s,a)=>s==="top"?0:s==="bottom"?a-1:Number.parseInt(s.slice(5),10))(r,n)).sort().join("-");return`${o}:${i}`},Tv=class{parent=new Map;constructor(t,e=t.traces??[],n={}){for(const o of t.connections)this.unionAll(OSe([o.name,o.source_trace_id,o.rootConnectionName,o.netConnectionName,...o.mergedConnectionNames??[],...o.pointsToConnect.flatMap(i=>[i.pointId,i.pcb_port_id,...n.includePhysicalPositionAliases?[g7t(i,i.layers??[i.layer],t.layerCount)]:[]])]));for(const o of[...e,...t.fixedTraces??[]])this.unionAll(OSe([o.pcb_trace_id,o.connection_name,o.source_trace_id,o.rootConnectionName,...o.mergedConnectionNames??[],...o.connectsTo??[]]));for(const o of t.obstacles)this.unionAll(n.includePhysicalPositionAliases?OSe([o.obstacleId,...o.connectedTo,...o.offBoardConnectsTo??[],g7t(o.center,o.layers,t.layerCount)]):o.connectedTo)}canonicalize(t){return[...new Set(t.map(e=>this.find(e)))]}unionAll(t){const e=t[0];if(e){this.add(e);for(let n=1;n<t.length;n++)this.union(e,t[n])}}add(t){this.parent.has(t)||this.parent.set(t,t)}find(t){this.add(t);const e=this.parent.get(t);if(e===t)return t;const n=this.find(e);return this.parent.set(t,n),n}union(t,e){const n=this.find(t),o=this.find(e);n!==o&&this.parent.set(o,n)}},Ki=1e-6,Aa=(t,e)=>Math.hypot(e.x-t.x,e.y-t.y),bN=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r<=1e-12)return Aa(t,e);const s=th(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return Math.hypot(t.x-(e.x+o*s),t.y-(e.y+i*s))},SN=(t,e,n=1e-6)=>Math.abs(t.x-e.x)<=n&&Math.abs(t.y-e.y)<=n,th=(t,e,n)=>Math.max(e,Math.min(n,t)),BW=(t,e,n)=>(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),bW=(t,e,n)=>Math.abs(BW(e,n,t))<=1e-9&&t.x>=Math.min(e.x,n.x)-1e-9&&t.x<=Math.max(e.x,n.x)+1e-9&&t.y>=Math.min(e.y,n.y)-1e-9&&t.y<=Math.max(e.y,n.y)+1e-9,GSe=(t,e,n,o)=>((i,r,s,a)=>{const A=BW(i,r,s),c=BW(i,r,a),l=BW(s,a,i),u=BW(s,a,r);return A*c<0&&l*u<0||Math.abs(A)<=1e-9&&bW(s,i,r)||Math.abs(c)<=1e-9&&bW(a,i,r)||Math.abs(l)<=1e-9&&bW(i,s,a)||Math.abs(u)<=1e-9&&bW(r,s,a)})(t,e,n,o)?0:Math.min(bN(t,n,o),bN(e,n,o),bN(n,t,e),bN(o,t,e)),d7t=(t,e)=>{let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o],s=e[i];if(bW(t,s,r))return!0;r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},YSe=(t,e,n)=>{if(d7t(t,n)||d7t(e,n))return 0;let o=Number.POSITIVE_INFINITY;for(let i=0;i<n.length;i++){const r=n[i],s=n[(i+1)%n.length];o=Math.min(o,GSe(t,e,r,s))}return o};function h7t(t,e,n){let o=0,i=1;const r=e.x-t.x,s=e.y-t.y,a=[[-r,t.x-n.minX],[r,n.maxX-t.x],[-s,t.y-n.minY],[s,n.maxY-t.y]];for(const[A,c]of a){if(Math.abs(A)<1e-12){if(c<0)return!1;continue}const l=c/A;if(A<0?o=Math.max(o,l):i=Math.min(i,l),o>i)return!1}return!0}function p7t({start:t,end:e,width:n,base:o}){const i=Aa(t,e),r=(c=>th(1.25*c,.25,.75))(n),s=Math.max(1,Math.ceil(i/r)),a=n/2,A=[];for(let c=0;c<s;c++){const l=c/s,u=(c+1)/s,g=t.x+(e.x-t.x)*l,h=t.y+(e.y-t.y)*l,d=t.x+(e.x-t.x)*u,p=t.y+(e.y-t.y)*u;A.push({...o,minX:Math.min(g,d)-a,minY:Math.min(h,p)-a,maxX:Math.max(g,d)+a,maxY:Math.max(h,p)+a,exactShape:{type:"segment",start:{x:g,y:h},end:{x:d,y:p},width:n}})}return A}var tgo=(t,e,n)=>{const o=Math.cos(n),i=Math.sin(n),r=t.x-e.x,s=t.y-e.y;return{x:e.x+r*o-s*i,y:e.y+r*i+s*o}},ngo=class{nodeIndices=[];priorities=[];get size(){return this.nodeIndices.length}push(t,e){let n=this.nodeIndices.length;for(this.nodeIndices.push(t),this.priorities.push(e);n>0;){const o=n-1>>1;if(this.priorities[o]<=e)break;this.swap(n,o),n=o}}pop(){const t=this.nodeIndices[0],e=this.nodeIndices.pop(),n=this.priorities.pop();if(this.nodeIndices.length===0)return t;this.nodeIndices[0]=e,this.priorities[0]=n;let o=0;for(;;){const i=2*o+1,r=i+1;if(i>=this.nodeIndices.length)break;let s=i;if(r<this.nodeIndices.length&&this.priorities[r]<this.priorities[i]&&(s=r),this.priorities[o]<=this.priorities[s])break;this.swap(o,s),o=s}return t}swap(t,e){[this.nodeIndices[t],this.nodeIndices[e]]=[this.nodeIndices[e],this.nodeIndices[t]],[this.priorities[t],this.priorities[e]]=[this.priorities[e],this.priorities[t]]}},ogo=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]],mce=["#d53535","#3478c8","#8e44ad","#15956f"],m7t=class extends BN{problem;searchBounds;rows;columns;origin;nodes=[];open=new ngo;bestCost=new Map;closed=new Set;baseStateCount;stateSpaceUpperBound;endLayerIndices;targetCell;segmentWidthCache=new Map;closedStateCount=0;output=null;constructor(t){super(),this.problem=t;const e=Math.max(t.traceWidth,t.viaDiameter)/2+t.obstacleIndex.clearance,n=th(Math.min(t.start.x,t.end.x)-t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),o=th(Math.max(t.start.x,t.end.x)+t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),i=th(Math.min(t.start.y,t.end.y)-t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),r=th(Math.max(t.start.y,t.end.y)+t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),s=Math.floor((n-t.gridOffset.x)/t.gridSize)*t.gridSize+t.gridOffset.x,a=Math.floor((i-t.gridOffset.y)/t.gridSize)*t.gridSize+t.gridOffset.y;this.origin={x:s,y:a},this.columns=Math.max(2,Math.floor((o-s)/t.gridSize)+1),this.rows=Math.max(2,Math.floor((r-a)/t.gridSize)+1),this.searchBounds={minX:s,minY:a,maxX:s+(this.columns-1)*t.gridSize,maxY:a+(this.rows-1)*t.gridSize};const A=this.rows*this.columns*t.layers.length*(t.maxViaCount+1);this.baseStateCount=A,this.stateSpaceUpperBound=A*(this.rows*this.columns+1),this.targetCell=this.pointToCell(t.end),this.endLayerIndices=new Set(t.endLayers.map(l=>t.layers.indexOf(l)).filter(l=>l>=0));const c=this.pointToCell(t.start);for(const l of t.startLayers){const u=t.layers.indexOf(l);if(u<0||this.endpointCollides(t.start,u))continue;const g={...c,...t.start,layerIndex:u,viaCount:0,viaPoints:[],g:0,f:this.heuristic(t.start),parentIndex:-1},h=this.nodes.length;this.nodes.push(g),this.open.push(h,g.f),this.bestCost.set(this.toStateIndex(g),0)}this.open.size!==0&&this.endLayerIndices.size!==0||(this.failed=!0,this.error="No collision-free multilayer route endpoint"),this.MAX_ITERATIONS=Math.min(15e3,Math.max(2e3,2*A)),this.stats=this.createStats()}getSolverName(){return`LayerAwareGridRouteSolver(${this.problem.gridSize.toFixed(3)}mm)`}_step(){if(this.open.size===0)return this.failed=!0,void(this.error="No collision-free multilayer grid route found");const t=this.open.pop(),e=this.nodes[t],n=this.toStateIndex(e);if(!this.closed.has(n)){if(this.closed.add(n),this.closedStateCount++,e.row===this.targetCell.row&&e.column===this.targetCell.column&&this.endLayerIndices.has(e.layerIndex)&&e.viaCount>=this.problem.minViaCount&&!this.segmentCollides(e,this.problem.end))return this.output=this.reconstructRoute(t),this.solved=!0,void(this.stats=this.createStats());this.expandPlanarMoves(t,e),this.expandViaMoves(t,e),this.stats=this.createStats()}}expandPlanarMoves(t,e){for(const[n,o]of ogo){const i=e.row+n,r=e.column+o;if(i<0||i>=this.rows||r<0||r>=this.columns)continue;const s=this.cellToPoint(i,r),a=this.getSafeSegmentWidth(e,s);if(a<=0)continue;const A=this.problem.gridSize*(n!==0&&o!==0?Math.SQRT2:1)*Math.max(1,(this.problem.traceWidth/a)**this.problem.neckPenaltyExponent);this.enqueueNode({row:i,column:r,...s,layerIndex:e.layerIndex,viaCount:e.viaCount,viaPoints:e.viaPoints,g:e.g+A,parentIndex:t})}}expandViaMoves(t,e){if(e.viaCount>=this.problem.maxViaCount)return;const n=.5*this.problem.gridSize;if(Aa(e,this.problem.start)<n-1e-9||Aa(e,this.problem.end)<n-1e-9)return;const o=e.parentIndex>=0?this.nodes[e.parentIndex]:void 0;if(!o||o.layerIndex===e.layerIndex||!SN(o,e))for(let i=0;i<this.problem.layers.length;i++)i!==e.layerIndex&&(this.problem.obstacleIndex.collidesVia({point:e,layers:this.problem.layers,padDiameter:this.problem.viaDiameter,holeDiameter:this.problem.viaHoleDiameter,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreTraceIndices:this.problem.softTraceIndices,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance,blockSameNetObstacles:!0,sameNetObstacleClearance:0,otherNewViaPoints:e.viaPoints,fixedVias:this.problem.fixedVias})||this.enqueueNode({row:e.row,column:e.column,x:e.x,y:e.y,layerIndex:i,viaCount:e.viaCount+1,viaPoints:[...e.viaPoints,{x:e.x,y:e.y}],g:e.g+this.problem.viaCost,parentIndex:t}))}enqueueNode(t){const e=this.toStateIndex(t);if(this.closed.has(e)||t.g>=(this.bestCost.get(e)??Number.POSITIVE_INFINITY))return;this.bestCost.set(e,t.g);const n=t.g+this.heuristic(t),o=this.nodes.length;this.nodes.push({...t,f:n}),this.open.push(o,n)}endpointCollides(t,e){return this.getSafeSegmentWidth({...t,layerIndex:e,viaCount:0},t)<=0}segmentCollides(t,e){return this.getSafeSegmentWidth(t,e)<=0}getSafeSegmentWidth(t,e){const n=this.problem.layers[t.layerIndex],o=this.problem.startLayers.length===1&&t.viaCount===0&&n===this.problem.originalStartLayer&&Aa(this.problem.start,t)<=this.problem.maxStartNeckLength+1e-9&&Aa(this.problem.start,e)<=this.problem.maxStartNeckLength+1e-9,i=this.problem.endLayers.length===1&&n===this.problem.originalEndLayer&&Aa(this.problem.end,t)<=this.problem.maxEndNeckLength+1e-9&&Aa(this.problem.end,e)<=this.problem.maxEndNeckLength+1e-9,r=Math.max(o?this.problem.startNeckWidth:0,i?this.problem.endNeckWidth:0),s=[t.x,t.y,e.x,e.y,t.layerIndex,t.viaCount,r].join(":"),a=this.segmentWidthCache.get(s);if(a!==void 0)return a;const A=l=>!this.problem.obstacleIndex.collides({start:t,end:e,layer:n,width:l,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreTraceIndices:this.problem.softTraceIndices,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance});let c=0;if(o||i){let u=Math.ceil((r-1e-9)/.025),g=Math.floor((this.problem.traceWidth+1e-9)/.025);for(;u<=g;){const h=Math.floor((u+g)/2),d=Number((h*.025).toFixed(6));A(d)?(c=d,u=h+1):g=h-1}c<r-1e-9&&A(r)&&(c=r)}else c=A(this.problem.traceWidth)?this.problem.traceWidth:0;return this.segmentWidthCache.set(s,c),c}reconstructRoute(t){const e=[];let n=t;for(;n>=0;){const a=this.nodes[n];e.push(a),n=a.parentIndex}e.reverse();const o=e[e.length-1];SN(o,this.problem.end)||e.push({...o,...this.problem.end,row:this.targetCell.row,column:this.targetCell.column,parentIndex:-1});const i=[];let r=[e[0]];for(let a=1;a<e.length;a++){const A=e[a-1],c=e[a];c.layerIndex!==A.layerIndex?(i.push(r),r=[c]):r.push(c)}i.push(r);const s=[];for(let a=0;a<i.length;a++){const A=this.simplifySection(i[a]),c=A.slice(0,-1).map((g,h)=>this.getSafeSegmentWidth(g,A[h+1])),l=A.map((g,h)=>({route_type:"wire",x:g.x,y:g.y,layer:this.problem.layers[g.layerIndex],width:c.length===0?Math.min(this.problem.startNeckWidth,this.problem.endNeckWidth):h===0?c[0]:h===A.length-1?c[c.length-1]:Math.min(c[h-1],c[h])}));s.push(...l);const u=i[a+1];if(u){const g=this.problem.layers[A.at(-1).layerIndex],h=this.problem.layers[u[0].layerIndex],d=A.at(-1);s.push({route_type:"via",x:d.x,y:d.y,from_layer:g,to_layer:h,via_diameter:this.problem.viaDiameter,via_hole_diameter:this.problem.viaHoleDiameter})}}return{route:s,traceWidth:this.problem.traceWidth,startNeckWidth:this.problem.startNeckWidth,endNeckWidth:this.problem.endNeckWidth,gridSize:this.problem.gridSize,gridOffset:this.problem.gridOffset,viaCount:i.length-1}}simplifySection(t){return t.length<=2?t:this.problem.neckPenaltyExponent>1?this.simplifyStrictSection(t):this.simplifyWidthPreservingSection(t)}simplifyStrictSection(t){const e=t.slice(0,-1).map((r,s)=>this.getSafeSegmentWidth(r,t[s+1])),n=[0];for(let r=0;r<e.length;r++)n.push(n[r]+this.getWidthPenalizedCost(t[r],t[r+1],e[r]));const o=[t[0]];let i=0;for(;i<t.length-1;){let r=t.length-1;for(;r>i+1&&!this.shortcutPreservesRouteQuality(t,e,n,i,r);)r--;o.push(t[r]),i=r}return this.removeRedundantCollinearPoints(o)}shortcutPreservesRouteQuality(t,e,n,o,i){const r=this.getSafeSegmentWidth(t[o],t[i]);if(r<=0)return!1;let s=Number.POSITIVE_INFINITY;for(let A=o;A<i;A++)s=Math.min(s,e[A]);const a=n[i]-n[o];return r>=s-1e-9&&this.getWidthPenalizedCost(t[o],t[i],r)<=a+1e-9}getWidthPenalizedCost(t,e,n){return Aa(t,e)*Math.max(1,(this.problem.traceWidth/n)**this.problem.neckPenaltyExponent)}simplifyWidthPreservingSection(t){const e=t.slice(0,-1).map((A,c)=>this.getSafeSegmentWidth(A,t[c+1])),n=[0];for(let A=0;A<e.length;A++)n.push(n[A]+Aa(t[A],t[A+1])*Math.max(1,(this.problem.traceWidth/e[A])**this.problem.neckPenaltyExponent));const o=new Float64Array(t.length).fill(Number.POSITIVE_INFINITY),i=new Float64Array(t.length).fill(Number.POSITIVE_INFINITY),r=new Int32Array(t.length).fill(-1);o[0]=0,i[0]=0;for(let A=1;A<t.length;A++){let c=Number.POSITIVE_INFINITY;for(let l=A-1;l>=0;l--){if(c=Math.min(c,e[l]),!Number.isFinite(o[l]))continue;const u=this.getSafeSegmentWidth(t[l],t[A]);if(u<c-1e-9)continue;const g=Aa(t[l],t[A]);if(g*Math.max(1,(this.problem.traceWidth/u)**this.problem.neckPenaltyExponent)>n[A]-n[l]+1e-9)continue;const h=o[l]+g*Math.max(0,this.problem.traceWidth-u),d=i[l]+g;(h<o[A]-1e-9||Math.abs(h-o[A])<=1e-9&&d<i[A]-1e-9)&&(o[A]=h,i[A]=d,r[A]=l)}}const s=[];let a=t.length-1;for(;a>=0&&(s.push(t[a]),a!==0);)if(a=r[a],a<0)return t;return s.reverse(),this.removeRedundantCollinearPoints(s)}removeRedundantCollinearPoints(t){return t.filter((e,n,o)=>{if(n===0||n===o.length-1)return!0;const i=o[n-1],r=o[n+1],s=(e.x-i.x)*(r.y-e.y)-(e.y-i.y)*(r.x-e.x),a=Math.abs(this.getSafeSegmentWidth(i,e)-this.getSafeSegmentWidth(e,r))<1e-9;return Math.abs(s)>1e-8||!a})}pointToCell(t){return{column:th(Math.round((t.x-this.origin.x)/this.problem.gridSize),0,this.columns-1),row:th(Math.round((t.y-this.origin.y)/this.problem.gridSize),0,this.rows-1)}}cellToPoint(t,e){return{x:this.origin.x+e*this.problem.gridSize,y:this.origin.y+t*this.problem.gridSize}}toStateIndex(t){const e=((t.viaCount*this.problem.layers.length+t.layerIndex)*this.rows+t.row)*this.columns+t.column;if(t.viaCount!==1||t.viaPoints.length===0||Aa(t,t.viaPoints[0])>=this.problem.viaHoleDiameter+this.problem.obstacleIndex.minViaHoleEdgeToViaHoleEdgeClearance-1e-9)return e;const n=this.pointToCell(t.viaPoints[0]);return e+(1+n.row*this.columns+n.column)*this.baseStateCount}heuristic(t){return Aa(t,this.problem.end)}createStats(){return{phase:"layer-aware-grid-search",gridSize:this.problem.gridSize,traceWidth:this.problem.traceWidth,startNeckWidth:this.problem.startNeckWidth,endNeckWidth:this.problem.endNeckWidth,maxViaCount:this.problem.maxViaCount,minViaCount:this.problem.minViaCount,openStates:this.open.size,closedStates:this.closedStateCount,trackedStates:this.bestCost.size,stateSpaceUpperBound:this.stateSpaceUpperBound}}computeProgress(){return Math.min(.99,this.iterations/this.MAX_ITERATIONS)}getOutput(){return this.output}getConstructorParams(){const{obstacleIndex:t,...e}=this.problem;return[e]}visualize(){const t=this.nodes.filter(i=>this.closed.has(this.toStateIndex(i))).slice(-2e3).map(i=>({x:i.x,y:i.y,color:`${mce[i.layerIndex%mce.length]}55`})),e=[],n=[],o=this.output?.route??[];for(let i=0;i<o.length-1;i++){const r=o[i],s=o[i+1];if(r?.route_type==="wire"&&s?.route_type==="wire"&&r.layer===s.layer){const a=this.problem.layers.indexOf(r.layer);e.push({points:[r,s],strokeColor:mce[a%mce.length]??"#333",strokeWidth:r.width})}r?.route_type==="via"&&n.push({center:r,radius:(r.via_diameter??this.problem.viaDiameter)/2,fill:"#d4a017"})}return{coordinateSystem:"cartesian",title:this.getSolverName(),rects:[{center:{x:(this.searchBounds.minX+this.searchBounds.maxX)/2,y:(this.searchBounds.minY+this.searchBounds.maxY)/2},width:this.searchBounds.maxX-this.searchBounds.minX,height:this.searchBounds.maxY-this.searchBounds.minY,stroke:"#777"}],points:[...t,{...this.problem.start,color:"green",label:"reroute start"},{...this.problem.end,color:"purple",label:"reroute target"}],lines:e,circles:n,texts:[]}}},_ce=[{direction:1,strength:.7},{direction:-1,strength:.7},{direction:1,strength:1},{direction:-1,strength:1}],igo=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r<=1e-12)return{...e};const s=th(((t.x-e.x)*o+(t.y-e.y)*i)/r,0,1);return{x:e.x+o*s,y:e.y+i*s}},USe=class extends BN{problem;phase="prepare-candidate";variantCursor=0;relaxationIteration=0;candidatePoints=[];sampledPoints;output=null;constructor(t){super(),this.problem=t,this.sampledPoints=this.sampleRoute(),this.MAX_ITERATIONS=100,this.stats=this.createStats()}getSolverName(){return"ElasticTracePushSolver"}_step(){switch(this.phase){case"prepare-candidate":if(this.variantCursor>=_ce.length)return this.failed=!0,void(this.error="No collision-free elastic displacement found");this.candidatePoints=this.sampledPoints.map(t=>({...t})),this.relaxationIteration=0,this.phase="relax-candidate";break;case"relax-candidate":this.relaxCandidate(),this.relaxationIteration++,this.relaxationIteration>=10&&(this.phase="validate-candidate");break;case"validate-candidate":{const t=this.simplifyCandidate(this.candidatePoints);this.pathCollides(t)?(this.variantCursor++,this.phase="prepare-candidate"):(this.output={points:t,traceWidth:this.problem.traceWidth},this.phase="complete");break}case"complete":this.solved=!0}this.stats=this.createStats()}sampleRoute(){const t=[],e=th(2*this.problem.traceWidth,.2,.45),n=this.problem.trace.route;for(let o=this.problem.range.startIndex;o<this.problem.range.endIndex;o++){const i=n[o],r=n[o+1];if(i?.route_type!=="wire"||r?.route_type!=="wire"||i.layer!==r.layer)continue;t.length===0&&t.push({x:i.x,y:i.y});const s=Aa(i,r),a=Math.max(1,Math.ceil(s/e));for(let A=1;A<=a;A++){const c=A/a;t.push({x:i.x+(r.x-i.x)*c,y:i.y+(r.y-i.y)*c})}}return t}relaxCandidate(){const t=_ce[this.variantCursor],e=this.candidatePoints.map(o=>({...o})),n=new Uint8Array(this.candidatePoints.length);for(let o=1;o<this.candidatePoints.length-1;o++){const i=this.candidatePoints[o],r=this.findNearestCorridorSegment(i);if(!r)continue;const s=Aa(r.segment.start,r.segment.end);if(s<=1e-9)continue;const a=r.segment.width/2+this.problem.traceWidth/2+this.problem.obstacleIndex.clearance+.025;if(r.distance>a+.35)continue;const A={x:(r.segment.start.y-r.segment.end.y)/s*t.direction,y:(r.segment.end.x-r.segment.start.x)/s*t.direction},c=a-((i.x-r.closest.x)*A.x+(i.y-r.closest.y)*A.y);if(c<=0)continue;const l=Math.min(.35,c*t.strength);e[o]={x:i.x+A.x*l,y:i.y+A.y*l},n[o]=1}for(let o=1;o<e.length-1;o++){if(!n[o])continue;const i=e[o-1],r=e[o],s=e[o+1];e[o]={x:.85*r.x+(i.x+s.x)/2*.15,y:.85*r.y+(i.y+s.y)/2*.15}}this.candidatePoints=e}findNearestCorridorSegment(t){let e;for(const n of this.problem.corridor){if(n.layer!==this.problem.layer)continue;const o=igo(t,n.start,n.end),i=Aa(t,o);(!e||i<e.distance)&&(e={segment:n,closest:o,distance:i})}return e}simplifyCandidate(t){if(t.length<=2)return t;const e=[t[0]];let n=0;for(;n<t.length-1;){let o=t.length-1;for(;o>n+1&&this.segmentCollides(t[n],t[o]);)o--;e.push(t[o]),n=o}return e.filter((o,i,r)=>i===0||!SN(o,r[i-1]))}pathCollides(t){if(t.length<2)return!0;for(let e=0;e<t.length-1;e++)if(this.segmentCollides(t[e],t[e+1]))return!0;return!1}segmentCollides(t,e){return this.problem.obstacleIndex.collides({start:t,end:e,layer:this.problem.layer,width:this.problem.traceWidth,connectionNames:this.problem.connectionNames,ignoreTraceIndex:-1})}createStats(){const t=_ce[this.variantCursor];return{phase:this.phase,direction:t?.direction,strength:t?.strength,variantCursor:this.variantCursor,relaxationIteration:this.relaxationIteration,sampledPointCount:this.sampledPoints.length}}computeProgress(){return Math.min(.99,(this.variantCursor+this.relaxationIteration/12)/_ce.length)}getOutput(){return this.output}getConstructorParams(){return[this.problem]}visualize(){return{coordinateSystem:"cartesian",title:`Elastic trace push: ${this.phase}`,lines:[...this.problem.corridor.map(t=>({points:[t.start,t.end],strokeColor:"rgba(255, 128, 0, 0.6)",strokeWidth:t.width})),...this.candidatePoints.length>1?[{points:this.candidatePoints,strokeColor:"#1769d2",strokeWidth:this.problem.traceWidth}]:[]],points:[],rects:[],circles:[],texts:[]}}},fce=(t,e)=>{const n=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return n<=Ki||o<=Ki||Math.abs(n-o)<=Ki},KSe=t=>{let e=0;for(let n=0;n<t.length-1;n++)fce(t[n],t[n+1])||e++;return e},SW=t=>{let e=0;for(let n=0;n<t.length-1;n++)e+=Aa(t[n],t[n+1]);return e},rgo=t=>t.filter((e,n)=>n===0||!SN(e,t[n-1])),_7t=(t,e)=>{const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o),s=Math.sign(n),a=Math.sign(o),A=[];fce(t,e)&&A.push([t,e]),A.push([t,{x:e.x,y:t.y},e],[t,{x:t.x,y:e.y},e]),i>=r?A.push([t,{x:e.x-s*r,y:t.y},e],[t,{x:t.x+s*r,y:e.y},e]):A.push([t,{x:t.x,y:e.y-a*i},e],[t,{x:e.x,y:t.y+a*i},e]);const c=new Map;for(const l of A){const u=rgo(l);if(u.length<2||u.some((h,d)=>d<u.length-1&&!fce(h,u[d+1])))continue;const g=u.map(h=>`${h.x.toFixed(6)},${h.y.toFixed(6)}`).join(";");c.set(g,u)}return[...c.values()].sort((l,u)=>SW(l)-SW(u)||l.length-u.length)},sgo=class{nodeIndices=[];priorities=[];get size(){return this.nodeIndices.length}push(t,e){let n=this.nodeIndices.length;for(this.nodeIndices.push(t),this.priorities.push(e);n>0;){const o=n-1>>1;if(this.priorities[o]<=e)break;this.swap(n,o),n=o}}pop(){const t=this.nodeIndices[0],e=this.nodeIndices.pop(),n=this.priorities.pop();if(this.nodeIndices.length===0)return t;this.nodeIndices[0]=e,this.priorities[0]=n;let o=0;for(;;){const i=2*o+1,r=i+1;if(i>=this.nodeIndices.length)break;let s=i;if(r<this.nodeIndices.length&&this.priorities[r]<this.priorities[i]&&(s=r),this.priorities[o]<=this.priorities[s])break;this.swap(o,s),o=s}return t}swap(t,e){[this.nodeIndices[t],this.nodeIndices[e]]=[this.nodeIndices[e],this.nodeIndices[t]],[this.priorities[t],this.priorities[e]]=[this.priorities[e],this.priorities[t]]}},ago=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]],Ice=class extends BN{problem;searchBounds;rows;columns;origin;nodes=[];open=new sgo;bestCost;closed;closedCellCount=0;targetCell;output=null;constructor(t){super(),this.problem=t;const e=t.traceWidth/2+t.obstacleIndex.clearance,n=th(Math.min(t.start.x,t.end.x)-t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),o=th(Math.max(t.start.x,t.end.x)+t.searchPadding,t.bounds.minX+e,t.bounds.maxX-e),i=th(Math.min(t.start.y,t.end.y)-t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),r=th(Math.max(t.start.y,t.end.y)+t.searchPadding,t.bounds.minY+e,t.bounds.maxY-e),s=Math.floor((n-t.gridOffset.x)/t.gridSize)*t.gridSize+t.gridOffset.x,a=Math.floor((i-t.gridOffset.y)/t.gridSize)*t.gridSize+t.gridOffset.y;if(this.origin={x:s,y:a},this.columns=Math.max(2,Math.floor((o-s)/t.gridSize)+1),this.rows=Math.max(2,Math.floor((r-a)/t.gridSize)+1),this.searchBounds={minX:s,minY:a,maxX:s+(this.columns-1)*t.gridSize,maxY:a+(this.rows-1)*t.gridSize},this.bestCost=new Float64Array(this.rows*this.columns).fill(Number.POSITIVE_INFINITY),this.closed=new Uint8Array(this.rows*this.columns),this.endpointCollides(t.start)||this.endpointCollides(t.end))return this.failed=!0,this.error="Grid-route endpoint violates obstacle clearance",this.targetCell={row:0,column:0},this.MAX_ITERATIONS=1,void(this.stats=this.createStats());const A=this.pointToCell(t.start);this.targetCell=this.pointToCell(t.end);const c={...A,x:t.start.x,y:t.start.y,g:0,f:this.heuristic(t.start),parentIndex:-1};this.nodes.push(c),this.open.push(0,c.f),this.bestCost[this.toFlatIndex(A.row,A.column)]=0,this.MAX_ITERATIONS=Math.min(5e3,Math.max(1e3,this.rows*this.columns*2)),this.stats=this.createStats()}endpointCollides(t){return this.problem.obstacleIndex.collides({start:t,end:t,layer:this.problem.layer,width:this.problem.traceWidth,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance})}getSolverName(){return`ObstacleAwareGridRouteSolver(${this.problem.gridSize.toFixed(3)}mm)`}_step(){if(this.open.size===0)return this.failed=!0,void(this.error="No collision-free grid route found");const t=this.open.pop(),e=this.nodes[t],n=this.toFlatIndex(e.row,e.column);if(!this.closed[n]){if(this.closed[n]=1,this.closedCellCount++,e.row===this.targetCell.row&&e.column===this.targetCell.column&&this.getAllowedConnector(e,this.problem.end)!==null)return this.output={points:this.reconstructPath(t),traceWidth:this.problem.traceWidth,gridSize:this.problem.gridSize,gridOffset:this.problem.gridOffset},this.solved=!0,void(this.stats=this.createStats());for(const[o,i]of ago){const r=e.row+o,s=e.column+i;if(r<0||r>=this.rows||s<0||s>=this.columns)continue;const a=this.toFlatIndex(r,s);if(this.closed[a])continue;const A=this.cellToPoint(r,s),c=this.getAllowedConnector(e,A);if(c===null)continue;const l=e.parentIndex===-1&&this.problem.requireOctilinear?SW(c):this.problem.gridSize*(o!==0&&i!==0?Math.SQRT2:1),u=e.g+l;if(u>=this.bestCost[a])continue;this.bestCost[a]=u;const g=u+this.heuristic(A),h=this.nodes.length;this.nodes.push({row:r,column:s,...A,g:u,f:g,parentIndex:t}),this.open.push(h,g)}this.stats=this.createStats()}}segmentCollides(t,e){return this.problem.obstacleIndex.collides({start:t,end:e,layer:this.problem.layer,width:this.problem.traceWidth,connectionNames:this.problem.connectionNames,ignoreTraceIndex:this.problem.ignoreTraceIndex,ignoreRouteRange:this.problem.ignoreRouteRange,obstacleClearance:this.problem.obstacleClearance})}getAllowedConnector(t,e){return this.problem.requireOctilinear&&("parentIndex"in t&&t.parentIndex===-1||SN(e,this.problem.end))?_7t(t,e).find(n=>n.slice(0,-1).every((o,i)=>!this.segmentCollides(o,n[i+1])))??null:this.segmentCollides(t,e)?null:[t,e]}pointToCell(t){return{column:th(Math.round((t.x-this.origin.x)/this.problem.gridSize),0,this.columns-1),row:th(Math.round((t.y-this.origin.y)/this.problem.gridSize),0,this.rows-1)}}cellToPoint(t,e){return{x:this.origin.x+e*this.problem.gridSize,y:this.origin.y+t*this.problem.gridSize}}toFlatIndex(t,e){return t*this.columns+e}heuristic(t){return Math.hypot(this.problem.end.x-t.x,this.problem.end.y-t.y)}reconstructPath(t){const e=[];let n=t;for(;n>=0;){const r=this.nodes[n];e.push({x:r.x,y:r.y}),n=r.parentIndex}if(e.reverse(),SN(e[0],this.problem.start)||e.unshift({...this.problem.start}),SN(e[e.length-1],this.problem.end)||e.push({...this.problem.end}),this.problem.requireOctilinear){const r=[e[0]];for(let s=0;s<e.length-1;s++){const a=e[s],A=e[s+1],c=s===0||s===e.length-2?this.getAllowedConnector(s===0?{...a,parentIndex:-1}:a,A):[a,A];if(!c)return e;r.push(...c.slice(1))}return r.filter((s,a,A)=>{if(a===0||a===A.length-1)return!0;const c=A[a-1],l=A[a+1],u=(s.x-c.x)*(l.y-s.y)-(s.y-c.y)*(l.x-s.x);return Math.abs(u)>1e-8||!fce(c,l)})}const o=[e[0]];let i=0;for(;i<e.length-1;){let r=e.length-1;for(;r>i+1&&this.segmentCollides(e[i],e[r]);)r--;o.push(e[r]),i=r}return o.filter((r,s,a)=>{if(s===0||s===a.length-1)return!0;const A=a[s-1],c=a[s+1],l=(r.x-A.x)*(c.y-r.y)-(r.y-A.y)*(c.x-r.x);return Math.abs(l)>1e-8})}createStats(){return{phase:"obstacle-aware-grid-search",gridSize:this.problem.gridSize,traceWidth:this.problem.traceWidth,gridOffset:this.problem.gridOffset,openCells:this.open.size,closedCells:this.closedCellCount,gridCells:this.rows*this.columns}}computeProgress(){return Math.min(.99,this.iterations/this.MAX_ITERATIONS)}getOutput(){return this.output}getConstructorParams(){const{obstacleIndex:t,...e}=this.problem;return[e]}visualize(){const t=this.nodes.filter(n=>this.closed[this.toFlatIndex(n.row,n.column)]).slice(-2e3).map(n=>({x:n.x,y:n.y,color:"rgba(0,90,255,0.22)"})),e=this.output?.points??[];return{coordinateSystem:"cartesian",title:this.getSolverName(),rects:[{center:{x:(this.searchBounds.minX+this.searchBounds.maxX)/2,y:(this.searchBounds.minY+this.searchBounds.maxY)/2},width:this.searchBounds.maxX-this.searchBounds.minX,height:this.searchBounds.maxY-this.searchBounds.minY,stroke:"#777"}],points:[...t,{...this.problem.start,color:"green",label:"reroute start"},{...this.problem.end,color:"purple",label:"reroute target"}],lines:e.length>1?[{points:e,strokeColor:"#00a050",strokeWidth:this.problem.traceWidth}]:[],circles:[],texts:[]}}},ub=class{items;clearance;boardEdgeClearance;boardLayers;minViaHoleEdgeToViaHoleEdgeClearance;defaultViaHoleDiameter;bounds;maxIndexedViaHoleDiameter;index;connectionNameSets;copperObjectIds;connectionNameResolver;connectedPads;dynamicTraceIndex;constructor(t,e,n,o=[],i=new Tv(t,e)){var r;this.bounds=t.bounds,this.boardLayers=(r=t.layerCount,["top",...Array.from({length:Math.max(0,r-2)},(s,a)=>`inner${a+1}`),...r>1?["bottom"]:[]]),this.dynamicTraceIndex=n,this.clearance=Math.max(t.defaultObstacleMargin??0,t.minTraceToPadEdgeClearance??0,.1),this.boardEdgeClearance=t.minBoardEdgeClearance??this.clearance,this.minViaHoleEdgeToViaHoleEdgeClearance=Math.max(t.minViaHoleEdgeToViaHoleEdgeClearance??0,.1),this.defaultViaHoleDiameter=t.min_via_hole_diameter??t.minViaHoleDiameter??.3,this.items=[...t.obstacles.flatMap((s,a)=>(function(A,c=.6){const l=(A.ccwRotationDegrees??0)*Math.PI/180,u=Math.max(1,Math.ceil(A.width/c)),g=Math.max(1,Math.ceil(A.height/c)),h=A.width/u,d=A.height/g,p=[];for(let m=0;m<g;m++)for(let _=0;_<u;_++){const f={x:A.center.x-A.width/2+(_+.5)*h,y:A.center.y-A.height/2+(m+.5)*d},I=h/2,C=d/2,y=[{x:f.x-I,y:f.y-C},{x:f.x+I,y:f.y-C},{x:f.x+I,y:f.y+C},{x:f.x-I,y:f.y+C}].map(x=>tgo(x,A.center,l));p.push({minX:Math.min(...y.map(x=>x.x)),minY:Math.min(...y.map(x=>x.y)),maxX:Math.max(...y.map(x=>x.x)),maxY:Math.max(...y.map(x=>x.y)),layers:A.layers,kind:"obstacle",obstacleKind:A.connectedTo[0]?.startsWith("pcb_via_")?"via":A.connectedTo[0]?.startsWith("pcb_smtpad_")||A.connectedTo[0]?.startsWith("pcb_plated_hole_")?"pad":"other",connectionNames:A.connectedTo,exactShape:{type:"polygon",points:y}})}return p})(s).map(A=>({...A,copperObjectId:`obstacle:${a}`}))),...this.createTraceItems(t.fixedTraces??[],!0),...this.createTraceItems(e),...o],this.maxIndexedViaHoleDiameter=this.items.reduce((s,a)=>a.kind==="via"?Math.max(s,a.viaHoleDiameter??this.defaultViaHoleDiameter):s,this.defaultViaHoleDiameter),this.connectionNameResolver=i,this.connectionNameSets=this.items.map(s=>new Set(i.canonicalize(s.connectionNames))),this.copperObjectIds=this.items.map((s,a)=>s.copperObjectId??`indexed-item:${a}`),this.connectedPads=t.obstacles.flatMap(s=>s.connectedTo.some(a=>a.startsWith("pcb_smtpad_")||a.startsWith("pcb_plated_hole_"))?[{obstacle:s,canonicalConnectionNames:new Set(i.canonicalize(s.connectedTo))}]:[]),this.index=this.items.length>0?new X4(this.items.length):null;for(const s of this.items)this.index.add(s.minX,s.minY,s.maxX,s.maxY);this.index?.finish()}createTraceItems(t,e=!1){const n=[];for(let o=0;o<t.length;o++){const i=t[o],r=e?void 0:o,s=`${e?"fixed-trace":"trace"}:${o}`,a=!e&&o===this.dynamicTraceIndex,A=[i.connection_name,i.source_trace_id,i.rootConnectionName,...i.mergedConnectionNames??[],...i.connectsTo??[]].filter(c=>!!c);for(let c=0;c<i.route.length;c++){const l=i.route[c];if(l.route_type==="via"){const g=l.via_diameter??.6;n.push({minX:l.x-g/2,minY:l.y-g/2,maxX:l.x+g/2,maxY:l.y+g/2,layers:this.boardLayers,kind:"via",connectionNames:A,copperObjectId:s,traceIndex:r,routeStartIndex:c,routeEndIndex:c,viaHoleDiameter:l.via_hole_diameter??this.defaultViaHoleDiameter,exactShape:{type:"circle",center:{x:l.x,y:l.y},radius:g/2}});continue}if(a)continue;const u=i.route[c+1];l.route_type==="wire"&&u?.route_type==="wire"&&l.layer===u.layer&&n.push(...p7t({start:l,end:u,width:l.width,base:{layers:[l.layer],kind:"trace",connectionNames:A,copperObjectId:s,traceIndex:r,routeStartIndex:c,routeEndIndex:c+1}}))}}return n}collides(t){if(this.isOutsideBounds(t))return!0;const{radius:e,candidates:n,canonicalConnectionNames:o}=this.getCollisionCandidates(t);for(const i of n)if(this.itemCollides(i,t,e,o))return!0;return!1}findCollisions(t){const{radius:e,candidates:n,canonicalConnectionNames:o}=this.getCollisionCandidates(t),i=[];for(const r of n)this.itemCollides(r,t,e,o)&&i.push(this.items[r]);return i}getSameNetCopperContactIds(t){const e=t.width/2,n=this.index?.search(Math.min(t.start.x,t.end.x)-e,Math.min(t.start.y,t.end.y)-e,Math.max(t.start.x,t.end.x)+e,Math.max(t.start.y,t.end.y)+e)??[],o=new Set(this.connectionNameResolver.canonicalize(t.connectionNames)),i=new Set;for(const r of n){const s=this.items[r];s.layers.includes(t.layer)&&(s.traceIndex===t.ignoreTraceIndex||t.ignoreTraceIndices?.includes(s.traceIndex??-1)||[...this.connectionNameSets[r]].some(a=>o.has(a))&&this.itemCopperTouches(s,t,e)&&i.add(this.copperObjectIds[r]))}return i}getConnectedPadWidthLimit(t){if(Math.hypot(t.end.x-t.start.x,t.end.y-t.start.y)<=1e-5)return null;const e=this.getConnectedPadWidthLimitAtPoint(t,t.start),n=this.getConnectedPadWidthLimitAtPoint(t,t.end);return e===null?n:n===null?e:Math.min(e,n)}getConnectedPadWidthLimitAtPoint(t,e){const n=this.getConnectedPadsAtPoint(t,e);return n.length===0?null:Math.max(...n.map(({obstacle:o})=>this.getPadWidthNormalToQuery(o,t)))}getConnectedPadEndpointWidthLimitAtPoint(t,e){const n=this.getConnectedPadsAtPoint(t,e);return n.length===0?null:Math.max(...n.map(({obstacle:o})=>{const i=this.getObstacleLocalPoint(e,o);return Math.max(0,2*Math.min(o.width/2-Math.abs(i.x),o.height/2-Math.abs(i.y)))}))}getConnectedPadBoundaryPoint(t,e){const n=e==="start"?t.start:t.end,o=e==="start"?t.end:t.start,i=this.getConnectedPadsAtPoint(t,n).sort((r,s)=>this.getPadWidthNormalToQuery(s.obstacle,t)-this.getPadWidthNormalToQuery(r.obstacle,t))[0];return!i||this.pointIsInsideObstacle(o,i.obstacle)?null:this.getObstacleBoundaryPoint(n,o,i.obstacle)}getConnectedPadsAtPoint(t,e){const n=new Set(this.connectionNameResolver.canonicalize(t.connectionNames));return this.connectedPads.filter(({obstacle:o,canonicalConnectionNames:i})=>o.layers.includes(t.layer)&&[...i].some(r=>n.has(r))&&this.pointIsInsideObstacle(e,o))}pointIsInsideObstacle(t,e){const{x:n,y:o}=this.getObstacleLocalPoint(t,e);return Math.abs(n)<=e.width/2+1e-9&&Math.abs(o)<=e.height/2+1e-9}getObstacleLocalPoint(t,e){const n=-(e.ccwRotationDegrees??0)*Math.PI/180,o=Math.cos(n),i=Math.sin(n),r=t.x-e.center.x,s=t.y-e.center.y;return{x:r*o-s*i,y:r*i+s*o}}getPadWidthNormalToQuery(t,e){const n=e.end.x-e.start.x,o=e.end.y-e.start.y,i=Math.hypot(n,o);if(i<=1e-9)return Math.min(t.width,t.height);const r=-o/i,s=n/i,a=-(t.ccwRotationDegrees??0)*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=r*A-s*c,u=r*c+s*A;return Math.abs(l)*t.width+Math.abs(u)*t.height}getObstacleBoundaryPoint(t,e,n){const o=-(n.ccwRotationDegrees??0)*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=g=>{const h=g.x-n.center.x,d=g.y-n.center.y;return{x:h*i-d*r,y:h*r+d*i}},a=s(t),A=s(e),c={x:A.x-a.x,y:A.y-a.y},l=[];if(Math.abs(c.x)>1e-12){const g=c.x>0?n.width/2:-n.width/2;l.push((g-a.x)/c.x)}if(Math.abs(c.y)>1e-12){const g=c.y>0?n.height/2:-n.height/2;l.push((g-a.y)/c.y)}const u=Math.min(...l.filter(g=>g>=0&&g<=1));return Number.isFinite(u)?{x:t.x+(e.x-t.x)*u,y:t.y+(e.y-t.y)*u}:null}getConnectedLayersAtPoint(t,e){const n=new Set(this.connectionNameResolver.canonicalize(e)),o=new Set,i=this.index?.search(t.x,t.y,t.x,t.y)??[];for(const r of i){const s=this.items[r];if(s.kind==="obstacle"&&[...this.connectionNameSets[r]].some(a=>n.has(a))&&(s.exactShape?.type==="polygon"?YSe(t,t,s.exactShape.points)<=1e-9:s.exactShape?.type==="circle"?Math.hypot(s.exactShape.center.x-t.x,s.exactShape.center.y-t.y)<=s.exactShape.radius+1e-9:t.x>=s.minX-1e-9&&t.x<=s.maxX+1e-9&&t.y>=s.minY-1e-9&&t.y<=s.maxY+1e-9))for(const a of s.layers)o.add(a)}return[...o]}collidesVia(t){return this.getViaViolationSignatures(t).size>0}getViaViolationSignatures(t){const e=new Set;for(const a of t.layers){const A={start:t.point,end:t.point,layer:a,width:t.padDiameter,connectionNames:t.connectionNames,ignoreTraceIndex:t.ignoreTraceIndex,ignoreTraceIndices:t.ignoreTraceIndices,ignoreRouteRange:t.ignoreRouteRange,obstacleClearance:t.obstacleClearance,blockSameNetObstacles:t.blockSameNetObstacles,sameNetObstacleClearance:t.sameNetObstacleClearance};this.isOutsideBounds(A)&&e.add(`board-edge:${a}`);const{radius:c,candidates:l,canonicalConnectionNames:u}=this.getCollisionCandidates(A);for(const g of l)this.itemCollides(g,A,c,u)&&e.add(`copper:${a}:${this.getViolationObjectId(g)}`)}const n=t.holeDiameter+this.minViaHoleEdgeToViaHoleEdgeClearance;for(const a of t.otherNewViaPoints??[])Math.hypot(a.x-t.point.x,a.y-t.point.y)<n-1e-9&&e.add(`new-via-drill:${a.x},${a.y}:${t.holeDiameter}`);const o=t.fixedVias??[];for(let a=0;a<o.length;a++){const A=o[a],c=t.holeDiameter/2+A.holeDiameter/2+this.minViaHoleEdgeToViaHoleEdgeClearance;Math.hypot(A.point.x-t.point.x,A.point.y-t.point.y)<c-1e-9&&e.add(`fixed-via-drill:${a}:${A.point.x},${A.point.y}:${A.holeDiameter}`)}const i=t.holeDiameter/2+this.maxIndexedViaHoleDiameter/2+this.minViaHoleEdgeToViaHoleEdgeClearance,r=this.index?.search(t.point.x-i,t.point.y-i,t.point.x+i,t.point.y+i)??[],s=new Set;for(const a of r){const A=this.items[a];if(A.kind!=="via"||A.exactShape?.type!=="circle"||A.traceIndex===t.ignoreTraceIndex&&t.ignoreRouteRange&&(A.routeEndIndex??-1)>=t.ignoreRouteRange.start&&(A.routeStartIndex??Number.POSITIVE_INFINITY)<=t.ignoreRouteRange.end||t.ignoreTraceIndices?.includes(A.traceIndex??-1))continue;const c=`${this.copperObjectIds[a]??"unknown"}:${A.routeStartIndex??-1}`;if(s.has(c))continue;s.add(c);const l=A.viaHoleDiameter??this.defaultViaHoleDiameter,u=t.holeDiameter/2+l/2+this.minViaHoleEdgeToViaHoleEdgeClearance;Math.hypot(A.exactShape.center.x-t.point.x,A.exactShape.center.y-t.point.y)<u-1e-9&&e.add(`indexed-via-drill:${this.getViolationObjectId(a)}`)}return e}getViolationObjectId(t){const e=this.items[t],n=this.copperObjectIds[t],o=`${e.routeStartIndex??""}-${e.routeEndIndex??""}`;if(e.kind==="obstacle")return n;if(e.exactShape?.type==="segment"){const{start:i,end:r,width:s}=e.exactShape;return`${n}:${e.kind}:${o}:${i.x},${i.y}:${r.x},${r.y}:${s}`}if(e.exactShape?.type==="circle"){const{center:i,radius:r}=e.exactShape;return`${n}:${e.kind}:${o}:${i.x},${i.y}:${r}`}return e.exactShape?.type==="polygon"?`${n}:${e.kind}:${o}:${e.exactShape.points.map(i=>`${i.x},${i.y}`).join(";")}`:`${n}:${e.kind}:${o}:${e.minX},${e.minY},${e.maxX},${e.maxY}`}getCollisionCandidates(t){const e=Math.max(this.clearance,t.obstacleClearance??this.clearance,t.sameNetObstacleClearance??0),n=t.width/2+e,o={minX:Math.min(t.start.x,t.end.x)-n,minY:Math.min(t.start.y,t.end.y)-n,maxX:Math.max(t.start.x,t.end.x)+n,maxY:Math.max(t.start.y,t.end.y)+n};return{radius:n,candidates:this.index?.search(o.minX,o.minY,o.maxX,o.maxY)??[],canonicalConnectionNames:this.connectionNameResolver.canonicalize(t.connectionNames)}}itemCollides(t,e,n,o){const i=this.items[t];if(!i.layers.includes(e.layer))return!1;const r=this.connectionNameSets[t],s=o.some(c=>r.has(c));if(s&&(!e.blockSameNetObstacles||i.kind!=="obstacle"||i.obstacleKind==="via")||i.kind==="trace"&&e.ignoreTraceIndices?.includes(i.traceIndex??-1)||i.kind==="trace"&&i.traceIndex===e.ignoreTraceIndex&&e.ignoreRouteRange&&(i.routeEndIndex??-1)>=e.ignoreRouteRange.start&&(i.routeStartIndex??Number.POSITIVE_INFINITY)<=e.ignoreRouteRange.end)return!1;const a=i.kind==="obstacle"&&i.obstacleKind==="pad"?s&&e.blockSameNetObstacles?e.sameNetObstacleClearance??e.obstacleClearance??this.clearance:e.obstacleClearance??this.clearance:this.clearance,A=e.width/2+a;return i.exactShape?.type==="segment"?GSe(e.start,e.end,i.exactShape.start,i.exactShape.end)<=A+i.exactShape.width/2+1e-9:i.exactShape?.type==="polygon"?YSe(e.start,e.end,i.exactShape.points)<=A+1e-9:i.exactShape?.type==="circle"?bN(i.exactShape.center,e.start,e.end)<=A+i.exactShape.radius+1e-9:h7t(e.start,e.end,{minX:i.minX-A,minY:i.minY-A,maxX:i.maxX+A,maxY:i.maxY+A})}itemCopperTouches(t,e,n){return t.exactShape?.type==="segment"?GSe(e.start,e.end,t.exactShape.start,t.exactShape.end)<=n+t.exactShape.width/2+1e-9:t.exactShape?.type==="polygon"?YSe(e.start,e.end,t.exactShape.points)<=n+1e-9:t.exactShape?.type==="circle"?bN(t.exactShape.center,e.start,e.end)<=n+t.exactShape.radius+1e-9:h7t(e.start,e.end,{minX:t.minX-n,minY:t.minY-n,maxX:t.maxX+n,maxY:t.maxY+n})}isOutsideBounds(t){const e=t.width/2+this.boardEdgeClearance;return Math.min(t.start.x,t.end.x)-e<this.bounds.minX||Math.max(t.start.x,t.end.x)+e>this.bounds.maxX||Math.min(t.start.y,t.end.y)-e<this.bounds.minY||Math.max(t.start.y,t.end.y)+e>this.bounds.maxY}},f7t=[{x:0,y:0},{x:.5,y:0},{x:0,y:.5},{x:.5,y:.5}],dB=t=>t?.route_type==="wire",pH=class extends BN{inputProblem;traces;corridor;phase="scan-corridor";corridorCursor=0;blockerCursor=0;offsetCursor=0;resolutionCursor=0;attemptedGridCount=0;blockerIndex;connectionNameResolver;connectionByTraceId=new Map;mutableTraceIndices;blockersByTrace=new Map;blockers=[];currentBlocker=null;currentRange=null;currentTraceWidth=0;gridResolutions=[];currentObstacleIndex=null;output=null;constructor(t,e=new Tv(t.simpleRouteJson,t.traces)){super(),this.inputProblem=structuredClone(t),this.traces=structuredClone(t.traces),this.corridor=structuredClone(t.corridor),this.mutableTraceIndices=t.mutableTraceIndices?new Set(t.mutableTraceIndices):null,this.connectionNameResolver=e,this.blockerIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,t.powerTraceIndex,[],this.connectionNameResolver),this.activeSubSolver=null,this.MAX_ITERATIONS=25e3,this.stats=this.createStats()}getSolverName(){return"LocalTraceInflationSolver"}_step(){if(this.activeSubSolver)return this.stepActiveSubSolver(),void(this.stats=this.createStats());switch(this.phase){case"scan-corridor":this.scanNextCorridorSegment();break;case"select-blocker":this.selectNextBlocker();break;case"try-elastic-push":break;case"try-grid-candidate":this.startNextGridCandidate();break;case"complete":this.output?this.solved=!0:(this.failed=!0,this.error="No locally reroutable trace blocks the power corridor")}this.stats=this.createStats()}scanNextCorridorSegment(){const t=this.corridor[this.corridorCursor];if(!t)return this.blockers=[...this.blockersByTrace.values()].sort((o,i)=>o.traceIndex-i.traceIndex),void(this.phase="select-blocker");const e=this.traces[this.inputProblem.powerTraceIndex],n=this.blockerIndex.findCollisions({start:t.start,end:t.end,layer:t.layer,width:t.width,connectionNames:e?this.getTraceConnectionNames(e):[]});for(const o of n)this.recordBlockingTrace(o);this.corridorCursor++}recordBlockingTrace(t){if(t.kind!=="trace"||t.traceIndex===void 0||t.routeStartIndex===void 0||t.routeEndIndex===void 0||t.traceIndex===this.inputProblem.powerTraceIndex||this.mutableTraceIndices!==null&&!this.mutableTraceIndices.has(t.traceIndex))return;const e=this.traces[t.traceIndex];if(!e)return;const n=this.findConnectionForTrace(e);if((n?this.resolveNominalTraceWidth(n):this.getTraceNominalWidth(e))>=(this.inputProblem.pushOnlyNominalWidthsBelow??this.inputProblem.nominalPowerWidth)-Ki)return;const o=this.blockersByTrace.get(t.traceIndex);if(o)return o.firstRouteIndex=Math.min(o.firstRouteIndex,t.routeStartIndex),void(o.lastRouteIndex=Math.max(o.lastRouteIndex,t.routeEndIndex));this.blockersByTrace.set(t.traceIndex,{traceIndex:t.traceIndex,firstRouteIndex:t.routeStartIndex,lastRouteIndex:t.routeEndIndex})}selectNextBlocker(){if(this.currentBlocker=this.blockers[this.blockerCursor]??null,!this.currentBlocker)return void(this.phase="complete");const t=this.findStableAnchorRange(this.currentBlocker);if(!t)return void this.blockerCursor++;const e=this.traces[this.currentBlocker.traceIndex];this.currentRange=t,this.currentTraceWidth=this.getRangeWidth(e,t),this.gridResolutions=this.getGridResolutions(this.currentTraceWidth),this.resolutionCursor=0,this.offsetCursor=0,this.currentObstacleIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,this.currentBlocker.traceIndex,this.createInflatedCorridorItems(),this.connectionNameResolver),this.activeSubSolver=new USe({trace:e,range:t,layer:e.route[t.startIndex].layer,traceWidth:this.currentTraceWidth,corridor:this.corridor,obstacleIndex:this.currentObstacleIndex,connectionNames:this.getTraceConnectionNames(e)}),this.phase="try-elastic-push"}findStableAnchorRange(t){const e=this.traces[t.traceIndex];if(!e)return null;let n=t.firstRouteIndex,o=t.lastRouteIndex;for(;n>0;){const A=e.route[n];if(dB(A)&&this.pointClearsCorridor(A))break;n--}for(;o<e.route.length-1;){const A=e.route[o];if(dB(A)&&this.pointClearsCorridor(A))break;o++}const i=e.route[n],r=e.route[o];if(!dB(i)||!dB(r)||i.layer!==r.layer||!this.pointClearsCorridor(i)||!this.pointClearsCorridor(r)||n>=o)return null;const s={startIndex:n,endIndex:o},a=this.getRangeLength(e,s);return!Number.isFinite(a)||a>(this.inputProblem.maxRerouteLength??10)+Ki?null:s}pointClearsCorridor(t){return this.corridor.every(e=>{if(e.layer!==t.layer)return!0;const n=e.width/2+t.width/2+this.blockerIndex.clearance;return bN(t,e.start,e.end)>=n-Ki})}startNextGridCandidate(){if(!this.currentBlocker||!this.currentRange)return void(this.phase="select-blocker");if(this.resolutionCursor>=this.gridResolutions.length)return this.blockerCursor++,void(this.phase="select-blocker");if(this.offsetCursor>=f7t.length)return this.resolutionCursor++,void(this.offsetCursor=0);const t=this.traces[this.currentBlocker.traceIndex],e=t.route[this.currentRange.startIndex],n=t.route[this.currentRange.endIndex];if(!dB(e)||!dB(n))return this.blockerCursor++,void(this.phase="select-blocker");const o=this.gridResolutions[this.resolutionCursor],i=f7t[this.offsetCursor],r=this.currentObstacleIndex;if(!r)return this.blockerCursor++,void(this.phase="select-blocker");this.attemptedGridCount++,this.activeSubSolver=new Ice({start:e,end:n,layer:e.layer,traceWidth:this.currentTraceWidth,gridSize:o,gridOffset:{x:i.x*o,y:i.y*o},connectionNames:this.getTraceConnectionNames(t),obstacleIndex:r,ignoreTraceIndex:this.currentBlocker.traceIndex,ignoreRouteRange:{start:this.currentRange.startIndex,end:this.currentRange.endIndex},bounds:this.inputProblem.simpleRouteJson.bounds,searchPadding:th(2.5*this.inputProblem.nominalPowerWidth,1.5,4)})}stepActiveSubSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput();if(e)return this.applyRoute(e,t instanceof USe?"elastic":"grid"),this.activeSubSolver=null,void(this.phase="complete")}this.failedSubSolvers??=[],this.failedSubSolvers.push(t),this.activeSubSolver=null,t instanceof USe?this.phase="try-grid-candidate":this.offsetCursor++}}applyRoute(t,e){const n=this.currentBlocker,o=this.currentRange,i=this.traces[n.traceIndex],r=i.route[o.startIndex],s=i.route[o.endIndex],a=t.points.map(A=>({route_type:"wire",x:A.x,y:A.y,width:this.currentTraceWidth,layer:r.layer}));a[0].width=Math.max(a[0].width,r.width),a[a.length-1].width=Math.max(a[a.length-1].width,s.width),i.route.splice(o.startIndex,o.endIndex-o.startIndex+1,...a),this.output={traces:this.traces,pushedTraceIndex:n.traceIndex,replacedRange:o,strategy:e}}createInflatedCorridorItems(){return this.corridor.flatMap(t=>p7t({start:t.start,end:t.end,width:t.width,base:{layers:[t.layer],kind:"obstacle",connectionNames:[]}}))}getGridResolutions(t){return[th(1.5*t,.1,.3),th(.75*t,.08,.18)].filter((e,n,o)=>o.findIndex(i=>Math.abs(i-e)<Ki)===n)}getRangeWidth(t,e){let n=this.inputProblem.simpleRouteJson.minTraceWidth;for(let o=e.startIndex;o<=e.endIndex;o++){const i=t.route[o];dB(i)&&(n=Math.max(n,i.width))}return n}getRangeLength(t,e){let n=0;for(let o=e.startIndex;o<e.endIndex;o++){const i=t.route[o],r=t.route[o+1];if(!dB(i)||!dB(r)||i.layer!==r.layer)return Number.POSITIVE_INFINITY;n+=Aa(i,r)}return n}resolveNominalTraceWidth(t){return Math.max(t.nominalTraceWidth??t.width??this.inputProblem.simpleRouteJson.nominalTraceWidth??this.inputProblem.simpleRouteJson.minTraceWidth,this.inputProblem.simpleRouteJson.minTraceWidth)}getTraceNominalWidth(t){return t.route.reduce((e,n)=>n.route_type==="wire"?Math.max(e,n.width):e,this.inputProblem.simpleRouteJson.minTraceWidth)}findConnectionForTrace(t){const e=this.connectionByTraceId.get(t.pcb_trace_id);if(e!==void 0)return e??void 0;const n=this.getTraceConnectionNames(t),o=this.inputProblem.simpleRouteJson.connections.find(i=>[i.name,i.source_trace_id,i.rootConnectionName,i.netConnectionName,...i.mergedConnectionNames??[]].filter(r=>!!r).some(r=>n.includes(r)))??null;return this.connectionByTraceId.set(t.pcb_trace_id,o),o??void 0}getTraceConnectionNames(t){return[t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[]].filter(e=>!!e)}createStats(){return{phase:this.phase,corridorSegment:this.corridorCursor,corridorSegmentCount:this.corridor.length,blockingTraceCount:this.blockersByTrace.size,blockerCursor:this.blockerCursor,pushedTraceIndex:this.currentBlocker?.traceIndex,anchorRange:this.currentRange,traceWidth:this.currentTraceWidth,gridSize:this.gridResolutions[this.resolutionCursor],gridOffsetVariant:this.offsetCursor,attemptedGridCount:this.attemptedGridCount}}computeProgress(){return this.phase==="scan-corridor"?this.corridor.length===0?.25:this.corridorCursor/this.corridor.length*.25:this.blockers.length===0?.5:Math.min(.99,.25+this.blockerCursor/this.blockers.length)}getOutput(){return this.output}getConstructorParams(){return[this.inputProblem]}visualize(){const t=[];for(let e=0;e<this.traces.length;e++){const n=this.traces[e];for(let o=0;o<n.route.length-1;o++){const i=n.route[o],r=n.route[o+1];dB(i)&&dB(r)&&i.layer===r.layer&&t.push({points:[i,r],strokeColor:e===this.currentBlocker?.traceIndex?"#1769d2":"#777",strokeWidth:Math.max(i.width,r.width)})}}for(const e of this.corridor)t.push({points:[e.start,e.end],strokeColor:"rgba(255, 128, 0, 0.55)",strokeWidth:e.width});return{coordinateSystem:"cartesian",title:this.getSolverName(),lines:t,points:[],rects:[],circles:[],texts:[]}}},nh=1e-6,QN=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),gb=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i,s=r<=1e-12?0:Math.max(0,Math.min(1,((t.x-e.x)*o+(t.y-e.y)*i)/r));return Math.hypot(t.x-(e.x+s*o),t.y-(e.y+s*i))},Cce=(t,e,n)=>(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),VSe=(t,e,n,o)=>((i,r,s,a)=>{const A=Cce(s,a,i),c=Cce(s,a,r),l=Cce(i,r,s),u=Cce(i,r,a);return(A>0&&c<0||A<0&&c>0)&&(l>0&&u<0||l<0&&u>0)})(t,e,n,o)?0:Math.min(gb(t,n,o),gb(e,n,o),gb(n,t,e),gb(o,t,e)),QW=t=>{const e=(t.ccwRotationDegrees??0)*Math.PI/180,n=Math.cos(e),o=Math.sin(e);return[{x:-t.width/2,y:-t.height/2},{x:t.width/2,y:-t.height/2},{x:t.width/2,y:t.height/2},{x:-t.width/2,y:t.height/2}].map(i=>({x:t.center.x+i.x*n-i.y*o,y:t.center.y+i.x*o+i.y*n}))},mH=t=>{if(!(t.type==="oval"||t.shape==="circle"))return!1;if(Math.abs(t.width-t.height)>nh)throw new Error(`Physical connectivity does not yet support non-circular oval obstacle ${t.obstacleId??"<unknown>"}`);return!0},vW=(t,e)=>{for(let o=0;o<e.length;o++)if(gb(t,e[o],e[(o+1)%e.length])<=nh)return!0;let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o],s=e[i];r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},wW=(t,e)=>{if(mH(e))return Math.max(0,QN(t,e.center)-e.width/2);const n=QW(e);return vW(t,n)?0:Math.min(...n.map((o,i)=>gb(t,o,n[(i+1)%n.length])))},I7t=(t,e)=>{if(mH(t))return mH(e)?Math.max(0,QN(t.center,e.center)-t.width/2-e.width/2):Math.max(0,wW(t.center,e)-t.width/2);if(mH(e))return I7t(e,t);const n=QW(t),o=QW(e);if(vW(n[0],o)||vW(o[0],n))return 0;let i=Number.POSITIVE_INFINITY;for(let r=0;r<n.length;r++)for(let s=0;s<o.length;s++)i=Math.min(i,VSe(n[r],n[(r+1)%n.length],o[s],o[(s+1)%o.length]));return i},yce=(t,e)=>({minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}),xce=t=>({minX:t.x,minY:t.y,maxX:t.x,maxY:t.y}),C7t=t=>{if(mH(t))return yce(xce(t.center),t.width/2);const e=QW(t);return{minX:Math.min(...e.map(n=>n.x)),minY:Math.min(...e.map(n=>n.y)),maxX:Math.max(...e.map(n=>n.x)),maxY:Math.max(...e.map(n=>n.y))}},vN=(t,e)=>{if(!((n,o)=>n.layers.some(i=>o.layers.includes(i)))(t,e)||!((n,o)=>n.maxX+nh>=o.minX&&o.maxX+nh>=n.minX&&n.maxY+nh>=o.minY&&o.maxY+nh>=n.minY)(t.bounds,e.bounds))return!1;if(t.kind==="bridge-pad"){const n={kind:"obstacle",obstacle:t.obstacle,layers:t.layers,bounds:t.bounds};return e.kind==="bridge-pad"?vN(n,{kind:"obstacle",obstacle:e.obstacle,layers:e.layers,bounds:e.bounds}):vN(n,e)}return e.kind==="bridge-pad"?vN(e,t):t.kind==="endpoint"?e.kind==="endpoint"?QN(t.point,e.point)<=nh:e.kind==="obstacle"?wW(t.point,e.obstacle)<=nh:e.kind==="segment"?gb(t.point,e.start,e.end)<=e.width/2+nh:QN(t.point,e.center)<=e.diameter/2+nh:e.kind==="endpoint"?vN(e,t):t.kind==="obstacle"?e.kind==="obstacle"?I7t(t.obstacle,e.obstacle)<=nh:e.kind==="segment"?((n,o,i)=>{if(mH(i))return Math.max(0,gb(i.center,n,o)-i.width/2);const r=QW(i);return vW(n,r)||vW(o,r)?0:Math.min(...r.map((s,a)=>VSe(n,o,s,r[(a+1)%r.length])))})(e.start,e.end,t.obstacle)<=e.width/2+nh:wW(e.center,t.obstacle)<=e.diameter/2+nh:e.kind==="obstacle"?vN(e,t):t.kind==="segment"?e.kind==="segment"?VSe(t.start,t.end,e.start,e.end)<=(t.width+e.width)/2+nh:gb(e.center,t.start,t.end)<=t.width/2+e.diameter/2+nh:e.kind==="segment"?vN(e,t):QN(t.center,e.center)<=(t.diameter+e.diameter)/2+nh},Ago=class{parent;constructor(t){this.parent=Array.from({length:t},(e,n)=>n)}find(t){const e=this.parent[t];if(e===t)return t;const n=this.find(e);return this.parent[t]=n,n}union(t,e){const n=this.find(t),o=this.find(e);n!==o&&(this.parent[o]=n)}},cgo=(t,e)=>{const n=e.indexOf(t.from_layer),o=e.indexOf(t.to_layer);return n<0||o<0?[...new Set([t.from_layer,t.to_layer])]:e.slice(Math.min(n,o),Math.max(n,o)+1)},lgo=t=>[t.pcb_trace_id,t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[],...t.connectsTo??[]].filter(e=>!!e),ugo=t=>[t.name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[],t.netConnectionName,...t.pointsToConnect.flatMap(e=>[e.pointId,e.pcb_port_id])].filter(e=>!!e),ggo=t=>[t.obstacleId,...t.connectedTo,...t.offBoardConnectsTo??[]].filter(e=>!!e),y7t=(t,e,n,o)=>({kind:"bridge-contact",center:{x:t.x,y:t.y},diameter:e,layers:n,bridgeId:o,bounds:yce(xce(t),e/2)}),PW=.01,dgo={"0603":{horizontalWidth:.8,horizontalHeight:.95,centerSpacings:[1.65,1.8]},1206:{horizontalWidth:.6,horizontalHeight:1.6,centerSpacings:[3.2]},"1206x4_pair":{horizontalWidth:.8,horizontalHeight:.5,centerSpacings:[2.7]}},x7t=(t,e,n)=>{if(!t.layer)throw new Error(`Jumper ${n} is missing its layer`);const o=dgo[t.footprint];if(!o)throw new Error(`Unsupported jumper footprint ${String(t.footprint)} on ${n}`);const i=Math.abs(t.end.x-t.start.x),r=Math.abs(t.end.y-t.start.y),s=l=>o.centerSpacings.some(u=>Math.abs(l-u)<PW),a=r<PW&&s(i),A=i<PW&&s(r);if(!a&&!A)throw new Error(`Jumper ${n} does not match ${t.footprint} pad spacing`);const c={type:"rect",center:{...e},width:a?o.horizontalWidth:o.horizontalHeight,height:a?o.horizontalHeight:o.horizontalWidth,layers:[t.layer],connectedTo:[]};return{kind:"bridge-pad",obstacle:c,layers:c.layers,bridgeId:n,bounds:C7t(c)}},hgo=(t,e,n)=>{if(t.layer!==n.layer||e.layer!==n.layer)return!1;const o=(s,a)=>Math.abs(s.x-a.x)<PW&&Math.abs(s.y-a.y)<PW,i=o(t,n.start)&&o(e,n.end),r=o(t,n.end)&&o(e,n.start);return i||r},pgo=(t,e,n,o)=>{const i=[],r=t.route.flatMap((A,c)=>A.route_type==="jumper"?[{routePoint:A,routePointIndex:c}]:[]),s=new Map;for(const A of r){const c=[];for(let u=1;u<t.route.length;u++){const g=t.route[u-1],h=t.route[u];g?.route_type==="wire"&&h?.route_type==="wire"&&hgo(g,h,A.routePoint)&&c.push(u)}if(c.length!==1)throw new Error(`Jumper ${t.pcb_trace_id}:${A.routePointIndex} matched ${c.length} placeholder wire segments`);const l=c[0];if(s.has(l))throw new Error(`Multiple jumpers matched placeholder segment ${l} on ${t.pcb_trace_id}`);s.set(l,A)}let a;for(let A=0;A<t.route.length;A++){const c=t.route[A];if(c.route_type==="wire"){if(a&&a.layer===c.layer&&QN(a,c)>nh){const u=a;if(!s.get(A)){const g=u.width/2;i.push({kind:"segment",start:{x:u.x,y:u.y},end:{x:c.x,y:c.y},width:u.width,layers:[u.layer],bounds:yce({minX:Math.min(u.x,c.x),minY:Math.min(u.y,c.y),maxX:Math.max(u.x,c.x),maxY:Math.max(u.y,c.y)},g)})}}a=c;continue}if(a=void 0,c.route_type==="via"){const u=t.route[A-1],g=t.route[A+1];for(const d of[u,g])if(d?.route_type==="wire"&&QN(d,c)>nh)throw new Error(`Via ${t.pcb_trace_id}:${A} is adjacent to a non-colocated wire endpoint`);const h=c.via_diameter??n;i.push({kind:"via",center:{x:c.x,y:c.y},diameter:h,layers:cgo(c,e),bounds:yce(xce(c),h/2)});continue}const l=`${t.pcb_trace_id}:${A}:${c.route_type}`;if(c.route_type==="jumper"){i.push(x7t(c,c.start,l),x7t(c,c.end,l));continue}if(c.route_type==="through_obstacle"){if(!o.find(u=>u.layers.includes(c.from_layer)&&u.layers.includes(c.to_layer)&&wW(c.start,u)<=nh&&wW(c.end,u)<=nh))throw new Error(`Through-obstacle marker ${l} has no same-net multilayer obstacle witness`);i.push(y7t(c.start,0,[c.from_layer],l),y7t(c.end,0,[c.to_layer],l));continue}throw new Error(`Unsupported route primitive: ${String(c.route_type)}`)}return i},E7t=(t,e,n)=>{const o=t.pointsToConnect[n];return o.pointId??o.pcb_port_id??`${t.name}[${e}:${n}]`},B7t=t=>{const e={},n={},o=[];for(let i=0;i<t.connections.length;i++){const r=t.connections[i];for(let s=0;s<r.pointsToConnect.length;s++){const a=`${i}:${s}`;e[a]=E7t(r,i,s),n[a]=a,o.push([a])}}return{endpointCount:Object.keys(e).length,endpointLabels:e,componentByEndpointKey:n,endpointComponents:o}},Ece=t=>{if(t===null||typeof t!="object")return JSON.stringify(t)??String(t);if(Array.isArray(t))return`[${t.map(n=>Ece(n)).join(",")}]`;const e=t;return`{${Object.keys(e).sort().map(n=>`${JSON.stringify(n)}:${Ece(e[n])}`).join(",")}}`},b7t=(t,e)=>{const n=new Tv(t,e,{includePhysicalPositionAliases:!0}),o=(i=t.layerCount)<=1?["top"]:i===2?["top","bottom"]:["top",...Array.from({length:i-2},(g,h)=>`inner${h+1}`),"bottom"];var i;const r=(g=>{const h=g.min_via_hole_diameter??g.minViaHoleDiameter??0;return Math.max(h,g.min_via_pad_diameter??g.minViaPadDiameter??g.minViaDiameter??.6)})(t),s=new Map,a=new Map,A={},c=(g,h)=>{const d=s.get(g)??[];d.push(h),s.set(g,d)};for(let g=0;g<t.connections.length;g++){const h=t.connections[g],d=n.canonicalize(ugo(h));if(d.length!==1)throw new Error(`Connection ${h.name} resolved to ${d.length} canonical nets`);for(let p=0;p<h.pointsToConnect.length;p++){const m=h.pointsToConnect[p],_=`${g}:${p}`,f=E7t(h,g,p);A[_]=f;const I={kind:"endpoint",endpointKey:_,endpointLabel:f,point:{x:m.x,y:m.y},layers:m.layers??[m.layer],bounds:xce(m)};for(const C of d)c(C,I)}}for(const g of t.obstacles){const h={kind:"obstacle",obstacle:g,layers:g.layers,bounds:C7t(g)};for(const d of n.canonicalize(ggo(g))){const p=a.get(d)??[];p.push(g),a.set(d,p),s.has(d)&&c(d,h)}}for(const g of[...e,...t.fixedTraces??[]]){const h=n.canonicalize(lgo(g));if(h.length!==1)throw new Error(`Trace ${g.pcb_trace_id} resolved to ${h.length} canonical nets`);const d=a.get(h[0])??[],p=pgo(g,o,r,d);for(const m of h)if(s.has(m))for(const _ of p)c(m,_)}const l={},u=[];for(const g of s.values()){const h=new Ago(g.length),d=new Map;for(let _=0;_<g.length;_++){const f=g[_];if(f.kind!=="bridge-contact"&&f.kind!=="bridge-pad")continue;const I=d.get(f.bridgeId);I===void 0?d.set(f.bridgeId,_):h.union(I,_)}const p=g.length>0?new X4(g.length):null;if(p){for(const _ of g)p.add(_.bounds.minX,_.bounds.minY,_.bounds.maxX,_.bounds.maxY);p.finish()}for(let _=0;_<g.length;_++){const f=g[_],I=p?.search(f.bounds.minX-nh,f.bounds.minY-nh,f.bounds.maxX+nh,f.bounds.maxY+nh)??[];for(const C of I)C<=_||vN(f,g[C])&&h.union(_,C)}const m=new Map;for(let _=0;_<g.length;_++){const f=g[_];if(f.kind!=="endpoint")continue;const I=h.find(_),C=m.get(I)??[];C.push(f.endpointKey),m.set(I,C)}for(const _ of m.values()){_.sort();const f=_[0];u.push(_);for(const I of _){if(l[I]!==void 0)throw new Error(`Endpoint ${I} was assigned to multiple canonical nets`);l[I]=f}}}return u.sort(([g=""],[h=""])=>g.localeCompare(h)),{endpointCount:Object.keys(A).length,endpointLabels:A,componentByEndpointKey:l,endpointComponents:u}},Bce=class{baseline;inputProblem;baselineCaptureError;baselineTraceSignature;constructor(e,n){this.inputProblem=e,this.baselineTraceSignature=Ece(n);try{this.baseline=b7t(e,n),this.baselineCaptureError=null}catch(o){this.baseline=B7t(e),this.baselineCaptureError=o instanceof Error?o.message:String(o)}}validate(e){if(this.baselineCaptureError){const i=Ece(e)===this.baselineTraceSignature;return{safe:i,candidate:this.baseline,regressions:[],validationError:i?`Connectivity validation is limited to exact trace preservation: ${this.baselineCaptureError}`:`Connectivity validation failed closed: ${this.baselineCaptureError}`}}let n;try{n=b7t(this.inputProblem,e)}catch(i){return{safe:!1,candidate:B7t(this.inputProblem),regressions:[],validationError:`Connectivity validation failed closed: ${i instanceof Error?i.message:String(i)}`}}const o=[];for(const i of this.baseline.endpointComponents){if(i.length<2)continue;const r=new Map;for(const s of i){const a=n.componentByEndpointKey[s]??`missing:${s}`,A=r.get(a)??[];A.push(s),r.set(a,A)}r.size<=1||o.push({baselineEndpointKeys:[...i],baselineEndpointLabels:i.map(s=>this.baseline.endpointLabels[s]),candidateComponents:[...r.values()]})}return{safe:o.length===0,candidate:n,regressions:o}}},S7t=[{x:0,y:0},{x:.5,y:.5}],mgo=[.15,.2,.25,.3,.4,.5],jA=t=>t?.route_type==="wire",zSe=t=>t?.route_type==="via",_go=Array.from({length:24},(t,e)=>{const n=e*Math.PI/12;return{x:Math.cos(n),y:Math.sin(n)}}),_H=t=>[...new Set(t.map(e=>Number(e.toFixed(6))))].sort((e,n)=>n-e),JSe=class extends BN{inputProblem;traces;obstacleIndex;phase="repair-vias";traceCursor=0;routeCursor=0;candidateCursor=0;clearanceTierCursor=0;attemptedCandidateCount=0;attemptedClearanceShoveCount=0;attemptedViaGridCount=0;committedClearanceShoveCount=0;viaPairCountRemoved=0;viaCountRemoved=0;simplifiedPathCount=0;normalizedSegmentCount=0;achievedExtraClearanceCount=0;relocatedViaCount=0;unresolvedViaCount=0;attemptedPushedViaRepairCount=0;committedPushedViaRepairCount=0;padClearanceRerouteCount=0;unresolvedPadClearanceCount=0;initialPadClearanceViolationCount=0;remainingPadClearanceViolationCount=0;initialPadClearanceViolationCountByClearance={};remainingPadClearanceViolationCountByClearance={};budgetLimited=!1;connectivityValidationCount=0;connectivityRollbackCount=0;connectivityRegressionEndpointIds=[];connectivityValidationError=null;connectivityRollbackMutationStats=null;connectionNameResolver;connectionByTraceId=new Map;connectivityInvariant;initialConnectivitySafeTraces;mutableTraceIndices;mutableTraceIndexSet;viaRepairTraceIndices;traceIndices;maxRerouteLength;clearancePaddingTiers;desiredPadClearance;initialTraceLengths=new Map;candidates=[];candidateShoveCount=0;rollbackTraces=null;baseCandidateValidated=!1;activeShovePadding=0;viaGridAttempt=null;candidateSetMayUseGridFallback=!1;pendingPushedViaRepair=null;alternatePushedViaRepairs=[];pushedViaRepairRollbackTraces=null;connectivityFinalized=!1;finalizedMutatedTraceIndices=[];resumePhase="scan-via-pairs";constructor(t){super(),this.inputProblem=structuredClone(t),this.traces=structuredClone(t.traces),this.initialConnectivitySafeTraces=structuredClone(t.traces),this.connectivityInvariant=new Bce(this.inputProblem.simpleRouteJson,this.initialConnectivitySafeTraces),this.connectionNameResolver=new Tv(t.simpleRouteJson,this.traces),this.maxRerouteLength=t.maxRerouteLength??10,this.desiredPadClearance=t.desiredPadClearance,this.clearancePaddingTiers=_H([...t.clearancePaddingTiers??[.1,.05,0],0]).filter(i=>i>=0);const e=this.traces.map((i,r)=>r),n=(i,r,s)=>{const a=[...new Set(i??s)];for(const A of a)if(!Number.isInteger(A)||A<0||A>=this.traces.length)throw new RangeError(`Invalid cleanup ${r} index: ${A}`);return a},o=n(t.traceIndices,"trace",e);this.viaRepairTraceIndices=n(t.viaRepairTraceIndices,"via repair trace",o),this.mutableTraceIndices=n(t.mutableTraceIndices,"mutable trace",o),this.mutableTraceIndexSet=new Set(this.mutableTraceIndices),this.traceIndices=o.filter(i=>this.resolveNominalTraceWidth(this.traces[i])>=.499999);for(const i of this.traceIndices)this.initialTraceLengths.set(i,this.measureTraceLength(this.traces[i]));this.obstacleIndex=this.createObstacleIndex(),this.initialPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCount=this.initialPadClearanceViolationCount,this.initialPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),this.remainingPadClearanceViolationCountByClearance={...this.initialPadClearanceViolationCountByClearance},this.activeSubSolver=null,this.MAX_ITERATIONS=1e6,this.stats=this.createStats()}getSolverName(){return"PowerTraceCleanupSolver"}_step(){if(this.activeSubSolver)return this.stepActiveShoveSolver(),void(this.stats=this.createStats());switch(this.phase){case"repair-vias":this.repairNextVia();break;case"scan-via-pairs":this.scanNextViaPair();break;case"scan-pad-clearance":this.scanNextPadClearance();break;case"scan-simplification":this.scanNextSimplification();break;case"evaluate-candidate":this.evaluateCurrentCandidate();break;case"shove-clearance":break;case"route-via-pair":this.startNextViaGridCandidate();break;case"complete":this.ensureConnectivitySafeOutput(),this.solved=!0}this.stats=this.createStats()}repairNextVia(){const t=this.viaRepairTraceIndices[this.traceCursor],e=t===void 0?void 0:this.traces[t];if(!e)return this.traceCursor=0,this.routeCursor=0,this.phase="scan-via-pairs",void this.rebuildObstacleIndex();const n=e.route.findIndex((c,l)=>l>=this.routeCursor&&zSe(c));if(n===-1)return this.traceCursor++,void(this.routeCursor=0);this.routeCursor=n+1;const o=e.route[n],i=e.route[n-1],r=e.route[n+1];if(!zSe(o)||!jA(i)||!jA(r))return;const s=this.getTraceConnectionNames(e),a=this.getBaseObstacleClearance();if(!this.obstacleIndex.collidesVia({point:o,layers:this.obstacleIndex.boardLayers,padDiameter:o.via_diameter??.6,holeDiameter:o.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter,connectionNames:s,ignoreTraceIndex:t,ignoreRouteRange:{start:n,end:n},obstacleClearance:a,blockSameNetObstacles:!0,sameNetObstacleClearance:0}))return;const A=this.findViaRepair(e,n,a);if(!A){const c=this.findPushableViaRepairs(e,n,a),l=c.shift();return l?(this.alternatePushedViaRepairs=c,void this.startPushedViaRepair(l)):void this.unresolvedViaCount++}e.route.splice(A.startIndex,A.endIndex-A.startIndex+1,...A.route),this.relocatedViaCount++,this.routeCursor=A.startIndex+A.route.length,this.rebuildObstacleIndex()}findViaRepair(t,e,n){const o=this.createViaRepairContext(t,e);if(!o)return null;const i=o.candidates.map(r=>({point:r,movedLength:Aa(o.leftAnchor,r)+Aa(r,o.rightAnchor)})).filter(({movedLength:r})=>r<=o.originalLength+Math.min(6,this.maxRerouteLength)+Ki);i.sort((r,s)=>r.movedLength-s.movedLength||Aa(r.point,o.via)-Aa(s.point,o.via));for(const r of i)if(this.isViaRepairPointSafe(o,r.point,n))return this.createViaRepairReplacement(o,r.point);return null}findPushableViaRepairs(t,e,n){const o=this.viaRepairTraceIndices[this.traceCursor];if(o===void 0)return[];const i=this.createViaRepairContext(t,e);if(!i)return[];const r=i.candidates.flatMap(s=>{const a=Aa(i.leftAnchor,s)+Aa(s,i.rightAnchor);if(a>i.originalLength+Math.min(6,this.maxRerouteLength)+Ki)return[];const A=new Set,c=this.getViaRepairCollisionQueries(i,s,n);for(const u of c)for(const g of this.obstacleIndex.findCollisions(u)){if(g.kind!=="trace"||g.traceIndex===void 0||g.traceIndex===o||!this.mutableTraceIndexSet.has(g.traceIndex))return[];A.add(g.traceIndex)}if(A.size===0||A.size>2)return[];const l=[...A];return this.isViaRepairPointSafe(i,s,n,l)?[{point:s,movedLength:a,blockerCount:A.size,blockerKey:[...A].sort((u,g)=>u-g).join(",")}]:[]});return r.sort((s,a)=>s.blockerCount-a.blockerCount||s.movedLength-a.movedLength||Aa(s.point,i.via)-Aa(a.point,i.via)),[...new Map([...r].reverse().map(s=>[s.blockerKey,s])).values(),...r].filter((s,a,A)=>A.findIndex(c=>c.point.x===s.point.x&&c.point.y===s.point.y)===a).slice(0,12).map(s=>({traceIndex:o,viaIndex:e,point:s.point,padClearance:n,corridor:[{start:i.leftAnchor,end:s.point,layer:i.leftWire.layer,width:i.leftWire.width},{start:s.point,end:i.rightAnchor,layer:i.rightWire.layer,width:i.rightWire.width},...this.obstacleIndex.boardLayers.map(a=>({start:s.point,end:s.point,layer:a,width:i.viaDiameter}))]}))}createViaRepairContext(t,e){const n=t.route[e],o=t.route[e-1],i=t.route[e+1];if(!zSe(n)||!jA(o)||!jA(i))return null;const r=e-1==0||!jA(t.route[e-2]),s=e+1===t.route.length-1||!jA(t.route[e+2]),a=r?o:t.route[e-2],A=s?i:t.route[e+2],c=Aa(a,n)+Aa(n,A),l=this.getTraceConnectionNames(t),u=n.via_diameter??.6,g=n.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter,h=Math.max(.3,g+this.obstacleIndex.minViaHoleEdgeToViaHoleEdgeClearance+.05),d=[h,h+.15,h+.3,h+.5,h+.75,h+1,h+1.5,h+2].flatMap(m=>_go.map(_=>({x:.025*Math.round((n.x+_.x*m)/.025),y:.025*Math.round((n.y+_.y*m)/.025)}))),p=[...d,...d.flatMap(m=>[{x:m.x,y:Math.floor(10*n.y)/10},{x:m.x,y:Math.ceil(10*n.y)/10},{x:Math.floor(10*n.x)/10,y:m.y},{x:Math.ceil(10*n.x)/10,y:m.y}])].filter((m,_,f)=>f.findIndex(I=>I.x===m.x&&I.y===m.y)===_);return{trace:t,viaIndex:e,via:n,leftWire:o,rightWire:i,leftIsEndpoint:r,rightIsEndpoint:s,leftAnchor:a,rightAnchor:A,originalLength:c,connectionNames:l,viaDiameter:u,holeDiameter:g,ignoreRouteRange:{start:Math.max(0,e-2),end:Math.min(t.route.length-1,e+2)},candidates:p}}getViaRepairCollisionQueries(t,e,n,o){const i=this.viaRepairTraceIndices[this.traceCursor],r={connectionNames:t.connectionNames,ignoreTraceIndex:i,ignoreTraceIndices:o,ignoreRouteRange:t.ignoreRouteRange,obstacleClearance:n};return[...this.obstacleIndex.boardLayers.map(s=>({...r,start:e,end:e,layer:s,width:t.viaDiameter,blockSameNetObstacles:!0,sameNetObstacleClearance:0})),{...r,start:t.leftAnchor,end:e,layer:t.leftWire.layer,width:t.leftWire.width},{...r,start:e,end:t.rightAnchor,layer:t.rightWire.layer,width:t.rightWire.width}]}isViaRepairPointSafe(t,e,n,o){const i=this.viaRepairTraceIndices[this.traceCursor];return!this.obstacleIndex.collidesVia({point:e,layers:this.obstacleIndex.boardLayers,padDiameter:t.viaDiameter,holeDiameter:t.holeDiameter,connectionNames:t.connectionNames,ignoreTraceIndex:i,ignoreTraceIndices:o,ignoreRouteRange:{start:t.viaIndex,end:t.viaIndex},obstacleClearance:n,blockSameNetObstacles:!0,sameNetObstacleClearance:0})&&!this.getViaRepairCollisionQueries(t,e,n,o).slice(this.obstacleIndex.boardLayers.length).some(r=>this.obstacleIndex.collides(r))}createViaRepairReplacement(t,e){const n={...t.leftWire,...e},o={...t.via,...e},i={...t.rightWire,...e};return{startIndex:t.viaIndex-1,endIndex:t.viaIndex+1,route:[...t.leftIsEndpoint?[t.leftWire]:[],n,o,i,...t.rightIsEndpoint?[t.rightWire]:[]]}}startPushedViaRepair(t){this.pendingPushedViaRepair=t,this.pushedViaRepairRollbackTraces=structuredClone(this.traces),this.attemptedPushedViaRepairCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem.simpleRouteJson,traces:this.traces,powerTraceIndex:t.traceIndex,nominalPowerWidth:Math.max(...t.corridor.map(e=>e.width)),pushOnlyNominalWidthsBelow:Number.POSITIVE_INFINITY,mutableTraceIndices:this.mutableTraceIndices,corridor:t.corridor,maxRerouteLength:this.maxRerouteLength},this.connectionNameResolver)}finishPushedViaRepairSolver(t){const e=this.pendingPushedViaRepair;if(this.activeSubSolver=null,!e)return;if(t.solved){const o=t.getOutput();if(o){this.traces=o.traces,this.rebuildObstacleIndex();const i=this.traces[e.traceIndex],r=i?this.createViaRepairContext(i,e.viaIndex):null;if(r&&this.isViaRepairPointSafe(r,e.point,e.padClearance)){const s=this.createViaRepairReplacement(r,e.point);return i.route.splice(s.startIndex,s.endIndex-s.startIndex+1,...s.route),this.relocatedViaCount++,this.committedPushedViaRepairCount++,this.routeCursor=s.startIndex+s.route.length,this.pendingPushedViaRepair=null,this.alternatePushedViaRepairs=[],this.pushedViaRepairRollbackTraces=null,void this.rebuildObstacleIndex()}}}this.pushedViaRepairRollbackTraces&&(this.traces=this.pushedViaRepairRollbackTraces),this.pendingPushedViaRepair=null,this.pushedViaRepairRollbackTraces=null;const n=this.alternatePushedViaRepairs.shift();if(n)return this.rebuildObstacleIndex(),void this.startPushedViaRepair(n);this.alternatePushedViaRepairs=[],this.unresolvedViaCount++,this.rebuildObstacleIndex()}scanNextViaPair(){const t=this.traceIndices[this.traceCursor];if(t===void 0)return this.traceCursor=0,this.routeCursor=0,void(this.phase="scan-pad-clearance");const e=this.traces[t],n=e.route.findIndex((_,f)=>f>=this.routeCursor&&_.route_type==="via");if(n===-1)return void this.advanceTrace();const o=e.route.slice(n+1).findIndex(_=>_.route_type==="via");if(o===-1)return void this.advanceTrace();const i=n-1,r=n+1+o+1,s=e.route[i],a=e.route[r];if(this.routeCursor=n+1,!jA(s)||!jA(a)||s.layer!==a.layer||Aa(s,a)>this.maxRerouteLength+Ki)return;const A=this.createCandidates({kind:"via-pair",traceIndex:t,startIndex:i,endIndex:r}),c=A[0]?.width??Math.max(s.width,a.width),l=A[0]?.padClearance??this.getCandidatePadClearance("via-pair",t,i,r),u=_=>{const f=e.route[_];return!!jA(f)&&this.obstacleIndex.findCollisions({start:f,end:f,layer:f.layer,width:c,connectionNames:this.getTraceConnectionNames(e),ignoreTraceIndex:t,ignoreRouteRange:{start:Math.max(0,i-1),end:Math.min(e.route.length-1,r+1)},obstacleClearance:l}).some(I=>I.kind==="obstacle"&&I.obstacleKind==="pad")},g=e.route[i-1],h=e.route[r+1],d=A.length>0&&u(i)&&jA(g)&&g.layer===s.layer?i-1:i,p=A.length>0&&u(r)&&jA(h)&&h.layer===a.layer?r+1:r,m=[{startIndex:i,endIndex:r},{startIndex:d,endIndex:r},{startIndex:i,endIndex:p},{startIndex:d,endIndex:p}].filter((_,f,I)=>I.findIndex(C=>C.startIndex===_.startIndex&&C.endIndex===_.endIndex)===f).flatMap(_=>_.startIndex===i&&_.endIndex===r?A:this.createCandidates({kind:"via-pair",traceIndex:t,startIndex:_.startIndex,endIndex:_.endIndex}));m.length!==0&&this.beginCandidates(m,"scan-via-pairs",!0)}scanNextPadClearance(){const t=this.traceIndices[this.traceCursor];if(t===void 0)return this.traceCursor=0,this.routeCursor=0,void(this.phase="scan-simplification");const e=this.traces[t];if(this.resolveNominalTraceWidth(e)<.499999)return void this.advanceTrace();const n=this.routeCursor,o=e.route[n],i=e.route[n+1];if(!jA(o)||!jA(i)||o.layer!==i.layer)return void(n>=e.route.length-1?this.advanceTrace():this.routeCursor++);if(this.routeCursor++,!this.segmentHasPadClearanceViolation(t,n))return;const r=this.getPadClearanceIntervals(e,n).flatMap(s=>this.getImprovedPadClearanceTiers(t,s.startIndex,s.endIndex).flatMap(a=>this.createCandidates({kind:"pad-clearance",traceIndex:t,startIndex:s.startIndex,endIndex:s.endIndex,padClearance:a}).slice(0,8)));r.length!==0?this.beginCandidates(r.slice(0,72),"scan-pad-clearance",!0):this.unresolvedPadClearanceCount++}segmentHasPadClearanceViolation(t,e){const n=this.traces[t],o=n.route[e],i=n.route[e+1];return!(!jA(o)||!jA(i)||o.layer!==i.layer)&&this.obstacleIndex.findCollisions({start:o,end:i,layer:o.layer,width:Math.max(o.width,i.width),connectionNames:this.getTraceConnectionNames(n),ignoreTraceIndex:t,ignoreRouteRange:{start:Math.max(0,e-1),end:Math.min(n.route.length-1,e+2)},obstacleClearance:this.getPadClearanceForTrace(n)}).some(r=>r.kind==="obstacle"&&r.obstacleKind==="pad")}getPadClearanceIntervals(t,e){const n=t.route[e];if(!jA(n))return[];const o=[e];let i=0;for(let s=e-1;s>=0;s--){const a=t.route[s],A=t.route[s+1];if(!jA(a)||!jA(A)||a.layer!==n.layer||A.layer!==n.layer||(i+=Aa(a,A),i>this.maxRerouteLength/2+Ki))break;o.push(s)}const r=[e+1];i=0;for(let s=e+1;s<t.route.length-1;s++){const a=t.route[s],A=t.route[s+1];if(!jA(a)||!jA(A)||a.layer!==n.layer||A.layer!==n.layer||(i+=Aa(a,A),i>this.maxRerouteLength/2+Ki))break;r.push(s+1)}return o.flatMap(s=>r.map(a=>({startIndex:s,endIndex:a,length:this.measureRouteRange(t,s,a).length}))).filter(s=>s.length<=this.maxRerouteLength+Ki&&s.startIndex<s.endIndex).sort((s,a)=>a.length-s.length).slice(0,8)}scanNextSimplification(){const t=this.traceIndices[this.traceCursor];if(t===void 0)return this.remainingPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),void(this.phase="complete");const e=this.traces[t],n=this.routeCursor,o=e.route[n];if(!jA(o)||n>=e.route.length-1)return void(n>=e.route.length-1?this.advanceTrace():this.routeCursor++);let i=0;const r=[];for(let a=n+1;a<e.route.length;a++){const A=e.route[a-1],c=e.route[a];if(!jA(A)||!jA(c)||A.layer!==o.layer||c.layer!==o.layer||(i+=Aa(A,c),i>this.maxRerouteLength+Ki))break;const l=this.measureRouteRange(e,n,a);(l.nonOctilinearSegmentCount>0||l.pointCount>3)&&r.push(a)}const s=r.slice(-6).reverse().flatMap(a=>this.createCandidates({kind:"simplification",traceIndex:t,startIndex:n,endIndex:a}));s.length!==0?this.beginCandidates(s,"scan-simplification"):this.routeCursor++}createCandidates({kind:t,traceIndex:e,startIndex:n,endIndex:o,padClearance:i}){const r=this.traces[e],s=r.route[n],a=r.route[o];if(!jA(s)||!jA(a)||s.layer!==a.layer)return[];const A=this.resolveNominalTraceWidth(r),c=this.measureRouteRange(r,n,o),l=i??this.getCandidatePadClearance(t,e,n,o),u=[],g=_7t(s,a);if(t==="pad-clearance"&&KSe([s,a])===0){const d=Aa(s,a);if(d>Ki){const p={x:-(a.y-s.y)/d,y:(a.x-s.x)/d};for(const m of[.25,.5,.75,1,1.5,2])for(const _ of[-1,1])g.push([s,{x:s.x+p.x*m*_,y:s.y+p.y*m*_},{x:a.x+p.x*m*_,y:a.y+p.y*m*_},a])}}const h=new Map(g.map(d=>[d.map(p=>`${p.x.toFixed(6)},${p.y.toFixed(6)}`).join(";"),d]));for(const d of h.values()){const p=SW(d);if(p>this.maxRerouteLength+Ki||t==="pad-clearance"&&p>1.35*c.length+.5||t==="simplification"&&(p>1.1*c.length+Ki||this.measureTraceLength(r)-c.length+p>1.01*(this.initialTraceLengths.get(e)??this.measureTraceLength(r))+Ki))continue;const m=p<=Ki?A:A-c.deficitArea/p;if(m>A+Ki)continue;const _=.05*Math.ceil(Math.max(this.inputProblem.simpleRouteJson.minTraceWidth,m)/.05-Ki),f=_H([A,Math.min(A,_),Math.min(A,Math.max(this.inputProblem.simpleRouteJson.minTraceWidth,m))].map(I=>Math.max(I,s.width)));for(const I of f){const C=this.measureCandidate(d,I,A,a.width,s.width);C.deficitArea>c.deficitArea+Ki||C.conservativeDeficitArea>c.conservativeDeficitArea+Ki||!this.preservesCoverage(C,c)||(t!=="simplification"||c.nonOctilinearSegmentCount!==0||C.pointCount<c.pointCount&&C.length<c.length-Ki)&&u.push({kind:t,traceIndex:e,startIndex:n,endIndex:o,layer:s.layer,points:d,width:I,padClearance:l,originalQuality:c})}}return u.slice(0,18)}beginCandidates(t,e,n=!1){this.candidates=t,this.candidateCursor=0,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.rollbackTraces=null,this.baseCandidateValidated=!1,this.resumePhase=e,this.candidateSetMayUseGridFallback=n,this.phase="evaluate-candidate"}evaluateCurrentCandidate(){const t=this.candidates[this.candidateCursor];if(!t)return void this.finishCandidateSet(!1);if(!this.baseCandidateValidated)return this.candidateCollides(t,0)?this.getPushableTraceIndices(t,0)&&this.candidateShoveCount<2&&this.attemptedClearanceShoveCount<48?void this.startClearanceShove(t,0):void this.advanceCandidate():this.candidateShoveCount>0?void this.applyCandidate(t,0):(this.baseCandidateValidated=!0,void(this.clearanceTierCursor=0));const e=this.clearancePaddingTiers[this.clearanceTierCursor];if(e===void 0||e<=Ki)return void this.applyCandidate(t,0);if(this.attemptedCandidateCount++,!this.candidateCollides(t,e))return void this.applyCandidate(t,e);this.getPushableTraceIndices(t,e)&&this.candidateShoveCount<2&&this.attemptedClearanceShoveCount<48?this.startClearanceShove(t,e):(this.rollbackCandidateShoves(),this.clearanceTierCursor++,this.candidateShoveCount=0)}advanceCandidate(){this.rollbackCandidateShoves(),this.candidateCursor++,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.baseCandidateValidated=!1}candidateCollides(t,e){const n=this.traces[t.traceIndex],o=this.getTraceConnectionNames(n);for(let i=0;i<t.points.length-1;i++){const r=this.getCandidateSegmentWidth(t,i);if(this.obstacleIndex.collides({start:t.points[i],end:t.points[i+1],layer:t.layer,width:r+2*e,connectionNames:o,ignoreTraceIndex:t.traceIndex,ignoreRouteRange:{start:Math.max(0,t.startIndex-1),end:Math.min(n.route.length-1,t.endIndex+1)},obstacleClearance:t.padClearance}))return!0}return!1}getPushableTraceIndices(t,e){const n=this.traces[t.traceIndex],o=this.getTraceConnectionNames(n),i=new Set;for(let r=0;r<t.points.length-1;r++){const s=this.getCandidateSegmentWidth(t,r),a={start:t.points[r],end:t.points[r+1],layer:t.layer,width:s+2*e,connectionNames:o,ignoreTraceIndex:t.traceIndex,ignoreRouteRange:{start:Math.max(0,t.startIndex-1),end:Math.min(n.route.length-1,t.endIndex+1)},obstacleClearance:t.padClearance};if(!this.obstacleIndex.collides(a))continue;const A=this.obstacleIndex.findCollisions(a);if(A.length===0)return null;for(const c of A){if(c.kind!=="trace"||c.traceIndex===void 0||c.traceIndex===t.traceIndex||!this.mutableTraceIndexSet.has(c.traceIndex))return null;const l=this.traces[c.traceIndex];if(!l||this.resolveNominalTraceWidth(l)>=t.width-Ki)return null;i.add(c.traceIndex)}}return i.size>0&&i.size<=2?[...i]:null}startClearanceShove(t,e){this.rollbackTraces??=structuredClone(this.traces),this.activeShovePadding=e;const n=t.width+2*e,o=t.points.slice(0,-1).map((i,r)=>({start:i,end:t.points[r+1],layer:t.layer,width:this.getCandidateSegmentWidth(t,r)+2*e}));this.attemptedClearanceShoveCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem.simpleRouteJson,traces:this.traces,powerTraceIndex:t.traceIndex,nominalPowerWidth:n,pushOnlyNominalWidthsBelow:t.width,mutableTraceIndices:this.mutableTraceIndices,corridor:o,maxRerouteLength:this.maxRerouteLength},this.connectionNameResolver),this.phase="shove-clearance"}getCandidateSegmentWidth(t,e){const n=this.traces[t.traceIndex],o=n.route[t.startIndex],i=n.route[t.endIndex],r=e===0&&jA(o)?o.width:t.width,s=e===t.points.length-2&&jA(i)?i.width:t.width;return Math.max(r,s)}stepActiveShoveSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed)if(this.pendingPushedViaRepair&&t instanceof pH)this.finishPushedViaRepairSolver(t);else if(t instanceof Ice)this.finishViaGridSolver(t);else{if(this.activeSubSolver=null,this.phase="evaluate-candidate",t.solved){const e=t.getOutput();if(e)return this.traces=e.traces,this.candidateShoveCount++,void this.rebuildObstacleIndex()}this.failedSubSolvers??=[],this.failedSubSolvers.push(t),this.rollbackCandidateShoves(),this.activeShovePadding<=Ki?this.advanceCandidate():this.clearanceTierCursor++,this.candidateShoveCount=0}}rollbackCandidateShoves(){this.rollbackTraces&&(this.traces=this.rollbackTraces,this.rollbackTraces=null,this.rebuildObstacleIndex())}applyCandidate(t,e){const n=this.traces[t.traceIndex],o=n.route[t.startIndex],i=n.route[t.endIndex],r=t.points.map((A,c)=>({...c===0?o:c===t.points.length-1?i:{route_type:"wire",layer:t.layer,width:t.width},x:A.x,y:A.y,layer:t.layer,width:c===0?o.width:c===t.points.length-1?i.width:t.width})),s=n.route.slice(t.startIndex,t.endIndex+1),a=t.originalQuality.nonOctilinearSegmentCount;if(n.route.splice(t.startIndex,t.endIndex-t.startIndex+1,...r),t.kind==="via-pair"){const A=s.filter(c=>c.route_type==="via").length;this.viaPairCountRemoved++,this.viaCountRemoved+=A,this.routeCursor=Math.max(0,t.startIndex-1)}else t.kind==="pad-clearance"?(this.padClearanceRerouteCount++,this.routeCursor=t.startIndex+Math.max(1,r.length-1)):(this.simplifiedPathCount++,this.normalizedSegmentCount+=a,this.routeCursor=t.startIndex+Math.max(1,r.length-1));this.committedClearanceShoveCount+=this.candidateShoveCount,e>Ki&&this.achievedExtraClearanceCount++,this.rollbackTraces=null,this.candidateShoveCount=0,this.rebuildObstacleIndex(),this.finishCandidateSet(!0)}finishCandidateSet(t){const e=this.candidates[0],n=_H(this.candidates.filter(i=>i.kind===e?.kind).map(i=>i.width)),o=_H(this.candidates.filter(i=>i.kind===e?.kind&&i.traceIndex===e.traceIndex&&i.startIndex===e.startIndex&&i.endIndex===e.endIndex).map(i=>i.padClearance));if(this.rollbackCandidateShoves(),this.candidates=[],this.candidateCursor=0,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.baseCandidateValidated=!1,!t&&this.candidateSetMayUseGridFallback&&e)return this.candidateSetMayUseGridFallback=!1,void this.beginViaGridAttempt(e,n,o);this.candidateSetMayUseGridFallback=!1,t||this.routeCursor++,this.phase=this.resumePhase}beginViaGridAttempt(t,e,n=[t.padClearance]){this.viaGridAttempt={kind:t.kind,traceIndex:t.traceIndex,startIndex:t.startIndex,endIndex:t.endIndex,layer:t.layer,padClearances:n,padClearanceCursor:0,originalQuality:t.originalQuality,widths:e,widthCursor:0,gridSizes:[],gridSizeCursor:0,offsetCursor:0},this.phase="route-via-pair"}startNextViaGridCandidate(){const t=this.viaGridAttempt;if(!t)return void(this.phase=this.resumePhase);if(t.padClearanceCursor>=t.padClearances.length)return t.kind==="pad-clearance"&&this.unresolvedPadClearanceCount++,this.viaGridAttempt=null,this.routeCursor++,void(this.phase=this.resumePhase);if(t.widthCursor>=t.widths.length)return t.padClearanceCursor++,t.widthCursor=0,t.gridSizes=[],t.gridSizeCursor=0,void(t.offsetCursor=0);const e=t.widths[t.widthCursor],n=t.padClearances[t.padClearanceCursor];if(t.gridSizes.length===0&&(t.gridSizes=_H([th(e/2,.2,.4),th(e/3,.15,.25)])),t.gridSizeCursor>=t.gridSizes.length)return t.widthCursor++,t.gridSizes=[],t.gridSizeCursor=0,void(t.offsetCursor=0);if(t.offsetCursor>=S7t.length)return t.gridSizeCursor++,void(t.offsetCursor=0);const o=this.traces[t.traceIndex],i=o.route[t.startIndex],r=o.route[t.endIndex];if(!jA(i)||!jA(r))return this.viaGridAttempt=null,this.routeCursor++,void(this.phase=this.resumePhase);const s=t.gridSizes[t.gridSizeCursor],a=S7t[t.offsetCursor];this.attemptedViaGridCount++,this.activeSubSolver=new Ice({start:i,end:r,layer:t.layer,traceWidth:e,gridSize:s,gridOffset:{x:a.x*s,y:a.y*s},connectionNames:this.getTraceConnectionNames(o),obstacleIndex:this.obstacleIndex,ignoreTraceIndex:t.traceIndex,ignoreRouteRange:{start:Math.max(0,t.startIndex-1),end:Math.min(o.route.length-1,t.endIndex+1)},bounds:this.inputProblem.simpleRouteJson.bounds,obstacleClearance:n,searchPadding:Math.min(4,Math.max(2,Aa(i,r)/2,3*e)),requireOctilinear:!0})}finishViaGridSolver(t){const e=this.viaGridAttempt;if(this.activeSubSolver=null,t.solved&&e){const n=t.getOutput(),o=this.traces[e.traceIndex];if(n&&o){const i=this.resolveNominalTraceWidth(o),r=this.measureCandidate(n.points,n.traceWidth,i,o.route[e.endIndex].width,o.route[e.startIndex].width);if(r.nonOctilinearSegmentCount===0&&r.length<=this.maxRerouteLength+Ki&&r.deficitArea<=e.originalQuality.deficitArea+Ki&&r.conservativeDeficitArea<=e.originalQuality.conservativeDeficitArea+Ki&&this.preservesCoverage(r,e.originalQuality)){const s={kind:e.kind,traceIndex:e.traceIndex,startIndex:e.startIndex,endIndex:e.endIndex,layer:e.layer,points:n.points,width:n.traceWidth,padClearance:e.padClearances[e.padClearanceCursor],originalQuality:e.originalQuality};return this.viaGridAttempt=null,void this.beginCandidates([s],this.resumePhase,!1)}}}t.failed&&(this.failedSubSolvers??=[],this.failedSubSolvers.push(t)),e&&e.offsetCursor++,this.phase="route-via-pair"}measureRouteRange(t,e,n){const o=this.resolveNominalTraceWidth(t);let i=0,r=0,s=0,a=0,A=0,c=0,l=0;for(let u=e;u<=n;u++){if(jA(t.route[u])&&l++,u>=n)continue;const g=t.route[u],h=t.route[u+1];if(!jA(g)||!jA(h)||g.layer!==h.layer)continue;const d=Aa(g,h);i+=d,r+=d*Math.max(0,o-g.width),g.width>=o-Ki&&(a+=d),s+=d*Math.max(0,o-Math.min(g.width,h.width)),Math.min(g.width,h.width)>=o-Ki&&(A+=d),c+=KSe([g,h])}return{length:i,deficitArea:r,conservativeDeficitArea:s,nominalLength:a,conservativeNominalLength:A,nonOctilinearSegmentCount:c,pointCount:l}}measureTraceLength(t){let e=0;for(let n=0;n<t.route.length-1;n++){const o=t.route[n],i=t.route[n+1];jA(o)&&jA(i)&&o.layer===i.layer&&(e+=Aa(o,i))}return e}measureCandidate(t,e,n,o=e,i=e){const r=SW(t);let s=0,a=0,A=0,c=0;for(let l=0;l<t.length-1;l++){const u=Aa(t[l],t[l+1]),g=l===0?i:e,h=l===t.length-2?o:e,d=Math.min(g,h);s+=u*Math.max(0,n-g),a+=u*Math.max(0,n-d),g>=n-Ki&&(A+=u),d>=n-Ki&&(c+=u)}return{length:r,deficitArea:s,conservativeDeficitArea:a,nominalLength:A,conservativeNominalLength:c,nonOctilinearSegmentCount:KSe(t),pointCount:t.length}}preservesCoverage(t,e){const n=e.length<=Ki?1:e.nominalLength/e.length,o=t.length<=Ki?1:t.nominalLength/t.length,i=e.length<=Ki?1:e.conservativeNominalLength/e.length,r=t.length<=Ki?1:t.conservativeNominalLength/t.length;return!(o+Ki<n||r+Ki<i)&&!(t.length>e.length+Ki&&o<.999999)}advanceTrace(){this.traceCursor++,this.routeCursor=0,this.rebuildObstacleIndex()}createObstacleIndex(){return new ub(this.inputProblem.simpleRouteJson,this.traces,this.phase==="repair-vias"?void 0:this.traceIndices?.[this.traceCursor],[],this.connectionNameResolver)}rebuildObstacleIndex(){this.obstacleIndex=this.createObstacleIndex()}resolveNominalTraceWidth(t){const e=this.findConnectionForTrace(t);return Math.max(e?.nominalTraceWidth??e?.width??this.inputProblem.simpleRouteJson.nominalTraceWidth??this.inputProblem.simpleRouteJson.minTraceWidth,this.inputProblem.simpleRouteJson.minTraceWidth)}getPadClearanceForTrace(t){const e=this.getBaseObstacleClearance();return this.resolveNominalTraceWidth(t)>=.499999?Math.max(e,this.desiredPadClearance??this.resolveNominalTraceWidth(t)/2):e}getBaseObstacleClearance(){return Math.max(this.inputProblem.simpleRouteJson.defaultObstacleMargin??0,this.inputProblem.simpleRouteJson.minTraceToPadEdgeClearance??0,.1)}getCandidatePadClearance(t,e,n,o){const i=this.traces[e],r=this.getBaseObstacleClearance(),s=this.getPadClearanceForTrace(i);if(t==="pad-clearance")return s;const a=t==="via-pair"?Math.min(s,Math.max(r,.15)):s;return this.findExistingPadClearance(e,n,o,r,a)}getImprovedPadClearanceTiers(t,e,n){const o=this.traces[t],i=this.getBaseObstacleClearance(),r=this.getPadClearanceForTrace(o),s=this.findExistingPadClearance(t,e,n,i,r),a=Math.max(.025,Math.min(.05,r/10)),A=[r];for(let c=r-a;c>s+a/2;c-=a)A.push(c);return _H(A).filter(c=>c>s+Ki)}findExistingPadClearance(t,e,n,o,i){if(this.routeRangeHasPadClearanceViolation(t,e,n,o))return o;if(!this.routeRangeHasPadClearanceViolation(t,e,n,i))return i;let r=o,s=i;for(let a=0;a<7;a++){const A=(r+s)/2;this.routeRangeHasPadClearanceViolation(t,e,n,A)?s=A:r=A}return Math.max(o,Number((r-.001).toFixed(6)))}routeRangeHasPadClearanceViolation(t,e,n,o){const i=this.traces[t],r=this.getTraceConnectionNames(i);for(let s=e;s<n;s++){const a=i.route[s],A=i.route[s+1];if(!(!jA(a)||!jA(A)||a.layer!==A.layer)&&this.obstacleIndex.findCollisions({start:a,end:A,layer:a.layer,width:Math.max(a.width,A.width),connectionNames:r,ignoreTraceIndex:t,ignoreRouteRange:{start:Math.max(0,e-1),end:Math.min(i.route.length-1,n+1)},obstacleClearance:o}).some(c=>c.kind==="obstacle"&&c.obstacleKind==="pad"))return!0}return!1}countPadClearanceViolations(t){let e=0;for(const n of this.traceIndices){const o=this.traces[n];if(!o)continue;const i=this.getTraceConnectionNames(o);for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];!jA(s)||!jA(a)||s.layer!==a.layer||this.obstacleIndex.findCollisions({start:s,end:a,layer:s.layer,width:Math.max(s.width,a.width),connectionNames:i,ignoreTraceIndex:n,ignoreRouteRange:{start:Math.max(0,r-1),end:Math.min(o.route.length-1,r+2)},obstacleClearance:t??this.getPadClearanceForTrace(o)}).some(A=>A.kind==="obstacle"&&A.obstacleKind==="pad")&&e++}}return e}countPadClearanceViolationsByTier(){return Object.fromEntries(mgo.map(t=>[t.toFixed(2),this.countPadClearanceViolations(t)]))}findConnectionForTrace(t){const e=this.connectionByTraceId.get(t.pcb_trace_id);if(e!==void 0)return e??void 0;const n=new Set(this.connectionNameResolver.canonicalize(this.getTraceConnectionNames(t))),o=this.inputProblem.simpleRouteJson.connections.find(i=>this.connectionNameResolver.canonicalize(this.getConnectionNames(i)).some(r=>n.has(r)))??null;return this.connectionByTraceId.set(t.pcb_trace_id,o),o??void 0}getConnectionNames(t){return[t.name,t.source_trace_id,t.rootConnectionName,t.netConnectionName,...t.mergedConnectionNames??[]].filter(e=>!!e)}getTraceConnectionNames(t){return[t.pcb_trace_id,t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[],...t.connectsTo??[]].filter(e=>!!e)}ensureConnectivitySafeOutput(){if(!this.connectivityFinalized){this.connectivityFinalized=!0,this.connectivityValidationCount++;try{const t=this.connectivityInvariant.validate(this.traces);if(this.connectivityValidationError??=t.validationError??null,t.safe)return void(this.finalizedMutatedTraceIndices=this.getMutatedTraceIndices());this.connectivityRegressionEndpointIds=[...new Set(t.regressions.flatMap(e=>e.baselineEndpointLabels))]}catch(t){this.connectivityValidationError=t instanceof Error?t.message:String(t)}this.connectivityRollbackCount++,this.connectivityRollbackMutationStats={committedClearanceShoveCount:this.committedClearanceShoveCount,viaPairCountRemoved:this.viaPairCountRemoved,viaCountRemoved:this.viaCountRemoved,simplifiedPathCount:this.simplifiedPathCount,normalizedSegmentCount:this.normalizedSegmentCount,achievedExtraClearanceCount:this.achievedExtraClearanceCount,relocatedViaCount:this.relocatedViaCount,committedPushedViaRepairCount:this.committedPushedViaRepairCount,padClearanceRerouteCount:this.padClearanceRerouteCount},this.committedClearanceShoveCount=0,this.viaPairCountRemoved=0,this.viaCountRemoved=0,this.simplifiedPathCount=0,this.normalizedSegmentCount=0,this.achievedExtraClearanceCount=0,this.relocatedViaCount=0,this.committedPushedViaRepairCount=0,this.padClearanceRerouteCount=0,this.traces=structuredClone(this.initialConnectivitySafeTraces),this.obstacleIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,void 0,[],this.connectionNameResolver),this.remainingPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),this.finalizedMutatedTraceIndices=this.getMutatedTraceIndices()}}getMutatedTraceIndices(){const t=Math.max(this.initialConnectivitySafeTraces.length,this.traces.length);return Array.from({length:t},(e,n)=>n).filter(e=>JSON.stringify(this.initialConnectivitySafeTraces[e])!==JSON.stringify(this.traces[e]))}createStats(){const t=this.candidates[this.candidateCursor],e=this.phase==="repair-vias"?this.viaRepairTraceIndices:this.traceIndices;return{phase:this.phase,budgetLimited:this.budgetLimited,completionReason:this.phase==="complete"||this.solved?this.connectivityRollbackCount>0?"connectivity_rollback":this.budgetLimited?"iteration_budget":this.connectivityValidationError?"connectivity_validation_unavailable":"completed":null,resultStatus:this.connectivityRollbackCount>0||this.budgetLimited||this.connectivityValidationError!==null?"best_effort":"complete",traceCursor:this.traceCursor,traceCount:e.length,traceIndex:e[this.traceCursor],routeCursor:this.routeCursor,candidateCursor:this.candidateCursor,candidateCount:this.candidates.length,candidateKind:t?.kind,candidateWidth:t?.width,candidatePointCount:t?.points.length,clearancePadding:this.clearancePaddingTiers[this.clearanceTierCursor],candidateShoveCount:this.candidateShoveCount,attemptedCandidateCount:this.attemptedCandidateCount,attemptedClearanceShoveCount:this.attemptedClearanceShoveCount,attemptedViaGridCount:this.attemptedViaGridCount,committedClearanceShoveCount:this.committedClearanceShoveCount,viaPairCountRemoved:this.viaPairCountRemoved,viaCountRemoved:this.viaCountRemoved,simplifiedPathCount:this.simplifiedPathCount,normalizedSegmentCount:this.normalizedSegmentCount,achievedExtraClearanceCount:this.achievedExtraClearanceCount,relocatedViaCount:this.relocatedViaCount,unresolvedViaCount:this.unresolvedViaCount,attemptedPushedViaRepairCount:this.attemptedPushedViaRepairCount,committedPushedViaRepairCount:this.committedPushedViaRepairCount,padClearanceRerouteCount:this.padClearanceRerouteCount,unresolvedPadClearanceCount:this.unresolvedPadClearanceCount,initialPadClearanceViolationCount:this.initialPadClearanceViolationCount,remainingPadClearanceViolationCount:this.remainingPadClearanceViolationCount,initialPadClearanceViolationCountByClearance:{...this.initialPadClearanceViolationCountByClearance},remainingPadClearanceViolationCountByClearance:{...this.remainingPadClearanceViolationCountByClearance},connectivityValidationCount:this.connectivityValidationCount,connectivityRollbackCount:this.connectivityRollbackCount,connectivityRegressionEndpointIds:[...this.connectivityRegressionEndpointIds],connectivityValidationError:this.connectivityValidationError,connectivityRollbackMutationStats:this.connectivityRollbackMutationStats===null?null:{...this.connectivityRollbackMutationStats},mutatedTraceIndices:[...this.finalizedMutatedTraceIndices],spatialIndexRectCount:this.obstacleIndex.items.length}}computeProgress(){if(this.solved||this.phase==="complete")return 1;const t=this.phase==="repair-vias"?this.viaRepairTraceIndices:this.traceIndices;if(t.length===0)return 1;const e=this.resumePhase==="scan-via-pairs"?0:.5;return Math.min(.99,e+this.traceCursor/t.length*.5)}getConstructorParams(){return[this.inputProblem]}tryFinalAcceptance(){const t=this.pushedViaRepairRollbackTraces??this.rollbackTraces;t&&(this.traces=t),this.activeSubSolver=null,this.rollbackTraces=null,this.pushedViaRepairRollbackTraces=null,this.pendingPushedViaRepair=null,this.alternatePushedViaRepairs=[],this.viaGridAttempt=null,this.candidates=[],this.candidateCursor=0,this.clearanceTierCursor=0,this.candidateShoveCount=0,this.baseCandidateValidated=!1,this.candidateSetMayUseGridFallback=!1,this.ensureConnectivitySafeOutput(),this.obstacleIndex=new ub(this.inputProblem.simpleRouteJson,this.traces,void 0,[],this.connectionNameResolver),this.remainingPadClearanceViolationCount=this.countPadClearanceViolations(),this.remainingPadClearanceViolationCountByClearance=this.countPadClearanceViolationsByTier(),this.budgetLimited=!0,this.phase="complete",this.solved=!0,this.progress=1,this.stats=this.createStats()}getOutput(){return structuredClone(this.solved?this.traces:this.initialConnectivitySafeTraces)}visualize(){const t=[],e=[],n=this.candidates[this.candidateCursor];for(let o=0;o<this.traces.length;o++){const i=this.traces[o];for(const r of i.route)r.route_type==="via"&&e.push({center:r,radius:(r.via_diameter??.6)/2,fill:"#d4a017",stroke:"#7a5700"});for(let r=0;r<i.route.length-1;r++){const s=i.route[r],a=i.route[r+1];jA(s)&&jA(a)&&s.layer===a.layer&&t.push({points:[s,a],strokeColor:s.layer==="bottom"?"#376fc4":"#777",strokeWidth:s.width})}}if(n)for(let o=0;o<n.points.length-1;o++)t.push({points:[n.points[o],n.points[o+1]],strokeColor:"#ff7400",strokeWidth:n.width+2*(this.clearancePaddingTiers[this.clearanceTierCursor]??0)});return{coordinateSystem:"cartesian",title:`Power trace cleanup: ${this.phase}`,lines:t,points:[],circles:e,rects:[],texts:[]}}},hB=t=>t?.route_type==="wire",WSe=class extends BN{inputProblem;traces;obstacleIndex;traceCursor=0;routeCursor=0;repairedSegmentCount=0;repairedPadNeckSegmentCount=0;unresolvedSegmentCount=0;totalWidthReduction=0;budgetLimited=!1;connectivityValidationCount=0;connectivityRollbackCount=0;connectivityRegressionEndpointIds=[];connectivityValidationError=null;connectivityRollbackMutationStats=null;connectionNameResolver;nominalWidthByTraceId=new Map;connectivityInvariant;initialConnectivitySafeTraces;minimumTraceWidth;traceIndices;connectivityFinalized=!1;constructor(e){super(),this.inputProblem=structuredClone(e),this.traces=structuredClone(e.traces),this.initialConnectivitySafeTraces=structuredClone(e.traces),this.connectivityInvariant=new Bce(this.inputProblem.simpleRouteJson,this.initialConnectivitySafeTraces),this.connectionNameResolver=new Tv(e.simpleRouteJson,this.traces),this.minimumTraceWidth=e.simpleRouteJson.minTraceWidth;const n=e.traceIndices?[...new Set(e.traceIndices)]:this.traces.map((i,r)=>r);for(const i of n)if(!Number.isInteger(i)||i<0||i>=this.traces.length)throw new RangeError(`Invalid clearance-repair trace index: ${i}`);this.traceIndices=n,this.obstacleIndex=this.createConservativeObstacleIndex();const o=this.traceIndices.reduce((i,r)=>i+Math.max(0,this.traces[r].route.length-1),0);this.MAX_ITERATIONS=Math.max(10,8*o+2*this.traceIndices.length),this.stats=this.createStats()}getSolverName(){return"PowerTraceClearanceRepairSolver"}_step(){const e=this.traceIndices[this.traceCursor],n=e===void 0?void 0:this.traces[e];if(!n)return this.ensureConnectivitySafeOutput(),this.solved=!0,void(this.stats=this.createStats());if(this.routeCursor>=n.route.length-1)return this.traceCursor++,this.routeCursor=0,void(this.stats=this.createStats());const o=this.routeCursor++,i=n.route[o],r=n.route[o+1];if(!hB(i)||!hB(r)||i.layer!==r.layer)return void(this.stats=this.createStats());const s=Math.max(i.width,r.width),a={start:i,end:r,layer:i.layer,width:s,connectionNames:this.getTraceConnectionNames(n),ignoreTraceIndex:e,ignoreRouteRange:{start:o,end:o+1}};if(this.repairConnectedPadNeck(n,o,a))return void(this.stats=this.createStats());if(!this.segmentHasForeignTraceCollision(o,s))return void(this.stats=this.createStats());if(this.segmentHasForeignTraceCollision(o,this.minimumTraceWidth))return this.unresolvedSegmentCount++,void(this.stats=this.createStats());let A=this.minimumTraceWidth,c=s;for(let m=0;m<10;m++){const _=(A+c)/2;this.segmentHasForeignTraceCollision(o,_)?c=_:A=_}const l=s>=.5?.025:.0125,u=Math.max(this.minimumTraceWidth,Math.floor((A+Ki)/l)*l),g=this.segmentHasForeignTraceCollision(o,u)?A:u,h=i.width,d=r.width;i.width=Math.min(i.width,g),r.width=Math.min(r.width,g);const p=h-i.width+(d-r.width);if(p<=Ki)return this.unresolvedSegmentCount++,void(this.stats=this.createStats());this.repairedSegmentCount++,this.totalWidthReduction+=p,this.obstacleIndex=this.createConservativeObstacleIndex(),this.routeCursor=Math.max(0,o-1),this.stats=this.createStats()}repairConnectedPadNeck(e,n,o){const i=e.route[n],r=e.route[n+1];if(!hB(i)||!hB(r))return!1;let s=this.obstacleIndex.getConnectedPadWidthLimitAtPoint(o,i),a=this.obstacleIndex.getConnectedPadWidthLimitAtPoint(o,r);n===0&&(s=this.getSmallerLimit(s,this.obstacleIndex.getConnectedPadEndpointWidthLimitAtPoint(o,i))),n+1===e.route.length-1&&(a=this.getSmallerLimit(a,this.obstacleIndex.getConnectedPadEndpointWidthLimitAtPoint(o,r)));const A=s,c=a;if((A===null||i.width<=A+Ki)&&(c===null||r.width<=c+Ki))return!1;const l=i.width,u=r.width;if(A!==null&&(i.width=Math.min(i.width,A)),c!==null&&(r.width=Math.min(r.width,c)),A!==null&&c===null)this.insertPadBoundaryTransition(e,n,o,"start",i.width,u);else if(A===null&&c!==null)this.insertPadBoundaryTransition(e,n,o,"end",r.width,l);else if(A!==null&&c!==null){const g=this.obstacleIndex.getConnectedPadBoundaryPoint(o,"start"),h=this.obstacleIndex.getConnectedPadBoundaryPoint(o,"end");g&&h&&(this.insertPadBoundaryTransition(e,n,o,"start",i.width,u),this.insertPadBoundaryTransition(e,n+2,o,"end",r.width,l))}return this.totalWidthReduction+=l-i.width+(u-r.width),this.repairedPadNeckSegmentCount++,this.obstacleIndex=this.createConservativeObstacleIndex(),this.routeCursor=Math.max(0,n-1),!0}getSmallerLimit(e,n){return e===null?n:n===null?e:Math.min(e,n)}insertPadBoundaryTransition(e,n,o,i,r,s){const a=this.obstacleIndex.getConnectedPadBoundaryPoint(o,i);if(!a)return;const A=i==="start"?o.start:o.end,c=i==="start"?o.end:o.start,l=Math.hypot(c.x-A.x,c.y-A.y);if(l<=1e-9)return;const u=Math.min(1e-6,l/4),g=(c.x-A.x)/l,h=(c.y-A.y)/l,d={route_type:"wire",x:a.x-g*u,y:a.y-h*u,width:r,layer:o.layer},p={...d,x:a.x+g*u,y:a.y+h*u,width:s},m=i==="start"?e.route[n+1]:e.route[n],_=i==="start"?e.route[n+2]:e.route[n-1];if(hB(m)&&_?.route_type==="via"){const f=this.resolveNominalTraceWidth(e);this.obstacleIndex.collides({...o,start:m,end:p,width:f})||(m.width=Math.max(m.width,f),p.width=m.width)}e.route.splice(n+1,0,...i==="start"?[d,p]:[p,d])}resolveNominalTraceWidth(e){const n=this.nominalWidthByTraceId.get(e.pcb_trace_id);if(n!==void 0)return n;const o=new Set(this.connectionNameResolver.canonicalize(this.getTraceConnectionNames(e))),i=this.inputProblem.simpleRouteJson.connections.find(s=>this.connectionNameResolver.canonicalize([s.name,s.source_trace_id,s.rootConnectionName,s.netConnectionName,...s.mergedConnectionNames??[]].filter(a=>!!a)).some(a=>o.has(a))),r=Math.max(i?.nominalTraceWidth??i?.width??this.inputProblem.simpleRouteJson.nominalTraceWidth??this.minimumTraceWidth,this.minimumTraceWidth);return this.nominalWidthByTraceId.set(e.pcb_trace_id,r),r}segmentHasForeignTraceCollision(e,n){const o=this.traceIndices[this.traceCursor],i=o===void 0?void 0:this.traces[o],r=i?.route[e],s=i?.route[e+1];return!!(i&&hB(r)&&hB(s)&&r.layer===s.layer)&&this.obstacleIndex.findCollisions({start:r,end:s,layer:r.layer,width:n,connectionNames:this.getTraceConnectionNames(i),ignoreTraceIndex:o,ignoreRouteRange:{start:e,end:e+1}}).some(a=>a.kind==="trace"&&a.traceIndex!==void 0&&a.traceIndex!==o)}createConservativeObstacleIndex(){const e=structuredClone(this.traces);for(const n of e)for(let o=0;o<n.route.length-1;o++){const i=n.route[o],r=n.route[o+1];hB(i)&&hB(r)&&i.layer===r.layer&&(i.width=Math.max(i.width,r.width))}return new ub(this.inputProblem.simpleRouteJson,e,void 0,[],this.connectionNameResolver)}getTraceConnectionNames(e){return[e.pcb_trace_id,e.connection_name,e.source_trace_id,e.rootConnectionName,...e.mergedConnectionNames??[],...e.connectsTo??[]].filter(n=>!!n)}ensureConnectivitySafeOutput(){if(!this.connectivityFinalized){this.connectivityFinalized=!0,this.connectivityValidationCount++;try{const e=this.connectivityInvariant.validate(this.traces);if(this.connectivityValidationError??=e.validationError??null,e.safe)return;this.connectivityRegressionEndpointIds=[...new Set(e.regressions.flatMap(n=>n.baselineEndpointLabels))]}catch(e){this.connectivityValidationError=e instanceof Error?e.message:String(e)}this.connectivityRollbackCount++,this.connectivityRollbackMutationStats={repairedSegmentCount:this.repairedSegmentCount,repairedPadNeckSegmentCount:this.repairedPadNeckSegmentCount,totalWidthReduction:this.totalWidthReduction},this.repairedSegmentCount=0,this.repairedPadNeckSegmentCount=0,this.totalWidthReduction=0,this.traces=structuredClone(this.initialConnectivitySafeTraces),this.obstacleIndex=this.createConservativeObstacleIndex()}}createStats(){return{phase:this.solved?"complete":"repair-trace-clearance",budgetLimited:this.budgetLimited,completionReason:this.solved?this.connectivityRollbackCount>0?"connectivity_rollback":this.budgetLimited?"iteration_budget":this.connectivityValidationError?"connectivity_validation_unavailable":"completed":null,resultStatus:this.connectivityRollbackCount>0||this.budgetLimited||this.connectivityValidationError!==null?"best_effort":"complete",traceCursor:this.traceCursor,traceCount:this.traceIndices.length,traceIndex:this.traceIndices[this.traceCursor],routeCursor:this.routeCursor,repairedSegmentCount:this.repairedSegmentCount,repairedPadNeckSegmentCount:this.repairedPadNeckSegmentCount,unresolvedSegmentCount:this.unresolvedSegmentCount,totalWidthReduction:this.totalWidthReduction,connectivityValidationCount:this.connectivityValidationCount,connectivityRollbackCount:this.connectivityRollbackCount,connectivityRegressionEndpointIds:[...this.connectivityRegressionEndpointIds],connectivityValidationError:this.connectivityValidationError,connectivityRollbackMutationStats:this.connectivityRollbackMutationStats===null?null:{...this.connectivityRollbackMutationStats},spatialIndexRectCount:this.obstacleIndex.items.length}}computeProgress(){return this.solved||this.traceIndices.length===0?1:Math.min(.99,this.traceCursor/this.traceIndices.length)}tryFinalAcceptance(){this.ensureConnectivitySafeOutput(),this.budgetLimited=!0,this.solved=!0,this.progress=1,this.stats=this.createStats()}getConstructorParams(){return[this.inputProblem]}getOutput(){return structuredClone(this.solved?this.traces:this.initialConnectivitySafeTraces)}visualize(){const e=[];for(let n=0;n<this.traces.length;n++){const o=this.traces[n];for(let i=0;i<o.route.length-1;i++){const r=o.route[i],s=o.route[i+1];hB(r)&&hB(s)&&r.layer===s.layer&&e.push({points:[r,s],strokeColor:n===this.traceIndices[this.traceCursor]&&i===this.routeCursor?"#ff7400":r.layer==="bottom"?"#376fc4":"#777",strokeWidth:Math.max(r.width,s.width)})}}return{coordinateSystem:"cartesian",title:"Power trace direction-independent clearance repair",lines:e,points:[],circles:[],rects:[],texts:[]}}},Q7t=[{x:0,y:0},{x:.5,y:0},{x:0,y:.5},{x:.5,y:.5}],v7t=[{offset:{x:0,y:0},strictNecking:!0},{offset:{x:.5,y:.5},strictNecking:!0},{offset:{x:0,y:0},strictNecking:!1},{offset:{x:.5,y:.5},strictNecking:!1}],w7t=t=>[...new Set(t.map(e=>Number(e.toFixed(6))))].sort((e,n)=>n-e),Sa=t=>t?.route_type==="wire",fgo=class extends BN{inputProblem;options;traces;obstacleIndex;connectionNameResolver;connectionByTraceId=new Map;connectivityInvariant;lastConnectivitySafeTraces;traceOrder;selectedOwnedTraceIndices;selectedCleanupTraceIndices;selectedViaRepairTraceIndices;mutableBlockerTraceIndices;immutableTraceIndices;initialImmutableTraceSignatures=new Map;traceOrderCursor=-1;maxPassCount=4;previousWidthDeficit=0;passIndex=0;completedPassCount=0;lastNormalizedWidthDeficitGain=0;normalizedWidthDeficitGainByPass=[];plateauReached=!1;phase="scan-trace";traceIndex=-1;routeSegmentIndex=0;nominalTraceWidth=0;currentIntervals=[];intervalCursor=0;candidateWidths=[];widthCursor=0;gridResolutions=[];resolutionCursor=0;offsetCursor=0;keptTraceCount=0;recreatedTraceCount=0;expandedSegmentCount=0;intermediateExpandedSegmentCount=0;pathWidthUpgradeCount=0;inPlaceWidthProbeCount=0;reroutedSegmentCount=0;unresolvedSegmentCount=0;attemptedGridCount=0;attemptedLayerGridCount=0;attemptedInflationCount=0;pushedTraceCount=0;elasticPushedTraceCount=0;layerReroutedTraceCount=0;insertedViaCount=0;neckedLayerSegmentCount=0;removedViaPairCount=0;removedViaCount=0;simplifiedPathCount=0;normalizedSegmentCount=0;cleanupClearanceShoveCount=0;relocatedViaCount=0;unresolvedViaCount=0;initialImmutableViaViolationCount=0;remainingImmutableViaViolationCount=0;initialImmutableViaViolationPairCount=0;remainingImmutableViaViolationPairCount=0;immutableTraceMutationIds=[];lastSafeImmutableViaViolationSignatures=new Set;immutableViaViolationRollbackCount=0;attemptedImmutableViaViolationCount=null;attemptedImmutableViaViolationPairCount=null;immutableViaViolationRegressionIds=[];padClearanceRerouteCount=0;unresolvedPadClearanceCount=0;repairedTraceClearanceSegmentCount=0;repairedPadNeckSegmentCount=0;unresolvedTraceClearanceSegmentCount=0;sameNetContactRejectionCount=0;connectivityValidationCount=0;connectivityRollbackCount=0;connectivityRollbackPhases=[];immutableSafetyRollbackCount=0;immutableSafetyRollbackPhases=[];connectivityRegressionEndpointIds=[];connectivityValidationError=null;connectivityRollbackMutationStats=null;immutableSafetyRollbackMutationStats=null;discardedExpansionMutationStats=null;initialPadClearanceViolationCount=0;remainingPadClearanceViolationCount=0;initialPadClearanceViolationCountByClearance={};remainingPadClearanceViolationCountByClearance={};budgetLimitedExpansion=!1;finalAcceptanceUsed=!1;cleanupCompleted=!1;clearanceRepairCompleted=!1;cleanupBestEffortAccepted=!1;clearanceRepairBestEffortAccepted=!1;cleanupIterationBudget=0;clearanceRepairIterationBudget=0;expansionPushedTraceIndices=new Set;cleanupMutatedTraceIndices=[];failedSubSolverCount=0;inflationAttemptsBySegment=new Map;layerAttemptCountByTrace=new Map;layerRerouteCountByTrace=new Map;activeInflationKey=null;activeInflationWidth=null;layerAttempt=null;pendingLayerOutput=null;pendingLayerPushCount=0;constructor(t,e={}){super(),this.inputProblem=structuredClone(t),this.options=structuredClone(e),this.traces=structuredClone(t.traces??[]),this.connectionNameResolver=new Tv(this.inputProblem,this.traces),this.lastConnectivitySafeTraces=structuredClone(this.traces),this.connectivityInvariant=new Bce(this.inputProblem,this.lastConnectivitySafeTraces);const n=e.onlyConnectionNames?new Set(this.connectionNameResolver.canonicalize([...e.onlyConnectionNames])):null,o=this.traces.flatMap((s,a)=>n?this.connectionNameResolver.canonicalize(this.getTraceConnectionNames(s)).some(A=>n.has(A))?[a]:[]:[a]),i=new Map(o.map(s=>[s,this.getInitialTracePriority(this.traces[s])]));this.traceOrder=o.sort((s,a)=>i.get(a)-i.get(s)||s-a),this.selectedOwnedTraceIndices=this.traceOrder.filter(s=>this.findConnectionForTrace(this.traces[s])),this.selectedCleanupTraceIndices=[...this.selectedOwnedTraceIndices],this.selectedViaRepairTraceIndices=[...this.selectedOwnedTraceIndices],this.mutableBlockerTraceIndices=this.traces.flatMap((s,a)=>this.findConnectionForTrace(s)?[a]:[]);const r=new Set(this.mutableBlockerTraceIndices);this.immutableTraceIndices=this.traces.flatMap((s,a)=>r.has(a)?[]:(this.initialImmutableTraceSignatures.set(a,JSON.stringify(s)),[a])),this.previousWidthDeficit=this.calculateWidthDeficit().deficit,this.obstacleIndex=new ub(this.inputProblem,this.traces,this.traceIndex>=0?this.traceIndex:void 0,[],this.connectionNameResolver),this.lastSafeImmutableViaViolationSignatures=this.getImmutableViaViolationSignatures(this.traces),this.initialImmutableViaViolationCount=this.countViolatingImmutableVias(this.lastSafeImmutableViaViolationSignatures),this.remainingImmutableViaViolationCount=this.initialImmutableViaViolationCount,this.initialImmutableViaViolationPairCount=this.lastSafeImmutableViaViolationSignatures.size,this.remainingImmutableViaViolationPairCount=this.initialImmutableViaViolationPairCount,this.activeSubSolver=null,this.MAX_ITERATIONS=8e6,this.stats=this.createStats()}getSolverName(){return"PowerTraceExpanderSolver"}_step(){if(this.shouldStartBudgetFinalization())return this.startBudgetFinalization(),void(this.stats=this.createStats());if(this.activeSubSolver)return this.stepActiveGridSolver(),void(this.stats=this.createStats());switch(this.phase){case"scan-trace":this.scanNextTrace();break;case"evaluate-segment":this.evaluateNextSegment();break;case"try-trace-inflation":case"cleanup":case"repair-trace-clearance":break;case"try-layer-candidate":this.startNextLayerCandidate();break;case"try-grid-candidate":this.startNextGridCandidate();break;case"complete":this.acceptConnectivityCheckpoint(this.traces,"final"),this.solved=!0}this.stats=this.createStats()}scanNextTrace(){if(this.traceOrderCursor++,this.routeSegmentIndex=0,this.traceOrderCursor>=this.traceOrder.length)return void this.finishOrStartNextPass();this.traceIndex=this.traceOrder[this.traceOrderCursor];const t=this.traces[this.traceIndex];this.findConnectionForTrace(t)?(this.nominalTraceWidth=this.resolveNominalTraceWidth(t),this.traceMeetsNominalWidth(t,this.nominalTraceWidth)?this.keptTraceCount++:(this.rebuildObstacleIndex(),t.route=(function(e,n){if(e.length<2)return e.map(i=>({...i}));const o=[];for(let i=0;i<e.length-1;i++){const r=e[i],s=e[i+1];if(o.push({...r}),r.route_type!=="wire"||s.route_type!=="wire"||r.layer!==s.layer||r.width>=n-Ki)continue;const a=Aa(r,s),A=Math.max(1,Math.ceil(a/n));for(let c=1;c<A;c++){const l=c/A;o.push({route_type:"wire",x:r.x+(s.x-r.x)*l,y:r.y+(s.y-r.y)*l,width:r.width,layer:r.layer})}}return o.push({...e[e.length-1]}),o})(t.route,this.nominalTraceWidth),this.recreatedTraceCount++,this.phase="evaluate-segment")):this.keptTraceCount++}finishOrStartNextPass(){const{deficit:t,nominalArea:e}=this.calculateWidthDeficit(),n=this.previousWidthDeficit-t;if(this.lastNormalizedWidthDeficitGain=e<=Ki?0:n/e,this.normalizedWidthDeficitGainByPass.push(this.lastNormalizedWidthDeficitGain),this.plateauReached=this.lastNormalizedWidthDeficitGain<.001,this.completedPassCount=this.passIndex+1,this.passIndex+1<this.maxPassCount&&this.lastNormalizedWidthDeficitGain>=.001)return this.previousWidthDeficit=t,this.passIndex++,this.traceOrderCursor=-1,this.traceIndex=-1,this.routeSegmentIndex=0,this.inflationAttemptsBySegment.clear(),void(this.phase="scan-trace");this.startCleanup()}startCleanup(){this.acceptConnectivityCheckpoint(this.traces,"expansion"),this.traceIndex=this.traces.length,this.phase="cleanup";const t=new JSe({simpleRouteJson:this.inputProblem,traces:this.traces,traceIndices:this.selectedCleanupTraceIndices,viaRepairTraceIndices:this.selectedViaRepairTraceIndices,mutableTraceIndices:this.mutableBlockerTraceIndices,maxRerouteLength:10,desiredPadClearance:this.options.powerTraceToPadClearance}),e=this.getRemainingParentIterationsAfterCurrentStep(),n=e===0?0:Math.max(1,Math.floor(.75*e));t.MAX_ITERATIONS=Math.min(t.MAX_ITERATIONS,n),this.cleanupIterationBudget=t.MAX_ITERATIONS,this.activeSubSolver=t}shouldStartBudgetFinalization(){return!this.budgetLimitedExpansion&&this.phase!=="cleanup"&&this.phase!=="repair-trace-clearance"&&this.phase!=="complete"&&this.iterations>=this.getExpansionIterationBudget()}getFinalizationIterationReserve(){return Math.min(Math.max(0,this.MAX_ITERATIONS-1),Math.max(1,Math.floor(.125*this.MAX_ITERATIONS)))}getExpansionIterationBudget(){return Math.max(1,this.MAX_ITERATIONS-this.getFinalizationIterationReserve())}startBudgetFinalization(){this.budgetLimitedExpansion=!0,this.activeSubSolver=null,this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.activeInflationKey=null,this.activeInflationWidth=null,this.layerAttempt=null,this.discardInFlightExpansion(),this.startCleanup()}discardInFlightExpansion(){this.discardedExpansionMutationStats=this.captureAndResetExpansionMutationStats(),this.restoreLastConnectivitySafeTraces()}rollbackConnectivityRegressedExpansion(){this.connectivityRollbackMutationStats=this.captureAndResetExpansionMutationStats(),this.restoreLastConnectivitySafeTraces()}rollbackImmutableUnsafeExpansion(){this.immutableSafetyRollbackMutationStats=this.captureAndResetExpansionMutationStats(),this.restoreLastConnectivitySafeTraces()}captureAndResetExpansionMutationStats(){const t={recreatedTraceCount:this.recreatedTraceCount,expandedSegmentCount:this.expandedSegmentCount,intermediateExpandedSegmentCount:this.intermediateExpandedSegmentCount,pathWidthUpgradeCount:this.pathWidthUpgradeCount,reroutedSegmentCount:this.reroutedSegmentCount,pushedTraceCount:this.pushedTraceCount,elasticPushedTraceCount:this.elasticPushedTraceCount,layerReroutedTraceCount:this.layerReroutedTraceCount,insertedViaCount:this.insertedViaCount,neckedLayerSegmentCount:this.neckedLayerSegmentCount};return this.recreatedTraceCount=0,this.expandedSegmentCount=0,this.intermediateExpandedSegmentCount=0,this.pathWidthUpgradeCount=0,this.reroutedSegmentCount=0,this.pushedTraceCount=0,this.elasticPushedTraceCount=0,this.layerReroutedTraceCount=0,this.insertedViaCount=0,this.neckedLayerSegmentCount=0,this.expansionPushedTraceIndices.clear(),t}restoreLastConnectivitySafeTraces(){this.traces=structuredClone(this.lastConnectivitySafeTraces),this.rebuildObstacleIndex()}getRemainingParentIterationsAfterCurrentStep(){return Math.max(0,this.MAX_ITERATIONS-this.iterations-1)}calculateWidthDeficit(){let t=0,e=0;for(const n of this.traceOrder){const o=this.traces[n];if(!this.findConnectionForTrace(o))continue;const i=this.resolveNominalTraceWidth(o);for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];if(!Sa(s)||!Sa(a)||s.layer!==a.layer)continue;const A=Aa(s,a),c=s.width;e+=A*i,t+=A*Math.max(0,i-c)}}return{deficit:t,nominalArea:e}}getInitialTracePriority(t){const e=this.resolveNominalTraceWidth(t);let n=0;for(let o=0;o<t.route.length-1;o++){const i=t.route[o],r=t.route[o+1];Sa(i)&&Sa(r)&&i.layer===r.layer&&(n+=Aa(i,r)*Math.max(0,e-Math.min(i.width,r.width)))}return e*n}evaluateNextSegment(){const t=this.traces[this.traceIndex];if(!t)return void(this.phase="scan-trace");const e=this.findNextUnderWidthSegment(t,this.routeSegmentIndex,this.nominalTraceWidth);if(e===-1)return void(this.phase="scan-trace");this.routeSegmentIndex=e;const n=t.route[e],o=t.route[e+1];if(!Sa(n)||!Sa(o))return void this.routeSegmentIndex++;const i=this.getTraceConnectionNames(t),r=Math.min(n.width,o.width),s=this.findMaximumSafeInPlaceWidth(t,e,i);if(s>r+Ki){if(n.width=Math.max(n.width,s),o.width=Math.max(o.width,s),s>=this.nominalTraceWidth-Ki)return this.expandedSegmentCount++,void this.routeSegmentIndex++;this.intermediateExpandedSegmentCount++}this.startTraceInflation(t,e)||this.prepareLayerRouteAttempt(t,e)||this.prepareRegularGridCandidates(t,e)}prepareRegularGridCandidates(t,e){if(this.currentIntervals=this.getExponentialIntervalCandidates(t,e,this.nominalTraceWidth),this.intervalCursor=0,this.candidateWidths=this.getCandidateWidths(this.nominalTraceWidth),this.widthCursor=0,this.gridResolutions=[],this.resolutionCursor=0,this.offsetCursor=0,this.currentIntervals.length===0)return this.unresolvedSegmentCount++,void this.routeSegmentIndex++;this.phase="try-grid-candidate"}prepareLayerRouteAttempt(t,e){if(this.nominalTraceWidth<.499999)return!1;const n=this.options.allowNewVias!==!1&&this.inputProblem.layerCount>=2,o=n?2:this.maxPassCount,i=this.layerAttemptCountByTrace.get(this.traceIndex)??0,r=this.layerRerouteCountByTrace.get(this.traceIndex)??0;if(r>=o||i>=o||i>this.passIndex||i>0&&r===0)return!1;const s=t.route[e],a=t.route[e+1];if(!Sa(s)||!Sa(a)||Math.min(s.width,a.width)>=.5*this.nominalTraceWidth-Ki)return!1;const A=this.getExponentialIntervalCandidates(t,e,this.nominalTraceWidth).filter(f=>this.intervalSupportsLayerRouting(t,f)).sort((f,I)=>I.endIndex-f.endIndex||f.startIndex-I.startIndex||this.getRouteIntervalLength(t,I.startIndex,I.endIndex)-this.getRouteIntervalLength(t,f.startIndex,f.endIndex))[0];if(!A)return!1;const c=this.getRouteQuality(t.route.slice(A.startIndex,A.endIndex+1));if(c.deficitArea<this.nominalTraceWidth||i>0&&c.deficitArea/Math.max(c.length,Ki)<.25)return!1;const l=t.route[A.startIndex],u=t.route[A.endIndex],g=this.getTraceConnectionNames(t),h=n?this.getEndpointLayers(l,g):[l.layer],d=n?this.getEndpointLayers(u,g):[u.layer],p=Math.min(this.nominalTraceWidth,Math.max(l.width,this.findMaximumSafeInPlaceWidth(t,A.startIndex,g))),m=Math.min(this.nominalTraceWidth,Math.max(u.width,this.findMaximumSafeInPlaceWidth(t,A.endIndex-1,g))),_=this.getSoftTraceIndices(this.nominalTraceWidth);return this.layerAttemptCountByTrace.set(this.traceIndex,i+1),this.layerAttempt={interval:A,minViaCount:n?1:0,maxViaCount:n?2:0,candidateWidths:[this.nominalTraceWidth],widthCursor:0,gridResolutions:[th(this.nominalTraceWidth/4,.2,.3)],resolutionCursor:0,offsetCursor:0,startLayers:h,endLayers:d,startNeckWidth:p,endNeckWidth:m,softTraceIndices:_},this.phase="try-layer-candidate",!0}intervalSupportsLayerRouting(t,e){if(e.startIndex>=e.endIndex)return!1;for(let i=e.startIndex;i<=e.endIndex;i++){const r=t.route[i];if(!Sa(r))return!1}const n=t.route[e.startIndex],o=t.route[e.endIndex];return n.layer===o.layer}getEndpointLayers(t,e){return[...new Set([t.layer,...this.obstacleIndex.getConnectedLayersAtPoint({x:t.x,y:t.y},e)])].filter(n=>this.obstacleIndex.boardLayers.includes(n))}getSoftTraceIndices(t){const e=[];for(let n=0;n<this.traces.length;n++){if(n===this.traceIndex)continue;const o=this.traces[n],i=this.findConnectionForTrace(o);i&&Math.max(i.nominalTraceWidth??i.width??this.inputProblem.nominalTraceWidth??this.inputProblem.minTraceWidth,this.inputProblem.minTraceWidth)<t-Ki&&e.push(n)}return e}startNextLayerCandidate(){const t=this.layerAttempt,e=this.traces[this.traceIndex];if(!t||!e)return this.layerAttempt=null,void(this.phase="evaluate-segment");if(t.widthCursor>=t.candidateWidths.length){const d=this.routeSegmentIndex;return this.layerAttempt=null,void this.prepareRegularGridCandidates(e,d)}const n=t.candidateWidths[t.widthCursor];if(t.gridResolutions.length===0&&(t.gridResolutions=this.getGridResolutions(n)),t.resolutionCursor>=t.gridResolutions.length)return t.widthCursor++,t.gridResolutions=[],t.resolutionCursor=0,void(t.offsetCursor=0);if(t.offsetCursor>=v7t.length)return t.resolutionCursor++,void(t.offsetCursor=0);const o=e.route[t.interval.startIndex],i=e.route[t.interval.endIndex];if(!Sa(o)||!Sa(i))return this.layerAttempt=null,void this.prepareRegularGridCandidates(e,this.routeSegmentIndex);const r=t.gridResolutions[t.resolutionCursor],s=v7t[t.offsetCursor],a=s.offset,A=Math.min(t.startNeckWidth,t.endNeckWidth),c=this.inputProblem.min_via_hole_diameter??this.inputProblem.minViaHoleDiameter??.3,l=Math.max(c,this.inputProblem.min_via_pad_diameter??this.inputProblem.minViaPadDiameter??this.inputProblem.minViaDiameter??.6),u=Math.max(this.inputProblem.minTraceWidth,Math.min(s.strictNecking?t.startNeckWidth:A,n)),g=Math.max(this.inputProblem.minTraceWidth,Math.min(s.strictNecking?t.endNeckWidth:A,n)),h=th(3*this.nominalTraceWidth,1.5,3);t.maxViaCount>0?this.attemptedLayerGridCount++:this.attemptedGridCount++,this.activeSubSolver=new m7t({start:o,end:i,originalStartLayer:o.layer,originalEndLayer:i.layer,startLayers:t.startLayers,endLayers:t.endLayers,layers:this.obstacleIndex.boardLayers,traceWidth:n,startNeckWidth:u,endNeckWidth:g,maxStartNeckLength:h,maxEndNeckLength:h,neckPenaltyExponent:s.strictNecking?2:1,viaDiameter:l,viaHoleDiameter:c,minViaCount:t.minViaCount,maxViaCount:t.maxViaCount,viaCost:Math.max(1,2*this.nominalTraceWidth),gridSize:r,gridOffset:{x:a.x*r,y:a.y*r},connectionNames:this.getTraceConnectionNames(e),obstacleIndex:this.obstacleIndex,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,t.interval.startIndex-1),end:Math.min(e.route.length-1,t.interval.endIndex+1)},softTraceIndices:t.softTraceIndices,fixedVias:this.getFixedViasOutsideInterval(e,t.interval),bounds:this.inputProblem.bounds,obstacleClearance:this.getDesiredPadClearance(n),searchPadding:Math.min(5,Math.max(2.5,Aa(o,i)/2,4*n))})}startNextGridCandidate(){const t=this.traces[this.traceIndex];if(!t)return void(this.phase="scan-trace");if(this.widthCursor>=this.candidateWidths.length)return this.unresolvedSegmentCount++,this.routeSegmentIndex++,void(this.phase="evaluate-segment");if(this.intervalCursor>=this.currentIntervals.length)return this.widthCursor++,this.intervalCursor=0,this.gridResolutions=[],this.resolutionCursor=0,void(this.offsetCursor=0);const e=this.candidateWidths[this.widthCursor],n=t.route[this.routeSegmentIndex],o=t.route[this.routeSegmentIndex+1];if(Sa(n)&&Sa(o)&&e<=Math.min(n.width,o.width)+Ki)return void(this.widthCursor=this.candidateWidths.length);if(this.gridResolutions.length===0&&(this.gridResolutions=this.getGridResolutions(e)),this.resolutionCursor>=this.gridResolutions.length)return this.intervalCursor++,this.resolutionCursor=0,void(this.offsetCursor=0);if(this.offsetCursor>=Q7t.length)return this.resolutionCursor++,void(this.offsetCursor=0);const i=this.currentIntervals[this.intervalCursor],r=t.route[i.startIndex],s=t.route[i.endIndex];if(!Sa(r)||!Sa(s)||r.layer!==s.layer)return this.intervalCursor++,this.resolutionCursor=0,void(this.offsetCursor=0);if(this.endpointCollides(t,i,r,e)||this.endpointCollides(t,i,s,e))return this.intervalCursor++,this.resolutionCursor=0,void(this.offsetCursor=0);const a=this.gridResolutions[this.resolutionCursor],A=Q7t[this.offsetCursor],c={x:A.x*a,y:A.y*a};this.attemptedGridCount++,this.activeSubSolver=new Ice({start:r,end:s,layer:r.layer,traceWidth:e,gridSize:a,gridOffset:c,connectionNames:this.getTraceConnectionNames(t),obstacleIndex:this.obstacleIndex,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,i.startIndex-1),end:Math.min(t.route.length-1,i.endIndex+1)},bounds:this.inputProblem.bounds,obstacleClearance:this.getDesiredPadClearance(e),searchPadding:Math.min(5,Math.max(1.5,Aa(r,s)/2,3*e))})}endpointCollides(t,e,n,o){return this.obstacleIndex.collides({start:n,end:n,layer:n.layer,width:o,connectionNames:this.getTraceConnectionNames(t),ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,e.startIndex-1),end:Math.min(t.route.length-1,e.endIndex+1)},obstacleClearance:this.getDesiredPadClearance(o)})}stepActiveGridSolver(){if(this.activeSubSolver instanceof WSe)return void this.stepActiveTraceClearanceRepairSolver();if(this.activeSubSolver instanceof JSe)return void this.stepActiveCleanupSolver();if(this.activeSubSolver instanceof pH)return void this.stepActiveInflationSolver();if(this.activeSubSolver instanceof m7t)return void this.stepActiveLayerSolver();const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput();if(e){const n=this.gridRouteReplacementCollides(e)||this.gridRouteBoundaryCollides(e);if(!n&&this.gridRoutePreservesSameNetContacts(e))return this.applyGridRoute(this.maximizeGridRouteWidth(e)),void(this.activeSubSolver=null);n||this.sameNetContactRejectionCount++}}this.retainFailedSubSolver(t),this.activeSubSolver=null,this.offsetCursor++}}stepActiveCleanupSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved)return this.adoptCleanupOutput(t),this.activeSubSolver=null,void this.startTraceClearanceRepair();this.retainFailedSubSolver(t),this.activeSubSolver=null,this.startTraceClearanceRepair()}}adoptCleanupOutput(t){const e=this.acceptConnectivityCheckpoint(t.getOutput(),"cleanup");this.cleanupCompleted=!t.budgetLimited;const n=t.stats;this.connectivityValidationError??=n.connectivityValidationError??null,this.connectivityValidationCount+=Number(n.connectivityValidationCount??0);const o=Number(n.connectivityRollbackCount??0);o>0&&(this.connectivityRollbackCount+=o,this.connectivityRollbackPhases.includes("cleanup")||this.connectivityRollbackPhases.push("cleanup"),this.connectivityRegressionEndpointIds=[...new Set([...this.connectivityRegressionEndpointIds,...n.connectivityRegressionEndpointIds??[]])]);const i=e&&o===0;this.cleanupBestEffortAccepted=t.budgetLimited&&i,this.cleanupMutatedTraceIndices=i?[...n.mutatedTraceIndices??[]]:[],this.removedViaPairCount=i?Number(n.viaPairCountRemoved??0):0,this.removedViaCount=i?Number(n.viaCountRemoved??0):0,this.simplifiedPathCount=i?Number(n.simplifiedPathCount??0):0,this.normalizedSegmentCount=i?Number(n.normalizedSegmentCount??0):0,this.cleanupClearanceShoveCount=i?Number(n.committedClearanceShoveCount??0):0,this.relocatedViaCount=i?Number(n.relocatedViaCount??0):0,this.unresolvedViaCount=Number(n.unresolvedViaCount??0),this.padClearanceRerouteCount=i?Number(n.padClearanceRerouteCount??0):0,this.unresolvedPadClearanceCount=Number(n.unresolvedPadClearanceCount??0),this.initialPadClearanceViolationCount=Number(n.initialPadClearanceViolationCount??0),this.remainingPadClearanceViolationCount=Number(n.remainingPadClearanceViolationCount??0),this.initialPadClearanceViolationCountByClearance={...n.initialPadClearanceViolationCountByClearance??{}},this.remainingPadClearanceViolationCountByClearance={...n.remainingPadClearanceViolationCountByClearance??{}},this.rebuildObstacleIndex()}startTraceClearanceRepair(){this.phase="repair-trace-clearance";const t=[...new Set([...this.getOwnedTraceIndices(),...this.expansionPushedTraceIndices,...this.cleanupMutatedTraceIndices])],e=new WSe({simpleRouteJson:this.inputProblem,traces:this.traces,traceIndices:t});e.MAX_ITERATIONS=Math.min(e.MAX_ITERATIONS,this.getRemainingParentIterationsAfterCurrentStep()),this.clearanceRepairIterationBudget=e.MAX_ITERATIONS,this.activeSubSolver=e}stepActiveTraceClearanceRepairSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved)return this.adoptClearanceRepairOutput(t),this.activeSubSolver=null,void(this.phase="complete");this.retainFailedSubSolver(t),this.activeSubSolver=null,this.phase="complete"}}adoptClearanceRepairOutput(t){const e=this.acceptConnectivityCheckpoint(t.getOutput(),"clearance-repair");this.clearanceRepairCompleted=!t.budgetLimited;const n=t.stats;this.connectivityValidationError??=n.connectivityValidationError??null,this.connectivityValidationCount+=Number(n.connectivityValidationCount??0);const o=Number(n.connectivityRollbackCount??0);o>0&&(this.connectivityRollbackCount+=o,this.connectivityRollbackPhases.includes("clearance-repair")||this.connectivityRollbackPhases.push("clearance-repair"),this.connectivityRegressionEndpointIds=[...new Set([...this.connectivityRegressionEndpointIds,...n.connectivityRegressionEndpointIds??[]])]);const i=e&&o===0;this.clearanceRepairBestEffortAccepted=t.budgetLimited&&i,this.repairedTraceClearanceSegmentCount=i?Number(n.repairedSegmentCount??0):0,this.repairedPadNeckSegmentCount=i?Number(n.repairedPadNeckSegmentCount??0):0,this.unresolvedTraceClearanceSegmentCount=Number(n.unresolvedSegmentCount??0),this.rebuildObstacleIndex()}stepActiveLayerSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput();if(e){const n=!this.layerRouteReplacementCollides(e,!0)&&this.layerRouteImprovesInterval(e),o=n&&this.layerRoutePreservesSameNetContacts(e);if(o){if(this.activeSubSolver=null,this.pendingLayerOutput=e,this.pendingLayerPushCount=0,!this.layerRouteReplacementCollides(e,!1))return void this.applyLayerRoute(e);if(this.startPendingLayerInflation())return;this.pendingLayerOutput=null}n&&!o&&this.sameNetContactRejectionCount++}}this.retainFailedSubSolver(t),this.activeSubSolver=null,this.layerAttempt&&this.layerAttempt.offsetCursor++,this.phase="try-layer-candidate"}}layerRouteReplacementCollides(t,e){const n=this.traces[this.traceIndex],o=this.layerAttempt;if(!n||!o)return!0;const i=this.getTraceConnectionNames(n),r=e?o.softTraceIndices:void 0,s={start:Math.max(0,o.interval.startIndex-1),end:Math.min(n.route.length-1,o.interval.endIndex+1)},a=this.getFixedViasOutsideInterval(n,o.interval);for(let A=0;A<t.route.length;A++){const c=t.route[A];if(c?.route_type==="via"){if(this.obstacleIndex.collidesVia({point:c,layers:this.obstacleIndex.boardLayers,padDiameter:c.via_diameter??.6,holeDiameter:c.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter,connectionNames:i,ignoreTraceIndex:this.traceIndex,ignoreTraceIndices:r,otherNewViaPoints:t.route.slice(0,A).filter(u=>u.route_type==="via").map(u=>({x:u.x,y:u.y})),fixedVias:a,ignoreRouteRange:s,obstacleClearance:this.getDesiredPadClearance(t.traceWidth),blockSameNetObstacles:!0,sameNetObstacleClearance:0}))return!0;continue}const l=t.route[A+1];if(c?.route_type==="wire"&&l?.route_type==="wire"&&c.layer===l.layer&&this.obstacleIndex.collides({start:c,end:l,layer:c.layer,width:Math.max(c.width,l.width),connectionNames:i,ignoreTraceIndex:this.traceIndex,ignoreTraceIndices:r,ignoreRouteRange:s,obstacleClearance:this.getDesiredPadClearance(t.traceWidth)}))return!0}return this.layerRouteBoundaryCollides(t,e)}getFixedViasOutsideInterval(t,e){return t.route.flatMap((n,o)=>n.route_type!=="via"||o>=e.startIndex&&o<=e.endIndex?[]:[{point:{x:n.x,y:n.y},padDiameter:n.via_diameter??.6,holeDiameter:n.via_hole_diameter??this.obstacleIndex.defaultViaHoleDiameter}])}layerRouteBoundaryCollides(t,e){const n=this.traces[this.traceIndex],o=this.layerAttempt,i=t.route.find(a=>a.route_type==="wire");let r;for(let a=t.route.length-1;a>=0;a--){const A=t.route[a];if(A?.route_type==="wire"){r=A;break}}if(!i||!r)return!0;const s=[{outside:n.route[o.interval.startIndex-1],inside:i},{outside:n.route[o.interval.endIndex+1],inside:r}];for(const a of s)if(Sa(a.outside)&&a.outside.layer===a.inside.layer&&this.obstacleIndex.collides({start:a.outside,end:a.inside,layer:a.inside.layer,width:Math.max(a.outside.width,a.inside.width),connectionNames:this.getTraceConnectionNames(n),ignoreTraceIndex:this.traceIndex,ignoreTraceIndices:e?o.softTraceIndices:void 0,ignoreRouteRange:{start:Math.max(0,o.interval.startIndex-1),end:Math.min(n.route.length-1,o.interval.endIndex+1)},obstacleClearance:this.getDesiredPadClearance(t.traceWidth)}))return!0;return!1}layerRouteImprovesInterval(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval,o=this.getRouteQuality(e.route.slice(n.startIndex,n.endIndex+1)),i=this.getRouteQuality(t.route);return i.length<=o.length+10+Ki&&i.deficitArea<=o.deficitArea-Math.max(.05,.1*o.deficitArea)}getRouteQuality(t){let e=0,n=0;for(let o=0;o<t.length-1;o++){const i=t[o],r=t[o+1];if(!Sa(i)||!Sa(r)||i.layer!==r.layer)continue;const s=Aa(i,r),a=Math.min(i.width,r.width);e+=s,n+=s*Math.max(0,this.nominalTraceWidth-a)}return{length:e,deficitArea:n}}getLayerInflationCorridor(t){const e=[];for(let n=0;n<t.route.length;n++){const o=t.route[n];if(o?.route_type==="via"){for(const r of this.obstacleIndex.boardLayers)e.push({start:o,end:o,layer:r,width:o.via_diameter??.6});continue}const i=t.route[n+1];o?.route_type==="wire"&&i?.route_type==="wire"&&o.layer===i.layer&&e.push({start:o,end:i,layer:o.layer,width:Math.max(o.width,i.width)})}return e}startPendingLayerInflation(){const t=this.pendingLayerOutput;if(!t||this.pendingLayerPushCount>=2)return!1;const e=this.getLayerInflationCorridor(t);return e.length!==0&&(this.pendingLayerPushCount++,this.attemptedInflationCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem,traces:this.traces,powerTraceIndex:this.traceIndex,nominalPowerWidth:t.traceWidth,mutableTraceIndices:this.mutableBlockerTraceIndices,corridor:e,maxRerouteLength:10},this.connectionNameResolver),this.phase="try-trace-inflation",!0)}applyLayerRoute(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval,o=this.createLayerRouteReplacement(t);e.route.splice(n.startIndex,n.endIndex-n.startIndex+1,...o),t.viaCount>0&&this.layerReroutedTraceCount++,this.layerRerouteCountByTrace.set(this.traceIndex,(this.layerRerouteCountByTrace.get(this.traceIndex)??0)+1),this.reroutedSegmentCount++,this.insertedViaCount+=t.viaCount,t.viaCount>0&&(this.neckedLayerSegmentCount+=o.filter(i=>i.route_type==="wire"&&i.width<this.nominalTraceWidth-Ki).length),this.routeSegmentIndex=n.startIndex,this.currentIntervals=[],this.layerAttempt=null,this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.phase="evaluate-segment"}createLayerRouteReplacement(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval,o=e.route[n.startIndex],i=e.route[n.endIndex],r=structuredClone(t.route),s=r.findIndex(A=>A.route_type==="wire");let a=-1;for(let A=r.length-1;A>=0;A--)if(r[A]?.route_type==="wire"){a=A;break}return s>=0&&(r[s]={...o,...r[s]}),a>=0&&(r[a]={...i,...r[a]}),r}layerRoutePreservesSameNetContacts(t){const e=this.traces[this.traceIndex],n=this.layerAttempt.interval;return this.routeReplacementPreservesSameNetContacts(e,n,this.createLayerRouteReplacement(t))}startTraceInflation(t,e){const n=t.route[e],o=t.route[e+1];if(!Sa(n)||!Sa(o))return!1;const i=Math.min(n.width,o.width),r=this.findBestPushableInflationWidth(t,e,i);if(!r)return!1;const s=this.getLocalInflationCorridor(t,e,r);if(s.length===0)return!1;const a=[this.traceIndex,n.x,n.y,o.x,o.y].join(":"),A=this.inflationAttemptsBySegment.get(a)??0;return!(A>=2)&&(this.inflationAttemptsBySegment.set(a,A+1),this.activeInflationKey=a,this.activeInflationWidth=r,this.attemptedInflationCount++,this.activeSubSolver=new pH({simpleRouteJson:this.inputProblem,traces:this.traces,powerTraceIndex:this.traceIndex,nominalPowerWidth:r,mutableTraceIndices:this.mutableBlockerTraceIndices,corridor:s,maxRerouteLength:10},this.connectionNameResolver),this.phase="try-trace-inflation",!0)}hasOnlyPushableTraceBlockers(t,e,n){const o=Math.max(0,e-1),i=Math.min(t.route.length-2,e+1),r=new Set;for(let s=o;s<=i;s++){const a=t.route[s],A=t.route[s+1];if(!Sa(a)||!Sa(A)||a.layer!==A.layer)continue;const c={start:a,end:A,layer:a.layer,width:n,connectionNames:this.getTraceConnectionNames(t),ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:o,end:i+1},obstacleClearance:this.getDesiredPadClearance(n)},l=this.obstacleIndex.findCollisions(c);if(l.length===0&&this.obstacleIndex.collides(c))return!1;for(const u of l){if(u.kind!=="trace"||u.traceIndex===void 0)return!1;const g=this.traces[u.traceIndex];if(!g)return!1;const h=this.findConnectionForTrace(g);if(!h||(h.nominalTraceWidth??h.width??this.inputProblem.nominalTraceWidth??this.inputProblem.minTraceWidth)>=n-Ki)return!1;r.add(u.traceIndex)}}return r.size>0&&r.size<=2}findBestPushableInflationWidth(t,e,n){const o=this.nominalTraceWidth>=.5?.05:.0125;for(let i=this.nominalTraceWidth;i>n+Ki;i-=o){const r=Number(i.toFixed(6));if(this.hasOnlyPushableTraceBlockers(t,e,r))return r}return null}stepActiveInflationSolver(){const t=this.activeSubSolver;if(t.step(),t.solved||t.failed){if(t.solved){const e=t.getOutput(),n=e&&this.sameNetContactsArePreserved(this.traces[e.pushedTraceIndex].route,e.traces[e.pushedTraceIndex].route,this.getTraceConnectionNames(this.traces[e.pushedTraceIndex]),e.pushedTraceIndex);if(e&&n)return this.traces=e.traces,this.pushedTraceCount++,this.expansionPushedTraceIndices.add(e.pushedTraceIndex),e.strategy==="elastic"&&this.elasticPushedTraceCount++,this.activeSubSolver=null,this.activeInflationKey=null,this.activeInflationWidth=null,this.rebuildObstacleIndex(),this.pendingLayerOutput?!this.layerRouteReplacementCollides(this.pendingLayerOutput,!1)&&this.layerRoutePreservesSameNetContacts(this.pendingLayerOutput)?void this.applyLayerRoute(this.pendingLayerOutput):this.startPendingLayerInflation()?void 0:(this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.layerAttempt&&this.layerAttempt.offsetCursor++,void(this.phase="try-layer-candidate")):void(this.phase="evaluate-segment");e&&!n&&this.sameNetContactRejectionCount++}if(this.retainFailedSubSolver(t),this.activeInflationKey&&this.inflationAttemptsBySegment.set(this.activeInflationKey,2),this.activeInflationKey=null,this.activeInflationWidth=null,this.activeSubSolver=null,this.pendingLayerOutput)return this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.layerAttempt&&this.layerAttempt.offsetCursor++,void(this.phase="try-layer-candidate");this.phase="evaluate-segment"}}getLocalInflationCorridor(t,e,n){const o=t.route[e],i=t.route[e+1];if(!Sa(o)||!Sa(i)||o.layer!==i.layer)return[];const r=th(4*n,2,4),s=r/2;let a=e,A=0;for(;a>0;){const h=t.route[a-1],d=t.route[a];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(A+p>s+Ki)break;A+=p,a--}let c=e+1,l=0;for(;c<t.route.length-1;){const h=t.route[c],d=t.route[c+1];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(l+p>s+Ki)break;l+=p,c++}let u=r-A-l;for(;u>Ki&&a>0;){const h=t.route[a-1],d=t.route[a];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(p>u+Ki)break;u-=p,a--}for(;u>Ki&&c<t.route.length-1;){const h=t.route[c],d=t.route[c+1];if(!Sa(h)||!Sa(d)||h.layer!==d.layer)break;const p=Aa(h,d);if(p>u+Ki)break;u-=p,c++}const g=[];for(let h=a;h<c;h++){const d=t.route[h],p=t.route[h+1];Sa(d)&&Sa(p)&&d.layer===p.layer&&g.push({start:d,end:p,layer:d.layer,width:n})}return g}applyGridRoute(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=this.createGridRouteReplacement(t);e.route.splice(n.startIndex,n.endIndex-n.startIndex+1,...o),this.reroutedSegmentCount++,this.routeSegmentIndex=n.startIndex+o.length-1,this.currentIntervals=[],this.phase="evaluate-segment"}createGridRouteReplacement(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=e.route[n.startIndex],i=e.route[n.endIndex],r=t.points.map(s=>({route_type:"wire",x:s.x,y:s.y,width:t.traceWidth,layer:o.layer}));return r[0].width=Math.max(o.width,t.traceWidth),r[r.length-1].width=Math.max(i.width,t.traceWidth),r}gridRoutePreservesSameNetContacts(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor];return this.routeReplacementPreservesSameNetContacts(e,n,this.createGridRouteReplacement(t))}routeReplacementPreservesSameNetContacts(t,e,n){const o=this.getTraceConnectionNames(t),i=this.getSameNetContactIds(t.route.slice(e.startIndex,e.endIndex+1),o,this.traceIndex),r=new Set([...this.getSameNetContactIds(t.route.slice(0,e.startIndex+1),o,this.traceIndex),...this.getSameNetContactIds(t.route.slice(e.endIndex),o,this.traceIndex)]),s=new Set([...i].filter(A=>!r.has(A)));if(s.size===0)return!0;const a=this.getSameNetContactIds(n,o,this.traceIndex);return[...s].every(A=>a.has(A))}sameNetContactsArePreserved(t,e,n,o){const i=this.getSameNetContactIds(t,n,o);if(i.size===0)return!0;const r=this.getSameNetContactIds(e,n,o);return[...i].every(s=>r.has(s))}getSameNetContactIds(t,e,n){const o=new Set;for(let i=0;i<t.length;i++){const r=t[i];if(r?.route_type==="via"){for(const a of this.getViaLayers(r))for(const A of this.obstacleIndex.getSameNetCopperContactIds({start:r,end:r,layer:a,width:r.via_diameter??.6,connectionNames:e,ignoreTraceIndex:n}))o.add(A);continue}const s=t[i+1];if(r?.route_type==="wire"&&s?.route_type==="wire"&&r.layer===s.layer)for(const a of this.obstacleIndex.getSameNetCopperContactIds({start:r,end:s,layer:r.layer,width:Math.min(r.width,s.width),connectionNames:e,ignoreTraceIndex:n}))o.add(a)}return o}getViaLayers(t){const e=this.obstacleIndex.boardLayers.indexOf(t.from_layer),n=this.obstacleIndex.boardLayers.indexOf(t.to_layer);return e<0||n<0?this.obstacleIndex.boardLayers:this.obstacleIndex.boardLayers.slice(Math.min(e,n),Math.max(e,n)+1)}gridRouteReplacementCollides(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=e.route[n.startIndex],i=e.route[n.endIndex],r=this.getTraceConnectionNames(e);for(let s=0;s<t.points.length-1;s++){const a=Math.max(t.traceWidth,s===0?o.width:0,s===t.points.length-2?i.width:0);if(this.obstacleIndex.collides({start:t.points[s],end:t.points[s+1],layer:o.layer,width:a,connectionNames:r,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:Math.max(0,n.startIndex-1),end:Math.min(e.route.length-1,n.endIndex+1)},obstacleClearance:this.getDesiredPadClearance(a)}))return!0}return!1}gridRouteBoundaryCollides(t){const e=this.traces[this.traceIndex],n=this.currentIntervals[this.intervalCursor],o=this.getTraceConnectionNames(e),i=[{startIndex:n.startIndex-1,endIndex:n.startIndex},{startIndex:n.endIndex,endIndex:n.endIndex+1}];for(const r of i){const s=e.route[r.startIndex],a=e.route[r.endIndex];if(Sa(s)&&Sa(a)&&s.layer===a.layer&&this.obstacleIndex.collides({start:s,end:a,layer:s.layer,width:Math.max(s.width,a.width,t.traceWidth),connectionNames:o,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:r.startIndex,end:r.endIndex},obstacleClearance:this.getDesiredPadClearance(Math.max(s.width,a.width,t.traceWidth))}))return!0}return!1}canExpandSegmentAndEndpoints(t,e,n,o=this.nominalTraceWidth){const i=Math.max(0,e-1),r=Math.min(t.route.length-2,e+1);for(let s=i;s<=r;s++){const a=t.route[s],A=t.route[s+1];if(!Sa(a)||!Sa(A)||a.layer!==A.layer)continue;const c=s<=e+1&&s+1>=e,l=Math.max(a.width,A.width,c?o:0);if(this.obstacleIndex.collides({start:a,end:A,layer:a.layer,width:l,connectionNames:n,ignoreTraceIndex:this.traceIndex,ignoreRouteRange:{start:i,end:r+1},obstacleClearance:this.getDesiredPadClearance(l)}))return!1}return!0}findMaximumSafeInPlaceWidth(t,e,n){const o=t.route[e],i=t.route[e+1];if(!Sa(o)||!Sa(i))return 0;const r=Math.min(o.width,i.width);if(this.probeInPlaceWidth(t,e,n,this.nominalTraceWidth))return this.nominalTraceWidth;let s=r,a=this.nominalTraceWidth;for(let l=0;l<7;l++){const u=(s+a)/2;if(u<=s+Ki)break;this.probeInPlaceWidth(t,e,n,u)?s=u:a=u}const A=this.nominalTraceWidth>=.5?.025:.0125,c=Math.max(r,Math.floor((s+Ki)/A)*A);return c>r+Ki&&this.probeInPlaceWidth(t,e,n,c)?c:r}probeInPlaceWidth(t,e,n,o){return this.inPlaceWidthProbeCount++,this.canExpandSegmentAndEndpoints(t,e,n,o)}maximizeGridRouteWidth(t){if(t.traceWidth>=this.nominalTraceWidth-Ki)return t;let e=t.traceWidth,n=this.nominalTraceWidth;for(let r=0;r<7;r++){const s=(e+n)/2,a={...t,traceWidth:s};this.gridRouteReplacementCollides(a)||this.gridRouteBoundaryCollides(a)?n=s:e=s}const o=this.nominalTraceWidth>=.5?.025:.0125,i=Math.max(t.traceWidth,Math.floor((e+Ki)/o)*o);if(i>t.traceWidth+Ki){const r={...t,traceWidth:i};if(!this.gridRouteReplacementCollides(r)&&!this.gridRouteBoundaryCollides(r))return this.pathWidthUpgradeCount++,r}return t}getExponentialIntervalCandidates(t,e,n){const o=this.getExponentialIndices(t,e,-1,n,5),i=this.getExponentialIndices(t,e,1,n,10).filter(s=>s>e),r=[];for(const s of o)for(const a of i){const A=this.getRouteIntervalLength(t,s,a);A>10.000001||r.push({startIndex:s,endIndex:a,routeLength:A})}return r.sort((s,a)=>s.routeLength-a.routeLength).filter((s,a,A)=>A.findIndex(c=>c.startIndex===s.startIndex&&c.endIndex===s.endIndex)===a).slice(0,10).map(({startIndex:s,endIndex:a})=>({startIndex:s,endIndex:a}))}getExponentialIndices(t,e,n,o,i){const r=[e];let s=0,a=Math.max(o,.3),A=e,c=e;for(;;){const l=A+n;if(l<0||l>=t.route.length)break;const u=t.route[A],g=t.route[l];if(!Sa(u)||!Sa(g)||u.layer!==g.layer)break;const h=Aa(u,g);if(s+h>i+Ki)break;s+=h,A=l,c=l,s+Ki>=a&&(r.push(l),a*=2)}return r.includes(c)||r.push(c),r}getRouteIntervalLength(t,e,n){let o=0;for(let i=e;i<n;i++){const r=t.route[i],s=t.route[i+1];if(!Sa(r)||!Sa(s)||r.layer!==s.layer)return Number.POSITIVE_INFINITY;o+=Aa(r,s)}return o}getCandidateWidths(t){const e=this.inputProblem.minTraceWidth;return w7t([t,.875*t,.75*t,.625*t,.5*t,.375*t,.25*t,e]).filter(n=>n>=e-Ki)}getGridResolutions(t){return w7t([Math.max(.1,Math.min(.5,t/2)),Math.max(.1,Math.min(.25,t/3))])}resolveNominalTraceWidth(t){const e=this.findConnectionForTrace(t);return Math.max(e?.nominalTraceWidth??e?.width??this.inputProblem.nominalTraceWidth??this.inputProblem.minTraceWidth,this.inputProblem.minTraceWidth)}getDesiredPadClearance(t=this.nominalTraceWidth){const e=Math.max(this.inputProblem.defaultObstacleMargin??0,this.inputProblem.minTraceToPadEdgeClearance??0,.1);return t<.499999||this.phase!=="cleanup"?e:Math.max(e,this.options.powerTraceToPadClearance??t/2)}findConnectionForTrace(t){const e=this.connectionByTraceId.get(t.pcb_trace_id);if(e!==void 0)return e??void 0;const n=this.getTraceConnectionNames(t),o=this.inputProblem.connections.find(i=>this.connectionMatchesTrace(i,n))??null;return this.connectionByTraceId.set(t.pcb_trace_id,o),o??void 0}getOwnedTraceIndices(){return[...this.selectedOwnedTraceIndices]}connectionMatchesTrace(t,e){return[t.name,t.source_trace_id,t.rootConnectionName,t.netConnectionName,...t.mergedConnectionNames??[]].filter(n=>!!n).some(n=>e.includes(n))}getTraceConnectionNames(t){return[t.connection_name,t.source_trace_id,t.rootConnectionName,...t.mergedConnectionNames??[]].filter(e=>!!e)}traceMeetsNominalWidth(t,e){return t.route.every(n=>n.route_type!=="wire"||n.width>=e-Ki)}findNextUnderWidthSegment(t,e,n){for(let o=e;o<t.route.length-1;o++){const i=t.route[o],r=t.route[o+1];if(Sa(i)&&Sa(r)&&i.layer===r.layer&&(i.width<n-Ki||r.width<n-Ki))return o}return-1}getMutatedImmutableTraceIds(t){return this.immutableTraceIndices.flatMap(e=>{const n=t[e];return JSON.stringify(n)===this.initialImmutableTraceSignatures.get(e)?[]:[n?.pcb_trace_id??this.traces[e]?.pcb_trace_id??String(e)]})}getImmutableViaViolationSignatures(t){const e=new Set;if(this.immutableTraceIndices.length===0)return e;const n=new Tv(this.inputProblem,t),o=new ub(this.inputProblem,t,void 0,[],n);for(const i of this.immutableTraceIndices){const r=t[i];if(!r)continue;const s=[r.pcb_trace_id,r.connection_name,r.source_trace_id,r.rootConnectionName,...r.mergedConnectionNames??[],...r.connectsTo??[]].filter(a=>!!a);for(let a=0;a<r.route.length;a++){const A=r.route[a];if(A?.route_type!=="via")continue;const c=`${r.pcb_trace_id}:${a}`,l=o.getViaViolationSignatures({point:A,layers:o.boardLayers,padDiameter:A.via_diameter??this.inputProblem.min_via_pad_diameter??this.inputProblem.minViaPadDiameter??this.inputProblem.minViaDiameter??.6,holeDiameter:A.via_hole_diameter??o.defaultViaHoleDiameter,connectionNames:s,ignoreTraceIndex:i,ignoreRouteRange:{start:a,end:a},blockSameNetObstacles:!0,sameNetObstacleClearance:0});for(const u of l)e.add(`${c}|${u}`)}}return e}countViolatingImmutableVias(t){return new Set([...t].map(e=>e.split("|")[0])).size}acceptConnectivityCheckpoint(t,e){this.connectivityValidationCount++;let n=!1,o=!1;try{const i=this.connectivityInvariant.validate(t),r=this.getMutatedImmutableTraceIds(t),s=this.getImmutableViaViolationSignatures(t),a=[...s].filter(c=>!this.lastSafeImmutableViaViolationSignatures.has(c)),A=a.length>0;if(n=!i.safe,o=r.length>0||A,this.connectivityValidationError??=i.validationError??null,!n&&!o)return this.traces=structuredClone(t),this.lastConnectivitySafeTraces=structuredClone(t),this.remainingImmutableViaViolationCount=this.countViolatingImmutableVias(s),this.remainingImmutableViaViolationPairCount=s.size,this.lastSafeImmutableViaViolationSignatures=s,this.connectivityInvariant=new Bce(this.inputProblem,this.lastConnectivitySafeTraces),!0;this.immutableTraceMutationIds=[...new Set([...this.immutableTraceMutationIds,...r])],A&&(this.immutableViaViolationRollbackCount++,this.attemptedImmutableViaViolationCount=this.countViolatingImmutableVias(s),this.attemptedImmutableViaViolationPairCount=s.size,this.immutableViaViolationRegressionIds=[...new Set([...this.immutableViaViolationRegressionIds,...a])]),this.connectivityRegressionEndpointIds=[...new Set([...this.connectivityRegressionEndpointIds,...i.regressions.flatMap(c=>c.baselineEndpointLabels)])]}catch(i){n=!0,this.connectivityValidationError=i instanceof Error?i.message:String(i)}return n&&(this.connectivityRollbackCount++,this.connectivityRollbackPhases.includes(e)||this.connectivityRollbackPhases.push(e)),o&&(this.immutableSafetyRollbackCount++,this.immutableSafetyRollbackPhases.includes(e)||this.immutableSafetyRollbackPhases.push(e)),e==="expansion"?n?this.rollbackConnectivityRegressedExpansion():this.rollbackImmutableUnsafeExpansion():this.restoreLastConnectivitySafeTraces(),this.remainingImmutableViaViolationCount=this.countViolatingImmutableVias(this.lastSafeImmutableViaViolationSignatures),this.remainingImmutableViaViolationPairCount=this.lastSafeImmutableViaViolationSignatures.size,!1}rebuildObstacleIndex(){this.obstacleIndex=new ub(this.inputProblem,this.traces,this.traceIndex,[],this.connectionNameResolver)}retainFailedSubSolver(t){this.failedSubSolverCount++,this.failedSubSolvers??=[],this.failedSubSolvers.length<16?this.failedSubSolvers.push(t):this.failedSubSolvers[15]=t}tryFinalAcceptance(){this.finalAcceptanceUsed=!0;let t=!1;this.activeSubSolver instanceof JSe?(this.activeSubSolver.tryFinalAcceptance(),this.adoptCleanupOutput(this.activeSubSolver),t=!0):this.activeSubSolver instanceof WSe&&(this.activeSubSolver.tryFinalAcceptance(),this.adoptClearanceRepairOutput(this.activeSubSolver),t=!0),t||this.phase==="cleanup"||this.phase==="repair-trace-clearance"||this.phase==="complete"||this.discardInFlightExpansion(),this.activeSubSolver=null,this.pendingLayerOutput=null,this.pendingLayerPushCount=0,this.activeInflationKey=null,this.activeInflationWidth=null,this.layerAttempt=null,this.acceptConnectivityCheckpoint(this.traces,"final"),this.traceIndex=this.traces.length,this.phase="complete",this.rebuildObstacleIndex(),this.progress=1,this.solved=!0,this.stats=this.createStats()}createStats(){return{phase:this.phase,pass:this.passIndex+1,completedPassCount:this.completedPassCount,lastNormalizedWidthDeficitGain:this.lastNormalizedWidthDeficitGain,normalizedWidthDeficitGainByPass:[...this.normalizedWidthDeficitGainByPass],plateauReached:this.plateauReached,traceIndex:this.traceIndex,traceCount:this.traces.length,selectedTraceCount:this.traceOrder.length,routeSegmentIndex:this.routeSegmentIndex,nominalTraceWidth:this.nominalTraceWidth,intervalCursor:this.intervalCursor,intervalCount:this.currentIntervals.length,candidateWidth:this.candidateWidths[this.widthCursor],gridSize:this.gridResolutions[this.resolutionCursor],gridOffsetVariant:this.offsetCursor,keptTraceCount:this.keptTraceCount,recreatedTraceCount:this.recreatedTraceCount,expandedSegmentCount:this.expandedSegmentCount,intermediateExpandedSegmentCount:this.intermediateExpandedSegmentCount,pathWidthUpgradeCount:this.pathWidthUpgradeCount,inPlaceWidthProbeCount:this.inPlaceWidthProbeCount,reroutedSegmentCount:this.reroutedSegmentCount,unresolvedSegmentCount:this.unresolvedSegmentCount,attemptedGridCount:this.attemptedGridCount,attemptedLayerGridCount:this.attemptedLayerGridCount,attemptedInflationCount:this.attemptedInflationCount,activeInflationWidth:this.activeInflationWidth,pushedTraceCount:this.pushedTraceCount,elasticPushedTraceCount:this.elasticPushedTraceCount,layerReroutedTraceCount:this.layerReroutedTraceCount,insertedViaCount:this.insertedViaCount,neckedLayerSegmentCount:this.neckedLayerSegmentCount,removedViaPairCount:this.removedViaPairCount,removedViaCount:this.removedViaCount,simplifiedPathCount:this.simplifiedPathCount,normalizedSegmentCount:this.normalizedSegmentCount,cleanupClearanceShoveCount:this.cleanupClearanceShoveCount,relocatedViaCount:this.relocatedViaCount,unresolvedViaCount:this.unresolvedViaCount,initialImmutableViaViolationCount:this.initialImmutableViaViolationCount,remainingImmutableViaViolationCount:this.remainingImmutableViaViolationCount,initialImmutableViaViolationPairCount:this.initialImmutableViaViolationPairCount,remainingImmutableViaViolationPairCount:this.remainingImmutableViaViolationPairCount,skippedImmutableViaRepairCount:this.remainingImmutableViaViolationCount,immutableViaViolationRollbackCount:this.immutableViaViolationRollbackCount,attemptedImmutableViaViolationCount:this.attemptedImmutableViaViolationCount,attemptedImmutableViaViolationPairCount:this.attemptedImmutableViaViolationPairCount,immutableViaViolationRegressionIds:[...this.immutableViaViolationRegressionIds],immutableTraceMutationIds:[...this.immutableTraceMutationIds],padClearanceRerouteCount:this.padClearanceRerouteCount,unresolvedPadClearanceCount:this.unresolvedPadClearanceCount,repairedTraceClearanceSegmentCount:this.repairedTraceClearanceSegmentCount,repairedPadNeckSegmentCount:this.repairedPadNeckSegmentCount,unresolvedTraceClearanceSegmentCount:this.unresolvedTraceClearanceSegmentCount,sameNetContactRejectionCount:this.sameNetContactRejectionCount,connectivityValidationCount:this.connectivityValidationCount,connectivityRollbackCount:this.connectivityRollbackCount,connectivityRollbackPhases:[...this.connectivityRollbackPhases],immutableSafetyRollbackCount:this.immutableSafetyRollbackCount,immutableSafetyRollbackPhases:[...this.immutableSafetyRollbackPhases],connectivityRegressionEndpointIds:[...this.connectivityRegressionEndpointIds],connectivityValidationError:this.connectivityValidationError,connectivityRollbackMutationStats:this.connectivityRollbackMutationStats===null?null:{...this.connectivityRollbackMutationStats},immutableSafetyRollbackMutationStats:this.immutableSafetyRollbackMutationStats===null?null:{...this.immutableSafetyRollbackMutationStats},expansionPushedTraceIndices:[...this.expansionPushedTraceIndices],cleanupMutatedTraceIndices:[...this.cleanupMutatedTraceIndices],discardedExpansionMutationStats:this.discardedExpansionMutationStats===null?null:{...this.discardedExpansionMutationStats},initialPadClearanceViolationCount:this.initialPadClearanceViolationCount,remainingPadClearanceViolationCount:this.remainingPadClearanceViolationCount,initialPadClearanceViolationCountByClearance:{...this.initialPadClearanceViolationCountByClearance},remainingPadClearanceViolationCountByClearance:{...this.remainingPadClearanceViolationCountByClearance},budgetLimitedExpansion:this.budgetLimitedExpansion,finalAcceptanceUsed:this.finalAcceptanceUsed,cleanupCompleted:this.cleanupCompleted,clearanceRepairCompleted:this.clearanceRepairCompleted,cleanupBestEffortAccepted:this.cleanupBestEffortAccepted,clearanceRepairBestEffortAccepted:this.clearanceRepairBestEffortAccepted,cleanupStatus:this.connectivityRollbackPhases.includes("cleanup")?"connectivity_rollback":this.immutableSafetyRollbackPhases.includes("cleanup")?"immutable_safety_rollback":this.cleanupBestEffortAccepted?"budget_limited":this.cleanupCompleted?"completed":this.phase==="cleanup"?"in_progress":"not_started",clearanceRepairStatus:this.connectivityRollbackPhases.includes("clearance-repair")?"connectivity_rollback":this.immutableSafetyRollbackPhases.includes("clearance-repair")?"immutable_safety_rollback":this.clearanceRepairBestEffortAccepted?"budget_limited":this.clearanceRepairCompleted?"completed":this.phase==="repair-trace-clearance"?"in_progress":"not_started",cleanupIterationBudget:this.cleanupIterationBudget,clearanceRepairIterationBudget:this.clearanceRepairIterationBudget,completionReason:this.phase==="complete"||this.solved?this.connectivityRollbackCount>0?"connectivity_rollback":this.immutableSafetyRollbackCount>0?"immutable_safety_rollback":this.connectivityValidationError?"connectivity_validation_unavailable":this.finalAcceptanceUsed?"total_iteration_budget":this.budgetLimitedExpansion?"expansion_budget":this.cleanupBestEffortAccepted?"cleanup_budget":this.clearanceRepairBestEffortAccepted?"clearance_repair_budget":this.remainingImmutableViaViolationCount>0?"immutable_via_violations_preserved":"completed":null,resultStatus:this.finalAcceptanceUsed||this.budgetLimitedExpansion||this.cleanupBestEffortAccepted||this.clearanceRepairBestEffortAccepted||this.connectivityRollbackCount>0||this.immutableSafetyRollbackCount>0||this.connectivityValidationError!==null||this.remainingImmutableViaViolationCount>0?"best_effort":"complete",failedSubSolverCount:this.failedSubSolverCount,retainedFailedSubSolverCount:this.failedSubSolvers?.length??0,expansionIterationBudget:this.getExpansionIterationBudget(),finalizationIterationReserve:this.getFinalizationIterationReserve(),spatialIndexRectCount:this.obstacleIndex.items.length}}computeProgress(){return this.solved||this.phase==="complete"?1:this.budgetLimitedExpansion?.99:this.traceOrder.length===0?1:Math.min(.99,(this.passIndex+Math.max(0,this.traceOrderCursor)/this.traceOrder.length)/this.maxPassCount)}getConstructorParams(){return[this.inputProblem,this.options]}getOutput(){return structuredClone(this.lastConnectivitySafeTraces)}visualize(){const t=[],e=[];for(let n=0;n<this.traces.length;n++){const o=this.traces[n],i=this.resolveNominalTraceWidth(o);for(const r of o.route)r.route_type==="via"&&e.push({center:r,radius:(r.via_diameter??.6)/2,fill:"#d4a017",stroke:"#7a5700"});for(let r=0;r<o.route.length-1;r++){const s=o.route[r],a=o.route[r+1];if(!Sa(s)||!Sa(a)||s.layer!==a.layer)continue;const A=n===this.traceIndex&&r===this.routeSegmentIndex,c=s.width>=i-Ki&&a.width>=i-Ki,l=s.layer==="bottom";t.push({points:[s,a],strokeColor:A?"#ff8c00":c?l?"#2468c7":"#169c45":l?"#8b4bb8":"#cc3344",strokeWidth:Math.max(s.width,a.width)})}}return{coordinateSystem:"cartesian",title:`Power trace expander: ${this.phase}`,lines:t,points:[],circles:e,rects:this.obstacleIndex.items.filter(n=>n.kind==="obstacle").slice(0,2e3).map(n=>({center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:n.maxX-n.minX,height:n.maxY-n.minY,fill:"rgba(80,80,80,0.12)",stroke:"rgba(80,80,80,0.35)"})),texts:[]}}},P7t=class extends yr{constructor(t,e={}){if(super(),this.inputSrj=t,this.options=e,this.powerTraceExpanderSolver=new fgo(t,e),e.onlyConnectionNames?.length===0)return this.MAX_ITERATIONS=1,this.progress=1,this.solved=!0,void(this.stats={selectedTraceCount:0,bypassed:!0});this.MAX_ITERATIONS=this.powerTraceExpanderSolver.MAX_ITERATIONS+1}inputSrj;options;powerTraceExpanderSolver;_step(){const t=this.powerTraceExpanderSolver;if(t.step(),this.progress=t.progress,this.stats=t.stats,t.failed)return this.error=t.error,void(this.failed=!0);t.solved&&(this.solved=!0)}getConstructorParams(){return[this.inputSrj,this.options]}getOutput(){if(!this.solved)throw new Error("Cannot get power trace expansion output before solving");return this.powerTraceExpanderSolver.getOutput()}visualize(){return mx({...this.inputSrj,traces:this.getOutput()},{traceColorMode:"layer"})}},jSe=({connections:t,originalConnections:e,layerCount:n,obstacles:o,defaultViaHoleDiameter:i,connMap:r})=>{const s=new Map;for(const u of e)s.has(u.name)||s.set(u.name,u.__netConnectionName);const a=t.map(u=>{if(u.pointsToConnect.length!==2)throw new Error(`Expected Pipeline7 output connection "${u.name}" to have two points, got ${u.pointsToConnect.length}`);const[g,h]=u.pointsToConnect;return{connection:u,connectsTo:[g?.pointId,h?.pointId].filter(d=>!!d),outputConnectionName:u.__netConnectionName??s.get(u.name)??u.__rootConnectionNames?.[0]??u.name}}),A=o.filter(u=>(u.__zLayers?.length??u.layers?.length??0)>1),c=new Map,l=u=>{let g=c.get(u.connectionName);g||(g=new Map,c.set(u.connectionName,g));const h=g.get(u.rootConnectionName);if(h)return h;const d=A.filter(p=>Hse(p,u,r));return g.set(u.rootConnectionName,d),d};return u=>{const g=[],h=new Map;for(const d of u){const p=h.get(d.connectionName);p?p.push(d):h.set(d.connectionName,[d])}for(const{connection:d,connectsTo:p,outputConnectionName:m}of a){const _=h.get(d.name)??[];for(let f=0;f<_.length;f+=1){const I=_[f];g.push({type:"pcb_trace",pcb_trace_id:`${d.name}_${f}`,connection_name:m,connectsTo:p,route:nB(I,n,{connectionPoints:d.pointsToConnect,defaultViaHoleDiameter:i,connectedMultilayerObstacles:l(I),connMap:r})})}}return g}},M7t=({connections:t,originalConnections:e,hdRoutes:n,layerCount:o,obstacles:i,defaultViaHoleDiameter:r,connMap:s})=>jSe({connections:t,originalConnections:e,layerCount:o,obstacles:i,defaultViaHoleDiameter:r,connMap:s})(n),D7t=t=>{const e=Math.max(t.minTraceWidth+.1,2*t.minTraceWidth);return t.connections.flatMap(n=>(n.nominalTraceWidth??t.nominalTraceWidth??t.minTraceWidth)+1e-6>=e?[n.name]:[])},N7t=(t,e,n=new Map(t.map(o=>[o.connectionName,o])))=>{const o=new Map(e.map(i=>[i.name,i]));return t.map(i=>{if(i.route.length===0)throw new Error(`Cannot lock PCB terminals for empty route "${i.connectionName}"`);const r=o.get(i.connectionName);if(!r)throw new Error(`Cannot lock PCB terminals: connection "${i.connectionName}" was not found`);if(r.pointsToConnect.length!==2)throw new Error(`Cannot lock PCB terminals for "${i.connectionName}": expected 2 connection points, found ${r.pointsToConnect.length}`);const s=n.get(i.connectionName)??i,a=new Map;for(const g of r.pointsToConnect)if(g.pcb_port_id){if(a.has(g.pcb_port_id))throw new Error(`Cannot lock duplicate PCB terminal "${g.pcb_port_id}" for "${i.connectionName}"`);a.set(g.pcb_port_id,g)}if(a.size===0)return i;const A=[s.startPcbPortId,s.endPcbPortId].filter(g=>g!==void 0);if(A.length===0)return i;if(new Set(A).size!==A.length||A.some(g=>!a.has(g)))throw new Error(`Cannot lock PCB terminals for "${i.connectionName}": route endpoint IDs do not match connection terminal IDs`);const c=s.startPcbPortId?a.get(s.startPcbPortId):void 0,l=s.endPcbPortId?a.get(s.endPcbPortId):void 0,u=i.route.map((g,h)=>{if(h===0&&c)return{...g,x:c.x,y:c.y,pcb_port_id:c.pcb_port_id};if(h===i.route.length-1&&l)return{...g,x:l.x,y:l.y,pcb_port_id:l.pcb_port_id};const d={...g};return delete d.pcb_port_id,d});return{...i,route:u}})},R7t=({originalSrj:t,newlyRoutedTraces:e,currentPreloadedTraces:n,expandedConnectionNames:o,resolveConnectedTraceAliases:i=!1})=>{const r=n??t.traces??[],s=i?Igo({originalSrj:t,newlyRoutedTraces:e,preloadedTraces:r,expandedConnectionNames:o}):new Set(r.filter(l=>o.includes(l.connection_name))),a=r.filter(l=>!s.has(l)),A=new Set([...e.map(l=>l.pcb_trace_id),...a.map(l=>l.pcb_trace_id)]),c=r.filter(l=>s.has(l)).map(l=>{const u=l.pcb_trace_id;let g=u,h=2;for(;A.has(g);)g=`${u}_power_expansion_${h++}`;return A.add(g),{...l,pcb_trace_id:g,__replaces_pcb_trace_id:l.__replaces_pcb_trace_id??l.pcb_trace_id}});return{...t,traces:[...e,...c],fixedTraces:a}},Igo=({originalSrj:t,newlyRoutedTraces:e,preloadedTraces:n,expandedConnectionNames:o})=>{const i=new Set(n.map(c=>c.pcb_trace_id)),r=new Set([...i,...e.map(c=>c.pcb_trace_id)]),s=e.map((c,l)=>{if(!i.has(c.pcb_trace_id))return c;const u=`__pipeline7_new_trace_${l}_${c.pcb_trace_id}`;let g=u,h=2;for(;r.has(g);)g=`${u}_${h++}`;return r.add(g),{...c,pcb_trace_id:g}}),a=new Tv({...t,traces:[...s,...n]}),A=new Set(a.canonicalize([...o]));return new Set(n.filter(c=>a.canonicalize([c.connection_name]).some(l=>A.has(l))))};function T7t(t){return new Set((t??[]).filter(e=>e._isComponentTopologyNode).map(e=>e.capacityMeshNodeId))}function k7t(t,e){return t.nodeIds.some(n=>e.has(n))}function Cgo({sharedEdgeSegments:t,componentCapacityMeshNodeIds:e}){return t.filter(n=>!k7t(n,e))}function Cp(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var F7t=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e;const n=mN(t);this.originalSrj=n,this.opts={...e};const o=this.opts;if(this.effort=o.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=o.maxNodeDimension??16,this.maxNodeRatio=o.maxNodeRatio??6,this.minNodeArea=o.minNodeArea??.1**2,this.visualizationTraceColorMode=o.visualizationTraceColorMode??"layer",this.setSimpleRouteJson(n),o.capacityDepth===void 0){const i=this.srj.bounds.maxX-this.srj.bounds.minX,r=this.srj.bounds.maxY-this.srj.bounds.minY,s=Math.max(i,r),a=o.targetMinCapacity??.5;o.capacityDepth=$Q(s,a)}this.cacheProvider=o.cacheProvider===void 0?tB():o.cacheProvider===null?null:o.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return"AutoroutingPipelineSolver7_MultiGraph"}preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;componentTopologyGeneratorSolver;topologyPlanningSolver;topologyMergingSolver;globalTopologyGeneratorSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityRepairSolver;highDensityStitchSolver;globalDrcForceImproveSolver;exactGeometryDrcForceImproveSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;lengthMatchingPostProcessingSolver;powerTraceExpansionSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;componentDetectionSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;visualizationTraceColorMode;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;sharedEdgeSegmentsWithNecessaryCrampedPortPoints;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[Cp("preprocessSimpleRouteJsonSolver",XAe,t=>[t.originalSrj,{traceColorMode:t.visualizationTraceColorMode}],{onSolved:t=>{t.setSimpleRouteJson(t.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),Cp("componentDetectionSolver",n7t,t=>[{inputSrj:t.srj}]),Cp("escapeViaLocationSolver",FAe,t=>[t.srj,{viaDiameter:t.viaDiameter,minTraceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=>{t.srjWithEscapeViaLocations=t.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),Cp("netToPointPairsSolver",rL,t=>{const e=t.srjWithEscapeViaLocations??t.srj;return[e,t.colorMap,JQ(e)]},{onSolved:t=>{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,t.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),Cp("topologyPlanningSolver",l7t,t=>[{inputSrj:t.srjWithPointPairs,componentDetectionOutput:t.componentDetectionSolver.getOutput(),viaDiameter:t.viaDiameter,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=>{t.topologyPlanningSolver.getOutput(),t.globalTopologyGeneratorSolver=t.topologyPlanningSolver.globalTopologySolver,t.componentTopologyGeneratorSolver=new u7t(t.topologyPlanningSolver)}}),Cp("topologyMergingSolver",c7t,t=>{const e=t.topologyPlanningSolver.getOutput();return[{layerCount:t.srj.layerCount,nodeGroups:[{groupId:"global",nodes:e.globalMeshNodes,isComponent:!1},...e.componentMeshNodes.map((n,o)=>({groupId:`component-${o}`,nodes:n,isComponent:!0}))]}]},{onSolved:t=>{t.capacityNodes=t.topologyMergingSolver.getOutput()}}),Cp("nodeDimensionSubdivisionSolver",vAe,t=>[t.capacityNodes,t.maxNodeDimension,t.maxNodeRatio,t.minNodeArea],{onSolved:t=>{t.capacityNodes=t.nodeDimensionSubdivisionSolver.outputNodes}}),Cp("edgeSolver",WQ,t=>[t.capacityNodes],{onSolved:t=>{t.capacityEdges=t.edgeSolver?.edges}}),Cp("availableSegmentPointSolver",kD,t=>[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!0}]),Cp("necessaryCrampedPortPointSolver",lJ,t=>{const e=T7t(t.capacityNodes);return[{capacityMeshNodes:t.capacityNodes.filter(n=>!e.has(n.capacityMeshNodeId)),sharedEdgeSegments:Cgo({sharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),componentCapacityMeshNodeIds:e}),simpleRouteJson:t.srjWithPointPairs}]},{onSolved:t=>{const e=T7t(t.capacityNodes);t.sharedEdgeSegmentsWithNecessaryCrampedPortPoints=(function({originalSharedEdgeSegments:n,filteredSharedEdgeSegments:o,componentCapacityMeshNodeIds:i}){const r=new Map(o.map(s=>[s.edgeId,s]));return n.map(s=>k7t(s,i)?s:r.get(s.edgeId)??s)})({originalSharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),filteredSharedEdgeSegments:t.necessaryCrampedPortPointSolver.getOutput(),componentCapacityMeshNodeIds:e})}}),Cp("portPointPathingSolver",kAe,t=>{const e=t.sharedEdgeSegmentsWithNecessaryCrampedPortPoints??t.necessaryCrampedPortPointSolver?.getOutput()??t.availableSegmentPointSolver.getOutput(),{graph:n,connections:o}=uJ({capacityMeshNodes:t.capacityNodes,layerCount:t.srj.layerCount,connectivityMap:t.connMap,segmentPortPoints:e.flatMap(i=>i.portPoints),simpleRouteJsonConnections:t.srjWithPointPairs.connections});return[{graph:n,connections:o,layerCount:t.srj.layerCount,effort:t.effort,preserveTerminalPcbPortIds:!0,minViaPadDiameter:t.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0,USE_SELECTIVE_RERIP_ROUTING:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),Cp("uniformPortDistributionSolver",kz,t=>[{nodeWithPortPoints:t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:t.minTraceWidth,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]),Cp("highDensityRouteSolver",HD,t=>{const e=t.uniformPortDistributionSolver?.getOutput()??[],n=t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],o=e.length>0?e:n;return t.highDensityNodePortPoints=structuredClone(o),[{nodePortPoints:o,nodePfById:new Map((t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(i=>[i.capacityMeshNodeId,t.portPointPathingSolver?.computeNodePf(i)??null])),colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount,useGrowShrinkHighDensityIntraNodeSolver:!0,preserveTerminalPcbPortIds:!0,growShrinkFallbackToInvalidGeometryOnFailure:!0,captureSearchDebug:!1}]}),Cp("highDensityForceImproveSolver",mJ,t=>[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityRouteSolver.routes,colorMap:t.colorMap,totalStepsPerNode:Math.max(12,Math.round(20*t.effort)),nodeAssignmentMargin:t.srj.defaultObstacleMargin??.2}]),Cp("highDensityRepairSolver",pW,t=>[{nodeWithPortPoints:t.highDensityNodePortPoints??[],hdRoutes:t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,obstacles:t.srj.obstacles,colorMap:t.colorMap,repairMargin:t.srj.defaultObstacleMargin??.2,maxSampleEntries:80}]),Cp("highDensityStitchSolver",$Ae,t=>[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensityRepairSolver?.getOutput()??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter,preserveTerminalPcbPortIds:!0}]),Cp("traceSimplificationSolver",j8,t=>[{hdRoutes:t.highDensityStitchSolver.mergedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,outline:t.srj.outline,defaultViaDiameter:t.viaDiameter,layerCount:t.srj.layerCount,minTraceToPadEdgeClearance:t.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:t.srj.minBoardEdgeClearance,enableCrossingViaReduction:!0,iterations:2}]),Cp("traceWidthSolver",aL,t=>[{hdRoutes:t.traceSimplificationSolver.simplifiedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,minTraceWidth:t.minTraceWidth,connection:t.srj.connections,obstacleMargin:t.srj.minTraceToPadEdgeClearance??.15,layerCount:t.srj.layerCount}]),Cp("globalDrcForceImproveSolver",S7,t=>[{srj:t.srjWithPointPairs,hdRoutes:N7t(t.traceWidthSolver.getHdRoutesWithWidths(),t.netToPointPairsSolver?.newConnections??[],new Map((t.highDensityStitchSolver?.mergedHdRoutes??[]).map(e=>[e.connectionName,e]))),connMap:t.connMap,effort:t.effort,maxIterations:16,enableLargeBoardBroadFallback:!1,enablePostSolveClearanceRelaxation:!1}]),Cp("exactGeometryDrcForceImproveSolver",jbe,t=>{const e=t.globalDrcForceImproveSolver.getOutput(),n=(o=>{const i={...o.srjWithPointPairs,minTraceWidth:o.originalSrj.minTraceWidth,minViaDiameter:o.originalSrj.minViaDiameter??o.srjWithPointPairs.minViaDiameter},r=Math.max(om(o.originalSrj).padDiameter,i.minTraceWidth)+Math.max(.1,.1),s=new fJ(i,{connMap:o.connMap,traceClearance:.1,viaClearance:.1,spatialCellSize:r}),a=jSe(o),A=o.originalSrj.traces??[];return({routes:c,hdRoutes:l})=>{const u=c??l;if(!u)throw new Error("Pipeline7 autorouting DRC evaluation requires HD routes");const g=a(u),h=A.length?[...A,...g]:g;return s.evaluate(h)}})({connections:t.netToPointPairsSolver?.newConnections??[],originalConnections:t.originalSrj.connections,layerCount:t.srj.layerCount,obstacles:t.srj.obstacles,defaultViaHoleDiameter:t.viaHoleDiameter,connMap:t.connMap,srjWithPointPairs:t.srjWithPointPairs,originalSrj:t.originalSrj});return[{srj:t.srjWithPointPairs,hdRoutes:e,connMap:t.connMap,effort:t.effort,viaHoleDiameter:t.viaHoleDiameter,drcEvaluator:n,viaInPadDrcEvaluator:n,maxIterations:32,enableLargeBoardBroadFallback:!1,enableBroadFallback:!1,enableTargetedErrorSweep:!0,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:t.originalSrj.allowViaInPad??!1,viaInPadMaxIterations:32,broadMaxIterations:12,broadPassMultiplier:3}]}),Cp("lengthMatchingPostProcessingSolver",S9t,t=>{const e=t.netToPointPairsSolver;if(!e)throw new Error("Pipeline7: length-matching post-processing requires NetToPointPairsSolver output");const n=e.newConnections,o=new Map;for(const s of t.srj.differentialPairs??[])for(const a of s.connectionNames){const A=n.filter(c=>c.name===a||c.__rootConnectionNames?.includes(a)||c.__netConnectionName===a);if(A.length!==1)throw new Error(`Pipeline7: differential pair connection "${a}" must resolve to exactly one final point-pair connection, got ${A.length}`);o.set(a,A[0].name)}const i=t.exactGeometryDrcForceImproveSolver.getOutput(),r=(t.srj.differentialPairs??[]).map(s=>{const a=s.connectionNames.map(l=>{const u=o.get(l);if(!u)throw new Error(`Pipeline7: differential pair connection "${l}" is missing from final routed output`);return u});if(a[0]===a[1])throw new Error(`Pipeline7: differential pair ${s.connectionNames.join("/")} resolves both members to "${a[0]}"`);if(s.traceGap===void 0)return{connectionNames:a,lengthTolerance:s.lengthTolerance,maxUncoupledLength:s.maxUncoupledLength};const A=a.map(l=>{const u=i.filter(g=>g.connectionName===l);if(u.length!==1)throw new Error(`Pipeline7: differential pair connection "${l}" must resolve to exactly one final HD route, got ${u.length}`);return u[0]}),c=s.traceGap+A.reduce((l,u)=>l+u.traceThickness/2,0);return{connectionNames:a,lengthTolerance:s.lengthTolerance,maxUncoupledLength:s.maxUncoupledLength,minimumCenterlineDistance:c,maximumCenterlineDistance:c}});return[{hdRoutes:i,differentialPairs:r,obstacles:t.srj.obstacles,bounds:t.srj.bounds,layerCount:t.srj.layerCount}]}),Cp("powerTraceExpansionSolver",P7t,t=>{const e=t.opts.powerTraceExpansion??{},n=e.onlyConnectionNames??D7t(t.originalSrj);return[R7t({originalSrj:t.originalSrj,newlyRoutedTraces:t.getPrePowerTraceOutputSimplifiedPcbTraces(),expandedConnectionNames:n}),{allowNewVias:!1,...e,onlyConnectionNames:n}]})];setSimpleRouteJson(t){this.srj=t;const e=om(this.srj);this.viaDiameter=e.padDiameter,this.viaHoleDiameter=e.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;computeProgress(){const t=this.activeSubSolver?.progress??0;return(this.currentPipelineStepIndex+t)/this.pipelineDef.length}_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),t.solverName!=="lengthMatchingPostProcessingSolver"&&t.solverName!=="powerTraceExpansionSolver"||(this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,this.iterations+this.activeSubSolver.MAX_ITERATIONS+1)),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.visualizeStage(this.activeSubSolver);const t=this.escapeViaLocationSolver?.visualize(),e=this.netToPointPairsSolver?.visualize(),n=this.componentDetectionSolver?.visualize(),o=this.componentTopologyGeneratorSolver?.visualize(),i=this.globalTopologyGeneratorSolver?.visualize(),r=this.topologyMergingSolver?.visualize(),s=this.nodeDimensionSubdivisionSolver?.visualize(),a=this.nodeTargetMerger?.visualize(),A=this.singleLayerNodeMerger?.visualize(),c=this.strawSolver?.visualize(),l=this.edgeSolver?.visualize(),u=this.deadEndSolver?.visualize(),g=this.availableSegmentPointSolver?.visualize(),h=this.portPointPathingSolver?.visualize(),d=this.multiSectionPortPointOptimizer?.visualize(),p=this.uniformPortDistributionSolver?.visualize(),m=this.highDensityRouteSolver?.visualize(),_=this.highDensityForceImproveSolver?.visualize(),f=this.highDensityRepairSolver?.visualize(),I=this.highDensityStitchSolver?.visualize(),C=this.traceSimplificationSolver?.visualize(),y=this.lengthMatchingPostProcessingSolver?.visualize(),x=this.traceWidthSolver?.visualize(),E=this.necessaryCrampedPortPointSolver?.visualize(),B=(this.highDensityRouteSolver?.visualize(),this.originalSrj),S=B.outline,Q=[];if(Q.push({points:[{x:B.bounds?.minX??-50,y:B.bounds?.minY??-50},{x:B.bounds?.maxX??50,y:B.bounds?.minY??-50},{x:B.bounds?.maxX??50,y:B.bounds?.maxY??50},{x:B.bounds?.minX??-50,y:B.bounds?.maxY??50},{x:B.bounds?.minX??-50,y:B.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),S&&S.length>=2){const j=S.map(J=>({x:J.x,y:J.y}));j.push({...j[0]}),Q.push({points:j,strokeColor:"rgba(0, 136, 255, 0.95)"})}const w=z8(B),M={points:[...B.connections.flatMap(j=>j.pointsToConnect.map(J=>({...J,layer:J8(J,B.layerCount),label:`${j.name} ${J.pcb_port_id??""}`})))],rects:[...(B.obstacles??[]).filter(j=>!j.isCopperPour).map(j=>({...j,fill:j.layers?.includes("top")?"rgba(255,0,0,0.25)":j.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(j,B.layerCount),label:w(j)}))],lines:Q},k={traceColorMode:this.visualizationTraceColorMode},R=ab({srj:B,visualizationOptions:k}),F=Il(M,R),O=this.preprocessSimpleRouteJsonSolver?.visualize(),U=this.globalDrcForceImproveSolver?.visualize(),Y=this.exactGeometryDrcForceImproveSolver?.visualize(),W=[F,O,n,o,t,e,i,r,s,a,A,c,l,u,g,E,h,d,p,m?Il(M,m):null,_,f,I,C,x,U,Y,y,this.solved?Il({lines:Q},ab({srj:this.originalSrj,visualizationOptions:k}),this.visualizeFinalOutput()):null].filter(Boolean),te=Il(...W);return this.visualizationTraceColorMode==="net"?pce(te,this.colorMap):te}visualizeStage(t){const e=t.visualize();return this.visualizationTraceColorMode==="net"?pce(e,this.colorMap):e}visualizeFinalOutput(){const t=this.visualizationTraceColorMode,e=this.getOutputSimpleRouteJson();return mx(e,{traceColorMode:t})}preview(){if(this.highDensityRouteSolver){const t=[];for(let e=this.highDensityRouteSolver.routes.length-1;e>=0;e--){const n=this.highDensityRouteSolver.routes[e];if(t.push({points:n.route.map(o=>({x:o.x,y:o.y})),strokeColor:this.colorMap[n.connectionName]}),t.length>200)break}return{lines:t}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.componentTopologyGeneratorSolver?this.componentTopologyGeneratorSolver.visualize():this.componentDetectionSolver?this.componentDetectionSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){if(this.lengthMatchingPostProcessingSolver){const{hdRoutes:t}=this.lengthMatchingPostProcessingSolver.getOutput();return t}return this.exactGeometryDrcForceImproveSolver?.getOutput()??this.globalDrcForceImproveSolver?.getOutput()??this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error("Cannot get output before solving is complete");return this.powerTraceExpansionSolver?this.powerTraceExpansionSolver.getOutput():this.getPrePowerTraceOutputSimplifiedPcbTraces()}getPrePowerTraceOutputSimplifiedPcbTraces(){return M7t({connections:this.netToPointPairsSolver?.newConnections??[],originalConnections:this.originalSrj.connections,hdRoutes:this._getOutputHdRoutes(),layerCount:this.srj.layerCount,obstacles:this.srj.obstacles,defaultViaHoleDiameter:this.viaHoleDiameter,connMap:this.connMap})}getOutputSimpleRouteJson(){return{...this.originalSrj,traces:this.getOutputSimplifiedPcbTraces()}}},L7t=t=>[...new Set(t)].sort((e,n)=>e-n),ygo=class extends yr{constructor(t){super(),this.params=t,this.MAX_ITERATIONS=1}params;outputNodes=[];outputSharedEdgeSegments=[];nodeIdByOriginalAndZ=new Map;getSolverName(){return"SplitNodesIntoSingleLayerNodeSolver"}_step(){this.outputNodes=this.params.capacityMeshNodes.flatMap(t=>L7t(t.availableZ).map(e=>{const n=((o,i)=>`${o}__z${i}`)(t.capacityMeshNodeId,e);return this.nodeIdByOriginalAndZ.set(`${t.capacityMeshNodeId}:${e}`,n),{...t,capacityMeshNodeId:n,layer:`z${e}`,availableZ:[e],_parent:t}})),this.outputSharedEdgeSegments=this.params.sharedEdgeSegments.flatMap(t=>this.splitSharedEdgeSegment(t)),this.stats={inputNodeCount:this.params.capacityMeshNodes.length,outputNodeCount:this.outputNodes.length,inputPortPointCount:this.params.sharedEdgeSegments.reduce((t,e)=>t+e.portPoints.length,0),outputPortPointCount:this.outputSharedEdgeSegments.reduce((t,e)=>t+e.portPoints.length,0)},this.solved=!0}getSplitNodeId(t,e){return this.nodeIdByOriginalAndZ.get(`${t}:${e}`)}splitPortPoint(t){return L7t(t.availableZ).flatMap(e=>{const n=t.nodeIds.map(o=>this.getSplitNodeId(o,e));return n[0]&&n[1]?[{...t,segmentPortPointId:`${t.segmentPortPointId}__z${e}`,availableZ:[e],nodeIds:[n[0],n[1]]}]:[]})}splitSharedEdgeSegment(t){const e=new Map;for(const n of t.portPoints.flatMap(o=>this.splitPortPoint(o))){const o=n.availableZ[0];if(o===void 0)continue;const i=e.get(o)??[];i.push(n),e.set(o,i)}return[...e.entries()].map(([n,o])=>({...t,edgeId:`${t.edgeId}__z${n}`,nodeIds:o[0].nodeIds,availableZ:[n],portPoints:o}))}getOutput(){return{capacityMeshNodes:this.outputNodes,sharedEdgeSegments:this.outputSharedEdgeSegments}}getConstructorParams(){return[this.params]}visualize(){return{rects:this.outputNodes.map(t=>({...Wf(t),label:`${t.capacityMeshNodeId}
${t.layer}`})),points:this.outputSharedEdgeSegments.flatMap(t=>t.portPoints.map(e=>({x:e.x,y:e.y,label:`${e.segmentPortPointId}
z${e.availableZ.join(",")}`})))}}};function Xf(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var xgo=class extends yr{constructor(t,e={}){super(),this.srj=t,this.opts=e,this.originalSrj=t,this.opts={...e};const n=this.opts;if(this.effort=n.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=n.maxNodeDimension??16,this.maxNodeRatio=n.maxNodeRatio??6,this.minNodeArea=n.minNodeArea??.1**2,this.setSimpleRouteJson(t),n.capacityDepth===void 0){const o=this.srj.bounds.maxX-this.srj.bounds.minX,i=this.srj.bounds.maxY-this.srj.bounds.minY,r=Math.max(o,i),s=n.targetMinCapacity??.5;n.capacityDepth=$Q(r,s)}this.cacheProvider=n.cacheProvider===void 0?tB():n.cacheProvider===null?null:n.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;nodeSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityForceImproveRoutes;highDensityRepairSolver;highDensityRepairRoutes;highDensityStitchSolver;globalDrcForceImproveSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;availableSegmentPointSolver;splitNodesIntoSingleLayerNodeSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[Xf("preprocessSimpleRouteJsonSolver",XAe,t=>[t.originalSrj],{onSolved:t=>{t.setSimpleRouteJson(t.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),Xf("escapeViaLocationSolver",FAe,t=>[t.srj,{viaDiameter:t.viaDiameter,minTraceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15}],{onSolved:t=>{t.srjWithEscapeViaLocations=t.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),Xf("netToPointPairsSolver",rL,t=>{const e=t.srjWithEscapeViaLocations??t.srj;return[e,t.colorMap,JQ(e)]},{onSolved:t=>{t.srjWithPointPairs=t.netToPointPairsSolver?.getNewSimpleRouteJson(),t.colorMap=Jf(t.srjWithPointPairs,t.connMap),t.connMap=Jm(t.srjWithPointPairs)}}),Xf("nodeSolver",qF,t=>[{simpleRouteJson:t.srjWithPointPairs,maxGapFillPasses:4}],{onSolved:t=>{t.capacityNodes=t.nodeSolver?.getOutput().meshNodes??[]}}),Xf("nodeDimensionSubdivisionSolver",vAe,t=>[t.capacityNodes,t.maxNodeDimension,t.maxNodeRatio,t.minNodeArea],{onSolved:t=>{t.capacityNodes=t.nodeDimensionSubdivisionSolver?.outputNodes??[]}}),Xf("edgeSolver",WQ,t=>[t.capacityNodes],{onSolved:t=>{t.capacityEdges=t.edgeSolver?.edges}}),Xf("availableSegmentPointSolver",kD,t=>[{nodes:t.capacityNodes,edges:t.capacityEdges||[],traceWidth:t.minTraceWidth,colorMap:t.colorMap,shouldReturnCrampedPortPoints:!0}]),Xf("necessaryCrampedPortPointSolver",lJ,t=>[{capacityMeshNodes:t.capacityNodes,sharedEdgeSegments:t.availableSegmentPointSolver.getOutput(),simpleRouteJson:t.srjWithPointPairs}]),Xf("splitNodesIntoSingleLayerNodeSolver",ygo,t=>[{capacityMeshNodes:t.capacityNodes,sharedEdgeSegments:t.necessaryCrampedPortPointSolver?.getOutput()??t.availableSegmentPointSolver.getOutput()}],{onSolved:t=>{t.capacityNodes=t.splitNodesIntoSingleLayerNodeSolver.getOutput().capacityMeshNodes}}),Xf("portPointPathingSolver",kAe,t=>{const e=t.splitNodesIntoSingleLayerNodeSolver.getOutput(),{graph:n,connections:o}=uJ({capacityMeshNodes:e.capacityMeshNodes,layerCount:t.srj.layerCount,connectivityMap:t.connMap,segmentPortPoints:e.sharedEdgeSegments.flatMap(i=>i.portPoints),simpleRouteJsonConnections:t.srjWithPointPairs.connections,assignableViaObstacles:t.originalSrj.obstacles});return[{graph:n,connections:o,layerCount:t.srj.layerCount,effort:t.effort,minViaPadDiameter:t.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),Xf("uniformPortDistributionSolver",kz,t=>[{nodeWithPortPoints:t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:t.minTraceWidth,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]),Xf("highDensityRouteSolver",HD,t=>{const e=t.uniformPortDistributionSolver?.getOutput()??[],n=t.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],o=e.length>0?e:n;return t.highDensityNodePortPoints=structuredClone(o),[{nodePortPoints:o,nodePfById:new Map((t.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[]).map(i=>[i.capacityMeshNodeId,t.portPointPathingSolver?.computeNodePf(i)??null])),colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.minTraceWidth,obstacleMargin:t.srj.defaultObstacleMargin??.15,obstacles:t.srj.obstacles,layerCount:t.srj.layerCount}]}),Xf("highDensityForceImproveSolver",mJ,t=>[{nodeWithPortPoints:t.getHighDensityNodePortPointsWithAssignableViasFirst(),hdRoutes:t.getMovableHighDensityRoutes(t.highDensityRouteSolver.routes),colorMap:t.colorMap,totalStepsPerNode:Math.max(20,Math.round(60*t.effort)),nodeAssignmentMargin:t.srj.defaultObstacleMargin??.2}],{onSolved:t=>{t.highDensityForceImproveRoutes=t.mergeMovableHighDensityRoutesBack(t.highDensityRouteSolver.routes,t.highDensityForceImproveSolver.getOutput())}}),Xf("highDensityRepairSolver",pW,t=>[{nodeWithPortPoints:t.getHighDensityNodePortPointsWithAssignableViasFirst(),hdRoutes:t.getMovableHighDensityRoutes(t.highDensityForceImproveRoutes??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes),obstacles:t.srj.obstacles,colorMap:t.colorMap,repairMargin:t.srj.defaultObstacleMargin??.2}],{onSolved:t=>{const e=t.highDensityForceImproveRoutes??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes;t.highDensityRepairRoutes=t.mergeMovableHighDensityRoutesBack(e,t.highDensityRepairSolver.getOutput())}}),Xf("highDensityStitchSolver",$Ae,t=>[{connections:t.srjWithPointPairs.connections,hdRoutes:t.highDensityRepairRoutes??t.highDensityRepairSolver?.getOutput()??t.highDensityForceImproveRoutes??t.highDensityForceImproveSolver?.getOutput()??t.highDensityRouteSolver.routes,colorMap:t.colorMap,layerCount:t.srj.layerCount,defaultViaDiameter:t.viaDiameter,allowedLayerTransitionPointKeys:nCt(t.originalSrj.obstacles)}]),Xf("traceSimplificationSolver",j8,t=>[{hdRoutes:t.highDensityStitchSolver.mergedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,outline:t.srj.outline,defaultViaDiameter:t.viaDiameter,layerCount:t.srj.layerCount,minTraceToPadEdgeClearance:t.srj.minTraceToPadEdgeClearance,iterations:2}]),Xf("traceWidthSolver",aL,t=>[{hdRoutes:t.traceSimplificationSolver.simplifiedHdRoutes,obstacles:t.srj.obstacles,connMap:t.connMap,colorMap:t.colorMap,minTraceWidth:t.minTraceWidth,connection:t.srj.connections,obstacleMargin:t.srj.minTraceToPadEdgeClearance??.15,layerCount:t.srj.layerCount}]),Xf("globalDrcForceImproveSolver",S7,t=>[{srj:t.srjWithPointPairs,hdRoutes:t.traceWidthSolver.getHdRoutesWithWidths(),effort:t.effort}])];setSimpleRouteJson(t){this.srj=t;const e=om(this.srj);this.viaDiameter=e.padDiameter,this.viaHoleDiameter=e.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now()}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();const t=this.escapeViaLocationSolver?.visualize(),e=this.netToPointPairsSolver?.visualize(),n=this.nodeSolver?.visualize(),o=this.nodeDimensionSubdivisionSolver?.visualize(),i=this.nodeTargetMerger?.visualize(),r=this.singleLayerNodeMerger?.visualize(),s=this.strawSolver?.visualize(),a=this.edgeSolver?.visualize(),A=this.deadEndSolver?.visualize(),c=this.availableSegmentPointSolver?.visualize(),l=this.splitNodesIntoSingleLayerNodeSolver?.visualize(),u=this.portPointPathingSolver?.visualize(),g=this.multiSectionPortPointOptimizer?.visualize(),h=this.uniformPortDistributionSolver?.visualize(),d=this.highDensityRouteSolver?.visualize(),p=this.highDensityForceImproveSolver?.visualize(),m=this.highDensityRepairSolver?.visualize(),_=this.highDensityStitchSolver?.visualize(),f=this.traceSimplificationSolver?.visualize(),I=this.necessaryCrampedPortPointSolver?.visualize(),C=(this.highDensityRouteSolver?.visualize(),this.originalSrj),y=C.outline,x=[];if(x.push({points:[{x:C.bounds?.minX??-50,y:C.bounds?.minY??-50},{x:C.bounds?.maxX??50,y:C.bounds?.minY??-50},{x:C.bounds?.maxX??50,y:C.bounds?.maxY??50},{x:C.bounds?.minX??-50,y:C.bounds?.maxY??50},{x:C.bounds?.minX??-50,y:C.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),y&&y.length>=2){const w=y.map(M=>({x:M.x,y:M.y}));w.push({...w[0]}),x.push({points:w,strokeColor:"rgba(0, 136, 255, 0.95)"})}const E=z8(C),B={points:[...C.connections.flatMap(w=>w.pointsToConnect.map(M=>({...M,layer:J8(M,C.layerCount),label:`${w.name} ${M.pcb_port_id??""}`})))],rects:[...(C.obstacles??[]).filter(w=>!w.isCopperPour).map(w=>({...w,fill:w.layers?.includes("top")?"rgba(255,0,0,0.25)":w.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(w,C.layerCount),label:E(w)}))],lines:x},S=ab({srj:C}),Q=[Il(B,S),t,e,n,o,i,r,s,a,A,c,I,l,u,g,h,d?Il(B,d):null,p,m,_,f,this.solved?Il({lines:x},ab({srj:this.originalSrj}),mx(this.getOutputSimpleRouteJson())):null].filter(Boolean);return Il(...Q)}preview(){if(this.highDensityRouteSolver){const t=[];for(let e=this.highDensityRouteSolver.routes.length-1;e>=0;e--){const n=this.highDensityRouteSolver.routes[e];if(t.push({points:n.route.map(o=>({x:o.x,y:o.y})),strokeColor:this.colorMap[n.connectionName]}),t.length>200)break}return{lines:t}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){const t=this.globalDrcForceImproveSolver?.getOutput();return t&&this.routesOnlyUsePreplacedVias(t)?t:this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityRepairRoutes??this.highDensityForceImproveRoutes??this.highDensityStitchSolver.mergedHdRoutes}routesOnlyUsePreplacedVias(t){const e=nCt(this.originalSrj.obstacles);return e.size===0||t.every(n=>n.vias.every(o=>e.has(IL(o))))}getHighDensityNodePortPointsWithAssignableViasFirst(){return[...this.highDensityNodePortPoints??[]].sort((t,e)=>{const n=t.capacityMeshNodeId.startsWith("assignable-via:");return n===e.capacityMeshNodeId.startsWith("assignable-via:")?0:n?-1:1})}getPreplacedAssignableViaObstacles(){return this.originalSrj.obstacles.filter(t=>t.netIsAssignable===!0&&(t.layers?.length??0)>1)}isFixedPreplacedViaRoute(t){const e=this.getPreplacedAssignableViaObstacles();return e.length!==0&&t.vias.length!==0&&e.some(n=>[...t.route,...t.vias].every(o=>o7(o,n)<=0))}getMovableHighDensityRouteIndexes(t){return t.map((e,n)=>this.isFixedPreplacedViaRoute(e)?-1:n).filter(e=>e!==-1)}getMovableHighDensityRoutes(t){return this.getMovableHighDensityRouteIndexes(t).map(e=>t[e])}mergeMovableHighDensityRoutesBack(t,e){const n=this.getMovableHighDensityRouteIndexes(t),o=[...t];for(let i=0;i<n.length;i++)o[n[i]]=e[i];return o}getOutputSimplifiedPcbTraces(){if(!this.solved||!this.highDensityRouteSolver)throw new Error("Cannot get output before solving is complete");const t=[],e=this._getOutputHdRoutes();for(const n of this.netToPointPairsSolver?.newConnections??[]){const o=n.__netConnectionName??this.originalSrj.connections.find(r=>r.name===n.name)?.__netConnectionName,i=e.filter(r=>r.connectionName===n.name);for(let r=0;r<i.length;r++){const s=i[r],a={type:"pcb_trace",pcb_trace_id:`${n.name}_${r}`,connection_name:o??n.__rootConnectionNames?.[0]??n.name,route:nB(s,this.srj.layerCount,{connectionPoints:n.pointsToConnect,defaultViaHoleDiameter:this.viaHoleDiameter,obstacles:this.srj.obstacles,connMap:this.connMap})};t.push(a)}}return t}getOutputSimpleRouteJson(){return{...this.originalSrj,traces:this.getOutputSimplifiedPcbTraces()}}},H7t=(t,e)=>{const n=t.filter(o=>(o.rootConnectionName??o.connectionName)===e);if(n.length!==0)return n.reduce((o,i)=>o+i.route.slice(1).reduce((r,s,a)=>{const A=i.route[a];return r+Math.hypot(s.x-A.x,s.y-A.y)},0),0)},Ego=(t,e)=>{const n=new Set(t.flatMap(o=>o.maxLengthSkew===void 0?[]:o.connectionNames));return e.flatMap(o=>{if(!n.has(o.name))return[];const i=o.pointsToConnect[0],r=o.pointsToConnect.at(-1);if(!i||!r||i===r)throw new Error(`Length matching: bus connection "${o.name}" needs at least two points`);return[{...o,pointsToConnect:[i,r]}]})},Bgo=class extends yr{constructor(t){super(),this.params=t,this.differentialPairSolver=new S9t({hdRoutes:t.hdRoutes,differentialPairs:t.differentialPairs,obstacles:t.obstacles,bounds:t.bounds,layerCount:t.layerCount}),this.MAX_ITERATIONS=this.differentialPairSolver.MAX_ITERATIONS+1e5+10}params;differentialPairSolver;busLengthMatchingSolver;outputHdRoutes;getSolverName(){return"LengthMatchingPostProcessingSolver"}_step(){if(!this.differentialPairSolver.solved)return this.differentialPairSolver.step(),void(this.differentialPairSolver.failed&&(this.failed=!0,this.error=this.differentialPairSolver.error));if(!this.busLengthMatchingSolver){const n=this.differentialPairSolver.getOutput().hdRoutes,o=(t=this.params.buses,e=n,t.flatMap(i=>{const r=i.maxLengthSkew;if(r===void 0||i.connectionNames.length<2)return[];const s=i.connectionNames.map(A=>{const c=H7t(e,A);if(c===void 0)throw new Error(`Length matching: bus "${i.busId}" has no routed geometry for connection "${A}"`);return{connectionName:A,length:c}}),a=s.reduce((A,c)=>c.length>A.length?c:A);return s.flatMap(A=>A.connectionName===a.connectionName?[]:[{connectionNames:[A.connectionName,a.connectionName],lengthTolerance:r}])}));return o.length===0?(this.outputHdRoutes=n,void(this.solved=!0)):void(this.busLengthMatchingSolver=new m9t({hdRoutes:n,originalConnections:Ego(this.params.buses,this.params.connections),differentialPairs:o,obstacles:this.params.obstacles,bounds:this.params.bounds,layerCount:this.params.layerCount,obstacleMargin:this.params.obstacleMargin}))}var t,e;if(this.busLengthMatchingSolver.step(),this.busLengthMatchingSolver.failed)return this.failed=!0,void(this.error=this.busLengthMatchingSolver.error);this.busLengthMatchingSolver.solved&&(this.outputHdRoutes=this.busLengthMatchingSolver.getOutput().matchedHdRoutes,((n,o)=>{for(const i of n){if(i.maxLengthSkew===void 0||i.connectionNames.length<2)continue;const r=i.connectionNames.map(a=>{const A=H7t(o,a);if(A===void 0)throw new Error(`Length matching: bus "${i.busId}" lost routed geometry for connection "${a}"`);return A}),s=Math.max(...r)-Math.min(...r);if(s>i.maxLengthSkew+1e-6)throw new Error(`Length matching: bus "${i.busId}" routed length skew ${s.toFixed(4)}mm exceeds ${i.maxLengthSkew.toFixed(4)}mm`)}})(this.params.buses,this.outputHdRoutes),this.solved=!0)}getOutput(){if(!this.solved||!this.outputHdRoutes)throw new Error("LengthMatchingPostProcessingSolver output requested before completion");return{hdRoutes:this.outputHdRoutes}}visualize(){return this.busLengthMatchingSolver?.visualize()??this.differentialPairSolver.visualize()}},fH=1e-9,O7t=(t,e)=>Math.abs(t.x-e.x)<=fH&&Math.abs(t.y-e.y)<=fH&&t.z===e.z,bgo=(t,e)=>{if(t.length===0)return void t.push(...e.route);const n=t.at(-1);if(e.route[0]&&O7t(n,e.route[0]))t.push(...e.route.slice(1));else{if(!e.route.at(-1)||!O7t(n,e.route.at(-1)))throw new Error(`Pipeline9 could not reconnect mutated preloaded segment "${e.connectionName}"`);t.push(...e.route.slice(0,-1).reverse())}},$Se=(t,e)=>{const n=t.preloadedRoutePositionStart??t.preloadedRouteIndex,o=e.preloadedRoutePositionStart??e.preloadedRouteIndex,i=t.preloadedRoutePositionEnd??n,r=e.preloadedRoutePositionEnd??o;return n-o||i-r||t.preloadedRouteIndex-e.preloadedRouteIndex||t.connectionName.localeCompare(e.connectionName)},Sgo=t=>{const e=t.route.flatMap(n=>n.route_type==="wire"||n.route_type==="through_obstacle"?[n.width]:[]);return e.length>0?Math.max(...e):void 0},G7t=({trace:t,updatedTraceRoutes:e,layerCount:n,defaultViaHoleDiameter:o,obstacles:i,connMap:r})=>{if(e.length===0)throw new Error(`Pipeline9 lost every fixed route for mutated trace "${t.pcb_trace_id}"`);const s=[];let a,A=0,c=0;for(const u of[...e].sort($Se))bgo(s,u),A=Math.max(A,u.traceThickness),c=Math.max(c,u.viaDiameter),a??=u.rootConnectionName;const l={connectionName:t.connection_name,rootConnectionName:a,traceThickness:Sgo(t)??A,viaDiameter:c,route:s,vias:s.slice(0,-1).flatMap((u,g)=>{const h=s[g+1];return u.z!==h.z&&Math.abs(u.x-h.x)<=fH&&Math.abs(u.y-h.y)<=fH?[{x:h.x,y:h.y}]:[]})};return nB(l,n,{defaultViaHoleDiameter:o,obstacles:i,connMap:r})},qSe=(t,e)=>t.filter(n=>{if(n.isThroughObstacle===!0)return!1;const o=n.preloadedRoutePositionStart,i=n.preloadedRoutePositionEnd;if(o===void 0||i===void 0)throw new Error(`Pipeline9 fixed route "${n.connectionName}" is missing route-position metadata`);const r=Math.min(o,i),s=Math.max(o,i);return r>=e.routePositionStart-fH&&s<=e.routePositionEnd+fH}),Qgo=({trace:t,originalTraceRoutes:e,updatedTraceRoutes:n,layerCount:o,defaultViaHoleDiameter:i,obstacles:r,connMap:s})=>{if(n.length===0)throw new Error(`Pipeline9 lost every fixed route for mutated trace "${t.pcb_trace_id}"`);const a=(u=>{const g=[];let h=0;for(let d=0;d<u.route.length;d++)u.route[d]?.route_type==="through_obstacle"&&(h<d&&g.push({routePositionStart:h,routePositionEnd:d-1}),h=d+1);return h<u.route.length&&g.push({routePositionStart:h,routePositionEnd:u.route.length-1}),g})(t),A=n.filter(u=>u.isThroughObstacle!==!0);for(const u of A)if(a.filter(g=>qSe([u],g).includes(u)).length!==1)throw new Error(`Pipeline9 fixed route "${u.connectionName}" crosses an immutable through-obstacle primitive`);const c=[];let l=0;for(const u of a){c.push(...t.route.slice(l,u.routePositionStart));const g=qSe(e,u),h=qSe(n,u);if(g.length>0&&h.length===0)throw new Error(`Pipeline9 lost every fixed route for an ordinary section of mutated trace "${t.pcb_trace_id}"`);c.push(...h.length>0?G7t({trace:t,updatedTraceRoutes:h,layerCount:o,defaultViaHoleDiameter:i,obstacles:r,connMap:s}):t.route.slice(u.routePositionStart,u.routePositionEnd+1)),l=u.routePositionEnd+1}return c.push(...t.route.slice(l)),c},Y7t=(t,e)=>{const n=new Set(e.map(o=>o.pcb_trace_id));return t.map(o=>{if(!n.has(o.pcb_trace_id))return n.add(o.pcb_trace_id),o;const i=`${o.pcb_trace_id}_routed`;let r=i,s=2;for(;n.has(r);)r=`${i}_${s}`,s+=1;return n.add(r),{...o,pcb_trace_id:r}})},vgo=(t,e,n)=>{const o=s=>`${s.x}:${s.y}`,i=new Map;for(const s of e){const a=o(s.center),A=i.get(a)??[];A.push(s),i.set(a,A)}const r=new Map;for(const s of t)for(const a of s.pointsToConnect){if(!a.pcb_port_id)continue;const A=r.get(a.pcb_port_id)??new Set,c="layers"in a?a.layers:[a.layer];for(const l of c)A.add(Kr(l,n));for(const l of i.get(o(a))??[])if(!(l.layers.length<=1)&&l.connectedTo.includes(a.pcb_port_id))for(const u of l.layers)A.add(Kr(u,n));r.set(a.pcb_port_id,A)}return r},XSe=(t,e)=>new Map(t.flatMap(n=>{const o=e.getNetConnectedToId(n.connectionName)??(n.rootConnectionName?e.getNetConnectedToId(n.rootConnectionName)??(e.netMap[n.rootConnectionName]?n.rootConnectionName:void 0):void 0);return o?[[n.connectionName,o]]:[]})),wN=1e-9,ZSe=1e-6,U7t=(t,e)=>Math.abs(t.x-e.x)<=ZSe&&Math.abs(t.y-e.y)<=ZSe&&t.z===e.z,K7t=t=>new Map(t.map((e,n)=>[e.pcb_trace_id,n])),V7t=(t,e)=>{const n=t[0],o=t.at(-1);if(!n||!o)throw new Error("Pipeline9 cannot split an empty preloaded route");if(n.z!==o.z)throw new Error("Pipeline9 cannot partially split a preloaded layer transition");return{...n,x:n.x+(o.x-n.x)*e,y:n.y+(o.y-n.y)*e}},z7t=({traces:t,fixedHdRoutes:e,sections:n})=>{const o=(({traces:i,sections:r})=>{const s=K7t(i),a=new Map;for(const A of r){const c=s.get(A.traceId);if(c===void 0)throw new Error(`Pipeline9 hypergraph changed missing preloaded trace "${A.traceId}"`);const l=a.get(c)??[];l.push({start:Math.min(A.startRoutePosition,A.endRoutePosition),end:Math.max(A.startRoutePosition,A.endRoutePosition)}),a.set(c,l)}for(const A of a.values())A.sort((c,l)=>c.start-l.start||c.end-l.end);return a})({traces:t,sections:n});return e.flatMap(i=>{const r=o.get(i.preloadedTraceIndex);if(!r?.length)return[i];const s=i.preloadedRoutePositionStart,a=i.preloadedRoutePositionEnd;if(s===void 0||a===void 0)throw new Error(`Pipeline9 fixed route "${i.connectionName}" is missing route-position metadata`);if(Math.abs(a-s)<=wN)return r.some(c=>c.start-wN<=s&&s<=c.end+wN)?[]:[i];let A=[{start:s,end:a}];for(const c of r)A=A.flatMap(l=>{if(c.end<=l.start+wN||c.start>=l.end-wN)return[l];const u=[];return c.start>l.start+wN&&u.push({start:l.start,end:Math.min(c.start,l.end)}),c.end<l.end-wN&&u.push({start:Math.max(c.end,l.start),end:l.end}),u});return A.map((c,l)=>{const u=(c.start-s)/(a-s),g=(c.end-s)/(a-s);return{...i,connectionName:`${i.connectionName}_hypergraph_fixed_${l}`,preloadedRoutePositionStart:c.start,preloadedRoutePositionEnd:c.end,route:[V7t(i.route,u),V7t(i.route,g)],vias:[]}})})},wgo=({traces:t,sections:e,stitchedHdRoutes:n,layerCount:o})=>{const i=K7t(t);return e.map((r,s)=>{const a=i.get(r.traceId);if(a===void 0)throw new Error(`Pipeline9 cannot materialize missing preloaded trace "${r.traceId}"`);const[A,c]=((d,p)=>{const m=d.connection.pointsToConnect.map(_=>({x:_.x,y:_.y,z:Kr(tI(_),p)}));if(!m[0]||!m[1])throw new Error(`Pipeline9 changed section "${d.connectionName}" is missing an endpoint`);return[m[0],m[1]]})(r,o),l=n.flatMap(d=>{if(d.connectionName!==r.connectionName)return[];const p=(({route:m,sectionStart:_,sectionEnd:f})=>{const I=m.route[0],C=m.route.at(-1);if(!I||!C)return null;const y=I.z===_.z&&C.z===f.z,x=I.z===f.z&&C.z===_.z,E=y?no(I,_)+no(C,f):Number.POSITIVE_INFINITY,B=x?no(I,f)+no(C,_):Number.POSITIVE_INFINITY;return Number.isFinite(E)||Number.isFinite(B)?E<=B?{score:E,reverse:!1}:{score:B,reverse:!0}:null})({route:d,sectionStart:A,sectionEnd:c});return p?[{route:d,...p}]:[]});l.sort((d,p)=>d.score-p.score);const u=l[0],g=l[1];if(!u||g&&Math.abs(g.score-u.score)<=ZSe)throw new Error(`Pipeline9 expected one nearest stitched route for changed preloaded section "${r.connectionName}", got ${l.length}`);return{...(({route:d,reverse:p,sectionStart:m,sectionEnd:_})=>{const f=p?(I=>{const C=[...I].reverse().map(y=>{const{toNextSegmentType:x,...E}=y;return E});for(let y=0;y<I.length-1;y++){const x=I[y]?.toNextSegmentType;x&&(C[I.length-y-2]={...C[I.length-y-2],toNextSegmentType:x})}return C})(d.route):[...d.route];if(!f[0]||!f.at(-1))throw new Error(`Pipeline9 cannot materialize empty route "${d.connectionName}"`);return U7t(f[0],m)||f.unshift(m),U7t(f.at(-1),_)||f.push(_),{...d,route:f}})({route:u.route,reverse:u.reverse,sectionStart:A,sectionEnd:c}),preloadedTraceIndex:a,preloadedRouteIndex:Number.MAX_SAFE_INTEGER-e.length+s,preloadedRoutePositionStart:r.startRoutePosition,preloadedRoutePositionEnd:r.endRoutePosition,isThroughObstacle:!1}})},IH=1e-6,J7t=t=>t.map(e=>{const n=[];for(const o of e.route){const i=n.at(-1);if(!i||i.z===o.z||i.toNextSegmentType==="through_obstacle"){n.push(o);continue}const r=Math.abs(i.x-o.x)<=IH&&Math.abs(i.y-o.y)<=IH,s=e.vias.some(A=>Math.abs(A.x-i.x)<=IH&&Math.abs(A.y-i.y)<=IH),a=e.vias.some(A=>Math.abs(A.x-o.x)<=IH&&Math.abs(A.y-o.y)<=IH);if(r)n.push(o);else{if(!s&&!a)throw new Error(`Pipeline9 route "${e.connectionName}" changes layers from z=${i.z} to z=${o.z} without an explicit via`);if(s===a)throw new Error(`Pipeline9 route "${e.connectionName}" has an ambiguous layer transition between (${i.x}, ${i.y}) and (${o.x}, ${o.y})`);s?n.push({x:i.x,y:i.y,z:o.z}):n.push({x:o.x,y:o.y,z:i.z}),n.push(o)}}return{...e,route:n}}),iI=1e-9,W7t=t=>({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2}),j7t=(t,e)=>t.x>=e.minX-iI&&t.x<=e.maxX+iI&&t.y>=e.minY-iI&&t.y<=e.maxY+iI,$7t=(t,e,n)=>n<=iI?t:n>=.999999999?e:{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n,z:t.z},Pgo=(t,e,n)=>{const o=e.x-t.x,i=e.y-t.y;if(Math.abs(o)<=iI&&Math.abs(i)<=iI)return j7t(t,n)&&j7t(e,n)?{start:t,end:e}:null;let r=0,s=1;const a=[[-o,t.x-n.minX],[o,n.maxX-t.x],[-i,t.y-n.minY],[i,n.maxY-t.y]];for(const[A,c]of a){if(Math.abs(A)<=iI){if(c<0)return null;continue}const l=c/A;if(A<0?r=Math.max(r,l):s=Math.min(s,l),r>s+iI)return null}return{start:$7t(t,e,r),end:$7t(t,e,s)}},Mgo=t=>{const e=t.sourceRoutes[0],n=`pipeline9_fallback:${e.connectionName}`,o=`${n}:start`,i=`${n}:end`;return[{...t.start.point,portPointId:o,nextPortPointId:i,connectionName:e.connectionName,rootConnectionName:e.rootConnectionName},{...t.end.point,portPointId:i,prevPortPointId:o,connectionName:e.connectionName,rootConnectionName:e.rootConnectionName}]},bce=(t,e)=>Math.abs(t.x-e.x)<=iI&&Math.abs(t.y-e.y)<=iI&&t.z===e.z,Dgo=(t,e)=>t.sourceRoute.preloadedTraceIndex===e.sourceRoute.preloadedTraceIndex&&bce(t.sourceRoute.route.at(-1),e.sourceRoute.route[0]),MW=(t,e,n=new Set)=>{const o=new Map,i=[],r=new Set(t.portPoints.map(u=>u.z)),s=e.map(u=>((g,h)=>{const d=W7t(h);let p,m;for(let _=0;_<g.route.length-1;_++){const f=Pgo(g.route[_],g.route[_+1],d);f&&(p??={segmentIndex:_,point:f.start},m={segmentIndex:_,point:f.end})}return p&&m?Math.abs(p.point.x-m.point.x)<=iI&&Math.abs(p.point.y-m.point.y)<=iI&&p.point.z===m.point.z?null:{sourceRoute:g,start:p,end:m}:null})(u,t)).filter(u=>u!==null),a=s.filter(u=>u.sourceRoute.isThroughObstacle!==!0&&(((g,h)=>h.size===0||[g.start.point,...g.sourceRoute.route.slice(g.start.segmentIndex+1,g.end.segmentIndex+1),g.end.point].some(d=>h.has(d.z)))(u,r)||n.has(u.sourceRoute.connectionName))).sort((u,g)=>u.sourceRoute.preloadedTraceIndex-g.sourceRoute.preloadedTraceIndex||u.sourceRoute.preloadedRouteIndex-g.sourceRoute.preloadedRouteIndex),A=new Set(a.map(u=>u.sourceRoute)),c=s.map(u=>u.sourceRoute).filter(u=>!A.has(u)),l=[];for(let u=0;u<a.length;u++){const g=a[u],h=a[u-1],d=l.at(-1);h&&d&&Dgo(h,g)?(d.sourceRoutes.push(g.sourceRoute),d.end=g.end):l.push({sourceRoutes:[g.sourceRoute],start:g.start,end:g.end})}for(const u of l){const g=u.sourceRoutes[0].connectionName;if(o.has(g))throw new Error(`Pipeline9 regional fallback found duplicate fixed route section identity "${g}"`);o.set(g,u),i.push(Mgo(u))}return{nodeWithPortPoints:{...t,portPoints:[...t.portPoints,...i.flatMap(u=>u)],portPointsInPairs:[...t.portPointsInPairs??[],...i]},fixedRouteSectionsByConnectionName:o,fixedObstacleRoutes:c}},Ngo=t=>{const e=[];for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];o.z!==i.z&&Math.abs(o.x-i.x)<=iI&&Math.abs(o.y-i.y)<=iI&&e.push({x:i.x,y:i.y})}return e},eQe=(t,e)=>q7t({section:t,replacement:e,sourceMutationMasks:new Map,replacementIsMutated:!1}).route,q7t=({section:t,replacement:e,sourceMutationMasks:n,replacementIsMutated:o})=>{const i=t.sourceRoutes[0],r=t.sourceRoutes.at(-1),s=((h,d)=>{const p=h.route,m=p[0],_=p.at(-1);if(!m||!_)throw new Error(`Pipeline9 regional fallback produced an empty replacement for "${d.sourceRoutes[0].connectionName}"`);const f=Math.hypot(m.x-d.start.point.x,m.y-d.start.point.y)+Math.hypot(_.x-d.end.point.x,_.y-d.end.point.y);return Math.hypot(_.x-d.start.point.x,_.y-d.start.point.y)+Math.hypot(m.x-d.end.point.x,m.y-d.end.point.y)<f?[...p].reverse():p})(e,t),a=[],A=[],c=(h,d)=>{const p=n.get(h.connectionName);if(p&&p.length!==h.route.length-1)throw new Error(`Pipeline9 fixed route mutation mask for "${h.connectionName}" has ${p.length} segments, expected ${h.route.length-1}`);return p?.[d]??!1},l=(h,d)=>{const p=a.at(-1);if(p){if(!bce(p,h)){if(p.z!==h.z&&(Math.abs(p.x-h.x)>iI||Math.abs(p.y-h.y)>iI)){const m={...h,z:p.z};bce(p,m)||(a.push(m),A.push(d))}bce(a.at(-1),h)||(a.push(h),A.push(d))}}else a.push(h)};l(i.route[0],!1);for(let h=1;h<=t.start.segmentIndex;h++)l(i.route[h],c(i,h-1));l(t.start.point,c(i,t.start.segmentIndex));const u=A.length;for(const h of s.slice(1,-1))l(h,o);l(t.end.point,o);const g=A.length>u;for(let h=t.end.segmentIndex+1;h<r.route.length;h++)l(r.route[h],c(r,h-1));if(A.length!==a.length-1)throw new Error(`Pipeline9 produced an invalid mutation mask while splicing "${i.connectionName}"`);return{route:{...i,preloadedRoutePositionStart:i.preloadedRoutePositionStart,preloadedRoutePositionEnd:r.preloadedRoutePositionEnd,traceThickness:Math.max(...t.sourceRoutes.map(h=>h.traceThickness)),viaDiameter:Math.max(...t.sourceRoutes.map(h=>h.viaDiameter)),route:a,vias:Ngo(a)},mutatedSegments:A,replacementProducedSegment:g}},Sce=1e-6,Qce=(t,e)=>Math.abs(t.x-e.x)<=Sce&&Math.abs(t.y-e.y)<=Sce&&t.z===e.z,X7t=(t,e)=>{for(const n of e)t.at(-1)&&Qce(t.at(-1),n)||t.push(n)},Z7t=t=>t.slice(0,-1).flatMap((e,n)=>{const o=t[n+1];return e.z!==o.z&&Math.abs(e.x-o.x)<=Sce&&Math.abs(e.y-o.y)<=Sce?[{x:o.x,y:o.y}]:[]}),e6t=t=>{const e=t.preloadedRoutePositionStart,n=t.preloadedRoutePositionEnd;if(e===void 0||n===void 0)throw new Error(`Pipeline9 fixed route "${t.connectionName}" is missing route-position metadata`);return{start:Math.min(e,n),end:Math.max(e,n)}},t6t=(t,e)=>{const n=e6t(t),o=e6t(e);return t.preloadedTraceIndex-e.preloadedTraceIndex||n.start-o.start||n.end-o.end||t.preloadedRouteIndex-e.preloadedRouteIndex||t.connectionName.localeCompare(e.connectionName)},n6t=(t,e)=>{const n=t.route.at(-1),o=e.route[0];return!!(n&&o&&t.preloadedTraceIndex===e.preloadedTraceIndex&&Qce(n,o))},o6t=(t,e)=>{const n=t.preloadedRoutePositionStart??t.preloadedRouteIndex;return n+((t.preloadedRoutePositionEnd??t.preloadedRouteIndex)-n)*e/(t.route.length-1)},i6t=(t,e)=>t.route[e].z!==t.route[e+1].z,Rgo=({updatedFixedRoutes:t,regionalMutationMasks:e})=>{const n=[],o=(({updatedFixedRoutes:i,regionalMutationMasks:r})=>{const s=new Map;for(const l of i){if(l.route.length===0)throw new Error(`Pipeline9 cannot normalize empty fixed route "${l.connectionName}"`);const u=l.route.length-1;if(s.has(l.connectionName))throw new Error(`Pipeline9 cannot normalize duplicate fixed route "${l.connectionName}"`);const g=r.get(l.connectionName);if(g&&g.length!==u)throw new Error(`Pipeline9 fixed route mutation mask for "${l.connectionName}" has ${g.length} segments, expected ${u}`);const h=l.isThroughObstacle!==!0&&(l.jumpers?.length??0)===0;s.set(l.connectionName,Array.from({length:u},(d,p)=>h&&(g?.[p]??!1)))}let a=[];const A=()=>{for(;a[0]&&i6t(a[0].route,a[0].segmentIndex);){const l=a.shift();s.get(l.route.connectionName)[l.segmentIndex]=!1}for(;a.at(-1)&&i6t(a.at(-1).route,a.at(-1).segmentIndex);){const l=a.pop();s.get(l.route.connectionName)[l.segmentIndex]=!1}a=[]};let c;for(const l of[...i].sort(t6t)){c&&!n6t(c,l)&&A();const u=s.get(l.connectionName);if(u.length!==0){for(let g=0;g<u.length;g++)u[g]?a.push({route:l,segmentIndex:g}):A();c=l}else A(),c=l}return A(),s})({updatedFixedRoutes:t,regionalMutationMasks:e});for(const i of t){const r=i.route.length-1,s=o.get(i.connectionName);if(r===0){n.push({route:i,mutated:!1});continue}const a=[];for(let A=0;A<r;A++){const c=s[A],l=a.at(-1);l?.mutated===c?l.end=A+1:a.push({start:A,end:A+1,mutated:c})}for(const[A,c]of a.entries()){const l=i.route.slice(c.start,c.end+1),u={...i,connectionName:a.length===1?i.connectionName:`${i.connectionName}_mutation_fragment_${A}`,preloadedRouteIndex:i.preloadedRouteIndex+A/(a.length+1),preloadedRoutePositionStart:o6t(i,c.start),preloadedRoutePositionEnd:o6t(i,c.end),route:l,vias:Z7t(l)};n.push({route:u,mutated:c.mutated})}}return n},Tgo=({updatedFixedRoutes:t,regionalMutationMasks:e})=>{const n=Rgo({updatedFixedRoutes:t,regionalMutationMasks:e}),o=n.map(({route:a})=>a),i=(a=>{const A=[];let c;for(const l of[...a].sort((u,g)=>t6t(u.route,g.route))){const u=l.route;if(!l.mutated){c=void 0;continue}const g=u.route[0],h=u.route.at(-1);if(!g||!h||u.route.length<2)throw new Error(`Pipeline9 cannot simplify empty fixed route "${u.connectionName}"`);const d=c?.sourceRoutes.at(-1);c&&d&&n6t(d,u)?(c.sourceRoutes.push(u),c.end={segmentIndex:u.route.length-2,point:h}):(c={sourceRoutes:[u],start:{segmentIndex:0,point:g},end:{segmentIndex:u.route.length-2,point:h}},A.push(c))}return A})(n),r=i.map((a,A)=>{const c=((l,u)=>{const g=l.sourceRoutes[0],h=l.sourceRoutes.at(-1);if(!g||!h)throw new Error("Pipeline9 cannot simplify an empty mutation section");const d=[l.start.point];for(const[p,m]of l.sourceRoutes.entries()){const _=p===0,f=p===l.sourceRoutes.length-1,I=_?l.start.segmentIndex+1:0,C=f?l.end.segmentIndex+1:m.route.length;X7t(d,m.route.slice(I,C))}if(X7t(d,[l.end.point]),d.length<2)throw new Error(`Pipeline9 mutation section for "${g.connectionName}" has no routable span`);return{connectionName:`pipeline9_mutated_preload_${g.preloadedTraceIndex}_${u}`,rootConnectionName:g.rootConnectionName,traceThickness:Math.max(...l.sourceRoutes.map(p=>p.traceThickness)),viaDiameter:Math.max(...l.sourceRoutes.map(p=>p.viaDiameter)),route:d,vias:Z7t(d)}})(a,A);return{connectionName:c.connectionName,section:a,hdRoute:c}}),s=new Set(r.flatMap(({section:a})=>a.sourceRoutes.map(A=>A.connectionName)));return{sections:r,immutableHdRoutes:o.filter(a=>!s.has(a.connectionName)),normalizedFixedRoutes:o}},tQe=1e-9,kv=(t,e,n,o,i)=>{const r=i.getNetConnectedToId(t.connection_name)??t.connection_name,s=[],a=(A,c,l=o,u=[],g,h,d=!1)=>{A.length<2||s.push({connectionName:`${t.connection_name}_fixed_${e}_${s.length}`,rootConnectionName:r,preloadedTraceIndex:e,preloadedRouteIndex:s.length,preloadedRoutePositionStart:g,preloadedRoutePositionEnd:h,isThroughObstacle:d,traceThickness:Math.max(tQe,c),viaDiameter:Math.max(tQe,l),route:A,vias:u})};for(let A=0;A<t.route.length;A++){const c=t.route[A];if(c.route_type==="via"){a([{x:c.x,y:c.y,z:Kr(c.from_layer,n)},{x:c.x,y:c.y,z:Kr(c.to_layer,n)}],tQe,c.via_diameter??o,[{x:c.x,y:c.y}],A,A);continue}if(c.route_type==="through_obstacle"){const u=Kr(c.from_layer,n),g=Kr(c.to_layer,n);for(let h=Math.min(u,g);h<=Math.max(u,g);h++)a([{...c.start,z:h},{...c.end,z:h}],c.width,o,[],A,A+1,!0);continue}const l=t.route[A+1];c.route_type==="wire"&&l?.route_type==="wire"&&c.layer===l.layer&&a([{x:c.x,y:c.y,z:Kr(c.layer,n)},{x:l.x,y:l.y,z:Kr(l.layer,n)}],Math.max(c.width,l.width),o,[],A,A+1)}return s};function Fv(t,e){return{x:t.a*e.x+t.b*e.y+t.c,y:t.d*e.x+t.e*e.y+t.f}}var kgo={highResolutionCellSize:.1,highResolutionCellThickness:8,lowResolutionCellSize:.4,traceMargin:.15,traceThickness:.1,viaDiameter:.3,viaMinDistFromBorder:.15},Fgo={...kgo},nQe=(t,e,n)=>{const[o,i]=t;if(o===i)return;const r=((s,a)=>{const A=s.portPointId??`${s.connectionName}:${s.x}:${s.y}:${s.z}`,c=a.portPointId??`${a.connectionName}:${a.x}:${a.y}:${a.z}`;return A<c?`${A}|${c}`:`${c}|${A}`})(o,i);e.has(r)||(e.add(r),n.push(t))},r6t=(t,e,n)=>{for(let o=0;o<t.length-1;o++)nQe([t[o],t[o+1]],e,n)},Lgo=t=>{const e=[],n=new Set,o=(s=>{const a=new Map;for(const A of s)A.portPointId&&a.set(A.portPointId,A);return a})(t);for(const s of t){if(s.prevPortPointId){const a=o.get(s.prevPortPointId);a&&a.connectionName===s.connectionName&&nQe([a,s],n,e)}if(s.nextPortPointId){const a=o.get(s.nextPortPointId);a&&a.connectionName===s.connectionName&&nQe([s,a],n,e)}}if(e.length===0)return r6t(t,n,e),e;const i=(s=>{const a=new Set;for(const[A,c]of s)A.portPointId&&a.add(A.portPointId),c.portPointId&&a.add(c.portPointId);return a})(e),r=t.filter(s=>!s.portPointId||!i.has(s.portPointId));return r6t(r,n,e),e};function vce(t,e,n){return Math.max(e,Math.min(n,t))}var oQe=["left","top","right","bottom","middle"],Hgo=class{f=new Float64Array(1024);seq=new Uint32Array(1024);id=new Int32Array(1024);n=0;push(t,e,n){this.ensureCapacity(this.n+1);let o=this.n++;for(this.f[o]=t,this.seq[o]=e,this.id[o]=n;o>0;){const i=o-1>>1;if(this.less(i,o))break;this.swap(o,i),o=i}}pop(){const t=this.id[0];return this.n--,this.n>0&&(this.f[0]=this.f[this.n],this.seq[0]=this.seq[this.n],this.id[0]=this.id[this.n],this.siftDown(0)),t}get size(){return this.n}clear(){this.n=0}ensureCapacity(t){if(t<=this.f.length)return;let e=this.f.length;for(;e<t;)e*=2;const n=new Float64Array(e);n.set(this.f),this.f=n;const o=new Uint32Array(e);o.set(this.seq),this.seq=o;const i=new Int32Array(e);i.set(this.id),this.id=i}siftDown(t){for(;;){const e=2*t+1,n=e+1;if(e>=this.n)return;let o=e;if(n<this.n&&!this.less(e,n)&&(o=n),this.less(t,o))return;this.swap(t,o),t=o}}less(t,e){const n=this.f[t],o=this.f[e];return n!==o?n<o:this.seq[t]<this.seq[e]}swap(t,e){const n=this.f[t];this.f[t]=this.f[e],this.f[e]=n;const o=this.seq[t];this.seq[t]=this.seq[e],this.seq[e]=o;const i=this.id[t];this.id[t]=this.id[e],this.id[e]=i}},Ogo=class{z=new Int32Array(1024);cellId=new Int32Array(1024);g=new Float64Array(1024);parent=new Int32Array(1024);ripHead=new Int32Array(1024).fill(-1);ripCount=new Int32Array(1024);length=0;clear(){this.length=0}push(t,e,n,o,i,r){this.ensureCapacity(this.length+1);const s=this.length++;return this.z[s]=t,this.cellId[s]=e,this.g[s]=n,this.parent[s]=o,this.ripHead[s]=i,this.ripCount[s]=r,s}ensureCapacity(t){if(t<=this.z.length)return;let e=this.z.length;for(;e<t;)e*=2;const n=new Int32Array(e);n.set(this.z),this.z=n;const o=new Int32Array(e);o.set(this.cellId),this.cellId=o;const i=new Float64Array(e);i.set(this.g),this.g=i;const r=new Int32Array(e);r.set(this.parent),this.parent=r;const s=new Int32Array(e);s.fill(-1),s.set(this.ripHead.subarray(0,this.length)),this.ripHead=s;const a=new Int32Array(e);a.set(this.ripCount.subarray(0,this.length)),this.ripCount=a}},Ggo=class{connId=new Int32Array(1024);prev=new Int32Array(1024).fill(-1);length=0;clear(){this.length=0}append(t,e){this.ensureCapacity(this.length+1);const n=this.length++;return this.connId[n]=e,this.prev[n]=t,n}contains(t,e){for(let n=t;n>=0;n=this.prev[n])if(this.connId[n]===e)return!0;return!1}collect(t,e){e.length=0;for(let n=t;n>=0;n=this.prev[n])e.push(this.connId[n])}ensureCapacity(t){if(t<=this.connId.length)return;let e=this.connId.length;for(;e<t;)e*=2;const n=new Int32Array(e);n.set(this.connId),this.connId=n;const o=new Int32Array(e);o.fill(-1),o.set(this.prev.subarray(0,this.length)),this.prev=o}};function iQe(t,e){return e??t.replace(/_mst\d+$/,"")}function rQe(t,e){const n=t.x-e.center.x,o=t.y-e.center.y,i=Math.cos(-e.rotationRadians),r=Math.sin(-e.rotationRadians);return{x:n*i-o*r,y:n*r+o*i}}function s6t(t){return{minX:-t.width/2,minY:-t.height/2,maxX:t.width/2,maxY:t.height/2}}function X3(t,e,n){return Math.max(e,Math.min(n,t))}function CH(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return;t.push(e)}function a6t(t,e){for(let n=0;n<t.length;n++)if(t[n].cellId===e.cellId)return;t.push(e)}function DW(t,e,n,o,i,r,s){const a=t-X3(t,o,r),A=e-X3(e,i,s);return a*a+A*A<=n*n}function PN(t){const e=t.segmentEnd.x-t.segmentStart.x,n=t.segmentEnd.y-t.segmentStart.y,o=e**2+n**2;if(o===0)return(t.point.x-t.segmentStart.x)**2+(t.point.y-t.segmentStart.y)**2;const i=X3(((t.point.x-t.segmentStart.x)*e+(t.point.y-t.segmentStart.y)*n)/o,0,1),r=t.segmentStart.x+i*e,s=t.segmentStart.y+i*n;return(t.point.x-r)**2+(t.point.y-s)**2}function NW(t){const e=X3(t.point.x,t.rect.minX,t.rect.maxX),n=X3(t.point.y,t.rect.minY,t.rect.maxY),o=t.point.x-e,i=t.point.y-n;return o*o+i*i}function RW(t){return(t.second.x-t.first.x)*(t.third.y-t.first.y)-(t.second.y-t.first.y)*(t.third.x-t.first.x)}function wce(t){return!(Math.abs(RW({first:t.segmentStart,second:t.segmentEnd,third:t.point}))>1e-9)&&t.point.x>=Math.min(t.segmentStart.x,t.segmentEnd.x)&&t.point.x<=Math.max(t.segmentStart.x,t.segmentEnd.x)&&t.point.y>=Math.min(t.segmentStart.y,t.segmentEnd.y)&&t.point.y<=Math.max(t.segmentStart.y,t.segmentEnd.y)}function A6t(t){const e=RW({first:t.firstStart,second:t.firstEnd,third:t.secondStart}),n=RW({first:t.firstStart,second:t.firstEnd,third:t.secondEnd}),o=RW({first:t.secondStart,second:t.secondEnd,third:t.firstStart}),i=RW({first:t.secondStart,second:t.secondEnd,third:t.firstEnd});return e*n<0&&o*i<0||wce({point:t.secondStart,segmentStart:t.firstStart,segmentEnd:t.firstEnd})||wce({point:t.secondEnd,segmentStart:t.firstStart,segmentEnd:t.firstEnd})||wce({point:t.firstStart,segmentStart:t.secondStart,segmentEnd:t.secondEnd})||wce({point:t.firstEnd,segmentStart:t.secondStart,segmentEnd:t.secondEnd})}function Ygo(t){return A6t(t)?0:Math.min(PN({point:t.firstStart,segmentStart:t.secondStart,segmentEnd:t.secondEnd}),PN({point:t.firstEnd,segmentStart:t.secondStart,segmentEnd:t.secondEnd}),PN({point:t.secondStart,segmentStart:t.firstStart,segmentEnd:t.firstEnd}),PN({point:t.secondEnd,segmentStart:t.firstStart,segmentEnd:t.firstEnd}))}function c6t(t){if((function(n){if(NW({point:n.segmentStart,rect:n.rect})===0||NW({point:n.segmentEnd,rect:n.rect})===0)return!0;const o=[{x:n.rect.minX,y:n.rect.minY},{x:n.rect.maxX,y:n.rect.minY},{x:n.rect.maxX,y:n.rect.maxY},{x:n.rect.minX,y:n.rect.maxY}];for(let i=0;i<o.length;i++){const r=(i+1)%o.length;if(A6t({firstStart:n.segmentStart,firstEnd:n.segmentEnd,secondStart:o[i],secondEnd:o[r]}))return!0}return!1})(t))return!0;const e=t.radius**2;return NW({point:t.segmentStart,rect:t.rect})<=e||NW({point:t.segmentEnd,rect:t.rect})<=e?!0:[{x:t.rect.minX,y:t.rect.minY},{x:t.rect.maxX,y:t.rect.minY},{x:t.rect.maxX,y:t.rect.maxY},{x:t.rect.minX,y:t.rect.maxY}].some(n=>PN({point:n,segmentStart:t.segmentStart,segmentEnd:t.segmentEnd})<=e)}var Ugo=class extends zA{getSolverName(){return"HighDensitySolverB01"}nodeWithPortPoints;obstacles;highResolutionCellSize;highResolutionCellThickness;lowResolutionCellSize;viaDiameter;MAX_RIPS;maxCellCount;traceThickness;traceMargin;obstacleClearanceMargin;viaMinDistFromBorder;showPenaltyMap;showUsedCellMap;effort;stepMultiplier;hyperParameters;initialPenaltyFn;boundsMinX;boundsMaxX;boundsMinY;boundsMaxY;gridToBoundsTransform;availableZ;zToLayer;layerToZ;layers;fineRows;fineCols;lowScale;bandRows;bandCols;regions;planeSize;cellCenterX;cellCenterY;cellMinX;cellMinY;cellMaxX;cellMaxY;cellWidth;cellHeight;cellRegion;cellRow;cellCol;viaAllowed;neighborOffset;neighborIds;neighborCosts;usedCellsFlat;sharedCellsFlat;portOwnerFlat;penalty2d;ripStateBuckets;visitedStamp;bestGStamp;bestGValue;visitedFlatStamp;sharedCrossRootPortFlat;stamp=0;connNameToId;connIdToName;connIdToRootNet;overlapFriendlyRootNets;usedIndicesByConn;unsolvedSegs;solvedRoutes;activeConnSeg=null;activeConnId=-1;nodePool;heap;ripChain;seqCounter=0;_viaOccs=[];_cellOccs=[];_rippedIds=[];ripCount;totalRipEvents=0;searchIterations=0;consecutiveSkips=0;penaltyCap;baseSearchBudgetIters;_moveCost=0;_moveRippedHead=-1;_moveRipCount=0;traceKeepoutRadius;viaKeepoutRadius;obstacleTraceRootIdsFlat;obstacleViaRootIdsByCell;obstacleRootNameToId;obstacleRootNames;obstacleTracePrimitives;obstacleViaPrimitives;obstacleRectPrimitives;obstacleTraceBlockedCellCount=0;obstacleViaBlockedCellCount=0;get unsolvedConnections(){return this.unsolvedSegs}get solvedConnectionsMap(){const t=new Map;for(let e=0;e<this.solvedRoutes.length;e++){const n=this.getSolvedRoutesForConn(e);n.length>0&&t.set(e,n)}return t}get activeConnection(){if(!this.activeConnSeg)return null;const t=this.activeConnSeg.startCellId,e=this.activeConnSeg.endCellId;return{connectionName:this.connIdToName[this.activeConnSeg.connId]??"",start:{cellId:t,region:oQe[this.cellRegion[t]],row:this.cellRow[t],col:this.cellCol[t],x:this.cellCenterX[t],y:this.cellCenterY[t],z:this.activeConnSeg.startZ},end:{cellId:e,region:oQe[this.cellRegion[e]],row:this.cellRow[e],col:this.cellCol[e],x:this.cellCenterX[e],y:this.cellCenterY[e],z:this.activeConnSeg.endZ}}}get openSet(){return{length:this.heap?.size??0}}get gridStats(){return{cells:this.planeSize||0,layers:this.layers||0,states:(this.planeSize||0)*(this.layers||0),ripStateBuckets:this.ripStateBuckets||0,neighborEdges:this.neighborIds?.length??0,regionCounts:this.regions?Object.fromEntries(this.regions.map(t=>[t.name,t.rows*t.cols])):{},obstacleTraceBlockedCells:this.obstacleTraceBlockedCellCount,obstacleViaBlockedCells:this.obstacleViaBlockedCellCount,obstacleRootCount:this.obstacleRootNames?.length??0,obstacleRectCount:this.obstacleRectPrimitives?.length??0}}constructor(t){super(),this.nodeWithPortPoints=t.nodeWithPortPoints,this.obstacles=t.obstacles,this.highResolutionCellSize=t.highResolutionCellSize??.1,this.highResolutionCellThickness=Math.max(1,Math.floor(t.highResolutionCellThickness??8)),this.lowResolutionCellSize=t.lowResolutionCellSize??.4,this.viaDiameter=t.viaDiameter,this.maxCellCount=t.maxCellCount,this.traceThickness=t.traceThickness??.1,this.traceMargin=t.traceMargin??.15,this.obstacleClearanceMargin=t.obstacleClearanceMargin??0,this.viaMinDistFromBorder=t.viaMinDistFromBorder??.15,this.showPenaltyMap=t.showPenaltyMap??!1,this.showUsedCellMap=t.showUsedCellMap??!1,this.effort=t.effort??1,this.stepMultiplier=Math.max(1,Math.floor(t.stepMultiplier??1)),this.hyperParameters={shuffleSeed:0,ripCost:8,ripTracePenalty:.5,ripViaPenalty:.75,viaBaseCost:.1,greedyMultiplier:1.5,sameRootObstacleCostMultiplier:1,...t.hyperParameters},this.MAX_ITERATIONS=1e8,this.MAX_RIPS=200,this.initialPenaltyFn=t.initialPenaltyFn}getConstructorParams(){return[{nodeWithPortPoints:this.nodeWithPortPoints,obstacles:this.obstacles,highResolutionCellSize:this.highResolutionCellSize,highResolutionCellThickness:this.highResolutionCellThickness,lowResolutionCellSize:this.lowResolutionCellSize,viaDiameter:this.viaDiameter,maxCellCount:this.maxCellCount,stepMultiplier:this.stepMultiplier,traceThickness:this.traceThickness,traceMargin:this.traceMargin,obstacleClearanceMargin:this.obstacleClearanceMargin,viaMinDistFromBorder:this.viaMinDistFromBorder,showPenaltyMap:this.showPenaltyMap,showUsedCellMap:this.showUsedCellMap,effort:this.effort,hyperParameters:this.hyperParameters,initialPenaltyFn:this.initialPenaltyFn}]}_setup(){const{nodeWithPortPoints:t}=this,{width:e,height:n,center:o}=t;if(e>15||n>15)return this.error=`HighDensitySolverB01 only supports routing windows up to 15x15mm; received ${e}x${n}mm`,void(this.failed=!0);const i=this.lowResolutionCellSize/this.highResolutionCellSize,r=Math.round(i);if(!Number.isFinite(i)||i<=0||Math.abs(i-r)>1e-9)return this.error="lowResolutionCellSize must be a positive integer multiple of highResolutionCellSize",void(this.failed=!0);this.lowScale=Math.max(1,r),this.availableZ=t.availableZ??[...new Set(t.portPoints.map(h=>h.z))].sort((h,d)=>h-d),this.layers=this.availableZ.length,this.zToLayer=new Map,this.layerToZ=new Map;for(let h=0;h<this.availableZ.length;h++){const d=this.availableZ[h];this.zToLayer.set(d,h),this.layerToZ.set(h,d)}this.boundsMinX=o.x-e/2,this.boundsMaxX=o.x+e/2,this.boundsMinY=o.y-n/2,this.boundsMaxY=o.y+n/2,this.traceKeepoutRadius=this.traceMargin+this.traceThickness/2,this.viaKeepoutRadius=this.viaDiameter/2+this.traceKeepoutRadius,this.buildFiveRegionGrid(e,n),this.gridToBoundsTransform=this.computeGridToBoundsTransform();const s=this.layers*this.planeSize;if(this.maxCellCount!==void 0&&s>this.maxCellCount)return this.error=`Cell count ${s} exceeds maxCellCount ${this.maxCellCount}`,void(this.failed=!0);this.connNameToId=new Map,this.connIdToName=[],this.connIdToRootNet=[],this.overlapFriendlyRootNets=new Set,this.unsolvedSegs=this.buildConnectionSegs(),this.penalty2d=new Float64Array(this.planeSize);const a=e>0?1/e:0,A=n>0?1/n:0;for(let h=0;h<this.planeSize;h++){let d=0;this.initialPenaltyFn&&(d+=this.initialPenaltyFn({x:this.cellCenterX[h],y:this.cellCenterY[h],px:(this.cellCenterX[h]-this.boundsMinX)*a,py:(this.cellCenterY[h]-this.boundsMinY)*A,cellId:h,region:oQe[this.cellRegion[h]],row:this.cellRow[h],col:this.cellCol[h]})),this.penalty2d[h]=d}this.usedCellsFlat=new Int32Array(s).fill(-1),this.sharedCellsFlat=Array.from({length:s},()=>{}),this.portOwnerFlat=new Int32Array(s).fill(-1),this.sharedCrossRootPortFlat=new Uint8Array(s),this.obstacleTraceRootIdsFlat=Array.from({length:s},()=>{}),this.obstacleViaRootIdsByCell=Array.from({length:this.planeSize},()=>{}),this.obstacleRootNameToId=new Map,this.obstacleRootNames=[],this.obstacleTracePrimitives=[],this.obstacleViaPrimitives=[],this.obstacleRectPrimitives=[];const c=this.rasterizeObstacles();if(c)return this.error=c,void(this.failed=!0);this.ripStateBuckets=1;const l=s;this.visitedStamp=new Uint32Array(l),this.bestGStamp=new Uint32Array(l),this.bestGValue=new Float64Array(l),this.visitedFlatStamp=new Uint32Array(s),this.stamp=0;const u=new Map;for(const h of this.nodeWithPortPoints.portPoints){const d=this.connNameToId.get(h.connectionName);if(d===void 0)continue;const p=this.pointToCell(h),m=p.z*this.planeSize+p.cellId,_=this.connIdToRootNet[d],f=u.get(m);f===void 0?u.set(m,_):f!==_&&(this.sharedCrossRootPortFlat[m]=1);const I=this.portOwnerFlat[m];this.portOwnerFlat[m]=I===-1||I===d?d:-2}this.solvedRoutes=[],this.usedIndicesByConn=[],this.ripCount=[],this.consecutiveSkips=0,this.penaltyCap=.5*this.hyperParameters.ripCost,this.shuffleConnections();const g=(function(h){const d=h.planeSize*h.layers,p=h.connectionCount,m=Math.sqrt(p),_=Math.max(1,h.maxIterations),f=vce(Math.round(d*(8+1.2*m)),15e4,12e6),I=vce(Math.round(f*h.effort),15e4,12e6),C=vce(Math.round(.2*_),15e4,2e6);return{maxIterationsIters:Math.max(1,Math.min(_,Math.max(C,I))),baseSearchBudgetIters:vce(Math.round(d*(10+.8*m)*h.effort),5e4,4e6)}})({planeSize:this.planeSize,layers:this.layers,connectionCount:this.unsolvedSegs.length,effort:this.effort,maxIterations:this.MAX_ITERATIONS});this.baseSearchBudgetIters=g.baseSearchBudgetIters,this.MAX_ITERATIONS=g.maxIterationsIters,this.activeConnSeg=null,this.activeConnId=-1,this.nodePool=new Ogo,this.heap=new Hgo,this.ripChain=new Ggo,this.seqCounter=0}_step(){for(let t=0;t<this.stepMultiplier;t++){if(this.solved||this.failed)return;this.stepOnce()}}rasterizeObstacles(){for(let t=0;t<this.obstacles.length;t++){const e=this.obstacles[t];if(e.type==="rect"){const i=this.rasterizeRectObstacle(e,t);if(i)return i;continue}if(e.traceThickness<=0||e.viaDiameter<=0||e.route.length<2)return`Obstacle ${t} must have positive trace/via sizes and at least two route points`;const n=iQe(e.connectionName,e.rootConnectionName),o=this.internObstacleRootName(n);for(let i=1;i<e.route.length;i++){const r=e.route[i-1],s=e.route[i];if(!(Number.isFinite(r.x)&&Number.isFinite(r.y)&&Number.isFinite(r.z)&&Number.isFinite(s.x)&&Number.isFinite(s.y)&&Number.isFinite(s.z)))return`Obstacle ${t} contains non-finite route coordinates`;if(r.z===s.z){const a=this.zToLayer.get(r.z);if(a===void 0)return`Obstacle ${t} uses unavailable layer z=${r.z}`;this.rasterizeObstacleTraceSegment({segmentStart:r,segmentEnd:s,layer:a,obstacleRootId:o,obstacleTraceThickness:e.traceThickness})}else if(!e.vias.some(a=>a.x===s.x&&a.y===s.y)){const a=this.rasterizeObstacleVia({center:s,obstacleRootId:o,obstacleViaDiameter:e.viaDiameter,zStart:r.z,zEnd:s.z,obstacleIndex:t});if(a)return a}}for(const i of e.vias){if(!Number.isFinite(i.x)||!Number.isFinite(i.y))return`Obstacle ${t} contains non-finite via coordinates`;const r=this.rasterizeObstacleVia({center:i,obstacleRootId:o,obstacleViaDiameter:e.viaDiameter,zStart:i.zStart,zEnd:i.zEnd,obstacleIndex:t});if(r)return r}}return this.obstacleTraceBlockedCellCount=this.obstacleTraceRootIdsFlat.reduce((t,e)=>t+(e?1:0),0),this.obstacleViaBlockedCellCount=this.obstacleViaRootIdsByCell.reduce((t,e)=>t+(e?1:0),0),null}rasterizeRectObstacle(t,e){if(!Number.isFinite(t.center.x)||!Number.isFinite(t.center.y)||!Number.isFinite(t.width)||!Number.isFinite(t.height)||t.width<=0||t.height<=0)return`Rect obstacle ${e} must have finite geometry and positive dimensions`;const n=[];for(const c of t.zLayers){const l=this.zToLayer.get(c);if(l===void 0)return`Rect obstacle ${e} uses unavailable layer z=${c}`;CH(n,l)}if(n.length===0)return`Rect obstacle ${e} must apply to at least one layer`;const o=this.internObstacleRootName(iQe(t.connectionName,t.rootConnectionName)),i={rootId:o,center:t.center,width:t.width,height:t.height,rotationRadians:(t.ccwRotationDegrees??0)*Math.PI/180,layers:n};this.obstacleRectPrimitives.push(i);const r=this.transformBoundsPointToGrid(t.center),s=Math.hypot(t.width/2,t.height/2),a=this.getConservativeGridRadius(s+this.traceThickness/2+this.traceMargin);this.forEachCellNearCircle(r.x,r.y,a,c=>{for(const l of n)this.addObstacleRootId({rootIdsByCell:this.obstacleTraceRootIdsFlat,cellIndex:l*this.planeSize+c,obstacleRootId:o})});const A=this.getConservativeGridRadius(s+this.viaDiameter/2+this.traceMargin);return this.forEachCellNearCircle(r.x,r.y,A,c=>{this.addObstacleRootId({rootIdsByCell:this.obstacleViaRootIdsByCell,cellIndex:c,obstacleRootId:o})}),null}internObstacleRootName(t){const e=this.obstacleRootNameToId.get(t);if(e!==void 0)return e;const n=this.obstacleRootNames.length;return this.obstacleRootNames.push(t),this.obstacleRootNameToId.set(t,n),n}rasterizeObstacleTraceSegment(t){this.obstacleTracePrimitives.push({rootId:t.obstacleRootId,layer:t.layer,segmentStart:t.segmentStart,segmentEnd:t.segmentEnd,traceRadius:t.obstacleTraceThickness/2});const e=this.transformBoundsPointToGrid(t.segmentStart),n=this.transformBoundsPointToGrid(t.segmentEnd),o=this.getConservativeGridRadius(t.obstacleTraceThickness/2+this.traceMargin),i=this.getConservativeGridRadius(t.obstacleTraceThickness/2+this.viaDiameter/2+this.traceMargin);this.forEachCellNearSegment({segmentStart:e,segmentEnd:n,radius:o},r=>{this.addObstacleRootId({rootIdsByCell:this.obstacleTraceRootIdsFlat,cellIndex:t.layer*this.planeSize+r,obstacleRootId:t.obstacleRootId})}),this.forEachCellNearSegment({segmentStart:e,segmentEnd:n,radius:i},r=>{this.addObstacleRootId({rootIdsByCell:this.obstacleViaRootIdsByCell,cellIndex:r,obstacleRootId:t.obstacleRootId})})}rasterizeObstacleVia(t){if(t.zStart===void 0!=(t.zEnd===void 0))return`Obstacle ${t.obstacleIndex} via must provide both zStart and zEnd`;let e=Array.from({length:this.layers},(r,s)=>s);if(t.zStart!==void 0&&t.zEnd!==void 0){if(!Number.isFinite(t.zStart)||!Number.isFinite(t.zEnd))return`Obstacle ${t.obstacleIndex} contains a non-finite via layer span`;const r=Math.min(t.zStart,t.zEnd),s=Math.max(t.zStart,t.zEnd);e=this.availableZ.flatMap((a,A)=>a>=r&&a<=s?[A]:[])}if(e.length===0)return null;this.obstacleViaPrimitives.push({rootId:t.obstacleRootId,center:t.center,viaRadius:t.obstacleViaDiameter/2,layers:e});const n=this.transformBoundsPointToGrid(t.center),o=this.getConservativeGridRadius(t.obstacleViaDiameter/2+this.traceThickness/2+this.traceMargin),i=this.getConservativeGridRadius(t.obstacleViaDiameter/2+this.viaDiameter/2+this.traceMargin);return this.forEachCellNearCircle(n.x,n.y,Math.max(o,i),r=>{const s=this.getCellRect(r);if(DW(n.x,n.y,o,s.minX,s.minY,s.maxX,s.maxY))for(const a of e)this.addObstacleRootId({rootIdsByCell:this.obstacleTraceRootIdsFlat,cellIndex:a*this.planeSize+r,obstacleRootId:t.obstacleRootId});DW(n.x,n.y,i,s.minX,s.minY,s.maxX,s.maxY)&&this.addObstacleRootId({rootIdsByCell:this.obstacleViaRootIdsByCell,cellIndex:r,obstacleRootId:t.obstacleRootId})}),null}forEachCellNearSegment(t,e){const n={x:(t.segmentStart.x+t.segmentEnd.x)/2,y:(t.segmentStart.y+t.segmentEnd.y)/2},o=Math.hypot(t.segmentEnd.x-t.segmentStart.x,t.segmentEnd.y-t.segmentStart.y)/2+t.radius;this.forEachCellNearCircle(n.x,n.y,o,i=>{c6t({segmentStart:t.segmentStart,segmentEnd:t.segmentEnd,radius:t.radius,rect:this.getCellRect(i)})&&e(i)})}getCellRect(t){return{minX:this.cellMinX[t],minY:this.cellMinY[t],maxX:this.cellMaxX[t],maxY:this.cellMaxY[t]}}transformBoundsPointToGrid(t){const e=this.gridToBoundsTransform;return{x:(t.x-e.c)/e.a,y:(t.y-e.f)/e.e}}getConservativeGridRadius(t){return t/Math.min(Math.abs(this.gridToBoundsTransform.a),Math.abs(this.gridToBoundsTransform.e))}addObstacleRootId(t){let e=t.rootIdsByCell[t.cellIndex];e||(e=[],t.rootIdsByCell[t.cellIndex]=e),CH(e,t.obstacleRootId)}isBlockedByObstacleRoots(t,e){if(!t)return!1;const n=this.connIdToRootNet[e];for(const o of t)if(this.obstacleRootNames[o]!==n)return!0;return!1}hasSameRootObstacle(t,e){if(!t)return!1;const n=this.connIdToRootNet[e];return t.some(o=>this.obstacleRootNames[o]===n)}isLateralMoveBlockedByObstacleGeometry(t){const e=this.connIdToRootNet[t.activeConn],n=this.activeConnSeg,o=n&&t.layer===n.startZ&&t.fromCellId===n.startCellId?n.startPoint:Fv(this.gridToBoundsTransform,{x:this.cellCenterX[t.fromCellId],y:this.cellCenterY[t.fromCellId]}),i=n&&t.layer===n.endZ&&t.toCellId===n.endCellId?n.endPoint:Fv(this.gridToBoundsTransform,{x:this.cellCenterX[t.toCellId],y:this.cellCenterY[t.toCellId]});for(const r of this.obstacleTracePrimitives){if(r.layer!==t.layer||this.obstacleRootNames[r.rootId]===e)continue;const s=r.traceRadius+this.traceThickness/2+this.obstacleClearanceMargin;if(Ygo({firstStart:o,firstEnd:i,secondStart:r.segmentStart,secondEnd:r.segmentEnd})<s*s)return!0}for(const r of this.obstacleViaPrimitives){if(!r.layers.includes(t.layer)||this.obstacleRootNames[r.rootId]===e)continue;const s=r.viaRadius+this.traceThickness/2+this.obstacleClearanceMargin;if(PN({point:r.center,segmentStart:o,segmentEnd:i})<s*s)return!0}for(const r of this.obstacleRectPrimitives)if(r.layers.includes(t.layer)&&this.obstacleRootNames[r.rootId]!==e&&c6t({segmentStart:rQe(o,r),segmentEnd:rQe(i,r),radius:this.traceThickness/2+this.obstacleClearanceMargin,rect:s6t(r)}))return!0;return!1}isViaMoveBlockedByObstacleGeometry(t){const e=this.connIdToRootNet[t.activeConn],n=Fv(this.gridToBoundsTransform,{x:this.cellCenterX[t.cellId],y:this.cellCenterY[t.cellId]});for(const o of this.obstacleTracePrimitives){if(this.obstacleRootNames[o.rootId]===e)continue;const i=o.traceRadius+this.viaDiameter/2+this.obstacleClearanceMargin;if(PN({point:n,segmentStart:o.segmentStart,segmentEnd:o.segmentEnd})<i*i)return!0}for(const o of this.obstacleViaPrimitives){if(this.obstacleRootNames[o.rootId]===e)continue;const i=o.viaRadius+this.viaDiameter/2+this.obstacleClearanceMargin;if((n.x-o.center.x)**2+(n.y-o.center.y)**2<i*i)return!0}for(const o of this.obstacleRectPrimitives){if(this.obstacleRootNames[o.rootId]===e)continue;const i=rQe(n,o),r=this.viaDiameter/2+this.obstacleClearanceMargin;if(NW({point:i,rect:s6t(o)})<r*r)return!0}return!1}buildFiveRegionGrid(t,e){this.fineCols=Math.max(1,Math.ceil(t/this.highResolutionCellSize)),this.fineRows=Math.max(1,Math.ceil(e/this.highResolutionCellSize)),this.bandCols=Math.min(this.highResolutionCellThickness,Math.floor(this.fineCols/2)),this.bandRows=Math.min(this.highResolutionCellThickness,Math.floor(this.fineRows/2));const n=Math.max(0,this.fineCols-2*this.bandCols),o=Math.max(0,this.fineRows-2*this.bandRows),i=n,r=n;this.regions=[{id:0,name:"left",fineOriginRow:0,fineOriginCol:0,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:1,name:"top",fineOriginRow:0,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:i,cellScale:1,rows:this.bandRows,cols:i,offset:0},{id:2,name:"right",fineOriginRow:0,fineOriginCol:this.fineCols-this.bandCols,fineRows:this.fineRows,fineCols:this.bandCols,cellScale:1,rows:this.fineRows,cols:this.bandCols,offset:0},{id:3,name:"bottom",fineOriginRow:this.fineRows-this.bandRows,fineOriginCol:this.bandCols,fineRows:this.bandRows,fineCols:r,cellScale:1,rows:this.bandRows,cols:r,offset:0},{id:4,name:"middle",fineOriginRow:this.bandRows,fineOriginCol:this.bandCols,fineRows:o,fineCols:n,cellScale:this.lowScale,rows:o>0?Math.ceil(o/this.lowScale):0,cols:n>0?Math.ceil(n/this.lowScale):0,offset:0}];let s=0;for(let C=0;C<this.regions.length;C++)this.regions[C].offset=s,s+=this.regions[C].rows*this.regions[C].cols;this.planeSize=s,this.cellCenterX=new Float64Array(this.planeSize),this.cellCenterY=new Float64Array(this.planeSize),this.cellMinX=new Float64Array(this.planeSize),this.cellMinY=new Float64Array(this.planeSize),this.cellMaxX=new Float64Array(this.planeSize),this.cellMaxY=new Float64Array(this.planeSize),this.cellWidth=new Float64Array(this.planeSize),this.cellHeight=new Float64Array(this.planeSize),this.cellRegion=new Uint8Array(this.planeSize),this.cellRow=new Int32Array(this.planeSize),this.cellCol=new Int32Array(this.planeSize),this.viaAllowed=new Uint8Array(this.planeSize);for(let C=0;C<this.regions.length;C++){const y=this.regions[C];for(let x=0;x<y.rows;x++){const E=y.fineOriginRow+x*y.cellScale,B=Math.min(y.fineOriginRow+y.fineRows,E+y.cellScale),S=this.boundsMinY+E*this.highResolutionCellSize,Q=Math.min(this.boundsMaxY,this.boundsMinY+B*this.highResolutionCellSize);for(let w=0;w<y.cols;w++){const M=y.fineOriginCol+w*y.cellScale,k=Math.min(y.fineOriginCol+y.fineCols,M+y.cellScale),R=this.boundsMinX+M*this.highResolutionCellSize,F=Math.min(this.boundsMaxX,this.boundsMinX+k*this.highResolutionCellSize),O=this.cellIdFor(y.id,x,w);this.cellCenterX[O]=(R+F)/2,this.cellCenterY[O]=(S+Q)/2,this.cellMinX[O]=R,this.cellMinY[O]=S,this.cellMaxX[O]=F,this.cellMaxY[O]=Q,this.cellWidth[O]=F-R,this.cellHeight[O]=Q-S,this.cellRegion[O]=y.id,this.cellRow[O]=x,this.cellCol[O]=w;const U=Math.min(this.cellCenterX[O]-this.boundsMinX,this.boundsMaxX-this.cellCenterX[O],this.cellCenterY[O]-this.boundsMinY,this.boundsMaxY-this.cellCenterY[O]);this.viaAllowed[O]=U>=this.viaMinDistFromBorder?1:0}}}const a=Array.from({length:this.planeSize},()=>[]),A=(C,y)=>{if(C===y||C<0||y<0)return;const x=this.cellCenterX[C]-this.cellCenterX[y],E=this.cellCenterY[C]-this.cellCenterY[y],B=Math.hypot(x,E);a6t(a[C],{cellId:y,cost:B}),a6t(a[y],{cellId:C,cost:B})};for(let C=0;C<this.regions.length;C++){const y=this.regions[C];for(let x=0;x<y.rows;x++)for(let E=0;E<y.cols;E++){const B=this.cellIdFor(y.id,x,E);x+1<y.rows&&A(B,this.cellIdFor(y.id,x+1,E)),E+1<y.cols&&A(B,this.cellIdFor(y.id,x,E+1))}}const c=this.regions[0],l=this.regions[1],u=this.regions[2],g=this.regions[3],h=this.regions[4],d=c.rows>0&&c.cols>0,p=l.rows>0&&l.cols>0,m=u.rows>0&&u.cols>0,_=g.rows>0&&g.cols>0,f=h.rows>0&&h.cols>0;if(d&&p)for(let C=0;C<this.bandRows;C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(1,C,0));if(p&&m)for(let C=0;C<this.bandRows;C++)A(this.cellIdFor(1,C,l.cols-1),this.cellIdFor(2,C,0));if(d&&_)for(let C=this.fineRows-this.bandRows;C<this.fineRows;C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(3,C-(this.fineRows-this.bandRows),0));if(_&&m)for(let C=this.fineRows-this.bandRows;C<this.fineRows;C++)A(this.cellIdFor(3,C-(this.fineRows-this.bandRows),g.cols-1),this.cellIdFor(2,C,0));if(d&&f)for(let C=this.bandRows;C<this.fineRows-this.bandRows;C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(4,Math.floor((C-this.bandRows)/this.lowScale),0));if(m&&f)for(let C=this.bandRows;C<this.fineRows-this.bandRows;C++)A(this.cellIdFor(4,Math.floor((C-this.bandRows)/this.lowScale),h.cols-1),this.cellIdFor(2,C,0));if(p&&f)for(let C=this.bandCols;C<this.fineCols-this.bandCols;C++)A(this.cellIdFor(1,l.rows-1,C-this.bandCols),this.cellIdFor(4,0,Math.floor((C-this.bandCols)/this.lowScale)));if(_&&f)for(let C=this.bandCols;C<this.fineCols-this.bandCols;C++)A(this.cellIdFor(4,h.rows-1,Math.floor((C-this.bandCols)/this.lowScale)),this.cellIdFor(3,0,C-this.bandCols));if(!f&&!p&&!_&&d&&m)for(let C=0;C<Math.min(c.rows,u.rows);C++)A(this.cellIdFor(0,C,c.cols-1),this.cellIdFor(2,C,0));if(!f&&!d&&!m&&p&&_)for(let C=0;C<Math.min(l.cols,g.cols);C++)A(this.cellIdFor(1,l.rows-1,C),this.cellIdFor(3,0,C));const I=this.flattenNeighborLists(a);this.neighborOffset=I.offset,this.neighborIds=I.ids,this.neighborCosts=I.costs}cellIdFor(t,e,n){const o=this.regions[t];return o.offset+e*o.cols+n}stepOnce(){if(!this.activeConnSeg){if(this.unsolvedSegs.length===0)return void(this.solved=!0);const f=this.unsolvedSegs.shift();this.activeConnSeg=f,this.activeConnId=f.connId,this.nodePool.clear(),this.ripChain.clear(),this.heap.clear(),this.seqCounter=0,this.searchIterations=0,this.nextStamp();const I=this.computeH(f.startZ,f.startCellId,f.endZ,f.endCellId)*this.hyperParameters.greedyMultiplier,C=this.nodePool.push(f.startZ,f.startCellId,0,-1,-1,0),y=f.startZ*this.planeSize+f.startCellId,x=this.getSearchStateIdx(y,0);return this.bestGStamp[x]=this.stamp,this.bestGValue[x]=0,void this.heap.push(I,this.seqCounter++,C)}this.searchIterations++;const t=this.ripCount[this.activeConnId]??0,e=Math.round(this.baseSearchBudgetIters*(1+.25*Math.min(t,10)));if(this.searchIterations>e){const f=this.penalty2d;for(let I=0;I<f.length;I++)f[I]=.9*f[I];return this.unsolvedSegs.push(this.activeConnSeg),this.activeConnSeg=null,this.activeConnId=-1,this.heap.clear(),this.nodePool.clear(),this.consecutiveSkips++,void(this.consecutiveSkips>=Math.max(3,3*this.unsolvedSegs.length)&&(this.error=`Convergence failure: ${this.unsolvedSegs.length} connections stuck`,this.failed=!0))}if(this.heap.size===0)return this.error=`No path found for ${this.connIdToName[this.activeConnId]}`,void(this.failed=!0);const n=this.heap.pop(),o=this.nodePool.z[n],i=this.nodePool.cellId[n],r=this.nodePool.g[n],s=this.nodePool.ripHead[n],a=this.nodePool.ripCount[n],A=o*this.planeSize+i,c=this.getSearchStateIdx(A,a);if(this.visitedStamp[c]===this.stamp)return;this.visitedStamp[c]=this.stamp,this.visitedFlatStamp[A]=this.stamp;const l=this.activeConnSeg;if(o===l.endZ&&i===l.endCellId)return this.finalizeRoute(n),this.activeConnSeg=null,void(this.activeConnId=-1);const u=this.visitedStamp,g=this.stamp,h=this.activeConnId,d=l.endZ,p=l.endCellId,m=this.neighborOffset[i],_=this.neighborOffset[i+1];for(let f=m;f<_;f++){const I=this.neighborIds[f],C=o*this.planeSize+I;if(this.computeMoveCostAndRips(h,o,i,I,!1,s,a,this.neighborCosts[f]),this._moveCost<0)continue;const y=this.getSearchStateIdx(C,this._moveRipCount);if(u[y]===g)continue;const x=r+this._moveCost;if(this.bestGStamp[y]===g&&x>=this.bestGValue[y])continue;this.bestGStamp[y]=g,this.bestGValue[y]=x;const E=x+this.computeH(o,I,d,p)*this.hyperParameters.greedyMultiplier,B=this.nodePool.push(o,I,x,n,this._moveRippedHead,this._moveRipCount);this.heap.push(E,this.seqCounter++,B)}if(this.viaAllowed[i])for(let f=0;f<this.layers;f++){if(f===o)continue;const I=f*this.planeSize+i;if(this.computeMoveCostAndRips(h,f,i,i,!0,s,a,0),this._moveCost<0)continue;const C=this.getSearchStateIdx(I,this._moveRipCount);if(u[C]===g)continue;const y=r+this._moveCost;if(this.bestGStamp[C]===g&&y>=this.bestGValue[C])continue;this.bestGStamp[C]=g,this.bestGValue[C]=y;const x=y+this.computeH(f,i,d,p)*this.hyperParameters.greedyMultiplier,E=this.nodePool.push(f,i,y,n,this._moveRippedHead,this._moveRipCount);this.heap.push(x,this.seqCounter++,E)}}computeMoveCostAndRips(t,e,n,o,i,r,s,a){let A=0,c=r,l=s;const u=e*this.planeSize+o,g=i?this.obstacleViaRootIdsByCell[o]:[...this.obstacleTraceRootIdsFlat[e*this.planeSize+n]??[],...this.obstacleTraceRootIdsFlat[u]??[]];if(this.isBlockedByObstacleRoots(g,t)&&(i?this.isViaMoveBlockedByObstacleGeometry({activeConn:t,cellId:o}):this.isLateralMoveBlockedByObstacleGeometry({activeConn:t,layer:e,fromCellId:n,toCellId:o})))return this._moveCost=-1,this._moveRippedHead=c,void(this._moveRipCount=l);const h=this.hasSameRootObstacle(g,t);if(i){A+=this.hyperParameters.viaBaseCost,A+=Math.min(this.penalty2d[o],this.penaltyCap);const d=this.portOwnerFlat[u],p=this.allowSharedUse(t,d),m=this.activeConnSeg,_=!!m&&e===m.endZ&&o===m.endCellId;if(d>=0&&d!==t&&!p&&!_)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillViaOccupants(o,t);const f=this._viaOccs;for(let I=0;I<f.length;I++){const C=f[I];this.ripChain.contains(c,C)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,C),l++),A+=this.hyperParameters.ripViaPenalty}}else{A+=a,A+=Math.min(this.penalty2d[o],this.penaltyCap);const d=this.portOwnerFlat[u],p=this.allowSharedUse(t,d),m=this.activeConnSeg,_=!!m&&e===m.endZ&&o===m.endCellId;if(d>=0&&d!==t&&!p&&!_)return this._moveCost=-1,void(this._moveRippedHead=c);this.fillTraceOccupants(u,t,this._cellOccs);for(let f=0;f<this._cellOccs.length;f++){const I=this._cellOccs[f];this.ripChain.contains(c,I)||(A+=this.hyperParameters.ripCost,c=this.ripChain.append(c,I),l++),A+=this.hyperParameters.ripTracePenalty}}h&&(A*=this.hyperParameters.sameRootObstacleCostMultiplier),this._moveCost=A,this._moveRippedHead=c,this._moveRipCount=l}fillViaOccupants(t,e){const n=this._viaOccs;n.length=0;const o=this.cellCenterX[t],i=this.cellCenterY[t];this.forEachCellNearCircle(o,i,this.viaKeepoutRadius,r=>{if(DW(o,i,this.viaKeepoutRadius,this.cellMinX[r],this.cellMinY[r],this.cellMaxX[r],this.cellMaxY[r]))for(let s=0;s<this.layers;s++)this.pushFlatOccupants(s*this.planeSize+r,e,n)})}fillTraceOccupants(t,e,n){n.length=0,this.pushFlatOccupants(t,e,n)}pushFlatOccupants(t,e,n){const o=this.usedCellsFlat[t];o===-1||o===e||this.allowSharedUse(e,o)||CH(n,o);const i=this.sharedCellsFlat[t];if(i)for(let r=0;r<i.length;r++){const s=i[r];s!==e&&(this.allowSharedUse(e,s)||CH(n,s))}}addSharedOccupant(t,e){if(this.usedCellsFlat[t]===e)return;let n=this.sharedCellsFlat[t];n||(n=[],this.sharedCellsFlat[t]=n),CH(n,e)}replaceOccupants(t,e){this.usedCellsFlat[t]=e,this.sharedCellsFlat[t]=void 0}removeOccupant(t,e){const n=this.sharedCellsFlat[t];if(this.usedCellsFlat[t]===e)return void(n&&n.length>0?(this.usedCellsFlat[t]=n.pop(),n.length===0&&(this.sharedCellsFlat[t]=void 0)):this.usedCellsFlat[t]=-1);if(!n)return;const o=n.indexOf(e);o!==-1&&(n.splice(o,1),n.length===0&&(this.sharedCellsFlat[t]=void 0))}allowSharedUse(t,e){return e<0?!1:this.connIdToRootNet[e]===this.connIdToRootNet[t]}shouldSkipFixedPortHalo(t,e){const n=this.portOwnerFlat[t];return n!==e&&(n===-2||!(n<0)&&!this.allowSharedUse(e,n))}nextStamp(){this.stamp=this.stamp+1>>>0,this.stamp===0&&(this.visitedStamp.fill(0),this.bestGStamp.fill(0),this.visitedFlatStamp.fill(0),this.stamp=1)}getSearchStateIdx(t,e){return t}computeH(t,e,n,o){const i=Math.hypot(this.cellCenterX[e]-this.cellCenterX[o],this.cellCenterY[e]-this.cellCenterY[o]);return t===n?i:i+this.hyperParameters.viaBaseCost}internConn(t,e){const n=this.connNameToId.get(t);if(n!==void 0)return n;const o=this.connIdToName.length;return this.connIdToName.push(t),this.connIdToRootNet.push(iQe(t,e)),this.connNameToId.set(t,o),o}buildConnectionSegs(){const t=new Map;for(const o of this.nodeWithPortPoints.portPoints){const i=o.connectionName;t.has(i)||t.set(i,{points:[],rootConnectionName:o.rootConnectionName}),t.get(i).points.push(o)}const e=[],n=new Map;for(const[o,i]of t){const r=i.points,s=Lgo(r);if(s.length===0)continue;const a=this.internConn(o,i.rootConnectionName);for(const[A,c]of s){const l=this.pointToCell(A),u=this.pointToCell(c),g=`${l.z}:${l.cellId}`,h=`${u.z}:${u.cellId}`,d=g<h?`${g}|${h}`:`${h}|${g}`,p=this.connIdToRootNet[a],m=`${p}|${d}`,_=n.get(m);if(_){if(this.overlapFriendlyRootNets.add(p),!_.connectionAliases.some(I=>I.connectionName===o)){const I=_.startZ===l.z&&_.startCellId===l.cellId&&_.endZ===u.z&&_.endCellId===u.cellId,C=_.startZ===u.z&&_.startCellId===u.cellId&&_.endZ===l.z&&_.endCellId===l.cellId;if(!I&&!C)throw new Error(`Connection alias ${o} does not match canonical segment ${m}`);_.connectionAliases.push({connectionName:o,rootConnectionName:p,startPoint:A,endPoint:c,reversedFromCanonical:!I&&C})}continue}const f={connId:a,startZ:l.z,startCellId:l.cellId,startPoint:A,endZ:u.z,endCellId:u.cellId,endPoint:c,connectionAliases:[{connectionName:o,rootConnectionName:p,startPoint:A,endPoint:c,reversedFromCanonical:!1}]};n.set(m,f),e.push(f)}}return e}pointToCell(t){const e=X3(Math.floor((t.x-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),n=X3(Math.floor((t.y-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);let o=4;e<this.bandCols?o=0:e>=this.fineCols-this.bandCols?o=2:n<this.bandRows?o=1:n>=this.fineRows-this.bandRows&&(o=3);const i=this.regions[o],r=n-i.fineOriginRow,s=e-i.fineOriginCol,a=X3(Math.floor(r/i.cellScale),0,Math.max(0,i.rows-1)),A=X3(Math.floor(s/i.cellScale),0,Math.max(0,i.cols-1));return{z:this.zToLayer.get(t.z)??0,cellId:this.cellIdFor(o,a,A)}}shuffleConnections(){const t=this.unsolvedSegs;let e=this.hyperParameters.shuffleSeed>>>0;const n=()=>(e=Math.imul(e,1664525)+1013904223>>>0,e/4294967295);for(let o=t.length-1;o>0;o--){const i=Math.floor(n()*(o+1)),r=t[o];t[o]=t[i],t[i]=r}}finalizeRoute(t){this.consecutiveSkips=Math.max(0,this.consecutiveSkips-1);const e=[];let n=t;for(;n>=0;){const c=this.nodePool.z[n],l=this.nodePool.cellId[n];e.push(c*this.planeSize+l),n=this.nodePool.parent[n]}for(e.reverse();e.length>1&&this.sharedCrossRootPortFlat[e[0]];)e.shift();for(;e.length>1&&this.sharedCrossRootPortFlat[e[e.length-1]];)e.pop();const o=this.extractViaCellIds(e),i=this.activeConnId;this.ripChain.collect(this.nodePool.ripHead[t],this._rippedIds);for(let c=0;c<this._rippedIds.length;c++)if(this.ripTrace(this._rippedIds[c]),this.failed)return;const r=[];for(let c=0;c<e.length;c++){const l=e[c],u=Math.floor(l/this.planeSize),g=l-u*this.planeSize;this.markTraceFootprint(i,u,g,r)}const s=[];for(let c=0;c<o.length;c++)this.markViaFootprint(i,o[c],r,s);for(;this.usedIndicesByConn.length<=i;)this.usedIndicesByConn.push(void 0);const a=this.usedIndicesByConn[i]??[];for(a.push(...r),this.usedIndicesByConn[i]=a;this.solvedRoutes.length<=i;)this.solvedRoutes.push(void 0);const A=this.solvedRoutes[i]??[];A.push({connId:i,states:Int32Array.from(e),viaCellIds:Int32Array.from(o),startPoint:this.activeConnSeg.startPoint,endPoint:this.activeConnSeg.endPoint,connectionAliases:this.activeConnSeg.connectionAliases}),this.solvedRoutes[i]=A;for(let c=0;c<s.length;c++)if(this.ripTrace(s[c]),this.failed)return;if(this._rippedIds.length>0||s.length>0){const c=this.penalty2d,l=this.penaltyCap;if(this.totalRipEvents>50)for(let u=0;u<c.length;u++)c[u]=.99*c[u];else for(let u=0;u<c.length;u++)c[u]>l&&(c[u]=.5*c[u])}}extractViaCellIds(t){const e=[];for(let n=1;n<t.length;n++){const o=t[n-1],i=t[n],r=Math.floor(o/this.planeSize),s=Math.floor(i/this.planeSize);r!==s&&e.push(i-s*this.planeSize)}return e}markTraceFootprint(t,e,n,o){const i=this.cellCenterX[n],r=this.cellCenterY[n];this.forEachCellNearCircle(i,r,this.traceKeepoutRadius,s=>{if(!DW(i,r,this.traceKeepoutRadius,this.cellMinX[s],this.cellMinY[s],this.cellMaxX[s],this.cellMaxY[s]))return;const a=e*this.planeSize+s;if(s!==n&&this.shouldSkipFixedPortHalo(a,t))return;const A=this.usedCellsFlat[a],c=this.allowSharedUse(t,A);(A===-1||A===t||c)&&(A!==-1&&A!==t?this.addSharedOccupant(a,t):this.usedCellsFlat[a]=t,o.push(a))})}markViaFootprint(t,e,n,o){const i=this.cellCenterX[e],r=this.cellCenterY[e];this.forEachCellNearCircle(i,r,this.viaKeepoutRadius,s=>{if(DW(i,r,this.viaKeepoutRadius,this.cellMinX[s],this.cellMinY[s],this.cellMaxX[s],this.cellMaxY[s]))for(let a=0;a<this.layers;a++){const A=a*this.planeSize+s;if(s!==e&&this.shouldSkipFixedPortHalo(A,t))continue;if(this.fillTraceOccupants(A,t,this._cellOccs),this._cellOccs.length>0){for(let l=0;l<this._cellOccs.length;l++)CH(o,this._cellOccs[l]);this.replaceOccupants(A,t),n.push(A);continue}const c=this.usedCellsFlat[A];c!==-1&&c!==t?this.addSharedOccupant(A,t):this.usedCellsFlat[A]=t,n.push(A)}})}forEachCellNearCircle(t,e,n,o){const i=X3(Math.floor((t-n-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),r=X3(Math.floor((t+n-this.boundsMinX)/this.highResolutionCellSize),0,this.fineCols-1),s=X3(Math.floor((e-n-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1),a=X3(Math.floor((e+n-this.boundsMinY)/this.highResolutionCellSize),0,this.fineRows-1);for(let A=0;A<this.regions.length;A++){const c=this.regions[A];if(c.rows===0||c.cols===0)continue;const l=Math.max(s,c.fineOriginRow),u=Math.min(a,c.fineOriginRow+c.fineRows-1),g=Math.max(i,c.fineOriginCol),h=Math.min(r,c.fineOriginCol+c.fineCols-1);if(l>u||g>h)continue;const d=Math.floor((l-c.fineOriginRow)/c.cellScale),p=Math.floor((u-c.fineOriginRow)/c.cellScale),m=Math.floor((g-c.fineOriginCol)/c.cellScale),_=Math.floor((h-c.fineOriginCol)/c.cellScale);for(let f=d;f<=p;f++)for(let I=m;I<=_;I++)o(this.cellIdFor(c.id,f,I))}}ripTrace(t){for(;this.ripCount.length<=t;)this.ripCount.push(0);if(this.ripCount[t]++,this.totalRipEvents++,this.totalRipEvents>=this.MAX_RIPS)return this.error=`Convergence failure: exceeded MAX_RIPS ${this.MAX_RIPS}`,void(this.failed=!0);const e=this.getSolvedRoutesForConn(t);if(e.length>0)for(const o of e){for(let i=0;i<o.states.length;i++){const r=o.states[i]%this.planeSize;this.penalty2d[r]=this.penalty2d[r]+this.hyperParameters.ripTracePenalty}for(let i=0;i<o.viaCellIds.length;i++){const r=o.viaCellIds[i];this.penalty2d[r]=this.penalty2d[r]+this.hyperParameters.ripViaPenalty}}const n=this.usedIndicesByConn[t];if(n){for(let o=0;o<n.length;o++)this.removeOccupant(n[o],t);this.usedIndicesByConn[t]=void 0}if(e.length>0){this.solvedRoutes[t]=void 0;for(const o of e){const i=o.states[0],r=o.states[o.states.length-1],s=Math.floor(i/this.planeSize),a=Math.floor(r/this.planeSize);this.unsolvedSegs.push({connId:t,startZ:s,startCellId:i-s*this.planeSize,startPoint:o.startPoint,endZ:a,endCellId:r-a*this.planeSize,endPoint:o.endPoint,connectionAliases:o.connectionAliases})}}}flattenNeighborLists(t){const e=new Int32Array(t.length+1);let n=0;for(let s=0;s<t.length;s++)e[s]=n,n+=t[s].length;e[t.length]=n;const o=new Int32Array(n),i=new Float32Array(n);let r=0;for(let s=0;s<t.length;s++){const a=t[s];for(let A=0;A<a.length;A++){const c=a[A];o[r]=c.cellId,i[r]=c.cost,r++}}return{offset:e,ids:o,costs:i}}visualize(){const t=["red","blue","orange","green"],e=this.gridToBoundsTransform,n=[],o=[],i=[],r=[];r.push({center:{x:this.nodeWithPortPoints.center.x,y:this.nodeWithPortPoints.center.y},width:this.nodeWithPortPoints.width,height:this.nodeWithPortPoints.height,stroke:"gray"});const s=({route:A,connectionName:c,strokeWidth:l,strokeDash:u,labelPrefix:g})=>{if(A.length<2)return;let h=0;for(let p=1;p<A.length;p+=1){const m=A[p-1];A[p].z!==m.z&&(p-h>=2&&o.push({points:A.slice(h,p).map(_=>({x:_.x,y:_.y})),strokeColor:t[m.z]??"rgba(128,128,128,0.75)",strokeWidth:l,strokeDash:u,label:`${g} ${c} z=${m.z}`}),h=p)}if(A.length-h<2)return;const d=A[h].z;o.push({points:A.slice(h).map(p=>({x:p.x,y:p.y})),strokeColor:t[d]??"rgba(128,128,128,0.75)",strokeWidth:l,strokeDash:u,label:`${g} ${c} z=${d}`})};for(const A of this.obstacles)if(A.type!=="rect"){s({route:A.route,connectionName:A.connectionName,strokeWidth:A.traceThickness,strokeDash:[.12,.08],labelPrefix:"fixed obstacle"});for(const c of A.vias)i.push({center:{x:c.x,y:c.y},radius:A.viaDiameter/2,fill:"rgba(128,0,128,0.25)",stroke:"purple",label:`fixed obstacle ${A.connectionName} via`})}else r.push({center:A.center,width:A.width,height:A.height,fill:"rgba(128,0,128,0.12)",stroke:"purple",label:`fixed obstacle ${A.connectionName}`});if(this.showPenaltyMap&&this.penalty2d){let A=0;for(let c=0;c<this.penalty2d.length;c++)this.penalty2d[c]>A&&(A=this.penalty2d[c]);if(A>0)for(let c=0;c<this.planeSize;c++){const l=this.penalty2d[c];if(l<=0)continue;const u=Fv(e,{x:this.cellCenterX[c],y:this.cellCenterY[c]}),g=Math.min(.6,l/A*.6);r.push({center:u,width:this.cellWidth[c]*e.a,height:this.cellHeight[c]*e.e,fill:`rgba(255,165,0,${g.toFixed(3)})`})}}if(this.showUsedCellMap&&this.usedCellsFlat)for(let A=0;A<this.layers;A++){const c=A*this.planeSize;for(let l=0;l<this.planeSize;l++){if(this.usedCellsFlat[c+l]===-1)continue;const u=Fv(e,{x:this.cellCenterX[l],y:this.cellCenterY[l]});r.push({center:u,width:this.cellWidth[l]*e.a,height:this.cellHeight[l]*e.e,fill:"rgba(0,0,255,0.5)"})}}for(const A of this.nodeWithPortPoints.portPoints)n.push({x:A.x,y:A.y,color:t[A.z]??"gray",label:A.connectionName});const a=this.getOutput();for(const A of a)s({route:A.route,connectionName:A.connectionName,strokeWidth:this.traceThickness,labelPrefix:"B01 route"});for(const A of a)for(const c of A.vias)i.push({center:{x:c.x,y:c.y},radius:this.viaDiameter/2,fill:"rgba(0,0,0,0.3)",stroke:"black",label:`B01 route ${A.connectionName} via`});if(this.activeConnSeg&&this.visitedFlatStamp){const A=this.stamp;for(let c=0;c<this.layers;c++){const l=c*this.planeSize;for(let u=0;u<this.planeSize;u++){if(this.visitedFlatStamp[l+u]!==A)continue;const g=Fv(e,{x:this.cellCenterX[u],y:this.cellCenterY[u]});n.push({x:g.x,y:g.y,color:"rgba(0,0,255,0.2)"})}}}return{points:n,lines:o,circles:i,rects:r,coordinateSystem:"cartesian",title:`HighDensityB01 [${this.getSolvedRouteCount()} solved, ${this.unsolvedSegs?.length??0} remaining]`}}getOutput(){const t=this.gridToBoundsTransform,e=[];for(let n=0;n<this.solvedRoutes.length;n++){const o=this.getSolvedRoutesForConn(n);if(o.length!==0)for(const i of o){const r=Array.from(i.states,a=>{const A=Math.floor(a/this.planeSize),c=a-A*this.planeSize,l=Fv(t,{x:this.cellCenterX[c],y:this.cellCenterY[c]});return{x:l.x,y:l.y,z:this.layerToZ.get(A)??A}}),s=Array.from(i.viaCellIds,a=>Fv(t,{x:this.cellCenterX[a],y:this.cellCenterY[a]}));for(const a of i.connectionAliases){const A=(a.reversedFromCanonical?[...r].reverse():r).map(c=>({...c}));A.length>0&&(A[0]={...a.startPoint},A.length>1&&(A[A.length-1]={...a.endPoint})),e.push({connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,regionId:this.nodeWithPortPoints.capacityMeshNodeId,traceThickness:this.traceThickness,viaDiameter:this.viaDiameter,route:A,vias:s.map(c=>({...c}))})}}}return e}getSolvedRoutesForConn(t){const e=this.solvedRoutes[t];return e?Array.isArray(e)?e:[e]:[]}getSolvedRouteCount(){let t=0;for(let e=0;e<this.solvedRoutes.length;e++)t+=this.getSolvedRoutesForConn(e).length;return t}computeGridToBoundsTransform(){let t=1/0,e=-1/0,n=1/0,o=-1/0;for(let l=0;l<this.planeSize;l++){const u=this.cellCenterX[l],g=this.cellCenterY[l];u<t&&(t=u),u>e&&(e=u),g<n&&(n=g),g>o&&(o=g)}const i=e-t,r=o-n,s=this.boundsMaxX-this.boundsMinX,a=this.boundsMaxY-this.boundsMinY,A=i>0?s/i:1,c=r>0?a/r:1;return{a:A,b:0,c:i>0?this.boundsMinX-A*t:(this.boundsMinX+this.boundsMaxX)/2-t,d:0,e:c,f:r>0?this.boundsMinY-c*n:(this.boundsMinY+this.boundsMaxY)/2-n}}},l6t=new WeakMap,MN=t=>{const e=l6t.get(t);if(e)return e;const n=[],o=[];for(let r=1;r<t.route.length;r++){const s=t.route[r-1],a=t.route[r],A=Math.hypot(a.x-s.x,a.y-s.y),c=Math.max(s.traceThickness??t.traceThickness,a.traceThickness??t.traceThickness);if(s.z!==a.z&&s.toNextSegmentType==="through_obstacle"){const l=Math.min(s.z,a.z),u=Math.max(s.z,a.z);if(A<=1e-9){const g=t.vias.some(h=>Math.hypot(h.x-a.x,h.y-a.y)<=1e-9);o.push({center:{x:a.x,y:a.y},minZ:l,maxZ:u,diameter:g?t.viaDiameter:c});continue}for(let g=l;g<=u;g++)n.push({start:{...s,z:g},end:{...a,z:g},z:g,width:c});continue}A>1e-9&&n.push({start:s,end:s.z===a.z?a:{...a,z:s.z},z:s.z,width:c}),s.z!==a.z&&o.push({center:{x:a.x,y:a.y},minZ:Math.min(s.z,a.z),maxZ:Math.max(s.z,a.z),diameter:t.viaDiameter})}const i={wireSegments:n,viaSpans:o};return l6t.set(t,i),i},u6t=(t,e,n)=>{const o=t.end.x-t.start.x,i=t.end.y-t.start.y,r=Math.hypot(o,i),s={x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2};return Math.abs(o)<=1e-9||Math.abs(i)<=1e-9?[{center:s,width:Math.abs(o)>Math.abs(i)?r:t.width,height:Math.abs(o)>Math.abs(i)?t.width:r}]:XBt({center:s,width:r,height:t.width,rotation:180*Math.atan2(i,o)/Math.PI},Math.max(n,Math.ceil(r/e)))},g6t=({fixedObstacleRoutes:t,layerCount:e})=>t.flatMap((n,o)=>{const i=[n.connectionName,n.rootConnectionName].filter(s=>typeof s=="string"),r=MN(n);return[...r.wireSegments.flatMap((s,a)=>u6t(s,.75,2).map((A,c)=>({obstacleId:`pipeline9_fixed_obstacle_${o}_wire_${a}_${c}`,type:"rect",layers:[Kh(s.z,e)],center:A.center,width:A.width,height:A.height,connectedTo:i}))),...r.viaSpans.map((s,a)=>({obstacleId:`pipeline9_fixed_obstacle_${o}_via_${a}`,type:"rect",layers:Array.from({length:s.maxZ-s.minZ+1},(A,c)=>Kh(s.minZ+c,e)),center:s.center,width:s.diameter,height:s.diameter,connectedTo:i}))]}),d6t=(t,e,n)=>{const o=[t.connectionName,t.rootConnectionName].filter(r=>typeof r=="string"),i=[e.connectionName,e.rootConnectionName].filter(r=>typeof r=="string");return o.some(r=>i.some(s=>r===s||n.areIdsConnected(r,s)))},h6t=(t,e)=>t.minX<=e.maxX&&t.maxX>=e.minX&&t.minY<=e.maxY&&t.maxY>=e.minY,p6t=({left:t,right:e,clearance:n,leftBounds:o})=>{const i=MN(t),r=MN(e),s=o?i.wireSegments.filter(A=>((c,l)=>{const u={minX:Math.min(c.start.x,c.end.x)-c.width/2,maxX:Math.max(c.start.x,c.end.x)+c.width/2,minY:Math.min(c.start.y,c.end.y)-c.width/2,maxY:Math.max(c.start.y,c.end.y)+c.width/2};return h6t(u,l)})(A,o)):i.wireSegments,a=o?i.viaSpans.filter(A=>((c,l)=>{const u={minX:c.center.x-c.diameter/2,maxX:c.center.x+c.diameter/2,minY:c.center.y-c.diameter/2,maxY:c.center.y+c.diameter/2};return h6t(u,l)})(A,o)):i.viaSpans;for(const A of s){for(const c of r.wireSegments){if(A.z!==c.z)continue;const l=A.width/2+c.width/2+n;if(qQ(A.start,A.end,c.start,c.end)<l)return!0}for(const c of r.viaSpans){if(A.z<c.minZ||A.z>c.maxZ)continue;const l=A.width/2+c.diameter/2+n;if(qQ(A.start,A.end,c.center,c.center)<l)return!0}}for(const A of a){for(const c of r.wireSegments){if(c.z<A.minZ||c.z>A.maxZ)continue;const l=A.diameter/2+c.width/2+n;if(qQ(A.center,A.center,c.start,c.end)<l)return!0}for(const c of r.viaSpans){if(A.minZ>c.maxZ||c.minZ>A.maxZ)continue;const l=A.diameter/2+c.diameter/2+n;if(Math.hypot(A.center.x-c.center.x,A.center.y-c.center.y)<l)return!0}}return!1},Kgo=({routes:t,movablePreloadedConnectionNames:e,boardObstacles:n,connMap:o,layerCount:i,viaToPadClearance:r})=>t.some(s=>e.has(s.connectionName)?MN(s).viaSpans.some(a=>n.some(A=>Hse(A,s,o)?!1:!!((l,u)=>(l.__zLayers??l.zLayers)||l.layers.map(h=>Kr(h,u)))(A,i).some(l=>l>=a.minZ&&l<=a.maxZ)&&((l,u)=>{const g=-1*(u.ccwRotationDegrees??0)*Math.PI/180,h=l.x-u.center.x,d=l.y-u.center.y,p=h*Math.cos(g)-d*Math.sin(g),m=h*Math.sin(g)+d*Math.cos(g),_=Math.max(Math.abs(p)-u.width/2,0),f=Math.max(Math.abs(m)-u.height/2,0);return Math.hypot(_,f)})(a.center,A)<a.diameter/2+r)):!1),m6t=class extends yr{params;highDensitySolver;forceImproveSolver;repairSolver;phase="route";constructor(t){super(),this.params=t,this.stats={preloadedViaCandidateRejectionCount:0,forceImproveCandidateRejectionCount:0,repairCandidateRejectionCount:0},this.highDensitySolver=new HD({nodePortPoints:[t.nodeWithPortPoints],colorMap:t.colorMap,connMap:t.connMap,viaDiameter:t.viaDiameter,traceWidth:t.traceWidth,obstacleMargin:t.obstacleMargin,effort:t.effort,nodePfById:t.nodePfById,obstacles:t.obstacles,layerCount:t.layerCount,useGrowShrinkHighDensityIntraNodeSolver:!0,preserveTerminalPcbPortIds:!1,growShrinkFallbackToInvalidGeometryOnFailure:!1,growShrinkSolutionValidator:t.boardObstacles&&t.movablePreloadedConnectionNames&&t.viaToPadClearance!==void 0?e=>this.validateCandidateRoutes(e):void 0}),this.activeSubSolver=this.highDensitySolver,this.MAX_ITERATIONS=1e8*t.effort}getSolverName(){return"Pipeline9RegionalFallbackSolver"}validateCandidateRoutes(t){const{boardObstacles:e,movablePreloadedConnectionNames:n,viaToPadClearance:o}=this.params;if(!e||!n||o===void 0)return!0;const i=Kgo({routes:t,movablePreloadedConnectionNames:n,boardObstacles:e,connMap:this.params.connMap,layerCount:this.params.layerCount,viaToPadClearance:o});return i&&(this.stats.preloadedViaCandidateRejectionCount=Number(this.stats.preloadedViaCandidateRejectionCount??0)+1),!i}_step(){if(this.phase==="route"){if(this.highDensitySolver.step(),this.highDensitySolver.failed)return this.error=this.highDensitySolver.error,void(this.failed=!0);if(!this.highDensitySolver.solved)return;const t=J7t(this.highDensitySolver.routes);return this.validateCandidateRoutes(t)?(this.forceImproveSolver=new mJ({nodeWithPortPoints:[this.params.nodeWithPortPoints],hdRoutes:t,colorMap:this.params.colorMap,totalStepsPerNode:Math.max(12,Math.round(20*this.params.effort)),nodeAssignmentMargin:this.params.obstacleMargin}),this.activeSubSolver=this.forceImproveSolver,void(this.phase="improve")):(this.error="Pipeline9 regional route output failed its candidate validator",void(this.failed=!0))}if(this.phase==="improve"){if(this.forceImproveSolver.step(),this.forceImproveSolver.failed)return this.error=this.forceImproveSolver.error,void(this.failed=!0);if(!this.forceImproveSolver.solved)return;const t=this.forceImproveSolver.getOutput();return this.validateCandidateRoutes(t)?(this.repairSolver=new pW({nodeWithPortPoints:[this.params.nodeWithPortPoints],hdRoutes:t,obstacles:this.params.obstacles,colorMap:this.params.colorMap,repairMargin:this.params.obstacleMargin,maxSampleEntries:80}),this.activeSubSolver=this.repairSolver,void(this.phase="repair")):(this.stats.forceImproveCandidateRejectionCount=Number(this.stats.forceImproveCandidateRejectionCount??0)+1,this.error="Pipeline9 regional force-improve output failed its candidate validator",void(this.failed=!0))}if(this.phase==="repair"){if(this.repairSolver.step(),this.repairSolver.failed)return this.error=this.repairSolver.error,void(this.failed=!0);if(!this.repairSolver.solved)return;const t=this.repairSolver.getOutput();return this.validateCandidateRoutes(t)?(this.activeSubSolver=null,this.phase="done",void(this.solved=!0)):(this.stats.repairCandidateRejectionCount=Number(this.stats.repairCandidateRejectionCount??0)+1,this.error="Pipeline9 regional repair output failed its candidate validator",void(this.failed=!0))}}getOutput(){return this.repairSolver?.getOutput()??this.forceImproveSolver?.getOutput()??this.highDensitySolver.routes}visualize(){return this.repairSolver?.visualize()??this.forceImproveSolver?.visualize()??this.highDensitySolver.visualize()}},_6t=(t,e)=>({minX:t.center.x-t.width/2-e,maxX:t.center.x+t.width/2+e,minY:t.center.y-t.height/2-e,maxY:t.center.y+t.height/2+e}),Vgo=(t,e,n)=>{const o=Math.max(n.minX-t.x,0,t.x-n.maxX),i=Math.max(n.minY-t.y,0,t.y-n.maxY);return o*o+i*i<=e*e},zgo=(t,e,n,o)=>Math.min(t.x,e.x)-n<=o.maxX&&Math.max(t.x,e.x)+n>=o.minX&&Math.min(t.y,e.y)-n<=o.maxY&&Math.max(t.y,e.y)+n>=o.minY,TW=(t,e)=>{const n=o=>({...o,rootConnectionName:e.getNetConnectedToId(o.rootConnectionName??o.connectionName)??o.rootConnectionName??o.connectionName});return{...t,portPoints:t.portPoints.map(n),portPointsInPairs:t.portPointsInPairs?.map(([o,i])=>[n(o),n(i)])}},Jgo=({nodeWithPortPoints:t,connMap:e,colorMap:n,viaDiameter:o,traceWidth:i,obstacleMargin:r,effort:s,nodePfById:a,obstacles:A,layerCount:c})=>new HD({nodePortPoints:[TW(t,e)],colorMap:n,connMap:e,viaDiameter:o,traceWidth:i,obstacleMargin:r,effort:s,nodePfById:a,obstacles:A,layerCount:c,useGrowShrinkHighDensityIntraNodeSolver:!0,preserveTerminalPcbPortIds:!1,growShrinkFallbackToInvalidGeometryOnFailure:!1,captureSearchDebug:!1}),sQe=class extends yr{fixedHdRoutes;connMap;colorMap;obstacles;layerCount;viaDiameter;traceWidth;obstacleMargin;viaToPadClearance;effort;nodePfById;preserveTerminalPcbPortIds;includeBoardObstacles;enableRegionalFallback;maxB01Rips;routes=[];failedSolvers=[];unsolvedNodePortPoints;fixedRouteReplacements=new Map;removedFixedRouteConnectionNames=new Set;preloadedTraceMutationMasks=new Map;activeRegularSolver=null;activeB01Solver=null;activeFallbackSolver=null;activeFallbackFixedRouteSections=new Map;activeFallbackFixedObstacleRoutes=[];activeFallbackPromotedFixedRouteConnectionNames=new Set;activeFallbackReason=null;activeNode=null;constructor(t){super(),this.fixedHdRoutes=t.fixedHdRoutes,this.connMap=t.connMap,this.colorMap=t.colorMap??{},this.obstacles=t.obstacles,this.layerCount=t.layerCount,this.viaDiameter=t.viaDiameter,this.traceWidth=t.traceWidth,this.obstacleMargin=t.obstacleMargin,this.viaToPadClearance=t.viaToPadClearance,this.effort=t.effort,this.nodePfById=t.nodePfById instanceof Map?new Map(t.nodePfById):new Map(Object.entries(t.nodePfById??{})),this.preserveTerminalPcbPortIds=t.preserveTerminalPcbPortIds??!1,this.includeBoardObstacles=t.includeBoardObstacles??!1,this.enableRegionalFallback=t.enableRegionalFallback??!0,this.maxB01Rips=t.maxB01Rips,this.unsolvedNodePortPoints=[...t.nodePortPoints],this.MAX_ITERATIONS=1e8*this.effort,this.stats={nodeCount:t.nodePortPoints.length,solvedNodeCount:0,fixedObstacleCount:t.fixedHdRoutes.length,fixedObstacleUses:0,boardObstacleUses:0,fallbackNodeCount:0,regularNodeCount:0,b01NodeCount:0,reroutedFixedRouteCount:0,reroutedFixedRouteSectionCount:0,promotedFallbackAttemptCount:0,promotedFixedRouteCount:0,regionalPreloadedViaCandidateRejectionCount:0,regionalForceImproveCandidateRejectionCount:0,regionalRepairCandidateRejectionCount:0}}getSolverName(){return"Pipeline9HighDensitySolver"}getUpdatedFixedHdRoutes(){return this.fixedHdRoutes.flatMap(t=>this.removedFixedRouteConnectionNames.has(t.connectionName)?[]:[this.fixedRouteReplacements.get(t.connectionName)??t])}finishActiveNode(t){const e=this.activeNode?((n,o)=>n.map(i=>({...i,rootConnectionName:o.portPoints.find(r=>r.connectionName===i.connectionName)?.rootConnectionName??i.rootConnectionName})))(t,this.activeNode):t;this.routes.push(...this.preserveTerminalPcbPortIds&&this.activeNode?((n,o)=>{const i=o.portPoints.filter(r=>r.pcb_port_id!==void 0);return n.map(r=>{const s=r.route[0],a=r.route.at(-1),A=i.find(l=>s!==void 0&&l.connectionName===r.connectionName&&l.x===s.x&&l.y===s.y&&l.z===s.z),c=i.find(l=>a!==void 0&&l.connectionName===r.connectionName&&l.x===a.x&&l.y===a.y&&l.z===a.z);return{...r,startPcbPortId:A?.pcb_port_id,endPcbPortId:c?.pcb_port_id}})})(e,this.activeNode):e),this.stats.solvedNodeCount=Number(this.stats.solvedNodeCount??0)+1,this.activeB01Solver=null,this.activeRegularSolver=null,this.activeFallbackSolver=null,this.activeFallbackFixedRouteSections.clear(),this.activeFallbackFixedObstacleRoutes=[],this.activeFallbackPromotedFixedRouteConnectionNames.clear(),this.activeFallbackReason=null,this.activeNode=null}startRegularSolver(t){this.activeNode=t,this.activeRegularSolver=Jgo({nodeWithPortPoints:t,colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:this.effort,nodePfById:this.nodePfById,obstacles:this.obstacles,layerCount:this.layerCount}),this.stats.regularNodeCount=Number(this.stats.regularNodeCount??0)+1}startRegionalFallback(t=new Set){if(!this.activeNode)throw new Error("Pipeline9 cannot start a regional fallback without an active node");const e={...TW(this.activeNode,this.connMap),availableZ:Array.from({length:this.layerCount},(s,a)=>a)},n=MW(e,this.getUpdatedFixedHdRoutes(),t),o=new Set([...n.fixedRouteSectionsByConnectionName.values()].flatMap(s=>s.sourceRoutes.map(a=>a.connectionName)));for(const s of t)if(!o.has(s))throw new Error(`Pipeline9 could not promote fixed route "${s}" into the active regional fallback`);const i=[...t].filter(s=>!this.activeFallbackPromotedFixedRouteConnectionNames.has(s)).length;this.activeFallbackFixedRouteSections=n.fixedRouteSectionsByConnectionName,this.activeFallbackFixedObstacleRoutes=n.fixedObstacleRoutes,this.activeFallbackPromotedFixedRouteConnectionNames=new Set(t);const r=g6t({fixedObstacleRoutes:this.activeFallbackFixedObstacleRoutes,layerCount:this.layerCount});this.activeFallbackSolver=new m6t({nodeWithPortPoints:n.nodeWithPortPoints,colorMap:this.colorMap,connMap:this.connMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:this.effort,nodePfById:this.nodePfById,obstacles:[...this.obstacles,...r],boardObstacles:this.obstacles,movablePreloadedConnectionNames:o,viaToPadClearance:this.viaToPadClearance,layerCount:this.layerCount}),t.size===0?this.stats.fallbackNodeCount=Number(this.stats.fallbackNodeCount??0)+1:(this.stats.promotedFallbackAttemptCount=Number(this.stats.promotedFallbackAttemptCount??0)+1,this.stats.promotedFixedRouteCount=Number(this.stats.promotedFixedRouteCount??0)+i)}finishRegionalFallback(){if(!this.activeFallbackSolver)return;if(!this.activeNode)throw new Error("Pipeline9 cannot finish a regional fallback without an active node");this.recordRegionalCandidateRejections();const t=[],e=new Map;for(const g of this.activeFallbackSolver.getOutput()){if(!this.activeFallbackFixedRouteSections.has(g.connectionName)){t.push(g);continue}const h=e.get(g.connectionName)??[];h.push(g),e.set(g.connectionName,h)}const n=[],o=[];for(const[g,h]of this.activeFallbackFixedRouteSections){const d=e.get(g)??[];if(d.length===0){o.push(h);continue}if(d.length>1)return this.error=`Pipeline9 regional fallback expected one replacement for fixed route "${g}", got ${d.length}`,void(this.failed=!0);const p=q7t({section:h,replacement:d[0],sourceMutationMasks:this.preloadedTraceMutationMasks,replacementIsMutated:!0});n.push({connectionName:g,section:h,replacement:p.route,mutatedSegments:p.mutatedSegments,replacementProducedSegment:p.replacementProducedSegment})}const i=[...t,...n.map(({replacement:g})=>g)],r=[...this.activeFallbackFixedObstacleRoutes,...o.flatMap(g=>g.sourceRoutes)],s=_6t(this.activeNode,this.obstacleMargin+Math.max(this.traceWidth,this.viaDiameter)/2),a=new Map;for(const g of i)for(const h of r)d6t(g,h,this.connMap)||p6t({left:g,right:h,clearance:this.obstacleMargin,leftBounds:s})&&a.set(h.connectionName,h);if(a.size>0){const g=[...a.keys()],h=[...a].flatMap(([p,m])=>m.isThroughObstacle===!0?[]:[p]),d=new Set(this.activeFallbackPromotedFixedRouteConnectionNames);for(const p of h)d.add(p);if(d.size===this.activeFallbackPromotedFixedRouteConnectionNames.size){const p=[...a].flatMap(([m,_])=>_.isThroughObstacle===!0?[m]:[]);return this.error=p.length>0?`Pipeline9 regional fallback conflicts with immutable through-obstacle route(s): ${p.join(", ")}`:`Pipeline9 promoted regional fallback could not resolve immutable fixed route conflict(s): ${g.join(", ")}`,void(this.failed=!0)}return void this.startRegionalFallback(d)}const A=new Map;for(const{section:g,replacementProducedSegment:h}of n)if(h)for(const d of g.sourceRoutes){const p=d.preloadedRoutePositionStart,m=d.preloadedRoutePositionEnd;if(p===void 0!=(m===void 0))throw new Error(`Pipeline9 fixed route "${d.connectionName}" has incomplete route-position metadata`);const _=Math.min(p??d.preloadedRouteIndex,m??d.preloadedRouteIndex),f=Math.max(p??d.preloadedRouteIndex,m??d.preloadedRouteIndex),I=A.get(d.preloadedTraceIndex);A.set(d.preloadedTraceIndex,{start:Math.min(I?.start??_,_),end:Math.max(I?.end??f,f)})}for(const{connectionName:g,section:h,replacement:d,mutatedSegments:p}of n){this.fixedRouteReplacements.set(g,d),this.preloadedTraceMutationMasks.set(g,p);for(const m of h.sourceRoutes.slice(1))this.removedFixedRouteConnectionNames.add(m.connectionName),this.preloadedTraceMutationMasks.delete(m.connectionName)}const c=MW({...TW(this.activeNode,this.connMap),portPoints:[],portPointsInPairs:[],availableZ:Array.from({length:this.layerCount},(g,h)=>h)},this.getUpdatedFixedHdRoutes()),l=new Set;for(const g of c.fixedRouteSectionsByConnectionName.values()){const h=g.sourceRoutes[0];if(!h)continue;const d=A.get(h.preloadedTraceIndex);if(d)for(const[p,m]of g.sourceRoutes.entries()){const _=m.preloadedRoutePositionStart??m.preloadedRouteIndex,f=m.preloadedRoutePositionEnd??m.preloadedRouteIndex,I={start:Math.min(_,f),end:Math.max(_,f)},C=I.start===I.end,y=d.start===d.end;if(!(C||y?I.start<=d.end&&d.start<=I.end:I.start<d.end&&d.start<I.end))continue;l.add(h.preloadedTraceIndex);const x=[...this.preloadedTraceMutationMasks.get(m.connectionName)??Array(m.route.length-1).fill(!1)];if(x.length!==m.route.length-1)throw new Error(`Pipeline9 fixed route mutation mask for "${m.connectionName}" has ${x.length} segments, expected ${m.route.length-1}`);const E=p===0?g.start.segmentIndex:0,B=p===g.sourceRoutes.length-1?g.end.segmentIndex:m.route.length-2;for(let S=E;S<=B;S++)x[S]=!0;this.preloadedTraceMutationMasks.set(m.connectionName,x)}}for(const g of A.keys())if(!l.has(g))throw new Error(`Pipeline9 could not capture accepted mutation provenance for trace ${g}`);const u=n.reduce((g,{section:h})=>g+h.sourceRoutes.length,0);this.stats.reroutedFixedRouteCount=Number(this.stats.reroutedFixedRouteCount??0)+u,this.stats.reroutedFixedRouteSectionCount=Number(this.stats.reroutedFixedRouteSectionCount??0)+n.length,this.finishActiveNode(t)}recordRegionalCandidateRejections(){if(!this.activeFallbackSolver)return;const t=this.activeFallbackSolver.stats;this.stats.regionalPreloadedViaCandidateRejectionCount=Number(this.stats.regionalPreloadedViaCandidateRejectionCount??0)+Number(t.preloadedViaCandidateRejectionCount??0),this.stats.regionalForceImproveCandidateRejectionCount=Number(this.stats.regionalForceImproveCandidateRejectionCount??0)+Number(t.forceImproveCandidateRejectionCount??0),this.stats.regionalRepairCandidateRejectionCount=Number(this.stats.regionalRepairCandidateRejectionCount??0)+Number(t.repairCandidateRejectionCount??0)}finishRegularSolverFailure(t){if(this.activeFallbackReason=`regular high-density routing failed: ${t}`,this.activeRegularSolver=null,!this.enableRegionalFallback)return this.error=`Pipeline9 ${this.activeFallbackReason}`,this.failed=!0,void(this.activeNode=null);this.startRegionalFallback()}_step(){if(this.activeFallbackSolver)return this.activeFallbackSolver.step(),this.activeFallbackSolver.failed?(this.recordRegionalCandidateRejections(),this.error=[`Pipeline9 primary high-density routing failed: ${this.activeFallbackReason??"unknown error"}`,`regional fallback failed: ${this.activeFallbackSolver.error??"unknown error"}`].join("; "),this.failed=!0,this.activeFallbackSolver=null,this.activeFallbackFixedRouteSections.clear(),this.activeFallbackFixedObstacleRoutes=[],this.activeFallbackPromotedFixedRouteConnectionNames.clear(),void(this.activeNode=null)):this.activeFallbackSolver.solved?void this.finishRegionalFallback():void 0;if(this.activeRegularSolver)return this.activeRegularSolver.step(),this.activeRegularSolver.failed?void this.finishRegularSolverFailure(this.activeRegularSolver.error??"unknown error"):this.activeRegularSolver.solved?void this.finishActiveNode(this.activeRegularSolver.routes):void 0;if(this.activeB01Solver)return this.activeB01Solver.step(),this.activeB01Solver.failed?(this.failedSolvers.push(this.activeB01Solver),this.activeFallbackReason=`B01 failed: ${this.activeB01Solver.error??"unknown error"}`,this.activeB01Solver=null,this.enableRegionalFallback?void this.startRegionalFallback():(this.error=`Pipeline9 ${this.activeFallbackReason}`,this.failed=!0,void(this.activeNode=null))):this.activeB01Solver.solved?void this.finishActiveNode(this.activeB01Solver.getOutput()):void 0;const t=this.unsolvedNodePortPoints.pop();if(!t)return void(this.solved=!0);const e=_6t(t,this.obstacleMargin),n=Math.max(this.traceWidth,this.viaDiameter)/2,o=this.getUpdatedFixedHdRoutes().filter(s=>((a,A,c,l)=>{const u=new Set(A.availableZ??A.portPoints.map(g=>g.z));for(let g=1;g<a.route.length;g++){const h=a.route[g-1],d=a.route[g];if(h.z===d.z){if(u.has(h.z)&&zgo(h,d,a.traceThickness/2+l,c))return!0;continue}const p=Math.min(h.z,d.z),m=Math.max(h.z,d.z);if([...u].some(_=>_>=p&&_<=m)&&Vgo(d,a.viaDiameter/2+l,c))return!0}return!1})(s,t,e,n)).flatMap(s=>((a,A)=>{const c=new Set(A.availableZ??A.portPoints.map(g=>g.z));if(c.size===0)throw new Error(`Pipeline9 B01 node "${A.capacityMeshNodeId}" has no available layers`);const l={type:"route",connectionName:a.connectionName,rootConnectionName:a.rootConnectionName,traceThickness:a.traceThickness,viaDiameter:a.viaDiameter},u=[];for(let g=1;g<a.route.length;g++){const h=a.route[g-1],d=a.route[g];if(h.z===d.z){if(!c.has(h.z))continue;u.push({...l,route:[h,d],vias:[]});continue}const p=Math.min(h.z,d.z),m=Math.max(h.z,d.z);[...c].some(_=>_>=p&&_<=m)&&u.push({...l,route:[h,d],vias:[{x:d.x,y:d.y,zStart:h.z,zEnd:d.z}]})}return u})(s,t));if(this.stats.fixedObstacleUses=Number(this.stats.fixedObstacleUses??0)+o.length,o.length===0)return void this.startRegularSolver(t);const i=(this.includeBoardObstacles?this.obstacles:[]).filter(s=>((a,A)=>{const c=(a.ccwRotationDegrees??0)*Math.PI/180,l=Math.abs(Math.cos(c)),u=Math.abs(Math.sin(c)),g=a.width/2*l+a.height/2*u,h=a.width/2*u+a.height/2*l;return a.center.x-g<=A.maxX&&a.center.x+g>=A.minX&&a.center.y-h<=A.maxY&&a.center.y+h>=A.minY})(s,e)).map(s=>(({obstacle:a,node:A,connMap:c,layerCount:l})=>{const u=new Set(A.availableZ??A.portPoints.map(d=>d.z)),g=(a.zLayers??a.layers.map(d=>Kr(d,l))).filter(d=>u.has(d));if(g.length===0)return;const h=a.connectedTo[0]??a.obstacleId??`pipeline9_obstacle_${a.center.x}_${a.center.y}`;return{type:"rect",connectionName:h,rootConnectionName:c.getNetConnectedToId(h)??h,center:a.center,width:a.width,height:a.height,ccwRotationDegrees:a.ccwRotationDegrees,zLayers:g}})({obstacle:s,node:t,connMap:this.connMap,layerCount:this.layerCount})).filter(s=>s!==void 0);if(this.stats.boardObstacleUses=Number(this.stats.boardObstacleUses??0)+i.length,this.activeNode=t,t.width>15||t.height>15)return this.activeFallbackReason=`B01 node "${t.capacityMeshNodeId}" exceeds the 15x15mm routing limit (${t.width}x${t.height}mm)`,void this.startRegionalFallback();const r=TW(t,this.connMap);this.stats.b01NodeCount=Number(this.stats.b01NodeCount??0)+1,this.activeB01Solver=new Ugo({...Fgo,nodeWithPortPoints:r,obstacles:[...o,...i],viaDiameter:this.viaDiameter,viaMinDistFromBorder:this.viaDiameter/2,traceThickness:this.traceWidth,traceMargin:this.obstacleMargin,obstacleClearanceMargin:.15,effort:this.effort}),this.maxB01Rips!==void 0&&(this.activeB01Solver.MAX_RIPS=this.maxB01Rips)}visualize(){return this.activeFallbackSolver?.visualize()??this.activeRegularSolver?.visualize()??this.activeB01Solver?.visualize()??{lines:this.routes.flatMap(t=>t.route.slice(0,-1).map((e,n)=>({points:[e,t.route[n+1]],strokeWidth:t.traceThickness,layer:`z${e.z}`,label:t.connectionName}))),points:[],rects:[],circles:[]}}},f6t=(t,e)=>{const n=e*Math.PI/180;return{x:t.x*Math.cos(n)-t.y*Math.sin(n),y:t.x*Math.sin(n)+t.y*Math.cos(n)}},I6t=({x:t,y:e,width:n,height:o,ccwRotation:i})=>{const r=n/2,s=o/2;return[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(a=>{const A=f6t(a,i);return{x:t+A.x,y:e+A.y}})},aQe=t=>{const e=t.shape==="rotated_pill"?t.ccw_rotation:0,n=Math.max(Math.max(t.width,t.height)/2-t.radius,0),o=t.width>=t.height?{x:n,y:0}:{x:0,y:n},i=f6t(o,e);return{start:{x:t.x-i.x,y:t.y-i.y},end:{x:t.x+i.x,y:t.y+i.y},radius:t.radius}},kW=t=>{if(t.type==="pcb_smtpad"){if(t.shape==="polygon")return t.points;if(t.shape==="rotated_rect")return I6t({x:t.x,y:t.y,width:t.width,height:t.height,ccwRotation:t.ccw_rotation})}if(t.type==="pcb_plated_hole"&&"rect_pad_width"in t&&"rect_pad_height"in t)return I6t({x:t.x,y:t.y,width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:"rect_ccw_rotation"in t&&typeof t.rect_ccw_rotation=="number"?t.rect_ccw_rotation:0});throw new Error(`Expected polygonal pad geometry, got ${t.type} with shape "${t.shape}"`)},C6t=t=>t.map((e,n)=>[e,t[(n+1)%t.length]]),AQe=(t,e,n,o)=>{const i=DD(t,e,n,o);if(i)return{distance:0,pointOnA:i,pointOnB:i,center:i};const r=[{pointOnA:t,pointOnB:z_(t,n,o)},{pointOnA:e,pointOnB:z_(e,n,o)},{pointOnA:z_(n,t,e),pointOnB:n},{pointOnA:z_(o,t,e),pointOnB:o}];let s=r[0],a=B_t(s.pointOnA,s.pointOnB);for(const A of r.slice(1)){const c=B_t(A.pointOnA,A.pointOnB);c<a&&(s=A,a=c)}return{distance:M5(t,e,n,o),pointOnA:s.pointOnA,pointOnB:s.pointOnB,center:{x:(s.pointOnA.x+s.pointOnB.x)/2,y:(s.pointOnA.y+s.pointOnB.y)/2}}};function y6t(t,e){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}var x6t=1e-9,D7=1e-9;function Wgo(t,e){const n=(t.y-e.start.y)*(e.end.x-e.start.x)-(t.x-e.start.x)*(e.end.y-e.start.y);if(Math.abs(n)>x6t)return!1;const o=(t.x-e.start.x)*(e.end.x-e.start.x)+(t.y-e.start.y)*(e.end.y-e.start.y);return o<-1e-9?!1:o<=(e.end.x-e.start.x)**2+(e.end.y-e.start.y)**2+x6t}function cQe(t,e){let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o],s=e[i];if(Wgo(t,{start:r,end:s}))return!0;r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n}function Lv(t,e){if(e.type==="pcb_smtpad"){if(e.shape==="circle")return y6t(t,e)<=e.radius+D7;if(e.shape==="rect"){const n=e.width/2,o=e.height/2;return Math.abs(t.x-e.x)<=n+D7&&Math.abs(t.y-e.y)<=o+D7}if(e.shape==="rotated_rect")return cQe(t,kW(e));if(e.shape==="pill"||e.shape==="rotated_pill"){if(e.shape==="rotated_pill"){const A=aQe(e);return wc(t,A.start,A.end)<=A.radius+D7}const n=e.width/2,o=e.height/2,i=e.radius;if(Math.abs(t.x-e.x)<=n-i+D7&&Math.abs(t.y-e.y)<=o+D7)return!0;const r=Math.max(Math.abs(t.x-e.x)-(n-i),0),s=Math.max(Math.abs(t.y-e.y)-(o-i),0),a=i+D7;return r*r+s*s<=a*a}if(e.shape==="polygon")return cQe(t,e.points)}if(e.type==="pcb_plated_hole"){if(e.shape==="circle")return y6t(t,e)<=e.outer_diameter/2+D7;if("rect_pad_width"in e&&"rect_pad_height"in e)return cQe(t,kW(e));if(e.shape==="oval"||e.shape==="pill")return Math.abs(t.x-e.x)<=e.outer_width/2+D7&&Math.abs(t.y-e.y)<=e.outer_height/2+D7}return!1}function E6t(t,e,n,o){return Math.sqrt((n-t)**2+(o-e)**2)}var B6t=.1,b6t=.1,jgo=.2,S6t=.1,Hv=.005,yH=t=>t.find(e=>e.type==="pcb_board"),xH=(t,e)=>t?.[e],Pce=t=>nbe([t]),$go=t=>{const e=Pce(t);return Math.min(e.maxX-e.minX,e.maxY-e.minY)/2},qgo=t=>{const e=(n=>{const o=Pce(n);return V8({x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY})})(t);return{kind:"circle",x:e.x,y:e.y,radius:$go(t)}},Q6t=t=>nI(t).pcb_trace.list().flatMap(e=>{const n=[];for(let o=0;o<e.route.length-1;o++){const i=e.route[o],r=e.route[o+1];i.route_type==="wire"&&r.route_type==="wire"&&i.layer===r.layer&&n.push({type:"pcb_trace_segment",pcb_trace_id:e.pcb_trace_id,_pcbTrace:e,thickness:"width"in i?i.width:"width"in r?r.width:S6t,layer:i.layer,x1:i.x,y1:i.y,x2:r.x,y2:r.y})}return n}),v6t=t=>{const e=t._pcbTrace.route.flatMap(i=>i.route_type==="through_pad"?[i.start,i.end]:[{x:i.x,y:i.y}]),n=e[0],o=e[e.length-1];return n&&o?V8(n,o):V8({x:t.x1,y:t.y1},{x:t.x2,y:t.y2})},lQe=({tracePoint:t,obstaclePoint:e,traceRadius:n,obstacleRadius:o})=>{const i=e.x-t.x,r=e.y-t.y,s=Math.hypot(i,r);if(s===0)return V8(t,e);const a=i/s,A=r/s;return V8({x:t.x+a*n,y:t.y+A*n},{x:e.x-a*o,y:e.y-A*o})},uQe=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=t.thickness/2;if(e.type==="pcb_via"||(r=e).type==="pcb_via"||r.shape==="circle"){const a=e.type==="pcb_via"?{x:e.x,y:e.y,radius:e.outer_diameter/2}:qgo(e),A=z_(a,n,o);return{gap:Nz(n,o,a)-i,center:lQe({tracePoint:A,obstaclePoint:a,traceRadius:i,obstacleRadius:a.radius})}}var r;if((a=>a.type==="pcb_smtpad"&&(a.shape==="pill"||a.shape==="rotated_pill"))(e)){const a=((A,c)=>{const l=aQe(c),u=AQe({x:A.x1,y:A.y1},{x:A.x2,y:A.y2},l.start,l.end);return{distance:u.distance,center:u.center,radius:l.radius,tracePoint:u.pointOnA,obstaclePoint:u.pointOnB}})(t,e);return{gap:a.distance-i-a.radius,center:lQe({tracePoint:a.tracePoint,obstaclePoint:a.obstaclePoint,traceRadius:i,obstacleRadius:a.radius})}}const s=((a,A,c)=>{if(c.length<3)return{distance:Number.POSITIVE_INFINITY,center:a,tracePoint:a,obstaclePoint:a};const l=C6t(c).map(([g,h])=>DD(a,A,g,h)).filter(g=>g!==null);if(l.length>0){const g=A.x-a.x,h=A.y-a.y,d=g*g+h*h;return l.sort((p,m)=>((p.x-a.x)*g+(p.y-a.y)*h)/d-((m.x-a.x)*g+(m.y-a.y)*h)/d),{distance:0,center:l[0],tracePoint:l[0],obstaclePoint:l[0]}}if(Mz(a,c)||Mz(A,c)){const g={x:(a.x+A.x)/2,y:(a.y+A.y)/2};return{distance:0,center:g,tracePoint:g,obstaclePoint:g}}let u=AQe(a,A,c[0],c[1]);for(const[g,h]of C6t(c).slice(1)){const d=AQe(a,A,g,h);d.distance<u.distance&&(u=d)}return{distance:u.distance,center:u.center,tracePoint:u.pointOnA,obstaclePoint:u.pointOnB}})(n,o,(a=>{if(a.type==="pcb_smtpad"&&(a.shape==="polygon"||a.shape==="rotated_rect"))return{kind:"polygon",points:kW(a)};if(a.type==="pcb_plated_hole"&&"rect_pad_width"in a&&"rect_pad_height"in a)return{kind:"polygon",points:kW(a)};const A=Pce(a);return{kind:"polygon",points:[{x:A.minX,y:A.minY},{x:A.maxX,y:A.minY},{x:A.maxX,y:A.maxY},{x:A.minX,y:A.maxY}]}})(e).points);return{gap:s.distance-i,center:lQe({tracePoint:s.tracePoint,obstaclePoint:s.obstaclePoint,traceRadius:i,obstacleRadius:0})}},Mce=t=>t<=0,w6t=class{buckets;objectsById;getBounds;getId;CELL_SIZE=.4;constructor({objects:t,getBounds:e,getId:n,CELL_SIZE:o}){this.buckets=new Map,this.objectsById=new Map,this.getBounds=e,this.getId=n??(()=>this._getNextId()),this.CELL_SIZE=o??this.CELL_SIZE;for(const i of t)this.addObject(i)}_idCounter=0;_getNextId(){return""+this._idCounter++}addObject(t){const e=this.getBounds(t),n=this.getId(t),o={...t,spatialIndexId:n};this.objectsById.set(n,o);const i=Math.floor(e.minX/this.CELL_SIZE),r=Math.floor(e.minY/this.CELL_SIZE),s=Math.floor(e.maxX/this.CELL_SIZE),a=Math.floor(e.maxY/this.CELL_SIZE);for(let A=i;A<=s;A++)for(let c=r;c<=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l);u?u.push(o):this.buckets.set(l,[o])}}removeObject(t){const e=this.objectsById.get(t);if(!e)return!1;this.objectsById.delete(t);const n=this.getBounds(e),o=Math.floor(n.minX/this.CELL_SIZE),i=Math.floor(n.minY/this.CELL_SIZE),r=Math.floor(n.maxX/this.CELL_SIZE),s=Math.floor(n.maxY/this.CELL_SIZE);for(let a=o;a<=r;a++)for(let A=i;A<=s;A++){const c=`${a}x${A}`,l=this.buckets.get(c);if(l){const u=l.findIndex(g=>g.spatialIndexId===t);u!==-1&&(l.splice(u,1),l.length===0&&this.buckets.delete(c))}}return!0}getBucketKey(t,e){return`${Math.floor(t/this.CELL_SIZE)}x${Math.floor(e/this.CELL_SIZE)}`}getObjectsInBounds(t,e=0){const n=[],o=new Set,i=Math.floor((t.minX-e)/this.CELL_SIZE),r=Math.floor((t.minY-e)/this.CELL_SIZE),s=Math.floor((t.maxX+e)/this.CELL_SIZE),a=Math.floor((t.maxY+e)/this.CELL_SIZE);for(let A=i;A<=s;A++)for(let c=r;c<=a;c++){const l=`${A}x${c}`,u=this.buckets.get(l)||[];for(const g of u){const h=g.spatialIndexId;o.has(h)||(o.add(h),n.push(g))}}return n}};function gQe(t){return t.type==="pcb_trace_segment"||t.type==="pcb_smtpad"?[t.layer]:t.type==="pcb_plated_hole"?Array.isArray(t.layers)?t.layers:[...LJ]:t.type==="pcb_hole"?[...LJ]:t.type==="pcb_via"?Array.isArray(t.layers)?t.layers:[...LJ]:t.type==="pcb_keepout"&&Array.isArray(t.layers)?t.layers:[]}var P6t=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i=e.minX,r=e.minY,s=e.maxX,a=e.maxY;if(n.x===o.x&&n.y===o.y){const B=Math.max(i,Math.min(s,n.x)),S=Math.max(r,Math.min(a,n.y));return B===n.x&&S===n.y?{x:n.x,y:n.y}:{x:B,y:S}}const A=o.x-n.x,c=o.y-n.y,l=A!==0?(i-n.x)/A:Number.NEGATIVE_INFINITY,u=A!==0?(s-n.x)/A:Number.POSITIVE_INFINITY,g=c!==0?(r-n.y)/c:Number.NEGATIVE_INFINITY,h=c!==0?(a-n.y)/c:Number.POSITIVE_INFINITY,d=Math.max(Math.min(l,u),Math.min(g,h)),p=Math.min(Math.max(l,u),Math.max(g,h));if(d<=p&&p>=0&&d<=1){const B=Math.max(0,Math.min(1,d));return{x:n.x+B*A,y:n.y+B*c}}const m={x:Math.max(i,Math.min(s,n.x)),y:Math.max(r,Math.min(a,n.y))},_={x:Math.max(i,Math.min(s,o.x)),y:Math.max(r,Math.min(a,o.y))},f=(m.x-n.x)**2+(m.y-n.y)**2,I=(_.x-o.x)**2+(_.y-o.y)**2,C=[{start:{x:i,y:r},end:{x:s,y:r}},{start:{x:s,y:r},end:{x:s,y:a}},{start:{x:s,y:a},end:{x:i,y:a}},{start:{x:i,y:a},end:{x:i,y:r}}];let y=Math.min(f,I),x=f<=I?m:_;const E=(B,S,Q)=>Math.max(S,Math.min(Q,B));for(const B of C){const S={x:o.x-n.x,y:o.y-n.y},Q={x:B.end.x-B.start.x,y:B.end.y-B.start.y},w={x:n.x-B.start.x,y:n.y-B.start.y},M=S.x*S.x+S.y*S.y,k=S.x*Q.x+S.y*Q.y,R=S.x*w.x+S.y*w.y,F=Q.x*Q.x+Q.y*Q.y,O=Q.x*w.x+Q.y*w.y,U=M*F-k*k;if(Math.abs(U)<1e-10)continue;let Y=(k*O-F*R)/U,W=(M*O-k*R)/U;Y=E(Y,0,1),W=E(W,0,1);const te={x:n.x+Y*S.x,y:n.y+Y*S.y},j={x:B.start.x+W*Q.x,y:B.start.y+W*Q.y},J=te.x-j.x,oe=te.y-j.y,ie=J*J+oe*oe;ie<y&&(y=ie,x={x:(te.x+j.x)/2,y:(te.y+j.y)/2})}return x},Xgo=(t,e)=>{const n={x:t.x1,y:t.y1},o={x:t.x2,y:t.y2},i={x:e.x1,y:e.y1},r={x:e.x2,y:e.y2},s={x:o.x-n.x,y:o.y-n.y},a={x:r.x-i.x,y:r.y-i.y},A=s.x*s.x+s.y*s.y,c=a.x*a.x+a.y*a.y;if(A===0||c===0){if(A===0&&c===0)return{x:(n.x+i.x)/2,y:(n.y+i.y)/2};if(A===0){const Q=N7(((n.x-i.x)*a.x+(n.y-i.y)*a.y)/c,0,1),w={x:i.x+Q*a.x,y:i.y+Q*a.y};return{x:(n.x+w.x)/2,y:(n.y+w.y)/2}}const B=N7(((i.x-n.x)*s.x+(i.y-n.y)*s.y)/A,0,1),S={x:n.x+B*s.x,y:n.y+B*s.y};return{x:(S.x+i.x)/2,y:(S.y+i.y)/2}}const l=n.x-i.x,u=n.y-i.y,g=s.x*s.x+s.y*s.y,h=s.x*a.x+s.y*a.y,d=s.x*l+s.y*u,p=a.x*a.x+a.y*a.y,m=a.x*l+a.y*u,_=g*p-h*h;if(_<1e-10)return Zgo(n,o,i,r,s,a,A,c);let f=(h*m-p*d)/_,I=(g*m-h*d)/_;f=N7(f,0,1),I=N7(I,0,1),I=(f*h+m)/p,I=N7(I,0,1),f=(I*h-d)/g,f=N7(f,0,1);const C=n.x+f*s.x,y=n.y+f*s.y,x=i.x+I*a.x,E=i.y+I*a.y;return{x:(C+x)/2,y:(y+E)/2}},Zgo=(t,e,n,o,i,r,s,a)=>{let A=((n.x-t.x)*i.x+(n.y-t.y)*i.y)/s;A=N7(A,0,1);const c={x:t.x+A*i.x,y:t.y+A*i.y};let l=((o.x-t.x)*i.x+(o.y-t.y)*i.y)/s;l=N7(l,0,1);const u={x:t.x+l*i.x,y:t.y+l*i.y};let g=((t.x-n.x)*r.x+(t.y-n.y)*r.y)/a;g=N7(g,0,1);const h={x:n.x+g*r.x,y:n.y+g*r.y};let d=((e.x-n.x)*r.x+(e.y-n.y)*r.y)/a;d=N7(d,0,1);const p={x:n.x+d*r.x,y:n.y+d*r.y},m=[{pointA:c,pointB:n,distance:Math.sqrt((c.x-n.x)**2+(c.y-n.y)**2)},{pointA:u,pointB:o,distance:Math.sqrt((u.x-o.x)**2+(u.y-o.y)**2)},{pointA:t,pointB:h,distance:Math.sqrt((t.x-h.x)**2+(t.y-h.y)**2)},{pointA:e,pointB:p,distance:Math.sqrt((e.x-p.x)**2+(e.y-p.y)**2)}].reduce((_,f)=>f.distance<_.distance?f:_);return{x:(m.pointA.x+m.pointB.x)/2,y:(m.pointA.y+m.pointB.y)/2}},N7=(t,e,n)=>Math.max(e,Math.min(n,t)),EH=t=>{if(t.type==="pcb_trace_segment")return{minX:Math.min(t.x1,t.x2),minY:Math.min(t.y1,t.y2),maxX:Math.max(t.x1,t.x2),maxY:Math.max(t.y1,t.y2)};if(t.type==="pcb_smtpad"||t.type==="pcb_plated_hole"){if(t.type==="pcb_smtpad"&&(t.shape==="rotated_rect"||t.shape==="polygon")||t.type==="pcb_plated_hole"&&"rect_pad_width"in t&&"rect_pad_height"in t){const e=kW(t);return{minX:Math.min(...e.map(n=>n.x)),minY:Math.min(...e.map(n=>n.y)),maxX:Math.max(...e.map(n=>n.x)),maxY:Math.max(...e.map(n=>n.y))}}if(t.type==="pcb_smtpad"&&t.shape==="rotated_pill"){const e=aQe(t);return{minX:Math.min(e.start.x,e.end.x)-e.radius,minY:Math.min(e.start.y,e.end.y)-e.radius,maxX:Math.max(e.start.x,e.end.x)+e.radius,maxY:Math.max(e.start.y,e.end.y)+e.radius}}}return nbe([t])};function dQe(t){return t.route_type!=="wire"?[]:[t.start_pcb_port_id,t.end_pcb_port_id].filter(e=>!!e)}function M6t(t){const e=new Set;for(const n of t.route)for(const o of dQe(n))e.add(o);return Array.from(e)}function Dce(t){const e=new Set;for(const n of t)for(const o of M6t(n))e.add(o);return Array.from(e)}var edo=t=>{if(t.type==="pcb_via"||t.type==="pcb_plated_hole"&&t.shape==="circle")return t.outer_diameter/2;if(t.type==="pcb_hole"&&t.hole_shape==="circle")return t.hole_diameter/2;if(t.type==="pcb_smtpad"&&t.shape==="circle")return t.radius;throw new Error(`Could not determine radius of element: ${JSON.stringify(t)}`)},tdo=t=>t.type==="pcb_port"?t.pcb_port_id:t.type==="pcb_smtpad"?t.pcb_smtpad_id:t.pcb_plated_hole_id;function ndo(t,{connMap:e,minClearance:n}={}){const o=[];(I=>{const C=I.filter(B=>B.type==="pcb_port"),y=I.filter(B=>B.type==="pcb_smtpad"),x=I.filter(B=>B.type==="pcb_trace");function E(B,S={}){const Q=S.traceWidth||0,w=C.find(M=>E6t(M.x,M.y,B.x,B.y)<.01);if(w)return w.pcb_port_id;if(S.isFirstOrLastPoint){const M=y.find(k=>k.shape==="rect"?Math.abs(B.x-k.x)<k.width/2+Q/2&&Math.abs(B.y-k.y)<k.height/2+Q/2:k.shape==="circle"?E6t(B.x,B.y,k.x,k.y)<k.radius:k.shape==="pill"||k.shape==="rotated_pill"?Lv(B,k):void 0);if(M)return M.pcb_port_id??null}return null}for(const B of x)for(let S=0;S<B.route.length;S++){const Q=B.route[S],w=S===0||S===B.route.length-1;if(Q.route_type==="wire"){if(!Q.start_pcb_port_id&&S===0){const M=E(Q,{isFirstOrLastPoint:w,traceWidth:Q.width});M&&(Q.start_pcb_port_id=M)}if(!Q.end_pcb_port_id&&S===B.route.length-1){const M=E(Q,{isFirstOrLastPoint:w,traceWidth:Q.width});M&&(Q.end_pcb_port_id=M)}}}})(t),e??=eL(t);const i=yH(t);n??=xH(i,"min_trace_to_pad_edge_clearance")??.1;const r=nI(t).pcb_trace.list().flatMap(I=>{const C=[];for(let y=0;y<I.route.length-1;y++){const x=I.route[y],E=I.route[y+1];x.route_type==="wire"&&E.route_type==="wire"&&x.layer===E.layer&&C.push({type:"pcb_trace_segment",pcb_trace_id:I.pcb_trace_id,_pcbTrace:I,thickness:"width"in x?x.width:"width"in E?E.width:S6t,layer:x.layer,x1:x.x,y1:x.y,x2:E.x,y2:E.y})}return C}),s=nI(t).pcb_smtpad.list(),a=nI(t).pcb_plated_hole.list(),A=nI(t).pcb_port.list(),c=nI(t).pcb_hole.list(),l=nI(t).pcb_via.list(),u=nI(t).pcb_keepout.list(),g=[...A,...s,...a],h=new Map;for(const I of u){const C=new Set(I.excluded_pcb_component_ids??[]);C.size!==0&&h.set(I.pcb_keepout_id,g.filter(y=>y.pcb_component_id&&C.has(y.pcb_component_id)).map(tdo))}const d=[...r,...s,...a,...c,...l,...u],p=new w6t({objects:d,getBounds:EH}),m=I=>Ny(t,I),_=(I,C,y)=>Mce(y)?`PCB trace ${I} overlaps with ${C} (accidental contact)`:`PCB trace ${I} is too close to ${C} (gap: ${y.toFixed(3)}mm)`,f=new Set;for(const I of r){const C=n,y=EH(I),x=p.getObjectsInBounds(y,C+I.thickness/2);if(I.x1!==I.x2||I.y1!==I.y2)for(const E of x){if(!gQe(E).includes(I.layer)||E.type==="pcb_keepout"&&(h.get(E.pcb_keepout_id)??[]).some(Q=>e.areIdsConnected(I.pcb_trace_id,Q)))continue;if(E.type==="pcb_trace_segment"){const Q=E;if(I.layer!==Q.layer||e.areIdsConnected(I.pcb_trace_id,Q.pcb_trace_id))continue;const w=M5({x:I.x1,y:I.y1},{x:I.x2,y:I.y2},{x:Q.x1,y:Q.y1},{x:Q.x2,y:Q.y2})-I.thickness/2-Q.thickness/2;if(w>n-Hv)continue;const M=`overlap_${I.pcb_trace_id}_${Q.pcb_trace_id}`,k=`overlap_${Q.pcb_trace_id}_${I.pcb_trace_id}`;if(f.has(M)||f.has(k))continue;f.add(M),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:_(m(I.pcb_trace_id),m(Q.pcb_trace_id),w),pcb_trace_id:I.pcb_trace_id,source_trace_id:"",pcb_trace_error_id:M,pcb_component_ids:[],center:Xgo(I,Q),pcb_port_ids:Dce([I._pcbTrace,Q._pcbTrace])});continue}const B=gv(E);if(e.areIdsConnected(I.pcb_trace_id,"pcb_trace_id"in E?E.pcb_trace_id:B))continue;if(E.type==="pcb_smtpad"||E.type==="pcb_plated_hole"||E.type==="pcb_via"){const{gap:Q,center:w}=uQe(I,E);if(!Mce(Q))continue;const M=`overlap_${I.pcb_trace_id}_${B}`;if(f.has(M))continue;f.add(M),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:_(m(I.pcb_trace_id),`${E.type} "${m(B)}"`,Q),pcb_trace_id:I.pcb_trace_id,center:w,source_trace_id:"",pcb_trace_error_id:M,pcb_component_ids:["pcb_component_id"in E?E.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...Dce([I._pcbTrace]),"pcb_port_id"in E?E.pcb_port_id:void 0].filter(Boolean)});continue}if(E.type==="pcb_hole"){const Q=edo(E),w=Nz({x:I.x1,y:I.y1},{x:I.x2,y:I.y2},{x:E.x,y:E.y,radius:Q})-I.thickness/2;if(w>n-Hv)continue;const M=`overlap_${I.pcb_trace_id}_${B}`;if(f.has(M))continue;f.add(M),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:_(m(I.pcb_trace_id),`${E.type} "${m(gv(E))}"`,w),pcb_trace_id:I.pcb_trace_id,center:P6t(I,EH(E)),source_trace_id:"",pcb_trace_error_id:M,pcb_component_ids:["pcb_component_id"in E?E.pcb_component_id:void 0].filter(Boolean),pcb_port_ids:[...Dce([I._pcbTrace]),"pcb_port_id"in E?E.pcb_port_id:void 0].filter(Boolean)})}const S=Dz({x:I.x1,y:I.y1},{x:I.x2,y:I.y2},EH(E))-I.thickness/2;if(S+Hv<C){const Q=`overlap_${I.pcb_trace_id}_${B}`;if(f.has(Q))continue;f.add(Q),o.push({type:"pcb_trace_error",error_type:"pcb_trace_error",message:_(m(I.pcb_trace_id),`${E.type} "${m(gv(E))}"`,S),pcb_trace_id:I.pcb_trace_id,source_trace_id:"",pcb_trace_error_id:Q,pcb_component_ids:["pcb_component_id"in E?E.pcb_component_id:void 0].filter(Boolean),center:P6t(I,EH(E)),pcb_port_ids:[...Dce([I._pcbTrace]),"pcb_port_id"in E?E.pcb_port_id:void 0].filter(Boolean)})}}}return o}function FW(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function D6t(t,e){return FW(t,e)<=Hv}function odo(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=>a.type==="pcb_via");if(o.length<2)return[];const i=yH(t);n??=xH(i,"min_via_hole_edge_to_via_hole_edge_clearance")??B6t,e??=eL(t);const r=[],s=new Set;for(let a=0;a<o.length;a++)for(let A=a+1;A<o.length;A++){const c=o[a],l=o[A];if(D6t(c,l)||!e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=FW(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+Hv>=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join("_");s.has(g)||(s.add(g),r.push({type:"pcb_via_clearance_error",pcb_error_id:`same_net_vias_close_${g}`,message:`Vias ${Ny(t,c.pcb_via_id)} and ${Ny(t,l.pcb_via_id)} are too close together (gap: ${u.toFixed(3)}mm)`,error_type:"pcb_via_clearance_error",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function ido(t,{connMap:e,minClearance:n}={}){const o=t.filter(a=>a.type==="pcb_via");if(o.length<2)return[];const i=yH(t);n??=xH(i,"min_via_hole_edge_to_via_hole_edge_clearance")??B6t,e??=eL(t);const r=[],s=new Set;for(let a=0;a<o.length;a++)for(let A=a+1;A<o.length;A++){const c=o[a],l=o[A];if(D6t(c,l)||e.areIdsConnected(c.pcb_via_id,l.pcb_via_id))continue;const u=FW(c,l)-c.hole_diameter/2-l.hole_diameter/2;if(u+Hv>=n)continue;const g=[c.pcb_via_id,l.pcb_via_id].sort().join("_");s.has(g)||(s.add(g),r.push({type:"pcb_via_clearance_error",pcb_error_id:`different_net_vias_close_${g}`,message:`Vias ${Ny(t,c.pcb_via_id)} and ${Ny(t,l.pcb_via_id)} from different nets are too close together (gap: ${u.toFixed(3)}mm)`,error_type:"pcb_via_clearance_error",pcb_via_ids:[c.pcb_via_id,l.pcb_via_id],minimum_clearance:n,actual_clearance:u,pcb_center:{x:(c.x+l.x)/2,y:(c.y+l.y)/2}}))}return r}function N6t(t){return t.route_type==="through_pad"?{x:(t.start.x+t.end.x)/2,y:(t.start.y+t.end.y)/2}:{x:t.x,y:t.y}}function R6t(t,e,n,o){return t.route_type==="wire"&&e.some(i=>!i.pcb_port_id||i.pcb_port_id===n?!1:o.get(i.pcb_port_id)?.some(s=>Lv({x:t.x,y:t.y},s))??!1)}function rdo({firstPoint:t,lastPoint:e,port:n,expectedPorts:o,padMap:i}){let r;const s=t.route_type==="wire"?t:void 0,a=e.route_type==="wire"?e:void 0,A=dQe(t).includes(n.pcb_port_id),c=dQe(e).includes(n.pcb_port_id);A&&s?r=s:c&&a||R6t(t,o,n.pcb_port_id,i)&&a?r=a:R6t(e,o,n.pcb_port_id,i)&&s?r=s:s&&a?r=FW(s,n)<=FW(a,n)?s:a:s?r=s:a&&(r=a);const l=N6t(t),u=N6t(e);return r?{x:r.x,y:r.y}:{x:(l.x+u.x)/2,y:(l.y+u.y)/2}}function sdo(t){const e=[],n=t.filter(l=>l.type==="pcb_port"),o=t.filter(l=>l.type==="pcb_trace"),i=t.filter(l=>l.type==="source_trace"),r=t.filter(l=>l.type==="pcb_smtpad"),s=t.filter(l=>l.type==="pcb_plated_hole"),a=new Map,A=new aXn(t),c=new Set;for(const l of r)l.pcb_port_id&&a.set(l.pcb_port_id,[...a.get(l.pcb_port_id)??[],l]);for(const l of s)l.pcb_port_id&&a.set(l.pcb_port_id,[...a.get(l.pcb_port_id)??[],l]);for(const l of o){if(l.route.length===0)continue;const u=l.route[0],g=l.route[l.route.length-1],h=i.find(m=>m.source_trace_id===l.source_trace_id),d=h?n.filter(m=>h.connected_source_port_ids?.includes(m.source_port_id)):[];for(let m=1;m<l.route.length-1;m++){const _=l.route[m-1],f=l.route[m],I=l.route[m+1];if(f.route_type==="via"){const C=_.route_type==="wire",y=I.route_type==="wire";if(C&&y){const x=Math.abs(_.x-f.x)<.01&&Math.abs(_.y-f.y)<.01,E=Math.abs(I.x-f.x)<.01&&Math.abs(I.y-f.y)<.01;if(!x||!E){const B=ebe(t,l.pcb_trace_id);e.push({type:"pcb_trace_error",message:`Via in trace [${B}] is misaligned at position {x: ${f.x}, y: ${f.y}}.`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`misaligned_via_${l.pcb_trace_id}_${m}`,pcb_component_ids:[],pcb_port_ids:[]})}}}}const p=ebe(t,l.pcb_trace_id);if(h&&d.length>0){if(c.has(h.source_trace_id))continue;c.add(h.source_trace_id)}for(const m of d){if(!m.pcb_port_id)continue;const _=a.get(m.pcb_port_id);if(!_?.length)continue;let f=!1;const I=[...A.getAllTracesConnectedToTrace(l.pcb_trace_id),...o.filter(x=>x.source_trace_id===h?.source_trace_id)];for(const x of I){if(x.pcb_trace_id===l.pcb_trace_id||!x.source_trace_id)continue;const E=i.find(Q=>Q.source_trace_id===x.source_trace_id);if(!h||x.source_trace_id!==h.source_trace_id&&!E?.connected_source_port_ids.includes(m.source_port_id))continue;const B=x.route[0],S=x.route.at(-1);if(M6t(x).includes(m.pcb_port_id)||B?.route_type==="wire"&&_.some(Q=>Lv(B,Q))||S?.route_type==="wire"&&_.some(Q=>Lv(S,Q))){f=!0;break}}if(f)continue;const C=u.route_type==="wire"&&_.some(x=>Lv({x:u.x,y:u.y},x)),y=g.route_type==="wire"&&_.some(x=>Lv({x:g.x,y:g.y},x));if(!C&&!y){const x=tbe(t,m.pcb_port_id).replace("pcb_port",""),E=_[0].type.replace(/pcb_/,""),B=rdo({firstPoint:u,lastPoint:g,port:m,expectedPorts:d,padMap:a});e.push({type:"pcb_trace_error",message:`Trace [${p}] is missing a connection to ${E}${x}`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`missing_connection_${l.pcb_trace_id}_${m.pcb_port_id}`,center:B,pcb_component_ids:[],pcb_port_ids:[m.pcb_port_id]})}}if(d.length===0){let m=!1,_=!1;const f=u.route_type==="wire"&&g.route_type==="wire"&&Math.abs(u.x-g.x)<.01&&Math.abs(u.y-g.y)<.01;for(const I of a.values())u.route_type==="wire"&&I.some(C=>Lv({x:u.x,y:u.y},C))&&(m=!0),g.route_type==="wire"&&I.some(C=>Lv({x:g.x,y:g.y},C))&&(_=!0);m||u.route_type!=="wire"||e.push({type:"pcb_trace_error",message:`Trace [${p}] has disconnected endpoint at (${u.x.toFixed(2)}, ${u.y.toFixed(2)})`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${l.pcb_trace_id}_start`,center:{x:u.x,y:u.y},pcb_component_ids:[],pcb_port_ids:[]}),_||g.route_type!=="wire"||f&&!m||e.push({type:"pcb_trace_error",message:`Trace [${p}] has disconnected endpoint at (${g.x.toFixed(2)}, ${g.y.toFixed(2)})`,source_trace_id:h?.source_trace_id||l.source_trace_id||`!${l.pcb_trace_id}`,error_type:"pcb_trace_error",pcb_trace_id:l.pcb_trace_id,pcb_trace_error_id:`disconnected_endpoint_${l.pcb_trace_id}_end`,center:{x:g.x,y:g.y},pcb_component_ids:[],pcb_port_ids:[]})}}return e}function ado(t,e={}){const n=[],o=yH(t);if(!o)return n;const i=e.margin??xH(o,"min_board_edge_clearance")??jgo,r=(function(a){if(a.outline&&a.outline.length>0)return a.outline.map(A=>({x:A.x,y:A.y}));if(a.center&&typeof a.width=="number"&&typeof a.height=="number"){const A=a.center.x,c=a.center.y,l=a.width/2,u=a.height/2;return[{x:A-l,y:c-u},{x:A+l,y:c-u},{x:A+l,y:c+u},{x:A-l,y:c+u}]}return null})(o);if(!r)return n;const s=nI(t).pcb_trace.list();for(const a of s)if(!(a.route.length<2))for(let A=0;A<a.route.length-1;A++){const c=a.route[A],l=a.route[A+1];if(c.route_type!=="wire"||l.route_type!=="wire")continue;const u="width"in c?c.width:"width"in l?l.width:.1,g={x:c.x,y:c.y},h={x:l.x,y:l.y};let d=Number.POSITIVE_INFINITY;for(let m=0;m<r.length;m++){const _=M5(g,h,r[m],r[(m+1)%r.length]);_<d&&(d=_)}const p=u/2+i;if(d<p){const m={type:"pcb_trace_error",error_type:"pcb_trace_error",pcb_trace_error_id:`trace_too_close_to_board_${a.pcb_trace_id}_segment_${A}`,message:`Trace too close to board edge (${d.toFixed(3)}mm < ${p.toFixed(3)}mm required, margin: ${i}mm)`,pcb_trace_id:a.pcb_trace_id,source_trace_id:a.source_trace_id||"",center:{x:(g.x+h.x)/2,y:(g.y+h.y)/2},pcb_component_ids:[],pcb_port_ids:[]};n.push(m)}}return n}function Ado(t,{connMap:e,minClearance:n}={}){const o=(c=>[...nI(c).pcb_smtpad.list(),...nI(c).pcb_plated_hole.list()])(t),i=Q6t(t);if(o.length===0||i.length===0)return[];const r=yH(t);n??=xH(r,"min_trace_to_pad_edge_clearance")??b6t,e??=eL(t);const s=new w6t({objects:o,getBounds:Pce,getId:c=>gv(c)}),a=new Map,A=new Set;for(const c of i){const l=s.getObjectsInBounds(EH(c),n+c.thickness/2);for(const u of l){const g=gv(u);if(!gQe(u).includes(c.layer)||e.areIdsConnected(c.pcb_trace_id,g))continue;const h=`${g}_${c.pcb_trace_id}`,{gap:d}=uQe(c,u);if(Mce(d)){a.delete(h),A.add(h);continue}if(A.has(h)||d+Hv>=n)continue;const p={type:"pcb_pad_trace_clearance_error",pcb_pad_trace_clearance_error_id:`pad_trace_clearance_${h}`,error_type:"pcb_pad_trace_clearance_error",message:`Pad ${Ny(t,g)} and trace ${Ny(t,c.pcb_trace_id)} are too close (clearance: ${zae(d)}, minimum: ${zae(n)})`,pcb_pad_id:g,pcb_trace_id:c.pcb_trace_id,minimum_clearance:n,actual_clearance:d,center:v6t(c)},m=a.get(h);(!m||d<m.gap)&&a.set(h,{error:p,gap:d})}}return Array.from(a.values()).map(({error:c})=>c)}var cdo=(t,e={})=>{const n=(d=>{const p=eL(d),m=d.filter(_=>_.type==="pcb_via"&&typeof _.pcb_trace_id=="string").map(_=>[_.pcb_via_id,_.pcb_trace_id]);return p.addConnections(m),p})(t),o=Math.max(e.viaClearance??.1,.1),i=ndo(t,{connMap:n,minClearance:e.traceClearance}),r=e.includeTypedTraceClearance!==!1,s=r?(function(d,{connMap:p,minClearance:m}={}){const _=d.filter(x=>x.type==="pcb_via"),f=Q6t(d);if(_.length===0||f.length===0)return[];const I=yH(d);m??=xH(I,"min_trace_to_pad_edge_clearance")??b6t,p??=eL(d);const C=new Map,y=new Set;for(const x of _)for(const E of f){if(!gQe(x).includes(E.layer)||p.areIdsConnected(E.pcb_trace_id,x.pcb_via_id))continue;const B=`${x.pcb_via_id}_${E.pcb_trace_id}`,{gap:S}=uQe(E,x);if(Mce(S)){C.delete(B),y.add(B);continue}if(y.has(B)||S+Hv>=m)continue;const Q={type:"pcb_via_trace_clearance_error",pcb_via_trace_clearance_error_id:`via_trace_clearance_${B}`,error_type:"pcb_via_trace_clearance_error",message:`Via ${Ny(d,x.pcb_via_id)} and trace ${Ny(d,E.pcb_trace_id)} are too close (clearance: ${zae(S)}, minimum: ${zae(m)})`,pcb_via_id:x.pcb_via_id,pcb_trace_id:E.pcb_trace_id,minimum_clearance:m,actual_clearance:S,center:v6t(E)},w=C.get(B);(!w||S<w.gap)&&C.set(B,{error:Q,gap:S})}return Array.from(C.values()).map(({error:x})=>x)})(t,{connMap:n,minClearance:e.traceClearance}):[],a=r?Ado(t,{connMap:n,minClearance:e.traceClearance}):[],A=[...odo(t,{connMap:n,minClearance:o}),...ido(t,{connMap:n,minClearance:o})],c=[...i,...ado(t),...e.includeTraceContinuity===!1?[]:sdo(t),...s,...a,...A],l=t.filter(d=>d.type==="pcb_via"),u=new Map(l.map(d=>[d.pcb_via_id,d])),g=c.map(d=>{if(d.type==="pcb_via_trace_clearance_error"&&typeof d.pcb_via_id=="string"){const p=u.get(d.pcb_via_id);if(p)return{...d,center:{x:p.x,y:p.y}}}if("center"in d&&d.center)return d;if("pcb_center"in d&&d.pcb_center)return{...d,center:d.pcb_center};if("pcb_via_ids"in d&&Array.isArray(d.pcb_via_ids)){const[p,m]=d.pcb_via_ids,_=u.get(p),f=u.get(m);if(_&&f)return{...d,center:{x:(_.x+f.x)/2,y:(_.y+f.y)/2}}}if("pcb_error_id"in d&&typeof d.pcb_error_id=="string"&&(d.pcb_error_id.startsWith("same_net_vias_close_")||d.pcb_error_id.startsWith("different_net_vias_close_"))){const p=d.pcb_error_id.replace("same_net_vias_close_","").replace("different_net_vias_close_","").split("_").filter(Boolean);if(p.length===2){const m=u.get(p[0]),_=u.get(p[1]);if(m&&_)return{...d,center:{x:(m.x+_.x)/2,y:(m.y+_.y)/2}}}}return d}),h=g.filter(d=>!!d.center);return{errors:c,errorsWithCenters:g,locationAwareErrors:h}},hQe={traceClearance:.1,viaClearance:.1},T6t=t=>t.circuitJsonMetadata??{},k6t=({connections:t,obstacles:e})=>new Set([...t.flatMap(n=>n.pointsToConnect.flatMap(o=>o.pcb_port_id?[o.pcb_port_id]:[])),...e.flatMap(n=>{const o=T6t(n).pcb_port_id;return o?[o]:[]})]),pQe=t=>t.__netConnectionName??t.__rootConnectionNames?.[0]??t.name,ldo=t=>Array.from(new Set([t.name,t.__netConnectionName,...t.__rootConnectionNames??[],...t.pointsToConnect.flatMap(e=>[e.pointId,e.pcb_port_id])])).filter(e=>!!e),F6t=(t,e)=>{const n=new Map,o=new Set,i=new Map;for(const r of t){const s=pQe(r);for(const l of ldo(r)){const u=n.get(l);u&&u!==s?(n.delete(l),o.add(l)):o.has(l)||n.set(l,s)}const a=e.getNetConnectedToId(r.name);if(!a)continue;const A=a,c=i.get(A)??new Set;c.add(s),i.set(A,c)}return{connMap:e,circuitJsonSourceTraceIdBySrjDeclaredConnectionReference:n,circuitJsonSourceTraceIdsByConnectivityNetId:i}},BH=(t,e)=>{const n=t.circuitJsonSourceTraceIdBySrjDeclaredConnectionReference.get(e);if(n)return n;const o=t.connMap.getNetConnectedToId(e);if(!o)return;const i=t.circuitJsonSourceTraceIdsByConnectivityNetId.get(o);return i?.size===1?i.values().next().value:void 0};function udo(t,e,n=t){const o=[],i=n===t?t.connections:[...t.connections,...n.connections],r=n===t?t.obstacles:n.obstacles,s=F6t(i,Jm(n===t?t:{...n,connections:i})),a=k6t({connections:i,obstacles:r});if(i.forEach(A=>{const c=A.pointsToConnect.map(_=>_.pcb_port_id).filter(_=>!!_),l=new Set(c),u=_=>(f=>Array.from(new Set(f.flatMap(I=>I.connectedTo))))(_).filter(f=>!l.has(f)),g=A.pointsToConnect.map(_=>_.pointId).filter(_=>!!_),h=BH(s,A.name)??pQe(A),d=[],p=e.find(_=>(_.connection_name??_.connectionName)===A.name);if(p){const _=I=>"route_type"in I&&I.route_type==="jumper"?I.start:"x"in I&&"y"in I?{x:I.x,y:I.y}:{x:0,y:0},f=[_(p.route[0]),_(p.route[p.route.length-1])];for(const I of f)for(const C of r)o7(I,C)<=0&&d.push(C)}const m=o.find(_=>_.type==="source_trace"&&_.source_trace_id===h);if(m){const _=m;_.connected_source_port_ids=[...new Set([..._.connected_source_port_ids,...c])],_.connected_source_net_ids=[...new Set([..._.connected_source_net_ids??[],...g,...u(d)])]}else o.push({type:"source_trace",source_trace_id:h,connected_source_port_ids:c,connected_source_net_ids:u(d).concat(g)})}),e[0]&&"type"in e[0]){const A=new Map(i.map(c=>[c.name,c]));for(const c of e){const l=[...new Set((c.connectsTo??[]).filter(m=>a.has(m)))],u=new Set(l),g=[...new Set((c.connectsTo??[]).filter(m=>!u.has(m)))];if(l.length===0&&g.length===0)continue;const h=A.get(c.connection_name),d=BH(s,c.connection_name)??c.connectsTo?.map(m=>BH(s,m)).find(m=>m!==void 0)??(h?pQe(h):c.connection_name),p=o.find(m=>m.type==="source_trace"&&m.source_trace_id===d);p?.type!=="source_trace"?o.push({type:"source_trace",source_trace_id:d,connected_source_port_ids:l,connected_source_net_ids:g}):(p.connected_source_port_ids=[...new Set([...p.connected_source_port_ids,...l])],p.connected_source_net_ids=[...new Set([...p.connected_source_net_ids??[],...g])])}}return o}function gdo(t,e,n){let o,i=Number.POSITIVE_INFINITY;for(const r of e){const s=n.get(r);if(!s)continue;const a=Math.hypot(s.x-t.x,s.y-t.y);a<i&&(i=a,o=r)}return o??e[0]}var ddo=new Set(["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6","inner7","inner8"]),bH=t=>ddo.has(t);function hdo(t){const e=[],n=new Set,o=new Set,i=(function(s){const a=new Map;for(const A of s.connections)for(const c of A.pointsToConnect)c.pcb_port_id&&a.set(c.pcb_port_id,{x:c.x,y:c.y});return a})(t),r=k6t(t);for(const s of t.obstacles){const a=s.connectedTo,A=T6t(s);if(A.pcb_via_id)continue;const c=A.pcb_smtpad_id,l=A.pcb_plated_hole_id,u=[...new Set([...A.pcb_port_id?[A.pcb_port_id]:[],...a.filter(C=>r.has(C))])],g=gdo(s.center,u,i);if(!c&&!l&&!g)continue;const h=s.layers.filter(bH);if(h.length===0)continue;const d=s.width,p=s.height,m=s.center.x,_=s.center.y,f=s.ccwRotationDegrees;if(l||h.length>1){const C=l??`pcb_plated_hole_${m.toFixed(3)}_${_.toFixed(3)}`;if(o.has(C))continue;if(o.add(C),typeof f=="number"&&Number.isFinite(f)){const y=Math.max(.5*Math.min(d,p),.1);e.push({type:"pcb_plated_hole",pcb_plated_hole_id:C,shape:"rotated_pill_hole_with_rect_pad",hole_shape:"rotated_pill",pad_shape:"rect",hole_width:y,hole_height:y,hole_ccw_rotation:f,rect_pad_width:d,rect_pad_height:p,rect_ccw_rotation:f,hole_offset_x:0,hole_offset_y:0,x:m,y:_,layers:h,...g?{pcb_port_id:g}:{}});continue}if(Math.abs(d-p)<.001){e.push({type:"pcb_plated_hole",pcb_plated_hole_id:C,shape:"circle",outer_diameter:Math.max(d,p),hole_diameter:Math.max(.5*Math.min(d,p),.1),x:m,y:_,layers:h,...g?{pcb_port_id:g}:{}});continue}e.push({type:"pcb_plated_hole",pcb_plated_hole_id:C,shape:"circular_hole_with_rect_pad",hole_shape:"circle",hole_diameter:Math.max(.5*Math.min(d,p),.1),rect_pad_width:d,rect_pad_height:p,hole_offset_x:0,hole_offset_y:0,x:m,y:_,layers:h,...g?{pcb_port_id:g}:{}});continue}const I=c??`pcb_smtpad_${m.toFixed(3)}_${_.toFixed(3)}`;n.has(I)||(n.add(I),typeof f=="number"&&Number.isFinite(f)?e.push({type:"pcb_smtpad",pcb_smtpad_id:I,layer:h[0],shape:"rotated_rect",x:m,y:_,width:d,height:p,ccw_rotation:f,...g?{pcb_port_id:g}:{}}):e.push({type:"pcb_smtpad",pcb_smtpad_id:I,layer:h[0],shape:"rect",width:d,height:p,x:m,y:_,...g?{pcb_port_id:g}:{}}))}return e}function pdo(t,e,n={}){const{minTraceWidth:o=.1,minViaDiameter:i,minViaHoleDiameter:r,originalSrj:s,includeOriginalConnections:a=!1}=n,A=om(t),c=i??A.padDiameter,l=t.min_via_hole_diameter??t.minViaHoleDiameter,u=r??l??(i!==void 0?.5*c:A.holeDiameter),g=[];g.push(...udo(t,e,a&&s?s:t)),g.push(...(function(d){const p=new Map;return d.connections.forEach(m=>{m.pointsToConnect.forEach(_=>{_.pcb_port_id&&p.set(_.pcb_port_id,{type:"pcb_port",pcb_port_id:_.pcb_port_id,source_port_id:_.pcb_port_id,x:_.x,y:_.y,layers:RD(_)})})}),Array.from(p.values())})(a&&s?s:t)),g.push(...hdo(s??t)),g.push(...(function(d,p,m=.3,_=.5*m){const f=[],I=new Set;return d.length>0&&("type"in d[0]&&d[0].type==="pcb_trace"?d.forEach(C=>{C.route.forEach(y=>{if(y.route_type==="via"){if(!bH(y.from_layer)||!bH(y.to_layer))return;const x=y.via_diameter??m,E=y.via_hole_diameter??_,B=`${y.x},${y.y},${y.from_layer},${y.to_layer}`;I.has(B)||(f.push({type:"pcb_via",pcb_via_id:`via_${f.length}`,pcb_trace_id:C.pcb_trace_id,x:y.x,y:y.y,outer_diameter:x,hole_diameter:E,layers:[y.from_layer,y.to_layer]}),I.add(B))}})}):d.forEach((C,y)=>{const x=`trace_${y}`,E=C.viaDiameter??m,B=_;for(let S=1;S<C.route.length;S++){const Q=C.route[S-1],w=C.route[S];if(Q.z!==w.z&&Math.abs(Q.x-w.x)<.01&&Math.abs(Q.y-w.y)<.01){const M=Kh(Q.z,p),k=Kh(w.z,p),R=`${w.x},${w.y},${M},${k}`;I.has(R)||(f.push({type:"pcb_via",pcb_via_id:`via_${f.length}`,pcb_trace_id:x,x:w.x,y:w.y,outer_diameter:E,hole_diameter:B,layers:[M,k]}),I.add(R))}}})),f})(e,t.layerCount,c,u));const h=F6t(t.connections,Jm(t));return e.length>0&&("type"in e[0]&&e[0].type==="pcb_trace"?e.forEach(d=>{const p=BH(h,d.connection_name)??d.connectsTo?.map(m=>BH(h,m)).find(m=>!!m)??d.connection_name;g.push((function(m,_){return{type:"pcb_trace",pcb_trace_id:m.pcb_trace_id,source_trace_id:_,route:m.route.map(f=>{if(f.route_type==="wire"){if(!bH(f.layer))return null;const I="start_pcb_port_id"in f&&typeof f.start_pcb_port_id=="string"?f.start_pcb_port_id:void 0,C="end_pcb_port_id"in f&&typeof f.end_pcb_port_id=="string"?f.end_pcb_port_id:void 0;return{route_type:"wire",x:f.x,y:f.y,width:f.width,layer:f.layer,...I?{start_pcb_port_id:I}:{},...C?{end_pcb_port_id:C}:{}}}return f.route_type==="via"&&bH(f.from_layer)&&bH(f.to_layer)?{route_type:"via",x:f.x,y:f.y,from_layer:f.from_layer,to_layer:f.to_layer}:null}).filter(f=>f!==null)}})(d,p))}):e.forEach((d,p)=>{const m=(function(_,f,I,C,y=.1){const x=[];if(!_.jumpers||_.jumpers.length===0)return[{type:"pcb_trace",pcb_trace_id:f,source_trace_id:I,route:_.route.map((Q,w)=>{const M=w===0,k=w===_.route.length-1;return{route_type:"wire",x:Q.x,y:Q.y,width:Q.traceThickness??y,layer:Kh(Q.z,C),...M&&Q.pcb_port_id?{start_pcb_port_id:Q.pcb_port_id}:{},...k&&Q.pcb_port_id?{end_pcb_port_id:Q.pcb_port_id}:{}}})}];const E=[];for(const Q of _.jumpers){let w=-1,M=-1;for(let k=0;k<_.route.length;k++){const R=_.route[k];Math.abs(R.x-Q.start.x)<.01&&Math.abs(R.y-Q.start.y)<.01&&(w=k),Math.abs(R.x-Q.end.x)<.01&&Math.abs(R.y-Q.end.y)<.01&&(M=k)}w!==-1&&M!==-1&&(w>M&&([w,M]=[M,w]),E.push({startIdx:w,endIdx:M}))}E.sort((Q,w)=>Q.startIdx-w.startIdx);let B=0,S=0;for(const{startIdx:Q,endIdx:w}of E){if(Q>=B){const M=_.route.slice(B,Q+1);M.length>0&&(x.push({type:"pcb_trace",pcb_trace_id:`${f}_${S}`,source_trace_id:I,route:M.map((k,R)=>{const F=R===0&&B===0;return{route_type:"wire",x:k.x,y:k.y,width:k.traceThickness??y,layer:Kh(k.z,C),...F&&k.pcb_port_id?{start_pcb_port_id:k.pcb_port_id}:{}}})}),S++)}B=w}if(B<_.route.length){const Q=_.route.slice(B);Q.length>0&&x.push({type:"pcb_trace",pcb_trace_id:`${f}_${S}`,source_trace_id:I,route:Q.map((w,M)=>{const k=M===Q.length-1;return{route_type:"wire",x:w.x,y:w.y,width:w.traceThickness??y,layer:Kh(w.z,C),...k&&w.pcb_port_id?{end_pcb_port_id:w.pcb_port_id}:{}}})})}return x})(d,`trace_${p}`,BH(h,d.connectionName)??d.connectionName,t.layerCount,o);g.push(...m)})),g}var mQe=(t,e)=>{const n=new Set(e.flatMap(o=>o.__replaces_pcb_trace_id?[o.__replaces_pcb_trace_id]:[]));return[...t.filter(o=>!n.has(o.pcb_trace_id)),...e]},_Qe=({inputSrj:t,srjWithPointPairs:e,routedTraces:n,drcOptions:o})=>{const i=t.traces??[],r=pdo(e,mQe(i,n),{minTraceWidth:t.minTraceWidth,minViaDiameter:t.minViaDiameter,originalSrj:t,includeOriginalConnections:!0});return{circuitJson:r,...cdo(r,{...hQe,...o})}},mdo=class extends zA{params;inputHdRoutes;outputHdRoutes;phase="start";fastProbeSolver;fallbackSolver;selectedSolver;fastProbeDrcIssueCount;fastProbeAttempted=!1;constructor(e){super(),this.params=e,this.inputHdRoutes=e.hdRoutes,this.outputHdRoutes=e.hdRoutes}getConstructorParams(){return[{...this.params,hdRoutes:this.inputHdRoutes}]}startFastProbe(){this.fastProbeAttempted=!0,this.fastProbeSolver=new jbe({...this.params,hdRoutes:this.inputHdRoutes,maxIterations:4,broadPassMultiplier:.1}),this.activeSubSolver=this.fastProbeSolver,this.phase="fastProbe"}startFallback(){this.fallbackSolver=new jbe({...this.params,hdRoutes:this.inputHdRoutes}),this.activeSubSolver=this.fallbackSolver,this.phase="fallback"}evaluateFastProbeDrcIssueCount(e){const n=this.fastProbeSolver?.stats.finalDrcIssueCount;if(typeof n=="number"&&Number.isFinite(n)&&n>=0)return n;const o=this.params.drcEvaluator?.({traces:[],srj:this.params.srj,routes:e,hdRoutes:e});return o?Array.isArray(o)?o.length:o.errors.length:void 0}finish(e,n){this.outputHdRoutes=e.getOutput(),this.selectedSolver=e,this.activeSubSolver=null,this.phase="done",this.progress=1,this.stats={...e.stats,pipeline7AdaptiveExactDrcFastProbeAttempted:this.fastProbeAttempted,pipeline7AdaptiveExactDrcFastProbeAccepted:n,pipeline7AdaptiveExactDrcFastProbeDrcIssueCount:this.fastProbeDrcIssueCount},this.solved=!0}_step(){if(this.phase!=="start"){if(this.phase==="fastProbe"){try{this.fastProbeSolver.step()}catch{return void this.startFallback()}if(this.fastProbeSolver.failed)return void this.startFallback();if(!this.fastProbeSolver.solved)return;const e=this.fastProbeSolver.getOutput();try{this.fastProbeDrcIssueCount=this.evaluateFastProbeDrcIssueCount(e)}catch{return void this.startFallback()}return void(this.fastProbeDrcIssueCount===0?this.finish(this.fastProbeSolver,!0):this.startFallback())}if(this.phase==="fallback"){if(this.fallbackSolver.step(),this.fallbackSolver.failed)throw new Error(`Pipeline7 full DRC repair portfolio failed: ${this.fallbackSolver.error}`);this.fallbackSolver.solved&&this.finish(this.fallbackSolver,!1)}}else this.params.srj.layerCount===2&&this.params.enableSafeTraceLayerMoves?this.startFastProbe():this.startFallback()}getOutput(){return this.outputHdRoutes}visualize(){return(this.activeSubSolver??this.selectedSolver)?.visualize()??super.visualize()}preview(){return(this.activeSubSolver??this.selectedSolver)?.preview()??this.visualize()}},DN=(t,e)=>{const n=t({hdRoutes:e,traces:[]});return Array.isArray(n)?n:n.errorsWithCenters??n.errors},_do=({error:t,preloadRepairTraceIds:e})=>(o=>{const i=typeof o.pcb_trace_id=="string"?o.pcb_trace_id:void 0,r=Array.isArray(o.pcb_trace_ids)?o.pcb_trace_ids.filter(c=>typeof c=="string"):[],s=[...typeof o.pcb_via_id=="string"?[o.pcb_via_id]:[],...Array.isArray(o.pcb_via_ids)?o.pcb_via_ids:[]].filter(c=>typeof c=="string"),a=i?`overlap_${i}_`:void 0,A=a&&typeof o.pcb_trace_error_id=="string"&&o.pcb_trace_error_id.startsWith(a)?o.pcb_trace_error_id.slice(a.length):void 0;if(r.length>0){const c=i&&!r.includes(i)?[i,...r]:[...r];return c.length<2&&A&&!s.includes(A)&&c.push(A),c}return[i,A].filter(c=>typeof c=="string"&&!s.includes(c))})(t).some(o=>e.has(o))?!0:(t.__collapsed_trace_participants??[]).flatMap(o=>new Set(o.evaluationTraceIds).size>1?[o.solverTraceId]:[]).some(o=>e.collidingFixedTraceIds?.has(o)),L6t=t=>t.reduce((e,n)=>{if(typeof n.actual_clearance=="number"&&typeof n.minimum_clearance=="number")return e+Math.max(0,n.minimum_clearance-n.actual_clearance);const o=(typeof n.message=="string"?n.message:"").match(/gap: (-?\d+(?:\.\d+)?)mm/);return o?e+Math.max(0,.1-Number.parseFloat(o[1])):e+1},0),Nce=(t,e)=>t.length<e.length||t.length===e.length&&L6t(t)<L6t(e)-1e-9,fQe=({routes:t,newConnections:e,syntheticConnectionNames:n})=>{const o=new Set([...e.map(s=>s.name),...n]),i=new Map,r=new Map;for(let s=0;s<t.length;s++){const a=t[s];if(!o.has(a.connectionName))continue;const A=i.get(a.connectionName)??0;i.set(a.connectionName,A+1),r.set(`${a.connectionName}_${A}`,s)}return r},fdo=[3,4,5,6,8],Ido=(t,e)=>{const n=typeof t.pcb_pad_id=="string"?t.pcb_pad_id:typeof t.pcb_trace_error_id=="string"?t.pcb_trace_error_id.match(/(pcb_(?:smtpad|plated_hole|hole|keepout)_\d+)$/)?.[1]:void 0;if(n){const o=e.obstacles.find(i=>i.obstacleId===n||i.connectedTo[0]===n);if(o)return o.center}return(o=>{const i=o.center;return i&&typeof i=="object"&&"x"in i&&"y"in i&&typeof i.x=="number"&&typeof i.y=="number"?{x:i.x,y:i.y}:void 0})(t)},Cdo=({error:t,routeIndexByTraceId:e})=>{const n=typeof t.pcb_trace_id=="string"?t.pcb_trace_id:void 0,o=[...typeof t.pcb_via_id=="string"?[t.pcb_via_id]:[],...Array.isArray(t.pcb_via_ids)?t.pcb_via_ids.filter(a=>typeof a=="string"):[]],i=n?`overlap_${n}_`:void 0,r=i&&typeof t.pcb_trace_error_id=="string"&&t.pcb_trace_error_id.startsWith(i)?t.pcb_trace_error_id.slice(i.length):void 0,s=r!==void 0&&o.includes(r);return[n,...Array.isArray(t.pcb_trace_ids)?t.pcb_trace_ids:[],s?void 0:r].filter(a=>typeof a=="string"&&e.has(a)).filter((a,A,c)=>c.indexOf(a)===A)},H6t=t=>t.map((e,n)=>({...e,preloadedTraceId:`pipeline9_joint_candidate_${n}`,preloadedTraceIndex:n,preloadedRouteIndex:0,isThroughObstacle:!1})),O6t=(t,e)=>t.minX<=e.maxX&&t.maxX>=e.minX&&t.minY<=e.maxY&&t.maxY>=e.minY,G6t=t=>({minX:t.center.x-t.diameter/2,maxX:t.center.x+t.diameter/2,minY:t.center.y-t.diameter/2,maxY:t.center.y+t.diameter/2}),ydo=t=>({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2}),xdo=(t,e)=>{const n=MN(t);return n.wireSegments.some(o=>O6t((i=>({minX:Math.min(i.start.x,i.end.x)-i.width/2,maxX:Math.max(i.start.x,i.end.x)+i.width/2,minY:Math.min(i.start.y,i.end.y)-i.width/2,maxY:Math.max(i.start.y,i.end.y)+i.width/2}))(o),e))||n.viaSpans.some(o=>O6t(G6t(o),e))},Edo=({routes:t,fixedObstacleRoutes:e,routeIndex:n,center:o,regionSize:i,srj:r,connMap:s,colorMap:a,viaDiameter:A,traceWidth:c,obstacleMargin:l,effort:u})=>{const g=H6t(t),h=g[n];if(!h)return;const d={capacityMeshNodeId:`pipeline9_joint_drc_${n}_${i}`,center:o,width:i,height:i,availableZ:Array.from({length:r.layerCount},(C,y)=>y),portPoints:[],portPointsInPairs:[]},p=MW(d,[h]),m=p.fixedRouteSectionsByConnectionName.get(h.connectionName);if(!m)return;const _=g.filter((C,y)=>y!==n),f=new sQe({nodePortPoints:[p.nodeWithPortPoints],fixedHdRoutes:[..._,...e],connMap:s,colorMap:a,obstacles:r.obstacles,layerCount:r.layerCount,viaDiameter:A,traceWidth:c,obstacleMargin:l,effort:u,preserveTerminalPcbPortIds:!0,includeBoardObstacles:!0,enableRegionalFallback:!1,maxB01Rips:120});if(f.solve(),!f.solved||f.failed)return;const I=f.routes.find(C=>C.connectionName===h.connectionName);return I?{routes:t.map((C,y)=>y===n?eQe(m,I):C),usedFallback:Number(f.stats.fallbackNodeCount??0)>0}:void 0},Bdo=({routes:t,fixedRouteCopperSpatialIndex:e,center:n,regionSize:o,srj:i,connMap:r,colorMap:s,viaDiameter:a,traceWidth:A,obstacleMargin:c,effort:l})=>{const u=H6t(t),g={capacityMeshNodeId:"pipeline9_joint_drc_regular_fallback",center:n,width:o,height:o,availableZ:Array.from({length:i.layerCount},(B,S)=>S),portPoints:[],portPointsInPairs:[]},h=MW(g,u);if(h.fixedRouteSectionsByConnectionName.size===0||!(B=>{const S=W7t(B);return B.portPoints.every(Q=>Cft({point:Q,bounds:S})==="on-boundary")})(h.nodeWithPortPoints))return;const d=[...h.fixedRouteSectionsByConnectionName.values()].flatMap(B=>B.sourceRoutes).reduce((B,S)=>{const Q=MN(S);return Math.max(B,S.viaDiameter/2,...Q.wireSegments.map(w=>w.width/2),...Q.viaSpans.map(w=>w.diameter/2))},Math.max(A/2,a/2)),p={minX:n.x-o/2-c-d,maxX:n.x+o/2+c+d,minY:n.y-o/2-c-d,maxY:n.y+o/2+c+d},m=e.getRoutesOverlappingBounds(p),_=g6t({fixedObstacleRoutes:m,layerCount:i.layerCount}),f=new m6t({nodeWithPortPoints:h.nodeWithPortPoints,colorMap:s,connMap:r,viaDiameter:a,traceWidth:A,obstacleMargin:c,effort:l,obstacles:[...i.obstacles,..._],layerCount:i.layerCount});if(f.solve(),!f.solved||f.failed)return;const I=f.getOutput(),C=new Map(I.map(B=>[B.connectionName,B])),y=new Map,x=new Set;for(const[B,S]of h.fixedRouteSectionsByConnectionName){const Q=C.get(B);if(!Q)return;y.set(S.sourceRoutes[0].preloadedTraceIndex,eQe(S,Q));for(const w of S.sourceRoutes.slice(1))x.add(w.preloadedTraceIndex)}const E=u.flatMap((B,S)=>x.has(S)?[]:[y.get(S)??B]);return(({candidateRoutes:B,fixedObstacleRoutes:S,obstacleMargin:Q,connMap:w,candidateBounds:M})=>{for(const k of B)for(const R of S)if(!d6t(k,R,w)&&p6t({left:k,right:R,clearance:Q,leftBounds:M}))return!0;return!1})({candidateRoutes:E,fixedObstacleRoutes:m,obstacleMargin:c,connMap:r,candidateBounds:p})?void 0:E},bdo=({srj:t,routes:e,fixedObstacleRoutes:n,newConnections:o,syntheticConnectionNames:i,drcEvaluator:r,initialErrors:s,preloadRepairTraceIds:a,connMap:A,colorMap:c,viaDiameter:l,traceWidth:u,obstacleMargin:g,effort:h})=>{let d=e,p=s??DN(r,d),m=0,_=0,f=0,I=0,C=!1;const y=(Q=>{if(!Number.isInteger(Q)||Q<0)throw new Error("Pipeline9 regional repair route count must be nonnegative");const w=Math.floor(7e3/Math.max(1,Q));return Math.max(16,Math.min(192,w))})(e.length),x=p.filter(Q=>_do({error:Q,preloadRepairTraceIds:a})).length;if(x===0)return{routes:d,attemptedCandidateCount:m,acceptedCandidateCount:_,fallbackCandidateCount:f,candidateSearchCount:I,candidateSearchBudget:y,candidateSearchBudgetExhausted:C,safeTraceLayerRepairSkippedForBudget:!1,remainingDrcIssueCount:p.length,preloadEligibleDrcIssueCount:x,preloadRepairAttempted:!1};const E=(Q=>{const w=new Map,M=(k,R)=>{const F=Math.floor(R.minX/4),O=Math.floor(R.maxX/4),U=Math.floor(R.minY/4),Y=Math.floor(R.maxY/4);for(let W=F;W<=O;W++)for(let te=U;te<=Y;te++){const j=`${W}:${te}`,J=w.get(j)??new Set;J.add(k),w.set(j,J)}};for(let k=0;k<Q.length;k++){const R=MN(Q[k]);for(const F of R.wireSegments)for(const O of u6t(F,4,1))M(k,ydo(O));for(const F of R.viaSpans)M(k,G6t(F))}return{getRoutesOverlappingBounds:k=>{const R=new Set,F=Math.floor(k.minX/4),O=Math.floor(k.maxX/4),U=Math.floor(k.minY/4),Y=Math.floor(k.maxY/4);for(let W=F;W<=O;W++)for(let te=U;te<=Y;te++)for(const j of w.get(`${W}:${te}`)??[])R.add(j);return[...R].sort((W,te)=>W-te).map(W=>Q[W]).filter(W=>xdo(W,k))}}})(n);for(let Q=0;Q<2&&!C;Q++){let w=!1;const M=fQe({routes:d,newConnections:o,syntheticConnectionNames:i}),k=p.filter(R=>(R.type==="pcb_trace_error"||R.type==="pcb_pad_trace_clearance_error"||R.type==="pcb_via_trace_clearance_error"||R.type==="pcb_via_clearance_error")&&typeof R.pcb_trace_id=="string");for(const R of k){if(C)break;const F=Ido(R,t),O=Cdo({error:R,routeIndexByTraceId:M});if(!F)continue;let U=d,Y=p;for(const W of O.slice(0,2)){if(C)break;const te=M.get(W);if(te!==void 0){for(const j of fdo){if(I>=y){C=!0;break}I++;const J=Edo({routes:d,fixedObstacleRoutes:n,routeIndex:te,center:F,regionSize:j,srj:t,connMap:A,colorMap:c,viaDiameter:l,traceWidth:u,obstacleMargin:g,effort:h});if(!J)continue;m++,J.usedFallback&&f++;const oe=DN(r,J.routes);if(Nce(oe,Y)&&(U=J.routes,Y=oe),Y.length===0)break}if(Y.length===0)break}}if(U!==d||C||(I>=y?C=!0:I++),U===d&&!C){const W=Bdo({routes:d,fixedRouteCopperSpatialIndex:E,center:F,regionSize:3,srj:t,connMap:A,colorMap:c,viaDiameter:l,traceWidth:u,obstacleMargin:g,effort:h});if(W){m++,f++;const te=DN(r,W);Nce(te,Y)&&(U=W,Y=te)}}if(U!==d&&(d=U,p=Y,_++,w=!0),C)break}if(!w||p.length===0)break}const B=p.some(Q=>Q.type==="pcb_trace_error"||Q.type==="pcb_pad_trace_clearance_error"),S=B&&C;if(B&&!C){const Q=new S7({srj:{...t,traces:void 0},hdRoutes:d,connMap:A,effort:h,drcEvaluator:r,maxIterations:8,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!1,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:!1});if(Q.solve(),Q.failed)throw new Error(`Pipeline9 post-regional safe trace-layer repair failed: ${Q.error??"unknown error"}`);const w=Q.getOutput(),M=DN(r,w);Nce(M,p)&&(d=w,p=M)}return{routes:d,attemptedCandidateCount:m,acceptedCandidateCount:_,fallbackCandidateCount:f,candidateSearchCount:I,candidateSearchBudget:y,candidateSearchBudgetExhausted:C,safeTraceLayerRepairSkippedForBudget:S,remainingDrcIssueCount:p.length,preloadEligibleDrcIssueCount:x,preloadRepairAttempted:x>0}},Sdo=[.9,.72],Qdo=Array.from({length:16},(t,e)=>e*Math.PI/8),vdo=t=>t.type==="pcb_pad_trace_clearance_error"||t.type==="pcb_trace_error"&&!(Array.isArray(t.pcb_trace_ids)&&t.pcb_trace_ids.length>=2),wdo=t=>{if(typeof t.pcb_pad_id=="string")return t.pcb_pad_id;if(typeof t.pcb_trace_error_id=="string"){const n=t.pcb_trace_error_id.match(/(pcb_(?:smtpad|plated_hole|hole|keepout)_\d+)$/)?.[1];if(n)return n}return(typeof t.message=="string"?t.message:"").match(/(?:pcb_smtpad|pcb_plated_hole|pcb_hole|pcb_keepout)\[#?([^\]"]+)\]/)?.[1]},Pdo=(t,e)=>{if(!e)return;const n=e.startsWith("pcb_")?e:`pcb_${e}`;return t.obstacles.find(o=>o.obstacleId===n||o.connectedTo[0]===n)},Mdo=({srj:t,pcbPortId:e,z:n,portPositionMap:o})=>{const i=Kh(n,t.layerCount),r=o.get(e),s=t.obstacles.filter(a=>a.layers.includes(i)&&a.connectedTo.includes(e));return r?s.reduce((a,A)=>a?Math.hypot(A.center.x-r.x,A.center.y-r.y)<Math.hypot(a.center.x-r.x,a.center.y-r.y)?A:a:A,void 0):s[0]},Ddo=({terminalObstacle:t,conflictingObstacle:e,traceRadius:n})=>{const o=Math.max(0,t.width/2-n),i=Math.max(0,t.height/2-n),r=(t.ccwRotationDegrees??0)*Math.PI/180;return Sdo.flatMap(s=>Qdo.map(a=>{const A={x:Math.cos(a)*o*s,y:Math.sin(a)*i*s},c=(u=r,{x:(l=A).x*Math.cos(u)-l.y*Math.sin(u),y:l.x*Math.sin(u)+l.y*Math.cos(u)});var l,u;return{x:t.center.x+c.x,y:t.center.y+c.y}})).sort((s,a)=>Math.hypot(a.x-e.center.x,a.y-e.center.y)-Math.hypot(s.x-e.center.x,s.y-e.center.y)).slice(0,16)},Ndo=({routes:t,routeIndex:e,endpointIndex:n,point:o,bounds:i,collapseAdjacent:r})=>{const s=(h=>h.map(d=>({...d,route:d.route.map(p=>({...p})),vias:d.vias.map(p=>({...p}))})))(t),a=s[e];if(!a||a.route.length<2)return;const A=n===0?0:a.route.length-1,c=n===0?1:A-1,l=a.route[A],u=a.route[c];if(!l||!u||l.z!==u.z)return;const g=a.traceThickness/2;if(!(o.x-g<i.minX||o.x+g>i.maxX||o.y-g<i.minY||o.y+g>i.maxY)){if(a.route[A]={...l,...o},r){const h=n===0?c+1:c-1,d=a.route[h],p=a.vias.some(m=>m.x===u.x&&m.y===u.y);if(!d||d.z!==l.z||u.pcb_port_id!==void 0||p)return;a.route[c]={...u,...o}}return s}},Rdo=({srj:t,routes:e,newConnections:n,syntheticConnectionNames:o,drcEvaluator:i})=>{let r=e,s=DN(i,r),a=0,A=0;const c=(l=>{const u=new Map;for(const g of l.connections)for(const h of g.pointsToConnect)h.pcb_port_id&&u.set(h.pcb_port_id,h);return u})(t);for(let l=0;l<2;l++){let u=!1;const g=fQe({routes:r,newConnections:n,syntheticConnectionNames:o});for(const h of s.filter(vdo)){if(typeof h.pcb_trace_id!="string")continue;const d=g.get(h.pcb_trace_id),p=Pdo(t,wdo(h));if(d===void 0||!p)continue;const m=r[d];let _=r,f=s;for(const I of[0,-1]){const C=I===0?m.route[0]:m.route.at(-1);if(!C||typeof C.pcb_port_id!="string")continue;const y=Mdo({srj:t,pcbPortId:C.pcb_port_id,z:C.z,portPositionMap:c});if(!y||y===p)continue;const x=Math.hypot(p.width,p.height)/2+Math.hypot(y.width,y.height)/2+.5;if(!(Math.hypot(C.x-p.center.x,C.y-p.center.y)>x))for(const E of Ddo({terminalObstacle:y,conflictingObstacle:p,traceRadius:m.traceThickness/2}))for(const B of[!1,!0]){const S=Ndo({routes:r,routeIndex:d,endpointIndex:I,point:E,bounds:t.bounds,collapseAdjacent:B});if(!S)continue;a++;const Q=DN(i,S);Nce(Q,f)&&(_=S,f=Q)}}_!==r&&(r=_,s=f,A++,u=!0)}if(!u||s.length===0)break}return{routes:r,attemptedCandidateCount:a,acceptedCandidateCount:A,remainingErrors:s}},Tdo=["pcb_trace_error_id","pcb_error_id","pcb_via_trace_clearance_error_id","pcb_pad_trace_clearance_error_id"],IQe=(t,e)=>{let n=t;const o=[...e].sort(([i],[r])=>r.length-i.length);for(const[i,r]of o)n=n.replaceAll(i,r);return n},Y6t=(t,e)=>{const n=String(t.type??t.error_type??"unknown");if(n==="pcb_via_clearance_error")return((i,r)=>{const s=[...typeof i.pcb_trace_id=="string"?[i.pcb_trace_id]:[],...Array.isArray(i.pcb_trace_ids)?i.pcb_trace_ids.filter(l=>typeof l=="string"):[]].map(l=>IQe(l,r)).filter((l,u,g)=>g.indexOf(l)===u).sort(),a=i.center&&typeof i.center=="object"?i.center:i.pcb_center&&typeof i.pcb_center=="object"?i.pcb_center:void 0,A=typeof a?.x=="number"&&typeof a.y=="number"?{x:a.x,y:a.y}:void 0,c=typeof i.pcb_via_pair_net_relation=="string"?i.pcb_via_pair_net_relation:void 0;if(s.length!==0&&A&&c)return`pcb_via_clearance_error:${JSON.stringify({traceIds:s,center:A,netRelation:c})}`})(t,e);for(const i of Tdo){const r=t[i];if(typeof r=="string")return`${n}:${IQe(r,e)}`}const o=Object.fromEntries(Object.entries(t).filter(([i,r])=>(i.endsWith("_id")||i.endsWith("_ids"))&&(typeof r=="string"||Array.isArray(r))).sort(([i],[r])=>i.localeCompare(r)).map(([i,r])=>[i,typeof r=="string"?IQe(r,e):r]));return`${n}:${JSON.stringify(o)}`},SH=({errors:t,baselineErrors:e,originalTraceIdByPreparedTraceId:n=new Map})=>{const o=new Set(e.filter(i=>!(r=>typeof r.pcb_trace_error_id=="string"&&r.pcb_trace_error_id.startsWith("missing_connection_"))(i)).map(i=>Y6t(i,new Map)));return o.delete(void 0),t.filter(i=>{const r=Y6t(i,n);return r===void 0||!o.has(r)})},Rce=1.5,kdo=({errorsWithCenters:t,traces:e,layerCount:n,defaultViaDiameter:o,connMap:i})=>{const r=(a=>a.flatMap(A=>{if(A.type!=="pcb_trace_error"||!Array.isArray(A.pcb_port_ids)||A.pcb_port_ids.length<4)return[];const c=A.center;return c&&typeof c=="object"&&"x"in c&&"y"in c&&typeof c.x=="number"&&typeof c.y=="number"?[{x:c.x,y:c.y}]:[]}))(t),s=new Set;for(let a=0;a<e.length;a++){const A=e[a],c=kv(A,a,n,o,i);r.some(l=>c.some(u=>{const g=u.route.map(d=>d.x),h=u.route.map(d=>d.y);return Math.min(...g)<=l.x+Rce&&Math.max(...g)>=l.x-Rce&&Math.min(...h)<=l.y+Rce&&Math.max(...h)>=l.y-Rce}))&&s.add(A.pcb_trace_id)}return s},Fdo=({routes:t,otherHdRoutes:e,obstacles:n,colorMap:o,layerCount:i,connMap:r})=>{const s=XSe([...t,...e],r),a=new jft({inputHdRoutes:t,otherHdRoutes:e,netByConnectionName:s,obstacles:n,colorMap:o,layerCount:i,connMap:r});if(a.solve(),a.failed)throw new Error(`Pipeline9 could not merge movable preloaded vias: ${a.error??"unknown error"}`);return a.getMergedViaHdRoutes()??t},U6t=({errors:t,circuitJson:e,newTraceIds:n})=>{const o=new Map(e.flatMap(i=>i.type==="pcb_via"&&typeof i.pcb_via_id=="string"&&typeof i.pcb_trace_id=="string"?[[i.pcb_via_id,i.pcb_trace_id]]:[]));return t.map(i=>{const r=typeof i.pcb_trace_id=="string"?i.pcb_trace_id:void 0,s=Array.isArray(i.pcb_trace_ids)?i.pcb_trace_ids.filter(u=>typeof u=="string"):[],a=[...typeof i.pcb_via_id=="string"?[i.pcb_via_id]:[],...Array.isArray(i.pcb_via_ids)?i.pcb_via_ids.filter(u=>typeof u=="string"):[]].filter((u,g,h)=>h.indexOf(u)===g);if(r&&typeof i.pcb_trace_error_id=="string"){const u=`overlap_${r}_`,g=i.pcb_trace_error_id.startsWith(u)?i.pcb_trace_error_id.slice(u.length):void 0,h=g!==void 0&&(a.includes(g)||o.has(g)&&!s.includes(g)),d=s.find(p=>p!==r&&n.has(p))??(g&&!h?g:void 0);if(!n.has(r)&&a.length===0&&d&&n.has(d)){const p=[d,r,...s].filter((m,_,f)=>f.indexOf(m)===_);return{...i,pcb_trace_id:d,pcb_trace_ids:p,pcb_trace_error_id:`overlap_${d}_${r}`}}}const A=a.flatMap(u=>{const g=o.get(u);return g?[g]:[]}).filter((u,g,h)=>h.indexOf(u)===g),c=A.length>0?A:s.filter(u=>u!==r),l=c.find(u=>n.has(u));if(l&&(!r||!n.has(r))){const u=[l,...r?[r]:[],...s,...c].filter((g,h,d)=>d.indexOf(g)===h);return{...i,pcb_trace_id:l,pcb_trace_ids:u,pcb_via_id:a[0],pcb_via_ids:a}}if(a.length>0){const u=[...r?[r]:[],...s,...c].filter((g,h,d)=>d.indexOf(g)===h);return{...i,pcb_trace_ids:u,pcb_via_id:a[0],pcb_via_ids:a}}return i})},Tce=1e-9,K6t=t=>{const e=new Set,n=[];for(const o of t)for(const i of o.route){if(i.route_type!=="via")continue;const r=`${i.x},${i.y},${i.from_layer},${i.to_layer}`;e.has(r)||(e.add(r),n.push({type:"pcb_via",pcb_via_id:`via_${n.length}`,pcb_trace_id:o.pcb_trace_id}))}return n},R7=({errors:t,circuitJson:e,evaluatedTraceIds:n})=>{const o=new Map(e.flatMap(i=>i.type==="pcb_via"&&typeof i.pcb_via_id=="string"&&typeof i.pcb_trace_id=="string"?[[i.pcb_via_id,i.pcb_trace_id]]:[]));return t.map(i=>{const r=[...typeof i.pcb_via_id=="string"?[i.pcb_via_id]:[],...Array.isArray(i.pcb_via_ids)?i.pcb_via_ids.filter(h=>typeof h=="string"):[]],s=typeof i.pcb_trace_id=="string"?i.pcb_trace_id:void 0,a=s?`overlap_${s}_`:void 0,A=a&&typeof i.pcb_trace_error_id=="string"&&i.pcb_trace_error_id.startsWith(a)?i.pcb_trace_error_id.slice(a.length):void 0,c=typeof i.pcb_trace_error_id=="string"?i.pcb_trace_error_id.match(/_(via_\d+)$/)?.[1]:void 0,l=r.length!==0||!c||!o.has(c)||A&&n.has(A)?void 0:c,u=[...r,...l?[l]:[]].filter((h,d,p)=>p.indexOf(h)===d),g=[...typeof i.pcb_trace_id=="string"?[i.pcb_trace_id]:[],...Array.isArray(i.pcb_trace_ids)?i.pcb_trace_ids.filter(h=>typeof h=="string"):[],...u.flatMap(h=>{const d=o.get(h);return d?[d]:[]})].filter((h,d,p)=>p.indexOf(h)===d);return{...i,...u.length>0?{pcb_via_id:u[0],pcb_via_ids:u}:{},...u.length>0&&g.length>0?{pcb_trace_ids:g}:{}}})},V6t=(t,e)=>Math.abs(t.x-e.x)<=Tce&&Math.abs(t.y-e.y)<=Tce&&t.z===e.z,Ldo=({trace:t,sectionGroup:e,syntheticConnectionName:n,connMap:o})=>{const i=e.routes;if(i.length===0)throw new Error(`Pipeline9 cannot exactly repair empty preloaded section for trace "${t.pcb_trace_id}"`);const r=[];for(const l of i){if(r.length===0){r.push(...l.route);continue}const u=r.at(-1);if(l.route[0]&&V6t(u,l.route[0]))r.push(...l.route.slice(1));else{if(!l.route.at(-1)||!V6t(u,l.route.at(-1)))throw new Error(`Pipeline9 cannot reconnect preloaded trace "${t.pcb_trace_id}" for exact repair`);r.push(...l.route.slice(0,-1).reverse())}}const s=e.routePositionStart===0,a=e.routePositionEnd===t.route.length-1,A=s?t.connectsTo?.[0]:null,c=a?t.connectsTo?.at(-1):null;return A&&r[0]&&(r[0]={...r[0],pcb_port_id:A}),c&&r.at(-1)&&(r[r.length-1]={...r.at(-1),pcb_port_id:c}),{connectionName:n,rootConnectionName:o.getNetConnectedToId(t.connection_name)??t.connection_name,traceThickness:Math.max(...i.map(l=>l.traceThickness)),viaDiameter:Math.max(...i.map(l=>l.viaDiameter)),route:r,vias:r.slice(0,-1).flatMap((l,u)=>{const g=r[u+1];return l.z!==g.z&&(h=l,d=g,Math.abs(h.x-d.x)<=Tce&&Math.abs(h.y-d.y)<=Tce)?[{x:g.x,y:g.y}]:[];var h,d})}},Hdo=({trace:t,traceIndex:e,layerCount:n,defaultViaDiameter:o,connMap:i})=>{const r=t.route.flatMap((A,c)=>A.route_type==="through_obstacle"?[c]:[]),s=new Map,a=kv(t,e,n,o,i);for(const A of a){const c=A.preloadedRoutePositionStart,l=A.preloadedRoutePositionEnd;if(c===void 0||l===void 0)throw new Error(`Pipeline9 preloaded trace section is missing route positions for "${t.pcb_trace_id}"`);if(t.route[c]?.route_type==="through_obstacle")continue;const u=r.filter(h=>h<c).length,g=s.get(u)??{routePositionStart:c,routePositionEnd:l,routes:[]};g.routePositionStart=Math.min(g.routePositionStart,c),g.routePositionEnd=Math.max(g.routePositionEnd,l),g.routes.push(A),s.set(u,g)}return[...s.values()]},z6t=(t,e)=>t.map(n=>{const o=Array.isArray(n.pcb_trace_ids)?n.pcb_trace_ids.filter(p=>typeof p=="string"):[],i=typeof n.pcb_trace_id=="string"?n.pcb_trace_id:void 0,r=i?`overlap_${i}_`:void 0,s=r&&typeof n.pcb_trace_error_id=="string"&&n.pcb_trace_error_id.startsWith(r)?n.pcb_trace_error_id.slice(r.length):void 0,a=[...typeof n.pcb_via_id=="string"?[n.pcb_via_id]:[],...Array.isArray(n.pcb_via_ids)?n.pcb_via_ids.filter(p=>typeof p=="string"):[]],A=s!==void 0&&a.includes(s),c=[i,...o,A?void 0:s].filter(p=>typeof p=="string"),l=new Map;for(const p of c){const m=e.get(p)??p,_=l.get(m)??new Set;_.add(p),l.set(m,_)}const u=[...l].flatMap(([p,m])=>m.size>1?[{solverTraceId:p,evaluationTraceIds:[...m]}]:[]),g=i?e.get(i)??i:void 0,h=o.map(p=>e.get(p)??p),d=s?A?s:e.get(s)??s:void 0;return g!==i||h.some((p,m)=>p!==o[m])||d!==s?{...n,...i?{pcb_trace_id:g}:{},...Array.isArray(n.pcb_trace_ids)?{pcb_trace_ids:h}:{},...g&&d?{pcb_trace_error_id:`overlap_${g}_${d}`}:{},...u.length>0?{__collapsed_trace_participants:u}:{}}:n}),Odo=(t,e)=>{const n=t.hdRoute.route[0],o=t.hdRoute.route.at(-1);return{name:t.syntheticConnectionName,rootConnectionName:t.hdRoute.rootConnectionName,__netConnectionName:t.originalTrace.connection_name,nominalTraceWidth:t.hdRoute.traceThickness,pointsToConnect:[{x:n.x,y:n.y,layer:Kh(n.z,e),pointId:`${t.syntheticConnectionName}:start`},{x:o.x,y:o.y,layer:Kh(o.z,e),pointId:`${t.syntheticConnectionName}:end`}]}},Gdo=({originalTrace:t,repairedSections:e})=>{const n=[];let o=0;for(const i of[...e].sort((r,s)=>r.routePositionStart-s.routePositionStart)){if(i.routePositionStart<o)throw new Error(`Pipeline9 found overlapping repaired sections for preloaded trace "${t.pcb_trace_id}"`);n.push(...t.route.slice(o,i.routePositionStart),...i.route),o=i.routePositionEnd+1}return n.push(...t.route.slice(o)),{...t,__replaces_pcb_trace_id:t.pcb_trace_id,route:n}},Ydo=class extends yr{params;inputNewHdRoutes;inputUpdatedPreloadedTraces;movablePreloadedSections;fixedPreloadedObstacleRoutes;syntheticConnectionNames;exactRepairSolver;drcEvaluator;cachedReferenceDrcEvaluator;referenceDrcValidationCount=0;referenceDrcFalseNegativeCount=0;indexedDrcEvaluationCount=0;indexedDrcCacheHitCount=0;indexedDrcEvaluationTimeMs=0;indexedDrcCandidateCache=new Map;combinedOutput;cacheIndexedDrcResult(e,n){if(this.indexedDrcCandidateCache.size>=64){const o=this.indexedDrcCandidateCache.keys().next().value;o!==void 0&&this.indexedDrcCandidateCache.delete(o)}this.indexedDrcCandidateCache.set(e,n)}constructor(e){super(),this.params=e,this.inputNewHdRoutes=e.newHdRoutes,this.inputUpdatedPreloadedTraces=e.updatedPreloadedTraces;const n=e.updatedPreloadedTraces.filter(J=>e.mutatedPreloadedTraceIds.has(J.pcb_trace_id)),o=jSe({connections:e.newConnections,originalConnections:e.originalSrj.connections,layerCount:e.layerCount,obstacles:e.obstacles,defaultViaHoleDiameter:e.defaultViaHoleDiameter,connMap:e.connMap}),i=o(e.newHdRoutes),r=new Set(i.map(J=>J.pcb_trace_id)),s=(({originalPreloadedTraces:J,mutatedPreloadedTraces:oe,newTraces:ie})=>{const ne=new Set(ie.map(ue=>ue.pcb_trace_id)),le=new Map(oe.map(ue=>[ue.pcb_trace_id,ue])),ge=new Set([...J.map(ue=>ue.pcb_trace_id),...ne]),_e=new Map;return{routedTraces:[...J.filter(ue=>ne.has(ue.pcb_trace_id)).map(ue=>{const fe=le.get(ue.pcb_trace_id)??ue,pe=`${ue.pcb_trace_id}_preloaded`;let ye=pe,Me=2;for(;ge.has(ye);)ye=`${pe}_${Me}`,Me+=1;return ge.add(ye),_e.set(ye,ue.pcb_trace_id),{...fe,pcb_trace_id:ye,__replaces_pcb_trace_id:ue.pcb_trace_id}}),...oe.filter(ue=>!ne.has(ue.pcb_trace_id)),...ie],originalPreloadedTraceIdByPreparedTraceId:_e}})({originalPreloadedTraces:e.originalSrj.traces??[],mutatedPreloadedTraces:n,newTraces:i}),a=e.originalSrj.minTraceToPadEdgeClearance??hQe.traceClearance??.1,A=hQe.viaClearance,c=_Qe({inputSrj:e.originalSrj,srjWithPointPairs:e.srjWithPointPairs,routedTraces:[],drcOptions:{traceClearance:a}}),l=new Set((e.originalSrj.traces??[]).map(J=>J.pcb_trace_id)),u=R7({errors:c.errors,circuitJson:c.circuitJson,evaluatedTraceIds:l}),g=R7({errors:c.errorsWithCenters,circuitJson:c.circuitJson,evaluatedTraceIds:l}),h=_Qe({inputSrj:e.originalSrj,srjWithPointPairs:e.srjWithPointPairs,routedTraces:s.routedTraces,drcOptions:{traceClearance:a}}),d=new Set(mQe(e.originalSrj.traces??[],s.routedTraces).map(J=>J.pcb_trace_id)),p=R7({errors:h.errors,circuitJson:h.circuitJson,evaluatedTraceIds:d}),m=R7({errors:h.errorsWithCenters,circuitJson:h.circuitJson,evaluatedTraceIds:d}),_={...h,errors:SH({errors:p,baselineErrors:u,originalTraceIdByPreparedTraceId:s.originalPreloadedTraceIdByPreparedTraceId}),errorsWithCenters:SH({errors:m,baselineErrors:g,originalTraceIdByPreparedTraceId:s.originalPreloadedTraceIdByPreparedTraceId})},f=(({errors:J,circuitJson:oe})=>{const ie=new Map(oe.flatMap(le=>le.type==="pcb_via"&&typeof le.pcb_via_id=="string"&&typeof le.pcb_trace_id=="string"?[[le.pcb_via_id,le.pcb_trace_id]]:[])),ne=new Set;for(const le of J){const ge=typeof le.pcb_trace_id=="string"?le.pcb_trace_id:void 0,_e=[...typeof le.pcb_via_id=="string"?[le.pcb_via_id]:[],...Array.isArray(le.pcb_via_ids)?le.pcb_via_ids.filter(fe=>typeof fe=="string"):[]];if(typeof le.pcb_trace_id=="string"&&ne.add(le.pcb_trace_id),Array.isArray(le.pcb_trace_ids))for(const fe of le.pcb_trace_ids)typeof fe=="string"&&ne.add(fe);if(typeof le.pcb_via_id=="string"){const fe=ie.get(le.pcb_via_id);fe&&ne.add(fe)}if(Array.isArray(le.pcb_via_ids))for(const fe of le.pcb_via_ids){if(typeof fe!="string")continue;const pe=ie.get(fe);pe&&ne.add(pe)}const ue=ge?`overlap_${ge}_`:void 0;if(ue&&typeof le.pcb_trace_error_id=="string"&&le.pcb_trace_error_id.startsWith(ue)){const fe=le.pcb_trace_error_id.slice(ue.length);_e.includes(fe)||ne.add(fe)}}return ne})({errors:_.errors,circuitJson:_.circuitJson}),I=new Map(e.updatedPreloadedTraces.map(J=>[J.pcb_trace_id,J])),C=new Set;for(const J of f){const oe=s.originalPreloadedTraceIdByPreparedTraceId.get(J);oe&&I.has(oe)?C.add(oe):!r.has(J)&&I.has(J)&&C.add(J)}for(const J of kdo({errorsWithCenters:_.errorsWithCenters,traces:e.updatedPreloadedTraces,layerCount:e.layerCount,defaultViaDiameter:e.defaultViaDiameter,connMap:e.connMap}))C.add(J);this.movablePreloadedSections=[];for(const J of C){const oe=I.get(J);if(!oe)throw new Error(`Pipeline9 cannot find preloaded trace "${J}" selected for exact repair`);const ie=e.updatedPreloadedTraces.findIndex(le=>le.pcb_trace_id===J),ne=Hdo({trace:oe,traceIndex:ie,layerCount:e.layerCount,defaultViaDiameter:e.defaultViaDiameter,connMap:e.connMap});for(const[le,ge]of ne.entries()){const _e=`pipeline9_preloaded_drc_${this.movablePreloadedSections.length}`;this.movablePreloadedSections.push({originalTrace:oe,originalRoutePositionStart:ge.routePositionStart,originalRoutePositionEnd:ge.routePositionEnd,syntheticConnectionName:_e,evaluationTraceId:`${oe.pcb_trace_id}__pipeline9_section_${le}`,hdRoute:Ldo({trace:oe,sectionGroup:ge,syntheticConnectionName:_e,connMap:e.connMap})})}}this.syntheticConnectionNames=new Set(this.movablePreloadedSections.map(J=>J.syntheticConnectionName));const y=new Set(this.movablePreloadedSections.map(J=>J.originalTrace.pcb_trace_id));this.fixedPreloadedObstacleRoutes=e.updatedPreloadedTraces.flatMap((J,oe)=>{const ie=kv(J,oe,e.layerCount,e.defaultViaDiameter,e.connMap);return y.has(J.pcb_trace_id)?ie.filter(ne=>{const le=ne.preloadedRoutePositionStart;return le!==void 0&&J.route[le]?.route_type==="through_obstacle"}):ie});const x=new Map;for(const[J,oe]of this.movablePreloadedSections.entries()){const ie=oe.originalTrace.pcb_trace_id,ne=x.get(ie)??[];ne.push(J),x.set(ie,ne)}for(const J of(({errors:oe,circuitJson:ie,originalTraceIdByPreparedTraceId:ne})=>{const le=new Map(ie.flatMap(ge=>ge.type==="pcb_via"&&typeof ge.pcb_via_id=="string"&&typeof ge.pcb_trace_id=="string"?[[ge.pcb_via_id,ge.pcb_trace_id]]:[]));return oe.flatMap(ge=>{if(ge.type!=="pcb_via_clearance_error"||!Array.isArray(ge.pcb_via_ids)||typeof ge.actual_clearance!="number"||ge.actual_clearance>=0)return[];const _e=ge.pcb_via_ids.flatMap(ue=>{if(typeof ue!="string")return[];const fe=le.get(ue);return fe?[ne.get(fe)??fe]:[]}).filter((ue,fe,pe)=>pe.indexOf(ue)===fe);return _e.length>0?[_e]:[]})})({errors:_.errors,circuitJson:_.circuitJson,originalTraceIdByPreparedTraceId:s.originalPreloadedTraceIdByPreparedTraceId})){const oe=J.flatMap(le=>x.get(le)??[]).filter((le,ge,_e)=>_e.indexOf(le)===ge);if(oe.length===0)continue;const ie=new Set(oe),ne=Fdo({routes:oe.map(le=>this.movablePreloadedSections[le].hdRoute),otherHdRoutes:[...e.newHdRoutes,...this.fixedPreloadedObstacleRoutes,...this.movablePreloadedSections.flatMap((le,ge)=>ie.has(ge)?[]:[le.hdRoute])],obstacles:e.obstacles,colorMap:e.colorMap,layerCount:e.layerCount,connMap:e.connMap});for(let le=0;le<oe.length;le++)this.movablePreloadedSections[oe[le]].hdRoute=ne[le]}if(this.stats={initialJointDrcIssueCount:_.errors.length,baselineJointDrcIssueCount:c.errors.length,initialJointDrcIssueCountByType:_.errors.reduce((J,oe)=>{const ie=String(oe.type??oe.error_type??"unknown");return J[ie]=(J[ie]??0)+1,J},{}),movablePreloadedTraceCount:y.size,movablePreloadedSectionCount:this.movablePreloadedSections.length,exactRepairConfiguredMaxIterations:32,exactRepairConfiguredViaInPadMaxIterations:32,exactRepairConfiguredBroadMaxIterations:12},_.errors.length===0)return void(this.solved=!0);const E=new Set(this.movablePreloadedSections.map(J=>J.originalTrace.pcb_trace_id)),B=n.filter(J=>!E.has(J.pcb_trace_id)),S=new Map(this.movablePreloadedSections.map(J=>[J.syntheticConnectionName,Odo(J,e.layerCount)])),{traces:Q,...w}=e.srjWithPointPairs,M={...w,connections:[...e.srjWithPointPairs.connections,...S.values()]},k=new fJ({...M,minTraceWidth:e.originalSrj.minTraceWidth,minViaDiameter:e.originalSrj.minViaDiameter??e.defaultViaDiameter},{connMap:e.connMap,traceClearance:a,viaClearance:A,includeTraceViaOwnerMetadata:!0,spatialCellSize:Math.max(e.defaultViaDiameter,e.originalSrj.minTraceWidth)+Math.max(a,A)}),R=k.evaluate(e.originalSrj.traces??[]),F=K6t(e.originalSrj.traces??[]),O={...R,errors:R7({errors:R.errors,circuitJson:F,evaluatedTraceIds:l}),errorsWithCenters:R7({errors:R.errorsWithCenters,circuitJson:F,evaluatedTraceIds:l})};let U;const Y=J=>{const oe=J.filter(ye=>!this.syntheticConnectionNames.has(ye.connectionName)),ie=o(oe),ne=Y7t(ie,e.originalSrj.traces??[]),le=new Set,ge=new Map,_e=this.movablePreloadedSections.map(ye=>{const Me=J.find(Qe=>Qe.connectionName===ye.syntheticConnectionName);if(!Me)throw new Error(`Pipeline9 joint DRC repair lost preloaded section "${ye.syntheticConnectionName}"`);const ve=ye.originalTrace.pcb_trace_id;ge.set(ye.evaluationTraceId,ve);const he=!le.has(ve);return le.add(ve),{...ye.originalTrace,pcb_trace_id:ye.evaluationTraceId,...he?{__replaces_pcb_trace_id:ve}:{__replaces_pcb_trace_id:void 0},route:nB(Me,e.layerCount,{defaultViaHoleDiameter:e.defaultViaHoleDiameter,obstacles:e.obstacles,connMap:e.connMap})}}),ue=new Map;for(let ye=0;ye<ie.length;ye++)ue.set(ne[ye].pcb_trace_id,ie[ye].pcb_trace_id);for(const ye of this.movablePreloadedSections)ue.set(ye.evaluationTraceId,`${ye.syntheticConnectionName}_0`);const fe=new Set(ue.values()),pe=[...B,..._e,...ne];return{evaluatedTraces:mQe(e.originalSrj.traces??[],pe),movableTraceIds:fe,originalTraceIdByEvaluationTraceId:ge,routedTraces:pe,solverTraceIdByEvaluationTraceId:ue}},W=({errors:J,errorsWithCenters:oe,circuitJson:ie,movableTraceIds:ne,solverTraceIdByEvaluationTraceId:le})=>{const ge=ie.map(_e=>{if(!("pcb_trace_id"in _e)||typeof _e.pcb_trace_id!="string")return _e;const ue=le.get(_e.pcb_trace_id);return ue?{..._e,pcb_trace_id:ue}:_e});return{errors:U6t({errors:z6t(J,le),circuitJson:ge,newTraceIds:ne}),errorsWithCenters:U6t({errors:z6t(oe,le),circuitJson:ge,newTraceIds:ne})}},te=({routes:J,hdRoutes:oe})=>{const ie=J??oe;if(!ie)throw new Error("Pipeline9 cached reference DRC requires HD routes");const ne=JSON.stringify(ie);if(U?.candidateKey===ne)return U.result;this.referenceDrcValidationCount+=1;const le=(({routes:ge,hdRoutes:_e})=>{const ue=ge??_e;if(!ue)throw new Error("Pipeline9 reference DRC repair requires HD routes");const fe=Y(ue),pe=_Qe({inputSrj:e.originalSrj,srjWithPointPairs:e.srjWithPointPairs,routedTraces:fe.routedTraces,drcOptions:{traceClearance:a}}),ye=new Set(fe.evaluatedTraces.map(Pe=>Pe.pcb_trace_id)),Me=R7({errors:pe.errors,circuitJson:pe.circuitJson,evaluatedTraceIds:ye}),ve=R7({errors:pe.errorsWithCenters,circuitJson:pe.circuitJson,evaluatedTraceIds:ye}),he=SH({errors:Me,baselineErrors:u,originalTraceIdByPreparedTraceId:fe.originalTraceIdByEvaluationTraceId}),Qe=SH({errors:ve,baselineErrors:g,originalTraceIdByPreparedTraceId:fe.originalTraceIdByEvaluationTraceId});return W({errors:he,errorsWithCenters:Qe,circuitJson:pe.circuitJson,movableTraceIds:fe.movableTraceIds,solverTraceIdByEvaluationTraceId:fe.solverTraceIdByEvaluationTraceId})})({routes:ie,hdRoutes:ie});return U={candidateKey:ne,result:le},le};this.cachedReferenceDrcEvaluator=te;const j=({routes:J,hdRoutes:oe})=>{const ie=J??oe;if(!ie)throw new Error("Pipeline9 joint DRC repair requires HD routes");const ne=JSON.stringify(ie),le=this.indexedDrcCandidateCache.get(ne);if(le!==void 0)return this.indexedDrcCacheHitCount+=1,le;const ge=performance.now();this.indexedDrcEvaluationCount+=1;const _e=Y(ie),ue=k.evaluate(_e.evaluatedTraces),fe=K6t(_e.evaluatedTraces),pe=new Set(_e.evaluatedTraces.map(Pe=>Pe.pcb_trace_id)),ye=R7({errors:ue.errors,circuitJson:fe,evaluatedTraceIds:pe}),Me=R7({errors:ue.errorsWithCenters,circuitJson:fe,evaluatedTraceIds:pe}),ve=SH({errors:ye,baselineErrors:O.errors,originalTraceIdByPreparedTraceId:_e.originalTraceIdByEvaluationTraceId}),he=SH({errors:Me,baselineErrors:O.errorsWithCenters,originalTraceIdByPreparedTraceId:_e.originalTraceIdByEvaluationTraceId});if(ve.length===0){const Pe=this.referenceDrcValidationCount,we=te({routes:ie,hdRoutes:ie}),Te=Array.isArray(we)?we:we.errors;return this.referenceDrcValidationCount>Pe&&Te.length>0&&(this.referenceDrcFalseNegativeCount+=1),this.indexedDrcEvaluationTimeMs+=performance.now()-ge,this.cacheIndexedDrcResult(ne,we),we}const Qe=W({errors:ve,errorsWithCenters:he,circuitJson:fe,movableTraceIds:_e.movableTraceIds,solverTraceIdByEvaluationTraceId:_e.solverTraceIdByEvaluationTraceId});return this.indexedDrcEvaluationTimeMs+=performance.now()-ge,this.cacheIndexedDrcResult(ne,Qe),Qe};this.drcEvaluator=j,this.exactRepairSolver=new mdo({srj:M,hdRoutes:[...e.newHdRoutes,...this.movablePreloadedSections.map(J=>J.hdRoute)],connMap:e.connMap,effort:e.effort,viaHoleDiameter:e.defaultViaHoleDiameter,drcEvaluator:j,viaInPadDrcEvaluator:j,maxIterations:32,enableBroadFallback:!1,enableLargeBoardBroadFallback:!1,enableTargetedErrorSweep:!0,enableTraceViaOwnerTargeting:!0,enablePostSolveClearanceRelaxation:!1,enableSafeTraceLayerMoves:!0,enableViaInPadLayerMoves:e.originalSrj.allowViaInPad??!1,viaInPadMaxIterations:32,broadMaxIterations:12,broadPassMultiplier:3}),this.activeSubSolver=this.exactRepairSolver,this.MAX_ITERATIONS=this.exactRepairSolver.MAX_ITERATIONS+1}getSolverName(){return"Pipeline9JointDrcRepairSolver"}_step(){if(!this.exactRepairSolver)return void(this.solved=!0);if(this.exactRepairSolver.step(),this.progress=this.exactRepairSolver.progress,this.exactRepairSolver.failed)return this.failed=!0,void(this.error=this.exactRepairSolver.error);if(!this.exactRepairSolver.solved)return;const e=this.exactRepairSolver.getOutput(),n=this.exactRepairSolver.stats.finalDrcIssueCount,o=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,i=o===void 0||o<=16;let r;if(i){const c=this.cachedReferenceDrcEvaluator({traces:[],routes:e,hdRoutes:e}),l=Array.isArray(c)?c:c.errors;if(r=l.length,l.length===0)return this.combinedOutput=e,this.stats={...this.stats,...this.exactRepairSolver.stats,postExactIndexedDrcIssueCount:o,postExactPrecisionPassMaxIndexedIssueCount:16,postExactPrecisionPassAttempted:!0,postExactReferenceValidationAttempted:!0,postExactReferenceValidationSkippedForIndexedIssueCount:!1,postExactReferenceDrcIssueCount:0,postExactReferenceAccepted:!0,regionalB01RepairCandidateCount:0,regionalB01RepairAcceptedCount:0,regionalB01RepairFallbackCandidateCount:0,regionalB01RepairCandidateSearchCount:0,regionalB01RepairCandidateSearchBudget:0,regionalB01RepairCandidateSearchBudgetExhausted:!1,regionalB01RepairSafeTraceLayerSkippedForBudget:!1,regionalB01RepairRemainingDrcIssueCount:0,regionalB01RepairPreloadEligibleDrcIssueCount:0,regionalB01RepairAttempted:!1,regionalB01RepairTraceIdCount:0,terminalEscapeSkippedForIndexedIssueCount:!1,terminalEscapeCandidateCount:0,terminalEscapeAcceptedCount:0,referenceDrcValidationCount:this.referenceDrcValidationCount,referenceDrcFalseNegativeCount:this.referenceDrcFalseNegativeCount,indexedDrcEvaluationCount:this.indexedDrcEvaluationCount,indexedDrcCacheHitCount:this.indexedDrcCacheHitCount,indexedDrcEvaluationTimeMs:this.indexedDrcEvaluationTimeMs,indexedDrcCandidateCacheSize:this.indexedDrcCandidateCache.size,indexedDrcCandidateCacheCapacity:64},void(this.solved=!0)}const s=i?Rdo({srj:this.params.srj,routes:e,newConnections:this.params.newConnections,syntheticConnectionNames:this.syntheticConnectionNames,drcEvaluator:this.drcEvaluator}):{routes:e,attemptedCandidateCount:0,acceptedCandidateCount:0,remainingErrors:DN(this.drcEvaluator,e)},a=(({routes:c,newConnections:l,syntheticConnectionNames:u,fixedPreloadedObstacleRoutes:g,updatedPreloadedTraces:h})=>{const d=new Set,p=Object.assign(new Set,{collidingFixedTraceIds:d}),m=fQe({routes:c,newConnections:l,syntheticConnectionNames:u}),_=new Set;for(const[f,I]of m)u.has(c[I].connectionName)?p.add(f):_.add(f);for(const f of g){const I=h[f.preloadedTraceIndex];if(!I)throw new Error(`Pipeline9 fixed preload route has invalid trace index ${f.preloadedTraceIndex}`);_.has(I.pcb_trace_id)?d.add(I.pcb_trace_id):p.add(I.pcb_trace_id)}return p})({routes:s.routes,newConnections:this.params.newConnections,syntheticConnectionNames:this.syntheticConnectionNames,fixedPreloadedObstacleRoutes:this.fixedPreloadedObstacleRoutes,updatedPreloadedTraces:this.params.updatedPreloadedTraces}),A=bdo({srj:this.params.srj,routes:s.routes,fixedObstacleRoutes:this.fixedPreloadedObstacleRoutes,newConnections:this.params.newConnections,syntheticConnectionNames:this.syntheticConnectionNames,drcEvaluator:this.drcEvaluator,initialErrors:s.remainingErrors,preloadRepairTraceIds:a,connMap:this.params.connMap,colorMap:this.params.colorMap,viaDiameter:this.params.defaultViaDiameter,traceWidth:this.params.srj.minTraceWidth,obstacleMargin:this.params.srj.defaultObstacleMargin??this.params.srj.minTraceToPadEdgeClearance??.15,effort:this.params.effort});this.combinedOutput=A.routes,this.stats={...this.stats,...this.exactRepairSolver.stats,postExactIndexedDrcIssueCount:o,postExactPrecisionPassMaxIndexedIssueCount:16,postExactPrecisionPassAttempted:i,postExactReferenceValidationAttempted:i,postExactReferenceValidationSkippedForIndexedIssueCount:!i,postExactReferenceDrcIssueCount:r,postExactReferenceAccepted:!1,regionalB01RepairCandidateCount:A.attemptedCandidateCount,regionalB01RepairAcceptedCount:A.acceptedCandidateCount,regionalB01RepairFallbackCandidateCount:A.fallbackCandidateCount,regionalB01RepairCandidateSearchCount:A.candidateSearchCount,regionalB01RepairCandidateSearchBudget:A.candidateSearchBudget,regionalB01RepairCandidateSearchBudgetExhausted:A.candidateSearchBudgetExhausted,regionalB01RepairSafeTraceLayerSkippedForBudget:A.safeTraceLayerRepairSkippedForBudget,regionalB01RepairRemainingDrcIssueCount:A.remainingDrcIssueCount,regionalB01RepairPreloadEligibleDrcIssueCount:A.preloadEligibleDrcIssueCount,regionalB01RepairAttempted:A.preloadRepairAttempted,regionalB01RepairTraceIdCount:a.size+(a.collidingFixedTraceIds?.size??0),terminalEscapeSkippedForIndexedIssueCount:!i,terminalEscapeCandidateCount:s.attemptedCandidateCount,terminalEscapeAcceptedCount:s.acceptedCandidateCount,referenceDrcValidationCount:this.referenceDrcValidationCount,referenceDrcFalseNegativeCount:this.referenceDrcFalseNegativeCount,indexedDrcEvaluationCount:this.indexedDrcEvaluationCount,indexedDrcCacheHitCount:this.indexedDrcCacheHitCount,indexedDrcEvaluationTimeMs:this.indexedDrcEvaluationTimeMs,indexedDrcCandidateCacheSize:this.indexedDrcCandidateCache.size,indexedDrcCandidateCacheCapacity:64},this.solved=!0}getCombinedOutput(){return this.combinedOutput??this.exactRepairSolver?.getOutput()??this.inputNewHdRoutes}getOutput(){return this.getCombinedOutput().filter(e=>!this.syntheticConnectionNames.has(e.connectionName))}getUpdatedPreloadedTraces(){const e=new Map(this.getCombinedOutput().map(i=>[i.connectionName,i])),n=new Map;for(const i of this.movablePreloadedSections){const r=e.get(i.syntheticConnectionName);if(!r)throw new Error(`Pipeline9 joint DRC repair output is missing "${i.syntheticConnectionName}"`);const s=i.originalTrace.pcb_trace_id,a=n.get(s)??[];a.push({routePositionStart:i.originalRoutePositionStart,routePositionEnd:i.originalRoutePositionEnd,route:nB(r,this.params.layerCount,{defaultViaHoleDiameter:this.params.defaultViaHoleDiameter,obstacles:this.params.obstacles,connMap:this.params.connMap})}),n.set(s,a)}const o=new Map([...n].map(([i,r])=>{const s=this.inputUpdatedPreloadedTraces.find(a=>a.pcb_trace_id===i);if(!s)throw new Error(`Pipeline9 cannot find preloaded trace "${i}" while rebuilding repaired sections`);return[i,Gdo({originalTrace:s,repairedSections:r})]}));return this.inputUpdatedPreloadedTraces.map(i=>o.get(i.pcb_trace_id)??i)}getMutatedPreloadedTraces(){const e=new Set([...this.params.mutatedPreloadedTraceIds,...this.movablePreloadedSections.map(n=>n.originalTrace.pcb_trace_id)]);return this.getUpdatedPreloadedTraces().filter(n=>e.has(n.pcb_trace_id))}visualize(){return this.exactRepairSolver?.visualize()??{}}},J6t=1e-6,W6t=(t,e,n)=>{const o=Kr(t,n),i=Kr(e,n);return Array.from({length:Math.abs(i-o)+1},(r,s)=>Math.min(o,i)+s)},j6t=t=>t.route_type==="wire",Udo=(t,e,n)=>t.portPoints.filter(o=>o.availableZ.includes(n)&&!(o._preloadedTracePortAssignments??[]).some(i=>i.z===n&&i.fixedNetId!==e.fixedNetId)).map(o=>({portPoint:o,distance:wc(o,e.start,e.end)})).sort((o,i)=>o.distance-i.distance||o.portPoint.distToCentermostPortOnZ-i.portPoint.distToCentermostPortOnZ||o.portPoint.segmentPortPointId.localeCompare(i.portPoint.segmentPortPointId))[0]?.portPoint,Kdo=(t,e,n)=>{t._preloadedFixedNetIds=[...new Set([...t._preloadedFixedNetIds??[],e.fixedNetId])].sort();const o=e.end.x-e.start.x,i=e.end.y-e.start.y,r=o*o+i*i,s=r===0?0:Math.max(0,Math.min(1,((t.x-e.start.x)*o+(t.y-e.start.y)*i)/r)),a={traceId:e.traceId,fixedNetId:e.fixedNetId,routePosition:e.routePositionStart+s*(e.routePositionEnd-e.routePositionStart),tracePoint:{x:e.start.x+s*o,y:e.start.y+s*i},z:n},A=t._preloadedTracePortAssignments??[];A.some(c=>c.traceId===a.traceId&&c.fixedNetId===a.fixedNetId&&c.z===a.z&&Math.abs(c.routePosition-a.routePosition)<=J6t)||(t._preloadedTracePortAssignments=[...A,a].sort((c,l)=>c.traceId.localeCompare(l.traceId)||c.routePosition-l.routePosition||c.z-l.z))},Vdo=class extends yr{constructor(e,n){super(),this.sharedEdgeSegments=e,this.srj=n,this.MAX_ITERATIONS=1,this.primitives=(o=>{const i=[],r=Jm(o);for(const s of o.traces??[]){if(!s.connection_name)throw new Error(`Preloaded trace "${s.pcb_trace_id}" is missing a connection name`);const a=r.getNetConnectedToId(s.connection_name)??s.connection_name;for(const[A,c]of s.route.entries())if(c.route_type==="via")i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A,routePositionEnd:A,zLayers:W6t(c.from_layer,c.to_layer,o.layerCount),start:c,end:c});else if(c.route_type==="through_obstacle")i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A,routePositionEnd:A+1,zLayers:W6t(c.from_layer,c.to_layer,o.layerCount),start:c.start,end:c.end});else if(c.route_type==="jumper"){const l=Kr(c.layer,o.layerCount);for(const[u,g]of[c.start,c.end].entries())i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A+u,routePositionEnd:A+u,zLayers:[l],start:g,end:g})}for(let A=0;A<s.route.length-1;A++){const c=s.route[A],l=s.route[A+1];j6t(c)&&j6t(l)&&c.layer===l.layer&&i.push({traceId:s.pcb_trace_id,fixedNetId:a,connectionName:s.connection_name,routePositionStart:A,routePositionEnd:A+1,zLayers:[Kr(c.layer,o.layerCount)],start:c,end:l})}}return i})(n)}sharedEdgeSegments;srj;primitives;getSolverName(){return"PreloadedTraceGraphSolver"}_step(){for(const o of this.primitives)for(const i of this.sharedEdgeSegments)if(!(qQ(o.start,o.end,i.start,i.end)>J6t))for(const r of o.zLayers){if(!i.availableZ.includes(r))continue;const s=Udo(i,o,r);s&&Kdo(s,o,r)}const e=this.sharedEdgeSegments.flatMap(o=>o.portPoints),n=e.filter(o=>(o._preloadedFixedNetIds?.length??0)>0);this.stats={preloadedTraceCount:this.srj.traces?.length??0,preloadedTraceShapeCount:this.primitives.length,inputBoundaryCount:this.sharedEdgeSegments.length,outputBoundaryCount:this.sharedEdgeSegments.length,inputPortCount:e.length,outputPortCount:e.length,preloadedPortCount:n.length,tracePortAssignmentCount:n.reduce((o,i)=>o+(i._preloadedTracePortAssignments?.length??0),0),topologyChanged:!1},this.solved=!0}getOutput(){if(!this.solved)throw new Error("PreloadedTraceGraphSolver has not solved yet");return this.sharedEdgeSegments}},zdo=class extends XAe{_step(){const{traces:e,...n}=this.inputSrj,o=mN(n),i=mN(e9t(r9t(o)));this.outputSrj=e===void 0?i:{...i,traces:e},this.solved=!0}};function $6t(t){return new Set((t??[]).filter(e=>e._isComponentTopologyNode).map(e=>e.capacityMeshNodeId))}function q6t(t,e){return t.nodeIds.some(n=>e.has(n))}function Jdo({sharedEdgeSegments:t,componentCapacityMeshNodeIds:e}){return t.filter(n=>!q6t(n,e))}function oh(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var X6t=class extends yr{constructor(e,n={}){super(),this.srj=e,this.opts=n;const o=mN(e);this.originalSrj=o,this.opts={...n};const i=this.opts;if(this.effort=i.effort??1,this.MAX_ITERATIONS=1e8*this.effort,this.maxNodeDimension=i.maxNodeDimension??15,this.maxNodeRatio=i.maxNodeRatio??6,this.minNodeArea=i.minNodeArea??.1**2,this.visualizationTraceColorMode=i.visualizationTraceColorMode??"layer",this.setSimpleRouteJson(o),i.capacityDepth===void 0){const r=this.srj.bounds.maxX-this.srj.bounds.minX,s=this.srj.bounds.maxY-this.srj.bounds.minY,a=Math.max(r,s),A=i.targetMinCapacity??.5;i.capacityDepth=$Q(a,A)}this.cacheProvider=i.cacheProvider===void 0?tB():i.cacheProvider===null?null:i.cacheProvider,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={}}srj;opts;getSolverName(){return"AutoroutingPipelineSolver9_PreloadedTraceGraph"}preprocessSimpleRouteJsonSolver;escapeViaLocationSolver;netToPointPairsSolver;componentTopologyGeneratorSolver;topologyPlanningSolver;topologyMergingSolver;globalTopologyGeneratorSolver;nodeDimensionSubdivisionSolver;nodeTargetMerger;edgeSolver;colorMap;highDensityRouteSolver;highDensityForceImproveSolver;highDensityRepairSolver;highDensityStitchSolver;globalDrcForceImproveSolver;pipeline9JointDrcRepairSolver;singleLayerNodeMerger;strawSolver;deadEndSolver;traceSimplificationSolver;mutatedPreloadedTraceSimplificationSolver;lengthMatchingPostProcessingSolver;powerTraceExpansionSolver;availableSegmentPointSolver;portPointPathingSolver;multiSectionPortPointOptimizer;uniformPortDistributionSolver;traceWidthSolver;necessaryCrampedPortPointSolver;preloadedTraceGraphSolver;componentDetectionSolver;viaDiameter;viaHoleDiameter;minTraceWidth;effort;maxNodeDimension;maxNodeRatio;minNodeArea;visualizationTraceColorMode;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;activeSubSolver=null;connMap;srjWithEscapeViaLocations;srjWithPointPairs;originalSrj;capacityNodes=null;capacityEdges=null;sharedEdgeSegmentsWithNecessaryCrampedPortPoints;highDensityNodePortPoints;cacheProvider=null;pipelineDef=[oh("preprocessSimpleRouteJsonSolver",zdo,e=>[e.originalSrj,{traceColorMode:e.visualizationTraceColorMode}],{onSolved:e=>{e.setSimpleRouteJson(e.preprocessSimpleRouteJsonSolver.getOutputSimpleRouteJson())}}),oh("componentDetectionSolver",n7t,e=>[{inputSrj:e.srj}]),oh("escapeViaLocationSolver",FAe,e=>[e.srj,{viaDiameter:e.viaDiameter,minTraceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15}],{onSolved:e=>{e.srjWithEscapeViaLocations=e.escapeViaLocationSolver?.getOutputSimpleRouteJson()}}),oh("netToPointPairsSolver",rL,e=>{const n=e.srjWithEscapeViaLocations??e.srj;return[n,e.colorMap,JQ(n)]},{onSolved:e=>{e.srjWithPointPairs=e.netToPointPairsSolver?.getNewSimpleRouteJson(),e.colorMap=Jf(e.srjWithPointPairs,e.connMap),e.connMap=Jm(e.srjWithPointPairs)}}),oh("topologyPlanningSolver",l7t,e=>[{inputSrj:e.srjWithPointPairs,componentDetectionOutput:e.componentDetectionSolver.getOutput(),viaDiameter:e.viaDiameter,obstacleMargin:e.srj.defaultObstacleMargin??.15}],{onSolved:e=>{e.topologyPlanningSolver.getOutput(),e.globalTopologyGeneratorSolver=e.topologyPlanningSolver.globalTopologySolver,e.componentTopologyGeneratorSolver=new u7t(e.topologyPlanningSolver)}}),oh("topologyMergingSolver",c7t,e=>{const n=e.topologyPlanningSolver.getOutput();return[{layerCount:e.srj.layerCount,nodeGroups:[{groupId:"global",nodes:n.globalMeshNodes,isComponent:!1},...n.componentMeshNodes.map((o,i)=>({groupId:`component-${i}`,nodes:o,isComponent:!0}))]}]},{onSolved:e=>{e.capacityNodes=e.topologyMergingSolver.getOutput()}}),oh("nodeDimensionSubdivisionSolver",vAe,e=>[e.capacityNodes,e.maxNodeDimension,e.maxNodeRatio,e.minNodeArea],{onSolved:e=>{e.capacityNodes=e.nodeDimensionSubdivisionSolver.outputNodes}}),oh("edgeSolver",WQ,e=>[e.capacityNodes],{onSolved:e=>{e.capacityEdges=e.edgeSolver?.edges}}),oh("availableSegmentPointSolver",kD,e=>[{nodes:e.capacityNodes,edges:e.capacityEdges||[],traceWidth:e.minTraceWidth,colorMap:e.colorMap,shouldReturnCrampedPortPoints:!0}]),oh("necessaryCrampedPortPointSolver",lJ,e=>{const n=$6t(e.capacityNodes);return[{capacityMeshNodes:e.capacityNodes.filter(o=>!n.has(o.capacityMeshNodeId)),sharedEdgeSegments:Jdo({sharedEdgeSegments:e.availableSegmentPointSolver.getOutput(),componentCapacityMeshNodeIds:n}),simpleRouteJson:e.srjWithPointPairs}]},{onSolved:e=>{const n=$6t(e.capacityNodes);e.sharedEdgeSegmentsWithNecessaryCrampedPortPoints=(function({originalSharedEdgeSegments:o,filteredSharedEdgeSegments:i,componentCapacityMeshNodeIds:r}){const s=new Map(i.map(a=>[a.edgeId,a]));return o.map(a=>q6t(a,r)?a:s.get(a.edgeId)??a)})({originalSharedEdgeSegments:e.availableSegmentPointSolver.getOutput(),filteredSharedEdgeSegments:e.necessaryCrampedPortPointSolver.getOutput(),componentCapacityMeshNodeIds:n})}}),oh("preloadedTraceGraphSolver",Vdo,e=>[e.sharedEdgeSegmentsWithNecessaryCrampedPortPoints,e.srjWithPointPairs]),oh("portPointPathingSolver",kAe,e=>{const n=e.sharedEdgeSegmentsWithNecessaryCrampedPortPoints??e.necessaryCrampedPortPointSolver?.getOutput()??e.availableSegmentPointSolver.getOutput(),{graph:o,connections:i}=uJ({capacityMeshNodes:e.capacityNodes,layerCount:e.srj.layerCount,connectivityMap:e.connMap,segmentPortPoints:n.flatMap(r=>r.portPoints),simpleRouteJsonConnections:e.srjWithPointPairs.connections});return[{graph:o,connections:i,layerCount:e.srj.layerCount,effort:e.effort,preserveTerminalPcbPortIds:!0,minViaPadDiameter:e.viaDiameter,flags:{FORCE_CENTER_FIRST:!0,RIPPING_ENABLED:!0,USE_SELECTIVE_RERIP_ROUTING:!0,USE_PARTIAL_RIP_ROUTING_WITH_PRELOADED_TRACES:!0},weights:{SHUFFLE_SEED:0,MEMORY_PF_FACTOR:4,CENTER_OFFSET_DIST_PENALTY_FACTOR:0,CENTER_OFFSET_FOCUS_SHIFT:0,NODE_PF_FACTOR:0,LAYER_CHANGE_COST:0,RIPPING_PF_COST:0,NODE_PF_MAX_PENALTY:100,BASE_CANDIDATE_COST:.6,MAX_ITERATIONS_PER_PATH:0,RANDOM_WALK_DISTANCE:0,START_RIPPING_PF_THRESHOLD:.3,END_RIPPING_PF_THRESHOLD:1,MAX_RIPS:1e3,RANDOM_RIP_FRACTION:.3,STRAIGHT_LINE_DEVIATION_PENALTY_FACTOR:4,GREEDY_MULTIPLIER:.7,MIN_ALLOWED_BOARD_SCORE:-1e4}}]}),oh("uniformPortDistributionSolver",kz,e=>[{nodeWithPortPoints:e.portPointPathingSolver?.getOutput().nodesWithPortPoints??[],inputNodesWithPortPoints:e.portPointPathingSolver?.getOutput().inputNodeWithPortPoints??[],minTraceWidth:e.minTraceWidth,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount}]),oh("highDensityRouteSolver",sQe,e=>{const n=e.portPointPathingSolver;if(!n)throw new Error("Pipeline9 invariant violated: high-density routing requires the completed port-point pathing solver");const o=n.getOutput(),i=e.uniformPortDistributionSolver?.getOutput()??[],r=o.nodesWithPortPoints,s=i.length>0?i:r;e.highDensityNodePortPoints=structuredClone(s);const a=(e.originalSrj.traces??[]).flatMap((A,c)=>kv(A,c,e.originalSrj.layerCount,e.viaDiameter,e.connMap));return[{nodePortPoints:s,fixedHdRoutes:z7t({traces:e.originalSrj.traces??[],fixedHdRoutes:a,sections:e.getChangedPreloadedTraceSections()}),connMap:e.connMap,colorMap:e.colorMap,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount,viaDiameter:e.viaDiameter,traceWidth:e.minTraceWidth,obstacleMargin:e.srj.defaultObstacleMargin??.15,viaToPadClearance:e.srj.minViaEdgeToPadEdgeClearance,effort:e.effort,includeBoardObstacles:!0,nodePfById:new Map(o.inputNodeWithPortPoints.map(A=>[A.capacityMeshNodeId,n.computeNodePf(A)])),preserveTerminalPcbPortIds:!0}]}),oh("highDensityForceImproveSolver",mJ,e=>[{nodeWithPortPoints:e.highDensityNodePortPoints??[],hdRoutes:J7t(e.highDensityRouteSolver.routes),colorMap:e.colorMap,totalStepsPerNode:Math.max(12,Math.round(20*e.effort)),nodeAssignmentMargin:e.srj.defaultObstacleMargin??.2}]),oh("highDensityRepairSolver",pW,e=>[{nodeWithPortPoints:e.highDensityNodePortPoints??[],hdRoutes:e.highDensityForceImproveSolver?.getOutput()??e.highDensityRouteSolver.routes,obstacles:e.srj.obstacles,colorMap:e.colorMap,repairMargin:e.srj.defaultObstacleMargin??.2,maxSampleEntries:80}]),oh("highDensityStitchSolver",$Ae,e=>[{connections:[...e.srjWithPointPairs.connections,...e.getChangedPreloadedTraceSections().map(n=>n.connection)],hdRoutes:e.highDensityRepairSolver?.getOutput()??e.highDensityForceImproveSolver?.getOutput()??e.highDensityRouteSolver.routes,colorMap:e.colorMap,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter,preserveTerminalPcbPortIds:!0,preferSameLayerTerminalEndpoints:!0}]),oh("traceSimplificationSolver",j8,e=>{const n=e.getPreloadedTraceUpdatesAfterHighDensity().updatedPreloadedTraces.flatMap((s,a)=>kv(s,a,e.originalSrj.layerCount,e.viaDiameter,e.connMap)),o=new Set(e.getChangedPreloadedTraceSections().map(s=>s.connectionName)),i=e.highDensityStitchSolver.mergedHdRoutes.filter(s=>!o.has(s.connectionName)),r=XSe([...i,...n],e.connMap);return[{hdRoutes:i,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,minTraceToPadEdgeClearance:e.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:e.srj.minBoardEdgeClearance,otherHdRoutes:n,netByConnectionName:r,enableCrossingViaReduction:!0,terminalLayerIndicesByPcbPortId:vgo(e.srj.connections,e.srj.obstacles,e.srj.layerCount),iterations:2}]}),oh("mutatedPreloadedTraceSimplificationSolver",j8,e=>{const n=e.getPreparedMutatedPreloadedTraceSections(),o=n.sections.map(r=>r.hdRoute),i=[...n.immutableHdRoutes,...e.traceSimplificationSolver.simplifiedHdRoutes];return[{hdRoutes:o,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,outline:e.srj.outline,defaultViaDiameter:e.viaDiameter,layerCount:e.srj.layerCount,minTraceToPadEdgeClearance:e.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:e.srj.minBoardEdgeClearance,otherHdRoutes:i,netByConnectionName:XSe([...o,...i],e.connMap),enableCrossingViaReduction:!0,preserveRouteEndpoints:!0,iterations:2}]}),oh("traceWidthSolver",aL,e=>[{hdRoutes:e.traceSimplificationSolver.simplifiedHdRoutes,obstacles:e.srj.obstacles,connMap:e.connMap,colorMap:e.colorMap,minTraceWidth:e.minTraceWidth,connection:e.srjWithPointPairs.connections,obstacleMargin:e.srj.minTraceToPadEdgeClearance??.15,layerCount:e.srj.layerCount}]),oh("globalDrcForceImproveSolver",S7,e=>[{srj:e.getSrjWithMaterializedPreloadedTraces(),hdRoutes:N7t(e.traceWidthSolver.getHdRoutesWithWidths(),e.netToPointPairsSolver?.newConnections??[],new Map((e.highDensityStitchSolver?.mergedHdRoutes??[]).map(n=>[n.connectionName,n]))),connMap:e.connMap,effort:e.effort,maxIterations:16,enableLargeBoardBroadFallback:!1,enablePostSolveClearanceRelaxation:!1}]),oh("pipeline9JointDrcRepairSolver",Ydo,e=>{const n=e.getPreloadedTraceUpdatesAfterHighDensity(),o=e.getSrjWithMaterializedPreloadedTraces();return[{srj:o,srjWithPointPairs:o,originalSrj:e.originalSrj,newConnections:e.netToPointPairsSolver?.newConnections??[],newHdRoutes:e.globalDrcForceImproveSolver.getOutput(),updatedPreloadedTraces:n.updatedPreloadedTraces,mutatedPreloadedTraceIds:new Set(n.mutatedPreloadedTraces.map(i=>i.pcb_trace_id)),connMap:e.connMap,obstacles:e.srj.obstacles,layerCount:e.srj.layerCount,defaultViaDiameter:e.viaDiameter,defaultViaHoleDiameter:e.viaHoleDiameter,effort:e.effort,colorMap:e.colorMap}]}),oh("lengthMatchingPostProcessingSolver",Bgo,e=>{const n=e.netToPointPairsSolver;if(!n)throw new Error("Pipeline9: length-matching post-processing requires NetToPointPairsSolver output");const o=n.newConnections,i=new Map;for(const a of e.srj.differentialPairs??[])for(const A of a.connectionNames){const c=o.filter(l=>l.name===A||l.__rootConnectionNames?.includes(A)||l.__netConnectionName===A);if(c.length!==1)throw new Error(`Pipeline9: differential pair connection "${A}" must resolve to exactly one final point-pair connection, got ${c.length}`);i.set(A,c[0].name)}const r=e.pipeline9JointDrcRepairSolver.getOutput(),s=(e.srj.differentialPairs??[]).map(a=>{const A=a.connectionNames.map(u=>{const g=i.get(u);if(!g)throw new Error(`Pipeline9: differential pair connection "${u}" is missing from final routed output`);return g});if(A[0]===A[1])throw new Error(`Pipeline9: differential pair ${a.connectionNames.join("/")} resolves both members to "${A[0]}"`);if(a.traceGap===void 0)return{connectionNames:A,lengthTolerance:a.lengthTolerance};const c=A.map(u=>{const g=r.filter(h=>h.connectionName===u);if(g.length!==1)throw new Error(`Pipeline9: differential pair connection "${u}" must resolve to exactly one final HD route, got ${g.length}`);return g[0]}),l=a.traceGap+c.reduce((u,g)=>u+g.traceThickness/2,0);return{connectionNames:A,lengthTolerance:a.lengthTolerance,minimumCenterlineDistance:l,maximumCenterlineDistance:l}});return[{hdRoutes:r,differentialPairs:s,buses:e.srj.buses??[],connections:e.srj.connections,obstacles:e.srj.obstacles,bounds:e.srj.bounds,layerCount:e.srj.layerCount,obstacleMargin:e.srj.minTraceToPadEdgeClearance??.15}]}),oh("powerTraceExpansionSolver",P7t,e=>{const n=e.opts.powerTraceExpansion??{},o=n.onlyConnectionNames??D7t(e.originalSrj);return[R7t({originalSrj:e.originalSrj,newlyRoutedTraces:e.getNewTracesBeforePowerExpansion(),currentPreloadedTraces:e.getUpdatedPreloadedTraces(),expandedConnectionNames:o,resolveConnectedTraceAliases:!0}),{allowNewVias:!1,...n,onlyConnectionNames:o}]})];setSimpleRouteJson(e){this.srj=e;const n=om(this.srj);this.viaDiameter=n.padDiameter,this.viaHoleDiameter=n.holeDiameter,this.minTraceWidth=this.srj.minTraceWidth,this.connMap=Jm(this.srj),this.colorMap=Jf(this.srj,this.connMap)}getConstructorParams(){return[this.srj,this.opts]}currentPipelineStepIndex=0;computeProgress(){const e=this.activeSubSolver?.progress??0;return(this.currentPipelineStepIndex+e)/this.pipelineDef.length}_step(){const e=this.pipelineDef[this.currentPipelineStepIndex];if(!e)return void(this.solved=!0);if(this.activeSubSolver)return this.activeSubSolver.step(),void(this.activeSubSolver.solved?(this.endTimeOfPhase[e.solverName]=performance.now(),this.timeSpentOnPhase[e.solverName]=this.endTimeOfPhase[e.solverName]-this.startTimeOfPhase[e.solverName],e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null));const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),e.solverName!=="lengthMatchingPostProcessingSolver"&&e.solverName!=="powerTraceExpansionSolver"||(this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,this.iterations+this.activeSubSolver.MAX_ITERATIONS+1)),this[e.solverName]=this.activeSubSolver,this.timeSpentOnPhase[e.solverName]=0,this.startTimeOfPhase[e.solverName]=performance.now()}solveUntilPhase(e){for(;this.getCurrentPhase()!==e;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.visualizeStage(this.activeSubSolver);const e=this.escapeViaLocationSolver?.visualize(),n=this.netToPointPairsSolver?.visualize(),o=this.componentDetectionSolver?.visualize(),i=this.componentTopologyGeneratorSolver?.visualize(),r=this.globalTopologyGeneratorSolver?.visualize(),s=this.topologyMergingSolver?.visualize(),a=this.nodeDimensionSubdivisionSolver?.visualize(),A=this.nodeTargetMerger?.visualize(),c=this.singleLayerNodeMerger?.visualize(),l=this.strawSolver?.visualize(),u=this.edgeSolver?.visualize(),g=this.deadEndSolver?.visualize(),h=this.availableSegmentPointSolver?.visualize(),d=this.portPointPathingSolver?.visualize(),p=this.multiSectionPortPointOptimizer?.visualize(),m=this.uniformPortDistributionSolver?.visualize(),_=this.highDensityRouteSolver?.visualize(),f=this.highDensityForceImproveSolver?.visualize(),I=this.highDensityRepairSolver?.visualize(),C=this.highDensityStitchSolver?.visualize(),y=this.traceSimplificationSolver?.visualize(),x=this.mutatedPreloadedTraceSimplificationSolver?.visualize(),E=this.lengthMatchingPostProcessingSolver?.visualize(),B=this.powerTraceExpansionSolver?.visualize(),S=this.traceWidthSolver?.visualize(),Q=this.necessaryCrampedPortPointSolver?.visualize(),w=(this.highDensityRouteSolver?.visualize(),this.originalSrj),M=w.outline,k=[];if(k.push({points:[{x:w.bounds?.minX??-50,y:w.bounds?.minY??-50},{x:w.bounds?.maxX??50,y:w.bounds?.minY??-50},{x:w.bounds?.maxX??50,y:w.bounds?.maxY??50},{x:w.bounds?.minX??-50,y:w.bounds?.maxY??50},{x:w.bounds?.minX??-50,y:w.bounds?.minY??-50}],strokeColor:"rgba(255,0,0,0.25)"}),M&&M.length>=2){const ie=M.map(ne=>({x:ne.x,y:ne.y}));ie.push({...ie[0]}),k.push({points:ie,strokeColor:"rgba(0, 136, 255, 0.95)"})}const R=z8(w),F={points:[...w.connections.flatMap(ie=>ie.pointsToConnect.map(ne=>({...ne,layer:J8(ne,w.layerCount),label:`${ie.name} ${ne.pcb_port_id??""}`})))],rects:[...(w.obstacles??[]).filter(ie=>!ie.isCopperPour).map(ie=>({...ie,fill:ie.layers?.includes("top")?"rgba(255,0,0,0.25)":ie.layers?.includes("bottom")?"rgba(0,0,255,0.25)":"rgba(255,0,0,0.25)",layer:r7(ie,w.layerCount),label:R(ie)}))],lines:k},O={traceColorMode:this.visualizationTraceColorMode},U=ab({srj:w,visualizationOptions:O}),Y=Il(F,U),W=this.preprocessSimpleRouteJsonSolver?.visualize(),te=this.globalDrcForceImproveSolver?.visualize(),j=this.pipeline9JointDrcRepairSolver?.visualize(),J=[Y,W,o,i,e,n,r,s,a,A,c,l,u,g,h,Q,d,p,m,_?Il(F,_):null,f,I,C,y,x,S,te,j,E,B,this.solved?Il({lines:k},ab({srj:this.originalSrj,visualizationOptions:O}),this.visualizeFinalOutput()):null].filter(Boolean),oe=Il(...J);return this.visualizationTraceColorMode==="net"?pce(oe,this.colorMap):oe}visualizeStage(e){const n=e.visualize();return this.visualizationTraceColorMode==="net"?pce(n,this.colorMap):n}visualizeFinalOutput(){const e=this.visualizationTraceColorMode,n=this.getOutputSimpleRouteJson();return mx(n,{traceColorMode:e})}preview(){if(this.highDensityRouteSolver){const e=[];for(let n=this.highDensityRouteSolver.routes.length-1;n>=0;n--){const o=this.highDensityRouteSolver.routes[n];if(e.push({points:o.route.map(i=>({x:i.x,y:i.y})),strokeColor:this.colorMap[o.connectionName]}),e.length>200)break}return{lines:e}}return this.portPointPathingSolver?this.portPointPathingSolver.preview():this.netToPointPairsSolver?this.netToPointPairsSolver.visualize():this.escapeViaLocationSolver?this.escapeViaLocationSolver.visualize():this.componentTopologyGeneratorSolver?this.componentTopologyGeneratorSolver.visualize():this.componentDetectionSolver?this.componentDetectionSolver.visualize():this.preprocessSimpleRouteJsonSolver?this.preprocessSimpleRouteJsonSolver.visualize():{}}_getOutputHdRoutes(){if(((this.originalSrj.differentialPairs?.length??0)>0||(this.originalSrj.buses??[]).some(e=>e.maxLengthSkew!==void 0))&&this.lengthMatchingPostProcessingSolver){const{hdRoutes:e}=this.lengthMatchingPostProcessingSolver.getOutput();return e}return this.pipeline9JointDrcRepairSolver?.getOutput()??this.globalDrcForceImproveSolver?.getOutput()??this.traceWidthSolver?.getHdRoutesWithWidths()??this.traceSimplificationSolver?.simplifiedHdRoutes??this.highDensityStitchSolver.mergedHdRoutes}getOriginalFixedHdRoutes(){return(this.originalSrj.traces??[]).flatMap((e,n)=>kv(e,n,this.originalSrj.layerCount,this.viaDiameter,this.connMap))}getChangedPreloadedTraceSections(){return this.portPointPathingSolver?.getOutput().changedPreloadedTraceSections??[]}getPreloadedFixedRouteStateAfterHighDensity(){const e=this.getOriginalFixedHdRoutes(),n=this.getChangedPreloadedTraceSections(),o=z7t({traces:this.originalSrj.traces??[],fixedHdRoutes:e,sections:n}),i=n.length===0?[]:wgo({traces:this.originalSrj.traces??[],sections:n,stitchedHdRoutes:this.highDensityStitchSolver?.mergedHdRoutes??[],layerCount:this.originalSrj.layerCount}),r=new Set(n.map(a=>a.traceId)),s=e.filter(a=>r.has(this.originalSrj.traces?.[a.preloadedTraceIndex]?.pcb_trace_id??"")).map(a=>a.connectionName);return{originalFixedRoutes:e,updatedFixedRoutes:[...this.highDensityRouteSolver?.getUpdatedFixedHdRoutes()??o,...i],replacedConnectionNames:new Set([...this.highDensityRouteSolver?.fixedRouteReplacements.keys()??[],...s]),mutationMasks:new Map([...this.highDensityRouteSolver?.preloadedTraceMutationMasks??[],...i.map(a=>[a.connectionName,Array(a.route.length-1).fill(!0)])])}}getPreparedMutatedPreloadedTraceSections(){const e=this.getPreloadedFixedRouteStateAfterHighDensity();return Tgo({updatedFixedRoutes:e.updatedFixedRoutes,regionalMutationMasks:e.mutationMasks})}getPreloadedTraceUpdatesAfterHighDensity(){const e=this.getPreloadedFixedRouteStateAfterHighDensity(),n=this.getPreparedMutatedPreloadedTraceSections(),o=this.mutatedPreloadedTraceSimplificationSolver?.solved===!0?(({updatedFixedRoutes:i,sections:r,simplifiedHdRoutes:s})=>{const a=new Set(r.map(u=>u.connectionName)),A=new Map(s.map(u=>[u.connectionName,u]));if(A.size!==r.length||s.some(u=>!a.has(u.connectionName)))throw new Error(`Pipeline9 trace simplification changed the mutation-section set (expected ${r.length}, got ${s.length})`);const c=new Map,l=new Set;for(const u of r){const g=A.get(u.connectionName);if(!g)throw new Error(`Pipeline9 trace simplification lost mutation section "${u.connectionName}"`);const h=g.route[0],d=g.route.at(-1);if(!(h&&d&&Qce(h,u.section.start.point)&&Qce(d,u.section.end.point)))throw new Error(`Pipeline9 trace simplification changed mutation-section boundary "${u.connectionName}"`);const p=eQe(u.section,g),m=u.section.sourceRoutes[0];l.add(m.connectionName);for(const _ of u.section.sourceRoutes){if(c.has(_.connectionName))throw new Error(`Pipeline9 attempted to simplify fixed route "${_.connectionName}" more than once`);c.set(_.connectionName,p)}}return i.flatMap(u=>{const g=c.get(u.connectionName);return g?l.has(u.connectionName)?[g]:[]:[u]})})({updatedFixedRoutes:n.normalizedFixedRoutes,sections:n.sections,simplifiedHdRoutes:this.mutatedPreloadedTraceSimplificationSolver.simplifiedHdRoutes}):e.updatedFixedRoutes;return(({originalTraces:i,originalFixedRoutes:r,updatedFixedRoutes:s,replacedConnectionNames:a,layerCount:A,defaultViaHoleDiameter:c,obstacles:l,connMap:u})=>{const g=new Map,h=new Map;for(const p of r){const m=g.get(p.preloadedTraceIndex)??[];m.push(p),g.set(p.preloadedTraceIndex,m)}for(const p of s){const m=h.get(p.preloadedTraceIndex)??[];m.push(p),h.set(p.preloadedTraceIndex,m)}const d=[];return{updatedPreloadedTraces:i.map((p,m)=>{const _=(g.get(m)??[]).sort($Se);if(!_.some(y=>a.has(y.connectionName)))return p;const f=(h.get(m)??[]).sort($Se),I=p.route.some(y=>y.route_type==="through_obstacle"),C={...p,__replaces_pcb_trace_id:p.pcb_trace_id,route:I?Qgo({trace:p,originalTraceRoutes:_,updatedTraceRoutes:f,layerCount:A,defaultViaHoleDiameter:c,obstacles:l,connMap:u}):G7t({trace:p,updatedTraceRoutes:f,layerCount:A,defaultViaHoleDiameter:c,obstacles:l,connMap:u})};return d.push(C),C}),mutatedPreloadedTraces:d}})({originalTraces:this.originalSrj.traces??[],originalFixedRoutes:e.originalFixedRoutes,updatedFixedRoutes:o,replacedConnectionNames:e.replacedConnectionNames,layerCount:this.originalSrj.layerCount,defaultViaHoleDiameter:this.viaHoleDiameter,obstacles:this.originalSrj.obstacles,connMap:this.connMap})}getSrjWithMaterializedPreloadedTraces(){return{...this.srjWithPointPairs,traces:this.getPreloadedTraceUpdatesAfterHighDensity().updatedPreloadedTraces}}getUpdatedPreloadedTraces(){return this.pipeline9JointDrcRepairSolver?.getUpdatedPreloadedTraces()??this.getPreloadedTraceUpdatesAfterHighDensity().updatedPreloadedTraces}getMutatedPreloadedTraces(){return this.pipeline9JointDrcRepairSolver?.getMutatedPreloadedTraces()??this.getPreloadedTraceUpdatesAfterHighDensity().mutatedPreloadedTraces}getNewTracesBeforePowerExpansion(){if(!this.highDensityRouteSolver)throw new Error("Cannot get new traces before high-density routing");const e=M7t({connections:this.netToPointPairsSolver?.newConnections??[],originalConnections:this.originalSrj.connections,hdRoutes:this._getOutputHdRoutes(),layerCount:this.srj.layerCount,obstacles:this.srj.obstacles,defaultViaHoleDiameter:this.viaHoleDiameter,connMap:this.connMap});return Y7t(e,this.originalSrj.traces??[])}getPowerTraceExpansionFixedTraces(){if(!this.powerTraceExpansionSolver)throw new Error("Pipeline9 invariant violated: solved pipeline is missing the unconditional power-trace expansion solver");return this.powerTraceExpansionSolver.inputSrj.fixedTraces}getOutputSimplifiedPcbTraces(){if(!this.solved)throw new Error("Cannot get output before solving is complete");if(!this.powerTraceExpansionSolver)throw new Error("Pipeline9 invariant violated: solved pipeline is missing the unconditional power-trace expansion solver");return[...this.getPowerTraceExpansionFixedTraces().filter(e=>e.__replaces_pcb_trace_id!==void 0),...this.powerTraceExpansionSolver.getOutput()]}getOutputSimpleRouteJson(){if(!this.solved)throw new Error("Cannot get output before solving is complete");if(!this.powerTraceExpansionSolver)throw new Error("Pipeline9 invariant violated: solved pipeline is missing the unconditional power-trace expansion solver");const e=[...this.getPowerTraceExpansionFixedTraces(),...this.powerTraceExpansionSolver.getOutput()];return{...this.originalSrj,traces:e}}},Wdo="0.0.873",CQe=({nodeWithPortPoints:t,obstacleMargin:e,traceWidth:n,viaDiameter:o})=>{const i=Tz(t),r=e+Math.max(n,o)/2+1e-6;return{minX:t.center.x+8*(i.minX-t.center.x)-r,maxX:t.center.x+8*(i.maxX-t.center.x)+r,minY:t.center.y+8*(i.minY-t.center.y)-r,maxY:t.center.y+8*(i.maxY-t.center.y)+r}},Z6t=(t,e)=>{const n=(t.ccwRotationDegrees??0)*Math.PI/180,o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=t.width/2,s=t.height/2,a=Math.max(r,r*o+s*i),A=Math.max(s,r*i+s*o);return t.center.x-a<=e.maxX&&t.center.x+a>=e.minX&&t.center.y-A<=e.maxY&&t.center.y+A>=e.minY},QH=(t,e)=>{for(const n of[e.connectionName,e.rootConnectionName,e.portPointId,e.pcb_port_id,e.prevPortPointId,e.nextPortPointId])n!==void 0&&t.add(n)},e8t=(t,e)=>Object.fromEntries(Object.entries(t.netMap).flatMap(([n,o])=>{const i=o.filter(r=>e.has(r));return i.length>0||e.has(n)?[[n,i]]:[]})),t8t=({obstacle:t,connectedTo:e,preserveRotation:n})=>({type:"rect",layers:t.layers,...t.zLayers===void 0?{}:{zLayers:t.zLayers},...t.__zLayers===void 0?{}:{__zLayers:t.__zLayers},center:t.center,width:t.width,height:t.height,...n&&t.ccwRotationDegrees!==void 0?{ccwRotationDegrees:t.ccwRotationDegrees}:{},connectedTo:e,...t.circuitJsonMetadata===void 0?{}:{circuitJsonMetadata:t.circuitJsonMetadata}});function jdo({nodeWithPortPoints:t,connMap:e,obstacles:n,obstacleMargin:o,traceWidth:i,viaDiameter:r}){const s=CQe({nodeWithPortPoints:t,obstacleMargin:o,traceWidth:i,viaDiameter:r}),a=new Set;for(const c of t.portPoints)QH(a,c);for(const c of t.portPointsInPairs??[])QH(a,c[0]),QH(a,c[1]);const A=n.flatMap(c=>{if(!Z6t(c,s))return[];const l=(({obstacle:u,nodeWithPortPoints:g,connMap:h})=>{const d=new Set(g.portPoints.flatMap(_=>{const f=h.getNetConnectedToId(_.rootConnectionName??_.connectionName)??_.rootConnectionName??_.connectionName;return[_.connectionName,f]})),p=new Set(u.connectedTo.filter(_=>d.has(_))),m=new Map;for(const _ of d){const f=h.getNetConnectedToId(_)??_,I=m.get(f)??[];I.push(_),m.set(f,I)}for(const _ of m.values()){if([...p].some(I=>_.some(C=>C===I||h.areIdsConnected(C,I))))continue;const f=u.connectedTo.find(I=>_.some(C=>C===I||h.areIdsConnected(C,I)));f!==void 0&&p.add(f)}return[...p]})({obstacle:c,nodeWithPortPoints:t,connMap:e});for(const u of l)a.add(u);return[t8t({obstacle:c,connectedTo:l,preserveRotation:!0})]});return{connectivityNetMap:e8t(e,a),obstacles:A}}var $do=(...t)=>{const e=new Map;for(const n of t)for(const[o,i]of Object.entries(n)){const r=e.get(o)??new Set;for(const s of i)r.add(s);e.set(o,r)}return Object.fromEntries([...e].map(([n,o])=>[n,[...o]]))};function qdo({nodeWithPortPoints:t,connMap:e,colorMap:n,obstacles:o,obstacleMargin:i,traceWidth:r,viaDiameter:s}){const a=CQe({nodeWithPortPoints:t,obstacleMargin:i,traceWidth:r,viaDiameter:s}),A=(u=>[...new Set(u.portPoints.map(g=>g.connectionName))])(t),c=o.flatMap(u=>{if(!Z6t(u,a))return[];const g=A.filter(h=>u.connectedTo.some(d=>d===h||e.areIdsConnected(h,d)));return g.length===0?[]:[t8t({obstacle:u,connectedTo:g,preserveRotation:!1})]}),l=new Set;for(const u of t.portPoints)QH(l,u);for(const u of t.portPointsInPairs??[])QH(l,u[0]),QH(l,u[1]);for(const u of c)for(const g of[u.circuitJsonMetadata?.pcb_smtpad_id,u.circuitJsonMetadata?.pcb_plated_hole_id,u.circuitJsonMetadata?.pcb_port_id,u.circuitJsonMetadata?.pcb_via_id,...u.connectedTo??[]])g!==void 0&&l.add(g);return{connectivityNetMap:e8t(e,l),colorMap:Object.fromEntries(Object.entries(n??{}).filter(([u])=>l.has(u))),obstacles:c}}var yQe="https://hd-cache2.tscircuit.com",n8t=31e4,o8t=1835008,i8t=16777216,ih=class extends Error{constructor(e,n){super(n),this.reason=e,this.name="HdCache2RequestError"}reason},LW=t=>t instanceof Error?t.message:String(t),Xdo=new Set(["pcb_smtpad_id","pcb_plated_hole_id","pcb_port_id","pcb_via_id","source_component_name","source_port_name"]),Zdo=t=>!(!t||typeof t!="object"||Array.isArray(t))&&Object.entries(t).every(([e,n])=>Xdo.has(e)&&typeof n=="string"),HW=(t,e)=>Math.abs(t-e)<=1e-9*Math.max(1,Math.abs(t),Math.abs(e)),r8t=1e-6,eho=(t,e)=>{const n=e==="ordinary"?r8t:.001,o=new Set;for(let r=0;r<t.route.length-1;r++){const s=t.route[r],a=t.route[r+1],A=s.z!==a.z;if(s.toNextSegmentType==="through_obstacle"){if(!A)return!1;continue}if(s.toNextSegmentCircuitJsonMetadata!==void 0)return!1;if(!A)continue;const c=[],l=[];for(const[u,g]of t.vias.entries())Math.hypot(g.x-s.x,g.y-s.y)<=n&&c.push(u),Math.hypot(g.x-a.x,g.y-a.y)<=n&&l.push(u);if(Math.hypot(s.x-a.x,s.y-a.y)<=r8t){if(c.length===0)return!1;for(const u of c)o.add(u)}else{if(e==="regional-fallback"||c.length===0==(l.length===0))return!1;for(const u of[...c,...l])o.add(u)}}const i=t.route.at(-1);return i.toNextSegmentType===void 0&&i.toNextSegmentCircuitJsonMetadata===void 0&&t.vias.every((r,s)=>o.has(s))},tho=(t,e,n)=>{if(!Array.isArray(t))return!1;const o=new Map;for(const A of e.nodeWithPortPoints.portPoints){const c=o.get(A.connectionName)??[];c.push(A),o.set(A.connectionName,c)}const i=new Set(e.nodeWithPortPoints.availableZ??e.nodeWithPortPoints.portPoints.map(A=>A.z)),r=CQe({nodeWithPortPoints:e.nodeWithPortPoints,obstacleMargin:e.obstacleMargin,traceWidth:e.traceWidth,viaDiameter:e.viaDiameter}),s=(A,c)=>(o.get(c)??[]).some(l=>typeof A.x=="number"&&HW(A.x,l.x)&&typeof A.y=="number"&&HW(A.y,l.y)&&A.z===l.z);for(const A of t){if(!A||typeof A!="object")return!1;const c=A;if(typeof c.connectionName!="string"||c.connectionName.length===0||!o.has(c.connectionName)||typeof c.traceThickness!="number"||!Number.isFinite(c.traceThickness)||c.traceThickness<=0||typeof c.viaDiameter!="number"||!Number.isFinite(c.viaDiameter)||c.viaDiameter<=0||!HW(c.viaDiameter,e.viaDiameter)||!Array.isArray(c.route)||c.route.length<2||!Array.isArray(c.vias))return!1;for(const u of[c.rootConnectionName,c.startPcbPortId,c.endPcbPortId,c.regionId])if(u!==void 0&&typeof u!="string")return!1;for(const u of c.route){if(!u||typeof u!="object")return!1;const g=u;if(typeof g.x!="number"||!Number.isFinite(g.x)||typeof g.y!="number"||!Number.isFinite(g.y)||g.x<r.minX||g.x>r.maxX||g.y<r.minY||g.y>r.maxY||typeof g.z!="number"||!Number.isInteger(g.z)||g.z<0||g.z>=e.layerCount||n==="ordinary"&&!i.has(g.z)||g.traceThickness!==void 0&&(typeof g.traceThickness!="number"||!Number.isFinite(g.traceThickness)||g.traceThickness<=0)||g.pcb_port_id!==void 0&&typeof g.pcb_port_id!="string"||g.insideJumperPad!==void 0&&typeof g.insideJumperPad!="boolean"||g.toNextSegmentType!==void 0&&g.toNextSegmentType!=="through_obstacle"||g.toNextSegmentCircuitJsonMetadata!==void 0&&!Zdo(g.toNextSegmentCircuitJsonMetadata))return!1}const l=c.route;if(!(n!=="ordinary"||s(l[0],c.connectionName)&&s(l.at(-1),c.connectionName)))return!1;for(const u of c.vias){if(!u||typeof u!="object")return!1;const g=u;if(typeof g.x!="number"||!Number.isFinite(g.x)||typeof g.y!="number"||!Number.isFinite(g.y)||g.x<r.minX||g.x>r.maxX||g.y<r.minY||g.y>r.maxY)return!1}if(!eho(c,n))return!1;if(c.jumpers!==void 0){if(!Array.isArray(c.jumpers))return!1;for(const u of c.jumpers){if(!u||typeof u!="object")return!1;const g=u,h=g.start,d=g.end;if(g.route_type!=="jumper"||g.footprint!=="0603"&&g.footprint!=="1206"&&g.footprint!=="1206x4_pair"||!h||typeof h.x!="number"||!Number.isFinite(h.x)||typeof h.y!="number"||!Number.isFinite(h.y)||!d||typeof d.x!="number"||!Number.isFinite(d.x)||typeof d.y!="number"||!Number.isFinite(d.y)||h.x<r.minX||h.x>r.maxX||h.y<r.minY||h.y>r.maxY||d.x<r.minX||d.x>r.maxX||d.y<r.minY||d.y>r.maxY)return!1}}}const a=t;return n==="ordinary"?((A,c)=>{const l=c.portPointsInPairs??[];if(l.length>0){for(const[g,h]of l)if(!eae(A,g.connectionName,z3(g)).has(z3(h)))return!1;return!0}const u=new Map;for(const g of c.portPoints){const h=u.get(g.connectionName)??[];h.push(g),u.set(g.connectionName,h)}for(const[g,h]of u)for(const[d,p]of Yz(h))if(!eae(A,g,z3(d)).has(z3(p)))return!1;return!0})(a,e.nodeWithPortPoints):((A,c)=>{const l=(p,m)=>{if(p.z!==m.z)return!1;const _=p.x-m.x,f=p.y-m.y;return Math.hypot(_,f)<=.001},u=new Map;for(const p of A){const m=p.route.some((y,x)=>{const E=p.route[x+1];return!(E===void 0||HW(y.x,E.x)&&HW(y.y,E.y)&&y.z===E.z)}),_=p.route[0],f=p.route.at(-1);if(!m||!_||!f)return!1;const I=c.portPoints.filter(y=>y.connectionName===p.connectionName);if(!I.some(y=>l(_,y))||!I.some(y=>l(f,y)))return!1;const C=u.get(p.connectionName)??[];C.push({start:_,end:f}),u.set(p.connectionName,C)}const g=(p,m,_)=>{if(l(m,_))return!0;const f=u.get(p)??[],I=[],C=new Set;for(const[y,x]of f.entries())(l(m,x.start)||l(m,x.end))&&(I.push(y),C.add(y));for(;I.length>0;){const y=f[I.pop()];if(l(_,y.start)||l(_,y.end))return!0;for(const[x,E]of f.entries())C.has(x)||(l(y.start,E.start)||l(y.start,E.end)||l(y.end,E.start)||l(y.end,E.end))&&(C.add(x),I.push(x))}return!1},h=c.portPointsInPairs??[];if(h.length>0)return h.every(([p,m])=>g(p.connectionName,p,m));const d=new Map;for(const p of c.portPoints){const m=d.get(p.connectionName)??[];m.push(p),d.set(p.connectionName,m)}return[...d].every(([,p])=>Yz(p).every(([m,_])=>g(m.connectionName,m,_)))})(a,e.nodeWithPortPoints)},nho=class{constructor(e,n=yQe,o={}){this.autorouterVersion=e,this.serverUrl=n;const{cacheVersion:i}=o;if(i!==void 0&&i.trim().length===0)throw new Error("hd-cache2 cacheVersion must not be empty");this.cacheVersion=i}autorouterVersion;serverUrl;cacheVersion;stats={batchRequestsStarted:0,batchRequestsCompleted:0,batchItemsStarted:0,batchBodyBytesStarted:0,batchMaxBodyBytes:0,batchCacheMisses:0,singleRequestsStarted:0,batchInvalidLines:0,batchUnknownRequestIds:0,batchDuplicateRequestIds:0};solveMany(e){const n=e.map((s,a)=>this.createPendingSolve(String(a),s)),o=n.filter(s=>s.serializedItem!==null),{batches:i,singletonSolves:r}=this.prepareBatches(o);for(const s of i)this.fetchBatch(s);for(const s of r)this.launchSingleSolve(s);return n.map(s=>s.promise)}createPendingSolve(e,n){let o;const i={requestId:e,input:n,serializedItem:null,promise:new Promise(r=>{o=r}),resolve:o,settled:!1,singleSolveStarted:!1};try{i.serializedItem=JSON.stringify({requestId:e,input:n})}catch(r){this.settleWithFallback(i,"request_serialization_error",LW(r))}return i}settle(e,n){e.settled||(e.settled=!0,e.resolve(n))}settleWithFallback(e,n,o){this.settle(e,{kind:"local-fallback",reason:n,error:o})}parseSuccessfulResponse(e,n){if(!e||typeof e!="object"||Array.isArray(e))throw new ih("invalid_response","hd-cache2 returned a non-object response");const o=e;if(o.ok!==!0)throw new ih("remote_error",typeof o.message=="string"?o.message:"hd-cache2 returned an unsuccessful response");if(o.autorouterVersion!==this.autorouterVersion)throw new ih("version_mismatch",`hd-cache2 returned autorouter version ${String(o.autorouterVersion)}, expected ${this.autorouterVersion}`);if(o.cacheVersion!==this.cacheVersion)throw new ih("cache_version_mismatch",`hd-cache2 returned cache version ${String(o.cacheVersion)}, expected ${String(this.cacheVersion)}`);if(o.source!=="cache"&&o.source!=="solver")throw new ih("invalid_response","hd-cache2 returned an invalid cache source");if(o.solutionStage!=="ordinary"&&o.solutionStage!=="regional-fallback")throw new ih("invalid_response","hd-cache2 returned an invalid solution stage");if(o.solutionStage==="regional-fallback"&&(!n.enableRegionalFallback||typeof o.ordinaryFailure!="string"||o.ordinaryFailure.length===0))throw new ih("invalid_response","hd-cache2 returned invalid regional fallback metadata");if(o.solutionStage==="ordinary"&&Object.prototype.hasOwnProperty.call(o,"ordinaryFailure"))throw new ih("invalid_response","hd-cache2 returned regional metadata on an ordinary result");if(o.solutionStage==="ordinary"&&o.status==="failed"&&n.enableRegionalFallback)throw new ih("invalid_response","hd-cache2 returned an intermediate ordinary failure");if(o.status==="solved"&&tho(o.routes,n,o.solutionStage)||o.status==="failed"&&typeof o.error=="string"&&o.error.length>0)return o;throw new ih("invalid_response","hd-cache2 returned an invalid solve result")}parseBatchCacheMiss(e){if(e.ok!==!1||e.code!=="CACHE_MISS")return null;if(e.autorouterVersion!==this.autorouterVersion)throw new ih("version_mismatch",`hd-cache2 returned autorouter version ${String(e.autorouterVersion)}, expected ${this.autorouterVersion}`);if(e.cacheVersion!==this.cacheVersion)throw new ih("cache_version_mismatch",`hd-cache2 returned cache version ${String(e.cacheVersion)}, expected ${String(this.cacheVersion)}`);if(typeof e.message!="string")throw new ih("invalid_response","hd-cache2 returned an invalid cache miss response");return e}async fetchSingle(e){const n=new AbortController;let o=!1;const i=setTimeout(()=>{o=!0,n.abort(new Error("hd-cache2 transport timed out after 310000ms"))},n8t);i.unref?.();try{const s={autorouterVersion:this.autorouterVersion,...this.cacheVersion===void 0?{}:{cacheVersion:this.cacheVersion},input:e.input};let a;try{a=JSON.stringify(s)}catch(u){throw new ih("request_serialization_error",LW(u))}const A=await fetch((r=this.serverUrl,/\/solve\/?$/.test(r)?r.replace(/\/+$/,""):`${r.replace(/\/+$/,"")}/solve`),{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:a,signal:n.signal}),c=await A.text();let l=null;try{l=c?JSON.parse(c):null}catch{throw A.ok?new ih("invalid_json",`hd-cache2 returned invalid JSON with status ${A.status}`):new ih("http_error",`hd-cache2 request failed with status ${A.status}`)}if(!A.ok){const u=l&&typeof l=="object"&&"message"in l&&typeof l.message=="string"?l.message:`hd-cache2 request failed with status ${A.status}`;throw new ih("http_error",u)}this.settle(e,{kind:"remote",response:this.parseSuccessfulResponse(l,e.input)})}catch(s){const a=s instanceof ih?s.reason:o?"transport_timeout":"transport_error";this.settleWithFallback(e,a,LW(s))}finally{clearTimeout(i)}var r}launchSingleSolve(e){e.singleSolveStarted||e.settled||(e.singleSolveStarted=!0,this.stats.singleRequestsStarted+=1,this.fetchSingle(e))}handleBatchResponseLine(e,n,o){if(e.trim().length===0)return;if(e.length>i8t)throw new ih("response_too_large","hd-cache2 returned an oversized batch result line");let i;try{i=JSON.parse(e)}catch{return void(this.stats.batchInvalidLines+=1)}if(!i||typeof i!="object"||Array.isArray(i))return void(this.stats.batchInvalidLines+=1);const r=i,s=r.requestId;if(typeof s!="string")return void(this.stats.batchInvalidLines+=1);const a=n.get(s);if(a)if(o.has(s))this.stats.batchDuplicateRequestIds+=1;else{o.add(s);try{if(this.parseBatchCacheMiss(r))return this.stats.batchCacheMisses+=1,void this.launchSingleSolve(a);this.settle(a,{kind:"remote",response:this.parseSuccessfulResponse(r,a.input)})}catch(A){this.stats.batchInvalidLines+=1,this.settleWithFallback(a,A instanceof ih?A.reason:"invalid_response",LW(A))}}else this.stats.batchUnknownRequestIds+=1}async readBatchResponse(e,n){if(!e.body)throw new ih("invalid_response","hd-cache2 returned an empty batch response body");const o=new Map(n.items.map(A=>[A.requestId,A])),i=new Set,r=new TextDecoder,s=e.body.getReader();let a="";for(;i.size<n.items.length;){const{done:A,value:c}=await s.read();if(a+=r.decode(c,{stream:!A}),a.length>i8t&&!a.includes(`
`))throw new ih("response_too_large","hd-cache2 returned an oversized unterminated batch result line");let l=a.indexOf(`
`);for(;l>=0;){const u=a.slice(0,l);a=a.slice(l+1),this.handleBatchResponseLine(u,o,i),l=a.indexOf(`
`)}if(A){a.trim().length>0&&this.handleBatchResponseLine(a,o,i);break}}if(i.size!==n.items.length)for(const A of n.items)i.has(A.requestId)||this.settleWithFallback(A,"missing_response",`hd-cache2 batch ended without result ${A.requestId}`);else await s.cancel().catch(()=>{})}async fetchBatch(e){const n=new AbortController;let o=!1;const i=setTimeout(()=>{o=!0,n.abort(new Error("hd-cache2 batch transport timed out after 310000ms"))},n8t);i.unref?.(),this.stats.batchRequestsStarted+=1,this.stats.batchItemsStarted+=e.items.length,this.stats.batchBodyBytesStarted+=e.bodyBytes,this.stats.batchMaxBodyBytes=Math.max(this.stats.batchMaxBodyBytes,e.bodyBytes);try{const r=await fetch((s=>{const a=s.replace(/\/+$/,"");return/\/solve-batch$/.test(a)?a:/\/solve$/.test(a)?a.replace(/\/solve$/,"/solve-batch"):`${a}/solve-batch`})(this.serverUrl),{method:"POST",headers:{accept:"application/x-ndjson","content-type":"application/json"},body:e.body,signal:n.signal});if(!r.ok){const s=await r.text().catch(()=>"");let a=`hd-cache2 batch request failed with status ${r.status}`;try{const A=s?JSON.parse(s):null;A&&typeof A=="object"&&"message"in A&&typeof A.message=="string"&&(a=A.message)}catch{}throw new ih("http_error",a)}await this.readBatchResponse(r,e)}catch(r){const s=r instanceof ih?r.reason:o?"transport_timeout":"transport_error";for(const a of e.items)a.singleSolveStarted||this.settleWithFallback(a,s,LW(r))}finally{clearTimeout(i),this.stats.batchRequestsCompleted+=1}}prepareBatches(e){const n=new TextEncoder,o=this.cacheVersion===void 0?"":`,"cacheVersion":${JSON.stringify(this.cacheVersion)}`,i=`{"autorouterVersion":${JSON.stringify(this.autorouterVersion)}${o},"items":[`,r=n.encode(i+"]}").byteLength,s=[],a=[];let A=[],c=r;const l=()=>{A.length!==0&&(s.push({body:`${i}${A.map(u=>u.serializedItem).join(",")}]}`,bodyBytes:c,items:A}),A=[],c=r)};for(const u of e){const g=n.encode(u.serializedItem).byteLength,h=A.length===0?0:1;r+g>o8t?(l(),a.push(u)):((A.length>=100||c+h+g>o8t)&&l(),A.push(u),c+=(A.length===1?0:1)+g)}return l(),{batches:s,singletonSolves:a}}},oho="ordinary_then_regional_without_fixed_copper_v1",iho=class extends sQe{autorouterVersion;hdCache2ServerUrl;hdCache2CacheVersion;requestTimeoutMs;hdCache2Client;launchedRemoteSolves=!1;waitingForRemoteNode=null;remoteRequestByNode=new Map;remoteResultByNode=new Map;logicallyTimedOutNodes=new Set;constructor({autorouterVersion:e,hdCache2ServerUrl:n,hdCache2CacheVersion:o,requestTimeoutMs:i,...r}){if(super(r),r.effort!==1)throw new Error(`Pipeline9 networked high-density routing requires effort=1, received ${r.effort}`);if(this.requestTimeoutMs=i??3e4,!Number.isFinite(this.requestTimeoutMs)||this.requestTimeoutMs<=0)throw new Error(`Pipeline9 network request timeout must be a positive number, received ${this.requestTimeoutMs}`);this.autorouterVersion=e,this.hdCache2ServerUrl=n??yQe,this.hdCache2CacheVersion=o,this.hdCache2Client=new nho(this.autorouterVersion,this.hdCache2ServerUrl,{cacheVersion:o}),this.pendingEffects=[],this.stats={...this.stats,remoteRequestsStarted:0,remoteRequestsCompleted:0,remoteBatchRequestsStarted:0,remoteBatchRequestsCompleted:0,remoteBatchItemsStarted:0,remoteBatchBodyBytesStarted:0,remoteBatchMaxBodyBytes:0,remoteBatchCacheMisses:0,remoteSingleRequestsStarted:0,remoteBatchInvalidLines:0,remoteBatchUnknownRequestIds:0,remoteBatchDuplicateRequestIds:0,remoteCacheHits:0,remoteSolverResults:0,remoteSolvedResults:0,remoteFailedResults:0,remoteOrdinaryResults:0,remoteRegionalFallbackResults:0,remoteRegionalFallbackResultsApplied:0,remoteRegionalFallbackResultsDeferredToLocal:0,remoteTransportFallbacks:0,remoteLogicalTimeoutFallbacks:0,remoteFallbackReasonCounts:{}}}getSolverName(){return"Pipeline9NetworkedHighDensitySolver"}async waitForAllRemoteRequests(){const e=[...this.remoteRequestByNode.values()];e.length!==0?(await Promise.all(e.map(({promise:n})=>n)),this.syncClientStats()):this.syncClientStats()}createNodeInput(e){const n=this.enableRegionalFallback?jdo({nodeWithPortPoints:e,connMap:this.connMap,obstacles:this.obstacles,obstacleMargin:this.obstacleMargin,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter}):{connectivityNetMap:{},obstacles:[]},o=qdo({nodeWithPortPoints:e,connMap:this.connMap,colorMap:this.colorMap,obstacles:this.enableRegionalFallback?n.obstacles:this.obstacles,obstacleMargin:this.obstacleMargin,traceWidth:this.traceWidth,viaDiameter:this.viaDiameter});return{solvePolicy:oho,enableRegionalFallback:this.enableRegionalFallback,nodeWithPortPoints:e,connectivityNetMap:$do(o.connectivityNetMap,n.connectivityNetMap),colorMap:o.colorMap,viaDiameter:this.viaDiameter,traceWidth:this.traceWidth,obstacleMargin:this.obstacleMargin,effort:1,obstacles:o.obstacles,regionalObstacles:n.obstacles,layerCount:this.layerCount,nodePf:this.nodePfById.get(e.capacityMeshNodeId)??null}}syncClientStats(){const e=this.hdCache2Client.stats;this.stats.remoteBatchRequestsStarted=e.batchRequestsStarted,this.stats.remoteBatchRequestsCompleted=e.batchRequestsCompleted,this.stats.remoteBatchItemsStarted=e.batchItemsStarted,this.stats.remoteBatchBodyBytesStarted=e.batchBodyBytesStarted,this.stats.remoteBatchMaxBodyBytes=e.batchMaxBodyBytes,this.stats.remoteBatchCacheMisses=e.batchCacheMisses,this.stats.remoteSingleRequestsStarted=e.singleRequestsStarted,this.stats.remoteBatchInvalidLines=e.batchInvalidLines,this.stats.remoteBatchUnknownRequestIds=e.batchUnknownRequestIds,this.stats.remoteBatchDuplicateRequestIds=e.batchDuplicateRequestIds}recordFallbackReason(e){const n=this.stats.remoteFallbackReasonCounts;n[e]=(n[e]??0)+1}trackRemoteSolve(e,n){const o=performance.now()+this.requestTimeoutMs;this.stats.remoteRequestsStarted+=1;const i=n.then(r=>{const s=this.logicallyTimedOutNodes.has(e);s||this.remoteResultByNode.set(e,r),r.kind==="remote"?(r.response.source==="cache"&&(this.stats.remoteCacheHits+=1),r.response.source==="solver"&&(this.stats.remoteSolverResults+=1),r.response.status==="solved"?this.stats.remoteSolvedResults+=1:this.stats.remoteFailedResults+=1):s||(this.stats.remoteTransportFallbacks+=1,this.recordFallbackReason(r.reason)),this.stats.remoteRequestsCompleted+=1,this.syncClientStats()});this.remoteRequestByNode.set(e,{promise:i,deadlineAt:o})}launchRemoteSolves(){const e=[],n=[...this.unsolvedNodePortPoints].reverse();for(const i of n)try{e.push({node:i,input:this.createNodeInput(i)})}catch(r){this.trackRemoteSolve(i,Promise.resolve({kind:"local-fallback",reason:"request_serialization_error",error:r instanceof Error?r.message:String(r)}))}const o=this.hdCache2Client.solveMany(e.map(({input:i})=>i));for(const[i,r]of o.entries())this.trackRemoteSolve(e[i].node,r);this.syncClientStats()}async waitForCurrentRemoteNode(e,n){const o=n.deadlineAt-performance.now();if(o<=0)return void this.recordLogicalTimeout(e);let i;const r=await Promise.race([n.promise.then(()=>"request-settled"),new Promise(s=>{i=setTimeout(()=>s("logical-timeout"),o)})]);i!==void 0&&clearTimeout(i),r==="logical-timeout"&&this.recordLogicalTimeout(e)}recordLogicalTimeout(e){this.logicallyTimedOutNodes.add(e),this.stats.remoteLogicalTimeoutFallbacks+=1,this.stats.remoteTransportFallbacks+=1,this.recordFallbackReason("logical_timeout")}startRegularSolver(e){const n=this.remoteResultByNode.get(e);if(!n){const o=this.remoteRequestByNode.get(e);if(o){this.waitingForRemoteNode=e;const i=this.waitForCurrentRemoteNode(e,o);i.then(()=>{this.waitingForRemoteNode===e&&(this.pendingEffects=[])});const r={name:`hd-cache2:${e.capacityMeshNodeId}`,promise:i};return void(this.pendingEffects=[r])}return void super.startRegularSolver(e)}this.applyRemoteResultToRegularNode(e,n)}applyRemoteResultToRegularNode(e,n){if(n.kind!=="local-fallback"){if(this.stats.regularNodeCount=Number(this.stats.regularNodeCount??0)+1,this.activeNode=e,n.response.solutionStage==="regional-fallback"){if(this.stats.remoteRegionalFallbackResults+=1,!this.canUseNoFixedCopperRegionalResult(e))return this.stats.remoteRegionalFallbackResultsDeferredToLocal+=1,void this.finishRegularSolverFailure(n.response.ordinaryFailure);this.stats.remoteRegionalFallbackResultsApplied+=1,this.stats.fallbackNodeCount=Number(this.stats.fallbackNodeCount??0)+1}else this.stats.remoteOrdinaryResults+=1;if(n.response.status==="failed")return this.error=n.response.error,this.failed=!0,void(this.activeNode=null);this.finishActiveNode(n.response.routes)}else super.startRegularSolver(e)}canUseNoFixedCopperRegionalResult(e){const n={...TW(e,this.connMap),availableZ:Array.from({length:this.layerCount},(i,r)=>r)},o=MW(n,this.getUpdatedFixedHdRoutes());return o.fixedRouteSectionsByConnectionName.size===0&&o.fixedObstacleRoutes.length===0}_step(){if(this.syncClientStats(),this.launchedRemoteSolves||(this.launchedRemoteSolves=!0,this.launchRemoteSolves()),this.waitingForRemoteNode){const e=this.waitingForRemoteNode;if(this.logicallyTimedOutNodes.has(e))return this.waitingForRemoteNode=null,this.pendingEffects=[],void super.startRegularSolver(e);const n=this.remoteResultByNode.get(e);return n?(this.waitingForRemoteNode=null,this.pendingEffects=[],void this.applyRemoteResultToRegularNode(e,n)):void 0}super._step()}},s8t=class extends X6t{hdCache2ServerUrl;hdCache2CacheVersion;getSolverName(){return"AutoroutingPipelineSolver9_Networked"}constructor(e,n={}){if(super(e,n),this.effort!==1)throw new Error(`AutoroutingPipelineSolver9_Networked is only available at effort=1, received ${this.effort}`);this.hdCache2ServerUrl=n.hdCache2ServerUrl??yQe,this.hdCache2CacheVersion=n.hdCache2CacheVersion,this.replaceHighDensityPipelineStep()}replaceHighDensityPipelineStep(){const e=this.pipelineDef.findIndex(i=>i.solverName==="highDensityRouteSolver"),n=this.pipelineDef[e];if(!n)throw new Error("Pipeline9 highDensityRouteSolver step is missing");const o=n.getConstructorParams;this.pipelineDef[e]={...n,solverClass:iho,getConstructorParams:i=>{const[r]=o(i);return[{...r,autorouterVersion:Wdo,hdCache2ServerUrl:i.hdCache2ServerUrl,hdCache2CacheVersion:i.hdCache2CacheVersion}]}}}async stepAsync(){if(this.solved||this.failed)return;this.step();const e=a9t(this);e.length!==0&&(await Promise.race(e.map(n=>n.promise.then(()=>n.name,()=>n.name))),this.solved||this.failed||this.step())}async solveAsync(){const e=Date.now();for(;!this.solved&&!this.failed;)await this.stepAsync();this.timeToSolve=Date.now()-e}async solveUntilPhaseAsync(e){for(;this.getCurrentPhase()!==e&&!this.solved&&!this.failed;)await this.stepAsync()}solve(){throw new Error("AutoroutingPipelineSolver9_Networked requires async execution. Use solveAsync() or stepAsync().")}solveUntilPhase(e){throw new Error("AutoroutingPipelineSolver9_Networked requires solveUntilPhaseAsync().")}};globalThis.process?.env?.FANOUT_FLOW_DEBUG;var rho=class extends zA{constructor(e){super(),this.inputProblem=e,this.simplifiedRouteByTraceId=new Map(e.simplifiedHdRoutes.map(n=>[n.connectionName,n])),this.MAX_ITERATIONS=e.preparedInput.preparedTraces.length+1}inputProblem;simplifiedRouteByTraceId;outputTraces=[];nextTraceIndex=0;getSolverName(){return"ApplyTraceSimplificationSolver"}_step(){const e=this.inputProblem.preparedInput.preparedTraces,n=e[this.nextTraceIndex];n?(this.outputTraces.push(this.applyTrace(n)),this.nextTraceIndex++,this.progress=this.nextTraceIndex/Math.max(1,e.length)):this.finishApplication()}applyTrace(e){if(!e.mutableHdRoute)return structuredClone(e.originalTrace);const n=this.simplifiedRouteByTraceId.get(e.originalTrace.pcb_trace_id);if(!n||e.uniformTraceWidth===void 0)throw new Error(`Simplification removed trace "${e.originalTrace.pcb_trace_id}"`);const o=nB(n,this.inputProblem.preparedInput.srj.layerCount,{defaultViaHoleDiameter:e.viaHoleDiameter,obstacles:this.inputProblem.preparedInput.srj.obstacles,connMap:this.inputProblem.preparedInput.connMap}),i=o.filter(s=>s.route_type==="jumper"),r=((s,a)=>s.map(A=>A.route_type==="wire"||A.route_type==="through_obstacle"?{...A,width:a}:A))([...structuredClone(e.leadingTerminalVias),...o.filter(s=>s.route_type!=="jumper"),...structuredClone(e.trailingTerminalVias),...i],e.uniformTraceWidth);return((s,a)=>{const A=s.filter(c=>c.route_type==="wire");a.startPcbPortId&&A[0]&&(A[0].start_pcb_port_id=a.startPcbPortId),a.endPcbPortId&&A.at(-1)&&(A.at(-1).end_pcb_port_id=a.endPcbPortId)})(r,n),{...structuredClone(e.originalTrace),route:r}}finishApplication(){const e=this.inputProblem.preparedInput.preparedTraces;this.stats={inputTraceCount:e.length,outputTraceCount:this.outputTraces.length,inputRoutePointCount:e.reduce((n,o)=>n+o.originalTrace.route.length,0),outputRoutePointCount:this.outputTraces.reduce((n,o)=>n+o.route.length,0)},this.progress=1,this.solved=!0}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error("Cannot get applied traces before conversion completes");return{...structuredClone(this.inputProblem.preparedInput.originalSrj),traces:structuredClone(this.outputTraces)}}},OW=(t,e)=>{const n=t.at(-1);if(n&&(o=n,i=e,Math.abs(o.x-i.x)<=1e-9&&Math.abs(o.y-i.y)<=1e-9&&o.z===i.z))return e.traceThickness!==void 0&&(n.traceThickness=e.traceThickness),void(e.pcb_port_id!==void 0&&(n.pcb_port_id=e.pcb_port_id));var o,i;t.push(e)},sho=(t,e,n)=>{for(let o=e+1;o<t.length;o++){const i=t[o];if(i.route_type==="wire")return Kr(i.layer,n);if(i.route_type==="through_obstacle")return Kr(i.from_layer,n)}},aho=({fromZ:t,toZ:e,previousZ:n,nextZ:o})=>n===t?[t,e]:n===e?[e,t]:o===e?[t,e]:o===t?[e,t]:[t,e],Aho=(t,e)=>{for(const n of t)if(n.route_type==="via"&&n.via_diameter!==void 0)return n.via_diameter;return e},a8t=(t,e)=>{const n=e==="start"?t:[...t].reverse();for(const o of n){if(o.route_type!=="wire")continue;const i=e==="start"?o.start_pcb_port_id:o.end_pcb_port_id;if(i)return i}},cho=t=>({route_type:"jumper",start:{...t.start},end:{...t.end},footprint:t.footprint}),lho=(t,e)=>{for(const n of t.route)if(n.route_type==="via"&&n.via_hole_diameter!==void 0)return n.via_hole_diameter;return e},uho=class extends zA{preparedInput;seenTraceIds=new Set;nextTraceIndex=0;constructor(e){super();const n=structuredClone(e.inputSrj),o=mN(n),i=Jm(o);this.preparedInput={originalSrj:n,srj:o,connMap:i,colorMap:Jf(o,i),immutableHdRoutes:[],mutableHdRoutes:[],netByConnectionName:new Map,options:{...e.options},preparedTraces:[]},this.MAX_ITERATIONS=(o.traces?.length??0)+1}getSolverName(){return"PrepareTraceSimplificationSolver"}_step(){const e=this.preparedInput.srj.traces??[],n=e[this.nextTraceIndex];if(!n)return this.stats={inputTraceCount:e.length,mutableTraceCount:this.preparedInput.mutableHdRoutes.length,immutableTraceCount:e.length-this.preparedInput.mutableHdRoutes.length},this.progress=1,void(this.solved=!0);this.prepareTrace(n,this.nextTraceIndex),this.nextTraceIndex++,this.progress=this.nextTraceIndex/Math.max(1,e.length)}prepareTrace(e,n){if(this.seenTraceIds.has(e.pcb_trace_id))throw new Error(`Duplicate pcb_trace_id "${e.pcb_trace_id}"`);this.seenTraceIds.add(e.pcb_trace_id);const o=om(this.preparedInput.srj),i=(g=>{const h=g.route.flatMap(p=>p.route_type==="wire"||p.route_type==="through_obstacle"?[p.width]:[]),d=h[0];if(d!==void 0&&!h.some(p=>Math.abs(p-d)>1e-9))return d})(e),{traceToSimplify:r,leadingTerminalVias:s,trailingTerminalVias:a}=(g=>{let h=0;for(;g.route[h]?.route_type==="via";)h++;let d=g.route.length;for(;g.route[d-1]?.route_type==="jumper";)d--;let p=d;for(;p>h&&g.route[p-1]?.route_type==="via";)p--;return{traceToSimplify:{...g,route:[...g.route.slice(h,p),...g.route.slice(d)]},leadingTerminalVias:g.route.slice(0,h),trailingTerminalVias:g.route.slice(p,d)}})(e),A=this.preparedInput.connMap.getNetConnectedToId(e.connection_name)??e.connection_name,c=i===void 0?void 0:((g,h)=>{const d=[],p=[],m=[],_=((f,I)=>{for(const C of f)if(C.route_type==="wire"||C.route_type==="through_obstacle")return C.width;return I})(g.route,h.defaultTraceThickness);for(let f=0;f<g.route.length;f++){const I=g.route[f];if(I.route_type==="jumper"){m.push(cho(I));continue}if(I.route_type==="wire"){OW(d,{x:I.x,y:I.y,z:Kr(I.layer,h.layerCount),traceThickness:I.width,pcb_port_id:I.start_pcb_port_id??I.end_pcb_port_id});continue}const C=Kr(I.from_layer,h.layerCount),y=Kr(I.to_layer,h.layerCount),[x,E]=aho({fromZ:C,toZ:y,previousZ:d.at(-1)?.z,nextZ:sho(g.route,f,h.layerCount)});if(I.route_type==="via"){OW(d,{x:I.x,y:I.y,z:x,traceThickness:_}),OW(d,{x:I.x,y:I.y,z:E,traceThickness:_}),p.push({x:I.x,y:I.y});continue}const B=x===C,S=B?I.start:I.end,Q=B?I.end:I.start;OW(d,{...S,z:x,traceThickness:I.width,toNextSegmentType:"through_obstacle",...I.circuitJsonMetadata?{toNextSegmentCircuitJsonMetadata:I.circuitJsonMetadata}:{}}),OW(d,{...Q,z:E,traceThickness:I.width})}return{connectionName:g.pcb_trace_id,rootConnectionName:h.rootConnectionName,startPcbPortId:a8t(g.route,"start"),endPcbPortId:a8t(g.route,"end"),traceThickness:_,viaDiameter:Aho(g.route,h.defaultViaDiameter),route:d,vias:p,...m.length>0?{jumpers:m}:{}}})(r,{layerCount:this.preparedInput.srj.layerCount,defaultTraceThickness:i,defaultViaDiameter:o.padDiameter,rootConnectionName:A}),l=c&&c.route.length>=2?c:void 0;if(this.preparedInput.preparedTraces.push({originalTrace:e,mutableHdRoute:l,leadingTerminalVias:s,trailingTerminalVias:a,uniformTraceWidth:i,viaHoleDiameter:lho(e,o.holeDiameter)}),!l)return void this.preparedInput.immutableHdRoutes.push(...kv(e,n,this.preparedInput.srj.layerCount,o.padDiameter,this.preparedInput.connMap));this.preparedInput.mutableHdRoutes.push(l),this.preparedInput.netByConnectionName.set(l.connectionName,A),this.preparedInput.colorMap[l.connectionName]=this.preparedInput.colorMap[A]??this.preparedInput.colorMap[e.connection_name]??"#2563eb";const u={...e,route:[...s,...a]};this.preparedInput.immutableHdRoutes.push(...kv(u,n,this.preparedInput.srj.layerCount,o.padDiameter,this.preparedInput.connMap))}getOutput(){if(!this.solved)throw new Error("Cannot get prepared traces before preparation completes");return this.preparedInput}},gho=class extends zA{constructor(e){super(),this.inputProblem=e;const n=e.preparedInput,o=om(n.srj);this.traceSimplificationSolver=new j8({hdRoutes:n.mutableHdRoutes,otherHdRoutes:n.immutableHdRoutes,obstacles:n.srj.obstacles,connMap:n.connMap,colorMap:n.colorMap,outline:n.srj.outline,defaultViaDiameter:o.padDiameter,layerCount:n.srj.layerCount,minTraceToPadEdgeClearance:n.srj.minTraceToPadEdgeClearance,minBoardEdgeClearance:n.srj.minBoardEdgeClearance,netByConnectionName:n.netByConnectionName,enableCrossingViaReduction:n.options.enableCrossingViaReduction??!0,preserveRouteEndpoints:!0,useTraceWidthAwareClearance:!0}),this.traceSimplificationSolver.MAX_SIMPLIFICATION_PIPELINE_LOOPS=n.options.iterations??2,this.activeSubSolver=this.traceSimplificationSolver,this.MAX_ITERATIONS=this.traceSimplificationSolver.MAX_ITERATIONS+1}inputProblem;traceSimplificationSolver;getSolverName(){return"TraceSimplificationStageSolver"}_step(){if(this.traceSimplificationSolver.step(),this.progress=this.traceSimplificationSolver.progress,this.stats={...this.traceSimplificationSolver.stats},this.traceSimplificationSolver.failed)return this.error=this.traceSimplificationSolver.error??"Trace simplification failed",this.failed=!0,void(this.activeSubSolver=null);this.traceSimplificationSolver.solved&&(this.progress=1,this.solved=!0,this.activeSubSolver=null)}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error("Cannot get simplified routes before cleanup completes");return structuredClone(this.traceSimplificationSolver.simplifiedHdRoutes)}visualize(){return this.traceSimplificationSolver.visualize()}preview(){return this.traceSimplificationSolver.preview()}},dho=class extends zA{constructor(e){super(),this.inputProblem=e;const n=e.preparedInput;this.drcEngine=new fJ(n.srj,{connMap:n.connMap,traceClearance:n.srj.minTraceToPadEdgeClearance??.1,viaClearance:.1}),this.MAX_ITERATIONS=3}inputProblem;drcEngine;phase="baseline";baselineErrorCounts={};outputErrorCounts={};getSolverName(){return"ValidateTraceSimplificationSolver"}_step(){return this.phase==="baseline"?(this.baselineErrorCounts=this.evaluateErrorCounts(this.inputProblem.preparedInput.originalSrj),this.phase="output",void(this.progress=1/3)):this.phase==="output"?(this.outputErrorCounts=this.evaluateErrorCounts(this.inputProblem.outputSrj),this.phase="compare",void(this.progress=2/3)):(this.assertNoNewDrcErrors(),this.stats={baselineErrorCounts:this.baselineErrorCounts,outputErrorCounts:this.outputErrorCounts},this.progress=1,void(this.solved=!0))}evaluateErrorCounts(e){return(n=>{const o={};for(const i of n.errors)o[i.type]=(o[i.type]??0)+1;return o})(this.drcEngine.evaluate(e.traces??[]))}assertNoNewDrcErrors(){const e=[...new Set([...Object.keys(this.baselineErrorCounts),...Object.keys(this.outputErrorCounts)])].filter(o=>(this.outputErrorCounts[o]??0)>(this.baselineErrorCounts[o]??0));if(e.length===0)return;const n=e.map(o=>`${o}: ${this.baselineErrorCounts[o]??0} -> ${this.outputErrorCounts[o]??0}`).join(", ");throw new Error(`Pipeline 11 simplification introduced DRC errors (${n})`)}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error("Cannot get Pipeline 11 output before DRC validation");return structuredClone(this.inputProblem.outputSrj)}},hho=class extends n7{prepareTraceSimplificationSolver;traceSimplificationStageSolver;applyTraceSimplificationSolver;validateTraceSimplificationSolver;pipelineDef=[eh("prepareTraceSimplificationSolver",uho,t=>[{inputSrj:t.inputProblem.inputSrj,options:t.inputProblem.options}]),eh("traceSimplificationStageSolver",gho,t=>[{preparedInput:t.prepareTraceSimplificationSolver.getOutput()}]),eh("applyTraceSimplificationSolver",rho,t=>[{preparedInput:t.prepareTraceSimplificationSolver.getOutput(),simplifiedHdRoutes:t.traceSimplificationStageSolver.getOutput()}]),eh("validateTraceSimplificationSolver",dho,t=>[{preparedInput:t.prepareTraceSimplificationSolver.getOutput(),outputSrj:t.applyTraceSimplificationSolver.getOutput()}])];constructor(t,e={}){if(e.iterations!==void 0&&(!Number.isInteger(e.iterations)||e.iterations<1))throw new Error("Simplification iterations must be a positive integer");super({inputSrj:t,options:{...e}}),this.MAX_ITERATIONS=1e8}getSolverName(){return"AutoroutingPipelineSolver11_Simplification"}getConstructorParams(){return[this.inputProblem.inputSrj,this.inputProblem.options]}getOutput(){if(!this.validateTraceSimplificationSolver?.solved)throw new Error("Pipeline 11 simplification has not solved yet");return this.validateTraceSimplificationSolver.getOutput()}getOutputSimpleRouteJson(){return this.getOutput()}getOutputSimplifiedPcbTraces(){return structuredClone(this.getOutput().traces??[])}initialVisualize(){return mx(this.inputProblem.inputSrj)}finalVisualize(){return mx(this.getOutput())}},vH=1e-9,xQe=t=>(e=>e.route_type==="wire")(t)||(e=>e.route_type==="via")(t)?t:(e=>e.route_type==="through_obstacle")(t)&&Math.hypot(t.end.x-t.start.x,t.end.y-t.start.y)<=vH?{route_type:t.route_type,x:t.start.x,y:t.start.y,from_layer:t.from_layer,to_layer:t.to_layer,width:t.width}:null,pho=(t,e)=>t.layer??e.layer??t.to_layer??e.from_layer??t.from_layer??e.to_layer??"top",mho=(t,e,n)=>t.width??e.width??n,wH=(t,e,n,o,i)=>({x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n,layer:o,width:i}),A8t=(t,e)=>({...t,x:Math.abs(t.x-e.minX)<1e-6?e.minX:Math.abs(t.x-e.maxX)<1e-6?e.maxX:t.x,y:Math.abs(t.y-e.minY)<1e-6?e.minY:Math.abs(t.y-e.maxY)<1e-6?e.maxY:t.y}),c8t=({x:t,y:e,layer:n})=>({x:t,y:e,layer:n}),l8t=({x:t,y:e,layer:n,width:o})=>({route_type:"wire",x:t,y:e,layer:n,width:o}),_ho=(t,e,n)=>{const o=e.x-t.x,i=e.y-t.y;let r=0,s=1;const a=(A,c)=>{if(Math.abs(A)<vH)return c>=0;const l=c/A;if(A<0){if(l>s)return!1;l>r&&(r=l)}else{if(l<r)return!1;l<s&&(s=l)}return!0};return a(-o,t.x-n.minX)&&a(o,n.maxX-t.x)&&a(-i,t.y-n.minY)&&a(i,n.maxY-t.y)?{startT:r,endT:s}:null},u8t=(t,e)=>t.x>=e.minX-1e-6&&t.x<=e.maxX+1e-6&&t.y>=e.minY-1e-6&&t.y<=e.maxY+1e-6&&(Math.abs(t.x-e.minX)<=1e-6||Math.abs(t.x-e.maxX)<=1e-6||Math.abs(t.y-e.minY)<=1e-6||Math.abs(t.y-e.maxY)<=1e-6),EQe=(t,e,n,o,i)=>{var r,s;r=o,s=i,Math.hypot(r.x-s.x,r.y-s.y)<=vH||t.push({type:"pcb_trace",pcb_trace_id:`${e.pcb_trace_id}_keep_${n}`,connection_name:e.connection_name,route:[l8t(o),l8t(i)]})},g8t=({obstacleId:t,start:e,end:n,layer:o,width:i})=>{const r=n.x-e.x,s=n.y-e.y,a=Math.hypot(r,s);return a>i+vH?null:{obstacleId:t,type:"rect",layers:[o],center:{x:(e.x+n.x)/2,y:(e.y+n.y)/2},width:a,height:i,ccwRotationDegrees:180*Math.atan2(s,r)/Math.PI,connectedTo:[]}},d8t=({connection:t,point:e,endpointIndex:n})=>({obstacleId:`${t.name}_route_endpoint_${n}`,type:"rect",layers:[e.layer],center:{x:e.x,y:e.y},width:e.width,height:e.width,connectedTo:[t.name,t.__rootConnectionNames?.[0]??t.name]}),h8t=({trace:t,ripIndex:e,start:n,end:o,region:i,allowInteriorStart:r,allowInteriorEnd:s})=>{if(!r&&!u8t(n,i)||!s&&!u8t(o,i))return null;const a=(({trace:A,ripIndex:c,start:l,end:u})=>({name:`${A.connection_name}_reroute_${A.pcb_trace_id}_${c}`,__rootConnectionNames:[A.connection_name],pointsToConnect:[c8t(l),c8t(u)]}))({trace:t,ripIndex:e,start:n,end:o});return{connection:a,endpointObstacles:[d8t({connection:a,point:n,endpointIndex:0}),d8t({connection:a,point:o,endpointIndex:1})]}},fho=(t,e,n)=>{const o=[],i=[],r=[],s=[];let a=null,A=!1,c=0,l=!1;for(let u=0;u<t.route.length-1;u++){const g=xQe(t.route[u]),h=xQe(t.route[u+1]);if(!g||!h)return null;const d=pho(g,h),p=mho(g,h,n),m=_ho(g,h,e),_=wH(g,h,0,d,p),f=wH(g,h,1,d,p),I=u===0;if(!m){EQe(o,t,c++,_,f);continue}if(l=!0,m.startT>vH){const E=wH(g,h,m.startT,d,p),B=g8t({obstacleId:`${t.pcb_trace_id}_keep_${c}_bounds`,start:_,end:E,layer:d,width:p});B&&s.push(B),EQe(o,t,c++,_,E)}const C=wH(g,h,m.endT,d,p),y=A8t(wH(g,h,m.startT,d,p),e),x=A8t(wH(g,h,m.endT,d,p),e);if(a||(a=y,A=I&&m.startT<=vH),m.endT<.999999999){const E=h8t({trace:t,ripIndex:i.length,start:a,end:x,region:e,allowInteriorStart:A});E&&(i.push(E.connection),r.push(...E.endpointObstacles)),a=null,A=!1;const B=g8t({obstacleId:`${t.pcb_trace_id}_keep_${c}_bounds`,start:C,end:f,layer:d,width:p});B&&s.push(B),EQe(o,t,c++,C,f)}}if(a){const u=t.route.slice().reverse().map(xQe).find(g=>!!g);if(u){const g=h8t({trace:t,ripIndex:i.length,start:a,end:{x:u.x,y:u.y,layer:u.layer??u.from_layer??a.layer,width:a.width},region:e,allowInteriorStart:A,allowInteriorEnd:!0});g&&(i.push(g.connection),r.push(...g.endpointObstacles))}}return{keptTraces:o,rerouteConnections:i,rerouteEndpointObstacles:r,clippedTraceSegmentObstacles:s,hadIntersection:l}},Iho=(t,e)=>{const n=structuredClone(t),o=[],i=[],r=[],s=[];for(const A of t.traces??[]){const c=fho(A,e,t.minTraceWidth);c&&c.hadIntersection?(o.push(...c.keptTraces),i.push(...c.rerouteConnections),r.push(...c.rerouteEndpointObstacles),s.push(...c.clippedTraceSegmentObstacles)):o.push(structuredClone(A))}const a=((A,c)=>{const l={minX:A.minX,maxX:A.maxX,minY:A.minY,maxY:A.maxY};for(const u of c){const g=Is(u);l.minX=Math.min(l.minX,g.minX),l.maxX=Math.max(l.maxX,g.maxX),l.minY=Math.min(l.minY,g.minY),l.maxY=Math.max(l.maxY,g.maxY)}return l})(e,[...r,...s]);return{...n,bounds:a,obstacles:[...n.obstacles,...r],traces:o,connections:i}},Cho=(t,e)=>{const n=new Map(e.connections.map(i=>[i.name,i.__rootConnectionNames?.[0]??i.name])),o=(e.traces??[]).map(i=>{const r=n.get(i.connection_name);return r?{...structuredClone(i),connection_name:r}:structuredClone(i)});return{...structuredClone(t),traces:o,jumpers:e.jumpers?structuredClone(e.jumpers):structuredClone(t.jumpers)}};var p8t={0:"M0.301025 0.257813 L0.206593 0.283385 L0.122042 0.361307 L0.075923 0.474441 L0.064942 0.642221 L0.091296 0.78289 L0.159376 0.899463 L0.257104 0.961214 L0.344948 0.961214 L0.442678 0.899463 L0.510757 0.78289 L0.537111 0.642221 L0.526131 0.474441 L0.480012 0.361307 L0.39546 0.283385 L0.301025 0.257813",1:"M0.220426 0.40845 L0.381626 0.270996 L0.381626 0.948966",2:"M0.110409 0.39212 L0.125621 0.342293 L0.170571 0.295823 L0.244237 0.26431 L0.291518 0.257813 L0.373319 0.263799 L0.434683 0.290705 L0.468239 0.331966 L0.480292 0.379913 L0.479492 0.411806 L0.465088 0.465192 L0.402571 0.568988 L0.245134 0.766438 L0.07959 0.948045 L0.522462 0.948045",3:"M0.081606 0.345073 L0.119154 0.315633 L0.178996 0.284091 L0.255265 0.257813 L0.349133 0.263062 L0.43127 0.289348 L0.48994 0.336662 L0.525141 0.394491 L0.513407 0.457577 L0.466472 0.504892 L0.384334 0.541692 L0.290464 0.56272 L0.20833 0.573235 L0.290464 0.583749 L0.384334 0.610035 L0.466472 0.652092 L0.519274 0.709922 L0.531007 0.773007 L0.50754 0.841351 L0.454738 0.899179 L0.3726 0.946494 L0.310412 0.961214 L0.209503 0.959111 L0.127367 0.946494 L0.071046 0.929671",4:"M0.418494 0.270996 L0.048828 0.724199 L0.553224 0.724199 M0.414181 0.578167 L0.414181 0.94897",5:"M0.074951 0.270996 L0.074951 0.614701 L0.267655 0.5695 L0.405247 0.586502 L0.460002 0.617189 L0.498028 0.660731 L0.527101 0.779401 L0.513352 0.841049 L0.477274 0.889568 L0.406378 0.93463 L0.324445 0.958337 L0.247399 0.962139 L0.182516 0.949767 L0.130068 0.925508 L0.074951 0.875607 M0.074951 0.270996 L0.527101 0.270996",6:"M0.428549 0.257813 L0.341433 0.285053 L0.26073 0.312099 L0.192188 0.360182 L0.138902 0.410969 L0.098219 0.500422 L0.070249 0.584267 L0.067264 0.670716 L0.065164 0.756863 L0.087163 0.820973 L0.108168 0.861042 L0.157916 0.913131 L0.210981 0.948192 L0.29279 0.961214 L0.384548 0.956206 L0.456409 0.924151 L0.507262 0.881077 L0.5349 0.821975 L0.537111 0.771889 L0.521634 0.718798 L0.498418 0.67372 L0.463042 0.636657 L0.414398 0.613617 L0.34696 0.598591 L0.28284 0.595587 L0.215403 0.605604 L0.145756 0.641665 L0.109274 0.678729 L0.064942 0.724006",7:"M0.071534 0.270996 L0.530519 0.270996 L0.495935 0.291702 L0.477752 0.305407 L0.435186 0.346112 L0.412067 0.374136 L0.388565 0.40796 L0.365315 0.448098 L0.342943 0.495062 L0.322081 0.549366 L0.303364 0.611524 L0.287416 0.68205 L0.270077 0.80465 L0.26253 0.94897",8:"M0.286761 0.257813 L0.210684 0.27162 L0.1414 0.305622 L0.092494 0.382125 L0.111513 0.450128 L0.16857 0.502193 L0.228345 0.539382 L0.377781 0.594635 L0.470161 0.645637 L0.52586 0.706203 L0.538087 0.792269 L0.506841 0.87621 L0.438915 0.927212 L0.339743 0.961214 L0.263666 0.959089 L0.174004 0.929337 L0.102003 0.881523 L0.063965 0.811395 L0.066682 0.741266 L0.102003 0.671139 L0.180797 0.608448 L0.259591 0.580822 L0.358762 0.548945 L0.456576 0.49688 L0.486463 0.446941 L0.487822 0.362999 L0.453859 0.302434 L0.384574 0.265245 L0.286761 0.257813",9:"M0.511026 0.437812 L0.491026 0.347812 L0.451026 0.297812 L0.391026 0.267812 L0.311026 0.257813 L0.231026 0.267812 L0.161026 0.297812 L0.111026 0.347812 L0.091026 0.417812 L0.111026 0.487812 L0.161026 0.537812 L0.231026 0.567812 L0.311026 0.577812 L0.391026 0.557812 L0.451026 0.517812 L0.491026 0.477812 L0.511026 0.437812 M0.510026 0.438812 L0.434026 0.636812 L0.381026 0.777812 L0.337026 0.879812 L0.301026 0.957812","!":"M0.301026 0.270996 L0.301026 0.749566 M0.251466 0.94897 L0.350587 0.94897",'"':"M0.16504 0.270996 L0.16504 0.523022 M0.437013 0.270996 L0.437013 0.523022","#":"M0.20958 0.282227 L0.146515 0.949754 M0.461844 0.282227 L0.398779 0.949754 M0.032999 0.526969 L0.600587 0.452796 M0.001465 0.82366 L0.569055 0.749486",$:"M0.307121 0.240234 L0.307121 1.083502 M0.490031 0.415915 L0.404676 0.328075 L0.23396 0.310507 L0.136407 0.398347 L0.099828 0.521324 L0.124213 0.591596 L0.197379 0.644299 L0.429061 0.697003 L0.502224 0.749708 L0.526613 0.837547 L0.477836 0.960526 L0.355897 1.013228 L0.197379 0.99566 L0.112021 0.942957 L0.07544 0.837547","'":"M0.301026 0.270996 L0.301026 0.523022","(":"M0.413087 0.241211 L0.372337 0.28347 L0.331589 0.334184 L0.290838 0.393349 L0.25009 0.460965 L0.219528 0.528584 L0.199153 0.5962 L0.188966 0.655364 L0.199153 0.714529 L0.219528 0.782146 L0.25009 0.849764 L0.290838 0.91738 L0.331589 0.976544 L0.372337 1.027258 L0.413087 1.069491",")":"M0.188966 0.241211 L0.229716 0.28347 L0.270466 0.334184 L0.311213 0.393349 L0.351964 0.460965 L0.382526 0.528584 L0.4029 0.5962 L0.413087 0.655364 L0.4029 0.714529 L0.382526 0.782146 L0.351964 0.849764 L0.311213 0.91738 L0.270466 0.976544 L0.229716 1.027258 L0.188966 1.069491","*":"M0.301026 0.458702 L0.301026 0.681942 M0.301026 0.458702 L0.520997 0.536834 M0.301026 0.458702 L0.439954 0.257813 M0.301026 0.458702 L0.162098 0.257813 M0.301026 0.458702 L0.081055 0.536834","+":"M0.042969 0.66845 L0.559083 0.66845 M0.301023 0.428223 L0.301023 0.908661",",":"M0.38672 0.852051 L0.215333 1.030661 L0.301025 1.119971","-":"M0.173829 0.686035 L0.428224 0.686035",".":"M0.362549 0.851074 L0.239503 0.851074","/":"M0.062501 1.035249 L0.539551 0.270996","<":"M0.559083 0.441895 L0.042969 0.66939 L0.042969 0.66939 L0.559083 0.896902","=":"M0.042969 0.545898 L0.559083 0.545898 M0.042969 0.80837 L0.559083 0.80837",">":"M0.042969 0.441895 L0.559083 0.66939 L0.559083 0.66939 L0.042969 0.896902",A:"M0.018067 0.94897 L0.290179 0.270996 L0.583986 0.94897 M0.155303 0.684521 L0.433548 0.684521",B:"M0.063965 0.94897 L0.063965 0.278953 L0.209356 0.270996 L0.342486 0.294394 L0.432179 0.37292 L0.418224 0.48773 L0.312686 0.549166 L0.084728 0.575531 L0.306377 0.589434 L0.468877 0.647456 L0.538087 0.736658 L0.5324 0.85202 L0.501247 0.902983 L0.42355 0.944398 L0.063965 0.94897",C:"M0.529054 0.419847 L0.498425 0.345196 L0.442238 0.292341 L0.33583 0.257813 L0.257199 0.268357 L0.187906 0.303748 L0.120243 0.385432 L0.072998 0.599844 L0.110073 0.815385 L0.165381 0.902183 L0.222883 0.942801 L0.334904 0.961214 L0.43253 0.937679 L0.504816 0.868999 L0.529054 0.772065",D:"M0.064454 0.94897 L0.071838 0.285078 L0.171217 0.270996 L0.247348 0.272633 L0.37101 0.306078 L0.462461 0.378304 L0.514748 0.475555 L0.535591 0.576392 L0.537599 0.652313 L0.528065 0.717381 L0.508562 0.772419 L0.445948 0.855695 L0.362356 0.90871 L0.225203 0.945862 L0.064454 0.94897",E:"M0.080078 0.270996 L0.080078 0.94897 M0.080078 0.270996 L0.521974 0.270996 M0.080078 0.609981 L0.389405 0.609981 M0.080078 0.94897 L0.521974 0.94897",F:"M0.086426 0.270996 L0.086426 0.94897 M0.091304 0.275607 L0.515626 0.275607 M0.091304 0.607677 L0.447344 0.607677",G:"M0.498034 0.284943 L0.374621 0.257813 L0.244219 0.268648 L0.160577 0.311997 L0.094556 0.398116 L0.056397 0.58404 L0.076752 0.785532 L0.120865 0.858197 L0.188947 0.916734 L0.271008 0.953591 L0.357069 0.961214 L0.43715 0.932047 L0.501262 0.858539 L0.545656 0.648611 L0.329595 0.648131",H:"M0.066895 0.270996 L0.066895 0.94897 M0.066895 0.595658 L0.530009 0.595658 M0.535157 0.270996 L0.535157 0.94897",I:"M0.301026 0.270996 L0.301026 0.94897",J:"M0.506839 0.270996 L0.507814 0.782193 L0.498468 0.846168 L0.480733 0.880789 L0.455864 0.90832 L0.426095 0.929408 L0.360746 0.954812 L0.302508 0.962139 L0.223573 0.953638 L0.16538 0.930312 L0.137072 0.907715 L0.116428 0.880312 L0.102822 0.848819 L0.095633 0.813947 L0.094239 0.776413",K:"M0.035401 0.270996 L0.035401 0.94897 M0.502258 0.316194 L0.035401 0.687823 M0.212484 0.582361 L0.566652 0.933903",L:"M0.07544 0.270996 L0.07544 0.94897 L0.526613 0.94897",M:"M0.042481 0.94897 L0.042481 0.270996 L0.301027 0.712492 L0.559571 0.270996 L0.559571 0.94897",N:"M0.067871 0.94897 L0.067871 0.270996 L0.534181 0.94897 L0.525031 0.270996",O:"M0.287293 0.961214 L0.19843 0.933567 L0.1172 0.849451 L0.057129 0.563945 L0.114348 0.350255 L0.18455 0.289392 L0.306101 0.257813 L0.42054 0.29572 L0.487543 0.365003 L0.544923 0.625294 L0.516366 0.789624 L0.465476 0.884596 L0.375084 0.949287 L0.287293 0.961214",P:"M0.070557 0.94897 L0.070557 0.28379 L0.20704 0.270996 L0.329134 0.278993 L0.408525 0.300514 L0.444022 0.317908 L0.500637 0.368929 L0.525796 0.423728 L0.531496 0.50384 L0.508934 0.554205 L0.473724 0.582043 L0.417577 0.604365 L0.336375 0.620372 L0.226014 0.629268 L0.082368 0.630258",Q:"M0.282435 1.050813 L0.195447 1.019646 L0.115933 0.924817 L0.057129 0.602943 L0.113139 0.362034 L0.18186 0.293418 L0.300844 0.257813 L0.412868 0.300553 L0.478457 0.37866 L0.534625 0.672103 L0.506671 0.857367 L0.456855 0.964437 L0.368371 1.037368 L0.282435 1.050813 M0.341225 0.815559 L0.544923 1.070653",R:"M0.034912 0.944112 L0.034912 0.288556 L0.227127 0.270996 L0.362038 0.276867 L0.443423 0.294907 L0.477644 0.309614 L0.505809 0.328757 L0.526616 0.352817 L0.544963 0.418061 L0.543241 0.475921 L0.524463 0.517817 L0.49076 0.546518 L0.444265 0.564799 L0.355195 0.578739 L0.047653 0.589627 M0.303054 0.617306 L0.56714 0.94897",S:"M0.483037 0.364333 L0.407613 0.267477 L0.22883 0.257813 L0.128623 0.327565 L0.087712 0.455539 L0.104656 0.518727 L0.168054 0.573307 L0.41928 0.617318 L0.503796 0.669342 L0.535157 0.759324 L0.493846 0.900055 L0.367668 0.961214 L0.205436 0.956661 L0.116711 0.907038 L0.066895 0.790334",T:"M0.022949 0.270996 L0.579103 0.270996 M0.309284 0.270996 L0.309284 0.94897",U:"M0.072022 0.270996 L0.07308 0.648875 L0.080372 0.75167 L0.099024 0.827813 L0.134786 0.885729 L0.181571 0.924023 L0.251464 0.95168 L0.339655 0.962139 L0.401553 0.951668 L0.45232 0.924086 L0.482701 0.891771 L0.495745 0.870529 L0.515699 0.81637 L0.525014 0.744626 L0.530031 0.272017",V:"M0.027832 0.270996 L0.320083 0.94897 L0.57422 0.270996",W:"M0 0.270996 L0.079799 0.940377 L0.285198 0.472884 L0.505255 0.94897 L0.602052 0.270996",X:"M0.009034 0.270996 L0.586805 0.94897 M0.593019 0.270996 L0.015246 0.94897",Y:"M0.018067 0.270996 L0.293132 0.574135 M0.583986 0.271959 L0.294954 0.57606 L0.305277 0.94897",Z:"M0.053711 0.270996 L0.548341 0.270996 L0.053711 0.94897 L0.548341 0.94897","[":"M0.404542 0.240234 L0.197511 0.240234 L0.197511 1.069424 L0.404542 1.069424","\\":"M0.062501 0.270996 L0.539551 1.035249","]":"M0.19751 0.240234 L0.404542 0.240234 L0.404542 1.069424 L0.19751 1.069424","^":"M0.035156 0.523931 L0.301024 0.270996 L0.566896 0.523931",_:"M0 1.160601 L0.602052 1.160601",a:"M0.527101 0.439941 L0.527101 0.973965 M0.527101 0.553824 L0.451366 0.477535 L0.376759 0.439941 L0.263722 0.439941 L0.187989 0.477535 L0.112255 0.553824 L0.074951 0.66881 L0.074951 0.745099 L0.112255 0.85898 L0.187989 0.93527 L0.263722 0.973965 L0.376759 0.973965 L0.451366 0.93527 L0.527101 0.85898",b:"M0.07666 0.240234 L0.07666 0.959985 M0.07666 0.582737 L0.151822 0.514237 L0.225865 0.480483 L0.338045 0.480483 L0.413211 0.514237 L0.488374 0.582737 L0.525392 0.685983 L0.525392 0.754485 L0.488374 0.856739 L0.413211 0.92524 L0.338045 0.959985 L0.225865 0.959985 L0.151822 0.92524 L0.07666 0.856739",c:"M0.512452 0.553823 L0.441624 0.477535 L0.371854 0.439941 L0.26614 0.439941 L0.195312 0.477535 L0.124486 0.553823 L0.0896 0.668808 L0.0896 0.745099 L0.124486 0.858979 L0.195312 0.93527 L0.26614 0.973965 L0.371854 0.973965 L0.441624 0.93527 L0.512452 0.858979",d:"M0.525392 0.240234 L0.525392 0.959985 M0.525392 0.582737 L0.450232 0.514237 L0.376189 0.480483 L0.264006 0.480483 L0.188844 0.514237 L0.11368 0.582737 L0.076661 0.685983 L0.076661 0.754485 L0.11368 0.856739 L0.188844 0.92524 L0.264006 0.959985 L0.376189 0.959985 L0.450232 0.92524 L0.525392 0.856739",e:"M0.059571 0.668808 L0.542482 0.668808 M0.542482 0.592521 L0.502641 0.516231 L0.461594 0.477535 L0.381914 0.439941 L0.261186 0.439941 L0.180299 0.477535 L0.099412 0.553823 L0.059571 0.668808 L0.059571 0.745099 L0.099412 0.858979 L0.180299 0.93527 L0.261186 0.973965 L0.381914 0.973965 L0.461594 0.93527 L0.542482 0.858979",f:"M0.512941 0.240234 L0.406984 0.240234 L0.301026 0.274346 L0.248047 0.374731 L0.248047 0.946817 M0.089112 0.476088 L0.459965 0.476088",g:"M0.525392 0.439941 L0.525392 0.989395 L0.488373 1.091918 L0.45023 1.126757 L0.376189 1.160601 L0.264004 1.160601 L0.188844 1.126757 L0.113681 1.058075 L0.076661 0.954555 M0.525392 0.542467 L0.45023 0.473786 L0.376189 0.439941 L0.264004 0.439941 L0.188844 0.473786 L0.113681 0.542467 L0.076661 0.645988 L0.076661 0.714669 L0.113681 0.817193 L0.188844 0.885875 L0.264004 0.920713 L0.376189 0.920713 L0.45023 0.885875 L0.525392 0.817193",h:"M0.092041 0.240234 L0.092041 0.946817 M0.092041 0.61058 L0.205937 0.509225 L0.282214 0.476086 L0.396109 0.476086 L0.47187 0.509225 L0.510011 0.61058 L0.510011 0.946817",i:"M0.261026 0.240234 L0.341026 0.240234 M0.300978 0.476089 L0.300978 0.946817",j:"M0.3853 0.240234 L0.447023 0.240234 M0.416159 0.465708 L0.416159 1.011689 L0.383887 1.108586 L0.252832 1.140264 L0.15503 1.108586",k:"M0.065186 0.240234 L0.065186 0.946817 M0.493824 0.476086 L0.065186 0.812323 M0.236758 0.677829 L0.536867 0.946817",l:"M0.301026 0.234863 L0.301026 0.946441",m:"M0.050538 0.439941 L0.050538 0.960796 M0.050538 0.588758 L0.114405 0.476607 L0.157178 0.439941 L0.236864 0.439941 L0.279637 0.476607 L0.32241 0.588758 L0.32241 0.960796 M0.32241 0.588758 L0.386281 0.476607 L0.428467 0.439941 L0.50874 0.439941 L0.551515 0.476607 L0.551515 0.960796",n:"M0.092041 0.439941 L0.092041 0.960796 M0.092041 0.588758 L0.205936 0.476607 L0.282216 0.439941 L0.396113 0.439941 L0.471871 0.476607 L0.510011 0.588758 L0.510011 0.960796",o:"M0.247175 0.439941 L0.175178 0.477535 L0.103186 0.553823 L0.066895 0.668808 L0.066895 0.745099 L0.103186 0.858979 L0.175178 0.93527 L0.247175 0.973965 L0.354874 0.973965 L0.426872 0.93527 L0.498866 0.858979 L0.535157 0.745099 L0.535157 0.668808 L0.498866 0.553823 L0.426872 0.477535 L0.354874 0.439941 L0.247175 0.439941",p:"M0.076904 0.439941 L0.076904 1.154244 M0.076904 0.541563 L0.151986 0.473487 L0.225944 0.439941 L0.338005 0.439941 L0.413087 0.473487 L0.488166 0.541563 L0.525148 0.644169 L0.525148 0.712246 L0.488166 0.813866 L0.413087 0.881942 L0.338005 0.916471 L0.225944 0.916471 L0.151986 0.881942 L0.076904 0.813866",q:"M0.525148 0.441895 L0.525148 1.156195 M0.525148 0.5435 L0.450067 0.47544 L0.376106 0.441895 L0.264042 0.441895 L0.188966 0.47544 L0.113885 0.5435 L0.076905 0.646108 L0.076905 0.714187 L0.113885 0.815809 L0.188966 0.883886 L0.264042 0.918418 L0.376106 0.918418 L0.450067 0.883886 L0.525148 0.815809",r:"M0.107422 0.439941 L0.107422 0.960796 M0.107422 0.663164 L0.155824 0.551014 L0.252626 0.476607 L0.349428 0.439941 L0.49463 0.439941",s:"M0.475556 0.477535 L0.400757 0.439941 L0.276092 0.439941 L0.176361 0.477535 L0.101563 0.553823 L0.101563 0.630112 L0.176361 0.668808 L0.301024 0.668808 L0.425688 0.745099 L0.50049 0.821387 L0.50049 0.897677 L0.425688 0.93527 L0.325956 0.973965 L0.201295 0.973965 L0.126496 0.93527 L0.101563 0.858979",t:"M0.246032 0.297852 L0.246032 0.826549 L0.301023 0.919323 L0.411011 0.950848 L0.520997 0.950848 M0.081055 0.515799 L0.466004 0.515799",u:"M0.092041 0.454102 L0.092041 0.826134 L0.13018 0.937211 L0.205936 0.974954 L0.319832 0.974954 L0.396113 0.937211 L0.510011 0.826134 M0.510011 0.454102 L0.510011 0.974954",v:"M0.048828 0.453125 L0.301026 0.961719 M0.553224 0.453125 L0.301026 0.961719",w:"M0 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.451539 0.961719 M0.602052 0.453125 L0.451539 0.961719",x:"M0.03711 0.453125 L0.564943 0.961719 M0.564943 0.453125 L0.03711 0.961719",y:"M0.084618 0.453125 L0.320232 0.921476 M0.55713 0.453125 L0.320232 0.921476 L0.242119 1.055289 L0.163369 1.122196 L0.084618 1.155166 L0.044922 1.155166",z:"M0.505373 0.452148 L0.09668 0.961651 M0.09668 0.452148 L0.505373 0.452148 M0.09668 0.961651 L0.505373 0.961651"},Ov={};for(const t in p8t){Ov[t]=[];const e=p8t[t].split("M").slice(1).map(n=>n.split("L").map(o=>o.trim().split(" ").map(parseFloat)));for(const n of e)for(let o=0;o<n.length-1;o++)Ov[t].push({x1:n[o][0],y1:1-n[o][1],x2:n[o+1][0],y2:1-n[o+1][1]})}var yho=.09,xho=.692052,Eho=.692052,Bho=1.152,bho=0,Sho=Ov,Qho={0:.692052,1:.692052,2:.692052,3:.692052,4:.692052,5:.692052,6:.692052,7:.692052,8:.692052,9:.692052,"!":.692052,'"':.692052,"#":.692052,$:.692052,"'":.692052,"(":.692052,")":.692052,"*":.692052,"+":.692052,",":.692052,"-":.692052,".":.692052,"/":.692052,"<":.692052,"=":.692052,">":.692052,A:.692052,B:.692052,C:.692052,D:.692052,E:.692052,F:.692052,G:.692052,H:.692052,I:.692052,J:.692052,K:.692052,L:.692052,M:.692052,N:.692052,O:.692052,P:.692052,Q:.692052,R:.692052,S:.692052,T:.692052,U:.692052,V:.692052,W:.692052,X:.692052,Y:.692052,Z:.692052,"[":.692052,"\\":.692052,"]":.692052,"^":.692052,_:.692052,a:.692052,b:.692052,c:.692052,d:.692052,e:.692052,f:.692052,g:.692052,h:.692052,i:.692052,j:.692052,k:.692052,l:.692052,m:.692052,n:.692052,o:.692052,p:.692052,q:.692052,r:.692052,s:.692052,t:.692052,u:.692052,v:.692052,w:.692052,x:.692052,y:.692052,z:.692052," ":.692052},vho={},Gv={glyphWidthRatio:xho,spaceWidthRatio:Eho,lineHeightRatio:Bho,strokeWidthRatio:yho,letterSpacingRatio:bho},rm=Uint8Array,Z3=Uint16Array,BQe=Int32Array,kce=new rm([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fce=new rm([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),bQe=new rm([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),m8t=function(t,e){for(var n=new Z3(31),o=0;o<31;++o)n[o]=e+=1<<t[o-1];for(var i=new BQe(n[30]),o=1;o<30;++o)for(var r=n[o];r<n[o+1];++r)i[r]=r-n[o]<<5|o;return{b:n,r:i}},_8t=m8t(kce,2),f8t=_8t.b,SQe=_8t.r;f8t[28]=258,SQe[258]=28;for(var I8t=m8t(Fce,0),who=I8t.b,C8t=I8t.r,QQe=new Z3(32768),gd=0;gd<32768;++gd){var Yv=(gd&43690)>>1|(gd&21845)<<1;Yv=(Yv&52428)>>2|(Yv&13107)<<2,Yv=(Yv&61680)>>4|(Yv&3855)<<4,QQe[gd]=((Yv&65280)>>8|(Yv&255)<<8)>>1}for(var T7=(function(t,e,n){for(var o=t.length,i=0,r=new Z3(e);i<o;++i)t[i]&&++r[t[i]-1];var s=new Z3(e);for(i=1;i<e;++i)s[i]=s[i-1]+r[i-1]<<1;var a;if(n){a=new Z3(1<<e);var A=15-e;for(i=0;i<o;++i)if(t[i])for(var c=i<<4|t[i],l=e-t[i],u=s[t[i]-1]++<<l,g=u|(1<<l)-1;u<=g;++u)a[QQe[u]>>A]=c}else for(a=new Z3(o),i=0;i<o;++i)t[i]&&(a[i]=QQe[s[t[i]-1]++]>>15-t[i]);return a}),Uv=new rm(288),gd=0;gd<144;++gd)Uv[gd]=8;for(var gd=144;gd<256;++gd)Uv[gd]=9;for(var gd=256;gd<280;++gd)Uv[gd]=7;for(var gd=280;gd<288;++gd)Uv[gd]=8;for(var GW=new rm(32),gd=0;gd<32;++gd)GW[gd]=5;var Pho=T7(Uv,9,0),Mho=T7(Uv,9,1),Dho=T7(GW,5,0),Nho=T7(GW,5,1),vQe=function(t){for(var e=t[0],n=1;n<t.length;++n)t[n]>e&&(e=t[n]);return e},pB=function(t,e,n){var o=e/8|0;return(t[o]|t[o+1]<<8)>>(e&7)&n},wQe=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(e&7)},PQe=function(t){return(t+7)/8|0},PH=function(t,e,n){return(e==null||e<0)&&(e=0),(n==null||n>t.length)&&(n=t.length),new rm(t.subarray(e,n))},Rho=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Sx=function(t,e,n){var o=new Error(e||Rho[t]);if(o.code=t,Error.captureStackTrace&&Error.captureStackTrace(o,Sx),!n)throw o;return o},y8t=function(t,e,n,o){var i=t.length,r=0;if(!i||e.f&&!e.l)return n||new rm(0);var s=!n,a=s||e.i!=2,A=e.i;s&&(n=new rm(i*3));var c=function(pe){var ye=n.length;if(pe>ye){var Me=new rm(Math.max(ye*2,pe));Me.set(n),n=Me}},l=e.f||0,u=e.p||0,g=e.b||0,h=e.l,d=e.d,p=e.m,m=e.n,_=i*8;do{if(!h){l=pB(t,u,1);var f=pB(t,u+1,3);if(u+=3,f)if(f==1)h=Mho,d=Nho,p=9,m=5;else if(f==2){var x=pB(t,u,31)+257,E=pB(t,u+10,15)+4,B=x+pB(t,u+5,31)+1;u+=14;for(var S=new rm(B),Q=new rm(19),w=0;w<E;++w)Q[bQe[w]]=pB(t,u+w*3,7);u+=E*3;for(var M=vQe(Q),k=(1<<M)-1,R=T7(Q,M,1),w=0;w<B;){var F=R[pB(t,u,k)];u+=F&15;var I=F>>4;if(I<16)S[w++]=I;else{var O=0,U=0;for(I==16?(U=3+pB(t,u,3),u+=2,O=S[w-1]):I==17?(U=3+pB(t,u,7),u+=3):I==18&&(U=11+pB(t,u,127),u+=7);U--;)S[w++]=O}}var Y=S.subarray(0,x),W=S.subarray(x);p=vQe(Y),m=vQe(W),h=T7(Y,p,1),d=T7(W,m,1)}else Sx(1);else{var I=PQe(u)+4,C=t[I-4]|t[I-3]<<8,y=I+C;if(y>i){A&&Sx(0);break}a&&c(g+C),n.set(t.subarray(I,y),g),e.b=g+=C,e.p=u=y*8,e.f=l;continue}if(u>_){A&&Sx(0);break}}a&&c(g+131072);for(var te=(1<<p)-1,j=(1<<m)-1,J=u;;J=u){var O=h[wQe(t,u)&te],oe=O>>4;if(u+=O&15,u>_){A&&Sx(0);break}if(O||Sx(2),oe<256)n[g++]=oe;else if(oe==256){J=u,h=null;break}else{var ie=oe-254;if(oe>264){var w=oe-257,ne=kce[w];ie=pB(t,u,(1<<ne)-1)+f8t[w],u+=ne}var le=d[wQe(t,u)&j],ge=le>>4;le||Sx(3),u+=le&15;var W=who[ge];if(ge>3){var ne=Fce[ge];W+=wQe(t,u)&(1<<ne)-1,u+=ne}if(u>_){A&&Sx(0);break}a&&c(g+131072);var _e=g+ie;if(g<W){var ue=r-W,fe=Math.min(W,_e);for(ue+g<0&&Sx(3);g<fe;++g)n[g]=o[ue+g]}for(;g<_e;++g)n[g]=n[g-W]}}e.l=h,e.p=J,e.b=g,e.f=l,h&&(l=1,e.m=p,e.d=d,e.n=m)}while(!l);return g!=n.length&&s?PH(n,0,g):n.subarray(0,g)},db=function(t,e,n){n<<=e&7;var o=e/8|0;t[o]|=n,t[o+1]|=n>>8},YW=function(t,e,n){n<<=e&7;var o=e/8|0;t[o]|=n,t[o+1]|=n>>8,t[o+2]|=n>>16},MQe=function(t,e){for(var n=[],o=0;o<t.length;++o)t[o]&&n.push({s:o,f:t[o]});var i=n.length,r=n.slice();if(!i)return{t:b8t,l:0};if(i==1){var s=new rm(n[0].s+1);return s[n[0].s]=1,{t:s,l:1}}n.sort(function(y,x){return y.f-x.f}),n.push({s:-1,f:25001});var a=n[0],A=n[1],c=0,l=1,u=2;for(n[0]={s:-1,f:a.f+A.f,l:a,r:A};l!=i-1;)a=n[n[c].f<n[u].f?c++:u++],A=n[c!=l&&n[c].f<n[u].f?c++:u++],n[l++]={s:-1,f:a.f+A.f,l:a,r:A};for(var g=r[0].s,o=1;o<i;++o)r[o].s>g&&(g=r[o].s);var h=new Z3(g+1),d=DQe(n[l-1],h,0);if(d>e){var o=0,p=0,m=d-e,_=1<<m;for(r.sort(function(x,E){return h[E.s]-h[x.s]||x.f-E.f});o<i;++o){var f=r[o].s;if(h[f]>e)p+=_-(1<<d-h[f]),h[f]=e;else break}for(p>>=m;p>0;){var I=r[o].s;h[I]<e?p-=1<<e-h[I]++-1:++o}for(;o>=0&&p;--o){var C=r[o].s;h[C]==e&&(--h[C],++p)}d=e}return{t:new rm(h),l:d}},DQe=function(t,e,n){return t.s==-1?Math.max(DQe(t.l,e,n+1),DQe(t.r,e,n+1)):e[t.s]=n},x8t=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new Z3(++e),o=0,i=t[0],r=1,s=function(A){n[o++]=A},a=1;a<=e;++a)if(t[a]==i&&a!=e)++r;else{if(!i&&r>2){for(;r>138;r-=138)s(32754);r>2&&(s(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(s(i),--r;r>6;r-=6)s(8304);r>2&&(s(r-3<<5|8208),r=0)}for(;r--;)s(i);r=1,i=t[a]}return{c:n.subarray(0,o),n:e}},UW=function(t,e){for(var n=0,o=0;o<e.length;++o)n+=t[o]*e[o];return n},E8t=function(t,e,n){var o=n.length,i=PQe(e+2);t[i]=o&255,t[i+1]=o>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var r=0;r<o;++r)t[i+r+4]=n[r];return(i+4+o)*8},B8t=function(t,e,n,o,i,r,s,a,A,c,l){db(e,l++,n),++i[256];for(var u=MQe(i,15),g=u.t,h=u.l,d=MQe(r,15),p=d.t,m=d.l,_=x8t(g),f=_.c,I=_.n,C=x8t(p),y=C.c,x=C.n,E=new Z3(19),B=0;B<f.length;++B)++E[f[B]&31];for(var B=0;B<y.length;++B)++E[y[B]&31];for(var S=MQe(E,7),Q=S.t,w=S.l,M=19;M>4&&!Q[bQe[M-1]];--M);var k=c+5<<3,R=UW(i,Uv)+UW(r,GW)+s,F=UW(i,g)+UW(r,p)+s+14+3*M+UW(E,Q)+2*E[16]+3*E[17]+7*E[18];if(A>=0&&k<=R&&k<=F)return E8t(e,l,t.subarray(A,A+c));var O,U,Y,W;if(db(e,l,1+(F<R)),l+=2,F<R){O=T7(g,h,0),U=g,Y=T7(p,m,0),W=p;var te=T7(Q,w,0);db(e,l,I-257),db(e,l+5,x-1),db(e,l+10,M-4),l+=14;for(var B=0;B<M;++B)db(e,l+3*B,Q[bQe[B]]);l+=3*M;for(var j=[f,y],J=0;J<2;++J)for(var oe=j[J],B=0;B<oe.length;++B){var ie=oe[B]&31;db(e,l,te[ie]),l+=Q[ie],ie>15&&(db(e,l,oe[B]>>5&127),l+=oe[B]>>12)}}else O=Pho,U=Uv,Y=Dho,W=GW;for(var B=0;B<a;++B){var ne=o[B];if(ne>255){var ie=ne>>18&31;YW(e,l,O[ie+257]),l+=U[ie+257],ie>7&&(db(e,l,ne>>23&31),l+=kce[ie]);var le=ne&31;YW(e,l,Y[le]),l+=W[le],le>3&&(YW(e,l,ne>>5&8191),l+=Fce[le])}else YW(e,l,O[ne]),l+=U[ne]}return YW(e,l,O[256]),l+U[256]},Tho=new BQe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),b8t=new rm(0),kho=function(t,e,n,o,i,r){var s=r.z||t.length,a=new rm(o+s+5*(1+Math.ceil(s/7e3))+i),A=a.subarray(o,a.length-i),c=r.l,l=(r.r||0)&7;if(e){l&&(A[0]=r.r>>3);for(var u=Tho[e-1],g=u>>13,h=u&8191,d=(1<<n)-1,p=r.p||new Z3(32768),m=r.h||new Z3(d+1),_=Math.ceil(n/3),f=2*_,I=function(ve){return(t[ve]^t[ve+1]<<_^t[ve+2]<<f)&d},C=new BQe(25e3),y=new Z3(288),x=new Z3(32),E=0,B=0,S=r.i||0,Q=0,w=r.w||0,M=0;S+2<s;++S){var k=I(S),R=S&32767,F=m[k];if(p[R]=F,m[k]=R,w<=S){var O=s-S;if((E>7e3||Q>24576)&&(O>423||!c)){l=B8t(t,A,0,C,y,x,B,Q,M,S-M,l),Q=E=B=0,M=S;for(var U=0;U<286;++U)y[U]=0;for(var U=0;U<30;++U)x[U]=0}var Y=2,W=0,te=h,j=R-F&32767;if(O>2&&k==I(S-j))for(var J=Math.min(g,O)-1,oe=Math.min(32767,S),ie=Math.min(258,O);j<=oe&&--te&&R!=F;){if(t[S+Y]==t[S+Y-j]){for(var ne=0;ne<ie&&t[S+ne]==t[S+ne-j];++ne);if(ne>Y){if(Y=ne,W=j,ne>J)break;for(var le=Math.min(j,ne-2),ge=0,U=0;U<le;++U){var _e=S-j+U&32767,ue=p[_e],fe=_e-ue&32767;fe>ge&&(ge=fe,F=_e)}}}R=F,F=p[R],j+=R-F&32767}if(W){C[Q++]=268435456|SQe[Y]<<18|C8t[W];var pe=SQe[Y]&31,ye=C8t[W]&31;B+=kce[pe]+Fce[ye],++y[257+pe],++x[ye],w=S+Y,++E}else C[Q++]=t[S],++y[t[S]]}}for(S=Math.max(S,w);S<s;++S)C[Q++]=t[S],++y[t[S]];l=B8t(t,A,c,C,y,x,B,Q,M,S-M,l),c||(r.r=l&7|A[l/8|0]<<3,l-=7,r.h=m,r.p=p,r.i=S,r.w=w)}else{for(var S=r.w||0;S<s+c;S+=65535){var Me=S+65535;Me>=s&&(A[l/8|0]=c,Me=s),l=E8t(A,l+1,t.subarray(S,Me))}r.i=s}return PH(a,0,o+PQe(l)+i)},Fho=(function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var n=e,o=9;--o;)n=(n&1&&-306674912)^n>>>1;t[e]=n}return t})(),Lho=function(){var t=-1;return{p:function(e){for(var n=t,o=0;o<e.length;++o)n=Fho[n&255^e[o]]^n>>>8;t=n},d:function(){return~t}}},S8t=function(){var t=1,e=0;return{p:function(n){for(var o=t,i=e,r=n.length|0,s=0;s!=r;){for(var a=Math.min(s+2655,r);s<a;++s)i+=o+=n[s];o=(o&65535)+15*(o>>16),i=(i&65535)+15*(i>>16)}t=o,e=i},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},Q8t=function(t,e,n,o,i){if(!i&&(i={l:1},e.dictionary)){var r=e.dictionary.subarray(-32768),s=new rm(r.length+t.length);s.set(r),s.set(t,r.length),t=s,i.w=r.length}return kho(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,o,i)},KW=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},Hho=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&KW(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var o=0;o<=n.length;++o)t[o+10]=n.charCodeAt(o)}},Oho=function(t){return 10+(t.filename?t.filename.length+1:0)},Gho=function(t,e){var n=e.level,o=n==0?0:n<6?1:n==9?3:2;if(t[0]=120,t[1]=o<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var i=S8t();i.p(e.dictionary),KW(t,2,i.d())}},v8t=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Sx(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&Sx(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2},NQe=(function(){function t(e,n){typeof e=="function"&&(n=e,e={}),this.ondata=n;var o=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:o?o.length:0},this.o=new rm(32768),this.p=new rm(0),o&&this.o.set(o)}return t.prototype.e=function(e){if(this.ondata||Sx(5),this.d&&Sx(4),!this.p.length)this.p=e;else if(e.length){var n=new rm(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length),this.p=n}},t.prototype.c=function(e){this.s.i=+(this.d=e||!1);var n=this.s.b,o=y8t(this.p,this.s,this.o);this.ondata(PH(o,n,this.s.b),this.d),this.o=PH(o,this.s.b-32768),this.s.b=this.o.length,this.p=PH(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(e,n){this.e(e),this.c(n)},t})();function RQe(t,e){e||(e={});var n=Lho(),o=t.length;n.p(t);var i=Q8t(t,e,Oho(e),8),r=i.length;return Hho(i,e),KW(i,r-8,n.d()),KW(i,r-4,o),i}function w8t(t,e){e||(e={});var n=S8t();n.p(t);var o=Q8t(t,e,e.dictionary?6:2,4);return Gho(o,e),KW(o,o.length-4,n.d()),o}var Lce=(function(){function t(e,n){NQe.call(this,e,n),this.v=e&&e.dictionary?2:1}return t.prototype.push=function(e,n){if(NQe.prototype.e.call(this,e),this.v){if(this.p.length<6&&!n)return;this.p=this.p.subarray(v8t(this.p,this.v-1)),this.v=0}n&&(this.p.length<4&&Sx(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),NQe.prototype.c.call(this,n)},t})();function Yho(t,e){return y8t(t.subarray(v8t(t,e),-4),{i:2},e,e)}var P8t=typeof TextEncoder<"u"&&new TextEncoder,Uho=typeof TextDecoder<"u"&&new TextDecoder,Kho=0;try{Uho.decode(b8t,{stream:!0}),Kho=1}catch{}function TQe(t,e){var n;if(P8t)return P8t.encode(t);for(var o=t.length,i=new rm(t.length+(t.length>>1)),r=0,s=function(c){i[r++]=c},n=0;n<o;++n){if(r+5>i.length){var a=new rm(r+8+(o-n<<1));a.set(i),i=a}var A=t.charCodeAt(n);A<128||e?s(A):A<2048?(s(192|A>>6),s(128|A&63)):A>55295&&A<57344?(A=65536+(A&1047552)|t.charCodeAt(++n)&1023,s(240|A>>18),s(128|A>>12&63),s(128|A>>6&63),s(128|A&63)):(s(224|A>>12),s(128|A>>6&63),s(128|A&63))}return PH(i,0,r)}function M8t(t,e="utf8"){return new TextDecoder(e).decode(t)}const Vho=new TextEncoder;function zho(t){return Vho.encode(t)}const Jho=1024*8,Who=(()=>{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)&t[0])})(),kQe={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class VW{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(e=Jho,n={}){let o=!1;typeof e=="number"?e=new ArrayBuffer(e):(o=!0,this.lastWrittenByte=e.byteLength);const i=n.offset?n.offset>>>0:0,r=e.byteLength-i;let s=i;(ArrayBuffer.isView(e)||e instanceof VW)&&(e.byteLength!==e.buffer.byteLength&&(s=e.byteOffset+i),e=e.buffer),o?this.lastWrittenByte=r:this.lastWrittenByte=0,this.buffer=e,this.length=r,this.byteLength=r,this.byteOffset=s,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,s,r),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const o=(this.offset+e)*2,i=new Uint8Array(o);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=o,this.byteLength=o,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,n){const o=kQe[n].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,r=this.buffer.slice(i,i+o);if(this.littleEndian===Who&&n!=="uint8"&&n!=="int8"){const a=new Uint8Array(this.buffer.slice(i,i+o));a.reverse();const A=new kQe[n](a.buffer);return this.offset+=o,A.reverse(),A}const s=new kQe[n](r);return this.offset+=o,s}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let n="";for(let o=0;o<e;o++)n+=this.readChar();return n}readUtf8(e=1){return M8t(this.readBytes(e))}decodeText(e=1,n="utf8"){return M8t(this.readBytes(e),n)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let n=0;n<e.length;n++)this._data.setUint8(this.offset++,e[n]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let n=0;n<e.length;n++)this.writeUint8(e.charCodeAt(n));return this}writeUtf8(e){return this.writeBytes(zho(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}const D8t=[];for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e&1?e=3988292384^e>>>1:e=e>>>1;D8t[t]=e}const N8t=4294967295;function jho(t,e,n){let o=t;for(let i=0;i<n;i++)o=D8t[(o^e[i])&255]^o>>>8;return o}function R8t(t,e){return(jho(N8t,t,e)^N8t)>>>0}function T8t(t,e,n){const o=t.readUint32(),i=R8t(new Uint8Array(t.buffer,t.byteOffset+t.offset-e-4,e),e);if(i!==o)throw new Error(`CRC mismatch for chunk ${n}. Expected ${o}, found ${i}`)}function MH(t,e){t.writeUint32(R8t(new Uint8Array(t.buffer,t.byteOffset+t.offset-e,e),e))}function k8t(t,e,n){for(let o=0;o<n;o++)e[o]=t[o]}function F8t(t,e,n,o){let i=0;for(;i<o;i++)e[i]=t[i];for(;i<n;i++)e[i]=t[i]+e[i-o]&255}function L8t(t,e,n,o){let i=0;if(n.length===0)for(;i<o;i++)e[i]=t[i];else for(;i<o;i++)e[i]=t[i]+n[i]&255}function H8t(t,e,n,o,i){let r=0;if(n.length===0){for(;r<i;r++)e[r]=t[r];for(;r<o;r++)e[r]=t[r]+(e[r-i]>>1)&255}else{for(;r<i;r++)e[r]=t[r]+(n[r]>>1)&255;for(;r<o;r++)e[r]=t[r]+(e[r-i]+n[r]>>1)&255}}function O8t(t,e,n,o,i){let r=0;if(n.length===0){for(;r<i;r++)e[r]=t[r];for(;r<o;r++)e[r]=t[r]+e[r-i]&255}else{for(;r<i;r++)e[r]=t[r]+n[r]&255;for(;r<o;r++)e[r]=t[r]+$ho(e[r-i],n[r],n[r-i])&255}}function $ho(t,e,n){const o=t+e-n,i=Math.abs(o-t),r=Math.abs(o-e),s=Math.abs(o-n);return i<=r&&i<=s?t:r<=s?e:n}function qho(t,e,n,o,i,r){switch(t){case 0:k8t(e,n,i);break;case 1:F8t(e,n,i,r);break;case 2:L8t(e,n,o,i);break;case 3:H8t(e,n,o,i,r);break;case 4:O8t(e,n,o,i,r);break;default:throw new Error(`Unsupported filter: ${t}`)}}const Xho=new Uint16Array([255]),Zho=new Uint8Array(Xho.buffer)[0]===255;function epo(t){const{data:e,width:n,height:o,channels:i,depth:r}=t,s=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],a=Math.ceil(r/8)*i,A=new Uint8Array(o*n*a);let c=0;for(let l=0;l<7;l++){const u=s[l],g=Math.ceil((n-u.x)/u.xStep),h=Math.ceil((o-u.y)/u.yStep);if(g<=0||h<=0)continue;const d=g*a,p=new Uint8Array(d);for(let m=0;m<h;m++){const _=e[c++],f=e.subarray(c,c+d);c+=d;const I=new Uint8Array(d);qho(_,f,I,p,d,a),p.set(I);for(let C=0;C<g;C++){const y=u.x+C*u.xStep,x=u.y+m*u.yStep;if(!(y>=n||x>=o))for(let E=0;E<a;E++)A[(x*n+y)*a+E]=I[C*a+E]}}}if(r===16){const l=new Uint16Array(A.buffer);if(Zho)for(let u=0;u<l.length;u++)l[u]=tpo(l[u]);return l}else return A}function tpo(t){return(t&255)<<8|t>>8&255}const npo=new Uint16Array([255]),opo=new Uint8Array(npo.buffer)[0]===255,ipo=new Uint8Array(0);function G8t(t){const{data:e,width:n,height:o,channels:i,depth:r}=t,s=Math.ceil(r/8)*i,a=Math.ceil(r/8*i*n),A=new Uint8Array(o*a);let c=ipo,l=0,u,g;for(let h=0;h<o;h++){switch(u=e.subarray(l+1,l+1+a),g=A.subarray(h*a,(h+1)*a),e[l]){case 0:k8t(u,g,a);break;case 1:F8t(u,g,a,s);break;case 2:L8t(u,g,c,a);break;case 3:H8t(u,g,c,a,s);break;case 4:O8t(u,g,c,a,s);break;default:throw new Error(`Unsupported filter: ${e[l]}`)}c=g,l+=a+1}if(r===16){const h=new Uint16Array(A.buffer);if(opo)for(let d=0;d<h.length;d++)h[d]=rpo(h[d]);return h}else return A}function rpo(t){return(t&255)<<8|t>>8&255}const zW=Uint8Array.of(137,80,78,71,13,10,26,10);function spo(t){t.writeBytes(zW)}function Y8t(t){if(!apo(t.readBytes(zW.length)))throw new Error("wrong PNG signature")}function apo(t){if(t.length<zW.length)return!1;for(let e=0;e<zW.length;e++)if(t[e]!==zW[e])return!1;return!0}const U8t="tEXt",K8t=0,V8t=new TextDecoder("latin1");function z8t(t){if(J8t(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}const Apo=/^[\u0000-\u00FF]*$/;function J8t(t){if(!Apo.test(t))throw new Error("invalid latin1 text")}function cpo(t,e,n){const o=W8t(e);t[o]=upo(e,n-o.length-1)}function lpo(t,e,n){z8t(e),J8t(n);const o=e.length+1+n.length;t.writeUint32(o),t.writeChars(U8t),t.writeChars(e),t.writeByte(K8t),t.writeChars(n),MH(t,o+4)}function W8t(t){for(t.mark();t.readByte()!==K8t;);const e=t.offset;t.reset();const n=V8t.decode(t.readBytes(e-t.offset-1));return t.skip(1),z8t(n),n}function upo(t,e){return V8t.decode(t.readBytes(e))}const qm={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Hce={UNKNOWN:-1,DEFLATE:0},FQe={UNKNOWN:-1,ADAPTIVE:0},Kv={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Oce={NONE:0,BACKGROUND:1,PREVIOUS:2},LQe={SOURCE:0,OVER:1};class gpo extends VW{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;_chunks;_inflatorResult;constructor(e,n={}){super(e);const{checkCrc:o=!1}=n;this._checkCrc=o,this._inflator=new Lce((i,r)=>{if(this._chunks.push(i),r){const s=this._chunks.reduce((A,c)=>A+c.length,0);this._inflatorResult=new Uint8Array(s);let a=0;for(const A of this._chunks)this._inflatorResult.set(A,a),a+=A.length;this._chunks=[]}}),this._chunks=[],this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=Hce.UNKNOWN,this._filterMethod=FQe.UNKNOWN,this._interlaceMethod=Kv.UNKNOWN,this._colorType=qm.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this._inflatorResult=new Uint8Array(0),this.setBigEndian()}decode(){for(Y8t(this);!this._end;){const e=this.readUint32(),n=this.readChars(4);this.decodeChunk(e,n)}return this._inflator.push(new Uint8Array(0),!0),this.decodeImage(),this._png}decodeApng(){for(Y8t(this);!this._end;){const e=this.readUint32(),n=this.readChars(4);this.decodeApngChunk(e,n)}return this.decodeApngImage(),this._apng}decodeChunk(e,n){const o=this.offset;switch(n){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case U8t:cpo(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-o!==e)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?T8t(this,e+4,n):this.skip(4)}decodeApngChunk(e,n){const o=this.offset;switch(n!=="fdAT"&&n!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),n){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,n),this.offset=o+e;break}if(this.offset-o!==e)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?T8t(this,e+4,n):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=dpo(this.readUint8());const n=this.readUint8();this._colorType=n;let o;switch(n){case qm.GREYSCALE:o=1;break;case qm.TRUECOLOUR:o=3;break;case qm.INDEXED_COLOUR:o=1;break;case qm.GREYSCALE_ALPHA:o=2;break;case qm.TRUECOLOUR_ALPHA:o=4;break;case qm.UNKNOWN:default:throw new Error(`Unknown color type: ${n}`)}if(this._png.channels=o,this._compressionMethod=this.readUint8(),this._compressionMethod!==Hce.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const n=e/3;this._hasPalette=!0;const o=[];this._palette=o;for(let i=0;i<n;i++)o.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const n=e,o=this.offset+this.byteOffset;try{this._inflator.push(new Uint8Array(this.buffer,o,n),!1)}catch(i){throw new Error("Error while decompressing the data:",{cause:i})}this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let n=e,o=this.offset+this.byteOffset;o+=4,n-=4;try{this._inflator.push(new Uint8Array(this.buffer,o,n),!1)}catch(i){throw new Error("Error while decompressing the data:",{cause:i})}this.skip(e)}decodetRNS(e){switch(this._colorType){case qm.GREYSCALE:case qm.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let n=0;n<e/2;n++)this._transparency[n]=this.readUint16();break}case qm.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let n=0;for(;n<e;n++){const o=this.readByte();this._palette[n].push(o)}for(;n<this._palette.length;n++)this._palette[n].push(255);break}case qm.UNKNOWN:case qm.GREYSCALE_ALPHA:case qm.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const n=W8t(this),o=this.readUint8();if(o!==Hce.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${o}`);const i=this.readBytes(e-n.length-2);this._png.iccEmbeddedProfile={name:n,profile:Yho(i)}}decodepHYs(){const e=this.readUint32(),n=this.readUint32(),o=this.readByte();this._png.resolution={x:e,y:n,unit:o}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const n={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},o=this._frames.at(e);if(o){if(o.data=G8t({data:o.data,width:o.width,height:o.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||o.xOffset===0&&o.yOffset===0&&o.width===this._png.width&&o.height===this._png.height)n.data=o.data;else{const i=this._apng.frames.at(e-1);this.disposeFrame(o,i,n),this.addFrameDataToCanvas(n,o)}this._apng.frames.push(n)}}return this._apng}disposeFrame(e,n,o){switch(e.disposeOp){case Oce.NONE:break;case Oce.BACKGROUND:for(let i=0;i<this._png.height;i++)for(let r=0;r<this._png.width;r++){const s=(i*e.width+r)*this._png.channels;for(let a=0;a<this._png.channels;a++)o.data[s+a]=0}break;case Oce.PREVIOUS:o.data.set(n.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,n){const o=1<<this._png.depth,i=(r,s)=>{const a=((r+n.yOffset)*this._png.width+n.xOffset+s)*this._png.channels,A=(r*n.width+s)*this._png.channels;return{index:a,frameIndex:A}};switch(n.blendOp){case LQe.SOURCE:for(let r=0;r<n.height;r++)for(let s=0;s<n.width;s++){const{index:a,frameIndex:A}=i(r,s);for(let c=0;c<this._png.channels;c++)e.data[a+c]=n.data[A+c]}break;case LQe.OVER:for(let r=0;r<n.height;r++)for(let s=0;s<n.width;s++){const{index:a,frameIndex:A}=i(r,s);for(let c=0;c<this._png.channels;c++){const l=n.data[A+this._png.channels-1]/o,u=c%(this._png.channels-1)===0?1:n.data[A+c],g=Math.floor(l*u+(1-l)*e.data[a+c]);e.data[a+c]+=g}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){const e=this._inflatorResult;if(this._filterMethod!==FQe.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Kv.NO_INTERLACE)this._png.data=G8t({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Kv.ADAM7)this._png.data=epo({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){this._inflator.push(new Uint8Array(0),!0);const e=this._inflatorResult,n=this._frames.at(-1);n?n.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Oce.NONE,blendOp:LQe.SOURCE,data:e}),this._inflator=new Lce((o,i)=>{if(this._chunks.push(o),i){const r=this._chunks.reduce((a,A)=>a+A.length,0);this._inflatorResult=new Uint8Array(r);let s=0;for(const a of this._chunks)this._inflatorResult.set(a,s),s+=a.length;this._chunks=[]}}),this._chunks=[],this._writingDataChunks=!1}}function dpo(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}const hpo={level:3};class ppo extends VW{_png;_zlibOptions;_colorType;_interlaceMethod;constructor(e,n={}){super(),this._colorType=qm.UNKNOWN,this._zlibOptions={...hpo,...n.zlib},this._png=this._checkData(e),this._interlaceMethod=(n.interlace==="Adam7"?Kv.ADAM7:Kv.NO_INTERLACE)??Kv.NO_INTERLACE,this.setBigEndian()}encode(){if(spo(this),this.encodeIHDR(),this._png.palette&&(this.encodePLTE(),this._png.palette[0].length===4&&this.encodeTRNS()),this.encodeData(),this._png.text)for(const[e,n]of Object.entries(this._png.text))lpo(this,e,n);return this.encodeIEND(),this.toArray()}encodeIHDR(){this.writeUint32(13),this.writeChars("IHDR"),this.writeUint32(this._png.width),this.writeUint32(this._png.height),this.writeByte(this._png.depth),this.writeByte(this._colorType),this.writeByte(Hce.DEFLATE),this.writeByte(FQe.ADAPTIVE),this.writeByte(this._interlaceMethod),MH(this,17)}encodeIEND(){this.writeUint32(0),this.writeChars("IEND"),MH(this,4)}encodePLTE(){const e=this._png.palette?.length*3;this.writeUint32(e),this.writeChars("PLTE");for(const n of this._png.palette)this.writeByte(n[0]),this.writeByte(n[1]),this.writeByte(n[2]);MH(this,4+e)}encodeTRNS(){const e=this._png.palette.filter(n=>n.at(-1)!==255);this.writeUint32(e.length),this.writeChars("tRNS");for(const n of e)this.writeByte(n.at(-1));MH(this,4+e.length)}encodeIDAT(e){this.writeUint32(e.length),this.writeChars("IDAT"),this.writeBytes(e),MH(this,e.length+4)}encodeData(){const{width:e,height:n,channels:o,depth:i,data:r}=this._png,s=i<=8?Math.ceil(e*i/8)*o:Math.ceil(e*i/8*o/2),a=new VW().setBigEndian();let A=0;if(this._interlaceMethod===Kv.NO_INTERLACE)for(let u=0;u<n;u++)a.writeByte(0),i===16?A=Ipo(r,a,s,A):A=_po(r,a,s,A);else this._interlaceMethod===Kv.ADAM7&&(A=fpo(this._png,r,a,A));const c=a.toArray(),l=w8t(c,this._zlibOptions);this.encodeIDAT(l)}_checkData(e){const{colorType:n,channels:o,depth:i}=mpo(e,e.palette),r={width:j8t(e.width,"width"),height:j8t(e.height,"height"),channels:o,data:e.data,depth:i,text:e.text,palette:e.palette};this._colorType=n;const s=i<8?Math.ceil(r.width*i/8)*r.height*o:r.width*r.height*o;if(r.data.length!==s)throw new RangeError(`wrong data size. Found ${r.data.length}, expected ${s}`);return r}}function j8t(t,e){if(Number.isInteger(t)&&t>0)return t;throw new TypeError(`${e} must be a positive integer`)}function mpo(t,e){const{channels:n=4,depth:o=8}=t;if(n!==4&&n!==3&&n!==2&&n!==1)throw new RangeError(`unsupported number of channels: ${n}`);const i={channels:n,depth:o,colorType:qm.UNKNOWN};switch(n){case 4:i.colorType=qm.TRUECOLOUR_ALPHA;break;case 3:i.colorType=qm.TRUECOLOUR;break;case 1:e?i.colorType=qm.INDEXED_COLOUR:i.colorType=qm.GREYSCALE;break;case 2:i.colorType=qm.GREYSCALE_ALPHA;break;default:throw new Error("unsupported number of channels")}return i}function _po(t,e,n,o){for(let i=0;i<n;i++)e.writeByte(t[o++]);return o}function fpo(t,e,n,o){const i=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],{width:r,height:s,channels:a,depth:A}=t;let c;A===16?c=a*A/8/2:c=a*A/8;for(let l=0;l<7;l++){const u=i[l],g=Math.floor((r-u.x+u.xStep-1)/u.xStep),h=Math.floor((s-u.y+u.yStep-1)/u.yStep);if(g<=0||h<=0)continue;const d=g*c;for(let p=0;p<h;p++){const m=u.y+p*u.yStep,_=A<=8?new Uint8Array(d):new Uint16Array(d);let f=0;for(let I=0;I<g;I++){const C=u.x+I*u.xStep;if(C<r&&m<s){const y=(m*r+C)*c;for(let x=0;x<c;x++)_[f++]=e[y+x]}}if(n.writeByte(0),A===8)n.writeBytes(_);else if(A===16)for(const I of _)n.writeByte(I>>8&255),n.writeByte(I&255)}}return o}function Ipo(t,e,n,o){for(let i=0;i<n;i++)e.writeUint16(t[o++]);return o}function Cpo(t,e){return new gpo(t,e).decode()}function ypo(t,e){return new ppo(t,e).encode()}function ca(){return ca=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ca.apply(null,arguments)}function xpo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function JW(t,e){return JW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},JW(t,e)}function NN(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,JW(t,e)}function HQe(t){return HQe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HQe(t)}function Epo(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function $8t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($8t=function(){return!!t})()}function Bpo(t,e,n){if($8t())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var i=new(t.bind.apply(t,o));return n&&JW(i,n.prototype),i}function OQe(t){var e=typeof Map=="function"?new Map:void 0;return OQe=function(o){if(o===null||!Epo(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Bpo(o,arguments,HQe(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),JW(i,o)},OQe(t)}var bpo={env:{}},Spo={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).

`,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).

`,3:`Passed an incorrect argument to a color function, please pass a string representation of a color.

`,4:`Couldn't generate valid rgb string from %s, it returned %s.

`,5:`Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.

`,6:`Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).

`,7:`Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).

`,8:`Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.

`,9:`Please provide a number of steps to the modularScale helper.

`,10:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.

`,11:`Invalid value passed as base to modularScale, expected number or em string but got "%s"

`,12:`Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.

`,13:`Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.

`,14:`Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.

`,15:`Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.

`,16:`You must provide a template to this method.

`,17:`You passed an unsupported selector state to this method.

`,18:`minScreen and maxScreen must be provided as stringified numbers with the same units.

`,19:`fromSize and toSize must be provided as stringified numbers with the same units.

`,20:`expects either an array of objects or a single object with the properties prop, fromSize, and toSize.

`,21:"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",22:"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",23:`fontFace expects a name of a font-family.

`,24:`fontFace expects either the path to the font file(s) or a name of a local copy.

`,25:`fontFace expects localFonts to be an array.

`,26:`fontFace expects fileFormats to be an array.

`,27:`radialGradient requries at least 2 color-stops to properly render.

`,28:`Please supply a filename to retinaImage() as the first argument.

`,29:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.

`,30:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",31:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation

`,32:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')

`,33:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation

`,34:`borderRadius expects a radius value as a string or number as the second argument.

`,35:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.

`,36:`Property must be a string value.

`,37:`Syntax Error at %s.

`,38:`Formula contains a function that needs parentheses at %s.

`,39:`Formula is missing closing parenthesis at %s.

`,40:`Formula has too many closing parentheses at %s.

`,41:`All values in a formula must have the same unit or be unitless.

`,42:`Please provide a number of steps to the modularScale helper.

`,43:`Please pass a number or one of the predefined scales to the modularScale helper as the ratio.

`,44:`Invalid value passed as base to modularScale, expected number or em/rem string but got %s.

`,45:`Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.

`,46:`Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.

`,47:`minScreen and maxScreen must be provided as stringified numbers with the same units.

`,48:`fromSize and toSize must be provided as stringified numbers with the same units.

`,49:`Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.

`,50:`Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.

`,51:`Expects the first argument object to have the properties prop, fromSize, and toSize.

`,52:`fontFace expects either the path to the font file(s) or a name of a local copy.

`,53:`fontFace expects localFonts to be an array.

`,54:`fontFace expects fileFormats to be an array.

`,55:`fontFace expects a name of a font-family.

`,56:`linearGradient requries at least 2 color-stops to properly render.

`,57:`radialGradient requries at least 2 color-stops to properly render.

`,58:`Please supply a filename to retinaImage() as the first argument.

`,59:`Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.

`,60:"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",61:`Property must be a string value.

`,62:`borderRadius expects a radius value as a string or number as the second argument.

`,63:`borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.

`,64:`The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.

`,65:`To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').

`,66:`The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.

`,67:`You must provide a template to this method.

`,68:`You passed an unsupported selector state to this method.

`,69:`Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.

`,70:`Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.

`,71:`Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.

`,72:`Passed invalid base value %s to %s(), please pass a value like "12px" or 12.

`,73:`Please provide a valid CSS variable.

`,74:`CSS variable not found and no default was provided.

`,75:`important requires a valid style object, got a %s instead.

`,76:`fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.

`,77:`remToPx expects a value in "rem" but you provided it in "%s".

`,78:`base must be set in "px" or "%" but you set it in "%s".
`};function Qpo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=e[0],i=[],r;for(r=1;r<e.length;r+=1)i.push(e[r]);return i.forEach(function(s){o=o.replace(/%[a-z]/,s)}),o}var k7=(function(t){NN(e,t);function e(n){var o;if(bpo.env.NODE_ENV==="production")o=t.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this;else{for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];o=t.call(this,Qpo.apply(void 0,[Spo[n]].concat(r)))||this}return xpo(o)}return e})(OQe(Error));function GQe(t){return Math.round(t*255)}function vpo(t,e,n){return GQe(t)+","+GQe(e)+","+GQe(n)}function Gce(t,e,n,o){if(o===void 0&&(o=vpo),e===0)return o(n,n,n);var i=(t%360+360)%360/60,r=(1-Math.abs(2*n-1))*e,s=r*(1-Math.abs(i%2-1)),a=0,A=0,c=0;i>=0&&i<1?(a=r,A=s):i>=1&&i<2?(a=s,A=r):i>=2&&i<3?(A=r,c=s):i>=3&&i<4?(A=s,c=r):i>=4&&i<5?(a=s,c=r):i>=5&&i<6&&(a=r,c=s);var l=n-r/2,u=a+l,g=A+l,h=c+l;return o(u,g,h)}var q8t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function wpo(t){if(typeof t!="string")return t;var e=t.toLowerCase();return q8t[e]?"#"+q8t[e]:t}var Ppo=/^#[a-fA-F0-9]{6}$/,Mpo=/^#[a-fA-F0-9]{8}$/,Dpo=/^#[a-fA-F0-9]{3}$/,Npo=/^#[a-fA-F0-9]{4}$/,YQe=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,Rpo=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,Tpo=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,kpo=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function WW(t){if(typeof t!="string")throw new k7(3);var e=wpo(t);if(e.match(Ppo))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(Mpo)){var n=parseFloat((parseInt(""+e[7]+e[8],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16),alpha:n}}if(e.match(Dpo))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};if(e.match(Npo)){var o=parseFloat((parseInt(""+e[4]+e[4],16)/255).toFixed(2));return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16),alpha:o}}var i=YQe.exec(e);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var r=Rpo.exec(e.substring(0,50));if(r)return{red:parseInt(""+r[1],10),green:parseInt(""+r[2],10),blue:parseInt(""+r[3],10),alpha:parseFloat(""+r[4])>1?parseFloat(""+r[4])/100:parseFloat(""+r[4])};var s=Tpo.exec(e);if(s){var a=parseInt(""+s[1],10),A=parseInt(""+s[2],10)/100,c=parseInt(""+s[3],10)/100,l="rgb("+Gce(a,A,c)+")",u=YQe.exec(l);if(!u)throw new k7(4,e,l);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10)}}var g=kpo.exec(e.substring(0,50));if(g){var h=parseInt(""+g[1],10),d=parseInt(""+g[2],10)/100,p=parseInt(""+g[3],10)/100,m="rgb("+Gce(h,d,p)+")",_=YQe.exec(m);if(!_)throw new k7(4,e,m);return{red:parseInt(""+_[1],10),green:parseInt(""+_[2],10),blue:parseInt(""+_[3],10),alpha:parseFloat(""+g[4])>1?parseFloat(""+g[4])/100:parseFloat(""+g[4])}}throw new k7(5)}function Fpo(t){var e=t.red/255,n=t.green/255,o=t.blue/255,i=Math.max(e,n,o),r=Math.min(e,n,o),s=(i+r)/2;if(i===r)return t.alpha!==void 0?{hue:0,saturation:0,lightness:s,alpha:t.alpha}:{hue:0,saturation:0,lightness:s};var a,A=i-r,c=s>.5?A/(2-i-r):A/(i+r);switch(i){case e:a=(n-o)/A+(n<o?6:0);break;case n:a=(o-e)/A+2;break;default:a=(e-n)/A+4;break}return a*=60,t.alpha!==void 0?{hue:a,saturation:c,lightness:s,alpha:t.alpha}:{hue:a,saturation:c,lightness:s}}function Vv(t){return Fpo(WW(t))}var Lpo=function(e){return e.length===7&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e},UQe=Lpo;function RN(t){var e=t.toString(16);return e.length===1?"0"+e:e}function KQe(t){return RN(Math.round(t*255))}function Hpo(t,e,n){return UQe("#"+KQe(t)+KQe(e)+KQe(n))}function X8t(t,e,n){return Gce(t,e,n,Hpo)}function Opo(t,e,n){if(typeof t=="object"&&e===void 0&&n===void 0)return X8t(t.hue,t.saturation,t.lightness);throw new k7(1)}function Gpo(t,e,n,o){if(typeof t=="object"&&e===void 0&&n===void 0&&o===void 0)return t.alpha>=1?X8t(t.hue,t.saturation,t.lightness):"rgba("+Gce(t.hue,t.saturation,t.lightness)+","+t.alpha+")";throw new k7(2)}function Z8t(t,e,n){if(typeof t=="number"&&typeof e=="number"&&typeof n=="number")return UQe("#"+RN(t)+RN(e)+RN(n));if(typeof t=="object"&&e===void 0&&n===void 0)return UQe("#"+RN(t.red)+RN(t.green)+RN(t.blue));throw new k7(6)}function Yce(t,e,n,o){if(typeof t=="object"&&e===void 0&&n===void 0&&o===void 0)return t.alpha>=1?Z8t(t.red,t.green,t.blue):"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")";throw new k7(7)}var Ypo=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},Upo=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},Kpo=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},Vpo=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function zv(t){if(typeof t!="object")throw new k7(8);if(Upo(t))return Yce(t);if(Ypo(t))return Z8t(t);if(Vpo(t))return Gpo(t);if(Kpo(t))return Opo(t);throw new k7(8)}function ebt(t,e,n){return function(){var i=n.concat(Array.prototype.slice.call(arguments));return i.length>=e?t.apply(this,i):ebt(t,e,i)}}function eE(t){return ebt(t,t.length,[])}function zpo(t,e){if(e==="transparent")return e;var n=Vv(e);return zv(ca({},n,{hue:n.hue+parseFloat(t)}))}eE(zpo);function DH(t,e,n){return Math.max(t,Math.min(e,n))}function Jpo(t,e){if(e==="transparent")return e;var n=Vv(e);return zv(ca({},n,{lightness:DH(0,1,n.lightness-parseFloat(t))}))}eE(Jpo);function Wpo(t,e){if(e==="transparent")return e;var n=Vv(e);return zv(ca({},n,{saturation:DH(0,1,n.saturation-parseFloat(t))}))}eE(Wpo);function jpo(t,e){if(e==="transparent")return e;var n=Vv(e);return zv(ca({},n,{lightness:DH(0,1,n.lightness+parseFloat(t))}))}var $po=eE(jpo),qpo=$po;function Xpo(t,e,n){if(e==="transparent")return n;if(n==="transparent")return e;if(t===0)return n;var o=WW(e),i=ca({},o,{alpha:typeof o.alpha=="number"?o.alpha:1}),r=WW(n),s=ca({},r,{alpha:typeof r.alpha=="number"?r.alpha:1}),a=i.alpha-s.alpha,A=parseFloat(t)*2-1,c=A*a===-1?A:A+a,l=1+A*a,u=(c/l+1)/2,g=1-u,h={red:Math.floor(i.red*u+s.red*g),green:Math.floor(i.green*u+s.green*g),blue:Math.floor(i.blue*u+s.blue*g),alpha:i.alpha*parseFloat(t)+s.alpha*(1-parseFloat(t))};return Yce(h)}var Zpo=eE(Xpo),tbt=Zpo;function emo(t,e){if(e==="transparent")return e;var n=WW(e),o=typeof n.alpha=="number"?n.alpha:1,i=ca({},n,{alpha:DH(0,1,(o*100+parseFloat(t)*100)/100)});return Yce(i)}eE(emo);function tmo(t,e){if(e==="transparent")return e;var n=Vv(e);return zv(ca({},n,{saturation:DH(0,1,n.saturation+parseFloat(t))}))}eE(tmo);function nmo(t,e){return e==="transparent"?e:zv(ca({},Vv(e),{hue:parseFloat(t)}))}eE(nmo);function omo(t,e){return e==="transparent"?e:zv(ca({},Vv(e),{lightness:parseFloat(t)}))}eE(omo);function imo(t,e){return e==="transparent"?e:zv(ca({},Vv(e),{saturation:parseFloat(t)}))}eE(imo);function rmo(t,e){return e==="transparent"?e:tbt(parseFloat(t),"rgb(0, 0, 0)",e)}eE(rmo);function smo(t,e){return e==="transparent"?e:tbt(parseFloat(t),"rgb(255, 255, 255)",e)}eE(smo);function amo(t,e){if(e==="transparent")return e;var n=WW(e),o=typeof n.alpha=="number"?n.alpha:1,i=ca({},n,{alpha:DH(0,1,+(o*100-parseFloat(t)*100).toFixed(2)/100)});return Yce(i)}eE(amo);var Jv=1e-9,Uce=(t,e,n)=>t>=e-Jv&&t<=n+Jv,Amo=t=>{const e=[];for(const n of t)e.some(o=>Math.abs(o.x-n.x)<Jv&&Math.abs(o.y-n.y)<Jv)||e.push(n);return e};function nbt(t,e){const{origin:n,directionVector:o}=t;if(Math.abs(o.x)<Jv&&Math.abs(o.y)<Jv)return null;const i=[];if(Math.abs(o.x)>=Jv){const c=(e.minX-n.x)/o.x,l=n.y+c*o.y;Uce(l,e.minY,e.maxY)&&i.push({x:e.minX,y:l});const u=(e.maxX-n.x)/o.x,g=n.y+u*o.y;Uce(g,e.minY,e.maxY)&&i.push({x:e.maxX,y:g})}if(Math.abs(o.y)>=Jv){const c=(e.minY-n.y)/o.y,l=n.x+c*o.x;Uce(l,e.minX,e.maxX)&&i.push({x:l,y:e.minY});const u=(e.maxY-n.y)/o.y,g=n.x+u*o.x;Uce(g,e.minX,e.maxX)&&i.push({x:g,y:e.maxY})}const r=Amo(i);if(r.length<2)return null;let s=r[0],a=r[1],A=(s.x-a.x)**2+(s.y-a.y)**2;for(let c=0;c<r.length;c++)for(let l=c+1;l<r.length;l++){const u=r[c],g=r[l],h=(u.x-g.x)**2+(u.y-g.y)**2;h>A&&(s=u,a=g,A=h)}return[s,a]}function obt(t,e,n){const o=bV(t),i=[Bn(o,{x:0,y:0}),Bn(o,{x:e,y:0}),Bn(o,{x:0,y:n}),Bn(o,{x:e,y:n})];return{minX:Math.min(...i.map(r=>r.x)),maxX:Math.max(...i.map(r=>r.x)),minY:Math.min(...i.map(r=>r.y)),maxY:Math.max(...i.map(r=>r.y))}}var cmo=.6,lmo=1,ibt=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),rbt=t=>(t.ccwRotationDegrees??0)*Math.PI/180,umo=t=>t.a*t.d-t.b*t.c<0?1:-1,gmo=(t,e)=>rbt(t)*umo(e),dmo=(t,e)=>{const n=Math.cos(e),o=Math.sin(e);return{x:t.x*n-t.y*o,y:t.x*o+t.y*n}},sbt=t=>Abt(t,rbt(t)),abt=(t,e)=>Abt(t,gmo(t,e)),Abt=(t,e)=>{const n=t.width/2,o=t.height/2;return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(i=>{const r=dmo(i,e);return{x:t.center.x+r.x,y:t.center.y+r.y}})},hmo=t=>sbt(t).reduce((n,o)=>({minX:Math.min(n.minX,o.x),maxX:Math.max(n.maxX,o.x),minY:Math.min(n.minY,o.y),maxY:Math.max(n.maxY,o.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0}),VQe=(t,e)=>{const n=abt(t,e).map(c=>Bn(e,c)),o=Bn(e,t.center),i=ibt(n[0],n[1]),r=ibt(n[1],n[2]),s=n.length>=2?Math.atan2(n[1].y-n[0].y,n[1].x-n[0].x):0,a=s*180/Math.PI,A=n.reduce((c,l)=>({minX:Math.min(c.minX,l.x),maxX:Math.max(c.maxX,l.x),minY:Math.min(c.minY,l.y),maxY:Math.max(c.maxY,l.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0});return{center:o,corners:n,width:i,height:r,angleRadians:s,angleDegrees:a,bounds:A}},pmo=2,mmo=12,_mo=12,Kce=t=>({tip:{...t},base:{...t},leftWing:{...t},rightWing:{...t}}),cbt=(t,e,n)=>{const o=t.x-e.x,i=t.y-e.y,r=Math.hypot(o,i);if(r===0)return Kce(t);const s=o/r,A=-(i/r)*(n/2),c=s*(n/2);return{tip:{...t},base:{...e},leftWing:{x:e.x+A,y:e.y+c},rightWing:{x:e.x-A,y:e.y-c}}};function jW(t){const{start:e,end:n}=t,o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i),s=pmo,a=mmo;if(r===0){const f=t.doubleSided?[Kce(e),Kce(e)]:[Kce(e)];return{shaftStart:{...e},shaftEnd:{...e},heads:f,shaftWidth:s,headLength:0,headWidth:a,length:r}}const A=o/r,c=i/r,l=Math.min(_mo,r*.5),u=Math.max(l,s*2),g=t.doubleSided?r/2:r,h=Math.min(u,g),d={x:n.x-A*h,y:n.y-c*h},p=[cbt(n,d,a)];let m={...e};const _={...d};if(t.doubleSided){const f={x:e.x+A*h,y:e.y+c*h};p.unshift(cbt(e,f,a)),m=f}return{shaftStart:m,shaftEnd:_,heads:p,shaftWidth:s,headLength:h,headWidth:a,length:r}}function lbt(t){const e=jW(t);return[e.shaftStart,e.shaftEnd,...e.heads.flatMap(o=>[o.tip,o.base,o.leftWing,o.rightWing])].reduce((o,i)=>({minX:Math.min(o.minX,i.x),maxX:Math.max(o.maxX,i.x),minY:Math.min(o.minY,i.y),maxY:Math.max(o.maxY,i.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function Vce(t,e,{fontSize:n=12,strokeWidth:o=2,normalPadding:i=6,alongOffset:r=0}={}){const s={x:(t.x+e.x)/2,y:(t.y+e.y)/2},a=e.x-t.x,A=e.y-t.y,c=Math.hypot(a,A);if(c===0)return{x:s.x+r,y:s.y-(o/2+n*.65+i),angleRadians:0,angleDegrees:0,direction:{x:1,y:0},normal:{x:0,y:-1}};let l=a/c,u=A/c,g=-u,h=l;(l<0||l===0&&u<0)&&(l=-l,u=-u,g=-g,h=-h);const p=Math.atan2(u,l),m=o/2+n*.65+i;return{x:s.x+g*m+l*r,y:s.y+h*m+u*r,angleRadians:p,angleDegrees:p*180/Math.PI,direction:{x:l,y:u},normal:{x:g,y:h}}}var rh=["rgba(239, 68, 68, 0.8)","rgba(249, 115, 22, 0.8)","rgba(245, 158, 11, 0.8)","rgba(234, 179, 8, 0.8)","rgba(132, 204, 22, 0.8)","rgba(34, 197, 94, 0.8)","rgba(16, 185, 129, 0.8)","rgba(20, 184, 166, 0.8)","rgba(6, 182, 212, 0.8)","rgba(14, 165, 233, 0.8)","rgba(59, 130, 246, 0.8)","rgba(99, 102, 241, 0.8)","rgba(139, 92, 246, 0.8)","rgba(168, 85, 247, 0.8)","rgba(217, 70, 239, 0.8)","rgba(236, 72, 153, 0.8)","rgba(249, 168, 212, 0.8)","rgba(161, 161, 170, 0.8)"];function ubt(t,e,n,o={}){const i=o.padding??40,r=o.yFlip??!1;let s;if("center"in t){const l=t.width/2,u=t.height/2;s={minX:t.center.x-l,maxX:t.center.x+l,minY:t.center.y-u,maxY:t.center.y+u}}else s=t;const a=s.maxX-s.minX||1,A=s.maxY-s.minY||1,c=Math.min((e-2*i)/a,(n-2*i)/A);return Ad(pA(e/2,n/2),dC(c,r?-c:c),pA(-(s.minX+a/2),-(s.minY+A/2)))}function V5(t){const e=[...t.points||[],...(t.lines||[]).flatMap(n=>n.points),...(t.polygons||[]).flatMap(n=>n.points),...(t.rects||[]).flatMap(n=>sbt(n)),...(t.circles||[]).flatMap(n=>[{x:n.center.x-n.radius,y:n.center.y},{x:n.center.x+n.radius,y:n.center.y},{x:n.center.x,y:n.center.y-n.radius},{x:n.center.x,y:n.center.y+n.radius}]),...(t.arrows||[]).flatMap(n=>{const o=lbt(n);return[{x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY}]}),...(t.texts||[]).flatMap(n=>{const o=n.fontSize??12,i=n.text.length*o*cmo,r=o*lmo,s=n.anchorSide??"center",a={top_left:{dx:0,dy:0},top_center:{dx:-i/2,dy:0},top_right:{dx:-i,dy:0},center_left:{dx:0,dy:-r/2},center:{dx:-i/2,dy:-r/2},center_right:{dx:-i,dy:-r/2},bottom_left:{dx:0,dy:-r},bottom_center:{dx:-i/2,dy:-r},bottom_right:{dx:-i,dy:-r}},{dx:A,dy:c}=a[s],l=n.x+A,u=n.y+c;return[{x:l,y:u},{x:l+i,y:u+r}]})];return e.length===0?{minX:-1,maxX:1,minY:-1,maxY:1}:e.reduce((n,o)=>({minX:Math.min(n.minX,o.x),maxX:Math.max(n.maxX,o.x),minY:Math.min(n.minY,o.y),maxY:Math.max(n.maxY,o.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function fmo(t,e,n={}){const o=n.disableLabels!==!1,i=n.hideInlineLabels??o,r=e instanceof HTMLCanvasElement?e.getContext("2d"):e;if(!r)throw new Error("Could not get 2D context from canvas");const s=e instanceof HTMLCanvasElement?e.width:e.canvas.width,a=e instanceof HTMLCanvasElement?e.height:e.canvas.height;let A;if(n.transform)A=n.transform;else if(n.viewbox)A=ubt(n.viewbox,s,a,{padding:n.padding,yFlip:n.yFlip});else{const c=V5(t),l=t.coordinateSystem==="cartesian";A=ubt(c,s,a,{padding:n.padding??40,yFlip:l})}if(r.clearRect(0,0,s,a),r.save(),t.rects&&t.rects.length>0&&t.rects.forEach(c=>{const l=VQe(c,A);r.save(),r.translate(l.center.x,l.center.y),Math.abs(l.angleRadians)>1e-6&&r.rotate(l.angleRadians),r.beginPath(),r.rect(-l.width/2,-l.height/2,l.width,l.height),c.fill&&(r.fillStyle=c.fill,r.fill()),c.stroke&&(r.strokeStyle=c.stroke,r.stroke()),r.restore()}),t.circles&&t.circles.length>0&&t.circles.forEach(c=>{const l=Bn(A,c.center),u=c.radius*Math.abs(A.a);r.beginPath(),r.arc(l.x,l.y,u,0,2*Math.PI),c.fill&&(r.fillStyle=c.fill,r.fill()),c.stroke&&(r.strokeStyle=c.stroke??"transparent",r.stroke())}),t.polygons&&t.polygons.length>0&&t.polygons.forEach(c=>{if(c.points.length===0)return;const l=c.points.map(u=>Bn(A,u));r.beginPath(),r.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++)r.lineTo(l[u].x,l[u].y);r.closePath(),c.fill&&(r.fillStyle=c.fill,r.fill()),c.stroke&&(r.strokeStyle=c.stroke,c.strokeWidth!==void 0&&(r.lineWidth=c.strokeWidth*Math.abs(A.a)),r.stroke())}),t.arrows&&t.arrows.length>0&&t.arrows.forEach((c,l)=>{const u=jW(c),g=Bn(A,u.shaftStart),h=Bn(A,u.shaftEnd),d=c.color||rh[l%rh.length],p=Math.hypot(A.a,A.b);r.strokeStyle=d,r.fillStyle=d,r.lineWidth=u.shaftWidth*(p||1),r.lineCap="round",r.setLineDash([]),r.beginPath(),r.moveTo(g.x,g.y),r.lineTo(h.x,h.y),r.stroke(),u.heads.forEach(y=>{const x=Bn(A,y.tip),E=Bn(A,y.leftWing),B=Bn(A,y.rightWing);r.beginPath(),r.moveTo(x.x,x.y),r.lineTo(E.x,E.y),r.lineTo(B.x,B.y),r.closePath(),r.fill()});const m=12,_=u.shaftWidth*(p||1),f=m*.6,I=Vce(g,h,{fontSize:m,strokeWidth:_,normalPadding:6,alongOffset:c.label?f:0}),C=Vce(g,h,{fontSize:m,strokeWidth:_,normalPadding:12,alongOffset:c.inlineLabel?-f:0});if(r.fillStyle=d,r.font=`${m}px sans-serif`,!o&&c.label){const y=C.x,x=C.y;r.save(),r.textAlign="center",r.textBaseline="middle",r.fillText(c.label,y,x),r.restore()}!i&&c.inlineLabel&&(r.save(),r.translate(I.x,I.y),r.rotate(I.angleRadians),r.textAlign="center",r.textBaseline="middle",r.fillText(c.inlineLabel,0,0),r.restore())}),t.lines&&t.lines.length>0&&t.lines.map((c,l)=>({line:c,originalIndex:l})).sort((c,l)=>(c.line.zIndex??0)-(l.line.zIndex??0)||c.originalIndex-l.originalIndex).forEach(({line:c,originalIndex:l})=>{if(c.points.length===0)return;r.beginPath();const u=Bn(A,c.points[0]);r.moveTo(u.x,u.y);for(let g=1;g<c.points.length;g++){const h=Bn(A,c.points[g]);r.lineTo(h.x,h.y)}if(r.strokeStyle=c.strokeColor||rh[l%rh.length],c.strokeWidth?r.lineWidth=c.strokeWidth*A.a:r.lineWidth=2,r.lineCap="round",c.strokeDash)if(typeof c.strokeDash=="string"){let g;if(c.strokeDash.includes(","))g=c.strokeDash.split(",").map(h=>parseFloat(h.trim())).filter(h=>!Number.isNaN(h));else{const h=parseFloat(c.strokeDash.trim());g=Number.isNaN(h)?[]:[h]}r.setLineDash(g)}else r.setLineDash(c.strokeDash.map(g=>g*Math.abs(A.a)));else r.setLineDash([]);r.stroke()}),t.infiniteLines&&t.infiniteLines.length>0){const c=obt(A,s,a);t.infiniteLines.forEach((l,u)=>{const g=nbt(l,c);if(!g)return;const[h,d]=g,p=Bn(A,h),m=Bn(A,d);if(r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(m.x,m.y),r.strokeStyle=l.strokeColor||rh[u%rh.length],r.lineWidth=l.strokeWidth?l.strokeWidth*Math.abs(A.a):2,r.lineCap="round",l.strokeDash)if(typeof l.strokeDash=="string"){let _;if(l.strokeDash.includes(","))_=l.strokeDash.split(",").map(f=>parseFloat(f.trim())).filter(f=>!Number.isNaN(f));else{const f=parseFloat(l.strokeDash.trim());_=Number.isNaN(f)?[]:[f]}r.setLineDash(_)}else r.setLineDash(l.strokeDash.map(_=>_*Math.abs(A.a)));else r.setLineDash([]);r.stroke()})}t.texts&&t.texts.length>0&&t.texts.forEach(c=>{const l=Bn(A,{x:c.x,y:c.y});r.fillStyle=c.color||"black",r.font=`${(c.fontSize??12)*Math.abs(A.a)}px sans-serif`;const u=c.anchorSide??"center",g={top_left:"left",center_left:"left",bottom_left:"left",top_center:"center",center:"center",bottom_center:"center",top_right:"right",center_right:"right",bottom_right:"right"},h={top_left:"top",top_center:"top",top_right:"top",center_left:"middle",center:"middle",center_right:"middle",bottom_left:"bottom",bottom_center:"bottom",bottom_right:"bottom"};r.textAlign=g[u],r.textBaseline=h[u],r.fillText(c.text,l.x,l.y)}),t.points&&t.points.length>0&&t.points.forEach((c,l)=>{const u=Bn(A,c);r.beginPath(),r.arc(u.x,u.y,3,0,2*Math.PI),r.fillStyle=c.color||rh[l%rh.length],r.fill(),c.label&&!o&&(r.fillStyle=c.color||"black",r.font="12px sans-serif",r.fillText(c.label,u.x+5,u.y-5))}),r.restore()}var zQe,gbt;function Imo(){if(gbt)return zQe;gbt=1,zQe=function(n){return n!=null&&(t(n)||e(n)||!!n._isBuffer)};function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function e(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))}return zQe}var JQe,dbt;function Cmo(){if(dbt)return JQe;dbt=1;var t=Imo(),e=Object.prototype.toString;return JQe=function(o){if(typeof o>"u")return"undefined";if(o===null)return"null";if(o===!0||o===!1||o instanceof Boolean)return"boolean";if(typeof o=="string"||o instanceof String)return"string";if(typeof o=="number"||o instanceof Number)return"number";if(typeof o=="function"||o instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(o))return"array";if(o instanceof RegExp)return"regexp";if(o instanceof Date)return"date";var i=e.call(o);return i==="[object RegExp]"?"regexp":i==="[object Date]"?"date":i==="[object Arguments]"?"arguments":i==="[object Error]"?"error":t(o)?"buffer":i==="[object Set]"?"set":i==="[object WeakSet]"?"weakset":i==="[object Map]"?"map":i==="[object WeakMap]"?"weakmap":i==="[object Symbol]"?"symbol":i==="[object Int8Array]"?"int8array":i==="[object Uint8Array]"?"uint8array":i==="[object Uint8ClampedArray]"?"uint8clampedarray":i==="[object Int16Array]"?"int16array":i==="[object Uint16Array]"?"uint16array":i==="[object Int32Array]"?"int32array":i==="[object Uint32Array]"?"uint32array":i==="[object Float32Array]"?"float32array":i==="[object Float64Array]"?"float64array":"object"},JQe}var WQe={exports:{}},hbt;function ymo(){return hbt||(hbt=1,(function(t){(function(){function e(n,o){if(typeof o!="function")return n;var i={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[o(r,n[r])||r]=n[r]);return i}t.exports?t.exports=e:window.rename=e})()})(WQe)),WQe.exports}var jQe,pbt;function xmo(){if(pbt)return jQe;pbt=1;var t=Cmo(),e=ymo();return jQe=function n(o,i){var r=t(o);if(r!=="object"&&r!=="array")throw new Error("expected an object");var s=[];r==="object"&&(o=e(o,i),s={});for(var a in o)if(o.hasOwnProperty(a)){var A=o[a];t(A)==="object"||t(A)==="array"?s[a]=n(A,i):s[a]=A}return s},jQe}var Emo=xmo();const Bmo=_y(Emo);var $Qe={exports:{}},mbt;function _bt(){return mbt||(mbt=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(n=!1));function i(s,a,A){this.fn=s,this.context=a,this.once=A||!1}function r(){this._events=new o,this._eventsCount=0}r.prototype.eventNames=function(){var a=[],A,c;if(this._eventsCount===0)return a;for(c in A=this._events)e.call(A,c)&&a.push(n?c.slice(1):c);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(A)):a},r.prototype.listeners=function(a,A){var c=n?n+a:a,l=this._events[c];if(A)return!!l;if(!l)return[];if(l.fn)return[l.fn];for(var u=0,g=l.length,h=new Array(g);u<g;u++)h[u]=l[u].fn;return h},r.prototype.emit=function(a,A,c,l,u,g){var h=n?n+a:a;if(!this._events[h])return!1;var d=this._events[h],p=arguments.length,m,_;if(d.fn){switch(d.once&&this.removeListener(a,d.fn,void 0,!0),p){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,A),!0;case 3:return d.fn.call(d.context,A,c),!0;case 4:return d.fn.call(d.context,A,c,l),!0;case 5:return d.fn.call(d.context,A,c,l,u),!0;case 6:return d.fn.call(d.context,A,c,l,u,g),!0}for(_=1,m=new Array(p-1);_<p;_++)m[_-1]=arguments[_];d.fn.apply(d.context,m)}else{var f=d.length,I;for(_=0;_<f;_++)switch(d[_].once&&this.removeListener(a,d[_].fn,void 0,!0),p){case 1:d[_].fn.call(d[_].context);break;case 2:d[_].fn.call(d[_].context,A);break;case 3:d[_].fn.call(d[_].context,A,c);break;case 4:d[_].fn.call(d[_].context,A,c,l);break;default:if(!m)for(I=1,m=new Array(p-1);I<p;I++)m[I-1]=arguments[I];d[_].fn.apply(d[_].context,m)}}return!0},r.prototype.on=function(a,A,c){var l=new i(A,c||this),u=n?n+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},r.prototype.once=function(a,A,c){var l=new i(A,c||this,!0),u=n?n+a:a;return this._events[u]?this._events[u].fn?this._events[u]=[this._events[u],l]:this._events[u].push(l):(this._events[u]=l,this._eventsCount++),this},r.prototype.removeListener=function(a,A,c,l){var u=n?n+a:a;if(!this._events[u])return this;if(!A)return--this._eventsCount===0?this._events=new o:delete this._events[u],this;var g=this._events[u];if(g.fn)g.fn===A&&(!l||g.once)&&(!c||g.context===c)&&(--this._eventsCount===0?this._events=new o:delete this._events[u]);else{for(var h=0,d=[],p=g.length;h<p;h++)(g[h].fn!==A||l&&!g[h].once||c&&g[h].context!==c)&&d.push(g[h]);d.length?this._events[u]=d.length===1?d[0]:d:--this._eventsCount===0?this._events=new o:delete this._events[u]}return this},r.prototype.removeAllListeners=function(a){var A;return a?(A=n?n+a:a,this._events[A]&&(--this._eventsCount===0?this._events=new o:delete this._events[A])):(this._events=new o,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=n,r.EventEmitter=r,t.exports=r})($Qe)),$Qe.exports}var qQe,fbt;function bmo(){if(fbt)return qQe;fbt=1;function t(c,l,u){return l in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}var e=_bt(),n=function(){},o={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},i={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},r={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},s={" ":i.space,"	":i.space,"\n":i.space,"\r":i.space,"<":i.lt,">":i.gt,'"':i.quote,"'":i.quote,"=":i.equal,"/":i.slash},a=function(l){return s[l]||i.char},A=function(l){var u,g,h,d,p,m,_,f,I,C;l=Object.assign({debug:!1},l);var y=new e,x=o.data,E="",B="",S="",Q="",w="",M="",k=function(O,U){if(!(B[0]==="?"||B[0]==="!")){var Y={type:O,value:U};l.debug&&console.log("emit:",Y),y.emit("data",Y)}};y.stateMachine=(C={},t(C,o.data,(u={},t(u,i.lt,function(){E.trim()&&k(r.text,E),B="",w=!1,x=o.tagBegin}),t(u,i.char,function(F){E+=F}),u)),t(C,o.cdata,t({},i.char,function(F){E+=F,E.substr(-3)==="]]>"&&(k(r.text,E.slice(0,-3)),E="",x=o.data)})),t(C,o.tagBegin,(g={},t(g,i.space,n),t(g,i.char,function(F){B=F,x=o.tagName}),t(g,i.slash,function(){B="",w=!0}),g)),t(C,o.tagName,(h={},t(h,i.space,function(){w?x=o.tagEnd:(x=o.attributeNameStart,k(r.openTag,B))}),t(h,i.gt,function(){k(w?r.closeTag:r.openTag,B),E="",x=o.data}),t(h,i.slash,function(){x=o.tagEnd,k(r.openTag,B)}),t(h,i.char,function(F){B+=F,B==="![CDATA["&&(x=o.cdata,E="",B="")}),h)),t(C,o.tagEnd,(d={},t(d,i.gt,function(){k(r.closeTag,B),E="",x=o.data}),t(d,i.char,n),d)),t(C,o.attributeNameStart,(p={},t(p,i.char,function(F){S=F,x=o.attributeName}),t(p,i.gt,function(){E="",x=o.data}),t(p,i.space,n),t(p,i.slash,function(){w=!0,x=o.tagEnd}),p)),t(C,o.attributeName,(m={},t(m,i.space,function(){x=o.attributeNameEnd}),t(m,i.equal,function(){k(r.attributeName,S),x=o.attributeValueBegin}),t(m,i.gt,function(){Q="",k(r.attributeName,S),k(r.attributeValue,Q),E="",x=o.data}),t(m,i.slash,function(){w=!0,Q="",k(r.attributeName,S),k(r.attributeValue,Q),x=o.tagEnd}),t(m,i.char,function(F){S+=F}),m)),t(C,o.attributeNameEnd,(_={},t(_,i.space,n),t(_,i.equal,function(){k(r.attributeName,S),x=o.attributeValueBegin}),t(_,i.gt,function(){Q="",k(r.attributeName,S),k(r.attributeValue,Q),E="",x=o.data}),t(_,i.char,function(F){Q="",k(r.attributeName,S),k(r.attributeValue,Q),S=F,x=o.attributeName}),_)),t(C,o.attributeValueBegin,(f={},t(f,i.space,n),t(f,i.quote,function(F){M=F,Q="",x=o.attributeValue}),t(f,i.gt,function(){Q="",k(r.attributeValue,Q),E="",x=o.data}),t(f,i.char,function(F){M="",Q=F,x=o.attributeValue}),f)),t(C,o.attributeValue,(I={},t(I,i.space,function(F){M?Q+=F:(k(r.attributeValue,Q),x=o.attributeNameStart)}),t(I,i.quote,function(F){M===F?(k(r.attributeValue,Q),x=o.attributeNameStart):Q+=F}),t(I,i.gt,function(F){M?Q+=F:(k(r.attributeValue,Q),E="",x=o.data)}),t(I,i.slash,function(F){M?Q+=F:(k(r.attributeValue,Q),w=!0,x=o.tagEnd)}),t(I,i.char,function(F){Q+=F}),I)),C);var R=function(O){l.debug&&console.log(x,O);var U=y.stateMachine[x],Y=U[a(O)]||U[i.error]||U[i.char];Y(O)};return y.write=function(F){for(var O=F.length,U=0;U<O;U++)R(F[U])},y};return qQe={State:o,Action:i,Type:r,create:A},qQe}var XQe,Ibt;function Smo(){if(Ibt)return XQe;Ibt=1;var t=_bt(),e=bmo(),n=e.Type,o={element:"element",text:"text"},i=function(A){return Object.assign({name:"",type:o.element,value:"",parent:null,attributes:{},children:[]},A)},r=function(A){A=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},A);var c=void 0,l=void 0,u=void 0,g=void 0,h=new t,d=function(m){switch(m.type){case n.openTag:if(u===null)u=l,u.name=m.value;else{var _=i({name:m.value,parent:u});u.children.push(_),u=_}break;case n.closeTag:var f=u.parent;if(A.parentNodes||(u.parent=null),u.name!==m.value)break;A.stream&&f===l&&(l.children=[],u.parent=null),(!A.emitTopLevelOnly||f===l)&&(h.emit(A.tagPrefix+u.name,u),h.emit("tag",u.name,u)),u===l&&(c.removeAllListeners("data"),h.emit(A.doneEvent,u),l=null),u=f;break;case n.text:u&&u.children.push(i({type:o.text,value:m.value,parent:A.parentNodes?u:null}));break;case n.attributeName:g=m.value,u.attributes[g]="";break;case n.attributeValue:u.attributes[g]=m.value;break}};return h.reset=function(){c=e.create({debug:A.debug}),c.on("data",d),l=i(),u=null,g="",h.parse=c.write},h.reset(),h},s=function(A,c){c=Object.assign({},c,{stream:!1,tagPrefix:":"});var l=r(c),u=void 0;return l.on("done",function(g){u=g}),l.parse(A),u};return XQe={parseSync:s,create:r,NodeType:o},XQe}var Qmo=Smo(),vmo=function(e){var n=Qmo.parseSync("<root>".concat(e,"</root>"),{parentNodes:!1}),o=n.children&&n.children.length>0&&n.children.every(function(i){return i.name==="svg"});if(o)return n.children.length===1?n.children[0]:n.children;throw Error("nothing to parse")},wmo=function(e){return Bmo(e,function(n){return Mmo(n)?n:Pmo(n)})},Pmo=function(e){return e.replace(/[-|:]([a-z])/gi,function(n,o){return o.toUpperCase()})},Mmo=function(e){return/^(data|aria)(-\w+)/.test(e)},Dmo=function(e){if(e){var n=String(e);return/[&<>]/.test(n)?"<![CDATA[".concat(n.replace(/]]>/,"]]]]><![CDATA[>"),"]]>"):n}return""},Nmo=function(e){return String(e).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},$W=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.transformNode,i=o===void 0?function(A){return A}:o,r=n.camelcase,s=r===void 0?!1:r,a=function(c){var l;return l=i(c),s&&(l=wmo(l)),l};return a(vmo(e))},Cbt=function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=n.transformAttr,i=o===void 0?function(h,d,p){return"".concat(h,'="').concat(p(d),'"')}:o,r=n.transformNode,s=r===void 0?function(h){return h}:r,a=n.selfClose,A=a===void 0?!0:a;if(Array.isArray(e))return e.map(function(h){return t(h,{transformAttr:i,selfClose:A,transformNode:s})}).join("");var c=s(e);if(c.type==="text")return Dmo(c.value);var l="";for(var u in c.attributes){var g=i(u,c.attributes[u],Nmo,c.name);l+=g?" ".concat(g):""}return c.children&&c.children.length>0||!A?"<".concat(c.name).concat(l,">").concat(t(c.children,{transformAttr:i,transformNode:s,selfClose:A}),"</").concat(c.name,">"):"<".concat(c.name).concat(l,"/>")};function ybt(t,e,n){return{...t,points:t.points?.map(o=>({...o,x:o.x+e,y:o.y+n})),lines:t.lines?.map(o=>({...o,points:o.points.map(i=>({x:i.x+e,y:i.y+n}))})),infiniteLines:t.infiniteLines?.map(o=>({...o,origin:{x:o.origin.x+e,y:o.origin.y+n}})),polygons:t.polygons?.map(o=>({...o,points:o.points.map(i=>({x:i.x+e,y:i.y+n}))})),rects:t.rects?.map(o=>({...o,center:{x:o.center.x+e,y:o.center.y+n}})),circles:t.circles?.map(o=>({...o,center:{x:o.center.x+e,y:o.center.y+n}})),arrows:t.arrows?.map(o=>({...o,start:{x:o.start.x+e,y:o.start.y+n},end:{x:o.end.x+e,y:o.end.y+n}})),texts:t.texts?.map(o=>({...o,x:o.x+e,y:o.y+n}))}}var NH=(t,e)=>({...t,rects:[...t.rects??[],...e.rects??[]],points:[...t.points??[],...e.points??[]],lines:[...t.lines??[],...e.lines??[]],infiniteLines:[...t.infiniteLines??[],...e.infiniteLines??[]],polygons:[...t.polygons??[],...e.polygons??[]],circles:[...t.circles??[],...e.circles??[]],arrows:[...t.arrows??[],...e.arrows??[]],texts:[...t.texts??[],...e.texts??[]]});function zce(t,e={}){if(t.length===0)return{};let n=t[0],o=V5(n);const i=o.minY,r=[o];for(let s=1;s<t.length;s++){const a=t[s],A=V5(a),c=o.maxX-o.minX,l=A.maxX-A.minX,u=(c+l)/8,g=o.maxX+u-A.minX,h=i-A.minY,d=ybt(a,g,h);n=NH(n,d),o=V5(d),r.push(o)}if(e.titles&&e.titles.length>0){const s=V5(n),A=(s.maxX-s.minX)*.025,c=e.titles.slice(0,r.length).map((l,u)=>{const g=r[u];return{x:(g.minX+g.maxX)/2,y:g.maxY+A,text:l,fontSize:A,anchorSide:"bottom_center"}});n=NH(n,{texts:c})}return n}function ZQe(t,e={}){if(t.length===0)return{};let n=t[0],o=V5(n);const i=o.minX,r=[o];for(let s=1;s<t.length;s++){const a=t[s],A=V5(a),c=o.maxY-o.minY,l=A.maxY-A.minY,u=(c+l)/8,g=i-A.minX,h=o.minY-u-A.maxY,d=ybt(a,g,h);n=NH(n,d),o=V5(d),r.push(o)}if(e.titles&&e.titles.length>0){const s=V5(n),A=(s.maxY-s.minY)*.025,c=e.titles.slice(0,r.length).map((l,u)=>{const g=r[u];return{x:g.minX-A,y:g.maxY,text:l,fontSize:A,anchorSide:"top_right"}});n=NH(n,{texts:c})}return n}function RH(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;return t}var fC=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved&&this.iterations>=this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>=this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function TH(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var eve=class extends fC{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e){this.solved=!0;return}if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null&&(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()&&(this.step(),!(this.failed||this.solved)););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??"none"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex>this.pipelineDef.findIndex(A=>A.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n&&(RH(n,0),e=1);let o=null;this.solved&&(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=>{const A=this[r.solverName]?.visualize();return A?(RH(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved&&o&&(RH(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=>r.points||[]),rects:i.flatMap(r=>r.rects||[]),lines:i.flatMap(r=>r.lines||[]),circles:i.flatMap(r=>r.circles||[]),texts:i.flatMap(r=>r.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},tve={};async function Rmo(t={}){var e,n=t,o=!!globalThis.window,i=!!globalThis.WorkerGlobalScope,r=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";if(r){const{createRequire:ot}=await Promise.resolve().then(()=>xfn);var s=ot(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bu&&Bu.tagName.toUpperCase()==="SCRIPT"&&Bu.src||new URL("standalone.min.js",document.baseURI).href)}var a=!1;n.setup=function(){if(a)return;a=!0,n.initTBB();function ot(gn,bn,go=(Go=>Go)){if(bn)for(let Go of bn)gn.push_back(go(Go));return gn}function rt(gn,bn=(go=>go)){const go=[],Go=gn.size();for(let hr=0;hr<Go;hr++)go.push(bn(gn.get(hr)));return go}function Ot(gn,bn=(go=>go)){const go=[],Go=gn.size();for(let hr=0;hr<Go;hr++){const ia=gn.get(hr),lA=ia.size(),MA=[];for(let Fa=0;Fa<lA;Fa++)MA.push(bn(ia.get(Fa)));go.push(MA)}return go}function an(gn){return gn[0].length<3&&(gn=[gn]),ot(new n.Vector2_vec2,gn,bn=>ot(new n.Vector_vec2,bn,go=>go instanceof Array?{x:go[0],y:go[1]}:go))}function Dn(gn){for(let bn=0;bn<gn.size();bn++)gn.get(bn).delete();gn.delete()}function Xn(gn){return gn[0]instanceof Array?{x:gn[0][0],y:gn[0][1]}:typeof gn[0]=="number"?{x:gn[0]||0,y:gn[1]||0}:gn[0]}function oo(gn){return gn[0]instanceof Array?{x:gn[0][0],y:gn[0][1],z:gn[0][2]}:typeof gn[0]=="number"?{x:gn[0]||0,y:gn[1]||0,z:gn[2]||0}:gn[0]}function vo(gn){return gn=="EvenOdd"?0:gn=="NonZero"?1:gn=="Negative"?3:2}function Xo(gn){return gn=="Round"?1:gn=="Miter"?2:0}const Ti=n.CrossSection;function ir(gn,bn="Positive"){if(gn instanceof Ti)return gn;{const go=an(gn),Go=new Ti(go,vo(bn));return Dn(go),Go}}n.CrossSection.prototype.translate=function(...gn){return this._Translate(Xn(gn))},n.CrossSection.prototype.scale=function(gn){return typeof gn=="number"?this._Scale({x:gn,y:gn}):this._Scale(Xn([gn]))},n.CrossSection.prototype.mirror=function(gn){return this._Mirror(Xn([gn]))},n.CrossSection.prototype.warp=function(gn){const bn=Vc(function(Go){const hr=Me(Go,"double"),ia=Me(Go+8,"double"),lA=[hr,ia];gn(lA),ve(Go,lA[0],"double"),ve(Go+8,lA[1],"double")},"vi"),go=this._Warp(bn);return ha(bn),go},n.CrossSection.prototype.decompose=function(){const gn=this._Decompose(),bn=rt(gn);return gn.delete(),bn},n.CrossSection.prototype.bounds=function(){const gn=this._Bounds();return{min:["x","y"].map(bn=>gn.min[bn]),max:["x","y"].map(bn=>gn.max[bn])}},n.CrossSection.prototype.offset=function(gn,bn="Round",go=2,Go=0){return this._Offset(gn,Xo(bn),go,Go)},n.CrossSection.prototype.simplify=function(gn=1e-6){return this._Simplify(gn)},n.CrossSection.prototype.extrude=function(gn,bn=0,go=0,Go=[1,1],hr=!1){Go=Xn([Go]);const ia=n._Extrude(this._ToPolygons(),gn,bn,go,Go);return hr?ia.translate([0,0,-gn/2]):ia},n.CrossSection.prototype.revolve=function(gn=0,bn=360){return n._Revolve(this._ToPolygons(),gn,bn)},n.CrossSection.prototype.add=function(gn){return this._add(ir(gn))},n.CrossSection.prototype.subtract=function(gn){return this._subtract(ir(gn))},n.CrossSection.prototype.intersect=function(gn){return this._intersect(ir(gn))},n.CrossSection.prototype.toPolygons=function(){const gn=this._ToPolygons(),bn=Ot(gn,go=>[go.x,go.y]);return gn.delete(),bn},n.Manifold.prototype.smoothOut=function(gn=52.5,bn=0){return this._SmoothOut(gn,bn)},n.Manifold.prototype.warp=function(gn){const bn=Vc(function(hr){const ia=Me(hr,"double"),lA=Me(hr+8,"double"),MA=Me(hr+16,"double"),Fa=[ia,lA,MA];gn(Fa),ve(hr,Fa[0],"double"),ve(hr+8,Fa[1],"double"),ve(hr+16,Fa[2],"double")},"vi"),go=this._Warp(bn);ha(bn);const Go=go.status();if(Go!=="NoError")throw new n.ManifoldError(Go);return go},n.Manifold.prototype.warpBatch=function(gn){const bn=Vc(function(hr,ia){const lA=n.HEAPF64??w;if(!lA)throw new Error("WASM heap is not initialized (HEAPF64 unavailable)");const MA=new Float64Array(lA.buffer,hr,ia*3);gn(MA,ia)},"vii"),go=this._WarpBatch(bn);ha(bn);const Go=go.status();if(Go!=="NoError")throw new n.ManifoldError(Go);return go},n.Manifold.prototype.calculateNormals=function(gn=0,bn=52.5){return this._CalculateNormals(gn,bn)},n.Manifold.prototype.smoothByNormals=function(gn=0){return this._SmoothByNormals(gn)},n.Manifold.prototype.setProperties=function(gn,bn){const go=this.numProp(),Go=Vc(function(ia,lA,MA){const Fa=[];for(let Hr=0;Hr<gn;++Hr)Fa[Hr]=Me(ia+8*Hr,"double");const La=[];for(let Hr=0;Hr<3;++Hr)La[Hr]=Me(lA+8*Hr,"double");const Y0=[];for(let Hr=0;Hr<go;++Hr)Y0[Hr]=Me(MA+8*Hr,"double");bn(Fa,La,Y0);for(let Hr=0;Hr<gn;++Hr)ve(ia+8*Hr,Fa[Hr],"double")},"viii"),hr=this._SetProperties(gn,Go);return ha(Go),hr},n.Manifold.prototype.translate=function(...gn){return this._Translate(oo(gn))},n.Manifold.prototype.rotate=function(gn,bn,go){return Array.isArray(gn)?this._Rotate(...gn):this._Rotate(gn,bn||0,go||0)},n.Manifold.prototype.scale=function(gn){return typeof gn=="number"?this._Scale({x:gn,y:gn,z:gn}):this._Scale(oo([gn]))},n.Manifold.prototype.mirror=function(gn){return this._Mirror(oo([gn]))},n.Manifold.prototype.trimByPlane=function(gn,bn=0){return this._TrimByPlane(oo([gn]),bn)},n.Manifold.prototype.slice=function(gn=0){const bn=this._Slice(gn),go=new Ti(bn,vo("Positive"));return Dn(bn),go},n.Manifold.prototype.project=function(){const gn=this._Project(),bn=new Ti(gn,vo("Positive"));return Dn(gn),bn},n.Manifold.prototype.rayCast=function(gn,bn){const go=this._RayCast(oo([gn]),oo([bn])),Go=rt(go,hr=>({faceID:hr.faceID,distance:hr.distance,position:["x","y","z"].map(ia=>hr.position[ia]),normal:["x","y","z"].map(ia=>hr.normal[ia])}));return go.delete(),Go},n.Manifold.prototype.split=function(gn){const bn=this._Split(gn),go=rt(bn);return bn.delete(),go},n.Manifold.prototype.splitByPlane=function(gn,bn=0){const go=this._SplitByPlane(oo([gn]),bn),Go=rt(go);return go.delete(),Go},n.Manifold.prototype.decompose=function(){const gn=this._Decompose(),bn=rt(gn);return gn.delete(),bn},n.Manifold.prototype.boundingBox=function(){const gn=this._boundingBox();return{min:["x","y","z"].map(bn=>gn.min[bn]),max:["x","y","z"].map(bn=>gn.max[bn])}},n.Manifold.prototype.simplify=function(gn=0){return this._Simplify(gn)};class Gs{constructor({numProp:bn=3,triVerts:go=new Uint32Array,vertProperties:Go=new Float32Array,mergeFromVert:hr,mergeToVert:ia,runIndex:lA,runOriginalID:MA,faceID:Fa,halfedgeTangent:La,runTransform:Y0,runFlags:Hr,tolerance:fh=0}={}){this.numProp=bn,this.triVerts=go,this.vertProperties=Go,this.mergeFromVert=hr,this.mergeToVert=ia,this.runIndex=lA,this.runOriginalID=MA,this.faceID=Fa,this.halfedgeTangent=La,this.runTransform=Y0,this.runFlags=Hr,this.tolerance=fh}get numTri(){return this.triVerts.length/3}get numVert(){return this.vertProperties.length/this.numProp}get numRun(){return this.runOriginalID.length}merge(){const{changed:bn,mesh:go}=n._Merge(this);return Object.assign(this,{...go}),bn}verts(bn){return this.triVerts.subarray(3*bn,3*(bn+1))}position(bn){return this.vertProperties.subarray(this.numProp*bn,this.numProp*bn+3)}extras(bn){return this.vertProperties.subarray(this.numProp*bn+3,this.numProp*(bn+1))}tangent(bn){return this.halfedgeTangent.subarray(4*bn,4*(bn+1))}transform(bn){const go=new Array(16);for(const Go of[0,1,2,3])for(const hr of[0,1,2])go[4*Go+hr]=this.runTransform[12*bn+3*Go+hr];return go[15]=1,go}backside(bn){return this.runFlags!=null&&bn<this.runFlags.length&&(this.runFlags[bn]&1)!==0}hasNormals(bn){return this.runFlags!=null&&bn<this.runFlags.length&&(this.runFlags[bn]&2)!==0}}n.Mesh=Gs,n.Manifold.prototype.getMesh=function(gn=-1){return new Gs(this._GetMeshJS(gn))},n.ManifoldError=function(bn,...go){let Go="Unknown error";switch(bn){case"NonFiniteVertex":Go="Non-finite vertex";break;case"NotManifold":Go="Not manifold";break;case"VertexOutOfBounds":Go="Vertex index out of bounds";break;case"PropertiesWrongLength":Go="Properties have wrong length";break;case"MissingPositionProperties":Go="Less than three properties";break;case"MergeVectorsDifferentLengths":Go="Merge vectors have different lengths";break;case"MergeIndexOutOfBounds":Go="Merge index out of bounds";break;case"TransformWrongLength":Go="Transform vector has wrong length";break;case"RunIndexWrongLength":Go="Run index vector has wrong length";break;case"FaceIDWrongLength":Go="Face ID vector has wrong length";break;case"InvalidConstruction":Go="Manifold constructed with invalid parameters";break;case"ResultTooLarge":Go="Result exceeds maximum size";break;case"InvalidTangents":Go="Invalid halfedge tangents";break}const hr=Error.apply(this,[Go,...go]);hr.name=this.name="ManifoldError",this.message=hr.message,this.stack=hr.stack,this.code=bn},n.ManifoldError.prototype=Object.create(Error.prototype,{constructor:{value:n.ManifoldError,writable:!0,configurable:!0}}),n.CrossSection=function(gn,bn="Positive"){const go=an(gn),Go=new Ti(go,vo(bn));return Dn(go),Go},n.CrossSection.ofPolygons=function(gn,bn="Positive"){return new n.CrossSection(gn,bn)},n.CrossSection.square=function(...gn){let bn;gn.length==0?bn={x:1,y:1}:typeof gn[0]=="number"?bn={x:gn[0],y:gn[0]}:bn=Xn(gn);const go=gn[1]||!1;return n._Square(bn,go)},n.CrossSection.circle=function(gn,bn=0){return n._Circle(gn,bn)};function qr(gn){return function(...bn){bn.length==1&&(bn=bn[0]);const go=new n.Vector_crossSection;for(const hr of bn)go.push_back(ir(hr));const Go=n["_crossSection"+gn](go);return go.delete(),Go}}n.CrossSection.compose=qr("Compose"),n.CrossSection.union=qr("UnionN"),n.CrossSection.difference=qr("DifferenceN"),n.CrossSection.intersection=qr("IntersectionN");function ps(gn,bn){ot(gn,bn,go=>go instanceof Array?{x:go[0],y:go[1]}:go)}n.CrossSection.hull=function(...gn){gn.length==1&&(gn=gn[0]);let bn=new n.Vector_vec2;for(const Go of gn)if(Go instanceof Ti)n._crossSectionCollectVertices(bn,Go);else if(Go instanceof Array&&Go.length==2&&typeof Go[0]=="number")bn.push_back({x:Go[0],y:Go[1]});else if(Go.x)bn.push_back(Go);else{const ia=Go[0].length==2&&typeof Go[0][0]=="number"||Go[0].x?[Go]:Go;for(const lA of ia)ps(bn,lA)}const go=n._crossSectionHullPoints(bn);return bn.delete(),go},n.CrossSection.prototype=Object.create(Ti.prototype),Object.defineProperty(n.CrossSection,Symbol.hasInstance,{get:()=>gn=>gn instanceof Ti});const Ic=n.Manifold;n.Manifold=function(gn){const bn=new Ic(gn),go=bn.status();if(go!=="NoError")throw new n.ManifoldError(go);return bn},n.Manifold.ofMesh=function(gn){return new n.Manifold(gn)},n.Manifold.tetrahedron=function(){return n._Tetrahedron()},n.Manifold.cube=function(...gn){let bn;gn.length==0?bn={x:1,y:1,z:1}:typeof gn[0]=="number"?bn={x:gn[0],y:gn[0],z:gn[0]}:bn=oo(gn);const go=gn[1]||!1;return n._Cube(bn,go)},n.Manifold.cylinder=function(gn,bn,go=-1,Go=0,hr=!1){return n._Cylinder(gn,bn,go,Go,hr)},n.Manifold.sphere=function(gn,bn=0){return n._Sphere(gn,bn)},n.Manifold.smooth=function(gn,bn=[]){const go=new n.Vector_smoothness;ot(go,bn);const Go=n._Smooth(gn,go);return go.delete(),Go},n.Manifold.extrude=function(gn,bn,go=0,Go=0,hr=[1,1],ia=!1){return(gn instanceof Ti?gn:n.CrossSection(gn,"Positive")).extrude(bn,go,Go,hr,ia)},n.Manifold.revolve=function(gn,bn=0,go=360){return(gn instanceof Ti?gn:n.CrossSection(gn,"Positive")).revolve(bn,go)},n.Manifold.reserveIDs=function(gn){return n._ReserveIDs(gn)};function lc(gn){return function(...bn){bn.length==1&&(bn=bn[0]);const go=new n.Vector_manifold;for(const hr of bn)go.push_back(hr);const Go=n["_manifold"+gn+"N"](go);return go.delete(),Go}}n.Manifold.union=lc("Union"),n.Manifold.compose=n.Manifold.union,n.Manifold.difference=lc("Difference"),n.Manifold.intersection=lc("Intersection"),n.Manifold.levelSet=function(gn,bn,go,Go=0,hr=-1){const ia={min:{x:bn.min[0],y:bn.min[1],z:bn.min[2]},max:{x:bn.max[0],y:bn.max[1],z:bn.max[2]}},lA=Vc(function(Fa){const La=Me(Fa,"double"),Y0=Me(Fa+8,"double"),Hr=Me(Fa+16,"double");return gn([La,Y0,Hr])},"di"),MA=n._LevelSet(lA,ia,go,Go,hr);return ha(lA),MA},n.ExecutionContext.prototype.fromMesh=function(gn){return this._FromMesh(gn)},n.ExecutionContext.prototype.smooth=function(gn,bn=[]){const go=new n.Vector_smoothness;ot(go,bn);const Go=this._Smooth(gn,go);return go.delete(),Go},n.ExecutionContext.prototype.levelSet=function(gn,bn,go,Go=0,hr=-1){const ia={min:{x:bn.min[0],y:bn.min[1],z:bn.min[2]},max:{x:bn.max[0],y:bn.max[1],z:bn.max[2]}},lA=Vc(function(Fa){const La=Me(Fa,"double"),Y0=Me(Fa+8,"double"),Hr=Me(Fa+16,"double");return gn([La,Y0,Hr])},"di"),MA=this._LevelSet(lA,ia,go,Go,hr);return ha(lA),MA};function ka(gn,bn){ot(gn,bn,go=>go instanceof Array?{x:go[0],y:go[1],z:go[2]}:go)}n.Manifold.hull=function(...gn){gn.length==1&&(gn=gn[0]);let bn=new n.Vector_vec3;for(const Go of gn)Go instanceof Ic?n._manifoldCollectVertices(bn,Go):Go instanceof Array&&Go.length==3&&typeof Go[0]=="number"?bn.push_back({x:Go[0],y:Go[1],z:Go[2]}):Go.x?bn.push_back(Go):ka(bn,Go);const go=n._manifoldHullPoints(bn);return bn.delete(),go},n.Manifold.prototype=Object.create(Ic.prototype),Object.defineProperty(n.Manifold,Symbol.hasInstance,{get:()=>gn=>gn instanceof Ic}),n.triangulate=function(gn,bn=-1,go=!0){const Go=an(gn),hr=rt(n._Triangulate(Go,bn,go),ia=>[ia[0],ia[1],ia[2]]);return Dn(Go),hr}};var A=typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bu&&Bu.tagName.toUpperCase()==="SCRIPT"&&Bu.src||new URL("standalone.min.js",document.baseURI).href,c="";function l(ot){return n.locateFile?n.locateFile(ot,c):c+ot}var u,g;if(r){var h=s("node:fs");A.startsWith("file:")&&(c=s("node:path").dirname(s("node:url").fileURLToPath(A))+"/"),g=ot=>{ot=_(ot)?new URL(ot):ot;var rt=h.readFileSync(ot);return rt},u=async(ot,rt=!0)=>{ot=_(ot)?new URL(ot):ot;var Ot=h.readFileSync(ot,rt?void 0:"utf8");return Ot},tve.argv.length>1&&tve.argv[1].replace(/\\/g,"/"),tve.argv.slice(2)}else if(o||i){try{c=new URL(".",A).href}catch{}i&&(g=ot=>{var rt=new XMLHttpRequest;return rt.open("GET",ot,!1),rt.responseType="arraybuffer",rt.send(null),new Uint8Array(rt.response)}),u=async ot=>{if(_(ot))return new Promise((Ot,an)=>{var Dn=new XMLHttpRequest;Dn.open("GET",ot,!0),Dn.responseType="arraybuffer",Dn.onload=()=>{if(Dn.status==200||Dn.status==0&&Dn.response){Ot(Dn.response);return}an(Dn.status)},Dn.onerror=an,Dn.send(null)});var rt=await fetch(ot,{credentials:"same-origin"});if(rt.ok)return rt.arrayBuffer();throw new Error(rt.status+" : "+rt.url)}}console.log.bind(console);var d=console.error.bind(console),p,m=!1,_=ot=>ot.startsWith("file://"),f,I,C,y,x,E,B,S,Q,w,M,k,R=!1;function F(){var ot=_h.buffer;C=new Int8Array(ot),x=new Int16Array(ot),y=new Uint8Array(ot),E=new Uint16Array(ot),B=new Int32Array(ot),S=new Uint32Array(ot),Q=new Float32Array(ot),w=new Float64Array(ot),M=new BigInt64Array(ot),k=new BigUint64Array(ot)}function O(){if(n.preRun)for(typeof n.preRun=="function"&&(n.preRun=[n.preRun]);n.preRun.length;)ye(n.preRun.shift());_e(pe)}function U(){R=!0,ku.J()}function Y(){if(n.postRun)for(typeof n.postRun=="function"&&(n.postRun=[n.postRun]);n.postRun.length;)fe(n.postRun.shift());_e(ue)}function W(ot){n.onAbort?.(ot),ot="Aborted("+ot+")",d(ot),m=!0,ot+=". Build with -sASSERTIONS for more info.";var rt=new WebAssembly.RuntimeError(ot);throw I?.(rt),rt}var te;function j(){return n.locateFile?l("manifold.wasm"):new URL("data:application/wasm;base64,AGFzbQEAAAABlwRFYAF/AGACf38AYAJ/fwF/YAN/f38AYAF/AX9gBH9/f38AYAN/f38Bf2AFf39/f38AYAZ/f39/f38AYAR/f39/AX9gCH9/f39/f39/AGADf398AGAAAGABfAF8YAABf2AEf39/fABgAX8BfGACf38BfGAHf39/f39/fwBgBX9/f39/AX9gBH9/f3wBf2AEf398fwBgA398fwBgCn9/f39/f39/f38AYAV/f39/fwF8YAF8AX9gA39/fAF/YAF8AGAEf398fwF/YAR/f398AXxgA3x8fwF8YAJ8fAF8YAJ8fwF/YAJ/fgBgBX9/fHx8AGAGf398f3x/AGAGf3x8fH9/AGADf3x/AX9gA39/fAF8YAR/f3x8AGAHf39/f3x8fABgBn9/f3x8fABgBn9/fH98fABgDX9/f39/f39/f39/f38AYAV/f39+fgBgAnx/AXxgBX9/f398AGAFf39/f3wBf2AFf398fH8AYAZ/f39/fH8AYAJ/fgF/YAV/f398fwF/YAF+AX9gA39/fwF8YAd/f39/fHx/AGAHf39/fHx8fwBgDH9/f39/f39/f39/fwBgCX9/f39/f39/fwBgBn9/fH98fAF/YAd/f39/fHx8AX9gA39/fgB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CAAIAAoAggiAUEBazYCCCABDQELIAAgACgCACgCEBEAAAsLVwEDfyAAKAIIIAFJBEAgAUECdBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBAnQiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCwkAQfENEJ4FAAvCKAELfyMAQRBrIgokAAJAAkACQAJAAkACQAJAAkACQAJAIABB9AFNBEBBpKECKAIAIgRBECAAQQtqQfgDcSAAQQtJGyIGQQN2IgB2IgFBA3EEQAJAIAFBf3NBAXEgAGoiA0EDdCIBQcyhAmoiACABKALUoQIiAigCCCIFRgRAQaShAiAEQX4gA3dxNgIADAELIAUgADYCDCAAIAU2AggLIAJBCGohACACIAFBA3I2AgQgASACaiIBIAEoAgRBAXI2AgQMCwsgBkGsoQIoAgAiCE0NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgNBA3QiAUHMoQJqIgIgASgC1KECIgAoAggiBUYEQEGkoQIgBEF+IAN3cSIENgIADAELIAUgAjYCDCACIAU2AggLIAAgBkEDcjYCBCAAIAZqIgcgASAGayIFQQFyNgIEIAAgAWogBTYCACAIBEAgCEF4cUHMoQJqIQFBuKECKAIAIQICfyAEQQEgCEEDdnQiA3FFBEBBpKECIAMgBHI2AgAgAQwBCyABKAIICyEDIAEgAjYCCCADIAI2AgwgAiABNgIMIAIgAzYCCAsgAEEIaiEAQbihAiAHNgIAQayhAiAFNgIADAsLQaihAigCACILRQ0BIAtoQQJ0KALUowIiASgCBEF4cSAGayEDIAEhAgNAAkAgASgCECIARQRAIAEoAhQiAEUNAQsgACgCBEF4cSAGayIBIAMgASADSSIBGyEDIAAgAiABGyECIAAhAQwBCwsgAigCGCEJIAIgAigCDCIARwRAIAIoAggiASAANgIMIAAgATYCCAwKCyACKAIUIgEEfyACQRRqBSACKAIQIgFFDQMgAkEQagshBQNAIAUhByABIgBBFGohBSAAKAIUIgENACAAQRBqIQUgACgCECIBDQALIAdBADYCAAwJC0F/IQYgAEG/f0sNAC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IFBEBB1KQCKAIAIgggAWoiCSAITSAFIAlJcg0JCwJAQeCkAi0AAEEEcUUEQAJAAkACQAJAQbyhAigCACIFBEBB5KQCIQADQCAAKAIAIgggBU0EQCAFIAggACgCBGpJDQMLIAAoAggiAA0ACwtBABCsASICQX9GDQMgASEEQYClAigCACIAQQFrIgUgAnEEQCABIAJrIAIgBWpBACAAa3FqIQQLIAQgBk0NA0HcpAIoAgAiAARAQdSkAigCACIFIARqIgcgBU0gACAHSXINBAsgBBCsASIAIAJHDQEMBQsgBCACayAHcSIEEKwBIgIgACgCACAAKAIEakYNASACIQALIABBf0YNASAGQTBqIARNBEAgACECDAQLQYSlAigCACICIAMgBGtqQQAgAmtxIgIQrAFBf0YNASACIARqIQQgACECDAMLIAJBf0cNAgtB4KQCQeCkAigCAEEEcjYCAAsgARCsASICQX9GQQAQrAEiAEF/RnIgACACTXINBSAAIAJrIgQgBkEoak0NBQtB1KQCQdSkAigCACAEaiIANgIAQdikAigCACAASQRAQdikAiAANgIACwJAQbyhAigCACIDBEBB5KQCIQADQCACIAAoAgAiASAAKAIEIgVqRg0CIAAoAggiAA0ACwwEC0G0oQIoAgAiAEEAIAAgAk0bRQRAQbShAiACNgIAC0EAIQBB6KQCIAQ2AgBB5KQCIAI2AgBBxKECQX82AgBByKECQfykAigCADYCAEHwpAJBADYCAANAIABBA3QiASABQcyhAmoiBTYC1KECIAEgBTYC2KECIABBAWoiAEEgRw0AC0GwoQIgBEEoayIAQXggAmtBB3EiAWsiBTYCAEG8oQIgASACaiIBNgIAIAEgBUEBcjYCBCAAIAJqQSg2AgRBwKECQYylAigCADYCAAwECyACIANNIAEgA0tyDQIgACgCDEEIcQ0CIAAgBCAFajYCBEG8oQIgA0F4IANrQQdxIgBqIgE2AgBBsKECQbChAigCACAEaiICIABrIgA2AgAgASAAQQFyNgIEIAIgA2pBKDYCBEHAoQJBjKUCKAIANgIADAMLQQAhAAwGC0EAIQAMBAtBtKECKAIAIAJLBEBBtKECIAI2AgALIA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kAgAiAJKAIQRgRAIAkgADYCEAwBCyAJIAA2AhQLIABFDQELIAAgCTYCGCACKAIQIgEEQCAAIAE2AhAgASAANgIYCyACKAIUIgFFDQAgACABNgIUIAEgADYCGAsCQCADQQ9NBEAgAiADIAZqIgBBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMAQsgAiAGQQNyNgIEIAIgBmoiBSADQQFyNgIEIAMgBWogAzYCACAIBEAgCEF4cUHMoQJqIQBBuKECKAIAIQECf0EBIAhBA3Z0IgcgBHFFBEBBpKECIAQgB3I2AgAgAAwBCyAAKAIICyEEIAAgATYCCCAEIAE2AgwgASAANgIMIAEgBDYCCAtBuKECIAU2AgBBrKECIAM2AgALIAJBCGohAAsgCkEQaiQAIAALFgAgAEEQahAvGiAAQQhqEC8aIAAQLwsrAQJ/IAAoAgAiASgCACICBEAgASACEHsgACgCACIAKAIAIAAoAggaECILC/w9AxJ/HXwLfiMAQbACayIMJAAgDEIANwMIIAxCgICAgICAgPg/NwMAIAxCADcDECAMQgA3AxggDEIANwMoIAxCgICAgICAgPg/NwMgIAxCADcDMCAMQgA3AzggDEIANwNIIAxCgICAgICAgPg/NwNAIAxCADcDUCAMQgA3A1ggDEGYAmogAUEYaiIFIAwQygEgDCsDmAIgDCsDoAJiBEAgASgCDCELIwBBwAZrIgMkACADQgA3A/AEIANCgICAgICAgPg/NwPoBCADQgA3A/gEIANCADcDgAUgA0IANwOQBSADQoCAgICAgID4PzcDiAUgA0IANwOYBSADQgA3A6AFIANCADcDsAUgA0KAgICAgICA+D83A6gFIANCADcDuAUgA0IANwPABSADQaADaiAFIANB6ARqEMoBAkAgAysDoAMgAysDqANhBEAgDCALEDcaDAELIAwQOyEIIAsoAkQiAgRAIAggAjYCRAwBCyAFKQMAITEgBSkDCCEyIAUpAxAhMyAFKQMYITQgBSkDICE1IAUpAyghNiAFKQMwITcgBSkDOCE4IAUpA0AhOSAFKQNIITogBSkDUCE7IAMgBSkDWEL///////////8Ag0KAgICAgICA+P8AVDoA8wQgAyA7Qv///////////wCDQoCAgICAgID4/wBUOgDyBCADIDpC////////////AINCgICAgICAgPj/AFQ6APEEIAMgOUL///////////8Ag0KAgICAgICA+P8AVDoA8AQgAyA4Qv///////////wCDQoCAgICAgID4/wBUOgDvBCADIDdC////////////AINCgICAgICAgPj/AFQ6AO4EIAMgNkL///////////8Ag0KAgICAgICA+P8AVDoA7QQgAyA1Qv///////////wCDQoCAgICAgID4/wBUOgDsBCADIDRC////////////AINCgICAgICAgPj/AFQ6AOsEIAMgM0L///////////8Ag0KAgICAgICA+P8AVDoA6gQgAyAyQv///////////wCDQoCAgICAgID4/wBUOgDpBCADIDFC////////////AINCgICAgICAgPj/AFQ6AOgEAkACQCADLQDpBCADLQDoBHFFDQAgAy0A6gRBAXFFDQAgAy0A7AQgAy0A6wRxRQ0AIAMtAO0EQQFxRQ0AIAMtAO8EIAMtAO4EcUUNACADLQDwBEEBcUUNACADLQDyBCADLQDxBHFFDQAgAy0A8wRBAXENAQsgCEEBECwMAQsgCCALKALIATYCyAEgCCALRwRAIAsoAswBIQYgC0HQAWohEiMAQRBrIg0kACAIQcwBaiIKKAIIBEAgDSAKNgIEIAooAgAhAiAKIApBBGo2AgAgCigCBEEANgIIIApCADcCBCANIAIoAgQiBCACIAQbIgI2AgwgDSACNgIIIAIEQCANIAIQsAQ2AggLAkAgDSgCDCICRSAGIBJGcg0AA0AgAiAGKAIQNgIQIAJBGGogBkEYakHqAPwKAAAgAiEJAkAgCigCBCIERQRAIApBBGoiAiEHDAELIAkoAhAhDgNAIAQiAigCECAOSgRAIAIhByACKAIAIgQNAQwCCyACKAIEIgQNAAsgAkEEaiEHCyAKIAIgByAJEIIBIA0gDSgCCCICNgIMIAIEQCANIAIQsAQ2AggLAkAgBigCBCICBEADQCACIgYoAgAiAg0ADAILAAsDQCAGIAYoAggiBigCAEcNAAsLIA0oAgwiAkUNASAGIBJHDQALCyANKAIEIA0oAgwQbyANKAIIIgIEQCACKAIIIgQEQANAIAQiAigCC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cCFCAFIgRBGGohBwNAIApBFGogDmooAgAhAiAKQQI2AhAgCkKAgICAEDcCCEEIQRAgAkEBRhtBACACGyEQQQAhD0EAIQkDQCAEIQICQAJAAkAgCkEIaiAPaigCACINDgICAAELIAchAgwBCyAEQTBByAAgDUECRhtqIQILIAkgAiAQaisDAEQAAAAAAAAAAGFqIQkgD0EEaiIPQQxHDQALIAlBAkYEQCAOQQRqIg5BDEcNAQsLIAlBAkYEQCAIQegBaiICIAtB6AFqELkEIAhB+AFqIAtB+AFqELgEIAhBiAJqIAtBiAJqELcEIAgoAuwBIQkgAyACNgLsBCADIAU2AugEQQAhBCMAQTBrIgckACAJBEAgBiECA0AgByAEQTBsIgYgAigCBCIFKAIAaiACKAIAENsEIAUoAgAgBmogB0Ew/AoAACAEQQFqIgQgCUcNAAsLIAdBMGokAAwBCyAIKAJcQQNJDQAgCEHoAWoiAiALQegBaiIEELkEIAJBEGogBEEQahC4BCACQSBqIARBIGoQtwQgA0EANgLwBCADQgA3AugEIANBADYC0AIgA0IANwLIAiAIIANB6ARqIANByAJqQQAQzwIgAyADKQLoBDcCwAIgAiADQcACahC2BCADKALIAiICBEAgAhAiCyADKALoBCICRQ0AIAIQIgsgA0HABmokAEGoAhAjIgJB2JMCNgIAIAJCADcCBCACQRBqIAwQowEhBCAMIAI2ApwCIAwgBDYCmAIgAUEMaiAMQZgCahBOAkAgDCgCnAIiAkUNACACIAIoAgQiBEEBazYCBCAEDQAgAiACKAIAKAIIEQAAIAIQJAsgDBA6GiABQgA3AyAgAUKAgICAgICA+D83AxggAUIANwMoIAFCADcDMCABQgA3A0AgAUKAgICAgICA+D83AzggAUIANwNIIAFCADcDUCABQgA3A2AgAUKAgICAgICA+D83A1ggAUIANwNoIAFCADcDcAsgACABKAIMNgIAIAAgASgCECIANgIEIAAEQCAAIAAoAgRBAWo2AgQLIAxBsAJqJAAL9QEBBH8jAEEQayIDJAAgACgCABogAQRAIAAoAggiAiACKAIAKAIMEQQAIQIgAUEANgIMIAFBADYCBCABIAIgAkEAR2siAjYCACABIAJBC2w2AggLAkAgACgCCCICIAIoAgAoAggRBABBA0YNACADQQhqIgIgAEEIaiIEKAIAIgUgASAFKAIAKAIAEQMAIAQgAhBOIAMoAgwiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgACgCCAJAIAAoAgwiAEUNACAAKAIEQX9HDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EQaiQAC7EEAQZ/IwBBIGsiAiQAIABBADYCTCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQcgAahBxIABB2ABqIgMQOCAAQegAahA4IABB+ABqEDggAxDvAiAAQQA2ApwBIABBmAFqEHEgAEEANgKsASAAQagBahBxIABBADYCvAEgAEG4AWoQkwEgAkIANwIIIAJBfzYCACACQgA3AhggAkIANwIQIAIgAkEIaiIENgIEIABBfzYCyAEgAEHMAWogACgC0AEQbyAAIAIoAgQ2AswBIAAgAigCCCIFNgLQASAAIAIoAgwiBjYC1AEgAEHQAWohAyAAQcgBaiEHAkAgBkUEQCAAIAM2AswBDAELIAUgAzYCCCACQgA3AgggAiAENgIECyACQQRqAkAgAiAHRwRAIAAoAtgBIgQEQCAEECILIAAgAigCEDYC2AEgACACKAIUNgLcASAAIAIoAhg2AuABDAELIAIoAhAiBEUNACAEECILIAJBADYCGCACQgA3AhAgAigCCBBvIAAoAugBIgMEQCADECILIABBADYC8AEgAEIANwPoASAAKAL4ASIDBEAgAxAiCyAAQQA2AoACIABCADcD+AEgACgCiAIiAwRAIAMQIgsgAEEANgKQAiAAQgA3A4gCIAAgATYCRCACQSBqJAALUgEEfyAAKAIAIQECQCAAKAIEIgNFBEAMAQsgA0ECdCIEECchAiAERQ0AIAIgASAE/AoAAAsgACABBH8gARAiIAAoAgQFIAMLNgIIIAAgAjYCAAuQAQECfyMA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AgACACKAIENgIEIAAgAigCCDYCCCACQQA2AgggAkIANwIACyACEEkLIAJBEGokAAtXAQN/IAAoAgggAUkEQCABQQR0ECchBCAAKAIAIQICQCAAKAIEIgNFDQAgA0EEdCIDRQ0AIAQgAiAD/AoAAAsgAgRAIAIQIgsgACABNgIIIAAgBDYCAAsLogIBAX8gACgCiAIiAQRAIAEQIgsgAEEANgKQAiAAQgA3A4gCIAAoAvgBIgEEQCABECILIABBADYCgAIgAEIANwP4ASAAKALoASIBBEAgARAiCyAAKALYASIBBEAgARAiCyAAQQA2AuABIABCADcD2AEgAEHMAWogACgC0AEQbyAAKAK4ASIBBEAgARAiCyAAQQA2AsABIABCADcDuAEgACgCqAEiAQRAIAEQIgsgAEEANgKwASAAQgA3A6gBIAAoApgBIgEEQCABECILIABBADYCoAEgAEIANwOYASAAKAKIASIBBEAgARAiCyAAQQA2ApABIABCADcDiAEgAEH4AGoQSSAAQegAahBJIABB2ABqEEkgACgCSCIBBEAgARAiCyAAC7kCACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASAAC1UBAn8gAEEANgIIIABCADcCACABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQR1EI8DIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALoAIBBX8jAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABKAIANgIAIAJBBGohAQwBCyACIAAoAgAiBGtBAnUiBkEBaiICQYCAgIAETw0BIAVBDGpB/////wMgAyAEayIDQQF1IgQgAiACIARJGyADQfz///8HTxsgBiAAEEoiAigCCCIDIAEoAgA2AgAgAiADQQRqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFrIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACEFMLIAAgATYCBCAFQSBqJAAPCxAmAAvQAQIBfAF/IwBBEGsiAiQARAAAAAAAAPh/IQECQCAAvUL///////////8Ag0L/////////9/8AVg0ARAAAAAAAAAAAIQEgAEQAAAAAAAAAAGMEQCAAmhA+miEBDAELIACZRAAAAAAAgFZAIAJBDGoQpQNEGC1EVPshCUCiRAAAAAAAgGZAoyEAAkACQAJAAkAgAigCDEEEbw4EAAECAwQLIAAQqAEhAQwDCyAAEJcBIQEMAgsgABCoAZohAQwBCyAAEJcBmiEBCyACQRBqJAAgAQspACAAIAEoAgQgAhASIgEQGzYCBCAAQZygAjYCACABQQlPBEAgARABCwujAQEBf0EkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcDGCAAQoCAgICAgID4PzcDECAAQgA3AwggACACNgIEIAAgAkEMajYCACAAQgA3AyAgAEIANwMwIABCgICAgICAgPg/NwMoIABCADcDOCABKAIAGiAAQQhqIAFBCGoQXiAAQRBqIAFBEGpBMPwKAAAgAAsOACAAQQhqEC8aIAAQLwsCAAtyAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACAAIAEoAgA2AgggACABKAIEIgI2AgwgAgRAIAIgAigCBEEBajYCBAsgAEIANwIQIAEQLxoLVwEDfyAAKAIIIAFJBEAgAUEDdBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBA3QiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy0BAX8gACgCACIBBEAgACABNgIEIAAoAggaIAEQIiAAQQA2AgggAEIANwIACwuLAQEDfyMAQRBrIgMkAEGoAhAjIgJBoJACNgIAIAJCADcCBCACQRBqEDshBCACIAE2AlQgAyACNgIMIAMgBDYCCCACIAIoAgRBAWo2AgQgAyADKQIINwMAIAAgAxBIGiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANBEGokAAs+ACADBEAgACADEKMCIAAoAgQhAyABIAJHBEADQCADIAEQPEEMaiEDIAFBDGoiASACRw0ACwsgACADNgIECwt5AQJ/IwBBEGsiAyQAQSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACADQQRqIAEQWSAAIAMoAgQ2AgggACADKAIINgIMIABCADcCECABEC8aIANBEGokACAAC1gBAX8CQCAAKAIMIgFFDQAgASABKAIAIgFBAWs2AgAgAUEBSg0AIAAoAgwiAQRAIAEQIgsgAEEANgIMIAAoAgAiAQRAIAEQIgsgAEEANgIIIABCADcCAAsLYAAgACADNgIQQQAhAyAAQQA2AgwCQCABBEAgAUGAgICABE8NASABQQJ0ECMhAwsgACADNgIAIAAgAyACQQJ0aiICNgIIIAAgAyABQQJ0ajYCDCAAIAI2AgQgAA8LEHIAC2AAIAAgAzYCEEEAIQMgAEEANgIMAkAgAQRAIAFBgICAgAJPDQEgAUEDdBAjIQMLIAAgAzYCACAAIAMgAkEDdGoiAjYCCCAAIAMgAUEDdGo2AgwgACACNgIEIAAPCxByAAu3AgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAEpAwg3AwggAiABKQMANwMAIAJBEGohAQwBCyACIAAoAgAiBGtBBHUiBkEBaiICQYCAgIABTw0BIAVBDGpB/////wAgAyAEayIDQQN1IgQgAiACIARJGyADQfD///8HTxsgBiAAEDIi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AiACKAIAKAIIEQAAIAIQJAsgAyADQQxqNgIYIANBGGoiAhApIAMgAzYCGCACECkgAUKAgICAgICA+D83AxAgAUIANwMgIAFCADcDGCABQoCAgICAgID4PzcDKCABQgA3AzggAUIANwMwCyAAIAEoAgg2AgAgACABKAIMIgA2AgQgAARAIAAgACgCBEEBajYCBAsgA0EwaiQAC0wBAX4gASkCACECIAFCADcCACAAKAIEIQEgACACNwIAAkAgAUUNACABIAEoAgQiAEEBazYCBCAADQAgASABKAIAKAIIEQAAIAEQJAsLjAECAn4CfyAAKAIAIAFBA3RqKAIAIAFHBEADQCAAKAIAIgQgBCABQQN0IgVqKQMAIgOnQQN0aikDACICpyEBIAJC/////w+DIANCgICAgHCDhCICIANSBEAgACgCACAFaiIEIAIgBCkDACICIAIgA1EbNwMACyABIAAoAgAgAUEDdGooAgBHDQALCyABCzMBAn9BASAAIABBAU0bIQADQAJAIAAQJyIBDQBBoKsCKAIAIgJFDQAgAhEMAAwBCwsgAQsPACAAIAAoAgAoAgQRAAALBAAgAAs9AQJ/IAAoAgQiAiAAKAIIIgFHBEAgACABIAIgAWtBA2pBfHFqNgIICyAAKAIAIgEEQCAAKAIMGiABECILC9AUAgx/BnwjAEHgAGsiCSQAAkAgACgCXEUEQCAAKALoASIBBEAgARAiCyAAQQA2AvABIABCADcD6AEgACgC+AEiAQRAIAEQIgsgAEEANgKAAiAAQgA3A/gBIAAoAogCIgEEQCABECILIABBADYCkAIgAEIANwOIAgwBCyAAQdgAahA4IABB6ABqEDggAEH4AGoQOCMAQcABayIEJAAgACgCTCEDIARBADYCtAEgBEIANwKsASAEQawBaiADECUgBCADNgKwAQJAAkACQAJAIAEEQCADRQ0CIAEtABBBAXENAgNAIAZBAWoiBkGACEYEQEEAIQYgAS0AEA0ECyAAKAJIIAJBGGxqIgUrAwAiDiAOYgR/QX8FIAQgBSkDEDcDkAEgBCAFKQMINwOIASAEIAUpAwA3A4ABIARB0ABqIgUgAEEw/AoAACAEQYABaiAFEIUCCy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yAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABENUBCyAEQSBqJAAPCxAmAAtTAQF/IAEoAhAiAkUEQCAAQQA2AhAgAA8LIAEgAkYEQCAAIAA2AhAgASgCECIBIAAgASgCACgCDBEBACAADwsgACACIAIoAgAoAggRBAA2AhAgAAuABQIGfAN/AkAgACgCTCIIBEAgACgCSCIHIAhBGGxqIQlEAAAAAAAA8H8hAkQAAAAAAADwfyEDIAchCEQAAAAAAADwfyEBA0AgCCsDECEFIAgrAwghBiAIKwMAIQQCQCABIAFiBEAgBSECIAYhAyAEIQEMAQsgBCAEYg0AIAIgBSACIAVjGyECIAMgBiADIAZjGyEDIAEgBCABIARjGyEBCyAIQRhqIgggCUcNAAsgACACOQMQIAAgAzkDCCAAIAE5AwBEAAAAAAAA8P8hAkQAAAAAAADw/yEDRAAAAAAAAPD/IQEDQCAHKwMQIQUgBysDCCEGIAcrAwAhBAJAIAEgAWIEQCAFIQIgBiEDIAQhAQwBCyAEIARiDQAgBSACIAIgBWMbIQIgBiADIAMgBmMbIQMgBCABIAEgBGMbIQELIAdBGGoiByAJRw0ACwwBCyAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDAEQAAAAAAADw/yECRAAAAAAAAPD/IQNEAAAAAAAA8P8hAQsgACACOQMoIAAgAzkDICAAIAE5AxhBACEHAkAgACkDAEL///////////8Ag0L/////////9/8AVg0AIAApAwhC////////////AINCgICAgICAgPj/AFoNACAAKQMQQv///////////wCDQoCAgICAgID4/wBaDQAgACkDGEL///////////8Ag0KAgICAgICA+P8AVCAAKQMgQv///////////wCDQoCAgICAgID4/wBUcSAAKQMoQv///////////wCDQoCAgICAgID4/wBUcSEHCyAHRQRAIABBABAsCwuDAQECf0GgARAjIQMjAEEQayICJAAgA0IANwIEIANBgJQCNgIAIAIgASgCADYCCCACIAEoAgQiATY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IAJFDQAgAiACKAIEIgBBAWs2AgQgAA0AIAIgAigCACgCCBEAACACECQLC4kCAgV/A34gACABEE8iAyAAIAIQTyICRwRAA0ACQAJ/IAAoAgAiASADQQN0aigCBEH/////B3EiBCABIAJBA3RqKAIEQf////8HcSIFTSAEIAVHIAIgA01ycUUEQCACIQEgAyECIAUhAyAEDAELIAMhASAEIQMgBQshBiAAKAIAIAFBA3RqIgcgA61CIIYiCSACrSIKhCAHKQMAIgggCCAJIAGthCIJURs3AwAgCCAJUQRAIAQgBUcNASAAKAIAIAJBA3RqIgMgBkEBaq1CIIYgCoQgAykDACIIIAggBq1CIIYgCoRRIgMbNwMAIAMgBnINAQsgACABEE8iAyAAIAIQTyICRw0BCwsLC1UBAn8gAEEANgIIIABCADcCACABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQJ1EPEBIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALYAAgACADNgIQQQAhAyAAQQA2AgwCQCABBEAgAUHWqtWqAU8NASABQQxsECMhAwsgACADNgIAIAAgAyACQQxsaiICNgIIIAAgAyABQQxsajYCDCAAIAI2AgQgAA8LEHIAC5cDAQR/IwBBQGoiAiQAIAAgACgCACIDQQhrKAIAIgVqIQQCQCADQQRrKAIAIgMoAgQgASgCBEYEQEEAIAQgBRshAAwBCyAAIAROBEAgAkIANwIUIAJBADYCECACIAE2AgwgAiAANgIIIAIgAzYCBCACQgA3AhwgAkIANwIkIAJCADcCLCACQQA2AjwgAkKBgICAgICAgAE3AjQgAyACQQRqIAQgBEEBQQAgAygCACgCFBEIACACKAIcDQELIAJCADcCFCACQQA2AhAgAkHk5gE2AgwgAiAANgIIIAIgATYCBCACQgA3AhwgAkIANwIkIAJCADcCLCACQgA3ADMgAkEANgI8IAJBAToAOyADIAJBBGogBEEBQQAgAygCACgCGBEHAEEAIQACQAJAIAIoAigOAgABAgsgAigCGEEAIAIoAiRBAUYbQQAgAigCIEEBRhtBACACKAIsQQFGGyEADAELIAIo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CADcCACACIANBDGo2AgggAigCBCAAKAIEIAAoAgAiA2siAUF0bUEMbGohBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQ1QELIAAgATYCBCAFQSBqJAAPCxAmAAvcAgEEfyMAQRBrIgMkACAAQZCcAjYCACAAEN4BIABBJGogACgCJBC9AyAAIAAoAjQiASAAKAI4IgJHBH8DQCABKAIAIgQEQCAEECILIAFBBGoiASACRw0ACyAAKAI0BSABCzYCOCAAQQA6AHwgAEEAOgAYIAAgACgCJDYCMCAAKAKAASIBBEAgACABNgKEASAAKAKIARogARAiCyAAKAJoIgEEQCAAIAE2AmwgACgCcBogARAiCyAAKAJcIgEEQCAAIAE2AmAgACgCZBogARAiCyAAKAJQIgEEQCAAIAE2AlQgACgCWBogARAiCyAAKAJAIgEEQCAAIAE2AkQgACgCSBogARAiCyAAKAI0IgEEQCAAIAE2AjggACgCPBogARAiCyADIABBJGo2AgwgAygCDCIBKAIAIgIEQCABIAIQvQMgAygCDCIBKAIAIAEoAggaECILIANBEGokACAAC40BAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgAEIANwMYIABCgICAgICAgPg/NwMQIABCADcDCCAAIAI2AgQgACACQQxqNgIAIABCADcDICAAQgA3AzAgAEKAgICAgICA+D83AyggAEIANwM4IABBCGogARBeIAEQLxoLBwAgABEOAAsYAQF/QQwQIyIAQQA2AgggAEIANwIAIAALIAAgACgCBCABEBIiACACKAIEEBUgAEEJTwRAIAAQAQsLSgECfyAAKAIEIgIgACgCCCIBRwRAA0AgACABQQhrIgE2AgggARAvGiACIAAoAggiAUcNAAsLIAAoAgAiAQRAIAAoAgwaIAEQIgsLHQAgAQRAIAAgASgCABBvIAAgASgCBBBvIAEQIgsL+wMBB38CQAJ/QQIgAUEBRg0AGiABIAEgAUEBa3FFDQAaIAEQ9gELIgMgACgCBCIBTQRAIAEgA00NASAAKAIMsyAAKgIQlY38ASECIAEgAyABQQNJIAFpQQFLcgR/IAIQ9gEFIAJBAUEgIAJBAWtna3QgAkECSRsLIgIgAiADSRsiA00NAQsgACEBAkACQCADBEAgA0GAgICABE8NASADQQJ0IgAQIyEFIAEoAgAhAiABIAU2AgAgAgRAIAEoAgQaIAIQIiABKAIAIQULIAEgAzYCBCAABEAgBUEAIAD8CwALIAEoAggiAEUNAiABQQhqIQEgACgCBCECAkAgA2kiBEEBTQRAIAIgA0EBa3EhAgwBCyACIANJDQAgAiADcCECCyAFIAJBAnRqIAE2AgAgACgCACIBRQ0CIANBAWshByAEQQFLIQgDQCABKAIEIQQCQCAIRQRAIAQgB3EhBAwBCyADIARLDQAgBCADcCEECwJAIAIgBEYEQCABIQAMAQsgBSAEQQJ0aiIGKAIARQRAIAYgADYCACABIQAgBCECDAELIAAgASgCADYCACABIAYoAgAoAgA2AgAgBigCACABNgIACyAAKAIAIgENAAsMAgsgASgCACEAIAFBADYCACAABEAgASgCBBogABAiCyABQQA2AgQMAQsQcgALCwtSAQR/IAAoAgAhAQJAIAAoAgQiA0UEQAwBCyADQRhsIgQQJyECIARFDQAgAiABIAT8CgAACyAAIAEEfyABECIgACgCBAUgAws2AgggACACNgIACx0BAX9BBBB0IgBBiO4BNgIAIABByO4BQe0CEAsAC3EBAX8gAkUEQCAAKAIEIAEoAgRGDwsgACABRgRAQQEPCwJAIAAoAgQiAi0AACIARSAAIAEoAgQiAS0AACIDR3INAANAIAEtAAEhAyACLQABIgBFDQEgAUEBaiEBIAJBAWohAiAAIANGDQALCyAAIANGCw4AIABB0ABqECdB0ABqCxsBAX8gAARAIAAoAgAiAQRAIAEQIgsgABAiCwuiAgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAEQPEEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIAEQPBogAiACKAIIQQxqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFBdG1BDGxqIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACENUBCyAAIAE2AgQgBUEgaiQADwsQJgALgQECAn8BfCMAQRBrIgMkAEHwngItAABBAXFFBEBBAUHYiwJBARAGIQRB8J4CQQE6AABB7J4CIAQ2AgALIANBADYCDEHsngIoAgAgASACIANBDGpBABAFIQUgAygCDCEBIAAgBfwDNgIEIABBnKACNgIAIAEEQCABEAQLIANBEGokAAuoAQEDfyMAQaACayIDJAACQAJAIAEoAgAiBCgCkAEiAkUEQCABKAIEIgEgASgCBEEBajYCBAwBCyACIAIoAgxBAWo2AgwgBCgCkAEhAiABKAIEIgEgASgCBEEBajYCBCACRQ0AIAItABBBAUcNACADQQhqEDsiAUEONgJEIAAgARCjAUEBOgCYAiABEDoaDAELIABBADoAmAIgAEEAOgAACyADQaACaiQAC5UCAQN/IAACfwJAIAEoAgQiBEUEQCABQQRqIgUhAgwBCyACKAIAIQYDQCAEIgIoAhAiBSAGSgRAIAQhBSAEKAIAIgQNAQwCC0EAIAUgBk4NAhogAigCBCIEDQALIAJBBGohBQtBiAEQIyIEIAMoAgAoAgA2AhAgBEEYakEAQfAA/AsAIARCADcDKCAEQoCAgICAgID4PzcDICAEQX82AhggBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQQA7AYABIAEgAiAFIAQQggFBAQs6AAQgACAENgIAC1YBBX8gACgCACICKAIAIgEEQCABIQMgAiEEIAIoAgQiBSABRwRAA0AgASAFQRhrECgiBUcNAAsgACgCACIEKAIAIQMLIAIgATYCBCAE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CMCADIAU2AhwgAygCNCEBIAMgBjYCNCADIAE2AiAgAygCJCEFIAMgAygCODYCJCADIAU2AjggBCAGNgIAIAQQbgsgAyABNgIgIAJBGGoiAiAHRw0ACwwCCyAAEOsBGgwCCxAmAAsgA0EsaiADQRxqIANBK2oQgAMgAyADKQIsIgk3AgwgA0IANwIsIAMgCTcDACAAIAMQQwJAIAMoAjAiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAyADQRxqNgIsIANBLGoQZQsgA0FAayQACwsAIAAEQCAAECILCzAAIAEoAgAaIAAgASgCCDYCACAAIAEoAgwiADYCBCAABEAgACAAKAIEQQFqNgIECwtVACAAIAEoAgA2AgAgACABKAIENgIEIAFCADcCACAAIAEoAgg2AgggACABKAIMNgIMIAFCADcCCCAAIAEoAhA2AhAgACABKAIUNgIUIAFCADcCECAAC0UBAn8gACgCBCICIAAoAggiAUcEQCAAIAEgASACa0EYayICQRhwIAJrakEYazYCCAsgACgCACIBBEAgACgCDBogARAiCwuNAQECfCAAIAAQogFEEeotgZmXcT2iIgJEAAAAAAAA8L8gAkQAAAAAAADwv2QbIgJEAAAAAAAA8L8gAr1C////////////AINCgICAgICAgPj/AFQbIgI5AzAgAQRAIAAQogFEAAAAAAAAgD6iIgMgAiACIANjGyECCyAAIAIgACsDOCIDIAIgA2QbOQM4C4sDAQZ/IwBBIGsiAiQAQZiVAiIDIAMoAgAiA0EBajYCACACIAM2AgwgACADNgLIASAAKALcASEBIABB2AFqIgQgACgCXEEDbiIFEDkgACAFNgLcASABQRFJIAEgBUEBdE1yRQRAIAQQgwELIAAoAlwiAUEDbiEFIAFBA08EQCAEKAIAIQZBACEBA0AgBiABQQR0aiIEQX82AgggBCADNgIEIAQgAzYCACABQQFqIgEgBUcNAAsLIAAQ7gIhASAAQcwBaiIEIAAoAtABEG8gACAAQdABajYCzAEgAEIANwPQASACIAJBDGoiADYCFCACQRhqIAQgACACQRRqEHkgAigCGCIAQgA3AyggAEKAgICAgICA+D83AyAgACADNgIYIABCADcDMCAAQgA3AzggAEIANwNIIABCgICAgICAgPg/NwNAIABCADcDUCAAQgA3A1ggAEIANwNoIABCgICAgICAgPg/NwNgIABCADcDcCAAQgA3A3ggAEEAOgCAASAAIAE6AIEBIAJBIGokAAuLAQEBfwJAIAFFDQAgASgCBCIDBEAgAygCBEF/Rw0BCyAAKAIEIgAEQCAAIAAoAgRBAWo2AgQgACAAKAIIQQFqNgIIIAEoAgQhAwsgASAANgIEIAEgAjYCACADBEAgAxAkCyAARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwvHAwIBfwx8IwBB0ABrIgIkACABKwNAIQMgASsDECEEIAErAyghBSABKwMwIQYgASsDOCEHIAIgASsDICIIIAErAwAiCaIgASsDCCIKIAErAxgiC6KhOQNIIAIgCiAGoiAHIAmioTkDQCACIAcgC6IgCCAGoqE5AzggAiAEIAuiIAUgCaKhOQMwIAIgAyAJoiAEIAaioTkDKCACIAUgBqIgAyALoqE5AyAgAiAFIAqiIAggBKKhOQMYIAIgByAEoiADIAqioTkDECACIAggA6IgByAFoqE5AwggAisDCCEEIAIrAxAhBSACKwMYIQYgAisDICEHIAIrAyghCCACKwMwIQkgAisDOCEKIAIrA0AhCyAAIAIrA0ggASsDECABKwM4IgMgASsDGCINoiABKwMgIgwgASsDMCIOoqGiIAErAwAgDCABKwNAIgyiIAMgASsDKCIDoqGiIAErAwggAyAOoiAMIA2ioaKgoCIDozkDQCAAIAsgA6M5AzggACAKIAOjOQMwIAAgCSADozkDKCAAIAggA6M5AyAgACAHIAOjOQMYIAAgBiADozkDECAAIAUgA6M5AwggACAEIAOjOQMAIAJB0ABqJAALkgMBBn8gAyEEAkAgASACRg0AIAIgBEYEQCABIQQMAQsgAiABQQRqIgRGBEAgASgCACEFIAMgAmsiAgRAIAEgBCAC/AoAAAsgASACaiIEIAU2AgAMAQsgAyACQQRqRgRAIAMgA0EEayICIAFrIgVrIQQgAigCAC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ImSIDIAEgA2QbIgEgASACYxsiAiAAKwMYmSIBIAArAwCZIgMgASADZBsiASABIAJjGwu9BwEDfyAAIAFByAD8CgAAIABBADYCUCAAQgA3A0ggACABKAJINgJIIAAgASgCTDYCTCAAIAEoAlA2AlAgAUEANgJQIAFCADcDSCAAQQA2AmAgAEIANwNYIAAgASgCZDYCZCABQQA2AmQgACABKAJYNgJYIAAgASgCXDYCXCAAIAEoAmA2AmAgAUEANgJgIAFCADcDWCAAQQA2AnAgAEIANwNoIAAgASgCdDYCdCABQQA2AnQgACABKAJoNgJoIAAgASgCbDYCbCAAIAEoAnA2AnAgAUEANgJwIAFCADcDaCAAQQA2AoABIABCADcDeCAAIAEoAoQBNgKEASABQQA2AoQBIAAgASgCeDYCeCAAIAEoAnw2AnwgACABKAKAATYCgAEgAUEANgKAASABQgA3A3ggAEEANgKQASAAQgA3A4gBIAAgASgCiAE2AogBIAAgASgCjAE2AowBIAAgASgCkAE2ApABIAFBADYCkAEgAUIANwOIASAAQQA2AqABIABCADcDmAEgACABKAKYATYCmAEgACABKAKcATYCnAEgACABKAKgATYCoAEgAUEANgKgASABQgA3A5gBIABBADYCsAEgAEIANwOoASAAIAEoAqgBNgKoASAAIAEoAqwBNgKsASAAIAEoArABNgKwASABQQA2ArABIAFCADcDqAEgAEEANgLAASAAQgA3A7gBIAAgASgCuAE2ArgBIAAgASgCvAE2ArwBIAAgASgCwAE2AsABIAFBADYCwAEgAUIANwO4ASAAIAEoAsgBNgLIASAAIAEoAswBNgLMASAAIAEoAtABIgM2AtABIAAgASgC1AEiBDYC1AEgAEHQAWohAgJAIARFBEAgACACNgLMAQwBCyADIAI2AgggAUIANwPQASABIAFB0AFqNgLMAQsgAEEANgLgASAAQgA3A9gBIAAgASgC2AE2AtgBIAAgASgC3AE2AtwBIAAgASgC4AE2AuABIAFBADYC4AEgAUIANwPYASAAQQA2AvABIABCADcD6AEgACABKALoATYC6AEgACABKALsATYC7AEgACABKALwATYC8AEgAUEANgLwASABQgA3A+gBIABBADYCgAIgAEIANwP4ASAAIAEoAvgBNgL4ASAAIAEoAvwBNgL8ASAAIAEoAoACNgKAAiABQQA2AoACIAFCADcD+AEgAEEANgKQAiAAQgA3A4gCIAAgASgCiAI2AogCIAAgASgCjAI2AowCIAAgASgCkAI2ApACIAFBADYCkAIgAUIANwOIAiAAC44BAgJ/AXwjAEEQayICJABB6J4CLQAAQQFxRQRAQQJByIsCQQMQBiEDQeieAkEBOgAAQeSeAiADNgIACyACIAEpAgA3AwggAkEANgIEQeSeAigCAEEAQQAgAkEEaiACQQhqEAUhBCACKAIEIQEgACAE/AM2AgQgAEGcoAI2AgAgAQRAIAEQBAsgAkEQaiQAC5oBAQV/IABCADcCBCAAKAIAIQMgAEEANgIAIAAgASgCBCIEEDMgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQUgASgCACEGA0AgBSACQRhsaiIAIAMgBiACQQJ0aigCAEEYbGoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAJBAWoiAiAERw0ACwwBCyADRQ0BCyADECILC4EBAQR/IABCADcCBCAAKAIAIQIgAEEANgIAIAAgASgCBCIEECUgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQAgASgCACEBA0AgACADQQJ0IgVqIAIgASAFaigCAEECdGooAgA2AgAgA0EBaiIDIARHDQALDAELIAJFDQELIAIQIgsL0gQBBH8gASAAIAFGIgM6AAwCQCADDQADQCABKAIIIgMtAAwNAQJAAkAgAygCCCICKAIAIgQgA0YEQAJAIAIoAgQiBUUNACAFLQAMDQAgA0EBOgAMIAIgACACRjoADCAFQQE6AAwMAgsCQCADKAIAIAFGBEAgAyEBDAELIAMgAygCBCIBKAIAIgA2AgQCQAJAAkAgAEUEQCABIAI2AggMAQsgACADNgIIIAMoAggiAigCACABIAI2AgggA0cNAQsgAiABNgIADAELIAIgATYCBAsgASADNgIAIAMgATYCCCABKAIIIgIoAgAhBAsgAUEBOgAMIAJBADoADCACIAQoAgQiADYCACAABEAgACACNgIICyAEIAI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CAGECILIAJBBGohAgwBCyABQQA2AgAgACgCACEGIAAgBzYCACAGBEAgBhAiCyABQQRqIQELIABBBGohACABIANHDQALCyACIAVGDQADQCACKAIAIQMgAkEANgIAIAAoAgAhASAAIAM2AgAgAQRAIAEQIgsgAEEEaiEAIAJBBGoiAiAFRw0ACwsgCUEMaiAEELQDDAELIAAgByACIAYgBCAFELABIAcgASACIAMgBmsiAyAEIAUQsAEgACAHIAEgAiAGIAMgBCAFELkCCyAJQRBqJAALHQECfyAAKAIEIAAoAgAiAmtBDG0EQCAAIAIQewsLFwAgAEHomgI2AgAgAEEEaiABENEEIAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRBAALSgAgACABKAIANgIAIAAgASgCBDYCBCABQgA3AwAgACABKAIINgIIIAAgASgCDDYCDCABQgA3AwggAEEQaiABQRBqQTD8CgAAIAALvAUCBX8CfCMAQSBrIgUkAAJAAkACQCACDgMCAgABCyABQRBrKwMAIAArAwhjRQ0BIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAUEYayIBKAIQNgIQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKAIYNgIQIAEgBSkDEDcDCCABIAUpAwg3AwAMAQsgAkGAAUwEQCAAIAFGDQEgAEEYaiIDIAFGDQEgACEEA0AgAyEGIAQrAyAiCiAEKwMIYwRAIAQoAighByADKwMAIQsgAyECA0ACQCACIAQiAygCEDYCECACIAMpAwg3AwggAiADKQMANwMAIAAgA0YEQCAAIQMMAQsgA0EYayEEIAMhAiAKIANBEGsrAwBjDQELCyADIAc2AhAgAyAKOQMIIAMgCzkDAAsgASAGIgRBGGoiA0cNAAsMAQsgAiACQQF2IgdrIQggACAHQRhsIglqIQYCQCACIARMBEAgACAGIAcgAxDPAyAGIAEgCCADIAlqIgEQzwMgAyACQRhsaiEEIAEhAgNAIAIgBEYEQCABIANGDQQDQCAAIAMoAhA2AhAgACADKQMINwMIIAAgAykDADcDACAAQRhqIQAgA0EYaiIDIAFHDQALDAQLAkAgAisDCCADKwMIYwRAIAAgAigCEDYCECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMoAhA2AhAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBiAHIAMgBBC1ASAGIAEgCCADIAQQtQEgACAGIAEgByAIIAMgBBDHAgwBCyACIARGDQADQCAAIAIoAhA2AhAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAFQSBqJAALwAUCBX8BfCMAQSBrIgUkAAJAAkACQCACDgMCAgABCyABQRhrIgErAwAgACsDAGNFDQEgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKAIQNgIQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKAIYNgIQIAEgBSkDEDcDCCABIAUpAwg3AwAMAQsgAkGAAUwEQCAAIAFGDQEgAEEYaiIDIAFGDQEgACEEA0AgAyEGIAQrAxgiCiAEKwMAYwRAIAUgBCkDKDcDECAFIAQpAyA3AwggAyECA0ACQCACIAQiAygCEDYCECACIAMpAwg3AwggAiADKQMANwMAIAAgA0YEQCAAIQMMAQsgAyECIAogA0EYayIEKwMAYw0BCwsgAyAKOQMAIAMgBSkDCDcDCCADIAUoAhA2AhALIAEgBiIEQRhqIgNHDQALDAELIAIgAkEBdiIHayEIIAAgB0EYbCIJaiEGAkAgAiAETARAIAAgBiAHIAMQ0QMgBiABIAggAyAJaiIBENEDIAMgAkEYbGohBCABIQIDQCACIARGBEAgASADRg0EA0AgACADKAIQNgIQIAAgAykDCDcDCCAAIAMpAwA3AwAgAEEYaiEAIANBGGoiAyABRw0ACwwECwJAIAIrAwAgAysDAGMEQCAAIAIoAhA2AhAgACACKQMINwMIIAAgAikDADcDACACQRhqIQIMAQsgACADKAIQNgIQIAAgAykDCDcDCCAAIAMpAwA3AwAgA0EYaiEDCyAAQRhqIQAgASADRw0ACwwBCyAAI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DACAAQRBqIQAgA0EQaiIDIAFHDQALDAQLAkAgAisDACADKwMAZARAIAAgAikDCDcDCCAAIAIpAwA3AwAgAkEQaiECDAELIAAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiEDCyAAQRBqIQAgASADRw0ACwwBCyAAIAUgByADIAQQxQEgBSABIAggAyAEEMUBIAAgBSABIAcgCCADIAQQ6wIMAQsgAiAERg0AA0AgACACKQMINwMIIAAgAikDADcDACAAQRBqIQAgAkEQaiICIARHDQALCyAGQRBqJAALvQQCBH8BfgJAAkACQCADDgMCAgABCyACKAIAKAIAIgIgAUEEayIBKAIAIgNBA3RqKQMAIAIgACgCACIEQQN0aikDAFoNASAAIAM2AgAgASAENgIADwsgA0GAAUwEQCAAIAFGDQEgAEEEaiIEIAFGDQEgAigCACgCACEGIAAhAwNAIAQiByECIAYgAygCBCIIQQN0aikDACIKIAYgAygCACIFQQN0aikDAFQEQANAAkAgAiAFNgIAIAAgAyIERgRAIAAhBAwBCyAEIQIgCiAGIARBBGsiAygCACIFQQN0aikDAFQNAQsLIAQgCDYCAAsgByIDQQRqIgQgAUcNAAsMAQsgAyADQQF2IgZrIQggACAGQQJ0IglqIQcCQCADIAVMBEAgACAHIAIgBiAEEK4EIAcgASACIAggBCAJaiIBEK4EIAQgA0ECdGohBSACKAIAIQcgASEDA0AgAyAFRwRAIAAgAygCACICIAQoAgAiBiAHKAIAIgggAkEDdGopAwAgCCAGQQN0aikDAFQiAhs2AgAgA0EEQQAgAhtqIQMgAEEEaiEAIAEgBEEAQQQgAhtqIgRHDQEMAwsLIAEgBEYNAgNAIAAgBCgCADYCACAAQQRqIQAgBEEEaiIEIAFHDQALDAILIAAgByACIAYgBCAFEMYBIAcgASACIAggBCAFEMYBIAAgByABIAIgBiAIIAQgBRDqAg8LIAMgBUYNAANAIAAgAygCADYCACAAQQRqIQAgA0EEaiIDIAVHDQALCwspAQF/IAAoAggQxQQgACgCACEBIABBADYCACABBEAgACgCBBogARAiCwuRAgECfwJAIA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cDCCAAIAIpAwA3AwAgAiAGKQMYNwMQIAIgBikDEDcDCCACIAYpAwg3AwAMAQsgAkGAAUwEQCAAIAFGDQEgAEEYaiICIAFGDQEgACEEA0AgBCEDIAIhBAJAAkAgAysDGCIKIAMrAwAiC2MEQCADKAIkIQUMAQsgCiALYg0BIAMoAiQiBSADKAIMTg0BCyADKQMoIQwgAygCICEHIAQgAykDEDcDECAEIAMpAwg3AwggBCADKQMANwMAAn8gACAAIANGDQAaAkADQCAKIANBGGsiAisDACILY0UEQCAKIAtiDQIgBSADQQxrKAIATg0CCyADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACIgMgAEcNAAsgAAwBCyADCyICIAw3AxAgAiAFNgIMIAIgBzYCCCACIAo5AwALIAEgBEEYaiICRw0ACwwBCyACIAJBAXYiB2shCCAAIAdBGGwiCWohBQJAIAIgBEwEQCAAIAUgByADEOAEIAUgASAIIAMgCWoiARDgBCADIAJBGGxqIQQgASECA0AgAiAERgRAIAEgA0YNBANAIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIABBGGohACADQRhqIgMgAUcNAAsMBAsCQAJAIAIrAwAiCiADKwMAIgtjRQRAIAogC2INASACKAIMIAMoAgxODQELIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBSAHIAMgBBDLASAFIAEgCCADIAQQywEgACAFIAEgByAIIAMgBBCCAwwBCyACIARGDQADQCAAIAIpAxA3AxAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAGQSBqJAALVgEDfyABIABrIgJBGG0hAwJAIAJBgRhOBEAgAyECA0AgAkEYbBBQIgQNAiACQQF2IgINAAsLIAAgASADQQBBABDLAQ8LIAAgASADIAQgAhDLASAEECILOAEBfyAABEAgACgCABDNASAAKAIEEM0BIAAoAhQiAQRAIAAgATYCGCAA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gjAEEwayIDJAAgACgCXCEGIAAoAkwhASADQQA6ABggA0EMaiABIANBGGoiARD5AiEEIANBADoAGCADIAYgARD5AiIKKAIAIQggBgRAIABByABqIQUDQAJAIAggAkEDdkH8////AXFqKAIAIAJ2QQFxDQAgACgCWCACQQJ0aigCACIBQX9GDQAgBCgCACABQQN2Qfz///8BcWoiBygCACILQQEgAXQiCXEEQCAAKAJIIgkgAUEYbGohAQJAIAAoAkwiByAAKAJQIgtPBEAgAyABKQMQNwMoIAMgASkDCDcDICADIAEpAwA3AxggBSALQQF0QYABIAsbEDMgACAAKAJMIgFBAWo2AkwgACgCSCABQRhsaiIBIAMpAyg3AxAgASADKQMgNwMIIAEgAykDGDcDACAKKAIAIQgMAQsgACAHQQFqNgJMIAkgB0EYbGoiByABKQMQNwMQIAcgASkDCDcDCCAHIAEpAwA3AwALIAAoAkxBAWshByAAKAJYIQsgACgCaCEJIAIhAQNAIAhBfkEBIAkgAUECdGooAgAiAUEDb0ECRhsgAWoiAUEDdkH8////AXFqIgwgDCgCAEEBIAF0cjYCACALIAFBAnQiDGogBzYCACALQXhBBCAJIAxqKAIAIgxBA29BAkYbaiAMQQJ0aiAHNgIAIAEgAkcNAAsMAQsgByAJIAtyNgIAIAAoAmghByACIQEDQCAIQX5BASAHIAFBAnRqKAIAIgFBA29BAkYbIAFqIgFBA3ZB/P///wFxaiILIAsoAgBBASABdHI2AgAgASACRw0ACwsgAkEBaiICIAZHDQALCyAIBEAgCigCCBogCBAiCyAEKAIAIgEEQCAEKAIIGiABECILIANBMGokACAAIQMjAEHQAGsiBiQAA0AgAygCXCEJIAZBADYCFCAGQgA3AgwgBkEAOgAYIAYgCSAGQRhqEPkCIQUgBkEANgI4IAZCADcCMCAGQgA3AyAgBkIANwMYIAZBgICA/AM2AihBACEBIAkEQANAAkAgBSgCACABQQN2Qfz///8BcWooAgAgAXZBAXENACADKAJYIAFBAnRqIgAoAgBBf0YNACAAQXhBBCABQQNvQQJGG2ooAgBBf0YNACAGQ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DcDECAFIAQpAxA3AwggBSAEKQMINwMADAELIAMgDUEBajYCrAEgEiANQRhsaiINIAUpAxA3AxAgDSAFKQMINwMIIA0gBSkDADcDAAsgDkECdCIFIAMoAlhqKAIAIQ0gCyAJIAwQyAEgCyAKIAwQyAEgCyANIAMoAnggBWooAgAQyAEgAygCaCIJIAFBBWoiDEECdGogBSAJaiIFKAIAIg02AgAgCSANQQJ0aiAMNgIAIAkgAUEEaiIMQQJ0aiAONgIAIAUgDDYCACAJIAFBA2oiBUECdGogATYCACAJIAFBAnRqIAU2AgAgDkEDbSEFAkAgAygC3AEiCUUNACADKALYASIOIAVBBHRqIQEgAygC4AEiDCAJTQRAIAQgASkCCDcDECAEIAEpAgA3AwggDyAMQQF0QYABIAwbEDkgAyADKALcASIBQQFqNgLcASADKALYASABQQR0aiIBIAQpAxA3AgggASAEKQMINwIADAELIAMgCUEBajYC3AEgDiAJQQR0aiIJIAEpAgg3AgggCSABKQIANwIACwJAIAMoAqwBIglFDQAgAygCqAEiDCAFQRhsaiEBIAMoArABIgUgCU0EQCAEIAEpAxA3AxggBCABKQMINwMQIAQgASkDADcDCCARIAVBAXRBgAEgBRsQMyADIAMoAqwBIgFBAWo2AqwBIAMoAqgBIAFBGGxqIgEgBCkDGDcDECABIAQpAxA3AwggASAEKQMINwMADAELIAMgCUEBajYCrAEgDCAJQRhsaiIJIAEpAxA3AxAgCSABKQMINwMIIAkgASkDADcDAAsgAiAHRg0CIAMoAmghAgwDCyAFQXhBBCABQQNvQQJGG2ogCWooAgAiASAHRw0ACwsgAygCSCIFIApBGGxqIQECQCADKAJMIgkgAygCUCICTwRAIAQgASkDEDcDGCAEIAEpAwg3AxAgBCABKQMANwMIIANByABqIAJBAXRBgAEgAhsQMyADIAMoAkwiAUEBajYCTCADKAJIIAFBGGxqIgEgBCkDGDcDECABIAQpAxA3AwggASAEKQMINwMADAELIAMgCUEBajYCTCAFIAlBGGxqIgIgASkDEDcDECACIAEpAwg3AwggAiABKQMANwMACwJA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bEYNASAAIANBxAFqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQcYBaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HQAWoiAW4iAiABSQ0DIANB0gFqIQMgACABIAJsRw0ACwtBACAGQQFqIgAgAEEwRiIAGyIGQQJ0KAKQ5AEgACAFaiIFQdIBbGohAAwACwALIARBEGokACAAC7MBAQN/IwBBEGsiAyQAIAEhAgNAIAJBBE8EQCAAKAAAQZXTx94FbCIEQRh2IARzQZXTx94FbCABQZXTx94FbHMhASACQQRrIQIgAEEEaiEADAELCwJAAkACQAJAIAJBAWsOAwIBAAMLIAAtAAJBEHQgAXMhAQsgAC0AAUEIdCABcyEBCyABIAAtAABzQZXTx94FbCEBCyABQQ12IAFzQZXTx94FbCIAQQ92IABzIANBEGokAAuoAQACQCABQYAITgRAIABEAAAAAAAA4H+iIQAgAUH/D0kEQCABQf8HayEBDAILIABEAAAAAAAA4H+iIQBB/RcgASABQf0XTxtB/g9rIQEMAQsgAUGBeEoNACAARAAAAAAAAGADoiEAIAFBuHBLBEAgAUHJB2ohAQwBCyAARAAAAAAAAGADoiEAQfBoIAEgAUHwaE0bQZIPaiEBCyAAIAFB/wdqrUI0hr+iCwoAIAAgABCnA6ILQwAgACAAIAGlIAG9Qv///////////wCDQoCAgICAgID4/wBWGyABIAC9Qv///////////wCDQoCAgICAgID4/wBYGwtNAgF/AXwjAEEQayIFJAAgBSAENgIIIAUgAzYCDCAAKAIQIgBFBEAQZgALIAAgASACIAVBDGogBUEIaiAAKAIAKAIYERgAIAVBEGokAAukAgICfwV+AkAgASgCEEUNAAJAIAEpAzggASkDKFUEQCABKQMwIAEpAyBVDQELIAAgARC9AiABKAIQIgNFDQEgAyAALQB1QQAgAUFAaxD9AUUNAUL///////////8AIQdCgICAgICAgICAfyEIAkAgASgCQCICIAEoAkQiAEYEQEKAgICAgICAgIB/IQVC////////////ACEGDAELQv///////////wAhBkKAgICAgICAgIB/IQUDQCACKQMIIgQgCCAEIAhVG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AIQRw0AIAApAwAiCiABKQMAIgt9QgF8QgJYBEAgACkDCCABKQMIfUIBfEIDVA0DCyAGKQMAQgF8IgwgC31CAlgEQCAGKQMIIAEpAwh9QgF8QgNUDQMLIAwgCn1CAlYNACAGKQMIIAApAwh9QgF8QgNUDQILQQEhBgwCCxAmAAtBACEGCyAIQSBqJAAgBgvDBAIEfgZ/IwBBEGsiCSQAIAEgASkDGCIDNwMIIAEgASkDECIFNwMAIAEgASgCVEEQQRQgASgCMEEAShtqKAIAIgY2AlQgBikDACEEIAYpAwghAiABIAU3AyAgASACNwMYIAEgBDcDECABAnwgAiADUgRAIAEpAxAgBX25IAIgA325owwBC0T////////v/0T////////vfyABKQMQIAVVGws5AyggASgCYARAIAAgASABEH4gASkDCCEDIAEpAxghAgsCQCACIANRBEAgASgCWC0ACA0BQQAhBkEQQRQgASgCMEEAShsiCCABKAJUaigCACIHKQMIIANSDQEgASkDACEFIAEpABAhBCAALQB0QQFxIQACQANAIABBACAHKQMAIgIgBFMgBCAFV0YbRQRAIAEgAjcDECABIAc2AlQgBy0AGEEEcQ0CQQEhBiACIQQgAyAHIAhqKAIAIgcpAwhRDQEMAgsLIAQhAiAGQQFxRQ0CCyABRP///////+//RP///////+9/IAIgBVUbOQMoDAELIAkgAjcDCCAAQUBrIAlBCGoQkgECQCAAKAJEIgggACgCQCIKa0EDdSIGQQJIDQAgCiAGQQJrQQF2IgdBA3RqIgYpAwAiAyAIQQhrIgspAwAiBFkNAANAAkAgBiEIIAsgAzcDACAHRQ0AIAYhCyAKIAdBAWtBAXYiB0EDdGoiBikDACIDIARTDQELCyAIIAQ3AwALIAAgASABQQAQgQIgACABIAFBARCAAgsgCUEQaiQAC+tJAwx/DH4IfCMAQRBrIg8kACAAIAM6ABkgACACNgIIIAAgATYCBCMAQRBrIg0kACAALQAYRQRAIA1BB2ohBwJAAkAgACgCKCIFIAAoAiQiBGtBAnUiAkEASgRAIAIhAwNAIANBAnQQUCIGDQIgA0EBdiIDDQALCyAEIAUgByACQQBBABCwAQwBCyAEIAUgByACIAYgAxCwASAGECILIABBAToAGAsgACgCKCIHIAAoAiQiCEcEQCAAQUBrIQQDQCANIAdBBGsiBygCACgCACkDCDcDCCAEIA1BCGoQkgECQCAAKAJEIgMgACgCQCIFa0EDdSICQQJIDQAgBSACQQJrQQF2IghBA3RqIgYpAwAiESADQQhrIgMpAwAiEFkNAANAAkAgBiECIAMgETcDACAIRQ0AIAIhAyAFIAhBAWtBAXYiCEEDdGoiBikDACIRIBBTDQELCyACIBA3AwALIAcgACgCJCIIRw0ACwsgAEEBOgB9IABCADcCHCAAIAg2AjAgDUEQaiQAQQEhAwJAIAFFDQAgACAPQQhqELkDRQ0AQQAhAyAALQB9QQFHDQADQCAPKQMIIRMjAEEQayIKJAACQCAAKAIwIgYgACgCKEYNACAAQUBrIQ0DQCAGKAIAIgQoAgAiASkDCCATUg0BIAAgBkEEajYCMAJAAkAgASgCGCIBQQFxRQRAQegAECMiAkEAQegA/AsAIAJBATYCMCACQTRqQQBBKfwLACACIAQoAgAiASkDADcDACABKQMIIRAgAkF/NgIwIAIgEDcDCCACIAIpAwAiEjcDICACIAQoAgAoAhQiATYCVCACIAEpAwg3AxggASkDACEQIAIgBDYCWCACIBA3AxAgAgJ8IAIpAxgiESACKQMIIhBSBEAgAikDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAIpAxAgElUbCzkDKCAEKAIALQAYQQJxRQRAIAIhBgwCC0EAIQYMAgtBACEGQQAhAiABQQJxDQELQegAECMiAUEAQegA/AsAIAFBATYCMCABQTRqQQBBKfwLACABIAQoAgAiAikDADcDACACKQMIIRAgAUEBNgIwIAEgEDcDCCABIAEpAwAiEjcDICABIAQoAgAoAhAiAjYCVCABIAIpAwg3AxggAikDACEQIAEgBDYCWCABIBA3AxAgAQJ8IAEpAxgiESABKQMIIhBSBEAgASkDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAEpAxAgElUbCyIcOQMoAkAgBkUEQEEAIQYMAQsCQC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GGyABaiIBIAFBA20iCkEDbGtBAkYbIgcgAWoiC0EDbyEMAkAgACgCSCIDIAAoAlgiDSABQQJ0aiIIIAdBAnRqKAIAQRhsaiIHKwMAIAMgCCgCAEEYbGoiCCsDACIRoSIPIA8gD6IgBysDCCAIKwMIIhOhIg8gD6KgIAcrAxAgCCsDECIUoSIVIBWioJ8iFqMiF71C////////////AINC//////////f/AFYNACARIAMgDUF4QQQgDEECRhtqIAtBAnRqKAIAQRhsaiIDKwMAoSIRIBEgEaIgEyADKwMIoSIRIBGioCAUIAMrAxChIhMgE6KgnyIUoyIYvUL///////////8Ag0KAgICAgICA+P8AWg0AIA4CfEQAAAAAAAAAACAVIBajIBMgFKOiIA8gFqMgESAUo6IgFyAYokQAAAAAAAAAAKCgoCIORAAAAAAAAPC/ZQ0AGkQYLURU+yEJQCAORAAAAAAAAPA/Zg0AGiAOmhBdCyIPIAAoAqgBIApBGGxqIgMrAxCioCEOIBIgDyADKwMIoqAhEiAQIA8gAysDAKKgIRALIAEgBEcNAAsgACgCmAEgAkEYbGoiASAOIA4gDqIgEiASoiAQIBCioKCfIg6jRAAAAAAAAAAAIBAgDqMiEL1C////////////AINCgICAgICAgPj/AFQiBBs5AxAgASASIA6jRAAAAAAAAAAAIAQbOQMIIAEgEEQAAAAAAAAAACAEGzkDAAsgAkEBaiICIAlHDQALCyAGKAIAIgAEQCAGIAA2AgQgBigCCBogABAiCyAFQUBrJAALgAEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARA5IAEgACgCBCIDayIEQQBMDQAgACgCACADQQR0aiEDA0AgAyACKQIINwIIIAMgAikCADcCACADQRBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQgwELCz4AIAMEQCAAIAMQ8gEgACgCBCEDIAEgAkcEQANAIAMgARAuQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQLC4gBAQl8IAErAzAhBiABKwMAIQcgASsDGCEIIAErAzghCSABKwMIIQogASsDIC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CABECgaIAIgACgCCCIBRw0ACwsgACgCACIBBEAgACgCDBogARAiCws8AQF/IAAgAUcEQCAAIQMDQCACIAMQiwFBGGohAiADQRhqIgMgAUcNAAsDQCAAEChBGGoiACABRw0ACwsLSgECfyAAKAIEIgIgACgCCCIBRwRAA0AgACABQUBqIgE2AgggARBBGiACIAAoAggiAUcNAAsLIAAoAgAiAQRAIAAoAgwaIAEQIgsLtwEBBX8gACgCBCICIQQgASgCBCAAKAIAIgMgAmtqIgYhBSADIARHBEAgAyECA0AgBSACELQBQUBrIQUgAkFAayICIARHDQALA0AgAxBBQUBrIgMgBEcNAAsLIAEgBjYCBCAAIAAoAgAiAjYCBCAAIAEoAgQ2AgAgASACNgIEIAAoAgQhAiAAIAEoAgg2AgQgASACNgIIIAAoAgghAiAAIAEoAgw2AgggASACNgIMIAEgASgCBDYCAAuhAgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAErAwA5AwAgAkEIaiEBDAELIAIgACgCACIEa0EDdSIGQQFqIgJBgICAgAJPDQEgBUEMakH/////ASADIARrIgNBAnUiBCACIAIgBEkbIANB+P///wdPGyAGIAAQSyICKAIIIgMgASsDADkDACACIANBCGo2AgggAigCBCAAKAIEIAAoAgAiA2siAWshBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQmQELIAAgATYCBCAFQSBqJAAPCxAmAAs9AQJ/IAAoAgQiAiAAKAIIIgFHBEAgACABIAIgAWtBP2pBQHFqNgIICyAAKAIAIgEEQCAAKAIMGiABECILC4gBAgJ/AXwjAEEQayICJABBmJ8CLQAAQQFxRQRAQQJBjIwCQQMQBiEDQZifAkEBOgAAQZSfAiADNgIACyABKAIEIgFBCU8EQCABEBMLIAIgATYCCCACQQA2AgRBlJ8CKAIAIABBACACQQRqIAJBCGoQBSACKAIEIgAEQCAAEAQLIAJB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sgASARLQAIOgAIIAEgESkDADcCACAKIA1HDQALIAogFGoMAQsCQCABIApGIAEgC0ZyDQAgASEIA0AgESAKKAIINgIIIBEgCikCADcDACAKIAgtAAg6AAggCiAIKQIANwIAIAggES0ACDoACCAIIBEpAwA3AgAgCkEMaiIKIAFGDQEgCEEMaiIIIAtHDQALCyABCyEBCyAMIAs2AgQgDCABNgIACyAOQRBqJAAgDCgCACEBAn8gDyAQaiAEIBBrIgQgBSAPayIFakgEQCAAIAkgASADIBAgDyAGIAcQuAIgASEAIAsMAQsgASALIAIgAyAEIAUgBiAHELgCIA8hBSAQIQQgASECIAkLIQEgBQ0ACwsgDEEQaiQAC68MAgl/An4jAEEQayIQJAACQCAFRQ0AA0ACQCAFIAdMIAQgB0xyRQRAIARFDQMgASgCACIJKAIAIggpAwghEQNAAkAgESAAKAIAIgooAgAiCykDCCISUgRAIBEgElcNAQwECyALKQMAIAgpAwBVDQMLIABBBGohACAEQQFrIgQNAAsMAwsgACEHIAEhCUEAIQgjAEEQayIKJAACQAJAAkACQAJAIAQgBUwEQCAAIAFHDQEgBiEADAILIAIgCUcNAiAGIQAMAwsgBiEAIAchAQNAIAEoAgAhAyABQQA2AgAgACADNgIAIABBBGohACAIQQFqIQggAUEEaiIBIAlHDQALCyAKIAg2AgwjAEEQayIDJAACQCAAIAYiAUYNAANAIAIgCUYEQCAAIAFHBEADQCABKAIAIQQgAUEANgIAIAcoAgAhAiAHIAQ2AgAgAgRAIAIQIgsgB0EEaiEHIAFBBGoiASAARw0ACyAAIQELIAMgBzYCDCADIAE2AggMAgsCQAJAAkAgASgCACIFKAIAIgQpAwgiESAJKAIAIggoAgAiCykDCCISUgRAIBEgElMNAQwCCyAEKQMAIAspAwBXDQELIAlBADYCACAHKAIAIQQgByAINgIAIAQEQCAEECILIAlBBGohCQwBCyABQQA2AgAgBygCACEEIAcgBTYCACAEBEAgBBAiCyABQQRqIQELIAdBBGohByAAIAFHDQALCyADQRBqJAAMAgsgBiEAA0AgASgCAC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EANgIQC8MCARF+IAIpAwggASkDCCIEfSINIA1CP4ciDoUgDn0iBUL/////D4MiBiABKQMAIgcgACkDAH0iDyAPQj+HIhCFIBB9IghC/////w+DIgl+IgNCIIggBiAIQiCIIgh+fCIRQv////8PgyAJIAVCIIgiCX58IhJCIIYgA0L/////D4OEIAIpAwAgB30iBSAFQj+HIgaFIAZ9IgNC/////w+DIgogBCAAKQMIfSIEIARCP4ciB4UgB30iC0L/////D4MiDH4iE0IgiCAKIAtCIIgiC358IgpC/////w+DIANCIIgiAyAMfnwiDEIghiATQv////8Pg4RRIAggCX4gEUIgiHwgEkIgiHwgAyALfiAKQiCIfCAMQiCIfFFxIA6nIA1CAFVqIBCnIA9CAFVqbCAGpyAFQgBVaiAHpyAEQgBVamxGcQuJAwIEfwJ+An8gASkDICIHIAApAyAiBlIEQCAGIAdTDAELIABBEGoiBSABIAFBEGoiAxCHASICBEAgAkEfdgwBCwJAIAAoAlQiBC0AGEEEcQ0AIAApAxggASkDGFcNACABIAUgBEEQQRQgACgCMEEAShtqKAIAEIcBQQBMDAELAkAgASgCVCICLQAYQQRxDQAgASkDGCAAKQMYVw0AIAEgAyACQRBBFCABKAIwQQBKG2ooAgAQhwFBAE4MAQsgAS0AXCICIAEpAwgiBiAAKQMIUg0AGiACIAYgACgCWCgCACkDCFINABogAiAALQBcIAJHDQAaQQECfyAAKAIwQQBKBEAgBCgCFEEUagwBCyAEKAIQQRBqCygCACAAIAUQvgINABogACgCVCEDAn8gACgCMEEASgRAIAMoAhRBFGoMAQsgAygCEEEQagshACABKAJUIQMgAiAAKAIAIAECfyABKAIwQQBKBEAgAygCFEEUagwBCyADKAIQQRBqCygCABCHAUEASkYLQQFxC/QGAgt/An4gAEEAOgAYIAIhCSAAQTRqIQQgAEEkaiEKIwBBIGsiCyQAAkACQAJAIAEoAgAiBiABKAIEIgxGDQAgBiEAA0AgACgCBCAAKAIAa0EEdSADaiEDIABBDGoiACAMRw0ACyADRQ0AQX8gA0EFdCIAIANB////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BIQkDQCADQSRqIAQgCUEGdGoQTSADQQA2AjQgA0IANwIsIAMoAiQhBCAIQQBB6AD8CwAgA0IANwNgIANBAjYCXCADQgA3AlQgB0EAQTD8CwAgBkEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIFIANBOGoiAhCbASAFIAQQ4QEgA0EANgL8ASADQgA3AvQBIAVBAUECIANBLGoiBCADQfQBaiIKEOIBIAMgCjYCTCADQcwAahApIAUQaRogAigCACIKBEAgAiAKEHsgAigCCBogAigCABAiIAJBADYCCCACQgA3AgALIAMgAygCLDYCOCADKQIwIRAgA0EANgI0IAMgEDcCPCADQgA3AiwgAyAENgJQIAUQKQJAIAMoAigiAkUNACACIAIoAgQiBUEBazYCBCAFDQAgAiACKAIAKAIIEQAAIAIQJAsgCUEBaiIJIAEoAgQgASgCACIEa0EGdUkNAAsLQRgQIyIBQbSaAjYCACABQgA3AgQgA0HQAGohBCABQQxqIgIgA0E4aiIFEFsgAyABNgIgIAMgAjYCHCADIAMpAhw3AwAgACADEGoLIAMgBTYCUCAEECkgAygCSCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADQYACaiQAC+EDAQV/IwBB4AFrIgQkACAEQRxqIAEQTSAEKAIcIQEgBEEUaiACEE0gBEEANgIsIARCADcCJCAEKAIUIQIgBEHIAGpBAEHoAPwLACAEQgA3A0AgBEECNgI8IARCADcCNCAEQcwAakEAQTD8CwAgBEGAAWpBAEEk/AsAIARBADYCuAEgBEIANwOwASAEQQE6AK0BIARBAToApAEgBEKAgICAgICAoD43A8gBIARCgICAgICAgNDBADcDwAEgBEH8mgI2AjAgBEEwaiIFIAEQmwEgBSACEOEBIARBADYC2AEgBEIANwLQASAFQQFBA0ECIANBAUYbIANBAkYbQQIgBEEkaiAEQdABaiIBEOIBIAQgATYC3AEgBEHcAWoQKS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jIAMrAxAiCSAQIBcgF6IgEyAToqAgECAQoqCfIgijRAAAAAAAAAAAIBcgCKMiC71C////////////AINCgICAgICAgPj/AFQiBRsiECALRAAAAAAAAAAAIAUbIhIgAysDACIKokQAAAAAAAAAAKAgEyAIo0QAAAAAAAAAACAFGyITIAMrAwgiDaKgIBAgCaKgIgiioSIMIAyiIAogEiAIoqEiCyALoiANIBMgCKKhIgggCKKgoCIUIAogCqIgDSANoqAgCSAJoqBEEeotgZmXcT2iYwRAICEgGKEiCCAQIBIgIyAfoSIJokQAAAAAAAAAAKAgEyAiIBmhIgqioCAQIAiioCIIoqEiDCAMoiAJIBIgCKKhIgsgC6IgCiATIAiioSIIIAiioKAhFAtEAAAAAAAAAAAhDUQAAAAAAAAAACEJIAsgFJ8iCqMiC71C////////////AINC//////////f/AFgEQCAIIAqjIQ0gDCAKoyEOIAshCQtEAAAAAAAAAAAhCyADKwMwIgggJEQAAAAAAAAAgCACGyIUIBWaRAAAAAAAAACAIAIbIhcgAysDICIMokQAAAAAAAAAAKAgFpogEaNEAAAAAAAAAIAgAhsiFiADKwMoIhiioCAUIAiioCIRoqEiFSAVoiAMIBcgEaKhIgogCqIgGCAWIBGioSIRIBGioKAiGSAMIAyiIBggGKKgIAggCKKgRBHqLYGZl3E9omMEQCAhIB2hIgggFCAXICMgIKEiDKJEAAAAAAAAAACgIBYgIiAeoSIRoqAgFCAIoqAiCKKhIhUgFaIgDCAXIAiioSIKIAqiIBEgFiAIoqEiESARoqCgIRkLRAAAAAAAAAAAIQxEAAAAAAAAAAAhCCAGIBM5A5gBIAYgCTkDqAEgBiASOQOQASAGIA05A7ABIAYgEiANoiATIAmioTkD0AEgBiAOOQO4ASAGIBA5A6ABIAYgECAJoiASIA6ioTkDyAEgBiATIA6iIBAgDaKhOQPAASAGQdgBaiAGQZABaiICEOQDIAYgFjkDmAEgCiAZnyIKoyIJvUL///////////8Ag0L/////////9/8AWARAIBEgCqMhDCAVIAqjIQsgCSEICyAGIAg5A6gBI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Q0AIAAgARBEIAEgACgCBCIDayICQQBMDQAgACgCACADQQN0aiEDA0AgA0J/NwMAIANBCGohAyACQQFLIAJBAWshAg0ACwsgACABNgIEBEAgABCUAQsLmgEBAX8gACABRwRAAkAgACgCDCICRQ0AIAIgAigCACICQQFrNgIAIAJBAUoNACAAKAIMIgIEQCACECILIABBADYCDCAAKAIAIgIEQCACECILIABBADYCCCAAQgA3AgALIAEoAgwiAiACKAIAQQFqNgIAIAAgASgCDDYCDCAAIAEoAgA2AgAgACABKAIENgIEIAAgASgCCDYCCAsLcgEDfyAAKALUAUUEQEEADwsgACgCzAEiASAAQdABaiICRgRAQQEPCwNAIAEtAIEBIgNBAUYEQAJAIAEoAgQiAARAA0AgACIBKAIAIgANAAwCCwALA0AgASABKAIIIgEoAgBHDQALCyABIAJHDQELCyADCykAIABBADYCBCAAEC0gAEEANgIUIABBEGoQLSAAQQA2AiQgAEEgahAtC8UCAQN/IAAoAgggACgCACIEa0EMbSADTwRAIAAoAgQiBSAEayIGQQxtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMoAgg2AgggASADKQIANwIAIAFBDGohASADQQxqIgMgAkcNAAsLIAAgBSABIAVrajYCBA8LIAIgAWsiA0UgASACRnJFBEAgBCABIAP8CgAACyAAIAMgBGo2AgQPCyAAEEUgA0HWqtWqAUkEQCAAQdWq1aoBIAAoAgggACgCAGtBDG0iBUEBdCIEIAMgAyAESRsgBUGq1arVAE8bEKMCIAAoAgQhAyABIAJHBEADQCADIAEoAgg2AgggAyABKQIANwIAIANBDGohAyABQQxqIgEgAkcNAAsLIAAgAzYCBA8LECYAC9gCAQN/IAAoAgggACgCACIEa0EYbSADTwRAIAAoAgQiBSAEayIGQRhtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACABQRhqIQEg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BASABQQNvQQJGGyABaiIENgIoIANBfkEBIARBA29BAkYbIARqIgk2AiwgAyAAKAJoIgUgAUECdGooAgAiATYCGCADIAFBfkEBIAFBA29BAkYbaiICNgIcIANBfkEBIAJBA29BAkYbIAJqIgc2AiACQCAFIARBAnRqKAIAIghBf0YNACAAKAJYIgYgCUECdCIBaigCACAGIAdBAnRqKAIARw0AIAEgBWooAgAhAQJAIAcgCEYEQCABIAJGBEAgA0ECNgIUIANCgICAgBA3AgwgACgCSCEKQQAhAQNAIAogBiADQSRqQQRBCCADQQxqIAFqKAIAIgRBAUYbQQAgBBtqKAIAQQJ0aigCAEEYbGoiBEKAgICAgICA/P8ANwMQIARCgICAgICAgPz/ADcDCCAEQoCAgICAgID8/wA3AwAgAUEEaiIBQQxHDQALDAILIAAoAkggBiAEQQJ0aigCAEEYbGoiAUKAgICAgICA/P8ANwMQIAFCgICAgICAgPz/ADcDCCABQoCAgICAgID8/wA3AwAMAQsgASACRw0AIAAoAkggBiACQQJ0aigCAEEYbGoiAUKAgICAgICA/P8ANwMQIAFCgICAgICAgPz/ADcDCCABQoCAgICAgID8/wA3AwALIAUgCEECdGogBSAHQQJ0aigCACIBNgIAIAUgAUECdGogCDYCACAFIAUgCUECdGooAgAiAUECdGogBSACQQJ0aigCACICNgIAIAUgAkECdGogATYCACADQQI2AhQgA0KAgICAEDcCDCAAKAJ4IQBBACEBA0AgBkEEQQggA0EMaiABaigCACICQQFGG0EAIAIbIgQgA0EkamooAgBBAnQiAmpBfzYCACACIAVqQX82AgAgACACakF/NgIAIAYgA0EYaiAEaigCAEECdCICakF/NgIAIAIgBWpBfzYCACAAIAJqQX82AgAgAUEEaiIBQQxHDQALCws6ACAAKAJcBEAgAEHYAGoQOCAAQegAahA4IABB+ABqEDggABDtASAAQQAQzwQgAEEAEM4EIAAQlAILC/8PAhh/GHwjAEEgayIKJAACQCAAKAJoIgsgAUECdCIGaigCACIMQQBIDQAgACsDMCEnIAogATYCFCAKQX5BASABIAFBA20iByI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bEHELIARCADcDoAIgBEIANwOYAiAEQgA3A5ACIARCADcDiAIgBEIANwMIIARCADcDECAEQgA3AxggBEIANwMgIAtBuAFqIAcgBEEIahDaBCALKALcASEFIAtB2AFqIh8gBCgC+AQiAxA5IAsgAzYC3AEgBUERSSAFIANBAXRNckUEQCAfEIMBCyAXQQBKBEAgCyAXNgJAIAtBiAFqIAQoAvQEIBdsRAAAAAAAAAAAEIABC0GYlQIoAgAhICAGKAIUIgMgBigCGCIIRwRAIAggA2tBA3UhKCALQYgBaiEhIARBiAVqISkgBEGwAWohKiAEQdwFaiEiIARBLGohIwNAIAQoAtwEIQUgBigCFCAYQQN0aiIVKAIAIg8oAgwiFigCvAEiAwRAIANBBXQiAwRAIAsoArgBIAUgGEECdGooAgBBBXRqIBYoArgBIAP8CgAACyAVKAIAIg8oAgwhFiAEKALcBCEFCyAYQQJ0IhQgBCgCxARqISQgFigCQCETIBYoAlwiCARAICQoAgAhJSAFIBRqIhEoAgAhEiAEKALoBCAUaigCACENIAsoAnghDiALKAJoIQwgFigCaCEKIAsoAlghByAWKAJYIQNBACEFA0AgByARKAIAIAVqQQJ0IiZqIAMgBUECdCInaigCACANajYCACAMICZqIAogJ2ooAgAgEmo2AgAgDiAmaiATBH8gFigCeCAnaigCACAlagUgJQs2AgAgBUEBaiIFIAhHDQALIBYoAkAhEwsCQCATRSATQQBMcg0AIBMgFigCjAFqQQFrIQ4gISgCACEMIBYoAogBIQpBACEIA0AgDiAIayINIA0gE3AiB0cEQCAKIAhBA3QiA2oiBSANIAdrQQN0aiEHIAwgJCgCACAXbEEDdGogA2ohAwNAIAMgBSsDADkDACADIBdBA3RqIQMgBSATQQN0aiIFIAdHDQALCyAIQQFqIgggE0cNAAsgE0ECTA0AIARCgICAgICAgPg/NwMoIARCADcDQCAEQgA3AzggBEIANwMwIARCgICAgICAgPg/NwNIIARCADcDYCAEQgA3A1ggBEIANwNQIARCgICAgICAgPg/NwNoIARCADcDgAEgBEIANwN4IARCADcDcCAEQ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IEIgI2AhAgAgRAIAIgAigCBEEBajYCBAsgAEIANwMgIABCgICAgICAgPg/NwMYIABCADcDKCAAQgA3AzAgAEIANwNAIABCgICAgICAgPg/NwM4IABCADcDSCAAQgA3A1AgAEKAgICAgICA+D83A1ggAEHgAGpBAEEw/AsAIAEQLxoL4gIBBX8jAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABKAIANgIAIAIgASgCBCIBNgIEIAEEQCABIAEoAgRBAWo2AgQLIAJBCGohAQwBCyACIAAoAgAiBGtBA3UiBkEBaiICQYCAgIACTw0BIAVBDGpB/////wEgAyAEayIDQQJ1IgQgAiACIARJGyADQfj///8HTxsgBiAAEEsiAigCCCIDIAEoAgA2AgAgAyABKAIEIgE2AgQgAiABBH8gASABKAIEQQFqNgIEIAIoAggFIAMLQQhqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFrIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACEG4LIAAgATYCBCAFQSBqJAAPCxAmAAubAgEEf0GYARAjIgRBsJMCNgIAIARCADcCBCACLAAAIQUjAEEQayIDJAAgBEEQaiICQgA3AgQgAkG0kgI2AgAgA0EANgIIIANCADcCACADIAEoAgAiBiABKAIEIgEgASAGa0EDdRCBAyACQQxqIAMQ0wQgAyADNgIMIANBDGoQZSACQgA3AyggAkKAgICAgICA+D83AyAgAiAFOgAcIAJCADcDMCACQgA3AzggAkIANwNIIAJCgICAgICAgPg/NwNAIAJCADcDUCACQgA3A1ggAkIANwNoIAJCgICAgICAgPg/NwNgIAJCADcDcCACQgA3A3ggAkIANwOAASADQRBqJAAgACAENgIEIAAgAjYCACAAIARBFGogAhCPAQtkAQF/IAMEQCAAIAMQkAMgACgCBCEDIAEgAkcEQANAIAMgASgCADYCACADIAEoAgQiBDYCBCAEBEAgBCAEKAIEQQFqNgIECyADQQ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gRqSARAIAAgCSAIIAMgDCAKIAYgBxCFAyAIIQAgCwwBCyAIIAsgAiADIAQgBSAGIAcQhQMgCiEFIAwhBCAIIQIgCQshASAFDQEMAgsLIAEgAkYNACAGIQQgASEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAkcNAAsgAygCBCELIAMoAgAhCQNAIAAgASIDRgRAA0AgAkEEayICIARBBGsiBCgCADYCACAEIAZHDQAMAwsACwJAIAkoAgAiCiAEQQRrIgcoAgAiCEEDdGoiDCALKAIAIg1BAnQiAWooAgAiDiABIAogA0EEayIBKAIAIgVBA3RqIgpqKAIAIg9IDQAgDiAPRgRAIAxBASANa0ECdCINaigCACAKIA1qKAIASA0BCyAIIQUgAyEBIAchBAsgAkEEayICIAU2AgAgBCAGRw0ACwsgEUEQaiQAC5YHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCiAOKAJIIAJqIhQrAwAhBiABKAIEIhEoApgBIRUgESgCSCEWQQAhAUEAIQIDQAJ/IAogFSAEIA9BBGogAmooAgBBBHRqIhAoAgRBGGwiDmorAwCaZCAOIBZqIg4rAwAiCCAGYyAGIAhhGyAKIBUgECgCCEEYbCITaisDAJpkIBMgFmoiEysDACIJIAZjIAYgCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBAoAgAhGCAOKwMQIQcgDisDCCEFAkAgBiAIoSILIAYgCaEiDCALmSAMmWMiDhsgCSAIoaMiCL1C////////////AINC//////////f/AFYNACATKwMIIgkgBaEiC71C////////////AINCgICAgICAgPj/AFoNACATKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgDhsgCCANoqAhByAFIAkgDhsgCCALoqAhBQsgGUEAIBEoAqgBIg4gGEEDbUEYbGorAwggDiARKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAUgFCsDCCIIYyAFIAhhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AIA5BACAOayAQLQAMGyASaiESIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIQIAc5AxAgECAHOQMIIBAgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyASRQRARAAAAAAAAPh/IQVBAAwBCyASQQAgESgCqAEgA0EYbGorAxBEAAAAAAAAAABkIA8rAyAiBSAPKwM4IgYgFCsDCCIHIA8rAxAiCKEiCZkgByAPKwMoIgehIgqZYyIBGyAGIAWhIgYgCSAKIAEbIAcgCKGjIgeioCAFIAa9Qv///////////wCDQoCAgICAgID4/wBUGyAFIA8rAzAgDysDGKG9Qv///////////wCDQoCAgICAgID4/wBUGyAFIAe9Qv///////////wCDQoCAgICAgID4/wBUGyIFIBQrAxAiBmMgBSAGYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0wgBCAHTHJFBEAgBEUNBCADKAIAKAIAIg0gASgCACILQQN0aiIIQQEgAygCBCgCACIJa0ECdCIOaiEKIAggCUECdCIPaigCACEIA0AgCCANIAAoAgAiCUEDdGoiDCAPaigCACIQSA0CIAggEEYEQCAKKAIAIAwgDmooAgBIDQMLIABBBGohACAEQQFrIgQNAAsMBAsgBCAFSg0BIAAgAUYNAyAGIQQgACEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAUcNAAsgAygCBCEFIAMoAgAhAwNAIAEgAkYEQCAEIAZrIgFFDQUgACAGIAH8CgAADAULAkACQCADKAIAIgcgASgCACIIQQN0aiILIAUoAgAiCUECdCIKaigCACIMIAogByAGKAIAIgpBA3RqIgdqKAIAIg1OBEAgDCANRw0BIAtBASAJa0ECdCIJaigCACAHIAlqKAIATg0BCyAAIAg2AgAgAUEEaiEBDAELIAAgCjYCACAGQQRqIQYLIABBBGohACAEIAZHDQALDAMLAkAgBCAFSARAIAEgBUECbS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JqIhQrAwAhBiABKAIEIhEoApgBIRUgESgCSCEWQQAhAUEAIQIDQAJ/IBUgBCAPQQRqIAJqKAIAQQR0aiIQKAIEQRhsIg5qKwMAIApjIA4gFmoiDisDACIIIAZjIAYgCGEbIBUgECgCCEEYbCITaisDACAKYyATIBZqIhMrAwAiCSAGYyAGIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyAQKAIAIRggDisDECEHIA4rAwghBQJAIAYgCKEiCyAGIAmhIgwgC5kgDJljIg4bIAkgCKGjIgi9Qv///////////wCDQv/////////3/wBWDQAgEysDCCIJIAWhIgu9Qv///////////wCDQoCAgICAgID4/wBaDQAgEysDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIA4bIAggDaKgIQcgBSAJIA4bIAggC6KgIQULIBlBACARKAKoASIOIBhBA21BGGxqKwMIIA4gESgCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAFIBQrAwgiCGMgBSAIYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNACAOQQAgDmsgEC0ADBsgEmohEiABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiECAHOQMQIBAgBzkDCCAQIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gEkUEQEQAAAAAAAD4fyEFQQAMAQsgEkEAIBEoAqgBIANBGGxqKwMQRAAAAAAAAAAAYyAPKwMgIgUgDysDOCIGIBQrAwgiByAPKwMQIgihIgmZIAcgDysDKCIHoSIKmWMiARsgBiAFoSIGIAkgCiABGyAHIAihoyIHoqAgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsiBSAUKwMQIgZjIAUgBmEbGwshASAAIAU5AwggACABNgIAC7IJAQ5/IwBBEGsiESQAAkAgBUUNAAN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gESgCCCEIAn8gCiAMaiAFIAprIgUgBCAMayIEakgEQCAAIAkgCCADIAwgCiAGIAcQiQMgCCEAIAsMAQsgCCALIAIgAyAEIAUgBiAHEIkDIAohBSAMIQQgCCECIAkLIQEgBQ0BDAILCyABIAJGDQAgBiEEIAEhCANAIAQgCCgCADYCACAEQQRqIQQgCEEEaiIIIAJHDQALIAMoAgQhCyADKAIAIQkDQCAAIAEiA0YEQANAIAJBBGsiAiAEQQRrIgQoAgA2AgAgBCAGRw0ADAMLAAsCQCAJKAIAIgogBEEEayIHKAIAIghBA3RqIgwgCygCACINQQJ0IgFqKAIAIg4gASAKIANBBGsiASgCACIFQQN0aiIKaigCACIPSA0AIA4gD0YEQCAMQQEgDWtBAnQiDWooAgAgCiANaigCAEgNAQsgCCEFIAMhASAHIQQLIAJBBGsiAiAFNgIAIAQgBkcNAAsLIBFBEGokAAuVBwIJfAx/IwBBQGoiD0EQakEAQTD8CwAgD0ECNgIMIA9CgICAgBA3AgQgAkEYbCICIAEoAgAiDigCSGoiFCsDACEIIA4oApgBIAJqKwMAmiELIAEoAgQiEigCmAEhFSASKAJIIRZBACEBQQAhAgNAAn8gFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwAgC2QgCCAOIBZqIg4rAwAiBmMgBiAIYRsgFSARKAIEQRhsIhBqKwMAIAtkIAggECAWaiIQKwMAIgljIAggCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBEoAgAhGCAQKwMQIQcgECsDCCEFAkAgCCAJoSIKIAggBqEiDCAKmSAMmWMiEBsgBiAJoaMiBr1C////////////AINC//////////f/AFYNACAOKwMIIgkgBaEiCr1C////////////AINCgICAgICAgPj/AFoNACAOKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgEBsgBiANoqAhByAFIAkgEBsgBiAKoqAhBQsgGUEAIBIoAqgBIg4gGEEDbUEYbGorAwggDiASKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIBQrAwgiBiAFYyAFIAZhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AQQAgDmsgDiARLQAMGyATaiETIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIRIAc5AxAgESAHOQMIIBEgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyATRQRARAAAAAAAAPh/IQVBAAwBCyATQQAgEigCqAEgA0EYbGorAxBEAAAAAAAAAABkIBQrAxAiCCAPKwMgIgUgDysDOCIHIBQrAwgiBiAPKwMQIgmhIguZIAYgDysDKCIGoSIKmWMiARsgByAFoSIHIAsgCiABGyAGIAmhoyIGoqAgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsiBWMgBSAIYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0wgBCAHTHJFBEAgBEUNBCADKAIAKAIAIg0gASgCACILQQN0aiIIQQEgAygCBCgCACIJa0ECdCIOaiEKIAggCUECdCIPaigCACEIA0AgCCANIAAoAgAiCUEDdGoiDCAPaigCACIQSA0CIAggEEYEQCAKKAIAIAwgDmooAgBIDQMLIABBBGohACAEQQFrIgQNAAsMBAsgBCAFSg0BIAAgAUYNAyAGIQQgACEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAUcNAAsgAygCBCEFIAMoAgAhAwNAIAEgAkYEQCAEIAZrIgFFDQUgACAGIAH8CgAADAULAkACQCADKAIAIgcgASgCACIIQQN0aiILIAUoAgAiCUECdCIKaigCACIMIAogByAGKAIAIgpBA3RqIgdqKAIAIg1OBEAgDCANRw0BIAtBASAJa0ECdCIJaigCACAHIAlqKAIATg0BCyAAIAg2AgAgAUEEaiEBDAELIAAgCjYCACAGQQRqIQYLIABB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CACQRhsIgIgASgCACIOKAKYAWorAwAhCyAOKAJIIAJqIhQrAwAhCCABKAIEIhIoApgBIRUgEigCSCEWQQAhAUEAIQIDQAJ/IAsgFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwBjIAggDiAWaiIOKwMAIgZjIAYgCGEbIAsgFSARKAIEQRhsIhBqKwMAYyAIIBAgFmoiECsDACIJYyAIIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyARKAIAIRggECsDECEHIBArAwghBQJAIAggCaEiCiAIIAahIgwgCpkgDJljIhAbIAYgCaGjIga9Qv///////////wCDQv/////////3/wBWDQAgDisDCCIJIAWhIgq9Qv///////////wCDQoCAgICAgID4/wBaDQAgDisDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIBAbIAYgDaKgIQcgBSAJIBAbIAYgCqKgIQULIBlBACASKAKoASIOIBhBA21BGGxqKwMIIA4gEigCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAUKwMIIgYgBWMgBSAGYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNAEEAIA5rIA4gES0ADBsgE2ohEyABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiESAHOQMQIBEgBzkDCCARIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gE0UEQEQAAAAAAAD4fyEFQQAMAQsgE0EAIBIoAqgBIANBGGxqKwMQRAAAAAAAAAAAZCAUKwMQIgggDysDICIFIA8rAzgiByAUKwMIIgYgDysDECIJoSILmSAGIA8rAygiBqEiCpljIgEbIAcgBaEiByALIAogARsgBiAJoaMiBqKgIAUgB71C////////////AINCgICAgICAgPj/AFQbIAUgDysDMCAPKwMYob1C////////////AINCgICAgICAgPj/AFQbIAUgBr1C////////////AINCgICAgICAgPj/AFQbIgVjIAUgCGEbGwshASAAIAU5AwggACABNgIAC/wHAw9/A3wDf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BiIgFFDQAgASgCCCAAKAIIQX9zcQ0AIAAoAgwoAgQgASgCDCgCBEcNACAAKAIQKAIEIAEoAhAoAgRGIQILIAILewEDfyAAKAIEIgRBAXEhBgJ/IAEtADdBAUYEQCAEQQh1IgUgBkUNARogAigCACAFaigCAAwBCyAEQQh1IAZFDQAaIAEgACgCACgCBDYCOEEAIQJBAAshBSAAKAIAIgAgASACIAVqIANBAiAEQQJxGyAAKAIAKAIcEQUACwsAIAEgAiAAEQEACw0AIAAoAgQgASgCBEYLQAECfyMAQRBrIgIkACMAQRBrIgEkACABIAA2AgwgAUEMakEEEPcBIAFBEGokACACQRBqJABBH3FBAnRB0JwCagtoAQN/IwBBEGsiAyQAIANBADoADiABIABrQQJ1IQEgAigCACEEA0AgAQRAIAEgAUEBdiICQX9zaiACIAAgAkECdGoiAigCACAESSIFGyEBIAJBBGogACAFGyEADAELCyADQRBqJAAgAAvsBAMEfwV+AXwgAkEANgIAAkAgAb1C////////////AINCgICAgICAgPj/AFYgAUQAAAAAAAAAAGFyRQRAIAC9IglCNIinQf8PcSIDQf8PRw0BCyAAIAGiIgAgAKMPCwJAIABEAAAAAAAAAABhDQAgAb0iCkI0iKdB/w9xIQQCfiADRQRAQQAhAyAJQgyGIgdCAFkEQANAIANBAWshAyAHQgGGIgdCAFkNAAsLIAlBASADa62GDAELIAlC/////////weDQoCAgICAgIAIhAshBwJ+IARFBEBBACEEIApCDIYiCEIAWQRAA0AgBEEBayEEIAhCAYYiCEIAWQ0ACwsgCkEBIARrrYYMAQsgCkL/////////B4NCgICAgICAgAiECyEIAn4CQAJAIAMgBE4EQCADIARKBEADQCAHIAh9IgsgByALQgBZIgYbQgGGIQcgBSAGckEBdCEFIANBAWsiAyAESg0ACyAEIQMLIAUgByAIfSIIQgBZIgZyIQUgCCAHIAYbIgdQBEBBRCEDQgAhBwwDCyAHQv////////8HVg0BA0AgA0EBayEDIAciCEIBhiEHIAhCgICAgICAgARUDQALDAELIANBAWogBEcNAwsgA0EATA0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AMpAwg3AxAgByADKQMANwMIA0ACQCADIAQiBSkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAYgCUoNACAAIAZBAXQiA0EBciIGQRhsaiEEIAIgA0ECaiIDSgRAIARBGGoiCCAEIAQgCCABKAIAEQIAIggbIQQgAyAGIAgbIQYLIAUhAyAEIAdBCGogASgCABECAEUNAQsLIAUgBykDGDcDECAFIAcpAxA3AwggBSAHKQMINwMACyAHQSBqJAALwRIBBn8jAEEgayIDJABBASEHAkACQAJAAkACQAJAIAEgAGtBGG0OBgUFAAECAwQLIAFBGGsiASAAIAIoAgARAgBFDQQgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMBAsgAEEYaiIEIAAgAigCABECACABQRhrIgEgBCACKAIAEQIAIQVFBEAgBUUNBCADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAEpAxA3AxAgBCABKQMINwMIIAQgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDACAEIAAgAigCABECAEUNBCADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAQpAxA3AxAgACAEKQMINwMIIAAgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDAAwECyAFBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMBAsgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAEIAIoAgARAgBFDQMgAyAEKQMQNwMYIAMgBCkDCDcDECADIAQpAwA3AwggBCABKQMQNwMQIAQgASkDCDcDCCAEIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAwsgAUEYayEFIABBGGoiASAAIAIoAgARAgAhCCAAQTBqIgQgASACKAIAEQIAIQYCQCAIRQRAIAZFDQEgAyABKQMQNwMYIAMgASkDCDcDECADIAEpAwA3AwggASAEKQMQNwMQIAEgBCkDCDcDCCABIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAAIAIoAgARAgBFDQEgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAQsgBgRAIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgBCkDEDcDECAAIAQpAwg3AwggACAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMADAELIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgAykDGDcDECABIAMpAxA3AwggASADKQMINwMAIAQgASACKAIAEQIARQ0AIAMgASkDEDcDGCADIAEpAwg3AxAgAyABKQMANwMIIAEgBCkDEDcDECABIAQpAwg3AwggASAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMACyAFIAQgAigCABECAEUNAiADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAUpAxA3AxAgBCAFKQMINwMIIAQgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDACAEIAEgAigCABECAEUNAiADIAEpAxA3AxggAyABKQMINwMQIAMgASkDADcDCCABIAQpAxA3AxAgASAEKQMINwMIIAEgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACABIAAgAigCABECAEUNAiADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAEpAxA3AxAgACABKQM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0AC0EBIQcLIANBIGokACAHC1oBAn8jAEEQayICJAAgASAAKAIEIgNBAXVqIQEgACgCACEAIAIgASADQQFxBH8gASgCACAAaigCAAUgAAsRAQAgAhCYBSACIAI2AgwgAkEMahApIAJBEGokAAuMCgEDfyMAQSBrIgYkACABIAAgBSgCABECACEIIAIgASAFKAIAEQIAIQcCQCAIRQRAIAdFDQEgBiABKQMQNwMYIAYgASkDCDcDECAGIAEpAwA3AwggASACKQMQNwMQIAEgAikDCDcDCCABIAIpAwA3AwAgAiAGKQMYNwMQIAIgBikDEDcDCCACIAYpAwg3AwAgASAAIAUoAgARAgBFDQEgBiAAKQMQNwMYIAYgACkDCDcDECAGIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAGKQMYNwMQIAEgBikDEDcDCCABIAYpAwg3AwAMAQsgBwRAIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMADAELIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMACwJAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACwJAIAQgAyAFKAIAEQIARQ0AIAYgAykDEDcDGCAGIAMpAwg3AxAgBiADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBikDGDcDECAEIAYpAxA3AwggBCAGKQMINwMAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACyAGQSBqJAALqAYBA38CQAJAAkACQAJAIAMOAwMAAQILIAQgACgCCDYCCCAEIAApAgA3AgAPCyABQQxrIQICQAJAIAFBCGsoAgAiAUUNACAAKAIERQ0AIAAoAgApAwAgAigCACkDAFUNAQwECyABRQ0DCyAEIAIoAgg2AgggBCACKQIANwIAIAQgACkCADcCDCAEIAAoAgg2AhQPCyADQQhMBEAgBCEDAkAgACABRg0AIAQgACgCCDYCCCAEIAApAgA3AgAgAEEMaiIGIAFGDQADQCAEQQxqIQUCQAJAAkACQCAAKAIQIgJFDQAgBCgCBEUNACAEKAIAKQMAIAYoAgApAwBVDQEMAgsgAkUNAQsgBSAEKAIINgIIIAUgBCkCADcCAAJ/IAMgAyAERg0AGgJAA0AgBEEMay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EQCAERQ0FIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgASkDEDcDECADIAEpAwg3AwggAyABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMAIAMgACACKAIAEQIARQ0FIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMADAULIAQEQCAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAMgAigCABECAEUNBCAFIAMpAxA3AxggBSADKQMINwMQIAUgAykDADcDCCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwECyABQRhrIQQgAEEYaiIBIAAgAigCABECACEIIABBMGoiAyABIAIoAgARAgAhBgJAIAhFBEAgBkUNASAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAAgAigCABECAEUNASAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCyAGBEAgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACADKQMQNwMQIAAgAykDCDcDCCAAIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwAMAQsgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKQMYNwMQIAEgBSkDEDcDCCABIAUpAwg3AwAgAyABIAIoAgARAgBFDQAgBSABKQMQNwMYIAUgASkDCDcDECAFIAEpAwA3AwggASADKQMQNwMQIAEgAykDCDcDCCABIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwALIAQgAyACKAIAEQIARQ0DIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBSkDGDcDECAEIAUpAxA3AwggBCAFKQMINwMAIAMgASACKAIAEQIARQ0DIAUgASkDEDcDGCAFIAEpAwg3AxAgBSABKQMANwMIIAEgAykDEDcDECABIAMpAwg3AwggASADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMAIAEgACACKAIAEQIARQ0DIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMADAMLIAAgAEEYaiAAQTBqIABByABqIAFBGGsgAhCyAwwCCyAIQb8ETARAIARBAXEEQCACIQYjAEEgayIHJAACQCAAIgIgASIIRg0AIAEgAEEYaiIBRg0AA0AgASIDIAAgBigCABECAARAIAcgASkDEDcDGCAHIAEpAwg3AxAgByABKQMANwMIIAEhBANAAkAgBCAAIgEpAxA3AxAgBCAAKQMINwMIIAQgACkDADcDACAAIAJGBEAgAiEBDAELIAEhBCAHQQhqIAFBGGsiACAGKAIAEQIADQELCyABIAcpAxg3AxAgASAHKQMQNwMIIAEgBykDCDcDAAsgAyIAQRhqIgEgCEcNAAsLIAdBIGokAAwDCyACIQMjAEEgayIIJAACQCABIgYgAEYNACAAQRhqIgEgBkYNAANAIAEiAiAAIAMoAgARAgAEQCAIIAEpAxA3AxggCCABKQMIN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AkgACkDADcDACAAIQYDQCAGIghBGGoiBiAJIAIoAgARAgANAAsCQCAAIAhGBEADQCAGIAdPDQIgB0EYayIHIAkgAigCABECAEUNAAwCCwALA0AgB0EYayIHIAkgAigCABECAEUNAAsLIAYgB08iCkUEQANAIAkgBikDEDcDKCAJIAYpAwg3AyAgCSAGKQMANwMYIAYgBykDEDcDECAGIAcpAwg3AwggBiAHKQMANwMAIAcgCSkDKDcDECAHIAkpAyA3AwggByAJKQMYNwMAA0AgBiIIQRhqIgYgCSACKAIAEQIADQALA0AgB0EYayIHIAkgAigCABECAEUNAAsgBiAHSQ0ACwsgACAIRwRAIAAgCCkDEDcDECAAIAgpAwg3AwggACAIKQMANwMACyAIIAkpAxA3AxAgCCAJKQMINwMIIAggCSkDADcDACAFIAo6AAwgBSAINgIIIAlBMGokACAFKAIIIQgCQCAFLQAMQQFHDQAgACAIIAIQsAMhByAIQRhqIgYgASACELADBEAgCCEBIAdFDQMMAgsgB0UNACAGIQAMAgsgACAIIAIgAyALELcDIAhBGGohAEEAIQQMAQsLIAVBIGokAAubFgIOfwZ+IwBBMGsiBiQAIAZCADcDECAGQgA3AwggASgCMCEDIAEoAlQiAikDCCEQAkAgASgCWC0ACCIOQQFGBEAgA0EASgRAA0AgAiIDKAIQIgIpAwggEFINAyADLQAYQQZxRQ0ADAMLAAsDQCACIgMoAhQiAikDCCAQUg0CIAMtABhBBnFFDQALDAELIANBAEoEQANAIAIiAygCECICKQMIIBBRDQAMAgsACwNAIAIiAygCFCICKQMIIBBRDQALCyADKAIYQR10QR91IANxIQkgASkDICEQAn4CQCABKQMQIhIgASkDAFEEQCABIQIDQCACKAJEIgJBAEchAyACRQ0CIAIoAlQgCUcNAAsMAQsgECASIBAgElUbIRUgECASIBAgElMiAxsMAQsgECEVIBALIRICQAJAIAEoAjxFDQAgBiABKQMINwMgIAYgEDcDGCABIAZBGGoQYyIHKAIYLQBMDQACQCAAKAJgIgIgACgCZCIFSQRAIAJBAToACCACQQA2AgQgAiAHNgIAIAJBDGohBQwBCyACIABB3ABqIgQoAgAiCmtBDG0iDEEBaiICQdaq1aoBTw0CIAZBGGpB1arVqgEgBSAKa0EMbSIFQQF0IgogAiACIApJGyAFQarVqtUATxsgDCAEEGEiAigCCCIFQQE6AAggBUEANgIEIAUgBzYCACACIAVBDGo2AgggAigCBCAAKAJgIAAoAlwiB2siBUF0bUEMbGohBCAFBEAgBCAHIAX8CgAACyAAKAJcIQcgACAENgJcIAIgBzYCBCAAIAIoAggiBTYCYCACIAc2AgggACgCZCEEIAAgAigCDDYCZCACIAc2AgAgAiAENgIMIAIQ1gELIAAgBTYCYAsgAUEQaiEHIABB3ABqIQogAUFAayEMIAFBxABqIQ0DQAJAAkACQCANIAwgAxsoAgAiAkUNAANAIAkgAigCVEYEQAJAIAEoAjxFDQAgAigCYARAIAAgAiACQRBqEH4gASgCPEUNAQsgCSABKAJURwRAA0AgASAHEGMaIAAgARD+ASABKAJUIAlHDQALCyADBEAgACABIAIgBxCGAQwBCyAAIAIgASAHEIYBCwJAIAIoAkQiAyACKAJAIgVyRQRAIAIgACgCHCIHRw0BCwJAIAUEQCAFIAM2AkQMAQsgACADNgIcCyADBEAgAyAFNgJACyACECIgACgCHCEHCyABKAJEIgIgASgCQCIDckUgASAHR3ENAwJAIAMEQCADIAI2AkQMAQsgACACNgIcCyACBEAgAiADNgJACyABECIMAwsCfwJAAkACQAJAIAkgASgCVCIERw0AIAQtABhBA3ENACACKQMgIRQMAQsgAikDICEUAkAgAwRAIBQgFVcNAQwHCyASIBRVDQYLIBQgBykDAFINACACKQMYIhEgAikDCFENACACQSBqIQUgBiAEQRBBFCABKAIwQQBKG2ooAgAiBCkDCDcDECAGIAQpAwA3AwggAigCWCIELQAIIQgCQCADBEACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFUNCAwCCyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIUw0BDAcLAkACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFkNAQwICyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIVw0HCyAGIAEpAwg3AxAgBiAUNwMIDAMLIAYgASkDCDcDECAGIBQ3AwgMAQsgBiABKQMINwMQIAYgFDcDCCACQSBqIQUgA0UNAQsgACABIAIgBkEIahDcASACKAJEIgQEQCAEIAE2AkALIAwoAgAiCARAIAggAjYCRAsgAiABNgJEIAIgCDYCQCABIAQ2AkQgASACNgJAIAIoAkBFBEAgACACNgIcCyAAIAIgBkEIakEAEIECIA0MAQsgACACIAEgBkEIahDcASABKAJEIgQEQCAEIAI2AkALIAIoAkAiCARAIAggATYCRAsgASACNgJEIAEgCDYCQCACIAQ2AkQgAiABNgJAIAEoAkBFBEAgACABNgIcCyAAIAIgBkEIakEAEIACIAwLIAEgBSkDADcDICgCACECAkAgASgCPCIERQ0AIAQoAhAhBSAEKAIIIAFHBEAgBSgCECEFCyAFKAIYLQBMDQACQCAAKAJgIgQgACgCZCIISQRAIARBAToACCAEQQA2AgQgBCAFNgIAIARBDGohBQwBCyAEIAooAgAiC2tBDG0iD0EBaiIEQdaq1aoBTw0HIAZBGGpB1arVqgEgCCALa0EMbSIIQQF0IgsgBCAEIAtJGyAIQarVqtUATxsgDyAKEGEhCCAGKAIgIgRBAToACCAEQQA2AgQgBCAFNgIAIAYgBEEMajYCICAGKAIcIAAoAmAgACgCXCIEayIFQXRtQ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Qf////8AIAYgAmsiBkEDdSICIAQgAiAESxsgBkHw////B08bIAUgABAyIQQgBygCFCICIAMpAwg3AwggAiADKQMANwMAIAcgBygCFEEQajYCFCAHKAIQIAAoAgQgACgCACICayIFayEGIAUEQCAGIAIgBfwKAAALIAAoAgAhBSAAIAY2AgAgByAFNgIQIAAgBygCFCIINgIEIAcgBTYCFCAAKAIIIQIgACAHKAIYNgIIIAcgAjYCGCAEIAU2AgAgBBA2CyAAIAg2AgQgAygCECEGIAMhAgsgASAGRw0ACwsgB0EgaiQADwsQJgALcAIEfgN8IAIpAwghBCABKQMIIQMCfCACKQMAIgYgASkDACIFUQRARAAAAAAAAAAAIAMgBFENARoLIAApAwAgBX25IAQgA325IgeiIAYgBX25IgggACkDCCADfbmioSIJIAmiIAggCKIgByAHoqCjCws+AQJ/IAAoAgQiAiABRwRAA0AgAkEEayICKAIAIQMgAkEANgIAIAMEQCADECILIAEgAkcNAAsLIAAgATYCBAuhAwEEfyMAQSBrIgYkAAJAIAEoAhgiA0EIcUUEQCABIANBCHI2AhhBDBAjIgNBADoACCADIAI2AgQgAyABNgIAAkAgACgCBCIBIAAoAggiAkkEQCABIAM2AgAgAUEEaiEDDAELIAEgACgCACIEa0ECdSIFQQFqIgFBgICAgARPDQIgBkEMakH/////AyACIARrIgJBAXUiBCABIAEgBEkbIAJB/P///wdPGyAFIAAQSiIBKAIIIgIgAzYCACABIAJBBGo2AgggASgCBCAAKAIEIAAoAgAiBGsiAmshAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAggiAzYCBCABIAI2AgggACgCCCEEIAAgASgCDDYCCCABIAI2AgAgASAENgIMIAEoAgQiBSABKAIIIgJHBEADQCABIAJBBGsiAjYCCCACKAIAIQQgAkEANgIAIAQEQCAEECIgASgCCCECCyACIAVHDQALCyABKAIAIgIEQCABKAIMGiACECILCyAAIAM2AgQLIAZBIGokAA8LECYAC3gBAn8gACgCPCICIAEoAjwiA0YEQCACIAI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EEwaiAEQSBqIAgRAgAiAxshByAFQRBqIAUgAxshBQsgASgCACEIIAQgBSkDCDcDGCAEIAUpAwA3AxAgBCAEKQOAATcDACAEIAQpA4gBNwMIIAYhAyAEQRBqIAQgCBECAEUNAQsLIAYgBCkDiAE3AwggBiAEKQOAATcDAAsgBEGQAWokAAv8FQEHfyMAQeAEayIDJABBASEGAkACQAJAAkACQAJAIAEgAGtBBHUOBgUFAAECAwQLIAIoAgAhAiADIAFBEGsiASkDCDcD2AEgAyABKQMANwPQASADIAApAwA3A8ABIAMgACkDCDcDyAEgA0HQAWogA0HAAWogAhECAEUNBCADIAApAwg3A9gEIAMgACkDADcD0AQgACABKQMINwMIIAAgASkDADcDACABIAMpA9gENwMIIAEgAykD0AQ3AwAMBAsgAigCACEEIAMgACkDGDcD2AIgAyAAKQMQNwPQAiADIAApAwA3A8ACIAMgACkDCDcDyAIgA0HQAmogA0HAAmogBBECACACKAIAIQQgAyABQRBrIgEpAwg3A7gCIAMgASkDADcDsAIgAyAAKQMQNwOgAiADIAApAxg3A6gCIANBsAJqIANBoAJqIAQRAgAhBEUEQCAERQ0EIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDACACKAIAIQEgAyAAKQMYNwOYAiADIAApAxA3A5ACIAMgACkDADcDgAIgAyAAKQMINwOIAiADQZACaiADQYACaiABEQIARQ0EIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDEAwECyAEBEAgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQPYBDcDCCABIAMpA9AENwMADAQLIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDECACKAIAIQIgAyABKQMINwP4ASADIAEpAwA3A/ABIAMgACkDEDc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yAgASADKQPYBDcDCCABIAMpA9AENwMAIAIoAgAhASADIAApAyg3A5gDIAMgACkDIDcDkAMgAyAAKQMQNwOAAyADIAApAxg3A4gDIANBkANqIANBgANqIAERAgBFDQIgAyAAKQMYNwPYBCADIAApAxA3A9AEIAAgACkDKDcDGCAAIAApAyA3AxAgACADKQPYBDcDKCAAIAMpA9AENwMgIAIoAgAhASADIAApAxg3A/gCIAMgACkDEDcD8AIgAyAAKQMANwPgAiADIAApAwg3A+gCIANB8AJqIANB4AJqIAERAgBFDQIgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgACkDGDcDCCAAIAApAxA3AwAgACADKQPYBDcDGCAAIAMpA9AENwMQDAILIAAgAEEQaiAAQSBqIABBMGogAUEQayACEMQDDAELIAIoAgAhBCADIAApAxg3A7gBIAMgACkDEDcDsAEgAyAAKQMANwOgASADIAApAwg3A6gBIANBsAFqIANBoAFqIAQRAgAhByACKAIAIQUgAyAAKQMoNwOYASADIAApAyA3A5ABIAMgACkDEDcDgAEgAyAAKQMYNwOIASAAQSBqIQQgA0GQAWogA0GAAWogBRECACEFAkAgB0UEQCAFRQ0BIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAQpAwg3AxggACAEKQMANwMQIAQgAykD2AQ3AwggBCADKQPQBDcDACACKAIAIQUgAyAAKQMYNwN4IAMgACkDEDcDcCADIAApAwA3A2AgAyAAKQMINwNoIANB8ABqIANB4ABqIAURAgBFDQEgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgACkDGDcDCCAAIAApAxA3AwAgACADKQPYBDcDGCAAIAMpA9AENwMQDAELIAUEQCADIAApAwg3A9gEIAMgACkDADcD0AQgACAEKQMINwMIIAAgBCkDADcDACAEIAMpA9gENwMIIAQgAykD0AQ3AwAMAQsgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgACkDGDcDCCAAIAApAxA3AwAgACADKQPYBDcDGCAAIAMpA9AENwMQIAIoAgAhBSADIAQpAwg3A1ggAyAEKQMANwNQIAMgAC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GIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwAgBSgCACEHIAYgAikDCDcD+AEgBiACKQMANwPwASAGIAEpAwA3A+ABIAYgASkDCDcD6AEgBkHwAWogBkHgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwALIAUoAgAhByAGIAMpAwg3A9gBIAYgAykDADcD0AEgBiACKQMANwPAASAGIAIpAwg3A8gBAkAgBkHQAWogBkHAAWogBxECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEHIAYgAikDCDcDuAEgBiACKQMANwOwASAGIAEpAwA3A6ABIAYgASkDCDcDqAEgBkGwAWogBkGgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACEHIAYgASkDCDcDmAEgBiABKQMANwOQASAGIAApAwA3A4ABIAYgACkDCDcDiAEgBkGQAWogBkGAAWogBxECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAUoAgAhByAGIAQpAwg3A3ggBiAEKQMANwNwIAYgAykDADcDYCAGIAMpAwg3A2gCQCAGQfAAaiAGQeAAaiAHEQIARQ0AIAYgAykDCDcD6AIgBiADKQMANwPgAiADIAQpAwg3AwggAyAEKQMANwMAIAQgBikD6AI3AwggBCAGKQPgAjcDACAFKAIAIQQgBiADKQMINwNYIAYgAykDADcDUCAGIAIpAwA3A0AgBiACKQMINwNIIAZB0ABqIAZBQGsgBBECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEDIAYgAikDCDcDOCAGIAIpAwA3AzAgBiABKQMANwMgIAYgASkDCDcDKCAGQTBqIAZBIGogAxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACECIAYgASkDCDcDGCAGIAEpAwA3AxAgBiAAKQMANwMAIAYgACkDCDcDCCAGQRBqIAYgAhECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAZB8AJqJAALCAAgABBpECILhAMCBX8BfCMAQUBqIgIkACAAQQA2AgggAEIANwIAIAJBCGogARBNIAJBADYCPCACQgA3AjQgAkE0aiACKAIIIgEoAgAiAyABKAIEIgEgASADa0EMbRBHAkAgAigCDCIBRQ0AIAEgASgCBCIDQQFrNgIEIAMNACABIAEoAgAoAggRAAAgARAkCyAAIAIoAjggAigCNGtBDG0QViACKAI0IgMgAigCOCIFRwRAA0AgAkEoaiADEDwhBCACQQA2AiQgAkIANwIcIAJBHGogAigCLCAEKAIAa0EEdRBcIAQoAgAiASACKAIsIgZHBEADQCABKwMAIQcgAiABKwMIOQMQIAIgBzkDCCACQRxqIAJBCGoQTCABQRBqIgEgBkcNAAsLIAAgAkEcahB2IAIoAhwiAQRAIAIgATYCICACKAIkGiABECILIAQoAgAiAQRAIAIgATYCLCACKAIwGiABECILIANBDGoiAyAFRw0ACwsgAiACQTRqNgIIIAJBCGoQKSACQUBrJAAL5QECBXwDf0T////////vfyEFRP///////+//IQYCQCABKAIAIgcgASgCBCIIRgRARP///////+//IQNE////////738hBAwBC0T////////vfyEERP///////+//IQMDQCAHKAIAIgEgBygCBCIJRwRAA0AgASsDCCICIAMgAiADZBshAyACIAQgAiAEYxshBCABKwMAIgIgBiACIAZkGyEGIAIgBSACIAVjGyEFIAFBEGoiASAJRw0ACwsgB0EMaiIHIAhHDQALCyA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kDGDcDyAggBSAAKQMQNwPACCAAIAApAyg3AxggACAAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDIAsgAigCACEDIAUgASkDCDcDmAcgBSABKQMANwOQByAFIAApAyA3A4AHIAUgACkDKDcDiAcgBUGQB2ogBUGAB2ogAxECAEUNAyAFIAApAyg3A8gIIAUgACkDIDcDwAggACABKQMINwMoIAAgASkDADcDICABIAUpA8gINwMIIAEgBSkDwAg3AwAgAigCACEBIAUgACkDKDcD+AYgBSAAKQMgNwPwBiAFIAApAxA3A+AGIAUgACkDGDcD6AYgBUHwBmogBUHgBmogARECAEUNAyAFIAApAxg3A8gIIAUgACkDEDcDwAggACAAKQMoNwMYIAAgACkDIDcDECAAIAUpA8gINwMoIAAgBSkDwAg3AyAgAigCACEBIAUgACkDGDcD2AYgBSAAKQMQNwPQBiAFIAApAwA3A8AGIAUgACkDCDcDyAYgBUHQBmogBUHABmogARECAEUNAyAFIAApAwg3A8gIIAUgACkDADcDwAggACAAKQMYNwMIIAAgACkDEDcDACAAIAUpA8gINwMYIAAgBSkDwAg3AxAMAwsgACAAQRBqIABBIGogAEEwaiABQRBrIAIQxAMMAgsgCEEXTARAIARBAXEEQCACIQYjAEHQAGsiByQAAkAgACICIAEiCEYNACAAQRBqIgEgCEYNAANAIAYoAgAhBCAHIAEiAykDCDcDOCAHIAEpAwA3AzAgByAAKQMANwMgIAcgACkDCDcDKCAHQTBqIAdBIGogBBECAARAIAcgASkDCDcDSCAHIAEpAwA3A0AgASEEA0ACQCAEIAAiASkDCDcDCCAEIAApAwA3AwAgACACRgRAIAIhAQwBCyAGKAIAIQkgByAHKQNINwMYIAcgBykDQDcDECAHIAFBEGsiACkDADcDACAHIAApAwg3AwggASEEIAdBEGogByAJEQIADQELCyABIAcpA0g3AwggASAHKQNANwMACyADIgBBEGoiASAIRw0ACwsgB0HQAGokAAwDCyACIQMjAEHQAGsiCCQAAkAgASIEIABGDQAgASAAQRBqIgFGDQADQCADKAIAIQYgCCABIg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AQRAIAEgASgCACgCDBEAACABIAArA5gBOQMYIAIgAigCABB7IwBBEGsiBCQAIAEgASgCACgCDBEAACACELEBIAAtAHxBAUYEQCACIAAoAoQBIAAoAoABa0ECdRBWCyAAKAKAASIDIAAoAoQBRwRAA0ACQCADIAVBAnRqKAIAIgNFDQAgAygCECIGRQ0AIAMtAExBAUYEQCAEQQA2AgwgBEIANwIEIAYgAC0AdUEBIARBBGoiAyAAKwOYARC6AgRAIAIgAxBoCyAEKAIEIgNFDQEgBCADNgIIIAQoAgwaIAMQIgwBCyAAIAMQ/AFFDQAgACADIAEQuwILIAVBAWoiBSAAKAKEASAAKAKAASIDa0ECdUkNAAsLIARBEGokAAsgABDeASAALQB9GgtlAQR/IwBBEGsiASQAIAFBCGogABBNIAEoAggiACgCACECIAAoAgQCQCABKAIMIgBFDQAgACAAKAIEIgRBAWs2AgQgBA0AIAAgACgCACgCCBEAACAAECQLIAFBEGokACACa0EMbQuQBgEDfwJAAkACQAJAAkAgAg4DBAIAAQsgAUEYayECIAFBEGsrAwAgACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgAikDEDcDKCADIAIpAwg3AyAgAyACKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQIDQCAEIQUgAkEYaiEGAkAgACsDICACKwMIYwRAIAYgAikDEDcDECAGIAIpAwg3AwggBiACKQMANwMAAn8gAyACIANGDQAaA0AgAiAAKwMgIAJBEGsrAwBjRQ0BGiACIAJBGGsiBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADCyIEIAUoAhA2AhAgBCAFKQMINwMIIAQgBSkDADcDAAwBCyAGIAUpAxA3AxAgBiAFKQMINwMIIAYgBSkDADcDAAsgBiECIAUiAEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgVBGGwiBmoiBCAFIAMgBRC1ASAEIAEgAiAFayICIAMgBmogAhC1ASAEIQIDQCABIAJGBEAgACAERg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAERw0ACwwECwJAIAIrAwggACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAERw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwudBQEIfyMAQSBrIgUkACADIQQCQCABIAJGDQAgAiAERgRAIAEhBAwBCyACIAFBGGoiBEYEQCAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCADIAJrIgJBBGsiBwRAIAEgBCAH/AoAAAsgASACaiIEIAUoAhg2AhAgBCAFKQMQNwMIIAQgBSkDCDcDAAwBCyADIAJBGGpGBEAgBSADQRhrIgIpAxA3AxggBSACKQMINwMQIAUgAikDADcDCCADIAIgAWsiB0FobUEYbGohBAJAIAEgAkYNACAHQQRrIgJFDQAgBCABIAL8CgAACyABIAUoAhg2AhAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCwJ/IwBBIGshBiACIAEiBGsiCUEYbSIHIAMgAmsiC0EYbSIBRwRAIAchAgNAIAIgASICbyIBDQALIAQgAkEYbGohAgNAIAYgAkEYayICKQMQNwMYIAYgAikDCDcDECAGIAIpAwA3AwggAiAJaiEIIAIhAQNAIAEiCiAIIgEoAhA2AhAgCiABKQMINwMIIAogASkDADcDACABIAlqIAQgByADIAFrQRhtIghrQRhsaiAHIAhIGyIIIAJHDQALIAEgBigCGDYCECABIAYpAxA3AwggASAGKQMINwMAIAIgBEcNAAsgBCALagwBCwJAIAIgBEYgAiADRnINACACIQEDQCAGIAQpAxA3AxggBiAEKQMINwMQIAYgBCkDADcDCCAEIAEoAhA2AhAgBCABKQMINwMIIAQgASkDADcDACABIAYoAhg2AhAgASAGKQMQNwMIIAEgBikDCDcDACAEQRhqIgQgAkYNASABQRhqIgEgA0cNAAsLIAILIQQLIAAgAzYCBCAAIAQ2AgAgBUEgaiQAC4IGAQN/AkACQAJAAkACQCACDgMEAgABCyABQRhrIgErAwAgACsDAGMEQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgASkDEDcDKCADIAEpAwg3AyAgAyABKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQADQCAAQRhqIQUCQCAEKwMAIAArAwBjBEAgBSAAKQMQNwMQIAUgACkDCDcDCCAFIAApAwA3AwACfyADIAAgA0YNABoDQCAAIAQrAwAgAEEYayICKwMAY0UNARogACACKAIQNgIQIAAgAikDCDcDCCAAIAIpAwA3AwAgAiIAIANHDQALIAMLIgIgBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMADAELIAUgBCkDEDcDECAFIAQpAwg3AwggBSAEKQMANwMACyAFIQAgBEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgRBGGwiBmoiBSAEIAMgBBC2ASAFIAEgAiAEayICIAMgBmogAhC2ASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAFRw0ACwwECwJAIAIrAwAgACsDAGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAFRw0ACwwBCyADIAApAxA3Ax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ECwMAgsgACgCTCEBIAMgADYCmAEgAyADQdgAajYCqAEgAyADQegAajYCpAEgAyADQfgAajYCoAEgAyADQTBqNgKcASABBEBBACEEA0AgA0GYAWogBBDnAyAEQQFqIgQgAUcNAAsLIAAQ6wMgACADQfgAahDUAgwBCyACIAIoAgxBAWo2AgwgABDrAyACLQAQQQFGBEAgAEEOECwMAQsgAiACKAIMQQFqNgIMIAAgA0H4AGoQ1AIgAi0AEEEBRgRAIABBDhAsDAELIAIgAigCDEEBajYCDAsgA0EwaiADKAI0ENMCIANBPGogAygCQBDSAgsgDgRAIA4QIgsgAygCSCIABEAgABAiCyADKAJYIgAEQCAAECILIAMoAmgiAARAIAAQIgsgAygCeCIABEAgABAiCyADKAKIASIABEAgABAiCyADQcABaiQAC94CAgJ/BnwjAEEgayIDJAAgA0EIaiABKAIIIgQgAigCACICIAEoAgQQ1wIgACADKwMYIgYgAysDCCIFIAWiIAMrAxAiCCAIoqAgBiAGoqCfIgajRAAAAAAAAAAAIAUgBqMiCr1C////////////AINCgICAgICAgPj/AFQiARsgBCgCqAEgAkEDbUEYbGoiAisDECIFIAIrAwAiByAHoiACKwMIIgkgCaKgIAUgBaKgnyIFo0QAAAAAAAAAACAHIAWjIge9Qv///////////wCDQoCAgICAgID4/wBUIgIboiAIIAajRAAAAAAAAAAAIAEbIAkgBaNEAAAAAAAAAAAgAhuiIApEAAAAAAAAAAAgARsgB0QAAAAAAAAAACACG6JEAAAAAAAAAACgoKBEHqfoSC7/7z9kOgAAIAAgAykDCDcDCCAAIAMpAxA3AxAgACADKQMYNwMYIANBIGokAAvNBAIJfwZ8IAAoArwBIgcEQCAAKAJIIQUgACgCWCEIIAAoAmghCSAAKAK4ASEGQQAhAANAAkAgCCAAQQJ0IgFqIgIoAgAiBCACQXhBBCAAQQNwQQJGG2ooAgAiA04NACAGIABBBXRqIgIrAxgiCkQAAAAAAAAAAGEgBiABIAlqKAIAQQV0aiIBKwMYIgtEAAAAAAAAAABhckUNACAFIANBGGxq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AQgBaM5AxggACADIAWjOQMQDwsgAEIANwMYIABCADcDECAAQgA3AwgLpgUCB38JfCMAQeAAayIDJAAgAyACNgJMIAEoAgQhBwJAAkAgASgCACIGKAIEIgRFDQAgBkEEaiIIIQUDQCAFIAQgBCgCECACSCIJGyEFIARBBEEAIAkbaigCACIEDQALIAUgCEYNACACIAUoAhBODQELIAMgA0HMAGoiBTYCWCADIAdBzAFqIAUgA0HYAGoiBhB5IAMoAgAhBCMAQaACayICJAAgAiAEKQNINwNwIAIgBCkDQDcDaCACIAQpAzg3A2AgAiAEKQNQNwN4IAIgBCkDWDcDgAEgAiAEKQNgNwOIASACIAQpAyA3A0ggAiAEKQMoNwNQIAIgBCkDMDcDWCACQZABaiACQcgAahCQASACIAIrA9ABOQOYAiACIAIrA7gBOQOQAiACIAIrA6ABOQOIAiACIAIrA8gBOQOAAiACIAIrA7ABOQP4ASACIAIrA5gBOQPwASACIAIrA8ABOQPoASACIAIrA6gBOQPgASACIAIrA5ABOQPYASACIAJB2AFqEJABIAIrAwAhCyACKwMIIQwgAisDECENIAIrAxghDiACKwMgIQ8gAisDKCEQIAIrAzAhESACKwM4IRIgA0QAAAAAAADwv0QAAAAAAADwPyAELQCAARsiCiACKwNAojkDQCADIAogEqI5AzggAyAKIBGiOQMwIAMgCiAQojkDKCADIAogD6I5AyAgAyAKIA6iOQMYIAMgCiANojkDECADIAogDKI5AwggAyAKIAuiOQMAIAJBoAJqJAAgASgCACECIAMgBTYCVCAGIAIgBSADQdQAahDtAyADKAJYQRhqIANByAD8CgAAIAEoAgAhBgsgAyADQcwAaiIBNgJYIAMgBiABIANB2ABqEO0DIAAgAygCAEEYakHIAPwKAAAgA0HgAGokAAuzAQEGfyMAQRBrIgIkACABKAJMIQMgAEEANgIIIABCADcCACAAIAMQJSAAIAM2AgQgASgCTCEDIAJBADYCCCACQgA3AgAgAiADQQAQgQEgASgCXCIDBEADQCABKAJYIARBAnRqKAIAIgUgAigCAGoiBi0AACAGQQE6AABBAUcE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gASgCKDYCKCABQQA2AiggAUIANwIgCwujTgIefxB8IwBBgANrIgokAAJAIAEoAgQiBUUNAAJAIAJFDQAgAi0AEEEBRw0AIABBDhAsDAELIAEoAgAhASAKIAU2AkwgCiABNgJIIApB0ABqIgNCADcCLCADQQA2AiQgA0IANwIcIAMgCigCSDYCLCADIAooAkw2AjAgA0IANwJEIANCADcCPCADQgA3AjRBBBAjIgFBATYCACADQQA2AogBIANCADcCgAEgA0EANgJ4IANCADcCcCADQQA2AmggA0IANwJgIANBADYCWCADQgA3AlAgAyABNgJMIANBADYC9AEgA0IANwLsASADQQA2AuQBIANCADcC3AEgA0EANgLUASADQgA3AswBIANBADYCxAEgA0IANwK8ASADQgA3A6gBIANCADcDsAEgA0H8AWpBAEEw/AsAIApBADYCQCAKQgA3AjhBACEFIwBBkAFrIgYkAAJAIAMoAjBFBEBBBBAjIgFBATYCACAKIAE2AgwgBkEANgKEASAKQQA2AgggCkIANwIAIAZBADYCgAEgBkIANwJ4IApBADYCGCAKQgA3AhAMAQsgBkEANgKMASAGQgA3AoQBIAZCADcCfCADKAIwIhRBAk8EQEEBIQEgAygCLCIJKwMQIiMhJiAJKwMAIiQhJSAJKwMIIichIQNAAkAgJCAJIAFBGGxqIg8rAwAiImMEQCABIQggIiEkDAELICIgJWNFDQAgASEFICIhJQsCQCAnIA8rAwgiImMEQCABIQQgIiEnDAELICEgImRFDQAgASELICIhIQsCQCAmIA8rAxAiImMEQCABIQwgIiEmDAELICIgI2NFDQAgASEHICIhIwsgAUEBaiIBIBRHDQALIAYgCzYChAEgBiAFNgJ8IAYgBzYCjAEgBiAENgKAASAGIAw2AogBCyAGIAg2AnggAyAGKQKIATcCoAEgAyAGKQKAATcCmAEgAyAGKQJ4NwKQASADQZABaiEBIAMoAiwhBQNAIAUgASANQQJ0IgRqKAIAQRhsaiAEQXhxaisDAJkiISAoICEgKGQbISggDUEBaiINQQZHDQALQQAhDSADQQA6ABggAyAoOQMQIAMgKERIr7ya8td6PqIiITkD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EBaiIEQQZHDQALCyABQQZHDQALICEgImEEQCADQTRqQQBBAUECQQMQiAIMAQtEAAAAAAAA8D8gCCALQRhsaiIBKwMAIisgCCAMQRhsaiIEKwMAIiOhIiYgJqIgASsDCCItIAQrAwgiJKEiJSAloqAgASsDECIuIAQrAxAiJ6EiKCAooqCjIS9BACEEQX8hCSAiISEDQCAIIARBGGxqIgErAwAgI6EiKSApoiABKwMIICShIiwgLKKgIAErAxAgJ6EiKiAqoqAgLyAmICmiRAAAAAAAAAAAoCAlICyioCAoICqioCIpICmioqEiKSAhICEgKWMiARshISAEIAkgARshCSAEQQFqIgQgBUcNAAsgISAiYQRAQQAhAQNAIAEiBUEBaiEBIAUgDEYgBSALRnINAAsgBSEBA0AgAUEBaiIBIAxGIAEgC0ZyDQALIANBNGogDCALIAUgARCIAgwBC0QAAAAAAAAAACAjICQgCCAJQRhsaiIBKwMIIiKhIiogLiABKwMQIimhIi6iIC0gIqEiLSAnICmhIi+ioSIhICMgASsDACIsoSIwIC2iICsgLKEiKyAqoqEiKiAqoiAhICGiICsgL6IgMCAuoqEiISAhoqCgnyIroyItoqEgJCAhICujIi6ioSAnICogK6MiKqKhIStBACEBIAMrAwAiLyEhQQAhBANAICsgLSAIIARBGGxqIg4rAwCiRAAAAAAAAAAAoCAuIA4rAwiioCAqIA4rAxCioKCZIjAgISAhIDBjIg4bISEgBCABIA4bIQEgBEEBaiIEIAVHDQALICEgL2EEQCADQQE6ABggBUEYbCIBECchBCABBEAgBCAIIAH8CgAACyAmICIgJKEiIqIgJSAsICOhIiOioSIhICEgIaIgJSApICehIiSiICggIqKhIiEgIaIgKCAjoiAmICSioSIiICKioKCfIiOjISYgAygCHCIBBEAgARAiIAMoAiwhCAsgAyAFNgIkIAMgBTYCICADIAQ2AhwgCCsDACEkIAgrAwghJSAIKwMQIScgA0EcaiAFQQF0EDMgAygCHCIIIAMoAiAiAUEYbGoiBCAmICegOQMQIAQgIiAjoyAloDkDCCAEICEgI6MgJKA5AwAgAy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3AiAgCiABNgIcQQQQIyIBQQE2AgAgCiABNgIsIAoQ7wIgCiAKKAI0EMkBIAooAjQiBwRAIAooAiAhCCAKKAIQIQsgCigCACEMIAooAjAhBkEAIQEDQCAMIAFBAnQiBWogBiABQQR0aiIEKAIANgIAIAUgC2ogBCgCCDYCACAFIAhqIAQoAgw2AgAgAUEBaiIBIAdHDQALCyAAQdgAaiAKEP0DIApBIGoQSSAKQRBqEEkgChBJAkACQCACBEAgAi0AEEEBRgRAIABBDhAsDAMLIAAQWCAAQQAQjQEgABCOASAAIAIQVCACLQAQQQFHDQEgAEEOECwMAgsgABBYIABBABCNASAAEI4BIABBABBUCyAAEFoLIAooAjgiAARAIAAQIgsjAEEQayIAJAAgACADQaACajYCBCAAQQRqEPwDIANBiAJqIgJBADYCFCACKAIIIgUgAigCBCIBa0ECdSIEQQNPBEADQCABKAIAECIgAiACKAIEQQRqIgE2AgQgAigCCCIFIAFrQQJ1IgRBAksNAAsLQYAEIQcCQAJAAkAgBEEBaw4CAQACC0GACCEHCyACIAc2AhALIAEgBUcEQANAIAEoAgAQIiABQQRqIgEgBUcNAAsLIAIQUyAAIANB/AFqNgIIIABBCGoQ/AMgAygC7AEiAQRAIAEQIgsgA0EANgL0ASADQgA3AuwBIAMoAtwBIgEEQCABECILIANBADYC5AEgA0IANwLcASADKALMASIBBEAgARAiCyADQQA2AtQBIANCADcCzAEgAygCvAEiAQRAIAEQIgsgA0EANgLEASADQgA3ArwBIAMoAqwBIgEEQCABECILIANBADYCtAEgA0IANwKsASADKAKAASIBBEAgARAiCyADQQA2AogBIANCADcDgAEgAygCcCIBBEAgARAiCyADQQA2AnggA0IANwNwIAMoAmAiAQRAIAEQIgsgA0EANgJoIANCADcDYCADKAJQIgEEQCABECILIANBADYCWCADQgA3A1AgA0FAaxBJIAAgA0E0ajYCDCAAKAIMIgEoAgAiAgRAIAEgAhCBBCAAKAIMIgEoAgAgASgCCBoQIgsgAygCHCIBBEAgARAiCyAAQRBqJAALIApBgANq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gCyAIoiAOIASioSAKIAErAyihoqBEAAAAAAAAAABkRQ0AIAogASsDQKEgCCACKwNoIguiIAQgAisDYCINoqGiIAcgASsDMKEgBCACKwNwIgyiIAYgC6KhokQAAAAAAAAAAKAgCSABKwM4oSAGIA2iIAggDKKhoqCgRAAAAAAAAAAAZEUNACAKIAogBiACQRhqQQhBECAZQQFGG0EAIBkbaisDACIFoiARo6ChIgYgBqIgByAHIAggBaIgEaOgoSIGIAaiIAkgCSAEIAWiIBGjoKEiBSAFoqCgIQUMAQsgBUQAAAAAAAAAACAaQQFxGyEFCyACQcABaiQAIAMgBSADKwMAIgYgBSAGYxs5AwAgHkGgAWokAAuQAQECf0EBIQEgACgCTCICBEAgACgCSCIAIAJBGGxqIQIDQCABIAApAwBC////////////AINCgICAgICAgPj/AFQgACkDCEL///////////8Ag0KAgICAgICA+P8AVHEgACkDEEL///////////8Ag0KAgICAgICA+P8AVHFxIQEgAEEYaiIAIAJHDQALCyABC7ICAgt8Bn8gACgCXCIOQQNPBHwgDkEDbiESIAAoAkghDyAAKAJYIQ5BACEAIAFBAUchAQNAIA8gDiAAQQxsaiINKAIEQRhsaiIQKwMAIA8gDSgCAEEYbGoiESsDACIHoSIEIA8gDSgCCEEYbGoiDSsDCCARKwMIIgihIgqiIBArAwggCKEiCyANKwMAIAehIgKioSEGIBArAxAgESsDECIJoSIMIAKiIAQgDSsDECAJoSICoqEhBCALIAKiIAwgCqKhIQIgBSABBHwgCSAGoiAIIASiIAcgAqJEAAAAAAAAAACgoKBEAAAAAAAAGECjBSAGIAaiIAIgAqIgBCAEoqCgn0QAAAAAAADgP6ILIgIgAyADIAKgIgOhoKAhBSAAQQFqIgAgEkcNAAsgBSADoAUgAwsL1QICCX8GfEEBIQECQCAAKAJMIAAoAlwiA0EBdmsgA0EDbmpBfnFBAkcNACADBEAgACgCSCEEIAAoAmghBiAAKAKoASEFIAAoAlghB0EAIQADQAJAIAcgAEECdCICaiIBKAIAIgggAUF4QQQgAEEDb0ECRh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AgQgACABKAIINgIEIAEgAzYCCCAAKAIIIQYgACABKAIMNgIIIAEgAzYCACABIAY2AgwgARDWAQsgB0EgaiQADAELECYACyAEKAIMIgMgBCgCBCAEKAIAIgFrQQR1SQRAA0AgBSABIANBBHRqIgEoAgA2AgQgBSABKAIQNgIIIAUgASgCIDYCDCAAIAVBBGoQnQUgA0EDaiIDIAQoAgQgBCgCACIBa0EEdUkNAAsLIAVBEGokACAEQRhqEMcBIAQoAgAiAARAIAQgADYCBCAEKAIIGiAAECILIARBMGokAAtFAQF/IAAoAgwEQCAAKAIIEMUEIABBADYCCAJAIAAoAgQiAUUNACABQQJ0IgFFDQAgACgCAEEAIAH8CwALIABBADYCDAsLxAECAn8CfCABKAI4IgIgASgCPCIDNgI8IAMgAjYCOCACIAMrAyAgAisDIKEiBCADKwMYIAIrAxihIgUgBaIgBCAEoqCfIgSjRAAAAAAAAAAAIAUgBKMiBL1C////////////AINCgICAgICAgPj/AFQiAxs5AzAgAiAERAAAAAAAAAAAIAMbOQMoAkAgASgCOCgCACICIAEoAgAiA0YNACADIAEoAjwoAgAiAUYgASACRnINACAAQcgAaiACIAMgARCOBAsLZQECfwJAIAEoAgQiA0UEQCABIQIDQCACIAIoAggiAigCAEcNAAsMAQsDQCADIgIoAgAiAw0ACwsgASAAKAIARgRAIAAgAjYCAAsgACAAKAIIQQFrNgIIIAAoAgQgARDEBCABECILWgEDfyAAKAIIIAFJBEAgAUEYbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBGGxBBGsiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALC74BAQR/IAAQiQQgASgCACEDIAFBADYCACAAKAIAIQIgACADNgIAIAIEQCAAKAIEGiACECILIAAgASgCBDYCBCABQQA2AgQgACABKAIMIgI2AgwgACABKgIQOAIQIAAgASgCCCIDNgIIIAIEQCAAQQhqIQQgAygCBCECAkAgACgCBCIDIANBAWsiBXFFBEAgAiAFcSECDAELIAIgA0kNACACIANwIQILI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gAEUEQCABIAEoAgAoAggRAAAgARAkCyACQRBqJAALwgEBA38jAEEgayIEJAACQCAAKAIIIAAoAgAiAmtBGG0gAUkEQCABQavVqtUATw0BIARBDGogASAAKAIEIAJrQRhtIAAQZCEBIAAoAgAiAiAAKAIEIgMgASgCBCADIAJrQWhtQRhsaiIDEKUCIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQpAILIARBIGokAA8LECYAC4whAxJ/FXwBfiMAQZADayIFJAACQAJAAkAgBEUNACAELQAQQQFHDQBBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQahA7IQIgAUEONgJUIAUgATYCjAEgBSACNgKIASABIAEoAgRBAWo2AgQgBSAFKQKIATcDKCAAIAVBKGoQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgARCFBCEHAn8gAhCFBCILIAdFckUEQCABIQZBAQwBCyACIQYgASECIAchCSALCyEMIAYoAlxBAk0EQEGoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAIQNyECIAUgATYChAEgBSACNgKAASABIAEoAgRBAWo2AgQgBSAFKQKAATcDACAAIAUQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgAigCXCEIQagCECMiD0GgkAI2AgAgD0IANwIEIA9BEGohAQJAIAhBAk0EQCABIAYQNyEBIAUgDzYCfCAFIAE2AnggDyAPKAIEQQFqNgIEIAUgBSkCeDcDCCAAIAVBCGoQSBoMAQsgASACEDchASAFIA82AlwgBSABNgJYIA8gDygCBEEBajYCBCAFIAUpAlg3AyAgBUHgAGogBUEgahBIIRMgBUEANgJUIAVCADcCTCAFQcwAaiIBIAIoAlxBA25B5wdqQegHbkEBahCTBCABAn8gASgCBCIIIAEoAghJBEAgCCATEC5BGGoMAQsjAEEgayINJAAgASgCBCABKAIAIgprQRhtIg5BAWoiCEGr1arVAE8EQBAmAAs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AIAMgACkDCDcDGCADIAApAwA3AxAPCyADIAApAwg3AwggAyAAKQMANwMAIAMgASkDCDcDGCADIAEpAwA3AxAPCyACQQhMBEAgACABRg0DIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiIEIAFGDQMgAyEFA0AgBSICQRBqIgUhAAJAIAQrAwAgAisDAGRFDQAgBSACKQMINwMIIAUgAikDADcDACADIQAgAiADRg0AA0AgBCsDACACQRBrIgArAwBkRQRAIAIhAAwCCyACIAApAwg3AwggAiAAKQMANwMAIAAiAiADRw0ACyADIQALIAAgBCkDCDcDCCAAIAQpAwA3AwAgBEEQaiIEIAFHDQALDAMLIAAgACACQQF2IgRBBHQiBmoiBSAEIAMgBBDFASAFIAEgAiAEayICIAMgBmogAhDFASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMINwMIIAMgACkDADcDACADQRBqIQMgAEEQaiIAIAVHDQALDAQLAkAgAisDACAAKwMAZARAIAMgAikDCDcDCCADIAIpAwA3AwAgAkEQaiECDAELIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiEACyADQRBqIQMgACAFRw0ACwwBCyADIAApAwg3AwggAyAAKQMANwMADAELIAEgAkYNAANAIAMgAikDCDcDCCADIAIpAwA3AwAgA0EQaiEDIAJBEGoiAiABRw0ACwsLbAEBfyAAKAIIIgFFBEBBAA8LAkAgACABKAIAIgBGBEAgAUEANgIAA0AgASgCBCIARQ0CA0AgACIBKAIAIgANAAsMAAsACyABQQA2AgQgAEUNAANAIAAiASgCACIADQAgASgCBCIADQALCyABC6ICAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCADcCACACQQhqIQEMAQsgAiAAKAIAIgRrQQN1IgZBAWoiAkGAgICAAk8NASAFQQxqQf////8BIAMgBGsiA0ECdSIEIAIgAiAESRsgA0H4////B08bIAYgABBLIgIoAgggASkCADcCACACIAIoAghBCGo2AgggAigCBCAAKAIEIAAoAgAiA2siAWshBCABBEAgBCADIAH8CgAACy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AEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASADQQA2AuwBIANCADcC5AEgA0EANgLgASADQgA3AtgBAkACQAJAAkAgAQ4DAAECAwsgA0EYaiIBQYD5AEHgAPwKAAAgA0HkAWogASADQfgAakEEEPECIAFB4PkAQTD8CgAAIANB2AFqIAEgA0HIAGpBBBDwAgwCCyADQRhqIgFBkPoAQcAB/AoAACADQeQBaiABIANB2AFqIgVBCBDxAiABQdD7AEGQAfwKAAAgBSABIANBqAFqQQwQ8AIMAQsgA0EYaiIBQeD8AEGQAfwKAAAgA0HkAWogASADQagBakEGEPECIAFB8P0AQeAA/AoAACADQdgBaiABIANB+ABqQQgQ8AILIAMoAugBIgYgAygC5AEiBWsiAUEYbSEHAkAgBSAGRiIGDQAgARAnIQQgAUUNACAEIAUgAfwKAAALIAAoAkgiBQRAIAUQIgsgACAHNgJQIAAgBzYCTCAAIAQ2AkggBkUEQCABIARqIQEDQCADIAQrAwA5AxggAyAEKwMIOQMgIAQrAxAhCCADQoCAgICAgID4PzcDMCADIAg5AyggAyACIANBGGoQoQEgBCADKQMQNwMQIAQgAykDCDcDCCAEIAMpAwA3AwAgBEEYaiIEIAFHDQALCyADQQA2AhggAyADKALcASIFIAMoAtgBIgJrIgFBDG0iBDYCICADIAQ2AhxBACEEAkAgAiAFRg0AIAMgARAnIgQ2AhggAUUNACAEIAIgAfwKAAALIANBADYCCCADQgA3AgAgACADQRhqIAMQngEgBARAIAQQIgsgABCOASAAEFggACAAEKIBRBHqLYGZl3E9oiIIRAAAAAAAAPC/IAhEAAAAAAAA8L9kGyIIRAAAAAAAAPC/IAi9Qv///////////wCDQoCAgICAgID4/wBUGyIIOQMwIAAgCCAAKwM4IgkgCCAJZBs5AzggAEEAEFQgABBaIAMoAtgBIgEEQCADIAE2AtwBIAMoAuABGiABECILIAMoAuQBIgEE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gIAIANCADcCBCACIAEoAgA2AgggAiABKAIENgIMIAFCADcCACACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgACADNgIEIAAgATYCACAAIANBFGogARCPASACQRBqJAAL9AQCDn8GfCMAQYABayICJAAgASgCDCEDIAJCADcDICACQoCAgICAgID4PzcDGCACQgA3AyggAkIANwMwIAJCADcDQCACQoCAgICAgID4PzcDOCACQgA3A0ggAkIANwNQIAJCADcDYCACQoCAgICAgID4PzcDWCACQgA3A2ggAkIANwNwIAIgAUEYaiIHIAJBGGoQygECQCACKwMAIAIrAwhhBEAgACADQTD8CgAADAELIAIgASkDcDcDKCACIAEpA2g3AyAgAiABKQNgNwMYIAIgASkDcDcDECACIAEpA2g3AwggAiABKQNgNwMAIAFByABqIQggAUEwaiEJIANBGGohCgNAIAhBCEEQIAVBAUYbQQAgBRsiBGohCyAEIAdqIQwgBCAJaiENIAIgBGoiDisDACERIAJBGGogBGoiDysDACESQQAhAQNAIBECfwJAAkACQCABDgIAAQILIAwrAwAgAysDAKIhEEEAIQYgBwwCCyANKwMAIAMrAwiiIRBBCCEGIAkMAQsgCysDACADKwMQoiEQQRAhBiAICyAEaisDACAGIApqKwMAoiITIBAgECATYxugIREgEiATIBAgECATZBugIRIgAUEBaiIBQQNHDQALIA8gEjkDACAOIBE5AwAgBUEBaiIFQQNHDQALIAIrAwAhECACKwMYIREgAisDCCESIAIrAyAhEyAAIAIrAxAiFCACKwMoIhUgFCAVZCIBGzkDKCAAIBIgEyASIBNkIgMbOQMgIAAgECARIBAgEWQiBBs5AxggACAVIBQgARs5AxAgACATIBIgAxs5AwggACARIBAgBBs5AwALIAJBgAFqJAAL/AMCBX8MfCMAQfABayIDJAAgASsDGCEIIAErAyAhCSABKwMoIQogASsDMCELIAErAzghDCABKwNAIQ0gASsDSCEOIAErA1AhDyABKwNYIRAgASsDYCERIAErA2ghEiABKwNwIRMgA0KAgICAgICA+D83A3ggAyATOQNwIAMgEjkDaCADIBE5A2AgA0IANwNYIAMgE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AygPCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACADIAIpAwA3AxggAyACKQMINwMgIAMgAikDEDcDKA8LIAJBCEoNASAAIAFGDQIgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiICIAFGDQIgAyEFA0AgACEGIAIhACAFIgJBGGohBQJ/IAYrAxgiByACKwMAIghjRQRAIAUiBCAHIAhiDQEaIAQgBigCJCACKAIMTg0BGgsgBSACKQMQNwMQIAUgAikDCDcDCCAFIAIpAwA3AwAgAyACIANGDQAaAkADQCAAKwMAIgcgAkEYayIEKwMAIghjRQRAIAcgCGINAiAGKAIkIAJBDGsoAgBODQILIAIgBCkDEDcDECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADDAELIAILIgQgACkDEDcDECAEIAApAwg3AwggBCAAKQMANwMAIABBGGoiAiABRw0ACwwCCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyAAIAAgAkEBdiIFQRhsIgZqIgQgBSADIAUQywEgBCABIAIgBWsiAiADIAZqIAIQywEgBCECA0AgASACRgRAIAAgBEYNAgNAIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIANBGGohAyAAQRhqIgAgBEcNAAsMAgsCQAJAIAIrAwAiByAAKwMAIghjRQRAIAcgCGINASACKAIMIAAoAgxODQELIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAJBGGohAgwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIQALIANBGGohAyAAIARHDQALIAEgAkYNAANAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyACQRhqIgIgAUcNAAsLC4sBAQV/IwBBEGsiA0KAgICAEDcCBCADQQI2AgwgACgCACgCACABQQxsaiEEIAAoAgQgAUECdGoiBSgCACEBIAAoAgwhBkEAIQADQCAFIAEgBiAEIANBBGogAGooAgBBAnRqKAIAQQJ0aigCACICIAJBH3UiAnMgAmtqIgE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4AWogBUHwAGogBUGIAWoQzgEgBSsDECEWIAUrAxghFSAFKwMICyIUvUL///////////8Ag0L/////////9/8AVg0AAkAgBCgCBCIBIAQoAggiBk8EQCAEIAZBAXRBgAEgBhsQRCAEIAQoAgQiAUEBajYCBAwBCyAEIAFBAWo2AgQLIAQoAgAgAUEDdGogDq0gA61CIIaENwIAIARBEGohAwJAIAQoAhQiASAEKAIYIgZPBEAgAyAGQQF0QYABIAYbECUgBCgCECAEKAIUIgFBAnRqIAA2AgAMAQsgAygCACABQQJ0aiAANgIACyAEIAFBAWo2AhQgBEEgaiEAAn8gBCgCJCIIIAQoAigiAU8EQCAAIAFBAXRBgAEgARsQMyAEKAIgIAQoAiQiCEEYbGoMAQsgACgCACAIQRhsagsiASAUOQMAIAQgCEEBajYCJCABIBY5AxAgASAVOQMICyACQYGAgIB4cUEBRiEGCyAFQdABaiQAIAYLwwYBCX8CQAJAAkACQAJAIAMOAwQCAAELAkAgAigCACgCACIDIAFBBGsiASgCACIGQQN0aiIHIAIoAgQoAgAiAkECdCIFaigCACILIAUgAyAAKAIAIgVBA3RqIgNqKAIAIglOBEAgCSALRw0BIAdBASACa0ECdCICaigCACACIANqKAIATg0BCyAEIAY2AgAgBCAAKAIANgIEDwsgBCAFNgIAIAQgASgCADYCBA8LIANBCEoNASAAIAFGDQIgBCAAKAIANgIAIABBBGoiBiABRg0CQQEgAigCBCgCACIAayELIAIoAgAoAgAhByAAQQJ0IQUgBCEAA0AgAEEEaiECAkACfwJAAkAgByAGKAIAIgNBA3RqIgkgBWooAgAiCCAHIAAoAgAiCkEDdGoiDCAFaigCACINTgRAIAggDUcNASAJIAtBAnQiCGooAgAgCCAMaigCAE4NAQsgACAKNgIEIAQgACAERg0CGgNAIAcgBigCAEEDdGoiCSAFaigCACIIIAcgAEEEayIDKAIAIgpBA3RqIgwgBWooAgAiDU4EQCAIIA1HDQMgCSALQQJ0IghqKAIAIAggDGooAgBODQMLIAAgCjYCACADIgAgBEcNAAsgBAwCCy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AiDCAKIAUgACgCACIKQQN0aiIFaigCACINTgRAIAwgDUcNASAJQQEgCGtBAnQiCGooAgAgBSAIaigCAE4NAQsgBCALNgIAIANBBGohAwwBCyAEIAo2AgAgAEEEaiEACyAEQQRqIQQgACAGRw0ACyABIANGDQADQCAEIAMoAgA2AgAgBEEEaiEEIANBBGoiAyABRw0ACwsL6gwDDHwRfwF+IwBBkAFrIhQkACAUQeAAakEAQTD8CwAgFEEwakEAQTD8CwAgFCAENgIsIBQgAzYCKCAUQoCAgIAQNwIAIAEoAgQiGigCSCIfIAdBGGwiFWoiICsDACILIB8gBkEYbCIXaiIhKwMAIgyhIQ4gBUEDbSEiIBooApgBIiMgFWorAwAhDyAXICNqKwMAIRAgASgCACIbKAKYASEcIBsoAkghHUEAIQFBACEXA0ACfyAPIBwgFEEoaiAUIBdqKAIAIh5BAnRqKAIAQRhsIhVqKwMAmiIJZCAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAmiEPIAMgHGorAwCaIRBBACEXA0ACfyAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJIBBkIAwgAyAfaiIDKwMAIghjIAggDGEbIAkgD2QgCCALZCAIIAthG2siHEUEQEQAAAAAAAD4fyEJRAAAAAAAAPh/IQpBAAwBCyAGKwMQIQogBisDCCEJAkAgCCAMoSINIAggC6EiCCANmSAImWMiFRsgDqMiCL1C////////////AINC//////////f/AFYNACAEKwMIIg0gCaEiEb1C////////////AINCgICAgICAgPj/AFoNACAEKwMQIhIgCqEiE71C////////////AINCgICAgICAgPj/AFoNACAKIBIgFRsgCCAToqAhCiAJIA0gFRsgCCARoqAhCQsgHEEAIBsoAqgBIhUgB0EYbGorAwggFSAbKAJoIAJBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAkgAysDCCIIYyAIIAlhGxsLIRUCQCAJvUL///////////8Ag0L/////////9/8AVg0AIBVBACAVayAYGyAZaiEZIAFBAUoEQEECIQEMAQsgAUUgFUUgFnNFckUEQEEBIQEMAQsgAUEYbCIYIBRBMGpqIhYgAykDACIlNwMAIBYgAykDEDcDECAWIAMpAwg3AwggFEHgAGogGGoiAyAJOQMIIAMgCjkDECADICU3AwAgAUEBaiEBIBVBAEchFgsgF0EEaiIXQQhHDQALAn8gGUUEQEQAAAAAAAD4fyEIRAAAAAAAAPh/IQtEAAAAAAAA+H8hCkQAAAAAAAD4fyEJQQAMAQsgFCAUQeAAaiAUQfgAaiAUQTBqIBRByABqEM4BIBQrAwghCyAUKwMAIQggGUEAIBsoAqgBIgEgB0EYbGorAxAgASAbKAJoIAJBAnRqKAIAQQNtQRhsaisDEKCaIBooAqgBIgEgIkEYbGorAxAgASAaKAJoIAVBAnRq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CAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAIQ8gAyAcaisDACEQQQAhFwNAAn8gECAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJYyAMIAMgH2oiAysDACIIYyAIIAxhGyAJIA9kIAggC2QgCCALYRtrIhxFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgBisDECEKIAYrAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgBCsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgBCsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLIBxBACAbKAKoASIV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JBAjYCiAIgAkKAgICAEDcCgAIgACgCWCIPIApBAXUiECAKaiIRQQJ0aiESIAAoAmghE0EAIQEDQEEBIQwCQCAPIAJBgAJqIAFqKAIAIgcgEWoiDUECdCIEaigCACIAIBJBBEEIIAdBAUYbQQAgBxtBjOkAaigCAEECdGooAgAiA0gEQCAAIQQgAyEADAELIAQgE2ooAgAhDUEAIQwgAyEECyACQZACaiIUIAdBBHRqIgMgDDoADCADIAA2AgggAyAENgIEIAMgDTYCACABQQRqIgFBDEcNAAsgAkGAAmogDiALIBAgFBCMAyACKQOIAkL///////////8Ag0L/////////9/8AVg0AIAgoAggoAgAgC0ECdGoiACAAKAIAIAIoAoACajYCAAsgCkGBgICAeHFBAUYLIQcCQCAZIBYgBUEwbGoiACsDGGVFDQAgGSAAKwMAZkUNACAYIAArAyBlRQ0AIBggACsDCGZFDQACQCAFQQFxDQAgCCgCBCgCACAVaigCACELIAgoAgAiDigCBCEAIAJBAjYCiAIgAkKAgICAEDcCgAIgACgCWCIPIAVBAXUiECAFaiIRQQJ0aiESIAAoAmghE0EAIQEDQEEBIQwCQCAPIAJBgAJqIAFqKAIAIgYgEWoiDUECdCIEaigCACIAIBJBBEEIIAZBAUYbQQAgBhtBjOkAaigCAEECdGooAgAiA0gEQCAAIQQgAyEADAELIAQgE2ooAgAhDUEAIQwgAyEECyACQZACaiIUIAZBBHRqIgMgDDoADCADIAA2AgggAyAENgIEIAMgDTYCACABQQRqIgFBDEcNAAsgAkGAAmogDiALIBAgFBCMAyACKQOIAkL///////////8Ag0L/////////9/8AVg0AIAgoAggoAgAgC0ECdGoiACAAKAIAIAIoAoACajYCAAsgBUGBgICAeHFBAUYhBgsCQCAGIAdyRQRAIAlBAEgNASACIAlBAnRqKAIAIQAgCUEBayEJDAILIAogBSAHGyEAIAdFIAZFcg0BIAIgCUEBaiIJQQJ0aiAFNgIADAELCyACQcACaiQAC5AIAhZ/AnwjAEHAAmsiAiQAIAAoAgAiBCgCACgCSCABQQJ0IhUgB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BQQigMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAmo2AgALIAVBgYCAgHhxQQFGIQYLAkAgBiAHckUEQCAJQQBIDQEgAiAJQQJ0aigCACEAIAlBAWshCQwCCyAKIAUgBxshACAHRSAGRXINASACIAlBAWoiCUECdGogBTYCAAwBCwsgAkHAAmokAAtUAQF/IAAgAUcEQCAAKAIAIgIEQCACECILIABBADYCCCAAQgA3AgAgACABKAIANgIAIAAgASgCBDYCBCAAIAEoAgg2AgggAUEANgIIIAFCADcCAAsL8wMCB38JfCMAQcADayICJAACQCAAKAIAKAIAIgQoAlggAUECdGoiAygCACIGIANBeEEEIAFBA29BAkYbaigCACIDTg0AIAQoAkgiBSAGQRhsaiIEKwMAIgkgBSADQRhsaiIDKwMAIgogCSAKYyIGGyIMRAAAAAAAAPB/YQ0AIAMrAxAiCyAEKwMQIg0gCyANZCIFGyEOIAMrAwgiDyAEKwMIIhAgDyAQZCIEGyERIAogCSAGGyEJIA0gCyAFGyEKIBAgDyAEGyELIAAoAhRBBGohB0EBIQNBfyEEA0AgACgCDCADQQFrQQJtQQN0aiIDKAIEIQYgAygCACEDIAIgDjkDuAEgAiAROQOwASACIAk5A6gBIAIgCjkDoAEgAiALOQOYASACIAw5A5ABIAJBMGoiBSACQZABakEw/AoAACAAIAUgAyABIAcQ8wQhBSACIA45A4gBIAIgETkDgAEgAiAJOQN4IAIgCjkDcCACIAs5A2ggAiAMOQNgIAIgAkHgAGpBMPwKAAAgBSAAIAIgBiABIAcQ8wQiCHJFBEAgBEEASA0CIAJBwAFqIARBAnRqKAIAIQMgBEEBayEEDAELIAMgBiAFGyEDIAVFIAhFcg0AIAJBwAFqIARBAWoiBEECdGogBjYCAAwACwALIAJBwANqJAAL8wMCB38JfCMAQcADayICJAACQCAAKAIAKAIAIgQoAlggAUECdGoiAygCACIGIANBeEEEIAFBA29BAkYbaigCACIDTg0AIAQoAkgiBSAGQRhsaiIEKwMAIgkg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QCAAKAIEIAAoAgAiA2tBBHUiBCABSQRAIwBBIGsiBiQAAkACQCABIARrIgQgACgCCCIFIAAoAgQiA2tBBHVNBEAgACAEBH8gAyAEQQR0aiEAA0AgAyACKQMINwMIIAMgAikDADcDACADQRBqIgMgAEcNAAsgAAUgAws2AgQMAQsgAyAAKAIAIgNrQQR1IgcgBGoiAUGAgICAAU8NASAGQQxqQf////8AIAUgA2siA0EDdSIFIAEgASAFSRsgA0Hw////B08bIAcgABAyIgEoAggiAyAEQQR0aiEEA0AgAyACKQMINwMIIAMgAikDADcDACADQRBqIgMgBEcNAAsgASAENgIIIAEoAgQgACgCBCAAKAIAIgRrIgJrIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2AgwgARA2CyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEEdGo2AgQLCwsIACAAIAEQTAsQACAAKAIEIAAoAgBrQRhtCxAAIAAoAgQgACgCAGtBDG0LEAAgACgCBCAAKAIAa0EGdQsoACABIAAoAgBqIgAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMACzQBAX8gACgCACECQRgQIyIAIAEgAmoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAALDwAgASAAKAIAaiACNgIACw0AIAEgACgCAGooAgALLwECfyMAQSBrIgIkACACQQhqIgMgASAAEQEAQRgQIyADEC4gAxAoGiACQSBqJAALMwEDf0EEECMiAiABNgIAQZjxASAAQQNBACEAQfCHAiAAQfbcAGpBtgIgAkEAQQBBABAACwwAIAAQsAUaIAAQIgs3AQJ/IABB+O4BNgIAIAAoAgQiAkEEayIBIAEoAgBBAWsiATYCACABQQBIBEAgAkEMaxAiCyAAC8EEAQN/AkAgACABKAIIIAQQcwRAIAIgASgCBEcNASABKAIcQQFGDQEgASADNgIcDwsCQCAAIAEoAgAgBBBzBEACQCABKAIQIAJHBEAgAiABKAIUR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QQRogA0HQAGokAAsEAEEAC1UBAn8jAEFAaiICJAAgASAAKAIEIgNBAXVqIQEgACgCACEAIAIgASADQQFxBH8gASgCACAAaigCAAUgAAsRAQBBwAAQIyACEEAgAhBBGiACQUBrJAALdQECfyMAQSBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEgECMiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBIGokACAAC7oBAQN/IwBBEGsiAyQAIAAoAgAhAiADIAEgACgCBCIAQQF1aiIBIABBAXEEfyABKAIAIAJqKAIABSACCxEBAEEMECMiAEEANgIIIABCADcCACADKAIEIgIhBCACIAMoAgAiAWtBBnUiAgRAIAAgAhCVAyAAKAIEIQIgASAERwRAA0AgAiABEEBBQGshAiABQUBrIgEgBEcNAAsLIAAgAjYCBAsgAyADNgIMIANBDGoQmAMgA0EQaiQAIAALVwECfyMAQUBqIgMkACABIAAoAgQiBEEBdWohASAAKAIAIQAgAyABIAIgBEEBcQR/IAEoAgAgAGooAgAFIAALEQsAQcAAECMgAxBAIAMQQRogA0FAayQACwsAIAAQaRogABAiC3MBAn8jAEHQAGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACAEQQFxBEAgASgCACAAaigCACEACyADIAIpAwg3AwggAyACKQMANwMAIANBEGoiAiABIAMgABEDAEHAABAjIAIQQCACEEEaIANB0ABqJAALJAECfiAAKQMAIAEpAwBTIAApAwgiAiABKQMIIgNVIAIgA1EbCwYAQYCcAgsUACAAQQRqQQAgASgCBEGhmAFGGwtPAQJ/AkAgASgCBCICBEAgASgCACIBIAJBBHRqIQMDQCAAKAIEKAIQIgJFDQIgAiABIAIoAgAoAhgRAQAgAUEQaiIBIANHDQALCw8LEGYACxUAIAFByJsCNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQcibAjYCACABIAAoAgQ2AgQgAQsQACAAKAIMIAAoAghrQQJ1CwoAIABBCGoQhAILZwEDfyAAKAIEIgMgACgCCCIBRwRAA0AgACABQQRrIgE2AgggASgCACECIAFBADYCACACBEAgAiACKAIAKAIEEQAAIAAoAgghAQsgASADRw0ACwsgACgCACIBBEAgACgCDBogARAiCwviBAMGfwF8AX4jAEEgayIGJAACf0EwECMhAyMAQSBrIgIkACADQQA2AiggA0IANwMgIANBADYCECADQgA3AwggAyAANgIEIANBmJsCNgIAAkACQCAARQRAIANCgICAgICAgPg/NwMYIAJBADYCDCACQgA3AgREAAAAAAAA8D8hCAwBCyADIAArAxgiCDkDGCACQQA2AgwgAkIANwIEIAhEAAAAAAAAAABhDQELIAJBBGogASgCBCABKAIAa0EEdRBcIAEoAgAiBCABKAIEIgFHBEADQCAEKQMAIQkgAiAIIAQpAwi5ojkDGCACIAggCbmiOQMQIAJBBGogAkEQahBMIARBEGoiBCABRw0ACwsgA0EgahBFIAMgAigCBDYCICADIAIoAgg2AiQgAyACKAIMNgIoIAJBIGokACADDAELQQIQggIACyEDAkACQCAAKAIMIgEgACgCECICSQRAIAEgAzYCACABQQRqIQMMAQsgASAAQQhqIgQoAgAiBWtBAnUiB0EBaiIBQYCAgIAETw0BIAZBDGpB/////wMgAiAFayICQQF1IgUgASABIAVJGyACQfz///8HTxsgByAEEEoiASgCCCICIAM2AgAgASACQQRqNgIIIAEoAgQgACgCDCAAKAIIIgJrIgNrIQQgAwRAIAQgAiAD/AoAAAsgACgCCCECIAAgBDYCCCABIAI2AgQgACABKAIIIgM2AgwgASACNgIIIAAoAhAhBCAAIAEoAgw2AhAgASACNgIAIAEgBDYCDCABEMwFCyAAIAM2AgwgA0EEaygCACAGQSBqJAAPCxAmAAsJACAAEIMCECILcQEDfyMAQeAAayIDJAAgA0EANgIUIANCADcCDCADQQxqIgQgASgCACIFIAEoAgQiASABIAVrQQxtEEcgA0EYaiIBIAQgAiAAEQMAQcAAECMgARC0ASABEEEaIAMgBDYCXCADQdwAahApIANB4ABqJAALFQAgACgCBCAAQQRqIAAsAA9BAEgbCyc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EQWyACIAM2AiggAiAENgIkIAIgAikCJDcDACAAIAIQaiACIAE2AiwgAkEsahApIAIoAgwiAARAIAIgADYCECACKAIUGiAAECILIAJBMGokAAveBQIJfwF8IwBB0ABrIgYkACAGIAEQQBogBkEANgJIIAZCADcCQCAGQUBrIgFBARCVAyABKAIEIQMgASAGIgJHBEADQCADIAIQQBogA0FAayEDIAJBQGsiAiABRw0ACwsgASADNgIEIwBBkAFrIgIkACABKAIAIgMgASgCBCIHRwRAA0AgAkHQAGoiBCADEEAaIAQQywMgBWohBSAEEEEaIANBQGsiAyAHRw0ACwsgAkEANgJMIAJCADcCRCACQcQAaiAFEFwgASgCACIFIAEoAgQiB0cEQANAIAJB0ABqIgMgBRBAGiACQRhqIAMQTSACQQA2AkAgAkIANwI4IAJBOGogAigCGCIDKAIAIgQgAygCBCIDIAMgBGtBDG0QRwJAIAIoAhwiA0UNACADIAMoAgQiBEEBazYCBCAEDQAgAyADKAIAKAIIEQAAIAMQJAsgAigCOCIEIAIoAjwiCEcEQANAIAJBLGogBBA8IgkoAgAiAyACKAIwIgpHBEADQCADKwMAIQsgAiADKwMIOQMgIAIgCzkDGCACQcQAaiACQRhqEEwgA0EQaiIDIApHDQALIAkoAgAhAwsgAwRAIAIgAzYCMCACKAI0GiADECILIARBDGoiBCAIRw0ACwsgAiACQThqNgIYIAJBGGoQKSACQdAAahBBGiAFQUBrIgUgB0cNAAsLIAJBGGoiAyACQcQAahDKAyACQQA2AlggAkIANwJQIAJB0ABqIgUgAyACQSRqQQEQR0EYECMiA0G0mgI2AgAgA0IANwIEIANBDGoiBCAFEFsgAiADNgIUIAIgBDYCECACIAIpAhA3AwggACACQQhqEGogAiAFNgI4IAJBOGoQKSACKAIYIgAEQCACIAA2AhwgAigCIBogABAiCyACKAJEIgAEQCACIAA2AkggAigCTBogABAiCyACQZABaiQAIAYgATYCTCAGQcwAahCYAyAGEEEaIAZB0ABqJAALJAECfCAAKwMIIAErAwhjIAArAwAiAiABKwMAIgNjIAI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qQQBBMPwLACACQagBakEAQST8CwAgAkEANgLgASACQgA3A9gBIAJBAToA1QEgAkEBOgDMASACQoCAgICAgICgPjcD8AEgAkKAgICAgICA0MEANwPoASACQfyaAjYCWCACQdgAaiIBIAMQmwEgASACQRRqIgMQ4QEgAkEANgKEAiACQgA3AvwBIAEgAkEoaiACQfwBaiIEEM0DIAIgBDYC+AEgAkH4AWoQKSABEGkaIAIgAzYCWCABECkCQCACKAIkIgFFDQAgASABKAIEIgNBAWs2AgQgAw0AIAEgASgCACgCCBEAACABECQLIAJBADYCHCACQgA3AhQgAkEoaiACQRRqQQAQxAIgAEEANgIIIABCADcCACACKAIYIAIoAhRrQQxtIQEjAEEgayIDJAACQAJAIAAoAgggACgCACIEa0EGdSABSQRAIAFBgICAIE8NASAAIANBDGogASAAKAIEIARrQQZ1IAAQqQEiARCnAiABEKYCCyADQSBqJAAMAQsQJgALIAIoAhgiAyACKAIURwRAA0BBGBAjIgFBtJoCNgIAIAFCADcCBCABQQxqIgQgA0EMayIDEFsgAiABNgIQIAIgBDYCDCACIAIpAgw3AwAgAkHYAGoiBCACEGoCQCAAKAIEIgEgACgCCCIFSQRAIAEgBBC0ARogAUFAayEBDAELIAEgACgCACIEa0EGdSIGQQFqIgFBgICAIE8NBCACQfwBakH///8fIAUgBGsiBEEFdSIFIAEgASAFSRsgBEHA////B08bIAYgABCpASEEIAIoAoQCIAJB2ABqELQBGiACIAIoAoQCQUBrNgKEAiAAIAQQpwIgACgCBCEBIAQQpgILIAAgATYCBCACQdgAahBBGiADIAIoAhRHDQALCyACIAJBFGo2AlgjAEEQayIFJAAgAigCWCIBKAIAIgAEQCAAIQMgASEEIAEoAgQiBiAARwRAA0AgBSAGQQxrIgY2AgwgBUEMahApIAAgBkcNAAsgAigCWCIEKAIAIQMLIAEgADYCBCAEKAIIGiADECILIAVBEGokACACQShqEIMCGgsgAkGQAmokAA8LECYAC9oCAgV/A3wjAEFAaiIDJAACQCABRAAAAAAAAAAAZQRAIAAQ4w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IAKAIIEQAAIAAQJAsgAkFAayQAC/YFAQ9/IwBBEGsiBiQAIAZBCGogAUEAECsQKiAGKAIIIQMjAEGwAWsiASQAIAMoAlwhAiABQQA2AqgBIAFCADcCoAEgAUGgAWogAkEBdiICEDkgASACNgKkASADKAJcIgsEQCADKAJ4IQwgAygCWCENIAMoAqgBIQcgAygCaCEIIAEoAqABIQ5BACECA0ACQCAHIAggCCACQQJ0IglqKAIAIgpBAnRqKAIAQQNtQRhsaisDEEQAAAAAAAAAAGZFDQAgByAKQQNtQRhsaisDEEQAAAAAAAAAAGNFDQAgCSANaiIFQXhBBCACQQNvQQJGG2ooAgAhDyAFKAIAIRAgDiAEQQR0aiIFIAkgDGooAgA2AgwgBSAKNgIIIAUgDzYCBCAFIBA2AgAgBEEBaiEECyACQQFqIgIgC0cNAAsLIAFCADcDmAEgAUIANwOQASABQgA3AzAgAUIANwM4IAFBoAFqIAQgAUEwahCVAiABQfgAaiICIAEoAqABIgQgBCABKAKkAUEEdGpBABD0AiABQgA3A0ggAUKAgICAgICA+D83A0AgAUIANwNQIAFCADcDYCABQoCAgICAgID4PzcDWCABQgA3A2ggASABKQKgATcCcCABIAFBQGtBMPwKAAAgAUGEAWogAiABQfAAaiIEIANByABqIAEQxwQgASACNgJwIAQQKSAAQQA2AgggAEIANwIAIAEoAoQBIgMgASgCiAEiBEcEQANAIAFBADYCgAEgAUIANwJ4IAMoAgAiAiADKAIEIgVHBEADQCABQfgAaiACEEwgAkEYaiICIAVHDQALCyAAIAFB+ABqEHYgASgCeCICBEAgASACNgJ8IAEoAoABGiACECILIANBDGoiAyAERw0ACwsgASABQYQBajYCeCABQfgAahApIAEoAqABIgAEQCAAECILIAFBsAFqJAACQCAGKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAZBEGokAAuODgMPfwl8An4jAEEQayILJAAgC0EIaiABQQAQKxAqIAsoAgghBiMAQcACayIBJAAgASAGKQMINwM4IAEgBikDADc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JUBIAEoAiAiAARAIAAQIgsgAUHAAmokAAJAIAsoAgwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgC0EQaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBASADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBACADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC3EBA38jAEGQAWsiBCQAIARByABqIgUgARDkAiAEQRhqIgYgBUEw/AoAACAEIAIpAxA3AxAgBCACKQMINwMIIAQgAikDADcDACAEQfgAaiICIAYgBCADEJYEIAAgASACQQIQ6AEgAhAoGiAEQZABaiQAC8oDAgN/AX4jAEHQAGsiAyQAIANBxABqIAFBEGoQfyADQTxqIAEgAygCRBArECoCQCADKAI8IgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEIAFBEGogB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IgEkACABQQhqIABBABArECogASgCCEEAEIQEAkAgASgCDCIARQ0AIAAgACgCBCICQQFrNgIEIAINACAAIAAoAgAoAggRAAAgABAkCyABQRBqJAALXgICfwF8IwBBEGsiASQAIAFBCGogAEEAECsQKiABKAIIQQEQhAQCQCABKAIMIgBFDQAgACAAKAIEIgJBAWs2AgQgAg0AIAAgACgCACgCCBEAACAAECQLIAFBEGokAAsZACAAEJACIAAQoARrIAAQvwFqQX5tQQFqC54CAgJ/AXwjAEEgayIDJAAgA0EYaiABQQAQKxAqAkAgAygCGCIEKAJEIgEEQCAAIAEQRgwBC0GoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAQQNyEEIAErA0giBSACIAJEAAAAAAAAAABhGyICIAVkBEAgASACOQNIIAQQWgsgBEEAEPgCIARBABBUIAEgBTkDSCADIAE2AhQgAyAENgIQIAEgASgCBEEBajYCBCADIAMpAhA3AwggACADQQhqEEgaIAEgASgCBCIAQQFrNgIEIAANACABIAEoAgAoAggRAAAgARAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC50CAgJ/AXwjAEEgayIDJAAgA0EYaiABQQAQKxAqAkAgAygCGCIEKAJEIgEEQCAAIAEQRgwBC0GoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAQQNyEEAkAgASsDSCACYwRAIAEgAjkDSCAEEFogBEEAEPgCIARBABBUDAELIAEgAiABKwNAIgUgAiAFZBs5A0gLIAMgATYCFCADIAQ2AhAgASABKAIEQQFqNgIEIAMgAykCEDcDCCAAIANBCGoQSBogASABKAIEIgBBAWs2AgQgAA0AIAEgASgCACgCCBEAACABECQLAkAgAygCHCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADQSBqJAALXAICfwF8IwBBEGsiASQAIAFBCGogAEEAECsQKiABKAIIKwM4AkAgASgCDCIARQ0AIAAgACgCBCICQQFrNgIEIAINACAAI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A9ABIAJBADsB8AEgAkIANwPoASACQgA3A+ABIAJCADcD2AEgByEBAkAgAigCgAIiBUUNAANAIAEiAyAFIgogBSgCECAJSCIMGyEBIAVBBEEAIAwbaigCACIFDQALIAEgB0YNACAJIAMgCiAMGygCEEgNACACQYgBaiABQRhqQeoA/AoAAAsgAkGLAmogBiANIAJBiAFqELQEIAJB/AFqIAIQswQgAigCACEBCyANQQFqIg0gEEcNAAsLIAcgAigC/AEiA0cEQANAIAJBiwJqIAYgECADQRhqELQEAkAgAygCBCIBBEADQCABIgMoAgAiAQ0ADAILAAsDQCADIAMoAggiAygCAEcNAAsLIAMgB0cNAAsLIAIgFa03A4gBIAZBOGogAkGIAWoQkgECQCASRQRAIAsgDkEDbBDUASAOQQBMDQEgCygCACEHIAgoAkghCkEAIQMDQCAKIANBGGwiBWoiASsDACEeIAErAwghHyAFIAdqIgUgASsDEDkDECAFIB85AwggBSAeOQMAIANBAWoiAyAORw0ACwwBCyAIKAJMIQEgAkF/NgKIASACQfwAaiABIAJBiAFqELIEIQ0gAkHwAGogCCgCTBCcAiEQIA4gBigCAGwhASMAQSBrIgUkAAJAAkAgCygCCCALKAIAIgNrQQN1IAFJBEAgAUGAgICAAk8NASAFQQxqIAEgCygCBCADa0EDdSALEEsiASgCBCALKAIEIAsoAgAiCmsiA2shByADBEAgByAKIAP8CgAACyALKAIAIQMgCyAHNgIAIAEgAzYCBCALIAEoAgg2AgQgASADNgIIIAsoAgghByALIAEoAgw2AgggASADNgIAIAEgBzYCDCABEJkBCyAFQSBqJAAMAQsQJgALIAYoAkgiASAGKAJEIgVHBEAgF0EASCATciETIAZBLGohFSAGQSBqIRggBigCOCEDQQAhCgNAIAMgCiIHQQFqIgpBA3QiGWopAwBCA4AgAyAHQQN0aikDAEIDgCImQv////8Pg1YEQCAHQeAAbCEaICanIQUDQCACQQI2AmwgAkKAgICAEDcCZCAFQRhsIRtBACEOA0AgCCgCeCAPKAIAIAVBAnRqKAIAQQxsaiACQeQAaiAOaig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IAAQIgsgBEGgAWokAAuUDwINfwx8IwBBMGsiByQAIAcgAikDEDcDKCAHIAIpAwg3AyAgByACKQMANwMYIAcgAykDADcDACAHIAMpAwg3AwggByADKQMQNwMQIwBBQGoiAiQAIAJBOGogAUEAECsQKiACIAcpAxg3AyAgAiAHKQMgNwMoIAIgBykDKDcDMCACIAcpAwA3AwggAiAHKQMINwMQIAIgBykDEDcDGCACKAI4IQggAkEgaiEGIwBBwAZrIgEkAAJAIAgoAlxBAk0EQCAAQQA2AgggAEIANwIADAELIAYrAwAhEiACKwMIIRUgBisDCCETIAIrAxAhFiABIAIrAxgiFCAGKwMQIhehIhE5A9gDIAEgFiAToSIYOQPQAyABIBUgEqEiGTkDyAMgGSAZoiAYIBiioCARIBGioEQAAAAAAAAAAGEEQCAAQQA2AgggAEIANwIADAELIAFBsAFqEDshAyABQgA3A6gBIAFCADcDoAEgAUIANwOYASABQgA3AzggAUIANwNAIAFCADcDSCADQcgAakECIAFBOGoQZyADKAJIIgUgBikDEDcDECAFIAYpAwg3AwggBSAGKQMANwMAIAMoAkgiBSACKQMQNwMgIAUgAikDGDcDKCAFIAIpAwg3AxggAUIANwOAASABQgA3A5ABIAFCADcDiAEgAUIANwMoIAFCADcDMCABIAEpA4ABNwMgIANBmAFqQQIgAUEgahBnIAMoApgBQQBBMPwLACADQdgAaiIFQQNBfxAxIAVBEGpBA0F/EDEgBUEgakEDQX8QMSADKAJYIgVBADYCACADKAJoIgRBATYCACADKAJ4IglBADYCACAFQQE2AgQgBEEANgIEIAlBADYCBCAFQX82AgggBEF/NgIIIAlBADYCCCABQgA3A3ggAUIANwNwIAFCADcDaCABQgA3AwggAUIANwMQIAFCADcDGCADQagBakEBIAFBCGoQZyADKAKoASIFQgA3AxAgBUIANwMIIAVCADcDACABIAg2AmQgASADNgJgIAEgCDYCXCABIAM2AlggASAINgJUIAEgAzYCUCAAQQA2AgggAEIANwIAAkAgCCgCjAJFDQAgEiAVIBIgFWMiBRsiGiAVIBIgBRsi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gAhCYBCADIAQQLiIBQRhqIANByABqIgQQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAEECgaIANBMGoQKBogA0HgAGokAAu1AQEDfyAAIwBBEGsiACQAIAAgAUEQahB/IABBCGogASAAKAIAECsQKiAAKAIIKAJEAkAgACgCDCIBRQ0AIAEgASgCBCICQQFrNgIEIAINACABIAEoAgAoAggRAAAgARAkCwJAIAAoAgQiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgAEEQaiQAIgBBDksEf0GWDgUgAEECdEHcjwJqKAIACxDRBAsPACAAQdCUAjYCACAAECILDQAgAEHQlAI2AgAgAAslAQF/IwBBEGsiASQAIAEgAEEMajYCDCABQQxqEGUgAUEQaiQACw8AIABBqJQCNgIAIAAQIgsNACAAQaiUAjYCACAACyoBAX8jAEEQayIBJAAgAEEcahAvGiAAKAIYIgAEQCAAECQLIAFBEGokAAsPACAAQYCUAjYCACAAECILDQAgAEGAlAI2AgAgAAsPACAAQdiTAjYCACAAECILDQAgAEHYkwI2AgAgAAuwAgEFfyMAQRBrIgEkACAAQRBqIgNBDGoCQCADKAIQIgBFDQAgACgCBA0AIAMoAgwhACADKAIUGiABQQA2AgggAUIANwIAIAEgATYCDCABQQxqIAAQ0gQgASgCBCICIAEoAgBHBEADQCACQQRrKAIAIQAgAkEIayIEKAIAIQIgBEIANwIAIAEgBBAvNgIEAkAgAEUNAAJAIAAoAgQNACACKAIQIgRFDQAgBCgCBA0AIAIoAhQaIAFBDGogAigCDBDSBAsgACAAKAIEIgJBAWs2AgQgAg0AIAAgACgCACgCCBEAACAAECQLIAEoAgQiAiABKAIARw0ACwsgASABNgIMIAFBDGoQZQsgA0GAAWoQLxogA0EUahAvGhAvGiADKAIIIgAEQCAAECQLIAFBEGokAAsPACAAQbCTAjYCACAAECILDQAgAEGwkwI2AgAgAAv0AgEHfyMAQdAAayIHJAAgB0EANgJIIAIEQCAHIAI2AjwgB0GMjwI2AjggByAHQThqNgJICyAHQQhqIgsgA0Ew/AoAACMAQeAAayIDJAAgASgCACICQgA3AgAgAkIFNwIIQagCECMiAkGgkAI2AgAgAkIANwIEQRAhCSACQRBqEDshCiADQcgAaiAHQThqIgwQVyEIIAEoAgAhASADQRBqIg0gC0Ew/AoAACAKIAggDSAEIAUgBiABEPsDAkAgCCgCECIBIAhHBEBBFCEJIAFFDQELIAEgASgCACAJaigCABEAAAsgAyACNgJEIAMgCjYCQCACIAIoAgRBAWo2AgQgAyADKQJANwMIIAAgA0EIahDmAiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANB4ABqJAACQCAMIAcoAkgiAEYEf0EQBSAARQ0BQRQLIQEgACAAKAIAIAFqKAIAEQAACyAHQdAAaiQAC1YBAn8jAEEQayICJAAjAEEQayIBJAAgASAAQRBqIgBBhAFqNgIIIAFBCGoQZSABIABB+ABqNgIMIAFBDGoQZSAAQfAAahAvGiABQRBqJAAgAkEQaiQACw8AIABBiJMCNgIAIAAQIgsNACAAQYiTAjYCACAACwQAQQELkgIBBH8jAEEQayIBJABBASEDAkAgACgCgAENAEEAIQMgAUEANgIMIAFCADcCBCABIAA2AgAgAUEEaiABED0gASgCBCICIAEoAggiAEcEQANAIABBBGsiACgCACEEIAEgADYCCAJAIAQoAoABBEAgA0EBaiEDDAELIAQoAhQaIAQoAgwiAigCACIAIAIoAgQiAkcEQANAAkAgACgCACIEIAQoAgAoAggRBABBA0YEQCADQQFqIQMMAQsgASAAKAIANgIAIAFBBGogARA9CyAAQQhqIgAgAkcNAAsLIAEoAgghACABKAIEIQILIAAgAkcNAAsLIAJFDQAgASACNgIIIAEoAgwaIAIQIgsgAUEQaiQAIAMLJQEBf0EDIQEgAC0AHCIAQQJNBH8gAEECdEGM+ABqKAIABSABCwvFIgMVfwF+DHwjAEGgAmsiBCQAIAEoAhQaAkACQAJAIAEoAoABIgUEQCAAIAU2AgAgACABKAKEASIANgIEIAAEQ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QCIgVFDQAgBSAFKAIEIgNBAWs2AgQgAw0AIAUgBSgCACgCCBEAACAFECQLIAdBAWoiByAGKAIEIAYoAgAiA2tBA3VJDQALCwJAIApFDQAgCiAKKAIEIgVBAWs2AgQgBQ0AIAogCigCACgCCBEAACAKECQLIAQoAvQBIgMgBCgC8AFHDQALCyAAIAEoAoABNgIAIAAgASgChAEiADYCBCAARQ0AIAAgACgCBEEBajYCBAsgBCAEQfABajYCACAEEGULIARBoAJqJAAPCxAmAAsQJgALwwQCBH8MfCMAQfABayIDJABBmAEQIyIGQbCTAjYCACAGQgA3AgQjAEEQayIFJAAgBkEQaiIEQgA3AgQgBEG0kgI2AgAgBUEANgIIIAVCADcCACAEQQxqIAUQ0wQgBSAFNgIMIAVBDGoQZSAEQgA3AyggBEKAgICAgICA+D83AyAgBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQgA3A4ABIAVBEGokACADQegBaiIFIAY2AgQgBSAENgIAIAUgBkEUaiAEEI8BIAMoAugBQQxqIgQgAUEMaiIFRwRAIAQgBRBeIARBCGogBUEIahBeCyABKwMgIQcgASsDKCEIIAErAzAhCSABKwM4IQogASsDQCELIAErA0ghDCABKwNQIQ0gASsDWCEOIAErA2AhDyABKwNoIRAgASsDcCERIAErA3ghEiADQoCAgICAgID4PzcDgAEgAyASOQN4IAMgETkDcCADIBA5A2ggA0IANwNgIAMgDzkDWCADIA45A1AgAyANOQNIIANCADcDQCADIAw5AzggAyALOQMwIAMgCjkDKCADQgA3AyAgAyAJOQMYIAMgCDkDECADIAc5AwggA0GIAWoiBCACIANBCGoQ8AEgAygC6AEiAkEgaiAEQeAA/AoAACACIAEtABw6ABwgACACNgIAIAAgAygC7AE2AgQgA0HwAWokAAtnAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIFQgA3AgAgBUIONwIIIAJBCG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AgZ/AX4jAEEgayIDJAAgA0EANgIYIAIEQCADIAI2AgwgA0GUjQI2AgggAyADQQhqNgIYCyADQQhqIQcjAEHQAGsiAiQAIAJBxABqIAFBABArECoCQCACKAJEIgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEQRAhCCABQRBqIAQQNyEEIAIgATYCQCACIAQ2AjwgAkEgaiAHEFchBiMAQSBrIgEkACABIAY2AgwgAUGklQI2AgggASABQQhqIgU2AhggBCAFELsEAkAgBSABKAIYIgRGBH9BEAUgBEUNAUEUCyEFIAQgBCgCACAFaigCABEAAAsgAUEgaiQAAkAgBiAGKAIQIgFHBEBBFCEIIAFFDQELIAEgASgCACAIaigCABEAAAsgAkEQaiACQTxqEFkgAiACKQIQIgk3AhggAkIANwIQIAIgCTcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAigCQCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAIoAkgiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkHQAGokAAJAIAcgAygCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIANBIGokAAsGAEGIkgILFAAgAEEEakEAIAEoAgRB5PAARhsLCwAgAUHYkQI2AgALEQBBCBAjIgBB2JECNgIAIAALBgBByJECCxQAIABBBGpBACABKAIEQfvrAEYbCwsAIAFBkJECNgIACxEAQQgQIyIAQZCRAjYCACAAC5sDAgl/AXwjAEGQAWsiAyQAIANBhAFqIAIQlgUgA0EgakEAQeAA/AsAIANCgoCAgDA3AhggA0KAgICAEDcCECADQThqIQggAygChAEhCQNAIANBEGogBmooAgAhBCADQoCAgIAQNwIEIAkgBEEFdGohCiADQQI2AgwgA0EgakEwQcgAIARBAkYbaiELQQAhAgNAIAogA0EEaiACaigCACIHQQN0aisDACEMIANBIGohBQJAAkACQCAEDgICAAELIAghBQwBCyALIQULIAVBCEEQIAdBAUYbQQAgBxtqIAw5AwAgAkEEaiICQQxHDQALIAZBBGoiBkEQRw0ACyMAQSBrIgIkACACQRBqIAEQigEgAkEYaiACKAIQIgEgA0EgaiABKAIAKAIEEQMAIAIgAikCGDcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkEgaiQAIAMoAoQBIgAEQCADIAA2AogBIAMoAowBGiAAECILIANBkAFqJAALCwAgACABQQIQiAELCwAgACABQQEQiAELCwAgACABQQAQiAELDQAgACABIAJBAhDoAQsNACAAIAEgAkEBEOgBCw0AIAAgASACQQAQ6AELBgBBgJECCxQAIABBBGpBACABKAIEQefoAEYbC/0BAQN/IwBBgAFrIgMkACADIAEQ3wEjAEEgayIBJABBJBAjIgJCADcCDCACQYSWAjYCACACQgA3AgQgAkIANwIUIAJCADcCHCAAIAI2AgQgACACQQxqNgIAQagCECMiAkGgkAI2AgAgAkIANwIEIAJBEGogA0EAEJMDIQQgASACNgIQIAEgBDYCDCABQRRqIAFBDGoQ3AQgACABKAIUNgIIIAAgASgCGDYCDCABQgA3AhQCQCABKAIQIgJFDQAgAiACKAIEIgRBAWs2AgQgBA0AIAIgAigCACgCCBEAACACECQLIABCADcCECABQSBqJAAgAxCqASADQYABaiQACxUAIAFByJACNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQciQAjYCACABIAAoAgQ2AgQgAQsPACAAQaCQAjYCACAAECILDQAgAEGgkAI2AgAgAAvwEAITfwJ+IwBB0AFrIgMkACADQcgBaiICIAFBABArECoCQCADKALIASgCRCIEBEAgA0GwAWoiASAEEEYgAEEANgIIIABCADcCACAAIAEgAkEBEJYCIAEQKBoMAQsgA0GkAWogARCQAiICEJYBIQ0gAgRAIAKtIRYDQCANKAIAIBWnQQN0aiAVNwMAIBVCAXwiFSAWUg0ACwsgAygCyAEiBCgCXARAQQAhAgNAIAQoAlggAkECdGoiBSgCACIGIAVBeEEEIAJBA29BAkYbaigCACIFSARAIA0gBiAFEF8gAygCyAEhBAsgAkEBaiICIAQoAlxJDQALCyADQQA2AqABIANCADcCmAECQCANIANBmAFqEIwFIhNBAUYEQCAAQQEQkQMoAgAgARCjBAwBCwJAIAMoApwBIgQgAygCmAEiAkYNACAEIAJrIgQQJyEOIARFDQAgDiACIAT8CgAACyABEJACIQ8gAEEANgIIIABCADcCACATQQBKBEADQEGoAhAjIghBoJACNgIAIAhCADcCBCAIQRBqEDshBiAIIAMoAsgBIgIrAzA5A0AgCCACKwM4OQNIQQAhAiADQQA2ApABIANCADcCiAEgA0GIAWogDxAlIAMgDzYCjAEgAygCiAEiBSEEIA8EQANAIBAgDiACQQJ0aigCAEYEQCAEIAI2AgAgBEEEaiEECyACQQFqIgIgD0cNAAsLIANCADcDgAEgA0IANwN4IANCADcDcCADQgA3AyggA0IANwMwIANCADcDOCAIQdgAaiAEIAVrQQJ1IgQgA0EoahBnIANCADcDaCADQgA3A2AgA0IANwNYIANCADcDECADQgA3AxggA0IANwMgIAhBqAFqIAQgA0EQahBnQQAhAiADQYgBaiAEQQAQMSADKAKMASIEBEAgCCgCWCEKIAMoAsgBIgsoAkghDCADKAKIASEFA0AgCiACQRhsaiIHIAwgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACyAIKAKoASEKIAsoApgBIQtBACECA0AgCiACQRhsaiIHIAsgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACwtBACECIANBADYCUCADQgA3AkggA0HIAGogARC/ARAlIAMoAsgBIQcgARC/AQRAA0AgECAOIAcoAlggAkEMbGooAgBBAnRqKAIARgRAAkAgAygCTCIEIAMoAlAiBU8EQCADQcgAaiAFQQF0QYABIAUbECUgAygCSCADKAJMIgRBAnRqIAI2AgAMAQsgAygCSCAEQ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ggASkDCDcDICAIIAEpAwA3AxggASADKQMINwMIIAEgAykDADcDACADIAgpAyA3AwggAyAIKQMYNwMAIAFBEGoiASADQRBrIgNJDQALIAcoAjwhBiAHKAI4IQELIAdBOGohEQJAAkAgBygCQCILIAZLBEAgBiABKQMINwMIIAYgASkDADcDACAGQRBqIQYMAQsgBiABa0EEdSIGQQFqIgNBgICAgAFPDQsgCEEYakH/////ACALIAFrIgtBA3UiDyADIAMgD0kbIAtB8P///wdPGyAGIBEQMiIDKAIIIgYgASkDCDcDCCAGIAEpAwA3AwAgAyADKAIIQRBqNgIIIAMoAgQgBygCPCAHKAI4IgtrIgFrIQYgAQRAIAYgCyAB/AoAAAsgBygCOCEBIAcgBjYCOCADIAE2AgQgByADKAIIIgY2AjwgAyABNgIIIAcoAkAhCyAHIAMoAgw2AkAgAyABNgIAIAMgCzYCDCADEDYLIAcgBjYCPCAGIAcoAjgiA0EQaiIPayELIAMhASAGIA9HBEAgCwRAIAEgDyAL/AoAAAsgESgCACEBCyAHIAMgC2oiAzYCPCABIANHBEADQCABIAErAwCaOQMAIAEgASsDCJo5AwggAUEQaiIBIANHDQALCyAHIAogCRCzAiAJKAIAIgEEQCAJIAE2AgQgCSgCCBogARAiCyAIQTBqJAAMAAsMAQsjAEEgayIJJAAgB0GIAWohCwJAIAcoApgBRQRAIAcrAxAhAgwBCyAHIAsgDSAHQThqQQBBABD7ASICOQMQCwJAAkAgAplEEeotgZmXcT1lBEAgDSgCACEDAkAgBygCSCIBIAcoAkwiBkkEQCABIAMpAwg3AwggASADKQMANwMAIAFBEGohAwwBCyABIAdBxABqIggoAgAiEWtBBHUiD0EBaiIBQYCAgIABTw0MIAlBDGpB/////wAgBiARayIGQQN1IhEgASABIBFJGyAGQfD///8HTxsgDyAIEDIiASgCCCIGIAMpAwg3AwggBiADKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIGayIDayEIIAMEQCAIIAYgA/wKAAALIAcoAkQhBiAHIAg2AkQgASAGNgIEIAcgASgCCCIDNgJIIAEgBjYCCCAHKAJMIQggByABKAIMNgJMIAEgBjYCACABIAg2AgwgARA2CyAHIAM2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANQQBBABC3AgwCCyAHIA1BAEEARBgtRFT7IQlAELUCDAELIAcgDUEAQQAQtgILQQEhASANKAIEIA0oAgBrQQR1IhFBAWsiA0EBSwRAQQAhBgNAIAcgCiANIAEgBhC0AiABIgZBAWoiASADRw0ACwsgBygCOCEIIAMEQCADIQEDQCAIIAFBAWsiBkEEdGoiDysDACECIAggAUEEdGoiASAPKwMImjkDCCABIAKaOQMAIAYiAQ0ACwsgCCAIIANBBHRqIgEpAwg3AwggCCABKQMANwMAAkAgBygCmAFFBEAgBysDECECDAELIAcgCyANIAdBOGogAyADEPsBIgI5AxALAkAgAplEEeotgZmXcT1lBEAgDSgCACADQQR0aiEGAkAgBygCSCIBIAcoAkwiCEkEQCABIAYpAwg3AwggASAGKQMANwMAIAFBEGohBgwBCyABIAdBxABqIgsoAgAiD2tBBHUiFEEBaiIBQYCAgIABTw0MIAlBDGpB/////wAgCCAPayIIQQN1Ig8gASABIA9JGyAIQfD///8HTxsgFCALEDIiASgCCCIIIAYpAwg3AwggCCAGKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIIayIGayELIAYEQCALIAggBvwKAAALIAcoAkQhCCAHIAs2AkQgASAINgIEIAcgASgCCCIGNgJIIAEgCDYCCCAHKAJMIQsgByABKAIMNgJMIAEgCDYCACABIAs2AgwgARA2CyAHIAY2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANIAMgAxC3AgwCCyAHIA0gAyADRBgtRFT7IQlAELUCDAELIAcgDSADIAMQtgILIBFBAmsiAQRAA0AgByAKIA0gASADELQCIAEiA0EBayIBDQALCyAHKAJQIAdBxABqEHYgCUEgaiQADAALCyANQQxqIg0gCigCBEcNAAsLIA5BMGokACAHKAIABEAgBygCUCIBIAEoAgAQewsgCkEg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ogASgCACgCGBEBACACKAIoIgQgAigCLCIHRwRAIAIoAjQhAQNAIAQoAgAiAyAEKAIEIghHBEADQCABKwMAIQsgAyABKwMIOQMIIAMgCzkDACABQRBqIQEgA0EQaiIDIAhHDQALCyAEQQxqIgQgB0cNAAsLIAJBADYCFCACQgA3AgwgAkHYAGpBAEHoAPwLACACQgA3A1AgAkECNgJMIAJCADcCRCACQdwAakEAQTD8CwAgAkGQAWpBAEEk/AsAIAJBADYCyAEgAkIANwPAASACQQE6AL0BIAJBAToAtAEgAkKAgICAgICAoD43A9gBIAJCgICAgICAgNDBADcD0AEgAkH8mgI2AkAgAkFAayIBIAJBKGoiBxCbASACQQA2AugBIAJCADcC4AEgAUECQQIgAkEMaiIEIAJB4AFqIgMQ4gEgAiADNgLsASACQewBahApIAEQaRpBGBAjIgNBtJoCNgIAIANCADcCBCADQQxqIgggBBBbIAIgAzYCHCACIAg2AhggAiACKQIYNwMAIAAgAhBqIAIgBDYCQCABECkgAiAHNgJAIAEQKSACKAI0IgAEQCACIAA2AjggAigCPBogABAiCyACQfABaiQADAELEGYACwJAIAkgBigCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAZBIGokAAJAIAogBSgCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAVBIGokAAsMACABIAAoAgQREAALFQAgAUGMjwI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBjI8CNgIAIAEgACgCBDYCBCABCwYAQeyOAgsUACAAQQRqQQAgASgCBEGL5QBGGwtRAQF/IwBBIGsiBCQAIAMoAgAhAyABKAIAIAAoAgQhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQQhqIAMgABEDACAEQSBqJAALFQAgAUG0jgI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBtI4CNgIAIAEgACgCBDYCBCABCwYAQaSOAgsUACAAQQRqQQAgASgCBEHj4wBGGwuCAgEGfyMAQRBrIgIkACABKAIAIQcgASgCBC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CgICAgBA3AhQgAygCVCEFA0AgA0EUaiAEaigCACECIANCgICAgBA3AgwgBSACQRhsaiEGIANBIGpBEEEgIAJBAUYbQQAgAhtqIQdBACECA0AgB0EIQQAgA0EMaiACaigCACIIG2ogBiAIQQN0aisDADkDACACQQRqIgJBCEcNAAsgBEEEaiIEQQxHDQALIAAgASADQSBqEOABIAMoAlQiAARAIAMgADYCWCADKAJcGiAAECILIANB4ABqJAALNgECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgACgCABEFAEEYECMgBRAuIAUQKBogBEEgaiQACyoBAX8jAEEQayIDJAAgA0EIaiABIAIgACgCABEDACADKAIMIANBEGokAAthAQF/IwBBMGsiBCQAIAAoAgAhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQSBqIgIgASAEQQhqIAMgABEPACACEJQDIAQgAjYCLCAEQSxqEHogBEEwaiQACzUBAX8jAEEQayIDJAAgAyABIAIgACgCABEDACADEJQDIAMgAzYCDCADQQxqEHogA0EQaiQACzYBAX8jAEFAaiIGJAAgBiABIAIgAyAEIAUgACgCABEqAEHAABAjIAYQQCAGEEEaIAZBQGskAAsLACAAIAFBAhDFAgtfAQF/IwBB0ABrIgMkACAAKAIAIQAgAyACNgIMIANBnKACNgIIIANBEGoiAiABIANBCGogABEDAEHAABAjIAIQQCACEEEaIAMoAgwiAEEJTwRAIAAQAQsgA0HQAGokAAuBAgICfwF8IwBB4ABrIgMkACADQQhqIgQgASACIAAoAgARAwAgA0EwaiAEQSj8CgAAQQIhACADLQBQQQFGBEAjAEEQayIAJABB2J4CLQAAQQFxRQRAQQJBmIQCQQMQBiEBQdieAkEBOgAAQdSeAiABNgIAC0EgECMiASADKQNINwMYIAEgAykDQDcDECABIAMpAzg3AwggASADKQMwNwMAIAAgATYCCCAAQQA2AgRB1J4CKAIAQQBBACAAQQRqIABBCGoQBSEFIAAoAgQhASADIAX8AzYCXCADQZygAjYCWCABBEAgARAECyAAQRBqJAAgAygCXCEACyADQeAAaiQA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ACy8BAX8jAEFAaiIDJAAgACgCACEAIAEgAyACEEAiASAAEQEAIAEQQRogA0FAayQACzABAX8jAEEQayIEJAAgACgCACEAIAQgAzkDCCABIAIgBEEIaiAAEQYAIARBEGokAAvdAQMBfwF+AXwjAEEwayIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxAiBDcDICADIAMpAwg3AxhBAiEAIASnQQFxBEAjAEEQayIAJABBqJ4CLQAAQQFxRQRAQQJB6PwBQQMQBiEBQaieAkEBOgAAQaSeAiABNgIACyAAIAMrAxg5AwggAEEANgIEQaSeAigCAEEAQQAgAEEEaiAAQQhqEAUhBSAAKAIEIQEgAyAF/AM2AiwgA0GcoAI2AiggAQRAIAEQBAsgAEEQaiQAIAMoAiwhAAsgA0EwaiQAIAALMAEBfyMAQRBrIgQkACAAKAIAIQAgBCADOQMIIAEgAiAEQQhqIAARAwAgBEEQaiQACy4BAX8jAEEQayIDJAAgACgCACEAIAMgAjkDCCABIANBCGogABEBACADQRBqJAAL8wECAn8BfCMAQSBrIgMkACADQQhqIgQgASACIAAoAgARAwBBAiEAAkAgAy0AFEEBRw0AIwBBEGsiACQAQZyeAi0AAEEBcUUEQEECQfj6AUEDEAYhAUGcngJBAToAAEGYngIgATYCAAsgAEEMECMgBBA8NgIIIABBADYCBEGYngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgIcIANBnKACNgIYIAEEQCABEAQLIABBEGokACADKAIcIQAgAy0AFEEBRw0AIAMoAggiAUUNACADIAE2AgwgAygCEBogARAiCyADQSBqJAAgAAsNACAAIAEgAkECEMYCC0gBAX8jAEEQayIDJAAgACgCACEAIAEgA0EEaiACEDwiASAAEQEAIAEoAgAiAARAIAEgADYCBCABKAIIGiAAECILIANBEGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQZCeAi0AAEEB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IgEEQCADIAE2AsQBIAMoAsgBGiABECILIAkoAgAiAQRAIAMgATYCJCADKAIoGiABECILIAdBDGoiByAIRw0ACwsgA0EANgIQIANCADcCCCADQThqQQBB6AD8CwAgA0IANwMwIANBAjYCLCADQgA3AiQgA0E8akEAQTD8CwAgA0HwAGpBAEEk/AsAIANBADYCqAEgA0IANwOgASADQQE6AJ0BIANBAToAlAEgA0KAgICAgICAoD43A7gBIANCgICAgICAgNDBADcDsAEgA0H8mgI2AiAgA0EgaiIBIANBFGoQmwEgA0EANgLIASADQgA3AsABIAFBAkEDIAIgAkEDTxsiAkEAIAJBAWtBA0kbIANBCGoiBCADQcABaiICEOIBIAMgAjYCzAEgA0HMAWoQKSABEGkaQRgQIyICQbSaAjYCACACQgA3AgQgAkEMaiIFIAQQWyADIAI2AiQgAyAFNgIgIABBCGogARBOAkAgAygCJCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADIANBCGo2AsABIANBwAFqECkgAyADQRRqNgIgIANBIGoQKSADQdABaiQAC10AIAACfyABKAIEIAEoAgAiAWtBBXUgAksEQCAAIAEgAkEFdGoiASkDGDcDGCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDAEEBDAELIABBADoAAEEACzoAIAsQACAAKAIEIAAoAgBrQQV1C8cDAQV/AkAgACgCBCAAKAIAIgNrQQV1IgQgAUkEQCMAQSBrIgYkAAJAAkAgASAEayIEIAAoAggiBSAAKAIEIgNrQQV1TQRAIAAgBAR/IAMgBEEFdGohAANAIAMgAikDGDcDGCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQSBqIgMgAEcNAAsgAAUgAws2AgQMAQsgAyAAKAIAIgNrQQV1IgcgBGoiAUGAgIDAAE8NASAGQQxqQf///z8gBSADayIDQQR1IgUgASABIAVJGyADQeD///8HTxsgByAAEJYDIgEoAggiAyAEQQV0aiEEA0AgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMAN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gAiAAKAIAIAFBBnRqIgBHBEAgACgCABogAigCABogAEEIaiACQQhqEF4gAEEQaiACQRBqQTD8CgAAC0EBCzoAIAACfyABKAIEIAEoAgAiAWtBBnUgAksEQCAAIAEgAkEGdGoQQBpBAQwBCyAAQQA6AABBAAs6AEALtwIBBX8CQCAAKAIEIgMgACgCACIFa0EGdSIEIAFJBEAjAEEgayIFJAACQAJAIAEgBGsiASAAKAIIIgYgACgCBCIDa0EGdU0EQCAAIAEEfyADIAFBBnRqIQADQCADIAIQQEFAayIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIEa0EGdSIHIAFqIgNBgICAIE8NASAFQQxqQf///x8gBiAEayIEQQV1IgYgAyADIAZJGyAEQcD///8HTxsgByAAEKkBIgQoAggiAyABQQZ0aiEBA0AgAyACEEBBQGsiAyABRw0ACyAEIAE2AgggACAEEKcCIAQQpgILIAVBIGokAAwCCxAmAAsgASAESQRAIAMgBSABQQZ0aiIBRwRAA0AgASADQUBqEEEiA0cNAAsLIAAgATYCBAsLC78BAQV/AkAjAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABELQBQUBrIQEMAQsgAiAAKAIAIgRrQQZ1IgZBAWoiAkGAgIAgTw0BIAVBDGpB////HyADIARrIgNBBXUiBCACIAIgBEkbIANBwP///wdPGyAGIAAQqQEiAigCCCABELQBGiACIAIoAghBQGs2AgggACACEKcCIAAoAgQhASACEKYCCyAAIAE2AgQgBUEgaiQADAELECYACwssAQF/IwBBEGsiASQAIAAEQCABIAA2AgwgAUEMahCYAyAAECILIAFBEGokAAsGAEGE/gELFwAgACgCACABQQN0aiACKwMAOQMAQQELPQAgAAJ/IAEoAgQgASgCACIBa0EDdSACSwRAIAAgASACQQN0aisDADkDAEEBDAELIABBADoAAEEACzoACAvtGgQVfwZ8A30CfiMAQZABayINJAAgABAaNgIEIABBnKACNgIAIA1BEGoiCCABEN8BIwBBkARrIgIkACACQgA3AogCIAIgAkGIAmoiCjYChAIgAkH4AWog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AAIAQQlAUgBBCqASAEQYABaiQACwYAQaz4AQstACAAKAIAIAFBGGxqIgAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAQQELUwAgAAJ/IAEoAgQgASgCACIBa0EYbSACSwRAIAAgASACQRhsaiIBKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwBBAQwBCyAAQQA6AABBAAs6ABgLuwMBBX8CQCAAKAIEIAAoAgAiA2tBGG0iBCABSQRAIwBBIGsiBiQAAkACQCABIARrIgQgACgCCCIFIAAoAgQiA2tBGG1NBEAgACAEBH8gAyAEQRhsaiEAA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EYbSIHIARqIgFBq9Wq1QBPDQEgBkEMakGq1arVACAFIANrQRhtIgNBAXQiBSABIAEgBUkbIANB1arVKk8bIAcgABBkIgEoAggiAyAEQRhsaiEEA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICQWhtQRhsaiEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQjAELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQRhsajYCBAsLCwkAIAAgARDEAQsGAEG89gELIwAgACgCACABQQxsaiIAIAIoAgg2AgggACACKQIANwIAQQELSQAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsaiIBKAIINgIIIAAgASkCADcCAEEBDAELIABBADoAAEEACzoADAuoAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBDG0iByAEaiIBQdaq1aoBTw0BIAZBDGpB1arVqgEgBSADa0EMbSIDQQF0IgUgASABIAVJGyADQarVqtUATxsgByAAEGEiASgCCCIDIARBDGxqIQQDQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAkF0bUEMbGohAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABENYBCyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEMbGo2AgQLCwsJACAAIAEQnQULBgBBzPQBCxgAIAAoAgAgAUEGdGogAkHAAPwKAABBAQs+ACAAAn8gASgCBCABKAIAIgFrQQZ1IAJLBEAgACABIAJBBnRqQcAA/AoAAEEBDAELIABBADoAAEEACzoAQAuMAwEFfwJAIAAoAgQgACgCACIDa0EGdSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EGdU0EQCAAIAQEfyADIARBBnRqIQADQCADIAJBwAD8CgAAIANBQGsiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBBnUiByAEaiIBQYCAgCBPDQEgBkEMakH///8fIAUgA2siA0EFdSIFIAEgASAFSRsgA0HA////B08bIAcgABCpASIBKAIIIgMgBEEGdGohBANAIAMgAkHAAPwKAAAgA0FAayIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQqQILIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQZ0ajYCBAsLCwkAIAAgARCaAwsGAEHo8gELDwAgASAAKAIAaiACNwMACw0AIAEgACgCAGopAwALHgAgASAAKAIAaiIAIAIpAwg3AwggACACKQMANwMACyoBAX8gACgCACECQRAQIyIAIAEgAmoiASkDCDcDCCAAIAEpAwA3AwAgAAsHACAAEQwACwkAIAEgABEZAAsJACABIAARAAALCQAgASAAERsACwkAIAEgABEEAAtNAQF/IwBBEGsiAiQAIAIgATYCBCACQZygAjYCACACQQhqIAIgABEBACACKAIMIAJBADYCDCACKAIEIgFBCU8EQCABEAELIAJBEGokAAtIAQJ/IwBB0ABrIgYkACAGQQhqIgcgAkEw/AoAACAGQThqIgIgASAHIAMgBCAFIAARKQBBGBAjIAIQLiACECgaIAZB0ABqJAALMwECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgABEPAEEYECMgBRAuIAUQKBogBEEgaiQAC5QBAQJ/IwBBEGsiBCQAIARBBGogASACIAMgABEVAEEMECMiAEEANgIIIABCADcCACAEKAIIIgEgBCgCBCIDRwRAIAAgASADayIBQQxtEKMCIAAoAgQhBSABBEAgBSADIAH8CgAACyAAIAEgBWo2AgQLIAQoAgQiAQRAIAQgATYCCCAEKAIMGiABECILIARBEGokACAAC04BAX8jAEEwayIGJAAgBiAFKQMANwMIIAYgBSkDCDcDECAGQRhqIgUgASACIAMgBCAGQQhqIAARIwBBGBAjIAUQLiAFECgaIAZBMGokAAtSAQF/IwBBIGsiAyQAIAMgATYCBCADQZygAjYCACADQQhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIAMoAgQiAUEJTwRAIAEQAQsgA0EgaiQACy0BAn8jAEEgayIBJAAgAUEIaiICIAARAABBGBAjIAIQLiACECgaIAFBIGokAAsxAQJ/IwBBIGsiAyQAIANBCGoiBCABIAIgABEWAEEYECMgBBAuIAQQKBogA0EgaiQACzcBAn8jAEEgayIGJAAgBkEIaiIHIAEgAiADIAQgBSAAESQAQRgQIyAHEC4gBxAoGiAGQSBqJAALTwEBfyMAQTBrIgMkACADIAEpAwA3AwAgAyABKQMINwMIIAMgASkDEDcDECADQRhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIANBMGokAAtdAQN/IwBBIGsiBCQAIAEgACgCBCIGQQF1aiEBIAAoAgAhACAEQQhqIgUgASACIAMgBkEBcQR/IAEoAgAgAGooAgAFIAALEQ8AQRgQIyAFEC4gBRAoGiAEQSBqJAALXQEDfyMAQSBrIgQkACABIAAoAgQiBkEBdWohASAAKAIAIQAgBEEIaiIFIAEgAiADIAZBAXEEfyABKAIAIABqKAIABSAACxEFAEEYECMgBRAuIAUQKBogBEEgaiQACzkBAX8gASAAKAIEIgRBAXVqIQEgACgCACEAIAEgAiADIARBAXEEfyABKAIAIABqKAIABSAACxEmAAtXAQJ/IwBBMGsiAiQAIAEgACgCBCIDQQF1aiEBIAAoAgAhACACIAEgA0EBcQR/IAEoAgAgAGooAgAFIAALEQEAQTAQIyIAIAJBMPwKAAAgAkEwaiQAIAALWgECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBACACEJQDIAIgAjYCDCACQQxqEHogAkEQaiQAC18BA38jAEEgayIFJAAgASAAKAIEIgdBAXVqIQEgACgCACEAIAVBCGoiBiABIAIgAyAEIAdBAXEEfyABKAIAIABqKAIABSAACxEiAEEYECMgBhAuIAYQKBogBUEgaiQAC3oBAn8jAEEwayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIARBAXEEQCABKAIAIABqKAIAIQALIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGoiAiABIAMgABEDAEEYECMgAhAuIAIQKBogA0EwaiQAC10BA38jAEEgayIEJAAgASAAKAIEIgZBAXVqIQEgACgCACEAIARBCGoiBSABIAIgAyAGQQFxBH8gASgCACAAaigCAAUgAAsRJwBBGBAjIAUQLiAFECgaIARBIGokAAtbAQN/IwBBIGsiAyQAIAEgACgCBCIFQQF1aiEBIAAoAgAhACADQQhqIgQgASACIAVBAXEEfyABKAIAIABqKAIABSAACxELAEEYECMgBBAuIAQQKBogA0E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YCHA8LIAAgASgCACAEEHNFDQACQCABKAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQEgAUEBNgIgDwsgASACNgIUIAEgAzYCICABIAEoAihBAWo2AigCQCABKAIkQQFHDQAgASgCGEECRw0AIAFBAToANgsgAUEENgIsCwuIAgACQCAAIAEoAgggBBBzBEAgAiABKAIERw0BIAEoAhxBAUYNASABIAM2AhwPCyAAIAEoAgAgBBBzBEACQCABKAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQIgAUEBNgIgDwsgASADNgIgAkAgASgCLEEERg0AIAFBADsBNCAAKAIIIgAgASACIAJBASAEIAAoAgAoAhQRCAAgAS0ANUEBRgRAIAFBAzYCLCABLQA0RQ0BDAMLIAFBBDYCLAsgASACNgIUIAEgASgCKEEBajYCKCABKAIkQQFHDQEgASgCGEECRw0BIAFBAToANg8LIAAoAggiACABIAIgAyAEIAAoAgAoAhgRBwALC1YBA38jAEHQAGsiAiQAIAJBEGoiAyACQQRqIAEQPCIBIAARAQBBwAAQIyADEEAgAxBBGiABKAIAIgAEQCABIAA2AgQgASgCCBogABAiCyACQdAAaiQAC6gEAQV/IAAoAgQiAhCvAkEBaiIBECciAAR/An8gAUGABE8EQCABBEAgACACIAH8CgAACyAADAELIAAgAWohAwJAIAAgAnNBA3FFBEACQCAAQQNxRQRAIAAhAQwBCyABRQRAIAAhAQwBCyAAIQEDQCABIAItAAA6AAAgAkEBaiECIAFBAWoiAUEDcUUNASABIANJDQALCyADQXxxIQQCQCADQcAASQ0AIAEgBEFAaiIFSw0AA0AgASACKAIANgIAIAEgAigCBDYCBCABIAIoAgg2AgggASACKAIMNgIMIAEgAigCEDYCECABIAIoAhQ2AhQgASACKAIYNgIYIAEgAigCHDYCHCABIAIoAiA2AiAgASACKAIkNgIkIAEgAigCKDYCKCABIAIoAiw2AiwgASACKAIwNgIwIAEgAigCNDYCNCABIAIoAjg2AjggASACKAI8NgI8IAJBQGshAiABQUBrIgEgBU0NAAsLIAEgBE8NAQNAIAEg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AgAAAAMAAAAFAAAAAAAAAAUAAAACAAAAAwAAAAAAAAABAAAAAgAAAAQAAAABAAAAAwAAAAUAAAABAAAABQAAAAEAAAAAAAAABAAAAAMAAAAAAAAA////////////////////////////////////////////////////////////////AwAAAAQAAAABAAAA////////////////AwAAAAIAAAABAAAAAAAAAAQAAAACAAAA////////////////////////////////AgAAAAQAAAAAAAAAAQAAAAIAAAADAAAA////////////////AQAAAAQAAAADAAAA////////////////////////////////////////////////TlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEUzJF8wRlpOUzRfMTBTZXROb3JtYWxzRWlkRThGYWNlRWRnZWlFRUUATlN0M19fMjEwX19mdW5jdGlvbjZfX2Jhc2VJRlpOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGwxMFNldE5vcm1hbHNFaWRFOEZhY2VFZGdlaUVFRQBaTjhtYW5pZm9sZDhNYW5pZm9sZDRJbXBsMTBTZXROb3JtYWxzRWlkRTMkXzAATlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEUzJF8xRnZpUktaTlM0XzEwU2V0Tm9ybWFsc0VpZEU4RmFjZUVkZ2VSUzZfRUVFAE5TdDNfXzIxMF9fZnVuY3Rpb242X19iYXNlSUZ2aVJLWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEU4RmFjZUVkZ2VSUzVfRUVFAFpOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGwxMFNldE5vcm1hbHNFaWRFMyRfMQBOU3QzX18yMTBfX2Z1bmN0aW9uNl9fZnVuY0laWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDE0Q3JlYXRlVGFuZ2VudHNFaUVOSzMkXzBjbEVpRVVsaUVfRlpaTlM0XzE0Q3JlYX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AAgIwAABYCAAAXAgAAGAIAABkCAAAaAgAAGwIAABwCAAAdAgAAHgIAADR2AADNRgAAjIwAAAx2AABARwAADHYAAJpHAAAAAAAAyIwAAB8CAAAgAgAAIQIAACICAAAjAgAAJAIAACUCAAAmAgAAJwIAADR2AADIRwAA1IwAAAx2AABVSAAADHYAALpIAAAAAAAAEI0AACgCAAApAgAAKgIAACsCAAAsAgAALQIAAC4CAAAvAgAAMAIAADR2AAD4SAAAHI0AAAx2AACSSQAADHYAAP5JAAAAAAAASI0AADUCAAA2AgAANwIAAKABAAA4AgAANHYAAKBKAAD0cgAANHYAAOlKAAAUdwAAAAAAAFSNAAAzAgAAOQIAADoCAAAAAAAAhI0AADsCAAA8AgAANHYAAAxLAAAYjgAAAAAAAKyNAAA9AgAAPgIAAD8CAABAAgAAQQIAADR2AAAlSwAAuI0AAAx2AAA/SwAAAAAAAOyNAABCAgAAQwIAAEQCAABFAgAARgIAAEcCAABIAgAASQIAAEoCAAA0dgAAWEsAAPiNAAAMdgAA10sAAAx2AAAhTAAAAAAAABiOAAA7AgAATAIAAAx2AAByTAAAAAAAADCOAAA7AgAATQIAADR2AACPTAAAGI4AAAAgAACwlQEAQdCcAgt+oJIAALiSAADQkgAA6JIAAACTAAAYkwAAMJMAAEiTAABgkwAAeJMAAJCTAACokwAAwJMAANiTAADwkwAACJQAACCUAAA4lAAAUJQAAGiUAACAlAAAmJQAALCUAADIlAAA4JQAAPiUAAAQlQAAKJUAAECVAABYlQAAcJUAAIiV",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Bu&&Bu.tagName.toUpperCase()==="SCRIPT"&&Bu.src||new URL("standalone.min.js",document.baseURI).href).href}function J(ot){if(ot==te&&p)return new Uint8Array(p);if(g)return g(ot);throw"both async and sync fetching of the wasm failed"}async function oe(ot){if(!p)try{var rt=await u(ot);return new Uint8Array(rt)}catch{}return J(ot)}async function ie(ot,rt){try{var Ot=await oe(ot),an=await WebAssembly.instantiate(Ot,rt);return an}catch(Dn){d(`failed to asynchronously prepare wasm: ${Dn}`),W(Dn)}}async function ne(ot,rt,Ot){if(!ot&&!_(rt)&&!r)try{var an=fetch(rt,{credentials:"same-origin"}),Dn=await WebAssembly.instantiateStreaming(an,Ot);return Dn}catch(Xn){d(`wasm streaming compile failed: ${Xn}`),d("falling back to ArrayBuffer instantiation")}return ie(rt,Ot)}function le(){var ot={a:f1};return ot}async function ge(){function ot(Xn,oo){return ku=Xn.exports,ku=fm(ku),HC(ku),F(),ku}function rt(Xn){return ot(Xn.instance)}var Ot=le();if(n.instantiateWasm)return new Promise((Xn,oo)=>{n.instantiateWasm(Ot,(vo,Xo)=>{Xn(ot(vo))})});te??=j();var an=await ne(p,te,Ot),Dn=rt(an);return Dn}var _e=ot=>{for(;ot.length>0;)ot.shift()(n)},ue=[],fe=ot=>ue.push(ot),pe=[],ye=ot=>pe.push(ot);function Me(ot,rt="i8"){switch(rt.endsWith("*")&&(rt="*"),rt){case"i1":return C[ot>>>0];case"i8":return C[ot>>>0];case"i16":return x[ot>>>1>>>0];case"i32":return B[ot>>>2>>>0];case"i64":return M[ot>>>3>>>0];case"float":return Q[ot>>>2>>>0];case"double":return w[ot>>>3>>>0];case"*":return S[ot>>>2>>>0];default:W(`invalid type for getValue: ${rt}`)}}function ve(ot,rt,Ot="i8"){switch(Ot.endsWith("*")&&(Ot="*"),Ot){case"i1":C[ot>>>0]=rt;break;case"i8":C[ot>>>0]=rt;break;case"i16":x[ot>>>1>>>0]=rt;break;case"i32":B[ot>>>2>>>0]=rt;break;case"i64":M[ot>>>3>>>0]=BigInt(rt);break;case"float":Q[ot>>>2>>>0]=rt;break;case"double":w[ot>>>3>>>0]=rt;break;case"*":S[ot>>>2>>>0]=rt;break;default:W(`invalid type for setValue: ${Ot}`)}}class he{constructor(rt){this.excPtr=rt,this.ptr=rt-24}set_type(rt){S[this.ptr+4>>>2>>>0]=rt}get_type(){return S[this.ptr+4>>>2>>>0]}set_destructor(rt){S[this.ptr+8>>>2>>>0]=rt}get_destructor(){return S[this.ptr+8>>>2>>>0]}set_caught(rt){rt=rt?1:0,C[this.ptr+12>>>0]=rt}get_caught(){return C[this.ptr+12>>>0]!=0}set_rethrown(rt){rt=rt?1:0,C[this.ptr+13>>>0]=rt}get_rethrown(){return C[this.ptr+13>>>0]!=0}init(rt,Ot){this.set_adjusted_ptr(0),this.set_type(rt),this.set_destructor(Ot)}set_adjusted_ptr(rt){S[this.ptr+16>>>2>>>0]=rt}get_adjusted_ptr(){return S[this.ptr+16>>>2>>>0]}}var Qe=0;function Pe(ot,rt,Ot){ot>>>=0,rt>>>=0,Ot>>>=0;var an=new he(ot);throw an.init(rt,Ot),Qe=ot,Qe}var we=()=>W(""),Te={},Re=ot=>{for(;ot.length;){var rt=ot.pop(),Ot=ot.pop();Ot(rt)}};function Ee(ot){return this.fromWireType(S[ot>>>2>>>0])}var ke={},Ce={},Le={},Ye=class extends Error{constructor(rt){super(rt),this.name="InternalError"}},tt=ot=>{throw new Ye(ot)},At=(ot,rt,Ot)=>{ot.forEach(vo=>Le[vo]=rt);function an(vo){var Xo=Ot(vo);Xo.length!==ot.length&&tt("Mismatched type converter count");for(var Ti=0;Ti<ot.length;++Ti)Dt(ot[Ti],Xo[Ti])}var Dn=new Array(rt.length),Xn=[],oo=0;for(let[vo,Xo]of rt.entries())Ce.hasOwnProperty(Xo)?Dn[vo]=Ce[Xo]:(Xn.push(Xo),ke.hasOwnProperty(Xo)||(ke[Xo]=[]),ke[Xo].push(()=>{Dn[vo]=Ce[Xo],++oo,oo===Xn.length&&an(Dn)}));Xn.length===0&&an(Dn)},at=function(ot){ot>>>=0;var rt=Te[ot];delete Te[ot];var Ot=rt.rawConstructor,an=rt.rawDestructor,Dn=rt.fields,Xn=Dn.map(oo=>oo.getterReturnType).concat(Dn.map(oo=>oo.setterArgumentType));At([ot],Xn,oo=>{var vo={};for(var[Xo,Ti]of Dn.entries()){const ir=oo[Xo],Gs=Ti.getter,qr=Ti.getterContext,ps=oo[Xo+Dn.length],Ic=Ti.setter,lc=Ti.setterContext;vo[Ti.fieldName]={read:ka=>ir.fromWireType(Gs(qr,ka)),write:(ka,gn)=>{var bn=[];Ic(lc,ka,ps.toWireType(bn,gn)),Re(bn)},optional:ir.optional}}return[{name:rt.name,fromWireType:ir=>{var Gs={};for(var qr in vo)Gs[qr]=vo[qr].read(ir);return an(ir),Gs},toWireType:(ir,Gs)=>{for(var qr in vo)if(!(qr in Gs)&&!vo[qr].optional)throw new TypeError(`Missing field: "${qr}"`);var ps=Ot();for(qr in vo)vo[qr].write(ps,Gs[qr]);return ir!==null&&ir.push(an,ps),ps},readValueFromPointer:Ee,destructorFunction:an}]})},nt=ot=>{ot>>>=0;for(var rt="";;){var Ot=y[ot++>>>0];if(!Ot)return rt;rt+=String.fromCharCode(Ot)}},gt=class extends Error{constructor(rt){super(rt),this.name="BindingError"}},bt=ot=>{throw new gt(ot)};function Ct(ot,rt,Ot={}){var an=rt.name;if(ot||bt(`type "${an}" must have a positive integer typeid pointer`),Ce.hasOwnProperty(ot)){if(Ot.ignoreDuplicateRegistrations)return;bt(`Cannot register type '${an}' twice`)}if(Ce[ot]=rt,delete Le[ot],ke.hasOwnProperty(ot)){var Dn=ke[ot];delete ke[ot],Dn.forEach(Xn=>Xn())}}function Dt(ot,rt,Ot={}){return Ct(ot,rt,Ot)}var kt=(ot,rt,Ot)=>{switch(rt){case 1:return Ot?an=>C[an>>>0]:an=>y[an>>>0];case 2:return Ot?an=>x[an>>>1>>>0]:an=>E[an>>>1>>>0];case 4:return Ot?an=>B[an>>>2>>>0]:an=>S[an>>>2>>>0];case 8:return Ot?an=>M[an>>>3>>>0]:an=>k[an>>>3>>>0];default:throw new TypeError(`invalid integer width (${rt}): ${ot}`)}},it=function(ot,rt,Ot,an,Dn){ot>>>=0,rt>>>=0,Ot>>>=0,rt=nt(rt);const Xn=an===0n;let oo=vo=>vo;if(Xn){const vo=Ot*8;oo=Xo=>BigInt.asUintN(vo,Xo),Dn=oo(Dn)}Dt(ot,{name:rt,fromWireType:oo,toWireType:(vo,Xo)=>(typeof Xo=="number"&&(Xo=BigInt(Xo)),Xo),readValueFromPointer:kt(rt,Ot,!Xn),destructorFunction:null})};function Yt(ot,rt,Ot,an){ot>>>=0,rt>>>=0,rt=nt(rt),Dt(ot,{name:rt,fromWireType:function(Dn){return!!Dn},toWireType:function(Dn,Xn){return Xn?Ot:an},readValueFromPointer:function(Dn){return this.fromWireType(y[Dn>>>0])},destructorFunction:null})}var pn=ot=>({count:ot.count,deleteScheduled:ot.deleteScheduled,preservePointerOnDelete:ot.preservePointerOnDelete,ptr:ot.ptr,ptrType:ot.ptrType,smartPtr:ot.smartPtr,smartPtrType:ot.smartPtrType}),be=ot=>{function rt(Ot){return Ot.$$.ptrType.registeredClass.name}bt(rt(ot)+" instance already deleted")},et=!1,It=ot=>{},Bt=ot=>{ot.smartPtr?ot.smartPtrType.rawDestructor(ot.smartPtr):ot.ptrType.registeredClass.rawDestructor(ot.ptr)},mt=ot=>{ot.count.value-=1;var rt=ot.count.value===0;rt&&Bt(ot)},st=ot=>globalThis.FinalizationRegistry?(et=new FinalizationRegistry(rt=>{mt(rt.$$)}),st=rt=>{var Ot=rt.$$,an=!!Ot.smartPtr;if(an){var Dn={$$:Ot};et.register(rt,Dn,rt)}return rt},It=rt=>et.unregister(rt),st(ot)):(st=rt=>rt,ot),xt=()=>{let ot=Xe.prototype;Object.assign(ot,{isAliasOf(Ot){if(!(this instanceof Xe)||!(Ot instanceof Xe))return!1;var an=this.$$.ptrType.registeredClass,Dn=this.$$.ptr;Ot.$$=Ot.$$;for(var Xn=Ot.$$.ptrType.registeredClass,oo=Ot.$$.ptr;an.baseClass;)Dn=an.upcast(Dn),an=an.baseClass;for(;Xn.baseClass;)oo=Xn.upcast(oo),Xn=Xn.baseClass;return an===Xn&&Dn===oo},clone(){if(this.$$.ptr||be(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var Ot=st(Object.create(Object.getPrototypeOf(this),{$$:{value:pn(this.$$)}}));return Ot.$$.count.value+=1,Ot.$$.deleteScheduled=!1,Ot},delete(){this.$$.ptr||be(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),It(this),mt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||be(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const rt=Symbol.dispose;rt&&(ot[rt]=ot.delete)};function Xe(){}var Ze=(ot,rt)=>Object.defineProperty(rt,"name",{value:ot}),dt={},Ut=(ot,rt,Ot)=>{if(ot[rt].overloadTable===void 0){var an=ot[rt];ot[rt]=function(...Dn){return ot[rt].overloadTable.hasOwnProperty(Dn.length)||bt(`Function '${Ot}' called with an invalid number of arguments (${Dn.length}) - expects one of (${ot[rt].overloadTable})!`),ot[rt].overloadTable[Dn.length].apply(this,Dn)},ot[rt].overloadTable=[],ot[rt].overloadTable[an.argCount]=an}},Wt=(ot,rt,Ot)=>{n.hasOwnProperty(ot)?((Ot===void 0||n[ot].overloadTable!==void 0&&n[ot].overloadTable[Ot]!==void 0)&&bt(`Cannot register public name '${ot}' twice`),Ut(n,ot,ot),n[ot].overloadTable.hasOwnProperty(Ot)&&bt(`Cannot register multiple overloads of a function with the same number of arguments (${Ot})!`),n[ot].overloadTable[Ot]=rt):(n[ot]=rt,n[ot].argCount=Ot)},Xt=48,Jt=57,yn=ot=>{ot=ot.replace(/[^a-zA-Z0-9_]/g,"$");var rt=ot.charCodeAt(0);return rt>=Xt&&rt<=Jt?`_${ot}`:ot};function An(ot,rt,Ot,an,Dn,Xn,oo,vo){this.name=ot,this.constructor=rt,this.instancePrototype=Ot,this.rawDestructor=an,this.baseClass=Dn,this.getActualType=Xn,this.upcast=oo,this.downcast=vo,this.pureVirtualFunctions=[]}var kn=(ot,rt,Ot)=>{for(;rt!==Ot;)rt.upcast||bt(`Expected null or instance of ${Ot.name}, got an instance of ${rt.name}`),ot=rt.upcast(ot),rt=rt.baseClass;return ot},$n=ot=>{if(ot===null)return"null";var rt=typeof ot;return rt==="object"||rt==="array"||rt==="function"?ot.toString():""+ot};function ht(ot,rt){if(rt===null)return this.isReference&&bt(`null is not a valid ${this.name}`),0;rt.$$||bt(`Cannot pass "${$n(rt)}" as a ${this.name}`),rt.$$.ptr||bt(`Cannot pass deleted object as a pointer of type ${this.name}`);var Ot=rt.$$.ptrType.registeredClass,an=kn(rt.$$.ptr,Ot,this.registeredClass);return an}function Kt(ot,rt){var Ot;if(rt===null)return this.isReference&&bt(`null is not a valid ${this.name}`),this.isSmartPointer?(Ot=this.rawConstructor(),ot!==null&&ot.push(this.rawDestructor,Ot),Ot):0;(!rt||!rt.$$)&&bt(`Cannot pass "${$n(rt)}" as a ${this.name}`),rt.$$.ptr||bt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&rt.$$.ptrType.isConst&&bt(`Cannot convert argument of type ${rt.$$.smartPtrType?rt.$$.smartPtrType.name:rt.$$.ptrType.name} to parameter type ${this.name}`);var an=rt.$$.ptrType.registeredClass;if(Ot=kn(rt.$$.ptr,an,this.registeredClass),this.isSmartPointer)switch(rt.$$.smartPtr===void 0&&bt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:rt.$$.smartPtrType===this?Ot=rt.$$.smartPtr:bt(`Cannot convert argument of type ${rt.$$.smartPtrType?rt.$$.smartPtrType.name:rt.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:Ot=rt.$$.smartPtr;break;case 2:if(rt.$$.smartPtrType===this)Ot=rt.$$.smartPtr;else{var Dn=rt.clone();Ot=this.rawShare(Ot,bi.toHandle(()=>Dn.delete())),ot!==null&&ot.push(this.rawDestructor,Ot)}break;default:bt("Unsupported sharing policy")}return Ot}function rn(ot,rt){if(rt===null)return this.isReference&&bt(`null is not a valid ${this.name}`),0;rt.$$||bt(`Cannot pass "${$n(rt)}" as a ${this.name}`),rt.$$.ptr||bt(`Cannot pass deleted object as a pointer of type ${this.name}`),rt.$$.ptrType.isConst&&bt(`Cannot convert argument of type ${rt.$$.ptrType.name} to parameter type ${this.name}`);var Ot=rt.$$.ptrType.registeredClass,an=kn(rt.$$.ptr,Ot,this.registeredClass);return an}var Lt=(ot,rt,Ot)=>{if(rt===Ot)return ot;if(Ot.baseClass===void 0)return null;var an=Lt(ot,rt,Ot.baseClass);return an===null?null:Ot.downcast(an)},Ho={},Ao=(ot,rt)=>{for(rt===void 0&&bt("ptr should not be undefined");ot.baseClass;)rt=ot.upcast(rt),ot=ot.baseClass;return rt},qe=(ot,rt)=>(rt=Ao(ot,rt),Ho[rt]),vt=(ot,rt)=>{(!rt.ptrType||!rt.ptr)&&tt("makeClassHandle requires ptr and ptrType");var Ot=!!rt.smartPtrType,an=!!rt.smartPtr;return Ot!==an&&tt("Both smartPtrType and smartPtr must be specified"),rt.count={value:1},st(Object.create(ot,{$$:{value:rt,writable:!0}}))};function qt(ot){var rt=this.getPointee(ot);if(!rt)return this.destructor(ot),null;var Ot=qe(this.registeredClass,rt);if(Ot!==void 0){if(Ot.$$.count.value===0)return Ot.$$.ptr=rt,Ot.$$.smartPtr=ot,Ot.clone();var an=Ot.clone();return this.destructor(ot),an}function Dn(){return this.isSmartPointer?vt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rt,smartPtrType:this,smartPtr:ot}):vt(this.registeredClass.instancePrototype,{ptrType:this,ptr:ot})}var Xn=this.registeredClass.getActualType(rt),oo=dt[Xn];if(!oo)return Dn.call(this);var vo;this.isConst?vo=oo.constPointerType:vo=oo.pointerType;var Xo=Lt(rt,this.registeredClass,vo.registeredClass);return Xo===null?Dn.call(this):this.isSmartPointer?vt(vo.registeredClass.instancePrototype,{ptrType:vo,ptr:Xo,smartPtrType:this,smartPtr:ot}):vt(vo.registeredClass.instancePrototype,{ptrType:vo,ptr:Xo})}var Zt=()=>{Object.assign(nn.prototype,{getPointee(ot){return this.rawGetPointee&&(ot=this.rawGetPointee(ot)),ot},destructor(ot){this.rawDestructor?.(ot)},readValueFromPointer:Ee,fromWireType:qt})};function nn(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti,ir){this.name=ot,this.registeredClass=rt,this.isReference=Ot,this.isConst=an,this.isSmartPointer=Dn,this.pointeeType=Xn,this.sharingPolicy=oo,this.rawGetPointee=vo,this.rawConstructor=Xo,this.rawShare=Ti,this.rawDestructor=ir,!Dn&&rt.baseClass===void 0?an?(this.toWireType=ht,this.destructorFunction=null):(this.toWireType=rn,this.destructorFunction=null):this.toWireType=Kt}var zn=(ot,rt,Ot)=>{n.hasOwnProperty(ot)||tt("Replacing nonexistent public symbol"),n[ot].overloadTable!==void 0&&Ot!==void 0?n[ot].overloadTable[Ot]=rt:(n[ot]=rt,n[ot].argCount=Ot)},Nn=ot=>n0.get(ot),Co=(ot,rt,Ot=[],an=!1)=>{var Dn=Nn(rt),Xn=Dn(...Ot);function oo(vo){return ot[0]=="p"?vo>>>0:vo}return oo(Xn)},ei=(ot,rt,Ot=!1)=>(...an)=>Co(ot,rt,an,Ot),ro=(ot,rt,Ot=!1)=>{ot=nt(ot);function an(){if(ot.includes("p"))return ei(ot,rt,Ot);var Xn=Nn(rt);return Xn}var Dn=an();return typeof Dn!="function"&&bt(`unknown function pointer with signature ${ot}: ${rt}`),Dn};class To extends Error{}var yo=ot=>{var rt=BI(ot),Ot=nt(rt);return PA(rt),Ot},Ro=(ot,rt)=>{var Ot=[],an={};function Dn(Xn){if(!an[Xn]&&!Ce[Xn]){if(Le[Xn]){Le[Xn].forEach(Dn);return}Ot.push(Xn),an[Xn]=!0}}throw rt.forEach(Dn),new To(`${ot}: `+Ot.map(yo).join([", "]))};function On(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti,ir,Gs,qr){ot>>>=0,rt>>>=0,Ot>>>=0,an>>>=0,Dn>>>=0,Xn>>>=0,oo>>>=0,vo>>>=0,Xo>>>=0,Ti>>>=0,ir>>>=0,Gs>>>=0,qr>>>=0,ir=nt(ir),Xn=ro(Dn,Xn),vo&&=ro(oo,vo),Ti&&=ro(Xo,Ti),qr=ro(Gs,qr);var ps=yn(ir);Wt(ps,function(){Ro(`Cannot construct ${ir} due to unbound types`,[an])}),At([ot,rt,Ot],an?[an]:[],Ic=>{Ic=Ic[0];var lc,ka;an?(lc=Ic.registeredClass,ka=lc.instancePrototype):ka=Xe.prototype;var gn=Ze(ir,function(...lA){if(Object.getPrototypeOf(this)!==bn)throw new gt(`Use 'new' to construct ${ir}`);if(go.constructor_body===void 0)throw new gt(`${ir} has no accessible constructor`);var MA=go.constructor_body[lA.length];if(MA===void 0)throw new gt(`Tried to invoke ctor of ${ir} with invalid number of parameters (${lA.length}) - expected (${Object.keys(go.constructor_body).toString()}) parameters instead!`);return MA.apply(this,lA)}),bn=Object.create(ka,{constructor:{value:gn}});gn.prototype=bn;var go=new An(ir,gn,bn,qr,lc,Xn,vo,Ti);go.baseClass&&(go.baseClass.__derivedClasses??=[],go.baseClass.__derivedClasses.push(go));var Go=new nn(ir,go,!0,!1,!1),hr=new nn(ir+"*",go,!1,!1,!1),ia=new nn(ir+" const*",go,!1,!0,!1);return dt[ot]={pointerType:hr,constPointerType:ia},zn(ps,gn),[Go,hr,ia]})}var uo=(ot,rt)=>{for(var Ot=[],an=0;an<ot;an++)Ot.push(S[rt+an*4>>>2>>>0]);return Ot};function Oo(ot){for(var rt=1;rt<ot.length;++rt)if(ot[rt]!==null&&ot[rt].destructorFunction===void 0)return!0;return!1}function ko(ot,rt,Ot,an){var Dn=Oo(ot),Xn=ot.length-2,oo=[],vo=["fn"];rt&&vo.push("thisWired");for(var Xo=0;Xo<Xn;++Xo)oo.push(`arg${Xo}`),vo.push(`arg${Xo}Wired`);oo=oo.join(","),vo=vo.join(",");var Ti=`return function (${oo}) {
`;Dn&&(Ti+=`var destructors = [];
`);var ir=Dn?"destructors":"null",Gs=["humanName","throwBindingError","invoker","fn","runDestructors","fromRetWire","toClassParamWire"];rt&&(Ti+=`var thisWired = toClassParamWire(${ir}, this);
`);for(var Xo=0;Xo<Xn;++Xo){var qr=`toArg${Xo}Wire`;Ti+=`var arg${Xo}Wired = ${qr}(${ir}, arg${Xo});
`,Gs.push(qr)}if(Ti+=(Ot||an?"var rv = ":"")+`invoker(${vo});
`,Dn)Ti+=`runDestructors(destructors);
`;else for(var Xo=rt?1:2;Xo<ot.length;++Xo){var ps=Xo===1?"thisWired":"arg"+(Xo-2)+"Wired";ot[Xo].destructorFunction!==null&&(Ti+=`${ps}_dtor(${ps});
`,Gs.push(`${ps}_dtor`))}return Ot&&(Ti+=`var ret = fromRetWire(rv);
return ret;
`),Ti+=`}
`,new Function(Gs,Ti)}function Ko(ot,rt,Ot,an,Dn,Xn){var oo=rt.length;oo<2&&bt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var vo=rt[1]!==null&&Ot!==null,Xo=Oo(rt),Ti=!rt[0].isVoid,ir=rt[0],Gs=rt[1],qr=[ot,bt,an,Dn,Re,ir.fromWireType.bind(ir),Gs?.toWireType.bind(Gs)],ps=2;ps<oo;++ps){var Ic=rt[ps];qr.push(Ic.toWireType.bind(Ic))}if(!Xo)for(var ps=vo?1:2;ps<rt.length;++ps)rt[ps].destructorFunction!==null&&qr.push(rt[ps].destructorFunction);var ka=ko(rt,vo,Ti,Xn)(...qr);return Ze(ot,ka)}var mi=function(ot,rt,Ot,an,Dn,Xn){ot>>>=0,Ot>>>=0,an>>>=0,Dn>>>=0,Xn>>>=0;var oo=uo(rt,Ot);Dn=ro(an,Dn),At([],[ot],vo=>{vo=vo[0];var Xo=`constructor ${vo.name}`;if(vo.registeredClass.constructor_body===void 0&&(vo.registeredClass.constructor_body=[]),vo.registeredClass.constructor_body[rt-1]!==void 0)throw new gt(`Cannot register multiple constructors with identical number of parameters (${rt-1}) for class '${vo.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return vo.registeredClass.constructor_body[rt-1]=()=>{Ro(`Cannot construct ${vo.name} due to unbound types`,oo)},At([],oo,Ti=>(Ti.splice(1,0,null),vo.registeredClass.constructor_body[rt-1]=Ko(Xo,Ti,null,Dn,Xn),[])),[]})},Fo=ot=>{ot=ot.trim();const rt=ot.indexOf("(");return rt===-1?ot:ot.slice(0,rt)},Nr=function(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti){ot>>>=0,rt>>>=0,an>>>=0,Dn>>>=0,Xn>>>=0,oo>>>=0;var ir=uo(Ot,an);rt=nt(rt),rt=Fo(rt),Xn=ro(Dn,Xn,Xo),At([],[ot],Gs=>{Gs=Gs[0];var qr=`${Gs.name}.${rt}`;rt.startsWith("@@")&&(rt=Symbol[rt.substring(2)]),vo&&Gs.registeredClass.pureVirtualFunctions.push(rt);function ps(){Ro(`Cannot call ${qr} due to unbound types`,ir)}var Ic=Gs.registeredClass.instancePrototype,lc=Ic[rt];return lc===void 0||lc.overloadTable===void 0&&lc.className!==Gs.name&&lc.argCount===Ot-2?(ps.argCount=Ot-2,ps.className=Gs.name,Ic[rt]=ps):(Ut(Ic,rt,qr),Ic[rt].overloadTable[Ot-2]=ps),At([],ir,ka=>{var gn=Ko(qr,ka,Gs,Xn,oo,Xo);return Ic[rt].overloadTable===void 0?(gn.argCount=Ot-2,Ic[rt]=gn):Ic[rt].overloadTable[Ot-2]=gn,[]}),[]})},Rs=[],ur=[0,1,,1,null,1,!0,1,!1,1];function zi(ot){ot>>>=0,ot>9&&--ur[ot+1]===0&&(ur[ot]=void 0,Rs.push(ot))}var bi={toValue:ot=>(ot||bt(`Cannot use deleted val. handle = ${ot}`),ur[ot]),toHandle:ot=>{switch(ot){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const rt=Rs.pop()||ur.length;return ur[rt]=ot,ur[rt+1]=1,rt}}}},Ar={name:"emscripten::val",fromWireType:ot=>{var rt=bi.toValue(ot);return zi(ot),rt},toWireType:(ot,rt)=>bi.toHandle(rt),readValueFromPointer:Ee,destructorFunction:null};function ws(ot){return ot>>>=0,Dt(ot,Ar)}var ds=(ot,rt,Ot)=>{switch(rt){case 1:return Ot?function(an){return this.fromWireType(C[an>>>0])}:function(an){return this.fromWireType(y[an>>>0])};case 2:return Ot?function(an){return this.fromWireType(x[an>>>1>>>0])}:function(an){return this.fromWireType(E[an>>>1>>>0])};case 4:return Ot?function(an){return this.fromWireType(B[an>>>2>>>0])}:function(an){return this.fromWireType(S[an>>>2>>>0])};default:throw new TypeError(`invalid integer width (${rt}): ${ot}`)}};function Et(ot){return ot===0?"object":ot===1?"number":"string"}function Gt(ot,rt,Ot,an,Dn){ot>>>=0,rt>>>=0,Ot>>>=0,rt=nt(rt);const Xn=Et(Dn);switch(Xn){case"object":{let Ti=function(){};Ti.values={},Dt(ot,{name:rt,constructor:Ti,valueType:Xn,fromWireType:function(ir){return this.constructor.values[ir]},toWireType:(ir,Gs)=>Gs.value,readValueFromPointer:ds(rt,Ot,an),destructorFunction:null}),Wt(rt,Ti);break}case"number":{var oo={};Dt(ot,{name:rt,keysMap:oo,valueType:Xn,fromWireType:Ti=>Ti,toWireType:(Ti,ir)=>ir,readValueFromPointer:ds(rt,Ot,an),destructorFunction:null}),Wt(rt,oo),delete n[rt].argCount;break}case"string":{var vo={},Xo={},oo={};Dt(ot,{name:rt,valuesMap:vo,reverseMap:Xo,keysMap:oo,valueType:Xn,fromWireType:function(ir){return this.reverseMap[ir]},toWireType:function(ir,Gs){return this.valuesMap[Gs]},readValueFromPointer:ds(rt,Ot,an),destructorFunction:null}),Wt(rt,oo),delete n[rt].argCount;break}}}var Rt=(ot,rt)=>{var Ot=Ce[ot];return Ot===void 0&&bt(`${rt} has unknown type ${yo(ot)}`),Ot};function Ht(ot,rt,Ot){ot>>>=0,rt>>>=0;var an=Rt(ot,"enum");switch(rt=nt(rt),an.valueType){case"object":{var Dn=an.constructor,Xn=Object.create(an.constructor.prototype,{value:{value:Ot},constructor:{value:Ze(`${an.name}_${rt}`,function(){})}});Dn.values[Ot]=Xn,Dn[rt]=Xn;break}case"number":{an.keysMap[rt]=Ot;break}case"string":{an.valuesMap[rt]=Ot,an.reverseMap[Ot]=rt,an.keysMap[rt]=rt;break}}}var Qt=(ot,rt)=>{switch(rt){case 4:return function(Ot){return this.fromWireType(Q[Ot>>>2>>>0])};case 8:return function(Ot){return this.fromWireType(w[Ot>>>3>>>0])};default:throw new TypeError(`invalid float width (${rt}): ${ot}`)}},Nt=function(ot,rt,Ot){ot>>>=0,rt>>>=0,Ot>>>=0,rt=nt(rt),Dt(ot,{name:rt,fromWireType:an=>an,toWireType:(an,Dn)=>Dn,readValueFromPointer:Qt(rt,Ot),destructorFunction:null})};function _n(ot,rt,Ot,an,Dn,Xn,oo,vo){ot>>>=0,Ot>>>=0,an>>>=0,Dn>>>=0,Xn>>>=0;var Xo=uo(rt,Ot);ot=nt(ot),ot=Fo(ot),Dn=ro(an,Dn,oo),Wt(ot,function(){Ro(`Cannot call ${ot} due to unbound types`,Xo)},rt-1),At([],Xo,Ti=>{var ir=[Ti[0],null].concat(Ti.slice(1));return zn(ot,Ko(ot,ir,null,Dn,Xn,oo),rt-1),[]})}var qn=function(ot,rt,Ot,an,Dn){ot>>>=0,rt>>>=0,Ot>>>=0,rt=nt(rt);const Xn=an===0;let oo=Xo=>Xo;if(Xn){var vo=32-8*Ot;oo=Xo=>Xo<<vo>>>vo,Dn=oo(Dn)}Dt(ot,{name:rt,fromWireType:oo,toWireType:(Xo,Ti)=>Ti,readValueFromPointer:kt(rt,Ot,an!==0),destructorFunction:null})},En=(ot,rt,Ot)=>{const an=(Dn,Xn)=>{let oo=0;return{next(){if(oo>=Dn)return{done:!0};const vo=oo;return oo++,{value:Xn(vo),done:!1}},[Symbol.iterator](){return this}}};ot[Symbol.iterator]||(ot[Symbol.iterator]=function(){const Dn=this[rt]();return an(Dn,Xn=>this[Ot](Xn))})},Rn=function(ot,rt,Ot,an){ot>>>=0,rt>>>=0,Ot>>>=0,an>>>=0,Ot=nt(Ot),an=nt(an),At([],[ot,rt],Dn=>{const Xn=Dn[0];return En(Xn.registeredClass.instancePrototype,Ot,an),[]})};function Hn(ot,rt,Ot){ot>>>=0,Ot>>>=0;var an=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],Dn=an[rt];function Xn(oo){var vo=S[oo>>>2>>>0],Xo=S[oo+4>>>2>>>0];return new Dn(C.buffer,Xo,vo)}Ot=nt(Ot),Dt(ot,{name:Ot,fromWireType:Xn,readValueFromPointer:Xn},{ignoreDuplicateRegistrations:!0})}var Lo=Object.assign({optional:!0},Ar);function Io(ot,rt){ot>>>=0,Dt(ot,Lo)}var gi=(ot,rt,Ot,an)=>{if(Ot>>>=0,!(an>0))return 0;for(var Dn=Ot,Xn=Ot+an-1,oo=0;oo<ot.length;++oo){var vo=ot.codePointAt(oo);if(vo<=127){if(Ot>=Xn)break;rt[Ot++>>>0]=vo}else if(vo<=2047){if(Ot+1>=Xn)break;rt[Ot++>>>0]=192|vo>>6,rt[Ot++>>>0]=128|vo&63}else if(vo<=65535){if(Ot+2>=Xn)break;rt[Ot++>>>0]=224|vo>>12,rt[Ot++>>>0]=128|vo>>6&63,rt[Ot++>>>0]=128|vo&63}else{if(Ot+3>=Xn)break;rt[Ot++>>>0]=240|vo>>18,rt[Ot++>>>0]=128|vo>>12&63,rt[Ot++>>>0]=128|vo>>6&63,rt[Ot++>>>0]=128|vo&63,oo++}}return rt[Ot>>>0]=0,Ot-Dn},jo=(ot,rt,Ot)=>gi(ot,y,rt,Ot),oi=ot=>{for(var rt=0,Ot=0;Ot<ot.length;++Ot){var an=ot.charCodeAt(Ot);an<=127?rt++:an<=2047?rt+=2:an>=55296&&an<=57343?(rt+=4,++Ot):rt+=3}return rt},Ji=globalThis.TextDecoder&&new TextDecoder,wi=(ot,rt,Ot,an)=>{var Dn=rt+Ot;if(an)return Dn;for(;ot[rt]&&!(rt>=Dn);)++rt;return rt},Br=(ot,rt=0,Ot,an)=>{rt>>>=0;var Dn=wi(ot,rt,Ot,an);if(Dn-rt>16&&ot.buffer&&Ji)return Ji.decode(ot.subarray(rt,Dn));for(var Xn="";rt<Dn;){var oo=ot[rt++];if(!(oo&128)){Xn+=String.fromCharCode(oo);continue}var vo=ot[rt++]&63;if((oo&224)==192){Xn+=String.fromCharCode((oo&31)<<6|vo);continue}var Xo=ot[rt++]&63;if((oo&240)==224?oo=(oo&15)<<12|vo<<6|Xo:oo=(oo&7)<<18|vo<<12|Xo<<6|ot[rt++]&63,oo<65536)Xn+=String.fromCharCode(oo);else{var Ti=oo-65536;Xn+=String.fromCharCode(55296|Ti>>10,56320|Ti&1023)}}return Xn},gr=(ot,rt,Ot)=>(ot>>>=0,ot?Br(y,ot,rt,Ot):"");function oa(ot,rt){ot>>>=0,rt>>>=0,rt=nt(rt),Dt(ot,{name:rt,fromWireType(Ot){var an=S[Ot>>>2>>>0],Dn=Ot+4,Xn;return Xn=gr(Dn,an,!0),PA(Ot),Xn},toWireType(Ot,an){an instanceof ArrayBuffer&&(an=new Uint8Array(an));var Dn,Xn=typeof an=="string";Xn||ArrayBuffer.isView(an)&&an.BYTES_PER_ELEMENT==1||bt("Cannot pass non-string to std::string"),Xn?Dn=oi(an):Dn=an.length;var oo=G0(4+Dn+1),vo=oo+4;return S[oo>>>2>>>0]=Dn,Xn?jo(an,vo,Dn+1):y.set(an,vo>>>0),Ot!==null&&Ot.push(PA,oo),oo},readValueFromPointer:Ee,destructorFunction(Ot){PA(Ot)}})}var hs=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,Li=(ot,rt,Ot)=>{var an=ot>>>1,Dn=wi(E,an,rt/2,Ot);if(Dn-an>16&&hs)return hs.decode(E.subarray(an>>>0,Dn>>>0));for(var Xn="",oo=an;oo<Dn;++oo){var vo=E[oo>>>0];Xn+=String.fromCharCode(vo)}return Xn},ys=(ot,rt,Ot)=>{if(Ot??=2147483647,Ot<2)return 0;Ot-=2;for(var an=rt,Dn=Ot<ot.length*2?Ot/2:ot.length,Xn=0;Xn<Dn;++Xn){var oo=ot.charCodeAt(Xn);x[rt>>>1>>>0]=oo,rt+=2}return x[rt>>>1>>>0]=0,rt-an},dr=ot=>ot.length*2,cA=(ot,rt,Ot)=>{for(var an="",Dn=ot>>>2,Xn=0;!(Xn>=rt/4);Xn++){var oo=S[Dn+Xn>>>0];if(!oo&&!Ot)break;an+=String.fromCodePoint(oo)}return an},vA=(ot,rt,Ot)=>{if(rt>>>=0,Ot??=2147483647,Ot<4)return 0;for(var an=rt,Dn=an+Ot-4,Xn=0;Xn<ot.length;++Xn){var oo=ot.codePointAt(Xn);if(oo>65535&&Xn++,B[rt>>>2>>>0]=oo,rt+=4,rt+4>Dn)break}return B[rt>>>2>>>0]=0,rt-an},Yl=ot=>{for(var rt=0,Ot=0;Ot<ot.length;++Ot){var an=ot.codePointAt(Ot);an>65535&&Ot++,rt+=4}return rt};function H0(ot,rt,Ot){ot>>>=0,rt>>>=0,Ot>>>=0,Ot=nt(Ot);var an,Dn,Xn;rt===2?(an=Li,Dn=ys,Xn=dr):(an=cA,Dn=vA,Xn=Yl),Dt(ot,{name:Ot,fromWireType:oo=>{var vo=S[oo>>>2>>>0],Xo=an(oo+4,vo*rt,!0);return PA(oo),Xo},toWireType:(oo,vo)=>{typeof vo!="string"&&bt(`Cannot pass non-string to C++ string type ${Ot}`);var Xo=Xn(vo),Ti=G0(4+Xo+rt);return S[Ti>>>2>>>0]=Xo/rt,Dn(vo,Ti+4,Xo+rt),oo!==null&&oo.push(PA,Ti),Ti},readValueFromPointer:Ee,destructorFunction(oo){PA(oo)}})}function ph(ot,rt,Ot,an,Dn,Xn){ot>>>=0,rt>>>=0,Ot>>>=0,an>>>=0,Dn>>>=0,Xn>>>=0,Te[ot]={name:nt(rt),rawConstructor:ro(Ot,an),rawDestructor:ro(Dn,Xn),fields:[]}}function Xh(ot,rt,Ot,an,Dn,Xn,oo,vo,Xo,Ti){ot>>>=0,rt>>>=0,Ot>>>=0,an>>>=0,Dn>>>=0,Xn>>>=0,oo>>>=0,vo>>>=0,Xo>>>=0,Ti>>>=0,Te[ot].fields.push({fieldName:nt(rt),getterReturnType:Ot,getter:ro(an,Dn),getterContext:Xn,setterArgumentType:oo,setter:ro(vo,Xo),setterContext:Ti})}var Bl=function(ot,rt){ot>>>=0,rt>>>=0,rt=nt(rt),Dt(ot,{isVoid:!0,name:rt,fromWireType:()=>{},toWireType:(Ot,an)=>{}})};function fc(ot,rt){ot>>>=0,rt>>>=0,ot=bi.toValue(ot),rt=bi.toValue(rt),ot.set(rt)}var Nd=[],il=ot=>{var rt=Nd.length;return Nd.push(ot),rt},Ul=(ot,rt)=>{for(var Ot=new Array(ot),an=0;an<ot;++an)Ot[an]=Rt(S[rt+an*4>>>2>>>0],`parameter ${an}`);return Ot},m_=(ot,rt,Ot)=>{var an=[],Dn=ot(an,Ot);return an.length&&(S[rt>>>2>>>0]=bi.toHandle(an)),Dn},ag={},Rd=ot=>{var rt=ag[ot];return rt===void 0?nt(ot):rt},mh=function(ot,rt,Ot){rt>>>=0;var an=8,[Dn,...Xn]=Ul(ot,rt),oo=Dn.toWireType.bind(Dn),vo=Xn.map(ps=>ps.readValueFromPointer.bind(ps));ot--;var Xo={toValue:bi.toValue},Ti=vo.map((ps,Ic)=>{var lc=`argFromPtr${Ic}`;return Xo[lc]=ps,`${lc}(args${Ic?"+"+Ic*an:""})`}),ir;switch(Ot){case 0:ir="toValue(handle)";break;case 2:ir="new (toValue(handle))";break;case 3:ir="";break;case 1:Xo.getStringOrSymbol=Rd,ir="toValue(handle)[getStringOrSymbol(methodName)]";break}ir+=`(${Ti})`,Dn.isVoid||(Xo.toReturnWire=oo,Xo.emval_returnValue=m_,ir=`return emval_returnValue(toReturnWire, destructorsRef, ${ir})`),ir=`return function (handle, methodName, destructorsRef, args) {
${ir}
}`;var Gs=new Function(Object.keys(Xo),ir)(...Object.values(Xo)),qr=`methodCaller<(${Xn.map(ps=>ps.name)}) => ${Dn.name}>`;return il(Ze(qr,Gs))};function mm(ot,rt){return ot>>>=0,rt>>>=0,ot=bi.toValue(ot),rt=bi.toValue(rt),ot==rt}function gu(ot,rt){return ot>>>=0,rt>>>=0,ot=bi.toValue(ot),rt=bi.toValue(rt),bi.toHandle(ot[rt])}function Ag(ot){ot>>>=0,ot>9&&(ur[ot+1]+=1)}function C0(ot,rt,Ot,an,Dn){return ot>>>=0,rt>>>=0,Ot>>>=0,an>>>=0,Dn>>>=0,Nd[ot](rt,Ot,an,Dn)}function FC(ot){return ot>>>=0,bi.toHandle(Rd(ot))}function O0(){return bi.toHandle({})}function __(ot){ot>>>=0;var rt=bi.toValue(ot);Re(rt),zi(ot)}function Qp(ot,rt,Ot){ot>>>=0,rt>>>=0,Ot>>>=0,ot=bi.toValue(ot),rt=bi.toValue(rt),Ot=bi.toValue(Ot),ot[rt]=Ot}var _1=()=>4294901760,tr=(ot,rt)=>Math.ceil(ot/rt)*rt,Vo=ot=>{var rt=_h.buffer.byteLength,Ot=(ot-rt+65535)/65536|0;try{return _h.grow(Ot),F(),1}catch{}};function wA(ot){ot>>>=0;var rt=y.length,Ot=_1();if(ot>Ot)return!1;for(var an=1;an<=4;an*=2){var Dn=rt*(1+.2/an);Dn=Math.min(Dn,ot+100663296);var Xn=Math.min(Ot,tr(Math.max(ot,Dn),65536)),oo=Vo(Xn);if(oo)return!0}return!1}var Td=(ot,rt)=>{if(da)for(var Ot=ot;Ot<ot+rt;Ot++){var an=Nn(Ot);an&&da.set(an,Ot)}},da,Zh=ot=>(da||(da=new WeakMap,Td(0,n0.length)),da.get(ot)||0),mf=[],LC=()=>mf.length?mf.pop():n0.grow(1),_f=(ot,rt)=>n0.set(ot,rt),_m=ot=>{const rt=ot.length;return[rt%128|128,rt>>7,...ot]},du={i:127,p:127,j:126,f:125,d:124,e:111},cg=ot=>_m(Array.from(ot,rt=>{var Ot=du[rt];return Ot})),Ug=(ot,rt)=>{var Ot=Uint8Array.of(0,97,115,109,1,0,0,0,1,..._m([1,96,...cg(rt.slice(1)),...cg(rt[0]==="v"?"":rt[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),an=new WebAssembly.Module(Ot),Dn=new WebAssembly.Instance(an,{e:{f:ot}}),Xn=Dn.exports.f;return Xn},Vc=(ot,rt)=>{var Ot=Zh(ot);if(Ot)return Ot;var an=LC();try{_f(an,ot)}catch(Xn){if(!(Xn instanceof TypeError))throw Xn;var Dn=Ug(ot,rt);_f(an,Dn)}return da.set(ot,an),an},ha=ot=>{da.delete(Nn(ot)),_f(ot,null),mf.push(ot)};if(xt(),Zt(),n.noExitRuntime&&n.noExitRuntime,n.print&&n.print,n.printErr&&(d=n.printErr),n.wasmBinary&&(p=n.wasmBinary),n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.preInit)for(typeof n.preInit=="function"&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.shift()();n.addFunction=Vc,n.removeFunction=ha;var BI,G0,PA,_h,n0;function HC(ot){BI=ot.K,G0=ot.M,PA=ot.N,_h=ot.I,n0=ot.L}var f1={l:Pe,C:we,q:at,z:it,G:Yt,j:On,i:mi,a:Nr,E:ws,x:Gt,d:Ht,y:Nt,c:_n,p:qn,m:Rn,h:Hn,n:Io,F:oa,w:H0,r:ph,k:Xh,H:Bl,u:fc,g:mh,b:zi,o:mm,B:gu,t:Ag,f:C0,s:FC,A:O0,e:__,v:Qp,D:wA};function fm(ot){ot=Object.assign({},ot);var rt=an=>Dn=>an(Dn)>>>0,Ot=an=>()=>an()>>>0;return ot.K=rt(ot.K),ot.M=rt(ot.M),ot._emscripten_stack_alloc=rt(ot._emscripten_stack_alloc),ot.emscripten_stack_get_current=Ot(ot.emscripten_stack_get_current),ot}function vp(){O();function ot(){n.calledRun=!0,!m&&(U(),f?.(n),n.onRuntimeInitialized?.(),Y())}n.setStatus?(n.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>n.setStatus(""),1),ot()},1)):ot()}var ku;return ku=await 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QhqEC8aIAAQLwsrAQJ/IAAoAgAiASgCACICBEAgASACEHsgACgCACIAKAIAIAAoAggaECILC/w9AxJ/HXwLfiMAQbACayIMJAAgDEIANwMIIAxCgICAgICAgPg/NwMAIAxCADcDECAMQgA3AxggDEIANwMoIAxCgICAgICAgPg/NwMgIAxCADcDMCAMQgA3AzggDEIANwNIIAxCgICAgICAgPg/NwNAIAxCADcDUCAMQgA3A1ggDEGYAmogAUEYaiIFIAwQygEgDCsDmAIgDCsDoAJiBEAgASgCDCELIwBBwAZrIgMkACADQgA3A/AEIANCgICAgICAgPg/NwPoBCADQgA3A/gEIANCADcDgAUgA0IANwOQBSADQoCAgICAgID4PzcDiAUgA0IANwOYBSADQgA3A6AFIANCADcDsAUgA0KAgICAgICA+D83A6gFIANCADcDuAUgA0IANwPABSADQaADaiAFIANB6ARqEMoBAkAgAysDoAMgAysDqANhBEAgDCALEDcaDAELIAwQOyEIIAsoAkQiAgRAIAggAjYCRAwBCyAFKQMAITEgBSkDCCEyIAUpAxAhMyAFKQMYITQgBSkDICE1IAUpAyghNiAFKQMwITcgBSkDOCE4IAUpA0AhOSAFKQNIITogBSkDUCE7IAMgBSkDWEL///////////8Ag0KAgICAgICA+P8AVDoA8wQgAyA7Qv///////////wCDQoCAgICAgID4/wBUOgDyBCADIDpC////////////AINCgICAgICAgPj/AFQ6APEEIAMgOUL///////////8Ag0KAgICAgICA+P8AVDoA8AQgAyA4Qv///////////wCDQoCAgICAgID4/wBUOgDvBCADIDdC////////////AINCgICAgICAgPj/AFQ6AO4EIAMgNkL///////////8Ag0KAgICAgICA+P8AVDoA7QQgAyA1Qv///////////wCDQoCAgICAgID4/wBUOgDsBCADIDRC////////////AINCgICAgICAgPj/AFQ6AOsEIAMgM0L///////////8Ag0KAgICAgICA+P8AVDoA6gQgAyAyQv///////////wCDQoCAgICAgID4/wBUOgDpBCADIDFC////////////AINCgICAgICAgPj/AFQ6AOgEAkACQCADLQDpBCADLQDoBHFFDQAgAy0A6gRBAX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wsgESAENgIMIAcLIQIgCiARKAIMIAIgExCCASARQRBqJAACQCAGKAIEIgIEQANAIAIiBigCACICDQAMAgsACwNAIAYgBigCCCIGKAIARw0ACwsgBiASRw0ACwsgDUEQaiQACwJAIAhBAGogC0YNACAIKALYASICBEAgAhAiCyAIQgA3AtgBIAggCygC3AEiAjYC4AEgCCACNgLcASACRQ0AIAggAkEEdCICECciBDYC2AEgAkUNACAEIAsoAtgBIAL8CgAACyAIIAsrAzA5AzAgCCALKwM4OQM4IAggCygCQDYCQCAIQYgBaiIOIAtBiAFqEJICIAggC0Ew/AoAACAIQdgAaiIJIAtB2ABqIg8Q7QIgCEHoAGoiByALQegAahDtAiAIQfgAaiIKIAtB+ABqEO0CIAsoArwBIQIgA0IANwOABCADQgA3A4gEIANCADcDkAQgA0IANwOYBCADIAMpA4AENwOgAiADIAMpA4gENwOoAiADIAMpA5AENwOwAiADIAMpA5gENwO4AiAIQbgBaiACIANBoAJqENoEIAhBfzYCyAEgCCgCzAEiAiAIQdABaiIERwRAA0AgAisDICEVIAIrAyghFCACKwMwIRcgAisDOCEbIAIrA0AhGCACKwNIIRYgAisDUCEZIAIrA1ghGiACKwNgIR4gAisDaCEfIAIrA3AhHCACKwN4ISAgA0KAgICAgICA+D83A+AFIAMgIDkD2AUgAyAcOQPQBSADIB85A8gFIANCADcDwAUgAyAeOQO4BSADIBo5A7AFIAMgGTkDqAUgA0IANwOgBSADIBY5A5gFIAMgGDkDkAUgAyAbOQOIBSADQgA3A4AFIAMgFzkD+AQgAyAUOQPwBCADIBU5A+gEIANBoANqIgYgBSADQegEahDwASACQSBqIAZB4AD8CgAAAkAgAigCBCIGBEADQCAGIgIoAgAiBg0ADAILAAsDQCACIAIoAggiAigCAEcNAAsLIAIgBEcNAAsLIAsoAkwhAiADQgA3A5gDIANCADcDkAMgA0IANwOIAyADQgA3A4gCIANCADcDkAIgA0IANwOYAiAIQcgAaiACIANBiAJqEGcgCygCrAEhAiADQgA3A/ACIANCADcD+AIgA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/AoAACAEQQFqIgQgCUcNAAsLIAdBMGokAAwBCyAIKAJcQQNJDQAgCEHoAWoiAiALQegBaiIEELkEIAJBEGogBEEQahC4BCACQSBqIARBIGoQtwQgA0EANgLwBCADQgA3AugEIANBADYC0AIgA0IANwLIAiAIIANB6ARqIANByAJqQQAQzwIgAyADKQLoBDcCwAIgAiADQcACahC2BCADKALIAiICBEAgAhAiCyADKALoBCICRQ0AIAIQIgsgA0HABmokAEGoAhAjIgJB2JMCNgIAIAJCADcCBCACQRBqIAwQowEhBCAMIAI2ApwCIAwgBDYCmAIgAUEMaiAMQZgCahBOAkAgDCgCnAIiAkUNACACIAIoAgQiBEEBazYCBCAEDQAgAiACKAIAKAIIEQAAIAIQJAsgDBA6GiABQgA3AyAgAUKAgICAgICA+D83AxggAUIANwMoIAFCADcDMCABQgA3A0AgAUKAgICAgICA+D83AzggAUIANwNIIAFCADcDUCABQgA3A2AgAUKAgICAgICA+D83A1ggAUIANwNoIAFCADcDcAsgACABKAIMNgIAIAAgASgCECIANgIEIAAEQCAAIAAoAgRBAWo2AgQLIAxBsAJqJAAL9QEBBH8jAEEQayIDJAAgACgCABogAQRAIAAoAggiAiACKAIAKAIMEQQAIQIgAUEANgIMIAFBADYCBCABIAIgAkEAR2siAjYCACABIAJBC2w2AggLAkAgACgCCCICIAIoAgAoAggRBABBA0YNACADQQhqIgIgAEEIaiIEKAIAIgUgASAFKAIAKAIAEQMAIAQgAhBOIAMoAgwiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgACgCCAJAIAAoAgwiAEUNACAAKAIEQX9HDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EQaiQAC7EEAQZ/IwBBIGsiAiQAIABBADYCTCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQcgAahBxIABB2ABqIgMQOCAAQegAahA4IABB+ABqEDggAxDvAiAAQQA2ApwBIABBmAFqEHEgAEEANgKsASAAQagBahBxIABBADYCvAEgAEG4AWoQkwEgAkIANwIIIAJBfzYCACACQgA3AhggAkIANwIQIAIgAkEIaiIENgIEIABBfzYCyAEgAEHMAWogACgC0AEQbyAAIAIoAgQ2AswBIAAgAigCCCIFNgLQASAAIAIoAgwiBjYC1AEgAEHQAWohAyAAQcgBaiEHAkAgBkUEQCAAIAM2AswBDAELIAUgAzYCCCACQgA3AgggAiAENgIECyACQQRqAkAgAiAHRwRAIAAoAtgBIgQEQCAEECILIAAgAigCEDYC2AEgACACKAIUNgLcASAAIAIoAhg2AuABDAELIAIoAhAiBEUNACAEECILIAJBADYCGCACQgA3AhAgAigCCBBvIAAoAugBIgMEQCADECILIABBADYC8AEgAEIANwPoASAAKAL4ASIDBEAgAxAiCyAAQQA2AoACIABCADcD+AEgACgCiAIiAwRAIAMQIgsgAEEANgKQAiAAQgA3A4gCIAAgATYCRCACQSBqJAALUgEEfyAAKAIAIQECQCAAKAIEIgNFBEAMAQsgA0ECdCIEECchAiAERQ0AIAIgASAE/AoAAAsgACABBH8gARAiIAAoAgQFIAMLNgIIIAAgAjYCAAuQAQECfyMAQRBrIgMkAEEkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcCCCAAIAI2AgQgACACQQxqNgIAIABCADcCECABKAIAGiAAQQhqIAFBCGoQXiADQQhqIAFBEGoQfyADIAMpAgg3AwAgAEEQaiADEOcCIANBEGokACAACzcBAn8CQCAAKAIEIgFFDQAgASABKAIEIgJBAWs2AgQgAg0AIAEgASgCACgCCBEAACABECQLIAALBgAgABAiC3IBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARAlIAEgACgCBCIEayIDQQBMDQAgACgCACAEQQJ0aiEEA0AgBCACNgIAIARBBGohBCADQQFLIANBAWshAw0ACwsgACABNgIEBEAgABAtCwtgACAAIAM2AhBBACEDIABB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ApgBIgEEQCABECILIABBADYCoAEgAEIANwOYASAAKAKIASIBBEAgARAiCyAAQQA2ApABIABCADcDiAEgAEH4AGoQSSAAQegAahBJIABB2ABqEEkgACgCSCIBBEAgARAiCyAAC7kCACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASAAC1UBAn8gAEEANgIIIABCADcCACABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQR1EI8DIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALoAIBBX8jAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABKAIANgIAIAJBBGohAQwBCyACIAAoAgAiBGtBAnUiBkEBaiICQYCAgIAETw0BIAVBDGpB/////wMgAyAEayIDQQF1IgQgAiACIARJGyADQfz///8HTxsgBiAAEEoiAigCCCIDIAEoAgA2AgAgAiADQQRqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFrIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACEFMLIAAgATYCBCAFQSBqJAAPCxAmAAvQAQIBfAF/IwBBEGsiAiQARAAAAAAAAPh/IQECQCAAvUL///////////8Ag0L/////////9/8AVg0ARAAAAAAAAAAAIQEgAEQAAAAAAAAAAGMEQCAAmhA+miEBDAELIACZRAAAAAAAgFZAIAJBDGoQpQNEGC1EVPshCUCiRAAAAAAAgGZAoyEAAkACQAJAAkAgAigCDEEEbw4EAAECAwQLIAAQqAEhAQwDCyAAEJcBIQEMAgsgABCoAZohAQwBCyAAEJcBmiEBCyACQRBqJAAgAQspACAAIAEoAgQgAhASIgEQGzYCBCAAQZygAjYCACABQQlPBEAgARABCwujAQEBf0EkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcDGCAAQoCAgICAgID4PzcDECAAQgA3AwggACACNgIEIAAgAkEMajYCACAAQgA3AyAgAEIANwMwIABCgICAgICAgPg/NwMoIABCADcDOCABKAIAGiAAQQhqIAFBCGoQXiAAQRBqIAFBEGpBMPwKAAAgAAsOACAAQQhqEC8aIAAQLwsCAAtyAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACAAIAEoAgA2AgggACABKAIEIgI2AgwgAgRAIAIgAigCBEEBajYCBAsgAEIANwIQIAEQLxoLVwEDfyAAKAIIIAFJBEAgAUEDdBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBA3QiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy0BAX8gACgCACIBBEAgACABNgIEIAAoAggaIAEQIiAAQQA2AgggAEIANwIACwuLAQEDfyMAQRBrIgMkAEGoAhAjIgJBoJACNgIAIAJCADcCBCACQRBqEDshBCACIAE2AlQgAyACNgIMIAMgBDYCCCACIAIoAgRBAWo2AgQgAyADKQIINwMAIAAgAxBIGiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANBEGokAAs+ACADBEAgACADEKMCIAAoAgQhAyABIAJHBEADQCADIAEQPEEMaiEDIAFBDGoiASACRw0ACwsgACADNgIECwt5AQJ/IwBBEGsiAyQAQSQQIyICQgA3AgwgAkGElgI2A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AzAiDSANRAAAAAAAAAAAYRshDQsgDSAOYgRAIAEoAgghAiADQQA2AgggA0IANwIAIAMgAigCACIEIAIoAgQiAiACIARrQQxtEEcgASsDOCERIAErAzAhEiABKwMoIQ0gASsDECEOIAErAyAhDyABKwMYIRAgA0EANgIUIANCADcCDCADQQxqIAMoAgQgAygCAGtBDG0QViADKAIAIgQgAygCBCIJRwRAIBAgD6IhEyAOIA2iIRQDQCADQSRqIAQQPCEFIANBGGogAygCKCICIAUoAgAiBmtBBHUiCBCSAyEHIAIgBkcEQCAHKAIAIQYgBSgCACEKQQAhAgNAIAYgCCACQX9zaiACIBMgFGQbQQR0aiILIBEgECAKIAJBBHRqIgwrAwAiFaIgDSAMKwMIIhaioKA5AwggCyASIA4gFaIgDyAWoqCgOQMAIAJBAWoiAiAIRw0ACwsgA0EMaiAHEHYgBygCACICBEAgAyACNgIcIAMoAiAaIAIQIgsgBSgCACICBEAgAyACNgIoIAMoAiwaIAIQIgsgBEEMaiIEIAlHDQALC0EYECMiAkG0mgI2AgAgAkIANwIEIAJBDGoiBCADQQxqEFsgAyACNgIoIAMgBDYCJCABQQhqIANBJGoQTgJAIAMoAigiAkUNACACIAIoAgQiBEEBazYCBCAEDQAgAiACKAIAKAIIEQAAIAIQJAsgAyADQQxqNgIYIANBGGoiAhApIAMgAzYCGCACECkgAUKAgICAgICA+D83AxAgAUIANwMgIAFCADcDGCABQoCAgICAgID4PzcDKCABQgA3AzggAUIANwMwCyAAIAEoAgg2AgAgACABKAIMIgA2AgQgAARAIAAgACgCBEEBajYCBAsgA0EwaiQAC0wBAX4gASkCACECIAFCADcCACAAKAIEIQEgACACNwIAAkAgAUUNACABIAEoAgQiAEEBazYCBCAADQAgASABKAIAKAIIEQAAIAEQJAsLjAECAn4CfyAAKAIAIAFBA3RqKAIAIAFHBEADQCAAKAIAIgQgBCABQQN0IgVqKQMAIgOnQQN0aikDACICpyEBIAJC/////w+DIANCgICAgHCDhCICIANSBEAgACgCACAFaiIEIAIgBC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AEgBCABIARjGyEBCyAIQRhqIgggCUcNAAsgACACOQMQIAAgAzkDCCAAIAE5AwBEAAAAAAAA8P8hAkQAAAAAAADw/yEDRAAAAAAAAPD/IQEDQCAHKwMQIQUgBysDCCEGIAcrAwAhBAJAIAEgAWIEQCAFIQIgBiEDIAQhAQwBCyAEIARiDQAgBSACIAIgBWMbIQIgBiADIAMgBmMbIQMgBCABIAEgBGMbIQELIAdBGGoiByAJRw0ACwwBCyAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDAEQAAAAAAADw/yECRAAAAAAAAPD/IQNEAAAAAAAA8P8hAQsgACACOQMoIAAgAzkDICAAIAE5AxhBACEHAkAgACkDAEL///////////8Ag0L/////////9/8AVg0AIAApAwhC////////////AINCgICAgICAgPj/AFoNACAAKQMQQv///////////wCDQoCAgICAgID4/wBaDQAgACkDGEL///////////8Ag0KAgICAgICA+P8AVCAAKQMgQv///////////wCDQoCAgICAgID4/wBUcSAAKQMoQv///////////wCDQoCAgICAgID4/wBUcSEHCyAHRQRAIABBABAsCwuDAQECf0GgARAjIQMjAEEQayICJAAgA0IANwIEIANBgJQCNgIAIAIgASgCADYCCCACIAEoAgQiATYCDCABBEAgASABKAIEQQFqNgIECyACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgAkEQaiQAIAAgAzYCBCAAIAE2AgAgACADQRRqIAEQjwELwAoCC38GfCMAQUBqIgMkACAAKAJcIQQgA0IANwM4IANCADcDMCADQgA3AyggA0IANwMAIANCADcDCCADQgA3AxAgAEGoAWogBEEDbiIGIAMQZwJAAkACQCAEQQJNBEAgBkEEdCEBDAELIAZBBHQQJyEIA0AgAkEEdCILIAAoAtgBakF/NgIMAkAgACgCWCACQQxsaiIFKAIAIglBAEgEQEQAAAAAAAAAACEMDAELIAAoAqgBIAJBGGxqIgEgACgCSCIHIAUoAgRBGGxqIgorAwAgByAJQRhsaiIJKwMAIgyhIg4gByAFKAIIQRhsaiIFKwMIIAk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ABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQJ1EPEBIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALYAAgACADNgIQQQAhAyAAQQA2AgwCQCABBEAgAUHWqtWqAU8NASABQQxsECMhAwsgACADNgIAIAAgAyACQQxsaiICNgIIIAAgAyABQQxsajYCDCAAIAI2AgQgAA8LEHIAC5cDAQR/IwBBQGoiAiQAIAAgACgCACIDQQhrKAIAIgVqIQQCQCADQQRrKAIAIgMoAgQgASgCBEYEQEEAIAQgBRshAAwBCyAAIAROBEAgAkIANwIUIAJBADYCECACIAE2AgwgAiAANgIIIAIgAzYCBCACQgA3AhwgAkIANwIkIAJCADcCLCACQQA2AjwgAkKBgICAgICAgAE3AjQgAyACQQRqIAQgBEEBQQAgAygCACgCFBEIACACKAIcDQELIAJCADcCFCACQQA2AhAgAkHk5gE2AgwgAiAANgIIIAIgATYCBCACQgA3AhwgAkIANwIkIAJCADcCLCACQgA3ADMgAkEANgI8IAJBAToAOyADIAJBBGogBEEBQQAgAygCACgCGBEHAEEAIQACQAJAIAIoAigOAgABAgsgAigCGEEAIAIoAiRBAUYbQQAgAigCIEEBRhtBACACKAIsQQFGGyEADAELIAIoAhxBAUcEQCACKAIsDQEgAigCIEEBRw0BIAIoAiRBAUcNAQsgAigCFCEACyACQUBrJAAgAAu1AQIEfwJ+IAEpAwghBiABKQMAIQcgACgCPCIEKAIQIgIoAhAhAwJAIAAgBCgCCEciBUUEQCAHIAIpAwBSDQEgBiACKQMIUg0BIAIPCyAHIAMpAwBSDQAgBiADKQMIUg0AIAMPC0EgECMiACABKQMINwMIIAAgASkDADcDACAAQQA2AhwgACAENgIYIAMgADYCFCAAIAM2AhAgACACNgIUIAIgADYCECAFRQRAIAQgADYCEAsgAAtgACAAIAM2AhBBACEDIABBADYCDAJAIAEEQCABQavVqtUATw0BIAFBGGwQIyEDCyAAIAM2AgAgACADIAJBGGxqIgI2AgggACADIAFBGGxqNgIMIAAgAjYCB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gCcBogARAiCyAAKAJcIgEEQCAAIAE2AmAgACgCZBogARAiCyAAKAJQIgEEQCAAIAE2AlQgACgCWBogARAiCyAAKAJAIgEEQCAAIAE2AkQgACgCSBogARAiCyAAKAI0IgEEQCAAIAE2AjggACgCPBogARAiCyADIABBJGo2AgwgAygCDCIBKAIAIgIEQCABIAIQvQMgAygCDCIBKAIAIAEoAggaECILIANBEGokACAAC40BAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgAEIANwMYIABCgICAgICAgPg/NwMQIABCADcDCCAAIAI2AgQgACACQQxqNgIAIABCADcDICAAQgA3AzAgAEKAgICAgICA+D83AyggAEIANwM4IABBCGogARBeIAEQLxoLBwAgABEOAAsYAQF/QQwQIyIAQQA2AgggAEIANwIAIAALIAAgACgCBCABEBIiACACKAIEEBUgAEEJTwRAIAAQAQsLSgECfyAAKAIEIgIgACgCCCIBRwRAA0AgACABQQhrIgE2AgggARAvGiACIAAoAggiAUcNAAsLIAAoAgAiAQRAIAAoAgwaIAEQIgsLHQAgAQRAIAAgASgCABBvIAAgASgCBBBvIAEQIgsL+wMBB38CQAJ/QQIgAUEBRg0AGiABIAEgAUEBa3FFDQAaIAEQ9gELIgMgACgCBCIBTQRAIAEgA00NASAAKAIMsyAAKgIQlY38ASECIAEgAyABQQNJIAFpQQFLcgR/IAIQ9gEFIAJBAUEgIAJBAWtna3QgAkECSRsLIgIgAiADSRsiA00NAQsgACEBAkACQCADBEAgA0GAgICABE8NASADQQJ0IgAQIyEFIAEoAgAhAiABIAU2AgAgAgRAIAEoAgQaIAIQIiABKAIAIQULIAEgAzYCBCAABEAgBUEAIAD8CwALIAEoAggiAEUNAiABQQhqIQEgACgCBCECAkAgA2kiBEEBTQRAIAIgA0EBa3EhAgwBCyACIANJDQAgAiADcCECCyAFIAJBAnRqIAE2AgAgACgCACIBRQ0CIANBAWshByAEQQFLIQgDQCABKAIEIQQCQCAIRQRAIAQgB3EhBAwBCyADIARLDQAgBCADcCEECwJAIAIgBEYEQCABIQAMAQsgBSAEQQJ0aiIGKAIARQRAIAYgADYCACABIQAgBCECDAELIAAgASgCADYCACABIAYoAgAoAgA2AgAgBigCACABNgIACyAAKAIAIgENAAsMAgsgASgCACEAIAFBADYCACAABEAgASgCBBogABAiCyABQQA2AgQMAQsQcgALCwtSAQR/IAAoAgAhAQJAIAAoAgQiA0UEQAwBCyADQRhsIgQQJyECIARFDQAgAiABIAT8CgAACyAAIAEEfyABECIgACgCBAUgAws2AgggACACNgIACx0BAX9BBBB0IgBBiO4BNgIAIABByO4BQe0CEAsAC3EBAX8gAkUEQCAAKAIEIAEoAgRGDwsgACABRgRAQQEPCwJAIAAoAgQiAi0AACIARSAAIAEoAgQiAS0AACIDR3INAANAIAEtAAEhAyACLQABIgBFDQEgAUEBaiEBIAJBAWohAiAAIANGDQALCyAAIANGCw4AIABB0ABqECdB0ABqCxsBAX8gAARAIAAoAgAiAQRAIAEQIgsgABAiCwuiAgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAEQPEEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIAEQPBogAiACKAIIQQxqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFBdG1BDGxqIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACENUBCyAAIAE2AgQgBUEgaiQADwsQJgALgQECAn8BfCMAQRBrIgMkAEHwngItAABBAXFFBEBBAUHYiwJBARAGIQRB8J4CQQE6AABB7J4CIAQ2AgALIANBADYCDEHsngIoAgAgASACIANBDGpBABAFIQUgAygCDCEBIAAgBfwDNgIEIABBnKACNgIAIAEEQCABEAQLIANBEGokAAuoAQEDfyMAQaACayIDJAACQAJAIAEoAgAiBCgCkAEiAkUEQCABKAIEIgEgASgCBEEBajYCBAwBCyACIAIoAgxBAWo2AgwgBCgCkAEhAiABKAIEIgEgASgCBEEBajYCBCACRQ0AIAItABBBAUcNACADQQhqEDsiAUEONgJEIAAgARCjAUEBOgCYAiABEDoaDAELIABBADoAmAIgAEEAOgAACyADQaACaiQAC5UCAQN/IAACfwJAIAEoAgQiBEUEQCABQQRqIgUhAgwBCyACKAIAIQYDQCAEIgIoAhAiBSAGSgRAIAQhBSAEKAIAIgQNAQwCC0EAIAUgBk4NAhogAigCBCIEDQALIAJBBGohBQtBiAEQIyIEIAMoAgAoAgA2AhAgBEEYakEAQfAA/AsAIARCADcDKCAEQoCAgICAgID4PzcDICAEQX82AhggBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQQA7AYABIAEgAiAFIAQQggFBAQs6AAQgACAENgIAC1YBBX8gACgCACICKAIAIgEEQCABIQMgAiEEIAIoAgQiBSABRwRAA0AgASAFQRhrECgiBUcNAAsgACgCACIEKAIAIQMLIAIgATYCBCAEKAIIGiADECILC0oBA38gACgCBCICIAFHBEADQCACQQxrIgQoAgAiAwRAIAJBCGsgAzYCACACQQRrKAIAGiADECILIAQiAiABRw0ACwsgACABNgIECwwAIAEgACgCABEEAAvzAgEFfyAAKAIEIAAoAgAiAmtBAnUiAyABSQRAIwBBIGsiBSQAAkACQAJAIAEgA2siAyAAKAIIIgQgACgCBCICa0ECdU0EQCAAIAMEfyADQQJ0IgAEQCACQQAgAPwLAAsgACACagUgAgs2AgQMAQsgAiAAKAIAIgJrQQJ1IgYgA2oiAUGAgICABE8NASAFQQxqQf////8DIAQgAmsiAkEBdSIEIAEgASAESRsgAkH8////B08bIAYgABBKIgEoAgghAiADQQJ0IgMEQCACQQAgA/wLAAsgASACIANqNgIIIAEoAgQgACgCBC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2AgggACABKAIMNgIMIAFCADcCCCAAIAEoAhA2AhAgACABKAIUNgIUIAFCADcCECAAC0UBAn8gACgCBCICIAAoAggiAUcEQCAAIAEgASACa0EYayICQRhwIAJrakEYazYCCAsgACgCACIBBEAgACgCDBogARAiCwuNAQECfCAAIAAQogFEEeotgZmXcT2iIgJEAAAAAAAA8L8gAkQAAAAAAADwv2QbIgJEAAAAAAAA8L8gAr1C////////////AINCgICAgICAgPj/AFQbIgI5AzAgAQRAIAAQogFEAAAAAAAAgD6iIgMgAiACIANjGyECCyAAIAIgACsDOCIDIAIgA2QbOQM4C4sDAQZ/IwBBIGsiAiQAQZiVAiIDIAMoAgAiA0EBajYCACACIAM2AgwgACADNgLIASAAKALcASEBIABB2AFqIgQgACgCXEEDbiIFEDkgACAFNgLcASABQRFJIAEgBUEBdE1yRQRAIAQQgwELIAAoAlwiAUEDbiEFIAFBA08EQCAEKAIAIQZBACEBA0AgBiABQQR0aiIEQX82AgggBCADNgIEIAQgAzYCACABQQFqIgEgBUcNAAsLIAAQ7gIhASAAQcwBaiIEIAAoAtABEG8gACAAQdABajYCzAEgAEIANwPQASACIAJBDGoiADYCFCACQRhqIAQgACACQRRqEHkgAigCGCIAQgA3AyggAEKAgICAgICA+D83AyAgACADNgIYIABCADcDMCAAQgA3AzggAEIANwNIIABCgICAgICAgPg/NwNAIABCADcDUCAAQgA3A1ggAEIANwNoIABCgICAgICAgPg/NwNgIABCADcDcCAAQgA3A3ggAEEAOgCAASAAIAE6AIEBIAJBIGokAAuLAQEBfwJAIAFFDQAgASgCBCIDBEAgAygCBEF/Rw0BCyAAKAIEIgAEQCAAIAAoAgRBAWo2AgQgACAAKAIIQQFqNgIIIAEoAgQhAwsgASAANgIEIAEgAjYCACADBEAgAxAkCyAARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwvHAwIBfwx8IwBB0ABrIgIkACABKwNAIQMgASsDECEEIAErAyghBSABKwMwIQYgASsDOCEHIAIgAS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C0QAAAAAAADwPyAARAAAAAAAAOA/oiIEoSIFRAAAAAAAAPA/IAWhIAShIAAgACAAIABEkBXLGaAB+j6iRHdRwRZswVa/oKJETFVVVVVVpT+goiACIAKiIAAgAETUOIi+6fqovaJExLG0vZ7uIT6gokStUpyAT36SvqCioKIgASADoqGgoAwDCyABIAEgAKIiAURJVVVVVVXFP6IgACADRAAAAAAAAOA/oiABIAAgAqIgAER81c9aOtnlPaJE65wriublWr6goiAAIABEff6xV+Mdxz6iRNVhwRmgASq/oKJEpvgQERERgT+goKKhoiADoaChmgwCC0QAAAAAAADwPyAARAAAAAAAAOA/oiIEoSIFRAAAAAAAAPA/IAWhIAShIAAgACAAIABEkBXLGaAB+j6iRHdRwRZswVa/oKJETFVVVVVVpT+goiACIAKiIAAgAETUOIi+6fqovaJExLG0vZ7uIT6gokStUpyAT36SvqCioKIgASADoqGgoJoMAQsgASABIACiIgFESVVVVVVVxT+iIAAgA0QAAAAAAADgP6IgASAAIAKiIABEfNXPWjrZ5T2iROucK4rm5Vq+oKIgACAARH3+sVfjHcc+okTVYcEZoAEqv6CiRKb4EBEREYE/oKCioaIgA6GgoQsgBkEQaiQAC5oCAQV/IAACfyAAKAIEIgIgACgCCEkEQCACIAEQiwFBGGoMAQsjAEEgayIFJAAgACgCBCAAKAIAIgNrQRhtIgRBAWoiAkGr1arVAE8EQBAmAAsgBUEMakGq1arVACAAKAIIIANrQRhtIgNBAXQiBiACIAIgBkkbIANB1arVKk8bIAQgABBkIgIoAgggARCLARogAiACKAIIQRhqNgIIIAAoAgAiASAAKAIEIgMgAigCBCADIAFrQWhtQRhsaiIDEKUCIAAoAgAhASAAIAM2AgAgAiABNgIEIAAgAigCCCIDNgIEIAIgATYCCCAAKAIIIQQgACACKAIMNgIIIAIgATYCACACIAQ2AgwgAhCkAiAFQSBqJAAgAws2AgQLPQECfyAAKAIEIgIgACgCCCIBRwRAIAAgASACIAFrQQdqQXhxajYCCAsgACgCACIBBEAgACgCDBogARAiCwvoAg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AAIAJBAnRqIAcgAkEMbGoiAigCADYCACACKAIIDAELIAFBAnQhDEF/IQEgACAMakF/NgIAIAUgDGpBADYCACAGIAxqQX82AgAgACACQQJ0akF/NgIAQQALNgIAIAYgC2ogATYCACAEQQFqIgQgCUcNAAsLIAMoAhQiAARAIAAQIgsgAygCJCIABEAgABAiCyADKAI0IgAEQCAAECILIANB0ABqJAALVwEDfyAAKAIIIAFJBEAgAUEwbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBMGwiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy4AIAApAwggASkDCFQgACgCACgCDCgCTCIAIAEoAgAoAgwoAkwiAUkgACABRhsLsAEBDHwgASsDSCEHIAErAzAhCCABKwMAIQkgASsDGCEKIAErA1AhCyABKwM4IQwgASsDCCENIAErAyAhDiAAIAIrAwAiAyABKwMQoiACKwMIIgQgASsDKKKgIAIrAxAiBSABKwNAoqAgAisDGCIGIAErA1iioDkDECAAIAMgDaIgBCAOoqAgBSAMoqAgBiALoqA5AwggACADIAmiIAQgCqKgIAUgCKKgIAYgB6KgOQMAC1oBA3wgACsDKJkiAiAAKwMQmSIBIAEgAmMbIgIgACsDIJkiASAAKwMImSIDIAEgA2QbIgEgASACYxsiAiAAKwMYmSIBIAArAwCZIgMgASADZBsiASABIAJjGwu9BwEDfyAAIAFByAD8CgAAIABBADYCUCAAQgA3A0ggACABKAJINgJIIAAgASgCTDYCTCAAIAEoAlA2AlAgAUEANgJQIAFCADcDSCAAQQA2AmAgAEIANwNYIAAgASgCZDYCZCABQQA2AmQgACABKAJYNgJYIAAgASgCXDYCXCAAIAEoAmA2AmAgAUEANgJgIAFCADcDWCAAQQA2AnAgAEIANwNoIAAgASgCdDYCdCABQQA2AnQgACABKAJoNgJoIAAgASgCbDYCbCAAIAEoAnA2AnAgAUEANgJwIAFCADcDaCAAQQA2AoABIABCADcDeCAAIAEoAoQBNgKEASABQQA2AoQBIAAgASgCeDYCeCAAIAEoAnw2AnwgACABKAKAATYCgAEgAUEANgKAASABQgA3A3ggAEEANgKQASAAQgA3A4gBIAAgASgCiAE2AogBIAAgASgCjAE2AowBIAAgASgCkAE2ApABIAFBADYCkAEgAUIANwOIASAAQQA2AqABIABCADcDmAEgACABKAKYATYCmAEgACABKAKcATYCnAEgACABKAKgATYCoAEgAUEANgKgASABQgA3A5gBIABBADYCsAEgAEIANwOoASAAIAEoAqgBNgKoASAAIAEoAqwBNgKsASAAIAEoArABNgKwASABQQA2ArABIAFCADcDqAEgAEEANgLAASAAQgA3A7gBIAAgASgCuAE2ArgBIAAgASgCvAE2ArwBIAAgASgCwAE2AsABIAFBADYCwAEgAUIANwO4ASAAIAEoAsgBNgLIASAAIAEoAswBNgLMASAAIAEoAtABIgM2AtABIAAgASgC1AEiBDYC1AEgAEHQAWohAgJAIARFBEAgACACNgLMAQwBCyADIAI2AgggAUIANwPQASABIAFB0AFqNgLMAQsgAEEANgLgASAAQgA3A9gBIAAgASgC2AE2AtgBIAAgASgC3AE2AtwBIAAgASgC4AE2AuABIAFBADYC4AEgAUIANwPYASAAQQA2AvABIABCADcD6AEgACABKALoATYC6AEgACABKALsATYC7AEgACABKALwATYC8AEgAUEANgLwASABQgA3A+gBIABBADYCgAIgAEIANwP4ASAAIAEoAvgBNgL4ASAAIAEoAvwBNgL8ASAAIAEoAoACNgKAAiABQQA2AoACIAFCADcD+AEgAEEANgKQAiAAQgA3A4gCIAAgASgCiAI2AogCIAAgASgCjAI2AowCIAAgASgCkAI2ApACIAFBADYCkAIgAUIANwOIAiAAC44BAgJ/AXwjAEEQayICJABB6J4CLQAAQQFxRQRAQQJByIsCQQMQBiEDQeieAkEBOgAAQeSeAiADNgIACyACIAEpAgA3AwggAkEANgIEQeSeAigCAEEAQQAgAkEEaiACQQhqEAUhBCACKAIEIQEgACAE/AM2AgQgAEGcoAI2AgAgAQRAIAEQBAsgAkEQaiQAC5oBAQV/IABCADcCBCAAKAIAIQMgAEEANgIAIAAgASgCBCIEEDMgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQUgASgCACEGA0AgBSACQRhsaiIAIAMgBiACQQJ0aigCAEEYbGoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAJBAWoiAiAERw0ACwwBCyADRQ0BCyADECILC4EBAQR/IABCADcCBCAAKAIAIQIgAEEANgIAIAAgASgCBCIEECUgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQAgASgCACEBA0AgACADQQJ0IgVqIAIgASAFaigCAEECdGooAgA2AgAgA0EBaiIDIARHDQALDAELIAJFDQELIAIQIgsL0gQBBH8gASAAIAFGIgM6AAwCQCADDQADQCABKAIIIgMtAAwNAQJAAkAgAygCCCICKAIAIgQgA0YEQAJAIAIoAgQiBUUNACAFLQAMDQAgA0EBOgAMIAIgACACRjoADCAFQQE6AAwMAgsCQCADKAIAIAFGBEAgAyEBDAELIAMgAygCBCIBKAIAIgA2AgQCQAJAAkAgAEUEQCABIAI2AggMAQsgACADNgIIIAMoAggiAigCACABIAI2AgggA0cNAQsgAiABNgIADAELIAIgATYCBAsgASADNgIAIAMgATYCCCABKAIIIgIoAgAhBAsgAUEBOgAMIAJBADoADCACIAQoAgQiADYCACAABEAgACACNgIICyAEIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAQ2AgAMAQsgACAENgIECyAEIAI2AgQgAiAENgIIDwsgBEUNASAELQAMDQEgA0EBOgAMIAIgACACRjoADCAEQQE6AAwLIAIhASAAIAJHDQEMAgsLAkAgAygCACIEIAFHBEAgAyEEDAELIAMgBCgCBCIANgIAIAAEQCAAIAM2AgggAygCCCECCyAEIAI2AggCQCACKAIAIANGBEAgAiAENgIADAELIAIgBDYCBAsgBCADNgIEIAMgBDYCCCAEKAIIIQILIARBAToADCACQQA6AAwgAiACKAIEIgEoAgAiADYCBCAABEAgACACNgIICyABIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAE2AgAMAQsgACABNgIECyABIAI2AgAgAiABNgIICwvgBQIFfAJ/IwBBEGs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QEgACEBA0AgASEAIAUhAQJAAkAgACgCACIHKAIAIgIpAwgiCyAAKAIEIggoAgAiBCkDCCIMUgRAIAsgDFMNAQwCCyACKQMAIAQpAwBXDQELQQAhBSABQQA2AgAgASECA0AgAEEANgIAIAIgBzYCACAFBEAgBRAiCwJAIAAgA0YEQCADIQAMAQsCQCAAQQRrIgQoAgAiBygCACICKQMIIgsgCCgCACIFKQMIIgxSBEAgCyAMUw0BDAILIAIpAwAgBSkDAFcNAQsgACgCACEFIAAhAiAEIQAMAQsLIAAoAgAhAiAAIAg2AgAgAkUNACACECILIAFBBGoiBSAGRw0ACwwBCyAAIANBAXYiBkECdCIIaiEHIAMgBUwEQCAAIAcgAiAGIAQQtQMgByABIAIgAyAGayAEIAhqIgIQtQMgCSADNgIMIAQgA0ECdGohBQJAIAQiASACIgNHBEADQCACIAVGBEAgASADRg0DA0AgASgCACEFIAFBADYCACAAKAIAIQIgACAFNgIAIAIEQCACECILIABBBGohACABQQRqIgEgA0cNAAsMAwsCQAJAAkAgASgCACIHKAIAIgYpAwgiCyACKAIAIggoAgAiCikDCCIMUgRAIAsgDFMNAQwCCyAGKQMAIAopAwBXDQELIAJBADYCACAAKAIAIQYgACAINgIAIAYEQCAGECILIAJBBGohAgwBCyABQQA2AgAgACgCACEGIAAgBzYCACAGBEAgBhAiCyABQQRqIQELIABBBGohACABIANHDQALCyACIAVGDQADQCACKAIAIQMgAkEANgIAIAAoAgAhASAAIAM2AgAgAQRAIAEQIgsgAEEEaiEAIAJBBGoiAiAFRw0ACwsgCUEMaiAEELQDDAELIAAgByACIAYgBCAFELABIAcgASACIAMgBmsiAyAEIAUQsAEgACAHIAEgAiAGIAMgBCAFELkCCyAJQRBqJAALHQECfyAAKAIEIAAoAgAiAmtBDG0EQCAAIAIQewsLFwAgAEHomgI2AgAgAEEEaiABENEEIAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRBAALSgAgACABKAIANgIAIAAgASgCBDYCBCABQgA3AwAgACABKAIINgIIIAAgASgCDDYCDCABQgA3AwggAEEQaiABQRBqQTD8CgAAIAALvAUCBX8CfCMAQSBrIgUkAAJAAkACQCACDgMCAgABCyABQRBrKwMAIAArAwhjRQ0BIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAUEYayIBKAIQNgIQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKAIYNgIQIAEgBSkDEDcDCCABIAUpAwg3AwAMAQsgAkGAAUwEQCAAIAFGDQEgAEEYaiIDIAFGDQEgACEEA0AgAyEGIAQrAyAiCiAEKwMIYwRAIAQoAighByADKwMAIQsgAyECA0ACQCACIAQiAygCEDYCECACIAMpAwg3AwggAiADKQMANwMAIAAgA0YEQCAAIQMMAQsgA0EYayEEIAMhAiAKIANBEGsrAwBjDQELCyADIAc2AhAgAyAKOQMIIAMgCzkDAAsgASAGIgRBGGoiA0cNAAsMAQsgAiACQQF2IgdrIQggACAHQRhsIglqIQYCQCACIARMBEAgACAGIAcgAxDPAyAGIAEgCCADIAlqIgEQzwMgAyACQRhsaiEEIAEhAgNAIAIgBEYEQCABIANGDQQDQCAAIAMoAhA2AhAgACADKQMINwMIIAAgAykDADcDACAAQRhqIQAgA0EYaiIDIAFHDQALDAQLAkAgAisDCCADKwMIYwRAIAAgAigCEDYCECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMoAhA2AhAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBiAHIAMgBBC1ASAGIAEgCCADIAQQtQEgACAGIAEgByAIIAMgBBDHAgwBCyACIARGDQADQCAAIAIoAhA2AhAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAFQSBqJAALwAUCBX8BfCMAQSBrIgUkAAJAAkACQCACDgMCAgABCyABQRhrIgErAwAgACsDAGNFDQEgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKA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gBCgCADYCACAAQQRqIQAgBEEEaiIEIAFHDQALDAILIAAgByACIAYgBCAFELkBIAcgASACIAggBCAFELkBIAAgByABIAIgBiAIIAQgBRDMAg8LIAMgBUYNAANAIAAgAygCADYCACAAQQRqIQAgA0EEaiIDIAVHDQALCwu+BAEEfwJAAkACQCADDgMCAgABCyACKAIAKAIAIgIgAUEEayIBKAIAIgNBAnRqKAIAIAIgACgCACIEQQJ0aigCAE8NASAAIAM2AgAgASAENgIADwsgA0GAAUwEQCAAIAFGDQEgAEEEaiIEIAFGDQEgAigCACgCACEGIAAhAwNAIAQiByECIAYgAygCBCIIQQJ0aiIJKAIAIAYgAygCACIFQQJ0aigCAEkEQANAAkAgAiAFNgIAIAAgAyIERgRAIAAhBAwBCyAEIQIgCSgCACAGIARBBGsiAygCACIFQQJ0aigCAEkNAQsLIAQgCDYCAAsgByIDQQRqIgQgAUcNAAsMAQsgAyADQQF2IgZrIQggACAGQQJ0IglqIQcCQCADIAVMBEAgACAHIAIgBiAEENsDIAcgASACIAggBCAJaiIBENsDIAQgA0ECdGohBSACKAIAIQcgASEDA0AgAyAFRwRAIAAgAygCACICIAQoAgAiBiAHKAIAIgggAkECdGooAgAgCCAGQQJ0aigCAEkiAhs2AgAgA0EEQQAgAhtqIQMgAEEEaiEAIAEgBEEAQQQgAhtqIgRHDQEMAwsLIAEgBEYNAgNAIAAgBCgCADYCACAAQQRqIQAgBEEEaiIEIAFHDQALDAILIAAgByACIAYgBCAFELoBIAcgASACIAggBCAFELoBIAAgByABIAIgBiAIIAQgBRDNAg8LIAMgBUYNAANAIAAgAygCADYCACAAQQRqIQAgA0EEaiIDIAVHDQALCwuJAQEGfAJAIAMgAisDACIFIAErAyAgACsDICIGoaIgAisDCCIHIAErAxggACsDGCIIoaKhIgmZZARAIAUgASgCPCIAKwMgIAahoiAHIAArAxggCKGioSIEmSADZA0BIAUgASgCOCIAKwMgIAahoiAHIAArAxggCKGioSIEmSADZA0BCyAJIQQLIAQLpgICDHwDfw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ICRw0ACwwBCyACIAJBAXYiB2shCCAAIAdBGGwiCWohBQJAIAIgBEwEQCAAIAUgByADEOAEIAUgASAIIAMgCWoiARDgBCADIAJBGGxqIQQgASECA0AgAiAERgRAIAEgA0YNBANAIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIABBGGohACADQRhqIgMgAUcNAAsMBAsCQAJAIAIrAwAiCiADKwMAIgtjRQRAIAogC2INASACKAIMIAMoAgxODQELIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBSAHIAMgBBDLASAFIAEgCCADIAQQywEgACAFIAEgByAIIAMgBBCCAwwBCyACIARGDQADQCAAIAIpAxA3AxAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAGQSBqJAALVgEDfyABIABrIgJBGG0hAwJAIAJBgRhOBEAgAyECA0AgAkEYbBBQIgQNAiACQQF2IgINAAsLIAAgASADQQBBABDLAQ8LIAAgASADIAQgAhDLASAEECILOAEBfyAABEAgACgCABDNASAAKAIEEM0BIAAoAhQiAQRAIAAgATYCGCAAKAIcGiABECILIAAQIgsL8gECCHwCfyABKwMAIQYgAisDACEHIAAgASsDCCIFIAMrAwgiCCACKwMIIgkgBaEiC5kgBCsDCCIKIAihIgyZYyIOGyAJIAogDhsgCCAFoSIFmSAKIAmhIgiZYyINGyALIAwgDhsgBSAIIA0bIAUgCKGjIgVEAAAAAAAAAAAgBb1C////////////AINCgICAgICAgPj/AFQbIgWioDkDCCAAIAYgByANGyAHIAahIAWioDkDACAAIAErAxAiBiACKwMQIgcgDRsgBSAHIAahoqA5AxAgACADKwMQIgYgBCsDECIHIA0bIAUgByAGoaKgOQMYC4UEAgZ/An0gAigCACEGIAACfwJAIAEoAgQiBEUNACABKAIAAn8gBEEBayAGcSAEaSIFQQFNDQAaIAYgBCAGSw0AGiAGIARwC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IgCyAOUQ0DIAIoAhQiCCkDCCAMUQRAIA4gCCkDAFMgCyAOV0YNBAsgAigCECICIARHDQELCyAHQQFxIAogDVVHBH8gAigCFCACIAUQhwEiAkUNAkEBIAZrIAYgByACQQBOc0EBcRsFIAYLDQQMBgsgDiACKAIUIggpAwAiD1MgCyAOVXENAiAOIA9XIAsgDllyRQRAQQEgBmshBgwDCyAIIAIgBRCHASIIDQELIAkhAgwFC0EBIAZrIAYgByAIQQBOc0EBcRshBiAFKQMIIQwLIAdBAXMhBwwBCwtBASECIAlBAUYNAwwBC0ECIQIgCUECRw0AQQAhAgwCCyAFKAIQIgUgAEcNAAsgA0EUaiAAELsDIANBCGogARC7A0EAIQICQCADKAIUIgQgAygCGCIBRg0AQQAhBQJAA0ACQAJAAkAgBCADQQhqELoDIgBBAWsOAgEAAgtBACECIAVBAkYNBCAAIQUgBEEQaiIEIAFHDQIMBAtBASECIAVBAUYNAyAAIQUgBEEQaiIEIAFHDQEMAgsgBEEQaiIEIAFHDQALQQAhAiAFQQFHDQELAn4gAygCFCICIAMoAhgiAEYEQEIAIQtCAAwBC0KAgICAgICAgIB/IQtC////////////ACENQv///////////wAhDEKAgICAgICAgIB/IQ8DQCACKQMIIgogCyAKIAtVGyELIAogDCAKIAxTGyEMIAIpAwAiCiAPIAogD1UbIQ8gCiANIAogDVMbIQ0gAkEQaiICIABHDQALIAsgDHxCAn8hCyANIA98QgJ/CyEKIAMgCzcDKCADIAo3AyAgA0EgaiADQQhqELoDQQFGIQILIAMoAggiAARAIAMgADYCDCADKAIQGiAAECILIAMoAhQiAEUNACADIAA2AhggAygCHBogABAiCyADQTBqJAAgAgvdAgEGfyMAQSBrIgYkAEHQABAjIgRBAEHQAPwLACAEIAAoAoQBIgEgACgCgAEiA2tBAnUiAjYCAAJAAkAgACgCiAEiBSABSwRAIAEgBDYCACABQQRqIQMMAQsgAkEBaiIBQYCAgIAETw0BIAZBDGpB/////wMgBSADayIDQQF1IgUgASABIAVJGyADQfz///8HT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cASIBQQFqNgLcASADKALYASABQQR0aiIBIAQpAxA3AgggASAEKQMINwIADAELIAMgCUEBajYC3AEgDiAJQQR0aiIJIAEpAgg3AgggCSABKQIANwIACwJAIAMoAqwBIglFDQAgAygCqAEiDCAFQRhsaiEBIAMoArABIgUgCU0EQCAEIAEpAxA3AxggBCABKQMINwMQIAQgASkDADcDCCARIAVBAXRBgAEgBRsQMyADIAMoAqwBIgFBAWo2AqwBIAMoAqgBIAFBGGxqIgEgBCkDGDcDECABIAQpAxA3AwggASAEKQMINwMADAELIAMgCUEBajYCrAEgDCAJQRhsaiIJIAEpAxA3AxAgCSABKQMINwMIIAkgASkDADcDAAsgAiAHRg0CIAMoAmghAgwDCyAFQXhBBCABQQNvQQJGG2ogCWooAgAiASAHRw0ACwsgAygCSCIFIApBGGxqIQECQCADKAJMIgkgAygCUCICTwRAIAQgASkDEDcDGCAEIAEpAwg3AxAgBCABKQMANwMIIANByABqIAJBAXRBgAEgAhsQMyADIAMoAkwiAUEBajYCTCADKAJIIAFBGGxqIgEgBCkDGDcDECABIAQpAxA3AwggASAEKQMINwMADAELIAMgCUEBajYCTCAFIAlBGGxqIgIgASkDEDcDECACIAEpAwg3AwggAiABKQMANwMACwJAIAMoApwBIgJFDQAgAygCmAEiDCAKQRhsaiEBIAMoAqABIgUgAk0EQCAEIAEpAxA3AxggBCABKQMINwMQIAQgASkDADcDCCADQZgBaiAFQQF0QYABIAUbEDMgAyADKAKcASIBQQFqNgKcASADKAKYASABQRhsaiIBIAQpAxg3AxAgASAEKQMQNwMIIAEgBCkDCDcDAAwBCyADIAJBAWo2ApwBIAwgAkEYbGoiAiABKQMQNwMQIAIgASkDCDcDCCACIAEpAwA3AwALIAMoAlghBSADKAJoIQIgCCEBA0AgBUF+QQEgAiABQQJ0aigCACIBQQNvQQJGGyABaiIBQQJ0IgxqIAk2AgAgBUF4QQQgAiAMaigCACIMQQNvQQJGG2ogDEECdGogCTYCACABIAhHDQALCwJAAkAgAkF+QQEgAiAHQ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QQ92IABzIANBEGokAAuoAQACQCABQYAITgRAIABEAAAAAAAA4H+iIQAgAUH/D0kEQCABQf8HayEBDAILIABEAAAAAAAA4H+iIQBB/RcgASABQf0XTxtB/g9rIQEMAQsgAUGBeEoNACAARAAAAAAAAGADoiEAIAFBuHBLBEAgAUHJB2ohAQwBCyAARAAAAAAAAGADoiEAQfBoIAEgAUHwaE0bQZIPaiEBCyAAIAFB/wdqrUI0hr+iCwoAIAAgABCnA6ILQwAgACAAIAGlIAG9Qv///////////wCDQoCAgICAgID4/wBWGyABIAC9Qv///////////wCDQoCAgICAgID4/wBYGwtNAgF/AXwjAEEQayIFJAAgBSAENgIIIAUgAzYCDCAAKAIQIgBFBEAQZgALIAAgASACIAVBDGogBUEIaiAAKAIAKAIYERgAIAVBEGokAAukAgICfwV+AkAgASgCEEUNAAJAIAEpAzggASkDKFUEQCABKQMwIAEpAyBVDQELIAAgARC9AiABKAIQIgNFDQEgAyAALQB1QQAgAUFAaxD9AUUNAUL///////////8AIQdCgICAgICAgICAfyEIAkAgASgCQCICIAEoAkQiAEYEQEKAgICAgICAgIB/IQVC////////////ACEGDAELQv///////////wAhBkKAgICAgICAgIB/IQUDQCACKQMIIgQgCCAEIAhVGyEIIAQgBiAEIAZTGyEGIAIpAwAiBCAFIAQgBVUbIQUgBCAHIAQgB1MbIQcgAkEQaiICIABHDQALCyABIAg3AzggASAFNwMwIAEgBjcDKCABIAc3AyALQQEhAgsgAgvtBgIGfwR+IwBBIGsiCCQAAkAgAEUNACAAKAIQIgQgAEYNACACRQRAIAQgACgCFEYNAQsgAxC2AyABBH8gAEEUagUgACgCECIAQRBqCygCACEGIAApAwAhCiAAKQMIIQsCQAJAAkAgAygCBCIEIAMoAggiBUkEQCAEIAs3AwggBCAKNwMAIARBEGohBAwBCyAEIAMoAgAiCWtBBHUiB0EBaiIEQYCAgIABTw0BIAhBDGpB/////wAgBSAJayIFQQN1IgkgBCAEIAlJGyAFQfD///8HTxsgByADEDIiBSgCCCIEIA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AACQCAAKAIwIgYgACgCKEYNACAAQUBrIQ0DQCAGKAIAIgQoAgAiASkDCCATUg0BIAAgBkEEajYCMAJAAkAgASgCGCIBQQFxRQRAQegAECMiAkEAQegA/AsAIAJBATYCMCACQTRqQQBBKfwLACACIAQoAgAiASkDADcDACABKQMIIRAgAkF/NgIwIAIgEDcDCCACIAIpAwAiEjcDICACIAQoAgAoAhQiATYCVCACIAEpAwg3AxggASkDACEQIAIgBDYCWCACIBA3AxAgAgJ8IAIpAxgiESACKQMIIhBSBEAgAikDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAIpAxAgElUbCzkDKCAEKAIALQAYQQJxRQRAIAIhBgwCC0EAIQYMAgtBACEGQQAhAiABQQJxDQELQegAECMiAUEAQegA/AsAIAFBATYCMCABQTRqQQBBKfwLACABIAQoAgAiAikDADcDACACKQMIIRAgAUEBNgIwIAEgEDcDCCABIAEpAwAiEjcDICABIAQoAgAoAhAiAjYCVCABIAIpAwg3AxggAikDACEQIAEgBDYCWCABIBA3AxAgAQJ8IAEpAxgiESABKQMIIhBSBEAgASkDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAEpAxAgElUbCyIcOQMoAkAgBkUEQEEAIQYMAQsCQCAGKQMYIAYpAwhRBEAgBisDKET////////v/2ENAgwBCyAQIBFRBEAgHET////////vf2ENAgwBCyAGKwMoIBxjDQELIAYhAiABIQYMAQsgASECCyACQQE6AFwgAEEcaiEEAkAgACgCHCIBRQRAIAJCADcDQCAAIAI2AhwMAQsgASACEL8CBEADQAJAIAQoAgAiAUHEAGohBCABKAJEIgVFDQAgBSACEL8CDQELCwJAIAEoAmBBAkYEQCABKAJEIgFFDQELIAIgASgCRCIENgJEIAQEQCAEIAI2AkALIAIgATYCQCABIAI2AkQLDAELIAJBADYCQCACIAAoAhwiATYCRCABIAI2AkAgACACNgIcCwJAIAIoAlgtAAhBAUYEQEEAIQUgACgCHCEBAkAgACgCCARAIAEgAkcEQCACKAI4IQQgAigCNCEFA0ACQC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igCACEDIAQEQCAAKAJIIQVBACEBA0AgAyABQQJ0aigCAEUEQCAFIAFBGGxqIgBCgICAgICAgPz/ADcDECAAQoCAgICAgID8/wA3AwggAEKAgICAgICA/P8ANwMACyABQQFqIgEgBEcNAAsgAigCACEDCyADBEAgAxAiCyACQRBqJAAL4gcCDX8LfCMAQUBqIgUkACAAKAJMIQIgBUIANwM4IAVCADcDMCAFQgA3AyggBUIANwMAIAVCADcDCCAFQgA3AxAgAEGYAWogAiAFEGcgBUEcaiAAKAJMEOwBIQYgACgCTCICBEADQCAGKAIAIAFBAnRqQf////8HNgIAIAFBAWoiASACRw0ACwsgACgCXCIDBEADQEH/////ByECAkAgACgCWCAEQQJ0aigCACIHQQBIDQADQCAGKAIAIAdBAnRqIgEgBCABKAIAIgEgASACRiICGzYCACACDQEgASICIARODQALCyAEQQFqIgQgA0cNAAsLIAAoAkwiCQRAQQAhAgNARAAAAAAAAAAAIQ5EAAAAAAAAAAAhEkQAAAAAAAAAACEQIAYoAgAgAkECdGooAgAiBCEBAkAgBEH/////B0YEQCAAKAKYASACQRhsaiIBQgA3AxAgAUIANwMIIAFCADcDAAwBCwNAQX5BAUF+QQEgACgCaCABQQJ0aigCACIBQQNvQQJGGyABaiIBIAFBA20iCkEDbGtBAkYbIgcgAWoiC0EDbyEMAkAgACgCSCIDIAAoAlgiDSABQQJ0aiIIIAdBAnRqKAIAQRhsaiIHKwMAIAMgCCgCAEEYbGoiCCsDACIRoSIPIA8gD6IgBysDCCAIKwMIIhOhIg8gD6KgIAcrAxAgCCsDECIUoSIVIBWioJ8iFqMiF71C////////////AINC//////////f/AFYNACARIAMgDUF4QQQgDEECRhtqIAtBAnRqKAIAQRhsaiIDKwMAoSIRIBEgEaIgEyADKwMIoSIRIBGioCAUIAMrAxChIhMgE6KgnyIUoyIYvUL///////////8Ag0KAgICAgICA+P8AWg0AIA4CfEQAAAAAAAAAACAVIBajIBMgFKOiIA8gFqMgESAUo6IgFyAYokQAAAAAAAAAAKCgoCIORAAAAAAAAPC/ZQ0AGkQYLURU+yEJQCAORAAAAAAAAPA/Zg0AGiAOmhBdCyIPIAAoAqgBIApBGGxqIgMrAxCioCEOIBIgDyADKwMIoqAhEiAQIA8gAysDAKKgIRALIAEgBEcNAAsgACgCmAEgAkEYbGoiASAOIA4gDqIgEiASoiAQIBCioKCfIg6jRAAAAAAAAAAAIBAgDqMiEL1C////////////AINCgICAgICAgPj/AFQiBBs5AxAgASASIA6jRAAAAAAAAAAAIAQbOQMIIAEgEEQAAAAAAAAAACAEGzkDAAsgAkEBaiICIAlHDQALCyAGKAIAIgAEQCAGIAA2AgQgBigCCBogABAiCyAFQUBrJAALgAEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARA5IAEgACgCBCIDayIEQQBMDQAgACgCACADQQR0aiEDA0AgAyACKQIINwIIIAMgAikCADcCACADQRBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQgwELCz4AIAMEQCAAIAMQ8gEgACgCBCEDIAEgAkcEQANAIAMgARAuQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQLC4gBAQl8IAErAzAhBiABKwMAIQcgASsDGCEIIAErAzghCSABKwMIIQogASsDICELIAAgAisDACIDIAErAxCiIAIrAwgiBCABKwMooqAgAisDECIFIAErA0CioDkDECAAIAMgCqIgBCALoqAgBSAJoqA5AwggACADIAeiIAQgCKKgIAUgBqKgOQMAC0oBAn8gACgCBCICIAAoAggiAUcEQANAIAAgAUEQayIBNgIIIAEQLxogAiAAKAIIIgFHDQALCyAAKAIAIgEEQCAAKAIMGiABECILCzABAn8jAEGgAmsiASQAIAFBCGoQOyICQQ42AkQgACACEO8BIAIQOhogAUGgAmokAAt3AQF/IwBBMGsiAyQAIANBGGogASACEJcCIAMgASACQRhqEJcCIABBMGogASACQTBqEJcCIAAgAykDKDcDECAAIAMpAyA3AwggACADKQMYNwMAIAAgAykDADcDGCAAIAMpAwg3AyAgACADKQMQNwMoIANBMGokAAu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gACADEDcaDAELIAUgATYC9AUgBSAFQfwFajYC+AUCQAJAIAZFBEAgBUEBNgKABgwBCyAGIAYoAgxBAWo2AgwgASgCkAEhAyAFQQE2AoAGIANFDQAgAy0AEEEBRw0AIAVBiAZqEDsiA0EONgJEIAVB0ANqIANByAD8CgAAIAUgAygCSDYCmAQgBSADKAJMNgKcBCAFIAMoAlA2AqAEIANBADYCUCADQgA3A0ggBSADKAJkNgK0BCADQQA2AmQgBSADKAJYNgKoBCAFIAMoAlw2AqwEIAUgAygCYDYCsAQgA0EANgJgIANCADcDWCAFIAMoAnQ2AsQEIANBADYCdCAFIAMoAmg2ArgEIAUgAygCbDYCvAQgBSADKAJwNgLABCADQQA2AnAgA0IANwNoIAUgAygChAE2AtQEIANBADYChAEgBSADKAJ4NgLIBCAFIAMoAnw2AswEIAUgAygCgAE2AtAEIANBADYCgAEgA0IANwN4IAUgAygCiAE2AtgEIAUgAygCjAE2AtwEIAUgAygCkAE2AuAEIANBADYCkAEgA0IANwOIASAFIAMoApgBNgLoBCAFIAMoApwBNgLsBCAFIAMoAqABNgLwBCADQQA2AqABIANCADcDmAEgBSADKAKoATYC+AQgBSADKAKsATYC/AQgBSADKAKwATYCgAUgA0EANgKwASADQgA3A6gBIAUgAygCuAE2AogFIAUgAygCvAE2AowFIAUgAygCwAE2ApAFIANBADYCwAEgA0IANwO4ASAFIAMoAsgBNgKYBSAFIAMoAswBNgKcBSAFIAMoAtABIgY2AqAFIAUgAygC1AEiCDYCpAUgBUGgBWohBAJAIAhFBEAgBSAENgKcBQwBCyAGIAQ2AgggA0IANwPQASADIANB0AFqNgLMAQsgBSADKALYATYCqAUgBSADKALcATYCrAUgBSADKALgATYCsAUgA0EANgLgASADQgA3A9gBIAUgAygC6AE2ArgFIAUgAygC7AE2ArwFIAUgAygC8AE2AsAFIANBADYC8AEgA0IANwPoASAFIAMoAvgBNgLIBSAFIAMoAvwBNgLMBSAFIAMoAoACNgLQBSADQQA2AoACIANCADcD+AEgBSADKAK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iALoCAKvUL///////////8Ag0KBgICAgICA+P8AVCALvUL///////////8Ag0KAgICAgICA+P8AWHFFDQAaIAu9IhFCIIinIgJBgIDA/wNrIBGnIgFyRQRAIAoQqQMMAQsgAkEedkECcSIAIAq9IhFCP4inciEEAkAgEUIgiKdB/////wdxIgMgEadyRQRAAkACQCAEQQJrDgIAAQMLRBgtRFT7IQlADAMLRBgtRFT7IQnADAILRBgtRFT7Ifk/IAqmIAEgAkH/////B3EiAXJFDQEaAkAgAUGAgMD/B0YEQCADQYCAwP8HRw0BIARBA3QrA/CZAQwDC0QYLURU+yH5PyAKpiADQYCAwP8HRyABQYCAgCBqIANPcUUNAhoCfCAABEBEAAAAAAAAAAAgA0GAgIAgaiABSQ0BGgsgCiALo5kQqQMLIQoCQAJAAkAgBEEBaw4DAAECBAsgCpoMBAtEGC1EVPshCUAgCkQHXBQzJqahvKChDAMLIApEB1wUMyamobygRBgtRFT7IQnAoAwCCyAEQQN0KwOQmgEhCgsgCgsQtQIMAwsgACACIAMgBBC3AgwCCxAmAAsjAEEgayIGJAAgACgCOCIFIARBBHRqIgQrAwggBSADQQR0IgFqIgMrAwigIAArAxAgC0QAAAAAAADwP6CjIguiIAIoAgAgAWoiASkDCLmgIQogBCsDACADKwMAoCALoiABKQMAuaAhCwJAAkACQCAAKAJIIgEgACgCTCICSQRAIAEgChA0/AY3AwggASALEDT8BjcDACABQRBqIQMMAQsgASAAQcQAaiIEKAIAIgFrQQR1IgNBAWoiBUGAgICAAU8NASAGQQxqQf////8AIAIgAWsiAkEDdSIBIAUgASAFSxsgAkHw////B08bIAMgBBAyIgUoAggiASAKEDT8BjcDCCABIAsQNPwGNwMAIAUgAUEQajYCCCAFKAIEIAAoAkggACgCRCIBayIDayECIAMEQCACIAEgA/wKAAALIAAoAkQhBCAAIAI2AkQgBSAENgIEIAAgBSgCCCIDNgJIIAUgBDYCCCAAKAJMIQEgACAFKAIMNgJMIAUgBDYCACAFIAE2AgwgBRA2CyAAIAM2AkggBkEg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FDQMgASgCACIJKAIAIggpAwghEQNAAkAgESAAKAIAIgooAgAiCykDCCISUgRAIBEgElcNAQwECyALKQMAIAgpAwBVDQMLIABBBGohACAEQQFrIgQNAAsMAwsgACEHIAEhCUEAIQgjAEEQayIKJAACQAJAAkACQAJAIAQgBUwEQCAAIAFHDQEgBiEADAILIAIgCUcNAiAGIQAMAwsgBiEAIAchAQNAIAEoAgAhAyABQQA2AgAgACADNgIAIABBBGohACAIQQFqIQggAUEEaiIBIAlHDQALCyAKIAg2AgwjAEEQayIDJAACQCAAIAYiAUYNAANAIAIgCUYEQCAAIAFHBEADQCABKAIAIQQgAUEANgIAIAcoAgAhAiAHIAQ2AgAgAgRAIAIQIgsgB0EEaiEHIAFBBGoiASAARw0ACyAAIQELIAMgBzYCDCADIAE2AggMAgsCQAJAAkAgASgCACIFKAIAIgQpAwgiESAJKAIAIggoAgAiCykDCCISUgRAIBEgElMNAQwCCyAEKQMAIAspAwBXDQELIAlBADYCACAHKAIAIQQgByAINgIAIAQEQCAEECILIAlBBGohCQwBCyABQQA2AgAgBygCACEEIAcgBTYCACAEBEAgBBAiCyABQQRqIQELIAdBBGohByAAIAFHDQALCyADQRBqJAAMAgsgBiEAA0AgASgCACEEIAFBADYCACAAIAQ2AgAgAEEEaiEAIAhBAWohCCABQQRqIgEgAkcNAAsLIAogCDYCDCAKIAM2AgggCSEBIAIhBAJAIAYgACICRg0AA0AgASAHRgRAA0AgAkEEayICKAIAIQEgAkEANgIAIARBBGsiBCgCACEAIAQgATYCACAABEAgABAiCyACIAZHDQAMAwsACwJAAkACQCABQQRrIgAoAgAiCSgCACIFKQMIIhEgAkEEayIDKAIAIggoAgAiCykDCCISUgRAIBEgElMNAQwCCyAFKQMAIAspAwBXDQELIABBADYCACAEQQRrIgEoAgAhBSABIAk2AgAgACEBDAELIANBADYCACAEQQRrIgAoAgAhBSAAIAg2AgAgASEAIAMhAgsgBQRAIAUQIiAAIQELIARBBGshBCACIAZHDQALCwsgBgRAIApBDGog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AKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAggiAzYCBCABIAI2AgggACgCCCEEIAAgASgCDDYCCCABIAI2AgAgASAENgIMIAEQUyAAIAM2AgQMBAsgBSgCGCIBRQRAQQAhAEEMECMiAUEANgIIIAFCADcCACAFIAE2AhggAUEEaiEEQQAhAgwCCyABQQRqIQQgASgCBCIAIAEoAggiAk8NASAAIAM2AgAgAEEEaiECDAILIAIoAhAiAARAIAAQIgsgAhAiDAILIAAgASgCACIHa0ECdSIJQQFqIgBBgICAgARPDQIgBkEMakH/////AyACIAdrIgJBAXUiByAAIAAgB0kbIAJB/P///wdPGyAJIAEQSiIAKAIIIgIgAzYCACAAIAJBBGo2AgggACgCBCAEKAIAIAEoAgAiA2siAmshByACBEAgByADIAL8CgAACyABKAIAIQMgASAHNgIAIAAgAzYCBCAEIAAoAggiAjYCACAAIAM2AgggASgCCCEHIAEgACgCDDYCCCAAIAM2AgAgACAHNgIMIAAQUwsgBCACNgIACyAGQSBqJAAMAQsQJgALIAUoAhAiA0UNAyADKAIUIgYgAygCECICKAIQIgRHDQIMAwsgASADRg0CIAIoAhAhBCABKAIUIQYgASEADAALAAsACwsPCwNAIAMoAhAgAxAiIgMNAAsgAUEANgIQC8MCARF+IAIpAwggASkDCCIEfSINIA1CP4ciDoUgDn0iBUL/////D4MiBiABKQMAIgcgACkDAH0iDyAPQj+HIhCFIBB9IghC/////w+DIgl+IgNCIIggBiAIQiCIIgh+fCIRQv////8PgyAJIAVCIIgiCX58IhJCIIYgA0L/////D4OEIAIpAwAgB30iBSAFQj+HIgaFIAZ9IgNC/////w+DIgogBCAAKQMIfSIEIARCP4ciB4UgB30iC0L/////D4MiDH4iE0IgiCAKIAtCIIgiC358IgpC/////w+DIANCIIgiAyAMfnwiDEIghiATQv////8Pg4RRIAggCX4gEUIgiHwgEkIgiHwgAyALfiAKQiCIfCAMQiCIfFFxIA6nIA1CAFVqIBCnIA9CAFVqbCAGpyAFQgBVaiAHpyAEQgBVamxGcQuJAwIEfwJ+An8gASkDICIHIAApAyAiBlIEQCAGIAdTDAELIABBEGoiBSABIAFBEGoiAxCHASICBEAgAkEfdgwBCwJAIAAoAlQiBC0AGEEEcQ0AIAApAxggASkDGFcNACABIAUgBEEQQRQgACgCMEEAShtqKAIAEIcBQQBMDAELAkAgASgCVCICLQAYQQRxDQAgASkDGCAAKQMYVw0AIAEgAyACQRBBFCABKAIwQQBKG2ooAgAQhwFBAE4MAQsgAS0AXCICIAEpAwgiBiAAKQMIUg0AGiACIAYgACgCWCgCACkDCFINABogAiAALQBcIAJHDQAaQQECfyAAKAIwQQBKBEAgBCgCFEEUagwBCyAEKAIQQRBqCygCACAAIAUQvgINABogACgCVCEDAn8gACgCMEEASgRAIAMoAhRBFGoMAQsgAygCEEEQagshACABKAJUIQMgAiAAKAIAIAECfyABKAIwQQBKBEAgAygCFEEUagwBCyADKAIQQRBqCygCABCHAUEASkYLQQFxC/QGAgt/An4gAEEAOgAYIAIhCSAAQTRqIQQgAEEkaiEKIwBBIGsiCyQAAkACQAJAIAEoAgAiBiABKAIEIgxGDQAgBiEAA0AgACgCBCAAKAIAa0EEdSADaiEDIABBDGoiACAMRw0ACyADRQ0AQX8gA0EFdCIAIANB////P0sbECMiByAAaiEBIAchAANAIABBADYCGCAAQgA3AxAgAEIANwMIIABCADcDACAAQSBqIgAgAUcNAAsgByECA0ACQCAGKAIAIgMgBigCBCIIRg0AQQAhASACQQA2AhQgAiEAQQAhBQNAAkAgAQRAIAEpAwAgAykDAFEEQCABKQMIIAMpAwhRDQILIAEgADYCEAsgACABNgIUIAAgAykDADcDACAAIAMpAwg3AwggAEEANgIYIAVBAWohBSAAIgFBIGohAAsgA0EQaiIDIAhHDQALIAEoAhQiA0UNACADIAEgASkDCCACKQMIURsgASABKQMAIAIpAwBRGyIDIAI2AhAgAiADNgIUAkAgAiADRiAFQQNIcg0AIAIpAwghDgNAIA4gAykDCCIPUQRAIAMoAhQiAyACRw0BDAILCyAOIA9TIg0hBSACIgE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AENgIAIAUgBzYCDCAFENUBDAELECYACyANQSBqJAACQCADKAJUIgVFDQAgBSAFKAIEIgRBAWs2AgQgBA0AIAUgBSgCACgCCBEAACAFECQLIAlBAWoiCSABKAIEIAEoAgAiBGtBBnVJDQALCyADQQA2AjQgA0IANwIsIAMoAkQhASADQegAakEAQegA/AsAIANCADcDYCADQQI2AlwgA0IANwJUIANB7ABqQQBBMPwLACADQaABakEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIEIAEQmwEgBCADQThqIgUQ4QEgA0EANgL8ASADQgA3AvQBIARBA0ECIAJBAUYbQQIgA0EsaiICIANB9AFqIgEQ4gEgAyABNgIkIANBJGoQKSAEEGkaQRgQIyIBQbSaAjYCACABQgA3AgQgAUEMaiIGIAIQWyADIAE2AhggAyAGNgIUIAMgAykCFDcDCCAAIANBCGoQaiADIAI2AlAgBBApDAELIANBADYCQCADQgA3AjggA0E4aiADKAJEIgIoAgAiBSACKAIEIgIgAiAFa0EMbRBHIAEoAgQgASgCACIEa0HBAE8EQCADQaABaiEGIANB7ABqIQcgA0HoAGohCEEBIQkDQCADQSRqIAQgCUEGdGoQTSADQQA2AjQgA0IANwIsIAMoAiQhBCAIQQBB6AD8CwAgA0IANwNgIANBAjYCXCADQgA3AlQgB0EAQTD8CwAgBkEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIFIANBOGoiAhCbASAFIAQQ4QEgA0EANgL8ASADQgA3AvQBIAVBAUECIANBLGoiBCADQfQBaiIKEOIBIAMgCjYCTCADQcwAahApIAUQaRogAigCACIKBEAgAiAKEHsgAigCCBogAigCABAiIAJBADYCCCACQgA3AgALIAMgAygCLDYCOCADKQIwIRAgA0EANgI0IAMgEDcCPCADQgA3Aiwg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IANBGGsiAygCEDYCECACIAMpAwg3AwggAiADKQMANwMAIAMgBUcNAAsLIApBIGokAAvdBwIHfwF8IwBBIGsiCiQAAkAgBEUNAANAAkACQCAEIAZMIAMgBkxyRQRAIANFDQQgASsDACEOA0AgDiAAKwMAYw0CIABBGGohACADQQFrIgMNAAsMBAsgAyAESg0BIAAgAUYNAyAFIQMgACEHA0AgAyAHKQMQNwMQIAMgBykDCDcDCCADIAcpAwA3AwAgA0EYaiEDIAdBGGoiByABRw0ACwNAIAEgAkYEQCADIAVrQQRrIgFFDQUgACAFIAH8CgAADAULAkAgASsDACAFKwMAYwRAIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAFBGGohAQwBCyAAIAUoAhA2AhAgACAFKQMINwMIIAAgBSkDADcDACAFQRhqIQULIABBGGohACADIAVHDQALDAMLAkAgAyAESARAIAEgBEECbSILQRhsaiEIAkAgACABRgRAIAAhBwwBCyABIABrQRhtIQkgCCsDACEOIAAhBwNAIAcgByAJQQF2IgxBGGxqIgdBGGogDiAHKwMAYyINGyEHIAwgCSAMQX9zaiANGyIJDQALCyAHIABrQRhtIQwMAQsgA0EBRgRAIAogACkDEDcDGCAKIAApAwg3AxAgCiAAKQMANwMIIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAEgCigCGDYCECABIAopAxA3AwggASAKKQMINwMADAQLIAAgA0ECbSIMQRhsaiEHAkAgASACRgRAIAEhCAwBCyACIAFrQRhtIQkgBysDACEOIAEhCANAIAggCUEBdiILQRhsaiINQRhqIAggDSsDACAOYyINGyEIIAkgC0F/c2ogCyANGyIJDQALCyAIIAFrQRhtIQsLIApBCGogByABIAgQ0AMgCigCCCEJAn8gCyAMaiAEIAtrIgQgAyAMayIDakgEQCAAIAcgCSAMIAsgBSAGEMgCIAkhACAIDAELIAkgCCACIAMgBCAFIAYQyAIgCyEEIAwhAyAJIQIgBwshASAEDQEMAgsLIAEgAkYNACAFIQMgASEHA0AgAyAHKQMQNwMQIAMgBykD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qAc3A5ADIAQgBCkDoAc3A4gDIAQgBCkDmAc3A4ADIAQgBCkD0AY3A7gDIAQgBCkDyAY3A7ADIAQgBCkDwAY3A6gDIAQgBCkDuAY3A6ADIARBoAVqIARBwARqIARBwANqIARBwAJqIBxEAAAAAAAA8D8gGKEiFyABEOYDIBggF6IiGEQAAAAAAAAAAKAgHEQAAAAAAADwPyAcoaIiF6AhIiAYIAQrA/gHokQAAAAAAAAAAKAgFyAEKwOwBaKgISMgGCAEKwPwB6JEAAAAAAAAAACgIBcgBCsDqAWioCEkIBggBCsD6AeiRAAAAAAAAAAAoCAXIAQrA6AFoqAhIAsgIkQAAAAAAAAAAGIEQCAjICKjISMgJCAioyEkICAgIqMhIAsgCiAjOQMQIAogJDkDCCAKICA5AwAgIL1C////////////AINC//////////f/AFYgJL1C////////////AINC//////////f/AFZyRSAjvUL///////////8Ag0L/////////9/8AWHENACAKIAQpA5AINwMQIAogBCkDiAg3AwggCiAEKQOACDcDAAsgFkEBaiIWIA9HDQALCyAAQQA2ArwBIABBuAFqEJMBAkAgDSgCvAEgDSgCXEYEQCAAEFogABBYDAELIAAQlAILIAAgAxBUIABBfzYCyAELIAQoAhgiAARAIAAQIgsgDRA6GgsgBEHwCGokAAsfACABBEAgACABKAIAENICIAAgASgCBBDSAiABECILCzoAIAEEQCAAIAEoAgAQ0wIgACABKAIEENMCIAEoAhQiAARAIAEgADYCGCABKAIcGiAAECILIAEQIgsLghMCCn8afCMAQYABayICJAAgASgCBCILBEADQAJAIAEoAgAgCGotAABBAUcNACAAKAK4ASEKIAAoArwBBEAgCiAIQQV0aisDGEQAAAAAAAAAAGMNAQtBACEDIAJBADYCeCACQgA3AnAgAkEANgJoIAJCADcCYEQAAAAAAAAAACEVIAAoAkgiBSAAKAJYIAhBAnRqIgRBeEEEIAhBA3BBAkYbaigCAEEYbGoiCSsDACAFIAQoAgBBGGwiBGoiBSsDACIfoSIOIA4gDqIgCSsDCCAFKwMIIiChIgwgDKKgIAkrAxAgBSs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IIIgEoAgBHDQALCyABIAJHDQELCyADCykAIABBADYCBCAAEC0gAEEANgIUIABBEGoQLSAAQQA2AiQgAEEgahAtC8UCAQN/IAAoAgggACgCACIEa0EMbSADTwRAIAAoAgQiBSAEayIGQQxtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMoAgg2AgggASADKQIANwIAIAFBDGohASADQQxqIgMgAkcNAAsLIAAgBSABIAVrajYCBA8LIAIgAWsiA0UgASACRnJFBEAgBCABIAP8CgAACyAAIAMgBGo2AgQPCyAAEEUgA0HWqtWqAUkEQCAAQdWq1aoBIAAoAgggACgCAGtBDG0iBUEBdCIEIAMgAyAESRsgBUGq1arVAE8bEKMCIAAoAgQhAyABIAJHBEADQCADIAEoAgg2AgggAyABKQIANwIAIANBDGohAyABQQxqIgEgAkcNAAsLIAAgAzYCBA8LECYAC9gCAQN/IAAoAgggACgCACIEa0EYbSADTwRAIAAoAgQiBSAEayIGQRhtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACABQRhqIQEgA0EYaiIDIAJHDQALCyAAIAUgASAFa2o2AgQPCyACIAFrIgNFIAEgAkZyRQRAIAQgASAD/AoAAAsgACADIARqNgIEDwsgABBFIANBq9Wq1QBJBEAgAEGq1arVACAAKAIIIAAoAgBrQRhtIgVBAXQiBCADIAMgBEkbIAVB1arVKk8bEPIBIAAoAgQhAyABIAJHBEADQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQPCxAmAAsfACABBEAgACABKAIAEPICIAAgASgCBBDyAiABECILC2EBAn8CQCABKAIEIgNFBEAgASECA0AgAiACKAIIIgIoAgBHDQALDAELA0AgAyICKAIAIgMNAAsLIAEgACgCAEYEQCAAIAI2AgALIAAgACgCCEEBaz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xHDQALDAILIAAoAkggBiAEQQJ0aigCAEEYbGoiAUKAgICAgICA/P8ANwMQIAFCgICAgICAgPz/ADcDCCABQoCAgICAgID8/wA3AwAMAQsgASACRw0AIAAoAkggBiACQQJ0aigCAEEYbGoiAUKAgICAgICA/P8ANwMQIAFCgICAgICAgPz/ADcDCCABQoCAgICAgID8/wA3AwALIAUgCEECdGogBSAHQQJ0aigCACIBNgIAIAUgAUECdGogCDYCACAFIAUgCUECdGooAgAiAUECdGogBSACQQJ0aigCACICNgIAIAUgAkECdGogATYCACADQQI2AhQgA0KAgICAEDcCDCAAKAJ4IQBBACEBA0AgBkEEQQggA0EMaiABaigCACICQQFGG0EAIAIbIgQgA0EkamooAgBBAnQiAmpBfzYCACACIAVqQX82AgAgACACakF/NgIAIAYgA0EYaiAEaigCAEECdCICakF/NgIAIAIgBWpBfzYCACAAIAJqQX82AgAgAUEEaiIBQQxHDQALCws6ACAAKAJcBEAgAEHYAGoQOCAAQegAahA4IABB+ABqEDggABDtASAAQQAQzwQgAEEAEM4EIAAQlAILC/8PAhh/GHwjAEEgayIKJAACQCAAKAJoIgsgAUECdCIGaigCACIMQQBIDQAgACsDMCEnIAogATYCFCAKQX5BASABIAFBA20iByIXQQNsa0ECRhsgAWoiDzYCGCAKQX5BASAPQQNvQQJGGyAPaiINNgIcIAogDDYCCCAKQX5BASAMIAxBA24iASIYQQNsa0ECRhsgDGoiCTYCDCAKQX5BASAJQQNvQQJGGyAJaiIQNgIQIAsgCUECdGooAgAiCSAMRiAAKAJIIg4gACgCWCIRIA9BAnRqKAIAIhJBGGxqIgUrAwAiKyAOIAYgEWooAgAiGUEYbGoiBisDACIxoSIdIB2iIAUrAwgiLCAGKwMIIjKhIh0gHaKgIAUrAxAiLSAGKwMQIjOhIh0gHaKgICcgAyADRAAAAAAAAAAAYxsiLiAuoiAnICeiIAQgEkobY3JFBEAgACgCqAEiGiABIgRBGGxqIRMgACgC2AEiFSAHQQR0aiEUIBUgBEEEdGoiASgCACEGI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RqIBYoArgBIAP8CgAACyAVKAIAIg8oAgwhFiAEKALcBCEFCyAYQQJ0IhQgBCgCxARqISQgFigCQCETIBYoAlwiCARAICQoAgAhJSAFIBRqIhEoAgAhEiAEKALoBCAUaigCACENIAsoAnghDiALKAJoIQwgFigCaCEKIAsoAlghByAWKAJYIQNBACEFA0AgByARKAIAIAVqQQJ0IiZqIAMgBUECdCInaigCACANajYCACAMICZqIAogJ2ooAgAgEmo2AgAgDiAmaiATBH8gFigCeCAnaigCACAlagUgJQs2AgAgBUEBaiIFIAhHDQALIBYoAkAhEwsCQCATRSATQQBMcg0AIBMgFigCjAFqQQFrIQ4gISgCACEMIBYoAogBIQpBACEIA0AgDiAIayINIA0gE3AiB0cEQCAKIAhBA3QiA2oiBSANIAdrQQN0aiEHIAwgJCgCACAXbEEDdGogA2ohAwNAIAMgBSsDADkDACADIBdBA3RqIQMgBSATQQN0aiIFIAdHDQALCyAIQQFqIgggE0cNAAsgE0ECTA0AIARCgICAgICAgPg/NwMoIARCADcDQCAEQgA3AzggBEIANwMwIARCgICAgICAgPg/NwNIIARCADcDYCAEQgA3A1ggBEIANwNQIARCgICAgICAgPg/NwNoIARCADcDgAEgBEIANwN4IARCADcDcCAEQdgFaiIDIA9BGGogBEEoaiIFEMoBIBUoAgAhDyAEKwPYBSAEKwPgBWENACAPKwMYITcgDysDMCE4IA8rA0ghOSAPKwMgITogDysDOCEuIA8rA1AhLSAPKwMoISwgDysDQCErIAQgDysDWDkDmAYgBCArOQOQBiAEICw5A4gGIAQgLTkDgAYgBCAuOQP4BSAEIDo5A/AFIAQgOTkD6AUgBCA4OQPgBSAEIDc5A9gFIAUgAxCQASAVKAIAKAIMIgNB2ABqIANByAFqIAUgISAWKAKMASATbiAXIAQoAsQEIBRqKAIAEL4EIBUoAgAhDwsgBEKAgICAgICA+D83AyggBEIANwNAIARCADcDOCAEQgA3AzAgBEKAgICAgICA+D83A0ggBEIANwNgIARCADcDWCAEQgA3A1AgBEKAgICAgICA+D83A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AGRw0ACwsgEUEQaiQAC5YHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCiAOKAJIIAJqIhQrAwAhBiABKAIEIhEoApgBIRUgESgCSCEWQQAhAUEAIQIDQAJ/IAogFSAEIA9BBGogAmooAgBBBHRqIhAoAgRBGGwiDmorAwCaZCAOIBZqIg4rAwAiCCAGYyAGIAhhGyAKIBUgECgCCEEYbCITaisDAJpkIBMgFmoiEysDACIJIAZjIAYgCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBAoAgAhGCAOKwMQIQcgDisDCCEFAkAgBiAIoSILIAYgCaEiDCALmSAMmWMiDhsgCSAIoaMiCL1C////////////AINC//////////f/AFYNACATKwMIIgkgBaEiC71C////////////AINCgICAgICAgPj/AFoNACATKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgDhsgCCANoqAhByAFIAkgDhsgCCALoqAhBQsgGUEAIBEoAqgBIg4gGEEDbUEYbGorAwggDiARKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAUgFCsDCCIIYyAFIAhhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AIA5BACAOayAQLQAMGyASaiESIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIQIAc5AxAgECAHOQMIIBAgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyASRQRARAAAAAAAAPh/IQVBAAwBCyASQQAgESgCqAEgA0EYbGorAxBEAAAAAAAAAABkIA8rAyAiBSAPKwM4IgYgFCsDCCIHIA8rAxAiCKEiCZkgByAPKwMoIgehIgqZYyIBGyAGIAWhIgYgCSAKIAEbIAcgCKGjIgeioCAFIAa9Qv///////////wCDQoCAgICAgID4/wBUGyAFIA8rAzAgDysDGKG9Qv///////////wCDQoCAgICAgID4/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bIAggDaKgIQcgBSAJIA4bIAggC6KgIQULIBlBACARKAKoASIOIBhBA21BGGxqKwMIIA4gESgCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAFIBQrAwgiCGMgBSAIYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNACAOQQAgDmsgEC0ADBsgEmohEiABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiECAHOQMQIBAgBzkDCCAQIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gEkUEQEQAAAAAAAD4fyEFQQAMAQsgEkEAIBEoAqgBIANBGGxqKwMQRAAAAAAAAAAAYyAPKwMgIgUgDysDOCIGIBQrAwgiByAPKwMQIgihIgmZIAcgDysDKCIHoSIKmWMiARsgBiAFoSIGIAkgCiABGyAHIAihoyIHoqAgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsiBSAUKwMQIgZjIAUgBmEbGwshASAAIAU5AwggACABNgIAC7IJAQ5/IwBBEGsiESQAAkAgBUUNAANAAkACQCAFIAdMIAQgB0xyRQRAIARFDQQgAygCACgCACINIAEoAgAiC0EDdGoiCEEBIAMoAgQoAgAiCWtBAnQiDmohCiAIIAlBAnQiD2ooAgAhCANAIAggDSAAKAIAIglBA3RqIgwgD2ooAgAiEEgNAiAIIBBGBEAgCigCACAMIA5qKAIASA0DCyAAQQRqIQAgBEEBayIEDQALDAQLIAQgBUoNASAAIAFGDQMgBiEEIAAhCANAIAQgCCgCADYCACAEQQRqIQQgCEEEaiIIIAFHDQALIAMoAgQhBSADKAIAIQMDQCABIAJGBEAgBCAGayIBRQ0FIAAgBiAB/AoAAAwFCwJAAkAgAygCACIHIAEoAgAiCEEDdGoiCyAFKAIAIglBAnQiCmooAgAiDCAKIAcgBigCACIKQQN0aiIHaigC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AQsgCCEFIAMhASAHIQQLIAJBBGsiAiAFNgIAIAQgBkcNAAsLIBFBEGokAAuVBwIJfAx/IwBBQGoiD0EQakEAQTD8CwAgD0ECNgIMIA9CgICAgBA3AgQgAkEYbCICIAEoAgAiDigCSGoiFCsDACEIIA4oApgBIAJqKwMAmiELIAEoAgQiEigCmAEhFSASKAJIIRZBACEBQQAhAgNAAn8gFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwAgC2QgCCAOIBZqIg4rAwAiBmMgBiAIYRsgFSARKAIEQRhsIhBqKwMAIAtkIAggECAWaiIQKwMAIgljIAggCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBEoAgAhGCAQKwMQIQcgECsDCCEFAkAgCCAJoSIKIAggBqEiDCAKmSAMmWMiEBsgBiAJoaMiBr1C////////////AINC//////////f/AFYNACAOKwMIIgkgBaEiCr1C////////////AINCgICAgICAgPj/AFoNACAOKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgEBsgBiANoqAhByAFIAkgEBsgBiAKoqAhBQsgGUEAIBIoAqgBIg4gGEEDbUEYbGorAwggDiASKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIBQrAwgiBiAFYyAFIAZhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AQQAgDmsgDiARLQAMGyATaiETIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIRIAc5AxAgESAHOQMIIBEgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyATRQRARAAAAAAAAPh/IQVBAAwBCyATQQAgEigCqAEgA0EYbGorAxBEAAAAAAAAAABkIBQrAxAiCCAPKwMgIgUgDysDOCIHIBQrAwgiBiAPKwMQIgmhIguZIAYgDysDKCIGoSIKmWMiARsgByAFoSIHIAsgCiABGyAGIAmhoyIGoqAgBSAHvUL///////////8Ag0KAgICAg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qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIBAbIAYgDaKgIQcgBSAJIBAbIAYgCqKgIQULIBlBACASKAKoASIOIBhBA21BGGxqKwMIIA4gEigCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAUKwMIIgYgBWMgBSAGYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNAEEAIA5rIA4gES0ADBsgE2ohEyABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiESAHOQMQIBEgBzkDCCARIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gE0UEQEQAAAAAAAD4fyEFQQAMAQsgE0EAIBIoAqgBIANBGGxqKwMQRAAAAAAAAAAAZCAUKwMQIgggDysDICIFIA8rAzgiByAUKwMIIgYgDysDECIJoSILmSAGIA8rAygiBqEiCpljIgEbIAcgBaEiByALIAogARsgBiAJoaMiBqKgIAUgB71C////////////AINCgICAgICAgPj/AFQbIAUgDysDMCAPKwMYob1C////////////AINCgICAgICAgPj/AFQbIAUgBr1C////////////AINCgICAgICAgPj/AFQbIgVjIAUgCGEbGwshASAAIAU5AwggACABNgIAC/wHAw9/A3wDfiMAQdABayIEJAAgBEGgAWpBAEEw/AsAIARB8ABqQQBBMPwLACABKAIAIhAoAlggAkECdGoiBUF4QQQgAkEDb0ECRhtqKAIAIQ8gBSgCACEMIAEoAgQhBSAEQQI2AhAgBEKAgICAEDcCCCAFKAJYIg0gA0EDbCIOQQJ0aiERIAUoAmghEgNAQQEhCQJAIA0gBEEIaiAGaigCACIKIA5qIgtBAnQiB2ooAgAiBSARQQRBCCAKQQFGG0EAIAobQYzpAGooAgBBAnRqKAIAIghIBEAgBSEHIAghBQwBCyAHIBJqKAIAIQtBACEJIAghBwsgBEFAayAKQQR0aiIIIAk6AAwgCCAFNgIIIAggBzYCBCAIIAs2AgAgBkEEaiIGQQxHDQALIAQgDzYCOCAEIAw2AjQgAUEIaiENQQA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0aiAEIANBAnRqKAIANgIACyABQQFqIgEgAkcNAAsLIApFDQELIAotABANAQsgCyAGKAIYNgIAIAsgBigCHDYCBCALIAYoAiA2AggMAQsgC0EANgIIIAtCADcCACAGKAIYIgFFDQAgARAiCyAGKAIoIgFFDQAgARAiCyAGQThqEJUBCyAMKAIAIgFFDQAgDCABNgIEIAwoAggaIAEQIgsgBkGQAWokACAVIAsQgQUgBSgCRCIBRQ0AIAEQIgsgBUGwAWokACAACzQBAX8gAUGAgICAAU8EQBAmAAsgACABQQR0IgIQIyIBNgIEIAAgATYCACAAIAEgAmo2AggLNAEBfyABQYCAgIACTwRAECYACyAAIAFBA3QiAhAjIgE2AgQgACABNgIAIAAgASACajYCCAtIAQF/IABBADYCCCAAQgA3AgAgAQRAIAAgARDyASAAKAIEIgIgAUEYbGohAQNAIAIQ6wFBGGoiAiABRw0ACyAAIAE2AgQLIAALRAEBfyAAQQA2AgggAEIANwIAIAEEQCAAIAEQjwMgACgCBCECIAFBBHQiAQRAIAJBACAB/AsACyAAIAEgAmo2AgQLIAAL5SEDFH8BfAx9IwBBgAFrIgQkACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMAQJAAkAgAkUNACACLQAQQQFHDQAgAEEOECwMAQsgASgCFCABKAIQa0ECdSIRQQNuIg8gASgCCCIHIAEoAgQiBWtBAnUgASgC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AEgAUEBdiICQX9zaiACIAAgAkECdGoiAigCACAESSIFGyEBIAJBBGogACAFGyEADAELCyADQRBqJAAgAAvsBAMEfwV+AXwgAkEANgIAAkAgAb1C////////////AINCgICAgICAgPj/AFYgAUQAAAAAAAAAAGFyRQRAIAC9IglCNIinQf8PcSIDQf8PRw0BCyAAIAGiIgAgAKMPCwJAIABEAAAAAAAAAABhDQAgAb0iCkI0iKdB/w9xIQQCfiADRQRAQQAhAyAJQgyGIgdCAFkEQANAIANBAWshAyAHQgGGIgdCAFkNAAsLIAlBASADa62GDAELIAlC/////////weDQoCAgICAgIAIhAshBwJ+IARFBEBBACEEIApCDIYiCEIAWQRAA0AgBEEBayEEIAhCAYYiCEIAWQ0ACwsgCkEBIARrrYYMAQsgCkL/////////B4NCgICAgICAgAiECyEIAn4CQAJAIAMgBE4EQCADIARKBEADQCAHIAh9IgsgByALQgBZIgYbQgGGIQcgBSAGckEBdCEFIANBAWsiAyAESg0ACyAEIQMLIAUgByAIfSIIQgBZIgZyIQUgCCAHIAYbIgdQBEBBRCEDQgAhBwwDCyAHQv////////8HVg0BA0AgA0EBayEDIAciCEIBhiEHIAhCgICAgICAgARUDQALDAELIANBAWogBEcNAwsgA0EATA0AIAdCgICAgICAgAh9IAOtQjSGhAwBCyAHQQEgA2utiAsgAZkhAL8hAQJAAkAgAyAERg0AIANBAWogBEcNASABIAGgIgwgAGQNACAFQQFxRSAAIAxicg0BCyAFQQFqIQUgASAAoSEBCyACQQAgBUH/////B3EiAmsgAiAJIAqFQgBTGzYCACABmiABIAlCAFMbIQALIAALGwAgAEIBhkKAgICAgICAEHxCgYCAgICAgBBUCxUBAX8jAEEQayIBIAA5AwggASsDCAvaFgMSfwR8AX4jAEEwayIJJAACQAJAAkAgAL0iGEIgiKciA0H/////B3EiBkH61L2ABE0EQCADQf//P3FB+8MkRg0BIAZB/LKLgARNBEAgGEIAWQRAIAEgAEQAAEBU+yH5v6AiAEQxY2IaYbTQvaAiFDkDACABIAAgFKFEM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EPwBRQ0AIAAgBCACELsCCyAFQQFqIgUgACgChAEgACgCgAEiBGtBAnVJDQALCyABQRBqJAALIAAQ3gEgAC0AfRoLeQIDfAR+IAIpAwghBiABKQMIIQcCfCACKQMAIgggASkDACIJUQRARAAAAAAAAAAAIAYgB1ENARoLRAAAAAAAAPA/IAggCX25IgMgA6IgBiAHfbkiBSAFoqCfoyIEIAOaoiEDIAQgBaILIQQgACADOQMIIAAgBDkDAAuACAMIfwF8Bn4jAEEQayIGJAAgAEEANgIIIABCADcCACAAIAEoAgAiAyABKAIEIgEgASADa0EMbRBHIABBADYCHCAAIAI2AhggAEEAOgAUIABBADoAECAAQQA6AAwCQCAAKAIAIgIgACgCBCIHRwR/A0ACQAJAAkAgAigCACIBIAIoAgQiBEYNAANAIAEiA0EQaiIBIARGDQEgAykDACADKQMQUg0AIAMpAwggAykDGFINAAsMAQsgASIDIARHDQAgBiAENgIIIAYgBDYCBAwBCyAEIANBIGoiAUcEQCADQRBqIQUDQAJAIAMpAwAgASkDAFEEQCADKQMIIAUpAxhRDQELIAMgASkDCDcDGCADIAEpAwA3AxAgA0EQaiEDCyABIQUgAUEQaiIBIARHDQALCyAGIAQ2AgggBiADQRBqNgIECyAGKAIEIgMgAigCBCIBRwRAIAEgAyABIANraiIFayIERSABIAVGckUEQCADIAUgBPwKAAALIAIgAyAEaiIBNgIECwJAIAEgAigCACIFa0ERSQ0AIAUpAwAhDANAIAFBEGsiAykDACAMUg0BIAFBCGspAwAgBSkDCFINASACIAM2AgQgAyIBIAVrQRBLDQALCyACQQxqIgIgB0cNAAsgACgCHAVBAAtFBEBBACEFIAAtABBBAUYEQCAAQQA6ABALIAAoAgQiAiAAKAIAIgRHBEBC////////////ACEOQoCAgICAgICAgH8hDQNARP///////+9/IQsgBCAFQQxsIglqIgEoAgAiAyABKAIEIgpHBEACQANAAkAgAykDCCIMIA1TDQAgDCANUQRAIAMpAwAgDlkNAQsgC0T////////vf2EEQCAAKAIAIgQgCWoiASgCBCIHIA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AKQMANwMIIAAgBCkDEDcDECAAIAQpAwg3AwggACAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMADAELIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgAykDGDcDECABIAMpAxA3AwggASADKQMINwMAIAQgASACKAIAEQIARQ0AIAMgASkDEDcDGCADIAEpAwg3AxAgAyABKQMANwMIIAEgBCkDEDcDECABIAQpAwg3AwggASAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMACyAFIAQgAigCABECAEUNAiADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAUpAxA3AxAgBCAFKQMINwMIIAQgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDACAEIAEgAigCABECAEUNAiADIAEpAxA3AxggAyABKQMINwMQIAMgASkDADcDCCABIAQpAxA3AxAgASAEKQMINwMIIAEgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACABIAAgAigCABECAEUNAiADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDAAwCCyAAIABBGGogAEEwaiAAQcgAaiABQRhrIAIQsgMMAQsgAEEYaiIFIAAgAigCABECACEIIABBMGoiBCAFIAIoAgARAgAhBgJAIAhFBEAgBkUNASADIAUpAxA3AxggAyAFKQMINwMQIAMgBSkDADcDCCAFIAQpAxA3AxAgBSAEKQMINwMIIAUgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACAFIAAgAigCABECAEUNASADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAUpAxA3AxAgACAFKQMINwMIIAAgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDAAwBCyAGBEA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ASAGKQMYNwMQIAEgBikDEDcDCCABIAYpAwg3AwAMAQsgBwRAIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMADAELIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMACwJAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACwJAIAQgAyAFKAIAEQIARQ0AIAYgAykDEDcDGCAGIAMpAwg3AxAgBiADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBikDGDcDECAEIAYpAxA3AwggBCAGKQMINwMAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAF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AIAAoAgAhASAAQQA2AgAgBCABNgIAIARBBGohBCAAQQRqIgAgAkcNAAsMAwsCQAJAAkAgACgCACIDKAIAIgYpAwgiCSAFKAIAIgcoAgAiCCkDCCIKUgRAIAkgClMNAQwCCyAGKQMAIAgpAwBXDQELIAVBADYCACAEIAc2AgAgBUEEaiEFDAELIABBADYCACAEIAM2AgAgAEEEaiEACyAEQQRqIQQgACACRw0ACwsgASAFRg0AA0AgBSgCACEAIAVBADYCACAEIAA2AgAgBEEEaiEEIAVBBGoiBSABRw0ACwsLDwsgAEEANgIAIAQgAjYCACABKAIAIQAgAUEANgIAIAQgADYCBAseAQJ/IAAoAgQgACgCACICa0EEdQRAIAAgAjYCBAsLjzMBCn8jAEEgayIFJAADQCABQcgAayEKIAFBMGshDCABQRhrIQkCQANAAkACQAJAAkACQCABIABrIghBGG0iBg4GBgYAAQIDBAsgAUEYayIBIAAgAigCABECAEUNBSAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAAQRhqIgMgACACKAIAEQIAIAFBGGsiASADIAIoAgARAgAhBEUEQCAERQ0FIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgASkDEDcDECADIAEpAwg3AwggAyABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMAIAMgACACKAIAEQIARQ0FIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMADAULIAQEQCAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAMgAigCABECAEUNBCAFIAMpAxA3AxggBSADKQMINwMQIAUgAykDADcDCCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwECyABQRhrIQQgAEEYaiIBIAAgAigCABECACEIIABBMGoiAyABIAIoAgARAgAhBgJAIAhFBEAgBkUNASAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAAgAigCABECAEUNASAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCyAGBEAgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACADKQMQNwMQIAAgAykDCDcDCCAAIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwAMAQsgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKQMYNwMQIAEgBSkDEDcDCCABIAUpAwg3AwAgAyABIAIoAgARAgBFDQAgBSABKQMQNwMYIAUgASkDCDcDECAFIAEpAwA3AwggASADKQMQNwMQIAEgAykDCDcDCCABIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwALIAQgAyACKAIAEQIARQ0DIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBSkDGDcDECAEIAUpAxA3AwggBCAFKQMINwMAIAMgASACKAIAEQIARQ0DIAUgASkDEDcDGCAFIAEpAwg3AxAgBSABKQMANwMIIAEgAykDEDcDECABIAMpAwg3AwggASADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMAIAEgACACKAIAEQIARQ0DIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMADAMLIAAgAEEYaiAAQTBqIABByABqIAFBGGsgAhCyAwwCCyAIQb8ETARAIARBAXEEQCACIQYjAEEgayIHJAACQCAAIgIgASIIRg0AIAEgAEEYaiIBRg0AA0AgASIDIAAgBigCABECAARAIAcgASkDEDcDGCAHIAEpAwg3AxAgByABKQMANwMIIAEhBANAAkAgBCAAIgEpAxA3AxAgBCAAKQMINwMIIAQgACkDADcDACAAIAJGBEAgAiEBDAELIAEhBCAHQQhqIAFBGGsiACAGKAIAEQIADQELCyABIAcpAxg3AxAgASAHKQMQNwMIIAEgBykDCDcDAAsgAyIAQRhqIgEgCEcNAAsLIAdBIGokAAwDCyACIQMjAEEgayIIJAACQCABIgYgAEYNACAAQRhqIgEgBkYNAANAIAEiAiAAIAMoAgARAgAEQCAIIAEpAxA3AxggCCABKQMINwMQIAggASkDADcDCANAIAEiBCAAIgEpAxA3AxAgBCAAKQMINwMIIAQgACkDADcDACAIQQhqIABBGGsiACADKAIAEQIADQALIAEgCCkDGDcDECABIAgpAxA3AwggASAIKQMINwMACyACIgBBGGoiASAGRw0ACwsgCEEgaiQADAILIANFBEAgACABRg0CIwBBIGsiCSQAIAEgACIERwRAIAEgAGsiBkEYbSEIIAZBGU4EQCAIQQJrQQF2IQADQCAEIAIgCCAEIAAiA0EYbGoQrwMgAEEBayEAIAMNAAsLIAEiACAARwRAA0AgACAEIAIoAgARAgAEQCAJIAApAxA3AxggCSAAKQMINwMQIAkgACkDADcDCCAAIAQpAxA3AxAgACAEKQMINwMIIAAgBCkDADcDACAEIAkpAxg3AxAgBCAJKQMQNwMIIAQg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CSkDCDcDCCAAIAkpAwA3AwAgCSAFKQMYNwMQIAkgBSkDEDcDCCAJIAUpAwg3AwALIANBAWshAwJAIARBAXEiCw0AIABBGGsgACACKAIAEQIADQBBACEEIwBBMGsiByQAIAcgACkDEDcDECAHIAApAwg3AwggByAAKQMANwMAAkAgByABIghBGGsgAigCABECAARAIAAhBgNAIAcgBkEYaiIGIAIoAgARAgBFDQALDAELIAAhBgNAIAZBGGoiBiAITw0BIAcgBiACKAIAEQIARQ0ACwsgBiAISQRAA0AgByAIQRhrIgggAigCABECAA0ACwsgBiAISQRAA0AgByAGKQMQNwMoIAcgBikDCDcDICAHIAYpAwA3AxggBiAIKQMQNwMQIAYgCCkDCDcDCCAGIAgpAwA3AwAgCCAHKQMoNwMQIAggBykDIDcDCCAIIAcpAxg3AwADQCAHIAZBGGoiBiACKAIAEQIARQ0ACwNAIAcgCEEYayIIIAIoAgARAgANAAsgBiAISQ0ACwsgBkEYayIIIABHBEAgACAIKQMQNwMQIAAgCCkDCDcDCCAAIAgpAwA3AwALIAggBykDEDcDECAIIAcpAwg3AwggCCAHKQMANwMAIAdBMGokACAGIQAMAQsLIAEhByMAQTBrIgkkACAJIAApAxA3AxAgCSAAKQMINwMIIAkgACkDADcDACAAIQYDQCAGIghBGGoiBiAJIAIoAgARAgANAAsCQCAAIAhGBEADQCAGIAdPDQIgB0EYayIHIAkgAigCABECAEUNAAwCCwALA0AgB0EYayIHIAkgAigCABECAEUNAAsLIAYgB08iCkUEQANAIAkgBikDEDcDKCAJIAYpAwg3AyAgCSAGKQMANwMYIAYgBykDEDcDECAGIAcpAwg3AwggBiAHKQMANwMAIAcgCSkDKDcDECAHIAkpAyA3AwggByAJKQMYNwMAA0AgBiIIQRhqIgYgCSACKAIAEQIADQALA0AgB0EYayIHIAkgAigCABECAEUNAAsgBiAHSQ0ACwsgACAIRwRAIAAgCCkDEDcDECAAIAgpAwg3AwggACAIKQMANwMACyAIIAkpAxA3AxAgCCAJKQMINwMIIAggCSkDADc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igCVEYEQAJAIAEoAjxFDQAgAigCYARAIAAgAiACQRBqEH4gASgCPEUNAQsgCSABKAJURwRAA0AgASAHEGMaIAAgARD+ASABKAJUIAlHDQALCyADBEAgACABIAIgBxCGAQwBCyAAIAIgASAHEIYBCwJAIAIoAkQiAyACKAJAIgVyRQRAIAIgACgCHCIHRw0BCwJAIAUEQCAFIAM2AkQMAQsgACADNgIcCyADBEAgAyAFNgJACyACECIgACgCHCEHCyABKAJEIgIgASgCQCIDckUgASAHR3ENAwJAIAMEQCADIAI2AkQMAQsgACACNgIcCyACBEAgAiADNgJACyABECIMAwsCfwJAAkACQAJAIAkgASgCVCIERw0AIAQtABhBA3ENACACKQMgIRQMAQsgAikDICEUAkAgAwRAIBQgFVcNAQwHCyASIBRVDQYLIBQgBykDAFINACACKQMYIhEgAikDCFENACACQSBqIQUgBiAEQRBBFCABKAIwQQBKG2ooAgAiBCkDCDcDECAGIAQpAwA3AwggAigCWCIELQAIIQgCQCADBEACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFUNCAwCCyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIUw0BDAcLAkACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFkNAQwICyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIVw0HCyAGIAEpAwg3AxAgBiAUNwMIDAMLIAYgASkDCD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igCACEEIAMgACkDGDcD2AIgAyAAKQMQNwPQAiADIAApAwA3A8ACIAMgACkDCDcDyAIgA0HQAmogA0HAAmogBBECACACKAIAIQQgAyABQRBrIgEpAwg3A7gCIAMgASkDADcDsAIgAyAAKQMQNwOgAiADIAApAxg3A6gCIANBsAJqIANBoAJqIAQRAgAhBEUEQCAERQ0EIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDACACKAIAIQEgAyAAKQMYNwOYAiADIAApAxA3A5ACIAMgACkDADcDgAIgAyAAKQMINwOIAiADQZACaiADQYACaiABEQIARQ0EIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDEAwECyAEBEAgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQPYBDcDCCABIAMpA9AENwMADAQLIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDECACKAIAIQIgAyABKQMINwP4ASADIAEpAwA3A/ABIAMgACkDEDcD4AEgAyAAKQMYNwPoASADQfABaiADQeABaiACEQIARQ0DIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDAAwDCyACKAIAIQQgAyAAKQMYNwO4BCADIAApAxA3A7AEIAMgACkDADcDoAQgAyAAKQMINwOoBCADQbAEaiADQaAEaiAEEQIAIQUgAigCACEEIAMgACkDKDcDmAQgAyAAKQMgNwOQBCADIAApAxA3A4AEIAMgACkDGDcDiAQgAUEQayEBIANBkARqIANBgARqIAQRAgAhBAJAIAVFBEAgBEUNASADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyAgAigCACEEIAMgACkDGDcD+AMgAyAAKQMQNwPwAyADIAApAwA3A+ADIAMgACkDCDcD6AMgA0HwA2ogA0HgA2ogBBECAEUNASADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAMAQsgBARAIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAyg3AwggACAAKQMgNwMAIAAgAykD2AQ3AyggACADKQPQBDcDIAwBCyADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAgAigCACEEIAMgACkDKDcD2AMgAyAAKQMgNwPQAyADIAApAxA3A8ADIAMgACkDGDcDyAMgA0HQA2ogA0HAA2ogBBECAEUNACADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyALIAIoAgAhBCADIAEpAwg3A7gDIAMgASkDADcDsAMgAyAAKQMgNwOgAyADIAApAyg3A6gDIANBsANqIANBoANqIAQRAgBFDQIgAyAAKQMoNwPYBCADIAApAyA3A9AEIAAgASkDCDcDKCAAIAEpAwA3AyAgASADKQPYBDcDCCABIAMpA9AENwMAIAIoAgAhASADIAApAyg3A5gDIAMgACkDIDcDkAMgAyAAKQMQNwOAAyADIAApAxg3A4gDIANBkANqIANBgANqIAERAgBFDQIgAyAAKQMYNwPYBCADIAApAxA3A9AEIAAgACkDKDcDGCAAIAApAyA3AxAgACADKQPYBDcDKCAAIAMpA9AENwMgIAIoAgAhASADIAApAxg3A/gCIAMgACkDEDcD8AIgAyAAKQMANwPgAiADIAApAwg3A+gCIANB8AJqIANB4AJqIAERAgBFDQIgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgACkDGDcDCCAAIAApAxA3AwAgACADKQPYBDcDGCAAIAMpA9AENwMQDAILIAAgAEEQaiAAQSBqIABBMGogAUEQayACEMQDDAELIAIoAgA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A8gENwMIIAYgAykDwAQ3AwAgCEEBaiIIQQhHDQAgBUEQaiABRiEGDAILIAUiBEEQaiIGIQUgASAGRw0AC0EBIQYLIANB4ARqJAAgBgumDAEDfyMAQfACayIGJAAgBSgCACEHIAYgASkDCDcD2AIgBiABKQMANwPQAiAGIAApAwA3A8ACIAYgACkDCDcDyAIgBkHQAmogBkHAAmogBxECACEIIAUoAgAhByAGIAIpAwg3A7gCIAYgAikDADcDsAIgBiABKQMANwOgAiAGIAEpAwg3A6gCIAZBsAJqIAZBoAJqIAcRAgAhBwJAIAhFBEAgB0UNASAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACEHIAYgASkDCDcDmAIgBiABKQMANwOQAiAGIAApAwA3A4ACIAYgACkDCDcDiAIgBkGQAmogBkGAAmogBxECAEUNASAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwAMAQsgBwRAIAYgACkDCDcD6AIgBiAAKQMANwPgAiAAIAIpAwg3AwggACACKQMANwMAIAIgBikD6AI3AwggAiAGKQPgAjcDAAwBCyAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwAgBSgCACEHIAYgAikDCDcD+AEgBiACKQMANwPwASAGIAEpAwA3A+ABIAYgASkDCDcD6AEgBkHwAWogBkHgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwALIAUoAgAhByAGIAMpAwg3A9gBIAYgAykDADcD0AEgBiACKQMANwPAASAGIAIpAwg3A8gBAkAgBkHQAWogBkHAAWogBxECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEHIAYgAikDCDcDuAEgBiACKQMANwOwASAGIAEpAwA3A6ABIAYgASkDCDcDqAEgBkGwAWogBkGgAWogBxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACEHIAYgASkDCDcDmAEgBiABKQMANwOQASAGIAApAwA3A4ABIAYgACkDCDcDiAEgBkGQAWogBkGAAWogBxECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAUoAgAhByAGIAQpAwg3A3ggBiAEKQMANwNwIAYgAykDADcDYCAGIAMpAwg3A2gCQCAGQfAAaiAGQeAAaiAHEQIARQ0AIAYgAykDCDcD6AIgBiADKQMANwPgAiADIAQpAwg3AwggAyAEKQMANwMAIAQgBikD6AI3AwggBCAGKQPgAjcDACAFKAIAIQQgBiADKQMINwNYIAYgAykDADcDUCAGIAIpAwA3A0AgBiACKQMINwNIIAZB0ABqIAZBQGsgBBECAEUNACAGIAIpAwg3A+gCIAYgAikDADcD4AIgAiADKQMINwMIIAIgAykDADcDACADIAYpA+gCNwMIIAMgBikD4AI3AwAgBSgCACEDIAYgAikDCDcDOCAGIAIpAwA3AzAgBiABKQMANwMgIAYgASkDCDcDKCAGQTBqIAZBIGogAxECAEUNACAGIAEpAwg3A+gCIAYgASkDADcD4AIgASACKQMINwMIIAEgAikDADcDACACIAYpA+gCNwMIIAIgBikD4AI3AwAgBSgCACECIAYgASkDCDcDGCAGIAEpAwA3AxAgBiAAKQMANwMAIAYgACkDCDcDCCAGQRBqIAYgAhECAEUNACAGIAApAwg3A+gCIAYgACkDADcD4AIgACABKQMINwMIIAAgASkDADcDACABIAYpA+gCNwMIIAEgBikD4AI3AwALIAZB8AJqJAALCAAgABBpECILhAMCBX8BfCMAQUBqIgIkACAAQQA2AgggAEIANwIAIAJBCGogARBNIAJBADYCPCACQgA3AjQgAkE0aiACKAIIIgEoAgAiAyABKAIEIgEgASADa0EMbRBHAkAgAigCDCIBRQ0AIAEgASgCBCIDQQFrNgIEIAMNACABIAEoAgAoAggRAAAgARAkCyAAIAIoAjggAigCNGtBDG0QViACKAI0IgMgAigCOCIFRwRAA0AgAkEoaiADEDwhBCACQQA2AiQgAkIANwIcIAJBHGogAigCLCAEKAIAa0EEdRBcIAQoAgAiASACKAIsIgZHBEADQCABKwMAIQcgAiABKwMIOQMQIAIgBzkDCCACQRxqIAJBCGoQTCABQRBqIgEgBkcNAAsLIAAgAkEcahB2IAIoAhwiAQRAIAIgATYCICACKAIkGiABECILIAQoAgAiAQRAIAIgATYCLCACKAIwGiABECILIANBDGoiAyAFRw0ACwsgAiACQTRqNgIIIAJBCGoQKSACQUBrJAAL5QECBXwDf0T////////vfyEFRP///////+//IQYCQCABKAIAIgcgASgCBCIIRgRARP///////+//IQNE////////738hBAwBC0T////////vfyEERP///////+//IQMDQCAHKAIAIgEgBygCBCIJRwRAA0AgASsDCCICIAMgAiADZBshAyACIAQgAiAEYxshBCABKwMAIgIgBiACIAZkGyEGIAIgBSACIAVjGyEFIAFBEGoiASAJRw0ACwsgB0EMaiIHIAhHDQALCyAAIAM5AxggACAGOQMQIAAgBDkDCCAAIAU5AwAL1QECB3wDfwJAIAEoAgQiCSABKAIAIgprIgtBEUkNACAAKwMIIQcgACsDACEIA0AgCiALaiIAQRBrKwMAIABBIGsrAwAiAqEiAyAHIABBGGsrAwAiBKEiBaIgAEEIaysDACAEoSIEIAggAqEiAqKhIgZEAAAAAAAAAABkBEAgAiACoiAFIAWioCIFIAMgA6IgBCAEoqAiAyADIAVjG0QAAAAAAAAAAKKZIAYgBqJEAAAAAAAAEECiZkUNAgsgASAJQRBrIgk2AgQgCSAKayILQRBLDQALCwuRPwIKfwJ+IwBB0AhrIgUkAANAIAFBMGshCiABQSBrIQsgAUEQayEJAkADQAJAAkACQAJAAkAgASAAa0EEdSIIDgYGBgABAgMECyABQRB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kAhqIAVBgAhqIAMRAgAhBCACKAIAIQMgBSAAKQMoNwP4ByAFIAApAyA3A/AHIAUgACkDEDcD4AcgBSAAKQMYNwPoByABQRBrIQEgBUHwB2ogBUHgB2ogAxECACEDAkAgBEUEQCADRQ0BIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAApAyg3AxggACAAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDICACKAIAIQMgBSAAKQMYNwPYByAFIAApAxA3A9AHIAUgACkDADcDwAcgBSAAKQMINwPIByAFQdAHaiAFQcAHaiADEQIARQ0BIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDEAwBCyADBEAgBSAAKQMINwPICCAFIAApAwA3A8AIIAAgACkDKDcDCCAAIAApAyA3AwAgACAFKQPICDcDKCAAIAUpA8AINwMgDAELIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDECACKAIAIQMgBSAAKQMoNwO4ByAFIAApAyA3A7AHIAUgACkDEDcDoAcgBSAAKQMYNwOoByAFQbAHaiAFQaAHaiADEQIARQ0AIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAApAyg3AxggACAAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDIAsgAigCACEDIAUgASkDCDcDmAcgBSABKQMANwOQByAFIAApAyA3A4AHIAUgACkDKDcDiAcgBUGQB2ogBUGAB2ogAxECAEUNAyAFIAApAyg3A8gIIAUgACkDIDcDwAggACABKQMINwMoIAAgASkDADcDICABIAUpA8gINwMIIAEgBSkDwAg3AwAgAigCACEBIAUgACkDKDcD+AYgBSAAKQMgNwPwBiAFIAApAxA3A+AGIAUgACkDGDcD6AYgBUHwBmogBUHgBmogARECAEUNAyAFIAApAxg3A8gIIAUgACkDEDcDwAggACAAKQMoNwMYIAAgACkDIDcDECAAIAUpA8gINwMoIAAgBSkDwAg3AyAgAigCACEBIAUgACkDGDcD2AYgBSAAKQMQNwPQBiAFIAApAwA3A8AGIAUgACkDCDcDyAYgBUHQBmogBUHABmogARECAEUNAyAFIAApAwg3A8gIIAUgACkDADcDwAggACAAKQMYNwMIIAAgACkDEDcDACAAIAUpA8gINwMYIAAgBSkDwAg3AxAMAwsgACAAQRBqIABBIGogAEEwaiABQRBrIAIQxAMMAgsgCEEXTARAIARBAXEEQCACIQYjAEHQAGsiByQAAkAgACICIAEiCEYNACAAQRBqIgEgCEYNAANAIAYoAgAhBCAHIAEiAykDCDcDOCAHIAEpAwA3AzAgByAAKQMANwMgIAcgACkDCDcDKCAHQTBqIAdBIGogBBECAARAIAcgASkDCDcDSCAHIAEpAwA3A0AgASEEA0ACQCAEIAAiASkDCDcDCCAEIAApAwA3AwAgACACRgRAIAIhAQwBCyAGKAIAIQkgByAHKQNINwMYIAcgBykDQDcDECAHIAFBEGsiACkDADcDACAHIAApAwg3AwggASEEIAdBEGogByAJEQIADQELCyABIAcpA0g3AwggASAHKQNANwMACyADIgBBEGoiASAIRw0ACwsgB0HQAGokAAwDCyACIQMjAEHQAGsiCCQAAkAgASIEIABGDQAgASAAQRBqIgFGDQADQCADKAIAIQYgCCABIgIpAwg3AzggCCABKQMANwMwIAggACkDADcDICAIIAApAwg3AyggCEEwaiAIQSBqIAYRAgAEQCAIIAEpAwg3A0ggCCABKQMANwNAA0AgASIGIAAiASkDCDcDCCAGIAApAwA3AwAgAygCACEGIAggCCkDSDcDGCAIIAgpA0A3AxAgCCAAQRBrIgApAwg3AwggCCAAKQMANwMAIAhBEGogCCAGEQIADQALIAEgCCkDSDcDCCABIAgpA0A3AwALIAIiAEEQaiIBIARHDQALCyAIQdAAaiQADAILIANFBEAgACABRg0CIwBBMGsiCSQAIAEgACIDRwRAIAEgAGtBBHUiBkECTgRAIAZBAmtBAXYhAANAIAMgAiAGIAMgACIEQQR0ahDCAyAAQQFrIQAgBA0ACwsgASIAIABHBEADQCACKAIAIQQgCSAAKQ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AUgACkDEDcDwAIgBSAAKQMYNwPIAiAFQdACaiAFQcACaiAHEQIARQ0BIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAgpAwg3AxggACAIKQMANwMQIAggBSkDyAg3AwggCCAFKQPACDcDAAwBCyAHBEAgBSAAKQMYNwPICCAFIAApAxA3A8AIIAAgCykDCDcDGCAAIAspAwA3AxAgCyAFKQPICDcDCCALIAUpA8AINwMADAELIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAgpAwg3AxggACAIKQMANwMQIAggBSkDyAg3AwggCCAFKQPACDcDACACKAIAIQcgBSALKQMINwO4AiAFIAspAwA3A7ACIAUgCCkDADcDoAIgBSAIKQMINwOoAiAFQbACaiAFQaACaiAHEQIARQ0AIAUgCCkDCDcDyAggBSAIKQMANwPACCAIIAspAwg3AwggCCALKQMANwMAIAsgBSkDyAg3AwggCyAFKQPACDcDAAsgAigCACEHIAUgBikDGDcDmAIgBSAGKQMQNwOQAiAFIAApAyA3A4ACIAUgACkDKDcDiAIgBUGQAmogBUGAAmogBxECACEMIAIoAgAhByAFIAopAwg3A/gBIAUgCikDADcD8AEgBSAGKQMQNwPgASAFIAYpAxg3A+gBIAVB8AFqIAVB4AFqIAcRAgAhBwJAIAxFBEAgB0UNASAFIAYpAxg3A8gIIAUgBikDEDcDwAggBiAKKQMINwMYIAYgCikDADcDECAKIAUpA8gINwMIIAogBSkDwAg3AwAgAigCACEHIAUgBikDGDcD2AEgBSAGKQMQNwPQASAFIAApAyA3A8ABIAUgACkDKDcDyAEgBUHQAWogBUHAAWogBxECAEUNASAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcDICAGIAUpA8gINwMYIAYgBSkDwAg3AxAMAQsgBwRAIAUgACkDKDcDyAggBSAAKQMgNwPACCAAIAopAwg3AyggACAKKQMANwMgIAogBSkDyAg3AwggCiAFKQPACDcDAAwBCyAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcD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EoAggiACgCACECIAAoAgQCQCABKAIMIgBFDQAgACAAKAIEIgRBAWs2AgQgBA0AIAAgACgCACgCCBEAACAAECQLIAFBEGokACACa0EMbQuQBgEDfwJAAkACQAJAAkAgAg4DBAIAAQsgAUEYayECIAFBEGsrAwAgACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgAikDEDcDKCADIAIpAwg3AyAgAyACKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQIDQCAEIQUgAkEYaiEGAkAgACsDICACKwMIYwRAIAYgAikDEDcDECAGIAIpAwg3AwggBiACKQMANwMAAn8gAyACIANGDQAaA0AgAiAAKwMgIAJBEGsrAwBjRQ0BGiACIAJBGGsiBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADCyIEIAUoAhA2AhAgBCAFKQMINwMIIAQgBSkDADcDAAwBCyAGIAUpAxA3AxAgBiAFKQMINwMIIAYgBSkDADcDAAsgBiECIAUiAEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgVBGGwiBmoiBCAFIAMgBRC1ASAEIAEgAiAFayICIAMgBmogAhC1ASAEIQIDQCABIAJGBEAgACAERg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAERw0ACwwECwJAIAIrAwggACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAERw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwudBQEIfyMAQSBrIgUkACADIQQCQCABIAJGDQAgAiAERgRAIAEhBAwBCyACIAFBGGoiBEYEQCAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCADIAJrIgJBBGsiBwRAIAEgBCAH/AoAAAsgASACaiIEIAUoAhg2AhAgBCAFKQMQNwMIIAQgBSkDCDcDAAwBCyADIAJBGGpGBEAgBSADQRhrIgIpAxA3AxggBSACKQMINwMQIAUgAikDADcDCCADIAIgAWsiB0FobUEYbGohBAJAIAEgAkYNACAHQQRrIgJFDQAgBCABIAL8CgAACyABIAUoAhg2AhAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCwJ/IwBBIGshBiACIAEiBGsiCUEYbSIHIAMgAmsiC0EYbSIBRwRAIAchAgNAIAIgASICbyIBDQALIAQgAkEYbGohAgNAIAYgAkEYayICKQMQNwMYIAYgAikDCDcDECAGIAIpAwA3AwggAiAJaiEIIAIhAQNAIAEiCiAIIgEoAhA2AhAgCiABKQMINwMIIAogASkDADcDACABIAlqIAQgByADIAFrQRhtIghrQRhsaiAHIAhIGyIIIAJHDQALIAEgBigCGDYCECABIAYpAxA3AwggASAGKQMINwMAIAIgBEcNAAsgBCALagwBCwJAIAIgBEYgAiADRnINACACIQEDQCAGIAQpAxA3AxggBiAEKQMINwMQIAYgBCkDADcDCCAEIAEoAhA2AhAgBCABKQMINwMIIAQgASkDADcDACABIAYoAhg2AhAgASAGKQMQNwMIIAEgBikDCDcDACAEQRhqIgQgAkYNASABQRhqIgEgA0cNAAsLIAILIQQLIAAgAzYCBCAAIAQ2AgAgBUEgaiQAC4IGAQN/AkACQAJAAkACQCACDgMEAgABCyABQRhrIgErAwAgACsDAGMEQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgASkDEDcDKCADIAEpAwg3AyAgAyABKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQADQCAAQRhqIQUCQCAEKwMAIAArAwBjBEAgBSAAKQMQNwMQIAUgACkDCDcDCCAFIAApAwA3AwACfyADIAAgA0YNABoDQCAAIAQrAwAgAEEYayICKwMAY0UNARogACACKAIQNgIQIAAgAikDCDcDCCAAIAIpAwA3AwAgAiIAIANHDQALIAMLIgIgBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMADAELIAUgBCkDEDcDECAFIAQpAwg3AwggBSAEKQMANwMACyAFIQAgBEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgRBGGwiBmoiBSAEIAMgBBC2ASAFIAEgAiAEayICIAMgBmogAhC2ASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAFRw0ACwwECwJAIAIrAwAgACsDAGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAFRw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwuLCwEQfyMAQSBrIgckACAHQQA2AhggB0IANwIQIAdBEGogASgCJBAlIAEoAgwhDyABKAIIIQogASgCBCELIAEoAgAhBgJAAkACQCACKAIMQQBOBEBBASERDAELQQEhESALQQRBCCAGQQFGG0EAIAYbQZSVAWooAgBHDQELIAohDCAGIQoMAQtBASESIAQgBC0AA0EBczoAAyAEIAQtAAJBAXM6AAIgBCAELQABQQFzOgABIAQgBC0AAEEBczoAAEEAIREgCyEMIAYhCwsgAUEEaiETIAdCgoCAgDA3AgggB0KAgICAEDcCACACQQRqIRADQCAKIQYCQA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CADcDkAdBACEJAkAgAigCJCIFRQ0AIAIoAiAhCiAFQQV0IgcQJyEJIAdFDQAgCSAKIAf8CgAACyAEQQA2AqgHIARCADcDoAcgBCAFNgKYByAEIAU2ApQHIAQgCTYCkAcCQCACKAI0IgVFDQAgAigCMCEHIAVBDGwiAhAnIQYgAkUNACAGIAcgAvwKAAALIAQgBTYCqAcgBCAFNgKkByAEIAY2AqAHDAELIARBADYCqAcgBEIANwOgByAEQfAGakEAQSz8CwAgBCARNgKIByAEIAo2AoQHIAQgCTYCgAcgBCAQNgKMByASQYABEFUgBCgCkAciCCAEKAKUByIGQQV0aiICQgA3AwggAkKAgICAgICA+D83AwAgAkIANwMQIAJCADcDGCAEIAZBAWoiAjYClAcgBCgCmAchBQJAIBBBAEoEQCAEAn8gAiAFTwRAIBIgBUEBdEGAASAFGxBVIAQoApAHIgggBCgClAciBkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBCgCmAchBSAGQQFqDAELIAggAkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBkECagsiBzYClAcCQCAFIAdNBEAgEiAFQQF0QYABIAUbEFUgBCgCkAciCCAEKAKUByIHQQV0aiICQgA3AwggAkIANwMAIAJCADcDGCACQoCAgICAgID4PzcDECAEKAKYByEFDAELIAggB0EFdGoiAkIANwMIIAJCADcDACACQgA3AxggAkKAgICAgICA+D83AxALIAQgB0EBaiICNgKUBwJ/IAIgBU8EQCASIAVBAXRBgAEgBRsQVSAEKAKUByICQQFqIQYgBCgCkAciCCACQQV0agwBCyAHQQJqIQYgCCACQQV0agsiAkIANwMQIAJCADcDCCACQgA3AwAgAkKAgICAgICA+D83AxggBCAGNgKUByAEQoKAgIAwNwLgBSAEQoCAgIAQNwLYBUEAIQ9BACENQQAhBUEAIQ4DQAJAAkAgBEHYBWogDmooAgAiGUEATA0AQQQhByAJIQsCQAJAAkAgGUEBayIMDgICAAELIAUhByAKIQsMAQsgESAQI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AKIBSIABEAgABAiCyAEKALYAyIABEAgABAiCyAEKALYBiIABEAgABAiCyAEKAKABiIABEAgABAiCyAEKAKYBiIABEAgABAiCyAEKAK4BiIABEAgABAiCyAVBEAgFSAaRwRAA0AgGkEQayIAKAIAIgEEQCABECILIABBADYCACAaQQxrQgA3AgAgGkEgaygCACIABEAgABAiCyAVIBpBQGoiGkcNAAsLIBUQIgsgBCgCkAQiAARAIAAQIgsgBCgCyAQiAARAIAAQIgsgBCgC2AQiAARAIAAQIgsgBCgC6AQiAARAIAAQIgsgBCgC+AQiAARAIAAQIgsgBEGACGokAAvHAQECfyACIAJBA20iAkEDbGsiAyABIAIQ2AMiBEYEQCAAQX82AgggAEJ/NwIADwsgBEEASARAIAAgAzYCBCAAIAI2AgAgAEEEQQggA0EBRhtBACADG0GUlQFqKAIANgIIDwsgACABKAJoIAJBDGxqIARBAnRqKAIAQQNtIgEgAiABIAJIIgEbNgIAIABBBEEIIARBAUYbQQAgBBtBlJUBaigCACICIANHQQJBAyACIANGGyABGyIBNgIEIAAgAUEBakEDcTYCCAufAwEGfyMAQSBrIgMkACADQX82AhwgA0F/NgIYIANBfzYCFCADQX82AhAgA0ECNgIMIANCgICAgBA3AgQgAkEDbCEGA0AgA0EEaiAFaigCACIHIAZqIQggA0EcaiEEAkACQAJAAkAgBw4DAwABAgsgA0EYaiEEDAILIANBFGohBAwBCyADQRBqIQQLIAQgCDYCACAFQQRqIgVBDEcNAAsCQCAAAn8gASACENgDIgRBAEgEQCADKAIUIQUgAygCGCECIAMoAhwhBCADKAIQDAELIAIgASgCaCACQQxsaiAEQQJ0aigCACIFQQNtIgZKBEAgAEJ/NwIIIABCfzcCAAwCCyADQRxqIQECQAJAAkACQCAEDgMDAAECCyADQRhqIQEMAgsgA0EUaiEBDAELIANBEGohAQtBfkEBQX5BASAFIAZBA2xrQQJGGyAFaiIEQQNvQQJGGyAEaiECQX5BAUF+QQEgASgCACIBQQNvQQJGGyABaiIFQQNvQQJGGyAFags2Agwg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BEBBACEFA0AgAygCWCAFai0AAEEBRgRAIANBAjYCECADQoCAgIAQNwIIIAVBA2whB0EAIQQDQAJAAkAgACgCaCADQQhqIARqKAIAIAdqIghBAnRqKAIAQQNtIgYgAygCWGotAABBAUcNACAAKALYASIJIAVBBHRqIgooAgAgCSAGQQR0aiIGKAIARw0AIAooAgwgBigCDEcNACAKKAIIIAYoAghGDQELIANCADcDoAEgAyAINgKYASABIANBmAFqEEwLIARBBGoiBEEMRw0ACyAAKAJcIQQLIAVBAWoiBSAEQQNuSQ0ACwsgAgRAIAItABAEQCAAQQ4QLAwCCyACIAIoAgxBAWo2AgwLIANCADcCQCADIANBQGsiCjYCPAJAAkAgASgCACIHIAEoAgQiD0cEQANAAkAgBysDCCIWRAAAAAAAAPA/Zg0AIAcoAgQhDCADIAcoAgAiCCAIQQJ0IgEgACgCaGooAgAiDSAAKAJYIAFqIgEoAgAiECABQXhBBCAIQQNvQQJGG2ooAgAiEUgiEhsiCTYCMCAKIQECQAJAIAMoAkAiBUUNAANAIAEiBCAFIgYgBSgCECAJSCILGyEBIAVBBEEAIAsbaigCACIFDQALIAEgCkYNACAJIAQgBiALGygCEE4NAQsgAyADQTBqIgE2AgggA0GYAWoiBSADQTxqIgYgASADQQhqIgkQ5AEgAygCmAEiBEKAgICAgICA+D83AzAgBCANNgIoIAQgFjkDICAEIAw2AhwgBCAINgIYIBINASADIAE2AgggBSAGIAEgCRDkASADKAKYASEEIAMgATYCCCAFIAYgASAJEOQBIAMoApgBIQEgAyAEKQMgNwOgASADIAQpAxg3A5gBIAQgASkDMDcDICAEIAEpAyg3AxggASADKQOgATcDMCABIAMpA5gBNwMoDAELAn8gECARSARAIAMgA0EwaiIBNgIIIANBmAFqIANBPGogASADQQhqEOQBIAMoApgBQRhqDAELIAMgA0EwaiIBNgIIIANBmAFqIANBPGogASADQQhqEOQBIAMoApgBQShqCyIBIAErAwgiFyAWIBYgF2QbOQMICyAPIAdBEGoiB0cNAAwCCwALIANCADcCNCADIANB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iACIAIrA7gBOQOQAiACIAIrA6ABOQOIAiACIAIrA8gBOQOAAiACIAIrA7ABOQP4ASACIAIrA5gBOQPwASACIAIrA8ABOQPoASACIAIrA6gBOQPgASACIAIrA5ABOQPYASACIAJB2AFqEJABIAIrAwAhCyACKwMIIQwgAisDECENIAIrAxghDiACKwMgIQ8gAisDKCEQIAIrAzAhESACKwM4IRIgA0QAAAAAAADwv0QAAAAAAADwPyAELQCAARsiCiACKwNAojkDQCADIAogEqI5AzggAyAKIBGiOQMwIAMgCiAQojkDKCADIAogD6I5AyAgAyAKIA6iOQMYIAMgCiANojkDECADIAogDKI5AwggAyAKIAuiOQMAIAJBoAJqJAAgASgCACECIAMgBTYCVCAGIAIgBSADQdQAahDtAyADKAJYQRhqIANByAD8CgAAIAEoAgAhBgsgAyADQcwAaiIBNgJYIAMgBiABIANB2ABqEO0DIAAgAygCAEEYakHIAPwKAAAgA0HgAGokAAuzAQEGfyMAQRBrIgIkACABKAJMIQMgAEEANgIIIABCADcCACAAIAMQJSAAIAM2AgQgASgCTCEDIAJBADYCCCACQgA3AgAgAiADQQAQgQEgASgCXCIDBEADQCABKAJYIARBAnRqKAIAIgUgAigCAGoiBi0AACAGQQE6AABBAUcEQCAAKAIAIAVBAnRqIAQ2AgALIARBAWoiBCADRw0ACwsgAigCACIABEAgABAiCyACQRBqJAALkwQCBn8CfSACKAIAIQYgAAJ/AkAgASgCBCIERQ0AIAEoAgACfyAEQQFrIAZxIARpIgVBAU0NABogBiAEIAZLDQAaIAYgBHALIgdBAnRqKAIAIgJFDQAgAigCACICRQ0AIARBAWshCCAFQQFLIQkDQAJAIAYgAigCBCIFRwRAAkAgCUUEQCAFIAhxIQUMAQsgBCAFSw0AIAUgBHAhBQsgBSAHRw0DDAELIAIoAgggBkcNAEEADAMLIAIoAgAiAg0ACwtBEBAjIgIgBjYCBCACQQA2AgAgAygCACgCACEDIAJBADYCDCACIAM2AggCQEEAIAQgASgCDEEBarMiCiABKgIQIgsgBLOUXhsN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CGCAIQgA3AhAgCCgCACIARQ0AIAAQIgsgBygCwAQiAEUNACAAECILIAdBsAhqJAALLAECfyAAKAIAIgEoAgAiAgRAIAEgAhCGAiAAKAIAIgAoAgAgACgCCBoQIgsLvwMBAX8gACABRwRAAkAgACgCDCICRQ0AIAIgAigCACICQQFrNgIAIAJBAUoNACAAKAIMIgIEQCACECILIABBADYCDCAAKAIAIgIEQCACECILIABBADYCCCAAQgA3AgALIAAgASgCDDYCDCABQQA2AgwgACABKAIANgIAIAAgASgCBDYCBCAAIAEoAgg2AgggAUEANgIIIAFCADcCAAJAIAAoAhwiAkUNACACIAIoAgAiAkEBazYCACACQQFKDQAgACgCHCICBEAgAhAiCyAAQQA2AhwgACgCECICBEAgAhAiCyAAQQA2AhggAEIANwIQCyAAIAEoAhw2AhwgAUEANgIcIAAgASgCEDYCECAAIAEoAhQ2AhQgACABKAIYNgIYIAFBADYCGCABQgA3AhACQCAAKAIsIgJFDQAgAiACKAIAIgJBAWs2AgAgAkEBSg0AIAAoAiwiAgRAIAIQIgsgAEEANgIsIAAoAiAiAgRAIAIQIgsgAEEANgIoIABCADcCIAsgACABKAIsNgIsIAFBADYCLCAAIAEoAiA2AiAgACABKAIkNgIkIAAgASgCKDYCKCABQQA2AiggAUIANwIgCwujTgIefxB8IwBBgANrIgokAAJAIAEoAgQiBUUNAAJAIAJFDQAgAi0AEEEBRw0AIABBDhAsDAELIAEoAgAhASAKIAU2AkwgCiABNgJIIApB0ABqIgNCADcCLCADQQA2AiQgA0IANwIcIAMgCigCSDYCLCADIAooAkw2AjAgA0IANwJEIANCADcCPCADQgA3AjRBBBAjIgFBATYCACADQQA2AogBIANCADcCgAEgA0EANgJ4IANCADcCcCADQQA2AmggA0IANwJgIANBADYCWCADQgA3AlAgAyABNgJMIANBADYC9AEgA0IANwLsASADQQA2AuQBIANCADcC3AEgA0EANgLUASADQgA3AswBIANBADYCxAEgA0IANwK8ASADQgA3A6gBIANCADcDsAEgA0H8AWpBAEEw/AsAIAp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gEoAkRFDQAgAS0AQEECcQ0AIA8gCDYCBCALIA9BBGoQgAQgASABLQBAQQJyOgBACyAFIAdBBGoiB0cNAAsMAgsgASAFQf4BcToAQAJAIAMoAuABIgUgAygC5AEiAU8EQCAXIAFBAXRBgAEgARsQJSADIAMoAuABIgVBAWo2AuABDAELIAMgBUEBajYC4AELIAMoAtwBIAVBAnRqIAk2AgAgAygCNCADKAJQIAlBAnRqKAIAQcgAbGoiASABLQBAQQRBCEEQIAMoAmAgASgCACIBQQJ0aigCACAJRhsgASAJRhtyOgBADAALAAsgAygCnAIiAQ0ACwsgA0GgAmogAygCoAIQhgIgD0EQaiQAIAMtABhBAUYEQCADKAIcIgEgAygCIEEYbGpBGGsiBSABKQMQNwMQIAUgASkDCDcDCCAFIAEpAwA3AwALIAMoAkQhASAGQQA2AoABIAZCADcCeEEEECMiBUEBNgIAIAYgBTYChAEgBkH4AGogARA5IAYgATYCfCADKAJEIQEgBkEANgJwIAZCADcCaCAGQegAaiABECUgBiABNgJsIAMoAkQhASAGQQA2AmAgBkIANwJYIAZB2ABqIAFBABAxIAMoAkQhASAGQQA2AlAgBkIANwJIIAZByABqIAEQJSAGIAE2AkwgAygCNCEBIAMoAjghBSAGQQA2AkAgBkIANwI4IAZBOGogBSABa0HIAG0iARAlIAYgATYCPCAGQQA2AjQgAygCRCIHBEADQAJAIA1BBHQiBCADKAJAaigCCEEASA0AIAMoAjQgDUECdCIFIAMoAlBqKAIAIgFByABsaigCAEF/Rg0AIAYoAlggAUECdGoiASABKAIAIgFBAWo2AgAgAUEASg0AIAYgBigCNCIBQQNqNgI0IAYoAkggBWogATYCACABQQR0IgggBigCeGoiCyADKAJAIARqIgQpAgg3AgggCyAEKQIANwIAIAYoAmggAUECdGogAygCUCAFaigCADYCACADKAJgIAVqKAIAIgtBAnQiBSAGKAJIaiABQQFqIgQ2AgAgBEEEdCIMIAYoAnhqIgkgAygCQCALQQR0aiILKQIINwIIIAkgCykCADcCACAGKAJoIARBAnRqIAMo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B0EEdGohCyAGKAJYIQggBSEBA0AgASAIIAEoAgBBAnRqKAIANgIAIAEgCCABKAIEQQJ0aigCADYCBCABQRBqIgEgC0cNAAsLIAogBigChAE2AgwgBkEANgKEASAKIAc2AgQgCiAFNgIAIAogBigCgAE2AgggBkEANgKAASAGQgA3AnggBigCECEBIAogBDYCFCAKIAE2AhAgCiAGKAIYNgIYIAYoAjgiAQRAIAEQIgsgBigCSCIBBEAgARAiCyAGKAJYIgEEQCABECILIAYoAmgiAQRAIAEQIgsLIAZB+ABqEEkgBkGQAWokACAKIABByABqNgI0IAogCkE4ajYCMCAKKAIwIgEoAgAiBQRAIAUQIgsgAUIANwIAIAEgCigCADYCACABIAooAgQ2AgQgASAKKAIINgIIIApBADYCCCAKQgA3AgAgCigCNCIBIApBEGpHBEAgASgCACIFBEAgBRAiCyABQQA2AgggAUIANwIAIAEgCigCEDYCACABIAooAhQ2AgQgASAKKAIYNgIIIApBADYCGCAKQgA3AhALIAooAhAiAQRAIAEQIgsgCkEANgIYIApCADcCECAKEEkgCiAKKQI4NwIwIApBADYCCCAKQgA3AgBBBBAjIgFBATYCACAKQQA2AhggCkIANwIQIAogATYCDEEEECMiAUEBNgIAIApBADYCKCAKQgA3AiAgCiABNgIcQQQQIyIBQQE2AgAgCiABNgIsIAoQ7wIgCiAKKAI0EMkBIAooAjQiBwRAIAooAiAhCCAKKAIQIQsgCigCACEMIAooAjAhBkEAIQEDQCAMIAFBAnQiBWogBiABQQR0aiIEKAIANgIAIAUgC2ogBCgCCDYCACAFIAhqIAQoAgw2AgAgAUEBaiIBIAdHDQALCyAAQdgAaiAKEP0DIApBIGoQSSAKQRBqEEkgChBJAkACQCACBEAgAi0AEEEBRgRAIABBDhAsDAMLIAAQWCAAQQAQjQEgABCOASAAIAIQVCACLQAQQQFHDQEgAEEOECwMAgsgABBYIABBABCNASAAEI4BIABBABBUCyAAEFoLIAooAjgiAARAIAAQIgsjAEEQayIAJAAgACADQaACajYCBCAAQQRqEPwDIANBi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AAAAAAAAAABkRQ0AIAogASsDQKEgCCACKwNoIguiIAQgAisDYCINoqGiIAcgASsDMKEgBCACKwNwIgyiIAYgC6KhokQAAAAAAAAAAKAgCSABKwM4oSAGIA2iIAggDKKhoqCgRAAAAAAAAAAAZEUNACAKIAogBiACQRhqQQhBECAZQQFGG0EAIBkbaisDACIFoiARo6ChIgYgBqIgByAHIAggBaIgEaOgoSIGIAaiIAkgCSAEIAWiIBGjoKEiBSAFoqCgIQUMAQsgBUQAAAAAAAAAACAaQQFxGyEFCyACQcABaiQAIAMgBSADKwMAIgYgBSAGYxs5AwAgHkGgAWokAAuQAQECf0EBIQEgACgCTCICBEAgACgCSCIAIAJBGGxqIQIDQCABIAApAwBC////////////AINCgICAgICAgPj/AFQgACkDCEL///////////8Ag0KAgICAgICA+P8AVHEgACkDEEL///////////8Ag0KAgICAgICA+P8AVHFxIQEgAEEYaiIAIAJHDQALCyABC7ICAgt8Bn8gACgCXCIOQQNPBHwgDkEDbiESIAAoAkghDyAAKAJYIQ5BACEAIAFBAUchAQNAIA8gDiAAQQxsaiINKAIEQRhsaiIQKwMAIA8gDSgCAEEYbGoiESsDACIHoSIEIA8gDSgCCEEYbGoiDSsDCCARKwMIIgihIgqiIBArAwggCKEiCyANKwMAIAehIgKioSEGIBArAxAgESsDECIJoSIMIAKiIAQgDSsDECAJoSICoqEhBCALIAKiIAwgCqKhIQIgBSABBHwgCSAGoiAIIASiIAcgAqJEAAAAAAAAAACgoKBEAAAAAAAAGECjBSAGIAaiIAIgAqIgBCAEoqCgn0QAAAAAAADgP6ILIgIgAyADIAKgIgOhoKAhBSAAQQFqIgAgEkcNAAsgBSADoAUgAwsL1QICCX8GfEEBIQECQCAAKAJMIAAoAlwiA0EBdmsgA0EDbmpBfnFBAkcNACADBEAgACgCSCEEIAAoAmghBiAAKAKoASEFIAAoAlghB0EAIQADQAJAIAcgAEECdCICaiIBKAIAIgggAUF4QQQgAEEDb0ECRhtqKAIAIglODQAgBSAAQQNuQRhsa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KAIIIQYgACABKAIMNgIIIAEgAzYCACABIAY2AgwgARDWAQsgB0EgaiQADAELECYACyAEKAIMIgMgBCgCBCAEKAIAIgFrQQR1SQRAA0AgBSABIANBBHRqIgEoAgA2AgQgBSABKAIQNgIIIAUgASgCIDYCDCAAIAVBBGoQnQUgA0EDaiIDIAQoAgQgBCgCACIBa0EEdUkNAAsLIAVBEGokACAEQRhqEMcBIAQoAgAiAARAIAQgADYCBCAEKAIIGiAAECILIARBMGokAAtFAQF/IAAoAgwEQCAAKAIIEMUEIABBADYCCAJAIAAoAgQiAUUNACABQQJ0IgFFDQAgACgCAEEAIAH8CwALIABBADYCDAsLxAECAn8CfCABKAI4IgIgASgCPCIDNgI8IAMgAjYCOCACIAMrAyAgAisDIKEiBCADKwMYIAIrAxihIgUgBaIgBCAEoqCfIgSjRAAAAAAAAAAAIAUgBKMiBL1C////////////AINCgICAgICAgPj/AFQiAxs5AzAgAiAERAAAAAAAAAAAIAMbOQMoAkAgASgCOCgCACICIAEoAgAiA0YNACADIAEoAjwoAgAiAUYgASACRnINACAAQcgAaiACIAMgARCOBAsLZQECfwJAIAEoAgQiA0UEQCABIQIDQCACIAIoAggiAigCAEcNAAsMAQsDQCADIgIoAgAiAw0ACwsgASAAKAIARgRAIAAgAjYCAAsgACAAKAIIQQFrNgIIIAAoAgQgARDEBCABECILWgEDfyAAKAIIIAFJBEAgAUEYbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBGGxBBGsiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALC74BAQR/IAAQiQQgASgCACEDIAFBADYCACAAKAIAIQIgACADNgIAIAIEQCAAKAIEGiACECILIAAgASgCBDYCBCABQQA2AgQgACABKAIMIgI2AgwgACABKgIQOAIQIAAgASgCCCIDNgIIIAIEQCAAQQhqIQQgAygCBCECAkAgACgCBCIDIANBAWsiBXFFBEAgAiAFcSECDAELIAIgA0kNACACIANwIQILIAAoAgAgAkECdGogBDYCACABQgA3Agg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kCyACQRBqJAALwgEBA38jAEEgayIEJAACQCAAKAIIIAAoAgAiAmtBGG0gAUkEQCABQavVqtUATw0BIARBDGogASAAKAIEIAJrQRhtIAAQZCEBIAAoAgAiAiAAKAIEIgMgASgCBCADIAJrQWhtQRhsaiIDEKUCIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQpAILIARBIGokAA8LECYAC4whAxJ/FXwBfiMAQZADayIFJAACQAJAAkAgBEUNACAELQAQQQFHDQBBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQahA7IQIgAUEONgJUIAUgATYCjAEgBSACNgKIASABIAEoAgRBAWo2AgQgBSAFKQKIATcDKCAAIAVBKGoQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgARCFBCEHAn8gAhCFBCILIAdFckUEQCABIQZBAQwBCyACIQYgASECIAchCSALCyEMIAYoAlxBAk0EQEGoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAIQNyECIAUgATYChAEgBSACNgKAASABIAEoAgRBAWo2AgQgBSAFKQKAATcDACAAIAUQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgAigCXCEIQagCECMiD0GgkAI2AgAgD0IANwIEIA9BEGohAQJAIAhBAk0EQCABIAYQNyEBIAUgDzYCfCAFIAE2AnggDyAPKAIEQQFqNgIEIAUgBSkCeDcDCCAAIAVBCGoQSBoMAQsgASACEDchASAFIA82AlwgBSABNgJYIA8gDygCBEEBajYCBCAFIAUpAlg3AyAgBUHgAGogBUEgahBIIRMgBUEANgJUIAVCADcCTCAFQcwAaiIBIAIoAlxBA25B5wdqQegHbkEBahCTBCABAn8gASgCBCIIIAEoAghJBEAgCCATEC5BGGoMAQsjAEEgayINJAAgASgCBCABKAIAIgprQRhtIg5BAWoiCEGr1arVAE8EQBAmAAsgDUEMakGq1arVACABKAIIIAprQRhtI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PCyADIAApAwg3AwggAyAAKQMANwMAIAMgASkDCDcDGCADIAEpAwA3AxAPCyACQQhMBEAgACABRg0DIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiIEIAFGDQMgAyEFA0AgBSICQRBqIgUhAAJAIAQrAwAgAisDAGRFDQAgBSACKQMINwMIIAUgAikDADcDACADIQAgAiADRg0AA0AgBCsDACACQRBrIgArAwBkRQRAIAIhAAwCCyACIAApAwg3AwggAiAAKQMANwMAIAAiAiADRw0ACyADIQALIAAgBCkDCDcDCCAAIAQpAwA3AwAgBEEQaiIEIAFHDQALDAMLIAAgACACQQF2IgRBBHQiBmoiBSAEIAMgBBDFASAFIAEgAiAEayICIAMgBmogAhDFASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMINwMIIAMgACkDADcDACADQRBqIQMgAEEQaiIAIAVHDQALDAQLAkAgAisDACAAKwMAZARAIAMgAikDCDcDCCADIAIpAwA3AwAgAkEQaiECDAELIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiEACyADQRBqIQMgACAFRw0ACwwBCyADIAApAwg3AwggAyAAKQMANwMADAELIAEgAkYNAANAIAMgAikDCDcDCCADIAIpAwA3AwAgA0EQaiEDIAJBEGoiAiABRw0ACwsLbAEBfyAAKAIIIgFFBEBBAA8LAkAgACABKAIAIgBGBEAgAUEANgIAA0AgASgCBCIARQ0CA0AgACIBKAIAIgANAAsMAAsACyABQQA2AgQgAEUNAANAIAAiASgCACIADQAgASgCBCIADQALCyABC6ICAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCADcCACACQQhqIQEMAQsgAiAAKAIAIgRrQQN1IgZBAWoiAkGAgICAAk8NASAFQQxqQf////8BIAMgBGsiA0ECdSIEIAIgAiAESRsgA0H4////B08bIAYgABBLIgIoAgggASkCADcCACACIAIoAghBCGo2AgggAigCBCAAKAIEIAAoAgAiA2siAWshBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCB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YCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASADQQA2AuwBIANCADcC5AEgA0EANgLgASADQgA3AtgBAkACQAJAAkAgAQ4DAAECAwsgA0EYaiIBQYD5AEHgAPwKAAAgA0HkAWogASADQfgAakEEEPECIAFB4PkAQTD8CgAAIANB2AFqIAEgA0HIAGpBBBDwAgwCCyADQRhqIgFBkPoAQcAB/AoAACADQeQBaiABIANB2AFqIgVBCBDxAiABQdD7AEGQAfwKAAAgBSABIANBqAFqQQwQ8AIMAQsgA0EYaiIBQeD8AEGQAfwKAAAgA0HkAWogASADQagBakEGEPECIAFB8P0AQeAA/AoAACADQdgBaiABIANB+ABqQQgQ8AILIAMoAugBIgYgAygC5AEiBWsiAUEYbSEHAkAgBSAGRiIGDQAgARAnIQQgAUUNACAEIAUgAfwKAAALIAAoAkgiBQRAIAUQIgsgACAHNgJQIAAgBzYCTCAAIAQ2AkggBkUEQCABIARqIQEDQCADIAQrAwA5AxggAyAEKwMIOQMgIAQrAxAhCCADQoCAgICAgID4PzcDMCADIAg5AyggAyACIANBGGoQoQEgBCADKQMQNwMQIAQgAykDCDcDCCAEIAMpAwA3AwAgBEEYaiIEIAFHDQALCyADQQA2AhggAyADKALcASIFIAMoAtgBIgJrIgFBDG0iBDYCICADIAQ2AhxBACEEAkAgAiAFRg0AIAMgARAnIgQ2AhggAUUNACAEIAIgAfwKAAALIANBADYCCCADQgA3AgAgACADQRhqIAMQngEgBARAIAQQIgsgABCOASAAEFggACAAEKIBRBHqLYGZl3E9oiIIRAAAAAAAAPC/IAhEAAAAAAAA8L9kGyIIRAAAAAAAAPC/IAi9Qv///////////wCDQoCAgICAgID4/wBUGyIIOQMwIAAgCCAAKwM4IgkgCCAJZBs5AzggAEEAEFQgABBaIAMoAtgBIgEEQCADIAE2AtwBIAMoAuABGiABECILIAMoAuQBIgEEQCADIAE2AugBIAMoAuwBGiABECILIAN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ABKAIENgIMIAFCADcCACACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgACADNgIEIAAgATYCACAAIANBFGogARCPASACQRBqJAAL9AQCDn8GfCMAQYABayICJAAgASgCDCEDIAJCADcDICACQoCAgICAgID4PzcDGCACQgA3AyggAkIANwMwIAJCADcDQCACQoCAgICAgID4PzcDOCACQgA3A0ggAkIANwNQIAJCADcDYCACQoCAgICAgID4PzcDWCACQgA3A2ggAkIANwNwIAIgAUEYaiIHIAJBGGoQygECQCACKwMAIAIrAwhhBEAgACADQTD8CgAADAELIAIgASkDcDcDKCACIAEpA2g3AyAgAiABKQNgNwMYIAIgASkDcDcDECACIAEpA2g3AwggAiABKQNgNwMAIAFByABqIQggAUEwaiEJIANBGGohCgNAIAhBCEEQIAVBAUYbQQAgBRsiBGohCyAEIAdqIQwgBCAJaiENIAIgBGoiDisDACERIAJBGGogBGoiDysDACESQQAhAQNAIBECfwJAAkACQCABDgIAAQILIAwrAwAgAysDAKIhEEEAIQYgBwwCCyANKwMAIAMrAwiiIRBBCCEGIAkMAQsgCysDACADKwMQoiEQQRAhBiAICyAEaisDACAGIApqKwMAoiITIBAgECATYxugIREgEiATIBAgECATZBugIRIgAUEBaiIBQQNHDQALIA8gEjkDACAOIBE5AwAgBUEBaiIFQQNHDQALIAIrAwAhECACKwMYIREgAisDCCESIAIrAyAhEyAAIAIrAxAiFCACKwMoIhUgFCAVZCIBGzkDKCAAIBIgEyASIBNkIgMbOQMgIAAgECARIBAgEWQiBBs5AxggACAVIBQgARs5AxAgACATIBIgAxs5AwggACARIBAgBBs5AwALIAJBgAFqJAAL/AMCBX8MfCMAQfABayIDJAAgASsDGCEIIAErAyAhCSABKwMoIQogASsDMCELIAErAzghDCABKwNAIQ0gASsDSCEOIAErA1AhDyABKwNYIRAgASsDYCERIAErA2ghEiABKwNwIRMgA0KAgICAgICA+D83A3ggAyATOQNwIAMgEjkDaCADIBE5A2AgA0IANwNYIAMgEDkDUCADIA85A0ggAyAOOQNAIANCAD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wMIIAMgACkDADcDACADIAIpAwA3AxggAyACKQMINwMgIAMgAikDEDcDKA8LIAJBCEoNASAAIAFGDQIgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiICIAFGDQIgAyEFA0AgACEGIAIhACAFIgJBGGohBQJ/IAYrAxgiByACKwMAIghjRQRAIAUiBCAHIAhiDQEaIAQgBigCJCACKAIMTg0BGgsgBSACKQMQNwMQIAUgAikDCDcDCCAFIAIpAwA3AwAgAyACIANGDQAaAkADQCAAKwMAIgcgAkEYayIEKwMAIghjRQRAIAcgCGINAiAGKAIkIAJBDGsoAgBODQILIAIgBCkDEDcDECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADDAELIAILIgQgACkDEDcDECAEIAApAwg3AwggBCAAKQMANwMAIABBGGoiAiABRw0ACwwCCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyAAIAAgAkEBdiIFQRhsIgZqIgQgBSADIAUQywEgBCABIAIgBWsiAiADIAZqIAIQywEgBCECA0AgASACRgRAIAAgBEYNAgNAIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIANBGGohAyAAQRhqIgAgBEcNAAsMAgsCQAJAIAIrAwAiByAAKwMAIghjRQRAIAcgCGINASACKAIMIAAoAgxODQELIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAJBGGohAgwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIQALIANBGGohAyAAIARHDQALIAEgAkYNAANAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyACQRhqIgIgAUcNAAsLC4sBAQV/IwBBEGsiA0KAgICAEDcCBCADQQI2AgwgACgCACgCACABQQxsaiEEIAAoAgQgAUECdGoiBSgCACEBIAAoAgwhBkEAIQADQCAFIAEgBiAEIANBBGogAGooAgBBAnRqKAIAQQJ0aigCACICIAJBH3UiAnMgAmtqIgE2AgAgAEEEaiIAQQxHDQALCwIAC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sDECEWIAUrAxghFSAFKwMICyIUvUL///////////8Ag0L/////////9/8AVg0AAkAgBCgCBCIBIAQoAggiBk8EQCAEIAZBAXRBgAEgBhsQRCAEIAQoAgQiAUEBajYCBAwBCyAEIAFBAWo2AgQLIAQoAgAgAUEDdGogDq0gA61CIIaENwIAIARBEGohAwJAIAQoAhQiASAEKAIYIgZPBEAgAyAGQQF0QYABIAYbECUgBCgCECAEKAIUIgFBAnRqIAA2AgAMAQsgAygCACABQQJ0aiAANgIACyAEIAFBAWo2AhQgBEEgaiEAAn8gBCgCJCIIIAQoAigiAU8EQCAAIAFBAXRBgAEgARsQMyAEKAIgIAQoAiQiCEEYbGoMAQsgACgCACAIQRhsagsiASAUOQMAIAQgCEEBajYCJCABIBY5AxAgASAVOQMICyACQYGAgIB4cUEBRiEGCyAFQdABaiQAIAYLwwYBCX8CQAJAAkACQAJAIAMOAwQCAAELAkAgAigCACgCACIDIAFBBGsiASgCACIGQQN0aiIHIAIoAgQoAgAiAkECdCIFaigCACILIAUgAyAAKAIAIgVBA3RqIgNqKAIAIglOBEAgCSALRw0BIAdBASACa0ECdCICaigCACACIANqKAIATg0BCyAEIAY2AgAgBCAAKAIANgIEDwsgBCAFNgIAIAQgASgCADYCBA8LIANBCEoNASAAIAFGDQIgBCAAKAIANgIAIABBBGoiBiABRg0CQQEgAigCBCgCACIAayELIAIoAgAoAgAhByAAQQJ0IQUgBCEAA0AgAEEEaiECAkACfwJAAkAgByAGKAIAIgNBA3RqIgkgBWooAgAiCCAHIAAoAgAiCkEDdGoiDCAFaigCACINTgRAIAggDUcNASAJIAtBAnQiCGooAgAgCCAMaigCAE4NAQsgACAKNgIEIAQgACAERg0CGgNAIAcgBigCAEEDdGoiCSAFaigCACIIIAcgAEEEayIDKAIAIgpBA3RqIgwgBWooAgAiDU4EQCAIIA1HDQMgCSALQQJ0IghqKAIAIAggDGooAgBODQMLIAAgCjYCACADIgAgBEcNAAsgBAwCCyACIAM2AgAMAgsgAAsgBigCADYCAA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igCACINTgRAIAwgDUcNASAJQQEgCGtBAnQiCGooAgAgBSAIaigCAE4NAQsgBCALNgIAIANBBGohAwwBCyAEIAo2AgAgAEEEaiEACyAEQQRqIQQgACAGRw0ACyABIANGDQADQCAEIAMoAgA2AgAgBEEEaiEEIANBBGoiAyABRw0ACwsL6gwDDHwRfwF+IwBBkAFrIhQkACAUQeAAakEAQTD8CwAgFEEwakEAQTD8CwAgFCAENgIsIBQgAzYCKCAUQoCAgIAQNwIAIAEoAgQiGigCSCIfIAdBGGwiFWoiICsDACILIB8gBkEYbCIXaiIhKwMAIgyhIQ4gBUEDbSEiIBooApgBIiMgFWorAwAhDyAXICNqKwMAIRAgASgCACIbKAKYASEcIBsoAkghHUEAIQFBACEXA0ACfyAPIBwgFEEoaiAUIBdqKAIAIh5BAnRqKAIAQRhsIhVqKwMAmiIJZCAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAmiEPIAMgHGorAwCaIRBBACEXA0ACfyAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJIBBkIAwgAyAfaiIDKwMAIghjIAggDGEbIAkgD2QgCCALZCAIIAthG2siHEUEQEQAAAAAAAD4fyEJRAAAAAAAAPh/IQpBAAwBCyAGKwMQIQogBisDCCEJAkAgCCAMoSINIAggC6EiCCANmSAImWMiFRsgDqMiCL1C////////////AINC//////////f/AFYNACAEKwMIIg0gCaEiEb1C////////////AINCgICAgICAgPj/AFoNACAEKwMQIhIgCqEiE71C////////////AINCgICAgICAgPj/AFoNACAKIBIgFRsgCCAToqAhCiAJIA0gFRsgCCARoqAhCQsgHEEAIBsoAqgBIhUgB0EYbGorAwggFSAbKAJoIAJBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAkgAysDCCIIYyAIIAlhGxsLIRUCQCAJvUL///////////8Ag0L/////////9/8AVg0AIBVBACAVayAYGyAZaiEZIAFBAUoEQEECIQEMAQsgAUUgFUUgFnNFckUEQEEBIQEMAQsgAUEYbCIYIBRBMGpqIhYgAykDACIlNwMAIBYgAykDEDcDECAWIAMpAwg3AwggFEHgAGogGGoiAyAJOQMIIAMgCjkDECADICU3AwAgAUEBaiEBIBVBAEchFgsgF0EEaiIXQQhHDQALAn8gGUUEQEQAAAAAAAD4fyEIRAAAAAAAAPh/IQtEAAAAAAAA+H8hCkQAAAAAAAD4fyEJQQAMAQsgFCAUQeAAaiAUQfgAaiAUQTBqIBRByABqEM4BIBQrAwghCyAUKwMAIQggGUEAIBsoAqgBIgEgB0EYbGorAxAgASAbKAJoIAJBAnRqKAIAQQNtQRhsaisDEKCaIBooAqgBIgEgIkEYbGorAxAgASAaKAJoIAVBAnRqKAIAQQNtQRhsaisDEKBjIBQrAx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8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAIQ8gAyAcaisDACEQQQAhFwNAAn8gECAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJYyAMIAMgH2oiAysDACIIYyAIIAxhGyAJIA9kIAggC2QgCCALYRtrIhxFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgBisDECEKIAYrAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgBCsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgBCsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLIBxBACAbKAKoASIVIAdBGGxqKwMIIBUgGygCaCACQQJ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ACgCWCIPIApBAXUiECAKaiIRQQJ0aiESIAAoAmghE0EAIQEDQEEBIQwCQCAPIAJBgAJqIAFqKAIAIgcgEWoiDUECdCIEaigCACIAIBJBBEEIIAdBAUYbQQAgBxtBjOkAaigCAEECdGooAgAiA0gEQCAAIQQgAyEADAELIAQgE2ooAgAhDUEAIQwgAyEECyACQZACaiIUIAdBBHRqIgMgDDoADCADIAA2AgggAyAENgIEIAMgDTYCACABQQRqIgFBDEcNAAsgAkGAAmogDiALIBAgFBCMAyACKQOIAkL///////////8Ag0L/////////9/8AVg0AIAgoAggoAgAgC0ECdGoiACAAKAIAIAIoAoACajYCAAsgCkGBgICAeHFBAUYLIQcCQCAZIBYgBUEwbGoiACsDGGVFDQAgGSAAKwMAZkUNACAYIAArAyBlRQ0AIBggACsDCGZFDQACQCAFQQFxDQAgCCgCBCgCACAVaigCACELIAgoAgAiDigCBCEAIAJBAjYCiAIgAkKAgICAEDcCgAIgACgCWCIPIAVBAXUiECAFaiIRQQJ0aiESIAAoAmghE0EAIQEDQEEBIQwCQCAPIAJBgAJqIAFqKAIAIgYgEWoiDUECdCIEaigCACIAIBJBBEEIIAZBAUYbQQAgBhtBjOkAaigCAEECdGooAgAiA0gEQCAAIQQgAyEADAELIAQgE2ooAgAhDUEAIQwgAyEECyACQZACaiIUIAZBBHRqIgMgDDoADCADIAA2AgggAyAENgIEIAMgDTYCACABQQRqIgFBDEcNAAsgAkGAAmogDiALIBAgFBCMAyACKQOIAkL///////////8Ag0L/////////9/8AVg0AIAgoAggoAgAgC0ECdGoiACAAKAIAIAIoAoACajYCAAsgBUGBgICAeHFBAUYhBgsCQCAGIAdyRQRAIAlBAEgNASACIAlBAnRqKAIAIQAgCUEBayEJDAILIAogBSAHGyEAIAdFIAZFcg0BIAIgCUEBaiIJQQJ0aiAFNgIADAELCyACQcACaiQAC5AIAhZ/AnwjAEHAAmsiAiQAIAAoAgAiBCgCACgCSCABQQJ0IhUgBCgCBCgCAGooAgBBGGxqIgErAwghG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CABSQRAIwBBIGsiBiQAAkACQCABIARrIgQgACgCCCIFIAAoAgQiA2tBBHVNBEAgACAEBH8gAyAEQQR0aiEAA0AgAyACKQMINwMIIAMgAikDADcDACADQRBqIgMgAEcNAAsgAAUgAws2AgQMAQsgAyAAKAIAIgNrQQR1IgcgBGoiAUGAgICAAU8NASAGQQxqQf////8AIAUgA2siA0EDdSIFIAEgASAFSRsgA0Hw////B08bIAcgABAyIgEoAggiAyAEQQR0aiEEA0AgAyACKQMINwMIIAMgAikDADcDACADQRBqIgMgBEcNAAsgASAENgIIIAEoAgQgACgCBCAAKAIAIgRrIgJrIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2AgwgARA2CyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEEdGo2AgQLCwsIACAAIAEQTAsQACAAKAIEIAAoAgBrQRhtCxAAIAAoAgQgACgCAGtBDG0LEAAgACgCBCAAKAIAa0EGdQsoACABIAAoAgBqIgAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMACzQBAX8gACgCACECQRgQIyIAIAEgAmoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAALDwAgASAAKAIAaiACNgIACw0AIAEgACgCAGooAgALLwECfyMAQSBrIgIkACACQQhqIgMgASAAEQEAQRgQIyADEC4gAxAoGiACQSBqJAALMwEDf0EEECMiAiABNgIAQZjxASAAQQNBACEAQfCHAiAAQfbcAGpBtgIgAkEAQQBBABAACwwAIAAQsAUaIAAQIgs3AQJ/IABB+O4BNgIAIAAoAgQiAkEEayIBIAEoAgBBAWsiATYCACABQQBIBEAgAkEMaxAiCyAAC8EEAQN/AkAgACABKAIIIAQQcwRAIAIgASgCBEcNASABKAIcQQFGDQEgASADNgIcDwsCQCAAIAEoAgAgBBBzBEACQCABKAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQMgAUEBNgIgDws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8jAEFAaiICJAAgASAAKAIEIgNBAXVqIQEgACgCACEAIAIgASADQQFxBH8gASgCACAAaigCAAUgAAsRAQBBwAAQIyACEEAgAhBBGiACQUBrJAALdQECfyMAQSBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEgECMiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBIGokACAAC7oBAQN/IwBBEGsiAyQAIAAoAgAhAiADIAEgACgCBCIAQQF1aiIBIABBAXEEfyABKAIAIAJqKAIABSACCxEBAEEMECMiAEEANgIIIABCADcCACADKAIEIgIhBCACIAMoAgAiAWtBBnUiAgRAIAAgAhCVAyAAKAIEIQIgASAERwRAA0AgAiABEEBBQGshAiABQUBrIgEgBEcNAAsLIAAgAjYCBAsgAyADNgIMIANBDGoQmAMgA0EQaiQAIAALVwECfyMAQUBqIgMkACABIAAoAgQiBEEBdWohASAAKAIAIQAgAyABIAIgBEEBcQR/IAEoAgAgAGooAgAFIAALEQsAQcAAECMgAxBAIAMQQRogA0FAayQACwsAIAAQaRogABAiC3MBAn8jAEHQAGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACAEQQFxBEAgASgCACAAaigCACEACyADIAIpAwg3AwggAyACKQMANwMAIANBEGoiAiABIAMgABEDAEHAABAjIAIQQCACEEEaIANB0ABqJAALJAECfiAAKQMAIAEpAwBTIAApAwgiAiABKQMIIgNVIAIgA1EbCwYAQYCcAgsUACAAQQRqQQAgASgCBEGhmAFGGwtPAQJ/AkAgASgCBCICBEAgASgCACIBIAJBBHRqIQMDQCAAKAIEKAIQIgJFDQIgAiABIAIoAgAoAhgRAQAgAUEQaiIBIANHDQALCw8LEGYACxUAIAFByJsCNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQcibAjYCACABIAAoAgQ2AgQgAQsQACAAKAIMIAAoAghrQQJ1CwoAIABBCGoQhAILZwEDfyAAKAIEIgMgACgCCCIBRwRAA0AgACABQQRrIgE2AgggASgCACECIAFBADYCACACBEAgAiACKAIAKAIEEQAAIAAoAgghAQsgASADRw0ACwsgACgCACIBBEAgACgCDBogARAiCwviBAMGfwF8AX4jAEEgayIGJAACf0EwECMhAyMAQSBrIgIkACADQQA2AiggA0IANwMgIANBADYCECADQgA3AwggAyAANgIEIANBmJsCNgIAAkACQCAARQRAIANCgICAgICAgPg/NwMYIAJBADYCDCACQgA3AgREAAAAAAAA8D8hCAwBCyADIAArAxgiCDkDGCACQQA2AgwgAkIANwIEIAhEAAAAAAAAAABhDQELIAJBBGogASgCBCABKAIAa0EEdRBcIAEoAgAiBCABKAIEIgFHBEADQCAEKQMAIQkgAiAIIAQpAwi5ojkDGCACIAggCbmiOQMQIAJBBGogAkEQahBMIARBEGoiBCABRw0ACwsgA0EgahBFIAMgAigCBDYCICADIAIoAgg2AiQgAyACKAIMNgIoIAJBIGokACADDAELQQIQggIACyEDAkACQCAAKAIMIgEgACgCECICSQRAIAEgAzYCACABQQRqIQMMAQsgASAAQQhqIgQoAgAiBWtBAnUiB0EBaiIBQYCAgIAETw0BIAZBDGpB/////wMgAiAFayICQQF1IgUgASABIAVJGyACQfz///8HTxsgByAEEEoiASgCCCICIAM2AgAgASACQQRqNgIIIAEoAgQgACgCDCAAKAIIIgJrIgNrIQQgAwRAIAQgAiAD/AoAAAsgACgCCCECIAAgBDYCCCABIAI2AgQgACABKAIIIgM2AgwgASACNgIIIAAoAhAhBCAAIAEoAgw2AhAgASACNgIAIAEgBDYCDCABEMwFCyAAIAM2AgwgA0EEaygCACAGQSBqJAAPCxAmAAsJACAAEIMCECILcQEDfyMAQeAAayIDJAAgA0EANgIUIANCADcCDCADQQxqIgQgASgCACIFIAEoAgQiASABIAVrQQxtEEcgA0EYaiIBIAQgAiAAEQMAQcAAECMgARC0ASABEEEaIAMgBDYCXCADQdwAahApIANB4ABqJAALFQAgACgCBCAAQQRqIAAsAA9BAEgbCycAIABB6JoCNgIAIAAsAA9BAEgEQ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CJDcDACAAIAIQaiACIAE2AiwgAkEsahApIAIoAgwiAARAIAIgADYCECACKAIUGiAAECILIAJBMGokAAveBQIJfwF8IwBB0ABrIgYkACAGIAEQQBogBkEANgJIIAZCADcCQCAGQUBrIgFBARCVAyABKAIEIQMgASAGIgJHBEADQCADIAIQQBogA0FAayEDIAJBQGsiAiABRw0ACwsgASADNgIEIwBBkAFrIgIkACABKAIAIgMgASgCBCIHRwRAA0AgAkHQAGoiBCADEEAaIAQQywMgBWohBSAEEEEaIANBQGsiAyAHRw0ACwsgAkEANgJMIAJCADcCRCACQcQAaiAFEFwgASgCACIFIAEoAgQiB0cEQANAIAJB0ABqIgMgBRBAGiACQRhqIAMQTSACQQA2AkAgAkIANwI4IAJBOGogAigCGCIDKAIAIgQgAygCBCIDIAMgBGtBDG0QRwJAIAIoAhwiA0UNACADIAMoAgQiBEEBazYCBCAEDQAgAyADKAIAKAIIEQAAIAMQJAsgAigCOCIEIAIoAjwiCEcEQANAIAJBLGogBBA8IgkoAgAiAyACKAIwIgpHBEADQCADKwMAIQsgAiADKwMIOQMgIAIgCzkDGCACQcQAaiACQRhqEEwgA0EQaiIDIApHDQALIAkoAgAhAwsgAwRAIAIgAzYCMCACKAI0GiADECILIARBDGoiBCAIRw0ACwsgAiACQThqNgIYIAJBGGoQKSACQdAAahBBGiAFQUBrIgUgB0cNAAsLIAJBGGoiAyACQcQAahDKAyACQQA2AlggAkIANwJQIAJB0ABqIgUgAyACQSRqQQEQR0EYECMiA0G0mgI2AgAgA0IANwIEIANBDGoiBCAFEFsgAiADNgIUIAIgBDYCECACIAIpAhA3AwggACACQQhqEGogAiAFNgI4IAJBOGoQKSACKAIYIgAEQCACIAA2AhwgAigCIBogABAiCyACKAJEIgAEQCACIAA2AkggAigCTBogABAiCyACQZABaiQAIAYgATYCTCAGQcwAahCYAyAGEEEaIAZB0ABqJAALJAECfCAAKwMIIAErAwhjIAArAwAiAiABKwMAIgNjIAIgA2EbCwYAQfz9AQvZGgIRfwd8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kEANgLgASACQgA3A9gBIAJBAToA1QEgAkEBOgDMASACQoCAgICAgICgPjcD8AEgAkKAgICAgICA0MEANwPoASACQfyaAjYCWCACQdgAaiIBIAMQmwEgASACQRRqIgMQ4QEgAkEANgKEAiACQgA3AvwBIAEgAkEoaiACQfwBaiIEEM0DIAIgBDYC+AEgAkH4AWoQKSABEGkaIAIgAzYCWCABECkCQCACKAIkIgFFDQAgASABKAIEIgNBAWs2AgQgAw0AIAEgASgCACgCCBEAACABECQLIAJBADYCHCACQgA3AhQgAkEoaiACQRRqQQAQxAIgAEEANgIIIABCADcCACACKAIYIAIoAhRrQQxtIQEjAEEgayIDJAACQAJAIAAoAgggACgCACIEa0EGdSABSQRAIAFBgICAIE8NASAAIANBDGogASAAKAIEIARrQQZ1IAAQqQEiARCnAiABEKYCCyADQSBqJAAMAQsQJgALIAIoAhgiAyACKAIURwRAA0BBGBAjIgFBtJoCNgIAIAFCADcCBCABQQxqIgQgA0EMayIDEFsgAiABNgIQIAIgBDYCDCACIAIpAgw3AwAgAkHYAGoiBCACEGoCQCAAKAIEIgEgACgCCCIFSQRAIAEgBBC0ARogAUFAayEBDAELIAEgACgCACIEa0EGdSIGQQFqIgFBgICAIE8NBCACQfwBakH///8fIAUgBGsiBEEFdSIFIAEgASAFSRsgBEHA////B08bIAYgABCpASEEIAIoAoQCIAJB2ABqELQBGiACIAIoAoQCQUBrNgKEAiAAIAQQpwIgACgCBCEBIAQQpgILIAAgATYCBCACQdgAahBBGiADIAIoAhRHDQALCyACIAJBFGo2AlgjAEEQayIFJAAgAigCWCIBKAIAIgAEQCAAIQMgASEEIAEoAgQiBiAARwRAA0AgBSAGQQxrIgY2AgwgBUEMahApIAAgBkcNAAsgAigCWCIEKAIAIQMLIAEgADYCBCAEKAIIGiADECILIAVBEGokACACQShqEIMCGgsgAkGQAmokAA8LECYAC9oCAgV/A3wjAEFAaiIDJAACQCABRAAAAAAAAAAAZQRAIAAQ4wEMAQsgAkECTARAIAEQwgEhAgsgA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C/YFAQ9/IwBBEGsiBiQAIAZBCGogAUEAECsQKiAGKAIIIQMjAEGwAWsiASQAIAMoAlwhAiABQQA2AqgBIAFCADcCoAEgAUGgAWogAkEBdiICEDkgASACNgKkASADKAJcIgsEQCADKAJ4IQwgAygCWCENIAMoAqgBIQcgAygCaCEIIAEoAqABIQ5BACECA0ACQCAHIAggCCACQQJ0IglqKAIAIgpBAnRqKAIAQQNtQRhsaisDEEQAAAAAAAAAAGZFDQAgByAKQQNtQRhsaisDEEQAAAAAAAAAAGNFDQAgCSANaiIFQXhBBCACQQNvQQJGG2ooAgAhDyAFKAIAIRAgDiAEQQR0aiIFIAkgDGooAgA2AgwgBSAKNgIIIAUgDzYCBCAFIBA2AgAgBEEBaiEECyACQQFqIgIgC0cNAAsLIAFCADcDmAEgAUIANwOQASABQgA3AzAgAUIANwM4IAFBoAFqIAQgAUEwahCVAiABQfgAaiICIAEoAqABIgQgBCABKAKkAUEEdGpBABD0AiABQgA3A0ggAUKAgICAgICA+D83A0AgAUIANwNQIAFCADcDYCABQoCAgICAgID4PzcDWCABQgA3A2ggASABKQKgATcCcCABIAFBQGtBMPwKAAAgAUGEAWogAiABQfAAaiIEIANByABqIAEQxwQgASACNgJwIAQQKSAAQQA2AgggAEIANwIAIAEoAoQBIgMgASgCiAEiBEcEQANAIAFBADYCgAEgAUIANwJ4IAMoAgAiAiADKAIEIgVHBEADQCABQfgAaiACEEwgAkEYaiICIAVHDQALCyAAIAFB+ABqEHYgASgCeCICBEAgASACNgJ8IAEoAoABGiACECILIANBDGoiAyAERw0ACwsgASABQYQBajYCeCABQfgAahApIAEoAqABIgAEQCAAECILIAFBsAFqJAACQCAGKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAZBEGokAAuODgMPfwl8An4jAEEQayILJAAgC0EIaiABQQAQKxAqIAsoAgghBiMAQcACayIBJAAgASAGKQMINwM4IAEgBikDADcDMCABIAYpAyA3AxAgASAGKQMYNw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AAmokAAJAIAsoAgwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgC0EQaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBASADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBACADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC3EBA38jAEGQAWsiBCQAIARByABqIgUgARDkAiAEQRhqIgYgBUEw/AoAACAEIAIpAxA3AxAgBCACKQMINwMIIAQgAikDADcDACAEQfgAaiICIAYgBCADEJYEIAAgASACQQIQ6AEgAhAoGiAEQZABaiQAC8oDAgN/AX4jAEHQAGsiAyQAIANBxABqIAFBEGoQfyADQTxqIAEgAygCRBArECoCQCADKAI8IgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEIAFBEGogBBA3IQQgAyABNgI4IAMgBDYCNAJ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IQEAkAgASgCDCIARQ0AIAAgACgCBCICQQFrNgIEIAINACAAIAAoAgAoAggRAAAgABAkCyABQRBqJAALXgICfwF8IwBBEGsiASQAIAFBCGogAEEAECsQKiABKAIIQQEQhAQCQCABKAIMIgBFDQAgACAAKAIEIgJBAWs2AgQgAg0AIAAgACgCACgCCBEAACAAECQLIAFBEGokAAsZACAAEJACIAAQoARrIAAQvwFqQX5tQQFqC54CAgJ/AXwjAEEgayIDJAAgA0EYaiABQQAQKxAqAkAgAygCGCIEKAJEIgEEQCAAIAEQRgwBC0GoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAQQNyEEIAErA0giBSACIAJEAAAAAAAAAABhGyICIAVkBEAgASACOQNIIAQQWgsgBEEAEPgCIARBABBUIAEgBTkDSCADIAE2AhQgAyAENgIQIAEgASgCBEEBajYCBCADIAMpAhA3AwggACADQQhqEEgaIAEgASgCBCIAQQFrNgIEIAANACABIAEoAgAoAggRAAAgARAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC50CAgJ/AXwjAEEgayIDJAAgA0EYaiABQQAQKxAqAkAgAygCGCIEKAJEIgEEQCAAIAEQRgwBC0GoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAQQNyEEAkAgASsDSCACYwRAIAEgAjkDSCAEEFogBEEAEPgCIARBABBUDAELIAEgAiABKwNAIgUgAiAFZBs5A0gLIAMgATYCFCADIAQ2AhAgASABKAIEQQFqNgIEIAMgAykCEDcDCCAAIANBCGoQSBogASABKAIEIgBBAWs2AgQgAA0AIAEgASgCACgCCBEAACABECQLAkAgAygCHCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADQSBqJAALXAICfwF8IwBBEGsiASQAIAFBCGogAEEAECsQKiABKAIIKwM4AkAgASgCDCIARQ0AIAAgACgCBCICQQFrNgIEIAINACAAIAAoAgAoAggRAAAgABAkCyABQRBqJ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gA3A+ABIAJCADcD2AEgByEBAkAgAigCgAIiBUUNAANAIAEiAyAFIgogBSgCECAJSCIMGyEBIAVBBEEAIAwbaigCACIFDQALIAEgB0YNACAJIAMgCiAMGygCEEgNACACQYgBaiABQRhqQeoA/AoAAAsgAkGLAmogBiANIAJBiAFqELQEIAJB/AFqIAIQswQgAigCACEBCyANQQFqIg0gEEcNAAsLIAcgAigC/AEiA0cEQANAIAJBiwJqIAYgECADQRhqELQEAkAgAygCBCIBBEADQCABIgMoAgAiAQ0ADAILAAsDQCADIAMoAggiAygCAEcNAAsLIAMgB0cNAAsLIAIgFa03A4gBIAZBOGogAkGIAWoQkgECQCASRQRAIAsgDkEDbBDUASAOQQBMDQEgCygCACEHIAgoAkghCkEAIQMDQCAKIANBGGwiBWoiASsDACEeIAErAwghHyAFIAdqIgUgASsDEDkDECAFIB85AwggBSAeOQMAIANBAWoiAyAORw0ACwwBCyAIKAJMIQEgAkF/NgKIASACQfwAaiABIAJBiAFqELIEIQ0gAkHwAGogCCgCTBCcAiEQIA4gBigCAGwhASMAQSBrIgUkAAJAAkAgCygCCCALKAIAIgNrQQN1IAFJBEAgAUGAgICAAk8NASAFQQxqIAEgCygCBCADa0EDdSALEEsiASgCBCALKAIEIAsoAgAiCmsiA2shByADBEAgByAKIAP8CgAACyALKAIAIQMgCyAHNgIAIAEgAzYCBCALIAEoAgg2AgQgASADNgIIIAsoAgghByALIAEoAgw2AgggASADNgIAIAEgBzYCDCABEJkBCyAFQSBqJAAMAQsQJgALIAYoAkgiASAGKAJEIgVHBEAgF0EASCATciETIAZBLGohFSAGQSBqIRggBigCOCEDQQAhCgNAIAMgCiIHQQFqIgpBA3QiGWopAwBCA4AgAyAHQQN0aikDAEIDgCImQv////8Pg1YEQCAHQeAAbCEaICanIQUDQCACQQI2AmwgAkKAgICAEDcCZCAFQRhsIRtBACEOA0AgCCgCeCAPKAIAIAVBAnRqKAIAQQxsaiACQeQAaiAOaigCACIDQQJ0aigCACEBAkAgECgCACAG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8IwBBMGsiByQAIAcgAikDEDcDKCAHIAIpAwg3AyAgByACKQMANwMYIAcgAykDADcDACAHIAMpAwg3AwggByADKQMQNwMQIwBBQGoiAiQAIAJBOGogAUEAECsQKiACIAcpAxg3AyAgAiAHKQMgNwMoIAIgBykDKDcDMCACIAcpAwA3AwggAiAHKQMINwMQIAIgBykDEDcDGCACKAI4IQggAkEgaiEGIwBBwAZrIgEkAAJAIAgoAlxBAk0EQCAAQQA2AgggAEIANwIADAELIAYrAwAhEiACKwMIIRUgBisDCCETIAIrAxAhFiABIAIrAxgiFCAGKwMQIhehIhE5A9gDIAEgFiAToSIYOQPQAyABIBUgEqEiGTkDyAMgGSAZoiAYIBiioCARIBGioEQAAAAAAAAAAGEEQCAAQQA2AgggAEIANwIADAELIAFBsAFqEDshAyABQgA3A6gBIAFCADcDoAEgAUIANwOYASABQgA3AzggAUIANwNAIAFCADcDSCADQcgAakECIAFBOGoQZyADKAJIIgUgBikDEDcDECAFIAYpAwg3AwggBSAGKQMANwMAIAMoAkgiBSACKQMQNwMgIAUgAikDGDcDKCAFIAIpAwg3AxggAUIANwOAASABQgA3A5ABIAFCADcDiAEgAUIANwMoIAFCADcDMCABIAEpA4ABNwMgIANBmAFqQQIgAUEgahBnIAMoApgBQQBBMPwLACADQdgAaiIFQQNBfxAxIAVBEGpBA0F/EDEgBUEgakEDQX8QMSADKAJYIgVBADYCACADKAJoIgRBATYCACADKAJ4IglBADYCACAFQQE2AgQgBEEANgIEIAlBADYCBCAFQX82AgggBEF/NgIIIAlBADYCCCABQgA3A3ggAUIANwNwIAFCADcDaCABQgA3AwggAUIANwMQIAFCADcDGCADQagBakEBIAFBCGoQZyADKAKoASIFQgA3AxAgBUIANwMIIAVCADcDACABIAg2AmQgASADNgJgIAEgCDYCXCABIAM2AlggASAINgJUIAEgAzYCUCAAQQA2AgggAEIANwIAAkAgCCgCjAJFDQAgEiAVIBIgFWMiBRsiGiAVIBIgBRsiEiASIBpkIgUbIhVEAAAAAAAA8H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2AgQgAw0AIAUgBSgCACgCCBEAACAFECQLIAdBAWoiByAGKAIEIAYoAgAiA2tBA3VJDQALCwJAIApFDQAgCiAKKAIEIgVBAWs2AgQgBQ0AIAogCigCACgCCBEAACAKECQLIAQoAvQBIgMgBCgC8AFHDQALCyAAIAEoAoABNgIAIAAgASgChAEiADYCBCAARQ0AIAAgACgCBEEBajYCBAsgBCAEQfABajYCACAEEGULIARBoAJqJAAPCxAmAAsQJgALwwQCBH8MfCMAQfABayIDJABBmAEQIyIGQbCTAjYCACAGQgA3AgQjAEEQayIFJAAgBkEQaiIEQgA3AgQgBEG0kgI2AgAgBUEANgIIIAVCADcCACAEQQxqIAUQ0wQgBSAFNgIMIAVBDGoQZSAEQgA3AyggBEKAgICAgICA+D83AyAgBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQgA3A4ABIAVBEGokACADQegBaiIFIAY2AgQgBSAENgIAIAUgBkEUaiAEEI8BIAMoAugBQQxqIgQgAUEMaiIFRwRAIAQgBRBeIARBCGogBUEIahBeCyABKwMgIQcgASsDKCEIIAErAzAhCSABKwM4IQogASsDQCELIAErA0ghDCABKwNQIQ0gASsDWCEOIAErA2AhDyABKwNoIRAgASsDcCERIAErA3ghEiADQoCAgICAgID4PzcDgAEgAyASOQN4IAMgETkDcCADIBA5A2ggA0IANwNgIAMgDzkDWCADIA45A1AgAyANOQNIIANCADcDQCADIAw5AzggAyALOQMwIAMgCjkDKCADQgA3AyAgAyAJOQMYIAMgCDkDECADIAc5AwggA0GIAWoiBCACIANBCGoQ8AEgAygC6AEiAkEgaiAEQeAA/AoAACACIAEtABw6ABwgACACNgIAIAAgAygC7AE2AgQgA0HwAWokAAtnAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIFQgA3AgAgBUIONwIIIAJBCGogBCADIAEoAgAQkwUgAiACKQIINwM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IYIAIEQCADIAI2AgwgA0GUjQI2AgggAyADQQhqNgIYCyADQQhqIQcjAEHQAGsiAiQAIAJBxABqIAFBABArECoCQCACKAJEIgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEQRAhCCABQRBqIAQQNyEEIAIgATYCQCACIAQ2AjwgAkEgaiAHEFchBiMAQSBrIgEkACABIAY2AgwgAUGklQI2AgggASABQQhqIgU2AhggBCAFELsEAkAgBSABKAIYIgRGBH9BEAUgBEUNAUEUCyEFIAQgBCgCACAFaigCABEAAAsgAUEgaiQAAkAgBiAGKAIQIgFHBEBBFCEIIAFFDQELIAEgASgCACAIaigCABEAAAsgAkEQaiACQTxqEFkgAiACKQIQIgk3AhggAkIANwIQIAIgCTcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAigCQCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAIoAkgiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkHQAGokAAJAIAcgAygCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIANBIGokAAsGAEGIkgILFAAgAEEEakEAIAEoAgRB5PAARhsLCwAgAUHYkQI2AgALEQBBCBAjIgBB2JECNgIAIAALBgBByJECCxQAIABBBGpBACABKAIEQfvrAEYbCwsAIAFBkJECNgIACxEAQQgQIyIAQZCRAjYCACAAC5sDAgl/AXwjAEGQAWsiAyQAIANBhAFqIAIQlgUgA0EgakEAQeAA/AsAIANCgoCAgDA3AhggA0KAgICAEDcCECADQThqIQggAygChAEhCQNAIANBEGogBmooAgAhBCADQoCAgIAQNwIEIAkgBEEFdGohCiADQQI2AgwgA0EgakEwQcgAIARBAkYbaiELQQAhAgNAIAogA0EEaiACaigCACIHQQN0aisDACEMIANBIGohBQJAAkACQCAEDgICAAELIAghBQwBCyALIQULIAVBCEEQIAdBAUYbQQAgBxtqIAw5AwAgAkEEaiICQQxHDQALIAZBBGoiBkEQRw0ACyMAQSBrIgIkACACQRBqIAEQigEgAkEYaiACKAIQIgEgA0EgaiABKAIAKAIEEQMAIAIgAikCGDcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkEgaiQAIAMoAoQBIgAEQCADIAA2AogBIAMoAowBGiAAECILIANBkAFqJAALCwAgACABQQIQiAELCwAgACABQQEQiAELCwAgACABQQAQiAELDQAgACABIAJBAhDoAQsNACAAIAEgAkEBEOgBCw0AIAAgASACQQAQ6AELBgBBgJECCxQAIABBBGpBACABKAIEQefoAEYbC/0BAQN/IwBBgAFrIgMkACADIAEQ3wEjAEEgayIBJABBJBAjIgJCADcCDCACQYSWAjYCACACQgA3AgQgAkIANwIUIAJCADcCHCAAIAI2AgQgACACQQxqNgIAQagCECMiAkGgkAI2AgAgAkIANwIEIAJBEGogA0EAEJMDIQQgASACNgIQIAEgBDYCDCABQRRqIAFBDGoQ3AQgACABKAIUNgIIIAAgASgCGDYCDCABQgA3AhQCQCABKAIQIgJFDQAgAiACKAIEIgRBAWs2AgQgBA0AIAIgAigCACgCCBEAACACECQLIABCADcCECABQSBqJAAgAxCqASADQYABaiQACxUAIAFByJACNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQciQAjYCACABIAAoAgQ2AgQgAQsPACAAQaCQAjYCACAAECILDQAgAEGgkAI2AgAgAAvwEAITfwJ+IwBB0AFrIgMkACADQcgBaiICIAFBABArECoCQCADKALIASgCRCIEBEAgA0GwAWoiASAEEEYgAEEANgIIIABCADcCACAAIAEgAkEBEJYCIAEQKBoMAQsgA0GkAWogARCQAiICEJYBIQ0gAgRAIAKtIRYDQCANKAIAIBWnQQN0aiAVNwMAIBVCAXwiFSAWUg0ACwsgAygCyAEiBCgCXARAQQAhAgNAIAQoAlggAkECdGoiBSgCACIGIAVBeEEEIAJBA29BAkYbaigCACIFSARAIA0gBiAFEF8gAygCyAEhBAsgAkEBaiICIAQoAlxJDQALCyADQQA2AqABIANCADcCmAECQCANIANBmAFqEIwFIhNBAUYEQCAAQQEQkQMoAgAgARCjBAwBCwJAIAMoApwBIgQgAygCmAEiAkYNACAEIAJrIgQQJyEOIARFDQAgDiACIAT8CgAACyABEJACIQ8gAEEANgIIIABCADcCACATQQBKBEADQEGoAhAjIghBoJACNgIAIAhCADcCBCAIQRBqEDshBiAIIAMoAsgBIgIrAzA5A0AgCCACKwM4OQNIQQAhAiADQQA2ApABIANCADcCiAEgA0GIAWogDxAlIAMgDzYCjAEgAygCiAEiBSEEIA8EQANAIBAgDiACQQJ0aigCAEYEQCAEIAI2AgAgBEEEaiEECyACQQFqIgIgD0cNAAsLIANCADcDgAEgA0IANwN4IANCADcDcCADQgA3AyggA0IANwMwIANCADcDOCAIQdgAaiAEIAVrQQJ1IgQgA0EoahBnIANCADcDaCADQgA3A2AgA0IANwNYIANCADcDECADQgA3AxggA0IANwMgIAhBqAFqIAQgA0EQahBnQQAhAiADQYgBaiAEQQAQMSADKAKMASIEBEAgCCgCWCEKIAMoAsgBIgsoAkghDCADKAKIASEFA0AgCiACQRhsaiIHIAwgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACyAIKAKoASEKIAsoApgBIQtBACECA0AgCiACQRhsaiIHIAsgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACwtBACECIANBADYCUCADQgA3AkggA0HIAGogARC/ARAlIAMoAsgBIQcgARC/AQRAA0AgECAOIAcoAlggAkEMbGooAgBBAnRqKAIARgRAAkAgAygCTCIEIAMoAlAiBU8EQCADQcgAaiAFQQF0QYABIAUbECUgAygCSCADKAJMIgRBAnRqIAI2AgAMAQsgAygCSCAEQQJ0aiACNgIACyADIARBAWo2AkwLI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CCCAHKAJMIQggByABKAIMNgJMIAEgBjYCACABIAg2AgwgARA2CyAHIAM2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANQQBBABC3AgwCCyAHIA1BAEEARBgtRFT7IQlAELUCDAELIAcgDUEAQQAQtgILQQEhASANKAIEIA0oAgBrQQR1IhFBAWsiA0EBSwRAQQAhBgNAIAcgCiANIAEgBhC0AiABIgZBAWoiASADRw0ACwsgBygCOCEIIAMEQCADIQEDQCAIIAFBAWsiBkEEdGoiDysDACECIAggAUEEdGoiASAPKwMImjkDCCABIAKaOQMAIAYiAQ0ACwsgCCAIIANBBHRqIgEpAwg3AwggCCABKQMANwMAAkAgBygCmAFFBEAgBysDECECDAELIAcgCyANIAdBOGogAyADEPsBIgI5AxALAkAgAplEEeotgZmXcT1lBEAgDSgCACADQQR0aiEGAkAgBygCSCIBIAcoAkwiCEkEQCABIAYpAwg3AwggASAGKQMANwMAIAFBEGohBgwBCyABIAdBxABqIgsoAgAiD2tBBHUiFEEBaiIBQYCAgIABTw0MIAlBDGpB/////wAgCCAPayIIQQN1Ig8gASABIA9JGyAIQfD///8HTxsgFCALEDIiASgCCCIIIAYpAwg3AwggCCAGKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIIayIGayELIAYEQCALIAggBvwKAAALIAcoAkQhCCAHIAs2AkQgASAINgIEIAcgASgCCCIGNgJIIAEgCDYCCCAHKAJMIQsgByABKAIMNgJMIAEgCDYCACABIAs2AgwgARA2CyAHIAY2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANIAMgAxC3AgwCCyAHIA0gAyADRBgtRFT7IQlAELUCDAELIAcgDSADIAMQtgILIBFBAmsiAQRAA0AgByAKIA0gASADELQCIAEiA0EBayIBDQALCyAHKAJQIAdBxABqEHYgCUEgaiQADAALCyANQQxqIg0gCigCBEcNAAsLIA5BMGokACAHKAIABEAgBygCUCIBIAEoAgAQewsgCkEgaiIKIAcoAlxHDQALCyAHKAJQIg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CIHRwRAIAIoAjQhAQNAIAQoAgAiAyAEKAIEIghHBEADQCABKwMAIQsgAyABKwMIOQMIIAMgCzkDACABQRBqIQEgA0EQaiIDIAhHDQALCyAEQQxqIgQgB0cNAAsLIAJBADYCFCACQgA3AgwgAkHYAGpBAEHoAPwLACACQgA3A1AgAkECNgJMIAJCADcCRCACQdwAakEAQTD8CwAgAkGQAWpBAEEk/AsAIAJBADYCyAEgAkIANwPAASACQQE6AL0BIAJBAToAtAEgAkKAgICAgICAoD43A9gBIAJCgICAgICAgNDBADcD0AEgAkH8mgI2AkAgAkFAayIBIAJBKGoiBxCbASACQQA2AugBIAJCADcC4AEgAUECQQIgAkEMaiIEIAJB4AFqIgMQ4gEgAiADNgLsASACQewBahApIAEQaRpBGBAjIgNBtJoCNgIAIANCADcCBCADQQxqIgggBBBbIAIgAzYCHCACIAg2AhggAiACKQIYNwMAIAAgAhBqIAIgBDYCQCABECkgAiAHNgJAIAEQKSACKAI0IgAEQCACIAA2AjggAigCPBogABAiCyACQfABaiQADAELEGYACwJAIAkgBigCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAZBIGokAAJAIAogBSgCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAVBIGokAAsMACABIAAoAgQREAALFQAgAUGMjwI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBjI8CNgIAIAEgACgCBDYCBCABCwYAQeyOAgsUACAAQQRqQQAgASgCBEGL5QBGGwtRAQF/IwBBIGsiBCQAIAMoAgAhAyABKAIAIAAoAgQhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQQhqIAMgABEDACAEQSBqJAALFQAgAUG0jgI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBtI4CNgIAIAEgACgCBDYCBCABCwYAQaSOAgsUACAAQQRqQQAgASgCBEHj4wBGGwuCAgEGfyMAQRBrIgIkACABKAIAIQcgASgCBCEEQQAhASACQQA2AgwgAkIANwIEIA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EUaiAEaigCACECIANCgICAgBA3AgwgBSACQRhsaiEGIANBIGpBEEEgIAJBAUYbQQAgAhtqIQdBACECA0AgB0EIQQAgA0EMaiACaigCACIIG2ogBiAIQQN0aisDADkDACACQQRqIgJBCEcNAAsgBEEEaiIEQQxHDQALIAAgASADQSBqEOABIAMoAlQiAARAIAMgADYCWCADKAJcGiAAECILIANB4ABqJAALNgECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgACgCABEFAEEYECMgBRAuIAUQKBogBEEgaiQACyoBAX8jAEEQayIDJAAgA0EIaiABIAIgACgCABEDACADKAIMIANBEGokAAthAQF/IwBBMGsiBCQAIAAoAgAhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQSBqIgIgASAEQQhqIAMgABEPACACEJQDIAQgAjYCLCAEQSxqEHogBEEwaiQACzUBAX8jAEEQayIDJAAgAyABIAIgACgCABEDACADEJQDIAMgAzYCDCADQQxqEHogA0EQaiQACzYBAX8jAEFAaiIGJAAgBiABIAIgAyAEIAUgACgCABEqAEHAABAjIAYQQCAGEEEaIAZBQGskAAsLACAAIAFBAhDFAgtfAQF/IwBB0ABrIgMkACAAKAIAIQAgAyACNgIMIANBnKACNgIIIANBEGoiAiABIANBCGogABEDAEHAABAjIAIQQCACEEEaIAMoAgwiAEEJTwRAIAAQAQsgA0HQAGokAAuBAgICfwF8IwBB4ABrIgMkACADQQhqIgQgASACIAAoAgARAwAgA0EwaiAEQSj8CgAAQQIhACADLQBQQQFGBEAjAEEQayIAJABB2J4CLQAAQQFxRQRAQQJBmIQCQQMQBiEBQdieAkEBOgAAQdSeAiABNgIAC0EgECMiASADKQNINwMYIAEgAykDQDcDECABIAMpAzg3AwggASADKQMwNwMAIAAgATYCCCAAQQA2AgRB1J4CKAIAQQBBACAAQQRqIABBCGoQBSEFIAAoAgQhASADIAX8AzYCXCADQZygAjYCWCABBEAgARAECyAAQRBqJAAgAygCXCEACyADQeAAaiQAIAALTAEBfyMAQSBrIgMkACAAKAI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AIAEgAyACEEAiASAAEQEAIAEQQRogA0FAayQACzABAX8jAEEQayIEJAAgACgCACEAIAQgAzkDCCABIAIgBEEIaiAAEQYAIARBEGokAAvdAQMBfwF+AXwjAEEwayIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxAiBDcDICADIAMpAwg3AxhBAiEAIASnQQFxBEAjAEEQayIAJABBqJ4CLQAAQQFxRQRAQQJB6PwBQQMQBiEBQaieAkEBOgAAQaSeAiABNgIACyAAIAMrAxg5AwggAEEANgIEQaSeAigCAEEAQQAgAEEEaiAAQQhqEAUhBSAAKAIEIQEgAyAF/AM2AiwgA0GcoAI2AiggAQRAIAEQBAsgAEEQaiQAIAMoAiwhAAsgA0EwaiQAIAALMAEBfyMAQRBrIgQkACAAKAIAIQAgBCADOQMIIAEgAiAEQQhqIAARAwAgBEEQaiQACy4BAX8jAEEQayIDJAAgACgCACEAIAMgAjkDCCABIANBCGogABEBACADQRBqJAAL8wECAn8BfCMAQSBrIgMkACADQQhqIgQgASACIAAoAgARAwBBAiEAAkAgAy0AFEEBRw0AIwBBEGsiACQAQZyeAi0AAEEBcUUEQEECQfj6AUEDEAYhAUGcngJBAToAAEGYngIgATYCAAsgAEEMECMgBBA8NgIIIABBADYCBEGYngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgIcIANBnKACNgIYIAEEQCABEAQLIABBEGokACADKAIcIQAgAy0AFEEBRw0AIAMoAggiAUUNACADIAE2AgwgAygCEBogARAiCyADQSBqJAAgAAsNACAAIAEgAkECEMYCC0gBAX8jAEEQayIDJAAgACgCACEAIAEgA0EEaiACEDwiASAAEQEAIAEoAgAiAARAIAEgADYCBCABKAIIGiAAECILIANBEGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQZCeAi0AAEEBcUUEQEECQYj5AUEDEAYhAUGQngJ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ABECILIAkoAgAiAQRAIAMgATYCJCADKAIoGiABECILIAdBDGoiByAIRw0ACwsgA0EANgIQIANCADcCCCADQThqQQBB6AD8CwAgA0IANwMwIANBAjYCLCADQgA3AiQgA0E8akEAQTD8CwAgA0HwAGpBAEEk/AsAIANBADYCqAEgA0IANwOgASADQQE6AJ0BIANBAToAlAEgA0KAgICAgICAoD43A7gBIANCgICAgICAgNDBADcDsAEgA0H8mgI2AiAgA0EgaiIBIANBFGoQmwEgA0EANgLIASADQgA3AsABIAFBAkEDIAIgAkEDTxsiAkEAIAJBAWtBA0kbIANBCGoiBCADQcABaiICEOIBIAMgAjYCzAEgA0HMAWoQKSABEGkaQRgQIyICQbSaAjYCACACQgA3AgQgAkEMaiIFIAQQWyADIAI2AiQgAyAFNgIgIABBCGogARBOAkAgAygCJCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADIANBCGo2AsABIANBwAFqECkgAyADQRRqNgIgIANBIGoQKSADQdABaiQAC10AIAACfyABKAIEIAEoAgAiAWtBBXUgAksEQCAAIAEgAkEFdGoiASkDGDcDGCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDAEEBDAELIABBADoAAEEACzoAIAsQACAAKAIEIAAoAgBrQQV1C8cDAQV/AkAgACgCBCAAKAIAIgNrQQV1IgQgAUkEQCMAQSBrIgYkAAJAAkAgASAEayIEIAAoAggiBSAAKAIEIgNrQQV1TQRAIAAgBAR/IAMgBEEFdGohAANAIAMgAikDGDcDGCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQSBqIgMgAEcNAAsgAAUgAws2AgQMAQsgAyAAKAIAIgNrQQV1IgcgBGoiAUGAgIDAAE8NASAGQQxqQf///z8gBSADayIDQQR1IgUgASABIAVJGyADQeD///8HTxsgByAAEJYDIgEoAggiAyAEQQV0aiEEA0AgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBIGoiAyAERw0ACyABIAQ2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ACgCABogAigCABogAEEIaiACQQhqEF4gAEEQaiACQRBqQTD8CgAAC0EBCzoAIAACfyABKAIEIAEoAgAiAWtBBnUgAksEQCAAIAEgAkEGdGoQQBpBAQwBCyAAQQA6AABBAAs6AEALtwIBBX8CQCAAKAIEIgMgACgCACIFa0EGdSIEIAFJBEAjAEEgayIFJAACQAJAIAEgBGsiASAAKAIIIgYgACgCBCIDa0EGdU0EQCAAIAEEfyADIAFBBnRqIQADQCADIAIQQEFAayIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIEa0EGdSIHIAFqIgNBgICAIE8NASAFQQxqQf///x8gBiAEayIEQQV1IgYgAyADIAZJGyAEQcD///8HTxsgByAAEKkBIgQoAggiAyABQQZ0aiEBA0AgAyACEEBBQGsiAyABRw0ACyAEIAE2AgggACAEEKcCIAQQpgILIAVBIGokAAwCCxAmAAsgASAESQRAIAMgBSABQQZ0aiIBRwRAA0AgASADQUBqEEEiA0cNAAsLIAAgATYCBAsLC78BAQV/AkAjAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABELQBQUBrIQEMAQsgAiAAKAIAIgRrQQZ1IgZBAWoiAkGAgIAgTw0BIAVBDGpB////HyADIARrIgNBBXUiBCACIAIgBEkbIANBwP///wdPGyAGIAAQqQEiAigCCCABELQBGiACIAIoAghBQGs2AgggACACEKcCIAAoAgQhASACEKYCCyAAIAE2AgQgBUEgaiQADAELECYACwssAQF/IwBBEGsiASQAIAAEQCABIAA2AgwgAUEMahCYAyAAECILIAFBEGokAAsGAEGE/gELFwAgACgCACABQQN0aiACKwMAOQMAQQELPQAgAAJ/IAEoAgQgASgCACIBa0EDdSACSwRAIAAgASACQQN0aisDADkDAEEBDAELIABBADoAAEEACzoACAvtGgQVfwZ8A30CfiMAQZABayINJAAgABAaNgIEIABBnKACNgIAIA1BEGoiCCABEN8BIwBBkARrIgIkACACQgA3AogCIAIgAkGIAmoiCjYChAIgAkH4AWogCCgCCCAIKAIEa0ECdSAIKAIAb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YAQaz4AQstACAAKAIAIAFBGGxqIgAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAQQELUwAgAAJ/IAEoAgQgASgCACIBa0EYbSACSwRAIAAgASACQRhsaiIBKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwBBAQwBCyAAQQA6AABBAAs6ABgLuwMBBX8CQCAAKAIEIAAoAgAiA2tBGG0iBCABSQRAIwBBIGsiBiQAAkACQCABIARrIgQgACgCCCIFIAAoAgQiA2tBGG1NBEAgACAEBH8gAyAEQRhsaiEAA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EYbSIHIARqIgFBq9Wq1QBPDQEgBkEMakGq1arVACAFIANrQRhtIgNBAXQiBSABIAEgBUkbIANB1arVKk8bIAcgABBkIgEoAggiAyAEQRhsaiEEA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICQWhtQRhsaiEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQjAELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQRhsajYCBAsLCwkAIAAgARDEAQsGAEG89gELIwAgACgCACABQQxsaiIAIAIoAgg2AgggACACKQIANwIAQQELSQAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsaiIBKAIINgIIIAAgASkCADcCAEEBDAELIABBADoAAEEACzoADAuoAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBDG0iByAEaiIBQdaq1aoBTw0BIAZBDGpB1arVqgEgBSADa0EMbSIDQQF0IgUgASABIAVJGyADQarVqtUATxsgByAAEGEiASgCCCIDIARBDGxqIQQDQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAkF0bUEMbGohAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABENYBCyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEMbGo2AgQLCwsJACAAIAEQnQULBgBBzPQBCxgAIAAoAgAgAUEGdGogAkHAAPwKAABBAQs+ACAAAn8gASgCBCABKAIAIgFrQQZ1IAJLBEAgACABIAJBBnRqQcAA/AoAAEEBDAELIABBADoAAEEACzoAQAuMAwEFfwJAIAAoAgQgACgCACIDa0EGdSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EGdU0EQCAAIAQEfyADIARBBnRqIQADQCADIAJBwAD8CgAAIANBQGsiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBBnUiByAEaiIBQYCAgCBPDQEgBkEMakH///8fIAUgA2siA0EFdSIFIAEgASAFSRsgA0HA////B08bIAcgABCpASIBKAIIIgMgBEEGdGohBANAIAMgAkHAAPwKAAAgA0FAayIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQqQILIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQZ0ajYCBAsLCwkAIAAgARCaAwsGAEHo8gELDwAgASAAKAIAaiACNwMACw0AIAEgACgCAGopAwALHgAgASAAKAIAaiIAIAIpAwg3AwggACACKQMANwMACyoBAX8gACgCACECQRAQIyIAIAEgAmoiASkDCDcDCCAAIAEpAwA3AwAgAAsHACAAEQwACwkAIAEgABEZAAsJACABIAARAAALCQAgASAAERsACwkAIAEgABEEAAtNAQF/IwBBEGsiAiQAIAIgATYCBCACQZygAjYCACACQQhqIAIgABEBACACKAIMIAJBADYCDCACKAIEIgFBCU8EQCABEAELIAJBEGokAAtIAQJ/IwBB0ABrIgYkACAGQQhqIgcgAkEw/AoAACAGQThqIgIgASAHIAMgBCAFIAARKQBBGBAjIAIQLiACECgaIAZB0ABqJAALMwECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgABEPAEEYECMgBRAuIAUQKBogBEEgaiQAC5QBAQJ/IwBBEGsiBCQAIARBBGogASACIAMgABEVAEEMECMiAEEANgIIIABCADcCACAEKAIIIgEgBCgCBCIDRwRAIAAgASADayIBQQxtEKMCIAAoAgQhBSABBEAgBSADIAH8CgAACyAAIAEgBWo2AgQLIAQoAgQiAQRAIAQgATYCCCAEKAIMGiABECILIARBEGokACAAC04BAX8jAEEwayIGJAAgBiAFKQMANwMIIAYgBSkDCDcDECAGQRhqIgUgASACIAMgBCAGQQhqIAARIwBBGBAjIAUQLiAFECgaIAZBMGokAAtSAQF/IwBBIGsiAyQAIAMgATYCBCADQZygAjYCACADQQhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIAMoAgQiAUEJTwRAIAEQAQsgA0EgaiQACy0BAn8jAEEgayIBJAAgAUEIaiICIAARAABBGBAjIAIQLiACECgaIAFBIGokAAsxAQJ/IwBBIGsiAyQAIANBCGoiBCABIAIgABEWAEEYECMgBBAuIAQQKBogA0EgaiQACzcBAn8jAEEgayIGJAAgBkEIaiIHIAEgAiADIAQgBSAAESQAQRgQIyAHEC4gBxAoGiAGQSBqJAALTwEBfyMAQTBrIgMkACADIAEpAwA3AwAgAyABKQMINwMIIAMgASkDEDcDECADQRhqIgEgAyACIAARAwBBGBAjIAEQLiABECgaIANBMGokAAtdAQN/IwBBIGsiBCQAIAEgACgCBCIGQQF1aiEBIAAoAgAhACAEQQhqIgUgASACIAMgBkEBcQR/IAEoAgAgAGooAgAFIAALEQ8AQRgQIyAFEC4gBRAoGiAEQSBqJAALXQEDfyMAQSBrIgQkACABIAAoAgQiBkEBdWohASAAKAIAIQAgBEEIaiIFIAEgAiADIAZBAXEEfyABKAIAIABqKAIABSAACxEFAEEYECMgBRAuIAUQKBogBEEgaiQACzkBAX8gASAAKAIEIgRBAXVqIQEgACgCACEAIAEgAiADIARBAXEEfyABKAIAIABqKAIABSAACxEmAAtXAQJ/IwBBMGsiAiQAIAEgACgCBCIDQQF1aiEBIAAoAgAhACACIAEgA0EBcQR/IAEoAgAgAGooAgAFIAALEQEAQTAQIyIAIAJBMPwKAAAgAkEwaiQAIAALWgECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBACACEJQDIAIgAjYCDCACQQxqEHogAkEQaiQAC18BA38jAEEgayIFJAAgASAAKAIEIgdBAXVqIQEgACgCACEAIAVBCGoiBiABIAIgAyAEIAdBAXEEfyABKAIAIABqKAIABSAACxEiAEEYECMgBhAuIAYQKBogBUEgaiQAC3oBAn8jAEEwayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIARBAXEEQCABKAIAIABqKAIAIQALIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGoiAiABIAMgABEDAEEYECMgAhAuIAIQKBogA0EwaiQAC10BA38jAEEgayIEJAAgASAAKAIEIgZBAXVqIQEgACgCACEAIARBCGoiBSABIAIgAyAGQQFxBH8gASgCACAAaigCAAUgAAsRJwBBGBAjIAUQLiAFECgaIARBIGokAAtbAQN/IwBBIGsiAyQAIAEgACgCBCIFQQF1aiEBIAAoAgAhACADQQhqIgQgASACIAVBAXEEfyABKAIAIABqKAIABSAACxELAEEYECMgBBAuIAQQKBogA0EgaiQAC1kBA38jAEEgayICJAAgASAA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ABKAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQEgAUEBNgIgDwsgASACNgIUIAEgAzYCICABIAEoAihBAWo2AigCQCABKAIkQQFHDQAgASgCGEECRw0AIAFBAToANgsgAUEENgIsCwuIAgACQCAAIAEoAgggBBBzBEAgAiABKAIERw0BIAEoAhxBAUYNASABIAM2AhwPCyAAIAEoAgAgBBBzBEACQCABKAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQIgAUEBNgIgDwsgASADNgIgAkAgASgCLEEERg0AIAFBADsBNCAAKAIIIgAgASACIAJBASAEIAAoAgAoAhQRCAAgAS0ANUEBRgRAIAFBAzYCLCABLQA0RQ0BDAMLIAFBBDYCLAsgASACNgIUIAEgASgCKEEBajYCKCABKAIkQQFHDQEgASgCGEECRw0BIAFBAToANg8LIAAoAggiACABIAIgAyAEIAAoAgAoAhgRBwALC1YBA38jAEHQAGsiAiQAIAJBEGoiAyACQQRqIAEQPCIBIAARAQBBwAAQIyADEEAgAxBBGiABKAIAIgAEQCABIAA2AgQgASgCCBogABAiCyACQdAAaiQAC6gEAQV/IAAoAgQiAhCvAkEBaiIBECciAAR/An8gAUGABE8EQCABBEAgACACIAH8CgAACyAADAELIAAgAWohAwJAIAAgAnNBA3FFBEACQCAAQQNxRQRAIAAhAQwBCyABRQRAIAAhAQwBCyAAIQEDQCABIAItAAA6AAAgAkEBaiECIAFBAWoiAUEDcUUNASABIANJDQALCyADQXxxIQQCQCADQcAASQ0AIAEgBEFAaiIFSw0AA0AgASACKAIANgIAIAEgAigCBDYCBCABIAIoAgg2AgggASACKAIMNgIMIAEgAigCEDYCECABIAIoAhQ2AhQgASACKAIYNgIYIAEgAigCHDYCHCABIAIoAiA2AiAgASACKAIkNgIkIAEgAigCKDYCKCABIAIoAiw2AiwgASACKAIwNgIwIAEgAigCNDYCNCABIAIoAjg2AjggASACKAI8NgI8IAJBQGshAiABQUBrIgEgBU0NAAsLIAEgBE8NAQNAIAEgAigCADYCACACQQRqIQIgAUEEaiIBI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AACAAAAAwAAAAAAAAABAAAAAgAAAAQAAAABAAAAAwAAAAUAAAABAAAABQAAAAEAAAAAAAAABAAAAAMAAAAAAAAA////////////////////////////////////////////////////////////////AwAAAAQAAAABAAAA////////////////AwAAAAIAAAABAAAAAAAAAAQAAAACAAAA////////////////////////////////AgAAAAQAAAAAAAAAAQAAAAIAAAADAAAA////////////////AQAAAAQAAAADAAAA////////////////////////////////////////////////TlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEUzJF8wRlpOUzRfMTBTZXROb3JtYWxzRWlkRThGYWNlRWRnZWlFRUUATlN0M19fMjEwX19mdW5jdGlvbjZfX2Jhc2VJRlpOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGwxMFNldE5vcm1hbHNFaWRFOEZhY2VFZGdlaUVFRQBaTjhtYW5pZm9sZDhNYW5pZm9sZDRJbXBsMTBTZXROb3JtYWxzRWlkRTMkXzAATlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEUzJF8xRnZpUktaTlM0XzEwU2V0Tm9ybWFsc0VpZEU4RmFjZUVkZ2VSUzZfRUVFAE5TdDNfXzIxMF9fZnVuY3Rpb242X19iYXNlSUZ2aVJLWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDEwU2V0Tm9ybWFsc0VpZEU4RmFjZUVkZ2VSUzVfRUVFAFpOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGwxMFNldE5vcm1hbHNFaWRFMyRfMQBOU3QzX18yMTBfX2Z1bmN0aW9uNl9fZnVuY0laWk44bWFuaWZvbGQ4TWFuaWZvbGQ0SW1wbDE0Q3JlYXRlVGFuZ2VudHNFaUVOSzMkXzBjbEVpRVVsaUVfRlpaTlM0XzE0Q3JlYXRlVGFuZ2VudHNFaUVOS1M1X2N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AAaAgAAGwIAABwCAAAdAgAAHgIAADR2AADNRgAAjIwAAAx2AABARwAADHYAAJpHAAAAAAAAyIwAAB8CAAAgAgAAIQIAACICAAAjAgAAJAIAACUCAAAmAgAAJwIAADR2AADIRwAA1IwAAAx2AABVSAAADHYAALpIAAAAAAAAEI0AACgCAAApAgAAKgIAACsCAAAsAgAALQIAAC4CAAAvAgAAMAIAADR2AAD4SAAAHI0AAAx2AACSSQAADHYAAP5JAAAAAAAASI0AADUCAAA2AgAANwIAAKABAAA4AgAANHYAAKBKAAD0cgAANHYAAOlKAAAUdwAAAAAAAFSNAAAzAgAAOQIAADoCAAAAAAAAhI0AADsCAAA8AgAANHYAAAxLAAAYjgAAAAAAAKyNAAA9AgAAPgIAAD8CAABAAgAAQQIAADR2AAAlSwAAuI0AAAx2AAA/SwAAAAAAAOyNAABCAgAAQwIAAEQCAABFAgAARgIAAEcCAABIAgAASQIAAEoCAAA0dgAAWEsAAPiNAAAMdgAA10sAAAx2AAAhTAAAAAAAABiOAAA7AgAATAIAAAx2AAByTAAAAAAAADCOAAA7AgAATQIAADR2AACPTAAAGI4AAAAgAACwlQEAQdCcAgt+oJIAALiSAADQkgAA6JIAAACTAAAYkwAAMJMAAEiTAABgkwAAeJMAAJCTAACokwAAwJMAANiTAADwkwAACJQAACCUAAA4lAAAUJQAAGiUAACAlAAAmJQAALCUAADIlAAA4JQAAPiUAAAQlQAAKJUAAECVAABYlQAAcJUAAIiV";let Jce=null,nve=null;const kmo=()=>{const t=globalThis.atob(Tmo),e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e},Fmo=async()=>{const e=!!(globalThis.process?.versions?.node&&globalThis.process?.type!=="renderer")?void 0:{locateFile:()=>"manifold.wasm",wasmBinary:kmo()},n=await Rmo(e);return n.setup(),n},Lmo=async()=>Jce||(nve??=Fmo().then(t=>(Jce=t,t)).catch(t=>{throw nve=null,t}),nve),xbt=()=>Jce;var tE=1e6,qW=t=>{let e=0;for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];e+=o.x*i.y-i.x*o.y}return e/2},Hmo=t=>{let e=0;const n={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};for(const o of t){e+=o.length;for(const[i,r]of o)n.minX=Math.min(n.minX,i),n.minY=Math.min(n.minY,r),n.maxX=Math.max(n.maxX,i),n.maxY=Math.max(n.maxY,r)}return{polygonCount:t.length,pointCount:e,bbox:e>0?n:null,scale:tE}},Omo=(t,e)=>{if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw new Error(`${e} received non-finite point (${t.x}, ${t.y})`)},Ebt=(t,e)=>t.x===e.x&&t.y===e.y,TN=(t,e="normalizeRing")=>{const n=[];for(const i of t){Omo(i,e);const r={x:Math.round(i.x*tE)/tE,y:Math.round(i.y*tE)/tE},s=n[n.length-1];(!s||!Ebt(s,r))&&n.push(r)}return n.length>1&&Ebt(n[0],n[n.length-1])&&n.pop(),new Set(n.map(i=>`${i.x},${i.y}`)).size<3||Math.abs(qW(n))<1e-18?[]:n},XW=(t,e="toScaledManifoldPolygons")=>{const n=[];for(const o of t){const i=TN(o,e);if(i.length<3)continue;const r=qW(i)<0?[...i].reverse():i;n.push(r.map(s=>[Math.round(s.x*tE),Math.round(s.y*tE)]))}return n},Bbt=t=>t.map(e=>TN(e.map(([n,o])=>({x:n/tE,y:o/tE})),"fromScaledManifoldPolygons")).filter(e=>e.length>=3),bbt=(t,e)=>{const n=qW(t);return e==="positive"&&n<0||e==="negative"&&n>0?[...t].reverse():t},Sbt=t=>t.map(e=>({x:e.x,y:e.y})),Gmo=t=>{const e=[];for(const n of t){if(n.outerRing.length<3)continue;const o=bbt(n.outerRing,"negative"),i=n.innerRings.filter(r=>r.length>=3).map(r=>bbt(r,"positive"));e.push({outer_ring:{vertices:Sbt(o)},inner_rings:i.map(r=>({vertices:Sbt(r)}))})}return e},Ymo=t=>{const e=t.board_edge_margin??0;if(t.outline&&t.outline.length>0)return TN(t.outline,"getBoardPolygon.outline");const{bounds:n}=t,o={minX:n.minX+e,minY:n.minY+e,maxX:n.maxX-e,maxY:n.maxY-e};return o.minX>=o.maxX||o.minY>=o.maxY?[]:[{x:o.minX,y:o.minY},{x:o.maxX,y:o.minY},{x:o.maxX,y:o.maxY},{x:o.minX,y:o.maxY}]},Umo=async()=>{await Lmo()},Kmo=()=>!!xbt(),ZW=()=>{const t=xbt();if(!t)throw new Error("Manifold geometry has not been initialized. Call initializeManifoldGeometry() before solving copper pours.");return t.CrossSection},Wv=(t,e,n)=>{try{return n()}catch(o){const i=Hmo(e),r=o instanceof Error?o.message:String(o);throw new Error(`${t} failed: ${r}; details=${JSON.stringify(i)}`)}},Vmo=1e-8,ove=()=>ZW().square([0,0]),zmo=(t,e="Positive")=>{const n=XW([t],"crossSectionFromPolygon"),o=ZW();return n.length===0?ove():Wv("crossSectionFromPolygon",n,()=>o.ofPolygons(n,e))},ive=(t,e="Positive")=>{const n=XW(t,"crossSectionFromPolygons"),o=ZW();return n.length===0?ove():Wv("crossSectionFromPolygons",n,()=>o.ofPolygons(n,e))},Qbt=t=>{const e=t.filter(o=>!o.isEmpty()),n=ZW();return e.length===0?ove():Wv("composeCrossSections",[],()=>n.compose(e))},Wce=(t,e,n="Miter")=>{const o=XW([t],"offsetPolygon");if(o.length===0||e<=0)return o.length===0?[]:[TN(t)];const i=e*tE,r=ZW(),s=Wv("offsetPolygon.input",o,()=>r.ofPolygons(o,"Positive")),a=Wv("offsetPolygon.offset",o,()=>s.offset(i,n,2,32));return Bbt(a.toPolygons())},Jmo=(t,e,n="Miter")=>{if(t.isEmpty()||e<=0)return t;const o=e*tE,i=t.toPolygons();return Wv("offsetCrossSection",i,()=>t.offset(o,n,2,32))},vbt=(t,e)=>{const n=Qbt(e);return t.isEmpty()||n.isEmpty()?t:Wv("subtractCrossSectionBlockers",[...t.toPolygons(),...n.toPolygons()],()=>t.subtract(n))},Wmo=(t,e)=>{const n=zmo(t),o=ive(e);if(n.isEmpty()||o.isEmpty())return n;const i=[...XW([t],"subtractBlockersFromPour.pour"),...XW(e,"subtractBlockersFromPour.blockers")];return Wv("subtractBlockersFromPour",i,()=>n.subtract(o))},jmo=(t,e=Vmo)=>{if(t.isEmpty())return t;const n=e*tE*tE,o=t.decompose().filter(i=>Math.abs(i.area())>=n);return Qbt(o)},wbt=t=>{const e=[];for(const n of t.decompose()){const o=Bbt(n.toPolygons());if(o.length===0)continue;const i=o.reduce((s,a)=>Math.abs(qW(a))>Math.abs(qW(s))?a:s),r=o.filter(s=>s!==i);e.push({outerRing:i,innerRings:r})}return e},ej=(t,e,n=32)=>{const o=[];for(let i=0;i<n;i++){const r=i/n*2*Math.PI;o.push({x:t.x+e*Math.cos(r),y:t.y+e*Math.sin(r)})}return o},Pbt=(t,e,n,o=0,i=32)=>{if(e<=0||n<=0)return[];const r=e/2,s=n/2,a=o*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[];for(let u=0;u<i;u++){const g=u/i*2*Math.PI,h=r*Math.cos(g),d=s*Math.sin(g);l.push({x:t.x+h*A-d*c,y:t.y+h*c+d*A})}return l},rve=(t,e,n,o)=>[{x:t,y:e},{x:n,y:e},{x:n,y:o},{x:t,y:o}],Mbt=(t,e,n,o)=>{const i=e/2,r=n/2,s=o*Math.PI/180,a=Math.cos(s),A=Math.sin(s);return[{x:-i,y:-r},{x:i,y:-r},{x:i,y:r},{x:-i,y:r}].map(c=>({x:t.x+c.x*a-c.y*A,y:t.y+c.x*A+c.y*a}))},sve=(t,e,n)=>{const o=Math.hypot(t.x-e.x,t.y-e.y);if(o===0)return[];const i=(t.x+e.x)/2,r=(t.y+e.y)/2,s=Math.atan2(e.y-t.y,e.x-t.x),a=Math.cos(s),A=Math.sin(s),c=o/2,l=n/2;return[{x:-c,y:-l},{x:c,y:-l},{x:c,y:l},{x:-c,y:l}].map(u=>({x:i+u.x*a-u.y*A,y:r+u.x*A+u.y*a}))},Dbt=(t,e,n,o,i=0,r=32)=>{if(o<=0)return[];const s=n>=e,a=Math.max(e,n)-2*o,A=Math.max(0,a/2),l=(s?Math.PI/2:0)+i*Math.PI/180,u=Math.cos(l),g=Math.sin(l),h={x:t.x-A*u,y:t.y-A*g},d={x:t.x+A*u,y:t.y+A*g};if(A===0)return ej(t,o,r);const p=[],m=Math.max(4,Math.floor(r/2));for(let _=0;_<=m;_++){const f=l-Math.PI/2+_/m*Math.PI;p.push({x:d.x+o*Math.cos(f),y:d.y+o*Math.sin(f)})}for(let _=0;_<=m;_++){const f=l+Math.PI/2+_/m*Math.PI;p.push({x:h.x+o*Math.cos(f),y:h.y+o*Math.sin(f)})}return p},$mo=t=>{if(t.shape==="rect")return{x:(t.bounds.minX+t.bounds.maxX)/2,y:(t.bounds.minY+t.bounds.maxY)/2};if(t.shape==="polygon"){const e=t.points.reduce((n,o)=>({minX:Math.min(n.minX,o.x),minY:Math.min(n.minY,o.y),maxX:Math.max(n.maxX,o.x),maxY:Math.max(n.maxY,o.y)}),{minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY});return{x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2}}return{x:t.x,y:t.y}},qmo=t=>t.shape==="rotated_rect"||t.shape==="pill"||t.shape==="oval"?t.ccwRotation:0,Nbt=(t,e)=>{if(t.shape==="circle")return[ej({x:t.x,y:t.y},t.radius+e)];if(t.shape==="pill")return[Dbt({x:t.x,y:t.y},t.width+e*2,t.height+e*2,t.radius+e,t.ccwRotation)];if(t.shape==="oval"){const n=Pbt({x:t.x,y:t.y},t.width,t.height,t.ccwRotation);return e>0?Wce(n,e,"Round"):[n]}if(t.shape==="rect")return[rve(t.bounds.minX-e,t.bounds.minY-e,t.bounds.maxX+e,t.bounds.maxY+e)];if(t.shape==="polygon"){const n=TN(t.points,"generateThermalReliefClearances.polygonPad");return e>0?Wce(n,e,"Round"):[n]}return[Mbt({x:t.x,y:t.y},t.width+e*2,t.height+e*2,t.ccwRotation)]},Xmo=t=>t.shape==="circle"||t.shape==="oval"||t.shape==="pill"||t.shape==="polygon"||t.shape==="rect"||t.shape==="rotated_rect",Zmo=(t,e,n,o=4)=>{if(!Xmo(t)||e<=0)return[];if(typeof n!="number"||!Number.isFinite(n)||n<=0)throw new Error("thermal_relief_spoke_width must be greater than 0");if(!Number.isInteger(o)||o<1)throw new Error("thermal_relief_spoke_count must be a positive integer");const i=Nbt(t,0),r=Nbt(t,e),s=$mo(t),a=Math.max(...r.flatMap(h=>h).map(h=>Math.hypot(h.x-s.x,h.y-s.y)))+n,A=qmo(t)*Math.PI/180,c=[];for(let h=0;h<o;h++){const d=A+h/o*Math.PI*2;c.push(sve(s,{x:s.x+Math.cos(d)*a,y:s.y+Math.sin(d)*a},n))}const l=ive(r),u=ive([...i,...c]),g=vbt(l,[u]);return wbt(g).map(({outerRing:h})=>h)},e_o=t=>t.shape==="rect",t_o=t=>t.shape==="rotated_rect",n_o=t=>t.shape==="trace",o_o=t=>t.shape==="circle",i_o=t=>t.shape==="pill",r_o=t=>t.shape==="oval",s_o=t=>t.shape==="polygon",a_o=(t,e,n,o)=>{const i=[],{padMargin:r,traceMargin:s,board_edge_margin:a,cutoutMargin:A,use_thermal_reliefs:c,thermal_relief_spoke_width:l,thermal_relief_spoke_count:u}=n;if(o&&o.length>0&&a&&a>0){const g=TN(o,"processObstacles.boardOutline");for(let h=0;h<g.length;h++){const d=g[h===0?g.length-1:h-1],p=g[h],m=g[(h+1)%g.length];if(!d||!p||!m)continue;const _={x:p.x-d.x,y:p.y-d.y},f={x:m.x-p.x,y:m.y-p.y},I=_.x*f.y-_.y*f.x;i.push(ej(p,a)),I<0&&i.push(rve(p.x-a,p.y-a,p.x+a,p.y+a))}for(let h=0;h<g.length;h++){const d=g[h],p=g[(h+1)%g.length];if(!d||!p)continue;const m=sve(d,p,a*2);m.length>0&&i.push(m)}}for(const g of t){if(g.connectivityKey===e){(g.isPlatedHole||g.isSmtPad)&&c&&i.push(...Zmo(g,r,l,u));continue}const d=g.connectivityKey.startsWith("hole:")||g.connectivityKey.startsWith("cutout:"),p=g.connectivityKey.startsWith("keepout:"),m=_=>p?0:d?A??0:_;if(o_o(g)){const _=m(r);i.push(ej({x:g.x,y:g.y},g.radius+_));continue}if(i_o(g)){const _=m(r);i.push(Dbt({x:g.x,y:g.y},g.width+_*2,g.height+_*2,g.radius+_,g.ccwRotation));continue}if(r_o(g)){const _=m(r),f=Pbt({x:g.x,y:g.y},g.width,g.height,g.ccwRotation);i.push(..._>0?Wce(f,_,"Round"):[f]);continue}if(e_o(g)){const _=m(r),{bounds:f}=g;i.push(rve(f.minX-_,f.minY-_,f.maxX+_,f.maxY+_));continue}if(t_o(g)){const _=m(r);i.push(Mbt({x:g.x,y:g.y},g.width+_*2,g.height+_*2,g.ccwRotation));continue}if(s_o(g)){const _=m(r),f=new Set,I=g.points.filter(y=>{const x=`${y.x},${y.y}`;return f.has(x)?!1:(f.add(x),!0)});if(I.length<3)continue;const C=TN(I,"processObstacles.polygonPad");if(C.length<3)continue;if(_<=0){i.push(C);continue}i.push(...Wce(C,_));continue}if(n_o(g)){for(const _ of g.segments)i.push(ej(_,g.width/2+s));for(let _=0;_<g.segments.length-1;_++){const f=g.segments[_],I=g.segments[_+1];if(!f||!I)continue;const C=sve(f,I,g.width+s*2);C.length>0&&i.push(C)}}}return{polygonsToSubtract:i}},Rbt=class extends eve{constructor(t){super(t),this.input=t}input;pipelineDef=[];getSolverName(){return"CopperPourPipelineSolver"}getOutput(){if(!Kmo())throw new Error("Manifold geometry has not been initialized. Call initializeManifoldGeometry() before solving copper pours.");const t=this.input.regionsForPour.map(()=>[]),e=[];for(let n=this.input.regionsForPour.length-1;n>=0;n--){const o=this.input.regionsForPour[n],i=Ymo(o),r=this.input.pads.filter(g=>g.layer===o.layer),{polygonsToSubtract:s}=a_o(r,o.connectivityKey,{padMargin:o.padMargin,traceMargin:o.traceMargin,board_edge_margin:o.board_edge_margin,cutoutMargin:o.cutout_margin,use_thermal_reliefs:o.use_thermal_reliefs,thermal_relief_spoke_width:o.thermal_relief_spoke_width,thermal_relief_spoke_count:o.thermal_relief_spoke_count},o.boardEdgeOutline??o.outline),a=o.pourMargin??Math.max(o.padMargin,o.traceMargin),A=e.filter(g=>g.layer===o.layer&&g.connectivityKey!==o.connectivityKey).map(g=>Jmo(g.section,Math.max(a,g.pourMargin))),c=Wmo(i,s),l=jmo(vbt(c,A)),u=wbt(l);t[n]=Gmo(u),e.push({layer:o.layer,connectivityKey:o.connectivityKey,pourMargin:a,section:l})}return{brep_shapes:t.flat(),brep_shapes_by_region:t}}},A_o=t=>{const e=t.subcircuit_connectivity_map_key;return typeof e=="string"&&e.length>0?e:void 0},jce=t=>{const e=t.subcircuit_id;return typeof e=="string"&&e.length>0?e:void 0},$ce=(t,e)=>t?`subcircuit:${t}:connectivity:${e}`:e,c_o=(t,e)=>{if(!e)return;const n={};for(const r of t){if(r.type!=="source_group")continue;const s=r.source_group_id,a=jce(r);typeof s=="string"&&a&&(n[s]=a)}const o=new Set([e]);let i=!0;for(;i;){i=!1;for(const r of t){if(r.type!=="source_group")continue;const s=jce(r);if(!s||o.has(s))continue;const a=r.parent_subcircuit_id,A=r.parent_source_group_id,c=typeof A=="string"?n[A]:void 0;(typeof a=="string"&&o.has(a)||c&&o.has(c))&&(o.add(s),i=!0)}}return o},l_o=(t,e,n)=>{const o=c_o(t,n),i={},r={},s={},a=new Set;for(const l of t){const u=hz(l),g=A_o(l),h=jce(l);if(u&&(r[u]=h),!(o&&(!h||!o.has(h)))&&u&&g){const d=$ce(h,g);i[u]=d,a.add(g),s[d]??=[],s[d].push(u)}}const A={};for(const[l,u]of Object.entries(e.netMap)){const g=new Set(u.map(d=>i[d]).filter(d=>!!d)),h=Array.from(g).sort()[0];h&&(A[l]=h)}const c={};for(const[l,u]of Object.entries(s)){const g=new Set;for(const d of u){const p=e.getNetConnectedToId(d),m=p?A[p]:void 0;g.add(m??l)}if(g.size>1)throw new Error(`subcircuit_connectivity_map_key "${l}" maps to multiple global connectivity keys: ${Array.from(g).join(", ")}`);const h=g.values().next().value;h&&(c[l]=h)}return{knownSubcircuitConnectivityKeys:new Set([...Object.keys(s),...a]),descendantSubcircuitIds:o,getScopedSubcircuitConnectivityKey:$ce,getElementSubcircuitId:jce,resolveSubcircuitConnectivityKey(l,u){const g=Object.keys(s).filter(d=>d===$ce(u,l));u&&g.length===0&&o&&g.push(...Object.keys(s).filter(d=>d.endsWith(`:connectivity:${l}`))),u||g.push(...Object.keys(s).filter(d=>d.endsWith(`:connectivity:${l}`)));const h=Array.from(new Set(g));if(h.length===0){if(u&&o)throw new Error(`No subcircuit_connectivity_map_key "${l}" found in subcircuit "${u}" or its child subcircuits.`);return $ce(u,l)}if(h.length>1)throw new Error(`subcircuit_connectivity_map_key "${l}" exists in multiple subcircuits. Pass subcircuit_id to disambiguate.`);return c[h[0]]??h[0]},getSubcircuitConnectivityKeyForId(l){if(o){const h=r[l];if(!h||!o.has(h))return}const u=i[l],g=e.getNetConnectedToId(l);return g?A[g]??(u?c[u]:void 0)??u:u?c[u]??u:void 0}}},u_o=(t,e,n)=>{if(e.subcircuit_connectivity_map_key)return n.resolveSubcircuitConnectivityKey(e.subcircuit_connectivity_map_key,e.subcircuit_id);if(e.source_net_id){const o=t.find(i=>i.type==="source_net"&&i.source_net_id===e.source_net_id);if(!o)throw new Error(`No source_net found with id "${e.source_net_id}"`);if(!o.subcircuit_connectivity_map_key)throw new Error(`source_net "${e.source_net_id}" has no subcircuit_connectivity_map_key`);return n.resolveSubcircuitConnectivityKey(o.subcircuit_connectivity_map_key,o.subcircuit_id??e.subcircuit_id)}if(e.source_net_name){const o=t.find(i=>i.type==="source_net"&&i.name===e.source_net_name&&(!e.subcircuit_id||!!n.descendantSubcircuitIds?.has(i.subcircuit_id??"")));if(!o)throw new Error(`No source_net found with name "${e.source_net_name}"`);if(!o.subcircuit_connectivity_map_key)throw new Error(`source_net "${e.source_net_name}" has no subcircuit_connectivity_map_key`);return n.resolveSubcircuitConnectivityKey(o.subcircuit_connectivity_map_key,o.subcircuit_id??e.subcircuit_id)}if(e.pour_connectivity_key){if(!n.knownSubcircuitConnectivityKeys.has(e.pour_connectivity_key))throw new Error("pour_connectivity_key must be a subcircuit_connectivity_map_key. Use subcircuit_connectivity_map_key, source_net_id, or source_net_name instead of a generated connectivity-map id.");return n.resolveSubcircuitConnectivityKey(e.pour_connectivity_key,e.subcircuit_id)}throw new Error("Copper pour requires source_net_id, source_net_name, or subcircuit_connectivity_map_key")},Tbt=(t,e)=>{if(Array.isArray(e)){if(e.length===0)return{pads:[],regionsForPour:[]};const d=e[0].subcircuit_id;if(e.some(_=>_.subcircuit_id!==d))throw new Error("All copper pours in one input problem must use the same subcircuit_id");const p=e.map(_=>Tbt(t,_)),m=new Map;for(const _ of p)for(const f of _.pads)m.set(`${f.layer}:${f.padId}`,f);return{pads:[...m.values()],regionsForPour:p.flatMap(_=>_.regionsForPour)}}const n=e,o=t.find(d=>d.type==="pcb_board");if(!o)throw new Error("No pcb_board found in circuit json");const i=Vf(t),r=l_o(t,i,n.subcircuit_id),s=u_o(t,n,r),{getSubcircuitConnectivityKeyForId:a}=r,A=[];for(const d of t)if(d.type==="pcb_smtpad"){const p=d;if(p.layer!==n.layer)continue;let m;m=a(p.pcb_smtpad_id),m||(m=`unconnected:${p.pcb_smtpad_id}`),p.shape==="rect"?A.push({shape:"rect",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,bounds:{minX:p.x-p.width/2,minY:p.y-p.height/2,maxX:p.x+p.width/2,maxY:p.y+p.height/2}}):p.shape==="rotated_rect"?A.push({shape:"rotated_rect",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,x:p.x,y:p.y,width:p.width,height:p.height,ccwRotation:p.ccw_rotation}):p.shape==="circle"?A.push({shape:"circle",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,x:p.x,y:p.y,radius:p.radius}):p.shape==="pill"||p.shape==="rotated_pill"?A.push({shape:"pill",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,x:p.x,y:p.y,width:p.width,height:p.height,radius:p.radius,ccwRotation:p.shape==="rotated_pill"?p.ccw_rotation:0}):p.shape==="polygon"&&A.push({shape:"polygon",padId:p.pcb_smtpad_id,layer:p.layer,connectivityKey:m,isSmtPad:!0,points:p.points})}else if(d.type==="pcb_plated_hole"){const p=d;if(!p.layers.includes(n.layer))continue;let m=a(p.pcb_plated_hole_id);if(m||(m=`unconnected-plated-hole:${p.pcb_plated_hole_id}`),p.shape==="circle")A.push({shape:"circle",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,radius:p.outer_diameter/2});else if(p.shape==="pill")A.push({shape:"pill",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,width:p.outer_width,height:p.outer_height,radius:Math.min(p.outer_width,p.outer_height)/2,ccwRotation:p.ccw_rotation});else if(p.shape==="oval")A.push({shape:"oval",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,width:p.outer_width,height:p.outer_height,ccwRotation:p.ccw_rotation});else if(p.shape==="circular_hole_with_rect_pad"||p.shape==="pill_hole_with_rect_pad"||p.shape==="rotated_pill_hole_with_rect_pad"){const _=p.rect_pad_width,f=p.rect_pad_height;if(typeof _!="number"||typeof f!="number")continue;const I=p.shape==="pill_hole_with_rect_pad"?0:p.rect_ccw_rotation??0;I===0?A.push({shape:"rect",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,bounds:{minX:p.x-_/2,minY:p.y-f/2,maxX:p.x+_/2,maxY:p.y+f/2}}):A.push({shape:"rotated_rect",padId:p.pcb_plated_hole_id,layer:n.layer,connectivityKey:m,isPlatedHole:!0,x:p.x,y:p.y,width:_,height:f,ccwRotation:I})}}else if(d.type==="pcb_hole"){const p=d;if(p.hole_shape!=="circle")continue;A.push({shape:"circle",padId:p.pcb_hole_id,layer:n.layer,connectivityKey:`hole:${p.pcb_hole_id}`,x:p.x,y:p.y,radius:p.hole_diameter/2})}else if(d.type==="pcb_cutout"){const p=d;p.shape==="rect"?A.push({shape:"rect",padId:p.pcb_cutout_id,layer:n.layer,connectivityKey:`cutout:${p.pcb_cutout_id}`,bounds:{minX:p.center.x-p.width/2,minY:p.center.y-p.height/2,maxX:p.center.x+p.width/2,maxY:p.center.y+p.height/2}}):p.shape==="circle"?A.push({shape:"circle",padId:p.pcb_cutout_id,layer:n.layer,connectivityKey:`cutout:${p.pcb_cutout_id}`,x:p.center.x,y:p.center.y,radius:p.radius}):p.shape==="polygon"&&A.push({shape:"polygon",padId:p.pcb_cutout_id,layer:n.layer,connectivityKey:`cutout:${p.pcb_cutout_id}`,points:p.points})}else if(d.type==="pcb_keepout"){const p=d;if(!p.layers.includes(n.layer))continue;p.shape==="rect"?A.push({shape:"rect",padId:p.pcb_keepout_id,layer:n.layer,connectivityKey:`keepout:${p.pcb_keepout_id}`,bounds:{minX:p.center.x-p.width/2,minY:p.center.y-p.height/2,maxX:p.center.x+p.width/2,maxY:p.center.y+p.height/2}}):p.shape==="circle"&&A.push({shape:"circle",padId:p.pcb_keepout_id,layer:n.layer,connectivityKey:`keepout:${p.pcb_keepout_id}`,x:p.center.x,y:p.center.y,radius:p.radius})}else if(d.type==="pcb_via"){const p=d;if(!p.layers.includes(n.layer))continue;const m=a(p.pcb_via_id)??`unconnected-via:${p.pcb_via_id}`;A.push({shape:"circle",padId:p.pcb_via_id,layer:n.layer,connectivityKey:m,x:p.x,y:p.y,radius:p.outer_diameter/2})}else if(d.type==="pcb_trace"){const p=d,m=a(p.pcb_trace_id);if(!m)continue;let _=[],f=null;const I=()=>{_.length>1&&A.push({shape:"trace",padId:`${p.pcb_trace_id}-${A.length}`,layer:n.layer,connectivityKey:m,segments:_,width:f}),_=[],f=null};for(const C of p.route){const y=C;if(y.route_type==="wire"&&y.layer===n.layer){const E={x:y.x,y:y.y};f===null?f=y.width:y.width!==f&&(_.push(E),I(),f=y.width),_.push(E)}else I()}I()}const{width:c,height:l}=o,u=n.outline??o.outline;let g;if(u&&u.length>0){const d=u.map(m=>m.x),p=u.map(m=>m.y);g={minX:Math.min(...d),minY:Math.min(...p),maxX:Math.max(...d),maxY:Math.max(...p)}}else g={minX:-c/2,minY:-l/2,maxX:c/2,maxY:l/2};const h=[{shape:"rect",layer:n.layer,bounds:g,boardEdgeOutline:n.board_edge_outline,outline:u,connectivityKey:s,padMargin:n.pad_margin,traceMargin:n.trace_margin,pourMargin:n.pour_margin??Math.max(n.pad_margin,n.trace_margin),board_edge_margin:n.board_edge_margin??0,cutout_margin:n.cutout_margin,use_thermal_reliefs:n.use_thermal_reliefs,thermal_relief_spoke_width:n.thermal_relief_spoke_width,thermal_relief_spoke_count:n.thermal_relief_spoke_count}];return{pads:A,regionsForPour:h}};function ave(t,e){if(t.points)for(const n of t.points)n.step=e;if(t.lines)for(const n of t.lines)n.step=e;if(t.infiniteLines)for(const n of t.infiniteLines)n.step=e;if(t.polygons)for(const n of t.polygons)n.step=e;if(t.rects)for(const n of t.rects)n.step=e;if(t.circles)for(const n of t.circles)n.step=e;if(t.texts)for(const n of t.texts)n.step=e;if(t.arrows)for(const n of t.arrows)n.step=e;return t}var tj=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,this.failed=!0,e}!this.solved&&this.iterations>=this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>=this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}getOutput(){return null}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function qce(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var g_o=class extends tj{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(e){super(),this.inputProblem=e,this.MAX_ITERATIONS=1e6}_step(){const e=this.pipelineDef[this.currentPipelineStageIndex];if(!e){this.solved=!0;return}if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[e.solverName]=performance.now(),this.timeSpentOnStage[e.solverName]=this.endTimeOfStage[e.solverName]-this.startTimeOfStage[e.solverName];const o=this.activeSubSolver.getOutput();o!==null&&(this.pipelineOutputs[e.solverName]=o),e.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const n=e.getConstructorParams(this);this.activeSubSolver=new e.solverClass(...n),this[e.solverName]=this.activeSubSolver,this.timeSpentOnStage[e.solverName]=0,this.startTimeOfStage[e.solverName]=performance.now(),this.firstIterationOfStage[e.solverName]=this.iterations}solveUntilStage(e){for(;this.getCurrentStageName().toLowerCase()!==e.toLowerCase()&&(this.step(),!(this.failed||this.solved)););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??"none"}getStageProgress(){const e=this.pipelineDef.length;if(e===0)return 1;const n=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+n)/e}getStageStats(){const e={};for(const n of this.pipelineDef){const o=this.timeSpentOnStage[n.solverName]||0,i=this.firstIterationOfStage[n.solverName]||0,r=this.iterations,s=n.solverName===this.getCurrentStageName()?r-i:0,a=this.currentPipelineStageIndex>this.pipelineDef.findIndex(A=>A.solverName===n.solverName);e[n.solverName]={timeSpent:o,iterations:s,completed:a}}return e}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();let e=0;const n=this.initialVisualize();n&&(ave(n,0),e=1);let o=null;this.solved&&(o=this.finalVisualize());const i=[n].filter(Boolean).concat(this.pipelineDef.map((r,s)=>{const A=this[r.solverName]?.visualize();return A?(ave(A,s+e),A):null}).filter(Boolean));return i.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved&&o&&(ave(o,i.length+e+1),i.push(o)),i.length===1?i[0]:{points:i.flatMap(r=>r.points||[]),rects:i.flatMap(r=>r.rects||[]),lines:i.flatMap(r=>r.lines||[]),circles:i.flatMap(r=>r.circles||[]),texts:i.flatMap(r=>r.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(e){return this.pipelineOutputs[e]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(e){return e in this.pipelineOutputs}getSolver(e){return this[e]}},kbt=["x_pos","x_neg","y_pos","y_neg","z_pos","z_neg"],d_o=t=>typeof t=="string"&&kbt.includes(t),h_o=(t,e="face")=>{if(!d_o(t))throw new Error(`${e} must be one of ${kbt.join(", ")}, got ${JSON.stringify(t)}. The named directions (front/back/left/right/top/bottom) were retired: faces are named for the axis their outward normal points along, so the old \`top\` (+Z) is \`z_pos\` and the old \`front\` (+Y) is \`y_pos\`.`);return t},hb=t=>t.slice(0,1),kH=t=>t.endsWith("_pos")?1:-1,Fbt=t=>{const e=hb(t);return e==="x"?["y","z"]:e==="y"?["x","z"]:["x","y"]},z5=t=>hb(t)==="z",Lbt=t=>t==="x"?0:t==="y"?1:2,Xce=(t,e)=>[t.width,t.height,t.depth][Lbt(e)],p_o=(t,e,n,o)=>{const i=n*Math.PI/180,r=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i));return o==="x"?t*r+e*s:t*s+e*r},m_o=({body:t,face:e})=>{if(!t)return;if(z5(e))return t.aboveBoardHeight??t.size?.z;const n=hb(e)==="y"?"y":"x",o=t.footprint&&(n==="y"?t.footprint.height:t.footprint.width);if(!t.size)return o;const i=p_o(t.size.x,t.size.y,t.rotation??0,n);return o===void 0?i:Math.max(i,o)},__o=t=>t?.aboveBoardHeight,f_o=t=>({type:"cuboid",size:t}),I_o=(t,e)=>({type:"cylinder",radius:t,height:e,resolution:32}),Ave=(t,e)=>({type:"translate",vector:t,shape:e}),C_o={x:[Math.PI/2,0,Math.PI/2],y:[Math.PI/2,0,0]},y_o=(t,e)=>{const n=hb(t);return n==="z"?e:{type:"rotate",angles:C_o[n],shape:e}},Hbt=({width:t,height:e,cutDepth:n})=>f_o([t,e,n]),cve=({diameter:t,cutDepth:e})=>I_o(t/2,e),x_o=({width:t,height:e,cutDepth:n})=>{if(Math.abs(t-e)<Number.EPSILON)return cve({diameter:t,cutDepth:n});const o=t>e,i=Math.min(t,e)/2,r=Math.abs(t-e),s=Hbt({width:o?r:t,height:o?e:r,cutDepth:n}),a=cve({diameter:i*2,cutDepth:n}),A=c=>o?[c,0,0]:[0,c,0];return{type:"union",shapes:[s,Ave(A(-r/2),a),Ave(A(r/2),a)]}},E_o=({placement:t,faceThickness:e,booleanTolerance:n})=>{const{aperture:o,face:i,center:r,width:s,height:a,inwardProjection:A}=t,l=(t.incidenceDegrees??0)*Math.PI/180,u=Math.abs(Math.cos(l)),g=Math.abs(Math.tan(l)),h=(e+n*2)/u+s*g+A;let d;switch(o.shape){case"rect":d=Hbt({width:s,height:a,cutDepth:h});break;case"circle":d=cve({diameter:s,cutDepth:h});break;case"pill":d=x_o({width:s,height:a,cutDepth:h});break}const p=t.rotation===0?d:{type:"rotate",angles:[0,0,t.rotation*Math.PI/180],shape:d},m=hb(i),_=kH(i),f=[r.x,r.y,r.z];if(m==="z")f[Lbt(m)]-=_*A/2;else{const y=m==="x"?_:0,x=m==="y"?_:0,E=Math.cos(l),B=Math.sin(l),S=y*E-x*B,Q=y*B+x*E;f[0]-=S*A/2,f[1]-=Q*A/2}const I=y_o(i,p),C=t.incidenceDegrees===void 0||t.incidenceDegrees===0?I:{type:"rotate",angles:[0,0,t.incidenceDegrees*Math.PI/180],shape:I};return{aperture:o,width:s,height:a,cutDepth:h,jscadPlan:Ave(f,C)}},lve=t=>{const e=t.margin??0;if(t.shape==="circle"){const n=2*(t.radius+e);return{width:n,height:n}}return{width:t.width+e*2,height:t.height+e*2}},Obt=t=>{const e=__o(t.componentBody);return e!==void 0?e/2:lve(t).height/2},Xm=t=>`${Number(t.toFixed(3))}mm`,FH=(t,e)=>{if(!Number.isFinite(t))throw new Error(`${e} must be finite, but is ${t}`)},F7=(t,e)=>{if(FH(t,e),t<=0)throw new Error(`${e} must be greater than 0, but is ${Xm(t)}`)},LH=(t,e)=>{if(FH(t,e),t<0)throw new Error(`${e} must not be negative, but is ${Xm(t)}`)},B_o=(t,e)=>{const n=`apertures[${e}]`;h_o(t.face,`${n}.face`),FH(t.center.x,`${n}.center.x`),FH(t.center.y,`${n}.center.y`),LH(t.margin??0,`${n}.margin`),t.shape==="circle"?F7(t.radius,`${n}.radius`):(F7(t.width,`${n}.width`),F7(t.height,`${n}.height`)),t.depth!==void 0&&LH(t.depth,`${n}.depth`),t.widthDimensionOffset!==void 0&&FH(t.widthDimensionOffset,`${n}.widthDimensionOffset`),t.heightDimensionOffset!==void 0&&FH(t.heightDimensionOffset,`${n}.heightDimensionOffset`)},Gbt=({floorThickness:t,standoffHeight:e,boardThickness:n})=>{const o=t,i=o+e;return{floorTopZ:o,boardBottomZ:i,boardTopZ:i+n}},b_o=({seamOffsetFromTop:t,totalHeight:e,...n})=>({...Gbt(n),seamZ:e-t,totalHeight:e}),Zce=["y_pos","x_pos","y_neg","x_neg"],uve=5,gve=(t,e)=>Xce(e,Fbt(t)[0]),S_o=t=>{const e=new Map;let o=-Zce.reduce((i,r)=>i+gve(r,t),uve*(Zce.length-1))/2;for(const i of Zce){const r=gve(i,t);e.set(i,o+r/2),o+=r+uve}return e},Ybt=(t,e)=>{const n=t.get(e);if(n===void 0)throw new Error(`Missing ${e} wall panel`);return n},Q_o=({graphics:t,placement:e,panelCenterX:n,planViewY:o,isProcessed:i})=>{const{aperture:r,width:s,height:a}=e,A=e.face==="y_pos"||e.face==="y_neg"?e.center.x:e.center.y,c=e.face==="y_pos"||e.face==="x_neg"?-1:1,l=z5(e.face)?{x:e.center.x,y:o+e.center.y}:{x:n+c*A,y:e.center.z},u=i?"rgba(239, 68, 68, 0.4)":"rgba(148, 163, 184, 0.12)",g=i?"#dc2626":"#94a3b8",d=`${z5(e.face)?`${e.face} `:""}${r.shape} ${s.toFixed(1)}×${a.toFixed(1)}`;if(r.shape==="rect"){t.rects?.push({center:l,width:s,height:a,fill:u,stroke:g,label:d});return}if(r.shape==="circle"){t.circles?.push({center:l,radius:s/2,fill:u,stroke:g,label:d});return}const p=s>=a,m=Math.min(s,a)/2,_=Math.abs(s-a);t.rects?.push({center:l,width:p?_:s,height:p?a:_,fill:u,stroke:g,label:d}),t.circles?.push({center:{x:l.x+(p?-_/2:0),y:l.y+(p?0:-_/2)},radius:m,fill:u,stroke:g},{center:{x:l.x+(p?_/2:0),y:l.y+(p?0:_/2)},radius:m,fill:u,stroke:g})},nj=({title:t,resolved:e,processedApertureCount:n=0})=>{const{board:o,dimensions:i}=e,r={title:t,coordinateSystem:"cartesian",rects:[],circles:[],lines:[],points:[],texts:[]},s=S_o(i),a=-i.height/2-uve;for(const A of Zce){const c=Ybt(s,A);r.rects?.push({center:{x:c,y:i.depth/2},width:gve(A,i),height:i.depth,fill:"rgba(59, 130, 246, 0.08)",stroke:"#2563eb",label:A}),r.texts?.push({x:c,y:i.depth+1.5,text:A,anchorSide:"bottom_center",color:"#1e3a8a",fontSize:1.5})}for(const[A,c]of e.apertures.entries())Q_o({graphics:r,placement:c,panelCenterX:z5(c.face)?0:Ybt(s,c.face),planViewY:a,isProcessed:A<n});return r.rects?.push({center:{x:0,y:a},width:i.width,height:i.height,fill:"rgba(59, 130, 246, 0.05)",stroke:"#1d4ed8",label:"enclosure top view"},{center:{x:0,y:a},width:o.width,height:o.height,fill:"rgba(34, 197, 94, 0.18)",stroke:"#15803d",label:"board"}),r},v_o=class extends tj{constructor(t){super(),this.params=t}params;enclosurePlans;_step(){const t=this.params.apertureCutouts.map(i=>i.jscadPlan),e=i=>t.length===0?i:{type:"subtract",shapes:[i,...t]},n=e(this.params.shellPlans.basePlan),o=e(this.params.shellPlans.lidPlan);this.enclosurePlans={parts:[{id:"base",jscadPlan:n},{id:"lid",jscadPlan:o}],assembledPlan:{type:"union",shapes:[n,o]}},this.solved=!0}getOutput(){if(!this.enclosurePlans)throw new Error("Enclosure plan has not been composed");return this.enclosurePlans}getConstructorParams(){return[this.params]}visualize(){return nj({title:"Composed enclosure",resolved:this.params.resolved,processedApertureCount:this.params.apertureCutouts.length})}},w_o=(t,e)=>t==="z_pos"?e.lidThickness:t==="z_neg"?e.floorThickness:e.wallThickness,P_o=class extends tj{constructor(t){super(),this.params=t,this.MAX_ITERATIONS=t.resolved.apertures.length+1}params;apertureCutouts=[];_step(){const t=this.params.resolved.apertures,e=t[this.apertureCutouts.length];if(!e){this.solved=!0;return}this.apertureCutouts.push(E_o({placement:e,faceThickness:w_o(e.face,this.params.resolved.dimensions),booleanTolerance:this.params.resolved.rules.booleanTolerance})),this.apertureCutouts.length===t.length&&(this.solved=!0)}computeProgress(){const t=this.params.resolved.apertures.length;return t===0?this.solved?1:0:this.apertureCutouts.length/t}getOutput(){return this.apertureCutouts}getConstructorParams(){return[this.params]}visualize(){return nj({title:`Aperture cutouts (${this.apertureCutouts.length}/${this.params.resolved.apertures.length})`,resolved:this.params.resolved,processedApertureCount:this.apertureCutouts.length})}},M_o=class extends tj{constructor(t){super(),this.params=t}params;shellPlans;_step(){const{dimensions:t,rules:e,frame:n}=this.params.resolved,{width:o,height:i,wallThickness:r,floorThickness:s,lidThickness:a,lidLipDepth:A}=t,c=o-2*r,l=i-2*r,u=n.seamZ,g=u-s+e.booleanTolerance*2,h={type:"subtract",shapes:[{type:"translate",vector:[0,0,u/2],shape:{type:"cuboid",size:[o,i,u]}},{type:"translate",vector:[0,0,s+g/2],shape:{type:"cuboid",size:[c,l,g]}}]},d={type:"translate",vector:[0,0,n.seamZ+a/2],shape:{type:"cuboid",size:[o,i,a]}},p=A;let m=d;if(p>0){const _=c-e.slidingFitClearance,f=l-e.slidingFitClearance,I=Math.min(r*e.lipWallThicknessRatio,e.lipWallThicknessMax),C=_-2*I,y=f-2*I,x={type:"subtract",shapes:[{type:"translate",vector:[0,0,n.seamZ-p/2],shape:{type:"cuboid",size:[_,f,p]}},{type:"translate",vector:[0,0,n.seamZ-p/2],shape:{type:"cuboid",size:[C,y,p+e.booleanTolerance*2]}}]};m={type:"union",shapes:[d,x]}}this.shellPlans={basePlan:h,lidPlan:m},this.solved=!0}getOutput(){if(!this.shellPlans)throw new Error("Enclosure shell has not been created");return this.shellPlans}getConstructorParams(){return[this.params]}visualize(){return nj({title:"Base and lid blanks",resolved:this.params.resolved})}},D_o=({axis:t,offset:e,extent:n,dimensions:o,face:i,prefix:r})=>{const s=Xce(o,t)/2,a=n/2,A=e-a,c=e+a,l=`the opening spans ${Xm(A)} to ${Xm(c)} but the enclosure only spans ${Xm(-s)} to ${Xm(s)}`;if(Math.abs(e)-a>s)throw new Error(`${r} misses the ${i} face along ${t.toUpperCase()}: ${l}`);if(a-Math.abs(e)>s)throw new Error(`${r} engulfs the ${i} face along ${t.toUpperCase()}: ${l}`)},N_o=({centerZ:t,extent:e,dimensions:n,prefix:o})=>{const i=t-e/2;if(i<n.floorThickness)throw new Error(`${o} intersects the enclosure floor: its lowest edge is at ${Xm(i)} but the floor top is at ${Xm(n.floorThickness)}. Raise heightDimensionOffset, or reduce the opening height.`);if(i>n.depth)throw new Error(`${o} sits entirely above the enclosure: its lowest edge is at ${Xm(i)} but the enclosure is only ${Xm(n.depth)} tall`)},R_o=({face:t,center:e,width:n,height:o,dimensions:i,prefix:r})=>{const s=Fbt(t),a=[n,o];s.forEach((A,c)=>{const l=a[c];if(A==="z"){N_o({centerZ:e.z,extent:l,dimensions:i,prefix:r});return}D_o({axis:A,offset:A==="x"?e.x:e.y,extent:l,dimensions:i,face:t,prefix:r})})},T_o={wallThickness:2,boardClearance:1,lidThickness:2,standoffHeight:4,topHeadroom:6,lidLipDepth:4,booleanTolerance:.5,slidingFitClearance:.3,lipWallThicknessRatio:.7,lipWallThicknessMax:1.5},k_o=({face:t,boardSide:e="top",componentBody:n,frame:o})=>{const i=m_o({body:n,face:t});if(i===void 0)return;if(!z5(t))return i;const r=e==="bottom"?o.boardBottomZ:o.boardTopZ,s=t==="z_pos"?o.seamZ:o.floorTopZ;return Math.max(0,Math.abs(s-r))},F_o=({face:t,depth:e=0,dimensions:n,rules:o})=>{if(z5(t))return t==="z_neg"?e:Math.max(e,n.lidLipDepth);const i=Math.min(n.wallThickness*o.lipWallThicknessRatio,o.lipWallThicknessMax),r=o.slidingFitClearance/2+i+o.booleanTolerance;return Math.max(e,r)},L_o=["x_pos","x_neg","y_pos","y_neg"],H_o=({face:t,origin:e,apertureAxisDirection:n,dimensions:o})=>{if(z5(t)||!n)return t;const i=Math.hypot(n.x,n.y);if(!Number.isFinite(i)||i===0)return t;const r={x:n.x/i,y:n.y/i},s=L_o.flatMap(a=>{const A=hb(a),c=kH(a);if(r[A]*c<=0)return[];const g=(c*(Xce(o,A)/2-o.wallThickness)-e[A])/r[A];return Number.isFinite(g)&&g>=0?[{face:a,distance:g}]:[]});return s.length===0?t:(s.sort((a,A)=>{const c=a.distance-A.distance;return Math.abs(c)>1e-9?c:a.face===t?-1:A.face===t?1:0}),s[0].face)},O_o=({face:t,apertureAxisDirection:e})=>{if(z5(t)||!e)return 0;const n=hb(t),o=kH(t),i={x:n==="x"?o:0,y:n==="y"?o:0},r=Math.hypot(e.x,e.y);if(!Number.isFinite(r)||r===0)throw new Error(`apertureAxisDirection must have a finite, non-zero XY projection for side face ${t}`);const s={x:e.x/r,y:e.y/r},a=i.x*s.y-i.y*s.x,A=i.x*s.x+i.y*s.y;return Math.atan2(a,A)*180/Math.PI},G_o=({face:t,incidenceDegrees:e,distanceToWall:n})=>{if(z5(t))return 0;const o=n*Math.tan(e*Math.PI/180),i=hb(t),r=kH(t),s=i==="x"?r:-r;return o*s},Ubt=({boardSide:t,heightDatum:e,heightDimensionOffset:n,boardTopZ:o,boardBottomZ:i})=>{const r=e+n;return t==="bottom"?i-r:o+r},Y_o=({face:t,boardCenter:e,centerZ:n,widthDimensionOffset:o,heightDimensionOffset:i,rotation:r,incidenceDegrees:s=0,dimensions:a,frame:A})=>{const c=hb(t);if(c==="z"){const g=r*Math.PI/180,h=Math.cos(g),d=Math.sin(g);return{x:e.x+o*h-i*d,y:e.y+o*d+i*h,z:t==="z_pos"?A.seamZ+a.lidThickness/2:a.floorThickness/2}}const l=kH(t)*(Xce(a,c)/2-a.wallThickness/2),u=G_o({face:t,incidenceDegrees:s,distanceToWall:(l-e[c==="x"?"x":"y"])*kH(t)});return c==="x"?{x:l,y:e.y+o+u,z:n}:{x:e.x+o+u,y:l,z:n}},U_o=({apertures:t,floorThickness:e,standoffHeight:n,boardThickness:o,lidThickness:i,lidLipDepth:r})=>{const{boardTopZ:s,boardBottomZ:a}=Gbt({floorThickness:e,standoffHeight:n,boardThickness:o});let A=0;for(const c of t){if(z5(c.face))continue;const u=Ubt({boardSide:c.boardSide??"top",heightDatum:Obt(c),heightDimensionOffset:c.heightDimensionOffset??0,boardTopZ:s,boardBottomZ:a})+lve(c).height/2+r;A=Math.max(A,u+i)}return A},Kbt=["width","height","depth"],K_o=({board:t,wallThickness:e,boardClearance:n,floorThickness:o,standoffHeight:i,topHeadroom:r,lidThickness:s})=>{const a=e+n,A=c=>`to fit the ${Xm(c)} board inside ${Xm(e)} walls with ${Xm(n)} clearance on each side`;return{width:{value:t.width+2*a,because:A(t.width)},height:{value:t.height+2*a,because:A(t.height)},depth:{value:o+i+t.thickness+r+s,because:`to stack ${Xm(o)} floor + ${Xm(i)} standoffs + ${Xm(t.thickness)} board + ${Xm(r)} headroom + ${Xm(s)} lid`}}},V_o=({input:t,rules:e})=>{F7(t.board.width,"board.width"),F7(t.board.height,"board.height"),F7(t.board.thickness,"board.thickness");const n=t.wallThickness??e.wallThickness,o=t.floorThickness??n,i=t.lidThickness??e.lidThickness,r=t.boardClearance??e.boardClearance,s=t.standoffHeight??e.standoffHeight,a=t.topHeadroom??e.topHeadroom,A=t.lidLipDepth??e.lidLipDepth;F7(n,"wallThickness"),F7(o,"floorThickness"),F7(i,"lidThickness"),LH(r,"boardClearance"),LH(s,"standoffHeight"),LH(a,"topHeadroom"),LH(A,"lidLipDepth");const c=K_o({board:t.board,wallThickness:n,boardClearance:r,floorThickness:o,standoffHeight:s,topHeadroom:a,lidThickness:i}),l=t.topHeadroom===void 0?Math.max(c.depth.value,U_o({apertures:t.apertures??[],floorThickness:o,standoffHeight:s,boardThickness:t.board.thickness,lidThickness:i,lidLipDepth:A})):c.depth.value,u={width:t.width??c.width.value,height:t.height??c.height.value,depth:t.depth??l,wallThickness:n,floorThickness:o,lidThickness:i,boardClearance:r,standoffHeight:s,topHeadroom:a,lidLipDepth:A};for(const g of Kbt)F7(u[g],g);for(const g of Kbt){const{value:h,because:d}=c[g];if(u[g]<h)throw new Error(`${g} must be at least ${Xm(h)} ${d}, but is ${Xm(u[g])}`)}return u},z_o=({board:t,dimensions:e})=>b_o({floorThickness:e.floorThickness,standoffHeight:e.standoffHeight,boardThickness:t.thickness,seamOffsetFromTop:e.lidThickness,totalHeight:e.depth}),J_o=t=>{const e={...T_o,...t.fdmRules},n=t.apertures??[];for(const[s,a]of n.entries())B_o(a,s);const o=V_o({input:t,rules:e}),i=z_o({board:t.board,dimensions:o});o.lidLipDepth=Math.min(o.lidLipDepth,Math.max(0,i.seamZ-o.floorThickness));const r=n.map((s,a)=>{const A=H_o({face:s.face,origin:s.center,apertureAxisDirection:s.apertureAxisDirection,dimensions:o}),c=`apertures[${a}]`,{width:l,height:u}=lve(s),g=O_o({face:A,apertureAxisDirection:s.apertureAxisDirection}),h=s.widthDimensionOffset??0,d=s.heightDimensionOffset??0,p=z5(A)?s.rotation??0:0,m=Y_o({face:A,boardCenter:s.center,widthDimensionOffset:h,heightDimensionOffset:d,rotation:p,incidenceDegrees:g,centerZ:Ubt({boardSide:s.boardSide??"top",heightDatum:Obt(s),heightDimensionOffset:d,boardTopZ:i.boardTopZ,boardBottomZ:i.boardBottomZ}),dimensions:o,frame:i}),_=z5(A)?l:l/Math.abs(Math.cos(g*Math.PI/180));R_o({face:A,center:m,width:_,height:u,dimensions:o,prefix:c});const f=s.depth??k_o({face:A,boardSide:s.boardSide,componentBody:s.componentBody,frame:i})??0;return{aperture:s,face:A,center:m,width:l,height:u,rotation:p,incidenceDegrees:g,inwardProjection:F_o({face:A,depth:f,dimensions:o,rules:e})}});return{construction:"fdm_box",board:t.board,apertures:r,dimensions:o,rules:e,frame:i}},W_o=class extends tj{constructor(t){super(),this.input=t}input;resolved;_step(){this.resolved=J_o(this.input),this.solved=!0}getOutput(){if(!this.resolved)throw new Error("FDM enclosure problem is not resolved");return this.resolved}getConstructorParams(){return[this.input]}visualize(){return this.resolved?nj({title:"Resolved FDM enclosure problem",resolved:this.resolved}):super.visualize()}},oj=(t,e)=>{if(!t)throw new Error(`${e} has not completed`);return t},Vbt=class extends g_o{resolveFdmEnclosureProblemSolver;createFdmEnclosureShellSolver;createFdmApertureCutoutsSolver;composeFdmEnclosureSolver;getResolvedProblem(){return oj(this.resolveFdmEnclosureProblemSolver,"resolveFdmEnclosureProblemSolver").getOutput()}pipelineDef=[qce("resolveFdmEnclosureProblemSolver",W_o,t=>[t.inputProblem]),qce("createFdmEnclosureShellSolver",M_o,t=>[{resolved:t.getResolvedProblem()}]),qce("createFdmApertureCutoutsSolver",P_o,t=>[{resolved:t.getResolvedProblem()}]),qce("composeFdmEnclosureSolver",v_o,t=>[{resolved:t.getResolvedProblem(),shellPlans:oj(t.createFdmEnclosureShellSolver,"createFdmEnclosureShellSolver").getOutput(),apertureCutouts:oj(t.createFdmApertureCutoutsSolver,"createFdmApertureCutoutsSolver").getOutput()}])];getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved)throw new Error("FDM enclosure solver has not completed");const t=this.getResolvedProblem(),e=oj(this.composeFdmEnclosureSolver,"composeFdmEnclosureSolver").getOutput();return{dimensions:t.dimensions,frame:t.frame,parts:e.parts,apertures:oj(this.createFdmApertureCutoutsSolver,"createFdmApertureCutoutsSolver").getOutput(),jscadPlan:e.assembledPlan}}initialVisualize(){return null}finalVisualize(){const t=this.getResolvedProblem();return nj({title:"Final FDM enclosure",resolved:t,processedApertureCount:t.apertures.length})}},jv=(t,e,n={x:0,y:0})=>{const o=Math.cos(e),i=Math.sin(e),r=t.x-n.x,s=t.y-n.y;return{x:n.x+r*o-s*i,y:n.y+r*i+s*o}},ele=t=>{t.pads=t.pads.map(e=>{const n=jv(e.offset,t.ccwRotationOffset*Math.PI/180),o=(t.ccwRotationOffset%360+360)%360;return{...e,size:o===90||o===270?{x:e.size.y,y:e.size.x}:e.size,absoluteCenter:{x:t.center.x+n.x,y:t.center.y+n.y}}})};function j_o({components:t,packOrderStrategy:e,packFirst:n=[]}){const o=new Map;return n.forEach((i,r)=>{o.set(i,r)}),[...t].sort((i,r)=>{const s=o.get(i.componentId),a=o.get(r.componentId);return s!==void 0&&a!==void 0?s-a:s!==void 0?-1:a!==void 0?1:e==="largest_to_smallest"?r.pads.length-i.pads.length:i.pads.length-r.pads.length})}var $_o=t=>{const e=Math.min(...t.map(r=>r.minX)),n=Math.min(...t.map(r=>r.minY)),o=Math.max(...t.map(r=>r.maxX)),i=Math.max(...t.map(r=>r.maxY));return{minX:e,minY:n,maxX:o,maxY:i}};function dve(t){const{bounds:e,center:n,width:o,height:i,angleRad:r}=t,s=t.translate?.x??0,a=t.translate?.y??0,A=o/2,c=i/2,l=[{x:n.x-A,y:n.y-c},{x:n.x+A,y:n.y-c},{x:n.x+A,y:n.y+c},{x:n.x-A,y:n.y+c}];for(const u of l){const g=jv(u,r),h=g.x+s,d=g.y+a;e.minX=Math.min(e.minX,h),e.maxX=Math.max(e.maxX,h),e.minY=Math.min(e.minY,d),e.maxY=Math.max(e.maxY,d)}}var kN=(t,e=0)=>{const n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},o=t.ccwRotationOffset*Math.PI/180;for(const i of t.pads){const r=jv(i.offset,o),s=t.center.x+r.x,a=t.center.y+r.y,A=i.size.x/2,c=i.size.y/2;n.minX=Math.min(n.minX,s-A),n.maxX=Math.max(n.maxX,s+A),n.minY=Math.min(n.minY,a-c),n.maxY=Math.max(n.maxY,a+c)}return t.courtyard&&dve({bounds:n,center:t.courtyard.offsetFromCenter,width:t.courtyard.width,height:t.courtyard.height,angleRad:o,translate:t.center}),{minX:n.minX-e,maxX:n.maxX+e,minY:n.minY-e,maxY:n.maxY+e}},zbt=(t,e,n)=>(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x);function Jbt(t,e=1e-10){if(t.length<=1)return t;const n=[];let o=t[0][0],i=t[0][1];for(let r=1;r<t.length;r++){const s=t[r],[a,A]=s,c=1e-9;if(!(Math.abs(i.x-a.x)<c&&Math.abs(i.y-a.y)<c)){n.push([o,i]),o=a,i=A;continue}const u=zbt(o,i,A),g=Math.hypot(i.x-o.x,i.y-o.y),h=Math.hypot(A.x-i.x,A.y-i.y),d=Math.max(e,e*g*h);Math.abs(u)<d||(n.push([o,i]),o=a),i=A}if(t.length>2){const r=n[0],s=[o,i];if(r&&n.length>0)if(Math.abs(i.x-r[0].x)<1e-9&&Math.abs(i.y-r[0].y)<1e-9){const c=zbt(o,i,r[1]),l=Math.hypot(i.x-o.x,i.y-o.y),u=Math.hypot(r[1].x-i.x,r[1].y-i.y),g=Math.max(e,e*l*u);Math.abs(c)<g?n[0]=[o,r[1]]:n.push(s)}else n.push(s);else n.push(s)}else n.push([o,i]);return n}function q_o(t){let e=0;for(let n=0;n<t.length;n++){const o=(n+1)%t.length,i=t[n],r=t[o];e+=i.x*r.y,e-=r.x*i.y}return e/2}function X_o(t){const e=[];let n=t.first;if(!n)return e;do{const o=n.shape,i=o.start??o.ps;e.push({x:i.x,y:i.y}),n=n.next}while(n!==t.first);return e}function Z_o(t){const e=[],n=[],o=Array.from(t.faces);for(const i of o){const r=X_o(i);if(r.length<3)continue;const s=q_o(r);s>0?e.push(r):s<0&&n.push(r)}return{obstacleFreeLoops:e,obstacleContainingLoops:n}}function Wbt(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];e.push([o,i])}return e}function efo(t){const e=Z_o(t);return{obstacleFreeLoops:e.obstacleFreeLoops.map(Wbt),obstacleContainingLoops:e.obstacleContainingLoops.map(Wbt)}}var tfo=t=>{const{component:e,courtyard:n,minGap:o}=t,i=n.width/2+o,r=n.height/2+o,a=[{x:n.offsetFromCenter.x-i,y:n.offsetFromCenter.y-r},{x:n.offsetFromCenter.x+i,y:n.offsetFromCenter.y-r},{x:n.offsetFromCenter.x+i,y:n.offsetFromCenter.y+r},{x:n.offsetFromCenter.x-i,y:n.offsetFromCenter.y+r}].map(h=>{const d=jv(h,e.ccwRotationOffset*Math.PI/180);return{x:d.x+e.center.x,y:d.y+e.center.y}}),A=a.map(({x:h,y:d})=>[h,d]),c=new Ge.Polygon(A),l=a.map(h=>h.x),u=a.map(h=>h.y),g={minX:Math.min(...l),minY:Math.min(...u),maxX:Math.max(...l),maxY:Math.max(...u)};return{poly:c,bbox:g}},nfo=(t,e)=>t.pads.map(n=>{const o=n.size.x/2+e,i=n.size.y/2+e,s=[{x:n.offset.x-o,y:n.offset.y-i},{x:n.offset.x+o,y:n.offset.y-i},{x:n.offset.x+o,y:n.offset.y+i},{x:n.offset.x-o,y:n.offset.y+i}].map(g=>{const h=jv(g,t.ccwRotationOffset*Math.PI/180);return{x:h.x+t.center.x,y:h.y+t.center.y}}),a=s.map(({x:g,y:h})=>[g,h]),A=new Ge.Polygon(a),c=s.map(g=>g.x),l=s.map(g=>g.y),u={minX:Math.min(...c),minY:Math.min(...l),maxX:Math.max(...c),maxY:Math.max(...l)};return{poly:A,bbox:u}}),ofo=(t,e)=>t.map(n=>{const o=n.width/2+e,i=n.height/2+e,r=n.absoluteCenter.x,s=n.absoluteCenter.y,a=[{x:r-o,y:s-i},{x:r+o,y:s-i},{x:r+o,y:s+i},{x:r-o,y:s+i}],A=a.map(({x:h,y:d})=>[h,d]),c=new Ge.Polygon(A),l=a.map(h=>h.x),u=a.map(h=>h.y),g={minX:Math.min(...l),minY:Math.min(...u),maxX:Math.max(...l),maxY:Math.max(...u)};return{poly:c,bbox:g}}),ifo=(t,e={})=>{const{minGap:n=0,obstacles:o=[]}=e;if(t.length===0&&o.length===0)return[];const i=t.map(m=>kN(m,n)),r=o.map(m=>({minX:m.absoluteCenter.x-m.width/2-n,minY:m.absoluteCenter.y-m.height/2-n,maxX:m.absoluteCenter.x+m.width/2+n,maxY:m.absoluteCenter.y+m.height/2+n})),s=$_o([...i,...r]),a=[];for(const m of t)if(m.courtyard)a.push(tfo({component:m,courtyard:m.courtyard,minGap:n}));else{const _=nfo(m,n);a.push(..._)}const A=ofo(o,n);if(a.push(...A),a.length===0)return[];const l=rfo(a).map(m=>m.poly);let u=new Ge.Polygon(new Ge.Box(s.minX,s.minY,s.maxX,s.maxY));const g=u.clone();for(const m of l)try{u=Ge.BooleanOperations.subtract(u,m)}catch{}let h=null;try{h=Ge.BooleanOperations.subtract(g,u)}catch{try{if(l.length>0){let m=l[0];for(let _=1;_<l.length;_++)try{m=Ge.BooleanOperations.unify(m,l[_])}catch{}h=m}}catch{h=null}}if(!h)return[];const d=efo(h);return[...d.obstacleFreeLoops.map(m=>Jbt(m)),...d.obstacleContainingLoops.map(m=>Jbt(m))].filter(m=>m.length>=3)};function rfo(t){const e=r=>Math.max(0,r.maxX-r.minX)*Math.max(0,r.maxY-r.minY),n=(r,s,a=1e-9)=>r.minX-a<=s.minX&&r.minY-a<=s.minY&&r.maxX+a>=s.maxX&&r.maxY+a>=s.maxY,o=[...t].sort((r,s)=>e(s.bbox)-e(r.bbox)),i=[];for(const r of o){const s=r.bbox.maxX-r.bbox.minX,a=r.bbox.maxY-r.bbox.minY;if(!(s>1e-12&&a>1e-12))continue;let A=!1;for(const c of i)if(n(c.bbox,r.bbox)){A=!0;break}A||i.push(r)}return i}var jbt=t=>typeof t=="number"?Math.round(t*100)/100:typeof t=="object"?Object.fromEntries(Object.entries(t).map(([e,n])=>[e,jbt(n)])):t,$bt=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.getSolverName()} error: ${e}`,console.error(this.error),this.failed=!0,e}!this.solved&&this.iterations>this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations`,console.error(this.error),this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_setup(){}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}getOutput(){return null}preview(){return{lines:[],points:[],rects:[],circles:[]}}noisySolve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step(),console.log(JSON.stringify(jbt(this.visualize())));const n=Date.now();this.timeToSolve=n-e}},hve=class extends $bt{offsetPadPoints;targetPointMap;currentPosition;constraintFn;epsilon;useSquaredDistance;optimalPosition;initialPosition;getSolverName(){return"MultiOffsetIrlsSolver"}constructor(t){super(),this.offsetPadPoints=[...t.offsetPadPoints],this.targetPointMap=new Map(t.targetPointMap),this.initialPosition={...t.initialPosition},this.currentPosition={...t.initialPosition},this.constraintFn=t.constraintFn,this.epsilon=t.epsilon??1e-6,this.useSquaredDistance=t.useSquaredDistance??!1,this.MAX_ITERATIONS=t.maxIterations??100}getConstructorParams(){return{offsetPadPoints:this.offsetPadPoints.map(t=>({...t})),targetPointMap:new Map(this.targetPointMap),initialPosition:this.initialPosition,constraintFn:this.constraintFn,epsilon:this.epsilon,useSquaredDistance:this.useSquaredDistance,maxIterations:this.MAX_ITERATIONS}}_setup(){this.currentPosition={...this.initialPosition},this.optimalPosition=void 0,(!Array.from(this.targetPointMap.values()).some(e=>e.length>0)||this.offsetPadPoints.length===0)&&(this.optimalPosition={...this.currentPosition},this.solved=!0)}_step(){if(this.offsetPadPoints.length===0)return;const{x:t,y:e}=this.currentPosition;let n=0,o=0,i=0;for(const l of this.offsetPadPoints){const u=this.targetPointMap.get(l.id)||[];if(u.length===0)continue;const g=t+l.offsetX,h=e+l.offsetY;for(const d of u){const p=g-d.x,m=h-d.y,_=Math.sqrt(p*p+m*m);let f;this.useSquaredDistance?f=1:f=_<this.epsilon?1e6:1/_;const I={x:d.x-l.offsetX,y:d.y-l.offsetY};n+=f*I.x,o+=f*I.y,i+=f}}const r={x:i>0?n/i:t,y:i>0?o/i:e},s=this.constraintFn?this.constraintFn(r):r,a=s.x-t,A=s.y-e;if(Math.sqrt(a*a+A*A)<this.epsilon){this.optimalPosition={...s},this.solved=!0;return}this.currentPosition=s}getBestPosition(){return this.optimalPosition||this.currentPosition}getOffsetPadPositions(){const t=this.getBestPosition(),e=new Map;for(const n of this.offsetPadPoints)e.set(n.id,{x:t.x+n.offsetX,y:t.y+n.offsetY});return e}getOffsetPadPosition(t){return this.getOffsetPadPositions().get(t)}getTotalDistance(t){const e=t||this.getBestPosition();let n=0;for(const o of this.offsetPadPoints){const i={x:e.x+o.offsetX,y:e.y+o.offsetY},r=this.targetPointMap.get(o.id)||[];for(const s of r){const a=i.x-s.x,A=i.y-s.y;this.useSquaredDistance?n+=a*a+A*A:n+=Math.sqrt(a*a+A*A)}}return n}getDistanceForPad(t,e){const n=e||this.getBestPosition(),o=this.offsetPadPoints.find(s=>s.id===t);if(!o)return 0;const i={x:n.x+o.offsetX,y:n.y+o.offsetY};return(this.targetPointMap.get(t)||[]).reduce((s,a)=>{const A=i.x-a.x,c=i.y-a.y;return this.useSquaredDistance?s+(A*A+c*c):s+Math.sqrt(A*A+c*c)},0)}computeProgress(){if(this.offsetPadPoints.length===0)return 1;const t=this.getTotalDistance(this.initialPosition),e=this.getTotalDistance();if(t===0)return 1;const n=Math.max(0,t-e);return Math.min(1,n/t)}visualize(){const t={lines:[],points:[],rects:[],circles:[]},e=["#4CAF50","#2196F3","#FF9800","#9C27B0","#F44336","#607D8B"],n=this.getBestPosition();for(let o=0;o<this.offsetPadPoints.length;o++){const i=this.offsetPadPoints[o];if(!i)continue;const r=e[o%e.length],s=this.targetPointMap.get(i.id)||[],a={x:n.x+i.offsetX,y:n.y+i.offsetY};for(const A of s)t.points.push({...A,color:r});for(const A of s)t.lines.push({points:[a,A],strokeColor:r});t.points.push({x:a.x,y:a.y,color:r})}return t.points.push({...this.currentPosition,color:"#f44336"}),this.optimalPosition&&t.points.push({...this.optimalPosition,color:"rgba(76, 175, 80, 0.3)"}),t}getOutput(){return this.optimalPosition??this.currentPosition}},sfo=class extends $bt{offsetPadPoints;targetPointMap;constraintFn;currentPosition;optimalPosition;initialPosition;phase1Epsilon;phase2Epsilon;maxIterations;getSolverName(){return"TwoPhaseIrlsSolver"}phase1Solver;phase2Solver;currentPhase=1;phase1Position;closestTargetPadId;closestTargetPoint;constructor(t){super(),this.offsetPadPoints=[...t.offsetPadPoints],this.targetPointMap=new Map(t.targetPointMap),this.initialPosition={...t.initialPosition},this.currentPosition={...t.initialPosition},this.constraintFn=t.constraintFn,this.phase1Epsilon=t.phase1Epsilon??t.epsilon??1e-6,this.phase2Epsilon=t.phase2Epsilon??t.epsilon??1e-6,this.maxIterations=t.maxIterations??100}getConstructorParams(){return{offsetPadPoints:this.offsetPadPoints.map(t=>({...t})),targetPointMap:new Map(this.targetPointMap),initialPosition:this.initialPosition,constraintFn:this.constraintFn,phase1Epsilon:this.phase1Epsilon,phase2Epsilon:this.phase2Epsilon,maxIterations:this.maxIterations}}_setup(){if(this.currentPosition={...this.initialPosition},this.optimalPosition=void 0,this.currentPhase=1,this.phase1Position=void 0,this.closestTargetPadId=void 0,this.closestTargetPoint=void 0,!Array.from(this.targetPointMap.values()).some(e=>e.length>0)||this.offsetPadPoints.length===0){this.optimalPosition={...this.currentPosition},this.solved=!0;return}this.phase1Solver=new hve({offsetPadPoints:this.offsetPadPoints,targetPointMap:this.targetPointMap,initialPosition:this.initialPosition,constraintFn:this.constraintFn,epsilon:this.phase1Epsilon,maxIterations:this.maxIterations,useSquaredDistance:!0}),this.phase1Solver.setup()}_step(){this.currentPhase===1?this.stepPhase1():this.stepPhase2()}stepPhase1(){this.phase1Solver&&(this.phase1Solver.step(),this.currentPosition=this.phase1Solver.getBestPosition(),this.phase1Solver.solved?(this.phase1Position=this.phase1Solver.getBestPosition(),this.setupPhase2()):this.phase1Solver.failed&&(this.failed=!0,this.error=`Phase 1 failed: ${this.phase1Solver.error}`))}setupPhase2(){if(!this.phase1Position)return;let t=1/0,e,n;for(const i of this.offsetPadPoints){const r=this.targetPointMap.get(i.id)||[];if(r.length===0)continue;const s=this.phase1Position.x+i.offsetX,a=this.phase1Position.y+i.offsetY;for(const A of r){const c=s-A.x,l=a-A.y,u=Math.sqrt(c*c+l*l);u<t&&(t=u,e=i.id,n=A)}}if(this.closestTargetPadId=e,this.closestTargetPoint=n,!e||!n){this.optimalPosition=this.phase1Position,this.solved=!0;return}const o=new Map;o.set(e,[n]),this.phase2Solver=new hve({offsetPadPoints:this.offsetPadPoints,targetPointMap:o,initialPosition:this.phase1Position,constraintFn:this.constraintFn,epsilon:this.phase2Epsilon,maxIterations:this.maxIterations,useSquaredDistance:!1}),this.phase2Solver.setup(),this.currentPhase=2}stepPhase2(){this.phase2Solver&&(this.phase2Solver.step(),this.currentPosition=this.phase2Solver.getBestPosition(),this.phase2Solver.solved?(this.optimalPosition=this.phase2Solver.getBestPosition(),this.solved=!0):this.phase2Solver.failed&&(this.failed=!0,this.error=`Phase 2 failed: ${this.phase2Solver.error}`))}getBestPosition(){return this.optimalPosition||this.currentPosition}getOffsetPadPositions(){const t=this.getBestPosition(),e=new Map;for(const n of this.offsetPadPoints)e.set(n.id,{x:t.x+n.offsetX,y:t.y+n.offsetY});return e}getTotalDistance(t){const e=t||this.getBestPosition();let n=0;for(const o of this.offsetPadPoints){const i={x:e.x+o.offsetX,y:e.y+o.offsetY},r=this.targetPointMap.get(o.id)||[];for(const s of r){const a=i.x-s.x,A=i.y-s.y;n+=a*a+A*A}}return n}visualize(){const t={lines:[],points:[],rects:[],circles:[]};if(t.points.push({...this.currentPosition,color:this.currentPhase===1?"#FF6B6B":"#4ECDC4",label:`Phase ${this.currentPhase}`}),this.phase1Position&&this.currentPhase===2&&t.points.push({...this.phase1Position,color:"rgba(255, 107, 107, 0.5)",label:"Phase 1 result"}),this.closestTargetPoint&&this.closestTargetPadId){t.points.push({...this.closestTargetPoint,color:"#FFA500",label:`Closest target (${this.closestTargetPadId})`});const n=this.offsetPadPoints.find(o=>o.id===this.closestTargetPadId);if(n){const o=this.getBestPosition(),i={x:o.x+n.offsetX,y:o.y+n.offsetY};t.lines.push({points:[i,this.closestTargetPoint],strokeColor:"#FFA500"})}}const e=this.currentPhase===1?this.phase1Solver:this.phase2Solver;if(e){const n=e.visualize(),o=this.currentPhase===1?"rgba(255, 107, 107, 0.7)":"rgba(76, 205, 196, 0.7)";if(n.lines){const i=n.lines.map(r=>({...r,strokeColor:o}));t.lines.push(...i)}n.points&&t.points.push(...n.points),n.rects&&t.rects.push(...n.rects),n.circles&&t.circles.push(...n.circles)}return this.optimalPosition&&t.points.push({...this.optimalPosition,color:"rgba(76, 175, 80, 0.8)",label:"Final optimal position"}),t}getOutput(){return this.optimalPosition??this.currentPosition}};function afo(t){const e=new Map,n=new Set;for(const{padIds:o,ignoreWeakConnections:i}of t)for(const r of o){let s=e.get(r);s||(s=new Set,e.set(r,s));for(const a of o)s.add(a);i===!0&&n.add(r)}return{explicitlyConnectedPadIdsByPadId:e,padIdsRejectingWeakConnections:n}}var qbt=new WeakMap;function Afo(t){const e=qbt.get(t);if(e)return e;const n=afo(t);return qbt.set(t,n),n}function tle(t,e,n){if(!n?.length)return!0;const o=Afo(n);return o.explicitlyConnectedPadIdsByPadId.get(t)?.has(e)?!0:!(o.padIdsRejectingWeakConnections.has(t)||o.padIdsRejectingWeakConnections.has(e))}var cfo=t=>{const e={};for(let n=0;n<t.length;n++)e[t[n]]=`hsl(${n*300/t.length}, 100%, 50%)`;return e},pve=(t,e=1)=>`hsl(${t.split("").reduce((o,i)=>o*31+i.charCodeAt(0),0)%360}, 100%, 50%, ${e})`;function Xbt(t,e){const[n,o]=t,i=o.x-n.x,r=o.y-n.y,s=Math.hypot(i,r);if(s===0)return{x:0,y:1};const a=i/s,A=r/s,c={x:-A,y:a},l={x:A,y:-a},u=[];if(e.length>0){u.push(e[0][0]);for(const p of e)u.push(p[1])}const g=(()=>{let p=0;for(let m=0;m<u.length;m++){const _=u[m],f=u[(m+1)%u.length];p+=_.x*f.y-f.x*_.y}return p/2})(),h=g>0?l:c;return g<0?{x:-h.x,y:-h.y}:h}var lfo=class extends fC{ccwFullOutline;origin;globalBounds;largestRect=null;mode;getSolverName(){return"LargestRectOutsideOutlineFromPointSolver"}constructor(t){super(),this.ccwFullOutline=t.ccwFullOutline,this.origin=t.origin,this.globalBounds=t.globalBounds,this.mode=t.mode??"outside"}getConstructorParams(){return{ccwFullOutline:this.ccwFullOutline,origin:this.origin,globalBounds:this.globalBounds,mode:this.mode}}_setup(){}_step(){this.largestRect=this.computeLargestRect(),this.solved=!0}computeLargestRect(){const t=this.makeEdges(this.ccwFullOutline),e={x:this.globalBounds.minX,y:this.globalBounds.minY,w:this.globalBounds.maxX-this.globalBounds.minX,h:this.globalBounds.maxY-this.globalBounds.minY};return this.largestRectContainingPointRegion(t,this.origin,e,this.mode)}almostEqual(t,e,n=1e-9){return Math.abs(t-e)<=n}makeEdges(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];!o||!i||this.almostEqual(o.x,i.x)&&this.almostEqual(o.y,i.y)||e.push([o,i])}return e}isVertical(t){return this.almostEqual(t[0].x,t[1].x)}isHorizontal(t){return this.almostEqual(t[0].y,t[1].y)}scanlineIntervalsAtY(t,e){const n=[];for(const i of t){if(!this.isVertical(i))continue;const r=i[0].y,s=i[1].y,a=i[0].x,A=Math.min(r,s),c=Math.max(r,s);A<=e&&e<c&&n.push(a)}n.sort((i,r)=>i-r);const o=[];for(let i=0;i+1<n.length;i+=2){const r=n[i],s=n[i+1];r!==void 0&&s!==void 0&&o.push([r,s])}return o}clipIntervals(t,e,n){const o=[];for(const[i,r]of t){const s=Math.max(e,i),a=Math.min(n,r);a>s&&o.push([s,a])}return o}regionIntervalsAtY(t,e,n,o,i){const r=this.clipIntervals(this.scanlineIntervalsAtY(t,e),n,o);if(i==="inside")return r;const s=[];let a=n;for(const[A,c]of r)A>a&&s.push([a,A]),a=Math.max(a,c);return a<o&&s.push([a,o]),s}largestRectContainingPointRegion(t,e,n,o){const i=n.x,r=n.x+n.w,s=n.y,a=n.y+n.h,c=this.regionIntervalsAtY(t,e.y,i,r,o).find(([C,y])=>C-1e-9<=e.x&&e.x<=y+1e-9);if(!c)return null;let[l,u]=c;const g=new Set([l,u]);for(const C of t){if(!this.isVertical(C))continue;const y=C[0].x;l<y&&y<u&&g.add(y)}const h=Array.from(g).sort((C,y)=>C-y),d=h.length-1;if(d<=0)return null;const p=Array(d).fill(-1/0),m=Array(d).fill(1/0);for(let C=0;C<d;C++){const y=h[C],x=h[C+1];if(y===void 0||x===void 0)continue;let E=.5*(y+x);g.has(E)&&(E+=1e-6);let B=a,S=s;for(const Q of t){if(!this.isHorizontal(Q))continue;const w=Q[0].y,M=Math.min(Q[0].x,Q[1].x),k=Math.max(Q[0].x,Q[1].x);M-1e-9<=E&&E<=k+1e-9&&(w>e.y&&(B=Math.min(B,w)),w<e.y&&(S=Math.max(S,w)))}S<B?(p[C]=B,m[C]=S):(p[C]=-1/0,m[C]=1/0)}let _=-1;for(let C=0;C<d;C++){const y=h[C],x=h[C+1];if(!(y===void 0||x===void 0)&&y-1e-9<=e.x&&e.x<=x+1e-9){_=C;break}}if(_===-1)return null;let f=null,I=-1;for(let C=0;C<=_;C++){let y=1/0,x=-1/0;for(let E=C;E<d;E++){const B=p[E],S=m[E];if(B===void 0||S===void 0||(y=Math.min(y,B),x=Math.max(x,S),E<_))continue;const Q=Math.max(0,y-x);if(Q<=0)continue;const w=h[C],M=h[E+1];if(w===void 0||M===void 0)continue;const k=M-w,R=k*Q;R>I&&(I=R,f={x:w,y:x,w:k,h:Q})}}return f}getLargestRect(){return this.solved||this.solve(),this.largestRect}getLargestRectBounds(){return this.solved||this.solve(),this.largestRect?{minX:this.largestRect.x,minY:this.largestRect.y,maxX:this.largestRect.x+this.largestRect.w,maxY:this.largestRect.y+this.largestRect.h}:{minX:0,minY:0,maxX:0,maxY:0}}visualize(){const t={lines:[],points:[],rects:[],circles:[]};for(let e=0;e<this.ccwFullOutline.length;e++){const n=this.ccwFullOutline[e],o=this.ccwFullOutline[(e+1)%this.ccwFullOutline.length];n&&o&&t.lines.push({points:[n,o],strokeColor:"rgba(0,0,0,0.5)"})}return t.lines.push({points:[...this.ccwFullOutline,this.ccwFullOutline[0]],strokeColor:"rgba(200, 200, 200, 0.5)",strokeDash:[10,5]}),t.circles.push({center:this.origin,radius:.05,fill:"#f44336",label:"Origin"}),this.largestRect&&t.rects.push({center:{x:this.largestRect.x+this.largestRect.w/2,y:this.largestRect.y+this.largestRect.h/2},width:this.largestRect.w,height:this.largestRect.h,fill:"rgba(0, 255, 0, 0.3)",stroke:"#4CAF50",label:`Largest Rectangle (Area: ${(this.largestRect.w*this.largestRect.h).toFixed(3)})`}),t}getOutput(){return this.largestRect??null}},ufo=(t,{rotationDegrees:e=0})=>{const n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},o=e*Math.PI/180;for(const i of t.pads)dve({bounds:n,center:i.offset,width:i.size.x,height:i.size.y,angleRad:o});return t.courtyard&&dve({bounds:n,center:t.courtyard.offsetFromCenter,width:t.courtyard.width,height:t.courtyard.height,angleRad:o}),n},gfo=(t,e)=>{const[n,o]=t,i={x:o.x-n.x,y:o.y-n.y},r=dfo(i);return[{x:n.x-r.x*e,y:n.y-r.y*e},{x:o.x+r.x*e,y:o.y+r.y*e}]};function dfo(t){const e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e}}function HH(t,e){if(e.length<3)return!1;let n=!1;const o=e.length,i=[...e];(i[0].x!==i[o-1].x||i[0].y!==i[o-1].y)&&i.push({...i[0]});for(let r=0,s=i.length-1;r<i.length;s=r++){const a=i[r].x,A=i[r].y,c=i[s].x,l=i[s].y;A>t.y!=l>t.y&&t.x<(c-a)*(t.y-A)/(l-A)+a&&(n=!n)}return n}var hfo=class extends fC{outlineSegment;viableOutlineSegment=null;ccwFullOutline;componentRotationDegrees;packStrategy;minGap;obstacles;packedComponents;componentToPack;viableBounds;globalBounds;boundaryOutline;weightedConnections;networkTargetPointMappingsCache;optimalPosition;irlsSolver;twoPhaseIrlsSolver;getSolverName(){return"OutlineSegmentCandidatePointSolver"}largestRectBounds;largestRectMidPoint;largestRectOrigin;constructor(t){super(),this.outlineSegment=t.outlineSegment,this.ccwFullOutline=t.ccwFullOutline,this.componentRotationDegrees=t.componentRotationDegrees,this.packStrategy=t.packStrategy,this.minGap=t.minGap,this.packedComponents=t.packedComponents,this.componentToPack=t.componentToPack,this.obstacles=t.obstacles??[],this.globalBounds=t.globalBounds,this.boundaryOutline=t.boundaryOutline,this.weightedConnections=t.weightedConnections,this.networkTargetPointMappingsCache=t.networkTargetPointMappingsCache}getConstructorParams(){return{outlineSegment:this.outlineSegment,ccwFullOutline:this.ccwFullOutline,componentRotationDegrees:this.componentRotationDegrees,packStrategy:this.packStrategy,minGap:this.minGap,packedComponents:this.packedComponents,componentToPack:this.componentToPack,obstacles:this.obstacles,globalBounds:this.globalBounds,boundaryOutline:this.boundaryOutline,weightedConnections:this.weightedConnections,networkTargetPointMappingsCache:this.networkTargetPointMappingsCache}}_getOutlineBoundsWithMargin(t={}){let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const[s,a]of this.ccwFullOutline)e=Math.min(e,s.x,a.x),n=Math.min(n,s.y,a.y),o=Math.max(o,s.x,a.x),i=Math.max(i,s.y,a.y);const r=t.margin??0;return{minX:e-r,minY:n-r,maxX:o+r,maxY:i+r}}_setup(){const[t,e]=this.outlineSegment,n=M=>{const k=this.projectPointOntoSegment(M,this.viableOutlineSegment);return this.adjustPositionForOutlineCollision(k)},o=Xbt(this.outlineSegment,this.ccwFullOutline),i=ufo(this.componentToPack,{rotationDegrees:this.componentRotationDegrees}),r=this._getOutlineBoundsWithMargin({margin:Math.max(i.maxX-i.minX,i.maxY-i.minY)*2+this.minGap*2});this.largestRectMidPoint={x:(t.x+e.x)/2,y:(t.y+e.y)/2},this.largestRectOrigin={x:this.largestRectMidPoint.x+o.x*1e-4,y:this.largestRectMidPoint.y+o.y*1e-4};const s=this.ccwFullOutline.flatMap(([M])=>M);let a=0;for(let M=0;M<s.length;M++){const k=s[M],R=s[(M+1)%s.length];a+=k.x*R.y-R.x*k.y}a/=2;const c=a<0?"inside":"outside",l={ccwFullOutline:s,globalBounds:r,origin:this.largestRectOrigin,mode:c},u=new lfo(l);u.solve();const g=u.getLargestRectBounds();this.largestRectBounds=g;const h={x:Math.abs(Math.sign(this.outlineSegment[1].x-this.outlineSegment[0].x)),y:Math.abs(Math.sign(this.outlineSegment[1].y-this.outlineSegment[0].y))};let d={minX:g.minX-i.minX*h.x,minY:g.minY-i.minY*h.y,maxX:g.maxX-i.maxX*h.x,maxY:g.maxY-i.maxY*h.y};if(this.boundaryOutline&&this.boundaryOutline.length>=3){let M=1/0,k=1/0,R=-1/0,F=-1/0;for(const O of this.boundaryOutline)M=Math.min(M,O.x),k=Math.min(k,O.y),R=Math.max(R,O.x),F=Math.max(F,O.y);d={minX:Math.max(d.minX,M-i.minX),minY:Math.max(d.minY,k-i.minY),maxX:Math.min(d.maxX,R-i.maxX),maxY:Math.min(d.maxY,F-i.maxY)}}this.viableBounds=d;const p=d.maxX-d.minX,m=d.maxY-d.minY,_=i.maxX-i.minX,f=i.maxY-i.minY;if(p<_||m<f){this.failed=!0,this.error="There is nowhere for the component to fit along this outline section";return}const I=Math.hypot(e.x-t.x,e.y-t.y),C=gfo(this.outlineSegment,I),[y,x]=C;this.viableOutlineSegment=[{x:fp(y.x,d.minX,d.maxX),y:fp(y.y,d.minY,d.maxY)},{x:fp(x.x,d.minX,d.maxX),y:fp(x.y,d.minY,d.maxY)}];const[E,B]=this.viableOutlineSegment,S=this.adjustPositionForOutlineCollision({x:(E.x+B.x)/2,y:(E.y+B.y)/2}),{offsetPadPoints:Q,targetPointMap:w}=this.getNetworkTargetPointMappings();this.packStrategy==="minimum_closest_sum_squared_distance"?this.twoPhaseIrlsSolver=new sfo({offsetPadPoints:Q,targetPointMap:w,initialPosition:S,constraintFn:n,epsilon:1e-6,maxIterations:50}):this.irlsSolver=new hve({offsetPadPoints:Q,targetPointMap:w,initialPosition:S,constraintFn:n,epsilon:1e-6,maxIterations:50,useSquaredDistance:this.packStrategy==="minimum_sum_squared_distance_to_network"})}_step(){const t=this.irlsSolver||this.twoPhaseIrlsSolver;if(!t){this.solved=!0;return}if(t.step(),t.solved){const e=t.getBestPosition();this.optimalPosition=e,this.solved=!0}else t.failed&&(this.failed=!0,this.error=t.error)}getNetworkTargetPointMappings(){const t=this.networkTargetPointMappingsCache?.get(this.componentRotationDegrees);if(t)return t;const e=this.getRotatedComponentPads(),n=e.map(r=>({id:r.padId,offsetX:r.offset.x,offsetY:r.offset.y})),o=new Map;for(const r of e){const s=[];for(const a of this.packedComponents)for(const A of a.pads)if(A.networkId===r.networkId){if(!tle(r.padId,A.padId,this.weightedConnections))continue;s.push({...A.absoluteCenter,networkId:A.networkId})}o.set(r.padId,s)}const i={offsetPadPoints:n,targetPointMap:o};return this.networkTargetPointMappingsCache?.set(this.componentRotationDegrees,i),i}projectPointOntoSegment(t,e){const[n,o]=e,i=o.x-n.x,r=o.y-n.y,s=t.x-n.x,a=t.y-n.y,A=i*i+r*r;if(A===0)return{x:n.x,y:n.y};const c=Math.max(0,Math.min(1,(s*i+a*r)/A));return{x:n.x+c*i,y:n.y+c*r}}getRotatedComponentPads(){const t=this.componentRotationDegrees*Math.PI/180;return this.componentToPack.pads.map(e=>({...e,size:(this.componentRotationDegrees+90)%180===0?{x:e.size.y,y:e.size.x}:e.size,offset:jv(e.offset,t)}))}createTemporaryPackedComponent(t){const e=this.componentRotationDegrees*Math.PI/180,n=(this.componentRotationDegrees+90)%180===0;return{componentId:this.componentToPack.componentId,center:t,ccwRotationOffset:this.componentRotationDegrees,pads:this.componentToPack.pads.map(o=>{const i=jv(o.offset,e);return{...o,size:{x:n?o.size.y:o.size.x,y:n?o.size.x:o.size.y},absoluteCenter:{x:t.x+i.x,y:t.y+i.y}}}),courtyard:this.componentToPack.courtyard}}adjustPositionForOutlineCollision(t){const e=this.createTemporaryPackedComponent(t),n=kN(e,0),o=Xbt(this.outlineSegment,this.ccwFullOutline),i=Math.abs(o.x)>Math.abs(o.y),r=!i;let s=t;if(i){const a=o.x>0;a?s={x:n.maxX,y:t.y}:!a&&(s={x:n.minX,y:t.y})}else if(r){const a=o.y>0;a?s={x:t.x,y:n.maxY}:!a&&(s={x:t.x,y:n.minY})}if(this.boundaryOutline&&this.boundaryOutline.length>=3){const a=this.createTemporaryPackedComponent(s),A=kN(a,0),c=a.pads.every(u=>HH(u.absoluteCenter,this.boundaryOutline)),l=[{x:A.minX,y:A.minY},{x:A.minX,y:A.maxY},{x:A.maxX,y:A.minY},{x:A.maxX,y:A.maxY}].every(u=>HH(u,this.boundaryOutline));(!c||!l)&&this.viableBounds&&(s={x:fp(s.x,this.viableBounds.minX,this.viableBounds.maxX),y:fp(s.y,this.viableBounds.minY,this.viableBounds.maxY)})}return s}visualize(){const t={lines:[],points:[],rects:[],circles:[]};if(this.obstacles&&this.obstacles.length>0)for(const s of this.obstacles)t.rects.push({center:s.absoluteCenter,width:s.width,height:s.height,fill:"rgba(0,0,0,0.1)",stroke:"#555",label:s.obstacleId});if(this.globalBounds&&t.lines.push({points:[{x:this.globalBounds.minX,y:this.globalBounds.minY},{x:this.globalBounds.minX,y:this.globalBounds.maxY},{x:this.globalBounds.maxX,y:this.globalBounds.maxY},{x:this.globalBounds.maxX,y:this.globalBounds.minY},{x:this.globalBounds.minX,y:this.globalBounds.minY}],strokeColor:"rgba(255,0,255,0.5)",strokeDash:"2 2"}),this.boundaryOutline&&this.boundaryOutline.length){const s=[...this.boundaryOutline];s.length>0&&(s[0].x!==s[s.length-1].x||s[0].y!==s[s.length-1].y)&&s.push({...s[0]}),t.lines.push({points:s,strokeColor:"rgba(0, 0, 255, 0.5)",strokeDash:"4 2"})}if(this.viableBounds&&t.rects.push({center:{x:(this.viableBounds.minX+this.viableBounds.maxX)/2,y:(this.viableBounds.minY+this.viableBounds.maxY)/2},width:this.viableBounds.maxX-this.viableBounds.minX,height:this.viableBounds.maxY-this.viableBounds.minY,fill:"rgba(0,255,0,0.1)",label:"Viable Bounds"}),this.largestRectBounds&&t.rects.push({center:{x:(this.largestRectBounds.minX+this.largestRectBounds.maxX)/2,y:(this.largestRectBounds.minY+this.largestRectBounds.maxY)/2},width:this.largestRectBounds.maxX-this.largestRectBounds.minX,height:this.largestRectBounds.maxY-this.largestRectBounds.minY,fill:"rgba(255,0,255,0.4)"}),this.largestRectMidPoint&&t.points.push({...this.largestRectMidPoint,label:"Largest Rect Mid Point",color:"rgba(128,0,255,1)"}),this.largestRectOrigin&&t.points.push({...this.largestRectOrigin,label:"Largest Rect Origin",color:"rgba(255,0,128,1)"}),this.viableOutlineSegment){const[s,a]=this.viableOutlineSegment;t.lines.push({points:[s,a],strokeColor:"#2196F3"})}const[e,n]=this.outlineSegment;t.lines.push({points:[e,n],strokeColor:"rgba(255,0,0,1)",strokeDash:"3 3"});for(const[s,a]of this.ccwFullOutline)t.lines.push({points:[s,a],strokeColor:"rgba(0,0,0,0.5)",strokeDash:"4 4"});for(const s of this.packedComponents)for(const a of s.pads)t.rects.push({center:a.absoluteCenter,width:a.size.x,height:a.size.y,fill:pve(a.networkId,.5),stroke:"#333",label:`${a.padId} (${a.networkId})`});const o=this.optimalPosition??this.irlsSolver?.currentPosition??this.twoPhaseIrlsSolver?.currentPosition??{x:0,y:0},i=this.getRotatedComponentPads();for(const s of i){const a={x:o.x+s.offset.x,y:o.y+s.offset.y};t.rects.push({center:a,width:s.size.x,height:s.size.y,fill:this.failed?"rgba(255,0,0,0.5)":pve(s.networkId,.5),label:`${s.padId} (${s.networkId})`});for(const A of this.packedComponents)for(const c of A.pads)if(c.networkId===s.networkId){const l=tle(s.padId,c.padId,this.weightedConnections);t.lines.push({points:[a,c.absoluteCenter],strokeColor:s.networkId==="VCC"?"#FF6B6B":"#4ECDC4",strokeDash:l?void 0:"4 2",label:`${s.networkId} ${l?"strong":"weak"}`})}}const r=this.irlsSolver||this.twoPhaseIrlsSolver;if(r){const s=r.currentPosition;t.points.push({...s,color:"#f44336"});const a=r.visualize();a.lines&&t.lines.push(...a.lines),a.circles&&t.circles.push(...a.circles),a.rects&&t.rects.push(...a.rects),a.points&&t.points.push(...a.points)}return this.optimalPosition&&t.points.push({...this.optimalPosition,color:"rgba(76, 175, 80, 0.3)"}),t}getOutput(){return this.optimalPosition??null}},Zbt=t=>{const e=[],n=[];if(t.boundaryOutline&&t.boundaryOutline.length){const r=[...t.boundaryOutline];r.length>0&&(r[0].x!==r[r.length-1].x||r[0].y!==r[r.length-1].y)&&r.push({...r[0]}),n.push({points:r,strokeColor:"rgba(0, 0, 255, 0.5)",strokeDash:"4 2"})}const o=Array.from(new Set(t.components.flatMap(r=>r.pads.map(s=>s.networkId)))),i=cfo(o);if(t.obstacles&&t.obstacles.length>0)for(const r of t.obstacles)e.push({center:{x:r.absoluteCenter.x,y:r.absoluteCenter.y},width:r.width,height:r.height,fill:"rgba(0,0,0,0.1)",stroke:"#555",label:r.obstacleId});for(const r of t.components){const s=kN(r),a=s.maxX-s.minX,A=s.maxY-s.minY,c=!!r.isStatic,g={center:{x:r.center.x,y:r.center.y},width:a,height:A,fill:c?"rgba(33, 150, 243, 0.25)":"rgba(0,0,0,0.25)",stroke:c?"rgba(33, 150, 243, 0.6)":void 0,label:[r.componentId,`ccwRotationOffset: ${r.ccwRotationOffset.toFixed(1)}°`].join(`
`)};e.push(g);for(const h of r.pads){const{absoluteCenter:d,size:p,padId:m,networkId:_}=h,f={center:{x:d.x,y:d.y},width:p.x,height:p.y,label:`${m} ${_}`,fill:"rgba(255,0,0,0.8)"};e.push(f)}}for(const r of o){const s=t.components.flatMap(a=>a.pads.filter(A=>A.networkId===r));for(let a=0;a<s.length;a++)for(let A=a+1;A<s.length;A++){const c=s[a],l=s[A],u=tle(c.padId,l.padId,t.weightedConnections);n.push({points:[c.absoluteCenter,l.absoluteCenter],strokeColor:i[r],strokeDash:u?void 0:"4 2"})}}return{coordinateSystem:"cartesian",rects:e,lines:n}};function ij(t){if(t.courtyard){const e=t.courtyard,n=t.ccwRotationOffset*Math.PI/180,o=jv(e.offsetFromCenter,n),i=(t.ccwRotationOffset%360+360)%360,r=i===90||i===270;let s=e.width,a=e.height;return r&&(s=e.height,a=e.width),[{center:{x:t.center.x+o.x,y:t.center.y+o.y},width:s,height:a}]}return t.pads.map(e=>({center:{x:e.absoluteCenter.x,y:e.absoluteCenter.y},width:e.size.x,height:e.size.y}))}function pfo({component:t,packedComponents:e,minGap:n}){const o=e.flatMap(r=>ij(r)),i=ij(t);for(const r of i)for(const s of o){const{distance:a}=Kne(r,s);if(a+1e-6<n)return{hasOverlap:!0,gapDistance:a}}return{hasOverlap:!1}}var eSt=class extends fC{componentToPack;packedComponents;packPlacementStrategy;minGap;obstacles;boundaryOutline;weightedConnections;getSolverName(){return"SingleComponentPackSolver"}currentPhase="outline";outlines=[];queuedOutlineSegments=[];currentSegmentIndex=0;currentRotationIndex=0;activeSubSolver=null;candidateResults=[];rejectedCandidates=[];bestCandidate;outputPackedComponent;bounds;networkTargetPointMappingsCache=new Map;constructor(t){super(),this.componentToPack=t.componentToPack,this.packedComponents=t.packedComponents,this.packPlacementStrategy=t.packPlacementStrategy,this.minGap=t.minGap??0,this.obstacles=t.obstacles??[],this.bounds=t.bounds,this.boundaryOutline=t.boundaryOutline,this.weightedConnections=t.weightedConnections}_setup(){super._setup(),this.currentPhase="outline",this.outlines=[],this.queuedOutlineSegments=[],this.candidateResults=[],this.activeSubSolver=void 0,this.currentSegmentIndex=0,this.currentRotationIndex=0,this.networkTargetPointMappingsCache.clear()}_step(){if(!(this.solved||this.failed))switch(this.currentPhase){case"outline":this.executeOutlinePhase();break;case"segment_candidate":this.executeSegmentCandidatePhase();break;case"evaluate":this.executeEvaluatePhase();break}}executeOutlinePhase(){if(this.packedComponents.length===0){const n=this.componentToPack.availableRotationDegrees??[0,90,180,270],o={x:0,y:0},i=n[0]??0,r=this.createPackedComponent(o,i),s=ij(r);if(!(this.obstacles??[]).some(A=>{const c={center:{x:A.absoluteCenter.x,y:A.absoluteCenter.y},width:A.width,height:A.height};return s.some(l=>{const{distance:u}=Kne(l,c);return u+1e-6<this.minGap})})){this.outputPackedComponent=r,this.solved=!0;return}}this.outlines=ifo(this.packedComponents,{minGap:this.minGap,obstacles:this.obstacles});const t=this.componentToPack.availableRotationDegrees??[0,90,180,270];for(let n=0;n<this.outlines.length;n++){const o=this.outlines[n];for(let i=0;i<o.length;i++){const r=o[i];this.queuedOutlineSegments.push({segment:r,availableRotations:[...t],segmentIndex:n*1e3+i,ccwFullOutline:o})}}if(this.boundaryOutline&&this.boundaryOutline.length>=3){const n=[];for(let i=0;i<this.boundaryOutline.length;i++){const r=this.boundaryOutline[i],s=this.boundaryOutline[(i+1)%this.boundaryOutline.length];n.push([r,s])}const o=this.outlines.length;for(let i=0;i<n.length;i++){const r=n[i];this.queuedOutlineSegments.push({segment:r,availableRotations:[...t],segmentIndex:o*1e3+i,ccwFullOutline:n})}}let e=this.outlines.length+1;for(const n of this.obstacles){const o=n.width/2+this.minGap,i=n.height/2+this.minGap,r=n.absoluteCenter.x,s=n.absoluteCenter.y,a=[{x:r-o,y:s-i},{x:r+o,y:s-i},{x:r+o,y:s+i},{x:r-o,y:s+i}],A=[[a[0],a[1]],[a[1],a[2]],[a[2],a[3]],[a[3],a[0]]];for(let c=0;c<A.length;c++){const l=A[c];this.queuedOutlineSegments.push({segment:l,availableRotations:[...t],segmentIndex:e*1e3+c,ccwFullOutline:A})}e++}this.currentPhase="segment_candidate",this.currentSegmentIndex=0,this.currentRotationIndex=0}executeSegmentCandidatePhase(){if(this.activeSubSolver?.solved||this.activeSubSolver?.failed){const t=this.queuedOutlineSegments[this.currentSegmentIndex],e=t.availableRotations[this.currentRotationIndex];let n=1/0,o;if(this.activeSubSolver.solved&&this.activeSubSolver.optimalPosition){o=this.activeSubSolver.optimalPosition;const i=this.createPackedComponent(o,e),{hasOverlap:r,gapDistance:s}=pfo({component:i,packedComponents:this.packedComponents,minGap:this.minGap});let a=1/0;const A=ij(i),c=(this.obstacles??[]).some(g=>{const h={center:{x:g.absoluteCenter.x,y:g.absoluteCenter.y},width:g.width,height:g.height};return A.some(d=>{const{distance:p}=Kne(d,h);return a=Math.min(a,p),p+1e-6<this.minGap})});let l=!1;if(this.bounds){const g=kN(i,0);l=g.minX<this.bounds.minX||g.maxX>this.bounds.maxX||g.minY<this.bounds.minY||g.maxY>this.bounds.maxY}let u=!1;if(this.boundaryOutline&&this.boundaryOutline.length>=3){const g=kN(i,0),h=i.pads.every(p=>HH(p.absoluteCenter,this.boundaryOutline)),d=[{x:g.minX,y:g.minY},{x:g.minX,y:g.maxY},{x:g.maxX,y:g.minY},{x:g.maxX,y:g.maxY}].every(p=>HH(p,this.boundaryOutline));u=!h||!d}n=this.calculateDistance(o,e),r?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:s}):c?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:a}):l?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:-1}):u?this.rejectedCandidates.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex,gapDistance:-1}):this.candidateResults.push({segment:t.segment,rotation:e,optimalPosition:o,distance:n,segmentIndex:t.segmentIndex,rotationIndex:this.currentRotationIndex})}this.currentRotationIndex++,this.activeSubSolver=void 0}for(;!this.activeSubSolver;){if(this.currentSegmentIndex>=this.queuedOutlineSegments.length){this.currentPhase="evaluate";return}const t=this.queuedOutlineSegments[this.currentSegmentIndex];if(this.currentRotationIndex>=t.availableRotations.length){this.currentSegmentIndex++,this.currentRotationIndex=0;continue}const e=t.availableRotations[this.currentRotationIndex];this.activeSubSolver=new hfo({outlineSegment:t.segment,ccwFullOutline:t.ccwFullOutline,componentRotationDegrees:e,packStrategy:this.packPlacementStrategy,minGap:this.minGap,packedComponents:this.packedComponents,componentToPack:this.componentToPack,obstacles:this.obstacles,globalBounds:this.bounds,boundaryOutline:this.boundaryOutline,weightedConnections:this.weightedConnections,networkTargetPointMappingsCache:this.networkTargetPointMappingsCache}),this.activeSubSolver.setup();break}this.activeSubSolver.step()}executeEvaluatePhase(){if(this.candidateResults.length===0){this.failed=!0,this.error="No valid candidates found";return}this.candidateResults.sort((t,e)=>t.distance-e.distance),this.bestCandidate=this.candidateResults[0],this.bestCandidate.optimalPosition&&(this.outputPackedComponent=this.createPackedComponent(this.bestCandidate.optimalPosition,this.bestCandidate.rotation)),this.solved=!0}calculateDistance(t,e){const n=this.createPackedComponent(t,e);let o=0;const i=this.packPlacementStrategy==="minimum_sum_squared_distance_to_network"||this.packPlacementStrategy==="minimum_closest_sum_squared_distance";for(const r of n.pads){let s=1/0;for(const a of this.packedComponents)for(const A of a.pads)if(A.networkId===r.networkId){if(!tle(r.padId,A.padId,this.weightedConnections))continue;const c=r.absoluteCenter.x-A.absoluteCenter.x,l=r.absoluteCenter.y-A.absoluteCenter.y,u=Math.sqrt(c*c+l*l);s=Math.min(s,u)}s<1/0&&(o+=i?s*s:s)}return o}createPackedComponent(t,e){const n={...this.componentToPack,center:t,ccwRotationOffset:e,pads:this.componentToPack.pads.map(o=>({...o,absoluteCenter:{x:0,y:0}}))};return ele(n),n}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=Zbt({components:this.packedComponents,minGap:this.minGap,packPlacementStrategy:this.packPlacementStrategy});if(t.points??=[],t.lines??=[],t.rects??=[],t.texts??=[],t.circles??=[],this.obstacles&&this.obstacles.length>0)for(const e of this.obstacles)t.rects.push({center:e.absoluteCenter,width:e.width,height:e.height,fill:"rgba(0,0,0,0.1)",stroke:"#555",label:e.obstacleId});if(this.bounds&&t.lines.push({points:[{x:this.bounds.minX,y:this.bounds.minY},{x:this.bounds.minX,y:this.bounds.maxY},{x:this.bounds.maxX,y:this.bounds.maxY},{x:this.bounds.maxX,y:this.bounds.minY},{x:this.bounds.minX,y:this.bounds.minY}],strokeColor:"rgba(0,0,0,0.5)",strokeDash:"2 2"}),this.boundaryOutline&&this.boundaryOutline.length){const e=[...this.boundaryOutline];e.length>0&&(e[0].x!==e[e.length-1].x||e[0].y!==e[e.length-1].y)&&e.push({...e[0]}),t.lines.push({points:e,strokeColor:"rgba(0, 0, 255, 0.5)",strokeDash:"4 2"})}switch(this.currentPhase){case"outline":this.visualizeOutlinePhase(t);break;case"segment_candidate":this.visualizeSegmentCandidatePhase(t);break;case"evaluate":this.visualizeEvaluatePhase(t);break}return t}visualizeOutlinePhase(t){for(const e of this.outlines)for(const n of e){const[o,i]=n;t.lines.push({points:[o,i],strokeColor:"#ff4444"})}for(let e=0;e<this.outlines.length;e++){const n=this.outlines[e];for(let o=0;o<n.length;o++){const[i,r]=n[o];t.points.push({x:i.x,y:i.y,label:`outlines [${e}] [${o}]`,color:"#ff4444"})}}}visualizeSegmentCandidatePhase(t){if(this.visualizeOutlinePhase(t),this.activeSubSolver){const e=this.activeSubSolver.visualize();e.lines&&t.lines.push(...e.lines),e.points&&t.points.push(...e.points),e.rects&&t.rects.push(...e.rects),e.circles&&t.circles.push(...e.circles??[])}else for(let e=0;e<this.candidateResults.length;e++){const n=this.candidateResults[e];if(n.optimalPosition){const o=this.createPackedComponent(n.optimalPosition,n.rotation);for(const i of o.pads)t.rects.push({center:i.absoluteCenter,width:i.size.x,height:i.size.y,fill:"rgba(255,165,0,0.3)",stroke:"rgba(255,165,0,0.8)",strokeWidth:1});t.points.push({x:n.optimalPosition.x,y:n.optimalPosition.y,label:`c${e}, d=${n.distance.toFixed(3)}`,color:"rgba(255,165,0,0.8)"})}}}visualizeEvaluatePhase(t){this.visualizeOutlinePhase(t);for(let e=0;e<this.candidateResults.length;e++){const n=this.candidateResults[e];if(!n.optimalPosition)continue;const o=e,i=o===0;t.points.push({x:n.optimalPosition.x,y:n.optimalPosition.y,label:`step=${o}, d=${n.distance.toFixed(3)}`,color:i?"rgba(0,255,0,0.8)":"rgba(255,165,0,0.6)"})}for(let e=0;e<this.rejectedCandidates.length;e++){const n=this.rejectedCandidates[e];n.optimalPosition&&t.points.push({x:n.optimalPosition.x,y:n.optimalPosition.y,label:`rejected, d=${n.distance.toFixed(3)}
gap_distance=${n.gapDistance}`,color:"rgba(255,0,0,0.8)"})}if(this.outputPackedComponent)for(const e of this.outputPackedComponent.pads)t.rects.push({center:e.absoluteCenter,width:e.size.x,height:e.size.y,fill:"rgba(0,255,0,0.7)"})}getResult(){return this.outputPackedComponent}getOutput(){return this.getResult()}getConstructorParams(){return{componentToPack:this.componentToPack,packedComponents:this.packedComponents,packPlacementStrategy:this.packPlacementStrategy,minGap:this.minGap,obstacles:this.obstacles,bounds:this.bounds,boundaryOutline:this.boundaryOutline,weightedConnections:this.weightedConnections}}};function mfo(t){if(t.length<3){const r=t.reduce((a,A)=>a+A.x,0),s=t.reduce((a,A)=>a+A.y,0);return{x:r/t.length,y:s/t.length}}let e=0,n=0,o=0;for(let r=0;r<t.length;r++){const s=t[r],a=t[(r+1)%t.length],A=s.x*a.y-a.x*s.y;e+=A,n+=(s.x+a.x)*A,o+=(s.y+a.y)*A}if(e*=.5,Math.abs(e)<1e-10){const r=t.reduce((a,A)=>a+A.x,0),s=t.reduce((a,A)=>a+A.y,0);return{x:r/t.length,y:s/t.length}}return n/=6*e,o/=6*e,{x:n,y:o}}var rj=class extends fC{packInput;getSolverName(){return"PackSolver2"}unpackedComponentQueue=[];packedComponents=[];componentToPack;constructor(t){super(),this.MAX_ITERATIONS=3e5,this.packInput=t}getConstructorParams(){return this.packInput}_setup(){const{components:t,packOrderStrategy:e,packFirst:n=[]}=this.packInput,o=t.filter(s=>s.pads.length===0?!1:s.pads.every(a=>Number.isFinite(a.size.x)&&Number.isFinite(a.size.y)&&a.size.x>0&&a.size.y>0)),i=o.filter(s=>s.isStatic),r=o.filter(s=>!s.isStatic);this.packedComponents=i.map(s=>{const a={...s,center:s.center??{x:0,y:0},ccwRotationOffset:s.ccwRotationOffset??s.availableRotationDegrees?.[0]??0,pads:s.pads.map(A=>({...A,absoluteCenter:A.absoluteCenter??{x:0,y:0}}))};return ele(a),a}),this.unpackedComponentQueue=j_o({components:r,packOrderStrategy:e,packFirst:n})}packFirstComponent(){const t=this.unpackedComponentQueue.shift();let e={x:0,y:0};this.packInput.boundaryOutline&&this.packInput.boundaryOutline.length>=3&&(e=mfo(this.packInput.boundaryOutline));const n={...t,center:e,ccwRotationOffset:t.ccwRotationOffset??t.availableRotationDegrees?.[0]??0,pads:t.pads.map(c=>({...c,absoluteCenter:{x:0,y:0}}))};ele(n);const o=this.packInput.obstacles??[],i=ij(n),r=o.some(c=>{const l={center:{x:c.absoluteCenter.x,y:c.absoluteCenter.y},width:c.width,height:c.height};return i.some(u=>{const{distance:g}=Kne(u,l);return g+1e-6<this.packInput.minGap})});let s=!1;if(this.packInput.boundaryOutline&&this.packInput.boundaryOutline.length>=3){const c=kN(n,0),l=n.pads.every(g=>HH(g.absoluteCenter,this.packInput.boundaryOutline)),u=[{x:c.minX,y:c.minY},{x:c.minX,y:c.maxY},{x:c.maxX,y:c.minY},{x:c.maxX,y:c.maxY}].every(g=>HH(g,this.packInput.boundaryOutline));s=!l||!u}if(!r&&!s){this.packedComponents.push(n);return}const a=new eSt({packedComponents:[],componentToPack:t,packPlacementStrategy:this.packInput.packPlacementStrategy,minGap:this.packInput.minGap,obstacles:o,bounds:this.packInput.bounds,boundaryOutline:this.packInput.boundaryOutline,weightedConnections:this.packInput.weightedConnections});a.solve();const A=a.getResult();A?this.packedComponents.push(A):this.packedComponents.push(n)}_step(){if(!(this.solved||this.failed)){if(this.packedComponents.length===0){if(this.unpackedComponentQueue.length===0){this.solved=!0;return}this.packFirstComponent();return}if(!this.activeSubSolver){if(this.unpackedComponentQueue.length===0){this.solved=!0;return}if(this.componentToPack=this.unpackedComponentQueue.shift(),!this.componentToPack){this.solved=!0;return}this.activeSubSolver=new eSt({packedComponents:this.packedComponents,componentToPack:this.componentToPack,packPlacementStrategy:this.packInput.packPlacementStrategy,minGap:this.packInput.minGap,obstacles:this.packInput.obstacles??[],bounds:this.packInput.bounds,boundaryOutline:this.packInput.boundaryOutline,weightedConnections:this.packInput.weightedConnections}),this.activeSubSolver.setup()}if(this.activeSubSolver.step(),this.activeSubSolver.failed){this.failed=!0;return}if(this.activeSubSolver.solved){const t=this.activeSubSolver.getResult();if(t)this.packedComponents.push(t);else{const e={...this.componentToPack,center:{x:0,y:0},ccwRotationOffset:this.componentToPack?.ccwRotationOffset??this.componentToPack?.availableRotationDegrees?.[0]??0,pads:this.componentToPack.pads.map(n=>({...n,absoluteCenter:{x:0,y:0}}))};ele(e),this.packedComponents.push(e)}this.componentToPack=void 0,this.activeSubSolver=void 0}}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t={coordinateSystem:"cartesian",title:"Pack Solver 2",points:[],lines:[],rects:[],circles:[],texts:[],arrows:[]};if(this.packInput.obstacles&&this.packInput.obstacles.length>0)for(const o of this.packInput.obstacles)t.rects.push({center:o.absoluteCenter,width:o.width,height:o.height,fill:"rgba(0,0,0,0.1)",stroke:"#555",label:o.obstacleId});if(this.packInput.bounds&&t.lines.push({points:[{x:this.packInput.bounds.minX,y:this.packInput.bounds.minY},{x:this.packInput.bounds.minX,y:this.packInput.bounds.maxY},{x:this.packInput.bounds.maxX,y:this.packInput.bounds.maxY},{x:this.packInput.bounds.maxX,y:this.packInput.bounds.minY},{x:this.packInput.bounds.minX,y:this.packInput.bounds.minY}],strokeColor:"rgba(0,0,0,0.5)",strokeDash:"2 2"}),this.packInput.boundaryOutline&&this.packInput.boundaryOutline.length){const o=[...this.packInput.boundaryOutline];o.length>0&&(o[0].x!==o[o.length-1].x||o[0].y!==o[o.length-1].y)&&o.push({...o[0]}),t.lines.push({points:o,strokeColor:"rgba(0, 0, 255, 0.5)",strokeDash:"4 2"})}if(this.packedComponents.length===0)for(const o of this.unpackedComponentQueue)for(const i of o.pads)t.rects.push({center:{x:0,y:0},width:i.size.x,height:i.size.y,fill:"rgba(0,0,0,0.1)"});const e=this.packedComponents.flatMap(o=>o.pads),n=new Map;for(const o of e)o.networkId&&n.set(o.networkId,[...n.get(o.networkId)||[],o]);for(const o of e)t.rects.push({center:o.absoluteCenter,width:o.size.x,height:o.size.y,fill:"rgba(255,0,0,0.5)"});for(const[o,i]of n.entries())for(let r=0;r<i.length;r++)for(let s=r+1;s<i.length;s++){const a=i[r],A=i[s];t.lines.push({points:[a.absoluteCenter,A.absoluteCenter],strokeColor:pve(o,.5)})}return t}getOutput(){return{packedComponents:this.packedComponents,unpackedComponents:this.unpackedComponentQueue}}},_fo=t=>{const e=new rj(t);return e.solve(),{...t,components:e.packedComponents}},ffo=t=>{if(!t||t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t)e=Math.min(e,r.x),o=Math.max(o,r.x),n=Math.min(n,r.y),i=Math.max(i,r.y);return{minX:e,maxX:o,minY:n,maxY:i}},tSt=t=>{const{width:e,height:n,ccwRotationDegrees:o}=t,i=o*Math.PI/180,r=A=>{const c=Math.abs(A);return c<1e-12?0:Math.abs(c-1)<1e-12?1:c},s=r(Math.cos(i)),a=r(Math.sin(i));return{width:e*s+n*a,height:e*a+n*s}},nSt=(t,e,n)=>{const o=[],i=({padId:r,pcbPortId:s,sx:a,sy:A,x:c,y:l})=>o.push({padId:r,networkId:n(s),size:{x:a,y:A},absoluteCenter:{x:c,y:l},pcbPortId:s});for(const r of e.pcb_via.list({pcb_component_id:t.pcb_component_id}))i({padId:r.pcb_via_id,pcbPortId:r.pcb_port_id,sx:r.outer_diameter??r.hole_diameter??0,sy:r.outer_diameter??r.hole_diameter??0,x:r.x,y:r.y});for(const r of e.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id}))switch(r.shape){case"circle":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.outer_diameter??r.hole_diameter??0,sy:r.outer_diameter??r.hole_diameter??0,x:r.x,y:r.y});break}case"oval":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.outer_width,sy:r.outer_height,x:r.x,y:r.y});break}case"circular_hole_with_rect_pad":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.rect_pad_width,sy:r.rect_pad_height,x:r.x,y:r.y});break}case"pill":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.outer_width,sy:r.outer_height,x:r.x,y:r.y});break}case"pill_hole_with_rect_pad":{i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:r.rect_pad_width,sy:r.rect_pad_height,x:r.x,y:r.y});break}case"rotated_pill_hole_with_rect_pad":{const s=tSt({width:r.rect_pad_width,height:r.rect_pad_height,ccwRotationDegrees:r.rect_ccw_rotation});i({padId:r.pcb_plated_hole_id,pcbPortId:r.pcb_port_id,sx:s.width,sy:s.height,x:r.x,y:r.y});break}default:{console.warn(`Unsupported plated hole shape ${r.shape}`);break}}for(const r of e.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}))switch(r.shape){case"rect":{i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:r.width??0,sy:r.height??0,x:r.x,y:r.y});break}case"pill":{i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:r.width,sy:r.height,x:r.x,y:r.y});break}case"rotated_rect":case"rotated_pill":{const s=tSt({width:r.width,height:r.height,ccwRotationDegrees:r.ccw_rotation});i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:s.width,sy:s.height,x:r.x,y:r.y});break}case"circle":{i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:r.radius*2,sy:r.radius*2,x:r.x,y:r.y});break}case"polygon":{if(r.points&&r.points.length>0){const{minX:s,maxX:a,minY:A,maxY:c}=ffo(r.points),l=a-s,u=c-A,g=(s+a)/2,h=(A+c)/2;i({padId:r.pcb_smtpad_id,pcbPortId:r.pcb_port_id,sx:l,sy:u,x:g,y:h})}else console.warn(`Polygon pad ${r.pcb_smtpad_id} has no points`);break}}return o},Ifo=(t,e)=>{const n=new Set,o=r=>{if(r){if(r.nodeType==="component"){const s=r.otherChildElements?.[0]?.pcb_component_id;s&&n.add(s)}for(const s of r.childNodes??[])o(s)}};o(e);const i=[];for(const r of t.pcb_plated_hole.list({})){if(!("pcb_component_id"in r)||!r.pcb_component_id){i.push(r);continue}n.has(r.pcb_component_id)||i.push(r)}for(const r of t.pcb_hole.list({}))i.push(r);return i},Cfo=(t,e,n)=>{const o=n*Math.PI/180,i=Math.abs(Math.cos(o)),r=Math.abs(Math.sin(o));return{width:t*i+e*r,height:t*r+e*i}},yfo=t=>{if(t.type==="pcb_plated_hole"&&t.shape==="circular_hole_with_rect_pad"){const{rect_pad_height:e,rect_pad_width:n,x:o,y:i}=t;return{obstacleId:t.pcb_plated_hole_id,absoluteCenter:{x:o,y:i},width:n,height:e}}if(t.type==="pcb_plated_hole"&&t.shape==="rotated_pill_hole_with_rect_pad"){const{rect_pad_height:e,rect_pad_width:n,rect_ccw_rotation:o,x:i,y:r}=t,s=Cfo(n,e,o);return{obstacleId:t.pcb_plated_hole_id,absoluteCenter:{x:i,y:r},width:s.width,height:s.height}}if(t.type==="pcb_hole"){const{x:e,y:n,pcb_hole_id:o}=t,i="hole_diameter"in t?t.hole_diameter:t.hole_width,r="hole_diameter"in t?t.hole_diameter:t.hole_height;return{obstacleId:o,absoluteCenter:{x:e,y:n},width:i,height:r}}},oSt=t=>{const{db:e,pcbComponentIds:n,componentCenter:o}=t;if(Array.from(new Set(n)).length!==1)return;const r=new Set(n);let s=1/0,a=1/0,A=-1/0,c=-1/0,l=!1;for(const h of e.pcb_courtyard_rect.list())r.has(h.pcb_component_id)&&(s=Math.min(s,h.center.x-h.width/2),A=Math.max(A,h.center.x+h.width/2),a=Math.min(a,h.center.y-h.height/2),c=Math.max(c,h.center.y+h.height/2),l=!0);for(const h of e.pcb_courtyard_polygon.list())if(r.has(h.pcb_component_id)){for(const d of h.points)s=Math.min(s,d.x),A=Math.max(A,d.x),a=Math.min(a,d.y),c=Math.max(c,d.y);l=!0}for(const h of e.pcb_courtyard_outline.list())if(r.has(h.pcb_component_id)){for(const d of h.outline)s=Math.min(s,d.x),A=Math.max(A,d.x),a=Math.min(a,d.y),c=Math.max(c,d.y);l=!0}for(const h of e.pcb_courtyard_circle.list())r.has(h.pcb_component_id)&&(s=Math.min(s,h.center.x-h.radius),A=Math.max(A,h.center.x+h.radius),a=Math.min(a,h.center.y-h.radius),c=Math.max(c,h.center.y+h.radius),l=!0);if(!l)return;const u=(s+A)/2,g=(a+c)/2;return{offsetFromCenter:{x:u-o.x,y:g-o.y},width:A-s,height:c-a}},iSt=(t,e,n,o,i,r=new Map,s={},a=!1)=>{const A=t.flatMap(m=>{const _=nSt(m,n,o),f=s[m.pcb_component_id];return f?_.map(I=>({...I,size:{x:I.size.x+f.left+f.right,y:I.size.y+f.top+f.bottom},absoluteCenter:{x:I.absoluteCenter.x+(f.right-f.left)/2,y:I.absoluteCenter.y+(f.top-f.bottom)/2}})):_});let c=1/0,l=1/0,u=-1/0,g=-1/0;for(const m of A)c=Math.min(c,m.absoluteCenter.x-m.size.x/2),u=Math.max(u,m.absoluteCenter.x+m.size.x/2),l=Math.min(l,m.absoluteCenter.y-m.size.y/2),g=Math.max(g,m.absoluteCenter.y+m.size.y/2);const h={x:(c+u)/2,y:(l+g)/2},d=A.map(m=>({padId:m.padId,networkId:m.networkId,type:"rect",size:m.size,absoluteCenter:m.absoluteCenter,offset:{x:m.absoluteCenter.x-h.x,y:m.absoluteCenter.y-h.y}}));for(const m of A){if(!m.pcbPortId)continue;const _=n.pcb_port.get(m.pcbPortId)?.source_port_id;if(!_)continue;const f=r.get(_)??[];f.push(m.padId),r.set(_,f)}if(i){const m={padId:`${e}-inner`,networkId:`${e}-inner`,type:"rect",size:{x:u-c,y:g-l},absoluteCenter:h,offset:{x:0,y:0}};d.push(m)}const p=oSt({db:n,pcbComponentIds:t.map(m=>m.pcb_component_id),componentCenter:h});return{componentId:e,isStatic:a,center:h,ccwRotationOffset:0,pads:d,courtyard:p}},rSt=(t,e)=>{if(t.nodeType==="component"){const n=t.otherChildElements[0]?.pcb_component_id;return n?[e.pcb_component.get(n)]:[]}return t.childNodes.flatMap(n=>rSt(n,e))},xfo=(t,e={})=>{const n={components:[],minGap:0,packOrderStrategy:"largest_to_smallest",packPlacementStrategy:"shortest_connection_along_outline",obstacles:e.obstacles??[]},o=mz(t,{source_group_id:e.source_group_id}),i=Xc(t);let r=0;const s=new Map,a=Ifo(i,o),A=t.find(f=>f.type==="pcb_board");A?.outline&&(n.boundaryOutline=A.outline);const c=f=>{if(f){const I=i.pcb_port.get(f);if(I){const C=i.source_port.get(I.source_port_id);if(C?.subcircuit_connectivity_map_key)return C.subcircuit_connectivity_map_key}}return`unnamed${r++}`},l=o.childNodes??[],u=f=>{const I=[];if(f.nodeType==="component"){const C=f.otherChildElements.find(y=>y.type==="pcb_component");C&&C.position_mode==="relative_to_group_anchor"&&I.push(C)}for(const C of f.childNodes??[])I.push(...u(C));return I},g=new Set(e.staticPcbComponentIds??[]),h=new Set;for(const f of l)if(f.nodeType==="component"){const I=f.otherChildElements.find(y=>y.type==="pcb_component");if(!I||I.position_mode==="relative_to_group_anchor"&&!g.has(I.pcb_component_id))continue;let C=e.shouldAddInnerObstacles??!1;I.obstructs_within_bounds===!0?C=!0:I.obstructs_within_bounds===!1&&(C=!1),n.components.push(iSt([I],I.pcb_component_id,i,c,C,s,e.chipMarginsMap,g.has(I.pcb_component_id)))}else if(f.nodeType==="group"){const I=rSt(f,i);if(!I.length)continue;for(const y of I)h.add(y.pcb_component_id);const C=f.sourceGroup?.source_group_id??f.sourceGroup?.name??`group_${n.components.length}`;n.components.push(iSt(I,C,i,c,void 0,s,e.chipMarginsMap,g.has(C)))}const d=l.flatMap(f=>u(f));for(const f of d){if(g.has(f.pcb_component_id)||h.has(f.pcb_component_id))continue;const I=oSt({db:i,pcbComponentIds:[f.pcb_component_id],componentCenter:f.center});if(I){n.obstacles.push({obstacleId:f.pcb_component_id,absoluteCenter:{x:f.center.x+I.offsetFromCenter.x,y:f.center.y+I.offsetFromCenter.y},width:I.width,height:I.height});continue}const C=nSt(f,i,c);if(C.length===0)continue;let y=1/0,x=1/0,E=-1/0,B=-1/0;for(const M of C)y=Math.min(y,M.absoluteCenter.x-M.size.x/2),E=Math.max(E,M.absoluteCenter.x+M.size.x/2),x=Math.min(x,M.absoluteCenter.y-M.size.y/2),B=Math.max(B,M.absoluteCenter.y+M.size.y/2);const S={x:(y+E)/2,y:(x+B)/2},Q=E-y,w=B-x;n.obstacles.push({obstacleId:f.pcb_component_id,absoluteCenter:S,width:Q,height:w})}for(const f of a){const I=yfo(f);I&&n.obstacles.push(I)}const p=[],m=new Set,_=typeof i.source_trace.list=="function"?i.source_trace.list():t.filter(f=>f.type==="source_trace");for(const f of _){const I=f.connected_source_port_ids||[],C=f.connected_source_net_ids||[];if(!(I.length===2&&C.length===0))continue;const[x,E]=I,B=x?s.get(x)??[]:[],S=E?s.get(E)??[]:[];for(const Q of B)for(const w of S){const M=[Q,w].sort().join("--");m.has(M)||(p.push({padIds:[Q,w],weight:1,ignoreWeakConnections:!0}),m.add(M))}}return p.length>0&&(n.weightedConnections=p),n},Efo=t=>{const e=t.components.map(n=>({...n.isStatic?{...n,pads:n.pads.map(o=>({...o}))}:{componentId:n.componentId,availableRotationDegrees:n.availableRotationDegrees,pads:n.pads.map(({absoluteCenter:o,...i})=>i),courtyard:n.courtyard}}));return{...t,components:e}},Zf=class{MAX_ITERATIONS=2e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};step(){if(!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.constructor.name} error: ${e}`,this.failed=!0,e}!this.solved&&this.iterations>this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>this.MAX_ITERATIONS&&(this.error=`${this.constructor.name} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function mve(t,e){const n=e*Math.PI/180,o=Math.cos(n),i=Math.sin(n);return{x:t.x*o-t.y*i,y:t.x*i+t.y*o}}function Bfo(t,e,n){const o=(n%360+360)%360;return Math.round((o+90)%180)===0?{width:e,height:t}:{width:t,height:e}}function bfo(t,e){const n=Math.min(t,e);return Math.min(.35,Math.max(.08,n*.22))}function Sfo(t,e=!1){const n=t.charAt(0).toUpperCase();if(e){if(n==="C")return"rgba(30, 64, 175, 0.35)";if(n==="R")return"rgba(5, 150, 105, 0.35)";if(n==="L")return"rgba(126, 34, 206, 0.35)";if(n==="U")return"rgba(180, 83, 9, 0.35)"}return n==="C"?"rgba(59, 130, 246, 0.18)":n==="R"?"rgba(16, 185, 129, 0.18)":n==="L"?"rgba(168, 85, 247, 0.18)":n==="U"?"rgba(245, 158, 11, 0.18)":"rgba(59, 130, 246, 0.12)"}function Vh(t,e){const n={points:[],rects:[],lines:[],circles:[],texts:[]},o={};for(const a of Object.keys(t.netConnMap)){const[A,c]=a.split("-");o[A]=c}for(const[a,A]of Object.entries(t.chipMap)){const c=A.pins.map(_=>t.chipPinMap[_]),l=e.chipPlacements[a];if(!l)continue;let u,g;if(A.size&&Number.isFinite(A.size.x)&&Number.isFinite(A.size.y))u=A.size.x,g=A.size.y;else{const _=c.map(E=>E.offset.x),f=c.map(E=>E.offset.y),I=_.length?Math.min(..._):-5,C=_.length?Math.max(..._):5,y=f.length?Math.min(...f):-5,x=f.length?Math.max(...f):5;u=Math.max(10,C-I+6),g=Math.max(10,x-y+6)}const h=l.x,d=l.y,p=Bfo(u,g,l.ccwRotationDegrees),m=A.fixedPosition?`${a} [fixed]`:a;n.rects.push({center:{x:h,y:d},width:p.width,height:p.height,label:m,fill:Sfo(a,!!A.fixedPosition),stroke:"none"}),n.texts.push({x:h,y:d,text:m,fontSize:bfo(p.width,p.height)});for(const _ of c){const f=mve(_.offset,l.ccwRotationDegrees),I=l.x+f.x,C=l.y+f.y,y=o[_.pinId],x=y?`${_.pinId} (${y})`:_.pinId;n.points.push({x:I,y:C,label:x})}}const i={};for(const[a,A]of Object.entries(o))i[A]||(i[A]=[]),i[A].push(a);for(const[,a]of Object.entries(i)){const A=a.map(c=>{const l=t.chipPinMap[c];if(l){for(const[u,g]of Object.entries(t.chipMap))if(g.pins.includes(c)){const h=e.chipPlacements[u];if(h){const d=mve(l.offset,h.ccwRotationDegrees);return{x:h.x+d.x,y:h.y+d.y}}}return l.offset}return null}).filter(Boolean);for(let c=0;c<A.length;c++)for(let l=c+1;l<A.length;l++)n.lines.push({points:[A[c],A[l]],strokeColor:"rgba(0,0,0,0.1)"})}const r=a=>{const A=t.chipPinMap[a];if(A){for(const[c,l]of Object.entries(t.chipMap))if(l.pins.includes(a)){const u=e.chipPlacements[c];if(u){const g=mve(A.offset,u.ccwRotationDegrees);return{x:u.x+g.x,y:u.y+g.y}}}return A.offset}return null},s=new Set;for(const[a,A]of Object.entries(t.pinStrongConnMap)){if(!A)continue;const[c,l]=a.split("-"),u=c<l?`${c}-${l}`:`${l}-${c}`;if(s.has(u))continue;s.add(u);const g=r(c),h=r(l);!g||!h||n.lines.push({points:[g,h]})}return n}var Qfo=t=>JSON.stringify(t),_ve=new Map;function pb(t){const e=Qfo(t);if(_ve.has(e))return structuredClone(_ve.get(e));const n=Object.entries(t.chipMap).map(([s,a])=>{const c=a.pins.map(u=>t.chipPinMap[u]).map(u=>{let g=u.pinId;for(const[h,d]of Object.entries(t.pinStrongConnMap))if(d&&h.includes(u.pinId)){const[p,m]=h.split("-");if(p===u.pinId||m===u.pinId){g=[p,m].sort().join("_");break}}return{padId:u.pinId,networkId:g,type:"rect",offset:u.offset,size:{x:.001,y:.001}}});c.push({padId:`${s}-body`,networkId:s,type:"rect",offset:{x:0,y:0},size:{x:a.size.x,y:a.size.y}});const l=a.availableRotations?.[0]??0;return{componentId:s,pads:c,availableRotationDegrees:a.availableRotations??[0,90,180,270],...a.fixedPosition&&{isStatic:!0,center:a.fixedPosition,ccwRotationOffset:l}}}),o=_fo({components:n,minGap:.4,packOrderStrategy:"largest_to_smallest",packPlacementStrategy:"shortest_connection_along_outline"}),i={};for(const s of o.components)i[s.componentId]={x:s.center.x,y:s.center.y,ccwRotationDegrees:s.ccwRotationOffset};const r={chipPlacements:i,groupPlacements:{}};return _ve.set(e,r),structuredClone(r)}var FN=t=>{const e=new Map;for(const n of Object.values(t.chipMap))for(const o of n.pins)e.set(o,n);return e},vfo=class extends Zf{inputProblem;partitions=[];decouplingCapGroups;crystalCircuitGroups;constructor({inputProblem:t,decouplingCapGroups:e,crystalCircuitGroups:n}){super(),this.inputProblem=t,this.decouplingCapGroups=e,this.crystalCircuitGroups=n}_step(){this.partitions=this.createPartitions(this.inputProblem),this.solved=!0}createPartitions(t){const e=Object.keys(t.chipMap),n=new Set,o=[];for(const u of this.crystalCircuitGroups??[]){const g=[u.crystalChipId,...u.loadCaps.map(h=>h.chipId),...u.seriesResistors.map(h=>h.chipId)].filter(h=>t.chipMap[h]);if(!(g.length<3)){o.push({chipIds:g,group:u});for(const h of g)n.add(h)}}const i=new Set,r=[];if(this.decouplingCapGroups&&this.decouplingCapGroups.length>0)for(const u of this.decouplingCapGroups){const g=[];for(const h of u.decouplingCapChipIds)t.chipMap[h]&&!n.has(h)&&g.push(h);if(g.length>=2){r.push(g);for(const h of g)i.add(h)}}const s=e.filter(u=>!i.has(u)&&!n.has(u)),a=new Map,A=FN(t);for(const u of s)a.set(u,new Set);for(const[u,g]of Object.entries(t.pinStrongConnMap)){if(!g)continue;const[h,d]=u.split("-"),p=A.get(h)?.chipId,m=A.get(d)?.chipId;p&&m&&p!==m&&!i.has(p)&&!i.has(m)&&!n.has(p)&&!n.has(m)&&(a.get(p).add(m),a.get(m).add(p))}const c=new Set,l=[];for(const u of s)if(!c.has(u)){const g=this.dfs(u,a,c);g.length>0&&l.push(g)}return[...o.map(({chipIds:u,group:g})=>this.createInputProblemFromPartition(u,t,{partitionType:"crystal_circuit",crystalCircuitGroup:g})),...r.map(u=>{const g=this.decouplingCapGroups?.find(h=>h.decouplingCapChipIds.some(d=>u.includes(d)));return this.createInputProblemFromPartition(u,t,{partitionType:"decoupling_caps",decouplingMainChipId:g?.mainChipId,decouplingMainChipSide:g?.mainChipSide})}),...l.map(u=>this.createInputProblemFromPartition(u,t))]}dfs(t,e,n){const o=[],i=[t];for(;i.length>0;){const r=i.pop();if(n.has(r))continue;n.add(r),o.push(r);const s=e.get(r)||new Set;for(const a of s)n.has(a)||i.push(a)}return o}createInputProblemFromPartition(t,e,n){const o=t,i=new Set;for(const u of o){const g=e.chipMap[u];for(const h of g.pins)i.add(h)}const r={},s={},a={},A={},c={};for(const u of o)r[u]=e.chipMap[u];for(const u of i)e.chipPinMap[u]&&(s[u]=e.chipPinMap[u]);for(const[u,g]of Object.entries(e.pinStrongConnMap)){const[h,d]=u.split("-");i.has(h)&&i.has(d)&&(A[u]=g)}const l=new Set;for(const[u,g]of Object.entries(e.netConnMap)){if(!g)continue;const[h,d]=u.split("-");i.has(h)&&(l.add(d),c[u]=g)}for(const u of l)e.netMap[u]&&(a[u]=e.netMap[u]);return{...e,chipMap:r,chipPinMap:s,netMap:a,pinStrongConnMap:A,netConnMap:c,isPartition:!0,partitionType:n?.partitionType,decouplingMainChipId:n?.decouplingMainChipId,decouplingMainChipSide:n?.decouplingMainChipSide,crystalCircuitGroup:n?.crystalCircuitGroup}}visualize(){if(this.partitions.length===0){const n=pb(this.inputProblem);return Vh(this.inputProblem,n)}const t=this.partitions.map(n=>{const o=pb(n);return Vh(n,o)}),e=this.partitions.map((n,o)=>`partition${o}`);return zce(t,{titles:e})}},wfo=(t,e=1)=>{let n=0;for(let o=0;o<t.length;o++){const i=t.charCodeAt(o);n=(n<<5)-n+i,n=n&n}return`hsl(${Math.abs(n)%360}, 70%, 50%, ${e})`},sSt=t=>(Math.round(t/90)*90%360+360)%360,ta=(t,e)=>{switch(sSt(e)){case 90:return{x:-t.y,y:t.x};case 180:return{x:-t.x,y:-t.y};case 270:return{x:t.y,y:-t.x};default:return{x:t.x,y:t.y}}},dd=(t,e)=>{const n=sSt(e);return n===90||n===270?{x:t.y,y:t.x}:{x:t.x,y:t.y}},aSt=({inputProblem:t,netIds:e})=>{const n=e.filter(r=>t.netMap[r]?.isPositiveVoltageSource);if(n.length===1)return n[0];const o=e.filter(r=>t.netMap[r]?.isGround),i=e.filter(r=>{const s=t.netMap[r];return s?!s.isGround:!1});return o.length!==1||i.length!==1?null:i[0]},Pfo=2,Mfo=(t,e)=>t[0]===e[0]&&t[1]===e[1],Dfo=({groundedCapacitorsWithoutPowerMetadata:t})=>{const e=[];for(const n of t){const o=e.find(i=>Mfo(i.netPair,n.netPair));if(o){o.capacitorChipIds.push(n.capacitorChipId);continue}e.push({capacitorChipIds:[n.capacitorChipId],netPair:n.netPair})}return e.filter(n=>n.capacitorChipIds.length>=Pfo)},Nfo=class extends Zf{inputProblem;queuedChips;outputDecouplingCapGroups=[];groundedCapacitorsWithoutPowerMetadata=[];groupsByMainChipId=new Map;constructor(t){super(),this.inputProblem=t,this.queuedChips=Object.values(t.chipMap)}isTwoPinRestrictedRotation(t){if(t.pins.length!==2||!t.availableRotations)return!1;const e=new Set([0,180]);return t.availableRotations.length>0&&(t.availableRotations.length===1||t.availableRotations.every(n=>e.has(n)))}pinsOnOppositeYSidesAfterRotation(t){if(t.pins.length!==2)return!1;const[e,n]=t.pins,o=this.inputProblem.chipPinMap[e],i=this.inputProblem.chipPinMap[n];if(!o||!i)return!1;const r=t.availableRotations?.[0]??0,s=ta(o.offset,r),a=ta(i.offset,r),A=Math.abs(s.y-a.y);return A>0&&A>=Math.abs(s.x-a.x)}getStronglyConnectedNeighborChips(t){const e=new Set;for(const[n,o]of Object.entries(this.inputProblem.pinStrongConnMap)){if(!o)continue;const[i,r]=n.split("-");if(i===t){const s=r.split(".")[0];e.add(s)}else if(r===t){const s=i.split(".")[0];e.add(s)}}return e}findMainChipIdForCap(t,e){return this.findStronglyConnectedMainChipId(t)??this.findRailSharingMainChipId(t,e)??this.findUniqueMainChipSharingNetPair(e)}findUniqueMainChipSharingNetPair(t){const e=Object.values(this.inputProblem.chipMap).filter(n=>!n.isCapacitor&&t.every(o=>n.pins.some(i=>this.getNetIdsForPin(i).has(o))));return e.length===1?e[0].chipId:null}findStronglyConnectedMainChipId(t){const e=new Map;for(const i of t.pins){const r=this.getStronglyConnectedNeighborChips(i);for(const s of r){if(s===t.chipId)continue;const a=e.get(s)||0;e.set(s,a+1)}}let n=null,o=0;for(const[i,r]of e)r<o||n!==null&&r===o&&i>n||(n=i,o=r);return n}findRailSharingMainChipId(t,e){for(const n of Object.values(this.inputProblem.chipMap)){if(n.chipId===t.chipId||!n.isCapacitor)continue;const o=this.getNormalizedNetPair(n);if(!o||o[0]!==e[0]||o[1]!==e[1])continue;const i=this.findStronglyConnectedMainChipId(n);if(i)return i}return null}getNetIdsForPin(t){const e=new Set;for(const[n,o]of Object.entries(this.inputProblem.netConnMap)){if(!o)continue;const[i,r]=n.split("-");i===t&&e.add(r)}return e}getNormalizedNetPair(t){if(t.pins.length!==2)return null;const e=new Set;for(const i of t.pins){const r=this.getNetIdsForPin(i);for(const s of r)e.add(s)}if(e.size!==2)return null;const[n,o]=Array.from(e).sort();return[n,o]}addToGroup(t,e,n){const[o,i]=e,r=`${t}__${o}__${i}`;let s=this.groupsByMainChipId.get(r);s||(s={decouplingCapGroupId:`decap_group_${t}__${o}__${i}`,mainChipId:t,mainChipSide:this.getMainChipSide(t,e),netPair:[o,i],decouplingCapChipIds:[]},this.groupsByMainChipId.set(r,s),this.outputDecouplingCapGroups.push(s)),s.decouplingCapChipIds.includes(n)||s.decouplingCapChipIds.push(n)}getMainChipSide(t,e){const n=this.inputProblem.chipMap[t];if(!n)return null;const o=aSt({inputProblem:this.inputProblem,netIds:e});if(!o)return null;const i=new Map;for(const a of n.pins){const A=this.inputProblem.chipPinMap[a];!A||!this.getNetIdsForPin(a).has(o)||i.set(A.side,(i.get(A.side)??0)+1)}let r=null,s=0;for(const[a,A]of i)A<=s||(r=a,s=A);return r}lastChip=null;addGroundedCapacitorGroupsWithoutPowerMetadata(){const t=Dfo({groundedCapacitorsWithoutPowerMetadata:this.groundedCapacitorsWithoutPowerMetadata});for(const e of t){const n=this.findUniqueMainChipSharingNetPair(e.netPair);if(n)for(const o of e.capacitorChipIds)this.addToGroup(n,e.netPair,o)}}_step(){const t=this.queuedChips.shift();if(this.lastChip=t??null,!t){this.addGroundedCapacitorGroupsWithoutPowerMetadata(),this.solved=!0;return}if(!t.isCapacitor||!(this.isTwoPinRestrictedRotation(t)&&this.pinsOnOppositeYSidesAfterRotation(t)))return;const n=this.getNormalizedNetPair(t);if(!n)return;const[o,i]=n,r=this.inputProblem.netMap[o],s=this.inputProblem.netMap[i];if(!(r?.isGround&&s?.isPositiveVoltageSource||s?.isGround&&r?.isPositiveVoltageSource)){n.filter(l=>this.inputProblem.netMap[l]?.isGround).length===1&&this.groundedCapacitorsWithoutPowerMetadata.push({capacitorChipId:t.chipId,netPair:n});return}const A=this.findMainChipIdForCap(t,n);A&&this.addToGroup(A,n,t.chipId)}visualize(){const t=pb(this.inputProblem),e=Vh(this.inputProblem,t),n=new Map;for(const o of this.outputDecouplingCapGroups){n.set(o.mainChipId,o);for(const i of o.decouplingCapChipIds)n.set(i,o)}for(const o of e.rects||[])o.label!==this.lastChip?.chipId&&(o.fill="rgba(0,0,0,0.5)");for(const o of e.rects||[]){const i=o.label,r=n.get(i);r&&(o.label=`${o.label}
${r.decouplingCapGroupId}`,o.fill=wfo(r.decouplingCapGroupId,.8))}return e}getConstructorParams(){return[this.inputProblem]}computeProgress(){const t=Object.keys(this.inputProblem.chipMap).length||1,e=t-this.queuedChips.length;return Math.min(1,Math.max(0,e/t))}},Rfo=class extends Zf{inputProblem;queuedCrystals;outputCrystalCircuitGroups=[];constructor(t){super(),this.inputProblem=t,this.queuedCrystals=Object.values(t.chipMap).filter(e=>e.isCrystal)}getNetIdsForPin(t){const e=new Set;for(const n of Object.keys(this.inputProblem.netMap))this.inputProblem.netConnMap[`${t}-${n}`]&&e.add(n);return e}pinsAreConnected(t,e){if(this.inputProblem.pinStrongConnMap[`${t}-${e}`]||this.inputProblem.pinStrongConnMap[`${e}-${t}`])return!0;const n=this.getNetIdsForPin(t);return Array.from(this.getNetIdsForPin(e)).some(o=>n.has(o))}getGroundNetId(t){for(const e of this.getNetIdsForPin(t))if(this.inputProblem.netMap[e]?.isGround)return e;return null}findLoadCapsForCrystalPin(t){const e=[];for(const n of Object.values(this.inputProblem.chipMap))if(!(!n.isCapacitor||n.pins.length!==2))for(const o of n.pins){if(!this.pinsAreConnected(t,o))continue;const i=n.pins.find(s=>s!==o);if(!i)continue;const r=this.getGroundNetId(i);r&&e.push({chipId:n.chipId,signalPinId:o,groundPinId:i,groundNetId:r})}return e}findSeriesResistors(t,e){const n=[];for(const o of Object.values(this.inputProblem.chipMap)){if(!o.isResistor||o.pins.length!==2||e.has(o.chipId))continue;const i=t.flatMap(a=>o.pins.filter(A=>this.pinsAreConnected(a,A)).map(A=>({crystalPinId:a,connectedPinId:A})));if(i.length!==1)continue;const r=i[0],s=o.pins.find(a=>a!==r.connectedPinId);!s||this.getGroundNetId(s)||n.push({chipId:o.chipId,crystalPinId:r.crystalPinId,connectedPinId:r.connectedPinId})}return n}identifyCrystal(t){const e=t.pins.filter(A=>!this.getGroundNetId(A));if(e.length!==2)return null;const[n,o]=e,i=this.findLoadCapsForCrystalPin(n),r=this.findLoadCapsForCrystalPin(o);if(i.length!==1||r.length!==1||i[0].chipId===r[0].chipId||i[0].groundNetId!==r[0].groundNetId)return null;const s=[{chipId:i[0].chipId,signalPinId:i[0].signalPinId,groundPinId:i[0].groundPinId},{chipId:r[0].chipId,signalPinId:r[0].signalPinId,groundPinId:r[0].groundPinId}],a=new Set(s.map(A=>A.chipId));return{crystalCircuitGroupId:`crystal_circuit_${t.chipId}`,crystalChipId:t.chipId,activeCrystalPinIds:[n,o],loadCaps:s,groundNetId:i[0].groundNetId,seriesResistors:this.findSeriesResistors([n,o],a)}}_step(){const t=this.queuedCrystals.shift();if(!t){this.solved=!0;return}const e=this.identifyCrystal(t);e&&this.outputCrystalCircuitGroups.push(e)}visualize(){return Vh(this.inputProblem,pb(this.inputProblem))}getConstructorParams(){return[this.inputProblem]}computeProgress(){const t=Object.values(this.inputProblem.chipMap).filter(e=>e.isCrystal).length;return t===0?1:(t-this.queuedCrystals.length)/t}},Tfo=({firstChipId:t,secondChipId:e},n)=>{const o=n.chipMap[t],i=n.chipMap[e];return o?.isCapacitor&&i?.isCapacitor?n.decouplingCapsGap??n.chipGap:n.partitionGap},kfo=class extends Zf{inputProblem;inputLayout;outputLayout=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputLayout=t.inputLayout}_step(){this.outputLayout=this.createAlignedLayout()??this.inputLayout,this.solved=!0}isPowerGroundNet(t){const e=this.inputProblem.netMap[t];return e?.isPositiveVoltageSource===!0||e?.isGround===!0}getPinNetIds(t){const e=[];for(const[n,o]of Object.entries(this.inputProblem.netConnMap))o&&n.startsWith(`${t}-`)&&e.push(n.slice(t.length+1));return e}pinHasStrongConnection(t){for(const[e,n]of Object.entries(this.inputProblem.pinStrongConnMap))if(n&&(e.startsWith(`${t}-`)||e.endsWith(`-${t}`)))return!0;return!1}getAlignmentGroupId(t){if(t.fixedPosition||t.pins.length!==2)return null;const e=new Set;let n=0;for(const o of t.pins){const i=this.getPinNetIds(o);if(i.length===0){if(this.pinHasStrongConnection(o))return null;continue}let r=!1;for(const s of i)this.isPowerGroundNet(s)?r=!0:e.add(s);r&&n++}return n===0?null:e.size===0?"power-ground":e.size===1?`signal:${[...e][0]}`:null}getAlignmentGroups(){const t=Object.keys(this.inputProblem.chipMap);if(t.length<2)return null;const e=new Map;for(const n of t){const o=this.inputProblem.chipMap[n];if(!o||!this.inputLayout.chipPlacements[n])continue;const i=this.getAlignmentGroupId(o);if(!i)continue;const r=e.get(i)??[];r.push(n),e.set(i,r)}return[...e.values()].filter(n=>n.length>1).map(n=>({chipIds:n}))}alignGroup(t,e){if(e.length<2)return;let n=0;const o=e.reduce((s,a)=>s+this.inputLayout.chipPlacements[a].y,0)/e.length,i=e.reduce((s,a)=>s+this.inputLayout.chipPlacements[a].x,0)/e.length;for(const[s,a]of e.entries()){const A=e[s-1];A&&(n+=Tfo({firstChipId:A,secondChipId:a},this.inputProblem));const c=this.inputProblem.chipMap[a],l=this.inputLayout.chipPlacements[a],u=l.ccwRotationDegrees===90||l.ccwRotationDegrees===270;let g=c.size.x;u&&(g=c.size.y);const h=n+g/2;t[a]={x:h,y:o,ccwRotationDegrees:l.ccwRotationDegrees},n+=g}const r=n;for(const s of e)t[s].x+=i-r/2}hasChipOverlap(t){const e=Object.keys(this.inputProblem.chipMap);for(let n=0;n<e.length;n++){const o=e[n],i=this.inputProblem.chipMap[o],r=t[o];if(!r)continue;const s=r.ccwRotationDegrees===90||r.ccwRotationDegrees===270;let a=i.size.x,A=i.size.y;s&&(a=i.size.y,A=i.size.x);for(let c=n+1;c<e.length;c++){const l=e[c],u=this.inputProblem.chipMap[l],g=t[l];if(!g)continue;const h=g.ccwRotationDegrees===90||g.ccwRotationDegrees===270;let d=u.size.x,p=u.size.y;h&&(d=u.size.y,p=u.size.x);const m=Math.abs(r.x-g.x)<(a+d)/2,_=Math.abs(r.y-g.y)<(A+p)/2;if(m&&_)return!0}}return!1}createAlignedLayout(){const t=this.getAlignmentGroups();if(!t)return null;const e={...this.inputLayout.chipPlacements};for(const n of t)this.alignGroup(e,n.chipIds);return this.hasChipOverlap(e)?null:{chipPlacements:e,groupPlacements:{...this.inputLayout.groupPlacements}}}visualize(){return Vh(this.inputProblem,this.outputLayout??this.inputLayout)}getConstructorParams(){return[{inputProblem:this.inputProblem,inputLayout:this.inputLayout}]}},sj=t=>{const e={},n=Object.keys(t.chipPinMap);for(let o=0;o<n.length;o++)for(let i=o+1;i<n.length;i++){const r=n[o],s=n[i];(t.pinStrongConnMap[`${r}-${s}`]||t.pinStrongConnMap[`${s}-${r}`])&&(e[r]??=[],e[s]??=[],e[r].push(t.chipPinMap[s]),e[s].push(t.chipPinMap[r]))}return e},mb=({placement:t,size:e,margin:n=0})=>{const o=dd(e,t.ccwRotationDegrees);return Ey({center:t,width:o.x+n*2,height:o.y+n*2})},ASt=({inputProblem:t,chipIdA:e,placementA:n,chipIdB:o,placementB:i})=>{const r=mb({placement:n,size:t.chipMap[e].size,margin:t.chipGap}),s=mb({placement:i,size:t.chipMap[o].size});return bQn(r,s)>0},Ffo=.2,Lfo=({looseTestPointChipIds:t},e)=>{const n=t.map(s=>e.chipPlacements[s].x),o=t.map(s=>e.chipPlacements[s].y),i=Math.max(...n)-Math.min(...n),r=Math.max(...o)-Math.min(...o);return i>=r?{perpendicularAxis:"y",tangentAxis:"x"}:{perpendicularAxis:"x",tangentAxis:"y"}},Hfo=({looseTestPointChipIds:t,perpendicularAxis:e,tangentAxis:n},o)=>{const i=t.reduce((A,c)=>A+o.chipPlacements[c][e],0)/t.length,r=[...t].sort((A,c)=>o.chipPlacements[A][n]-o.chipPlacements[c][n]),s={};let a;for(const A of r){const c={...o.chipPlacements[A],[e]:i};if(a){const l=s[a],u=dd(o.inputProblem.chipMap[a].size,l.ccwRotationDegrees),g=dd(o.inputProblem.chipMap[A].size,c.ccwRotationDegrees),h=l[n]+u[n]/2+o.inputProblem.chipGap+g[n]/2;c[n]<h&&(c[n]=h)}s[A]=c,a=A}return s},Ofo=({looseTestPointChipIds:t,testPointRow:e},n)=>{const o=new Set(t);return t.some(i=>Object.entries(n.chipPlacements).some(([r,s])=>!o.has(r)&&ASt({inputProblem:n.inputProblem,chipIdA:i,placementA:e[i],chipIdB:r,placementB:s})))},Gfo=({looseTestPointChipIds:t,perpendicularAxis:e,testPointRow:n},o)=>{const i=Math.max(o.inputProblem.chipGap,Ffo);let r=0;for(;;){const s=[0];r>0&&(s.length=0,s.push(-r*i,r*i));for(const a of s){const A=structuredClone(n);for(const c of t)A[c][e]+=a;if(!Ofo({looseTestPointChipIds:t,testPointRow:A},o))return A}r++}},Yfo=({anchoredTestPointChipIds:t},e)=>{const n=Object.values(e.inputProblem.chipMap).filter(a=>a.isTestPoint&&!a.fixedPosition&&a.pins.length===1&&e.chipPlacements[a.chipId]&&!t.has(a.chipId)).map(a=>a.chipId);if(n.length<2)return;const{perpendicularAxis:o,tangentAxis:i}=Lfo({looseTestPointChipIds:n},e),r=Hfo({looseTestPointChipIds:n,perpendicularAxis:o,tangentAxis:i},e),s=Gfo({looseTestPointChipIds:n,perpendicularAxis:o,testPointRow:r},e);for(const[a,A]of Object.entries(s))e.chipPlacements[a]=A},Ufo=1.5,cSt=.2,lSt=1e-6,Kfo=2,Vfo=.5,zfo={"x-":{x:-1,y:0},"x+":{x:1,y:0},"y-":{x:0,y:-1},"y+":{x:0,y:1}},nle={"x-":{normalAxis:"x",tangentAxis:"y",direction:-1},"x+":{normalAxis:"x",tangentAxis:"y",direction:1},"y-":{normalAxis:"y",tangentAxis:"x",direction:-1},"y+":{normalAxis:"y",tangentAxis:"x",direction:1}},Jfo={"x-":"x+","x+":"x-","y-":"y+","y+":"y-"},Wfo=t=>Math.abs(t.x)>Math.abs(t.y)?t.x<0?"x-":"x+":t.y<0?"y-":"y+",fve=(t,e)=>Wfo(ta(zfo[t],e)),ole=({anchorChipId:t,anchorPinId:e,side:n},o)=>{const i=o.inputLayout.chipPlacements[t],r=o.inputProblem.chipPinMap[e],s=ta(r.offset,i.ccwRotationDegrees),a=nle[n].tangentAxis;return i[a]+s[a]},jfo=({group:t},e)=>{if(t.members.length<2)return[t];const n=e.inputProblem.chipMap[t.anchorChipId],o=e.inputLayout.chipPlacements[t.anchorChipId],i=n.pins.filter(l=>{const u=e.inputProblem.chipPinMap[l];return u&&fve(u.side,o.ccwRotationDegrees)===t.side}).map(l=>ole({anchorChipId:t.anchorChipId,anchorPinId:l,side:t.side},e)).sort((l,u)=>l-u),r=i.slice(1).map((l,u)=>l-i[u]).filter(l=>l>lSt);if(r.length===0)return[t];const s=Math.min(...r)*Ufo,a=[];let A=[],c;for(const l of t.members){const u=ole({anchorChipId:l.anchorChipId,anchorPinId:l.anchorPinId,side:l.side},e);c!==void 0&&u-c>s+lSt&&(a.push({...t,members:A}),A=[]),A.push(l),c=u}return A.length>0&&a.push({...t,members:A}),a},$fo=t=>{const e=FN(t.inputProblem),n=sj(t.inputProblem),o=[];for(const i of Object.values(t.inputProblem.chipMap)){if(!i.isTestPoint||i.fixedPosition||i.pins.length!==1)continue;const r=i.pins[0],s=n[r]?.[0];if(!s)continue;const a=s.pinId,A=e.get(a)?.chipId;if(!A||A===i.chipId||t.inputProblem.chipMap[A]?.isTestPoint)continue;const c=t.inputLayout.chipPlacements[A];if(!c)continue;const l=fve(s.side,c.ccwRotationDegrees);let u=o.find(g=>g.anchorChipId===A&&g.side===l);u||(u={anchorChipId:A,side:l,members:[]},o.push(u)),u.members.push({testPointChipId:i.chipId,testPointPinId:r,anchorChipId:A,anchorPinId:a,side:l})}for(const i of o)i.members.sort((r,s)=>ole({anchorChipId:r.anchorChipId,anchorPinId:r.anchorPinId,side:r.side},t)-ole({anchorChipId:s.anchorChipId,anchorPinId:s.anchorPinId,side:s.side},t));return o.flatMap(i=>jfo({group:i},t))},qfo=({member:t},e)=>{const n=e.inputProblem.chipMap[t.testPointChipId],o=e.inputProblem.chipPinMap[t.testPointPinId],i=n.availableRotations??[0,90,180,270],r=Jfo[t.side];return i.find(s=>fve(o.side,s)===r)??i[0]},Xfo=({group:t},e)=>{const{inputProblem:n,chipPlacements:o}=e,i=o[t.anchorChipId],r=n.chipMap[t.anchorChipId],s=mb({placement:i,size:r.size}),{normalAxis:a,tangentAxis:A,direction:c}=nle[t.side],l=t.members.map(g=>{const h=n.chipPinMap[g.anchorPinId],d=ta(h.offset,i.ccwRotationDegrees),p={x:i.x+d.x,y:i.y+d.y},m=qfo({member:g},e),_=dd(n.chipMap[g.testPointChipId].size,m);return{member:g,anchorPinPosition:p,ccwRotationDegrees:m,size:_}}).sort((g,h)=>g.anchorPinPosition[A]-h.anchorPinPosition[A]);let u=-1/0;for(const g of l){const h=g.size[A],d=g.anchorPinPosition[A],p=Math.max(d,u+n.chipGap+h/2);u=p+h/2;const m=g.anchorPinPosition[a];let _=s.minX;a==="y"&&(_=s.minY),a==="x"&&c>0&&(_=s.maxX),a==="y"&&c>0&&(_=s.maxY);let f=Math.min(_,m);c>0&&(f=Math.max(_,m));const I=f+c*(n.chipGap+g.size[a]/2);let C=I,y=p;a==="y"&&(C=p,y=I),o[g.member.testPointChipId]={x:C,y,ccwRotationDegrees:g.ccwRotationDegrees}}},uSt=({group:t},e)=>{const n=new Set(t.members.map(o=>o.testPointChipId));return t.members.some(o=>{const i=e.chipPlacements[o.testPointChipId];return Object.entries(e.chipPlacements).some(([r,s])=>r!==t.anchorChipId&&!n.has(r)&&ASt({inputProblem:e.inputProblem,chipIdA:o.testPointChipId,placementA:i,chipIdB:r,placementB:s}))})},Zfo=({group:t},e)=>{const{normalAxis:n,direction:o}=nle[t.side],i=Math.max(e.inputProblem.chipGap,cSt);for(;uSt({group:t},e);)for(const r of t.members)e.chipPlacements[r.testPointChipId][n]+=o*i},gSt=({inputProblem:t,pinId:e,placement:n})=>{const o=t.chipPinMap[e],i=ta(o.offset,n.ccwRotationDegrees);return{x:n.x+i.x,y:n.y+i.y}},dSt=({group:t},e)=>{const n=new Set(t.members.map(i=>i.testPointChipId));let o=0;for(const i of t.members){const r=gSt({inputProblem:e.inputProblem,pinId:i.testPointPinId,placement:e.chipPlacements[i.testPointChipId]}),s=gSt({inputProblem:e.inputProblem,pinId:i.anchorPinId,placement:e.chipPlacements[i.anchorChipId]});for(const[a,A]of Object.entries(e.chipPlacements)){if(a===i.anchorChipId||n.has(a))continue;const c=mb({placement:A,size:e.inputProblem.chipMap[a].size});Exe(r,s,c)&&o++}}return o},e1o=({group:t,tangentAxis:e,searchStep:n},o)=>{const i=new Set(t.members.map(A=>A.testPointChipId)),r=t.members.reduce((A,c)=>A+o.chipPlacements[c.testPointChipId][e],0)/t.members.length,s=Math.max(...t.members.map(A=>{const c=o.chipPlacements[A.testPointChipId];return dd(o.inputProblem.chipMap[A.testPointChipId].size,c.ccwRotationDegrees)[e]})),a=Object.entries(o.chipPlacements).reduce((A,[c,l])=>{if(i.has(c))return A;const u=dd(o.inputProblem.chipMap[c].size,l.ccwRotationDegrees)[e];return Math.max(A,Math.abs(l[e]-r)+u+s)},0)+o.inputProblem.partitionGap;return Math.ceil(a/n)+Kfo},t1o=({group:t},e)=>{const{tangentAxis:n}=nle[t.side],o=new Map(t.members.map(A=>[A.testPointChipId,{...e.chipPlacements[A.testPointChipId]}])),i=Math.max(e.inputProblem.partitionGap*Vfo,e.inputProblem.chipGap,cSt),r=e1o({group:t,tangentAxis:n,searchStep:i},e);let s=0,a=Number.POSITIVE_INFINITY;for(let A=0;A<=r;A++){const c=[0];A>0&&(c.length=0,c.push(-A*i,A*i));for(const l of c){for(const g of t.members){const h=o.get(g.testPointChipId);e.chipPlacements[g.testPointChipId]={...h,[n]:h[n]+l}}if(uSt({group:t},e))continue;const u=dSt({group:t},e);if(u<a&&(a=u,s=l),u===0)break}if(a===0)break}for(const A of t.members){const c=o.get(A.testPointChipId);e.chipPlacements[A.testPointChipId]={...c,[n]:c[n]+s}}},n1o=class extends Zf{inputProblem;inputLayout;outputLayout=null;testPointSideGroups=[];connectionBodyCrossingCount=0;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputLayout=t.inputLayout}_step(){const t=structuredClone(this.inputLayout.chipPlacements),e={inputProblem:this.inputProblem,chipPlacements:t};this.testPointSideGroups=$fo({inputProblem:this.inputProblem,inputLayout:this.inputLayout});for(const o of this.testPointSideGroups)Xfo({group:o},e);for(const o of this.testPointSideGroups)Zfo({group:o},e),t1o({group:o},e);this.connectionBodyCrossingCount=this.testPointSideGroups.reduce((o,i)=>o+dSt({group:i},e),0);const n=new Set(this.testPointSideGroups.flatMap(o=>o.members.map(i=>i.testPointChipId)));Yfo({anchoredTestPointChipIds:n},e),this.outputLayout={chipPlacements:t,groupPlacements:{...this.inputLayout.groupPlacements}},this.solved=!0}visualize(){return Vh(this.inputProblem,this.outputLayout??this.inputLayout)}};function o1o(t){const{inputProblem:e}=t,n=new Map,o=new Set;let i=!1;const r=new Map;for(const[s,a]of Object.entries(e.pinStrongConnMap)){if(!a)continue;i=!0;const A=s.split("-");if(A.length===2&&A[0]&&A[1]){const c=e.chipPinMap[A[0]],l=e.chipPinMap[A[1]];if(c&&l){const u=A[0].split(".")[0],g=A[1].split(".")[0];if(u&&g&&u!==g){const h=`${u}-${g}`,d=`${g}-${u}`;r.has(h)||r.set(h,new Set),r.has(d)||r.set(d,new Set),r.get(h).add(c.side),r.get(d).add(l.side)}}}}if(i)for(const[s,a]of Object.entries(e.netConnMap)){if(!a)continue;const[A,c]=s.split("-");A&&c&&o.add(A)}else for(const[s,a]of Object.entries(e.netConnMap)){if(!a)continue;const[A,c]=s.split("-");if(A&&c){if(!e.chipPinMap[A])continue;const u=A.split(".")[0];let g=!0;for(const[h,d]of r.entries()){const[p,m]=h.split("-");if(p===u)for(const[_,f]of Object.entries(e.netConnMap)){if(!f)continue;const[I,C]=_.split("-");if(C===c&&I&&I!==A){const y=e.chipPinMap[I];if(!y)continue;if(I.split(".")[0]===m&&!d.has(y.side)){g=!1;break}}}}if(g)n.set(A,c);else{const h=`${A}_opposite-strong-side-disconnected`;n.set(A,h),o.add(A)}}}for(const[s,a]of Object.entries(e.pinStrongConnMap)){if(!a)continue;const A=s.split("-");if(A.length===2&&A[0]&&A[1]){const c=n.get(A[0])||n.get(A[1]);c?(n.set(A[0],c),n.set(A[1],c)):(n.set(A[0],s),n.set(A[1],s))}}return{pinToNetworkMap:n,filteredPins:o}}var i1o=t=>{const e=t.flatMap(a=>[a.offset.x-a.size.x/2,a.offset.x+a.size.x/2]),n=t.flatMap(a=>[a.offset.y-a.size.y/2,a.offset.y+a.size.y/2]),o=e.length?Math.min(...e):0,i=e.length?Math.max(...e):0,r=n.length?Math.min(...n):0,s=n.length?Math.max(...n):0;return{minX:o,maxX:i,minY:r,maxY:s}},ile=.2,aj=1e-6,Ive=2,OH=(t,e)=>{const n=ta(t.offset,e.ccwRotationDegrees);return{x:e.x+n.x,y:e.y+n.y}},r1o=(t,e)=>{for(const[n,o]of Object.entries(t.netMap))if(o.isGround&&t.netConnMap[`${e}-${n}`])return!0;return!1},s1o=({chip:t,inputProblem:e,placement:n})=>{const[o,i]=t.pins,r=o&&e.chipPinMap[o],s=i&&e.chipPinMap[i];if(!r||!s)return!1;const a=ta(r.offset,n.ccwRotationDegrees),A=ta(s.offset,n.ccwRotationDegrees);return Math.abs(a.y-A.y)>Math.abs(a.x-A.x)},a1o=({chipId:t,chipPlacements:e,ignoredChipIds:n,inputProblem:o,minimumGap:i})=>{const r=o.chipMap[t],s=e[t];if(!r||!s)return!1;const a=dd(r.size,s.ccwRotationDegrees),A=Ey({center:s,width:a.x,height:a.y});for(const[c,l]of Object.entries(e)){if(n.has(c))continue;const u=o.chipMap[c];if(!u)continue;const g=dd(u.size,l.ccwRotationDegrees),h=Ey({center:l,width:g.x,height:g.y});if(EV(A,h)<i-aj)return!1}return!0},LN=({chipIds:t,clearanceGroupChipIds:e,dx:n,dy:o,chipPlacements:i,inputProblem:r,minimumOutsideGap:s})=>{const a=t.map(l=>i[l]).filter(l=>!!l);if(a.length!==t.length)return!1;for(const l of a)l.x+=n,l.y+=o;const A=new Set(e??t);if(t.every(l=>a1o({chipId:l,chipPlacements:i,ignoredChipIds:A,inputProblem:r,minimumGap:s??r.chipGap})))return!0;for(const l of a)l.x-=n,l.y-=o;return!1},hSt=({inputProblem:t,connectedPinsByPinId:e,chipPlacements:n,rigidChipGroups:o=[]})=>{const i=FN(t),r=Object.keys(t.chipMap).length;for(const s of Object.values(t.chipMap))if(!(s.pins.length<=Ive))for(const a of s.pins)for(const A of e[a]??[]){const c=i.get(A.pinId);if(!c||c.fixedPosition||c.pins.length!==Ive)continue;const l=t.chipPinMap[a],u=n[s.chipId],g=n[c.chipId];if(!l||!u||!g)continue;const h=OH(l,u),d=OH(A,g),p=Math.abs(h.x-d.x)<=aj,m=Math.abs(h.y-d.y)<=aj,_=s1o({chip:c,inputProblem:t,placement:g}),f=o.find(E=>E.includes(c.chipId)),I=f??[c.chipId];if(p&&_){if(f)continue;LN({chipIds:[c.chipId],dx:-ile,dy:0,chipPlacements:n,inputProblem:t});continue}const C=r===Ive&&_&&(c.isCapacitor||c.isResistor),y=c.pins.find(E=>E!==A.pinId),x=y&&r1o(t,y);m&&(C||x)&&LN({chipIds:I,dx:0,dy:-ile,chipPlacements:n,inputProblem:t})}},A1o=({groundedLoadPairs:t,inputProblem:e,chipPlacements:n})=>{for(const o of t){if(!o.mainPinId||!o.upperChip.isResistor)continue;const i=e.chipPinMap[o.upperInnerPinId],r=e.chipPinMap[o.lowerInnerPinId],s=n[o.upperChip.chipId],a=n[o.lowerChip.chipId];if(!i||!r||!s||!a)continue;const A=OH(i,s),c=OH(r,a);Math.abs(A.x-c.x)>aj||LN({chipIds:[o.upperChip.chipId],dx:-ile,dy:0,chipPlacements:n,inputProblem:e})}},c1o=({railLoadPairs:t,inputProblem:e,chipPlacements:n})=>{for(const o of t){const i=e.chipPinMap[o.mainPinId],r=e.chipPinMap[o.resistorMainPinId],s=n[o.mainChipId],a=n[o.resistor.chipId];if(!i||!r||!s||!a)continue;const A=OH(i,s),c=OH(r,a);Math.abs(A.y-c.y)>aj||LN({chipIds:[o.railComponent.chipId,o.resistor.chipId],dx:0,dy:ile,chipPlacements:n,inputProblem:e})}},pSt=.1,Cve=class extends Zf{partitionInputProblem;layout=null;pinIdToStronglyConnectedPins;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(!this.activeSubSolver){const t=o1o({inputProblem:this.partitionInputProblem,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}).pinToNetworkMap,e=this.createPackInput(t);this.activeSubSolver=new rj(e),this.activeSubSolver.MAX_ITERATIONS=this.MAX_ITERATIONS}if(this.activeSubSolver.step(),this.activeSubSolver.failed){this.failed=!0,this.error=`PackSolver2 failed: ${this.activeSubSolver.error}`;return}this.activeSubSolver.solved&&(this.layout=this.createLayoutFromPackingResult(this.activeSubSolver.packedComponents),this.solved=!0,this.activeSubSolver=null)}createPackInput(t){const e=Object.entries(this.partitionInputProblem.chipMap).map(([o,i])=>{const r=[];for(const c of i.pins){const l=this.partitionInputProblem.chipPinMap[c];if(!l)continue;const u=t.get(c)||`${c}_isolated`;r.push({padId:c,networkId:u,type:"rect",offset:{x:l.offset.x,y:l.offset.y},size:{x:pSt,y:pSt}})}const s=i1o(r),a={x:s.maxX-s.minX,y:s.maxY-s.minY};r.push({padId:`${o}_body`,networkId:`${o}_body_disconnected`,type:"rect",offset:{x:0,y:0},size:{x:Math.max(a.x,i.size.x),y:Math.max(a.y,i.size.y)}});const A=i.availableRotations?.[0]??0;return{componentId:o,pads:r,availableRotationDegrees:i.availableRotations??[0,90,180,270],...i.fixedPosition&&{isStatic:!0,center:i.fixedPosition,ccwRotationOffset:A}}});let n=this.partitionInputProblem.chipGap;return this.partitionInputProblem.partitionType==="decoupling_caps"&&(n=this.partitionInputProblem.decouplingCapsGap??n),{components:e,minGap:n,packOrderStrategy:"largest_to_smallest",packPlacementStrategy:"minimum_closest_sum_squared_distance"}}createLayoutFromPackingResult(t){const e={};for(const n of t){const o=n.componentId;e[o]={x:n.center.x,y:n.center.y,ccwRotationDegrees:n.ccwRotationDegrees??n.ccwRotationOffset??0}}return hSt({inputProblem:this.partitionInputProblem,connectedPinsByPinId:this.pinIdToStronglyConnectedPins,chipPlacements:e}),{chipPlacements:e,groupPlacements:{}}}visualize(){if(this.activeSubSolver&&!this.solved)return this.activeSubSolver.visualize();if(!this.layout){const t=pb(this.partitionInputProblem);return Vh(this.partitionInputProblem,t)}return Vh(this.partitionInputProblem,this.layout)}getConstructorParams(){return[this.partitionInputProblem]}},l1o=2,u1o=4,g1o=3,mSt=2,d1o=t=>{const e={};for(const[n,o]of Object.entries(t.chipMap))for(const i of o.pins)e[i]=n;return e},h1o=t=>{const e=[],n=new Set;for(const[o,i]of Object.entries(t.pinStrongConnMap)){if(!i)continue;const[r,s]=o.split("-");let a=`${r}|${s}`;s<r&&(a=`${s}|${r}`),!n.has(a)&&(n.add(a),e.push([r,s]))}return e},_St=(t,e)=>{for(const[n,o]of Object.entries(t.netConnMap))if(o&&n.startsWith(`${e}-`))return n.slice(e.length+1);return null},fSt=(t,e)=>{const n=ta(t,e);return Math.abs(n.x)>=Math.abs(n.y)?n.x>=0?"x+":"x-":n.y>=0?"y+":"y-"},p1o=(t,e)=>e==="x-"||e==="x+"?t.y:t.x,ISt=t=>{const e=d1o(t),n=h1o(t),o=new Set(n.flat()),i=new Map;for(const[l,u]of n){const g=e[l],h=e[u];!g||!h||g===h||(i.has(g)||i.set(g,[]),i.has(h)||i.set(h,[]),i.get(g).push({selfPin:l,otherPin:u,otherChip:h}),i.get(h).push({selfPin:u,otherPin:l,otherChip:g}))}const r=[];for(const l of i.values()){const u=new Map;for(const g of l){const h=u.get(g.selfPin)??[];h.push(g),u.set(g.selfPin,h)}for(const[g,h]of u){if(h.length<mSt)continue;const d=[g,...h.map(m=>m.otherPin)],p=new Map;for(const m of d){const _=e[m],f=t.chipMap[_];if(!_||f?.fixedPosition||f?.pins.length!==2)continue;const I=f.pins.find(y=>y!==m);if(!I||o.has(I))continue;const C=_St(t,I);C&&p.set(C,[...p.get(C)??[],_])}for(const m of p.values()){if(m.length<mSt)continue;const _=d.filter(x=>!m.includes(e[x]));if(_.length!==1)continue;const f=_[0],I=e[f];if(!I)continue;const C=t.chipMap[I],y=t.chipPinMap[f];!C||!y||r.push({mainChipId:I,side:fSt(y.offset,C.availableRotations?.[0]??0),passiveChipIds:m,mainChipPinIds:m.map(()=>f)})}}}const s=new Set(r.flatMap(l=>l.passiveChipIds)),a=[];for(const[l,u]of Object.entries(t.chipMap)){if(s.has(l)||u.pins.length!==l1o)continue;const g=i.get(l)??[];if(g.length!==1)continue;const{selfPin:h,otherPin:d,otherChip:p}=g[0],m=t.chipMap[p];if(!m||m.pins.length<u1o)continue;const _=u.pins.find(x=>x!==h);if(!_)continue;const f=_St(t,_);if(!f)continue;const I=m.availableRotations?.[0]??0,C=ta(t.chipPinMap[d].offset,I),y=fSt(t.chipPinMap[d].offset,I);a.push({passiveChipId:l,mainChipId:p,mainChipPinId:d,side:y,sharedNetId:f,edgeCoord:p1o(C,y)})}const A=new Map;for(const l of a){const u=`${l.mainChipId}|${l.side}|${l.sharedNetId}`,g=A.get(u)??[];g.push(l),A.set(u,g)}const c=[...r];for(const l of A.values())l.length<g1o||(l.sort((u,g)=>u.edgeCoord-g.edgeCoord),c.push({mainChipId:l[0].mainChipId,side:l[0].side,passiveChipIds:l.map(u=>u.passiveChipId),mainChipPinIds:l.map(u=>u.mainChipPinId)}));return c},GH=1e-6,m1o=16,_1o={"x-":{x:-1,y:0},"x+":{x:1,y:0},"y-":{x:0,y:-1},"y+":{x:0,y:1}},CSt=(t,e,n)=>n==="x"?Math.max(0,t.minX-e.maxX,e.minX-t.maxX):Math.max(0,t.minY-e.maxY,e.minY-t.maxY),f1o=class extends Zf{partitionInputProblem;layout=null;pinIdToStronglyConnectedPins;packingSolver=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(this.packingSolver||(this.packingSolver=new Cve({partitionInputProblem:this.partitionInputProblem,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}),this.activeSubSolver=this.packingSolver),this.packingSolver.step(),this.packingSolver.failed){this.failed=!0,this.error=this.packingSolver.error;return}this.packingSolver.solved&&this.packingSolver.layout&&(this.layout=this.alignPassiveGroups(this.packingSolver.layout),this.activeSubSolver=null,this.solved=!0)}alignPassiveGroups(t){const e={};for(const[o,i]of Object.entries(t.chipPlacements))e[o]={...i};const n=ISt(this.partitionInputProblem);for(const o of n)this.reflowPassiveGroup(e,o);return hSt({inputProblem:this.partitionInputProblem,connectedPinsByPinId:this.pinIdToStronglyConnectedPins,chipPlacements:e,rigidChipGroups:n.map(o=>o.passiveChipIds)}),{chipPlacements:e,groupPlacements:t.groupPlacements}}reflowPassiveGroup(t,e){const n=this.partitionInputProblem,o=n.chipGap,i=t[e.mainChipId];if(!i)return;const r=_1o[e.side],s=r.x!==0,a=this.boxFor(e.mainChipId,i),A=oD(a),c=e.mainChipPinIds.map(I=>{const C=ta(n.chipPinMap[I].offset,i.ccwRotationDegrees);return{x:i.x+C.x,y:i.y+C.y}});let l=A;if(c.length>0){const I=c.reduce((y,x)=>y+x.x,0),C=c.reduce((y,x)=>y+x.y,0);l={x:I/c.length,y:C/c.length}}const u=e.passiveChipIds.map(I=>dd(n.chipMap[I].size,t[I].ccwRotationDegrees)),g=[];let h=0;for(let I=0;I<u.length;I++)g[I]=h+u[I].x/2,h+=u[I].x+o;const d=Math.max(0,h-o);for(let I=0;I<g.length;I++)g[I]-=d/2;const p=Math.max(...u.map(I=>I.y)),m=new Set(e.passiveChipIds),_=[];if(s){const I=(a.maxX-a.minX)/2+o+d/2,C=A.x+r.x*I;let y=l.y;c.length>0&&(y=Math.min(...c.map(x=>x.y))),_.push({x:C,y:y-p/2}),_.push({x:C,y:l.y})}else{const I=(a.maxY-a.minY)/2+o+p/2;_.push({x:l.x,y:A.y+r.y*I})}const f=a.maxX-a.minX+d;for(const I of _){let C=0;for(let y=0;y<m1o;y++){const x={};for(let S=0;S<e.passiveChipIds.length;S++){const Q=e.passiveChipIds[S];x[Q]={x:I.x+C+g[S],y:I.y,ccwRotationDegrees:t[Q].ccwRotationDegrees}}const E=this.clearanceAdjustment(x,t,m,o);if(E===0){for(const S of e.passiveChipIds)t[S]=x[S];return}if(E===null)break;const B=C+E;if(Math.abs(B)>f)break;C=B}}}clearanceAdjustment(t,e,n,o){let i=0,r=0;for(const[s,a]of Object.entries(t)){const A=this.boxFor(s,a);for(const[c,l]of Object.entries(e)){if(n.has(c))continue;const u=this.boxFor(c,l);if(EV(A,u)>=o-GH)continue;const g=CSt(A,u,"y"),h=CSt(A,u,"x"),p=Math.sqrt(Math.max(0,o*o-g*g))-h;p<=GH||(oD(A).x>=oD(u).x?i=Math.max(i,p):r=Math.max(r,p))}}return i>GH&&r>GH?null:i>GH?i:r>GH?-r:0}boxFor(t,e){const n=this.partitionInputProblem.chipMap[t],o=dd(n.size,e.ccwRotationDegrees),i=[{x:e.x-o.x/2,y:e.y-o.y/2},{x:e.x+o.x/2,y:e.y+o.y/2}];for(const r of n.pins){const s=this.partitionInputProblem.chipPinMap[r];if(!s)continue;const a=ta(s.offset,e.ccwRotationDegrees);i.push({x:e.x+a.x,y:e.y+a.y})}return Oh(i)}visualize(){if(this.activeSubSolver&&!this.solved)return this.activeSubSolver.visualize();if(!this.layout){const t=pb(this.partitionInputProblem);return Vh(this.partitionInputProblem,t)}return Vh(this.partitionInputProblem,this.layout)}getConstructorParams(){return[this.partitionInputProblem]}},ySt=(t,e)=>{if(t.pins.length!==2)return null;const[n,o]=t.pins.map(a=>e.chipPinMap[a]);if(!n||!o)return null;const i=t.availableRotations?.[0]??0,r=ta(n.offset,i),s=ta(o.offset,i);return Math.abs(r.y-s.y)>=Math.abs(r.x-s.x)?"y":"x"},I1o=t=>{if(t.partitionType!=="decoupling_caps")return!1;const e=Object.values(t.chipMap);if(e.length<2)return!1;let n=null;for(const o of e){if(o.fixedPosition)return!1;const i=ySt(o,t);if(!i||n&&n!==i)return!1;n=i}return n!==null},C1o=class extends Zf{partitionInputProblem;layout=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem}getRotation(t){return t.availableRotations?.[0]??0}isOnRailNet(t){const e=this.partitionInputProblem,n=aSt({inputProblem:e,netIds:Object.keys(e.netMap)});return n?e.netConnMap[`${t}-${n}`]===!0:!1}getRailOffset(t,e){const n=t.pins.find(i=>this.isOnRailNet(i));if(!n)return 0;const o=this.partitionInputProblem.chipPinMap[n];return o?-ta(o.offset,this.getRotation(t))[e]:0}_step(){const t=this.partitionInputProblem,e=Object.values(t.chipMap),n=ySt(e[0],t);let o="y";n==="y"&&(o="x");const i=t.decouplingCapsGap??t.chipGap,r=e.map(g=>dd(g.size,this.getRotation(g))[o]),s=r.reduce((g,h)=>g+h,0)+i*(e.length-1),a={};let A=-s/2,c=1;const l=t.decouplingMainChipSide;(o==="x"&&l==="x-"||o==="y"&&l==="y-")&&(A=s/2,c=-1),e.forEach((g,h)=>{const d=r[h],p={x:0,y:0,ccwRotationDegrees:this.getRotation(g)};p[o]=A+c*d/2,p[n]=this.getRailOffset(g,n),a[g.chipId]=p,A+=c*(d+i)}),this.layout={chipPlacements:a,groupPlacements:{}},this.solved=!0}visualize(){return Vh(this.partitionInputProblem,this.layout??{chipPlacements:{}})}getConstructorParams(){return[{partitionInputProblem:this.partitionInputProblem}]}},YH=t=>t.availableRotations?.length?t.availableRotations:[0],y1o=(t,e,n)=>{let o=YH(t)[0],i=-1/0;for(const r of YH(t)){const s=n.chipPinMap[e[0]],a=n.chipPinMap[e[1]];if(!s||!a)continue;const A=ta(s.offset,r),c=ta(a.offset,r),l=Math.abs(A.x-c.x)-Math.abs(A.y-c.y);l>i&&(i=l,o=r)}return o},x1o=(t,e,n,o)=>{let i=YH(t)[0],r=-1/0;for(const s of YH(t)){const a=o.chipPinMap[e],A=o.chipPinMap[n];if(!a||!A)continue;const c=ta(a.offset,s),l=ta(A.offset,s),u=c.y-l.y-Math.abs(c.x-l.x);u>r&&(r=u,i=s)}return i},E1o=(t,e,n)=>{const o=t.pins.find(s=>s!==e);let i=YH(t)[0],r=-1/0;for(const s of YH(t)){const a=n.chipPinMap[e],A=o&&n.chipPinMap[o];if(!a||!A)continue;const c=ta(a.offset,s),l=ta(A.offset,s),u=l.y-c.y-Math.abs(l.x-c.x);u>r&&(r=u,i=s)}return i},B1o=t=>t.partitionType!=="crystal_circuit"||!t.crystalCircuitGroup?!1:Object.values(t.chipMap).every(e=>e.fixedPosition===void 0),b1o=class extends Zf{partitionInputProblem;layout=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem}_step(){const t=this.partitionInputProblem,e=t.crystalCircuitGroup,n=t.chipMap[e.crystalChipId],o=y1o(n,e.activeCrystalPinIds,t),i=dd(n.size,o),r=t.chipGap,s={[n.chipId]:{x:0,y:0,ccwRotationDegrees:o}},a=new Map;for(const g of e.activeCrystalPinIds){const h=t.chipPinMap[g];a.set(g,ta(h.offset,o))}const A=a.get(e.activeCrystalPinIds[0]),c=a.get(e.activeCrystalPinIds[1]);let l;Math.abs(A.x-c.x)>=Math.abs(A.y-c.y)?l="x":l="y";const u=e.loadCaps.map((g,h)=>{const d=t.chipMap[g.chipId],p=x1o(d,g.signalPinId,g.groundPinId,t),m=dd(d.size,p),_=ta(t.chipPinMap[g.signalPinId].offset,p),f=ta(t.chipPinMap[g.groundPinId].offset,p),I=e.activeCrystalPinIds[h],C=a.get(I),y=-i.y/2-r-m.y/2;return{chip:d,rotation:p,size:m,signalOffset:_,groundOffset:f,crystalPinOffset:C,highestGroundY:y+f.y}});if(l==="x"){const g=Math.min(...u.map(I=>I.highestGroundY));for(const I of u)s[I.chip.chipId]={x:I.crystalPinOffset.x-I.signalOffset.x,y:g-I.groundOffset.y,ccwRotationDegrees:I.rotation};const[h,d]=[...u].sort((I,C)=>s[I.chip.chipId].x-s[C.chip.chipId].x),p=s[h.chip.chipId],m=s[d.chip.chipId],_=m.x-d.size.x/2-(p.x+h.size.x/2),f=Math.max(0,(r*2-_)/2);p.x-=f,m.x+=f}else u.forEach((g,h)=>{let d;h===0?d=-1:d=1,s[g.chip.chipId]={x:d*(i.x/2+r+g.size.x/2),y:g.crystalPinOffset.y-g.signalOffset.y,ccwRotationDegrees:g.rotation}});for(const g of e.seriesResistors){const h=t.chipMap[g.chipId],d=E1o(h,g.connectedPinId,t),p=dd(h.size,d),m=ta(t.chipPinMap[g.connectedPinId].offset,d),_=a.get(g.crystalPinId);s[h.chipId]={x:_.x-m.x,y:i.y/2+r+p.y/2,ccwRotationDegrees:d}}this.layout={chipPlacements:s,groupPlacements:{}},this.solved=!0}visualize(){return Vh(this.partitionInputProblem,this.layout??{chipPlacements:{}})}getConstructorParams(){return[{partitionInputProblem:this.partitionInputProblem}]}},Aj=2,S1o=t=>{const e=new Map;for(const i of Object.values(t.chipMap))for(const r of i.pins)e.set(r,i.chipId);const n=sj(t),o=new Map;for(const[i,r]of Object.entries(n)){const s=e.get(i);if(s)for(const a of r){const A=e.get(a.pinId);if(!A||A===s)continue;const c=o.get(s)??[];c.push({selfPinId:i,otherPinId:a.pinId,otherChipId:A}),o.set(s,c)}}return o},Q1o=({inputProblem:t,connectionsByChip:e,mainChipId:n,startChipId:o,endChipId:i})=>{if(o===i)return null;const r=A=>{const c=t.chipMap[A];return A!==n&&c?.pins.length===Aj&&!c.fixedPosition};if(!r(o)||!r(i))return null;const s=[[o]],a=new Set([o]);for(;s.length>0;){const A=s.shift(),c=A[A.length-1];if(c===i)return A;for(const l of e.get(c)??[]){const u=l.otherChipId;!r(u)||a.has(u)||(a.add(u),s.push([...A,u]))}}return null},v1o=({inputProblem:t,connectionsByChip:e,mainChipId:n,mainPinIds:o,pathChipIds:i})=>{const r=[];for(let s=0;s<i.length;s++){const a=i[s],A=t.chipMap[a],c=e.get(a)??[];if(!A||c.length!==Aj||new Set(c.map(d=>d.selfPinId)).size!==Aj)return null;const l=s===0?n:i[s-1],u=s===i.length-1?n:i[s+1],g=c.find(d=>d.otherChipId===l),h=c.find(d=>d.otherChipId===u);if(!g||!h||g.selfPinId===h.selfPinId||s===0&&g.otherPinId!==o[0]||s===i.length-1&&h.otherPinId!==o[1])return null;r.push({chipId:a,nearPinId:g.selfPinId,farPinId:h.selfPinId})}return r},xSt=t=>{const e=S1o(t),n=[],o=new Set;for(const i of Object.values(t.chipMap)){if(i.pins.length<=Aj)continue;const r=e.get(i.chipId)??[];for(let s=0;s<r.length;s++){const a=r[s],A=t.chipPinMap[a.selfPinId];if(A)for(let c=s+1;c<r.length;c++){const l=r[c],u=t.chipPinMap[l.selfPinId];if(!u||A.side!==u.side||a.selfPinId===l.selfPinId)continue;const g=Q1o({inputProblem:t,connectionsByChip:e,mainChipId:i.chipId,startChipId:a.otherChipId,endChipId:l.otherChipId});if(!g||g.length<Aj||g.length%2!==0||g.some(f=>o.has(f)))continue;const h=[a.selfPinId,l.selfPinId],d=v1o({inputProblem:t,connectionsByChip:e,mainChipId:i.chipId,mainPinIds:h,pathChipIds:g});if(!d)continue;const p=d.length/2,m=d.slice(0,p),_=d.slice(p).reverse().map(f=>({chipId:f.chipId,nearPinId:f.farPinId,farPinId:f.nearPinId}));n.push({mainChipId:i.chipId,mainPinIds:h,branches:[m,_]});for(const f of g)o.add(f)}}}return n},w1o=[0,90,180,270],ESt=1e-6,$v=(t,e)=>t.x*e.x+t.y*e.y,P1o=({outwardCoordinate:t,tangentCoordinate:e,axes:n})=>({x:n.outward.x*t+n.tangent.x*e,y:n.outward.y*t+n.tangent.y*e}),M1o=({pinOffset:t})=>Math.abs(t.x)>=Math.abs(t.y)?{outward:Jk(t.x>=0?"right":"left"),tangent:Jk("up")}:{outward:Jk(t.y>=0?"up":"down"),tangent:Jk("right")},BSt=({size:t,axis:e})=>(Math.abs(e.x)*t.x+Math.abs(e.y)*t.y)/2,D1o=({chip:t,nearPinId:e,farPinId:n,inputProblem:o,outward:i,originalRotation:r})=>{const s=o.chipPinMap[e],a=o.chipPinMap[n];if(!s||!a)return r;const A=t.availableRotations??w1o;let c=A[0]??0,l=Number.NEGATIVE_INFINITY;for(const u of A){const g=ta(s.offset,u),h=ta(a.offset,u),d=$v({x:h.x-g.x,y:h.y-g.y},i);(d>l||d===l&&u===r)&&(l=d,c=u)}return c},rle=({chip:t,placement:e})=>{const n=dd(t.size,e.ccwRotationDegrees);return Ey({center:e,width:n.x,height:n.y})},bSt=({branch:t,mainPinId:e,mainChip:n,mainPlacement:o,inputProblem:i,axes:r,originalPlacements:s,extraGap:a})=>{const A=i.chipPinMap[e];if(!A)return null;const c=dd(n.size,o.ccwRotationDegrees),l=ta(A.offset,o.ccwRotationDegrees),u={x:o.x+l.x,y:o.y+l.y};let g=$v(o,r.outward)+BSt({size:c,axis:r.outward});g=Math.max(g,$v(u,r.outward));let h=$v(u,r.tangent);const d={};let p=g;for(const m of t){const _=i.chipMap[m.chipId],f=s[m.chipId],I=i.chipPinMap[m.nearPinId],C=i.chipPinMap[m.farPinId];if(!_||!f||!I||!C)return null;const y=D1o({chip:_,nearPinId:m.nearPinId,farPinId:m.farPinId,inputProblem:i,outward:r.outward,originalRotation:f.ccwRotationDegrees}),x=dd(_.size,y),E=BSt({size:x,axis:r.outward}),B=ta(I.offset,y),S=ta(C.offset,y),Q=g+i.chipGap+a+E,w=h-$v(B,r.tangent),M=P1o({outwardCoordinate:Q,tangentCoordinate:w,axes:r});d[_.chipId]={...M,ccwRotationDegrees:y},g=Q+E,h=w+$v(S,r.tangent),p=Q+$v(S,r.outward)}return{placements:d,terminalOutwardCoordinate:p}},SSt=({branchLayout:t,shift:e,tangent:n})=>{for(const o of Object.values(t.placements))o.x+=n.x*e,o.y+=n.y*e},QSt=({branchLayout:t,inputProblem:e,tangent:n})=>{const o=Oh(Object.entries(t.placements).flatMap(([i,r])=>{const s=rle({chip:e.chipMap[i],placement:r});return[{x:s.minX,y:s.minY},{x:s.maxX,y:s.maxY}]}));return o?Math.abs(n.x)>=Math.abs(n.y)?{min:o.minX,max:o.maxX}:{min:o.minY,max:o.maxY}:{min:0,max:0}},N1o=({candidatePlacements:t,originalPlacements:e,inputProblem:n})=>{const o=new Set(Object.keys(t)),i=Object.entries(t);for(let r=0;r<i.length;r++){const[s,a]=i[r],A=n.chipMap[s];if(!A)return!1;const c=rle({chip:A,placement:a});for(let l=r+1;l<i.length;l++){const[u,g]=i[l],h=n.chipMap[u];if(!h||EV(c,rle({chip:h,placement:g}))<n.chipGap-ESt)return!1}for(const[l,u]of Object.entries(e)){if(o.has(l))continue;const g=n.chipMap[l];if(!g||EV(c,rle({chip:g,placement:u}))<n.chipGap-ESt)return!1}}return!0},R1o=({group:t,chipPlacements:e,inputProblem:n})=>{const o=n.chipMap[t.mainChipId],i=e[t.mainChipId],r=n.chipPinMap[t.mainPinIds[0]];if(!o||!i||!r)return null;const s=ta(r.offset,i.ccwRotationDegrees),a=M1o({pinOffset:s}),A=t.branches.map((p,m)=>({branch:p,mainPinId:t.mainPinIds[m]})).sort((p,m)=>{const _=f=>{const I=n.chipPinMap[f],C=ta(I.offset,i.ccwRotationDegrees);return $v({x:i.x+C.x,y:i.y+C.y},a.tangent)};return _(p.mainPinId)-_(m.mainPinId)});let c=A.map(({branch:p,mainPinId:m})=>bSt({branch:p,mainPinId:m,mainChip:o,mainPlacement:i,inputProblem:n,axes:a,originalPlacements:e,extraGap:0}));if(c.some(p=>!p))return null;const l=Math.max(...c.map(p=>p.terminalOutwardCoordinate));if(c=A.map(({branch:p,mainPinId:m},_)=>{const f=c[_],I=(l-f.terminalOutwardCoordinate)/p.length;return bSt({branch:p,mainPinId:m,mainChip:o,mainPlacement:i,inputProblem:n,axes:a,originalPlacements:e,extraGap:I})}),c.some(p=>!p))return null;const u=QSt({branchLayout:c[0],inputProblem:n,tangent:a.tangent}),g=QSt({branchLayout:c[1],inputProblem:n,tangent:a.tangent}),h=Math.max(0,u.max+n.chipGap-g.min);SSt({branchLayout:c[0],shift:-h/2,tangent:a.tangent}),SSt({branchLayout:c[1],shift:h/2,tangent:a.tangent});const d=Object.assign({},c[0].placements,c[1].placements);return N1o({candidatePlacements:d,originalPlacements:e,inputProblem:n})?d:null},T1o=t=>xSt(t).length>0,k1o=class extends Zf{partitionInputProblem;layout=null;pinIdToStronglyConnectedPins;packingSolver=null;constructor(t){super(),this.partitionInputProblem=t.partitionInputProblem,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(this.packingSolver||(this.packingSolver=new Cve({partitionInputProblem:this.partitionInputProblem,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}),this.activeSubSolver=this.packingSolver),this.packingSolver.step(),this.packingSolver.failed){this.failed=!0,this.error=this.packingSolver.error;return}this.packingSolver.solved&&this.packingSolver.layout&&(this.layout=this.refinePackedLayout(this.packingSolver.layout),this.activeSubSolver=null,this.solved=!0)}refinePackedLayout(t){const e={};for(const[n,o]of Object.entries(t.chipPlacements))e[n]={...o};for(const n of xSt(this.partitionInputProblem)){const o=R1o({group:n,chipPlacements:e,inputProblem:this.partitionInputProblem});o&&Object.assign(e,o)}return{chipPlacements:e,groupPlacements:t.groupPlacements}}visualize(){if(this.activeSubSolver&&!this.solved)return this.activeSubSolver.visualize();if(!this.layout){const t=pb(this.partitionInputProblem);return Vh(this.partitionInputProblem,t)}return Vh(this.partitionInputProblem,this.layout)}getConstructorParams(){return[this.partitionInputProblem]}};function cj(t,e,n,o){return{solverName:t,solverClass:e,appliesTo:n,getConstructorParams:o}}var F1o=[cj("crystalCircuitLayoutSolver",b1o,B1o,t=>[{partitionInputProblem:t.partitions[t.currentPartitionIndex]}]),cj("decouplingCapRowSolver",C1o,I1o,t=>[{partitionInputProblem:t.partitions[t.currentPartitionIndex]}]),cj("parallelAlignedPassiveSolver",f1o,t=>ISt(t).length>0,t=>[{partitionInputProblem:t.partitions[t.currentPartitionIndex],pinIdToStronglyConnectedPins:t.pinIdToStronglyConnectedPins}]),cj("parallelSeriesBranchSolver",k1o,T1o,t=>[{partitionInputProblem:t.partitions[t.currentPartitionIndex],pinIdToStronglyConnectedPins:t.pinIdToStronglyConnectedPins}]),cj("singleInnerPartitionPackingSolver",Cve,()=>!0,t=>[{partitionInputProblem:t.partitions[t.currentPartitionIndex],pinIdToStronglyConnectedPins:t.pinIdToStronglyConnectedPins}])],L1o=class extends Zf{partitions;packedPartitions=[];completedSolvers=[];activeSolver=null;currentPartitionIndex=0;pinIdToStronglyConnectedPins;constructor(t){super(),this.partitions=t.partitions,this.pinIdToStronglyConnectedPins=t.pinIdToStronglyConnectedPins}_step(){if(this.currentPartitionIndex>=this.partitions.length){this.solved=!0;return}if(!this.activeSolver){const t=this.partitions[this.currentPartitionIndex],e=F1o.find(o=>o.appliesTo(t)),n=e.getConstructorParams(this);this.activeSolver=new e.solverClass(...n),this.activeSubSolver=this.activeSolver}if(this.activeSolver.step(),this.activeSolver.failed){this.failed=!0,this.error=`Partition ${this.currentPartitionIndex} failed: ${this.activeSolver.error}`;return}if(this.activeSolver.solved){if(this.completedSolvers.push(this.activeSolver),this.activeSolver.layout)this.packedPartitions.push({inputProblem:this.partitions[this.currentPartitionIndex],layout:this.activeSolver.layout});else{this.failed=!0,this.error=`Partition ${this.currentPartitionIndex} completed but has no layout`;return}this.activeSolver=null,this.activeSubSolver=null,this.currentPartitionIndex++}}visualize(){if(this.activeSolver)return this.activeSolver.visualize();if(this.completedSolvers.length===0){const n=this.partitions.map(i=>{const r=pb(i);return Vh(i,r)}),o=this.partitions.map((i,r)=>`partition${r}`);return zce(n,{titles:o})}const t=this.completedSolvers.map(n=>n.visualize()),e=this.completedSolvers.map((n,o)=>`packed_partition_${o}`);return zce(t,{titles:e})}getConstructorParams(){return[this.partitions]}},yve=1e-6,vSt=2,wSt=["x+","y+","x-","y-"],sle=(t,e)=>t===e?0:t<e?-1:1,PSt=(t,e)=>{const n=(Math.round(e/90)%4+4)%4,o=wSt.indexOf(t);return wSt[(o+n)%4]},ale=(t,e,n)=>{const o=t.chipPinMap[e],i=ta(o.offset,n.ccwRotationDegrees);return{x:n.x+i.x,y:n.y+i.y}},H1o=(t,e)=>t.distanceSquared-e.distanceSquared||Math.abs(t.yDelta)-Math.abs(e.yDelta)||sle(t.anchorChipId,e.anchorChipId)||sle(t.anchorPinId,e.anchorPinId)||sle(t.resistorPinId,e.resistorPinId),O1o=(t,e,n,o)=>{const i=o[e],r=o[t.anchorChipId];if(!i||!r)return!0;const s=ale(n,t.resistorPinId,i),a=ale(n,t.anchorPinId,r);return Object.entries(o).some(([A,c])=>{if(A===e||A===t.anchorChipId)return!1;const l=n.chipMap[A];if(!l)return!1;const u=dd(l.size,c.ccwRotationDegrees);return Exe(s,a,Ey({center:c,width:u.x,height:u.y}))})},G1o=({inputProblem:t,chipPlacements:e,pinToNetworkMap:n})=>{const o=FN(t),i=new Map;for(const[s,a]of n){const A=i.get(a)??[];A.push(s),i.set(a,A)}const r=Object.values(t.chipMap).filter(s=>s.isResistor&&!s.fixedPosition&&s.pins.length===vSt).sort((s,a)=>sle(s.chipId,a.chipId));for(const s of r){const a=e[s.chipId];if(!a)continue;const A=[];for(const u of s.pins){const g=t.chipPinMap[u],h=n.get(u);if(!g||!h)continue;const d=PSt(g.side,a.ccwRotationDegrees);if(d!=="x-"&&d!=="x+")continue;const p=d==="x+"?1:-1,m=ale(t,u,a);for(const _ of i.get(h)??[]){const f=o.get(_);if(!f||f.chipId===s.chipId||f.pins.length!==vSt)continue;const I=t.chipPinMap[_],C=e[f.chipId];if(!I||!C)continue;const y=PSt(I.side,C.ccwRotationDegrees);if(d==="x-"&&y!=="x+"||d==="x+"&&y!=="x-")continue;const x=ale(t,_,C),E=x.x-m.x,B=x.y-m.y,S=E*p;S<=yve||Math.abs(B)<=yve||Math.abs(B)>S+yve||A.push({anchorChipId:f.chipId,anchorPinId:_,resistorPinId:u,yDelta:B,distanceSquared:E*E+B*B})}}A.sort(H1o);const c=A[0];if(!c)continue;const l=a.y;LN({chipIds:[s.chipId],dx:0,dy:c.yDelta,chipPlacements:e,inputProblem:t})&&O1o(c,s.chipId,t,e)&&(a.y=l)}},Y1o=class extends Zf{packedPartitions;inputProblem;finalLayout=null;packSolver2=null;pinToNetworkMap=null;constructor(t){super(),this.packedPartitions=t.packedPartitions,this.inputProblem=t.inputProblem}partitionHasFixedChip(t){const e=this.packedPartitions[t];return e?Object.values(e.inputProblem.chipMap).some(n=>n.fixedPosition!==void 0):!1}_step(){try{if(this.packedPartitions.length===0){this.finalLayout={chipPlacements:{},groupPlacements:{}},this.solved=!0;return}if(this.packedPartitions.length===1){this.finalLayout=this.packedPartitions[0].layout,this.solved=!0;return}const t=this.organizePackedPartitions();if(!this.packSolver2){const e=this.createPackInput(t);this.packSolver2=new rj(e),this.activeSubSolver=this.packSolver2}if(this.packSolver2.step(),this.packSolver2.failed){this.failed=!0,this.error=`PackSolver2 failed: ${this.packSolver2.error}`;return}if(this.packSolver2.solved){const e=this.applyPackingResult(this.packSolver2.packedComponents,t);this.finalLayout=e,this.solved=!0,this.activeSubSolver=null}}catch(t){this.failed=!0,this.error=`Failed to pack partitions: ${t}`}}buildConnectivityMap(){const t=new Map;for(const e of this.packedPartitions){for(const[n,o]of Object.entries(e.inputProblem.netConnMap)){if(!o)continue;const[i,r]=n.split("-");i&&r&&t.set(i,r)}for(const[n,o]of Object.entries(e.inputProblem.pinStrongConnMap)){if(!o)continue;const i=n.split("-");if(i.length===2&&i[0]&&i[1]){const r=t.get(i[0])||t.get(i[1]);r?(t.set(i[0],r),t.set(i[1],r)):(t.set(i[0],n),t.set(i[1],n))}}}return t}getConnectivityMap(){return this.pinToNetworkMap??=this.buildConnectivityMap(),this.pinToNetworkMap}organizePackedPartitions(){const t=[];for(let e=0;e<this.packedPartitions.length;e++){const n=this.packedPartitions[e],o=Object.keys(n.layout.chipPlacements);if(o.length>0){let i=1/0,r=-1/0,s=1/0,a=-1/0;for(const A of o){const c=n.layout.chipPlacements[A],l=n.inputProblem.chipMap[A];let u=l.size.x,g=l.size.y;(c.ccwRotationDegrees===90||c.ccwRotationDegrees===270)&&([u,g]=[g,u]);const h=c.x-u/2,d=c.x+u/2,p=c.y-g/2,m=c.y+g/2;i=Math.min(i,h),r=Math.max(r,d),s=Math.min(s,p),a=Math.max(a,m)}t.push({partitionIndex:e,chipIds:o,bounds:{minX:i,maxX:r,minY:s,maxY:a}})}}return t}createPackInput(t){const e=this.getConnectivityMap();return{components:t.map(o=>{const i=this.packedPartitions[o.partitionIndex],r=this.partitionHasFixedChip(o.partitionIndex),s=o.bounds.maxX-o.bounds.minX,a=o.bounds.maxY-o.bounds.minY,A=(o.bounds.minX+o.bounds.maxX)/2,c=(o.bounds.minY+o.bounds.maxY)/2,l=[{padId:`partition_${o.partitionIndex}_body`,networkId:`partition_${o.partitionIndex}_disconnected`,type:"rect",offset:{x:0,y:0},size:{x:Math.max(s,.1),y:Math.max(a,.1)}}],u=new Set;for(const g of o.chipIds){const h=i.layout.chipPlacements[g],d=i.inputProblem.chipMap[g];for(const p of d.pins){const m=i.inputProblem.chipPinMap[p];if(!m)continue;let _={x:m.offset.x,y:m.offset.y};const f=h.ccwRotationDegrees??0;f===90?_={x:-m.offset.y,y:m.offset.x}:f===180?_={x:-m.offset.x,y:-m.offset.y}:f===270&&(_={x:m.offset.y,y:-m.offset.x});const I=h.x+_.x,C=h.y+_.y,y=e.get(p)??`${p}_disconnected`;u.has(y)||(u.add(y),l.push({padId:`${o.partitionIndex}_pin_${p}`,networkId:y,type:"rect",offset:{x:I-A,y:C-c},size:{x:.01,y:.01}}))}}return{componentId:`partition_${o.partitionIndex}`,pads:l,availableRotationDegrees:[0],...r&&{isStatic:!0,center:{x:A,y:c},ccwRotationOffset:0}}}),minGap:this.inputProblem.partitionGap,packOrderStrategy:"largest_to_smallest",packPlacementStrategy:"minimum_sum_squared_distance_to_network"}}applyPackingResult(t,e){const n={};for(const i of t){const r=parseInt(i.componentId.replace("partition_","")),s=e.find(A=>A.partitionIndex===r),a=this.packedPartitions[r];if(s&&a){const A=(s.bounds.minX+s.bounds.maxX)/2,c=(s.bounds.minY+s.bounds.maxY)/2,l=i.center.x,u=i.center.y,g=l-A,h=u-c;for(const d of s.chipIds){const p=a.layout.chipPlacements[d];n[d]={x:p.x+g,y:p.y+h,ccwRotationDegrees:p.ccwRotationDegrees}}}}const o={chipPlacements:n,groupPlacements:{}};return G1o({inputProblem:this.inputProblem,chipPlacements:o.chipPlacements,pinToNetworkMap:this.getConnectivityMap()}),o}getCombinedPackedPartitionsProblem(){const t={chipMap:{},chipPinMap:{},pinStrongConnMap:{},netMap:{},netConnMap:{},chipGap:this.inputProblem.chipGap,partitionGap:this.inputProblem.partitionGap};for(const e of this.packedPartitions)Object.assign(t.chipMap,e.inputProblem.chipMap),Object.assign(t.chipPinMap,e.inputProblem.chipPinMap),Object.assign(t.pinStrongConnMap,e.inputProblem.pinStrongConnMap),Object.assign(t.netMap,e.inputProblem.netMap),Object.assign(t.netConnMap,e.inputProblem.netConnMap);return t}getCombinedPackedPartitionsLayout(){const t={};for(const e of this.packedPartitions)Object.assign(t,e.layout.chipPlacements);return{chipPlacements:t,groupPlacements:{}}}visualize(){return this.packSolver2&&!this.solved?this.packSolver2.visualize():this.finalLayout?Vh(this.getCombinedPackedPartitionsProblem(),this.finalLayout):this.packedPartitions.length===0?super.visualize():Vh(this.getCombinedPackedPartitionsProblem(),this.getCombinedPackedPartitionsLayout())}getConstructorParams(){return{packedPartitions:this.packedPartitions,inputProblem:this.inputProblem}}},U1o=.2,MSt=(t,e)=>e.y+ta(t.offset,e.ccwRotationDegrees).y,Ale=({upperPin:t,upperPlacement:e,lowerPin:n,lowerPlacement:o})=>MSt(t,e)-MSt(n,o)-U1o,DSt=({chipId:t,side:e},n)=>n.chipMap[t]?.pins.filter(i=>!e||n.chipPinMap[i]?.side===e).map(i=>n.chipPinMap[i]).find(i=>i&&Object.values(n.netMap).some(r=>r.isPositiveVoltageSource&&n.netConnMap[`${i.pinId}-${r.netId}`])),xve=(t,{inputProblem:e,layout:n})=>{const o=n.chipPlacements[t],i=e.chipMap[t];if(!o||!i)return null;const r=dd(i.size,o.ccwRotationDegrees);return Ey({center:o,width:r.x,height:r.y})},NSt=(t,e)=>{const n=t.flatMap(o=>{const i=xve(o,e);return i?[{x:i.minX,y:i.minY},{x:i.maxX,y:i.maxY}]:[]});return Oh(n)},K1o=({mainPartition:t,mainChipId:e,side:n},o)=>{const i=new Set(o.chipMap[e]?.pins.filter(s=>o.chipPinMap[s]?.side===n)),r=FN(t.inputProblem);for(const[s,a]of Object.entries(o.pinStrongConnMap)){if(!a)continue;const[A,c]=s.split("-"),l=i.has(A)?c:i.has(c)?A:null;if(!l)continue;const u=r.get(l);if(u?.chipId!==e&&u)return u.chipId}return null},V1o=({partitionA:t,partitionB:e},n)=>{const o=new Set(Object.keys(t.inputProblem.chipPinMap)),i=new Set(Object.keys(e.inputProblem.chipPinMap));return Object.entries(n.pinStrongConnMap).some(([r,s])=>{if(!s)return!1;const[a,A]=r.split("-");return o.has(a)&&i.has(A)||o.has(A)&&i.has(a)})},z1o=(t,e)=>{const n=new Set(t);return t.some(o=>{const i=xve(o,e);return Object.keys(e.layout.chipPlacements).some(r=>{if(!i||n.has(r))return!1;const s=xve(r,e);return s?z4(i,s):!1})})},J1o=({side:t,chipGap:e,mainBounds:n,rowBounds:o,neighbor:i})=>{const r=oD(o),s={x:i.x-r.x,y:i.y-r.y};return t==="x+"&&(s.x=n.maxX+e-o.minX),t==="x-"&&(s.x=n.minX-e-o.maxX),t==="y+"&&(s.y=n.maxY+e-o.minY),t==="y-"&&(s.y=n.minY-e-o.maxY),s},W1o=({layout:t,decouplingPartition:e},{inputProblem:n,packedPartitions:o})=>{const i=e.inputProblem,r=i.decouplingMainChipId,s=i.decouplingMainChipSide;if(i.partitionType!=="decoupling_caps"||!r||!s)return;const a=o.find(f=>f!==e&&f.inputProblem.chipMap[r]);if(!a||V1o({partitionA:e,partitionB:a},n))return;const A=K1o({mainPartition:a,mainChipId:r,side:s},n);let c=t.chipPlacements[r];A&&(c=t.chipPlacements[A]);const l=Object.keys(i.chipMap),u={inputProblem:n,layout:t},g=NSt(Object.keys(a.inputProblem.chipMap),u),h=NSt(l,u);if(!c||!g||!h)return;if(!A){const f=l[0],I=DSt({chipId:r,side:s},n),C=f&&DSt({chipId:f},n),y=f&&t.chipPlacements[f];if(!I||!C||!y)return;c={...c,y:c.y+Ale({upperPin:I,upperPlacement:c,lowerPin:C,lowerPlacement:{...y,y:c.y}})}}let d=n.chipGap;A||(d=n.partitionGap);const p=J1o({side:s,chipGap:d,mainBounds:g,rowBounds:h,neighbor:c}),m=pA(p.x,p.y),_=new Map;for(const f of l){const I=t.chipPlacements[f];I&&(_.set(f,I),t.chipPlacements[f]={...I,...Bn(m,I)})}if(z1o(l,u))for(const[f,I]of _)t.chipPlacements[f]=I},j1o=class extends Zf{constructor(t){super(),this.options=t}options;outputLayout=null;_step(){this.outputLayout=structuredClone(this.options.inputLayout);for(const t of this.options.packedPartitions)W1o({layout:this.outputLayout,decouplingPartition:t},this.options);this.solved=!0}visualize(){return Vh(this.options.inputProblem,this.outputLayout??this.options.inputLayout)}getConstructorParams(){return[this.options]}},$1o=[0,90,180,270],RSt=0,cle=.5,TSt=({chip:t,upperPinId:e,lowerPinId:n,inputProblem:o})=>{const i=o.chipPinMap[e],r=o.chipPinMap[n];if(!i||!r)return RSt;const s=t.availableRotations??$1o;let a=RSt,A=Number.NEGATIVE_INFINITY;for(const c of s){const l=ta(i.offset,c),u=ta(r.offset,c),g=l.y-u.y;g<=A||(A=g,a=c)}return a},q1o=({railLoadPairs:t,inputProblem:e,inputLayout:n})=>{const o=structuredClone(n),{chipPlacements:i}=o,r=new Map;for(const s of t){const a=r.get(s.mainChipId)??[];a.push(s),r.set(s.mainChipId,a)}for(const s of r.values()){let a;for(const A of s){const c=i[A.railComponent.chipId],l=i[A.resistor.chipId],u=i[A.mainChipId],g=e.chipPinMap[A.mainPinId];if(!c||!l||!u||!g)continue;const h=TSt({chip:A.railComponent,upperPinId:A.railPinId,lowerPinId:A.railComponentResistorPinId,inputProblem:e}),d=TSt({chip:A.resistor,upperPinId:A.resistorRailComponentPinId,lowerPinId:A.resistorMainPinId,inputProblem:e}),p=dd(A.railComponent.size,h),m=dd(A.resistor.size,d),_=p.y*cle+e.chipGap+m.y*cle,f=ta(g.offset,u.ccwRotationDegrees),I=e.chipPinMap[A.resistorMainPinId];if(!I)continue;const C=ta(I.offset,d);let y=(c.x+l.x)*cle;const x=u.y+f.y-C.y,E=x+_;i[A.railComponent.chipId]={x:y,y:E,ccwRotationDegrees:h},i[A.resistor.chipId]={x:y,y:x,ccwRotationDegrees:d};const B=Math.max(p.x,m.x)*cle,S=y-B,Q=y+B;if(a!==void 0){const w=a+e.partitionGap-S;y+=w,i[A.railComponent.chipId].x=y,i[A.resistor.chipId].x=y,a=Q+w;continue}a=Q}}return c1o({railLoadPairs:t,inputProblem:e,chipPlacements:i}),o},kSt=2,FSt=({connectedPinsByPinId:t,pinId:e})=>(t[e]??[]).map(n=>n.pinId),X1o=({inputProblem:t,pinId:e})=>{for(const[n,o]of Object.entries(t.netMap))if(o.isPositiveVoltageSource&&t.netConnMap[`${e}-${n}`])return!0;return!1},Z1o=(t,e)=>{const{inputProblem:n,pinOwnerMap:o,connectedPinsByPinId:i}=e;for(const r of t.pins){const s=FSt({connectedPinsByPinId:i,pinId:r}).find(g=>{const h=o.get(g);return h?h.pins.length>kSt&&!h.isCrystal:!1});if(!s)continue;const a=o.get(s);if(!a)continue;const A=t.pins.find(g=>g!==r);if(!A)continue;const c=FSt({connectedPinsByPinId:i,pinId:A}).find(g=>{const h=o.get(g);return!h||h.pins.length!==kSt?!1:!h.isResistor&&!h.isCapacitor&&!h.fixedPosition});if(!c)continue;const l=o.get(c);if(!l)continue;const u=l.pins.find(g=>g!==c&&X1o({inputProblem:n,pinId:g}));if(u)return{railComponent:l,resistor:t,railPinId:u,railComponentResistorPinId:c,resistorRailComponentPinId:A,resistorMainPinId:r,mainChipId:a.chipId,mainPinId:s}}return null},eIo=t=>{const e={inputProblem:t,pinOwnerMap:FN(t),connectedPinsByPinId:sj(t)},n=[];for(const o of Object.values(t.chipMap)){if(!o.isResistor||o.fixedPosition)continue;const i=Z1o(o,e);i&&n.push(i)}return n},tIo=class extends Zf{constructor(t){super(),this.params=t}params;outputLayout=null;_step(){const t=eIo(this.params.inputProblem);this.outputLayout=q1o({railLoadPairs:t,inputProblem:this.params.inputProblem,inputLayout:this.params.inputLayout}),this.solved=!0}visualize(){let t=this.params.inputLayout;return this.outputLayout&&(t=this.outputLayout),Vh(this.params.inputProblem,t)}getConstructorParams(){return[this.params]}},qv=2,lle=({connectedPinsByPinId:t,pinId:e})=>(t[e]??[]).map(n=>n.pinId),ule=({inputProblem:t,pinId:e})=>{const n=[];for(const o of Object.keys(t.netMap))t.netConnMap[`${e}-${o}`]&&n.push(o);return n},LSt=({inputProblem:t,netId:e})=>{const n=[];for(const o of Object.keys(t.chipPinMap))t.netConnMap[`${o}-${e}`]&&n.push(o);return n},Eve=({lowerChip:t,lowerInnerPinId:e,inputProblem:n})=>{for(const o of t.pins){if(o===e)continue;const i=ule({inputProblem:n,pinId:o}).find(r=>n.netMap[r]?.isGround===!0);if(i)return{groundPinId:o,groundNetId:i}}return null},nIo=({inputProblem:t,pinId:e})=>ule({inputProblem:t,pinId:e}).some(n=>t.netMap[n]?.isPositiveVoltageSource===!0),HSt=({upperInnerPinId:t},e)=>{const{inputProblem:n,pinOwnerMap:o,connectedPinsByPinId:i,pairedChipIds:r}=e;for(const s of lle({connectedPinsByPinId:i,pinId:t})){const a=o.get(s);if(!a||a.pins.length!==qv||a.fixedPosition||r.has(a.chipId))continue;const A=Eve({lowerChip:a,lowerInnerPinId:s,inputProblem:n});if(A)return{lowerChip:a,lowerInnerPinId:s,...A}}return null},oIo=(t,e)=>{const{inputProblem:n,pinOwnerMap:o,connectedPinsByPinId:i,pairedChipIds:r}=e;for(const s of t.pins){const a=lle({connectedPinsByPinId:i,pinId:s}).find(h=>{const d=o.get(h);return d?d.pins.length>qv&&!d.isCrystal:!1});if(!a)continue;const A=o.get(a);if(!A)continue;const c=t.pins.find(h=>h!==s);if(!c)continue;const l=lle({connectedPinsByPinId:i,pinId:c}).map(h=>o.get(h)).find(h=>!h||h.pins.length!==qv||h.chipId===t.chipId||h.fixedPosition?!1:!r.has(h.chipId));if(!l)continue;const u=l.pins.find(h=>lle({connectedPinsByPinId:i,pinId:h}).some(d=>o.get(d)?.chipId===t.chipId));if(!u)continue;const g=Eve({lowerChip:l,lowerInnerPinId:u,inputProblem:n});if(g)return{upperChip:t,lowerChip:l,mainChipId:A.chipId,mainPinId:a,upperOuterPinId:s,upperInnerPinId:c,lowerInnerPinId:u,...g}}return null},iIo=(t,e)=>{const{inputProblem:n,pinOwnerMap:o,pairedChipIds:i}=e,r=t.pins.find(h=>nIo({inputProblem:n,pinId:h}));if(!r)return null;const s=t.pins.find(h=>h!==r);if(!s)return null;const a=HSt({upperInnerPinId:s},e);if(a)return{upperChip:t,upperOuterPinId:r,upperInnerPinId:s,...a};const A=ule({inputProblem:n,pinId:s}).find(h=>{const d=n.netMap[h];return!d?.isGround&&!d?.isPositiveVoltageSource});if(!A)return null;const c=LSt({inputProblem:n,netId:A});if(c.length!==qv)return null;const l=c.find(h=>h!==s);if(!l)return null;const u=o.get(l);if(!u||u.pins.length!==qv||u.fixedPosition||i.has(u.chipId))return null;const g=Eve({lowerChip:u,lowerInnerPinId:l,inputProblem:n});return g?{upperChip:t,lowerChip:u,upperOuterPinId:r,upperInnerPinId:s,lowerInnerPinId:l,...g}:null},rIo=(t,e)=>{const{inputProblem:n}=e;for(const o of t.pins){if(!ule({inputProblem:n,pinId:o}).some(a=>{const A=n.netMap[a];return A?.isGround||A?.isPositiveVoltageSource?!1:LSt({inputProblem:n,netId:a}).length===1}))continue;const r=t.pins.find(a=>a!==o);if(!r)continue;const s=HSt({upperInnerPinId:r},e);if(s)return{upperChip:t,upperOuterPinId:o,upperInnerPinId:r,...s,isStandaloneSignalChain:!0}}return null},sIo=t=>{const e=FN(t),n=[],o=new Set,i=sj(t),r={inputProblem:t,pinOwnerMap:e,connectedPinsByPinId:i,pairedChipIds:o};for(const s of Object.values(t.chipMap)){if(s.pins.length!==qv||s.isCrystal||s.fixedPosition||o.has(s.chipId))continue;const a=oIo(s,r);a&&(n.push(a),o.add(a.upperChip.chipId),o.add(a.lowerChip.chipId))}for(const s of Object.values(t.chipMap)){if(s.pins.length!==qv||s.isCrystal||s.fixedPosition||o.has(s.chipId))continue;const a=rIo(s,r);a&&(n.push(a),o.add(a.upperChip.chipId),o.add(a.lowerChip.chipId))}for(const s of Object.values(t.chipMap)){if(s.pins.length!==qv||s.isCrystal||s.fixedPosition||o.has(s.chipId))continue;const a=iIo(s,r);a&&(n.push(a),o.add(a.upperChip.chipId),o.add(a.lowerChip.chipId))}return n},aIo=[0,90,180,270],OSt=0,Bve=.5,GSt=({chip:t,upperPinId:e,lowerPinId:n,inputProblem:o})=>{const i=o.chipPinMap[e],r=o.chipPinMap[n];if(!i||!r)return OSt;let s=aIo;t.availableRotations&&(s=t.availableRotations);let a=OSt,A=Number.NEGATIVE_INFINITY;for(const c of s){const l=ta(i.offset,c),u=ta(r.offset,c),g=l.y-u.y;g<=A||(A=g,a=c)}return a},bve=({chip:t,placement:e})=>{const n=dd(t.size,e.ccwRotationDegrees);return Ey({center:e,width:n.x,height:n.y})},AIo=({groundedLoadPair:t,chipPlacements:e,inputProblem:n})=>{const o=e[t.upperChip.chipId],i=e[t.lowerChip.chipId];if(!o||!i)return;const r=bve({chip:t.upperChip,placement:o}),s=bve({chip:t.lowerChip,placement:i}),a=Oh([{x:r.minX,y:r.minY},{x:r.maxX,y:r.maxY},{x:s.minX,y:s.minY},{x:s.maxX,y:s.maxY}]);if(!a)return;let A=0;for(const[c,l]of Object.entries(e)){if(c===t.upperChip.chipId||c===t.lowerChip.chipId)continue;const u=n.chipMap[c];if(!u)continue;const g=bve({chip:u,placement:l});if(a.maxX+n.chipGap<=g.minX||a.minX-n.chipGap>=g.maxX||g.maxY<=a.maxY)continue;const d=a.maxY+n.chipGap-g.minY;A=Math.max(A,d)}o.y-=A,i.y-=A},cIo=({groundedLoadPair:t,chipPlacements:e,inputProblem:n})=>{const o=e[t.upperChip.chipId],i=e[t.lowerChip.chipId];if(!o||!i)return;const r=GSt({chip:t.upperChip,upperPinId:t.upperOuterPinId,lowerPinId:t.upperInnerPinId,inputProblem:n}),s=GSt({chip:t.lowerChip,upperPinId:t.lowerInnerPinId,lowerPinId:t.groundPinId,inputProblem:n}),a=dd(t.upperChip.size,r),A=dd(t.lowerChip.size,s),c=a.y*Bve+n.chipGap+A.y*Bve,l=n.chipPinMap[t.upperInnerPinId],u=n.chipPinMap[t.lowerInnerPinId];if(!l||!u)return;const g=ta(l.offset,r),h=ta(u.offset,s),d=Oh([o,i]);if(!d)return;const p=oD(d),m={x:p.x-g.x,y:p.y+c*Bve,ccwRotationDegrees:r},_=t.mainPinId;if(_){const f=t.mainChipId;if(!f)return;const I=e[f];if(!I)return;const C=n.chipPinMap[t.upperOuterPinId],y=n.chipPinMap[_];if(!C||!y)return;const x=ta(C.offset,o.ccwRotationDegrees),E=ta(C.offset,r);m.x=o.x+x.x-E.x,m.y=o.y+x.y-E.y,m.y+=Ale({upperPin:y,upperPlacement:I,lowerPin:C,lowerPlacement:m})}e[t.upperChip.chipId]=m,e[t.lowerChip.chipId]={x:m.x+g.x-h.x,y:m.y-c,ccwRotationDegrees:s},AIo({groundedLoadPair:t,chipPlacements:e,inputProblem:n})},YSt=2,Xv=(t,e)=>{const{chipPlacements:n}=e,o=n[t.upperChip.chipId],i=n[t.lowerChip.chipId],r=mb({placement:o,size:t.upperChip.size}),s=mb({placement:i,size:t.lowerChip.size});return{minX:Math.min(r.minX,s.minX),maxX:Math.max(r.maxX,s.maxX),minY:Math.min(r.minY,s.minY),maxY:Math.max(r.maxY,s.maxY)}},USt=(t,e)=>{const{chipPlacements:n,inputProblem:o}=e,i=n[t.lowerChip.chipId],r=o.chipPinMap[t.groundPinId],s=ta(r.offset,i.ccwRotationDegrees);return i.y+s.y},gle=({groundedLoadPair:t,dx:e,dy:n},o)=>{const{chipPlacements:i}=o;for(const r of[t.upperChip.chipId,t.lowerChip.chipId]){const s=i[r];s.x+=e,s.y+=n}},dle=(t,e)=>Xv(t,e).minX,KSt=(t,e)=>{const n=t.map(o=>Xv(o,e));return{minX:Math.min(...n.map(o=>o.minX)),maxX:Math.max(...n.map(o=>o.maxX)),minY:Math.min(...n.map(o=>o.minY)),maxY:Math.max(...n.map(o=>o.maxY))}},VSt=(t,e,n)=>t.maxY+n<=e.minY||e.maxY+n<=t.minY,lIo=(t,e,n)=>{const{inputProblem:o}=n,i=Xv(t,n),r=Xv(e,n),s=i.maxX+o.chipGap<=r.minX||r.maxX+o.chipGap<=i.minX,a=VSt(i,r,o.chipGap);return!s&&!a},uIo=(t,e)=>{const n=new Set(t),o=[];for(;n.size>0;){const i=n.values().next().value;if(!i)break;n.delete(i);const r=[i];for(let s=0;s<r.length;s++){const a=r[s];for(const A of[...n])lIo(a,A,e)&&(n.delete(A),r.push(A))}r.length>=YSt&&o.push(r)}return o},gIo=(t,e)=>{const{inputProblem:n}=e,o=[...t].sort((a,A)=>dle(a,e)-dle(A,e)),i=o.map(a=>USt(a,e)),r=Math.min(...i);for(const a of o){const A=USt(a,e);gle({groundedLoadPair:a,dx:0,dy:r-A},e)}let s;for(const a of o){const A=Xv(a,e);if(s===void 0){s=A.maxX;continue}const c=s+n.partitionGap-A.minX;gle({groundedLoadPair:a,dx:c,dy:0},e),s=A.maxX+c}},dIo=(t,e)=>{const{inputProblem:n}=e,o=[...t].sort((A,c)=>dle(A,e)-dle(c,e)),i=KSt(o,e),r=[];for(const A of o){const c=Xv(A,e);let l=c.minX;for(const u of r){const g=Xv(u,e);VSt(g,c,n.chipGap)||(l=Math.max(l,g.maxX+n.chipGap))}gle({groundedLoadPair:A,dx:l-c.minX,dy:0},e),r.push(A)}const s=KSt(o,e),a=(i.minX+i.maxX-s.minX-s.maxX)/2;for(const A of o)gle({groundedLoadPair:A,dx:a,dy:0},e)},hIo=({groundedLoadPairs:t,chipPlacements:e,inputProblem:n})=>{const o={chipPlacements:e,inputProblem:n},i=new Map;for(const s of t){if(!e[s.upperChip.chipId]||!e[s.lowerChip.chipId]||!n.chipPinMap[s.groundPinId])continue;const a=i.get(s.groundNetId)??new Map,A=a.get(s.mainChipId)??[];A.push(s),a.set(s.mainChipId,A),i.set(s.groundNetId,a)}for(const s of i.values())for(const a of s.values()){if(a.length<YSt)continue;if(!(a[0].mainChipId!==void 0)){gIo(a,o);continue}for(const c of uIo(a,o))dIo(c,o)}const r=_Io({groundedLoadPairs:t,chipPlacements:e,inputProblem:n});A1o({groundedLoadPairs:t.filter(s=>!r.has(s)),chipPlacements:e,inputProblem:n})},pIo={"x-":{x:-1,y:0},"x+":{x:1,y:0},"y-":{x:0,y:-1},"y+":{x:0,y:1}},mIo=2,_Io=({inputProblem:t,chipPlacements:e,groundedLoadPairs:n})=>{const o=new Set,i=new Set(n);for(const r of i){if(!r.mainChipId||!r.mainPinId)continue;const s=t.chipPinMap[r.mainPinId],a=n.filter(g=>g.mainChipId===r.mainChipId&&g.mainPinId&&t.chipPinMap[g.mainPinId].side===s.side);if(a.length<mIo)continue;const A=e[r.mainChipId],c=ta(pIo[s.side],A.ccwRotationDegrees);if(c.x===0)continue;a.sort((g,h)=>{const d=ta(t.chipPinMap[g.mainPinId].offset,A.ccwRotationDegrees);return(ta(t.chipPinMap[h.mainPinId].offset,A.ccwRotationDegrees).y-d.y)*c.x});const l=mb({placement:A,size:t.chipMap[r.mainChipId].size});let u;for(const g of a){i.delete(g);const h=t.chipPinMap[g.mainPinId],d=[g.upperChip.chipId,g.lowerChip.chipId],p=a.filter(x=>x===g||i.has(x)).flatMap(x=>[x.upperChip.chipId,x.lowerChip.chipId]),m=e[g.upperChip.chipId],_=Ale({upperPin:h,upperPlacement:A,lowerPin:t.chipPinMap[g.upperOuterPinId],lowerPlacement:m}),{minX:f,maxX:I}=Xv(g,{chipPlacements:e});let C=Math.max(0,l.maxX+t.chipGap-f);c.x<0&&(C=Math.min(0,l.minX-t.chipGap-I)),u!==void 0&&(c.x<0?C=Math.min(C,u-t.chipGap-I):C=Math.max(C,u+t.chipGap-f));const y=[C];for(const[x,E]of Object.entries(e)){if(p.includes(x))continue;const B=mb({placement:E,size:t.chipMap[x].size});let S=B.maxX+t.chipGap-f;c.x<0&&(S=B.minX-t.chipGap-I),!(S*c.x<C*c.x)&&y.push(S)}y.sort((x,E)=>Math.abs(x)-Math.abs(E));for(const x of y)if(LN({chipIds:d,clearanceGroupChipIds:p,dx:x,dy:_,chipPlacements:e,inputProblem:t})){o.add(g),u=I+x,c.x<0&&(u=f+x);break}}}return o},fIo=class extends Zf{constructor(t){super(),this.params=t}params;outputLayout=null;groundedLoadPairs=[];_step(){const t={};for(const[e,n]of Object.entries(this.params.inputLayout.chipPlacements))t[e]={...n};this.groundedLoadPairs=sIo(this.params.inputProblem);for(const e of this.groundedLoadPairs)cIo({groundedLoadPair:e,chipPlacements:t,inputProblem:this.params.inputProblem});hIo({groundedLoadPairs:this.groundedLoadPairs,chipPlacements:t,inputProblem:this.params.inputProblem}),this.outputLayout={chipPlacements:t,groupPlacements:{...this.params.inputLayout.groupPlacements}},this.solved=!0}visualize(){let t=this.params.inputLayout;return this.outputLayout&&(t=this.outputLayout),Vh(this.params.inputProblem,t)}getConstructorParams(){return[this.params]}},IIo=t=>{const e=Object.values(t.inputProblem.chipMap);return e.length>1&&e.every(n=>n.pins.length===2&&!n.isCapacitor&&!n.fixedPosition)},CIo=({groundedLoadPairs:t,packedPartitions:e})=>{const o=e.filter(IIo).map(r=>({chipIds:Object.keys(r.inputProblem.chipMap)})),i=new Set(o.flatMap(r=>r.chipIds));for(const r of t){if(r.mainChipId||r.isStandaloneSignalChain)continue;const s=[r.upperChip.chipId,r.lowerChip.chipId];if(!s.some(a=>i.has(a))){o.push({chipIds:s});for(const a of s)i.add(a)}}return o},hle=({chipId:t},e)=>{const n=e.inputProblem.chipMap[t],o=e.layout.chipPlacements[t];if(!n||!o)return null;const i=dd(n.size,o.ccwRotationDegrees);return Ey({center:o,width:i.x,height:i.y})},Sve=({chipIds:t},e)=>Oh(t.flatMap(n=>{const o=hle({chipId:n},e);return o?[{x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY}]:[]})),zSt=({chipIds:t,railNetIds:e},n)=>{let o=null;for(const i of t){const r=n.inputProblem.chipMap[i];if(!r)continue;const s=n.layout.chipPlacements[r.chipId];if(s)for(const a of r.pins){if(![...e].some(g=>n.inputProblem.netConnMap[`${a}-${g}`]))continue;const c=n.inputProblem.chipPinMap[a];if(!c)continue;const l=ta(c.offset,s.ccwRotationDegrees),u=s.y+l.y;(o===null||u>o.y)&&(o={chipId:r.chipId,y:u})}}return o},JSt=({chipIds:t},{inputProblem:e})=>{const n=new Set;for(const o of t){const i=e.chipMap[o];if(i)for(const r of i.pins)for(const[s,a]of Object.entries(e.netMap))!a.isGround&&!a.isPositiveVoltageSource||e.netConnMap[`${r}-${s}`]&&n.add(s)}return n},yIo=(t,e)=>t.size>=2&&t.size===e.size&&[...t].every(n=>e.has(n)),xIo=({chipIds:t,offset:e},{layout:n})=>{const o=new Map;for(const i of t){const r=n.chipPlacements[i];r&&(o.set(i,r),n.chipPlacements[i]={...r,x:r.x+e.x,y:r.y+e.y})}return o},EIo=({movedChipIds:t},e)=>{const n=new Set(t);return t.some(o=>{const i=hle({chipId:o},e);return i?Object.keys(e.layout.chipPlacements).some(r=>{if(n.has(r))return!1;const s=hle({chipId:r},e);return s?z4(i,s):!1}):!1})},BIo=t=>{const{groundedLoadPairs:e,inputProblem:n,packedPartitions:o}=t,i=structuredClone(t.inputLayout),r={inputProblem:n,layout:i},s=o.filter(c=>c.inputProblem.partitionType==="decoupling_caps"),a=CIo({groundedLoadPairs:e,packedPartitions:o}),A=new Set;for(const c of s){const l=JSt({chipIds:Object.keys(c.inputProblem.chipMap)},r),u=Object.keys(c.inputProblem.chipMap),g=Sve({chipIds:u},r);if(!g)continue;const h=zSt({chipIds:u,railNetIds:l},r);if(!h)continue;let d=g.maxX;for(const p of a){if(A.has(p))continue;const m=JSt({chipIds:p.chipIds},r);if(!yIo(l,m))continue;const _=p.chipIds;if(!Sve({chipIds:_},r))continue;const I=zSt({chipIds:_,railNetIds:m},r);if(!I)continue;const C=hle({chipId:I.chipId},r);if(!C)continue;const y=xIo({chipIds:_,offset:{x:d+n.partitionGap-C.minX,y:h.y-I.y}},r);if(EIo({movedChipIds:_},r)){for(const[E,B]of y)i.chipPlacements[E]=B;continue}const x=Sve({chipIds:_},r);x&&(d=x.maxX),A.add(p)}}return i},bIo=class extends Zf{constructor(t){super(),this.options=t}options;outputLayout=null;_step(){this.outputLayout=BIo(this.options),this.solved=!0}visualize(){return Vh(this.options.inputProblem,this.outputLayout??this.options.inputLayout)}getConstructorParams(){return[this.options]}},WSt=(t,e)=>Object.keys(e.netMap).filter(n=>e.netConnMap[`${t}-${n}`]),jSt=(t,e)=>new Set(t.pins.flatMap(n=>WSt(n,e))),$St=({chipId:t,railNetId:e},n)=>{const o=n.chipMap[t]?.pins.find(i=>WSt(i,n).includes(e));return o?n.chipPinMap[o]??null:null},ple=(t,{inputProblem:e,layout:n})=>{const o=e.chipMap[t],i=n.chipPlacements[t];return!o||!i?null:mb({placement:i,size:o.size})},qSt=(t,e)=>t.reduce((n,o)=>n+e.chipPlacements[o].x,0)/t.length,SIo=({groundNetId:t,railNetId:e},{inputProblem:n,layout:o})=>Object.values(n.chipMap).filter(i=>{if(!i.isCapacitor||i.fixedPosition||i.pins.length!==2||!o.chipPlacements[i.chipId])return!1;const r=jSt(i,n);return r.size===2&&r.has(t)&&r.has(e)}).map(i=>i.chipId),QIo=(t,e)=>{const{inputProblem:n,layout:o}=e;if(t.fixedPosition||t.pins.length!==3)return null;const i=o.chipPlacements[t.chipId];if(!i)return null;const r=[...jSt(t,n)],s=r.filter(u=>n.netMap[u]?.isGround),a=r.filter(u=>n.netMap[u]?.isPositiveVoltageSource);if(s.length!==1||a.length!==2)return null;const A=a.map(u=>({railNetId:u,capacitorChipIds:SIo({groundNetId:s[0],railNetId:u},e)}));if(A.some(u=>u.capacitorChipIds.length===0))return null;const c=A.find(u=>qSt(u.capacitorChipIds,o)<i.x),l=A.find(u=>qSt(u.capacitorChipIds,o)>i.x);return!c||!l?null:(c.capacitorChipIds.sort((u,g)=>o.chipPlacements[u].x-o.chipPlacements[g].x),l.capacitorChipIds.sort((u,g)=>o.chipPlacements[u].x-o.chipPlacements[g].x),{regulatorChipId:t.chipId,left:c,right:l})},XSt=({group:t,regulatorChipId:e,startX:n,xDirection:o},i)=>{const{inputProblem:r,layout:s}=i,a=s.chipPlacements[e],A=$St({chipId:e,railNetId:t.railNetId},r);if(!a||!A)return!1;const c=[...t.capacitorChipIds];o<0&&c.reverse();const l=r.decouplingCapsGap??r.chipGap;let u=n;for(const g of c){const h=s.chipPlacements[g],d=ple(g,i),p=$St({chipId:g,railNetId:t.railNetId},r);if(!h||!d||!p)return!1;const m=d.maxX-d.minX;s.chipPlacements[g]={...h,x:u+o*m/2,y:h.y+Ale({upperPin:A,upperPlacement:a,lowerPin:p,lowerPlacement:h})},u+=o*(m+l)}return!0},vIo=(t,e)=>{const n=ple(t.regulatorChipId,e);return!n||!XSt({group:t.left,regulatorChipId:t.regulatorChipId,startX:n.minX-e.inputProblem.chipGap,xDirection:-1},e)?!1:XSt({group:t.right,regulatorChipId:t.regulatorChipId,startX:n.maxX+e.inputProblem.chipGap,xDirection:1},e)},wIo=(t,e)=>{const{inputProblem:n,layout:o}=e,i=new Set(t),r=t.map(g=>ple(g,e)),s=Math.min(...r.map(g=>g.minX)),a=Math.min(...r.map(g=>g.minY)),A=Math.max(...r.map(g=>g.maxX)),c=Math.max(...r.map(g=>g.maxY)),l=(s+A)/2;let u=0;for(const g of Object.keys(o.chipPlacements)){if(i.has(g))continue;const h=ple(g,e);!h||(h.minX+h.maxX)/2<=l||Math.max(h.minY-c,a-h.maxY,0)>=n.partitionGap||(u=Math.min(u,h.minX-n.partitionGap-A))}return u},PIo=(t,e)=>{const n=structuredClone(e),o={inputProblem:t,layout:n},i=Object.values(t.chipMap).map(A=>QIo(A,o)).find(A=>A!==null);if(!i)return n;const r=[...i.left.capacitorChipIds,i.regulatorChipId,...i.right.capacitorChipIds];if(!vIo(i,o))return e;const a=wIo(r,o);return LN({chipIds:r,clearanceGroupChipIds:r,dx:a,dy:0,chipPlacements:n.chipPlacements,inputProblem:t,minimumOutsideGap:t.partitionGap})?n:e},MIo=class extends Zf{constructor(t){super(),this.params=t}params;outputLayout=null;_step(){this.outputLayout=PIo(this.params.inputProblem,this.params.inputLayout),this.solved=!0}visualize(){let t=this.params.inputLayout;return this.outputLayout&&(t=this.outputLayout),Vh(this.params.inputProblem,t)}getConstructorParams(){return[this.params]}};function J5(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var ZSt=class extends Zf{getSolverName(){return"LayoutPipelineSolver"}identifyCrystalCircuitsSolver;identifyDecouplingCapsSolver;chipPartitionsSolver;packInnerPartitionsSolver;partitionPackingSolver;groundedLoadPairSolver;alignPowerGroundRowsSolver;alignTestPointsSolver;placeNetOnlyDecouplingRowsSolver;placeRailConnectedLoadsSolver;alignChipConnectedRailLoadsSolver;alignRegulatorCapacitorRowSolver;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;firstIterationOfPhase;pinIdToStronglyConnectedPins;inputProblem;chipPartitions;packedPartitions;pipelineDef=[J5("identifyCrystalCircuitsSolver",Rfo,()=>[this.inputProblem]),J5("identifyDecouplingCapsSolver",Nfo,()=>[this.inputProblem],{onSolved:t=>{}}),J5("chipPartitionsSolver",vfo,()=>[{inputProblem:this.inputProblem,decouplingCapGroups:this.identifyDecouplingCapsSolver?.outputDecouplingCapGroups,crystalCircuitGroups:this.identifyCrystalCircuitsSolver?.outputCrystalCircuitGroups}],{onSolved:t=>{this.chipPartitions=this.chipPartitionsSolver.partitions}}),J5("packInnerPartitionsSolver",L1o,()=>[{partitions:this.chipPartitions,pinIdToStronglyConnectedPins:this.pinIdToStronglyConnectedPins}],{onSolved:t=>{this.packedPartitions=this.packInnerPartitionsSolver.packedPartitions}}),J5("partitionPackingSolver",Y1o,()=>[{packedPartitions:this.packedPartitions||[],inputProblem:this.inputProblem}],{onSolved:t=>{}}),J5("alignPowerGroundRowsSolver",kfo,()=>[{inputProblem:this.inputProblem,inputLayout:this.partitionPackingSolver.finalLayout}]),J5("placeNetOnlyDecouplingRowsSolver",j1o,()=>[{inputProblem:this.inputProblem,packedPartitions:this.packedPartitions,inputLayout:this.alignPowerGroundRowsSolver.outputLayout}]),J5("groundedLoadPairSolver",fIo,()=>[{inputProblem:this.inputProblem,inputLayout:this.placeNetOnlyDecouplingRowsSolver.outputLayout}]),J5("placeRailConnectedLoadsSolver",bIo,()=>[{inputProblem:this.inputProblem,groundedLoadPairs:this.groundedLoadPairSolver.groundedLoadPairs,packedPartitions:this.packedPartitions,inputLayout:this.groundedLoadPairSolver.outputLayout}]),J5("alignChipConnectedRailLoadsSolver",tIo,()=>[{inputProblem:this.inputProblem,inputLayout:this.placeRailConnectedLoadsSolver.outputLayout}]),J5("alignRegulatorCapacitorRowSolver",MIo,()=>[{inputProblem:this.inputProblem,inputLayout:this.alignChipConnectedRailLoadsSolver.outputLayout??this.placeRailConnectedLoadsSolver.outputLayout}]),J5("alignTestPointsSolver",n1o,()=>[{inputProblem:this.inputProblem,inputLayout:this.alignRegulatorCapacitorRowSolver.outputLayout??this.alignChipConnectedRailLoadsSolver.outputLayout??this.placeRailConnectedLoadsSolver.outputLayout??this.groundedLoadPairSolver.outputLayout??this.placeNetOnlyDecouplingRowsSolver.outputLayout??this.alignPowerGroundRowsSolver.outputLayout??this.partitionPackingSolver.finalLayout}])];constructor(t){super(),this.inputProblem=t,this.MAX_ITERATIONS=1e6,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={},this.firstIterationOfPhase={},this.pinIdToStronglyConnectedPins=sj(t)}currentPipelineStepIndex=0;_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t){this.solved=!0;return}if(this.activeSubSolver){this.activeSubSolver.step(),this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now(),this.firstIterationOfPhase[t.solverName]=this.iterations}solveUntilPhase(t){for(;this.getCurrentPhase()!==t;)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();if(this.solved&&this.alignTestPointsSolver?.solved)return this.alignTestPointsSolver.visualize();if(this.solved&&this.placeNetOnlyDecouplingRowsSolver?.solved)return this.placeNetOnlyDecouplingRowsSolver.visualize();if(this.solved&&this.alignPowerGroundRowsSolver?.solved)return this.alignPowerGroundRowsSolver.visualize();if(this.solved&&this.groundedLoadPairSolver?.solved)return this.groundedLoadPairSolver.visualize();if(this.solved&&this.partitionPackingSolver?.solved)return this.partitionPackingSolver.visualize();const t=this.identifyCrystalCircuitsSolver?.visualize(),e=this.identifyDecouplingCapsSolver?.visualize(),n=this.chipPartitionsSolver?.visualize(),o=this.packInnerPartitionsSolver?.visualize(),i=this.partitionPackingSolver?.visualize(),r=this.groundedLoadPairSolver?.visualize(),s=this.alignPowerGroundRowsSolver?.visualize(),a=this.alignTestPointsSolver?.visualize(),A=this.placeNetOnlyDecouplingRowsSolver?.visualize(),c=pb(this.inputProblem),u=[Vh(this.inputProblem,c),t,e,n,o,i,r,s,A,a].filter(Boolean).map((g,h)=>{for(const d of g.rects??[])d.step=h;for(const d of g.points??[])d.step=h;for(const d of g.circles??[])d.step=h;for(const d of g.texts??[])d.step=h;for(const d of g.lines??[])d.step=h;return g});return u.length===1?u[0]:{points:u.flatMap(g=>g.points||[]),rects:u.flatMap(g=>g.rects||[]),lines:u.flatMap(g=>g.lines||[]),circles:u.flatMap(g=>g.circles||[]),texts:u.flatMap(g=>g.texts||[])}}preview(){return this.activeSubSolver?this.activeSubSolver.preview():this.alignTestPointsSolver?.solved?this.alignTestPointsSolver.visualize():this.placeNetOnlyDecouplingRowsSolver?.solved?this.placeNetOnlyDecouplingRowsSolver.visualize():this.alignPowerGroundRowsSolver?.solved?this.alignPowerGroundRowsSolver.visualize():this.partitionPackingSolver?.solved?this.partitionPackingSolver.visualize():this.packInnerPartitionsSolver?.solved?this.packInnerPartitionsSolver.visualize():this.chipPartitionsSolver?.solved?this.chipPartitionsSolver.visualize():this.identifyDecouplingCapsSolver?.solved?this.identifyDecouplingCapsSolver.visualize():this.identifyCrystalCircuitsSolver?.solved?this.identifyCrystalCircuitsSolver.visualize():super.preview()}checkForOverlaps(t){const e=[],n=Object.keys(t.chipPlacements);for(let o=0;o<n.length;o++)for(let i=o+1;i<n.length;i++){const r=n[o],s=n[i],a=t.chipPlacements[r],A=t.chipPlacements[s],c=this.inputProblem.chipMap[r],l=this.inputProblem.chipMap[s];if(!c||!l)continue;const u=this.getRotatedBounds(a,c.size),g=this.getRotatedBounds(A,l.size),h=this.calculateOverlapArea(u,g);h>0&&e.push({chip1:r,chip2:s,overlapArea:h})}return e}getRotatedBounds(t,e){const n=e.x/2,o=e.y/2,i=t.ccwRotationDegrees*Math.PI/180,r=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i)),a=n*r+o*s,A=n*s+o*r;return{minX:t.x-a,maxX:t.x+a,minY:t.y-A,maxY:t.y+A}}calculateOverlapArea(t,e){if(t.maxX<=e.minX||t.minX>=e.maxX||t.maxY<=e.minY||t.minY>=e.maxY)return 0;const n=Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX),o=Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY);return n*o}getOutputLayout(){if(!this.solved)throw new Error("Pipeline not solved yet. Call solve() or step() until solved.");let t;if(this.alignTestPointsSolver?.solved&&this.alignTestPointsSolver.outputLayout)t=this.alignTestPointsSolver.outputLayout;else if(this.placeNetOnlyDecouplingRowsSolver?.solved&&this.placeNetOnlyDecouplingRowsSolver.outputLayout)t=this.placeNetOnlyDecouplingRowsSolver.outputLayout;else if(this.alignPowerGroundRowsSolver?.solved&&this.alignPowerGroundRowsSolver.outputLayout)t=this.alignPowerGroundRowsSolver.outputLayout;else if(this.partitionPackingSolver?.solved&&this.partitionPackingSolver.finalLayout)t=this.partitionPackingSolver.finalLayout;else throw new Error("No layout available. Pipeline may have failed or not progressed far enough.");const e=this.checkForOverlaps(t);if(e.length>0){const n=e.map(o=>`${o.chip1} overlaps ${o.chip2} (area: ${o.overlapArea.toFixed(4)})`).join(", ");console.warn(`Warning: ${e.length} chip overlaps detected in final layout: ${n}`)}return t}},mle=class{netMap;idToNetMap;constructor(e){this.netMap=e,this.idToNetMap={};for(const[n,o]of Object.entries(e))for(const i of o)this.idToNetMap[i]=n}addConnections(e){for(const n of e){const o=new Set;for(const r of n){const s=this.idToNetMap[r];s&&o.add(s)}let i;if(o.size===0)i=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[i]=[];else if(o.size===1)i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{i=o.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const r of o)if(r!==i){const s=this.netMap[i],a=this.netMap[r];if(s&&a){s.push(...a),this.netMap[r]=s;for(const A of s)this.idToNetMap[A]=i}}}for(const r of n){const s=this.netMap[i];s&&!s.includes(r)&&s.push(r),this.idToNetMap[r]=i}}}getIdsConnectedToNet(e){return this.netMap[e]||[]}getNetConnectedToId(e){return this.idToNetMap[e]}areIdsConnected(e,n){if(e===n)return!0;const o=this.getNetConnectedToId(e);if(!o)return!1;const i=this.getNetConnectedToId(n);return i?o===i||i===e||i===e:!1}areAllIdsConnected(e){if(e.length===0)return!0;const n=this.getNetConnectedToId(e[0]);if(!n)return!1;for(const o of e){const i=this.getNetConnectedToId(o);if(i===void 0||i!==n)return!1}return!0}};class DIo{constructor(e=1/0,n=Float64Array,o=Uint32Array){const i=e!==1/0;this.ids=i?new o(e):[],this.values=i?new n(e):[],this.capacity=e,this.length=0}clear(){this.length=0}push(e,n){if(this.length===this.capacity)throw new RangeError("Queue is at capacity.");let o=this.length++;for(;o>0;){const i=o-1>>1,r=this.values[i];if(n>=r)break;this.ids[o]=this.ids[i],this.values[o]=r,o=i}this.ids[o]=e,this.values[o]=n}pop(){if(this.length===0)return;const e=this.ids,n=this.values,o=e[0],i=--this.length;if(i>0){const r=e[i],s=n[i];let a=0;const A=i>>1;for(;a<A;){const c=(a<<1)+1,l=c+1,u=c+(+(l<i)&+(n[l]<n[c]));if(n[u]>=s)break;e[a]=e[u],n[a]=n[u],a=u}e[a]=r,n[a]=s}return o}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){Array.isArray(this.ids)&&(this.ids.length=this.length),Array.isArray(this.values)&&(this.values.length=this.length)}}const eQt=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Qve=3;class UH{static from(e,n=0){if(n%8!==0)throw new Error("byteOffset must be 8-byte aligned.");if(!e||e.byteLength===void 0||"buffer"in e)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[o,i]=new Uint8Array(e,n+0,2);if(o!==251)throw new Error("Data does not appear to be in a Flatbush format.");const r=i>>4;if(r!==Qve)throw new Error(`Got v${r} data when expected v${Qve}.`);const s=eQt[i&15];if(!s)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,n+2,1),[A]=new Uint32Array(e,n+4,1);return new UH(A,a,s,void 0,e,n)}constructor(e,n=16,o=Float64Array,i=ArrayBuffer,r,s=0){if(e===void 0)throw new Error("Missing required argument: numItems.");if(isNaN(e)||e<=0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.byteOffset=s;let a=e,A=a;this._levelBounds=[a*4];do a=Math.ceil(a/this.nodeSize),A+=a,this._levelBounds.push(A*4);while(a!==1);this.ArrayType=o,this.IndexArrayType=A<16384?Uint16Array:Uint32Array;const c=eQt.indexOf(o),l=A*4*o.BYTES_PER_ELEMENT;if(c<0)throw new Error(`Unexpected typed array class: ${o}.`);const u=o,g=this.IndexArrayType;if(r)this.data=r,this._boxes=new u(r,s+8,A*4),this._indices=new g(r,s+8+l,A),this._pos=A*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const h=this.data=new i(8+l+A*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new u(h,8,A*4),this._indices=new g(h,8+l,A),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(h,0,2).set([251,(Qve<<4)+c]),new Uint16Array(h,2,1)[0]=n,new Uint32Array(h,4,1)[0]=e}this._queue=new DIo}add(e,n,o=e,i=n){const r=this._pos,s=r>>2,a=this._boxes;return this._indices[s]=s,a[r]=e,a[r+1]=n,a[r+2]=o,a[r+3]=i,this._pos=r+4,e<this.minX&&(this.minX=e),n<this.minY&&(this.minY=n),o>this.maxX&&(this.maxX=o),i>this.maxY&&(this.maxY=i),s}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);const e=this._boxes;if(this.numItems<=this.nodeSize){e[this._pos++]=this.minX,e[this._pos++]=this.minY,e[this._pos++]=this.maxX,e[this._pos++]=this.maxY;return}const{numItems:n,minX:o,minY:i,nodeSize:r,_indices:s,_levelBounds:a}=this,A=this.maxX-o||1,c=this.maxY-i||1,l=new Int32Array(n),u=65535,g=u/A,h=u/c;for(let p=0,m=0;p<n;p++){const _=e[m++],f=e[m++],I=e[m++],C=e[m++],y=g*((_+I)/2-o)|0,x=h*((f+C)/2-i)|0;l[p]=kIo(y,x)}RIo(l,e,s,0,n-1,r);let d=n*4;for(let p=0,m=0;p<a.length-1;p++){const _=a[p];for(;m<_;){const f=m;let I=e[m++],C=e[m++],y=e[m++],x=e[m++];for(let E=1;E<r&&m<_;E++)I=Math.min(I,e[m++]),C=Math.min(C,e[m++]),y=Math.max(y,e[m++]),x=Math.max(x,e[m++]);s[d>>2]=f,e[d++]=I,e[d++]=C,e[d++]=y,e[d++]=x}}this._pos=d}search(e,n,o,i,r){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");const{_boxes:s,_levelBounds:a,_indices:A,nodeSize:c}=this,l=this.numItems*4;let u=s.length-4,g=a.length-1;const h=[],d=[];let p=!1;for(;u!==void 0;){const m=Math.min(u+c*4,a[g]),_=u>=l;if(p)this._collectContained(u,m,g,l,d,r);else for(let f=u;f<m;f+=4){const I=s[f];if(o<I)continue;const C=s[f+1];if(i<C)continue;const y=s[f+2];if(e>y)continue;const x=s[f+3];if(n>x)continue;const E=A[f>>2]|0;if(_){const B=+(e<=I&&n<=C&&o>=y&&i>=x);h.push(E|B,g-1)}else(r===void 0||r(E,I,C,y,x))&&d.push(E)}g=h.pop(),u=h.pop(),u!==void 0&&(p=(u&1)===1,u&=-2)}return d}_collectContained(e,n,o,i,r,s){const a=this._boxes,A=this._indices;let c=e;for(let u=o;u>0;u--)c=A[c>>2];const l=Math.min(c+(n-e)*this.nodeSize**o,i);if(s===void 0)for(;c<l;c+=4)r.push(A[c>>2]|0);else for(;c<l;c+=4){const u=A[c>>2]|0;s(u,a[c],a[c+1],a[c+2],a[c+3])&&r.push(u)}}neighbors(e,n,o=1/0,i=1/0,r){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");const{_boxes:s,_levelBounds:a,_indices:A,_queue:c,nodeSize:l}=this,u=this.numItems*4,g=l*4,h=[],d=i*i,p=o===1;let m=d;for(c.push(s.length-4<<1,0);c.length;){const _=c.ids[0];if(_&1){if(c.pop(),h.push(_>>1),h.length===o)break;continue}c.pop();const f=_>>1,I=f<u,C=Math.min(f+g,NIo(f,a));for(let y=f;y<C;y+=4){const x=s[y],E=s[y+1],B=s[y+2],S=s[y+3],Q=Math.max(Math.max(x-e,e-B),0),w=Math.max(Math.max(E-n,n-S),0),M=Q*Q+w*w;if(M>m)continue;const k=A[y>>2]|0;I?(r===void 0||r(k))&&(c.push(k<<1|1,M),p&&M<m&&(m=M)):c.push(k<<1,M)}}return c.clear(),h}}function NIo(t,e){let n=0,o=e.length-1;for(;n<o;){const i=n+o>>1;e[i]>t?o=i:n=i+1}return e[n]}function RIo(t,e,n,o,i,r){const s=[o,i];for(;s.length;){const a=s.pop()||0,A=s.pop()||0;if(a-A<=r&&Math.floor(A/r)>=Math.floor(a/r))continue;const c=t[A],l=t[A+a>>1],u=t[a],g=c>l!=c>u?c:l<c!=l<u?l:u;let h=A-1,d=a+1;for(;;){do h++;while(t[h]<g);do d--;while(t[d]>g);if(h>=d)break;TIo(t,e,n,h,d)}s.push(A,d,d+1,a)}}function TIo(t,e,n,o,i){const r=t[o];t[o]=t[i],t[i]=r;const s=4*o,a=4*i,A=e[s],c=e[s+1],l=e[s+2],u=e[s+3];e[s]=e[a],e[s+1]=e[a+1],e[s+2]=e[a+2],e[s+3]=e[a+3],e[a]=A,e[a+1]=c,e[a+2]=l,e[a+3]=u;const g=n[o];n[o]=n[i],n[i]=g}function kIo(t,e){let n=t^e,o=65535^n,i=65535^(t|e),r=t&(e^65535),s=n|o>>1,a=n>>1^n,A=i^(i>>1^o&r>>1),c=r^(n&i>>1^r>>1);return n=s&s>>2^a&a>>2,o=s&a>>2^a&(s^a)>>2,i=A^(s&A>>2^a&c>>2),r=c^(a&A>>2^(s^a)&c>>2),s=n&n>>4^o&o>>4,a=n&o>>4^o&(n^o)>>4,A=i^(n&i>>4^o&r>>4),c=r^(o&i>>4^(n^o)&r>>4),i=A^(s&A>>8^a&c>>8),r=c^(a&A>>8^(s^a)&c>>8),i^=i>>1,r^=r>>1,n=t^e,o=r|65535^(n|i),n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,((o<<1|n)>>>0)-2147483648}var Ng=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};step(){if(!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(e){throw this.error=`${this.constructor.name} error: ${e}`,this.failed=!0,e}!this.solved&&this.iterations>this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>this.MAX_ITERATIONS&&(this.error=`${this.constructor.name} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}solve(){const e=Date.now();for(;!this.solved&&!this.failed;)this.step();const n=Date.now();this.timeToSolve=n-e}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}},Mc=(t,e=1)=>`hsl(${t.split("").reduce((o,i)=>o*31+i.charCodeAt(0),0)%360}, 100%, 50%, ${e})`,tQt=(t,e,n)=>{if(n.chipId){const o=t.get(n.chipId);if(o)return o}return e.get(n.pinId)},Zv=(t,e,n)=>{const o=new Map,i=new Map;for(const a of t.chips)if(a.sectionId){o.set(a.chipId,a.sectionId);for(const A of a.pins)i.set(A.pinId,a.sectionId)}if(o.size===0)return!1;const r=tQt(o,i,e),s=tQt(o,i,n);return r!==s},vve=(t,e,n)=>{const{x:o,y:i}=t,{center:r,width:s,height:a}=e,A=r.y+a/2,c=r.y-a/2,l=r.x+s/2,u=r.x-s/2,g=A-i,h=i-c,d=l-o,p=o-u,m=Math.min(g,h,d,p),_=m===g?"y+":m===h?"y-":m===d?"x+":"x-",f=[{direction:"y+",distance:g},{direction:"y-",distance:h},{direction:"x+",distance:d},{direction:"x-",distance:p}].filter(({distance:E})=>Math.abs(E-m)<=1e-9).map(({direction:E})=>E),I=[_,...f.filter(E=>E!==_)];if(!n||I.length<=1)return I;const C=n.x-t.x,y=n.y-t.y,x=Math.abs(C)>=Math.abs(y)?C>=0?"x+":"x-":y>=0?"y+":"y-";return I.includes(x)?[x,...I.filter(E=>E!==x)]:I},W5=(t,e,n)=>vve(t,e,n)[0],zh=(t,e={})=>{const{connectionAlpha:n=.8,chipAlpha:o=.8,hideRatsNet:i=t._hideRatsNet??!1}=e,r={lines:[],points:[],rects:[]},s=new Map;for(const a of t.chips)for(const A of a.pins)s.set(A.pinId,A);for(const a of t.chips){r.rects.push({label:a.chipId,center:a.center,width:a.width,height:a.height,fill:Mc(a.chipId,o)});for(const A of a.pins)r.points.push({label:`${A.displayName??A.pinId}
${A._facingDirection??W5(A,a)}`,x:A.x,y:A.y,color:Mc(A.pinId,.8)})}for(const a of t.textBoxes??[])r.rects.push({label:a.text??"schematic_text",center:a.center,width:a.width,height:a.height,fill:"rgba(160, 0, 220, 0.14)",strokeColor:"rgba(160, 0, 220, 0.9)"});if(!i){for(const a of t.directConnections){const[A,c]=a.pinIds,l=s.get(A),u=s.get(c);Zv(t,l,u)||r.lines.push({points:[{x:l.x,y:l.y},{x:u.x,y:u.y}],strokeColor:Mc(a.netId??`${A}-${c}`,n)})}for(const a of t.netConnections){const A=a.pinIds.map(c=>s.get(c));for(let c=0;c<A.length-1;c++)for(let l=c+1;l<A.length;l++){const u=A[c],g=A[l];Zv(t,u,g)||r.lines.push({points:[{x:u.x,y:u.y},{x:g.x,y:g.y}],strokeColor:Mc(a.netId,n),strokeDash:"4 2"})}}}return r},FIo=t=>{const{pins:e,inputProblem:n,pinIdMap:o,chipMap:i}=t,r=g=>{const h=new Set,d=[g];h.add(g);const p=n.directConnections||[];for(;d.length;){const m=d.shift();for(const _ of p)if(_.pinIds.includes(m))for(const f of _.pinIds)h.has(f)||(h.add(f),d.push(f))}return h},s=e[0].pinId,a=e[1].pinId,A=new Set([...r(s),...r(a)]),c=new Map,l=new Map,u=new Set(e.map(g=>g.chipId));for(const g of A){const h=o.get(g);if(!h)continue;const d=i[h.chipId];if(!d)continue;const p=h._facingDirection??W5(h,d);let m=l.get(d.chipId);if(!m){m={center:d.center};const _={xPos:0,xNeg:0,yPos:0,yNeg:0};for(const f of d.pins){const I=f._facingDirection??W5(f,d);I==="x+"&&_.xPos++,I==="x-"&&_.xNeg++,I==="y+"&&_.yPos++,I==="y-"&&_.yNeg++}m.counts=_,l.set(d.chipId,m)}p==="x+"&&(m.hasXPos=!0),p==="x-"&&(m.hasXNeg=!0),p==="y+"&&(m.hasYPos=!0),p==="y-"&&(m.hasYNeg=!0)}for(const[g,h]of l){const d=new Set,p={axes:d},m=h.counts;!(m&&(m.xPos>1||m.xNeg>1||m.yPos>1||m.yNeg>1))&&u.has(g)||(h.hasXPos&&h.hasXNeg&&(p.x=h.center.x,d.add("x")),h.hasYPos&&h.hasYNeg&&(p.y=h.center.y,d.add("y"))),d.size>0&&c.set(g,p)}return c},lj=t=>{const{inputProblem:e,chipMap:n,pinIdMap:o,p1:i,p2:r}=t,s=FIo({pins:[i,r],inputProblem:e,pinIdMap:o,chipMap:n});if(s.size===0)return!1;const a=1e-9,A=(h,d)=>{for(const[,p]of s)if(p.axes.has("x")&&typeof p.x=="number"&&(h.x-p.x)*(d.x-p.x)<-a||p.axes.has("y")&&typeof p.y=="number"&&(h.y-p.y)*(d.y-p.y)<-a)return!0;return!1};if(Math.abs(i.x-r.x)<a||Math.abs(i.y-r.y)<a)return A({x:i.x,y:i.y},{x:r.x,y:r.y});const c={x:r.x,y:i.y},l={x:i.x,y:r.y},u=A({x:i.x,y:i.y},c)||A(c,{x:r.x,y:r.y}),g=A({x:i.x,y:i.y},l)||A(l,{x:r.x,y:r.y});return u&&g},mB=t=>{const e=new mle({});for(const o of t.directConnections)e.addConnections([o.netId?[o.netId,...o.pinIds]:o.pinIds]);const n=new mle(e.netMap);for(const o of t.netConnections)n.addConnections([[o.netId,...o.pinIds]]);return{directConnMap:e,netConnMap:n}},LIo=1,nQt=t=>{const{netConnMap:e}=mB(t),n=e.getNetConnectedToId("GND"),o=new mle({}),i=new Set;for(const l of t.directConnections){o.addConnections([l.pinIds]);const u=e.getNetConnectedToId(l.pinIds[0]),g=t.netConnections.some(h=>h.isGround&&e.getNetConnectedToId(h.netId)===u);u&&g&&i.add(u)}const r=new Map(t.chips.flatMap(l=>l.pins.map(u=>[u.pinId,{pin:u,chip:l}]))),s=[...r.values()].filter(({pin:l,chip:u})=>u.pins.length===2&&e.getNetConnectedToId(l.pinId)===n&&(l._facingDirection??W5(l,u))==="y-"),a=s.some(({pin:l})=>{const u=o.getNetConnectedToId(l.pinId);return u!==void 0&&s.some(({pin:g})=>l.pinId!==g.pinId&&Math.abs(l.y-g.y)<1e-6&&Math.abs(l.x-g.x)>1e-6&&o.getNetConnectedToId(g.pinId)===u)}),A=(l,u)=>{const g=r.get(l)?.chip.chipId,h=r.get(u)?.chip.chipId;if(g!==void 0&&g===h&&!o.getNetConnectedToId(l)&&!o.getNetConnectedToId(u))return!1;const p=e.getNetConnectedToId(l),m=e.getNetConnectedToId(u);if(!p||p!==m||!i.has(p))return!1;const _=o.getNetConnectedToId(l)??`pin:${l}`,f=o.getNetConnectedToId(u)??`pin:${u}`;return _!==f};if(!a)return(l,u)=>!A(l,u);const c=l=>{const u=r.get(l);return u?.chip.pins.length===2&&!o.getNetConnectedToId(l)&&(u.pin._facingDirection??W5(u.pin,u.chip))==="y-"};return(l,u)=>{const g=e.getNetConnectedToId(l),h=e.getNetConnectedToId(u);if(A(l,u))return!1;if(!n||g!==n||h!==n||!c(l)&&!c(u))return!0;const d=r.get(l)?.pin,p=r.get(u)?.pin;return!d||!p||Math.abs(d.y-p.y)<=LIo+1e-6}};function HIo(t,e={}){const n=t.length,o=e?.maxDistance??Number.POSITIVE_INFINITY;if(n<=1)return[];{const l=new Set;for(const u of t){if(l.has(u.pinId))throw new Error(`Duplicate pinId detected: "${u.pinId}"`);l.add(u.pinId)}}const i=(l,u)=>Math.abs(l.x-u.x)+Math.abs(l.y-u.y),r=new Array(n).fill(!1),s=new Array(n).fill(Number.POSITIVE_INFINITY),a=new Array(n).fill(-1);let A=0;for(let l=1;l<n;l++)t[l].pinId<t[A].pinId&&(A=l);s[A]=0;const c=[];for(let l=0;l<n;l++){let u=-1,g=Number.POSITIVE_INFINITY,h="";for(let d=0;d<n;d++)if(!r[d]){const p=s[d];(p<g||p===g&&(h===""||t[d].pinId<h))&&(g=p,h=t[d].pinId,u=d)}r[u]=!0,a[u]!==-1&&c.push([t[u].pinId,t[a[u]].pinId]);for(let d=0;d<n;d++)if(!r[d]){const p=i(t[u],t[d]),m=e?.forbidEdge?.(t[u],t[d])??!1,_=p>o||m?Number.POSITIVE_INFINITY:p;(_<s[d]||_===s[d]&&t[u].pinId<t[a[d]]?.pinId)&&(s[d]=_,a[d]=u)}}return c}var OIo=.45,wve=.2;function _B(t){const{orientation:e,netLabelWidth:n,netLabelHeight:o}=t,i=typeof n=="number"?n:OIo,r=typeof o=="number"?o:wve;return e==="y+"||e==="y-"?{width:r,height:i}:{width:i,height:r}}function IC(t,e,n,o){switch(e){case"x+":return{x:t.x+n/2,y:t.y};case"x-":return{x:t.x-n/2,y:t.y};case"y+":return{x:t.x,y:t.y+o/2};case"y-":return{x:t.x,y:t.y-o/2}}}function Ls(t,e,n){return{minX:t.x-e/2,minY:t.y-n/2,maxX:t.x+e/2,maxY:t.y+n/2}}var oQt=({inputProblem:t,chipMap:e,pins:n})=>{const[o,i]=n,r=t.directConnections.find(f=>f.pinIds.includes(o.pinId)&&f.pinIds.includes(i.pinId));if(r?.netLabelWidth===void 0)return null;const s=e[o.chipId],a=e[i.chipId];if(!s||!a)return null;let A=o._facingDirection;A||(A=W5(o,s));let c=i._facingDirection;if(c||(c=W5(i,a)),!(A==="x-"&&c==="x+"||A==="x+"&&c==="x-"))return null;if(s.pins.length===1||a.pins.length===1)return"single-pin-peripheral";if(!(s.sectionId&&s.sectionId===a.sectionId?s.sectionId:null))return null;const d=o.x<=i.x?A==="x+"&&c==="x-":A==="x-"&&c==="x+",p=Math.abs(o.x-i.x)<r.netLabelWidth*2,m=Math.abs(o.y-i.y)<wve;return d&&p&&m?"overlapping-fallback-labels":null},GIo=t=>oQt(t)!==null,iQt=1e-6,YIo=3;function rQt({pin:t,netPins:e}){const n=e.filter(i=>Math.abs(i.y-t.y)<=iQt);return new Set(n.map(i=>i.chipId)).size>=YIo}function UIo({netConnection:t,netPins:e,pin1:n,pin2:o}){return!t?.isGround||n.chipId===o.chipId||Math.abs(n.y-o.y)<=iQt?!1:rQt({pin:n,netPins:e})&&rQt({pin:o,netPins:e})}var _b=1e-6,KIo=4,sQt=2,_le=(t,e)=>JSON.stringify([t,e].sort()),aQt=(t,e,n)=>{const o=new Set,i=new Set,r=new Set;for(const l of t.netConnections){for(const g of l.pinIds)i.add(g);const u=e.getNetConnectedToId(l.netId);u&&l.isGround&&o.add(u)}for(const l of t.directConnections){const u=l.netLabelWidth===void 0?r:i;for(const g of l.pinIds)u.add(g)}const s=[];for(const l of t.chips){if(l.pins.length!==2||l.symbolName&&!l.symbolName.startsWith("capacitor")||!l.pins.every(p=>i.has(p.pinId))||l.pins.some(p=>r.has(p.pinId)))continue;const u=l.pins.map(p=>e.getNetConnectedToId(p.pinId));if(!u[0]||!u[1]||u[0]===u[1]||o.has(u[0])===o.has(u[1]))continue;const g=l.pins.map(p=>p._facingDirection??W5(p,l));if(g[0][0]!==g[1][0]||g[0]===g[1])continue;const h=g[0][0],d=h==="x"?"y":"x";if(!(Math.abs(l.pins[0][d]-l.pins[1][d])>_b))for(const[p,m]of l.pins.entries()){const _=g[p];let f=s.find(I=>I.sectionId===l.sectionId&&I.direction===_&&Math.abs(I.coordinate-m[h])<=_b);f||(f={sectionId:l.sectionId,direction:_,coordinate:m[h],axis:h,pins:[]},s.push(f)),f.pins.push({...m,chipId:l.chipId,oppositeCoordinate:l.pins[1-p][h]})}}const a=new Set,A=new Set,c=new Set;for(const l of s){const u=l.axis==="x"?"y":"x";l.pins.sort((g,h)=>g[u]-h[u]||g.pinId.localeCompare(h.pinId));for(let g=1;g<l.pins.length;g++){const h=l.pins[g-1],d=l.pins[g],p=d[u]-h[u],m=[h[u]-(l.pins[g-2]?.[u]??h[u]),(l.pins[g+1]?.[u]??d[u])-d[u]].filter(C=>C>_b),_=Math.max(sQt*n,sQt*(m.length?Math.min(...m):0),KIo*Math.max(Math.abs(h[l.axis]-h.oppositeCoordinate),Math.abs(d[l.axis]-d.oppositeCoordinate)));if(p<=_b||e.getNetConnectedToId(h.pinId)!==e.getNetConnectedToId(d.pinId))continue;if(p>_+_b){c.add(h.pinId),c.add(d.pinId);continue}const f=Math.min(h[l.axis],d[l.axis],h.oppositeCoordinate,d.oppositeCoordinate),I=Math.max(h[l.axis],d[l.axis],h.oppositeCoordinate,d.oppositeCoordinate);t.chips.some(C=>{if(C.chipId===h.chipId||C.chipId===d.chipId)return!1;const y=l.axis==="x"?C.width:C.height,x=u==="x"?C.width:C.height;return C.center[l.axis]+y/2>=f-_b&&C.center[l.axis]-y/2<=I+_b&&C.center[u]+x/2>h[u]+_b&&C.center[u]-x/2<d[u]-_b})||(a.add(_le(h.pinId,d.pinId)),p>n&&(A.add(h.pinId),A.add(d.pinId)))}}return{pairKeys:a,extendedRailPinIds:A,separatedRailPinIds:c}},uj=1,AQt=t=>[...t].sort().join("::"),VIo=class extends Ng{inputProblem;mspConnectionPairs=[];mspConnectionPairIds=new Set;dcConnMap;globalConnMap;queuedDcNetIds;chipMap;maxMspPairDistance;pinMap;userNetIdByPinId;directConnectionPinPairKeys;canRouteGroundPair;parallelRailPairKeys;constructor({inputProblem:t}){super(),this.inputProblem=t,this.canRouteGroundPair=nQt(t),this.maxMspPairDistance=t.maxMspPairDistance??uj;const{directConnMap:e,netConnMap:n}=mB(t);this.dcConnMap=e,this.globalConnMap=n,this.parallelRailPairKeys=aQt(t,n,this.maxMspPairDistance).pairKeys,this.pinMap={};for(const o of t.chips)for(const i of o.pins)this.pinMap[i.pinId]={...i,chipId:o.chipId};this.chipMap={};for(const o of t.chips)this.chipMap[o.chipId]=o;this.userNetIdByPinId={},this.directConnectionPinPairKeys=new Set;for(const o of t.directConnections)if(this.directConnectionPinPairKeys.add(AQt(o.pinIds)),o.netId){const[i,r]=o.pinIds;this.userNetIdByPinId[i]=o.netId,this.userNetIdByPinId[r]=o.netId}for(const o of t.netConnections)for(const i of o.pinIds)this.userNetIdByPinId[i]=o.netId;this.queuedDcNetIds=Object.keys(n.netMap)}getConstructorParams(){return{inputProblem:this.inputProblem}}addMspConnectionPair(t){this.mspConnectionPairIds.has(t.mspPairId)||(this.mspConnectionPairIds.add(t.mspPairId),this.mspConnectionPairs.push(t))}_step(){if(this.queuedDcNetIds.length===0){this.solved=!0;return}const t=this.queuedDcNetIds.shift(),n=this.globalConnMap.getIdsConnectedToNet(t).filter(A=>!!this.pinMap[A]);if(n.length<=1)return;if(n.length===2){const[A,c]=n,l=this.pinMap[A],u=this.pinMap[c];if(!this.canRouteGroundPair(A,c))return;const g=AQt([A,c]);let h=Math.abs(l.x-u.x)+Math.abs(l.y-u.y);this.directConnectionPinPairKeys.has(g)&&(h=ad(l,u));const d=oQt({inputProblem:this.inputProblem,chipMap:this.chipMap,pins:[l,u]});if(h>this.maxMspPairDistance&&!this.parallelRailPairKeys.has(_le(A,c))&&!d||Zv(this.inputProblem,l,u))return;const p=new Map(Object.entries(this.pinMap));if(lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:p,p1:l,p2:u}))return;const m=this.globalConnMap.getNetConnectedToId(A),_=this.userNetIdByPinId[A]??this.userNetIdByPinId[c],f=h>this.maxMspPairDistance&&d==="overlapping-fallback-labels";this.addMspConnectionPair({mspPairId:`${A}-${c}`,dcConnNetId:t,globalConnNetId:m,userNetId:_,suppressNetLabel:f,pins:[l,u]});return}const o=new Map(Object.entries(this.pinMap)),i=this.userNetIdByPinId[n[0]],r=this.inputProblem.netConnections.find(A=>A.netId===i),s=n.map(A=>this.pinMap[A]),a=HIo(s,{forbidEdge:(A,c)=>Math.abs(A.x-c.x)+Math.abs(A.y-c.y)>this.maxMspPairDistance&&!this.parallelRailPairKeys.has(_le(A.pinId,c.pinId))||!this.canRouteGroundPair(A.pinId,c.pinId)||UIo({netConnection:r,netPins:s,pin1:A,pin2:c})||Zv(this.inputProblem,A,c)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:o,p1:A,p2:c})});for(let[A,c]of a){this.parallelRailPairKeys.has(_le(A,c))&&Math.abs(this.pinMap[A].x-this.pinMap[c].x)+Math.abs(this.pinMap[A].y-this.pinMap[c].y)>this.maxMspPairDistance&&n.indexOf(A)>n.indexOf(c)&&([A,c]=[c,A]);const l=this.pinMap[A],u=this.pinMap[c];if(Zv(this.inputProblem,l,u)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:o,p1:l,p2:u}))continue;const g=this.globalConnMap.getNetConnectedToId(A),h=this.userNetIdByPinId[A]??this.userNetIdByPinId[c];this.addMspConnectionPair({mspPairId:`${A}-${c}`,dcConnNetId:t,globalConnNetId:g,userNetId:h,pins:[l,u]})}}visualize(){const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});for(const e of this.mspConnectionPairs)t.lines.push({points:[{x:e.pins[0].x,y:e.pins[0].y},{x:e.pins[1].x,y:e.pins[1].y}],strokeColor:Mc(e.mspPairId,.75)});return t}},cQt=(t,e)=>{const n=t.find(o=>o?.netLabelWidth!==void 0)?.netLabelWidth;return n!==void 0||!e?n:t.find(o=>o?.anchoredNetLabelWidth!==void 0)?.anchoredNetLabelWidth},L7=({inputProblem:t,netId:e,pinIds:n,isPortOnlyLabel:o})=>{if(e){const i=cQt([t.netConnections.find(r=>r.netId===e),t.directConnections.find(r=>r.netId===e)],o);if(i!==void 0)return i}return cQt([t.directConnections.find(i=>i.pinIds.some(r=>n.includes(r))),t.netConnections.find(i=>i.pinIds.some(r=>n.includes(r)))],o)};function fB(t,e={}){return{minX:t.center.x-t.width/2-(e.minX??0),minY:t.center.y-t.height/2-(e.minY??0),maxX:t.center.x+t.width/2+(e.maxX??0),maxY:t.center.y+t.height/2+(e.maxY??0)}}function Dc(t,e,n=1e-9){return t.minX<e.maxX-n&&t.maxX>e.minX+n&&t.minY<e.maxY-n&&t.maxY>e.minY+n}function KH(t,e){for(const n of e.textBoxes??[])if(Dc(t,fB(n)))return!0;return!1}var lQt=.15,gj=lQt/7.5,zIo=.2;function fle(t,e){return e.x>t.x?"x+":e.x<t.x?"x-":e.y>t.y?"y+":e.y<t.y?"y-":null}function Pve({path:t,pin1:e,pin2:n}){const o=fle(t[0],t[1]),i=fle(t[t.length-1],t[t.length-2]);return o===e._facingDirection&&i===n._facingDirection}function JIo(t,e){if(t.x===e.x||t.y===e.y)return null;const n=t._facingDirection,o=e._facingDirection,i={x:t.x,y:t.y},r={x:e.x,y:e.y};let s=null;if(n?.startsWith("y")&&o?.startsWith("x")){let a=-gj;n==="y+"&&(a=gj);const A=i.y+a,c=(i.x+r.x)/2;s=[i,{x:i.x,y:A},{x:c,y:A},{x:c,y:r.y},r]}else if(n?.startsWith("x")&&o?.startsWith("y")){let a=-gj;n==="x+"&&(a=gj);const A=i.x+a,c=(i.y+r.y)/2;s=[i,{x:A,y:i.y},{x:A,y:c},{x:r.x,y:c},r]}return s&&Pve({path:s,pin1:t,pin2:e})?s:null}function WIo(t,e){const n=Math.abs(t.x-e.x)+Math.abs(t.y-e.y);if(n>lQt)return null;const o={x:t.x,y:t.y},i={x:e.x,y:e.y},r=JIo(t,e);if(r)return r;let s=[];t.x!==e.x&&t.y!==e.y?s=[[o,{x:e.x,y:t.y},i],[o,{x:t.x,y:e.y},i]]:s=[[o,i]];for(const a of s)if(Pve({path:a,pin1:t,pin2:e}))return a;return wF({x:t.x,y:t.y,facingDirection:t._facingDirection},{x:e.x,y:e.y,facingDirection:e._facingDirection},{overshoot:Math.min(zIo,Math.max(gj,n/4))})}var Ile=1e-9,e1=(t,e,n=Ile)=>Math.abs(t.x-e.x)<n,X_=(t,e,n=Ile)=>Math.abs(t.y-e.y)<n,CC=(t,e,n,o=Ile)=>{const i=e1(t,e,o),r=X_(t,e,o);if(!i&&!r)return!1;if(i){const s=t.x;if(s<n.minX-o||s>n.maxX+o)return!1;const a=Math.min(t.y,e.y),A=Math.max(t.y,e.y);return Math.min(A,n.maxY)-Math.max(a,n.minY)>o}else{const s=t.y;if(s<n.minY-o||s>n.maxY+o)return!1;const a=Math.min(t.x,e.x),A=Math.max(t.x,e.x);return Math.min(A,n.maxX)-Math.max(a,n.minX)>o}},Mve=(t,e,n,o=Ile)=>e1(t,e,o)?Math.abs(t.x-n.minX)<=o||Math.abs(t.x-n.maxX)<=o?Math.min(Math.max(t.y,e.y),n.maxY)-Math.max(Math.min(t.y,e.y),n.minY)>o:!1:X_(t,e,o)&&(Math.abs(t.y-n.minY)<=o||Math.abs(t.y-n.maxY)<=o)?Math.min(Math.max(t.x,e.x),n.maxX)-Math.max(Math.min(t.x,e.x),n.minX)>o:!1,HN=(t,e,n={})=>{for(let o=0;o<t.length-1;o++){const i=t[o],r=t[o+1],s=n.excludeRectsForSegment?.(o)??new Set;for(const a of e)if(!s.has(a)&&CC(i,r,a))return{segIndex:o,rect:a}}return null},ON=(t,e)=>{for(let n=0;n<t.length-1;n++)for(const o of e)if(CC(t[n],t[n+1],o))return!0;return!1},uQt=1e-9,ew=.2,jIo=(t,e)=>({minX:Math.min(t.x,e.x),maxX:Math.max(t.x,e.x),minY:Math.min(t.y,e.y),maxY:Math.max(t.y,e.y)}),tw=(t,e,n,o=uQt)=>t==="x"?e.x<n.minX-o?[(e.x+n.minX)/2]:e.x>n.maxX+o?[(e.x+n.maxX)/2]:[n.minX-ew,n.maxX+ew]:e.y<n.minY-o?[(e.y+n.minY)/2]:e.y>n.maxY+o?[(e.y+n.maxY)/2]:[n.minY-ew,n.maxY+ew],gQt=(t,e,n,o,i={})=>{const{allowOpenSideCandidates:r=!1,eps:s=uQt}=i,a=[...n];if(t==="x"){const A=[o.minX,...a.map(h=>h.maxX)].filter(h=>h<e.minX-s),c=[o.maxX,...a.map(h=>h.minX)].filter(h=>h>e.maxX+s),l=A.length>0?Math.max(...A):void 0,u=c.length>0?Math.min(...c):void 0,g=[];return l!==void 0?g.push((l+e.minX)/2):r&&g.push(e.minX-ew),u!==void 0?g.push((e.maxX+u)/2):r&&g.push(e.maxX+ew),g}else{const A=[o.minY,...a.map(h=>h.maxY)].filter(h=>h<e.minY-s),c=[o.maxY,...a.map(h=>h.minY)].filter(h=>h>e.maxY+s),l=A.length>0?Math.max(...A):void 0,u=c.length>0?Math.min(...c):void 0,g=[];return l!==void 0?g.push((l+e.minY)/2):r&&g.push(e.minY-ew),u!==void 0?g.push((e.maxY+u)/2):r&&g.push(e.maxY+ew),g}},$Io=1e-9,dQt=t=>t.every((e,n)=>{const o=t[n+1];return o?!X_(e,o)&&!e1(e,o)?!1:Math.abs(e.x-o.x)+Math.abs(e.y-o.y)>0:!0}),Dve=(t,e,n,o,i=$Io)=>{if(e<0||e>=t.length-1)return null;const r=t[e],s=t[e+1],a=e1(r,s,i),A=X_(r,s,i);if(!a&&!A||a&&n!=="x"||A&&n!=="y")return null;const c=t.map(l=>({...l}));if(n==="x"){if(Math.abs(r.x-o)<i&&Math.abs(s.x-o)<i)return null;c[e]={...c[e],x:o},c[e+1]={...c[e+1],x:o}}else{if(Math.abs(r.y-o)<i&&Math.abs(s.y-o)<i)return null;c[e]={...c[e],y:o},c[e+1]={...c[e+1],y:o}}if(e-1>=0){const l=c[e-1],u=c[e];if(Math.abs(l.x-u.x)+Math.abs(l.y-u.y)<i)return null}if(e+2<=c.length-1){const l=c[e+1],u=c[e+2];if(Math.abs(l.x-u.x)+Math.abs(l.y-u.y)<i)return null}for(let l=0;l<c.length-1;l++){const u=c[l],g=c[l+1];if(!X_(u,g,i)&&!e1(u,g,i))return null}return c},Nve=(t,e=6)=>t.map(o=>`${o.x.toFixed(e)},${o.y.toFixed(e)}`).join("|"),hQt=(t,e)=>e1(t,e)?"x":X_(t,e)?"y":null,qIo=({path:t,collidingSegmentIndex:e,obstacle:n})=>{if(t.length<3||t.length>4)return[];const o=t.length-2;if(e!==0&&e!==o)return[];const i=e===o,r=i?[...t].reverse():t,[s,a,A]=r,c=hQt(s,a),l=hQt(a,A);if(!c||!l)return[];if(c===l)return[];const u=[...tw(l,s,n),...tw(l,A,n)],g=[...tw(c,s,n),...tw(c,A,n)],h=[];for(const d of[...new Set(u)])for(const p of[...new Set(g)]){const _=[...c==="y"?[s,{x:d,y:s.y},{x:d,y:p},{x:A.x,y:p},A]:[s,{x:s.x,y:d},{x:p,y:d},{x:p,y:A.y},A],...r.slice(3)],f=i?_.reverse():_;dQt(f)&&h.push(f)}return h},pQt=1e-9,XIo=.2,Cle=(t,e,n)=>t>Math.min(e,n)+pQt&&t<Math.max(e,n)-pQt,ZIo=({path:t,collidingSegmentIndex:e,obstacle:n,clearance:o=XIo})=>{if(e<=0||e>=t.length-2)return[];const i=t[e],r=t[e+1],s=[];if(X_(i,r)){const a=i.x<r.x,A=a?n.minX-o:n.maxX+o,c=a?n.maxX+o:n.minX-o;if(!Cle(A,i.x,r.x)||!Cle(c,i.x,r.x))return[];for(const l of[n.minY-o,n.maxY+o])s.push([{x:A,y:i.y},{x:A,y:l},{x:c,y:l},{x:c,y:r.y}])}else if(e1(i,r)){const a=i.y<r.y,A=a?n.minY-o:n.maxY+o,c=a?n.maxY+o:n.minY-o;if(!Cle(A,i.y,r.y)||!Cle(c,i.y,r.y))return[];for(const l of[n.minX-o,n.maxX+o])s.push([{x:i.x,y:A},{x:l,y:A},{x:l,y:c},{x:r.x,y:c}])}return s.map(a=>[...t.slice(0,e+1),...a,...t.slice(e+1)]).filter(dQt)};function Rve(t){const e=t.width/2,n=t.height/2;return{minX:t.center.x-e,maxX:t.center.x+e,minY:t.center.y-n,maxY:t.center.y+n}}var eCo=.05,mQt=t=>t.kind==="text_box",tCo=t=>{const e=Rve(t);return{kind:"chip",chipId:t.chipId,...e}},Hy=(t,e={})=>{const n=t.chips.map(tCo),o=(t.textBoxes??[]).map(i=>{const r=fB(i,e.textBoxPadding),s=n.find(c=>c.chipId===i.chipId),a=s?EV(r,s):Number.POSITIVE_INFINITY,A=s&&a>0&&a<eCo?{minX:Math.min(r.minX,s.maxX),maxX:Math.max(r.maxX,s.minX),minY:Math.min(r.minY,s.maxY),maxY:Math.max(r.maxY,s.minY)}:r;return{kind:"text_box",textBox:i,...A}});return[...n,...o]},_Qt=({pin1:t,pin2:e,overshoot:n})=>wF({x:t.x,y:t.y,facingDirection:t._facingDirection},{x:e.x,y:e.y,facingDirection:e._facingDirection},{overshoot:n}),nCo=({pin1:t,pin2:e})=>{const n=e.x-t.x,o=e.y-t.y;return Math.abs(n)>=Math.abs(o)?n>0?t._facingDirection==="x+"&&e._facingDirection==="x-":t._facingDirection==="x-"&&e._facingDirection==="x+":o>0?t._facingDirection==="y+"&&e._facingDirection==="y-":t._facingDirection==="y-"&&e._facingDirection==="y+"},dj=t=>{let e=0;for(let n=0;n<t.length-1;n++)e+=Math.abs(t[n+1].x-t[n].x)+Math.abs(t[n+1].y-t[n].y);return e},oCo=({pins:t,obstacles:e})=>{const[n,o]=t,i=WIo(n,o),r=_Qt({pin1:n,pin2:o,overshoot:.2}),s=Math.abs(n.x-o.x)+Math.abs(n.y-o.y),a=_Qt({pin1:n,pin2:o,overshoot:Math.min(.2,Math.max(.02,s/4))}),A=dj(a)<dj(r),c=dj(r)>s+1e-9,l=HN(a,e)===null&&(nCo({pin1:n,pin2:o})&&c&&A||HN(r,e)!==null);return{path:i??(l?a:r),isDirectShortPath:i!==null}},VH=class extends Ng{pins;connectionPair;inputProblem;chipMap;obstacles;textObstacles;endpointTextObstacles;aabb;baseElbow;preferExteriorDetours;reserveNetLabelClearance;solvedTracePath=null;queue=[];visited=new Set;inferredPinIndexes=new Set;hasAmbiguousPinDirections=!1;constructor(t){super(),this.pins=t.pins,this.connectionPair=t.connectionPair,this.inputProblem=t.inputProblem,this.chipMap=t.chipMap,this.preferExteriorDetours=t.preferExteriorDetours??!0,this.reserveNetLabelClearance=t.reserveNetLabelClearance??!0,this.obstacles=Hy(this.inputProblem,{textBoxPadding:this.reserveNetLabelClearance?this.getTextBoxPaddingForConnectionPair():void 0}),this.textObstacles=new Set(this.obstacles.filter(mQt));const e=new Set(this.pins.map(A=>A.chipId));this.endpointTextObstacles=new Set(this.obstacles.filter(mQt).filter(A=>A.textBox.chipId!==void 0&&e.has(A.textBox.chipId)));const n=this.pins.map((A,c)=>{if(A._facingDirection)return[A._facingDirection];this.inferredPinIndexes.add(c);const l=this.pins[c===0?1:0];return vve(A,this.chipMap[A.chipId],l)}),o=n[0].flatMap((A,c)=>n[1].map((l,u)=>({directions:[A,l],preferenceIndex:c+u})));this.hasAmbiguousPinDirections=n.some(A=>A.length>1);const i=o.map(({directions:A,preferenceIndex:c})=>{const l=this.pins.map((g,h)=>({...g,_facingDirection:A[h]})),u=oCo({pins:l,obstacles:this.obstacles});return{directions:A,baseElbow:u.path,isDirectShortPath:u.isDirectShortPath,preferenceIndex:c,collisionCount:HN(u.path,this.obstacles)===null?0:1,pathLength:dj(u.path)}}).sort((A,c)=>A.collisionCount-c.collisionCount||A.pathLength-c.pathLength||A.preferenceIndex-c.preferenceIndex),r=i[0];for(const[A,c]of this.pins.entries())c._facingDirection=r.directions[A];const[s,a]=this.pins;this.baseElbow=r.baseElbow,r.isDirectShortPath&&(this.solvedTracePath=r.baseElbow),this.aabb=jIo({x:s.x,y:s.y},{x:a.x,y:a.y});for(const A of i){const c=Nve(A.baseElbow);this.visited.has(c)||(this.visited.add(c),this.queue.push({path:A.baseElbow,collisionRects:new Set,directions:A.directions}))}}getConstructorParams(){return{chipMap:this.chipMap,pins:this.pins,connectionPair:this.connectionPair,inputProblem:this.inputProblem,preferExteriorDetours:this.preferExteriorDetours,reserveNetLabelClearance:this.reserveNetLabelClearance}}getTextBoxPaddingForConnectionPair(){if(!this.inputProblem.textBoxes?.length)return{};const t=this.connectionPair?.userNetId;if(!t)return{};const e=this.inputProblem.availableNetLabelOrientations[t]??["x+","x-","y+","y-"],n=L7({inputProblem:this.inputProblem,netId:t,pinIds:this.pins.map(r=>r.pinId),isPortOnlyLabel:!1}),o=this.getNetLabelHeightForConnectionPair(t),i={minX:0,minY:0,maxX:0,maxY:0};for(const r of e){const{width:s,height:a}=_B({orientation:r,netLabelWidth:n,netLabelHeight:o});r==="y+"||r==="y-"?(i.minX=Math.max(i.minX,s/2),i.maxX=Math.max(i.maxX,s/2),r==="y+"?i.minY=Math.max(i.minY,a):i.maxY=Math.max(i.maxY,a)):(i.minY=Math.max(i.minY,a/2),i.maxY=Math.max(i.maxY,a/2),r==="x+"?i.minX=Math.max(i.minX,s):i.maxX=Math.max(i.maxX,s))}return i}getNetLabelHeightForConnectionPair(t){const e=this.inputProblem.netConnections.find(o=>o.netId===t)?.netLabelHeight;if(e!==void 0)return e;const n=this.pins.map(o=>o.pinId);return this.inputProblem.netConnections.find(o=>o.pinIds.some(i=>n.includes(i)))?.netLabelHeight}axisOfSegment(t,e){return e1(t,e)?"x":X_(t,e)?"y":null}pathLength(t){return dj(t)}getPinBandPenalty(t){let e=0;for(let n=1;n<t.length-2;n++){const o=t[n],i=t[n+1];(X_(o,i)&&o.y>this.aabb.minY&&o.y<this.aabb.maxY||e1(o,i)&&o.x>this.aabb.minX&&o.x<this.aabb.maxX)&&(e+=10)}return e}isSegmentOutsidePinBand(t,e){return X_(t,e)?t.y<=this.aabb.minY||t.y>=this.aabb.maxY:e1(t,e)?t.x<=this.aabb.minX||t.x>=this.aabb.maxX:!1}_step(){if(this.solvedTracePath){this.solved=!0;return}const t=this.queue.shift();if(!t){this.failed=!0,this.error="No collision-free path found";return}const{path:e,collisionRects:n,directions:o}=t,[i,r]=this.pins,s=HN(e,this.obstacles,{excludeRectsForSegment:B=>{const S=e.length-2,Q=new Set,w=e[B],M=e[B+1],k=B===0?r:B===S?i:null;if(k)for(const U of this.textObstacles){const Y=fB(U.textBox);(U.textBox.chipId!==k.chipId||!CC(w,M,Y))&&Q.add(U)}const R=1e-9,F=U=>[w,M].some(Y=>Math.abs(Y.x-U.x)<=R&&Math.abs(Y.y-U.y)<=R);for(const U of this.pins){if(!F(U))continue;const Y=this.obstacles.find(W=>W.kind==="chip"&&W.chipId===U.chipId);Y&&Mve(w,M,Y)&&Q.add(Y)}const O=B===1?2:B===S-1?S-2:null;if(O!==null&&O>=0&&O<S&&this.isSegmentOutsidePinBand(e[O],e[O+1]))for(const U of this.endpointTextObstacles){const Y=fB(U.textBox);CC(w,M,Y)||Q.add(U)}return Q}});if(!s){const B=e[0],S=e[e.length-1],Q=1e-9,w=(M,k)=>Math.abs(M.x-k.x)<Q&&Math.abs(M.y-k.y)<Q;if(w(B,{x:i.x,y:i.y})&&w(S,{x:r.x,y:r.y})&&(!this.hasAmbiguousPinDirections||Pve({path:e,pin1:{...i,_facingDirection:o[0]},pin2:{...r,_facingDirection:o[1]}}))){for(const M of this.inferredPinIndexes){const k=M===0?fle(e[0],e[1]):fle(e.at(-1),e.at(-2));k&&(this.pins[M]._facingDirection=k)}this.solvedTracePath=e,this.solved=!0}return}const a=s.segIndex;let{segIndex:A,rect:c}=s;const l=A===0,u=A===e.length-2,g=c.kind==="chip"&&this.pins.some(B=>B.chipId===c.chipId);if((e.length===3||e.length===4&&this.connectionPair!==void 0&&!g)&&(l||u)){const B=qIo({path:e,collidingSegmentIndex:A,obstacle:c}).filter(S=>{const Q=Nve(S);return this.visited.has(Q)?!1:(this.visited.add(Q),!0)}).sort((S,Q)=>e.length===4&&this.preferExteriorDetours?this.getPinBandPenalty(S)-this.getPinBandPenalty(Q)||this.pathLength(S)-this.pathLength(Q):this.pathLength(S)-this.pathLength(Q)||this.getPinBandPenalty(S)-this.getPinBandPenalty(Q));for(const S of B){const Q=new Set(n);Q.add(c),this.queue.push({path:S,collisionRects:Q,directions:o})}return}if(l){if(e.length<3)return;A=1}else if(u){if(e.length<3)return;A=e.length-3}const d=e[A],p=e[A+1],m=this.axisOfSegment(d,p);if(!m)return;const _=[],f={allowOpenSideCandidates:this.connectionPair!==void 0};if(n.size===0){const B=tw(m,{x:i.x,y:i.y},c),S=tw(m,{x:r.x,y:r.y},c),Q=[...B,...S],w=[...new Set(Q)];_.push(...w)}else{const B=gQt(m,c,n,this.aabb,f);_.push(...B)}const I=[],C=B=>{const S=Nve(B);if(this.visited.has(S))return;this.visited.add(S);const Q=new Set(n);Q.add(c),I.push({path:B,collisionRects:Q,length:this.pathLength(B),pinBandPenalty:this.getPinBandPenalty(B)})},y=(B,S,Q)=>{const w=Dve(e,B,S,Q);w&&C(w)},x=e.length-2;if(this.connectionPair===void 0&&c.kind==="text_box"&&this.endpointTextObstacles.has(c)&&!n.has(c)&&a>0&&a<x)for(const B of ZIo({path:e,collidingSegmentIndex:a,obstacle:c}))C(B);for(const B of _)y(A,m,B);const E=a===1?[2]:a===x-1?[x-2]:[];for(const B of E){if(B<0||B>=x)continue;const S=this.axisOfSegment(e[B],e[B+1]);if(!S||S===m)continue;const Q=[...tw(S,{x:i.x,y:i.y},c),...tw(S,{x:r.x,y:r.y},c)];n.size>0&&Q.push(...gQt(S,c,n,this.aabb,f));for(const w of[...new Set(Q)])y(B,S,w)}I.sort((B,S)=>B.length-S.length||B.pinBandPenalty-S.pinBandPenalty);for(const B of I)this.queue.push({path:B.path,collisionRects:B.collisionRects,directions:o})}visualize(){const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});t.lines.push({points:this.baseElbow,strokeColor:"red",strokeDash:"4 4"});const[e,n]=this.pins;t.lines.push({points:[{x:e.x,y:e.y},{x:n.x,y:n.y}],strokeColor:"blue",strokeDash:"5 5"});for(const{path:o}of this.queue)t.lines.push({points:o,strokeColor:"teal",strokeDash:"2 2"});return this.solvedTracePath?t.lines.push({points:this.solvedTracePath,strokeColor:"green"}):this.queue.length>0&&t.lines.push({points:this.queue[0].path,strokeColor:"orange"}),t}},fQt=({connectionPair:t,allConnectionPairs:e,inputProblem:n})=>{const[o,i]=t.pins;return n.netConnections.some(s=>s.pinIds.includes(o.pinId)&&s.pinIds.includes(i.pinId))?!0:e.some(s=>{if(s===t)return!1;const[a,A]=s.pins;return o.chipId===a.chipId&&i.chipId===A.chipId?!0:o.chipId===A.chipId&&i.chipId===a.chipId})},iCo=class extends Ng{inputProblem;mspConnectionPairs;dcConnMap;globalConnMap;queuedConnectionPairs;chipMap;currentConnectionPair=null;retryingWithoutNetLabelClearance=!1;solvedTracePaths=[];failedConnectionPairs=[];constructor(t){super(),this.inputProblem=t.inputProblem,this.mspConnectionPairs=t.mspConnectionPairs,this.dcConnMap=t.dcConnMap,this.globalConnMap=t.globalConnMap,this.chipMap=t.chipMap,this.queuedConnectionPairs=[...this.mspConnectionPairs]}getConstructorParams(){return{inputProblem:this.inputProblem,chipMap:this.chipMap,mspConnectionPairs:this.mspConnectionPairs,dcConnMap:this.dcConnMap,globalConnMap:this.globalConnMap}}_step(){if(this.activeSubSolver?.solved&&(this.solvedTracePaths.push({...this.currentConnectionPair,pins:this.activeSubSolver.pins,tracePath:this.activeSubSolver.solvedTracePath,mspConnectionPairIds:[this.currentConnectionPair.mspPairId],pinIds:[this.currentConnectionPair.pins[0].pinId,this.currentConnectionPair.pins[1].pinId]}),this.activeSubSolver=null,this.currentConnectionPair=null,this.retryingWithoutNetLabelClearance=!1),this.activeSubSolver?.failed){if(this.currentConnectionPair&&!this.retryingWithoutNetLabelClearance&&this.activeSubSolver.hasAmbiguousPinDirections){const o=this.currentConnectionPair;this.retryingWithoutNetLabelClearance=!0,this.activeSubSolver=new VH({inputProblem:this.inputProblem,pins:o.pins.map(i=>({...i})),connectionPair:o,chipMap:this.chipMap,preferExteriorDetours:fQt({connectionPair:o,allConnectionPairs:this.mspConnectionPairs,inputProblem:this.inputProblem}),reserveNetLabelClearance:!1});return}this.currentConnectionPair&&this.failedConnectionPairs.push({...this.currentConnectionPair,error:this.activeSubSolver.error||void 0}),this.activeSubSolver=null,this.currentConnectionPair=null,this.retryingWithoutNetLabelClearance=!1}if(this.activeSubSolver){this.activeSubSolver.step();return}const t=this.queuedConnectionPairs.shift();if(!t){this.solved=!0;return}this.currentConnectionPair=t,this.retryingWithoutNetLabelClearance=!1;const n=t.pins.some(o=>{if(o._facingDirection)return!1;const i=this.chipMap[o.chipId];return i&&vve(o,i).length>1})?t.pins.map(o=>({...o})):t.pins;this.activeSubSolver=new VH({inputProblem:this.inputProblem,pins:n,connectionPair:t,chipMap:this.chipMap,preferExteriorDetours:fQt({connectionPair:t,allConnectionPairs:this.mspConnectionPairs,inputProblem:this.inputProblem})})}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});for(const{mspPairId:e,tracePath:n}of this.solvedTracePaths)t.lines.push({points:n,strokeColor:"green"});for(const e of this.failedConnectionPairs)t.lines.push({points:[{x:e.pins[0].x,y:e.pins[0].y},{x:e.pins[1].x,y:e.pins[1].y}],strokeColor:"red",strokeDash:"4 2"});return t}},rCo=({pts:t,segmentIndex:e,offset:n,JOG_SIZE:o,EPS:i=1e-6})=>{if(e!==0&&e!==t.length-2)return;const r=t[e],s=t[e+1],a=Math.abs(r.x-s.x)<i,A=Math.abs(r.y-s.y)<i;if(!a&&!A)return;const c=a?s.y>r.y?1:-1:s.x>r.x?1:-1;if(t.length===2){if(a){const l=r.y+c*o,u=s.y-c*o;t.splice(1,0,{x:r.x,y:l},{x:r.x+n,y:l},{x:s.x+n,y:u},{x:s.x,y:u})}else{const l=r.x+c*o,u=s.x-c*o;t.splice(1,0,{x:l,y:r.y},{x:l,y:r.y+n},{x:u,y:s.y+n},{x:u,y:s.y})}return}if(e===0)if(a){const l=r.y+c*o;t.splice(1,1,{x:r.x,y:l},{x:r.x+n,y:l},{x:s.x+n,y:s.y})}else{const l=r.x+c*o;t.splice(1,1,{x:l,y:r.y},{x:l,y:r.y+n},{x:s.x,y:s.y+n})}else if(a){const l=s.y-c*o;t.splice(e,1,{x:r.x+n,y:r.y},{x:s.x+n,y:l},{x:s.x,y:l})}else{const l=s.x-c*o;t.splice(e,1,{x:r.x,y:r.y+n},{x:l,y:s.y+n},{x:l,y:s.y})}},H7=1e-6,sCo=class extends Ng{overlappingTraceSegments;interactionKind;traceNetIslands;traceIdsToShift;obstacleRects;SHIFT_DISTANCE=.1;correctedTraceMap={};constructor(t){super(),this.overlappingTraceSegments=t.overlappingTraceSegments,this.interactionKind=t.interactionKind,this.traceNetIslands=t.traceNetIslands,this.traceIdsToShift=t.traceIdsToShift,this.obstacleRects=Hy(t.inputProblem);for(const{connNetId:e,pathsWithOverlap:n}of this.overlappingTraceSegments)for(const{solvedTracePathIndex:o,traceSegmentIndex:i}of n){const r=this.traceNetIslands[e][o].mspPairId;this.correctedTraceMap[r]=this.traceNetIslands[e][o]}}_step(){const t=A=>A.pathsWithOverlap.some(({solvedTracePathIndex:c})=>this.traceNetIslands[A.connNetId][c].tracePath.length===2),e=this.overlappingTraceSegments.map(A=>this.traceIdsToShift?A.pathsWithOverlap.every(({solvedTracePathIndex:c})=>{const l=this.traceNetIslands[A.connNetId][c];return!this.traceIdsToShift.has(l.mspPairId)}):t(A)),n=e.some(A=>!A),o=A=>this.overlappingTraceSegments.map((c,l)=>{if(n&&e[l])return 0;const u=Math.floor(l/2)+1,g=l%2===0?A:-A;return this.getObstacleAwareOffset({group:c,offset:g*u*this.SHIFT_DISTANCE})}),i=o(-1);if(this.interactionKind==="overlap"&&this.overlappingTraceSegments.some(A=>A.pathsWithOverlap.length>1)){this.correctedTraceMap=this.applyOffsets(i),this.solved=!0;return}const s=this.interactionKind==="overlap"?[i,o(1)]:[];if(this.interactionKind==="point_contact"){const A=this.overlappingTraceSegments.map((c,l)=>l).filter(c=>!n||!e[c]).reverse();for(const c of A){const l=this.overlappingTraceSegments[c];for(const u of[-1,1]){const g=this.overlappingTraceSegments.map(()=>0);g[c]=this.getObstacleAwareOffset({group:l,offset:u*this.SHIFT_DISTANCE}),s.push(g)}}}const a=s.map(A=>{const c=this.applyOffsets(A);return{correctedTraceMap:c,intersectionCount:this.countDifferentNetIntersections(c),totalDisplacement:A.reduce((l,u)=>l+Math.abs(u),0)}});a.sort((A,c)=>A.intersectionCount-c.intersectionCount||A.totalDisplacement-c.totalDisplacement),this.correctedTraceMap=a[0].correctedTraceMap,this.solved=!0}applyOffsets(t){const e={...this.correctedTraceMap},n=(i,r)=>Math.abs(i-r)<H7,o=(i,r)=>!!i&&!!r&&n(i.x,r.x)&&n(i.y,r.y);return this.overlappingTraceSegments.forEach((i,r)=>{const s=t[r];if(s===0)return;const a=new Map;for(const A of i.pathsWithOverlap)a.has(A.solvedTracePathIndex)||a.set(A.solvedTracePathIndex,new Set),a.get(A.solvedTracePathIndex).add(A.traceSegmentIndex);for(const[A,c]of a){const l=this.traceNetIslands[i.connNetId][A],u=e[l.mspPairId]??l,g=u.tracePath.map(I=>({...I})),h=Array.from(c).sort((I,C)=>I-C).reverse(),d=new Map;for(const I of h){const C=g[I],y=g[I+1];!C||!y||(Math.abs(C.x-y.x)<H7?d.set(I,"vertical"):Math.abs(C.y-y.y)<H7&&d.set(I,"horizontal"))}const p=new Set,m=new Set,_=this.SHIFT_DISTANCE;for(const I of h)if(!(I<0||I>=g.length-1))if(I===0||I===g.length-2)rCo({pts:g,segmentIndex:I,offset:s,JOG_SIZE:_,EPS:H7});else{const C=g[I],y=g[I+1],x=d.get(I);x==="vertical"?(p.has(I)||(C.x+=s,p.add(I)),p.has(I+1)||(y.x+=s,p.add(I+1))):x==="horizontal"&&(m.has(I)||(C.y+=s,m.add(I)),m.has(I+1)||(y.y+=s,m.add(I+1)))}const f=[];for(const I of g)(f.length===0||!o(f[f.length-1],I))&&f.push(I);e[l.mspPairId]={...u,tracePath:f}}}),e}countDifferentNetIntersections(t){const e=Object.values(this.traceNetIslands).flatMap(o=>o.map(i=>t[i.mspPairId]??i));let n=0;for(let o=0;o<e.length;o++){const i=e[o];for(let r=o+1;r<e.length;r++){const s=e[r];if(i.globalConnNetId!==s.globalConnNetId)for(let a=0;a<i.tracePath.length-1;a++)for(let A=0;A<s.tracePath.length-1;A++)X1(i.tracePath[a],i.tracePath[a+1],s.tracePath[A],s.tracePath[A+1])&&n++}}return n}getObstacleAwareOffset({group:t,offset:e}){const n=this.getBlockingCollisions({group:t,offset:e});if(n.length===0)return e;const o=a=>n.some(({start:A,isVertical:c,obstacle:l})=>{let u,g,h;c?(u=A.x,g=l.minX,h=l.maxX):(u=A.y,g=l.minY,h=l.maxY);const d=u+a;return u<=g+H7&&d>=h-H7||u>=h-H7&&d<=g+H7}),i=n.map(({start:a,isVertical:A,obstacle:c})=>A?{coord:a.x,lowEdge:c.minX,highEdge:c.maxX}:{coord:a.y,lowEdge:c.minY,highEdge:c.maxY}),r=a=>i.flatMap(({coord:c,lowEdge:l,highEdge:u})=>[l-c-a,u-c+a]).filter(c=>!o(c)).filter(c=>this.getBlockingCollisions({group:t,offset:c}).length===0).sort((c,l)=>Math.abs(c-e)-Math.abs(l-e))[0],s=this.SHIFT_DISTANCE/10;return r(this.SHIFT_DISTANCE)??r(s)??e}getBlockingCollisions({group:t,offset:e}){const n=[];for(const{solvedTracePathIndex:o,traceSegmentIndex:i}of t.pathsWithOverlap){const r=this.traceNetIslands[t.connNetId][o],s=r.tracePath[i],a=r.tracePath[i+1];if(!s||!a)continue;const A=Math.abs(s.x-a.x)<H7,c=Math.abs(s.y-a.y)<H7;if(!A&&!c)continue;const l=A?[{...s,x:s.x+e},{...a,x:a.x+e}]:[{...s,y:s.y+e},{...a,y:a.y+e}],u=HN(l,this.obstacleRects);u&&n.push({start:s,isVertical:A,obstacle:u.rect})}return n}visualize(){const t={lines:[],points:[],rects:[],circles:[]};for(const e of this.overlappingTraceSegments)for(const{solvedTracePathIndex:n,traceSegmentIndex:o}of e.pathsWithOverlap){const i=this.traceNetIslands[e.connNetId][n],r=i.tracePath[o],s=i.tracePath[o+1];t.lines.push({points:[r,s],strokeColor:"red"})}for(const e of Object.values(this.correctedTraceMap))t.lines.push({points:e.tracePath,strokeColor:"blue",strokeDash:"4 2"});return t}},IQt=1e-6,CQt=class extends Ng{inputProblem;inputTracePaths;globalConnMap;traceIdsToShift;traceNetIslands={};correctedTraceMap={};recentTraceStates=[];cleanupPhase=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputTracePaths=t.inputTracePaths,this.globalConnMap=t.globalConnMap,this.traceIdsToShift=t.traceIdsToShift;for(const e of this.inputTracePaths){const{mspPairId:n}=e;this.correctedTraceMap[n]=e}this.rememberTraceState(this.correctedTraceMap),this.traceNetIslands=this.computeTraceNetIslands()}getConstructorParams(){return{inputProblem:this.inputProblem,inputTracePaths:this.inputTracePaths,globalConnMap:this.globalConnMap,traceIdsToShift:this.traceIdsToShift}}computeTraceNetIslands(){const t={};for(const e of this.inputTracePaths){const n=this.correctedTraceMap[e.mspPairId]??e,o=n.globalConnNetId;t[o]||(t[o]=[]),t[o].push(n)}return t}findNextOverlapIssue(){const e=Object.keys(this.traceNetIslands);for(let n=0;n<e.length;n++)for(let o=n+1;o<e.length;o++){const i=e[n],r=e[o],s=this.traceNetIslands[i]||[],a=this.traceNetIslands[r]||[],A=[],c=[],l=[],u=new Set,g=new Set,h=(m,_,f,I)=>{const C=Math.min(m,_),y=Math.max(m,_),x=Math.min(f,I),E=Math.max(f,I);return Math.min(y,E)-Math.max(C,x)},d=({pathAIndex:m,segmentAIndex:_,pathBIndex:f,segmentBIndex:I,rangeOverlap:C})=>{if(C>.002){const M=`${m}:${_}`,k=`${f}:${I}`;u.has(M)||(A.push({solvedTracePathIndex:m,traceSegmentIndex:_}),u.add(M)),g.has(k)||(c.push({solvedTracePathIndex:f,traceSegmentIndex:I}),g.add(k));return}if(C<-.002)return;const y=s[m].tracePath,x=a[f].tracePath,E=y[_],B=y[_+1],S=x[I],Q=x[I+1];_===0||_===y.length-2||I===0||I===x.length-2||l.push({pathAIndex:m,segmentAIndex:_,pathBIndex:f,segmentBIndex:I,combinedLength:Math.abs(E.x-B.x)+Math.abs(E.y-B.y)+Math.abs(S.x-Q.x)+Math.abs(S.y-Q.y)})};for(let m=0;m<s.length;m++){const _=s[m],f=_.tracePath;for(let I=0;I<f.length-1;I++){const C=f[I],y=f[I+1],x=Math.abs(C.x-y.x)<.002,E=Math.abs(C.y-y.y)<.002;if(!(!x&&!E))for(let B=0;B<a.length;B++){const S=a[B];if(this.traceIdsToShift&&!this.traceIdsToShift.has(_.mspPairId)&&!this.traceIdsToShift.has(S.mspPairId))continue;const Q=S.tracePath;for(let w=0;w<Q.length-1;w++){const M=Q[w],k=Q[w+1],R=Math.abs(M.x-k.x)<.002,F=Math.abs(M.y-k.y)<.002;!R&&!F||(x&&R?Math.abs(C.x-M.x)<.002&&d({pathAIndex:m,segmentAIndex:I,pathBIndex:B,segmentBIndex:w,rangeOverlap:h(C.y,y.y,M.y,k.y)}):E&&F&&Math.abs(C.y-M.y)<.002&&d({pathAIndex:m,segmentAIndex:I,pathBIndex:B,segmentBIndex:w,rangeOverlap:h(C.x,y.x,M.x,k.x)}))}}}}if(A.length>0&&c.length>0)return{interactionKind:"overlap",overlappingTraceSegments:[{connNetId:i,pathsWithOverlap:A},{connNetId:r,pathsWithOverlap:c}]};const p=l.sort((m,_)=>_.combinedLength-m.combinedLength)[0];if(p)return{interactionKind:"point_contact",overlappingTraceSegments:[{connNetId:i,pathsWithOverlap:[{solvedTracePathIndex:p.pathAIndex,traceSegmentIndex:p.segmentAIndex}]},{connNetId:r,pathsWithOverlap:[{solvedTracePathIndex:p.pathBIndex,traceSegmentIndex:p.segmentBIndex}]}]}}return null}findNextDiagonalSegment(){for(const e in this.correctedTraceMap){const n=this.correctedTraceMap[e].tracePath;for(let o=0;o<n.length-1;o++){const i=n[o],r=n[o+1],s=Math.abs(i.y-r.y)<.002,a=Math.abs(i.x-r.x)<.002;if(!s&&!a)return{mspPairId:e,tracePath:n,i:o,p1:i,p2:r}}}return null}findAndFixNextDiagonalSegment(){const t=this.findNextDiagonalSegment();if(!t)return!1;const{mspPairId:e,tracePath:n,i:o,p1:i,p2:r}=t,s=.002,a=o>0?n[o-1]:null,A=o+2<n.length?n[o+2]:null,c=a?Math.abs(a.x-i.x)<s:!1,l=a?Math.abs(a.y-i.y)<s:!1,u=A?Math.abs(r.x-A.x)<s:!1,g=A?Math.abs(r.y-A.y)<s:!1,h={x:i.x,y:r.y},d={x:r.x,y:i.y};let p=0;c&&p++,g&&p++;let m=0;l&&m++,u&&m++;const _=p<m?h:d;return n.splice(o+1,0,_),!0}_step(){if(this.activeSubSolver?.solved){const o={...this.correctedTraceMap,...this.activeSubSolver.correctedTraceMap};if(this.returnsToPreviousTraceState(o)){this.activeSubSolver=null,this.solved=!0;return}this.correctedTraceMap=o,this.rememberTraceState(o),this.activeSubSolver=null,this.traceNetIslands=this.computeTraceNetIslands()}if(this.activeSubSolver){this.activeSubSolver.step();return}const t=this.findNextOverlapIssue();if(t===null){if(this.cleanupPhase===null&&(this.cleanupPhase="diagonals"),this.cleanupPhase==="diagonals"){this.findAndFixNextDiagonalSegment()||(this.cleanupPhase="done",this.solved=!0);return}this.solved=!0;return}const{interactionKind:e,overlappingTraceSegments:n}=t;this.activeSubSolver=new sCo({inputProblem:this.inputProblem,interactionKind:e,overlappingTraceSegments:n,traceNetIslands:this.traceNetIslands,traceIdsToShift:this.traceIdsToShift})}rememberTraceState(t){this.recentTraceStates.push({...t}),this.recentTraceStates.length>2&&this.recentTraceStates.shift()}returnsToPreviousTraceState(t){if(this.recentTraceStates.length<2)return!1;const e=this.recentTraceStates[0],n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(const o of n){const i=t[o],r=e[o];if(!i||!r||i.tracePath.length!==r.tracePath.length)return!1;for(let s=0;s<i.tracePath.length;s++){const a=i.tracePath[s],A=r.tracePath[s];if(Math.abs(a.x-A.x)>IQt||Math.abs(a.y-A.y)>IQt)return!1}}return!0}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);t.circles=t.circles||[];for(const e of Object.values(this.correctedTraceMap))t.lines.push({points:e.tracePath,strokeColor:"purple"});if(this.cleanupPhase==="diagonals"){const e=this.findNextDiagonalSegment();e&&t.lines.push({points:[e.p1,e.p2],strokeColor:"red",strokeWidth:.05})}return t}},yle=class{chips;spatialIndex;spatialIndexIdToChip;constructor(t){this.chips=t.map(e=>({...e,bounds:Rve(e),spatialIndexId:null})),this.spatialIndexIdToChip=new Map,this.spatialIndex=new UH(t.length);for(const e of this.chips)e.spatialIndexId=this.spatialIndex.add(e.bounds.minX,e.bounds.minY,e.bounds.maxX,e.bounds.maxY),this.spatialIndexIdToChip.set(e.spatialIndexId,e);this.spatialIndex.finish()}getChipsInBounds(t){return this.spatialIndex.search(t.minX,t.minY,t.maxX,t.maxY).map(n=>this.spatialIndexIdToChip.get(n))}doesOrthogonalLineIntersectChip(t,e={}){const n=e.excludeChipIds??[],[o,i]=t,{x:r,y:s}=o,{x:a,y:A}=i;return this.getChipsInBounds({minX:Math.min(r,a),minY:Math.min(s,A),maxX:Math.max(r,a),maxY:Math.max(s,A)}).filter(l=>!n.includes(l.chipId)).length>0}};function O7(t,e,n,o=1e-9){const i=Math.abs(t.x-e.x)<o,r=Math.abs(t.y-e.y)<o;if(!i&&!r)return!1;if(i){const s=t.x;if(s<n.minX-o||s>n.maxX+o)return!1;const a=Math.min(t.y,e.y),A=Math.max(t.y,e.y);return Math.min(A,n.maxY)-Math.max(a,n.minY)>o}else{const s=t.y;if(s<n.minY-o||s>n.maxY+o)return!1;const a=Math.min(t.x,e.x),A=Math.max(t.x,e.x);return Math.min(A,n.maxX)-Math.max(a,n.minX)>o}}function Tve(t,e,n,o){for(const[i,r]of Object.entries(e)){const s=r.tracePath;for(let a=0;a<s.length-1;a++)if(!(i===n&&a===o)&&O7(s[a],s[a+1],t))return{hasIntersection:!0,mspPairId:i,segIndex:a}}return{hasIntersection:!1}}function yQt(t){let e=0;const n=t.tracePath;for(let o=0;o<n.length-1;o++)e+=Math.abs(n[o+1].x-n[o].x)+Math.abs(n[o+1].y-n[o].y);return e}function xQt(t){const{inputProblem:e,inputTraceMap:n,globalConnNetId:o,fallbackTrace:i,mspConnectionPairIds:r}=t,s=Object.fromEntries(e.chips.map(g=>[g.chipId,g]));let a=Object.values(n).filter(g=>g.globalConnNetId===o);if(r&&r.length>0){const g=new Set(r);a=a.filter(h=>h.mspConnectionPairIds.some(d=>g.has(d)))}const A=new Set;for(const g of a)A.add(g.pins[0].chipId),A.add(g.pins[1].chipId);let c=null,l=-1;for(const g of A){const d=s[g]?.pins?.length??0;d>l&&(l=d,c=g)}const u=c==null?[]:a.filter(g=>g.pins[0].chipId===c||g.pins[1].chipId===c);return u.length>0?u.reduce((g,h)=>yQt(g)>=yQt(h)?g:h):i}function aCo(t,e){return[{x:t.x,y:t.y},{x:(t.x+e.x)/2,y:(t.y+e.y)/2},{x:e.x,y:e.y}]}function ACo(t){const{inputProblem:e,inputTraceMap:n,chipObstacleSpatialIndex:o,overlappingSameNetTraceGroup:i,availableOrientations:r,netLabelWidth:s,netLabelHeight:a}=t,A=i.portOnlyPinId;if(!A)return{placement:null,testedCandidates:[],error:"No portOnlyPinId provided"};let c=null,l=null;for(const E of e.chips){const B=E.pins.find(S=>S.pinId===A);if(B){c={x:B.x,y:B.y},l=B._facingDirection||W5(B,E);break}}if(!c||!l)return{placement:null,testedCandidates:[],error:`Port-only pin not found: ${A}`};const u=r.length>0?r:["x+","x-","y+","y-"],g={x:c.x,y:c.y},h=E=>E==="x+"?{x:1,y:0}:E==="x-"?{x:-1,y:0}:E==="y+"?{x:0,y:1}:{x:0,y:-1},d=[];for(const E of u){const{width:B,height:S}=_B({orientation:E,netLabelWidth:s,netLabelHeight:a}),Q=IC(g,E,B,S),w=h(E),M=.001,k={x:Q.x+w.x*M,y:Q.y+w.y*M},R=Ls(k,B,S);if(o.getChipsInBounds(R).length>0){d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:"chip-collision",hostSegIndex:-1});continue}if(KH(R,e)){d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:"text-collision",hostSegIndex:-1});continue}if(Tve(R,n,"",-1).hasIntersection){d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:"trace-collision",hostSegIndex:-1});continue}return d.push({center:k,width:B,height:S,bounds:R,anchor:g,orientation:E,status:"ok",hostSegIndex:-1}),{placement:{globalConnNetId:i.globalConnNetId,dcConnNetId:void 0,netId:i.netId,netLabelText:i.netLabelText,mspConnectionPairIds:[],pinIds:[A],orientation:E,anchorPoint:g,width:B,height:S,center:k},testedCandidates:d}}const p=l,{width:m,height:_}=_B({orientation:p,netLabelWidth:s}),f=IC(g,p,m,_),I=h(p),C=.001,y={x:f.x+I.x*C,y:f.y+I.y*C};return{placement:{globalConnNetId:i.globalConnNetId,dcConnNetId:void 0,netId:i.netId,netLabelText:i.netLabelText,mspConnectionPairIds:[],pinIds:[A],orientation:p,anchorPoint:g,width:m,height:_,center:y},testedCandidates:d}}function cCo(t){const e=zh(t.inputProblem),n=t.overlappingSameNetTraceGroup.globalConnNetId,o=xQt({inputProblem:t.inputProblem,inputTraceMap:t.inputTraceMap,globalConnNetId:n,fallbackTrace:t.overlappingSameNetTraceGroup.overlappingTraces});Mc(n,.9),Mc(n,.5);for(const i of Object.values(t.inputTraceMap))o&&(i.mspPairId,o.mspPairId),e.lines.push({points:i.tracePath});for(const i of t.testedCandidates){const r=i.status==="ok"?"rgba(0, 180, 0, 0.25)":i.status==="chip-collision"?"rgba(220, 0, 0, 0.25)":i.status==="trace-collision"?"rgba(220, 140, 0, 0.25)":i.status==="text-collision"?"rgba(160, 0, 220, 0.2)":"rgba(120, 120, 120, 0.15)",s=i.status==="ok"?"green":i.status==="chip-collision"?"red":i.status==="trace-collision"?"orange":i.status==="text-collision"?"purple":"gray",a=i.status==="ok"?"status: ok(valid net label candidate)":i.status==="chip-collision"?"status: chip-collision":i.status==="trace-collision"?"status: trace-collision":i.status==="text-collision"?"status: text-collision":"status: parallel-to-segment";e.rects.push({center:{x:(i.bounds.minX+i.bounds.maxX)/2,y:(i.bounds.minY+i.bounds.maxY)/2},width:i.width,height:i.height,fill:r,strokeColor:s,label:`${a}
orientation: ${i.orientation}`}),e.points.push({x:i.anchor.x,y:i.anchor.y,color:s,label:`anchor
orientation: ${i.orientation}`})}if(t.netLabelPlacement){const i=t.netLabelPlacement;e.rects.push({center:i.center,width:i.width,height:i.height,fill:"rgba(0, 128, 255, 0.35)",strokeColor:"blue",label:`netId: ${i.netId}
globalConnNetId: ${i.globalConnNetId}`}),e.points.push({x:i.anchorPoint.x,y:i.anchorPoint.y,color:"blue",label:`anchor
orientation: ${i.orientation}`})}return e}var EQt=class extends Ng{inputProblem;inputTraceMap;overlappingSameNetTraceGroup;availableOrientations;chipObstacleSpatialIndex;netLabelWidth;netLabelHeight;netLabelPlacement=null;testedCandidates=[];constructor(t){super(),this.inputProblem=t.inputProblem,this.inputTraceMap=t.inputTraceMap,this.overlappingSameNetTraceGroup=t.overlappingSameNetTraceGroup,this.availableOrientations=t.availableOrientations,this.netLabelWidth=t.netLabelWidth,this.netLabelHeight=t.netLabelHeight,this.chipObstacleSpatialIndex=t.inputProblem._chipObstacleSpatialIndex??new yle(t.inputProblem.chips)}getConstructorParams(){return{inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,overlappingSameNetTraceGroup:this.overlappingSameNetTraceGroup,availableOrientations:this.availableOrientations,netLabelWidth:this.netLabelWidth,netLabelHeight:this.netLabelHeight}}_step(){if(this.netLabelPlacement){this.solved=!0;return}if(this.overlappingSameNetTraceGroup.portOnlyPinId){const u=ACo({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,chipObstacleSpatialIndex:this.chipObstacleSpatialIndex,overlappingSameNetTraceGroup:this.overlappingSameNetTraceGroup,availableOrientations:this.availableOrientations,netLabelWidth:this.netLabelWidth,netLabelHeight:this.netLabelHeight});if(this.testedCandidates.push(...u.testedCandidates),u.placement){this.netLabelPlacement=u.placement,this.solved=!0;return}this.failed=!0,this.error=u.error??"Could not place net label at port without collisions";return}const t=this.overlappingSameNetTraceGroup.globalConnNetId;let e=xQt({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,globalConnNetId:t,fallbackTrace:this.overlappingSameNetTraceGroup.overlappingTraces,mspConnectionPairIds:this.overlappingSameNetTraceGroup.mspConnectionPairIds});if(!e){this.failed=!0,this.error="No host trace found for net label placement";return}const n=new Set(this.overlappingSameNetTraceGroup.mspConnectionPairIds??[]),o=Object.values(this.inputTraceMap).filter(u=>u.globalConnNetId===t&&(n.size===0||u.mspConnectionPairIds.some(g=>n.has(g)))),i=this.availableOrientations.length===1?[e,...o.filter(u=>u.mspPairId!==e.mspPairId)]:[e],r=this.availableOrientations.length>0?this.availableOrientations:["x+","x-","y+","y-"],s=this.availableOrientations.length===1,a=(u,g)=>{switch(u){case"y+":return g.y;case"y-":return-g.y;case"x+":return g.x;case"x-":return-g.x}};let A=null,c=-1/0;const l=1e-6;for(const u of i){const g=u.tracePath.slice();for(let h=0;h<g.length-1;h++){const d=g[h],p=g[h+1],m=Math.abs(d.y-p.y)<l,_=Math.abs(d.x-p.x)<l;if(!m&&!_)continue;const f=m?["y+","y-"]:["x+","x-"],I=r.filter(y=>f.includes(y));if(I.length===0)continue;const C=aCo(d,p);for(const y of C)for(const x of I){const{width:E,height:B}=_B({orientation:x,netLabelWidth:this.netLabelWidth,netLabelHeight:this.netLabelHeight}),S=IC(y,x,E,B),Q=x==="x+"?{x:1,y:0}:x==="x-"?{x:-1,y:0}:x==="y+"?{x:0,y:1}:{x:0,y:-1},w=1e-4,M={x:S.x+Q.x*w,y:S.y+Q.y*w},k=Ls(M,E,B);if(this.chipObstacleSpatialIndex.getChipsInBounds(k).length>0){this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:"chip-collision",hostSegIndex:h});continue}if(KH(k,this.inputProblem)){this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:"text-collision",hostSegIndex:h});continue}if(Tve(k,this.inputTraceMap,u.mspPairId,h).hasIntersection){this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:"trace-collision",hostSegIndex:h});continue}if(this.testedCandidates.push({center:M,width:E,height:B,bounds:k,anchor:y,orientation:x,status:"ok",hostSegIndex:h}),s){const O=a(x,y);O>c+1e-9&&(c=O,A={anchor:y,orientation:x,width:E,height:B,center:S,hostSegIndex:h,dcConnNetId:u.dcConnNetId,mspPairId:u.mspPairId,pinIds:[u.pins[0].pinId,u.pins[1].pinId]});continue}this.netLabelPlacement={globalConnNetId:this.overlappingSameNetTraceGroup.globalConnNetId,dcConnNetId:u.dcConnNetId,netId:this.overlappingSameNetTraceGroup.netId,netLabelText:this.overlappingSameNetTraceGroup.netLabelText,mspConnectionPairIds:[u.mspPairId],pinIds:[u.pins[0].pinId,u.pins[1].pinId],orientation:x,anchorPoint:y,width:E,height:B,center:S},this.solved=!0;return}}}if(s&&A){this.netLabelPlacement={globalConnNetId:this.overlappingSameNetTraceGroup.globalConnNetId,dcConnNetId:A.dcConnNetId,netId:this.overlappingSameNetTraceGroup.netId,netLabelText:this.overlappingSameNetTraceGroup.netLabelText,mspConnectionPairIds:[A.mspPairId],pinIds:A.pinIds,orientation:A.orientation,anchorPoint:A.anchor,width:A.width,height:A.height,center:A.center},this.solved=!0;return}this.failed=!0,this.error="Could not place net label without collisions"}visualize(){return cCo(this)}},xle=({pinIds:t,traces:e})=>{const n=new Map;for(const s of t)n.set(s,new Set);const o=e.filter(s=>{if(s.pins.length!==2)return!1;const[a,A]=s.pins;return n.has(a.pinId)&&n.has(A.pinId)});for(const s of o){const[a,A]=s.pins;n.get(a.pinId).add(A.pinId),n.get(A.pinId).add(a.pinId)}const i=[],r=new Set;for(const s of t){if(r.has(s))continue;const a=[],A=[s];for(r.add(s);A.length>0;){const l=A.pop();a.push(l);for(const u of n.get(l)??[])r.has(u)||(r.add(u),A.push(u))}const c=new Set(a);i.push({pinIds:a,traces:o.filter(l=>l.pins.every(u=>c.has(u.pinId)))})}return i},BQt=class extends Ng{inputProblem;inputTraceMap;overlappingSameNetTraceGroups;queuedOverlappingSameNetTraceGroups;netLabelPlacements=[];failedGroups=[];currentGroup=null;triedAnyOrientationFallbackForCurrentGroup=!1;constructor(t){super(),this.inputProblem=t.inputProblem,this.inputTraceMap=t.inputTraceMap,this.overlappingSameNetTraceGroups=this.computeOverlappingSameNetTraceGroups(),this.queuedOverlappingSameNetTraceGroups=[...this.overlappingSameNetTraceGroups]}computeOverlappingSameNetTraceGroups(){const t={};for(const A of Object.values(this.inputTraceMap)){const c=A.globalConnNetId;t[c]||(t[c]=[]),t[c].push(A)}const{netConnMap:e}=mB(this.inputProblem),n=new Map;for(const A of this.inputProblem.chips)for(const c of A.pins)n.set(c.pinId,c);const o={},i={};for(const A of this.inputProblem.directConnections){if(A.netId){const[l,u]=A.pinIds;o[l]=A.netId,o[u]=A.netId}const c=A.netLabelText?.trim();if(c){const[l,u]=A.pinIds;i[l]=c,i[u]=c}}for(const A of this.inputProblem.netConnections)for(const c of A.pinIds){o[c]=A.netId;const l=A.netLabelText?.trim();l&&(i[c]=l)}const r=[],s=this.inputProblem.chips.flatMap(A=>A.pins.map(c=>c.pinId)),a=new Set;for(const A of s){const c=e.getNetConnectedToId(A);c&&a.add(c)}for(const A of a){const l=e.getIdsConnectedToNet(A).filter(u=>n.has(u));for(const u of xle({pinIds:l,traces:t[A]??[]})){const g=new Set(u.pinIds),h=u.traces;if(h.length>0){if(h.some(C=>C.suppressNetLabel))continue;const d=C=>{let y=0;const x=C.tracePath;for(let E=0;E<x.length-1;E++)y+=Math.abs(x[E+1].x-x[E].x)+Math.abs(x[E+1].y-x[E].y);return y};let p=h[0],m=d(p);for(let C=1;C<h.length;C++){const y=d(h[C]);y>m&&(p=h[C],m=y)}let _=h.find(C=>C.userNetId!=null)?.userNetId;if(!_){for(const C of g)if(o[C]){_=o[C];break}}const f=Array.from(new Set(h.flatMap(C=>C.mspConnectionPairIds??[C.mspPairId]))),I={globalConnNetId:A,netId:_,netLabelText:[...g].map(C=>i[C]).find(C=>!!C),overlappingTraces:p,mspConnectionPairIds:f};r.push(I)}else for(const d of g){const p=o[d];p&&r.push({globalConnNetId:A,netId:p,netLabelText:i[d],portOnlyPinId:d})}}}return r}getNetLabelWidthForGroup(t){const e=t.overlappingTraces?.pins.map(n=>n.pinId)??[];return t.portOnlyPinId&&e.push(t.portOnlyPinId),L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:e,isPortOnlyLabel:t.portOnlyPinId!==void 0})}getNetLabelHeightForGroup(t){if(t.netId){const n=this.inputProblem.netConnections.find(o=>o.netId===t.netId)?.netLabelHeight;if(n!==void 0)return n}const e=t.overlappingTraces?.pins.map(n=>n.pinId)??[];return t.portOnlyPinId&&e.push(t.portOnlyPinId),this.inputProblem.netConnections.find(n=>n.pinIds.some(o=>e.includes(o)))?.netLabelHeight}_step(){if(this.activeSubSolver?.solved){this.netLabelPlacements.push(this.activeSubSolver.netLabelPlacement),this.activeSubSolver=null,this.currentGroup=null,this.triedAnyOrientationFallbackForCurrentGroup=!1;return}if(this.activeSubSolver?.failed){const i=["x+","x-","y+","y-"],r=this.activeSubSolver.availableOrientations,s=r.length===4&&i.every(a=>r.includes(a));if(!this.triedAnyOrientationFallbackForCurrentGroup&&!s&&this.currentGroup){this.triedAnyOrientationFallbackForCurrentGroup=!0;const a=this.getNetLabelWidthForGroup(this.currentGroup),A=this.getNetLabelHeightForGroup(this.currentGroup);this.activeSubSolver=new EQt({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,overlappingSameNetTraceGroup:this.currentGroup,availableOrientations:i,netLabelWidth:a,netLabelHeight:A});return}this.currentGroup&&this.failedGroups.push(this.currentGroup),this.activeSubSolver=null,this.currentGroup=null,this.triedAnyOrientationFallbackForCurrentGroup=!1;return}if(this.activeSubSolver){this.activeSubSolver.step();return}const t=this.queuedOverlappingSameNetTraceGroups.shift();if(!t){this.solved=!0;return}const e=t.netId??t.globalConnNetId;this.currentGroup=t,this.triedAnyOrientationFallbackForCurrentGroup=!1;const n=this.getNetLabelWidthForGroup(this.currentGroup),o=this.getNetLabelHeightForGroup(this.currentGroup);this.activeSubSolver=new EQt({inputProblem:this.inputProblem,inputTraceMap:this.inputTraceMap,overlappingSameNetTraceGroup:t,availableOrientations:this.inputProblem.availableNetLabelOrientations[e]??["x+","x-","y+","y-"],netLabelWidth:n,netLabelHeight:o})}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);for(const e of Object.values(this.inputTraceMap))t.lines.push({points:e.tracePath,strokeColor:"purple"});for(const e of this.netLabelPlacements)t.rects.push({center:e.center,width:e.width,height:e.height,fill:Mc(e.globalConnNetId,.35),strokeColor:Mc(e.globalConnNetId,.9),label:`netId: ${e.netId}
globalConnNetId: ${e.globalConnNetId}`}),t.points.push({x:e.anchorPoint.x,y:e.anchorPoint.y,color:Mc(e.globalConnNetId,.9),label:`anchorPoint
orientation: ${e.orientation}`});return t}},lCo="#ef4444",uCo="#000000",gCo="66",dCo=(t,e)=>{const n=e.availableNetLabelOrientations;if(n)for(const o of t.rects??[]){const i=hCo(o.label,n);if(!i)continue;const r=i.includes("y+"),s=i.includes("y-");if(r===s)continue;const a=r?lCo:uCo;o.fill=`${a}${gCo}`,o.stroke=a,o.color=a}},hCo=(t,e)=>{for(const n of pCo(t))if(Object.hasOwn(e,n))return e[n]},pCo=t=>t?[t.match(/^netId: (.+)$/m)?.[1],t.match(/^globalConnNetId: (.+)$/m)?.[1]].filter(e=>!!(e&&e!=="undefined")):[],mCo=({labels:t,chips:e})=>{const n={},o=new Map(e.flatMap(i=>i.pins.map(r=>[r.pinId,i.chipId])));for(const i of t){if(i.pinIds.length===0)continue;const r=i.pinIds[0],a=(r.includes(".")?r.split(".")[0]:void 0)??o.get(r);if(!a)continue;const A=`${a}-${i.orientation}`;n[A]||(n[A]=[]),n[A].push(i)}return n},_Co=(t,e)=>{if(t.length===0)throw new Error("Cannot merge an empty group of labels.");let n=1/0,o=1/0,i=-1/0,r=-1/0;const s=new Set,a=new Set,A=new Set;for(const p of t){const m=Ls(p.center,p.width,p.height);n=Math.min(n,m.minX),o=Math.min(o,m.minY),i=Math.max(i,m.maxX),r=Math.max(r,m.maxY),p.pinIds.forEach(_=>s.add(_)),p.mspConnectionPairIds.forEach(_=>a.add(_)),A.add(p.globalConnNetId)}const c=i-n,l=r-o,u={x:n+c/2,y:o+l/2},g=t[0],h=`merged-group-${e}`;return{mergedLabel:{...g,globalConnNetId:h,center:u,width:c,height:l,pinIds:Array.from(s),mspConnectionPairIds:Array.from(a)},originalNetIds:A}},fCo=({labels:t,traces:e,distanceThreshold:n=.5})=>{const o=new Map;if(!e)throw new Error("No traces provided to filterLabelsAtTraceEdges");for(const r of e)r.globalConnNetId&&(o.has(r.globalConnNetId)||o.set(r.globalConnNetId,[]),o.get(r.globalConnNetId).push(r));const i=[];for(const r of t){if(r.mspConnectionPairIds.length===0){i.push(r);continue}const s=o.get(r.globalConnNetId);let a=!1;if(!(!s||s.length===0)){for(const A of s){if(A.tracePath.length===0)continue;const c=A.tracePath[0],l=A.tracePath[A.tracePath.length-1],u=ad(r.center,c),g=ad(r.center,l);if(u<=n||g<=n){a=!0;break}}a&&i.push(r)}}return i},bQt=class extends Ng{input;output;inputProblem;traces;pipelineStep="filtering_labels";filteredLabels=[];labelGroups={};groupKeysToProcess=[];finalPlacements=[];mergedLabelNetIdMap={};activeMergingGroupKey=null;constructor(t){super(),this.input=t,this.inputProblem=t.inputProblem,this.traces=t.traces,this.output={netLabelPlacements:t.netLabelPlacements,mergedLabelNetIdMap:{}}}_step(){switch(this.pipelineStep){case"filtering_labels":this.filteredLabels=fCo({labels:this.input.netLabelPlacements,traces:this.traces}),this.pipelineStep="grouping_labels";break;case"grouping_labels":this.labelGroups=mCo({labels:this.filteredLabels,chips:this.inputProblem.chips}),this.groupKeysToProcess=Object.keys(this.labelGroups),this.pipelineStep="merging_groups";break;case"merging_groups":if(this.groupKeysToProcess.length===0){this.pipelineStep="finalizing",this.activeMergingGroupKey=null;break}const t=this.groupKeysToProcess.pop();this.activeMergingGroupKey=t;const e=this.labelGroups[t];if(e.length>1){const{mergedLabel:i,originalNetIds:r}=_Co(e,t);this.finalPlacements.push(i),this.mergedLabelNetIdMap[i.globalConnNetId]=r}else this.finalPlacements.push(...e);break;case"finalizing":const n=new Set(this.finalPlacements.flatMap(i=>this.mergedLabelNetIdMap[i.globalConnNetId]?[...this.mergedLabelNetIdMap[i.globalConnNetId]]:[i.globalConnNetId])),o=this.input.netLabelPlacements.filter(i=>!n.has(i.globalConnNetId));this.output={netLabelPlacements:[...this.finalPlacements,...o],mergedLabelNetIdMap:this.mergedLabelNetIdMap},this.solved=!0;break}}getOutput(){return this.output}visualize(){const t=zh(this.inputProblem,{chipAlpha:.1,connectionAlpha:.1});t.rects||(t.rects=[]),t.lines||(t.lines=[]),t.points||(t.points=[]),t.texts||(t.texts=[]);const e=new Map;for(const n of this.input.netLabelPlacements)e.set(n.globalConnNetId,n);for(const n of this.traces){const o={points:n.tracePath.map(i=>({x:i.x,y:i.y})),strokeColor:"blue"};t.lines.push(o)}if(this.activeMergingGroupKey&&this.labelGroups[this.activeMergingGroupKey]){const n=this.labelGroups[this.activeMergingGroupKey];for(const o of n)t.rects.push({center:o.center,width:o.width,height:o.height,fill:"rgba(255, 165, 0, 0.5)",stroke:"orange"})}for(const n of this.output.netLabelPlacements){const o=n.globalConnNetId.startsWith("merged-group-"),i=Mc(n.globalConnNetId);if(o){t.rects.push({center:n.center,width:n.width,height:n.height,fill:i.replace(/, 1\)/,", 0.2)"),stroke:i,label:n.globalConnNetId});const r=this.output.mergedLabelNetIdMap[n.globalConnNetId];if(r)for(const s of r){const a=e.get(s);if(a){const A=Ls(a.center,a.width,a.height),c={x:A.minX,y:A.minY},l={x:A.maxX,y:A.minY},u={x:A.maxX,y:A.maxY},g={x:A.minX,y:A.maxY};t.lines.push({points:[c,l,u,g,c],strokeColor:i,strokeDash:"4 4"}),t.lines.push({points:[a.center,n.center],strokeColor:i,strokeDash:"2 2"})}}}else t.rects.push({center:n.center,width:n.width,height:n.height,stroke:i,label:n.globalConnNetId})}return t}},Jh=({traces:t,netLabels:e=[]})=>{const n=[];for(const o of t)for(const i of e){const r=Ls(i.center,i.width,i.height);for(let s=0;s<o.tracePath.length-1;s++){const a=o.tracePath[s],A=o.tracePath[s+1];if(O7(a,A,r)){if(o.globalConnNetId===i.globalConnNetId)break;n.push({trace:o,label:i});break}}}return n},ICo=({path:t,labelBounds:e,paddedBounds:n=e})=>{let o=-1,i=-1;for(let A=0;A<t.length-1;A++)O7(t[A],t[A+1],e)&&(o===-1&&(o=A),i=A);if(o===-1)return{firstInsideIndex:-1,lastInsideIndex:-1};const r=A=>A.x>n.minX&&A.x<n.maxX&&A.y>n.minY&&A.y<n.maxY;let s=o;for(;s>0&&r(t[s]);)s--;let a=i+1;for(;a<t.length-1&&r(t[a]);)a++;return{firstInsideIndex:s+1,lastInsideIndex:a-1}},CCo=({initialTrace:t,firstInsideIndex:e,lastInsideIndex:n,labelBounds:o,paddingBuffer:i,detourCount:r})=>{if(e<=0||n>=t.tracePath.length-1)return[];const s=t.tracePath[e-1],a=t.tracePath[n+1],A=t.tracePath.slice(0,e),c=t.tracePath.slice(n+1),l=[];s.x!==a.x&&s.y!==a.y?(l.push([{x:a.x,y:s.y}]),l.push([{x:s.x,y:a.y}])):(s.x===a.x||s.y===a.y)&&l.push([]);const u=i+r*i,g=o.minX-u,h=o.maxX+u,d=o.maxY+u,p=o.minY-u;return(s.x<=o.minX||a.x<=o.minX)&&s.x<o.maxX&&a.x<o.maxX&&l.push([{x:g,y:s.y},{x:g,y:a.y}]),(s.x>=o.maxX||a.x>=o.maxX)&&s.x>o.minX&&a.x>o.minX&&l.push([{x:h,y:s.y},{x:h,y:a.y}]),(s.y>=o.maxY||a.y>=o.maxY)&&s.y>o.minY&&a.y>o.minY&&l.push([{x:s.x,y:d},{x:a.x,y:d}]),(s.y<=o.minY||a.y<=o.minY)&&s.y<o.maxY&&a.y<o.maxY&&l.push([{x:s.x,y:p},{x:a.x,y:p}]),l.map(m=>[...A,...m,...c])},yCo=({initialTrace:t,label:e,labelBounds:n,paddingBuffer:o,detourCount:i})=>{const r=e.globalConnNetId.startsWith("merged-group-"),s=o+i*o,a={minX:n.minX-s,maxX:n.maxX+s,minY:n.minY-s,maxY:n.maxY+s};let A,c,l,u;const g=m=>m.x>=a.minX&&m.x<=a.maxX&&m.y>=a.minY&&m.y<=a.maxY;if(r){let m=-1;for(let f=0;f<t.tracePath.length;f++)if(g(t.tracePath[f])){m=f;break}if(m===-1)return[];l=Math.max(0,m-1),A=t.tracePath[l];let _=-1;for(let f=m;f<t.tracePath.length;f++)if(!g(t.tracePath[f])){_=f;break}_===-1?u=t.tracePath.length-1:u=_,c=t.tracePath[u]}else{let m=-1,_=-1;for(let f=0;f<t.tracePath.length-1;f++)CC(t.tracePath[f],t.tracePath[f+1],{...n})&&(m===-1&&(m=f),_=f);if(m===-1)return[];l=m,u=_+1,A=t.tracePath[l],c=t.tracePath[u]}if(!A||!c||l>=u)return[];const h=[],d=c.x-A.x,p=c.y-A.y;if(Math.abs(d)>Math.abs(p)){const m=[a.maxY,a.minY];for(const _ of m)h.push(d>0?[{x:a.minX,y:A.y},{x:a.minX,y:_},{x:a.maxX,y:_},{x:a.maxX,y:c.y}]:[{x:a.maxX,y:A.y},{x:a.maxX,y:_},{x:a.minX,y:_},{x:a.minX,y:c.y}])}else{const m=[a.maxX,a.minX];for(const _ of m)h.push(p>0?[{x:A.x,y:a.minY},{x:_,y:a.minY},{x:_,y:a.maxY},{x:c.x,y:a.maxY}]:[{x:A.x,y:a.maxY},{x:_,y:a.maxY},{x:_,y:a.minY},{x:c.x,y:a.minY}])}return h.map(m=>[...t.tracePath.slice(0,l),A,...m,c,...t.tracePath.slice(u+1)])},Qa=t=>{if(t.length<3)return t;const e=[t[0]];for(let o=1;o<t.length-1;o++){const i=e[e.length-1],r=t[o],s=t[o+1];e1(i,r)&&e1(r,s)||X_(i,r)&&X_(r,s)||e.push(r)}if(e.push(t[t.length-1]),e.length<3)return e;const n=[e[0]];for(let o=1;o<e.length-1;o++){const i=n[n.length-1],r=e[o],s=e[o+1];e1(i,r)&&e1(r,s)||X_(i,r)&&X_(r,s)||n.push(r)}return n.push(e[e.length-1]),n},SQt=({trace:t,label:e,paddingBuffer:n,detourCount:o})=>{const i={...t,tracePath:Qa(t.tracePath)};if(t.globalConnNetId===e.globalConnNetId)return[i.tracePath];const r=Ls(e.center,e.width,e.height),s={minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY,chipId:`netlabel-${e.netId}`},a=yCo({initialTrace:i,label:e,labelBounds:s,paddingBuffer:n,detourCount:o}),A=n+o*n,c={minX:s.minX-A,maxX:s.maxX+A,minY:s.minY-A,maxY:s.maxY+A},{firstInsideIndex:l,lastInsideIndex:u}=ICo({path:i.tracePath,labelBounds:s,paddedBounds:c}),g=CCo({initialTrace:i,firstInsideIndex:l,lastInsideIndex:u,labelBounds:s,paddingBuffer:n,detourCount:o});return[...a,...g]},G7=.002,xCo=1e-6,QQt=.02,vQt=QQt+xCo,ECo=QQt*3,nw=(t,e)=>wQt(t,e.map(n=>n.tracePath)),wQt=(t,e)=>{const n=(o,i,r,s)=>Math.min(Math.max(o,i),Math.max(r,s))-Math.max(Math.min(o,i),Math.min(r,s))>G7;for(let o=0;o<t.length-1;o++){const i=t[o],r=t[o+1],s=Math.abs(i.x-r.x)<G7,a=Math.abs(i.y-r.y)<G7;if(!s&&!a)continue;const A=s?"x":"y",c=s?"y":"x";for(const l of e)for(let u=0;u<l.length-1;u++){const g=l[u],h=l[u+1];if(!(!(Math.abs(g[A]-h[A])<G7)||!(Math.abs(i[A]-g[A])<G7))&&n(i[c],r[c],g[c],h[c]))return!0}}return!1},PQt=(t,e)=>{const n=vQt/2,o=(i,r,s)=>s?{minX:i.x-n,maxX:i.x+n,minY:Math.min(i.y,r.y),maxY:Math.max(i.y,r.y)}:{minX:Math.min(i.x,r.x),maxX:Math.max(i.x,r.x),minY:i.y-n,maxY:i.y+n};for(let i=0;i<t.length-1;i++){const r=t[i],s=t[i+1],a=Math.abs(r.x-s.x)<G7,A=Math.abs(r.y-s.y)<G7;if(!a&&!A)continue;const c=o(r,s,a);for(const l of e)for(let u=0;u<l.tracePath.length-1;u++){const g=l.tracePath[u],h=l.tracePath[u+1];if(!(a?Math.abs(g.x-h.x)<G7:Math.abs(g.y-h.y)<G7))continue;const p=fct(c,o(g,h,a));if(!p)continue;if((a?p.maxY-p.minY:p.maxX-p.minX)>G7)return!0}}return!1},BCo=5,bCo=1e-9,MQt=t=>{let e=0;for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},Ele=class extends Ng{queuedCandidatePaths;solvedTracePath=null;initialTrace;problem;obstacles;label;tracesToAvoidOverlapping;netLabelPlacements;detourCount;_tried=0;constructor(t){super(),this.initialTrace=t.trace,this.problem=t.problem,this.label=t.label,this.detourCount=t.detourCount,this.tracesToAvoidOverlapping=(t.tracesToAvoidOverlapping??[]).filter(r=>r.globalConnNetId!==t.trace.globalConnNetId),this.netLabelPlacements=t.netLabelPlacements??[t.label],this.obstacles=Hy(this.problem);const e=t.paddingBuffer+t.detourCount*t.paddingBuffer,n=SQt({...t,paddingBuffer:e}),o=r=>Jh({traces:[{...this.initialTrace,tracePath:r}],netLabels:this.netLabelPlacements}).length,i=new Map;for(const r of n){const s=Qa(r);i.set(s.map(a=>`${a.x},${a.y}`).join(";"),s)}this.queuedCandidatePaths=[...i.values()].sort((r,s)=>{const a=MQt(r)-MQt(s);if(Math.abs(a)>=bCo)return a;const A=o(r)-o(s);return A!==0?A:r.length-s.length})}_step(){if(this.queuedCandidatePaths.length===0||this._tried>=BCo){this.failed=!0;return}this._tried++;const t=this.queuedCandidatePaths.shift(),e=Qa(t),n=Jh({traces:[{...this.initialTrace,tracePath:e}],netLabels:[this.label]}).length>0,o=Qa(this.initialTrace.tracePath),i=Jh({traces:[{...this.initialTrace,tracePath:o}],netLabels:this.netLabelPlacements}),r=Jh({traces:[{...this.initialTrace,tracePath:e}],netLabels:this.netLabelPlacements});!n&&r.length<=i.length&&!ON(e,this.obstacles)&&!nw(e,this.tracesToAvoidOverlapping)&&(this.solvedTracePath=e,this.solved=!0)}visualize(){const t=zh(this.problem,{chipAlpha:.1,connectionAlpha:.1});return t.lines||(t.lines=[]),t.rects||(t.rects=[]),t.lines.push({points:this.initialTrace.tracePath,strokeColor:"red",strokeDash:"4 4"}),t.rects.push({center:this.label.center,width:this.label.width,height:this.label.height,fill:"rgba(255, 0, 0, 0.2)"}),!this.solvedTracePath&&this.queuedCandidatePaths.length>0&&t.lines.push({points:this.queuedCandidatePaths[0],strokeColor:"orange"}),this.solvedTracePath&&t.lines.push({points:this.solvedTracePath,strokeColor:"green"}),t}},SCo=({trace:t,label:e})=>{if(t.tracePath.length<2)return!1;const n={...t,tracePath:[t.tracePath[0],t.tracePath[1]]};if(Jh({traces:[n],netLabels:[e]}).length>0)return!0;if(t.tracePath.length>2){const i=t.tracePath[t.tracePath.length-1],r=t.tracePath[t.tracePath.length-2],s={...t,tracePath:[r,i]};if(Jh({traces:[s],netLabels:[e]}).length>0)return!0}return!1},QCo=t=>{const{decomposedChildLabels:e,collidingTrace:n,mergedLabel:o,graphics:i}=t;i.rects||(i.rects=[]),i.texts||(i.texts=[]);for(const r of e){const s=r.globalConnNetId===n.globalConnNetId;i.rects.push({center:r.center,width:r.width,height:r.height,fill:s?"green":"red"})}return i.texts.push({x:o.center.x,y:o.center.y+o.height/2+.5,text:`DECOMPOSITION: Trace ${n.mspPairId} vs Merged Label ${o.globalConnNetId}`,fontSize:.3,color:"blue"}),i},vCo=class extends Ng{inputProblem;initialNetLabelPlacements;mergedNetLabelPlacements;mergedLabelNetIdMap;allTraces;tracesToAvoidOverlapping;modifiedTraces=[];completedReroutes=[];PADDING_BUFFER=.1;detourCounts=new Map;activeSubSolver=null;overlapQueue=[];activeOverlap=null;recentlyFailed=new Set;currentlyProcessingOverlap=null;decomposedChildLabels=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.initialNetLabelPlacements=t.initialNetLabelPlacements,this.mergedNetLabelPlacements=t.mergedNetLabelPlacements,this.mergedLabelNetIdMap=t.mergedLabelNetIdMap,this.allTraces=[...t.traces],this.tracesToAvoidOverlapping=t.tracesToAvoidOverlapping??[],this.detourCounts=t.detourCounts}_step(){if(this.currentlyProcessingOverlap=null,this.decomposedChildLabels=null,this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const o=this.activeSubSolver.solvedTracePath;if(o){this.completedReroutes.push({initialTrace:{...this.activeSubSolver.initialTrace,tracePath:this.activeSubSolver.initialTrace.tracePath.map(r=>({...r}))},reroutedTracePath:o.map(r=>({...r})),label:this.activeSubSolver.label,detourCount:this.activeSubSolver.detourCount});const i=this.allTraces.findIndex(r=>r.mspPairId===this.activeSubSolver.initialTrace.mspPairId);i!==-1&&(this.allTraces[i].tracePath=o,this.modifiedTraces.push(this.allTraces[i]))}this.activeSubSolver=null,this.activeOverlap=null,this.recentlyFailed.clear()}else if(this.activeSubSolver.failed){const o=`${this.activeOverlap.trace.mspPairId}-${this.activeOverlap.label.globalConnNetId}`;this.recentlyFailed.add(o),this.activeSubSolver=null,this.activeOverlap=null}return}const t=Jh({traces:this.allTraces,netLabels:this.mergedNetLabelPlacements});if(t.length===0){this.solved=!0;return}const e=t.filter(o=>{const i=`${o.trace.mspPairId}-${o.label.globalConnNetId}`;return!this.recentlyFailed.has(i)});if(e.length===0){this.solved=!0;return}this.overlapQueue=e;const n=this.overlapQueue.shift();if(this.currentlyProcessingOverlap=n??null,n){const o=this.allTraces.find(A=>A.mspPairId===n.trace.mspPairId),i=n.label,r=this.mergedLabelNetIdMap[i.globalConnNetId];if(r?.has(o.globalConnNetId)){const A=this.initialNetLabelPlacements.filter(l=>r.has(l.globalConnNetId));this.decomposedChildLabels=A;let c=null;for(const l of A)if(Jh({traces:[o],netLabels:[l]}).length>0){c=l;break}if(c){const l=this.detourCounts.get(c.globalConnNetId)??0;this.detourCounts.set(c.globalConnNetId,l+1),this.activeOverlap=n,this.activeSubSolver=new Ele({trace:o,label:c,problem:this.inputProblem,paddingBuffer:this.PADDING_BUFFER,detourCount:l,tracesToAvoidOverlapping:this.tracesToAvoidOverlapping,netLabelPlacements:this.initialNetLabelPlacements})}else{const l=`${o.mspPairId}-${i.globalConnNetId}`;this.recentlyFailed.add(l)}return}if(r&&SCo({trace:o,label:i})){const A=this.initialNetLabelPlacements.filter(l=>r.has(l.globalConnNetId));this.decomposedChildLabels=A;let c=null;for(const l of A)if(Jh({traces:[o],netLabels:[l]}).length>0){c=l;break}if(c){const l=this.detourCounts.get(c.globalConnNetId)??0;this.detourCounts.set(c.globalConnNetId,l+1),this.activeOverlap=n,this.activeSubSolver=new Ele({trace:o,label:c,problem:this.inputProblem,paddingBuffer:this.PADDING_BUFFER,detourCount:l,tracesToAvoidOverlapping:this.tracesToAvoidOverlapping,netLabelPlacements:this.initialNetLabelPlacements})}else{const l=`${o.mspPairId}-${i.globalConnNetId}`;this.recentlyFailed.add(l)}return}const a=this.detourCounts.get(i.globalConnNetId)??0;this.detourCounts.set(i.globalConnNetId,a+1),this.activeOverlap=n,this.activeSubSolver=new Ele({trace:o,label:i,problem:this.inputProblem,paddingBuffer:this.PADDING_BUFFER,detourCount:a,tracesToAvoidOverlapping:this.tracesToAvoidOverlapping,netLabelPlacements:this.initialNetLabelPlacements})}}getOutput(){return{allTraces:this.allTraces,modifiedTraces:this.modifiedTraces,detourCounts:this.detourCounts}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);t.lines||(t.lines=[]);for(const e of this.allTraces)t.lines.push({points:e.tracePath,strokeColor:"purple"});if(this.currentlyProcessingOverlap){const{trace:e,label:n}=this.currentlyProcessingOverlap;t.lines.push({points:e.tracePath,strokeColor:"red"}),this.decomposedChildLabels?QCo({decomposedChildLabels:this.decomposedChildLabels,collidingTrace:e,mergedLabel:n,graphics:t}):(t.rects||(t.rects=[]),t.rects.push({center:n.center,width:n.width,height:n.height,fill:"yellow"}),t.texts||(t.texts=[]),t.texts.push({x:n.center.x,y:n.center.y+n.height/2+.5,text:`COLLISION: Trace ${e.mspPairId} vs Label ${n.globalConnNetId}`,fontSize:.3,color:"red"}))}return t}},wCo=class extends Ng{inputProblem;netLabelPlacements;unprocessedTraces=[];cleanTraces=[];subSolvers=[];phase="searching_for_overlaps";detourCounts=new Map;labelMergingSolver;allInputTraces;constructor(t){super(),this.inputProblem=t.inputProblem,this.unprocessedTraces=[...t.traces],this.allInputTraces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.cleanTraces=[],this.subSolvers=[]}_step(){if(this.phase==="searching_for_overlaps"){if(this.unprocessedTraces.length===0){this.phase="fixing_overlaps";return}const t=this.unprocessedTraces.shift(),e=Jh({traces:[t],netLabels:this.netLabelPlacements});if(e.length===0)this.cleanTraces.push(t);else{const n=e.map(s=>s.label),o=new bQt({netLabelPlacements:n,inputProblem:this.inputProblem,traces:[t]});o.solve();const i=o.getOutput(),r=new vCo({inputProblem:this.inputProblem,traces:[t],initialNetLabelPlacements:this.netLabelPlacements,mergedNetLabelPlacements:i.netLabelPlacements,mergedLabelNetIdMap:i.mergedLabelNetIdMap,detourCounts:this.detourCounts,tracesToAvoidOverlapping:this.allInputTraces.filter(s=>s.mspPairId!==t.mspPairId)});this.subSolvers.push(r)}}else if(this.phase==="fixing_overlaps"){if(this.subSolvers.every(t=>t.solved||t.failed)){this.labelMergingSolver||(this.labelMergingSolver=new bQt({netLabelPlacements:this.netLabelPlacements,inputProblem:this.inputProblem,traces:this.getOutput().traces}),this.labelMergingSolver.solve()),this.solved=!0;return}for(const t of this.subSolvers)!t.solved&&!t.failed&&t.step()}}getOutput(){const t=this.subSolvers.flatMap(e=>e.getOutput().allTraces);return{traces:[...this.cleanTraces,...t],completedReroutes:this.subSolvers.flatMap(e=>e.completedReroutes),netLabelPlacements:this.labelMergingSolver?.getOutput().netLabelPlacements??this.netLabelPlacements}}visualize(){const t=zh(this.inputProblem);t.lines||(t.lines=[]),t.rects||(t.rects=[]);for(const e of this.cleanTraces)t.lines.push({points:e.tracePath,strokeColor:"purple"});for(const e of this.subSolvers){const n=e.visualize();t.lines.push(...n.lines??[]),t.rects.push(...n.rects??[]),t.points.push(...n.points??[])}for(const e of this.netLabelPlacements){const n=Mc(e.globalConnNetId,.3);t.rects.push({center:e.center,width:e.width,height:e.height,fill:n,stroke:n.replace("0.3","1"),label:e.globalConnNetId})}return t}},PCo=t=>{for(const e of t.chips){const n=Rve(e);for(const o of e.pins){if(!(o.x>n.minX&&o.x<n.maxX&&o.y>n.minY&&o.y<n.maxY))continue;if(o._facingDirection){o._facingDirection==="x-"?o.x=n.minX:o._facingDirection==="x+"?o.x=n.maxX:o._facingDirection==="y-"?o.y=n.minY:o.y=n.maxY;continue}const r=o.x-n.minX,s=n.maxX-o.x,a=o.y-n.minY,A=n.maxY-o.y,c=Math.min(r,s,a,A);c===r?o.x=n.minX:c===s?o.x=n.maxX:c===a?o.y=n.minY:o.y=n.maxY,o._facingDirection=void 0}}},MCo=t=>{for(const e of t.chips){const n=e.width/2,o=e.height/2;let i=0,r=0;for(const A of e.pins){const c=Math.abs(A.x-e.center.x),l=Math.abs(A.y-e.center.y);c>i&&(i=c),l>r&&(r=l)}const s=Math.max(n,i),a=Math.max(o,r);if(s>n||a>o){e.width=s*2,e.height=a*2;for(const A of e.pins)A._facingDirection=void 0}}};function DCo(t,e){for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)for(let s=0;s<r.tracePath.length-1;s++){const a=r.tracePath[s],A=r.tracePath[s+1];if(X1(o,i,a,A))return!0}}return!1}var DQt=(t,e,n)=>{const o=t.maxMspPairDistance??uj,{extendedRailPinIds:i,separatedRailPinIds:r}=aQt(t,e,o),s=new Set,a=new Set;for(const u of t.netConnections){const g=e.getNetConnectedToId(u.netId);if(g){for(const h of u.pinIds)a.add(h);u.isGround&&s.add(g)}}const A=new Map;for(const u of t.chips){if(u.pins.length!==2||!u.pins.every(m=>a.has(m.pinId))||u.pins.some(m=>n.has(m.pinId)&&!i.has(m.pinId)))continue;const[g,h]=u.pins.map(m=>e.getNetConnectedToId(m.pinId));if(!g||!h||g===h||s.has(g)===s.has(h))continue;const d=JSON.stringify([u.sectionId??null,...[g,h].sort()]),p=A.get(d)??[];p.push(u.pins.map(m=>m.pinId)),A.set(d,p)}const c=new Set([...A.values()].filter(u=>u.length>1).flat(2));for(const u of[...i,...r])c.add(u);const l=new mle({});for(const u of t.directConnections)u.netLabelWidth===void 0&&l.addConnections([u.pinIds]);return(u,g)=>{if(!c.has(u.pinId)&&!c.has(g.pinId)||Math.abs(u.x-g.x)+Math.abs(u.y-g.y)<=o)return!0;const h=l.getNetConnectedToId(u.pinId);return h!==void 0&&h===l.getNetConnectedToId(g.pinId)}},NCo=3,Ble=(t,e)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),RCo=(t,e)=>Math.abs(t.x-e.x)+Math.abs(t.y-e.y),IB=1e-9,ble=(t,e,n)=>t>=Math.min(e,n)-IB&&t<=Math.max(e,n)+IB,TCo=(t,e,n,o)=>{const i=Math.abs(t.y-e.y)<=IB,r=Math.abs(t.x-e.x)<=IB,s=Math.abs(n.y-o.y)<=IB,a=Math.abs(n.x-o.x)<=IB;if(i&&a){const A={x:n.x,y:t.y};return ble(A.x,t.x,e.x)&&ble(A.y,n.y,o.y)?A:null}if(r&&s){const A={x:t.x,y:n.y};return ble(A.y,t.y,e.y)&&ble(A.x,n.x,o.x)?A:null}if(i&&s&&Math.abs(t.y-n.y)<=IB){const A=Math.max(Math.min(t.x,e.x),Math.min(n.x,o.x)),c=Math.min(Math.max(t.x,e.x),Math.max(n.x,o.x));return A>c+IB?null:{x:Math.max(A,Math.min(t.x,c)),y:t.y}}if(r&&a&&Math.abs(t.x-n.x)<=IB){const A=Math.max(Math.min(t.y,e.y),Math.min(n.y,o.y)),c=Math.min(Math.max(t.y,e.y),Math.max(n.y,o.y));return A>c+IB?null:{x:t.x,y:Math.max(A,Math.min(t.y,c))}}return null},kCo=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1],r=e.flatMap(A=>A.tracePath.slice(0,-1).flatMap((c,l)=>{const u=TCo(o,i,c,A.tracePath[l+1]);return u?[u]:[]}));r.sort((A,c)=>Ble(o,A)-Ble(o,c));const s=r[0];if(!s)continue;const a=t.slice(0,n+1);return Ble(a.at(-1),s)>IB&&a.push(s),a}return null},FCo=class extends Ng{constructor(t){super(),this.params=t;const{inputProblem:e,primaryMspConnectionPairs:n,alreadySolvedTraces:o}=this.params,i=nQt(e);this.inputProblem=e,this.allSolvedTraces=[...o],this.maxMspPairDistance=e.maxMspPairDistance??uj;const r=new Set;for(const u of n)r.add(u.pins[0].pinId),r.add(u.pins[1].pinId);const{netConnMap:s}=mB(e);this.netConnMap=s;const a=DQt(e,s,r),A=new Map;for(const u of e.chips){this.chipMap[u.chipId]=u;for(const g of u.pins)A.set(g.pinId,{...g,chipId:u.chipId})}this.queuedFailedConnectionPairs=this.params.failedConnectionPairs.filter(u=>i(u.pins[0].pinId,u.pins[1].pinId)&&GIo({inputProblem:this.inputProblem,chipMap:this.chipMap,pins:u.pins}));const c=[],l=new Set;for(const u of Object.keys(s.netMap)){const g=s.getIdsConnectedToNet(u);if(g.length<2)continue;const h=g.filter(d=>!r.has(d));for(const d of h){const p=A.get(d);if(!p)continue;const m=g.filter(_=>_!==d).flatMap(_=>{const f=A.get(_);return f?i(p.pinId,f.pinId)?a(p,f)?e.netConnections.some(C=>C.pinIds.length===2&&C.pinIds.includes(p.pinId)&&C.pinIds.includes(f.pinId))&&RCo(p,f)>this.maxMspPairDistance?[]:[{pin:f,distance:Ble(p,f)}]:[]:[]:[]}).sort((_,f)=>_.distance-f.distance).slice(0,NCo);for(const _ of m){const f=[p,_.pin];if(Zv(e,f[0],f[1]))continue;const I=f.map(C=>C.pinId).sort().join("--");l.has(I)||(c.push(f),l.add(I))}}}this.queuedCandidatePairs=c}params;solvedLongDistanceTraces=[];queuedCandidatePairs=[];currentCandidatePair=null;queuedFailedConnectionPairs=[];currentFailedConnectionPair=null;subSolver=null;chipMap={};inputProblem;netConnMap;newlyConnectedPinIds=new Set;allSolvedTraces=[];maxMspPairDistance;getConstructorParams(){return this.params}acceptFailedConnectionPair(t){const e=this.currentFailedConnectionPair;if(!e)return;const n={...e,tracePath:t,mspConnectionPairIds:[e.mspPairId],pinIds:e.pins.map(o=>o.pinId)};this.solvedLongDistanceTraces.push(n),this.allSolvedTraces.push(n);for(const o of e.pins)this.newlyConnectedPinIds.add(o.pinId)}_step(){if(this.subSolver?.solved&&this.currentFailedConnectionPair){const e=this.subSolver.solvedTracePath;e&&this.acceptFailedConnectionPair(e),this.subSolver=null,this.currentCandidatePair=null,this.currentFailedConnectionPair=null}else if(this.subSolver?.solved){const e=this.subSolver.solvedTracePath;if(e&&this.currentCandidatePair){const[n,o]=this.currentCandidatePair,i=this.netConnMap.getNetConnectedToId(n.pinId),r=this.allSolvedTraces.filter(d=>d.globalConnNetId===i),s=this.inputProblem.netConnections.find(d=>d.pinIds.length===3&&d.pinIds.includes(n.pinId)&&d.pinIds.includes(o.pinId)),a=this.chipMap[n.chipId],A=r.find(d=>d.pinIds.includes(o.pinId)&&d.pins.every(p=>p.chipId===o.chipId)),l=s!==void 0&&a?.pins.length===2&&A!==void 0?kCo(e,r):null,u=l??e,g=l?this.allSolvedTraces.filter(d=>d.globalConnNetId!==i):this.allSolvedTraces;if(!DCo(u,g)){const d=`${n.pinId}-${o.pinId}`,p={mspPairId:d,dcConnNetId:i,globalConnNetId:i,pins:[n,o],tracePath:u,mspConnectionPairIds:[d],pinIds:[n.pinId,o.pinId]};this.solvedLongDistanceTraces.push(p),this.allSolvedTraces.push(p),this.newlyConnectedPinIds.add(n.pinId),this.newlyConnectedPinIds.add(o.pinId)}}this.subSolver=null,this.currentCandidatePair=null}else this.subSolver?.failed&&(this.subSolver=null,this.currentCandidatePair=null,this.currentFailedConnectionPair=null);if(this.subSolver){this.subSolver.step();return}const t=this.queuedFailedConnectionPairs.shift();if(t){this.currentFailedConnectionPair=t,this.currentCandidatePair=t.pins,this.subSolver=new VH({inputProblem:this.params.inputProblem,pins:t.pins,chipMap:this.chipMap});return}for(;this.queuedCandidatePairs.length>0;){const e=this.queuedCandidatePairs.shift(),[n,o]=e;if(!(this.newlyConnectedPinIds.has(n.pinId)||this.newlyConnectedPinIds.has(o.pinId))){this.currentCandidatePair=e,this.subSolver=new VH({inputProblem:this.params.inputProblem,pins:this.currentCandidatePair,chipMap:this.chipMap});return}}this.solved=!0}visualize(){if(this.subSolver)return this.subSolver.visualize();const t=zh(this.inputProblem);for(const e of this.solvedLongDistanceTraces)t.lines.push({points:e.tracePath,strokeColor:"purple"});for(const[e,n]of this.queuedCandidatePairs)t.lines.push({points:[e,n],strokeColor:"gray",strokeDash:"4 4"});return t}getOutput(){return this.solved?{newTraces:this.solvedLongDistanceTraces,allTracesMerged:[...this.params.alreadySolvedTraces,...this.solvedLongDistanceTraces]}:{newTraces:[],allTracesMerged:this.params.alreadySolvedTraces}}},kve=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];for(const r of e){const s={center:{x:r.minX+(r.maxX-r.minX)/2,y:r.minY+(r.maxY-r.minY)/2},width:r.maxX-r.minX,height:r.maxY-r.minY};if(yQn(o,i,s)<=0)return!0}}return!1},j5=t=>{let e=0;for(let n=1;n<t.length-1;n++){const o=t[n-1],i=t[n],r=t[n+1],s=o.x===i.x,a=i.x===r.x;s!==a&&e++}return e},NQt=(t,e)=>{const n=[];return t.x===e.x||t.y===e.y?n.push([t,e]):(n.push([t,{x:e.x,y:t.y},e]),n.push([t,{x:t.x,y:e.y},e])),n},Oy=1e-9,RQt=(t,e,n,o)=>e>=n-Oy&&o>=t-Oy&&Math.min(e,o)-Math.max(t,n)<=Oy,TQt=(t,e)=>Math.abs(t.x-e.x)<=Oy&&Math.abs(t.y-e.y)<=Oy,LCo=({start:t,end:e,label:n,originalPath:o})=>{const i=Math.abs(t.x-e.x)<=Oy,r=Math.abs(t.y-e.y)<=Oy;if(!(i?Math.abs(t.x-n.minX)<=Oy||Math.abs(t.x-n.maxX)<=Oy:r?Math.abs(t.y-n.minY)<=Oy||Math.abs(t.y-n.maxY)<=Oy:!1))return!1;for(let a=0;a<o.length-1;a++){if(!(a===0||a===o.length-2))continue;const c=o[a],l=o[a+1],u=a===0?l:c;if(!(!TQt(t,u)&&!TQt(e,u))&&CC(c,l,n)&&(i&&Math.abs(c.x-l.x)<=Oy&&Math.abs(c.x-t.x)<=Oy&&RQt(Math.min(t.y,e.y),Math.max(t.y,e.y),Math.min(c.y,l.y),Math.max(c.y,l.y))||r&&Math.abs(c.y-l.y)<=Oy&&Math.abs(c.y-t.y)<=Oy&&RQt(Math.min(t.x,e.x),Math.max(t.x,e.x),Math.min(c.x,l.x),Math.max(c.x,l.x))))return!0}return!1},Sle=(t,e,n={})=>{for(let o=0;o<t.length-1;o++){const i=t[o],r=t[o+1];for(const s of e)if(CC(i,r,s)){if(n.originalPath&&LCo({start:i,end:r,label:s,originalPath:n.originalPath}))continue;return!0}}return!1},HCo=(t,e)=>{if(e>=t.length-3)return-1;let n=e,o=!0;for(let i=e;i<t.length-2&&i<e+10&&!(i+2>=t.length);i++){const r=t[i],s=t[i+1],a=t[i+2],A=r.x===s.x,c=s.x===a.x;if(A===c)break;const l=Math.sign(A?s.y-r.y:s.x-r.x);if(i>e){const u=t[i-1],g=u.x===r.x,h=Math.sign(g?r.y-u.y:r.x-u.x);if(A&&g&&l!==h||!A&&!g&&l!==h){o=!1;break}}n=i+2}return o&&n-e>=3?n:-1},zH=(t,e,n)=>{if(n.length<2)return!1;const o=n[0],i=n[n.length-1];return t.x===o.x&&t.y===o.y&&e.x===n[1].x&&e.y===n[1].y||t.x===n[n.length-2].x&&t.y===n[n.length-2].y&&e.x===i.x&&e.y===i.y},kQt=({path:t,obstacles:e,labelBounds:n,originalPath:o,allowLabelBoundaryExtension:i=!1})=>{if(t.length<=2)return t;let r=[...t],s=j5(r),a=!0;for(;a;){a=!1;for(let c=0;c<r.length-3;c++){const l=HCo(r,c);if(l>0){if(zH(r[c],r[c+1],o)||zH(r[l-1],r[l],o))continue;const u=r[c],g=r[l],h=NQt(u,g);for(const d of h){const p=[...r.slice(0,c+1),...d.slice(1,-1),...r.slice(l)],m=kve(d,e),_=Sle(d,n,i?{originalPath:o}:{});if(!m&&!_){const f=j5(p);r=p,s=f,a=!0;break}}if(a)break}}if(!a)for(let c=0;c<r.length-2;c++){const l=Math.min(r.length-c-2,r.length-2);for(let u=1;u<=l;u++){const g=c+u+1;if(g>=r.length||zH(r[c],r[c+1],o)||zH(r[g-1],r[g],o))continue;const h=r[c],d=r[g],p=NQt(h,d);for(const m of p){const _=[...r.slice(0,c+1),...m.slice(1,-1),...r.slice(g)],f=m,I=kve(f,e),C=Sle(f,n,i?{originalPath:o}:{});if(!I&&!C){const y=j5(_);if(y<s||y===s&&_.length<r.length){r=_,s=y,a=!0;break}}}if(a)break}if(a)break}if(!a)for(let c=0;c<r.length-2;c++){const l=r[c],u=r[c+1],g=r[c+2];if(zH(l,u,o)||zH(u,g,o))continue;const h=l.x===u.x&&u.x===g.x,d=l.y===u.y&&u.y===g.y;if(h||d){const p=[...r.slice(0,c+1),...r.slice(c+2)],m=kve([l,g],e),_=Sle([l,g],n,i?{originalPath:o}:{});if(!m&&!_){r=p,a=!0;break}}}}return Qa(r)},Gy=.002,Uc=(t,e)=>Math.abs(t-e)<Gy,CB=(t,e)=>Uc(t.y,e.y),Yy=(t,e)=>Uc(t.x,e.x),OCo=(t,e)=>Math.abs(t.x-e.x)>=Gy||Math.abs(t.y-e.y)>=Gy,JH=(t,e)=>OCo(t,e)?Yy(t,e)?"vertical":CB(t,e)?"horizontal":null:null,FQt=(t,e)=>Math.min(t.maxAlong,e.maxAlong)-Math.max(t.minAlong,e.minAlong)>=-Gy,fb=(t,e)=>Uc(t.x,e.x)&&Uc(t.y,e.y),Fve=t=>{const e=[];for(const n of t)e.some(o=>Uc(o,n))||e.push(n);return e},LQt=t=>{const e=[];for(const n of t){const o=e.find(i=>Uc(i[0].coordinate,n.coordinate));o?o.push(n):e.push([n])}return e.reduce((n,o)=>{const i=[...o].sort((c,l)=>c.min-l.min);let r=0,s=1,a=i[0].min,A=i[0].max;for(const c of i.slice(1))c.min<=A+Gy?A=Math.max(A,c.max):(r+=A-a,s++,a=c.min,A=c.max);return{length:n.length+r+A-a,segmentCount:n.segmentCount+s}},{length:0,segmentCount:0})},HQt=t=>{const e=[],n=[];for(const r of t)for(let s=0;s<r.tracePath.length-1;s++){const a=r.tracePath[s],A=r.tracePath[s+1];CB(a,A)?e.push({coordinate:a.y,min:Math.min(a.x,A.x),max:Math.max(a.x,A.x)}):Yy(a,A)&&n.push({coordinate:a.x,min:Math.min(a.y,A.y),max:Math.max(a.y,A.y)})}const o=LQt(e),i=LQt(n);return{length:o.length+i.length,segmentCount:o.segmentCount+i.segmentCount}},Y7=t=>HQt(t).length,Qle=t=>HQt(t).segmentCount,GCo=2.5,OQt=t=>{let e=0;for(let n=1;n<t.length;n++){const o=t[n-1],i=t[n];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},YCo=({inputProblem:t,trace:e})=>{const n=t.directConnections.find(a=>a.pinIds.every(A=>e.pinIds.includes(A)));if(!n)return e;const o={};for(const a of t.chips)o[a.chipId]=a;const i=new VH({pins:e.pins,connectionPair:e,inputProblem:{...t,directConnections:[n,...t.directConnections.filter(a=>a!==n)]},chipMap:o});if(i.solve(),!i.solvedTracePath)return e;const r=OQt(e.tracePath),s=OQt(i.solvedTracePath);return r<=s*GCo?e:{...e,tracePath:i.solvedTracePath}},UCo=1e-9,GQt=t=>t.slice(1).reduce((e,n,o)=>{const i=t[o];return e+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),KCo=({strictPath:t,boundaryPath:e})=>{const n=j5(e)<=j5(t),o=Math.abs(GQt(e)-GQt(t))<=UCo;return n&&o?e:t},YQt=({targetMspConnectionPairId:t,traces:e,inputProblem:n,allLabelPlacements:o,mergedLabelNetIdMap:i,paddingBuffer:r})=>{const s=e.find(w=>w.mspPairId===t);if(!s)throw new Error(`Target trace ${t} not found`);const a=YCo({inputProblem:n,trace:s}),A=new Set(a.pinIds),c=e.filter(w=>w.mspPairId!==t),l=c.filter(w=>{const M=w.pinIds.some(k=>A.has(k));return w.globalConnNetId!==a.globalConnNetId||!M}),u=.01,g=w=>w.flatMap((M,k)=>M.tracePath.slice(0,-1).map((R,F)=>{const O=M.tracePath[F+1];return{chipId:`trace-obstacle-${k}-${F}`,minX:Math.min(R.x,O.x)-u/2,minY:Math.min(R.y,O.y)-u/2,maxX:Math.max(R.x,O.x)+u/2,maxY:Math.max(R.y,O.y)+u/2}})),h=Hy(n),d=.01,p=h.map(w=>({...w,minX:w.minX-d,minY:w.minY-d,maxX:w.maxX+d,maxY:w.maxY+d})),m=a.tracePath,f=o.filter(w=>{const M=i[w.globalConnNetId];return M?!M.has(a.globalConnNetId):w.globalConnNetId!==a.globalConnNetId}).map(w=>({minX:w.center.x-w.width/2-r,maxX:w.center.x+w.width/2+r,minY:w.center.y-w.height/2-r,maxY:w.center.y+w.height/2+r})),I=w=>{const M=kQt({path:m,obstacles:w,labelBounds:f,originalPath:m}),k=kQt({path:m,obstacles:w,labelBounds:f,originalPath:m,allowLabelBoundaryExtension:!0});return KCo({strictPath:M,boundaryPath:k})},C=I([...p,...g(c)]),y=I([...p,...g(l)]),x=c.filter(w=>w.globalConnNetId===a.globalConnNetId),E=w=>{const M=[...x,{...a,tracePath:w}];return{segmentCount:Qle(M),visibleLength:Y7(M)}},B=j5(C),S=j5(y);let Q=C;if(S<B)Q=y;else if(S===B){const w=E(C),M=E(y);(M.segmentCount<w.segmentCount||M.segmentCount===w.segmentCount&&M.visibleLength<w.visibleLength-Gy)&&(Q=y)}return{...a,tracePath:Q}},VCo=({targetMspConnectionPairId:t,traces:e,inputProblem:n,allLabelPlacements:o,mergedLabelNetIdMap:i,paddingBuffer:r})=>{const s=e.find(I=>I.mspPairId===t);if(!s)throw new Error(`Target trace ${t} not found`);const a=1e-5,A=(I,C)=>Math.abs(I-C)<a,c=e.filter(I=>I.mspPairId!==t),l=.01,u=c.flatMap((I,C)=>I.tracePath.slice(0,-1).map((y,x)=>{const E=I.tracePath[x+1];return{chipId:`trace-obstacle-${C}-${x}`,minX:Math.min(y.x,E.x)-l/2,minY:Math.min(y.y,E.y)-l/2,maxX:Math.max(y.x,E.x)+l/2,maxY:Math.max(y.y,E.y)+l/2}})),h=[...Hy(n).map(I=>({...I,minX:I.minX+a,maxX:I.maxX-a,minY:I.minY+a,maxY:I.maxY-a})),...u],d=(I,C,y)=>{for(const x of y)if(CC(I,C,x))return!0;return!1},m=o.filter(I=>{const C=i[I.globalConnNetId];return C?!C.has(s.globalConnNetId):I.globalConnNetId!==s.globalConnNetId}).map(I=>({minX:I.center.x-I.width/2+a,maxX:I.center.x+I.width/2-a,minY:I.center.y-I.height/2+a,maxY:I.center.y+I.height/2-a})),_=[...s.tracePath];if(_.length<4)return{...s};if(_.length===4){const[I,C,y,x]=_;let E,B;if(A(I.y,C.y)&&A(C.x,y.x)&&A(y.y,x.y)){const w=(I.x+x.x)/2;E={x:w,y:C.y},B={x:w,y:y.y}}else{const w=(I.y+x.y)/2;E={x:C.x,y:w},B={x:y.x,y:w}}return d(I,E,h)||d(E,B,h)||d(B,x,h)||d(I,E,m)||d(E,B,m)||d(B,x,m)||(_[1]=E,_[2]=B),{...s,tracePath:Qa(_)}}for(let I=1;I<_.length-4;I++){const C=_[I],y=_[I+1],x=_[I+2],E=_[I+3],B=A(C.y,y.y)&&A(y.x,x.x)&&A(x.y,E.y),S=A(C.x,y.x)&&A(y.y,x.y)&&A(x.x,E.x),Q=A(C.y,y.y)&&A(y.y,x.y)&&A(x.y,E.y),w=A(C.x,y.x)&&A(y.x,x.x)&&A(x.x,E.x),M=Q||w;let k=!1;if(B?k=Math.sign(y.x-C.x)===Math.sign(E.x-x.x):S&&(k=Math.sign(y.y-C.y)===Math.sign(E.y-x.y)),!((B||S)&&!M&&k))continue;let F,O;const U=Math.abs(B?C.x-y.x:C.y-y.y),Y=Math.abs(B?x.x-E.x:x.y-E.y);if(Math.abs(U-Y)<.001)continue;if(B){const te=(C.x+E.x)/2;F={x:te,y:y.y},O={x:te,y:x.y}}else{const te=(C.y+E.y)/2;F={x:y.x,y:te},O={x:x.x,y:te}}d(C,F,h)||d(F,O,h)||d(O,E,h)||d(C,F,m)||d(F,O,m)||d(O,E,m)||(_[I+1]=F,_[I+2]=O,I=0)}const f=Qa(_);return{...s,tracePath:f}},UQt=(t,e,n)=>t==="vertical"?{minX:0,maxX:0,minY:e,maxY:n}:{minX:e,maxX:n,minY:0,maxY:0},zCo=(t,e,n)=>{const o=fct(e,n);return o?(t==="vertical"?o.maxY-o.minY:o.maxX-o.minX)>Gy:!1},JCo=({group:t,originalCoordinates:e,otherNetTraces:n})=>{const o=t[0].orientation,i=t.map(a=>UQt(o,a.minAlong,a.maxAlong)),r=ECo,s=[];for(const a of n)for(let A=0;A<a.tracePath.length-1;A++){const c=a.tracePath[A],l=a.tracePath[A+1];if(JH(c,l)!==o)continue;const u=o==="vertical"?Math.min(c.y,l.y):Math.min(c.x,l.x),g=o==="vertical"?Math.max(c.y,l.y):Math.max(c.x,l.x),h=UQt(o,u,g);if(!i.some(m=>zCo(o,m,h)))continue;const d=o==="vertical"?c.x:c.y;e.some(m=>Math.abs(m-d)<=vQt)&&s.push(d-r,d+r)}return Fve(s)},yC=1e-6,WCo=t=>jCo(t.pinIds)>=2,yB=(t,e)=>Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)>yC&&Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)>yC,Lve=t=>{const e=[];for(let n=1;n<t.length-1;n++){const o=t[n-1],i=t[n],r=t[n+1];$Co(o,i,r)&&e.push(i)}return e},jl=(t,e)=>{for(let n=0;n<t.length-1;n++)if(qCo(e,t[n],t[n+1]))return!0;return!1},KQt=(t,e)=>Math.abs(t.x-e.x)+Math.abs(t.y-e.y),jCo=t=>new Set(t).size,$Co=(t,e,n)=>Hve(t,e)!==Hve(e,n),qCo=(t,e,n)=>Hve(e,n)==="horizontal"?Math.abs(t.y-e.y)<=yC&&t.x>=Math.min(e.x,n.x)-yC&&t.x<=Math.max(e.x,n.x)+yC:Math.abs(t.x-e.x)<=yC&&t.y>=Math.min(e.y,n.y)-yC&&t.y<=Math.max(e.y,n.y)+yC,Hve=(t,e)=>Math.abs(t.y-e.y)<=yC?"horizontal":"vertical",XCo=(t,e)=>{const n=t[0].globalConnNetId,o=e.filter(s=>s.globalConnNetId===n),i=new Set(t.map(s=>s.traceId)),r=new Set(o.filter(s=>i.has(s.mspPairId)).flatMap(s=>s.pinIds));for(let s=!0;s;){s=!1;for(const a of o)if(!i.has(a.mspPairId)&&a.pinIds.some(A=>r.has(A))){i.add(a.mspPairId);for(const A of a.pinIds)r.add(A);s=!0}}return i},ZCo=(t,e,n)=>{const o=XCo(t,n);return e.filter(i=>i.mspConnectionPairIds.some(r=>o.has(r)))},VQt=(t,e,n)=>{const o=new Map(n.map(m=>[m.mspPairId,m])),i=new Set(t.map(m=>m.traceId)),r=[...i].every(m=>o.get(m)?.pins.every(_=>_.chipId===t[0].componentId)===!0);if(![...i].every(m=>o.get(m)?.tracePath.length===4))return null;const a=t[0].orientation,A=ZCo(t,e,n),c=new Set(A.filter(m=>a==="vertical"&&(m.orientation==="y+"||m.orientation==="y-")||a==="horizontal"&&(m.orientation==="x+"||m.orientation==="x-"))),l=A.filter(m=>m.orientation!==t[0].componentFacingDirection&&(!r||!c.has(m))?!1:m.mspConnectionPairIds.some(_=>{const f=o.get(_);return f&&jl(f.tracePath,m.anchorPoint)})),u=Fve(l.map(m=>a==="vertical"?m.anchorPoint.x:m.anchorPoint.y));if(u.length!==1)return null;const g=u[0],h=t.find(m=>Math.abs(m.coordinate-g)<=Gy)?.coordinate??g;if(l.some(m=>m.mspConnectionPairIds.some(_=>(o.get(_)?.tracePath.length??0)>4)))return h;if(l.some(m=>c.has(m))){const m=Math.max(...t.map(f=>f.maxAlong))-Math.min(...t.map(f=>f.minAlong));return t.every(f=>Math.abs(f.coordinate-h)<=m+Gy)?h:null}return t.every(m=>{const _=o.get(m.traceId);return _?Math.abs(m.coordinate-h)<=ad(_.pins[0],_.pins[1])+Gy:!1})?h:null},eyo=(t,e,n)=>{const o=new Set;for(const s of e)Uc(s.coordinate,n)||(o.add(s.segmentIndex),o.add(s.segmentIndex+1));const i=e[0].orientation,r=Qa(t.tracePath.map((s,a)=>o.has(a)?i==="vertical"?{...s,x:n}:{...s,y:n}:s));return{...t,tracePath:r}},zQt=(t,e)=>new Set(e.filter(n=>n.globalConnNetId===t.globalConnNetId&&jl(n.tracePath,t.anchorPoint)).map(n=>n.mspPairId)),hj=(t,e,n)=>t.every(o=>{const i=zQt(o,e);if(i.size===0)return!0;const r=zQt(o,n);return[...i].every(s=>r.has(s))}),Rg=1e-9,Ove=(t,e,n)=>{const o=Math.abs(t.x-e.x)<Rg,i=Math.abs(t.y-e.y)<Rg;return o?Math.abs(t.x-n.minX)<Rg||Math.abs(t.x-n.maxX)<Rg:i?Math.abs(t.y-n.minY)<Rg||Math.abs(t.y-n.maxY)<Rg:!1},tyo=t=>t.map(e=>`${e.x},${e.y}`).join(";"),U7=t=>{let e=0;for(let n=0;n<t.length-1;n++)e+=Math.abs(t[n+1].x-t[n].x)+Math.abs(t[n+1].y-t[n].y);return e},JQt=(t,e)=>Math.abs(t.x-e.x)+Math.abs(t.y-e.y),WQt=(t,e)=>Math.abs(t.x-e.x)<Rg||Math.abs(t.y-e.y)<Rg,jQt=(t,e)=>Math.abs(t.y-e.y)<Rg?"horizontal":"vertical",Gve=(t,e,n)=>Math.abs(e.x-n.x)<Rg?{x:e.x,y:Math.min(Math.max(t.y,Math.min(e.y,n.y)),Math.max(e.y,n.y))}:Math.abs(e.y-n.y)<Rg?{x:Math.min(Math.max(t.x,Math.min(e.x,n.x)),Math.max(e.x,n.x)),y:e.y}:e,nyo=(t,e,n)=>JQt(t,Gve(t,e,n)),oyo=t=>{const e=[];for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];WQt(o,i)&&e.push({start:o,end:i,orientation:jQt(o,i)})}return e},iyo=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];if(WQt(o,i)&&!(nyo(e,o,i)>1e-6))return{index:n,start:o,end:i,orientation:jQt(o,i)}}return null},ryo=(t,e)=>e.orientation==="horizontal"?t.x>=Math.min(e.start.x,e.end.x)-Rg&&t.x<=Math.max(e.start.x,e.end.x)+Rg:t.y>=Math.min(e.start.y,e.end.y)-Rg&&t.y<=Math.max(e.start.y,e.end.y)+Rg,syo=(t,e,n,o,i)=>{const r=oyo(t).filter(c=>c.orientation===o);if(r.length===0)return null;const s=r.filter(c=>ryo(i,c)),a=s.length>0?s:r;return e<n/2?a[0]:a[a.length-1]},ayo=(t,e)=>{let n=null,o=Number.POSITIVE_INFINITY;for(let i=0;i<e.length-1;i++){const r=Gve(t,e[i],e[i+1]),s=JQt(t,r);s<o&&(n=r,o=s)}return n},$Qt=(t,e,n,o)=>{const i=Math.abs(t.x-e.x)<Rg,r=Math.abs(n.x-o.x)<Rg,s=(u,g,h)=>u>=Math.min(g,h)-Rg&&u<=Math.max(g,h)+Rg;if(i&&r)return Math.abs(t.x-n.x)>Rg?!1:Math.min(Math.max(t.y,e.y),Math.max(n.y,o.y))-Math.max(Math.min(t.y,e.y),Math.min(n.y,o.y))>Rg;if(!i&&!r)return Math.abs(t.y-n.y)>Rg?!1:Math.min(Math.max(t.x,e.x),Math.max(n.x,o.x))-Math.max(Math.min(t.x,e.x),Math.min(n.x,o.x))>Rg;const a=i?t:n,A=i?e:o,c=i?n:t,l=i?o:e;return s(a.x,c.x,l.x)&&s(c.y,a.y,A.y)},vle=(t,e)=>{let n=0;for(let o=0;o<t.length-1;o++)for(let i=0;i<e.length-1;i++)$Qt(t[o],t[o+1],e[i],e[i+1])&&n++;return n},qQt=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)if(CC(o,i,r)&&!Ove(o,i,r))return!0}return!1},Ayo=(t,e)=>{let n=0;for(const o of t)for(const i of e)o.globalConnNetId!==i.globalConnNetId&&(n+=vle(o.tracePath,i.tracePath));return n},XQt=(t,e)=>({turnCount:t.reduce((n,o)=>n+j5(o.tracePath),0),visibleLength:Y7(t),pathLength:t.reduce((n,o)=>n+U7(o.tracePath),0),otherNetCrossings:Ayo(t,e)}),cyo=(t,e)=>t.turnCount!==e.turnCount?t.turnCount<e.turnCount:Uc(t.visibleLength,e.visibleLength)?Uc(t.pathLength,e.pathLength)?t.otherNetCrossings!==e.otherNetCrossings?t.otherNetCrossings<e.otherNetCrossings:Uc(t.displacement,e.displacement)?t.coordinate<e.coordinate:t.displacement<e.displacement:t.pathLength<e.pathLength:t.visibleLength<e.visibleLength,lyo=(t,e)=>t.turnCount<=e.turnCount&&(t.turnCount<e.turnCount||t.visibleLength<=e.visibleLength+Gy),uyo=(t,e)=>t.tracePath.length!==e.tracePath.length||e.tracePath.some((n,o)=>!fb(n,t.tracePath[o])),gyo=({group:t,traces:e,netLabelPlacements:n,obstacles:o,eligibleTraceIds:i})=>{const r=new Set(t.map(d=>d.traceId)),s=e.filter(d=>r.has(d.mspPairId)),a=XQt(s,e),A=Fve(t.map(d=>d.coordinate)),c=VQt(t,n,e),l=e.filter(d=>d.globalConnNetId!==t[0].globalConnNetId),u=e.filter(d=>d.globalConnNetId===t[0].globalConnNetId&&!i.has(d.mspPairId)),g=(d,p)=>{let m=null;for(const _ of d){const f=new Map;for(const Q of s){const w=eyo(Q,t.filter(M=>M.traceId===Q.mspPairId),_);f.set(Q.mspPairId,w)}const I=[...f.values()],C=e.map(Q=>f.get(Q.mspPairId)??Q);if(!I.every(Q=>!ON(Q.tracePath,o)&&Jh({traces:[Q],netLabels:n}).length===0&&!PQt(Q.tracePath,l)&&!nw(Q.tracePath,u.filter(w=>w.mspPairId!==Q.mspPairId)))||!hj(n,e,C))continue;const x=XQt(I,C);if(x.otherNetCrossings>a.otherNetCrossings||(p?.coordinateIsFixedByLabel?x.turnCount>a.turnCount:!lyo(x,a)))continue;const E={...x,displacement:t.reduce((Q,w)=>Q+Math.abs(w.coordinate-_),0),coordinate:_},B=I.filter(Q=>{const w=e.find(M=>M.mspPairId===Q.mspPairId);return uyo(w,Q)}).map(Q=>Q.mspPairId);if(B.length===0)continue;const S={traces:C,changedTraceIds:B,score:E};(!m||cyo(S.score,m.score))&&(m=S)}return m},h=g(c===null?A:[c],{coordinateIsFixedByLabel:c!==null});return h||(c!==null?null:g(JCo({group:t,originalCoordinates:A,otherNetTraces:l})))},dyo=t=>{const e=[],n=t.tracePath;for(let o=1;o<n.length-2;o++){const i=n[o-1],r=n[o],s=n[o+1],a=n[o+2],A=JH(r,s);if(!A)continue;const c=JH(i,r),l=JH(s,a);if(!c||!l||c===A||l===A)continue;const u=A==="vertical"?[r.y,s.y]:[r.x,s.x];e.push({traceId:t.mspPairId,segmentIndex:o,globalConnNetId:t.globalConnNetId,orientation:A,coordinate:A==="vertical"?r.x:r.y,minAlong:Math.min(...u),maxAlong:Math.max(...u)})}return e},hyo=(t,e,n)=>{const o=e.center.x-e.width/2,i=e.center.x+e.width/2,r=e.center.y-e.height/2,s=e.center.y+e.height/2;switch(n){case"x-":return t.orientation==="vertical"&&t.coordinate<=o+Gy;case"x+":return t.orientation==="vertical"&&t.coordinate>=i-Gy;case"y+":return t.orientation==="horizontal"&&t.coordinate>=s-Gy;case"y-":return t.orientation==="horizontal"&&t.coordinate<=r+Gy}},ZQt=(t,e,n)=>{const o=[],i=ad(t.pins[0],t.pins[1])<=(n?.maxMspPairDistance??uj);for(const r of dyo(t)){const s=t.pins.flatMap((c,l)=>{const u=e.get(c.chipId);if(!u)return[];const g=c._facingDirection??W5(c,u);return hyo(r,u,g)?[{componentId:u.chipId,componentFacingDirection:g,distanceFromEndpoint:l===0?r.segmentIndex:t.tracePath.length-2-r.segmentIndex}]:[]});s.sort((c,l)=>c.distanceFromEndpoint-l.distanceFromEndpoint);const a=s[0]?.distanceFromEndpoint,A=new Set;for(const c of s){if(A.size>0&&(!n?.includeTiedEndpointAssociations||!i))break;if(c.distanceFromEndpoint!==a)continue;const l=`${c.componentId}:${c.componentFacingDirection}`;A.has(l)||(A.add(l),o.push({...r,...c}))}}return o},pyo=(t,e)=>{const n=Math.max(t.minAlong,e.minAlong),o=Math.min(t.maxAlong,e.maxAlong),i=(n+o)/2;return t.orientation==="vertical"?[{x:t.coordinate,y:i},{x:e.coordinate,y:i}]:[{x:i,y:t.coordinate},{x:i,y:e.coordinate}]},myo=(t,e,n)=>{if(!FQt(t,e))return!0;const[o,i]=pyo(t,e);return!n.some(r=>CC(o,i,r))},_yo=(t,e,n)=>{if(t.traceId===e.traceId)return!0;const o=new Set(n.get(t.traceId).pins.map(i=>i.pinId));return n.get(e.traceId).pins.some(i=>o.has(i.pinId))},fyo=(t,e,n,o,i)=>n.globalConnNetId===t.globalConnNetId&&n.orientation===t.orientation&&n.componentId===t.componentId&&n.componentFacingDirection===t.componentFacingDirection&&(FQt(e,n)||_yo(e,n,o))&&myo(e,n,i),Iyo=(t,e,n,o,i)=>{const r=new Map(n.chips.map(p=>[p.chipId,p])),s=new Map(t.map(p=>[p.mspPairId,p])),a=t.filter(p=>e.has(p.mspPairId)),A=p=>{const m=new Set,_=[];for(let f=0;f<p.length;f++){if(m.has(f))continue;const I=p[f],C=[f],y=[];m.add(f);for(let x=0;x<C.length;x++){const E=p[C[x]];y.push(E);for(let B=0;B<p.length;B++){if(m.has(B))continue;const S=p[B];fyo(I,E,S,s,o)&&(m.add(B),C.push(B))}}_.push(y)}return _},c=p=>[p[0].componentId,p[0].componentFacingDirection,p[0].orientation,...p.map(m=>`${m.traceId}:${m.segmentIndex}`).sort()].join("|"),l=[],u=new Set,g=(p,m)=>{if(new Set(p.map(x=>x.traceId)).size<2)return;const f=VQt(p,i,t);if(m?.requireFixedLabel&&f===null)return;const I=p.some(x=>!Uc(x.coordinate,p[0].coordinate)),C=f!==null&&!Uc(f,p[0].coordinate);if(!I&&!C)return;const y=c(p);u.has(y)||(u.add(y),l.push(p))},h=a.flatMap(p=>ZQt(p,r));for(const p of A(h))g(p);const d=a.flatMap(p=>ZQt(p,r,{includeTiedEndpointAssociations:!0,maxMspPairDistance:n.maxMspPairDistance}));for(const p of A(d))g(p,{requireFixedLabel:!0});return l},evt=t=>JSON.stringify(t.map(e=>({mspPairId:e.mspPairId,tracePath:e.tracePath}))),Cyo=({inputProblem:t,traces:e,netLabelPlacements:n,eligibleTraceIds:o})=>{let i=[...e];const r=new Set([evt(i)]),s=Hy(t),a=new Set;let A=0;const c=Math.max(1,e.reduce((l,u)=>l+u.tracePath.length,0));for(let l=0;l<c;l++){const u=Iyo(i,o,t,s,n);let g=null;for(const p of u)if(g=gyo({group:p,traces:i,netLabelPlacements:n,obstacles:s,eligibleTraceIds:o}),g)break;if(!g)break;const h=evt(g.traces),d=r.has(h);d||r.add(h),i=g.traces,A++;for(const p of g.changedTraceIds)a.add(p);if(d)break}return{traces:i,alignedRailGroupCount:A,alignedTraceCount:a.size}},yyo=t=>{const e=[];if(t.length<3)return e;for(let n=0;n<t.length-2;n++){const o=t[n],i=t[n+1],r=t[n+2],s=i.x-o.x,a=i.y-o.y,A=r.x-i.x,c=r.y-i.y;(s===0&&c===0&&a!==0&&A!==0||a===0&&A===0&&s!==0&&c!==0)&&s*s+a*a>=.25&&A*A+c*c>=.25&&e.push({p1:o,p2:i,p3:r})}return e},xyo=(t,e)=>{const n=[];for(const o of t)o.mspPairId!==e&&n.push({points:o.tracePath});return n},wle=1e-6,tvt=(t,e,n)=>{const o=[];for(const i of n){const r=i.points;for(let s=0;s<r.length-1;s++){const a=r[s],A=r[s+1];if(!a||!A)continue;const c=V4(t,e,a,A);c&&o.push(c)}}return o},Eyo=(t,e)=>Math.abs(t.x-e.x)<wle&&Math.abs(t.y-e.y)<wle,WH=(t,e,n={})=>{const o=[],i=n.includeTerminalSegments?0:1,r=n.includeTerminalSegments?t.length-1:t.length-2,s=n.includeTerminalSegments?0:1,a=n.includeTerminalSegments?e.length-1:e.length-2;for(let A=i;A<r;A++){const c=t[A],l=t[A+1],u=Math.abs(c.x-l.x)<wle;for(let g=s;g<a;g++){const h=e[g],d=e[g+1],p=Math.abs(h.x-d.x)<wle;if(u===p)continue;const m=V4(c,l,h,d);!m||[c,l,h,d].some(_=>Eyo(_,m))||o.push({pathSegmentIndex:A,otherPathSegmentIndex:g})}}return o},K7=1e-6,ow=(t,e,n=K7)=>Math.abs(t.x-e.x)<n,Byo=({lShape:t,rectangle:e,padding:n=.5,interactionPoint1:o,interactionPoint2:i})=>{const{p1:r,p2:s,p3:a}=t,{x:A,y:c,width:l,height:u}=e;let g,h=o,d=i;if(Math.abs(s.x-A)<K7&&Math.abs(s.y-(c+u))<K7)g={x:A+l+n,y:c-n},ow(r,s)?h={x:o.x,y:o.y-n}:h={x:o.x+n,y:o.y},ow(s,a)?d={x:i.x,y:i.y-n}:d={x:i.x+n,y:i.y};else if(Math.abs(s.x-(A+l))<K7&&Math.abs(s.y-(c+u))<K7)g={x:A-n,y:c-n},ow(r,s)?h={x:o.x,y:o.y-n}:h={x:o.x-n,y:o.y},ow(s,a)?d={x:i.x,y:i.y-n}:d={x:i.x-n,y:i.y};else if(Math.abs(s.x-A)<K7&&Math.abs(s.y-c)<K7)g={x:A+l+n,y:c+u+n},ow(r,s)?h={x:o.x,y:o.y+n}:h={x:o.x+n,y:o.y},ow(s,a)?d={x:i.x,y:i.y+n}:d={x:i.x+n,y:i.y};else if(Math.abs(s.x-(A+l))<K7&&Math.abs(s.y-c)<K7)g={x:A-n,y:c+u+n},ow(r,s)?h={x:o.x,y:o.y+n}:h={x:o.x-n,y:o.y},ow(s,a)?d={x:i.x,y:i.y+n}:d={x:i.x-n,y:i.y};else return[];return[[h,g,d]]},nvt=({trace:t,chipBounds:e,clearance:n})=>{if(t.tracePath.length<4||e.length===0)return[];const o=t.tracePath[0],i=t.tracePath[1],r=t.tracePath.at(-2),s=t.tracePath.at(-1),a=Math.min(...e.map(g=>g.minX))-n,A=Math.max(...e.map(g=>g.maxX))+n,c=Math.min(...e.map(g=>g.minY))-n,l=Math.max(...e.map(g=>g.maxY))+n,u=[];for(const g of[a,A])for(const h of[c,l])u.push({traceId:t.mspPairId,path:Qa([o,i,{x:i.x,y:h},{x:g,y:h},{x:g,y:r.y},r,s])}),u.push({traceId:t.mspPairId,path:Qa([o,i,{x:g,y:i.y},{x:g,y:h},{x:r.x,y:h},r,s])});return u},Yve=({trace:t,segmentIndex:e,obstacleStart:n,obstacleEnd:o,obstacleBounds:i,chipBounds:r,clearance:s})=>{const a=(l,u)=>{const g=l[u],h=l[u+1],d=Math.abs(g.x-h.x)<K7?"y":"x",p=d==="x"?"y":"x",m=i??{minX:Math.min(n.x,o.x),minY:Math.min(n.y,o.y),maxX:Math.max(n.x,o.x),maxY:Math.max(n.y,o.y)},_=d==="x"?"minX":"minY",f=d==="x"?"maxX":"maxY";let I=n[d]+Math.sign(g[d]-n[d])*s;if(i){const M=g[d]<(m[_]+m[f])/2?-1:1;I=m[M<0?_:f]+M*s}const C=p==="x"?"minX":"minY",y=p==="x"?"maxX":"maxY",x=m[C]-s,E=m[y]+s,B=i?l[u+2]:void 0,Q=[B?B[p]<x?(B[p]+x)/2:B[p]>E?(B[p]+E)/2:void 0:void 0,x,E,...r.flatMap(M=>[M[C]-s,M[y]+s])].filter(M=>M!==void 0),w=l.slice(u+2);return w.length===0&&w.push(h),[...new Set(Q)].map(M=>Qa([...l.slice(0,u+1),{...g,[d]:I},{...g,[d]:I,[p]:M},{...h,[p]:M},...w]))},A=[...t.tracePath].reverse(),c=t.tracePath.length-2-e;return[...a(t.tracePath,e),...a(A,c).map(l=>l.reverse())].map(l=>({traceId:t.mspPairId,path:l}))},Ple=(t,e,n)=>{if(t.length<2)return{isColliding:!1};for(let o=0;o<t.length-1;o++){const i=t[o],r=t[o+1];for(const s of e)if(s.mspPairId!==n)for(let a=0;a<s.tracePath.length-1;a++){const A=s.tracePath[a],c=s.tracePath[a+1],l=V4(i,r,A,c);if(l)return{isColliding:!0,collidingTraceId:s.mspPairId,collisionPoint:l}}}return{isColliding:!1}},byo=(t,e)=>{const n=[];for(const o of t)for(const i of e){const r=Math.min(o.x,i.x),s=Math.min(o.y,i.y),a=Math.max(o.x,i.x),A=Math.max(o.y,i.y),c=a-r,l=A-s;c>1e-6&&l>1e-6&&n.push({rect:{x:r,y:s,width:c,height:l},i1:o,i2:i})}return n},Mle=t=>{const e={circles:[],lines:[]},n=Array.isArray(t)?t:[t];for(const o of n)e.circles.push({center:{x:o.p2.x,y:o.p2.y},radius:.01,fill:"blue"}),e.lines.push({points:[o.p1,o.p2,o.p3],strokeColor:"lightblue"});return e},ovt=(t,e="red")=>{const n={circles:[]};for(const o of t)n.circles.push({center:{x:o.x,y:o.y},radius:.01,fill:e});return n},ivt=t=>{const e={rects:[]};return e.rects.push({center:{x:t.x+t.width/2,y:t.y+t.height/2},width:t.width,height:t.height,stroke:"green"}),e},Syo=(t,e="gray",n=[])=>{const o={lines:[],circles:[]};for(const i of t)o.lines.push({points:i,strokeColor:e});for(const i of n)o.circles.push({center:i,radius:.01,fill:"green"});return o},Uve=t=>{const e={lines:[],points:[],rects:[],circles:[],texts:[]};for(const n of t)n&&(n.lines&&e.lines.push(...n.lines),n.points&&e.points.push(...n.points),n.rects&&e.rects.push(...n.rects),n.circles&&e.circles.push(...n.circles),n.texts&&e.texts.push(...n.texts));return e},Qyo=t=>{const e={circles:[]};return t?.isColliding&&t.collisionPoint&&e.circles.push({center:t.collisionPoint,radius:.01,fill:"red"}),e},vyo=class extends Ng{input;chipObstacleSpatialIndex;lShapesToProcess=[];ignoredCrossings=new Set;reroutedTraceIds=new Set;processingCrossings=!0;visualizationMode="l_shapes";currentLShape=null;intersectionPoints=[];tightRectangle=null;candidates=[];bestRoute=null;lastCollision=null;collidingCandidate=null;rectangleCandidates=[];currentRectangleIndex=0;isInitialStep=!0;currentCandidateIndex=0;lShapeProcessingStep="idle";lShapeJustProcessed=!1;bestRouteFound=null;constructor(t){super(),this.input=t,this.visualizationMode="l_shapes",this.chipObstacleSpatialIndex=this.input.inputProblem._chipObstacleSpatialIndex??new yle(this.input.inputProblem.chips),this.input.inputProblem._chipObstacleSpatialIndex||(this.input.inputProblem._chipObstacleSpatialIndex=this.chipObstacleSpatialIndex)}_step(){if(this.isInitialStep){this.isInitialStep=!1;return}if(this.processingCrossings){const t=this._findCrossing();if(t){this._resolveCrossing(t)||this.ignoredCrossings.add(this._crossingKey(t));return}this.processingCrossings=!1,this._initializeLShapes();return}if(this.lShapeJustProcessed){this._resetAfterLShapProcessing();return}if(this.lShapesToProcess.length===0&&this.currentLShape===null){this.solved=!0;return}switch(this.lShapeProcessingStep){case"idle":this._handleIdleStep();break;case"intersections":this._handleIntersectionsStep();break;case"rectangle_selection":this._handleRectangleSelectionStep();break;case"candidate_evaluation":this._handleCandidateEvaluationStep();break}}_initializeLShapes(){for(const t of this.input.allTraces)this.lShapesToProcess.push(...yyo(t.tracePath).map(e=>({...e,traceId:t.mspPairId})))}_crossingKey(t){return`${t.trace.mspPairId}:${t.segmentIndex}:${t.otherTrace.mspPairId}:${t.otherSegmentIndex}`}_isTraceBundle(t,e){const n=o=>o.pins.map(i=>i.chipId).sort().join(":");return n(t)!==n(e)?!1:Object.values(this.input.mergedLabelNetIdMap).some(o=>o.has(t.globalConnNetId)&&o.has(e.globalConnNetId))}_findCrossing(){const t=this.input.allTraces;for(let e=0;e<t.length;e++){const n=t[e];for(let o=e+1;o<t.length;o++){const i=t[o];if(n.globalConnNetId===i.globalConnNetId)continue;const r=this._isTraceBundle(n,i),s=this.input.eligibleTraceIds?.has(n.mspPairId)===!0||this.input.eligibleTraceIds?.has(i.mspPairId)===!0;if(!r&&!s&&!this.reroutedTraceIds.has(n.mspPairId)&&!this.reroutedTraceIds.has(i.mspPairId))continue;const a=WH(n.tracePath,i.tracePath);for(const{pathSegmentIndex:A,otherPathSegmentIndex:c}of a){const l={trace:n,segmentIndex:A,otherTrace:i,otherSegmentIndex:c,isInitialBundleCrossing:r};if(!this.ignoredCrossings.has(this._crossingKey(l)))return l}}}return null}_resolveCrossing(t){const e=this.chipObstacleSpatialIndex.chips.map(a=>a.bounds),n=[...Yve({trace:t.trace,segmentIndex:t.segmentIndex,obstacleStart:t.otherTrace.tracePath[t.otherSegmentIndex],obstacleEnd:t.otherTrace.tracePath[t.otherSegmentIndex+1],chipBounds:e,clearance:this.input.paddingBuffer}),...Yve({trace:t.otherTrace,segmentIndex:t.otherSegmentIndex,obstacleStart:t.trace.tracePath[t.segmentIndex],obstacleEnd:t.trace.tracePath[t.segmentIndex+1],chipBounds:e,clearance:this.input.paddingBuffer}),...nvt({trace:t.trace,chipBounds:e,clearance:this.input.paddingBuffer}),...nvt({trace:t.otherTrace,chipBounds:e,clearance:this.input.paddingBuffer})],o=Hy(this.input.inputProblem).filter(a=>a.kind==="chip"),r=n.map(a=>({...a,collision:Ple(a.path,this.input.allTraces,a.traceId)})).filter(a=>!qQt(a.path,o)&&!Ple(a.path,[t.trace,t.otherTrace],a.traceId).isColliding&&(t.isInitialBundleCrossing||!a.collision.isColliding)).sort((a,A)=>Number(a.collision.isColliding)-Number(A.collision.isColliding)||U7(a.path)-U7(A.path))[0];if(!r)return!1;const s=this.input.allTraces.findIndex(a=>a.mspPairId===r.traceId);return this.input.allTraces[s]={...this.input.allTraces[s],tracePath:r.path},this.reroutedTraceIds.add(r.traceId),!0}_resetAfterLShapProcessing(){this.lShapeProcessingStep="idle",this.currentLShape=null,this.currentCandidateIndex=0,this.lShapeJustProcessed=!1,this.visualizationMode="l_shapes",this.intersectionPoints=[],this.tightRectangle=null,this.candidates=[],this.bestRoute=null,this.lastCollision=null,this.collidingCandidate=null}_handleIdleStep(){if(this.currentLShape=this.lShapesToProcess.shift(),!this.currentLShape){this.solved=!0;return}this.lShapeProcessingStep="intersections",this.visualizationMode="l_shapes"}_handleIntersectionsStep(){if(!this.currentLShape.traceId){this.lShapeProcessingStep="idle";return}const t=xyo(this.input.allTraces,this.currentLShape.traceId),e=tvt(this.currentLShape.p1,this.currentLShape.p2,t),n=tvt(this.currentLShape.p2,this.currentLShape.p3,t);if(this.intersectionPoints=[...e,...n],e.length===0||n.length===0){this.lShapeProcessingStep="idle";return}this.rectangleCandidates=byo(e,n),this.currentRectangleIndex=0,this.lShapeProcessingStep="rectangle_selection"}_handleRectangleSelectionStep(){if(this.currentRectangleIndex>=this.rectangleCandidates.length){this.lShapeProcessingStep="idle";return}const{rect:t,i1:e,i2:n}=this.rectangleCandidates[this.currentRectangleIndex];this.tightRectangle=t,this.candidates=Byo({lShape:this.currentLShape,rectangle:this.tightRectangle,padding:2*this.input.paddingBuffer,interactionPoint1:e,interactionPoint2:n}),this.currentCandidateIndex=0,this.lastCollision=null,this.collidingCandidate=null,this.visualizationMode="candidates",this.lShapeProcessingStep="candidate_evaluation"}_handleCandidateEvaluationStep(){if(this.visualizationMode="candidates",this.bestRouteFound){this._applyBestRoute(this.bestRouteFound),this.bestRouteFound=null;return}if(this.currentCandidateIndex>=this.candidates.length){this.currentRectangleIndex++,this.lShapeProcessingStep="rectangle_selection";return}const t=this.candidates[this.currentCandidateIndex],e=Ple(t,this.input.allTraces,this.currentLShape.traceId);if(!e?.isColliding&&this._doesCandidateCrossChip(t)){this.lastCollision=null,this.collidingCandidate=t,this.currentCandidateIndex++;return}e?.isColliding?(this.lastCollision=e,this.collidingCandidate=t,this.currentCandidateIndex++):(this.bestRouteFound=t,this.lastCollision=null,this.collidingCandidate=null)}_doesCandidateCrossChip(t){for(let e=0;e<t.length-1;e++)if(this.chipObstacleSpatialIndex.doesOrthogonalLineIntersectChip([t[e],t[e+1]]))return!0;return!1}_applyBestRoute(t){this.bestRoute=t,this.collidingCandidate=null,this.lastCollision=null;const e=this.input.allTraces.findIndex(n=>n.mspPairId===this.currentLShape.traceId);if(e!==-1){const n=this.input.allTraces[e],o=n.tracePath.findIndex(i=>i.x===this.currentLShape.p2.x&&i.y===this.currentLShape.p2.y);if(o!==-1){const i=[...n.tracePath.slice(0,o),...t,...n.tracePath.slice(o+1)];this.input.allTraces[e]={...n,tracePath:i},this.lShapesToProcess=this.lShapesToProcess.filter(r=>r.traceId!==this.currentLShape.traceId)}}this.lShapeJustProcessed=!0}getOutput(){return{traces:this.input.allTraces}}visualize(){switch(this.visualizationMode){case"l_shapes":return Mle(this.lShapesToProcess);case"intersection_points":return Uve([this.currentLShape?Mle(this.currentLShape):void 0,ovt(this.intersectionPoints)]);case"tight_rectangle":return Uve([this.currentLShape?Mle(this.currentLShape):void 0,ovt(this.intersectionPoints),this.tightRectangle?ivt(this.tightRectangle):void 0]);case"candidates":{if(this.lShapeJustProcessed){const n={lines:[]};for(const o of this.input.allTraces){const i=o.mspPairId===this.currentLShape?.traceId;for(let r=0;r<o.tracePath.length-1;r++)n.lines.push({points:[o.tracePath[r],o.tracePath[r+1]],strokeColor:i?"green":"#ccc"})}return n}const t={lines:[]};for(const n of this.input.allTraces)for(let o=0;o<n.tracePath.length-1;o++)t.lines.push({points:[n.tracePath[o],n.tracePath[o+1]],strokeColor:"#ccc"});let e;return this.bestRouteFound?e=this.bestRouteFound:this.lastCollision?.isColliding?e=this.collidingCandidate??void 0:this.currentCandidateIndex<this.candidates.length&&(e=this.candidates[this.currentCandidateIndex]),Uve([t,this.currentLShape?Mle(this.currentLShape):void 0,this.tightRectangle?ivt(this.tightRectangle):void 0,e?Syo([e],this.bestRouteFound?"green":"blue",this.intersectionPoints):void 0,this.lastCollision?Qyo(this.lastCollision):void 0])}default:return{}}}},rvt=1e-6,Dle=(t,e)=>Math.abs(t.x-e.x)<=rvt,Nle=(t,e)=>Math.abs(t.y-e.y)<=rvt,wyo=t=>{if(t.length!==4)return!1;const[e,n,o,i]=t,r=Nle(e,n)&&Dle(n,o)&&Nle(o,i)&&Dle(e,i),s=Dle(e,n)&&Nle(n,o)&&Dle(o,i)&&Nle(e,i);return r||s},svt=1e-6,Pyo=(t,e,n)=>{const o=t.tracePath[e],i=t.tracePath[e+1],r={minX:Math.min(o.x,i.x),minY:Math.min(o.y,i.y),maxX:Math.max(o.x,i.x),maxY:Math.max(o.y,i.y)};for(const s of n){if(s.globalConnNetId!==t.globalConnNetId||!s.pinIds.every(A=>t.pinIds.includes(A))||!jl(t.tracePath,s.anchorPoint))continue;const a=Ls(s.center,s.width,s.height);r.minX=Math.min(r.minX,a.minX),r.minY=Math.min(r.minY,a.minY),r.maxX=Math.max(r.maxX,a.maxX),r.maxY=Math.max(r.maxY,a.maxY)}return r},Myo=(t,e,n)=>{const o=[];for(const i of t)if(e.has(i.mspPairId))for(let r=0;r<t.length;r++){const s=t[r];if(s.mspPairId!==i.mspPairId&&!e.has(s.mspPairId)&&s.globalConnNetId!==i.globalConnNetId&&!(n&&!n.has(s.mspPairId)))for(const a of WH(s.tracePath,i.tracePath,{includeTerminalSegments:!0}))o.push({traceIndex:r,connector:i,connectorSegmentIndex:a.otherPathSegmentIndex,traceSegmentIndex:a.pathSegmentIndex})}return o},Dyo=({inputProblem:t,traces:e,netLabelPlacements:n,mergedLabelNetIdMap:o,clearance:i,eligibleTraceIds:r,connectorTraceIds:s})=>{const a=[...e],A=Hy(t).filter(l=>l.kind==="chip"||l.kind==="text_box");let c=0;for(;;){const l=Myo(a,s,r).flatMap(g=>{const h=a[g.traceIndex],d=Pyo(g.connector,g.connectorSegmentIndex,n),p=a.filter(_=>_.mspPairId!==h.mspPairId&&_.globalConnNetId!==h.globalConnNetId),m=n.filter(_=>{const f=o[_.globalConnNetId];return f?!f.has(h.globalConnNetId):_.globalConnNetId!==h.globalConnNetId}).map(_=>Ls(_.center,_.width,_.height));return Yve({trace:h,segmentIndex:g.traceSegmentIndex,obstacleStart:g.connector.tracePath[g.connectorSegmentIndex],obstacleEnd:g.connector.tracePath[g.connectorSegmentIndex+1],obstacleBounds:d,chipBounds:[],clearance:i}).filter(_=>U7(_.path)<=U7(h.tracePath)+svt&&j5(_.path)<=j5(h.tracePath)+2&&!ON(_.path,A)&&!Sle(_.path,m)&&!Ple(_.path,p,h.mspPairId).isColliding&&!nw(_.path,p)).map(_=>({..._,traceIndex:g.traceIndex}))});l.sort((g,h)=>{const d=U7(g.path)-U7(h.path);return Math.abs(d)>svt?d:j5(g.path)-j5(h.path)});const u=l[0];if(!u)break;a[u.traceIndex]={...a[u.traceIndex],tracePath:u.path},c++}return{traces:a,reroutedTraceCount:c}},Nyo=["untangling_traces","minimizing_turns","balancing_l_shapes"],avt=class extends Ng{input;outputTraces;traceIdQueue;tracesMap;operations;operationIndex=0;pipelineStep;activeTraceId=null;activeSubSolver=null;constructor(t){super(),this.input=t,this.outputTraces=[...t.allTraces],this.tracesMap=new Map(this.outputTraces.map(e=>[e.mspPairId,e])),this.operations=t.operations??Nyo,this.pipelineStep=this.operations[0]??null,this.traceIdQueue=Array.from(t.allTraces.map(e=>e.mspPairId))}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const t=this.activeSubSolver.getOutput();this.outputTraces=t.traces,this.tracesMap=new Map(this.outputTraces.map(e=>[e.mspPairId,e])),this.activeSubSolver=null,this._advancePipeline()}else this.activeSubSolver.failed&&(this.activeSubSolver=null,this._advancePipeline());return}if(!this.pipelineStep){this.solved=!0;return}switch(this.pipelineStep){case"untangling_traces":this._runUntangleTracesStep();break;case"rerouting_generated_net_label_connector_crossings":this._runGeneratedNetLabelConnectorCrossingRerouteStep();break;case"minimizing_turns":this._runMinimizeTurnsStep();break;case"balancing_l_shapes":this._runBalanceLShapesStep();break;case"aligning_same_net_rails":this._runAlignSameNetRailsStep();break}}_advancePipeline(){this.operationIndex++,this.pipelineStep=this.operations[this.operationIndex]??null,this.traceIdQueue=this.outputTraces.map(t=>t.mspPairId),this.pipelineStep&&(this.activeTraceId=null)}_runUntangleTracesStep(){this.activeSubSolver=new vyo({...this.input,allTraces:Array.from(this.tracesMap.values())})}_runGeneratedNetLabelConnectorCrossingRerouteStep(){const t=Dyo({inputProblem:this.input.inputProblem,traces:this.outputTraces,netLabelPlacements:this.input.allLabelPlacements,mergedLabelNetIdMap:this.input.mergedLabelNetIdMap,clearance:this.input.paddingBuffer,eligibleTraceIds:this.input.eligibleTraceIds,connectorTraceIds:this.input.netLabelConnectorTraceIds??new Set});this.outputTraces=t.traces,this.tracesMap=new Map(this.outputTraces.map(e=>[e.mspPairId,e])),this.stats.reroutedGeneratedConnectorCrossingTraceCount=t.reroutedTraceCount,this._advancePipeline()}_runMinimizeTurnsStep(){if(this.traceIdQueue.length===0){this._advancePipeline();return}this._processTrace("minimizing_turns")}_runBalanceLShapesStep(){if(this.traceIdQueue.length===0){this._advancePipeline();return}this._processTrace("balancing_l_shapes")}_processTrace(t){const e=this.traceIdQueue.shift();this.activeTraceId=e;const n=this.tracesMap.get(e);if(wyo(n.tracePath))return;const o=Array.from(this.tracesMap.values());let i;t==="minimizing_turns"?i=YQt({...this.input,targetMspConnectionPairId:e,traces:o}):i=VCo({...this.input,targetMspConnectionPairId:e,traces:o}),this.tracesMap.set(e,i),this.outputTraces=Array.from(this.tracesMap.values())}_runAlignSameNetRailsStep(){const t=Cyo({inputProblem:this.input.inputProblem,traces:this.outputTraces,netLabelPlacements:this.input.allLabelPlacements,eligibleTraceIds:this.input.eligibleTraceIds??new Set(this.outputTraces.map(e=>e.mspPairId))});this.outputTraces=t.traces,this.tracesMap=new Map(this.outputTraces.map(e=>[e.mspPairId,e])),this.stats.alignedRailGroupCount=t.alignedRailGroupCount,this.stats.alignedTraceCount=t.alignedTraceCount,this._advancePipeline()}getOutput(){return{traces:this.outputTraces}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.input.inputProblem,{chipAlpha:.1,connectionAlpha:.1});t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[]);for(const e of this.outputTraces){const n={points:e.tracePath.map(o=>({x:o.x,y:o.y})),strokeColor:e.mspPairId===this.activeTraceId?"red":"blue"};t.lines.push(n)}return t}},Ryo=({tracePath:t,sourcePoint:e,extensionEndPoint:n})=>{const o=t.findIndex(s=>fb(s,e));if(o<=0||o>=t.length-1)return null;const i=n.y-e.y,r=[o-1,o+1].find(s=>{const a=t[s];return Yy(a,e)&&(a.y-e.y)*i<0});return r===void 0?null:t.toSpliced(Math.max(o,r),0,n)},Kve=t=>{const e={};for(const n of t.chips)for(const o of n.pins)e[o.pinId]={...o,chipId:n.chipId};return e},Vve=(t,e)=>{const n=t.pinIds.flatMap(i=>{const r=e[i];return r?[r]:[]});if(n.length>=2)return[n[0],n[1]];if(n.length===1)return[n[0],n[0]];const o={pinId:`${t.globalConnNetId}-netlabel-anchor`,x:t.anchorPoint.x,y:t.anchorPoint.y,chipId:"available-net-orientation"};return[o,o]},Tyo=t=>({orientation:t.orientation,anchorPoint:t.anchorPoint,center:t.center,width:t.width,height:t.height}),sm=t=>{switch(t){case"x+":return{x:1,y:0};case"x-":return{x:-1,y:0};case"y+":return{x:0,y:1};case"y-":return{x:0,y:-1}}throw new Error(`Invalid facing direction: ${t}`)},zve=(t,e,n)=>{const o=iyo(e,t);if(!o)return null;const i=syo(n,o.index,e.length-1,o.orientation,t);return i?Gve(t,i.start,i.end):ayo(t,n)},Avt=(t,e)=>t.globalConnNetId===e.globalConnNetId||t.mspConnectionPairIds.includes(e.mspPairId),jH=({trace:t,originalTracePath:e,reroutedTracePath:n,netLabelPlacements:o})=>o.map(i=>{if(!Avt(i,t))return i;const r=zve(i.anchorPoint,e,n);if(!r)return i;const s={x:r.x-i.anchorPoint.x,y:r.y-i.anchorPoint.y};return{...i,anchorPoint:r,center:{x:i.center.x+s.x,y:i.center.y+s.y}}}),kyo=({originalTraces:t,reroutedTraces:e,netLabelPlacements:n})=>{const o=[...e],i=new Map(e.map(s=>[s.mspPairId,s])),r=n.map(s=>{const a=t.find(p=>{if(!s.mspConnectionPairIds.includes(p.mspPairId))return!1;const m=i.get(p.mspPairId);return m?m.tracePath!==p.tracePath:!1});if(!a)return s;const A=i.get(a.mspPairId),c=t.findIndex(p=>p.mspPairId===a.mspPairId||p.globalConnNetId!==s.globalConnNetId||!jl(p.tracePath,s.anchorPoint)?!1:s.pinIds.every(m=>p.pinIds.includes(m)));if(c<0)return s;const l=t[c],u=l.tracePath.find(p=>jl(a.tracePath,p));if(!u)return s;const g=zve(u,a.tracePath,A.tracePath);if(!g)return s;const h={x:g.x-u.x,y:g.y-u.y},d={...l,tracePath:l.tracePath.map(p=>({x:p.x+h.x,y:p.y+h.y}))};return o[c]=d,jH({trace:l,originalTracePath:l.tracePath,reroutedTracePath:d.tracePath,netLabelPlacements:[s]})[0]});return{traces:o,netLabelPlacements:r}},Fyo=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)if(Ove(o,i,r)&&cvt(o,i,r)>Rg)return!0}return!1},Lyo=(t,e)=>{let n=0;for(let o=0;o<t.length-1;o++){const i=t[o],r=t[o+1];for(const s of e){if(!Ove(i,r,s))continue;const a=cvt(i,r,s);a>Rg&&(n+=a)}}return n},cvt=(t,e,n)=>Math.abs(t.x-e.x)<Rg?Math.min(Math.max(t.y,e.y),n.maxY)-Math.max(Math.min(t.y,e.y),n.minY):Math.min(Math.max(t.x,e.x),n.maxX)-Math.max(Math.min(t.x,e.x),n.minX),nE=.1,Hyo=16,Oyo=({x:t,lowY:e,highY:n,outputTraces:o,netId:i})=>{for(const r of o){if(r.globalConnNetId===i)continue;const s=r.tracePath;for(let a=0;a+1<s.length;a++){const A=s[a],c=s[a+1];if(Math.abs(A.x-c.x)>=1e-9||Math.abs(A.x-t)>=nE/2)continue;const l=Math.min(A.y,c.y),u=Math.max(A.y,c.y);if(Math.min(n,u)-Math.max(e,l)>1e-6)return!0}}return!1},Gyo=({trace:t,obstacleLabel:e,inputProblem:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r})=>{const s=Yyo({trace:t,label:e,inputProblem:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r}),a=Vyo({trace:t,obstacleLabel:e,outputTraces:o,outputNetLabelPlacements:i,candidateResults:s,chipObstacles:r});return Jyo(s,a),{bestPath:a,candidateResults:s}},Yyo=({trace:t,label:e,inputProblem:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r})=>{const s=new Set,a=[],A=zyo({trace:t,label:e,outputTraces:o});A&&a.push(lvt({trace:t,obstacleLabel:e,path:A,seen:s,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r,usesHorizontalSegmentPush:!0}));const c=[...Kyo(t,e),...SQt({trace:t,label:e,paddingBuffer:nE,detourCount:0}),...Uyo(t,e)];for(const l of c)a.push(lvt({trace:t,obstacleLabel:e,path:Qa(l),seen:s,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r}));return a},lvt=({trace:t,obstacleLabel:e,path:n,seen:o,outputTraces:i,outputNetLabelPlacements:r,chipObstacles:s,usesHorizontalSegmentPush:a})=>{const A=tyo(n);return o.has(A)?{path:n,status:"duplicate",usesHorizontalSegmentPush:a,selected:!1}:(o.add(A),qQt(n,s)?{path:n,status:"chip-collision",usesHorizontalSegmentPush:a,selected:!1}:{path:n,score:gvt({trace:t,tracePath:n,obstacleLabel:e,outputTraces:i,outputNetLabelPlacements:r,chipObstacles:s}),status:"valid",usesHorizontalSegmentPush:a,selected:!1})},Uyo=(t,e)=>{const n=t.tracePath[0],o=t.tracePath[t.tracePath.length-1];if(!n||!o)return[];const i=t.tracePath[1]??n,r=t.tracePath[t.tracePath.length-2]??o,s=Ls(e.center,e.width,e.height),a=nE,A=sm(e.orientation),c=A.x<0?s.minX-a:s.maxX+a,l=A.x<0?s.maxX+a:s.minX-a,u=s.maxY+a,g=s.minY-a,h=[];for(const d of[c,l])h.push([n,i,{x:i.x,y:u},{x:d,y:u},{x:d,y:g},{x:r.x,y:g},r,o],[n,i,{x:i.x,y:g},{x:d,y:g},{x:d,y:u},{x:r.x,y:u},r,o]);return h},Kyo=(t,e)=>{const n=t.tracePath[0],o=t.tracePath[t.tracePath.length-1];if(!n||!o)return[];const i=t.tracePath[1]??n,r=t.tracePath[t.tracePath.length-2]??o,s=sm(e.orientation);if(s.x===0)return[];const a=Ls(e.center,e.width,e.height),A=s.x<0?a.minX-nE:a.maxX+nE,c=a.maxY+nE,l=a.minY-nE,u=i.y>=r.y,g=u?c:l,h=u?l:c;return[[n,i,{x:i.x,y:g},{x:A,y:g},{x:A,y:h},{x:r.x,y:h},r,o],[n,i,{x:i.x,y:h},{x:A,y:h},{x:A,y:g},{x:r.x,y:g},r,o]]},Vyo=({trace:t,obstacleLabel:e,outputTraces:n,outputNetLabelPlacements:o,candidateResults:i,chipObstacles:r})=>{for(const A of i)if(A.usesHorizontalSegmentPush&&A.status==="valid"&&A.score)return A.path;let s=null,a=gvt({trace:t,tracePath:t.tracePath,obstacleLabel:e,outputTraces:n,outputNetLabelPlacements:o,chipObstacles:r});for(const A of i)A.status!=="valid"||!A.score||jyo(A.score,a)&&(a=A.score,s=A.path);return s},zyo=({trace:t,label:e,outputTraces:n})=>{const o=sm(e.orientation);if(o.x===0)return null;const i=t.tracePath,r=Ls(e.center,e.width,e.height),s=i.findIndex((f,I)=>{const C=i[I+1];return!C||Math.abs(f.x-C.x)>=1e-9?!1:O7(f,C,r)});if(s<=0||s>=i.length-2)return null;const a=i[s-1],A=i[s],c=i[s+1],l=i[s+2];if(Math.abs(a.y-A.y)>=1e-9||Math.abs(c.y-l.y)>=1e-9)return null;let u=r.minX-nE;o.x>0&&(u=r.maxX+nE);const g=o.x>0?nE:-nE,h=Math.min(A.y,c.y),d=Math.max(A.y,c.y);for(let f=0;f<Hyo&&Oyo({x:u,lowY:h,highY:d,outputTraces:n,netId:t.globalConnNetId});f++)u+=g;const p=uvt({start:a,end:{x:u,y:A.y},labelBounds:r}),m=uvt({start:{x:u,y:c.y},end:l,labelBounds:r}),_=[...i.slice(0,s-1),a];return Math.abs(a.y-p)>=1e-9&&_.push({x:a.x,y:p}),_.push({x:u,y:p}),_.push({x:u,y:m}),Math.abs(l.y-m)>=1e-9&&_.push({x:l.x,y:m}),_.push(l,...i.slice(s+3)),Qa(_)},uvt=({start:t,end:e,labelBounds:n})=>{if(!O7(t,e,n))return t.y;const o=(n.minY+n.maxY)/2;return t.y>=o?n.maxY+nE:n.minY-nE},Jyo=(t,e)=>{if(e)for(const n of t)n.selected=n.path===e},gvt=({trace:t,tracePath:e,obstacleLabel:n,outputTraces:o,outputNetLabelPlacements:i,chipObstacles:r})=>{const s={...t,tracePath:e};return{labelIntersections:Jh({traces:[s],netLabels:i}).length,labelHugDistance:$yo(e,n),traceIntersections:Wyo(s,o),chipBoundaryOverlap:Lyo(e,r),pathLength:U7(e)}},Wyo=(t,e)=>{let n=0;for(const o of e)o.mspPairId!==t.mspPairId&&(n+=vle(t.tracePath,o.tracePath));return n},jyo=(t,e)=>{const n=t.labelIntersections>0,o=e.labelIntersections>0;return n!==o?!n:t.chipBoundaryOverlap!==e.chipBoundaryOverlap?t.chipBoundaryOverlap<e.chipBoundaryOverlap:t.labelIntersections!==e.labelIntersections?t.labelIntersections<e.labelIntersections:t.labelHugDistance!==e.labelHugDistance?t.labelHugDistance<e.labelHugDistance:t.traceIntersections!==e.traceIntersections?t.traceIntersections<e.traceIntersections:t.pathLength<e.pathLength},$yo=(t,e)=>{const n=Ls(e.center,e.width,e.height);let o=0;for(const i of t)o+=qyo(i,n);return o},qyo=(t,e)=>{const n=Math.max(e.minX-t.x,0,t.x-e.maxX),o=Math.max(e.minY-t.y,0,t.y-e.maxY);return n+o},Xyo=t=>{const{trace:e,outputTraces:n}=t;let o=0;for(const i of n)i.mspPairId!==e.mspPairId&&i.globalConnNetId!==e.globalConnNetId&&(o+=vle(e.tracePath,i.tracePath));return o},dvt=t=>{const{traces:e,outputTraces:n,chipObstacles:o}=t;let i=0,r=0;for(const s of e)Fyo(s.tracePath,o)&&(i+=1),r+=Xyo({trace:s,outputTraces:n});return{chipEdgeRuns:i,traceCrossings:r}},Zyo="blue",hvt="red",e2o=t=>{const e=zh(t.inputProblem);return t2o(e,t),n2o(e,t),t.solved||(o2o(e,t.currentCandidateResults),i2o(e,t)),e},t2o=(t,e)=>{for(const n of e.outputTraces)t.lines.push({points:n.tracePath,strokeColor:"purple"})},n2o=(t,e)=>{for(const n of e.outputNetLabelPlacements){const o=Mc(n.globalConnNetId,.35);t.rects.push({center:n.center,width:n.width,height:n.height,fill:o,strokeColor:Mc(n.globalConnNetId,.9),label:`netId: ${n.netId}
globalConnNetId: ${n.globalConnNetId}`}),t.points.push({...n.anchorPoint,color:Mc(n.globalConnNetId,.9),label:`anchorPoint
orientation: ${n.orientation}`})}},o2o=(t,e)=>{for(const n of e){const o=n.score?`
label intersections: ${n.score.labelIntersections}
trace intersections: ${n.score.traceIntersections}`:"";t.lines.push({points:n.path,strokeColor:n.selected?Zyo:hvt,strokeDash:n.selected?void 0:"4 2",label:`${n.selected?"selected":n.status} reroute${o}`})}},i2o=(t,e)=>{if(!e.currentOverlap)return;const n=e.currentOverlap.label;t.rects.push({center:n.center,width:n.width,height:n.height,fill:"rgba(255, 0, 0, 0.2)",strokeColor:hvt,label:`overlap target
${n.netId??n.globalConnNetId}`})},r2o=.1,s2o=10,pvt=.1,a2o=(t,e)=>t?t.chipEdgeRuns!==e.chipEdgeRuns?t.chipEdgeRuns<e.chipEdgeRuns:t.traceCrossings<e.traceCrossings:!1,A2o=class extends Ng{inputProblem;traces;netLabelPlacements;outputTraces;outputNetLabelPlacements;queuedOverlaps=[];currentOverlap=null;currentCandidateResults=[];chipObstacles;pinMap;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputTraces=[...t.traces],this.outputNetLabelPlacements=[...t.netLabelPlacements],this.chipObstacles=Hy(t.inputProblem),this.pinMap=Kve(t.inputProblem),this.initializeQueuedOverlaps(),this.currentOverlap=this.queuedOverlaps[0]??null}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){const t=this.queuedOverlaps.shift();if(!t){this.finish();return}if(!this.isOverlapStillPresent(t)){this.currentOverlap=t,this.currentCandidateResults=[];return}this.rerouteOverlappingTrace(t)}finish(){this.currentOverlap=null,this.currentCandidateResults=[],this.solved=!0}initializeQueuedOverlaps(){const t=[],e=new Set;for(const n of this.getTraceLabelOverlaps()){if(!this.shouldRerouteOverlap(n))continue;const o=this.getOverlapKey(n);e.has(o)||(e.add(o),t.push(n))}this.queuedOverlaps=t}getTraceLabelOverlaps(){return Jh({traces:this.outputTraces,netLabels:this.outputNetLabelPlacements})}shouldRerouteOverlap(t){return this.isXFacingLabel(t.label)&&!this.hasExplicitOrientationConstraint(t.label)}isXFacingLabel(t){return t.orientation==="x+"||t.orientation==="x-"}hasExplicitOrientationConstraint(t){const e=t.netId??t.globalConnNetId;return Object.hasOwn(this.inputProblem.availableNetLabelOrientations,e)}getOverlapKey(t){const e=t.label.netId??t.label.globalConnNetId;return`${t.trace.mspPairId}:${e}:${t.label.anchorPoint.x}:${t.label.anchorPoint.y}`}isOverlapStillPresent(t){const e=this.getCurrentTrace(t.trace);return e?Jh({traces:[e],netLabels:[t.label]}).length>0:!1}getCurrentTrace(t){return this.outputTraces.find(e=>e.mspPairId===t.mspPairId)}rerouteOverlappingTrace(t){this.currentOverlap=t,this.currentCandidateResults=[];const e=this.outputTraces.findIndex(a=>a.mspPairId===t.trace.mspPairId);if(e===-1)return;const n=this.outputTraces[e],o=this.tryMoveLabelOutward(t.label),i=Gyo({trace:n,obstacleLabel:t.label,inputProblem:this.inputProblem,outputTraces:this.outputTraces,outputNetLabelPlacements:this.outputNetLabelPlacements,chipObstacles:this.chipObstacles});this.currentCandidateResults=i.candidateResults;let r=null;if(i.bestPath&&(r=dvt({traces:[{...n,tracePath:i.bestPath}],outputTraces:this.outputTraces,chipObstacles:this.chipObstacles})),o){const a=dvt({traces:[o.connectorTrace,n],outputTraces:this.outputTraces,chipObstacles:this.chipObstacles});if(!a2o(r,a)){this.outputNetLabelPlacements[o.labelIndex]=o.movedLabel,this.outputTraces.push(o.connectorTrace);return}}if(!i.bestPath)return;const s=n.tracePath;this.outputTraces[e]={...n,tracePath:i.bestPath},this.outputNetLabelPlacements=jH({trace:n,originalTracePath:s,reroutedTracePath:i.bestPath,netLabelPlacements:this.outputNetLabelPlacements})}tryMoveLabelOutward(t){const e=this.outputNetLabelPlacements.findIndex(i=>i.globalConnNetId===t.globalConnNetId&&i.anchorPoint.x===t.anchorPoint.x&&i.anchorPoint.y===t.anchorPoint.y&&i.pinIds.join(",")===t.pinIds.join(","));if(e===-1)return null;const n=this.outputNetLabelPlacements[e];if(n.mspConnectionPairIds.length>0||n.pinIds.length!==1||this.outputNetLabelPlacements.filter(i=>i.globalConnNetId===n.globalConnNetId).length!==1)return null;const o=sm(n.orientation);if(o.x===0&&o.y===0)return null;for(let i=1;i<=s2o;i++){const r=i*r2o,s={...n,anchorPoint:{x:n.anchorPoint.x+o.x*r,y:n.anchorPoint.y+o.y*r},center:{x:n.center.x+o.x*r,y:n.center.y+o.y*r}},a={...s,width:s.width+pvt*2,height:s.height+pvt*2};if(Jh({traces:this.outputTraces,netLabels:[a]}).length>0)continue;const A=l2o({label:n,movedLabel:s,pinMap:this.pinMap});if(!(Jh({traces:[A],netLabels:this.outputNetLabelPlacements}).length>0))return{labelIndex:e,movedLabel:s,connectorTrace:A}}return null}visualize(){return e2o({inputProblem:this.inputProblem,outputTraces:this.outputTraces,outputNetLabelPlacements:this.outputNetLabelPlacements,solved:this.solved,currentOverlap:this.currentOverlap,currentCandidateResults:this.currentCandidateResults})}},c2o=t=>`port-only-label-connector-${t.globalConnNetId}-${t.pinIds[0]}`,l2o=({label:t,movedLabel:e,pinMap:n})=>{const o=c2o(t);return{mspPairId:o,dcConnNetId:t.dcConnNetId??t.globalConnNetId,globalConnNetId:t.globalConnNetId,userNetId:t.netId,pins:Vve(t,n),tracePath:[t.anchorPoint,e.anchorPoint],mspConnectionPairIds:[o],pinIds:t.pinIds}},Z_=.05,mvt=2e3,$5=.001,lr=1e-9,Rle=$5+lr,u2o="blue",_vt="red",ju=t=>t==="y+"||t==="y-",$H=t=>t==="x+"||t==="x-",pj=(t,e)=>Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)>lr&&Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)>lr,Tle=(t,e,n,o)=>Math.min(e,o)-Math.max(t,n)>lr,mj=(t,e)=>{for(const n of Object.values(e)){const o=n.tracePath;for(let i=0;i<o.length-1;i++)if(kle(o[i],o[i+1],t))return!0}return!1},kle=(t,e,n)=>{const o={minX:n.minX+Rle,minY:n.minY+Rle,maxX:n.maxX-Rle,maxY:n.maxY-Rle};return o.minX>=o.maxX||o.minY>=o.maxY?!1:Fle(t,e)?t.x<=o.minX+lr||t.x>=o.maxX-lr?!1:Tle(Math.min(t.y,e.y),Math.max(t.y,e.y),o.minY,o.maxY):Lle(t,e)?t.y<=o.minY+lr||t.y>=o.maxY-lr?!1:Tle(Math.min(t.x,e.x),Math.max(t.x,e.x),o.minX,o.maxX):!1},Jve=(t,e)=>{for(let n=0;n<t.length-1;n++)if(O7(t[n],t[n+1],e))return!0;return!1},fvt=(t,e)=>[["left",Math.abs(t.x-e.minX)],["right",Math.abs(t.x-e.maxX)],["bottom",Math.abs(t.y-e.minY)],["top",Math.abs(t.y-e.maxY)]],Wve=(t,e,n)=>jve(ju(n)?[t,{x:e.x,y:t.y},e]:[t,{x:t.x,y:e.y},e]),jve=t=>{const e=t.filter((o,i)=>i===0||!g2o(o,t[i-1]));if(e.length<3)return e;const n=[e[0]];for(let o=1;o<e.length-1;o++){const i=n[n.length-1],r=e[o],s=e[o+1];Fle(i,r)&&Fle(r,s)||Lle(i,r)&&Lle(r,s)||n.push(r)}return n.push(e[e.length-1]),n},g2o=(t,e)=>Fle(t,e)&&Lle(t,e),Fle=(t,e)=>Math.abs(t.x-e.x)<=lr,Lle=(t,e)=>Math.abs(t.y-e.y)<=lr,d2o=t=>Math.max(...t.chips.map(n=>n.width),1)*3,Ivt=t=>t.mspConnectionPairIds.length===0,h2o=({labelIndices:t,netLabelPlacements:e})=>{const n=[...t];for(const o of t){const i=e[o];if(Ivt(i))continue;const r=Ls(i.center,i.width,i.height),s=n.findIndex(A=>{const c=e[A];if(!Ivt(c)||c.globalConnNetId===i.globalConnNetId)return!1;const l=Ls(c.center,c.width,c.height);return pj(r,l)}),a=n.indexOf(o);s===-1||s>a||(n.splice(a,1),n.splice(s,0,o))}return n},p2o=t=>{const e=zh(t.inputProblem);return C2o(e),m2o(e,t.traces),_2o(e,t.outputNetLabelPlacements),f2o(e,t.currentLabel,t.solved),I2o(e,t.currentCandidateResults,t.solved),e},m2o=(t,e)=>{for(const n of e)t.lines.push({points:n.tracePath,strokeColor:"purple"})},_2o=(t,e)=>{for(const n of e)t.rects.push({center:n.center,width:n.width,height:n.height,fill:Mc(n.globalConnNetId,.35),strokeColor:Mc(n.globalConnNetId,.9),label:`netId: ${n.netId}
globalConnNetId: ${n.globalConnNetId}`}),t.points.push({x:n.anchorPoint.x,y:n.anchorPoint.y,color:Mc(n.globalConnNetId,.9),label:`anchorPoint
orientation: ${n.orientation}`})},f2o=(t,e,n)=>{!e||n||t.rects.push({center:e.center,width:e.width,height:e.height,fill:"rgba(255, 0, 0, 0.2)",strokeColor:_vt,label:`available orientation target
${e.netId??e.globalConnNetId}`})},I2o=(t,e,n)=>{if(!n)for(const o of e){const i=o.selected?u2o:_vt,r=o.distance===void 0?"":`
distance: ${o.distance.toFixed(3)}`,s=o.outwardDistance===void 0||o.outwardDistance===0?"":`
outward distance: ${o.outwardDistance.toFixed(3)}`;t.rects.push({center:o.center,width:o.width,height:o.height,fill:o.selected?"rgba(0, 0, 255, 0.2)":"rgba(255, 0, 0, 0.15)",strokeColor:i,strokeDash:o.selected?void 0:"4 2",label:`${o.selected?"selected":o.status} available orientation
phase: ${o.phase}
orientation: ${o.orientation}${r}${s}`}),t.points.push({x:o.anchorPoint.x,y:o.anchorPoint.y,color:i,label:`candidate anchor
${o.phase}
${o.orientation}`})}},C2o=t=>{t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[])},y2o=class{chipObstacleSpatialIndex;labelIndex=null;traceSegmentIndex=null;traceSegments=[];constructor(t){this.chipObstacleSpatialIndex=t.chipObstacleSpatialIndex,this.rebuild(t)}rebuild(t){this.labelIndex=this.buildLabelIndex(t.netLabelPlacements),this.traceSegments=this.getTraceSegments(t.traces),this.traceSegmentIndex=this.buildTraceSegmentIndex(this.traceSegments)}getLabelIndicesInBounds(t){return this.labelIndex?this.labelIndex.search(t.minX,t.minY,t.maxX,t.maxY):[]}getTraceSegmentsInBounds(t){if(!this.traceSegmentIndex)return[];const e=$ve(t,lr);return this.traceSegmentIndex.search(e.minX,e.minY,e.maxX,e.maxY).map(n=>this.traceSegments[n])}getLabelIndicesNearTracePath(t){const e=new Set;for(let n=0;n<t.length-1;n++){const o=$ve(Cvt(t[n],t[n+1]),lr);for(const i of this.getLabelIndicesInBounds(o))e.add(i)}return[...e].sort((n,o)=>n-o)}doesTracePathCrossChip(t){for(let e=0;e<t.length-1;e++){const n=t[e],o=t[e+1],i=this.chipObstacleSpatialIndex.getChipsInBounds($ve(Cvt(n,o),lr));for(const r of i)if(kle(n,o,r.bounds))return!0}return!1}doesTraceCrossBoundsInterior(t){for(const e of this.getTraceSegmentsInBounds(t))if(kle(e.start,e.end,t))return!0;return!1}doesTraceIntersectBounds(t){for(const e of this.getTraceSegmentsInBounds(t.bounds))if(e.trace.globalConnNetId!==t.excludedGlobalConnNetId&&O7(e.start,e.end,t.bounds))return!0;return!1}buildLabelIndex(t){if(t.length===0)return null;const e=new UH(t.length);for(const n of t)e.add(n.center.x-n.width/2,n.center.y-n.height/2,n.center.x+n.width/2,n.center.y+n.height/2);return e.finish(),e}getTraceSegments(t){const e=[];for(const n of t)for(let o=0;o<n.tracePath.length-1;o++)e.push({trace:n,start:n.tracePath[o],end:n.tracePath[o+1]});return e}buildTraceSegmentIndex(t){if(t.length===0)return null;const e=new UH(t.length);for(const n of t)e.add(Math.min(n.start.x,n.end.x),Math.min(n.start.y,n.end.y),Math.max(n.start.x,n.end.x),Math.max(n.start.y,n.end.y));return e.finish(),e}};function Cvt(t,e){return{minX:Math.min(t.x,e.x),minY:Math.min(t.y,e.y),maxX:Math.max(t.x,e.x),maxY:Math.max(t.y,e.y)}}function $ve(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}var _j=.1,x2o=.2,yvt=.1,E2o=class extends Ng{inputProblem;traces;netLabelPlacements;netLabelConnectorTraceIds=new Set;outputNetLabelPlacements;queuedLabelIndices=[];currentLabelIndex=null;currentLabel=null;currentCandidateResults=[];crowdedPortOnlyLabelIndices=new Set;blockedStandaloneLabelIndex=null;blockedStandaloneLabelTargetAnchorX=null;traceMap;chipObstacleSpatialIndex;maxSearchDistance;pinMap;obstacleIndex;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=[...t.traces],this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements],this.traceMap=Object.fromEntries(this.traces.map(e=>[e.mspPairId,e])),this.pinMap=Kve(t.inputProblem),this.chipObstacleSpatialIndex=t.inputProblem._chipObstacleSpatialIndex??new yle(t.inputProblem.chips),this.maxSearchDistance=d2o(t.inputProblem),this.obstacleIndex=new y2o({chipObstacleSpatialIndex:this.chipObstacleSpatialIndex,netLabelPlacements:this.outputNetLabelPlacements,traces:this.traces}),this.crowdedPortOnlyLabelIndices=this.getCrowdedPortOnlyLabelIndices(),this.queuedLabelIndices=this.getProcessableLabelIndices(),this.setCurrentLabel(this.queuedLabelIndices[0]??null)}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){const t=this.queuedLabelIndices.shift();if(t===void 0){this.finish();return}this.processLabel(t)}getOutput(){return{traces:this.traces,netLabelPlacements:this.outputNetLabelPlacements,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds}}getProcessableLabelIndices(){const t=[];for(let l=0;l<this.outputNetLabelPlacements.length;l++)this.shouldProcessLabel(this.outputNetLabelPlacements[l],l)&&t.push(l);this.sortCrowdedTopBankByPin(t);const e=h2o({labelIndices:t,netLabelPlacements:this.outputNetLabelPlacements}),n=e.find(l=>{const u=this.outputNetLabelPlacements[l],g=this.getAvailableOrientations(u);return this.isPortOnlyLabel(u)&&this.isStandaloneSinglePinNetLabel(u)&&g.length===1&&ju(g[0])&&this.labelIntersectsDifferentNetTrace(u)});if(n===void 0)return e;this.blockedStandaloneLabelIndex=n,this.blockedStandaloneLabelTargetAnchorX=null;const o=this.outputNetLabelPlacements[n],i=this.getAvailableOrientations(o)[0],r=this.getChipSideForPoint(o.anchorPoint),s=[],a=[];for(let l=0;l<e.length;l++){const u=e[l],g=this.outputNetLabelPlacements[u],h=this.getAvailableOrientations(g);this.getChipSideForPoint(g.anchorPoint)===r&&h.length===1&&h[0]===i&&(s.push(l),a.push(u))}a.sort((l,u)=>{const g=this.outputNetLabelPlacements[l].anchorPoint.y,h=this.outputNetLabelPlacements[u].anchorPoint.y;return i==="y+"?h-g:g-h});const A=L7({inputProblem:this.inputProblem,netId:o.netId,pinIds:o.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(o)});let c;if(A!==void 0&&(c=a.find(l=>{if(l===n)return!1;const u=this.outputNetLabelPlacements[l];return L7({inputProblem:this.inputProblem,netId:u.netId,pinIds:u.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(u)})===A})),c!==void 0){const l=this.outputNetLabelPlacements[c];this.blockedStandaloneLabelTargetAnchorX=this.getSearchStartAnchor(l,i).x}for(let l=0;l<s.length;l++)e[s[l]]=a[l];return e}sortCrowdedTopBankByPin(t){const e=new Map;for(let n=0;n<t.length;n++){const o=t[n];if(!this.crowdedPortOnlyLabelIndices.has(o))continue;const i=this.outputNetLabelPlacements[o];if(this.getChipSideForPoint(i.anchorPoint)!=="top")continue;const r=this.pinMap[i.pinIds[0]];if(!r)continue;const s=e.get(r.chipId)??[];s.push(n),e.set(r.chipId,s)}for(const n of e.values()){const o=n.map(i=>t[i]).sort((i,r)=>{const s=this.pinMap[this.outputNetLabelPlacements[i].pinIds[0]],a=this.pinMap[this.outputNetLabelPlacements[r].pinIds[0]];return s.x-a.x});for(let i=0;i<n.length;i++)t[n[i]]=o[i]}}shouldProcessLabel(t,e){const n=this.getAvailableOrientations(t);if(n.length===0)return!1;if(!n.includes(t.orientation)||this.getTextBlockedMultiPinRailTraces(t,n[0]))return!0;if(n.length===1&&ju(n[0])&&this.isGroundLabel(t)){const r=Ls(t.center,t.width,t.height);if(this.outputNetLabelPlacements.some((a,A)=>{if(A===e||a.globalConnNetId===t.globalConnNetId)return!1;const c=this.getHorizontalConstraintMismatchBounds(a);return c?pj(r,c):!1}))return!0}if(!this.crowdedPortOnlyLabelIndices.has(e))return!1;const i=Ls(t.center,t.width,t.height);return this.outputNetLabelPlacements.some((r,s)=>s===e||r.globalConnNetId===t.globalConnNetId?!1:pj(i,Ls(r.center,r.width,r.height)))}getCrowdedPortOnlyLabelIndices(){const t=new Map;for(let n=0;n<this.outputNetLabelPlacements.length;n++){const o=this.outputNetLabelPlacements[n];if(!this.isPortOnlyLabel(o)||!this.isStandaloneSinglePinNetLabel(o)||this.getAvailableOrientations(o).length===0)continue;const i=this.pinMap[o.pinIds[0]];if(!i)continue;const r=this.getChipSideForPoint(o.anchorPoint);if(!r)continue;const s=t.get(i.chipId)??new Map,a=s.get(r)??[];a.push(n),s.set(r,a),t.set(i.chipId,s)}const e=new Set;for(const n of t.values())for(const o of n.values()){const i=o.some(s=>{const a=this.outputNetLabelPlacements[s];return!this.getAvailableOrientations(a).includes(a.orientation)}),r=o.some((s,a)=>{const A=this.outputNetLabelPlacements[s],c=Ls(A.center,A.width,A.height);return o.slice(a+1).some(l=>{const u=this.outputNetLabelPlacements[l];return pj(c,Ls(u.center,u.width,u.height))})});if(!(!i||!r))for(const s of o)e.add(s)}return e}processLabel(t){const e=this.outputNetLabelPlacements[t];this.setCurrentLabel(t),this.currentCandidateResults=[];const n=this.findCorrectedCandidate(e,t);n&&this.applyCandidate(e,n,t)}applyCandidate(t,e,n){this.outputNetLabelPlacements[n]={...t,...Tyo(e)},this.addConnectorTrace(t,e,n),this.obstacleIndex.rebuild({netLabelPlacements:this.outputNetLabelPlacements,traces:this.traces})}addConnectorTrace(t,e,n){if(e.phase==="trace-anchor")return;if(e.phase==="downward-ground-rail-extension")for(const s of t.mspConnectionPairIds){const a=this.traceMap[s];if(!a)continue;const A=Ryo({tracePath:a.tracePath,sourcePoint:t.anchorPoint,extensionEndPoint:e.anchorPoint});if(A){a.tracePath=A;return}}const o=this.getCandidateConnectorTrace(t,e,n);if(o.length<2)return;const i=`available-net-orientation-${n}-${t.netId??t.globalConnNetId}`,r={mspPairId:i,dcConnNetId:t.dcConnNetId??t.globalConnNetId,globalConnNetId:t.globalConnNetId,userNetId:t.netId,pins:Vve(t,this.pinMap),tracePath:o,mspConnectionPairIds:[i],pinIds:t.pinIds};this.traces.push(r),this.traceMap[i]=r,this.netLabelConnectorTraceIds.add(i)}finish(){this.currentLabelIndex=null,this.currentLabel=null,this.currentCandidateResults=[],this.solved=!0}setCurrentLabel(t){this.currentLabelIndex=t,this.currentLabel=t===null?null:this.outputNetLabelPlacements[t]}findCorrectedCandidate(t,e){const n=this.getAvailableOrientations(t),o=n[0];if(this.crowdedPortOnlyLabelIndices.has(e)&&this.getChipSideForPoint(t.anchorPoint)==="top"&&ju(o)){const d=this.findValidCrowdedTopVerticalFanoutCandidate(t,e,o);if(d)return d}const i=this.inputProblem.netConnections.find(d=>d.netId===t.netId),r=i?.pinIds.length===2,s=i?.isGround&&$H(t.orientation)&&n.length===1&&o==="y-"&&this.hasTraceContinuingInOrientation(t,"y+"),a=(i?.pinIds.length??0)>2&&ju(o)&&this.hasPortOnlyLabelOnSameNet(t),A=this.getTextBlockedMultiPinRailTraces(t,o),c=ju(o)&&this.hasOppositeVerticalRailOnSameChipSide(t,o);if(A){const d=this.findValidNearbyRailCandidate(t,o,e,A);if(d)return d}if(n.length===1&&ju(o)&&this.isOutwardHorizontalFallback(t)&&this.hasTraceContinuingInOrientation(t,o)&&(a||c)){const d=this.findValidTraceAnchorCandidate(t,o,e);if(d){if(this.canPlaceVerticalLabelOnHostRail(d,t))return d;d.selected=!1}const p=this.findValidOutwardTraceAnchorCandidate(t,o,e);if(p)return p}if(r&&n.length===1&&ju(o)&&this.hasTraceContinuingInOrientation(t,o)){const d=this.findValidCandidateInShiftColumn({label:t,labelIndex:e,orientation:o,direction:sm(o),baseAnchor:this.getWickOffsetAnchor(t.anchorPoint,o),maxSearchDistance:this.maxSearchDistance,outwardDistance:0,stopOnTraceCollision:!1});if(d)return d}const l=this.findValidRotatedCandidate(t,e,n),u=l!==null&&Math.abs(l.anchorPoint.x-t.anchorPoint.x)>lr;if(s&&u){const d=this.findValidCandidateInShiftColumn({label:t,labelIndex:e,orientation:o,direction:sm(o),baseAnchor:t.anchorPoint,maxSearchDistance:this.getSearchDistanceLimit(t,o),outwardDistance:0,phase:"downward-ground-rail-extension",stopOnTraceCollision:!1,connectorSource:t.anchorPoint,startDistance:x2o});if(d)return d}if(l)return l;const g=this.findValidTraceAnchorCandidate(t,n[0],e);if(g)return g;const h=this.findValidShiftedCandidate(t,n[0],e);return h||this.findValidLateralShiftedCandidate(t,n[0],e)}findValidCrowdedTopVerticalFanoutCandidate(t,e,n){const o=this.pinMap[t.pinIds[0]],i=o?this.chipObstacleSpatialIndex.chips.find(m=>m.chipId===o.chipId):void 0;if(!i)return null;const{width:r,height:s}=_B({orientation:n,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),a=this.outputNetLabelPlacements.map((m,_)=>({index:_,pin:this.pinMap[m.pinIds[0]]})).filter(({index:m,pin:_})=>this.crowdedPortOnlyLabelIndices.has(m)&&_?.chipId===o.chipId&&_.x>o.x+lr).sort((m,_)=>m.pin.x-_.pin.x)[0]?.pin;if(n==="y-"&&a)return null;const A=n==="y-"?Math.max(t.anchorPoint.x+Z_,i.bounds.maxX+r/2+_j):Math.min(t.anchorPoint.x,(a?.x??i.bounds.maxX)-Z_-r/2);let c=i.bounds.maxY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let m=0;m<this.outputNetLabelPlacements.length;m++){if(m===e||!this.crowdedPortOnlyLabelIndices.has(m)||this.queuedLabelIndices.includes(m))continue;const _=this.outputNetLabelPlacements[m],f=Ls(_.center,_.width,_.height);c=Math.max(c,f.maxY),_.orientation==="y+"&&(l=Math.min(l,f.minY),u=Math.max(u,f.maxY))}const g=c+Z_+(n==="y-"?s:0),d=Number.isFinite(l)&&Number.isFinite(u)?(l+u)/2:g,p=n==="y-"?[d,g]:[g];for(const m of p){if(m-t.anchorPoint.y>this.maxSearchDistance+lr)continue;const _=this.createCandidate(t,{x:A,y:m},n),f=this.evaluateCandidate(_,t,e,"lateral-shift",m-t.anchorPoint.y,A-t.anchorPoint.x);if(this.recordCandidateResult(f),f.status==="valid")return f.selected=!0,f}return null}hasTraceContinuingInOrientation(t,e){const n=sm(e);return Object.values(this.traceMap).some(o=>{if(o.globalConnNetId!==t.globalConnNetId)return!1;const i=o.tracePath;return i.some((r,s)=>Math.abs(r.x-t.anchorPoint.x)>lr||Math.abs(r.y-t.anchorPoint.y)>lr?!1:[i[s-1],i[s+1]].some(a=>a&&Math.abs(a.x-r.x)<=lr&&(a.y-r.y)*n.y>lr))})}findValidRotatedCandidate(t,e,n){for(const o of n){const i=this.createCandidate(t,this.getSearchStartAnchor(t,o),o),r=this.evaluateCandidate(i,t,e,"rotate");if(this.recordCandidateResult(r),r.status==="valid")return r.selected=!0,r}return null}findValidTraceAnchorCandidate(t,e,n){const o=sm(e),{points:i}=this.getTraceAnchorCandidates(t,e),r=i.sort((s,a)=>{const A=s.x*o.x+s.y*o.y;return a.x*o.x+a.y*o.y-A});for(const s of r){const a=this.createCandidate(t,s,e),A=this.evaluateCandidate(a,t,n,"trace-anchor");if(this.recordCandidateResult(A),A.status==="valid")return A.selected=!0,A}return null}findValidOutwardTraceAnchorCandidate(t,e,n){const o=sm(e),i=this.getSearchStartAnchor(t,e),{points:r,preferNearestBendOnOutwardRow:s}=this.getTraceAnchorCandidates(t,e),a=r.sort((A,c)=>{const l=A.x*o.x+A.y*o.y,u=c.x*o.x+c.y*o.y;if(!s)return u-l;const g=ju(e)?Math.abs(A.x-i.x):Math.abs(A.y-i.y),h=ju(e)?Math.abs(c.x-i.x):Math.abs(c.y-i.y);return u-l||g-h});for(const A of a){const c=this.createCandidate(t,{x:i.x,y:A.y},e,A),l=this.evaluateCandidate(c,t,n,"outward-trace-anchor");if(this.recordCandidateResult(l),l.status==="valid")return l.selected=!0,l;const u=this.getPerpendicularOutwardDirection(A,e);if(!(u.x===0&&u.y===0))for(let g=Z_;g<=this.maxSearchDistance+lr;g+=Z_){const h={x:A.x+u.x*g,y:A.y+u.y*g},d=this.createCandidate(t,h,e,A),p=this.evaluateCandidate(d,t,n,"outward-trace-anchor",g);if(this.recordCandidateResult(p),p.status==="valid")return p.selected=!0,p}}return null}getTraceAnchorCandidates(t,e){const n=new Set,o=[],i=new Set(t.mspConnectionPairIds??[]),r=new Set(i);if(ju(e)){const u=new Set;for(const h of r)for(const d of this.traceMap[h]?.pinIds??[])u.add(d);let g=!0;for(;g;){g=!1;for(const h of Object.values(this.traceMap)){if(r.has(h.mspPairId)||this.netLabelConnectorTraceIds.has(h.mspPairId)||h.globalConnNetId!==t.globalConnNetId||!h.pinIds.some(p=>u.has(p)))continue;const d=[...r].flatMap(p=>{const m=this.traceMap[p];return m?[m]:[]});if(this.sharesVerticalRailWithAny(h,d)){r.add(h.mspPairId);for(const p of h.pinIds)u.add(p);g=!0}}}}for(const u of r){const g=this.traceMap[u];if(g)for(const h of g.tracePath){const d=`${h.x.toFixed(9)},${h.y.toFixed(9)}`;n.has(d)||(n.add(d),o.push(h))}}const s=sm(e),a=Math.max(...o.map(u=>u.x*s.x+u.y*s.y)),A=o.filter(u=>Math.abs(u.x*s.x+u.y*s.y-a)<=lr),c=new Set([...i].flatMap(u=>this.traceMap[u]?.pinIds??[])),l=[...r].flatMap(u=>{if(i.has(u))return[];const g=this.traceMap[u];return g?.pinIds.some(h=>c.has(h))?[g]:[]});return{points:o,preferNearestBendOnOutwardRow:l.some(u=>A.some(g=>u.tracePath.some(h=>Math.abs(h.x-g.x)<=lr&&Math.abs(h.y-g.y)<=lr)))}}sharesVerticalRailWithAny(t,e){const n=new Set;for(const o of e)for(let i=0;i<o.tracePath.length-1;i++){const r=o.tracePath[i],s=o.tracePath[i+1];Math.abs(r.x-s.x)<=lr&&Math.abs(r.y-s.y)>lr&&n.add(r.x)}for(let o=0;o<t.tracePath.length-1;o++){const i=t.tracePath[o],r=t.tracePath[o+1];if(Math.abs(i.x-r.x)<=lr&&Math.abs(i.y-r.y)>lr&&[...n].some(s=>Math.abs(s-i.x)<=lr))return!0}return!1}getAvailableOrientations(t){const e=t.netId??t.globalConnNetId;return this.inputProblem.availableNetLabelOrientations[e]??[]}findValidShiftedCandidate(t,e,n){const o=sm(e),i=this.getSearchStartAnchor(t,e),r=this.getPerpendicularOutwardDirection(t.anchorPoint,e),s=this.getSearchDistanceLimit(t,e),a=r.x===0&&r.y===0?0:this.maxSearchDistance;for(let A=0;A<=a+lr;A+=Z_){const c={x:i.x+r.x*A,y:i.y+r.y*A},l=this.findValidCandidateInShiftColumn({label:t,labelIndex:n,orientation:e,direction:o,baseAnchor:c,maxSearchDistance:s,outwardDistance:A});if(l)return l}return null}findValidLateralShiftedCandidate(t,e,n){const o=sm(e),i=this.getSearchStartAnchor(t,e),r={x:ju(e)?1:0,y:$H(e)?1:0},s=Math.ceil(this.maxSearchDistance/Z_);for(let a=1;a<=s;a++)for(const A of[-1,1]){const c=A*a*Z_,l={x:i.x+r.x*c,y:i.y+r.y*c},u=this.getLateralColumnMaxDistance(t,e,l),g=this.findValidCandidateInShiftColumn({label:t,labelIndex:n,orientation:e,direction:o,baseAnchor:l,maxSearchDistance:u,outwardDistance:c,phase:"lateral-shift"});if(g)return g}return null}findValidCandidateInShiftColumn(t){const{label:e,labelIndex:n,orientation:o,direction:i,baseAnchor:r,maxSearchDistance:s,outwardDistance:a,phase:A="shift",stopOnTraceCollision:c=!0,connectorSource:l,startDistance:u=Z_}=t;for(let g=u;g<=s+lr;g+=Z_){const h={x:r.x+i.x*g,y:r.y+i.y*g},d=l??(A==="lateral-shift"?this.findProjectedConnectorSourceOnHostTrace(e,h,o):void 0),p=this.createCandidate(e,h,o,d),m=this.evaluateCandidate(p,e,n,A,g,a);if(this.recordCandidateResult(m),m.status==="valid")return m.selected=!0,m;if(c&&m.status==="trace-collision")break}return null}evaluateCandidate(t,e,n,o,i,r){return{...t,phase:o,distance:i,outwardDistance:r,selected:!1,status:this.getCandidateStatus({candidate:t,label:e,labelIndex:n,phase:o})}}recordCandidateResult(t){this.stats.candidateEvaluations=(this.stats.candidateEvaluations??0)+1,this.currentCandidateResults.length<mvt?this.currentCandidateResults.push(t):t.status==="valid"&&(this.currentCandidateResults[mvt-1]=t),this.stats.maxRecordedCandidates=Math.max(this.stats.maxRecordedCandidates??0,this.currentCandidateResults.length)}getCandidateConnectorTrace(t,e,n){if(this.crowdedPortOnlyLabelIndices.has(n)&&this.getChipSideForPoint(t.anchorPoint)==="top"&&ju(e.orientation))return jve([t.anchorPoint,{x:t.anchorPoint.x,y:e.anchorPoint.y},e.anchorPoint]);if(e.connectorSource)return Wve(e.connectorSource,e.anchorPoint,e.orientation);if(e.phase==="lateral-shift"){const o=this.crowdedPortOnlyLabelIndices.has(n)?this.getChipOutwardDirection(t.anchorPoint):(()=>{const r=sm(e.orientation);return{x:-r.x,y:-r.y}})(),i={x:t.anchorPoint.x+o.x*Z_,y:t.anchorPoint.y+o.y*Z_};return jve([t.anchorPoint,...Wve(i,e.anchorPoint,e.orientation)])}return Wve(t.anchorPoint,e.anchorPoint,e.orientation)}findProjectedConnectorSourceOnHostTrace(t,e,n){const o=sm(n),i=[];for(const r of t.mspConnectionPairIds){const s=this.traceMap[r];if(s)for(let a=0;a<s.tracePath.length-1;a++){const A=s.tracePath[a],c=s.tracePath[a+1];if(!(ju(n)?Math.abs(A.y-c.y)<=lr:Math.abs(A.x-c.x)<=lr))continue;const u=ju(n)?{x:e.x,y:A.y}:{x:A.x,y:e.y};if(!jl([A,c],t.anchorPoint)||!jl([A,c],u))continue;(e.x-u.x)*o.x+(e.y-u.y)*o.y>=-lr&&i.push(u)}}return i.sort((r,s)=>Math.abs(r.x-e.x)+Math.abs(r.y-e.y)-(Math.abs(s.x-e.x)+Math.abs(s.y-e.y)))[0]}isStandaloneSinglePinNetLabel(t){return this.inputProblem.netConnections.some(e=>e.netId===t.netId&&e.pinIds.length===1&&e.pinIds[0]===t.pinIds[0])}labelIntersectsDifferentNetTrace(t){const{width:e,height:n}=_B({orientation:t.orientation,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),o=IC(t.anchorPoint,t.orientation,e,n),i=Ls(o,e,n);return Object.values(this.traceMap).some(r=>r.globalConnNetId!==t.globalConnNetId&&Jve(r.tracePath,i))}getSearchStartAnchor(t,e){const n=this.getWickOffsetAnchor(t.anchorPoint,e),{width:o,height:i}=_B({orientation:e,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),r=this.getSideOffsetAnchor({anchorPoint:n,labelAnchorPoint:t.anchorPoint,orientation:e,width:o,height:i});return this.blockedStandaloneLabelIndex!==null&&t===this.outputNetLabelPlacements[this.blockedStandaloneLabelIndex]&&ju(e)&&this.blockedStandaloneLabelTargetAnchorX!==null&&(r.x=this.blockedStandaloneLabelTargetAnchorX),r}getWickOffsetAnchor(t,e){const n=sm(e);return{x:t.x+n.x*$5,y:t.y+n.y*$5}}getSideOffsetAnchor(t){const{anchorPoint:e,labelAnchorPoint:n,orientation:o,width:i,height:r}=t,s=this.getChipSideForPoint(n),a=this.getContainingChipSide(n)?$5:Z_;return ju(o)&&s==="left"?{x:e.x-i/2-a,y:e.y}:ju(o)&&s==="right"?{x:e.x+i/2+a,y:e.y}:$H(o)&&s==="bottom"?{x:e.x,y:e.y-r/2-a}:$H(o)&&s==="top"?{x:e.x,y:e.y+r/2+a}:e}getSearchDistanceLimit(t,e){const{width:n,height:o}=_B({orientation:e,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)}),i=e==="y+"||e==="y-"?o:n;return Math.min(this.maxSearchDistance,i*2)}getLateralColumnMaxDistance(t,e,n){const o=this.getAvailableOrientations(t),i=o.length===1&&ju(o[0]),r=new Set(t.pinIds.map(l=>this.pinMap[l]?.chipId).filter(l=>!!l)),s=this.chipObstacleSpatialIndex.chips.filter(l=>r.has(l.chipId)),a=t.pinIds.map(l=>this.pinMap[l]?.chipId).find(Boolean),A=s.find(l=>l.chipId===a),c=i?s:A?[A]:[];if(c.length>0){if(e==="y-")return Math.max(0,...c.map(l=>n.y-l.bounds.minY));if(e==="y+")return Math.max(0,...c.map(l=>l.bounds.maxY-n.y));if(e==="x-")return Math.max(0,...c.map(l=>n.x-l.bounds.minX));if(e==="x+")return Math.max(0,...c.map(l=>l.bounds.maxX-n.x))}return this.getSearchDistanceLimit(t,e)}createCandidate(t,e,n,o){const{width:i,height:r}=_B({orientation:n,netLabelWidth:L7({inputProblem:this.inputProblem,netId:t.netId,pinIds:t.pinIds,isPortOnlyLabel:this.isPortOnlyLabel(t)}),netLabelHeight:this.getNetLabelHeight(t)});return{orientation:n,anchorPoint:e,connectorSource:o,width:i,height:r,center:IC(e,n,i,r)}}getNetLabelHeight(t){if(t.netId){const e=this.inputProblem.netConnections.find(n=>n.netId===t.netId)?.netLabelHeight;if(e!==void 0)return e}return this.inputProblem.netConnections.find(e=>e.pinIds.some(n=>t.pinIds.includes(n)))?.netLabelHeight}getCandidateStatus(t){const{candidate:e,label:n,labelIndex:o,phase:i}=t,r=Ls(e.center,e.width,e.height),s=this.getBoundsStatus({bounds:r,labelIndex:o,label:n});if(s!=="valid"){if(!(i==="trace-anchor"||i==="connected-rail-shift"||i==="downward-ground-rail-extension")||s!=="chip-collision"||!this.isAcceptableConnectedChipBoundaryOverlap(e,n,r)||i==="connected-rail-shift"&&!this.staysOutsideConnectedPinRow({candidate:e,label:n,bounds:r}))return s;const l=this.getBoundsStatus({bounds:r,labelIndex:o,label:n,ignoreChipCollisions:!0});if(l!=="valid")return l}const a=this.getCandidateConnectorTrace(n,{anchorPoint:e.anchorPoint,connectorSource:i==="lateral-shift"?e.connectorSource:void 0,orientation:e.orientation,phase:i},o);if(this.obstacleIndex.doesTracePathCrossChip(a))return"chip-collision";for(const c of this.inputProblem.textBoxes??[])if(Jve(a,fB(c)))return"text-collision";const A=this.includeHorizontalConstraintMismatches(this.obstacleIndex.getLabelIndicesNearTracePath(a),this.isGroundLabel(n));for(const c of A){if(c===o||this.shouldIgnorePendingCrowdedLabel(o,c))continue;const l=this.outputNetLabelPlacements[c];if(Jve(a,this.getLabelBoundsForCollisionWithGround(l,n)))return"netlabel-collision"}return"valid"}isAcceptableConnectedChipBoundaryOverlap(t,e,n){const o=this.chipObstacleSpatialIndex.getChipsInBounds(n);if(o.length===0)return!1;const i=new Set(e.pinIds.map(r=>this.pinMap[r]?.chipId).filter(r=>!!r));return o.every(r=>{if(!i.has(r.chipId))return!1;const{anchorPoint:s,orientation:a}=t,A=r.bounds;return ju(a)?s.x<A.minX-lr||s.x>A.maxX+lr:s.y<A.minY-lr||s.y>A.maxY+lr})}staysOutsideConnectedPinRow(t){const{candidate:e,label:n,bounds:o}=t,i=this.pinMap[n.pinIds[0]];return!i||!ju(e.orientation)?!1:e.anchorPoint.x<i.x?o.maxX<=i.x+yvt+lr:o.minX>=i.x-yvt-lr}getBoundsStatus(t){const{bounds:e,labelIndex:n,label:o,ignoreChipCollisions:i}=t;return!i&&(this.chipObstacleSpatialIndex.getChipsInBounds(e).length>0||this.sharesChipBoundary(e))?"chip-collision":KH(e,this.inputProblem)?"text-collision":this.obstacleIndex.doesTraceCrossBoundsInterior(e)?"trace-collision":this.isTraceTooCloseToLabel(e,o)?"trace-clearance-violation":this.intersectsAnyOtherNetLabel(e,n,o)?"netlabel-collision":"valid"}isTraceTooCloseToLabel(t,e){if(!this.shouldCheckTraceClearanceForLabel(e))return!1;const n=this.getLabelTraceClearanceBounds(t);return this.obstacleIndex.doesTraceIntersectBounds({bounds:n,excludedGlobalConnNetId:e.globalConnNetId})}getLabelTraceClearanceBounds(t){return{minX:t.minX-_j,minY:t.minY-_j,maxX:t.maxX+_j,maxY:t.maxY+_j}}shouldCheckTraceClearanceForLabel(t){return!this.isPortOnlyLabel(t)||!this.hasRoutedLabelOnSameNet(t)?!1:this.getAvailableOrientations(t).length===1}hasRoutedLabelOnSameNet(t){for(const e of this.outputNetLabelPlacements)if(e.globalConnNetId===t.globalConnNetId&&e.mspConnectionPairIds.length>0)return!0;return!1}isOutwardHorizontalFallback(t){const e=this.getChipSideForPoint(t.anchorPoint);return e==="left"&&t.orientation==="x-"||e==="right"&&t.orientation==="x+"}canPlaceVerticalLabelOnHostRail(t,e){if(!e.mspConnectionPairIds.some(s=>{const a=this.traceMap[s];return a&&jl(a.tracePath,t.anchorPoint)}))return!1;const o=this.pinMap[e.pinIds[0]];if(!o||e.pinIds.some(s=>this.pinMap[s]?.chipId!==o.chipId))return!1;const i=this.chipObstacleSpatialIndex.chips.find(s=>s.chipId===o.chipId);if(!i)return!1;const r=Ls(t.center,t.width,t.height);return r.minY<i.bounds.minY-lr||r.maxY>i.bounds.maxY+lr||t.anchorPoint.x>=i.bounds.minX-lr&&t.anchorPoint.x<=i.bounds.maxX+lr?!1:i.pins.every(s=>e.pinIds.includes(s.pinId)||s.y<=r.minY+lr||s.y>=r.maxY-lr)}getTextBlockedMultiPinRailTraces(t,e){if(!ju(e))return null;const n=this.pinMap[t.pinIds[0]]?.chipId,o=Object.values(this.traceMap).filter(d=>d.globalConnNetId===t.globalConnNetId&&d.pins.every(p=>p.chipId===n)),i=new Set(t.pinIds),r=new Set;for(let d=!0;d;){d=!1;for(const p of o)if(!r.has(p)&&p.pinIds.some(m=>i.has(m))){r.add(p);for(const m of p.pinIds)i.add(m);d=!0}}if(i.size<3||i.size===3&&!this.hasPortOnlyLabelOnSameNet(t))return null;const s=[...i].map(d=>this.pinMap[d]),a=sm(e),A=s[0].x;if(s.some(d=>Math.abs(d.x-A)>lr))return null;const c=this.inputProblem.chips.find(d=>d.chipId===n).pins.filter(d=>Math.abs(d.x-A)<=lr),l=Math.min(...s.map(d=>d.y)),u=Math.max(...s.map(d=>d.y));if(c.some(d=>d.y>=l-lr&&d.y<=u+lr&&!i.has(d.pinId))||e==="y-"&&l>Math.min(...c.map(d=>d.y))+lr||e==="y+"&&u<Math.max(...c.map(d=>d.y))-lr)return null;const g=Math.max(...s.map(d=>d.x*a.x+d.y*a.y));return(this.inputProblem.textBoxes??[]).some(d=>d.chipId===n&&d.center.x*a.x+d.center.y*a.y>g+lr)?[...r]:null}findValidNearbyRailCandidate(t,e,n,o){if(!ju(e))return null;const i=sm(e),r=[...new Set(o.flatMap(A=>A.pinIds))].map(A=>this.pinMap[A]).sort((A,c)=>c.y*i.y-A.y*i.y)[0]?.y;if(r===void 0)return null;const s=this.pinMap[t.pinIds[0]].x,a=[...new Set(o.flatMap(A=>A.tracePath.map(c=>c.x)))].filter(A=>Math.abs(A-s)>lr).sort((A,c)=>Math.abs(A-s)-Math.abs(c-s));for(const A of a){const c={x:A,y:r};if(!Object.values(this.traceMap).some(u=>u.globalConnNetId===t.globalConnNetId&&jl(u.tracePath,c)))continue;const l=this.findValidCandidateInShiftColumn({label:t,labelIndex:n,orientation:e,direction:i,baseAnchor:c,maxSearchDistance:this.getSearchDistanceLimit(t,e),outwardDistance:0,phase:"connected-rail-shift",stopOnTraceCollision:!1,connectorSource:c,startDistance:0});if(l)return l}return null}hasPortOnlyLabelOnSameNet(t){return this.outputNetLabelPlacements.some(e=>e!==t&&e.globalConnNetId===t.globalConnNetId&&this.isPortOnlyLabel(e))}hasOppositeVerticalRailOnSameChipSide(t,e){const n=this.inputProblem.netConnections.find(r=>r.netId===t.netId);if(!n)return!1;const o=this.getSingleChipSideForNetConnection(n);if(!o)return!1;const i=e==="y+"?"y-":"y+";return this.inputProblem.netConnections.some(r=>{if(r===n||r.pinIds.length<2)return!1;const s=this.inputProblem.availableNetLabelOrientations[r.netId]??[];if(s.length!==1||s[0]!==i)return!1;const a=this.getSingleChipSideForNetConnection(r);return a?.chipId===o.chipId&&a.side===o.side})}getSingleChipSideForNetConnection(t){if(t.pinIds.length<2)return null;const e=t.pinIds.map(s=>this.pinMap[s]);if(e.some(s=>!s)||new Set(e.map(s=>s.chipId)).size!==1)return null;const o=e[0].chipId,i=this.chipObstacleSpatialIndex.chips.find(s=>s.chipId===o);if(!i)return null;const r=new Set(e.map(s=>Math.abs(s.x-i.bounds.minX)<=lr?"left":Math.abs(s.x-i.bounds.maxX)<=lr?"right":null));return r.size!==1||r.has(null)?null:{chipId:o,side:[...r][0]}}isPortOnlyLabel(t){return t.mspConnectionPairIds.length===0}getNetConnectionForLabel(t){return t.netId?this.inputProblem.netConnections.find(e=>e.netId===t.netId):this.inputProblem.netConnections.find(e=>e.pinIds.some(n=>t.pinIds.includes(n)))}isGroundLabel(t){return this.getNetConnectionForLabel(t)?.isGround===!0}getHorizontalConstraintMismatchBounds(t){if(!this.isPortOnlyLabel(t)||t.orientation!=="x+"&&t.orientation!=="x-")return null;const e=t.netId??t.globalConnNetId,n=this.inputProblem.availableNetLabelOrientations[e]??[];if(n.length===0||n.some(s=>!ju(s)))return null;const o=this.getNetConnectionForLabel(t)?.netLabelHeight;if(o===void 0||o<=t.width+t.height+lr)return null;const i=IC(t.anchorPoint,t.orientation,t.width,t.height),r=IC(t.anchorPoint,t.orientation,o,t.height);return Ls({x:r.x+t.center.x-i.x,y:r.y+t.center.y-i.y},o,t.height)}includeHorizontalConstraintMismatches(t,e){if(!e)return[...t].sort((o,i)=>o-i);const n=new Set(t);for(let o=0;o<this.outputNetLabelPlacements.length;o++)this.getHorizontalConstraintMismatchBounds(this.outputNetLabelPlacements[o])&&n.add(o);return[...n].sort((o,i)=>o-i)}getLabelBoundsForCollisionWithGround(t,e){if(this.isGroundLabel(e)){const n=this.getHorizontalConstraintMismatchBounds(t);if(n)return n}return Ls(t.center,t.width,t.height)}shouldIgnorePendingCrowdedLabel(t,e){return this.crowdedPortOnlyLabelIndices.has(t)&&this.crowdedPortOnlyLabelIndices.has(e)&&this.queuedLabelIndices.includes(e)}intersectsAnyOtherNetLabel(t,e,n){const o={minX:t.minX-Z_,minY:t.minY-Z_,maxX:t.maxX+Z_,maxY:t.maxY+Z_},i=this.includeHorizontalConstraintMismatches(this.obstacleIndex.getLabelIndicesInBounds(o),this.isGroundLabel(n));for(const r of i){if(r===e||this.shouldIgnorePendingCrowdedLabel(e,r))continue;const s=this.outputNetLabelPlacements[r],a=this.getLabelBoundsForCollisionWithGround(s,n);if(r===this.blockedStandaloneLabelIndex&&ju(s.orientation)&&(a.minX-=Z_,a.maxX+=Z_),pj(t,a))return!0}return!1}sharesChipBoundary(t){const e={minX:t.minX-$5-lr,minY:t.minY-$5-lr,maxX:t.maxX+$5+lr,maxY:t.maxY+$5+lr},n=this.chipObstacleSpatialIndex.getChipsInBounds(e);for(const o of n){const i=o.bounds,r=Math.abs(t.minX-i.maxX)<=$5+lr||Math.abs(t.maxX-i.minX)<=$5+lr,s=Math.abs(t.minY-i.maxY)<=$5+lr||Math.abs(t.maxY-i.minY)<=$5+lr;if(r&&Tle(t.minY,t.maxY,i.minY,i.maxY)||s&&Tle(t.minX,t.maxX,i.minX,i.maxX))return!0}return!1}getChipSideForPoint(t){const e=this.getContainingChipSide(t);if(e)return e;const n=this.getOutsideChipSide(t);return n||this.getNearestChipSide(t)}getPerpendicularOutwardDirection(t,e){const n=this.getChipSideForPoint(t);return ju(e)&&n==="left"?{x:-1,y:0}:ju(e)&&n==="right"?{x:1,y:0}:$H(e)&&n==="bottom"?{x:0,y:-1}:$H(e)&&n==="top"?{x:0,y:1}:{x:0,y:0}}getChipOutwardDirection(t){switch(this.getChipSideForPoint(t)){case"left":return{x:-1,y:0};case"right":return{x:1,y:0};case"bottom":return{x:0,y:-1};case"top":return{x:0,y:1};default:return{x:0,y:0}}}getContainingChipSide(t){let e=null,n=Number.POSITIVE_INFINITY;for(const o of this.chipObstacleSpatialIndex.chips){const i=o.bounds;if(!(t.x<i.minX-lr||t.x>i.maxX+lr||t.y<i.minY-lr||t.y>i.maxY+lr))for(const[r,s]of fvt(t,i))s<n&&(e=r,n=s)}return e}getOutsideChipSide(t){let e=null,n=Number.POSITIVE_INFINITY;for(const o of this.chipObstacleSpatialIndex.chips){const i=o.bounds,r=t.x<i.minX-lr?i.minX-t.x:t.x>i.maxX+lr?t.x-i.maxX:0,s=t.y<i.minY-lr?i.minY-t.y:t.y>i.maxY+lr?t.y-i.maxY:0;if(r===0&&s===0)continue;const a=r**2+s**2;a>=n||(n=a,r>0?e=t.x<i.minX?"left":"right":e=t.y<i.minY?"bottom":"top")}return e}getNearestChipSide(t){let e=null,n=Number.POSITIVE_INFINITY;for(const o of this.chipObstacleSpatialIndex.chips)for(const[i,r]of fvt(t,o.bounds))r<n&&(e=i,n=r);return e}visualize(){return p2o({inputProblem:this.inputProblem,traces:this.traces,outputNetLabelPlacements:this.outputNetLabelPlacements,currentLabel:this.currentLabel,currentCandidateResults:this.currentCandidateResults,solved:this.solved})}},B2o="blue",xvt="red",b2o=t=>{const e=zh(t.inputProblem);return P2o(e),S2o(e,t.traces),Q2o(e,t.outputNetLabelPlacements),t.solved||(v2o(e,t.currentLabel),w2o(e,t.currentCandidateResults)),e},S2o=(t,e)=>{for(const n of e)t.lines.push({points:n.tracePath,strokeColor:"purple"})},Q2o=(t,e)=>{for(const n of e)t.rects.push({center:n.center,width:n.width,height:n.height,fill:Mc(n.globalConnNetId,.35),strokeColor:Mc(n.globalConnNetId,.9),label:`netId: ${n.netId}
globalConnNetId: ${n.globalConnNetId}`}),t.points.push({x:n.anchorPoint.x,y:n.anchorPoint.y,color:Mc(n.globalConnNetId,.9),label:`anchorPoint
orientation: ${n.orientation}`})},v2o=(t,e)=>{e&&t.rects.push({center:e.center,width:e.width,height:e.height,fill:"rgba(255, 0, 0, 0.2)",strokeColor:xvt,label:`trace-line VCC target
${e.netId??e.globalConnNetId}`})},w2o=(t,e)=>{for(const n of e){const o=n.selected?B2o:xvt;t.rects.push({center:n.center,width:n.width,height:n.height,fill:n.selected?"rgba(0, 0, 255, 0.2)":"rgba(255, 0, 0, 0.15)",strokeColor:o,strokeDash:n.selected?void 0:"4 2",label:`${n.selected?"selected":n.status} trace corner
trace: ${n.traceId}
distance: ${n.distance.toFixed(3)}`}),t.points.push({...n.anchorPoint,color:o,label:`candidate anchor
${n.status}`})}},P2o=t=>{t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[])},Hle=.1,M2o=class extends Ng{inputProblem;traces;netLabelPlacements;outputNetLabelPlacements;queuedLabelIndices=[];currentLabelIndex=null;currentLabel=null;currentCandidateResults=[];queuedCornerCandidates=[];shouldAdvanceToNextLabel=!1;traceMap;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements],this.traceMap=Object.fromEntries(t.traces.map(e=>[e.mspPairId,e])),this.queuedLabelIndices=this.getProcessableLabelIndices(),this.prepareNextLabel()}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){if(this.shouldAdvanceToNextLabel){this.advanceToNextLabel();return}const t=this.currentLabel,e=this.currentLabelIndex;if(t===null||e===null){this.finish();return}const n=this.queuedCornerCandidates.shift();if(!n){this.shouldAdvanceToNextLabel=!0;return}const o=this.evaluateCornerCandidate(t,e,n);this.currentCandidateResults.push(o),o.status==="valid"&&(o.selected=!0,this.applyCandidate(e,t,o),this.shouldAdvanceToNextLabel=!0)}getOutput(){return{traces:this.traces,netLabelPlacements:this.outputNetLabelPlacements}}getProcessableLabelIndices(){const t=[];for(let e=0;e<this.outputNetLabelPlacements.length;e++){const n=this.outputNetLabelPlacements[e];this.shouldProcessLabel(n)&&t.push(e)}return t}prepareNextLabel(){const t=this.queuedLabelIndices.shift();if(t===void 0)return this.clearCurrentLabel(),!1;const e=this.outputNetLabelPlacements[t];return this.currentLabelIndex=t,this.currentLabel=e,this.currentCandidateResults=[],this.queuedCornerCandidates=this.getCornerCandidatesForLabel(e),!0}advanceToNextLabel(){this.shouldAdvanceToNextLabel=!1,this.prepareNextLabel()||this.finish()}clearCurrentLabel(){this.currentLabelIndex=null,this.currentLabel=null,this.currentCandidateResults=[],this.queuedCornerCandidates=[]}finish(){this.clearCurrentLabel(),this.solved=!0}evaluateCornerCandidate(t,e,n){const o=IC(n.anchorPoint,t.orientation,t.width,t.height),i=Ls(o,t.width,t.height);return{...n,center:o,width:t.width,height:t.height,status:this.getCandidateStatus(i,e,n),selected:!1}}getCandidateStatus(t,e,n){if(this.intersectsAnyChip(t))return"chip-collision";if(KH(t,this.inputProblem))return"text-collision";const o=n.reroutedTracePath?{...this.traceMap,[n.traceId]:{...this.traceMap[n.traceId],tracePath:n.reroutedTracePath}}:this.traceMap;return mj(t,o)||n.reroutedTracePath&&!this.isReroutedTraceClear(n,e)?"trace-collision":this.intersectsAnyOtherNetLabel(t,e)?"netlabel-collision":"valid"}applyCandidate(t,e,n){if(n.reroutedTracePath){const o=this.traceMap[n.traceId],i={...o,tracePath:n.reroutedTracePath};this.traces=this.traces.map(r=>r.mspPairId===n.traceId?i:r),this.traceMap[n.traceId]=i,this.outputNetLabelPlacements=jH({trace:o,originalTracePath:o.tracePath,reroutedTracePath:n.reroutedTracePath,netLabelPlacements:this.outputNetLabelPlacements})}this.outputNetLabelPlacements[t]={...e,anchorPoint:n.anchorPoint,center:n.center}}shouldProcessLabel(t){return(t.orientation==="y+"||t.orientation==="y-")&&this.getCornerCandidatesForLabel(t).length>0}intersectsAnyChip(t){return this.inputProblem.chips.some(e=>yB(t,Ls(e.center,e.width,e.height)))}intersectsAnyOtherNetLabel(t,e){return this.outputNetLabelPlacements.some((n,o)=>o===e?!1:yB(t,Ls(n.center,n.width,n.height)))}getCornerCandidatesForLabel(t){const e=[],n=[],o=this.getTraceLinesForLabel(t),i=this.isConfiguredRailLabel(t)&&(this.isLabelCrossedByOtherNetTrace(t)||!o.some(r=>Lve(r.tracePath).some(s=>this.pointsEqual(s,t.anchorPoint))));for(const r of o){const s=r.tracePath,a=[s[0],s[s.length-1]];for(const A of Lve(s)){const c=s.indexOf(A),l=a.some(h=>Math.abs(h.x-A.x)<=yC),u=l||i&&this.isPinAlignedCorner(s,c);if(!u)continue;(l?e:n).push({anchorPoint:A,traceId:r.mspPairId,distance:KQt(A,t.anchorPoint),pinAligned:u},...this.getClearanceShiftedCornerCandidates({label:t,trace:r,cornerIndex:c,pinAligned:u}))}}return[...e.sort((r,s)=>r.distance-s.distance),...n.sort((r,s)=>r.distance-s.distance)]}isConfiguredRailLabel(t){return t.netId?this.inputProblem.availableNetLabelOrientations[t.netId]?.some(e=>e==="y+"||e==="y-"):!1}isLabelCrossedByOtherNetTrace(t){const e=Ls(t.center,t.width,t.height),n=Object.fromEntries(this.traces.filter(o=>o.globalConnNetId!==t.globalConnNetId).map(o=>[o.mspPairId,o]));return mj(e,n)}pointsEqual(t,e){return Math.abs(t.x-e.x)<=yC&&Math.abs(t.y-e.y)<=yC}getVerticalSegmentPointIndices(t,e){const n=t[e],o=Math.abs(t[e-1].x-n.x)<=yC,i=Math.abs(t[e+1].x-n.x)<=yC;return o===i?null:o?[e-1,e]:[e,e+1]}isPinAlignedCorner(t,e){const n=this.getVerticalSegmentPointIndices(t,e);if(!n)return!1;const[o,i]=n;return o<=1||i>=t.length-2}getClearanceShiftedCornerCandidates({label:t,trace:e,cornerIndex:n,pinAligned:o}){if(t.orientation!=="y+"&&t.orientation!=="y-")return[];const i=e.tracePath,r=i[n],s=this.getVerticalSegmentPointIndices(i,n);if(!s||s.includes(0)||s.includes(i.length-1))return[];const a=IC(r,t.orientation,t.width,t.height),A=Ls(a,t.width,t.height),c=this.inputProblem.chips.map(u=>Ls(u.center,u.width,u.height)).filter(u=>yB(A,u)),l=new Set;for(const u of c)l.add(u.minX-t.width/2),l.add(u.maxX+t.width/2);for(const u of this.traces)if(u.globalConnNetId!==t.globalConnNetId)for(let g=0;g<u.tracePath.length-1;g++){const h=u.tracePath[g],d=u.tracePath[g+1];if(!kle(h,d,A))continue;const p=t.width/2;Math.abs(h.x-d.x)<=yC?(l.add(h.x-p-Hle),l.add(h.x+p+Hle)):(l.add(Math.min(h.x,d.x)-p-Hle),l.add(Math.max(h.x,d.x)+p+Hle))}return[...l].flatMap(u=>{if(Math.abs(u-r.x)<=yC)return[];const g=Qa(i.map((p,m)=>s.includes(m)?{...p,x:u}:p)),h={x:u,y:r.y};return Lve(g).some(p=>this.pointsEqual(p,h))?[{anchorPoint:h,traceId:e.mspPairId,distance:KQt(h,t.anchorPoint),pinAligned:o,reroutedTracePath:g}]:[]})}isReroutedTraceClear(t,e){const n=t.reroutedTracePath;if(ON(n,Hy(this.inputProblem)))return!1;const o=this.traceMap[t.traceId],i=this.traces.filter(s=>s.mspPairId!==t.traceId&&s.globalConnNetId!==o.globalConnNetId);if(PQt(n,i))return!1;const r={[t.traceId]:{...o,tracePath:n}};return this.outputNetLabelPlacements.every((s,a)=>a===e?!0:!mj(Ls(s.center,s.width,s.height),r))}getTraceLinesForLabel(t){return this.traces.filter(e=>WCo(e)&&this.isTraceForLabel(e,t))}isTraceForLabel(t,e){if(!jl(t.tracePath,e.anchorPoint))return!1;const n=new Set(e.mspConnectionPairIds);return n.size>0?n.has(t.mspPairId):t.globalConnNetId===e.globalConnNetId}visualize(){return b2o({inputProblem:this.inputProblem,traces:this.traces,outputNetLabelPlacements:this.outputNetLabelPlacements,currentLabel:this.currentLabel,currentCandidateResults:this.currentCandidateResults,solved:this.solved})}},qve=t=>[...new Set(t)],D2o=t=>[...new Set(t.filter(e=>e!==void 0))],N2o=(t,e)=>D2o([e.netId,e.globalConnNetId,...t.netConnections.filter(n=>e.pinIds.some(o=>n.pinIds.includes(o))).map(n=>n.netId)]),R2o=t=>{switch(t){case"x+":case"+x":return"x+";case"x-":case"-x":return"x-";case"y+":case"+y":return"y+";case"y-":case"-y":return"y-"}},T2o=(t,e)=>{const n=t.availableNetLabelOrientations??{};for(const o of N2o(t,e))if(Object.hasOwn(n,o))return qve((n[o]??[]).map(R2o).filter(i=>i!==void 0));return null},hd=1e-6,Ole=1e-6,Gle=t=>Ls(t.center,t.width,t.height),Evt=(t,e)=>Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)>hd&&Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)>hd,k2o=(t,e)=>Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX)>=-hd&&Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY)>=-hd,F2o=(t,e)=>{for(const n of e){const o=n.tracePath;for(let i=0;i<o.length-1;i++)if(G2o(o[i],o[i+1],t))return!0}return!1},Bvt=(t,e)=>{const n=[];for(const o of e){if(K2o(o.pinIds)<2)continue;let i=0;for(let r=0;r<o.tracePath.length-1;r++){const s=o.tracePath[r],a=o.tracePath[r+1],A=qH(s,a);Y2o(t,s,a)&&n.push({trace:o,distance:i+qH(s,t)}),i+=A}}return n},L2o=t=>{let e=0;for(let n=0;n<t.tracePath.length-1;n++)e+=qH(t.tracePath[n],t.tracePath[n+1]);return e},H2o=(t,e)=>{let n=0;for(let o=0;o<t.tracePath.length-1;o++){const i=t.tracePath[o],r=t.tracePath[o+1],s=qH(i,r),a=n+s;if(e<=a+hd){const A=Math.max(0,Math.min(s,e-n)),c=U2o(i,r);return{x:i.x+c.x*A,y:i.y+c.y*A}}n=a}return t.tracePath[t.tracePath.length-1]},O2o=t=>{const e=[];let n=0;for(let o=0;o<t.tracePath.length;o++){e.push(n);const i=t.tracePath[o+1];i&&(n+=qH(t.tracePath[o],i))}return e},qH=(t,e)=>Math.abs(t.x-e.x)+Math.abs(t.y-e.y),G2o=(t,e,n)=>{const o={minX:n.minX+Ole,minY:n.minY+Ole,maxX:n.maxX-Ole,maxY:n.maxY-Ole};return o.minX>=o.maxX||o.minY>=o.maxY?!1:Zve(t,e)?t.x<=o.minX+hd||t.x>=o.maxX-hd?!1:bvt(Math.min(t.y,e.y),Math.max(t.y,e.y),o.minY,o.maxY):Xve(t,e)?t.y<=o.minY+hd||t.y>=o.maxY-hd?!1:bvt(Math.min(t.x,e.x),Math.max(t.x,e.x),o.minX,o.maxX):!1},Y2o=(t,e,n)=>Xve(e,n)?Math.abs(t.y-e.y)<=hd&&t.x>=Math.min(e.x,n.x)-hd&&t.x<=Math.max(e.x,n.x)+hd:Zve(e,n)?Math.abs(t.x-e.x)<=hd&&t.y>=Math.min(e.y,n.y)-hd&&t.y<=Math.max(e.y,n.y)+hd:!1,U2o=(t,e)=>({x:Zve(t,e)?0:Math.sign(e.x-t.x),y:Xve(t,e)?0:Math.sign(e.y-t.y)}),Xve=(t,e)=>Math.abs(t.y-e.y)<=hd,Zve=(t,e)=>Math.abs(t.x-e.x)<=hd,bvt=(t,e,n,o)=>Math.min(e,o)-Math.max(t,n)>hd,K2o=t=>new Set(t).size,Svt=.1,V2o=t=>{const{inputProblem:e,label:n,traceLocation:o}=t,i=L2o(o.trace),r=T2o(e,n),s=z2o(i,O2o(o.trace)),a=oxo(e,n),A=ixo(e,n),c=[],l=new Set;for(const u of s){const g=H2o(o.trace,u),h=J2o({inputProblem:e,label:n,point:g,orientationConstraint:r});for(const d of h){if(rxo(n,g,d))continue;const p=[g.x.toFixed(6),g.y.toFixed(6),d].join(":");l.has(p)||(l.add(p),c.push(W2o({point:g,orientation:d,netLabelWidth:a,netLabelHeight:A,traceLocation:o,pathDistance:u,label:n})))}}return c},z2o=(t,e)=>{const n=new Set,o=Math.ceil(t/Svt);for(let i=0;i<=o;i++){const r=Math.min(t,i*Svt);n.add(vvt(r))}for(const i of e)n.add(vvt(i));return[...n].filter(i=>i>=-hd&&i<=t+hd).sort((i,r)=>i-r)},J2o=t=>{const{inputProblem:e,label:n,point:o,orientationConstraint:i}=t;return i||j2o({label:n,inputProblem:e,point:o})},W2o=t=>{const{point:e,orientation:n,netLabelWidth:o,netLabelHeight:i,traceLocation:r,pathDistance:s,label:a}=t,{width:A,height:c}=_B({orientation:n,netLabelWidth:o,netLabelHeight:i});return{anchorPoint:e,center:IC(e,n,A,c),width:A,height:c,orientation:n,traceId:r.trace.mspPairId,pathDistance:s,distanceFromOriginal:qH(e,a.anchorPoint),status:"valid",selected:!1}},j2o=t=>{const{label:e,inputProblem:n,point:o}=t;return qve([...$2o(e),...q2o({inputProblem:n,point:o}),...exo])},$2o=t=>[t.orientation,txo(t.orientation)],q2o=t=>{const{inputProblem:e,point:n}=t,o=nxo(e);return qve(X2o(n,o).sort((i,r)=>r.outwardScore-i.outwardScore).map(({orientation:i})=>i))},X2o=(t,e)=>{const n=[];return n.push(Qvt({value:t.y,min:e.minY,max:e.maxY,center:e.centerY,positiveOrientation:"y+",negativeOrientation:"y-"})),n.push(Qvt({value:t.x,min:e.minX,max:e.maxX,center:e.centerX,positiveOrientation:"x+",negativeOrientation:"x-"})),n},Qvt=t=>{const{value:e,min:n,max:o,center:i,positiveOrientation:r,negativeOrientation:s}=t;return e>o+hd?{orientation:r,outwardScore:1+e-o}:e<n-hd?{orientation:s,outwardScore:1+n-e}:{orientation:e>=i?r:s,outwardScore:Z2o(e,i,o-n)}},Z2o=(t,e,n)=>Math.abs(t-e)/Math.max(hd,n/2),exo=["x+","x-","y+","y-"],txo=t=>{switch(t){case"x+":return"x-";case"x-":return"x+";case"y+":return"y-";case"y-":return"y+"}},nxo=t=>{if(t.chips.length===0)return{minX:0,minY:0,maxX:0,maxY:0,centerX:0,centerY:0};const e=t.chips.reduce((n,o)=>({minX:Math.min(n.minX,o.center.x-o.width/2),minY:Math.min(n.minY,o.center.y-o.height/2),maxX:Math.max(n.maxX,o.center.x+o.width/2),maxY:Math.max(n.maxY,o.center.y+o.height/2)}),{minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY});return{...e,centerX:(e.minX+e.maxX)/2,centerY:(e.minY+e.maxY)/2}},oxo=(t,e)=>{const n=L7({inputProblem:t,netId:e.netId,pinIds:e.pinIds,isPortOnlyLabel:e.mspConnectionPairIds.length===0});return n!==void 0?n:e.orientation==="y+"||e.orientation==="y-"?e.height:e.width},ixo=(t,e)=>{const n=t.netConnections.find(o=>o.netId===e.netId)?.netLabelHeight;return n!==void 0?n:t.netConnections.find(o=>o.pinIds.some(i=>e.pinIds.includes(i)))?.netLabelHeight},vvt=t=>Number(t.toFixed(6)),rxo=(t,e,n)=>Math.abs(e.x-t.anchorPoint.x)<=hd&&Math.abs(e.y-t.anchorPoint.y)<=hd&&n===t.orientation,sxo="blue",wvt="red",axo=t=>{const e=zh(t.inputProblem);return gxo(e),Axo(e,t.traces),cxo(e,t.inputProblem,t.outputNetLabelPlacements),t.solved||(lxo(e,t),uxo(e,t.currentCandidateResults)),e},Axo=(t,e)=>{for(const n of e)t.lines.push({points:n.tracePath,strokeColor:"purple"})},cxo=(t,e,n)=>{for(const o of n)t.rects.push({center:o.center,width:o.width,height:o.height,fill:Mc(o.globalConnNetId,.35),strokeColor:Mc(o.globalConnNetId,.9),label:dxo(e,o)}),t.points.push({x:o.anchorPoint.x,y:o.anchorPoint.y,color:Mc(o.globalConnNetId,.9),label:`anchorPoint
orientation: ${o.orientation}`})},lxo=(t,e)=>{if(e.currentOverlap)for(const n of[e.currentOverlap.firstLabelIndex,e.currentOverlap.secondLabelIndex]){const o=e.outputNetLabelPlacements[n];o&&t.rects.push({center:o.center,width:o.width,height:o.height,fill:"rgba(255, 0, 0, 0.2)",strokeColor:wvt,label:`netlabel overlap target
${o.netId??o.globalConnNetId}
${Pvt(e.inputProblem,o)}`})}},uxo=(t,e)=>{for(const n of e){const o=n.selected?sxo:wvt;t.rects.push({center:n.center,width:n.width,height:n.height,fill:n.selected?"rgba(0, 0, 255, 0.2)":"rgba(255, 0, 0, 0.15)",strokeColor:o,strokeDash:n.selected?void 0:"4 2",label:`${n.selected?"selected":n.status} netlabel overlap candidate
trace: ${n.traceId}
path distance: ${n.pathDistance.toFixed(3)}
orientation: ${n.orientation}
distance from original: ${n.distanceFromOriginal.toFixed(3)}`}),t.points.push({...n.anchorPoint,color:o,label:`candidate anchor
${n.status}`})}},gxo=t=>{t.lines||(t.lines=[]),t.points||(t.points=[]),t.rects||(t.rects=[]),t.circles||(t.circles=[]),t.texts||(t.texts=[])},Pvt=(t,e)=>`available orientations: ${hxo(t,e)?.join(", ")??"any"}`,dxo=(t,e)=>[`netId: ${e.netId}`,`globalConnNetId: ${e.globalConnNetId}`,Pvt(t,e)].join(`
`),hxo=(t,e)=>{const n=t.availableNetLabelOrientations??{};for(const o of[e.netId,e.globalConnNetId])if(o&&Object.hasOwn(n,o))return n[o]},pxo=class extends Ng{inputProblem;traces;netLabelPlacements;outputNetLabelPlacements;currentOverlap=null;currentCandidateResults=[];activeSearch=null;skippedOverlapKeys=new Set;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements]}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){this.activeSearch?.completed&&this.clearActiveSearch();const t=this.getNextSearchWithCandidates();if(!t){this.finish();return}this.evaluateNextCandidate(t)}getOutput(){return{netLabelPlacements:this.outputNetLabelPlacements}}findNextOverlap(){for(let t=0;t<this.outputNetLabelPlacements.length;t++)for(let e=t+1;e<this.outputNetLabelPlacements.length;e++){if(!this.isLabelEligible(t)&&!this.isLabelEligible(e))continue;const n={firstLabelIndex:t,secondLabelIndex:e};if(!this.skippedOverlapKeys.has(this.getOverlapKey(n))&&this.labelsOverlap(n))return n}return null}isLabelEligible(t){return this.getTraceLocationsForLabel(t).length>0}labelsOverlap(t){const e=this.outputNetLabelPlacements[t.firstLabelIndex],n=this.outputNetLabelPlacements[t.secondLabelIndex];return!e||!n?!1:Evt(Gle(e),Gle(n))}startNextOverlapSearch(){const t=this.findNextOverlap();if(!t)return null;const e={overlap:t,queuedLabelIndices:this.getMoveLabelIndices(t),labelIndex:null,candidates:[],candidateIndex:0,candidateResults:[],completed:!1};return this.setActiveSearch(e),e}getMoveLabelIndices(t){const e=[];return this.isLabelEligible(t.secondLabelIndex)&&e.push(t.secondLabelIndex),this.isLabelEligible(t.firstLabelIndex)&&e.push(t.firstLabelIndex),e}getNextSearchWithCandidates(){for(;;){const t=this.activeSearch??this.startNextOverlapSearch();if(!t)return null;if(this.activateNextLabelSearch(t))return t;this.skipSearch(t)}}activateNextLabelSearch(t){if(t.labelIndex!==null&&t.candidateIndex<t.candidates.length)return!0;for(;t.queuedLabelIndices.length>0;){const e=t.queuedLabelIndices.shift(),n=this.outputNetLabelPlacements[e];if(n&&(t.labelIndex=e,t.candidates=this.getCandidatesForLabel(n),t.candidateIndex=0,t.candidates.length>0))return!0}return t.labelIndex=null,t.candidates=[],t.candidateIndex=0,!1}skipSearch(t){this.skippedOverlapKeys.add(this.getOverlapKey(t.overlap)),this.clearActiveSearch()}evaluateNextCandidate(t){const e=t.labelIndex;if(e===null)return;const n=this.outputNetLabelPlacements[e],o=t.candidates[t.candidateIndex];if(!n||!o)return;t.candidateIndex+=1;const i={...o,status:this.getCandidateStatus(o,e)};t.candidateResults.push(i),i.status==="valid"&&(i.selected=!0,this.applyCandidate(e,n,i),t.completed=!0)}getCandidatesForLabel(t){const e=[];for(const n of Bvt(t.anchorPoint,this.traces).filter(({trace:o})=>this.isTraceAssociatedWithLabel(o,t)))e.push(...V2o({inputProblem:this.inputProblem,label:t,traceLocation:n}));return e}getCandidateStatus(t,e){const n=Gle(t);return this.intersectsAnyChip(n)?"chip-collision":KH(n,this.inputProblem)?"text-collision":F2o(n,this.traces)?"trace-collision":this.intersectsAnyOtherLabel(n,e)?"netlabel-collision":"valid"}applyCandidate(t,e,n){this.outputNetLabelPlacements[t]={...e,anchorPoint:n.anchorPoint,center:n.center,width:n.width,height:n.height,orientation:n.orientation}}intersectsAnyChip(t){return this.inputProblem.chips.some(e=>k2o(t,Ls(e.center,e.width,e.height)))}intersectsAnyOtherLabel(t,e){return this.outputNetLabelPlacements.some((n,o)=>o===e?!1:Evt(t,Gle(n)))}getTraceLocationsForLabel(t){const e=this.outputNetLabelPlacements[t];return e?Bvt(e.anchorPoint,this.traces).filter(({trace:n})=>this.isTraceAssociatedWithLabel(n,e)):[]}isTraceAssociatedWithLabel(t,e){return e.mspConnectionPairIds.includes(t.mspPairId)||e.netId!==void 0&&e.netId===t.userNetId?!0:e.globalConnNetId===t.globalConnNetId}getOverlapKey(t){const e=this.outputNetLabelPlacements[t.firstLabelIndex],n=this.outputNetLabelPlacements[t.secondLabelIndex];return[t.firstLabelIndex,t.secondLabelIndex,e?.anchorPoint.x,e?.anchorPoint.y,n?.anchorPoint.x,n?.anchorPoint.y].join(":")}finish(){this.clearActiveSearch(),this.solved=!0}setActiveSearch(t){this.activeSearch=t,this.currentOverlap=t.overlap,this.currentCandidateResults=t.candidateResults}clearActiveSearch(){this.activeSearch=null,this.currentOverlap=null,this.currentCandidateResults=[]}visualize(){return axo({inputProblem:this.inputProblem,traces:this.traces,outputNetLabelPlacements:this.outputNetLabelPlacements,currentOverlap:this.currentOverlap,currentCandidateResults:this.currentCandidateResults,solved:this.solved})}},mxo=1e-6;function _xo(t){const{point:e,segmentStart:n,segmentEnd:o}=t,i=o.x-n.x,r=o.y-n.y,s=i*i+r*r;if(s===0)return{x:n.x,y:n.y};const a=((e.x-n.x)*i+(e.y-n.y)*r)/s,A=Math.max(0,Math.min(1,a));return{x:n.x+A*i,y:n.y+A*r}}function Mvt(t,e){let n=e[0],o=1/0;for(let i=0;i<e.length-1;i++){const r=_xo({point:t,segmentStart:e[i],segmentEnd:e[i+1]}),s=r.x-t.x,a=r.y-t.y,A=s*s+a*a;A<o&&(o=A,n=r)}return n}function Dvt(t,e){const n=Mvt(t,e);return Math.hypot(n.x-t.x,n.y-t.y)<mxo}function fxo(t,e){const o=p=>Ls(p.center,p.width,p.height),i=(p,m)=>{const _=o(p),f=o(m);return _.minX<=f.maxX+.01&&_.maxX>=f.minX-.01&&_.minY<=f.maxY+.01&&_.maxY>=f.minY-.01},r=new Set([t]);let s=!0;for(;s;){s=!1;for(const p of e)r.has(p)||[...r].some(m=>i(m,p))&&(r.add(p),s=!0)}let a=1/0,A=1/0,c=-1/0,l=-1/0;for(const p of r){const m=o(p);m.minX<a&&(a=m.minX),m.minY<A&&(A=m.minY),m.maxX>c&&(c=m.maxX),m.maxY>l&&(l=m.maxY)}const u=(a+c)/2,g=(A+l)/2,h=c-a,d=l-A;return{...t,center:{x:u,y:g},width:h,height:d}}function Ixo(t,e){const n=[];for(const o of t)for(const i of e){if(o.globalConnNetId===i.globalConnNetId)continue;const r=Ls(i.center,i.width,i.height),s=o.tracePath;for(let a=0;a<s.length-1;a++)if(O7(s[a],s[a+1],r)){n.push({trace:o,label:i});break}}return n}var Cxo=.1,yxo=3,Nvt=class extends Ng{inputProblem;traces;netLabelPlacements;outputTraces;outputNetLabelPlacements;completedReroutes=[];activeSubSolver=null;recentlyFailed=new Set;detourCounts=new Map;currentOverlap=null;constructor(t){super(),this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputTraces=[...t.traces],this.outputNetLabelPlacements=[...t.netLabelPlacements]}getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements}}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){const a=this.activeSubSolver.solvedTracePath;if(a){this.completedReroutes.push({initialTrace:{...this.activeSubSolver.initialTrace,tracePath:this.activeSubSolver.initialTrace.tracePath.map(c=>({...c}))},reroutedTracePath:a.map(c=>({...c})),label:this.activeSubSolver.label,detourCount:this.activeSubSolver.detourCount});const A=this.outputTraces.findIndex(c=>c.mspPairId===this.activeSubSolver.initialTrace.mspPairId);if(A!==-1){const c=this.outputTraces[A].tracePath;this.outputTraces[A]={...this.outputTraces[A],tracePath:a},this.reanchorLabelsOnMovedTrace(this.outputTraces[A],c)}}this.activeSubSolver=null,this.currentOverlap=null}else if(this.activeSubSolver.failed){const a=this.getOverlapKey(this.activeSubSolver.initialTrace,this.activeSubSolver.label);this.recentlyFailed.add(a),this.activeSubSolver=null,this.currentOverlap=null}return}const e=Ixo(this.outputTraces,this.outputNetLabelPlacements).filter(a=>{const A=this.getOverlapKey(a.trace,a.label);return!this.recentlyFailed.has(A)});if(e.length===0){this.solved=!0;return}const n=e[0],o=this.outputTraces.find(a=>a.mspPairId===n.trace.mspPairId);this.currentOverlap=n;const i=fxo(n.label,this.outputNetLabelPlacements.filter(a=>a.globalConnNetId!==o.globalConnNetId)),r=`${n.trace.mspPairId}::merged::${i.center.x},${i.center.y},${i.width},${i.height}`,s=this.detourCounts.get(r)??0;if(s>=yxo){this.recentlyFailed.add(this.getOverlapKey(n.trace,n.label)),this.currentOverlap=null;return}this.detourCounts.set(r,s+1),this.activeSubSolver=new Ele({trace:o,label:i,problem:this.inputProblem,paddingBuffer:Cxo,detourCount:s,tracesToAvoidOverlapping:this.outputTraces,netLabelPlacements:this.outputNetLabelPlacements})}reanchorLabelsOnMovedTrace(t,e){for(let n=0;n<this.outputNetLabelPlacements.length;n++){const o=this.outputNetLabelPlacements[n];if(o.globalConnNetId!==t.globalConnNetId||Dvt(o.anchorPoint,t.tracePath)||!Dvt(o.anchorPoint,e))continue;const i=Mvt(o.anchorPoint,t.tracePath);this.outputNetLabelPlacements[n]={...o,anchorPoint:i,center:IC(i,o.orientation,o.width,o.height)}}}getOutput(){return{traces:this.outputTraces,completedReroutes:this.completedReroutes,netLabelPlacements:this.outputNetLabelPlacements}}getOverlapKey(t,e){return`${t.mspPairId}::${e.globalConnNetId}`}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=zh(this.inputProblem);t.lines||(t.lines=[]),t.rects||(t.rects=[]),t.points||(t.points=[]);for(const e of this.outputTraces)t.lines.push({points:e.tracePath,strokeColor:"purple"});for(const e of this.outputNetLabelPlacements)t.rects.push({center:e.center,width:e.width,height:e.height,fill:Mc(e.globalConnNetId,.35),strokeColor:Mc(e.globalConnNetId,.9),label:`netId: ${e.netId}
globalConnNetId: ${e.globalConnNetId}`}),t.points.push({x:e.anchorPoint.x,y:e.anchorPoint.y,color:Mc(e.globalConnNetId,.9)});return this.currentOverlap&&(t.lines.push({points:this.currentOverlap.trace.tracePath,strokeColor:"red"}),t.rects.push({center:this.currentOverlap.label.center,width:this.currentOverlap.label.width,height:this.currentOverlap.label.height,fill:"rgba(255,0,0,0.3)",strokeColor:"red"})),t}},yp=t=>{if(t.orientation!=="x-"&&t.orientation!=="x+"){if(t.netLabelText&&t.width>t.height){const i=t.height,r=t.width,s=IC(t.anchorPoint,t.orientation,i,r);return Ls(s,i,r)}return Ls(t.center,t.width,t.height)}const e=Math.max(t.width,t.height),n=wve,o=IC(t.anchorPoint,t.orientation,e,n);return Ls(o,e,n)},Rvt=1e-4,Tvt=1e-6,xxo=.1,Exo={"x+":{x:1,y:0},"x-":{x:-1,y:0},"y+":{x:0,y:1},"y-":{x:0,y:-1}},Bxo={ok:"green","label-collision":"orange","trace-collision":"darkorange","chip-collision":"red","text-collision":"purple"},bxo={ok:"rgba(0, 200, 0, 0.25)","label-collision":"rgba(255, 160, 0, 0.2)","trace-collision":"rgba(200, 80, 0, 0.2)","chip-collision":"rgba(220, 0, 0, 0.15)","text-collision":"rgba(128, 0, 128, 0.15)"};function kvt(t,e){return t.minX<e.maxX-1e-9&&t.maxX>e.minX+1e-9&&t.minY<e.maxY-1e-9&&t.maxY>e.minY+1e-9}function Sxo(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o),r=Math.max(1,Math.round(i/xxo)),s=[];for(let a=0;a<=r;a++){const A=a/r;s.push({x:t.x+A*n,y:t.y+A*o})}return s}var ewe=class extends Ng{constructor(t){super(),this.params=t,this.inputProblem=t.inputProblem,this.traces=t.traces,this.netLabelPlacements=t.netLabelPlacements,this.outputNetLabelPlacements=[...t.netLabelPlacements],this.chipIndex=t.inputProblem._chipObstacleSpatialIndex??(t.inputProblem.chips.length>0?new yle(t.inputProblem.chips):void 0),this.traceMap=Object.fromEntries(t.traces.map(e=>[e.mspPairId,e]))}params;inputProblem;traces;netLabelPlacements;outputNetLabelPlacements;currentCollision=null;currentLabelToMove=null;candidateResults=[];chipIndex;traceMap;skippedCollisionKeys=new Set;labelsToTry=[];candidateQueue=[];candidateIndex=0;getConstructorParams(){return{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.netLabelPlacements,fixedNetLabelPlacements:this.params.fixedNetLabelPlacements,useRenderedLabelBounds:this.params.useRenderedLabelBounds}}getOutput(){return{netLabelPlacements:this.outputNetLabelPlacements}}labelBounds(t){return!this.params.useRenderedLabelBounds||this.params.fixedNetLabelPlacements?.includes(t)?Ls(t.center,t.width,t.height):yp(t)}collisionKey(t,e){return[t.globalConnNetId,e.globalConnNetId].sort().join("::")}findNextCollidingPair(){const t=[...this.outputNetLabelPlacements,...this.params.fixedNetLabelPlacements??[]];for(let e=0;e<this.outputNetLabelPlacements.length;e++)for(let n=e+1;n<t.length;n++){const o=t[e],i=t[n];if(!(o.globalConnNetId===i.globalConnNetId&&!this.params.fixedNetLabelPlacements?.includes(i))&&!this.skippedCollisionKeys.has(this.collisionKey(o,i))&&kvt(this.labelBounds(o),this.labelBounds(i)))return[o,i]}return null}netLabelWidthOf(t){return t.orientation==="x+"||t.orientation==="x-"?t.width:t.height}netLabelHeightOf(t){return t.orientation==="x+"||t.orientation==="x-"?t.height:t.width}buildCandidatesForLabel(t){const e=this.netLabelWidthOf(t),n=this.netLabelHeightOf(t),o=[],i=(s,a,A,c)=>{const{width:l,height:u}=_B({orientation:s,netLabelWidth:e,netLabelHeight:n}),g=IC(a,s,l,u),h=Exo[s],d={x:g.x+h.x*Rvt,y:g.y+h.y*Rvt};return{orientation:s,anchor:a,center:d,width:l,height:u,bounds:this.params.useRenderedLabelBounds?yp({...t,orientation:s,anchorPoint:a,center:d,width:l,height:u}):Ls(d,l,u),hostPairId:A,hostSegIndex:c,status:null}},r=this.traces.some(s=>this.params.netLabelConnectorTraceIds?.has(s.mspPairId)&&s.globalConnNetId===t.globalConnNetId&&jl(s.tracePath,t.anchorPoint));if(t.mspConnectionPairIds.length===0||r){const s=["x+","x-","y+","y-"],a=[t.orientation,...s.filter(A=>A!==t.orientation)];for(const A of a)o.push(i(A,t.anchorPoint))}else for(const s of t.mspConnectionPairIds){const a=this.traceMap[s];if(!a)continue;const A=a.tracePath;for(let c=0;c<A.length-1;c++){const l=A[c],u=A[c+1],g=Math.abs(l.y-u.y)<Tvt,h=Math.abs(l.x-u.x)<Tvt;if(!g&&!h)continue;let d;g?d=["y+","y-"]:d=["x+","x-"];for(const p of Sxo(l,u))for(const m of d)o.push(i(m,p,s,c))}}return o}checkCandidate(t,e,n){const{bounds:o,hostPairId:i,hostSegIndex:r}=t;if((this.chipIndex?.getChipsInBounds(o).length??0)>0)return"chip-collision";if(KH(o,this.inputProblem))return"text-collision";if(Tve(o,this.traceMap,i,r).hasIntersection)return"trace-collision";for(const s of n)if(!(s.globalConnNetId===e&&!this.params.fixedNetLabelPlacements?.includes(s))&&kvt(o,this.labelBounds(s)))return"label-collision";return"ok"}beginSearchForLabel(t){this.currentLabelToMove=t,this.candidateQueue=this.buildCandidatesForLabel(t),this.candidateIndex=0,this.candidateResults=[]}getNearbyValidPlacements(t,e){const n=i=>Math.hypot(i.anchor.x-t.anchorPoint.x,i.anchor.y-t.anchorPoint.y),o=[...this.outputNetLabelPlacements.filter(i=>i!==t),...this.params.fixedNetLabelPlacements??[]];return this.buildCandidatesForLabel(t).filter(i=>n(i)<=e&&this.checkCandidate(i,t.globalConnNetId,o)==="ok").sort((i,r)=>n(i)-n(r)).map(i=>({...t,orientation:i.orientation,anchorPoint:i.anchor,center:i.center,width:i.width,height:i.height}))}clearActiveSearch(){this.currentCollision=null,this.currentLabelToMove=null,this.labelsToTry=[],this.candidateQueue=[],this.candidateIndex=0,this.candidateResults=[]}_step(){if(!this.currentCollision){const s=this.findNextCollidingPair();if(!s){this.solved=!0;return}this.currentCollision=s,this.labelsToTry=[s[1],s[0]].filter(a=>!(this.params.fixedNetLabelPlacements??[]).includes(a)),this.beginSearchForLabel(this.labelsToTry.shift());return}if(this.candidateIndex>=this.candidateQueue.length){this.labelsToTry.length>0?this.beginSearchForLabel(this.labelsToTry.shift()):(this.skippedCollisionKeys.add(this.collisionKey(this.currentCollision[0],this.currentCollision[1])),this.clearActiveSearch());return}const t=this.candidateQueue[this.candidateIndex++],[e,n]=this.currentCollision;let o;this.currentLabelToMove===n?o=e:o=n;const i=[...[...this.outputNetLabelPlacements,...this.params.fixedNetLabelPlacements??[]].filter(s=>s!==e&&s!==n),o],r=this.checkCandidate(t,this.currentLabelToMove.globalConnNetId,i);if(t.status=r,this.candidateResults.push({...t}),r==="ok"){const s=this.outputNetLabelPlacements.indexOf(this.currentLabelToMove);s!==-1&&(this.outputNetLabelPlacements[s]={...this.currentLabelToMove,orientation:t.orientation,anchorPoint:t.anchor,width:t.width,height:t.height,center:t.center}),this.clearActiveSearch()}}visualize(){const t=zh(this.inputProblem);t.lines||(t.lines=[]),t.rects||(t.rects=[]),t.points||(t.points=[]);for(const n of this.traces)t.lines.push({points:n.tracePath,strokeColor:"purple"});for(const n of this.outputNetLabelPlacements){const o=this.currentCollision!=null&&(n===this.currentCollision[0]||n===this.currentCollision[1]);let i,r,s,a;o?(i="rgba(255, 0, 0, 0.2)",r="red",s=`netId: ${n.netId}
globalConnNetId: ${n.globalConnNetId}
⚠ COLLIDING`,a="red"):(i=Mc(n.globalConnNetId,.35),r=Mc(n.globalConnNetId,.9),s=`netId: ${n.netId}
globalConnNetId: ${n.globalConnNetId}`,a=Mc(n.globalConnNetId,.9)),t.rects.push({center:n.center,width:n.width,height:n.height,fill:i,strokeColor:r,label:s}),t.points.push({x:n.anchorPoint.x,y:n.anchorPoint.y,color:a,label:`anchorPoint
orientation: ${n.orientation}`})}const e=this.currentLabelToMove?this.currentLabelToMove.netId:"?";for(const n of this.candidateResults){const o=Bxo[n.status],i=bxo[n.status];let r;n.status!=="ok"&&(r="4 2"),t.rects.push({center:n.center,width:n.width,height:n.height,fill:i,strokeColor:o,strokeDash:r,label:`candidate: ${n.status}
orientation: ${n.orientation}
moving: ${e}`}),t.points.push({x:n.anchor.x,y:n.anchor.y,color:o,label:`candidate anchor
${n.status}`})}return t}},rI=.2,fj=1e-9,Qxo="GND",GN=(t,e)=>Math.abs(t.x-e.x)<=fj&&Math.abs(t.y-e.y)<=fj,XH=t=>{const e=[];for(const n of t){const o=e.at(-1);(!o||!GN(o,n))&&e.push(n)}return e},iw=t=>{let e=0;for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},twe=({pin:t,facingDirection:e})=>{const n={x:t.x,y:t.y};return e==="x+"&&(n.x+=rI),e==="x-"&&(n.x-=rI),e==="y+"&&(n.y+=rI),e==="y-"&&(n.y-=rI),n},Fvt=t=>({minX:Math.min(...t.map(e=>e.minX)),minY:Math.min(...t.map(e=>e.minY)),maxX:Math.max(...t.map(e=>e.maxX)),maxY:Math.max(...t.map(e=>e.maxY))}),Lvt=({connectionPair:t,obstacles:e,channelObstacles:n=e})=>{const[o,i]=t.pins,r=twe({pin:o,facingDirection:o._facingDirection}),s=twe({pin:i,facingDirection:i._facingDirection}),a=Fvt(e),A=[a.minY-rI,a.maxY+rI,...n.flatMap(u=>[u.minY-rI,u.maxY+rI])],c=[a.minX-rI,a.maxX+rI,...n.flatMap(u=>[u.minX-rI,u.maxX+rI])],l=[wF({...o,facingDirection:o._facingDirection},{...i,facingDirection:i._facingDirection},{overshoot:rI})];for(const u of new Set(A))l.push(XH([o,r,{x:r.x,y:u},{x:s.x,y:u},s,i]));for(const u of new Set(c))l.push(XH([o,r,{x:u,y:r.y},{x:u,y:s.y},s,i]));return l.sort((u,g)=>iw(u)-iw(g))},vxo=(t,e)=>({x:(t.x+e.x)/2,y:(t.y+e.y)/2}),wxo=t=>{const e=[];for(const n of t){for(let i=0;i<n.tracePath.length-1;i++){const r=n.tracePath[i],s=n.tracePath[i+1];e.push(r),e.push(vxo(r,s))}const o=n.tracePath.at(-1);o&&e.push(o)}return e},Pxo=({connectionPair:t,sameNetTraces:e})=>{const n=new Set(e.flatMap(o=>o.pinIds));return t.pins.filter(o=>!n.has(o.pinId))},Mxo=({connectionPair:t,sameNetTraces:e,obstacles:n,maxConnectionDistance:o})=>{const i=Fvt(n),r=[i.minY-rI,i.maxY+rI],s=[i.minX-rI,i.maxX+rI],a=[],A=wxo(e),c=Pxo({connectionPair:t,sameNetTraces:e});for(const l of c){const u=twe({pin:l,facingDirection:l._facingDirection});for(const g of A)if(!(ad(l,g)>o)){a.push(XH([l,u,{x:u.x,y:g.y},g])),a.push(XH([l,u,{x:g.x,y:u.y},g]));for(const h of r)a.push(XH([l,u,{x:u.x,y:h},{x:g.x,y:h},g]));for(const h of s)a.push(XH([l,u,{x:h,y:u.y},{x:h,y:g.y},g]))}}return a.sort((l,u)=>iw(l)-iw(u))},Dxo=({path:t,obstacles:e,connectionPair:n,rejectComponentBoundaryTravel:o})=>{const i=t[0],r=t.at(-1),s=n.pins.find(g=>GN(g,i)),a=n.pins.find(g=>GN(g,r));for(const[g,h]of[[s,t[1]],[a,t[t.length-2]]]){if(!g?._facingDirection)continue;const d=sm(g._facingDirection);if((h.x-g.x)*d.x+(h.y-g.y)*d.y<-fj)return!0}const A=s!==void 0&&a!==void 0,c=e.find(g=>g.kind==="chip"&&g.chipId===s?.chipId),l=e.find(g=>g.kind==="chip"&&g.chipId===a?.chipId);return o&&c&&Mve(t[0],t[1],c)||o&&l&&Mve(t[t.length-2],t[t.length-1],l)?!0:HN(t,e,{excludeRectsForSegment:g=>{const h=new Set;return g===0&&c&&h.add(c),A&&g===t.length-2&&l&&h.add(l),h}})!==null},Nxo=({connectionPair:t,failedConnectionPairs:e})=>{const n=new Set(t.pins.map(o=>o.chipId));return e.some(o=>o.mspPairId===t.mspPairId?!1:o.pins.every(i=>n.has(i.chipId)))},Rxo=({firstStart:t,firstEnd:e,secondStart:n,secondEnd:o})=>X_(t,e)&&X_(n,o)?Math.min(Math.max(t.x,e.x),Math.max(n.x,o.x))-Math.max(Math.min(t.x,e.x),Math.min(n.x,o.x))>fj:e1(t,e)&&e1(n,o)?Math.min(Math.max(t.y,e.y),Math.max(n.y,o.y))-Math.max(Math.min(t.y,e.y),Math.min(n.y,o.y))>fj:!1,Txo=({connectionPair:t,existingTrace:e})=>{const n=new Set(e.pinIds);return t.pins.filter(o=>n.has(o.pinId))},kxo=({path:t,connectionPair:e,existingTraces:n})=>{for(const o of n){if(o.globalConnNetId===e.globalConnNetId)continue;const i=Txo({connectionPair:e,existingTrace:o});for(let r=0;r<t.length-1;r++){const s=t[r],a=t[r+1];for(let A=0;A<o.tracePath.length-1;A++){const c=o.tracePath[A],l=o.tracePath[A+1];if(!(!X1(s,a,c,l)||i.some(g=>(GN(s,g)||GN(a,g))&&(GN(c,g)||GN(l,g)))&&!Rxo({firstStart:s,firstEnd:a,secondStart:c,secondEnd:l})))return!0}}}return!1},Fxo=class extends Ng{constructor(t){super(),this.params=t,this.inputProblem=t.inputProblem,this.alreadySolvedTraces=t.alreadySolvedTraces,this.failedConnectionPairs=t.failedConnectionPairs,this.queuedConnectionPairs=[...t.failedConnectionPairs],this.maxConnectionDistance=this.inputProblem.maxMspPairDistance??uj;const{netConnMap:e}=mB(this.inputProblem);this.groundGlobalConnNetId=e.getNetConnectedToId(Qxo)??void 0}params;inputProblem;alreadySolvedTraces;failedConnectionPairs;queuedConnectionPairs;maxConnectionDistance;groundGlobalConnNetId;solvedUnroutedTraces=[];getConstructorParams(){return this.params}_step(){const t=this.queuedConnectionPairs.shift();if(!t){this.solved=!0;return}if(t.globalConnNetId===this.groundGlobalConnNetId||ad(t.pins[0],t.pins[1])>this.maxConnectionDistance)return;const e=Hy(this.inputProblem),n=[...this.alreadySolvedTraces,...this.solvedUnroutedTraces],o=n.filter(c=>c.globalConnNetId===t.globalConnNetId),i=Mxo({connectionPair:t,sameNetTraces:o,obstacles:e,maxConnectionDistance:this.maxConnectionDistance}),r=Lvt({connectionPair:t,obstacles:e,channelObstacles:[]}),s=[...i,...r].sort((c,l)=>iw(c)-iw(l)),a=Nxo({connectionPair:t,failedConnectionPairs:this.failedConnectionPairs});let A;for(const c of s)A&&iw(c)>=iw(A)||Dxo({path:c,obstacles:e,connectionPair:t,rejectComponentBoundaryTravel:a})||kxo({path:c,connectionPair:t,existingTraces:n})||(A||s.push(...Lvt({connectionPair:t,obstacles:e})),A=c);A&&this.solvedUnroutedTraces.push({...t,tracePath:A,mspConnectionPairIds:[t.mspPairId],pinIds:t.pins.map(c=>c.pinId)})}getOutput(){return{newTraces:this.solvedUnroutedTraces,allTracesMerged:[...this.alreadySolvedTraces,...this.solvedUnroutedTraces]}}visualize(){const t=zh(this.inputProblem);for(const e of this.solvedUnroutedTraces)t.lines.push({points:e.tracePath,strokeColor:"blue"});return t}},Yle=1e-6,Ule=({path:t,netLabelPlacements:e})=>{for(const n of e){const o=Ls(n.center,n.width,n.height);for(let i=0;i<t.length-1;i++)if(O7(t[i],t[i+1],o))return!0}return!1},Hvt=({path:t,netLabelPlacements:e})=>{for(const n of e){const o=Ls(n.center,n.width,n.height),i={minX:o.minX+Yle,minY:o.minY+Yle,maxX:o.maxX-Yle,maxY:o.maxY-Yle};for(let r=0;r<t.length-1;r++)if(O7(t[r],t[r+1],i))return!0}return!1},nwe=t=>t._facingDirection?sm(t._facingDirection).x===0?"y":"x":null,Ovt=({coordinate:t,axis:e,pin:n})=>{if(!n._facingDirection)return!1;const o=sm(n._facingDirection);return(t-n[e])*o[e]>0},Lxo=(t,e)=>CB(t,e)?"x":Yy(t,e)?"y":null,Gvt=t=>{const e=[];for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1],r=Lxo(o,i);if(!r)continue;const s=r==="x"?"y":"x";e.push({start:o,end:i,axis:r,coordinate:o[s]})}return e},Yvt=({pin:t,departureAxis:e,railCoordinate:n})=>e==="x"?{x:n,y:t.y}:{x:t.x,y:n},Hxo=({donorPath:t,branchDepartureSegment:e,sharedPin:n,adjacentPin:o})=>{const i=nwe(n);if(!i)return null;const r=i==="x"?"y":"x",s=Gvt(e)[0];if(!s||s.axis!==i)return null;let a=null,A=Number.POSITIVE_INFINITY;for(const c of Gvt(t)){if(c.axis!==r||!Ovt({coordinate:c.coordinate,axis:i,pin:n}))continue;const l=Yvt({pin:n,departureAxis:i,railCoordinate:c.coordinate}),u=Yvt({pin:o,departureAxis:i,railCoordinate:c.coordinate});if(!jl([c.start,c.end],l)||!jl([c.start,c.end],u)||!jl([s.start,s.end],l))continue;const g=Math.abs(c.coordinate-n[i]);g>=A||(a={segment:c,sharedPinExit:l},A=g)}return a},YN=({donorTrace:t,branchTrace:e})=>{const n=new Set(e.pins.map(o=>o.pinId));return t.pins.find(o=>n.has(o.pinId))??null},Kle=(t,e)=>Uc(t.x,e.x)?"y":Uc(t.y,e.y)?"x":null,Uvt=({trace:t,sharedPinId:e})=>{const n=Qa(t.tracePath),o=t.pins.find(r=>r.pinId===e);if(!o)return null;const i=t.pins[0]?.pinId===e?n:n.reverse();return fb(i[0],o)?i:null},Vle=({trace:t,sharedPrefix:e,netLabelPlacements:n})=>!n.some(o=>o.mspConnectionPairIds.includes(t.mspPairId)&&jl(e,o.anchorPoint)),Kvt=({trace:t,pathFromSharedPin:e,sharedPinId:n,branchPoint:o})=>{const i=e.findIndex((a,A)=>{const c=e[A+1];return c?jl([a,c],o):!1});if(i<0)return null;const r=Qa([o,...e.slice(i+1)]);let s=r;return t.pins[0]?.pinId!==n&&(s=r.reverse()),{...t,tracePath:s}},Oxo=({traces:t,netLabelPlacements:e,netLabelConnectorTraceIds:n,multiPinNetPinIds:o})=>{const i=[...t];for(let r=0;r<i.length;r++)if(!n.has(i[r].mspPairId))for(let s=r+1;s<i.length;s++){const a=i[r],A=i[s];if(n.has(A.mspPairId)||a.globalConnNetId!==A.globalConnNetId)continue;const c=YN({donorTrace:a,branchTrace:A});if(!c||!o.has(c.pinId))continue;const l=Uvt({trace:a,sharedPinId:c.pinId}),u=Uvt({trace:A,sharedPinId:c.pinId});if(!l||!u||l.length<2||u.length<2)continue;const g=Kle(l[0],l[1]),h=Kle(u[0],u[1]);if(!g||g!==h)continue;const d=l[1][g]-l[0][g],p=u[1][g]-u[0][g];if(!fb(l[1],u[1])&&Math.sign(d)===Math.sign(p)){let M=s,k=A,R=u;Math.abs(d)<Math.abs(p)&&(M=r,k=a,R=l);const F=R[1];if(Vle({trace:k,sharedPrefix:[R[0],F],netLabelPlacements:e})||(M===r?(M=s,k=A,R=u):(M=r,k=a,R=l)),!Vle({trace:k,sharedPrefix:[R[0],F],netLabelPlacements:e}))continue;const O=Kvt({trace:k,pathFromSharedPin:R,sharedPinId:c.pinId,branchPoint:F});if(!O)continue;i[M]=O;continue}if(l.length<3||u.length<3||!fb(l[1],u[1]))continue;const m=Kle(l[1],l[2]),_=Kle(u[1],u[2]);if(!m||m!==_||m===g)continue;const f=l[2][m]-l[1][m],I=u[2][m]-u[1][m],C=Math.sign(f)===Math.sign(I),y=l.slice(0,2);if(!C&&!Uc(Math.abs(f),Math.abs(I))&&e.some(M=>M.globalConnNetId===a.globalConnNetId&&jl(y,M.anchorPoint)))continue;let x=s,E=A,B=u,S=l[1];C&&Math.abs(f)<Math.abs(I)?(x=r,E=a,B=l,S=l[2]):C&&(S=u[2]);const Q=[B[0],B[1],S];if(Vle({trace:E,sharedPrefix:Q,netLabelPlacements:e})||(x===r?(x=s,E=A,B=u):(x=r,E=a,B=l)),!Vle({trace:E,sharedPrefix:[B[0],B[1],S],netLabelPlacements:e}))continue;const w=Kvt({trace:E,pathFromSharedPin:B,sharedPinId:c.pinId,branchPoint:S});w&&(i[x]=w)}return i},owe=1e-6,Vvt=(t,e)=>{const n=t.tracePath[0],o=t.tracePath.at(-1);return!n||!o?null:fb(n,e)?t.tracePath:fb(o,e)?[...t.tracePath].reverse():null},Gxo=(t,e)=>{const n=[],o=t[0];for(let i=0;i<t.length-1;i++){const r=t[i],s=t[i+1],a=JH(r,s);if(a)for(let A=0;A<e.length-1;A++){const c=e[A],l=e[A+1],u=JH(c,l);if(!u||u===a)continue;const g=V4(r,s,c,l);!g||fb(g,o)||n.push({intersectionPoint:g,targetSegmentIndex:i,donorSegmentIndex:A})}}return n},Yxo=(t,e,n)=>{const o=V4(t[e],t[e+1],t[n],t[n+1]);return o?Qa([...t.slice(0,e+1),o,...t.slice(n+1)]):t},Uxo=({targetTrace:t,targetPath:e,donorPath:n,crossing:o})=>{const i=Qa([...n.slice(0,o.donorSegmentIndex+1),o.intersectionPoint,...e.slice(o.targetSegmentIndex+1)]);return fb(t.tracePath[0],e[0])?i:i.reverse()},Kxo=({targetTrace:t,tracePath:e,netLabelPlacements:n})=>{const o=jH({trace:t,originalTracePath:t.tracePath,reroutedTracePath:e,netLabelPlacements:n});for(let s=0;s<n.length;s++){const a=n[s];if(a.globalConnNetId!==t.globalConnNetId||!jl(t.tracePath,a.anchorPoint))continue;const A=o[s];if(!jl(e,A.anchorPoint))return null}const i=o.filter(s=>s.globalConnNetId!==t.globalConnNetId);if(Ule({path:e,netLabelPlacements:i}))return null;const r=o.filter(s=>s.globalConnNetId===t.globalConnNetId);return Hvt({path:e,netLabelPlacements:r})?null:o},Vxo=(t,e)=>{if(!e)return!0;const n=t.netVisibleLength-e.netVisibleLength;return Math.abs(n)>owe?n<0:t.netVisibleSegmentCount<e.netVisibleSegmentCount},zxo=({targetTrace:t,traces:e,netLabelPlacements:n})=>{const o=e.filter(c=>c.globalConnNetId===t.globalConnNetId),i=Y7(o),r=Y7([t]);let s=null;const a=c=>{const l={...t,tracePath:c};if(Y7([l])>r+owe)return;const g=Kxo({targetTrace:t,tracePath:c,netLabelPlacements:n});if(!g)return;const h=o.map(m=>m.mspPairId===t.mspPairId?l:m),d=Y7(h);if(d>=i-owe)return;const p={tracePath:c,netLabelPlacements:g,netVisibleLength:d,netVisibleSegmentCount:Qle(h)};Vxo(p,s)&&(s=p)},A=WH(t.tracePath,t.tracePath,{includeTerminalSegments:!0}).filter(({pathSegmentIndex:c,otherPathSegmentIndex:l})=>c<l);for(const c of A)a(Yxo(t.tracePath,c.pathSegmentIndex,c.otherPathSegmentIndex));for(const c of o){if(c.mspPairId===t.mspPairId)continue;const l=YN({donorTrace:c,branchTrace:t});if(!l)continue;const u=Vvt(t,l),g=Vvt(c,l);if(!u||!g)continue;const h=Gxo(u,g);for(const d of h){const p=Uxo({targetTrace:t,targetPath:u,donorPath:g,crossing:d});a(p)}}return s},Jxo=({traces:t,netLabelPlacements:e})=>{const n=[...t];let o=[...e],i=0,r=0;for(;r<n.length;){const s=n[r],a=zxo({targetTrace:s,traces:n,netLabelPlacements:o});if(!a){r++;continue}n[r]={...s,tracePath:a.tracePath},o=a.netLabelPlacements,i++,r=0}return{traces:n,netLabelPlacements:o,collapsedCycleCount:i}},iwe=.2,Wxo=.2,jxo=.05,zvt=.8,$xo=.05,qxo=t=>{const{netConnMap:e}=mB(t),n=new Set(t.chips.flatMap(o=>o.pins.map(i=>i.pinId)));return new Set([...n].filter(o=>{const i=e.getNetConnectedToId(o);return i?e.getIdsConnectedToNet(i).filter(r=>n.has(r)).length>2:!1}))},oE=(t,e)=>CB(t,e)?"x":Yy(t,e)?"y":null,rw=({trace:t,sharedPin:e})=>t.pins.find(n=>n.pinId!==e.pinId)??null,Ij=t=>{let e=null;for(let n=0;n<t.tracePath.length-1;n++){const o=t.tracePath[n],i=t.tracePath[n+1];CB(o,i)&&(!e||Math.abs(i.x-o.x)>Math.abs(e.end.x-e.start.x))&&(e={start:o,end:i})}return e},Xxo=({segment:t,sharedPin:e})=>{const n=Math.abs(t.start.x-e.x),o=Math.abs(t.end.x-e.x);return n<=o?t.start:t.end},Cj=({railY:t,pin:e})=>e._facingDirection==="y+"?t>e.y:e._facingDirection==="y-"?t<e.y:!1,Zxo=({railY:t,pin:e})=>e._facingDirection==="y+"?t>e.y:e._facingDirection==="y-"?t<e.y:!1,e3o=({branchTrace:t,sharedPin:e,otherPin:n})=>{if(n._facingDirection!=="x-"&&n._facingDirection!=="x+")return null;const i=(t.pins[0].pinId===e.pinId?t.tracePath:[...t.tracePath].reverse()).at(-2);return!i||!Uc(i.y,n.y)?null:(n._facingDirection==="x-"?i.x<n.x:i.x>n.x)?i:null},Jvt=(t,e)=>e.flatMap((n,o)=>Avt(n,t)&&jl(t.tracePath,n.anchorPoint)?[o]:[]),t3o=({trace:t,reroutedTracePath:e,netLabelPlacements:n,attachedLabelIndexes:o})=>{const i=o.map(a=>n[a]),r=jH({trace:t,originalTracePath:t.tracePath,reroutedTracePath:e,netLabelPlacements:i}),s=new Map(o.map((a,A)=>[a,r[A]]));return n.map((a,A)=>s.get(A)??a)},n3o=({donorTrace:t,branchTrace:e})=>{const n=YN({donorTrace:t,branchTrace:e});if(!n)return null;const o=rw({trace:t,sharedPin:n});if(!o)return null;const i=rw({trace:e,sharedPin:n});if(!i||Math.abs(n.y-i.y)>iwe)return null;const r=Ij(t);if(!r)return null;const s=Ij(e);if(s&&Uc(s.start.y,r.start.y))return null;const a=Cj({railY:r.start.y,pin:i}),A=Zxo({railY:r.start.y,pin:n})&&Math.abs(r.start.y-n.y)<=jxo;if(!a&&!A)return null;const c=Xxo({segment:r,sharedPin:n});if(!(o.x<c.x&&i.x>c.x||o.x>c.x&&i.x<c.x))return null;let u;if(!a&&A){const g=e3o({branchTrace:e,sharedPin:n,otherPin:i});if(!g)return null;u=Qa([{x:n.x,y:n.y},{x:c.x,y:n.y},{x:c.x,y:c.y},{x:g.x,y:c.y},{x:g.x,y:i.y},{x:i.x,y:i.y}])}else u=Qa([{x:n.x,y:n.y},{x:c.x,y:n.y},{x:c.x,y:c.y},{x:i.x,y:c.y},{x:i.x,y:i.y}]);return e.pins[0].pinId===n.pinId?u:[...u].reverse()},o3o=({donorTrace:t,branchTrace:e})=>{const n=YN({donorTrace:t,branchTrace:e});if(!n)return null;const o=rw({trace:t,sharedPin:n}),i=rw({trace:e,sharedPin:n});if(!o||!i)return null;const r=n._facingDirection,s=nwe(n);if(!r||!s)return null;const a=s==="x"?"y":"x";if(o.chipId!==n.chipId||o._facingDirection!==r||!Uc(o[s],n[s])||nwe(i)!==a)return null;const A=Math.abs(o[a]-n[a]);if(A>iwe&&!Uc(A,iwe))return null;const c=e.pins[0].pinId===n.pinId;let l=Qa(e.tracePath);if(c||l.reverse(),l.length<2)return null;const u=[l[0],l[1]],g=Hxo({donorPath:t.tracePath,branchDepartureSegment:u,sharedPin:n,adjacentPin:o});if(!g)return null;const h=o[a];if(!Ovt({coordinate:h,axis:a,pin:i}))return null;const d={...g.sharedPinExit,[a]:h},p={x:i.x,y:i.y,[a]:h},m=Qa([{x:n.x,y:n.y},g.sharedPinExit,d,p,{x:i.x,y:i.y}]);return c?m:m.reverse()},i3o=({donorTrace:t,branchTrace:e,netLabelConnectorTraceIds:n})=>{if(n.has(t.mspPairId)||n.has(e.mspPairId))return null;const o=YN({donorTrace:t,branchTrace:e});if(!o)return null;const i=B=>{const S=Qa(B.tracePath);return B.pins[0].pinId===o.pinId?S:[...S].reverse()},r=i(t),s=i(e);if(r.length<3||s.length<4)return null;const a=oE(r[0],r[1]),A=oE(s[0],s[1]);if(!a||a!==A)return null;const c=r[1][a]-r[0][a],l=s[1][A]-s[0][A];if(Math.sign(c)!==Math.sign(l))return null;let u=1,g=oE(r[1],r[2]),h=oE(s[1],s[2]);if(!g||g!==h||g===a||(g==="x"&&Uc(r[1].y,s[1].y)||g==="y"&&Uc(r[1].x,s[1].x))&&(u++,!r[u+2]||!s[u+2]||(g=oE(r[u],r[u+1]),h=oE(s[u],s[u+1]),!g||g!==h)))return null;let p=0;for(let B=1;B<s.length-2;B++)oE(s[B],s[B+1])===h&&p++;if(p!==1)return null;const m=g==="x"?"y":"x",_=r[u][m],f=s[u][m],I=Math.abs(_-f);if(Uc(_,f)||I>zvt)return null;const C=[r[u][g],r[u+1][g]].sort((B,S)=>B-S),y=[s[u][h],s[u+1][h]].sort((B,S)=>B-S);if(!(Math.min(C[1],y[1])>=Math.max(C[0],y[0])-1e-6))return null;const E=Qa(s.map((B,S)=>S===u||S===u+1?{...B,[m]:_}:B));return e.pins[0].pinId===o.pinId?E:E.reverse()},r3o=({donorTrace:t,connectorTrace:e,netLabelConnectorTraceIds:n})=>{if(n.has(t.mspPairId)||!n.has(e.mspPairId))return null;const o=a=>{if(a.length<3)return null;const A=a[0],c=a[1],l=a[2],u=oE(A,c),g=oE(c,l);if(!u||!g||u===g)return null;const h=t.tracePath.findIndex((y,x,E)=>{const B=E[x+1];return B&&oE(y,B)===u&&jl([y,B],A)&&jl([y,B],c)});if(h<0)return null;const d=t.tracePath[h],p=t.tracePath[h+1];if(Uc(A.x,d.x)&&Uc(A.y,d.y)||Uc(A.x,p.x)&&Uc(A.y,p.y))return null;const m=[h>0?[t.tracePath[h-1],d]:null,h+2<t.tracePath.length?[p,t.tracePath[h+2]]:null].flatMap(y=>y&&oE(y[0],y[1])===g?[y]:[]);if(m.length===0)return null;const _=g==="x"?"y":"x",f=c[_],I=[c[g],l[g]].sort((y,x)=>y-x),C=m.map(y=>({segment:y,coordinate:y[0][_],offset:Math.abs(y[0][_]-f)})).filter(({segment:y,offset:x})=>{if(x>zvt)return!1;const E=[y[0][g],y[1][g]].sort((Q,w)=>Q-w),B=Math.max(E[0],I[0]),S=Math.min(E[1],I[1]);return S>=B-1e-6&&Math.abs(S-B)<=1e-6}).sort((y,x)=>y.offset-x.offset)[0];return!C||Uc(C.offset,0)?null:Qa(a.map((y,x)=>x===1||x===2?{...y,[_]:C.coordinate}:y))},i=Qa(e.tracePath),r=o(i);if(r)return r;const s=o([...i].reverse());return s?s.reverse():null},rwe=(t,e)=>{if(t.some(n=>jl(e,n))||e.some(n=>jl(t,n)))return!0;for(let n=1;n<t.length;n++)for(let o=1;o<e.length;o++)if(V4(t[n-1],t[n],e[o-1],e[o]))return!0;return!1},s3o=({originalTrace:t,candidateTrace:e,traces:n})=>{let o=n.map(i=>i.mspPairId===t.mspPairId?e:i);for(const i of n){if(i.mspPairId===t.mspPairId||i.globalConnNetId!==t.globalConnNetId||!rwe(t.tracePath,i.tracePath)||rwe(e.tracePath,i.tracePath))continue;const r=[0,i.tracePath.length-1].find(u=>jl(t.tracePath,i.tracePath[u]));if(r===void 0)return null;const s=i.tracePath[r];if(i.pins.some(u=>Uc(u.x,s.x)&&Uc(u.y,s.y)))return null;const a=zve(s,t.tracePath,e.tracePath);if(!a)return null;const A=r===0?1:r-1,c=i.tracePath[A];if(!c||oE(s,c)!==oE(a,c))return null;const l={...i,tracePath:i.tracePath.map((u,g)=>g===r?a:u)};if(!rwe(e.tracePath,l.tracePath))return null;o=o.map(u=>u.mspPairId===i.mspPairId?l:u)}return o},Wvt=({trace:t,endpointPin:e})=>{const n=rw({trace:t,sharedPin:e});if(!n)return null;const o=t.pins[0].pinId===e.pinId;let i=Qa(t.tracePath);if(o||i.reverse(),i.length!==3)return null;const[r,s,a]=i,A=e._facingDirection;if(A==="y+"||A==="y-")return n._facingDirection!=="x+"&&n._facingDirection!=="x-"||!Yy(r,s)||!CB(s,a)||!Cj({railY:s.y,pin:e})?null:(n._facingDirection==="x-"?s.x<n.x:s.x>n.x)?{railCoordinate:s.y}:null;if(A!=="x+"&&A!=="x-"||n._facingDirection!=="y+"&&n._facingDirection!=="y-"||!CB(r,s)||!Yy(s,a))return null;const c=A==="x+"?s.x>e.x:s.x<e.x,l=n._facingDirection==="y+"?s.y>n.y:s.y<n.y;return c&&l?{railCoordinate:s.x}:null},a3o=({donorTrace:t,branchTrace:e,traces:n})=>{const o=YN({donorTrace:t,branchTrace:e});if(!o)return null;const i=rw({trace:e,sharedPin:o});if(!i)return null;const r=f=>n.filter(I=>I.mspPairId!==e.mspPairId&&I.globalConnNetId===e.globalConnNetId&&I.pinIds.includes(f.pinId)),s=r(o),a=r(i);if(s.length!==1||s[0].mspPairId!==t.mspPairId||a.length!==1)return null;const A=Wvt({trace:t,endpointPin:o});if(!A)return null;const c=o._facingDirection,l=c==="y+"||c==="y-";if(!l&&!(c==="x+"||c==="x-")||l!==(i._facingDirection==="y+"||i._facingDirection==="y-"))return null;const g=e.pins[0].pinId===o.pinId;let h=Qa(e.tracePath);if(g||h.reverse(),h.length!==6)return null;const d=l?["V","H","V","H","V"]:["H","V","H","V","H"];if(h.slice(1).map((f,I)=>CB(h[I],f)?"H":Yy(h[I],f)?"V":"D").some((f,I)=>f!==d[I]))return null;const m=Wvt({trace:a[0],endpointPin:i});if(!m)return null;const _=Qa(l?[{x:o.x,y:o.y},{x:o.x,y:A.railCoordinate},{x:h[2].x,y:A.railCoordinate},{x:h[3].x,y:m.railCoordinate},{x:i.x,y:m.railCoordinate},{x:i.x,y:i.y}]:[{x:o.x,y:o.y},{x:A.railCoordinate,y:o.y},{x:A.railCoordinate,y:h[2].y},{x:m.railCoordinate,y:h[3].y},{x:m.railCoordinate,y:i.y},{x:i.x,y:i.y}]);return g?_:_.reverse()},jvt=({candidateTrace:t,originalTrace:e,traces:n,inputProblem:o,originalNetLabelPlacements:i,candidateNetLabelPlacements:r,attachedLabelIndexes:s})=>{const a=Hy(o);if(ON(t.tracePath,a))return!1;const A=n.filter(d=>d.globalConnNetId!==t.globalConnNetId);if(nw(t.tracePath,A))return!1;for(const d of A){const p=m=>{const _=new Set;for(let f=1;f<m.length;f++)for(let I=1;I<d.tracePath.length;I++){const C=V4(m[f-1],m[f],d.tracePath[I-1],d.tracePath[I]);C&&_.add(`${C.x.toFixed(6)},${C.y.toFixed(6)}`)}return _.size};if(p(t.tracePath)>p(e.tracePath))return!1}if(!s.every(d=>jl(t.tracePath,r[d].anchorPoint)))return!1;const c=(d,p)=>Ule({path:p.tracePath,netLabelPlacements:[d]});for(const d of s){const p=i[d],m=r[d],_=Ls(p.center,p.width,p.height),f=Ls(m.center,m.width,m.height);for(const I of n)if(I.globalConnNetId!==m.globalConnNetId&&c(m,I)&&!c(p,I))return!1;for(const I of a)if(yB(f,I)&&!yB(_,I))return!1;for(let I=0;I<r.length;I++){if(I===d)continue;const C=i[I],y=r[I],x=Ls(C.center,C.width,C.height),E=Ls(y.center,y.width,y.height);if(yB(f,E)&&!yB(_,x))return!1}}const l=r.filter(d=>d.globalConnNetId!==t.globalConnNetId);if(Ule({path:t.tracePath,netLabelPlacements:l}))return!1;const u=r.filter(d=>d.globalConnNetId===t.globalConnNetId);if(!Ule({path:t.tracePath,netLabelPlacements:u}))return!0;if(Hvt({path:t.tracePath,netLabelPlacements:u}))return!1;const g=Ij(e),h=Ij(t);return!g||!h?!1:Math.abs(g.start.y-h.start.y)<=Wxo},A3o=({donorTrace:t,branchTrace:e,returnStemScale:n=1})=>{const o=YN({donorTrace:t,branchTrace:e});if(!o)return null;const i=rw({trace:t,sharedPin:o}),r=rw({trace:e,sharedPin:o});if(!i||!r)return null;const s=o._facingDirection;if(s!=="y+"&&s!=="y-"||i._facingDirection!==s||r._facingDirection!==s||!Uc(o.y,i.y))return null;const a=Qa(t.tracePath);if(a.length!==4)return null;const A=Ij(t);if(!A||!Cj({railY:A.start.y,pin:o})||!Yy(a[0],a[1])||!Yy(a[2],a[3]))return null;const c=e.pins[0].pinId===o.pinId,l=Qa(c?e.tracePath:[...e.tracePath].reverse());if(l.length!==6||!Yy(l[0],l[1])||!CB(l[1],l[2])||!Yy(l[2],l[3])||!CB(l[3],l[4])||!Yy(l[4],l[5])||!Cj({railY:l[1].y,pin:o})||!Cj({railY:l[4].y,pin:r})||(s==="y+"?1:-1)*(r.y-A.start.y)<=0)return null;const g=Math.min(o.x,i.x),h=Math.max(o.x,i.x);if(l[2].x<g||l[2].x>h||Uc(l[2].x,i.x)&&Uc(l[1].y,A.start.y))return null;const d=r.y+(l[4].y-r.y)*n;if(Math.abs(d-r.y)<$xo-1e-6)return null;const p=Qa([{x:o.x,y:o.y},{x:o.x,y:A.start.y},{x:i.x,y:A.start.y},{x:i.x,y:d},{x:r.x,y:d},{x:r.x,y:r.y}]);return c?p:p.reverse()},c3o=({inputProblem:t,traces:e,netLabelPlacements:n,netLabelConnectorTraceIds:o})=>{let i=[...e],r=[...n],s=0;const a=new Set;for(const c of[!1,!0]){const l=e.map(g=>g.mspPairId),u=new Set(l);for(let g=0;g<l.length;g++){const h=l[g];u.delete(h);const d=i.find(p=>p.mspPairId===h);for(const p of i){if(a.has(p.mspPairId)||d.mspPairId===p.mspPairId||d.globalConnNetId!==p.globalConnNetId)continue;const m=o.has(d.mspPairId),f=o.has(p.mspPairId)?c&&!m?[r3o({donorTrace:d,connectorTrace:p,netLabelConnectorTraceIds:o})]:[]:m?[]:c?[...[1,.5,.25].map(I=>A3o({donorTrace:d,branchTrace:p,returnStemScale:I})),a3o({donorTrace:d,branchTrace:p,traces:i}),i3o({donorTrace:d,branchTrace:p,netLabelConnectorTraceIds:o})]:[n3o({donorTrace:d,branchTrace:p}),o3o({donorTrace:d,branchTrace:p})];for(const I of f){if(!I)continue;const C={...p,tracePath:I},y=[d,p],x=[d,C],E=Qle(x)<Qle(y),B=Y7(x)<Y7(y)&&!Uc(Y7(x),Y7(y));if(!E&&!B)continue;const S=Jvt(p,r),Q=t3o({trace:p,reroutedTracePath:I,netLabelPlacements:r,attachedLabelIndexes:S}),w=s3o({originalTrace:p,candidateTrace:C,traces:i});if(!(!w||!jvt({candidateTrace:C,originalTrace:p,traces:w,inputProblem:t,originalNetLabelPlacements:r,candidateNetLabelPlacements:Q,attachedLabelIndexes:S})||!w.every(k=>{if(k.mspPairId===p.mspPairId)return!0;const R=i.find(F=>F.mspPairId===k.mspPairId);return R.tracePath===k.tracePath?!0:jvt({candidateTrace:k,originalTrace:R,traces:w,inputProblem:t,originalNetLabelPlacements:r,candidateNetLabelPlacements:Q,attachedLabelIndexes:Jvt(R,r)})}))){i=w,r=Q,a.add(p.mspPairId),s++,u.has(p.mspPairId)||(l.push(p.mspPairId),u.add(p.mspPairId));break}}}}}const A=Jxo({traces:i,netLabelPlacements:r});return i=Oxo({traces:A.traces,netLabelPlacements:A.netLabelPlacements,netLabelConnectorTraceIds:o,multiPinNetPinIds:qxo(t)}),r=A.netLabelPlacements,{traces:i,netLabelPlacements:r,alignedJunctionCount:s,collapsedCycleCount:A.collapsedCycleCount}},l3o=({inputProblem:t,traces:e,netLabelPlacements:n})=>{const{netConnMap:o}=mB(t),i=o.getNetConnectedToId("GND");if(!i)return n;const r=new Map(t.chips.map(c=>[c.chipId,c])),s=Object.fromEntries(e.map(c=>[c.mspPairId,c])),a=Hy(t),A=[...n];for(const c of e){if(c.globalConnNetId!==i)continue;const[l,u]=c.pins;if(l.chipId===u.chipId||!Uc(l.y,u.y)||![l,u].every(h=>h._facingDirection==="y-"&&r.get(h.chipId)?.pins.length===2))continue;const g=Qa(c.tracePath);if(!(g.length!==4||!Yy(g[0],g[1])||!CB(g[1],g[2])||!Yy(g[2],g[3])||g[1].y>=l.y))for(const h of e){if(h.globalConnNetId!==i)continue;const d=h.pins.find(f=>c.pinIds.includes(f.pinId)),p=h.pins.find(f=>!c.pinIds.includes(f.pinId)&&(r.get(f.chipId)?.pins.length??0)>2);if(!d||!p||!Uc(p.y,g[1].y))continue;const m=d.pinId===l.pinId?u:l;if(Math.abs(m.x-p.x)<=Math.abs(d.x-p.x))continue;const _={x:m.x,y:g[1].y};if(jl(c.tracePath,_))for(let f=0;f<A.length;f++){const I=A[f];if(I.globalConnNetId!==i||I.orientation!=="y-"||!I.mspConnectionPairIds.some(x=>x===h.mspPairId||x===c.mspPairId)||!jl(h.tracePath,I.anchorPoint)&&!jl(c.tracePath,I.anchorPoint))continue;const C=IC(_,I.orientation,I.width,I.height),y=Ls(C,I.width,I.height);a.some(x=>yB(y,x))||mj(y,s)||A.some((x,E)=>E!==f&&yB(y,Ls(x.center,x.width,x.height)))||(A[f]={...I,anchorPoint:_,center:C,mspConnectionPairIds:[c.mspPairId],pinIds:[...c.pinIds]})}}}for(let c=0;c<A.length;c++){const l=A[c];if(l.orientation!=="y-"||!t.netConnections.find(p=>p.isGround&&p.netId===l.netId&&p.pinIds.length>2))continue;const g=e.filter(p=>p.globalConnNetId===l.globalConnNetId).flatMap(p=>p.tracePath).filter(p=>Uc(p.x,l.anchorPoint.x)&&p.y<l.anchorPoint.y).sort((p,m)=>p.y-m.y)[0];if(!g)continue;const h=IC(g,l.orientation,l.width,l.height),d=Ls(h,l.width,l.height);a.some(p=>yB(d,p))||mj(d,s)||A.some((p,m)=>m!==c&&yB(d,Ls(p.center,p.width,p.height)))||(A[c]={...l,anchorPoint:g,center:h})}return A},u3o=class extends Ng{input;outputTraces;outputNetLabelPlacements;constructor(t){super(),this.input=t,this.outputTraces=t.traces,this.outputNetLabelPlacements=t.netLabelPlacements}_step(){const t=c3o(this.input);this.outputTraces=t.traces,this.outputNetLabelPlacements=l3o({inputProblem:this.input.inputProblem,traces:t.traces,netLabelPlacements:t.netLabelPlacements}),this.stats.alignedJunctionCount=t.alignedJunctionCount,this.stats.collapsedCycleCount=t.collapsedCycleCount,this.solved=!0}getOutput(){return{traces:this.outputTraces,netLabelPlacements:this.outputNetLabelPlacements}}visualize(){const t=zh(this.input.inputProblem);t.lines??=[],t.rects??=[],t.points??=[];for(const e of this.outputTraces)t.lines.push({points:e.tracePath,strokeColor:"purple"});for(const e of this.outputNetLabelPlacements){const n={center:e.center,width:e.width,height:e.height,fill:Mc(e.globalConnNetId,.35),strokeColor:Mc(e.globalConnNetId,.9),label:`netId: ${e.netId}
globalConnNetId: ${e.globalConnNetId}`};t.rects.push(n),t.points.push({x:e.anchorPoint.x,y:e.anchorPoint.y,color:Mc(e.globalConnNetId,.9),label:`anchorPoint
orientation: ${e.orientation}`})}return t}},$vt=t=>{const e=Qa(t);if(e.length!==6)return!1;const n=e.slice(0,-1).map((o,i)=>X_(o,e[i+1]));return n.every((o,i)=>i===0||o!==n[i-1])},g3o=({trace:t,label:e,paddingBuffer:n,detourCount:o})=>{if(t.globalConnNetId===e.globalConnNetId)return[];const i=Qa(t.tracePath);if(!$vt(i))return[];const r=Ls(e.center,e.width,e.height),s=n+o*n,a={minX:r.minX-s,maxX:r.maxX+s,minY:r.minY-s,maxY:r.maxY+s},A=[];for(let c=1;c<i.length-2;c++){const l=i[c],u=i[c+1];if(!CC(l,u,r))continue;const g=X_(l,u),h=e1(l,u);if(!g&&!h)continue;const d=g?"y":"x",p=g?[a.minY,a.maxY]:[a.minX,a.maxX];for(const m of p){const _=Dve(i,c,d,m);_&&A.push(_)}}return A},d3o=({trace:t,label:e,paddingBuffer:n,detourCount:o})=>{const i=Qa(t.tracePath);if(!$vt(i))return[];const r=Ls(e.center,e.width,e.height),s=n+o*n,a={minX:r.minX-s,maxX:r.maxX+s,minY:r.minY-s,maxY:r.maxY+s},A=i[0],c=i[i.length-1],l=2,u=[];for(let g=0;g<i.length-1;g++){const h=i[g],d=i[g+1];if(!CC(h,d,r)||Math.abs(g-l)!==1)continue;const p=X_(h,d),m=e1(h,d);if(!p&&!m)continue;const _=p?"x":"y",f=p?a.minX:a.minY,I=p?a.maxX:a.maxY,C=p?A.x:A.y,y=p?c.x:c.y,x=[];C<f?x.push((C+f)/2):C>I&&x.push((C+I)/2),y<f?x.push((y+f)/2):y>I&&x.push((y+I)/2);for(const E of new Set(x)){const B=Dve(i,l,_,E);B&&u.push(B)}}return u},h3o=({trace:t,label:e,netLabelPlacements:n,paddingBuffer:o,detourCount:i})=>d3o({trace:t,label:e,paddingBuffer:o,detourCount:i}).flatMap(s=>{const a={...t,tracePath:s};return Jh({traces:[a],netLabels:n}).flatMap(({label:c})=>g3o({trace:a,label:c,paddingBuffer:o,detourCount:i}))}),qvt=1e-9,ZH=t=>t.slice(1).reduce((e,n,o)=>{const i=t[o];return e+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),swe=class extends Ng{input;outputTraces;traceIdQueue;obstacles;constructor(t){super(),this.input=t,this.outputTraces=[...t.traces];const e=new Set(t.completedReroutes.map(n=>n.initialTrace.mspPairId));this.traceIdQueue=t.traces.map(n=>n.mspPairId).filter(n=>e.has(n)),this.obstacles=Hy(t.inputProblem)}_step(){const t=this.traceIdQueue.shift();if(!t){this.solved=!0;return}const e=this.outputTraces.findIndex(h=>h.mspPairId===t),n=this.outputTraces[e],o=Qa(n.tracePath),i=Jh({traces:[{...n,tracePath:o}],netLabels:this.input.netLabelPlacements}),r=this.outputTraces.filter(h=>h.mspPairId!==n.mspPairId&&h.globalConnNetId!==n.globalConnNetId),s=new Map,a=this.input.completedReroutes.filter(h=>h.initialTrace.mspPairId===n.mspPairId);for(const h of a){const d=Qa(h.initialTrace.tracePath),p=Qa(h.reroutedTracePath),m=Jh({traces:[{...h.initialTrace,tracePath:d}],netLabels:this.input.netLabelPlacements}).length,_=h3o({trace:h.initialTrace,label:h.label,netLabelPlacements:this.input.netLabelPlacements,paddingBuffer:this.input.paddingBuffer,detourCount:h.detourCount});for(const f of _){const I=Qa(f),C={...h.initialTrace,tracePath:I};Jh({traces:[C],netLabels:this.input.netLabelPlacements}).length<m&&Math.abs(ZH(I)-ZH(p))<qvt&&I.length<p.length&&hj(this.input.netLabelPlacements,[h.initialTrace],[C])&&s.set(I.map(E=>`${E.x},${E.y}`).join(";"),I)}}const A=new Set(i.map(({label:h})=>`${h.globalConnNetId}:${h.netId}`)),c=ZH(o),l=[...s.values()].filter(h=>{const d={...n,tracePath:h},p=Jh({traces:[d],netLabels:this.input.netLabelPlacements}),m=p.every(({label:I})=>A.has(`${I.globalConnNetId}:${I.netId}`)),_=p.length<i.length,f=p.length===i.length&&ZH(h)<=c+qvt&&h.length<o.length;return m&&(_||f)&&hj(this.input.netLabelPlacements,[n],[d])&&!ON(h,this.obstacles)&&!nw(h,r)}),u=h=>Jh({traces:[{...n,tracePath:h}],netLabels:this.input.netLabelPlacements}).length;l.sort((h,d)=>{const p=u(h)-u(d);return p!==0?p:ZH(h)-ZH(d)||h.length-d.length});const g=l[0];g&&(this.outputTraces[e]={...n,tracePath:g},this.stats.simplifiedTraceCount=(this.stats.simplifiedTraceCount??0)+1)}getOutput(){return{traces:this.outputTraces,netLabelPlacements:this.input.netLabelPlacements}}visualize(){const t=zh(this.input.inputProblem);t.lines??=[];for(const e of this.outputTraces)t.lines.push({points:e.tracePath,strokeColor:"purple"});return t}},Xvt=t=>{if(!t.stubTracePath)return null;const e=1e-6;return{minX:Math.min(...t.stubTracePath.map(n=>n.x))-e,maxX:Math.max(...t.stubTracePath.map(n=>n.x))+e,minY:Math.min(...t.stubTracePath.map(n=>n.y))-e,maxY:Math.max(...t.stubTracePath.map(n=>n.y))+e}},awe=(t,e)=>{const n=e.map(i=>({globalConnNetId:i.globalConnNetId,netId:i.netId,pinIds:i.pinIds,mspConnectionPairIds:[],anchorPoint:i.anchorPoint,orientation:"y+",center:i.center,width:i.axis==="x"?i.width:i.height,height:i.axis==="x"?i.height:i.width})),o=e.flatMap(i=>{if(!i.stubTracePath)return[];const r=t.chips.find(A=>A.pins.some(c=>i.pinIds.includes(c.pinId))),s=r?.pins.find(A=>i.pinIds.includes(A.pinId));if(!r||!s)return[];const a=JSON.stringify(["inline-terminal",i.globalConnNetId,[...i.pinIds].sort()]);return[{mspPairId:a,mspConnectionPairIds:[a],globalConnNetId:i.globalConnNetId,dcConnNetId:i.globalConnNetId,pinIds:i.pinIds,pins:[{...s,chipId:r.chipId},{...s,...i.stubTracePath[1],chipId:r.chipId}],tracePath:i.stubTracePath}]});return{fixedLabels:n,terminalTraces:o}},xC=1e-6,iE=.05,UN=(t,e)=>t.slice(1).some((n,o)=>CC(t[o],n,e)),Zvt=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y)<xC,KN=(t,e,n)=>({...t,[e]:t[e]+n}),Awe=(t,e)=>t.slice(1).flatMap((n,o)=>e.slice(1).flatMap((i,r)=>{const s=V4(t[o],n,e[r],i);return s?[s]:[]}));function*ewt(t,e,n=[]){const o=[...e.inlineNetLabelPlacements,...n],{fixedLabels:i,terminalTraces:r}=awe(t,o),s=o.flatMap(l=>{const u=Xvt(l);return u?[{label:l,bounds:u}]:[]}),a=[...t.chips.map(l=>({minX:l.center.x-l.width/2,maxX:l.center.x+l.width/2,minY:l.center.y-l.height/2,maxY:l.center.y+l.height/2})),...(t.textBoxes??[]).map(l=>fB(l))],A=i.map(l=>({minX:l.center.x-l.width/2,maxX:l.center.x+l.width/2,minY:l.center.y-l.height/2,maxY:l.center.y+l.height/2})),c=[...t.chips.flatMap(l=>l.pins),...e.traces.flatMap(l=>l.pins)];for(const l of e.traces){const u=Qa(l.tracePath);for(let g=0;g<u.length-1;g++){const h=u[g],d=u[g+1],p=Math.abs(h.x-d.x)<xC?"x":"y",m=p==="x"?"y":"x";if(Math.abs(h[p]-d[p])>xC||Zvt(h,d))continue;const _=[...e.netLabelPlacements.filter(w=>w.globalConnNetId!==l.globalConnNetId).map(yp),...A,...s.filter(({label:w})=>!l.pinIds.some(M=>w.pinIds.includes(M))).map(({bounds:w})=>w)].filter(w=>CC(h,d,w));if(!_.length)continue;let f=Math.min(h[m],d[m]),I=Math.max(h[m],d[m]),C=!0;for(;C;){C=!1;for(const w of e.traces)if(w.globalConnNetId===l.globalConnNetId)for(let M=1;M<w.tracePath.length;M++){const k=w.tracePath[M-1],R=w.tracePath[M];if(Math.abs(k[p]-h[p])>xC||Math.abs(R[p]-h[p])>xC)continue;const F=Math.min(k[m],R[m]),O=Math.max(k[m],R[m]);O<f-xC||F>I+xC||((F<f||O>I)&&(C=!0),f=Math.min(f,F),I=Math.max(I,O))}}const y=w=>Math.abs(w[p]-h[p])<xC&&w[m]>=f-xC&&w[m]<=I+xC;if(c.some(y))continue;const x=p==="x"?"minX":"minY",E=p==="x"?"maxX":"maxY",B=Math.max(..._.map(w=>w[E]-w[x])),S=e.netLabelPlacements.filter(w=>w.globalConnNetId===l.globalConnNetId&&y(w.anchorPoint)).map(yp),Q=[...new Set(_.flatMap(w=>[w[x]-iE,w[E]+iE,...S.filter(M=>Dc(M,w)).flatMap(M=>[h[p]+w[x]-iE-M[E],h[p]+w[E]+iE-M[x]])]))].sort((w,M)=>Math.abs(w-h[p])-Math.abs(M-h[p]));for(const w of Q){const M=w-h[p];if(Math.abs(M)>B+2*iE)continue;const k=e.traces.map(Y=>Y.globalConnNetId!==l.globalConnNetId||!Y.tracePath.some(y)?Y:{...Y,tracePath:Y.tracePath.map(W=>y(W)?KN(W,p,M):W)}),R=k.filter((Y,W)=>Y!==e.traces[W]).map(Y=>Y.tracePath);let F=e.netLabelPlacements.map(Y=>Y.globalConnNetId!==l.globalConnNetId||!y(Y.anchorPoint)?Y:{...Y,anchorPoint:KN(Y.anchorPoint,p,M),center:KN(Y.center,p,M)}),O=!1;const U=F.flatMap((Y,W)=>Y!==e.netLabelPlacements[W]?[yp(Y)]:[]);for(const[Y,W]of F.entries()){if(W.globalConnNetId===l.globalConnNetId)continue;const te=yp(W),j=U.filter(ue=>Dc(ue,te)).map(ue=>ue[M>0?E:x]);if(R.some(ue=>UN(ue,te))&&!e.traces.some(ue=>ue.globalConnNetId===l.globalConnNetId&&UN(ue.tracePath,te))&&j.push(w),!j.length)continue;const J=k.findIndex(ue=>ue.globalConnNetId===W.globalConnNetId&&ue.pinIds.length===1&&ue.tracePath.length===3&&Zvt(ue.tracePath.at(-1),W.anchorPoint)),oe=k[J];if(!oe){const fe=new ewe({inputProblem:t,traces:[...k,...r],netLabelPlacements:F,fixedNetLabelPlacements:i,useRenderedLabelBounds:!0}).getNearbyValidPlacements(W,B+Math.max(W.width,W.height))[0];if(!fe){O=!0;break}F[Y]=fe;continue}const[ie,ne,le]=oe.tracePath;if(Math.abs(ne[p]-le[p])>xC||Math.abs(ie[m]-ne[m])>xC){O=!0;break}const ge=M>0?Math.max(...j)+iE-te[x]:Math.min(...j)-iE-te[E];if(Math.abs(ge)>B+te[E]-te[x]+2*iE){O=!0;break}const _e={...W,anchorPoint:KN(W.anchorPoint,p,ge),center:KN(W.center,p,ge)};F[Y]=_e,k[J]={...oe,tracePath:[ie,KN(ne,p,ge),_e.anchorPoint]}}if(!O){for(const[Y,W]of k.entries()){if(W.globalConnNetId===l.globalConnNetId||Qa(W.tracePath).length<=4||!R.some(j=>nw(j,[W])))continue;const te=YQt({inputProblem:t,traces:[...k,...r],targetMspConnectionPairId:W.mspPairId,allLabelPlacements:[...F,...i],mergedLabelNetIdMap:{},paddingBuffer:iE});Qa(te.tracePath).length<Qa(W.tracePath).length&&hj(F,[W],[te])&&(k[Y]=te)}for(const[Y,W]of k.entries()){const te=e.traces[Y];if(W===te)continue;const j=W.tracePath,J=te.tracePath;if(j.slice(1).some((le,ge)=>Math.abs(le.x-j[ge].x)>xC&&Math.abs(le.y-j[ge].y)>xC)){O=!0;break}const oe=(le,ge,_e,ue)=>(ge.x-le.x)*(ue.x-_e.x)+(ge.y-le.y)*(ue.y-_e.y);if(oe(J[0],J[1],j[0],j[1])<=xC||oe(J.at(-1),J.at(-2),j.at(-1),j.at(-2))<=xC){O=!0;break}const ie=e.traces.filter(le=>le!==te&&le.globalConnNetId===te.globalConnNetId).flatMap(le=>[...le.tracePath,...Awe(J,le.tracePath)]).filter(le=>jl(J,le)).map(le=>te.globalConnNetId===l.globalConnNetId&&y(le)?KN(le,p,M):le);if([...c.filter(le=>jl(J,le)),...ie].some(le=>!jl(j,le))||c.some(le=>{const ge={minX:le.x-iE,maxX:le.x+iE,minY:le.y-iE,maxY:le.y+iE};return UN(j,ge)&&!UN(J,ge)})||a.some(le=>UN(j,le)&&!UN(J,le))){O=!0;break}for(const le of[...k,...r]){if(le.mspPairId===W.mspPairId||le.globalConnNetId===W.globalConnNetId)continue;const ge=e.traces.find(_e=>_e.mspPairId===le.mspPairId)??le;if(nw(j,[le])||Awe(j,le.tracePath).length>Awe(J,ge.tracePath).length){O=!0;break}}if(O)break}if(!O){for(const[Y,W]of F.entries()){if(W===e.netLabelPlacements[Y])continue;const te=yp(W);if(a.some(j=>Dc(te,j))||A.some(j=>Dc(te,j))){O=!0;break}if(F.some((j,J)=>Y!==J&&Dc(te,yp(j)))){O=!0;break}if([...k,...r].some(j=>j.globalConnNetId!==W.globalConnNetId&&UN(j.tracePath,te))){O=!0;break}}O||(yield{...e,traces:k,netLabelPlacements:F})}}}}}}var eO=(t,e)=>{const n=[...t.pinIds].sort(),o=[...e.pinIds].sort();return t.globalConnNetId===e.globalConnNetId&&n.length===o.length&&n.every((i,r)=>i===o[r])},twt=(t,e)=>t.kind==="label-label"&&e.kind==="label-label"?eO(t.labels[0],e.labels[0])&&eO(t.labels[1],e.labels[1])||eO(t.labels[0],e.labels[1])&&eO(t.labels[1],e.labels[0]):t.kind!=="trace-label"||e.kind!=="trace-label"?!1:(t.trace.kind==="routed"&&e.trace.kind==="routed"?t.trace.id===e.trace.id:t.trace.kind==="terminal"&&e.trace.kind==="terminal"&&eO(t.trace.label,e.trace.label))&&t.target===e.target&&eO(t.label,e.label),nwt=t=>{const e=[...t.netLabelPlacements,...t.inlineNetLabelPlacements].map(r=>({label:r,bounds:"axis"in r?{minX:r.center.x-(r.axis==="x"?r.width:r.height)/2,maxX:r.center.x+(r.axis==="x"?r.width:r.height)/2,minY:r.center.y-(r.axis==="x"?r.height:r.width)/2,maxY:r.center.y+(r.axis==="x"?r.height:r.width)/2}:yp(r)})),n=[],o=r=>{n.some(s=>twt(r,s))||n.push(r)};for(let r=0;r<e.length;r++)for(const s of e.slice(r+1))Dc(e[r].bounds,s.bounds)&&o({kind:"label-label",labels:[e[r].label,s.label]});const i=[...t.traces.map(r=>({...r,identity:{kind:"routed",id:r.mspPairId}})),...t.inlineNetLabelPlacements.flatMap(r=>r.stubTracePath?[{identity:{kind:"terminal",label:r},globalConnNetId:r.globalConnNetId,tracePath:r.stubTracePath}]:[])];for(const r of i)for(const{label:s,bounds:a}of e)("axis"in s||s.globalConnNetId!==r.globalConnNetId)&&r.tracePath.slice(1).some((A,c)=>CC(r.tracePath[c],A,a))&&o({kind:"trace-label",trace:r.identity,label:s,target:"text"});for(const r of t.inlineNetLabelPlacements){const s=Xvt(r);if(s)for(const a of t.traces)a.pinIds.some(A=>r.pinIds.includes(A))||a.tracePath.slice(1).some((A,c)=>CC(a.tracePath[c],A,s))&&o({kind:"trace-label",trace:{kind:"routed",id:a.mspPairId},label:r,target:"terminal"})}return n},cwe=(t,e)=>t.pinIds.length>0&&t.pinIds.every(n=>e.some(o=>o.globalConnNetId===t.globalConnNetId&&o.pinIds.includes(n))),p3o=t=>{const[e,n]=t;return Math.abs(n.x-e.x)>=Math.abs(n.y-e.y)?n.x>=e.x?"x+":"x-":n.y>=e.y?"y+":"y-"},m3o=t=>{const[e,n]=t;return Math.abs(n.x-e.x)+Math.abs(n.y-e.y)},zle=t=>{const e=t.axis==="y",n=e?t.height:t.width,o=e?t.width:t.height;return{minX:t.center.x-n/2,maxX:t.center.x+n/2,minY:t.center.y-o/2,maxY:t.center.y+o/2}},owt=t=>({minX:Math.min(...t.map(e=>e.x)),maxX:Math.max(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxY:Math.max(...t.map(e=>e.y))}),yj=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=owt([t[n],t[n+1]]);if(Dc(o,e))return!0}return!1},_3o=(t,e,n)=>{const[o]=t.stubTracePath,i=e==="x+"?{x:o.x+n,y:o.y}:e==="x-"?{x:o.x-n,y:o.y}:e==="y+"?{x:o.x,y:o.y+n}:{x:o.x,y:o.y-n},r={x:(o.x+i.x)/2,y:(o.y+i.y)/2};return{...t,stubTracePath:[o,i],anchorPoint:r,center:t.center}},f3o=({placements:t,inputProblem:e,traces:n,netLabelPlacements:o})=>{const i=new Map;for(const A of e.chips)for(const c of A.pins)i.set(c.pinId,A.chipId);const r=new Map;for(const[A,c]of t.entries()){if(!c.stubTracePath||c.pinIds.length!==1)continue;const l=p3o(c.stubTracePath);if(!l)continue;const u=i.get(c.pinIds[0]),g=`${u??c.pinIds[0]}::${l}`,h=r.get(g)??[];h.push({placementIndex:A,placement:c,direction:l,ownerChipId:u}),r.set(g,h)}const s=[...t],a=o.filter(A=>!cwe(A,t)).map(zle);for(const A of r.values()){if(A.length<2)continue;const c=Math.max(...A.map(({placement:d})=>m3o(d.stubTracePath))),l=A.map(({placement:d,direction:p})=>_3o(d,p,c)),u=new Set(A.map(({placementIndex:d})=>d)),g=t.filter((d,p)=>!u.has(p));if(!l.some((d,p)=>{const m=zle(d),_=d.stubTracePath,f=owt(_),I=A[p].ownerChipId;for(const C of e.chips){const y={minX:C.center.x-C.width/2,maxX:C.center.x+C.width/2,minY:C.center.y-C.height/2,maxY:C.center.y+C.height/2};if(Dc(m,y)||C.chipId!==I&&Dc(f,y))return!0}for(const C of e.textBoxes??[]){const y=fB(C);if(Dc(m,y)||Dc(f,y))return!0}for(const C of n)if(C.globalConnNetId!==d.globalConnNetId&&(yj(C.tracePath,m)||yj(C.tracePath,f)))return!0;if(a.some(C=>Dc(m,C)||Dc(f,C)))return!0;for(const C of g){const y=zle(C);if(Dc(m,y)||Dc(f,y)||C.stubTracePath&&(yj(C.stubTracePath,m)||yj(_,y)))return!0}for(const[C,y]of l.entries()){if(C===p)continue;const x=zle(y);if(Dc(m,x)||yj(_,x))return!0}return!1}))for(const[d,{placementIndex:p}]of A.entries())s[p]=l[d]}return s},iwt=(t,e=1e-6)=>{const n=[];let o=null,i=null,r=0;const s=a=>{if(o&&i){const A=Math.abs(i==="x"?a.x-o.x:a.y-o.y);A>e&&n.push({start:o,end:a,axis:i,length:A})}o=null,i=null,r=0};for(let a=0;a<t.length-1;a++){const A=t[a],c=t[a+1],l=c.x-A.x,u=c.y-A.y;if(Math.abs(l)<=e&&Math.abs(u)<=e)continue;const g=Math.abs(u)<=e?"x":Math.abs(l)<=e?"y":null;if(!g){s(A);continue}const h=Math.sign(g==="x"?l:u);o&&i===g&&r===h||(s(A),o=A,i=g,r=h)}return t.length>=2&&s(t[t.length-1]),n.sort((a,A)=>A.length-a.length)},q5=.05,X5=1e-6,I3o=.01,rwt=5,C3o=t=>{const e=t.axis==="y"?t.height:t.width,n=t.axis==="y"?t.width:t.height;return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},xj=(t,e)=>Math.abs(t.x-e.x)<=X5&&Math.abs(t.y-e.y)<=X5,Ej=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1],r={minX:Math.min(o.x,i.x),maxX:Math.max(o.x,i.x),minY:Math.min(o.y,i.y),maxY:Math.max(o.y,i.y)};if(Dc(r,e))return!0}return!1},y3o=(t,e)=>{for(let n=0;n<e.length-1;n++){const o=e[n],i=e[n+1],r=Math.min(o.x,i.x)-X5,s=Math.max(o.x,i.x)+X5,a=Math.min(o.y,i.y)-X5,A=Math.max(o.y,i.y)+X5,c=Math.abs(o.y-i.y)<=X5,l=Math.abs(o.x-i.x)<=X5;if((c&&Math.abs(t.y-o.y)<=X5||l&&Math.abs(t.x-o.x)<=X5)&&t.x>=r&&t.x<=s&&t.y>=a&&t.y<=A)return!0}return!1},x3o=(t,e)=>{let n=0;for(let o=0;o<e.length;o++){const i=yp(Jle(t,t.orientation,n)),r=t.orientation==="x-"||t.orientation==="x+",s=e.filter(a=>Dc(i,{minX:a.minX-(r?q5:0),maxX:a.maxX+(r?q5:0),minY:a.minY-(r?0:q5),maxY:a.maxY+(r?0:q5)}));if(s.length===0)break;switch(t.orientation){case"x-":n+=i.maxX-Math.min(...s.map(a=>a.minX))+q5;break;case"x+":n+=Math.max(...s.map(a=>a.maxX))-i.minX+q5;break;case"y-":n+=i.maxY-Math.min(...s.map(a=>a.minY))+q5;break;case"y+":n+=Math.max(...s.map(a=>a.maxY))-i.minY+q5;break}}return n},Jle=(t,e,n)=>{const o=sm(e);return{...t,anchorPoint:{x:t.anchorPoint.x+o.x*n,y:t.anchorPoint.y+o.y*n},center:{x:t.center.x+o.x*n,y:t.center.y+o.y*n}}},E3o=(t,e,n)=>{switch(n){case"x-":return t.maxX-e.minX+q5;case"x+":return e.maxX-t.minX+q5;case"y-":return t.maxY-e.minY+q5;case"y+":return e.maxY-t.minY+q5}},B3o=(t,e,n)=>n==="x-"||n==="x+"?Math.max(0,t.minY-e.maxY,e.minY-t.maxY):Math.max(0,t.minX-e.maxX,e.minX-t.maxX),swt=(t,e,n)=>t.pinIds.some(o=>e.has(n.get(o)??"")),awt=(t,e,n)=>e.findIndex(o=>{if(o.globalConnNetId!==t.globalConnNetId||!n.has(o.mspPairId))return!1;const i=o.tracePath[0],r=o.tracePath.at(-1);return!!(i&&xj(i,t.anchorPoint)||r&&xj(r,t.anchorPoint))}),Awt=(t,e,n)=>t.pinIds.some(o=>{const i=n[o];return i&&xj(i,t.anchorPoint)})?!0:e.some(o=>o.globalConnNetId===t.globalConnNetId&&y3o(t.anchorPoint,o.tracePath)),b3o=(t,e,n)=>{const o=t.tracePath.map(i=>({...i}));return xj(o[0],e)&&(o[0]=n),xj(o.at(-1),e)&&(o[o.length-1]=n),{...t,tracePath:o}},S3o=({label:t,labelIndex:e,newAnchor:n,pinMap:o})=>{const i=`inline-net-label-clearance-${e}-${t.netId??t.globalConnNetId}`;return{mspPairId:i,dcConnNetId:t.dcConnNetId??t.globalConnNetId,globalConnNetId:t.globalConnNetId,userNetId:t.netId,pins:Vve(t,o),tracePath:[t.anchorPoint,n],mspConnectionPairIds:[i],pinIds:t.pinIds}},Q3o=({triggerIndex:t,labels:e,chipIdByPinId:n})=>{const o=e[t],i=new Set(o.pinIds.flatMap(A=>{const c=n.get(A);return c?[c]:[]})),r=e.map((A,c)=>({label:A,labelIndex:c})).filter(({label:A})=>A.orientation===o.orientation&&A.mspConnectionPairIds.length===0&&swt(A,i,n)),s=new Set([t]);let a=!0;for(;a;){a=!1;for(const{label:A,labelIndex:c}of r)s.has(c)||[...s].some(l=>B3o(yp(e[l]),yp(A),o.orientation)<=I3o)&&(s.add(c),a=!0)}return{group:s,ownerChipIds:i}},v3o=({inputProblem:t,traces:e,netLabelPlacements:n,inlineNetLabelPlacements:o,netLabelConnectorTraceIds:i=new Set})=>{const r=new Set(i),s=e.map(g=>({...g,tracePath:g.tracePath.map(h=>({...h}))})),a=n.map(g=>({...g})),A=o.map(C3o),c=Kve(t),l=new Map;for(const g of t.chips)for(const h of g.pins)l.set(h.pinId,g.chipId);const u=new Set;for(let g=0;g<a.length;g++){const h=a[g],d=x3o(h,A);if(d<=X5||d>rwt)continue;const{group:p,ownerChipIds:m}=Q3o({triggerIndex:g,labels:a,chipIdByPinId:l}),_=new Map([...p].map(x=>[x,d]));let f=!1;for(let x=0;x<a.length;x++){let E=!1;for(const[B,S]of _){const Q=yp(Jle(a[B],h.orientation,S));for(let w=0;w<a.length;w++){if(p.has(w))continue;const M=a[w],k=_.get(w)??0,R=yp(Jle(M,h.orientation,k));if(!Dc(Q,R))continue;if(!swt(M,m,l)||awt(M,s,r)===-1&&!Awt(M,s,c)){f=!0;break}const F=E3o(yp(M),Q,h.orientation);if(F>rwt||F<=k+X5){f=!0;break}_.set(w,F),E=!0}if(f)break}if(f||!E)break}if(f)continue;const I=new Map;for(const[x,E]of _)I.set(x,Jle(a[x],h.orientation,E));const C=x=>I.get(x)??a[x];for(const[x,E]of I){const B=yp(E);if(A.some(S=>Dc(B,S))){f=!0;break}if(t.chips.some(S=>Dc(B,{minX:S.center.x-S.width/2,maxX:S.center.x+S.width/2,minY:S.center.y-S.height/2,maxY:S.center.y+S.height/2}))||(t.textBoxes??[]).some(S=>Dc(B,fB(S)))){f=!0;break}if(a.some((S,Q)=>Q!==x&&Dc(B,yp(C(Q))))){f=!0;break}if(s.some(S=>S.globalConnNetId!==E.globalConnNetId&&Ej(S.tracePath,B))){f=!0;break}}if(f)continue;const y=[];for(const[x,E]of I){const B=a[x],S=awt(B,s,r);if(S===-1&&!Awt(B,s,c)){f=!0;break}const Q=S===-1?S3o({label:B,labelIndex:x,newAnchor:E.anchorPoint,pinMap:c}):b3o(s[S],B.anchorPoint,E.anchorPoint);if(s.some(M=>M.globalConnNetId!==Q.globalConnNetId&&WH(Q.tracePath,M.tracePath,{includeTerminalSegments:!0}).length>0)||A.some(M=>Ej(Q.tracePath,M))||t.chips.some(M=>!m.has(M.chipId)&&Ej(Q.tracePath,{minX:M.center.x-M.width/2,maxX:M.center.x+M.width/2,minY:M.center.y-M.height/2,maxY:M.center.y+M.height/2}))||(t.textBoxes??[]).some(M=>Ej(Q.tracePath,fB(M)))||a.some((M,k)=>k!==x&&Ej(Q.tracePath,yp(C(k))))){f=!0;break}y.push({labelIndex:x,connectorIndex:S,trace:Q})}if(!f){for(const[x,E]of I)a[x]=E,u.add(x);for(const x of y)r.add(x.trace.mspPairId),x.connectorIndex===-1?s.push(x.trace):s[x.connectorIndex]=x.trace}}return{traces:s,netLabelPlacements:a,movedLabelCount:u.size,netLabelConnectorTraceIds:r}},Wle=.05,w3o=5,P3o=t=>{const[e,n]=t;return Math.abs(n.x-e.x)>=Math.abs(n.y-e.y)?n.x>=e.x?"x+":"x-":n.y>=e.y?"y+":"y-"},lwe=t=>{const e=t.axis==="y"?t.height:t.width,n=t.axis==="y"?t.width:t.height;return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},cwt=t=>({minX:Math.min(...t.map(e=>e.x)),maxX:Math.max(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxY:Math.max(...t.map(e=>e.y))}),VN=(t,e)=>{for(let n=0;n<t.length-1;n++)if(Dc(cwt([t[n],t[n+1]]),e))return!0;return!1},uwe=(t,e,n)=>{switch(e){case"x+":return{x:t.x+n,y:t.y};case"x-":return{x:t.x-n,y:t.y};case"y+":return{x:t.x,y:t.y+n};case"y-":return{x:t.x,y:t.y-n}}},lwt=(t,e,n)=>{const[o,i]=t.stubTracePath,r=uwe(i,e,n);return{...t,stubTracePath:[o,r],anchorPoint:uwe(t.anchorPoint,e,n),center:uwe(t.center,e,n)}},M3o=(t,e,n)=>{switch(n){case"x+":return e.maxX-t.minX+Wle;case"x-":return t.maxX-e.minX+Wle;case"y+":return e.maxY-t.minY+Wle;case"y-":return t.maxY-e.minY+Wle}},D3o=({inputProblem:t,traces:e,anchoredNetLabelPlacements:n,inlineNetLabelPlacements:o})=>{const i=new Map;for(const A of t.chips)for(const c of A.pins)i.set(c.pinId,A.chipId);const r=new Map;for(const[A,c]of o.entries()){if(!c.stubTracePath||c.pinIds.length!==1)continue;const l=P3o(c.stubTracePath),u=i.get(c.pinIds[0]),g=`${u??c.pinIds[0]}::${l}`,h=r.get(g)??[];h.push({placementIndex:A,placement:c,direction:l,ownerChipId:u}),r.set(g,h)}const s=[...o];let a=0;for(const A of r.values()){const c=new Set(A.map(({placementIndex:p})=>p)),l=s.filter((p,m)=>!c.has(m)),u=A[0].direction;let g=0;for(let p=0;p<=n.length;p++){let m=0;for(const{placement:_}of A){const f=lwt(_,u,g),I=lwe(f);for(const C of n){if(C.globalConnNetId===_.globalConnNetId)continue;const y=yp(C);Dc(I,y)&&(m=Math.max(m,M3o(I,y,u)))}}if(m<=0)break;g+=m}if(g<=0||g>w3o)continue;const h=A.map(({placement:p})=>lwt(p,u,g));if(!h.some((p,m)=>{const f=A[m].placement.stubTracePath[1],I=p.stubTracePath[1],C=[f,I],y=lwe(p),x=A[m].ownerChipId;if(n.some(E=>{if(E.globalConnNetId===p.globalConnNetId)return!1;const B=yp(E);return Dc(y,B)||VN(C,B)}))return!0;for(const E of t.chips){if(E.chipId===x)continue;const B={minX:E.center.x-E.width/2,maxX:E.center.x+E.width/2,minY:E.center.y-E.height/2,maxY:E.center.y+E.height/2};if(Dc(y,B)||VN(C,B))return!0}for(const E of t.textBoxes??[]){const B=fB(E);if(Dc(y,B)||VN(C,B))return!0}for(const E of e)if(E.globalConnNetId!==p.globalConnNetId&&(VN(E.tracePath,y)||VN(E.tracePath,cwt(C))))return!0;for(const E of l){const B=lwe(E);if(Dc(y,B)||VN(C,B)||E.stubTracePath&&VN(E.stubTracePath,y))return!0}return!1})){for(const[p,{placementIndex:m}]of A.entries())s[m]=h[p];a++}}return{inlineNetLabelPlacements:s,movedGroupCount:a}},gwe=(t,e)=>{let n=e.width,o=e.height;"axis"in e&&e.axis==="y"&&(n=e.height,o=e.width);const i=Ey({center:e.center,width:n,height:o});for(let r=0;r<t.length-1;r++)if(Exe(t[r],t[r+1],i))return!0;return!1},dwe=1e-6,uwt=t=>t.slice(1).reduce((e,n,o)=>{const i=t[o];return e+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),N3o=(t,e)=>t.length===e.length&&t.every((n,o)=>Math.abs(n.x-e[o].x)<=dwe&&Math.abs(n.y-e[o].y)<=dwe),R3o=(t,e)=>t.length<e.length&&uwt(t)<=uwt(e)+dwe,gwt=(t,e)=>{const n=new Set;for(let o=0;o<t.length-1;o++)for(let i=0;i<e.length-1;i++){const r=V4(t[o],t[o+1],e[i],e[i+1]);r&&n.add(`${r.x.toFixed(6)},${r.y.toFixed(6)}`)}return n},dwt=(t,e,n)=>n.some(o=>{const i=gwt(e,o);return[...gwt(t,o)].some(s=>!i.has(s))}),T3o=({inputProblem:t,traces:e,netLabelPlacements:n,inlineNetLabelPlacements:o,completedReroutes:i})=>{const r=[...e],s=new Set(o.map(c=>c.globalConnNetId)),a=Hy(t);let A=0;for(const c of[...i].reverse()){if(!s.has(c.label.globalConnNetId))continue;const l=r.findIndex(I=>I.mspPairId===c.initialTrace.mspPairId);if(l<0)continue;const u=r[l],g=Qa(u.tracePath),h=Qa(c.reroutedTracePath);if(!N3o(g,h))continue;const d=Qa(c.initialTrace.tracePath);if(!R3o(d,g))continue;const p={...u,tracePath:d},m=r.filter(I=>I.mspPairId!==u.mspPairId&&I.globalConnNetId!==u.globalConnNetId),_=o.filter(I=>I.globalConnNetId!==u.globalConnNetId),f=_.flatMap(I=>I.stubTracePath?[[...I.stubTracePath]]:[]);ON(d,a)||Jh({traces:[p],netLabels:n}).length>0||_.some(I=>gwe(d,I))||nw(d,m)||wQt(d,f)||dwt(d,g,m.map(I=>I.tracePath))||dwt(d,g,f)||!hj(n,[u],[p])||(r[l]=p,A++)}return{traces:r,restoredTraceCount:A}},hwe=.18,pwe=.05,jle=.05,k3o=.4,hwt=t=>JSON.stringify([...t].sort()),pwt=t=>{let e=0;for(let n=0;n<t.tracePath.length-1;n++){const o=t.tracePath[n],i=t.tracePath[n+1];e+=Math.abs(i.x-o.x)+Math.abs(i.y-o.y)}return e},F3o=(t,e)=>t.size===e.size&&[...t].every(n=>e.has(n)),mwe=t=>{const e=t.axis==="y"?t.height:t.width,n=t.axis==="y"?t.width:t.height;return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},V7=t=>JSON.stringify([t.globalConnNetId,[...t.pinIds].sort(),t.mspPairId??null]),L3o=(t,e)=>{const n=jle-Qx,o={minX:Math.min(t[0].x,t[1].x)-n,maxX:Math.max(t[0].x,t[1].x)+n,minY:Math.min(t[0].y,t[1].y)-n,maxY:Math.max(t[0].y,t[1].y)+n};return tO(e.tracePath,o)},H3o=class E5n extends Ng{constructor(e){super(),this.input=e,this.netLabelConnectorTraceIds=e.netLabelConnectorTraceIds??new Set,this.inputProblem=e.inputProblem,this.traces=e.traces,this.inputNetLabelPlacements=e.netLabelPlacements,this.completedReroutes=e.completedReroutes??[],this.globalConnMap=mB(this.inputProblem).netConnMap,this.queuedConnections=[...this.inputProblem.directConnections.filter(n=>n.allowInlineNetLabel&&n.netId&&!this.inputProblem.netConnections.some(o=>o.allowInlineNetLabel&&o.netId&&n.pinIds.every(i=>o.pinIds.includes(i)))).map(n=>({kind:"direct_connection",connection:n})),...this.inputProblem.netConnections.filter(n=>n.allowInlineNetLabel&&n.pinIds.length>=1&&n.netId).map(n=>({kind:"net_connection",connection:n}))],this.tracesByPinPairKey=new Map;for(const n of this.traces){if(this.netLabelConnectorTraceIds.has(n.mspPairId))continue;const o=hwt(n.pins.map(r=>r.pinId)),i=this.tracesByPinPairKey.get(o);i?i.push(n):this.tracesByPinPairKey.set(o,[n])}}input;inputProblem;traces;inputNetLabelPlacements;completedReroutes;inlineNetLabelPlacements=[];queuedConnections;netLabelConnectorTraceIds;tracesByPinPairKey;globalConnMap;inlineConversions=[];hasAlignedPortOnlyStubs=!1;postProcessedOutput;refinementComplete=!1;refinement;currentProposal;getConstructorParams(){return[{inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.inputNetLabelPlacements,completedReroutes:this.completedReroutes,resolveTraceCollisions:this.input.resolveTraceCollisions,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds}]}_step(){const e=this.queuedConnections.shift();if(e){if(e.kind==="net_connection"&&e.connection.pinIds.length>2){const i=[e.connection,...this.queuedConnections.filter(r=>r.kind==="net_connection"&&r.connection.pinIds.length>2).map(r=>r.connection)];this.queuedConnections=this.queuedConnections.filter(r=>r.kind!=="net_connection"||r.connection.pinIds.length<=2);for(const r of this.computeNetConnectionInlineConversions(i))this.inlineNetLabelPlacements.push(...r.placements),this.inlineConversions.push(r);return}const{connection:n}=e,o=n.pinIds.length===2?this.tracesByPinPairKey.get(hwt(n.pinIds))??[]:[];if(o.length>0){const i=this.computeInlinePlacement({connection:n,trace:o[0],pinIds:n.pinIds});i&&this.inlineNetLabelPlacements.push(i)}else for(const i of n.pinIds){const r=this.computeTerminalInlinePlacement(n,i);r&&this.inlineNetLabelPlacements.push(r)}return}if(!this.hasAlignedPortOnlyStubs){this.inlineNetLabelPlacements=f3o({placements:this.inlineNetLabelPlacements,inputProblem:this.inputProblem,traces:this.traces,netLabelPlacements:this.inputNetLabelPlacements}),this.hasAlignedPortOnlyStubs=!0;return}if(!this.postProcessedOutput){this.postProcessedOutput=this.buildPostProcessedOutput();return}if(this.input.resolveTraceCollisions&&!this.refinementComplete){this.stepTraceRefinement();return}this.solved=!0,this.stats.inlineNetLabelCount=this.inlineNetLabelPlacements.length}computeNetConnectionInlineConversions(e){const n=new Map;for(const i of e){const r=new Set;for(const s of this.getNetConnectionComponents(i)){if(s.traces.length===0)continue;if(!s.traces.some(A=>!!this.computeInlinePlacement({connection:i,trace:A,pinIds:s.pinIds})))for(const A of s.traces)r.add(A.mspPairId)}n.set(i,r)}let o=new Set([...n.values()].flatMap(i=>[...i]));for(;;){const i=e.map(s=>({connection:s,conversion:this.computeNetConnectionInlinePlacements(s,o,n.get(s)??new Set)})),r=new Set(i.flatMap(({conversion:s})=>s.flatMap(a=>[...a.supersededTraceIds])));if(F3o(o,r))return i.flatMap(({conversion:s})=>s);o=r}}getNetConnectionComponents(e){const n=e.pinIds[0];if(!n)return[];const o=this.globalConnMap.getNetConnectedToId(n);if(!o)return[];const i=new Set(this.inputProblem.chips.flatMap(a=>a.pins.map(A=>A.pinId))),r=this.globalConnMap.getIdsConnectedToNet(o).filter(a=>i.has(a)),s=new Set(e.pinIds);return xle({pinIds:r,traces:this.traces.filter(a=>!this.netLabelConnectorTraceIds.has(a.mspPairId))}).map(a=>({pinIds:a.pinIds,labeledPinIds:a.pinIds.filter(A=>s.has(A)),traces:a.traces.sort((A,c)=>pwt(c)-pwt(A))})).filter(a=>a.labeledPinIds.length>0)}getGlobalConnNetId(e){const n=e.pinIds[0];if(!n)return;const o=new Set(e.pinIds);return this.traces.find(i=>i.pins.some(r=>o.has(r.pinId)))?.globalConnNetId??this.inputNetLabelPlacements.find(i=>i.netId===e.netId)?.globalConnNetId??this.globalConnMap.getNetConnectedToId(n)??void 0}computeNetConnectionInlinePlacements(e,n,o){const i=this.getNetConnectionComponents(e),r=this.getGlobalConnNetId(e);if(!r)return[];const s=[];for(const a of i){const A=a.traces.some(u=>o.has(u.mspPairId));let c=null;if(!A){for(const u of a.traces)if(c=this.computeInlinePlacement({connection:e,trace:u,pinIds:a.pinIds,ignoredTraceIds:n}),c)break}if(c){s.push({globalConnNetId:r,placements:[c],supersededTraceIds:new Set});continue}if(a.traces.length>0&&!A||a.labeledPinIds.length!==a.pinIds.length)continue;const l=a.pinIds.map(u=>this.computeTerminalInlinePlacement(e,u,r,n));l.some(u=>u===null)||s.push({globalConnNetId:r,placements:l,supersededTraceIds:new Set(a.traces.map(u=>u.mspPairId))})}return s}getInlineOffsets(e,n,o,i,r,s,a){const A=r/2+pwe,c=n==="x"?"y":"x",l=o==="x+"||o==="y+"?1:-1;let u=1/0;for(const g of s)if(!a.has(g.mspPairId))for(const h of iwt(g.tracePath)){if(h.axis!==n||Math.max(h.start[n],h.end[n])<=e[n]-i/2||Math.min(h.start[n],h.end[n])>=e[n]+i/2)continue;const d=l*(h.start[c]-e[c]);d>Qx&&(u=Math.min(u,d))}return u>r+Qx&&u/2<A-Qx?[A,u/2]:[A]}computeTerminalInlinePlacement(e,n,o,i=new Set,r){if(!e.netId)return null;const s=this.inputNetLabelPlacements.find(y=>y.netId===e.netId&&y.pinIds.length===1&&y.pinIds[0]===n),a=o??s?.globalConnNetId;if(!a)return null;const A=this.inputProblem.chips.find(y=>y.pins.some(x=>x.pinId===n)),c=A?.pins.find(y=>y.pinId===n),l=e.inlineNetLabelHeight??hwe,u=e.netLabelText?.trim()||void 0,g=e.inlineNetLabelWidth??e.netLabelWidth??_wt(u??e.netId,l),h=Math.max(g+.2,.6);if(!c&&!s)return null;const d=c?{x:c.x,y:c.y}:s.anchorPoint,p=c&&A?c._facingDirection??W5(c,A):s.orientation,m=p==="x+"?{x:d.x+h,y:d.y}:p==="x-"?{x:d.x-h,y:d.y}:p==="y+"?{x:d.x,y:d.y+h}:{x:d.x,y:d.y-h},_=G3o({start:d,intendedEnd:m,minimumLength:g+2*pwe,traces:r?.traces??this.traces,ownGlobalConnNetId:a,ignoredTraceIds:i});if(!_)return null;const f=p==="x+"||p==="x-"?"x":"y",I={x:(d.x+_.x)/2,y:(d.y+_.y)/2},C=f==="x"?["y+","y-"]:["x-","x+"];for(const y of C)for(const x of this.getInlineOffsets(I,f,y,g,l,r?.traces??this.traces,i)){const E=y==="y+"?{x:I.x,y:I.y+x}:y==="y-"?{x:I.x,y:I.y-x}:y==="x-"?{x:I.x-x,y:I.y}:{x:I.x+x,y:I.y},B=g/2,S=l/2,Q=f==="x"?{minX:E.x-B,maxX:E.x+B,minY:E.y-S,maxY:E.y+S}:{minX:E.x-S,maxX:E.x+S,minY:E.y-B,maxY:E.y+B};if(!this.isObstructed(Q,{ownGlobalConnNetId:a,ignoredTraceIds:i,obstacles:r}))return{globalConnNetId:a,netId:e.netId,netLabelText:u,pinIds:[n],stubTracePath:[d,_],axis:f,anchorPoint:I,center:E,width:g,height:l,side:y}}return null}computeInlinePlacement({connection:e,trace:n,pinIds:o,ignoredTraceIds:i=new Set}){const r=iwt(n.tracePath);if(r.length===0)return null;const s=e.inlineNetLabelHeight??hwe,a=e.netLabelText?.trim()||void 0,A=e.inlineNetLabelWidth??e.netLabelWidth??_wt(a??e.netId,s),c=s/2+pwe,l=r.filter(g=>g.length>=A).sort((g,h)=>h.length-g.length);for(const g of l){const h=g.axis==="x"?["y+","y-"]:["x-","x+"];for(const d of h)for(const p of O3o(g,A))for(const m of this.getInlineOffsets(p,g.axis,d,A,s,this.traces,i)){const _=d==="y+"?{x:p.x,y:p.y+m}:d==="y-"?{x:p.x,y:p.y-m}:d==="x-"?{x:p.x-m,y:p.y}:{x:p.x+m,y:p.y},f=A/2,I=s/2,C=g.axis==="x"?{minX:_.x-f,maxX:_.x+f,minY:_.y-I,maxY:_.y+I}:{minX:_.x-I,maxX:_.x+I,minY:_.y-f,maxY:_.y+f};if(!this.isObstructed(C,{ownTrace:n,ownGlobalConnNetId:n.globalConnNetId,ignoredTraceIds:i}))return{globalConnNetId:n.globalConnNetId,netId:e.netId,netLabelText:a,mspPairId:n.mspPairId,pinIds:[...o],axis:g.axis,anchorPoint:p,center:_,width:A,height:s,side:d}}}const u=this.computeSpanPlacement({trace:n,connection:e,netLabelText:a,width:A,height:s,offset:c,pinIds:o,ignoredTraceIds:i});return u||null}computeSpanPlacement({trace:e,connection:n,netLabelText:o,width:i,height:r,offset:s,pinIds:a,ignoredTraceIds:A}){const c=e.tracePath;if(c.length<2)return null;let l=1/0,u=-1/0,g=1/0,h=-1/0;for(const S of c)l=Math.min(l,S.x),u=Math.max(u,S.x),g=Math.min(g,S.y),h=Math.max(h,S.y);const d=u-l,p=h-g,m=d>=p?"x":"y",_=m==="x"?d:p;if((m==="x"?p:d)>k3o||_<i)return null;const y=((m==="x"?l:g)+(m==="x"?u:h))/2,x=(_-i)/2,E=[0];for(let S=.1;S<=x+1e-9;S+=.1)E.push(S,-S);E.push(x,-x);const B=m==="x"?["y+","y-"]:["x-","x+"];for(const S of B)for(const Q of E){const w=y+Q,M=S==="y+"?{x:w,y:h+s}:S==="y-"?{x:w,y:g-s}:S==="x-"?{x:l-s,y:w}:{x:u+s,y:w},k=i/2,R=r/2,F=m==="x"?{minX:M.x-k,maxX:M.x+k,minY:M.y-R,maxY:M.y+R}:{minX:M.x-R,maxX:M.x+R,minY:M.y-k,maxY:M.y+k};if(this.isObstructed(F,{ownTrace:e,ownGlobalConnNetId:e.globalConnNetId,ignoredTraceIds:A}))continue;const O=m==="x"?{x:w,y:S==="y+"?h:g}:{x:S==="x-"?l:u,y:w};return{globalConnNetId:e.globalConnNetId,netId:n.netId,netLabelText:o,mspPairId:e.mspPairId,pinIds:[...a],axis:m,anchorPoint:O,center:M,width:i,height:r,side:S}}return null}isObstructed(e,{ownTrace:n,ownGlobalConnNetId:o,ignoredTraceIds:i=new Set,obstacles:r}){for(const s of this.inputProblem.chips){const a={minX:s.center.x-s.width/2,maxX:s.center.x+s.width/2,minY:s.center.y-s.height/2,maxY:s.center.y+s.height/2};if(Dc(e,a))return!0}for(const s of this.inputProblem.textBoxes??[])if(Dc(e,fB(s)))return!0;for(const s of r?.traces??this.traces)if(!i.has(s.mspPairId)&&!(n&&s.mspPairId===n.mspPairId)&&s.globalConnNetId!==o&&tO(s.tracePath,e))return!0;return!!(r?.anchored.some(s=>Dc(e,yp(s)))||r?.inline.some(s=>Dc(e,mwe(s))||s.stubTracePath&&s.globalConnNetId!==o&&tO(s.stubTracePath,e)))}getOutputTraces(e){const n=new Set(e.map(V7)),o=new Set(this.inlineConversions.filter(i=>i.placements.every(r=>n.has(V7(r)))).flatMap(i=>[...i.supersededTraceIds]));return this.traces.filter(i=>!o.has(i.mspPairId)&&!(this.netLabelConnectorTraceIds.has(i.mspPairId)&&cwe(i,e)))}getBlockedInlinePlacements({inlineNetLabelPlacements:e,anchoredNetLabelPlacements:n,traces:o}){const i=new Set;for(const r of e){const s=mwe(r),a=n.some(u=>{const g=yp(u);return Dc(s,g)||r.stubTracePath&&tO(r.stubTracePath,g)}),A=o.some(u=>u.globalConnNetId!==r.globalConnNetId&&(tO(u.tracePath,s)||r.stubTracePath&&L3o(r.stubTracePath,u))),c=e.some(u=>u!==r&&u.globalConnNetId!==r.globalConnNetId&&u.stubTracePath&&tO(u.stubTracePath,s)),l=e.some(u=>u!==r&&Dc(s,mwe(u)));(a||A||c||l)&&i.add(V7(r))}for(const r of this.inlineConversions)if(r.placements.some(s=>i.has(V7(s))))for(const s of r.placements)i.add(V7(s));return i}buildPostProcessedOutput(){let e=this.inlineNetLabelPlacements;for(;;){const n=this.inputNetLabelPlacements.filter(c=>!cwe(c,e)),o=this.getOutputTraces(e),{fixedLabels:i,terminalTraces:r}=awe(this.inputProblem,e),s=new ewe({inputProblem:this.inputProblem,traces:[...o,...r],netLabelPlacements:n,fixedNetLabelPlacements:i,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds,useRenderedLabelBounds:e.length>0});e.length>0&&s.solve();const a=v3o({inputProblem:this.inputProblem,traces:o,netLabelPlacements:s.solved&&!s.failed?s.getOutput().netLabelPlacements:n,inlineNetLabelPlacements:e,netLabelConnectorTraceIds:this.netLabelConnectorTraceIds});let A=this.getBlockedInlinePlacements({inlineNetLabelPlacements:e,anchoredNetLabelPlacements:a.netLabelPlacements,traces:a.traces});if(A.size>0){const c=D3o({inputProblem:this.inputProblem,traces:a.traces,anchoredNetLabelPlacements:a.netLabelPlacements,inlineNetLabelPlacements:e});if(c.movedGroupCount>0){e=c.inlineNetLabelPlacements;continue}const{terminalTraces:l}=awe(this.inputProblem,e),u=e.filter(d=>!d.stubTracePath),g=e.filter(d=>d.stubTracePath).sort((d,p)=>Number(A.has(V7(p)))-Number(A.has(V7(d))));for(const d of g){const p=[...this.inputProblem.netConnections,...this.inputProblem.directConnections].find(_=>_.netId===d.netId&&_.allowInlineNetLabel),m=p?this.computeTerminalInlinePlacement(p,d.pinIds[0],d.globalConnNetId,new Set,{traces:[...a.traces,...l],anchored:a.netLabelPlacements,inline:u}):null;u.push(m??d)}const h=new Map(u.map(d=>[V7(d),d]));e=e.map(d=>h.get(V7(d))??d),A=this.getBlockedInlinePlacements({inlineNetLabelPlacements:e,anchoredNetLabelPlacements:a.netLabelPlacements,traces:a.traces})}if(A.size===0){this.inlineNetLabelPlacements=e,this.stats.pushedAnchoredNetLabelCount=a.movedLabelCount;const c=T3o({inputProblem:this.inputProblem,traces:a.traces,netLabelPlacements:a.netLabelPlacements,inlineNetLabelPlacements:e,completedReroutes:this.completedReroutes});this.stats.restoredSupersededLabelRerouteCount=c.restoredTraceCount;const l={traces:c.traces,netLabelConnectorTraceIds:a.netLabelConnectorTraceIds,netLabelPlacements:a.netLabelPlacements,inlineNetLabelPlacements:e};return this.inlineNetLabelPlacements=l.inlineNetLabelPlacements,l}e=e.filter(c=>!A.has(V7(c)))}}*getTraceRefinementProposals(e){yield*ewt(this.inputProblem,e);for(const n of e.netLabelPlacements){if(n.pinIds.length!==1)continue;const o=[...this.inputProblem.netConnections,...this.inputProblem.directConnections].find(r=>r.allowInlineNetLabel&&r.netId===n.netId&&r.pinIds.includes(n.pinIds[0]));if(!o)continue;const i=this.computeTerminalInlinePlacement(o,n.pinIds[0],n.globalConnNetId,new Set,{traces:[],anchored:[],inline:[]});i&&(yield*ewt(this.inputProblem,e,[i]))}}createRefinementCandidate(e){const n=new Map(e.traces.map(s=>[s.mspPairId,s])),o=s=>JSON.stringify([s.globalConnNetId,[...s.pinIds].sort()]),i=new Map(e.netLabelPlacements.map(s=>[o(s),s])),r=new Set(this.traces.map(s=>s.mspPairId));return new E5n({inputProblem:this.inputProblem,traces:[...this.traces.map(s=>n.get(s.mspPairId)??s),...e.traces.filter(s=>!r.has(s.mspPairId))],netLabelPlacements:this.inputNetLabelPlacements.map(s=>i.get(o(s))??s),completedReroutes:this.completedReroutes,netLabelConnectorTraceIds:e.netLabelConnectorTraceIds})}acceptRefinementCandidate(e,n){const o=this.postProcessedOutput,i=this.refinement.before,r=nwt(n);if(r.some(a=>!i.some(A=>twt(a,A))))return!1;const s=new Set(e.traces.filter((a,A)=>a!==o.traces[A]).map(a=>a.mspPairId));return r.some(a=>a.kind==="trace-label"&&a.trace.kind==="routed"&&s.has(a.trace.id))||r.length>=i.length&&n.inlineNetLabelPlacements.length<=o.inlineNetLabelPlacements.length?!1:(this.postProcessedOutput=n,this.inlineNetLabelPlacements=n.inlineNetLabelPlacements,!0)}stepTraceRefinement(){if(this.activeSubSolver){if(this.activeSubSolver.step(),!this.activeSubSolver.solved&&!this.activeSubSolver.failed)return;this.activeSubSolver.solved&&!this.activeSubSolver.failed&&this.acceptRefinementCandidate(this.currentProposal,this.activeSubSolver.getOutput())&&(this.refinement=void 0),this.activeSubSolver=null,this.currentProposal=void 0;return}const e=this.postProcessedOutput;this.refinement||(this.refinement={proposals:this.getTraceRefinementProposals(e),queue:[],collecting:!0,before:nwt(e)});const n=this.refinement;if(n.collecting){const i=n.proposals.next();if(i.done)n.queue.sort((r,s)=>r.distance-s.distance),n.collecting=!1;else{const r=i.value.traces.reduce((s,a,A)=>s+a.tracePath.reduce((c,l,u)=>{const g=e.traces[A].tracePath[u];return c+Math.abs(l.x-g.x)+Math.abs(l.y-g.y)},0),0);n.queue.push({output:i.value,distance:r})}return}const o=n.queue.shift();if(!o){this.refinementComplete=!0;return}this.currentProposal=o.output,this.activeSubSolver=this.createRefinementCandidate(o.output)}getOutput(){return this.postProcessedOutput?this.postProcessedOutput:this.buildPostProcessedOutput()}visualize(){return mwt({inputProblem:this.inputProblem,...this.getOutput()})}},mwt=({inputProblem:t,traces:e,netLabelPlacements:n,inlineNetLabelPlacements:o})=>{const i=zh(t);i.lines??=[],i.rects??=[],i.points??=[],i.texts??=[];for(const r of e)i.lines.push({points:r.tracePath,strokeColor:"purple"});for(const r of n)i.rects.push({center:r.center,width:r.width,height:r.height,fill:Mc(r.globalConnNetId,.35),strokeColor:Mc(r.globalConnNetId,.9),label:`netId: ${r.netId}
globalConnNetId: ${r.globalConnNetId}`}),i.points.push({x:r.anchorPoint.x,y:r.anchorPoint.y,color:Mc(r.globalConnNetId,.9),label:`anchorPoint
orientation: ${r.orientation}`});for(const r of o){r.stubTracePath&&i.lines.push({points:r.stubTracePath,strokeColor:"purple"});const s=r.axis==="x";let a=r.width,A=r.height;s||(a=r.height,A=r.width),i.rects.push({center:r.center,width:a,height:A,fill:Mc(r.globalConnNetId,.35),strokeColor:"green",label:[`INLINE netId: ${r.netId}`,`axis: ${r.axis}`,`side: ${r.side}`].join(`
`)});let c=r.center.x,l=r.center.y,u="center",g;if(r.stubTracePath){const h=r.stubTracePath[0],d=r.stubTracePath[1];let p=r.width/2;d[r.axis]>h[r.axis]?(p=-r.width/2,u="center_left"):u="center_right",r.axis==="x"?c+=p:l+=p}r.axis==="y"&&(g=90),i.texts.push({x:c,y:l,text:r.netLabelText??r.netId??"",color:"green",fontSize:r.height,anchorSide:u,rotation:g}),i.points.push({x:r.anchorPoint.x,y:r.anchorPoint.y,color:"green",label:`inline anchor
${r.netLabelText??r.netId}`})}return i},_wt=(t,e=hwe)=>{const n=e/.18;return t.length*.12*n+.12*n},O3o=(t,e,n=.1)=>{const o=t.axis==="x"?"x":"y",i=t.start[o],r=t.end[o],s=(i+r)/2,a=Math.sign(r-i)||1,A=u=>t.axis==="x"?{x:u,y:t.start.y}:{x:t.start.x,y:t.start.y+(u-i)},c=t.length-e;if(c<=0)return[A(s)];const l=[0];for(let u=n;u<=c/2+1e-9;u+=n)l.push(u,-u);return l.push(c/2,-c/2),l.map(u=>A(s+u*a))},tO=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1],r={minX:Math.min(o.x,i.x),maxX:Math.max(o.x,i.x),minY:Math.min(o.y,i.y),maxY:Math.max(o.y,i.y)};if(Dc(r,e))return!0}return!1},Qx=1e-6,G3o=({start:t,intendedEnd:e,minimumLength:n,traces:o,ownGlobalConnNetId:i,ignoredTraceIds:r})=>{const s=Math.abs(e.x-t.x)>=Math.abs(e.y-t.y),a=s?"x":"y",A=s?"y":"x",c=Math.sign(e[a]-t[a])||1,l=Math.abs(e[a]-t[a]);let u=l;for(const g of o)if(!r.has(g.mspPairId)&&g.globalConnNetId!==i)for(let h=0;h<g.tracePath.length-1;h++){const d=g.tracePath[h],p=g.tracePath[h+1],m=(d[a]-t[a])*c,_=(p[a]-t[a])*c,f=d[A]-t[A],I=p[A]-t[A],C=Math.min(m,_),y=Math.max(m,_),x=Math.min(f,I),E=Math.max(f,I);let B;if(Math.abs(f)<=Qx&&Math.abs(I)<=Qx&&y>=-Qx&&C<=l+jle+Qx)B=Math.max(0,C);else{const Q=x<=Qx&&E>=-Qx,w=(m+_)/2;Q&&Math.abs(m-_)<=Qx&&w>=-Qx&&w<=l+jle+Qx&&(B=Math.max(0,w))}B!==void 0&&(u=Math.min(u,B-jle))}return u+Qx<n?null:s?{x:t.x+c*u,y:t.y}:{x:t.x,y:t.y+c*u}},nO=1e-6,fwt=({coordinate:t,segmentStartCoordinate:e,segmentEndCoordinate:n})=>t>Math.min(e,n)+nO&&t<Math.max(e,n)-nO,Y3o=({firstSegmentStart:t,firstSegmentEnd:e,secondSegmentStart:n,secondSegmentEnd:o})=>{const i=Math.abs(t.y-e.y)<=nO,r=Math.abs(t.x-e.x)<=nO,s=Math.abs(n.y-o.y)<=nO,a=Math.abs(n.x-o.x)<=nO;let A,c;if(i)A=t,c=e;else if(s)A=n,c=o;else return!1;let l,u;if(r)l=t,u=e;else if(a)l=n,u=o;else return!1;return fwt({coordinate:l.x,segmentStartCoordinate:A.x,segmentEndCoordinate:c.x})&&fwt({coordinate:A.y,segmentStartCoordinate:l.y,segmentEndCoordinate:u.y})},Iwt=(t,e)=>{for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];for(const r of e)for(let s=0;s<r.tracePath.length-1;s++){const a=r.tracePath[s],A=r.tracePath[s+1];if(X1(o,i,a,A)&&!Y3o({firstSegmentStart:o,firstSegmentEnd:i,secondSegmentStart:a,secondSegmentEnd:A}))return!0}}return!1},U3o=t=>{const e={},n=new Map;for(const o of t.chips){e[o.chipId]=o;for(const i of o.pins)n.set(i.pinId,{...i,chipId:o.chipId,_facingDirection:i._facingDirection??W5(i,o)})}return{chipMap:e,pinMap:n}},Bj=1e-9,$le=(t,e)=>Math.abs(t.y-e.y)<Bj,qle=(t,e)=>Math.abs(t.x-e.x)<Bj,K3o=t=>t.filter((e,n)=>{const o=t[n-1];return!o||Math.abs(e.x-o.x)>=Bj||Math.abs(e.y-o.y)>=Bj}),V3o=t=>{if(t.length<2||!t.every((e,n)=>{const o=t[n+1];return o?$le(e,o)||qle(e,o):!0}))return!1;for(let e=0;e<t.length-1;e++)for(let n=e+2;n<t.length-1;n++)if($Qt(t[e],t[e+1],t[n],t[n+1]))return!1;return!0},z3o=t=>{const e=[];for(let n=2;n<=t.length-4;n++){const o=t[n-1],i=t[n],r=t[n+1],s=t[n+2],a=qle(i,r),A=$le(i,r);if(!a&&!A||a&&(!$le(o,i)||!$le(r,s))||A&&(!qle(o,i)||!qle(r,s)))continue;const c=a?[o.x,s.x]:[o.y,s.y];for(const l of c){if(Math.abs(l-(a?i.x:i.y))<Bj)continue;const u=t.map(h=>({...h}));a?(u[n].x=l,u[n+1].x=l):(u[n].y=l,u[n+1].y=l);const g=K3o(u);V3o(g)&&e.push(g)}}return e},Cwt=({tracePath:t,globalConnNetId:e,otherTraces:n})=>n.reduce((o,i)=>o+(i.globalConnNetId===e?0:vle(t,i.tracePath)),0),J3o=({tracePath:t,globalConnNetId:e,otherTraces:n,isCandidateValid:o})=>{let i=t,r=Cwt({tracePath:t,globalConnNetId:e,otherTraces:n}),s=U7(t);for(const a of z3o(t)){if(!o(a))continue;const A=Cwt({tracePath:a,globalConnNetId:e,otherTraces:n}),c=U7(a);(A<r||A===r&&c<s)&&(i=a,r=A,s=c)}return i},W3o="net-label-to-trace-",j3o=.05,ywt=.25,xwt=(t,e)=>[t,e].sort().join("--"),_we=(t,e)=>{const n=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y);return n>=o?o:n},$3o=(t,e)=>{if(t._facingDirection!==e._facingDirection)return!1;const n=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y);return n>=o?t._facingDirection==="x+"||t._facingDirection==="x-":t._facingDirection==="y+"||t._facingDirection==="y-"},q3o=class extends Ng{constructor(t){super(),this.input=t,this.inputProblem=t.inputProblem,this.outputTraces=[...t.traces],this.outputNetLabelPlacements=[...t.netLabelPlacements];const{chipMap:e,pinMap:n}=U3o(this.inputProblem);this.chipMap=e,this.pinMap=n,this.canRecoverParallelPair=DQt(this.inputProblem,mB(this.inputProblem).netConnMap,new Set(t.traces.filter(o=>o.pinIds.length>1).flatMap(o=>o.pinIds))),this.queuedCandidates=this.buildCandidatePairs(),this.stats.candidateCount=this.queuedCandidates.length,this.stats.recoveredTraceCount=0}input;inputProblem;outputTraces;outputNetLabelPlacements;recoveredTraceIds=new Set;chipMap;pinMap;canRecoverParallelPair;queuedCandidates;currentCandidate=null;getConstructorParams(){return[this.input]}isPortOnlyFallbackLabel(t,e){return!(t.pinIds.length!==1||t.mspConnectionPairIds.length!==0||!t.netId||e.has(t.globalConnNetId))}isDirectConnectionLabel(t){if(!t.netId||t.pinIds.length!==1)return!1;const e=t.pinIds[0];return this.inputProblem.directConnections.some(n=>n.netId===t.netId&&n.pinIds.includes(e))}getMultiPinNetConnection(t){if(!t.netId||t.pinIds.length!==1)return;const e=t.pinIds[0];return this.inputProblem.netConnections.find(n=>n.isGround===!1&&n.pinIds.length>2&&n.netId===t.netId&&n.pinIds.includes(e))}buildCandidatePairs(){const{netConnMap:t}=mB(this.inputProblem),e=new Set;for(const i of this.inputProblem.netConnections){if(!i.isGround)continue;const r=t.getNetConnectedToId(i.netId);r&&e.add(r)}const n=new Map;for(const i of this.input.netLabelPlacements){if(!this.isPortOnlyFallbackLabel(i,e)||!this.isDirectConnectionLabel(i)&&!this.getMultiPinNetConnection(i))continue;const r=n.get(i.globalConnNetId)??[];r.push(i),n.set(i.globalConnNetId,r)}const o=[];for(const i of n.values())for(let r=0;r<i.length;r++)for(let s=r+1;s<i.length;s++){const a=i[r],A=i[s],c=this.pinMap.get(a.pinIds[0]),l=this.pinMap.get(A.pinIds[0]);if(!c||!l||!this.canRecoverParallelPair(c,l))continue;const u=_we(c,l),g=this.isDirectConnectionLabel(a)&&this.isDirectConnectionLabel(A),h=this.getMultiPinNetConnection(a),d=this.getMultiPinNetConnection(A);!g&&(!h||h!==d||u>j3o)||Zv(this.inputProblem,c,l)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:this.pinMap,p1:c,p2:l})||o.push({firstLabel:a,secondLabel:A,pins:[c,l],perpendicularOffset:u,routeDistance:Math.abs(c.x-l.x)+Math.abs(c.y-l.y),key:xwt(c.pinId,l.pinId),recoveryMode:"fallback_labels"})}return o.push(...this.buildRoutedComponentCandidates(e)),o.sort((i,r)=>i.perpendicularOffset-r.perpendicularOffset||i.routeDistance-r.routeDistance||i.key.localeCompare(r.key)),o}buildRoutedComponentCandidates(t){const{netConnMap:e}=mB(this.inputProblem),n=[],o=new Set(this.inputProblem.directConnections);for(const i of[...this.inputProblem.netConnections.filter(r=>r.pinIds.length>2&&r.isGround===!1),...this.inputProblem.directConnections]){const r=o.has(i),s=e.getNetConnectedToId(i.pinIds[0]);if(!s||r&&t.has(s))continue;let a=i.pinIds;r&&(a=[...this.pinMap.keys()].filter(c=>e.getNetConnectedToId(c)===s));const A=xle({pinIds:a,traces:this.outputTraces.filter(c=>c.globalConnNetId===s)}).filter(c=>c.traces.length>0);for(let c=0;c<A.length;c++)for(let l=c+1;l<A.length;l++){const u=A[c],g=A[l];if(r&&!(u.pinIds.includes(i.pinIds[0])&&g.pinIds.includes(i.pinIds[1])||u.pinIds.includes(i.pinIds[1])&&g.pinIds.includes(i.pinIds[0])))continue;const h=this.input.netLabelPlacements.find(f=>f.globalConnNetId===s&&f.mspConnectionPairIds.length>0&&f.pinIds.some(I=>u.pinIds.includes(I))),d=this.input.netLabelPlacements.find(f=>f.globalConnNetId===s&&f.mspConnectionPairIds.length>0&&f.pinIds.some(I=>g.pinIds.includes(I)));if(!h||!d||h===d||_we(h.anchorPoint,d.anchorPoint)>ywt)continue;let p,m=u.pinIds,_=g.pinIds;r&&(m=i.pinIds.filter(f=>u.pinIds.includes(f)),_=i.pinIds.filter(f=>g.pinIds.includes(f)));for(const f of m)for(const I of _){const C=this.pinMap.get(f),y=this.pinMap.get(I);if(!C||!y||!this.canRecoverParallelPair(C,y)||r&&C.chipId===y.chipId)continue;const x=_we(C,y);if(x>ywt||$3o(C,y)||Zv(this.inputProblem,C,y)||lj({inputProblem:this.inputProblem,chipMap:this.chipMap,pinIdMap:this.pinMap,p1:C,p2:y}))continue;const E=Math.abs(C.x-y.x)+Math.abs(C.y-y.y);let B="routed_components";r&&(B="routed_direct_connection");const S={firstLabel:h,secondLabel:d,pins:[C,y],perpendicularOffset:x,routeDistance:E,key:xwt(C.pinId,y.pinId),recoveryMode:B,netConnectionPinIds:a};(!p||S.routeDistance<p.routeDistance||S.routeDistance===p.routeDistance&&(S.perpendicularOffset<p.perpendicularOffset||S.perpendicularOffset===p.perpendicularOffset&&S.key.localeCompare(p.key)<0))&&(p=S)}p&&n.push(p)}}return n}isSupersededConnectorTrace(t,e){return!this.input.netLabelConnectorTraceIds?.has(t.mspPairId)||t.pinIds.length!==1?!1:e.pins.some(n=>n.pinId===t.pinIds[0])}routeIntersectsRemainingLabels(t,e){for(const n of this.outputNetLabelPlacements)if(!(n===e.firstLabel||n===e.secondLabel)&&gwe(t,n))return!0;return this.input.inlineNetLabelPlacements.some(n=>gwe(t,n))}tryAcceptCurrentRoute(){const t=this.currentCandidate;let e=this.activeSubSolver?.solvedTracePath;if(!t||!e)return;const n=this.outputTraces.filter(A=>!this.isSupersededConnectorTrace(A,t));let o=n;if(t.recoveryMode!=="fallback_labels"&&(o=n.filter(A=>A.globalConnNetId!==t.firstLabel.globalConnNetId)),Iwt(e,o)||this.routeIntersectsRemainingLabels(e,t))return;e=J3o({tracePath:e,globalConnNetId:t.firstLabel.globalConnNetId,otherTraces:o,isCandidateValid:A=>HN(A,this.activeSubSolver.obstacles)===null&&!Iwt(A,o)&&!this.routeIntersectsRemainingLabels(A,t)});const[i,r]=t.pins,s=`${W3o}${t.key}`,a={mspPairId:s,dcConnNetId:t.firstLabel.globalConnNetId,globalConnNetId:t.firstLabel.globalConnNetId,pins:[i,r],tracePath:e,mspConnectionPairIds:[s],pinIds:[i.pinId,r.pinId]};this.recoveredTraceIds.add(s),this.outputTraces=[...n,a],t.recoveryMode!=="routed_components"&&(this.outputNetLabelPlacements=this.outputNetLabelPlacements.filter(A=>A!==t.firstLabel&&A!==t.secondLabel)),this.stats.recoveredTraceCount++}areCandidatePinsAlreadyConnected(t){return t.netConnectionPinIds?xle({pinIds:t.netConnectionPinIds,traces:this.outputTraces}).some(e=>e.pinIds.includes(t.pins[0].pinId)&&e.pinIds.includes(t.pins[1].pinId)):!1}_step(){if(this.activeSubSolver){this.activeSubSolver.step(),this.activeSubSolver.solved?(this.tryAcceptCurrentRoute(),this.activeSubSolver=null,this.currentCandidate=null):this.activeSubSolver.failed&&(this.activeSubSolver=null,this.currentCandidate=null);return}let t=this.queuedCandidates.shift();for(;t&&(!this.outputNetLabelPlacements.includes(t.firstLabel)||!this.outputNetLabelPlacements.includes(t.secondLabel)||this.areCandidatePinsAlreadyConnected(t));)t=this.queuedCandidates.shift();if(!t){this.solved=!0;return}this.currentCandidate=t,this.activeSubSolver=new VH({inputProblem:this.inputProblem,pins:t.pins,chipMap:this.chipMap})}getOutput(){return{traces:this.outputTraces,netLabelPlacements:this.outputNetLabelPlacements,inlineNetLabelPlacements:this.input.inlineNetLabelPlacements}}visualize(){if(this.activeSubSolver)return this.activeSubSolver.visualize();const t=mwt({inputProblem:this.inputProblem,...this.getOutput()});for(const e of this.outputTraces)this.recoveredTraceIds.has(e.mspPairId)&&t.lines.push({points:e.tracePath,strokeColor:"green",label:`recovered from net labels: ${e.pinIds.join(" -> ")}`});return t}};function sh(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved,shouldSkip:o.shouldSkip}}var Ewt=class extends Ng{getSolverName(){return"SchematicTracePipelineSolver"}mspConnectionPairSolver;schematicTraceLinesSolver;longDistancePairSolver;unroutedTraceRecoverySolver;traceOverlapShiftSolver;netLabelPlacementSolver;labelMergingSolver;traceLabelOverlapAvoidanceSolver;traceCleanupSolver;example28Solver;availableNetOrientationSolver;postLabelTraceOverlapShiftSolver;railNetLabelCornerPlacementSolver;traceAnchoredNetLabelOverlapSolver;preAlignmentNetLabelTraceCollisionSolver;netLabelTraceCollisionSolver;traceCleanupSolver2;netLabelNetLabelCollisionSolver;traceElbowTransitionSimplificationSolver;preAlignmentTraceElbowTransitionSimplificationSolver;finalTraceElbowTransitionSimplificationSolver;sameNetJunctionAlignmentSolver;inlineNetLabelSolver;netLabelToTraceSolver;startTimeOfPhase;endTimeOfPhase;timeSpentOnPhase;firstIterationOfPhase;inputProblem;hideRatsNet;pipelineDef=[sh("mspConnectionPairSolver",VIo,()=>[{inputProblem:this.inputProblem}],{onSolved:t=>{}}),sh("schematicTraceLinesSolver",iCo,()=>[{mspConnectionPairs:this.mspConnectionPairSolver.mspConnectionPairs,dcConnMap:this.mspConnectionPairSolver.dcConnMap,globalConnMap:this.mspConnectionPairSolver.globalConnMap,inputProblem:this.inputProblem,chipMap:this.mspConnectionPairSolver.chipMap}]),sh("longDistancePairSolver",FCo,t=>[{inputProblem:t.inputProblem,primaryMspConnectionPairs:t.mspConnectionPairSolver.mspConnectionPairs,alreadySolvedTraces:t.schematicTraceLinesSolver.solvedTracePaths,failedConnectionPairs:t.schematicTraceLinesSolver.failedConnectionPairs}],{onSolved:t=>{}}),sh("unroutedTraceRecoverySolver",Fxo,t=>[{inputProblem:t.inputProblem,failedConnectionPairs:t.schematicTraceLinesSolver.failedConnectionPairs,alreadySolvedTraces:t.longDistancePairSolver.getOutput().allTracesMerged}]),sh("traceOverlapShiftSolver",CQt,()=>[{inputProblem:this.inputProblem,inputTracePaths:this.unroutedTraceRecoverySolver?.getOutput().allTracesMerged,globalConnMap:this.mspConnectionPairSolver.globalConnMap}],{onSolved:t=>{}}),sh("netLabelPlacementSolver",BQt,()=>[{inputProblem:this.inputProblem,inputTraceMap:this.traceOverlapShiftSolver?.correctedTraceMap??Object.fromEntries(this.unroutedTraceRecoverySolver.getOutput().allTracesMerged.map(t=>[t.mspPairId,t]))}],{onSolved:t=>{}}),sh("traceLabelOverlapAvoidanceSolver",wCo,t=>{const e=t.traceOverlapShiftSolver?.correctedTraceMap??Object.fromEntries(t.unroutedTraceRecoverySolver.getOutput().allTracesMerged.map(i=>[i.mspPairId,i])),n=Object.values(e),o=t.netLabelPlacementSolver.netLabelPlacements;return[{inputProblem:t.inputProblem,traces:n,netLabelPlacements:o}]}),sh("traceElbowTransitionSimplificationSolver",swe,t=>{const e=t.traceLabelOverlapAvoidanceSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,completedReroutes:e.completedReroutes,netLabelPlacements:t.traceLabelOverlapAvoidanceSolver.netLabelPlacements,paddingBuffer:.1}]}),sh("traceCleanupSolver",avt,t=>{const n=t.traceElbowTransitionSimplificationSolver.getOutput().traces,o=t.traceOverlapShiftSolver,i=new Set([...t.inputProblem.directConnections,...t.inputProblem.netConnections].filter(a=>a.allowInlineNetLabel).map(a=>a.netId)),r=new Set;for(let a=0;a<o.inputTracePaths.length;a++){const A=o.inputTracePaths[a],c=o.correctedTraceMap[A.mspPairId];for(let l=a+1;l<o.inputTracePaths.length;l++){const u=o.inputTracePaths[l];if(A.globalConnNetId===u.globalConnNetId||!i.has(A.userNetId??"")&&!i.has(u.userNetId??""))continue;const g=o.correctedTraceMap[u.mspPairId],h=WH(A.tracePath,u.tracePath).length;WH(c.tracePath,g.tracePath).length>h&&(r.add(A.mspPairId),r.add(u.mspPairId))}}const s=t.traceLabelOverlapAvoidanceSolver.labelMergingSolver.getOutput();return[{inputProblem:t.inputProblem,allTraces:n,allLabelPlacements:s.netLabelPlacements,mergedLabelNetIdMap:s.mergedLabelNetIdMap,paddingBuffer:.1,eligibleTraceIds:r}]}),sh("netLabelPlacementSolver",BQt,t=>{const e=t.traceCleanupSolver?.getOutput().traces??t.traceLabelOverlapAvoidanceSolver.getOutput().traces;return[{inputProblem:t.inputProblem,inputTraceMap:Object.fromEntries(e.map(n=>[n.mspPairId,n]))}]}),sh("example28Solver",A2o,t=>{const e=t.traceCleanupSolver?.getOutput().traces??t.traceLabelOverlapAvoidanceSolver.getOutput().traces;return[{inputProblem:t.inputProblem,traces:e,netLabelPlacements:t.netLabelPlacementSolver.netLabelPlacements}]}),sh("availableNetOrientationSolver",E2o,t=>[{inputProblem:t.inputProblem,traces:t.example28Solver.outputTraces,netLabelPlacements:t.example28Solver.outputNetLabelPlacements}]),sh("postLabelTraceOverlapShiftSolver",CQt,t=>[{inputProblem:t.inputProblem,inputTracePaths:t.availableNetOrientationSolver.traces,globalConnMap:t.mspConnectionPairSolver.globalConnMap,traceIdsToShift:new Set(t.availableNetOrientationSolver.netLabelConnectorTraceIds)}]),sh("railNetLabelCornerPlacementSolver",M2o,t=>[{inputProblem:t.inputProblem,traces:Object.values(t.postLabelTraceOverlapShiftSolver.correctedTraceMap),netLabelPlacements:t.availableNetOrientationSolver.outputNetLabelPlacements}]),sh("traceAnchoredNetLabelOverlapSolver",pxo,t=>[{inputProblem:t.inputProblem,traces:t.railNetLabelCornerPlacementSolver.getOutput().traces,netLabelPlacements:t.railNetLabelCornerPlacementSolver.outputNetLabelPlacements}]),sh("preAlignmentNetLabelTraceCollisionSolver",Nvt,t=>[{inputProblem:t.inputProblem,traces:t.railNetLabelCornerPlacementSolver.getOutput().traces,netLabelPlacements:t.traceAnchoredNetLabelOverlapSolver.outputNetLabelPlacements}]),sh("preAlignmentTraceElbowTransitionSimplificationSolver",swe,t=>{const e=t.preAlignmentNetLabelTraceCollisionSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,completedReroutes:e.completedReroutes,netLabelPlacements:e.netLabelPlacements,paddingBuffer:.1}]}),sh("traceCleanupSolver2",avt,t=>{const e=t.preAlignmentTraceElbowTransitionSimplificationSolver.getOutput(),n=t.traceLabelOverlapAvoidanceSolver.labelMergingSolver.getOutput();return[{inputProblem:t.inputProblem,allTraces:e.traces,allLabelPlacements:e.netLabelPlacements,mergedLabelNetIdMap:n.mergedLabelNetIdMap,paddingBuffer:.1,operations:["rerouting_generated_net_label_connector_crossings","aligning_same_net_rails"],eligibleTraceIds:new Set(t.traceCleanupSolver.getOutput().traces.map(o=>o.mspPairId)),netLabelConnectorTraceIds:t.availableNetOrientationSolver.netLabelConnectorTraceIds}]}),sh("netLabelTraceCollisionSolver",Nvt,t=>{const e=t.preAlignmentNetLabelTraceCollisionSolver.getOutput(),n=t.traceCleanupSolver2.getOutput(),o=kyo({originalTraces:e.traces,reroutedTraces:n.traces,netLabelPlacements:e.netLabelPlacements}),i=new Map(e.traces.map(s=>[s.mspPairId,s]));let r=o.netLabelPlacements;for(const s of o.traces){const a=i.get(s.mspPairId);if(!a||a.tracePath===s.tracePath)continue;const A=r;r=jH({trace:a,originalTracePath:a.tracePath,reroutedTracePath:s.tracePath,netLabelPlacements:A}).map((l,u)=>{const g=A[u];return g.orientation==="y+"||g.orientation==="y-"?l:g})}return[{inputProblem:t.inputProblem,traces:o.traces,netLabelPlacements:r}]}),sh("finalTraceElbowTransitionSimplificationSolver",swe,t=>{const e=t.netLabelTraceCollisionSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,completedReroutes:e.completedReroutes,netLabelPlacements:e.netLabelPlacements,paddingBuffer:.1}]}),sh("netLabelNetLabelCollisionSolver",ewe,t=>{const e=t.finalTraceElbowTransitionSimplificationSolver.getOutput();return[{inputProblem:t.inputProblem,traces:e.traces,netLabelPlacements:e.netLabelPlacements}]}),sh("sameNetJunctionAlignmentSolver",u3o,t=>{const e=t.netLabelNetLabelCollisionSolver.getOutput();return[{inputProblem:t.inputProblem,traces:t.netLabelNetLabelCollisionSolver.traces,netLabelPlacements:e.netLabelPlacements,netLabelConnectorTraceIds:t.availableNetOrientationSolver.netLabelConnectorTraceIds}]}),sh("inlineNetLabelSolver",H3o,t=>{const e=t.sameNetJunctionAlignmentSolver.getOutput(),n=[...t.traceLabelOverlapAvoidanceSolver.getOutput().completedReroutes,...t.preAlignmentNetLabelTraceCollisionSolver.getOutput().completedReroutes,...t.netLabelTraceCollisionSolver.getOutput().completedReroutes];return[{inputProblem:t.inputProblem,traces:e.traces,netLabelPlacements:e.netLabelPlacements,completedReroutes:n,resolveTraceCollisions:!0,netLabelConnectorTraceIds:t.availableNetOrientationSolver.netLabelConnectorTraceIds}]}),sh("netLabelToTraceSolver",q3o,t=>{const e=t.inlineNetLabelSolver.getOutput();return[{inputProblem:t.inputProblem,...e}]})];constructor(t,e){super(),this.hideRatsNet=e?.hideRatsNet??!1,this.inputProblem=this.cloneAndCorrectInputProblem(t),this.MAX_ITERATIONS=1e6,this.startTimeOfPhase={},this.endTimeOfPhase={},this.timeSpentOnPhase={},this.firstIterationOfPhase={}}getConstructorParams(){return[this.inputProblem,{hideRatsNet:this.hideRatsNet}]}currentPipelineStepIndex=0;cloneAndCorrectInputProblem(t){const e=structuredClone({...t,_chipObstacleSpatialIndex:void 0,_hideRatsNet:this.hideRatsNet});return MCo(e),PCo(e),e}_step(){const t=this.pipelineDef[this.currentPipelineStepIndex];if(!t){this.solved=!0;return}if(this.activeSubSolver){this.activeSubSolver.step(),this.activeSubSolver.solved?(this.endTimeOfPhase[t.solverName]=performance.now(),this.timeSpentOnPhase[t.solverName]=this.endTimeOfPhase[t.solverName]-this.startTimeOfPhase[t.solverName],t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStepIndex++):this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnPhase[t.solverName]=0,this.startTimeOfPhase[t.solverName]=performance.now(),this.firstIterationOfPhase[t.solverName]=this.iterations}solveUntilPhase(t){for(;this.getCurrentPhase().toLowerCase()!==t.toLowerCase();)this.step()}getCurrentPhase(){return this.pipelineDef[this.currentPipelineStepIndex]?.solverName??"none"}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();const t=[zh(this.inputProblem,{hideRatsNet:this.hideRatsNet}),...this.pipelineDef.map(n=>this[n.solverName]?.visualize()).filter(Boolean).map((n,o)=>{for(const i of n.rects??[])i.step=o;for(const i of n.points??[])i.step=o;for(const i of n.circles??[])i.step=o;for(const i of n.texts??[])i.step=o;for(const i of n.lines??[])i.step=o;return n})];if(t.length===1)return t[0];const e={points:t.flatMap(n=>n.points||[]),rects:t.flatMap(n=>n.rects||[]),lines:t.flatMap(n=>n.lines||[]),circles:t.flatMap(n=>n.circles||[]),texts:t.flatMap(n=>n.texts||[])};return dCo(e,this.inputProblem),e}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}},Bwt={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0},bwt=class{id;metadata;size={width:0,height:0};position={x:0,y:0};style;constructor(t={}){this.style={...Bwt,...t},this.id=t.id,this.metadata=t.metadata}},X3o=class extends bwt{build(){}},Swt=class Cit extends bwt{children=[];direction="row";columnGap=0;rowGap=0;justifyContent="flex-start";alignItems="stretch";constructor(e,n,o={}){super({}),this.size.width=e,this.size.height=n,this.id=o.id,Object.assign(this,o)}addChild(e,n){if(e instanceof Cit){const i=e;return n&&(i.style={...Bwt,...n}),this.children.push(i),i}const o=new X3o(e);return this.children.push(o),o}build(){const e=this.direction.startsWith("row"),n=e?"width":"height",o=e?"height":"width",i=e?this.columnGap:this.rowGap;e?this.rowGap:this.columnGap;const r=i*Math.max(0,this.children.length-1),s=this.size[n],a=this.size[o];let A=0,c=0,l=0;for(const C of this.children)A+=C.style.flexBasis,c+=C.style.flexGrow,l+=C.style.flexShrink;const u=s-A-r;for(const C of this.children){let y=C.style.flexBasis;u>0&&c>0?y+=u*C.style.flexGrow/c:u<0&&l>0&&(y+=u*C.style.flexShrink/l,y<0&&(y=0)),C.size[n]=y;const x=C.style.alignSelf!=="auto"?C.style.alignSelf:this.alignItems,E=e?C.style.height:C.style.width;E!==void 0?C.size[o]=E:x==="stretch"&&(C.size[o]=a)}const g=this.children.reduce((C,y)=>C+y.size[n],0)+r,h=s-g;let d=0,p=i;const m=this.children.length;switch(this.justifyContent){case"flex-start":break;case"flex-end":d=h;break;case"center":d=h/2;break;case"space-between":p=m>1?i+h/(m-1):0;break;case"space-around":p=i+h/m,d=p/2;break;case"space-evenly":p=i+h/(m+1),d=p;break}const _=this.direction.endsWith("reverse")?[...this.children].reverse():this.children;let f=d;for(const C of _)e?(C.position.x=this.direction==="row"?f:s-f-C.size.width,C.position.y=I(C,o,a,this.alignItems)):(C.position.y=this.direction==="column"?f:s-f-C.size.height,C.position.x=I(C,o,a,this.alignItems)),f+=C.size[n]+p;for(const C of this.children)C instanceof Cit&&C.build();function I(C,y,x,E){switch(C.style.alignSelf!=="auto"?C.style.alignSelf:E){case"flex-start":return 0;case"flex-end":return x-C.size[y];case"center":return(x-C.size[y])/2;default:return 0}}}},Qwt=class extends Swt{constructor(t,e,n={}){super(t,e,n)}getLayout(){this.build();const t={};return this._collectLayout(this,t),t}_collectLayout(t,e,n={counter:0}){for(const o of t.children){const i=o.id??`_$$${n.counter++}`;e[i]={position:o.position,size:o.size},o instanceof Swt&&this._collectLayout(o,e,n)}}},vwt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20].map(t=>`hsl(${t*360/21}deg, 100%, 50%)`),Z3o=t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n);return e},wwt=t=>vwt[Math.abs(Z3o(t))%vwt.length],eEo=t=>{const e=d=>d?typeof d=="string"?d:d.join(" "):void 0,n=["display:grid","background-color:gray"],{gridTemplateRows:o,gridTemplateColumns:i,gap:r,justifyItems:s,alignItems:a,containerWidth:A,containerHeight:c}=t.opts,l=e(o);l&&n.push(`grid-template-rows:${l}`);const u=e(i);if(u&&n.push(`grid-template-columns:${u}`),r!==void 0)if(typeof r=="number")n.push(`gap:${r}px`);else{const[d,p]=r;n.push(`row-gap:${d}px`,`column-gap:${p}px`)}s&&n.push(`justify-items:${s}`),a&&n.push(`align-items:${a}`),A!=null&&n.push(`width:${A}px`),c!=null&&n.push(`height:${c}px`);const g=n.join(";"),h=t.opts.children.map(d=>{const p=["display:flex",`background-color:${wwt(d.key)}`];if(d.area)p.push(`grid-area:${d.area}`);else{if(typeof d.row=="string"&&d.row.includes("/"))p.push(`grid-row:${d.row}`);else{const I=d.rowStart??d.row,C=d.rowEnd,y=d.rowSpan;I!==void 0||C!==void 0?I!==void 0&&C!==void 0?p.push(`grid-row:${I} / ${C}`):I!==void 0?y!==void 0?p.push(`grid-row:${I} / span ${y}`):p.push(`grid-row-start:${I}`):p.push(`grid-row-end:${C}`):y!==void 0&&p.push(`grid-row:auto / span ${y}`)}if(typeof d.column=="string"&&d.column.includes("/"))p.push(`grid-column:${d.column}`);else{const I=d.columnStart??d.column,C=d.columnEnd,y=d.columnSpan;I!==void 0||C!==void 0?I!==void 0&&C!==void 0?p.push(`grid-column:${I} / ${C}`):I!==void 0?y!==void 0?p.push(`grid-column:${I} / span ${y}`):p.push(`grid-column-start:${I}`):p.push(`grid-column-end:${C}`):y!==void 0&&p.push(`grid-column:auto / span ${y}`)}}const m=p.join(";"),_=["font-size: 7px"];if(d.contentWidth!==void 0){const I=typeof d.contentWidth=="string"?d.contentWidth:`${d.contentWidth}px`;_.push(`width:${I}`)}else _.push(`width:${d.key.length*5}px`);if(d.contentHeight!==void 0){const I=typeof d.contentHeight=="string"?d.contentHeight:`${d.contentHeight}px`;_.push(`height:${I}`)}const f=_.join(";");return`  <div id="${d.key}" style="${m}"><div style="${f}">${d.key}</div></div>`});return`<div style="${g}">
${h.join(`
`)}
</div>`},tEo=t=>{const e=t.layout(),n={title:"CssGrid",coordinateSystem:"screen",lines:[],circles:[],points:[],rects:[],texts:[]},{cells:o}=e;for(const i of o){const{x:r,y:s,width:a,height:A,key:c}=i;n.rects.push({center:{x:r+a/2,y:s+A/2},width:a,height:A,fill:wwt(c),label:c})}return n};function Xle(t){return t.replace(/repeat\((\d+),\s*([^)]+)\)/g,(e,n,o)=>Array(Number(n)).fill(o.trim()).join(" "))}function Zle(t){return t.trim().split(/\s+/).filter(Boolean)}function Pwt(t){return t?Zle(Xle(t)).length:0}function Mwt(t,e){if(t==="auto")return{fr:1};if(t.endsWith("%")){const o=parseFloat(t);return e!=null?e*o/100:0}if(t.endsWith("px"))return parseFloat(t);if(t.endsWith("em"))return parseFloat(t)*16;if(t.endsWith("fr"))return{fr:parseFloat(t)};const n=parseFloat(t);return Number.isNaN(n)?0:n}function Dwt(t,e){return t>0?t:e+2+t}var nEo=t=>{const e=t.opts,n=e.children;let o,i;if("gridTemplate"in e&&typeof e.gridTemplate=="string"){const[x,E]=e.gridTemplate.split("/");o=x?.trim(),i=E?.trim()}else o=typeof e.gridTemplateRows=="string"?e.gridTemplateRows:void 0,i=typeof e.gridTemplateColumns=="string"?e.gridTemplateColumns:void 0;const r=Pwt(i),s=Pwt(o);function a(x,E,B,S){if(!x)return 0;const Q=Xle(x),w=Zle(Q),M=w.length;let k=0;for(let F=0;F<w.length;F++){const O=w[F];if(O.endsWith("px"))k+=parseFloat(O);else if(O.endsWith("em"))k+=parseFloat(O)*16;else if(O.endsWith("fr")||O==="auto"){let U=0;for(const Y of E){const W=B?Y.columnStart||Y.column:Y.rowStart||Y.row,te=B?Y.columnSpan||1:Y.rowSpan||1,j=B?Y.contentWidth:Y.contentHeight,J=(typeof W=="number"?W:parseInt(W||"1"))-1,oe=typeof te=="number"?te:parseInt(te.toString());if(J<=F&&F<J+oe&&j){const ie=typeof j=="string"&&j.endsWith("px")?parseFloat(j):typeof j=="number"?j:0;U=Math.max(U,ie/oe)}}k+=U}}const R=S*(M-1);return k+R}function A(x,E,B,S=!0,Q=1){if(!x)return[];if(E==null){const j=Xle(x),J=Zle(j),oe=J.length,ie=ge=>ge===void 0?0:typeof ge=="number"?ge:(ge.endsWith("px"),parseFloat(ge)),ne=new Array(oe).fill(0);let le=0;for(const ge of n){const _e=S?typeof ge.columnSpan=="number"?ge.columnSpan:ge.columnSpan?parseInt(ge.columnSpan.toString()):1:typeof ge.rowSpan=="number"?ge.rowSpan:ge.rowSpan?parseInt(ge.rowSpan.toString()):1,ue=S?ge.contentWidth:ge.contentHeight,fe=ie(ue)/_e;let pe;S?(ge.columnStart!==void 0||ge.column!==void 0)&&(pe=parseInt(ge.columnStart??ge.column)-1):(ge.rowStart!==void 0||ge.row!==void 0)&&(pe=parseInt(ge.rowStart??ge.row)-1),(pe===void 0||Number.isNaN(pe))&&(S?pe=le%oe:pe=Math.floor(le/Q),le+=_e);for(let ye=0;ye<_e&&pe+ye<oe;ye++)ne[pe+ye]=Math.max(ne[pe+ye],fe)}return J.forEach((ge,_e)=>{const ue=Mwt(ge,void 0);typeof ue=="number"&&(ne[_e]=ue)}),ne}const w=Xle(x),M=Zle(w),k=M.length;let R=E;R==null&&(R=a(x,n,S,B));const F=R-B*(k-1);let O=0,U=0;const Y=[],W=[];M.forEach((j,J)=>{const oe=Mwt(j,F);typeof oe=="number"?(W.push(oe),O+=oe):oe&&typeof oe=="object"&&"fr"in oe?(W.push(oe),U+=oe.fr,Y.push({idx:J,fr:oe.fr})):(W.push(0),O+=0)});const te=Math.max(F-O,0);return W.map(j=>typeof j=="number"?j:U>0?te/U*j.fr:0)}const c=typeof e.gap=="number"?e.gap:Array.isArray(e.gap)?e.gap[0]:0,l=typeof e.gap=="number"?e.gap:Array.isArray(e.gap)?e.gap[1]:0,u=A(o,e.containerHeight,c,!1,r||1),g=A(i,e.containerWidth,l,!0,s||1),h=u.length;let d=g.length;d===0&&n.length>0&&(d=1);const p=[];let m=0;for(const x of n){let E=x.rowStart!==void 0?x.rowStart:x.row,B=x.columnStart!==void 0?x.columnStart:x.column,S=x.rowSpan!==void 0?typeof x.rowSpan=="string"?parseInt(x.rowSpan):x.rowSpan:1,Q=x.columnSpan!==void 0?typeof x.columnSpan=="string"?parseInt(x.columnSpan):x.columnSpan:1;if(x.rowEnd!==void 0){const k=typeof x.rowEnd=="string"?parseInt(x.rowEnd):x.rowEnd;E!==void 0?S=k-(typeof E=="string"?parseInt(E):E):E=k-S}if(x.columnEnd!==void 0){const k=typeof x.columnEnd=="string"?parseInt(x.columnEnd):x.columnEnd;B!==void 0?Q=k-(typeof B=="string"?parseInt(B):B):B=k-Q}if(typeof E=="string"&&(E=parseInt(E)),typeof B=="string"&&(B=parseInt(B)),typeof E=="number"&&E<0&&(E=Dwt(E,h)),typeof B=="number"&&B<0&&(B=Dwt(B,d)),E===void 0&&B!==void 0)E=1;else if(B===void 0&&E!==void 0)B=1;else if(E===void 0&&B===void 0){const k=m;E=Math.floor(k/d)+1,B=k%d+1}const w=E-1,M=B-1;S=Math.max(1,S),Q=Math.max(1,Q),p.push({key:x.key,row:w,column:M,rowSpan:S,columnSpan:Q,x:0,y:0,width:0,height:0}),m+=Q}let _=u.length,f=g.length;for(const x of p)x.row+x.rowSpan>_&&(_=x.row+x.rowSpan),x.column+x.columnSpan>f&&(f=x.column+x.columnSpan);if(u.length===0&&_>0&&e.containerHeight){const x=_,B=(e.containerHeight-c*(x-1))/x;for(let S=0;S<x;S++)u.push(B)}else for(;u.length<_;)u.push(0);if(g.length===0&&f>0&&e.containerWidth){const x=f,B=(e.containerWidth-l*(x-1))/x;for(let S=0;S<x;S++)g.push(B)}else if(g.length===0&&n.length>0&&e.containerWidth)g.push(e.containerWidth);else for(;g.length<f;)g.push(0);const I=(x,E,B)=>{let S=0;for(let Q=0;Q<x;Q++)S+=E[Q]||0,S+=B;return S},C=(x,E,B,S)=>{let Q=0;for(let w=x;w<x+E;w++)Q+=B[w]||0,w>x&&(Q+=S);return Q},y={};for(const x of p){const E=n.find(W=>W.key===x.key),B=I(x.column,g,l),S=I(x.row,u,c),Q=C(x.column,x.columnSpan,g,l),w=C(x.row,x.rowSpan,u,c),M=W=>W===void 0?0:typeof W=="string"?W.endsWith("px")?parseFloat(W):W.endsWith("%")?0:parseFloat(W):W,k=M(E?.contentWidth),R=M(E?.contentHeight);let F=Q,O=w,U=B,Y=S;if(k>0)switch(F=k,e.justifyItems||"stretch"){case"start":U=B;break;case"end":U=B+Q-F;break;case"center":U=B+(Q-F)/2;break;case"stretch":F=Q,U=B;break}if(R>0)switch(O=R,e.alignItems||"stretch"){case"start":Y=S;break;case"end":Y=S+w-O;break;case"center":Y=S+(w-O)/2;break;case"stretch":O=w,Y=S;break}x.x=U,x.y=Y,x.width=F,x.height=O,y[x.key]={x:U,y:Y,width:F,height:O}}return{cells:p,rowSizes:u,columnSizes:g,rowGap:c,columnGap:l,itemCoordinates:y}},oEo=class{opts;constructor(t){this.opts=t}layout(){return nEo(this)}convertToHtml(){return eEo(this)}visualize(){return tEo(this)}},iEo=Object.defineProperty,Nwt=Object.getOwnPropertySymbols,rEo=Object.prototype.hasOwnProperty,sEo=Object.prototype.propertyIsEnumerable,Rwt=(t,e,n)=>e in t?iEo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Twt=(t,e)=>{for(var n in e||(e={}))rEo.call(e,n)&&Rwt(t,n,e[n]);if(Nwt)for(var n of Nwt(e))sEo.call(e,n)&&Rwt(t,n,e[n]);return t},aEo=t=>{switch(t){case"left":return{x:-1,y:0};case"right":return{x:1,y:0};case"top":return{x:0,y:1};case"bottom":return{x:0,y:-1}}},AEo=t=>{var e,n;const o=Xc(t).schematic_component.list(),i=Xc(t).schematic_net_label.list(),r=Xc(t).schematic_port.list(),s={};for(const a of o){const A=Xc(t).source_component.get(a.source_component_id);s[a.schematic_component_id]=A?.name}for(const a of i){const A=Xc(t).source_net.get(a.source_net_id);if(!A?.name)continue;let c=0;for(;Object.values(s).includes(`NL_${A.name}${c}`);)c++;s[a.schematic_net_label_id]=`NL_${A.name}${c}`}for(const a of r){const A=Xc(t).source_port.get(a.source_port_id);if(!A)continue;const c=Xc(t).source_component.get(A.source_component_id);if(!c?.name)continue;const l=`${c.name}_${(n=(e=A?.name)!=null?e:A?.pin_number)!=null?n:""}`;s[a.schematic_port_id]=l}return s},cEo=t=>{var e;const n=Xc(t),o=new Set(n.schematic_net_label.list().map(r=>{var s,a,A,c;return`${(a=(s=r.anchor_position)==null?void 0:s.x)!=null?a:r.center.x},${(c=(A=r.anchor_position)==null?void 0:A.y)!=null?c:r.center.y}`})),i=[];for(const r of n.schematic_port.list()){const s=`${r.center.x},${r.center.y}`;if(o.has(s))continue;const a=n.source_port.get(r.source_port_id);if(!a)continue;const A=n.source_net.getWhere({subcircuit_connectivity_map_key:a.subcircuit_connectivity_map_key});if(!A)continue;const c=n.source_trace.list().find(h=>{var d;return(d=h.connected_source_port_ids)==null?void 0:d.includes(r.source_port_id)}),l=n.schematic_trace.getWhere({source_trace_id:c?.source_trace_id}),g={type:"schematic_net_label",schematic_net_label_id:`netlabel_for_${r.schematic_port_id}`,schematic_port_id:r.schematic_port_id,text:A.name,source_net_id:A.source_net_id,source_trace_id:c?.source_trace_id,schematic_trace_id:l?.schematic_trace_id,anchor_position:Twt({},r.center),center:Twt({},r.center),anchor_side:dWn((e=r.facing_direction)!=null?e:"right")};i.push(g)}return i},lEo=(t,e={})=>{const n={boxes:[],pins:[]},o=Xc(t).schematic_component.list();let i=Xc(t).schematic_net_label.list();e.inferNetLabels&&(i=i.concat(cEo(t)));const r=e.useReadableIds?AEo(t):{},s=A=>e.useReadableIds&&r[A]?r[A]:A;let a=0;for(const A of o){const c={boxId:s(A.schematic_component_id),kind:"floating",center:A.center};n.boxes.push(c);const l={pinId:`${s(A.schematic_component_id)}_center`,color:"component_center",networkId:`center_${A.schematic_component_id}`,offset:{x:0,y:0},boxId:s(A.schematic_component_id)};n.pins.push(l);const u=Xc(t).schematic_port.list({schematic_component_id:A.schematic_component_id});for(const g of u){const h=Xc(t).source_port.get(g.source_port_id);let d=h?.subcircuit_connectivity_map_key,p="normal";if(d){const _=Xc(t).source_net.getWhere({subcircuit_connectivity_map_key:h?.subcircuit_connectivity_map_key});_&&(_.is_power||_.name.startsWith("V"))&&(p="vcc"),_&&(_.is_ground||_.name.startsWith("GND"))&&(p="gnd")}else d=`disconnected-${a++}`,p="not_connected";const m={pinId:s(g.schematic_port_id),color:p,networkId:d,offset:{x:g.center.x-c.center.x,y:g.center.y-c.center.y},boxId:s(A.schematic_component_id)};n.pins.push(m)}}for(const A of i){const c=Xc(t).source_net.get(A.source_net_id);let l=c?.subcircuit_connectivity_map_key,u="normal";l?(c&&(c.is_power||c.name.startsWith("V"))&&(u="vcc"),c&&(c.is_ground||c.name.startsWith("GND"))&&(u="gnd")):(l=`disconnected-${a++}`,u="not_connected");const g=aEo(A.anchor_side),h={x:A.anchor_position.x-g.x*A.text.length*.18*.5,y:A.anchor_position.y-g.y*.18};let d={x:0,y:0};A.anchor_position&&(d={x:A.anchor_position.x-h.x,y:A.anchor_position.y-h.y});const p={boxId:s(A.schematic_net_label_id),kind:"fixed",center:h,boxAttributes:{is_net_label:!0,source_net_id:A.source_net_id,source_trace_id:A.source_trace_id}};n.boxes.push(p);const m={pinId:`${s(A.schematic_net_label_id)}_pin`,boxId:s(A.schematic_net_label_id),networkId:l,color:u,offset:d};n.pins.push(m),n.pins.push({pinId:`${s(A.schematic_net_label_id)}_center`,boxId:s(A.schematic_net_label_id),networkId:`${s(A.schematic_net_label_id)}_center`,color:"netlabel_center",offset:{x:0,y:0}})}return n},uEo=t=>t?"x"in t&&"y"in t?t:"center"in t?t.center:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}:{x:0,y:0},e0e=(t,e)=>{const n=t.boxes.find(c=>c.boxId===e),o=t.pins.filter(c=>c.boxId===e);if(!n)throw new Error(`Box "${e}" not found`);const i=n.center??{x:0,y:0};let r=1/0,s=1/0,a=-1/0,A=-1/0;for(const c of o)r=Math.min(r,c.offset.x+i.x),s=Math.min(s,c.offset.y+i.y),a=Math.max(a,c.offset.x+i.x),A=Math.max(A,c.offset.y+i.y);return{minX:r,minY:s,maxX:a,maxY:A}},oO=(t,e,n)=>`hsl(${t*360/e}, 100%, 50%, ${n??1})`,gEo=t=>{const e=new Set;for(const n of t.pins)e.add(n.networkId);return Array.from(e)},kwt={not_connected:"rgba(0, 0, 0, 0.2)",normal:"blue",vcc:"orange",gnd:"purple",component_center:"gray"},dEo=["red","green","blue","yellow","purple","orange","brown","gray","black","white"];function hEo(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n);return e}var Fwt=t=>t.startsWith("rgb")||t.startsWith("hsl")||t.startsWith("#")||dEo.includes(t)?t:t in kwt?kwt[t]:oO(hEo(t)%50,50),zN=(t,e)=>{const n={points:[],lines:[],rects:[],circles:[],texts:[],coordinateSystem:"cartesian",title:"BPC Graph Graphics"},o=new Map,i=new Map;for(const a of t.boxes){const A=e0e(t,a.boxId),c=uEo(A);n.rects.push({label:a.boxId,center:c,width:A.maxX-A.minX+.1,height:A.maxY-A.minY+.1,fill:"rgba(0, 0, 0, 0.2)"});const l=t.pins.filter(g=>g.boxId===a.boxId),u=a.center??{x:0,y:0};for(const g of l){const h={x:g.offset.x+u.x,y:g.offset.y+u.y},d=`${h.x.toFixed(6)},${h.y.toFixed(6)}`;i.has(d)||i.set(d,[]),i.get(d).push({box:a,pin:g}),o.set(`${a.boxId}.${g.pinId}`,h)}}for(const[a,A]of i){const c=a.split(",").map(Number),l=c[0],u=c[1];for(let g=0;g<A.length;g++){const h=A[g],{box:d,pin:p}=h;let m={x:l,y:u};if(A.length>1){const _=d.center??{x:0,y:0},f=_.x-l,I=_.y-u,C=Math.sqrt(f*f+I*I);let y=0,x=0;if(C>0)y=f/C,x=I/C;else{const E=g*2*Math.PI/A.length;y=Math.cos(E),x=Math.sin(E)}m={x:l+.01*y,y:u+.01*x}}o.set(`${d.boxId}.${p.pinId}`,m),n.points.push({...m,label:[p.pinId,p.color,p.networkId].join(`
`),color:Fwt(p.color)})}}const r=gEo(t);for(let a=0;a<r.length;a++){const A=r[a],c=oO(a,r.length,.5),u=t.pins.filter(g=>g.networkId===A).map(g=>({pin:g,position:o.get(`${g.boxId}.${g.pinId}`)}));for(let g=0;g<u.length;g++){const{position:h}=u[g];for(let d=g+1;d<u.length;d++){const{position:p}=u[d];n.lines.push({points:[h,p],strokeColor:e?.grayNetworks?"rgba(0, 0, 0, 0.05)":c})}}}const s=V5(n);return e?.title&&(n.title=e.title,n.texts.push({text:e.title,x:s.minX,y:s.maxY,fontSize:(s.maxY-s.minY)*.05,anchorSide:"bottom_left"})),e?.caption&&n.texts.push({text:e.caption,x:s.minX,y:s.minY,fontSize:(s.maxY-s.minY)*.05,anchorSide:"top_left"}),n},t0e=(t,e,n)=>{const o=t.pins.find(s=>s.pinId===n&&s.boxId===e);if(!o)throw new Error(`Pin "${n}" not found`);const i=t.boxes.find(s=>s.boxId===o.boxId);if(!i)throw new Error(`Box "${o.boxId}" not found`);const r=i.center??{x:0,y:0};return{x:o.offset.x+r.x,y:o.offset.y+r.y}},pEo=(t,e,n)=>{const o=typeof n=="string"?t.pins.find(h=>h.pinId===n&&h.boxId===e):n;if(!o)throw new Error(`Pin not found "${n}"`);if(!(typeof e=="string"?t.boxes.find(h=>h.boxId===e):e))throw new Error(`Box not found for pin "${n}" (looked for "${o.boxId}")`);const r=e0e(t,o.boxId),s=t0e(t,o.boxId,o.pinId),a=r.maxX-r.minX,A=r.maxY-r.minY;if(a===0&&A===0)return Math.abs(o.offset.x)>Math.abs(o.offset.y)?o.offset.x>0?"x+":"x-":o.offset.y>0?"y+":"y-";if(a===0){if(Math.abs(s.y-r.minY)<1e-4)return"y-";if(Math.abs(s.y-r.maxY)<1e-4)return"y+"}if(A===0){if(Math.abs(s.x-r.minX)<1e-4)return"x-";if(Math.abs(s.x-r.maxX)<1e-4)return"x+"}const c=Math.abs(s.x-r.minX)<1e-4,l=Math.abs(s.x-r.maxX)<1e-4,u=Math.abs(s.y-r.minY)<1e-4,g=Math.abs(s.y-r.maxY)<1e-4;if((c||l)&&(u||g))return o.offset.x>0?"x+":"x-";if(c)return"x-";if(l)return"x+";if(u)return"y-";if(g)return"y+";throw new Error(`Pin "${o.pinId}" not on the edge of the box "${o.boxId}" so we couldn't determine the direction`)},iO=(t,e,n)=>{try{return pEo(t,e,n)}catch{return null}},mEo=t=>{const e=new Map,n=[];t.nodes.forEach((r,s)=>{e.set(r.id,s),n.push(r.id)});const o=t.nodes.length,i=Array.from({length:o},()=>Array.from({length:o},()=>0));for(const[r,s]of t.undirectedEdges){const a=e.get(r),A=e.get(s);a!==void 0&&A!==void 0&&a!==A&&(i[a][A]=1,i[A][a]=1)}for(let r=0;r<o;++r)i[r][r]=1;return{matrix:i,mapping:e,indexMapping:n}},n0e=t=>{const e=[],n=[],o=new Map;for(const r of t.boxes)r.kind,o.set(r.boxId,r.center),e.push({id:r.boxId,boxId:r.boxId,color:"box",x:r.center?.x,y:r.center?.y});const i={};for(const r of t.pins){const s=`${r.boxId}-${r.pinId}`,a=o.get(r.boxId);e.push({id:s,boxId:r.boxId,pinId:r.pinId,color:r.color,x:a?a.x+r.offset.x:void 0,y:a?a.y+r.offset.y:void 0}),i[r.networkId]??=[],i[r.networkId].push(s)}for(const r of Object.values(i))for(let s=0;s<r.length;s++)for(let a=s+1;a<r.length;a++)n.push([r[s],r[a]]);for(const r of t.boxes)for(const s of t.pins)s.boxId===r.boxId&&n.push([r.boxId,`${r.boxId}-${s.pinId}`]);return{nodes:e,undirectedEdges:n}},_Eo=(t,e,n={})=>{const o=t.length;if(t.some(a=>a.length!==o))throw new Error("adjMatrix must be square");let i=(n.nodeInitialColors??Array.from({length:o},()=>"_")).slice();const r=a=>{const A={};for(const c of a)A[c]=(A[c]??0)+1;return A},s=[];s.push(r(i));for(let a=0;a<e;a++){const A=Array(o);for(let c=0;c<o;c++){const l=[];for(let u=0;u<o;u++)t[c][u]&&l.push(i[u]);l.sort(),A[c]=`${i[c]}|${l.join(",")}`}i=A,s.push(r(i))}return s},fEo=(t,e)=>{let n=0;const o=Math.min(t.length,e.length);for(let i=0;i<o;i++){const r=t[i],s=e[i],a=new Set([...Object.keys(r),...Object.keys(s)]);let A=0,c=0;for(const l of a){const u=r[l]??0,g=s[l]??0;A+=Math.min(u,g),c+=Math.max(u,g)}n+=c===0?0:A/c}return n},IEo=fEo,o0e=2,i0e=(t,e=o0e)=>{const n=n0e(t),{matrix:o,indexMapping:i}=mEo(n);return _Eo(o,e,{nodeInitialColors:i.map(r=>n.nodes.find(s=>s.id===r)?.color??"_")})},fwe=(t,e,{wlDegrees:n=o0e}={})=>{const o=i0e(t,n),i=i0e(e,n);return(o0e+1-IEo(o,i))/(o0e+1)},CEo=t=>{let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n);return Math.abs(e)},Iwe=(t,e={})=>{const n={points:[],lines:[],rects:[],circles:[],texts:[],coordinateSystem:"cartesian",title:"Flat-BPC Graphics"},o=new Map;for(const r of t.nodes){if(r.x===void 0||r.y===void 0)continue;const s={x:r.x,y:r.y};o.set(r.id,s),n.points.push({...s,color:Fwt(r.color),label:r.id})}for(const[r,s]of t.undirectedEdges){const a=o.get(r),A=o.get(s);a&&A&&n.lines.push({points:[a,A],strokeColor:"rgba(0,0,0,0.3)"})}const i=V5(n);return e.title&&n.texts.push({text:e.title,x:i.minX,y:i.maxY,fontSize:(i.maxY-i.minY)*.05,anchorSide:"bottom_left"}),e.caption&&n.texts.push({text:e.caption,x:i.minX,y:i.minY,fontSize:(i.maxY-i.minY)*.05,anchorSide:"top_left"}),n},yEo=t=>{const e=new Map;for(const i of t.pins){const r=t.boxes.find(a=>a.boxId===i.boxId);if(!r||!r.center)throw new Error(`Expected fixed graph – box "${i.boxId}" missing or has no center`);const s={x:r.center.x+i.offset.x,y:r.center.y+i.offset.y};e.has(i.networkId)||e.set(i.networkId,[]),e.get(i.networkId).push(s)}const n=new Map;let o=0;for(const[i,r]of e){if(r.length===0){n.set(i,0);continue}const s=r.reduce((A,c)=>({x:A.x+c.x,y:A.y+c.y}),{x:0,y:0});s.x/=r.length,s.y/=r.length;const a=r.reduce((A,c)=>{const l=c.x-s.x,u=c.y-s.y;return A+Math.sqrt(l*l+u*u)},0);n.set(i,a),o+=a}return{totalNetworkLength:o,networkLengths:n}},xEo=(t,e)=>{const n=t.pins.filter(i=>i.networkId===e),o=[];for(const i of n){const r=Math.atan2(i.offset.y,i.offset.x);o.push(r)}return o},Lwt=t=>{const e=new Map,n=Array.from(new Set(t.pins.map(o=>o.networkId)));for(const o of n){const i=xEo(t,o);e.set(o,i)}return e},EEo=(t,e)=>{const n=2*Math.PI,o=(t%n+n)%n,i=(e%n+n)%n,r=Math.abs(o-i);return Math.min(r,n-r)},BEo=(t,e)=>{if(t.length===0&&e.length===0)return 0;if(t.length===0||e.length===0)return Math.PI;const n=(o,i)=>{let r=0;for(const s of o){let a=1/0;for(const A of i){const c=EEo(s,A);c<a&&(a=c)}r+=a}return r/o.length};return(n(t,e)+n(e,t))/2},bEo=(t,e)=>{const n=new Map,o=Array.from(t.entries()),i=Array.from(e.entries()),r=o.length,s=i.length,a=Array.from({length:r},()=>new Array(s).fill(0));for(let g=0;g<r;g++){const[,h]=o[g];for(let d=0;d<s;d++){const[,p]=i[d];a[g][d]=BEo(h,p)}}const A=new Set(Array.from({length:r},(g,h)=>h)),c=new Set(Array.from({length:s},(g,h)=>h));let l=0;for(;A.size&&c.size;){let g=-1,h=-1,d=1/0;for(const _ of A)for(const f of c){const I=a[_][f];I<d&&(d=I,g=_,h=f)}const[p]=o[g],[m]=i[h];n.set(p,m),l+=d,A.delete(g),c.delete(h)}const u=Math.PI;return l+=(A.size+c.size)*u,{networkMapping:n,distance:l}},Hwt=t=>{const e=Math.min(...t.map(r=>r.offset.x)),n=Math.max(...t.map(r=>r.offset.x)),o=Math.min(...t.map(r=>r.offset.y)),i=Math.max(...t.map(r=>r.offset.y));return{minX:e,maxX:n,minY:o,maxY:i}},SEo=(t,e)=>{const n=A=>{switch(A.side){case"x+":return A.cwDistanceFromCorner;case"y-":return 1+A.cwDistanceFromCorner;case"x-":return 2+A.cwDistanceFromCorner;case"y+":return 3+A.cwDistanceFromCorner}},o=n(t)%4,i=n(e)%4,r=(i-o+4)%4,s=(o-i+4)%4,a=Math.min(r,s);return{cwDistance:r,ccwDistance:s,minDistance:a}},Ib=1e-6,Owt=(t,e)=>{const{minX:n,minY:o,maxX:i,maxY:r}=t,s=(c,l)=>Math.abs(c-l)<Ib;let a,A;if(s(e.x,i)&&e.y>=o-Ib&&e.y<=r+Ib)a="x+",A=(r-e.y)/(r-o);else if(s(e.y,r)&&e.x<=i+Ib&&e.x>=n-Ib)a="y+",A=(e.x-n)/(i-n);else if(s(e.x,n)&&e.y<=r+Ib&&e.y>=o-Ib)a="x-",A=(e.y-o)/(r-o);else if(s(e.y,o)&&e.x>=n-Ib&&e.x<=i+Ib)a="y-",A=(i-e.x)/(i-n);else return null;return A=Math.min(1,Math.max(0,A)),{side:a,cwDistanceFromCorner:A}},QEo=(t,e)=>{const n=[],o=new Set,i=new Set,r=new Set,s=new Set,a=Hwt(t),A=Hwt(e);for(const c of t){const l=e.filter(d=>d.color===c.color).filter(d=>!s.has(d.pinId));if(l.length===0){o.add(c.pinId);continue}const u=Owt(a,c.offset);if(u===null){o.add(c.pinId);continue}let g=1/0,h=l[0];for(const d of l){const p=Owt(A,d.offset);if(p===null)continue;const{minDistance:m}=SEo(u,p);m<g&&(g=m,h=d)}n.push([c,h]),r.add(c.pinId),s.add(h.pinId)}for(const c of e)s.has(c.pinId)||i.add(c.pinId);return{matchedPins:n,unmatchedPin1Ids:o,unmatchedPin2Ids:i}},vEo=class{constructor(t,e){this.floatingGraph=t,this.fixedGraph=e,this.wipGraph={pins:[],boxes:[]},this.fixedToFloatingNetworkMap=this.computeFixedToFloatingNetworkMap(),this.floatingToFixedNetworkMap=new Map(Array.from(this.fixedToFloatingNetworkMap.entries()).map(([n,o])=>[o,n]))}wipGraph;iterations=0;solved=!1;acceptedFloatingBoxIds=new Set;rejectedFloatingBoxIds=new Set;acceptedFixedBoxIds=new Set;assignment=new Map;lastAcceptedEvaluation=null;fixedToFloatingNetworkMap;floatingToFixedNetworkMap;lastComputedEvaluations=[];computeFixedToFloatingNetworkMap(){const t=Lwt(this.floatingGraph),e=Lwt(this.fixedGraph),{networkMapping:n}=bEo(e,t);return n}getNextFloatingBoxId(){const t=this.floatingGraph.boxes.map(o=>o.boxId).filter(o=>!this.acceptedFloatingBoxIds.has(o)&&!this.rejectedFloatingBoxIds.has(o));if(!t.length)throw new Error("No remaining floating box ids");let e=t[0],n=0;for(const o of t){const i=this.floatingGraph.pins.filter(r=>r.boxId===o);i.length>n&&(e=o,n=i.length)}return e}getRemainingFloatingBoxIds(){return this.floatingGraph.boxes.map(t=>t.boxId).filter(t=>!this.acceptedFloatingBoxIds.has(t)&&!this.rejectedFloatingBoxIds.has(t))}getPartialFloatingGraph(t){const e={pins:[],boxes:[]};for(const n of this.floatingGraph.boxes)(this.acceptedFloatingBoxIds.has(n.boxId)||n.boxId===t)&&(e.boxes.push(n),e.pins.push(...this.floatingGraph.pins.filter(o=>o.boxId===n.boxId)));return e}evaluateFloatingBoxAssignment(t){const e=this.getPartialFloatingGraph(t),n=fwe(e,this.wipGraph);let o=null,i=null;const r={floatingBoxId:t,originalWipGraph:this.wipGraph,partialFloatingGraph:e,currentWlDist:n,networkLengths:new Map,wlDistances:new Map,wlVecs:new Map,wipGraphsWithAddedFixedBoxId:new Map};let s=n,a=n,A=1/0;const c=i0e(e);for(const l of this.fixedGraph.boxes.map(u=>u.boxId)){if(this.acceptedFixedBoxIds.has(l))continue;const u=this.getWipGraphWithAddedFixedBoxIdForFloatingAssignment(l,t),g=fwe(e,u),h=i0e(u),{totalNetworkLength:d}=yEo(u);r.wipGraphsWithAddedFixedBoxId.set(l,u),r.wlVecs.set(l,h),r.wlDistances.set(l,g),r.networkLengths.set(l,d);const p=g+d/100;p<s&&(s=p,a=g,A=d,i=u,o=l)}return{bestFixedBoxId:o,bestNewWipGraph:i,bestDist:s,bestWlDist:a,bestTotalNetworkLength:A,lastDistanceEvaluation:r,nextFloatingBoxId:t,partialFloatingGraph:e,floatingBoxWlVec:c}}getPinAssignment(){const t={},e={};for(const[n,o]of this.assignment)t[n]={},e[o]=n;for(const n of this.wipGraph.pins){const o=n.boxId,i=e[o],r=n._floatingPinId,s=n._fixedPinId;t[i][r]=s}return t}step(){if(this.solved)return;if(this.iterations>1e3)throw new Error("Too many iterations");if(this.iterations++,this.iterations===1){const o=this.getNextFloatingBoxId(),i=this.evaluateFloatingBoxAssignment(o);this.lastComputedEvaluations=[i],this.acceptEvaluationResult(i);return}const t=this.getRemainingFloatingBoxIds();if(t.length===0){this.solved=!0;return}let e=1/0,n=null;this.lastComputedEvaluations=[];for(const o of t){const i=this.evaluateFloatingBoxAssignment(o);this.lastComputedEvaluations.push(i),i.bestDist<e&&(e=i.bestDist,n=i)}n&&this.acceptEvaluationResult(n)}acceptEvaluationResult(t){const{bestFixedBoxId:e,bestNewWipGraph:n,nextFloatingBoxId:o}=t;if(e===null){this.rejectedFloatingBoxIds.add(o);return}this.acceptedFloatingBoxIds.add(o),this.assignment.set(o,e),this.acceptedFixedBoxIds.add(e),this.wipGraph=n,this.lastAcceptedEvaluation=t.lastDistanceEvaluation}getWipGraphWithAddedFixedBoxIdForFloatingAssignment(t,e){const n=structuredClone(this.wipGraph),o=this.fixedGraph.boxes.find(a=>a.boxId===t);n.boxes.push(o);const i=this.floatingGraph.pins.filter(a=>a.boxId===e),r=this.fixedGraph.pins.filter(a=>a.boxId===t),{matchedPins:s}=QEo(i,r);return n.pins.push(...s.map(a=>{const[A,c]=a;return{...c,networkId:this.floatingToFixedNetworkMap.get(A.networkId),_floatingPinId:A.pinId,_fixedPinId:c.pinId}})),n}visualize(){const t=zN(this.floatingGraph,{title:"Floating"}),e=zN(this.wipGraph,{title:"WIP"}),n=zN(this.fixedGraph,{title:"Fixed"}),o=zN(this.getPartialFloatingGraph(),{title:"Partial Floating"}),i=new Map,r=new Map;for(const[p,m]of this.assignment){const _=oO(CEo(p)*47%100,100,.5);i.set(p,_),r.set(m,p)}function s(p,m,_){const f=i.get(m);p.fill=f,p.label=`${m}→${_}`}for(const p of t.rects??[]){const m=p.label;if(!m)continue;const _=this.assignment.get(m);_&&s(p,m,_)}for(const p of o.rects??[]){const m=p.label;if(!m)continue;const _=this.assignment.get(m);_&&s(p,m,_)}const a=[e,n];for(const p of a)for(const m of p.rects??[]){const _=m.label;if(!_)continue;const f=r.get(_);f&&s(m,f,_)}const A=n0e(this.floatingGraph),c=n0e(this.wipGraph),l=n0e(this.fixedGraph),u=Iwe(A,{title:"Floating Flat"}),g=Iwe(c,{title:"WIP Flat"}),h=Iwe(l,{title:"Fixed Flat"});return zce([ZQe([t,u,o]),ZQe([e,g]),ZQe([n,h])])}},wEo=(t,e)=>{const n=new vEo(t,e);for(;!n.solved&&n.iterations<1e3;)n.step();const o={};for(const[s,a]of n.assignment.entries())o[s]=a;const i={};for(const[s,a]of n.floatingToFixedNetworkMap.entries())i[s]=a;const r=n.getPinAssignment();return{floatingToFixedBoxAssignment:o,floatingToFixedNetworkAssignment:i,floatingToFixedPinAssignment:r}},PEo=(t,{renetworkedNetworkIdMap:e}={})=>{if(e??={},t.length===1)return t[0];const n={boxes:[],pins:[]},o=new Map,i=new Map,r=Object.entries(t.flatMap(a=>Array.from(new Set(a.boxes.map(A=>A.boxId)))).reduce((a,A)=>(a[A]=(a[A]||0)+1,a),{})).filter(([a,A])=>A===t.length).map(([a])=>a);if(r.length>1)throw new Error(`Expected at most one shared box across all partitions, the following box ids are shared across all graphs: ${r.join(", ")}`);const s=r[0];for(const a of t){const A=a.boxes.find(c=>c.boxId===s)?.center;for(const c of a.boxes){if(o.has(c.boxId))continue;const l=structuredClone(c);l.center&&A&&(l.center={x:l.center.x-A.x,y:l.center.y-A.y}),o.set(c.boxId,l)}for(const c of a.pins)i.has(`${c.boxId}-${c.pinId}`)||i.set(`${c.boxId}-${c.pinId}`,structuredClone(c))}return n.boxes=Array.from(o.values()),n.pins=Array.from(i.values()),n},Gwt=({graph:t,axis:e,centerBoxId:n})=>{const o=structuredClone(t),i=o.boxes.find(a=>a.boxId===n);if(!i||!i.center)throw new Error(`Center box "${n}" not found or has no center`);const{x:r,y:s}=i.center;for(const a of o.boxes)a.center&&(a.center.x=2*r-a.center.x);for(const a of o.pins)a.offset.x=-a.offset.x;return o},MEo=t=>{let e=null,n=-1/0;for(const r of t.boxes){const s=t.pins.filter(a=>a.boxId===r.boxId).filter(a=>["x-","x+"].includes(iO(t,r,a)??"none"));s.length>n&&s.length>1&&(e=r,n=s.length)}if(!e)return{g:t,reflected:!1,centerBoxId:null};const o=t.pins.filter(r=>r.boxId===e.boxId).map(r=>iO(t,e,r)),i={"x+":0,"x-":0,"y+":0,"y-":0};for(const r of o)r&&i[r]++;return i["x+"]>=i["x-"]?{g:t,reflected:!1,centerBoxId:e.boxId}:{g:Gwt({graph:t,axis:"x",centerBoxId:e.boxId}),reflected:!0,centerBoxId:e.boxId}},sw=vc("schematic-partition-processor"),DEo=class{constructor(t,e={}){this.initialGraph=t,this.lastGraph=t,this.singletonKeys=e.singletonKeys??[],this.centerPinColors=e.centerPinColors??[];const n=this.initializeWipPartitions();this.wipPartitions=n.wipPartitions,this.splitBoxIds=n.splitBoxIds,this.addedPins=n.addedPins,this.exploredPins=new Set,this.unexploredPins=this.wipPartitions.flatMap(r=>r.pins.map(s=>({...s,partitionId:r.partitionId}))),this.boxSingletonKeys=this.initializeBoxSingletonKeys(),this.pinConnectionCount=(()=>{const r={};for(const s of this.initialGraph.pins)r[`${s.boxId}:${s.pinId}`]=this.getNeighbors(s).length;return r})();const o={};for(const r of this.initialGraph.pins)o[r.networkId]=(o[r.networkId]??0)+1;this.networkSize=o;const i={};for(const r of this.initialGraph.pins)i[`${r.boxId}:${r.pinId}`]=o[r.networkId];this.pinNetworkSize=i}lastGraph;lastExploredPin;solved=!1;iteration=0;wipPartitions;unexploredPins=[];boxSingletonKeys;exploredPins;addedPins;allAcceptedPins=new Set;pinConnectionCount;networkSize;pinNetworkSize;splitBoxIds;acceptedBoxPartitionMap=new Map;singletonKeys;centerPinColors;initializeBoxSingletonKeys(){const t={};for(const e of this.initialGraph.boxes){const n=this.initialGraph.pins.filter(r=>r.boxId===e.boxId),o=n.length,i=n.map(r=>`${r.color}/${o}`).filter(r=>this.singletonKeys.includes(r));t[e.boxId]=new Set(i)}return t}initializeWipPartitions(){const t=[],e=new Set,n=new Set;let o=0;for(const i of this.initialGraph.boxes){const r=this.initialGraph.pins.filter(a=>a.boxId===i.boxId).filter(a=>iO(this.initialGraph,i,a)).filter(a=>!this.centerPinColors.includes(a.color));if(r.length<4)continue;const s=new Set(r.map(a=>iO(this.initialGraph,i,a)));s.size>1&&n.add(i.boxId);for(const a of s){const A={partitionId:`partition${o++}`,filledSingletonSlots:new Set,pins:[]};for(const c of r)iO(this.initialGraph,i,c)===a&&(A.pins.push({boxId:i.boxId,pinId:c.pinId}),e.add(`${i.boxId}:${c.pinId}`));t.push(A)}}return t.length===0&&(t.push(this.createWipPartitionFromEntireGraph()),this.solved=!0),sw(`splitBoxIds = ${Array.from(n).join(", ")}`),sw(`wipPartitions = ${t.map(i=>i.partitionId).join(", ")}`),{wipPartitions:t,splitBoxIds:n,addedPins:e}}createWipPartitionFromEntireGraph(){return{partitionId:"entire-graph",filledSingletonSlots:new Set,pins:this.initialGraph.pins.map(t=>({boxId:t.boxId,pinId:t.pinId}))}}step(){if(this.solved)return;if(this.iteration++,sw(`
── Iteration ${this.iteration} ──  unexplored=${this.unexploredPins.length}  explored=${this.exploredPins.size}`),this.unexploredPins.sort((c,l)=>{const u=`${c.boxId}:${c.pinId}`,g=`${l.boxId}:${l.pinId}`,h=this.pinNetworkSize[u]-this.pinNetworkSize[g];return h!==0?h:this.pinConnectionCount[u]-this.pinConnectionCount[g]}),this.unexploredPins.length===0){this.solved=!0;return}const t=this.unexploredPins.shift(),e=`${t.boxId}:${t.pinId}`;sw(`Exploring pin ${t.boxId}:${t.pinId} for partition "${t.partitionId}"`),this.lastExploredPin={...t,partitionId:t.partitionId};const n=`${t.partitionId}[${e}]`,o=this.initialGraph.pins.find(c=>c.boxId===t.boxId&&c.pinId===t.pinId);if(!o||this.exploredPins.has(n))return;const i=this.wipPartitions.find(c=>c.partitionId===t.partitionId);if(!i)return;const r=this.acceptedBoxPartitionMap.get(t.boxId);if(r&&r!==t.partitionId&&!this.splitBoxIds.has(t.boxId)){sw(`  ↳ rejected (box ${t.boxId} for partition ${t.partitionId} already in partition ${this.acceptedBoxPartitionMap.get(t.boxId)})`),this.exploredPins.add(n);return}const s=this.boxSingletonKeys[t.boxId];if(Array.from(s).some(c=>i.filledSingletonSlots.has(c))){sw(`  ↳ rejected (singleton already in partition "${t.partitionId}")`),this.exploredPins.add(n);return}for(const c of s)i.filledSingletonSlots.add(c);i.pins.push({boxId:t.boxId,pinId:t.pinId}),this.allAcceptedPins.add(e),this.addedPins.add(e),this.splitBoxIds.has(t.boxId)||this.acceptedBoxPartitionMap.set(t.boxId,t.partitionId),this.exploredPins.add(n),sw(`  ↳ accepted → pins in partition now = ${i.pins.length}`);const A=this.getNeighbors(o);for(const c of A){const l=`${c.boxId}:${c.pinId}`;this.addedPins.has(l)||this.centerPinColors.includes(c.color)||this.exploredPins.has(`${t.partitionId}[${l}]`)||this.unexploredPins.push({boxId:c.boxId,pinId:c.pinId,partitionId:t.partitionId})}this.unexploredPins.length===0&&(this.solved=!0),this.solved&&sw(`Solver finished in ${this.iteration} iterations, partitions=${this.getPartitions().length}`)}getNeighbors(t){const e=[];for(const n of this.initialGraph.pins)n.networkId===t.networkId&&(t.boxId===n.boxId&&n.pinId===t.pinId||e.push(n));for(const n of this.initialGraph.pins)n.boxId===t.boxId&&e.push(n);return e}solve(){for(;!this.solved&&this.iteration<1e3;)this.step()}getPartitions(){if(!this.solved)throw new Error("Graph not solved");const t=[];for(const e of this.wipPartitions){if(e.pins.length===0)continue;const n=new Set(e.pins.map(i=>i.boxId)),o=this.initialGraph.boxes.filter(i=>n.has(i.boxId));t.push({boxes:o,pins:this.initialGraph.pins.filter(i=>e.pins.some(r=>r.pinId===i.pinId&&r.boxId===i.boxId)||this.centerPinColors.includes(i.color)&&n.has(i.boxId))})}return t}getGraphicsForLastGraph(){const t=zN(this.lastGraph,{title:`Iteration ${this.iteration}`}),e=this.wipPartitions.length,n=.4;if(this.wipPartitions.forEach((i,r)=>{if(i.pins.length===0)return;const s=oO(r,e,.25);for(const{boxId:a,pinId:A}of i.pins){const{x:c,y:l}=t0e(this.lastGraph,a,A);t.rects.push({center:{x:c,y:l},width:n,height:n,fill:s})}}),this.lastExploredPin){const{boxId:i,pinId:r,color:s}=this.lastExploredPin,a=t0e(this.lastGraph,i,r),A=.25;t.rects.push({center:{x:a.x,y:a.y},width:A,height:A,fill:this.lastExploredPin.partitionId?oO(this.wipPartitions.findIndex(c=>c.partitionId===this.lastExploredPin.partitionId),this.wipPartitions.length,1):"black"}),t.texts.push({x:a.x,y:a.y,text:`${i}:${r}-${Array.from(this.boxSingletonKeys[i]??[]).join(",")}`,fontSize:.1})}const o=n;for(const i of this.unexploredPins){const{boxId:r,pinId:s,partitionId:a}=i,A=this.wipPartitions.findIndex(h=>h.partitionId===a);if(A===-1)continue;const c=oO(A,this.wipPartitions.length,1),{x:l,y:u}=t0e(this.lastGraph,r,s),g=1+.1*A;t.rects.push({center:{x:l,y:u},width:o*g,height:o*g,fill:"none",stroke:c})}return t}},NEo=(t,e,n={})=>{n.similarityMethod??="wl-distance";const o=fwe,i=Object.fromEntries(Object.entries(e).map(([s,a])=>[s,o(t,a)])),r=Object.entries(i).reduce((s,[a,A])=>A<s[1]?[a,A]:s);return{graphName:r[0],graph:e[r[0]],distance:r[1],corpusScores:i}},REo=t=>t.x>0?"x+":t.x<0?"x-":t.y>0?"y+":t.y<0?"y-":null,TEo=t=>{switch(t){case"x+":return{x:1,y:0};case"x-":return{x:-1,y:0};case"y+":return{x:0,y:1};case"y-":return{x:0,y:-1}}},Ywt=(t,e)=>{const n=t.boxes.find(a=>a.boxId===e);if(!n)throw new Error(`Box ${e} not found`);const i=t.pins.filter(a=>a.boxId===e).map(a=>iO(t,n,a)),r={"x-":0,"x+":0,"y-":0,"y+":0};for(const a of i)a&&r[a]++;const s=Math.max(...Object.values(r));for(const a of Object.keys(r))if(r[a]===s)return a;return null},kEo=(t,e,{floatingToFixedBoxAssignment:n,floatingBoxIdsWithMutablePinOffsets:o})=>{for(const i of t.boxes){const r=n[i.boxId];if(!r||!i.center||o?.has(i.boxId))continue;const s=e0e(e,r),a=e0e(t,i.boxId),A=Ywt(e,r),c=Ywt(t,i.boxId);if(A===null||c===null||A!==c)continue;const l=TEo(A),u=s.maxX-s.minX,g=a.maxX-a.minX,h=s.maxY-s.minY,d=a.maxY-a.minY,p=g-u,m=d-h;if(!(p<.001&&m<.001))for(const _ of t.boxes){if(_.boxId===i.boxId||!_.center)continue;const f={x:_.center.x-i.center.x,y:_.center.y-i.center.y};REo({x:f.x*Math.abs(l.x),y:f.y*Math.abs(l.y)})===A&&(_.center.x+=l.x*p,_.center.y+=l.y*m)}}},FEo=(t,e,n={})=>{const{floatingBoxIdsWithMutablePinOffsets:o=new Set}=n,{floatingToFixedBoxAssignment:i,floatingToFixedPinAssignment:r}=wEo(t,e),s=structuredClone(t);for(const a of s.pins)if(o.has(a.boxId)&&r[a.boxId]?.[a.pinId]){const A=r[a.boxId]?.[a.pinId],c=i[a.boxId],l=e.pins.find(u=>u.boxId===c&&u.pinId===A);l&&(a.offset=l.offset)}for(const a of s.boxes)if(i[a.boxId]){const A=i[a.boxId],c=e.boxes.find(l=>l.boxId===A);c&&(a.center=c.center,a.kind="fixed")}return n.pushBoxesAsBoxesChangeSize&&kEo(s,e,{floatingToFixedBoxAssignment:i,floatingBoxIdsWithMutablePinOffsets:o}),s},LEo=(t,{corpus:e,singletonKeys:n,centerPinColors:o,floatingBoxIdsWithMutablePinOffsets:i})=>{const r=new DEo(t,{singletonKeys:n,centerPinColors:o});for(;!r.solved&&r.iteration<1e3;)r.step();const A=r.getPartitions().map(MEo).map(g=>{const{graph:h,distance:d}=NEo(g.g,e);return{adaptedBpcGraph:FEo(structuredClone(g.g),h,{floatingBoxIdsWithMutablePinOffsets:i,pushBoxesAsBoxesChangeSize:!0}),reflected:g.reflected,centerBoxId:g.centerBoxId,distance:d}}),c=A.map(({adaptedBpcGraph:g,reflected:h,centerBoxId:d})=>h?Gwt({graph:g,axis:"x",centerBoxId:d}):g),l=PEo(c),u=A.reduce((g,h)=>g+(h.distance||0),0);return{fixedGraph:l,distance:u}},HEo=(t,{corpus:e,singletonKeys:n,centerPinColors:o,floatingBoxIdsWithMutablePinOffsets:i})=>{const r=[];let s=null;for(const a of t){const{fixedGraph:A,distance:c}=LEo(a.floatingGraph,{corpus:e,singletonKeys:n,centerPinColors:o,floatingBoxIdsWithMutablePinOffsets:i});r.push({variantName:a.variantName,distance:c}),(!s||c<s.distance)&&(s={variantName:a.variantName,result:A,distance:c})}return{result:s.result,selectedVariantName:s.variantName,variantResults:r}},xp=1e-15,OEo=class{map;rev;constructor(){this.map=new Map([["0",0]]),this.rev=["0"]}getOrCreate(t){const e=String(t),n=e.toUpperCase();if(this.map.has(n))return this.map.get(n);const o=this.rev.length;return this.map.set(n,o),this.rev.push(e),o}get(t){return this.map.get(String(t).toUpperCase())}count(){return this.rev.length}matrixIndexOfNode(t){return t===0?-1:t-1}};function EC(t){if(t==null)return NaN;let e=String(t).trim();if(e==="")return NaN;if(/^[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?$/.test(e))return parseFloat(e);const n={t:1e12,g:1e9,meg:1e6,k:1e3,m:.001,u:1e-6,n:1e-9,p:1e-12,f:1e-15},o=e.match(/^([+-]?\d*\.?\d+(?:[eE][+-]?\d+)?)([a-zA-Z]+)$/);if(!o)return parseFloat(e);const[,i,r]=o;if(i==null)return parseFloat(e);let s=parseFloat(i),a=(r??"").toLowerCase();return a=a.replace(/(ohm|v|a|s|h|f)$/g,""),a==="meg"?s*n.meg:a.length===1&&a in n?s*n[a]:s}function GEo(t){const o=t.trim().replace(/^pulse\s*\(/i,"(").replace(/^\(/,"").replace(/\)$/,"").trim().split(/[\s,]+/).filter(r=>r.length);if(o.length<7)throw new Error("PULSE(...) requires 7 or 8 args");const i=o.map(r=>EC(r));if(i.some(r=>Number.isNaN(r)))throw new Error("Invalid PULSE() numeric value");return{v1:i[0],v2:i[1],td:i[2],tr:i[3],tf:i[4],ton:i[5],period:i[6],ncycles:o[7]!=null?i[7]:1/0}}function YEo(t){const o=t.trim().replace(/^pwl\s*\(/i,"(").replace(/^\(/,"").replace(/\)$/,"").trim().split(/[\s,]+/).filter(r=>r.length);if(o.length===0||o.length%2!==0)throw new Error("PWL(...) requires an even number of time/value pairs");const i=[];for(let r=0;r<o.length;r+=2){const s=EC(o[r]),a=EC(o[r+1]);if(Number.isNaN(s)||Number.isNaN(a))throw new Error("Invalid PWL() numeric value");i.push({t:s,v:a})}return i}function UEo(t,e){if(e<t.td)return t.v1;const n=e-t.td,o=Math.floor(n/t.period);if(o>=t.ncycles)return t.v1;const i=n-o*t.period;if(i<t.tr){const r=i/Math.max(t.tr,xp);return t.v1+(t.v2-t.v1)*r}if(i<t.tr+t.ton)return t.v2;if(i<t.tr+t.ton+t.tf){const r=(i-(t.tr+t.ton))/Math.max(t.tf,xp);return t.v2+(t.v1-t.v2)*r}return t.v1}function KEo(t,e){if(t.length===0)return 0;if(e<=t[0].t)return t[0].v;for(let n=1;n<t.length;n++){const o=t[n-1],i=t[n];if(e<=i.t){const r=Math.max(i.t-o.t,xp),s=(e-o.t)/r;return o.v+(i.v-o.v)*s}}return t[t.length-1].v}function VEo(t){const e=/"[^"]*"|\w+\s*\([^)]*\)|\([^()]*\)|\S+/g,n=[];let o;for(;(o=e.exec(t))!==null;)n.push(o[0]);return n}function $l(t,e,n){const o=t[e];if(o==null)throw new Error(n);return o}function zEo(t){const e=new Map,n=new Map,o={nodes:new OEo,R:[],C:[],L:[],V:[],S:[],D:[],analyses:{ac:null,tran:null},probes:{tran:[]},skipped:[],models:{vswitch:e,diode:n}},i=t.split(/\r?\n/);let r=!1;for(const a of i){let A=a.trim();if(!A||/^\*/.test(A))continue;if(/^\s*\.end\b/i.test(A))break;A=A.replace(/\/\/.*$/,""),A=A.replace(/;.*$/,"");const c=VEo(A);if(c.length===0)continue;const l=c[0];if(l.length===0)continue;if(!r&&!/^[rclvgsmiqd]\w*$/i.test(l)&&!/^\./.test(l)){r=!0;continue}if(/^\./.test(l)){const h=l.toLowerCase();if(h===".ac"){const d=$l(c,1,".ac missing mode").toLowerCase();if(d!=="dec"&&d!=="lin")throw new Error(".ac supports 'dec' or 'lin'");const p=parseInt($l(c,2,".ac missing point count"),10),m=EC($l(c,3,".ac missing start frequency")),_=EC($l(c,4,".ac missing stop frequency"));o.analyses.ac={mode:d,N:p,f1:m,f2:_}}else if(h===".tran"){const d=EC($l(c,1,".tran missing timestep")),p=EC($l(c,2,".tran missing stop time"));o.analyses.tran={dt:d,tstop:p}}else if(h===".print")if($l(c,1,".print missing analysis type").toLowerCase()==="tran"){const p=c.slice(2);for(const m of p){const _=m.match(/^v\(([^)]+)\)$/i);if(_&&_[1]){const f=_[1];o.probes.tran.some(I=>I.toUpperCase()===f.toUpperCase())||o.probes.tran.push(f)}}}else o.skipped.push(A);else if(h===".model"){const d=$l(c,1,".model missing name");let m=$l(c,2,".model missing type"),_="";if(m.includes("(")){const I=m.indexOf("(");_=m.slice(I+1),m=m.slice(0,I)}if(!_)_=c.slice(3).join(" ").replace(/^\(/,"").replace(/\)$/,"");else{const I=c.slice(3).join(" ").replace(/\)$/,"");_=`${_} ${I}`.trim()}_=_.replace(/^\(/,"").replace(/\)$/,"").trim();const f=m.toLowerCase();if(f==="vswitch"||f==="sw"){const I={name:d,Ron:1,Roff:1e12,Von:0,Voff:0};let C,y;if(_.length>0){const x=_.split(/[\s,]+/).filter(Boolean);for(const E of x){const[B,S]=E.split("=");if(!B||S==null)continue;const Q=B.toLowerCase(),w=EC(S);Number.isNaN(w)||(Q==="ron"?I.Ron=w:Q==="roff"?I.Roff=w:Q==="von"?I.Von=w:Q==="voff"?I.Voff=w:Q==="vt"?C=w:Q==="vh"&&(y=w))}}if(C!==void 0){const x=y??0;I.Von=C+x/2,I.Voff=C-x/2}e.set(d.toLowerCase(),I)}else if(f==="d"){const I={name:d,Is:1e-14,N:1};if(_.length>0){const C=_.split(/[\s,]+/).filter(Boolean);for(const y of C){const[x,E]=y.split("=");if(!x||E==null)continue;const B=x.toLowerCase(),S=EC(E);Number.isNaN(S)||(B==="is"?I.Is=S:B==="n"&&(I.N=S))}}n.set(d.toLowerCase(),I)}else o.skipped.push(A)}else o.skipped.push(A);continue}const u=l.charAt(0).toLowerCase(),g=l;try{if(u==="r"){const h=o.nodes.getOrCreate($l(c,1,"Resistor missing node")),d=o.nodes.getOrCreate($l(c,2,"Resistor missing node")),p=EC($l(c,3,"Resistor missing value"));o.R.push({name:g,n1:h,n2:d,R:p})}else if(u==="c"){const h=o.nodes.getOrCreate($l(c,1,"Capacitor missing node")),d=o.nodes.getOrCreate($l(c,2,"Capacitor missing node")),p=EC($l(c,3,"Capacitor missing value"));o.C.push({name:g,n1:h,n2:d,C:p,vPrev:0})}else if(u==="l"){const h=o.nodes.getOrCreate($l(c,1,"Inductor missing node")),d=o.nodes.getOrCreate($l(c,2,"Inductor missing node")),p=EC($l(c,3,"Inductor missing value"));o.L.push({name:g,n1:h,n2:d,L:p,iPrev:0})}else if(u==="v"){const h=o.nodes.getOrCreate($l(c,1,"Voltage source missing node")),d=o.nodes.getOrCreate($l(c,2,"Voltage source missing node")),p={dc:0,acMag:0,acPhaseDeg:0,waveform:null,index:-1};let m=3;for(m<c.length&&!/^[a-zA-Z]/.test(c[m])&&(p.dc=EC(c[m]),m++);m<c.length;){const _=c[m].toLowerCase();if(_==="dc"){const f=$l(c,m+1,"DC value missing");p.dc=EC(f),m+=2}else if(_==="ac"){const f=$l(c,m+1,"AC magnitude missing");p.acMag=EC(f);const I=c[m+2];I!=null&&/^[+-]?\d/.test(I)?(p.acPhaseDeg=EC(I),m+=3):m+=2}else if(_.startsWith("pulse")){const f=_.includes("(")?_:$l(c,m+1,"PULSE() missing arguments");if(!f||!/\(.*\)/.test(f))throw new Error("Malformed PULSE() specification");const I=GEo(f);p.waveform=C=>UEo(I,C),m+=_.includes("(")?1:2}else if(_.startsWith("pwl")){const f=_.includes("(")?_:$l(c,m+1,"PWL() missing arguments");if(!f||!/\(.*\)/.test(f))throw new Error("Malformed PWL() specification");const I=YEo(f);p.waveform=C=>KEo(I,C),m+=_.includes("(")?1:2}else/^\(.*\)$/.test(_),m++}o.V.push({name:g,n1:h,n2:d,dc:p.dc,acMag:p.acMag,acPhaseDeg:p.acPhaseDeg,waveform:p.waveform,index:p.index??-1})}else if(u==="s"){const h=o.nodes.getOrCreate($l(c,1,"Switch missing node")),d=o.nodes.getOrCreate($l(c,2,"Switch missing node")),p=o.nodes.getOrCreate($l(c,3,"Switch missing control node")),m=o.nodes.getOrCreate($l(c,4,"Switch missing control node")),_=$l(c,5,"Switch missing model");o.S.push({name:g,n1:h,n2:d,ncPos:p,ncNeg:m,modelName:_.toLowerCase(),model:null,isOn:!1})}else if(u==="d")if(c.length===4){const h=o.nodes.getOrCreate($l(c,1,"Diode missing node")),d=o.nodes.getOrCreate($l(c,2,"Diode missing node")),p=$l(c,3,"Diode missing model");o.D.push({name:g,nPlus:h,nMinus:d,modelName:p.toLowerCase(),model:null,vdPrev:0})}else o.skipped.push(A);else o.skipped.push(A)}catch(h){throw h instanceof Error?new Error(`Parse error on line: "${A}"
${h.message}`):h}}const s=o.nodes.count()-1;for(let a=0;a<o.V.length;a++){const A=o.V[a];A&&(A.index=s+a)}for(const a of o.S){const A=e.get(a.modelName);if(!A)throw new Error(`Unknown .model ${a.modelName} referenced by switch ${a.name}`);a.model=A,a.isOn=!1}for(const a of o.D){const A=n.get(a.modelName);if(!A)throw new Error(`Unknown .model ${a.modelName} referenced by diode ${a.name}`);a.model=A}return o}var ql=class dQ{re;im;constructor(e=0,n=0){this.re=e,this.im=n}static from(e,n=0){return new dQ(e,n)}static fromPolar(e,n=0){const o=n*Math.PI/180;return new dQ(e*Math.cos(o),e*Math.sin(o))}clone(){return new dQ(this.re,this.im)}add(e){return new dQ(this.re+e.re,this.im+e.im)}sub(e){return new dQ(this.re-e.re,this.im-e.im)}mul(e){return new dQ(this.re*e.re-this.im*e.im,this.re*e.im+this.im*e.re)}div(e){const n=e.re*e.re+e.im*e.im;if(n<xp)throw new Error("Complex divide by ~0");return new dQ((this.re*e.re+this.im*e.im)/n,(this.im*e.re-this.re*e.im)/n)}inv(){const e=this.re*this.re+this.im*this.im;if(e<xp)throw new Error("Complex invert by ~0");return new dQ(this.re/e,-this.im/e)}abs(){return Math.hypot(this.re,this.im)}phaseDeg(){return Math.atan2(this.im,this.re)*180/Math.PI}};function JEo(t,e){const n=t.length;for(let i=0;i<n;i++){const r=t[i],s=e[i];if(!r||!s)throw new Error("Matrix dimensions mismatch");const a=r.map(A=>A.clone());a.push(s.clone()),t[i]=a}for(let i=0;i<n;i++){let r=i;const s=t[i];if(!s)throw new Error("Matrix row missing");let a=s[i]?.abs()??0;for(let l=i+1;l<n;l++){const u=t[l];if(!u)throw new Error("Matrix row missing");const g=u[i]?.abs()??0;g>a&&(a=g,r=l)}if(a<xp)throw new Error("Singular matrix (complex)");if(r!==i){const l=t[i];t[i]=t[r],t[r]=l}const A=t[i];if(!A)throw new Error("Pivot row missing");const c=A[i];if(!c)throw new Error("Zero pivot encountered");for(let l=i+1;l<n;l++){const u=t[l];if(!u)throw new Error("Matrix row missing");const g=u[i];if(!g)continue;const h=g.div(c);if(!(h.abs()<xp))for(let d=i;d<=n;d++){const p=u[d],m=A[d];!p||!m||(u[d]=p.sub(h.mul(m)))}}}const o=new Array(n);for(let i=n-1;i>=0;i--){const r=t[i];if(!r)throw new Error("Matrix row missing");let s=r[n];if(!s)throw new Error("Augmented column missing");for(let A=i+1;A<n;A++){const c=r[A],l=o[A];!c||!l||(s=s.sub(c.mul(l)))}const a=r[i];if(!a)throw new Error("Zero pivot on back-substitution");o[i]=s.div(a)}return o}function WEo(t,e,n){if(t<=0||e<=0)throw new Error(".ac frequencies must be > 0");e<t&&([t,e]=[e,t]);const o=Math.log10(e/t),i=Math.max(1,Math.ceil(o*n)),r=[];for(let a=0;a<=i;a++)r.push(t*Math.pow(10,a/n));const s=r[r.length-1];return(s==null||s<e*(1-xp))&&r.push(e),r}function Cwe(t,e,n,o,i){const r=e.matrixIndexOfNode(n),s=e.matrixIndexOfNode(o);if(r>=0){const a=t[r];if(!a)throw new Error("Matrix row missing while stamping");a[r]=a[r]?.add(i)??i}if(s>=0){const a=t[s];if(!a)throw new Error("Matrix row missing while stamping");a[s]=a[s]?.add(i)??i}if(r>=0&&s>=0){const a=t[r],A=t[s];if(!a||!A)throw new Error("Matrix row missing while stamping");a[s]=a[s]?.sub(i)??ql.from(0,0).sub(i),A[r]=A[r]?.sub(i)??ql.from(0,0).sub(i)}}function jEo(t,e,n,o,i){const r=n.matrixIndexOfNode(o.n1),s=n.matrixIndexOfNode(o.n2),a=o.index,A=ql.from(1,0),c=ql.from(-1,0);if(r>=0){const u=t[r];if(!u)throw new Error("Matrix row missing while stamping voltage source");u[a]=u[a]?.add(A)??A}if(s>=0){const u=t[s];if(!u)throw new Error("Matrix row missing while stamping voltage source");u[a]=u[a]?.sub(A)??c}const l=t[a];if(!l)throw new Error("Branch row missing while stamping voltage source");r>=0&&(l[r]=l[r]?.add(A)??A),s>=0&&(l[s]=l[s]?.sub(A)??c),e[a]=(e[a]??ql.from(0,0)).add(i)}function $Eo(t){const{mode:e,N:n,f1:o,f2:i}=t;if(e==="dec")return WEo(o,i,n);const r=[],s=Math.max(2,n),a=(i-o)/(s-1);for(let A=0;A<s;A++)r.push(o+A*a);return r}function qEo(t,e,n){const o=Array.from({length:n},()=>Array.from({length:n},()=>ql.from(0,0))),i=Array.from({length:n},()=>ql.from(0,0)),r=2*Math.PI;for(const s of t.R){if(s.R<=0)throw new Error(`R ${s.name} must be > 0`);const a=ql.from(1/s.R,0);Cwe(o,t.nodes,s.n1,s.n2,a)}for(const s of t.C){const a=ql.from(0,r*e*s.C);Cwe(o,t.nodes,s.n1,s.n2,a)}for(const s of t.L){const a=ql.from(0,r*e*s.L),A=a.abs()<xp?ql.from(0,0):ql.from(1,0).div(a);Cwe(o,t.nodes,s.n1,s.n2,A)}for(const s of t.V){const a=ql.fromPolar(s.acMag||0,s.acPhaseDeg||0);jEo(o,i,t.nodes,s,a)}return{A:o,b:i}}function XEo(t){if(!t.analyses.ac)return null;const{mode:e,N:n,f1:o,f2:i}=t.analyses.ac,r=t.nodes.count()-1,s=t.V.length,a=r+s,A=$Eo({mode:e,N:n,f1:o,f2:i}),c={};t.nodes.rev.forEach((g,h)=>{h!==0&&(c[g]=[])});const l={},u=2*Math.PI;for(const g of A){const{A:h,b:d}=qEo(t,g,a),p=JEo(h,d);for(let m=1;m<t.nodes.count();m++){const _=m-1,f=t.nodes.rev[m];if(!f)continue;const I=c[f];I&&I.push(p[_]??ql.from(0,0))}for(const m of t.R){const _=m.n1===0?ql.from(0,0):p[m.n1-1]??ql.from(0,0),f=m.n2===0?ql.from(0,0):p[m.n2-1]??ql.from(0,0),C=ql.from(1/m.R,0).mul(_.sub(f));(l[m.name]||=[]).push(C)}for(const m of t.C){const _=m.n1===0?ql.from(0,0):p[m.n1-1]??ql.from(0,0),f=m.n2===0?ql.from(0,0):p[m.n2-1]??ql.from(0,0),C=ql.from(0,u*g*m.C).mul(_.sub(f));(l[m.name]||=[]).push(C)}for(const m of t.L){const _=m.n1===0?ql.from(0,0):p[m.n1-1]??ql.from(0,0),f=m.n2===0?ql.from(0,0):p[m.n2-1]??ql.from(0,0),I=ql.from(0,u*g*m.L),y=(I.abs()<xp?ql.from(0,0):ql.from(1,0).div(I)).mul(_.sub(f));(l[m.name]||=[]).push(y)}for(const m of t.V){const _=p[m.index]??ql.from(0,0);(l[m.name]||=[]).push(_)}}return{freqs:A,nodeVoltages:c,elementCurrents:l}}var Uwt=.02585;function ZEo(t,e){const n=t.length;for(let i=0;i<n;i++){const r=t[i],s=e[i];if(!r||s==null)throw new Error("Matrix dimensions mismatch");const a=r.slice();a.push(s),t[i]=a}for(let i=0;i<n;i++){let r=i;const s=t[i];if(!s)throw new Error("Matrix row missing");let a=Math.abs(s[i]??0);for(let l=i+1;l<n;l++){const u=t[l];if(!u)throw new Error("Matrix row missing");const g=Math.abs(u[i]??0);g>a&&(a=g,r=l)}if(a<xp)throw new Error("Singular matrix (real)");if(r!==i){const l=t[i];t[i]=t[r],t[r]=l}const A=t[i];if(!A)throw new Error("Pivot row missing");const c=A[i];if(c==null)throw new Error("Zero pivot encountered");for(let l=i+1;l<n;l++){const u=t[l];if(!u)throw new Error("Matrix row missing");const g=u[i];if(g==null)continue;const h=g/c;if(!(Math.abs(h)<xp))for(let d=i;d<=n;d++){const p=u[d],m=A[d];p==null||m==null||(u[d]=p-h*m)}}}const o=new Array(n).fill(0);for(let i=n-1;i>=0;i--){const r=t[i];if(!r)throw new Error("Matrix row missing");let s=r[n];if(s==null)throw new Error("Augmented column missing");for(let A=i+1;A<n;A++){const c=r[A],l=o[A];c==null||l==null||(s-=c*l)}const a=r[i];if(a==null)throw new Error("Zero pivot on back-substitution");o[i]=s/a}return o}function bj(t,e,n,o,i){const r=e.matrixIndexOfNode(n),s=e.matrixIndexOfNode(o);if(r>=0){const a=t[r];if(!a)throw new Error("Matrix row missing while stamping");a[r]=(a[r]??0)+i}if(s>=0){const a=t[s];if(!a)throw new Error("Matrix row missing while stamping");a[s]=(a[s]??0)+i}if(r>=0&&s>=0){const a=t[r],A=t[s];if(!a||!A)throw new Error("Matrix row missing while stamping");a[s]=(a[s]??0)-i,A[r]=(A[r]??0)-i}}function ywe(t,e,n,o,i){const r=e.matrixIndexOfNode(n),s=e.matrixIndexOfNode(o);r>=0&&(t[r]=(t[r]??0)-i),s>=0&&(t[s]=(t[s]??0)+i)}function e5o(t,e,n,o,i){const r=n.matrixIndexOfNode(o.n1),s=n.matrixIndexOfNode(o.n2),a=o.index;if(r>=0){const c=t[r];if(!c)throw new Error("Matrix row missing while stamping voltage source");c[a]=(c[a]??0)+1}if(s>=0){const c=t[s];if(!c)throw new Error("Matrix row missing while stamping voltage source");c[a]=(c[a]??0)-1}const A=t[a];if(!A)throw new Error("Branch row missing while stamping voltage source");r>=0&&(A[r]=(A[r]??0)+1),s>=0&&(A[s]=(A[s]??0)-1),e[a]=(e[a]??0)+i}function t5o(t,e){const n=t>xp?t:Math.max(e/1e3,xp),o=Math.max(1,Math.ceil(e/Math.max(n,xp)));return{dt:o>0?e/o:e,steps:o}}function n5o(t,e,n,o,i,r,s){for(const a of n.R){const A=1/a.R;bj(t,n.nodes,a.n1,a.n2,A)}for(const a of n.C){const A=a.C/Math.max(i,xp);bj(t,n.nodes,a.n1,a.n2,A);const c=-A*a.vPrev;ywe(e,n.nodes,a.n1,a.n2,c)}for(const a of n.L){const A=Math.max(i,xp)/a.L;bj(t,n.nodes,a.n1,a.n2,A),ywe(e,n.nodes,a.n1,a.n2,a.iPrev)}for(const a of n.S){const A=a.model;if(!A)continue;const c=a.isOn?A.Ron:A.Roff,u=1/Math.max(Math.abs(c),xp);bj(t,n.nodes,a.n1,a.n2,u)}for(const a of n.V){const A=a.waveform?a.waveform(o):a.dc||0;e5o(t,e,n.nodes,a,A)}for(const a of n.D){const A=a.model;if(!A)continue;const{nPlus:c,nMinus:l}=a,u=n.nodes.matrixIndexOfNode(c),g=n.nodes.matrixIndexOfNode(l),h=c===0?0:r[u]??0,d=l===0?0:r[g]??0,p=h-d,m=s===0?a.vdPrev:p,_=A.N*Uwt;let f=m;m>.8&&(f=.8),m<-1&&(f=-1);const I=Math.exp(f/_),C=A.Is*(I-1),y=Math.max(A.Is/_*I,1e-12),x=C-y*f;bj(t,n.nodes,c,l,y),ywe(e,n.nodes,c,l,x)}}function o5o(t,e){let n=!1;for(const o of t.S){const i=o.model;if(!i)continue;const r=o.ncPos===0?0:e[o.ncPos-1]??0,s=o.ncNeg===0?0:e[o.ncNeg-1]??0,a=r-s;let A=o.isOn;o.isOn?a<i.Voff&&(A=!1):a>i.Von&&(A=!0),A!==o.isOn&&(o.isOn=A,n=!0)}return n}function i5o(t){if(!t.analyses.tran)return null;const{dt:e,tstop:n}=t.analyses.tran,{dt:o,steps:i}=t5o(e,n),r=t.nodes.count()-1,s=t.V.length,a=r+s,A=[],c={};t.nodes.rev.forEach((g,h)=>{h!==0&&(c[g]=[])});const l={};let u=0;for(let g=0;g<=i;g++,u=g*o){A.push(u);let h=new Array(a).fill(0);for(let d=0;d<20;d++){const p=Array.from({length:a},()=>new Array(a).fill(0)),m=new Array(a).fill(0);if(n5o(p,m,t,u,o,h,d),h=ZEo(p,m),!o5o(t,h)||d===19)break}for(let d=1;d<t.nodes.count();d++){const p=d-1,m=t.nodes.rev[d];if(!m)continue;const _=c[m];_&&_.push(h[p]??0)}for(const d of t.R){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,_=(p-m)/d.R;(l[d.name]||=[]).push(_)}for(const d of t.C){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,_=d.C*(p-m-d.vPrev)/Math.max(o,xp);(l[d.name]||=[]).push(_)}for(const d of t.L){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,f=Math.max(o,xp)/d.L*(p-m)+d.iPrev;(l[d.name]||=[]).push(f)}for(const d of t.V){const p=h[d.index]??0;(l[d.name]||=[]).push(p)}for(const d of t.S){const p=d.model;if(!p)continue;const m=d.n1===0?0:h[d.n1-1]??0,_=d.n2===0?0:h[d.n2-1]??0,f=d.isOn?p.Ron:p.Roff,I=Math.max(Math.abs(f),xp),C=(m-_)/I;(l[d.name]||=[]).push(C)}for(const d of t.D){if(!d.model)continue;const{nPlus:p,nMinus:m,model:_}=d,f=p===0?0:h[p-1]??0,I=m===0?0:h[m-1]??0,C=f-I,y=_.N*Uwt,x=Math.exp(C/y),E=_.Is*(x-1);(l[d.name]||=[]).push(E)}for(const d of t.C){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0;d.vPrev=p-m}for(const d of t.L){const p=d.n1===0?0:h[d.n1-1]??0,m=d.n2===0?0:h[d.n2-1]??0,_=Math.max(o,xp)/d.L;d.iPrev=_*(p-m)+d.iPrev}for(const d of t.D){const p=d.nPlus===0?0:h[d.nPlus-1]??0,m=d.nMinus===0?0:h[d.nMinus-1]??0;d.vdPrev=p-m}}if(t.probes.tran.length>0){const g={},h=t.probes.tran.map(d=>d.toUpperCase());for(const d in c)h.includes(d.toUpperCase())&&(g[d]=c[d]);return{times:A,nodeVoltages:g,elementCurrents:l}}return{times:A,nodeVoltages:c,elementCurrents:l}}function r5o(t){const e=zEo(t),n=XEo(e),o=i5o(e);return{circuit:e,ac:n,tran:o}}function s5o(t,e,n){if(!t||!e.analyses.tran)return[];const{dt:o,tstop:i}=e.analyses.tran,{times:r,nodeVoltages:s}=t,a=[];for(const A in s){const c=s[A];a.push({type:"simulation_transient_voltage_graph",simulation_transient_voltage_graph_id:`stvg_${n}_${A}`,simulation_experiment_id:n,timestamps_ms:r.map(l=>l*1e3),voltage_levels:c,time_per_step:o*1e3,start_time_ms:0,end_time_ms:i*1e3,name:`${A}`})}return a}var xwe=class{sourceSpan;leadingTrivia=[];trailingComment;constructor(t={}){this.sourceSpan=t.sourceSpan,this.trailingComment=t.trailingComment}getString(t){return this.toSource(t)}},Kwt="__default__",Cb=class Zte extends xwe{originalSource;constructor(e={}){super(e),this.originalSource=e.originalSource}static classes={};static register(e){if(!e.spiceTokenKeys||e.spiceTokenKeys.length===0)throw new Error("Class must declare static spiceTokenKeys");for(const n of e.spiceTokenKeys)Zte.classes[n.toLowerCase()]=e}static parseSpiceTokens(e){const n=e.tokens.find(r=>r.type!=="whitespace"),o=n===void 0?"blank":n.type==="directive"?`.${n.value}`:n.type==="comment"?"comment":n.type==="identifier"?n.raw[0]?.toUpperCase()??Kwt:n.type,i=Zte.classes[o.toLowerCase()]??(n?.type==="identifier"?Zte.classes.__unknown_element__:void 0)??Zte.classes[Kwt];if(i===void 0)throw new Error(`No SPICE card class registered for "${o}"`);return i.fromSpiceTokens(e)}},Zc=class extends Cb{cardKind="directive"},yb=class extends Zc{},Vwt=class extends xwe{};function Sj(t,e){const n=t?.dialect??"generic";if(n!=="pspice")throw new Error(`PSpice-only construct ${e} cannot be serialized to target dialect "${n}". Serialize with { dialect: "pspice" } or translate/remove the construct before exporting.`)}function a5o(t){const e=[];let n=[],o,i;const r=a=>{e.push({tokens:[],originalSource:"",range:{start:a.range.end,end:a.range.end},leadingNewlineRaw:a.raw})},s=()=>{if(n.length===0)return;const a={start:n[0].range.start,end:n.at(-1).range.end};e.push({tokens:n,originalSource:n.map(A=>A.raw).join(""),range:a,leadingNewlineRaw:i}),n=[],o=void 0,i=void 0};for(const a of t){if(a.type==="newline"){if(o!==void 0){const A=o;s(),r(A),o=a;continue}n.length===0?r(a):o=a;continue}if(o!==void 0){if(a.type==="continuation")n.push(o,a),o=void 0;else{const A=o.raw;s(),i=A,o=void 0,n.push(a)}continue}if(a.type==="continuation"){n.push(a);continue}n.push(a)}return s(),e}function Ewe(t){return t.filter(e=>e.type!=="whitespace"&&e.type!=="newline"&&e.type!=="continuation")}function zwt(t){if(t!==void 0)return"value"in t&&typeof t.value=="string"?t.value:t.raw}function A5o(t){const e=[];for(let n=0;n<t.length;n+=1){const o=t[n];if(o===void 0)continue;const i=Bwe(o);if(i===".control"){const r=[];let s,a=o.originalSource;for(n+=1;n<t.length;n+=1){const A=t[n];if(A!==void 0){if(a=`${a}${A.leadingNewlineRaw??`
`}${A.originalSource}`,Bwe(A)===".endc"){s=A;break}r.push(A)}}e.push({...o,childCards:r,endCard:s,originalSource:a});continue}if(i===".subckt"){const r=[];let s,a=o.originalSource;for(n+=1;n<t.length;n+=1){const A=t[n];if(A!==void 0){if(a=`${a}${A.leadingNewlineRaw??`
`}${A.originalSource}`,Bwe(A)===".ends"){s=A;break}r.push(A)}}e.push({...o,childCards:r,endCard:s,originalSource:a});continue}e.push(o)}return e}function Bwe(t){const[e]=Ewe(t.tokens);if(e!==void 0)return e.type==="directive"?`.${e.value}`:zwt(e)}function aw(t){return zwt(t)}function Jwt(t){return t.type==="punctuation"&&(t.value==="("||t.value===")"||t.value===",")}var kA=class B5n{constructor(e){this.card=e,this.tokens=Ewe(e.tokens),this.originalSource=e.originalSource}card;tokens;originalSource;static from(e){return new B5n(e)}head(){return aw(this.tokens[0])??""}headRaw(){return this.tokens[0]?.raw??""}headDesignator(){return this.tokens[0]?.raw[0]?.toUpperCase()??""}arg(e){return aw(this.tokens[e+1])}args(){return this.tokens.slice(1).map(e=>aw(e)??e.raw)}argsAfter(e){return this.args().slice(e)}argsUntilLast(){return this.args().slice(0,-1)}lastArg(){return this.args().at(-1)}keywordIndex(e){return this.findKeyword(e)?.argIndex??-1}argAfterKeyword(e){const n=this.findKeyword(e);return n===void 0?void 0:aw(this.tokens[n.tokenIndex+n.tokenCount])}hasKeyword(e){return this.findKeyword(e)!==void 0}sweepArg(e,n){const o=this.arg(e)?.toLowerCase();return o==="oct"||o==="lin"||o==="dec"?o:n}paramsAfter(e){return this.readParamsFrom(1+e)}paramAfter(e,n){const o=n.toLowerCase();return this.paramsAfter(e).find(([i])=>i.toLowerCase()===o)?.[1]}paramsAfterExcept(e,n){const o=new Set(n.map(i=>i.toLowerCase()));return this.paramsAfter(e).filter(([i])=>!o.has(i.toLowerCase()))}paramsAfterKeyword(e){const n=this.findKeyword(e);if(n!==void 0)return this.readParamsFrom(n.tokenIndex+n.tokenCount)}argsBeforeKeyword(e,n=0){const i=this.findKeyword(e,n)?.tokenIndex??this.tokens.length;return this.tokens.slice(1+n,i).map(r=>aw(r)??r.raw)}restJoined(e){return this.argsAfter(e).join(" ")}findKeyword(e,n=0){const o=e.endsWith(":"),i=o?e.slice(0,-1):e;for(let r=1+n;r<this.tokens.length;r+=1){const s=this.tokens[r],a=aw(s);if(a!==void 0&&a.toLowerCase()===i.toLowerCase()){if(o){const A=this.tokens[r+1];if(A?.type!=="punctuation"||A.value!==":")continue;return{argIndex:r-1,tokenIndex:r,tokenCount:2}}return{argIndex:r-1,tokenIndex:r,tokenCount:1}}}}readParamsFrom(e){const n=[];let o=e;for(;o<this.tokens.length;){const i=this.tokens[o];if(i===void 0)break;if(Jwt(i)){o+=1;continue}const r=this.tokens[o+1],s=this.tokens[o+2];if(r?.type==="operator"&&r.value==="="&&s!==void 0&&!Jwt(s)){const a=aw(i),A=aw(s);a!==void 0&&A!==void 0&&n.push([a,A]),o+=3;continue}o+=1}return n}},Wwt=class b5n{name;constructor(e){this.name=e}static ground(){return new b5n("0")}getString(){return this.name}},jwt=class{raw;constructor(t){this.raw=t}getString(){return this.raw}},r0e=class{raw;constructor(t){this.raw=String(t)}getString(){return this.raw}};function $wt(t){return t instanceof Wwt?t:new Wwt(t)}function Tg(t){return t instanceof r0e?t:t instanceof jwt?new r0e(t.getString()):new r0e(t)}function c5o(t){return typeof t=="object"&&!(t instanceof r0e)&&!(t instanceof jwt)?{magnitude:t.magnitude===void 0?void 0:Tg(t.magnitude),phase:t.phase===void 0?void 0:Tg(t.phase)}:{magnitude:Tg(t)}}var Qj=class S5n{values;constructor(e=[]){e instanceof S5n?this.values=e.entries():Array.isArray(e)?this.values=e.map(([n,o])=>[n,Tg(o)]):this.values=Object.entries(e).map(([n,o])=>[n,Tg(o)])}get(e){return this.values.find(([n])=>n.toLowerCase()===e.toLowerCase())?.[1]}set(e,n){const o=this.values.findIndex(([r])=>r.toLowerCase()===e.toLowerCase()),i=[e,Tg(n)];o===-1?this.values.push(i):this.values[o]=i}delete(e){const n=this.values.findIndex(([o])=>o.toLowerCase()===e.toLowerCase());return n===-1?!1:(this.values.splice(n,1),!0)}entries(){return this.values.map(([e,n])=>[e,n])}getString(e){return this.values.map(([n,o])=>`${n}=${o.getString()}`).join(" ")}get isEmpty(){return this.values.length===0}},qwt=class Q5n extends yb{static spiceTokenKeys=[".ac"];type="ac";command=".ac";sweep;points;start;stop;constructor(e){super(e),this.sweep=e.sweep,this.points=e.points,this.start=Tg(e.start),this.stop=Tg(e.stop)}static fromSpiceTokens(e){const n=kA.from(e);return new Q5n({sweep:n.sweepArg(0,"dec"),points:Number(n.arg(1)??0),start:n.arg(2)??"",stop:n.arg(3)??"",originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:`${this.command} ${this.sweep} ${this.points} ${this.start.getString()} ${this.stop.getString()}`}};yb.register(qwt);var l5o=class v5n extends Zc{static spiceTokenKeys=[".control"];type="control";command=".control";lines;constructor(e){super(e),this.lines=e.lines}static fromSpiceTokens(e){const n=kA.from(e);return new v5n({lines:e.childCards?.map(o=>o.originalSource)??[],originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.lines,".endc"].join(`
`)}};Zc.register(l5o);var Xwt=class w5n extends yb{static spiceTokenKeys=[".dc"];type="dc";command=".dc";sweeps;constructor(e){super(e);const n="sweeps"in e?e.sweeps:[e];this.sweeps=n.map(o=>({source:o.source,start:Tg(o.start),stop:Tg(o.stop),step:Tg(o.step)}))}static fromSpiceTokens(e){const n=kA.from(e);return new w5n({source:n.arg(0)??"",start:n.arg(1)??"",stop:n.arg(2)??"",step:n.arg(3)??"",originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.sweeps.flatMap(n=>[n.source,n.start.getString(),n.stop.getString(),n.step.getString()])].join(" ")}};yb.register(Xwt);var vj=class P5n extends Zc{static spiceTokenKeys=[".end"];type="end";command=".end";static fromSpiceTokens(e){return new P5n({originalSource:kA.from(e).originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:this.command}};Zc.register(vj);var u5o=class M5n extends Zc{static spiceTokenKeys=[".include"];type="include";command=".include";path;constructor(e,n={}){super(n),this.path=typeof e=="string"?e:e.path}static fromSpiceTokens(e){const n=kA.from(e);return new M5n(n.restJoined(0),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:`${this.command} ${this.path}`}};Zc.register(u5o);var g5o=class D5n extends Zc{static spiceTokenKeys=[".lib"];type="lib";command=".lib";path;section;constructor(e={}){super(e),this.path=e.path,this.section=e.section}static fromSpiceTokens(e){const n=kA.from(e);return new D5n({path:n.arg(0),section:n.arg(1),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,this.path,this.section].filter(Boolean).join(" ")}};Zc.register(g5o);var d5o=class N5n extends Zc{static spiceTokenKeys=[".measure"];type="measure";command=".measure";analysis;name;expression;constructor(e){super(e),this.analysis=e.analysis,this.name=e.name,this.expression=e.expression}static fromSpiceTokens(e){const n=kA.from(e);return new N5n({analysis:n.arg(0),name:n.arg(1)??"",expression:n.restJoined(2),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,this.analysis,this.name,this.expression].filter(Boolean).join(" ")}};Zc.register(d5o);var Zwt=class R5n extends Zc{static spiceTokenKeys=[".model"];type="model";command=".model";name;modelType;params;constructor(e){super(e),this.name=e.name,this.modelType=e.type,this.params=new Qj(e.params)}static fromSpiceTokens(e){const n=kA.from(e);return new R5n({name:n.arg(0)??"",type:n.arg(1)??"",params:n.paramsAfter(2),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){if(e?.format!=="pretty"&&this.originalSource!==void 0)return this.originalSource;const n=this.params.getString(e);return[this.command,this.name,this.modelType,n&&`(${n})`].filter(Boolean).join(" ")}};Zc.register(Zwt);var ePt=class T5n extends yb{static spiceTokenKeys=[".op"];type="op";command=".op";static fromSpiceTokens(e){return new T5n({originalSource:kA.from(e).originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:this.command}};yb.register(ePt);var tPt=class k5n extends Zc{static spiceTokenKeys=[".options"];type="options";command=".options";values;constructor(e,n={}){super(n),this.values=new Qj(e)}static fromSpiceTokens(e){const n=kA.from(e);return new k5n(n.paramsAfter(0),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:`${this.command} ${this.values.getString(e)}`.trimEnd()}};Zc.register(tPt);var h5o=class F5n extends Zc{static spiceTokenKeys=[".param"];type="param";command=".param";values;constructor(e,n={}){super(n),this.values=new Qj(e)}static fromSpiceTokens(e){const n=kA.from(e);return new F5n(n.paramsAfter(0),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:`${this.command} ${this.values.getString(e)}`.trimEnd()}};Zc.register(h5o);function p5o(t){const e=t.trim().replace(/^\.print\s+/i,""),[n,...o]=e.split(/\s+/),i=o.join(" ");return{analysis:n,expressions:i.length===0?[]:i.split(",").map(r=>r.trim())}}var nPt=class L5n extends Zc{static spiceTokenKeys=[".print"];type="print";command=".print";analysis;expressions;constructor(e={}){super(e),this.analysis=e.analysis,this.expressions=e.expressions??[]}static fromSpiceTokens(e){const n=kA.from(e);return new L5n({...p5o(n.originalSource),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,this.analysis,this.expressions.length>0?this.expressions.join(", "):void 0].filter(Boolean).join(" ")}};Zc.register(nPt);var m5o=class H5n extends Zc{static spiceTokenKeys=[".probe"];type="probe";command=".probe";expressions;constructor(e=[],n={}){super(n),this.expressions=e}static fromSpiceTokens(e){const n=kA.from(e);return new H5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.expressions].join(" ")}};Zc.register(m5o);var _5o=class O5n extends Zc{static spiceTokenKeys=[".text"];type="pspice_text";command=".TEXT";args;constructor(e,n={}){super(n),this.args=e}static fromSpiceTokens(e){const n=kA.from(e);return new O5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return Sj(e,".TEXT"),e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(" ")}};Zc.register(_5o);var f5o=class G5n extends Zc{static spiceTokenKeys=[".vector"];type="pspice_vector";command=".VECTOR";args;constructor(e,n={}){super(n),this.args=e}static fromSpiceTokens(e){const n=kA.from(e);return new G5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return Sj(e,".VECTOR"),e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(" ")}};Zc.register(f5o);var I5o=class Y5n extends Zc{static spiceTokenKeys=[".watch"];type="pspice_watch";command=".WATCH";args;constructor(e,n={}){super(n),this.args=e}static fromSpiceTokens(e){const n=kA.from(e);return new Y5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return Sj(e,".WATCH"),e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(" ")}};Zc.register(I5o);var oPt=class U5n extends Zc{static spiceTokenKeys=[".save"];type="save";command=".save";expressions;constructor(e,n={}){super(n),this.expressions=e}static fromSpiceTokens(e){const n=kA.from(e);return new U5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.expressions].join(" ")}};Zc.register(oPt);var iPt=class K5n extends Zc{static spiceTokenKeys=[".subckt"];type="subckt";command=".subckt";name;pins;params;cards;endsName;constructor(e){super(e),this.name=e.name,this.pins=(e.pins??[]).map($wt),this.params=new Qj(e.params),this.cards=e.cards??[],this.endsName=e.endsName}static fromSpiceTokens(e){const n=kA.from(e),o=e.endCard===void 0?void 0:kA.from(e.endCard);return new K5n({name:n.arg(0)??"",pins:n.argsBeforeKeyword("params:",1),params:n.paramsAfterKeyword("params:"),cards:e.childCards?.map(i=>Cb.parseSpiceTokens(i)),endsName:o?.arg(0),originalSource:n.originalSource})}add(e){this.cards.push(e)}getChildren(){return this.cards}toSource(e){if(e?.format!=="pretty"&&this.originalSource!==void 0)return this.originalSource;const n=this.params.getString(e);return[[this.command,this.name,...this.pins.map(o=>o.getString()),n?"params:":void 0,n||void 0].filter(o=>o!==void 0).join(" "),...this.cards.map(o=>o.toSource(e)),[".ends",this.endsName??this.name].join(" ")].join(`
`)}};Zc.register(iPt);var C5o=class V5n extends Zc{static spiceTokenKeys=[".temp"];type="temp";command=".temp";values;constructor(e,n={}){super(n),this.values=e.map(Tg)}static fromSpiceTokens(e){const n=kA.from(e);return new V5n(n.args(),{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.values.map(n=>n.getString())].join(" ")}};Zc.register(C5o);var rPt=class z5n extends yb{static spiceTokenKeys=[".tran"];type="tran";command=".tran";step;stop;start;maxStep;uic;pspiceOp;constructor(e){super(e),this.step=e.step===void 0?void 0:Tg(e.step),this.stop=Tg(e.stop),this.start=e.start===void 0?void 0:Tg(e.start),this.maxStep=e.maxStep===void 0?void 0:Tg(e.maxStep),this.uic=e.uic,this.pspiceOp=e.pspiceOp??!1}static fromSpiceTokens(e){const n=kA.from(e);return new z5n({step:n.arg(0),stop:n.arg(1)??"",start:n.arg(2),maxStep:n.arg(3),uic:n.hasKeyword("uic"),pspiceOp:n.originalSource.trimStart().toLowerCase().startsWith(".tran/op"),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return this.pspiceOp&&Sj(e,".TRAN/OP"),e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,this.step?.getString(),this.stop.getString(),this.start?.getString(),this.maxStep?.getString(),this.uic?"UIC":void 0].filter(Boolean).join(" ")}};yb.register(rPt);var y5o=class J5n extends Zc{static spiceTokenKeys=["__default__"];type="unknown_dot_command";command;args;constructor(e){super(e),this.command=e.command,this.args=e.args}static fromSpiceTokens(e){const n=kA.from(e);return new J5n({command:n.headRaw(),args:n.args(),originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:[this.command,...this.args].join(" ")}};Zc.register(y5o);var wu=class extends Cb{cardKind="element";name;nodes;params;constructor(t){super(t),this.name=t.name,this.nodes=(t.nodes??[]).map($wt),this.params=new Qj(t.params)}renameNode(t,e){for(const n of this.nodes)n.name===t&&(n.name=e)}getChildren(){return[]}formatParts(t,e){if(e?.format!=="pretty"&&this.originalSource!==void 0)return this.originalSource;const n=this.params.getString(e);return[...t,n||void 0].filter(o=>o!==void 0&&o.length>0).join(" ")}},x5o=class W5n extends wu{static spiceTokenKeys=["Q"];type="bjt";model;constructor(e){super({...e,nodes:e.nodes.filter(n=>n!==void 0)}),this.model=e.model}static fromSpiceTokens(e){const n=kA.from(e),o=n.args().length>4,i=o?[n.arg(0)??"",n.arg(1)??"",n.arg(2)??"",n.arg(3)??""]:[n.arg(0)??"",n.arg(1)??"",n.arg(2)??""],r=o?4:3;return new W5n({name:n.head(),nodes:i,model:n.arg(r)??"",params:n.paramsAfter(r+1),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.model],e)}};wu.register(x5o);var E5o=class j5n extends wu{static spiceTokenKeys=["C"];type="capacitor";capacitance;initialCondition;constructor(e){super(e),this.capacitance=Tg(e.capacitance),this.initialCondition=e.ic===void 0?void 0:Tg(e.ic)}static fromSpiceTokens(e){const n=kA.from(e);return new j5n({name:n.head(),nodes:[n.arg(0)??"",n.arg(1)??""],capacitance:n.arg(2)??"",ic:n.paramAfter(3,"ic"),params:n.paramsAfterExcept(3,["ic"]),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.capacitance.getString(),this.initialCondition===void 0?void 0:`IC=${this.initialCondition.getString()}`],e)}};wu.register(E5o);var B5o=class $5n extends wu{static spiceTokenKeys=["F"];type="cccs";source;gain;constructor(e){super({...e,nodes:e.output}),this.source=e.source,this.gain=Tg(e.gain)}static fromSpiceTokens(e){const n=kA.from(e);return new $5n({name:n.head(),output:[n.arg(0)??"",n.arg(1)??""],source:n.arg(2)??"",gain:n.arg(3)??"",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.source,this.gain.getString()],e)}};wu.register(B5o);var b5o=class q5n extends wu{static spiceTokenKeys=["H"];type="ccvs";source;transresistance;constructor(e){super({...e,nodes:e.output}),this.source=e.source,this.transresistance=Tg(e.transresistance)}static fromSpiceTokens(e){const n=kA.from(e);return new q5n({name:n.head(),output:[n.arg(0)??"",n.arg(1)??""],source:n.arg(2)??"",transresistance:n.arg(3)??"",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.source,this.transresistance.getString()],e)}};wu.register(b5o);function sPt(t){const e={},n=t.argAfterKeyword("dc"),o=t.keywordIndex("ac");return n!==void 0?e.dc=n:o===-1&&(e.dc=t.arg(2)),o!==-1&&(e.ac={magnitude:t.arg(o+1),phase:t.arg(o+2)}),e}var s0e=class extends wu{dc;ac;transient;constructor(t){super(t),this.dc=t.dc===void 0?void 0:Tg(t.dc),this.ac=t.ac===void 0?void 0:c5o(t.ac),this.transient=t.transient}getChildren(){return this.transient===void 0?[]:[this.transient]}sourceParts(){const t=[this.name,...this.nodes.map(e=>e.getString())];return this.dc!==void 0&&t.push("DC",this.dc.getString()),this.ac!==void 0&&(t.push("AC"),this.ac.magnitude!==void 0&&t.push(this.ac.magnitude.getString()),this.ac.phase!==void 0&&t.push(this.ac.phase.getString())),this.transient!==void 0&&t.push(this.transient.toSource()),t}},S5o=class X5n extends s0e{static spiceTokenKeys=["I"];type="current_source";static fromSpiceTokens(e){const n=kA.from(e),o=sPt(n);return new X5n({name:n.head(),nodes:[n.arg(0)??"",n.arg(1)??""],dc:o.dc,ac:o.ac,originalSource:n.originalSource})}toSource(e){return this.formatParts(this.sourceParts(),e)}};s0e.register(S5o);var Q5o=class Z5n extends wu{static spiceTokenKeys=["D"];type="diode";model;constructor(e){super(e),this.model=e.model}static fromSpiceTokens(e){const n=kA.from(e);return new Z5n({name:n.head(),nodes:[n.arg(0)??"",n.arg(1)??""],model:n.arg(2)??"",params:n.paramsAfter(3),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.model],e)}};wu.register(Q5o);var v5o=class e4n extends wu{static spiceTokenKeys=["L"];type="inductor";inductance;initialCondition;constructor(e){super(e),this.inductance=Tg(e.inductance),this.initialCondition=e.ic===void 0?void 0:Tg(e.ic)}static fromSpiceTokens(e){const n=kA.from(e);return new e4n({name:n.head(),nodes:[n.arg(0)??"",n.arg(1)??""],inductance:n.arg(2)??"",ic:n.paramAfter(3,"ic"),params:n.paramsAfterExcept(3,["ic"]),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.inductance.getString(),this.initialCondition===void 0?void 0:`IC=${this.initialCondition.getString()}`],e)}};wu.register(v5o);var w5o=class t4n extends wu{static spiceTokenKeys=["M"];type="mosfet";model;constructor(e){super(e),this.model=e.model}static fromSpiceTokens(e){const n=kA.from(e);return new t4n({name:n.head(),nodes:[n.arg(0)??"",n.arg(1)??"",n.arg(2)??"",n.arg(3)??""],model:n.arg(4)??"",params:n.paramsAfter(5),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.model],e)}};wu.register(w5o);var P5o=new Set(["VALUE","TABLE","LAPLACE","FREQ","CHEBYSHEV"]);function aPt(t){return t!==void 0&&P5o.has(t.toUpperCase())}function APt(t,e,n){const o=t?.dialect??"generic";o==="pspice"||o==="ngspice"&&(e==="VALUE"||e==="TABLE")||Sj(t,n)}var M5o=class n4n extends wu{type="pspice_abm_voltage_source";form;args;constructor(e){super({...e,nodes:e.output}),this.form=e.form,this.args=e.args}static fromTokenCard(e){return new n4n({name:e.head(),output:[e.arg(0)??"",e.arg(1)??""],form:e.arg(2)?.toUpperCase(),args:e.argsAfter(3),originalSource:e.originalSource})}toSource(e){return APt(e,this.form,`${this.form} behavioral voltage source`),this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.form,...this.args],e)}},D5o=class o4n extends wu{type="pspice_abm_current_source";form;args;constructor(e){super({...e,nodes:e.output}),this.form=e.form,this.args=e.args}static fromTokenCard(e){return new o4n({name:e.head(),output:[e.arg(0)??"",e.arg(1)??""],form:e.arg(2)?.toUpperCase(),args:e.argsAfter(3),originalSource:e.originalSource})}toSource(e){return APt(e,this.form,`${this.form} behavioral current source`),this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.form,...this.args],e)}};function N5o(t){return M5o.fromTokenCard(kA.from(t))}function R5o(t){return D5o.fromTokenCard(kA.from(t))}var T5o=class i4n extends wu{static spiceTokenKeys=["R"];type="resistor";resistance;constructor(e){super({...e,nodes:e.nodes.filter(n=>n!==void 0)}),this.resistance=Tg(e.resistance)}static fromSpiceTokens(e){const n=kA.from(e);return new i4n({name:n.head(),nodes:[n.arg(0)??"",n.arg(1)??""],resistance:n.arg(2)??"",params:n.paramsAfter(3),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.resistance.getString()],e)}};wu.register(T5o);var k5o=class r4n extends wu{static spiceTokenKeys=["X"];type="subckt_instance";subckt;constructor(e){super(e),this.subckt=e.subckt}static fromSpiceTokens(e){const n=kA.from(e);return new r4n({name:n.head(),nodes:n.argsUntilLast(),subckt:n.lastArg()??"",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.subckt],e)}};wu.register(k5o);var F5o=class s4n extends wu{static spiceTokenKeys=["__unknown_element__"];type="unknown_element";designator;tokens;constructor(e){super(e),this.designator=e.designator,this.tokens=e.tokens}static fromSpiceTokens(e){const n=kA.from(e),o=n.head();return new s4n({name:o,designator:n.headDesignator(),tokens:n.args(),originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.tokens],e)}};wu.register(F5o);var L5o=class a4n extends wu{static spiceTokenKeys=["G"];type="vccs";transconductance;constructor(e){super({...e,nodes:[...e.output,...e.control]}),this.transconductance=Tg(e.transconductance)}static fromSpiceTokens(e){const n=kA.from(e);return aPt(n.arg(2))?R5o(e):new a4n({name:n.head(),output:[n.arg(0)??"",n.arg(1)??""],control:[n.arg(2)??"",n.arg(3)??""],transconductance:n.arg(4)??"",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.transconductance.getString()],e)}};wu.register(L5o);var H5o=class A4n extends wu{static spiceTokenKeys=["E"];type="vcvs";gain;constructor(e){super({...e,nodes:[...e.output,...e.control]}),this.gain=Tg(e.gain)}static fromSpiceTokens(e){const n=kA.from(e);return aPt(n.arg(2))?N5o(e):new A4n({name:n.head(),output:[n.arg(0)??"",n.arg(1)??""],control:[n.arg(2)??"",n.arg(3)??""],gain:n.arg(4)??"",originalSource:n.originalSource})}toSource(e){return this.formatParts([this.name,...this.nodes.map(n=>n.getString()),this.gain.getString()],e)}};wu.register(H5o);var O5o=class c4n extends s0e{static spiceTokenKeys=["V"];type="voltage_source";static fromSpiceTokens(e){const n=kA.from(e),o=sPt(n);return new c4n({name:n.head(),nodes:[n.arg(0)??"",n.arg(1)??""],dc:o.dc,ac:o.ac,originalSource:n.originalSource})}toSource(e){return this.formatParts(this.sourceParts(),e)}};s0e.register(O5o);var G5o=class extends xwe{type="netlist";title;cards;end;dialect;trailingNewline;lineEnding;constructor(e={}){super(),this.title=e.title,this.cards=e.cards??[],this.end=e.end instanceof vj?e.end:e.end===!1?void 0:new vj,this.dialect=e.dialect??"generic",this.trailingNewline=e.trailingNewline??!0,this.lineEnding=e.lineEnding??`
`}get elements(){return this.cards.filter(e=>e.cardKind==="element")}get directives(){return this.cards.filter(e=>e.cardKind==="directive")}get subckts(){return this.cards.filter(e=>e instanceof iPt)}get models(){return this.cards.filter(e=>e instanceof Zwt)}get analyses(){return this.cards.filter(e=>e instanceof yb)}add(e){this.cards.push(e)}addAll(e){this.cards.push(...e)}findElement(e){return this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase())}findModel(e){return this.models.find(n=>n.name.toLowerCase()===e.toLowerCase())}findSubckt(e){return this.subckts.find(n=>n.name.toLowerCase()===e.toLowerCase())}renameNode(e,n){for(const o of this.elements)o.renameNode(e,n);for(const o of this.subckts)for(const i of o.cards)i instanceof wu&&i.renameNode(e,n)}getChildren(){return[...this.cards,...this.end===void 0?[]:[this.end]]}getString(e={}){return this.toSource(e)}toSource(e={}){const n=e.end??"auto",i=[this.title,...this.cards.map(r=>r.toSource(e)),n==="never"?void 0:n==="always"?(this.end??new vj).toSource(e):this.end?.toSource(e)].filter(r=>r!==void 0).join(this.lineEnding);return this.trailingNewline?`${i}${this.lineEnding}`:i}},Y5o=class l4n extends Vwt{static spiceTokenKeys=["blank"];type="blank";cardKind="blank";originalSource;constructor(e={}){super(),this.originalSource=e.originalSource}static fromSpiceTokens(e){return new l4n({originalSource:kA.from(e).originalSource})}getChildren(){return[]}toSource(){return this.originalSource??""}};Cb.register(Y5o);var U5o=class yit extends Vwt{static spiceTokenKeys=["comment"];type="comment";cardKind="comment";text;marker;originalSource;constructor(e,n={}){super(),this.text=e,this.marker=n.marker??"*",this.originalSource=n.originalSource}static fromSpiceTokens(e){const n=kA.from(e),[o]=n.tokens;return o?.type==="comment"?new yit(o.value,{marker:o.marker,originalSource:n.originalSource}):new yit(n.originalSource,{originalSource:n.originalSource})}getChildren(){return[]}toSource(e){return e?.format!=="pretty"&&this.originalSource!==void 0?this.originalSource:`${this.marker} ${this.text}`.trimEnd()}};Cb.register(U5o);var K5o=class u4n extends Cb{static spiceTokenKeys=["raw","error","number","operator","punctuation"];type="raw_card";cardKind="raw";source;constructor(e){super({originalSource:e}),this.source=e}static fromSpiceTokens(e){return new u4n(kA.from(e).originalSource)}getChildren(){return[]}toSource(){return this.source}};Cb.register(K5o);var V5o=/^[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:[eE][+-]?\d+)?([a-zA-Z]+)?$/,cPt=new Set(["=","+","-","*","/","^"]),lPt=new Set(["(",")",",",":"]),z5o={f:1e-15,p:1e-12,n:1e-9,u:1e-6,m:.001,k:1e3,meg:1e6,g:1e9,t:1e12};function J5o(t,e={}){const n=e.preserveWhitespace??!1,o=e.preserveComments??!0,i=e.normalizeNumbers??!0,r=[],s=[];let a=0,A=1,c=1,l=!0;const u=()=>({offset:a,line:A,column:c}),g=C=>({start:C,end:u()}),h=C=>{for(let y=0;y<C.length;y+=1){const x=C[y];a+=1,x===`
`?(A+=1,c=1,l=!0):c+=1}},d=C=>{C.type==="whitespace"&&!n||C.type==="comment"&&!o||r.push(C)},p=C=>C!==void 0&&C>="0"&&C<="9",m=C=>{const y=t[C],x=t[C+1];return p(y)||y==="."&&p(x)?!0:(y==="+"||y==="-")&&!_()?!1:(y==="+"||y==="-")&&p(x)?!0:(y==="+"||y==="-")&&x==="."&&p(t[C+2])},_=()=>{const C=r.at(-1);return C===void 0||C.type==="whitespace"||C.type==="newline"||C.type==="continuation"||C.type==="operator"||C.type==="punctuation"},f=()=>{let C="";for((t[a]==="+"||t[a]==="-")&&(C+=t[a],h(t[a]));p(t[a]);)C+=t[a],h(t[a]);if(t[a]===".")for(C+=t[a],h(t[a]);p(t[a]);)C+=t[a],h(t[a]);if(t[a]==="e"||t[a]==="E")for(C+=t[a],h(t[a]),(t[a]==="+"||t[a]==="-")&&(C+=t[a],h(t[a]));p(t[a]);)C+=t[a],h(t[a]);for(;t[a]!==void 0&&t[a]>="a"&&t[a]<="z"||t[a]!==void 0&&t[a]>="A"&&t[a]<="Z";)C+=t[a],h(t[a]);return C},I=(C,y)=>{const x=C.match(V5o);if(!x)return!1;const E=x[1],B=E?.toLowerCase(),S=E===void 0?C:C.slice(0,-E.length),Q=Number(S),w=i&&!Number.isNaN(Q)?Q*(B===void 0?1:z5o[B]??1):null;return d({type:"number",raw:C,value:w,unitSuffix:E,range:y}),!0};for(;a<t.length;){const C=u(),y=t[a],x=t[a+1];if(y==="\r"||y===`
`){const S=y==="\r"&&x===`
`?`\r
`:y;h(S),d({type:"newline",raw:S,range:g(C)});continue}if(y===" "||y==="	"){let S="";for(;t[a]===" "||t[a]==="	";)S+=t[a],h(t[a]);d({type:"whitespace",raw:S,range:g(C)});continue}if(l&&y==="+"){h(y),l=!1,d({type:"continuation",raw:y,range:g(C)});continue}if(l&&y==="*"||y===";"||y==="$"){const S=y;let Q="";for(;a<t.length&&t[a]!==`
`&&t[a]!=="\r";)Q+=t[a],h(t[a]);l=!1,d({type:"comment",marker:S,raw:Q,value:Q.slice(1).trimStart(),range:g(C)});continue}if(y==="#"){let S="";for(;a<t.length&&t[a]!==`
`&&t[a]!=="\r";)S+=t[a],h(t[a]);const Q=g(C),w={message:"Unsupported preprocessor-style line",raw:S,range:Q};s.push(w),l=!1,d({type:"error",raw:S,message:w.message,range:Q});continue}if(y==='"'||y==="'"){const S=y;let Q="",w="";for(h(y),Q+=y;a<t.length&&t[a]!==S&&!(t[a]===`
`||t[a]==="\r");)w+=t[a],Q+=t[a],h(t[a]);if(t[a]===S)Q+=S,h(S),d({type:"string",quote:S,raw:Q,value:w,range:g(C)});else{const M=g(C),k={message:"Unterminated string",raw:Q,range:M};s.push(k),d({type:"error",raw:Q,message:k.message,range:M})}l=!1;continue}if(m(a)){const S=f();if(l=!1,I(S,g(C)))continue}if(cPt.has(y)){h(y),l=!1,d({type:"operator",raw:y,value:y,range:g(C)});continue}if(lPt.has(y)){h(y),l=!1,d({type:"punctuation",raw:y,value:y,range:g(C)});continue}let E="";for(;a<t.length&&![" ","	","\r",`
`,'"',"'",";","$"].includes(t[a])&&!cPt.has(t[a])&&!lPt.has(t[a]);)E+=t[a],h(t[a]);if(E.length===0){h(y);const S=g(C),Q={message:`Unexpected character "${y}"`,raw:y,range:S};s.push(Q),d({type:"error",raw:y,message:Q.message,range:S});continue}l=!1;const B=g(C);if(E.startsWith(".")){d({type:"directive",raw:E,value:E.slice(1).toLowerCase(),range:B});continue}I(E,B)||d({type:"identifier",raw:E,value:E,range:B})}return{tokens:r,errors:s,source:{text:t,lineCount:A}}}function W5o(t,e={}){const n=X5o(t),o=$5o(t),i=o[0],r=i!==void 0&&q5o(i)?i.originalSource:void 0,s=r===void 0?o:o.slice(1),a=j5o(s),A=a.findIndex(l=>l instanceof vj),c=A===-1?void 0:a.splice(A,1)[0];return new G5o({title:r,cards:a,end:c??!1,dialect:e.dialect,trailingNewline:n.trailingNewline,lineEnding:n.lineEnding})}function j5o(t,e){return t.map(n=>Cb.parseSpiceTokens(n))}function $5o(t){const e=J5o(t,{preserveWhitespace:!0,preserveComments:!0,normalizeNumbers:!0});return A5o(a5o(e.tokens))}function q5o(t){const e=Ewe(t.tokens),[n]=e;return n===void 0||n.type==="directive"||n.type==="comment"||n.type!=="identifier"?!1:e.length===1?!0:Cb.classes[n.raw[0]?.toLowerCase()??""]===void 0}function X5o(t){const e=t.includes(`\r
`)?`\r
`:t.includes("\r")?"\r":`
`;return{trailingNewline:e===`\r
`?t.endsWith(`\r
`):t.endsWith(e),lineEnding:e}}var Z5o=t=>{const e=[];e.push(t.title),t.models.size>0&&e.push(...Array.from(t.models.values()));for(const n of t.components)e.push(n.toSpiceString());t.optionStatements.length>0&&e.push(...t.optionStatements),t.metadataComments.length>0&&e.push(...t.metadataComments);for(const n of t.subcircuits)e.push(n.toSpiceString());if(t.printStatements.length>0&&e.push(...t.printStatements),t.saveStatements.length>0&&e.push(...t.saveStatements),t.controls.length>0&&(e.push(".control"),e.push(...t.controls),e.push(".endc")),t.analysisCommand){const n=t.analysisCommand.trim().toLowerCase().split(/\s+/)[0];e.some(i=>i.trim().toLowerCase().split(/\s+/)[0]===n)||e.push(t.analysisCommand)}return e.push(".END"),e.join(`
`)},e4o=class{title;components;nodes;controls;subcircuits;models;optionStatements;metadataComments;analysisCommand;printStatements;saveStatements;constructor(t="Circuit Netlist"){this.title=t,this.components=[],this.nodes=new Set,this.controls=[],this.subcircuits=[],this.models=new Map,this.optionStatements=[],this.metadataComments=[],this.analysisCommand=null,this.printStatements=[],this.saveStatements=[]}addComponent(t){this.components.push(t);for(const e of t.nodes)this.nodes.add(e)}addSubcircuit(t){this.subcircuits.find(e=>e.name===t.name)||this.subcircuits.push(t)}get tranCommand(){return this.analysisCommand?.trim().toLowerCase().startsWith(".tran")?this.analysisCommand:null}set tranCommand(t){this.analysisCommand=t}toSpiceString(){return Z5o(this)}},Uy=class{name;command;nodes;constructor(t,e,n){this.name=t,this.command=e,this.nodes=n}toSpiceString(){return this.command.toSpiceString()}},t4o=class{commandName="bjt";props;constructor(t){this.props=t}toSpiceString(){const{name:t,collector:e,base:n,emitter:o,substrate:i,model:r,area:s}=this.props;let a=`Q${t} ${e} ${n} ${o}`;return i&&(a+=` ${i}`),a+=` ${r}`,s&&(a+=` ${s}`),a}},n4o=class{commandName="capacitor";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,modelName:o,value:i,initialCondition:r}=this.props;let s=`C${t} ${e} ${n}`;return o&&(s+=` ${o}`),s+=` ${i}`,r&&(s+=` IC=${r}`),s}},uPt=class{commandName="current_source";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,value:o,acMagnitude:i,acPhase:r}=this.props;let s=`I${t} ${e} ${n}`;return o&&(s+=` ${o}`),i&&(s+=` AC ${i}`,r&&(s+=` ${r}`)),s}},o4o=class{commandName="diode";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,model:o,area:i}=this.props;let r=`D${t} ${e} ${n} ${o}`;return i&&(r+=` ${i}`),r}},i4o=class{commandName="inductor";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,model:o,value:i,initialCondition:r}=this.props;let s=`L${t} ${e} ${n}`;return o&&(s+=` ${o}`),s+=` ${i}`,r&&(s+=` IC=${r}`),s}},r4o=class{commandName="mosfet";props;constructor(t){this.props=t}toSpiceString(){const{name:t,drain:e,gate:n,source:o,substrate:i,model:r,length:s,width:a,drainArea:A,sourceArea:c,drainPerimeter:l,sourcePerimeter:u,drainResistance:g,sourceResistance:h}=this.props;let d=`M${t} ${e} ${n} ${o} ${i} ${r}`;return Object.entries({L:s,W:a,AD:A,AS:c,PD:l,PS:u,NRD:g,NRS:h}).forEach(([m,_])=>{_&&(d+=` ${m}=${_}`)}),d}},s4o=class{commandName="resistor";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,model:o,value:i}=this.props;let r=`R${t} ${e} ${n}`;return o&&(r+=` ${o}`),r+=` ${i}`,r}},gPt=class{commandName="subcircuit_call";props;constructor(t){this.props=t}toSpiceString(){const{name:t,nodes:e,subcircuitName:n}=this.props;return`X${t} ${e.join(" ")} ${n}`}},a4o=class{commandName="voltage_controlled_switch";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,positiveControl:o,negativeControl:i,model:r}=this.props;return`S${t} ${e} ${n} ${o} ${i} ${r}`}},a0e=class{commandName="voltage_source";props;constructor(t){this.props=t}toSpiceString(){const{name:t,positiveNode:e,negativeNode:n,value:o,acMagnitude:i,acPhase:r}=this.props;let s=`V${t} ${e} ${n}`;return o&&(s+=` ${o}`),i&&(s+=` AC ${i}`,r&&(s+=` ${r}`)),s}};function A4o(t){return t>=1e6?`${t/1e6}MEG`:t>=1e3?`${t/1e3}K`:t.toString()}function c4o(t){return t>=.001?`${t*1e3}M`:t>=1e-6?`${t*1e6}U`:t>=1e-9?`${t*1e9}N`:t>=1e-12?`${t*1e12}P`:t.toString()}function l4o(t){return t>=1?t.toString():t>=.001?`${t*1e3}m`:t>=1e-6?`${t*1e6}u`:t>=1e-9?`${t*1e9}n`:t>=1e-12?`${t*1e12}p`:t.toString()}function dPt(t,e){if(!t)return e;const n=t.replace(/[^A-Za-z0-9_]/g,"_");return n?/^[0-9]/.test(n)?`${e}_${n}`:n:e}function u4o(t){if(!t)return"DC 0";const r=t.starts_closed??!1,s=t.closes_at??0,a=t.opens_at,A=t.switching_frequency,[c,l]=r?[5,0]:[0,5];if(A&&A>0){const u=1/A,g=a&&a>s?Math.min(a-s,u):0,h=g>0?g:Math.max(u/2,1e-9);return`PULSE(${Xl(c)} ${Xl(l)} ${Xl(s)} 1n 1n ${Xl(h)} ${Xl(u)})`}if(a!==void 0&&a>s){const u=Math.max(a-s,1e-9),g=s+u*2;return`PULSE(${Xl(c)} ${Xl(l)} ${Xl(s)} 1n 1n ${Xl(u)} ${Xl(g)})`}if(s>0){const u=s*2,g=Math.max(u/2,1e-9);return`PULSE(${Xl(c)} ${Xl(l)} ${Xl(s)} 1n 1n ${Xl(g)} ${Xl(u)})`}return`DC ${r?5:0}`}function Xl(t){if(!Number.isFinite(t))return`${t}`;if(t===0)return"0";const e=Math.abs(t);return e>=1e3||e<=.001?Number(t.toExponential(6)).toString():Number(t.toPrecision(6)).toString()}function rO(t){if(!Number.isFinite(t))return`${t}`;if(t===0)return"0";const e=[["T",1e12],["G",1e9],["MEG",1e6],["k",1e3],["m",.001],["u",1e-6],["n",1e-9],["p",1e-12]];for(const[n,o]of e){const i=t/o;if(Math.abs(i)>=.999999&&Math.abs(i)<999.999999){const r=Number(i.toPrecision(6));if(Math.abs(r*o-t)<=Math.abs(t)*1e-9)return`${r}${n}`}}return Xl(t)}var g4o=1e-12,d4o=({component:t,nodes:e})=>{if("resistance"in t&&"name"in t){const n=t.resistance,o=new s4o({name:t.name,positiveNode:e[0]||"0",negativeNode:e[1]||"0",value:A4o(n===0?g4o:n)});return new Uy(t.name,o,e)}return null},h4o=({netlist:t,component:e,nodes:n,simulationSwitchMap:o})=>{const i=dPt(e.name??e.source_component_id,"SW"),r=n[0]||"0",s=n[1]||"0",a=`NCTRL_${i}`,A=`SW_${i}`,c=o.get(e.source_component_id),l=u4o(c),u=new a4o({name:i,positiveNode:r,negativeNode:s,positiveControl:a,negativeControl:"0",model:A});t.models.has(A)||t.models.set(A,`.MODEL ${A} SW(Ron=0.1 Roff=1e9 Vt=2.5 Vh=0.1)`);const g=`CTRL_${i}`,h=new a0e({name:g,positiveNode:a,negativeNode:"0",value:l}),d=new Uy(g,h,[a,"0"]);return t.addComponent(d),new Uy(i,u,[r,s,a,"0"])},p4o=({component:t,nodes:e})=>{if("capacitance"in t&&"name"in t){const n=new n4o({name:t.name,positiveNode:e[0]||"0",negativeNode:e[1]||"0",value:c4o(t.capacitance)});return new Uy(t.name,n,e)}return null},m4o=(t,e)=>{const n=t.find(i=>i.name?.toLowerCase()==="anode"||i.port_hints?.includes("anode")),o=t.find(i=>i.name?.toLowerCase()==="cathode"||i.port_hints?.includes("cathode"));return{positiveNode:e.get(n?.source_port_id??"")||"0",negativeNode:e.get(o?.source_port_id??"")||"0"}},hPt=({netlist:t,component:e,componentPorts:n,nodeMap:o,modelName:i,modelDefinition:r})=>{if("name"in e){const{positiveNode:s,negativeNode:a}=m4o(n,o),A=new o4o({name:e.name,positiveNode:s,negativeNode:a,model:i});return t.models.set(i,r),new Uy(e.name,A,[s,a])}return null},_4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=>hPt({netlist:t,component:e,componentPorts:n,nodeMap:o,modelName:"D",modelDefinition:".MODEL D D"}),f4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=>hPt({netlist:t,component:e,componentPorts:n,nodeMap:o,modelName:"LED",modelDefinition:".MODEL LED D(IS=1e-20 N=2 RS=10 CJO=2p EG=2.1 BV=5 IBV=10u)"}),I4o=({component:t,nodes:e})=>{if("inductance"in t&&"name"in t){const n=new i4o({name:t.name,positiveNode:e[0]||"0",negativeNode:e[1]||"0",value:l4o(t.inductance)});return new Uy(t.name,n,e)}return null},C4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=>{if("name"in e){const i=n.find(m=>m.name?.toLowerCase()==="drain"||m.port_hints?.includes("drain")),r=n.find(m=>m.name?.toLowerCase()==="gate"||m.port_hints?.includes("gate")),s=n.find(m=>m.name?.toLowerCase()==="source"||m.port_hints?.includes("source")),a=o.get(i?.source_port_id??"")||"0",A=o.get(r?.source_port_id??"")||"0",c=o.get(s?.source_port_id??"")||"0",l=c,u=e.channel_type??"n",g=e.mosfet_mode??"enhancement",h=`${u.toUpperCase()}MOS`,d=`${h}_${g.toUpperCase()}`;if(!t.models.has(d))if(g==="enhancement"){const m=u==="p"?-1:1;t.models.set(d,`.MODEL ${d} ${h} (VTO=${m} KP=0.1)`)}else t.models.set(d,`.MODEL ${d} ${h} (KP=0.1)`);const p=new r4o({name:e.name,drain:a,gate:A,source:c,substrate:l,model:d});return new Uy(e.name,p,[a,A,c])}return null},y4o=({netlist:t,component:e,componentPorts:n,nodeMap:o})=>{if("name"in e){const i=n.find(h=>h.name?.toLowerCase()==="collector"||h.port_hints?.includes("collector")),r=n.find(h=>h.name?.toLowerCase()==="base"||h.port_hints?.includes("base")),s=n.find(h=>h.name?.toLowerCase()==="emitter"||h.port_hints?.includes("emitter"));if(!i||!r||!s)throw new Error(`Transistor ${e.name} is missing required ports (collector, base, emitter)`);const a=o.get(i.source_port_id)||"0",A=o.get(r.source_port_id)||"0",c=o.get(s.source_port_id)||"0",l=e.transistor_type??"npn",u=l.toUpperCase();t.models.has(u)||t.models.set(u,`.MODEL ${u} ${l.toUpperCase()}`);const g=new t4o({name:e.name,collector:a,base:A,emitter:c,model:u});return new Uy(e.name,g,[a,A,c])}return null},x4o=({netlist:t,simulationVoltageSources:e,nodeMap:n})=>{for(const o of e)if(o.type==="simulation_voltage_source")if(o.is_dc_source===!1){const i=o.terminal1_source_port_id??o.terminal1_source_net_id,r=o.terminal2_source_port_id??o.terminal2_source_net_id;if(i&&r){const s=n.get(i)||"0",a=n.get(r)||"0";let A="";if(o.wave_shape==="sinewave"){const l=o.voltage??(o.peak_to_peak_voltage??0)/2,u=o.frequency??0,g=0,h=0,d=o.phase??0;u>0?A=`SIN(0 ${l} ${u} ${g} ${h} ${d})`:A=`DC ${o.voltage??0}`}else if(o.wave_shape==="square"){const l=o.voltage??o.peak_to_peak_voltage??0,u=o.frequency??0,g=u===0?1/0:1/u,h=o.period===void 0?g:o.period/1e3,d=o.duty_cycle??.5,p=h*d,m=o.pulse_delay!==void 0?o.pulse_delay/1e3:0,_=o.rise_time!==void 0?rO(o.rise_time/1e3):"1n",f=o.fall_time!==void 0?rO(o.fall_time/1e3):"1n",I=o.pulse_width===void 0?rO(p):rO(o.pulse_width/1e3),C=rO(h);A=`PULSE(0 ${l} ${rO(m)} ${_} ${f} ${I} ${C})`}else o.voltage!==void 0&&(A=`DC ${o.voltage}`);if(A||o.ac_magnitude!==void 0){const c=new a0e({name:o.simulation_voltage_source_id,positiveNode:s,negativeNode:a,value:A,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),l=new Uy(o.simulation_voltage_source_id,c,[s,a]);t.addComponent(l)}}}else{const i="terminal1_source_port_id"in o&&typeof o.terminal1_source_port_id=="string"?o.terminal1_source_port_id:void 0,r="terminal2_source_port_id"in o&&typeof o.terminal2_source_port_id=="string"?o.terminal2_source_port_id:void 0,s=o.positive_source_port_id??o.positive_source_net_id??i,a=o.negative_source_port_id??o.negative_source_net_id??r;if(s&&a){const A=n.get(s)||"0",c=n.get(a)||"0",l=new a0e({name:o.simulation_voltage_source_id,positiveNode:A,negativeNode:c,value:`DC ${o.voltage}`,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),u=new Uy(o.simulation_voltage_source_id,l,[A,c]);t.addComponent(u)}}},E4o=({netlist:t,simulationCurrentSources:e,nodeMap:n})=>{for(const o of e)if(o.type==="simulation_current_source")if(o.is_dc_source===!1){const i=o.terminal1_source_port_id??o.terminal1_source_net_id,r=o.terminal2_source_port_id??o.terminal2_source_net_id;if(i&&r){const s=n.get(i)||"0",a=n.get(r)||"0";let A="";if(o.wave_shape==="sinewave"){const l=(o.peak_to_peak_current??0)/2,u=o.frequency??0,g=0,h=0,d=o.phase??0;u>0?A=`SIN(0 ${l} ${u} ${g} ${h} ${d})`:A=`DC ${l}`}else if(o.wave_shape==="square"){const l=o.peak_to_peak_current??0,u=o.frequency??0,g=u===0?1/0:1/u,h=o.duty_cycle??.5,d=g*h;A=`PULSE(0 ${l} 0 1n 1n ${d} ${g})`}if(A||o.ac_magnitude!==void 0){const c=new uPt({name:o.simulation_current_source_id,positiveNode:s,negativeNode:a,value:A,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),l=new Uy(o.simulation_current_source_id,c,[s,a]);t.addComponent(l)}}}else{const i="terminal1_source_port_id"in o&&typeof o.terminal1_source_port_id=="string"?o.terminal1_source_port_id:void 0,r="terminal2_source_port_id"in o&&typeof o.terminal2_source_port_id=="string"?o.terminal2_source_port_id:void 0,s=o.positive_source_port_id??o.positive_source_net_id??i,a=o.negative_source_port_id??o.negative_source_net_id??r;if(s&&a){const A=n.get(s)||"0",c=n.get(a)||"0",l=new uPt({name:o.simulation_current_source_id,positiveNode:A,negativeNode:c,value:`DC ${o.current}`,acMagnitude:o.ac_magnitude===void 0?void 0:Xl(o.ac_magnitude),acPhase:o.ac_phase===void 0?void 0:Xl(o.ac_phase)}),u=new Uy(o.simulation_current_source_id,l,[A,c]);t.addComponent(u)}}},B4o=["method","reltol","abstol","vntol"],b4o=(t,e)=>t.find(o=>o.connected_source_net_ids.includes(e))?.connected_source_port_ids[0],A0e=({sourcePortId:t,sourceNetId:e,sourceTraces:n,nodeMap:o})=>{if(t)return o.get(t);if(!e)return;const i=b4o(n,e);if(i)return o.get(i)},S4o=t=>dPt(`sense_${t.simulation_current_probe_id}`,"sense_current_probe"),Q4o=t=>{switch(t){case"spice_transient_analysis":return"TRAN";case"spice_dc_operating_point":return"OP";case"spice_dc_sweep":return"DC";case"spice_ac_analysis":return"AC"}},v4o=t=>{switch(t){case"linear":return"lin";case"decade":return"dec";case"octave":return"oct"}},w4o=t=>{if(t.experiment_type==="spice_transient_analysis"){const A=t.time_per_step,c=t.end_time_ms,l=t.start_time_ms;if(A===void 0||c===void 0)return null;const u=(l??0)/1e3;return new rPt({step:Xl(A/1e3),stop:Xl(c/1e3),...u>0?{start:Xl(u)}:{},uic:!0})}if(t.experiment_type==="spice_dc_operating_point")return new ePt;if(t.experiment_type==="spice_dc_sweep"){const{dc_sweep_voltage_source_id:A,dc_sweep_current_source_id:c,dc_sweep_start:l,dc_sweep_stop:u,dc_sweep_step:g}=t;if(l===void 0||u===void 0||g===void 0)return null;let h;if(A!==void 0)h=`V${A}`;else if(c!==void 0)h=`I${c}`;else return null;return new Xwt({source:h,start:Xl(l),stop:Xl(u),step:Xl(g)})}const{ac_sweep_type:e,ac_samples_per_interval:n,ac_sample_count:o,ac_start_frequency_hz:i,ac_stop_frequency_hz:r}=t;if(e===void 0||i===void 0||r===void 0)return null;const s=e==="linear"?o:n;if(s===void 0)return null;const a=v4o(e);return new qwt({sweep:a,points:s,start:Xl(i),stop:Xl(r)})},P4o=({netlist:t,simulationExperiment:e,simulationVoltageProbes:n,simulationCurrentProbes:o,sourceTraces:i,nodeMap:r})=>{const s=Q4o(e.experiment_type),a=new Set,A=e.spice_options;if(A){const c={};for(const l of B4o){const u=A[l];u!==void 0&&(c[l]=u)}Object.keys(c).length>0&&t.optionStatements.push(new tPt(c).getString())}if(n.length>0){const c=[];for(const l of n){const u=A0e({sourcePortId:l.signal_input_source_port_id,sourceNetId:l.signal_input_source_net_id,sourceTraces:i,nodeMap:r});if(!u)continue;if(l.reference_input_source_port_id||l.reference_input_source_net_id){const h=A0e({sourcePortId:l.reference_input_source_port_id,sourceNetId:l.reference_input_source_net_id,sourceTraces:i,nodeMap:r});if(h&&h!=="0"){const d=`V(${u},${h})`;a.add(d),c.push({simulation_voltage_probe_id:l.simulation_voltage_probe_id,name:l.name,spice_vector:d,source_node_name:u,reference_node_name:h})}else if(u!=="0"){const d=`V(${u})`;a.add(d),c.push({simulation_voltage_probe_id:l.simulation_voltage_probe_id,name:l.name,spice_vector:d,source_node_name:u,reference_node_name:h})}}else if(u!=="0"){const h=`V(${u})`;a.add(h),c.push({simulation_voltage_probe_id:l.simulation_voltage_probe_id,name:l.name,spice_vector:h,source_node_name:u})}}if(c.length>0)for(const l of c)t.metadataComments.push(`* tscircuit_probe ${JSON.stringify(l)}`)}if(o.length>0){const c=new Set,l=[];for(const u of o){const g=A0e({sourcePortId:u.positive_source_port_id,sourceNetId:u.positive_source_net_id,sourceTraces:i,nodeMap:r}),h=A0e({sourcePortId:u.negative_source_port_id,sourceNetId:u.negative_source_net_id,sourceTraces:i,nodeMap:r});if(!g||!h)continue;const d=S4o(u);let p=d,m=2;for(;c.has(p);)p=`${d}_${m++}`;c.add(p);const _=`V${p}`,f=`I(${_})`,I=new a0e({name:p,positiveNode:g,negativeNode:h,value:"DC 0"});t.addComponent(new Uy(p,I,[g,h])),a.add(f),l.push({simulation_current_probe_id:u.simulation_current_probe_id,name:u.name,spice_vector:f,sense_voltage_source_name:_,positive_node_name:g,negative_node_name:h})}if(l.length>0)for(const u of l)t.metadataComments.push(`* tscircuit_current_probe ${JSON.stringify(u)}`)}if(a.size>0){const c=[...a].join(" "),l=new nPt({analysis:s,expressions:[c]});l.command=".PRINT",t.printStatements.push(l.getString());const u=new oPt([c]);u.command=".SAVE",t.saveStatements.push(u.getString())}t.analysisCommand=w4o(e)?.getString()??null},wj="GENERIC_OPAMP",M4o=`
.SUBCKT ${wj} non_inverting_input inverting_input positive_supply negative_supply output
* Generic Op-Amp Model
E1 internal_output 0 non_inverting_input inverting_input 100k
Rin non_inverting_input inverting_input 10Meg
Rout internal_output output 75
D1 output positive_supply opamp_diode
D2 negative_supply output opamp_diode
.model opamp_diode D
.ENDS ${wj}
`.trim(),D4o=(t,e,n)=>{if(e.length!==0){t.models.has(wj)||t.models.set(wj,M4o);for(const o of e){if(o.type!=="simulation_op_amp")continue;const i=n.get(o.non_inverting_input_source_port_id)??"0",r=n.get(o.inverting_input_source_port_id)??"0",s=n.get(o.output_source_port_id)??"0",a=n.get(o.positive_supply_source_port_id)??"0",A=n.get(o.negative_supply_source_port_id)??"0",c=[i,r,a,A,s],l=new gPt({name:o.simulation_op_amp_id,nodes:c,subcircuitName:wj}),u=new Uy(o.simulation_op_amp_id,l,c);t.addComponent(u)}}};function N4o(t){const e=[];for(const s of t.split(/\r?\n/)){const a=s.trim();if(/^\+/.test(a)&&e.length>0){e[e.length-1]+=` ${a.slice(1).trim()}`;continue}e.push(a)}const n=e.find(s=>/^\.subckt\s+/i.test(s));if(!n)return null;const o=n.split(/\s+/),i=o[1],r=o.slice(2);return!i||r.length===0?null:{modelName:i,pinNames:r}}function R4o(t,e,n){if(e.length!==0)for(const o of e){const i=N4o(o.subcircuit_source);if(!i)continue;const{modelName:r,pinNames:s}=i;t.models.has(r)||t.models.set(r,o.subcircuit_source);const a=s.map(c=>{const l=o.spice_pin_to_source_port_map[c];return n.get(l)??"0"}),A=new gPt({name:o.simulation_spice_subcircuit_id,nodes:a,subcircuitName:r});t.addComponent(new Uy(o.simulation_spice_subcircuit_id,A,a))}}function T4o(t){const e=new e4o("* Circuit JSON to SPICE Netlist"),n=Mr(t).source_component.list(),o=Mr(t).source_port.list(),i=Mr(t).source_trace.list(),r=t.filter(y=>y.type==="simulation_voltage_probe"),s=t.filter(y=>y.type==="simulation_current_probe"),a=t.filter(y=>y.type==="simulation_switch").map(y=>y),A=t.filter(y=>y.type==="simulation_op_amp"),c=t.filter(y=>y.type==="simulation_spice_subcircuit"),l=new Map;for(const y of a)y.source_component_id&&l.set(y.source_component_id,y);const u=Mxe(t),g=new Map,h=new Map;let d=1;const p=new Set;if(r.length>0)for(const y of r)y.name&&p.add(y.name);const m=[...p].map(y=>/^N(\d+)$/i.exec(y)).filter(y=>y!==null).map(y=>parseInt(y[1],10));m.length>0&&(d=Math.max(...m)+1);const _=new Set,f=new Set(Mr(t).source_net.list().filter(y=>y.name?.toLowerCase().includes("gnd")).map(y=>y.source_net_id));if(f.size>0){for(const y of Mr(t).source_trace.list())if(y.connected_source_port_ids.length>0&&y.connected_source_net_ids.some(E=>f.has(E))){const E=y.connected_source_port_ids[0],B=u.getNetConnectedToId(E);B&&_.add(B)}}const I=o.filter(y=>y.name?.toLowerCase()==="gnd");for(const y of I){const x=u.getNetConnectedToId(y.source_port_id);x&&_.add(x)}for(const y of Mr(t).simulation_voltage_source.list()){const x=y.negative_source_port_id??y.terminal2_source_port_id;if(x){const E=u.getNetConnectedToId(x);E&&_.add(E)}}for(const y of _)h.set(y,"0");if(r.length>0)for(const y of r){if(!y.name||y.reference_input_source_port_id||y.reference_input_source_net_id)continue;let x;const E=y.signal_input_source_port_id,B=y.signal_input_source_net_id;if(E)x=u.getNetConnectedToId(E);else if(B){const S=i.find(Q=>Q.connected_source_net_ids.includes(B));if(S&&S.connected_source_port_ids.length>0){const Q=S.connected_source_port_ids[0];x=u.getNetConnectedToId(Q)}}x?h.has(x)||h.set(x,y.name):E&&y.name&&g.set(E,y.name)}for(const y of o){const x=y.source_port_id,E=u.getNetConnectedToId(x);E&&(h.has(E)||h.set(E,`N${d++}`),g.set(x,h.get(E)))}for(const y of i){const x=y.connected_source_port_ids.map(E=>g.get(E)).find(E=>E!==void 0);if(x)for(const E of y.connected_source_net_ids)g.set(E,x)}for(const y of o){const x=y.source_port_id;g.has(x)||g.set(x,`N${d++}`)}for(const y of n){if(y.type!=="source_component")continue;const x=Mr(t).source_port.list({source_component_id:y.source_component_id}).sort((B,S)=>(B.pin_number??0)-(S.pin_number??0)),E=x.map(B=>g.get(B.source_port_id)||"0");if("ftype"in y){let B=null;switch(y.ftype){case"simple_resistor":{B=d4o({component:y,nodes:E});break}case"simple_switch":{B=h4o({netlist:e,component:y,nodes:E,simulationSwitchMap:l});break}case"simple_capacitor":{B=p4o({component:y,nodes:E});break}case"simple_diode":{B=_4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}case"simple_led":{B=f4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}case"simple_inductor":{B=I4o({component:y,nodes:E});break}case"simple_mosfet":{B=C4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}case"simple_transistor":{B=y4o({netlist:e,component:y,componentPorts:x,nodeMap:g});break}}B&&e.addComponent(B)}}x4o({netlist:e,simulationVoltageSources:Mr(t).simulation_voltage_source.list(),nodeMap:g}),E4o({netlist:e,simulationCurrentSources:Mr(t).simulation_current_source.list(),nodeMap:g}),D4o(e,A,g),R4o(e,c,g);const C=t.find(y=>y.type==="simulation_experiment");return C&&P4o({netlist:e,simulationExperiment:C,simulationVoltageProbes:r,simulationCurrentProbes:s,sourceTraces:i,nodeMap:g}),e}function bwe(t,e){e=pPt(e||{R:255,G:255,B:255}),t=pPt(t);let n=t;return t.A!==void 0&&(n={R:e.R+(t.R-e.R)*t.A,G:e.G+(t.G-e.G)*t.A,B:e.B+(t.B-e.B)*t.A}),F4o(k4o(n))}function k4o(t){let e=t.R/255,n=t.G/255,o=t.B/255;e>.04045?e=Math.pow((e+.055)/1.055,2.4):e=e/12.92,n>.04045?n=Math.pow((n+.055)/1.055,2.4):n=n/12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o=o/12.92,e*=100,n*=100,o*=100;const i=e*.4124+n*.3576+o*.1805,r=e*.2126+n*.7152+o*.0722,s=e*.0193+n*.1192+o*.9505;return{X:i,Y:r,Z:s}}function F4o(t){let i=t.Y/100,r=t.Z/108.883,s=t.X/95.047;s>.008856?s=Math.pow(s,1/3):s=7.787*s+16/116,i>.008856?i=Math.pow(i,1/3):i=7.787*i+16/116,r>.008856?r=Math.pow(r,1/3):r=7.787*r+16/116;const a=116*i-16,A=500*(s-i),c=200*(i-r);return{L:a,a:A,b:c}}function pPt(t){let e,n,o,i;"R"in t?(e=t.R,n=t.G,o=t.B,i=t.A):(e=t.r,n=t.g,o=t.b,i=t.a);const r={R:e,G:n,B:o};return i!==void 0&&(r.A=i),r}function L4o(t,e,n){("R"in t||"r"in t)&&(t=bwe(t,n)),("R"in e||"r"in e)&&(e=bwe(e,n));const o=t.L,i=t.a,r=t.b,s=e.L,a=e.a,A=e.b,c=1,l=1,u=1,g=Math.sqrt(Math.pow(i,2)+Math.pow(r,2)),h=Math.sqrt(Math.pow(a,2)+Math.pow(A,2)),d=(g+h)/2,p=.5*(1-Math.sqrt(Math.pow(d,7)/(Math.pow(d,7)+Math.pow(25,7)))),m=(1+p)*i,_=(1+p)*a,f=Math.sqrt(Math.pow(m,2)+Math.pow(r,2)),I=Math.sqrt(Math.pow(_,2)+Math.pow(A,2)),C=mPt(r,m),y=mPt(A,_),x=s-o,E=I-f,B=O4o(g,h,C,y),S=2*Math.sqrt(f*I)*Math.sin(sO(B)/2),Q=(o+s)/2,w=(f+I)/2,M=G4o(g,h,C,y),k=1-.17*Math.cos(sO(M-30))+.24*Math.cos(sO(2*M))+.32*Math.cos(sO(3*M+6))-.2*Math.cos(sO(4*M-63)),R=30*Math.exp(-Math.pow((M-275)/25,2)),F=Math.sqrt(Math.pow(w,7)/(Math.pow(w,7)+Math.pow(25,7))),O=1+.015*Math.pow(Q-50,2)/Math.sqrt(20+Math.pow(Q-50,2)),U=1+.045*w,Y=1+.015*w*k,W=-2*F*Math.sin(sO(2*R));return Math.sqrt(Math.pow(x/(O*c),2)+Math.pow(E/(U*l),2)+Math.pow(S/(Y*u),2)+W*(E/(U*l))*(S/(Y*u)))}function H4o(t){return t*(180/Math.PI)}function sO(t){return t*(Math.PI/180)}function mPt(t,e){if(t===0&&e===0)return 0;{const n=H4o(Math.atan2(t,e));return n>=0?n:n+360}}function O4o(t,e,n,o){if(t*e===0)return 0;if(Math.abs(o-n)<=180)return o-n;if(o-n>180)return o-n-360;if(o-n<-180)return o-n+360;throw new Error}function G4o(t,e,n,o){if(t*e===0)return n+o;if(Math.abs(n-o)<=180)return(n+o)/2;if(Math.abs(n-o)>180&&n+o<360)return(n+o+360)/2;if(Math.abs(n-o)>180&&n+o>=360)return(n+o-360)/2;throw new Error}function _Pt(t){return bwe(t)}var Y4o=2.3,fPt={R:255,G:0,B:255},xb=({color1:t,color2:e})=>t.R===e.R&&t.G===e.G&&t.B===e.B,c0e=t=>{try{const e=Cpo(t);if(e.depth!==8)return null;const n=e.channels,o=e.data,i=new Uint8Array(e.width*e.height*4);if(n===4)i.set(o);else if(n===3)for(let r=0,s=0;r<o.length;r+=3,s+=4)i[s]=o[r],i[s+1]=o[r+1],i[s+2]=o[r+2],i[s+3]=255;else return null;return{width:e.width,height:e.height,data:i,getPixel:(r,s)=>{const a=(s*e.width+r)*4;return{R:i[a],G:i[a+1],B:i[a+2]}}}}catch{return null}},l0e=async t=>t instanceof Uint8Array?t:new Uint8Array(t),U4o=(t,e)=>{if(t.byteLength!==e.byteLength)return!1;for(let n=0;n<t.byteLength;n+=1)if(t[n]!==e[n])return!1;return!0},K4o=t=>{if(!t)return fPt;const e=/^#?([0-9a-fA-F]{6})$/.exec(t.trim());if(!e)return fPt;const n=e[1];return{R:Number.parseInt(n.slice(0,2),16),G:Number.parseInt(n.slice(2,4),16),B:Number.parseInt(n.slice(4,6),16)}},V4o=t=>{const e=t*6.2,n=t*.695;let o=null,i=null,r=null,s=null;return a=>{if(xb(a))return!0;let A=null,c=null;o&&xb({color1:a.color1,color2:o})?A=r:i&&xb({color1:a.color1,color2:i})&&(A=s),o&&xb({color1:a.color2,color2:o})?c=r:i&&xb({color1:a.color2,color2:i})&&(c=s),A||(A=_Pt(a.color1),o=a.color1,r=A),c||(c=_Pt(a.color2),i=a.color2,s=c);const l=Math.sqrt((A.L-c.L)*(A.L-c.L)+(A.a-c.a)*(A.a-c.a)+(A.b-c.b)*(A.b-c.b));return l>=e?!1:l<=n?!0:L4o(A,c)<t}},z4o=class{_baseComparator;_img1;_img2;_brightnessTolerance;constructor(t,e,n,{antialiasingTolerance:o=0}){this._baseComparator=t,this._img1=e,this._img2=n,this._brightnessTolerance=o}compare(t){return this._baseComparator(t)||this._checkIsAntialiased(t)}_checkIsAntialiased(t){return this._isAntialiased(this._img2,t.x,t.y,t,this._img1)||this._isAntialiased(this._img1,t.x,t.y,t,this._img2)}_isAntialiased(t,e,n,o,i){const r=t.getPixel(e,n),s=Math.max(e-1,0),a=Math.max(n-1,0),A=Math.min(e+1,o.width-1),c=Math.min(n+1,o.height-1),l=!i,u=l?this._brightnessTolerance:0;let g=0,h=0,d=0,p=0,m=0,_=0,f=0,I=0,C=0;for(let y=a;y<=c;y+=1)for(let x=s;x<=A;x+=1){if(x===e&&y===n)continue;const E=this._brightnessDelta(t.getPixel(x,y),r);if(Math.abs(E)<=u?g+=1:E>u?h+=1:d+=1,g>2)return!1;l||(E<p&&(p=E,_=x,f=y),E>m&&(m=E,I=x,C=y))}return l?!0:d===0||h===0?!1:!this._isAntialiased(t,_,f,o)&&!this._isAntialiased(i,_,f,o)||!this._isAntialiased(t,I,C,o)&&!this._isAntialiased(i,I,C,o)}_brightnessDelta(t,e){return t.R*.29889531+t.G*.58662247+t.B*.11448223-(e.R*.29889531+e.G*.58662247+e.B*.11448223)}},J4o=class{pixelRatio;caretTopLeft=null;caretBottomRight=null;_baseComparator;_state="init";constructor(t,e){this.pixelRatio=e?Math.floor(e):1,this._baseComparator=t}compare(t){return this._baseComparator(t)||this._checkIsCaret(t)}_checkIsCaret(t){if(this._state==="caretDetected")return this.caretTopLeft!==null&&this.caretBottomRight!==null&&t.x>=this.caretTopLeft.x&&t.x<=this.caretBottomRight.x&&t.y>=this.caretTopLeft.y&&t.y<=this.caretBottomRight.y;if(this.caretTopLeft&&this.caretBottomRight&&t.x>=this.caretTopLeft.x&&t.x<=this.caretBottomRight.x&&t.y>=this.caretTopLeft.y&&t.y<=this.caretBottomRight.y)return!0;const e=this._getLastCaretPoint(t);return this._looksLikeCaret({x:t.x,y:t.y},e)?(this.caretTopLeft={x:t.x,y:t.y},this.caretBottomRight=e,this._state="caretDetected",!0):!1}_getLastCaretPoint(t){let e={x:t.x,y:t.y};for(;;){const n=this._getNextCaretPoint({x:t.x,y:t.y},e);if(this._isPointOutsideImages(n,t)||this._areColorsSame(n,t))return e;e=n}}_isPointOutsideImages(t,e){return t.x>=e.minWidth||t.y>=e.minHeight}_areColorsSame(t,e){const n=e.img1.getPixel(t.x,t.y),o=e.img2.getPixel(t.x,t.y);return xb({color1:n,color2:o})}_getNextCaretPoint(t,e){const n=e.x+1;return n<t.x+this.pixelRatio?{x:n,y:e.y}:{x:t.x,y:e.y+1}}_looksLikeCaret(t,e){return this._caretHeight(t,e)>1&&this._caretWidth(t,e)===this.pixelRatio}_caretHeight(t,e){return e.y-t.y+1}_caretWidth(t,e){return e.x-t.x+1}},IPt=(t={})=>{if(t.strict&&t.tolerance!==void 0)throw new TypeError('Unable to use "strict" and "tolerance" options together');if(t.percentThreshold!==void 0&&(!Number.isFinite(t.percentThreshold)||t.percentThreshold<0))throw new TypeError('Expected "percentThreshold" to be a non-negative number');return{strict:!!t.strict,tolerance:t.tolerance??Y4o,ignoreCaret:t.ignoreCaret??!0,ignoreAntialiasing:t.ignoreAntialiasing??!0,antialiasingTolerance:t.antialiasingTolerance??0,pixelRatio:t.pixelRatio}},CPt=(t,e,n)=>{let o=n.strict?i=>xb(i):V4o(n.tolerance);if(n.ignoreAntialiasing){const i=new z4o(o,t,e,n);o=r=>i.compare(r)}if(n.ignoreCaret){const i=new J4o(o,n.pixelRatio);o=r=>i.compare(r)}return o},W4o=async(t,e,n)=>{const o=c0e(t),i=c0e(e);if(!o||!i)return{equal:U4o(t,e)};const r=CPt(o,i,n),s=Math.max(o.width,i.width),a=Math.max(o.height,i.height),A=Math.min(o.width,i.width),c=Math.min(o.height,i.height),l=s*a;let u=0;for(let g=0;g<a;g+=1)for(let h=0;h<s;h+=1){if(h>=A||g>=c){u+=1;continue}const d=o.getPixel(h,g),p=i.getPixel(h,g);xb({color1:d,color2:p})||r({color1:d,color2:p,img1:o,img2:i,x:h,y:g,width:s,height:a,minWidth:A,minHeight:c})||(u+=1)}return{equal:u===0,differentPixels:u,totalPixels:l}},j4o=async(t,e,n={})=>{const o=IPt(n),i=await l0e(t),r=await l0e(e);return W4o(i,r,o)},$4o=async({reference:t,current:e,highlightColor:n,...o})=>{const i=IPt(o),r=await l0e(t),s=await l0e(e),a=c0e(r),A=c0e(s);if(!(a&&A))return s;const c=CPt(a,A,i),l=Math.max(a.width,A.width),u=Math.max(a.height,A.height),g=Math.min(a.width,A.width),h=Math.min(a.height,A.height),d=K4o(n),p=new Uint8Array(l*u*4);for(let _=0;_<u;_+=1)for(let f=0;f<l;f+=1){const I=(_*l+f)*4;if(f>=g||_>=h){p[I]=d.R,p[I+1]=d.G,p[I+2]=d.B,p[I+3]=255;continue}const C=a.getPixel(f,_),y=A.getPixel(f,_);xb({color1:C,color2:y})||c({color1:C,color2:y,img1:a,img2:A,x:f,y:_,width:l,height:u,minWidth:g,minHeight:h})?(p[I]=C.R,p[I+1]=C.G,p[I+2]=C.B,p[I+3]=255):(p[I]=d.R,p[I+1]=d.G,p[I+2]=d.B,p[I+3]=255)}return ypo({width:l,height:u,data:p,channels:4,depth:8})};Object.assign(j4o,{createDiff:$4o});function q4o(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function X4o(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function u0e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,u0e.prototype),i.expected=e,i.found=n,i.location=o,i.name="SyntaxError",i}X4o(u0e,Error);function Swe(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}u0e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,r=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+r.line+":"+r.column;if(n){var a=this.location.end,A=Swe("",r.line.toString().length," "),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`
 --> `+s+`
`+A+` |
`+r.line+" | "+c+`
`+A+" | "+Swe("",i.column-1," ")+Swe("",u,"^")}else e+=`
 at `+s}return e},u0e.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+"-"+r(u[1]):r(u)});return"["+(c.inverted?"^":"")+l.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function r(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length>0){for(u=1,g=1;u<l.length;u++)l[u-1]!==l[u]&&(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function A(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(t)+" but "+A(e)+" found."};function Pj(t,e){const n=new lse(t),o=n.getTotalLength(),i=Math.max(2,Math.ceil(o*e)),r=[];for(let s=1;s<=i;s++){const a=s/i*o,A=n.getPointAtLength(a);r.push({x:A.x,y:A.y})}return r}function Z4o(t,e=10){const n=new lse(t);n.toAbsolute();const o=n.segments,i=[];let r=[],s=0,a=0,A=0,c=0;for(const l of o)switch(l[0]){case"M":{r.length>0&&i.push(r),s=l[1],a=l[2],A=s,c=a,r=[{x:s,y:a}];break}case"L":{s=l[1],a=l[2],r.push({x:s,y:a});break}case"H":{s=l[1],r.push({x:s,y:a});break}case"V":{a=l[1],r.push({x:s,y:a});break}case"Z":{(s!==A||a!==c)&&r.push({x:A,y:c}),s=A,a=c;break}case"C":{const g=l[5],h=l[6],d=`M ${s} ${a} C ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case"S":{const g=l[3],h=l[4],d=`M ${s} ${a} S ${l[1]} ${l[2]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case"Q":{const g=l[3],h=l[4],d=`M ${s} ${a} Q ${l[1]} ${l[2]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case"T":{const g=l[1],h=l[2],d=`M ${s} ${a} T ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}case"A":{const g=l[6],h=l[7],d=`M ${s} ${a} A ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${l[5]} ${g} ${h}`,p=Pj(d,e);r.push(...p),s=g,a=h;break}}return r.length>0&&i.push(r),i.map(l=>{const u=[];for(const g of l)(u.length===0||Math.abs(u[u.length-1].x-g.x)>1e-9||Math.abs(u[u.length-1].y-g.y)>1e-9)&&u.push(g);return u})}var Eb="image/svg+xml",yPt="image/png";async function xPt(t){if(t.startsWith("data:"))return tBo(t);let e;try{e=await fetch(t)}catch(i){throw new Error(`Failed to fetch image "${t}". Pass a data URL or a fetchable URL.`,{cause:i})}if(!e.ok)throw new Error(`Failed to fetch image "${t}": ${e.status} ${e.statusText}`);const n=e.headers.get("content-type")?.split(";")[0],o=n&&n!=="application/octet-stream"?n:nBo(t);return{mimetype:o,text:o===Eb?await e.text():"",dataUrl:t,projectRelativePath:t}}function eBo({svg:t,width:e,height:n,transform:o}){const i=EPt({svg:t,width:e,height:n,transform:o}).map(oBo).filter(s=>s.length>=3).map(s=>({vertices:s,polygon:bPt(s),samplePoint:rBo(s)})).map(s=>({...s,area:s.polygon.area()})).filter(s=>s.area>1e-9),r=i.filter(s=>i.filter(A=>A!==s&&A.area>s.area&&A.polygon.contains(by(s.samplePoint.x,s.samplePoint.y))).length%2===0);return r.map(s=>{const a=i.filter(A=>A!==s&&A.area<s.area&&s.polygon.contains(by(A.samplePoint.x,A.samplePoint.y))&&!r.some(c=>c!==s&&c.area<s.area&&c.area>A.area&&c.polygon.contains(by(A.samplePoint.x,A.samplePoint.y)))).map(A=>({vertices:iBo(A.vertices)}));return{outer_ring:{vertices:BPt(s.vertices)},inner_rings:a}})}function EPt({svg:t,width:e,height:n,transform:o}){const i=sBo(t),r=e/i.width,s=n/i.height;return aBo(t).flatMap(a=>Z4o(a,.03).map(A=>A.map(c=>q4o(o,{x:(c.x-i.x-i.width/2)*r,y:-(c.y-i.y-i.height/2)*s})).filter((c,l,u)=>l===0||Math.abs(c.x-u[l-1].x)>1e-6||Math.abs(c.y-u[l-1].y)>1e-6)))}function BPt(t){return SPt(t)>0?[...t].reverse():t}function tBo(t){const e=t.indexOf(",");if(!t.startsWith("data:")||e===-1)throw new Error("Invalid data URL for image source");const n=t.slice(5,e),o=t.slice(e+1),i=n.split(";")[0]||Eb,r=n.includes(";base64")?new TextDecoder().decode(Uint8Array.from(atob(o),s=>s.charCodeAt(0))):decodeURIComponent(o);return{mimetype:i,text:r,dataUrl:t,projectRelativePath:"inline"}}function nBo(t){const e=t.toLowerCase();return e.endsWith(".svg")?Eb:e.endsWith(".png")?yPt:"application/octet-stream"}function oBo(t){if(t.length<2)return t;const e=t[0],n=t[t.length-1];return Math.abs(e.x-n.x)<1e-6&&Math.abs(e.y-n.y)<1e-6?t.slice(0,-1):t}function iBo(t){return SPt(t)<0?[...t].reverse():t}function rBo(t){let e=0,n=0;for(const o of t)e+=o.x,n+=o.y;return{x:e/t.length,y:n/t.length}}function bPt(t){const e=new Ip;return e.addFace(t.map(n=>by(n.x,n.y))),e}function SPt(t){return[...bPt(t).faces][0].signedArea()}function sBo(t){const n=t.match(/\bviewBox\s*=\s*["']([^"']+)["']/i)?.[1]?.trim().split(/[\s,]+/).map(Number);return n?.length===4&&n.every(Number.isFinite)?{x:n[0],y:n[1],width:n[2],height:n[3]}:{x:0,y:0,width:1,height:1}}function aBo(t){const e=[],n=/<path\b[^>]*>/gi;for(const o of t.match(n)??[]){const i=o.match(/\bd\s*=\s*(["'])(.*?)\1/i);i?.[2]&&e.push(i[2])}return e}var z7=class{MAX_ITERATIONS=1e5;solved=!1;failed=!1;iterations=0;progress=0;error=null;activeSubSolver;failedSubSolvers;timeToSolve;stats={};_setupDone=!1;getSolverName(){return this.constructor.name}setup(){this._setupDone||(this._setup(),this._setupDone=!0)}_setup(){}step(){if(this._setupDone||this.setup(),!this.solved&&!this.failed){this.iterations++;try{this._step()}catch(t){throw this.error=`${this.getSolverName()} error: ${t}`,this.failed=!0,t}!this.solved&&this.iterations>=this.MAX_ITERATIONS&&this.tryFinalAcceptance(),!this.solved&&this.iterations>=this.MAX_ITERATIONS&&(this.error=`${this.getSolverName()} ran out of iterations`,this.failed=!0),"computeProgress"in this&&(this.progress=this.computeProgress())}}_step(){}getConstructorParams(){throw new Error("getConstructorParams not implemented")}getOutput(){return null}solve(){const t=Date.now();for(;!this.solved&&!this.failed;)this.step();const e=Date.now();this.timeToSolve=e-t}visualize(){return{lines:[],points:[],rects:[],circles:[]}}tryFinalAcceptance(){}preview(){return{lines:[],points:[],rects:[],circles:[]}}};function Bb(t,e,n,o={}){return{solverName:t,solverClass:e,getConstructorParams:n,onSolved:o.onSolved}}var ABo=class extends z7{startTimeOfStage={};endTimeOfStage={};timeSpentOnStage={};firstIterationOfStage={};currentPipelineStageIndex=0;inputProblem;pipelineOutputs={};constructor(t){super(),this.inputProblem=t,this.MAX_ITERATIONS=1e6}_step(){const t=this.pipelineDef[this.currentPipelineStageIndex];if(!t){this.solved=!0;return}if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.solved){this.endTimeOfStage[t.solverName]=performance.now(),this.timeSpentOnStage[t.solverName]=this.endTimeOfStage[t.solverName]-this.startTimeOfStage[t.solverName];const n=this.activeSubSolver.getOutput();n!==null&&(this.pipelineOutputs[t.solverName]=n),t.onSolved?.(this),this.activeSubSolver=null,this.currentPipelineStageIndex++}else this.activeSubSolver.failed&&(this.error=this.activeSubSolver?.error,this.failed=!0,this.activeSubSolver=null);return}const e=t.getConstructorParams(this);this.activeSubSolver=new t.solverClass(...e),this[t.solverName]=this.activeSubSolver,this.timeSpentOnStage[t.solverName]=0,this.startTimeOfStage[t.solverName]=performance.now(),this.firstIterationOfStage[t.solverName]=this.iterations}solveUntilStage(t){for(;this.getCurrentStageName().toLowerCase()!==t.toLowerCase()&&(this.step(),!(this.failed||this.solved)););}getCurrentStageName(){return this.pipelineDef[this.currentPipelineStageIndex]?.solverName??"none"}getStageProgress(){const t=this.pipelineDef.length;if(t===0)return 1;const e=this.activeSubSolver?.progress??0;return(this.currentPipelineStageIndex+e)/t}getStageStats(){const t={};for(const e of this.pipelineDef){const n=this.timeSpentOnStage[e.solverName]||0,o=this.firstIterationOfStage[e.solverName]||0,i=this.iterations,r=e.solverName===this.getCurrentStageName()?i-o:0,s=this.currentPipelineStageIndex>this.pipelineDef.findIndex(a=>a.solverName===e.solverName);t[e.solverName]={timeSpent:n,iterations:r,completed:s}}return t}initialVisualize(){return null}finalVisualize(){return null}visualize(){if(!this.solved&&this.activeSubSolver)return this.activeSubSolver.visualize();let t=0;const e=this.initialVisualize();e&&(RH(e,0),t=1);let n=null;this.solved&&(n=this.finalVisualize());const o=[e].filter(Boolean).concat(this.pipelineDef.map((i,r)=>{const a=this[i.solverName]?.visualize();return a?(RH(a,r+t),a):null}).filter(Boolean));return o.length===0?{points:[],rects:[],lines:[],circles:[],texts:[]}:(this.solved&&n&&(RH(n,o.length+t+1),o.push(n)),o.length===1?o[0]:{points:o.flatMap(i=>i.points||[]),rects:o.flatMap(i=>i.rects||[]),lines:o.flatMap(i=>i.lines||[]),circles:o.flatMap(i=>i.circles||[]),texts:o.flatMap(i=>i.texts||[])})}preview(){return this.activeSubSolver?this.activeSubSolver.preview():super.preview()}computeProgress(){return this.getStageProgress()}getStageOutput(t){return this.pipelineOutputs[t]}getAllOutputs(){return{...this.pipelineOutputs}}hasStageOutput(t){return t in this.pipelineOutputs}getSolver(t){return this[t]}},cBo=class extends z7{constructor(t){super(),this.params=t;const{cellContents:e}=t;for(let n=0;n<e.length;n++)for(let o=n+1;o<e.length;o++)this._allPairs.push([n,o])}params;midlines=[];_pairIdx=0;_allPairs=[];_step(){const{cellContents:t,containerWidth:e,containerHeight:n}=this.params;if(this._pairIdx>=this._allPairs.length){this.solved=!0;return}const[o,i]=this._allPairs[this._pairIdx],r=t[o],s=t[i],a=r.x+r.width,A=s.x+s.width,c=r.y+r.height,l=s.y+s.height;if(a<s.x||A<r.x){const u=a<s.x?(a+s.x)/2:(A+r.x)/2;this.midlines.push({id:`midline-${this.midlines.length}`,start:{x:u,y:0},end:{x:u,y:n},cellIds:[r.cellId,s.cellId],type:"vertical"})}if(c<s.y||l<r.y){const u=c<s.y?(c+s.y)/2:(l+r.y)/2;this.midlines.push({id:`midline-${this.midlines.length}`,start:{x:0,y:u},end:{x:e,y:u},cellIds:[r.cellId,s.cellId],type:"horizontal"})}this._pairIdx++,this._pairIdx>=this._allPairs.length&&(this.solved=!0)}getOutput(){return this.midlines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t}=this.params,e=this._allPairs[this._pairIdx],n=e?new Set([t[e[0]]?.cellId,t[e[1]]?.cellId]):new Set;return{rects:t.map(o=>({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:n.has(o.cellId)?"rgba(255, 80, 80, 0.45)":"rgba(255, 165, 0, 0.3)",stroke:n.has(o.cellId)?"#ff2020":"#c87000",label:o.cellId})),lines:this.midlines.map(o=>({points:[o.start,o.end],strokeColor:"#888888",strokeDash:[4,4],label:o.id}))}}},lBo=(t,e)=>{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y,s=e.start.x,a=e.start.y,A=e.end.x,c=e.end.y,l=(n-i)*(a-c)-(o-r)*(s-A);if(Math.abs(l)<1e-4)return null;const u=((n-s)*(a-c)-(o-a)*(s-A))/l,g=-((n-i)*(o-a)-(o-r)*(n-s))/l;return u>=0&&u<=1&&g>=0&&g<=1?{x:n+u*(i-n),y:o+u*(r-o)}:null},uBo=class extends z7{constructor(t){super(),this.params=t}params;intersections=[];_outerIdx=0;_step(){const{midlines:t}=this.params;if(t.length<=1){this.solved=!0;return}if(this._outerIdx>=t.length-1){this.solved=!0;return}const e=t[this._outerIdx];for(const n of t.slice(this._outerIdx+1)){const o=lBo(e,n);o&&this.intersections.push({point:o,midlineIds:[e.id,n.id]})}this._outerIdx++,this._outerIdx>=t.length-1&&(this.solved=!0)}getOutput(){return this.intersections}getConstructorParams(){return[this.params]}visualize(){const{midlines:t}=this.params,e=t[this._outerIdx];return{lines:t.map(n=>({points:[n.start,n.end],strokeColor:n===e?"#2196f3":"#cccccc",strokeWidth:n===e?2.5:1,strokeDash:n===e?void 0:[4,4]})),points:this.intersections.map(n=>({x:n.point.x,y:n.point.y,color:"#e63946",label:`(${n.point.x.toFixed(1)}, ${n.point.y.toFixed(1)})`}))}}},gBo=t=>{const e=[];for(let n=0;n+1<t.length;n++){const o=t[n],i=t[n+1];o!==void 0&&i!==void 0&&e.push([o,i])}return e},dBo=(t,e)=>{const n=Math.max(e.x,Math.min(t.x,e.x+e.width)),o=Math.max(e.y,Math.min(t.y,e.y+e.height)),i=t.x-n,r=t.y-o;return Math.sqrt(i*i+r*r)},hBo=(t,e,n)=>{let i=1/0;for(let r=0;r<=10;r++){const s=r/10,a={x:t.x+s*(e.x-t.x),y:t.y+s*(e.y-t.y)};i=Math.min(i,dBo(a,n))}return i},pBo=(t,e,n)=>Math.min(...n.map(o=>hBo(t,e,o))),mBo=class extends z7{constructor(t){super(),this.params=t}params;allSegments=[];_midlineIdx=0;_segmentId=0;_step(){const{midlines:t,intersections:e,cellContents:n}=this.params;if(this._midlineIdx>=t.length){this.solved=!0;return}const o=t[this._midlineIdx],i=e.filter(r=>r.midlineIds.includes(o.id)).map(r=>r.point).sort((r,s)=>o.type==="vertical"?r.y-s.y:r.x-s.x);for(const[r,s]of gBo([o.start,...i,o.end]))this.allSegments.push({id:`segment-${this._segmentId++}`,start:r,end:s,fromCellIds:o.cellIds,distanceToAnyCell:pBo(r,s,n)});this._midlineIdx++,this._midlineIdx>=t.length&&(this.solved=!0)}getOutput(){return this.allSegments}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,midlines:e}=this.params,n=e[this._midlineIdx],o=Math.max(...this.allSegments.map(i=>i.distanceToAnyCell??0),1);return{rects:t.map(i=>({center:{x:i.x+i.width/2,y:i.y+i.height/2},width:i.width,height:i.height,fill:"rgba(255, 165, 0, 0.2)",stroke:"#c87000"})),lines:[...this.allSegments.map(i=>{const r=(i.distanceToAnyCell??0)/o,s=Math.round(255*(1-r)),a=Math.round(200*r);return{points:[i.start,i.end],strokeColor:`rgb(${s}, ${a}, 80)`,strokeWidth:1.5}}),...n?[{points:[n.start,n.end],strokeColor:"#2196f3",strokeWidth:2,strokeDash:[8,4]}]:[]]}}},QPt=t=>{const e=[];for(let n=0;n+1<t.length;n++){const o=t[n],i=t[n+1];o!==void 0&&i!==void 0&&e.push([o,i])}return e},_Bo=(t,e,n,o)=>{const i=t.x,r=t.y,s=e.x,a=e.y,A=n.x,c=n.y,l=o.x,u=o.y,g=(i-s)*(c-u)-(r-a)*(A-l);if(Math.abs(g)<1e-4)return!1;const h=((i-A)*(c-u)-(r-c)*(A-l))/g,d=-((i-s)*(r-c)-(r-a)*(i-A))/g;return h>=0&&h<=1&&d>=0&&d<=1},fBo=(t,e,n)=>{const{x:o,y:i,width:r,height:s}=n,a=t.x>=o&&t.x<=o+r&&t.y>=i&&t.y<=i+s,A=e.x>=o&&e.x<=o+r&&e.y>=i&&e.y<=i+s;if(a||A)return!0;const c=[{start:{x:o,y:i},end:{x:o+r,y:i}},{start:{x:o+r,y:i},end:{x:o+r,y:i+s}},{start:{x:o+r,y:i+s},end:{x:o,y:i+s}},{start:{x:o,y:i+s},end:{x:o,y:i}}];for(const l of c)if(_Bo(t,e,l.start,l.end))return!0;return!1},IBo=(t,e)=>t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y,vPt=["rgba(100, 149, 237, 0.25)","rgba(144, 238, 144, 0.25)","rgba(255, 182, 193, 0.25)","rgba(221, 160, 221, 0.25)","rgba(255, 218, 185, 0.25)","rgba(175, 238, 238, 0.25)"],CBo=class extends z7{constructor(t){super(),this.params=t}params;validSegments=[];cellContainingRects=[];gridRects=[];_phase=0;_segIdx=0;_acceptedSegs=[];_rejectedSegs=[];_step(){const{allSegments:t,cellContents:e,containerWidth:n,containerHeight:o}=this.params;if(this._phase===0){if(this._segIdx>=t.length){this._phase=1;return}const u=t[this._segIdx];!e.some(h=>fBo(u.start,u.end,h))?this._acceptedSegs.push(u):this._rejectedSegs.push(u),this._segIdx++;return}const i=new Set([0,n]),r=new Set([0,o]);this._acceptedSegs.forEach(u=>{Math.abs(u.start.x-u.end.x)<.001?i.add(u.start.x):r.add(u.start.y)});const s=Array.from(i).sort((u,g)=>u-g),a=Array.from(r).sort((u,g)=>u-g),A=[];e.forEach(u=>{const g=s.filter(m=>m<=u.x).pop()??s[0],h=s.find(m=>m>=u.x+u.width)??s[s.length-1],d=a.filter(m=>m<=u.y).pop()??a[0],p=a.find(m=>m>=u.y+u.height)??a[a.length-1];A.push({cellId:`contain-${u.cellId}`,x:g,y:d,width:Math.max(0,h-g),height:Math.max(0,p-d)})});const c=[];let l=0;for(const[u,g]of QPt(s))if(!(g-u<=0))for(const[h,d]of QPt(a)){if(d-h<=0)continue;const p={cellId:`gridRect-${l++}`,x:u,y:h,width:g-u,height:d-h};e.some(m=>IBo(p,m))||c.push(p)}A.forEach(u=>{const g=`${u.x},${u.y},${u.width},${u.height}`;c.some(h=>`${h.x},${h.y},${h.width},${h.height}`===g)||c.push(u)}),this.validSegments=this._acceptedSegs,this.cellContainingRects=A,this.gridRects=c,this.solved=!0}getOutput(){return{validSegments:this.validSegments,cellContainingRects:this.cellContainingRects,gridRects:this.gridRects}}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,allSegments:e}=this.params,n=e[this._segIdx];return{rects:[...this.gridRects.map((o,i)=>({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:vPt[i%vPt.length],stroke:"#999999"})),...t.map(o=>({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:"rgba(255, 165, 0, 0.4)",stroke:"#c87000",label:o.cellId}))],lines:[...this._rejectedSegs.map(o=>({points:[o.start,o.end],strokeColor:"rgba(220, 50, 50, 0.35)",strokeDash:[3,3],strokeWidth:1})),...this._acceptedSegs.map(o=>({points:[o.start,o.end],strokeColor:"#2196f3",strokeWidth:1.5})),...n&&this._phase===0?[{points:[n.start,n.end],strokeColor:"#ff9800",strokeWidth:3}]:[],...this.validSegments.map(o=>({points:[o.start,o.end],strokeColor:"#2196f3",strokeWidth:2}))]}}},Ky=.001,yBo=(t,e,n=Ky)=>Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n,xBo=(t,e)=>{const n=Math.max(t.x-(e.x+e.width),e.x-(t.x+t.width),0),o=Math.max(t.y-(e.y+e.height),e.y-(t.y+t.height),0);return n+o},EBo=(t,e,n=.5)=>{const o=(Math.abs(t.x+t.width-e.x)<n||Math.abs(e.x+e.width-t.x)<n)&&!(t.y+t.height<=e.y||e.y+e.height<=t.y),i=(Math.abs(t.y+t.height-e.y)<n||Math.abs(e.y+e.height-t.y)<n)&&!(t.x+t.width<=e.x||e.x+e.width<=t.x);return o||i},wPt=["rgba(100, 149, 237, 0.35)","rgba(144, 238, 144, 0.35)","rgba(255, 182, 193, 0.35)","rgba(221, 160, 221, 0.35)","rgba(255, 218, 185, 0.35)","rgba(175, 238, 238, 0.35)","rgba(250, 200, 100, 0.35)","rgba(180, 220, 180, 0.35)"],PPt=["#6495ed","#3cb371","#ff69b4","#9370db","#ffa07a","#20b2aa","#daa520","#5f9e5f"],BBo=class extends z7{constructor(t){super(),this.params=t}params;mergedRectGroups=[];groupedRects=[];_phase=0;_workRects=[];_unmergedQueue=[];_step(){const{validSegments:t,gridRects:e,cellContainingRects:n,cellContents:o}=this.params;if(this._phase===0){this._workRects=e.map(s=>{let a=1/0;const{x:A,y:c,width:l,height:u}=s;return t.forEach(g=>{const h=Math.min(g.start.x,g.end.x),d=Math.max(g.start.x,g.end.x),p=Math.min(g.start.y,g.end.y),m=Math.max(g.start.y,g.end.y),_=Math.abs(g.start.y-g.end.y)<Ky,f=Math.abs(g.start.x-g.end.x)<Ky;let I=!1;_?(Math.abs(p-c)<Ky||Math.abs(p-(c+u))<Ky)&&h<A+l-Ky&&d>A+Ky&&Math.max(h,A)+Ky<Math.min(d,A+l)&&(I=!0):f&&(Math.abs(h-A)<Ky||Math.abs(h-(A+l))<Ky)&&p<c+u-Ky&&m>c+Ky&&Math.max(p,c)+Ky<Math.min(m,c+u)&&(I=!0),I&&g.distanceToAnyCell!==void 0&&(a=Math.min(a,g.distanceToAnyCell))}),{...s,merged:!1,groupId:null,minBoundingSegmentDistance:a}}),n.forEach((s,a)=>{const A=this._workRects.find(c=>yBo({x:c.x,y:c.y},{x:s.x,y:s.y})&&Math.abs(c.width-s.width)<Ky&&Math.abs(c.height-s.height)<Ky);A&&(A.merged=!0,A.groupId=a)}),this._unmergedQueue=this._workRects.filter(s=>!s.merged).sort((s,a)=>s.minBoundingSegmentDistance-a.minBoundingSegmentDistance),this._updateOutput(),this._phase=1;return}if(this._unmergedQueue.length===0){this._finalize(),this.solved=!0;return}let i=!1;const r=[];for(const s of this._unmergedQueue){const a=this._workRects.find(c=>c.cellId===s.cellId);if(!a||a.merged)continue;const A=this._workRects.filter(c=>c.merged&&EBo(a,c));if(A.length>0&&!i){if(a.merged=!0,A.length===1)a.groupId=A[0].groupId;else{let c=null,l=1/0;for(const u of A){if(u.groupId===null)continue;const g=o[u.groupId];if(!g)continue;const h=xBo(a,g);(h<l||h===l&&(c===null||u.groupId!==null&&u.groupId<c))&&(l=h,c=u.groupId)}a.groupId=c}i=!0}else r.push(s)}this._unmergedQueue=r.sort((s,a)=>s.minBoundingSegmentDistance-a.minBoundingSegmentDistance),i||(this._finalize(),this.solved=!0),this._updateOutput()}_updateOutput(){this.groupedRects=this._workRects.filter(t=>t.groupId!==null)}_finalize(){const{cellContainingRects:t,cellContents:e}=this.params;this.mergedRectGroups=[],t.forEach((n,o)=>{const i=this._workRects.filter(s=>s.merged&&s.groupId===o).map(({merged:s,groupId:a,minBoundingSegmentDistance:A,...c})=>c),r=e[o];r&&this.mergedRectGroups.push([n,r,...i.filter(s=>s.cellId!==n.cellId)])})}getOutput(){return{mergedRectGroups:this.mergedRectGroups,groupedRects:this.groupedRects}}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t}=this.params;return{rects:[...this.groupedRects.map(e=>({center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,fill:wPt[e.groupId%wPt.length],stroke:PPt[e.groupId%PPt.length]})),...this._workRects.filter(e=>!e.merged).map(e=>({center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,fill:"rgba(200, 200, 200, 0.2)",stroke:"#aaaaaa",strokeDash:[3,3]})),...t.map(e=>({center:{x:e.x+e.width/2,y:e.y+e.height/2},width:e.width,height:e.height,fill:"rgba(255, 165, 0, 0.5)",stroke:"#c87000",label:e.cellId}))]}}},bBo=.001,MPt=(t,e)=>{const n=parseFloat(t.x.toFixed(4)),o=parseFloat(t.y.toFixed(4)),i=parseFloat(e.x.toFixed(4)),r=parseFloat(e.y.toFixed(4));return n<i||n===i&&o<r?`${n},${o}_${i},${r}`:`${i},${r}_${n},${o}`},DPt=["rgba(100, 149, 237, 0.25)","rgba(144, 238, 144, 0.25)","rgba(255, 182, 193, 0.25)","rgba(221, 160, 221, 0.25)","rgba(255, 218, 185, 0.25)","rgba(175, 238, 238, 0.25)","rgba(250, 200, 100, 0.25)","rgba(180, 220, 180, 0.25)"],SBo=class extends z7{constructor(t){super(),this.params=t}params;outlineLines=[];_outerIdx=0;_segMap=new Map;_step(){const{groupedRects:t}=this.params,e=bBo;if(this._outerIdx>=t.length){this._rebuildLines(),this.solved=!0;return}const n=t[this._outerIdx];for(const o of t.slice(this._outerIdx+1)){if(n.groupId===o.groupId)continue;const i=n.x+n.width,r=o.x+o.width;if(Math.abs(i-o.x)<e||Math.abs(r-n.x)<e){const A=Math.abs(i-o.x)<e?i:r,c=Math.max(n.y,o.y),l=Math.min(n.y+n.height,o.y+o.height);if(l-c>e){const u={x:A,y:c},g={x:A,y:l};this._segMap.set(MPt(u,g),{start:u,end:g})}}const s=n.y+n.height,a=o.y+o.height;if(Math.abs(s-o.y)<e||Math.abs(a-n.y)<e){const A=Math.abs(s-o.y)<e?s:a,c=Math.max(n.x,o.x),l=Math.min(n.x+n.width,o.x+o.width);if(l-c>e){const u={x:c,y:A},g={x:l,y:A};this._segMap.set(MPt(u,g),{start:u,end:g})}}}this._outerIdx++,this._rebuildLines(),this._outerIdx>=t.length&&(this.solved=!0)}_rebuildLines(){let t=0;this.outlineLines=[],this._segMap.forEach(({start:e,end:n})=>{this.outlineLines.push({id:`outline-${t++}`,start:e,end:n})})}getOutput(){return this.outlineLines}getConstructorParams(){return[this.params]}visualize(){const{groupedRects:t}=this.params,e=t[this._outerIdx];return{rects:t.map(n=>({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:n===e?"rgba(255, 152, 0, 0.45)":DPt[n.groupId%DPt.length],stroke:n===e?"#ff6600":"#cccccc"})),lines:this.outlineLines.map(n=>({points:[n.start,n.end],strokeColor:"#000000",strokeWidth:3}))}}},Zi=.001,Aw=(t,e,n=Zi)=>Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n,Z5=t=>`${t.x.toFixed(4)},${t.y.toFixed(4)}`,g0e=(t,e)=>{const n=Z5(t),o=Z5(e);return n<o?`${n}_${o}`:`${o}_${n}`},Mj=t=>Aw(t.start,t.end),QBo=t=>Math.abs(t.start.x-t.end.x)<Zi||Math.abs(t.start.y-t.end.y)<Zi,cw=(t,e,n,o)=>Math.min(e,o)-Math.max(t,n)>Zi,aO=t=>t.reduce((e,n)=>e+Math.abs(n.start.x-n.end.x)+Math.abs(n.start.y-n.end.y),0),am=(t,e)=>Math.abs(t.start.x-t.end.x)<Zi?Math.abs(e.x-t.start.x)<Zi&&e.y>=Math.min(t.start.y,t.end.y)-Zi&&e.y<=Math.max(t.start.y,t.end.y)+Zi:Math.abs(t.start.y-t.end.y)<Zi?Math.abs(e.y-t.start.y)<Zi&&e.x>=Math.min(t.start.x,t.end.x)-Zi&&e.x<=Math.max(t.start.x,t.end.x)+Zi:!1,d0e=(t,e,n)=>e==="start"?{start:n,end:t.end}:{start:t.start,end:n},NPt=t=>{const e=new Map;for(const n of t)e.set(Z5(n.start),(e.get(Z5(n.start))??0)+1),e.set(Z5(n.end),(e.get(Z5(n.end))??0)+1);return e},vBo=(t,e)=>e.some(n=>{const o=(Math.abs(t.x-n.minX)<Zi||Math.abs(t.x-n.maxX)<Zi)&&t.y>=n.minY-Zi&&t.y<=n.maxY+Zi,i=(Math.abs(t.y-n.minY)<Zi||Math.abs(t.y-n.maxY)<Zi)&&t.x>=n.minX-Zi&&t.x<=n.maxX+Zi;return o||i}),wBo=(t,e)=>{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)<Zi){const s=Math.min(o,r),a=Math.max(o,r);return n>e.minX+Zi&&n<e.maxX-Zi&&a>e.minY-Zi&&s<e.maxY+Zi}if(Math.abs(o-r)<Zi){const s=Math.min(n,i),a=Math.max(n,i);return o>e.minY+Zi&&o<e.maxY-Zi&&a>e.minX+Zi&&s<e.maxX-Zi}return!0},PBo=(t,e)=>{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)<Zi){const s=Math.min(o,r),a=Math.max(o,r);return(Math.abs(n-e.minX)<Zi||Math.abs(n-e.maxX)<Zi)&&cw(s,a,e.minY,e.maxY)}if(Math.abs(o-r)<Zi){const s=Math.min(n,i),a=Math.max(n,i);return(Math.abs(o-e.minY)<Zi||Math.abs(o-e.maxY)<Zi)&&cw(s,a,e.minX,e.maxX)}return!1},Dj=(t,e)=>t.length>0&&t.every(n=>!Mj(n)&&QBo(n)&&!e.some(o=>wBo(n,o)||PBo(n,o))),MBo=(t,e)=>{if(Math.abs(t.start.x-t.end.x)<Zi){const n=t.start.x,o=Math.min(t.start.y,t.end.y),i=Math.max(t.start.y,t.end.y);return e.some(r=>r.maxX<=n+Zi&&cw(o,i,r.minY,r.maxY)&&e.some(s=>s.minX>=n-Zi&&cw(o,i,s.minY,s.maxY)&&cw(r.minY,r.maxY,s.minY,s.maxY)))}if(Math.abs(t.start.y-t.end.y)<Zi){const n=t.start.y,o=Math.min(t.start.x,t.end.x),i=Math.max(t.start.x,t.end.x);return e.some(r=>r.maxY<=n+Zi&&cw(o,i,r.minX,r.maxX)&&e.some(s=>s.minY>=n-Zi&&cw(o,i,s.minX,s.maxX)&&cw(r.minX,r.maxX,s.minX,s.maxX)))}return!1},AO=t=>{const e=new Map,n=t.map(s=>[s.start,s.end]),o=(s,a)=>{const A=Z5(s),c=Z5(a);e.has(A)||e.set(A,new Set),e.has(c)||e.set(c,new Set),e.get(A)?.add(c),e.get(c)?.add(A)};for(let s=0;s<t.length;s++){const a=t[s];if(!(!a||Mj(a)))for(let A=s+1;A<t.length;A++){const c=t[A];if(!c||Mj(c))continue;const l=Math.abs(a.start.x-a.end.x)<Zi,u=Math.abs(a.start.y-a.end.y)<Zi,g=Math.abs(c.start.x-c.end.x)<Zi,h=Math.abs(c.start.y-c.end.y)<Zi;if(l&&h){const d={x:a.start.x,y:c.start.y};am(a,d)&&am(c,d)&&(n[s]?.push(d),n[A]?.push(d))}if(u&&g){const d={x:c.start.x,y:a.start.y};am(a,d)&&am(c,d)&&(n[s]?.push(d),n[A]?.push(d))}}}for(let s=0;s<t.length;s++){const a=t[s];if(!a||Mj(a))continue;const A=[...new Map(n[s]?.map(c=>[Z5(c),c]))].map(([,c])=>c).sort((c,l)=>Math.abs(a.start.x-a.end.x)<Zi?c.y-l.y:c.x-l.x);for(let c=0;c+1<A.length;c++){const l=A[c],u=A[c+1];l&&u&&!Aw(l,u)&&o(l,u)}}let i=0;const r=new Set;for(const s of e.keys()){if(r.has(s))continue;i++;const a=[s];for(r.add(s);a.length>0;){const A=a.pop();if(A)for(const c of e.get(A)??[])r.has(c)||(r.add(c),a.push(c))}}return i},DBo=(t,e,n)=>{let o=t,i=!0;for(;i;){i=!1;const r=NPt(o);for(let s=0;s<o.length;s++){const a=o[s];if(a){for(const A of["start","end"]){const c=a[A];if(r.get(Z5(c))!==1)continue;const l=[],u=Math.abs(a.start.x-a.end.x)<Zi,g=Math.abs(a.start.y-a.end.y)<Zi;for(let d=0;d<o.length;d++){if(s===d)continue;const p=o[d];if(p){if(u&&Math.abs(p.start.y-p.end.y)<Zi){const m={x:a.start.x,y:p.start.y};am(p,m)&&l.push(m)}if(g&&Math.abs(p.start.x-p.end.x)<Zi){const m={x:p.start.x,y:a.start.y};am(p,m)&&l.push(m)}}}const h=l.filter(d=>!Aw(d,c)).map(d=>({point:d,line:d0e(a,A,d)})).filter(({line:d})=>aO([d])>aO([a])+Zi).filter(({line:d})=>!0).filter(({line:d})=>Dj([d],e)).sort((d,p)=>aO([d.line])-aO([p.line])||JSON.stringify(d.point).localeCompare(JSON.stringify(p.point))).at(0);if(h){o=o.map((d,p)=>p===s?h.line:d),i=!0;break}}if(i)break}}}return o},NBo=(t,e)=>{const n=[],o=Math.abs(t.start.x-t.end.x)<Zi,i=Math.abs(t.start.y-t.end.y)<Zi;for(const r of e){if(r===t)continue;const s=Math.abs(r.start.x-r.end.x)<Zi,a=Math.abs(r.start.y-r.end.y)<Zi;if(o&&a){const A={x:t.start.x,y:r.start.y};am(t,A)&&am(r,A)&&n.push(A)}if(i&&s){const A={x:r.start.x,y:t.start.y};am(t,A)&&am(r,A)&&n.push(A)}}return n},RBo=(t,e,n)=>{let o=t,i=!0;for(;i;){i=!1;const r=NPt(o),s=AO(o);for(let a=0;a<o.length;a++){const A=o[a];if(!A)continue;const c=NBo(A,o).filter(l=>!Aw(l,A.start)&&!Aw(l,A.end));if(c.length!==0){for(const l of["start","end"]){const u=A[l];if(r.get(Z5(u))!==1||vBo(u,e))continue;const g=c.map(m=>({point:m,distance:Math.abs(m.x-u.x)+Math.abs(m.y-u.y)})).sort((m,_)=>m.distance-_.distance).at(0);if(!g)continue;const h={start:u,end:g.point};if(MBo(h,e))continue;const d=d0e(A,l,g.point);if(!Dj([d],e))continue;const p=o.map((m,_)=>_===a?d:m);if(!(AO(p)>s)){o=p,i=!0;break}}if(i)break}}}return o},TBo=t=>{let{start:e,end:n}=t;return e.y===n.y&&e.x>n.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x&&e.y>n.y&&([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{start:e,end:n}},Qwe=t=>{if(!t||t.length===0)return[];const e=t.map(TBo),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x&&o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=>c.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x<=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A&&i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=>c.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y<=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A&&i.push(A)}return i},Nj=t=>{const e=[];for(let n=0;n+1<t.length;n++){const o=t[n],i=t[n+1];!o||!i||Aw(o,i)||e.push({start:o,end:i})}return e},kBo=(t,e)=>{const n=Nj(t),o=t.at(0),i=t.at(-1);if(!o||!i||n.length<2)return n;const r=[];Math.abs(o.x-i.x)<Zi||Math.abs(o.y-i.y)<Zi?r.push([{start:o,end:i}]):r.push(Nj([o,{x:o.x,y:i.y},i]),Nj([o,{x:i.x,y:o.y},i]));const s=[...new Set(t.map(c=>c.x))],a=[...new Set(t.map(c=>c.y))];for(const c of s)Math.abs(c-o.x)<Zi||Math.abs(c-i.x)<Zi||r.push(Nj([o,{x:c,y:o.y},{x:c,y:i.y},i]));for(const c of a)Math.abs(c-o.y)<Zi||Math.abs(c-i.y)<Zi||r.push(Nj([o,{x:o.x,y:c},{x:i.x,y:c},i]));return r.filter(c=>c.length<n.length).filter(c=>Dj(c,e)).sort((c,l)=>c.length-l.length||aO(c)-aO(l)||JSON.stringify(c).localeCompare(JSON.stringify(l))).at(0)??n},FBo=(t,e)=>{const n=new Map,o=new Map,i=a=>{const A=Z5(a);return n.set(A,a),o.has(A)||o.set(A,new Set),A};for(const a of t){if(Mj(a))continue;const A=i(a.start),c=i(a.end);o.get(A)?.add(c),o.get(c)?.add(A)}const r=new Set,s=[];for(const[a,A]of o)if(A.size!==2)for(const c of A){const l=g0e(n.get(a),n.get(c));if(r.has(l))continue;const u=[n.get(a)];let g=a,h=c;for(;;){r.add(g0e(n.get(g),n.get(h))),u.push(n.get(h));const d=o.get(h);if(!d||d.size!==2)break;const p=[...d].find(_=>_!==g);if(!p)break;const m=g0e(n.get(h),n.get(p));if(r.has(m))break;g=h,h=p}s.push(...kBo(u,e))}for(const[a,A]of o)for(const c of A){const l=g0e(n.get(a),n.get(c));r.has(l)||(r.add(l),s.push({start:n.get(a),end:n.get(c)}))}return s},LBo=(t,e)=>{let n=t,o=!0;for(;o;){o=!1;const i=AO(n),r=Qwe(n).length;for(let s=0;s<n.length;s++){const a=n[s];if(!a)continue;const A=Math.abs(a.start.x-a.end.x)<Zi,c=Math.abs(a.start.y-a.end.y)<Zi;if(!(!A&&!c)){for(let l=0;l<n.length;l++){if(s===l)continue;const u=n[l];if(!u)continue;const g=Math.abs(u.start.x-u.end.x)<Zi,h=Math.abs(u.start.y-u.end.y)<Zi;if(A!==g||c!==h||A&&Math.abs(a.start.x-u.start.x)<Zi||c&&Math.abs(a.start.y-u.start.y)<Zi||!n.some((f,I)=>I===s||I===l?!1:A&&Math.abs(f.start.y-f.end.y)<Zi?am(f,{x:a.start.x,y:f.start.y})&&am(a,{x:a.start.x,y:f.start.y})&&am(f,{x:u.start.x,y:f.start.y})&&am(u,{x:u.start.x,y:f.start.y}):c&&Math.abs(f.start.x-f.end.x)<Zi?am(f,{x:f.start.x,y:a.start.y})&&am(a,{x:f.start.x,y:a.start.y})&&am(f,{x:f.start.x,y:u.start.y})&&am(u,{x:f.start.x,y:u.start.y}):!1))continue;let p;if(A?p={start:{x:u.start.x,y:a.start.y},end:{x:u.start.x,y:a.end.y}}:p={start:{x:a.start.x,y:u.start.y},end:{x:a.end.x,y:u.start.y}},!Dj([p],e))continue;const m=n.map((f,I)=>I===s?p:f);if(AO(m)>i)continue;const _=Qwe(m);if(!(_.length>=r)){n=_,o=!0;break}}if(o)break}}}return n},HBo=(t,e)=>{let n=t,o=!0;for(;o;){o=!1;const i=AO(n);for(let r=0;r<n.length;r++){const s=n[r];if(!s)continue;const a=Math.abs(s.start.y-s.end.y)<Zi,A=Math.abs(s.start.x-s.end.x)<Zi;if(!(!a&&!A)){for(let c=0;c<n.length;c++){if(r===c)continue;const l=n[c];if(!l)continue;const u=Math.abs(l.start.y-l.end.y)<Zi,g=Math.abs(l.start.x-l.end.x)<Zi;if(a!==u||A!==g)continue;const h=[s.start,s.end];let d;if(a?d=h.map(f=>({x:f.x,y:l.start.y})):d=h.map(f=>({x:l.start.x,y:f.y})),!d.every(f=>am(l,f)))continue;const p=new Map;let m=!0;for(let f=0;f<h.length;f++){const I=h[f],C=d[f];if(!I||!C){m=!1;break}const y=n.findIndex((Q,w)=>{if(w===r||w===c)return!1;const M=Math.abs(Q.start.y-Q.end.y)<Zi,k=Math.abs(Q.start.x-Q.end.x)<Zi;return(a&&k||A&&M)&&am(Q,I)});if(y===-1)continue;const x=n[y];if(!x){m=!1;break}const E=Aw(x.start,I),B=Aw(x.end,I);if(!E&&!B&&am(x,C))continue;if(!E&&!B){m=!1;break}let S;if(E?S=d0e(x,"start",C):S=d0e(x,"end",C),!Dj([S],e)){m=!1;break}p.set(y,S)}if(!m)continue;const _=n.map((f,I)=>p.get(I)??f).filter((f,I)=>I!==r);if(!(AO(_)>i)){n=_,o=!0;break}}if(o)break}}}return n},RPt=(t=>(t[t.MergeAlignedSegments=0]="MergeAlignedSegments",t[t.SimplifyChains=1]="SimplifyChains",t[t.ConnectDanglingEndpoints=2]="ConnectDanglingEndpoints",t[t.AlignParallelLinesAcrossConnectors=3]="AlignParallelLinesAcrossConnectors",t[t.RemoveRedundantParallelBridges=4]="RemoveRedundantParallelBridges",t[t.TrimDanglingOverhangs=5]="TrimDanglingOverhangs",t))(RPt||{}),OBo=class extends z7{constructor(t){super(),this.params=t;const e=t.offsetX??0,n=t.offsetY??0;this._inputRects=t.cellContents.map(o=>({minX:o.x+e,minY:o.y+n,maxX:o.x+o.width+e,maxY:o.y+o.height+n}))}params;mergedOriginalLines=[];reducedLines=[];_stage=0;_currentLines=[];_inputRects;_step(){const{outlineLines:t}=this.params,e=this.params.offsetX??0,n=this.params.offsetY??0,o=this._inputRects;switch(this._stage){case 0:{const r=Qwe(t.map(s=>({start:{x:s.start.x+e,y:s.start.y+n},end:{x:s.end.x+e,y:s.end.y+n}})));this._currentLines=r,this.mergedOriginalLines=r.map(s=>({start:{x:s.start.x,y:s.start.y},end:{x:s.end.x,y:s.end.y}}));break}case 1:this._currentLines=FBo(this._currentLines,o);break;case 2:this._currentLines=DBo(this._currentLines,o);break;case 3:this._currentLines=LBo(this._currentLines,o);break;case 4:this._currentLines=HBo(this._currentLines,o);break;case 5:this._currentLines=RBo(this._currentLines,o),this.reducedLines=this._currentLines.map(r=>({start:{x:r.start.x-e,y:r.start.y-n},end:{x:r.end.x-e,y:r.end.y-n}})),this.mergedOriginalLines=this.mergedOriginalLines.map(r=>({start:{x:r.start.x-e,y:r.start.y-n},end:{x:r.end.x-e,y:r.end.y-n}})),this.solved=!0;break}const i=this.getNextStage(this._stage);i&&(this._stage=i)}getNextStage(t){const e=Object.values(RPt);return e[e.indexOf(t)+1]}getOutput(){return this.reducedLines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,outlineLines:e}=this.params;return{rects:t.map(n=>({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:"rgba(255, 165, 0, 0.2)",stroke:"#c87000"})),lines:[...e.map(n=>({points:[n.start,n.end],strokeColor:"rgba(180, 180, 180, 0.4)",strokeWidth:1,strokeDash:[4,4]})),...this._currentLines.map(n=>({points:[n.start,n.end],strokeColor:"#0055cc",strokeWidth:2}))]}}},vs=.001,TPt=(t,e,n=vs)=>Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n,vwe=t=>`${t.x.toFixed(4)},${t.y.toFixed(4)}`,h0e=t=>TPt(t.start,t.end),GBo=t=>Math.abs(t.start.x-t.end.x)<vs||Math.abs(t.start.y-t.end.y)<vs,cO=(t,e,n,o)=>Math.min(e,o)-Math.max(t,n)>vs,p0e=t=>t.reduce((e,n)=>e+Math.abs(n.start.x-n.end.x)+Math.abs(n.start.y-n.end.y),0),m0e=(t,e)=>Math.abs(t.start.x-t.end.x)<vs?Math.abs(e.x-t.start.x)<vs&&e.y>=Math.min(t.start.y,t.end.y)-vs&&e.y<=Math.max(t.start.y,t.end.y)+vs:Math.abs(t.start.y-t.end.y)<vs?Math.abs(e.y-t.start.y)<vs&&e.x>=Math.min(t.start.x,t.end.x)-vs&&e.x<=Math.max(t.start.x,t.end.x)+vs:!1,Rj=t=>({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),kPt=(t,e,n)=>t>Math.min(e,n)+vs&&t<Math.max(e,n)-vs,YBo=(t,e)=>{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)<vs){const s=Math.min(o,r),a=Math.max(o,r);return n>e.minX+vs&&n<e.maxX-vs&&a>e.minY-vs&&s<e.maxY+vs}if(Math.abs(o-r)<vs){const s=Math.min(n,i),a=Math.max(n,i);return o>e.minY+vs&&o<e.maxY-vs&&a>e.minX+vs&&s<e.maxX-vs}return!0},UBo=(t,e)=>{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)<vs){const s=Math.min(o,r),a=Math.max(o,r);return(Math.abs(n-e.minX)<vs||Math.abs(n-e.maxX)<vs)&&cO(s,a,e.minY,e.maxY)}if(Math.abs(o-r)<vs){const s=Math.min(n,i),a=Math.max(n,i);return(Math.abs(o-e.minY)<vs||Math.abs(o-e.maxY)<vs)&&cO(s,a,e.minX,e.maxX)}return!1},wwe=(t,e)=>t.length>0&&t.every(n=>!h0e(n)&&GBo(n)&&!e.some(o=>YBo(n,o)||UBo(n,o))),FPt=(t,e,n)=>{const o=Rj(e),i=Rj(n);if(Math.abs(t.start.x-t.end.x)<vs){const r=t.start.x,s=Math.min(t.start.y,t.end.y),a=Math.max(t.start.y,t.end.y);return kPt(r,o.x,i.x)&&cO(s,a,e.minY,e.maxY)&&cO(s,a,n.minY,n.maxY)}if(Math.abs(t.start.y-t.end.y)<vs){const r=t.start.y,s=Math.min(t.start.x,t.end.x),a=Math.max(t.start.x,t.end.x);return kPt(r,o.y,i.y)&&cO(s,a,e.minX,e.maxX)&&cO(s,a,n.minX,n.maxX)}return!1},_0e=(t,e)=>{const n=new Set;for(let o=0;o<e.length;o++){const i=e[o];if(i)for(let r=o+1;r<e.length;r++){const s=e[r];s&&t.some(a=>FPt(a,i,s))&&n.add(`${o}:${r}`)}}return n},KBo=(t,e,n)=>{const o=_0e(t,e);return[...n].every(i=>o.has(i))},LPt=(t,e)=>{const n=new Set,o=new Set;for(const i of e)n.add(i.minX),n.add(i.maxX),n.add(Rj(i).x),o.add(i.minY),o.add(i.maxY),o.add(Rj(i).y);for(const i of t)n.add(i.start.x),n.add(i.end.x),o.add(i.start.y),o.add(i.end.y);return{xs:[...n].sort((i,r)=>i-r),ys:[...o].sort((i,r)=>i-r)}},VBo=(t,e,n,o)=>t.some(i=>{if(Math.abs(i.start.x-i.end.x)>=vs||Math.abs(i.start.x-e)>=vs)return!1;const r=Math.min(i.start.y,i.end.y),s=Math.max(i.start.y,i.end.y);return n>=r-vs&&o<=s+vs}),zBo=(t,e,n,o)=>t.some(i=>{if(Math.abs(i.start.y-i.end.y)>=vs||Math.abs(i.start.y-e)>=vs)return!1;const r=Math.min(i.start.x,i.end.x),s=Math.max(i.start.x,i.end.x);return n>=r-vs&&o<=s+vs}),JBo=(t,e)=>{const{xs:n,ys:o}=LPt(t,e),i=n.length-1,r=o.length-1,s=new Map,a=(c,l)=>`${c}:${l}`;let A=0;for(let c=0;c<i;c++)for(let l=0;l<r;l++){const u=a(c,l);if(s.has(u))continue;const g=[{x:c,y:l}];for(s.set(u,A);g.length>0;){const h=g.pop();if(!h)continue;const d=[{x:h.x-1,y:h.y},{x:h.x+1,y:h.y},{x:h.x,y:h.y-1},{x:h.x,y:h.y+1}];for(const p of d){if(p.x<0||p.x>=i||p.y<0||p.y>=r)continue;const m=a(p.x,p.y);if(s.has(m))continue;let _=!1;if(p.x!==h.x){const f=n[Math.max(p.x,h.x)],I=o[h.y],C=o[h.y+1];if(f===void 0||I===void 0||C===void 0)continue;_=VBo(t,f,I,C)}else{const f=o[Math.max(p.y,h.y)],I=n[h.x],C=n[h.x+1];if(f===void 0||I===void 0||C===void 0)continue;_=zBo(t,f,I,C)}_||(s.set(m,A),g.push(p))}}A++}return e.map(c=>{const l=Rj(c),u=n.findIndex((h,d)=>d+1<n.length&&l.x>=h-vs&&l.x<=(n[d+1]??h)+vs),g=o.findIndex((h,d)=>d+1<o.length&&l.y>=h-vs&&l.y<=(o[d+1]??h)+vs);return s.get(a(u,g))??-1})},f0e=(t,e)=>{const n=JBo(t,e);let o=0;for(let i=0;i<n.length;i++)for(let r=i+1;r<n.length;r++)n[i]===n[r]&&o++;return o},HPt=t=>{const e=new Map,n=t.map(s=>[s.start,s.end]),o=(s,a)=>{const A=vwe(s),c=vwe(a);e.has(A)||e.set(A,new Set),e.has(c)||e.set(c,new Set),e.get(A)?.add(c),e.get(c)?.add(A)};for(let s=0;s<t.length;s++){const a=t[s];if(!(!a||h0e(a)))for(let A=s+1;A<t.length;A++){const c=t[A];if(!c||h0e(c))continue;const l=Math.abs(a.start.x-a.end.x)<vs,u=Math.abs(a.start.y-a.end.y)<vs,g=Math.abs(c.start.x-c.end.x)<vs,h=Math.abs(c.start.y-c.end.y)<vs;if(l&&h){const d={x:a.start.x,y:c.start.y};m0e(a,d)&&m0e(c,d)&&(n[s]?.push(d),n[A]?.push(d))}if(u&&g){const d={x:c.start.x,y:a.start.y};m0e(a,d)&&m0e(c,d)&&(n[s]?.push(d),n[A]?.push(d))}}}for(let s=0;s<t.length;s++){const a=t[s];if(!a||h0e(a))continue;const A=[...new Map(n[s]?.map(c=>[vwe(c),c]))].map(([,c])=>c).sort((c,l)=>Math.abs(a.start.x-a.end.x)<vs?c.y-l.y:c.x-l.x);for(let c=0;c+1<A.length;c++){const l=A[c],u=A[c+1];l&&u&&!TPt(l,u)&&o(l,u)}}let i=0;const r=new Set;for(const s of e.keys()){if(r.has(s))continue;i++;const a=[s];for(r.add(s);a.length>0;){const A=a.pop();if(A)for(const c of e.get(A)??[])r.has(c)||(r.add(c),a.push(c))}}return i},WBo=t=>{let{start:e,end:n}=t;return e.y===n.y&&e.x>n.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x&&e.y>n.y&&([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{start:e,end:n}},OPt=t=>{if(!t||t.length===0)return[];const e=t.map(WBo),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x&&o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=>c.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x<=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A&&i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=>c.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y<=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A&&i.push(A)}return i},jBo=(t,e,n,o)=>{let i=t;for(;;){const r=_0e(i,n),s=[...o].find(g=>!r.has(g));if(!s)break;const[a,A]=s.split(":"),c=n[Number(a)],l=n[Number(A)];if(!c||!l)break;const u=e.filter(g=>FPt(g,c,l)).sort((g,h)=>p0e([g])-p0e([h])||JSON.stringify(g).localeCompare(JSON.stringify(h))).at(0);if(!u)break;i=OPt([...i,u])}return i},$Bo=(t,e,n)=>{let o=t;for(;;){const i=f0e(o,n);if(i===0)break;const{xs:r,ys:s}=LPt(o,n),a=[];for(let c=0;c<o.length;c++){const l=o[c];if(l){if(Math.abs(l.start.y-l.end.y)<vs){const u=Math.min(l.start.x,l.end.x),g=Math.max(l.start.x,l.end.x);for(const h of r){if(h>=u-vs&&h<=g+vs)continue;const d={start:{x:Math.min(h,u),y:l.start.y},end:{x:Math.max(h,g),y:l.start.y}};wwe([d],n)&&a.push(o.map((p,m)=>m===c?d:p))}}if(Math.abs(l.start.x-l.end.x)<vs){const u=Math.min(l.start.y,l.end.y),g=Math.max(l.start.y,l.end.y);for(const h of s){if(h>=u-vs&&h<=g+vs)continue;const d={start:{x:l.start.x,y:Math.min(h,u)},end:{x:l.start.x,y:Math.max(h,g)}};wwe([d],n)&&a.push(o.map((p,m)=>m===c?d:p))}}}}for(const c of e)a.push([...o,c]);const A=a.map(c=>({lines:OPt(c),shared:f0e(c,n)})).filter(c=>c.shared<i).sort((c,l)=>c.shared-l.shared||c.lines.length-l.lines.length||p0e(c.lines)-p0e(l.lines)).at(0);if(!A)break;o=A.lines}return o},qBo=(t,e)=>{let n=t,o=!0;for(;o;){o=!1;const i=_0e(n,e),r=f0e(n,e),s=HPt(n);for(let a=0;a<n.length;a++){const A=n.filter((c,l)=>l!==a);if(wwe(A,e)&&KBo(A,e,i)&&!(f0e(A,e)>r)&&!(HPt(A)>s)){n=A,o=!0;break}}}return n},GPt=(t=>(t[t.RestoreMissingSeparators=0]="RestoreMissingSeparators",t[t.FixSharedCellRegions=1]="FixSharedCellRegions",t[t.RemoveRedundantSeparators=2]="RemoveRedundantSeparators",t))(GPt||{}),XBo=class extends z7{constructor(t){super(),this.params=t,this._inputRects=t.cellContents.map(e=>({minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height})),this._currentLines=t.reducedLines}params;repairedLines=[];_stage=0;_currentLines=[];_inputRects;_step(){const{originalLines:t}=this.params,e=this._inputRects;switch(this._stage){case 0:{const o=_0e(t,e);this._currentLines=jBo(this._currentLines,t,e,o);break}case 1:this._currentLines=$Bo(this._currentLines,t,e);break;case 2:this._currentLines=qBo(this._currentLines,e),this.repairedLines=this._currentLines,this.solved=!0;break}const n=this.getNextStage(this._stage);n&&(this._stage=n)}getNextStage(t){const e=Object.values(GPt);return e[e.indexOf(t)+1]}getOutput(){return this.repairedLines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,reducedLines:e}=this.params;return{rects:t.map(n=>({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:"rgba(255, 165, 0, 0.2)",stroke:"#c87000"})),lines:[...e.map(n=>({points:[n.start,n.end],strokeColor:"rgba(180, 180, 180, 0.4)",strokeWidth:1,strokeDash:[4,4]})),...this._currentLines.map(n=>({points:[n.start,n.end],strokeColor:"#cc5500",strokeWidth:2}))]}}},ri=.001,JN=(t,e,n=ri)=>Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n,bb=t=>`${t.x.toFixed(4)},${t.y.toFixed(4)}`,Tj=t=>JN(t.start,t.end),ZBo=t=>Math.abs(t.start.x-t.end.x)<ri||Math.abs(t.start.y-t.end.y)<ri,lO=(t,e,n,o)=>Math.min(e,o)-Math.max(t,n)>ri,I0e=t=>t.reduce((e,n)=>e+Math.abs(n.start.x-n.end.x)+Math.abs(n.start.y-n.end.y),0),$u=(t,e)=>Math.abs(t.start.x-t.end.x)<ri?Math.abs(e.x-t.start.x)<ri&&e.y>=Math.min(t.start.y,t.end.y)-ri&&e.y<=Math.max(t.start.y,t.end.y)+ri:Math.abs(t.start.y-t.end.y)<ri?Math.abs(e.y-t.start.y)<ri&&e.x>=Math.min(t.start.x,t.end.x)-ri&&e.x<=Math.max(t.start.x,t.end.x)+ri:!1,C0e=(t,e,n)=>e==="start"?{start:n,end:t.end}:{start:t.start,end:n},y0e=(t,e)=>e==="start"?t.end:t.start,kj=t=>({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),YPt=(t,e,n)=>t>Math.min(e,n)+ri&&t<Math.max(e,n)-ri,UPt=t=>{const e=new Map;for(const n of t)e.set(bb(n.start),(e.get(bb(n.start))??0)+1),e.set(bb(n.end),(e.get(bb(n.end))??0)+1);return e},e9o=(t,e)=>e.some(n=>{const o=(Math.abs(t.x-n.minX)<ri||Math.abs(t.x-n.maxX)<ri)&&t.y>=n.minY-ri&&t.y<=n.maxY+ri,i=(Math.abs(t.y-n.minY)<ri||Math.abs(t.y-n.maxY)<ri)&&t.x>=n.minX-ri&&t.x<=n.maxX+ri;return o||i}),Pwe=(t,e)=>{if(!(Math.abs(t.start.x-t.end.x)>=ri)){if(Math.abs(t.start.y-e)<ri)return"start";if(Math.abs(t.end.y-e)<ri)return"end"}},KPt=(t,e)=>{if(!(Math.abs(t.start.y-t.end.y)>=ri)){if(Math.abs(t.start.x-e)<ri)return"start";if(Math.abs(t.end.x-e)<ri)return"end"}},t9o=(t,e)=>{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)<ri){const s=Math.min(o,r),a=Math.max(o,r);return n>e.minX+ri&&n<e.maxX-ri&&a>e.minY-ri&&s<e.maxY+ri}if(Math.abs(o-r)<ri){const s=Math.min(n,i),a=Math.max(n,i);return o>e.minY+ri&&o<e.maxY-ri&&a>e.minX+ri&&s<e.maxX-ri}return!0},n9o=(t,e)=>{const n=t.start.x,o=t.start.y,i=t.end.x,r=t.end.y;if(Math.abs(n-i)<ri){const s=Math.min(o,r),a=Math.max(o,r);return(Math.abs(n-e.minX)<ri||Math.abs(n-e.maxX)<ri)&&lO(s,a,e.minY,e.maxY)}if(Math.abs(o-r)<ri){const s=Math.min(n,i),a=Math.max(n,i);return(Math.abs(o-e.minY)<ri||Math.abs(o-e.maxY)<ri)&&lO(s,a,e.minX,e.maxX)}return!1},vx=(t,e)=>t.length>0&&t.every(n=>!Tj(n)&&ZBo(n)&&!e.some(o=>t9o(n,o)||n9o(n,o))),o9o=(t,e,n)=>{const o=kj(e),i=kj(n);if(Math.abs(t.start.x-t.end.x)<ri){const r=t.start.x,s=Math.min(t.start.y,t.end.y),a=Math.max(t.start.y,t.end.y);return YPt(r,o.x,i.x)&&lO(s,a,e.minY,e.maxY)&&lO(s,a,n.minY,n.maxY)}if(Math.abs(t.start.y-t.end.y)<ri){const r=t.start.y,s=Math.min(t.start.x,t.end.x),a=Math.max(t.start.x,t.end.x);return YPt(r,o.y,i.y)&&lO(s,a,e.minX,e.maxX)&&lO(s,a,n.minX,n.maxX)}return!1},Sb=(t,e)=>{const n=new Set;for(let o=0;o<e.length;o++){const i=e[o];if(i)for(let r=o+1;r<e.length;r++){const s=e[r];s&&t.some(a=>o9o(a,i,s))&&n.add(`${o}:${r}`)}}return n},Fj=(t,e,n)=>{const o=Sb(t,e);return[...n].every(i=>o.has(i))},i9o=(t,e)=>{const n=new Set,o=new Set;for(const i of e)n.add(i.minX),n.add(i.maxX),n.add(kj(i).x),o.add(i.minY),o.add(i.maxY),o.add(kj(i).y);for(const i of t)n.add(i.start.x),n.add(i.end.x),o.add(i.start.y),o.add(i.end.y);return{xs:[...n].sort((i,r)=>i-r),ys:[...o].sort((i,r)=>i-r)}},r9o=(t,e,n,o)=>t.some(i=>{if(Math.abs(i.start.x-i.end.x)>=ri||Math.abs(i.start.x-e)>=ri)return!1;const r=Math.min(i.start.y,i.end.y),s=Math.max(i.start.y,i.end.y);return n>=r-ri&&o<=s+ri}),s9o=(t,e,n,o)=>t.some(i=>{if(Math.abs(i.start.y-i.end.y)>=ri||Math.abs(i.start.y-e)>=ri)return!1;const r=Math.min(i.start.x,i.end.x),s=Math.max(i.start.x,i.end.x);return n>=r-ri&&o<=s+ri}),a9o=(t,e)=>{const{xs:n,ys:o}=i9o(t,e),i=n.length-1,r=o.length-1,s=new Map,a=(c,l)=>`${c}:${l}`;let A=0;for(let c=0;c<i;c++)for(let l=0;l<r;l++){const u=a(c,l);if(s.has(u))continue;const g=[{x:c,y:l}];for(s.set(u,A);g.length>0;){const h=g.pop();if(!h)continue;const d=[{x:h.x-1,y:h.y},{x:h.x+1,y:h.y},{x:h.x,y:h.y-1},{x:h.x,y:h.y+1}];for(const p of d){if(p.x<0||p.x>=i||p.y<0||p.y>=r)continue;const m=a(p.x,p.y);if(s.has(m))continue;let _=!1;if(p.x!==h.x){const f=n[Math.max(p.x,h.x)],I=o[h.y],C=o[h.y+1];if(f===void 0||I===void 0||C===void 0)continue;_=r9o(t,f,I,C)}else{const f=o[Math.max(p.y,h.y)],I=n[h.x],C=n[h.x+1];if(f===void 0||I===void 0||C===void 0)continue;_=s9o(t,f,I,C)}_||(s.set(m,A),g.push(p))}}A++}return e.map(c=>{const l=kj(c),u=n.findIndex((h,d)=>d+1<n.length&&l.x>=h-ri&&l.x<=(n[d+1]??h)+ri),g=o.findIndex((h,d)=>d+1<o.length&&l.y>=h-ri&&l.y<=(o[d+1]??h)+ri);return s.get(a(u,g))??-1})},J7=(t,e)=>{const n=a9o(t,e);let o=0;for(let i=0;i<n.length;i++)for(let r=i+1;r<n.length;r++)n[i]===n[r]&&o++;return o},xB=t=>{const e=new Map,n=t.map(s=>[s.start,s.end]),o=(s,a)=>{const A=bb(s),c=bb(a);e.has(A)||e.set(A,new Set),e.has(c)||e.set(c,new Set),e.get(A)?.add(c),e.get(c)?.add(A)};for(let s=0;s<t.length;s++){const a=t[s];if(!(!a||Tj(a)))for(let A=s+1;A<t.length;A++){const c=t[A];if(!c||Tj(c))continue;const l=Math.abs(a.start.x-a.end.x)<ri,u=Math.abs(a.start.y-a.end.y)<ri,g=Math.abs(c.start.x-c.end.x)<ri,h=Math.abs(c.start.y-c.end.y)<ri;if(l&&h){const d={x:a.start.x,y:c.start.y};$u(a,d)&&$u(c,d)&&(n[s]?.push(d),n[A]?.push(d))}if(u&&g){const d={x:c.start.x,y:a.start.y};$u(a,d)&&$u(c,d)&&(n[s]?.push(d),n[A]?.push(d))}}}for(let s=0;s<t.length;s++){const a=t[s];if(!a||Tj(a))continue;const A=[...new Map(n[s]?.map(c=>[bb(c),c]))].map(([,c])=>c).sort((c,l)=>Math.abs(a.start.x-a.end.x)<ri?c.y-l.y:c.x-l.x);for(let c=0;c+1<A.length;c++){const l=A[c],u=A[c+1];l&&u&&!JN(l,u)&&o(l,u)}}let i=0;const r=new Set;for(const s of e.keys()){if(r.has(s))continue;i++;const a=[s];for(r.add(s);a.length>0;){const A=a.pop();if(A)for(const c of e.get(A)??[])r.has(c)||(r.add(c),a.push(c))}}return i},Mwe=(t,e,n)=>{let o=t,i=!0;for(;i;){i=!1;const r=UPt(o);for(let s=0;s<o.length;s++){const a=o[s];if(a){for(const A of["start","end"]){const c=a[A];if(r.get(bb(c))!==1)continue;const l=[],u=Math.abs(a.start.x-a.end.x)<ri,g=Math.abs(a.start.y-a.end.y)<ri;for(let d=0;d<o.length;d++){if(s===d)continue;const p=o[d];if(p){if(u&&Math.abs(p.start.y-p.end.y)<ri){const m={x:a.start.x,y:p.start.y};$u(p,m)&&l.push(m)}if(g&&Math.abs(p.start.x-p.end.x)<ri){const m={x:p.start.x,y:a.start.y};$u(p,m)&&l.push(m)}}}const h=l.filter(d=>!JN(d,c)).map(d=>({point:d,line:C0e(a,A,d)})).filter(({line:d})=>I0e([d])>I0e([a])+ri).filter(({line:d})=>!n?.preserveOriginalSpan||$u(d,c)).filter(({line:d})=>vx([d],e)).sort((d,p)=>I0e([d.line])-I0e([p.line])||JSON.stringify(d.point).localeCompare(JSON.stringify(p.point))).at(0);if(h){o=o.map((d,p)=>p===s?h.line:d),i=!0;break}}if(i)break}}}return o},A9o=(t,e)=>{const n=[],o=Math.abs(t.start.x-t.end.x)<ri,i=Math.abs(t.start.y-t.end.y)<ri;for(const r of e){if(r===t)continue;const s=Math.abs(r.start.x-r.end.x)<ri,a=Math.abs(r.start.y-r.end.y)<ri;if(o&&a){const A={x:t.start.x,y:r.start.y};$u(t,A)&&$u(r,A)&&n.push(A)}if(i&&s){const A={x:r.start.x,y:t.start.y};$u(t,A)&&$u(r,A)&&n.push(A)}}return n},VPt=(t,e,n)=>{let o=t,i=!0;for(;i;){i=!1;const r=UPt(o),s=xB(o);for(let a=0;a<o.length;a++){const A=o[a];if(!A)continue;const c=A9o(A,o).filter(l=>!JN(l,A.start)&&!JN(l,A.end));if(c.length!==0){for(const l of["start","end"]){const u=A[l];if(r.get(bb(u))!==1||e9o(u,e))continue;const g=c.map(p=>({point:p,distance:Math.abs(p.x-u.x)+Math.abs(p.y-u.y)})).sort((p,m)=>p.distance-m.distance).at(0);if(!g)continue;const h=C0e(A,l,g.point);if(!vx([h],e))continue;const d=o.map((p,m)=>m===a?h:p);if(!(xB(d)>s)&&!(n&&!Fj(d,e,n))){o=d,i=!0;break}}if(i)break}}}return o},c9o=t=>{let{start:e,end:n}=t;return e.y===n.y&&e.x>n.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x&&e.y>n.y&&([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{start:e,end:n}},Lj=t=>{if(!t||t.length===0)return[];const e=t.map(c9o),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x&&o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=>c.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x<=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A&&i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=>c.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y<=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A&&i.push(A)}return i},l9o=(t,e)=>{let n=t,o=!0;const i=r=>{const s=Sb(n,e),a=Sb(r,e);return[...s].every(A=>a.has(A))};for(;o;){o=!1;const r=J7(n,e);for(let a=0;a<n.length;a++){const A=n[a];if(!A||Math.abs(A.start.y-A.end.y)>=ri)continue;const c=A.start.y;for(let l=0;l<n.length;l++){if(l===a)continue;const u=n[l];if(!u)continue;const g=Pwe(u,c);if(g&&$u(A,{x:u.start.x,y:c})){for(let h=l+1;h<n.length;h++){if(h===a)continue;const d=n[h];if(!d)continue;const p=Pwe(d,c);if(!p||!$u(A,{x:d.start.x,y:c}))continue;const m=y0e(u,g),_=y0e(d,p);if((m.y-c)*(_.y-c)>=-ri)continue;const f=(u.start.x+d.start.x)/2,I={start:{x:f,y:Math.min(m.y,_.y)},end:{x:f,y:Math.max(m.y,_.y)}};if(!vx([I],e))continue;const C=n.filter((y,x)=>x!==l&&x!==h).concat(I);if(vx(C,e)&&i(C)&&!(J7(C,e)>r)){n=Lj(C),o=!0;break}}if(o)break}}if(o)break}if(o)continue;const s=xB(n);for(let a=0;a<n.length;a++){const A=n[a];if(!(!A||Math.abs(A.start.x-A.end.x)>=ri)){for(let c=a+1;c<n.length;c++){const l=n[c];if(!l||Math.abs(l.start.x-l.end.x)>=ri||Math.abs(A.start.x-l.start.x)<ri)continue;const u=Math.max(Math.min(A.start.y,A.end.y),Math.min(l.start.y,l.end.y)),g=Math.min(Math.max(A.start.y,A.end.y),Math.max(l.start.y,l.end.y));if(g-u<-ri||!n.some((_,f)=>{if(f===a||f===c||Math.abs(_.start.y-_.end.y)>=ri)return!1;const I=_.start.y;return I<u-ri||I>g+ri?!1:$u(_,{x:A.start.x,y:I})&&$u(_,{x:l.start.x,y:I})}))continue;const d=Math.min(A.start.y,A.end.y,l.start.y,l.end.y),p=Math.max(A.start.y,A.end.y,l.start.y,l.end.y),m=[A.start.x,l.start.x].map(_=>({start:{x:_,y:d},end:{x:_,y:p}})).filter(_=>vx([_],e));for(const _ of m){let f=n.filter((I,C)=>C!==a&&C!==c).concat(_);if(vx(f,e)&&i(f)&&!(xB(f)>s)&&!(J7(f,e)>r)){for(let I=0;I<f.length;){const C=f[I];if(!C||Math.abs(C.start.y-C.end.y)>=ri||C.start.y<u-ri||C.start.y>g+ri||!$u(C,{x:A.start.x,y:C.start.y})||!$u(C,{x:l.start.x,y:C.start.y})){I++;continue}const y=f.filter((x,E)=>E!==I);if(vx(y,e)&&i(y)&&xB(y)<=s&&J7(y,e)<=r){f=y;continue}I++}n=Lj(f),o=!0;break}}if(o)break}if(o)break}}}return n},zPt=(t,e)=>{let n=t,o=!0;for(;o;){o=!1;const i=J7(n,e),r=Sb(n,e);for(let s=0;s<n.length;s++){const a=n[s];if(!a||Math.abs(a.start.x-a.end.x)>=ri)continue;const A=a.start.x;for(let c=0;c<n.length;c++){if(c===s)continue;const l=n[c];if(l&&KPt(l,A)&&$u(a,{x:A,y:l.start.y})){for(let u=c+1;u<n.length;u++){if(u===s)continue;const g=n[u];if(g&&$u(g,{x:A,y:g.start.y})&&$u(a,{x:A,y:g.start.y})&&!(Math.abs(l.start.y-g.start.y)<ri)){for(const[h,d]of[[l,g],[g,l]]){const p=Pwe(a,h.start.y);if(!p)continue;const m=KPt(h,A);if(!m)continue;const _=y0e(h,m),f=Math.min(d.start.x,d.end.x),I=Math.max(d.start.x,d.end.x);if(_.x<A-ri&&I<=A+ri||_.x>A+ri&&f>=A-ri)continue;const C=y0e(a,p);for(const y of[h.start.y,d.start.y]){const x={start:{x:Math.min(_.x,f),y},end:{x:Math.max(_.x,I),y}};if(!vx([x],e))continue;const E={start:C,end:{x:A,y}};if(Tj(E)||!vx([E],e))continue;let B=n.filter((S,Q)=>Q!==c&&Q!==u&&Q!==s).concat(x,E);if(B=Mwe(B,e,{preserveOriginalSpan:!0}),!!vx(B,e)&&Fj(B,e,r)&&!(J7(B,e)>i)){n=Lj(B),o=!0;break}}if(o)break}if(o)break}}if(o)break}}if(o)break}}return n},JPt=t=>Math.abs(t.start.y-t.end.y)<ri,WPt=t=>Math.abs(t.start.x-t.end.x)<ri,jPt=(t,e)=>{const n=Sb(t,e),o=J7(t,e),i=xB(t);for(let r=0;r<t.length;r++){const s=t[r];if(!(!s||!JPt(s)))for(let a=r+1;a<t.length;a++){const A=t[a];if(!A||!JPt(A))continue;const c=Math.min(s.start.y,A.start.y),l=Math.max(s.start.y,A.start.y);if(l-c<ri)continue;const u=Math.min(s.start.x,s.end.x),g=Math.max(s.start.x,s.end.x),h=Math.min(A.start.x,A.end.x),d=Math.max(A.start.x,A.end.x),p=Math.max(u,h),m=Math.min(g,d);if(m-p<ri||!t.some(x=>{if(!WPt(x))return!1;const E=x.start.x;return E>=p-ri&&E<=m+ri&&$u(x,{x:E,y:c})&&$u(x,{x:E,y:l})}))continue;const f=Math.min(u,h),I=Math.max(g,d),C=new Set([c,l]);for(const x of e)x.maxX<=f+ri||x.minX>=I-ri||(x.minY>c&&x.minY<l&&C.add(x.minY),x.maxY>c&&x.maxY<l&&C.add(x.maxY));const y=[...C].sort((x,E)=>x-E);for(let x=1;x<y.length;x++){const E=y[x-1],B=y[x];if(E===void 0||B===void 0)continue;const S=(E+B)/2,Q={start:{x:f,y:S},end:{x:I,y:S}};if(!vx([Q],e))continue;const w=[];for(let M=0;M<t.length;M++){if(M===r||M===a)continue;const k=t[M];if(!k)continue;if(!WPt(k)||k.start.x<f||k.start.x>I){w.push(k);continue}const R=k.start.x;if(!($u(k,{x:R,y:c})||$u(k,{x:R,y:l}))){w.push(k);continue}const O=k.start.y>=c&&k.start.y<=l,U=k.end.y>=c&&k.end.y<=l;O&&U||(O?w.push({start:{x:R,y:S},end:k.end}):U?w.push({start:k.start,end:{x:R,y:S}}):w.push(k))}if(w.push(Q),!!vx(w,e)&&Fj(w,e,n)&&!(J7(w,e)>o)&&!(xB(w)>i))return jPt(Lj(w),e)}}}return t},u9o=(t,e)=>{let n=t,o=!0;for(;o;){o=!1;const i=xB(n),r=Sb(n,e);for(let s=0;s<n.length;s++){const a=n[s];if(!a)continue;const A=Math.abs(a.start.y-a.end.y)<ri,c=Math.abs(a.start.x-a.end.x)<ri;if(!(!A&&!c)){for(let l=0;l<n.length;l++){if(s===l)continue;const u=n[l];if(!u)continue;const g=Math.abs(u.start.y-u.end.y)<ri,h=Math.abs(u.start.x-u.end.x)<ri;if(A!==g||c!==h)continue;const d=[a.start,a.end];let p;if(A?p=d.map(I=>({x:I.x,y:u.start.y})):p=d.map(I=>({x:u.start.x,y:I.y})),!p.every(I=>$u(u,I)))continue;const m=new Map;let _=!0;for(let I=0;I<d.length;I++){const C=d[I],y=p[I];if(!C||!y){_=!1;break}const x=n.findIndex((w,M)=>{if(M===s||M===l)return!1;const k=Math.abs(w.start.y-w.end.y)<ri,R=Math.abs(w.start.x-w.end.x)<ri;return(A&&R||c&&k)&&$u(w,C)});if(x===-1)continue;const E=n[x];if(!E){_=!1;break}const B=JN(E.start,C),S=JN(E.end,C);if(!B&&!S&&$u(E,y))continue;if(!B&&!S){_=!1;break}let Q;if(B?Q=C0e(E,"start",y):Q=C0e(E,"end",y),!vx([Q],e)){_=!1;break}m.set(x,Q)}if(!_)continue;const f=n.map((I,C)=>m.get(C)??I).filter((I,C)=>C!==s);if(!(xB(f)>i)&&Fj(f,e,r)){n=f,o=!0;break}}if(o)break}}}return n},g9o=(t,e)=>{let n=t,o=!0;for(;o;){o=!1;const i=Sb(n,e),r=J7(n,e),s=xB(n);for(let a=0;a<n.length;a++){const A=n.filter((c,l)=>l!==a);if(vx(A,e)&&Fj(A,e,i)&&!(J7(A,e)>r)&&!(xB(A)>s)){n=A,o=!0;break}}}return n},$Pt=(t=>(t[t.ConnectDanglingEndpoints=0]="ConnectDanglingEndpoints",t[t.CollapseVerticalDoglegs=1]="CollapseVerticalDoglegs",t[t.CollapseHorizontalSteps=2]="CollapseHorizontalSteps",t[t.RemoveRedundantParallelBridges=3]="RemoveRedundantParallelBridges",t[t.ReconnectDanglingEndpoints=4]="ReconnectDanglingEndpoints",t[t.TrimDanglingOverhangs=5]="TrimDanglingOverhangs",t[t.RemoveRedundantSeparators=6]="RemoveRedundantSeparators",t[t.MergeAlignedSegments=7]="MergeAlignedSegments",t))($Pt||{}),d9o=class extends z7{constructor(t){super(),this.params=t,this._inputRects=t.cellContents.map(e=>({minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height})),this._currentLines=t.repairedLines}params;refinedLines=[];_stage=0;_currentLines=[];_inputRects;_step(){const t=this._inputRects;switch(this._stage){case 0:this._currentLines=Mwe(this._currentLines,t,{preserveOriginalSpan:!0});break;case 1:this._currentLines=l9o(this._currentLines,t);break;case 2:this._currentLines=zPt(this._currentLines,t);break;case 3:this._currentLines=u9o(this._currentLines,t);break;case 4:this._currentLines=Mwe(this._currentLines,t,{preserveOriginalSpan:!0});break;case 5:this._currentLines=VPt(this._currentLines,t,Sb(this._currentLines,t));break;case 6:this._currentLines=g9o(this._currentLines,t);break;case 7:this._currentLines=Lj(this._currentLines),this._currentLines=zPt(this._currentLines,t),this._currentLines=jPt(this._currentLines,t),this._currentLines=VPt(this._currentLines,t,Sb(this._currentLines,t)),this.refinedLines=this._currentLines,this.solved=!0;break}const e=this.getNextStage(this._stage);e&&(this._stage=e)}getNextStage(t){const e=Object.values($Pt);return e[e.indexOf(t)+1]}getOutput(){return this.refinedLines}getConstructorParams(){return[this.params]}visualize(){const{cellContents:t,repairedLines:e}=this.params;return{rects:t.map(n=>({center:{x:n.x+n.width/2,y:n.y+n.height/2},width:n.width,height:n.height,fill:"rgba(255, 165, 0, 0.2)",stroke:"#c87000"})),lines:[...e.map(n=>({points:[n.start,n.end],strokeColor:"rgba(180, 180, 180, 0.4)",strokeWidth:1,strokeDash:[4,4]})),...this._currentLines.map(n=>({points:[n.start,n.end],strokeColor:"#000000",strokeWidth:3}))]}}},h9o=class extends ABo{computeMidlinesSolver;computeIntersectionsSolver;computeSegmentsSolver;buildGridSolver;mergeGridSolver;buildOutlineSolver;reduceBoundaryLinesSolver;repairBoundaryLinesSolver;refineBoundaryLinesSolver;pipelineDef=[Bb("computeMidlinesSolver",cBo,t=>[{cellContents:t.inputProblem.cellContents,containerWidth:t.inputProblem.containerWidth,containerHeight:t.inputProblem.containerHeight}]),Bb("computeIntersectionsSolver",uBo,t=>[{midlines:t.getSolver("computeMidlinesSolver").midlines}]),Bb("computeSegmentsSolver",mBo,t=>[{midlines:t.getSolver("computeMidlinesSolver").midlines,intersections:t.getSolver("computeIntersectionsSolver").intersections,cellContents:t.inputProblem.cellContents}]),Bb("buildGridSolver",CBo,t=>[{allSegments:t.getSolver("computeSegmentsSolver").allSegments,cellContents:t.inputProblem.cellContents,containerWidth:t.inputProblem.containerWidth,containerHeight:t.inputProblem.containerHeight}]),Bb("mergeGridSolver",BBo,t=>[{validSegments:t.getSolver("buildGridSolver").validSegments,gridRects:t.getSolver("buildGridSolver").gridRects,cellContainingRects:t.getSolver("buildGridSolver").cellContainingRects,cellContents:t.inputProblem.cellContents}]),Bb("buildOutlineSolver",SBo,t=>[{groupedRects:t.getSolver("mergeGridSolver").groupedRects}]),Bb("reduceBoundaryLinesSolver",OBo,t=>[{outlineLines:t.getSolver("buildOutlineSolver").outlineLines,cellContents:t.inputProblem.cellContents,offsetX:t.inputProblem.offsetX,offsetY:t.inputProblem.offsetY}]),Bb("repairBoundaryLinesSolver",XBo,t=>[{reducedLines:t.getSolver("reduceBoundaryLinesSolver").reducedLines,originalLines:t.getSolver("reduceBoundaryLinesSolver").mergedOriginalLines,cellContents:t.inputProblem.cellContents}]),Bb("refineBoundaryLinesSolver",d9o,t=>[{repairedLines:t.getSolver("repairBoundaryLinesSolver").repairedLines,cellContents:t.inputProblem.cellContents}])];finalVisualize(){const t=this.getSolver("refineBoundaryLinesSolver"),e=this.getSolver("buildOutlineSolver"),n=t?.refinedLines??e?.outlineLines;return n?{rects:this.inputProblem.cellContents.map(o=>({center:{x:o.x+o.width/2,y:o.y+o.height/2},width:o.width,height:o.height,fill:"rgba(255, 165, 0, 0.3)",stroke:"#c87000",label:o.cellId})),lines:n.map(o=>({points:[o.start,o.end],strokeColor:"#000000",strokeWidth:3}))}:null}initialVisualize(){return{rects:this.inputProblem.cellContents.map(t=>({center:{x:t.x+t.width/2,y:t.y+t.height/2},width:t.width,height:t.height,fill:"rgba(255, 165, 0, 0.3)",stroke:"#c87000",label:t.cellId}))}}getConstructorParams(){return[this.inputProblem]}getOutput(){return{midlines:this.getSolver("computeMidlinesSolver")?.midlines??[],allSegments:this.getSolver("computeSegmentsSolver")?.allSegments??[],validSegments:this.getSolver("buildGridSolver")?.validSegments??[],mergedRectGroups:this.getSolver("mergeGridSolver")?.mergedRectGroups??[],cellRects:this.inputProblem.cellContents,gridRects:this.getSolver("buildGridSolver")?.gridRects??[],outlineLines:this.getSolver("refineBoundaryLinesSolver")?.refinedLines??this.getSolver("buildOutlineSolver")?.outlineLines??[]}}},p9o=(t,e,n)=>({...t,start:{x:t.start.x+e,y:t.start.y+n},end:{x:t.end.x+e,y:t.end.y+n}}),Dwe=t=>{let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t)e=Math.min(e,r.minX),n=Math.min(n,r.minY),o=Math.max(o,r.maxX),i=Math.max(i,r.maxY);return{minX:e,minY:n,maxX:o,maxY:i}},m9o=t=>{let{start:e,end:n}=t;return e.y===n.y&&e.x>n.x?[e,n]=[{x:n.x,y:e.y},{x:e.x,y:n.y}]:e.x===n.x&&e.y>n.y&&([e,n]=[{x:e.x,y:n.y},{x:n.x,y:e.y}]),{...t,start:e,end:n}},_9o=t=>{if(!t||t.length===0)return[];const e=t.map(m9o),n=[],o=[];for(const a of e)a.start.y===a.end.y?n.push(a):a.start.x===a.end.x&&o.push(a);const i=[],r=new Map;for(const a of n){const A=r.get(a.start.y)??[];A.push(a),r.set(a.start.y,A)}for(const[,a]of r){a.sort((c,l)=>c.start.x-l.start.x);let A;for(const c of a){if(!A){A={...c};continue}c.start.x<=A.end.x?A.end.x=Math.max(A.end.x,c.end.x):(i.push(A),A={...c})}A&&i.push(A)}const s=new Map;for(const a of o){const A=s.get(a.start.x)??[];A.push(a),s.set(a.start.x,A)}for(const[,a]of s){a.sort((c,l)=>c.start.y-l.start.y);let A;for(const c of a){if(!A){A={...c};continue}c.start.y<=A.end.y?A.end.y=Math.max(A.end.y,c.end.y):(i.push(A),A={...c})}A&&i.push(A)}return i},x0e=(t,e)=>t.x!==e.x?t.x-e.x:t.y-e.y,f9o=(t,e,n)=>{const o=t.map((h,d)=>({...h,cellId:`cell-${d}`})),i=Dwe(o.map(h=>({minX:h.x,minY:h.y,maxX:h.x+h.width,maxY:h.y+h.height}))),r=i.minX,s=i.minY;e??=i.maxX-i.minX,n??=i.maxY-i.minY;const a=o.map(h=>({...h,x:h.x-r,y:h.y-s})),A=new h9o({cellContents:a,containerWidth:e,containerHeight:n,offsetX:r,offsetY:s});A.solve();const c=A.getOutput(),l=h=>p9o(h,r,s),u=c.outlineLines.map(l);return _9o(u).map(h=>({start:x0e(h.start,h.end)<0?h.start:h.end,end:x0e(h.start,h.end)<0?h.end:h.start})).sort((h,d)=>x0e(h.start,d.start)||x0e(h.end,d.end))};function I9o(t,e){if(!Number.isFinite(e)||e<0)throw new Error("cellMargin must be finite and nonnegative");if(e===0||t.length<2)return t;const n=t.map(r=>({...r,minX:r.minX-e,maxX:r.maxX+e,minY:r.minY-e,maxY:r.maxY+e})),o=[n[0]],i=n.slice(1);for(;i.length>0;){const r=i.findIndex(s=>o.some(a=>a.minX<=s.maxX&&a.maxX>=s.minX&&a.minY<=s.maxY&&a.maxY>=s.minY));if(r<0)return n;o.push(...i.splice(r,1))}return t}var C9o=(t,e={})=>f9o(I9o(t,e.cellMargin??0).map(n=>({x:n.minX,y:n.minY,width:n.maxX-n.minX,height:n.maxY-n.minY}))),y9o=Object.defineProperty,x9o=(t,e)=>{for(var n in e)y9o(t,n,{get:e[n],enumerable:!0})},qPt={};x9o(qPt,{Ammeter:()=>DTo,AnalogAcSweepSimulation:()=>gFo,AnalogAnalysisSimulation:()=>HO,AnalogDcOperatingPointSimulation:()=>lFo,AnalogDcSweepSimulation:()=>uFo,AnalogSimulation:()=>AFo,AnalogSweepParameter:()=>fFo,AnalogTransientSimulation:()=>cFo,Antenna:()=>ITo,AssemblyDevice:()=>qkt,AutoroutingPhase:()=>TTo,Battery:()=>Lko,Board:()=>wB,Breakout:()=>JMe,BreakoutPoint:()=>dR,Bus:()=>FPo,CadAssembly:()=>d6o,CadModel:()=>p6o,Capacitor:()=>MDt,Chip:()=>zj,Connector:()=>LDt,Constraint:()=>RTo,CopperPour:()=>Qkt,CopperText:()=>FMt,CourtyardCircle:()=>LMt,CourtyardOutline:()=>HMt,CourtyardRect:()=>OMt,Crystal:()=>Vko,CurrentSource:()=>Lkt,Cutout:()=>T0e,DifferentialPair:()=>UPo,Diode:()=>ODt,DrcCheck:()=>RRo,EnclosureCutoutAperture:()=>WMe,EnclosureFdmBox:()=>Zkt,FabricationNoteDimension:()=>kTo,FabricationNotePath:()=>GMt,FabricationNoteRect:()=>YMt,FabricationNoteText:()=>KMt,Fanout:()=>JMe,FanoutPoint:()=>dR,Fiducial:()=>Pko,Footprint:()=>Y0e,Fuse:()=>yTo,Group:()=>A6,Hole:()=>mO,Inductor:()=>ukt,Interconnect:()=>ETo,Jumper:()=>xTo,Keepout:()=>k0e,Led:()=>dkt,Mosfet:()=>hkt,MountedBoard:()=>lTo,Net:()=>Qb,NetLabel:()=>pDo,NormalComponent:()=>g0,OpAmp:()=>zko,Panel:()=>pTo,PcbNoteDimension:()=>FTo,PcbNoteLine:()=>VMt,PcbNotePath:()=>zMt,PcbNoteRect:()=>JMt,PcbNoteText:()=>WMt,PcbTrace:()=>tPe,PcbVia:()=>jMt,PinHeader:()=>Hko,Pinout:()=>CTo,PlatedHole:()=>Pb,Port:()=>Pu,Potentiometer:()=>Uko,PowerSource:()=>bTo,PrimitiveComponent:()=>Ir,PushButton:()=>pkt,Renderable:()=>tMt,Resistor:()=>mkt,Resonator:()=>Gko,SchematicArc:()=>qMt,SchematicBox:()=>ZRt,SchematicCell:()=>aFo,SchematicCircle:()=>XMt,SchematicGraphic:()=>iFo,SchematicLine:()=>nPe,SchematicPath:()=>ZMt,SchematicRect:()=>eDt,SchematicRow:()=>sFo,SchematicSection:()=>Xko,SchematicSheet:()=>oFo,SchematicSymbol:()=>qko,SchematicTable:()=>rFo,SchematicText:()=>tDt,SilkscreenCircle:()=>nDt,SilkscreenGraphic:()=>wko,SilkscreenLine:()=>oDt,SilkscreenPath:()=>iDt,SilkscreenRect:()=>rDt,SilkscreenText:()=>oPe,SmtPad:()=>Mb,SolderJumper:()=>BTo,SpiceModel:()=>BFo,Subcircuit:()=>Dkt,Subpanel:()=>Tkt,Switch:()=>_kt,Symbol:()=>iPe,TestPoint:()=>Jko,Trace:()=>t1,TraceHint:()=>qRt,Transistor:()=>fkt,Via:()=>BMt,VoltageProbe:()=>EFo,VoltageSource:()=>Fkt});var XPt=class{input;constructor({input:t}){this.input=t}solveAndMapToTraces(){const t=[];for(const e of this.input.connections){if(e.pointsToConnect.length!==2)continue;const[n,o]=e.pointsToConnect,i={type:"pcb_trace",pcb_trace_id:"",connection_name:e.name,route:[{route_type:"wire",x:n.x,y:n.y,layer:"top",width:.1},{route_type:"wire",x:o.x,y:o.y,layer:"top",width:.1}]};t.push(i)}return t}},E9o=t=>{const e=Math.min(...t.map(r=>r.center.x)),n=Math.max(...t.map(r=>r.center.x)),o=Math.min(...t.map(r=>r.center.y)),i=Math.max(...t.map(r=>r.center.y));return{minX:e,maxX:n,minY:o,maxY:i}},B9o=["top","bottom","inner1","inner2"],E0e=(t,e,n)=>{const o=[];if(n.length===0){const A=t[0].layers;for(const c of A)o.push(...E0e(t.slice(1),e,[c]));return o}if(t.length===0)return[];const i=t[0],r=i.via||i.optional_via,s=n[n.length-1];if(t.length===1){const A=i;return A.layers&&r?A.layers.map(c=>({layer_path:[...n,c]})):A.layers?.includes(s)?[{layer_path:[...n,s]}]:[]}if(!r)return i.layers&&!i.layers.includes(s)?[]:E0e(t.slice(1),e,n.concat([s]));const a=(i.optional_via?e:e.filter(A=>A!==s)).filter(A=>!i.layers||i.layers?.includes(A));for(const A of a)o.push(...E0e(t.slice(1),e,n.concat(A)));return o},b9o=(t,e={})=>E0e(t,e.layerSelectionPreference??B9o,[]);function ZPt(t){const e={x:t.to.x-t.from.x,y:t.to.y-t.from.y},n=Math.abs(e.x),o=Math.abs(e.y);return n>o?e.x>0?"right":"left":e.y>0?"down":"up"}var W7=t=>t.route_type==="through_pad"?t.start:{x:t.x,y:t.y},S9o=t=>t.route_type==="through_pad"?[t.start,t.end]:[{x:t.x,y:t.y}],B0e=(t,e="constant")=>{const n=t.slice().reverse().map(o=>o.route_type!=="through_pad"?{...o}:{...o,start:o.end,end:o.start,start_layer:o.end_layer,end_layer:o.start_layer});if(e==="interpolated")return n;for(let o=0;o<n.length-1;o++){const i=n[o],r=n[o+1];if(i?.route_type!=="wire"||r?.route_type!=="wire"||i.layer!==r.layer)continue;const s=t[t.length-o-2];s?.route_type==="wire"&&(i.width=s.width)}for(let o=0;o<n.length;o++){const i=n[o];if(i?.route_type!=="wire")continue;const r=n[o+1];if(r?.route_type==="wire"&&r.layer===i.layer)continue;let s=t.length-o-1;for(;s<t.length-1;){const A=t[s],c=t[s+1];if(A?.route_type!=="wire"||c?.route_type!=="wire"||A.layer!==c.layer)break;s++}const a=t[s];a?.route_type==="wire"&&(i.width=a.width)}return n};function uO(t,e){const n=W7(t),o=W7(e);return Math.hypot(n.x-o.x,n.y-o.y)}var Q9o=t=>{if(t.length===1)return t[0];if(t.some(A=>A.length===0))throw new Error("Cannot merge routes with zero length");const e=[],n=t[0][0],o=t[0][t[0].length-1],i=t[1][0],r=t[1][t[1].length-1],s=Math.min(uO(n,i),uO(n,r)),a=Math.min(uO(o,i),uO(o,r));s<a?e.push(...B0e(t[0])):e.push(...t[0]);for(let A=1;A<t.length;A++){const c=e[e.length-1],l=t[A],u=l[0],g=l[l.length-1],h=uO(c,u),d=uO(c,g);h<d?e.push(...l):e.push(...B0e(l))}for(let A=1;A<e.length-1;A++){const c=e[A-1],l=e[A];c.route_type==="wire"&&l.route_type==="wire"&&c.layer!==l.layer&&e.splice(A,0,{x:c.x,y:c.y,from_layer:c.layer,to_layer:l.layer,route_type:"via"})}return e},v9o=vc("tscircuit:renderable"),rE=["ReactSubtreesRender","RenderIsolatedSubcircuits","InflateSubcircuitCircuitJson","SourceNameDuplicateComponentRemoval","PcbFootprintStringRender","FetchPartFootprint","ResolveFootprintPinLabels","InitializePortsFromChildren","CreateNetsFromProps","AssignFallbackProps","CreateTracesFromProps","CreateTracesFromNetLabels","CreateTraceHintsFromProps","CreateAutoplacedBreakoutPoints","SourceGroupRender","AssignNameToUnnamedComponents","SourceRender","CheckRefDesConvention","SourceComponentPropertyValidation","SourceParentAttachment","PortMatching","OptimizeSelectorCache","SourceTraceRender","SourceAddConnectivityMapKey","SourceDesignRuleChecks","SimulationRender","SchematicComponentRender","SchematicPortRender","SymbolContainerRender","SchematicPrimitiveRender","SchematicSymbolResize","SchematicComponentSizeCalculation","SchematicLayout","SchematicSectionRender","SchematicTraceRender","SchematicSheetRender","SchematicReplaceNetLabelsWithSymbols","SchematicLabelNetsWithConflictingNames","PanelBoardLayout","ValidatePcbCoordinates","PcbComponentRender","PcbPrimitiveRender","PcbFootprintLayout","PcbPortRender","PcbPortAttachment","PcbComponentSizeCalculation","PcbComponentAnchorAlignment","PcbCalcPlacementResolution","PcbLayout","PcbBoardAutoSize","PanelLayout","PcbAutoplaceBreakoutPoints","PcbTraceHintRender","PcbManualTraceRender","PcbPlacementDesignRuleChecks","PcbTraceRender","PcbRouteNetIslands","PcbImplicitCopperPourRender","PcbCopperPourRender","PcbViaStitchRender","PcbCopperPourCleanup","PcbDesignRuleChecks","SilkscreenOverlapAdjustment","CadModelRender","PartsEngineRender","PartOrientationAnalysis","SupplierFootprintMismatchWarning","SimulationSpiceEngineRender"],eMt=new Map(rE.map((t,e)=>[t,e])),w9o={InflateSubcircuitCircuitJson:["RenderIsolatedSubcircuits"],ResolveFootprintPinLabels:["PcbFootprintStringRender","FetchPartFootprint"],SchematicComponentRender:["PcbFootprintStringRender","FetchPartFootprint"],SchematicPortRender:["PcbFootprintStringRender","FetchPartFootprint"],SymbolContainerRender:["PcbFootprintStringRender","FetchPartFootprint"],SchematicPrimitiveRender:["PcbFootprintStringRender","FetchPartFootprint"],SchematicSymbolResize:["PcbFootprintStringRender","FetchPartFootprint"],SchematicComponentSizeCalculation:["PcbFootprintStringRender","FetchPartFootprint"],SchematicLayout:["PcbFootprintStringRender","FetchPartFootprint"],SchematicSectionRender:["PcbFootprintStringRender","FetchPartFootprint"],SchematicTraceRender:["PcbFootprintStringRender","FetchPartFootprint"],SchematicSheetRender:["PcbFootprintStringRender","FetchPartFootprint"],SchematicReplaceNetLabelsWithSymbols:["PcbFootprintStringRender","FetchPartFootprint"],SchematicLabelNetsWithConflictingNames:["RenderIsolatedSubcircuits","PcbFootprintStringRender","FetchPartFootprint","SchematicTraceRender"],PcbFootprintLayout:["PcbFootprintStringRender","FetchPartFootprint"],PcbComponentSizeCalculation:["PcbFootprintStringRender","FetchPartFootprint"],PcbLayout:["PcbFootprintStringRender","FetchPartFootprint"],PcbBoardAutoSize:["PcbFootprintStringRender","FetchPartFootprint"],PcbTraceHintRender:["PcbFootprintStringRender","FetchPartFootprint"],PcbManualTraceRender:["PcbFootprintStringRender","FetchPartFootprint"],PcbCopperPourRender:["PcbFootprintStringRender","FetchPartFootprint","PcbPlacementDesignRuleChecks","PcbTraceRender","PcbRouteNetIslands","PcbImplicitCopperPourRender"],PcbImplicitCopperPourRender:["PcbFootprintStringRender","FetchPartFootprint","PcbPlacementDesignRuleChecks","PcbTraceRender","PcbRouteNetIslands"],PcbViaStitchRender:["PcbFootprintStringRender","FetchPartFootprint","PcbPlacementDesignRuleChecks","PcbTraceRender","PcbRouteNetIslands","PcbImplicitCopperPourRender","PcbCopperPourRender"],PcbPlacementDesignRuleChecks:["PcbFootprintStringRender","FetchPartFootprint"],PcbCopperPourCleanup:["PcbFootprintStringRender","FetchPartFootprint","PcbPlacementDesignRuleChecks","PcbTraceRender","PcbRouteNetIslands","PcbImplicitCopperPourRender","PcbCopperPourRender","PcbViaStitchRender"],PcbTraceRender:["PcbFootprintStringRender","FetchPartFootprint"],PcbRouteNetIslands:["PcbFootprintStringRender","FetchPartFootprint","PcbPlacementDesignRuleChecks"],PcbDesignRuleChecks:["PcbFootprintStringRender","FetchPartFootprint","PcbPlacementDesignRuleChecks","PcbTraceRender","PcbImplicitCopperPourRender","PcbCopperPourRender","PcbViaStitchRender","PcbCopperPourCleanup"],SilkscreenOverlapAdjustment:["PcbFootprintStringRender","FetchPartFootprint"],CadModelRender:["PcbFootprintStringRender","FetchPartFootprint"],PartsEngineRender:["PcbFootprintStringRender","FetchPartFootprint"],PartOrientationAnalysis:["PcbFootprintStringRender","FetchPartFootprint","PartsEngineRender"],SupplierFootprintMismatchWarning:["PcbFootprintStringRender","FetchPartFootprint","PartsEngineRender"],SourceAddConnectivityMapKey:["PcbFootprintStringRender","FetchPartFootprint"],PcbComponentAnchorAlignment:["PcbFootprintStringRender","FetchPartFootprint"],PcbCalcPlacementResolution:["PcbFootprintStringRender","FetchPartFootprint"],ValidatePcbCoordinates:["PcbFootprintStringRender","FetchPartFootprint"],SourceTraceRender:["PcbFootprintStringRender","FetchPartFootprint"]},P9o=0,M9o=0,tMt=class g4n{renderPhaseStates;shouldBeRemoved=!1;children;isPcbPrimitive=!1;isSchematicPrimitive=!1;_renderId;_currentRenderPhase=null;_pcbTraceRenderWaitingForPlacementChecks=!1;_asyncEffects=[];parent=null;constructor(e){this._renderId=`${P9o++}`,this.children=[],this.renderPhaseStates={};for(const n of rE)this.renderPhaseStates[n]={initialized:!1,dirty:!1}}_markDirty(e){this.renderPhaseStates[e].dirty=!0;const n=eMt.get(e);for(let o=n+1;o<rE.length;o++)this.renderPhaseStates[rE[o]].dirty=!0;this.parent?._markDirty&&this.parent._markDirty(e)}_queueAsyncEffect(e,n){const o=`${this._renderId}:${M9o++}`,i={asyncEffectId:o,promise:n(),phase:this._currentRenderPhase,effectName:e,complete:!1};this._asyncEffects.push(i);const r=this._getRootCircuit();r&&r.emit("asyncEffect:start",{asyncEffectId:o,effectName:e,componentDisplayName:this.getString(),phase:i.phase}),i.promise.then(()=>{i.complete=!0;const s=this._getRootCircuit();s&&s.emit("asyncEffect:end",{asyncEffectId:o,effectName:e,componentDisplayName:this.getString(),phase:i.phase})}).catch(s=>{console.error(`Async effect error in ${i.phase} "${e}":
${s.stack}`),i.complete=!0;const a=this._getRootCircuit();a&&a.emit("asyncEffect:end",{asyncEffectId:o,effectName:e,componentDisplayName:this.getString(),phase:i.phase,error:s.toString()})})}_emitRenderLifecycleEvent(e,n){v9o(`${e}:${n} ${this.getString()}`);const o=`renderable:renderLifecycle:${e}:${n}`,i={renderId:this._renderId,componentDisplayName:this.getString(),type:o},r=this._getRootCircuit();r&&(r.emit(o,i),r.emit("renderable:renderLifecycle:anyEvent",{...i,type:o}))}getString(){return this.constructor.name}_hasIncompleteAsyncEffects(){return this._asyncEffects.some(e=>!e.complete)?!0:this.children.some(e=>typeof e._hasIncompleteAsyncEffects=="function"?e._hasIncompleteAsyncEffects():!1)}_hasIncompleteAsyncEffectsInSubtreeForPhase(e){for(const n of this._asyncEffects)if(!n.complete&&n.phase===e)return!0;for(const n of this.children)if(n._hasIncompleteAsyncEffectsInSubtreeForPhase(e))return!0;return!1}_hasIncompleteAsyncEffectsForPhase(e){const n=this._getRootCircuit();return n?._hasIncompleteAsyncEffectsForPhase?n._hasIncompleteAsyncEffectsForPhase(e):this._hasIncompleteAsyncEffectsInSubtreeForPhase(e)}getCurrentRenderPhase(){return this._currentRenderPhase}getRenderGraph(){return{id:this._renderId,currentPhase:this._currentRenderPhase,renderPhaseStates:this.renderPhaseStates,shouldBeRemoved:this.shouldBeRemoved,children:this.children.map(e=>e.getRenderGraph())}}getTopLevelRenderable(){let e=this;for(;e.parent&&e.parent instanceof g4n;)e=e.parent;return e}runRenderCycle(){for(const e of rE)this.runRenderPhaseForChildren(e),this.runRenderPhase(e)}runRenderPhase(e){this._currentRenderPhase=e;const n=this.renderPhaseStates[e],o=n.initialized,i=n.dirty;if(!o&&this.shouldBeRemoved)return;if(this.shouldBeRemoved&&o){this._emitRenderLifecycleEvent(e,"start"),this?.[`remove${e}`]?.(),n.initialized=!1,n.dirty=!1,this._emitRenderLifecycleEvent(e,"end");return}const r=eMt.get(e)-1;if(r>=0){const a=rE[r];if(this._asyncEffects.filter(c=>c.phase===a).some(c=>!c.complete))return}const s=w9o[e]||[];if(s.length>0){for(const a of s)if(this._hasIncompleteAsyncEffectsForPhase(a))return}if(this._emitRenderLifecycleEvent(e,"start"),o){i&&(this?.[`update${e}`]?.(),n.dirty=!1),this._emitRenderLifecycleEvent(e,"end");return}n.dirty=!1,this?.[`doInitial${e}`]?.(),n.initialized=!0,this._emitRenderLifecycleEvent(e,"end")}runRenderPhaseForChildren(e){for(const n of this.children)"_isIsolatedSubcircuit"in this&&this._isIsolatedSubcircuit&&"doInitialRenderIsolatedSubcircuits"in this&&e==="RenderIsolatedSubcircuits"||(n.runRenderPhaseForChildren(e),n.runRenderPhase(e))}_getRootCircuit(){return"root"in this?this.root??null:null}renderError(e){throw typeof e=="string"?new Error(e):new Error(JSON.stringify(e,null,2))}},nMt=class extends Error{constructor(t,e,n){let o;const i=Object.keys(n).filter(A=>A!=="_errors"),r=[],s=e.pinLabels;if(s)for(const[A,c]of Object.entries(s)){const l=Array.isArray(c)?c:[c];for(const u of l)typeof u=="string"&&(u.startsWith(" ")||u.endsWith(" "))&&r.push(`pinLabels.${A} ("${u}" has leading or trailing spaces)`)}const a=i.map(A=>A==="pinLabels"&&r.length>0?r.join(", "):n[A]._errors[0]?`${A} (${n[A]._errors[0]})`:`${A} (${JSON.stringify(n[A])})`).join(", ");"name"in e?o=`Invalid props for ${t} "${e.name}": ${a}`:"footprint"in e&&typeof e.footprint=="string"?o=`Invalid props for ${t} (unnamed ${e.footprint} component): ${a}`:o=`Invalid props for ${t} (unnamed): ${a}`,super(o),this.componentName=t,this.originalProps=e,this.formattedError=n}componentName;originalProps;formattedError},oMt={mm:1};function D9o(t,e){const{knownVariables:n,units:o}=e,i={...oMt,...o??{}},r=iMt(rMt(t)),s=sMt(r,i);return N9o(s,n)}function Nwe(t){const e=iMt(rMt(t));return sMt(e,oMt).filter(o=>o.type==="identifier").map(o=>o.value)}function iMt(t){const e={minx:"minX",maxx:"maxX",miny:"minY",maxy:"maxY"};return t.replace(/\.(minx|maxx|miny|maxy)\b/gi,(n,o)=>`.${e[String(o).toLowerCase()]??n.slice(1)}`)}function rMt(t){const e=t.trim();if(!e.toLowerCase().startsWith("calc"))return e;const n=e.match(/^calc\s*\((.*)\)$/is);if(!n)throw new Error(`Invalid calc() expression: "${t}"`);return n[1].trim()}function sMt(t,e){const n=[];let o=0;const i=a=>a>="0"&&a<="9",r=a=>a>="A"&&a<="Z"||a>="a"&&a<="z"||a==="_",s=a=>r(a)||i(a)||a===".";for(;o<t.length;){const a=t[o];if(a===" "||a==="	"||a===`
`||a==="\r"){o++;continue}if(i(a)||a==="."&&o+1<t.length&&i(t[o+1])){const A=o;for(o++;o<t.length;){const g=t[o];if(i(g)||g===".")o++;else break}const c=t.slice(A,o);let l=Number(c);if(Number.isNaN(l))throw new Error(`Invalid number: "${c}"`);const u=o;for(;o<t.length&&/[A-Za-z]/.test(t[o]);)o++;if(o>u){const g=t.slice(u,o),h=e[g];if(h==null)throw new Error(`Unknown unit: "${g}"`);l*=h}n.push({type:"number",value:l});continue}if(r(a)){const A=o;for(o++;o<t.length&&s(t[o]);)o++;const c=t.slice(A,o);n.push({type:"identifier",value:c});continue}if(a==="("||a===")"){n.push({type:"paren",value:a}),o++;continue}if(a==="+"||a==="-"||a==="*"||a==="/"){n.push({type:"operator",value:a}),o++;continue}throw new Error(`Unexpected character "${a}" in expression "${t}"`)}return n}function N9o(t,e){let n=0;const o=()=>t[n],i=()=>t[n++],r=()=>{const l=o();if(!l)throw new Error("Unexpected end of expression");if(l.type==="number")return i(),l.value;if(l.type==="identifier"){i();const u=e[l.value];if(u==null)throw new Error(`Unknown variable: "${l.value}"`);return u}if(l.type==="paren"&&l.value==="("){i();const u=A(),g=o();if(!g||g.type!=="paren"||g.value!==")")throw new Error('Expected ")"');return i(),u}throw new Error(`Unexpected token "${l.value}"`)},s=()=>{const l=o();if(l&&l.type==="operator"&&(l.value==="+"||l.value==="-")){i();const u=s();return l.value==="+"?u:-u}return r()},a=()=>{let l=s();for(;;){const u=o();if(!u||u.type!=="operator"||u.value!=="*"&&u.value!=="/")break;i();const g=s();u.value==="*"?l*=g:l/=g}return l},A=()=>{let l=a();for(;;){const u=o();if(!u||u.type!=="operator"||u.value!=="+"&&u.value!=="-")break;i();const g=a();u.value==="+"?l+=g:l-=g}return l},c=A();if(n<t.length){const l=t.slice(n).map(u=>"value"in u?u.value:"?").join(" ");throw new Error(`Unexpected tokens at end of expression: ${l}`)}return c}function aMt(t){const{vars:e,componentName:n,position:o,size:i}=t;e[`${n}.x`]=o.x,e[`${n}.y`]=o.y,e[`${n}.width`]=i.width,e[`${n}.height`]=i.height,e[`${n}.minX`]=o.x-i.width/2,e[`${n}.maxX`]=o.x+i.width/2,e[`${n}.minY`]=o.y-i.height/2,e[`${n}.maxY`]=o.y+i.height/2}function R9o(t){const e={};for(const n of t.source_component.list()){if(!n.name)continue;const o=t.pcb_component.getWhere({source_component_id:n.source_component_id});o&&aMt({vars:e,componentName:n.name,position:{x:o.center.x,y:o.center.y},size:{width:o.width??0,height:o.height??0}})}return e}var T9o={from_left:{x:-1,y:0,z:0},from_right:{x:1,y:0,z:0},from_top:{x:0,y:1,z:0},from_bottom:{x:0,y:-1,z:0},from_above:{x:0,y:0,z:1},from_below:{x:0,y:0,z:-1}},b0e=t=>{const{componentLayer:e,originalLayer:n}=t;return e==="bottom"!=(n==="bottom")},AMt=t=>{const{insertionDirection:e,rotationDegrees:n=0,isFlipped:o=!1}=t;if(!e)return;const i=G2e[e],r=T9o[i],s=D0(W4(k9(n)*Math.PI/180),o?g3e():hC()),a=ts(s,r);return{x:a.x,y:a.y,z:o?-r.z:r.z}},k9o=t=>{const e=AMt(t);if(e)return e.z!==0?e.z>0?"from_above":"from_below":Math.abs(e.x)>=Math.abs(e.y)?e.x>=0?"from_right":"from_left":e.y>=0?"from_top":"from_bottom"};function F9o(t){if(!t)return;const e={},n={};if(t.silkscreenFontSize!==void 0&&(n.fontSize=t.silkscreenFontSize),t.silkscreenTextVisibility!==void 0&&(n.visibility=t.silkscreenTextVisibility),Object.keys(n).length>0&&(e["& silkscreentext"]=n),Object.keys(e).length!==0)return e}function L9o({parentResolvedPcbSx:t,pcbStyle:e,ownPcbSx:n}){const o=F9o(e),i={},r=new Set;if(t)for(const s of Object.keys(t))r.add(s);if(o)for(const s of Object.keys(o))r.add(s);if(n)for(const s of Object.keys(n))r.add(s);for(const s of r)i[s]={...t?.[s],...o?.[s],...n?.[s]};return i}function cMt(t,e){const n=["right","up","left","down"],o=n.indexOf(t);if(o===-1)return t;const i=Math.round(e/90),r=(o+i)%4;return n[r<0?r+4:r]}function Rwe(t,e){if(!t)return t;let n=t;const o=n.match(/_(right|left|up|down)$/);o&&(n=n.replace(o[0],`_${cMt(o[1],e)}`));const i=n.match(/_(horz|vert)$/);return i&&Twe(e)&&(n=n.replace(i[0],i[1]==="horz"?"_vert":"_horz")),n}function Twe(t){const e=(Math.round(t)%360+360)%360;return e===90||e===270}function kwe(t,e){return Twe(e)?{width:t.height,height:t.width}:t}function Fwe(t,e){const n=e.match(/^#(\w+)/);if(n)return t.props.id===n[1];const o=e.match(/^\.(\w+)/);if(o)return t.isMatchingNameOrAlias(o[1]);let[i,...r]=e.split(/(?=[#.[])/);return i==="pin"&&(i="port"),i&&i!=="*"&&t.lowercaseComponentName!==i.toLowerCase()?!1:r.every(s=>{if(s.startsWith("#"))return t.props.id===s.slice(1);if(s.startsWith("."))return t.isMatchingNameOrAlias(s.slice(1));const a=s.match(/\[(\w+)=['"]?(.+?)['"]?\]/);if(!a)return!0;const[,A,c]=a;return t.props[A].toString()===c})}var S0e={isTag:t=>!0,getParent:t=>t.parent,getChildren:t=>t.children,getName:t=>t.lowercaseComponentName,getAttributeValue:(t,e)=>{if(e==="class"&&"getNameAndAliases"in t)return t.getNameAndAliases().join(" ");if(e==="name"&&t._parsedProps?.name)return t._parsedProps.name;if(t._parsedProps&&e in t._parsedProps){const i=t._parsedProps[e];return typeof i=="string"?i:i!=null?String(i):null}const n=Object.keys(t._parsedProps??{}).find(i=>i.toLowerCase()===e);if(n){const i=t._parsedProps[n];return typeof i=="string"?i:i!=null?String(i):null}if(e in t){const i=t[e];return typeof i=="string"?i:i!=null?String(i):null}const o=t._attributeLowerToCamelNameMap;if(o){const i=o[e];if(i&&i in t){const r=t[i];return typeof r=="string"?r:r!=null?String(r):null}}return null},hasAttrib:(t,e)=>{if(e==="class")return!!t._parsedProps?.name;if(t._parsedProps&&e in t._parsedProps||Object.keys(t._parsedProps??{}).some(o=>o.toLowerCase()===e)||e in t)return!0;const n=t._attributeLowerToCamelNameMap;if(n){const o=n[e];if(o&&o in t)return!0}return!1},getSiblings:t=>t.parent?t.parent.children:[],prevElementSibling:t=>{if(!t.parent)return null;const e=t.parent.children,n=e.indexOf(t);return n>0?e[n-1]:null},getText:()=>"",removeSubsets:t=>t.filter((e,n)=>!t.some((o,i)=>n!==i&&o!==e&&o.getDescendants().includes(e))),existsOne:(t,e)=>e.some(t),findAll:(t,e)=>{const n=[],o=i=>{t(i)&&n.push(i);for(const r of i.children)o(r)};for(const i of e)o(i);return n},findOne:(t,e)=>{for(const n of e){if(t(n))return n;const o=n.children;if(o.length>0){const i=S0e.findOne(t,o);if(i)return i}}return null},equals:(t,e)=>t._renderId===e._renderId,isHovered:t=>!1,isVisited:t=>!1,isActive:t=>!1},H9o={...S0e,getChildren:t=>t.children.filter(e=>!e.isSubcircuit)},lMt={...S0e,getChildren:t=>t.children.filter(e=>e.isSubcircuit)},O9o=(t,e)=>{const n=t.split("net.")[1]?.split(/[ >]/)[0]??t;return`Net names cannot contain "+" or "-" (component "${e?.componentName??"Unknown component"}" received "${n}" via "${t}"). Try using underscores instead, e.g. VCC_P`},uMt=(t,e)=>{if(/net\.[^\s>]*\./.test(t))throw new Error('Net names cannot contain a period, try using "sel.net..." to autocomplete with conventional net names, e.g. V3_3');if(/net\.[^\s>]*[+-]/.test(t))throw new Error(O9o(t,e));if(/net\.[0-9]/.test(t)){const n=t.match(/net\.([^ >]+)/),o=n?n[1]:"";throw new Error(`Net name "${o}" cannot start with a number, try using a prefix like "VBUS1"`)}return t.replace(/ pin(?=[\d.])/g," port").replace(/ subcircuit\./g," group[isSubcircuit=true]").replace(/([^ ])\>([^ ])/g,"$1 > $2").replace(/(^|[ >])(?!pin\.)(?!port\.)(?!net\.)([A-Z][A-Za-z0-9_-]*)\.([A-Za-z0-9_-]+)/g,(n,o,i,r)=>{const s=/^\d+$/.test(r)?`pin${r}`:r;return`${o}.${i} > .${s}`}).trim()},Lwe={adapter:H9o,cacheResults:!0},G9o={componentName:"",zodProps:Pt({}).passthrough()},Ir=class extends tMt{parent=null;children;childrenPendingRemoval;get config(){return G9o}props;_parsedProps;get componentName(){return this.config.componentName}getInheritedProperty(t){let e=this;for(;e;){if(e._parsedProps&&t in e._parsedProps)return e._parsedProps[t];e=e.parent}if(this.root?.platform&&t in this.root.platform)return this.root.platform[t]}getInheritedMergedProperty(t){const e=this.parent?.getInheritedMergedProperty?.(t),n=this._parsedProps?.[t];return{...e,...n}}getResolvedPcbSx(){return L9o({parentResolvedPcbSx:this.parent?.getResolvedPcbSx?.(),pcbStyle:this._parsedProps?.pcbStyle,ownPcbSx:this._parsedProps?.pcbSx})}getSchematicSectionName(){return this._parsedProps?.schSectionName??null}get lowercaseComponentName(){return this.componentName.toLowerCase()}externallyAddedAliases;get isSubcircuit(){return!!this.props.subcircuit||this.lowercaseComponentName==="group"&&this?.parent?.isRootCircuit}get isGroup(){return this.lowercaseComponentName==="group"}get isRoutingDirective(){return!1}get name(){return this._parsedProps.name??this.fallbackUnassignedName}isPrimitiveContainer=!1;canHaveTextChildren=!1;source_group_id=null;source_component_id=null;schematic_component_id=null;schematic_sheet_id=null;pcb_component_id=null;cad_component_id=null;_reportedInvalidPcbCalcWarnings=new Set;_reportInvalidComponentPropertyError(t,e){!this.root||this._reportedInvalidPcbCalcWarnings.has(t)||(this.root.db.source_invalid_component_property_error.insert({source_component_id:this.source_component_id||"",property_name:t,message:e,error_type:"source_invalid_component_property_error"}),this._reportedInvalidPcbCalcWarnings.add(t))}fallbackUnassignedName;constructor(t){super(t),this.children=[],this.childrenPendingRemoval=[],this.props=t??{},this.externallyAddedAliases=[];const n=("partial"in this.config.zodProps?this.config.zodProps.partial({name:!0}):this.config.zodProps).safeParse(t??{});if(n.success)this._parsedProps=n.data;else throw new nMt(this.lowercaseComponentName,this.props,n.error.format())}setProps(t){const e=this.config.zodProps.parse({...this.props,...t}),n=this.props;this.props=e,this._parsedProps=this.config.zodProps.parse(t),this.onPropsChange({oldProps:n,newProps:e,changedProps:Object.keys(t)}),this.parent?.onChildChanged?.(this)}_getPcbRotationBeforeLayout(){const{pcbRotation:t}=this.props;return typeof t=="string"?parseFloat(t):t??null}getResolvedPcbPositionProp(){return{pcbX:this._resolvePcbCoordinate(this._parsedProps.pcbX,"pcbX"),pcbY:this._resolvePcbCoordinate(this._parsedProps.pcbY,"pcbY")}}doInitialValidatePcbCoordinates(){if(this.root?.pcbDisabled)return;const t=this.props,e=t.pcbX,n=t.pcbY;this._validatePcbCoordinateReferences({rawValue:e,axis:"pcbX",propertyName:"pcbX"}),this._validatePcbCoordinateReferences({rawValue:n,axis:"pcbY",propertyName:"pcbY"})}_validatePcbCoordinateReferences(t){const{rawValue:e,axis:n,propertyName:o=n}=t;if(typeof e!="string")return;const r=!(this._isNormalComponent===!0)&&!this._isInsideFootprint();let s=[];try{s=Nwe(e)}catch{this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: Invalid calc() expression. expression="${e}"`);return}s.some(A=>!A.startsWith("board."))&&!r&&this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: component-relative calc references are not supported for footprint elements (${this.componentName}); ${o} will be ignored. expression="${e}"`)}_resolvePcbCoordinate(t,e,n={}){if(t==null)return 0;const o=n.propertyName??e;if(typeof t=="number")return Number.isFinite(t)?t:0;if(typeof t!="string")throw new Error(`Invalid ${e} value for ${this.componentName}: ${String(t)}`);const i=n.allowBoardVariables??this._shouldAllowBoardVariablesByDefault(),r=this._isNormalComponent===!0,s=n.allowComponentVariables??(!r&&!this._isInsideFootprint()),a=t.includes("board."),A={};if(i){const c=this._getBoard(),l=c?._getBoardCalcVariables()??{};if(a&&!c)return this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: no board found for board.* variables. expression="${t}"`),0;if(a&&c&&Object.keys(l).length===0)return this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: Cannot do calculations based on board size when the board is auto-sized. expression="${t}"`),0;Object.assign(A,l)}if(s){const c=this.root?.db;c&&Object.assign(A,R9o(c)),Object.assign(A,n.componentVariables??{})}try{return Nwe(t).some(u=>!u.startsWith("board."))&&!s?(this._isInsideFootprint()&&this.root&&!this._reportedInvalidPcbCalcWarnings.has(e)&&(this.root.db.source_invalid_component_property_error.insert({source_component_id:this.source_component_id||"",property_name:e,message:`component-relative calc references are not supported for footprint elements (${this.componentName}); ${e} will be ignored. expression="${t}"`,error_type:"source_invalid_component_property_error"}),this._reportedInvalidPcbCalcWarnings.add(e)),0):D9o(t,{knownVariables:A})}catch(c){const l=c instanceof Error?c.message:String(c);return this._reportInvalidComponentPropertyError(o,`Invalid ${o} value for ${this.componentName}: ${l}. expression="${t}"`),0}}_shouldAllowBoardVariablesByDefault(){return this._isNormalComponent===!0?!0:!this._isInsideFootprint()&&!this._isInsideNonBoardSubcircuit()}_isInsideFootprint(){let t=this.parent;for(;t;){if(t.componentName==="Footprint")return!0;t=t.parent}return!1}_isInsideNonBoardSubcircuit(){let t=this.parent;for(;t;){const e=t.componentName;if(e==="Board"||e==="MountedBoard")return!1;if(t.isSubcircuit)return!0;t=t.parent}return!1}_hasUserDefinedPcbPosition(){const t=this._parsedProps;return t.pcbX!==void 0||t.pcbY!==void 0||t.pcbLeftEdgeX!==void 0||t.pcbRightEdgeX!==void 0||t.pcbTopEdgeY!==void 0||t.pcbBottomEdgeY!==void 0}resolvePcbCoordinate(t){const{rawValue:e,axis:n,allowBoardVariables:o,allowComponentVariables:i,componentVariables:r,propertyName:s}=t;return this._resolvePcbCoordinate(e,n,{allowBoardVariables:o,allowComponentVariables:i,componentVariables:r,propertyName:s})}computePcbPropsTransform(){const t=this._getPcbRotationBeforeLayout()??0,{pcbX:e,pcbY:n}=this.getResolvedPcbPositionProp();return D0(M0(e,n),W4(t*Math.PI/180))}_computePcbGlobalTransformBeforeLayout(){const t=this.getSubcircuit()._getPcbManualPlacementForComponent(this);if(t&&this.props.pcbX===void 0&&this.props.pcbY===void 0){const e=this._getPcbRotationBeforeLayout()??0;return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),D0(M0(t.x,t.y),W4(e*Math.PI/180)))}if(this.isPcbPrimitive){const{isFlipped:e}=this._getPcbPrimitiveFlippedHelpers();if(e)return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),g3e(),this.computePcbPropsTransform())}return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),this.computePcbPropsTransform())}_getEnclosingFootprint(){let t=this.parent;for(;t;){if(t.componentName==="Footprint")return t;t=t.parent}return null}getPrimitiveContainer(){return this.isPrimitiveContainer?this:this.parent?.getPrimitiveContainer?.()??null}_getSymbolAncestor(){const t=this.getPrimitiveContainer();return t?.componentName==="Symbol"?t:null}getParentNormalComponent(){let t=this.parent;for(;t;){if(t.isPrimitiveContainer&&t.doInitialPcbComponentRender)return t;t=t.parent}return null}getCollapsedSchematicBoxAncestor(){let t=this.parent;for(;t;){if(t.componentName==="Group"&&t._parsedProps?.showAsSchematicBox)return t;t=t.parent}return null}_resolveText(){const t=this._parsedProps.text;if(!t)return"";if(!t.includes("{NAME}")&&!t.includes("{REF}")&&!t.includes("{REFERENCE}"))return t;const n=this.getParentNormalComponent()?.name;return n?t.replace(/\{NAME\}/g,n).replace(/\{REF\}/g,n).replace(/\{REFERENCE\}/g,n):t}emitSolderMaskMarginWarning(t,e){if(t&&e!==void 0){const n=this.getParentNormalComponent();n?.source_component_id&&this.root.db.source_property_ignored_warning.insert({source_component_id:n.source_component_id,property_name:"solderMaskMargin",message:"solderMaskMargin is set but coveredWithSolderMask is true. When a component is fully covered with solder mask, a margin doesn't apply.",error_type:"source_property_ignored_warning"})}}_getPcbCircuitJsonBounds(){return{center:{x:0,y:0},bounds:{left:0,top:0,right:0,bottom:0},width:0,height:0}}_getPcbLocalBoundsBeforeLayout(){const{width:t,height:e}=this.getPcbSize();return{left:-t/2,right:t/2,top:e/2,bottom:-e/2}}_getPcbComponentLayer(){return this._parsedProps.layer}_getPcbPrimitiveFlippedHelpers(){const t=this.getPrimitiveContainer(),e=this.componentName==="Footprint"?this:this._getEnclosingFootprint(),n=t?._getPcbComponentLayer(),o=t?b0e({componentLayer:n,originalLayer:e?._parsedProps.originalLayer}):!1;return{isFlipped:o,maybeFlipLayer:r=>o?r==="top"?"bottom":"top":r}}_setPositionFromLayout(t){throw new Error(`_setPositionFromLayout not implemented for ${this.componentName}`)}computeSchematicPropsTransform(){const{_parsedProps:t}=this;return D0(M0(t.schX??0,t.schY??0))}computeSchematicGlobalTransform(){const t=this._getSchematicGlobalManualPlacementTransform(this);return t||D0(this.parent?.computeSchematicGlobalTransform?.()??hC(),this.computeSchematicPropsTransform())}_getSchematicSymbolName(){const{_parsedProps:t}=this,e=this.config.schematicSymbolName,n={horizontal:0,pos_left:0,neg_right:0,pos_right:180,neg_left:180,pos_top:270,neg_bottom:90,vertical:270,pos_bottom:90,neg_top:90};let o=t.schOrientation!==void 0?n[t.schOrientation]:t.schRotation;if(o===void 0&&(o=0),o=o%360,o<0&&(o+=360),t.schRotation!==void 0&&o%90!==0)throw new Error(`Schematic rotation ${t.schRotation} is not supported for ${this.componentName}`);if(/_(horz|vert|up|down|left|right)$/.test(e)&&e in Su){const u=Rwe(e,o);return u&&u in Su?u:e}const r=`${e}_horz`,s=`${e}_vert`,a=`${e}_up`,A=`${e}_down`,c=`${e}_left`,l=`${e}_right`;if(l in Su&&o===0)return l;if(a in Su&&o===90)return a;if(c in Su&&o===180)return c;if(A in Su&&o===270)return A;if(r in Su&&(o===0||o===180))return r;if(s in Su&&(o===90||o===270))return s;if(e in Su)return e}_getSchematicSymbolNameOrThrow(){const t=this._getSchematicSymbolName();if(!t)throw new Error(`No schematic symbol found (given: "${this.config.schematicSymbolName}")`);return t}getSchematicSymbol(){const t=this._getSchematicSymbolName();return t?Su[t]??null:null}_getPcbManualPlacementForComponent(t){if(!this.isSubcircuit)return null;const e=this.props.manualEdits;if(!e)return null;const n=e?.pcb_placements;if(!n)return null;for(const o of n)if(Fwe(t,o.selector)||t.props.name===o.selector)return ts(this._computePcbGlobalTransformBeforeLayout(),o.center);return null}_getSchematicManualPlacementForComponent(t){if(!this.isSubcircuit)return null;const e=this.props.manualEdits;if(!e)return null;const n=e.schematic_placements;if(!n)return null;for(const o of n)if(Fwe(t,o.selector)||t.props.name===o.selector)return ts(this.computeSchematicGlobalTransform(),o.center);return null}_getSchematicGlobalManualPlacementTransform(t){const e=this.getSubcircuit()?._parsedProps.manualEdits;if(!e)return null;for(const n of e.schematic_placements??[])if((Fwe(t,n.selector)||t.props.name===n.selector)&&n.relative_to==="group_center")return D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),M0(n.center.x,n.center.y));return null}_getGlobalPcbPositionBeforeLayout(){return ts(this._computePcbGlobalTransformBeforeLayout(),{x:0,y:0})}_getGlobalSchematicPositionBeforeLayout(){return ts(this.computeSchematicGlobalTransform(),{x:0,y:0})}_getBoard(){let t=this;for(;t;){const e=t,n=e.componentName;if(n==="Board"||n==="MountedBoard")return e;t=t.parent??null}return this.root?._getBoard()}get root(){return this.parent?.root??null}onAddToParent(t){this.parent=t}onPropsChange(t){}onChildChanged(t){this.parent?.onChildChanged?.(t)}add(t){const e=t.__text;if(typeof e=="string"){if(this.canHaveTextChildren||e.trim()==="")return;const n=this._parsedProps?.name,o=n?`<${this.componentName} name="${n}">`:`<${this.componentName}>`,r=/^NaN/.test(e.trim())?` This looks like a numeric expression that evaluated to NaN (e.g. \`\${value}${e.trim().replace(/^NaN/,"")}\` where \`value\` is NaN) — check the computation that produces this value.`:"";throw new Error(`Invalid JSX Element: ${o} received stray text "${e}" as a child, but it cannot hold text children. Remove the text or wrap it in an appropriate component.${r}`)}if(Object.keys(t).length!==0){if(t.lowercaseComponentName==="panel")throw new Error("<panel> must be a root-level element");if(!t.onAddToParent)throw new Error(`Invalid JSX Element: Expected a React component but received "${JSON.stringify(t)}"`);t.onAddToParent(this),t.parent=this,this.children.push(t),this._clearSelectorCachesUpTree()}}addAll(t){for(const e of t)this.add(e)}remove(t){this.children=this.children.filter(e=>e!==t),this.childrenPendingRemoval.push(t),t.shouldBeRemoved=!0,this._clearSelectorCachesUpTree()}_clearSelectorCachesUpTree(){let t=this;for(;t;)t._cachedSelectAllQueries?.clear(),t._cachedSelectOneQueries?.clear(),t=t.parent}getSubcircuitSelector(){const t=this.name,e=t?`${this.lowercaseComponentName}.${t}`:this.lowercaseComponentName;return!this.parent||this.parent.isSubcircuit?e:`${this.parent.getSubcircuitSelector()} > ${e}`}getFullPathSelector(){const t=this.name,e=t?`${this.lowercaseComponentName}.${t}`:this.lowercaseComponentName,n=this.parent?.getFullPathSelector?.();return n?`${n} > ${e}`:e}getNameAndAliases(){return[this.name,...this._parsedProps.portHints??[]].filter(Boolean)}isMatchingNameOrAlias(t){return this.getNameAndAliases().includes(t)}isMatchingAnyOf(t){return this.getNameAndAliases().some(e=>t.map(n=>n.toString()).includes(e))}getPcbSize(){throw new Error(`getPcbSize not implemented for ${this.componentName}`)}doesSelectorMatch(t){const e=[this.componentName,this.lowercaseComponentName],n=[this.name].filter(Boolean),o=t.trim().split(/\> /)[0],i=o[0];return o.length>1?!1:!!(t==="*"||t[0]==="#"&&t.slice(1)===this.props.id||t[0]==="."&&n.includes(t.slice(1))||/^[a-zA-Z0-9_]/.test(i)&&e.includes(i))}getSubcircuit(){if(this.isSubcircuit)return this;const t=this.parent?.getSubcircuit?.();if(!t)throw new Error("Component is not inside an opaque group (no board?)");return t}getGroup(){return this.isGroup?this:this.parent?.getGroup?.()??null}_resolveSchematicSheetId(){const t=this._parsedProps?.schSheetName??this.props.schSheetName;if(t){const e=this.root?.db.schematic_sheet.list().find(n=>n.name===t);if(e)return e.schematic_sheet_id}return this.schematic_sheet_id?this.schematic_sheet_id:this.parent?._resolveSchematicSheetId?.()}doInitialAssignNameToUnnamedComponents(){this._parsedProps.name||(this.fallbackUnassignedName=this.getSubcircuit().getNextAvailableName(this))}doInitialOptimizeSelectorCache(){if(!this.isSubcircuit)return;const t=this.selectAll("port"),e=n=>/^[A-Za-z_][A-Za-z0-9_-]*$/.test(n);for(const n of t){const i=(n.getParentNormalComponent?.()??n.parent)?.getNameAndAliases(),r=n.getNameAndAliases();if(i)for(const s of i)for(const a of r){const A=[`.${s} > .${a}`,`.${s} .${a}`];e(s)&&e(a)&&A.push(`${s}.${a}`);for(const c of A){const l=this._cachedSelectAllQueries.get(c);l?l.push(n):this._cachedSelectAllQueries.set(c,[n])}}}for(const[n,o]of this._cachedSelectAllQueries.entries())o.length===1&&this._cachedSelectOneQueries.set(n,o[0])}updateOptimizeSelectorCache(){this._cachedSelectAllQueries.clear(),this._cachedSelectOneQueries.clear(),this.doInitialOptimizeSelectorCache()}_cachedSelectAllQueries=new Map;selectAll(t){if(this._cachedSelectAllQueries.has(t))return this._cachedSelectAllQueries.get(t);const e=uMt(t,this),n=t0t(e,this,Lwe);if(n.length>0)return this._cachedSelectAllQueries.set(t,n),n;const[o,...i]=e.split(" "),r=poe(o,this,{adapter:lMt});if(!r)return[];const s=r.selectAll(i.join(" "));return this._cachedSelectAllQueries.set(t,s),s}_cachedSelectOneQueries=new Map;selectOne(t,e){if(this._cachedSelectOneQueries.has(t))return this._cachedSelectOneQueries.get(t);const n=uMt(t,this);e?.port&&(e.type="port");let o=null;if(e?.type&&(o=t0t(n,this,Lwe).find(A=>A.lowercaseComponentName===e.type)),e?.type||(o??=poe(n,this,Lwe)),o)return this._cachedSelectOneQueries.set(t,o),o;const[i,...r]=n.split(" "),s=poe(i,this,{adapter:lMt});return s?(o=s.selectOne(r.join(" "),e),this._cachedSelectOneQueries.set(t,o),o):null}getAvailablePcbLayers(){if(this.isPcbPrimitive){const{maybeFlipLayer:t}=this._getPcbPrimitiveFlippedHelpers();return"layer"in this._parsedProps||this.componentName==="SmtPad"?[t(this._parsedProps.layer??"top")]:"layers"in this._parsedProps?this._parsedProps.layers:this.componentName==="PlatedHole"?[...this.root?._getBoard()?.allLayers??["top","bottom"]]:[]}return[]}getDescendants(){const t=[];for(const e of this.children)t.push(e),t.push(...e.getDescendants());return t}getSelectableDescendants(){const t=[];for(const e of this.children)e.isSubcircuit?t.push(e):(t.push(e),t.push(...e.getSelectableDescendants()));return t}_getPrimaryPinCount(){return 0}_getSchematicBoxDimensions(){return null}_getSchematicBoxComponentDimensions(){if(this.getSchematicSymbol()||!this.config.shouldRenderAsSchematicBox)return null;const{_parsedProps:t}=this;return{schWidth:t.schWidth,schHeight:t.schHeight}}renderError(t){if(typeof t=="string")return super.renderError(t);switch(t.type){case"pcb_placement_error":this.root?.db.pcb_placement_error.insert(t);break;case"pcb_via_clearance_error":this.root?.db.pcb_via_clearance_error.insert(t);break;case"pcb_trace_error":this.root?.db.pcb_trace_error.insert(t);break;case"pcb_manual_edit_conflict_warning":this.root?.db.pcb_manual_edit_conflict_warning.insert(t);break;default:this.root?.db.pcb_placement_error.insert(t)}}getString(){const{lowercaseComponentName:t,_parsedProps:e,parent:n}=this;return e?.pinNumber!==void 0&&n?.props?.name&&e?.name?`<${t}#${this._renderId}(pin:${e.pinNumber} .${n?.props.name}>.${e.name}) />`:n?.props?.name&&e?.name?`<${t}#${this._renderId}(.${n?.props.name}>.${e?.name}) />`:e?.from&&e?.to?`<${t}#${this._renderId}(from:${e.from} to:${e?.to}) />`:e?.name?`<${t}#${this._renderId} name=".${e?.name}" />`:e?.portHints?`<${t}#${this._renderId}(${e.portHints.map(o=>`.${o}`).join(", ")}) />`:`<${t}#${this._renderId} />`}getDisplayName(){return this.name?`${this.lowercaseComponentName} "${this.name}"`:`${this.lowercaseComponentName} (unnamed)`}get[Symbol.toStringTag](){return this.getString()}[Symbol.for("nodejs.util.inspect.custom")](){return this.getString()}};function gMt(t){const e=[];for(let n=0;n<t.length-1;n++)e.push([t[n],t[n+1]]);return e}var Q0e=/(?:^|_)(?:GND|AGND|DGND|PGND|VSS)/i,Hwe=/(?:^|_)(?:V(?!SS)|\d+(?:[_.]\d+)?V)/i,Qb=class extends Ir{source_net_id;subcircuit_connectivity_map_key=null;get config(){return{componentName:"Net",zodProps:Xwn}}getPortSelector(){return`net.${this.props.name}`}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=e.isGroundNet??Q0e.test(e.name),o=e.isPowerNet??Hwe.test(e.name),i=t.source_net.insert({name:e.name,member_source_group_ids:[],is_ground:n,is_power:o,is_positive_voltage_source:o});this.source_net_id=i.source_net_id}doInitialSourceParentAttachment(){const t=this.getSubcircuit();if(!t)return;const{db:e}=this.root;e.source_net.update(this.source_net_id,{subcircuit_id:t.subcircuit_id})}getAllConnectedPorts(){const t=this.getSubcircuit().selectAll("port"),e=[];for(const n of t){const o=n._getDirectlyConnectedTraces();for(const i of o)if(i._isExplicitlyConnectedToNet(this)){e.push(n);break}}return e}_getAllDirectlyConnectedTraces(){const t=this.getSubcircuit().selectAll("trace"),e=[];for(const n of t)n._isExplicitlyConnectedToNet(this)&&e.push(n);return e}doInitialPcbRouteNetIslands(){if(this.root?.pcbDisabled)return;const t=this.getSubcircuit();if(this.root?.pcbRoutingDisabled||t.getInheritedProperty("routingDisabled")||t._isInflatedFromCircuitJson||t._getAutorouterConfig().groupMode!=="sequential-trace")return;const{db:e}=this.root,{_parsedProps:n}=this,o=this._getAllDirectlyConnectedTraces().filter(s=>(s._portsRoutedOnPcb?.length??0)>0),i=[];for(const s of o){const a=s._portsRoutedOnPcb,A=i.find(c=>a.some(l=>c.ports.includes(l)));if(!A){i.push({ports:[...a],traces:[s]});continue}A.traces.push(s),A.ports.push(...a)}if(i.length===0)return;const r=gMt(i);for(const[s,a]of r){const A=s.ports.map(_=>_._getGlobalPcbPositionBeforeLayout()),c=a.ports.map(_=>_._getGlobalPcbPositionBeforeLayout());let l=1/0,u=[-1,-1];for(let _=0;_<A.length;_++){const f=A[_];for(let I=0;I<c.length;I++){const C=c[I],y=Math.sqrt((f.x-C.x)**2+(f.y-C.y)**2);y<l&&(l=y,u=[_,I])}}const g=s.ports[u[0]],h=a.ports[u[1]],d=e.toArray().filter(_=>_.type==="pcb_smtpad"||_.type==="pcb_trace"||_.type==="pcb_plated_hole"||_.type==="pcb_hole"||_.type==="source_port"||_.type==="pcb_port"),{solution:p}=dvn(d.concat([{type:"source_trace",source_trace_id:"__net_trace_tmp",connected_source_port_ids:[g.source_port_id,h.source_port_id]}])),m=p[0];if(!m){this.renderError({pcb_trace_error_id:"",pcb_trace_id:"__net_trace_tmp",pcb_component_ids:[g.pcb_component_id,h.pcb_component_id].filter(Boolean),pcb_port_ids:[g.pcb_port_id,h.pcb_port_id].filter(Boolean),type:"pcb_trace_error",error_type:"pcb_trace_error",message:`Failed to route net islands for "${this.getString()}"`,source_trace_id:"__net_trace_tmp"});return}e.pcb_trace.insert(m)}}renderError(t){if(typeof t=="string")return super.renderError(t);this.root?.db.pcb_trace_error.insert(t)}},Hj=(t,e)=>{for(const n of e)if(typeof n=="string"&&n.startsWith("net.")){if(/net\.[^\s>]*\./.test(n))throw new Error('Net names cannot contain a period, try using "sel.net..." to autocomplete with conventional net names, e.g. V3_3');if(/net\.[^\s>]*[+-]/.test(n)){const i=n.split("net.")[1],r=`Net names cannot contain "+" or "-" (component "${t.componentName}" received "${i}" via "${n}"). Try using underscores instead, e.g. VCC_P`;throw new Error(r)}if(/net\.[0-9]/.test(n)){const i=n.split("net.")[1];throw new Error(`Net name "${i}" cannot start with a number, try using a prefix like "VBUS1"`)}const o=t.getSubcircuit();if(!o.selectOne(n)){const i=new Qb({name:n.split("net.")[1]});o.add(i)}}},Y9o=(t,e)=>{const n="_getGlobalPcbPositionBeforeLayout"in t?t._getGlobalPcbPositionBeforeLayout():t,o="_getGlobalPcbPositionBeforeLayout"in e?e._getGlobalPcbPositionBeforeLayout():e;return Math.sqrt((n.x-o.x)**2+(n.y-o.y)**2)};function dMt(t,e){if(e.length===0)throw new Error("No candidates given to getClosest method");let n=e[0],o=1/0;for(const i of e){const r=Y9o(t,i);r<o&&(n=i,o=r)}return n}var U9o=t=>t.outline&&t.outline.length>0?new Ip(t.outline.map(e=>by(e.x,e.y))):new Ip(new VBe(t.center.x-t.width/2,t.center.y-t.height/2,t.center.x+t.width/2,t.center.y+t.height/2).toPoints()),K9o=({mergedRoute:t,db:e,pcbBoardId:n})=>{const o=e.pcb_board.get(n);if(!o)return!1;const i=U9o(o);return!t.flatMap(S9o).every(r=>i.contains(by(r.x,r.y)))},lw=({fromLayer:t,toLayer:e,layerCount:n})=>{if(t===e)return[t];const o=["top"];for(let s=1;s<=n-2;s++)o.push(`inner${s}`);o.push("bottom");const i=o.indexOf(t),r=o.indexOf(e);return i===-1||r===-1?[t,e]:i<=r?o.slice(i,r+1):o.slice(r,i+1).reverse()},WN=t=>t<=1?["top"]:lw({fromLayer:"top",toLayer:"bottom",layerCount:t}),hMt=({fromLayer:t,toLayer:e,layerCount:n,allowBlindAndBuriedVias:o=!1,physicalLayers:i})=>{const r=WN(n);if(!o)return r;if(i?.length){const s=new Set(i),a=r.filter(u=>s.has(u)),A=r.indexOf(a[0]),c=r.indexOf(a[a.length-1]),l=r.slice(A,c+1);if(s.has(t)&&s.has(e)&&s.size===l.length&&l.every(u=>s.has(u)))return l}return lw({fromLayer:t,toLayer:e,layerCount:n})},Owe=t=>{const e=WN(t);return e.length<=1?e:[e[0],e[e.length-1],...e.slice(1,-1)]};function V9o(t,e={}){const{center:n,radius:o}=t,{rectHeight:i=.1}=e,r=[],s=Math.ceil(o*2/i);for(let a=0;a<s;a++){const A=n.y-o+(a+.5)*i,c=A-n.y,l=Math.sqrt(o*o-c*c);l>0&&r.push({center:{x:n.x,y:A},width:l*2,height:i})}return r}function Gwe(t,e={}){if(t.length<3)return[];const{rectHeight:n=.1}=e,o=[],i=t.map(a=>a.y),r=Math.min(...i),s=Math.max(...i);for(let a=r;a<s;a+=n){const A=a+n/2,c=[];for(let l=0;l<t.length;l++){const u=t[l],g=t[(l+1)%t.length];if(u.y<=A&&g.y>A||g.y<=A&&u.y>A){const h=(A-u.y)*(g.x-u.x)/(g.y-u.y)+u.x;c.push(h)}}c.sort((l,u)=>l-u);for(let l=0;l<c.length;l+=2)if(l+1<c.length){const u=c[l],h=c[l+1]-u;h>1e-6&&o.push({center:{x:u+h/2,y:A},width:h,height:n})}}return o}var z9o=.001,J9o=t=>{const e=(A,c)=>Math.abs(A-c)<=z9o,n=t.filter((A,c)=>c===0||!e(A.x,t[c-1].x)||!e(A.y,t[c-1].y));if(n.length>1&&e(n[0].x,n.at(-1).x)&&e(n[0].y,n.at(-1).y)&&n.pop(),n.length<4)return null;const o=Math.min(...n.map(A=>A.x)),i=Math.max(...n.map(A=>A.x)),r=Math.min(...n.map(A=>A.y)),s=Math.max(...n.map(A=>A.y)),a=[{x:o,y:r},{x:o,y:s},{x:i,y:r},{x:i,y:s}];return!n.every(A=>e(A.x,o)||e(A.x,i)||e(A.y,r)||e(A.y,s))||!a.every(A=>n.some(c=>e(c.x,A.x)&&e(c.y,A.y)))?null:{center:{x:(o+i)/2,y:(r+s)/2},width:i-o,height:s-r}},pMt=(t,e)=>Math.abs(t-e)<1e-4,W9o=(t,e,{viaDiameter:n=.5}={})=>{const o=[];for(let i=0;i<t.length-1;i++){const[r,s]=[t[i],t[i+1]],a=i-1>=0?t[i-1]:null,A=pMt(r.y,s.y),c=pMt(r.x,s.x);if(!A&&!c)throw new Error(`getObstaclesFromTrace currently only supports horizontal and vertical traces (not diagonals) Conflicting trace: ${e}, start: (${r.x}, ${r.y}), end: (${s.x}, ${s.y})`);const l={type:"rect",layers:[r.layer],center:{x:(r.x+s.x)/2,y:(r.y+s.y)/2},width:A?Math.abs(r.x-s.x):.1,height:c?Math.abs(r.y-s.y):.1,connectedTo:[e]};if(o.push(l),a&&a.layer===r.layer&&r.layer!==s.layer){const u={type:"rect",layers:[r.layer,s.layer],center:{x:r.x,y:r.y},connectedTo:[e],width:n,height:n};o.push(u)}}return o},j9o=.01,mMt=t=>{const e=(t.rotation%360+360)%360,n=[0,90,180,270];for(const o of n){if(Math.min(Math.abs(e-o),360-Math.abs(e-o))>j9o)continue;const r=o===90||o===270;return{center:t.center,width:r?t.height:t.width,height:r?t.width:t.height}}return null},_Mt=(t,e)=>{const n=t.find(u=>u.type==="pcb_board"),o=WN(n?.num_layers??4),i=new Map(t.flatMap(u=>u.type==="pcb_component"?[[u.pcb_component_id,u]]:[])),r=new Map(t.flatMap(u=>u.type==="pcb_port"?[[u.pcb_port_id,u]]:[])),s=new Map(t.flatMap(u=>u.type==="source_component"?[[u.source_component_id,u]]:[])),a=new Map(t.flatMap(u=>u.type==="source_port"?[[u.source_port_id,u]]:[])),A=({pcbComponentId:u,pcbPortId:g})=>{const h=g?r.get(g):void 0,d=h?a.get(h.source_port_id):void 0,p=(u?i.get(u)?.source_component_id:void 0)??d?.source_component_id,m=p?s.get(p):void 0;return{...m?.name?{source_component_name:m.name}:{},...d?.name?{source_port_name:d.name}:{}}},c=u=>e?u.concat(u.map(g=>e?.getNetConnectedToId(g)).filter(Boolean)):u,l=[];for(const u of t){const g=u.pcb_component_id??void 0;if(u.type==="pcb_smtpad"){const h={pcb_smtpad_id:u.pcb_smtpad_id,pcb_port_id:u.pcb_port_id,...A({pcbComponentId:g,pcbPortId:u.pcb_port_id})};if(u.shape==="circle")l.push({circuitJsonMetadata:h,componentId:g,type:"rect",shape:"circle",layers:[u.layer],center:{x:u.x,y:u.y},width:u.radius*2,height:u.radius*2,connectedTo:c([u.pcb_smtpad_id])});else if(u.shape==="rect")l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:[u.layer],center:{x:u.x,y:u.y},width:u.width,height:u.height,connectedTo:c([u.pcb_smtpad_id])});else if(u.shape==="rotated_rect"){const d={center:{x:u.x,y:u.y},width:u.width,height:u.height,rotation:u.ccw_rotation},p=mMt(d),m=p??d;l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:[u.layer],center:m.center,width:m.width,height:m.height,ccwRotationDegrees:p?void 0:u.ccw_rotation,connectedTo:c([u.pcb_smtpad_id])})}else if(u.shape==="pill"||u.shape==="rotated_pill")l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:[u.layer],center:{x:u.x,y:u.y},width:u.width,height:u.height,...u.shape==="rotated_pill"?{ccwRotationDegrees:u.ccw_rotation}:{},connectedTo:c([u.pcb_smtpad_id])});else if(u.shape==="polygon"){const d=J9o(u.points);if(d){l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:[u.layer],...d,connectedTo:c([u.pcb_smtpad_id])});continue}const p=Gwe(u.points,{rectHeight:.1});for(const m of p)l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:[u.layer],center:m.center,width:m.width,height:m.height,connectedTo:c([u.pcb_smtpad_id])})}}else if(u.type==="pcb_keepout")u.shape==="circle"?l.push({componentId:g,type:"oval",layers:u.layers,center:{x:u.center.x,y:u.center.y},width:u.radius*2,height:u.radius*2,connectedTo:[]}):u.shape==="rect"&&l.push({componentId:g,type:"rect",layers:u.layers,center:{x:u.center.x,y:u.center.y},width:u.width,height:u.height,connectedTo:[]});else if(u.type==="pcb_cutout"){if(u.shape==="rect")l.push({componentId:g,type:"rect",layers:o,center:{x:u.center.x,y:u.center.y},width:u.width,height:u.height,connectedTo:[]});else if(u.shape==="circle"){const h=V9o({center:u.center,radius:u.radius},{rectHeight:.6});for(const d of h)l.push({componentId:g,type:"rect",layers:o,center:d.center,width:d.width,height:d.height,connectedTo:[]})}else if(u.shape==="polygon"){const h=Gwe(u.points,{rectHeight:.6});for(const d of h)l.push({componentId:g,type:"rect",layers:o,center:d.center,width:d.width,height:d.height,connectedTo:[]})}}else if(u.type==="pcb_hole")u.hole_shape==="oval"?l.push({componentId:g,type:"oval",layers:o,center:{x:u.x,y:u.y},width:u.hole_width,height:u.hole_height,connectedTo:[]}):u.hole_shape==="pill"||u.hole_shape==="rotated_pill"?l.push({componentId:g,type:"rect",layers:o,center:{x:u.x,y:u.y},width:u.hole_width,height:u.hole_height,...u.hole_shape==="rotated_pill"?{ccwRotationDegrees:u.ccw_rotation}:{},connectedTo:[]}):u.hole_shape==="rect"?l.push({componentId:g,type:"rect",layers:o,center:{x:u.x,y:u.y},width:u.hole_width,height:u.hole_height,connectedTo:[]}):u.hole_shape==="square"?l.push({componentId:g,type:"rect",layers:o,center:{x:u.x,y:u.y},width:u.hole_diameter,height:u.hole_diameter,connectedTo:[]}):(u.hole_shape==="round"||u.hole_shape==="circle")&&l.push({componentId:g,type:"rect",layers:o,center:{x:u.x,y:u.y},width:u.hole_diameter,height:u.hole_diameter,connectedTo:[]});else if(u.type==="pcb_plated_hole"){const h={pcb_plated_hole_id:u.pcb_plated_hole_id,pcb_port_id:u.pcb_port_id,...A({pcbComponentId:g,pcbPortId:u.pcb_port_id})};if(u.shape==="circle")l.push({circuitJsonMetadata:h,componentId:g,type:"oval",layers:o,center:{x:u.x,y:u.y},width:u.outer_diameter,height:u.outer_diameter,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape==="pill_hole_with_rect_pad"||u.shape==="rotated_pill_hole_with_rect_pad"){const d={center:{x:u.x,y:u.y},width:u.rect_pad_width,height:u.rect_pad_height,rotation:u.shape==="rotated_pill_hole_with_rect_pad"?u.rect_ccw_rotation:0},p=mMt(d),m=p??d;l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:o,center:m.center,width:m.width,height:m.height,ccwRotationDegrees:p?void 0:d.rotation,connectedTo:c([u.pcb_plated_hole_id])})}else if(u.shape==="circular_hole_with_rect_pad")l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:o,center:{x:u.x,y:u.y},width:u.rect_pad_width,height:u.rect_pad_height,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape==="oval")l.push({circuitJsonMetadata:h,componentId:g,type:"oval",layers:o,center:{x:u.x,y:u.y},width:u.outer_width,height:u.outer_height,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape==="pill")l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:o,center:{x:u.x,y:u.y},width:u.outer_width,height:u.outer_height,ccwRotationDegrees:u.ccw_rotation,connectedTo:c([u.pcb_plated_hole_id])});else if(u.shape==="hole_with_polygon_pad"&&"pad_outline"in u&&u.pad_outline&&u.pad_outline.length>0){const d=u.pad_outline.map(x=>u.x+x.x),p=u.pad_outline.map(x=>u.y+x.y),m=Math.min(...d),_=Math.max(...d),f=Math.min(...p),I=Math.max(...p),C=(m+_)/2,y=(f+I)/2;l.push({circuitJsonMetadata:h,componentId:g,type:"rect",layers:o,center:{x:C,y},width:_-m,height:I-f,connectedTo:c([u.pcb_plated_hole_id])})}}else if(u.type==="pcb_trace"){const h=W9o(u.route.flatMap(d=>d.route_type==="through_pad"?[{x:d.start.x,y:d.start.y,layer:d.start_layer},{x:d.end.x,y:d.end.y,layer:d.end_layer}]:[{x:d.x,y:d.y,layer:d.route_type==="wire"?d.layer:d.from_layer}]),u.source_trace_id??u.pcb_trace_id);l.push(...h.map(d=>({...d,componentId:g})))}else if(u.type==="pcb_via"){const h=!!(u.net_is_assignable??u.netIsAssignable);l.push({circuitJsonMetadata:{pcb_via_id:u.pcb_via_id,...A({pcbComponentId:g})},componentId:g,type:"rect",shape:"circle",layers:u.layers,center:{x:u.x,y:u.y},connectedTo:c([u.pcb_via_id]),width:u.outer_diameter,height:u.outer_diameter,netIsAssignable:h||void 0})}}return l},vb=({text:t,font_size:e=.18})=>{const n=e/.18,o=.12*n,i=.12*n;return t.length*o+i},j7=({anchor_position:t,anchor_side:e,text:n,font_size:o=.18})=>{const i=vb({text:n,font_size:o}),r=o,s={...t};switch(e){case"right":s.x-=i/2;break;case"left":s.x+=i/2;break;case"top":s.y-=r/2;break;case"bottom":s.y+=r/2;break}return s},$9o=(t,e)=>{let n=0;n+=t.length??0,n+=e.filter(o=>o.is_crossing).length;for(let o=1;o<e.length;o++){const i=e[o-1],r=e[o],s=Math.abs(i.from.x-i.to.x)<.01,a=Math.abs(r.from.x-r.to.x)<.01;s!==a&&n++}return n},gO=t=>({up:"bottom",down:"top",left:"right",right:"left"})[t]??null,Ywe=({firstEdge:t,firstEdgePort:e,firstDominantDirection:n,lastEdge:o,lastEdgePort:i,lastDominantDirection:r})=>{if(t&&e)return Ywe({lastEdge:{from:t.to,to:t.from},lastEdgePort:e,lastDominantDirection:n}).reverse().map(a=>({from:a.to,to:a.from}));let s=[];if(o&&i){const a={x:o.to.x,y:o.to.y};r==="left"||r==="right"?(a.x=i.position.x,s.push({from:o.to,to:{...a}}),s.push({from:a,to:{...i.position}})):(a.y=i.position.y,s.push({from:o.to,to:{...a}}),s.push({from:a,to:{...i.position}}))}return s=s.filter(a=>ad(a.from,a.to)>.01),s};function q9o(t){try{return[t(),null]}catch(e){return[null,e]}}var X9o=tJn.version,Oj=class extends Error{constructor(t){super(`${t} (capacity-autorouter@${X9o})`),this.name="AutorouterError"}},jN=class extends Error{constructor(t){super(t.message),this.errorData=t,this.name="TraceConnectionError"}errorData},Z9o=.2,e7o=.3,fMt=(t,e)=>{if(t===void 0)return e;if(typeof t=="number")return t;const n=parseFloat(t);return Number.isFinite(n)?n:e},$N=t=>({holeDiameter:fMt(t?.viaHoleDiameter,Z9o),padDiameter:fMt(t?.viaPadDiameter,e7o)}),t7o=(t,e)=>{const n=$N(e);return{holeDiameter:t.holeDiameter??n.holeDiameter,padDiameter:t.padDiameter??n.padDiameter}};function IMt(t,e){const n=e.x-t.x,o=e.y-t.y;return Math.abs(n)>Math.abs(o)?n>=0?"right":"left":o>=0?"up":"down"}var n7o=new Proxy({},{get:(t,e)=>e}),$7=n7o,wb="rgba(132, 0, 0)",v0e=.12,w0e=t=>{if(t.length<=1)return!0;const e=t.map(r=>{const s=r._getPcbCircuitJsonBounds();return{left:s.bounds.left,right:s.bounds.right,top:s.bounds.top,bottom:s.bounds.bottom}}),n=Array(e.length).fill(!1).map(()=>Array(e.length).fill(!1));for(let r=0;r<e.length;r++)for(let s=r+1;s<e.length;s++){const a=e[r],A=e[s];n[r][s]=n[s][r]=!(a.right<A.left||a.left>A.right||a.bottom>A.top||a.top<A.bottom)}const o=new Set,i=r=>{o.add(r);for(let s=0;s<e.length;s++)n[r][s]&&!o.has(s)&&i(s)};return i(0),o.size===e.length},Uwe=t=>{if(t.length===0)throw new Error("Cannot get center of empty PCB primitives array");const e=t.map(i=>i._getPcbCircuitJsonBounds().center).filter(Boolean),n=e.reduce((i,r)=>i+r.x,0),o=e.reduce((i,r)=>i+r.y,0);return{x:n/e.length,y:o/e.length}},o7o=(t,e)=>{switch(e){case"i2c_sda":t.supports_i2c_sda=!0;return;case"i2c_scl":t.supports_i2c_scl=!0;return;case"spi_cs":t.supports_spi_cs=!0;return;case"spi_sck":t.supports_spi_sck=!0;return;case"spi_mosi":t.supports_spi_mosi=!0;return;case"spi_miso":t.supports_spi_miso=!0;return;case"uart_tx":t.supports_uart_tx=!0;return;case"uart_rx":t.supports_uart_rx=!0;return;default:{const n=e;throw new Error(`Unhandled pin capability: ${n}`)}}},i7o=(t,e)=>{switch(e){case"i2c_sda":t.is_configured_for_i2c_sda=!0;return;case"i2c_scl":t.is_configured_for_i2c_scl=!0;return;case"spi_cs":t.is_configured_for_spi_cs=!0;return;case"spi_sck":t.is_configured_for_spi_sck=!0;return;case"spi_mosi":t.is_configured_for_spi_mosi=!0;return;case"spi_miso":t.is_configured_for_spi_miso=!0;return;case"uart_tx":t.is_configured_for_uart_tx=!0;return;case"uart_rx":t.is_configured_for_uart_rx=!0;return;default:{const n=e;throw new Error(`Unhandled configured pin capability: ${n}`)}}},r7o=(t,e)=>{for(const o of e.capabilities??[])o7o(t,o);const n=new Set([...e.activeCapabilities??[],...e.activeCapability?[e.activeCapability]:[]]);for(const o of n)i7o(t,o);e.mustBeConnected!==void 0&&(t.must_be_connected=e.mustBeConnected),e.providesPower!==void 0&&(t.provides_power=e.providesPower),e.requiresPower!==void 0&&(t.requires_power=e.requiresPower),e.providesGround!==void 0&&(t.provides_ground=e.providesGround),e.requiresGround!==void 0&&(t.requires_ground=e.requiresGround),e.providesVoltage!==void 0&&(t.provides_voltage=e.providesVoltage),e.requiresVoltage!==void 0&&(t.requires_voltage=e.requiresVoltage),e.doNotConnect!==void 0&&(t.do_not_connect=e.doNotConnect),e.includeInBoardPinout!==void 0&&(t.include_in_board_pinout=e.includeInBoardPinout),e.canUseInternalPullup!==void 0&&(t.can_use_internal_pullup=e.canUseInternalPullup),e.isUsingInternalPullup!==void 0&&(t.is_using_internal_pullup=e.isUsingInternalPullup),e.needsExternalPullup!==void 0&&(t.needs_external_pullup=e.needsExternalPullup),e.canUseInternalPulldown!==void 0&&(t.can_use_internal_pulldown=e.canUseInternalPulldown),e.isUsingInternalPulldown!==void 0&&(t.is_using_internal_pulldown=e.isUsingInternalPulldown),e.needsExternalPulldown!==void 0&&(t.needs_external_pulldown=e.needsExternalPulldown),e.canUseOpenDrain!==void 0&&(t.can_use_open_drain=e.canUseOpenDrain),e.isUsingOpenDrain!==void 0&&(t.is_using_open_drain=e.isUsingOpenDrain),e.canUsePushPull!==void 0&&(t.can_use_push_pull=e.canUsePushPull),e.isUsingPushPull!==void 0&&(t.is_using_push_pull=e.isUsingPushPull),e.shouldHaveDecouplingCapacitor!==void 0&&(t.should_have_decoupling_capacitor=e.shouldHaveDecouplingCapacitor),e.recommendedDecouplingCapacitorCapacitance!==void 0&&(t.recommended_decoupling_capacitor_capacitance=e.recommendedDecouplingCapacitorCapacitance)},s7o=t=>t?typeof t=="string"?[t]:[...t]:[];function a7o(t){if(!t.isGroupPort())return;const e=t._parsedProps.connectsTo;if(!e)return;const n=t.parent;if(!n)return;const o=n._parsedProps?.connections;if(Object.keys(o??{}).some(A=>t.isMatchingAnyOf([A])))return;const r=n.name,s=t.name;if(!r||!s)return;const a=`.${r} > .${s}`;for(const A of s7o(e))n.children.some(l=>{if(!(l instanceof t1))return!1;const u=l._parsedProps;return!("from"in u)||!("to"in u)?!1:u.from===a&&u.to===A||u.from===A&&u.to===a})||n.add(new t1({from:a,to:A}))}function A7o(t){for(const e of t._getMatchingPinAttributes())if(e.requiresGround===!0||e.providesGround===!0)return!0;for(const e of t.getNameAndAliases())if(Q0e.test(e))return!0;return!1}function c7o(t){return t._parsedProps.isGroundNet??Q0e.test(t._parsedProps.name)}function l7o(t){for(const e of t._getDirectlyConnectedTraces()){const n=e._findConnectedPorts().ports??[];for(const o of n)if(o!==t&&A7o(o))return!0;for(const o of e._findConnectedNets().nets)if(o&&c7o(o))return!0}return!1}function u7o(t){if(t.getParentNormalComponent()?.config.componentName!=="Chip")return!1;let e,n,o;for(const i of t._getMatchingPinAttributes())i.shouldHaveDecouplingCapacitor!==void 0&&(e=i.shouldHaveDecouplingCapacitor),i.requiresPower!==void 0&&(n=i.requiresPower),i.providesPower!==void 0&&(o=i.providesPower);if(e!==void 0)return e;if(n!==void 0)return n;if(o===!0)return!1;for(const i of t.getNameAndAliases())if(Hwe.test(i))return!0;return!1}function g7o(t){for(const e of t._getDirectlyConnectedTraces()){const n=e._findConnectedPorts().ports??[];for(const o of n)if(o!==t&&u7o(o))return!0}return!1}function Kwe(t){if(t.root?.pcbDisabled)return!1;if(t.pcb_port_id)return!0;const{db:e}=t.root,n=t.matchedComponents.filter(A=>A.isPcbPrimitive),o=n.length===1?n[0]._getPcbCircuitJsonBounds().center:n.length>1&&w0e(n)?Uwe(n):null;if(o){const A=e.pcb_port.insert({pcb_component_id:void 0,layers:t.getAvailablePcbLayers(),subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,...o,source_port_id:t.source_port_id,is_board_pinout:t.parent?.componentName==="Board"});return t.pcb_port_id=A.pcb_port_id,!0}const i=t._getConnectedPortsFromConnectsTo()[0];if(!i?.pcb_port_id)return!1;const r=e.pcb_port.get(i.pcb_port_id);if(!r)return!1;const s=t.getSubcircuit(),a=e.pcb_port.insert({pcb_component_id:void 0,layers:i.getAvailablePcbLayers(),subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,x:r.x,y:r.y,source_port_id:t.source_port_id,is_board_pinout:!1});return t.pcb_port_id=a.pcb_port_id,!0}var CMt=(t,e)=>t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"}),yMt=(t,e)=>{const n=e.source_component_id?t.source_component.get(e.source_component_id):void 0,o=n?void 0:t.source_group.list().find(i=>i.subcircuit_id===e.subcircuit_id);return n?.name??o?.name},xMt=(t,e)=>{const n=t.source_port.get(e);if(!n?.name)return;const o=yMt(t,n);if(o)return`${o}_${n.name}`},Vwe=(t,e)=>{const n=e.map(r=>t.source_port.get(r)).filter(r=>!!r);if(n.length===0)return;const o=new Map;for(const r of t.source_port.list())r.source_component_id&&o.set(r.source_component_id,(o.get(r.source_component_id)??0)+1);const i=n.map(r=>{const s=yMt(t,r);return!s||!r.name?null:{sourcePort:r,ownerName:s,label:`${s}_${r.name}`,ownerPinCount:r.source_component_id?o.get(r.source_component_id)??0:0}}).filter(r=>!!r);return i.sort((r,s)=>{const a=s.ownerPinCount-r.ownerPinCount;if(a!==0)return a;const A=CMt(r.ownerName,s.ownerName);if(A!==0)return A;const c=r.sourcePort.pin_number??Number.POSITIVE_INFINITY,l=s.sourcePort.pin_number??Number.POSITIVE_INFINITY,u=c-l;return u!==0?u:CMt(r.sourcePort.name,s.sourcePort.name)}),i[0]?.label},d7o=.12,Pu=class extends Ir{source_port_id=null;pcb_port_id=null;schematic_port_id=null;schematic_stem_line_id=null;shouldCreateSourcePort;schematicSymbolPortDef=null;matchedComponents;_isPrimaryPort=!0;_primaryPinNumber=null;facingDirection=null;originDescription=null;get config(){return{componentName:"Port",zodProps:xDn}}constructor(t,e={}){if(!t.name&&t.pinNumber!==void 0&&(t.name=`pin${t.pinNumber}`),!t.name)throw new Error("Port must have a name or a pinNumber");super(t),e.originDescription&&(this.originDescription=e.originDescription),this.shouldCreateSourcePort=e.shouldCreateSourcePort??!0,this.matchedComponents=[]}isGroupPort(){return this.parent?.isGroup===!0}isComponentPort(){return!this.isGroupPort()}_getConnectedPortsFromConnectsTo(){const{_parsedProps:t}=this,e=t.connectsTo;if(!e)return[];const n=[],o=Array.isArray(e)?e:[e];for(const i of o){const r=this.getSubcircuit().selectOne(i,{type:"port"});r&&n.push(r)}return n}_isBoardPinoutFromAttributes(){const t=this.parent;if(t?._parsedProps?.pinAttributes){const e=t._parsedProps.pinAttributes;for(const n of this.getNameAndAliases())if(e[n]?.includeInBoardPinout)return!0}}_getGlobalPcbPositionBeforeLayout(){if(this.pcb_port_id){const n=this.root?.db.pcb_port.get(this.pcb_port_id);if(n?.pcb_component_id)return{x:n.x,y:n.y}}const t=this.matchedComponents.find(n=>n.isPcbPrimitive),e=this.parent;if(e&&!e.props.footprint)throw new Error(`${e.componentName} "${e.props.name}" does not have a footprint. Add a footprint prop, e.g. <${e.componentName.toLowerCase()} footprint="..." />`);if(!t)throw new Error(`Port ${this} has no matching PCB primitives. This often means the footprint's pads lack matching port hints.`);return t?._getGlobalPcbPositionBeforeLayout()??{x:0,y:0}}_getPcbCircuitJsonBounds(){if(!this.pcb_port_id)return super._getPcbCircuitJsonBounds();const{db:t}=this.root,e=t.pcb_port.get(this.pcb_port_id);return{center:{x:e.x,y:e.y},bounds:{left:0,top:0,right:0,bottom:0},width:0,height:0}}_getGlobalPcbPositionAfterLayout(){return this._getPcbCircuitJsonBounds().center}_getPortsInternallyConnectedToThisPort(){const t=this.parent;if(!t||!t._getInternallyConnectedPins)return[];const e=t._getInternallyConnectedPins();for(const n of e)if(n.some(o=>o===this))return n;return[]}_hasSchematicPort(){const t=this.getParentNormalComponent();if(t?._parsedProps?.noSchematicRepresentation===!0)return!1;const{schX:e,schY:n}=this._parsedProps;if(e!==void 0&&n!==void 0)return!0;if(t?.getSchematicSymbol())return!!(this.schematicSymbolPortDef||this._getPortsInternallyConnectedToThisPort().some(s=>s.schematicSymbolPortDef));const i=t?._getSchematicBoxDimensions();return!!(i&&this._parsedProps.pinNumber!==void 0&&i.getPortPositionByPinNumber(this._parsedProps.pinNumber))}_getGlobalSchematicPositionBeforeLayout(){const{schX:t,schY:e}=this._parsedProps;if(t!==void 0&&e!==void 0)return this._getSymbolAncestor()?ts(this.computeSchematicGlobalTransform(),{x:0,y:0}):{x:t,y:e};const n=this.getParentNormalComponent(),o=n?.getSchematicSymbol();if(o){let r=this.schematicSymbolPortDef;if(!r&&(r=this._getPortsInternallyConnectedToThisPort().find(a=>a.schematicSymbolPortDef)?.schematicSymbolPortDef??null,!r))throw new Error(`Couldn't find schematicSymbolPortDef for port ${this.getString()}, searched internally connected ports and none had a schematicSymbolPortDef. Why are we trying to get the schematic position of this port?`);const s=D0(n.computeSchematicGlobalTransform(),M0(-o.center.x,-o.center.y));return ts(s,r)}const i=n?._getSchematicBoxDimensions();if(i&&this._parsedProps.pinNumber!==void 0){const r=i.getPortPositionByPinNumber(this._parsedProps.pinNumber);if(!r)throw new Error(`Couldn't find position for schematic_port for port ${this.getString()} inside of the schematic box`);return ts(n.computeSchematicGlobalTransform(),r)}throw new Error(`Couldn't find position for schematic_port for port ${this.getString()}`)}_getGlobalSchematicPositionAfterLayout(){const{db:t}=this.root;if(!this.schematic_port_id)throw new Error(`Can't get schematic port position after layout for "${this.getString()}", no schematic_port_id`);const e=t.schematic_port.get(this.schematic_port_id);if(!e)throw new Error(`Schematic port not found when trying to get post-layout position: ${this.schematic_port_id}`);return e.center}registerMatch(t){this.matchedComponents.push(t)}getNameAndAliases(){const{_parsedProps:t}=this;return Array.from(new Set([...t.name?[t.name]:[],...t.aliases??[],...typeof t.pinNumber=="number"?[`pin${t.pinNumber}`,t.pinNumber.toString()]:[],...this.externallyAddedAliases??[]]))}_getMatchingPinAttributes(){const e=(this.getParentNormalComponent()??this.parent)?._parsedProps,n=e?.pinAttributes,o=e?.noConnect,i=[];for(const r of this.getNameAndAliases()){if(n){const s=n[r];s&&i.push(s)}o?.includes(r)&&i.push({doNotConnect:!0})}return i.length===0?[]:i}_shouldIncludeInBoardPinout(){return this._getMatchingPinAttributes().some(t=>t.includeInBoardPinout===!0)}isMatchingPort(t){return this.isMatchingAnyOf(t.getNameAndAliases())}getPortSelector(){return`.${(this.getParentNormalComponent()??this.parent)?.props.name} > port.${this.props.name}`}getAvailablePcbLayers(){const{layer:t,layers:e}=this._parsedProps;if(e)return e;if(t)return[t];if(this.pcb_port_id){const n=this.root?.db.pcb_port.get(this.pcb_port_id);if(n?.pcb_component_id)return n.layers}return Array.from(new Set(this.matchedComponents.flatMap(n=>n.getAvailablePcbLayers())))}_getDirectlyConnectedTraces(){const t=this.getSubcircuit().selectAll("trace"),e=[];for(const n of t)if(!n._couldNotFindPort)try{n._isExplicitlyConnectedToPort(this)&&e.push(n)}catch(o){if(o instanceof jN)continue;throw o}return e}isConnectedToPower(){return g7o(this)}isConnectedToGround(){return l7o(this)}doInitialCreateTracesFromProps(){a7o(this)}doInitialSourceRender(){if(!this.shouldCreateSourcePort)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getNameAndAliases(),o=this.getParentNormalComponent(),r=(this.parent?.source_component_id?this.parent:o)?.source_component_id??null,s=this._getMatchingPinAttributes(),a={};for(const c of s)r7o(a,c);const A=t.source_port.insert({name:e.name,pin_number:e.pinNumber,port_hints:n,source_component_id:r,subcircuit_id:this.getSubcircuit()?.subcircuit_id,...a});this.source_port_id=A.source_port_id}doInitialSourceParentAttachment(){if(!this.shouldCreateSourcePort)return;const{db:t}=this.root,e=this.getParentNormalComponent(),n=this.parent?.source_component_id?this.parent:e;if(this.isGroupPort()){t.source_port.update(this.source_port_id,{source_component_id:null,subcircuit_id:this.getSubcircuit()?.subcircuit_id});return}if(!n?.source_component_id)throw new Error(`${this.getString()} has no parent source component (parent: ${this.parent?.getString()})`);t.source_port.update(this.source_port_id,{source_component_id:n.source_component_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id}),this.source_component_id=n.source_component_id}doInitialPcbPortRender(){if(this.root?.pcbDisabled||this.getPrimitiveContainer()?.isSchematicPrimitive)return;const{db:t}=this.root,{matchedComponents:e}=this;if(this.isGroupPort()){Kwe(this);return}const n=this.getParentNormalComponent(),o=this.parent?.pcb_component_id?this.parent:n;if(!o?.pcb_component_id)throw new Error(`${this.getString()} has no parent pcb component, cannot render pcb_port (parent: ${this.parent?.getString()}, parentNormalComponent: ${n?.getString()})`);const i=e.filter(s=>s.isPcbPrimitive);if(i.length===0)return;let r=null;if(i.length===1&&(r=i[0]._getPcbCircuitJsonBounds().center),i.length>1){if(!w0e(i)){const s=this.props.name,a=this.getParentNormalComponent()?.props.name??"unknown",A=this.getNameAndAliases().filter(l=>l!==s),c=A.length>0?` (consider using alternate aliases: ${A.join(", ")})`:"";t.source_ambiguous_port_reference.insert({error_type:"source_ambiguous_port_reference",message:`${a}.${s} is ambiguous: ${a}.${s} references multiple non-overlapping pads: ${i.map(l=>l.getString()).join(", ")}${c}`,source_port_id:this.source_port_id??void 0,source_component_id:this.getParentNormalComponent()?.source_component_id??void 0});return}r=Uwe(i)}if(r){const s=this.getSubcircuit(),a=this._shouldIncludeInBoardPinout(),A=t.pcb_port.insert({pcb_component_id:o.pcb_component_id,layers:this.getAvailablePcbLayers(),subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,...a?{is_board_pinout:!0}:{},...r,source_port_id:this.source_port_id,is_board_pinout:this._isBoardPinoutFromAttributes()});this.pcb_port_id=A.pcb_port_id}else{const s=i[0];throw new Error(`${s.getString()} does not have a center or _getGlobalPcbPositionBeforeLayout method (needed for pcb_port placement)`)}}updatePcbPortRender(){if(this.root?.pcbDisabled||this.getPrimitiveContainer()?.isSchematicPrimitive)return;const{db:t}=this.root;if(this.pcb_port_id)return;if(this.isGroupPort()){Kwe(this);return}const e=this.matchedComponents.filter(A=>A.isPcbPrimitive);if(e.length===0)return;let n=null;if(e.length===1&&(n=e[0]._getPcbCircuitJsonBounds().center),e.length>1)try{w0e(e)&&(n=Uwe(e))}catch{}if(!n)return;const o=this.getParentNormalComponent(),i=this.parent?.pcb_component_id?this.parent:o,r=this.getSubcircuit(),s=this._shouldIncludeInBoardPinout(),a=t.pcb_port.insert({pcb_component_id:i?.pcb_component_id,layers:this.getAvailablePcbLayers(),subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,...s?{is_board_pinout:!0}:{},...n,source_port_id:this.source_port_id,is_board_pinout:this._isBoardPinoutFromAttributes()});this.pcb_port_id=a.pcb_port_id}doInitialPcbPortAttachment(){if(!this.pcb_port_id&&this.source_port_id){const t=this.root?.db.pcb_port.list({source_port_id:this.source_port_id}).find(e=>!!e.pcb_component_id);if(t){this.pcb_port_id=t.pcb_port_id;return}}!this.isGroupPort()||this.pcb_port_id||Kwe(this)}_getBestDisplayPinLabel(){const{db:t}=this.root,e=t.source_port.get(this.source_port_id),n=[];for(const r of e?.port_hints??[])r.match(/^(pin)?\d+$/)||r.match(/^(left|right)/)&&!e?.name.match(/^(left|right)/)||n.push(r);if(this.getParentNormalComponent()?.props?.showPinAliases&&n.length>0)return n.join("/");if(n.length>0)return n[0]}doInitialSchematicPortRender(){if(this.root?.schematicDisabled)return;const t=this.getCollapsedSchematicBoxAncestor();if(t&&this.parent!==t)return;const{db:e}=this.root,{_parsedProps:n}=this,{schX:o,schY:i}=n,r=o!==void 0&&i!==void 0?this.getParentNormalComponent():this.getPrimitiveContainer();if(!r||!this._hasSchematicPort())return;const s=r._getGlobalSchematicPositionBeforeLayout(),a=this._getGlobalSchematicPositionBeforeLayout();let A=null;const c=r._getSchematicBoxDimensions();c&&n.pinNumber!==void 0&&(A=c.getPortPositionByPinNumber(n.pinNumber)),this.getSubcircuit().props._schDebugObjectsEnabled&&e.schematic_debug_object.insert({shape:"rect",center:a,size:{width:.1,height:.1},label:"obstacle"});const l=o!==void 0&&i!==void 0&&!!this._getSymbolAncestor();l&&n.direction?this.facingDirection=n.direction:A?.side?this.facingDirection={left:"left",right:"right",top:"up",bottom:"down"}[A.side]:this.facingDirection=IMt(s,a);const u=this._getBestDisplayPinLabel(),g=this.getParentNormalComponent(),h=n.direction==="up"?"top":n.direction==="down"?"bottom":n.direction,p=(l&&n.direction?h:void 0)??A?.side??h,m=n.schPinLabelFontSize==="sm"?d7o:n.schPinLabelFontSize==="default"?void 0:n.schPinLabelFontSize,_={type:"schematic_port",schematic_component_id:g?.schematic_component_id,center:a,source_port_id:this.source_port_id,facing_direction:this.facingDirection,distance_from_component_edge:n.schStemLength??.4,side_of_component:p,pin_number:n.pinNumber,true_ccw_index:A?.trueIndex,display_pin_label:u,display_pin_label_font_size:m,is_connected:!1,schematic_sheet_id:this._resolveSchematicSheetId()};for(const I of this._getMatchingPinAttributes())I.requiresPower&&(_.has_input_arrow=!0),I.providesPower&&(_.has_output_arrow=!0);const f=e.schematic_port.insert(_);if(this.schematic_port_id=f.schematic_port_id,n.schStemLength!==void 0&&n.schStemLength!==0){const{schStemLength:I,direction:C}=n;let y=a.x,x=a.y;C==="right"?y-=I:C==="left"?y+=I:C==="up"?x-=I:C==="down"&&(x+=I);const E=e.schematic_line.insert({schematic_component_id:g?.schematic_component_id,x1:a.x,y1:a.y,x2:y,y2:x,stroke_width:.02,color:wb,is_dashed:!1,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_stem_line_id=E.schematic_line_id}}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_port_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_port.get(this.schematic_port_id);if(o){const i=ts(e,o.center);if(n.schematic_port.update(this.schematic_port_id,{center:i}),this.schematic_stem_line_id){const r=n.schematic_line.get(this.schematic_stem_line_id);if(r){const s=ts(e,{x:r.x1,y:r.y1}),a=ts(e,{x:r.x2,y:r.y2});n.schematic_line.update(this.schematic_stem_line_id,{x1:s.x,y1:s.y,x2:a.x,y2:a.y});const A=Math.sqrt((s.x-a.x)**2+(s.y-a.y)**2);n.schematic_port.update(this.schematic_port_id,{distance_from_component_edge:A})}}}}_getSubcircuitConnectivityKey(){return this.root?.db.source_port.get(this.source_port_id)?.subcircuit_connectivity_map_key}_setPositionFromLayout(t){const{db:e}=this.root;this.pcb_port_id&&e.pcb_port.update(this.pcb_port_id,{x:t.x,y:t.y})}_hasMatchedPcbPrimitive(){return!!(this.pcb_port_id?this.root?.db.pcb_port.get(this.pcb_port_id):null)?.pcb_component_id||this.matchedComponents.some(e=>e.isPcbPrimitive)}_getNetLabelText(){if(!(!this.root||!this.source_port_id))return xMt(this.root.db,this.source_port_id)}};function P0e(t){try{const e=t._getGlobalPcbPositionBeforeLayout(),n=t.getPcbSize();return{left:e.x-n.width/2,right:e.x+n.width/2,top:e.y+n.height/2,bottom:e.y-n.height/2}}catch{return null}}function EMt(t,e){const n=P0e(t),o=P0e(e);return!n||!o?!1:!(n.right<o.left||n.left>o.right||n.bottom>o.top||n.top<o.bottom)}function h7o(t,e){const n=P0e(t),o=P0e(e);return!n||!o?!1:n.left>=o.left&&n.right<=o.right&&n.bottom>=o.bottom&&n.top<=o.top}function p7o(t){const e=[],n=new Set;for(const o of t){if(n.has(o))continue;const i=[],r=[o];for(n.add(o);r.length>0;){const s=r.pop();i.push(s);for(const a of t)n.has(a)||EMt(s,a)&&(n.add(a),r.push(a))}e.push(i)}return e}var BMt=class extends Ir{pcb_via_id=null;matchedPort=null;isPcbPrimitive=!0;source_manually_placed_via_id=null;source_trace_id=null;subcircuit_connectivity_map_key=null;constructor(t){super(t);const e=this._getLayers();this._parsedProps.layers=e,this.initPorts()}get config(){return{componentName:"Via",zodProps:_lt}}getAvailablePcbLayers(){return this._getLayers()}_getResolvedViaDiameters(t){return t7o({holeDiameter:this._parsedProps.holeDiameter,padDiameter:this._parsedProps.outerDiameter},t)}getPcbSize(){const t=this.getInheritedMergedProperty("pcbStyle"),{padDiameter:e}=this._getResolvedViaDiameters(t);return{width:e,height:e}}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_via.get(this.pcb_via_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y-n.height/2,right:e.x+n.width/2,bottom:e.y+n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_via.update(this.pcb_via_id,{x:t.x,y:t.y})}_getLayers(){const{fromLayer:t="top",toLayer:e="bottom"}=this._parsedProps,n=this.parent?this.getSubcircuit()._getSubcircuitLayerCount():2;return lw({fromLayer:t,toLayer:e,layerCount:n})}initPorts(){const t=this._parsedProps.layers;for(const n of t){const o=new Pu({name:n,layer:n});o.registerMatch(this),this.add(o)}const e=new Pu({name:"pin1"});e.registerMatch(this),this.add(e)}_getConnectedNetOrTrace(){const t=this._parsedProps.connectsTo;if(!t)return this._getPortFromContainingPad()?._getDirectlyConnectedTraces()[0]??null;const e=this.getSubcircuit(),n=Array.isArray(t)?t:[t];for(const o of n)if(o.startsWith("net.")){const i=e.selectOne(o,{type:"net"});if(i)return i}return null}doInitialCreateNetsFromProps(){const t=this._parsedProps.connectsTo;t&&Hj(this,Array.isArray(t)?t:[t])}_getPortFromContainingPad(){if(this.parent?.componentName!=="Footprint")return null;const t=new Set(this.parent.children.filter(e=>e.componentName==="SmtPad").filter(e=>h7o(this,e)).map(e=>e.matchedPort).filter(e=>e!==null));return t.size===1?[...t][0]:null}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,e=this.getInheritedMergedProperty("pcbStyle"),{padDiameter:n}=this._getResolvedViaDiameters(e),o=this._getGlobalPcbPositionBeforeLayout(),i=this.getSubcircuit(),r=t.pcb_component.insert({center:o,width:n,height:n,layer:this._parsedProps.fromLayer??"top",rotation:0,source_component_id:this.source_component_id,subcircuit_id:i?.subcircuit_id??void 0,obstructs_within_bounds:!0});this.pcb_component_id=r.pcb_component_id}doInitialSourceRender(){const{db:t}=this.root,e=this.getGroup(),n=this.getSubcircuit(),o=t.source_manually_placed_via.insert({source_group_id:e?.source_group_id,subcircuit_id:n?.subcircuit_id??void 0});this.source_manually_placed_via_id=o.source_manually_placed_via_id,this.source_component_id=o.source_manually_placed_via_id}doInitialSourceTraceRender(){const t=this._parsedProps.connectsTo;if(!t)return;const{db:e}=this.root,n=this.getSubcircuit(),o=Array.isArray(t)?t:[t],i=[],r=[];for(const s of o){if(s.startsWith("net.")){const A=n.selectOne(s,{type:"net"});if(!A?.source_net_id){this.renderError(`Could not find net for via selector "${s}"`);return}r.push(A);continue}const a=n.selectOne(s,{type:"port"})??this.getParentNormalComponent()?.children.find(A=>A instanceof Pu&&A.isMatchingAnyOf([s]))??null;if(!a?.source_port_id){this.renderError(`Could not find port for via selector "${s}"`);return}i.push(a)}if(i.length>0){const s=e.source_trace.insert({connected_source_port_ids:i.map(a=>a.source_port_id),connected_source_net_ids:r.map(a=>a.source_net_id),subcircuit_id:n.subcircuit_id??void 0,display_name:this._parsedProps.name?`${this._parsedProps.name} connectivity`:"Manually placed via connectivity"});this.source_trace_id=s.source_trace_id}e.source_manually_placed_via.update(this.source_manually_placed_via_id,{source_net_id:r[0]?.source_net_id,source_trace_id:this.source_trace_id??void 0})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,e=this.getInheritedMergedProperty("pcbStyle"),{holeDiameter:n,padDiameter:o}=this._getResolvedViaDiameters(e),i=this._getGlobalPcbPositionBeforeLayout(),r=this.getSubcircuit(),s=this._getConnectedNetOrTrace(),a=this.source_trace_id??(s instanceof Qb?void 0:s?.source_trace_id),A=!a&&s instanceof Qb?s.source_net_id:void 0,c=t.pcb_via.insert({x:i.x,y:i.y,hole_diameter:n,outer_diameter:o,layers:this._getLayers(),from_layer:this._parsedProps.fromLayer||"bottom",to_layer:this._parsedProps.toLayer||"top",subcircuit_id:r?.subcircuit_id??void 0,subcircuit_connectivity_map_key:this.subcircuit_connectivity_map_key??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,net_is_assignable:this._parsedProps.netIsAssignable??void 0,...a?{source_trace_id:a}:{},...A?{source_net_id:A}:{}});this.pcb_via_id=c.pcb_via_id}};function m7o(t){if(t.root?.schematicDisabled)return;const{db:e}=t.root,{_parsedProps:n,parent:o}=t;if(!o)throw new Error("Trace has no parent");const{allPortsFound:i,portsWithSelectors:r}=t._findConnectedPorts();if(!i)return;const s=r.map(({port:C})=>({port:C,position:C._getGlobalSchematicPositionAfterLayout(),schematic_port_id:C.schematic_port_id,facingDirection:C.facingDirection}));if(s.length<2)throw new Error("Expected at least two ports in portsWithPosition.");let a,A;const c=s[0].position,l=s[0].port;if("path"in t.props){if(t.props.path.length!==2)throw new Error("Invalid 'path': Must contain exactly two elements.");[a,A]=t.props.path}else{if(!("from"in t.props&&"to"in t.props))throw new Error("Missing 'from' or 'to' properties in props.");a=t.props.from,A=t.props.to}if(!l.source_port_id)throw new Error(`Missing source_port_id for the 'from' port (${a}).`);const u=s[1].position,g=s[1].port;if(!g.source_port_id)throw new Error(`Missing source_port_id for the 'to' port (${A}).`);const h=e.schematic_net_label.list().find(C=>C.source_net_id===l.source_port_id),d=e.schematic_net_label.list().find(C=>C.source_net_id===g.source_port_id),[p,m]=r.map(({port:C})=>C),f=p.parent?.config.shouldRenderAsSchematicBox?`${p?.parent?.props.name}_${p?.props.name}`:`${m?.parent?.props.name}_${m?.props.name}`,I=t._getSchematicNetLabelText()??f;if(h&&h.text!==I&&(h.text=`${I} / ${h.text}`),d&&d?.text!==I&&(d.text=`${I} / ${d.text}`),!d){const C=gO(g.facingDirection)??"bottom";e.schematic_net_label.insert({text:I,source_net_id:g.source_port_id,anchor_position:u,center:j7({anchor_position:u,anchor_side:C,text:I}),anchor_side:C,schematic_sheet_id:t._resolveSchematicSheetId()})}if(!h){const C=gO(l.facingDirection)??"bottom";e.schematic_net_label.insert({text:I,source_net_id:l.source_port_id,anchor_position:c,center:j7({anchor_position:c,anchor_side:C,text:I}),anchor_side:C,schematic_sheet_id:t._resolveSchematicSheetId()})}}function _7o(t){const{_parsedProps:e,parent:n}=t;if(!n)throw new Error("Trace has no parent");const o=t.getTracePortPathSelectors(),i=s=>{if(s.lastIndexOf(".")>s.lastIndexOf(" "))return null;let A=t.getSubcircuit().selectOne(s);if(!A&&!/[.#\[]/.test(s)&&(A=t.getSubcircuit().selectOne(`.${s}`)),!A)return null;const c=A.children.filter(l=>l.componentName==="Port");return c.length===1?c[0]:null},r=o.map(s=>({selector:s,port:t.getSubcircuit().selectOne(s,{type:"port"})??i(s)}));for(const{selector:s,port:a}of r)if(!a){let A,c;const l=s.lastIndexOf(".");if(l!==-1&&l>s.lastIndexOf(" "))A=s.slice(0,l),c=s.slice(l+1);else{const y=s.match(/^(.*[ >])?([^ >]+)$/);A=y?.[1]?.trim()??"",c=y?.[2]??s}let u=A?t.getSubcircuit().selectOne(A):null;if(!u&&A&&!/[.#\[]/.test(A)&&(u=t.getSubcircuit().selectOne(`.${A}`)),!u){const y=A?`Could not find port for selector "${s}". Component "${A}" not found`:`Could not find port for selector "${s}"`,x=t.getSubcircuit(),E=x.getGroup();throw new jN({error_type:"source_trace_not_connected_error",message:y,subcircuit_id:x.subcircuit_id??void 0,source_group_id:E?.source_group_id??void 0,source_trace_id:t.source_trace_id??void 0,selectors_not_found:[s]})}const g=u.children.filter(y=>y.componentName==="Port"),h=c.includes(".")?c.split(".").pop()??"":c,d=g.flatMap(y=>y.getNameAndAliases()),p=d.some(y=>!/^(pin\d+|\d+)$/.test(y)),m=Array.from(new Set(d)).join(", ");let _;g.length===0?_="It has no ports":p?_=`It has [${m}]`:_=`It has ${g.length} pins and no pinLabels (consider adding pinLabels)`;const f=`Could not find port for selector "${s}". Component "${u.props.name??A}" found, but does not have pin "${h}". ${_}`,I=t.getSubcircuit(),C=I.getGroup();throw new jN({error_type:"source_trace_not_connected_error",message:f,subcircuit_id:I.subcircuit_id??void 0,source_group_id:C?.source_group_id??void 0,source_trace_id:t.source_trace_id??void 0,selectors_not_found:[s]})}return r.some(s=>!s.port)?{allPortsFound:!1}:{allPortsFound:!0,portsWithSelectors:r,ports:r.map(({port:s})=>s)}}function zwe(t){let e=0;for(let n=0;n<t.length;n++){const o=t[n];if(o.route_type==="wire"){const i=t[n+1];if(i){const r=W7(i),s=W7(o),a=r.x-s.x,A=r.y-s.y;e+=Math.sqrt(a*a+A*A)}}else o.route_type==="via"&&(e+=1.6)}return e}function bMt(t){const{lineStart:e,lineEnd:n,rectCenter:o,rectWidth:i,rectHeight:r}=t,s=o.x-i/2,a=o.x+i/2,A=o.y+r/2,c=o.y-r/2,l=n.x-e.x,u=n.y-e.y,g=[];if(l!==0){const h=(s-e.x)/l;if(h>=0&&h<=1){const d=e.y+h*u;d>=c&&d<=A&&g.push({x:s,y:d,t:h})}}if(l!==0){const h=(a-e.x)/l;if(h>=0&&h<=1){const d=e.y+h*u;d>=c&&d<=A&&g.push({x:a,y:d,t:h})}}if(u!==0){const h=(c-e.y)/u;if(h>=0&&h<=1){const d=e.x+h*l;d>=s&&d<=a&&g.push({x:d,y:c,t:h})}}if(u!==0){const h=(A-e.y)/u;if(h>=0&&h<=1){const d=e.x+h*l;d>=s&&d<=a&&g.push({x:d,y:A,t:h})}}return g.length===0?null:(g.sort((h,d)=>h.t-d.t),{x:g[0].x,y:g[0].y})}function SMt(t){const{lineStart:e,lineEnd:n,circleCenter:o,circleRadius:i}=t,r=e.x-o.x,s=e.y-o.y,a=n.x-o.x,A=n.y-o.y,c=a-r,l=A-s,u=c*c+l*l,g=2*(r*c+s*l),h=r*r+s*s-i*i,d=g*g-4*u*h;if(d<0)return null;const p=Math.sqrt(d),m=(-g-p)/(2*u),_=(-g+p)/(2*u);let f=null;return m>=0&&m<=1?f=m:_>=0&&_<=1&&(f=_),f===null?null:{x:e.x+f*c,y:e.y+f*l}}function QMt(t){const{traceStart:e,traceEnd:n,traceWidth:o,port:i}=t,r=i.matchedComponents.find(g=>g.isPcbPrimitive);if(!r)return n;const s=r._getPcbCircuitJsonBounds(),a=s.width,A=s.height,c=s.center,l=Math.min(a,A);if(o<=l/2)return n;let u=null;if(r.componentName==="SmtPad"){const g=r,h=g._parsedProps.shape;if(h==="circle"){const d=g._parsedProps.radius;u=SMt({lineStart:e,lineEnd:n,circleCenter:c,circleRadius:d})}else(h==="rect"||h==="rotated_rect"||h==="pill"||h==="polygon")&&(u=bMt({lineStart:e,lineEnd:n,rectCenter:c,rectWidth:a,rectHeight:A}))}else if(r.componentName==="PlatedHole"){const g=r;if(g._parsedProps.shape==="circle"){const d=g._parsedProps.outerDiameter;u=SMt({lineStart:e,lineEnd:n,circleCenter:c,circleRadius:d/2})}else u=bMt({lineStart:e,lineEnd:n,rectCenter:c,rectWidth:a,rectHeight:A})}return u??n}function vMt(t){const n=(t._parsedProps?.portHints??[]).filter(Boolean);return n.length>0?`<${t.lowercaseComponentName}(${n.map(o=>`.${o}`).join(", ")}) />`:`<${t.lowercaseComponentName} />`}function Jwe(t,e){const n=e.matchedComponents.filter(a=>a.isPcbPrimitive),o=e.getParentNormalComponent()?.props.name??e.parent?.props.name??"unknown",i=e.getParentNormalComponent(),r=t.trim().split(/\s+|>/).filter(Boolean).at(-1)?.replace(/^port\./,"").replace(/^\./,"");if(r&&!/^(pin)?\d+$/.test(r)){const a=(i?.children??[]).filter(A=>A.componentName==="Port"&&A.isMatchingAnyOf([r]));if(a.length>1&&!(i?._getInternallyConnectedPins?.()??[]).some(l=>a.every(u=>l.includes(u)))){const l=Array.from(new Set(a.flatMap(h=>h.getNameAndAliases().filter(d=>/^pin\d+$/.test(d)).map(d=>`${o}.${d}`)))),u=l.length>0?` Use a raw pin selector like ${l.map(h=>`"${h}"`).join(" or ")}.`:"",g=a.flatMap(h=>h.matchedComponents.filter(d=>d.isPcbPrimitive));return`Trace selector "${t}" resolved to "${o}.${e.props.name}", but alias "${r}" matches multiple PCB pads: ${g.map(h=>vMt(h)).join(", ")}.${u}`}}if(e.pcb_port_id)return null;const s=Array.from(new Set(e.getNameAndAliases().filter(a=>/^pin\d+$/.test(a)).map(a=>`${o}.${a}`)));if(n.length>1&&!w0e(n)){const a=s.length>0?` Use a raw pin selector like ${s.map(A=>`"${A}"`).join(" or ")}.`:"";return`Trace selector "${t}" resolved to "${o}.${e.props.name}", but that target maps to multiple non-overlapping PCB pads: ${n.map(A=>vMt(A)).join(", ")}.${a}`}return null}var EB={min_trace_width:.1,min_via_hole_edge_to_via_hole_edge_clearance:.1,min_plated_hole_drill_edge_to_drill_edge_clearance:.15,min_trace_to_pad_edge_clearance:.1,min_pad_edge_to_pad_edge_clearance:.1,min_board_edge_clearance:.2,min_via_hole_diameter:.2,min_via_pad_diameter:.3},f7o=(t,e)=>{if(e.route_type==="via")return t?.find(n=>Math.abs(n.x-e.x)<1e-4&&Math.abs(n.y-e.y)<1e-4&&(!n.from_layer||n.from_layer===e.from_layer)&&(!n.to_layer||n.to_layer===e.to_layer))},I7o=t=>{const e=t;return{holeDiameter:e.hole_diameter??e.via_hole_diameter,outerDiameter:e.outer_diameter??e.via_diameter}};function C7o(t){if(t.root?.pcbDisabled)return;const{db:e}=t.root,{_parsedProps:n}=t,o=t.getSubcircuit(),i=n.pcbPath!==void 0,r=!!n.pcbStraightLine,s=t._inflatedPcbTraces??[];if(!i&&!r&&s.length===0)return;let a,A,c;try{const M=t._findConnectedPorts();a=M.allPortsFound,A=M.ports??[],c=M.portsWithSelectors??[]}catch(M){if(M instanceof jN){e.source_trace_not_connected_error.insert({...M.errorData,error_type:"source_trace_not_connected_error"}),t._couldNotFindPort=!0;return}throw M}if(!a)return;const l=c.map(({selector:M,port:k})=>Jwe(M,k)).find(Boolean);if(l){e.pcb_trace_error.insert({error_type:"pcb_trace_error",source_trace_id:t.source_trace_id,message:l,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:A.map(M=>M.pcb_port_id).filter(Boolean)});return}const u=[];for(const M of A)M._hasMatchedPcbPrimitive()||u.push(M);if(u.length>0){e.pcb_trace_error.insert({error_type:"pcb_trace_error",source_trace_id:t.source_trace_id,message:`Some ports did not have a matching PCB primitive (e.g. a pad or plated hole), this can happen if a footprint is missing. As a result, ${t} wasn't routed. Missing ports: ${u.map(M=>M.getString()).join(", ")}`,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:u.map(M=>M.pcb_port_id).filter(Boolean)});return}const g=t._getExplicitTraceThickness()??t.getSubcircuit()._parsedProps.minTraceWidth??EB.min_trace_width;if(s.length>0){const{isFlipped:M,maybeFlipLayer:k}=t._getPcbPrimitiveFlippedHelpers(),R=t._computePcbGlobalTransformBeforeLayout(),F=[],O=t.subcircuit_connectivity_map_key??e.source_trace.get(t.source_trace_id)?.subcircuit_connectivity_map_key;for(const U of s){const Y=U.route.map(oe=>{if(oe.route_type==="wire"){const{x:ie,y:ne,...le}=oe,ge=ts(R,{x:ie,y:ne});return{...le,...ge,layer:k(oe.layer)}}if(oe.route_type==="via"){const{x:ie,y:ne,...le}=oe,ge=ts(R,{x:ie,y:ne});return{...le,...ge,from_layer:k(oe.from_layer),to_layer:k(oe.to_layer)}}return{...oe,start:ts(R,oe.start),end:ts(R,oe.end),start_layer:k(oe.start_layer),end_layer:k(oe.end_layer)}}),W=e.pcb_trace.insert({...U,route:Y,source_trace_id:t.source_trace_id,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0}),te=t.getInheritedMergedProperty("pcbStyle"),{holeDiameter:j,padDiameter:J}=$N(te);for(let oe=0;oe<Y.length;oe++){const ie=Y[oe];if(ie.route_type==="via"){const ne=U.route[oe],le=f7o(t._inflatedPcbVias,ne),ge=le?Sne.parse(le):void 0,_e=I7o(ie),ue=k(ge?.from_layer??ie.from_layer),fe=k(ge?.to_layer??ie.to_layer),pe=(ge?.layers??lw({fromLayer:ie.from_layer,toLayer:ie.to_layer,layerCount:o._getSubcircuitLayerCount()})).map(ye=>k(ye));e.pcb_via.insert({pcb_trace_id:W.pcb_trace_id,x:ie.x,y:ie.y,hole_diameter:ge?.hole_diameter??_e.holeDiameter??j,outer_diameter:ge?.outer_diameter??_e.outerDiameter??J,layers:pe,from_layer:ue,to_layer:fe,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_connectivity_map_key:ge?.subcircuit_connectivity_map_key??O,net_is_assignable:ge?.net_is_assignable,net_assigned:ge?.net_assigned,tented_on_top:M?ge?.tented_on_bottom:ge?.tented_on_top,tented_on_bottom:M?ge?.tented_on_top:ge?.tented_on_bottom})}}t.pcb_trace_id||(t.pcb_trace_id=W.pcb_trace_id),F.push(W.route)}for(const U of F)t._insertErrorIfTraceIsOutsideBoard(U,A);t._portsRoutedOnPcb=A;return}if(r&&!i){if(!A||A.length<2){t.renderError("pcbStraightLine requires exactly two connected ports");return}const[M,k]=A,R=M.getAvailablePcbLayers(),F=k.getAvailablePcbLayers(),U=R.find(ne=>F.includes(ne))??R[0]??F[0]??"top",Y=M._getGlobalPcbPositionAfterLayout(),W=k._getGlobalPcbPositionAfterLayout(),te=QMt({traceStart:W,traceEnd:Y,traceWidth:g,port:M}),j=QMt({traceStart:Y,traceEnd:W,traceWidth:g,port:k}),J=[{route_type:"wire",x:te.x,y:te.y,width:g,layer:U,start_pcb_port_id:M.pcb_port_id},{route_type:"wire",x:j.x,y:j.y,width:g,layer:U,end_pcb_port_id:k.pcb_port_id}],oe=zwe(J),ie=e.pcb_trace.insert({route:J,source_trace_id:t.source_trace_id,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,trace_length:oe});t._portsRoutedOnPcb=A,t.pcb_trace_id=ie.pcb_trace_id,t._insertErrorIfTraceIsOutsideBoard(J,A);return}if(!n.pcbPath)return;let h;n.pcbPathRelativeTo&&(h=c.find(M=>M.selector===n.pcbPathRelativeTo)?.port,h||(h=t.getSubcircuit().selectOne(n.pcbPathRelativeTo))),h||(h=A[0]);const d=A.find(M=>M!==h)??A[1];let m=h.getAvailablePcbLayers()[0]||"top";const _=h._getGlobalPcbPositionAfterLayout(),f=d?._getGlobalPcbPositionAfterLayout(),I=[];I.push({route_type:"wire",x:_.x,y:_.y,width:g,layer:m,start_pcb_port_id:h.pcb_port_id});const C=o._isInflatedFromCircuitJson?t._computePcbGlobalTransformBeforeLayout():h?._computePcbGlobalTransformBeforeLayout?.()||hC(),y=n.pcbPath;for(const M of y){let k,R=!1;const F=typeof M!="string"&&M.via;let O,U;if(typeof M=="string"){const W=t.getSubcircuit().selectOne(M,{type:"port"});if(!W){e.pcb_trace_error.insert({error_type:"pcb_trace_error",source_trace_id:t.source_trace_id,message:`Could not resolve pcbPath selector "${M}" for ${t}`,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:[]});continue}const te=Jwe(M,W);if(te){e.pcb_trace_error.insert({error_type:"pcb_trace_error",source_trace_id:t.source_trace_id,message:te,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:[]});return}const j=W._getGlobalPcbPositionAfterLayout();k={x:j.x,y:j.y},R=!0}else k={x:M.x,y:M.y},R=!1,M.via&&(O=M.fromLayer??m,U=M.toLayer);const Y=R?k:ts(C,k);F?(I.push({route_type:"via",x:Y.x,y:Y.y,from_layer:O??m,to_layer:U??m}),m=U??m):I.push({route_type:"wire",x:Y.x,y:Y.y,width:g,layer:m})}d&&f&&I.push({route_type:"wire",x:f.x,y:f.y,width:g,layer:m,end_pcb_port_id:d.pcb_port_id});const x=zwe(I),E=e.pcb_trace.insert({route:I,source_trace_id:t.source_trace_id,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,trace_length:x}),B=t.subcircuit_connectivity_map_key??e.source_trace.get(t.source_trace_id)?.subcircuit_connectivity_map_key,S=t.getInheritedMergedProperty("pcbStyle"),{holeDiameter:Q,padDiameter:w}=$N(S);for(const M of I)if(M.route_type==="via"){const k=M.from_layer,R=M.to_layer;e.pcb_via.insert({pcb_trace_id:E.pcb_trace_id,x:M.x,y:M.y,hole_diameter:Q,outer_diameter:w,layers:lw({fromLayer:k,toLayer:R,layerCount:o._getSubcircuitLayerCount()}),from_layer:k,to_layer:R,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_connectivity_map_key:B})}t._portsRoutedOnPcb=A,t.pcb_trace_id=E.pcb_trace_id,t._insertErrorIfTraceIsOutsideBoard(I,A)}var Wwe=t=>t.map(e=>{const{circuitJsonMetadata:n,...o}=e;if(o.route_type!=="via")return o;const{layers:i,...r}=o;return r}),jwe=({component:t,subcircuit:e})=>{t._pcbTraceRenderWaitingForPlacementChecks=!1;let n=t,o=0,i=null,r=!1;for(;n;){if("_pcbPlacementDrcErrorCount"in n){if("_pcbPlacementDrcChecksPending"in n&&n._pcbPlacementDrcChecksPending===!0){r=!0;break}if(typeof n._pcbPlacementDrcErrorCount=="number"){o=n._pcbPlacementDrcErrorCount;break}if("_pcbPlacementDrcCheckError"in n&&typeof n._pcbPlacementDrcCheckError=="string"){i=n._pcbPlacementDrcCheckError;break}}n=n.parent}if(r)return t._pcbTraceRenderWaitingForPlacementChecks=!0,!0;if(o===0&&!i)return!1;const{db:s}=t.root,a=`pcb_autorouting_skipped_placement_errors_${e.subcircuit_id}`;return s.pcb_autorouting_error.list().some(c=>c.pcb_error_id===a)||s.pcb_autorouting_error.insert({pcb_error_id:a,error_type:"pcb_autorouting_error",subcircuit_id:e.subcircuit_id??void 0,message:i?`Autorouting was skipped because PCB placement checks could not be completed: ${i}`:`Autorouting was skipped because ${o} PCB placement error${o===1?" was":"s were"} found. Fix the placement errors or set placementDrcChecksDisabled to true to route anyway.`}),!0},y7o=1e-6,x7o=t=>{let e=0;for(let n=0;n<t.length;n++){const o=t[n];for(let i=n+1;i<t.length;i++){const r=t[i];e=Math.max(e,Math.hypot(r.x-o.x,r.y-o.y))}}return e},E7o=(t,e)=>{let n=Number.POSITIVE_INFINITY;for(const o of t)for(const i of e)n=Math.min(n,Math.hypot(i.x-o.x,i.y-o.y));return n},B7o=({component:t,subcircuit:e})=>{const{db:n}=t.root,o=n.source_trace.list().filter(a=>a.subcircuit_id===e.subcircuit_id),i=new wQ({});i.addConnections(o.map(a=>[a.source_trace_id,...a.connected_source_port_ids,...a.connected_source_net_ids]));const r=new Map;for(const a of n.pcb_port.list())typeof a.source_port_id!="string"||typeof a.x!="number"||typeof a.y!="number"||r.set(a.source_port_id,{pcb_port_id:a.pcb_port_id,source_port_id:a.source_port_id,x:a.x,y:a.y});const s=[];for(const a of o){if(typeof a.max_length!="number")continue;const A=a.connected_source_port_ids.map(l=>r.get(l)).filter(l=>!!l);let c;if(A.length>=2)c=x7o(A);else{if(A.length!==1||a.connected_source_net_ids.length===0)continue;const l=i.getNetConnectedToId(a.source_trace_id);if(!l)continue;const g=i.getIdsConnectedToNet(l).filter(d=>!a.connected_source_port_ids.includes(d)&&r.has(d)).map(d=>r.get(d)).filter(d=>!!d);if(g.length===0||n.toArray().some(d=>(d.type==="source_pcb_ground_plane"||d.type==="pcb_ground_plane"||d.type==="pcb_copper_pour")&&typeof d.source_net_id=="string"&&i.areIdsConnected(a.source_trace_id,d.source_net_id)))continue;c=E7o(A,g)}c<=a.max_length+y7o||s.push({sourceTraceId:a.source_trace_id,traceDisplayName:a.display_name,straightLineDistance:c,maximumTraceLength:a.max_length})}return s},$we=({component:t,subcircuit:e})=>{const n=B7o({component:t,subcircuit:e});if(n.length===0)return!1;const{db:o}=t.root,i=`pcb_autorouting_skipped_trace_length_violations_${e.subcircuit_id}`;if(!o.pcb_autorouting_error.list().some(s=>s.pcb_error_id===i)){const s=n[0],a=s.traceDisplayName??s.sourceTraceId,A=n.length-1,c=A>0?` (${A} additional violation${A===1?"":"s"})`:"";o.pcb_autorouting_error.insert({pcb_error_id:i,error_type:"pcb_autorouting_error",subcircuit_id:e.subcircuit_id??void 0,message:`Autorouting was skipped because the ${s.maximumTraceLength}mm maximum length for ${a} cannot be satisfied: its endpoints are ${s.straightLineDistance.toFixed(2)}mm apart${c}.`})}return!0},M0e=t=>({...t._getGlobalPcbPositionAfterLayout(),layers:t.getAvailablePcbLayers()}),wMt=(t,e)=>{const n=W7(t);return Math.hypot(n.x-e.x,n.y-e.y)},b7o=(t,e)=>{if(t.length<2)return t;const n=t[0],o=t[t.length-1];return wMt(o,e)<wMt(n,e)?B0e(t):t};function S7o(t){if(t.root?.pcbDisabled)return;const{db:e}=t.root,{_parsedProps:n,parent:o}=t,i=t.getSubcircuit(),r=t._getBoard(),s=r?.pcb_board_id?e.pcb_board.get(r.pcb_board_id):void 0;if(!o)throw new Error("Trace has no parent");if(t.root?.pcbRoutingDisabled||i.getInheritedProperty("routingDisabled")||i._isInflatedFromCircuitJson)return;const a=i._parsedProps.pcbRouteCache?.pcbTraces;if(a){if(i._isLegacyAutorouterDisabled())return;const Y=e.pcb_trace.insert({route:a.flatMap(W=>W.route),source_trace_id:t.source_trace_id,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0});t.pcb_trace_id=Y.pcb_trace_id;return}if(n.pcbPath&&n.pcbPath.length>0||n.pcbStraightLine||!i._shouldUseTraceByTraceRouting())return;let A,c,l;try{const Y=t._findConnectedPorts();A=Y.allPortsFound,c=Y.ports??[],l=Y.portsWithSelectors??[]}catch(Y){if(Y instanceof jN){e.source_trace_not_connected_error.insert({...Y.errorData,error_type:"source_trace_not_connected_error"}),t._couldNotFindPort=!0;return}throw Y}if(!A)return;const u=l.map(({selector:Y,port:W})=>Jwe(Y,W)).find(Boolean);if(u){e.pcb_trace_error.insert({error_type:"pcb_trace_error",source_trace_id:t.source_trace_id,message:u,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:c.map(Y=>Y.pcb_port_id).filter(Boolean)});return}const g=[];for(const Y of c)Y._hasMatchedPcbPrimitive()||g.push(Y);if(g.length>0){e.pcb_trace_error.insert({error_type:"pcb_trace_error",source_trace_id:t.source_trace_id,message:`Some ports did not have a matching PCB primitive (e.g. a pad or plated hole), this can happen if a footprint is missing. As a result, ${t} wasn't routed. Missing ports: ${g.map(Y=>Y.getString()).join(", ")}`,pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:g.map(Y=>Y.pcb_port_id).filter(Boolean)});return}const h=jwe({component:t,subcircuit:i}),d=$we({component:t,subcircuit:i});if(h||d)return;const p=t._findConnectedNets().netsWithSelectors;if(c.length===0&&p.length===2){const[Y,W]=p.map(({net:ie})=>ie),te=Y.getAllConnectedPorts(),j=W.getAllConnectedPorts();if(te.length===0||j.length===0){console.log("Nothing to connect this net to, one of the nets is empty. TODO should emit a warning!");return}let J=[te[0],j[0]],oe=1/0;for(const ie of te){const ne=dMt(ie,j),le=ie._getGlobalPcbPositionBeforeLayout(),ge=ne._getGlobalPcbPositionBeforeLayout(),_e=Math.sqrt((le.x-ge.x)**2+(le.y-ge.y)**2);_e<oe&&(oe=_e,J=[ie,ne])}c.push(...J)}else if(c.length===1&&p.length===1){const Y=c[0],te=p[0].net.getAllConnectedPorts().filter(J=>J!==Y);if(te.length===0){console.log("Nothing to connect this port to, the net is empty. TODO should emit a warning!");return}const j=dMt(Y,te);c.push(j)}else if(c.length>1&&p.length>=1){t.renderError("Trace has more than one port and one or more nets, we don't currently support this type of complex trace routing");return}const m=c.flatMap(Y=>Y.matchedComponents.filter(W=>W.componentName==="TraceHint")),_=(t._parsedProps.pcbRouteHints??[]).concat(m.flatMap(Y=>Y.getPcbRouteHints()));if(c.length>2){t.renderError(`Trace has more than two ports (${c.map(Y=>Y.getString()).join(", ")}), routing between more than two ports for a single trace is not implemented`);return}if(t.getSubcircuit().selectAll("trace").filter(Y=>Y.renderPhaseStates.PcbTraceRender.initialized).some(Y=>Y._portsRoutedOnPcb.length===c.length&&Y._portsRoutedOnPcb.every(W=>c.includes(W))))return;let C=[];_.length===0?C=[M0e(c[0]),M0e(c[1])]:C=[M0e(c[0]),..._,M0e(c[1])];const y=b9o(C,{layerSelectionPreference:Owe(i._getSubcircuitLayerCount())}),x=Vf(t.root.db.toArray()),[E,B]=q9o(()=>_Mt(t.root.db.toArray()));if(B){t.renderError({type:"pcb_trace_error",error_type:"pcb_trace_error",pcb_trace_error_id:t.pcb_trace_id,message:`Error getting obstacles for autorouting: ${B.message}`,source_trace_id:t.source_trace_id,center:{x:0,y:0},pcb_port_ids:c.map(Y=>Y.pcb_port_id),pcb_trace_id:t.pcb_trace_id,pcb_component_ids:[]});return}for(const Y of E)if(Y.connectedTo.length>0){const te=x.getNetConnectedToId(Y.connectedTo[0]);te&&Y.connectedTo.push(te)}let S=[];if(y.length===0)S=C;else{const Y=y[0].layer_path;S=C.map((W,te)=>W.via?{...W,via_to_layer:Y[te]}:{...W,layers:[Y[te]]})}S[0].pcb_port_id=c[0].pcb_port_id,S[S.length-1].pcb_port_id=c[1].pcb_port_id;const Q=[];for(const[Y,W]of gMt(S)){const te="via_to_layer"in Y?Y.via_to_layer:null,j=2,J="layers"in Y&&Y.layers.length===1?Y.layers[0]:te??"top",oe="layers"in W&&W.layers.length===1?W.layers[0]:te??"top",ie="pcb_port_id"in Y?Y.pcb_port_id:null,ne="pcb_port_id"in W?W.pcb_port_id:null,le=t._getExplicitTraceThickness()??t.getSubcircuit()._parsedProps.minTraceWidth??EB.min_trace_width,ge=new Vct({OBSTACLE_MARGIN:le*2,isRemovePathLoopsEnabled:!0,optimizeWithGoalBoxes:!!(ie&&ne),connMap:x,input:{obstacles:E,minTraceWidth:le,connections:[{name:t.source_trace_id,pointsToConnect:[{...Y,layer:J,pcb_port_id:ie},{...W,layer:oe,pcb_port_id:ne}]}],layerCount:t.getSubcircuit()._getSubcircuitLayerCount(),bounds:{minX:Math.min(Y.x,W.x)-j,maxX:Math.max(Y.x,W.x)+j,minY:Math.min(Y.y,W.y)-j,maxY:Math.max(Y.y,W.y)+j}}});let _e=null;try{_e=ge.solveAndMapToTraces()}catch(pe){t.renderError({type:"pcb_trace_error",pcb_trace_error_id:t.source_trace_id,error_type:"pcb_trace_error",message:`error solving route: ${pe.message}`,source_trace_id:t.pcb_trace_id,center:{x:(Y.x+W.x)/2,y:(Y.y+W.y)/2},pcb_port_ids:c.map(ye=>ye.pcb_port_id),pcb_trace_id:t.pcb_trace_id,pcb_component_ids:c.map(ye=>ye.pcb_component_id)})}if(!_e)return;if(_e.length===0){t.renderError({type:"pcb_trace_error",error_type:"pcb_trace_error",pcb_trace_error_id:t.pcb_trace_id,message:`Could not find a route for ${t}`,source_trace_id:t.source_trace_id,center:{x:(Y.x+W.x)/2,y:(Y.y+W.y)/2},pcb_port_ids:c.map(pe=>pe.pcb_port_id),pcb_trace_id:t.pcb_trace_id,pcb_component_ids:c.map(pe=>pe.pcb_component_id)});return}const[ue]=_e;ue.route=b7o(ue.route,Y),te&&(ue.route=ue.route.map(pe=>(pe.route_type==="wire"&&!pe.layer&&(pe.layer=te),pe))),ie&&ue.route[0].route_type==="wire"&&(ue.route[0].start_pcb_port_id=ie);const fe=ue.route[ue.route.length-1];ne&&fe.route_type==="wire"&&(fe.end_pcb_port_id=ne),Q.push(ue.route)}const w=Q9o(Q),M=zwe(w),k=t.getInheritedMergedProperty("pcbStyle"),{holeDiameter:R,padDiameter:F}=$N(k),O=e.pcb_trace.insert({route:Wwe(w),source_trace_id:t.source_trace_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id,trace_length:M}),U=t.subcircuit_connectivity_map_key??e.source_trace.get(t.source_trace_id)?.subcircuit_connectivity_map_key;t._portsRoutedOnPcb=c,t.pcb_trace_id=O.pcb_trace_id;for(const Y of w)if(Y.route_type==="via"){const W=Y,te=Y.from_layer,j=Y.to_layer;e.pcb_via.insert({pcb_trace_id:O.pcb_trace_id,x:Y.x,y:Y.y,hole_diameter:R,outer_diameter:F,layers:hMt({fromLayer:te,toLayer:j,layerCount:i._getSubcircuitLayerCount(),allowBlindAndBuriedVias:s?.allow_blind_and_buried_vias??!1,physicalLayers:W.layers}),from_layer:te,to_layer:j,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_connectivity_map_key:U})}t._insertErrorIfTraceIsOutsideBoard(w,c)}var D0e=t=>{switch(t){case"up":return"y+";case"down":return"y-";case"left":return"x-";case"right":return"x+"}},qwe=({db:t,source_trace_id:e,schematic_sheet_id:n,sameNetOnly:o,differentNetOnly:i})=>{!o&&!i&&(i=!0);const r=t.source_trace.get(e),s=[];for(const a of t.schematic_trace.list()){if(a.source_trace_id===e||n!==void 0&&a.schematic_sheet_id!==n)continue;const c=t.source_trace.get(a.source_trace_id)?.subcircuit_connectivity_map_key===r.subcircuit_connectivity_map_key;i&&c||o&&!c||s.push(a)}return s},Q7o=({edges:t,otherEdges:e})=>{const n=[...t];for(let o=0;o<n.length;o++){if(o>2e3)throw new Error("Over 2000 iterations spent inside createSchematicTraceCrossingSegments, you have triggered an infinite loop, please report this!");const i=n[o],r=Math.abs(i.from.x-i.to.x)<.01?"vertical":i.from.y===i.to.y?"horizontal":"not-orthogonal";if(r==="not-orthogonal")continue;const s=[];for(const p of e){const m=p.from.x===p.to.x?"vertical":p.from.y===p.to.y?"horizontal":"not-orthogonal";if(m==="not-orthogonal"||r===m)continue;if(xxe([i.from,i.to],[p.from,p.to],{lineThickness:.01})){const f=r==="vertical"?i.from.x:p.from.x,I=r==="vertical"?p.from.y:i.from.y,C={x:f,y:I};s.push({otherEdge:p,crossingPoint:C,distanceFromEdgeFrom:ad(i.from,C)})}}if(s.length===0)continue;let a=s[0];for(const p of s)p.distanceFromEdgeFrom<a.distanceFromEdgeFrom&&(a=p);const A=a.crossingPoint,c=.075;if(A.x===i.from.x&&A.y===i.from.y)continue;const l=Bxe(i.from,A),u={x:A.x-l.x*c/2,y:A.y-l.y*c/2},g={x:A.x+l.x*c/2,y:A.y+l.y*c/2},h=ad(g,i.to)<c,d=[{from:i.from,to:u},{from:u,to:g,is_crossing:!0},{from:g,to:i.to}];n.splice(o,1,...d),o+=d.length-2,h&&o++}return n},Xwe=.001,dO=(t,e)=>{const n=Math.min(e.from.x,e.to.x),o=Math.max(e.from.x,e.to.x),i=Math.min(e.from.y,e.to.y),r=Math.max(e.from.y,e.to.y);return t.x>=n&&t.x<=o&&t.y>=i&&t.y<=r},PMt=t=>{const e=Math.abs(t.from.x-t.to.x)<Xwe,n=Math.abs(t.from.y-t.to.y)<Xwe;return e?"vertical":n?"horizontal":"diagonal"},v7o=(t,e)=>{const n=PMt(t),o=PMt(e);if(n===o)return null;if(n==="vertical"&&o==="horizontal"||n==="horizontal"&&o==="vertical"){const u=n==="vertical"?t:e,g=n==="horizontal"?t:e,h=u.from.x,d=g.from.y,p={x:h,y:d};return dO(p,t)&&dO(p,e)?p:null}if(n==="vertical"||o==="vertical"){const u=n==="vertical"?t:e,g=n==="vertical"?e:t,h=u.from.x,d=(g.to.y-g.from.y)/(g.to.x-g.from.x),p=g.from.y-d*g.from.x,m=d*h+p,_={x:h,y:m};return dO(_,t)&&dO(_,e)?_:null}const i=(t.to.y-t.from.y)/(t.to.x-t.from.x),r=t.from.y-i*t.from.x,s=(e.to.y-e.from.y)/(e.to.x-e.from.x),a=e.from.y-s*e.from.x;if(Math.abs(i-s)<Xwe)return null;const A=(a-r)/(i-s),c=i*A+r,l={x:A,y:c};return dO(l,t)&&dO(l,e)?l:null},MMt=({edges:t,db:e,source_trace_id:n,schematic_sheet_id:o})=>{const i=qwe({db:e,source_trace_id:n,schematic_sheet_id:o,sameNetOnly:!0}).flatMap(s=>s.edges),r=new Map;for(const s of t)for(const a of i){const A=v7o(s,a);if(A){const c=`${A.x.toFixed(6)},${A.y.toFixed(6)}`;r.has(c)||r.set(c,A)}}return Array.from(r.values())};function DMt(t){const e=t%360;return e<0?e+360:e}function w7o(t,e,n,o){return o==="counterclockwise"?n>=e?t>=e&&t<=n:t>=e||t<=n:n<=e?t<=e&&t>=n:t<=e||t>=n}function P7o(t){const e=t.center,n=t.radius,o=t.start_angle_degrees,i=t.end_angle_degrees,r=t.direction??"counterclockwise";if(!e||typeof e.x!="number"||typeof e.y!="number"||typeof n!="number"||typeof o!="number"||typeof i!="number")return null;const s=DMt(o),a=DMt(i),A=new Set([s,a]),c=[0,90,180,270];for(const d of c)w7o(d,s,a,r)&&A.add(d);let l=1/0,u=1/0,g=-1/0,h=-1/0;for(const d of A){const p=d*Math.PI/180,m=e.x+n*Math.cos(p),_=e.y+n*Math.sin(p);l=Math.min(l,m),g=Math.max(g,m),u=Math.min(u,_),h=Math.max(h,_)}return!Number.isFinite(l)||!Number.isFinite(u)?null:{minX:l,maxX:g,minY:u,maxY:h}}function Gj(t){let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t){let s,a,A,c;if(r.type==="schematic_component")s=r.center?.x,a=r.center?.y,A=r.size?.width,c=r.size?.height;else if(r.type==="schematic_box")s=r.x,a=r.y,A=r.width,c=r.height;else if(r.type==="schematic_port")s=r.center?.x,a=r.center?.y,A=.2,c=.2;else if(r.type==="schematic_text")s=r.position?.x,a=r.position?.y,A=(r.text?.length??0)*.1,c=.2;else if(r.type==="schematic_line"){const l=r.x1??0,u=r.y1??0,g=r.x2??0,h=r.y2??0;s=(l+g)/2,a=(u+h)/2,A=Math.abs(g-l),c=Math.abs(h-u)}else if(r.type==="schematic_rect")s=r.center?.x,a=r.center?.y,A=r.width,c=r.height;else if(r.type==="schematic_circle"){s=r.center?.x,a=r.center?.y;const l=r.radius;typeof l=="number"&&(A=l*2,c=l*2)}else if(r.type==="schematic_arc"){const l=P7o(r);l&&(e=Math.min(e,l.minX),o=Math.max(o,l.maxX),n=Math.min(n,l.minY),i=Math.max(i,l.maxY));continue}else if(r.type==="schematic_path"){const l=r.points;if(Array.isArray(l))for(const u of l)typeof u.x=="number"&&typeof u.y=="number"&&(e=Math.min(e,u.x),o=Math.max(o,u.x),n=Math.min(n,u.y),i=Math.max(i,u.y));continue}typeof s=="number"&&typeof a=="number"&&typeof A=="number"&&typeof c=="number"&&(e=Math.min(e,s-A/2),o=Math.max(o,s+A/2),n=Math.min(n,a-c/2),i=Math.max(i,a+c/2))}return{minX:e,maxX:o,minY:n,maxY:i}}function M7o(t,e={}){const{minX:n,maxX:o,minY:i,maxY:r}=t,s=e.padding??1;if(!isFinite(n)||!isFinite(o)||!isFinite(i)||!isFinite(r))return[];const a=n-s,A=o+s,c=r+s,l=i-s,u=.01;return[{type:"rect",layers:["top"],center:{x:(a+A)/2,y:c},width:A-a,height:u,connectedTo:[]},{type:"rect",layers:["top"],center:{x:(a+A)/2,y:l},width:A-a,height:u,connectedTo:[]},{type:"rect",layers:["top"],center:{x:a,y:(c+l)/2},width:u,height:c-l,connectedTo:[]},{type:"rect",layers:["top"],center:{x:A,y:(c+l)/2},width:u,height:c-l,connectedTo:[]}]}var D7o=t=>{const e=t.root.db,n=t._findConnectedPorts().ports??[],o=new Set(n.map(s=>s.schematic_port_id)),i=[];for(const s of e.toArray()){if(s.type==="schematic_component"){const a=!!s.symbol_name,A=s.size.width>s.size.height?"horz":"vert";i.push({type:"rect",layers:["top"],center:s.center,width:s.size.width+(a&&A==="horz"?-.5:0),height:s.size.height+(a&&A==="vert"?-.5:0),connectedTo:[]})}if(s.type==="schematic_port"){if(o.has(s.schematic_port_id))continue;const a=s.facing_direction?Jk(s.facing_direction):{x:0,y:0};i.push({type:"rect",layers:["top"],center:{x:s.center.x-a.x*.1,y:s.center.y-a.y*.1},width:.1+Math.abs(a.x)*.3,height:.1+Math.abs(a.y)*.3,connectedTo:[]})}s.type==="schematic_text"&&i.push({type:"rect",layers:["top"],center:s.position,width:(s.text?.length??0)*.1,height:.2,connectedTo:[]}),s.type==="schematic_box"&&i.push({type:"rect",layers:["top"],center:{x:s.x,y:s.y},width:s.width,height:s.height,connectedTo:[]})}const r=Gj(e.toArray());return i.push(...M7o(r,{padding:1})),i},N7o=({edges:t,db:e,source_trace_id:n,schematic_sheet_id:o})=>{const i=qwe({db:e,source_trace_id:n,schematic_sheet_id:o,differentNetOnly:!0}).flatMap(s=>s.edges),r=s=>{const{from:a,to:A}=s;return a.x===A.x?"vertical":"horizontal"};for(const s of t){const a=r(s),A=()=>i.find(l=>r(l)===a&&xxe([s.from,s.to],[l.from,l.to],{lineThickness:.05}));let c=A();for(;c;)a==="horizontal"?(s.from.y+=.1,s.to.y+=.1):(s.from.x+=.1,s.to.x+=.1),c=A()}},R7o=t=>{if(t.root?._featureMspSchematicTraceRouting||t._couldNotFindPort||t.root?.schematicDisabled||t.getCollapsedSchematicBoxAncestor())return;const{db:e}=t.root,{_parsedProps:n,parent:o}=t,i=t._getSchematicNetLabelText(),r=t._resolveSchematicSheetId();if(!o)throw new Error("Trace has no parent");let s,a;try{const Y=t._findConnectedPorts();s=Y.allPortsFound,a=Y.portsWithSelectors??[]}catch(Y){if(Y instanceof jN){e.source_trace_not_connected_error.insert({...Y.errorData,error_type:"source_trace_not_connected_error"});return}throw Y}const{netsWithSelectors:A}=t._findConnectedNets();if(!s)return;const c=Y=>{if(r&&Y.source_port_id){const W=e.schematic_port.getWhere({source_port_id:Y.source_port_id,schematic_sheet_id:r});if(W)return W}if(Y.schematic_port_id)return e.schematic_port.get(Y.schematic_port_id)??null;if(!r&&Y.source_port_id){const W=e.schematic_port.list({source_port_id:Y.source_port_id}).filter(te=>!te.schematic_sheet_id);if(W.length===1)return W[0]}return null},l=a.flatMap(({port:Y})=>{const W=c(Y);return W?[{port:Y,position:W.center,schematic_port_id:W.schematic_port_id,facingDirection:W.facing_direction??null}]:[]}),u=l.map(({schematic_port_id:Y})=>Y).sort(),g=l.some(({port:Y,schematic_port_id:W})=>Y.schematic_port_id!==W),h=u.join(","),d=t.root?._getBoard();if(d?._connectedSchematicPortPairs&&d._connectedSchematicPortPairs.has(h))return;const p={name:t.source_trace_id,pointsToConnect:[]},m=D7o(t);if(l.length===1&&A.length===1){const Y=A[0].net,{port:W,position:te}=l[0];let j=t.getSubcircuit().selectAll("netlabel").find(oe=>{const ie=oe._parsedProps.connection??oe._parsedProps.connectsTo;return ie?Array.isArray(ie)?ie.some(le=>t.getSubcircuit().selectOne(le,{port:!0})===W):t.getSubcircuit().selectOne(ie,{port:!0})===W:!1});if(!j){const oe=e.schematic_net_label.getWhere({source_trace_id:t.source_trace_id});oe&&(j=oe)}if(j){const oe="_getGlobalSchematicPositionBeforeLayout"in j?j._getGlobalSchematicPositionBeforeLayout():j.anchor_position,ie=[];te.x===oe.x||te.y===oe.y?ie.push({from:te,to:oe}):(ie.push({from:te,to:{x:oe.x,y:te.y}}),ie.push({from:{x:oe.x,y:te.y},to:oe}));const ne=MMt({edges:ie,db:e,source_trace_id:t.source_trace_id,schematic_sheet_id:r}),le=e.schematic_trace.insert({source_trace_id:t.source_trace_id,edges:ie,junctions:ne,subcircuit_connectivity_map_key:t.subcircuit_connectivity_map_key??void 0,schematic_sheet_id:r});t.schematic_trace_id=le.schematic_trace_id;return}if(i){const oe=gO(W.facingDirection)??"bottom";e.schematic_net_label.insert({text:i,source_net_id:Y.source_net_id,anchor_position:te,center:j7({anchor_position:te,anchor_side:oe,text:i}),anchor_side:oe,schematic_sheet_id:t._resolveSchematicSheetId()});return}const J=gO(W.facingDirection)??"bottom";e.schematic_net_label.insert({text:Y._parsedProps.name,source_net_id:Y.source_net_id,anchor_position:te,center:j7({anchor_position:te,anchor_side:J,text:Y._parsedProps.name}),anchor_side:J,schematic_sheet_id:t._resolveSchematicSheetId()});return}if(i&&!g&&("from"in t.props&&"to"in t.props||"path"in t.props)){t._doInitialSchematicTraceRenderWithDisplayLabel();return}if(l.length<2)return;let I=(()=>{const Y=[];for(let te=0;te<l.length-1;te++){const j=l[te],J=l[te+1],oe=wF({x:j.position.x,y:j.position.y,facingDirection:D0e(j.facingDirection)},{x:J.position.x,y:J.position.y,facingDirection:D0e(J.facingDirection)});for(let ie=0;ie<oe.length-1;ie++)Y.push({from:oe[ie],to:oe[ie+1]})}const W=(te,j)=>{const J=j.width/2,oe=j.height/2,ie=j.center.x-J,ne=j.center.x+J,le=j.center.y-oe,ge=j.center.y+oe,_e=fe=>fe.x>=ie&&fe.x<=ne&&fe.y>=le&&fe.y<=ge;return _e(te.from)||_e(te.to)?!0:[[{x:ie,y:le},{x:ne,y:le}],[{x:ne,y:le},{x:ne,y:ge}],[{x:ne,y:ge},{x:ie,y:ge}],[{x:ie,y:ge},{x:ie,y:le}]].some(fe=>xxe([te.from,te.to],fe,{lineThickness:0}))};for(const te of Y)for(const j of m)if(W(te,j))return null;return Y})();I&&I.length===0&&(I=null),p.pointsToConnect=l.map(({position:Y})=>({...Y,layer:"top"}));const C=E9o(m),y=2,x={minTraceWidth:.1,obstacles:m,connections:[p],bounds:{minX:C.minX-y,maxX:C.maxX+y,minY:C.minY-y,maxY:C.maxY+y},layerCount:1};let E=Vct,B=!1;if(t.getSubcircuit().props._schDirectLineRoutingEnabled&&(E=XPt,B=!0),!I){let W=new E({input:x,MAX_ITERATIONS:100,OBSTACLE_MARGIN:.1,isRemovePathLoopsEnabled:!0,isShortenPathWithShortcutsEnabled:!0,marginsWithCosts:[{margin:1,enterCost:0,travelCostFactor:1},{margin:.3,enterCost:0,travelCostFactor:1},{margin:.2,enterCost:0,travelCostFactor:2},{margin:.1,enterCost:0,travelCostFactor:3}]}).solveAndMapToTraces();if(W.length===0){if(!g&&(t._isSymbolToChipConnection()||t._isSymbolToSymbolConnection()||t._isChipToChipConnection())){t._doInitialSchematicTraceRenderWithDisplayLabel();return}W=new XPt({input:x}).solveAndMapToTraces(),B=!0}const[{route:te}]=W;I=[];const j=te.filter(J=>J.route_type==="wire"||J.route_type==="via");for(let J=0;J<j.length-1;J++)I.push({from:j[J],to:j[J+1]})}const S=t.source_trace_id;let Q=[];if(!B){N7o({edges:I,db:e,source_trace_id:S,schematic_sheet_id:r});const Y=qwe({db:e,source_trace_id:S,schematic_sheet_id:r,differentNetOnly:!0}).flatMap(W=>W.edges);I=Q7o({edges:I,otherEdges:Y}),Q=MMt({edges:I,db:e,source_trace_id:t.source_trace_id,schematic_sheet_id:r})}if(!I||I.length===0)return;const w=I[I.length-1],M=l[l.length-1],k=ZPt(w);I.push(...Ywe({lastEdge:w,lastEdgePort:M,lastDominantDirection:k}));const R=I[0],F=l[0],O=ZPt(R);if(I.unshift(...Ywe({firstEdge:R,firstEdgePort:F,firstDominantDirection:O})),!t.source_trace_id)throw new Error("Missing source_trace_id for schematic trace insertion.");if(!g&&t.getSubcircuit()._parsedProps.schTraceAutoLabelEnabled&&$9o(Q,I)>=5&&(t._isSymbolToChipConnection()||t._isSymbolToSymbolConnection()||t._isChipToChipConnection())){t._doInitialSchematicTraceRenderWithDisplayLabel();return}const U=e.schematic_trace.insert({source_trace_id:t.source_trace_id,edges:I,junctions:Q,subcircuit_connectivity_map_key:t.subcircuit_connectivity_map_key??void 0,schematic_sheet_id:r});t.schematic_trace_id=U.schematic_trace_id;for(const{schematic_port_id:Y}of l)e.schematic_port.update(Y,{is_connected:!0});d?._connectedSchematicPortPairs&&d._connectedSchematicPortPairs.add(h)},T7o=(t,{db:e})=>{const n=t.map(o=>{const i=e.source_port.get(o.source_port_id);if(!i?.source_component_id)return null;const r=e.source_component.get(i.source_component_id);return r?.ftype==="simple_capacitor"?r.max_decoupling_trace_length:null}).filter(o=>typeof o=="number");if(n.length!==0)return Math.min(...n)};function k7o({ports:t,nets:e}){if(t.length>=2)return`${t[0]?.selector} to ${t[1]?.selector}`;if(t.length===1&&e.length===1)return`${t[0]?.selector} to net.${e[0]._parsedProps.name}`}function F7o(t){const e=new Set;for(const{port:n}of t){if(!(n.parent instanceof BMt))continue;const o=n.parent._getConnectedNetOrTrace();o instanceof Qb&&e.add(o)}return[...e]}var t1=class extends Ir{source_trace_id=null;pcb_trace_id=null;schematic_trace_id=null;_inflatedPcbTraces;_inflatedPcbVias;_portsRoutedOnPcb;subcircuit_connectivity_map_key=null;_exposesSubcircuitConnection=!1;_traceConnectionHash=null;_couldNotFindPort;constructor(t){super(t),this._portsRoutedOnPcb=[]}_getExplicitTraceThickness(){return this._parsedProps.thickness??this._parsedProps.width}_getSchematicNetLabelText(){return this._parsedProps.schDisplayLabel??this._parsedProps.displayName??this._parsedProps.name}get config(){return{zodProps:vPn,componentName:"Trace"}}_getTracePortOrNetSelectorListFromProps(){return"from"in this.props&&"to"in this.props?[typeof this.props.from=="string"?this.props.from:this.props.from.getPortSelector(),typeof this.props.to=="string"?this.props.to:this.props.to.getPortSelector()]:"path"in this.props?this.props.path.map(t=>typeof t=="string"?t:t.getPortSelector()):[]}getTracePortPathSelectors(){return this._getTracePortOrNetSelectorListFromProps().filter(t=>!t.includes("net."))}getTracePathNetSelectors(){return this._getTracePortOrNetSelectorListFromProps().filter(t=>t.includes("net."))}_findConnectedPorts(){return _7o(this)}_resolveNet(t){const e=this.getSubcircuit().selectOne(t,{type:"net"});if(e)return e;const n=t.match(/^net\.(.+)$/),o=n?n[1]:null;if(!o)return null;const i=this.root?._getBoard();return i?i.getDescendants().find(s=>s.componentName==="Net"&&s._parsedProps.name===o)||null:(this.renderError(`Could not find a <board> ancestor for ${this}, so net "${t}" cannot be resolved`),null)}_findConnectedNets(){const t=this.getTracePathNetSelectors().map(n=>({selector:n,net:this._resolveNet(n)})),e=t.filter(n=>!n.net);return e.length>0&&this.renderError(`Could not find net for selector "${e[0].selector}" inside ${this}`),{netsWithSelectors:t,nets:t.map(n=>n.net)}}_getAllTracesConnectedToSameNet(){const t=this.getSubcircuit().selectAll("trace"),e=this._findConnectedNets().nets,n=this._findConnectedPorts().ports??[];return t.filter(o=>{if(o===this)return!1;const i=o._findConnectedNets().nets,r=o._findConnectedPorts().ports??[];return i.some(s=>e.includes(s))||r.some(s=>n.includes(s))})}_isExplicitlyConnectedToPort(t){const{allPortsFound:e,portsWithSelectors:n}=this._findConnectedPorts();return e?n.map(i=>i.port).includes(t):!1}_isExplicitlyConnectedToNet(t){return this._findConnectedNets().nets.includes(t)}doInitialCreateNetsFromProps(){Hj(this,this.getTracePathNetSelectors())}_computeTraceConnectionHash(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();return!t||!e?null:[...e].sort((i,r)=>(i.pcb_port_id||"").localeCompare(r.pcb_port_id||"")).map(i=>i.pcb_port_id).join(",")}doInitialSourceTraceRender(){const{db:t}=this.root,{_parsedProps:e,parent:n}=this;if(!n){this.renderError("Trace has no parent");return}let o,i;try{const l=this._findConnectedPorts();o=l.allPortsFound,i=l.portsWithSelectors??[]}catch(l){if(l instanceof jN){t.source_trace_not_connected_error.insert({...l.errorData,error_type:"source_trace_not_connected_error"}),this._couldNotFindPort=!0;return}throw l}if(!o)return;this._traceConnectionHash=this._computeTraceConnectionHash();const s=t.source_trace.list().find(l=>l.subcircuit_connectivity_map_key===this.subcircuit_connectivity_map_key&&[...l.connected_source_port_ids].sort().join(",")===this._traceConnectionHash);if(s){this.source_trace_id=s.source_trace_id;return}const a=this._findConnectedNets().nets;for(const l of F7o(i))a.includes(l)||a.push(l);const A=k7o({ports:i,nets:a}),c=t.source_trace.insert({connected_source_port_ids:i.map(l=>l.port.source_port_id),connected_source_net_ids:a.map(l=>l.source_net_id),subcircuit_id:this.getSubcircuit()?.subcircuit_id,name:e.name,max_length:e.maxLength??T7o(i.map(l=>l.port),{db:t}),max_via_count:e.maxViaCount,display_name:e.displayName??A,min_trace_thickness:this._getExplicitTraceThickness()});this.source_trace_id=c.source_trace_id,!e.name&&a.length===0&&t.source_unnamed_trace_warning.insert({message:`${this.getString()} is missing a name. Add a name prop to make the trace easier to identify.`,source_trace_id:c.source_trace_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,warning_type:"source_unnamed_trace_warning"})}_insertErrorIfTraceIsOutsideBoard(t,e){const{db:n}=this.root,o=this._getBoard();if(!o)return;const i=o.pcb_board_id;if(!i)return;K9o({mergedRoute:t,db:n,pcbBoardId:i})&&n.pcb_trace_error.insert({error_type:"pcb_trace_error",source_trace_id:this.source_trace_id,message:`Trace ${this.getString()} routed outside the board boundaries.`,pcb_trace_id:this.pcb_trace_id,pcb_component_ids:[],pcb_port_ids:e.map(s=>s.pcb_port_id)})}doInitialPcbManualTraceRender(){C7o(this)}doInitialPcbTraceRender(){S7o(this)}_doInitialSchematicTraceRenderWithDisplayLabel(){m7o(this)}_isSymbolToChipConnection(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();if(!t||e.length!==2)return!1;const[n,o]=e;if(!n?.parent||!o?.parent)return!1;const i=n.parent.config.shouldRenderAsSchematicBox,r=o.parent.config.shouldRenderAsSchematicBox;return i&&!r||!i&&r}_isSymbolToSymbolConnection(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();if(!t||e.length!==2)return!1;const[n,o]=e;if(!n?.parent||!o?.parent)return!1;const i=!n.parent.config.shouldRenderAsSchematicBox,r=!o.parent.config.shouldRenderAsSchematicBox;return i&&r}_isChipToChipConnection(){const{allPortsFound:t,ports:e}=this._findConnectedPorts();if(!t||e.length!==2)return!1;const[n,o]=e;if(!n?.parent||!o?.parent)return!1;const i=n.parent.config.shouldRenderAsSchematicBox,r=o.parent.config.shouldRenderAsSchematicBox;return i&&r}doInitialSchematicTraceRender(){R7o(this)}},N0e={},NMt=t=>{const e=Object.fromEntries(Object.entries(t).map(([n,o])=>[n.toLowerCase(),o]));Object.assign(N0e,t),Object.assign(N0e,e)},L7o=class extends Ir{constructor(t,e){super(t);const n=(o,i)=>{if(typeof o=="number")return o;if(typeof o=="string")try{return this._resolvePcbCoordinate(o,i,{allowBoardVariables:!1})}catch{return 0}return 0};this._parsedProps={...t,error:e,type:t.type||"unknown",component_name:t.name,error_type:"source_failed_to_create_component_error",message:e instanceof Error?e.message:String(e),pcbX:n(t.pcbX,"pcbX"),pcbY:n(t.pcbY,"pcbY"),schX:t.schX,schY:t.schY}}formatErrorDetails(){const t=this._parsedProps.selector??this._parsedProps.selectors??this._parsedProps.in??this._parsedProps.within,e=t===void 0?void 0:typeof t=="string"?t:this.safeStringify(t),n=this.safeStringify(this._parsedProps);return{selectorText:e,propsText:n}}safeStringify(t){const e=new WeakSet,n=JSON.stringify(t,(o,i)=>{if(typeof i=="bigint")return i.toString();if(typeof i=="function")return`[Function ${i.name||"anonymous"}]`;if(typeof i=="symbol")return i.toString();if(typeof i=="object"&&i!==null){if(e.has(i))return"[Circular]";e.add(i)}return i},2);return n?n.length>2e3?`${n.slice(0,2e3)}…`:n:"undefined"}get config(){return{componentName:"ErrorPlaceholder",zodProps:Pt({}).passthrough()}}doInitialSourceRender(){if(this.root?.db){const t=this._getGlobalPcbPositionBeforeLayout(),e=this._getGlobalSchematicPositionBeforeLayout(),{selectorText:n,propsText:o}=this.formatErrorDetails(),i=[n?`Within selector: ${n}`:null,`Props: ${o}`].filter(Boolean).join(" "),r=`Could not create ${this._parsedProps.componentType??"component"}${this._parsedProps.name?` "${this._parsedProps.name}"`:""}. ${this._parsedProps.error?.formattedError?._errors?.join("; ")||this._parsedProps.message}`;this.root.db.source_failed_to_create_component_error.insert({component_name:this._parsedProps.component_name,error_type:"source_failed_to_create_component_error",message:`${r}${i?` Details: ${i}`:""}`,pcb_center:t,schematic_center:e})}}};function H7o(t,e){return new L7o(t,e)}function O7o(t,e){const n=t;return n.__tsci={...e},t}var G7o={supportsMutation:!0,createInstance(t,e){const n=N0e[t];if(!n)throw Object.keys(N0e).length===0?new Error("No components registered in catalogue, did you forget to import lib/register-catalogue in your test file?"):new Error(`Unsupported component type "${t}". No element with this name is registered in the @tscircuit/core catalogue. Check for typos or see https://docs.tscircuit.com/category/built-in-elements for a list of valid components. To add your own component, see docs/CREATING_NEW_COMPONENTS.md`);try{return O7o(new n(e),{})}catch(o){return H7o({...e,componentType:t},o)}},createTextInstance(t){return{__text:t}},appendInitialChild(t,e){t.add(e)},appendChild(t,e){t.add(e)},appendChildToContainer(t,e){t.add(e)},finalizeInitialChildren(){return!1},prepareUpdate(){return null},shouldSetTextContent(){return!1},getRootHostContext(){return{}},getChildHostContext(){return{}},prepareForCommit(){return null},resetAfterCommit(){},commitMount(){},commitUpdate(){},removeChild(){},clearContainer(){},supportsPersistence:!1,getPublicInstance(t){return t},preparePortalMount(t){throw new Error("Function not implemented.")},scheduleTimeout(t,e){throw new Error("Function not implemented.")},cancelTimeout(t){throw new Error("Function not implemented.")},noTimeout:void 0,isPrimaryRenderer:!1,getInstanceFromNode(t){throw new Error("Function not implemented.")},beforeActiveInstanceBlur(){throw new Error("Function not implemented.")},afterActiveInstanceBlur(){throw new Error("Function not implemented.")},prepareScopeUpdate:(t,e)=>{throw new Error("Function not implemented.")},getInstanceFromScope:t=>{throw new Error("Function not implemented.")},detachDeletedInstance:t=>{throw new Error("Function not implemented.")},getCurrentEventPriority:()=>XBe.DefaultEventPriority,getCurrentUpdatePriority:()=>XBe.DefaultEventPriority,resolveUpdatePriority:()=>XBe.DefaultEventPriority,setCurrentUpdatePriority:()=>{},maySuspendCommit:()=>!1,supportsHydration:!1},R0e=aJn(G7o),RMt=t=>{const e={children:[],props:{name:"$root"},add(r){r.parent=this,this.children.push(r)},computePcbGlobalTransform(){return hC()}},n=[],o=R0e.createContainer(e,0,null,!1,null,"tsci",r=>{console.log("Error in createContainer"),console.error(r),n.push(r)},null);if(R0e.updateContainerSync(t,o,null,()=>{}),R0e.flushSyncWork(),n.length>0)throw n[0];const i=R0e.getPublicRootInstance(o);return i||e.children[0]},Y7o=/^(?:pin)?(\d+)$/,uw=t=>{const e=t.match(Y7o);return e?Number.parseInt(e[1],10):null};function U7o(t){if(!t)return{validPinLabels:t,invalidPinLabelsMessages:[]};const e={},n=[];for(const[o,i]of Object.entries(t)){const r=Array.isArray(i)?i.slice():[i],s=[];for(const a of r)if(K7o(o,a))s.push(a);else{const A=TMt(a),c=A?` Try using "${A}" instead.`:"";n.push(`Invalid pin label: ${o} = '${a}' - excluding from component. Pin labels can only contain letters, numbers and underscores.${c}`)}s.length>0&&(e[o]=Array.isArray(i)?s:s[0])}return{validPinLabels:Object.keys(e).length>0?e:void 0,invalidPinLabelsMessages:n}}function K7o(t,e){return/^[A-Za-z0-9_]+$/.test(e)}function TMt(t){const e=t.match(/^\+?(\d+)\.(\d+)V(_\d+)?$/i);if(e)return`V${e[1]}_${e[2]}${e[3]??""}`;const n=t.match(/^\+?(\d+)V(\d+)(_\d+)?$/i);if(n)return`V${n[1]}_${n[2]}${n[3]??""}`;const o=t.match(/^\+?(\d+)V(_\d+)?$/i);if(o)return`V${o[1]}${o[2]??""}`}var kMt=t=>{const e=TMt(t),n=e?` Try using "${e}" instead.`:"";return`No pin labels provided and pin number or label is not a number: "${t}".${n}`},hO=(t,e)=>{if(typeof t=="number")return t;const n=uw(t);if(n!==null)return n;if(t.startsWith("pin"))throw new Error(`Invalid pinLabels key "${t}". Expected "pin\${number}" (e.g. pin1, pin2).`);if(!e)throw new Error(kMt(t));for(const o in e)if((Array.isArray(e[o])?e[o]:[e[o]]).includes(t)){const r=uw(o);if(r===null)throw new Error(`Invalid pinLabels key "${o}". Expected "pin\${number}" (e.g. pin1, pin2).`);return r}throw new Error(kMt(t))},Zwe=(t,e)=>{if(!t)return;const n={},o={};for(const[i,r]of Object.entries(t)){const s=hO(i,e);o[s]={...o[s],...r}}for(const[i,r]of Object.entries(o)){const s=`pin${i}`;n[s]={bottom_margin:r.bottomMargin,left_margin:r.leftMargin,right_margin:r.rightMargin,top_margin:r.topMargin}}return n},ePe=t=>{if(t){if("leftSide"in t||"rightSide"in t||"topSide"in t||"bottomSide"in t)return{left_side:t.leftSide,right_side:t.rightSide,top_side:t.topSide,bottom_side:t.bottomSide};if("leftPinCount"in t||"rightPinCount"in t||"topPinCount"in t||"bottomPinCount"in t)return{left_size:t.leftPinCount,right_size:t.rightPinCount,top_size:t.topPinCount,bottom_size:t.bottomPinCount};if("leftSize"in t||"rightSize"in t||"topSize"in t||"bottomSize"in t)return{left_size:t.leftSize,right_size:t.rightSize,top_size:t.topSize,bottom_size:t.bottomSize}}};function Yj(t){return t.replace(/\\n/g,`
`)}var FMt=class extends Ir{isPcbPrimitive=!0;pcb_copper_text_id=null;get config(){return{componentName:"CopperText",zodProps:hDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getPrimitiveContainer(),o=this._getGlobalPcbPositionBeforeLayout(),i=this.getSubcircuit(),r=t.pcb_copper_text.insert({anchor_alignment:e.anchorAlignment,anchor_position:{x:o.x,y:o.y},font:"tscircuit2024",font_size:e.fontSize,layer:e.layer??"top",text:Yj(e.text),ccw_rotation:e.pcbRotation,is_mirrored:e.mirrored,is_knockout:e.knockout,pcb_component_id:n.pcb_component_id,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_copper_text_id=r.pcb_copper_text_id}getPcbSize(){const{_parsedProps:t}=this,e=t.fontSize??1,o=(t.text??"").length*e,i=e;return{width:o*e,height:i*e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_copper_text_id)return;const o=n.pcb_copper_text.get(this.pcb_copper_text_id);o&&n.pcb_copper_text.update(this.pcb_copper_text_id,{anchor_position:{x:o.anchor_position.x+t,y:o.anchor_position.y+e}})}},LMt=class extends Ir{pcb_courtyard_circle_id=null;isPcbPrimitive=!0;get config(){return{componentName:"CourtyardCircle",zodProps:NMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(e.layer??"top");if(i!=="top"&&i!=="bottom")throw new Error(`Invalid layer "${i}" for CourtyardCircle. Must be "top" or "bottom".`);const r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_courtyard_circle.insert({pcb_component_id:s,layer:i,center:{x:n.x,y:n.y},radius:e.radius,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_courtyard_circle_id=a.pcb_courtyard_circle_id}getPcbSize(){const{_parsedProps:t}=this,e=t.radius*2;return{width:e,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_courtyard_circle_id)return;const o=n.pcb_courtyard_circle.get(this.pcb_courtyard_circle_id);o&&n.pcb_courtyard_circle.update(this.pcb_courtyard_circle_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},HMt=class extends Ir{pcb_courtyard_outline_id=null;isPcbPrimitive=!0;get config(){return{componentName:"CourtyardOutline",zodProps:DMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??"top");if(o!=="top"&&o!=="bottom")throw new Error(`Invalid layer "${o}" for CourtyardOutline. Must be "top" or "bottom".`);const i=this._computePcbGlobalTransformBeforeLayout(),r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_courtyard_outline.insert({pcb_component_id:s,layer:o,outline:e.outline.map(A=>{const c=ts(i,{x:A.x,y:A.y});return{x:c.x,y:c.y}}),subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_courtyard_outline_id=a.pcb_courtyard_outline_id}_setPositionFromLayout(t){const{db:e}=this.root,n=e.pcb_courtyard_outline.get(this.pcb_courtyard_outline_id);if(!n)return;let o=0,i=0;for(const A of n.outline)o+=A.x,i+=A.y;o/=n.outline.length,i/=n.outline.length;const r=t.x-o,s=t.y-i,a=n.outline.map(A=>({x:A.x+r,y:A.y+s}));e.pcb_courtyard_outline.update(this.pcb_courtyard_outline_id,{outline:a})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_courtyard_outline_id)return;const o=n.pcb_courtyard_outline.get(this.pcb_courtyard_outline_id);o&&n.pcb_courtyard_outline.update(this.pcb_courtyard_outline_id,{outline:o.outline.map(i=>({x:i.x+t,y:i.y+e}))})}getPcbSize(){const{_parsedProps:t}=this;if(!t.outline||t.outline.length===0)return{width:0,height:0};const e=Oh(t.outline);return e?{width:e.maxX-e.minX,height:e.maxY-e.minY}:{width:0,height:0}}},OMt=class extends Ir{pcb_courtyard_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:"CourtyardRect",zodProps:MMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o,isFlipped:i}=this._getPcbPrimitiveFlippedHelpers(),r=o(e.layer??"top");if(r!=="top"&&r!=="bottom")throw new Error(`Invalid layer "${r}" for CourtyardRect. Must be "top" or "bottom".`);const s=this.getSubcircuit(),a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id;let l=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360;i&&(l=(180-l+360)%360);const u=t.pcb_courtyard_rect.insert({pcb_component_id:a,layer:r,center:{x:n.x,y:n.y},width:e.width,height:e.height,ccw_rotation:l||void 0,subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_courtyard_rect_id=u.pcb_courtyard_rect_id}getPcbSize(){const{_parsedProps:t}=this;return{width:t.width,height:t.height}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_courtyard_rect_id)return;const o=n.pcb_courtyard_rect.get(this.pcb_courtyard_rect_id);o&&n.pcb_courtyard_rect.update(this.pcb_courtyard_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},T0e=class extends Ir{pcb_cutout_id=null;isPcbPrimitive=!0;get config(){return{componentName:"Cutout",zodProps:aPn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this.getGroup()?.pcb_group_id??void 0,i=this._getGlobalPcbPositionBeforeLayout(),r=this.getPrimitiveContainer(),s=this.parent?.pcb_component_id??r?.pcb_component_id??void 0,a=r?._parsedProps.pcbRotation??0;let A;if(e.shape==="rect"){const c=typeof a=="string"?parseInt(a.replace("deg",""),10):a,l=Math.abs(c%180)===90,u={shape:"rect",center:i,width:l?e.height:e.width,height:l?e.width:e.height,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o,pcb_component_id:s};A=t.pcb_cutout.insert(u)}else if(e.shape==="circle"){const c={shape:"circle",center:i,radius:e.radius,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o,pcb_component_id:s};A=t.pcb_cutout.insert(c)}else if(e.shape==="polygon"){const c=this._computePcbGlobalTransformBeforeLayout(),u={shape:"polygon",points:e.points.map(g=>ts(c,g)),subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o,pcb_component_id:s};A=t.pcb_cutout.insert(u)}A&&(this.pcb_cutout_id=A.pcb_cutout_id)}getPcbSize(){const{_parsedProps:t}=this;if(t.shape==="rect")return{width:t.width,height:t.height};if(t.shape==="circle")return{width:t.radius*2,height:t.radius*2};if(t.shape==="polygon"){if(t.points.length===0)return{width:0,height:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t.points)e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y);return{width:n-e,height:i-o}}return{width:0,height:0}}_getPcbCircuitJsonBounds(){if(!this.pcb_cutout_id)return super._getPcbCircuitJsonBounds();const{db:t}=this.root,e=t.pcb_cutout.get(this.pcb_cutout_id);if(!e)return super._getPcbCircuitJsonBounds();if(e.shape==="rect")return{center:e.center,bounds:{left:e.center.x-e.width/2,top:e.center.y+e.height/2,right:e.center.x+e.width/2,bottom:e.center.y-e.height/2},width:e.width,height:e.height};if(e.shape==="circle")return{center:e.center,bounds:{left:e.center.x-e.radius,top:e.center.y+e.radius,right:e.center.x+e.radius,bottom:e.center.y-e.radius},width:e.radius*2,height:e.radius*2};if(e.shape==="polygon"){if(e.points.length===0)return super._getPcbCircuitJsonBounds();let n=1/0,o=-1/0,i=1/0,r=-1/0;for(const s of e.points)n=Math.min(n,s.x),o=Math.max(o,s.x),i=Math.min(i,s.y),r=Math.max(r,s.y);return{center:{x:(n+o)/2,y:(i+r)/2},bounds:{left:n,top:r,right:o,bottom:i},width:o-n,height:r-i}}return super._getPcbCircuitJsonBounds()}_setPositionFromLayout(t){if(!this.pcb_cutout_id)return;const{db:e}=this.root,n=e.pcb_cutout.get(this.pcb_cutout_id);if(n){if(n.shape==="rect"||n.shape==="circle")e.pcb_cutout.update(this.pcb_cutout_id,{...n,center:t});else if(n.shape==="polygon"){const o=this._getPcbCircuitJsonBounds().center,i=t.x-o.x,r=t.y-o.y,s=n.points.map(a=>({x:a.x+i,y:a.y+r}));e.pcb_cutout.update(this.pcb_cutout_id,{...n,points:s})}}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(!this.pcb_cutout_id)return;const{db:n}=this.root,o=n.pcb_cutout.get(this.pcb_cutout_id);o&&(o.shape==="rect"||o.shape==="circle"?n.pcb_cutout.update(this.pcb_cutout_id,{center:{x:o.center.x+t,y:o.center.y+e}}):o.shape==="polygon"&&n.pcb_cutout.update(this.pcb_cutout_id,{points:o.points.map(i=>({x:i.x+t,y:i.y+e}))}))}},GMt=class extends Ir{fabrication_note_path_id=null;isPcbPrimitive=!0;get config(){return{componentName:"FabricationNotePath",zodProps:bMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,e=this.getSubcircuit(),{_parsedProps:n}=this,{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(n.layer??"top");if(i!=="top"&&i!=="bottom")throw new Error(`Invalid layer "${i}" for FabricationNotePath. Must be "top" or "bottom".`);const r=this._computePcbGlobalTransformBeforeLayout(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_fabrication_note_path.insert({pcb_component_id:s,layer:i,color:n.color,route:n.route.map(A=>{const c=ts(r,{x:A.x,y:A.y});return{...A,x:c.x,y:c.y}}),stroke_width:n.strokeWidth??.1,subcircuit_id:e?.subcircuit_id??void 0});this.fabrication_note_path_id=a.pcb_fabrication_note_path_id}getPcbSize(){const{_parsedProps:t}=this;if(t.route.length===0)return{width:0,height:0};const e=t.route.map(a=>typeof a.x=="string"?parseFloat(a.x):a.x),n=t.route.map(a=>typeof a.y=="string"?parseFloat(a.y):a.y),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{width:i-o,height:s-r}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.fabrication_note_path_id)return;const o=n.pcb_fabrication_note_path.get(this.fabrication_note_path_id);o&&n.pcb_fabrication_note_path.update(this.fabrication_note_path_id,{route:o.route.map(i=>({...i,x:i.x+t,y:i.y+e}))})}},YMt=class extends Ir{fabrication_note_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:"FabricationNoteRect",zodProps:BMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(e.layer??"top");if(i!=="top"&&i!=="bottom")throw new Error(`Invalid layer "${i}" for FabricationNoteRect. Must be "top" or "bottom".`);const r=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,s=this.getSubcircuit(),a=e.hasStroke??(e.strokeWidth!==void 0&&e.strokeWidth!==null),A=t.pcb_fabrication_note_rect.insert({pcb_component_id:r,layer:i,color:e.color,center:{x:n.x,y:n.y},width:e.width,height:e.height,stroke_width:e.strokeWidth??1,is_filled:e.isFilled??!1,has_stroke:a,is_stroke_dashed:e.isStrokeDashed??!1,subcircuit_id:s?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,corner_radius:e.cornerRadius??void 0});this.fabrication_note_rect_id=A.pcb_fabrication_note_rect_id}getPcbSize(){const{_parsedProps:t}=this;return{width:t.width,height:t.height}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.fabrication_note_rect_id)return;const o=n.pcb_fabrication_note_rect.get(this.fabrication_note_rect_id);o&&n.pcb_fabrication_note_rect.update(this.fabrication_note_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}};function V7o(t){const e=t.indexOf("[");if(e===-1)return{tag:t};const n=t.slice(0,e),i=t.slice(e+1,t.lastIndexOf("]")).match(/^(\w+)(\^=|\$=|=)['"]?(.*?)['"]?$/);return i?{tag:n,attrName:i[1],attrOp:i[2],attrValue:i[3]}:{tag:n}}function UMt(t,e){if(t.lowercaseComponentName!==e.tag)return!1;if(!e.attrName)return!0;const n=t.props?.[e.attrName];if(n===void 0)return!1;const o=String(n);switch(e.attrOp){case"^=":return o.startsWith(e.attrValue);case"$=":return o.endsWith(e.attrValue);case"=":return o===e.attrValue;default:return!1}}function z7o(t,e){if(!UMt(t,e[e.length-1]))return!1;let n=e.length-2,o=t.parent;for(;n>=0&&o;)UMt(o,e[n])&&n--,o=o.parent;return n<0}function pO({propertyName:t,resolvedPcbSx:e,pathFromAmpersand:n,component:o}){if(!e)return;let i,r=0;for(const[s,a]of Object.entries(e)){if(!a||!(t in a))continue;const A=s.startsWith("& ")?s.slice(2):s;if(A===n){1>r&&(r=1,i=a[t]);continue}if(!o)continue;const c=A.split(/\s+/).map(V7o);if(!(c.length<2)&&z7o(o,c)){const l=c.length;l>r&&(r=l,i=a[t])}}return i}var KMt=class extends Ir{pcb_fabrication_note_text_id=null;isPcbPrimitive=!0;get config(){return{componentName:"FabricationNoteText",zodProps:EMn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),r=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360,s=this.getPrimitiveContainer(),a=this.getSubcircuit(),{maybeFlipLayer:A}=this._getPcbPrimitiveFlippedHelpers(),c=A(e.layer??"top");if(c!=="top"&&c!=="bottom")throw new Error(`Invalid layer "${c}" for FabricationNoteText. Must be "top" or "bottom".`);if(pO({propertyName:"visibility",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:"fabricationnotetext",component:this})==="hidden")return;const u=t.pcb_fabrication_note_text.insert({anchor_alignment:e.anchorAlignment,anchor_position:{x:n.x,y:n.y},font:e.font??"tscircuit2024",font_size:e.fontSize??1,layer:c,color:e.color,ccw_rotation:r,text:Yj(e.text??""),pcb_component_id:s.pcb_component_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_fabrication_note_text_id=u.pcb_fabrication_note_text_id}getPcbSize(){const{_parsedProps:t}=this,e=typeof t.fontSize=="string"?parseFloat(t.fontSize):t.fontSize??1,n=e*.6;return{width:(t.text??"").length*n,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(this.pcb_fabrication_note_text_id){const o=n.pcb_fabrication_note_text.get(this.pcb_fabrication_note_text_id);o&&n.pcb_fabrication_note_text.update(this.pcb_fabrication_note_text_id,{anchor_position:{x:o.anchor_position.x+t,y:o.anchor_position.y+e}})}}},mO=class extends Ir{pcb_hole_id=null;isPcbPrimitive=!0;get config(){return{componentName:"Hole",zodProps:xPn}}getPcbSize(){const{_parsedProps:t}=this,e=t.shape==="pill",n=t.shape==="oval",o=t.shape==="rect";return e||n?{width:t.width,height:t.height}:o?{width:t.width,height:t.height}:{width:t.diameter,height:t.diameter}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this._getGlobalPcbPositionBeforeLayout(),i=e.solderMaskMargin,r=e.coveredWithSolderMask??!1,s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id;if(this.emitSolderMaskMarginWarning(r,i),e.shape==="pill")if(e.pcbRotation&&e.pcbRotation!==0){const a=t.pcb_hole.insert({pcb_component_id:s,type:"pcb_hole",hole_shape:"rotated_pill",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,ccw_rotation:e.pcbRotation,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else{const a=t.pcb_hole.insert({pcb_component_id:s,type:"pcb_hole",hole_shape:"pill",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else if(e.shape==="oval"){const a=t.pcb_hole.insert({pcb_component_id:s,type:"pcb_hole",hole_shape:"oval",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else if(e.shape==="rect"){const a=t.pcb_hole.insert({pcb_component_id:s,type:"pcb_hole",hole_shape:"rect",hole_width:e.width,hole_height:e.height,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}else{const a=t.pcb_hole.insert({pcb_component_id:s,type:"pcb_hole",hole_shape:"circle",hole_diameter:e.diameter,x:o.x,y:o.y,soldermask_margin:i,is_covered_with_solder_mask:r,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:n?.getGroup()?.pcb_group_id??void 0});this.pcb_hole_id=a.pcb_hole_id}}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_hole.get(this.pcb_hole_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y-n.height/2,right:e.x+n.width/2,bottom:e.y+n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_hole.update(this.pcb_hole_id,{x:t.x,y:t.y})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_hole_id)return;const o=n.pcb_hole.get(this.pcb_hole_id);o&&n.pcb_hole.update(this.pcb_hole_id,{x:o.x+t,y:o.y+e})}},k0e=class extends Ir{pcb_keepout_id=null;isPcbPrimitive=!0;get config(){return{componentName:"Keepout",zodProps:PMn}}getExcludedPcbComponentIds(){const t=this._parsedProps.excludeRefs?.flatMap(e=>this.getSubcircuit().selectAll(e).map(n=>n.pcb_component_id).filter(n=>n!==null))??[];return Array.from(new Set(t))}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const t=this.getSubcircuit(),{db:e}=this.root,{_parsedProps:n}=this,o=this._getGlobalPcbPositionBeforeLayout(),i=O9(this._computePcbGlobalTransformBeforeLayout()),r=Math.abs(i.rotation.angle*(180/Math.PI)-90)%180<.01;let s=n.layers;!s&&n.layer&&(s=[n.layer]),s||(s=["top"]);const a=this.getExcludedPcbComponentIds(),A=a.length>0?{excluded_pcb_component_ids:a}:{};let c=null;n.shape==="circle"?c=e.pcb_keepout.insert({layers:s,shape:"circle",...A,radius:n.radius,center:{x:o.x,y:o.y},subcircuit_id:t?.subcircuit_id??void 0,pcb_group_id:t?.getGroup()?.pcb_group_id??void 0}):n.shape==="rect"&&(c=e.pcb_keepout.insert({layers:s,shape:"rect",...A,...r?{width:n.height,height:n.width}:{width:n.width,height:n.height},center:{x:o.x,y:o.y},subcircuit_id:t?.subcircuit_id??void 0,pcb_group_id:t?.getGroup()?.pcb_group_id??void 0})),c&&(this.pcb_keepout_id=c.pcb_keepout_id)}getPcbSize(){const{_parsedProps:t}=this;return t.shape==="circle"?{width:t.radius*2,height:t.radius*2}:t.shape==="rect"?{width:t.width,height:t.height}:{width:0,height:0}}},VMt=class extends Ir{pcb_note_line_id=null;isPcbPrimitive=!0;get config(){return{componentName:"PcbNoteLine",zodProps:SDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this.getGroup(),i=this._computePcbGlobalTransformBeforeLayout(),r=ts(i,{x:e.x1,y:e.y1}),s=ts(i,{x:e.x2,y:e.y2}),a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,A=t.pcb_note_line.insert({pcb_component_id:a,subcircuit_id:n?.subcircuit_id??void 0,pcb_group_id:o?.pcb_group_id??void 0,x1:r.x,y1:r.y,x2:s.x,y2:s.y,layer:e.layer==="bottom"?"bottom":"top",stroke_width:e.strokeWidth??.1,color:e.color,is_dashed:e.isDashed});this.pcb_note_line_id=A.pcb_note_line_id}getPcbSize(){const{_parsedProps:t}=this;return{width:Math.abs(t.x2-t.x1),height:Math.abs(t.y2-t.y1)}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_line_id)return;const o=n.pcb_note_line.get(this.pcb_note_line_id);o&&n.pcb_note_line.update(this.pcb_note_line_id,{x1:o.x1+t,y1:o.y1+e,x2:o.x2+t,y2:o.y2+e})}},zMt=class extends Ir{pcb_note_path_id=null;isPcbPrimitive=!0;get config(){return{componentName:"PcbNotePath",zodProps:bDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=this.getSubcircuit(),i=this.getGroup(),r=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,s=e.route.map(A=>{const{x:c,y:l,...u}=A,g=typeof c=="string"?parseFloat(c):c,h=typeof l=="string"?parseFloat(l):l,d=ts(n,{x:g,y:h});return{...u,x:d.x,y:d.y}}),a=t.pcb_note_path.insert({pcb_component_id:r,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:i?.pcb_group_id??void 0,route:s,layer:e.layer==="bottom"?"bottom":"top",stroke_width:e.strokeWidth??.1,color:e.color});this.pcb_note_path_id=a.pcb_note_path_id}getPcbSize(){const{_parsedProps:t}=this;if(t.route.length===0)return{width:0,height:0};const e=t.route.map(a=>typeof a.x=="string"?parseFloat(a.x):a.x),n=t.route.map(a=>typeof a.y=="string"?parseFloat(a.y):a.y),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{width:i-o,height:s-r}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_path_id)return;const o=n.pcb_note_path.get(this.pcb_note_path_id);o&&n.pcb_note_path.update(this.pcb_note_path_id,{route:o.route.map(i=>({...i,x:i.x+t,y:i.y+e}))})}},JMt=class extends Ir{pcb_note_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:"PcbNoteRect",zodProps:BDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=ts(n,{x:0,y:0}),i=this.getSubcircuit(),r=this.getGroup(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,a=t.pcb_note_rect.insert({pcb_component_id:s,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:r?.pcb_group_id??void 0,center:o,width:e.width,height:e.height,layer:e.layer==="bottom"?"bottom":"top",stroke_width:e.strokeWidth??.1,is_filled:e.isFilled??!1,has_stroke:e.hasStroke??!0,is_stroke_dashed:e.isStrokeDashed??!1,color:e.color,corner_radius:e.cornerRadius??void 0});this.pcb_note_rect_id=a.pcb_note_rect_id}getPcbSize(){const{_parsedProps:t}=this,e=typeof t.width=="string"?parseFloat(t.width):t.width,n=typeof t.height=="string"?parseFloat(t.height):t.height;return{width:e,height:n}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_rect_id)return;const o=n.pcb_note_rect.get(this.pcb_note_rect_id);o&&n.pcb_note_rect.update(this.pcb_note_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},WMt=class extends Ir{pcb_note_text_id=null;isPcbPrimitive=!0;get config(){return{componentName:"PcbNoteText",zodProps:EDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=ts(n,{x:0,y:0}),i=this.getSubcircuit(),r=this.getGroup(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,a=t.pcb_note_text.insert({pcb_component_id:s,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:r?.pcb_group_id??void 0,font:e.font??"tscircuit2024",font_size:e.fontSize??1,text:Yj(e.text),anchor_position:o,anchor_alignment:e.anchorAlignment??"center",layer:e.layer==="bottom"?"bottom":"top",color:e.color});this.pcb_note_text_id=a.pcb_note_text_id}getPcbSize(){const{_parsedProps:t}=this,e=typeof t.fontSize=="string"?parseFloat(t.fontSize):t.fontSize??1,n=e*.6;return{width:t.text.length*n,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_text_id)return;const o=n.pcb_note_text.get(this.pcb_note_text_id);o&&n.pcb_note_text.update(this.pcb_note_text_id,{anchor_position:{x:o.anchor_position.x+t,y:o.anchor_position.y+e}})}},J7o=Pt({route:dn(Y2e),source_trace_id:Z().optional()}),tPe=class extends Ir{pcb_trace_id=null;isPcbPrimitive=!0;get config(){return{componentName:"PcbTrace",zodProps:J7o}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getPrimitiveContainer(),o=this.getSubcircuit(),{maybeFlipLayer:i}=this._getPcbPrimitiveFlippedHelpers(),r=this._computePcbGlobalTransformBeforeLayout(),s=e.route.map(A=>{if(A.route_type==="wire"){const{x:c,y:l,...u}=A,g=ts(r,{x:c,y:l});return{...u,...g,layer:i(A.layer)}}if(A.route_type==="via"){const{x:c,y:l,...u}=A,g=ts(r,{x:c,y:l});return{...u,...g,from_layer:i(A.from_layer),to_layer:i(A.to_layer)}}return{...A,start:ts(r,A.start),end:ts(r,A.end),start_layer:i(A.start_layer),end_layer:i(A.end_layer)}}),a=t.pcb_trace.insert({pcb_component_id:n.pcb_component_id,source_trace_id:e.source_trace_id,route:s,subcircuit_id:o?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_trace_id=a.pcb_trace_id}getPcbSize(){const t=this._getPcbLocalBoundsBeforeLayout();return{width:t.right-t.left,height:t.top-t.bottom}}_getPcbLocalBoundsBeforeLayout(){const{_parsedProps:t}=this;if(!t.route||t.route.length===0)return{left:0,right:0,top:0,bottom:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t.route)r.route_type==="through_pad"?(e=Math.min(e,r.start.x,r.end.x),n=Math.max(n,r.start.x,r.end.x),o=Math.min(o,r.start.y,r.end.y),i=Math.max(i,r.start.y,r.end.y)):(e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y)),r.route_type==="wire"?(e=Math.min(e,r.x-r.width/2),n=Math.max(n,r.x+r.width/2),o=Math.min(o,r.y-r.width/2),i=Math.max(i,r.y+r.width/2)):r.route_type==="through_pad"&&(e=Math.min(e,r.start.x-r.width/2,r.end.x-r.width/2),n=Math.max(n,r.start.x+r.width/2,r.end.x+r.width/2),o=Math.min(o,r.start.y-r.width/2,r.end.y-r.width/2),i=Math.max(i,r.start.y+r.width/2,r.end.y+r.width/2));return e===1/0||n===-1/0||o===1/0||i===-1/0?{left:0,right:0,top:0,bottom:0}:{left:e,right:n,top:i,bottom:o}}},W7o=_lt.extend({layers:dn(Pr).optional(),isTented:je().optional(),tentedOnTop:je().optional(),tentedOnBottom:je().optional()}).partial({fromLayer:!0,toLayer:!0}),jMt=class extends Ir{pcb_via_id=null;_importedPcbTraceId;isPcbPrimitive=!0;get config(){return{componentName:"PcbVia",zodProps:W7o}}_getLayers(){const{layers:t,fromLayer:e="top",toLayer:n="bottom"}=this._parsedProps;if(t&&t.length>0)return t;const o=this.parent?this.getSubcircuit()._getSubcircuitLayerCount():2;return lw({fromLayer:e,toLayer:n,layerCount:o})}getAvailablePcbLayers(){return this._getLayers()}getPcbSize(){const t=this._parsedProps.outerDiameter??.6;return{width:t,height:t}}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_via.get(this.pcb_via_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y-n.height/2,right:e.x+n.width/2,bottom:e.y+n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_via.update(this.pcb_via_id,{x:t.x,y:t.y})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{holeDiameter:e,outerDiameter:n,netIsAssignable:o,isTented:i,tentedOnTop:r,tentedOnBottom:s}=this._parsedProps,a=this.getSubcircuit(),A=this._getGlobalPcbPositionBeforeLayout(),{isFlipped:c,maybeFlipLayer:l}=this._getPcbPrimitiveFlippedHelpers(),u=this._getLayers().map(p=>l(p)),g=this._parsedProps.fromLayer?l(this._parsedProps.fromLayer):u[0],h=this._parsedProps.toLayer?l(this._parsedProps.toLayer):u[u.length-1]??g,d=t.pcb_via.insert({x:A.x,y:A.y,...e!==void 0?{hole_diameter:e}:{},...n!==void 0?{outer_diameter:n}:{},layers:u,from_layer:g,to_layer:h,pcb_trace_id:this._importedPcbTraceId,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,net_is_assignable:o,tented_on_top:(c?s:r)??i,tented_on_bottom:(c?r:s)??i});this.pcb_via_id=d.pcb_via_id}},j7o=t=>{for(const e of t){const n=e.toString();if(/^(pin)?\d+$/.test(n))return Number.parseInt(n.replace(/^pin/,""))}return null};function $Mt(t,e,n){const o=j7o(n),i=t.filter(c=>c.isMatchingAnyOf(n));if(i.length===0)return null;const r=o===null?i:i.filter(c=>c._parsedProps.pinNumber===o||c._primaryPinNumber===o),s=r.length>0?r:i,a=s.find(c=>c.matchedComponents.some(l=>l.isPcbPrimitive&&EMt(l,e)));return a||(s.find(c=>!c.matchedComponents.some(l=>l.isPcbPrimitive))??s[0])}var Pb=class extends Ir{pcb_plated_hole_id=null;matchedPort=null;isPcbPrimitive=!0;get config(){return{componentName:"PlatedHole",zodProps:Hwn}}getAvailablePcbLayers(){return[...this.root?._getBoard()?.allLayers??["top","bottom"]]}getPcbSize(){const{_parsedProps:t}=this;if(t.shape==="circle")return{width:t.outerDiameter,height:t.outerDiameter};if(t.shape==="oval"||t.shape==="pill")return{width:t.outerWidth,height:t.outerHeight};if(t.shape==="circular_hole_with_rect_pad")return{width:t.rectPadWidth,height:t.rectPadHeight};if(t.shape==="pill_hole_with_rect_pad")return{width:t.rectPadWidth,height:t.rectPadHeight};if(t.shape==="hole_with_polygon_pad"){if(!t.padOutline||t.padOutline.length===0)throw new Error("padOutline is required for hole_with_polygon_pad shape");const e=t.padOutline.map(a=>typeof a.x=="number"?a.x:parseFloat(String(a.x))),n=t.padOutline.map(a=>typeof a.y=="number"?a.y:parseFloat(String(a.y))),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{width:i-o,height:s-r}}throw new Error(`getPcbSize for shape "${t.shape}" not implemented for ${this.componentName}`)}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_plated_hole.get(this.pcb_plated_hole_id),n=this.getPcbSize();return{center:{x:e.x,y:e.y},bounds:{left:e.x-n.width/2,top:e.y+n.height/2,right:e.x+n.width/2,bottom:e.y-n.height/2},width:n.width,height:n.height}}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_plated_hole.update(this.pcb_plated_hole_id,{x:t.x,y:t.y}),this.matchedPort?._setPositionFromLayout(t)}doInitialPortMatching(){const t=this.getPrimitiveContainer()?.selectAll("port");if(!this._parsedProps.portHints)return;const e=$Mt(t,this,this._parsedProps.portHints);e&&(this.matchedPort=e,e.registerMatch(this))}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),o=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,i=this.getSubcircuit(),r=this.getAvailablePcbLayers(),s=e.solderMaskMargin,a=e.coveredWithSolderMask??!1;this.emitSolderMaskMarginWarning(a,s);const u=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360;if(e.shape==="circle"){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,outer_diameter:e.outerDiameter,hole_diameter:e.holeDiameter,shape:"circle",port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=g.pcb_plated_hole_id,t.pcb_solder_paste.insert({layer:"top",shape:"circle",radius:e.outerDiameter/2,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}),t.pcb_solder_paste.insert({layer:"bottom",shape:"circle",radius:e.outerDiameter/2,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape==="pill"&&e.rectPad){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,outer_width:e.outerWidth,outer_height:e.outerHeight,hole_width:e.holeWidth,hole_height:e.holeHeight,shape:"rotated_pill_hole_with_rect_pad",type:"pcb_plated_hole",port_hints:this.getNameAndAliases(),pcb_plated_hole_id:this.pcb_plated_hole_id,x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,hole_shape:"rotated_pill",pad_shape:"rect",hole_ccw_rotation:u,rect_ccw_rotation:u,rect_pad_width:e.outerWidth,rect_pad_height:e.outerHeight,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else if(e.shape==="pill"||e.shape==="oval"){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,outer_width:e.outerWidth,outer_height:e.outerHeight,hole_width:e.holeWidth,hole_height:e.holeHeight,shape:e.shape,port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,ccw_rotation:u});this.pcb_plated_hole_id=g.pcb_plated_hole_id,t.pcb_solder_paste.insert({layer:"top",shape:e.shape,width:e.outerWidth,height:e.outerHeight,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}),t.pcb_solder_paste.insert({layer:"bottom",shape:e.shape,width:e.outerWidth,height:e.outerHeight,x:n.x,y:n.y,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape==="circular_hole_with_rect_pad"){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,hole_diameter:e.holeDiameter,rect_pad_width:e.rectPadWidth,rect_pad_height:e.rectPadHeight,shape:"circular_hole_with_rect_pad",port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY,rect_border_radius:e.rectBorderRadius??0,rect_ccw_rotation:u});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else if(e.shape==="pill_hole_with_rect_pad")if(u!==0){const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,hole_width:e.holeWidth,hole_height:e.holeHeight,rect_pad_width:e.rectPadWidth,rect_pad_height:e.rectPadHeight,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY,shape:"rotated_pill_hole_with_rect_pad",type:"pcb_plated_hole",hole_shape:"rotated_pill",pad_shape:"rect",hole_ccw_rotation:u,rect_ccw_rotation:u,rect_border_radius:e.rectBorderRadius,port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else{const g=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,hole_width:e.holeWidth,hole_height:e.holeHeight,rect_pad_width:e.rectPadWidth,rect_pad_height:e.rectPadHeight,hole_offset_x:e.holeOffsetX,hole_offset_y:e.holeOffsetY,shape:"pill_hole_with_rect_pad",rect_border_radius:e.rectBorderRadius,port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=g.pcb_plated_hole_id}else if(e.shape==="hole_with_polygon_pad"){const g=(e.padOutline||[]).map(d=>{const p=typeof d.x=="number"?d.x:parseFloat(String(d.x)),m=typeof d.y=="number"?d.y:parseFloat(String(d.y));return{x:p,y:m}}),h=t.pcb_plated_hole.insert({pcb_component_id:o,pcb_port_id:this.matchedPort?.pcb_port_id,shape:"hole_with_polygon_pad",hole_shape:e.holeShape||"circle",hole_diameter:e.holeDiameter,hole_width:e.holeWidth,hole_height:e.holeHeight,pad_outline:g,hole_offset_x:typeof e.holeOffsetX=="number"?e.holeOffsetX:parseFloat(String(e.holeOffsetX||0)),hole_offset_y:typeof e.holeOffsetY=="number"?e.holeOffsetY:parseFloat(String(e.holeOffsetY||0)),port_hints:this.getNameAndAliases(),x:n.x,y:n.y,layers:r,soldermask_margin:s,is_covered_with_solder_mask:a,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_plated_hole_id=h.pcb_plated_hole_id}}doInitialPcbPortAttachment(){if(this.root?.pcbDisabled)return;const{db:t}=this.root;t.pcb_plated_hole.update(this.pcb_plated_hole_id,{pcb_port_id:this.matchedPort?.pcb_port_id})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_plated_hole_id)return;const o=n.pcb_plated_hole.get(this.pcb_plated_hole_id);if(o){const i={x:o.x+t,y:o.y+e};this._setPositionFromLayout(i)}}},qMt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:"SchematicArc",zodProps:qMn}}schematic_arc_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_arc.insert({schematic_component_id:o,schematic_symbol_id:i,center:{x:e.center.x+n.x,y:e.center.y+n.y},radius:e.radius,start_angle_degrees:e.startAngleDegrees,end_angle_degrees:e.endAngleDegrees,direction:e.direction,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_dashed:e.isDashed,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_arc_id=r.schematic_arc_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_arc_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_arc.get(this.schematic_arc_id);if(!o)return;const i=ts(e,o.center),r=ts(e,{x:o.center.x+o.radius,y:o.center.y}),s=Math.abs(r.x-i.x);n.schematic_arc.update(this.schematic_arc_id,{center:{x:i.x,y:i.y},radius:s})}},XMt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:"SchematicCircle",zodProps:tDn}}schematic_circle_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_circle.insert({schematic_component_id:o,schematic_symbol_id:i,center:{x:e.center.x+n.x,y:e.center.y+n.y},radius:e.radius,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_filled:e.isFilled,fill_color:e.fillColor,is_dashed:e.isDashed,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_circle_id=r.schematic_circle_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_circle_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_circle.get(this.schematic_circle_id);if(!o)return;const i=ts(e,o.center),r=ts(e,{x:o.center.x+o.radius,y:o.center.y}),s=Math.abs(r.x-i.x);n.schematic_circle.update(this.schematic_circle_id,{center:{x:i.x,y:i.y},radius:s})}},nPe=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:"SchematicLine",zodProps:oDn}}schematic_line_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_line.insert({schematic_component_id:o,schematic_symbol_id:i,x1:e.x1+n.x,y1:e.y1+n.y,x2:e.x2+n.x,y2:e.y2+n.y,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_dashed:e.isDashed||e.dashLength!==void 0||e.dashGap!==void 0,dash_length:e.dashLength,dash_gap:e.dashGap,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_line_id=r.schematic_line_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_line_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_line.get(this.schematic_line_id);if(!o)return;const i=ts(e,{x:o.x1,y:o.y1}),r=ts(e,{x:o.x2,y:o.y2});n.schematic_line.update(this.schematic_line_id,{x1:i.x,y1:i.y,x2:r.x,y2:r.y})}};function Uj(t,e){const n=new lse(t),o=n.getTotalLength(),i=Math.max(2,Math.ceil(o*e)),r=[];for(let s=1;s<=i;s++){const a=s/i*o,A=n.getPointAtLength(a);r.push({x:A.x,y:A.y})}return r}function $7o(t,e=10){const n=new lse(t);n.toAbsolute();const o=n.segments,i=[];let r=[],s=0,a=0,A=0,c=0;for(const l of o)switch(l[0]){case"M":{r.length>0&&i.push(r),s=l[1],a=l[2],A=s,c=a,r=[{x:s,y:a}];break}case"L":{s=l[1],a=l[2],r.push({x:s,y:a});break}case"H":{s=l[1],r.push({x:s,y:a});break}case"V":{a=l[1],r.push({x:s,y:a});break}case"Z":{(s!==A||a!==c)&&r.push({x:A,y:c}),s=A,a=c;break}case"C":{const g=l[5],h=l[6],d=`M ${s} ${a} C ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case"S":{const g=l[3],h=l[4],d=`M ${s} ${a} S ${l[1]} ${l[2]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case"Q":{const g=l[3],h=l[4],d=`M ${s} ${a} Q ${l[1]} ${l[2]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case"T":{const g=l[1],h=l[2],d=`M ${s} ${a} T ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}case"A":{const g=l[6],h=l[7],d=`M ${s} ${a} A ${l[1]} ${l[2]} ${l[3]} ${l[4]} ${l[5]} ${g} ${h}`,p=Uj(d,e);r.push(...p),s=g,a=h;break}}return r.length>0&&i.push(r),i.map(l=>{const u=[];for(const g of l)(u.length===0||Math.abs(u[u.length-1].x-g.x)>1e-9||Math.abs(u[u.length-1].y-g.y)>1e-9)&&u.push(g);return u})}var ZMt=class extends Ir{isSchematicPrimitive=!0;schematic_path_ids=[];get config(){return{componentName:"SchematicPath",zodProps:sDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=this.getSubcircuit().subcircuit_id??void 0;if(this.schematic_path_ids=[],e.svgPath){const s=$7o(e.svgPath);for(const a of s){const A=t.schematic_path.insert({schematic_component_id:o,schematic_symbol_id:i,points:a.map(c=>({x:c.x+n.x,y:c.y+n.y})),is_filled:e.isFilled,is_dashed:e.dashLength!==void 0||e.dashGap!==void 0,fill_color:e.fillColor,stroke_color:e.strokeColor,stroke_width:e.strokeWidth,dash_length:e.dashLength,dash_gap:e.dashGap,subcircuit_id:r,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_path_ids.push(A.schematic_path_id)}}else if(e.points&&e.points.length>0){const s=t.schematic_path.insert({schematic_component_id:o,schematic_symbol_id:i,points:e.points.map(a=>({x:a.x+n.x,y:a.y+n.y})),is_filled:e.isFilled,is_dashed:e.dashLength!==void 0||e.dashGap!==void 0,fill_color:e.fillColor,stroke_color:e.strokeColor,stroke_width:e.strokeWidth,dash_length:e.dashLength,dash_gap:e.dashGap,subcircuit_id:r,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_path_ids.push(s.schematic_path_id)}}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||this.schematic_path_ids.length===0)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root;for(const o of this.schematic_path_ids){const i=n.schematic_path.get(o);if(!i)continue;const r=i.points.map(s=>{const a=ts(e,s);return{x:a.x,y:a.y}});n.schematic_path.update(o,{points:r})}}},eDt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:"SchematicRect",zodProps:nDn}}schematic_rect_id;doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getPrimitiveContainer()?.parent?.schematic_component_id,i=this._getSymbolAncestor()?.schematic_symbol_id,r=t.schematic_rect.insert({schematic_symbol_id:i,center:{x:n.x,y:n.y},width:e.width,height:e.height,stroke_width:e.strokeWidth??v0e,color:e.color??wb,is_filled:e.isFilled,schematic_component_id:o,is_dashed:e.isDashed,rotation:e.rotation??0,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_rect_id=r.schematic_rect_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_rect_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_rect.get(this.schematic_rect_id);if(!o)return;const i=ts(e,{x:o.center.x-o.width/2,y:o.center.y+o.height/2}),r=ts(e,{x:o.center.x+o.width/2,y:o.center.y-o.height/2}),s=Math.abs(r.x-i.x),a=Math.abs(i.y-r.y),A={x:(i.x+r.x)/2,y:(i.y+r.y)/2};n.schematic_rect.update(this.schematic_rect_id,{center:A,width:s,height:a})}},tDt=class extends Ir{isSchematicPrimitive=!0;schematic_text_id;get config(){return{componentName:"SchematicText",zodProps:rDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalSchematicPositionBeforeLayout(),o=this._getSymbolAncestor()?.schematic_symbol_id,i=this._resolveText(),r=t.schematic_text.insert({schematic_symbol_id:o,anchor:e.anchor??"center",text:Yj(i),font_size:e.fontSize,color:e.color||"#000000",position:{x:n.x,y:n.y},rotation:e.schRotation??0,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_text_id=r.schematic_text_id}doInitialSchematicSymbolResize(){if(this.root?.schematicDisabled||!this.schematic_text_id)return;const e=this._getSymbolAncestor()?.getUserCoordinateToResizedSymbolTransform();if(!e)return;const{db:n}=this.root,o=n.schematic_text.get(this.schematic_text_id);if(!o)return;const i=ts(e,o.position);n.schematic_text.update(this.schematic_text_id,{position:{x:i.x,y:i.y}})}},nDt=class extends Ir{pcb_silkscreen_circle_id=null;isPcbPrimitive=!0;get config(){return{componentName:"SilkscreenCircle",zodProps:IDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=o(e.layer??"top");if(i!=="top"&&i!=="bottom")throw new Error(`Invalid layer "${i}" for SilkscreenCircle. Must be "top" or "bottom".`);const r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_silkscreen_circle.insert({pcb_component_id:s,layer:i,center:{x:n.x,y:n.y},radius:e.radius,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,stroke_width:e.strokeWidth??.1});this.pcb_silkscreen_circle_id=a.pcb_silkscreen_circle_id}getPcbSize(){const{_parsedProps:t}=this,e=t.radius*2;return{width:e,height:e}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_circle_id)return;const o=n.pcb_silkscreen_circle.get(this.pcb_silkscreen_circle_id);o&&n.pcb_silkscreen_circle.update(this.pcb_silkscreen_circle_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},oDt=class extends Ir{pcb_silkscreen_line_id=null;isPcbPrimitive=!0;get config(){return{componentName:"SilkscreenLine",zodProps:_Dn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??"top");if(o!=="top"&&o!=="bottom")throw new Error(`Invalid layer "${o}" for SilkscreenLine. Must be "top" or "bottom".`);const i=this.getSubcircuit(),r=this._computePcbGlobalTransformBeforeLayout(),s=ts(r,{x:e.x1,y:e.y1}),a=ts(r,{x:e.x2,y:e.y2}),A=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,c=t.pcb_silkscreen_line.insert({pcb_component_id:A,layer:o,x1:s.x,y1:s.y,x2:a.x,y2:a.y,stroke_width:e.strokeWidth??.1,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:i?.getGroup()?.pcb_group_id??void 0});this.pcb_silkscreen_line_id=c.pcb_silkscreen_line_id}getPcbSize(){const{_parsedProps:t}=this,e=Math.abs(t.x2-t.x1),n=Math.abs(t.y2-t.y1);return{width:e,height:n}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_line_id)return;const o=n.pcb_silkscreen_line.get(this.pcb_silkscreen_line_id);o&&n.pcb_silkscreen_line.update(this.pcb_silkscreen_line_id,{x1:o.x1+t,y1:o.y1+e,x2:o.x2+t,y2:o.y2+e})}},iDt=class extends Ir{pcb_silkscreen_path_id=null;isPcbPrimitive=!0;get config(){return{componentName:"SilkscreenPath",zodProps:mDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??"top");if(o!=="top"&&o!=="bottom")throw new Error(`Invalid layer "${o}" for SilkscreenPath. Must be "top" or "bottom".`);const i=this._computePcbGlobalTransformBeforeLayout(),r=this.getSubcircuit(),s=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,a=t.pcb_silkscreen_path.insert({pcb_component_id:s,layer:o,route:e.route.map(A=>{const c=ts(i,{x:A.x,y:A.y});return{...A,x:c.x,y:c.y}}),stroke_width:e.strokeWidth??.1,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_silkscreen_path_id=a.pcb_silkscreen_path_id}_setPositionFromLayout(t){const{db:e}=this.root,{_parsedProps:n}=this,o=e.pcb_silkscreen_path.get(this.pcb_silkscreen_path_id);if(!o)return;let i=0,r=0;for(const c of o.route)i+=c.x,r+=c.y;i/=o.route.length,r/=o.route.length;const s=t.x-i,a=t.y-r,A=o.route.map(c=>({...c,x:c.x+s,y:c.y+a}));e.pcb_silkscreen_path.update(this.pcb_silkscreen_path_id,{route:A})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_path_id)return;const o=n.pcb_silkscreen_path.get(this.pcb_silkscreen_path_id);o&&n.pcb_silkscreen_path.update(this.pcb_silkscreen_path_id,{route:o.route.map(i=>({...i,x:i.x+t,y:i.y+e}))})}getPcbSize(){const{_parsedProps:t}=this;if(!t.route||t.route.length===0)return{width:0,height:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t.route)e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y);return{width:n-e,height:i-o}}},rDt=class extends Ir{pcb_silkscreen_rect_id=null;isPcbPrimitive=!0;get config(){return{componentName:"SilkscreenRect",zodProps:fDn}}_isRotated90Degrees(){const t=this._computePcbGlobalTransformBeforeLayout(),o=(O9(t).rotation.angle*180/Math.PI%360+360)%360,i=.01;return Math.abs(o-90)<i||Math.abs(o-270)<i}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??"top");if(o!=="top"&&o!=="bottom")throw new Error(`Invalid layer "${o}" for SilkscreenRect. Must be "top" or "bottom".`);const i=this.getSubcircuit(),r=this._getGlobalPcbPositionBeforeLayout(),s=this._isRotated90Degrees(),a=s?e.height:e.width,A=s?e.width:e.height,c=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,l=t.pcb_silkscreen_rect.insert({pcb_component_id:c,layer:o,center:{x:r.x,y:r.y},width:a,height:A,subcircuit_id:i?.subcircuit_id??void 0,pcb_group_id:this?.getGroup()?.pcb_group_id??void 0,stroke_width:e.strokeWidth??.1,is_filled:e.filled??!1,corner_radius:e.cornerRadius??void 0});this.pcb_silkscreen_rect_id=l.pcb_silkscreen_rect_id}getPcbSize(){const{_parsedProps:t}=this;return this._isRotated90Degrees()?{width:t.height,height:t.width}:{width:t.width,height:t.height}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_silkscreen_rect_id)return;const o=n.pcb_silkscreen_rect.get(this.pcb_silkscreen_rect_id);o&&n.pcb_silkscreen_rect.update(this.pcb_silkscreen_rect_id,{center:{x:o.center.x+t,y:o.center.y+e}})}},oPe=class extends Ir{pcb_silkscreen_text_ids=[];isPcbPrimitive=!0;_footprinterFontSize;get config(){return{componentName:"SilkscreenText",zodProps:pDn}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getPrimitiveContainer(),{maybeFlipLayer:o,isFlipped:i}=this._getPcbPrimitiveFlippedHelpers(),r=this.getSubcircuit();let s=0;if(e.pcbRotation!==void 0&&e.pcbRotation!==0)s=e.pcbRotation;else{const C=this._computePcbGlobalTransformBeforeLayout();s=O9(C).rotation.angle*180/Math.PI}i&&(s=(s+180)%360);const a=new Set(e.layers);e.layer&&a.add(e.layer);const A=a.size>0?Array.from(a):["top"],c=pO({propertyName:"fontSize",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:"silkscreentext",component:this}),l=pO({propertyName:"pcbX",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:"silkscreentext",component:this}),u=pO({propertyName:"pcbY",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:"silkscreentext",component:this});if(pO({propertyName:"visibility",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:"silkscreentext",component:this})==="hidden")return;const h=e.fontSize??c??this.getInheritedProperty("pcbStyle")?.silkscreenFontSize??this._footprinterFontSize??1,p=(l!==void 0||u!==void 0)&&this._footprinterFontSize!==void 0?ts(D0(this.parent?._computePcbGlobalTransformBeforeLayout()??hC(),i?g3e():hC()),{x:this.resolvePcbCoordinate({rawValue:l??e.pcbX??0,axis:"pcbX"}),y:this.resolvePcbCoordinate({rawValue:u??e.pcbY??0,axis:"pcbY"})}):this._getGlobalPcbPositionBeforeLayout(),m=e.knockoutPadding??0,f=e.knockoutPadding!==void 0||e.knockoutPaddingLeft!==void 0||e.knockoutPaddingRight!==void 0||e.knockoutPaddingTop!==void 0||e.knockoutPaddingBottom!==void 0?{left:e.knockoutPaddingLeft??m,right:e.knockoutPaddingRight??m,top:e.knockoutPaddingTop??m,bottom:e.knockoutPaddingBottom??m}:void 0,I=this._resolveText();for(const C of A){const y=t.pcb_silkscreen_text.insert({anchor_alignment:e.anchorAlignment,anchor_position:{x:p.x,y:p.y},font:e.font??"tscircuit2024",font_size:h,layer:o(C),text:Yj(I),ccw_rotation:s,pcb_component_id:n.pcb_component_id,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,is_knockout:e.isKnockout,knockout_padding:f});this.pcb_silkscreen_text_ids.push(y.pcb_silkscreen_text_id)}}getPcbSize(){const{_parsedProps:t}=this,e=pO({propertyName:"fontSize",resolvedPcbSx:this.getResolvedPcbSx(),pathFromAmpersand:"silkscreentext",component:this}),n=t.fontSize??e??this.getInheritedProperty("pcbStyle")?.silkscreenFontSize??this._footprinterFontSize??1,i=this._resolveText().length*n,r=n;return{width:i*n,height:r*n}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;for(const o of this.pcb_silkscreen_text_ids){const i=n.pcb_silkscreen_text.get(o);i&&n.pcb_silkscreen_text.update(o,{anchor_position:{x:i.anchor_position.x+t,y:i.anchor_position.y+e}})}}};function F0e({width:t,height:e,ccwRotationDegrees:n}){const o=n*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=t/2,a=e/2,A=Math.abs(s*i)+Math.abs(a*r),c=Math.abs(s*r)+Math.abs(a*i);return{width:A*2,height:c*2,xExtent:A,yExtent:c}}var Mb=class extends Ir{pcb_smtpad_id=null;matchedPort=null;isPcbPrimitive=!0;get config(){return{componentName:"SmtPad",zodProps:pPn}}getPcbSize(){const{_parsedProps:t}=this;if(t.shape==="circle")return{width:t.radius*2,height:t.radius*2};if(t.shape==="rect")return{width:t.width,height:t.height};if(t.shape==="rotated_rect"){const{width:e,height:n}=F0e({width:t.width,height:t.height,ccwRotationDegrees:t.ccwRotation??0});return{width:e,height:n}}if(t.shape==="polygon"){const e=t.points,n=e.map(A=>A.x),o=e.map(A=>A.y),i=Math.min(...n),r=Math.max(...n),s=Math.min(...o),a=Math.max(...o);return{width:r-i,height:a-s}}if(t.shape==="pill")return{width:t.width,height:t.height};if(t.shape==="rotated_pill"){const{width:e,height:n}=F0e({width:t.width,height:t.height,ccwRotationDegrees:t.ccwRotation});return{width:e,height:n}}throw new Error(`getPcbSize for shape "${t.shape}" not implemented for ${this.componentName}`)}doInitialPortMatching(){const t=this.getPrimitiveContainer()?.selectAll("port");if(!this.props.portHints)return;const e=$Mt(t,this,this.props.portHints);e&&(this.matchedPort=e,e.registerMatch(this))}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=e.coveredWithSolderMask??!1,o=!n,i=e.solderMaskMargin,r=e.solderPasteMargin,s=(Q,w=2)=>r!==void 0?Math.max(Q+w*r,0):Q*.7;this.emitSolderMaskMarginWarning(n,i);const a=this.getSubcircuit(),A=this._getGlobalPcbPositionBeforeLayout(),c=this._computePcbGlobalTransformBeforeLayout(),g=(O9(this._computePcbGlobalTransformBeforeLayout()).rotation.angle*180/Math.PI%360+360)%360,h=.01,d=Math.abs(g)<h||Math.abs(g-180)<h||Math.abs(g-360)<h,p=Math.abs(g-90)<h||Math.abs(g-270)<h;let m=Math.abs(g-360)<h?0:g;const _=m,{maybeFlipLayer:f,isFlipped:I}=this._getPcbPrimitiveFlippedHelpers(),C=this.getPrimitiveContainer(),y=C?.props?.layer!==void 0?C?._parsedProps.layer:void 0,x=Q=>y??f(Q);I&&(m=(360-m+360)%360);const E=e.portHints?.map(Q=>Q.toString())??[];let B=null;const S=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id;if(e.shape==="circle"){B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"circle",radius:e.radius,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,x:A.x,y:A.y,subcircuit_id:a?.subcircuit_id??void 0});const Q=s(B.radius,1);o&&Q>0&&t.pcb_solder_paste.insert({layer:B.layer,shape:"circle",radius:Q,x:B.x,y:B.y,pcb_component_id:B.pcb_component_id,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape==="rect"){!d&&!p?B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"rotated_rect",width:e.width,height:e.height,corner_radius:e.cornerRadius??void 0,x:A.x,y:A.y,ccw_rotation:m,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}):B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"rect",width:p?e.height:e.width,height:p?e.width:e.height,corner_radius:e.cornerRadius??void 0,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,x:A.x,y:A.y,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});const w=s(B.width),M=s(B.height);o&&w>0&&M>0&&(B.shape==="rect"?t.pcb_solder_paste.insert({layer:x(e.layer??"top"),shape:"rect",width:w,height:M,x:B.x,y:B.y,pcb_component_id:B.pcb_component_id,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}):B.shape==="rotated_rect"&&t.pcb_solder_paste.insert({layer:x(e.layer??"top"),shape:"rotated_rect",width:w,height:M,x:B.x,y:B.y,ccw_rotation:B.ccw_rotation,pcb_component_id:B.pcb_component_id,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}))}else if(e.shape==="rotated_rect"){const Q=e.ccwRotation??0,w=(_+Q+360)%360,M=I?(360-w+360)%360:w;B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"rotated_rect",width:e.width,height:e.height,corner_radius:e.cornerRadius??void 0,x:A.x,y:A.y,ccw_rotation:M,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});const k=s(B.width),R=s(B.height);o&&k>0&&R>0&&t.pcb_solder_paste.insert({layer:x(e.layer??"top"),shape:"rotated_rect",width:k,height:R,x:A.x,y:A.y,ccw_rotation:M,pcb_component_id:S,pcb_smtpad_id:B.pcb_smtpad_id,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape==="polygon"){const Q=e.points.map(w=>{const M=ts(c,{x:lt.parse(w.x),y:lt.parse(w.y)});return{x:M.x,y:M.y}});B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"polygon",points:Q,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else if(e.shape==="rotated_pill"){const Q=(_+e.ccwRotation+360)%360,w=I?(360-Q+360)%360:Q;B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"rotated_pill",x:A.x,y:A.y,radius:e.radius,height:e.height,width:e.width,ccw_rotation:w,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0})}else e.shape==="pill"&&(m!==0?B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"rotated_pill",x:A.x,y:A.y,radius:e.radius,height:e.height,width:e.width,ccw_rotation:m,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}):B=t.pcb_smtpad.insert({pcb_component_id:S,pcb_port_id:this.matchedPort?.pcb_port_id,layer:x(e.layer??"top"),shape:"pill",x:A.x,y:A.y,radius:e.radius,height:e.height,width:e.width,port_hints:E,is_covered_with_solder_mask:n,soldermask_margin:i,subcircuit_id:a?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0}));B&&(this.pcb_smtpad_id=B.pcb_smtpad_id)}doInitialPcbPortAttachment(){if(this.root?.pcbDisabled)return;const{db:t}=this.root;t.pcb_smtpad.update(this.pcb_smtpad_id,{pcb_port_id:this.matchedPort?.pcb_port_id})}getAvailablePcbLayers(){const{maybeFlipLayer:t}=this._getPcbPrimitiveFlippedHelpers(),e=this.getPrimitiveContainer();return[(e?.props?.layer!==void 0?e?._parsedProps.layer:void 0)??t(this._parsedProps.layer??"top")]}_getPcbCircuitJsonBounds(){const{db:t}=this.root,e=t.pcb_smtpad.get(this.pcb_smtpad_id);if(e.shape==="rect")return{center:{x:e.x,y:e.y},bounds:{left:e.x-e.width/2,top:e.y+e.height/2,right:e.x+e.width/2,bottom:e.y-e.height/2},width:e.width,height:e.height};if(e.shape==="rotated_rect"){const{width:n,height:o,xExtent:i,yExtent:r}=F0e({width:e.width,height:e.height,ccwRotationDegrees:e.ccw_rotation});return{center:{x:e.x,y:e.y},bounds:{left:e.x-i,right:e.x+i,top:e.y-r,bottom:e.y+r},width:n,height:o}}if(e.shape==="circle")return{center:{x:e.x,y:e.y},bounds:{left:e.x-e.radius,top:e.y-e.radius,right:e.x+e.radius,bottom:e.y+e.radius},width:e.radius*2,height:e.radius*2};if(e.shape==="polygon"){const n=e.points,o=n.map(c=>c.x),i=n.map(c=>c.y),r=Math.min(...o),s=Math.max(...o),a=Math.min(...i),A=Math.max(...i);return{center:{x:(r+s)/2,y:(a+A)/2},bounds:{left:r,top:A,right:s,bottom:a},width:s-r,height:A-a}}if(e.shape==="pill"){const n=e.width/2,o=e.height/2;return{center:{x:e.x,y:e.y},bounds:{left:e.x-n,top:e.y-o,right:e.x+n,bottom:e.y+o},width:e.width,height:e.height}}if(e.shape==="rotated_pill"){const{width:n,height:o,xExtent:i,yExtent:r}=F0e({width:e.width,height:e.height,ccwRotationDegrees:e.ccw_rotation});return{center:{x:e.x,y:e.y},bounds:{left:e.x-i,right:e.x+i,top:e.y-r,bottom:e.y+r},width:n,height:o}}throw new Error(`circuitJson bounds calculation not implemented for shape "${e.shape}"`)}_setPositionFromLayout(t){const{db:e}=this.root;e.pcb_smtpad.update(this.pcb_smtpad_id,{x:t.x,y:t.y});const n=e.pcb_solder_paste.list().find(o=>o.pcb_smtpad_id===this.pcb_smtpad_id);n&&e.pcb_solder_paste.update(n.pcb_solder_paste_id,{x:t.x,y:t.y}),this.matchedPort?._setPositionFromLayout(t)}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_smtpad_id)return;const o=n.pcb_smtpad.get(this.pcb_smtpad_id);if(o.shape==="rect"||o.shape==="circle"||o.shape==="rotated_rect"||o.shape==="pill"||o.shape==="rotated_pill")this._setPositionFromLayout({x:o.x+t,y:o.y+e});else if(o.shape==="polygon"){n.pcb_smtpad.update(this.pcb_smtpad_id,{points:o.points.map(r=>({x:r.x+t,y:r.y+e}))});const i={x:this._getPcbCircuitJsonBounds().center.x+t/2,y:this._getPcbCircuitJsonBounds().center.y+e/2};this.matchedPort?._setPositionFromLayout(i)}}},iPe=class extends Ir{isPrimitiveContainer=!0;schematic_symbol_id;userCoordinateToResizedSymbolTransformMat;schematicSymbolBoundsInUserCoordinates;get config(){return{componentName:"Symbol",zodProps:DPn}}hasExplicitSize(){const{_parsedProps:t}=this;return t.width!==void 0||t.height!==void 0}doInitialSymbolContainerRender(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,o=this.getParentNormalComponent()?._parsedProps?.kicadSymbolMetadata,i=t.schematic_symbol.insert({name:e.name,metadata:o?{kicad_symbol:o}:void 0});this.schematic_symbol_id=i.schematic_symbol_id}getSchematicSymbolBounds(){return this.schematicSymbolBoundsInUserCoordinates?this.schematicSymbolBoundsInUserCoordinates:(this._computeSchematicSymbolBounds(),this.schematicSymbolBoundsInUserCoordinates??null)}getUserCoordinateToResizedSymbolTransform(){return this.hasExplicitSize()?this.userCoordinateToResizedSymbolTransformMat?this.userCoordinateToResizedSymbolTransformMat:(this._computeUserCoordinateToResizedSymbolTransform(),this.userCoordinateToResizedSymbolTransformMat??null):null}_computeSchematicSymbolBounds(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,e=[];for(const o of this.children){if(o.componentName==="Port"){const i=o.schematic_port_id;if(i){const r=t.schematic_port.get(i);r&&e.push(r)}continue}if(o.isSchematicPrimitive){if(o.componentName==="SchematicLine"){const i=t.schematic_line.get(o.schematic_line_id);i&&e.push(i)}else if(o.componentName==="SchematicRect"){const i=t.schematic_rect.get(o.schematic_rect_id);i&&e.push(i)}else if(o.componentName==="SchematicCircle"){const i=t.schematic_circle.get(o.schematic_circle_id);i&&e.push(i)}else if(o.componentName==="SchematicArc"){const i=t.schematic_arc.get(o.schematic_arc_id);i&&e.push(i)}else if(o.componentName==="SchematicText"){const i=t.schematic_text.get(o.schematic_text_id);i&&e.push(i)}else if(o.componentName==="SchematicPath"){const i=o.schematic_path_ids;if(i)for(const r of i){const s=t.schematic_path.get(r);s&&e.push(s)}}}}if(e.length===0)return;const n=Gj(e);this.schematicSymbolBoundsInUserCoordinates=n}_computeUserCoordinateToResizedSymbolTransform(){const t=this.getSchematicSymbolBounds();if(!t)return;const{_parsedProps:e}=this,n=e.width,o=e.height;if(n===void 0&&o===void 0)return;const i=t.maxX-t.minX,r=t.maxY-t.minY;if(i===0&&r===0)return;const s=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2,A=n!==void 0&&i>0?n/i:1,c=o!==void 0&&r>0?o/r:1,l=this._getGlobalSchematicPositionBeforeLayout();this.userCoordinateToResizedSymbolTransformMat=D0(M0(l.x,l.y),FV(A,c),M0(-s,-a))}},q7o=({elm:t,pinLabels:e,layer:n,readableRotation:o,anchorAlignment:i})=>{const r=t.text.replace(/[{}]/g,"").toLowerCase();let s=r;if(Array.isArray(e)){const A=parseInt(r.replace(/[^\d]/g,""),10)-1;s=String(e[A]??r)}else typeof e=="object"&&(s=String(e[r]??r));const a=new oPe({anchorAlignment:i||"center",text:s??r,layer:n||"top",pcbX:isNaN(t.anchor_position.x)?0:t.anchor_position.x,pcbY:t.anchor_position.y,pcbRotation:o??0});return a._footprinterFontSize=t.font_size+.2,a},X7o=(t,e)=>{const n=parseInt(t||"0",10);let o;return e!=null?o=e-n:o=n,(o%360+360)%360},_O=t=>t??void 0,Z7o=t=>{for(const e of t??[]){if(/^\d+$/.test(e))return Number(e);const n=/^pin(\d+)$/i.exec(e);if(n)return Number(n[1])}},e6o=t=>{switch(t){case"left":case"right":return t;case"top":return"up";case"bottom":return"down"}return null},t6o=["schematic_line","schematic_rect","schematic_circle","schematic_arc","schematic_path"],n6o=t=>t6o.includes(t.type),sDt=t=>{if("schematic_symbol_id"in t)return typeof t.schematic_symbol_id=="string"?t.schematic_symbol_id:void 0},Db=({componentName:t,componentRotation:e,footprinterString:n,pinLabels:o,pcbPinLabels:i},r)=>{const s=[],a=new Map,A=new Map,c=new Map,l=new Map,u=new Map,g=new Map;for(const p of r)if(p.type==="pcb_component"&&typeof p.source_component_id=="string"&&c.set(p.pcb_component_id,p.source_component_id),p.type==="source_port"&&(l.set(p.source_port_id,p),typeof p.pin_number=="number"&&typeof p.source_component_id=="string")){let m=u.get(p.source_component_id);m||(m=new Map,u.set(p.source_component_id,m)),m.set(p.pin_number,p)}const h=(p,m)=>{const _=Z7o(p),f=typeof m=="string"?c.get(m):void 0,I=typeof _=="number"&&f?u.get(f)?.get(_):void 0;if(!I)return p;const C=Array.from(new Set([...p??[],...I.port_hints??[],I.name].filter(y=>typeof y=="string"&&y.length>0)));return C.length>0?C:p};for(const p of r){if(p.type!=="schematic_symbol")continue;const m=new iPe({name:p.name});a.set(p.schematic_symbol_id,m),s.push(m)}for(const p of r){if(!n6o(p))continue;const m=sDt(p),_=p.stroke_width;!m||typeof _!="number"||!Number.isFinite(_)||g.has(m)||g.set(m,_)}for(const p of r)p.type==="schematic_component"&&A.set(p.schematic_component_id,p);const d=(p,m)=>{const _=sDt(p)??("schematic_component_id"in p&&typeof p.schematic_component_id=="string"?A.get(p.schematic_component_id)?.schematic_symbol_id:void 0),f=typeof _=="string"?a.get(_):void 0;f?f.add(m):s.push(m)};for(const p of r){const m="port_hints"in p?h(p.port_hints,"pcb_component_id"in p?p.pcb_component_id:void 0):void 0;if(p.type==="pcb_smtpad"&&p.shape==="rect")s.push(new Mb({pcbX:p.x,pcbY:p.y,layer:p.layer,shape:"rect",height:p.height,width:p.width,portHints:m,rectBorderRadius:p.rect_border_radius}));else if(p.type==="pcb_smtpad"&&p.shape==="circle")s.push(new Mb({pcbX:p.x,pcbY:p.y,layer:p.layer,shape:"circle",radius:p.radius,portHints:m}));else if(p.type==="pcb_smtpad"&&p.shape==="pill")s.push(new Mb({shape:"pill",height:p.height,width:p.width,radius:p.radius,portHints:m,pcbX:p.x,pcbY:p.y,layer:p.layer}));else if(p.type==="pcb_smtpad"&&p.shape==="rotated_pill")s.push(new Mb({shape:"rotated_pill",height:p.height,width:p.width,radius:p.radius,portHints:m,pcbX:p.x,pcbY:p.y,layer:p.layer,ccwRotation:p.ccw_rotation}));else if(p.type==="pcb_smtpad"&&p.shape==="rotated_rect")s.push(new Mb({pcbX:p.x,pcbY:p.y,layer:p.layer,shape:"rotated_rect",height:p.height,width:p.width,ccwRotation:p.ccw_rotation,cornerRadius:p.corner_radius,portHints:m}));else if(p.type==="pcb_smtpad"&&p.shape==="polygon")s.push(new Mb({shape:"polygon",points:p.points,portHints:m,layer:p.layer}));else if(p.type==="pcb_silkscreen_path")s.push(new iDt({layer:p.layer,route:p.route,strokeWidth:p.stroke_width}));else if(p.type==="pcb_copper_text")s.push(new FMt({text:p.text,pcbX:p.anchor_position.x,pcbY:p.anchor_position.y,pcbRotation:p.ccw_rotation,anchorAlignment:p.anchor_alignment,fontSize:p.font_size,layer:p.layer,mirrored:p.is_mirrored,knockout:p.is_knockout}));else if(p.type==="pcb_plated_hole")p.shape==="circle"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:"circle",holeDiameter:p.hole_diameter,outerDiameter:p.outer_diameter,portHints:m})):p.shape==="circular_hole_with_rect_pad"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:"circular_hole_with_rect_pad",holeDiameter:p.hole_diameter,rectPadHeight:p.rect_pad_height,rectPadWidth:p.rect_pad_width,portHints:m,rectBorderRadius:p.rect_border_radius,holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y})):p.shape==="pill"||p.shape==="oval"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:p.shape,holeWidth:p.hole_width,holeHeight:p.hole_height,outerWidth:p.outer_width,outerHeight:p.outer_height,portHints:m})):p.shape==="pill_hole_with_rect_pad"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:"pill_hole_with_rect_pad",holeShape:"pill",padShape:"rect",holeWidth:p.hole_width,holeHeight:p.hole_height,rectPadWidth:p.rect_pad_width,rectPadHeight:p.rect_pad_height,rectBorderRadius:p.rect_border_radius,portHints:m,holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y})):p.shape==="rotated_pill_hole_with_rect_pad"?s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:"pill_hole_with_rect_pad",holeShape:"pill",padShape:"rect",holeWidth:p.hole_width,holeHeight:p.hole_height,rectPadWidth:p.rect_pad_width,rectPadHeight:p.rect_pad_height,rectBorderRadius:p.rect_border_radius,portHints:m,holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y,pcbRotation:p.hole_ccw_rotation})):p.shape==="hole_with_polygon_pad"&&s.push(new Pb({pcbX:p.x,pcbY:p.y,shape:"hole_with_polygon_pad",holeShape:p.hole_shape||"circle",holeDiameter:p.hole_diameter,holeWidth:p.hole_width,holeHeight:p.hole_height,padOutline:p.pad_outline||[],holeOffsetX:p.hole_offset_x,holeOffsetY:p.hole_offset_y,portHints:m}));else if(p.type==="pcb_keepout"&&p.shape==="circle")s.push(new k0e({pcbX:p.center.x,pcbY:p.center.y,shape:"circle",radius:p.radius}));else if(p.type==="pcb_keepout"&&p.shape==="rect")s.push(new k0e({pcbX:p.center.x,pcbY:p.center.y,shape:"rect",width:p.width,height:p.height}));else if(p.type==="pcb_hole"&&p.hole_shape==="circle")s.push(new mO({pcbX:p.x,pcbY:p.y,diameter:p.hole_diameter}));else if(p.type==="pcb_hole"&&p.hole_shape==="rect")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:"rect",width:p.hole_width,height:p.hole_height}));else if(p.type==="pcb_hole"&&p.hole_shape==="pill")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:"pill",width:p.hole_width,height:p.hole_height}));else if(p.type==="pcb_hole"&&p.hole_shape==="oval")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:"oval",width:p.hole_width,height:p.hole_height}));else if(p.type==="pcb_hole"&&p.hole_shape==="rotated_pill")s.push(new mO({pcbX:p.x,pcbY:p.y,shape:"pill",width:p.hole_width,height:p.hole_height,pcbRotation:p.ccw_rotation}));else if(p.type==="pcb_cutout")p.shape==="rect"?s.push(new T0e({pcbX:p.center.x,pcbY:p.center.y,shape:"rect",width:p.width,height:p.height})):p.shape==="circle"?s.push(new T0e({pcbX:p.center.x,pcbY:p.center.y,shape:"circle",radius:p.radius})):p.shape==="polygon"&&s.push(new T0e({shape:"polygon",points:p.points}));else if(p.type==="pcb_silkscreen_text"){const _=X7o(e,p.ccw_rotation);if((n?.includes("pinrow")||n?.includes("headermodule"))&&p.text.includes("PIN"))s.push(q7o({elm:p,pinLabels:i??o??{},layer:p.layer,readableRotation:_,anchorAlignment:p.anchor_alignment}));else{const f=new oPe({anchorAlignment:p.anchor_alignment||"center",text:n?.includes("silkscreenlabel(")&&p.text!=="{REF}"&&p.text!=="{NAME}"&&p.text!=="{REFERENCE}"?p.text:t||p.text,pcbX:Number.isNaN(p.anchor_position.x)?0:p.anchor_position.x,pcbY:p.anchor_position.y,pcbRotation:_??0});f._footprinterFontSize=p.font_size+.2,s.push(f)}}else if(p.type==="pcb_trace")s.push(new tPe({route:p.route}));else if(p.type==="pcb_via"){const _=Sne.parse(p),f=p.layers??[],I=new jMt({pcbX:p.x,pcbY:p.y,holeDiameter:p.hole_diameter,outerDiameter:p.outer_diameter,fromLayer:p.from_layer??f[0],toLayer:p.to_layer??f[f.length-1],layers:f,netIsAssignable:p.net_is_assignable,tentedOnTop:_.tented_on_top,tentedOnBottom:_.tented_on_bottom});I._importedPcbTraceId=p.pcb_trace_id,s.push(I)}else if(p.type==="pcb_silkscreen_rect")s.push(new rDt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,layer:p.layer,strokeWidth:p.stroke_width,filled:p.is_filled,cornerRadius:p.corner_radius}));else if(p.type==="pcb_silkscreen_circle")s.push(new nDt({pcbX:p.center.x,pcbY:p.center.y,radius:p.radius,layer:p.layer,strokeWidth:p.stroke_width}));else if(p.type==="pcb_silkscreen_line")s.push(new oDt({x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,layer:p.layer,strokeWidth:p.stroke_width}));else if(p.type==="pcb_fabrication_note_text")s.push(new KMt({pcbX:p.anchor_position.x,pcbY:p.anchor_position.y,text:p.text,fontSize:p.font_size,anchorAlignment:p.anchor_alignment,color:p.color,font:p.font,layer:p.layer,pcbRotation:p.ccw_rotation}));else if(p.type==="pcb_fabrication_note_path")s.push(new GMt({route:p.route,strokeWidth:p.stroke_width,color:p.color,layer:p.layer}));else if(p.type==="pcb_fabrication_note_rect")s.push(new YMt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,strokeWidth:p.stroke_width,isFilled:p.is_filled,color:p.color,layer:p.layer,cornerRadius:p.corner_radius,hasStroke:p.has_stroke,isStrokeDashed:p.is_stroke_dashed}));else if(p.type==="pcb_note_text")s.push(new WMt({pcbX:p.anchor_position.x,pcbY:p.anchor_position.y,text:p.text??"",fontSize:p.font_size,anchorAlignment:p.anchor_alignment,color:p.color,font:p.font}));else if(p.type==="pcb_note_rect")s.push(new JMt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,strokeWidth:p.stroke_width,isFilled:p.is_filled,color:p.color,cornerRadius:p.corner_radius,hasStroke:p.has_stroke,isStrokeDashed:p.is_stroke_dashed}));else if(p.type==="pcb_note_path")s.push(new zMt({route:p.route,strokeWidth:p.stroke_width,color:p.color}));else if(p.type==="pcb_note_line")s.push(new VMt({x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,strokeWidth:p.stroke_width,color:p.color,isDashed:p.is_dashed}));else if(p.type==="pcb_courtyard_rect")s.push(new OMt({pcbX:p.center.x,pcbY:p.center.y,width:p.width,height:p.height,pcbRotation:p.ccw_rotation,layer:p.layer}));else if(p.type==="pcb_courtyard_circle")s.push(new LMt({pcbX:p.center.x,pcbY:p.center.y,radius:p.radius,layer:p.layer}));else if(p.type==="pcb_courtyard_outline")s.push(new HMt({outline:p.outline,layer:p.layer}));else if(p.type==="schematic_line")d(p,new nPe({x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,strokeWidth:_O(p.stroke_width),color:p.color,isDashed:p.is_dashed}));else if(p.type==="schematic_rect")d(p,new eDt({schX:p.center.x,schY:p.center.y,width:p.width,height:p.height,rotation:p.rotation,strokeWidth:_O(p.stroke_width),color:p.color,isFilled:p.is_filled,fillColor:p.fill_color,isDashed:p.is_dashed}));else if(p.type==="schematic_circle")d(p,new XMt({center:p.center,radius:p.radius,strokeWidth:_O(p.stroke_width),color:p.color,isFilled:p.is_filled,fillColor:p.fill_color,isDashed:p.is_dashed}));else if(p.type==="schematic_arc")d(p,new qMt({center:p.center,radius:p.radius,startAngleDegrees:p.start_angle_degrees,endAngleDegrees:p.end_angle_degrees,direction:p.direction,strokeWidth:_O(p.stroke_width),color:p.color,isDashed:p.is_dashed}));else if(p.type==="schematic_text")d(p,new tDt({schX:p.position.x,schY:p.position.y,text:p.text,fontSize:p.font_size,anchor:p.anchor,color:p.color,schRotation:p.rotation}));else if(p.type==="schematic_path")d(p,new ZMt({points:p.points,strokeWidth:_O(p.stroke_width),strokeColor:p.stroke_color,dashLength:p.dash_length,dashGap:p.dash_gap,isFilled:p.is_filled,fillColor:p.fill_color}));else if(p.type==="schematic_port"){const _=p.schematic_component_id;if(typeof _!="string")continue;const f=A.get(_),I=f?.schematic_symbol_id,C=typeof I=="string"?a.get(I):void 0;if(C&&f?.is_box_with_pins===!0&&p.center&&p.side_of_component){const y=p.distance_from_component_edge,x=e6o(p.side_of_component);if(!x)continue;const E=Jk(x),B=p.facing_direction===x?1:-1,S={x:p.center.x+E.x*y*B,y:p.center.y+E.y*y*B},Q=l.get(p.source_port_id),w=Array.from(new Set([p.display_pin_label,Q?.name,...Q?.port_hints??[]].filter(R=>typeof R=="string"&&R.length>0))),M=p.pin_number?`pin${p.pin_number}`:p.schematic_port_id,k=w[0]??p.source_port_id??M;C.add(new Pu({pinNumber:p.pin_number,name:k,aliases:w,schX:p.center.x,schY:p.center.y,direction:x})),C.add(new nPe({x1:p.center.x,y1:p.center.y,x2:S.x,y2:S.y,strokeWidth:typeof I=="string"?_O(g.get(I)):void 0,isDashed:!1}))}}}return s},o6o=["Silkscreen","PcbNote","Courtyard","FabricationNote"];function L0e(t){let e=1/0,n=1/0,o=-1/0,i=-1/0,r=!1;for(const A of t)if(A.isPcbPrimitive&&!o6o.some(c=>A.componentName.startsWith(c))){const c=A._getPcbLocalBoundsBeforeLayout(),u=[{x:c.left,y:c.bottom},{x:c.right,y:c.bottom},{x:c.right,y:c.top},{x:c.left,y:c.top}].map(d=>ts(A._computePcbGlobalTransformBeforeLayout(),d)),g=u.map(d=>d.x),h=u.map(d=>d.y);e=Math.min(e,...g),n=Math.min(n,...h),o=Math.max(o,...g),i=Math.max(i,...h),r=!0}else if(A.children.length>0){const c=L0e(A.children);(c.width>0||c.height>0)&&(e=Math.min(e,c.minX),n=Math.min(n,c.minY),o=Math.max(o,c.maxX),i=Math.max(i,c.maxY),r=!0)}if(!r)return{minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};let s=o-e,a=i-n;return s<0&&(s=0),a<0&&(a=0),{minX:e,minY:n,maxX:o,maxY:i,width:s,height:a}}var H0e=t=>{const e=t.find(n=>/^(pin)?\d+$/.test(n));return e?Number.parseInt(e.replace(/^pin/,"")):null};function O0e(t,e){const n=H0e(t);if(!n)return null;const i=[...t.filter(r=>r.toString()!==n.toString()&&r!==`pin${n}`&&r.trim()!==""),...e?.additionalAliases?.[`pin${n}`]??[]];return new Pu({pinNumber:n,aliases:i})}function gw(t){return t?Array.isArray(t)?t:t.pins??[]:[]}var aDt=t=>{for(const e of["leftSide","rightSide","topSide","bottomSide"])if(e in t&&typeof t[e]=="number")throw new Error(`A number was specified for "${e}", you probably meant to use "size" not "side"`);return"leftSide"in t||"rightSide"in t||"topSide"in t||"bottomSide"in t},rPe=t=>!t||!aDt(t)?[]:[...gw(t.leftSide),...gw(t.rightSide),...gw(t.topSide),...gw(t.bottomSide)],i6o=t=>{if(aDt(t))return{leftSize:gw(t.leftSide).length,rightSize:gw(t.rightSide).length,topSize:gw(t.topSide).length,bottomSize:gw(t.bottomSide).length};const{leftSize:e=0,rightSize:n=0,topSize:o=0,bottomSize:i=0}=t;return{leftSize:e,rightSize:n,topSize:o,bottomSize:i}},G0e=.4,ADt=.1,cDt=.1,r6o=t=>typeof t=="string"?t:t?.[0]??"",s6o=t=>Array.from(r6o(t)).length*ADt;function lDt(t){const e=t;return e.leftSide!==void 0||e.rightSide!==void 0||e.topSide!==void 0||e.bottomSide!==void 0}var sPe=t=>{const e=t.portDistanceFromEdge??.4;let n=t.schPortArrangement?i6o(t.schPortArrangement):null;const o={left:0,right:0,top:0,bottom:0};let i=t.pinCount??null;if(i===null)if(n)i=n.leftSize+n.rightSize+n.topSize;else throw new Error("Could not determine pin count for the schematic box");if(i&&!n){const d=Math.floor(i/2);n={leftSize:i-d,rightSize:d,topSize:0,bottomSize:0}}n||(n={leftSize:0,rightSize:0,topSize:0,bottomSize:0});const r=({side:d,sideIndex:p,truePinIndex:m})=>{if(!t.schPortArrangement||!lDt(t.schPortArrangement))return m+1;const _={left:"top-to-bottom",bottom:"left-to-right",right:"bottom-to-top",top:"right-to-left"}[d],f=t.schPortArrangement?.[`${d}Side`]?.direction??_,I=t.schPortArrangement?.[`${d}Side`]?.pins;let C=p;return f!==_&&(C=I.length-p-1),hO(I[C],t.pinLabels)},s=[];let a=0,A=0;for(let d=0;d<n.leftSize;d++){const p=r({side:"left",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.topMargin&&(a+=m.topMargin),s.push({trueIndex:p-1,pinNumber:p,side:"left",distanceFromOrthogonalEdge:a}),m?.bottomMargin&&(a+=m.bottomMargin),d===n.leftSize-1?o.left=a:a+=t.schPinSpacing,A++}a=0;for(let d=0;d<n.bottomSize;d++){const p=r({side:"bottom",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.leftMargin&&(a+=m.leftMargin),s.push({trueIndex:p-1,pinNumber:p,side:"bottom",distanceFromOrthogonalEdge:a}),m?.rightMargin&&(a+=m.rightMargin),d===n.bottomSize-1?o.bottom=a:a+=t.schPinSpacing,A++}a=0;for(let d=0;d<n.rightSize;d++){const p=r({side:"right",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.bottomMargin&&(a+=m.bottomMargin),s.push({trueIndex:p-1,pinNumber:p,side:"right",distanceFromOrthogonalEdge:a}),m?.topMargin&&(a+=m.topMargin),d===n.rightSize-1?o.right=a:a+=t.schPinSpacing,A++}a=0;for(let d=0;d<n.topSize;d++){const p=r({side:"top",sideIndex:d,truePinIndex:A}),m=t.numericSchPinStyle?.[`pin${p}`]??t.numericSchPinStyle?.[p];m?.rightMargin&&(a+=m.rightMargin),s.push({trueIndex:p-1,pinNumber:p,side:"top",distanceFromOrthogonalEdge:a}),m?.leftMargin&&(a+=m.leftMargin),d===n.topSize-1?o.top=a:a+=t.schPinSpacing,A++}let c=t.schWidth;if(c===void 0){c=Math.max(o.top+G0e,o.bottom+G0e),t.pinLabels&&s.filter(I=>I.side==="left"||I.side==="right").some(I=>t.pinLabels?.[`pin${I.pinNumber}`]||t.pinLabels?.[I.pinNumber])&&(c=Math.max(c,.5));const d=t.pinLabels?Math.max(...Object.values(t.pinLabels).map(_=>_.length*ADt)):0,p=d>0?1.1:0;c=Math.max(c,d+p);const m={left:0,right:0};for(const _ of s){if(_.side!=="left"&&_.side!=="right")continue;const f=t.pinLabels?.[`pin${_.pinNumber}`]??t.pinLabels?.[_.pinNumber];m[_.side]=Math.max(m[_.side],s6o(f))}c=Math.max(c,m.left+m.right+2*cDt)}let l=t.schHeight;if(l||(l=Math.max(o.left+G0e,o.right+G0e)),t.pinLabels){const p=cDt,m=.075,_=w=>{const M=t.pinLabels[`pin${w}`]??t.pinLabels[`${w}`];return M?M.length*.13:0},f=s.filter(w=>w.side==="left").map(w=>({y:o.left/2-w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=>w.len>0),I=s.filter(w=>w.side==="right").map(w=>({y:-o.right/2+w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=>w.len>0),C=s.filter(w=>w.side==="top").map(w=>({x:o.top/2-w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=>w.len>0),y=s.filter(w=>w.side==="bottom").map(w=>({x:-o.bottom/2+w.distanceFromOrthogonalEdge,len:_(w.pinNumber)})).filter(w=>w.len>0),x=(w,M)=>Math.min(w.maxX,M.maxX)>Math.max(w.minX,M.minX)&&Math.min(w.maxY,M.maxY)>Math.max(w.minY,M.minY),E=(w,M)=>({minX:-M/2+p,maxX:-M/2+p+w.len,minY:w.y-m,maxY:w.y+m}),B=(w,M)=>({minX:M/2-p-w.len,maxX:M/2-p,minY:w.y-m,maxY:w.y+m}),S=(w,M)=>({minX:w.x-m,maxX:w.x+m,minY:M/2-p-w.len,maxY:M/2-p}),Q=(w,M)=>({minX:w.x-m,maxX:w.x+m,minY:-M/2+p,maxY:-M/2+p+w.len});if(!t.schHeight){let w=!1;for(const M of C)for(const k of y)x(S(M,l),Q(k,l))&&(w=!0,l=Math.max(l,M.len+k.len+2*p));if(w){for(const M of C){const k=S(M,l);for(const R of f){const F=E(R,c);x(k,F)&&(l=Math.max(l,2*(F.maxY+p+M.len)))}for(const R of I){const F=B(R,c);x(k,F)&&(l=Math.max(l,2*(F.maxY+p+M.len)))}}for(const M of y){const k=Q(M,l);for(const R of f){const F=E(R,c);x(k,F)&&(l=Math.max(l,2*(p+M.len-F.minY)))}for(const R of I){const F=B(R,c);x(k,F)&&(l=Math.max(l,2*(p+M.len-F.minY)))}}}}}const u={left:{x:-c/2-e,y:o.left/2},bottom:{x:-o.bottom/2,y:-l/2-e},right:{x:c/2+e,y:-o.right/2},top:{x:o.top/2,y:l/2+e}},g={left:{x:0,y:-1},right:{x:0,y:1},top:{x:-1,y:0},bottom:{x:1,y:0}},h=s.map(d=>{const{distanceFromOrthogonalEdge:p,side:m}=d,_=u[m],f=g[m];return{x:_.x+p*f.x,y:_.y+p*f.y,...d}});return{getPortPositionByPinNumber(d){const p=h.find(m=>m.pinNumber.toString()===d.toString());return p||null},getSize(){return{width:c,height:l}},getSizeIncludingPins(){return{width:c+(n.leftSize||n.rightSize?.4:0),height:l+(n.topSize||n.bottomSize?.4:0)}},pinCount:i}},Kj=(t,e)=>{if(!t)return;const n={};for(const[o,i]of Object.entries(t)){const r=hO(o,e),s=i.marginLeft??i.leftMargin,a=i.marginRight??i.rightMargin,A=i.marginTop??i.topMargin,c=i.marginBottom??i.bottomMargin,u={...n[`pin${r}`]??{}};s!==void 0&&(u.leftMargin=lt.parse(s)),a!==void 0&&(u.rightMargin=lt.parse(a)),A!==void 0&&(u.topMargin=lt.parse(A)),c!==void 0&&(u.bottomMargin=lt.parse(c)),n[`pin${r}`]=u}return n},a6o=t=>t==="schematic_symbol"||t==="schematic_component"||t==="schematic_line"||t==="schematic_rect"||t==="schematic_circle"||t==="schematic_arc"||t==="schematic_text"||t==="schematic_path",aPe=t=>Array.isArray(t)&&t.length>0&&t.some(e=>a6o(e.type)),APe=t=>typeof t?.x=="number"&&Number.isFinite(t.x)&&typeof t.y=="number"&&Number.isFinite(t.y),cPe=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),A6o=t=>t.type==="schematic_component"||t.type==="schematic_port"||t.type==="schematic_line"||t.type==="schematic_rect"||t.type==="schematic_circle"||t.type==="schematic_arc"||t.type==="schematic_text"||t.type==="schematic_path",c6o=t=>{const e=t.find(i=>i.type==="schematic_component"&&APe(i.center));if(e)return e.center;const n=t.filter(A6o);if(n.length===0)return null;const o=Gj(n);return!Number.isFinite(o.minX)||!Number.isFinite(o.maxX)||!Number.isFinite(o.minY)||!Number.isFinite(o.maxY)?null:{x:(o.minX+o.maxX)/2,y:(o.minY+o.maxY)/2}},l6o=(t,e)=>{switch(t.type){case"schematic_component":case"schematic_port":case"schematic_rect":case"schematic_circle":case"schematic_arc":return APe(t.center)?{...t,center:cPe(t.center,e)}:t;case"schematic_line":return{...t,x1:t.x1-e.x,y1:t.y1-e.y,x2:t.x2-e.x,y2:t.y2-e.y};case"schematic_text":return APe(t.position)?{...t,position:cPe(t.position,e)}:t;case"schematic_path":return{...t,points:t.points.map(n=>cPe(n,e))};default:return t}},u6o=t=>{const e=c6o(t);return e?e.x===0&&e.y===0?[...t]:t.map(n=>l6o(n,e)):[...t]},uDt=t=>t.type==="schematic_line"||t.type==="schematic_rect"||t.type==="schematic_circle"||t.type==="schematic_arc"||t.type==="schematic_text"||t.type==="schematic_path",gDt=(t,e)=>{if(!(e in t))return;const n=t[e];return typeof n=="string"?n:void 0},g6o=t=>{const e=t.filter(g=>g.type==="schematic_symbol"),n=t.filter(g=>g.type==="schematic_component"),o=n.find(g=>typeof g.schematic_symbol_id=="string")?.schematic_symbol_id??e[0]?.schematic_symbol_id,i=(o?n.find(g=>g.schematic_symbol_id===o):void 0)??n[0],r=i?.schematic_component_id,s=typeof i?.source_component_id=="string"?i.source_component_id:void 0,a=(o?e.find(g=>g.schematic_symbol_id===o):void 0)??e[0],A=new Set,c=new Set,l=[],u=g=>{!g||c.has(g)||(c.add(g),l.push(g))};u(a),u(i);for(const g of t)g.type==="schematic_port"&&(!r||g.schematic_component_id!==r||(u(g),typeof g.source_port_id=="string"&&A.add(g.source_port_id)));for(const g of t){if(!uDt(g))continue;const h=gDt(g,"schematic_symbol_id"),d=gDt(g,"schematic_component_id");(o&&h===o||r&&d===r||!o&&!r)&&u(g)}for(const g of t)g.type==="source_port"&&(A.has(g.source_port_id)||s&&g.source_component_id===s)&&u(g);return l.length>0?l:t.filter(g=>g.type==="schematic_symbol"||g.type==="schematic_component"||g.type==="schematic_port"||uDt(g))},d6o=class extends Ir{isPrimitiveContainer=!0;get config(){return{componentName:"CadAssembly",zodProps:TMn}}},dDt=t=>{if(!t)return null;const e=t.match(/#ext=(\w+)$/);if(e)return e[1].toLowerCase();const o=t.split("?")[0].split("#")[0],i=o.split("/").pop()??o;return i.includes(".")?i.split(".").pop()?.toLowerCase()??null:null},h6o=(t,e)=>{const n=t.replace(/\/+$/,""),o=e.replace(/^\/+/,"");return`${n}/${o}`},hDt=(t,e)=>{if(!e||!t.startsWith("/"))return t;try{const n=new URL(e);return n.pathname!=="/"&&t.startsWith(n.pathname)?new URL(t,n.origin).toString():h6o(e,t)}catch{return t}},lPe=xo([_t(),Z()]),pDt=Pt({x:lPe,y:lPe,z:lPe}),p6o=class extends Ir{get config(){return{componentName:"CadModel",zodProps:HMn}}doInitialCadModelRender(){const t=this._findParentWithPcbComponent();if(!t||!t.pcb_component_id)return;const{db:e}=this.root,{boardThickness:n=0}=t._getBoard()??{},o=t._getPcbCircuitJsonBounds();e.pcb_component.get(t.pcb_component_id);const i=this._parsedProps;if(!i||typeof i.modelUrl!="string"&&typeof i.stepUrl!="string")return;const r=t._computePcbGlobalTransformBeforeLayout(),a=O9(r).rotation.angle*180/Math.PI,A=i.pcbRotationOffset??i.rotationOffset,c=pDt.parse({x:0,y:0,z:0});if(typeof A=="number")c.z=Number(A);else if(typeof A=="object"){const I=pDt.parse(A);c.x=Number(I.x),c.y=Number(I.y),c.z=Number(I.z)}const{pcbX:l,pcbY:u}=this.getResolvedPcbPositionProp(),g=L9.parse({x:l,y:u,z:i.pcbZ??0,...typeof i.positionOffset=="object"?i.positionOffset:{}}),h=i.zOffsetFromSurface!==void 0?lt.parse(i.zOffsetFromSurface):0,d=t.props.layer==="bottom"?"bottom":"top",p=i.modelUrl?dDt(i.modelUrl):void 0,m=i.modelUrl?.replace(/#ext=\w+$/,""),_={};if(p==="stl"?_.model_stl_url=this._addCachebustToModelUrl(m):p==="obj"?_.model_obj_url=this._addCachebustToModelUrl(m):p==="gltf"?_.model_gltf_url=this._addCachebustToModelUrl(m):p==="glb"?_.model_glb_url=this._addCachebustToModelUrl(m):p==="step"||p==="stp"?_.model_step_url=this._addCachebustToModelUrl(m):p==="wrl"||p==="vrml"?_.model_wrl_url=this._addCachebustToModelUrl(m):_.model_stl_url=this._addCachebustToModelUrl(m),i.stepUrl){const I=this._addCachebustToModelUrl(i.stepUrl);I&&(_.model_step_url=I)}const f=e.cad_component.insert({position:{x:o.center.x+Number(g.x),y:o.center.y+Number(g.y),z:(d==="bottom"?-n/2:n/2)+(d==="bottom"?-h:h)+Number(g.z)},rotation:{x:Number(c.x),y:(d==="top"?0:180)+Number(c.y),z:k9(d==="bottom"?-(a+Number(c.z)):a+Number(c.z))},pcb_component_id:t.pcb_component_id,model_board_normal_direction:i.modelBoardNormalDirection,model_origin_alignment:"center_of_component_on_board_surface",anchor_alignment:"center_of_component_on_board_surface",model_origin_position:i.modelOriginPosition,size:i.size?L9.parse(i.size):void 0,source_component_id:t.source_component_id,model_unit_to_mm_scale_factor:typeof i.modelUnitToMmScale=="number"?i.modelUnitToMmScale:void 0,show_as_translucent_model:i.showAsTranslucentModel??t._parsedProps.showAsTranslucentModel,..._});this.cad_component_id=f.cad_component_id}_findParentWithPcbComponent(){let t=this.parent;for(;t&&!t.pcb_component_id;)t=t.parent;return t}_addCachebustToModelUrl(t){if(!t)return t;const e=this.root?.platform?.projectBaseUrl,n=hDt(t,e);if(!n.includes("modelcdn.tscircuit.com"))return n;const o=this.root?.getClientOrigin()??"";return`${n}${n.includes("?")?"&":"?"}cachebust_origin=${encodeURIComponent(o)}`}},m6o=vc("tscircuit:core:footprint"),Y0e=class extends Ir{get config(){return{componentName:"Footprint",zodProps:MPn}}doInitialPcbFootprintLayout(){if(this.root?.pcbDisabled)return;const t=this.children.filter(u=>u.componentName==="Constraint");if(t.length===0)return;const{isFlipped:e}=this._getPcbPrimitiveFlippedHelpers(),n=u=>e&&"left"in u&&"right"in u?{...u,left:u.right,right:u.left}:u,o=t.flatMap(u=>u._getAllReferencedComponents().componentsWithSelectors).map(({component:u,selector:g,componentSelector:h,edge:d})=>({component:u,selector:g,componentSelector:h,edge:d,bounds:u._getPcbCircuitJsonBounds()}));if(o.some(u=>u.edge))throw new Error("edge constraints not implemented yet for footprint layout, contributions welcome!");function i(u){return o.find(({selector:g})=>g===u)}const r=new qpt,s={};function a(u){return u in s||(s[u]=new gse(u),r.addEditVariable(s[u],wg.weak)),s[u]}for(const{selector:u,bounds:g}of o){const h=a(`${u}_x`),d=a(`${u}_y`);r.suggestValue(h,g.center.x),r.suggestValue(d,g.center.y)}for(const u of t){const g=u._parsedProps;if("xDist"in g){const{xDist:h,left:d,right:p,edgeToEdge:m,centerToCenter:_}=n(g),f=a(`${d}_x`),I=a(`${p}_x`),C=i(d)?.bounds,y=i(p)?.bounds;if(_){const x=new Gh(I,[-1,f]);r.addConstraint(new ux(x,V_.Eq,g.xDist,wg.required))}else if(m){const x=new Gh(I,-y.width/2,[-1,f],-C.width/2);r.addConstraint(new ux(x,V_.Eq,g.xDist,wg.required))}}else if("yDist"in g){const{yDist:h,top:d,bottom:p,edgeToEdge:m,centerToCenter:_}=g,f=a(`${d}_y`),I=a(`${p}_y`),C=i(d)?.bounds,y=i(p)?.bounds;if(_){const x=new Gh(f,[-1,I]);r.addConstraint(new ux(x,V_.Eq,g.yDist,wg.required))}else if(m){const x=new Gh(f,C.height/2,[-1,I],-y.height/2);r.addConstraint(new ux(x,V_.Eq,g.yDist,wg.required))}}else if("sameY"in g){const{for:h}=g;if(h.length<2)continue;const d=h.map(m=>a(`${m}_y`)),p=new Gh(...d.slice(1));r.addConstraint(new ux(p,V_.Eq,d[0],wg.required))}else if("sameX"in g){const{for:h}=g;if(h.length<2)continue;const d=h.map(m=>a(`${m}_x`)),p=new Gh(...d.slice(1));r.addConstraint(new ux(p,V_.Eq,d[0],wg.required))}}r.updateVariables(),m6o.enabled&&(console.log("Solution to layout constraints:"),console.table(Object.entries(s).map(([u,g])=>({var:u,val:g.value()}))));const A={left:1/0,right:-1/0,top:-1/0,bottom:1/0};for(const{selector:u,bounds:{width:g,height:h}}of o){const d=a(`${u}_x`),p=a(`${u}_y`),m=d.value()-g/2,_=d.value()+g/2,f=p.value()+h/2,I=p.value()-h/2;A.left=Math.min(A.left,m),A.right=Math.max(A.right,_),A.top=Math.max(A.top,f),A.bottom=Math.min(A.bottom,I)}const c={x:-(A.right+A.left)/2,y:-(A.top+A.bottom)/2},l=this.getPrimitiveContainer()._getGlobalPcbPositionBeforeLayout();c.x+=l.x,c.y+=l.y;for(const{component:u,selector:g}of o){const h=a(`${g}_x`),d=a(`${g}_y`);u._setPositionFromLayout({x:h.value()+c.x,y:d.value()+c.y})}}},_6o=t=>{const{db:e}=t.root;if(t.pcb_component_id){const n=e.pcb_component.get(t.pcb_component_id);return n?{width:n.width,height:n.height}:null}if(t.pcb_group_id){const n=e.pcb_group.get(t.pcb_group_id);if(!n)return null;if(n.outline&&n.outline.length>0){const o=Oh(n.outline);return o?{width:o.maxX-o.minX,height:o.maxY-o.minY}:null}return{width:n.width??0,height:n.height??0}}return null},f6o=(t,e)=>{const{db:n}=t.root,o=n.toArray();if(t.pcb_component_id){smt(o,t.pcb_component_id,e);return}if(t.source_group_id){Amt(o,t.source_group_id,e);return}throw new Error(`Cannot reposition component ${t.getString()}: no pcb_component_id or source_group_id`)},I6o="MARKED INTERNALLY CONNECTED",C6o=.12,y6o=.05,mDt=.12,x6o=t=>{const{db:e}=t.root,n={pcb_component_id:t.pcb_component_id};return e.pcb_fabrication_note_text.list(n).length>0||e.pcb_fabrication_note_path.list(n).length>0||e.pcb_fabrication_note_rect.list(n).length>0||e.pcb_fabrication_note_dimension.list(n).length>0},E6o=t=>{let e={from:t[0],to:t[1],length:-1/0};for(let s=1;s<t.length;s++){const a=t[s-1],A=t[s],c=Math.hypot(A.x-a.x,A.y-a.y);c>e.length&&(e={from:a,to:A,length:c})}const n=e.to.x-e.from.x,o=e.to.y-e.from.y,i=Math.max(e.length,Number.EPSILON);let r=Math.atan2(o,n)*180/Math.PI;return r>90&&(r-=180),r<-90&&(r+=180),{anchorPosition:{x:(e.from.x+e.to.x)/2-o/i*mDt,y:(e.from.y+e.to.y)/2+n/i*mDt},ccwRotation:(r%360+360)%360}},B6o=t=>{const e=t.root;if(!e||e.pcbDisabled||!t.pcb_component_id||t.componentName==="SolderJumper"||x6o(t))return;const{db:n}=e,o=n.pcb_component.get(t.pcb_component_id);if(!o)return;const i=o.layer;if(i!=="top"&&i!=="bottom")return;const r=t.getSubcircuit()?.subcircuit_id??void 0,s=t.getGroup()?.pcb_group_id??void 0;for(const a of t._getInternallyConnectedPins()){const A=a.flatMap(g=>{if(!g?.pcb_port_id)return[];const h=n.pcb_port.get(g.pcb_port_id);return h?[{x:h.x,y:h.y}]:[]}),c=A.filter((g,h)=>A.findIndex(d=>d.x===g.x&&d.y===g.y)===h);if(c.length<2)continue;const{anchorPosition:l,ccwRotation:u}=E6o(c);n.pcb_fabrication_note_path.insert({pcb_component_id:t.pcb_component_id,subcircuit_id:r,layer:i,route:c,stroke_width:y6o}),n.pcb_fabrication_note_text.insert({pcb_component_id:t.pcb_component_id,pcb_group_id:s,subcircuit_id:r,font:"tscircuit2024",font_size:C6o,text:I6o,ccw_rotation:u,layer:i,anchor_position:l,anchor_alignment:"center"})}},b6o={simple_ammeter:["A"],simple_battery:["B","BT"],simple_capacitor:["C"],simple_chip:["U","IC"],simple_connector:["J","P","CONN"],simple_crystal:["Y","X"],simple_current_source:["I","IS"],simple_diode:["D"],simple_fuse:["F"],simple_inductor:["L","FB"],simple_interconnect:["ICN"],simple_led:["D","LED"],simple_mosfet:["Q"],simple_op_amp:["U","IC"],simple_pin_header:["J","P","JP"],simple_pinout:["J","P"],simple_potentiometer:["RV","RP"],simple_power_source:["B","BT","V","VS"],simple_push_button:["SW","S"],simple_resistor:["R"],simple_resonator:["Y","X"],simple_switch:["SW","S"],simple_test_point:["TP"],simple_transistor:["Q"],simple_voltage_probe:["VP"],simple_voltage_source:["V","VS"]},_Dt=t=>{if(t)return b6o[t]},S6o=t=>t.match(/^[A-Za-z]+/)?.[0]?.toUpperCase(),Q6o=[{prefix:"J",recommendation:"a <connector /> or <jumper />"},{prefix:"Q",recommendation:"a <transistor />"},{prefix:"C",recommendation:"a <capacitor />"},{prefix:"R",recommendation:"a <resistor />"},{prefix:"L",recommendation:"an <inductor />"},{prefix:"Y",recommendation:"a <crystal />"},{prefix:"X",recommendation:"a <crystal />"},{prefix:"F",recommendation:"a <fuse />"},{prefix:"S",recommendation:"a <switch /> or <pushbutton />"},{prefix:"TP",recommendation:"a <testpoint />"}],v6o=t=>{const{db:e}=t.root;if(!t.source_component_id)return;const n=e.source_component.get(t.source_component_id);if(!n?.name||!n.ftype)return;const o=S6o(n.name),i=t.componentName==="Chip"&&n.ftype==="simple_chip"&&o!==void 0?Q6o.find(({prefix:A})=>o.startsWith(A)):void 0,r=t.getRefDesPrefixes()??(i?_Dt("simple_chip"):void 0);if(!r||r.length===0||o&&r.includes(o))return;const s=r.length===1?r[0]:`one of ${r.join(", ")}`,a=i?`The "${i.prefix}" prefix is being used with a <chip />, try using it with ${i.recommendation}`:`Component ${n.name} has ftype="${n.ftype}" but reference designator should start with ${s}`;e.insert({type:"source_refdes_convention_warning",warning_type:"source_refdes_convention_warning",message:a,source_component_id:n.source_component_id,refdes:n.name,source_component_ftype:n.ftype,expected_prefixes:r,actual_prefix:o,subcircuit_id:n.subcircuit_id})},fDt=new WeakMap,w6o=t=>{const e=fDt.get(t);if(e)return e;const n=new Map;return fDt.set(t,n),n},P6o=new Set(["a","anode","pos","positive","+"]),M6o=new Set(["c","k","cathode","neg","negative","-"]),IDt=t=>t.toLowerCase().replace(/[^a-z0-9+-]/g,""),CDt=(t,e)=>{const n=t.filter(o=>o.type==="source_port"&&(!e||o.source_component_id===e));return n.find(o=>o.pin_number===1)??n.find(o=>[o.name,...o.port_hints??[]].map(IDt).includes("pin1"))??null},yDt=t=>{if(!t)return null;const e=[t.name,...t.port_hints??[]].map(IDt),n=e.some(i=>P6o.has(i)),o=e.some(i=>M6o.has(i));return n===o?null:n?"anode":"cathode"},D6o=t=>{if(!t)return[];const e=[];for(const n of Object.keys(t)){const o=t[n]?.[0];o&&e.push({supplierName:n,supplierPartNumber:o})}return e},N6o=t=>{if(typeof t!="string")return null;const e=t.match(/(?:^|_)pin1location\((leftside|rightside|topside|bottomside),(left|right|top|bottom)\)(?:_|$)/i);if(!e)return null;const n=pV.safeParse(`${e[1].toLowerCase()}_${e[2].toLowerCase()}`);return n.success?n.data:null},R6o=({component:t,pcbComponent:e,pcbElements:n})=>{const o=-e.rotation*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=b0e({componentLayer:e.layer,originalLayer:t._getFootprintOriginalLayer()}),a=A=>{const c=A.x-e.center.x,l=A.y-e.center.y,u=s?-l:l;return{x:c*i-u*r,y:c*r+u*i}};return n.map(A=>{const c=structuredClone(A);if(typeof c.x=="number"&&typeof c.y=="number"){const l=a(c);c.x=l.x,c.y=l.y}return c.points&&(c.points=c.points.map(a)),c})},T6o=({supplierName:t,supplierPartNumber:e})=>`part-orientation-analysis:v3:${t}:${e}`,k6o=async({cacheKey:t,component:e})=>{const n=await e.root?.platform?.localCacheEngine?.getItem(t);if(!n)return{cacheHit:!1};try{const o=JSON.parse(n),i=pV.safeParse(o.pin1_location),r=o.pin1_location===null?null:i.success?i.data:void 0,s=o.pin1_polarity===null||o.pin1_polarity==="anode"||o.pin1_polarity==="cathode"?o.pin1_polarity:void 0;return r===void 0||s===void 0?{cacheHit:!1}:{cacheHit:!0,analysis:{pin1Location:r,pin1Polarity:s}}}catch{return{cacheHit:!1}}},F6o=async({component:t,partsEngine:e,supplierPartCandidate:n})=>{const o=T6o(n),i=await k6o({cacheKey:o,component:t});if(i.cacheHit)return i.analysis;const r=w6o(e),s=r.get(o);if(s)return s;const a=(async()=>{const A=await Promise.resolve(e.fetchPartCircuitJson({supplierPartNumber:n.supplierPartNumber,platformFetch:t.root?.platform?.platformFetch}));if(!A?.length)return{pin1Location:null,pin1Polarity:null};const c=dmt(A),l=yDt(CDt(A));try{await t.root?.platform?.localCacheEngine?.setItem(o,JSON.stringify({pin1_location:c,pin1_polarity:l}))}catch{}return{pin1Location:c,pin1Polarity:l}})().finally(()=>{r.delete(o)});return r.set(o,a),a},L6o=t=>{if(!t.root?.platform?.enablePartOrientationAnalysis||t.root.pcbDisabled||t.props.doNotPlace||!t.pcb_component_id)return;const{db:e}=t.root,n=e.pcb_component.get(t.pcb_component_id);if(!n)return;const o=[...e.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}),...e.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id})],i=N6o(t.resolveFootprint())??dmt(R6o({component:t,pcbComponent:n,pcbElements:o}));if(i&&e.pcb_component.update(t.pcb_component_id,{pin1_location:i}),t.getInheritedProperty("bomDisabled")||t.getInheritedProperty("partsEngineDisabled"))return;const r=t.getInheritedProperty("partsEngine");if(!r?.fetchPartCircuitJson)return;const s=e.source_component.get(t.source_component_id),A=s?.ftype==="simple_diode"||s?.ftype==="simple_led"?CDt(e.source_port.list(),t.source_component_id??void 0):null,c=yDt(A),l=D6o(s?.supplier_part_numbers);l.length!==0&&(t._hasStartedPartOrientationAnalysis||(t._hasStartedPartOrientationAnalysis=!0,t._queueAsyncEffect("analyze-part-orientation",async()=>{const u={};for(const g of l)try{const{pin1Location:h,pin1Polarity:d}=await F6o({component:t,partsEngine:r,supplierPartCandidate:g});if(h&&(u[g.supplierName]=h),c&&d&&c!==d){const p=dV.parse({type:"source_component_misconfigured_error",error_type:"source_component_misconfigured_error",message:`${t.getString()} maps pin 1 to the ${c}, but supplier part ${g.supplierName}:${g.supplierPartNumber} maps pin 1 to the ${d}. Update pinLabels or use a supplier part with matching diode polarity.`,source_component_ids:[t.source_component_id],source_port_ids:A?.source_port_id?[A.source_port_id]:void 0});t.root.db.source_component_misconfigured_error.insert(p)}}catch{}t._asyncSupplierPin1LocationMap=u,t._markDirty("PartOrientationAnalysis")})))},H6o=t=>{const e=t._asyncSupplierPin1LocationMap;if(!e||!t.pcb_component_id)return;const{db:n}=t.root,o=n.pcb_component.get(t.pcb_component_id);!o||Object.keys(e).length===0||n.pcb_component.update(t.pcb_component_id,{supplier_pin1_location_map:{...o.supplier_pin1_location_map,...e}})};function O6o(t){if(t.root?.pcbDisabled||!t.pcb_component_id)return;const{pcbX:e,pcbY:n}=t._parsedProps,o=t.props?.pcbPositionAnchor;if(!o||e===void 0&&n===void 0)return;const i=L0e(t.children);if(i.width===0||i.height===0)return;const s={...{x:(i.minX+i.maxX)/2,y:(i.minY+i.maxY)/2}};let a=null;if(new Set(["center","top_left","top_center","top_right","center_left","center_right","bottom_left","bottom_center","bottom_right"]).has(o)){const l={left:i.minX,right:i.maxX,top:i.minY,bottom:i.maxY};switch(o){case"center":a=s;break;case"top_left":a={x:l.left,y:l.top};break;case"top_center":a={x:s.x,y:l.top};break;case"top_right":a={x:l.right,y:l.top};break;case"center_left":a={x:l.left,y:s.y};break;case"center_right":a={x:l.right,y:s.y};break;case"bottom_left":a={x:l.left,y:l.bottom};break;case"bottom_center":a={x:s.x,y:l.bottom};break;case"bottom_right":a={x:l.right,y:l.bottom};break}}else try{const l=t.portMap[o];l&&(a=l._getGlobalPcbPositionBeforeLayout())}catch{}if(!a)return;const c={...s};e!==void 0&&(c.x+=e-a.x),n!==void 0&&(c.y+=n-a.y),(Math.abs(c.x-s.x)>1e-6||Math.abs(c.y-s.y)>1e-6)&&t._repositionOnPcb(c)}var xDt=t=>{const e=t.find(i=>i.type==="cad_component");if(!e)return;const n={stlUrl:e.model_stl_url,objUrl:e.model_obj_url,gltfUrl:e.model_gltf_url,glbUrl:e.model_glb_url,stepUrl:e.model_step_url,wrlUrl:e.model_wrl_url,modelOriginPosition:e.model_origin_position??void 0,modelUnitToMmScale:e.model_unit_to_mm_scale_factor,modelBoardNormalDirection:e.model_board_normal_direction,size:e.size??void 0,rotationOffset:e.rotation??void 0,positionOffset:e.position??void 0,showAsTranslucentModel:e.show_as_translucent_model};if(!n.stlUrl&&!n.objUrl&&!n.gltfUrl&&!n.glbUrl&&!n.stepUrl&&!n.wrlUrl&&!e.model_jscad)return;e.model_jscad&&typeof e.model_jscad=="object"&&(n.jscad=e.model_jscad);const o=kxe.safeParse(n);return o.success?o.data:void 0},G6o=vc("tscircuit:core:resolveStaticFileImport");async function EDt(t,e){if(!t)return t;const n=t.startsWith("./")?t.slice(1):t,o=e?.resolveProjectStaticFileImportUrl;if(o&&(t.startsWith("/")||t.startsWith("./")))try{const i=await o(n);if(i)return i}catch(i){G6o("failed to resolve static file via platform resolver",i)}return hDt(n,e?.projectBaseUrl)}var dw=t=>t.startsWith("blob:"),hw=t=>t.startsWith("http://")||t.startsWith("https://"),Vj=t=>t.startsWith("/")||t.startsWith("./"),fO=t=>{if(hw(t)||dw(t))return null;const e=t.indexOf(":");if(e<=0)return null;const n=t.slice(0,e),o=t.slice(e+1);return!n||!o?null:{footprintLib:n,footprintName:o}},Y6o=Gxe.shape.supplierPartNumbers.unwrap().keySchema.options,U6o=t=>t.componentName==="Symbol"||t.isSchematicPrimitive,K6o=(t,e,n)=>{if(t.getInheritedProperty("partsEngineDisabled"))return;const o=t.props.supplierPartNumbers,i=Y6o.find(A=>A===e);if(!i||!o?.[i]?.includes(n))return;const a=t.getInheritedProperty("partsEngine")?.fetchPartCircuitJson;if(a)return async A=>({footprintCircuitJson:await a({supplierPartNumber:A,platformFetch:t.root?.platform?.platformFetch})??[]})},V6o=async(t,e,n)=>{if(!t)throw new Error(`No footprint resolver is configured for library "${e}".`);return t(n)};function z6o(t,e){const n=t.resolveFootprint();if(!n)return;const{pcbRotation:o,pcbPinLabels:i}=t.props,r=t._resolvePinLabels(),s=dDt(String(n)),a=s?t.root?.platform?.footprintFileParserMap?.[s]:null;if(typeof n=="string"&&(hw(n)||dw(n)||Vj(n))&&a){if(t._hasStartedFootprintUrlLoad)return;t._hasStartedFootprintUrlLoad=!0,e("load-footprint-from-platform-file-parser",async()=>{const A=hw(n)||dw(n)?n:await EDt(n,t.root?.platform);try{const c=await a.loadFromUrl(A),l=Db({componentName:t.name,componentRotation:o,footprinterString:A,pinLabels:r,pcbPinLabels:i},c.footprintCircuitJson);t.addAll(l);for(const u of t.children)u.componentName==="Port"&&u._markDirty("PcbPortRender");t._markDirty("ResolveFootprintPinLabels"),t._markDirty("InitializePortsFromChildren")}catch(c){const l=t.root?.db;if(l&&t.source_component_id&&t.pcb_component_id){const u=t.getSubcircuit(),g=`${t.getString()} failed to load footprint "${A}": `+(c instanceof Error?c.message:String(c)),h=mV.parse({type:"external_footprint_load_error",message:g,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:u.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,footprinter_string:A});l.external_footprint_load_error.insert(h)}throw c}});return}if(typeof n=="string"&&hw(n)){if(t._hasStartedFootprintUrlLoad)return;t._hasStartedFootprintUrlLoad=!0;const A=n;e("load-footprint-url",async()=>{try{const c=await fetch(A);if(!c.ok)throw new Error(`Failed to fetch footprint: ${c.status}`);const l=await c.json(),u=Db({componentName:t.name,componentRotation:o,footprinterString:A,pinLabels:r,pcbPinLabels:i},l);t.addAll(u),t._markDirty("ResolveFootprintPinLabels"),t._markDirty("InitializePortsFromChildren")}catch(c){const l=t.root?.db;if(l&&t.source_component_id&&t.pcb_component_id){const u=t.getSubcircuit(),g=`${t.getString()} failed to load external footprint "${A}": `+(c instanceof Error?c.message:String(c)),h=mV.parse({type:"external_footprint_load_error",message:g,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:u.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,footprinter_string:A});l.external_footprint_load_error.insert(h)}throw c}});return}if(!(typeof n=="string"&&dw(n))){if(typeof n=="string"){const A=fO(n);if(!A||t._hasStartedFootprintUrlLoad)return;t._hasStartedFootprintUrlLoad=!0;const l=t.root?.platform?.footprintLibraryMap?.[A.footprintLib],u=typeof l=="function"?l:void 0,g=K6o(t,A.footprintLib,A.footprintName),h=u??g;e("load-lib-footprint",async()=>{try{const d=await V6o(h,A.footprintLib,A.footprintName);let p=null;if(Array.isArray(d)?p=d:Array.isArray(d.footprintCircuitJson)&&(p=d.footprintCircuitJson),!p||p.length===0)throw new Error(`Footprint resolver returned no circuit elements for "${n}".`);const m=Db({componentName:t.name,componentRotation:o,footprinterString:n,pinLabels:r,pcbPinLabels:i},p),_=new Y0e({src:n}),f=[];for(const I of m)U6o(I)?f.push(I):_.add(I);t.add(_),t.addAll(f),t._asyncFootprintCadModel=!Array.isArray(d)&&d.cadModel||xDt(p);for(const I of t.children)I.componentName==="Port"&&I._markDirty?.("PcbPortRender");t._markDirty("ResolveFootprintPinLabels"),t._markDirty("InitializePortsFromChildren")}catch(d){const p=t.root?.db;if(p&&t.source_component_id&&t.pcb_component_id){const m=t.getSubcircuit(),_=`${t.getString()} failed to load external footprint "${n}": `+(d instanceof Error?d.message:String(d)),f=mV.parse({type:"external_footprint_load_error",message:_,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:m.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,footprinter_string:n});p.external_footprint_load_error.insert(f)}throw d}});return}if(!ee.isValidElement(n)&&n.componentName==="Footprint"&&t.add(n),Array.isArray(n)&&!ee.isValidElement(n)&&n.length>0){try{const A=Db({componentName:t.name,componentRotation:o,footprinterString:"",pinLabels:r,pcbPinLabels:i},n);t.addAll(A)}catch(A){const c=t.root?.db;if(c&&t.source_component_id&&t.pcb_component_id){const l=t.getSubcircuit(),u=`${t.getString()} failed to load json footprint: `+(A instanceof Error?A.message:String(A)),g=exe.parse({type:"circuit_json_footprint_load_error",message:u,pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,subcircuit_id:l.subcircuit_id??void 0,pcb_group_id:t.getGroup()?.pcb_group_id??void 0});c.circuit_json_footprint_load_error.insert(g)}throw A}return}}}function J6o(t){const e=t._impliedFootprintPinLabels??{},n={},o=t.getPortsFromFootprint({allowImplicitPinNumbers:!t._parsedProps.pinLabels});for(const r of o){const s=r._parsedProps.pinNumber;if(s===void 0)continue;const a=new Set([`pin${s}`,`${s}`]),A=r.getNameAndAliases().filter(c=>!a.has(c));A.length>0&&(n[`pin${s}`]=A)}const i={...n};for(const[r,s]of Object.entries(e))i[r]=Array.isArray(s)?s:[s];if(t._impliedFootprintPinLabels=i,Object.keys(t._impliedFootprintPinLabels).length!==0)for(const r of t.children){if(r.componentName!=="Port")continue;const s=r,a=s._parsedProps.pinNumber;if(a===void 0)continue;const A=`pin${a}`,c=t._impliedFootprintPinLabels[A];if(!c)continue;const l=Array.isArray(c)?c:[c],u=s.getNameAndAliases();for(const g of l)u.includes(g)||s.externallyAddedAliases.push(g)}}function W6o(t){if(t.root?.schematicDisabled||t.getCollapsedSchematicBoxAncestor()||t._parsedProps?.noSchematicRepresentation===!0)return;const{db:e}=t.root;if(t._invalidPinLabelMessages?.length&&t.root?.db)for(const a of t._invalidPinLabelMessages){let A="pinLabels";const c=a.match(/^Invalid pin label:\s*([^=]+)=\s*'([^']+)'/);c&&(A=`pinLabels['${c[2]}']`),t.root.db.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:A,message:a,error_type:"source_property_ignored_warning"})}t._parsedProps.schPinSpacing!==void 0&&t.root?.db&&t.root.db.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:"schPinSpacing",error_type:"source_property_ignored_warning",message:"schPinSpacing is deprecated and will be ignored. Pin spacing is always 0.2."});const{schematicSymbolName:n}=t.config,{_parsedProps:o}=t,i=t.children.some(a=>a.componentName==="Symbol");if(o.symbol&&ee.isValidElement(o.symbol)||i)t._doInitialSchematicComponentRenderWithReactSymbol(o.symbol);else if(n)t._doInitialSchematicComponentRenderWithSymbol();else{const a=t._getSchematicBoxDimensions();a&&t._doInitialSchematicComponentRenderWithSchematicBoxDimensions(a)}const r=t.getSubcircuit()?._getSchematicManualPlacementForComponent(t);if(t.schematic_component_id&&(t.props.schX!==void 0||t.props.schY!==void 0)&&r){if(!t.schematic_component_id)return;const a=F2e.parse({type:"schematic_manual_edit_conflict_warning",schematic_manual_edit_conflict_warning_id:`schematic_manual_edit_conflict_${t.source_component_id}`,message:`${t.getString()} has both manual placement and prop coordinates. schX and schY will be used. Remove schX/schY or clear the manual placement.`,schematic_component_id:t.schematic_component_id,source_component_id:t.source_component_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id});e.schematic_manual_edit_conflict_warning.insert(a)}const s=t._parsedProps?.schSheetName??t.props.schSheetName;s&&t.source_component_id&&!t._resolveSchematicSheetId()&&e.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:"schSheetName",error_type:"source_property_ignored_warning",subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,message:`${t.getString()} references schSheetName "${s}", which does not match any schematic sheet and will be ignored.`})}function j6o(t){const e=t.font_size,n=t.text.length*e*.6,o=e,i=t.anchor_alignment||"center";let r=t.anchor_position.x,s=t.anchor_position.y;switch(i){case"top_left":r=t.anchor_position.x+n/2,s=t.anchor_position.y+o/2;break;case"top_center":r=t.anchor_position.x,s=t.anchor_position.y+o/2;break;case"top_right":r=t.anchor_position.x-n/2,s=t.anchor_position.y+o/2;break;case"center_left":r=t.anchor_position.x+n/2,s=t.anchor_position.y;break;case"center":r=t.anchor_position.x,s=t.anchor_position.y;break;case"center_right":r=t.anchor_position.x-n/2,s=t.anchor_position.y;break;case"bottom_left":r=t.anchor_position.x+n/2,s=t.anchor_position.y-o/2;break;case"bottom_center":r=t.anchor_position.x,s=t.anchor_position.y-o/2;break;case"bottom_right":r=t.anchor_position.x-n/2,s=t.anchor_position.y-o/2;break;default:r=t.anchor_position.x,s=t.anchor_position.y;break}return{x:r-n/2,y:s-o/2,width:n,height:o}}function $6o(t){if(!t._adjustSilkscreenTextAutomatically||t.root?.pcbDisabled||!t.pcb_component_id)return;const{db:e}=t.root,o=t._getPcbCircuitJsonBounds().center;let i=e.pcb_silkscreen_text.list({pcb_component_id:t.pcb_component_id}).filter(A=>A.text===t.name);if(i.length===0)return;const a=t.getSubcircuit().selectAll("[_isNormalComponent=true]").filter(A=>A!==t&&A.pcb_component_id).map(A=>{const c=A._getPcbCircuitJsonBounds(),l={center:c.center,width:c.width,height:c.height};return yV(l)});for(const A of i){const c=A.anchor_position,l=j6o(A),u={center:{x:l.x+l.width/2,y:l.y+l.height/2},width:l.width,height:l.height},g=yV(u);if(!a.some(I=>z4(g,I)))continue;const d=2*o.x-c.x,p=2*o.y-c.y,m={center:{x:d,y:p},width:l.width,height:l.height},_=yV(m);a.some(I=>z4(_,I))||e.pcb_silkscreen_text.update(A.pcb_silkscreen_text_id,{anchor_position:{x:d,y:p}})}}var q6o=t=>{const{db:e}=t.root;if(!t.source_component_id)return;const n=t.selectAll("port"),o=e.source_trace.list(),i=new Set;for(const s of o)for(const a of s.connected_source_port_ids)i.add(a);const r=t._getInternallyConnectedPins();for(const s of r)if(s.some(a=>a.source_port_id&&i.has(a.source_port_id)))for(const a of s)a.source_port_id&&i.add(a.source_port_id);for(const s of n)!s.source_port_id||!X6o(t,s)||e.source_port.get(s.source_port_id)?.do_not_connect||i.has(s.source_port_id)||e.source_pin_missing_trace_warning.insert({message:`Port ${s.getNameAndAliases()[0]} on ${t.props.name} is missing a trace`,source_component_id:t.source_component_id,source_port_id:s.source_port_id,subcircuit_id:t.getSubcircuit().subcircuit_id??void 0,warning_type:"source_pin_missing_trace_warning"})},X6o=(t,e)=>{if(t.config.componentName==="Interconnect")return!1;if(t.config.componentName==="Chip"){const n=t.props.pinAttributes;if(!n)return!1;for(const o of e.getNameAndAliases()){const i=n[o];if(i?.requiresPower||i?.requiresGround||i?.requiresVoltage!==void 0)return!0}return!1}return!0},Z6o=.8,e8o=Gxe.shape.supplierPartNumbers.unwrap().keySchema.options,t8o=t=>t.type==="pcb_smtpad"||t.type==="pcb_plated_hole",n8o=t=>Number.isFinite(t.minX)&&Number.isFinite(t.minY)&&Number.isFinite(t.maxX)&&Number.isFinite(t.maxY)&&t.maxX>t.minX&&t.maxY>t.minY,BDt=t=>{const e=t.filter(t8o);if(e.length===0)return null;const n=H8(e);return n8o(n)?n:null},bDt=t=>({width:t.maxX-t.minX,height:t.maxY-t.minY}),SDt=(t,e,n)=>{const o=bDt(t),i=bDt(e),r=n?.rotateB?i.height:i.width,s=n?.rotateB?i.width:i.height,a=Math.min(o.width,r),A=Math.min(o.height,s),c=a*A,l=o.width*o.height+r*s-c;return l<=0?0:c/l},o8o=(t,e)=>Math.max(SDt(t,e),SDt(t,e,{rotateB:!0})),i8o=t=>{if(!t)return[];const e=[];for(const n of e8o){const o=t[n];if(Array.isArray(o))for(const i of o)i&&e.push({supplierName:n,supplierPartNumber:i})}return e};function r8o(t){if(t.root?.pcbDisabled||t.props.doNotPlace||t.props.footprint===void 0||t.getInheritedProperty("bomDisabled")||t.getInheritedProperty("partsEngineDisabled"))return;const e=t.getInheritedProperty("partsEngine");if(!e?.fetchPartCircuitJson)return;const{db:n}=t.root,o=n.source_component.get(t.source_component_id);if(!o?.supplier_part_numbers||!t.pcb_component_id||t._hasStartedSupplierFootprintMismatchWarningCheck)return;const i=i8o(o.supplier_part_numbers);if(i.length===0)return;const r=[...n.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}),...n.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id})],s=BDt(r);s&&(t._hasStartedSupplierFootprintMismatchWarningCheck=!0,t._queueAsyncEffect("check-supplier-footprint-mismatch",async()=>{const{db:a}=t.root,A=e.fetchPartCircuitJson;for(const c of i){const{supplierName:l,supplierPartNumber:u}=c;try{const g=await Promise.resolve(A({supplierPartNumber:u}))??null;if(!g?.length)continue;const h=BDt(g);if(!h)continue;const d=o8o(s,h);if(d>=Z6o)return;const p=typeof t.props.footprint=="string"?`"${t.props.footprint}"`:"the provided footprint",m=Number(d.toFixed(4)),_=nxe.parse({type:"supplier_footprint_mismatch_warning",message:`${t.getString()} footprint ${p} does not match supplier footprint ${l}:${u} (copper IoU ${m}).`,source_component_id:t.source_component_id,pcb_component_id:t.pcb_component_id,pcb_group_id:t.getGroup()?.pcb_group_id??void 0,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,supplier_name:l,supplier_part_number:u,footprint_copper_intersection_over_union:m});a.supplier_footprint_mismatch_warning.insert(_);return}catch(g){const h=g instanceof Error?g.message:String(g),d=hV.parse({type:"source_part_not_found_warning",message:`Failed to fetch supplier footprint for ${t.getString()} (${l}:${u}): ${h}`,source_component_id:t.source_component_id??void 0,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,supplier_name:l,supplier_part_number:u});a.source_part_not_found_warning.insert(d);return}}}))}var QDt=(t,e)=>{const n=t._parsedProps.pinNumber,o=e._parsedProps.pinNumber;return n!==void 0&&o!==void 0&&n!==o?!1:t.isMatchingAnyOf(e.getNameAndAliases())},s8o=(t,e)=>{const n=t.toSorted(),o=e.toSorted();return n.length===o.length&&n.every((i,r)=>i===o[r])},a8o=t=>t.getNameAndAliases().find(e=>/^pin\d+$/.test(e))??null,A8o=(t,e)=>{if(!t._isPrimaryPort&&t.props.name||t.props.name&&(e.get(t.props.name)??0)<=1)return t.props.name;const n=a8o(t);return n||(t.props.name??null)};function vDt(t,e){const n=new Map;for(const o of t)for(const i of new Set(o.getNameAndAliases()))/^(pin)?\d+$/.test(i)||!o._isPrimaryPort&&i===o.props.name||(n.has(i)||n.set(i,[]),n.get(i).push(o));for(const o of n.values()){const i=Array.from(new Set(o));if(i.length<2)continue;const r=new Map;for(const A of i)A.props.name&&r.set(A.props.name,(r.get(A.props.name)??0)+1);const s=i.map(A=>A8o(A,r)).filter(A=>!!A),a=Array.from(new Set(s));a.length<2||e.some(A=>s8o(A,a))||e.push(a)}}function wDt(t,e){let n=1;const o=new Map;for(const r of t){const s=r.hints.filter(u=>u&&u.trim()!=="");if(s.length===0)continue;let a=s;if(!a.some(u=>u.startsWith("pin")||/^(?:pin)?\d+$/.test(u))){const u=a.map(g=>e?.implicitPinNumberByHint?.get(g)).find(g=>g!==void 0);if(u!==void 0)a=[...a,`pin${u}`];else{if(e?.allowImplicitPinNumbers===!1)continue;a=[...a,`pin${n}`]}}n++;const c=O0e(a,e);if(!c)continue;c.originDescription=r.originDescription;const l=c._parsedProps.pinNumber;l!==void 0&&(o.has(l)||o.set(l,[]),o.get(l).push({port:c,component:r.component}))}const i=[];for(const[r,s]of o){const a=(g,h)=>{const d=h.getNameAndAliases().filter(p=>!g.getNameAndAliases().includes(p));g.externallyAddedAliases.push(...d)},A=s[0].port,c=s.filter(g=>!!g.component);if(c.length!==s.length){for(const g of s.slice(1))a(A,g.port);i.push(A);continue}const l=p7o(c.map(g=>g.component));if(l.length<=1){for(const g of s.slice(1))a(A,g.port);i.push(A);continue}const u=[A.props.name];for(const[g,h]of l.entries()){const d=c.filter(m=>h.includes(m.component));if(g===0){for(const m of d.slice(1))a(A,m.port);i.push(A);continue}const p=new Pu({name:`pin${r}_internal_${g}`,aliases:A.getNameAndAliases()});p._isPrimaryPort=!1,p._primaryPinNumber=r,p.originDescription=`implicitInternalPhysicalPort:pin${r}:${g}`;for(const m of d)a(p,m.port);u.push(p.props.name),i.push(p)}e?.inferredInternallyConnectedPinNames?.push(u)}return e?.inferredInternallyConnectedPinNames&&vDt(i,e.inferredInternallyConnectedPinNames),i}var c8o=vc("tscircuit:core"),l8o=Pt({x:oA,y:oA,z:oA}),g0=class extends Ir{schematicBoxDimensions=null;reactSubtrees=[];_impliedFootprint;_resolvedPcbCalcOffsetX;_resolvedPcbCalcOffsetY;isPrimitiveContainer=!0;_isNormalComponent=!0;_attributeLowerToCamelNameMap={_isnormalcomponent:"_isNormalComponent"};_asyncSupplierPartNumbers;_asyncFootprintCadModel;_isCadModelChild;_inferredInternallyConnectedPinNames=[];pcb_missing_footprint_error_id;_hasStartedFootprintUrlLoad=!1;_hasStartedPartOrientationAnalysis=!1;_asyncSupplierPin1LocationMap;_hasStartedSupplierFootprintMismatchWarningCheck=!1;_hasInflatedCircuitJsonSymbol=!1;_invalidFootprintPropMessages=[];_invalidPinLabelMessages=[];_impliedFootprintPinLabels;_adjustSilkscreenTextAutomatically=!1;get defaultInternallyConnectedPinNames(){return[]}get internallyConnectedPinNames(){return[...this._parsedProps.internallyConnectedPins??this.defaultInternallyConnectedPinNames,...this._inferredInternallyConnectedPinNames].map(e=>e.map(n=>typeof n=="number"?`pin${n}`:n))}constructor(t){const e={...t};let n=[];if(e.pinLabels&&!Array.isArray(e.pinLabels)){const{validPinLabels:o,invalidPinLabelsMessages:i}=U7o(e.pinLabels);e.pinLabels=o,n=i}if(super(e),e.pinLabels&&!Array.isArray(e.pinLabels)){const o=Object.keys(e.pinLabels).find(i=>uw(i)===null);if(o)throw new nMt(this.lowercaseComponentName,this.props,{_errors:[],pinLabels:{_errors:[`Invalid pinLabels key "${o}". Expected "pin\${number}" (e.g. pin1, pin2).`]}})}this._invalidPinLabelMessages=n,this._addChildrenFromStringFootprint(),this._addChildrenFromCircuitJsonSymbol(),this.initPorts()}doInitialSourceNameDuplicateComponentRemoval(){if(!this.name)return;const t=this.root;if((this.getSubcircuit().getNormalComponentNameMap?.()?.get(this.props.name)??[]).filter(i=>i!==this&&i.renderPhaseStates.SourceNameDuplicateComponentRemoval.initialized).length>0){const i=this._getGlobalPcbPositionBeforeLayout(),r=this._getGlobalSchematicPositionBeforeLayout();t.db.source_failed_to_create_component_error.insert({component_name:this.name,error_type:"source_failed_to_create_component_error",message:`Cannot create component "${this.name}": A component with the same name already exists`,pcb_center:i,schematic_center:r}),this.shouldBeRemoved=!0;const s=[...this.children];for(const a of s)this.remove(a)}}initPorts(t={}){if(ee.isValidElement(this.props.symbol)&&!this.children.some(u=>u.componentName==="Symbol"))return;this._inferredInternallyConnectedPinNames=[];const{config:n}=this,o=[],i=this._resolvePinLabels(),r=this._parsedProps.pinLabels,s=r&&Array.isArray(r)?Object.fromEntries(r.map((u,g)=>[`pin${g+1}`,u])):r,a=this._getAllPortsFromChildren(),A=u=>a.some(g=>g._parsedProps.pinNumber===u)||o.some(g=>g._parsedProps.pinNumber===u),c=this._getSchematicPortArrangement();if(c&&!i){for(const h in c){const d=c[h].pins;if(Array.isArray(d))for(const p of d){const m=hO(p,i);A(m)||o.push(new Pu({pinNumber:m,aliases:t.additionalAliases?.[`pin${m}`]??[]},{originDescription:`schPortArrangement:${h}`}))}}const u=["left","right","top","bottom"];let g=1;for(const h of u){const d=c[`${h}Size`];for(let p=0;p<d;p++){const m=g++;A(m)||o.push(new Pu({pinNumber:m,aliases:t.additionalAliases?.[`pin${m}`]??[]},{originDescription:`schPortArrangement:${h}`}))}}}if(i)for(const[u,g]of Object.entries(i)){const h=uw(u);if(h===null)throw new Error(`Invalid pinLabels key "${u}". Expected "pin\${number}" (e.g. pin1, pin2).`);let d=a.find(C=>C._parsedProps.pinNumber===h)??o.find(C=>C._parsedProps.pinNumber===h);const p=Array.isArray(g)?g:[g],_=s?.[u]!==void 0,f=_?p[0]:`pin${h}`,I=_?p.slice(1):p;d?d.externallyAddedAliases.push(f,...I):(d=new Pu({pinNumber:h,name:f,aliases:[..._?[]:t.additionalAliases?.[`pin${h}`]??[],...I,..._?t.additionalAliases?.[`pin${h}`]??[]:[]]},{originDescription:`pinLabels:pin${h}`}),o.push(d))}if(n.schematicSymbolName&&!t.ignoreSymbolPorts){const u=Su[this._getSchematicSymbolNameOrThrow()];if(!u)return;for(const g of u.ports){const h=H0e(g.labels);if(!h)continue;const d=this._getAllPortsFromChildren().find(p=>p._parsedProps.pinNumber===Number(h))??o.find(p=>p._parsedProps.pinNumber===Number(h));if(d)d.schematicSymbolPortDef=g;else{const p=O0e(g.labels.concat(t.additionalAliases?.[`pin${h}`]??[]));p&&(p.originDescription=`schematicSymbol:labels[0]:${g.labels[0]}`,p.schematicSymbolPortDef=g,o.push(p))}}this.addAll(o)}if(!this._getSchematicPortArrangement()){const u=ee.isValidElement(this.props.symbol),g=aPe(this.props.symbol);if(!(u||g)){const h=this.getPortsFromFootprint({...t,allowImplicitPinNumbers:!s,collectInferredInternallyConnectedPins:!0}),d=this._getAllPortsFromChildren();for(const p of h){if(!p._isPrimaryPort){o.push(p);continue}const m=d.find(_=>QDt(_,p))??o.find(_=>QDt(_,p));if(m){const _=p.getNameAndAliases().filter(f=>!m.getNameAndAliases().includes(f));m.externallyAddedAliases.push(..._)}else o.push(p)}}}const l=t.pinCount??this._getPrimaryPinCount()??0;for(let u=1;u<=l;u++){if(A(u)||!c&&s&&!Array.isArray(r)&&!s[`pin${u}`])continue;if(!c){o.push(new Pu({pinNumber:u,aliases:t.additionalAliases?.[`pin${u}`]??[]}));continue}let g=rPe(c).map(h=>hO(h,i));["leftSize","rightSize","topSize","bottomSize","leftPinCount","rightPinCount","topPinCount","bottomPinCount"].some(h=>h in c)&&(g=Array.from({length:this._getPrimaryPinCount()},(h,d)=>d+1)),g.includes(u)&&o.push(new Pu({pinNumber:u,aliases:t.additionalAliases?.[`pin${u}`]??[]},{originDescription:`notOtherwiseAddedButDeducedFromPinCount:${u}`}))}vDt(Array.from(new Set([...this._getAllPortsFromChildren(),...o])),this._inferredInternallyConnectedPinNames),o.length>0&&this.addAll(o)}_resolvePinLabels(){const t=this._parsedProps.pinLabels,e=t&&Array.isArray(t)?Object.fromEntries(t.map((o,i)=>[`pin${i+1}`,o])):t,n={...this._impliedFootprintPinLabels??{},...e??{}};if(Object.keys(n).length!==0)return n}_getImpliedFootprintString(){return null}resolveFootprint(){return this._parsedProps.footprint??this.props.footprint??this._getImpliedFootprintString?.()}_addChildrenFromStringFootprint(){const{pcbRotation:t,pcbPinLabels:e}=this.props,n=this._resolvePinLabels(),o=this.resolveFootprint();if(o&&typeof o=="string"){if(hw(o)||dw(o)||Vj(o)||fO(o))return;let i;try{i=pct.string(o).soup()}catch(s){this._queueInvalidFootprintPropMessage(o,s);return}const r=Db({componentName:this.name??this.componentName,componentRotation:t,footprinterString:o,pinLabels:n,pcbPinLabels:e},i);this.addAll(r)}}_addChildrenFromCircuitJsonSymbol(){if(this._hasInflatedCircuitJsonSymbol)return;const t=this._parsedProps.symbol;if(!aPe(t))return;if(this.children.some(r=>r.componentName==="Symbol")){this._hasInflatedCircuitJsonSymbol=!0;return}const e=g6o(t);if(e.length===0)return;const n=u6o(e),o=Db({componentName:this.name??this.componentName,componentRotation:String(this.props.schRotation??0)},n);if(o.length===0)return;if(this._hasInflatedCircuitJsonSymbol=!0,!o.some(r=>r.componentName==="Symbol")){const r=new iPe({name:this.name??this.componentName});r.addAll(o),this.add(r);return}this.addAll(o)}get portMap(){return new Proxy({},{get:(t,e)=>{const n=this.children.find(i=>i.componentName==="Symbol"),o=[...this.children,...n?.children??[]].find(i=>i.componentName==="Port"&&i.isMatchingNameOrAlias(e));if(!o)throw new Error(`There was an issue finding the port "${e.toString()}" inside of a ${this.componentName} component with name: "${this.props.name}". This is a bug in @tscircuit/core`);return o}})}getInstanceForReactElement(t){for(const e of this.reactSubtrees)if(e.element===t)return e.component;return null}doInitialSourceRender(){const t=this.config.sourceFtype;if(!t)return;const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({ftype:t,name:this.name,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,display_name:n.displayName});this.source_component_id=o.source_component_id}getRefDesPrefixes(){return _Dt(this.config.sourceFtype)}doInitialCheckRefDesConvention(){v6o(this)}doInitialSourceParentAttachment(){const{db:t}=this.root,e=this._getInternallyConnectedPins().map(n=>n.map(o=>o.source_port_id).filter(o=>o!==null)).filter(n=>n.length>=2);this.source_component_id&&e.length>0&&t.source_component.update(this.source_component_id,{internally_connected_source_port_ids:e});for(const n of e)t.source_component_internal_connection.insert({source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id,source_port_ids:n})}updateSourceParentAttachment(){const{db:t}=this.root;for(const e of t.source_component_internal_connection.list({source_component_id:this.source_component_id}))t.source_component_internal_connection.delete(e.source_component_internal_connection_id);this.doInitialSourceParentAttachment()}doInitialSchematicComponentRender(){W6o(this)}_getSchematicSymbolDisplayValue(){}_getInternallyConnectedPins(){if(this.internallyConnectedPinNames.length===0)return[];const t=[];for(const e of this.internallyConnectedPinNames){const n=[];for(const o of e)n.push(this.portMap[o]);t.push(n)}return t}_doInitialSchematicComponentRenderWithSymbol(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getSchematicSymbolNameOrThrow(),o=Su[n],i=this._getGlobalSchematicPositionBeforeLayout();if(o){const r=t.schematic_component.insert({center:i,size:{...o.size},source_component_id:this.source_component_id,is_box_with_pins:!0,symbol_name:n,schematic_sheet_id:this._resolveSchematicSheetId(),symbol_display_value:this._getSchematicSymbolDisplayValue()});this.schematic_component_id=r.schematic_component_id}}_doInitialSchematicComponentRenderWithReactSymbol(t){if(this.root?.schematicDisabled)return;const{db:e}=this.root,n=this._getGlobalSchematicPositionBeforeLayout(),o=e.schematic_component.insert({center:n,size:{width:0,height:0},source_component_id:this.source_component_id,symbol_display_value:this._getSchematicSymbolDisplayValue(),is_box_with_pins:!1,schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_component_id=o.schematic_component_id}_doInitialSchematicComponentRenderWithSchematicBoxDimensions(t){if(this.root?.schematicDisabled)return;const{db:e}=this.root,{_parsedProps:n}=this;this.schematicBoxDimensions=t;const o={};if(Array.isArray(n.pinLabels))n.pinLabels.forEach((u,g)=>{o[String(g+1)]=u});else for(const[u,g]of Object.entries(n.pinLabels??{}))o[u]=Array.isArray(g)?g[0]:g;const i=this._getGlobalSchematicPositionBeforeLayout(),r=this._getSchematicPortArrangement(),s=e.schematic_component.insert({center:i,rotation:n.schRotation??0,size:t.getSize(),port_arrangement:ePe(r),pin_spacing:.2,pin_styles:Zwe(n.schPinStyle,n.pinLabels),port_labels:o,source_component_id:this.source_component_id,schematic_sheet_id:this._resolveSchematicSheetId()}),a=r?.topSide!==void 0,A=a||r?.bottomSide!==void 0,c=t?.getSize().width,l=t?.getSize().height;e.schematic_text.insert({text:n.manufacturerPartNumber??"",schematic_component_id:s.schematic_component_id,anchor:"left",rotation:0,position:{x:a?i.x+(c??0)/2+.1:i.x-(c??0)/2,y:A?i.y+(l??0)/2+.35:i.y-(l??0)/2-.13},color:"#006464",font_size:.18,schematic_sheet_id:this._resolveSchematicSheetId()}),e.schematic_text.insert({text:n.displayName??n.name??"",schematic_component_id:s.schematic_component_id,anchor:"left",rotation:0,position:{x:a?i.x+(c??0)/2+.1:i.x-(c??0)/2,y:A?i.y+(l??0)/2+.55:i.y+(l??0)/2+.13},color:"#006464",font_size:.18,schematic_sheet_id:this._resolveSchematicSheetId()}),this.schematic_component_id=s.schematic_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.getSubcircuit(),o=this._getPcbComponentLayer();if(o!=="top"&&o!=="bottom"){const c=vne.parse({type:"pcb_component_invalid_layer_error",message:`Component cannot be placed on layer '${o}'. Components can only be placed on 'top' or 'bottom' layers.`,source_component_id:this.source_component_id,layer:o,subcircuit_id:n.subcircuit_id??void 0});t.pcb_component_invalid_layer_error.insert(c)}const i=this.getGlobalTransformRotation(),r=t.pcb_component.insert({center:this._getGlobalPcbPositionBeforeLayout(),width:0,height:0,layer:o==="top"||o==="bottom"?o:"top",rotation:k9(i),insertion_direction:this._getPcbComponentInsertionDirection(o,i),source_component_id:this.source_component_id,subcircuit_id:n.subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0}),s=this.resolveFootprint(),a=this.children.some(c=>c.componentName==="Footprint");if(!s&&!a&&!this.isGroup){const c=t.pcb_missing_footprint_error.insert({message:`No footprint specified for component: ${this.getString()}`,source_component_id:`${this.source_component_id}`,error_type:"pcb_missing_footprint_error"});this.pcb_missing_footprint_error_id=c.pcb_missing_footprint_error_id}this.pcb_component_id=r.pcb_component_id;const A=this.getSubcircuit()._getPcbManualPlacementForComponent(this);if((this.props.pcbX!==void 0||this.props.pcbY!==void 0)&&A){const c=txe.parse({type:"pcb_manual_edit_conflict_warning",pcb_manual_edit_conflict_warning_id:`pcb_manual_edit_conflict_${this.source_component_id}`,message:`${this.getString()} has both manual placement and prop coordinates. pcbX and pcbY will be used. Remove pcbX/pcbY or clear the manual placement.`,pcb_component_id:this.pcb_component_id,source_component_id:this.source_component_id,subcircuit_id:n.subcircuit_id??void 0});t.pcb_manual_edit_conflict_warning.insert(c)}}doInitialPcbComponentSizeCalculation(){if(this.root?.pcbDisabled||!this.pcb_component_id)return;const{db:t}=this.root;B6o(this);const e=L0e(this.children);if(e.width===0||e.height===0)return;const n={x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2};t.pcb_component.update(this.pcb_component_id,{center:n,width:e.width,height:e.height})}updatePcbComponentSizeCalculation(){this.doInitialPcbComponentSizeCalculation()}doInitialSchematicComponentSizeCalculation(){if(this.root?.schematicDisabled||!this.schematic_component_id)return;const{db:t}=this.root;if(!t.schematic_component.get(this.schematic_component_id))return;const n=[],o=c=>{for(const l of c){if(l.isSchematicPrimitive&&l.componentName==="SchematicLine"){const u=t.schematic_line.get(l.schematic_line_id);u&&n.push(u)}if(l.isSchematicPrimitive&&l.componentName==="SchematicRect"){const u=t.schematic_rect.get(l.schematic_rect_id);u&&n.push(u)}if(l.isSchematicPrimitive&&l.componentName==="SchematicCircle"){const u=t.schematic_circle.get(l.schematic_circle_id);u&&n.push(u)}if(l.isSchematicPrimitive&&l.componentName==="SchematicArc"){const u=t.schematic_arc.get(l.schematic_arc_id);u&&n.push(u)}if(l.isSchematicPrimitive&&l.componentName==="SchematicText"){const u=t.schematic_text.get(l.schematic_text_id);u&&n.push(u)}if(l.isSchematicPrimitive&&l.componentName==="SchematicPath"){const u=l.schematic_path_ids;if(u)for(const g of u){const h=t.schematic_path.get(g);h&&n.push(h)}}l.children&&l.children.length>0&&o(l.children)}};if(o(this.children),n.length===0)return;const i=Gj(n),r=Math.abs(i.maxX-i.minX),s=Math.abs(i.maxY-i.minY);if(r===0&&s===0)return;const a=(i.minX+i.maxX)/2,A=(i.minY+i.maxY)/2;t.schematic_component.update(this.schematic_component_id,{center:{x:a,y:A},size:{width:r,height:s}})}updateSchematicComponentSizeCalculation(){this.doInitialSchematicComponentSizeCalculation()}doInitialPcbComponentAnchorAlignment(){O6o(this)}updatePcbComponentAnchorAlignment(){this.doInitialPcbComponentAnchorAlignment()}doInitialResolveFootprintPinLabels(){J6o(this)}updateResolveFootprintPinLabels(){this.doInitialResolveFootprintPinLabels()}_renderReactSubtree(t){const e=RMt(t);return{element:t,component:e}}doInitialInitializePortsFromChildren(){this.initPorts()}updateInitializePortsFromChildren(){this.initPorts()}getGlobalTransformRotation(){const t=this._computePcbGlobalTransformBeforeLayout();return O9(t).rotation.angle*180/Math.PI}_getFootprintMetadataForPcbComponent(){const t=this.children.find(n=>n.componentName==="Footprint");if(t)return{insertionDirection:t._parsedProps.insertionDirection,cutoutApertureDirection:t._parsedProps.cutoutApertureDirection,originalLayer:t._parsedProps.originalLayer};const e=this.props.footprint;if(ee.isValidElement(e)){const n=e.props;return{insertionDirection:n.insertionDirection,cutoutApertureDirection:n.cutoutApertureDirection,originalLayer:n.originalLayer}}if(e?.componentName==="Footprint")return{insertionDirection:e._parsedProps?.insertionDirection??e.props?.insertionDirection,cutoutApertureDirection:e._parsedProps?.cutoutApertureDirection??e.props?.cutoutApertureDirection,originalLayer:e._parsedProps?.originalLayer??e.props?.originalLayer}}_getPcbComponentLayer(){return this._parsedProps.layer??(this._getFootprintOriginalLayer()==="bottom"?"bottom":"top")}_getFootprintOriginalLayer(){return this._getFootprintMetadataForPcbComponent()?.originalLayer}_getPcbComponentInsertionDirection(t,e=this.getGlobalTransformRotation()){const n=this._getFootprintMetadataForPcbComponent();if(n?.insertionDirection)return k9o({insertionDirection:n.insertionDirection,rotationDegrees:e,isFlipped:b0e({componentLayer:t,originalLayer:n.originalLayer})})}_getEnclosureApertureAxisDirection(t,e=this.getGlobalTransformRotation()){const n=this._getFootprintMetadataForPcbComponent(),o=n?.cutoutApertureDirection??n?.insertionDirection;if(o)return AMt({insertionDirection:o,rotationDegrees:e,isFlipped:b0e({componentLayer:t,originalLayer:n?.originalLayer})})}doInitialReactSubtreesRender(){const t=this.props.footprint;ee.isValidElement(t)&&(this.children.some(r=>r.componentName==="Footprint")||this.add(t));const e=this.props.symbol;ee.isValidElement(e)&&(this.children.some(r=>r.componentName==="Symbol")||this.add(e));const n=this.props.cadModel;if(ee.isValidElement(n)){this._isCadModelChild=!0;const i=this.children.some(s=>s.componentName==="CadAssembly"),r=this.children.some(s=>s.componentName==="CadModel");!i&&!r&&this.add(n)}const o=this.props.spiceModel;ee.isValidElement(o)&&(this.children.some(r=>r.componentName==="SpiceModel")||this.add(o))}doInitialPcbFootprintStringRender(){z6o(this,(t,e)=>this._queueAsyncEffect(t,e))}_getAllPortsFromChildren(){const t=[],e=n=>{n.componentName==="Port"&&t.push(n);for(const o of n.children)e(o)};for(const n of this.children)e(n);return t}_hasExistingPortExactly(t){return this._getAllPortsFromChildren().some(n=>{const o=t.getNameAndAliases(),i=n.getNameAndAliases();return o.length===i.length&&o.every(r=>i.includes(r))})}_hasMatchingPort(t){const e=this._getAllPortsFromChildren(),n=t._parsedProps.pinNumber;return n===void 0?!1:e.some(o=>o._parsedProps.pinNumber===n)}add(t){let e;if(ee.isValidElement(t)){const n=this._renderReactSubtree(t);this.reactSubtrees.push(n),e=n.component}else e=t;if(e.componentName==="Port"){if(this._hasExistingPortExactly(e))return;if(this._hasMatchingPort(e)){c8o(`Skipping port ${e} because a matching port already exists`);return}}super.add(e)}getPortsFromFootprint(t){let e;t?.collectInferredInternallyConnectedPins&&(e=this._inferredInternallyConnectedPinNames);const n=new Map,o=this._parsedProps?.pinLabels??this.props.pinLabels;if(o){const a=Array.isArray(o)?o.map((A,c)=>[`pin${c+1}`,A]):Object.entries(o);for(const[A,c]of a){const l=uw(A);if(l===null)continue;const u=Array.isArray(c)?c:[c];for(const g of u)typeof g=="string"&&g.length>0&&n.set(g,l)}}const i={...t,inferredInternallyConnectedPinNames:e,implicitPinNumberByHint:n};let{footprint:r}=this.props;if(typeof r=="string"&&fO(r)&&this.children.some(a=>a.componentName==="Footprint")?r=this.children.find(a=>a.componentName==="Footprint"):(!r||ee.isValidElement(r))&&(r=this.children.find(a=>a.componentName==="Footprint")),typeof r=="string"){if(hw(r))return[];if(dw(r))return[];if(Vj(r))return[];if(fO(r))return[];let a;try{a=pct.string(r).soup()}catch(A){return this._queueInvalidFootprintPropMessage(r,A),[]}return wDt(a.flatMap(A=>"port_hints"in A&&A.port_hints?[{hints:A.port_hints,originDescription:`footprint:string:${r}:port_hints[0]:${A.port_hints[0]}`}]:[]),i)}if(!ee.isValidElement(r)&&r&&r.componentName==="Footprint")return wDt(r.children.flatMap(A=>A.props.portHints?[{hints:A.props.portHints,originDescription:`footprint:${r}`,component:A}]:[]),i);const s=[];if(!r){for(const a of this.children)if(a.props.portHints&&a.isPcbPrimitive){const A=O0e(a.props.portHints);A&&s.push(A)}}return s}_queueInvalidFootprintPropMessage(t,e){const n=e instanceof Error?e.message:String(e),o=t.includes("/")&&!t.includes(":"),r=/^c\d+$/i.test(t)?`C${t.replace(/^c/i,"")}`:null,s=o?` If this is a KiCad footprint, use "kicad:${t}".`:r?` If this is a JLCPCB part number, use "jlcpcb:${r}".`:"",a=`Invalid footprint prop on ${this.getDisplayName()}: "${t}".${s} Parser details: ${n}`;this._invalidFootprintPropMessages.includes(a)||this._invalidFootprintPropMessages.push(a)}_insertInvalidFootprintPropErrors(){for(const t of this._invalidFootprintPropMessages)this.root.db.source_invalid_component_property_error.insert({source_component_id:this.source_component_id||"",property_name:"footprint",message:t,error_type:"source_invalid_component_property_error"});this._invalidFootprintPropMessages=[]}getPortsFromSchematicSymbol(){if(this.root?.schematicDisabled)return[];const{config:t}=this;if(!t.schematicSymbolName)return[];const e=Su[t.schematicSymbolName];if(!e)return[];const n=[];for(const o of e.ports){const i=O0e(o.labels);i&&(i.schematicSymbolPortDef=o,n.push(i))}return n}doInitialCreateNetsFromProps(){this._createNetsFromProps(this._getNetsFromConnectionsProp())}_getNetsFromConnectionsProp(){const{_parsedProps:t}=this,e=[];if(t.connections)for(const[n,o]of Object.entries(t.connections)){const i=Array.isArray(o)?o:[o];for(const r of i)e.push(String(r))}return e}_createNetsFromProps(t){Hj(this,t)}_getPcbCircuitJsonBounds(){const{db:t}=this.root;if(!this.pcb_component_id)return super._getPcbCircuitJsonBounds();const e=t.pcb_component.get(this.pcb_component_id);return{center:{x:e.center.x,y:e.center.y},bounds:{left:e.center.x-e.width/2,top:e.center.y-e.height/2,right:e.center.x+e.width/2,bottom:e.center.y+e.height/2},width:e.width,height:e.height}}_getPinCountFromSchematicPortArrangement(){const t=this._getSchematicPortArrangement();if(!t)return 0;if(!lDt(t))return(t.leftSize??t.leftPinCount??0)+(t.rightSize??t.rightPinCount??0)+(t.topSize??t.topPinCount??0)+(t.bottomSize??t.bottomPinCount??0);const n=rPe(t);let o=0;for(const i of n){if(typeof i=="number"){o=Math.max(o,i);continue}const r=uw(i);if(r!==null){o=Math.max(o,r);continue}const s=this._parsedProps.pinLabels;s&&(o=Math.max(o,hO(i,s)))}return Math.max(o,n.length)}_getPrimaryPinCount(){if(this._getSchematicPortArrangement())return this._getPinCountFromSchematicPortArrangement();const e=this.getPortsFromFootprint();if(e.length>0)return e.filter(o=>o._isPrimaryPort).length;const{pinLabels:n}=this._parsedProps;if(n){if(Array.isArray(n))return n.length;const o=Object.keys(n).map(i=>uw(i)).filter(i=>i!==null&&!Number.isNaN(i));return o.length>0?Math.max(...o):Object.keys(n).length}return 0}_getSchematicPortArrangement(){return this._parsedProps.schPinArrangement??this._parsedProps.schPortArrangement}_getPinLabelsFromPorts(){const t=this.selectAll("port"),e={};for(const n of t){const o=n.props.pinNumber;if(o!==void 0){const i=n._getBestDisplayPinLabel();i&&(e[`pin${o}`]=i)}}return e}_getImplicitSparseSchematicPortArrangement(t){const e=Array.from(new Set(this._getAllPortsFromChildren().filter(r=>r._isPrimaryPort).map(r=>r._parsedProps.pinNumber).filter(r=>r!==void 0))).sort((r,s)=>r-s);if(e.length!==t||!e.some((r,s)=>r!==s+1))return;const o=Math.floor(t/2),i=t-o;return{leftSide:{pins:e.slice(0,i)},rightSide:{pins:e.slice(i)}}}_getSchematicBoxDimensions(){return this.schematicBoxDimensions?this.schematicBoxDimensions:this._computeSchematicBoxDimensions()}_computeSchematicBoxDimensions(){if(this.getSchematicSymbol()||!this.config.shouldRenderAsSchematicBox&&!this._parsedProps?.showAsSchematicBox)return null;const{_parsedProps:t}=this,e=this._getPrimaryPinCount(),n=.2,i={...this._getPinLabelsFromPorts(),...t.pinLabels},r=this._getSchematicPortArrangement()??this._getImplicitSparseSchematicPortArrangement(e);return sPe({schWidth:t.schWidth,schHeight:t.schHeight,schPinSpacing:n,numericSchPinStyle:Kj(t.schPinStyle,i),pinCount:e,schPortArrangement:r,pinLabels:i})}getFootprinterString(){const t=this.resolveFootprint();return typeof t=="string"?t:null}doInitialCadModelRender(){if(this._isCadModelChild||this.props.doNotPlace)return;const{db:t}=this.root,{boardThickness:e=0}=this._getBoard()??{},n=this._parsedProps.cadModel,o=n===void 0?this._asyncFootprintCadModel:n,i=this.getFootprinterString()??void 0;let r=!1;if(i&&(r=!fO(i)&&!hw(i)&&!dw(i)&&!Vj(i)),!this.pcb_component_id||o===null)return;const s=this._getPcbCircuitJsonBounds();if(typeof o=="string")throw new Error("String cadModel not yet implemented");const a=o?.pcbRotationOffset??o?.rotationOffset,A=l8o.parse({x:0,y:0,z:typeof a=="number"?a:0,...typeof a=="object"?a:{}}),c=D9.parse({x:0,y:0,z:0,...typeof o?.positionOffset=="object"?o.positionOffset:{}}),l=o&&typeof o=="object"&&"zOffsetFromSurface"in o&&o.zOffsetFromSurface!==void 0?lt.parse(o.zOffsetFromSurface):0,u=this.props.layer==="bottom"?"bottom":"top",g=t.pcb_component.get(this.pcb_component_id),h=this._computePcbGlobalTransformBeforeLayout(),p=O9(h).rotation.angle*180/Math.PI,m=g?.position_mode==="packed"?g.rotation??p:p,_=u==="bottom";if(!o&&!r){const x=t.cad_component.insert({position:{x:s.center.x,y:s.center.y,z:u==="bottom"?-e/2:e/2},rotation:{x:0,y:_?180:0,z:k9(_?-m:m)},pcb_component_id:this.pcb_component_id,source_component_id:this.source_component_id,model_origin_alignment:"center_of_component_on_board_surface",anchor_alignment:"center_of_component_on_board_surface",show_as_bounding_box:!0,show_as_translucent_model:this._parsedProps.showAsTranslucentModel});this.cad_component_id=x.cad_component_id;return}const f=m+(A.z??0),I=k9(f);let C;!o&&r&&(C=i);const y=t.cad_component.insert({position:{x:s.center.x+c.x,y:s.center.y+c.y,z:(u==="bottom"?-e/2:e/2)+(u==="bottom"?-l:l)+c.z},rotation:{x:A.x,y:A.y+(_?180:0),z:k9(_?-I:I)},pcb_component_id:this.pcb_component_id,source_component_id:this.source_component_id,model_stl_url:"stlUrl"in(o??{})?this._addCachebustToModelUrl(o.stlUrl):void 0,model_obj_url:"objUrl"in(o??{})?this._addCachebustToModelUrl(o.objUrl):void 0,model_mtl_url:"mtlUrl"in(o??{})?this._addCachebustToModelUrl(o.mtlUrl):void 0,model_gltf_url:"gltfUrl"in(o??{})?this._addCachebustToModelUrl(o.gltfUrl):void 0,model_glb_url:"glbUrl"in(o??{})?this._addCachebustToModelUrl(o.glbUrl):void 0,model_step_url:"stepUrl"in(o??{})?this._addCachebustToModelUrl(o.stepUrl):void 0,model_wrl_url:"wrlUrl"in(o??{})?this._addCachebustToModelUrl(o.wrlUrl):void 0,model_jscad:"jscad"in(o??{})?o.jscad:void 0,model_unit_to_mm_scale_factor:typeof o?.modelUnitToMmScale=="number"?o.modelUnitToMmScale:void 0,model_board_normal_direction:o?.modelBoardNormalDirection,model_origin_alignment:"center_of_component_on_board_surface",anchor_alignment:"center_of_component_on_board_surface",model_origin_position:o?.modelOriginPosition,...o?.size?{size:o.size}:{},footprinter_string:C,show_as_translucent_model:this._parsedProps.showAsTranslucentModel});this.cad_component_id=y.cad_component_id}_addCachebustToModelUrl(t){if(!t||!t.includes("modelcdn.tscircuit.com"))return t;const e=this.root?.getClientOrigin()??"";return`${t}${t.includes("?")?"&":"?"}cachebust_origin=${encodeURIComponent(e)}`}_getPartsEngineCacheKey(t,e){return JSON.stringify({ftype:t.ftype,name:t.name,manufacturer_part_number:t.manufacturer_part_number,standard:t.standard,pin_count:t.pin_count,footprinterString:e})}async _getSupplierPartNumbers(t,e,n){if(this.props.doNotPlace)return{};const o=this.root?.platform?.localCacheEngine,i=this._getPartsEngineCacheKey(e,n);if(o){const a=await o.getItem(i);if(a)try{return JSON.parse(a)}catch{}}const r=await Promise.resolve(t.findPart({sourceComponent:e,footprinterString:n}));if(typeof r=="string")throw r.includes("<!DOCTYPE")||r.includes("<html")?new Error(`Failed to fetch supplier part numbers: Received HTML response instead of JSON. Response starts with: ${r.substring(0,100)}`):r==="Not found"?new Error(`Part not found for ${this.getString()}${n?` with footprint "${n}"`:""}`):new Error(`Invalid supplier part numbers format: Expected object but got string: "${r}"`);if(!r||Array.isArray(r)||typeof r!="object"){const a=r===null?"null":Array.isArray(r)?"array":typeof r;throw new Error(`Invalid supplier part numbers format: Expected object but got ${a}`)}const s=r;if(o)try{await o.setItem(i,JSON.stringify(s))}catch{}return s}doInitialPartsEngineRender(){if(this.props.doNotPlace||this.getInheritedProperty("bomDisabled")||this.getInheritedProperty("partsEngineDisabled"))return;const t=this.getInheritedProperty("partsEngine");if(!t)return;const{db:e}=this.root,n=e.source_component.get(this.source_component_id);if(!n||n.supplier_part_numbers)return;const o=this.props.footprint??this._getImpliedFootprintString(),i=typeof o=="string"?o:void 0,r=this._getSupplierPartNumbers(t,n,i);if(!(r instanceof Promise)){e.source_component.update(this.source_component_id,{supplier_part_numbers:r});return}this._queueAsyncEffect("get-supplier-part-numbers",async()=>{await r.then(s=>{this._asyncSupplierPartNumbers=s,this._markDirty("PartsEngineRender")}).catch(s=>{this._asyncSupplierPartNumbers={};const a=hV.parse({type:"source_part_not_found_warning",message:`Failed to fetch supplier part numbers for ${this.getString()}: ${s.message}`,source_component_id:this.source_component_id??void 0,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,manufacturer_part_number:n.manufacturer_part_number??void 0,part_name:n.name??void 0});e.source_part_not_found_warning.insert(a),this._markDirty("PartsEngineRender")})})}updatePartsEngineRender(){if(this.props.doNotPlace||this.getInheritedProperty("bomDisabled")||this.getInheritedProperty("partsEngineDisabled"))return;const{db:t}=this.root,e=t.source_component.get(this.source_component_id);if(e&&!e.supplier_part_numbers&&this._asyncSupplierPartNumbers){t.source_component.update(this.source_component_id,{supplier_part_numbers:this._asyncSupplierPartNumbers});return}}doInitialPartOrientationAnalysis(){L6o(this)}updatePartOrientationAnalysis(){H6o(this)}doInitialSupplierFootprintMismatchWarning(){r8o(this)}updateSupplierFootprintMismatchWarning(){this.doInitialSupplierFootprintMismatchWarning()}doInitialAssignFallbackProps(){const{_parsedProps:t}=this;t.connections&&!this.name&&(this.fallbackUnassignedName=this.getSubcircuit().getNextAvailableName(this))}doInitialCreateTracesFromProps(){this._createTracesFromConnectionsProp()}_createTracesFromConnectionsProp(){const{_parsedProps:t}=this;if(t.connections)for(const[e,n]of Object.entries(t.connections)){const o=Array.isArray(n)?n:[n];for(const i of o)this.add(new t1({from:`.${this.name} > .${e}`,to:String(i)}))}}doInitialSourceDesignRuleChecks(){q6o(this)}doInitialSourceComponentPropertyValidation(){this._insertInvalidFootprintPropErrors()}doInitialValidatePcbCoordinates(){if(super.doInitialValidatePcbCoordinates(),this.root?.pcbDisabled)return;const t=this._parsedProps,e=this.props,n=typeof e.pcbLeftEdgeX=="string"?e.pcbLeftEdgeX:t.pcbLeftEdgeX??e.pcbLeftEdgeX,o=typeof e.pcbRightEdgeX=="string"?e.pcbRightEdgeX:t.pcbRightEdgeX??e.pcbRightEdgeX,i=typeof e.pcbTopEdgeY=="string"?e.pcbTopEdgeY:t.pcbTopEdgeY??e.pcbTopEdgeY,r=typeof e.pcbBottomEdgeY=="string"?e.pcbBottomEdgeY:t.pcbBottomEdgeY??e.pcbBottomEdgeY;(t.pcbX!==void 0||t.pcbY!==void 0||n!==void 0||o!==void 0||i!==void 0||r!==void 0)&&(n!==void 0&&this._validatePcbCoordinateReferences({rawValue:n,axis:"pcbX",propertyName:"pcbLeftEdgeX"}),o!==void 0&&this._validatePcbCoordinateReferences({rawValue:o,axis:"pcbX",propertyName:"pcbRightEdgeX"}),i!==void 0&&this._validatePcbCoordinateReferences({rawValue:i,axis:"pcbY",propertyName:"pcbTopEdgeY"}),r!==void 0&&this._validatePcbCoordinateReferences({rawValue:r,axis:"pcbY",propertyName:"pcbBottomEdgeY"}))}doInitialPcbLayout(){if(this.root?.pcbDisabled||!this.pcb_component_id)return;const{db:t}=this.root,e=this._parsedProps,n=this.props,o=e.pcbLeftEdgeX??n.pcbLeftEdgeX,i=e.pcbRightEdgeX??n.pcbRightEdgeX,r=e.pcbTopEdgeY??n.pcbTopEdgeY,s=e.pcbBottomEdgeY??n.pcbBottomEdgeY;if(!(e.pcbX!==void 0||e.pcbY!==void 0||o!==void 0||i!==void 0||r!==void 0||s!==void 0))return;if(o!==void 0&&i!==void 0)throw new Error(`${this.componentName} cannot set both pcbLeftEdgeX and pcbRightEdgeX`);if(r!==void 0&&s!==void 0)throw new Error(`${this.componentName} cannot set both pcbTopEdgeY and pcbBottomEdgeY`);const A=t.pcb_component.get(this.pcb_component_id),c=A?.width??0,l=A?.height??0,g=this.getGroup()?.pcb_group_id??void 0,h=g?void 0:this._getBoard()?.pcb_board_id??void 0,d=this._resolvedPcbCalcOffsetX??(e.pcbX!==void 0?this._resolvePcbCoordinate(e.pcbX,"pcbX"):o!==void 0?this._resolvePcbCoordinate(o,"pcbX",{propertyName:"pcbLeftEdgeX"})+c/2:i!==void 0?this._resolvePcbCoordinate(i,"pcbX",{propertyName:"pcbRightEdgeX"})-c/2:void 0),p=this._resolvedPcbCalcOffsetY??(e.pcbY!==void 0?this._resolvePcbCoordinate(e.pcbY,"pcbY"):r!==void 0?this._resolvePcbCoordinate(r,"pcbY",{propertyName:"pcbTopEdgeY"})-l/2:s!==void 0?this._resolvePcbCoordinate(s,"pcbY",{propertyName:"pcbBottomEdgeY"})+l/2:void 0);t.pcb_component.update(this.pcb_component_id,{position_mode:"relative_to_group_anchor",positioned_relative_to_pcb_group_id:g,positioned_relative_to_pcb_board_id:h,display_offset_x:d,display_offset_y:p})}_getMinimumFlexContainerSize(){return _6o(this)}_repositionOnPcb(t){return f6o(this,t)}doInitialSilkscreenOverlapAdjustment(){return $6o(this)}isRelativelyPositioned(){const t=this.props;return this._parsedProps.pcbX!==void 0||this._parsedProps.pcbY!==void 0||this._parsedProps.pcbLeftEdgeX!==void 0||this._parsedProps.pcbRightEdgeX!==void 0||this._parsedProps.pcbTopEdgeY!==void 0||this._parsedProps.pcbBottomEdgeY!==void 0||t.pcbLeftEdgeX!==void 0||t.pcbRightEdgeX!==void 0||t.pcbTopEdgeY!==void 0||t.pcbBottomEdgeY!==void 0}},uPe=(t,e)=>{const n=t.source_group.list(),o=[],i=r=>{const s=n.filter(a=>a.parent_subcircuit_id===r);for(const a of s)a.subcircuit_id&&(o.push(a.subcircuit_id),i(a.subcircuit_id))};return i(e),o},u8o=({boardAnchorPosition:t,boardAnchorAlignment:e,width:n,height:o})=>{const{x:i,y:r}=t;let s=i,a=r;switch(e){case"top_left":s=i+n/2,a=r-o/2;break;case"top_right":s=i-n/2,a=r-o/2;break;case"bottom_left":s=i+n/2,a=r+o/2;break;case"bottom_right":s=i-n/2,a=r+o/2;break;case"top":s=i,a=r-o/2;break;case"bottom":s=i,a=r+o/2;break;case"left":s=i+n/2,a=r;break;case"right":s=i-n/2,a=r;break}return{x:s,y:a}};function g8o(t,e){const{subcircuit:n}=e;if(n.lowercaseComponentName==="board"||n.lowercaseComponentName==="mountedboard"||n.parent?.lowercaseComponentName==="board")return;const o={name:"inflated_board"};t.width&&(o.width=t.width),t.height&&(o.height=t.height),t.center&&(o.pcbX=t.center.x,o.pcbY=t.center.y),t.outline&&(o.outline=t.outline),t.thickness&&(o.thickness=t.thickness),t.material&&(o.material=t.material),t.is_via_in_pad_allowed!==void 0&&(o.isViaInPadAllowed=t.is_via_in_pad_allowed),t.allow_blind_and_buried_vias!==void 0&&(o.allowBlindAndBuriedVias=t.allow_blind_and_buried_vias);const i=new wB(o);return i.pcb_board_id=t.pcb_board_id,n.add(i),i}var gPe=new WeakMap,PDt=t=>{const e=[t.name,...t.port_hints??[]].map(i=>i.toLowerCase().replace(/[^a-z0-9+-]/g,"")),n=e.some(i=>["a","anode","pos","positive","+"].includes(i)),o=e.some(i=>["k","cathode","neg","negative","-"].includes(i));return n===o?null:n?"positive":"negative"},d8o=t=>{const e=t.root;if(!e)return;const{db:n}=e;for(const m of gPe.get(t)??[])n.pcb_fabrication_note_path.delete(m.pcb_fabrication_note_path_id);if(gPe.delete(t),e.pcbDisabled||!t.props.polarized||!t.pcb_component_id)return;const o=n.pcb_component.get(t.pcb_component_id);if(!o||o.layer!=="top"&&o.layer!=="bottom")return;const i=n.source_port.list({source_component_id:t.source_component_id}),r=i.filter(m=>PDt(m)==="positive"),s=i.filter(m=>PDt(m)==="negative");if(r.length!==1||s.length!==1)return;const a=n.pcb_port.getWhere({source_port_id:r[0].source_port_id}),A=n.pcb_port.getWhere({source_port_id:s[0].source_port_id});if(!a||!A)return;const c=Math.hypot(A.x-a.x,A.y-a.y);if(c<1e-6)return;const l=D0(M0((a.x+A.x)/2,(a.y+A.y)/2),W4(Math.atan2(A.y-a.y,A.x-a.x))),u=(m,_)=>ts(l,{x:m,y:_}),g=c/4,h=Math.min(c*.12,.3),d=[[u(-g-h,0),u(-g+h,0)],[u(-g,-h),u(-g,h)],[u(g-h,0),u(g+h,0)]],p=[];gPe.set(t,p);for(const m of d)p.push(n.pcb_fabrication_note_path.insert({pcb_component_id:o.pcb_component_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,layer:o.layer,route:m,stroke_width:Math.min(.08,h*.4)}))},h8o=1;function p8o(t){const e=[];for(const n of t.children)n instanceof Pu&&e.push(n);return e}function m8o(t){const e=p8o(t);if(e.length!==2)return;const n=e[0].isConnectedToPower(),o=e[0].isConnectedToGround(),i=e[1].isConnectedToPower(),r=e[1].isConnectedToGround();return n&&!o&&r&&!i||i&&!r&&o&&!n?h8o:void 0}var _8o=new Set(["01005","0201","0402","0603","0805","1206","1210","2010","2512"]),MDt=class extends g0{_adjustSilkscreenTextAutomatically=!0;get config(){const t=this.props.symbolName??"capacitor",e=this.props.schSize==="sm"||this.props.schSize==="xs"?this.props.schSize:void 0,n=e&&t==="capacitor"?`capacitor_${e}`:void 0,o=n&&`${n}_right`in Su?n:t;return{componentName:"Capacitor",schematicSymbolName:this.props.polarized?"capacitor_polarized":o,zodProps:qwn,sourceFtype:$7.simple_capacitor}}initPorts(){typeof this.props.footprint=="string"?super.initPorts({additionalAliases:{pin1:["anode","pos"],pin2:["cathode","neg"]}}):super.initPorts()}_getSchematicSymbolDisplayValue(){const t=this.props.capacitance;let e;return this._parsedProps.capacitance!==void 0&&!isNaN(this._parsedProps.capacitance)?e=typeof t=="string"?t:`${H_(this._parsedProps.capacitance)}F`:e=`${H_(this._parsedProps.capacitance)}F`,this._parsedProps.schShowRatings&&this._parsedProps.maxVoltageRating?`${e}/${H_(this._parsedProps.maxVoltageRating)}V`:e}getFootprinterString(){const t=super.getFootprinterString();return t&&_8o.has(t)?`cap${t}`:t}doInitialCreateNetsFromProps(){this._createNetsFromProps([this.props.decouplingFor,this.props.decouplingTo,...this._getNetsFromConnectionsProp()])}doInitialCreateTracesFromProps(){this.props.decouplingFor&&this.props.decouplingTo&&(this.add(new t1({from:`${this.getSubcircuitSelector()} > port.1`,to:this.props.decouplingFor})),this.add(new t1({from:`${this.getSubcircuitSelector()} > port.2`,to:this.props.decouplingTo}))),this._createTracesFromConnectionsProp()}doInitialPcbComponentSizeCalculation(){super.doInitialPcbComponentSizeCalculation(),d8o(this)}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_capacitor",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,capacitance:e.capacitance,max_voltage_rating:e.maxVoltageRating,max_decoupling_trace_length:e.maxDecouplingTraceLength??m8o(this),display_capacitance:this._getSchematicSymbolDisplayValue(),are_pins_interchangeable:!e.polarized,display_name:e.displayName});this.source_component_id=n.source_component_id}},f8o=({pcbComponent:t,db:e,componentName:n})=>{const o=t.center||{x:0,y:0},i=t.rotation||0,r=CRn(D0(M0(o.x,o.y),W4(i*Math.PI/180))),s=e.toArray().filter(c=>"pcb_component_id"in c&&c.pcb_component_id===t.pcb_component_id),a=structuredClone(s);return FF(a,r),Db({componentName:n,componentRotation:"0deg"},a)},e4=(t,e)=>{const{injectionDb:n,normalComponent:o}=e;if(!o)return null;const i=f8o({pcbComponent:t,db:n,componentName:o.name});if(i.length===0)return null;const r=new Y0e({originalLayer:t.layer});return r.addAll(i),r},t4=({pcbComponent:t,sourceGroupId:e,inflatorContext:n})=>{if(!t?.center)return{pcbX:void 0,pcbY:void 0};if(e){const o=n.injectionDb.pcb_group.getWhere({source_group_id:e});if(o?.anchor_position)return{pcbX:t.center.x-o.anchor_position.x,pcbY:t.center.y-o.anchor_position.y}}return{pcbX:t.center.x,pcbY:t.center.y}};function I8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new MDt({name:t.name,capacitance:t.capacitance,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c&&A.add(c)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var DDt=({circuitJson:t,pcbComponentId:e,sourceComponentId:n})=>{const o=t.filter(r=>r.type==="pcb_component"?r.pcb_component_id===e:r.type==="source_component"?r.source_component_id===n:"pcb_component_id"in r&&r.pcb_component_id===e||"source_component_id"in r&&r.source_component_id===n);if(o.length===0)return null;const i=P$n(o);return{x:i.x,y:i.y}},C8o=t=>{if(t.root?.pcbDisabled||!t.name.toUpperCase().startsWith("J")||!t.pcb_component_id||!t.source_component_id)return;const e=t.root?.platform?.placementDrcChecksDisabled??t.getInheritedProperty("placementDrcChecksDisabled"),n=t.root?.platform?.drcChecksDisabled??t.getInheritedProperty("drcChecksDisabled");if(e||n)return;const{db:o}=t.root;if(o.source_component.get(t.source_component_id)?.ftype!=="simple_chip")return;const r=o.subtree({subcircuit_id:t.getSubcircuit().subcircuit_id}).toArray(),s=DDt({circuitJson:r,pcbComponentId:t.pcb_component_id,sourceComponentId:t.source_component_id});if(!s)return;const a=r.map(l=>l.type==="pcb_component"&&l.pcb_component_id===t.pcb_component_id?{...l,cable_insertion_center:s}:l),A=Vmt(a).find(l=>l.pcb_component_id===t.pcb_component_id);!A||o.toArray().some(l=>l.type===A.type&&l.message===A.message)||o.insertAll([A])},zj=class extends g0{get config(){return{componentName:"Chip",zodProps:Y3,shouldRenderAsSchematicBox:!0}}initPorts(t={}){super.initPorts(t);const{_parsedProps:e}=this;if(e.externallyConnectedPins){const n=new Set;for(const[o,i]of e.externallyConnectedPins)n.add(o),n.add(i);for(const o of n)if(!this.children.find(r=>r instanceof Pu&&r.isMatchingAnyOf([o]))){const r=o.match(/^pin(\d+)$/);if(r){const s=parseInt(r[1]);this.add(new Pu({pinNumber:s,aliases:[o]}))}else this.add(new Pu({name:o,aliases:[o]}))}}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_chip",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=e.footprint??this._getImpliedFootprintString(),r=this.children.some(c=>c.componentName==="Footprint");if(!i&&!r&&!this._hasStartedFootprintUrlLoad){const c=t.pcb_missing_footprint_error.insert({message:`No footprint specified for component: ${this.getString()}`,source_component_id:`${this.source_component_id}`,error_type:"pcb_missing_footprint_error"});this.pcb_missing_footprint_error_id=c.pcb_missing_footprint_error_id}const s=this._getPcbComponentLayer();if(s!=="top"&&s!=="bottom"){const c=this.getSubcircuit(),l=vne.parse({type:"pcb_component_invalid_layer_error",message:`Component cannot be placed on layer '${s}'. Components can only be placed on 'top' or 'bottom' layers.`,source_component_id:this.source_component_id,layer:s,subcircuit_id:c.subcircuit_id??void 0});t.pcb_component_invalid_layer_error.insert(l)}const a=this.getGlobalTransformRotation(),A=t.pcb_component.insert({center:{x:n,y:o},width:2,height:3,layer:s==="top"||s==="bottom"?s:"top",rotation:k9(a),insertion_direction:this._getPcbComponentInsertionDirection(s,a),source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0});this.pcb_component_id=A.pcb_component_id}doInitialPcbPlacementDesignRuleChecks(){C8o(this)}doInitialCreateTracesFromProps(){const{_parsedProps:t}=this;if(t.externallyConnectedPins)for(const[e,n]of t.externallyConnectedPins)this.add(new t1({from:`${this.getSubcircuitSelector()} > port.${e}`,to:`${this.getSubcircuitSelector()} > port.${n}`}));this._createTracesFromConnectionsProp()}doInitialSimulationRender(){const{db:t}=this.root,{pinAttributes:e}=this.props;if(!e)return;let n=null,o=null,i;const r=this.selectAll("port");for(const l of r)for(const u of l.getNameAndAliases())if(e[u]){const g=e[u];g.providesPower&&(n=l,i=g.providesVoltage),g.providesGround&&(o=l)}if(!n||!o||i===void 0)return;const s=t.source_port.get(n.source_port_id);if(!s?.subcircuit_connectivity_map_key)return;const a=t.source_port.get(o.source_port_id);if(!a?.subcircuit_connectivity_map_key)return;const A=t.source_net.getWhere({subcircuit_connectivity_map_key:s.subcircuit_connectivity_map_key}),c=t.source_net.getWhere({subcircuit_connectivity_map_key:a.subcircuit_connectivity_map_key});!A||!c||t.simulation_voltage_source.insert({type:"simulation_voltage_source",positive_source_port_id:n.source_port_id,positive_source_net_id:A.source_net_id,negative_source_port_id:o.source_port_id,negative_source_net_id:c.source_net_id,voltage:i})}},y8o=(t,e)=>{if(!t||t.length===0)return;const{injectionDb:n}=e,o=t.map(i=>i.map(r=>{const s=n.source_port.get(r);return s?s.pin_number!==void 0&&s.pin_number!==null?`pin${s.pin_number}`:s.name:null}).filter(r=>r!==null)).filter(i=>i.length>0);return o.length>0?o:void 0},x8o=(t,e)=>{const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),s=n.schematic_component.getWhere({source_component_id:t.source_component_id}),a=n.cad_component.getWhere({source_component_id:t.source_component_id}),A=y8o(t.internally_connected_source_port_ids,e),c=a?.footprinter_string??null,{pcbX:l,pcbY:u}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),g=new zj({name:t.name,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,pinLabels:s?.port_labels??void 0,schWidth:s?.size?.width,schHeight:s?.size?.height,schPinSpacing:s?.pin_spacing,schX:s?.center?.x,schY:s?.center?.y,layer:r?.layer,pcbX:l,pcbY:u,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds,internallyConnectedPins:A});if(c&&(Object.assign(g.props,{footprint:c}),Object.assign(g._parsedProps,{footprint:c})),r){const h=e4(r,{...e,normalComponent:g});h&&g.add(h)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(g):o.add(g)},E8o=/^(?:pin)?(\d+)$/i,B8o=t=>{for(const e of t??[]){const n=e.trim().match(E8o);if(n)return Number.parseInt(n[1],10)}},NDt=(t,e)=>t!==void 0&&t>=1&&t<=e,b8o=(t,e)=>{const n=new Map;for(const i of t)i.type==="source_port"&&typeof i.pin_number=="number"&&n.set(i.source_port_id,i.pin_number);const o=new Map;for(const i of t){if(i.type!=="pcb_port")continue;const r=n.get(i.source_port_id);r!==void 0&&o.set(i.pcb_port_id,r)}return t.filter(i=>!i.type.startsWith("schematic_")).map(i=>{if(i.type==="source_port"){const A=i.pin_number;return{...i,name:typeof A=="number"?`pin${A}`:i.name,port_hints:NDt(A,e)?[`pin${A}`]:[]}}if(!("port_hints"in i)&&!("pcb_port_id"in i))return i;const r="port_hints"in i?B8o(i.port_hints):void 0,s="pcb_port_id"in i&&typeof i.pcb_port_id=="string"?o.get(i.pcb_port_id):void 0,a=r??s;return{...i,port_hints:NDt(a,e)?[`pin${a}`]:[]}})},RDt=[{label:"GND1",aliases:[]},{label:"VBUS1",aliases:[]},{label:"CC1",aliases:[]},{label:"DP1",aliases:[]},{label:"DM1",aliases:["DN1"]},{label:"SBU1",aliases:[]},{label:"SBU2",aliases:[]},{label:"DM2",aliases:["DN2"]},{label:"DP2",aliases:[]},{label:"CC2",aliases:[]},{label:"VBUS2",aliases:[]},{label:"GND2",aliases:[]},{label:"SHELL1",aliases:["MH1","EH1","MOUNT1"]},{label:"SHELL2",aliases:["MH2","EH2","MOUNT2"]},{label:"SHELL3",aliases:["MH3","EH3","MOUNT3"]},{label:"SHELL4",aliases:["MH4","EH4","MOUNT4"]}],S8o=/^(?:pin)?(\d+)$/i,Q8o=t=>Array.from(new Set(t)),v8o=t=>{const e=[];for(const o of t){if(o.type!=="source_port")continue;const i=o.pin_number;if(typeof i!="number")continue;const r=new Set;for(const s of o.port_hints??[])r.add(s.trim().toUpperCase());e.push({pinKey:`pin${i}`,upperCaseHints:r})}const n={};for(const{label:o,aliases:i}of RDt){const r=[o,...i].map(A=>A.toUpperCase()),s=e.findIndex(A=>r.some(c=>A.upperCaseHints.has(c)));if(s===-1)continue;const{pinKey:a}=e[s];n[a]=[o],e.splice(s,1)}return Object.keys(n).length===0?t:t.map(o=>{if(!("port_hints"in o)||!Array.isArray(o.port_hints))return o;const i=o.port_hints.filter(a=>typeof a=="string").map(a=>a.trim()).filter(a=>a.length>0);if(i.length===0)return o;const r=new Set;o.type==="source_port"&&typeof o.pin_number=="number"&&r.add(`pin${o.pin_number}`);for(const a of i){const A=a.match(S8o);A&&r.add(`pin${Number.parseInt(A[1],10)}`)}const s=[];for(const a of r)s.push(...n[a]??[]);return s.length===0?o:{...o,port_hints:Q8o([...i,...s])}})},TDt=.5,w8o=.15;function P8o(t,e){if(!t.schematic_component_id||!t.root)return;const{db:n}=t.root,o=n.schematic_component.get(t.schematic_component_id);if(!o||o.symbol_name)return;const i=o.size.width*TDt,r=o.size.height*TDt,s=Math.min(i/e.size.width,r/e.size.height);if(!Number.isFinite(s)||s<=0)return;const a=t.getSubcircuit()?.subcircuit_id??void 0,A=o.center,c=e.center,l=-o.size.width*w8o,u=g=>({x:A.x+l+(g.x-c.x)*s,y:A.y+(g.y-c.y)*s});for(const g of e.primitives)if(g.type==="path"){const h=g.points.map(u);if(g.closed&&h.length>1){const d=h[0],p=h[h.length-1];(d.x!==p.x||d.y!==p.y)&&h.push(d)}n.schematic_path.insert({schematic_component_id:t.schematic_component_id,points:h,is_filled:g.fill??!1,is_dashed:!1,fill_color:g.fill?wb:void 0,stroke_width:.02,subcircuit_id:a,schematic_sheet_id:t._resolveSchematicSheetId()})}else if(g.type==="circle")n.schematic_circle.insert({schematic_component_id:t.schematic_component_id,center:u({x:g.x,y:g.y}),radius:g.radius*s,stroke_width:.02,color:wb,is_filled:g.fill,fill_color:g.fill?wb:void 0,is_dashed:!1,subcircuit_id:a,schematic_sheet_id:t._resolveSchematicSheetId()});else if(g.type==="box"){const h=u({x:g.x,y:g.y}),d=u({x:g.x+g.width,y:g.y+g.height});n.schematic_rect.insert({schematic_component_id:t.schematic_component_id,center:{x:(h.x+d.x)/2,y:(h.y+d.y)/2},width:Math.abs(d.x-h.x),height:Math.abs(d.y-h.y),stroke_width:.02,color:wb,is_filled:!1,is_dashed:!1,rotation:0,subcircuit_id:a,schematic_sheet_id:t._resolveSchematicSheetId()})}}var kDt=["VBUS1","VBUS2","CC1","CC2","DP1","DP2","DM1","DM2","SBU1","SBU2","GND1","GND2"],FDt=["SHELL1","SHELL2","SHELL3","SHELL4"],M8o=[...kDt,...FDt],D8o=new Set([...M8o]),N8o=new Set(["jst_sh","jst_gh","jst_zh","jst_ph","jst_xh","jst_vh"]),dPe=t=>t!==void 0&&N8o.has(t),R8o=[["CC1",{marginTop:.15}],["DP1",{marginTop:.15}],["SBU1",{marginTop:.15}],["GND1",{marginTop:.15}],["SHELL4",{marginRight:.15}]],LDt=class extends zj{_getConnectorProps(){return this._parsedProps}initPorts(){const t=this._getConnectorProps();super.initPorts({pinCount:dPe(t.standard)?t.pinCount:void 0})}_hasExplicitFootprint(){return this._getConnectorProps().footprint!==void 0||this.children.some(e=>e.componentName==="Footprint")}_shouldUseStandardPartsEngineCircuitJsonFlow(){return!(!this._getConnectorProps().standard||this._hasExplicitFootprint()||this.getInheritedProperty("partsEngineDisabled"))}_addUsbCCanonicalFallbackPorts(){this.selectAll("port").length>0||(this.addAll(RDt.map(({label:t,aliases:e},n)=>new Pu({pinNumber:n+1,name:t,aliases:[...e]}))),this._markDirty("InitializePortsFromChildren"))}_handleStandardConnectorCircuitJsonFailure(t,e){const{db:n}=this.root,o=hV.parse({type:"source_part_not_found_warning",message:`Failed to fetch circuit JSON for ${this.getString()} (standard="${t}"): ${e}`,source_component_id:this.source_component_id??void 0,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,manufacturer_part_number:this._getConnectorProps().manufacturerPartNumber??this._getConnectorProps().mfn??void 0,part_name:this.name});n.source_part_not_found_warning.insert(o),t==="usb_c"&&this._addUsbCCanonicalFallbackPorts()}_getSupplierPartNumbersToTry(t){const e=[];for(const n of Object.keys(t??{})){const o=t?.[n];Array.isArray(o)&&o.length>0&&e.push(o[0])}return e}async _tryFetchPartCircuitJson(t,e){const n=await Promise.resolve(t(e))??null;return Array.isArray(n)&&n.length>0?n:null}async _fetchStandardConnectorCircuitJson(t,e,n){for(const o of this._getSupplierPartNumbersToTry(e)){const i=await this._tryFetchPartCircuitJson(t,{supplierPartNumber:o});if(i)return i}return n?this._tryFetchPartCircuitJson(t,{manufacturerPartNumber:n}):null}_addConnectorFootprintFromCircuitJson(t,e){const n=this._getConnectorProps(),o=t==="usb_c"?v8o(e):dPe(t)?b8o(e,n.pinCount??0):e,i=Db({componentName:this.name,componentRotation:String(n.pcbRotation??0),footprinterString:`standard:${t}`,pinLabels:n.pinLabels,pcbPinLabels:n.pcbPinLabels},o),r=xDt(o);r&&(this._asyncFootprintCadModel=r),this.addAll(i),this._markDirty("InitializePortsFromChildren")}_getUsbCCanonicalLabelToPinNumberMap(){const t=new Map,e=this.selectAll("port");for(const n of e){const o=n.props.pinNumber;if(typeof o=="number")for(const i of n.getNameAndAliases()){const r=i.trim().toUpperCase();if(!D8o.has(r))continue;const s=r;t.has(s)||t.set(s,o)}}return t}_getSchematicPortArrangement(){const t=super._getSchematicPortArrangement();if(t&&Object.keys(t).length>0)return t;const e=this._getConnectorProps();if(dPe(e.standard))return{leftSize:0,rightSize:e.pinCount??0};if(e.standard!=="usb_c")return t;const n=this._getUsbCCanonicalLabelToPinNumberMap(),o=kDt.map(s=>n.get(s)).filter(s=>typeof s=="number"),i=FDt.map(s=>n.get(s)).filter(s=>typeof s=="number");if(o.length===0&&i.length===0)return t;const r={};return o.length>0&&(r.rightSide={pins:o,direction:"top-to-bottom"}),i.length>0&&(r.bottomSide={pins:i,direction:"left-to-right"}),r}_computeSchematicBoxDimensions(){if(this._getConnectorProps().standard!=="usb_c")return super._computeSchematicBoxDimensions();if(this.getSchematicSymbol()||!this.config.shouldRenderAsSchematicBox)return null;const{_parsedProps:t}=this,e=this._getPrimaryPinCount(),n=.2,i={...this._getPinLabelsFromPorts()};if(t.pinLabels)for(const[c,l]of Object.entries(t.pinLabels))typeof l=="string"&&(i[c]=l);const r=this._getUsbCCanonicalLabelToPinNumberMap(),s={};for(const[c,l]of R8o){const u=r.get(c);typeof u=="number"&&(s[`pin${u}`]=l)}const a={...s,...t.schPinStyle??{}},A=this._getSchematicPortArrangement();return sPe({schWidth:t.schWidth,schHeight:t.schHeight,schPinSpacing:n,numericSchPinStyle:Kj(a,i),pinCount:e,schPortArrangement:A??void 0,pinLabels:i})}get config(){return{componentName:"Connector",zodProps:Dwn,shouldRenderAsSchematicBox:!0}}doInitialSourceRender(){const{db:t}=this.root,e=this._getConnectorProps(),n=e.manufacturerPartNumber??e.mfn,o=t.source_component.insert({ftype:"simple_connector",name:this.name,manufacturer_part_number:n,supplier_part_numbers:e.supplierPartNumbers,display_name:e.displayName,standard:e.standard,pin_count:e.pinCount});this.source_component_id=o.source_component_id,e.standard&&!n&&t.source_missing_manufacturer_part_number_warning.insert({source_component_id:this.source_component_id,standard:e.standard,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,warning_type:"source_missing_manufacturer_part_number_warning",message:`${this.getString()} has standard="${e.standard}" but no manufacturerPartNumber (mfn). Add mfn if you do not want the connector part to change in future.`})}_isUsingStandardPartsEngineCircuitJsonFlow(){return this._shouldUseStandardPartsEngineCircuitJsonFlow()?!!this.getInheritedProperty("partsEngine")?.fetchPartCircuitJson:!1}doInitialFetchPartFootprint(){const t=this._getConnectorProps(),e=t.standard;if(!e||!this._shouldUseStandardPartsEngineCircuitJsonFlow()||this._hasStartedFootprintUrlLoad)return;const n=this.getInheritedProperty("partsEngine");if(n&&!n.fetchPartCircuitJson){this._handleStandardConnectorCircuitJsonFailure(e,"partsEngine.fetchPartCircuitJson is not configured");return}const o=n?.fetchPartCircuitJson;if(!o)return;this._hasStartedFootprintUrlLoad=!0;const i={type:"source_component",ftype:"simple_connector",name:this.name,manufacturer_part_number:t.manufacturerPartNumber??t.mfn,standard:e,pin_count:t.pinCount};this._queueAsyncEffect("load-standard-connector-circuit-json",async()=>{const{db:r}=this.root;try{const s=await this._getSupplierPartNumbers(n,i,`standard:${e}`);this.source_component_id&&r.source_component.update(this.source_component_id,{supplier_part_numbers:s});const a=await this._fetchStandardConnectorCircuitJson(o,s,i.manufacturer_part_number);if(!a){this._handleStandardConnectorCircuitJsonFailure(e,"part circuit JSON was not found");return}this._addConnectorFootprintFromCircuitJson(e,a)}catch(s){this.source_component_id&&r.source_component.update(this.source_component_id,{supplier_part_numbers:{}}),this._handleStandardConnectorCircuitJsonFailure(e,s.message)}})}doInitialPartsEngineRender(){this._isUsingStandardPartsEngineCircuitJsonFlow()||super.doInitialPartsEngineRender()}updatePartsEngineRender(){this._isUsingStandardPartsEngineCircuitJsonFlow()||super.updatePartsEngineRender()}doInitialSchematicComponentRender(){if(super.doInitialSchematicComponentRender(),!this.root?.schematicDisabled&&this.schematic_component_id&&this._getConnectorProps().standard==="usb_c"){const t=Su.usbc;t&&P8o(this,t)}}doInitialPcbComponentSizeCalculation(){if(super.doInitialPcbComponentSizeCalculation(),this.root?.pcbDisabled||!this.pcb_component_id||!this.source_component_id)return;const{db:t}=this.root,e=DDt({circuitJson:t.toArray(),pcbComponentId:this.pcb_component_id,sourceComponentId:this.source_component_id});e&&t.pcb_component.update(this.pcb_component_id,{cable_insertion_center:{x:e.x,y:e.y}})}},T8o=t=>{const e=t?.port_arrangement;if(!e)return;if("left_size"in e)return{leftPinCount:e.left_size,rightPinCount:e.right_size,topPinCount:e.top_size,bottomPinCount:e.bottom_size};const n={};return e.left_side&&(n.leftSide={pins:e.left_side.pins,direction:e.left_side.direction??"top-to-bottom"}),e.right_side&&(n.rightSide={pins:e.right_side.pins,direction:e.right_side.direction??"top-to-bottom"}),e.top_side&&(n.topSide={pins:e.top_side.pins,direction:e.top_side.direction??"left-to-right"}),e.bottom_side&&(n.bottomSide={pins:e.bottom_side.pins,direction:e.bottom_side.direction??"left-to-right"}),n},k8o=(t,e)=>{const n=e.injectionDb.source_port.list().filter(i=>i.source_component_id===t.source_component_id),o={};for(const i of n){const r=i.pin_number;if(r==null)continue;const s=Array.from(new Set([i.name,...i.port_hints??[]].filter(a=>typeof a=="string"&&a.length>0)));s.length>0&&(o[`pin${r}`]=s)}if(Object.keys(o).length!==0)return o};function F8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),s=n.schematic_component.getWhere({source_component_id:t.source_component_id}),a=n.cad_component.getWhere({source_component_id:t.source_component_id}),{pcbX:A,pcbY:c}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),l={name:t.name,standard:t.standard,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,pinLabels:k8o(t,e)??s?.port_labels??void 0,schPortArrangement:T8o(s),schWidth:s?.size?.width,schHeight:s?.size?.height,schPinSpacing:s?.pin_spacing,schX:s?.center?.x,schY:s?.center?.y,layer:r?.layer,pcbX:A,pcbY:c,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds},u=new LDt(l);if(a?.footprinter_string&&(Object.assign(u.props,{footprint:a.footprinter_string}),Object.assign(u._parsedProps,{footprint:a.footprinter_string})),r){const g=e4(r,{...e,normalComponent:u});g&&u.add(g)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(u):o.add(u)}var HDt=t=>typeof t=="string"&&!fO(t)&&!hw(t)&&!dw(t)&&!Vj(t),ODt=class extends g0{get config(){const t={schottky:"schottky_diode",avalanche:"avalanche_diode",zener:"zener_diode",photodiode:"photodiode"},e=this.props.schottky?"schottky":this.props.avalanche?"avalanche":this.props.zener?"zener":this.props.photo?"photodiode":null;return{schematicSymbolName:e?t[e]:this.props.symbolName??"diode",componentName:"Diode",zodProps:IMn,sourceFtype:"simple_diode"}}initPorts(){const t=this.children.some(i=>i.componentName==="Footprint"),e=this.resolveFootprint(),n=!!this._resolvePinLabels(),o=!n&&!t&&(!e||HDt(e));super.initPorts({pinCount:2,ignoreSymbolPorts:!n&&!o,additionalAliases:{pin1:o?["anode","pos","left"]:[],pin2:o?["cathode","neg","right"]:[]}})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_diode",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}getRefDesPrefixes(){return["D"]}get pos(){return this.portMap.pos}get anode(){return this.portMap.anode}get neg(){return this.portMap.neg}get cathode(){return this.portMap.cathode}},L8o=t=>Array.from(new Set([t?.name,...t?.port_hints??[]].filter(e=>typeof e=="string"&&e.length>0))),H8o=(t,e)=>{const n=e.injectionDb.source_port.list().filter(i=>i.source_component_id===t.source_component_id),o={};for(const i of n){if(i.pin_number===void 0||i.pin_number===null)continue;const r=L8o(i);r.length!==0&&(o[`pin${i.pin_number}`]=r)}return Object.keys(o).length>0?o:void 0};function O8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=H8o(t,e),c={name:t.name,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,pinLabels:A,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds},l=new ODt(c);if(r){const u=e4(r,{...e,normalComponent:l});u&&l.add(u)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(l):o.add(l)}var G8o=class extends g0{get config(){return{componentName:"Fiducial",zodProps:llt,sourceFtype:"simple_fiducial"}}doInitialSchematicComponentRender(){}};function Y8o(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=n.pcb_smtpad.list({pcb_component_id:r?.pcb_component_id}).find(u=>u.shape==="circle"),c=A&&"radius"in A?A.radius*2:"1mm",l=new G8o({name:t.name,padDiameter:c,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const u=e4(r,{...e,normalComponent:l});u&&l.add(u)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(l):o.add(l)}function U8o(t,e){if(e.size===0)return t;const n=(t.traces??[]).filter(i=>e.has(i.pcb_trace_id));if(n.length===0)return t;const o=[];for(const i of n){const r=[i.connection_name??i.pcb_trace_id,...i.connectsTo??[]];for(const[s,a]of i.route.entries()){if(a.route_type==="via"){const g=WN(t.layerCount),h=g.findIndex(m=>m===a.from_layer),d=g.findIndex(m=>m===a.to_layer),p=a.via_diameter??t.minViaPadDiameter??t.minViaDiameter??.6;o.push({type:"rect",center:{x:a.x,y:a.y},width:p,height:p,layers:g.slice(Math.min(h,d),Math.max(h,d)+1),connectedTo:r})}const A=i.route[s+1];if(!A||a.route_type!=="wire"&&a.route_type!=="via"||A.route_type!=="wire"&&A.route_type!=="via")continue;const c=a.route_type==="wire"?a.width:A.route_type==="wire"?A.width:t.minTraceWidth,l=a.route_type==="wire"?a.layer:a.to_layer,u=a.x===A.x||a.y===A.y?1:Math.max(1,Math.ceil(Math.hypot(A.x-a.x,A.y-a.y)/c));for(let g=0;g<u;g++){const h=a.x+(A.x-a.x)*g/u,d=a.y+(A.y-a.y)*g/u,p=a.x+(A.x-a.x)*(g+1)/u,m=a.y+(A.y-a.y)*(g+1)/u;o.push({type:"rect",center:{x:(h+p)/2,y:(d+m)/2},width:Math.abs(p-h)+c,height:Math.abs(m-d)+c,layers:[l],connectedTo:r})}}}return{...t,traces:t.traces?.filter(i=>!e.has(i.pcb_trace_id)),obstacles:[...t.obstacles,...o]}}function K8o(t){const e=[...t.schematic_net_label.list(),...t.schematic_text.list().filter(a=>a.source_trace_id)];if(e.length===0)return;const n=Vf(t.toArray().filter(a=>a.type.startsWith("source_")));n.addConnections([...t.source_net.list().map(a=>[a.source_net_id]),...t.source_component_internal_connection.list().map(a=>a.source_port_ids)]);const o=e.map(a=>{const A=a.type==="schematic_net_label",c=a.source_trace_id??(A&&a.schematic_trace_id?t.schematic_trace.get(a.schematic_trace_id)?.source_trace_id:void 0),l=(A?n.getNetConnectedToId(a.source_net_id):void 0)??(c?n.getNetConnectedToId(c):void 0);return{label:a,network:l}}),i=new Map,r=(a,A)=>{if(!a.trim()||A===void 0)return;const c=i.get(a)??[];c.includes(A)||c.push(A),i.set(a,c)};for(const{label:a,network:A}of o)r(a.text,A);const s=a=>[...n.getIdsConnectedToNet(a)].sort()[0];for(const a of i.values())a.sort((A,c)=>s(A).localeCompare(s(c),"en",{numeric:!0}));for(const{label:a,network:A}of o){const c=i.get(a.text)??[],l=A!==void 0&&c.length>1?String(c.indexOf(A)+1):void 0;a.display_superscript!==l&&(a.type==="schematic_net_label"?t.schematic_net_label.update(a.schematic_net_label_id,{display_superscript:l}):t.schematic_text.update(a.schematic_text_id,{display_superscript:l}))}}var U0e=t=>typeof t=="object"&&t!==null&&"isAssemblyDeviceContainer"in t&&t.isAssemblyDeviceContainer===!0;function qN(t){const e=`${t.connectionName}:source-${t.sourcePointIndex}`;return{boundaryExitPointId:`fanout-exit:${e}`,planeExitPointId:`fanout-plane:${e}`,traceId:`fanout:${e}`,viaObstacleId:`fanout-via:${e}`,planeEndpointPointId:`fanout-plane-endpoint-point:${e}`,planeEndpointTraceId:`fanout-plane-endpoint:${e}`,planeEndpointViaObstacleId:`fanout-plane-endpoint-via:${e}`}}function V8o(t){return`fanout-completion:${t.connectionName}:source-${t.sourcePointIndex}:${t.candidateIndex}`}var Nb=1e-9;function K0e(t){return t.shape==="circle"}function Jj(t,e){const n=-(e.ccwRotationDegrees??0)*Math.PI/180,o=t.x-e.center.x,i=t.y-e.center.y;return{x:o*Math.cos(n)-i*Math.sin(n),y:o*Math.sin(n)+i*Math.cos(n)}}function tn(t,e){return Math.hypot(t.x-e.x,t.y-e.y)}function Cr(t,e,n){const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i,s=r<Nb?0:((t.x-e.x)*o+(t.y-e.y)*i)/r,a=Math.max(0,Math.min(1,s));return Math.hypot(t.x-(e.x+a*o),t.y-(e.y+a*i))}function V0e(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)}function z8o(t,e,n,o){const i=V0e(n,o,t),r=V0e(n,o,e),s=V0e(t,e,n),a=V0e(t,e,o);return(i>0&&r<0||i<0&&r>0)&&(s>0&&a<0||s<0&&a>0)}function tu(t,e,n,o){return z8o(t,e,n,o)?0:Math.min(Cr(t,n,o),Cr(e,n,o),Cr(n,t,e),Cr(o,t,e))}function IO(t,e,n=Nb){if(K0e(e))return tn(t,e.center)<=e.width/2+n;const o=Jj(t,e);return Math.abs(o.x)<=e.width/2+n&&Math.abs(o.y)<=e.height/2+n}function z0e(t){const{center:e,diameter:n,obstacle:o,tolerance:i=Nb}=t,r=n/2;if(K0e(o))return tn(e,o.center)+r<=o.width/2+i;const s=Jj(e,o);return Math.abs(s.x)+r<=o.width/2+i&&Math.abs(s.y)+r<=o.height/2+i}function wx(t,e){if(K0e(e))return Math.max(0,tn(t,e.center)-e.width/2);const n=Jj(t,e),o=Math.max(Math.abs(n.x)-e.width/2,0),i=Math.max(Math.abs(n.y)-e.height/2,0);return Math.hypot(o,i)}function Tl(t,e){if(K0e(e))return Math.max(0,Cr(e.center,t.start,t.end)-e.width/2);const n=Jj(t.start,e),o=Jj(t.end,e);if(Math.abs(n.x)<=e.width/2+Nb&&Math.abs(n.y)<=e.height/2+Nb||Math.abs(o.x)<=e.width/2+Nb&&Math.abs(o.y)<=e.height/2+Nb)return 0;const i=-e.width/2,r=e.width/2,s=-e.height/2,a=e.height/2,A=[{x:i,y:s},{x:r,y:s},{x:r,y:a},{x:i,y:a}];let c=Number.POSITIVE_INFINITY;for(let l=0;l<A.length;l++)c=Math.min(c,tu(n,o,A[l],A[(l+1)%A.length]));return c}function Zm(t,e,n){if(t.layer!==e.layer)return!0;const o=(t.width+e.width)/2+n,i=o+Nb;return Math.min(t.start.x,t.end.x)-Math.max(e.start.x,e.end.x)>i||Math.min(e.start.x,e.end.x)-Math.max(t.start.x,t.end.x)>i||Math.min(t.start.y,t.end.y)-Math.max(e.start.y,e.end.y)>i||Math.min(e.start.y,e.end.y)-Math.max(t.start.y,t.end.y)>i?!0:tu(t.start,t.end,e.start,e.end)>=o-Nb}var GDt=new WeakMap;function YDt(t){return t.netConnectionName??t.rootConnectionName??t.name}function XN(t,e,n){if(!e)return!1;const o=t.get(e)??new Set,i=o.size;return o.add(n),t.set(e,o),o.size!==i}function hPe(t,e){const n=new Set;for(const o of e)for(const i of t.get(o)??[])n.add(i);return n}function J8o(t){const e=new Map,n=new Map;for(const a of t.connections){const A=YDt(a);e.set(a.name,A),XN(n,a.name,A),XN(n,a.rootConnectionName,A),XN(n,a.netConnectionName,A);for(const c of a.pointsToConnect)XN(n,c.pointId,A),XN(n,c.pcb_port_id,A)}for(const a of t.traces??[]){const A=[a.connection_name,a.pcb_trace_id,...a.connectsTo??[]],c=hPe(n,A);if(c.size!==1)continue;const l=[...c][0];e.set(a.connection_name,l);for(const u of A)XN(n,u,l)}for(let a=0;a<2;a++){let A=!1;for(const c of t.obstacles){const l=hPe(n,c.connectedTo);if(l.size!==1)continue;const u=[...l][0];for(const g of c.connectedTo)A=XN(n,g,u)||A}if(!A)break}const o=new Map,i=a=>{const A=o.get(a)??a;if(o.set(a,A),A===a)return a;const c=i(A);return o.set(a,c),c},r=(a,A)=>{const c=i(a),l=i(A);c!==l&&o.set(l,c)};for(const a of n.values()){const[A,...c]=[...a];if(A)for(const l of c)r(A,l)}for(const a of[...t.obstacles.map(A=>A.connectedTo),...(t.traces??[]).map(A=>A.connectsTo??[])]){const[A,...c]=[...hPe(n,a)];if(A)for(const l of c)r(A,l)}for(const[a,A]of e)e.set(a,i(A));const s=new Map;for(const[a,A]of n){const c=A.values().next().value;c!==void 0&&s.set(a,i(c))}return{connectionNetKeys:e,tokenNetKeys:s}}function UDt(t){const e=GDt.get(t);if(e)return e;const n=J8o(t);return GDt.set(t,n),n}function Px(t,e,n){const o=UDt(t),i=o.connectionNetKeys.get(e),r=o.connectionNetKeys.get(n);return i!==void 0&&i===r}function n4(t,e,n){const o=UDt(t),i=o.connectionNetKeys.get(n);if(!i)return!1;for(const r of e.connectedTo)if(o.tokenNetKeys.get(r)===i)return!0;return!1}function Rb(t){if(!Number.isInteger(t)||t<1)throw new Error(`FanoutSolver: layerCount must be a positive integer, received ${t}`);return t===1?["top"]:t===2?["top","bottom"]:["top",...Array.from({length:t-2},(e,n)=>`inner${n+1}`),"bottom"]}function KDt(t,e,n){const o=n.indexOf(t),i=n.indexOf(e);if(o<0||i<0)throw new Error(`FanoutSolver: cannot build via span from "${t}" to "${e}"`);const r=Math.min(o,i),s=Math.max(o,i);return n.slice(r,s+1)}function Mx(t){const{fromLayer:e,toLayer:n,layerNames:o,allowBlindAndBuriedVias:i}=t,r=KDt(e,n,o);return i?r:[...o]}function VDt(t){const{fromLayer:e,toLayer:n,layers:o,layerNames:i,allowBlindAndBuriedVias:r}=t,s=Mx({fromLayer:e,toLayer:n,layerNames:i,allowBlindAndBuriedVias:r});if(!o)return s;if(o.length===0||!o.includes(e)||!o.includes(n)||o.some(a=>!i.includes(a)))throw new Error(`FanoutSolver: route via from "${e}" to "${n}" has an invalid physical layer span`);return[...o]}function W8o(t){const{busIds:e,layers:n,layersByBusId:o,maxAssignments:i}=t;if(n.length===0)throw new Error("FanoutSolver: no escape layers are available");if(!Number.isInteger(i)||i<1)throw new Error(`FanoutSolver: maxLayerCombinations must be positive, received ${i}`);const r=e.map(p=>o?.[p]??n),s=r.findIndex(p=>p.length===0);if(s>=0)throw new Error(`FanoutSolver: no escape layers are available for bus "${e[s]}"`);const a=r.reduce((p,m)=>p*m.length,1),A=Math.min(i,Number.isFinite(a)?a:i),c=[],l=new Set;function u(p){const m={};for(let f=0;f<e.length;f++)m[e[f]]=r[f][p[f]];const _=JSON.stringify(m);l.has(_)||(l.add(_),c.push(m))}if(a<=i){for(let p=0;p<A;p++){const m=[];let _=p;for(let f=0;f<e.length;f++){const I=r[f].length,C=_%I;_=Math.floor(_/I),m.push((C+f)%I)}u(m)}return c}function g(p){let m=p|0;return m=Math.imul(m^m>>>16,569420461),m=Math.imul(m^m>>>15,1935289751),(m^m>>>15)>>>0}const h=e.map((p,m)=>m%r[m].length);u(h);const d=Math.max(...r.map(p=>p.length));for(let p=1;p<d&&c.length<A;p++)u(h.map((m,_)=>(m+p)%r[_].length));for(let p=0;p<e.length&&c.length<A;p++)for(let m=1;m<r[p].length&&c.length<A;m++){const _=[...h];_[p]=(h[p]+m)%r[p].length,u(_)}for(let p=1;c.length<A&&p<A*20;p++)u(e.map((m,_)=>g(p*2654435761+_*2246822507)%r[_].length));return c}var q7=1e-6;function j8o(t){return"layer"in t?[t.layer]:t.layers}function Wj(t,e){return t.some(n=>e.includes(n))}function $8o(t,e){const n=[];let o;for(const i of t.route){if(i.route_type==="via"){n.push({type:"via",center:{x:i.x,y:i.y},diameter:i.via_diameter??0,layers:KDt(i.from_layer,i.to_layer,e)}),o=void 0;continue}i.route_type==="wire"&&(o&&o.layer===i.layer&&tn(o,i)>q7&&n.push({type:"segment",segment:{start:{x:o.x,y:o.y},end:{x:i.x,y:i.y},width:i.width,layer:i.layer}}),o=i)}return n}function Tb(t,e){return t.type==="plane"&&e.type==="plane"?t.layer===e.layer:t.type==="plane"&&e.type==="via"?e.layers.includes(t.layer):t.type==="via"&&e.type==="plane"?Tb(e,t):t.type==="plane"&&e.type==="segment"?t.layer===e.segment.layer:t.type==="segment"&&e.type==="plane"?Tb(e,t):t.type==="endpoint"&&e.type==="endpoint"?Wj(t.layers,e.layers)&&tn(t.point,e.point)<=q7:t.type==="endpoint"&&e.type==="obstacle"?Wj(t.layers,e.obstacle.layers)&&IO(t.point,e.obstacle,q7):t.type==="obstacle"&&e.type==="endpoint"?Tb(e,t):t.type==="endpoint"&&e.type==="segment"?t.layers.includes(e.segment.layer)&&Cr(t.point,e.segment.start,e.segment.end)<=e.segment.width/2+q7:t.type==="segment"&&e.type==="endpoint"?Tb(e,t):t.type==="endpoint"&&e.type==="via"?Wj(t.layers,e.layers)&&tn(t.point,e.center)<=e.diameter/2+q7:t.type==="via"&&e.type==="endpoint"?Tb(e,t):t.type==="obstacle"&&e.type==="segment"?t.obstacle.layers.includes(e.segment.layer)&&Tl(e.segment,t.obstacle)<=e.segment.width/2+q7:t.type==="segment"&&e.type==="obstacle"?Tb(e,t):t.type==="obstacle"&&e.type==="via"?Wj(t.obstacle.layers,e.layers)&&wx(e.center,t.obstacle)<=e.diameter/2+q7:t.type==="via"&&e.type==="obstacle"?Tb(e,t):t.type==="segment"&&e.type==="segment"?t.segment.layer===e.segment.layer&&tu(t.segment.start,t.segment.end,e.segment.start,e.segment.end)<=(t.segment.width+e.segment.width)/2+q7:t.type==="segment"&&e.type==="via"?e.layers.includes(t.segment.layer)&&Cr(e.center,t.segment.start,t.segment.end)<=e.diameter/2+t.segment.width/2+q7:t.type==="via"&&e.type==="segment"?Tb(e,t):t.type==="via"&&e.type==="via"?Wj(t.layers,e.layers)&&tn(t.center,e.center)<=(t.diameter+e.diameter)/2+q7:!1}var q8o=class{parent;constructor(e){this.parent=Array.from({length:e},(n,o)=>o)}find(e){const n=this.parent[e];if(n===e)return e;const o=this.find(n);return this.parent[e]=o,o}union(e,n){const o=this.find(e),i=this.find(n);o!==i&&(this.parent[i]=o)}};function X8o(t,e,n){return!!(e.connection_name&&Px(t,e.connection_name,n.name))}function o4(t){const{inputSrj:e,routedSrj:n}=t,o=n.fanoutPlaneConnectivity,i=Rb(n.layerCount),r=new Map;for(const l of e.connections){const u=YDt(l),g=r.get(u)??[];g.push(l),r.set(u,g)}const s=[];let a=0,A=0;for(const l of r.values()){const u=l[0],g=l.flatMap(I=>I.pointsToConnect.map((C,y)=>({type:"endpoint",connectionName:I.name,endpointIndex:y,point:C,layers:j8o(C)}))),h=e.obstacles.filter(I=>n4(e,I,u.name)).map(I=>({type:"obstacle",obstacle:I})),d=(n.traces??[]).filter(I=>X8o(e,I,u)).flatMap(I=>$8o(I,i)),p=[...new Set((o??[]).flatMap(I=>Px(e,I.connectionName,u.name)?[I.layer]:[]))].map(I=>({type:"plane",layer:I})),m=[...g,...h,...d,...p],_=new q8o(m.length);for(let I=0;I<m.length;I++)for(let C=I+1;C<m.length;C++)Tb(m[I],m[C])&&_.union(I,C);const f=new Map;for(let I=0;I<g.length;I++){const C=g[I],y=f.get(C.connectionName)??[];y[C.endpointIndex]=I,f.set(C.connectionName,y)}for(const I of l){const C=f.get(I.name)??[],y=C[0],x=y===void 0?void 0:_.find(y),E=C.flatMap((B,S)=>x===void 0||_.find(B)!==x?[S]:[]);A+=C.length-E.length,E.length===0?a++:s.push({code:"original-endpoints-disconnected",connectionName:I.name,disconnectedEndpointIndices:E,message:`Connection ${I.name} has no physical copper path from endpoint 0 to original endpoint${E.length===1?"":"s"} ${E.join(", ")}`})}}const c=e.connections.reduce((l,u)=>l+u.pointsToConnect.length,0);return{valid:s.length===0,checkedConnectionCount:e.connections.length,connectedConnectionCount:a,checkedEndpointCount:c,connectedEndpointCount:A,issues:s}}var X7=1e-6;function jj(t){const{inputSrj:e,segment:n,bodyObstacle:o,connectionName:i}=t;if(o.connectedTo.length>0||!o.componentId)return!1;const r=e.obstacles.filter(s=>s.componentId===o.componentId&&s.layers.includes(n.layer)&&n4(e,s,i));for(const s of r)for(const[a,A]of[[n.start,n.end],[n.end,n.start]]){if(!IO(a,s,X7))continue;const c={x:a.x-o.center.x,y:a.y-o.center.y},l={x:A.x-a.x,y:A.y-a.y};if(c.x*l.x+c.y*l.y>X7)return!0}return!1}function pPe(t,e){return tn(t,e)<=X7}function sE(t,e){t.push(e)}function Z8o(t){const{srj:e,trace:n,connectionName:o,layerNames:i,allowBlindAndBuriedVias:r,issues:s}=t,a=[],A=[];let c,l;for(const u of n.route){if(u.route_type==="via"){const g=VDt({fromLayer:u.from_layer,toLayer:u.to_layer,layers:"layers"in u&&Array.isArray(u.layers)?u.layers:void 0,layerNames:i,allowBlindAndBuriedVias:r});A.push({center:{x:u.x,y:u.y},diameter:u.via_diameter??e.minViaPadDiameter??e.minTraceWidth,spanLayers:g}),(!c||!pPe(c,u)||c.layer!==u.from_layer)&&sE(s,{code:"disconnected-trace",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} reaches a via without a matching ${u.from_layer} wire endpoint`}),l=u;continue}if(u.route_type!=="wire"){sE(s,{code:"unsupported-route-point",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} contains unsupported ${u.route_type} geometry`}),c=void 0,l=void 0;continue}if(l){(!pPe(u,l)||u.layer!==l.to_layer)&&sE(s,{code:"disconnected-trace",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} does not continue from its via on ${l.to_layer}`}),c=u,l=void 0;continue}c&&(c.layer!==u.layer?sE(s,{code:"disconnected-trace",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} changes from ${c.layer} to ${u.layer} without a via`}):pPe(c,u)||a.push({start:{x:c.x,y:c.y},end:{x:u.x,y:u.y},width:u.width,layer:u.layer})),c=u}return l&&sE(s,{code:"disconnected-trace",traceId:n.pcb_trace_id,connectionName:o,message:`Trace ${n.pcb_trace_id} ends at a via without a wire on ${l.to_layer}`}),{trace:n,connectionName:o,segments:a,vias:A}}function qu(t){const{inputSrj:e,routedSrj:n,clearance:o,allowBlindAndBuriedVias:i=!0}=t,r=[],s=Rb(n.layerCount),a=[],A=[e,n].flatMap(c=>c.connections.flatMap(l=>l.pointsToConnect.map(u=>({connectionName:l.name,point:u}))));for(const c of n.traces??[]){const l=c.connection_name;if(!l||!e.connections.some(u=>u.name===l)){sE(r,{code:"unknown-trace-connection",traceId:c.pcb_trace_id,...l?{connectionName:l}:{},message:`Trace ${c.pcb_trace_id} does not identify an input connection`});continue}a.push(Z8o({srj:n,trace:c,connectionName:l,layerNames:s,allowBlindAndBuriedVias:i,issues:r}))}for(const c of a){const l=new Set(e.obstacles.filter(g=>n4(e,g,c.connectionName))),u=e.obstacles.filter(g=>!l.has(g));for(const g of c.segments)for(const h of u){if(!h.layers.includes(g.layer)||jj({inputSrj:e,segment:g,bodyObstacle:h,connectionName:c.connectionName}))continue;const d=Tl(g,h),p=g.width/2+o;d<p-X7&&sE(r,{code:"trace-obstacle-clearance",traceId:c.trace.pcb_trace_id,connectionName:c.connectionName,layer:g.layer,obstacleId:h.obstacleId,message:`Trace ${c.trace.pcb_trace_id} on ${g.layer} is ${d.toFixed(4)}mm from different-net obstacle ${h.obstacleId}; ${p.toFixed(4)}mm is required`})}for(const g of c.vias){const h=A.find(({point:p})=>tn(g.center,p)<=X7),d=e.allowViaInPad===!0&&e.obstacles.some(p=>p.layers.some(m=>g.spanLayers.includes(m))&&l.has(p)&&z0e({center:g.center,diameter:g.diameter,obstacle:p,tolerance:X7}));h&&!d&&sE(r,{code:"via-at-endpoint",traceId:c.trace.pcb_trace_id,connectionName:c.connectionName,otherConnectionName:h.connectionName,message:`Via in ${c.trace.pcb_trace_id} is placed directly at an original or routed connection endpoint`});for(const p of u){if(!p.layers.some(f=>g.spanLayers.includes(f)))continue;const m=wx(g.center,p),_=g.diameter/2+o;m<_-X7&&sE(r,{code:"via-obstacle-clearance",traceId:c.trace.pcb_trace_id,connectionName:c.connectionName,obstacleId:p.obstacleId,message:`Via in ${c.trace.pcb_trace_id} is ${m.toFixed(4)}mm from different-net obstacle ${p.obstacleId} on its layer span; ${_.toFixed(4)}mm is required`})}}}for(let c=0;c<a.length;c++){const l=a[c];for(let u=c+1;u<a.length;u++){const g=a[u];if(!Px(e,l.connectionName,g.connectionName)){for(const h of l.segments){for(const d of g.segments)Zm(h,d,o)||sE(r,{code:"different-net-trace-clearance",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,layer:h.layer,message:`Different-net traces ${l.trace.pcb_trace_id} and ${g.trace.pcb_trace_id} intersect or violate clearance on ${h.layer}`});for(const d of g.vias)!d.spanLayers.includes(h.layer)||Cr(d.center,h.start,h.end)>=d.diameter/2+h.width/2+o-X7||sE(r,{code:"different-net-trace-via-clearance",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,layer:h.layer,message:`Trace ${l.trace.pcb_trace_id} violates via clearance to ${g.trace.pcb_trace_id} on ${h.layer}`})}for(const h of l.vias){for(const d of g.segments)!h.spanLayers.includes(d.layer)||Cr(h.center,d.start,d.end)>=h.diameter/2+d.width/2+o-X7||sE(r,{code:"different-net-trace-via-clearance",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,layer:d.layer,message:`Via in ${l.trace.pcb_trace_id} violates trace clearance to ${g.trace.pcb_trace_id} on ${d.layer}`});for(const d of g.vias)!h.spanLayers.some(p=>d.spanLayers.includes(p))||tn(h.center,d.center)>=(h.diameter+d.diameter)/2+o-X7||sE(r,{code:"different-net-via-clearance",traceId:l.trace.pcb_trace_id,connectionName:l.connectionName,otherTraceId:g.trace.pcb_trace_id,otherConnectionName:g.connectionName,message:`Different-net vias in ${l.trace.pcb_trace_id} and ${g.trace.pcb_trace_id} violate clearance on an overlapping layer span`})}}}}return{valid:r.length===0,checkedTraceCount:n.traces?.length??0,checkedSegmentCount:a.reduce((c,l)=>c+l.segments.length,0),checkedViaCount:a.reduce((c,l)=>c+l.vias.length,0),issues:r}}var mPe=1e-9;function $j(t,e){if("layer"in t)return t.layer;const n=t.layers[0];if(!n)throw new Error("Endpoint completion received a layerless point");return n}function zDt(t){const e=[];for(const n of t)e.at(-1)&&tn(e.at(-1),n)<mPe||e.push(n);return e}function JDt(t,e){const n=zDt(t);if(n.length<3)return n;const o=[n[0]];for(let i=1;i<n.length-1;i++){const r=n[i-1],s=n[i],a=n[i+1],A=tn(r,s),c=tn(s,a),l={x:(s.x-r.x)/A,y:(s.y-r.y)/A},u={x:(a.x-s.x)/c,y:(a.y-s.y)/c};if(Math.abs(l.x*u.x+l.y*u.y)>1e-6){o.push(s);continue}const g=Math.min(e,A/2,c/2);o.push({x:s.x-l.x*g,y:s.y-l.y*g}),o.push({x:s.x+u.x*g,y:s.y+u.y*g})}return o.push(n.at(-1)),zDt(o)}function ebo(t){const{inputSrj:e,connectionName:n,target:o,targetLayer:i}=t;return e.obstacles.find(r=>r.layers.includes(i)&&n4(e,r,n)&&IO(o,r,1e-6))}function tbo(t){const{inputSrj:e,plan:n}=t,o=$j(n.targetPoint),i=ebo({inputSrj:e,connectionName:n.connectionName,target:n.targetPoint,targetLayer:o}),r=e.obstacles.find(c=>c.componentId===i?.componentId&&c.connectedTo.length===0),s=r?{x:n.targetPoint.x-r.center.x,y:n.targetPoint.y-r.center.y}:{x:n.targetPoint.x-n.sourcePoint.x,y:n.targetPoint.y-n.sourcePoint.y},a=Math.hypot(s.x,s.y),A=a>mPe?{x:s.x/a,y:s.y/a}:{x:1,y:0};return{outward:A,perpendicular:{x:-A.y,y:A.x}}}function WDt(t){const{plan:e,branchStart:n,viaPoint:o,assignedLayerPath:i,terminalApproach:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,candidateIndex:c,chamfer:l}=t,u=$j(e.targetPoint),g=JDt(i,l),h=JDt([o,...r?[r]:[],e.targetPoint],l),d=g.map(p=>({route_type:"wire",x:p.x,y:p.y,width:s,layer:n.layer}));n.layer!==u&&(d.push({route_type:"via",x:o.x,y:o.y,from_layer:n.layer,to_layer:u,via_diameter:a,via_hole_diameter:A}),d.push({route_type:"wire",x:o.x,y:o.y,width:s,layer:u}));for(const p of h.slice(1))d.push({route_type:"wire",x:p.x,y:p.y,width:s,layer:u});return{type:"pcb_trace",pcb_trace_id:V8o({connectionName:e.connectionName,sourcePointIndex:e.sourcePointIndex,candidateIndex:c}),connection_name:e.connectionName,route:d}}function ZN(t,e){return!t.issues.some(n=>n.connectionName===e)}function _Pe(t){const{trace:e,endpointSrjs:n}=t,o=n.flatMap(i=>i.connections.flatMap(r=>r.pointsToConnect));return e.route.some(i=>i.route_type==="via"&&o.some(r=>tn(i,r)<=1e-6))}function nbo(t){const{inputSrj:e,fanoutSrj:n,plan:o,acceptedTraces:i,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,clearance:A,allowBlindAndBuriedVias:c}=t,{outward:l,perpendicular:u}=tbo({inputSrj:e,plan:o}),g=[...o.via?[{x:o.via.center.x,y:o.via.center.y,layer:o.targetLayer}]:[],{x:o.sourcePoint.x,y:o.sourcePoint.y,layer:o.sourceLayer}];let h=[],d=Number.POSITIVE_INFINITY,p=0;const m=e.connections.length>32?600:Number.POSITIVE_INFINITY,_=o.termination.type==="plane"?$Dt({trace:o.trace,endpoint:o.exitPoint,layer:o.sourceLayer,distances:[.2,.3,.4]}):[],f=[...o.termination.type==="plane"&&o.via?[{...o.via.center}]:[],..._,...[.4,.8,1.2,1.6].flatMap(I=>[0,.4,-.4,.8,-.8,1.2,-1.2,1.6,-1.6].map(C=>({x:o.sourcePoint.x+l.x*I+u.x*C,y:o.sourcePoint.y+l.y*I+u.y*C})))];for(const I of f){const C=[...o.termination.type==="plane"?[{...I,layer:o.targetLayer}]:[],...g,..._.flatMap(y=>tn(y,I)<=1e-6?[{...y,layer:o.sourceLayer}]:[])];for(const y of C){const x=tn(y,I)<=1e-6?[[y]]:[[y,I],[y,{x:I.x,y:y.y},I],[y,{x:y.x,y:I.y},I],...[.4,-.4].map(E=>[y,{x:y.x+E,y:y.y},{x:y.x+E,y:I.y},I])];for(const E of x){const B=[void 0,...[.4,.8].map(S=>({x:o.targetPoint.x+l.x*S,y:o.targetPoint.y+l.y*S})),...[.4,-.4].map(S=>({x:o.targetPoint.x+l.x*.4+u.x*S,y:o.targetPoint.y+l.y*.4+u.y*S}))];for(const S of B){if(p>=m)return{blockingConnectionNames:h};const Q=WDt({plan:o,branchStart:y,viaPoint:I,assignedLayerPath:E,terminalApproach:S,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,candidateIndex:p++,chamfer:0});if(_Pe({trace:Q,endpointSrjs:[e,n]}))continue;const w={...n,traces:[...n.traces??[],...i,Q]},M=qu({inputSrj:e,routedSrj:w,clearance:A,allowBlindAndBuriedVias:c});if(!M.valid){M.issues.length<d&&(d=M.issues.length,h=[...new Set(M.issues.flatMap(R=>[R.connectionName,R.otherConnectionName].flatMap(F=>F&&F!==o.connectionName?[F]:[])))]);continue}const k=o4({inputSrj:e,routedSrj:w});if(ZN(k,o.connectionName))return{trace:Q,blockingConnectionNames:[]}}}}}return{blockingConnectionNames:h}}function obo(t){const{inputSrj:e,fanoutSrj:n,plans:o,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A}=t,c=[],l=[],u=new Set;for(const h of o){const d=nbo({inputSrj:e,fanoutSrj:n,plan:h,acceptedTraces:c,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});if(d.trace)c.push(d.trace);else{l.push(h.connectionName);for(const p of d.blockingConnectionNames)u.add(p)}}const g={...n,traces:[...n.traces??[],...c]};return{traces:c,failedConnectionNames:l,blockingConnectionNames:[...u],connectivity:o4({inputSrj:e,routedSrj:g}),drc:qu({inputSrj:e,routedSrj:g,clearance:a,allowBlindAndBuriedVias:A})}}function jDt(t){let e=0,n;for(const o of t.route){if(o.route_type!=="wire"){n=void 0;continue}n?.layer===o.layer&&(e+=tn(n,o)),n=o}return e}function ibo(t){const{fanoutSrj:e,completionTraces:n}=t,o=new Map(n.flatMap(r=>{const s=r.route.find(a=>a.route_type==="wire");return s?[[r.connection_name,{x:s.x,y:s.y,layer:s.layer}]]:[]})),i=(e.traces??[]).map(r=>{if(!r.pcb_trace_id.startsWith("fanout:"))return r;const s=o.get(r.connection_name);if(!s)return r;let a;for(let A=0;A<r.route.length;A++){const c=r.route[A];if(c?.route_type!=="wire"){a=void 0;continue}if(a!==void 0){const l=r.route[a];if(l?.route_type==="wire"&&l.layer===s.layer&&c.layer===s.layer&&Cr(s,l,c)<=1e-6){const u=r.route.slice(0,a+1);return tn(l,s)>1e-6&&u.push({route_type:"wire",x:s.x,y:s.y,width:c.width,layer:s.layer}),{...r,route:u}}}a=A}return r});return{...e,traces:i}}function rbo(t){const{inputSrj:e,fanoutSrj:n,localTraces:o,candidates:i,clearance:r,allowBlindAndBuriedVias:s}=t,a=[...n.traces??[],...o],A={...n,traces:a},c=o4({inputSrj:e,routedSrj:A}),u=i.filter(d=>d.route.length>1&&d.route.every(p=>p.route_type==="wire"||p.route_type==="via")&&!_Pe({trace:d,endpointSrjs:[e,n]})).filter(d=>{const p=o4({inputSrj:e,routedSrj:{...n,traces:[...a,d]}});return p.connectedConnectionCount>c.connectedConnectionCount&&ZN(p,d.connection_name)}),g={...n,traces:[...a,...u]};if(qu({inputSrj:e,routedSrj:g,clearance:r,allowBlindAndBuriedVias:s}).valid)return u;const h=[];for(const d of u.toSorted((p,m)=>jDt(p)-jDt(m))){const p={...n,traces:[...a,...h,d]};if(!qu({inputSrj:e,routedSrj:p,clearance:r,allowBlindAndBuriedVias:s}).valid)continue;const _=o4({inputSrj:e,routedSrj:{...n,traces:[...a,...h]}}),f=o4({inputSrj:e,routedSrj:p});f.connectedConnectionCount>_.connectedConnectionCount&&ZN(f,d.connection_name)&&h.push(d)}return h}function $Dt(t){const{trace:e,endpoint:n,layer:o,distances:i}=t,r=e.route.findLastIndex(s=>s.route_type==="wire"&&s.layer===o&&tn(s,n)<=1e-6);return r<0?[]:i.flatMap(s=>{let a=s,A=n;for(let c=r-1;c>=0;c--){const l=e.route[c];if(l?.route_type!=="wire"||l.layer!==o)break;const u=tn(A,l);if(!(u<=mPe)){if(a<u-1e-6)return[{x:A.x+(l.x-A.x)*a/u,y:A.y+(l.y-A.y)*a/u}];a-=u,A=l}}return[]})}function qDt(t){const{inputSrj:e,fanoutSrj:n,plan:o,acceptedTraces:i,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,clearance:A,allowBlindAndBuriedVias:c}=t,l={x:o.exitPoint.x,y:o.exitPoint.y,layer:o.targetLayer},u=o.targetPoint,g=$j(u);let h=0;const d=m=>{const _=WDt({plan:o,branchStart:m.start,viaPoint:m.viaPoint,assignedLayerPath:[m.start,m.viaPoint],terminalApproach:m.terminalApproach,traceWidth:r,viaDiameter:s,viaHoleDiameter:a,candidateIndex:1e4+h++,chamfer:Math.max(r,.1)});if(_Pe({trace:_,endpointSrjs:[e,n]}))return;const f={...n,traces:[...n.traces??[],...i,_]};if(qu({inputSrj:e,routedSrj:f,clearance:A,allowBlindAndBuriedVias:c}).valid&&ZN(o4({inputSrj:e,routedSrj:f}),o.connectionName))return _};if(l.layer!==g){const m=$Dt({trace:o.trace,endpoint:o.exitPoint,layer:o.targetLayer,distances:[.4,.8,1.2,1.6]});for(const _ of m){const f={..._,layer:o.targetLayer};for(const I of[void 0,{x:u.x,y:_.y},{x:_.x,y:u.y}]){const C=d({start:f,viaPoint:_,terminalApproach:I});if(C)return C}}}const p=[[u],[{x:u.x,y:l.y},u],[{x:l.x,y:u.y},u]];for(const m of p){const _=m[0],f=tn(l,_),I=l.layer===g?[0]:[.4,.8,1.2,1.6];for(const C of I){if(l.layer!==g&&(f<=C+.2||C<=1e-6))continue;const y=l.layer===g?{x:l.x,y:l.y}:{x:l.x+(_.x-l.x)*C/f,y:l.y+(_.y-l.y)*C/f},x=d({start:l,viaPoint:y,terminalApproach:m.length>1?_:void 0});if(x)return x}}}function sbo(t){const{inputSrj:e,fanoutSrj:n,plans:o,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A=!0,effort:c=1,routeDownstreamConnections:l}=t,u=[],g=qu({inputSrj:e,routedSrj:n,clearance:a,allowBlindAndBuriedVias:A}),h=o4({inputSrj:e,routedSrj:n}),d=o.filter(k=>{const R=$j(k.sourcePoint),F=$j(k.targetPoint);return R!==F&&tn(k.sourcePoint,k.targetPoint)<=.25&&!ZN(h,k.connectionName)});let p={traces:[],failedConnectionNames:d.map(k=>k.connectionName),blockingConnectionNames:[],connectivity:h,drc:g},m=0;if(!g.valid)u.push("Fanout prefix failed emitted-copper DRC; skipped completion");else{let k=[];const R=new Map(d.map((O,U)=>[O.connectionName,U])),F=e.connections.length>32?1:3;for(let O=0;O<F;O++){const U=new Map(k.map((te,j)=>[te,j])),Y=d.toSorted((te,j)=>(U.get(te.connectionName)??Number.MAX_SAFE_INTEGER)-(U.get(j.connectionName)??Number.MAX_SAFE_INTEGER)||(R.get(te.connectionName)??0)-(R.get(j.connectionName)??0)),W=obo({inputSrj:e,fanoutSrj:n,plans:Y,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});if(m++,W.drc.valid&&(W.connectivity.connectedConnectionCount>p.connectivity.connectedConnectionCount||W.connectivity.connectedConnectionCount===p.connectivity.connectedConnectionCount&&W.traces.length<p.traces.length)&&(p=W),k=[...new Set([...W.failedConnectionNames,...W.blockingConnectionNames,...k])],W.failedConnectionNames.length===0)break}}const _=new Set(d.map(k=>k.connectionName)),f=o.filter(k=>!_.has(k.connectionName)&&!ZN(h,k.connectionName)),I=[];if(g.valid)for(const k of f){const R=qDt({inputSrj:e,fanoutSrj:n,plan:k,acceptedTraces:[...p.traces,...I],traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});R&&I.push(R)}const C={...n,traces:[...n.traces??[],...p.traces,...I]},y=new Set(o4({inputSrj:e,routedSrj:C}).issues.map(k=>k.connectionName)),x=n.connections.filter(k=>!_.has(k.name)&&y.has(k.name));let E=[];if(g.valid&&x.length>0&&x.length<=12&&l){const k=new Set(x.map(F=>F.name)),R={...n,connections:x,buses:n.buses?.map(F=>({...F,connectionNames:F.connectionNames.filter(O=>k.has(O))})).filter(F=>F.connectionNames.length>0),obstacles:n.obstacles,traces:C.traces};try{const F=l(R,{effort:c});E=rbo({inputSrj:e,fanoutSrj:n,localTraces:[...p.traces,...I],candidates:F.filter(O=>k.has(O.connection_name)),clearance:a,allowBlindAndBuriedVias:A})}catch(F){u.push(`Downstream router failed: ${F instanceof Error?F.message:String(F)}`)}}else!g.valid&&x.length>0?u.push("Skipped downstream router because the endpoint-completion baseline failed emitted-copper DRC"):x.length>12?u.push(`Skipped downstream router for ${x.length} unresolved connections (bounded at 12)`):x.length>0&&!l&&u.push(`Skipped downstream router for ${x.length} unresolved connections because no routeDownstreamConnections callback was provided`);const B=[...p.traces,...I,...E];for(const k of f){const R={...n,traces:[...n.traces??[],...B]};if(ZN(o4({inputSrj:e,routedSrj:R}),k.connectionName))continue;const F=qDt({inputSrj:e,fanoutSrj:n,plan:k,acceptedTraces:B,traceWidth:i,viaDiameter:r,viaHoleDiameter:s,clearance:a,allowBlindAndBuriedVias:A});F&&B.push(F)}const S={...n,traces:[...n.traces??[],...B]},Q=ibo({fanoutSrj:S,completionTraces:B}),w=o4({inputSrj:e,routedSrj:Q}),M=qu({inputSrj:e,routedSrj:Q,clearance:a,allowBlindAndBuriedVias:A});return M.valid?{simpleRouteJson:Q,traces:B,report:{attemptedLocalConnectionCount:d.length,attemptedDownstreamConnectionCount:f.length,completionTraceCount:B.length,searchPassCount:m,errors:u,connectivity:w,drc:M}}:(u.push("Final endpoint-completion output failed emitted-copper DRC"),{simpleRouteJson:n,traces:[],report:{attemptedLocalConnectionCount:d.length,attemptedDownstreamConnectionCount:f.length,completionTraceCount:0,searchPassCount:m,errors:u,connectivity:o4({inputSrj:e,routedSrj:n}),drc:g}})}var abo={topside_left:{direction:"left",preferredExit:"top-left",exitEdge:"top"},topside_center:{direction:"up",preferredExit:"top",exitEdge:"top"},topside_right:{direction:"right",preferredExit:"top-right",exitEdge:"top"},rightside_top:{direction:"up",preferredExit:"top-right",exitEdge:"right"},rightside_center:{direction:"right",preferredExit:"right",exitEdge:"right"},rightside_bottom:{direction:"down",preferredExit:"bottom-right",exitEdge:"right"},bottomside_right:{direction:"right",preferredExit:"bottom-right",exitEdge:"bottom"},bottomside_center:{direction:"down",preferredExit:"bottom",exitEdge:"bottom"},bottomside_left:{direction:"left",preferredExit:"bottom-left",exitEdge:"bottom"},leftside_bottom:{direction:"down",preferredExit:"bottom-left",exitEdge:"left"},leftside_center:{direction:"left",preferredExit:"left",exitEdge:"left"},leftside_top:{direction:"up",preferredExit:"top-left",exitEdge:"left"},center:{}};function XDt(t){const e=abo[t];if(!e)throw new Error(`Invalid fanout exit position "${t}"`);return e}function fPe(t){const e=t.differentialPairs;if(e===void 0)return[];if(!Array.isArray(e))throw new Error("Differential pairs must be an array");const n=new Map;return t.connections.forEach((o,i)=>{const r=n.get(o.name)??[];r.push(i),n.set(o.name,r)}),e.map((o,i)=>{const r=o,s=r?.connectionNames,a=r?.lengthTolerance;if(!Array.isArray(s)||s.length!==2||s.some(c=>typeof c!="string"||c.length===0)||s[0]===s[1]||typeof a!="number"||!Number.isFinite(a)||a<0)throw new Error(`Differential pair ${i} requires two distinct connection names and a finite nonnegative tolerance`);const A=s.map(c=>{const l=n.get(c);if(l?.length!==1)throw new Error(`Differential pair ${i} cannot resolve original connection ${c}`);return l[0]});return{connectionNames:s,connectionIndices:A,lengthTolerance:a}})}function J0e(t,e,n=!0){const o=Rb(t.layerCount),i=[],r=[];let s;for(const a of e.route){if(a.route_type==="via"){r.push({center:{x:a.x,y:a.y},diameter:a.via_diameter??t.minViaPadDiameter??t.min_via_pad_diameter??t.minViaDiameter??t.minTraceWidth,spanLayers:VDt({fromLayer:a.from_layer,toLayer:a.to_layer,layers:"layers"in a&&Array.isArray(a.layers)?a.layers:void 0,layerNames:o,allowBlindAndBuriedVias:n})}),s=void 0;continue}if(a.route_type!=="wire"){s=void 0;continue}s?.layer===a.layer&&(s.x!==a.x||s.y!==a.y)&&i.push({start:{x:s.x,y:s.y},end:{x:a.x,y:a.y},width:Math.max(s.width,a.width),layer:a.layer}),s=a}return{trace:e,connectionName:e.connection_name,segments:i,vias:r}}function Z7(t,e=!0){return(t.traces??[]).map(n=>J0e(t,n,e))}function*Abo(t){const{plan:e,bus:n,inputSrj:o,layerNames:i,clearance:r,consumeWork:s}=t;if(!e.via||(e.additionalVias?.length??0)>4)return;const a=(n.routableEscapeLayers??n.allowedLayers??i).filter(f=>f!==e.targetLayer&&i.includes(f)&&(n.allowedLayers??i).includes(f));if(!a.length)return;const A=t.plans.filter(f=>f.connectionIndex!==e.connectionIndex),c=Z7(o,!1),l=[...A.flatMap(f=>[...f.segments,...f.planeEndpointSegments??[]]),...c.flatMap(f=>f.segments)],u=[...t.plans.flatMap(f=>[f.via,...f.additionalVias??[],f.planeEndpointVia].filter(I=>!!I)),...c.flatMap(f=>f.vias)],g=e.via.diameter,h=n.sharedBoundary,d=n.componentBounds,p=g/2+r,m=[];for(const[f,I]of e.segments.entries()){if(I.layer!==e.targetLayer||f<(e.sourceEscapeSegmentCount??1))continue;const C=tn(I.start,I.end),y=Math.max(1,Math.ceil(C/(I.width/2)));for(let x=0;x<=y;x++){s();const E=x/y,B={x:I.start.x+(I.end.x-I.start.x)*E,y:I.start.y+(I.end.y-I.start.y)*E};if(!(B.x>=d.minX-p&&B.x<=d.maxX+p&&B.y>=d.minY-p&&B.y<=d.maxY+p)&&!(Math.min(B.x-h.minX,h.maxX-B.x,B.y-h.minY,h.maxY-B.y)<g/2+1e-7)&&!m.some(S=>tn(S.point,B)<1e-7)&&!o.obstacles.some(S=>wx(B,S)<p-1e-9)&&!u.some(S=>tn(B,S.center)<(g+S.diameter)/2+r-1e-9)&&!l.some(S=>Cr(B,S.start,S.end)<(g+S.width)/2+r-1e-9)&&(m.push({index:f,point:B}),m.length===64))break}if(m.length===64)break}const _=m.flatMap((f,I)=>m.slice(I+1).flatMap(C=>{if(f.index>=C.index||tn(f.point,C.point)<g+r)return[];const y=e.segments.slice(f.index,C.index+1);return y.some(x=>x.layer!==e.targetLayer)?[]:[{a:f,b:C,length:y.reduce((x,E)=>x+tn(E.start,E.end),0)}]})).sort((f,I)=>I.length-f.length);for(const{a:f,b:I}of _){const C=e.segments[f.index],y=e.segments[I.index],x=[...e.segments.slice(0,f.index),{...C,end:f.point}].filter(R=>tn(R.start,R.end)>1e-7),E=[{...y,start:I.point},...e.segments.slice(I.index+1)].filter(R=>tn(R.start,R.end)>1e-7),B=[{...C,start:f.point},...e.segments.slice(f.index+1,I.index),{...y,end:I.point}].filter(R=>tn(R.start,R.end)>1e-7),S=I.point.x-f.point.x,Q=I.point.y-f.point.y,w=Math.min(Math.abs(S),Math.abs(Q)),M=[{x:f.point.x+Math.sign(S)*w,y:f.point.y+Math.sign(Q)*w},{x:I.point.x-Math.sign(S)*w,y:I.point.y-Math.sign(Q)*w}],k=[B,...M.map(R=>[{...C,start:f.point,end:R},{...C,start:R,end:I.point}].filter(F=>tn(F.start,F.end)>1e-7))];for(const R of a){const F=l.filter(W=>W.layer===R),O=u.filter(W=>W.spanLayers.includes(R)),U=o.obstacles.filter(W=>W.layers.includes(R)),Y=[{...e.via,center:f.point,fromLayer:e.targetLayer,toLayer:R,spanLayers:i},{...e.via,center:I.point,fromLayer:R,toLayer:e.targetLayer,spanLayers:i}];for(const W of k){s();const te=W.map(j=>({...j,layer:R}));te.some(j=>F.some(J=>!Zm(j,J,r))||O.some(J=>Cr(J.center,j.start,j.end)<(J.diameter+j.width)/2+r-1e-9)||U.some(J=>Tl(j,J)<j.width/2+r-1e-9))||(yield{before:x,window:te,after:E,tuningLayer:R,addedVias:Y})}}}}function eR(t){const{points:e,chamfer:n,segmentIsClear:o}=t;if(e.length<2)return null;const i=1e-7;let r=[[e[0]]];for(let s=1;s<e.length;s++){const a=e[s-1],A=e[s],c=A.x-a.x,l=A.y-a.y;if(a.z!==A.z||Math.abs(c)<i||Math.abs(l)<i||Math.abs(Math.abs(c)-Math.abs(l))<i){for(const h of r)h.push(A);continue}const u=Math.min(Math.abs(c),Math.abs(l)),g=[{x:a.x+Math.sign(c)*u,y:a.y+Math.sign(l)*u,z:a.z},{x:A.x-Math.sign(c)*u,y:A.y-Math.sign(l)*u,z:a.z},{x:A.x,y:a.y,z:a.z},{x:a.x,y:A.y,z:a.z}].filter(h=>o(a,h)&&o(h,A));if(r=r.flatMap(h=>g.map(d=>[...h,d,A])).slice(0,16),r.length===0)return null}for(const s of r){const a=[s[0]];let A=!0;for(let c=1;c<s.length-1;c++){const l=s[c-1],u=s[c],g=s[c+1],h=tn(l,u),d=tn(u,g);if(l.z!==u.z||u.z!==g.z||h<i||d<i){a.push(u);continue}const p=(u.x-l.x)/h,m=(u.y-l.y)/h,_=(g.x-u.x)/d,f=(g.y-u.y)/d,I=p*_+m*f,C=t.repairReversingDiagonalCorners===!0&&Math.abs(I+Math.SQRT1_2)<i;if(Math.abs(I)>i&&!C){a.push(u);continue}let y=Math.min(n,h/3,d/3),x=!1;for(;y>=1e-6;){const E={x:u.x-p*y,y:u.y-m*y,z:u.z},B={x:u.x+_*y,y:u.y+f*y,z:u.z},S=Math.sign(p*f-m*_),Q=C?{x:E.x+(p-S*m)*Math.SQRT1_2*y*(Math.SQRT2-1),y:E.y+(m+S*p)*Math.SQRT1_2*y*(Math.SQRT2-1),z:u.z}:void 0;if(Q?o(E,Q)&&o(Q,B):o(E,B)){a.push(E,...Q?[Q]:[],B),x=!0;break}y/=2}if(!x){A=!1;break}}if(A){a.push(s.at(-1));for(let c=1;c<a.length;c++){const l=a[c-1],u=a[c];if(l.z!==u.z){tn(l,u)>i&&(A=!1);continue}if(!o(l,u)){A=!1;break}const g=Math.abs(l.x-u.x),h=Math.abs(l.y-u.y);if(g>i&&h>i&&Math.abs(g-h)>i){A=!1;break}const d=a[c+1];if(d?.z===u.z&&tn(l,u)>i&&tn(u,d)>i&&((u.x-l.x)*(d.x-u.x)+(u.y-l.y)*(d.y-u.y))/(tn(l,u)*tn(u,d))<Math.SQRT1_2-i){A=!1;break}}if(A)return a}}return null}var qj=class{layers=new Map;constructor(t){const e=new Map;for(const n of t){const o=n.width/2,i={segment:n,minX:Math.min(n.start.x,n.end.x)-o,maxX:Math.max(n.start.x,n.end.x)+o,minY:Math.min(n.start.y,n.end.y)-o,maxY:Math.max(n.start.y,n.end.y)+o},r=e.get(n.layer)??[];r.push(i),e.set(n.layer,r)}for(const[n,o]of e)this.layers.set(n,this.build(o))}querySegment(t,e){const n=t.width/2+e+1e-8;return this.query([t.layer],{minX:Math.min(t.start.x,t.end.x)-n,maxX:Math.max(t.start.x,t.end.x)+n,minY:Math.min(t.start.y,t.end.y)-n,maxY:Math.max(t.start.y,t.end.y)+n})}queryVia(t,e){const n=t.diameter/2+e+1e-8;return this.query(t.spanLayers,{minX:t.center.x-n,maxX:t.center.x+n,minY:t.center.y-n,maxY:t.center.y+n})}query(t,e){const n=[],o=r=>!(r.minX>e.maxX||r.maxX<e.minX||r.minY>e.maxY||r.maxY<e.minY),i=r=>{if(o(r))if(r.entries)for(const s of r.entries)o(s)&&n.push(s.segment);else i(r.left),i(r.right)};for(const r of t){const s=this.layers.get(r);s&&i(s)}return n}build(t){const e=t.reduce((i,r)=>({minX:Math.min(i.minX,r.minX),maxX:Math.max(i.maxX,r.maxX),minY:Math.min(i.minY,r.minY),maxY:Math.max(i.maxY,r.maxY)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0});if(t.length<=8)return{...e,entries:t};const n=e.maxX-e.minX>=e.maxY-e.minY;t.sort((i,r)=>n?i.minX+i.maxX-r.minX-r.maxX:i.minY+i.maxY-r.minY-r.maxY);const o=Math.floor(t.length/2);return{...e,left:this.build(t.slice(0,o)),right:this.build(t.slice(o))}}};function Xj(t){switch(t){case"left":return"left";case"right":return"right";case"up":return"top";case"down":return"bottom"}}function e6(t){switch(t){case"left":return"left";case"right":return"right";case"top":return"up";case"bottom":return"down"}}function ZDt(t,e){return t===e||t.includes(e)}function Ds(t,e){if(!(!t||!e?.includes("-"))&&ZDt(e,t))return t==="left"||t==="right"?e.startsWith("top-")?"maximum":"minimum":e.endsWith("-right")?"maximum":"minimum"}function cbo(t,e){const n=e==="up"||e==="down"?"y":"x",o=t.slice(0,32).map(({connectionIndex:i})=>[i]);for(let i=0;i<t.length;i++)for(let r=i+1;r<t.length;r++){if(o.length>=32)return o;const s=t[i],a=t[r];Math.abs(s.sourcePoint[n]-a.sourcePoint[n])<=1e-9&&o.push([s.connectionIndex,a.connectionIndex])}return o}var kg=1e-9,lbo=1e5;function eNt(t){for(const[n,o]of[["viaDiameter",t.viaDiameter],["traceWidth",t.traceWidth]])if(!Number.isFinite(o)||o<=0)throw new Error(`FanoutSolver: dogbone ${n} must be a positive finite number, received ${o}`);if(!Number.isFinite(t.clearance)||t.clearance<0)throw new Error(`FanoutSolver: dogbone clearance must be a non-negative finite number, received ${t.clearance}`);if(t.viaHoleDiameter!==void 0&&(!Number.isFinite(t.viaHoleDiameter)||t.viaHoleDiameter<=0))throw new Error(`FanoutSolver: dogbone viaHoleDiameter must be a positive finite number, received ${t.viaHoleDiameter}`);if(t.holeToHoleClearance!==void 0&&(!Number.isFinite(t.holeToHoleClearance)||t.holeToHoleClearance<0))throw new Error(`FanoutSolver: dogbone holeToHoleClearance must be a non-negative finite number, received ${t.holeToHoleClearance}`);if(t.holeToHoleClearance!==void 0&&t.viaHoleDiameter===void 0)throw new Error("FanoutSolver: dogbone holeToHoleClearance requires viaHoleDiameter");const e=t.maximumSearchStates??lbo;if(!Number.isInteger(e)||e<1)throw new Error(`FanoutSolver: dogbone maximumSearchStates must be a positive integer, received ${e}`);return e}function IPe(t){const e=[];for(const n of t.toSorted((o,i)=>o-i))Number.isFinite(n)&&(e.length===0||Math.abs(e.at(-1)-n)>kg)&&e.push(n);return e}function tNt(t){const e=new Map,n=new Map,o=new Map;for(const i of t){let r=e.get(i.componentId);r||(r={componentId:i.componentId,connections:[],obstacles:[],xCoordinates:[],yCoordinates:[],pitchX:Number.POSITIVE_INFINITY,pitchY:Number.POSITIVE_INFINITY},e.set(i.componentId,r),o.set(i.componentId,new Set)),r.xCoordinates.push(...i.xCoordinates),r.yCoordinates.push(...i.yCoordinates),Number.isFinite(i.pitchX)&&i.pitchX>kg&&(r.pitchX=Math.min(r.pitchX,i.pitchX)),Number.isFinite(i.pitchY)&&i.pitchY>kg&&(r.pitchY=Math.min(r.pitchY,i.pitchY));const s=o.get(i.componentId);for(const a of i.componentObstacles)s.has(a)||(s.add(a),r.obstacles.push(a));for(const a of i.connections){const A=n.get(a.connectionIndex);if(A!==void 0){if(A!==i.componentId)throw new Error(`FanoutSolver: connection index ${a.connectionIndex} belongs to multiple components`);continue}n.set(a.connectionIndex,i.componentId),r.connections.push({preparedConnection:a,busId:i.busId,direction:i.direction,terminationType:i.termination.type})}}return[...e.values()].map(i=>({...i,connections:i.connections.toSorted((r,s)=>r.preparedConnection.connectionIndex-s.preparedConnection.connectionIndex),xCoordinates:IPe(i.xCoordinates),yCoordinates:IPe(i.yCoordinates)})).toSorted((i,r)=>i.componentId.localeCompare(r.componentId))}function ubo(t){const{coordinates:e,pitch:n}=t;if(e.length===0||!Number.isFinite(n)||n<=kg)return[];const o=[e[0]-n/2];for(let i=1;i<e.length;i++)o.push((e[i-1]+e[i])/2);return o.push(e.at(-1)+n/2),IPe(o)}function nNt(t){const{sourceCoordinate:e,coordinates:n,pitch:o}=t,i=ubo({coordinates:n,pitch:o}),r=i.filter(a=>a<e-kg).at(-1),s=i.find(a=>a>e+kg);return[r,s].filter(a=>a!==void 0)}function gbo(t,e){const n=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return n<=kg||o<=kg||Math.abs(n-o)<=kg}function dbo(t){const{source:e,site:n,direction:o}=t,i=o==="right"?n.x-e.x:o==="left"?e.x-n.x:o==="up"?n.y-e.y:e.y-n.y;return i>kg?0:Math.abs(i)<=kg?1:2}function hbo(t){const{point:e,obstacles:n,viaDiameter:o,clearance:i}=t,r=o/2+i;return n.every(s=>wx(e,s)>=r-kg)}function pbo(t){const{segment:e,sourceObstacle:n,obstacles:o,clearance:i}=t,r=e.width/2+i;return o.every(s=>s===n||Tl(e,s)>=r-kg)}function oNt(t){const{connection:e,component:n,rules:o}=t,{preparedConnection:i,direction:r}=e,s=o.additionalObstacles?[...new Set([...n.obstacles,...o.additionalObstacles])]:n.obstacles,a={x:i.sourcePoint.x,y:i.sourcePoint.y},A=nNt({sourceCoordinate:a.x,coordinates:n.xCoordinates,pitch:n.pitchX}),c=nNt({sourceCoordinate:a.y,coordinates:n.yCoordinates,pitch:n.pitchY}),l=[...A.map(E=>({x:E,y:a.y})),...c.map(E=>({x:a.x,y:E})),...A.flatMap(E=>c.map(B=>({x:E,y:B})))],u=[];for(const E of l)u.some(B=>tn(B,E)<=kg)||u.push(E);const g=o.fixedViaPointsByConnectionIndex?.get(i.connectionIndex),h=g?[g]:u,d=[];for(const E of h){if(e.terminationType==="plane"&&!gbo(a,E)||!hbo({point:E,obstacles:s,viaDiameter:o.viaDiameter,clearance:o.clearance}))continue;const B={start:a,end:E,width:o.traceWidth,layer:i.sourceLayer};!pbo({segment:B,sourceObstacle:i.sourceObstacle,obstacles:s,clearance:o.clearance})||!(o.blockingSegments??[]).every(w=>{if(w.connectionIndex===i.connectionIndex||o.canShareCopper?.(i.connectionIndex,w.connectionIndex))return!0;const M=o.viaDiameter/2+w.segment.width/2+o.clearance;return Cr(E,w.segment.start,w.segment.end)<M-kg?!1:w.segment.layer!==B.layer||Zm(B,w.segment,o.clearance)})||!(o.blockingVias??[]).every(w=>w.connectionIndex===i.connectionIndex?!0:!(tn(E,w.center)<(o.viaDiameter+w.diameter)/2+o.clearance-kg||w.spanLayers.includes(B.layer)&&Cr(w.center,B.start,B.end)<w.diameter/2+B.width/2+o.clearance-kg))||d.push({connectionIndex:i.connectionIndex,point:E,sourceSegment:B,outwardRank:dbo({source:a,site:E,direction:r})})}const p=r==="left"||r==="right"?n.yCoordinates:n.xCoordinates,m=r==="left"||r==="right"?a.y:a.x,_=p.findIndex(E=>Math.abs(E-m)<=kg),f=_>=0?_%2===0?1:-1:void 0,I=e.terminationType==="boundary"?o.preferredBoundaryPerpendicularSideByBusId?.get(e.busId):o.preferPlaneCheckerboardSites&&e.terminationType==="plane"&&(r==="left"||r==="right")?f:void 0,C=e.terminationType==="boundary"?o.preferBoundaryOutwardByBusId?.get(e.busId)??!0:!0,y=o.preferredViaPointsByConnectionIndex?.get(i.connectionIndex),x=E=>{if(I===void 0)return 0;const B=r==="left"||r==="right"?E.point.y-a.y:E.point.x-a.x;return B*I>kg?0:Math.abs(B)<=kg?1:2};return d.toSorted((E,B)=>(y?+(tn(E.point,y)>kg)-+(tn(B.point,y)>kg):0)||(C?E.outwardRank-B.outwardRank:B.outwardRank-E.outwardRank)||x(E)-x(B)||tn(a,E.point)-tn(a,B.point)||E.point.x-B.point.x||E.point.y-B.point.y)}function mbo(t){const{first:e,second:n,rules:o}=t,i=o.canShareCopper?.(e.connectionIndex,n.connectionIndex)??!1,r=o.viaHoleDiameter?o.viaHoleDiameter+(o.holeToHoleClearance??o.clearance):0,s=i?r:Math.max(o.viaDiameter+o.clearance,r);if(tn(e.point,n.point)<s-kg)return!1;const a=o.viaDiameter/2+o.traceWidth/2+o.clearance;return!i&&(Cr(e.point,n.sourceSegment.start,n.sourceSegment.end)<a-kg||Cr(n.point,e.sourceSegment.start,e.sourceSegment.end)<a-kg)?!1:i?!0:Zm(e.sourceSegment,n.sourceSegment,o.clearance)}function _bo(t){const{component:e,rules:n,consumeSearchState:o}=t,i=e.connections.map(h=>({connection:h,candidates:oNt({connection:h,component:e,rules:n})}));if(i.some(h=>h.candidates.length===0))return null;const r=new Map,s=(h,d)=>{const p=r.get(h)?.get(d);if(p!==void 0)return p;const m=mbo({first:h,second:d,rules:n}),_=r.get(h)??new Map;_.set(d,m),r.set(h,_);const f=r.get(d)??new Map;return f.set(h,m),r.set(d,f),m},a=i.flatMap(h=>h.candidates.length===1?[h.candidates[0]]:[]);for(let h=0;h<a.length;h++){const d=a[h];for(let p=0;p<h;p++)if(!s(d,a[p]))return null}const A=new Map(a.map(h=>[h.connectionIndex,h])),c=new Set(i.flatMap(h=>h.candidates.length>1?[h.connection.preparedConnection.connectionIndex]:[])),l=new Map(i.map(h=>[h.connection.preparedConnection.connectionIndex,h]));if(c.size===0)return new Map([...A.entries()].map(([h,d])=>[h,{...d.point}]));const u=h=>h.candidates.filter(d=>[...A.values()].every(p=>s(d,p))),g=()=>{if(!o())return!1;if(c.size===0)return!0;let h,d=[];for(const m of[...c].toSorted((_,f)=>_-f)){const _=l.get(m),f=u(_);if(f.length===0)return!1;(!h||f.length<d.length||f.length===d.length&&m<h.connection.preparedConnection.connectionIndex)&&(h=_,d=f)}const p=h.connection.preparedConnection.connectionIndex;c.delete(p);for(const m of d){if(A.set(p,m),g())return!0;A.delete(p)}return c.add(p),!1};return g()?new Map([...A.entries()].toSorted(([h],[d])=>h-d).map(([h,d])=>[h,{...d.point}])):null}function pd(t,e){const n=eNt(e);if(t.length===0)return new Map;let o=0;const i=()=>(o++,o<=n),r=new Map;for(const s of tNt(t)){const a=_bo({component:s,rules:e,consumeSearchState:i});if(!a)return null;for(const[A,c]of a)r.set(A,c)}return r}function pw(t,e){return eNt(e),tNt(t).flatMap(n=>n.connections.flatMap(o=>oNt({connection:o,component:n,rules:e}).map(i=>({connectionIndex:i.connectionIndex,point:{...i.point}}))))}function*fbo(t,e,n){const o=pw([t],e);let i=24;for(const r of t.connections.toReversed()){const s=n.get(r.connectionIndex);if(s)for(const a of o){if(a.connectionIndex!==r.connectionIndex||tn(a.point,s)<=kg)continue;if(i--<=0)return;const A=new Map(n);A.set(r.connectionIndex,a.point),yield A}}}var d0=1e-7,Ibo=16e4,Cbo=24e4,ybo=5e3,xbo=24,iNt=3.25,Ebo=class{constructor(t,e,n,o,i,r,s,a){this.minX=e,this.minY=n,this.cellSize=r,this.columnCount=Math.max(1,Math.ceil((o-e)/r)),this.rowCount=Math.max(1,Math.ceil((i-n)/r)),this.cells=new Array(this.columnCount*this.rowCount);for(const A of t){const c={...A,minX:Math.min(A.segment.start.x,A.segment.end.x),maxX:Math.max(A.segment.start.x,A.segment.end.x),minY:Math.min(A.segment.start.y,A.segment.end.y),maxY:Math.max(A.segment.start.y,A.segment.end.y)},l=(A.segment.width+s)/2+a,u=this.column(c.minX-l),g=this.column(c.maxX+l),h=this.row(c.minY-l),d=this.row(c.maxY+l);for(let p=h;p<=d;p++)for(let m=u;m<=g;m++){const _=p*this.columnCount+m;(this.cells[_]??=[]).push(c)}}}minX;minY;cellSize;cells;columnCount;rowCount;seen=new Map;queryCount=0;column(t){return Math.max(0,Math.min(this.columnCount-1,Math.floor((t-this.minX)/this.cellSize)))}row(t){return Math.max(0,Math.min(this.rowCount-1,Math.floor((t-this.minY)/this.cellSize)))}querySegment(t){const e=this.column(Math.min(t.start.x,t.end.x)),n=this.column(Math.max(t.start.x,t.end.x)),o=this.row(Math.min(t.start.y,t.end.y)),i=this.row(Math.max(t.start.y,t.end.y));if(e===n&&o===i)return this.cells[o*this.columnCount+e]??[];const r=[],s=++this.queryCount;for(let a=o;a<=i;a++)for(let A=e;A<=n;A++)for(const c of this.cells[a*this.columnCount+A]??[])this.seen.get(c)!==s&&(this.seen.set(c,s),r.push(c));return r}};function Bbo(t){const e=t;if(e.shape==="circle"){const c=t.width/2;return{minX:t.center.x-c,maxX:t.center.x+c,minY:t.center.y-c,maxY:t.center.y+c,xRadius:c}}const n=(e.ccwRotationDegrees??0)*Math.PI/180,o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=t.width/2,s=t.height/2,a=o*r+i*s,A=i*r+o*s;return{minX:t.center.x-a,maxX:t.center.x+a,minY:t.center.y-A,maxY:t.center.y+A,xRadius:a}}var bbo=class{obstaclesByCenterX;maximumXRadius;constructor(t){this.obstaclesByCenterX=t.map(e=>({obstacle:e,...Bbo(e)})).toSorted((e,n)=>e.obstacle.center.x-n.obstacle.center.x),this.maximumXRadius=this.obstaclesByCenterX.reduce((e,n)=>Math.max(e,n.xRadius),0)}querySegment(t,e){const n=Math.min(t.start.x,t.end.x),o=Math.max(t.start.x,t.end.x),i=Math.min(t.start.y,t.end.y),r=Math.max(t.start.y,t.end.y),s=n-e-this.maximumXRadius,a=o+e+this.maximumXRadius;let A=0,c=this.obstaclesByCenterX.length;for(;A<c;){const u=Math.floor((A+c)/2);this.obstaclesByCenterX[u].obstacle.center.x<s?A=u+1:c=u}const l=[];for(let u=A;u<this.obstaclesByCenterX.length;u++){const g=this.obstaclesByCenterX[u];if(g.obstacle.center.x>a)break;g.maxX<n-e||g.minX>o+e||g.maxY<i-e||g.minY>r+e||l.push(g.obstacle)}return l}};function*Sbo(t){const{initialOrderFactories:e,rotationBase:n,getItemKey:o,maximumOrderCount:i=Number.POSITIVE_INFINITY}=t,r=new Set;let s=0;const a=A=>A.map(o).join("\0");for(const A of e){if(s>=i)return;const c=A(),l=a(c);r.has(l)||(r.add(l),s++,yield c)}for(let A=1;A<n.length;A++){if(s>=i)return;const c=[...n.slice(A),...n.slice(0,A)],l=a(c);r.has(l)||(r.add(l),s++,yield c)}}var Qbo=class{values=[];get size(){return this.values.length}sampleEntries(t){if(this.values.length<=t)return this.values;const e=Math.ceil(this.values.length/t);return this.values.filter((n,o)=>o%e===0)}push(t){this.values.push(t);let e=this.values.length-1;for(;e>0;){const n=Math.floor((e-1)/2);if(this.values[n].score<=t.score)break;this.values[e]=this.values[n],e=n}this.values[e]=t}pop(){const t=this.values[0],e=this.values.pop();if(!t||!e||this.values.length===0)return t;let n=0;for(;;){const o=n*2+1,i=o+1;if(o>=this.values.length)break;const r=i<this.values.length&&this.values[i].score<this.values[o].score?i:o;if(this.values[r].score>=e.score)break;this.values[n]=this.values[r],n=r}return this.values[n]=e,t}};function CO(t,e){return e==="left"||e==="right"?t.y:t.x}function vbo(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o);return i<d0||r<d0||Math.abs(i-r)<d0?[[t,e]]:i>r?[[t,{x:t.x+Math.sign(n)*r,y:e.y},e],[t,{x:e.x-Math.sign(n)*r,y:t.y},e]]:[[t,{x:e.x,y:t.y+Math.sign(o)*i},e],[t,{x:t.x,y:e.y-Math.sign(o)*i},e]]}function wbo(t){if(t.length<3)return t;const e=[t[0]];for(let n=1;n<t.length-1;n++){const o=e.at(-1),i=t[n],r=t[n+1],s=Math.sign(i.x-o.x),a=Math.sign(i.y-o.y),A=Math.sign(r.x-i.x),c=Math.sign(r.y-i.y);(s!==A||a!==c)&&e.push(i)}return e.push(t.at(-1)),e}function Zj(t,e,n){return t.slice(1).flatMap((o,i)=>{const r=t[i];return tn(r,o)<d0?[]:[{start:r,end:o,width:e,layer:n}]})}function Pbo(t){const e=Math.abs(t.end.x-t.start.x),n=Math.abs(t.end.y-t.start.y);return e<d0||n<d0||Math.abs(e-n)<d0}function Mbo(t){for(let e=0;e<t.length;e++)for(let n=e+2;n<t.length;n++)if(!(e===0&&n===t.length-1&&tn(t[e].start,t[n].end)<d0)&&tu(t[e].start,t[e].end,t[n].start,t[n].end)<d0)return!1;return!0}function Dbo(t){return[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(e=>!!e)}function Nbo(t){const{srj:e,acceptedPlans:n,allowBlindAndBuriedVias:o}=t,i=Z7(e,o);return{segments:[...i.flatMap(r=>r.segments.map(s=>({connectionName:r.connectionName,segment:s}))),...n.flatMap(r=>[...r.segments,...r.planeEndpointSegments??[]].map(s=>({connectionName:r.connectionName,segment:s})))],vias:[...i.flatMap(r=>r.vias.map(s=>({connectionName:r.connectionName,via:s}))),...n.flatMap(r=>Dbo(r).map(s=>({connectionName:r.connectionName,via:s})))]}}function i4(t){const{bus:e,terminal:n,targetLayer:o,targetLayerPoints:i,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:c}=t,l=n.connection,u={x:l.sourcePoint.x,y:l.sourcePoint.y},g=t.sourceEscapePoints??[u,n.viaPoint];if(g.length<2||tn(g[0],u)>d0||tn(g.at(-1),n.viaPoint)>d0)throw new Error("FanoutSolver: source escape must connect the source pad to its first via");const h=Zj([...g],s,l.sourceLayer),d=tn(u,n.viaPoint)>d0,p=l.sourceLayer!==o,m=Zj(i,s,o),_=Mx({fromLayer:l.sourceLayer,toLayer:o,layerNames:r,allowBlindAndBuriedVias:c}),f={center:n.viaPoint,diameter:a,holeDiameter:A,fromLayer:l.sourceLayer,toLayer:o,spanLayers:_},I=[{route_type:"wire",...u,width:s,layer:l.sourceLayer,...l.sourcePoint.pcb_port_id?{start_pcb_port_id:l.sourcePoint.pcb_port_id}:{}},...d?[...g.slice(1).map(E=>({route_type:"wire",...E,width:s,layer:l.sourceLayer}))]:[],...p?[{route_type:"via",...n.viaPoint,from_layer:l.sourceLayer,to_layer:o,via_diameter:a,via_hole_diameter:A},{route_type:"wire",...n.viaPoint,width:s,layer:o}]:[],...i.slice(1).map(E=>({route_type:"wire",...E,width:s,layer:o}))],C=qN({connectionName:l.connection.name,sourcePointIndex:l.sourcePointIndex}),y=[...d?h:[],...m],x=Ds(e.exitEdge,e.preferredExit);return{busId:e.busId,connectionName:l.connection.name,connectionIndex:l.connectionIndex,sourcePointIndex:l.sourcePointIndex,sourcePoint:l.sourcePoint,sourceObstacle:l.sourceObstacle,sourceLayer:l.sourceLayer,targetPoint:l.targetPoint,targetLayer:o,termination:e.termination,direction:e.direction,...e.exitEdge?{exitEdge:e.exitEdge}:{},...x?{cornerBandSide:x}:{},exitPoint:n.exitPoint,trace:{type:"pcb_trace",pcb_trace_id:C.traceId,connection_name:l.connection.name,connectsTo:[...l.sourcePoint.pointId?[l.sourcePoint.pointId]:[],...l.sourcePoint.pcb_port_id?[l.sourcePoint.pcb_port_id]:[],C.boundaryExitPointId],route:I},segments:y,...h.length>1?{sourceEscapeSegmentCount:h.length}:{},via:p?f:void 0,length:y.reduce((E,B)=>E+tn(B.start,B.end),0)}}function*BC(t,e=1,n=!1){if(!Number.isInteger(e)||e<1)throw new Error(`FanoutSolver: maximum winding alternatives must be a positive integer, received ${e}`);const{srj:o,bus:i,targetLayer:r,terminals:s,acceptedPlans:a,layerNames:A,traceWidth:c,viaDiameter:l,viaHoleDiameter:u,clearance:g,allowBlindAndBuriedVias:h=!0,allowSameNetMerges:d=!1,maximumRouteOrderAttempts:p,maximumSearchStates:m=Cbo,reservedVias:_=[],softReservedVias:f=[],gridStepDivisor:I=1,heuristicWeight:C=1,preferTargetDirectedLaneBias:y=!1,allowSourceLayerRouting:x=!1,adaptiveRouteOrder:E=!1,alignGridToPads:B=!1,includeReverseTargetRotation:S=!1,reserveTerminalExitPoints:Q=!1,forbidEarlyExitBoundaryContact:w=!1}=t;if(p!==void 0&&(!Number.isInteger(p)||p<1))throw new Error(`FanoutSolver: maximumRouteOrderAttempts must be a positive integer, received ${p}`);if(!Number.isSafeInteger(m)||m<1)throw new Error(`FanoutSolver: maximumSearchStates must be a positive safe integer, received ${m}`);if(!Number.isFinite(C)||C<=0)throw new Error(`FanoutSolver: heuristicWeight must be a positive finite number, received ${C}`);if(I!==1&&I!==2)throw new Error(`FanoutSolver: gridStepDivisor must be 1 or 2, received ${I}`);if(s.length===0||!i.exitEdge||!x&&s.some(Ze=>Ze.connection.sourceLayer===r))return[];const M=(c+g)/I,k=Math.min(i.pitchX,i.pitchY),R=B&&I===2&&Number.isFinite(k),F=t.gridStep??(R?k/(2*Math.ceil(k/(2*M))):M);if(!Number.isFinite(F)||F<=0)return[];const{minX:O,maxX:U,minY:Y,maxY:W}=i.sharedBoundary,te=t.gridOrigin?.x??i.xCoordinates[0]??O,j=t.gridOrigin?.y??i.yCoordinates[0]??Y,J=R?te+Math.ceil((O-te)/F)*F:O,oe=R?j+Math.ceil((Y-j)/F)*F:Y,ie=Math.floor((U-J)/F)+1,ne=Math.floor((W-oe)/F)+1,le=ie*ne;if(ie<2||ne<2||le>Ibo)return[];const ge=Array.from({length:le},(Ze,dt)=>{const Ut=dt%ie,Wt=Math.floor(dt/ie);return{column:Ut,row:Wt,point:{x:J+Ut*F,y:oe+Wt*F}}}),_e=f.length?new Float32Array(le):void 0;if(_e)for(const{via:Ze}of f){if(!Ze.spanLayers.includes(r))continue;const dt=Ze.diameter/2+c/2+g,Ut=Math.max(0,Math.ceil((Ze.center.x-dt-J)/F)),Wt=Math.min(ie-1,Math.floor((Ze.center.x+dt-J)/F)),Xt=Math.max(0,Math.ceil((Ze.center.y-dt-oe)/F)),Jt=Math.min(ne-1,Math.floor((Ze.center.y+dt-oe)/F));for(let yn=Xt;yn<=Jt;yn++)for(let An=Ut;An<=Wt;An++){const kn=yn*ie+An;tn(ge[kn].point,Ze.center)<dt&&(_e[kn]=_e[kn]+25*F)}}const ue=n?ge.filter((Ze,dt)=>dt%Math.max(1,Math.ceil(ge.length/1e3))===0).map(Ze=>Ze.point):[],fe=o.obstacles.filter(Ze=>Ze.layers.includes(r)),pe=new bbo(fe),ye=Nbo({srj:o,acceptedPlans:a,allowBlindAndBuriedVias:h}),Me=ye.segments.filter(({segment:Ze})=>{if(Ze.layer!==r)return!1;const dt=(Ze.width+c)/2+g;return!(Math.max(Ze.start.x,Ze.end.x)<O-dt||Math.min(Ze.start.x,Ze.end.x)>U+dt||Math.max(Ze.start.y,Ze.end.y)<Y-dt||Math.min(Ze.start.y,Ze.end.y)>W+dt)});x&&Me.push(..._.flatMap(Ze=>Ze.sourceEscapeSegment?.layer===r?[{connectionName:Ze.connectionName,segment:Ze.sourceEscapeSegment}]:[]));const ve=ye.vias.filter(({via:Ze})=>{if(!Ze.spanLayers.includes(r))return!1;const dt=Ze.diameter/2+c/2+g;return!(Ze.center.x<O-dt||Ze.center.x>U+dt||Ze.center.y<Y-dt||Ze.center.y>W+dt)});ve.push(..._.filter(({via:Ze})=>{if(!Ze.spanLayers.includes(r))return!1;const dt=Ze.diameter/2+c/2+g;return!(Ze.center.x<O-dt||Ze.center.x>U+dt||Ze.center.y<Y-dt||Ze.center.y>W+dt)}));const he=s.filter(Ze=>Ze.connection.sourceLayer!==r).map(Ze=>({connectionName:Ze.connection.connection.name,via:{center:Ze.viaPoint,diameter:l,spanLayers:Mx({fromLayer:Ze.connection.sourceLayer,toLayer:r,layerNames:A,allowBlindAndBuriedVias:h})}})),Qe=e6(i.exitEdge),Pe=(Ze,dt)=>Ze===dt||d&&Px(o,Ze,dt),we=Ze=>new Ebo(Ze,O,Y,U,W,F*8,c,g),Te=we(Me),Re=[...ve,...he],Ee=Re.reduce((Ze,{via:dt})=>Math.max(Ze,dt.diameter/2+c/2+g),c/2+g),ke=Re.toSorted((Ze,dt)=>Ze.via.center.x-dt.via.center.x),Ce=Ze=>{let dt=0,Ut=ke.length;for(;dt<Ut;){const Wt=Math.floor((dt+Ut)/2);ke[Wt].via.center.x<Ze?dt=Wt+1:Ut=Wt}return dt},Le=Ze=>{const{segment:dt,terminal:Ut,acceptedAttemptSegmentIndex:Wt}=Ze;if(w){const ht=i.sharedBoundary;for(const Kt of[dt.start,dt.end])if((Math.abs(Kt.x-ht.minX)<d0||Math.abs(Kt.x-ht.maxX)<d0||Math.abs(Kt.y-ht.minY)<d0||Math.abs(Kt.y-ht.maxY)<d0)&&tn(Kt,Ut.exitPoint)>d0)return!1}const Xt=Ut.connection.connection.name,Jt=Math.min(dt.start.x,dt.end.x),yn=Math.max(dt.start.x,dt.end.x),An=Math.min(dt.start.y,dt.end.y),kn=Math.max(dt.start.y,dt.end.y),$n=dt.width/2+g;for(const ht of pe.querySegment(dt,$n))if(!(ht.connectedTo.includes(Xt)||d&&n4(o,ht,Xt))&&Tl(dt,ht)<$n-d0)return!1;for(const ht of Te.querySegment(dt)){if(Pe(Xt,ht.connectionName))continue;const Kt=(dt.width+ht.segment.width)/2+g;if(!(yn+Kt<ht.minX||Jt-Kt>ht.maxX||kn+Kt<ht.minY||An-Kt>ht.maxY)&&tu(dt.start,dt.end,ht.segment.start,ht.segment.end)<Kt-d0)return!1}for(const ht of Wt.querySegment(dt)){if(Pe(Xt,ht.connectionName))continue;const Kt=(dt.width+ht.segment.width)/2+g;if(!(yn+Kt<ht.minX||Jt-Kt>ht.maxX||kn+Kt<ht.minY||An-Kt>ht.maxY)&&tu(dt.start,dt.end,ht.segment.start,ht.segment.end)<(dt.width+ht.segment.width)/2+g-d0)return!1}for(const ht of Q?s:[])if(!Pe(Xt,ht.connection.connection.name)&&Cr(ht.exitPoint,dt.start,dt.end)<c+g-d0)return!1;for(let ht=Ce(Jt-Ee);ht<ke.length;ht++){const Kt=ke[ht];if(Kt.via.center.x>yn+Ee)break;if(Pe(Xt,Kt.connectionName))continue;const rn=Kt.via.diameter/2+dt.width/2+g;if(!(Kt.via.center.x<Jt-rn||Kt.via.center.x>yn+rn||Kt.via.center.y<An-rn||Kt.via.center.y>kn+rn)&&Cr(Kt.via.center,dt.start,dt.end)<rn-d0)return!1}return!0},Ye=Ze=>{const{terminal:dt,endpoint:Ut,acceptedAttemptSegmentIndex:Wt}=Ze,Xt=[],Jt=F*iNt,yn=Math.max(0,Math.ceil((Ut.x-Jt-J)/F)-1),An=Math.min(ie-1,Math.floor((Ut.x+Jt-J)/F)+1),kn=Math.max(0,Math.ceil((Ut.y-Jt-oe)/F)-1),$n=Math.min(ne-1,Math.floor((Ut.y+Jt-oe)/F)+1);for(let ht=kn;ht<=$n;ht++)for(let Kt=yn;Kt<=An;Kt++){const rn=ht*ie+Kt,Lt=ge[rn],Ho=tn(Ut,Lt.point);if(!(Ho>F*iNt))for(const Ao of vbo(Ut,Lt.point)){const qe=Zj(Ao,c,r);qe.every(vt=>Le({segment:vt,terminal:dt,acceptedAttemptSegmentIndex:Wt}))&&Xt.push({nodeIndex:rn,points:Ao,radialDistance:Ho,length:qe.reduce((vt,qt)=>vt+tn(qt.start,qt.end),0)})}}return Xt.toSorted((ht,Kt)=>ht.radialDistance-Kt.radialDistance||ht.length-Kt.length||ht.nodeIndex-Kt.nodeIndex).slice(0,xbo)},tt=Ze=>{const{terminal:dt,acceptedAttemptSegments:Ut,expandedPoints:Wt,frontierPoints:Xt,bestPath:Jt,expandedStateCount:yn,searchBatch:An,connectionComplete:kn}=Ze;return{title:`Winding ${i.busId}: ${dt.connection.connection.name}`,rects:[{center:{x:(O+U)/2,y:(Y+W)/2},width:U-O,height:W-Y,fill:"rgba(0, 0, 0, 0)",stroke:"rgba(14, 165, 233, 0.9)",label:"A* search boundary"}],points:[...ue.map($n=>({...$n,color:"rgba(148, 163, 184, 0.22)"})),...Xt.map($n=>({...$n,color:"rgba(6, 182, 212, 0.75)",label:"open frontier"})),...Wt.map($n=>({...$n,color:"rgba(244, 63, 94, 0.8)",label:"expanded in current step"})),{...dt.connection.sourcePoint,color:"#f97316",label:`source: ${dt.connection.connection.name}`},{...dt.exitPoint,color:"#a855f7",label:"target exit"}],circles:s.map($n=>({center:$n.viaPoint,radius:l/2,fill:$n===dt?"rgba(250, 204, 21, 0.85)":"rgba(250, 204, 21, 0.25)",stroke:$n===dt?"#ca8a04":"#a16207",label:$n===dt?"active via":`reserved via: ${$n.connection.connection.name}`})),lines:[...Ut.map(({segment:$n,connectionName:ht})=>({points:[$n.start,$n.end],strokeColor:"rgba(34, 197, 94, 0.9)",strokeWidth:Math.max(c,F*.35),label:`accepted: ${ht}`})),{points:[dt.viaPoint,dt.exitPoint],strokeColor:"rgba(168, 85, 247, 0.45)",strokeWidth:Math.max(c*.5,F*.15),strokeDash:[F,F],label:"active via-to-exit search"},...Jt?[{points:[...Jt],strokeColor:"#facc15",strokeWidth:Math.max(c,F*.45),label:"best path so far"}]:[]],texts:[{x:O,y:W+F*2,text:kn?`connection complete · ${yn.toLocaleString()} states`:`A* batch ${An} · ${yn.toLocaleString()} states`,color:"#0f172a",fontSize:Math.max(F*2.5,.5),anchorSide:"bottom_left"}]}},At=function*(Ze){const{terminal:dt,acceptedAttemptSegments:Ut,laneBias:Wt}=Ze,Xt=we(Ut),Jt=Ye({terminal:dt,endpoint:dt.viaPoint,acceptedAttemptSegmentIndex:Xt}),yn=Ye({terminal:dt,endpoint:dt.exitPoint,acceptedAttemptSegmentIndex:Xt});if(Jt.length===0||yn.length===0)return{points:null,expandedStateCount:0};const An=new Map;for(const To of yn){const yo=An.get(To.nodeIndex)??[];yo.push(To),An.set(To.nodeIndex,yo)}const kn=le*9,$n=new Uint8Array(le*8),ht=C>1?new Uint8Array(kn):void 0,Kt=new Float64Array(kn).fill(Number.POSITIVE_INFINITY),rn=new Int32Array(kn).fill(-1),Lt=new Qbo,Ho=new Float64Array(le),Ao=new Float64Array(le),qe=CO(dt.exitPoint,Qe);for(let To=0;To<le;To++){const yo=ge[To].point,Ro=Math.abs(yo.x-dt.exitPoint.x),On=Math.abs(yo.y-dt.exitPoint.y);Ho[To]=Math.max(Ro,On)+(Math.SQRT2-1)*Math.min(Ro,On);const uo=CO(yo,Qe);Ao[To]=Wt===0?0:Wt>0?Math.max(0,qe-uo)*.2:Math.max(0,uo-qe)*.2}for(const To of Jt){const yo=To.nodeIndex*9+8;if(To.length>=Kt[yo])continue;Kt[yo]=To.length;const Ro=Ho[To.nodeIndex];Lt.push({node:To.nodeIndex,direction:8,score:To.length+C*Ro})}const vt=[[1,0],[1,1],[0,1],[-1,1],[-1,0],[-1,-1],[0,-1],[1,-1]],qt=Array.from({length:9},(To,yo)=>vt.flatMap((Ro,On)=>{const uo=Math.abs(yo-On);return yo===8||Math.min(uo,8-uo)<=1?[On]:[]})),Zt=new Map;for(const To of Jt){const yo=Zt.get(To.nodeIndex)??[];yo.push(To),Zt.set(To.nodeIndex,yo)}let nn=Number.POSITIVE_INFINITY,zn=null,Nn=0,Co=0,ei=0,ro=[];for(;Lt.size>0&&Nn<m;){const To=Lt.pop();if(To.score>=nn-d0)break;const yo=To.node*9+To.direction;if(ht?.[yo])continue;const Ro=Kt[yo];if(To.score>Ro+C*Ho[To.node]+d0)continue;ht&&(ht[yo]=1),Nn++,Co++,n&&Co%50===0&&ro.push(ge[To.node].point);const On=An.get(To.node);if(On){const Oo=[];let ko=yo;for(;ko>=0;)Oo.push(ge[Math.floor(ko/9)].point),ko=rn[ko];Oo.reverse();let Ko=yo;for(;rn[Ko]>=0;)Ko=rn[Ko];const mi=Math.floor(Ko/9),Fo=Zt.get(mi)??[],Nr=Math.min(...Fo.map(Rs=>Rs.length));for(const Rs of Fo)for(const ur of On){const zi=Ro-Nr+Rs.length+ur.length;if(zi>=nn-d0)continue;const bi=wbo([...Rs.points,...Oo.slice(1),...ur.points.toReversed().slice(1)]),Ar=Zj(bi,c,r);!Ar.every(Pbo)||!Mbo(Ar)||!Ar.every(ws=>Le({segment:ws,terminal:dt,acceptedAttemptSegmentIndex:Xt}))||(nn=zi,zn=bi)}}if(C>1&&zn)return{points:zn,expandedStateCount:Nn};const uo=ge[To.node];for(const Oo of qt[To.direction]){const[ko,Ko]=vt[Oo],mi=uo.column+ko,Fo=uo.row+Ko;if(mi<0||mi>=ie||Fo<0||Fo>=ne)continue;const Nr=Fo*ie+mi,Rs=ge[Nr].point,ur=To.direction!==8&&To.direction!==Oo,zi=Ao[Nr],bi=Ro+(ko!==0&&Ko!==0?F*Math.SQRT2:F)+(ur?F*.2:0)+zi+(_e?.[Nr]??0),Ar=Nr*9+Oo;if(ht?.[Ar]||bi>=Kt[Ar]-d0)continue;const ws=To.node*8+Oo;if($n[ws]===0){const Et=Le({segment:{start:uo.point,end:Rs,width:c,layer:r},terminal:dt,acceptedAttemptSegmentIndex:Xt});$n[ws]=Et?1:2,$n[Nr*8+(Oo+4)%8]=Et?1:2}if($n[ws]===2)continue;Kt[Ar]=bi,rn[Ar]=yo;const ds=Ho[Nr];Lt.push({node:Nr,direction:Oo,score:bi+C*ds})}Co>=ybo&&(Co=0,ei++,yield{expandedStateCount:Nn,...n?{visualization:tt({terminal:dt,acceptedAttemptSegments:Ut,expandedPoints:ro,frontierPoints:Lt.sampleEntries(120).map(Oo=>ge[Oo.node].point),bestPath:zn,expandedStateCount:Nn,searchBatch:ei,connectionComplete:!1})}:{}},ro=[])}return{points:zn,expandedStateCount:Nn}},at=s.toSorted((Ze,dt)=>CO(Ze.exitPoint,Qe)-CO(dt.exitPoint,Qe)||Ze.connection.connection.name.localeCompare(dt.connection.connection.name)),nt=s.map(Ze=>CO(Ze.viaPoint,Qe)),gt=at.map(Ze=>CO(Ze.exitPoint,Qe)),bt=nt.reduce((Ze,dt)=>Ze+dt,0)/nt.length,Ct=gt.reduce((Ze,dt)=>Ze+dt,0)/gt.length,Dt=Math.max(...nt)<Math.min(...gt)-d0,kt=Math.min(...nt)>Math.max(...gt)+d0,it=t.routeOrder?[t.laneBias??0]:y?Dt?[0,1,-1]:kt?[0,-1,1]:i.direction===Qe&&Ct>bt+d0?[1,0,-1]:i.direction===Qe&&Ct<bt-d0?[-1,0,1]:[0,1,-1]:Dt?[1,0,-1]:kt?[-1,0,1]:[0,1,-1],Yt=[];if(t.routeOrder){if(t.routeOrder.length!==s.length||new Set(t.routeOrder).size!==s.length||t.routeOrder.some(Ze=>!Number.isInteger(Ze)||Ze<0||Ze>=s.length))throw new Error("FanoutSolver: routeOrder must contain every terminal index exactly once");Yt.push(()=>t.routeOrder.map(Ze=>s[Ze]))}B&&y&&Dt&&Yt.push(()=>at),Dt?Yt.push(()=>[...at.slice(1),at[0]]):kt&&(Yt.push(()=>[...at].reverse()),S&&at.length>2&&Yt.push(()=>[...at.slice(0,-1).toReversed(),at.at(-1)])),Yt.push(...y&&i.direction===Qe&&Ct<bt-d0&&!Dt&&!kt?[()=>[...at].reverse(),()=>at]:[()=>at,()=>[...at].reverse()],()=>s.toSorted((Ze,dt)=>Ze.viaPoint.x-dt.viaPoint.x||Ze.viaPoint.y-dt.viaPoint.y),()=>s.toSorted((Ze,dt)=>dt.viaPoint.x-Ze.viaPoint.x||dt.viaPoint.y-Ze.viaPoint.y),()=>s.toSorted((Ze,dt)=>Ze.viaPoint.y-dt.viaPoint.y||Ze.viaPoint.x-dt.viaPoint.x),()=>s.toSorted((Ze,dt)=>dt.viaPoint.y-Ze.viaPoint.y||dt.viaPoint.x-Ze.viaPoint.x));const pn=p===void 0?void 0:Math.ceil(p/it.length),be=Sbo({initialOrderFactories:Yt,rotationBase:at,getItemKey:Ze=>Ze.connection.connection.name,maximumOrderCount:pn}),et=[],It=new Set,Bt=function*(){for(;;){const Ze=et.shift(),dt=Ze?{done:!1,value:Ze}:be.next();if(dt.done)return;const Ut=dt.value.map(Wt=>Wt.connection.connection.name).join("|");It.has(Ut)||(It.add(Ut),yield dt.value)}},mt=[],st=new Set,xt=new Map;let Xe=0;for(const Ze of Bt())for(const dt of it){if(p!==void 0&&Xe>=p)return mt;Xe++;const Ut=[],Wt=new Map;let Xt=!1;for(let An=0;An<Ze.length;An++){const kn=Ze[An],$n=JSON.stringify([s.indexOf(kn),dt,Ut.map(({connectionName:qt,segment:Zt})=>[qt,Zt.start.x,Zt.start.y,Zt.end.x,Zt.end.y,Zt.width,Zt.layer])]),ht=xt.get($n),Kt=At({terminal:kn,acceptedAttemptSegments:Ut,laneBias:dt});let rn=ht===void 0?Kt.next():{done:!0,value:{points:null,expandedStateCount:ht.expandedStateCount}},Lt=ht?.searchBatch??0,Ho=0;for(;!rn.done;)Ho=rn.value.expandedStateCount,yield{phase:"route-connection",routeOrderAttempt:Xe,connectionIndex:An,connectionCount:Ze.length,connectionName:kn.connection.connection.name,searchBatch:++Lt,expandedStateCount:Ho,connectionComplete:!1,...rn.value.visualization?{visualization:rn.value.visualization}:{}},rn=Kt.next();const{points:Ao,expandedStateCount:qe}=rn.value;if(Ho=qe,yield{phase:"route-connection",routeOrderAttempt:Xe,connectionIndex:An,connectionCount:Ze.length,connectionName:kn.connection.connection.name,searchBatch:Lt,expandedStateCount:Ho,connectionComplete:!0,...n?{visualization:tt({terminal:kn,acceptedAttemptSegments:Ut,expandedPoints:[],frontierPoints:[],bestPath:Ao,expandedStateCount:Ho,searchBatch:Lt,connectionComplete:!0})}:{}},!Ao){if(xt.set($n,{expandedStateCount:qe,searchBatch:Lt}),E&&p!==void 0&&An>0){const qt=Ze.filter(Zt=>Zt!==kn);et.push([kn,...qt])}Xt=!0;break}const vt=kn.connection.connection.name;Wt.set(vt,Ao),Ut.push(...Zj(Ao,c,r).map(qt=>({connectionName:vt,segment:qt})))}if(Xt)continue;const Jt=s.map(An=>{const kn=Wt.get(An.connection.connection.name);if(!kn)throw new Error(`FanoutSolver: via-minimal winding route omitted "${An.connection.connection.name}"`);return i4({bus:i,terminal:An,targetLayer:r,targetLayerPoints:kn,sourceEscapePoints:t.sourceEscapePaths?.get(An.connection.connectionIndex),layerNames:A,traceWidth:c,viaDiameter:l,viaHoleDiameter:u,allowBlindAndBuriedVias:h})}),yn=Jt.map(An=>An.segments.map(kn=>`${kn.start.x},${kn.start.y},${kn.end.x},${kn.end.y},${kn.layer}`).join(";")).join("|");if(!st.has(yn)&&(st.add(yn),mt.push(Jt),mt.length>=e))return mt}return mt}function Rbo(t,e=1){const n=BC(t,e);let o=n.next();for(;!o.done;)o=n.next();return o.value}function rNt(t){return Rbo(t,1)[0]??null}function CPe(t){return t.allowViaInPad===!0}function h0(t){return t==="left"||t==="right"}function t6(t){return t==="right"||t==="up"?1:-1}function aE(t,e){return h0(e)?t.x:t.y}function Xu(t,e){return h0(e)?t.y:t.x}function r4(t){return Ds(t.exitEdge,t.preferredExit)}function Tbo(t){return Ds(Xj(t.direction),t.preferredExit)}function yO(t){return!!(t.exitEdge&&t.termination.type==="boundary"&&t.connections.length>0&&t.connections.every(e=>e.hasExplicitLayeredExitTarget===!0))}function W0e(t){return"source_trace_id"in t&&typeof t.source_trace_id=="string"?t.source_trace_id:t.name}function sNt(t){const{bus:e,boundaryDirection:n,layerNames:o,targetLayer:i}=t,r=_=>_.exitTargetPoint?.layer??SPe(_.targetPoint),s=(_,f)=>{const I=Xu(_.exitTargetPoint??_.targetPoint,n)-Xu(f.exitTargetPoint??f.targetPoint,n);if(I!==0)return I;const C=W0e(_.connection),y=W0e(f.connection),x=C.localeCompare(y);return x!==0?x:_.connection.name.localeCompare(f.connection.name)||_.connectionIndex-f.connectionIndex},a=e.connections.toSorted((_,f)=>{const I=Xu(_.exitTargetPoint??_.targetPoint,n)-Xu(f.exitTargetPoint??f.targetPoint,n);return I!==0?I:_.connection.name.localeCompare(f.connection.name)||W0e(_.connection).localeCompare(W0e(f.connection))||o.indexOf(r(_))-o.indexOf(r(f))||_.connectionIndex-f.connectionIndex}),A=new Map;for(const _ of e.connections){const f=r(_),I=A.get(f)??[];I.push(_),A.set(f,I)}const c=[...A.keys()].toSorted((_,f)=>+(f===i)-+(_===i)||o.indexOf(_)-o.indexOf(f)||_.localeCompare(f)),l=new Map(c.map((_,f)=>[_,f])),u=new Map;for(const _ of c)for(const[f,I]of A.get(_).toSorted(s).entries())u.set(I.connectionIndex,f);const g=e.connections.toSorted((_,f)=>(u.get(_.connectionIndex)??0)-(u.get(f.connectionIndex)??0)||(l.get(r(_))??0)-(l.get(r(f))??0)||s(_,f)),h=[g];for(let _=0;_+1<g.length;_++){const f=g[_],I=g[_+1];if(r(f)===r(I))continue;const C=[...g];C[_]=I,C[_+1]=f,h.push(C)}h.push(a);const d=new Set(h.map(_=>_.map(f=>f.connectionIndex).join(","))).size;if(!r4(e)&&e.connections.length<=8&&c.length>1){const _=c.map(y=>A.get(y).toSorted(s)),f=_.map(()=>0),I=[],C=()=>{if(!(h.length>=128)){if(I.length===e.connections.length){h.push([...I]);return}for(let y=0;y<_.length;y++){const x=f[y],E=_[y][x];E&&(f[y]=x+1,I.push(E),C(),I.pop(),f[y]=x)}}};C()}const p=new Set;return{orders:h.filter(_=>{const f=_.map(I=>I.connectionIndex).join(",");return p.has(f)?!1:(p.add(f),!0)}),legacyOrder:a,ordinaryOrderCount:d}}function aNt(t){const{connection:e,windingOrderIndex:n=0}=t,{orders:o,legacyOrder:i}=sNt(t),r=t.windingOrderIndex===void 0?i:o[n]??o[0]??i,s=r.findIndex(a=>a.connectionIndex===e.connectionIndex);if(s<0)throw new Error(`FanoutSolver: connection "${e.connection.name}" is missing from winding order`);return{rank:s,connectionCount:r.length}}function kbo(t){const{bus:e,escapeLayer:n}=t;return(e.routableEscapeLayers??e.allowedLayers)?.find(o=>o!==n)}function yPe(t){const{bus:e,boundaryDirection:n,traceWidth:o,clearance:i}=t;if(r4(e)||!yO(e))return;const r=new Set(e.connections.map(u=>u.exitTargetPoint?.layer??SPe(u.targetPoint))),s=h0(n)?e.sharedBoundary.minY:e.sharedBoundary.minX,a=h0(n)?e.sharedBoundary.maxY:e.sharedBoundary.maxX,A=e.connections.map(u=>Math.max(s,Math.min(a,Xu(u.exitTargetPoint??u.targetPoint,n)))).toSorted((u,g)=>u-g),c=o+i;if((r.size<2||!t.allowLayerInterleaving)&&A.every((u,g)=>g===0||u-A[g-1]>=c-1e-9)||a-s<(A.length-1)*c-1e-9)return;const l=[];for(const[u,g]of A.entries())for(l.push({start:u,count:1,mean:g-u*c});l.length>1&&l.at(-2).mean>l.at(-1).mean;){const h=l.pop(),d=l.pop();l.push({start:d.start,count:d.count+h.count,mean:(d.mean*d.count+h.mean*h.count)/(d.count+h.count)})}for(const u of l){const g=Math.max(s,Math.min(a-(A.length-1)*c,u.mean));for(let h=u.start;h<u.start+u.count;h++)A[h]=g+h*c}return A}function tR(t){const e=t.fixedBoundaryTracksByConnectionIndex?.get(t.connection.connectionIndex);if(e!==void 0)return e;const n=Xu(t.connection.exitTargetPoint??t.connection.targetPoint,t.boundaryDirection),o=h0(t.boundaryDirection)?t.bus.sharedBoundary.minY:t.bus.sharedBoundary.minX,i=h0(t.boundaryDirection)?t.bus.sharedBoundary.maxY:t.bus.sharedBoundary.maxX,r=t.traceWidth!==void 0&&t.clearance!==void 0?yPe({...t,traceWidth:t.traceWidth,clearance:t.clearance}):void 0;if(r&&t.layerNames&&t.targetLayer){const{rank:s}=aNt({...t,layerNames:t.layerNames,targetLayer:t.targetLayer});return r[s]}return Math.max(o,Math.min(i,n))}function BB(t){const e=t.fixedBoundaryTracksByConnectionIndex?.get(t.connection.connectionIndex);if(e!==void 0)return e;const{bus:n,connection:o,cornerExitLaneOffset:i,traceWidth:r,viaDiameter:s,clearance:a,layerNames:A,targetLayer:c,windingOrderIndex:l,cornerBandTargetTrackOffset:u=0}=t,g=r4(n);if(!g||!n.exitEdge)return Xu(o.exitTargetPoint??o.targetPoint,n.direction);const h=e6(n.exitEdge),d=h0(h)?n.sharedBoundary.minY:n.sharedBoundary.minX,p=h0(h)?n.sharedBoundary.maxY:n.sharedBoundary.maxX,m=Math.max(r+a,s+a),_=d+(p-d)*(g==="minimum"?.25:.75)+u,f=yO(n)?aNt({bus:n,connection:o,boundaryDirection:h,layerNames:A,targetLayer:c,windingOrderIndex:l}):void 0,I=Math.max(n.connections.length,n.cornerBandConnectionCount??n.connections.length,i+(f?.connectionCount??0)),C=_-(I-1)*m/2,y=f?.rank??e$(n,o),x=i+y,B=!f&&g==="maximum"==t6(h)>0?I-1-x:x;return C+B*m}function ANt(t,e){const n=r4(t);if(!n||!t.exitEdge)return{exit:0,localChannel:0,boundaryChannel:0};const o=e.filter(s=>s.exitEdge&&s.cornerBandSide!==void 0),i=o.filter(s=>s.exitEdge===t.exitEdge&&s.cornerBandSide===n),r=o.filter(s=>s.direction===t.direction);return{exit:i.length,localChannel:r.length,boundaryChannel:i.length}}function n1(t,e,n){return h0(n)?{x:t,y:e}:{x:e,y:t}}function n6(t,e=t.direction){switch(e){case"right":return t.sharedBoundary.maxX;case"left":return t.sharedBoundary.minX;case"up":return t.sharedBoundary.maxY;case"down":return t.sharedBoundary.minY}}function xO(t){return h0(t.direction)?t.pitchX:t.pitchY}function cNt(t){return h0(t.direction)?t.pitchY:t.pitchX}function lNt(t,e){if(t.length<3)return[...t];const n=[t[0]];for(let o=1;o<t.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a={x:r.x-i.x,y:r.y-i.y},A={x:s.x-r.x,y:s.y-r.y},c=Math.hypot(a.x,a.y),l=Math.hypot(A.x,A.y),u=Math.abs(a.x)<=1e-9||Math.abs(a.y)<=1e-9,g=Math.abs(A.x)<=1e-9||Math.abs(A.y)<=1e-9,h=Math.abs(a.x*A.x+a.y*A.y)<=1e-9;if(c<=1e-9||l<=1e-9||!u||!g||!h){n.push(r);continue}const d=Math.min(e,c/3,l/3);n.push({x:r.x-a.x/c*d,y:r.y-a.y/c*d}),n.push({x:r.x+A.x/l*d,y:r.y+A.y/l*d})}return n.push(t.at(-1)),n.filter((o,i)=>i===0||tn(o,n[i-1])>1e-9)}function uNt(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o);return i<=1e-9||r<=1e-9||Math.abs(i-r)<=1e-9?[[t,e]]:i>r?[[t,{x:t.x+Math.sign(n)*r,y:e.y},e],[t,{x:e.x-Math.sign(n)*r,y:t.y},e]]:[[t,{x:e.x,y:t.y+Math.sign(o)*i},e],[t,{x:t.x,y:e.y-Math.sign(o)*i},e]]}function Fbo(t){const e=(h0(t.direction)?t.xCoordinates:t.yCoordinates).toSorted((i,r)=>i-r),n=t.connections.reduce((i,r)=>i+aE(r.sourcePoint,t.direction),0)/t.connections.length,o=t6(t.direction)>0?e.at(-1):e[0];return Math.abs(o-n)/xO(t)}function xPe(t){const e=h0(t.direction)?t.xCoordinates:t.yCoordinates,n=t.connections.reduce((i,r)=>i+aE(r.sourcePoint,t.direction),0)/t.connections.length,o=t6(t.direction)>0?Math.max(...e):Math.min(...e);return Math.abs(n-o)<1e-6}function e$(t,e){const n=[...t.connections].sort((o,i)=>Xu(o.sourcePoint,t.direction)-Xu(i.sourcePoint,t.direction)).findIndex(o=>o.connectionIndex===e.connectionIndex);if(n<0)throw new Error(`FanoutSolver: connection "${e.connection.name}" is missing from bus "${t.busId}"`);return n}function Lbo(t,e){return{minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}}function EPe(t,e){return t.x>=e.minX-1e-6&&t.x<=e.maxX+1e-6&&t.y>=e.minY-1e-6&&t.y<=e.maxY+1e-6}function BPe(t,e,n,o,i){const r=e-t,s=Math.floor((r-o)/(n+o)+1e-9);if(s<1)return[];const a=s*n+(s-1)*o,A=t+(r-a)/2+n/2;return Array.from({length:s},(c,l)=>({value:A+l*(n+o),kind:i}))}function Hbo(t){const{bus:e,connection:n,preferredTrack:o,traceWidth:i,clearance:r}=t,s=(h0(e.direction)?e.yCoordinates:e.xCoordinates).toSorted((m,_)=>m-_),a=Math.max(...e.componentObstacles.map(m=>h0(e.direction)?m.height/2:m.width/2)),A=h0(e.direction)?e.sharedBoundary.minY:e.sharedBoundary.minX,c=h0(e.direction)?e.sharedBoundary.maxY:e.sharedBoundary.maxX,l=c-A,u=A,g=c,h=[{value:o,kind:"preferred"},...BPe(u,s[0]-a,i,r,"margin")];for(let m=0;m<s.length;m++)h.push({value:s[m],kind:"corridor"}),m<s.length-1&&h.push(...BPe(s[m]+a,s[m+1]-a,i,r,"gap"));h.push(...BPe(s.at(-1)+a,g,i,r,"margin"));const d=Xu(n.sourcePoint,e.direction),p=(s[0]+s.at(-1))/2;return h.filter(m=>Math.abs(m.value-d)<=l+1e-9).filter((m,_,f)=>f.findIndex(I=>Math.abs(I.value-m.value)<1e-9)===_).sort((m,_)=>Math.abs(m.value-o)-Math.abs(_.value-o)-(Math.abs(m.value-p)-Math.abs(_.value-p))*.001)}function Obo(t){const e=r4(t.bus)||yO(t.bus)?Xu(t.connection.sourcePoint,t.bus.direction):Xu(t.connection.exitTargetPoint??t.connection.targetPoint,t.bus.direction),n=h0(t.bus.direction)?t.bus.sharedBoundary.minY:t.bus.sharedBoundary.minX,o=h0(t.bus.direction)?t.bus.sharedBoundary.maxY:t.bus.sharedBoundary.maxX;return Math.max(n+t.traceWidth/2,Math.min(o-t.traceWidth/2,e))}function Gbo(t){const{bus:e,connection:n,targetUsesVia:o,interstitialEscape:i,compactBusTracks:r,traceWidth:s,viaDiameter:a,clearance:A}=t,c=(h0(e.direction)?e.yCoordinates:e.xCoordinates).toSorted((B,S)=>B-S),l=Xu(n.sourcePoint,e.direction);if(r){const B=e$(e,n);return(c[0]+c.at(-1))/2+(B-(e.connections.length-1)/2)*(s+A)}if(!o||!i)return l;const u=Fbo(e),g=s+A,h=Math.ceil(e.connections.length/2),d=(h-1)*g,p=a/2+s/2+A+.001,m=Math.round(u)+1,_=m*p+(m-1)*d,f=e$(e,n),I=c[0],C=c.at(-1),y=f<h?I-_-(h-f-1)*g:C+_+(f-h)*g,x=h0(e.direction)?e.sharedBoundary.minY:e.sharedBoundary.minX,E=h0(e.direction)?e.sharedBoundary.maxY:e.sharedBoundary.maxX;return Math.max(x+s/2,Math.min(E-s/2,y))}function gNt(t){const e=t6(t.direction),n=[...t.connections].sort((r,s)=>{const a=e*(aE(s.sourcePoint,t.direction)-aE(r.sourcePoint,t.direction));return Math.abs(a)>1e-6?a:Xu(r.sourcePoint,t.direction)-Xu(s.sourcePoint,t.direction)}),o=[...t.connections].sort((r,s)=>Xu(r.sourcePoint,t.direction)-Xu(s.sourcePoint,t.direction)||e*(aE(s.sourcePoint,t.direction)-aE(r.sourcePoint,t.direction))),i=[n,[...n].reverse(),o,[...o].reverse()];for(let r=1;r<Math.min(n.length,8);r++)i.push([...n.slice(r),...n.slice(0,r)]);return i}function dNt(t,e,n,o,i){tn(e,n)<1e-9||t.push({start:e,end:n,width:o,layer:i})}function bPe(t,e){if(t.length<3)return t;const n=[t[0]];for(let o=1;o<t.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a=tn(i,r),A=tn(r,s);if(a<1e-9||A<1e-9)continue;const c={x:(r.x-i.x)/a,y:(r.y-i.y)/a},l={x:(s.x-r.x)/A,y:(s.y-r.y)/A},u=c.x*l.x+c.y*l.y;if(Math.abs(u)>1e-6){n.push(r);continue}const g=Math.min(e,a/2,A/2);n.push({x:r.x-c.x*g,y:r.y-c.y*g}),n.push({x:r.x+l.x*g,y:r.y+l.y*g})}return n.push(t.at(-1)),n}function j0e(t){const{preparedConnection:e,bus:n,targetLayer:o,traceWidth:i,viaDiameter:r,clearance:s,viaHandedness:a}=t,A={x:e.sourcePoint.x,y:e.sourcePoint.y},c=o!==e.sourceLayer,l=xO(n),u=cNt(n),g=h0(n.direction)?e.sourceObstacle.width:e.sourceObstacle.height,h=c&&!xPe(n)?g>=l?g/2+r/2+s+.001:l*.5:c?Math.max(l*.5,g/2+(c?r:i)/2+s+.001):g/2+i/2+s+.001,d=aE(A,n.direction)+t6(n.direction)*h,p=Xu(A,n.direction)+a*u*.5;return n1(d,p,n.direction)}function $0e(t){const{preparedConnection:e,bus:n,targetLayer:o,track:i,exitAxis:r,layerNames:s,traceWidth:a,viaDiameter:A,viaHoleDiameter:c,viaHandedness:l,interstitialEscape:u,spreadLaneIndex:g,cornerExitLaneOffset:h,cornerLocalChannelLaneOffset:d,cornerBoundaryChannelLaneOffset:p,clearance:m,terminateAtVia:_,allowBlindAndBuriedVias:f,initialViaPoint:I,sourceEscapePath:C,cornerBandTargetTrackOffset:y,fixedBoundaryTracksByConnectionIndex:x}=t,E=x?.get(e.connectionIndex),B=r4(n),S=n.exitEdge?e6(n.exitEdge):n.direction,Q=E!==void 0&&!B&&n.direction===S?E:i,w={x:e.sourcePoint.x,y:e.sourcePoint.y},M=o,k=yO(n)?kbo({bus:n,escapeLayer:M}):void 0,R=!!k,F=t6(n.direction),O=xO(n),U=C?.at(-1),Y=U!==void 0?{x:U.x,y:U.y}:I===void 0?j0e({preparedConnection:e,bus:n,targetLayer:o,traceWidth:a,viaDiameter:A,clearance:m,viaHandedness:l}):{x:I.x,y:I.y},W=C?C.map(Ct=>({x:Ct.x,y:Ct.y})):[w,Y];if(W.length<2||tn(W[0],w)>1e-9||tn(W.at(-1),Y)>1e-9)throw new Error(`FanoutSolver: source escape path for "${e.connection.name}" must run from its source point to its via`);const te=aE(Y,n.direction),j=Xu(Y,n.direction),J=A/2+a/2+m+.001+g*(a+m),oe=u&&O>=J+A/2+m,ie=oe?n1(te+F*J,j,n.direction):Y,ne=oe?aE(ie,n.direction):te+F*Math.abs(Q-j),le=n1(ne,Q,n.direction),ge=t6(S),_e=n6(n,S),ue=E??(B&&n.exitEdge?BB({bus:n,connection:e,cornerExitLaneOffset:h,traceWidth:a,viaDiameter:A,clearance:m,layerNames:s,targetLayer:o,cornerBandTargetTrackOffset:y}):R?tR({bus:n,connection:e,boundaryDirection:S,traceWidth:a,clearance:m,layerNames:s,targetLayer:o}):Q),fe=e$(n,e),ye=Tbo(n)==="maximum"?d+fe:d+n.connections.length-1-fe,Me=p+fe,ve=Math.max(n.connections.length,n.cornerBandConnectionCount??n.connections.length),he=ge>0?Me:ve-1-Me,Qe=R?A/2+a/2+m:a+m,Pe=Ct=>A/2+a/2+m+Ct*Qe,we=n6(n,n.direction)-F*Pe(ye),Te=_e-ge*Pe(he),Re=n1(we,Q,n.direction),Ee=n1(Te,we,S),ke=n1(Te,ue,S),Ce=h0(n.direction)!==h0(S)?Ee:n1(Te,Q,S),Le=_?Y:B||R||E!==void 0?n1(_e,ue,S):n1(r,Q,n.direction),Ye=[],tt=[];tt.push({route_type:"wire",x:w.x,y:w.y,width:a,layer:e.sourceLayer,start_pcb_port_id:e.sourcePoint.pcb_port_id});for(let Ct=1;Ct<W.length;Ct++){const Dt=W[Ct-1],kt=W[Ct];dNt(Ye,Dt,kt,a,e.sourceLayer),!(tn(Dt,kt)<=1e-9)&&tt.push({route_type:"wire",x:kt.x,y:kt.y,width:a,layer:e.sourceLayer})}const At=Ye.length;let at;if(o!==e.sourceLayer){const Ct=Mx({fromLayer:e.sourceLayer,toLayer:o,layerNames:s,allowBlindAndBuriedVias:f});at={center:Y,diameter:A,holeDiameter:c,fromLayer:e.sourceLayer,toLayer:o,spanLayers:Ct},tt.push({route_type:"via",x:Y.x,y:Y.y,from_layer:e.sourceLayer,to_layer:o,via_diameter:A,via_hole_diameter:c}),tt.push({route_type:"wire",x:Y.x,y:Y.y,width:a,layer:o})}const nt=(Ct,Dt)=>{for(let kt=1;kt<Ct.length;kt++){const it=Ct[kt-1],Yt=Ct[kt];dNt(Ye,it,Yt,a,Dt),tt.push({route_type:"wire",x:Yt.x,y:Yt.y,width:a,layer:Dt})}},gt=[];if(R&&k){const Ct=bPe([Y,...oe?[ie]:[],le,...h0(n.direction)!==h0(S)?[Re]:[],Ce],Math.max(a+m,a*2));nt(Ct,M);const Dt=(kt,it,Yt)=>{it!==Yt&&(gt.push({center:kt,diameter:A,holeDiameter:c,fromLayer:it,toLayer:Yt,spanLayers:Mx({fromLayer:it,toLayer:Yt,layerNames:s,allowBlindAndBuriedVias:f})}),tt.push({route_type:"via",x:kt.x,y:kt.y,from_layer:it,to_layer:Yt,via_diameter:A,via_hole_diameter:c}),tt.push({route_type:"wire",x:kt.x,y:kt.y,width:a,layer:Yt}))};Dt(Ce,M,k),nt([Ce,ke],k),Dt(ke,k,M),nt([ke,Le],M)}else{const Ct=_?[Y]:B?bPe([Y,...oe?[ie]:[],le,Re,...h0(n.direction)!==h0(S)?[Ee]:[],ke,Le],Math.max(a+m,a*2)):oe?bPe([Y,ie,le,Le],Math.max(a+m,a*2)):[Y,le,Le];nt(Ct,M)}const bt=qN({connectionName:e.connection.name,sourcePointIndex:e.sourcePointIndex});return{busId:n.busId,connectionName:e.connection.name,connectionIndex:e.connectionIndex,sourcePointIndex:e.sourcePointIndex,sourcePoint:e.sourcePoint,sourceObstacle:e.sourceObstacle,sourceLayer:e.sourceLayer,targetPoint:e.targetPoint,targetLayer:o,termination:n.termination,direction:n.direction,...n.exitEdge?{exitEdge:n.exitEdge}:{},...B?{cornerBandSide:B}:{},exitPoint:Le,trace:{type:"pcb_trace",pcb_trace_id:bt.traceId,connection_name:e.connection.name,connectsTo:[...e.sourcePoint.pointId?[e.sourcePoint.pointId]:[],...e.sourcePoint.pcb_port_id?[e.sourcePoint.pcb_port_id]:[],bt.boundaryExitPointId],route:tt},segments:Ye,...At>1?{sourceEscapeSegmentCount:At}:{},via:at,...gt.length>0?{additionalVias:gt}:{},length:Ye.reduce((Ct,Dt)=>Ct+tn(Dt.start,Dt.end),0)}}function SPe(t){const e="layer"in t?t.layer:t.layers[0];if(!e)throw new Error("FanoutSolver: plane endpoint has no copper layer");return e}function QPe(t){const{preparedConnection:e,bus:n,viaDiameter:o,clearance:i}=t,{sourcePoint:r,targetPoint:s}=e,a=Math.max(n.pitchX,n.pitchY)*.5;if(tn(r,s)<=1e-6||tn(r,s)>a)return[];const A=(()=>{switch(n.direction){case"left":return{x:-1,y:0};case"right":return{x:1,y:0};case"up":return{x:0,y:1};case"down":return{x:0,y:-1}}})(),c=Math.SQRT1_2,l=[A,...[{x:c,y:c},{x:c,y:-c},{x:-c,y:c},{x:-c,y:-c},{x:1,y:0},{x:-1,y:0},{x:0,y:1},{x:0,y:-1}].toSorted((d,p)=>p.x*A.x+p.y*A.y-(d.x*A.x+d.y*A.y))],u=Math.max(o,o/2+i),g=[u,Math.max(u,Math.min(n.pitchX,n.pitchY)*.5),Math.max(u,Math.min(n.pitchX,n.pitchY)*.625),Math.max(u,Math.min(n.pitchX,n.pitchY)*.75)],h=[];for(const d of[r,s])for(const p of g)for(const m of l){const _={x:d.x+m.x*p,y:d.y+m.y*p};tn(_,r)<=1e-6||tn(_,s)<=1e-6||h.some(f=>tn(f,_)<=1e-6)||h.push(_)}return h}function vPe(t){const{plan:e,preparedConnection:n,planeLayer:o,viaPoint:i,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:c}=t,l={x:n.targetPoint.x,y:n.targetPoint.y},u=SPe(n.targetPoint),g=Mx({fromLayer:o,toLayer:u,layerNames:r,allowBlindAndBuriedVias:c});if(!g.includes(o))throw new Error(`FanoutSolver: via for "${n.connection.name}" does not cross plane ${o}`);const h=[{start:i,end:l,width:s,layer:u}],d={center:i,diameter:a,holeDiameter:A,fromLayer:o,toLayer:u,spanLayers:g},p=qN({connectionName:n.connection.name,sourcePointIndex:n.sourcePointIndex}),m={type:"pcb_trace",pcb_trace_id:p.planeEndpointTraceId,connection_name:n.connection.name,connectsTo:[...n.targetPoint.pointId?[n.targetPoint.pointId]:[],...n.targetPoint.pcb_port_id?[n.targetPoint.pcb_port_id]:[],p.planeEndpointPointId],route:[{route_type:"wire",...i,width:s,layer:o},{route_type:"via",...i,from_layer:o,to_layer:u,via_diameter:a,via_hole_diameter:A},{route_type:"wire",...i,width:s,layer:u},{route_type:"wire",...l,width:s,layer:u}]};return{...e,planeEndpointTrace:m,planeEndpointSegments:h,planeEndpointVia:d,length:e.length+h.reduce((_,f)=>_+tn(f.start,f.end),0)}}function Ybo(t){const{segment:e,plan:n,segmentIndex:o,srj:i,allowSameNetMerges:r,obstacles:s,clearance:a}=t;for(const A of s)if(A.layers.includes(e.layer)&&!A.connectedTo.includes(n.connectionName)&&!(r&&n4(i,A,n.connectionName))&&!jj({inputSrj:i,segment:e,bodyObstacle:A,connectionName:n.connectionName})&&!(o>=0&&o<(n.sourceEscapeSegmentCount??1)&&A===n.sourceObstacle&&e.layer===n.sourceLayer)&&Tl(e,A)<e.width/2+a-1e-9)return!1;return!0}function kb(t){return t.planeEndpointSegments?.length?[...t.segments,...t.planeEndpointSegments]:t.segments}function EO(t){return[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(e=>!!e)}function Ubo(t,e){return tn(e.center,t.sourcePoint)<=1e-9&&z0e({center:e.center,diameter:e.diameter,obstacle:t.sourceObstacle})}function wPe(t){const{plan:e,srj:n,sharedBoundary:o,clearance:i,allowBlindAndBuriedVias:r,allowSameNetMerges:s}=t,a=Lbo(n.bounds,o);if(!EPe(e.exitPoint,a)||kb(e).some(l=>!EPe(l.start,a)||!EPe(l.end,a)))return!1;const A=kb(e);let c;if(t.segmentCache){let l=t.segmentCache.byConnection.get(e.connectionName);l||(l=new WeakMap,t.segmentCache.byConnection.set(e.connectionName,l)),c=l.get(e.sourceObstacle),c||(c=[new WeakMap,new WeakMap],l.set(e.sourceObstacle,c))}for(let l=0;l<A.length;l++){const u=A[l],g=l<e.segments.length?l:-1,h=g>=0&&g<(e.sourceEscapeSegmentCount??1)&&u.layer===e.sourceLayer,d=c?.[h?1:0];let p=d?.get(u);if(p===void 0&&(p=Ybo({segment:u,plan:e,segmentIndex:g,srj:n,allowSameNetMerges:s,obstacles:t.segmentCache?t.segmentCache.obstaclesByLayer.get(u.layer)??[]:n.obstacles,clearance:i}),d?.set(u,p)),!p)return!1}for(const l of EO(e))for(const u of n.obstacles)if(!(CPe(n)&&u===e.sourceObstacle&&Ubo(e,l))&&u.layers.some(g=>l.spanLayers.includes(g))&&!(s&&n4(n,u,e.connectionName))&&wx(l.center,u)<l.diameter/2+i-1e-9)return!1;for(const l of Z7(n,r))if(!(e.connectionName===l.connectionName||s&&Px(n,e.connectionName,l.connectionName))){for(const u of kb(e)){for(const g of l.segments)if(!Zm(u,g,i))return!1;for(const g of l.vias)if(g.spanLayers.includes(u.layer)&&Cr(g.center,u.start,u.end)<g.diameter/2+u.width/2+i-1e-9)return!1}for(const u of EO(e)){for(const g of l.segments)if(u.spanLayers.includes(g.layer)&&Cr(u.center,g.start,g.end)<u.diameter/2+g.width/2+i-1e-9)return!1;for(const g of l.vias)if(u.spanLayers.some(h=>g.spanLayers.includes(h))&&tn(u.center,g.center)<(u.diameter+g.diameter)/2+i-1e-9)return!1}}return!0}function q0e(t){const{plan:e,otherPlans:n,srj:o,allowSameNetMerges:i,clearance:r,blockingBusCounts:s,segmentIndexes:a}=t,A=kb(e),c=EO(e);for(const l of n){if(i&&Px(o,e.connectionName,l.connectionName)||e.sourcePoint.pcb_port_id&&e.sourcePoint.pcb_port_id===l.sourcePoint.pcb_port_id||e.sourcePoint.pointId&&e.sourcePoint.pointId===l.sourcePoint.pointId)continue;const g=()=>{l.busId!==e.busId&&s?.set(l.busId,(s.get(l.busId)??0)+1)},h=kb(l),d=EO(l);let p=a?.get(l);a&&!p&&(p=new qj(h),a.set(l,p));for(const m of A){for(const _ of p?.querySegment(m,r)??h)if(!Zm(m,_,r))return g(),!1;for(const _ of d)if(_.spanLayers.includes(m.layer)&&Cr(_.center,m.start,m.end)<_.diameter/2+m.width/2+r-1e-9)return g(),!1}for(const m of c){for(const _ of p?.queryVia(m,r)??h)if(m.spanLayers.includes(_.layer)&&Cr(m.center,_.start,_.end)<m.diameter/2+_.width/2+r-1e-9)return g(),!1;for(const _ of d)if(m.spanLayers.some(f=>_.spanLayers.includes(f))&&tn(m.center,_.center)<(m.diameter+_.diameter)/2+r-1e-9)return g(),!1}}return!0}function hNt(t){const{plans:e,srj:n,clearance:o,allowSameNetMerges:i=!1}=t;return e.every((r,s)=>q0e({plan:r,otherPlans:e.filter((a,A)=>A!==s),srj:n,allowSameNetMerges:i,clearance:o}))}function X0e(t){const{plan:e,otherPlans:n,staticClearanceCache:o,blockingBusCounts:i,cacheKey:r,srj:s,sharedBoundary:a,clearance:A,allowBlindAndBuriedVias:c,allowSameNetMerges:l}=t;let u=o?.get(r);return u===void 0&&(u=wPe({plan:e,srj:s,sharedBoundary:a,clearance:A,allowBlindAndBuriedVias:c,allowSameNetMerges:l}),o?.set(r,u)),u&&q0e({plan:e,otherPlans:n,srj:s,allowSameNetMerges:l,clearance:A,blockingBusCounts:i})}function Wh(t){const{plans:e,srj:n,sharedBoundary:o,clearance:i,allowBlindAndBuriedVias:r=!0,allowSameNetMerges:s=!1,allowSameNetPlaneMerges:a=!1}=t;for(let A=0;A<e.length;A++){const c=e[A];if(!wPe({plan:c,srj:n,sharedBoundary:o,clearance:i,allowBlindAndBuriedVias:r,allowSameNetMerges:s||a&&c.termination.type==="plane"}))return!1;const l=e.filter((u,g)=>g!==A&&!(a&&c.termination.type==="plane"&&u.termination.type==="plane"&&Px(n,c.connectionName,u.connectionName)));if(!q0e({plan:c,otherPlans:l,srj:n,allowSameNetMerges:s,clearance:i}))return!1}return!0}function Z0e(t){const{srj:e,sharedBoundary:n,clearance:o,allowBlindAndBuriedVias:i=!0,allowSameNetMerges:r=!1,allowSameNetPlaneMerges:s=!1}=t,a={obstaclesByLayer:new Map,byConnection:new Map};for(const m of e.obstacles)for(const _ of m.layers){const f=a.obstaclesByLayer.get(_)??[];f.push(m),a.obstaclesByLayer.set(_,f)}const A=s&&!r?{obstaclesByLayer:a.obstaclesByLayer,byConnection:new Map}:a,c=new WeakMap,l=new WeakMap,u=new WeakMap;let g=new Set;const h=m=>{let _=l.get(m);return _===void 0&&(_=wPe({segmentCache:m.termination.type==="plane"?A:a,plan:m,srj:e,sharedBoundary:n,clearance:o,allowBlindAndBuriedVias:i,allowSameNetMerges:r||s&&m.termination.type==="plane"}),l.set(m,_)),_},d=(m,_)=>{let f=u.get(m);f||(f=new WeakMap,u.set(m,f));let I=f.get(_);if(I===void 0){const C=kb(m).length>kb(_).length;I=q0e({plan:C?_:m,otherPlans:[C?m:_],segmentIndexes:c,srj:e,clearance:o,allowSameNetMerges:r||s&&m.termination.type==="plane"&&_.termination.type==="plane"}),f.set(_,I);let y=u.get(_);y||(y=new WeakMap,u.set(_,y)),y.set(m,I)}return I};return Object.assign(m=>{const _=new Set(m);if(_.size===m.length){const f=m.filter(I=>!g.has(I));for(const I of m){const C=g.has(I);if(!C&&!h(I))return!1;for(const y of C?f:m)if(I!==y&&!d(I,y))return!1}}else for(const[f,I]of m.entries()){if(!h(I))return!1;for(const[C,y]of m.entries())if(C!==f&&!d(I,y))return!1}return g=_,!0},{mutuallyClear:m=>m.every((_,f)=>m.every((I,C)=>C===f?!0:d(_,I)))})}function pNt(t){const{srj:e,bus:n,targetLayer:o,acceptedPlans:i,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,clearance:c,staticClearanceCache:l,blockingBusCounts:u,allowBlindAndBuriedVias:g=!0,allowSameNetMerges:h=!1,fixedViaPointsByConnectionIndex:d,planeCandidateSkipCount:p=0}=t,m=n.connections[0]?.sourceObstacle;if(!m||n.termination.type!=="plane")return null;const _=n.connections[0].sourceLayer;if(o===_)return null;let f=p;const I=(x,E)=>{for(const[B,S]of x.entries())if(E(S,B)){if(f>0){f--;continue}if(!(t.collectAlternative&&!t.collectAlternative(S)))return S}};if(d){const x=[];for(const E of n.connections){const B=d.get(E.connectionIndex);if(!B)return null;const S={x:E.sourcePoint.x,y:E.sourcePoint.y},Q=$0e({preparedConnection:E,bus:n,targetLayer:o,track:Xu(S,n.direction),exitAxis:n6(n),layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,viaHandedness:0,interstitialEscape:!1,spreadLaneIndex:0,cornerExitLaneOffset:0,cornerLocalChannelLaneOffset:0,cornerBoundaryChannelLaneOffset:0,clearance:c,terminateAtVia:!0,allowBlindAndBuriedVias:g,initialViaPoint:B,sourceEscapePath:t.sourceEscapePaths?.get(E.connectionIndex)?[...t.sourceEscapePaths.get(E.connectionIndex)]:[S,B]}),M=[...QPe({preparedConnection:E,bus:n,viaDiameter:a,clearance:c}).map(R=>vPe({plan:Q,preparedConnection:E,planeLayer:o,viaPoint:R,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:g})),Q],k=I(M,(R,F)=>X0e({plan:R,otherPlans:[...i,...x],staticClearanceCache:l,blockingBusCounts:u,cacheKey:`plane-fixed:${n.busId}:${o}:${E.connectionIndex}:${B.x}:${B.y}:${F}`,srj:e,sharedBoundary:n.sharedBoundary,clearance:c,allowBlindAndBuriedVias:g,allowSameNetMerges:h}));if(!k)return null;x.push(k)}return x}if(CPe(e)&&n.connections.length===1&&z0e({center:n.connections[0].sourcePoint,diameter:a,obstacle:m})){const x=n.connections[0],E=$0e({preparedConnection:x,bus:n,targetLayer:o,track:Xu(x.sourcePoint,n.direction),exitAxis:n6(n),layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,viaHandedness:0,interstitialEscape:!1,spreadLaneIndex:0,cornerExitLaneOffset:0,cornerLocalChannelLaneOffset:0,cornerBoundaryChannelLaneOffset:0,clearance:c,terminateAtVia:!0,allowBlindAndBuriedVias:g,initialViaPoint:x.sourcePoint}),S=[...QPe({preparedConnection:x,bus:n,viaDiameter:a,clearance:c}).map(w=>vPe({plan:E,preparedConnection:x,planeLayer:o,viaPoint:w,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:g})),E],Q=I(S,(w,M)=>X0e({plan:w,otherPlans:i,staticClearanceCache:l,blockingBusCounts:u,cacheKey:`plane-via-in-pad:${n.busId}:${o}:${M}`,srj:e,sharedBoundary:n.sharedBoundary,clearance:c,allowBlindAndBuriedVias:g,allowSameNetMerges:h}));if(Q)return[Q]}const C=[n.direction,...["left","right","up","down"].filter(x=>x!==n.direction)],y=[...C.map(x=>({direction:x,centeredOutward:!1})),...C.map(x=>({direction:x,centeredOutward:!0}))];for(const{direction:x,centeredOutward:E}of y){const B=x===n.direction?n:{...n,direction:x},S=h0(x)?m.width:m.height,Q=xO(B)/2-S/2>=a/2+c-1e-9,w=E?!Q&&xPe(B)?[0]:[]:Q?[0]:[1,-1];for(const M of w)for(const k of gNt(B)){const R=[];let F=!0;for(const O of k){const U=Xu(O.sourcePoint,x),Y=j0e({preparedConnection:O,bus:B,targetLayer:o,traceWidth:s,viaDiameter:a,clearance:c,viaHandedness:M}),W=xO(B),te=t6(x),j=n6(B,x),J=te*(j-aE(Y,x))-(a/2+c),oe=Math.max(0,Math.floor(J/W)),ie={x:O.sourcePoint.x,y:O.sourcePoint.y},ne=aE(Y,x),le=Xu(Y,x),ge=cNt(B),_e=[],ue=128;for(let pe=0;pe<=oe&&_e.length<ue;pe++){const ye=n1(ne+te*pe*W,le,x);if(pe===0)_e.push([ie,Y]);else{for(const Me of uNt(ie,ye))if(_e.push(Me),_e.length>=ue)break;_e.length<ue&&_e.push([ie,Y,ye])}for(let Me=1;Me<=Math.min(3,pe-1)&&_e.length<ue;Me++){const ve=pe-Me;if(!(ve<1||ve>oe))for(const he of[-1,1]){const Qe=le+he*Me*ge,Pe=n1(ne,Qe,x),we=n1(ne+te*ve*W,le,x),Te=n1(ne+te*ve*W,Qe,x),Re=Math.min(W,ge)*.2;for(const Ee of uNt(ie,Te))if(_e.push(Ee),_e.length>=ue)break;if(_e.length>=ue||(_e.push(lNt([ie,Y,Pe,Te],Re),lNt([ie,Y,we,Te],Re)),_e.length>=ue))break}}}let fe;for(const[pe,ye]of _e.entries()){const Me=$0e({preparedConnection:O,bus:B,targetLayer:o,track:U,exitAxis:n6(B),layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,viaHandedness:M,interstitialEscape:!Q,spreadLaneIndex:0,cornerExitLaneOffset:0,cornerLocalChannelLaneOffset:0,cornerBoundaryChannelLaneOffset:0,clearance:c,terminateAtVia:!0,allowBlindAndBuriedVias:g,sourceEscapePath:ye}),he=[...QPe({preparedConnection:O,bus:B,viaDiameter:a,clearance:c}).map(Qe=>vPe({plan:Me,preparedConnection:O,planeLayer:o,viaPoint:Qe,layerNames:r,traceWidth:s,viaDiameter:a,viaHoleDiameter:A,allowBlindAndBuriedVias:g})),Me];if(fe=I(he,(Qe,Pe)=>X0e({plan:Qe,otherPlans:[...i,...R],staticClearanceCache:l,blockingBusCounts:u,cacheKey:`plane:${n.busId}:${o}:${x}:${O.connectionIndex}:${M}:${pe}:${Pe}`,srj:e,sharedBoundary:n.sharedBoundary,clearance:c,allowBlindAndBuriedVias:g,allowSameNetMerges:h})),fe)break}if(!fe){F=!1;break}R.push(fe)}if(F)return R}}return null}function*eue(t,e=1,n=!1){const{srj:o,bus:i,targetLayer:r,acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,compactBusTracks:g,staticClearanceCache:h,blockingBusCounts:d,allowBlindAndBuriedVias:p=!0,allowSameNetMerges:m=!1,rejectedViaMinimalCandidates:_,stopAfterFirstRejectedViaMinimalCandidate:f=!1,fixedViaPointsByConnectionIndex:I,fixedBoundaryTracksByConnectionIndex:C,reservedVias:y=[],softReservedVias:x=[],viaMinimalOnly:E=!1,allowBoundarySideViaFallback:B=!1,preferCornerBoundaryVia:S=!1,adaptiveWindingRouteOrder:Q=!1,alignWindingGridToPads:w=!1,fixedViaFallbackRouteOrderAttempts:M=24,allowFixedViaReservedExitFallback:k=!1,cornerBandTargetTrackOffset:R,cornerExitLaneOffset:F,forbidEarlyExitBoundaryContact:O=!1}=t;if(!Number.isInteger(e)||e<1)throw new Error(`FanoutSolver: maxAlternatives must be a positive integer, received ${e}`);if(F!==void 0&&(!Number.isSafeInteger(F)||F<0))throw new Error(`FanoutSolver: cornerExitLaneOffset must be a non-negative safe integer, received ${F}`);if(I&&i.connections.some(ye=>!I.has(ye.connectionIndex)))return[];if(i.termination.type==="plane"){const ye=[];if(i.connections.length===1&&e>1)return pNt({...t,planeCandidateSkipCount:0,collectAlternative:Me=>(ye.push([Me]),ye.length>=e)}),ye;for(let Me=0;Me<e;Me++){const ve=pNt({...t,planeCandidateSkipCount:Me});if(!ve)break;ye.push(ve)}return ye}if(C){if(!i.exitEdge)throw new Error("FanoutSolver: fixed boundary tracks require an exit edge");const ye=i.exitEdge==="left"||i.exitEdge==="right",Me=ye?i.sharedBoundary.minY:i.sharedBoundary.minX,ve=ye?i.sharedBoundary.maxY:i.sharedBoundary.maxX;for(const he of i.connections){const Qe=C.get(he.connectionIndex);if(Qe===void 0||!Number.isFinite(Qe)||Qe<Me-1e-9||Qe>ve+1e-9)throw new Error(`FanoutSolver: invalid fixed boundary track for ${he.connection.name}`)}}const U=n6(i),Y=i.connections[0]?.sourceObstacle;if(!Y)return[[]];const W=h0(i.direction)?Y.width:Y.height,te=i.connections[0].sourceLayer,j=r!==te,J=xPe(i),oe=xO(i)/2-W/2>=c/2+u-1e-9,ie=j&&!J&&!oe,ne=j?oe||J?[0]:p?[1,-1]:[-1,1]:[0],le=(()=>{if(p||ne.length!==2||!ne.includes(-1)||!ne.includes(1))return ne;const ye=i.connections.reduce((ve,he)=>ve+Xu(he.sourcePoint,i.direction),0)/i.connections.length,Me=i.connections.reduce((ve,he)=>ve+Xu(he.exitTargetPoint??he.targetPoint,i.direction),0)/i.connections.length;return Me>ye+1e-9?[-1,1]:Me<ye-1e-9?[1,-1]:ne})(),ge=[],_e=new Set,ue=ANt(i,s);F!==void 0&&(ue.exit=F);const fe=ye=>{if(C&&ye.some(ve=>{const he=C.get(ve.connectionIndex),Qe=i.exitEdge==="left"||i.exitEdge==="right"?ve.exitPoint.y:ve.exitPoint.x;return Math.abs(Qe-he)>1e-9}))return;const Me=ye.map(ve=>`${ve.connectionIndex}:${ve.targetLayer}:${ve.exitPoint.x}:${ve.exitPoint.y}:${ve.segments.map(he=>`${he.start.x},${he.start.y},${he.end.x},${he.end.y},${he.layer}`).join(";")}`).join("|");_e.has(Me)||(_e.add(Me),ge.push(ye))};if(!yO(i)&&i.exitEdge&&i.connections.length===1&&a.includes(r)&&(i.allowedLayers===void 0||i.allowedLayers.includes(r))&&(i.routableEscapeLayers===void 0||i.routableEscapeLayers.includes(r))&&i.connections[0].sourceLayer!==r&&I&&t.sourceEscapePaths?.has(i.connections[0].connectionIndex)){const ye=i.connections[0],Me=e6(i.exitEdge),ve=BC({srj:o,bus:i,targetLayer:r,terminals:[{connection:ye,viaPoint:I.get(ye.connectionIndex),exitPoint:n1(n6(i,Me),tR({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:ye,boundaryDirection:Me}),Me)}],acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:3,reservedVias:y,softReservedVias:x,gridStepDivisor:2,gridStep:t.windingGridStep,alignGridToPads:w,sourceEscapePaths:t.sourceEscapePaths,heuristicWeight:t.windingHeuristicWeight,forbidEarlyExitBoundaryContact:O},e,n);let he=ve.next();for(;!he.done;)yield{phase:"via-minimal-winding",busId:i.busId,targetLayer:r,winding:he.value},he=ve.next();for(const Qe of he.value)if(Wh({plans:[...s,...Qe],srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})&&(fe(Qe),ge.length>=e))return ge}if(yO(i)&&i.exitEdge){const ye=e6(i.exitEdge),Me=n6(i,ye),ve=r4(i),he=CPe(o)&&i.connections.every(be=>z0e({center:be.sourcePoint,diameter:c,obstacle:be.sourceObstacle})),Qe=24,Pe=!!(ve||yPe({bus:i,boundaryDirection:ye,traceWidth:A,clearance:u})),we=sNt({bus:i,boundaryDirection:ye,layerNames:a,targetLayer:r}),Te=we.orders.length,Re=Pe?we.ordinaryOrderCount:1,Ee=le.map(be=>({label:`uniform-${be}`,useViaInPad:!1,getViaHandedness:()=>be,maximumRouteOrderAttempts:p?void 0:Qe})),ke=i.connections.toSorted((be,et)=>Xu(be.sourcePoint,i.direction)-Xu(et.sourcePoint,i.direction)||aE(be.sourcePoint,i.direction)-aE(et.sourcePoint,i.direction)||be.connectionIndex-et.connectionIndex),Ce=new Map(ke.map((be,et)=>[be.connectionIndex,et])),Le=be=>be<ke.length/2?1:-1,Ye=Math.floor(ke.length/2),tt=[0,1,Ye,Ye+1,...ke.map((be,et)=>et)].filter((be,et,It)=>be>=0&&be<ke.length&&It.indexOf(be)===et),At=[[Ye],[Ye+1],[0],[1],[0,Ye+1],[1,Ye],[0,Ye],[1,Ye+1],[0,1],[Ye,Ye+1],...tt.map(be=>[be])].map(be=>be.filter(et=>et>=0&&et<ke.length).toSorted((et,It)=>et-It)).filter((be,et,It)=>be.length>0&&It.findIndex(Bt=>Bt.join(",")===be.join(","))===et),at=!p&&(y.length>0||s.some(be=>be.termination.type==="plane"))&&le.includes(-1)&&le.includes(1)?[{label:"toward-source-median",useViaInPad:!1,maximumRouteOrderAttempts:Qe,getViaHandedness:be=>Le(Ce.get(be.connectionIndex)??0)},...At.slice(0,12).map(be=>({label:`toward-source-median-with-ranks-${be.join("-")}-flipped`,useViaInPad:!1,maximumRouteOrderAttempts:6,getViaHandedness:et=>{const It=Ce.get(et.connectionIndex)??0,Bt=Le(It);return be.includes(It)?-Bt:Bt}})),{label:"alternating-source-grid-a",useViaInPad:!1,maximumRouteOrderAttempts:3,getViaHandedness:be=>(Ce.get(be.connectionIndex)??0)%2===0?-1:1},{label:"alternating-source-grid-b",useViaInPad:!1,maximumRouteOrderAttempts:3,getViaHandedness:be=>(Ce.get(be.connectionIndex)??0)%2===0?1:-1},{label:"away-from-source-median",useViaInPad:!1,maximumRouteOrderAttempts:Qe,getViaHandedness:be=>(Ce.get(be.connectionIndex)??0)<ke.length/2?-1:1}]:[],nt={label:"via-in-pad",useViaInPad:!0,getViaHandedness:()=>0},gt=I??(!p&&(i.connections.length>=8||yPe({bus:i,boundaryDirection:ye,traceWidth:A,clearance:u}))&&y.length===0?pd([i],{viaDiameter:c,viaHoleDiameter:l,traceWidth:A,clearance:u,additionalObstacles:o.obstacles,blockingSegments:s.flatMap(be=>kb(be).map(et=>({connectionIndex:be.connectionIndex,segment:et}))),blockingVias:s.flatMap(be=>EO(be).map(et=>({connectionIndex:be.connectionIndex,...et.center,center:et.center,diameter:et.diameter,spanLayers:et.spanLayers})))}):null),bt=gt?[...Array.from({length:Re},(be,et)=>({label:`component-matched-vias-winding-${et}`,useViaInPad:!1,getViaHandedness:()=>0,getViaPoint:It=>gt.get(It.connectionIndex),maximumRouteOrderAttempts:1,windingOrderIndex:et,preferTargetDirectedLaneBias:!0})),{label:"component-matched-vias-fallback",useViaInPad:!1,getViaHandedness:()=>0,getViaPoint:be=>gt.get(be.connectionIndex),maximumRouteOrderAttempts:M,windingOrderIndex:0,preferTargetDirectedLaneBias:!0},...!r4(i)&&Te>1?Array.from({length:Te},(be,et)=>[!0,!1].map(It=>({label:`expanded-winding-${et}-${It}`,useViaInPad:!1,getViaHandedness:()=>0,getViaPoint:Bt=>gt.get(Bt.connectionIndex),maximumRouteOrderAttempts:1,windingOrderIndex:et,preferTargetDirectedLaneBias:It,reserveTerminalExitPoints:!It,allowLayerInterleaving:!0}))).flat():[],...k&&I&&!r4(i)&&Te===1&&i.connections.length>2?[!0,!1].map(be=>({label:`fixed-vias-reserved-exits-${be}`,useViaInPad:!1,getViaHandedness:()=>0,getViaPoint:et=>gt.get(et.connectionIndex),maximumRouteOrderAttempts:Math.min(Qe,M),windingOrderIndex:0,preferTargetDirectedLaneBias:be,reserveTerminalExitPoints:!0})):[]]:[],Ct=s.some(be=>be.termination.type==="plane"),kt=s.some(be=>be.termination.type==="boundary")&&!p?[...at,...Ee]:[...Ee,...at],it=he?Ct?[nt,...kt]:[...kt,nt]:kt,Yt=I?bt:[...bt,...it];if(!I&&!p&&i.connections.length>1&&i.connections.every(be=>be.sourceLayer!==r)&&le.includes(-1)&&le.includes(1)){const be=cbo(i.connections,i.direction);for(const et of le)for(const It of be)Yt.push({label:`local-dogbone-repair-${et}-${It.join("-")}`,useViaInPad:!1,getViaHandedness:()=>et,maximumRouteOrderAttempts:6,localDogboneRepair:!0,getViaPoint:Bt=>{const mt=j0e({preparedConnection:Bt,bus:i,targetLayer:r,traceWidth:A,viaDiameter:c,clearance:u,viaHandedness:et});return It.includes(Bt.connectionIndex)?i.direction==="up"||i.direction==="down"?{x:mt.x,y:2*Bt.sourcePoint.y-mt.y}:{x:2*Bt.sourcePoint.x-mt.x,y:mt.y}:mt}})}if(w&&ve&&F===void 0){const be=ANt(i,s.filter(et=>et.targetLayer===r)).exit;be!==ue.exit&&Yt.push(...Yt.map(et=>({...et,label:`${et.label}-layer-local-corner`,cornerExitLaneOffset:be})))}const pn=new Set;for(const be of Yt){const et=i.connections.map(Ze=>{const dt=be.getViaHandedness(Ze),Ut=ve?BB({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:Ze,cornerExitLaneOffset:be.cornerExitLaneOffset??ue.exit,traceWidth:A,viaDiameter:c,clearance:u,layerNames:a,targetLayer:r,windingOrderIndex:be.windingOrderIndex,cornerBandTargetTrackOffset:R}):tR({fixedBoundaryTracksByConnectionIndex:C,allowLayerInterleaving:be.allowLayerInterleaving,bus:i,connection:Ze,boundaryDirection:ye,traceWidth:A,clearance:u,layerNames:a,targetLayer:r,windingOrderIndex:be.windingOrderIndex});return{connection:Ze,viaPoint:be.getViaPoint?be.getViaPoint(Ze):be.useViaInPad?{x:Ze.sourcePoint.x,y:Ze.sourcePoint.y}:j0e({preparedConnection:Ze,bus:i,targetLayer:r,traceWidth:A,viaDiameter:c,clearance:u,viaHandedness:dt}),exitPoint:n1(Me,Ut,ye)}}),It=w||!!(be.getViaPoint&&!I);if(be.localDogboneRepair&&!pd([i],{viaDiameter:c,viaHoleDiameter:l,traceWidth:A,clearance:u,additionalObstacles:o.obstacles,fixedViaPointsByConnectionIndex:new Map(et.map(Ze=>[Ze.connection.connectionIndex,Ze.viaPoint])),blockingSegments:s.flatMap(Ze=>kb(Ze).map(dt=>({connectionIndex:Ze.connectionIndex,segment:dt}))),blockingVias:[...s.flatMap(Ze=>EO(Ze).map(dt=>({connectionIndex:Ze.connectionIndex,center:dt.center,diameter:dt.diameter,spanLayers:dt.spanLayers}))),...y.map(({via:Ze})=>({connectionIndex:-1,...Ze}))]}))continue;const Bt=be.getViaPoint&&Math.min(i.pitchX,i.pitchY)-2*(c/2+A/2+u)<A+u?2:1,mt=`${et.map(Ze=>`${Ze.connection.connectionIndex}:${Ze.viaPoint.x}:${Ze.viaPoint.y}:${Ze.exitPoint.x}:${Ze.exitPoint.y}`).join("|")}:${be.maximumRouteOrderAttempts??"all"}:${Bt}:${It}:${!!be.localDogboneRepair}:${!!be.preferTargetDirectedLaneBias}:${!!be.reserveTerminalExitPoints}`;if(pn.has(mt))continue;pn.add(mt);const st=BC({heuristicWeight:t.windingHeuristicWeight,srj:o,bus:i,targetLayer:r,terminals:et,acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:be.maximumRouteOrderAttempts,adaptiveRouteOrder:Q,alignGridToPads:It,includeReverseTargetRotation:be.localDogboneRepair,reservedVias:y,softReservedVias:x,reserveTerminalExitPoints:be.reserveTerminalExitPoints,gridStepDivisor:Bt,gridStep:t.windingGridStep,sourceEscapePaths:t.sourceEscapePaths,preferTargetDirectedLaneBias:be.preferTargetDirectedLaneBias,forbidEarlyExitBoundaryContact:O},I&&E?Math.min(2,Math.max(1,e-ge.length)):be.maximumRouteOrderAttempts===void 0?Math.min(2,e-ge.length):2,n);let xt=st.next();for(;!xt.done;)yield{phase:"via-minimal-winding",busId:i.busId,targetLayer:r,winding:xt.value},xt=st.next();const Xe=xt.value;for(const Ze of Xe){if(!Wh({plans:[...s,...Ze],srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})){if(Wh({plans:Ze,srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})&&_&&(_.push(Ze),f))return ge;continue}if(fe(Ze),ge.length>=e)return ge}}}if(ge.length===0&&B&&I&&i.connections.length<=2&&i.exitEdge&&i.connections.every(ye=>ye.sourceLayer===i.connections[0].sourceLayer&&ye.sourceLayer!==r)){const ye=i.connections[0].sourceLayer,Me=e6(i.exitEdge),ve=n6(i,Me),he=i.connections.map(at=>S&&r4(i)?BB({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:at,cornerExitLaneOffset:ue.exit,traceWidth:A,viaDiameter:c,clearance:u,layerNames:a,targetLayer:r,cornerBandTargetTrackOffset:R}):tR({fixedBoundaryTracksByConnectionIndex:C,bus:i,connection:at,boundaryDirection:Me,traceWidth:A,clearance:u,layerNames:a,targetLayer:r})),Qe=he.map(at=>n1(ve,at,Me)),Pe={...o,obstacles:o.obstacles.map(at=>{const nt=i.connections.find(gt=>at===gt.sourceObstacle||tn(at.center,gt.sourcePoint)<=1e-7&&at.layers.includes(gt.sourceLayer));return nt?{...at,connectedTo:[...at.connectedTo,nt.connection.name]}:at})},we=Math.max(c/2+u,Math.min(i.pitchX,i.pitchY)/2),Te=S?r4(i):void 0,Re=[1,2,3,4,5].flatMap(at=>{const nt=at*we,gt=he.map(bt=>n1(ve-t6(Me)*nt,bt,Me));return Te?[he.map(bt=>n1(ve-t6(Me)*nt,bt+(Te==="maximum"?nt:-nt),Me)),gt]:[gt]}),Ee={x:i.connections.reduce((at,nt)=>at+nt.sourcePoint.x,0)/i.connections.length,y:i.connections.reduce((at,nt)=>at+nt.sourcePoint.y,0)/i.connections.length},ke=[{x:-1,y:0,distance:Ee.x-Math.min(...i.xCoordinates)},{x:1,y:0,distance:Math.max(...i.xCoordinates)-Ee.x},{x:0,y:-1,distance:Ee.y-Math.min(...i.yCoordinates)},{x:0,y:1,distance:Math.max(...i.yCoordinates)-Ee.y}].toSorted((at,nt)=>at.distance-nt.distance),Ce=i.connections.length===2?ke.flatMap(at=>[3].map(nt=>i.connections.map(gt=>{const bt=I.get(gt.connectionIndex);return{x:bt.x+at.x*nt*i.pitchX,y:bt.y+at.y*nt*i.pitchY}}))):[],Le=i.connections.map(at=>I.get(at.connectionIndex)),Ye=[{distance:Ee.x-i.componentBounds.minX,axis:"x",value:i.componentBounds.minX-2*we},{distance:i.componentBounds.maxX-Ee.x,axis:"x",value:i.componentBounds.maxX+2*we},{distance:Ee.y-i.componentBounds.minY,axis:"y",value:i.componentBounds.minY-2*we},{distance:i.componentBounds.maxY-Ee.y,axis:"y",value:i.componentBounds.maxY+2*we}].toSorted((at,nt)=>at.distance-nt.distance).flatMap(({axis:at,value:nt})=>{const gt=at==="x"?"y":"x",bt=Le.reduce((it,Yt)=>it+Yt[gt],0)/Le.length,Ct=Le.map((it,Yt)=>({index:Yt,track:it[gt]})).toSorted((it,Yt)=>it.track-Yt.track||it.index-Yt.index),Dt=c+u,kt=Le.map((it,Yt)=>({...it,[at]:nt,[gt]:Ct.length===2&&Math.abs(Ct[1].track-Ct[0].track)<Dt?bt+(Ct.findIndex(pn=>pn.index===Yt)-.5)*Dt:it[gt]}));return kt.length===2?[kt,[kt[1],kt[0]]]:[kt]}),tt=i.connections.length===2&&!!r4(i),At=[...(tt?Ye:[]).map(at=>({points:at,boundarySide:!1})),...Ce.map(at=>({points:at,boundarySide:!1})),...Re.map(at=>({points:at,boundarySide:!0})),...(tt?[]:Ye).map(at=>({points:at,boundarySide:!1}))];for(const{points:at,boundarySide:nt}of At){const gt=i.connections.map((be,et)=>({connectionName:be.connection.name,via:{center:at[et],diameter:c,spanLayers:Mx({fromLayer:ye,toLayer:r,layerNames:a,allowBlindAndBuriedVias:p})}}));if(gt.some((be,et)=>gt.some((It,Bt)=>et!==Bt&&(tn(be.via.center,It.via.center)<c+u-1e-9||nt&&Cr(be.via.center,It.via.center,Qe[Bt])<c/2+A/2+u-1e-9)))||gt.some(({via:be})=>o.obstacles.some(et=>et.layers.some(It=>be.spanLayers.includes(It))&&wx(be.center,et)<be.diameter/2+u-1e-9)))continue;const bt=BC({heuristicWeight:t.windingHeuristicWeight,srj:Pe,bus:i,targetLayer:ye,terminals:i.connections.map((be,et)=>({connection:be,viaPoint:be.sourcePoint,exitPoint:at[et]})),acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:i.connections.length===1?3:6,softReservedVias:x,reservedVias:i.connections.length>1?[...y,...gt]:y,gridStepDivisor:2,allowSourceLayerRouting:!0,alignGridToPads:!0,forbidEarlyExitBoundaryContact:O},1,n);let Ct=bt.next();for(;!Ct.done;)yield{phase:"via-minimal-winding",busId:i.busId,targetLayer:ye,winding:Ct.value},Ct=bt.next();const Dt=Ct.value[0];if(!Dt||Dt.length!==i.connections.length)continue;let kt;if(!nt){const be=BC({heuristicWeight:t.windingHeuristicWeight,srj:o,bus:i,targetLayer:r,terminals:i.connections.map((It,Bt)=>({connection:It,viaPoint:at[Bt],exitPoint:Qe[Bt]})),acceptedPlans:s,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m,maximumRouteOrderAttempts:6,reservedVias:y,softReservedVias:x,gridStepDivisor:2,alignGridToPads:!0,forbidEarlyExitBoundaryContact:O},1,n);let et=be.next();for(;!et.done;)yield{phase:"via-minimal-winding",busId:i.busId,targetLayer:r,winding:et.value},et=be.next();if(kt=et.value[0],!kt)continue}const it=Dt.map((be,et)=>{const It=at[et],Bt=Qe[et],st=kt?kt[et].segments.filter(Ze=>Ze.layer===r):[{start:It,end:Bt,width:A,layer:r}],xt={center:It,diameter:c,holeDiameter:l,fromLayer:ye,toLayer:r,spanLayers:Mx({fromLayer:ye,toLayer:r,layerNames:a,allowBlindAndBuriedVias:p})},Xe=be.trace.route.filter(Ze=>Ze.route_type==="wire");return{...be,...S||i.connections.length>1||!nt?{sourceEscapeSegmentCount:be.segments.length}:{},targetLayer:r,exitPoint:Bt,via:xt,segments:[...be.segments,...st],length:be.length+st.reduce((Ze,dt)=>Ze+tn(dt.start,dt.end),0),trace:{...be.trace,route:[...Xe,{route_type:"via",...It,from_layer:ye,to_layer:r,via_diameter:c,via_hole_diameter:l},{route_type:"wire",...It,width:A,layer:r},...st.map(Ze=>({route_type:"wire",...Ze.end,width:A,layer:r}))]}}}),Yt=Wh({plans:[...s,...it],srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m}),pn=it.every(be=>y.every(et=>{const It=be.via;return et.connectionName===be.connectionName||m&&Px(o,et.connectionName,be.connectionName)?!0:It.spanLayers.some(Bt=>et.via.spanLayers.includes(Bt))&&tn(It.center,et.via.center)<(It.diameter+et.via.diameter)/2+u-1e-9?!1:be.segments.every(Bt=>!et.via.spanLayers.includes(Bt.layer)||Cr(et.via.center,Bt.start,Bt.end)>=et.via.diameter/2+A/2+u-1e-9)}));if(Yt&&pn)return fe(it),ge}}if(E||I||t.sourceEscapePaths||y.length>0)return ge;const pe=(ye,Me,ve,he)=>{if(ge.length>=e)return;if(ve>=ye.length){fe(he);return}const Qe=ye[ve],Pe=e$(i,Qe),Te=[Obo({bus:i,connection:Qe,traceWidth:A}),Gbo({bus:i,connection:Qe,targetUsesVia:j,interstitialEscape:ie,compactBusTracks:g,traceWidth:A,viaDiameter:c,clearance:u})].filter((Re,Ee,ke)=>ke.findIndex(Ce=>Math.abs(Ce-Re)<1e-9)===Ee).flatMap(Re=>Hbo({bus:i,connection:Qe,preferredTrack:Re,traceWidth:A,clearance:u})).filter((Re,Ee,ke)=>ke.findIndex(Ce=>Math.abs(Ce.value-Re.value)<1e-9)===Ee);for(let Re=0;Re<Te.length;Re++){const Ee=Te[Re],ke=$0e({preparedConnection:Qe,bus:i,targetLayer:r,track:Ee.value,exitAxis:U,layerNames:a,traceWidth:A,viaDiameter:c,viaHoleDiameter:l,viaHandedness:Me,interstitialEscape:ie,spreadLaneIndex:Math.min(Pe,i.connections.length-Pe-1),cornerExitLaneOffset:ue.exit,cornerLocalChannelLaneOffset:ue.localChannel,cornerBoundaryChannelLaneOffset:ue.boundaryChannel,clearance:u,terminateAtVia:!1,allowBlindAndBuriedVias:p,cornerBandTargetTrackOffset:R,fixedBoundaryTracksByConnectionIndex:C});if(X0e({plan:ke,otherPlans:[...s,...he],staticClearanceCache:h,blockingBusCounts:d,cacheKey:`boundary:${i.busId}:${r}:${Qe.connectionIndex}:${Me}:${Re}:${i.exitEdge??"legacy"}:${ue.exit}:${ue.localChannel}:${ue.boundaryChannel}:${R??0}:${C?.get(Qe.connectionIndex)??"default"}`,srj:o,sharedBoundary:i.sharedBoundary,clearance:u,allowBlindAndBuriedVias:p,allowSameNetMerges:m})&&(pe(ye,Me,ve+1,[...he,ke]),ge.length>=e||e===1))return}};for(const ye of le)for(const Me of gNt(i))if(pe(Me,ye,0,[]),ge.length>=e)return ge;return ge}function BO(t,e=1){const n=eue(t,e);let o=n.next();for(;!o.done;)o=n.next();return o.value}function nR(t){return BO(t,1)[0]??null}var Fg=1e-7,t$=(t,e,n)=>e==="left"?t.x-n.minX:e==="right"?n.maxX-t.x:e==="top"?n.maxY-t.y:t.y-n.minY;function Kbo(t,e,n,o){const i=t$(t.start,e,n),r=t$(t.end,e,n);if(Math.min(i,r)>o)return null;if(Math.max(i,r)<=o)return t;const s=(o-i)/(r-i),a={x:t.start.x+(t.end.x-t.start.x)*s,y:t.start.y+(t.end.y-t.start.y)*s};return{...t,...i>o?{start:a}:{end:a}}}function PPe(t){let e=t.segments.length-1;for(;e>0&&t.segments[e-1].layer===t.targetLayer;)e--;const n=t.segments.slice(e);return{first:e,points:n.length?[n[0].start,...n.map(o=>o.end)]:[]}}function mNt(t,e,n){const o=[...t.segments.slice(0,e),...n.slice(1).flatMap((r,s)=>tn(n[s],r)>Fg?[{start:n[s],end:r,layer:t.targetLayer,width:t.segments.at(-1).width}]:[])];let i=t.trace.route.length;for(;i>0;){const r=t.trace.route[i-1];if(r.route_type!=="wire"||r.layer!==t.targetLayer)break;i--}return{...t,segments:o,length:o.reduce((r,s)=>r+tn(s.start,s.end),0),trace:{...t.trace,route:[...t.trace.route.slice(0,i),...n.map(r=>({route_type:"wire",x:r.x,y:r.y,layer:t.targetLayer,width:t.segments.at(-1).width}))]}}}function Vbo(t,e){const n=[...t],o=(i,r)=>{const s=Math.abs(r.x-i.x),a=Math.abs(r.y-i.y);return s<Fg||a<Fg||Math.abs(s-a)<Fg};for(let i=Math.max(1,e);i<n.length-1;i++){const r=n[i-1],s=n[i],a=n[i+1],A=tn(r,s),c=tn(s,a);if(A<Fg||c<Fg||((s.x-r.x)*(a.x-s.x)+(s.y-r.y)*(a.y-s.y))/(A*c)>=-Fg)continue;if(o(r,a)){n.splice(i,1),i--;continue}const l=[];for(const g of["x","y"]){const h=(r[g]-s[g])/(a[g]-s[g]);h>Fg&&h<1-Fg&&l.push({x:s.x+(a.x-s.x)*h,y:s.y+(a.y-s.y)*h});const d=(a[g]-r[g])/(s[g]-r[g]);d>Fg&&d<1-Fg&&l.push({x:r.x+(s.x-r.x)*d,y:r.y+(s.y-r.y)*d})}const u=l.find(g=>o(r,g)&&o(g,a));u&&(n[i]=u)}return n}function zbo(t,e){const n=o=>{const i=new Map;for(const r of t)for(const s of PPe(r).points.slice(0,-1)){const a=(s[o]%e+e)%e,A=a<1e-6||e-a<1e-6?0:Math.round(a*1e6)/1e6;i.set(A,(i.get(A)??0)+1)}return[...i].sort((r,s)=>s[1]-r[1]||r[0]-s[0])[0]?.[0]??0};return{x:n("x"),y:n("y")}}function Jbo(t,e,n,o){const i=e==="left"||e==="right"?"y":"x",r=t.map(A=>A.exitPoint[i]).sort((A,c)=>A-c),s=[],a=(A,c)=>Math.abs(A-c-Math.round((A-c)/o)*o)<=Fg;r.length===1&&!a(r[0],n[i])&&s.push({coordinate:r[0],count:1});for(let A=1;A<r.length;A++)for(const c of[r[A-1],r[A]]){if(a(c,n[i]))continue;const l=s.find(u=>a(u.coordinate,c));l?l.count++:s.push({coordinate:c,count:1})}return[n,...s.sort((A,c)=>c.count-A.count||A.coordinate-c.coordinate).slice(0,3).map(({coordinate:A})=>({...n,[i]:A}))]}function Wbo(t,e,n,o,i){const r=o+i,s=t.map((l,u)=>u),a=l=>{for(;s[l]!==l;)l=s[l];return l},A=(l,u)=>{const g={x:u.x+(n==="left"?2*r:n==="right"?-2*r:0),y:u.y+(n==="bottom"?2*r:n==="top"?-2*r:0)};return l.some(h=>tu(h.start,h.end,u,g)<(h.width+o)/2+i-Fg)};for(let l=0;l<t.length;l++)for(let u=l+1;u<t.length;u++){if(a(l)===a(u))continue;(tn(t[l].exitPoint,t[u].exitPoint)<=2*r+Fg||A(e[l],t[u].exitPoint)||A(e[u],t[l].exitPoint)||e[l].some(h=>e[u].some(d=>tu(h.start,h.end,d.start,d.end)<(h.width+d.width)/2+i-Fg)))&&(s[a(u)]=a(l))}const c=new Map;return t.forEach((l,u)=>{const g=a(u),h=c.get(g)??[];h.push(l),c.set(g,h)}),[...c.values()]}function MPe(t){const{inputSrj:e,preparedBuses:n,reservedPlans:o=[],traceWidth:i,clearance:r}=t,s=i+r,a=t.gridStep??i;if(!(s>0)||!(a>0)||!Number.isFinite(a))throw new Error("FanoutSolver: boundary tail repair requires positive finite trace/grid spacing");const A=new Map(n.flatMap(d=>d.connections.map(p=>[p.connectionIndex,{bus:d,connection:p}]))),c=[...t.plans],l=new Map;for(const d of c){const p=A.get(d.connectionIndex);if(!p)throw new Error(`FanoutSolver: missing prepared boundary-tail connection ${d.connectionIndex}`);if(d.termination.type!=="boundary"||!d.exitEdge||Math.abs(t$(d.exitPoint,d.exitEdge,p.bus.sharedBoundary))>Fg)continue;const m=`${d.exitEdge}:${d.targetLayer}`,_=l.get(m)??[];_.push(d),l.set(m,_)}const u=[...l.values()];for(let d=0;d<u.length;d++){const p=u[d],m=p[0].exitEdge,_=p[0].targetLayer,f=A.get(p[0].connectionIndex).bus.sharedBoundary,I=Math.min(24*s,(m==="left"||m==="right"?f.maxX-f.minX:f.maxY-f.minY)/3),C=p.map(w=>w.segments.filter(M=>M.layer===_).flatMap(M=>Kbo(M,m,f,I)??[])),y=Wbo(p,C,m,i,r);if(y.length>1){u.splice(d,1,...y),d--;continue}const x=new Set;for(const w of p)PPe(w).points.slice(0,-1).some(M=>Math.abs(t$(M,m,f))<=Fg&&tn(M,w.exitPoint)>Fg)&&x.add(w);for(let w=0;w<p.length;w++)for(let M=w+1;M<p.length;M++)C[w].some(k=>C[M].some(R=>tu(k.start,k.end,R.start,R.end)<(k.width+R.width)/2+r-Fg))&&(x.add(p[w]),x.add(p[M]));if(!x.size)continue;let E=!0;for(;E;){E=!1;for(const w of p)!x.has(w)&&[...x].some(M=>{if(tn(w.exitPoint,M.exitPoint)<=2*s+Fg)return!0;const k={x:M.exitPoint.x+(m==="left"?2*s:m==="right"?-2*s:0),y:M.exitPoint.y+(m==="bottom"?2*s:m==="top"?-2*s:0)};return w.segments.some(R=>R.layer===_&&tu(R.start,R.end,M.exitPoint,k)<(R.width+i)/2+r-Fg)})&&(x.add(w),E=!0)}const B=p.filter(w=>x.has(w));if(B.length>32)return null;const S=Jbo(B,m,t.gridOrigin??zbo(B,a),a);let Q=null;for(const w of S){for(const M of[8,16,24]){const k=Math.min(M*s,I),R=m==="left"||m==="right"?"x":"y",F=m==="left"||m==="bottom"?1:-1,O=m==="left"?f.minX:m==="right"?f.maxX:m==="top"?f.maxY:f.minY,U=O+F*k,Y=w[R]+(F>0?Math.ceil((U-w[R])/a):Math.floor((U-w[R])/a))*a,W=(Y-O)*F,te=B.map(ve=>{const{first:he,points:Qe}=PPe(ve),Pe=Qe.findLastIndex(Ce=>t$(Ce,m,f)>=W-Fg);if(Pe<0){const Ce=ve.additionalVias?.at(-1)??ve.via;return!Ce||Ce.toLayer!==ve.targetLayer||!Qe[0]||tn(Ce.center,Qe[0])>Fg||he<(ve.sourceEscapeSegmentCount??1)?null:{plan:ve,first:he,prefix:[Qe[0]],point:Qe[0]}}if(Pe>=Qe.length-1)return null;const we=Qe[Pe],Te=Qe[Pe+1],Re=(Y-we[R])/(Te[R]-we[R]);if(!Number.isFinite(Re)||Re<-Fg||Re>1+Fg)return null;const Ee={x:we.x+(Te.x-we.x)*Re,y:we.y+(Te.y-we.y)*Re},ke=[...Qe.slice(0,Pe+1),...tn(we,Ee)>Fg?[Ee]:[]];return he+ke.length-1<(ve.sourceEscapeSegmentCount??1)?null:{plan:ve,first:he,prefix:ke,point:Ee}});if(te.some(ve=>!ve))continue;const j=te.filter(ve=>ve!==null),J=[...c.filter(ve=>!x.has(ve)),...o],oe=j.map(ve=>({...mNt(ve.plan,ve.first,ve.prefix),exitPoint:ve.point})),ie=[...J,...oe],ne=j.map(ve=>({connection:{...A.get(ve.plan.connectionIndex).connection,sourcePoint:{...ve.point,layer:_},sourceLayer:_},viaPoint:ve.point,exitPoint:ve.plan.exitPoint})),le={...f};m==="left"&&(le.maxX=Math.min(f.maxX,Y+3*s)),m==="right"&&(le.minX=Math.max(f.minX,Y-3*s)),m==="bottom"&&(le.maxY=Math.min(f.maxY,Y+3*s)),m==="top"&&(le.minY=Math.max(f.minY,Y-3*s));const ge=R==="x"?"y":"x",_e=ne.flatMap(ve=>[ve.viaPoint[ge],ve.exitPoint[ge]]);ge==="x"?(le.minX=Math.max(le.minX,Math.min(..._e)-3*s),le.maxX=Math.min(le.maxX,Math.max(..._e)+3*s)):(le.minY=Math.max(le.minY,Math.min(..._e)-3*s),le.maxY=Math.min(le.maxY,Math.max(..._e)+3*s));const ue={...A.get(B[0].connectionIndex).bus,connections:ne.map(ve=>ve.connection),sharedBoundary:le},fe=BC({...t,srj:e,bus:ue,terminals:ne,targetLayer:_,sourceEscapePaths:void 0,acceptedPlans:ie,reservedVias:ie.flatMap(ve=>[ve.via,...ve.additionalVias??[],ve.planeEndpointVia].filter(he=>!!he).map(he=>({connectionName:ve.connectionName,via:he}))),gridStep:a,gridOrigin:w,gridStepDivisor:2,alignGridToPads:!0,heuristicWeight:2,maximumRouteOrderAttempts:72,reserveTerminalExitPoints:!0,adaptiveRouteOrder:!0,allowSourceLayerRouting:!0,forbidEarlyExitBoundaryContact:!0},1,!1);let pe=fe.next();for(;!pe.done;)pe=fe.next();const ye=pe.value[0];if(!ye)continue;const Me=j.map(ve=>{const he=ye.find(Pe=>Pe.connectionIndex===ve.plan.connectionIndex);if(!he||he.via||he.additionalVias?.length)throw new Error("FanoutSolver: boundary-tail repair added a physical via");const Qe=Vbo([...ve.prefix,...he.segments.map(Pe=>Pe.end)],ve.prefix.length-1);return mNt(ve.plan,ve.first,Qe)});if(Wh({plans:Me,srj:{...e,traces:[...e.traces??[],...J.flatMap(ve=>[ve.trace,...ve.planeEndpointTrace?[ve.planeEndpointTrace]:[]])]},sharedBoundary:f,clearance:r,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges})){Q=Me;break}}if(Q)break}if(!Q)return null;for(const w of Q)c[c.findIndex(M=>M.connectionIndex===w.connectionIndex)]=w}const g=[...c,...o];if(e.traces?.length&&g.length){const d=n.map(m=>m.sharedBoundary);if(!Z0e({srj:e,sharedBoundary:{minX:Math.min(...d.map(m=>m.minX)),maxX:Math.max(...d.map(m=>m.maxX)),minY:Math.min(...d.map(m=>m.minY)),maxY:Math.max(...d.map(m=>m.maxY))},clearance:r,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges})(g))return null}return qu({inputSrj:e,routedSrj:{...e,traces:[...g.flatMap(d=>[d.trace,...d.planeEndpointTrace?[d.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias}).valid?c:null}var Da=1e-7;function bO(t,e,n,o){const i=new Float64Array(e.length+1),r=new Int32Array(e.length);for(let A=0;A<e.length;A++){const c=e[A],l=e[A-1];i[A+1]=i[A]+tn(c.start,c.end),r[A]=A===0?0:r[A-1]+ +(l.layer!==c.layer||tn(l.end,c.start)>Da)}const s=[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(A=>!!A),a=(A,c)=>{if(r[A]!==r[c])return!1;let l=0,u=0;for(let g=A;g<=c;g++){const h=e[g],d=h.end.x-h.start.x,p=h.end.y-h.start.y;if(Math.abs(d)>Da){const m=Math.sign(d);if(l&&l!==m)return!1;l=m}if(Math.abs(p)>Da){const m=Math.sign(p);if(u&&u!==m)return!1;u=m}}return!0};for(const[A,c]of e.entries())if(!(o&&!o.has(A))&&!(!o&&t.segments.some(l=>l.layer===c.layer&&l.width===c.width&&Cr(c.start,l.start,l.end)<=Da&&Cr(c.end,l.start,l.end)<=Da))){for(const[l,u]of e.entries()){if(u.layer!==c.layer)continue;const g=(c.width+u.width)/2+n,h=Math.min(A,l),d=Math.max(A,l);if(!(r[A]===r[l]&&Math.max(0,i[d]-i[h+1])<=g+Da)&&!Zm(c,u,n)&&!a(h,d))return!1}for(const l of s){if(!l.spanLayers.includes(c.layer))continue;const u=(c.width+l.diameter)/2+n;if(Cr(l.center,c.start,c.end)>=u-Da||[c.start,c.end].some(h=>tn(h,l.center)<=Da))continue;const g=h=>{let d=h===-1?c.start:c.end;const p=h===-1?c.end:c.start;if(tn(d,l.center)>u+Da||(d.x-l.center.x)*(p.x-d.x)+(d.y-l.center.y)*(p.y-d.y)<-Da)return!1;for(let m=A+h;m>=0&&m<e.length;m+=h){const _=e[m];if(_.layer!==c.layer||tn(d,h===-1?_.end:_.start)>Da)return!1;const f=h===-1?_.start:_.end;if(tn(f,l.center)>u+Da||(f.x-l.center.x)*(f.x-d.x)+(f.y-l.center.y)*(f.y-d.y)>Da)return!1;if(d=f,tn(d,l.center)<=Da)return!0}return!1};if(!g(-1)&&!g(1))return!1}}return!0}function n$(t,e,n,o,i=!1,r=t.traceWidth/4){const{inputSrj:s,layerNames:a,traceWidth:A,clearance:c}=t,l=e.trace.route.findIndex(y=>y.route_type==="via");if(l<0)return null;const u=e.trace.route.slice(l+1).flatMap(y=>y.route_type==="wire"?[{x:y.x,y:y.y,z:a.indexOf(y.layer)}]:[]);for(let y=1;i&&y<u.length-1;y++){const x=u[y-1],E=u[y],B=u[y+1];if(x.z!==E.z||E.z!==B.z)continue;((E.x-x.x)*(B.x-E.x)+(E.y-x.y)*(B.y-E.y))/(tn(x,E)*tn(E,B))<-Da&&(u.splice(y,1),y--)}const g=Z7(s,!1),h=new qj([...n.flatMap(y=>[...y.segments,...y.planeEndpointSegments??[]]),...g.flatMap(y=>y.segments)]),d=[...n.flatMap(y=>[y.via,...y.additionalVias??[],y.planeEndpointVia].filter(x=>!!x)),...g.flatMap(y=>y.vias)],p=eR({points:u,chamfer:r,repairReversingDiagonalCorners:!0,segmentIsClear:(y,x)=>{const E={start:y,end:x,layer:a[y.z],width:A};for(const B of[y,x]){const S=o.sharedBoundary;if(B.x<S.minX-Da||B.x>S.maxX+Da||B.y<S.minY-Da||B.y>S.maxY+Da||(Math.abs(B.x-S.minX)<Da||Math.abs(B.x-S.maxX)<Da||Math.abs(B.y-S.minY)<Da||Math.abs(B.y-S.maxY)<Da)&&tn(B,e.exitPoint)>Da)return!1}return s.obstacles.every(B=>!B.layers.includes(E.layer)||Tl(E,B)>=A/2+c-1e-9)&&h.querySegment(E,c).every(B=>Zm(E,B,c))&&d.every(B=>!B.spanLayers.includes(E.layer)||Cr(B.center,y,x)>=(A+B.diameter)/2+c-1e-9)}});if(!p)return null;const m=e.trace.route.slice(0,l+1);for(let y=0;y<p.length;y++){const x=p[y],E=p[y-1];if(E&&E.z!==x.z){const B=e.trace.route.find(S=>S.route_type==="via"&&tn(S,x)<Da&&S.from_layer===a[E.z]&&S.to_layer===a[x.z]);if(!B)return null;m.push(B)}m.push({route_type:"wire",x:x.x,y:x.y,layer:a[x.z],width:A})}m[m.length-1]=e.trace.route.at(-1);const _={...e.trace,route:m},f=J0e(s,_,!1).segments,I=e.sourceEscapeSegmentCount??1,C=[...e.segments.slice(0,I),...f.slice(I)];return bO(e,C,c)?{...e,trace:_,segments:C,length:C.reduce((y,x)=>y+tn(x.start,x.end),0)}:null}function mw(t){for(let e=0;e<t.length;e++){const n=t[e],o=n.end.x-n.start.x,i=n.end.y-n.start.y,r=Math.hypot(o,i);if(Math.min(Math.abs(o),Math.abs(i),Math.abs(Math.abs(o)-Math.abs(i)))>Da)return!1;const s=t[e+1];if(s&&tn(n.end,s.start)>Da)return!1;if(!s||s.layer!==n.layer||r<Da)continue;const a=s.end.x-s.start.x,A=s.end.y-s.start.y,c=Math.hypot(a,A);if(!(c<Da)&&(o*a+i*A)/(r*c)<Math.SQRT1_2-Da)return!1}return!0}function o$(t,e){const n=e.sharedBoundary;return t.segments.every(o=>[o.start,o.end].every(i=>i.x<n.minX-Da||i.x>n.maxX+Da||i.y<n.minY-Da||i.y>n.maxY+Da?!1:t.termination.type!=="boundary"?!0:!(Math.abs(i.x-n.minX)<Da||Math.abs(i.x-n.maxX)<Da||Math.abs(i.y-n.minY)<Da||Math.abs(i.y-n.maxY)<Da)||tn(i,t.exitPoint)<Da))}function jbo(t,e,n,o,i=!1){const r=e.sourceEscapeSegmentCount??1;if(e.termination.type!==(i?"boundary":"plane")||!e.via||!i&&e.additionalVias?.length||e.planeEndpointTrace||e.planeEndpointSegments?.length||e.planeEndpointVia||!i&&e.segments.length!==r)return null;const s=e.segments.slice(0,r);if(!s.length||s.some(E=>E.layer!==e.sourceLayer)||tn(s[0].start,e.sourcePoint)>Da||tn(s.at(-1).end,e.via.center)>Da)return null;const a=o.connections.find(E=>E.connectionIndex===e.connectionIndex);if(!a?.sourceObstacle)return null;const A=e.trace.route.findIndex(E=>E.route_type==="via");if(A<1)return null;const{inputSrj:c,traceWidth:l,clearance:u,layerNames:g}=t,h=E=>e.termination.type==="plane"&&Px(c,e.connectionName,E),d=n.filter(E=>E.termination.type!=="plane"||!h(E.connectionName)),p=Z7(c,!1).filter(E=>!h(E.connectionName)),m=new qj([...e.segments.slice(r),...d.flatMap(E=>[...E.segments,...E.planeEndpointSegments??[]]),...p.flatMap(E=>E.segments)]),_=[...e.additionalVias??[],...d.flatMap(E=>[E.via,...E.additionalVias??[],E.planeEndpointVia].filter(B=>!!B)),...p.flatMap(E=>E.vias)],f=eR({points:[e.sourcePoint,...s.map(E=>E.end)].map(E=>({...E,z:g.indexOf(e.sourceLayer)})),chamfer:l/4,repairReversingDiagonalCorners:!0,segmentIsClear:(E,B)=>{const S={start:E,end:B,layer:e.sourceLayer,width:l},Q=o.sharedBoundary;return[E,B].some(w=>w.x<Q.minX||w.x>Q.maxX||w.y<Q.minY||w.y>Q.maxY)?!1:c.obstacles.every(w=>!w.layers.includes(e.sourceLayer)||Tl(S,w)>=l/2+u-1e-9||w===a.sourceObstacle&&IO(E,w,l/2+u)&&(E.x-a.sourcePoint.x)*(B.x-E.x)+(E.y-a.sourcePoint.y)*(B.y-E.y)>=-Da||w!==a.sourceObstacle&&e.termination.type==="plane"&&n4(c,w,e.connectionName)?!0:jj({inputSrj:c,segment:S,bodyObstacle:w,connectionName:e.connectionName}))&&m.querySegment(S,u).every(w=>Zm(S,w,u))&&_.every(w=>!w.spanLayers.includes(S.layer)||Cr(w.center,E,B)>=(l+w.diameter)/2+u-1e-9)}});if(!f)return null;const I={...e.trace,route:[e.trace.route[0],...f.slice(1).map(E=>({route_type:"wire",x:E.x,y:E.y,layer:e.sourceLayer,width:l})),...e.trace.route.slice(A)]},C=J0e(c,{...I,route:I.route.slice(0,f.length)},!1).segments,y=[...C,...e.segments.slice(r)];let x=!1;for(const E of C){const B=Tl(E,a.sourceObstacle);if(x&&B<l/2+u-1e-9)return null;wx(E.end,a.sourceObstacle)>=l/2+u-1e-9&&(x=!0)}return!mw(C)||!bO(e,y,u,new Set(C.map((E,B)=>B)))?null:{...e,trace:I,segments:y,sourceEscapeSegmentCount:C.length,length:[...y,...e.planeEndpointSegments??[]].reduce((E,B)=>E+tn(B.start,B.end),0)}}function DPe(t){const e=new Map(t.preparedBuses.map(A=>[A.busId,A]));if(new Set(t.plans.map(A=>A.connectionIndex)).size!==t.plans.length)return null;let n=[...t.plans],o=!1;if(t.repairPlaneSourceCorners||t.repairSignalSourceCorners)for(let A=0;A<n.length;A++){const c=n[A];if(mw(c.segments.slice(0,c.sourceEscapeSegmentCount??1)))continue;const l=e.get(c.busId);if(!l||(c.termination.type==="plane"?!t.repairPlaneSourceCorners:!t.repairSignalSourceCorners))return null;const u=jbo(t,c,n.filter((g,h)=>h!==A),l,c.termination.type==="boundary");if(!u)return null;n[A]=u,o=!0}if(o&&t.rematchRepairedLengths){const A=t.rematchRepairedLengths(n);if(!A)return null;n=A}const i=[...n],r=fPe(t.inputSrj);for(const A of n){if(!e.has(A.busId))throw new Error("Final normalization requires each original prepared bus");if(!mw(A.segments.slice(0,A.sourceEscapeSegmentCount??1))||!o$({...A,segments:A.segments.slice(0,A.sourceEscapeSegmentCount??1)},e.get(A.busId))||!mw(A.planeEndpointSegments??[]))return null}if(n.some(A=>!o$(A,e.get(A.busId)))){const A=MPe({...t,plans:n,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});if(!A)return null;if(n=A,t.rematchRepairedLengths){const c=t.rematchRepairedLengths(n);if(!c)return null;n=c}}for(let A=0;A<n.length;A++){const c=n[A];if(mw(c.segments)&&o$(c,e.get(c.busId)))continue;const l=e.get(c.busId);let u=null,g=null;for(let h=t.traceWidth/4;h>=1e-6;h=Math.max(1e-6,h/4)){const d=n$(t,c,n.filter((p,m)=>m!==A),l,!1,h);if(d){g??=d;const p=n.filter(_=>_.busId===l.busId).map(_=>_===c?d.length:_.length);if(r.every(_=>{if(!_.connectionIndices.includes(c.connectionIndex))return!0;const f=_.connectionIndices.map(C=>n.find(y=>y.connectionIndex===C));if(f.some(C=>!C))return!0;const I=f.map(C=>C===c?d.length:C.length);return Math.abs(I[0]-I[1])<=_.lengthTolerance+Da})&&(l.maxLengthSkew===void 0||Math.max(...p)-Math.min(...p)<=l.maxLengthSkew+Da)){u=d;break}}if(h===1e-6)break}if(!u&&g&&t.rematchRepairedLengths){const h=t.rematchRepairedLengths(n.map((p,m)=>m===A?g:p)),d=h?.find(p=>p.connectionIndex===c.connectionIndex);h&&d&&mw(d.segments)&&(n=h,u=d)}if(!u)return null;n[A]=u}for(let A=0;A<n.length;A++){const c=n[A],l=i.find(d=>d.connectionIndex===c.connectionIndex);if(!l||c.targetLayer!==l.targetLayer||tn(c.exitPoint,l.exitPoint)>Da||JSON.stringify(c.via)!==JSON.stringify(l.via)||JSON.stringify(c.additionalVias)!==JSON.stringify(l.additionalVias)||!mw(c.segments)||!o$(c,e.get(c.busId)))return null;if(c===l)continue;const u=l.trace.route.findIndex(d=>d.route_type==="via"),g=c.trace.route.findIndex(d=>d.route_type==="via");if(u<0||g<0)return null;const h=l.sourceEscapeSegmentCount??1;n[A]={...c,sourcePoint:l.sourcePoint,via:l.via,additionalVias:l.additionalVias,exitPoint:l.exitPoint,sourceEscapeSegmentCount:h,segments:[...l.segments.slice(0,h),...c.segments.slice(c.sourceEscapeSegmentCount??1)],trace:{...l.trace,route:[...l.trace.route.slice(0,u+1),...c.trace.route.slice(g+1)]}}}for(const A of t.preparedBuses){const c=n.filter(l=>l.busId===A.busId);if(c.length!==A.connections.length||c.some(l=>!mw(l.segments)||!o$(l,A)))return null;if(A.maxLengthSkew!==void 0&&Math.max(...c.map(l=>l.length))-Math.min(...c.map(l=>l.length))>A.maxLengthSkew+Da)return null}const s=new Map(n.map(A=>[A.connectionIndex,A]));for(const A of r){const c=A.connectionIndices.map(u=>s.get(u));if(c.some(u=>!u))continue;const l=c.map(u=>[...u.segments,...u.planeEndpointSegments??[]].reduce((g,h)=>g+tn(h.start,h.end),0));if(l.some(u=>!Number.isFinite(u))||Math.abs(l[0]-l[1])>A.lengthTolerance+Da)return null}if(t.inputSrj.traces?.length&&n.length){const A=t.preparedBuses.map(l=>l.sharedBoundary);if(!Z0e({srj:t.inputSrj,sharedBoundary:{minX:Math.min(...A.map(l=>l.minX)),maxX:Math.max(...A.map(l=>l.maxX)),minY:Math.min(...A.map(l=>l.minY)),maxY:Math.max(...A.map(l=>l.maxY))},clearance:t.clearance,allowBlindAndBuriedVias:!1,allowSameNetPlaneMerges:!0})(n))return null}return qu({inputSrj:t.inputSrj,routedSrj:{...t.inputSrj,traces:[...n.flatMap(A=>[A.trace,...A.planeEndpointTrace?[A.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?n:null}function $bo(t){const{inputSrj:e,plans:n,unroutedSourceBuses:o,clearance:i}=t,r=new Map(n.map(I=>[I.connectionIndex,I])),s=Rb(e.layerCount),a=o.filter(I=>I.termination.type==="boundary"&&I.connections.length>0&&I.connections.every(C=>{const y=r.get(C.connectionIndex),x=y?.segments[0],E=y?.via;return y?.connectionName===C.connection.name&&y.termination.type==="boundary"&&y.segments.length===1&&(y.sourceEscapeSegmentCount??1)===1&&!y.additionalVias?.length&&!y.planeEndpointTrace&&!y.planeEndpointVia&&x&&x.layer===C.sourceLayer&&E&&E.fromLayer===C.sourceLayer&&E.toLayer===y.targetLayer&&E.toLayer!==E.fromLayer&&E.spanLayers.length===s.length&&s.every(B=>E.spanLayers.includes(B))&&tn(x.start,C.sourcePoint)<1e-7&&tn(x.end,E.center)<1e-7&&tn(y.exitPoint,E.center)<1e-7})),A=a[0]?.connections[0];if(!A)return null;const c=r.get(A.connectionIndex),l=c.via,u=c.segments[0].width;if(a.some(I=>I.connections.some(C=>{const y=r.get(C.connectionIndex);return y.via.diameter!==l.diameter||y.via.holeDiameter!==l.holeDiameter||y.segments[0].width!==u})))return null;const g=new Set(a.flatMap(I=>I.connections.map(C=>C.connectionIndex))),h=n.filter(I=>!g.has(I.connectionIndex)),d=Z7(e,!1),p=pd(a,{traceWidth:u,clearance:i,viaDiameter:l.diameter,viaHoleDiameter:l.holeDiameter,maximumSearchStates:1e4,preferredViaPointsByConnectionIndex:new Map(n.filter(I=>g.has(I.connectionIndex)).map(I=>[I.connectionIndex,I.via.center])),additionalObstacles:e.obstacles,blockingSegments:[...h.flatMap(I=>[...I.segments,...I.planeEndpointSegments??[]].map(C=>({connectionIndex:I.connectionIndex,segment:C}))),...d.flatMap(I=>I.segments.map(C=>({connectionIndex:-1,segment:C})))],blockingVias:[...h.flatMap(I=>[I.via,...I.additionalVias??[],I.planeEndpointVia].filter(C=>C!==void 0).map(C=>({connectionIndex:I.connectionIndex,...C}))),...d.flatMap(I=>I.vias.map(C=>({connectionIndex:-1,...C})))]});if(!p)return null;const m=new Map;for(const I of a)for(const C of I.connections){const y=r.get(C.connectionIndex),x=p.get(C.connectionIndex);if(tn(x,y.via.center)<1e-7)continue;const E=x.x-C.sourcePoint.x,B=x.y-C.sourcePoint.y;if(Math.min(Math.abs(E),Math.abs(B),Math.abs(Math.abs(E)-Math.abs(B)))>1e-7)return null;m.set(C.connectionIndex,i4({bus:I,terminal:{connection:C,viaPoint:x,exitPoint:x},targetLayer:y.targetLayer,targetLayerPoints:[x],layerNames:s,traceWidth:u,viaDiameter:l.diameter,viaHoleDiameter:l.holeDiameter,allowBlindAndBuriedVias:!1}))}if(!m.size)return null;const _=n.map(I=>m.get(I.connectionIndex)??I);return Wh({plans:_,srj:e,sharedBoundary:a[0].sharedBoundary,clearance:i,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1})&&qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],..._.flatMap(I=>[I.trace,...I.planeEndpointTrace?[I.planeEndpointTrace]:[]])]},clearance:i,allowBlindAndBuriedVias:!1}).valid?_:null}var Jr=1e-6;function Vy(t,e){return tn(t,e)<=Jr}function tue(t){return[t.via,...t.additionalVias??[]].filter(e=>e!==void 0)}function qbo(t,e){const n=e[0];if(!n)return null;const o=t.trace.route.find(g=>g.route_type==="wire"),i=t.trace.route.findLast(g=>g.route_type==="wire"),r=g=>{if(g?.route_type!=="wire")return{};const h={...g};return delete h.route_type,delete h.x,delete h.y,delete h.width,delete h.layer,h},s=tue(t),A=Vy(n.start,t.sourcePoint)&&n.layer!==t.sourceLayer&&s.some(g=>Vy(g.center,n.start)&&g.spanLayers.includes(t.sourceLayer)&&g.spanLayers.includes(n.layer))?t.sourceLayer:n.layer,c=[{...r(o),route_type:"wire",...n.start,width:n.width,layer:A}];let l=n.start,u=A;for(const[g,h]of e.entries()){if(!Vy(l,h.start))return null;if(u!==h.layer){const d=s.find(p=>Vy(p.center,h.start)&&p.spanLayers.includes(u)&&p.spanLayers.includes(h.layer));if(!d)return null;c.push({route_type:"via",...h.start,from_layer:u,to_layer:h.layer,via_diameter:d.diameter,via_hole_diameter:d.holeDiameter}),c.push({route_type:"wire",...h.start,width:h.width,layer:h.layer}),u=h.layer}c.push({...g===e.length-1?r(i):{},route_type:"wire",...h.end,width:h.width,layer:h.layer}),l=h.end}return c}function bB(t,e,n=!1){const o=qbo(t,e);if(!o)return null;const i=[...e,...t.planeEndpointSegments??[]].reduce((s,a)=>s+tn(a.start,a.end),0),r=e.findIndex(s=>s.layer!==t.sourceLayer);return{...t,...n&&t.sourceEscapeSegmentCount!==void 0&&r>=0?{sourceEscapeSegmentCount:r}:{},trace:{...t.trace,route:o},segments:e,length:i}}function nue(t,e,n){const o=[...tue(t),...t.planeEndpointVia?[t.planeEndpointVia]:[]];for(const i of e){for(const a of o)if(a!==i&&i.spanLayers.some(A=>a.spanLayers.includes(A))&&tn(i.center,a.center)<(i.diameter+a.diameter)/2+n-1e-9)return!1;const r=t.segments.flatMap((a,A)=>{const c=t.segments[A+1];return a.layer===i.fromLayer&&c?.layer===i.toLayer&&Vy(a.end,i.center)&&Vy(c.start,i.center)?[A]:[]});if(r.length!==1)return!1;const s=new Set;for(const a of[-1,1]){let A=i.center,c=0;const l=a===-1?i.fromLayer:i.toLayer;for(let u=r[0]+(a===1?1:0);u>=0&&u<t.segments.length;u+=a){const g=t.segments[u],h=a===-1?g.end:g.start,d=a===-1?g.start:g.end,p=(i.diameter+g.width)/2+n;if(g.layer!==l||!Vy(A,h)||c>p+Jr)break;s.add(u),c+=tn(h,d),A=d}}for(const[a,A]of[...t.segments,...t.planeEndpointSegments??[]].entries())if(!(s.has(a)||!i.spanLayers.includes(A.layer))&&Cr(i.center,A.start,A.end)<(i.diameter+A.width)/2+n-1e-9)return!1}return!0}function*Xbo(t){const{plan:e,bus:n,layerNames:o,clearance:i,workBudget:r}=t;if(!e.via||tue(e).length>5)return;const s=n.allowedLayers??o,a=(n.routableEscapeLayers??s).filter(u=>s.includes(u)&&o.includes(u)&&u!==e.sourceLayer&&u!==e.targetLayer),A=[];for(const u of e.segments){const g=A.at(-1);if(g?.layer===u.layer&&u.layer===e.targetLayer){const h=g.end.x-g.start.x,d=g.end.y-g.start.y,p=u.end.x-u.start.x,m=u.end.y-u.start.y;if(Math.abs(h*m-d*p)<=Jr*Math.hypot(h,d)*Math.hypot(p,m)&&h*p+d*m>0){g.end=u.end;continue}}A.push({...u})}const c=bB(e,A);if(!c)return;const l=(u,g,h)=>({center:u,fromLayer:g,toLayer:h,diameter:e.via.diameter,holeDiameter:e.via.holeDiameter,spanLayers:o});for(const u of a)for(const g of[!0,!1])if(!(g&&(c.additionalVias?.length||c.via.toLayer!==c.targetLayer))){for(const[h,d]of c.segments.entries())if(d.layer===c.targetLayer&&!(tn(d.start,d.end)<=Jr))for(let p=0;p<37;p++){const m=.05+p*.025;if(!g&&m>=.5)break;oR(r);const _=x=>({x:d.start.x+(d.end.x-d.start.x)*x,y:d.start.y+(d.end.y-d.start.y)*x}),f=_(m),I=_(1-m);if(!g&&tn(f,I)<e.via.diameter+i)continue;const C=g?[l(I,u,d.layer)]:[l(f,d.layer,u),l(I,u,d.layer)],y=g?bB({...c,via:{...c.via,toLayer:u},additionalVias:C},[...c.segments.slice(0,h).map(x=>x.layer===c.targetLayer?{...x,layer:u}:x),{...d,end:I,layer:u},{...d,start:I},...c.segments.slice(h+1)]):bB({...c,additionalVias:[...c.additionalVias??[],...C]},[...c.segments.slice(0,h),{...d,end:f},{...d,start:f,end:I,layer:u},{...d,start:I},...c.segments.slice(h+1)]);y&&nue(y,C,i)&&(yield{plan:y,tuningLayer:u,addedVias:C})}}}function _Nt(t,e,n){return t.x<e.minX-n||t.x>e.maxX+n||t.y<e.minY-n||t.y>e.maxY+n}function Zbo(t){const{segment:e,bounds:n,margin:o}=t,i={minX:n.minX-o,maxX:n.maxX+o,minY:n.minY-o,maxY:n.maxY+o},r=e.end.x-e.start.x,s=e.end.y-e.start.y,a=[0,1],A=l=>{if(l<=Jr||l>=1-Jr)return;const u={x:e.start.x+r*l,y:e.start.y+s*l};u.x<i.minX-Jr||u.x>i.maxX+Jr||u.y<i.minY-Jr||u.y>i.maxY+Jr||a.push(l)};Math.abs(r)>Jr&&(A((i.minX-e.start.x)/r),A((i.maxX-e.start.x)/r)),Math.abs(s)>Jr&&(A((i.minY-e.start.y)/s),A((i.maxY-e.start.y)/s));const c=a.toSorted((l,u)=>l-u).filter((l,u,g)=>u===0||Math.abs(l-g[u-1])>Jr);return c.slice(1).map((l,u)=>{const g=c[u];return{...e,start:{x:e.start.x+r*g,y:e.start.y+s*g},end:{x:e.start.x+r*l,y:e.start.y+s*l}}})}function fNt(t){return t.componentObstacles.reduce((e,n)=>({minX:Math.min(e.minX,n.center.x-n.width/2),maxX:Math.max(e.maxX,n.center.x+n.width/2),minY:Math.min(e.minY,n.center.y-n.height/2),maxY:Math.max(e.maxY,n.center.y+n.height/2)}),{minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY})}function NPe(t,e){return t.layer!==e.layer||Math.min(t.start.x,t.end.x)>Math.max(e.start.x,e.end.x)+Jr||Math.min(e.start.x,e.end.x)>Math.max(t.start.x,t.end.x)+Jr||Math.min(t.start.y,t.end.y)>Math.max(e.start.y,e.end.y)+Jr||Math.min(e.start.y,e.end.y)>Math.max(t.start.y,t.end.y)+Jr?!1:tu(t.start,t.end,e.start,e.end)<=Jr}function INt(t){let e;return(n,o,i)=>{if(!e){e=[];for(let a=0;a<t.length;a++)for(let A=a+2;A<t.length;A++)NPe(t[a],t[A])&&e.push([a,A])}const r=o+i-1,s=(a,A)=>A===a+2&&Vy(n[a].end,n[A].start);for(const[a,A]of e){if(a===o||A===o)continue;const c=a>o?a+i-1:a,l=A>o?A+i-1:A;if(!s(c,l))return!0}for(let a=o;a<=r;a++)for(let A=0;A<n.length;A++){if(Math.abs(a-A)<2||A>=o&&A<a)continue;const c=Math.min(a,A),l=Math.max(a,A);if(!s(c,l)&&NPe(n[c],n[l]))return!0}return!1}}function RPe(t){const{plan:e,segments:n,replacementStartIndex:o,replacementSegmentCount:i,clearance:r}=t,s=o+i-1,a=tue(e),A=new Int32Array(n.length),c=new Float64Array(n.length+1);for(let u=0;u<n.length;u++){const g=n[u],h=n[u-1];A[u]=u===0?0:A[u-1]+ +(h.layer!==g.layer||!Vy(h.end,g.start)),c[u+1]=c[u]+tn(g.start,g.end)}const l=(u,g)=>{if(u===g)return 0;if(A[u]!==A[g])return Number.POSITIVE_INFINITY;const h=Math.min(u,g),d=Math.max(u,g);return Math.max(0,c[d]-c[h+1])};for(let u=o;u<=s;u++){const g=n[u],h=e.segments[o];if(!(g.layer===h.layer&&g.width===h.width&&Cr(g.start,h.start,h.end)<=Jr&&Cr(g.end,h.start,h.end)<=Jr)){for(const[d,p]of n.entries()){const m=g.width/2+p.width/2+r;if(!(l(u,d)<=m+Jr)&&!Zm(g,p,r))return!1}for(const d of a){if(!d.spanLayers.includes(g.layer)||Vy(d.center,g.start)||Vy(d.center,g.end))continue;const p=d.diameter/2+g.width/2+r,m=_=>{let f=_===-1?g.start:g.end,I=0;for(let C=u+_;C>=0&&C<n.length;C+=_){const y=n[C];if(y.layer!==g.layer)return!1;const x=_===-1?y.end:y.start;if(!Vy(f,x)||(I+=tn(y.start,y.end),I>p+Jr))return!1;if(f=_===-1?y.start:y.end,Vy(f,d.center))return!0}return!1};if(Cr(d.center,g.start,g.end)<p-Jr&&!m(-1)&&!m(1))return!1}}}return!0}function CNt(t,e){return t.x>=e.minX-Jr&&t.x<=e.maxX+Jr&&t.y>=e.minY-Jr&&t.y<=e.maxY+Jr}function sI(t,e,n){return{x:t.x+e.x*n,y:t.y+e.y*n}}function eSo(t){const{segment:e,toothCount:n,targetAddedLength:o,pitch:i,placementFraction:r,normalSign:s}=t,a=e.end.x-e.start.x,A=e.end.y-e.start.y,c=Math.hypot(a,A);if(c<=Jr)return null;const l=Math.abs(a)<=Jr||Math.abs(A)<=Jr,u=Math.abs(Math.abs(a)-Math.abs(A))<=Jr;if(!l&&!u)return null;const g={x:a/c,y:A/c},h={x:-g.y*s,y:g.x*s},d=Math.min(i/2,o/(8*n*(Math.SQRT2-1)),t.chamferLimit??Number.POSITIVE_INFINITY),p=t.plateauLength??i,m=d*4+p,_=i,f=n*m+Math.max(0,n-1)*_,I=i/4;if(f+I*2>c+Jr)return null;const C=4*d*(Math.SQRT2-1);if(o+Jr<C*n)return null;const y=(o/n-C)/2,x=c-f-I*2,E=I+Math.max(0,x)*r;let B=sI(e.start,g,E);const S=[{...e.start},{...B}];for(let Q=0;Q<n;Q++)B=sI(sI(B,g,d),h,d),S.push(B),B=sI(B,h,y),S.push(B),B=sI(sI(B,g,d),h,d),S.push(B),B=sI(B,g,p),S.push(B),B=sI(sI(B,g,d),h,-d),S.push(B),B=sI(B,h,-y),S.push(B),B=sI(sI(B,g,d),h,-d),S.push(B),Q<n-1&&(B=sI(B,g,_),S.push(B));return S.push({...e.end}),S.filter((Q,w)=>w===0||!Vy(Q,S[w-1]))}var yNt=class extends Error{};function oR(t){if(t&&t.remaining--<=0)throw new yNt}function*_w(t){const{plan:e,bus:n,targetAddedLength:o,clearance:i,sharedBoundary:r,allowInsideDenseBounds:s=!1,allowSourcePrefixMatching:a=!1,denseBoundarySplitApplied:A=!1}=t,c=fNt(n),l=INt(e.segments),u=e.segments[0]?.width?e.segments[0].width/2+i:i,g=e.segments.map((p,m)=>({segment:p,segmentIndex:m})).filter(({segment:p,segmentIndex:m})=>p.layer===e.targetLayer||t.allowTransitLayerMatching&&p.layer!==e.sourceLayer&&(n.allowedLayers??[e.targetLayer]).includes(p.layer)&&(n.routableEscapeLayers??n.allowedLayers??[e.targetLayer]).includes(p.layer)||a&&e.via&&e.sourceLayer!==e.targetLayer&&m>0&&m<(e.sourceEscapeSegmentCount??1)&&p.layer===e.sourceLayer).toSorted((p,m)=>tn(m.segment.start,m.segment.end)-tn(p.segment.start,p.segment.end));for(const{segment:p,segmentIndex:m}of g){const _=p.width+i,f=tn(p.start,p.end),I=Math.min(12,Math.max(0,t.chamferLimit===void 0?Math.floor((f/_+.5)/4):Math.floor((f+_/2)/(4*t.chamferLimit+(t.plateauLength??_)+_))));for(let C=1;C<=I;C++)for(const y of t.placementFractions??[.5,0,1,.25,.75])for(const x of[1,-1]){oR(t.workBudget);const E=eSo({segment:p,toothCount:C,targetAddedLength:o,pitch:_,placementFraction:y,normalSign:x,plateauLength:t.plateauLength,chamferLimit:t.chamferLimit});if(!E||E.some(w=>!CNt(w,r))||!s&&E.slice(1,-1).some(w=>!_Nt(w,c,u)))continue;const B=E.slice(1).map((w,M)=>({start:E[M],end:w,width:p.width,layer:p.layer})),S=[...e.segments.slice(0,m),...B,...e.segments.slice(m+1)];if(p.layer===e.sourceLayer&&p.layer!==e.targetLayer&&B.some(w=>Tl(w,e.sourceObstacle)<w.width/2+i-Jr)||l(S,m,B.length)||!RPe({plan:e,segments:S,replacementStartIndex:m,replacementSegmentCount:B.length,clearance:i}))continue;const Q=bB(e,S,a);Q&&(yield Q)}}if(A)return;const h=e.segments.flatMap((p,m)=>a&&m===0?[p]:Zbo({segment:p,bounds:c,margin:u})),d=bB(e,h,a);d&&(yield*_w({...t,plan:d,denseBoundarySplitApplied:!0}))}function*oue(t){const{plan:e,bus:n,targetAddedLength:o,clearance:i}=t,r=fNt(n);for(let s=0;s<e.segments.length;s++){const a=e.segments[s],A=a.layer===e.sourceLayer&&a.layer!==e.targetLayer;if(A){if(!t.allowSourcePrefixMatching||!e.via||s===0)continue}else if(a.layer!==e.targetLayer&&(!t.allowTransitLayerMatching||!(n.allowedLayers??[e.targetLayer]).includes(a.layer)||!(n.routableEscapeLayers??n.allowedLayers??[e.targetLayer]).includes(a.layer)))continue;const c=tn(a.start,a.end);if(c<=Jr)continue;const l={x:(a.end.x-a.start.x)/c,y:(a.end.y-a.start.y)/c};for(let u=s+2;u<Math.min(e.segments.length,s+16)&&!e.segments.slice(s,u+1).some(C=>C.layer!==a.layer);u++){const h=e.segments[u],d=tn(h.start,h.end);if(d<=Jr)continue;const p={x:(h.end.x-h.start.x)/d,y:(h.end.y-h.start.y)/d};if(Math.abs(l.x+p.x)>Jr||Math.abs(l.y+p.y)>Jr)continue;oR(t.workBudget);const m=C=>({...C,x:C.x+l.x*o/2,y:C.y+l.y*o/2}),_=e.segments.map((C,y)=>y<s||y>u?C:y===s?{...C,end:m(C.end)}:y===u?{...C,start:m(C.start)}:{...C,start:m(C.start),end:m(C.end)}),f=_.slice(s,u+1);if(f.some((C,y)=>{const x=s+y;return _.some((E,B)=>{if(Math.abs(x-B)<2)return!1;const S=Math.min(x,B),Q=Math.max(x,B);return Q===S+2&&Vy(_[S].end,_[Q].start)?!1:NPe(C,E)})})||f.some(C=>[C.start,C.end].some(y=>!CNt(y,n.sharedBoundary)||!t.allowInsideDenseBounds&&!_Nt(y,r,C.width/2+i)))||A&&f.some(C=>Tl(C,e.sourceObstacle)<C.width/2+i-Jr)||!RPe({plan:e,segments:_,replacementStartIndex:s,replacementSegmentCount:u-s+1,clearance:i}))continue;const I=bB(e,_);I&&(yield I)}}}function o6(t){const e=t.map(n=>n.length);return Math.max(...e)-Math.min(...e)}function iR(t,e){return t.filter(n=>e.has(n.connectionIndex))}function*tSo(t,e,n){const o=INt(t.segments);for(const{segment:i,index:r}of t.segments.map((s,a)=>({segment:s,index:a})).filter(({segment:s})=>s.layer===t.targetLayer).toSorted((s,a)=>tn(a.segment.start,a.segment.end)-tn(s.segment.start,s.segment.end))){const s=tn(i.start,i.end);if(s<=Jr)continue;const a=Math.abs(i.end.x-i.start.x),A=Math.abs(i.end.y-i.start.y);if(a>Jr&&A>Jr&&Math.abs(a-A)>Jr)continue;const c={x:(i.end.x-i.start.x)/s,y:(i.end.y-i.start.y)/s},l=i.width+e;for(const u of[2,3,4,6]){const g=l*u;if(!(s<2*g+l))for(const h of[1,-1]){oR(n);const d={x:-c.y*h,y:c.x*h},p=[i.start,sI(sI(i.start,c,g),d,g),sI(sI(i.end,c,-g),d,g),i.end],m=p.slice(1).map((I,C)=>({...i,start:p[C],end:I})),_=[...t.segments.slice(0,r),...m,...t.segments.slice(r+1)];if(o(_,r,m.length)||!RPe({plan:t,segments:_,replacementStartIndex:r,replacementSegmentCount:m.length,clearance:e}))continue;const f=bB(t,_);f&&(yield f)}}}}function zy(t){if(t.maximumWorkUnits!==void 0&&(!Number.isSafeInteger(t.maximumWorkUnits)||t.maximumWorkUnits<0))throw new Error("maximumWorkUnits must be a non-negative safe integer");const e=t.maximumWorkUnits===void 0?void 0:{remaining:t.maximumWorkUnits},n=fPe(t.inputSrj),o=new Map;for(const r of t.plans){const s=o.get(r.connectionIndex)??[];s.push(r),o.set(r.connectionIndex,s)}t={...t,preparedBuses:t.preparedBuses.filter(r=>r.maxLengthSkew!==void 0||r.connections.some(s=>o.has(s.connectionIndex)))};for(const r of t.preparedBuses)if(r.connections.some(s=>{const a=o.get(s.connectionIndex);return a?.length!==1||a[0].busId!==r.busId||a[0].connectionName!==s.connection.name||t.inputSrj.connections[s.connectionIndex]?.name!==s.connection.name}))return{plans:null,failedBus:r};const i=Z0e({srj:t.inputSrj,sharedBoundary:t.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges});try{const r=TPe(t,i,e);return r.plans?nSo(t,r.plans,n,i,e):r}catch(r){if(r instanceof yNt&&e?.activeBus)return{plans:null,failedBus:t.preparedBuses.find(s=>s.busId===e.activeBus.busId)??e.activeBus};throw r}}function xNt({plans:t,connectionIndex:e,connectionName:n}){const o=t.filter(s=>s.connectionIndex===e),i=o[0];if(o.length!==1||!i||i.connectionName!==n||!Number.isFinite(i.length))throw new Error(`Differential-pair matching cannot resolve exactly one original plan for ${n}`);const r=[...i.segments,...i.planeEndpointSegments??[]].reduce((s,a)=>s+tn(a.start,a.end),0);if(!Number.isFinite(r)||Math.abs(r-i.length)>Jr)throw new Error(`Differential-pair matching found inconsistent copper length for ${i.connectionName}`);return i}function iue({plans:t,pair:e}){return[xNt({plans:t,connectionIndex:e.connectionIndices[0],connectionName:e.connectionNames[0]}),xNt({plans:t,connectionIndex:e.connectionIndices[1],connectionName:e.connectionNames[1]})]}function nSo(t,e,n,o,i){const r=new Map(t.preparedBuses.flatMap(u=>u.connections.map(g=>[g.connectionIndex,{bus:u,connection:g}]))),s=n.filter(u=>u.connectionIndices.some(g=>r.has(g)));if(!s.length)return{plans:e};const a=t.preparedBuses.map(u=>({bus:u,indices:new Set(u.connections.map(g=>g.connectionIndex))}));let A=e;const c=u=>a.every(({bus:g,indices:h})=>{if(g.maxLengthSkew===void 0)return!0;const d=iR(u,h);return d.length===g.connections.length&&o6(d)<=g.maxLengthSkew+Jr});for(let u=0;u<=s.length;u++){for(const g of s){const h=iue({plans:A,pair:g});if(o6(h)<=g.lengthTolerance+Jr)continue;const d=g.connectionIndices.map(y=>r.get(y)),p=d.find(y=>y).bus;if(d.some(y=>!y))return{plans:null,failedBus:p};const m=h[0].length<=h[1].length?0:1,_=d[m].bus,f={..._,connections:d.map(y=>y.connection),maxLengthSkew:g.lengthTolerance},I=Math.max(...h.map(y=>y.length)),C=TPe({...t,plans:A,preparedBuses:[f],unroutedSourceBuses:void 0,allowUnconstrainedLaneRerouting:!1,allowPairLaneSpreading:d[0].bus===d[1].bus&&t.allowPairLaneSpreading,candidatePlansAreFeasible:y=>c(y)&&iue({plans:y,pair:g}).every(x=>x.length<=I+Jr)&&(!t.candidatePlansAreFeasible||t.candidatePlansAreFeasible(y))},o,i);if(!C.plans)return{plans:null,failedBus:_};A=C.plans}if(s.every(g=>o6(iue({plans:A,pair:g}))<=g.lengthTolerance+Jr))return c(A)?{plans:A}:{plans:null,failedBus:a.find(({bus:g,indices:h})=>g.maxLengthSkew!==void 0&&o6(iR(A,h))>g.maxLengthSkew+Jr).bus}}return{plans:null,failedBus:s.find(u=>o6(iue({plans:A,pair:u}))>u.lengthTolerance+Jr).connectionIndices.map(u=>r.get(u)?.bus).find(u=>u)}}function TPe(t,e,n){const{preparedBuses:o,inputSrj:i,sharedBoundary:r,clearance:s,allowBlindAndBuriedVias:a=!0,allowSameNetMerges:A=!1,allowMatchingInsideDenseBounds:c=!1,candidatePlansAreFeasible:l}=t,u=m=>(oR(n),e(m));let g=[...t.plans],h=0;const d=new Set(t.unroutedSourceBuses?.flatMap(m=>m.connections.map(_=>_.connectionIndex))),p=o.filter(m=>m.maxLengthSkew!==void 0&&m.connections.length>1);if(p.length===0)return{plans:g};for(const m of p){const _=new Set(m.connections.map(y=>y.connectionIndex));if(n&&(n.activeBus=m),m.termination.type!=="boundary")return{plans:null,failedBus:m};const f=m.connections.length*(t.allowDistributedMatching?24:2),I=new Set;for(let y=0;y<f;y++){const x=iR(g,_);if(x.length!==m.connections.length)return{plans:null,failedBus:m};const E=m.maxLengthSkew,B=o6(x);if(B<=E+Jr)break;const S=x.filter(U=>!I.has(U.connectionIndex)).toSorted((U,Y)=>U.length-Y.length||U.connectionName.localeCompare(Y.connectionName))[0],Q=Math.max(...x.map(U=>U.length));if(!S||Q-S.length<=E+Jr)return{plans:null,failedBus:m};const w=Q-S.length,M=Math.max(Jr,w-E+Jr),k=[M,M+E*.1,w-E*.5,w-E*.75,w,w+E].filter((U,Y,W)=>U>Jr&&W.findIndex(te=>Math.abs(te-U)<Jr)===Y).toSorted((U,Y)=>U-Y);let R=null;const F=U=>{const Y=g.map(te=>te===S?U:te),W=iR(Y,_);return o6(W)>B+Jr||!u(Y)||l&&!l(Y)?null:Y};if(t.allowMultiSegmentTuningWindows){const U=Math.max(S.length+M,...fPe(i).filter(Y=>Y.connectionIndices.includes(S.connectionIndex)).flatMap(Y=>Y.connectionIndices.filter(W=>W!==S.connectionIndex).flatMap(W=>{const te=g.find(j=>j.connectionIndex===W);return te?[te.length-Y.lengthTolerance+Jr]:[]})));for(const Y of Abo({plan:S,bus:m,inputSrj:i,plans:g,layerNames:Rb(i.layerCount),clearance:s,consumeWork:()=>oR(n)})){const W={...S,additionalVias:[...S.additionalVias??[],...Y.addedVias]},te=_e=>bB(W,[...Y.before,..._e,...Y.after]),j=(_e,ue)=>{const fe=m.sharedBoundary;for(const[ye,Me]of ue.entries()){const ve=Me.end.x-Me.start.x,he=Me.end.y-Me.start.y;if(Math.min(Math.abs(ve),Math.abs(he),Math.abs(Math.abs(ve)-Math.abs(he)))>1e-7||[Me.start,Me.end].some(Pe=>Pe.x<=fe.minX+1e-7||Pe.x>=fe.maxX-1e-7||Pe.y<=fe.minY+1e-7||Pe.y>=fe.maxY-1e-7))return!1;const Qe=ue[ye+1];if(Qe){const Pe=Qe.end.x-Qe.start.x,we=Qe.end.y-Qe.start.y;if((ve*Pe+he*we)/(Math.hypot(ve,he)*Math.hypot(Pe,we))<Math.SQRT1_2-1e-7)return!1}if(i.obstacles.some(Pe=>Pe.layers.includes(Me.layer)&&Tl(Me,Pe)<Me.width/2+s-1e-9))return!1}const pe=new Set(ue.map((ye,Me)=>Y.before.length+Me));return nue(_e,Y.addedVias,s)&&bO(_e,_e.segments,s,pe)},J=te(Y.window);if(!J||!j(J,Y.window)||!u(g.map(_e=>_e===S?J:_e)))continue;const oe={...J,targetLayer:Y.tuningLayer,segments:Y.window},ie=U-J.length,ne={plan:oe,bus:m,targetAddedLength:ie,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,workBudget:n},le=Y.window[0].width+s,ge=[oue(ne),...[1,2,4,8].map(_e=>_w({...ne,plateauLength:le*_e,chamferLimit:le/4,placementFractions:[.5,0,1,.25,.75,.1,.9]}))];for(const _e of ge){for(const ue of _e){const fe=te(ue.segments);if(!(!fe||!j(fe,ue.segments))&&(R=F(fe),R))break}if(R)break}if(R)break}}const O=U=>{let te=0;const j=oe=>oe.length<=48?[...oe]:Array.from({length:48},(ie,ne)=>oe[Math.floor(ne*oe.length/48)]),J=(oe,ie)=>{oR(n);const ne=oe.length-S.length,le=U-ne;if(le<=Jr)return F(oe);if(ie<=0)return null;const ge=le/ie,_e=j([..._w({plan:oe,bus:m,targetAddedLength:ge,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n})]);for(const ue of _e){if(te++,te>320)return null;if(!F(ue))continue;const fe=J(ue,ie-1);if(fe)return fe}return null};for(let oe=2;oe<=8;oe++){const ie=J(S,oe);if(ie)return ie;if(te>320)break}return null};for(const U of k){if(R)break;if(t.allowDistributedMatching){for(const W of oue({plan:S,bus:m,targetAddedLength:U,clearance:s,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n}))if(R=F(W),R)break;if(R)break}const Y=_w({plan:S,bus:m,targetAddedLength:U,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n});for(const W of Y)if(R=F(W),!!R)break;if(!R&&Math.abs(U-M)<=Jr){if(t.allowDistributedMatching)for(const W of[U/2,U/4,Math.min(U,1),Math.min(U,.5),Math.min(U,.25),Math.min(U,.1)]){if(W<=Jr)continue;const te={plan:S,bus:m,targetAddedLength:W,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n};for(const j of[oue(te),_w(te)]){for(const J of j)if(R=F(J),R)break;if(R)break}if(R)break}R||(R=O(U))}if(R)break}if(!R&&t.allowAdditionalMatchingVias)for(const U of Xbo({plan:S,bus:m,layerNames:Rb(i.layerCount),clearance:s,workBudget:n})){if(!u(g.map(W=>W===S?U.plan:W)))continue;const Y={plan:{...U.plan,targetLayer:U.tuningLayer},bus:m,targetAddedLength:M,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,workBudget:n};for(const W of[oue(Y),_w(Y)]){for(const te of W)if(nue(te,U.addedVias,s)&&(R=F({...te,targetLayer:S.targetLayer}),R))break;if(R)break}if(R)break}if(!R&&t.allowPairLaneSpreading&&m.connections.length===2){const U=x.find(W=>W!==S);let Y=0;for(const W of tSo(U,s,n)){const te=g.map(J=>J===U?W:J);if(!u(te)||l&&!l(te))continue;const j=TPe({...t,plans:te,preparedBuses:[m],allowPairLaneSpreading:!1},e,n);if(j.plans){R=j.plans;break}if(++Y>=4)break}}if(!R&&t.allowUnconstrainedLaneRerouting){let U=0;e:for(const Y of k){const W=_w({plan:S,bus:m,targetAddedLength:Y,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n});for(const te of W){if(!u([te]))continue;const j=g.filter(ne=>ne!==S&&!e.mutuallyClear([te,ne]));if(j.length!==1)continue;const J=j[0],oe=o.find(ne=>ne.busId===J.busId);if(!oe||oe.termination.type!=="boundary"||oe.maxLengthSkew!==void 0||oe.connections.length!==1||!J.via||J.additionalVias?.length||J.planeEndpointVia||J.segments.filter(ne=>ne.layer===J.sourceLayer).length!==1)continue;const ie=g.map(ne=>ne===S?te:ne);for(const ne of[!0,!1]){if(U++>=4)break e;const le=rNt({srj:i,bus:oe,terminals:[{connection:oe.connections[0],viaPoint:J.via.center,exitPoint:J.exitPoint}],targetLayer:J.targetLayer,acceptedPlans:ie.filter(ue=>ue!==J),layerNames:Rb(i.layerCount),traceWidth:J.segments[0].width,viaDiameter:J.via.diameter,viaHoleDiameter:J.via.holeDiameter,clearance:s,allowBlindAndBuriedVias:a,allowSameNetMerges:A,gridStepDivisor:2,alignGridToPads:ne,maximumRouteOrderAttempts:1,preferTargetDirectedLaneBias:!0})?.[0];if(!le)continue;const ge=bB(J,[J.segments[0],...le.segments.slice(1)]);if(!ge)continue;const _e=ie.map(ue=>ue===J?ge:ue);if(!(o6(iR(_e,_))>E+Jr||!u(_e)||l&&!l(_e))){R=_e;break e}}}}}if(!R&&t.unroutedSourceBuses?.length)e:for(const U of k)for(const Y of _w({plan:S,bus:m,targetAddedLength:U,clearance:s,sharedBoundary:m.sharedBoundary,allowInsideDenseBounds:c,allowSourcePrefixMatching:t.allowSourcePrefixMatching,allowTransitLayerMatching:t.allowTransitLayerMatching,workBudget:n})){if(h>=4)break e;if(!u([Y]))continue;const W=g.filter(j=>j!==S&&!e.mutuallyClear([Y,j]));if(W.length!==1||!d.has(W[0].connectionIndex))continue;h++;const te=$bo({inputSrj:i,plans:g.map(j=>j===S?Y:j),unroutedSourceBuses:t.unroutedSourceBuses,clearance:s});if(!(!te||o6(iR(te,_))>B+Jr||!u(te)||l&&!l(te))){R=te;break e}}if(!R){if(t.allowDistributedMatching){I.add(S.connectionIndex);continue}return{plans:null,failedBus:m}}g=R}const C=iR(g,_);if(o6(C)>m.maxLengthSkew+Jr)return{plans:null,failedBus:m}}return{plans:g}}function ENt(t){const{points:e,topZ:n,traceWidth:o,viaDiameter:i,clearance:r}=t,s=[],a=[];let A=0;for(let l=0;l+1<e.length;l++){const u=e[l],g=e[l+1];if(u.z!==g.z){if(tn(u,g)>1e-7)return!1;a.push({center:u,fromZ:u.z,toZ:g.z,edge:l}),A++}else tn(u,g)>1e-9&&s.push({a:u,b:g,z:u.z,edge:l,run:A})}const c=s.filter(l=>l.z===n);for(let l=0;l<c.length;l++)for(let u=l+1;u<c.length;u++){const g=c[l],h=c[u];if(g.run!==h.run&&tu(g.a,g.b,h.a,h.b)<o+r-1e-9)return!1}for(let l=0;l<a.length;l++){const u=a[l];for(let d=l+1;d<a.length;d++)if(tn(u.center,a[d].center)<i+r-1e-9)return!1;const g=(i+o)/2+r,h=new Set;for(const d of[-1,1]){let p=u.center,m=0;const _=d===-1?u.fromZ:u.toZ;for(let f=u.edge+d;f>=0&&f+1<e.length;f+=d){const I=e[f],C=e[f+1],y=d===-1?C:I,x=d===-1?I:C;if(I.z!==_||C.z!==_||tn(p,y)>1e-7||m>g+1e-7)break;h.add(f),m+=tn(y,x),p=x}}for(const d of s)if(!h.has(d.edge)&&Cr(u.center,d.a,d.b)<g-1e-9)return!1}return!0}var ef=1e-7,kPe=180;function oSo(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.min(Math.abs(n),Math.abs(o));return Math.abs(n)<ef||Math.abs(o)<ef||Math.abs(Math.abs(n)-Math.abs(o))<ef?[[t,e]]:[[t,{x:t.x+Math.sign(n)*i,y:t.y+Math.sign(o)*i,z:t.z},e],[t,{x:e.x-Math.sign(n)*i,y:e.y-Math.sign(o)*i,z:t.z},e],[t,{x:t.x,y:e.y,z:t.z},e],[t,{x:e.x,y:t.y,z:t.z},e]]}function iSo(t,e,n){if(t.length<3)return t;const o=t.length,i=o<=kPe?t.map((c,l)=>l):[...new Set([0,...Array.from({length:kPe-2},(c,l)=>Math.round((l+1)*(o-1)/(kPe-1))),o-1])],r=new Float64Array(o).fill(1/0),s=new Array(o);r[0]=0;for(let c=1;c<i.length;c++){const l=i[c];for(let u=0;u<c;u++){const g=i[u],h=t[g],d=t[l],p=Math.abs(d.x-h.x),m=Math.abs(d.y-h.y),_=Math.max(p,m)+(Math.SQRT2-1)*Math.min(p,m);if(!(r[g]+_>=r[l]-ef))for(const f of oSo(h,d)){const I=f.slice(1).reduce((C,y,x)=>C+tn(f[x],y),0);r[g]+I>=r[l]-ef||!f.slice(1).every((C,y)=>n(f[y],C))||(r[l]=r[g]+I,s[l]={previous:g,points:f})}}if(!s[l]){const u=i[c-1],g=t.slice(u,l+1);r[l]=r[u]+g.slice(1).reduce((h,d,p)=>h+tn(g[p],d),0),s[l]={previous:u,points:g}}}const a=[];for(let c=o-1;c>0;){const l=s[c];if(!l)throw new Error("FanoutSolver: shortcut graph lost a retained path");a.unshift(l.points),c=l.previous}const A=a.flatMap((c,l)=>l?c.slice(1):c);return eR({points:A,chamfer:e/4,segmentIsClear:n})??t}function BNt(t,e,n){return t.x<e.minX-ef||t.x>e.maxX+ef||t.y<e.minY-ef||t.y>e.maxY+ef?!1:!(Math.abs(t.x-e.minX)<ef||Math.abs(t.x-e.maxX)<ef||Math.abs(t.y-e.minY)<ef||Math.abs(t.y-e.maxY)<ef)||tn(t,n)<ef}function SO(t){const{inputSrj:e,preparedBuses:n,layerNames:o,clearance:i,allowBlindAndBuriedVias:r=!0,allowSameNetMerges:s=!1}=t,a=new Map(n.map(g=>[g.busId,g])),A=new Map(n.map(g=>[g.busId,Math.min(...t.plans.filter(h=>h.busId===g.busId).map(h=>h.length))])),c=Z7(e,r);let l=[...t.plans];for(let g=0;g<3;g++){let h=!1;for(const d of l.toSorted((p,m)=>m.length-p.length)){const p=a.get(d.busId),m=A.get(d.busId);if(!p||m===void 0||!Number.isFinite(m)||p.maxLengthSkew===void 0||d.termination.type!=="boundary"||d.length<=m+p.maxLengthSkew+ef||t.selectedBusIds&&!t.selectedBusIds.has(d.busId)||t.selectedConnectionIndices&&!t.selectedConnectionIndices.has(d.connectionIndex))continue;const _=d.trace.route.findIndex(R=>R.route_type==="via");if(_<0)continue;const f=R=>R===d.connectionName||s&&Px(e,R,d.connectionName),I=l.filter(R=>R.connectionIndex!==d.connectionIndex&&!f(R.connectionName)),C=c.filter(R=>!f(R.connectionName)),y=new qj([...I.flatMap(R=>[...R.segments,...R.planeEndpointSegments??[]]),...C.flatMap(R=>R.segments)]),x=[...I.flatMap(R=>[R.via,...R.additionalVias??[],R.planeEndpointVia].filter(F=>!!F)),...C.flatMap(R=>R.vias)],E=e.obstacles.filter(R=>!(s&&n4(e,R,d.connectionName)));let B=_+1;if(t.allowSourcePrefixShortcuts)for(B=1;B<_;){const R=d.trace.route[B];if(R.route_type==="wire"&&wx(R,d.sourceObstacle)>=R.width/2+i-1e-9)break;B++}const S=d.trace.route.slice(0,B);let Q=B;for(;Q<d.trace.route.length;){const R=d.trace.route[Q];if(R.route_type!=="wire"){S.push(R),Q++;continue}let F=Q+1;for(;F<d.trace.route.length;){const ie=d.trace.route[F];if(ie.route_type!=="wire"||ie.layer!==R.layer)break;F++}const O=d.trace.route.slice(Q,F),U=o.indexOf(R.layer);if(U<0)throw new Error(`FanoutSolver: shortcut uses unknown layer ${R.layer}`);const Y=O.map(ie=>({x:ie.x,y:ie.y,z:U})),W=Math.max(...O.map(ie=>ie.width)),te=S.at(-1),j=(ie,ne)=>{const le={start:ie,end:ne,layer:R.layer,width:W};return BNt(ie,p.sharedBoundary,d.exitPoint)&&BNt(ne,p.sharedBoundary,d.exitPoint)&&E.every(ge=>!ge.layers.includes(R.layer)||Q<_&&ge===d.sourceObstacle&&te?.route_type==="wire"&&Cr(ie,te,Y[0])<ef&&Cr(ne,te,Y[0])<ef||Tl(le,ge)>=W/2+i-1e-9)&&y.querySegment(le,i).every(ge=>Zm(le,ge,i))&&x.every(ge=>!ge.spanLayers.includes(R.layer)||Cr(ge.center,ie,ne)>=(W+ge.diameter)/2+i-1e-9)};let J=iSo(Y,W,j),oe;if(Q<_&&te?.route_type==="wire"&&te.layer===R.layer){const ie=eR({points:[{x:te.x,y:te.y,z:U},...J],chamfer:W/4,segmentIsClear:j});ie?(S.pop(),oe=te,J=ie):J=Y}S.push(...J.map((ie,ne)=>({...ne===0?oe:void 0,route_type:"wire",x:ie.x,y:ie.y,layer:R.layer,width:W}))),Q=F}const w={...d.trace,route:S},M=J0e(e,w,r).segments,k={...d,trace:w,segments:M,...t.allowSourcePrefixShortcuts?{sourceEscapeSegmentCount:M.findIndex(R=>R.layer!==d.sourceLayer)}:{},length:M.reduce((R,F)=>R+tn(F.start,F.end),0)};k.length<m-ef||k.length>=d.length-ef||t.allowSourcePrefixShortcuts&&!ENt({points:w.route.flatMap(R=>R.route_type==="wire"?[{x:R.x,y:R.y,z:o.indexOf(R.layer)}]:[]),topZ:o.indexOf(d.sourceLayer),traceWidth:t.traceWidth,viaDiameter:d.via.diameter,clearance:i})||Wh({plans:[k],srj:{...e,traces:[...e.traces??[],...I.flatMap(R=>[R.trace,...R.planeEndpointTrace?[R.planeEndpointTrace]:[]])]},sharedBoundary:p.sharedBoundary,clearance:i,allowBlindAndBuriedVias:r,allowSameNetMerges:s})&&(l=l.map(R=>R===d?k:R),h=!0)}if(!h)break}return qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...l.flatMap(g=>[g.trace,...g.planeEndpointTrace?[g.planeEndpointTrace]:[]])]},clearance:i,allowBlindAndBuriedVias:r}).valid?l:null}function rSo(t,e,n,o,i,r,s){if(s&&n==="top"&&Tl({start:t,end:t},r)<o/2+i-1e-9&&tn(e,s.sourcePoint)>=tn(t,s.sourcePoint)-1e-9)return s.connectionName}function sSo(t){const e=new Int32Array(t.planeSize+1),n=[],o=[];for(let i=0;i<t.planeSize;i++){e[i]=n.length;const r=new Set;for(let c=t.neighborOffset[i];c<t.neighborOffset[i+1];c++){const l=t.neighborIds[c];r.add(l),n.push(l),o.push(t.neighborCosts[c])}const s=new Set,a=t.cellMaxX[i]-t.cellMinX[i],A=t.cellMaxY[i]-t.cellMinY[i];for(let c=t.neighborOffset[i];c<t.neighborOffset[i+1];c++){const l=t.neighborIds[c];for(let u=t.neighborOffset[l];u<t.neighborOffset[l+1];u++){const g=t.neighborIds[u];if(g===i||r.has(g))continue;const h=Math.abs(t.cellCenterX[g]-t.cellCenterX[i]),d=Math.abs(t.cellCenterY[g]-t.cellCenterY[i]);h<1e-9||Math.abs(h-d)>1e-9||Math.abs(h-a)>1e-9||Math.abs(d-A)>1e-9||Math.abs(t.cellMaxX[g]-t.cellMinX[g]-a)>1e-9||Math.abs(t.cellMaxY[g]-t.cellMinY[g]-A)>1e-9||s.add(g)}}for(const c of[...s].sort((l,u)=>l-u))n.push(c),o.push(Math.hypot(t.cellCenterX[c]-t.cellCenterX[i],t.cellCenterY[c]-t.cellCenterY[i]))}return e[t.planeSize]=n.length,{neighborOffset:e,neighborIds:Int32Array.from(n),neighborCosts:Float32Array.from(o)}}function aSo(t){const{edge:e,bounds:n,exit:o,approachLength:i}=t;if(!["left","right","top","bottom"].includes(e))throw new Error("Terminal approach requires a valid boundary edge");if(!Number.isFinite(i)||i<=0)throw new Error("terminalApproachLength must be finite and positive");const r=e==="left"||e==="right",s=e==="left"?n.minX:e==="right"?n.maxX:e==="bottom"?n.minY:n.maxY,a=e==="left"||e==="bottom"?-1:1,A=r?{x:o.x-a*i,y:o.y}:{x:o.x,y:o.y-a*i};if(![o.x,o.y,A.x,A.y,n.minX,n.maxX,n.minY,n.maxY].every(Number.isFinite)||Math.abs((r?o.x:o.y)-s)>1e-7||A.x<=n.minX||A.x>=n.maxX||A.y<=n.minY||A.y>=n.maxY)throw new Error("Terminal approach must end on its shared edge and start inside it");return{connectionName:t.connectionName,edge:e,layer:t.layer,exit:{...o},goal:A}}function rue(t,e){const{goal:n,edge:o}=e,i=o==="left"||o==="right",r=o==="left"||o==="bottom"?-1:1,s=i?n.x-t.x:n.y-t.y,a=i?n.y-t.y:n.x-t.x,A=r*s;if(A<Math.abs(a)-1e-9){if(A<=1e-9)return null;const l=i?{x:t.x,y:n.y-Math.sign(a)*A}:{x:n.x-Math.sign(a)*A,y:t.y};return[t,l,n]}const c=i?{x:t.x+r*Math.abs(a),y:n.y}:{x:n.x,y:t.y+r*Math.abs(a)};return[t,c,n].filter((l,u,g)=>u===0||tn(l,g[u-1])>1e-10)}var ASo=(t,e,n=e)=>t.some(o=>Math.max(e.x,n.x)>=o.minX&&Math.min(e.x,n.x)<=o.maxX&&Math.max(e.y,n.y)>=o.minY&&Math.min(e.y,n.y)<=o.maxY);function bNt(t,e,n){const o=[];let i=0;for(const[A,c]of t.entries()){if(c.layer===n&&Cr(e,c.start,c.end)<1e-8){const l=i+tn(c.start,e);o.some(u=>Math.abs(u.offset-l)<1e-8)||o.push({index:A,offset:l})}i+=tn(c.start,c.end)}if(o.length!==1)return null;let r=o[0].index;const s=t[r],a=[...t];return tn(e,s.end)<1e-8?r++:tn(e,s.start)>1e-8&&(a.splice(r,1,{...s,end:e},{...s,start:e}),r++),r>=a.length?null:{segments:a,changed:new Set(a.slice(r).map((A,c)=>r+c))}}function FPe(t){const{plan:e,splice:n,clearance:o,maximumJoinLength:i}=t,{rawSegments:r,firstEntrySegmentIndex:s}=n;if(!Number.isInteger(s)||s<0||s>=r.length||!Number.isFinite(i)||i<0)return!1;const a=(g,h,d=g)=>{const p={...e,segments:[...g]},m=[e.via,...e.additionalVias??[],e.planeEndpointVia].filter(_=>!!_).filter(_=>[...h].some(f=>{const I=g[f];return _.spanLayers.includes(I.layer)&&Cr(_.center,I.start,I.end)<(_.diameter+I.width)/2+o+1e-7}));return nue({...p,segments:[...d]},m,o)&&bO(p,g,o,h)};if(!a(r,new Set(r.slice(s).map((g,h)=>s+h))))return!1;const A=r[s],c=r[s-1];let l=A.start;if(c?.layer===A.layer&&tn(c.end,l)<1e-8){let g=c.start;for(let p=s-2;p>=0;p--){const m=r[p];if(m.layer!==c.layer||tn(m.end,g)>1e-8)break;const _=g.x-m.start.x,f=g.y-m.start.y,I=l.x-g.x,C=l.y-g.y;if(Math.abs(_*C-f*I)>=1e-10||_*I+f*C<0)break;g=m.start}const h=tn(g,l);if(h<1e-10)return!1;const d=Math.min(i,h/3);l={x:l.x+(g.x-l.x)*d/h,y:l.y+(g.y-l.y)*d/h}}const u=bNt(e.segments,l,A.layer);return!!u&&a(u.segments,u.changed,e.segments)}function*cSo(t){const{splice:e,connector:n,clearance:o}=t,i=e.firstEntrySegmentIndex,r=e.rawSegments[i];if(!r||r.layer!==n.layer)return;const s=4*(r.width+o);let a=0;for(let A=i;A>=Math.max(0,i-16);A--){const c=e.rawSegments[A];if(c.layer!==n.layer||A<i&&tn(c.end,e.rawSegments[A+1].start)>1e-7||(A<i&&(a+=tn(c.start,c.end)),a>s+1e-7))break;const l=c.start,{goal:u,exit:g,edge:h}=n,d=h==="left"||h==="right",p=h==="left"||h==="bottom"?-1:1,m=p*(d?u.x-l.x:u.y-l.y),_=Math.abs(d?u.y-l.y:u.x-l.x),f=[];if(A<i){const I=rue(l,n);I&&f.push(I)}if(m>=_-1e-9){const I=d?{x:u.x-p*_,y:l.y}:{x:l.x,y:u.y-p*_};f.push([l,I,u])}for(const I of f){const C=[...I,g].filter((y,x,E)=>x===0||tn(y,E[x-1])>1e-10);yield{replacement:C.slice(1).map((y,x)=>({...c,start:C[x],end:y})),firstEntrySegmentIndex:A}}}}function lSo(t){const e=[...t.plans],n=new Map(t.splices);for(const[o,i]of e.entries()){const r=t.connectors.get(i.connectionName);if(!r)continue;const s=n.get(i.connectionName);if(!s)return null;if(FPe({plan:i,splice:s,maximumJoinLength:0,clearance:t.clearance}))continue;const a=e.filter(c=>c.connectionIndex!==i.connectionIndex);let A=!1;for(const{replacement:c,firstEntrySegmentIndex:l}of cSo({splice:s,connector:r,clearance:t.clearance})){const u=c[0],g=bNt(i.segments,u.start,u.layer);if(!g)continue;const h=Math.min(...g.changed),d=[...g.segments.slice(0,h),...c],p=bB(i,d);if(!p)continue;const m={rawSegments:[...s.rawSegments.slice(0,l),...c],firstEntrySegmentIndex:l};if(FPe({plan:p,splice:m,maximumJoinLength:0,clearance:t.clearance})&&!c.some(_=>!t.segmentIsClear(_,i.connectionName)||a.some(f=>[...f.segments,...f.planeEndpointSegments??[]].some(I=>!Zm(_,I,t.clearance))||[f.via,...f.additionalVias??[],f.planeEndpointVia].filter(I=>!!I).some(I=>I.spanLayers.includes(_.layer)&&Cr(I.center,_.start,_.end)<(I.diameter+_.width)/2+t.clearance-1e-9)))){e[o]=p,n.set(i.connectionName,m),A=!0;break}}if(!A)return null}return{plans:e,splices:n}}function uSo(t){const{grid:e}=t;if(!Number.isFinite(t.margin)||t.margin<0)throw new Error("Terminal connector margin must be finite and non-negative");const n=c=>({x:e.cellCenterX[c],y:e.cellCenterY[c]}),o=new Map,i=new Set,r=new Map;for(const{connector:c,cellId:l}of t.terminals){if(!Number.isInteger(l)||l<0||l>=e.planeSize)throw new Error("Invalid native terminal cell");const u=new Set([l]);for(let p=e.neighborOffset[l];p<e.neighborOffset[l+1];p++){const m=e.neighborIds[p];u.add(m);for(let _=e.neighborOffset[m];_<e.neighborOffset[m+1];_++)u.add(e.neighborIds[_])}const g=[c.exit,c.goal,...[...u].map(n)],h={minX:Math.min(...g.map(p=>p.x))-t.margin,maxX:Math.max(...g.map(p=>p.x))+t.margin,minY:Math.min(...g.map(p=>p.y))-t.margin,maxY:Math.max(...g.map(p=>p.y))+t.margin},d=r.get(c.edge);r.set(c.edge,d?{minX:Math.min(d.minX,h.minX),maxX:Math.max(d.maxX,h.maxX),minY:Math.min(d.minY,h.minY),maxY:Math.max(d.maxY,h.maxY)}:h);for(const p of u){if(p===l)continue;let m=!1;for(let I=e.neighborOffset[p];I<e.neighborOffset[p+1];I++)e.neighborIds[I]===l&&(m=!0);if(m)continue;const _=rue(n(p),c);if(!_||_.slice(1).some((I,C)=>!t.segmentIsClear(_[C],I,c)))continue;const f=o.get(p)??new Set;f.add(l),o.set(p,f),i.add(`${p}:${l}`)}}const s=new Int32Array(e.planeSize+1),a=[],A=[];for(let c=0;c<e.planeSize;c++){s[c]=a.length;for(let l=e.neighborOffset[c];l<e.neighborOffset[c+1];l++)a.push(e.neighborIds[l]),A.push(e.neighborCosts[l]);for(const l of o.get(c)??[])a.push(l),A.push(tn(n(c),n(l)))}return s[e.planeSize]=a.length,{neighborOffset:s,neighborIds:Int32Array.from(a),neighborCosts:Float32Array.from(A),extendedEdges:i,regions:[...r.values()]}}function gSo(t,e,n){const o=t.route.at(-2),i=t.route.at(-1);if(!o||!i||tn(i,e.goal)>1e-7)throw new Error("Native terminal route does not end at its reserved goal");let r=t.route.slice(0,-2),s=o;if(o.z!==i.z){if(tn(o,n)>1e-7)throw new Error("Native terminal via has a noncoincident departure");r=[...r,o],s={...n,z:i.z}}const a=rue(s,e);if(!a)throw new Error("Native terminal route has no perpendicular entry");return{...t,route:[...r,...a.map(A=>({...A,z:i.z})),{...e.exit,z:i.z}]}}var dSo=class{constructor(t){this.params=t,this.padding=Math.max(t.traceWidth,t.viaDiameter)+t.clearance,this.cellSize=Math.max(t.traceWidth+t.clearance,t.viaDiameter)}params;dirty=!0;buckets=new Map;cellSize;padding;invalidate(){this.dirty=!0}intersects(t,e=t){return ASo(this.params.regions,t,e)}cells(t,e,n,o){for(let i=Math.floor((Math.min(t.x,e.x)-n)/this.cellSize);i<=Math.floor((Math.max(t.x,e.x)+n)/this.cellSize);i++)for(let r=Math.floor((Math.min(t.y,e.y)-n)/this.cellSize);r<=Math.floor((Math.max(t.y,e.y)+n)/this.cellSize);r++)o(`${i},${r}`)}refresh(){if(!this.dirty)return;this.buckets.clear();const t=(e,n,o=n)=>{this.intersects(n,o)&&this.cells(n,o,this.padding,i=>{const r=this.buckets.get(i)??new Set;r.add(e),this.buckets.set(i,r)})};for(const e of this.params.getRoutes()){for(let n=1;n<e.route.length;n++){const o=e.route[n-1],i=e.route[n];o.z===i.z&&t({kind:"segment",owner:e.connectionName,a:o,b:i},o,i)}for(const n of e.vias)t({kind:"via",owner:e.connectionName,center:n},n)}this.dirty=!1}nearby(t,e=t){this.refresh();const n=new Set;return this.cells(t,e,0,o=>{for(const i of this.buckets.get(o)??[])n.add(i)}),n}blockingSegmentOwners(t,e,n){const o=new Set;for(let i=1;i<e.length;i++){const r=e[i-1],s=e[i];if(this.intersects(r,s))for(const a of this.nearby(r,s)){if(a.owner===t)continue;const A=a.kind==="via"?Cr(a.center,r,s):a.a.z===n?tu(r,s,a.a,a.b):1/0,c=(this.params.traceWidth+(a.kind==="via"?this.params.viaDiameter:this.params.traceWidth))/2+this.params.clearance;A<c-1e-9&&o.add(a.owner)}}return o}blockingViaOwners(t,e){const n=new Set;if(!this.intersects(e))return n;for(const o of this.nearby(e)){if(o.owner===t)continue;const i=o.kind==="via"?tn(e,o.center):Cr(e,o.a,o.b),r=(this.params.viaDiameter+(o.kind==="via"?this.params.viaDiameter:this.params.traceWidth))/2+this.params.clearance;i<r-1e-9&&n.add(o.owner)}return n}};function hSo(t){if(typeof t.fillViaOccupants!="function"||typeof t.pushFlatOccupants!="function")throw new Error("FanoutSolver: native via-occupant interface changed");const e=t.fillViaOccupants.bind(t),n=t.pushFlatOccupants.bind(t),o=new Map;t.fillViaOccupants=(i,r)=>{const s=o.get(i);if(s){const c=t._viaOccs;c.length=0;const l=t.usedCellsFlat,u=t.sharedCellsFlat;for(let g=0;g<s.length;g++){const h=s[g];l&&u&&l[h]===-1&&!u[h]||n(h,r,c)}return}const a=[],A=t.pushFlatOccupants;t.pushFlatOccupants=(c,l,u)=>{a.push(c),n(c,l,u)};try{e(i,r)}finally{t.pushFlatOccupants=A}o.set(i,Int32Array.from(a))}}var pSo=1e-9;function LPe(t){const{vias:e,activeConnectionIndices:n,traceWidth:o,clearance:i,gridStep:r}=t;for(const[g,h]of[["traceWidth",o],["gridStep",r]])if(!Number.isFinite(h)||h<=0)throw new Error(`FanoutSolver: ${g} must be positive and finite`);if(!Number.isFinite(i)||i<0)throw new Error("FanoutSolver: clearance must be non-negative and finite");for(const g of e)if(!Number.isSafeInteger(g.connectionIndex)||g.connectionIndex<0||!Number.isFinite(g.center.x)||!Number.isFinite(g.center.y)||!Number.isFinite(g.diameter)||g.diameter<=0)throw new Error("FanoutSolver: invalid via channel grid site");const s=g=>(g%r+r)%r,a=g=>{const h=s(g+r/2)-r/2;return Math.abs(h)<Number.EPSILON?0:h},A=(o+i)/r,c=Math.ceil(A-Number.EPSILON*Math.max(1,Math.abs(A))*4),l=Number.EPSILON*Math.max(1,r)*32,u=g=>{const h=g==="x"?"y":"x",d=e.toSorted((y,x)=>y.center[h]-x.center[h]||y.center[g]-x.center[g]||y.connectionIndex-x.connectionIndex),p=[];for(const y of d){const x=p.at(-1);x&&Math.abs(x[0].center[h]-y.center[h])<=pSo?x.push(y):p.push([y])}const m=[];for(const y of p){y.sort((x,E)=>x.center[g]-E.center[g]);for(let x=1;x<y.length;x++){const E=y[x-1],B=y[x],S=E.center[g]+E.diameter/2+o/2+i,Q=B.center[g]-B.diameter/2-o/2-i-c*r;if(!Number.isFinite(S)||!Number.isFinite(Q))throw new Error("FanoutSolver: non-finite via channel bounds");Q<S-l||m.push({start:s(S),length:Math.max(0,Q-S),active:n.has(E.connectionIndex)||n.has(B.connectionIndex)})}}const _=m.filter(y=>y.length<r-l).flatMap(y=>[y.start,s(y.start+y.length)]).sort((y,x)=>y-x).filter((y,x,E)=>x===0||y-E[x-1]>l);if(_.length===0)return 0;const f=y=>{let x=0,E=0;for(const B of m)(B.length>=r-l||s(y-B.start)<=B.length+l)&&(E++,B.active&&x++);return[x,E]};let I={active:-1,total:-1,width:0,phase:0};const C=(y,x)=>{y=a(y);const[E,B]=f(y);(E>I.active||E===I.active&&(B>I.total||B===I.total&&(x>I.width+l||Math.abs(x-I.width)<=l&&(Math.abs(y)<Math.abs(I.phase)-l||Math.abs(Math.abs(y)-Math.abs(I.phase))<=l&&y<I.phase))))&&(I={active:E,total:B,width:x,phase:y})};for(let y=0;y<_.length;y++){const x=_[y],E=_[y+1]??_[0]+r;E-x>l&&C((x+E)/2,E-x)}if(I.total===0)for(const y of _)C(y,0);return I.phase};return{x:u("x"),y:u("y")}}var mSo=class{constructor(t,e,n,o){this.planeSize=t,this.neighborOffset=n,this.neighborIds=o,this.layerStride=o.length+t,this.classes=new Uint32Array(this.layerStride*e)}planeSize;neighborOffset;neighborIds;classes;layerStride;values=[void 0,!0,!1];ownerIds=new Map;overflow=new Map;getSlot(t,e){const n=t<this.planeSize?t:t%this.planeSize,o=t<this.planeSize?0:(t-n)/this.planeSize*this.layerStride;if(e===n)return o+this.neighborIds.length+n;const i=this.neighborOffset[n+1];for(let r=this.neighborOffset[n];r<i;r++)if(this.neighborIds[r]===e)return o+r;return-1}get(t,e,n=!1){if(n)return;const o=this.getSlot(t,e);return o<0?this.overflow.get(t*this.planeSize+e):this.values[this.classes[o]]}set(t,e,n,o=!1){if(o)return;const i=this.getSlot(t,e);if(i<0){this.overflow.set(t*this.planeSize+e,n);return}let r=n===!0?1:n===!1?2:this.ownerIds.get(n);r===void 0&&(r=this.values.length,this.values.push(n),this.ownerIds.set(n,r)),this.classes[i]=r}};function _So(t,e,n,o){const i=t.planeSize*t.layers;t.visitedStamp=new Uint32Array(i*3),t.bestGStamp=new Uint32Array(i*3),t.bestGValue=new Float64Array(i*3);let r=new Uint8Array(1024),s=new Int32Array(1024),a=0,A=-1,c=-1,l=-1,u=0;const g=()=>e[t.activeConnId]===!0,h=(_,f,I,C,y)=>_===0&&f===n&&C!==n?1:_===1&&f!==n&&f===C&&I!==y?2:_,d=t.nodePool.push.bind(t.nodePool);t.nodePool.push=(_,f,I,C,y,x)=>{const E=d(_,f,I,C,y,x);if(E>=r.length){const B=Math.max(E+1,r.length*2),S=new Uint8Array(B),Q=new Int32Array(B);S.set(r),Q.set(s),r=S,s=Q}if(C<0||!g()){r[E]=0,s[E]=-1,u=0;const B=t.activeConnSeg;g()&&B&&B.startCellId===B.endCellId&&B.startZ===B.endZ&&(t.failed=!0)}else{const B=r[C],S=t.nodePool.z[C];r[E]=h(B,S,t.nodePool.cellId[C],_,f),s[E]=B===0&&S===n&&_!==n?f:s[C]}return E};const p=t.heap.pop.bind(t.heap);t.heap.pop=()=>{const _=p();return a=r[_],u=a,A=s[_],c=t.nodePool.cellId[_],l=t.nodePool.z[_],_};const m=t.getSearchStateIdx.bind(t);return t.getSearchStateIdx=(_,f)=>m(_,f)+(g()?u*i:0),{beforeFirstVia:()=>!g()||a===0,prepareMove(_,f,I){if(u=g()?h(a,l,c,_,f):0,!g())return!0;if(I&&_===n&&(u!==2||A<0||Math.hypot(t.cellCenterX[f]-t.cellCenterX[A],t.cellCenterY[f]-t.cellCenterY[A])<o-1e-9))return!1;const C=t.activeConnSeg;return _!==C.endZ||f!==C.endCellId||u===2}}}function Jy(t,e){return t.targetLayerByBusId?.get(e)??t.targetLayer}var fSo=class extends fC{constructor(t){super(),this.options=t,this.activeSubSolver=t.router,this.MAX_ITERATIONS=Math.ceil(t.router.MAX_ITERATIONS/5e3)+1}options;partialCandidates=[];partialSignatures=new Set;_step(){const{router:t}=this.options;for(let e=0;e<5e3&&!t.solved&&!t.failed;e++)t.step();this.collectPartialCandidate(),this.stats={iterations:t.iterations,routedConnectionCount:t.getSolvedRouteCount(),connectionCount:this.options.connectionCount},(t.solved||t.failed)&&(this.activeSubSolver=null,this.solved=!0)}collectPartialCandidate(){const{router:t,connectionCount:e,sourceOrigin:n,maximumPartialCandidates:o}=this.options;if(o===0||e<(n?2:3)||t.getSolvedRouteCount()!==e-1)return;const i=t.getOutput(),r=i.map(s=>{const a=s.route[Math.floor(s.route.length/2)];return`${s.connectionName}:${s.route.length}:${a.x},${a.y}`}).sort().join(";");this.partialSignatures.has(r)||n&&this.partialCandidates.length>=o||(this.partialSignatures.add(r),this.partialCandidates.push(i),this.partialCandidates.length>o&&this.partialCandidates.shift())}computeProgress(){return this.options.router.iterations/this.options.router.MAX_ITERATIONS}getConstructorParams(){return[this.options]}visualize(){return this.activeSubSolver?.visualize()??this.options.router.visualize()}},ISo=class d4n{constructor(e,n){this.cellSize=e,this.margin=n}cellSize;margin;buckets=new Map;add(e){let n,o,i,r;if(e.kind==="segment"){const s=e.segment,a=this.margin+s.width/2;n=Math.min(s.start.x,s.end.x)-a,o=Math.max(s.start.x,s.end.x)+a,i=Math.min(s.start.y,s.end.y)-a,r=Math.max(s.start.y,s.end.y)+a}else if(e.kind==="via"){const s=this.margin+e.diameter/2;n=e.center.x-s,o=e.center.x+s,i=e.center.y-s,r=e.center.y+s}else{const s=e.obstacle,a=Math.hypot(s.width,s.height)/2+this.margin;n=s.center.x-a,o=s.center.x+a,i=s.center.y-a,r=s.center.y+a}for(let s=this.cell(n);s<=this.cell(o);s++)for(let a=this.cell(i);a<=this.cell(r);a++){const A=`${s},${a}`,c=this.buckets.get(A)??new Set;c.add(e),this.buckets.set(A,c)}}nearby(e,n=e){const o=new Set;for(let i=this.cell(Math.min(e.x,n.x));i<=this.cell(Math.max(e.x,n.x));i++)for(let r=this.cell(Math.min(e.y,n.y));r<=this.cell(Math.max(e.y,n.y));r++)for(const s of this.buckets.get(`${i},${r}`)??[])o.add(s);return[...o]}clone(){const e=new d4n(this.cellSize,this.margin);for(const[n,o]of this.buckets)e.buckets.set(n,new Set(o));return e}cell(e){return Math.floor(e/this.cellSize)}};function sue(t){const e=[];for(const n of t){const o=e.at(-2),i=e.at(-1);if(o&&i&&o.z===i.z&&i.z===n.z){const r=i.x-o.x,s=i.y-o.y,a=n.x-i.x,A=n.y-i.y;Math.abs(r*A-s*a)<1e-10&&r*a+s*A>=0&&e.pop()}e.push(n)}return e}function aue(t,e,n){const o=new Map(t.buses.flatMap(s=>s.connections.map(a=>[a.connection.name,{bus:s,connection:a}]))),i=new Map(t.terminals.map(s=>[s.connection.connection.name,s])),r=[];for(const s of e){const a=o.get(s.connectionName),A=i.get(s.connectionName);if(!a||!A)return null;const{bus:c,connection:l}=a,u=sue(s.route),g=n.get(l.connectionIndex);if(!u.length||tn(u[0],A.viaPoint)>1e-7||tn(u.at(-1),A.exitPoint)>1e-7||t.startLayerByBusId!==void 0&&t.layerNames[u[0].z]!==t.startLayerByBusId.get(c.busId)||t.layerNames[u.at(-1).z]!==Jy(t,c.busId)||u.some(f=>!(c.allowedLayers??t.layerNames).includes(t.layerNames[f.z])))return null;const h=i4({...t,bus:c,terminal:A,targetLayer:t.layerNames[u[0].z],targetLayerPoints:[A.viaPoint,A.exitPoint],sourceEscapePoints:g,allowBlindAndBuriedVias:!1}),d=h.trace.route.findIndex(f=>f.route_type==="via");if(d<0)return null;const p=h.trace.route.slice(0,d+2),m=g.slice(1).map((f,I)=>({start:g[I],end:f,width:t.traceWidth,layer:l.sourceLayer})),_=[];for(let f=1;f<u.length;f++){const I=u[f],C=u[f-1],y=t.layerNames[C.z],x=t.layerNames[I.z];if(y!==x){if(tn(C,I)>1e-7)return null;_.push({center:{x:I.x,y:I.y},diameter:t.viaDiameter,holeDiameter:t.viaHoleDiameter,fromLayer:y,toLayer:x,spanLayers:[...t.layerNames]}),p.push({route_type:"via",x:I.x,y:I.y,from_layer:y,to_layer:x,via_diameter:t.viaDiameter,via_hole_diameter:t.viaHoleDiameter})}else tn(C,I)>1e-9&&m.push({start:{x:C.x,y:C.y},end:{x:I.x,y:I.y},width:t.traceWidth,layer:x});p.push({route_type:"wire",x:I.x,y:I.y,layer:x,width:t.traceWidth})}r.push({...h,targetLayer:Jy(t,c.busId),trace:{...h.trace,route:p},segments:m,additionalVias:_,length:m.reduce((f,I)=>f+tn(I.start,I.end),0)})}return r}function AE(t){return HPe(t,new WeakMap)}function*HPe(t,e){const{buses:n,allBuses:o,targetLayer:i,layerNames:r,traceWidth:s,clearance:a,viaDiameter:A,srj:c}=t,l=t.maximumIterations??3e7,u=t.heuristicWeight??1.5;if(!Number.isFinite(u)||u<=0)throw new Error("heuristicWeight must be finite and positive");if(!Number.isSafeInteger(l)||l<1)throw new Error("maximumIterations must be a positive safe integer");const g=t.maximumLocalRepairAttempts??3,h=t.maximumSourceOriginRepairAttempts??0;if(!Number.isSafeInteger(g)||g<0)throw new Error("maximumLocalRepairAttempts must be a non-negative safe integer");if(!Number.isSafeInteger(h)||h<0)throw new Error("maximumSourceOriginRepairAttempts must be a non-negative safe integer");const d=t.ripCost??8;if(!Number.isFinite(d)||d<=0)throw new Error("ripCost must be finite and positive");if(t.maximumRipEvents!==void 0&&(!Number.isSafeInteger(t.maximumRipEvents)||t.maximumRipEvents<1))throw new Error("maximumRipEvents must be a positive safe integer");const p=t.traceMarginExtra??s/2;if(!Number.isFinite(p)||p<0)throw new Error("traceMarginExtra must be finite and non-negative");const m=t.routeFromSourcePads??!1;if(t.terminalApproachLength!==void 0&&(!Number.isFinite(t.terminalApproachLength)||t.terminalApproachLength<=0))throw new Error("terminalApproachLength must be finite and positive");const _=m||t.startLayerByBusId!==void 0||t.terminalApproachLength!==void 0,f=t.sourceLayerTravelCost??1;if(!Number.isFinite(f)||f<1)throw new Error("sourceLayerTravelCost must be finite and at least one");const I=[...new Set(n.map(mt=>Jy(t,mt.busId)))],C=t.startLayerByBusId?n.map(mt=>t.startLayerByBusId.get(mt.busId)):[],y=m?[...new Set([i,"top",...t.transitLayers??[],...I,...C])]:[...new Set([i,...t.transitLayers??[],...I,...C])],x=r.indexOf(i),E=m&&t.allowSourceOriginTopFinal===!0&&I.includes("top"),B=E?n.filter(mt=>Jy(t,mt.busId)==="top"):[],S=new Map(B.map(mt=>[mt.busId,o.find(st=>st.busId===mt.busId)])),Q=new Set((E?o:[]).flatMap(mt=>mt.termination.type==="plane"?[mt.termination.layer]:[]));if(B.some(mt=>{const st=S.get(mt.busId);if(!st||mt.connections.length!==st.connections.length||mt.connections.some(Xe=>!st.connections.some(Ze=>Ze.connectionIndex===Xe.connectionIndex&&Ze.connection.name===Xe.connection.name&&Ze.sourceObstacle===Xe.sourceObstacle)))return!0;const xt=(st.routableEscapeLayers??st.allowedLayers??r).filter(Xe=>(st.allowedLayers??r).includes(Xe));return!xt.includes("top")||!y.some(Xe=>Xe!=="top"&&!Q.has(Xe)&&xt.includes(Xe)&&(mt.routableEscapeLayers??mt.allowedLayers??r).includes(Xe)&&(mt.allowedLayers??r).includes(Xe))})||n.length===0||x<0||I.some(mt=>!r.includes(mt))||t.targetLayerByBusId&&n.some(mt=>!t.targetLayerByBusId.has(mt.busId))||t.startLayerByBusId&&(m||n.some(mt=>!t.startLayerByBusId.has(mt.busId)))||y.some(mt=>!r.includes(mt)))return null;const w=n.flatMap(mt=>mt.connections),M=new Set(w.map(mt=>mt.connectionIndex));if(m&&w.some(mt=>mt.sourceLayer!=="top")||M.size!==w.length||t.terminals.length!==w.length||new Set(t.terminals.map(mt=>mt.connection.connectionIndex)).size!==M.size||t.terminals.some(mt=>!M.has(mt.connection.connectionIndex))||n.some(mt=>mt.termination.type!=="boundary"||!(mt.allowedLayers??r).includes(Jy(t,mt.busId))||!(mt.routableEscapeLayers??mt.allowedLayers??r).includes(Jy(t,mt.busId)))||(t.startLayerByBusId?n.some(mt=>{const st=t.startLayerByBusId.get(mt.busId);return!(mt.allowedLayers??r).includes(st)||!(mt.routableEscapeLayers??mt.allowedLayers??r).includes(st)||mt.connections.some(xt=>xt.sourceLayer===st)}):!E&&o.some(mt=>mt.connections.some(st=>I.includes(st.sourceLayer)))))return null;const k=n[0].sharedBoundary;if(n.some(mt=>Object.keys(k).some(st=>mt.sharedBoundary[st]!==k[st])))return null;const R=new Map,F=new Map,O=new ISo(Math.max(.5,A*2),Math.max(s,A)/2+a+1e-7),U=new Map(w.map(mt=>[mt.connection.name,mt])),Y=new Map(w.map(mt=>[mt.sourceObstacle,mt])),W=m?new Map(w.map(mt=>[mt.sourceObstacle,{connectionName:mt.connection.name,sourcePoint:U.get(mt.connection.name).sourcePoint}])):void 0;for(const mt of c.obstacles)O.add({kind:"obstacle",obstacle:mt});for(const mt of o)for(const st of mt.connections){F.set(st.connection.name,mt);const xt=t.fixedViaPointsByConnectionIndex.get(st.connectionIndex);if(!xt)return null;const Xe=t.sourceEscapePaths?.get(st.connectionIndex)??[st.sourcePoint,xt];if(Xe.length<2||tn(Xe[0],st.sourcePoint)>1e-7||tn(Xe.at(-1),xt)>1e-7)return null;if(R.set(st.connectionIndex,Xe),!(m&&M.has(st.connectionIndex))){O.add({kind:"via",connectionName:st.connection.name,center:xt,diameter:A,layers:r});for(let Ze=1;Ze<Xe.length;Ze++)O.add({kind:"segment",connectionName:st.connection.name,segment:{start:Xe[Ze-1],end:Xe[Ze],width:s,layer:st.sourceLayer}})}}for(const mt of t.terminals)if(tn(mt.viaPoint,t.fixedViaPointsByConnectionIndex.get(mt.connection.connectionIndex))>1e-7)return null;for(const mt of t.acceptedPlans){for(const st of[...mt.segments,...mt.planeEndpointSegments??[]])O.add({kind:"segment",connectionName:mt.connectionName,segment:st});for(const st of[mt.via,...mt.additionalVias??[],mt.planeEndpointVia])st&&O.add({kind:"via",connectionName:mt.connectionName,...st,layers:st.spanLayers})}for(const mt of Z7(c,!1)){for(const st of mt.segments)O.add({kind:"segment",connectionName:mt.connectionName,segment:st});for(const st of mt.vias)O.add({kind:"via",connectionName:mt.connectionName,...st,layers:st.spanLayers})}const te=new Map;if(t.terminalApproachLength!==void 0)for(const mt of t.terminals){const st=mt.connection.connection.name,xt=F.get(st),Xe=aSo({connectionName:st,edge:xt.exitEdge??Xj(xt.direction),layer:Jy(t,xt.busId),exit:mt.exitPoint,bounds:k,approachLength:t.terminalApproachLength});te.set(st,Xe),O.add({kind:"segment",connectionName:st,segment:{start:Xe.goal,end:Xe.exit,width:s,layer:Xe.layer}})}const j={capacityMeshNodeId:"reserved-via-buses",center:{x:(k.minX+k.maxX)/2,y:(k.minY+k.maxY)/2},width:k.maxX-k.minX,height:k.maxY-k.minY,availableZ:y.map(mt=>r.indexOf(mt)),portPoints:t.terminals.flatMap(mt=>[m?mt.connection.sourcePoint:mt.viaPoint,te.get(mt.connection.connection.name)?.goal??mt.exitPoint].map((st,xt)=>({...st,z:m&&xt===0?r.indexOf(mt.connection.sourceLayer):xt===0&&t.startLayerByBusId?r.indexOf(t.startLayerByBusId.get(F.get(mt.connection.connection.name).busId)):r.indexOf(Jy(t,F.get(mt.connection.connection.name).busId)),connectionName:mt.connection.connection.name,rootConnectionName:mt.connection.connection.name})))};if(t.tightViaChannels){const mt=LPe({vias:[...t.fixedViaPointsByConnectionIndex].filter(([st])=>!m||!t.sourceOriginPhysicalGridPhase||!M.has(st)).map(([st,xt])=>({connectionIndex:st,center:xt,diameter:A})),activeConnectionIndices:M,traceWidth:s,clearance:a,gridStep:s});for(const st of["x","y"]){const xt=(st==="x"?k.minX:k.minY)+s/2;j.center[st]+=mt[st]-(xt+Math.round((mt[st]-xt)/s)*s)}}const oe=new Vz({nodeWithPortPoints:j,traceWidth:s,viaDiameter:A}).generateSolver({HIGH_DENSITY_A03:!0});if(typeof oe.computeMoveCostAndRips!="function"||typeof oe.markTraceFootprint!="function"||typeof oe.addSharedOccupant!="function"||typeof oe.getSolvedRouteCount!="function"||te.size>0&&(typeof oe.pointToCell!="function"||typeof oe.finalizeRoute!="function"||typeof oe.ripTrace!="function"))return null;const ie=oe.constructor,ne=new ie({nodeWithPortPoints:j,highResolutionCellSize:s,lowResolutionCellSize:s,traceThickness:s,traceMargin:a+p,viaDiameter:A,maxCellCount:16e4*y.length,effort:20,hyperParameters:{shuffleSeed:t.shuffleSeed??1,greedyMultiplier:u,ripCost:d}}),le=ne._setup.bind(ne),ge=ne.computeMoveCostAndRips.bind(ne);let _e=-1,ue=-1,fe=[],pe=[],ye,Me=[],ve=new Set,he;const Qe=new Map,Pe=new WeakMap,we=new Map;let Te;const Re=mt=>({x:ne.cellCenterX[mt],y:ne.cellCenterY[mt]}),Ee=mt=>mt.x>=k.minX-1e-9&&mt.x<=k.maxX+1e-9&&mt.y>=k.minY-1e-9&&mt.y<=k.maxY+1e-9,ke=mt=>{const st=we.get(mt);if(st!==void 0)return st;const xt=Re(mt),Xe=O.nearby(xt).every(Ze=>Ze.kind==="via"?tn(xt,Ze.center)>=(A+Ze.diameter)/2+a-1e-9:Ze.kind==="segment"?Cr(xt,Ze.segment.start,Ze.segment.end)>=(A+Ze.segment.width)/2+a-1e-9:Tl({start:xt,end:xt},Ze.obstacle)>=A/2+a-1e-9);return we.set(mt,Xe),Xe};ne._setup=()=>{if(le(),ne.failed)return;if(t.includeDiagonalNeighbors&&Object.assign(ne,sSo(ne)),te.size>0){if(typeof ne.ripChain?.contains!="function"||typeof ne.ripChain?.append!="function"||!Number.isFinite(ne.hyperParameters.ripTracePenalty)||!Number.isFinite(ne.hyperParameters.ripViaPenalty)){ne.failed=!0;return}for(const Wt of te.values())if(!Le(Wt.goal,Wt.exit,Wt.layer,Wt.connectionName)){ne.failed=!0;return}const st=[...te.values()].map(Wt=>({connector:Wt,cellId:ne.pointToCell(Wt.goal).cellId})),xt=uSo({grid:ne,terminals:st,margin:Math.max(s,A)+a+1e-7,segmentIsClear:(Wt,Xt,Jt)=>Ee(Wt)&&Ee(Xt)&&Le(Wt,Xt,Jt.layer,Jt.connectionName)});ne.neighborOffset=xt.neighborOffset,ne.neighborIds=xt.neighborIds,ne.neighborCosts=xt.neighborCosts,ve=xt.extendedEdges;const Xe=new Map(st.map(({connector:Wt,cellId:Xt})=>[Wt.connectionName,Xt])),Ze=ne.getOutput.bind(ne);ne.getOutput=()=>Ze().map(Wt=>{const Xt=gSo(Wt,te.get(Wt.connectionName),Re(Xe.get(Wt.connectionName))),Jt=[];if(!m){const ht=U.get(Wt.connectionName),Kt=R.get(ht.connectionIndex);for(let rn=1;rn<Kt.length;rn++)Jt.push({start:Kt[rn-1],end:Kt[rn],width:s,layer:ht.sourceLayer})}const yn=Wt.route.at(-2).z!==Wt.route.at(-1).z,An=Wt.route.length-(yn?1:2);let kn=-1;for(let ht=1;ht<Xt.route.length;ht++){const Kt=Xt.route[ht-1],rn=Xt.route[ht];Kt.z===rn.z&&(ht-1===An&&(kn=Jt.length),Jt.push({start:Kt,end:rn,width:s,layer:r[Kt.z]}))}const $n={rawSegments:Jt,firstEntrySegmentIndex:kn};return Qe.set(Wt.connectionName,$n),Pe.set(Xt,$n),Xt}),he=new dSo({regions:xt.regions,traceWidth:s,clearance:a,viaDiameter:A,getRoutes:()=>ne.getOutput()});const dt=ne.finalizeRoute.bind(ne),Ut=ne.ripTrace.bind(ne);ne.finalizeRoute=Wt=>{dt(Wt),he.invalidate()},ne.ripTrace=Wt=>{Ut(Wt),he.invalidate()}}hSo(ne),Te=new mSo(ne.planeSize,y.length,ne.neighborOffset,ne.neighborIds),fe=Array.from({length:y.length},(st,xt)=>r[ne.layerToZ.get(xt)]),pe=ne.connIdToName.map(st=>{const xt=F.get(st),Xe=xt?(xt.routableEscapeLayers??xt.allowedLayers??r).filter(Ut=>(xt.allowedLayers??r).includes(Ut)):[],Ze=xt&&S.get(xt.busId),dt=Ze?(Ze.routableEscapeLayers??Ze.allowedLayers??r).filter(Ut=>(Ze.allowedLayers??r).includes(Ut)&&!Q.has(Ut)):void 0;return fe.map(Ut=>(Xe.includes(Ut)||m&&Ut==="top")&&(!dt||dt.includes(Ut)))}),ne.MAX_ITERATIONS=l,t.maximumRipEvents!==void 0&&(ne.MAX_RIPS=t.maximumRipEvents),ne.gridToBoundsTransform={a:1,b:0,c:0,d:0,e:1,f:0};const mt=ne.heap.pop.bind(ne.heap);if(ne.heap.pop=()=>{const st=mt();return _e=ne.nodePool.cellId[st],ue=ne.nodePool.z[st],st},E){const st=ne.layers*ne.planeSize,xt=fe.indexOf("top");if(typeof ne.getSearchStateIdx!="function"||typeof ne.nodePool.push!="function"||!(ne.visitedStamp instanceof Uint32Array)||!(ne.bestGStamp instanceof Uint32Array)||!(ne.bestGValue instanceof Float64Array)||ne.visitedStamp.length!==st||ne.bestGStamp.length!==st||ne.bestGValue.length!==st||ne.getSearchStateIdx(0,0)!==0||ne.getSearchStateIdx(st-1,1)!==st-1||xt<0){ne.failed=!0;return}Me=ne.connIdToName.map(Xe=>{const Ze=F.get(Xe);return!!Ze&&Jy(t,Ze.busId)==="top"}),ye=_So(ne,Me,xt,A+a)}},ne.markTraceFootprint=(mt,st,xt,Xe)=>{const Ze=Re(xt),dt=ne.traceKeepoutRadius;ne.forEachCellNearCircle(Ze.x,Ze.y,dt,Ut=>{const Wt=t.tightViaChannels?ne.cellCenterX[Ut]-Ze.x:Math.max(ne.cellMinX[Ut]-Ze.x,0,Ze.x-ne.cellMaxX[Ut]),Xt=t.tightViaChannels?ne.cellCenterY[Ut]-Ze.y:Math.max(ne.cellMinY[Ut]-Ze.y,0,Ze.y-ne.cellMaxY[Ut]),Jt=dt-(t.tightViaChannels?1e-9:0);if(t.tightViaChannels?Wt*Wt+Xt*Xt>=Jt*Jt:Wt*Wt+Xt*Xt>Jt*Jt)return;const yn=st*ne.planeSize+Ut;if(Ut!==xt&&ne.shouldSkipFixedPortHalo(yn,mt))return;const An=ne.usedCellsFlat[yn];An!==-1&&An!==mt?ne.addSharedOccupant(yn,mt):ne.usedCellsFlat[yn]=mt,Xe.push(yn)})};const Ce=(mt,st,xt,Xe)=>Xe.kind==="obstacle"?!Xe.obstacle.layers.includes(xt)||Tl({start:mt,end:st},Xe.obstacle)>=s/2+a-1e-9:Xe.kind==="via"?!Xe.layers.includes(xt)||Cr(Xe.center,mt,st)>=(s+Xe.diameter)/2+a-1e-9:Xe.segment.layer!==xt||tu(mt,st,Xe.segment.start,Xe.segment.end)>=(s+Xe.segment.width)/2+a-1e-9,Le=(mt,st,xt,Xe,Ze=O.nearby(mt,st))=>Ze.every(dt=>dt.kind!=="obstacle"&&dt.connectionName===Xe||m&&dt.kind==="obstacle"&&xt==="top"&&Y.get(dt.obstacle)?.connection.name===Xe&&Tl({start:mt,end:mt},dt.obstacle)<s/2+a-1e-9&&tn(st,U.get(Xe).sourcePoint)>=tn(mt,U.get(Xe).sourcePoint)-1e-9||Ce(mt,st,xt,dt)),Ye=(mt,st,xt)=>{let Xe;for(const Ze of O.nearby(mt,st)){if(Ce(mt,st,xt,Ze))continue;if(Ze.kind==="obstacle"&&!m)return!1;const dt=Ze.kind==="obstacle"?rSo(mt,st,xt,s,a,Ze.obstacle,W?.get(Ze.obstacle)):Ze.connectionName;if(dt===void 0||Xe!==void 0&&Xe!==dt)return!1;Xe=dt}return Xe??!0};ne.computeMoveCostAndRips=(mt,st,xt,Xe,Ze,dt,Ut)=>{const Wt=ne.connIdToName[mt],Xt=fe[st],Jt=ne.activeConnSeg;if(ye&&!ye.prepareMove(st,xt,Xe)||!pe[mt][st]||Xe&&(m&&Xt==="top"&&!Me[mt]||!ke(xt))){ne._moveCost=-1;return}const yn=_e===Jt.startCellId&&(!_||ue===Jt.startZ)&&(!ye||ye.beforeFirstVia());let An,kn,$n;if(he){const Lt=xt===Jt.endCellId&&st===Jt.endZ;if(ve.has(`${_e}:${xt}`)&&!Lt){ne._moveCost=-1;return}const Ho=te.get(Wt);if(An=yn?Jt.startPoint:Re(_e),kn=Lt?Jt.endPoint:Re(xt),$n=Lt?rue(Xe?Re(xt):An,Ho):void 0,Lt&&(!$n||Xe&&tn(An,Re(xt))>1e-7)){ne._moveCost=-1;return}}const ht=st*ne.planeSize+_e,Kt=yn||xt===Jt.endCellId&&(!_||st===Jt.endZ);let rn=Te.get(ht,xt,Kt);if(rn===void 0){if(An??=yn?Jt.startPoint:Re(_e),kn??=xt===Jt.endCellId&&(!_||st===Jt.endZ)?Jt.endPoint:Re(xt),!Ee(An)||!Ee(kn)){ne._moveCost=-1;return}rn=Kt?$n?$n.slice(1).every((Lt,Ho)=>Le($n[Ho],Lt,Xt,Wt)):Le(An,kn,Xt,Wt):Ye(An,kn,Xt),Te.set(ht,xt,rn,Kt)}if(rn!==!0&&rn!==Wt){ne._moveCost=-1;return}if(ge(mt,st,xt,Xe,Ze,dt,Ut),he&&ne._moveCost>=0){const Lt=Xe?he.blockingViaOwners(Wt,Re(xt)):he.blockingSegmentOwners(Wt,$n??[An,kn],ne.layerToZ.get(st));if(Xe&&$n)for(const Ho of he.blockingSegmentOwners(Wt,$n,ne.layerToZ.get(st)))Lt.add(Ho);for(const Ho of Lt){const Ao=ne.connIdToName.indexOf(Ho);if(Ao<0)throw new Error("Cannot resolve dynamic terminal copper owner");ne.ripChain.contains(ne._moveRippedHead,Ao)||(ne._moveRippedHead=ne.ripChain.append(ne._moveRippedHead,Ao),ne._moveRipCount++,ne._moveCost+=d),ne._moveCost+=Xe?ne.hyperParameters.ripViaPenalty:ne.hyperParameters.ripTracePenalty}}m&&!Xe&&Xt==="top"&&ne._moveCost>=0&&(!ye||ye.beforeFirstVia())&&(ne._moveCost+=Ut*(f-1))};const tt=m?h:g;ne.setup();const At=new fSo({router:ne,connectionCount:w.length,sourceOrigin:m,maximumPartialCandidates:tt});for(yield{type:"subsolver",solver:At,iterations:ne.iterations,routedConnectionCount:ne.getSolvedRouteCount(),connectionCount:w.length};!At.solved&&!At.failed;)At.step(),yield{iterations:ne.iterations,routedConnectionCount:ne.getSolvedRouteCount(),connectionCount:w.length};const{partialCandidates:at}=At,nt=mt=>o.flatMap(st=>st.connections.filter(xt=>!mt.has(xt.connectionIndex)).map(xt=>{const Xe=t.fixedViaPointsByConnectionIndex.get(xt.connectionIndex),Ze=st.termination.type==="plane"?st.termination.layer:(st.allowedLayers??r).find(dt=>dt!==xt.sourceLayer);return i4({...t,bus:st,terminal:{connection:xt,viaPoint:Xe,exitPoint:Xe},targetLayer:Ze,targetLayerPoints:[Xe],sourceEscapePoints:R.get(xt.connectionIndex),allowBlindAndBuriedVias:!1})})),gt=(mt,st=new Set)=>{const xt=nt(new Set([...[...mt,...t.acceptedPlans].map(Xe=>Xe.connectionIndex),...st]));return(te.size===0||mt.every(Xe=>{const Ze=te.get(Xe.connectionName);if(!Ze)return!0;const dt=Xe.segments.at(-1);return!!dt&&dt.layer===Ze.layer&&tn(dt.end,Ze.exit)<1e-7&&Cr(Ze.goal,dt.start,dt.end)<1e-7&&FPe({plan:Xe,splice:e.get(Xe)??Qe.get(Xe.connectionName)??{rawSegments:[],firstEntrySegmentIndex:-1},maximumJoinLength:s/4,clearance:a})}))&&Wh({plans:[...mt],srj:c,sharedBoundary:k,clearance:a,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1})&&qu({inputSrj:c,routedSrj:{...c,traces:[...c.traces??[],...[...mt,...t.acceptedPlans,...xt].flatMap(Xe=>[Xe.trace,...Xe.planeEndpointTrace?[Xe.planeEndpointTrace]:[]])]},clearance:a,allowBlindAndBuriedVias:!1}).valid},bt=(mt,st)=>{const xt=mt.findIndex((Ut,Wt)=>Wt>0&&Ut.z!==mt[Wt-1].z);if(xt<1||mt.slice(0,xt).some(Ut=>r[Ut.z]!=="top")||tn(mt[xt-1],mt[xt])>1e-7)return!1;const Xe=F.get(st);if(!S.has(Xe.busId))return!mt.slice(xt).some(Ut=>r[Ut.z]==="top");let Ze=!1,dt=!1;for(let Ut=xt+1;Ut<mt.length;Ut++){const Wt=mt[Ut-1],Xt=mt[Ut];if(Wt.z===Xt.z&&r[Wt.z]!=="top"&&tn(Wt,Xt)>1e-7&&(Ze=!0),Wt.z!==Xt.z&&r[Xt.z]==="top"){if(!Ze||tn(Wt,Xt)>1e-7||tn(mt[xt],Xt)<A+a-1e-9)return!1;dt=!0}}return dt&&ENt({points:mt,topZ:r.indexOf("top"),traceWidth:s,viaDiameter:A,clearance:a})},Ct=mt=>{if(Qe.clear(),te.size===0)return!0;for(const st of mt){const xt=Pe.get(st);if(!xt)return!1;Qe.set(st.connectionName,xt)}return!0},Dt=(mt,st=new Set)=>{if(!mt||!gt(mt,st))return null;for(const xt of mt){const Xe=Qe.get(xt.connectionName);Xe&&!e.has(xt)&&e.set(xt,Xe)}return mt},kt=mt=>{if(te.size===0)return mt;const st=lSo({plans:mt,splices:Qe,connectors:te,clearance:a,segmentIsClear:(xt,Xe)=>Ee(xt.start)&&Ee(xt.end)&&Le(xt.start,xt.end,xt.layer,Xe)});if(!st)return null;for(const[xt,Xe]of st.splices)Qe.set(xt,Xe);return st.plans},it=(mt,st=new Set)=>{if(!Ct(mt))return null;const xt=new Map(R),Xe=[],Ze=[];for(const ht of mt){const Kt=t.terminals.find(Ho=>Ho.connection.connection.name===ht.connectionName),rn=ht.route.findIndex((Ho,Ao)=>Ao>0&&Ho.z!==ht.route[Ao-1].z);if(!bt(ht.route,ht.connectionName)||r[ht.route.at(-1).z]!==Jy(t,F.get(ht.connectionName).busId)||tn(ht.route[rn-1],ht.route[rn])>1e-7)return null;const Lt=ht.route[rn];xt.set(Kt.connection.connectionIndex,sue(ht.route.slice(0,rn)).map(({x:Ho,y:Ao})=>({x:Ho,y:Ao}))),Xe.push({...Kt,viaPoint:{x:Lt.x,y:Lt.y}}),Ze.push({...ht,route:ht.route.slice(rn),vias:[]})}const dt=aue({...t,terminals:Xe},Ze,xt);if(!dt)return null;const Ut=kt(dt);if(!Ut)return null;const Wt=MPe({...t,inputSrj:c,plans:Ut,preparedBuses:n,reservedPlans:[...t.acceptedPlans,...nt(M)],allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});if(!Wt)return null;const Xt=Wt.map(ht=>({connectionName:ht.connectionName,route:ht.trace.route.flatMap(Kt=>Kt.route_type==="wire"?[{x:Kt.x,y:Kt.y,z:r.indexOf(Kt.layer)}]:[]),vias:[ht.via.center]})),Jt=O.clone(),yn=ht=>{for(let Kt=1;Kt<ht.route.length;Kt++){const rn=ht.route[Kt-1],Lt=ht.route[Kt];rn.z===Lt.z?Jt.add({kind:"segment",connectionName:ht.connectionName,segment:{start:rn,end:Lt,width:s,layer:r[rn.z]}}):Jt.add({kind:"via",connectionName:ht.connectionName,center:rn,diameter:A,layers:r})}};Xt.forEach(yn);const An=[],kn=[];for(const ht of Xt){const Kt=t.terminals.find(Ao=>Ao.connection.connection.name===ht.connectionName),rn=eR({points:sue(ht.route),chamfer:s/4,segmentIsClear:(Ao,qe)=>{for(const vt of[Ao,qe])if(!Ee(vt)||(Math.abs(vt.x-k.minX)<1e-7||Math.abs(vt.x-k.maxX)<1e-7||Math.abs(vt.y-k.minY)<1e-7||Math.abs(vt.y-k.maxY)<1e-7)&&tn(vt,Kt.exitPoint)>1e-7)return!1;return Le(Ao,qe,r[Ao.z],ht.connectionName,Jt.nearby(Ao,qe))}});if(!rn)return null;const Lt=rn.findIndex((Ao,qe)=>qe>0&&Ao.z!==rn[qe-1].z);if(!bt(rn,ht.connectionName)||r[rn.at(-1).z]!==Jy(t,F.get(ht.connectionName).busId))return null;const Ho=rn[Lt];R.set(Kt.connection.connectionIndex,rn.slice(0,Lt).map(({x:Ao,y:qe})=>({x:Ao,y:qe}))),kn.push({...Kt,viaPoint:{x:Ho.x,y:Ho.y}}),An.push({...ht,route:rn.slice(Lt),vias:[]}),yn({...ht,route:rn})}const $n=aue({...t,terminals:kn},An,R);return Dt($n,st)},Yt=mt=>{if(!Ct(mt))return null;let st=mt;const xt=O.clone(),Xe=new Set([...st.map(yn=>t.terminals.find(An=>An.connection.connection.name===yn.connectionName).connection.connectionIndex),...t.acceptedPlans.map(yn=>yn.connectionIndex)]),Ze=nt(Xe),dt=aue(t,st,R);if(!dt)return null;const Ut=kt(dt);if(!Ut)return null;const Wt=MPe({...t,inputSrj:c,plans:Ut,preparedBuses:n,reservedPlans:[...t.acceptedPlans,...Ze],allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});if(!Wt)return null;st=Wt.map(yn=>{const An=yn.trace.route.findIndex(kn=>kn.route_type==="via");return{connectionName:yn.connectionName,route:yn.trace.route.slice(An+1).flatMap(kn=>kn.route_type==="wire"?[{x:kn.x,y:kn.y,z:r.indexOf(kn.layer)}]:[]),vias:(yn.additionalVias??[]).map(kn=>kn.center)}});const Xt=yn=>{for(let An=1;An<yn.route.length;An++){const kn=yn.route[An-1],$n=yn.route[An];kn.z===$n.z&&xt.add({kind:"segment",connectionName:yn.connectionName,segment:{start:kn,end:$n,width:s,layer:r[kn.z]}})}for(const An of yn.vias)xt.add({kind:"via",connectionName:yn.connectionName,center:An,diameter:A,layers:r})};for(const yn of st)Xt(yn);for(const yn of st){const An=t.terminals.find($n=>$n.connection.connection.name===yn.connectionName),kn=eR({points:sue(yn.route),chamfer:s/4,segmentIsClear:($n,ht)=>{for(const Kt of[$n,ht])if(!Ee(Kt)||(Math.abs(Kt.x-k.minX)<1e-7||Math.abs(Kt.x-k.maxX)<1e-7||Math.abs(Kt.y-k.minY)<1e-7||Math.abs(Kt.y-k.maxY)<1e-7)&&tn(Kt,An.exitPoint)>1e-7)return!1;return Le($n,ht,r[$n.z],yn.connectionName,xt.nearby($n,ht))}});if(!kn)return null;yn.route=kn,Xt(yn)}const Jt=aue(t,st,R);return Dt(Jt)};if(ne.solved&&!ne.failed){const mt=ne.getOutput();return mt.length!==w.length||new Set(mt.map(st=>st.connectionName)).size!==w.length?null:m?it(mt):Yt(mt)}if(m&&h>0){for(const mt of at){const st=new Set(mt.map(Xt=>Xt.connectionName)),xt=t.terminals.filter(Xt=>!st.has(Xt.connection.connection.name));if(xt.length!==1)continue;const Xe=xt[0].connection.connectionIndex,Ze=new Map(R),dt=it(mt,new Set([Xe]));R.clear();for(const[Xt,Jt]of Ze)R.set(Xt,Jt);if(!dt)continue;const Ut=CSo(t,dt,e);let Wt=Ut.next();for(;!Wt.done;)yield{iterations:ne.iterations+Wt.value.iterations,routedConnectionCount:Wt.value.routedConnectionCount,connectionCount:w.length},Wt=Ut.next();if(Wt.value&&gt(Wt.value))return Wt.value}return null}if(m||g===0||at.length===0)return null;const pn=nt(new Set(t.acceptedPlans.map(mt=>mt.connectionIndex))),be=new Map(pn.map(mt=>[mt.connectionIndex,mt])),et=pn.flatMap(mt=>mt.via?[{connectionName:mt.connectionName,via:mt.via}]:[]),It=LPe({...t,gridStep:s,vias:o.flatMap(mt=>mt.connections.map(st=>({connectionIndex:st.connectionIndex,center:t.fixedViaPointsByConnectionIndex.get(st.connectionIndex),diameter:A}))),activeConnectionIndices:M});let Bt=0;for(const mt of at.toReversed()){const st=Yt(mt);if(!st)continue;const xt=new Set(st.map(dt=>dt.connectionIndex)),Xe=t.terminals.find(dt=>!xt.has(dt.connection.connectionIndex)),Ze=st.toSorted((dt,Ut)=>tn(dt.exitPoint,Xe.exitPoint)-tn(Ut.exitPoint,Xe.exitPoint));for(const dt of Ze.slice(0,16)){const Ut=Xe.connection.connectionIndex,Wt=st.filter($n=>$n!==dt),Xt=[...t.acceptedPlans,...Wt,...pn.filter($n=>!xt.has($n.connectionIndex)&&$n.connectionIndex!==Ut),be.get(dt.connectionIndex)],Jt=F.get(Xe.connection.connection.name),yn=BC({...t,bus:{...Jt,exitEdge:Jt.exitEdge??Xj(Jt.direction),connections:[Xe.connection]},terminals:[Xe],targetLayer:Jy(t,Jt.busId),acceptedPlans:Xt,reservedVias:et.filter($n=>$n.connectionName!==Xe.connection.connection.name),sourceEscapePaths:R,gridStep:s,gridOrigin:It,gridStepDivisor:2,maximumRouteOrderAttempts:1,maximumSearchStates:24e4,heuristicWeight:1,alignGridToPads:!0},1,!1);let An=yn.next();for(;!An.done;)yield{iterations:ne.iterations+An.value.expandedStateCount,routedConnectionCount:st.length,connectionCount:w.length},An=yn.next();if(!An.value[0]?.length)continue;const kn=Wt.toSorted(($n,ht)=>{const Kt=rn=>Math.min(...rn.segments.filter(Lt=>Lt.layer===Jy(t,Jt.busId)).map(Lt=>Cr(Xe.viaPoint,Lt.start,Lt.end)));return Kt($n)-Kt(ht)});for(const $n of kn.slice(0,1)){if(Bt++>=g)return null;const ht=new Set([Ut,dt.connectionIndex,$n.connectionIndex]),Kt=n.map(qe=>({...qe,connections:qe.connections.filter(vt=>ht.has(vt.connectionIndex))})).filter(qe=>qe.connections.length>0),rn=[...t.acceptedPlans,...st.filter(qe=>!ht.has(qe.connectionIndex)),...pn.filter(qe=>!xt.has(qe.connectionIndex)&&!ht.has(qe.connectionIndex))],Lt=HPe({...t,buses:Kt,terminals:t.terminals.filter(qe=>ht.has(qe.connection.connectionIndex)),acceptedPlans:rn,maximumLocalRepairAttempts:0,maximumIterations:Math.min(l,2e6)},e);let Ho=Lt.next();for(;!Ho.done;)yield{iterations:ne.iterations+Ho.value.iterations,routedConnectionCount:st.length-2+Ho.value.routedConnectionCount,connectionCount:w.length},Ho=Lt.next();if(!Ho.value)continue;const Ao=[...st.filter(qe=>!ht.has(qe.connectionIndex)),...Ho.value];if(Ao.length===w.length&&new Set(Ao.map(qe=>qe.connectionIndex)).size===M.size&&gt(Ao))return Ao}break}}return null}function*CSo(t,e,n){const{buses:o,layerNames:i}=t;if(!t.routeFromSourcePads)return null;const r=new Map(t.terminals.map(_=>[_.connection.connectionIndex,_])),s=new Set(e.map(_=>_.connectionIndex));if(r.size<2||s.size!==e.length||e.length!==r.size-1||e.some(_=>r.get(_.connectionIndex)?.connection.connection.name!==_.connectionName||_.targetLayer!==Jy(t,_.busId)||_.sourceLayer!==r.get(_.connectionIndex).connection.sourceLayer||tn(_.sourcePoint,r.get(_.connectionIndex).connection.sourcePoint)>1e-7||!_.via||tn(_.exitPoint,r.get(_.connectionIndex).exitPoint)>1e-7))return null;const a=t.terminals.filter(_=>!s.has(_.connection.connectionIndex)),A=a[0].connection.connectionIndex,c=new Map(t.fixedViaPointsByConnectionIndex),l=new Map(t.sourceEscapePaths);for(const _ of e)c.set(_.connectionIndex,_.via.center),l.set(_.connectionIndex,[_.sourcePoint,..._.segments.slice(0,_.sourceEscapeSegmentCount??1).map(f=>f.end)]);const u=o.map(_=>({..._,connections:_.connections.filter(f=>f.connectionIndex===A)})).filter(_=>_.connections.length>0),g=Jy(t,u[0].busId),h=i.filter(_=>_!==g&&u.every(f=>(f.routableEscapeLayers??f.allowedLayers??i).includes(_)&&f.connections.every(I=>I.sourceLayer!==_))),d=HPe({...t,buses:u,targetLayer:g,terminals:a,transitLayers:h,fixedViaPointsByConnectionIndex:c,sourceEscapePaths:l,acceptedPlans:[...t.acceptedPlans,...e],includeDiagonalNeighbors:!0,ripCost:256,maximumIterations:Math.min(t.maximumIterations??5e6,5e6),maximumRipEvents:Math.min(t.maximumRipEvents??400,400),maximumLocalRepairAttempts:0,maximumSourceOriginRepairAttempts:0},n);let p=d.next();for(;!p.done;)yield{...p.value,routedConnectionCount:e.length+p.value.routedConnectionCount,connectionCount:r.size},p=d.next();if(!p.value)return null;const m=[...e,...p.value];return m.length===r.size&&new Set(m.map(_=>_.connectionIndex)).size===r.size?m:null}var e_=1e-7,cE=t=>Math.max(...t.map(e=>e.length))-Math.min(...t.map(e=>e.length));function rR(t,e){const n=t.trace.route.findIndex(r=>r.route_type==="via"),o=e.trace.route.findIndex(r=>r.route_type==="via");if(n<0||o<0)return null;const i=t.sourceEscapeSegmentCount??1;return{...e,sourcePoint:t.sourcePoint,via:t.via,exitPoint:t.exitPoint,sourceEscapeSegmentCount:i,segments:[...t.segments.slice(0,i),...e.segments.slice(e.sourceEscapeSegmentCount??1)],trace:{...t.trace,route:[...t.trace.route.slice(0,n+1),...e.trace.route.slice(o+1)]}}}function OPe(t,e,n){if(!e.exitEdge||t.termination.type!=="boundary")return null;const o=e.sharedBoundary,i=h=>e.exitEdge==="left"?h.x-o.minX:e.exitEdge==="right"?o.maxX-h.x:e.exitEdge==="top"?o.maxY-h.y:h.y-o.minY;if(Math.abs(i(t.exitPoint))>e_)return null;let r=t.segments.length-1;for(;r>0&&t.segments[r-1].layer===t.targetLayer;)r--;if(r<(t.sourceEscapeSegmentCount??1))return null;let s=-1;for(let h=r;h<t.segments.length;h++){const d=t.segments[h];i(d.start)>=n&&i(d.end)<=n&&(s=h)}s<0&&(s=r);const a=t.segments[s],A=i(a.start),c=i(a.end),l=A>n&&c<A?(A-n)/(A-c):0,u={x:a.start.x+(a.end.x-a.start.x)*l,y:a.start.y+(a.end.y-a.start.y)*l};if(i(u)<=e_)return null;const g=[{...a,start:u},...t.segments.slice(s+1)].filter(h=>tn(h.start,h.end)>e_);return!g.length||g.some(h=>h.layer!==t.targetLayer)?null:{...t,sourcePoint:{...t.sourcePoint,...u},sourceEscapeSegmentCount:0,via:void 0,additionalVias:[],segments:g,length:g.reduce((h,d)=>h+tn(d.start,d.end),0),trace:{...t.trace,pcb_trace_id:`${t.trace.pcb_trace_id}-retained-tail`,route:[u,...g.map(h=>h.end)].map(h=>({route_type:"wire",...h,layer:t.targetLayer,width:g[0].width}))}}}function GPe(t){const{inputSrj:e,preparedBuses:n,layerNames:o,viaDiameter:i,viaHoleDiameter:r}=t,s=new Map(t.plans.map(l=>[l.connectionIndex,l])),a=n.flatMap(l=>l.connections);if(a.length!==e.connections.length||s.size!==a.length||s.size!==t.plans.length||a.some(l=>s.get(l.connectionIndex)?.connectionName!==l.connection.name))throw new Error("Retained-tail repair requires every original connection exactly once");const A=new Map,c=new Map;for(const l of a){const u=s.get(l.connectionIndex),g=u.segments.slice(0,u.sourceEscapeSegmentCount??1);if(!u.via||!g.length||g.some(h=>h.layer!==l.sourceLayer)||tn(g[0].start,l.sourcePoint)>e_||tn(g.at(-1).end,u.via.center)>e_||g.some((h,d)=>d>0&&tn(g[d-1].end,h.start)>e_)||u.via.fromLayer!==l.sourceLayer||u.via.toLayer!==u.targetLayer||u.via.diameter!==i||u.via.holeDiameter!==r||u.via.spanLayers.length!==o.length||!o.every(h=>u.via.spanLayers.includes(h)))return null;A.set(l.connectionIndex,u.via.center),c.set(l.connectionIndex,[g[0].start,...g.map(h=>h.end)])}return{fixed:A,sourcePaths:c}}function*ySo(t,e){const{inputSrj:n,preparedBuses:o,layerNames:i,traceWidth:r,clearance:s,viaDiameter:a,viaHoleDiameter:A}=t,c=t.maximumIterationsPerAttempt??1e7;if(!Number.isSafeInteger(c)||c<1)throw new Error("maximumIterationsPerAttempt must be a positive safe integer");const l=GPe(t);if(!l)return null;const{fixed:u,sourcePaths:g}=l;let h=[...t.plans];const d=o.filter(m=>m.termination.type==="boundary"&&m.maxLengthSkew!==void 0&&m.connections.length>1&&(!t.busIds||t.busIds.includes(m.busId)));for(const m of d){const _=h.filter(Y=>Y.busId===m.busId);if(_.length!==m.connections.length)return null;if(cE(_)<=m.maxLengthSkew+e_)continue;const f=_[0].targetLayer;if(_.some(Y=>Y.targetLayer!==f||Y.planeEndpointTrace||Y.planeEndpointSegments||Y.planeEndpointVia)||!m.exitEdge)return null;const I=(m.routableEscapeLayers??m.allowedLayers??i).filter(Y=>(m.allowedLayers??i).includes(Y));if(!I.includes(f))return null;const C=I.filter(Y=>Y!==f);if(!C.length)return null;const y=(Y,W,te)=>{const j={srj:n,allBuses:o,buses:[{...m,connections:Y}],targetLayer:f,transitLayers:C,terminals:Y.map(J=>({connection:J,viaPoint:u.get(J.connectionIndex),exitPoint:W.get(J.connectionIndex)})),fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,acceptedPlans:te,layerNames:i,traceWidth:r,clearance:s,viaDiameter:a,viaHoleDiameter:A,tightViaChannels:!0,includeDiagonalNeighbors:!0,heuristicWeight:1,maximumIterations:c,maximumRipEvents:200,maximumLocalRepairAttempts:0,ripCost:256,shuffleSeed:1};return AE(j)},x=_.toSorted((Y,W)=>W.length-Y.length)[0],E=m.connections.find(Y=>Y.connectionIndex===x.connectionIndex),B=y([E],new Map([[x.connectionIndex,x.exitPoint]]),h.filter(Y=>Y!==x));let S=B.next();for(;!S.done;)yield{...S.value,busId:m.busId,phase:"lane"},S=B.next();const Q=S.value?.[0]?rR(x,S.value[0]):null;if(Q&&Q.length<x.length-e_&&cE(_.map(Y=>Y===x?Q:Y))<cE(_)-e_&&e.push({busId:m.busId,plan:Q}),Q&&cE(_.map(Y=>Y===x?Q:Y))<=m.maxLengthSkew+e_){h=h.map(Y=>Y===x?Q:Y);continue}const w=Math.min(12*(r+s),(m.exitEdge==="left"||m.exitEdge==="right"?m.sharedBoundary.maxX-m.sharedBoundary.minX:m.sharedBoundary.maxY-m.sharedBoundary.minY)/3),M=_.map(Y=>OPe(Y,m,w));if(M.some(Y=>!Y))return null;const k=M,R=h.filter(Y=>Y.busId!==m.busId),F=y(m.connections,new Map(k.map(Y=>[Y.connectionIndex,Y.sourcePoint])),[...R,...k]);let O=F.next();for(;!O.done;)yield{...O.value,busId:m.busId,phase:"bus"},O=F.next();if(!O.value||O.value.length!==_.length)return null;let U=h.map(Y=>{const W=O.value.find(oe=>oe.connectionIndex===Y.connectionIndex);if(!W)return Y;const te=rR(Y,W);if(!te)throw new Error("Retained-tail routing lost its source via");const j=k.find(oe=>oe.connectionIndex===te.connectionIndex),J=[...te.trace.route,...j.trace.route.slice(1)];return J[J.length-1]=Y.trace.route.at(-1),{...te,exitPoint:Y.exitPoint,trace:{...Y.trace,route:J},segments:[...te.segments,...j.segments],length:te.length+j.length}});for(const Y of _){const W=U.find(j=>j.connectionIndex===Y.connectionIndex),te=n$(t,W,U.filter(j=>j!==W),m,!0);if(!te)return null;U=U.map(j=>j===W?te:j)}if(cE(U.filter(Y=>Y.busId===m.busId))>m.maxLengthSkew+e_||!Wh({plans:U,srj:n,sharedBoundary:m.sharedBoundary,clearance:s,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;h=U}return qu({inputSrj:n,routedSrj:{...n,traces:[...n.traces??[],...h.flatMap(m=>[m.trace,...m.planeEndpointTrace?[m.planeEndpointTrace]:[]])]},clearance:s,allowBlindAndBuriedVias:!1}).valid?h:null}function*xSo(t,e){const n=yield*ySo(t,e);if(n)return n;const o=GPe(t);if(!o)return null;const{fixed:i,sourcePaths:r}=o,{inputSrj:s,preparedBuses:a,layerNames:A,traceWidth:c,clearance:l}=t,u=a.filter(p=>p.termination.type==="boundary"&&p.connections.length>1&&p.maxLengthSkew!==void 0&&(!t.busIds||t.busIds.includes(p.busId))),g=new Map;for(const p of u){const m=t.plans.filter(I=>I.busId===p.busId);if(m.length!==p.connections.length||!p.exitEdge)return null;const _=m[0].targetLayer;if(m.some(I=>I.targetLayer!==_||I.planeEndpointTrace||I.planeEndpointSegments||I.planeEndpointVia))return null;const f=`${_}:${p.exitEdge}`;g.set(f,[...g.get(f)??[],p])}let h=[...t.plans];for(const p of g.values()){const m=new Set(p.map(O=>O.busId)),_=h.filter(O=>m.has(O.busId));if(p.every(O=>cE(_.filter(U=>U.busId===O.busId))<=O.maxLengthSkew+e_))continue;if(p.length<2)return null;const f=_[0].targetLayer,I=A.filter(O=>p.every(U=>(U.routableEscapeLayers??U.allowedLayers??A).includes(O)&&(U.allowedLayers??A).includes(O)));if(!I.includes(f))return null;const C=I.filter(O=>O!==f);if(!C.length)return null;const y=p[0].sharedBoundary,x=Math.min(12*(c+l),(p[0].exitEdge==="left"||p[0].exitEdge==="right"?y.maxX-y.minX:y.maxY-y.minY)/3),E=_.map(O=>OPe(O,p.find(U=>U.busId===O.busId),x));if(E.some(O=>!O))return null;const B=E,S=h.filter(O=>!m.has(O.busId)),Q=AE({...t,srj:s,allBuses:a,buses:p,targetLayer:f,transitLayers:C,terminals:p.flatMap(O=>O.connections.map(U=>({connection:U,viaPoint:i.get(U.connectionIndex),exitPoint:B.find(Y=>Y.connectionIndex===U.connectionIndex).sourcePoint}))),fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,acceptedPlans:[...S,...B],tightViaChannels:!0,includeDiagonalNeighbors:!0,heuristicWeight:1,ripCost:8,shuffleSeed:1,maximumIterations:t.maximumIterationsPerAttempt??1e7,maximumRipEvents:200,maximumLocalRepairAttempts:0});let w=Q.next();for(;!w.done;)yield{...w.value,busId:p[0].busId,phase:"layer"},w=Q.next();if(!w.value||w.value.length!==_.length)return null;const M=w.value;let k=h.map(O=>{const U=M.find(j=>j.connectionIndex===O.connectionIndex);if(!U)return O;const Y=rR(O,U);if(!Y)throw new Error("Joint retained-tail routing lost its source via");const W=B.find(j=>j.connectionIndex===O.connectionIndex),te=[...Y.trace.route,...W.trace.route.slice(1)];return te[te.length-1]=O.trace.route.at(-1),{...Y,trace:{...O.trace,route:te},segments:[...Y.segments,...W.segments],length:Y.length+W.length}});for(const O of _){const U=k.find(W=>W.connectionIndex===O.connectionIndex),Y=n$(t,U,k.filter(W=>W!==U),p.find(W=>W.busId===O.busId),!0);if(!Y)return null;k=k.map(W=>W===U?Y:W)}if(!Wh({plans:k,srj:s,sharedBoundary:y,clearance:l,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;k=SO({...t,plans:k,preparedBuses:p,selectedBusIds:m,allowBlindAndBuriedVias:!1})??k;const R=zy({...t,plans:k,preparedBuses:p,sharedBoundary:y,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e3});if(!R.plans)return null;const F=R.plans;if(k=h.map(O=>{if(!m.has(O.busId))return O;const U=F.find(W=>W.connectionIndex===O.connectionIndex),Y=rR(O,U);if(!Y)throw new Error("Joint retained-tail tuning lost its source via");return Y}),p.some(O=>cE(k.filter(U=>U.busId===O.busId))>O.maxLengthSkew+e_))return null;h=k}return u.some(p=>cE(h.filter(m=>m.busId===p.busId))>p.maxLengthSkew+e_)?null:qu({inputSrj:s,routedSrj:{...s,traces:[...s.traces??[],...h.flatMap(p=>[p.trace,...p.planeEndpointTrace?[p.planeEndpointTrace]:[]])]},clearance:l,allowBlindAndBuriedVias:!1}).valid?h:null}function*ESo(t){const e=[],n=yield*xSo(t,e);if(n)return n;if(!e.length)return null;let o=[...t.plans],i=!1;for(const{busId:s,plan:a}of e){const A=t.preparedBuses.find(p=>p.busId===s),c=o.find(p=>p.connectionIndex===a.connectionIndex),l=n$(t,a,o.filter(p=>p!==c),A,!0);if(!l)continue;const u=o.map(p=>p===c?l:p),g=zy({...t,plans:u,preparedBuses:[A],sharedBoundary:A.sharedBoundary,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e3});if(!g.plans)continue;const h=o.map(p=>{if(p.busId!==s)return p;const m=g.plans.find(_=>_.connectionIndex===p.connectionIndex);return rR(p,m)});if(h.some(p=>!p))continue;const d=h;cE(d.filter(p=>p.busId===s))>A.maxLengthSkew+e_||!Wh({plans:d,srj:t.inputSrj,sharedBoundary:A.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1})||(o=d,i=!0)}return!i||t.preparedBuses.some(s=>(!t.busIds||t.busIds.includes(s.busId))&&s.maxLengthSkew!==void 0&&cE(o.filter(a=>a.busId===s.busId))>s.maxLengthSkew+e_)?null:qu({inputSrj:t.inputSrj,routedSrj:{...t.inputSrj,traces:[...t.inputSrj.traces??[],...o.flatMap(s=>[s.trace,...s.planeEndpointTrace?[s.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?o:null}function*BSo(t){const e=GPe(t);if(!e)return null;const{inputSrj:n,preparedBuses:o,layerNames:i}=t,r=t.maximumIterationsPerAttempt??5e6;if(!Number.isSafeInteger(r)||r<1)throw new Error("maximumIterationsPerAttempt must be a positive safe integer");const s=Math.min(r,5e6),a=o.filter(u=>u.termination.type==="boundary"&&u.connections.length>2&&u.maxLengthSkew!==void 0&&(!t.busIds||t.busIds.includes(u.busId)));let A=[...t.plans],c=!1;for(const u of a){const g=A.filter(M=>M.busId===u.busId);if(g.length!==u.connections.length)return null;if(cE(g)<=u.maxLengthSkew+e_)continue;const h=Math.min(...g.map(M=>M.length)),d=g.filter(M=>M.length>h+u.maxLengthSkew+e_).toSorted((M,k)=>k.length-M.length||M.connectionIndex-k.connectionIndex).slice(0,2);if(d.length!==2)return null;const p=g[0].targetLayer;if(!u.exitEdge||g.some(M=>M.targetLayer!==p||M.planeEndpointTrace||M.planeEndpointSegments||M.planeEndpointVia))return null;const m=(u.routableEscapeLayers??u.allowedLayers??i).filter(M=>(u.allowedLayers??i).includes(M)),_=m.filter(M=>M!==p);if(!m.includes(p)||!_.length)return null;const f=new Set(d.map(M=>M.connectionIndex)),I=u.connections.filter(M=>f.has(M.connectionIndex)),C=AE({...t,srj:n,allBuses:o,buses:[{...u,connections:I}],targetLayer:p,transitLayers:_,terminals:I.map(M=>({connection:M,viaPoint:e.fixed.get(M.connectionIndex),exitPoint:g.find(k=>k.connectionIndex===M.connectionIndex).exitPoint})),fixedViaPointsByConnectionIndex:e.fixed,sourceEscapePaths:e.sourcePaths,acceptedPlans:A.filter(M=>!f.has(M.connectionIndex)),tightViaChannels:!0,includeDiagonalNeighbors:!0,ripCost:64,shuffleSeed:1,maximumIterations:s,maximumRipEvents:80,maximumLocalRepairAttempts:0});let y=C.next();for(;!y.done;)yield{...y.value,busId:u.busId,phase:"overlong-pair"},y=C.next();if(!y.value||y.value.length!==2)return null;const x=new Map(y.value.map(M=>[M.connectionIndex,M])),E=A.map(M=>{const k=x.get(M.connectionIndex);return k?rR(M,k):M});if(E.some(M=>!M))return null;const B=zy({...t,plans:E,preparedBuses:[u],sharedBoundary:u.sharedBoundary,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e3});if(!B.plans)return null;const S=new Map(B.plans.map(M=>[M.connectionIndex,M])),Q=A.map(M=>M.busId===u.busId?rR(M,S.get(M.connectionIndex)):M);if(Q.some(M=>!M))return null;const w=Q;if(cE(w.filter(M=>M.busId===u.busId))>u.maxLengthSkew+e_||!Wh({plans:w,srj:n,sharedBoundary:u.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;A=w,c=!0}return!c||o.some(u=>(!t.busIds||t.busIds.includes(u.busId))&&u.maxLengthSkew!==void 0&&cE(A.filter(g=>g.busId===u.busId))>u.maxLengthSkew+e_)?null:qu({inputSrj:n,routedSrj:{...n,traces:[...n.traces??[],...A.flatMap(u=>[u.trace,...u.planeEndpointTrace?[u.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?A:null}function*bSo(t){const e=yield*ESo(t);return e||(yield*BSo(t))}function Aue(t,e,n){return t.buses.flatMap(o=>o.connections.map(i=>{const r=e.get(i.connectionIndex),s=o.termination.type==="plane"?o.termination.layer:(o.allowedLayers??t.layerNames).filter(a=>a!==i.sourceLayer).at(-1);return i4({...t,bus:o,terminal:{connection:i,viaPoint:r,exitPoint:r},targetLayer:s,targetLayerPoints:[r],sourceEscapePoints:n.get(i.connectionIndex),allowBlindAndBuriedVias:!1})}))}function SSo(t){if(!t.buses.length||t.buses.some(i=>i.connections.some(r=>r.sourceLayer!=="top")))return null;const e=pd(t.buses,{...t,maximumSearchStates:1e4,additionalObstacles:t.srj.obstacles});if(!e)return null;const n=new Map(t.buses.flatMap(i=>i.connections.map(r=>[r.connectionIndex,[r.sourcePoint,e.get(r.connectionIndex)]]))),o=Aue(t,e,n);return qu({inputSrj:t.srj,routedSrj:{...t.srj,traces:[...t.srj.traces??[],...o.map(i=>i.trace)]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?{fixedViaPointsByConnectionIndex:e,sourceEscapePaths:n,sourcePlans:o}:null}function*QSo(t){const e=AE({...t,transitLayers:[],routeFromSourcePads:!0,sourceLayerTravelCost:t.sourceLayerTravelCost??2,maximumRipEvents:1200,maximumIterations:t.maximumSourceIterations??5e7,maximumLocalRepairAttempts:0,shuffleSeed:1});let n=e.next();for(;!n.done;)yield n.value,n=e.next();if(!n.value)return null;let o=n.value;const i=new Map(t.fixedViaPointsByConnectionIndex),r=new Map(t.allBuses.flatMap(c=>c.connections.map(l=>[l.connectionIndex,t.sourceEscapePaths?.get(l.connectionIndex)??[l.sourcePoint,i.get(l.connectionIndex)]]))),s=new Map(t.buses.flatMap(c=>c.connections.map(l=>[l.connectionIndex,{bus:c,connection:l}]))),a=c=>{if(!c.via)throw new Error("Source-origin routing lost a required first via");i.set(c.connectionIndex,c.via.center);const l=c.segments.slice(0,c.sourceEscapeSegmentCount??1);r.set(c.connectionIndex,[c.sourcePoint,...l.map(u=>u.end)])};o.forEach(a);const A=c=>{const l=s.get(c.connectionIndex).bus;if(l.connections.length<=2||l.maxLengthSkew===void 0)return!1;const u=Math.min(...o.filter(g=>g.busId===c.busId).map(g=>g.length));return c.length>u+l.maxLengthSkew+1e-7};for(let c=0;c<2;c++){const l=o.filter(A).toSorted((g,h)=>h.length-g.length).slice(0,8);let u=!1;for(const g of l){const h=o.find(E=>E.connectionIndex===g.connectionIndex);if(!A(h))continue;const{bus:d,connection:p}=s.get(h.connectionIndex),m=t.cleanupRetainedBoundaryTails?OPe(h,d,(c===0?12:6)*(t.traceWidth+t.clearance)):null;if(t.cleanupRetainedBoundaryTails&&!m)continue;const _=AE({...t,buses:[{...d,connections:[p]}],transitLayers:[],routeFromSourcePads:!0,sourceLayerTravelCost:1,includeDiagonalNeighbors:t.cleanupRetainedBoundaryTails||t.includeDiagonalNeighbors,fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,acceptedPlans:[...t.acceptedPlans,...o.filter(E=>E!==h),...m?[m]:[]],terminals:[{connection:p,viaPoint:i.get(p.connectionIndex),exitPoint:m?.sourcePoint??h.exitPoint}],maximumRipEvents:1,maximumIterations:2e6,maximumLocalRepairAttempts:0,shuffleSeed:1});let f=_.next();for(;!f.done;)yield{...f.value,connectionCount:o.length},f=_.next();let I=f.value?.[0];if(I&&m){const E={...I,exitPoint:h.exitPoint,segments:[...I.segments,...m.segments],length:I.length+m.length,trace:{...I.trace,route:[...I.trace.route,...m.trace.route.slice(1)]}};I=n$({...t,inputSrj:t.srj},E,[...t.acceptedPlans,...o.filter(B=>B!==h),...Aue({...t,buses:t.allBuses.filter(B=>!t.buses.some(S=>S.busId===B.busId))},i,r)],d,!0)??void 0}if(!I||I.length>=h.length-1e-7)continue;const C=o.filter(E=>E.busId===h.busId),y=C.map(E=>E.length),x=C.map(E=>E===h?I.length:E.length);Math.max(...x)-Math.min(...x)>Math.max(...y)-Math.min(...y)+1e-7||m&&!qu({inputSrj:t.srj,routedSrj:{...t.srj,traces:[...t.srj.traces??[],...t.acceptedPlans.flatMap(E=>[E.trace,...E.planeEndpointTrace?[E.planeEndpointTrace]:[]]),...o.map(E=>(E===h?I:E).trace),...Aue({...t,buses:t.allBuses.filter(E=>!t.buses.some(B=>B.busId===E.busId)&&!t.acceptedPlans.some(B=>B.busId===E.busId))},i,r).map(E=>E.trace)]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid||(o=o.map(E=>E===h?I:E),a(I),u=!0)}if(!u)break}return{plans:o,fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,sourcePlans:Aue({...t,buses:t.allBuses},i,r)}}function YPe(t){const e=t.filter(n=>n.termination.type==="boundary"&&n.connections.length>=8&&n.allowedLayers?.length===1&&n.allowedLayers[0]!=="top");return e.some(n=>n.connections.length>=16)?!1:e.some((n,o)=>e.slice(o+1).some(i=>i.componentId===n.componentId&&i.exitEdge===n.exitEdge&&i.allowedLayers[0]===n.allowedLayers[0]))}function cue(t){return t.some(e=>{if(e.termination.type!=="boundary"||e.connections.length<8||e.allowedLayers?.length!==1||e.allowedLayers[0]==="top")return!1;const n=e.exitEdge==="left"||e.exitEdge==="right"?"x":"y",o=e.exitEdge==="left"||e.exitEdge==="bottom"?-1:1,i=n==="x"?(e.componentBounds.minX+e.componentBounds.maxX)/2:(e.componentBounds.minY+e.componentBounds.maxY)/2;return e.connections.every(r=>o*(r.sourcePoint[n]-i)<-1e-7)})}function vSo(t,e){const n=t[0];if(!n||e||t.some(A=>A.componentId!==n.componentId||A.connections.some(c=>c.sourceLayer!=="top")))return!1;const o=t.filter(A=>A.termination.type==="boundary"),i=o.filter(A=>A.connections.length>=8),r=i[0]?.exitEdge;if(!r||i.some(A=>A.exitEdge!==r)||!(i.some(A=>A.connections.length>=16&&A.allowedLayers?.length===1&&A.allowedLayers[0]!=="top")||YPe(i)))return!1;const s=o.reduce((A,c)=>A+c.connections.length,0);return!(t.filter(A=>A.termination.type==="plane").reduce((A,c)=>A+c.connections.length,0)<s)}var QO=1e-7,wSo={left:"right",right:"left",up:"down",down:"up"};function UPe(t){const e=t;if(e.shape==="circle"||t.type!=="rect")return null;const n=(e.ccwRotationDegrees??0)/90;return Math.abs(n-Math.round(n))>QO?null:Math.abs(Math.round(n))%2===0?{x:t.width,y:t.height}:{x:t.height,y:t.width}}function SNt(t,e){const n=UPe(e);if(!n||Math.abs(n.x-n.y)<QO)return null;const{center:o}=e;if(n.x>n.y){if(Math.abs(o.x-n.x/2-t.minX)<QO)return"left";if(Math.abs(o.x+n.x/2-t.maxX)<QO)return"right"}else{if(Math.abs(o.y-n.y/2-t.minY)<QO)return"down";if(Math.abs(o.y+n.y/2-t.maxY)<QO)return"up"}return null}function KPe(t){const e=t.buses[0];if(!e||t.allowBlindAndBuriedVias||t.buses.some(a=>a.componentId!==e.componentId||a.connections.some(A=>A.sourceLayer!=="top")))return null;const n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(const a of e.componentObstacles){const A=UPe(a);if(!A)return null;n.minX=Math.min(n.minX,a.center.x-A.x/2),n.maxX=Math.max(n.maxX,a.center.x+A.x/2),n.minY=Math.min(n.minY,a.center.y-A.y/2),n.maxY=Math.max(n.maxY,a.center.y+A.y/2)}const o=new Set;for(const a of t.buses)if(a.termination.type==="boundary")for(const A of a.connections){const c=SNt(n,A.sourceObstacle);if(!c)return null;o.add(c)}if(o.size!==4)return null;const i=new Map,r=new Map,s=[];for(const a of t.buses){const A=a.termination.type==="plane"?a.termination.layer:(a.routableEscapeLayers??a.allowedLayers??t.layerNames).filter(c=>c!=="top").at(-1);if(!A||!t.layerNames.includes(A))return null;for(const c of a.connections){const l=c.sourceObstacle,u=UPe(l);if(!u)return null;let g=SNt(n,l);if(g)(t.side??"inward")==="inward"&&(g=wSo[g]);else{if(a.termination.type!=="plane")return null;g=a.direction}const h=c.sourcePoint,d=t.viaDiameter/2+t.clearance+.001,p=g==="left"?{x:l.center.x-u.x/2-d,y:h.y}:g==="right"?{x:l.center.x+u.x/2+d,y:h.y}:g==="up"?{x:h.x,y:l.center.y+u.y/2+d}:{x:h.x,y:l.center.y-u.y/2-d},m=a.sharedBoundary,_=t.viaDiameter/2;if(p.x-_<m.minX||p.x+_>m.maxX||p.y-_<m.minY||p.y+_>m.maxY)return null;if(i.has(c.connectionIndex))throw new Error("FanoutSolver: duplicate peripheral source connection");i.set(c.connectionIndex,p),r.set(c.connectionIndex,[h,p]),s.push(i4({...t,bus:a,terminal:{connection:c,viaPoint:p,exitPoint:p},targetLayer:A,targetLayerPoints:[p],sourceEscapePoints:[h,p],allowBlindAndBuriedVias:!1}))}}return!Wh({...t,plans:s,sharedBoundary:e.sharedBoundary,allowBlindAndBuriedVias:!1})||!qu({inputSrj:t.srj,routedSrj:{...t.srj,traces:[...t.srj.traces??[],...s.map(a=>a.trace)]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?null:{fixedViaPointsByConnectionIndex:i,sourceEscapePaths:r,sourcePlans:s}}function QNt(t){const e=new Map;for(const o of t){const i=Ds(o.exitEdge,o.preferredExit);if(o.termination.type!=="boundary"||!o.exitEdge||!i)continue;const r=`${o.exitEdge}:${i}`,s=e.get(r)??[];s.push(o),e.set(r,s)}const n=new Map;for(const o of e.values()){const i=o[0].exitEdge==="left"||o[0].exitEdge==="right"?"y":"x",r=o.map((A,c)=>({bus:A,index:c,min:Math.min(...A.connections.map(l=>l.sourcePoint[i])),max:Math.max(...A.connections.map(l=>l.sourcePoint[i]))})).sort((A,c)=>A.min-c.min||A.index-c.index),s=[];for(const A of r){const c=s.at(-1);!c||A.min>c.max+1e-9?s.push({max:A.max,members:[A]}):(c.max=Math.max(c.max,A.max),c.members.push(A))}let a=0;for(const A of s)for(const{bus:c}of A.members.sort((l,u)=>l.index-u.index))n.set(c.busId,a),a+=c.connections.length}return n}function VPe(t){const{buses:e,targetLayerByBusId:n,traceWidth:o,clearance:i}=t,r=o+i;if(!(o>0)||!(t.viaDiameter>0)||i<0||![o,t.viaDiameter,i].every(Number.isFinite))throw new Error("FanoutSolver: invalid boundary packing dimensions");const s=QNt(e),a=[],A=new Map;for(const c of e){if(c.termination.type!=="boundary")continue;if(c.connections.length===0)throw new Error(`FanoutSolver: bus ${c.busId} has no connections`);if(!c.exitEdge)throw new Error(`FanoutSolver: bus ${c.busId} has no boundary edge`);const l=n.get(c.busId);if(!l||!t.layerNames.includes(l)||!(c.routableEscapeLayers??c.allowedLayers??t.layerNames).includes(l))throw new Error(`FanoutSolver: bus ${c.busId} has no legal assigned layer`);const u=e6(c.exitEdge),g=Ds(c.exitEdge,c.preferredExit),h=c.connections.map(I=>g?BB({...t,bus:c,connection:I,targetLayer:l,cornerExitLaneOffset:s.get(c.busId)??0,windingOrderIndex:0}):tR({...t,bus:c,connection:I,targetLayer:l,boundaryDirection:u,windingOrderIndex:0})),d=h.toSorted((I,C)=>I-C);if(d.some((I,C)=>!Number.isFinite(I)||C>0&&I-d[C-1]<r-1e-8))throw new Error(`FanoutSolver: bus ${c.busId} already contains overlapping desired lanes`);const p=c.exitEdge==="left"||c.exitEdge==="right",m={busId:c.busId,layer:l,edge:c.exitEdge,minimum:p?c.sharedBoundary.minY:c.sharedBoundary.minX,maximum:p?c.sharedBoundary.maxY:c.sharedBoundary.maxX,connectionIndices:c.connections.map(I=>I.connectionIndex),desiredTracks:h,tracks:[...h],desiredStart:d[0],desiredEnd:d.at(-1),start:d[0],end:d.at(-1),shift:0};if(![m.minimum,m.maximum].every(Number.isFinite)||m.maximum<m.minimum)throw new Error(`FanoutSolver: invalid boundary for ${c.busId}`);a.push(m);const _=`${l}:${c.exitEdge}`,f=A.get(_)??[];f.push(m),A.set(_,f)}for(const c of A.values()){const l=f=>Number(((f.desiredStart+f.desiredEnd)/2).toFixed(9)),u=c.toSorted((f,I)=>l(f)-l(I)),g=Math.max(...u.map(f=>f.minimum)),h=Math.min(...u.map(f=>f.maximum));if(u.every((f,I)=>f.desiredStart>=g&&f.desiredEnd<=h&&(I===0||f.desiredStart-u[I-1].desiredEnd>=r-1e-8)))continue;const d=[];let p=0;for(const[f,I]of u.entries())d.push(p),p+=I.desiredEnd-I.desiredStart+(f<u.length-1?r:0);if(p>h-g+1e-8)throw new Error(`FanoutSolver: bus intervals do not fit ${u[0].layer}/${u[0].edge}`);const m=[];for(const[f,I]of u.entries())for(m.push({first:f,last:f,weight:I.connectionIndices.length,mean:I.desiredStart-d[f]});m.length>1&&m.at(-2).mean>m.at(-1).mean;){const C=m.pop(),y=m.pop(),x=y.weight+C.weight;m.push({first:y.first,last:C.last,weight:x,mean:(y.mean*y.weight+C.mean*C.weight)/x})}const _=h-p;for(const f of m){const I=Math.max(g,Math.min(_,f.mean));for(let C=f.first;C<=f.last;C++){const y=u[C];y.start=I+d[C],y.shift=y.start-y.desiredStart,y.end=y.desiredEnd+y.shift,y.tracks=y.desiredTracks.map(x=>x+y.shift)}}}return{tracksByConnectionIndex:new Map(a.flatMap(c=>c.connectionIndices.map((l,u)=>[l,c.tracks[u]]))),intervals:a}}function PSo(t){if(t.exitTargetPoint)return t.exitTargetPoint.layer??"top";const e=t.targetPoint;return"layer"in e?e.layer??"top":e.layers[0]??"top"}function vNt(t){const e=t.exitEdge==="left"||t.exitEdge==="right"?"y":"x",n=new Map;for(const o of t.connections){const i=PSo(o);n.set(i,[...n.get(i)??[],o])}return[...n.values()].map(o=>o.toSorted((i,r)=>{const s=(i.exitTargetPoint??i.targetPoint)[e]-(r.exitTargetPoint??r.targetPoint)[e];if(s!==0)return s;const a=A=>"source_trace_id"in A.connection&&typeof A.connection.source_trace_id=="string"?A.connection.source_trace_id:A.connection.name;return a(i).localeCompare(a(r))||i.connection.name.localeCompare(r.connection.name)||i.connectionIndex-r.connectionIndex}))}function MSo(t,e){const n=t.exitEdge==="left"||t.exitEdge==="right"?"y":"x";return vNt(t).every(o=>o.every((i,r)=>{const s=e.get(i.connectionIndex);return!s||!Number.isFinite(s.x)||!Number.isFinite(s.y)?!1:r===0||s[n]>e.get(o[r-1].connectionIndex)[n]}))}function zPe(t){const e=t.maximumSearchStates??4096;if(!Number.isSafeInteger(e)||e<1)throw new Error("FanoutSolver: invalid boundary merge work bound");const n=new Map(t.exits);for(const o of t.buses){if(o.termination.type!=="boundary"||!o.exitEdge||o.connections.length<3||o.connections.some(p=>!p.hasExplicitLayeredExitTarget))continue;const i=vNt(o);if(i.length<2||i.reduce((p,m)=>p*(m.length+1),1)>e)continue;const s=o.exitEdge==="left"||o.exitEdge==="right"?"y":"x",a=s==="x"?"y":"x",A=o.exitEdge==="left"||o.exitEdge==="bottom"?-1:1,c={x:(o.componentBounds.minX+o.componentBounds.maxX)/2,y:(o.componentBounds.minY+o.componentBounds.maxY)/2},l=new Map(o.connections.map(p=>[p.connectionIndex,Math.atan2(p.sourcePoint[s]-c[s],A*(p.sourcePoint[a]-c[a]))])),u=o.connections.map(p=>{const m=n.get(p.connectionIndex);if(!m||!Number.isFinite(m.x)||!Number.isFinite(m.y))throw new Error("FanoutSolver: missing packed boundary target");return m[s]}).sort((p,m)=>p-m);if(u.some((p,m)=>m>0&&p<=u[m-1]))throw new Error("FanoutSolver: duplicate packed boundary tracks");const g=new Map,h=p=>{const m=p.join(","),_=g.get(m);if(_)return _;const f=p.reduce((C,y)=>C+y,0);if(f===u.length)return{inversions:0,length:0,order:[]};let I;for(const[C,y]of i.entries()){const x=y[p[C]];if(!x)continue;const E=i.reduce((M,k,R)=>M+k.slice(0,p[R]).filter(F=>l.get(F.connectionIndex)>l.get(x.connectionIndex)+1e-9).length,0),B=[...p];B[C]++;const S=h(B),Q={...n.get(x.connectionIndex),[s]:u[f]},w={inversions:E+S.inversions,length:Math.hypot(x.sourcePoint.x-Q.x,x.sourcePoint.y-Q.y)+S.length,order:[x,...S.order]};(!I||w.inversions<I.inversions||w.inversions===I.inversions&&w.length<I.length)&&(I=w)}if(!I)throw new Error("FanoutSolver: incomplete boundary merge state");return g.set(m,I),I},d=new Map(n);for(const[p,m]of h(i.map(()=>0)).order.entries())d.set(m.connectionIndex,{...n.get(m.connectionIndex),[s]:u[p]});if(!MSo(o,d))throw new Error("FanoutSolver: boundary merge changed a layer's lane order");for(const p of o.connections)n.set(p.connectionIndex,d.get(p.connectionIndex))}return n}var JPe=(t,e)=>{const n=t.sharedBoundary;switch(t.exitEdge){case"left":return{x:n.minX,y:e};case"right":return{x:n.maxX,y:e};case"top":return{x:e,y:n.maxY};case"bottom":return{x:e,y:n.minY};default:throw new Error(`FanoutSolver: bus ${t.busId} has no boundary edge`)}};function DSo(t,e,n,o){const i=(r,s,a)=>(s.x-r.x)*(a.y-r.y)-(s.y-r.y)*(a.x-r.x);return i(t,e,n)*i(t,e,o)<-1e-12&&i(n,o,t)*i(n,o,e)<-1e-12}function NSo(t){const{buses:e,layerNames:n,traceWidth:o,clearance:i}=t,r=o+i,s=new Map,a=[];for(const u of e){if(u.termination.type==="plane"){s.set(u.busId,u.termination.layer);continue}const g=new Set(u.connections.map(_=>_.sourceLayer)),h=(u.routableEscapeLayers??u.allowedLayers??n).filter(_=>t.allowSourceLayerTargets||!g.has(_));if(!h.length)return null;const d=h.map(_=>VPe({...t,buses:[u],targetLayerByBusId:new Map([[u.busId,_]])}).intervals[0]),p=u.connections.length,m=u.connections.reduce((_,f)=>({x:_.x+f.sourcePoint.x/p,y:_.y+f.sourcePoint.y/p}),{x:0,y:0});a.push({bus:u,source:m,intervals:d})}a.sort((u,g)=>u.intervals.length-g.intervals.length||Math.max(...g.intervals.map(h=>h.end-h.start))-Math.max(...u.intervals.map(h=>h.end-h.start))||g.bus.connections.length-u.bus.connections.length);const A=[];for(const{bus:u,source:g,intervals:h}of a){let d;for(const p of h){const m=A.filter(Q=>Q.interval.layer===p.layer),_=m.filter(Q=>Q.interval.edge===p.edge),f=Math.max(p.minimum,..._.map(Q=>Q.interval.minimum)),I=Math.min(p.maximum,..._.map(Q=>Q.interval.maximum)),C=p.end-p.start+_.reduce((Q,w)=>Q+w.interval.end-w.interval.start+r,0);if(C>I-f+1e-8)continue;const y=JPe(u,(p.start+p.end)/2),x=m.reduce((Q,w)=>Q+(DSo(g,y,w.source,w.target)?Math.min(u.connections.length,w.bus.connections.length):0),0),E=_.reduce((Q,w)=>Q+w.bus.connections.length,0),B=m.reduce((Q,w)=>Q+w.bus.connections.length,0),S=x*4+E+B/4+10*C/Math.max(r,I-f);(!d||S<d.score||S===d.score&&n.indexOf(p.layer)>n.indexOf(d.interval.layer))&&(d={interval:p,score:S})}if(!d)return null;s.set(u.busId,d.interval.layer),A.push({bus:u,source:g,interval:d.interval,target:JPe(u,(d.interval.start+d.interval.end)/2)})}const c=VPe({...t,targetLayerByBusId:s}),l=new Map;for(const{bus:u}of a)for(const g of u.connections)l.set(g.connectionIndex,JPe(u,c.tracksByConnectionIndex.get(g.connectionIndex)));return{targetLayerByBusId:s,exits:zPe({buses:e,exits:l})}}function*RSo(t){const{plans:e,bus:n,preparedBuses:o,inputSrj:i,layerNames:r}=t;if(n.termination.type!=="boundary"||n.connections.length!==2||n.maxLengthSkew===void 0||n.connections.some(_=>_.sourceLayer!=="top"))return null;const s=o.flatMap(_=>_.connections),a=new Map(e.map(_=>[_.connectionIndex,_]));if(s.length!==i.connections.length||a.size!==s.length||e.length!==a.size||s.some(_=>a.get(_.connectionIndex)?.connectionName!==_.connection.name))throw new Error("FanoutSolver: transit pair repair requires every original plan");const A=n.connections.map(_=>a.get(_.connectionIndex)),c=A[0].targetLayer;if(A.some(_=>_.targetLayer!==c)||Math.abs(A[0].length-A[1].length)<=n.maxLengthSkew+1e-6)return null;const l=(n.routableEscapeLayers??n.allowedLayers??r).filter(_=>_!=="top"&&_!==c);if(!l.length)return null;const u=new Map,g=new Map;for(const _ of s){const f=a.get(_.connectionIndex);if(!f.via)return null;const I=f.segments.slice(0,f.sourceEscapeSegmentCount??1);if(!I.length||I.some(C=>C.layer!==_.sourceLayer)||tn(I[0].start,_.sourcePoint)>1e-6||tn(I.at(-1).end,f.via.center)>1e-6||I.some((C,y)=>y>0&&tn(I[y-1].end,C.start)>1e-6))return null;u.set(_.connectionIndex,f.via.center),g.set(_.connectionIndex,[_.sourcePoint,...I.map(C=>C.end)])}const h=new Set(n.connections.map(_=>_.connectionIndex)),d=(n.routableEscapeLayers??n.allowedLayers??r).filter(_=>_!=="top");let p=5e6,m;for(const _ of[void 0,...d]){if(p<=0)break;const f=new Map(u),I=new Map(g);if(_!==void 0){if(m??=KPe({...t,srj:i,buses:o,side:"inward"}),!m)break;for(const M of h)f.set(M,m.fixedViaPointsByConnectionIndex.get(M)),I.set(M,m.sourceEscapePaths.get(M))}const C=AE({...t,srj:i,allBuses:o,buses:[n],targetLayer:c,startLayerByBusId:_===void 0?void 0:new Map([[n.busId,_]]),transitLayers:l,terminals:n.connections.map(M=>({connection:M,viaPoint:f.get(M.connectionIndex),exitPoint:a.get(M.connectionIndex).exitPoint})),fixedViaPointsByConnectionIndex:f,sourceEscapePaths:I,acceptedPlans:e.filter(M=>!h.has(M.connectionIndex)),routeFromSourcePads:_===void 0,sourceLayerTravelCost:1,sourceOriginPhysicalGridPhase:!0,tightViaChannels:!0,includeDiagonalNeighbors:!0,traceMarginExtra:0,maximumIterations:Math.min(p,_===void 0?5e6:2e6),maximumRipEvents:80,maximumLocalRepairAttempts:0,ripCost:256,shuffleSeed:1});let y=C.next(),x=0;for(;!y.done;)x=y.value.iterations,yield y.value,y=C.next();p-=x;const E=y.value;if(!E||E.length!==2)continue;const B=new Map(E.map(M=>[M.connectionIndex,M])),S=e.map(M=>B.get(M.connectionIndex)??M),Q=zy({...t,plans:S,preparedBuses:[n],sharedBoundary:n.sharedBoundary,maximumWorkUnits:1e5,allowSourcePrefixMatching:!0,allowDistributedMatching:!0,allowTransitLayerMatching:!0,allowMatchingInsideDenseBounds:!0});if(!Q.plans||Q.plans.some(M=>!h.has(M.connectionIndex)&&M!==a.get(M.connectionIndex)))continue;const w=Q.plans.filter(M=>h.has(M.connectionIndex));if(!(w.length!==2||Math.abs(w[0].length-w[1].length)>n.maxLengthSkew+1e-6)&&qu({inputSrj:i,routedSrj:{...i,traces:[...i.traces??[],...Q.plans.flatMap(M=>[M.trace,...M.planeEndpointTrace?[M.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid)return Q.plans}return null}var sR=1e-6,WPe=t=>Math.max(...t.map(e=>e.length))-Math.min(...t.map(e=>e.length));function*wNt(t){const{plans:e,bus:n,preparedBuses:o,inputSrj:i}=t,r=o.flatMap(d=>d.connections),s=new Map(e.map(d=>[d.connectionIndex,d]));if(r.length!==i.connections.length||s.size!==e.length||s.size!==r.length||r.some(d=>s.get(d.connectionIndex)?.connectionName!==d.connection.name))throw new Error("FanoutSolver: source-origin length repair requires every original plan");const a=n.connections.map(d=>s.get(d.connectionIndex));if(n.termination.type!=="boundary"||n.maxLengthSkew===void 0||a.length<2||WPe(a)<=n.maxLengthSkew+sR)return null;const A=a[0].targetLayer;if(a.some(d=>d.targetLayer!==A))return null;const c=Math.min(...a.map(d=>d.length)),l=new Set((a.length===2?a:a.filter(d=>d.length>c+n.maxLengthSkew+sR).toSorted((d,p)=>p.length-d.length||d.connectionIndex-p.connectionIndex).slice(0,2)).map(d=>d.connectionIndex));if(!l.size)return null;const u=new Map,g=new Map;for(const d of r){const p=s.get(d.connectionIndex);if(!p.via)return null;const m=p.segments.slice(0,p.sourceEscapeSegmentCount??1);if(!m.length||m.some(_=>_.layer!==d.sourceLayer)||tn(m[0].start,d.sourcePoint)>sR||tn(m.at(-1).end,p.via.center)>sR||m.some((_,f)=>f>0&&tn(m[f-1].end,_.start)>sR))return null;u.set(d.connectionIndex,p.via.center),g.set(d.connectionIndex,[d.sourcePoint,...m.map(_=>_.end)])}const h=n.connections.filter(d=>l.has(d.connectionIndex));for(const d of[!1,!0]){const p=yield*AE({...t,srj:i,allBuses:o,buses:[{...n,connections:h}],targetLayer:A,transitLayers:t.transitLayers??[],terminals:h.map(C=>({connection:C,viaPoint:u.get(C.connectionIndex),exitPoint:s.get(C.connectionIndex).exitPoint})),fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,acceptedPlans:e.filter(C=>!l.has(C.connectionIndex)),routeFromSourcePads:!0,includeDiagonalNeighbors:d,sourceLayerTravelCost:1,tightViaChannels:!0,ripCost:256,shuffleSeed:1,maximumRipEvents:40,maximumIterations:5e6,maximumLocalRepairAttempts:0});if(!p||p.length!==l.size)continue;const m=new Map(p.map(C=>[C.connectionIndex,C])),_=e.map(C=>m.get(C.connectionIndex)??C),f=a.map(C=>m.get(C.connectionIndex)??C);if(WPe(f)>=WPe(a)-sR&&Math.max(...f.map(C=>C.length))>=Math.max(...a.map(C=>C.length))-sR)continue;if(qu({inputSrj:i,routedSrj:{...i,traces:[...i.traces??[],..._.flatMap(C=>[C.trace,...C.planeEndpointTrace?[C.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid)return _}return null}function i$(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="subsolver"&&"solver"in t&&t.solver instanceof fC}function*TSo(t){const{srj:e,buses:n,layerNames:o}=t;yield{phase:"sources",routedConnectionCount:0};const i=KPe(t);if(!i)return null;const r=n.filter(y=>y.termination.type==="boundary");if(!r.length||r.some(y=>!y.exitEdge))return null;const s=NSo(t);if(!s)return null;const a=zPe({buses:n,exits:s.exits}),A=new Set(r.map(y=>s.targetLayerByBusId.get(y.busId))),c=o.findLast(y=>A.has(y)),l=o.filter(y=>y!==c&&r.some(x=>(x.routableEscapeLayers??x.allowedLayers??o).includes(y))),u=i.sourcePlans.filter(y=>y.termination.type==="plane"),g=AE({...t,allBuses:n,buses:r,targetLayer:c,targetLayerByBusId:s.targetLayerByBusId,transitLayers:l,terminals:r.flatMap(y=>y.connections.map(x=>({connection:x,viaPoint:i.fixedViaPointsByConnectionIndex.get(x.connectionIndex),exitPoint:a.get(x.connectionIndex)}))),...i,acceptedPlans:u,routeFromSourcePads:!0,sourceLayerTravelCost:2,sourceOriginPhysicalGridPhase:!0,includeDiagonalNeighbors:!0,traceMarginExtra:0,maximumIterations:6e7,maximumRipEvents:1e3,maximumLocalRepairAttempts:0,ripCost:64,shuffleSeed:1});let h=g.next();for(;!h.done;){if(i$(h.value)){const y=yield h.value;h=g.next(y);continue}yield{phase:"route-layer",iterations:h.value.iterations,routedConnectionCount:u.length+h.value.routedConnectionCount},h=g.next()}if(!h.value)return null;let d=[...h.value,...u];yield{phase:"repair-lengths",routedConnectionCount:d.length};const p=SO({...t,inputSrj:e,plans:d,preparedBuses:n});if(!p)return null;d=p;for(const y of r){if(y.maxLengthSkew===void 0)continue;const x=wNt({...t,inputSrj:e,plans:d,preparedBuses:n,bus:y});let E=x.next();for(;!E.done;)yield{phase:"repair-lengths",iterations:E.value.iterations,routedConnectionCount:d.length},E=x.next();E.value&&(d=E.value)}yield{phase:"match-layer",routedConnectionCount:d.length};let m=d;const _={...t,inputSrj:e,plans:d,preparedBuses:n,sharedBoundary:r[0].sharedBoundary,maximumWorkUnits:1e3,allowSourcePrefixMatching:!0,candidatePlansAreFeasible:y=>(m=[...y],!0)};let f=zy(_);f.plans||(f=zy({..._,maximumWorkUnits:1e5,allowDistributedMatching:!0,allowTransitLayerMatching:!0,allowMatchingInsideDenseBounds:!0}));const I=new Set;for(;!f.plans;){const y=f.failedBus.busId,x=r.find(S=>S.busId===y);if(!x||x.connections.length!==2||x.maxLengthSkew===void 0||I.has(x.busId))return null;I.add(x.busId);const E=RSo({...t,inputSrj:e,plans:m,preparedBuses:n,bus:x});let B=E.next();for(;!B.done;)yield{phase:"repair-lengths",iterations:B.value.iterations,routedConnectionCount:d.length},B=E.next();if(!B.value)return null;m=B.value,f=zy({..._,plans:m,maximumWorkUnits:1e5,allowDistributedMatching:!0,allowTransitLayerMatching:!0,allowMatchingInsideDenseBounds:!0})}if(!f.plans)return null;const C=DPe({...t,inputSrj:e,plans:f.plans,preparedBuses:n});return!C||C.length!==e.connections.length||new Set(C.map(y=>y.connectionIndex)).size!==C.length?null:qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...C.flatMap(y=>[y.trace,...y.planeEndpointTrace?[y.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?C:null}function kSo(t){const e=t.candidateSets.flat(),n=e.length,o=new Uint8Array(n*n),i=new Set,r=new Map;let s=0;const a=t.candidateSets.map(C=>C.map(()=>s++));let A=0;const c=(C,y)=>{const x=Math.min(C,y)*n+Math.max(C,y),E=o[x];if(E)return E===1;const B=t.areCompatible(e[C],e[y]);return o[x]=B?1:2,B},l=a.map(()=>[]);for(let C=0;C<a.length;C++)for(let y=C+1;y<a.length;y++)a[C].some(x=>a[y].some(E=>!c(x,E)))&&(l[C].push(y),l[y].push(C));const u=(C,y,x)=>{const E=[];let B=!0;for(const S of y){if(C[S].length===0){i.add(S),B=!1;continue}for(const Q of l[S])y.includes(Q)&&(x===void 0||Q===x)&&E.push([S,Q])}for(let S=0;S<E.length;S++){const[Q,w]=E[S];if(C[Q].length===0||C[w].length===0)continue;const M=C[Q].filter(k=>C[w].some(R=>c(k,R)));if(M.length!==C[Q].length){if(r.set(Q,w),C[Q]=M,M.length===0){i.add(Q),B=!1;continue}for(const k of l[Q])k!==w&&y.includes(k)&&E.push([k,Q])}}return B},g=a.map((C,y)=>y),h=C=>{const y=[...C],x=new Set(y);for(let E=0;E<y.length;E++){const B=r.get(y[E]);B!==void 0&&!x.has(B)&&(x.add(B),y.push(B))}return[...x]},d=a.map(C=>[...C]);if(!u(d,g))return{selection:null,searchStates:A,emptyDomainIndices:[...i],conflictDomainIndices:h([...i])};const m=(()=>{const y=Math.max(1,Math.min(5e3,Math.floor(t.maximumSearchStates/12)));for(let x=0;x<12;x++){const E=d.map((B,S)=>B[(x*17+S*7)%B.length]);for(let B=0;B<y;B++){const S=E.map(()=>0);for(let R=0;R<E.length;R++)for(const F of l[R])F<=R||c(E[R],E[F])||(S[R]=S[R]+1,S[F]=S[F]+1);const Q=Math.max(...S);if(Q===0)return E;const w=S.map((R,F)=>({conflicts:R,index:F})).filter(({conflicts:R})=>R===Q),M=w[(B+x)%w.length].index,k=d[M].map((R,F)=>({candidate:R,index:F,conflicts:l[M].filter(O=>!c(R,E[O])).length})).toSorted((R,F)=>R.conflicts-F.conflicts||(R.index-B-x)%d[M].length-(F.index-B-x)%d[M].length);E[M]=k[0].candidate}}return null})();if(m)return{selection:m.map(C=>e[C]),searchStates:A,emptyDomainIndices:[],conflictDomainIndices:[]};const _=(C,y,x)=>{if(!u(C,y,x))return null;const E=new Set(y.filter(w=>C[w].length>1)),B=[];for(;E.size>0;){const w=[E.values().next().value];E.delete(w[0]);for(let M=0;M<w.length;M++)for(const k of l[w[M]])E.delete(k)&&w.push(k);B.push(w)}if(B.length>1){let w=C;for(const M of B){const k=_(w.slice(),M);if(!k)return null;w=k}return w}let S=-1;for(const w of y)C[w].length>1&&(S<0||C[w].length<C[S].length)&&(S=w);if(S<0)return C;const Q=C[S].map(w=>{const M=l[S].filter(k=>y.includes(k)&&C[k].length>1).map(k=>C[k].filter(R=>c(w,R)).length);return{candidate:w,minimumSupport:Math.min(...M),totalSupport:M.reduce((k,R)=>k+R,0)}}).toSorted((w,M)=>M.minimumSupport-w.minimumSupport||M.totalSupport-w.totalSupport);for(const{candidate:w}of Q){if(A>=t.maximumSearchStates)return null;A++;const M=C.slice();M[S]=[w];const k=_(M,y,S);if(k)return k}return null},f=_(d,g),I=i.size>0||f?[...i]:[g.toSorted((C,y)=>l[y].length-l[C].length||d[C].length-d[y].length)[0]];return{selection:f?.map(C=>e[C[0]])??null,searchStates:A,emptyDomainIndices:I,conflictDomainIndices:f?[]:h(I)}}var lue=1e-9;function FSo(t){const e=t.candidateBusIds.filter(d=>!t.activeBusIds.has(d));if(e.length<2)return e;const n=e.length-1,o=t.planeBuses.find(d=>d.busId===e[n]),i=o?.connections[0]?.sourcePoint;if(!o||!i||o.connections.length!==1||o.termination.type!=="plane")return e;const r=o.termination.layer,s=o.direction==="up"||o.direction==="down"?"x":"y",a=s==="x"?"y":"x",A=s==="x"?o.xCoordinates:o.yCoordinates,c=s==="x"?o.pitchX:o.pitchY;if(A.length===0||!Number.isFinite(c)||c<=lue)return e;const l=(Math.min(...A)+Math.max(...A))/2,u=Math.sign(l-i[s]);if(u===0)return e;const g=new Set(e),h=t.planeBuses.filter(d=>{const p=d.connections[0]?.sourcePoint;if(d===o||d.componentId!==o.componentId||d.termination.type!=="plane"||d.termination.layer!==r||d.direction!==o.direction||d.connections.length!==1||!p||t.activeBusIds.has(d.busId)||g.has(d.busId)||Math.abs(p[a]-i[a])>lue)return!1;const m=(p[s]-i[s])*u;return m>lue&&m<=c+lue}).toSorted((d,p)=>{const m=d.connections[0].sourcePoint,_=p.connections[0].sourcePoint;return Math.abs(m[s]-i[s])-Math.abs(_[s]-i[s])||d.connections[0].connectionIndex-p.connections[0].connectionIndex})[0];return h?e.map((d,p)=>p===n?h.busId:d):e}function LSo(t){const e=t[0];if(!e||t.some(c=>c.componentId!==e.componentId))return;const n=t.flatMap(c=>c.connections.map(l=>l.sourcePoint));if(n.length===0)return;const o=n.reduce((c,l)=>({x:c.x+l.x,y:c.y+l.y}),{x:0,y:0});o.x/=n.length,o.y/=n.length;const{minX:i,maxX:r,minY:s,maxY:a}=e.componentBounds,A=[{edge:"left",distance:Math.abs(o.x-i)},{edge:"right",distance:Math.abs(r-o.x)},{edge:"bottom",distance:Math.abs(o.y-s)},{edge:"top",distance:Math.abs(a-o.y)}].toSorted((c,l)=>c.distance-l.distance);if(!(Math.abs(A[0].distance-A[1].distance)<=1e-9))return A[0].edge}function PNt(t,e){if(e)return!1;const n=t.filter(u=>u.termination.type==="boundary"),o=n.filter(u=>u.connections.length===1),i=n.filter(u=>u.connections.length===2),r=n.filter(u=>u.connections.length>=8),s=t.filter(u=>u.termination.type==="plane"&&u.connections.length===1).length,a=r[0]?.exitEdge;if(n.length!==9||o.length!==3||i.length!==3||r.length!==3||s<64||a===void 0||r.some(u=>u.exitEdge!==a))return!1;const A=LSo(r);return A===void 0?!1:(A==="left"||A==="right")!==(a==="left"||a==="right")}function HSo(t){const{trace:e,layerNames:n,allowBlindAndBuriedVias:o}=t;return{...e,route:e.route.map(i=>i.route_type==="via"&&!o?{...i,layers:Mx({fromLayer:i.from_layer,toLayer:i.to_layer,layerNames:n,allowBlindAndBuriedVias:o})}:{...i})}}function OSo(t){const{srj:e,layerNames:n,allowBlindAndBuriedVias:o}=t;return{...e,traces:(e.traces??[]).map(i=>HSo({trace:i,layerNames:n,allowBlindAndBuriedVias:o}))}}function jPe(t,e,n,o){const i=n.spanLayers.map(s=>{const a=e.indexOf(s);if(a<0)throw new Error(`FanoutSolver: via for "${t.connectionName}" uses unknown layer "${s}"`);return a}),r=qN(t);return{obstacleId:o==="endpoint"?r.planeEndpointViaObstacleId:o===0?r.viaObstacleId:`${r.viaObstacleId}:${o}`,type:"rect",center:n.center,width:n.diameter,height:n.diameter,layers:n.spanLayers,zLayers:i,__zLayers:i,connectedTo:[t.connectionName,t.trace.pcb_trace_id]}}function aR(t){const{inputSrj:e,plans:n,layerNames:o}=t,i=e.connections.map(u=>({...u,pointsToConnect:u.pointsToConnect.map(g=>({...g}))})),r=[],s=new Set;for(const u of n){const g=i[u.connectionIndex];if(!g)throw new Error(`FanoutSolver: output connection index ${u.connectionIndex} is missing`);const h=qN(u);if(g.pointsToConnect[u.sourcePointIndex]={x:u.exitPoint.x,y:u.exitPoint.y,layer:u.targetLayer,pointId:u.termination.type==="plane"?h.planeExitPointId:h.boundaryExitPointId},u.termination.type==="plane"&&s.add(u.connectionName),u.via){const d=jPe(u,o,u.via,0);d&&r.push(d)}for(const[d,p]of(u.additionalVias??[]).entries()){const m=jPe(u,o,p,d+1);m&&r.push(m)}if(u.planeEndpointVia){const d=jPe(u,o,u.planeEndpointVia,"endpoint");d&&r.push(d)}}const a=n.flatMap(u=>[u.trace,...u.planeEndpointTrace?[u.planeEndpointTrace]:[]]),A=a.flatMap(u=>u.route.filter(g=>"x"in g&&"y"in g)),c=Math.max(e.defaultObstacleMargin??0,e.minTraceWidth),l=A.length===0?{...e.bounds}:{minX:Math.min(e.bounds.minX,...A.map(u=>u.x-c)),maxX:Math.max(e.bounds.maxX,...A.map(u=>u.x+c)),minY:Math.min(e.bounds.minY,...A.map(u=>u.y-c)),maxY:Math.max(e.bounds.maxY,...A.map(u=>u.y+c))};return{...e,fanoutPlaneConnectivity:n.flatMap(u=>u.termination.type==="plane"?[{connectionName:u.connectionName,layer:u.termination.layer}]:[]),bounds:l,connections:i.filter(u=>!s.has(u.name)),buses:e.buses?.map(u=>({...u,connectionNames:u.connectionNames.filter(g=>!s.has(g))})).filter(u=>u.connectionNames.length>0),obstacles:[...e.obstacles.map(u=>({...u,center:{...u.center},layers:[...u.layers],connectedTo:[...u.connectedTo]})),...r],traces:[...(e.traces??[]).map(u=>({...u,route:u.route.map(g=>({...g}))})),...a]}}var GSo=5,YSo=40,USo=64,MNt=10,KSo=8;function DNt(t){const e=t.length,n=t.reduce((o,i)=>o+i,0);return e>=GSo&&e<=YSo&&n<=USo||e===4&&new Set(t).size>1}function VSo({boundaryBusConnectionCounts:t,planeBusCount:e}){const n=t.length;return n<=MNt-1&&e>=KSo?"mixed_with_planes":n>=MNt&&e===0&&DNt(t)?"large_boundary_only":null}function uue(t){if(!t.exitEdge)throw new Error(`Cannot order boundary bus ${t.busId} without an exit edge`);const e=e6(t.exitEdge);return t.connections.reduce((n,o)=>n+tR({bus:t,connection:o,boundaryDirection:e}),0)/t.connections.length}function zSo({busesInRoutingOrder:t,busLayerAssignments:e,routingMode:n}){if(n!=="large_boundary_only")return[...t];const o=t.filter(s=>s.connections.length===1);if(new Set(o.map(s=>s.exitEdge)).size!==1)return[...t];const i=[...t.filter(s=>s.connections.length>=8).toSorted((s,a)=>uue(a)-uue(s)),...t.filter(s=>s.connections.length>1&&s.connections.length<8)],r=[];for(const s of o){const a=e[s.busId];if(!a)throw new Error(`Cannot order boundary bus ${s.busId} without a layer`);let A=r.find(c=>c.targetLayer===a);A||(A={targetLayer:a,buses:[]},r.push(A)),A.buses.push(s)}return[...i,...r.flatMap(s=>s.buses.toSorted((a,A)=>uue(A)-uue(a)))]}var gue=1e-7;function r$(t,e){const n=t.sourceObstacle,o={...n,width:n.width-2e-8,height:n.height-2e-8},i=[];let r=!1,s=!1,a=!1;for(const[A,c]of[...t.segments,...t.planeEndpointSegments??[]].entries()){if(!n.layers.includes(c.layer))continue;const l=Tl(c,n),u=c.width/2;r&&o.width>0&&o.height>0&&Tl(c,o)<1e-10&&i.push({segmentIndex:A,kind:"outline"}),s&&l<u-gue&&i.push({segmentIndex:A,kind:"copper"}),a&&l<u+e-gue&&i.push({segmentIndex:A,kind:"clearance"}),IO(c.end,n,1e-9)||(r=!0);const g=wx(c.end,n);g>u+gue&&(s=!0),g>=u+e-gue&&(a=!0)}return i}function*JSo(t,e){const n=t.sourceEscapeSegmentCount??1,o=t.segments.slice(0,n),i=o.slice(0,64).findIndex((s,a)=>!bO(t,t.segments,e,new Set([a])));if(i<0)return;const r=o[i].width+e;for(let s=i;s>=Math.max(0,i-3);s--){let a=0;for(let A=s;A<Math.min(o.length,i+8);A++){const c=o[A];if(c.layer!==t.sourceLayer||A>s&&tn(o[A-1].end,c.start)>1e-7||(a+=tn(c.start,c.end),a>4*r+1e-7))break;if(A<=i)continue;const l=o[s].start,u=c.end,g=u.x-l.x,h=u.y-l.y,d=Math.min(Math.abs(g),Math.abs(h));for(const p of[{x:l.x+Math.sign(g)*d,y:l.y+Math.sign(h)*d},{x:u.x-Math.sign(g)*d,y:u.y-Math.sign(h)*d}])tn(l,p)+tn(p,u)>=a-1e-7||(yield[o[0].start,...o.slice(0,s).map(m=>m.end),p,u,...o.slice(A+1).map(m=>m.end)].filter((m,_,f)=>_===0||tn(m,f[_-1])>1e-7))}}}var fw=1e-7,WSo=64;function jSo(t,e,n){const o=t,i=(o.ccwRotationDegrees??0)/90;if(t.type!=="rect"||o.shape==="circle"||Math.abs(i-Math.round(i))>fw||Math.abs(t.width-t.height)<fw)return null;const r=Math.abs(Math.round(i))%2===1,s=r?t.height:t.width,a=r?t.width:t.height,A=s>a?"x":"y",c=(A==="x"?s:a)/2;return[-1,1].map(l=>({...e,[A]:t.center[A]+l*(c+n)}))}function $So(t){const{inputSrj:e,preparedBuses:n,layerNames:o,traceWidth:i,clearance:r}=t,s=n[0];if(!s)return t.plans.length?null:[];const a=s.sharedBoundary;if(n.some(g=>["minX","maxX","minY","maxY"].some(h=>g.sharedBoundary[h]!==a[h])))return null;const A=new Map(n.map(g=>[g.busId,g]));if(new Set(t.plans.map(g=>g.connectionIndex)).size!==t.plans.length)return null;let c=[...t.plans];const l=Z7(e,!1),u=Z0e({srj:e,sharedBoundary:a,clearance:r,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1});for(const[g,h]of c.entries()){if(!r$(h,r).length)continue;const p=A.get(h.busId)?.connections.find(R=>R.connectionIndex===h.connectionIndex),m=h.sourceEscapeSegmentCount??1,_=h.segments.slice(0,m),f=h.trace.route.findIndex(R=>R.route_type==="via"),I=jSo(h.sourceObstacle,h.sourcePoint,i/2+r+1e-6);if(!p||p.sourceObstacle!==h.sourceObstacle||!h.via||f<1||!I||!_.length||_.some(R=>R.layer!==h.sourceLayer||R.width!==i)||tn(_[0].start,h.sourcePoint)>fw||tn(_.at(-1).end,h.via.center)>fw||!o.includes(h.sourceLayer))return null;const C=c.filter((R,F)=>F!==g),y=new qj([...h.segments.slice(m),...h.planeEndpointSegments??[],...C.flatMap(R=>[...R.segments,...R.planeEndpointSegments??[]]),...l.flatMap(R=>R.segments)]),x=[...h.additionalVias??[],...h.planeEndpointVia?[h.planeEndpointVia]:[],...C.flatMap(R=>[R.via,...R.additionalVias??[],R.planeEndpointVia].filter(F=>!!F)),...l.flatMap(R=>R.vias)],E=[...new Set([...Array.from({length:Math.min(_.length,WSo-1)},(R,F)=>F+1),_.length])],B=[],S=new Set;for(const R of E){const F=_[R-1].end;for(const O of[null,...I]){const U=O??h.sourcePoint,Y=F.x-U.x,W=F.y-U.y,te=Math.min(Math.abs(Y),Math.abs(W));for(const j of[{x:U.x+Math.sign(Y)*te,y:U.y+Math.sign(W)*te},{x:F.x-Math.sign(Y)*te,y:F.y-Math.sign(W)*te}]){const J=[h.sourcePoint,...O?[O]:[],j,F].filter((ne,le,ge)=>le===0||tn(ne,ge[le-1])>fw),oe=JSON.stringify([R,J]);if(S.has(oe))continue;S.add(oe);const ie=J.slice(1).reduce((ne,le,ge)=>ne+tn(J[ge],le),0)+_.slice(R).reduce((ne,le)=>ne+tn(le.start,le.end),0);B.push({anchor:R,points:J,length:ie})}}}B.sort((R,F)=>R.length-F.length||R.anchor-F.anchor);const Q=R=>{const F=eR({points:R.map(W=>({...W,z:o.indexOf(h.sourceLayer)})),chamfer:i/2,segmentIsClear:(W,te)=>{if([W,te].some(J=>J.x<a.minX||J.x>a.maxX||J.y<a.minY||J.y>a.maxY))return!1;const j={start:W,end:te,width:i,layer:h.sourceLayer};return e.obstacles.every(J=>J===h.sourceObstacle||!J.layers.includes(j.layer)||Tl(j,J)>=i/2+r-fw||jj({inputSrj:e,segment:j,bodyObstacle:J,connectionName:h.connectionName}))&&y.querySegment(j,r).every(J=>Zm(j,J,r))&&x.every(J=>!J.spanLayers.includes(j.layer)||Cr(J.center,W,te)>=(i+J.diameter)/2+r-fw)}});if(!F)return null;const O=F.slice(1).map((W,te)=>({start:{x:F[te].x,y:F[te].y},end:{x:W.x,y:W.y},width:i,layer:h.sourceLayer})).filter(W=>tn(W.start,W.end)>fw),U=[...O,...h.segments.slice(m)],Y=bB(h,U,!0);return Y?(Y.sourceEscapeSegmentCount=O.length,Y.trace={...h.trace,route:[h.trace.route[0],...O.map(W=>({route_type:"wire",...W.end,width:W.width,layer:W.layer})),...h.trace.route.slice(f)]},r$(Y,r).length||!u([...C,Y])?null:Y):null},w=R=>bO(R,R.segments,r,new Set(Array.from({length:R.sourceEscapeSegmentCount??1},(F,O)=>O)));let M=null,k=null;for(const R of B){const F=Q([...R.points,..._.slice(R.anchor).map(O=>O.end)]);if(F){if(!w(F)){k??=F;continue}M=F;break}}if(!M&&k)for(const R of JSo(k,r)){const F=Q(R);if(F&&w(F)){M=F;break}}if(!M)return null;c[g]=M}return c.some(g=>r$(g,r).length)||!u(c)?null:qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...c.flatMap(g=>[g.trace,...g.planeEndpointTrace?[g.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:!1}).valid?c:null}var qSo=new Set(["left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]),XSo=new Set(["left","right","top","bottom"]),ZSo={top_left:{direction:"up",preferredExit:"top-left",exitEdge:"top"},top_middle:{direction:"up",preferredExit:"top",exitEdge:"top"},top_right:{direction:"up",preferredExit:"top-right",exitEdge:"top"},right_top:{direction:"right",preferredExit:"top-right",exitEdge:"right"},right_middle:{direction:"right",preferredExit:"right",exitEdge:"right"},right_bottom:{direction:"right",preferredExit:"bottom-right",exitEdge:"right"},bottom_right:{direction:"down",preferredExit:"bottom-right",exitEdge:"bottom"},bottom_middle:{direction:"down",preferredExit:"bottom",exitEdge:"bottom"},bottom_left:{direction:"down",preferredExit:"bottom-left",exitEdge:"bottom"},left_bottom:{direction:"left",preferredExit:"bottom-left",exitEdge:"left"},left_middle:{direction:"left",preferredExit:"left",exitEdge:"left"},left_top:{direction:"left",preferredExit:"top-left",exitEdge:"left"},top:{direction:"up",preferredExit:"top",exitEdge:"top"},right:{direction:"right",preferredExit:"right",exitEdge:"right"},bottom:{direction:"down",preferredExit:"bottom",exitEdge:"bottom"},left:{direction:"left",preferredExit:"left",exitEdge:"left"}};function NNt(t){const e=[...t].sort((o,i)=>o-i),n=[];for(const o of e)(n.length===0||Math.abs(n[n.length-1]-o)>1e-6)&&n.push(o);return n}function RNt(t){let e=Number.POSITIVE_INFINITY;for(let n=1;n<t.length;n++){const o=t[n]-t[n-1];o>1e-6&&(e=Math.min(e,o))}return e}function TNt(t,e){const n=e==="x"?"y":"x";let o=Number.POSITIVE_INFINITY;for(let i=0;i<t.length;i++){const r=t[i];for(let s=i+1;s<t.length;s++){const a=t[s];if(Math.abs(r.center[n]-a.center[n])>1e-6)continue;const A=Math.abs(r.center[e]-a.center[e]);A>1e-6&&(o=Math.min(o,A))}}return o}function eQo(t){return{minX:Math.min(...t.map(e=>e.center.x-e.width/2)),maxX:Math.max(...t.map(e=>e.center.x+e.width/2)),minY:Math.min(...t.map(e=>e.center.y-e.height/2)),maxY:Math.max(...t.map(e=>e.center.y+e.height/2))}}function kNt(t,e){const n=e.componentBounds?.[t.componentId];if(!n){const i=t.pitchX*2.25,r=t.pitchY*2.25;return{minX:t.bounds.minX-i,maxX:t.bounds.maxX+i,minY:t.bounds.minY-r,maxY:t.bounds.maxY+r}}if([n.minX,n.maxX,n.minY,n.maxY].some(i=>!Number.isFinite(i))||n.minX>=n.maxX||n.minY>=n.maxY)throw new Error(`FanoutSolver: componentBounds for "${t.componentId}" must contain finite, increasing bounds`);if(n.minX>t.bounds.minX+1e-6||n.maxX<t.bounds.maxX-1e-6||n.minY>t.bounds.minY+1e-6||n.maxY<t.bounds.maxY-1e-6)throw new Error(`FanoutSolver: componentBounds for "${t.componentId}" must contain every component pad`);return{...n}}function FNt(t,e){if([t.minX,t.maxX,t.minY,t.maxY].some(o=>!Number.isFinite(o))||t.minX>=t.maxX||t.minY>=t.maxY)throw new Error("FanoutSolver: sharedBoundary must contain finite, increasing bounds");for(const o of e)if(t.minX>o.bounds.minX+1e-6||t.maxX<o.bounds.maxX-1e-6||t.minY>o.bounds.minY+1e-6||t.maxY<o.bounds.maxY-1e-6)throw new Error(`FanoutSolver: sharedBoundary must contain every pad of component "${o.componentId}"`);return{...t}}function tQo(t,e){if(e.sharedBoundary)return FNt(e.sharedBoundary,t);const n=t.map(r=>kNt(r,e)),i=Math.max(...t.flatMap(r=>[r.pitchX,r.pitchY]))*2.25;return FNt({minX:Math.min(...n.map(r=>r.minX))-i,maxX:Math.max(...n.map(r=>r.maxX))+i,minY:Math.min(...n.map(r=>r.minY))-i,maxY:Math.max(...n.map(r=>r.maxY))+i},t)}function nQo(t){const e=new Map;for(const o of t){if(!o.componentId||o.isCopperPour)continue;const i=e.get(o.componentId)??[];i.push(o),e.set(o.componentId,i)}const n=[];for(const[o,i]of e){const r=NNt(i.map(m=>m.center.x)),s=NNt(i.map(m=>m.center.y)),a=TNt(i,"x"),A=TNt(i,"y"),c=RNt(r),l=RNt(s),u=Math.min(...[a,A,c,l].filter(Number.isFinite)),g=Math.max(...i.flatMap(m=>[m.width,m.height])),h=Number.isFinite(u)?u:g,d=Number.isFinite(a)?a:Number.isFinite(c)?c:h,p=Number.isFinite(A)?A:Number.isFinite(l)?l:h;n.push({componentId:o,obstacles:i,xCoordinates:r,yCoordinates:s,pitchX:d,pitchY:p,bounds:eQo(i)})}return n}function LNt(t){return"layer"in t?[t.layer]:t.layers}function HNt(t){const{point:e,connection:n,componentGrids:o}=t,i=LNt(e),r=[];for(const s of o){const a=s.obstacles.filter(A=>A.layers.some(c=>i.includes(c))).filter(A=>IO(e,A,1e-5)).sort((A,c)=>{const l=A.connectedTo.includes(n.name)||A.connectedTo.includes(e.pointId??"")||A.connectedTo.includes(e.pcb_port_id??""),u=c.connectedTo.includes(n.name)||c.connectedTo.includes(e.pointId??"")||c.connectedTo.includes(e.pcb_port_id??"");return l!==u?l?-1:1:A.width*A.height-c.width*c.height});a[0]&&r.push({grid:s,obstacle:a[0]})}return r}function oQo(t){for(const n of t.pointsToConnect)if("layers"in n&&n.busId)return n.busId;return/^BUS[_:-]([^_:-]+)(?:[_:-]\d+)?$/i.exec(t.name)?.[1]??null}function s$(t,e){if(e!==void 0){if(!qSo.has(e))throw new Error(`FanoutSolver: bus "${t}" has invalid preferredExit "${e}"`);return e}}function iQo(t,e){if(e!==void 0){if(!XSo.has(e))throw new Error(`FanoutSolver: bus "${t}" has invalid exitEdge "${e}"`);return e}}function rQo(t,e){if(e!==void 0)try{return XDt(e)}catch{throw new Error(`FanoutSolver: bus "${t}" has invalid exitPosition "${e}"`)}}function $Pe(t){const{busId:e,exitPosition:n,fieldName:o,expected:i,actual:r,sourceName:s}=t;if(!(r===void 0||r===i))throw new Error(`FanoutSolver: bus "${e}" exitPosition "${n}" conflicts with ${s} ${o} "${r}"`)}function sQo(t){const{busId:e,requestedBus:n,options:o}=t,i=n.exitPosition,r=rQo(e,i),s=s$(e,n.preferredExit),a=s$(e,o.busExitPreferences?.[e]),A=iQo(e,n.exitEdge);if(r&&i){for(const[u,g]of[[n.direction,"bus"],[o.busDirections?.[e],"busDirections"]])$Pe({busId:e,exitPosition:i,fieldName:"direction",expected:r.direction,actual:u,sourceName:g});for(const[u,g]of[[s,"bus"],[a,"busExitPreferences"]])$Pe({busId:e,exitPosition:i,fieldName:"preferredExit",expected:r.preferredExit,actual:u,sourceName:g});return $Pe({busId:e,exitPosition:i,fieldName:"exitEdge",expected:r.exitEdge,actual:A,sourceName:"bus"}),{exitPosition:i,...r.direction?{direction:r.direction}:{},...r.preferredExit?{preferredExit:r.preferredExit}:{},...r.exitEdge?{exitEdge:r.exitEdge}:{}}}const c=o.busDirections?.[e]??n.direction??o.defaultDirection,l=s$(e,a??s??o.defaultPreferredExit);return{...c?{direction:c}:{},...l?{preferredExit:l}:{},...A?{exitEdge:A}:{}}}function aQo(t,e){if(e!==void 0){if(e.length===0)throw new Error(`FanoutSolver: bus "${t}" must allow at least one layer`);for(const n of e)if(typeof n!="string"||n.length===0)throw new Error(`FanoutSolver: bus "${t}" has an invalid allowed layer`);return[...new Set(e)]}}function AQo(t,e){if(e!==void 0){if(!Number.isFinite(e)||e<0)throw new Error(`FanoutSolver: bus "${t}" maxLengthSkew must be a finite non-negative number`);return e}}function ONt(t){if(t===void 0)return;if(t.length===0)throw new Error("FanoutSolver: availableCornersAndSides must contain at least one boundary region");const e=[],n=new Set;for(const o of t){const i=ZSo[o];if(!i)throw new Error(`FanoutSolver: invalid availableCornersAndSides value "${o}"`);const r=`${i.exitEdge}:${i.direction}:${i.preferredExit}`;n.has(r)||(n.add(r),e.push(i))}return e}function cQo(t,e){if(e===void 0||e.type==="boundary")return{type:"boundary"};if(e.type!=="plane"||typeof e.layer!="string"||e.layer.length===0)throw new Error(`FanoutSolver: bus "${t}" has an invalid termination target`);return{type:"plane",layer:e.layer}}function lQo(t,e){const n=e.buses??t.buses,o=new Map,i=new Set,r=new Set(t.connections.map(s=>s.name));for(const s of n??[]){if(o.has(s.busId))throw new Error(`FanoutSolver: duplicate bus id "${s.busId}"`);for(const u of s.connectionNames){if(!r.has(u))throw new Error(`FanoutSolver: bus "${s.busId}" references unknown connection "${u}"`);if(i.has(u))throw new Error(`FanoutSolver: connection "${u}" belongs to more than one bus`);i.add(u)}const a=cQo(s.busId,s.termination),A=sQo({busId:s.busId,requestedBus:s,options:e}),c=aQo(s.busId,s.allowedLayers),l=AQo(s.busId,s.maxLengthSkew);if(a.type==="plane"&&l!==void 0)throw new Error(`FanoutSolver: plane-terminated bus "${s.busId}" cannot specify maxLengthSkew`);if(a.type==="plane"&&A.preferredExit!==void 0)throw new Error(`FanoutSolver: plane-terminated bus "${s.busId}" cannot also specify preferredExit`);o.set(s.busId,{...s,sourceComponentId:s.sourceComponentId??e.sourceComponentId,...A,...c===void 0?{}:{allowedLayers:c},...l===void 0?{}:{maxLengthSkew:l},termination:a})}for(const s of t.connections){if(i.has(s.name))continue;const a=oQo(s);if(a){const A=o.get(a);A?o.set(a,{...A,connectionNames:[...A.connectionNames,s.name]}):o.set(a,{busId:a,connectionNames:[s.name],direction:e.busDirections?.[a]??e.defaultDirection,sourceComponentId:e.sourceComponentId,preferredExit:s$(a,e.busExitPreferences?.[a]??e.defaultPreferredExit),termination:{type:"boundary"}})}else{const A=`connection:${s.name}`;o.set(A,{busId:A,connectionNames:[s.name],sourceComponentId:e.sourceComponentId,direction:e.busDirections?.[A]??e.defaultDirection,preferredExit:s$(A,e.busExitPreferences?.[A]??e.defaultPreferredExit),termination:{type:"boundary"}})}}return[...o.values()]}function uQo(t){const{busSpec:e,connections:n,componentGrids:o}=t,i=new Map;for(const c of n){const l=new Set;for(const u of c.pointsToConnect)for(const g of HNt({point:u,connection:c,componentGrids:o}))l.add(g.grid.componentId);for(const u of l)i.set(u,(i.get(u)??0)+1)}const r=[...o].sort((c,l)=>{const u=(i.get(l.componentId)??0)-(i.get(c.componentId)??0);return u!==0?u:l.obstacles.length-c.obstacles.length})[0],s=e.sourceComponentId?o.find(c=>c.componentId===e.sourceComponentId):void 0;if(e.sourceComponentId&&!s)throw new Error(`FanoutSolver: source component "${e.sourceComponentId}" for bus "${e.busId}" was not found`);const a=s??r,A=a?i.get(a.componentId)??0:0;if(!a||A!==n.length)throw new Error(e.sourceComponentId?`FanoutSolver: source component "${e.sourceComponentId}" is not an endpoint on every connection in bus "${e.busId}"`:`FanoutSolver: bus "${e.busId}" does not have one component endpoint on every connection`);return a}function gQo(t,e,n,o){const r=e.pointsToConnect.filter((s,a)=>a!==n).sort((s,a)=>tn(t,a)-tn(t,s))[0];if(!r&&o.type==="plane")return t;if(!r)throw new Error(`FanoutSolver: connection "${e.name}" has no target beyond its BGA pad`);return r}function dQo(t){const{connection:e,connectionIndex:n,sourceGrid:o,componentGrids:i,termination:r,exitTargetPoint:s}=t;for(let a=0;a<e.pointsToConnect.length;a++){const A=e.pointsToConnect[a],c=HNt({point:A,connection:e,componentGrids:i}).find(g=>g.grid.componentId===o.componentId);if(!c)continue;const l=LNt(A).find(g=>c.obstacle.layers.includes(g));if(!l)throw new Error(`FanoutSolver: connection "${e.name}" has no source layer shared with its BGA pad`);const u=gQo(A,e,a,r);return{connection:e,connectionIndex:n,sourcePoint:A,sourcePointIndex:a,sourceLayer:l,sourceObstacle:c.obstacle,targetPoint:u,exitTargetPoint:s??{x:u.x,y:u.y},hasExplicitLayeredExitTarget:s?.layer!==void 0}}throw new Error(`FanoutSolver: connection "${e.name}" does not touch component "${o.componentId}"`)}function qPe(t,e){let n=0,o=0;for(const i of e){const r=i.exitTargetPoint??i.targetPoint;n+=r.x-i.sourcePoint.x,o+=r.y-i.sourcePoint.y}if(Math.abs(n)<1e-9&&Math.abs(o)<1e-9)throw new Error(`FanoutSolver: cannot infer an escape direction for bus "${t}"`);return Math.abs(n)>=Math.abs(o)?n>=0?"right":"left":o>=0?"up":"down"}function hQo(t){switch(t){case"left":return["left"];case"right":return["right"];case"top":return["up"];case"bottom":return["down"];case"top-left":return["up","left"];case"top-right":return["up","right"];case"bottom-left":return["down","left"];case"bottom-right":return["down","right"]}}function GNt(t){return{x:t.reduce((e,n)=>e+n.sourcePoint.x,0)/t.length,y:t.reduce((e,n)=>e+n.sourcePoint.y,0)/t.length}}function due(t,e,n){switch(e){case"left":return t.x-n.minX;case"right":return n.maxX-t.x;case"up":return n.maxY-t.y;case"down":return t.y-n.minY}}function hue(t,e){return t.direction==="up"||t.direction==="down"?t.preferredExit.endsWith("left")?e.minX:t.preferredExit.endsWith("right")?e.maxX:(e.minX+e.maxX)/2:t.preferredExit.startsWith("top")?e.maxY:t.preferredExit.startsWith("bottom")?e.minY:(e.minY+e.maxY)/2}function YNt(t,e){return e==="up"||e==="down"?t.x:t.y}function pQo(t,e){try{return qPe(t,e)}catch{return}}function mQo(t){const{busId:e,explicitDirection:n,preferredExit:o,connections:i,sharedBoundary:r,availableRegions:s}=t,a=s.filter(g=>(n===void 0||g.direction===n)&&(o===void 0||g.preferredExit===o));if(a.length===0)throw new Error(`FanoutSolver: bus "${e}" cannot use its requested exit with availableCornersAndSides`);const A=n?void 0:pQo(e,i),c=A?a.filter(g=>g.direction===A):[],l=c.length>0?c:a,u=GNt(i);return[...l].toSorted((g,h)=>due(u,g.direction,r)-due(u,h.direction,r)||Math.abs(YNt(u,g.direction)-hue(g,r))-Math.abs(YNt(u,h.direction)-hue(h,r))||g.preferredExit.localeCompare(h.preferredExit))[0]}function _Qo(t){const{busId:e,exitEdge:n,preferredExit:o,availableRegions:i}=t,r=Ds(n,o);if(!i.some(a=>a.exitEdge===n&&Ds(a.exitEdge,a.preferredExit)===r))throw new Error(`FanoutSolver: bus "${e}" cannot use its requested exit with availableCornersAndSides`)}function fQo(t){const{busId:e,explicitDirection:n,preferredExit:o,connections:i,sharedBoundary:r,availableRegions:s}=t;if(s)return mQo({busId:e,explicitDirection:n,preferredExit:o,connections:i,sharedBoundary:r,availableRegions:s});if(!o)return{direction:n??qPe(e,i)};const a=hQo(o);if(n){if(!a.includes(n))throw new Error(`FanoutSolver: bus "${e}" direction "${n}" is incompatible with preferredExit "${o}"`);return{direction:n,preferredExit:o}}if(a.length===1)return{direction:a[0],preferredExit:o};let A;try{A=qPe(e,i)}catch{A=void 0}if(A&&a.includes(A))return{direction:A,preferredExit:o};const c=GNt(i);return{direction:a.toSorted((l,u)=>due(c,l,r)-due(c,u,r)||l.localeCompare(u))[0],preferredExit:o}}function IQo(t,e){const n=nQo(t.obstacles);if(n.length===0&&t.connections.length>0)throw new Error("FanoutSolver: no componentId-tagged pad footprint was found");const o=new Map(t.connections.map((l,u)=>[l.name,u])),i=lQo(t,e).map(l=>{for(const[d,p]of Object.entries(l.connectionExitTargets??{})){if(!l.connectionNames.includes(d))throw new Error(`FanoutSolver: connectionExitTargets contains connection "${d}" outside bus "${l.busId}"`);if(!Number.isFinite(p.x)||!Number.isFinite(p.y))throw new Error(`FanoutSolver: connectionExitTargets for connection "${d}" must contain finite x and y coordinates`)}const u=l.connectionNames.map(d=>{const p=o.get(d);if(p===void 0)throw new Error(`FanoutSolver: connection "${d}" is missing from the input`);return t.connections[p]}),g=uQo({busSpec:l,connections:u,componentGrids:n}),h=u.map(d=>dQo({connection:d,connectionIndex:o.get(d.name),sourceGrid:g,componentGrids:n,termination:l.termination??{type:"boundary"},exitTargetPoint:l.connectionExitTargets?.[d.name]}));return{busSpec:l,sourceGrid:g,preparedConnections:h}}),r=[...new Map(i.map(({sourceGrid:l})=>[l.componentId,l])).values()],s=tQo(r,e),a=ONt(e.availableCornersAndSides),A=[];for(const{busSpec:l,sourceGrid:u,preparedConnections:g}of i){if(l.exitEdge&&!l.preferredExit)throw new Error(`FanoutSolver: bus "${l.busId}" exitEdge requires preferredExit`);if(l.exitEdge&&l.preferredExit&&!ZDt(l.preferredExit,l.exitEdge))throw new Error(`FanoutSolver: bus "${l.busId}" exitEdge "${l.exitEdge}" is incompatible with preferredExit "${l.preferredExit}"`);const h=fQo({busId:l.busId,explicitDirection:l.direction??e.busDirections?.[l.busId],preferredExit:l.preferredExit,connections:g,sharedBoundary:s,availableRegions:l.termination?.type==="plane"||l.exitEdge?void 0:a});l.termination?.type!=="plane"&&l.exitEdge&&h.preferredExit&&a&&_Qo({busId:l.busId,exitEdge:l.exitEdge,preferredExit:h.preferredExit,availableRegions:a}),A.push({busId:l.busId,...l.maxLengthSkew===void 0?{}:{maxLengthSkew:l.maxLengthSkew},direction:h.direction,preferredExit:h.preferredExit,...l.exitEdge?{exitEdge:l.exitEdge}:{},cornerBandConnectionCount:0,allowedLayers:l.allowedLayers,termination:l.termination??{type:"boundary"},connections:g,componentId:u.componentId,componentObstacles:u.obstacles,componentBounds:kNt(u,e),sharedBoundary:s,xCoordinates:[...u.xCoordinates],yCoordinates:[...u.yCoordinates],pitchX:u.pitchX,pitchY:u.pitchY})}const c=new Map;for(const l of A){const u=Ds(l.exitEdge,l.preferredExit);if(!l.exitEdge||!u)continue;const g=`${l.exitEdge}:${u}`;c.set(g,(c.get(g)??0)+l.connections.length)}for(const l of A){const u=Ds(l.exitEdge,l.preferredExit);!l.exitEdge||!u||(l.cornerBandConnectionCount=c.get(`${l.exitEdge}:${u}`)??l.connections.length)}return A}var Iw=1e-9,UNt=Math.PI*2;function CQo(t){const{buses:e,rules:n}=t,o=e.find(M=>M.busId===t.busId);if(!o||o.termination.type!=="boundary"||!o.exitEdge||o.connections.length<3)return null;const i=t.maximumOrderingStates??1e4,r=t.maximumCompleteAssignments??16;for(const[M,k]of Object.entries({maximumOrderingStates:i,maximumCompleteAssignments:r}))if(!Number.isSafeInteger(k)||k<1)throw new Error(`FanoutSolver: ${M} must be a positive safe integer`);const s={x:(o.componentBounds.minX+o.componentBounds.maxX)/2,y:(o.componentBounds.minY+o.componentBounds.maxY)/2},a=M=>Math.atan2(M.y-s.y,M.x-s.x),A=M=>{const k=M.exitTargetPoint??M.targetPoint;return o.exitEdge==="right"?k.y:o.exitEdge==="top"?-k.x:o.exitEdge==="left"?-k.y:k.x},c=o.connections.toSorted((M,k)=>A(M)-A(k)||M.connectionIndex-k.connectionIndex),l=[];for(const M of c){if(tn(M.sourcePoint,s)<Iw)return null;let k=a(M.sourcePoint);for(;k<(l.at(-1)??k)-Iw;)k+=UNt;l.push(k)}if(l.at(-1)-l[0]>=UNt-Iw)return null;const u=new Map(e.flatMap(M=>M.connections.map(k=>[k.connectionIndex,k]))),g=new Map(c.map((M,k)=>[M.connectionIndex,k])),h=new Map,d=new Map;for(const M of u.values())d.set(M.connectionIndex,[]);for(const M of pw(e,n)){const k=u.get(M.connectionIndex),R=`${M.point.x.toFixed(9)},${M.point.y.toFixed(9)}`;h.has(R)||h.set(R,h.size);const F=g.get(M.connectionIndex),O=a(k.sourcePoint),U=F===void 0?a(M.point):l[F]+Math.atan2(Math.sin(a(M.point)-O),Math.cos(a(M.point)-O));d.get(M.connectionIndex).push({...M,angle:U,siteIndex:h.get(R),sourceSegment:{start:k.sourcePoint,end:M.point,layer:k.sourceLayer,width:n.traceWidth}})}const p=[...d.entries()].map(([M,k])=>({connectionIndex:M,candidates:k}));if(p.some(M=>M.candidates.length===0))return null;const m=c.map((M,k)=>d.get(M.connectionIndex).toSorted((R,F)=>Math.abs(R.angle-l[k])-Math.abs(F.angle-l[k])||tn(F.point,s)-tn(R.point,s))),_=n.viaHoleDiameter?n.viaHoleDiameter+(n.holeToHoleClearance??n.clearance):0,f=n.viaDiameter/2+n.traceWidth/2+n.clearance,I=(M,k)=>{const R=n.canShareCopper?.(M.connectionIndex,k.connectionIndex)??!1,F=R?_:Math.max(_,n.viaDiameter+n.clearance);return tn(M.point,k.point)<F-Iw?!1:R?!0:Cr(M.point,k.sourceSegment.start,k.sourceSegment.end)>=f-Iw&&Cr(k.point,M.sourceSegment.start,M.sourceSegment.end)>=f-Iw&&Zm(M.sourceSegment,k.sourceSegment,n.clearance)},C=new Map;for(const M of m)for(const k of M){const R=new Set;for(const F of p)for(const O of F.candidates)k.connectionIndex!==O.connectionIndex&&!I(k,O)&&R.add(O);C.set(k,R)}const y=[],x=_>Iw||!n.canShareCopper,E=()=>{if(!x)return!0;const M=new Map(y.map(O=>[O.connectionIndex,O.siteIndex])),k=p.map(O=>O.candidates.filter(U=>(!M.has(U.connectionIndex)||M.get(U.connectionIndex)===U.siteIndex)&&y.every(Y=>!C.get(Y).has(U))).map(U=>U.siteIndex)).sort((O,U)=>O.length-U.length);if(k.some(O=>O.length===0))return!1;const R=new Int32Array(h.size).fill(-1),F=(O,U)=>{for(const Y of k[O])if(!U[Y]&&(U[Y]=1,R[Y]===-1||F(R[Y],U)))return R[Y]=O,!0;return!1};return k.every((O,U)=>F(U,new Uint8Array(h.size)))};let B=0,S=0,Q=null;const w=M=>{if(++B>i)return!1;if(M===m.length){if(++S>r)return!1;const k=new Map(n.fixedViaPointsByConnectionIndex);for(const R of y)k.set(R.connectionIndex,R.point);return Q=pd(e,{...n,fixedViaPointsByConnectionIndex:k}),Q!==null}for(const k of m[M])if(!(k.angle<(y.at(-1)?.angle??-1/0)-Iw||y.some(R=>C.get(R).has(k)))){if(y.push(k),E()&&w(M+1))return!0;if(y.pop(),B>i||S>=r)break}return!1};return w(0),Q}var ah=1e-9,Cw=1,a$=globalThis.process?.env?.FANOUT_FLOW_DEBUG==="1";function yQo(t){const{boundary:e,sourcePoints:n,traceWidth:o,update:i}=t,r=e.maxX-e.minX,s=e.maxY-e.minY,a=Math.max(Math.min(r,s)*.02,.2),A=i.grid?Math.max(1,Math.ceil(i.grid.points.length/1200)):1,c=i.grid?i.grid.points.flatMap((u,g)=>g%A===0?[{point:u,index:g}]:[]):[],l=i.grid?.processedNodeCount??i.grid?.points.length??0;return{title:`Adaptive exits: ${i.phase}`,rects:[{center:{x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2},width:r,height:s,fill:"rgba(0, 0, 0, 0)",stroke:"rgba(14, 165, 233, 0.9)",label:"adaptive flow grid boundary"}],points:[...c.map(({point:u,index:g})=>{const h=g<l;return{...u,color:h?i.grid.obstacleFreeNodes[g]?"rgba(34, 197, 94, 0.38)":"rgba(100, 116, 139, 0.28)":"rgba(148, 163, 184, 0.18)",label:h?i.grid.obstacleFreeNodes[g]?"available flow node":"blocked flow node":"unprocessed flow node"}}),...n.map(u=>({...u,color:"#f97316",label:"adaptive route source"})),...(i.candidatePoints??[]).map(u=>({...u,color:"#06b6d4",label:"selected terminal node"}))],lines:(i.segments??[]).map(u=>({points:[u.start,u.end],strokeColor:"rgba(250, 204, 21, 0.9)",strokeWidth:Math.max(o,a*.4),label:"current adaptive route"})),texts:[{x:e.minX,y:e.maxY+a*2,text:`${i.phase}${i.direction?` · ${i.direction}`:""}${i.processed!==void 0&&i.total!==void 0?` · ${i.processed}/${i.total}`:""}`,color:"#0f172a",fontSize:a*1.5,anchorSide:"bottom_left"}]}}function xQo(t){const e=t.connection;return t.sourceObstacle.connectedTo.find(o=>o.startsWith("connectivity_net"))??e.netConnectionName??t.connection.name.replace(/::fanout:\d+$/,"")}function KNt(t,e){return t===e.connection.sourceObstacle||t.connectedTo.includes(e.connection.connection.name)||t.connectedTo.includes(e.netKey)}function pue(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.abs(n),r=Math.abs(o);return i<ah||r<ah||Math.abs(i-r)<ah?[t,e]:i>r?[t,{x:t.x+Math.sign(n)*r,y:e.y},e]:[t,{x:e.x,y:t.y+Math.sign(o)*i},e]}function VNt(t){if(t.length<2)return t;const e=[t[0]];for(const n of t.slice(1)){const o=e.at(-1),i=Math.abs(n.x-o.x),r=Math.abs(n.y-o.y);if(i<ah||r<ah||Math.abs(i-r)<ah){e.push(n);continue}e.push(...pue(n,o).reverse().slice(1))}return mue(e)}function mue(t){if(t.length<3)return t;const e=[t[0]];for(let n=1;n<t.length-1;n++){const o=e.at(-1),i=t[n],r=t[n+1];(Math.sign(i.x-o.x)!==Math.sign(r.x-i.x)||Math.sign(i.y-o.y)!==Math.sign(r.y-i.y))&&e.push(i)}return e.push(t.at(-1)),e}function EQo(t,e){if(t.length<3)return t;const n=[t[0]];for(let o=1;o<t.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a=tn(i,r),A=tn(r,s);if(a<ah||A<ah)continue;const c={x:(r.x-i.x)/a,y:(r.y-i.y)/a},l={x:(s.x-r.x)/A,y:(s.y-r.y)/A};if(Math.abs(c.x*l.x+c.y*l.y)>1e-6){n.push(r);continue}const u=Math.min(e,a/2,A/2);n.push({x:r.x-c.x*u,y:r.y-c.y*u}),n.push({x:r.x+l.x*u,y:r.y+l.y*u})}return n.push(t.at(-1)),mue(n)}function vO(t,e){const n=[];for(let o=1;o<t.length;o++)tn(t[o-1],t[o])<ah||n.push({start:t[o-1],end:t[o],width:e,layer:"top"});return n}var BQo=class{edges;levels;nextEdges;constructor(t){this.edges=Array.from({length:t},()=>[]),this.levels=new Int32Array(t),this.nextEdges=new Int32Array(t)}addEdge(t,e,n,o={}){const i={to:e,reverseIndex:this.edges[e].length,capacity:n,initialCapacity:n,...o},r={to:t,reverseIndex:this.edges[t].length,capacity:0,initialCapacity:0};this.edges[t].push(i),this.edges[e].push(r)}buildLevels(t,e){this.levels.fill(-1);const n=new Int32Array(this.edges.length);let o=0,i=0;for(n[i++]=t,this.levels[t]=0;o<i;){const r=n[o++];for(const s of this.edges[r])s.capacity<=0||this.levels[s.to]>=0||(this.levels[s.to]=this.levels[r]+1,n[i++]=s.to)}return this.levels[e]>=0}sendFlow(t,e){if(t===e)return 1;for(let n=this.nextEdges[t];n<this.edges[t].length;n++,this.nextEdges[t]=n){const o=this.edges[t][n];if(o.capacity<=0||this.levels[o.to]!==this.levels[t]+1)continue;const i=this.sendFlow(o.to,e);if(i!==0)return o.capacity-=i,this.edges[o.to][o.reverseIndex].capacity+=i,i}return 0}*maximumFlowSteps(t,e,n){let o=0;for(;o<n&&this.buildLevels(t,e);){this.nextEdges.fill(0);let i=0;for(;o<n;){const r=this.sendFlow(t,e);if(r===0)break;o+=r,i+=r,i>=4&&o<n&&(i=0,yield o)}}return o}};function*bQo(t){const{boundary:e,obstacles:n,traceWidth:o,clearance:i,reportProgress:r}=t,s=o+i,a=Math.round((e.maxX-e.minX)/s)+1,A=Math.round((e.maxY-e.minY)/s)+1,c=a*A,l=Array.from({length:c},(m,_)=>({x:e.minX+_%a*s,y:e.minY+Math.floor(_/a)*s})),u=o/2+i,g=new Map;for(let m=0;m<n.length;m++){const _=n[m],f=Math.floor((_.center.x-_.width/2-u)/Cw),I=Math.floor((_.center.x+_.width/2+u)/Cw),C=Math.floor((_.center.y-_.height/2-u)/Cw),y=Math.floor((_.center.y+_.height/2+u)/Cw);for(let x=f;x<=I;x++)for(let E=C;E<=y;E++){const B=`${x}:${E}`,S=g.get(B)??[];S.push(m),g.set(B,S)}(m+1)%128===0&&(r({phase:"index-obstacles",processed:m+1,total:n.length}),yield)}const h=(m,_=m)=>{const f=Math.floor(Math.min(m.x,_.x)/Cw),I=Math.floor(Math.max(m.x,_.x)/Cw),C=Math.floor(Math.min(m.y,_.y)/Cw),y=Math.floor(Math.max(m.y,_.y)/Cw),x=new Set;for(let E=f;E<=I;E++)for(let B=C;B<=y;B++)for(const S of g.get(`${E}:${B}`)??[])x.add(S);return[...x].map(E=>n[E])},d=new Uint8Array(c);for(let m=0;m<c;m++){const _=l[m];h(_).every(f=>wx(_,f)>=u-ah)&&(d[m]=1),(m+1)%2048===0&&(r({phase:"classify-flow-grid",processed:m+1,total:c,grid:{points:l,obstacleFreeNodes:d,processedNodeCount:m+1}}),yield)}const p=Array.from({length:c},()=>[]);for(let m=0;m<c;m++){if(!d[m])continue;const _=m%a,f=Math.floor(m/a);for(const[I,C]of[[1,0],[0,1]]){const y=_+I,x=f+C;if(y>=a||x>=A)continue;const E=x*a+y;if(!d[E])continue;const B={start:l[m],end:l[E]};h(B.start,B.end).some(S=>Tl(B,S)<u-ah)||(p[m].push(E),p[E].push(m))}(m+1)%2048===0&&(r({phase:"connect-flow-grid",processed:m+1,total:c,grid:{points:l,obstacleFreeNodes:d,processedNodeCount:c}}),yield)}return{boundary:e,step:s,columnCount:a,rowCount:A,nodeCount:c,points:l,obstacleFreeNodes:d,neighbors:p}}function*SQo(t){const{direction:e,availableDirections:n,items:o,grid:i,obstacles:r,traceWidth:s,clearance:a,occupiedNodes:A,acceptedSegments:c,connectorSelectionOffset:l=0,reportProgress:u}=t;if(o.length===0)return{routes:[],usedNodes:[],unmatchedItems:[]};const{boundary:g,step:h,columnCount:d,rowCount:p,nodeCount:m}=i,_=le=>i.points[le],f=s/2+a,I=s+a,C=new Uint8Array(m);for(let le=0;le<m;le++)!A[le]&&i.obstacleFreeNodes[le]&&(C[le]=1);const y=(le,ge)=>{const _e=vO(le,s);return _e.every(ue=>r.every(fe=>KNt(fe,ge)||Tl(ue,fe)>=f-ah))&&_e.every(ue=>c.every(fe=>tu(ue.start,ue.end,fe.start,fe.end)>=I-ah))},x=new Map;for(const le of o){const ge=`${le.source.x.toFixed(6)}:${le.source.y.toFixed(6)}:${le.netKey}`,_e=x.get(ge)??[];_e.push(le),x.set(ge,_e)}const E=Array.from({length:3721},(le,ge)=>{const _e=ge%61-30,ue=Math.floor(ge/61)-30;return{x:_e,y:ue,distanceSquared:_e*_e+ue*ue}}).sort((le,ge)=>le.distanceSquared-ge.distanceSquared),B=[];let S=0;for(const le of x.values()){const ge=le[0],_e=Math.hypot(ge.connection.sourceObstacle.width/2,ge.connection.sourceObstacle.height/2)+a+h*2,ue=Math.round((ge.source.x-g.minX)/h),fe=Math.round((ge.source.y-g.minY)/h),pe=[],ye=new Set;for(const Me of E){const ve=ue+Me.x,he=fe+Me.y;if(ve<0||ve>=d||he<0||he>=p)continue;const Qe=he*d+ve;if(!C[Qe]||ye.has(Qe)||tn(ge.source,_(Qe))>_e)continue;const Pe=pue(ge.source,_(Qe));if(y(Pe,ge)&&(ye.add(Qe),pe.push({node:Qe,connectorPoints:Pe}),pe.length>=12))break}if(pe.length===0)return null;B.push({item:ge,equivalentItems:le,candidates:pe}),S++,S%8===0&&(u({phase:"discover-terminal-connectors",direction:e,processed:S,total:x.size,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.flatMap(Me=>Me.candidates.map(ve=>_(ve.node))),segments:c}),yield)}const Q=[];let w=0;for(const le of[...B].sort((ge,_e)=>ge.candidates.length-_e.candidates.length)){const ge=le.candidates.length===0?0:l%le.candidates.length,ue=[...le.candidates.slice(ge),...le.candidates.slice(0,ge)].find(fe=>{const pe=vO(fe.connectorPoints,s);return Q.every(ye=>ye.netKey===le.item.netKey||pe.every(Me=>ye.segments.every(ve=>tu(Me.start,Me.end,ve.start,ve.end)>=I-ah)))});if(!ue)return null;le.candidates=[ue],Q.push({netKey:le.item.netKey,segments:vO(ue.connectorPoints,s)}),w++,w%8===0&&(u({phase:"select-terminal-connectors",direction:e,processed:w,total:B.length,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.flatMap(fe=>fe.candidates.map(pe=>_(pe.node))),segments:[...c,...Q.flatMap(fe=>fe.segments)]}),yield)}const M=new Set(B.map(le=>le.candidates[0].node));for(const le of Q)for(const ge of le.segments){const _e=Math.max(0,Math.floor((Math.min(ge.start.x,ge.end.x)-I-g.minX)/h)),ue=Math.min(d-1,Math.ceil((Math.max(ge.start.x,ge.end.x)+I-g.minX)/h)),fe=Math.max(0,Math.floor((Math.min(ge.start.y,ge.end.y)-I-g.minY)/h)),pe=Math.min(p-1,Math.ceil((Math.max(ge.start.y,ge.end.y)+I-g.minY)/h));for(let ye=fe;ye<=pe;ye++)for(let Me=_e;Me<=ue;Me++){const ve=ye*d+Me;if(!C[ve]||M.has(ve))continue;const he=_(ve);tu(ge.start,ge.end,he,he)<I-ah&&(C[ve]=0)}}const k=0,R=1,F=R+B.length,O=F+m,U=O+m,Y=new BQo(U+1);for(let le=0;le<B.length;le++){const ge=R+le;Y.addEdge(k,ge,1);for(const _e of B[le].candidates)Y.addEdge(ge,F+_e.node,1,{gridNode:_e.node})}for(let le=0;le<m;le++){if(!C[le])continue;Y.addEdge(F+le,O+le,1);const ge=le%d,_e=Math.floor(le/d);for(const fe of i.neighbors[le])C[fe]&&Y.addEdge(O+le,F+fe,1,{gridNode:fe});(e==="any"&&((!n||n.has("left"))&&ge===0||(!n||n.has("right"))&&ge===d-1||(!n||n.has("down"))&&_e===0||(!n||n.has("up"))&&_e===p-1)||e==="left"&&ge===0||e==="right"&&ge===d-1||e==="down"&&_e===0||e==="up"&&_e===p-1)&&Y.addEdge(O+le,U,1,{isSink:!0}),(le+1)%2048===0&&(u({phase:"build-flow-network",direction:e,processed:le+1,total:m,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.map(fe=>_(fe.candidates[0].node)),segments:[...c,...Q.flatMap(fe=>fe.segments)]}),yield)}const W=Y.maximumFlowSteps(k,U,B.length);let te=W.next();for(;!te.done;)u({phase:"augment-terminal-flow",direction:e,processed:te.value,total:B.length,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},candidatePoints:B.map(le=>_(le.candidates[0].node)),segments:[...c,...Q.flatMap(le=>le.segments)]}),yield,te=W.next();const j=te.value,J=le=>{const ge=R+le;return Y.edges[k].some(_e=>_e.to===ge&&_e.initialCapacity===1&&_e.capacity===0)};if(j!==B.length&&a$){const le=B.flatMap((ge,_e)=>J(_e)?[]:[ge.item.connection.connection.name]);console.error("single-layer flow group failed",{direction:e,achievedFlow:j,requiredFlow:B.length,unmatchedConnections:le})}const oe=[],ie=[],ne=[];for(let le=0;le<B.length;le++){const ge=B[le];if(!J(le)){ne.push(...ge.equivalentItems);continue}const _e=R+le,ue=Y.edges[_e].find(Pe=>Pe.initialCapacity===1&&Pe.capacity===0&&Pe.gridNode!==void 0);if(ue?.gridNode===void 0)return null;const fe=ge.candidates.find(Pe=>Pe.node===ue.gridNode);if(!fe)return null;const pe=[_(fe.node)];let ye=fe.node;const Me=[ye];for(let Pe=0;Pe<=m;Pe++){const we=O+ye,Te=Y.edges[we].find(Re=>Re.initialCapacity===1&&Re.capacity===0&&(Re.gridNode!==void 0||Re.isSink));if(!Te)return null;if(Te.isSink)break;if(Te.gridNode===void 0)return null;ye=Te.gridNode,Me.push(ye),pe.push(_(ye))}ie.push(...Me);const ve=mue([...fe.connectorPoints,...pe.slice(1)]),he=VNt(EQo(ve,h/2)),Qe=vO(he,s);for(const Pe of ge.equivalentItems)oe.push({item:Pe,points:he,segments:Qe});(le+1)%8===0&&(u({phase:"extract-flow-routes",direction:e,processed:le+1,total:B.length,grid:{points:i.points,obstacleFreeNodes:C,processedNodeCount:m},segments:[...c,...oe.flatMap(Pe=>Pe.segments)]}),yield)}return{routes:oe,usedNodes:ie,unmatchedItems:ne}}function zNt(t,e){const{item:n,points:o,segments:i}=t,r=o.map((a,A)=>({route_type:"wire",x:a.x,y:a.y,width:e,layer:"top",...A===0&&n.connection.sourcePoint.pcb_port_id?{start_pcb_port_id:n.connection.sourcePoint.pcb_port_id}:{}})),s=qN({connectionName:n.connection.connection.name,sourcePointIndex:n.connection.sourcePointIndex});return{busId:n.bus.busId,connectionName:n.connection.connection.name,connectionIndex:n.connection.connectionIndex,sourcePointIndex:n.connection.sourcePointIndex,sourcePoint:n.connection.sourcePoint,sourceObstacle:n.connection.sourceObstacle,sourceLayer:n.connection.sourceLayer,targetPoint:n.connection.targetPoint,targetLayer:"top",termination:n.bus.termination,direction:n.bus.direction,...n.bus.exitEdge?{exitEdge:n.bus.exitEdge}:{},exitPoint:o.at(-1),trace:{type:"pcb_trace",pcb_trace_id:s.traceId,connection_name:n.connection.connection.name,connectsTo:[...n.connection.sourcePoint.pointId?[n.connection.sourcePoint.pointId]:[],...n.connection.sourcePoint.pcb_port_id?[n.connection.sourcePoint.pcb_port_id]:[],s.boundaryExitPointId],route:r},segments:i,length:i.reduce((a,A)=>a+tn(A.start,A.end),0)}}function QQo(t,e){const n=pue(t,e),o=pue(e,t).reverse();return n.length===o.length&&n.every((i,r)=>tn(i,o[r])<ah)?[n]:[n,o]}function JNt(t){const{plans:e,items:n,obstacles:o,traceWidth:i,clearance:r}=t,s=new Map(n.map(g=>[g.connection.connection.name,g.netKey])),a=new Map,A=new Map;for(const g of e){const h=s.get(g.connectionName),d=a.get(h)??[],p=A.get(h)??new Set;for(const m of g.segments){const f=[m.start,m.end].map(I=>`${I.x.toFixed(6)}:${I.y.toFixed(6)}`).sort().join(":");p.has(f)||(p.add(f),d.push(m))}a.set(h,d),A.set(h,p)}const c=i/2+r;for(const[g,h]of a)for(const d of h)for(const p of o)if(!(p.connectedTo.includes(g)||Tl(d,p)>=c-ah))return a$&&console.error("single-layer route violates obstacle clearance",{netKey:g,segment:d,obstacleId:p.obstacleId,distance:Tl(d,p),requiredObstacleDistance:c}),!1;const l=i+r,u=[...a];for(let g=0;g<u.length;g++)for(let h=g+1;h<u.length;h++)for(const d of u[g][1])for(const p of u[h][1])if(tu(d.start,d.end,p.start,p.end)<l-ah)return a$&&console.error("single-layer routes violate copper clearance",{firstNetKey:u[g][0],secondNetKey:u[h][0],first:d,second:p,distance:tu(d.start,d.end,p.start,p.end),requiredRouteDistance:l}),!1;return!0}function vQo(t,e){return Math.abs(t.x-e.minX)<ah?"left":Math.abs(t.x-e.maxX)<ah?"right":Math.abs(t.y-e.minY)<ah?"down":Math.abs(t.y-e.maxY)<ah?"up":null}function*wQo(t){const{items:e,grid:n,obstacles:o,traceWidth:i,clearance:r,availableBoundaryRegions:s,onPartialRoutes:a,reportProgress:A}=t,c=s?new Set(s.map(_=>_.direction)):void 0,l=new Set(e.filter(_=>_.connection.sourceObstacle.width>2&&_.connection.sourceObstacle.height>2));let u=null;for(let _=0;_<4;_++){const f=e.filter(x=>!l.has(x));let I=null;for(let x=0;x<4;x++){const E=yield*SQo({direction:"any",availableDirections:c,items:f,grid:n,obstacles:o,traceWidth:i,clearance:r,occupiedNodes:new Uint8Array(n.nodeCount),acceptedSegments:[],connectorSelectionOffset:x,reportProgress:A});if(E){if(a&&E.routes.length>0&&E.routes.length<e.length){const B=E.routes.map(S=>zNt(S,i));JNt({plans:B,items:e,obstacles:o,traceWidth:i,clearance:r})&&a(B)}if((!I||E.routes.length>I.routes.length)&&(I=E),E.routes.length===f.length)break}}if(!I)return null;if(I.routes.length===f.length){u=I;break}const C=new Map;for(const x of f)C.set(x.netKey,(C.get(x.netKey)??0)+1);let y=!1;for(const x of I.unmatchedItems)(C.get(x.netKey)??0)<2||(l.add(x),y=!0);if(!y)return null}if(!u)return null;const g=[...u.routes],h=i/2+r,d=i+r;for(const _ of l){const f=g.filter(C=>C.item.netKey===_.netKey).flatMap(C=>C.points.map((y,x)=>({route:C,point:y,pointIndex:x}))).sort((C,y)=>+(y.route.item.bus.componentId===_.bus.componentId)-+(C.route.item.bus.componentId===_.bus.componentId)||tn(_.source,C.point)-tn(_.source,y.point));let I=null;for(const C of f){for(const y of QQo(_.source,C.point)){const x=vO(y,i),E=x.every(Q=>o.every(w=>KNt(w,_)||Tl(Q,w)>=h-ah)),B=x.every(Q=>g.every(w=>w.item.netKey===_.netKey||w.segments.every(M=>tu(Q.start,Q.end,M.start,M.end)>=d-ah)));if(!E||!B)continue;const S=VNt(mue([...y,...C.route.points.slice(C.pointIndex+1)]));I={item:_,points:S,segments:vO(S,i)};break}if(I)break}if(!I)return null;g.push(I),A({phase:"merge-same-net-routes",processed:g.length,total:e.length,grid:{points:n.points,obstacleFreeNodes:n.obstacleFreeNodes,processedNodeCount:n.nodeCount},segments:g.flatMap(C=>C.segments)}),yield}const p=g.map(_=>zNt(_,i));if(!JNt({plans:p,items:e,obstacles:o,traceWidth:i,clearance:r}))return a$&&console.error("single-layer adaptive exits failed exact clearance"),null;for(const _ of p){const f=vQo(_.exitPoint,n.boundary);if(!f||c&&!c.has(f))return null;const I=e.find(x=>x.connection.connection.name===_.connectionName);I.bus.direction=f;const C=s?.filter(x=>x.direction===f),y=f==="up"||f==="down"?_.exitPoint.x:_.exitPoint.y;I.bus.preferredExit=C?.toSorted((x,E)=>Math.abs(y-hue(x,n.boundary))-Math.abs(y-hue(E,n.boundary)))[0]?.preferredExit??(f==="up"?"top":f==="down"?"bottom":f),_.direction=f}const m=new Map(p.map(_=>[_.connectionName,_]));return e.map(_=>m.get(_.connection.connection.name))}function*AR(t){const{srj:e,buses:n,traceWidth:o,clearance:i,availableBoundaryRegions:r,onPartialRoutes:s,onProgress:a}=t;if(n.some(p=>p.connections.length!==1))return null;const A=n.flatMap(p=>p.connections.map(m=>({bus:p,connection:m,source:{x:m.sourcePoint.x,y:m.sourcePoint.y},netKey:xQo(m)}))),c=e.obstacles.filter(p=>p.layers.includes("top")),l=n[0]?.sharedBoundary;if(!l)return[];const u=A.map(p=>p.source),g=p=>{a?.(yQo({boundary:l,sourcePoints:u,traceWidth:o,update:p}),{adaptivePhase:p.phase,...p.direction?{adaptiveDirection:p.direction}:{},...p.processed!==void 0?{adaptiveWorkUnit:p.processed}:{},...p.total!==void 0?{adaptiveWorkUnitCount:p.total}:{}})};g({phase:"prepare-flow-grid",processed:0,total:c.length});const h=yield*bQo({boundary:l,obstacles:c,traceWidth:o,clearance:i,reportProgress:g});a$&&console.error("single-layer adaptive-exit grid ready",{nodeCount:h.nodeCount});const d=yield*wQo({items:A,grid:h,obstacles:c,traceWidth:o,clearance:i,availableBoundaryRegions:r,onPartialRoutes:s,reportProgress:g});return d||null}var Wy=1e-9;function PQo(t,e){const n=[t[0]];for(let o=1;o<t.length-1;o++){const i=t[o-1],r=t[o],s=t[o+1],a=r.x-i.x,A=r.y-i.y,c=s.x-r.x,l=s.y-r.y,u=Math.hypot(a,A),g=Math.hypot(c,l);if(!(u<Wy||g<Wy))if(Math.abs(a*c+A*l)<Wy){const h=Math.min(e,u/2,g/2);n.push({x:r.x-a/u*h,y:r.y-A/u*h},{x:r.x+c/g*h,y:r.y+l/g*h})}else n.push(r)}return n.push(t.at(-1)),n.filter((o,i)=>i===0||tn(o,n[i-1])>Wy)}function MQo(t,e,n){const o=t.toSorted((a,A)=>Math.atan2(a.exitPoint.y-n.y,a.exitPoint.x-n.x)-Math.atan2(A.exitPoint.y-n.y,A.exitPoint.x-n.x)),i=(a,A)=>{for(let c=0;c<Math.min(a.length,A.length);c++){const l=e.get(a[c].connectionIndex)-e.get(A[c].connectionIndex);if(l)return l<0}return!1},r=(a,A)=>a.length>A.length||a.length===A.length&&i(a,A),s=[];for(let a=o.length-1;a>=0;a--){let A=[];for(let c=a+1;c<o.length;c++)e.get(o[c].connectionIndex)>e.get(o[a].connectionIndex)&&r(s[c],A)&&(A=s[c]);s[a]=[o[a],...A]}return s.reduce((a,A)=>r(A,a)?A:a,[])}function*DQo(t){const{bus:e,srj:n,traceWidth:o,clearance:i,viaDiameter:r}=t;if(e.termination.type!=="boundary"||e.exitEdge!=="right"||e.connections.length<6||e.connections.some(ne=>ne.sourceLayer!=="top")||!(e.allowedLayers??t.layerNames).includes(t.targetLayer)||t.targetLayer==="top")return null;const s=e.componentObstacles.filter(ne=>ne.layers.includes("top"));if(!s.length)return null;const a={minX:Math.min(...s.map(ne=>ne.center.x-ne.width/2)),maxX:Math.max(...s.map(ne=>ne.center.x+ne.width/2)),minY:Math.min(...s.map(ne=>ne.center.y-ne.height/2)),maxY:Math.max(...s.map(ne=>ne.center.y+ne.height/2))},A={x:(a.minX+a.maxX)/2,y:(a.minY+a.maxY)/2},c=o+i,l=Math.max(e.pitchX,e.pitchY);if(!Number.isFinite(l)||l<=0)return null;const u=Math.ceil(((a.maxX-a.minX)/2+l+c)/c)*c,g=Math.ceil(((a.maxY-a.minY)/2+l+c)/c)*c,h={minX:A.x-u,maxX:A.x+u,minY:A.y-g,maxY:A.y+g};if(h.minX<=e.sharedBoundary.minX||h.maxX>=e.sharedBoundary.maxX||h.minY<=e.sharedBoundary.minY||h.maxY>=e.sharedBoundary.maxY)return null;const d=e.connections.map((ne,le)=>({...e,busId:`${e.busId}:source-perimeter:${le}`,sharedBoundary:h,preferredExit:void 0,exitEdge:void 0,connections:[{...ne,exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]})),p=yield*AR({srj:n,buses:d,traceWidth:o,clearance:i});if(!p||p.length!==e.connections.length)return null;const m=ne=>t.targetPointsByConnectionIndex?.get(ne.connectionIndex)??{x:e.sharedBoundary.maxX,y:(ne.exitTargetPoint??ne.targetPoint).y},_=e.connections.toSorted((ne,le)=>m(ne).y-m(le).y||ne.connectionIndex-le.connectionIndex),f=new Map(_.map((ne,le)=>[ne.connectionIndex,le])),I=MQo(p,f,A);if(I.length<3||I.length>=e.connections.length||I.some(ne=>Math.abs(ne.exitPoint.y-h.maxY)>Wy&&(Math.abs(ne.exitPoint.x-h.minX)>Wy||ne.exitPoint.y<A.y)))return null;const C=new Map(t.buses.flatMap(ne=>ne.connections.map(le=>[le.connectionIndex,{bus:ne,connection:le}]))),y=e.sharedBoundary.maxX-Math.max(l/2,r/2+i),x=r/2+o/2+i,B=y-x-1e-5-(I.length-1)*c,Q=e.sharedBoundary.maxY-c-(I.length-1)*c;if(B<=a.maxX+x||Q<=h.maxY+c)return null;const w=(ne,le)=>{const ge=C.get(ne.connectionIndex).bus,_e=ge.busId===e.busId?t.targetLayer:ge.termination.type==="plane"?ge.termination.layer:t.targetLayerByBusId?.get(ge.busId)??(ge.allowedLayers??t.layerNames).find(ue=>ue!==ne.sourceLayer);if(!_e)throw new Error("FanoutSolver: missing target layer for peripheral via assignment");return{center:le,diameter:r,holeDiameter:t.viaHoleDiameter,fromLayer:ne.sourceLayer,toLayer:_e,spanLayers:Mx({fromLayer:ne.sourceLayer,toLayer:_e,layerNames:t.layerNames,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias??!1})}},M=(ne,le)=>({connectionIndex:ne.connectionIndex,connectionName:ne.connection.name,segments:le.slice(1).map((ge,_e)=>({start:le[_e],end:ge,width:o,layer:ne.sourceLayer})),via:w(ne,le.at(-1))}),k=I.map((ne,le)=>{const ge=C.get(ne.connectionIndex).connection,_e=m(ge),ue=Q+le*c,fe=B+le*c;return M(ge,PQo([ne.segments[0].start,...ne.segments.map(pe=>pe.end),{x:ne.exitPoint.x,y:ue},{x:fe,y:ue},{x:fe,y:_e.y},{x:y,y:_e.y}],o))}),R=new Set(k.map(ne=>ne.connectionIndex)),F=(ne,le)=>{const ge=C.get(ne.connectionIndex).connection;if(ne.segments.some(_e=>[_e.start,_e.end].some(ue=>ue.x<e.sharedBoundary.minX-Wy||ue.x>e.sharedBoundary.maxX+Wy||ue.y<e.sharedBoundary.minY-Wy||ue.y>e.sharedBoundary.maxY+Wy)))return!1;for(const _e of n.obstacles)if(_e.layers.some(ue=>ne.via.spanLayers.includes(ue))&&wx(ne.via.center,_e)<r/2+i-Wy||_e!==ge.sourceObstacle&&ne.segments.some(ue=>_e.layers.includes(ue.layer)&&Tl(ue,_e)<o/2+i-Wy))return!1;for(const _e of le)if(ne.connectionIndex!==_e.connectionIndex&&(tn(ne.via.center,_e.via.center)<r+i-Wy||ne.segments.some(ue=>Cr(_e.via.center,ue.start,ue.end)<x-Wy)||_e.segments.some(ue=>Cr(ne.via.center,ue.start,ue.end)<x-Wy)||ne.segments.some(ue=>_e.segments.some(fe=>!Zm(ue,fe,i)))))return!1;return!0};if(k.some(ne=>!F(ne,k)))return null;const O=()=>{const ne=new Set(k.map(le=>le.connectionIndex));return t.buses.map(le=>({...le,connections:le.connections.filter(ge=>!ne.has(ge.connectionIndex))})).filter(le=>le.connections.length)},U=()=>({viaDiameter:r,viaHoleDiameter:t.viaHoleDiameter,traceWidth:o,clearance:i,additionalObstacles:n.obstacles,maximumSearchStates:3e5,blockingSegments:k.flatMap(ne=>ne.segments.map(le=>({connectionIndex:ne.connectionIndex,segment:le}))),blockingVias:k.map(ne=>({connectionIndex:ne.connectionIndex,...ne.via})),preferredViaPointsByConnectionIndex:t.initialViaPoints});let Y=O();const W=new Set(pw(Y,U()).map(ne=>ne.connectionIndex));for(const ne of Y)for(const le of ne.connections){if(W.has(le.connectionIndex))continue;if(ne.termination.type!=="plane")return null;const ge=le.sourcePoint,_e=le.sourceObstacle,ue=[{x:0,y:1,gap:a.maxY-ge.y},{x:-1,y:0,gap:ge.x-a.minX},{x:0,y:-1,gap:ge.y-a.minY},{x:1,y:0,gap:a.maxX-ge.x}].sort((pe,ye)=>pe.gap-ye.gap);let fe=null;for(const pe of ue){for(let ye=0;ye<8;ye++){const Me=(pe.x?_e.width:_e.height)/2+r/2+i+1e-5+ye*o,ve=M(le,[ge,{x:ge.x+pe.x*Me,y:ge.y+pe.y*Me}]);if(F(ve,k)){fe=ve;break}}if(fe)break}if(!fe)return null;k.push(fe)}Y=O();const te=U(),j=pd(Y,te);if(!j)return null;yield;const J=CQo({buses:Y,busId:e.busId,rules:{...te,preferredViaPointsByConnectionIndex:j}});if(!J)return null;const oe=[...k,...Y.flatMap(ne=>ne.connections.map(le=>M(le,[le.sourcePoint,J.get(le.connectionIndex)])))];if(oe.some(ne=>!F(ne,oe)))return null;const ie=new Map(oe.map(ne=>[ne.connectionIndex,ne.via.center]));return{sourceEscapes:oe,viaPointsByConnectionIndex:ie,remoteConnectionIndices:R,localBus:Y.find(ne=>ne.busId===e.busId),sourceBoundary:h}}function*NQo(t){const{srj:e,bus:n,targetLayer:o,sourceBoundary:i,sourceEscapes:r,remoteConnectionIndices:s,traceWidth:a,clearance:A}=t;if(n.exitEdge!=="right"||n.termination.type!=="boundary")return null;const c=a+A,l=Math.min(n.pitchX,n.pitchY),u=new Map(r.map(R=>[R.connectionIndex,R])),g=n.connections.map(R=>{const F=u.get(R.connectionIndex);if(!F)throw new Error(`FanoutSolver: missing source escape for ${R.connection.name}`);const O=R.exitTargetPoint??R.targetPoint;return{connection:R,viaPoint:F.via.center,exitPoint:{x:n.sharedBoundary.maxX,y:O.y}}}).sort((R,F)=>R.exitPoint.y-F.exitPoint.y),h=g.filter(R=>!s.has(R.connection.connectionIndex));if(h.length<2||h.length===g.length)return null;const d=Math.min(...n.componentObstacles.map(R=>R.center.x-R.width/2)),p=Math.max(...h.map(R=>R.viaPoint.x))-a/2,m=d+t.viaDiameter/2;if(p-m<(h.length-1)*c)return null;const _=i.maxY,f={minX:d-l,maxX:Math.max(...h.map(R=>R.viaPoint.x))+2*l,minY:Math.min(...h.map(R=>R.viaPoint.y))-3*l,maxY:_},I=new Set(h.map(R=>R.connection.connectionIndex)),C=h.map((R,F)=>({...R,exitPoint:{x:p+(m-p)*F/(h.length-1),y:_}})),y={...n,exitEdge:"top",direction:"up",preferredExit:void 0,sharedBoundary:f,connections:h.map(R=>R.connection)},x=new Map(r.map(R=>[R.connectionIndex,[R.segments[0].start,...R.segments.map(F=>F.end)]]));let E;for(const R of[-1,0,1]){const F=yield*BC({...t,bus:y,srj:{...e,bounds:f},acceptedPlans:[],terminals:C,sourceEscapePaths:x,reservedVias:r.filter(O=>!I.has(O.connectionIndex)).map(O=>({connectionName:O.connectionName,via:O.via})),allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,gridStepDivisor:2,gridStep:c/4,alignGridToPads:!0,maximumRouteOrderAttempts:1,routeOrder:h.map((O,U)=>h.length-U-1),laneBias:R},1,!1);if(F.length){E=F[0];break}}if(!E)return null;const B=new Map(E.map(R=>[R.connectionIndex,R])),S=_+l,Q=n.sharedBoundary.maxX-(h.length+1)*c-2*t.viaDiameter;if(S+(h.length-1)*c+a/2>n.sharedBoundary.maxY)return null;let w=0;const M=[];for(const R of g){const F=u.get(R.connection.connectionIndex),O=B.get(R.connection.connectionIndex);let U;if(O){const Y=O.segments.filter(le=>le.layer===o),W=Y.at(-1),te=W.end.x-W.start.x,j=W.end.y-W.start.y;if(j<=0||Math.abs(te)>j+1e-7)return null;const J=W.end,oe=S+w*c,ie=Q+w*c;w++;const ne=RQo([J,{x:J.x,y:oe},{x:ie,y:oe},{x:ie,y:R.exitPoint.y},R.exitPoint],a);U=[Y[0].start,...Y.map(le=>le.end),...ne.slice(1)]}else U=[F.via.center,R.exitPoint];M.push(i4({...t,bus:n,terminal:R,targetLayerPoints:U,sourceEscapePoints:x.get(R.connection.connectionIndex),allowBlindAndBuriedVias:!1}))}const k=M.map(R=>R.length);if(n.maxLengthSkew!==void 0&&Math.max(...k)-Math.min(...k)>n.maxLengthSkew+1e-6||!Wh({plans:M,srj:e,sharedBoundary:n.sharedBoundary,clearance:A,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;for(const R of M)for(const F of r)if(R.connectionIndex!==F.connectionIndex)for(const O of R.segments){if(F.via.spanLayers.includes(O.layer)&&Cr(F.via.center,O.start,O.end)<F.via.diameter/2+O.width/2+A-1e-7)return null;for(const U of F.segments)if(O.layer===U.layer&&tu(O.start,O.end,U.start,U.end)<(O.width+U.width)/2+A-1e-7)return null}return M}function RQo(t,e){const n=t.filter((o,i)=>i===0||tn(o,t[i-1])>1e-9);return n.flatMap((o,i)=>{if(i===0||i===n.length-1)return[o];const r=n[i-1],s=n[i+1],a=Math.min(e,tn(r,o)/3,tn(o,s)/3);return Math.abs((o.x-r.x)*(s.x-o.x)+(o.y-r.y)*(s.y-o.y))>1e-9?[o]:[{x:o.x+(r.x-o.x)*a/tn(r,o),y:o.y+(r.y-o.y)*a/tn(r,o)},{x:o.x+(s.x-o.x)*a/tn(o,s),y:o.y+(s.y-o.y)*a/tn(o,s)}]})}function*TQo(t){const{bus:e,sourceBoundary:n,sourceEscapes:o,traceWidth:i,clearance:r,targetLayer:s}=t,a=Ds(e.exitEdge,e.preferredExit);if(t.allowBlindAndBuriedVias||e.exitEdge!=="right"||a!==void 0&&a!=="minimum"||e.connections.length<3)return null;const A=e.routableEscapeLayers??e.allowedLayers??[],c=A.find(W=>W!==s);if(!c||!A.includes(s)||e.connections.some(W=>W.sourceLayer===s))return null;const l=new Map(o.map(W=>[W.connectionIndex,W])),u=i+r,g=Math.min(e.pitchX,e.pitchY),h=t.viaDiameter+r,d=e.sharedBoundary.minX+Math.max(g/2,t.viaDiameter/2+r);if(d+(e.connections.length-1)*h>=n.minX)return null;const p=t.acceptedPlans.filter(W=>W.exitEdge===e.exitEdge&&W.cornerBandSide==="minimum").length,m=e.connections.map(W=>{const te=l.get(W.connectionIndex);if(!te)throw new Error(`FanoutSolver: missing crossbar source escape for ${W.connection.name}`);return{connection:W,viaPoint:te.via.center,exitPoint:{x:e.sharedBoundary.maxX,y:BB(a?{...t,connection:W,cornerExitLaneOffset:p}:{...t,bus:{...e,preferredExit:"bottom-right"},connection:W,cornerExitLaneOffset:p,windingOrderIndex:0})}}}),_=m.toSorted((W,te)=>W.exitPoint.y-te.exitPoint.y);if(!a)for(const[W,te]of _.entries())te.exitPoint.y=n.minY+g+W*h;const f=new Map(_.map(W=>[W.connection.connectionIndex,W.exitPoint.y])),I=Math.min(n.maxY-u,Math.max(...m.map(W=>W.viaPoint.y))+2*g),C=Math.max(n.minY+u,Math.min(...m.map(W=>W.viaPoint.y))-2*g,...a?[]:[Math.max(...f.values())+t.viaDiameter/2+i/2+r+u]);if(I-C<(m.length-1)*h||C<=Math.max(...f.values())+t.viaDiameter/2+i/2+r)return null;const y=new Map(o.map(W=>[W.connectionIndex,[W.segments[0].start,...W.segments.map(te=>te.end)]])),x=[...t.srj.obstacles.filter(W=>W.layers.includes(s)).map(W=>({...W,layers:["top"]})),...o.map(W=>({type:"rect",shape:"circle",center:W.via.center,width:W.via.diameter,height:W.via.diameter,layers:["top"],connectedTo:[W.connectionName]}))];for(let W=n.minY;W<=n.maxY;W+=u)(W<C||W>I)&&x.push({type:"rect",shape:"circle",center:{x:n.minX,y:W},width:i/1e3,height:i/1e3,layers:["top"],connectedTo:["blocked-port"]});const E=m.map((W,te)=>({...e,busId:e.busId+":"+te,sharedBoundary:n,preferredExit:void 0,exitEdge:void 0,connections:[{...W.connection,sourcePoint:{...W.viaPoint,layer:"top"},sourceLayer:"top",sourceObstacle:x.find(j=>j.connectedTo.includes(W.connection.connection.name)&&tn(j.center,W.viaPoint)<1e-7),exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]})),B=AR({srj:{...t.srj,obstacles:x},buses:E,traceWidth:i,clearance:r,availableBoundaryRegions:[{exitEdge:"left",direction:"left",preferredExit:"left"}]});let S=B.next();for(;!S.done;)yield{phase:"route-connection",routeOrderAttempt:0,connectionIndex:0,connectionCount:m.length,connectionName:m[0].connection.connection.name,searchBatch:0,expandedStateCount:0,connectionComplete:!1},S=B.next();const Q=S.value?.length===m.length?S.value.map(W=>{const te=m.find(j=>j.connection.connectionIndex===W.connectionIndex);return i4({...t,terminal:{...te,exitPoint:W.exitPoint},sourceEscapePoints:y.get(W.connectionIndex),targetLayerPoints:[W.segments[0].start,...W.segments.map(j=>j.end)],allowBlindAndBuriedVias:!1})}):void 0;if(!Q)return null;const w=Q.toSorted((W,te)=>a?W.exitPoint.y-te.exitPoint.y:m.find(j=>j.connection.connectionIndex===W.connectionIndex).exitPoint.y-m.find(j=>j.connection.connectionIndex===te.connectionIndex).exitPoint.y),M=(W,te,j)=>({center:W,diameter:t.viaDiameter,holeDiameter:t.viaHoleDiameter,fromLayer:te,toLayer:j,spanLayers:Mx({fromLayer:te,toLayer:j,layerNames:t.layerNames,allowBlindAndBuriedVias:!1})}),k=new Map;for(const[W,te]of w.entries()){const j=te.segments.at(-1),J=j.end.x-j.start.x,oe=j.end.y-j.start.y;if(J>=0||Math.abs(oe)>-J+1e-7)return null;const ie=m.find(ue=>ue.connection.connectionIndex===te.connectionIndex),ne=d+W*h,le={x:ne,y:te.exitPoint.y},ge={x:ne,y:f.get(te.connectionIndex)},_e=[{start:te.exitPoint,end:le,width:i,layer:s},{start:le,end:ge,width:i,layer:c}];k.set(te.connectionIndex,{...te,segments:[...te.segments,..._e],additionalVias:[M(le,s,c),M(ge,c,s)],direction:e.direction,exitEdge:e.exitEdge,cornerBandSide:Ds(e.exitEdge,e.preferredExit),exitPoint:ie.exitPoint})}const R=[...k.values()],F=m.map(W=>({...W.connection,sourcePoint:{...k.get(W.connection.connectionIndex).additionalVias[1].center,layer:s},sourceLayer:s})),O={...t,bus:{...e,connections:F},terminals:F.map((W,te)=>({connection:W,viaPoint:W.sourcePoint,exitPoint:m[te].exitPoint})),acceptedPlans:[...t.acceptedPlans,...R],reservedVias:[...o.map(W=>({connectionName:W.connectionName,via:W.via})),...R.flatMap(W=>W.additionalVias.map(te=>({connectionName:W.connectionName,via:te})))],allowSourceLayerRouting:!0,sourceEscapePaths:void 0,gridStep:u*3/8,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:6,routeOrder:m.map((W,te)=>te).sort((W,te)=>m[W].exitPoint.y-m[te].exitPoint.y)},U=yield*BC(O,1,!1);if(!U.length)return null;const Y=Q.map(W=>{const te=k.get(W.connectionIndex),j=U[0].find(ge=>ge.connectionIndex===W.connectionIndex),[J,oe]=te.additionalVias,ie=(ge,_e)=>({route_type:"wire",...ge,width:i,layer:_e}),ne=ge=>({route_type:"via",...ge.center,from_layer:ge.fromLayer,to_layer:ge.toLayer,via_diameter:ge.diameter,via_hole_diameter:ge.holeDiameter}),le=[...te.segments,...j.segments];return{...te,segments:le,trace:{...W.trace,route:[...W.trace.route,ie(J.center,s),ne(J),ie(J.center,c),ie(oe.center,c),ne(oe),...j.trace.route]},length:le.reduce((ge,_e)=>ge+tn(_e.start,_e.end),0)}});if(!Wh({...t,plans:[...t.acceptedPlans,...Y],sharedBoundary:e.sharedBoundary}))return null;for(const W of Y)for(const te of o)if(W.connectionIndex!==te.connectionIndex){for(const j of W.segments){if(te.via.spanLayers.includes(j.layer)&&Cr(te.via.center,j.start,j.end)<te.via.diameter/2+i/2+r-1e-7)return null;for(const J of te.segments)if(J.layer===j.layer&&tu(j.start,j.end,J.start,J.end)<i+r-1e-7)return null}for(const j of W.additionalVias){if(tn(j.center,te.via.center)<t.viaDiameter+r-1e-7)return null;for(const J of te.segments)if(j.spanLayers.includes(J.layer)&&Cr(j.center,J.start,J.end)<t.viaDiameter/2+i/2+r-1e-7)return null}}return Y}function _ue(t){const e=new Map,n=o=>{if(o===null||typeof o!="object")return o;if(e.has(o))return e.get(o);if(o instanceof Map){const a=new Map;e.set(o,a);for(const[A,c]of o)a.set(A,n(c));return a}if(o instanceof Set){const a=new Set(o);return e.set(o,a),a}if(Array.isArray(o)){const a=[];e.set(o,a);for(const A of o)a.push(n(A));return a}const i=o,r={};e.set(o,r);for(const[a,A]of Object.entries(i))r[a]=n(A);typeof i.x=="number"&&typeof i.y=="number"&&(r.x=-i.x),typeof i.minX=="number"&&typeof i.maxX=="number"&&(r.minX=-i.maxX,r.maxX=-i.minX),Array.isArray(i.xCoordinates)&&(r.xCoordinates=i.xCoordinates.map(a=>-a).sort((a,A)=>a-A)),typeof i.ccwRotationDegrees=="number"&&(r.ccwRotationDegrees=-i.ccwRotationDegrees);const s=a=>a==="left"?"right":a==="right"?"left":a;for(const a of["direction","exitEdge","preferredExit"])typeof i[a]=="string"&&(r[a]=i[a].split("-").map(s).join("-"));return i.cornerBandSide&&(i.exitEdge==="top"||i.exitEdge==="bottom")&&(r.cornerBandSide=i.cornerBandSide==="minimum"?"maximum":"minimum"),r};return n(t)}function*WNt(t){const{bus:e,srj:n,sourceEscapes:o,sourceBoundary:i,targetLayer:r,acceptedPlans:s,traceWidth:a,clearance:A,viaDiameter:c}=t,l=e.exitEdge==="left",u=l?t.oppositeLayout:void 0,g=e.routableEscapeLayers??e.allowedLayers??[],h=e.connections[0].sourceLayer,d=l?g.find(Ce=>Ce!==r):h;if(e.termination.type!=="boundary"||e.exitEdge!=="right"&&!l||!d||!g.includes(r)||d===r||!(e.routableEscapeLayers??e.allowedLayers??[]).includes(d))return null;const p=Ds(e.exitEdge,e.preferredExit)==="minimum",m=e.connections.length,_=a+A,f=Math.ceil((c+A)/_)*_,I=new Map(o.map(Ce=>[Ce.connectionIndex,Ce])),C=e.connections.map(Ce=>I.get(Ce.connectionIndex));if(m<2||C.some(Ce=>!Ce))return null;const y=C.map(Ce=>Ce.via.center),x=Math.round(((l?(i.minX+i.maxX)/2+(u?.sourcePortOffset??0):Math.min(...y.map(Ce=>Ce.x)))+f-i.minX)/_),E=Math.round(f/_),B=new Set(Array.from({length:m},(Ce,Le)=>x+Le*E)),S=Math.round((i.maxX-i.minX)/_);if(x<1||Math.max(...B)>=S)return null;const Q=(Ce,Le,Ye)=>({type:"rect",shape:"circle",center:Le,width:Ye,height:Ye,layers:["top"],connectedTo:[Ce]}),w=[...n.obstacles.filter(Ce=>Ce.layers.includes(r)).map(Ce=>({...Ce,layers:["top"]})),...o.map(Ce=>Q(Ce.connectionName,Ce.via.center,Ce.via.diameter)),...s.flatMap(Ce=>(Ce.additionalVias??[]).map(Le=>Q(Ce.connectionName,Le.center,Le.diameter))),...s.flatMap(Ce=>Ce.segments.filter(Le=>Le.layer===r).map(Le=>({type:"rect",center:{x:(Le.start.x+Le.end.x)/2,y:(Le.start.y+Le.end.y)/2},width:tn(Le.start,Le.end),height:Le.width,ccwRotationDegrees:Math.atan2(Le.end.y-Le.start.y,Le.end.x-Le.start.x)*180/Math.PI,layers:["top"],connectedTo:[Ce.connectionName]})))];for(let Ce=0;Ce<=S;Ce++)B.has(Ce)||w.push(Q(`reserved-crossbar-port-${Ce}`,{x:i.minX+Ce*_,y:i.minY},a/1e3));const M=e.connections.map((Ce,Le)=>{const Ye=y[Le],tt=w.find(At=>At.connectedTo.includes(Ce.connection.name)&&tn(At.center,Ye)<1e-7);return{...e,busId:`${e.busId}:source-${Le}`,sharedBoundary:i,preferredExit:void 0,exitEdge:void 0,connections:[{...Ce,sourcePoint:{...Ce.sourcePoint,...Ye,layer:"top"},sourceObstacle:tt,sourceLayer:"top",exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]}}),k=AR({srj:{...n,bounds:i,obstacles:w},buses:M,traceWidth:a,clearance:A,availableBoundaryRegions:[{direction:"down",preferredExit:"bottom",exitEdge:"bottom"}]});let R=k.next();for(;!R.done;)yield{phase:"route-connection",routeOrderAttempt:0,connectionIndex:0,connectionCount:m,connectionName:e.connections[0].connection.name,searchBatch:0,expandedStateCount:0,connectionComplete:!1},R=k.next();if(!R.value||R.value.length!==m)return null;const F=new Map(R.value.map(Ce=>[Ce.connectionIndex,Ce])),O=Ce=>Ds(e.exitEdge,e.preferredExit)!==void 0?BB({...t,connection:Ce,cornerExitLaneOffset:0}):tR({...t,connection:Ce,boundaryDirection:l?"left":"right"}),U=e.connections.toSorted((Ce,Le)=>O(Ce)-O(Le));Math.max(...e.componentObstacles.map(Ce=>Ce.center.x+Ce.width/2));const Y=o.filter(Ce=>Ce.via.center.x>i.maxX).map(Ce=>Ce.via.center.x),W=Y.length?Math.min(...Y):e.sharedBoundary.maxX,te=c/2+a/2+A,j=p||u?.compactRows?Math.max(te,(c+A)/Math.SQRT2)+1e-5:f,J=Math.min(...s.flatMap(Ce=>Ce.segments).filter(Ce=>Ce.layer!==d).flatMap(Ce=>[Ce.start.y,Ce.end.y])),oe=Math.min(i.minY-c/2-A-(u?.rowOffset??0),p?J-te-1e-5:1/0),ie=oe-(m-1)*j,ne=o.flatMap(Ce=>Ce.segments).filter(Ce=>Ce.layer===d&&(!p||Math.max(Ce.start.x,Ce.end.x)>=Math.min(...[...F.values()].map(Le=>Le.exitPoint.x))-te)&&Math.min(Ce.start.y,Ce.end.y)<=oe+te&&Math.max(Ce.start.y,Ce.end.y)>=ie-te),le=ne.length?Math.min(...ne.map(Ce=>Math.min(Ce.start.x,Ce.end.x)))-te-1e-5:e.sharedBoundary.maxX,ge=Math.min(e.sharedBoundary.maxX-c-A,W-te-a,le),_e=[...o.map(Ce=>Ce.via),...s.flatMap(Ce=>Ce.additionalVias??[])].filter(Ce=>Ce.spanLayers.includes(r)).map(Ce=>({minimum:Ce.center.x-Ce.diameter/2-a/2-A-1e-5,maximum:Ce.center.x+Ce.diameter/2+a/2+A+1e-5})),ue=Array.from({length:m},(Ce,Le)=>ge-Le*j),fe=[];if(ue.every(Ce=>_e.every(Le=>Ce<Le.minimum||Ce>Le.maximum)))fe.push(...ue);else{let Ce=ge;for(let Le=0;Le<m;Le++){for(let Ye=0;Ye<=_e.length;Ye++){const tt=_e.filter(At=>Ce>=At.minimum&&Ce<=At.maximum);if(!tt.length)break;Ce=Math.min(...tt.map(At=>At.minimum))-1e-7}fe.push(Ce),Ce-=p?j:c+A}}const pe=fe.at(-1),ye=[...o.map(Ce=>Ce.via),...s.flatMap(Ce=>Ce.additionalVias??[])].filter(Ce=>Ce.spanLayers.includes(r)&&Ce.center.x+Ce.diameter/2+a/2+A>=(l?e.sharedBoundary.minX:pe)&&Ce.center.x-Ce.diameter/2-a/2-A<=e.sharedBoundary.maxX).map(Ce=>({minimum:Ce.center.y-Ce.diameter/2-a/2-A-a/100,maximum:Ce.center.y+Ce.diameter/2+a/2+A+a/100})),Me=[];let ve=e.sharedBoundary.maxY-a/2;for(let Ce=m-1;Ce>=0;Ce--){for(let Le=0;Le<=ye.length;Le++){const Ye=ye.filter(tt=>ve>=tt.minimum&&ve<=tt.maximum);if(!Ye.length)break;ve=Math.min(...Ye.map(tt=>tt.minimum))-1e-7}Me[Ce]=ve,ve-=c+A}p&&Me.splice(0,Me.length,...U.map(O));const he=Me[0],Qe=oe;if(Qe-(m-1)*j-c/2<e.sharedBoundary.minY||pe<=Math.max(...[...F.values()].map(Ce=>Ce.exitPoint.x))+te||!p&&he<=(e.sharedBoundary.minY+e.sharedBoundary.maxY)/2)return null;const Pe=U.map((Ce,Le)=>{const Ye=F.get(Ce.connectionIndex),tt=I.get(Ce.connectionIndex),At=Me[Le];return{connectionIndex:Ce.connectionIndex,length:tt.segments.reduce((at,nt)=>at+tn(nt.start,nt.end),0)+(u?.compactRows?2*fe[m-1-Le]:0)+Ye.length+At-Ye.exitPoint.x}}).sort((Ce,Le)=>Le.length-Ce.length),we=new Map(Pe.map((Ce,Le)=>[Ce.connectionIndex,Le])),Te=(Ce,Le)=>Ce.slice(1).flatMap((Ye,tt)=>tn(Ce[tt],Ye)<1e-9?[]:[{start:Ce[tt],end:Ye,width:a,layer:Le}]),Re=(Ce,Le)=>Ce.map(Ye=>({route_type:"wire",...Ye,width:a,layer:Le})),Ee=Ce=>({route_type:"via",...Ce.center,from_layer:Ce.fromLayer,to_layer:Ce.toLayer,via_diameter:Ce.diameter,via_hole_diameter:Ce.holeDiameter}),ke=U.map((Ce,Le)=>{const Ye=I.get(Ce.connectionIndex),tt=F.get(Ce.connectionIndex),At=Qe-we.get(Ce.connectionIndex)*j,at={x:tt.exitPoint.x,y:At},nt={x:fe[l?m-1-Le:Le],y:At},gt={x:l?e.sharedBoundary.minX:e.sharedBoundary.maxX,y:Me[Le]},bt=[Ye.segments[0].start,...Ye.segments.map(Yt=>Yt.end)],Ct=[tt.segments[0].start,...tt.segments.map(Yt=>Yt.end),at],Dt=[nt,{x:nt.x,y:gt.y-Math.sign(gt.y-nt.y)*a},{x:nt.x+(l?-a:a),y:gt.y},gt],kt=i4({...t,terminal:{connection:Ce,viaPoint:Ye.via.center,exitPoint:gt},sourceEscapePoints:bt,targetLayerPoints:[Ye.via.center,gt],allowBlindAndBuriedVias:!1}),it=[{center:at,diameter:c,holeDiameter:t.viaHoleDiameter,spanLayers:t.layerNames,fromLayer:r,toLayer:d},{center:nt,diameter:c,holeDiameter:t.viaHoleDiameter,spanLayers:t.layerNames,fromLayer:d,toLayer:r}];return kt.segments=[...Ye.segments,...Te(Ct,r),...Te([at,nt],d),...Te(Dt,r)],kt.additionalVias=it,kt.sourceEscapeSegmentCount=Ye.segments.length,kt.length=kt.segments.reduce((Yt,pn)=>Yt+tn(pn.start,pn.end),0),kt.trace.route=[...Re(bt,h),Ee(kt.via),...Re(Ct,r),Ee(it[0]),...Re([at,nt],d),Ee(it[1]),...Re(Dt,r)],kt});if(e.maxLengthSkew!==void 0&&!u?.compactRows){const Ce=ke.map(Le=>Le.length);if(Math.max(...Ce)-Math.min(...Ce)>e.maxLengthSkew+1e-6)return null}if(!Wh({...t,plans:[...s,...ke],sharedBoundary:e.sharedBoundary}))return null;for(const Ce of ke)for(const Le of o)if(Ce.connectionIndex!==Le.connectionIndex){for(const Ye of Ce.segments){if(Le.via.spanLayers.includes(Ye.layer)&&Cr(Le.via.center,Ye.start,Ye.end)<Le.via.diameter/2+a/2+A-1e-7)return null;for(const tt of Le.segments)if(Ye.layer===tt.layer&&tu(Ye.start,Ye.end,tt.start,tt.end)<(a+tt.width)/2+A-1e-7)return null}for(const Ye of Ce.additionalVias){if(tn(Ye.center,Le.via.center)<(Ye.diameter+Le.via.diameter)/2+A-1e-7)return null;for(const tt of Le.segments)if(Ye.spanLayers.includes(tt.layer)&&Cr(Ye.center,tt.start,tt.end)<Ye.diameter/2+tt.width/2+A-1e-7)return null}}return ke}function*kQo(t){if(t.bus.exitEdge!=="right")return null;const e=_ue(t),n=Math.min(t.bus.pitchX,t.bus.pitchY),o=t.traceWidth+t.clearance,i=Math.ceil((t.viaDiameter+t.clearance)/o)*o,r=Math.max(0,Math.min(8,Math.floor(((e.sourceBoundary.maxX-e.sourceBoundary.minX)/2-t.bus.connections.length*i-o)/n))),s=[void 0,{sourcePortOffset:-n,rowOffset:0,compactRows:!1},...[0,1,2,3].map(c=>({sourcePortOffset:-n,rowOffset:c*o,compactRows:!0})),...Array.from({length:r},(c,l)=>r-l).flatMap(c=>[0,1,2,3].map(l=>({sourcePortOffset:c*n,rowOffset:l*o,compactRows:!0})))];let a=null;for(const c of s)if(a=yield*WNt({...e,oppositeLayout:c}),a)break;if(!a)return null;const A=new Map(t.bus.connections.map(c=>[c.connectionIndex,c]));return _ue(a).map(c=>({...c,sourceObstacle:A.get(c.connectionIndex).sourceObstacle}))}function jNt(t){const{bus:e,targetLayer:n,traceWidth:o,clearance:i}=t;if(!e.exitEdge)return[];const r=e.exitEdge==="left"||e.exitEdge==="right",s=r?"y":"x",a=r?"x":"y",A=e.sharedBoundary,c=e.exitEdge==="left"?A.minX:e.exitEdge==="right"?A.maxX:e.exitEdge==="bottom"?A.minY:A.maxY,l=r?A.minY:A.minX,u=r?A.maxY:A.maxX,g=(l+u)/2,h=Ds(e.exitEdge,e.preferredExit),d=(h==="maximum"?g:l)+o/2,p=(h==="minimum"?g:u)-o/2,m=[];for(const y of t.acceptedPlans)for(const x of[...y.segments,...y.planeEndpointSegments??[]]){if(x.layer!==n)continue;const E=(x.width+o)/2+i,B=x.start[a],S=x.end[a]-B;let Q=0,w=1;if(Math.abs(S)<1e-9){if(Math.abs(B-c)>E)continue}else{const O=(c-E-B)/S,U=(c+E-B)/S;if(Q=Math.max(0,Math.min(O,U)),w=Math.min(1,Math.max(O,U)),Q>w)continue}const M=x.start[s],k=x.end[s]-M,R=M+Q*k,F=M+w*k;m.push([Math.min(R,F)-E,Math.max(R,F)+E])}const _=[...t.acceptedPlans.flatMap(y=>[...y.via?[y.via]:[],...y.additionalVias??[],...y.planeEndpointVia?[y.planeEndpointVia]:[]]),...(t.reservedVias??[]).map(y=>y.via)];for(const y of _){if(!y.spanLayers.includes(n))continue;const x=y.diameter/2+o/2+i,E=Math.abs(y.center[a]-c);if(E>=x)continue;const B=Math.sqrt(x*x-E*E);m.push([y.center[s]-B,y.center[s]+B])}const f=[];let I=d;for(const[y,x]of m.sort((E,B)=>E[0]-B[0]))if(!(x<=I||y>=p)&&(y>I&&f.push([I,Math.min(y,p)]),I=Math.max(I,x),I>=p))break;I<p&&f.push([I,p]);const C=f.filter(([y,x])=>x-y>1e-6).map(([y,x])=>(y+x)/2);return C.length<=32?C:Array.from({length:32},(y,x)=>C[Math.round(x*(C.length-1)/31)])}function*FQo(t){if(t.buses.some(d=>d.termination.type!=="boundary"||d.connections.length>2))return null;let e=0;const n=192,o=t.traceWidth+t.clearance;function*i(d,p,m=d.preferredExit,_=0){return e++>=n?[]:yield*eue({...t,bus:{...d,preferredExit:m},acceptedPlans:p,reservedVias:t.reservedVias?.filter(f=>!d.connections.some(I=>I.connection.name===f.connectionName)),viaMinimalOnly:!0,adaptiveWindingRouteOrder:!0,alignWindingGridToPads:!0,windingGridStep:o/2,fixedViaFallbackRouteOrderAttempts:32,cornerBandTargetTrackOffset:_},1,!1)}const r=d=>d.map(p=>{const m=t.buses.find(_=>_.busId===p.busId);return m?{...p,cornerBandSide:Ds(m.exitEdge,m.preferredExit)}:p});let s=[...t.acceptedPlans];for(const d of t.buses){const p=yield*i(d,s);if(!p.length){s=[];break}s.push(...p[0])}if(s.length)return r(s.slice(t.acceptedPlans.length));const a=(d,p)=>d.connections.reduce((m,_)=>m+(t.fixedViaPointsByConnectionIndex?.get(_.connectionIndex)??_.sourcePoint)[p],0)/d.connections.length;if(t.buses.length>1)for(const d of[1,-1]){const p=t.buses.toSorted((_,f)=>{const I=Ds(_.exitEdge,_.preferredExit)!==void 0,C=Ds(f.exitEdge,f.preferredExit)!==void 0;if(I!==C)return Number(C)-Number(I);const y=_.exitEdge==="left"||_.exitEdge==="right"?"y":"x";return d*(a(_,y)-a(f,y))});let m=[...t.acceptedPlans];for(const _ of p){const f=yield*i(_,m);if(!f.length){m=[];break}m.push(...f[0])}if(m.length)return r(m.slice(t.acceptedPlans.length))}const A=t.buses.toSorted((d,p)=>{const m=Ds(d.exitEdge,d.preferredExit),_=Ds(p.exitEdge,p.preferredExit),f=m==="minimum",I=_==="minimum";return f!==I?Number(I)-Number(f):f?a(d,"y")-a(p,"y"):d.connections.length!==p.connections.length?d.connections.length-p.connections.length:d.connections.length===1?a(d,"x")-a(p,"x"):m!==_?+(m==="maximum")-+(_==="maximum"):(m==="maximum"?1:-1)*(a(d,"y")-a(p,"y"))});if(t.buses.length>1){const d=A.toSorted((f,I)=>{const C=y=>y.connections.length===1&&!Ds(y.exitEdge,y.preferredExit);return Number(C(I))-Number(C(f))}),p=Math.min(n,e+48);function*m(f,I){if(f===d.length)return I;if(e>=p)return null;const C=d[f],y=yield*i(C,I);for(const E of y){const B=yield*m(f+1,[...I,...E]);if(B)return B}const x=yield*c(C,I,p);for(const E of x){const B=yield*m(f+1,[...I,...E]);if(B)return B}return null}const _=yield*m(0,[...t.acceptedPlans]);if(_)return r(_.slice(t.acceptedPlans.length))}function*c(d,p,m){if(!d.exitEdge)return[];const _=t.reservedVias?.filter(Q=>!d.connections.some(w=>w.connection.name===Q.connectionName)),f={...t,bus:d,acceptedPlans:p,reservedVias:_},I=Ds(d.exitEdge,d.preferredExit),C=d.exitEdge==="left"||d.exitEdge==="right",y=d.sharedBoundary,x=C?y.minY:y.minX,E=C?y.maxY:y.maxX,B=(x+E)/2,S=[];for(const Q of jNt(f)){if(e>=m)break;const w=I?d.preferredExit:l(d).find(Y=>Ds(d.exitEdge,Y)===(Q>B?"maximum":"minimum")),M=d.connections.map(Y=>BB({...f,bus:{...d,preferredExit:w},connection:Y,cornerExitLaneOffset:0,windingOrderIndex:0})),k=M.reduce((Y,W)=>Y+W,0)/M.length,R=M.map(Y=>Y-k+Q);if(R.some(Y=>Y<=x+t.traceWidth/2||Y>=E-t.traceWidth/2||I==="minimum"&&Y>=B||I==="maximum"&&Y<=B))continue;const F=d.connections.map((Y,W)=>{const te=t.fixedViaPointsByConnectionIndex?.get(Y.connectionIndex),j=R[W],J=d.exitEdge==="left"?{x:y.minX,y:j}:d.exitEdge==="right"?{x:y.maxX,y:j}:d.exitEdge==="bottom"?{x:j,y:y.minY}:{x:j,y:y.maxY};return{connection:Y,viaPoint:te,exitPoint:J}});if(F.some(Y=>!Y.viaPoint))return[];e++;const O=BC({...f,terminals:F,gridStep:o/2,alignGridToPads:!0,maximumRouteOrderAttempts:d.connections.length===1?3:16,adaptiveRouteOrder:!0},1,!1);let U=O.next();for(;!U.done;)yield{phase:"via-minimal-winding",busId:d.busId,targetLayer:t.targetLayer,winding:U.value},U=O.next();S.push(...U.value)}return S}function l(d){if(Ds(d.exitEdge,d.preferredExit))return[d.preferredExit];switch(d.exitEdge){case"right":return[d.preferredExit,"top-right","bottom-right"];case"left":return[d.preferredExit,"top-left","bottom-left"];case"top":return[d.preferredExit,"top-left","top-right"];case"bottom":return[d.preferredExit,"bottom-left","bottom-right"];default:return[d.preferredExit]}}function u(d,p,m){const _=Ds(d.exitEdge,m);if(!_||t.buses.length>1)return[0];const f=d.exitEdge==="left"||d.exitEdge==="right",I=f?d.sharedBoundary.minY:d.sharedBoundary.minX,C=f?d.sharedBoundary.maxY:d.sharedBoundary.maxX,y=(I+C)/2,x=p.filter(k=>k.exitEdge===d.exitEdge&&k.cornerBandSide===_).length,E=d.connections.map(k=>BB({...t,bus:{...d,preferredExit:m},connection:k,cornerExitLaneOffset:x,windingOrderIndex:0})),B=_==="minimum"?-1:1,S=Math.min(d.pitchX,d.pitchY),Q=E.reduce((k,R)=>k+R,0)/E.length,w=_==="minimum"?I+o:C-o,M=[0,B*2*o,-B*2*o,B*S,B*2*S,B*3*S,B*4*S,w-Q];return M.filter((k,R)=>M.indexOf(k)===R&&E.every(F=>F+k>I+t.traceWidth/2&&F+k<C-t.traceWidth/2&&(_==="minimum"?F+k<y:F+k>y)))}function*g(d,p){if(!d.length)return p;if(e>=n)return null;for(const m of d)for(const _ of l(m))for(const f of u(m,p,_)){const I=yield*i(m,p,_,f);if(!I.length)continue;const C=yield*g(d.filter(y=>y!==m),[...p,...I[0]]);if(C)return C;if(e>=n)return null}for(const m of d){if(m.connections.length!==1||!m.exitEdge)continue;const _=m.connections[0],f=t.fixedViaPointsByConnectionIndex?.get(_.connectionIndex);if(!f)continue;const I=t.reservedVias?.filter(y=>y.connectionName!==_.connection.name),C=jNt({...t,bus:m,acceptedPlans:p,reservedVias:I});for(const y of C){if(e++>=n)return null;const x=m.sharedBoundary,E=m.exitEdge==="left"?{x:x.minX,y}:m.exitEdge==="right"?{x:x.maxX,y}:m.exitEdge==="bottom"?{x:y,y:x.minY}:{x:y,y:x.maxY},B=BC({...t,bus:m,acceptedPlans:p,reservedVias:I,terminals:[{connection:_,viaPoint:f,exitPoint:E}],gridStep:o/2,alignGridToPads:!0,maximumRouteOrderAttempts:3},1,!1);let S=B.next();for(;!S.done;)yield{phase:"via-minimal-winding",busId:m.busId,targetLayer:t.targetLayer,winding:S.value},S=B.next();if(!S.value.length)continue;const Q=yield*g(d.filter(w=>w!==m),[...p,...S.value[0]]);if(Q)return Q}}return null}const h=yield*g(A,[...t.acceptedPlans]);return h&&r(h.slice(t.acceptedPlans.length))}function*LQo(t){const{bus:e,sourceBoundary:n,sourceEscapes:o,traceWidth:i,clearance:r,targetLayer:s}=t,a=Ds(e.exitEdge,e.preferredExit);if(t.allowBlindAndBuriedVias||e.exitEdge!=="right"||a!==void 0&&a!=="minimum"||e.connections.length<3)return null;const A=e.routableEscapeLayers??e.allowedLayers??[],c=A.find(j=>j!==s);if(!c||!A.includes(s)||e.connections.some(j=>j.sourceLayer===s))return null;const l=new Map(o.map(j=>[j.connectionIndex,j])),u=i+r,g=Math.min(e.pitchX,e.pitchY),h=t.viaDiameter+r,d={x:(e.componentBounds.minX+e.componentBounds.maxX)/2,y:(e.componentBounds.minY+e.componentBounds.maxY)/2},p=e.sharedBoundary.minX+Math.max(g/2,t.viaDiameter/2+r);if(p+(e.connections.length-1)*h>=n.minX)return null;const m=t.acceptedPlans.filter(j=>j.exitEdge===e.exitEdge&&j.cornerBandSide==="minimum").length,_=e.connections.map(j=>{const J=l.get(j.connectionIndex);if(!J)throw new Error(`FanoutSolver: missing crossbar source escape for ${j.connection.name}`);return{connection:j,viaPoint:J.via.center,exitPoint:{x:e.sharedBoundary.maxX,y:BB(a?{...t,connection:j,cornerExitLaneOffset:m}:{...t,bus:{...e,preferredExit:"bottom-right"},connection:j,cornerExitLaneOffset:m,windingOrderIndex:0})}}}),f=_.toSorted((j,J)=>j.exitPoint.y-J.exitPoint.y);if(!a)for(const[j,J]of f.entries())J.exitPoint.y=n.minY+g+j*h;const I=new Map(f.map(j=>[j.connection.connectionIndex,j.exitPoint.y])),C=Math.min(n.maxY-u,Math.max(..._.map(j=>j.viaPoint.y))+2*g),y=Math.max(n.minY+u,Math.min(..._.map(j=>j.viaPoint.y))-2*g,...a?[]:[Math.max(...I.values())+t.viaDiameter/2+i/2+r+u]);if(C-y<(_.length-1)*h||y<=Math.max(...I.values())+t.viaDiameter/2+i/2+r)return null;const x=j=>{const J=_[j].viaPoint,oe=Math.atan2(J.y-d.y,J.x-d.x);return oe<0?oe+2*Math.PI:oe},E=_.map((j,J)=>J).sort((j,J)=>x(j)-x(J)),B=new Map(E.map((j,J)=>[j,{x:n.minX,y:C-(C-y)*J/(_.length-1)}])),S={minX:n.minX,maxX:d.x,minY:Math.min(y-g,Math.min(..._.map(j=>j.viaPoint.y))-2*g),maxY:n.maxY},Q=new Map(o.map(j=>[j.connectionIndex,[j.segments[0].start,...j.segments.map(J=>J.end)]])),w=new Set(_.map(j=>j.connection.connectionIndex)),M=o.filter(j=>!w.has(j.connectionIndex)).map(j=>({connectionName:j.connectionName,via:j.via}));let k;for(const j of[0,-1,1]){const J=yield*BC({...t,bus:{...e,exitEdge:"left",direction:"left",preferredExit:void 0,sharedBoundary:S},terminals:_.map((oe,ie)=>({...oe,exitPoint:B.get(ie)})),sourceEscapePaths:Q,reservedVias:M,gridStep:u/4,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:1,routeOrder:E,laneBias:j},1,!1);if(J.length){k=J[0];break}}if(!k)return null;const R=k.toSorted((j,J)=>a?j.exitPoint.y-J.exitPoint.y:_.find(oe=>oe.connection.connectionIndex===j.connectionIndex).exitPoint.y-_.find(oe=>oe.connection.connectionIndex===J.connectionIndex).exitPoint.y),F=(j,J,oe)=>({center:j,diameter:t.viaDiameter,holeDiameter:t.viaHoleDiameter,fromLayer:J,toLayer:oe,spanLayers:Mx({fromLayer:J,toLayer:oe,layerNames:t.layerNames,allowBlindAndBuriedVias:!1})}),O=new Map;for(const[j,J]of R.entries()){const oe=J.segments.at(-1),ie=oe.end.x-oe.start.x,ne=oe.end.y-oe.start.y;if(ie>=0||Math.abs(ne)>-ie+1e-7)return null;const le=_.find(pe=>pe.connection.connectionIndex===J.connectionIndex),ge=p+j*h,_e={x:ge,y:J.exitPoint.y},ue={x:ge,y:I.get(J.connectionIndex)},fe=[{start:J.exitPoint,end:_e,width:i,layer:s},{start:_e,end:ue,width:i,layer:c}];O.set(J.connectionIndex,{...J,segments:[...J.segments,...fe],additionalVias:[F(_e,s,c),F(ue,c,s)],direction:e.direction,exitEdge:e.exitEdge,cornerBandSide:Ds(e.exitEdge,e.preferredExit),exitPoint:le.exitPoint})}const U=[...O.values()],Y=_.map(j=>({...j.connection,sourcePoint:{...O.get(j.connection.connectionIndex).additionalVias[1].center,layer:s},sourceLayer:s})),W=yield*BC({...t,bus:{...e,connections:Y},terminals:Y.map((j,J)=>({connection:j,viaPoint:j.sourcePoint,exitPoint:_[J].exitPoint})),acceptedPlans:[...t.acceptedPlans,...U],reservedVias:[...o.map(j=>({connectionName:j.connectionName,via:j.via})),...U.flatMap(j=>j.additionalVias.map(J=>({connectionName:j.connectionName,via:J})))],allowSourceLayerRouting:!0,sourceEscapePaths:void 0,gridStep:u/2,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:12},1,!1);if(!W.length)return null;const te=k.map(j=>{const J=O.get(j.connectionIndex),oe=W[0].find(ue=>ue.connectionIndex===j.connectionIndex),[ie,ne]=J.additionalVias,le=(ue,fe)=>({route_type:"wire",...ue,width:i,layer:fe}),ge=ue=>({route_type:"via",...ue.center,from_layer:ue.fromLayer,to_layer:ue.toLayer,via_diameter:ue.diameter,via_hole_diameter:ue.holeDiameter}),_e=[...J.segments,...oe.segments];return{...J,segments:_e,trace:{...j.trace,route:[...j.trace.route,le(ie.center,s),ge(ie),le(ie.center,c),le(ne.center,c),ge(ne),...oe.trace.route]},length:_e.reduce((ue,fe)=>ue+tn(fe.start,fe.end),0)}});if(!Wh({...t,plans:[...t.acceptedPlans,...te],sharedBoundary:e.sharedBoundary}))return null;for(const j of te)for(const J of o)if(j.connectionIndex!==J.connectionIndex){for(const oe of j.segments){if(J.via.spanLayers.includes(oe.layer)&&Cr(J.via.center,oe.start,oe.end)<J.via.diameter/2+i/2+r-1e-7)return null;for(const ie of J.segments)if(ie.layer===oe.layer&&tu(oe.start,oe.end,ie.start,ie.end)<i+r-1e-7)return null}for(const oe of j.additionalVias){if(tn(oe.center,J.via.center)<t.viaDiameter+r-1e-7)return null;for(const ie of J.segments)if(oe.spanLayers.includes(ie.layer)&&Cr(oe.center,ie.start,ie.end)<t.viaDiameter/2+i/2+r-1e-7)return null}}return te}function*$Nt(t){if(t.buses.some(d=>d.termination.type==="boundary")&&t.buses.every(d=>d.termination.type==="plane"||d.exitEdge==="left")){const d=_ue(t),p=yield*$Nt(d);if(!p)return null;const m=_ue(p),_=new Map(t.buses.flatMap(f=>f.connections.map(I=>[I.connectionIndex,I])));return m.map(f=>({...f,sourceObstacle:_.get(f.connectionIndex).sourceObstacle}))}const{buses:e,sourceEscapes:n,initialPlans:o}=t,i=new Map(n.map(d=>[d.connectionIndex,d])),r=new Set(o.map(d=>d.connectionIndex)),s=e.filter(d=>d.connections.some(p=>!r.has(p.connectionIndex)));if(s.some(d=>d.connections.some(p=>r.has(p.connectionIndex))))throw new Error("FanoutSolver: a reserved-source continuation cannot start with a partially committed bus");for(const d of s)for(const p of d.connections)if(!i.has(p.connectionIndex))throw new Error(`FanoutSolver: missing reserved source escape for ${p.connection.name}`);const a=new Map(n.map(d=>[d.connectionIndex,d.via.center])),A=new Map(n.map(d=>[d.connectionIndex,[d.segments[0].start,...d.segments.map(p=>p.end)]])),c=[...o],l=d=>{const p=t.targetLayerByBusId?.get(d.busId)??(d.allowedLayers??t.layerNames).find(m=>m!==d.connections[0].sourceLayer);return o.filter(m=>m.targetLayer===p).length},u=s.filter(d=>d.termination.type==="boundary").sort((d,p)=>p.connections.length-d.connections.length||l(d)-l(p)),g=new Set;for(const d of[...u,...s.filter(p=>p.termination.type==="plane")]){if(g.has(d.busId))continue;if(d.termination.type==="boundary"&&d.connections.length<=2&&t.targetLayerByBusId){const C=t.targetLayerByBusId.get(d.busId);if(!C)return null;const y=u.filter(E=>E.connections.length<=2&&t.targetLayerByBusId.get(E.busId)===C),x=yield*FQo({...t,buses:y,targetLayer:C,acceptedPlans:c,fixedViaPointsByConnectionIndex:a,sourceEscapePaths:A,reservedVias:n.map(E=>({connectionName:E.connectionName,via:E.via}))});if(!x)return null;c.push(...x);for(const E of y)g.add(E.busId);continue}const p=new Set(d.connections.map(C=>C.connectionIndex)),m=n.filter(C=>!p.has(C.connectionIndex)).map(C=>({connectionName:C.connectionName,via:C.via,...C.segments.length===1?{sourceEscapeSegment:C.segments[0]}:{}})),_=t.targetLayerByBusId?.get(d.busId),f=_?[_]:d.termination.type==="plane"?[d.termination.layer]:(d.routableEscapeLayers??d.allowedLayers??t.layerNames).filter(C=>C!==d.connections[0].sourceLayer);let I;for(const C of f){const y={...t,bus:d,targetLayer:C,acceptedPlans:c,fixedViaPointsByConnectionIndex:a,sourceEscapePaths:A,reservedVias:m};if(t.sourceBoundary&&d.termination.type==="boundary"&&d.connections.length>2){for(const E of[WNt,LQo,TQo,kQo]){const B=E({...y,sourceBoundary:t.sourceBoundary});let S=B.next();for(;!S.done;)yield{phase:"via-minimal-winding",busId:d.busId,targetLayer:C,winding:S.value},S=B.next();if(S.value){I=S.value;break}}if(I)break}const x=yield*eue({...t,bus:d,targetLayer:C,acceptedPlans:c,fixedViaPointsByConnectionIndex:a,sourceEscapePaths:A,reservedVias:m,viaMinimalOnly:!0,adaptiveWindingRouteOrder:!0,alignWindingGridToPads:!0,windingGridStep:(t.traceWidth+t.clearance)/2,fixedViaFallbackRouteOrderAttempts:32},1,!1);if(x.length){I=x[0];break}}if(!I)return null;c.push(...I)}const h=e[0]?.sharedBoundary;return!h||!Wh({...t,plans:c,sharedBoundary:h})?null:c}function*HQo(t,e){const n={reserveFutureApproaches:!0,failedNarrowGroup:!1,failedWideMatching:!1},o=yield*e(n);return o||!t||!n.failedNarrowGroup&&!n.failedWideMatching?o:yield*e({reserveFutureApproaches:!1,failedNarrowGroup:!1,failedWideMatching:!1})}function qNt(t){const{buses:e,fixedViaPointsByConnectionIndex:n,clearance:o}=t,i=e[0];if(!i?.exitEdge||e.some(A=>A.componentId!==i.componentId||A.exitEdge!==i.exitEdge||A.termination.type!=="boundary"||A.connections.length>2||A.allowedLayers?.length!==1||A.allowedLayers[0]==="top"||A.connections.some(c=>c.sourceLayer!=="top")))return!1;const r=i.exitEdge==="left"||i.exitEdge==="right"?"x":"y",s=i.exitEdge==="top"||i.exitEdge==="right"?1:-1;let a=0;for(const A of e){if(A.connections.length!==2||A.maxLengthSkew===void 0||A.maxLengthSkew>=Math.min(A.pitchX,A.pitchY))continue;const c=A.componentBounds,l=r==="x"?s>0?c.minX:c.maxX:s>0?c.minY:c.maxY,u=A.connections.map(g=>({source:g.sourcePoint,via:n.get(g.connectionIndex)}));u.some((g,h)=>{const d=u[1-h];return!g.via||!d.via?!1:s*(g.via[r]-l)<-1e-7&&d.via.x>=c.minX&&d.via.x<=c.maxX&&d.via.y>=c.minY&&d.via.y<=c.maxY&&s*(d.via[r]-d.source[r])>o})&&a++}return a>=2}function OQo(t){return t.groups.filter(e=>qNt({...t,buses:e}))}function XNt(t){return t.completedBuses.filter(e=>t.selectedBusIds.has(e.busId)&&e.termination.type==="boundary"&&e.connections.length>2&&e.allowedLayers?.length===1&&e.maxLengthSkew!==void 0)}function ZNt(t){return XNt(t).some(e=>{const n=t.plans.filter(i=>i.busId===e.busId),o=Math.min(...n.map(i=>i.length))+e.maxLengthSkew;return n.some(i=>i.segments.slice(0,i.sourceEscapeSegmentCount??1).reduce((r,s)=>r+tn(s.start,s.end),0)>o+1e-6)})}function*GQo(t){const{inputSrj:e,preparedBuses:n,completedBuses:o,selectedBusIds:i}=t;if(!ZNt(t))return null;const r=XNt(t),s=n.flatMap(p=>p.connections),a=new Map(s.map(p=>[p.connectionIndex,p])),A=p=>{if(a.size!==e.connections.length||p.length!==a.size||new Set(p.map(m=>m.connectionIndex)).size!==a.size||p.some(m=>{const _=a.get(m.connectionIndex);return _?.connection.name!==m.connectionName||_.sourceObstacle!==m.sourceObstacle}))throw new Error("Wide source length repair requires every original source")};A(t.plans);const c=new Set(o.map(p=>p.busId)),l=n.filter(p=>p.termination.type==="boundary"&&!c.has(p.busId)),u=SO({...t,preparedBuses:o,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowSourcePrefixShortcuts:!0});if(!u)return null;let g=u;const h=()=>{let p=g;const m=zy({...t,plans:g,preparedBuses:o,sharedBoundary:r[0].sharedBoundary,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowSourcePrefixMatching:!0,allowTransitLayerMatching:!0,allowDistributedMatching:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,unroutedSourceBuses:l,maximumWorkUnits:1e5,candidatePlansAreFeasible:_=>(A(_),p=[..._],!0)});return g=m.plans??p,m};let d=h();if(!d.plans){const p=d.failedBus;if(!r.some(x=>x.busId===p.busId))return null;const m=g.filter(x=>x.busId===p.busId),_=Math.max(...m.map(x=>x.length)),f=m.filter(x=>_-x.length>p.maxLengthSkew+1e-6);if(f.length!==1||g.some(x=>!x.via))return null;const I=f[0],C=a.get(I.connectionIndex),y=yield*AE({...t,srj:e,allBuses:n,buses:[{...p,connections:[C]}],targetLayer:I.targetLayer,transitLayers:[],terminals:[{connection:C,viaPoint:I.via.center,exitPoint:I.exitPoint}],fixedViaPointsByConnectionIndex:new Map(g.map(x=>[x.connectionIndex,x.via.center])),sourceEscapePaths:new Map(g.map(x=>[x.connectionIndex,[x.sourcePoint,...x.segments.slice(0,x.sourceEscapeSegmentCount??1).map(E=>E.end)]])),acceptedPlans:g.filter(x=>x!==I),routeFromSourcePads:!0,sourceLayerTravelCost:3,includeDiagonalNeighbors:!0,tightViaChannels:!0,ripCost:64,shuffleSeed:1,maximumIterations:2e6,maximumLocalRepairAttempts:0});if(!y||y.length!==1)return null;g=g.map(x=>x===I?y[0]:x),d=h()}return d.plans?(A(d.plans),qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...d.plans.flatMap(p=>[p.trace,...p.planeEndpointTrace?[p.planeEndpointTrace]:[]])]},clearance:t.clearance,allowBlindAndBuriedVias:!1}).valid?d.plans:null):null}function YQo(t){const{buses:e,targetLayer:n,exits:o,layerNames:i,viaDiameter:r,clearance:s}=t,a=e[0];if(!a?.exitEdge||e.length<2||e.some(_=>_.termination.type!=="boundary"||_.connections.length<=2||_.componentId!==a.componentId||_.exitEdge!==a.exitEdge||_.connections.some(f=>f.sourceLayer!=="top")))return!1;const A=_=>_.routableEscapeLayers??_.allowedLayers??i;if(n==="top"||e.some(_=>!A(_).includes(n))||!i.some(_=>_!=="top"&&_!==n&&e.every(f=>A(f).includes(_))))return!1;const c=e.flatMap(_=>_.connections),l=a.exitEdge==="left"||a.exitEdge==="right"?"y":"x",u=c.map(_=>o.get(_.connectionIndex)?.[l]);if(u.some(_=>_===void 0||!Number.isFinite(_))||Math.max(...u)-Math.min(...u)>=(c.length-1)*(r+s)-1e-8)return!1;const h=c.reduce((_,f)=>({x:_.x+f.sourcePoint.x/c.length,y:_.y+f.sourcePoint.y/c.length}),{x:0,y:0}),d=a.componentBounds,p=Math.min(Math.abs(h.x-d.minX),Math.abs(h.x-d.maxX)),m=Math.min(Math.abs(h.y-d.minY),Math.abs(h.y-d.maxY));return l==="x"?p+1e-8<m:m+1e-8<p}function UQo(t){const e=t.length*(t.length-1)/2;if(e===0)return!1;let n=0;for(let o=0;o<t.length;o++){const i=t[o];for(const r of t.slice(o+1))if(tu(i.source,i.target,r.source,r.target)<1e-7&&++n>e/2)return!0}return!1}var KQo=class{constructor(t){this.options=t,this.pending=[t.preferSourceTransit?{ripCost:t.sourceTransitRipCost??8,shuffleSeed:1,transitLayers:t.allTransitLayers}:{ripCost:t.firstRipCost,shuffleSeed:1,transitLayers:t.transitLayers}],t.preferAlternateOrder&&(this.originalOrder=this.pending[0],this.preferredOrder={...this.originalOrder,shuffleSeed:2},this.pending[0]=this.preferredOrder),t.preferSourceOrigin&&this.pending.unshift({ripCost:t.sourceOriginRipCost??256,shuffleSeed:1,transitLayers:[],routeFromSourcePads:!0})}options;pending;attempted=new Set;preferredOrder;originalOrder;next(){for(;this.pending.length>0;){const t=this.pending.shift(),e=JSON.stringify(t);if(!this.attempted.has(e))return this.attempted.add(e),t}}failed(t,e){if(t.routeFromSourcePads)return;const n=o=>{this.attempted.has(JSON.stringify(o))||this.pending.unshift(o)};if(t===this.preferredOrder){n(this.originalOrder),e==="lengths"&&this.pending.push({...this.originalOrder,ripCost:256});return}if(t.sourceLayerTravelCost!==void 0){const{reserveFutureApproaches:o,sourceLayerTravelCost:i,maximumSourceIterations:r,...s}=t;o===!1&&e==="routing"?n({...s,sourceLayerTravelCost:4,reserveFutureApproaches:!0}):this.failed(s,"lengths");return}if(t.sourceOriginPhysicalGridPhase){const{sourceOriginPhysicalGridPhase:o,...i}=t;n({...i,ripCost:256,shuffleSeed:1});return}if(this.options.preferSourceTransit&&t.ripCost===(this.options.sourceTransitRipCost??8)&&t.transitLayers.length===this.options.allTransitLayers.length)n({ripCost:this.options.firstRipCost,shuffleSeed:1,transitLayers:this.options.transitLayers});else if(this.options.wideSingleLayer){if(e==="lengths"&&t.ripCost===64){const o={...t,shuffleSeed:1,sourceLayerTravelCost:3,maximumSourceIterations:2e7,reserveFutureApproaches:!1},i={...t,shuffleSeed:1,sourceOriginPhysicalGridPhase:!0};this.options.retrySourceOriginFreshReservations&&!this.attempted.has(JSON.stringify(o))?n(o):this.options.retrySourceOriginPhysicalGridPhase&&!this.attempted.has(JSON.stringify(i))?n(i):n({...t,ripCost:256,shuffleSeed:1})}e==="routing"&&t.shuffleSeed===1&&n({...t,ripCost:64,shuffleSeed:2})}else if(t.transitLayers.length<this.options.allTransitLayers.length){const o={ripCost:e==="lengths"?8:this.options.firstRipCost,shuffleSeed:1,transitLayers:this.options.allTransitLayers};e==="routing"&&o.ripCost!==256&&this.attempted.has(JSON.stringify(o))?n({...o,ripCost:256}):n(o)}else e==="routing"&&t.ripCost!==256&&n({...t,ripCost:256})}};function VQo(t){const e=t.traceWidth+t.clearance;if(!Number.isFinite(e)||!(t.traceWidth>0)||t.clearance<0)throw new Error("Boundary approach reservations require valid trace rules");return t.buses.filter(n=>n.termination.type==="boundary"&&!t.excludedBusIds.has(n.busId)).flatMap(n=>{const o=t.targetLayerByBusId.get(n.busId);if(!o||!n.exitEdge)throw new Error(`Missing boundary approach layer or edge for ${n.busId}`);return n.connections.map(i=>{const r=t.exits.get(i.connectionIndex);if(!r)throw new Error(`Missing boundary approach target for ${i.connectionIndex}`);const s={...r};return n.exitEdge==="bottom"?s.y+=e:n.exitEdge==="top"?s.y-=e:n.exitEdge==="left"?s.x+=e:s.x-=e,{type:"pcb_trace",pcb_trace_id:`fanout-approach-reservation:${i.connectionIndex}`,connection_name:i.connection.name,route:[s,r].map(a=>({route_type:"wire",...a,layer:o,width:t.traceWidth}))}})})}function zQo(t){const e={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};for(const n of t){const o=n,i=(o.ccwRotationDegrees??0)*Math.PI/180,r=n.width/2,s=n.height/2,a=o.shape==="circle"?r:Math.abs(Math.cos(i))*r+Math.abs(Math.sin(i))*s,A=o.shape==="circle"?s:Math.abs(Math.sin(i))*r+Math.abs(Math.cos(i))*s;e.minX=Math.min(e.minX,n.center.x-a),e.maxX=Math.max(e.maxX,n.center.x+a),e.minY=Math.min(e.minY,n.center.y-A),e.maxY=Math.max(e.maxY,n.center.y+A)}return e}function JQo(t,e){const n=t.filter(g=>g.termination.type==="boundary"),o=n[0]?.exitEdge;if(!o||n.some(g=>g.exitEdge!==o))return[...t];const i=n.flatMap(g=>g.connections),r={x:(e.minX+e.maxX)/2,y:(e.minY+e.maxY)/2},s=i.reduce((g,h)=>g+h.sourcePoint.x-r.x,0),a=i.reduce((g,h)=>g+h.sourcePoint.y-r.y,0);if(Math.hypot(s,a)<1e-9)return[...t];const A=["right","up","left","down"],c=Math.abs(s)>=Math.abs(a)?s>=0?"right":"left":a>=0?"up":"down",l=o==="top"?"up":o==="bottom"?"down":o,u=A.indexOf(c)-A.indexOf(l);return t.map(g=>g.termination.type==="plane"?g:{...g,direction:A[(A.indexOf(g.direction)+u+4)%4]})}function WQo(t){return t.flatMap(e=>{const n=[e.connectionName],o=[e.sourceLayer],i=[];e.via&&i.push({type:"rect",shape:"circle",center:e.via.center,width:e.via.diameter,height:e.via.diameter,connectedTo:n,layers:o});for(const r of e.segments){const{start:s,end:a,width:A}=r,c=a.x-s.x,l=a.y-s.y;i.push({type:"rect",center:{x:(s.x+a.x)/2,y:(s.y+a.y)/2},width:Math.hypot(c,l),height:A,ccwRotationDegrees:Math.atan2(l,c)*180/Math.PI,connectedTo:n,layers:o})}for(const r of[e.sourcePoint,...e.segments.map(s=>s.end)])i.push({type:"rect",shape:"circle",center:r,width:e.segments[0]?.width??0,height:e.segments[0]?.width??0,connectedTo:n,layers:o});return i})}function*jQo(t){const{srj:e,buses:n,layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a}=t,A=n[0];if(!A||n.some(k=>k.componentId!==A.componentId||k.connections.some(R=>R.sourceLayer!=="top")))return null;const c=A.componentObstacles.filter(k=>k.layers.includes("top"));if(!c.length)return null;const l=zQo(c),u=Math.max(A.pitchX,A.pitchY),g=i+r;if(!Number.isFinite(u)||u<=0)return null;const h={x:(l.minX+l.maxX)/2,y:(l.minY+l.maxY)/2},d=Math.ceil(((l.maxX-l.minX)/2+u+g)/g)*g,p=Math.ceil(((l.maxY-l.minY)/2+u+g)/g)*g,m={minX:h.x-d,maxX:h.x+d,minY:h.y-p,maxY:h.y+p};if(n.some(k=>m.minX<=k.sharedBoundary.minX||m.maxX>=k.sharedBoundary.maxX||m.minY<=k.sharedBoundary.minY||m.maxY>=k.sharedBoundary.maxY))return null;const _=new Map;for(const k of n){if(k.termination.type!=="boundary"||k.allowedLayers?.length!==1||k.allowedLayers[0]==="top")continue;const R=k.allowedLayers[0];_.set(R,[..._.get(R)??[],k])}const f=[..._].sort(([k,R],[F,O])=>Math.max(...O.map(U=>U.connections.length))-Math.max(...R.map(U=>U.connections.length))||k.localeCompare(F));if(!f.length)return null;const I=new Map(n.flatMap(k=>k.connections.map(R=>[R.connectionIndex,{bus:k,connection:R}])));if(I.size!==n.reduce((k,R)=>k+R.connections.length,0))throw new Error("FanoutSolver: source preparation requires unique connection indices");const C=JQo(n,l),y={traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,maximumSearchStates:t.maximumSearchStates??1e4,additionalObstacles:e.obstacles},x=t.initialViaPointsByConnectionIndex;if(x&&(x.size!==I.size||[...x].some(([k,R])=>!I.has(k)||!Number.isFinite(R.x)||!Number.isFinite(R.y))))throw new Error("FanoutSolver: initial source sites must contain every connection exactly once");const E=pd(C,{...y,fixedViaPointsByConnectionIndex:x});if(!E)return null;const B=(k,R,F)=>{const{bus:O,connection:U}=I.get(k),Y=O.termination.type==="plane"?O.termination.layer:(O.allowedLayers??o).filter(W=>W!==U.sourceLayer).at(-1);if(!Y)throw new Error("FanoutSolver: source through-via preparation requires a non-source target layer");return i4({...t,allowBlindAndBuriedVias:!1,bus:O,terminal:{connection:U,viaPoint:R,exitPoint:R},targetLayer:Y,targetLayerPoints:[R],sourceEscapePoints:F})},S=(k,R)=>[...I.keys()].map(F=>B(F,k.get(F),R.get(F))),Q=k=>qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...k.map(R=>R.trace)]},clearance:r,allowBlindAndBuriedVias:!1}).valid;let w={sourceBoundary:m,fixedViaPointsByConnectionIndex:E,sourceEscapePaths:new Map([...E].map(([k,R])=>[k,[I.get(k).connection.sourcePoint,R]])),sourcePlans:[],prefixPlans:[],remotePlans:[],layerGroups:[]};if(w.sourcePlans=S(E,w.sourceEscapePaths),!Q(w.sourcePlans))return null;const M=Math.max(u,s/2+i/2+r);for(const[k,R]of f){const F=new Set(R.flatMap(ie=>ie.connections.map(ne=>ne.connectionIndex))),O=new Set(w.remotePlans.map(ie=>ie.connectionIndex)),U=new Map([...w.fixedViaPointsByConnectionIndex].filter(([ie])=>!F.has(ie)&&!O.has(ie))),Y={...e,obstacles:[...e.obstacles,...WQo(w.sourcePlans.filter(ie=>!F.has(ie.connectionIndex)))]},W=R.flatMap(ie=>ie.connections.map(ne=>({...ie,busId:`${ie.busId}:source-${ne.connectionIndex}`,sharedBoundary:m,preferredExit:void 0,exitEdge:void 0,connections:[{...ne,exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1}]})));let te=null,j=0;const J=ie=>{if(ie.length<=j)return;const ne=ie.map(ve=>({...ve,busId:I.get(ve.connectionIndex).bus.busId,sourceObstacle:I.get(ve.connectionIndex).connection.sourceObstacle,sourceEscapeSegmentCount:ve.segments.length}));if(!Wh({plans:ne,srj:Y,sharedBoundary:m,clearance:r,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return;const le=[],ge=new Map;for(const ve of ne){const he=ve.exitPoint,Qe=Math.abs(he.x-m.maxX)<1e-7?{x:M,y:0}:Math.abs(he.x-m.minX)<1e-7?{x:-M,y:0}:Math.abs(he.y-m.maxY)<1e-7?{x:0,y:M}:Math.abs(he.y-m.minY)<1e-7?{x:0,y:-M}:null;if(!Qe)throw new Error("FanoutSolver: source prefix does not end on its source boundary");const Pe={x:he.x+Qe.x,y:he.y+Qe.y},we=I.get(ve.connectionIndex).bus.sharedBoundary;if(Pe.x<we.minX||Pe.x>we.maxX||Pe.y<we.minY||Pe.y>we.maxY)return;const Te=[ve.sourcePoint,...ve.segments.map(Re=>Re.end),Pe];ge.set(ve.connectionIndex,Te),le.push(B(ve.connectionIndex,Pe,Te))}const _e=[...w.remotePlans,...le];if(!Q(_e))return;const ue=new Set(_e.map(ve=>ve.connectionIndex)),fe=C.map(ve=>({...ve,connections:ve.connections.filter(he=>!ue.has(he.connectionIndex))})).filter(ve=>ve.connections.length),pe=pd(fe,{...y,fixedViaPointsByConnectionIndex:U,preferredViaPointsByConnectionIndex:w.fixedViaPointsByConnectionIndex,blockingSegments:_e.flatMap(ve=>ve.segments.map(he=>({connectionIndex:ve.connectionIndex,segment:he}))),blockingVias:_e.map(ve=>({connectionIndex:ve.connectionIndex,center:ve.via.center,diameter:ve.via.diameter,spanLayers:ve.via.spanLayers}))});if(!pe)return;const ye=new Map([...pe,..._e.map(ve=>[ve.connectionIndex,ve.via.center])]);if(ye.size!==I.size)throw new Error("FanoutSolver: source preparation lost a connection");for(const ve of O)ge.set(ve,w.sourceEscapePaths.get(ve));for(const[ve,he]of pe)ge.set(ve,[I.get(ve).connection.sourcePoint,he]);const Me=S(ye,ge);Q(Me)&&(j=ie.length,te={sourceBoundary:m,fixedViaPointsByConnectionIndex:ye,sourceEscapePaths:ge,sourcePlans:Me,prefixPlans:[...w.prefixPlans,...ne],remotePlans:_e,layerGroups:[...w.layerGroups,{layer:k,connectionCount:F.size,escapedCount:ie.length}]})},oe=yield*AR({srj:Y,buses:W,traceWidth:i,clearance:r,onPartialRoutes:J});oe&&J(oe),te?w=te:w.layerGroups.push({layer:k,connectionCount:F.size,escapedCount:0})}return w.remotePlans.length?w:null}function $Qo(t,e){return t.some(n=>{if(!cue([n]))return!1;const o=n.exitEdge==="left"||n.exitEdge==="right"?"x":"y",i=o==="x"?"y":"x",r=n.exitEdge==="left"||n.exitEdge==="bottom"?-1:1,s=o==="x"?(n.componentBounds.minX+n.componentBounds.maxX)/2:(n.componentBounds.minY+n.componentBounds.maxY)/2,a=n.connections.map(A=>e.get(A.connectionIndex)?.[i]);return a.some(A=>A===void 0||!Number.isFinite(A))?!1:t.some(A=>{if(A.termination.type!=="boundary"||A.connections.length!==2||A.componentId!==n.componentId||A.exitEdge!==n.exitEdge||A.allowedLayers?.length!==1||A.allowedLayers[0]===n.allowedLayers[0]||!A.connections.every(u=>r*(u.sourcePoint[o]-s)<-1e-7))return!1;const c=A.connections.map(u=>e.get(u.connectionIndex)?.[i]);if(c.some(u=>u===void 0||!Number.isFinite(u)))return!1;const l=A.connections.flatMap(u=>{const g=u.sourceObstacle?.center[i]??u.sourcePoint[i],h=((i==="x"?u.sourceObstacle?.width:u.sourceObstacle?.height)??0)/2;return[g-h,g+h]});return Math.max(Math.min(...a),Math.min(...c),Math.min(...l))<=Math.min(Math.max(...a),Math.max(...c),Math.max(...l))})})}function qQo(t,e){return t.some(n=>{if(!cue([n]))return!1;const o=n.exitEdge==="left"||n.exitEdge==="right"?"y":"x",i=n.connections.map(a=>e.get(a.connectionIndex)?.[o]);if(i.some(a=>a===void 0||!Number.isFinite(a)))return!1;const r=o==="x"?n.componentBounds.minX:n.componentBounds.minY,s=o==="x"?n.componentBounds.maxX:n.componentBounds.maxY;return Math.min(...i)<=s+1e-7&&Math.max(...i)>=r-1e-7})}var i6=1e-6,A$=t=>Math.max(...t.map(e=>e.length))-Math.min(...t.map(e=>e.length));function XQo(t,e){const n=t.trace.route.findIndex(r=>r.route_type==="via"),o=e.trace.route.findIndex(r=>r.route_type==="via");if(n<0||o<0)return null;const i=[...t.trace.route.slice(0,n+1),...e.trace.route.slice(o+1)];return i[i.length-1]=t.trace.route.at(-1),{...t,trace:{...t.trace,route:i},segments:[...t.segments.slice(0,t.sourceEscapeSegmentCount??1),...e.segments.slice(e.sourceEscapeSegmentCount??1)],length:e.length}}function*ZQo(t){const{inputSrj:e,preparedBuses:n,layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,maximumPasses:A=3,maximumConnectionAttempts:c=24,maximumSearchStates:l=12e5}=t;for(const[B,S]of[["maximumPasses",A],["maximumConnectionAttempts",c],["maximumSearchStates",l]])if(!Number.isSafeInteger(S)||S<1)throw new Error(`FanoutSolver: ${B} must be a positive safe integer`);const u=new Map(t.plans.map(B=>[B.connectionIndex,B])),g=n.flatMap(B=>B.connections);if(u.size!==t.plans.length||u.size!==e.connections.length||g.length!==u.size||g.some(B=>u.get(B.connectionIndex)?.connectionName!==B.connection.name))throw new Error("FanoutSolver: overlong-lane rerouting requires every original plan");const h=n.filter(B=>B.termination.type==="boundary"&&(!t.selectedBusIds||t.selectedBusIds.has(B.busId))),d=h.filter(B=>B.maxLengthSkew!==void 0&&B.connections.length>1);let p=[...t.plans];const m=new Map;for(const B of p){if(!B.via)continue;const S=B.segments.slice(0,B.sourceEscapeSegmentCount??1);!S.length||S.some(Q=>Q.layer!==B.sourceLayer)||tn(S[0].start,B.sourcePoint)>i6||tn(S.at(-1).end,B.via.center)>i6||S.some((Q,w)=>w>0&&tn(S[w-1].end,Q.start)>i6)||m.set(B.connectionIndex,[S[0].start,...S.map(Q=>Q.end)])}const _=new Map,f=(i+r)/2;let I=0,C=!1;const y=(B,S)=>{const Q=B.via;return!!(Q&&!(B.additionalVias?.length??0)&&!B.planeEndpointTrace&&!B.planeEndpointVia&&m.has(B.connectionIndex)&&Q.fromLayer===B.sourceLayer&&Q.toLayer===B.targetLayer&&Q.diameter===s&&Q.holeDiameter===a&&Q.spanLayers.length===o.length&&o.every(w=>Q.spanLayers.includes(w))&&(S.routableEscapeLayers??S.allowedLayers??o).includes(B.targetLayer)&&B.segments.slice(B.sourceEscapeSegmentCount??1).every(w=>w.layer===B.targetLayer))};function*x(B,S,Q,w,M){if(I>=c||!y(B,Q))return null;I++;const k=BC({srj:e,bus:Q,targetLayer:B.targetLayer,terminals:[{connection:Q.connections.find(O=>O.connectionIndex===B.connectionIndex),viaPoint:B.via.center,exitPoint:B.exitPoint}],acceptedPlans:S.filter(O=>O.connectionIndex!==B.connectionIndex),layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,allowBlindAndBuriedVias:!1,sourceEscapePaths:m,gridStepDivisor:2,gridStep:f,gridOrigin:w,alignGridToPads:!0,heuristicWeight:1,maximumRouteOrderAttempts:1,maximumSearchStates:l,preferTargetDirectedLaneBias:!0},1,!1);let R=k.next();for(;!R.done;)yield{...R.value,busId:Q.busId,pass:M,connectionAttempt:I},R=k.next();const F=R.value[0]?.[0];return F?XQo(B,F):null}for(const B of d){let S=p.filter(M=>M.busId===B.busId);const Q=A$(S);if(Q<=B.maxLengthSkew+i6)continue;const w=[...p];for(let M=0;M<A;M++){const k=Math.min(...S.map(O=>O.length));let R=!1;const F=S.filter(O=>O.length>k+B.maxLengthSkew+i6).toSorted((O,U)=>U.length-O.length||O.connectionIndex-U.connectionIndex);for(const O of F){if(I>=c)break;const U=O.targetLayer;if(!y(O,B))continue;let Y=_.get(U);Y||(Y=LPe({vias:p.flatMap(J=>[J.via,...J.additionalVias??[],J.planeEndpointVia].filter(oe=>oe?.spanLayers.includes(U)).map(oe=>({connectionIndex:J.connectionIndex,center:oe.center,diameter:oe.diameter}))),activeConnectionIndices:new Set(h.flatMap(J=>J.connections.filter(oe=>u.get(oe.connectionIndex)?.targetLayer===U).map(oe=>oe.connectionIndex))),traceWidth:i,clearance:r,gridStep:f}),_.set(U,Y));const W=yield*x(O,p,B,Y,M);if(!W||W.length>=O.length-i6)continue;const te=p.filter(J=>J.busId===B.busId),j=te.map(J=>J.connectionIndex===O.connectionIndex?W:J);if(A$(j)>A$(te)+i6){if(te.length!==2)continue;const J=te.find(ne=>ne!==O);if(J.targetLayer!==U)continue;const oe=p.map(ne=>ne===O?W:ne),ie=yield*x(J,oe,B,Y,M);if(!ie||ie.length>=J.length-i6||A$([W,ie])>B.maxLengthSkew+i6)continue;p=oe.map(ne=>ne===J?ie:ne)}else p=p.map(J=>J===O?W:J);R=!0}if(S=p.filter(O=>O.busId===B.busId),!R||I>=c)break}if(A$(S)<Q-i6?C=!0:p=w,I>=c)break}return C?qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...p.flatMap(B=>[B.trace,...B.planeEndpointTrace?[B.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:!1}).valid?p:null:p}var yw=1e-6,fue=t=>Math.max(...t.map(e=>e.length))-Math.min(...t.map(e=>e.length));function*evo(t){const{inputSrj:e,preparedBuses:n,layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,maximumConnectionAttempts:A=8,maximumIterationsPerConnection:c=3e7}=t;for(const[I,C]of[["maximumConnectionAttempts",A],["maximumIterationsPerConnection",c]])if(!Number.isSafeInteger(C)||C<1)throw new Error(`FanoutSolver: ${I} must be a positive safe integer`);const l=new Map(t.plans.map(I=>[I.connectionIndex,I])),u=n.flatMap(I=>I.connections);if(u.length!==e.connections.length||l.size!==t.plans.length||l.size!==u.length||u.some(I=>l.get(I.connectionIndex)?.connectionName!==I.connection.name))throw new Error("FanoutSolver: transit length repair requires every original plan");const g=n.filter(I=>I.termination.type==="boundary"&&I.maxLengthSkew!==void 0&&I.connections.length>1&&(!t.busIds||t.busIds.includes(I.busId)));let h=[...t.plans];const d=g.filter(I=>fue(h.filter(C=>C.busId===I.busId))>I.maxLengthSkew+yw);if(!d.length)return h;const p=new Map,m=new Map;for(const I of u){const C=l.get(I.connectionIndex);if(!C.via)return null;const y=C.segments.slice(0,C.sourceEscapeSegmentCount??1);if(!y.length||y.some(x=>x.layer!==I.sourceLayer)||tn(y[0].start,I.sourcePoint)>yw||tn(y.at(-1).end,C.via.center)>yw||y.some((x,E)=>E>0&&tn(y[E-1].end,x.start)>yw))return null;p.set(I.connectionIndex,C.via.center),m.set(I.connectionIndex,[y[0].start,...y.map(x=>x.end)])}let _=0;for(const I of d){let C=h.filter(S=>S.busId===I.busId);if(C.length!==I.connections.length)return null;const y=C[0].targetLayer,x=I.routableEscapeLayers??I.allowedLayers??o,E=x.filter(S=>S!==y);if(!x.includes(y)||!E.length||C.some(S=>S.targetLayer!==y))return null;const B=new Set;for(;fue(C)>I.maxLengthSkew+yw;){const S=Math.min(...C.map(j=>j.length)),Q=C.filter(j=>!B.has(j.connectionIndex)&&j.length>S+I.maxLengthSkew+yw).toSorted((j,J)=>J.length-j.length||j.connectionIndex-J.connectionIndex)[0];if(!Q||_>=A)return null;B.add(Q.connectionIndex);const w=Q.via;if(Q.planeEndpointTrace!==void 0||Q.planeEndpointSegments!==void 0||Q.planeEndpointVia!==void 0||w.fromLayer!==Q.sourceLayer||w.toLayer!==y||w.diameter!==s||w.holeDiameter!==a||w.spanLayers.length!==o.length||!o.every(j=>w.spanLayers.includes(j)))continue;const M=I.connections.find(j=>j.connectionIndex===Q.connectionIndex);_++;const k=AE({srj:e,allBuses:n,buses:[{...I,connections:[M]}],targetLayer:y,transitLayers:E,terminals:[{connection:M,viaPoint:w.center,exitPoint:Q.exitPoint}],fixedViaPointsByConnectionIndex:p,sourceEscapePaths:m,acceptedPlans:h.filter(j=>j!==Q),layerNames:o,traceWidth:i,clearance:r,viaDiameter:s,viaHoleDiameter:a,tightViaChannels:!0,ripCost:64,shuffleSeed:1,maximumRipEvents:1,maximumIterations:c});let R=k.next();for(;!R.done;)yield{...R.value,busId:I.busId,connectionName:Q.connectionName,connectionAttempt:_},R=k.next();const F=R.value?.[0];if(!F||F.length>=Q.length-yw)continue;const O=Q.sourceEscapeSegmentCount??1,U=Q.trace.route.findIndex(j=>j.route_type==="via"),Y=F.trace.route.findIndex(j=>j.route_type==="via");if(U<0||Y<0)return null;const W={...Q,via:w,additionalVias:F.additionalVias,segments:[...Q.segments.slice(0,O),...F.segments.slice(F.sourceEscapeSegmentCount??1)],trace:{...Q.trace,route:[...Q.trace.route.slice(0,U+1),...F.trace.route.slice(Y+1)]},length:F.length},te=C.map(j=>j===Q?W:j);fue(te)>fue(C)+yw||(h=h.map(j=>j===Q?W:j),C=te)}}return qu({inputSrj:e,routedSrj:{...e,traces:[...e.traces??[],...h.flatMap(I=>[I.trace,...I.planeEndpointTrace?[I.planeEndpointTrace]:[]])]},clearance:r,allowBlindAndBuriedVias:!1}).valid?h:null}function eRt(t){const{buses:e,layerNames:n,traceWidth:o,clearance:i}=t,r=e.filter(d=>d.termination.type==="boundary"),s=new Map;for(const d of r)if(d.allowedLayers?.length===1){const p=d.allowedLayers[0];s.set(p,(s.get(p)??0)+d.connections.length)}const a=new Map;for(const d of e){const p=new Set(d.connections.map(f=>f.sourceLayer)),m=(d.routableEscapeLayers??d.allowedLayers??n).filter(f=>!p.has(f)).toSorted((f,I)=>(s.get(f)??0)-(s.get(I)??0)||n.indexOf(I)-n.indexOf(f)),_=d.termination.type==="plane"?d.termination.layer:m[0];if(!_)return null;a.set(d.busId,_)}const A=VPe({...t,targetLayerByBusId:a}),c=new Map(A.tracksByConnectionIndex),l=QNt(e),u=d=>d.exitEdge==="left"||d.exitEdge==="right"?"y":"x",g=o+i;for(const d of r){if(d.allowedLayers?.length!==1)continue;const p=u(d),m=d.sharedBoundary,_=p==="y"?m.minY:m.minX,f=p==="y"?m.maxY:m.maxX,I=d.connections.map(S=>(S.exitTargetPoint??S.targetPoint)[p]),C=I.toSorted((S,Q)=>S-Q);if(C.some((S,Q)=>!Number.isFinite(S)||Q>0&&S-C[Q-1]<g-1e-8))continue;const y=C.at(-1)-C[0];if(y>f-_)continue;let x;if(l.has(d.busId))if(d.connections.length===2){const S=d.connections.map(M=>c.get(M.connectionIndex)),Q=(S[0]+S[1])/2,w=Math.abs(S[1]-S[0]);x=S.map(M=>Q+(M-Q)*y/w)}else continue;else{const S=Math.max(_-C[0],Math.min(0,f-C.at(-1)));x=I.map(Q=>Q+S)}const E=new Set(d.connections.map(S=>S.connectionIndex)),B=r.filter(S=>S.exitEdge===d.exitEdge&&a.get(S.busId)===a.get(d.busId)).flatMap(S=>S.connections.filter(Q=>!E.has(Q.connectionIndex)).map(Q=>c.get(Q.connectionIndex)));if(!x.some(S=>S<_||S>f||B.some(Q=>Math.abs(S-Q)<g-1e-8)))for(const[S,Q]of d.connections.entries())c.set(Q.connectionIndex,x[S])}const h=new Map;for(const d of r)for(const p of d.connections){const m=c.get(p.connectionIndex),_=d.sharedBoundary,f=d.exitEdge==="left"?{x:_.minX,y:m}:d.exitEdge==="right"?{x:_.maxX,y:m}:d.exitEdge==="top"?{x:m,y:_.maxY}:{x:m,y:_.minY};h.set(p.connectionIndex,f)}return{targetLayerByBusId:a,exits:h}}function*tvo(t){const e=new Set;let n;const o=()=>XPe(t,{reserveFutureApproaches:!1,failedNarrowGroup:!1,failedWideMatching:!1},e,{travelCost:3,maximumIterations:2e7});let i=!1;if(t.sourceOriginRouting&&YPe(t.buses)){const s=eRt(t),a={requested:!!s&&qQo(t.buses,s.exits),reached:!1},A=XPe({...t,sourceOriginRouting:!1},{reserveFutureApproaches:!0,failedNarrowGroup:!1,failedWideMatching:!1},e,void 0,a);let c=A.next();for(;!c.done&&!a.reached;)yield c.value,c=A.next();if(c.done){if(c.value)return c.value}else n=A;if(cue(t.buses)&&(i=!!s&&$Qo(t.buses,s.exits),!i)){const l=yield*o();if(l)return l}}let r=yield*HQo(t.sourceOriginRouting??!1,s=>XPe(t,s,e));return!r&&i&&(r=yield*o()),r||(n?yield*n:null)}function*XPe(t,e,n,o,i){const{buses:r,srj:s,layerNames:a}=t,A=eRt(t);if(!A)return null;const c=t.sourceOriginRouting?(function*(){return SSo(t)})():jQo(t);let l=c.next();for(;!l.done;)yield{phase:"sources",routedConnectionCount:0},l=c.next();if(!l.value)return null;const{fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,sourcePlans:h}=l.value;let d=[];const p=new Set(r.filter(x=>x.termination.type==="plane").map(x=>x.busId)),m=new Map;for(const x of r)if(x.termination.type==="boundary"){const E=A.targetLayerByBusId.get(x.busId);m.set(E,[...m.get(E)??[],x])}const _=[...m].sort(([,x],[,E])=>Math.max(...x.map(B=>B.allowedLayers?.length??a.length))-Math.max(...E.map(B=>B.allowedLayers?.length??a.length))||Math.max(...E.map(B=>B.connections.length))-Math.max(...x.map(B=>B.connections.length))),f=OQo({groups:_.map(([,x])=>x),fixedViaPointsByConnectionIndex:u,clearance:t.clearance}),I=t.sourceOriginRouting&&YPe(r),C=I&&!o&&cue(r);let y=!1;for(const[x,E]of _){if(C&&x===_.at(-1)[0]){const ie=zPe({buses:E,exits:A.exits});for(const[ne,le]of ie)A.exits.set(ne,le)}const B=Math.max(...E.map(ie=>ie.connections.length)),S=B>2&&E.every(ie=>ie.allowedLayers?.length===1),Q=a.filter(ie=>ie!==x&&E.every(ne=>(ne.routableEscapeLayers??ne.allowedLayers??a).includes(ie)&&ne.connections.every(le=>le.sourceLayer!==ie))),w=a.filter(ie=>ie!==x&&E.every(ne=>(ne.routableEscapeLayers??ne.allowedLayers??a).includes(ie))),M=qNt({buses:E,fixedViaPointsByConnectionIndex:u,clearance:t.clearance}),k=y&&B>2&&Q.length===0&&w.length>0,R=y&&B>2&&Q.length>0,F=C&&B>2&&Q.length===0&&w.length>0,O=d,U=t.sourceOriginRouting&&x===_[0][0]&&S,Y=new KQo({wideSingleLayer:S,retrySourceOriginPhysicalGridPhase:U&&!o,retrySourceOriginFreshReservations:U&&!o&&e.reserveFutureApproaches,preferAlternateOrder:!t.sourceOriginRouting&&S&&x===_[0][0]&&f.some(ie=>E.every(ne=>ie.every(le=>le.componentId===ne.componentId&&le.exitEdge===ne.exitEdge)))||I&&!S&&B>2&&Q.length>0&&x===_.at(-1)[0],firstRipCost:B<=2?256:64,transitLayers:Q,allTransitLayers:w,sourceOriginRipCost:R?64:256,sourceTransitRipCost:k?64:8,preferSourceOrigin:M||I&&B<=2&&O.length>0||R||YQo({...t,buses:E,targetLayer:x,exits:A.exits}),preferSourceTransit:!F&&(k||B>2&&Q.length===0&&w.length>0&&UQo(E.flatMap(ie=>ie.connections.map(ne=>({source:u.get(ne.connectionIndex),target:A.exits.get(ne.connectionIndex)})))))});let W=!1,te=!1,j=0;const J={sites:new Map(u),paths:new Map(g),plans:[...h]},oe=ie=>{u.clear();for(const[ne,le]of ie.sites)u.set(ne,le);g.clear();for(const[ne,le]of ie.paths)g.set(ne,le);h.splice(0,h.length,...ie.plans)};for(let ie=Y.next();ie;ie=Y.next()){const ne=j++===0;d=O;for(const Ce of E)p.delete(Ce.busId);const le=ie.sourceOriginPhysicalGridPhase||ie.sourceLayerTravelCost!==void 0?{sites:new Map(u),paths:new Map(g),plans:[...h]}:void 0,ge=()=>{le&&oe(le)};ie.sourceLayerTravelCost!==void 0&&oe(J);const _e=ie.routeFromSourcePads||ie.transitLayers.length<w.length,ue={...t,srj:U&&(ie.reserveFutureApproaches??e.reserveFutureApproaches)?{...s,traces:[...s.traces??[],...VQo({...t,...A,excludedBusIds:new Set(E.map(Ce=>Ce.busId))})]}:s,allBuses:r,buses:E,targetLayer:x,transitLayers:ie.transitLayers,fixedViaPointsByConnectionIndex:u,sourceEscapePaths:g,acceptedPlans:d,terminals:E.flatMap(Ce=>Ce.connections.map(Le=>({connection:Le,viaPoint:u.get(Le.connectionIndex),exitPoint:A.exits.get(Le.connectionIndex)}))),tightViaChannels:!0,heuristicWeight:F?2:void 0,ripCost:ie.ripCost,maximumRipEvents:400,maximumLocalRepairAttempts:_e?0:3,maximumIterations:1e8,shuffleSeed:ie.shuffleSeed,sourceOriginPhysicalGridPhase:ie.sourceOriginPhysicalGridPhase,sourceLayerTravelCost:ie.sourceLayerTravelCost??(U?o?.travelCost:void 0),maximumSourceIterations:ie.maximumSourceIterations??(U?o?.maximumIterations:void 0)},fe=(function*(){if(ie.routeFromSourcePads)return yield*AE({...ue,routeFromSourcePads:!0,sourceLayerTravelCost:2,maximumRipEvents:1200,maximumIterations:5e7,maximumLocalRepairAttempts:0});if(!U)return yield*AE(ue);const Ce=yield*QSo({...ue,cleanupRetainedBoundaryTails:ie.sourceOriginPhysicalGridPhase});if(!Ce)return null;u.clear();for(const[Le,Ye]of Ce.fixedViaPointsByConnectionIndex)u.set(Le,Ye);g.clear();for(const[Le,Ye]of Ce.sourceEscapePaths)g.set(Le,Ye);return h.splice(0,h.length,...Ce.sourcePlans),Ce.plans})();let pe=fe.next();for(;!pe.done;){if(i$(pe.value)){const Ce=yield pe.value;pe=fe.next(Ce);continue}yield{phase:"route-layer",layer:x,routedConnectionCount:d.length+pe.value.routedConnectionCount,iterations:pe.value.iterations},pe=fe.next()}const ye=pe.value;if(!ye){if(ge(),U&&!ie.sourceOriginPhysicalGridPhase&&ie.sourceLayerTravelCost===void 0)return e.failedWideMatching=te,null;Y.failed(ie,"routing"),i?.requested&&!t.sourceOriginRouting&&S&&x===_[0][0]&&ne&&ie.shuffleSeed===1&&!ie.routeFromSourcePads&&(i.requested=!1,i.reached=!0,yield{phase:"route-layer",layer:x,routedConnectionCount:d.length});continue}d=[...d,...ye];for(const Ce of E)p.add(Ce.busId);yield{phase:"match-layer",layer:x,routedConnectionCount:d.length};const Me=new Set(d.map(Ce=>Ce.connectionIndex));let ve=[...d,...h.filter(Ce=>!Me.has(Ce.connectionIndex))];const he=r.filter(Ce=>p.has(Ce.busId));ve=SO({...t,inputSrj:s,plans:ve,preparedBuses:he,selectedBusIds:new Set(E.map(Ce=>Ce.busId)),allowBlindAndBuriedVias:!1})??ve;let Qe=ie.routeFromSourcePads&&R,Pe=ie.routeFromSourcePads??!1;const we=t.sourceOriginRouting===!0&&B<=2&&O.length>0,Te=t.sourceOriginRouting&&S?r.filter(Ce=>Ce.termination.type==="boundary"&&!p.has(Ce.busId)):void 0,Re=Ce=>zy({...t,inputSrj:s,sharedBoundary:r[0].sharedBoundary,plans:ve,preparedBuses:he,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowSourcePrefixMatching:Qe,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,unroutedSourceBuses:Te,maximumWorkUnits:Ce});function*Ee(){const Ce=ZQo({...t,inputSrj:s,plans:ve,preparedBuses:r,selectedBusIds:new Set(E.map(Ye=>Ye.busId))});let Le=Ce.next();for(;!Le.done;)yield{phase:"repair-lengths",layer:x,routedConnectionCount:d.length},Le=Ce.next();ve=Le.value??ve}S&&(yield*Ee());let ke=Re(S?void 0:1e3);if(!ke.plans&&C&&B>2&&x===_.at(-1)[0]){const Ce=zy({...t,inputSrj:s,sharedBoundary:r[0].sharedBoundary,plans:ve,preparedBuses:he,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,allowMatchingInsideDenseBounds:!0,allowSourcePrefixMatching:!0,allowTransitLayerMatching:!0,allowDistributedMatching:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0,maximumWorkUnits:1e5});Ce.plans&&(ke=Ce,Pe=!0)}if(!ke.plans&&!S&&!we&&(yield*Ee(),ke=Re(_e||(t.sourceOriginRouting||y)&&B>2?1e3:void 0)),!ke.plans&&we&&I&&ie.routeFromSourcePads){const Ce=Qe;Qe=!0;const Le=Re(1e3);Le.plans?ke=Le:Qe=Ce}if(!ke.plans&&(we||ke.failedBus&&ie.routeFromSourcePads&&(M||R))){const Ce=ve,Le=Qe,Ye=Pe,tt=new Set,At=we?E.filter(at=>at.connections.length===2).length:1;for(let at=0;at<At&&!(!ke.failedBus||ke.plans);at++){const nt=ke.failedBus;if(we){if(nt.connections.length!==2||!E.some(Dt=>Dt.busId===nt.busId)||tt.has(nt.busId))break;tt.add(nt.busId)}const gt=wNt({...t,inputSrj:s,plans:ve,preparedBuses:r,bus:nt});let bt=gt.next();for(;!bt.done;)yield{phase:"repair-lengths",layer:x,routedConnectionCount:d.length,iterations:bt.value.iterations},bt=gt.next();if(!bt.value)break;ve=bt.value,Pe=!0,we&&(Qe=!0);const Ct=function*(){ve=SO({...t,inputSrj:s,plans:ve,preparedBuses:he,selectedBusIds:new Set(E.map(kt=>kt.busId)),allowBlindAndBuriedVias:!1})??ve;let Dt=Re(1e3);return!Dt.plans&&!we&&(yield*Ee(),Dt=Re(1e3)),Dt};ke=yield*Ct(),!ke.plans&&M&&(Qe=!0,ke=yield*Ct())}we&&!ke.plans&&(ve=Ce,Qe=Le,Pe=Ye,yield*Ee(),ke=Re())}if(!ke.plans&&t.sourceOriginRouting&&!S&&B>2&&x===_.at(-1)[0]){const Ce=ve,Le=ke,Ye=Qe,tt=Pe,At=AE({...ue,routeFromSourcePads:!0,transitLayers:[],sourceLayerTravelCost:2,ripCost:64,shuffleSeed:1,maximumIterations:3e7,maximumRipEvents:400,maximumLocalRepairAttempts:0});let at=At.next();for(;!at.done;){if(i$(at.value)){const nt=yield at.value;at=At.next(nt);continue}yield{phase:"repair-lengths",layer:x,routedConnectionCount:d.length,iterations:at.value.iterations},at=At.next()}at.value&&(ve=[...O,...at.value,...h.filter(nt=>!Me.has(nt.connectionIndex))],ve=SO({...t,inputSrj:s,plans:ve,preparedBuses:he,selectedBusIds:new Set(E.map(nt=>nt.busId)),allowBlindAndBuriedVias:!1})??ve,Qe=!0,ke=Re(1e3),Pe=!0),ke.plans||(ve=Ce,ke=Le,Qe=Ye,Pe=tt)}if(ke.plans)ve=ke.plans;else{if(o&&U)return null;if(te=!0,_e){ge(),Y.failed(ie,"lengths");continue}const Ce=evo({...t,inputSrj:s,plans:ve,preparedBuses:r,busIds:E.map(Ye=>Ye.busId)});let Le=Ce.next();for(;!Le.done;)yield{phase:"repair-lengths",layer:x,routedConnectionCount:d.length,iterations:Le.value.iterations},Le=Ce.next();if(Le.value)ve=Le.value;else{const Ye=bSo({...t,inputSrj:s,plans:ve,preparedBuses:r,busIds:E.map(At=>At.busId)});let tt=Ye.next();for(;!tt.done;)yield{phase:"repair-lengths",layer:x,routedConnectionCount:d.length,iterations:tt.value.iterations},tt=Ye.next();if(tt.value)ve=tt.value;else{const At=new Set(E.map(bt=>bt.busId)),at=t.sourceOriginRouting&&S&&E.every(bt=>!n.has(bt.busId))&&ZNt({plans:ve,completedBuses:he,selectedBusIds:At});if(at)for(const bt of E)n.add(bt.busId);const nt=at?GQo({...t,inputSrj:s,plans:ve,preparedBuses:r,completedBuses:he,selectedBusIds:At}):void 0;let gt=nt?.next();for(;gt&&!gt.done;)yield{phase:"repair-lengths",layer:x,routedConnectionCount:d.length,iterations:gt.value.iterations},gt=nt.next();if(!gt?.value){ge(),Y.failed(ie,"lengths");continue}ve=gt.value,Pe=!0}}}if(d=ve.filter(Ce=>Me.has(Ce.connectionIndex)),Pe||Te?.length){const Ce=new Map([...E,...Te??[]].flatMap(Le=>Le.connections.map(Ye=>{const tt=ve.find(nt=>nt.connectionIndex===Ye.connectionIndex);if(!tt.via)throw new Error("Source-origin routing lost its source reservation");const At=[Ye.sourcePoint,...tt.segments.slice(0,tt.sourceEscapeSegmentCount??1).map(nt=>nt.end)],at=i4({...t,bus:Le,terminal:{connection:Ye,viaPoint:tt.via.center,exitPoint:tt.via.center},targetLayer:tt.via.toLayer,targetLayerPoints:[tt.via.center],sourceEscapePoints:At,allowBlindAndBuriedVias:!1});return[Ye.connectionIndex,{plan:at,path:At}]})));for(const[Le,Ye]of Ce)u.set(Le,Ye.plan.via.center),g.set(Le,Ye.path);for(let Le=0;Le<h.length;Le++)h[Le]=Ce.get(h[Le].connectionIndex)?.plan??h[Le]}M&&ie.routeFromSourcePads&&(y=!0),W=!0;break}if(!W)return e.failedNarrowGroup=B<=2&&O.length>0,e.failedWideMatching=t.sourceOriginRouting===!0&&B>2&&te,null}return DPe({...t,inputSrj:s,preparedBuses:r,plans:[...d,...h.filter(x=>p.has(x.busId)&&x.termination.type==="plane")]})}function*nvo(t){const e=(r,s=t.preparedBuses)=>zy({plans:r,preparedBuses:s,inputSrj:t.inputSrj,sharedBoundary:t.sharedBoundary,clearance:t.clearance,allowBlindAndBuriedVias:t.allowBlindAndBuriedVias,allowSameNetMerges:t.allowSameNetMerges}),n=r=>Math.max(...r.map(s=>s.length))-Math.min(...r.map(s=>s.length)),o=new Set;let i=[...t.plans];for(;o.size<3;){const r=e(i);if(r.plans)return r.plans;const s=r.failedBus;if(o.has(s.busId)||s.connections.length!==2||s.termination.type!=="boundary"||!s.exitEdge)return null;o.add(s.busId);const a=i.filter(C=>C.busId===s.busId);if(a.length!==2||a.some(C=>!C.via||C.additionalVias?.length)||a[0].targetLayer!==a[1].targetLayer)return null;const A=i.filter(C=>C.busId!==s.busId),c=new Map(a.map(C=>[C.connectionIndex,[C.sourcePoint,...C.segments.slice(0,C.sourceEscapeSegmentCount??1).map(y=>y.end)]])),l=s.exitEdge==="left"||s.exitEdge==="right",u=l?"y":"x",g=l?t.sharedBoundary.minY:t.sharedBoundary.minX,h=l?t.sharedBoundary.maxY:t.sharedBoundary.maxX,d=(g+h)/2,p=Ds(s.exitEdge,s.preferredExit),m=t.traceWidth+t.clearance,_=n(a),f=[];let I=null;e:for(const C of[0,1,-1,2,-2,3,-3,4,-4]){const y=C*m;if(!a.some(x=>{const E=x.exitPoint[u]+y;return E<g+t.traceWidth/2||E>h-t.traceWidth/2||p==="minimum"&&E>=d||p==="maximum"&&E<=d}))for(const x of[0,-1,1])for(const E of[[0,1],[1,0]]){const B=yield*BC({...t,bus:s,targetLayer:a[0].targetLayer,acceptedPlans:A,terminals:s.connections.map(w=>{const M=a.find(k=>k.connectionIndex===w.connectionIndex);return{connection:w,viaPoint:M.via.center,exitPoint:{...M.exitPoint,[u]:M.exitPoint[u]+y}}}),sourceEscapePaths:c,reservedVias:void 0,gridStep:m/2,gridStepDivisor:2,alignGridToPads:!0,maximumRouteOrderAttempts:1,routeOrder:E,laneBias:x},1,!1);if(!B.length||n(B[0])>=_)continue;const S=B[0].map(w=>({...w,cornerBandSide:p}));if(f.push(S),n(S)>2*s.maxLengthSkew)continue;const Q=e([...A,...S],[s]);if(Q.plans){I=Q.plans;break e}}}if(!I)for(const C of f.toSorted((y,x)=>n(y)-n(x)).slice(0,3)){const y=e([...A,...C],[s]);if(y.plans){I=y.plans;break}}if(!I)return null;i=I}return e(i).plans}var bC=1e-7;function Iue(t,e){const n=t.filter((o,i)=>!i||tn(o,t[i-1])>1e-9);return n.flatMap((o,i)=>{if(!i||i===n.length-1)return[o];const r=n[i-1],s=n[i+1],a=tn(r,o),A=tn(o,s);if(Math.abs((o.x-r.x)*(s.x-o.x)+(o.y-r.y)*(s.y-o.y))>1e-9)return[o];const c=Math.min(e,a/3,A/3);return[{x:o.x+(r.x-o.x)*c/a,y:o.y+(r.y-o.y)*c/a},{x:o.x+(s.x-o.x)*c/A,y:o.y+(s.y-o.y)*c/A}]})}function ovo(t,e,n){if(t.length>28)return null;const{traceWidth:o,clearance:i,viaDiameter:r}=e,s=e.buses.flatMap(_=>_.connections),a=pw(e.buses,{...e,additionalObstacles:e.srj.obstacles}),A=new Map(t.map((_,f)=>[_.connectionIndex,f])),c=s.map(_=>({own:A.get(_.connectionIndex),masks:a.filter(f=>f.connectionIndex===_.connectionIndex).map(f=>{const I={start:_.sourcePoint,end:f.point,width:o,layer:_.sourceLayer};let C=0;return t.forEach((y,x)=>{y.connectionIndex!==_.connectionIndex&&(tn(f.point,y.exitPoint)<r+i-bC||Cr(y.exitPoint,I.start,I.end)<r/2+o/2+i-bC||y.segments.some(E=>Cr(f.point,E.start,E.end)<r/2+o/2+i-bC||!Zm(I,E,i)))&&(C|=1<<x)}),C})})),l=_=>Math.atan2(_.y-n.y,_.x-n.x),u=t.map((_,f)=>f).sort((_,f)=>l(t[f].exitPoint)-l(t[_].exitPoint)),g=e.bus.connections.toSorted((_,f)=>l(f.exitTargetPoint??f.targetPoint)-l(_.exitTargetPoint??_.targetPoint)),h=new Map(g.map((_,f)=>[_.connectionIndex,f])),d=_=>c.every(f=>f.own!==void 0&&_&1<<f.own||f.masks.some(I=>!(I&_)));let p=[],m=0;for(let _=0;_<t.length;_++){const f=[...u.slice(_),...u.slice(0,_)],I=(C,y,x,E)=>{if(++m>1e6||E.length+f.length-C<p.length)return;if(C===f.length){E.length>p.length&&d(x)&&(p=[...E]);return}const B=f[C],S=h.get(t[B].connectionIndex);S>y&&I(C+1,S,x|1<<B,[...E,B]),I(C+1,y,x,E)};I(0,-1,0,[])}return p.length>=3?p.map(_=>t[_]):null}function*ivo(t){const{bus:e,srj:n,traceWidth:o,clearance:i,viaDiameter:r}=t;if(e.termination.type!=="boundary"||e.exitEdge!=="left"||e.connections.length<8||e.connections.length>28||t.targetLayer==="top"||e.connections.some(ye=>ye.sourceLayer!=="top"))return null;const s=Math.min(e.pitchX,e.pitchY),a=o+i;if(!Number.isFinite(s)||s<=0)return null;const A=e.componentObstacles.filter(ye=>ye.layers.includes("top")),c={minX:Math.min(...A.map(ye=>ye.center.x-ye.width/2)),maxX:Math.max(...A.map(ye=>ye.center.x+ye.width/2)),minY:Math.min(...A.map(ye=>ye.center.y-ye.height/2)),maxY:Math.max(...A.map(ye=>ye.center.y+ye.height/2))},l={x:(c.minX+c.maxX)/2,y:(c.minY+c.maxY)/2},u=Math.ceil(((c.maxX-c.minX)/2+s+a)/a)*a,g=Math.ceil(((c.maxY-c.minY)/2+s+a)/a)*a,h={minX:l.x-u,maxX:l.x+u,minY:l.y-g,maxY:l.y+g};if(h.minX<=e.sharedBoundary.minX||h.maxY>=e.sharedBoundary.maxY||h.minY<=e.sharedBoundary.minY)return null;const d=new Map(t.buses.flatMap(ye=>ye.connections.map(Me=>[Me.connectionIndex,{owner:ye,connection:Me}]))),p=ye=>t.targetPointsByConnectionIndex?.get(ye.connectionIndex)??{x:e.sharedBoundary.minX,y:(ye.exitTargetPoint??ye.targetPoint).y},m=ye=>ye.map((Me,ve)=>({...e,busId:`${e.busId}:split-source:${ve}`,sharedBoundary:h,preferredExit:void 0,exitEdge:void 0,connections:[{...Me,exitTargetPoint:void 0,hasExplicitLayeredExitTarget:!1,hasExplicitExitTarget:!1}]})),_=yield*AR({srj:n,buses:m(e.connections),traceWidth:o,clearance:i});if(!_||_.length!==e.connections.length)return null;const f=ovo(_,t,l);if(!f)return null;const I=(ye,Me)=>{const ve=d.get(ye.connectionIndex).owner,he=ve===e?t.targetLayer:ve.termination.type==="plane"?ve.termination.layer:t.targetLayerByBusId?.get(ve.busId)??(ve.allowedLayers??t.layerNames).find(Qe=>Qe!==ye.sourceLayer);if(!he)throw Error("FanoutSolver: split source has no legal target layer");return{connectionIndex:ye.connectionIndex,connectionName:ye.connection.name,segments:Me.slice(1).map((Qe,Pe)=>({start:Me[Pe],end:Qe,width:o,layer:ye.sourceLayer})),via:{center:Me.at(-1),diameter:r,holeDiameter:t.viaHoleDiameter,fromLayer:ye.sourceLayer,toLayer:he,spanLayers:Mx({fromLayer:ye.sourceLayer,toLayer:he,layerNames:t.layerNames,allowBlindAndBuriedVias:!1})}}},C=(ye,Me)=>{const ve=d.get(ye.connectionIndex).connection;if(ye.segments.some(he=>[he.start,he.end].some(Qe=>Qe.x<e.sharedBoundary.minX-bC||Qe.x>e.sharedBoundary.maxX+bC||Qe.y<e.sharedBoundary.minY-bC||Qe.y>e.sharedBoundary.maxY+bC)))return!1;for(const he of n.obstacles)if(he.layers.some(Qe=>ye.via.spanLayers.includes(Qe))&&wx(ye.via.center,he)<r/2+i-bC||he!==ve.sourceObstacle&&ye.segments.some(Qe=>he.layers.includes(Qe.layer)&&Tl(Qe,he)<o/2+i-bC))return!1;return Me.every(he=>he.connectionIndex===ye.connectionIndex||tn(ye.via.center,he.via.center)>=r+i-bC&&ye.segments.every(Qe=>Cr(he.via.center,Qe.start,Qe.end)>=r/2+o/2+i-bC&&he.segments.every(Pe=>Zm(Qe,Pe,i)))&&he.segments.every(Qe=>Cr(ye.via.center,Qe.start,Qe.end)>=r/2+o/2+i-bC))},y=ye=>{const Me=new Set(ye.map(ve=>ve.connectionIndex));return t.buses.map(ve=>({...ve,connections:ve.connections.filter(he=>!Me.has(he.connectionIndex))})).filter(ve=>ve.connections.length)};let x=t.initialViaPoints;const E=ye=>({...t,additionalObstacles:n.obstacles,maximumSearchStates:3e5,blockingSegments:ye.flatMap(Me=>Me.segments.map(ve=>({connectionIndex:Me.connectionIndex,segment:ve}))),blockingVias:ye.map(Me=>({connectionIndex:Me.connectionIndex,...Me.via})),preferredViaPointsByConnectionIndex:x}),B=f.map(ye=>I(d.get(ye.connectionIndex).connection,[ye.segments[0].start,...ye.segments.map(Me=>Me.end)])),S=pd(y(B),E(B));if(!S)return null;x=new Map([...S,...B.map(ye=>[ye.connectionIndex,ye.via.center])]);const Q=f.toSorted((ye,Me)=>p(d.get(ye.connectionIndex).connection).y-p(d.get(Me.connectionIndex).connection).y);let w=[];for(const ye of Q){const Me=[ye];let ve=ye.exitPoint.x;for(const he of Q.slice(Q.indexOf(ye)+1))he.exitPoint.x>ve+a-bC&&(Me.push(he),ve=he.exitPoint.x);Me.length>w.length&&(w=Me)}if(w.length<3)return null;const M=new Map(w.map(ye=>[ye.connectionIndex,[ye.segments[0].start,...ye.segments.map(Me=>Me.end)]])),k=e.sharedBoundary.minX+Math.max(s/2,r/2+i),R=h.maxY+s-a/2,F=h.minX-s+a/2,O=()=>[...M].sort(([ye],[Me])=>p(d.get(ye).connection).y-p(d.get(Me).connection).y).map(([ye,Me],ve)=>{const he=p(d.get(ye).connection),Qe=Me.at(-1);return I(d.get(ye).connection,Iue([...Me,{x:Qe.x,y:R+ve*a},{x:F-ve*a,y:R+ve*a},{x:F-ve*a,y:he.y},{x:k,y:he.y}],o))});let U=O();if(U.some(ye=>!C(ye,U)))return null;for(const ye of e.connections.toSorted((Me,ve)=>p(Me).y-p(ve).y)){if(M.has(ye.connectionIndex))continue;const Me=[...M].filter(([he])=>p(d.get(he).connection).y<p(ye).y).at(-1)?.[1].at(-1)?.x??h.minX,ve=[...M].filter(([he])=>p(d.get(he).connection).y>p(ye).y)[0]?.[1].at(-1)?.x??h.maxX;for(const he of[-1,1]){const Qe={x:ye.sourcePoint.x+he*s/2,y:ye.sourcePoint.y+s/2};if(Qe.x<Me+a-bC||Qe.x>ve-a+bC)continue;const Pe=[ye.sourcePoint,Qe,{x:Qe.x,y:h.maxY}];M.set(ye.connectionIndex,Pe);const we=O();if(we.every(Te=>C(Te,we))&&pd(y(we),E(we))){U=we;break}M.delete(ye.connectionIndex)}}const Y=Math.min(...U.map(ye=>p(d.get(ye.connectionIndex).connection).y));for(const ye of _.filter(Me=>Math.abs(Me.exitPoint.x-h.minX)<bC&&p(d.get(Me.connectionIndex).connection).y<Y).sort((Me,ve)=>p(d.get(ve.connectionIndex).connection).y-p(d.get(Me.connectionIndex).connection).y)){const Me=d.get(ye.connectionIndex).connection,ve=p(Me),he=h.minX-a,Qe=I(Me,Iue([ye.segments[0].start,...ye.segments.map(Pe=>Pe.end),{x:he,y:ye.exitPoint.y},{x:he,y:ve.y},{x:k,y:ve.y}],o));C(Qe,U)&&pd(y([...U,Qe]),E([...U,Qe]))&&U.push(Qe)}const W=new Set(U.map(ye=>ye.connectionIndex)),te=e.connections.filter(ye=>!W.has(ye.connectionIndex)).sort((ye,Me)=>p(ye).y-p(Me).y);if(te.length<5)return null;const j=te.slice(0,3),J=j[1],oe=j[2],ie=[...n.obstacles,...U.flatMap(ye=>ye.segments.map(Me=>({type:"rect",center:{x:(Me.start.x+Me.end.x)/2,y:(Me.start.y+Me.end.y)/2},width:tn(Me.start,Me.end),height:Me.width,ccwRotationDegrees:Math.atan2(Me.end.y-Me.start.y,Me.end.x-Me.start.x)*180/Math.PI,layers:[Me.layer],connectedTo:[ye.connectionName]})))],ne=yield*AR({srj:{...n,obstacles:ie},buses:m([J,oe]),traceWidth:o,clearance:i,availableBoundaryRegions:[{direction:"down",preferredExit:"bottom",exitEdge:"bottom"}]});if(!ne?.length)return null;const le=ne.find(ye=>ye.connectionIndex===J.connectionIndex),ge=I(J,[le.segments[0].start,...le.segments.map(ye=>ye.end)]);if(!C(ge,U))return null;U.push(ge),W.add(ge.connectionIndex);const _e=y(U),ue=new Map([[oe.connectionIndex,{x:oe.sourcePoint.x-s/2,y:oe.sourcePoint.y-s/2}]]),fe=pd(_e,{...E(U),fixedViaPointsByConnectionIndex:ue});if(!fe)return null;const pe=[...U,..._e.flatMap(ye=>ye.connections.map(Me=>I(Me,[Me.sourcePoint,fe.get(Me.connectionIndex)])))];return pe.some(ye=>!C(ye,pe))?null:{sourceEscapes:pe,sourceBoundary:h,remoteConnectionIndices:W,bottomRemoteConnectionIndices:new Set([ge.connectionIndex]),lowerConnectionIndices:j.map(ye=>ye.connectionIndex),viaPointsByConnectionIndex:new Map(pe.map(ye=>[ye.connectionIndex,ye.via.center]))}}function*ZPe(t){const e=new Set,n=new Set,o=[];let i=0,r=null;function*s(c,l){const u=c.join(",")+":"+l;if(e.has(u)||i>=256)return;e.add(u),i++;let g=0;const h=BC({...t,routeOrder:c,laneBias:l,maximumRouteOrderAttempts:1},1,!1);let d=h.next();for(;!d.done;)g=Math.max(g,d.value.connectionIndex),yield d.value,d=h.next();if(d.value.length){r=d.value[0];return}const p=c.slice(0,g+1).join(",")+":"+l;n.has(p)||(n.add(p),o.push({order:c,bias:l,completed:g}))}const A=t.terminals.map((c,l)=>l).toSorted((c,l)=>t.terminals[c].exitPoint.x-t.terminals[l].exitPoint.x);for(const c of[0,1,-1])if(yield*s(A,c),r||(yield*s(A.toReversed(),c),r))return r;for(;o.length&&i<256;){o.sort((g,h)=>h.completed-g.completed);const{order:c,bias:l,completed:u}=o.shift();o.length>256&&(o.length=256);for(let g=u-1;g>=0;g--){const h=[...c],[d]=h.splice(u,1);if(h.splice(g,0,d),yield*s(h,l),r)return r;const p=[...c];if([p[u],p[g]]=[p[g],p[u]],yield*s(p,l),r)return r}}return null}function*tRt(t){const{bus:e,srj:n,sourceBoundary:o,sourceEscapes:i,remoteConnectionIndices:r,bottomRemoteConnectionIndices:s,lowerConnectionIndices:a,targetLayer:A,traceWidth:c,clearance:l}=t;if(e.exitEdge!=="left"||e.termination.type!=="boundary"||a.length!==3)return null;const u=Math.min(e.pitchX,e.pitchY),g=c+l,h=new Map(i.map(pe=>[pe.connectionIndex,pe])),d=e.connections.map(pe=>({connection:pe,viaPoint:h.get(pe.connectionIndex).via.center,exitPoint:{x:e.sharedBoundary.minX,y:(pe.exitTargetPoint??pe.targetPoint).y}})).sort((pe,ye)=>pe.exitPoint.y-ye.exitPoint.y),p=new Map(d.map(pe=>[pe.connection.connectionIndex,pe])),m=a.map(pe=>p.get(pe)),_=new Set(a),f=d.filter(pe=>!_.has(pe.connection.connectionIndex)&&!r.has(pe.connection.connectionIndex));if(f.length<2||m.some(pe=>!pe))return null;const I=new Map(i.map(pe=>[pe.connectionIndex,[pe.segments[0].start,...pe.segments.map(ye=>ye.end)]])),C=(pe,ye)=>i4({...t,bus:e,terminal:pe,targetLayerPoints:ye,sourceEscapePoints:I.get(pe.connection.connectionIndex),allowBlindAndBuriedVias:!1}),y=Math.min(o.minY-t.viaDiameter/2-c/2-l-1e-5,...m.map((pe,ye)=>pe.exitPoint.y+(m.length-1-ye)*g-g-c)),x=(pe,ye,Me)=>{const ve=(Me?f:m).findIndex(Te=>Te.connection.connectionIndex===pe.connection.connectionIndex),he=ye.at(-1),Qe=Me?o.maxY+u-g/2+ve*g:y-(m.length-1-ve)*g,Pe=o.minX-t.viaDiameter/2-c/2-l-1e-5-(Me?ve:m.length-1-ve)*g,we=Iue([he,{x:he.x,y:Qe},{x:Pe,y:Qe},{x:Pe,y:pe.exitPoint.y},pe.exitPoint],c);return C(pe,[...ye,...we.slice(1)])},E=d.filter(pe=>r.has(pe.connection.connectionIndex)).map(pe=>s.has(pe.connection.connectionIndex)?x(pe,[pe.viaPoint],!1):C(pe,[pe.viaPoint,pe.exitPoint]));let B=!!t.rematchPendingSources;const S=(pe,ye,Me,ve,he=!1)=>{const Qe=new Set(pe.map(we=>we.connection.connectionIndex)),Pe={...e,connections:pe.map(we=>we.connection),exitEdge:Me?"top":"bottom",direction:Me?"up":"down",preferredExit:void 0,sharedBoundary:he?e.sharedBoundary:{...e.sharedBoundary,maxY:o.maxY,...Me?{}:{minY:o.minY}}};return{...t,bus:Pe,terminals:pe.map((we,Te)=>({...we,exitPoint:ve[Te]})),acceptedPlans:ye,reservedVias:i.filter(we=>!Qe.has(we.connectionIndex)&&(!B||!t.rematchPendingSources?.connectionIndices.has(we.connectionIndex))).map(we=>({connectionName:we.connectionName,via:we.via})),sourceEscapePaths:I,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1,gridStepDivisor:2,gridStep:g/2,alignGridToPads:!0,reserveTerminalExitPoints:!0}},Q=m[0],w=m.at(-1),M=f[0],k=w.connection.sourcePoint,R=k.x+u,F=[{x:M.connection.sourcePoint.x,y:M.connection.sourcePoint.y-u},{x:k.x-u,y:k.y},{x:R,y:k.y}];let O=[Q.viaPoint];for(const pe of F){const ye={...Q,viaPoint:O.at(-1)},Me=S([ye],E,!0,[pe],!0);Me.bus={...Me.bus,exitEdge:"right",direction:"right"},Me.sourceEscapePaths=void 0;const ve=yield*ZPe(Me);if(!ve)return null;O.push(...ve[0].segments.filter(he=>he.layer===A).map(he=>he.end))}O=Iue([...O,{x:R,y:o.minY}],c);const U=x(Q,O,!1),W={x:i.find(pe=>s.has(pe.connectionIndex)).via.center.x-u,y:o.minY};B=!1;const te=yield*ZPe(S([w],[...E,U],!1,[W]));if(!te)return null;const j=te[0].segments.filter(pe=>pe.layer===A),J=x(w,[j[0].start,...j.map(pe=>pe.end)],!1);if(t.rematchPendingSources){if(!t.rematchPendingSources.afterLowerStage([...E,U,J]))return null;for(const pe of i)I.set(pe.connectionIndex,[pe.segments[0].start,...pe.segments.map(ye=>ye.end)])}const oe=Math.min(...e.componentObstacles.map(pe=>pe.center.x-pe.width/2)),ie=oe+t.viaDiameter/2,ne=Math.max(...f.map(pe=>pe.connection.sourcePoint.x))-u/2-c/2;if(ne-ie<(f.length-1)*g)return null;const le=f.map((pe,ye)=>({x:ie+(ne-ie)*ye/(f.length-1),y:o.maxY})),ge=yield*ZPe(S(f,[...E,U,J],!0,le));if(!ge)return null;const _e=ge.map(pe=>{const ye=pe.segments.filter(ve=>ve.layer===A),Me=ye.at(-1);return Me.end.y<=Me.start.y?null:x(p.get(pe.connectionIndex),[ye[0].start,...ye.map(ve=>ve.end)],!0)});if(_e.some(pe=>!pe))return null;const ue=[...E,U,J,..._e];if(ue.length!==e.connections.length)return null;const fe=ue.map(pe=>pe.length);if(e.maxLengthSkew!==void 0&&Math.max(...fe)-Math.min(...fe)>e.maxLengthSkew+eMe||!Wh({plans:ue,srj:n,sharedBoundary:e.sharedBoundary,clearance:l,allowBlindAndBuriedVias:!1,allowSameNetMerges:!1}))return null;for(const pe of ue)for(const ye of i)if(pe.connectionIndex!==ye.connectionIndex)for(const Me of pe.segments){if(ye.via.spanLayers.includes(Me.layer)&&Cr(ye.via.center,Me.start,Me.end)<ye.via.diameter/2+Me.width/2+l-eMe)return null;for(const ve of ye.segments)if(Me.layer===ve.layer&&tu(Me.start,Me.end,ve.start,ve.end)<(Me.width+ve.width)/2+l-eMe)return null}return ue}var eMe=1e-7,SB=1e-7;function nRt(t,e){const n=new Map(t.buses.flatMap(i=>i.connections).map(i=>[i.connectionIndex,i])),o=t.bus.sharedBoundary;for(const i of e){const r=n.get(i.connectionIndex),s=i.via.diameter/2;for(const a of t.srj.obstacles)if(a.layers.some(A=>i.via.spanLayers.includes(A))&&wx(i.via.center,a)<s+t.clearance-SB||a!==r.sourceObstacle&&i.segments.some(A=>a.layers.includes(A.layer)&&Tl(A,a)<A.width/2+t.clearance-SB))return!1;for(const a of i.segments)if([a.start,a.end].some(A=>A.x<o.minX-SB||A.x>o.maxX+SB||A.y<o.minY-SB||A.y>o.maxY+SB))return!1;for(const a of e)if(i.connectionIndex!==a.connectionIndex&&(tn(i.via.center,a.via.center)<s+a.via.diameter/2+t.clearance-SB||i.segments.some(A=>a.via.spanLayers.includes(A.layer)&&Cr(a.via.center,A.start,A.end)<a.via.diameter/2+A.width/2+t.clearance-SB)||i.segments.some(A=>a.segments.some(c=>!Zm(A,c,t.clearance)))))return!1}return!0}function*rvo(t){const{bus:e,traceWidth:n,clearance:o,viaDiameter:i}=t;if(e.exitEdge!=="left"||e.termination.type!=="boundary"||t.bottomRemoteConnectionIndices.size!==1)return null;const r=[...t.bottomRemoteConnectionIndices][0],s=t.sourceEscapes.find(d=>d.connectionIndex===r),a=s?.segments.at(-1);if(!a||Math.abs(a.start.x-a.end.x)>SB||a.start.y<=a.end.y)return null;const A=Math.min(e.pitchX,e.pitchY);if(!Number.isFinite(A)||A<=0)return null;const c=n+o,l=e.yCoordinates.slice(1).map((d,p)=>(d+e.yCoordinates[p])/2).filter(d=>d>a.end.y+SB&&d<a.start.y-SB).sort((d,p)=>d-p).slice(0,4),u=new Set([...e.connections.map(d=>d.connectionIndex),...t.sourceEscapes.filter(d=>d.segments.length>1).map(d=>d.connectionIndex)]),g=t.buses.map(d=>({...d,connections:d.connections.filter(p=>!u.has(p.connectionIndex))})).filter(d=>d.connections.length),h=new Set(g.flatMap(d=>d.connections).map(d=>d.connectionIndex));for(const d of l){yield{phase:"route-connection",routeOrderAttempt:0,connectionIndex:0,connectionCount:e.connections.length,connectionName:s.connectionName,searchBatch:0,expandedStateCount:0,connectionComplete:!1};const p=t.sourceEscapes.map(x=>({...x,segments:x.segments.map(E=>({...E,start:{...E.start},end:{...E.end}})),via:{...x.via,center:{...x.via.center}}})),m=new Map(t.viaPointsByConnectionIndex),_=p.find(x=>x.connectionIndex===r);_.via.center={x:a.end.x,y:d},_.segments.at(-1).end=_.via.center,m.set(r,_.via.center);const f=p.filter(x=>u.has(x.connectionIndex)),I=(x=[])=>{const E=pd(g,{...t,additionalObstacles:t.srj.obstacles,maximumSearchStates:3e5,preferredViaPointsByConnectionIndex:m,blockingSegments:[...f.flatMap(B=>B.segments.map(S=>({connectionIndex:B.connectionIndex,segment:S}))),...x.flatMap(B=>B.segments.filter(S=>S.layer===t.targetLayer).map(S=>({connectionIndex:B.connectionIndex,segment:S})))],blockingVias:f.map(B=>({connectionIndex:B.connectionIndex,...B.via}))});if(!E)return!1;for(const B of p)if(h.has(B.connectionIndex)){const S=E.get(B.connectionIndex);B.via={...B.via,center:S},B.segments=[{...B.segments[0],end:S}],m.set(B.connectionIndex,S)}return nRt(t,p)};if(!I())continue;const C={...t.sourceBoundary,minY:d-A+i/2+n/2+o+1e-5+c},y=yield*tRt({...t,sourceEscapes:p,sourceBoundary:C,viaPointsByConnectionIndex:m,rematchPendingSources:{connectionIndices:h,afterLowerStage:I}});if(y&&nRt(t,p))return{plans:y,sourceEscapes:p,sourceBoundary:{...t.sourceBoundary},viaPointsByConnectionIndex:m,remoteConnectionIndices:new Set(t.remoteConnectionIndices),bottomRemoteConnectionIndices:new Set(t.bottomRemoteConnectionIndices),lowerConnectionIndices:[...t.lowerConnectionIndices]}}return null}function r6(t){return t==="left"||t==="right"}function Cue(t){return t==="right"||t==="up"?1:-1}function SC(t,e){return r6(e)?t.x:t.y}function s6(t,e){return r6(e)?t.y:t.x}function Dx(t,e,n){return r6(n)?{x:t,y:e}:{x:e,y:t}}function yue(t){switch(t.direction){case"right":return t.sharedBoundary.maxX;case"left":return t.sharedBoundary.minX;case"up":return t.sharedBoundary.maxY;case"down":return t.sharedBoundary.minY}}function xue(t){if(t.length<3)return t;const e=[t[0]];for(let n=1;n<t.length-1;n++){const o=e.at(-1),i=t[n],r=t[n+1],s={x:Math.sign(i.x-o.x),y:Math.sign(i.y-o.y)},a={x:Math.sign(r.x-i.x),y:Math.sign(r.y-i.y)};(s.x!==a.x||s.y!==a.y)&&e.push(i)}return e.push(t.at(-1)),e}function c$(t,e){const n=[];for(let o=1;o<t.length;o++)tn(t[o-1],t[o])<1e-9||n.push({start:t[o-1],end:t[o],width:e,layer:"top"});return n}function svo(t){const{srj:e,bus:n,connection:o,traceWidth:i,clearance:r}=t,s=n.direction,a=Cue(s),A={x:o.sourcePoint.x,y:o.sourcePoint.y},c=SC(A,s),l=s6(A,s),u=i/2+r,g=(()=>{switch(s){case"right":return n.componentBounds.maxX+u;case"left":return n.componentBounds.minX-u;case"up":return n.componentBounds.maxY+u;case"down":return n.componentBounds.minY-u}})(),h=y=>Math.min(...e.obstacles.filter(x=>x!==o.sourceObstacle&&x.layers.includes("top")).map(x=>Tl(y,x))),d={start:A,end:Dx(g,l,s)};if(h(d)>=u-1e-9)return null;const p=r6(s)?{minimum:n.componentBounds.minY,maximum:n.componentBounds.maxY}:{minimum:n.componentBounds.minX,maximum:n.componentBounds.maxX},m=a*(g-c),_=s6(o.exitTargetPoint??o.targetPoint,s),f=i+r,I=yue(n),C=[-1,1].map(y=>{const x=y<0?p.minimum-u:p.maximum+u,E=y*(x-l),B=Math.max(m,E),S=Dx(c+a*B,l+y*B,s);if(a*(I-SC(S,s))<f-1e-9)return null;const Q=[A,S];if(!Q.every(k=>k.x>=n.sharedBoundary.minX-1e-9&&k.x<=n.sharedBoundary.maxX+1e-9&&k.y>=n.sharedBoundary.minY-1e-9&&k.y<=n.sharedBoundary.maxY+1e-9))return null;const M=Math.min(...c$(Q,i).map(h));return M<u-1e-9?null:{points:Q,obstacleDistance:M,targetDistance:Math.abs(s6(S,s)-_)}}).filter(y=>y!==null).toSorted((y,x)=>x.obstacleDistance-y.obstacleDistance||y.targetDistance-x.targetDistance);return C.length>0?C.map(y=>y.points):null}function avo(t){const{item:e,srj:n,acceptedSegments:o,traceWidth:i,clearance:r}=t,s=e.cornerChannelPrefixes;if(!s)return null;const a=e.direction,A=Cue(a),c=yue(e.bus),l=i+r,u=i/2+r,g=r6(a)?e.bus.sharedBoundary.minY:e.bus.sharedBoundary.minX,h=r6(a)?e.bus.sharedBoundary.maxY:e.bus.sharedBoundary.maxX,d=g+i/2,p=h-i/2,m=s6(e.connection.exitTargetPoint??e.connection.targetPoint,a),_=l/2,f=new Set([Math.max(d,Math.min(p,m))]);for(let C=Math.ceil(d/_)*_;C<=p+1e-9;C+=_)f.add(Number(C.toFixed(9)));const I=[...f].toSorted((C,y)=>Math.abs(C-m)-Math.abs(y-m));for(const C of s){const y=C.at(-1),x=s6(y,a);for(const E of I){const B=Math.abs(E-x),S=Dx(SC(y,a)+A*l,x,a),Q=Dx(SC(S,a)+A*B,E,a);if(A*(c-SC(Q,a))<-1e-9)continue;const w=Dx(c,E,a),M=[...C,S,...B>1e-9?[Q]:[]];tn(M.at(-1),w)>1e-9&&M.push(w);const k=xue(M),R=c$(k,i);if(!(!R.every(U=>n.obstacles.every(Y=>Y===e.connection.sourceObstacle||!Y.layers.includes("top")||Tl(U,Y)>=u-1e-9))||!R.every(U=>o.every(Y=>tu(U.start,U.end,Y.start,Y.end)>=i+r-1e-9))))return{item:e,points:k,track:E}}}return null}function Avo(t){const{route:e,direction:n,exitAxis:o,signedShift:i,maximumShift:r,obstacles:s,requiredObstacleDistance:a}=t;if(r<=1e-9||Math.abs(i)<=1e-9)return 0;const A=Math.sign(i),c=g=>{if(g<=1e-9)return!0;const h={start:Dx(o-Cue(n)*g,e.track,n),end:Dx(o,e.track+A*g,n)};return s.every(d=>d===e.item.connection.sourceObstacle||!d.layers.includes("top")||Tl(h,d)>=a-1e-9)};if(c(r))return r;let l=0,u=r;for(let g=0;g<32;g++){const h=(l+u)/2;c(h)?l=h:u=h}return l}function cvo(t){const{requestedTracks:e,currentTracks:n,candidateTracks:o,maximumShifts:i}=t,r=e.length+1,s=o.length+1,a=Array.from({length:r},()=>new Float64Array(s).fill(Number.POSITIVE_INFINITY)),A=Array.from({length:r},()=>new Uint8Array(s));a[0].fill(0);for(let g=1;g<r;g++)for(let h=1;h<s;h++){const d=a[g][h-1],p=Math.abs(e[g-1]-o[h-1]),_=Math.abs(n[g-1]-o[h-1])>i[g-1]+1e-9?Number.POSITIVE_INFINITY:a[g-1][h-1]+p;_<d?(a[g][h]=_,A[g][h]=1):a[g][h]=d}if(!Number.isFinite(a.at(-1).at(-1)))return null;const c=[];let l=e.length,u=o.length;for(;l>0&&u>0;)A[l][u]&&(c.push(o[u-1]),l--),u--;return l>0?null:c.reverse()}function lvo(t){const{direction:e,activeRoutes:n,obstacles:o,boundaryMinimum:i,boundaryMaximum:r,traceWidth:s,clearance:a,requestedTracks:A,maximumShifts:c}=t,l=s+a,u=s/2+a;let g=null,h=Number.POSITIVE_INFINITY;for(const d of Array.from({length:Math.round(l/s)},(p,m)=>m*s)){const p=[],m=Math.ceil((i-d)/l)*l+d;for(let I=m;I<=r+1e-9;I+=l){const C=Math.round(I/s)*s;o.every(y=>{const x=s6(y.center,e),E=r6(e)?y.height:y.width;return Math.abs(C-x)>=E/2+u-1e-9})&&p.push(C)}const _=cvo({requestedTracks:A,currentTracks:n.map(I=>I.track),candidateTracks:p,maximumShifts:c});if(!_)continue;const f=_.reduce((I,C,y)=>I+Math.abs(C-A[y]),0);f<h&&(h=f,g=_)}return g}function uvo(t,e){switch(e){case"up":return t==="top-left"?"minimum":t==="top-right"?"maximum":null;case"down":return t==="bottom-left"?"minimum":t==="bottom-right"?"maximum":null;case"left":return t==="bottom-left"?"minimum":t==="top-left"?"maximum":null;case"right":return t==="bottom-right"?"minimum":t==="top-right"?"maximum":null}}function gvo(t){const{items:e,direction:n,boundaryMinimum:o,boundaryMaximum:i,traceWidth:r,clearance:s,borderDistribution:a,currentTrackByConnectionName:A}=t,c=E=>A.get(E.connection.connection.name)??s6(E.source,n),l=[...e].toSorted((E,B)=>c(E)-c(B)||E.connection.connection.name.localeCompare(B.connection.connection.name)),u=r+s,g=o+r/2,h=i-r/2,d=h-g,p=u*Math.max(l.length-1,0);if(d<p-1e-9)return null;const m=l.map(c);let _=[...m],f=u;const I=new Set;if(a==="even"&&l.length>1){const E=m[0],B=m.at(-1),S=Math.max(u,(B-E)/(l.length-1)),Q=M=>{const k=[...m],R=Math.floor(l.length/2),F=l.length%2===0?R-1:R;if(F!==R){const O=k[R]-k[F];if(O<M){const U=(M-O)/2;k[F]=k[F]-U,k[R]=k[R]+U}}for(let O=F-1;O>=0;O--)k[O]=Math.min(k[O],k[O+1]-M);for(let O=R+1;O<k.length;O++)k[O]=Math.max(k[O],k[O-1]+M);return k},w=M=>M[0]>=g-1e-9&&M.at(-1)<=h+1e-9;if(_=Q(S),w(_))f=S;else{let M=u,k=S;if(_=Q(M),!w(_))return null;for(let R=0;R<32;R++){const F=(M+k)/2,O=Q(F);w(O)?(M=F,_=O):k=F}f=M}for(const M of l)I.add(M.connection.connection.name)}const C=[],y=[];for(let E=0;E<l.length;E++){const B=l[E],S=B.bus.preferredExit;if(!S?.includes("-"))continue;const Q=uvo(S,n);if(!Q)return null;I.add(B.connection.connection.name),Q==="minimum"?C.push(E):y.push(E)}if(C.some((E,B)=>E!==B)||y.some((E,B)=>E!==l.length-y.length+B))return null;const x=u*2;if(C.length>0){_[0]=g+x;for(let E=1;E<C.length;E++){const B=Math.max(f,m[E]-m[E-1]);_[E]=_[E-1]+B}}if(y.length>0){const E=l.length-1;_[E]=h-x;for(let B=E-1;B>=l.length-y.length;B--){const S=Math.max(f,m[B+1]-m[B]);_[B]=_[B+1]-S}}return{byConnectionName:new Map(l.map((E,B)=>[E.connection.connection.name,_[B]])),enforcedConnectionNames:I}}function dvo(t){const{item:e,points:n,segments:o}=t,i=n.map((s,a)=>({route_type:"wire",x:s.x,y:s.y,width:o[0]?.width??.1,layer:"top",...a===0&&e.connection.sourcePoint.pcb_port_id?{start_pcb_port_id:e.connection.sourcePoint.pcb_port_id}:{}})),r=qN({connectionName:e.connection.connection.name,sourcePointIndex:e.connection.sourcePointIndex});return{busId:e.bus.busId,connectionName:e.connection.connection.name,connectionIndex:e.connection.connectionIndex,sourcePointIndex:e.connection.sourcePointIndex,sourcePoint:e.connection.sourcePoint,sourceObstacle:e.connection.sourceObstacle,sourceLayer:e.connection.sourceLayer,targetPoint:e.connection.targetPoint,targetLayer:"top",termination:e.bus.termination,direction:e.direction,...e.bus.exitEdge?{exitEdge:e.bus.exitEdge}:{},exitPoint:n.at(-1),trace:{type:"pcb_trace",pcb_trace_id:r.traceId,connection_name:e.connection.connection.name,connectsTo:[...e.connection.sourcePoint.pointId?[e.connection.sourcePoint.pointId]:[],...e.connection.sourcePoint.pcb_port_id?[e.connection.sourcePoint.pcb_port_id]:[],r.boundaryExitPointId],route:i},segments:o,length:o.reduce((s,a)=>s+tn(a.start,a.end),0)}}function hvo(t){const{paths:e,obstacles:n,traceWidth:o,clearance:i}=t,r=o/2+i,s=o+i;for(const a of e){if(Math.abs(SC(a.points.at(-1),a.item.direction)-yue(a.item.bus))>1e-6)return!1;for(const A of a.segments)for(const c of n)if(!(c===a.item.connection.sourceObstacle||!c.layers.includes("top"))&&Tl(A,c)<r-1e-9)return!1}for(let a=0;a<e.length;a++)for(let A=a+1;A<e.length;A++)for(const c of e[a].segments)for(const l of e[A].segments)if(tu(c.start,c.end,l.start,l.end)<s-1e-9)return!1;return!0}function pvo(t){const{srj:e,buses:n,traceWidth:o,clearance:i,borderDistribution:r}=t,s=o/2+i,a=new Map,A=new Map,c=n.flatMap(h=>h.connections.map(d=>{const p={x:d.sourcePoint.x,y:d.sourcePoint.y},m=svo({srj:e,bus:h,connection:d,traceWidth:o,clearance:i});return{bus:h,connection:d,direction:h.direction,source:p,...m?{cornerChannelPrefixes:m}:{}}}));for(const h of["left","right","up","down"]){const d=Cue(h),p=c.filter(R=>R.direction===h&&!R.cornerChannelPrefixes);if(p.length===0)continue;const m=r6(h)?p[0].bus.sharedBoundary.minY:p[0].bus.sharedBoundary.minX,_=r6(h)?p[0].bus.sharedBoundary.maxY:p[0].bus.sharedBoundary.maxX,f=yue(p[0].bus),I=new Map,C=new Map,y=new Map;for(const R of p){const F=SC(R.source,h),O=F.toFixed(6);y.set(O,F);const U=I.get(O)??[];U.push(R),I.set(O,U)}for(const[R,F]of I){const O=y.get(R),U=new Set(F.map(Y=>Y.bus.componentId));C.set(R,e.obstacles.filter(Y=>Y.layers.includes("top")&&!!Y.componentId&&U.has(Y.componentId)&&Math.abs(SC(Y.center,h)-O)<1e-6))}const x=[...y.values()].toSorted((R,F)=>d*(R-F)),E=new Map;for(let R=0;R<x.length;R++){const F=x[R],O=F.toFixed(6);for(const J of I.get(O)??[]){const oe=r6(h)?J.connection.sourceObstacle.width:J.connection.sourceObstacle.height,ie=Math.max(J.connection.sourceObstacle.width,J.connection.sourceObstacle.height)<1.5?oe/2+s:0,ne=Dx(F+d*ie,s6(J.source,h),h);E.set(J.connection.connection.name,{item:J,points:tn(J.source,ne)>1e-9?[J.source,ne]:[J.source],track:s6(J.source,h)})}const U=x[R+1]??f;if(E.size===0||d*(U-F)<=1e-9)continue;const Y=[...E.values()].toSorted((J,oe)=>J.track-oe.track||J.item.connection.connection.name.localeCompare(oe.item.connection.connection.name)),W=x.slice(R+1,R+3).flatMap(J=>C.get(J.toFixed(6))??[]),te=Y.map(J=>Math.abs(U-SC(J.points.at(-1),h))),j=lvo({direction:h,activeRoutes:Y,obstacles:W,boundaryMinimum:m,boundaryMaximum:_,traceWidth:o,clearance:i,requestedTracks:Y.map(J=>J.track),maximumShifts:te});if(!j)return null;for(let J=0;J<Y.length;J++){const oe=Y[J],ie=j[J],ne=Math.abs(ie-oe.track),le=SC(oe.points.at(-1),h),ge=Dx(le+d*ne,ie,h);tn(oe.points.at(-1),ge)>1e-9&&oe.points.push(ge);const _e=Dx(U,ie,h);tn(oe.points.at(-1),_e)>1e-9&&oe.points.push(_e),oe.track=ie}}const B=gvo({items:p,direction:h,boundaryMinimum:m,boundaryMaximum:_,traceWidth:o,clearance:i,borderDistribution:r,currentTrackByConnectionName:new Map([...E.values()].map(R=>[R.item.connection.connection.name,R.track]))});if(!B)return null;const S=[...E.values()].toSorted((R,F)=>R.track-F.track||R.item.connection.connection.name.localeCompare(F.item.connection.connection.name)),Q=new Map,w=o+i;let M=w;for(const R of S){const F=R.item.connection.connection.name;!B.enforcedConnectionNames.has(F)||B.byConnectionName.get(F)-R.track>=-1e-9||(Q.set(F,M),M+=w*2)}let k=w;for(let R=S.length-1;R>=0;R--){const F=S[R],O=F.item.connection.connection.name;!B.enforcedConnectionNames.has(O)||B.byConnectionName.get(O)-F.track<=1e-9||(Q.set(O,k),k+=w*2)}for(const R of S){const F=R.item.connection.connection.name,O=B.byConnectionName.get(F)??R.track,U=Q.get(F)??0,Y=R.points.at(-2),W=Y?d*(f-SC(Y,h)):0,te=O-R.track,j=Math.min(Math.abs(te),Math.max(0,W-U)),J=Avo({route:R,direction:h,exitAxis:f,signedShift:te,maximumShift:j,obstacles:e.obstacles,requiredObstacleDistance:s}),oe=Math.sign(te)*J;B.byConnectionName.set(F,R.track+oe)}for(const R of B.enforcedConnectionNames)A.set(R,B.byConnectionName.get(R));for(const R of S){const F=R.item.connection.connection.name,O=B.byConnectionName.get(F)??R.track,U=Math.abs(O-R.track),Y=Q.get(F)??0,W=U>1e-9?Y+U:0,te=f-d*W,j=R.points.at(-1);if(Math.abs(SC(j,h)-f)>1e-6)return null;const J=R.points.at(-2);if(J&&(Math.abs(s6(J,h)-R.track)>1e-6||d*(te-SC(J,h))<-1e-6))return null;const oe=Dx(te,R.track,h);J&&tn(J,oe)<1e-9?R.points.pop():R.points[R.points.length-1]=oe}for(const R of S){const F=R.item.connection.connection.name,O=B.byConnectionName.get(F)??R.track,U=Math.abs(O-R.track),Y=Q.get(F)??0;U>1e-9&&Y>1e-9&&R.points.push(Dx(SC(R.points.at(-1),h)+d*Y,R.track,h)),U>1e-9&&(R.points.push(Dx(SC(R.points.at(-1),h)+d*U,O,h)),R.track=O);const W=Dx(f,R.track,h);if(tn(R.points.at(-1),W)>1e-9){if(d*(f-SC(R.points.at(-1),h))<-1e-6)return null;R.points.push(W)}a.set(F,R)}}const l=[...a.values()].flatMap(h=>c$(xue(h.points),o));for(const h of c){if(!h.cornerChannelPrefixes)continue;const d=avo({item:h,srj:e,acceptedSegments:l,traceWidth:o,clearance:i});if(!d)return null;a.set(h.connection.connection.name,d),l.push(...c$(xue(d.points),o))}if(a.size!==c.length)return null;const u=(o+i)/2+1e-6;for(const[h,d]of A){const p=a.get(h);if(!p||Math.abs(p.track-d)>u)return null}const g=c.map(h=>{const d=a.get(h.connection.connection.name),p=xue(d.points);return{item:h,points:p,segments:c$(p,o)}});return hvo({paths:g,obstacles:e.obstacles,traceWidth:o,clearance:i})?g.map(dvo):null}var mvo=t=>t.process??{env:{}};function _vo(t){const{bus:e}=t;let n=[...t.plans];if(e.maxLengthSkew===void 0)return n;const o=n.filter(i=>i.busId===e.busId).toSorted((i,r)=>r.length-i.length);for(const i of o){const r=Math.min(...n.filter(a=>a.busId===e.busId).map(a=>a.length));if(i.length-r<=e.maxLengthSkew||!i.via||i.additionalVias?.length||i.planeEndpointVia||i.segments.filter(a=>a.layer===i.sourceLayer).length!==1)continue;const s=e.connections.find(a=>a.connectionIndex===i.connectionIndex);for(const a of[!0,!1]){const A=rNt({...t,bus:{...e,connections:[s],routableEscapeLayers:[i.targetLayer]},terminals:[{connection:s,viaPoint:i.via.center,exitPoint:i.exitPoint}],targetLayer:i.targetLayer,acceptedPlans:n.filter(l=>l!==i),allowBlindAndBuriedVias:!1,gridStepDivisor:2,alignGridToPads:a,maximumRouteOrderAttempts:1})?.[0];if(!A||A.length>=i.length-1e-6)continue;const c=n.map(l=>l===i?A:l);if(Wh({...t,plans:c,allowBlindAndBuriedVias:!1})){n=c;break}}}return n}var p0=1e-6;function aI(t,e){return tn(t,e)<=p0}function oRt(t){return"layer"in t?[t.layer]:t.layers}function cR(t){return[...t.segments,...t.planeEndpointSegments??[]]}function lR(t){return[t.via,...t.additionalVias??[],t.planeEndpointVia].filter(e=>!!e)}function iRt(t,e){return aI(t,e)&&oRt(t).join("\0")===oRt(e).join("\0")&&t.pointId===e.pointId&&t.pcb_port_id===e.pcb_port_id}function rRt(t,e){const n=t.x>=e.minX-p0&&t.x<=e.maxX+p0&&t.y>=e.minY-p0&&t.y<=e.maxY+p0,o=Math.abs(t.x-e.minX)<=p0||Math.abs(t.x-e.maxX)<=p0||Math.abs(t.y-e.minY)<=p0||Math.abs(t.y-e.maxY)<=p0;return n&&o}function fvo(t,e,n){if(!(t.x>=n.minX-p0&&t.x<=n.maxX+p0&&t.y>=n.minY-p0&&t.y<=n.maxY+p0))return!1;switch(e){case"left":return Math.abs(t.x-n.minX)<=p0;case"right":return Math.abs(t.x-n.maxX)<=p0;case"top":return Math.abs(t.y-n.maxY)<=p0;case"bottom":return Math.abs(t.y-n.minY)<=p0}}function sRt(t,e){return t.x>=e.minX-p0&&t.x<=e.maxX+p0&&t.y>=e.minY-p0&&t.y<=e.maxY+p0}function Oa(t,e,n,o,i){t.push({code:e,message:n,...o?{connectionName:o.connectionName,busId:o.busId}:{},...i?{otherConnectionName:i}:{}})}function aRt(t){const{trace:e,plan:n,issues:o}=t,i=[];let r,s;for(const a of e.route){if(a.route_type==="via"){(!r||!aI(r,a)||r.layer!==a.from_layer)&&Oa(o,"disconnected-trace",`Trace ${e.pcb_trace_id} reaches a via without a matching ${a.from_layer} wire endpoint`,n),s=a;continue}if(a.route_type!=="wire"){Oa(o,"unsupported-route-point",`Trace ${e.pcb_trace_id} contains unsupported ${a.route_type} geometry`,n);continue}if(s){(!aI(a,s)||a.layer!==s.to_layer)&&Oa(o,"disconnected-trace",`Trace ${e.pcb_trace_id} does not continue from its via on ${s.to_layer}`,n),r=a,s=void 0;continue}r&&(r.layer!==a.layer?Oa(o,"disconnected-trace",`Trace ${e.pcb_trace_id} changes from ${r.layer} to ${a.layer} without a via`,n):aI(r,a)||i.push({start:{x:r.x,y:r.y},end:{x:a.x,y:a.y},width:a.width,layer:a.layer})),r=a}return s&&Oa(o,"disconnected-trace",`Trace ${e.pcb_trace_id} ends at a via without a wire on ${s.to_layer}`,n),i}function Ivo(t){const{plan:e,preparedBus:n,inputSrj:o,outputSrj:i,sharedBoundary:r,issues:s}=t,a=o.connections[e.connectionIndex];if(!a||a.name!==e.connectionName){Oa(s,"connection-mismatch",`Plan index ${e.connectionIndex} does not identify connection ${e.connectionName}`,e);return}const A=n?.connections.find(_=>_.connectionIndex===e.connectionIndex);(!A||A.sourcePointIndex!==e.sourcePointIndex||!iRt(A.sourcePoint,e.sourcePoint)||A.sourceObstacle.obstacleId!==e.sourceObstacle.obstacleId)&&Oa(s,"source-mismatch",`Plan ${e.connectionName} does not start at its prepared component endpoint`,e),n?.termination.type!==e.termination.type&&Oa(s,"termination-mismatch",`Plan ${e.connectionName} does not use its bus termination`,e);const c=Ds(n?.exitEdge,n?.preferredExit);if(n?.exitEdge!==e.exitEdge||c!==e.cornerBandSide?Oa(s,"output-exit-mismatch",`Plan ${e.connectionName} does not retain its prepared boundary edge and band`,e):n?.exitEdge&&!fvo(e.exitPoint,n.exitEdge,r)&&Oa(s,"output-exit-mismatch",`Plan ${e.connectionName} does not terminate on its declared ${n.exitEdge} edge`,e),!(o.allowViaInPad===!0&&e.termination.type==="plane"&&e.via!==void 0&&aI(e.via.center,e.sourcePoint)&&aI(e.exitPoint,e.sourcePoint))&&(e.segments.length===0||e.length<=p0))Oa(s,"not-broken-out",`Plan ${e.connectionName} has no non-zero escape geometry`,e);else{const _={minX:Math.min(o.bounds.minX,r.minX),maxX:Math.max(o.bounds.maxX,r.maxX),minY:Math.min(o.bounds.minY,r.minY),maxY:Math.max(o.bounds.maxY,r.maxY)};e.segments.some(f=>!sRt(f.start,_)||!sRt(f.end,_))&&Oa(s,"outside-routing-bounds",`Plan ${e.connectionName} leaves the routable SRJ/shared-boundary area`,e),e.segments[0]&&!aI(e.segments[0].start,e.sourcePoint)&&Oa(s,"disconnected-trace",`Plan ${e.connectionName} does not start at its source pad`,e),e.segments.at(-1)&&!aI(e.segments.at(-1).end,e.exitPoint)&&Oa(s,"disconnected-trace",`Plan ${e.connectionName} does not end at its declared exit`,e);for(let f=1;f<e.segments.length;f++){const I=e.segments[f-1],C=e.segments[f];aI(I.end,C.start)||Oa(s,"disconnected-trace",`Plan ${e.connectionName} has a gap between route segments`,e);const y=lR(e).find(x=>aI(I.end,x.center)&&x.spanLayers.includes(I.layer)&&x.spanLayers.includes(C.layer));I.layer!==C.layer&&!y&&Oa(s,"disconnected-trace",`Plan ${e.connectionName} changes layers without a connecting via`,e)}}const u=[...e.segments,...e.planeEndpointSegments??[]].reduce((_,f)=>_+tn(f.start,f.end),0);Math.abs(u-e.length)>1e-6&&Oa(s,"plan-length-mismatch",`Plan ${e.connectionName} declares ${e.length.toFixed(6)}mm but contains ${u.toFixed(6)}mm of routed copper`,e);const g=aRt({trace:e.trace,plan:e,issues:s}),h=e.segments.filter(_=>tn(_.start,_.end)>p0);if((g.length!==h.length||g.some((_,f)=>{const I=h[f];return!I||_.layer!==I.layer||Math.abs(_.width-I.width)>p0||!aI(_.start,I.start)||!aI(_.end,I.end)}))&&Oa(s,"trace-plan-mismatch",`Trace ${e.trace.pcb_trace_id} does not encode its declared route segments`,e),e.planeEndpointTrace||e.planeEndpointSegments||e.planeEndpointVia)if(!e.planeEndpointTrace||!e.planeEndpointSegments||!e.planeEndpointVia)Oa(s,"trace-plan-mismatch",`Plane endpoint geometry for ${e.connectionName} is incomplete`,e);else{const _=aRt({trace:e.planeEndpointTrace,plan:e,issues:s});(_.length!==e.planeEndpointSegments.length||_.some((f,I)=>{const C=e.planeEndpointSegments?.[I];return!C||f.layer!==C.layer||Math.abs(f.width-C.width)>p0||!aI(f.start,C.start)||!aI(f.end,C.end)})||tn(e.planeEndpointVia.center,e.targetPoint)<=p0)&&Oa(s,"trace-plan-mismatch",`Trace ${e.planeEndpointTrace.pcb_trace_id} does not encode a valid offset plane-to-endpoint dogbone`,e)}const d=e.trace.route.find(_=>"x"in _&&"y"in _),p=[...e.trace.route].reverse().find(_=>"x"in _&&"y"in _);(!d||!p||!aI(d,e.sourcePoint)||!aI(p,e.exitPoint))&&Oa(s,"disconnected-trace",`Trace ${e.trace.pcb_trace_id} does not span its source and exit`,e);const m=i.connections.find(_=>_.name===e.connectionName);if(e.termination.type==="boundary")if(!m)Oa(s,"output-connection-missing",`Boundary connection ${e.connectionName} was removed from the output`,e);else{const _=m.pointsToConnect[e.sourcePointIndex];(!_||!aI(_,e.exitPoint)||!("layer"in _)||_.layer!==e.targetLayer)&&Oa(s,"output-exit-mismatch",`Output connection ${e.connectionName} is not attached to its fanout exit`,e);for(let f=0;f<a.pointsToConnect.length;f++){if(f===e.sourcePointIndex)continue;const I=a.pointsToConnect[f],C=m.pointsToConnect[f];(!I||!C||!iRt(I,C))&&Oa(s,"downstream-endpoint-lost",`Output connection ${e.connectionName} did not retain downstream endpoint ${f}`,e)}}else m&&Oa(s,"plane-connection-retained",`Plane-terminated connection ${e.connectionName} remains in the output`,e)}function Cvo(t,e){const n=cR(t),o=cR(e),i=lR(t),r=lR(e);for(const s of n){for(const a of o)if(s.layer===a.layer&&tu(s.start,s.end,a.start,a.end)<=(s.width+a.width)/2+p0)return!0;for(const a of r)if(a.spanLayers.includes(s.layer)&&Cr(a.center,s.start,s.end)<=a.diameter/2+s.width/2+p0)return!0}for(const s of i){for(const a of o)if(s.spanLayers.includes(a.layer)&&Cr(s.center,a.start,a.end)<=s.diameter/2+a.width/2+p0)return!0;for(const a of r)if(s.spanLayers.some(A=>a.spanLayers.includes(A))&&tn(s.center,a.center)<=(s.diameter+a.diameter)/2+p0)return!0}return!1}function yvo(t){const{plans:e,inputSrj:n,sharedBoundary:o,issues:i}=t,r=new Set,s=new Map;for(const A of e)s.set(A,[]);for(let A=0;A<e.length;A++){const c=e[A];(c.termination.type==="plane"?c.via:c.segments.some(l=>rRt(l.start,o)||rRt(l.end,o)))&&r.add(c);for(let l=A+1;l<e.length;l++){const u=e[l];!Px(n,c.connectionName,u.connectionName)||!Cvo(c,u)||(s.get(c).push(u),s.get(u).push(c))}}const a=[...r];for(;a.length>0;){const A=a.shift();for(const c of s.get(A)??[])r.has(c)||(r.add(c),a.push(c))}for(const A of e)r.has(A)||Oa(i,"not-broken-out",A.termination.type==="boundary"?`Connection ${A.connectionName} has no continuous same-net copper path to the shared boundary`:`Plane connection ${A.connectionName} has no terminating via`,A);return r}function xvo(t){const{plans:e,inputSrj:n,clearance:o,allowBlindAndBuriedVias:i,issues:r}=t;for(const s of e){r$(s,o).some(A=>A.kind!=="clearance")&&Oa(r,"source-pad-reentry",`Trace ${s.connectionName} returns into its source pad after leaving it`,s);const a=cR(s);for(let A=0;A<a.length;A++){const c=a[A];for(const l of n.obstacles){if(!l.layers.includes(c.layer)||n4(n,l,s.connectionName)||A===0&&l.obstacleId===s.sourceObstacle.obstacleId&&c.layer===s.sourceLayer||jj({inputSrj:n,segment:c,bodyObstacle:l,connectionName:s.connectionName}))continue;const u=Tl(c,l),g=c.width/2+o;u<g-1e-9&&Oa(r,"obstacle-clearance",`Trace ${s.connectionName} on ${c.layer} is ${u.toFixed(4)}mm from different-net obstacle ${l.obstacleId}; ${g.toFixed(4)}mm is required`,s)}}for(const A of lR(s))for(const c of n.obstacles){if(!c.layers.some(g=>A.spanLayers.includes(g))||n4(n,c,s.connectionName))continue;const l=wx(A.center,c),u=A.diameter/2+o;l<u-1e-9&&Oa(r,"via-obstacle-clearance",`Via ${s.connectionName} is ${l.toFixed(4)}mm from different-net obstacle ${c.obstacleId} on its layer span; ${u.toFixed(4)}mm is required`,s)}for(const A of Z7(n,i))if(!(s.connectionName===A.connectionName||Px(n,s.connectionName,A.connectionName))){for(const c of cR(s)){for(const l of A.segments)Zm(c,l,o)||Oa(r,"different-net-trace-clearance",`Trace ${s.connectionName} violates routed trace ${A.trace.pcb_trace_id} on ${c.layer}`,s,A.connectionName);for(const l of A.vias)l.spanLayers.includes(c.layer)&&Cr(l.center,c.start,c.end)<l.diameter/2+c.width/2+o-1e-9&&Oa(r,"different-net-trace-via-clearance",`Trace ${s.connectionName} violates a via in routed trace ${A.trace.pcb_trace_id} on ${c.layer}`,s,A.connectionName)}for(const c of lR(s)){for(const l of A.segments)c.spanLayers.includes(l.layer)&&Cr(c.center,l.start,l.end)<c.diameter/2+l.width/2+o-1e-9&&Oa(r,"different-net-trace-via-clearance",`Via ${s.connectionName} violates routed trace ${A.trace.pcb_trace_id} on ${l.layer}`,s,A.connectionName);for(const l of A.vias)c.spanLayers.some(u=>l.spanLayers.includes(u))&&tn(c.center,l.center)<(c.diameter+l.diameter)/2+o-1e-9&&Oa(r,"different-net-via-clearance",`Via ${s.connectionName} violates a via in routed trace ${A.trace.pcb_trace_id}`,s,A.connectionName)}}}for(let s=0;s<e.length;s++){const a=e[s];for(let A=s+1;A<e.length;A++){const c=e[A];if(Px(n,a.connectionName,c.connectionName))continue;const l=cR(a),u=cR(c),g=lR(a),h=lR(c);for(const d of l){for(const p of u)Zm(d,p,o)||Oa(r,"different-net-trace-clearance",`Different-net traces ${a.connectionName} and ${c.connectionName} intersect or violate clearance on ${d.layer}`,a,c.connectionName);for(const p of h)p.spanLayers.includes(d.layer)&&Cr(p.center,d.start,d.end)<p.diameter/2+d.width/2+o-1e-9&&Oa(r,"different-net-trace-via-clearance",`Trace ${a.connectionName} violates via clearance to ${c.connectionName} on ${d.layer}`,a,c.connectionName)}for(const d of g){for(const p of u)d.spanLayers.includes(p.layer)&&Cr(d.center,p.start,p.end)<d.diameter/2+p.width/2+o-1e-9&&Oa(r,"different-net-trace-via-clearance",`Via ${a.connectionName} violates trace clearance to ${c.connectionName} on ${p.layer}`,a,c.connectionName);for(const p of h)d.spanLayers.some(m=>p.spanLayers.includes(m))&&tn(d.center,p.center)<(d.diameter+p.diameter)/2+o-1e-9&&Oa(r,"different-net-via-clearance",`Vias ${a.connectionName} and ${c.connectionName} violate clearance on an overlapping layer span`,a,c.connectionName)}}}}function Evo(t,e,n){const o=t.differentialPairs;if(o===void 0)return;if(!Array.isArray(o)){Oa(n,"invalid-differential-pair","Differential pairs must be an array");return}const i=new Map;t.connections.forEach((r,s)=>{const a=i.get(r.name)??[];a.push(s),i.set(r.name,a)}),o.forEach((r,s)=>{const a=r,A=a?.connectionNames,c=a?.lengthTolerance;if(!Array.isArray(A)||A.length!==2||A.some(h=>typeof h!="string"||h.length===0)||A[0]===A[1]||typeof c!="number"||!Number.isFinite(c)||c<0){Oa(n,"invalid-differential-pair",`Differential pair ${s} must name two distinct connections and a finite nonnegative length tolerance`);return}const l=[];for(const h of A){const d=i.get(h),p=e.get(h);if(d?.length!==1||p?.length!==1||p[0].connectionIndex!==d[0]){Oa(n,"invalid-differential-pair",`Differential pair ${s} cannot resolve exactly one original plan for connection ${h}`);return}l.push(p[0])}const u=l.map(h=>cR(h).reduce((d,p)=>d+tn(p.start,p.end),0));if(u.some(h=>!Number.isFinite(h))){Oa(n,"invalid-differential-pair",`Differential pair ${s} has nonfinite routed copper length`,l[0],A[1]);return}const g=Math.abs(u[0]-u[1]);g>c+p0&&Oa(n,"differential-pair-length-skew",`Differential pair ${A[0]}/${A[1]} has ${g.toFixed(6)}mm routed-length skew; ${c.toFixed(6)}mm is allowed`,l[0],A[1])})}function Bvo(t){const{inputSrj:e,outputSrj:n,plans:o,preparedBuses:i,sharedBoundary:r,clearance:s,allowBlindAndBuriedVias:a=!0}=t,A=[],c=new Map,l=new Map(i.map(g=>[g.busId,g]));for(const g of o){const h=c.get(g.connectionName)??[];h.push(g),c.set(g.connectionName,h)}Evo(e,c,A);for(const g of i){if(g.maxLengthSkew===void 0)continue;const h=o.filter(m=>m.busId===g.busId);if(h.length<2)continue;const d=h.map(m=>m.length),p=Math.max(...d)-Math.min(...d);p>g.maxLengthSkew+1e-6&&Oa(A,"bus-length-skew",`Bus ${g.busId} has ${p.toFixed(6)}mm routed-length skew; ${g.maxLengthSkew.toFixed(6)}mm is allowed`,h[0])}for(const g of e.connections){const h=c.get(g.name)??[];h.length===0?Oa(A,"missing-plan",`Connection ${g.name} has no fanout plan`):h.length>1&&Oa(A,"duplicate-plan",`Connection ${g.name} has ${h.length} fanout plans`,h[0])}for(const g of o){if(!e.connections.some(h=>h.name===g.connectionName)){Oa(A,"unknown-plan",`Plan ${g.connectionName} is not an input connection`,g);continue}Ivo({plan:g,preparedBus:l.get(g.busId),inputSrj:e,outputSrj:n,sharedBoundary:r,issues:A})}const u=yvo({plans:o,inputSrj:e,sharedBoundary:r,issues:A});return xvo({plans:o,inputSrj:e,clearance:s,allowBlindAndBuriedVias:a,issues:A}),{valid:A.length===0,checkedConnectionCount:e.connections.length,brokenOutConnectionCount:new Set([...u].map(g=>g.connectionName)).size,issues:A}}var ARt=["#ef4444","#2563eb","#16a34a","#9333ea","#f59e0b","#0891b2","#db2777","#65a30d","#4f46e5","#ea580c"];function bvo(t){if(!Number.isInteger(t)||t<0)throw new Error(`FanoutSolver: copper layer index must be a non-negative integer, received ${t}`);return ARt[t%ARt.length]}var Svo=new Set(["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6","inner7","inner8"]),Qvo={"0603":{padLength:.8,padWidth:.95},1206:{padLength:.6,padWidth:1.6},"1206x4_pair":{padLength:.8,padWidth:.5}},l$=(t,e)=>{const n=t.indexOf(e);if(n<0)throw new Error(`FanoutSolver: cannot visualize unknown copper layer "${e}"`);return n},u$=(t,e)=>`z${[...new Set(e.map(o=>l$(t,o)))].sort((o,i)=>o-i).join(",")}`,vvo=t=>{const e="layers"in t?t.layers:void 0;return e&&e.length>0?e:[t.layer]},wvo=(t,e)=>t.__zLayers&&t.__zLayers.length>0?[...new Set(t.__zLayers)].filter(n=>Number.isInteger(n)&&n>=0&&n<e.length).sort((n,o)=>n-o):[...new Set(t.layers.map(n=>l$(e,n)))].sort((n,o)=>n-o),Pvo=(t,e,n)=>{const o=l$(t,e),i=l$(t,n);return t.slice(Math.min(o,i),Math.max(o,i)+1)},cRt=(...t)=>t.find(e=>typeof e=="number"&&Number.isFinite(e)),Mvo=t=>{const e=cRt(t.min_via_hole_diameter,t.minViaHoleDiameter),n=cRt(t.min_via_pad_diameter,t.minViaPadDiameter,t.minViaDiameter);return Math.max(n??t.minViaDiameter??.3,e??0)},Dvo=t=>Object.fromEntries(t.map((e,n)=>[e.name,`hsl(${n*340/t.length}, 100%, 50%)`])),Nvo=(t,e,n)=>{const o=(1-Math.abs(2*n-1))*e,i=(t%360+360)%360/60,r=o*(1-Math.abs(i%2-1)),[s,a,A]=i<1?[o,r,0]:i<2?[r,o,0]:i<3?[0,o,r]:i<4?[0,r,o]:i<5?[r,0,o]:[o,0,r],c=n-o/2;return[s,a,A].map(l=>Math.round((l+c)*255))},tMe=(t,e)=>{let o={blue:[0,0,255],orange:[255,165,0],purple:[128,0,128],red:[255,0,0]}[t],i=1;const r=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)(?:\s*,\s*([\d.]+))?\s*\)$/.exec(t);r&&(o=[Number(r[1]),Number(r[2]),Number(r[3])],i=r[4]===void 0?1:Number(r[4]));const s=/^hsl\(\s*([\d.-]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*\)$/.exec(t);if(s&&(o=Nvo(Number(s[1]),Number(s[2])/100,Number(s[3])/100)),!o)return t;const a=+Math.max(0,i*100-e*100).toFixed(2)/100;if(a>=1){const A=o.map(c=>Math.round(c).toString(16).padStart(2,"0")).join("");return A[0]===A[1]&&A[2]===A[3]&&A[4]===A[5]?`#${A[0]}${A[2]}${A[4]}`:`#${A}`}return`rgba(${o.join(",")},${a})`},Rvo=t=>{const e=new Set;return t.filter(n=>e.has(n)?!1:(e.add(n),!0))},Tvo=t=>{const e=new Map,n=(o,i)=>{if(!o)return;const r=e.get(o)??[];r.includes(i)||r.push(i),e.set(o,r)};for(const o of t.connections){const i=o.__rootConnectionNames??[o.name];for(const r of i){n(o.name,r),n(r,r),n(o.__netConnectionName,r);for(const s of o.pointsToConnect)n(s.pointId,r),n(s.pcb_port_id,r)}}return o=>{const r=Rvo([...o.connectedTo.flatMap(s=>e.get(s)??[]),...(o.offBoardConnectsTo??[]).flatMap(s=>e.get(s)??[])]).join(", ");return o.layers.map(s=>r?`${s}
${r}`:s).join(`
`)}};function kvo(t){const e=Rb(t.layerCount),n=(t.traces??[]).some(g=>g.route.some((h,d)=>{const p=g.route[d+1];return h.route_type==="wire"&&p?.route_type==="wire"&&p.layer===h.layer&&!Svo.has(h.layer)})),o=new Set(t.connections.map(({name:g})=>g)),i=n?[...new Set((t.traces??[]).map(({connection_name:g})=>g).filter(g=>g&&!o.has(g)))].map(g=>({name:g,pointsToConnect:[]})):[],r=[...t.connections,...i],s=Dvo(r),a=Tvo({...t,connections:r}),A=[],c=[],l=[],u=[];for(const g of r)for(const h of g.pointsToConnect){const d=vvo(h),p=g.__rootConnectionNames??[g.name];u.push({x:h.x,y:h.y,color:s[g.name],layer:u$(e,d),label:[g.name,p.join(", "),d.join(",")].join(`
`)})}for(const g of t.traces??[]){const h=g.route.filter(p=>p.route_type==="jumper"),d=(p,m)=>h.some(_=>Math.abs(p.x-_.start.x)<.01&&Math.abs(p.y-_.start.y)<.01&&Math.abs(m.x-_.end.x)<.01&&Math.abs(m.y-_.end.y)<.01||Math.abs(p.x-_.end.x)<.01&&Math.abs(p.y-_.end.y)<.01&&Math.abs(m.x-_.start.x)<.01&&Math.abs(m.y-_.start.y)<.01);for(const p of g.route)if(p.route_type==="via"){const m=Pvo(e,p.from_layer,p.to_layer);c.push({center:{x:p.x,y:p.y},radius:(p.via_diameter??Mvo(t))/2,fill:n?s[g.connection_name]:"blue",stroke:"none",layer:u$(e,m)})}else p.route_type==="through_obstacle"&&A.push({points:[p.start,p.end],strokeColor:tMe(s[g.connection_name]??"purple",.35),strokeWidth:p.width,strokeDash:[.1,.1],layer:u$(e,[p.from_layer,p.to_layer]),label:`${g.connection_name} through_obstacle`});for(let p=0;p<g.route.length-1;p++){const m=g.route[p],_=g.route[p+1];if(m.route_type==="jumper"){const f=s[g.connection_name]??"rgba(255, 165, 0, 0.8)",I=Qvo[m.footprint==="1206x4_pair"?"1206x4_pair":"0603"],C=Math.abs(m.end.x-m.start.x)>Math.abs(m.end.y-m.start.y),y=C?I.padLength:I.padWidth,x=C?I.padWidth:I.padLength,E=u$(e,[m.layer]);for(const B of[m.start,m.end])l.push({center:B,width:y,height:x,fill:tMe(f,.5),stroke:"rgba(0, 0, 0, 0.5)",layer:E});A.push({points:[m.start,m.end],strokeColor:"rgba(100, 100, 100, 0.8)",strokeWidth:I.padWidth*.3,layer:E})}else if(m.route_type==="wire"&&_.route_type==="wire"&&_.layer===m.layer&&!d(m,_)){const f=l$(e,m.layer);A.push({points:[{x:m.x,y:m.y},{x:_.x,y:_.y}],layer:`z${f}`,strokeWidth:m.width,strokeColor:bvo(f),...n?{label:g.connection_name}:{}})}}}for(const g of t.obstacles){if(g.isCopperPour)continue;const h=wvo(g,e);if(h.length===0)throw new Error(`FanoutSolver: cannot visualize obstacle "${g.obstacleId??"unknown"}" without a valid layer`);const d=h.length===1?e[h[0]]:void 0,p=tMe(d==="bottom"?"blue":"red",.5**h.length),m=g.shape,_={center:g.center,fill:p,layer:`z${h.join(",")}`,label:a(g)};m==="circle"?c.push({..._,radius:Math.min(g.width,g.height)/2}):l.push({..._,width:g.width,height:g.height,ccwRotationDegrees:g.ccwRotationDegrees})}for(const g of t.jumpers??[])for(const h of g.pads)l.push({center:h.center,width:h.width,height:h.height,ccwRotationDegrees:h.ccwRotationDegrees,fill:"rgba(255, 165, 0, 0.3)",stroke:"rgba(255, 165, 0, 0.8)",layer:u$(e,h.layers)});return{rects:l,circles:c,lines:A,points:u}}var FA=mvo(globalThis),Fvo=class extends fC{constructor(t,e,n,o,i){super(),this.solverName=t,this.generator=e,this.getVisualization=n,this.getStats=o,this.getProgress=i,this.MAX_ITERATIONS=1e6}solverName;generator;getVisualization;getStats;getProgress;output;hasOutput=!1;nextInput;getSolverName(){return this.solverName}_step(){if(this.activeSubSolver){if(this.activeSubSolver.step(),this.activeSubSolver.failed){this.failedSubSolvers=[...this.failedSubSolvers??[],this.activeSubSolver],this.error=this.activeSubSolver.error,this.failed=!0,this.activeSubSolver=null;return}this.activeSubSolver.solved&&(this.nextInput=this.activeSubSolver.getOutput(),this.activeSubSolver=null),this.stats=this.getStats();return}const t=this.generator.next(this.nextInput);if(this.nextInput=void 0,this.stats=this.getStats(),t.done){this.output=t.value,this.hasOutput=!0,this.solved=!0;return}i$(t.value)&&(this.activeSubSolver=t.value.solver)}computeProgress(){return this.getProgress()}getConstructorParams(){return[]}getOutput(){if(!this.solved||!this.hasOutput)throw new Error(`${this.solverName}: output requested before completion`);return this.output}visualize(){return this.activeSubSolver?.visualize()??this.getVisualization()}};function g$(t,e){if(!Number.isFinite(e)||e<=0)throw new Error(`FanoutSolver: ${t} must be a positive number, received ${e}`);return e}function Lvo(t,e){const n=g$("traceWidth",e.traceWidth??t.nominalTraceWidth??t.minTraceWidth),o=g$("viaDiameter",e.viaDiameter??t.minViaPadDiameter??t.min_via_pad_diameter??t.minViaDiameter??Math.max(n*2,.3)),i=g$("viaHoleDiameter",e.viaHoleDiameter??t.minViaHoleDiameter??t.min_via_hole_diameter??o*.5);if(i>=o)throw new Error(`FanoutSolver: viaHoleDiameter ${i} must be smaller than viaDiameter ${o}`);const r=g$("clearance",e.clearance??t.minViaEdgeToPadEdgeClearance??t.minTraceToPadEdgeClearance??t.defaultObstacleMargin??t.minTraceWidth),s=Rb(t.layerCount),a=e.escapeLayers??s;for(const c of a)if(!s.includes(c))throw new Error(`FanoutSolver: escape layer "${c}" is not available in a ${t.layerCount}-layer SimpleRouteJson`);if(new Set(a).size!==a.length)throw new Error("FanoutSolver: escapeLayers contains duplicates");const A=e.borderDistribution??"preserve";if(A!=="preserve"&&A!=="even")throw new Error(`FanoutSolver: borderDistribution must be "preserve" or "even", received "${A}"`);return{traceWidth:n,viaDiameter:o,viaHoleDiameter:i,clearance:r,compactBusTracks:e.compactBusTracks??!1,allowBlindAndBuriedVias:e.allowBlindAndBuriedVias??!0,allowSameNetMerges:e.allowSameNetMerges??!1,densePlaneReservationBusIds:e.densePlaneReservationBusIds??[],denseUnrestrictedPlaneRoutingBusIds:e.denseUnrestrictedPlaneRoutingBusIds??[],singleLayerPushAndShove:e.singleLayerPushAndShove??!1,singleLayerAdaptiveExits:e.singleLayerAdaptiveExits??!1,borderDistribution:A,layerNames:s,escapeLayers:a,maxLayerCombinations:e.maxLayerCombinations===void 0?256:g$("maxLayerCombinations",e.maxLayerCombinations),balanceLayerLoadByConnectionCount:e.balanceLayerLoadByConnectionCount??!1}}function Hvo(t,e){const n=new Set,o=Math.max(e.traceWidth+e.clearance,e.viaDiameter+e.clearance),i=Math.max(e.viaDiameter/2+e.clearance,o);for(const r of t){const s=Ds(r.exitEdge,r.preferredExit);if(!r.exitEdge||!s)continue;const a=`${r.exitEdge}:${s}`;if(n.has(a))continue;n.add(a);const A=r.exitEdge==="left"||r.exitEdge==="right"?r.sharedBoundary.maxY-r.sharedBoundary.minY:r.sharedBoundary.maxX-r.sharedBoundary.minX,c=r.cornerBandConnectionCount??r.connections.length,l=(c-1)*o/2,u=A/4-i;if(l>u+1e-6)throw new Error(`FanoutSolver: ${s} band on the ${r.exitEdge} edge cannot fit ${c} via-safe exits`)}}function Eue(t,e,n){const o=new Map(e.map(r=>[r.busId,r.connections.length])),i=new Map;for(const[r,s]of Object.entries(t))i.set(s,(i.get(s)??0)+(n?o.get(r)??1:1));return[...i.values()].reduce((r,s)=>r+s*s,0)}function Bue(t){return t.balanceLayerLoadByConnectionCount?.25:.01}function lRt(t,e,n){const o=+(t.termination.type==="plane")-+(e.termination.type==="plane");return n?-o:o}function bue(t){return t.reduce((e,n)=>e+ +!!n.via+(n.additionalVias?.length??0)+ +!!n.planeEndpointVia,0)}function wO(t){const e=t.connections.reduce((n,o)=>{const i=t.direction==="left"||t.direction==="right"?o.sourcePoint.x:o.sourcePoint.y;return n+i},0)/t.connections.length;switch(t.direction){case"right":return t.sharedBoundary.maxX-e;case"left":return e-t.sharedBoundary.minX;case"up":return t.sharedBoundary.maxY-e;case"down":return e-t.sharedBoundary.minY}}function nMe(t){const e=t.direction==="left"||t.direction==="right";return t.connections.some(n=>{const o=n.exitTargetPoint??n.targetPoint,i=e?n.sourcePoint.y:n.sourcePoint.x,r=e?o.y:o.x;return Math.abs(i-r)>1e-6})}function PO(t){if(t.connections.length===0||t.connections.some(o=>!o.hasExplicitLayeredExitTarget||!o.exitTargetPoint?.layer))return;const e=new Set(t.connections.map(o=>o.exitTargetPoint.layer));if(e.size!==1)return;const[n]=e;return n}function Ovo(t){const e=t.direction==="left"||t.direction==="right",n=e?t.xCoordinates:t.yCoordinates,o=t.connections.reduce((r,s)=>r+(e?s.sourcePoint.x:s.sourcePoint.y),0)/t.connections.length,i=t.direction==="right"||t.direction==="up"?Math.max(...n):Math.min(...n);return Math.abs(o-i)<1e-6}function oMe(t){const e=t.direction==="left"||t.direction==="right",n=e?t.xCoordinates:t.yCoordinates,o=t.connections.reduce((s,a)=>s+(e?a.sourcePoint.x:a.sourcePoint.y),0)/t.connections.length,i=t.direction==="right"||t.direction==="up"?Math.max(...n):Math.min(...n),r=e?t.pitchX:t.pitchY;return Math.round(Math.abs(o-i)/r)}function Gvo(t){const{buses:e,escapeLayers:n,escapeLayersByBusId:o,preferOrderedCoordinatedWindingLayers:i}=t,r={},s=new Map;let a=0;for(const A of e){const c=s.get(A.componentId)??new Set;c.add(A.direction),s.set(A.componentId,c)}for(const A of e){const c=A.connections[0]?.sourceLayer;if(!c)throw new Error(`FanoutSolver: bus "${A.busId}" has no connections`);if(A.termination.type==="plane"){r[A.busId]=A.termination.layer;continue}const l=o[A.busId]??n,u=l.filter(h=>h!==c),g=PO(A);if(g&&l.includes(g))r[A.busId]=g;else if(!a6(A)&&l.includes(c)&&(nMe(A)||Ovo(A)))r[A.busId]=c;else if(u.length>0){const h=A.connections.map(I=>I.sourcePoint.x),d=A.connections.map(I=>I.sourcePoint.y),p=I=>e.filter(C=>{const y=C.connections[0]?.sourcePoint;return C.termination.type==="boundary"&&y!==void 0&&y.x>Math.min(...h)+1e-9&&y.x<Math.max(...h)-1e-9&&y.y>Math.min(...d)+1e-9&&y.y<Math.max(...d)-1e-9&&PO(C)===I&&uRt({singletonBus:C,singletonTargetLayer:I,wideBuses:[A]})}).length,m=u.toSorted((I,C)=>p(I)-p(C));if(p(m[0])<p(u[0])){r[A.busId]=m[0];continue}if(i&&a6(A)){const I=Ds(A.exitEdge,A.preferredExit),C=y=>{if(!A.exitEdge||A.connections.length<8)return 0;const x=A.exitEdge==="left"||A.exitEdge==="right",E=x?"y":"x",B=x?A.sharedBoundary.minY:A.sharedBoundary.minX,S=x?A.sharedBoundary.maxY:A.sharedBoundary.maxX;if(!I){const k=A.connections.map(j=>{const J=j.exitTargetPoint??j.targetPoint;return Math.max(B,Math.min(S,J[E]))}),R=Math.min(...k),F=Math.max(...k),O=x?"x":"y",U=A.exitEdge==="right"||A.exitEdge==="top"?1:-1,Y=Math.min(...A.connections.map(j=>U*j.sourcePoint[O])),W=Math.min(...A.connections.map(j=>j.sourcePoint[E])),te=Math.max(...A.connections.map(j=>j.sourcePoint[E]));return e.reduce((j,J)=>{const oe=Ds(J.exitEdge,J.preferredExit);if(J===A||J.termination.type!=="boundary"||J.componentId!==A.componentId||J.exitEdge!==A.exitEdge||!oe||PO(J)!==y)return j;const ie=B+(S-B)*(oe==="minimum"?.25:.75),ne=(Math.max(J.connections.length,J.cornerBandConnectionCount??0)-1)*Math.max(t.traceWidth+t.clearance,t.viaDiameter+t.clearance)/2,le=t.traceWidth+t.clearance,ge=F+le>=ie-ne&&R-le<=ie+ne,_e=Math.max(...J.connections.map(ue=>U*ue.sourcePoint[O]))<Y-1e-9&&Math.min(...J.connections.map(ue=>ue.sourcePoint[E]))<=te+le&&Math.max(...J.connections.map(ue=>ue.sourcePoint[E]))>=W-le;return j+(ge||_e?J.connections.length:0)},0)}const Q=B+(S-B)*(I==="minimum"?.25:.75),w=Math.max(t.traceWidth+t.clearance,t.viaDiameter+t.clearance),M=(Math.max(A.connections.length,A.cornerBandConnectionCount??0)-1)*w/2;return e.reduce((k,R)=>R===A||R.termination.type!=="boundary"||R.componentId!==A.componentId||R.exitEdge!==A.exitEdge||Ds(R.exitEdge,R.preferredExit)||PO(R)!==y?k:k+R.connections.filter(F=>{const O=F.exitTargetPoint??F.targetPoint,U=Math.max(B,Math.min(S,O[E]));return Math.abs(U-Q)<=M+t.traceWidth+t.clearance}).length,0)};r[A.busId]=u.toSorted((y,x)=>C(y)-C(x))[0];continue}const _=s.get(A.componentId);if(_.has("left")&&_.has("right")||_.has("up")&&_.has("down")){const I=oMe(A);r[A.busId]=u[Math.max(I-1,0)%u.length]}else r[A.busId]=u[a%u.length],a++}else r[A.busId]=c}return r}function Yvo(t){const{initialAssignment:e,generatedAssignments:n,maxAssignments:o}=t,i=JSON.stringify(e);return[e,...n.filter(r=>JSON.stringify(r)!==i)].slice(0,o)}function a6(t){return!!(t.exitEdge&&t.termination.type==="boundary"&&t.connections.length>0&&t.connections.every(e=>e.hasExplicitLayeredExitTarget===!0))}function iMe(t){const e=t.length,n=t.filter(o=>o===1).length;return(e===5||e===6||e===7)&&n===1||e===8&&(n===1||n===2)||e===9&&n>=1&&n<=3}function Uvo(t){if(!iMe(t))return 0;const e=t.filter(n=>n===1).length;return Math.max(1,e-1)}function uRt(t){const e=t.singletonBus.connections[0]?.sourcePoint;return t.singletonBus.connections.length!==1||!e?!1:t.wideBuses.some(n=>{const o=n.routableEscapeLayers??n.allowedLayers??[];if(n.connections.length<8||n.componentId!==t.singletonBus.componentId||n.exitEdge!==t.singletonBus.exitEdge||o.length<2||!o.includes(t.singletonTargetLayer))return!1;const i=n.connections.map(s=>s.sourcePoint.x),r=n.connections.map(s=>s.sourcePoint.y);return e.x>=Math.min(...i)-1e-9&&e.x<=Math.max(...i)+1e-9&&e.y>=Math.min(...r)-1e-9&&e.y<=Math.max(...r)+1e-9})}function Kvo(t){const e=Math.max(t.traceWidth+t.clearance,t.viaDiameter+t.clearance);return-t.leadingLaneCount*e/2}function Vvo(t){return t.boundaryBusCount===5||t.boundaryBusCount>9?!1:t.boundaryBusCount===6||t.boundaryBusCount===7||t.boundaryBusCount===8||t.boundaryBusCount===9?t.connectionCount>2&&t.rawSkew-t.maximumSkew>Math.max(1,t.maximumSkew*.5):t.rawSkew-t.maximumSkew>Math.max(1,t.maximumSkew*.25)}function d$(t){const e=t.connections[0],n=e?.exitTargetPoint;let o=0;if(e&&n){const i=n.x-e.sourcePoint.x,r=n.y-e.sourcePoint.y;o=t.direction==="right"?i:t.direction==="left"?-i:t.direction==="up"?r:-r}return{isCorner:!!Ds(t.exitEdge,t.preferredExit),targetProjection:o}}function zvo(t,e){const n=d$(t),o=d$(e);return Number(n.isCorner)-Number(o.isCorner)||(n.isCorner&&o.isCorner?n.targetProjection-o.targetProjection:0)||t.busId.localeCompare(e.busId)}function Jvo(t,e){const n=d$(t),o=d$(e);return Number(n.isCorner)-Number(o.isCorner)||(n.isCorner&&o.isCorner?+(n.targetProjection>0)-+(o.targetProjection>0):0)||t.busId.localeCompare(e.busId)}function Wvo(t){const{pairBuses:e}=t,n=e[0],o=n?.connections[0]?.sourceLayer;if(t.boundaryBusCount!==7&&t.boundaryBusCount!==8&&t.boundaryBusCount!==9||e.length!==3||n===void 0||n.exitEdge===void 0||n.assignedLayer===void 0||o===void 0||e.some(r=>r.connections.length!==2||r.componentId!==n.componentId||r.exitEdge!==n.exitEdge||r.assignedLayer!==n.assignedLayer||r.connections.some(s=>{const a=s.exitTargetPoint;return s.sourceLayer!==o||a?.layer!==n.assignedLayer||!Number.isFinite(s.sourcePoint.x)||!Number.isFinite(s.sourcePoint.y)||!Number.isFinite(a?.x)||!Number.isFinite(a?.y)})))return null;const i=r=>Math.max(...r.connections.map(s=>{const a=s.exitTargetPoint;return Math.hypot(a.x-s.sourcePoint.x,a.y-s.sourcePoint.y)}));return e.map(r=>Number(i(r).toFixed(9)))}function jvo(t){const{bus:e,srj:n,config:o,staticClearanceCache:i}=t,r=e.allowedLayers,s=r===void 0?o.escapeLayers:o.escapeLayers.filter(c=>r.includes(c));if(a6(e))return s;const a=s.filter(c=>nR({srj:n,bus:e,targetLayer:c,acceptedPlans:[],layerNames:o.layerNames,traceWidth:o.traceWidth,viaDiameter:o.viaDiameter,viaHoleDiameter:o.viaHoleDiameter,clearance:o.clearance,compactBusTracks:o.compactBusTracks,allowBlindAndBuriedVias:o.allowBlindAndBuriedVias,allowSameNetMerges:o.allowSameNetMerges,staticClearanceCache:i})!==null);return a.length>0?a:s}var Sue=class extends fC{constructor(t,e={}){super(),this.inputSrj=t,this.options=e,this.routingSrj={...t,obstacles:[...t.obstacles]},this.config=Lvo(t,e),this.preparedBuses=IQo(this.routingSrj,e),Hvo(this.preparedBuses,this.config);for(const i of this.preparedBuses){for(const s of i.connections){if(!s.hasExplicitLayeredExitTarget)continue;const a=s.exitTargetPoint?.layer;if(typeof a!="string"||a.length===0||!this.config.layerNames.includes(a))throw new Error(`FanoutSolver: connection exit target for "${s.connection.name}" uses unavailable layer "${String(a)}"`)}for(const s of i.allowedLayers??[])if(!this.config.layerNames.includes(s))throw new Error(`FanoutSolver: bus "${i.busId}" allows unavailable layer "${s}"`);if(i.termination.type==="boundary"&&i.allowedLayers!==void 0&&!i.allowedLayers.some(s=>this.config.escapeLayers.includes(s)))throw new Error(`FanoutSolver: bus "${i.busId}" has no allowed layer in escapeLayers`);if(i.routableEscapeLayers=this.config.escapeLayers.filter(s=>i.allowedLayers?.includes(s)??!0),i.termination.type!=="plane")continue;const r=i.termination.layer;if(!this.config.layerNames.includes(r))throw new Error(`FanoutSolver: plane-terminated bus "${i.busId}" targets unavailable layer "${r}"`);if(i.allowedLayers!==void 0&&!i.allowedLayers.includes(r))throw new Error(`FanoutSolver: plane-terminated bus "${i.busId}" targets disallowed layer "${r}"`);if(i.connections.some(s=>s.sourceLayer===r))throw new Error(`FanoutSolver: plane-terminated bus "${i.busId}" must target a layer below its source pad`)}this.boundaryBuses=this.preparedBuses.filter(i=>i.termination.type==="boundary"),this.fixedPlaneAssignments=Object.fromEntries(this.preparedBuses.flatMap(i=>i.termination.type==="plane"?[[i.busId,i.termination.layer]]:[]));const n=this.preparedBuses.length*3+8,o=this.boundaryBuses.length+1+this.config.maxLayerCombinations*n+this.preparedBuses.length*2+20;this.MAX_ITERATIONS=Math.max(1e4,o)}inputSrj;options;preparedBuses;attempts=[];layerAssignments=[];config;routingSrj;escapeLayersByBusId={};boundaryBuses;fixedPlaneAssignments;evaluatedAssignmentKeys=new Set;queuedAssignmentKeys=new Set;assignmentRepairDepthByKey=new Map;pendingRepairAssignments=[];routeStaticClearanceCache=new Map;routingPrefixCache=new Map;layerReservedRoutingEvaluated=!1;groupedBeamEvaluated=!1;routingInitialized=!1;nextCandidateLayerBusIndex=0;nextAssignmentIndex=0;nextGeneratedAssignmentIndex=0;activeOperation=null;inProgressPlans=[];activeRoutingVisualization=null;activeAdaptiveVisualization=null;bestAttempt=null;lengthMatchingFailure=null;endpointCompletion=null;getSolverName(){return"FanoutSolver"}shouldTryLayerReservedRouting(){if(this.config.allowBlindAndBuriedVias||this.boundaryBuses.length<4||(this.config.compactBusTracks||this.config.borderDistribution==="even")&&this.boundaryBuses.some(r=>r.connections.length>1&&r.connections.some(s=>!s.hasExplicitLayeredExitTarget)))return!1;const t=this.preparedBuses[0],e=this.boundaryBuses.reduce((r,s)=>r+s.connections.length,0);if(this.inputSrj.connections.length-e<e||this.preparedBuses.some(r=>r.componentId!==t.componentId||r.connections.some(s=>s.sourceLayer!=="top"))||this.boundaryBuses.some(r=>!r.exitEdge||r.exitEdge!==this.boundaryBuses[0].exitEdge||r.connections.length>8||!r.allowedLayers?.length||r.allowedLayers.some(s=>!this.config.escapeLayers.includes(s))))return!1;const o=new Map;let i=!1;for(const r of this.boundaryBuses){const s=r.allowedLayers.filter(a=>a!=="top");if(!s.length)return!1;if(s.length>1&&(i=!0),s.length===1&&r.connections.length>2){const a=s[0];o.set(a,(o.get(a)??0)+1)}}return i&&[...o.values()].some(r=>r>1)}*evaluateLayerReservedRoutingSteps(t=!1,e=!1){const n={...this.config,sourceOriginRouting:t,srj:this.routingSrj,buses:this.preparedBuses},o=e?TSo(n):tvo(n);let i=o.next();for(;!i.done;){if(i$(i.value)){this.stats={...this.stats,phase:"layer-reserved-route-layer",workUnit:i.value.routedConnectionCount,workUnitCount:this.inputSrj.connections.length,routedConnections:`${i.value.routedConnectionCount}/${this.inputSrj.connections.length}`,routingIterations:i.value.iterations};const c=yield i.value;i=o.next(c);continue}this.stats={...this.stats,phase:`layer-reserved-${i.value.phase}`,targetLayer:i.value.layer,workUnit:i.value.routedConnectionCount,workUnitCount:this.inputSrj.connections.length,routedConnections:`${i.value.routedConnectionCount}/${this.inputSrj.connections.length}`,routingIterations:i.value.iterations},yield,i=o.next()}if(!i.value||i.value.length!==this.inputSrj.connections.length)return null;const r=this.normalizeCompletePlanCorners(i.value);if(!r)return null;const s=aR({inputSrj:this.inputSrj,plans:r,layerNames:this.config.layerNames});if(!this.validateCompletePlans(r,s).valid)return null;const a=Object.fromEntries(r.map(c=>[c.busId,c.targetLayer])),A=r.reduce((c,l)=>c+l.length,0)+bue(r)*.1+Eue(a,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config);return this.inProgressPlans=[...r],{plans:r,outputSrj:s,stopAfterCompleteValidation:!0,blockingBusIds:[],summary:{assignmentIndex:0,busLayerAssignments:a,routedBusCount:this.preparedBuses.length,routedConnectionCount:r.length,failedBusIds:[],score:A}}}stepRoutingInitialization(){const t=this.boundaryBuses[this.nextCandidateLayerBusIndex];if(t){this.escapeLayersByBusId[t.busId]=jvo({bus:t,srj:this.routingSrj,config:this.config,staticClearanceCache:this.routeStaticClearanceCache}),this.nextCandidateLayerBusIndex++,this.stats={phase:"discover-candidate-layers",bus:t.busId,busIndex:this.nextCandidateLayerBusIndex,busCount:this.boundaryBuses.length};return}const e=W8o({busIds:this.boundaryBuses.map(n=>n.busId),layers:this.config.escapeLayers,layersByBusId:this.escapeLayersByBusId,maxAssignments:this.config.maxLayerCombinations}).map(n=>({...n,...this.fixedPlaneAssignments}));this.layerAssignments.push(...Yvo({initialAssignment:Gvo({buses:this.preparedBuses,escapeLayers:this.config.escapeLayers,escapeLayersByBusId:this.escapeLayersByBusId,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,clearance:this.config.clearance,preferOrderedCoordinatedWindingLayers:this.config.densePlaneReservationBusIds.length>0||this.config.denseUnrestrictedPlaneRoutingBusIds.length>0||PNt(this.preparedBuses,this.config.allowBlindAndBuriedVias)}),generatedAssignments:e,maxAssignments:this.config.maxLayerCombinations})),this.routingInitialized=!0,this.stats={phase:"prepare-layer-assignments",assignmentCount:this.layerAssignments.length}}*initializeRoutingSteps(){for(;!this.routingInitialized;)this.stepRoutingInitialization(),this.routingInitialized||(yield)}setInProgressPlans(t){this.inProgressPlans=[...t.plans],this.stats={...this.stats,phase:t.phase,...t.strategy?{routingStrategy:t.strategy}:{},...t.unitIndex!==void 0?{workUnit:t.unitIndex}:{},...t.unitCount!==void 0?{workUnitCount:t.unitCount}:{},...t.busId?{bus:t.busId}:{},routedConnections:`${t.plans.length}/${this.inputSrj.connections.length}`}}visualizeCurrentState(){const t=this.endpointCompletion?.simpleRouteJson??(!this.solved&&!this.failed&&this.inProgressPlans.length>0?aR({inputSrj:this.inputSrj,plans:this.inProgressPlans,layerNames:this.config.layerNames}):void 0)??this.bestAttempt?.outputSrj??this.inputSrj;return kvo(t)}visualizeWorkState(t){const e=this.visualizeCurrentState(),n=this.preparedBuses[0]?.sharedBoundary??this.inputSrj.bounds,o=typeof this.stats.bus=="string"?this.stats.bus:void 0,i=o?this.preparedBuses.find(u=>u.busId===o):void 0,r=n.maxX-n.minX,s=n.maxY-n.minY,a=Math.max(Math.min(r,s)*.025,.25),A=typeof this.stats.phase=="string"?this.stats.phase:"starting",c=[typeof this.stats.routeConnection=="string"?`connection ${this.stats.routeConnection}`:void 0,typeof this.stats.searchBatch=="number"?`batch ${this.stats.searchBatch}`:void 0,typeof this.stats.expandedStates=="number"?`${this.stats.expandedStates.toLocaleString()} states`:void 0].filter(Boolean).join(" · "),l=`${t}: ${A}`;return{...NH(e,{rects:[{center:{x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},width:r,height:s,fill:"rgba(0, 0, 0, 0)",stroke:"rgba(14, 165, 233, 0.8)",label:`${t} working boundary`}],circles:(i?.connections??[]).map(u=>({center:u.sourcePoint,radius:Math.max(a,Math.min(u.sourceObstacle.width,u.sourceObstacle.height)*.6),fill:"rgba(250, 204, 21, 0.25)",stroke:"#f59e0b",label:`active bus ${o}: ${u.connection.name}`})),texts:[{x:n.minX,y:n.maxY+a*2,text:`${t} · ${A}${c?` · ${c}`:""}`,color:"#0f172a",fontSize:a*1.5,anchorSide:"bottom_left"}]}),title:l}}visualizeBoundaryRoutingState(){return this.activeRoutingVisualization?{...NH(this.visualizeCurrentState(),this.activeRoutingVisualization),title:this.activeRoutingVisualization.title}:this.visualizeWorkState("BoundaryBusRoutingSolver")}visualizeAdaptiveRoutingState(){if(this.activeAdaptiveVisualization)return this.activeAdaptiveVisualization;const t=this.preparedBuses[0]?.sharedBoundary??this.inputSrj.bounds,e=t.maxX-t.minX,n=t.maxY-t.minY,o=Math.max(Math.min(e,n)*.02,.2);return{title:"SingleLayerAdaptiveExitSolver: preparing flow grid",rects:[{center:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2},width:e,height:n,fill:"rgba(0, 0, 0, 0)",stroke:"rgba(14, 165, 233, 0.9)",label:"adaptive flow grid boundary"}],points:this.preparedBuses.flatMap(i=>i.connections.map(r=>({...r.sourcePoint,color:"#f97316",label:"adaptive route source"}))),texts:[{x:t.minX,y:t.maxY+o*2,text:"preparing adaptive flow grid",color:"#0f172a",fontSize:o*1.5,anchorSide:"bottom_left"}]}}startOperation(t){const e=this.createWorkSolver(t.name,t.generator,t.getProgress);this.MAX_ITERATIONS=Math.max(this.MAX_ITERATIONS,this.iterations+e.MAX_ITERATIONS+1),this.activeOperation={solver:e,onSolved:t.onSolved},this.activeSubSolver=e}createWorkSolver(t,e,n,o){return new Fvo(t,e,o??(()=>this.visualizeWorkState(t)),()=>({...this.stats}),n??(()=>0))}*routeBusAlternativesWorkSteps(t,e){const n=eue(t,e,!0);let o=n.next();for(;!o.done;){const{winding:i}=o.value;i.visualization&&(this.activeRoutingVisualization=i.visualization),this.stats={...this.stats,phase:"route-boundary-bus-connection",bus:o.value.busId,targetLayer:o.value.targetLayer,routeOrderAttempt:i.routeOrderAttempt,routeConnection:`${i.connectionIndex+1}/${i.connectionCount}`,connection:i.connectionName,searchBatch:i.searchBatch,expandedStates:i.expandedStateCount,connectionComplete:i.connectionComplete},yield,o=n.next()}return o.value}stepActiveOperation(){const t=this.activeOperation;if(!t)return;if(t.solver.step(),t.solver.failed){this.failedSubSolvers=[...this.failedSubSolvers??[],t.solver],this.error=t.solver.error,this.failed=!0,this.activeOperation=null,this.activeSubSolver=null;return}if(!t.solver.solved)return;const e=t.solver.getOutput();this.activeOperation=null,this.activeSubSolver=null,t.onSolved(e)}completeBestAttemptEndpoints(){!this.options.completeOriginalEndpoints||this.endpointCompletion||!this.bestAttempt||(this.endpointCompletion=sbo({inputSrj:this.routingSrj,fanoutSrj:this.bestAttempt.outputSrj,plans:this.bestAttempt.plans,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,effort:this.options.endpointCompletionEffort,routeDownstreamConnections:this.options.routeDownstreamConnections}))}getValidationBoundary(){if(this.options.sharedBoundary)return this.options.sharedBoundary;const t=this.preparedBuses[0]?.sharedBoundary;return t?this.preparedBuses.slice(1).reduce((e,n)=>({minX:Math.min(e.minX,n.sharedBoundary.minX),maxX:Math.max(e.maxX,n.sharedBoundary.maxX),minY:Math.min(e.minY,n.sharedBoundary.minY),maxY:Math.max(e.maxY,n.sharedBoundary.maxY)}),{...t}):this.inputSrj.bounds}validateCompletePlans(t,e){return Bvo({inputSrj:this.inputSrj,outputSrj:e,plans:t,preparedBuses:this.preparedBuses,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias})}matchCompletePlanLengths(t,e={}){return zy({plans:t,preparedBuses:this.preparedBuses,inputSrj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,allowSameNetMerges:this.config.allowSameNetMerges,...e})}normalizeCompletePlanCorners(t){if(this.config.allowBlindAndBuriedVias)return[...t];const e=DPe({...this.config,inputSrj:this.inputSrj,preparedBuses:this.preparedBuses,plans:t,repairPlaneSourceCorners:!0,repairSignalSourceCorners:!0,rematchRepairedLengths:n=>this.matchCompletePlanLengths(n,{maximumWorkUnits:1e4,allowMatchingInsideDenseBounds:!0}).plans});return!e||e.every(n=>r$(n,this.config.clearance).every(o=>o.kind==="clearance"))?e:$So({...this.config,inputSrj:this.inputSrj,preparedBuses:this.preparedBuses,plans:e})}*routePeripheralMixedTerminationSteps(t){if(this.config.allowBlindAndBuriedVias)return null;const e=t.busesInRoutingOrder.find(_=>_.termination.type==="boundary"&&(_.exitEdge==="right"||_.exitEdge==="left")&&_.connections.length>=16&&_.componentObstacles.length>=200);if(!e)return null;const n=t.busLayerAssignments[e.busId];if(!n)return null;const o=new Map(Object.entries(t.busLayerAssignments));this.setInProgressPlans({phase:"route-peripheral-source-escapes",plans:[],busId:e.busId});const i=(e.exitEdge==="left"?ivo:DQo)({...this.config,srj:this.routingSrj,buses:this.preparedBuses,bus:e,targetLayer:n,targetLayerByBusId:o});let r=i.next();for(;!r.done;)yield,r=i.next();if(!r.value)return null;let s=r.value;const a={...this.config,...s,srj:this.routingSrj,bus:e,targetLayer:n},A="lowerConnectionIndices"in s?tRt({...a,...s}):NQo(a);let c=A.next();for(;!c.done;)yield,c=A.next();let l=c.value;if(!l&&"lowerConnectionIndices"in s){const _=rvo({...a,...s,buses:this.preparedBuses});let f=_.next();for(;!f.done;)yield,f=_.next();f.value&&(s=f.value,l=f.value.plans)}if(!l)return null;this.setInProgressPlans({phase:"route-peripheral-bus-continuations",plans:l,busId:e.busId});const u=$Nt({...this.config,srj:this.routingSrj,buses:this.preparedBuses,sourceEscapes:s.sourceEscapes,sourceBoundary:s.sourceBoundary,initialPlans:l,targetLayerByBusId:o});let g=u.next();for(;!g.done;)yield,g=u.next();if(!g.value)return null;const h=nvo({...this.config,srj:this.routingSrj,inputSrj:this.inputSrj,plans:g.value,preparedBuses:this.preparedBuses,sharedBoundary:this.getValidationBoundary()});let d=h.next();for(;!d.done;)yield,d=h.next();if(!d.value)return null;const p=this.normalizeCompletePlanCorners(d.value);if(!p)return null;const m=aR({inputSrj:this.inputSrj,plans:p,layerNames:this.config.layerNames});return this.validateCompletePlans(p,m).valid?{plans:p,failedBusIds:[],stopAfterCompleteValidation:!0}:null}*routeDenseThroughAllMixedTerminationSteps(t){if(this.config.allowBlindAndBuriedVias)return null;let e=t.preferredBoundaryViaPoints;const n=t.denseRoutingStrategy!=="boundary-aligned",o=(...Xe)=>{if(FA.env.FANOUT_DEBUG_DENSE==="1"){if(FA.env.FANOUT_DEBUG_DENSE_SUMMARY==="1"&&!["start","plane-match:preflight-failed","plane-match:incremental-complete","plane-match:incremental-failed","plane-route:alternate-candidate-counts","plane-route:alternate-search","plane-route:csp","plane-reservation-core","plane-route:promote-failed","plane-route:alternate-choice","plane-route:promote-zero-candidates","length-match:complete","length-match:start","plane-route:failed","dense-validation"].includes(String(Xe[0])))return;console.error("dense:",...Xe)}},i=t.busesInRoutingOrder.filter(Xe=>Xe.termination.type==="boundary"),r=i.filter(Xe=>Xe.connections.length>=8),s=(Xe,Ze)=>Ze.componentId!==Xe.componentId&&this.config.layerNames.every(dt=>Ze.layers.includes(dt))&&Ze.center.x>=Xe.componentBounds.minX&&Ze.center.x<=Xe.componentBounds.maxX&&Ze.center.y>=Xe.componentBounds.minY&&Ze.center.y<=Xe.componentBounds.maxY,a=r.some(Xe=>this.routingSrj.obstacles.some(Ze=>s(Xe,Ze))),A=this.preparedBuses.flatMap(Xe=>Xe.termination.type==="plane"?Xe.connections.map(Ze=>Ze.connection.name):[]),c=r.some(Xe=>this.routingSrj.obstacles.some(Ze=>s(Xe,Ze)&&A.some(dt=>n4(this.routingSrj,Ze,dt)))),l=this.config.densePlaneReservationBusIds.length>0||this.config.denseUnrestrictedPlaneRoutingBusIds.length>0,u=!l&&PNt(this.preparedBuses,this.config.allowBlindAndBuriedVias),g=l||u,h=!l&&!u&&c,d=t.boundaryRecovery!==void 0,p=g||h||d,m=d||(u||h)&&((t.planeReservationRetryCount??0)===0||!!t.preferredBoundaryViaPoints),_=(g||h)&&t.lengthMatchingStage!=="before-planes",f=DNt(i.map(Xe=>Xe.connections.length)),I=i.filter(Xe=>Xe.connections.length===2),C=Wvo({boundaryBusCount:i.length,pairBuses:I.map(Xe=>({...Xe,assignedLayer:t.busLayerAssignments[Xe.busId]}))}),y=C?new Map(I.map((Xe,Ze)=>[Xe.busId,C[Ze]])):null,x=new Map;if(a)for(const Xe of pw(i,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,additionalObstacles:this.routingSrj.obstacles}))x.set(Xe.connectionIndex,(x.get(Xe.connectionIndex)??0)+1);const E=Xe=>Xe.connections.reduce((Ze,dt)=>Ze+(x.get(dt.connectionIndex)??0),0),B=new Map;if(n&&!l)for(const Xe of r){if(!Ds(Xe.exitEdge,Xe.preferredExit)||new Set(Xe.routableEscapeLayers??Xe.allowedLayers??[]).size!==1)continue;const Ze=Xe.direction==="up"||Xe.direction==="down"?"y":"x",dt=Ze==="x"?"y":"x",Ut=Xe.direction==="up"||Xe.direction==="right"?1:-1,Wt=Math.max(...Xe.connections.map(kn=>Ut*kn.sourcePoint[Ze])),Xt=Math.min(...Xe.connections.map(kn=>kn.sourcePoint[dt])),Jt=Math.max(...Xe.connections.map(kn=>kn.sourcePoint[dt])),yn=Ze==="x"?Xe.pitchX:Xe.pitchY,An=r.find(kn=>{if(kn===Xe||kn.componentId!==Xe.componentId||kn.exitEdge!==Xe.exitEdge||Ds(kn.exitEdge,kn.preferredExit))return!1;const ht=Math.min(...kn.connections.map(Kt=>Ut*Kt.sourcePoint[Ze]))-Wt;return ht>=-1e-9&&ht<=yn+1e-9&&Math.min(...kn.connections.map(Kt=>Kt.sourcePoint[dt]))<=Jt+1e-9&&Math.max(...kn.connections.map(Kt=>Kt.sourcePoint[dt]))>=Xt-1e-9});An&&B.set(Xe,An)}const S=g&&r.length===3,Q=Xe=>{const Ze=Xe.connections.map(dt=>{const Ut=dt.exitTargetPoint??dt.targetPoint;return Xe.exitEdge==="top"||Xe.exitEdge==="bottom"?Ut.x:Ut.y});return{minimum:Math.min(...Ze),maximum:Math.max(...Ze)}},w=Xe=>{if(Xe.connections.length>=8)return!1;const Ze=Q(Xe);return r.some(dt=>{if(dt.exitEdge!==Xe.exitEdge)return!1;const Ut=Q(dt);return Ze.maximum>=Ut.minimum-1e-9&&Ze.minimum<=Ut.maximum+1e-9})},M=Xe=>{if(!(Xe.connections.length>=8))return r.find(Ze=>{const dt=Ze.connections.map(An=>An.sourcePoint.x),Ut=Ze.connections.map(An=>An.sourcePoint.y),Wt=Math.min(...dt),Xt=Math.max(...dt),Jt=Math.min(...Ut),yn=Math.max(...Ut);return Xe.connections.every(An=>An.sourcePoint.x>=Wt-1e-9&&An.sourcePoint.x<=Xt+1e-9&&An.sourcePoint.y>=Jt-1e-9&&An.sourcePoint.y<=yn+1e-9)})},k=Xe=>!!M(Xe),R=Xe=>w(Xe)&&!k(Xe)?0:Xe.connections.length>=8?1:Xe.connections.length>1?2:3,F=i.toSorted((Xe,Ze)=>{if(f||r.length>0){if(S){const $n=R(Xe)-R(Ze);if($n!==0)return $n}const kn=i.length===2&&Math.max(...i.map($n=>$n.connections.length))>=8?Xe.connections.length-Ze.connections.length:Ze.connections.length-Xe.connections.length;if(kn!==0)return kn;if(a&&Xe.connections.length>=8&&Ze.connections.length>=8){const $n=E(Xe)-E(Ze);if($n!==0)return $n}}const dt=t.busLayerAssignments[Xe.busId],Ut=t.busLayerAssignments[Ze.busId],Wt=y?.get(Xe.busId),Xt=y?.get(Ze.busId);if(Wt!==void 0&&Xt!==void 0&&Wt!==Xt)return Wt-Xt;const Jt=+!!Ds(Ze.exitEdge,Ze.preferredExit)-+!!Ds(Xe.exitEdge,Xe.preferredExit);if(Jt!==0)return Jt;if(!!!Ds(Xe.exitEdge,Xe.preferredExit)){const kn=ht=>{const Kt=ht.connections.map(Lt=>Lt.sourcePoint.x),rn=ht.connections.map(Lt=>Lt.sourcePoint.y);return Math.max(...Kt)-Math.min(...Kt)+Math.max(...rn)-Math.min(...rn)},$n=kn(Ze)-kn(Xe);if(Math.abs($n)>1e-9)return $n}const An=this.config.layerNames.indexOf(dt??"")-this.config.layerNames.indexOf(Ut??"");return An!==0?-An:i.length!==6&&i.length!==7&&i.length!==8&&i.length!==9?0:Xe.busId.localeCompare(Ze.busId)}),O=FA.env.FANOUT_DEBUG_BOUNDARY_ORDER?.split(",")??(FA.env.FANOUT_DEBUG_FIRST_BOUNDARY_BUS?[FA.env.FANOUT_DEBUG_FIRST_BOUNDARY_BUS]:t.boundaryRecovery?[t.boundaryRecovery.busId]:[]),U=O.length>0?F.toSorted((Xe,Ze)=>{const dt=O.indexOf(Xe.busId),Ut=O.indexOf(Ze.busId);return(dt<0?Number.POSITIVE_INFINITY:dt)-(Ut<0?Number.POSITIVE_INFINITY:Ut)}):F,Y=this.preparedBuses.filter(Xe=>Xe.termination.type==="plane"),W=new Set(Y.flatMap(Xe=>Xe.connections.map(Ze=>Ze.connectionIndex))),te=this.config.allowSameNetMerges||h,j=g||h?this.routingSrj.obstacles:void 0,J=Number.parseInt(FA.env.FANOUT_INITIAL_PLANE_RESERVATIONS??"8",10),oe=FA.env.FANOUT_DEBUG_INITIAL_PLANE_INDICES?.split(",").map(Xe=>Number(Xe)-1),ie=FA.env.FANOUT_DEBUG_INITIAL_PLANE_BUS_IDS?.split(",");let ne=ie?Y.filter(Xe=>ie.includes(Xe.busId)):oe?oe.flatMap(Xe=>Y[Xe]?[Y[Xe]]:[]):this.config.densePlaneReservationBusIds.length>0?Y.filter(Xe=>this.config.densePlaneReservationBusIds.includes(Xe.busId)):g||h?Y.slice(0,Number.isFinite(J)?J:8):Y;t.promotedPlaneReservationBusIds&&(ne=[...new Set([...ne,...Y.filter(Xe=>t.promotedPlaneReservationBusIds.includes(Xe.busId))])]);const le=new Set;let ge,_e;const ue=U.map(Xe=>Xe.connections.length),fe=VSo({boundaryBusConnectionCounts:ue,planeBusCount:Y.length});if(o("start",U.map(Xe=>`${Xe.busId}:${Xe.connections.length}`),`planes:${Y.length}`,`joint:${f}`),U.length===0||fe===null||U.some(Xe=>!a6(Xe))||Y.some(Xe=>Xe.connections.length!==1)||U.length+Y.length!==t.busesInRoutingOrder.length)return null;const pe=new Map(this.preparedBuses.flatMap(Xe=>Xe.connections.map(Ze=>[Ze.connectionIndex,Ze.connection.name]))),Me=ue.filter(Xe=>Xe===1).length>1&&iMe(ue),ve=new Map(U.map(Xe=>[Xe.busId,S&&Xe.connections.length<8&&k(Xe)?-1:1])),he=new Map(U.map(Xe=>[Xe.busId,Xe.connections.length===1?S&&k(Xe)?!0:Me&&Ds(Xe.exitEdge,Xe.preferredExit)?d$(Xe).targetProjection>0:Xj(Xe.direction)!==Xe.exitEdge:S&&Xe.connections.length>=8?!1:Xj(Xe.direction)!==Xe.exitEdge]));for(const Xe of r){if(g||!Ds(Xe.exitEdge,Xe.preferredExit))continue;r.some(dt=>{if(dt===Xe||dt.componentId!==Xe.componentId)return!1;const Ut=dt.connections.map(kn=>kn.sourcePoint.x),Wt=dt.connections.map(kn=>kn.sourcePoint.y),Xt=Math.min(...Ut),Jt=Math.max(...Ut),yn=Math.min(...Wt),An=Math.max(...Wt);return Xe.connections.some(({sourcePoint:kn})=>{const $n=kn.x+(Xe.direction==="left"?-Xe.pitchX/2:Xe.direction==="right"?Xe.pitchX/2:0),ht=kn.y+(Xe.direction==="down"?-Xe.pitchY/2:Xe.direction==="up"?Xe.pitchY/2:0);return $n>=Xt&&$n<=Jt&&ht>=yn&&ht<=An})})&&he.set(Xe.busId,!1)}t.boundaryRecovery&&(ve.set(t.boundaryRecovery.busId,t.boundaryRecovery.perpendicularSide),he.set(t.boundaryRecovery.busId,t.boundaryRecovery.preferOutward));const Qe=FA.env.FANOUT_DEBUG_FLIP_BOUNDARY_BUS;Qe&&ve.set(Qe,-1);const Pe=FA.env.FANOUT_DEBUG_OUTWARD_BOUNDARY_BUS;Pe&&he.set(Pe,!0);const we=(Xe,Ze)=>{const dt=W.has(Xe)&&W.has(Ze);if(!this.config.allowSameNetMerges&&!(te&&dt))return!1;const Ut=pe.get(Xe),Wt=pe.get(Ze);return!!(Ut&&Wt&&Px(this.routingSrj,Ut,Wt))},Te=U.filter(Xe=>Xe.connections.length===1),Re=!S&&!h&&iMe(ue)?Te.toSorted(U.length===9?zvo:Jvo).slice(0,Uvo(ue)):[],Ee=U.length===8||U.length===9?Re.filter(Xe=>{const Ze=t.busLayerAssignments[Xe.busId];return!!(Ze&&uRt({singletonBus:Xe,singletonTargetLayer:Ze,wideBuses:U}))}):[],ke=S?Te.filter(Xe=>{const Ze=M(Xe),dt=t.busLayerAssignments[Xe.busId];if(!Ze||!dt)return!1;const Ut=Ze.routableEscapeLayers??Ze.allowedLayers??[],Wt=Xe.exitEdge==="left"||Xe.exitEdge==="right"?"x":"y",Xt=Ze.connections.map(An=>An.sourcePoint[Wt]),Jt=Xe.exitEdge==="left"||Xe.exitEdge==="bottom"?Math.min(...Xt):Math.max(...Xt),yn=Xe.connections.every(An=>Math.abs(An.sourcePoint[Wt]-Jt)<1e-9);return!!(!Ut.includes(dt)||u&&yn&&Ds(Xe.exitEdge,Xe.preferredExit))}):[],Ce=ke.flatMap(Xe=>{const Ze=M(Xe),dt=t.busLayerAssignments[Xe.busId];return U.filter(Ut=>Ut.connections.length>1&&Ut.connections.length<8&&Ut.direction===Xe.direction&&t.busLayerAssignments[Ut.busId]===dt&&M(Ut)===Ze)}),Le=FA.env.FANOUT_DEBUG_DISABLE_LEADING_NARROW==="1"?[]:ke.flatMap(Xe=>[Xe,...Ce.filter(Ze=>Ze.direction===Xe.direction&&t.busLayerAssignments[Ze.busId]===t.busLayerAssignments[Xe.busId])]),Ye=[...Ee,...Le].filter((Xe,Ze,dt)=>dt.indexOf(Xe)===Ze),tt=new Map;if(U.length===9&&Ye.length>0)for(const Xe of Ye){he.set(Xe.busId,!0);const Ze=Ds(Xe.exitEdge,Xe.preferredExit);if(!Xe.exitEdge||!Ze)continue;const dt=`${Xe.exitEdge}:${Ze}`;U.some(Wt=>Wt===Xe||Wt.connections.length<8?!1:Wt.exitEdge===Xe.exitEdge&&Ds(Wt.exitEdge,Wt.preferredExit)===Ze)&&tt.set(dt,(tt.get(dt)??0)+Xe.connections.length)}const At=new Set([...FA.env.FANOUT_DEBUG_PROVISIONAL_NARROW==="1"?U.filter(Xe=>Xe.connections.length<8):[],...Re.filter(Xe=>{const Ze=M(Xe),dt=Xe.connections[0].sourcePoint,Ut={x:(Xe.componentBounds.minX+Xe.componentBounds.maxX)/2,y:(Xe.componentBounds.minY+Xe.componentBounds.maxY)/2},Wt=Xe.exitEdge?e6(Xe.exitEdge):Xe.direction,Xt=Wt==="right"?Ut.x-dt.x:Wt==="left"?dt.x-Ut.x:Wt==="up"?Ut.y-dt.y:dt.y-Ut.y,Jt=n&&!g&&Ze&&(t.busLayerAssignments[Ze.busId]===t.busLayerAssignments[Xe.busId]||Xt>1e-9);return!Ye.includes(Xe)&&!Jt}),...S?U.filter(Xe=>Xe.connections.length===2&&!w(Xe)&&!Ye.includes(Xe)):[]]),at=Xe=>{const Ze=Ds(Xe.exitEdge,Xe.preferredExit);if(!Xe.exitEdge||!Ze)return 0;const dt=tt.get(`${Xe.exitEdge}:${Ze}`)??0;return Kvo({leadingLaneCount:dt,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,clearance:this.config.clearance})},nt=U.filter(Xe=>!At.has(Xe)),gt=f?pd([...ne,...nt],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredViaPointsByConnectionIndex:t.preferredBoundaryViaPoints,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}):null;let bt=gt??pd([...ne,U[0]],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:2e4,preferredViaPointsByConnectionIndex:t.preferredBoundaryViaPoints,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});const Ct=FA.env.FANOUT_DEBUG_FIXED_VIAS;if(bt&&Ct){bt=new Map(bt);for(const Xe of Ct.split(",")){const Ze=Xe.split(":"),dt=Ze.pop(),Ut=Ze.pop(),Wt=Ze.join(":"),Xt=[...pe].find(([,An])=>An===Wt)?.[0],Jt=Number(Ut),yn=Number(dt);Xt!==void 0&&Number.isFinite(Jt)&&Number.isFinite(yn)&&bt.set(Xt,{x:Jt,y:yn})}}const Dt=FA.env.FANOUT_DEBUG_STAGED_PLANE_BUS_IDS?Y.filter(Xe=>FA.env.FANOUT_DEBUG_STAGED_PLANE_BUS_IDS.split(",").includes(Xe.busId)):FA.env.FANOUT_DEBUG_STAGED_PLANE_INDICES?.split(",").flatMap(Xe=>Y[Number(Xe)-1]?[Y[Number(Xe)-1]]:[])??[];if(bt&&Dt.length>0)for(const Xe of Dt){if(ne.includes(Xe))continue;const Ze=pd([...ne,Xe,...nt],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredViaPointsByConnectionIndex:t.preferredBoundaryViaPoints,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:bt,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o("plane-reservation:staged",Xe.busId,Ze?.size??"failed"),!Ze)break;bt=new Map([...bt,...Ze]),ne.push(Xe)}o("seed",bt?.size??"failed"),bt&&FA.env.FANOUT_DEBUG_DENSE_POINTS==="1"&&console.error("dense: seed-points",[...bt].map(([Xe,Ze])=>({connection:pe.get(Xe),point:Ze})));let kt=1;const it=U.length+Y.length+3;if(this.setInProgressPlans({phase:"reserve-dense-via-sites",plans:[],strategy:"default",unitIndex:kt,unitCount:it}),yield,bt){const Xe=zSo({busesInRoutingOrder:[...a?[]:Ee,...U.filter(qe=>(a||!Ee.includes(qe))&&!Le.includes(qe)).flatMap(qe=>[...Le.filter(vt=>M(vt)===qe),qe])],busLayerAssignments:t.busLayerAssignments,routingMode:fe}),Ze=r.every(qe=>qe.exitEdge&&qe.direction===e6(qe.exitEdge)),dt=h&&Ze?Te.filter(qe=>{const vt=M(qe);return!!(vt&&qe.direction===vt.direction)}):[];if(t.boundaryRecovery&&dt.length>0){const qe=Xe.findIndex(vt=>vt.busId===t.boundaryRecovery.busId);if(qe>=0){const vt=Xe[qe],qt=new Set(dt),Zt=Xe.filter(nn=>nn!==vt&&!qt.has(nn));Xe.splice(0,Xe.length,vt,...dt,...Zt)}}for(const[qe]of B){const vt=qe.direction==="up"||qe.direction==="down"?"y":"x",qt=qe.direction==="up"||qe.direction==="right"?1:-1,Zt=Math.min(...qe.connections.map(Nn=>qt*Nn.sourcePoint[vt])),nn=Xe.indexOf(qe),zn=Xe.findIndex(Nn=>Nn!==qe&&Nn.connections.length>=8&&Nn.componentId===qe.componentId&&Nn.direction===qe.direction&&Math.max(...Nn.connections.map(Co=>qt*Co.sourcePoint[vt]))<=Zt+1e-9&&Nn.exitEdge===qe.exitEdge&&Ds(Nn.exitEdge,Nn.preferredExit)===Ds(qe.exitEdge,qe.preferredExit));zn>=0&&zn<nn&&(Xe.splice(nn,1),Xe.splice(zn,0,qe))}const Ut=(qe,vt)=>{if(!n||qe.componentId!==vt.componentId||qe.exitEdge!==vt.exitEdge||qe.direction!==vt.direction||Ds(qe.exitEdge,qe.preferredExit)!==Ds(vt.exitEdge,vt.preferredExit)||t.busLayerAssignments[qe.busId]!==t.busLayerAssignments[vt.busId]||M(qe)!==M(vt)||!M(qe))return!1;const qt={x:qe.connections.reduce((Nn,Co)=>Nn+Co.sourcePoint.x,0)/qe.connections.length,y:qe.connections.reduce((Nn,Co)=>Nn+Co.sourcePoint.y,0)/qe.connections.length},Zt={x:vt.connections.reduce((Nn,Co)=>Nn+Co.sourcePoint.x,0)/vt.connections.length,y:vt.connections.reduce((Nn,Co)=>Nn+Co.sourcePoint.y,0)/vt.connections.length};if(Math.hypot(qt.x-Zt.x,qt.y-Zt.y)>1.5*Math.min(qe.pitchX,qe.pitchY))return!1;const nn=qe.exitEdge==="left"||qe.exitEdge==="right"?"y":"x",zn=Nn=>Nn.connections.reduce((Co,ei)=>Co+(ei.exitTargetPoint??ei.targetPoint)[nn],0)/Nn.connections.length;return(qt[nn]-Zt[nn])*(zn(qe)-zn(vt))<-1e-9},Wt=new Set;for(const qe of Ye)if(!Ds(qe.exitEdge,qe.preferredExit))for(const vt of U){if(vt.connections.length!==2||!Ut(vt,qe))continue;const qt=Xe.indexOf(vt),Zt=Xe.indexOf(qe);qt>Zt&&(Xe.splice(qt,1),Xe.splice(Zt,0,vt),Wt.add(`${vt.componentId}:${vt.exitEdge}`))}for(const qe of U)if(!(!Wt.has(`${qe.componentId}:${qe.exitEdge}`)||qe.connections.length!==2||!Ds(qe.exitEdge,qe.preferredExit)))for(const vt of Te){if(!Ut(vt,qe))continue;const qt=Xe.indexOf(vt),Zt=Xe.indexOf(qe);qt>Zt&&(Xe.splice(qt,1),Xe.splice(Zt,0,vt))}for(const qe of B.values())for(const vt of U)if(!(vt.connections.length!==2||M(vt)!==qe))for(const qt of Te){if(!Ut(qt,vt))continue;const Zt=Xe.indexOf(vt),nn=Xe.indexOf(qt);nn>Zt&&(Xe.splice(nn,1),Xe.splice(Zt,0,qt))}let Xt=bt,Jt=[],yn=!0;const An=qe=>{const vt=new Set(qe.connections.map(qt=>qt.connection.name));return this.preparedBuses.flatMap(qt=>{const Zt=t.busLayerAssignments[qt.busId];return Zt?qt.connections.flatMap(nn=>{if(vt.has(nn.connection.name))return[];const zn=Xt.get(nn.connectionIndex);return zn?[{connectionName:nn.connection.name,sourceEscapeSegment:Jt.some(Nn=>Nn.connectionIndex===nn.connectionIndex)?void 0:{start:nn.sourcePoint,end:zn,layer:nn.sourceLayer,width:this.config.traceWidth},via:{center:zn,diameter:this.config.viaDiameter,spanLayers:Mx({fromLayer:nn.sourceLayer,toLayer:Zt,layerNames:this.config.layerNames,allowBlindAndBuriedVias:!1})}}]:[]}):[]})},kn=(function*(qe){o("route:start",qe.busId,Jt.length),FA.env.FANOUT_DEBUG_DENSE_POINTS==="1"&&console.error("dense: points",qe.busId,qe.connections.map(On=>({source:On.sourcePoint,via:Xt.get(On.connectionIndex),target:On.exitTargetPoint??On.targetPoint})));const vt=t.busLayerAssignments[qe.busId];if(!vt)return!1;const qt=!g&&!Ds(qe.exitEdge,qe.preferredExit)&&qe.connections.length>2&&r.some(On=>Ds(On.exitEdge,On.preferredExit)),Zt=this.config.traceWidth+this.config.clearance,nn=qe.connections.some(On=>{const uo=On.exitTargetPoint??On.targetPoint,Oo=qe.sharedBoundary;return qe.exitEdge==="left"||qe.exitEdge==="right"?uo.y-Oo.minY<=Zt+1e-9||Oo.maxY-uo.y<=Zt+1e-9:uo.x-Oo.minX<=Zt+1e-9||Oo.maxX-uo.x<=Zt+1e-9}),zn={srj:this.routingSrj,bus:qe,targetLayer:vt,acceptedPlans:Jt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,fixedViaPointsByConnectionIndex:Xt,reservedVias:An(qe),viaMinimalOnly:FA.env.FANOUT_DEBUG_ALLOW_EXTRA_VIAS!=="1",allowBoundarySideViaFallback:qe.connections.length===1,preferCornerBoundaryVia:g,adaptiveWindingRouteOrder:qt,allowFixedViaReservedExitFallback:d,forbidEarlyExitBoundaryContact:nn,alignWindingGridToPads:n&&!l,fixedViaFallbackRouteOrderAttempts:qt?60:g?6:24,cornerBandTargetTrackOffset:at(qe)},Nn=(function*(On,uo){return this.activeRoutingVisualization=null,yield{type:"subsolver",solver:this.createWorkSolver("BoundaryBusRoutingSolver",this.routeBusAlternativesWorkSteps(On,uo),void 0,()=>this.visualizeBoundaryRoutingState())}}).bind(this),ei=(qe.routableEscapeLayers??qe.allowedLayers??[]).some(On=>On!==vt)?{...qe,routableEscapeLayers:[vt]}:qe,ro=U.some(On=>On.connections.length<8&&M(On)===qe&&Jt.some(uo=>uo.busId===On.busId)),To=g&&ei!==qe&&!ro;let yo=!1,Ro=(yield*Nn(To?{...zn,bus:ei}:zn,1))[0];if(!Ro&&To&&(Ro=(yield*Nn(zn,1))[0]),!Ro){const On=Xt,uo=he.get(qe.busId)??!0,Oo=ve.get(qe.busId)??1;for(const[ko,Ko]of[[!uo,Oo],[uo,-Oo],[!uo,-Oo]]){const mi=pd([...new Set([...ne,...nt,...this.preparedBuses.filter(Fo=>Jt.some(Nr=>Nr.busId===Fo.busId)),qe])],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:new Map([...ve,[qe.busId,Ko]]),preferBoundaryOutwardByBusId:new Map([...he,[qe.busId,ko]]),fixedViaPointsByConnectionIndex:new Map(Jt.filter(Fo=>Fo.via).map(Fo=>[Fo.connectionIndex,Fo.via.center])),preferredViaPointsByConnectionIndex:new Map([...On].filter(([Fo])=>!qe.connections.some(Nr=>Nr.connectionIndex===Fo))),blockingSegments:Jt.flatMap(Fo=>Fo.segments.map(Nr=>({connectionIndex:Fo.connectionIndex,segment:Nr}))),additionalObstacles:this.routingSrj.obstacles,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o("retry-sites",qe.busId,ko,Ko,mi?.size??"failed"),!!mi&&(Xt=mi,Ro=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:mi,reservedVias:An(qe),alignWindingGridToPads:g,fixedViaFallbackRouteOrderAttempts:3},1))[0],Ro))break}Ro||(Xt=On,qe.connections.length===2&&(Ro=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:On,reservedVias:An(qe),allowBoundarySideViaFallback:!0,fixedViaFallbackRouteOrderAttempts:1},1))[0]))}if(!Ro&&u&&qe.connections.length>=8&&Ds(qe.exitEdge,qe.preferredExit)&&new Set(qe.routableEscapeLayers??qe.allowedLayers??[]).size===1&&!Jt.some(On=>r.some(uo=>uo.busId===On.busId))){const On=An(qe),uo=fbo(qe,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,additionalObstacles:this.routingSrj.obstacles,blockingSegments:[...Jt.flatMap(Oo=>Oo.segments.map(ko=>({connectionIndex:Oo.connectionIndex,segment:ko}))),...On.flatMap(Oo=>Oo.sourceEscapeSegment?[{connectionIndex:-1,segment:Oo.sourceEscapeSegment}]:[])],blockingVias:[...Jt.flatMap(Oo=>Oo.via?[{connectionIndex:Oo.connectionIndex,...Oo.via}]:[]),...On.map(Oo=>({connectionIndex:-1,...Oo.via}))]},Xt);for(const Oo of uo){const ko=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:Oo,reservedVias:On,fixedViaFallbackRouteOrderAttempts:1},1))[0];if(ko){Ro=ko,Xt=Oo,yo=!0;break}}}if(!Ro&&u&&qe.connections.length>=8&&Ds(qe.exitEdge,qe.preferredExit)&&(Ro=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:void 0,reservedVias:An(qe)},1))[0],Ro&&(yo=!0,Xt=new Map([...Xt,...Ro.filter(On=>On.via).map(On=>[On.connectionIndex,On.via.center])])),o("local-sites",qe.busId,Ro?.length??"failed")),!Ro&&qe.connections.length>=8&&(B.has(qe)||U.some(On=>On.connections.length>=8&&Jt.some(uo=>uo.busId===On.busId)))){const On=new Set(Jt.map(ko=>ko.connectionName)),uo=new Set(this.preparedBuses.filter(ko=>ko.termination.type==="plane"||ko===B.get(qe)).flatMap(ko=>ko.connections.map(Ko=>Ko.connection.name)).filter(ko=>!On.has(ko))),Oo=(yield*Nn({...zn,fixedViaPointsByConnectionIndex:void 0,reservedVias:zn.reservedVias.filter(ko=>!uo.has(ko.connectionName)),softReservedVias:zn.reservedVias.filter(ko=>uo.has(ko.connectionName))},1))[0];if(Oo){const ko=[...Jt,...Oo],Ko=pd(this.preparedBuses,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:3e6,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:new Map(ko.filter(mi=>mi.via).map(mi=>[mi.connectionIndex,mi.via.center])),preferredViaPointsByConnectionIndex:Xt,blockingSegments:ko.flatMap(mi=>mi.segments.map(Fo=>({connectionIndex:mi.connectionIndex,segment:Fo}))),additionalObstacles:this.routingSrj.obstacles,preferPlaneCheckerboardSites:g,canShareCopper:we});o("free-sites:rematched",qe.busId,Ko?.size??"failed"),Ko&&(Ro=Oo,Xt=Ko,yo=!0)}}if(Ro&&qe.maxLengthSkew!==void 0){const On=Ro.map(ko=>ko.length),uo=Math.max(...On)-Math.min(...On);Vvo({boundaryBusCount:U.length,connectionCount:qe.connections.length,rawSkew:uo,maximumSkew:qe.maxLengthSkew})&&!_&&!yo&&(Ro=(yield*Nn(zn,3)).toSorted((ko,Ko)=>{const mi=ko.map(Nr=>Nr.length),Fo=Ko.map(Nr=>Nr.length);return Math.max(...mi)-Math.min(...mi)-(Math.max(...Fo)-Math.min(...Fo))})[0])}return Ro?(Jt.push(...Ro),Jt.length===U.reduce((On,uo)=>On+uo.connections.length,0)&&Jt.some(On=>{const uo=U.find(ko=>ko.busId===On.busId);if(uo?.connections.length!==1||!On.via)return!1;const{center:Oo}=On.via;return Oo.x<uo.componentBounds.minX||Oo.x>uo.componentBounds.maxX||Oo.y<uo.componentBounds.minY||Oo.y>uo.componentBounds.maxY})&&(e=new Map(Jt.filter(On=>On.via).map(On=>[On.connectionIndex,On.via.center]))),o("route:complete",qe.busId,Ro.length),!0):(ge??=qe,qe.connections.length>=8&&(_e??=qe),o("route:failed",qe.busId),!1)}).bind(this),$n=[],ht=qe=>{qe.connections.length>=8&&!g&&!h&&FA.env.FANOUT_DEBUG_NO_PLANE_EXPANSION!=="1"&&ne.length<Y.length&&(ne=Y,o("plane-reservations:expanded",Y.length))},Kt=fe==="large_boundary_only"?Xe:Xe.slice(0,1);let rn;for(const qe of Kt){const vt=yield*kn(qe);if(this.setInProgressPlans({phase:"route-dense-boundary-buses",plans:Jt,strategy:"default",unitIndex:++kt,unitCount:it,busId:qe.busId}),yield,!!vt){rn=qe;break}}rn?($n.push(rn),ht(rn)):yn=!1;const Lt=Xe.filter(qe=>qe!==rn);for(;yn&&Lt.length>0;){const qe=Jt.flatMap(qt=>qt.segments.map(Zt=>({connectionIndex:qt.connectionIndex,segment:Zt})));let vt=-1;for(let qt=0;qt<Lt.length;qt++){const Zt=Lt[qt];o("candidate:start",Zt.busId);const nn=new Map(Xt),zn=FA.env.FANOUT_DEBUG_LATE_FIXED_VIAS;if(zn){const On=new Set(Zt.connections.map(uo=>uo.connectionIndex));for(const uo of zn.split(",")){const Oo=uo.split(":"),ko=Oo.pop(),Ko=Oo.pop(),mi=Oo.join(":"),Fo=[...pe].find(([,ur])=>ur===mi)?.[0],Nr=Number(Ko),Rs=Number(ko);Fo!==void 0&&On.has(Fo)&&Number.isFinite(Nr)&&Number.isFinite(Rs)&&nn.set(Fo,{x:Nr,y:Rs})}}const Nn=Zt.connections.every(On=>nn.has(On.connectionIndex)),Co=gt&&Nn?new Map(nn):pd([...ne,...$n,Zt],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:nn,blockingSegments:qe,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}),ei=Co?new Map([...nn,...Co]):null;if(o("candidate:matched",Zt.busId,ei?.size??"failed"),this.setInProgressPlans({phase:"reserve-next-dense-boundary-bus",plans:Jt,strategy:"default",unitIndex:kt,unitCount:it,busId:Zt.busId}),yield,!ei)continue;const ro=Xt,To=Jt.length,yo=Lt.filter((On,uo)=>uo!==qt);let Ro=ei;if(yo.length===1){const On=yo[0],uo=pd([...ne,...$n,Zt,On],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:ei,blockingSegments:qe,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o("future:matched",On.busId,uo?.size??"failed"),uo){const Oo=new Map;for(const mi of pw([On],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,blockingSegments:qe,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}))Oo.set(mi.connectionIndex,(Oo.get(mi.connectionIndex)??0)+1);const ko=On.connections.toSorted((mi,Fo)=>(Oo.get(mi.connectionIndex)??0)-(Oo.get(Fo.connectionIndex)??0)||mi.connectionIndex-Fo.connectionIndex),Ko=new Map(ei);for(const mi of ko){const Fo=uo.get(mi.connectionIndex);Fo&&Ko.set(mi.connectionIndex,Fo)}Ro=Ko}}if(Xt=Ro,yield*kn(Zt)){o("lookahead:start",Zt.busId);const On=yo.length===0||yo.some(uo=>{const Oo=Jt.flatMap(ko=>ko.segments.map(Ko=>({connectionIndex:ko.connectionIndex,segment:Ko})));return!!pd([...ne,...$n,Zt,uo],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:Xt,blockingSegments:Oo,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we})});if(o("lookahead:complete",Zt.busId,On),On){vt=qt,$n.push(Zt),ht(Zt),this.setInProgressPlans({phase:"route-dense-boundary-buses",plans:Jt,strategy:"default",unitIndex:++kt,unitCount:it,busId:Zt.busId}),yield;break}Jt.splice(To)}Xt=ro,this.setInProgressPlans({phase:"retry-dense-boundary-bus",plans:Jt,strategy:"default",unitIndex:kt,unitCount:it,busId:Zt.busId}),yield}if(vt<0){yn=!1;break}Lt.splice(vt,1)}let Ho=null;if(yn){let qe=null,vt=[];const qt=(nn,zn=new Set)=>{vt=[],Ho=null;const Nn=new Map(nn.flatMap(On=>On.via?[[On.connectionIndex,On.via.center]]:[])),Co=nn.flatMap(On=>On.segments.map(uo=>({connectionIndex:On.connectionIndex,segment:uo}))),ei=!g||nn.some(On=>On.segments.filter(uo=>uo.layer===On.sourceLayer).length>1),ro=ei?[]:U,To=ei?nn.flatMap(On=>[On.via,...On.additionalVias??[],On.planeEndpointVia].filter(uo=>uo!==void 0).map(uo=>({connectionIndex:On.connectionIndex,center:uo.center,diameter:uo.diameter,spanLayers:uo.spanLayers}))):[],yo=ei?pd(Y,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:new Map([...Xt,...Nn]),blockingSegments:Co,blockingVias:To,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we}):null;if(yo)return new Map([...Nn,...yo]);if(p||FA.env.FANOUT_DEBUG_INCREMENTAL_PLANE_MATCH==="1"){let On=new Map(Nn);const uo=d?[]:[...ne];for(const Qt of uo)for(const Nt of Qt.connections){const _n=Xt.get(Nt.connectionIndex);_n&&On.set(Nt.connectionIndex,_n)}for(const Qt of uo){const Nt=t.busLayerAssignments[Qt.busId];if(!Nt)return null;const _n=nR({srj:this.routingSrj,bus:Qt,targetLayer:Nt,acceptedPlans:[...nn,...vt],layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache,fixedViaPointsByConnectionIndex:On});if(!_n)return null;vt.push(..._n)}const Oo=Y.filter(Qt=>!uo.includes(Qt)&&!pd([...uo,Qt,...ro],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:On,blockingSegments:Co,blockingVias:To,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we})),ko=Math.min(...Y.map(Qt=>this.config.layerNames.indexOf(t.busLayerAssignments[Qt.busId]??""))),Ko=g||FA.env.FANOUT_DEBUG_ROUTE_DEEP_PLANES_FIRST==="1"?Y.filter(Qt=>!uo.includes(Qt)&&this.config.layerNames.indexOf(t.busLayerAssignments[Qt.busId]??"")>ko):[],mi=new Set([...zn,...this.config.denseUnrestrictedPlaneRoutingBusIds,...FA.env.FANOUT_DEBUG_ADDITIONAL_ALTERNATE_PLANE_BUS_IDS?.split(",")??[]]),Fo=Y.filter(Qt=>!uo.includes(Qt)&&mi.has(Qt.busId)),Nr=[...Ko,...Oo.filter(Qt=>!Ko.includes(Qt)),...Fo.filter(Qt=>!Ko.includes(Qt)&&!Oo.includes(Qt))],Rs=FA.env.FANOUT_DEBUG_ALTERNATE_PLANE_ORDER?.split(",")??[],ur=Nr.toSorted((Qt,Nt)=>{const _n=this.config.layerNames.indexOf(t.busLayerAssignments[Qt.busId]??""),qn=this.config.layerNames.indexOf(t.busLayerAssignments[Nt.busId]??"");if(_n!==qn&&FA.env.FANOUT_DEBUG_ALTERNATE_IGNORE_LAYERS!=="1")return FA.env.FANOUT_DEBUG_ALTERNATE_SHALLOW_FIRST==="1"?_n-qn:qn-_n;const En=Rs.indexOf(Qt.busId),Rn=Rs.indexOf(Nt.busId);return(En<0?Rs.length:En)-(Rn<0?Rs.length:Rn)||Qt.connections[0].connectionIndex-Nt.connections[0].connectionIndex});if(Nr.length>0){if(o("plane-match:preflight-failed",Oo.map(Io=>Io.busId)),!p&&FA.env.FANOUT_DEBUG_ROUTE_UNMATCHED_PLANES!=="1")return null;let Qt=0;const Nt=Number(FA.env.FANOUT_DEBUG_ALTERNATE_SEARCH_STATES??(u&&(t.planeReservationRetryCount??0)===0?1e4:g?3e6:d?1e4:1e3)),_n=Number(FA.env.FANOUT_DEBUG_ALTERNATE_ROUTE_COUNT??(g?128:8));let qn=0;const En=new Map,Rn=(Io,gi,jo=_n)=>{const oi=t.busLayerAssignments[Io.busId];return oi?BO({srj:this.routingSrj,bus:Io,targetLayer:oi,acceptedPlans:[...nn,...gi],layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache},jo):[]},Hn=(Io,gi)=>{if(Io.length===0)return gi;if(Qt>=Nt)return null;qn=Math.max(qn,ur.length-Io.length);const jo=Io.map(Li=>({planeBus:Li,alternatives:Rn(Li,gi)})),oi=FA.env.FANOUT_DEBUG_DYNAMIC_ALTERNATE_ORDER==="1"?jo.toSorted((Li,ys)=>Li.alternatives.length-ys.alternatives.length||ur.indexOf(Li.planeBus)-ur.indexOf(ys.planeBus)):jo,Ji=oi[0],{planeBus:wi,alternatives:Br}=Ji;if(FA.env.FANOUT_DEBUG_ALTERNATE_CHOICES==="1"&&Qt<64&&o("plane-route:alternate-choice",`depth:${ur.length-Io.length}`,wi.busId,jo.map(Li=>[Li.planeBus.busId,Li.alternatives.length])),Br.length===0)return En.set(wi.busId,(En.get(wi.busId)??0)+1),null;const oa=(FA.env.FANOUT_DEBUG_BRANCH_ALTERNATE_ORDER==="1"?oi:[Ji]).flatMap(Li=>Li.alternatives.map(ys=>({selection:Li,alternative:ys,remaining:Io.filter(dr=>dr!==Li.planeBus)}))),hs=FA.env.FANOUT_DEBUG_LEAST_CONSTRAINING_ALTERNATES==="1"?oa.map(Li=>{const ys=[...gi,...Li.alternative],dr=Li.remaining.map(cA=>Rn(cA,ys,Math.min(4,_n)).length);return{...Li,remainingOptionCounts:dr,minimumRemainingOptions:dr.length===0?Number.POSITIVE_INFINITY:Math.min(...dr),totalRemainingOptions:dr.reduce((cA,vA)=>cA+vA,0)}}).filter(Li=>Li.minimumRemainingOptions!==0).toSorted((Li,ys)=>ys.minimumRemainingOptions-Li.minimumRemainingOptions||ys.totalRemainingOptions-Li.totalRemainingOptions):oa;for(const Li of hs){Qt++;const ys=Hn(Li.remaining,[...gi,...Li.alternative]);if(ys)return ys;if(Qt>=Nt)break}return En.set(wi.busId,(En.get(wi.busId)??0)+1),null};let Lo;if(p||FA.env.FANOUT_DEBUG_EXACT_COVER_ALTERNATES==="1"){const Io=ur.map(wi=>({planeBus:wi,candidates:Rn(wi,vt).map((Br,gr)=>({key:`${wi.busId}:${gr}`,planeBus:wi,plans:Br}))}));if(m){const wi=[...nn,...vt];for(const Br of Y){if(uo.includes(Br)||Io.some(hs=>hs.planeBus===Br))continue;const gr=[],oa=pw([Br],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,blockingSegments:wi.flatMap(hs=>hs.segments.map(Li=>({connectionIndex:hs.connectionIndex,segment:Li}))),blockingVias:wi.flatMap(hs=>[hs.via,...hs.additionalVias??[],hs.planeEndpointVia].filter(Li=>Li!==void 0).map(Li=>({connectionIndex:hs.connectionIndex,center:Li.center,diameter:Li.diameter,spanLayers:Li.spanLayers}))),additionalObstacles:this.routingSrj.obstacles,preferPlaneCheckerboardSites:!0,canShareCopper:we});for(const hs of oa){const Li=nR({srj:this.routingSrj,bus:Br,targetLayer:t.busLayerAssignments[Br.busId],acceptedPlans:wi,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,fixedViaPointsByConnectionIndex:new Map([[hs.connectionIndex,hs.point]])});Li&&gr.push({key:`${Br.busId}:local:${gr.length}`,planeBus:Br,plans:Li})}Io.push({planeBus:Br,candidates:gr})}}o("plane-route:alternate-candidate-counts",Io.map(wi=>[wi.planeBus.busId,wi.candidates.length]));for(const wi of Io)wi.candidates.length===0&&le.add(wi.planeBus.busId);const gi=new Map,jo=(wi,Br)=>{const gr=[wi.key,Br.key].toSorted().join("|"),oa=gi.get(gr);if(oa!==void 0)return oa;const hs=hNt({plans:[...wi.plans,...Br.plans],srj:this.routingSrj,clearance:this.config.clearance,allowSameNetMerges:te});return gi.set(gr,hs),hs},oi=(wi,Br)=>{if(wi.length===0)return Br;if(Qt>=Nt)return null;qn=Math.max(qn,ur.length-wi.length);const gr=wi.toSorted((Li,ys)=>Li.candidates.length-ys.candidates.length)[0];if(gr.candidates.length===0)return En.set(gr.planeBus.busId,(En.get(gr.planeBus.busId)??0)+1),null;const oa=wi.filter(Li=>Li!==gr),hs=Number(FA.env.FANOUT_DEBUG_ALTERNATE_CANDIDATE_BATCH_SIZE??16);for(let Li=0;Li<gr.candidates.length;Li+=hs){const ys=gr.candidates.slice(Li,Li+hs).map(dr=>{const cA=oa.map(Yl=>({...Yl,candidates:Yl.candidates.filter(H0=>jo(dr,H0))})),vA=cA.map(Yl=>Yl.candidates.length);return{candidate:dr,projectedSets:cA,minimumProjectedCount:vA.length===0?Number.POSITIVE_INFINITY:Math.min(...vA),totalProjectedCount:vA.reduce((Yl,H0)=>Yl+H0,0)}}).filter(dr=>dr.minimumProjectedCount!==0).toSorted((dr,cA)=>cA.minimumProjectedCount-dr.minimumProjectedCount||cA.totalProjectedCount-dr.totalProjectedCount);for(const dr of ys){Qt++;const cA=oi(dr.projectedSets,[...Br,dr.candidate]);if(cA)return cA;if(Qt>=Nt)break}if(Qt>=Nt)break}return En.set(gr.planeBus.busId,(En.get(gr.planeBus.busId)??0)+1),null};let Ji;if(u||h){const wi=oa=>oa.map(hs=>[...new Map(hs.candidates.map(Li=>[JSON.stringify(Li.plans.map(ys=>[ys.segments,ys.via,ys.additionalVias,ys.planeEndpointSegments,ys.planeEndpointVia])),Li])).values()]),gr=((oa,hs=Nt)=>kSo({candidateSets:wi(oa),maximumSearchStates:hs,areCompatible:(Li,ys)=>hNt({plans:[...Li.plans,...ys.plans],srj:this.routingSrj,clearance:this.config.clearance,allowSameNetMerges:te})}))(Io);if(o("plane-route:csp",gr.selection?"complete":"failed",gr.searchStates,gr.emptyDomainIndices.map(oa=>Io[oa].planeBus.busId)),Ji=gr.selection,Qt=gr.searchStates,!gr.selection&&(u||h)){const oa=gr.emptyDomainIndices.map(hs=>Io[hs].planeBus.busId).filter(hs=>!ur.some(Li=>Li.busId===hs));if(oa.length>0)return o("plane-route:expand-domains",oa),qt(nn,new Set([...zn,...oa]))}if(!gr.selection)for(const oa of(t.planeReservationRetryCount??0)===0?gr.conflictDomainIndices:gr.emptyDomainIndices.slice(0,1))le.add(Io[oa].planeBus.busId)}else Ji=oi(Io,[]);Lo=Ji?[...vt,...Ji.flatMap(wi=>wi.plans)]:null}else Lo=Hn(ur,vt);if(o("plane-route:alternate-search",Lo?"complete":"failed",Qt,`depth:${qn}/${ur.length}`,[...En].toSorted(([,Io],[,gi])=>gi-Io)),!Lo)return null;if(vt=Lo,m)return Ho=[],new Map([...Nn,...Lo.filter(Io=>Io.via).map(Io=>[Io.connectionIndex,Io.via.center])])}let zi=new Set,bi=[...Co],Ar=[],ws=[...Y],ds=new Map,Et=new Map;const Gt=()=>{zi=new Set(vt.map(Nt=>Nt.busId));const Qt=vt.flatMap(Nt=>[...Nt.segments,...Nt.planeEndpointSegments??[]].map(_n=>({connectionIndex:Nt.connectionIndex,segment:_n})));bi=[...Co,...Qt],Ar=vt.flatMap(Nt=>[Nt.via,...Nt.additionalVias??[],Nt.planeEndpointVia].flatMap(_n=>_n?[{connectionIndex:Nt.connectionIndex,center:_n.center,diameter:_n.diameter,spanLayers:_n.spanLayers}]:[])),ws=Y.filter(Nt=>!zi.has(Nt.busId)),ds=new Map,Et=new Map;for(const Nt of pw(ws,{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,blockingSegments:bi,blockingVias:Ar,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we})){ds.set(Nt.connectionIndex,(ds.get(Nt.connectionIndex)??0)+1);const _n=Et.get(Nt.connectionIndex)??[];_n.push(Nt.point),Et.set(Nt.connectionIndex,_n)}};Gt();for(let Qt=0;Qt<Y.length;Qt++){const Nt=ws.filter(_n=>!ds.has(_n.connections[0].connectionIndex));if(Nt.length===0)break;if(o("plane-route:promote-zero-candidates",Nt.map(_n=>_n.busId)),Nt.some(_n=>uo.includes(_n)))return null;for(const _n of Nt){const qn=t.busLayerAssignments[_n.busId];if(!qn)return null;const En=BO({srj:this.routingSrj,bus:_n,targetLayer:qn,acceptedPlans:[...nn,...vt],layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache},8)[0];if(!En)return o("plane-route:promote-failed",_n.busId),qt(nn,new Set([...zn,...Nt.map(Rn=>Rn.busId)]));vt.push(...En)}Gt()}const Rt=FA.env.FANOUT_DEBUG_PLANE_MATCH_ORDER?.split(",")??[],Ht=ws.toSorted((Qt,Nt)=>{const _n=(ds.get(Qt.connections[0].connectionIndex)??0)-(ds.get(Nt.connections[0].connectionIndex)??0);if(_n!==0)return _n;const qn=Rt.indexOf(Qt.busId),En=Rt.indexOf(Nt.busId),Rn=(qn<0?Rt.length:qn)-(En<0?Rt.length:En);return Rn!==0?Rn:Qt.connections[0].connectionIndex-Nt.connections[0].connectionIndex});for(const Qt of Ht){if(uo.includes(Qt))continue;FA.env.FANOUT_DEBUG_PLANE_CANDIDATES?.split(",").includes(Qt.busId)&&o("plane-match:candidates",Qt.busId,Et.get(Qt.connections[0].connectionIndex));const Nt=pd([...uo,Qt,...ro],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:On,blockingSegments:bi,blockingVias:[...To,...Ar],additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});if(o(Nt?"plane-match:incremental":"plane-match:incremental-failed",Qt.busId,ds.get(Qt.connections[0].connectionIndex)??0,Nt?.get(Qt.connections[0].connectionIndex),Nt?.size??"failed"),!Nt)return null;On=new Map([...On,...Nt]),uo.push(Qt)}return Ho=uo.filter(Qt=>!zi.has(Qt.busId)),o("plane-match:incremental-complete",On.size),On}const Ro=pd([...Y,...ro],{viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,traceWidth:this.config.traceWidth,clearance:this.config.clearance,maximumSearchStates:1e5,preferredBoundaryPerpendicularSideByBusId:ve,preferBoundaryOutwardByBusId:he,fixedViaPointsByConnectionIndex:Nn,blockingSegments:Co,blockingVias:To,additionalObstacles:j,preferPlaneCheckerboardSites:g,canShareCopper:we});return Ro?new Map([...Nn,...Ro]):null};o("length-match:start",Jt.length);const Zt=_?{plans:Jt}:zy({plans:Jt,preparedBuses:this.preparedBuses,inputSrj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,allowMatchingInsideDenseBounds:!0,candidatePlansAreFeasible:nn=>{const zn=qt(nn);return zn?(qe=zn,!0):!1}});if(o("length-match:complete",Zt.plans?.length??"failed"),this.setInProgressPlans({phase:"match-dense-boundary-lengths",plans:Zt.plans??Jt,strategy:"default",unitIndex:++kt,unitCount:it}),yield,Zt.plans){Jt=Zt.plans;const nn=qe??qt(Jt);nn?(Xt=nn,Jt.push(...vt)):yn=!1}else yn=!1;this.setInProgressPlans({phase:"rematch-dense-via-sites",plans:Jt,strategy:"default",unitIndex:kt,unitCount:it}),yield}if(yn)for(const qe of Ho??Y){o("plane-route:start",qe.busId);const vt=t.busLayerAssignments[qe.busId],qt=new Map;let Zt=vt?nR({srj:this.routingSrj,bus:qe,targetLayer:vt,acceptedPlans:Jt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:qt,fixedViaPointsByConnectionIndex:Xt}):null;if(!Zt&&vt&&a&&(Zt=nR({srj:this.routingSrj,bus:qe,targetLayer:vt,acceptedPlans:Jt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:qt}),Zt&&(Xt=new Map([...Xt,...Zt.flatMap(nn=>nn.via?[[nn.connectionIndex,nn.via.center]]:[])]))),!Zt){o("plane-route:failed",qe.busId,Xt.get(qe.connections[0].connectionIndex),[...qt]),yn=!1;break}Jt.push(...Zt),o("plane-route:complete",qe.busId),this.setInProgressPlans({phase:"route-dense-plane-buses",plans:Jt,strategy:"default",unitIndex:++kt,unitCount:it,busId:qe.busId}),yield}if(yn&&_){const qe={plans:Jt,preparedBuses:this.preparedBuses,inputSrj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:te,allowMatchingInsideDenseBounds:!0,allowPairLaneSpreading:!0,allowUnconstrainedLaneRerouting:!0};let vt=zy(qe);const qt=new Set;for(;!vt.plans&&vt.failedBus&&!qt.has(vt.failedBus.busId);){const Zt=vt.failedBus;qt.add(Zt.busId);const nn=_vo({plans:Jt,bus:Zt,srj:this.inputSrj,sharedBoundary:this.getValidationBoundary(),layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,allowSameNetMerges:te});if(nn.every((zn,Nn)=>zn===Jt[Nn]))break;Jt=nn,vt=zy({...qe,plans:Jt})}vt.plans?Jt=vt.plans:yn=!1,this.setInProgressPlans({phase:"match-dense-complete-lengths",plans:Jt,strategy:"default",unitIndex:++kt,unitCount:it}),yield}const Ao=yn&&Wh({plans:Jt,srj:this.routingSrj,sharedBoundary:U[0].sharedBoundary,clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:te});if(o("dense-validation",yn,Jt.length,Ao),Ao){const qe=this.normalizeCompletePlanCorners(Jt);if(qe){const vt=aR({inputSrj:this.inputSrj,plans:qe,layerNames:this.config.layerNames});if(this.validateCompletePlans(qe,vt).valid)return{plans:qe,failedBusIds:[],stopAfterCompleteValidation:!0}}}}if((u||h)&&le.size>0&&(t.planeReservationRetryCount??0)<5){const Xe=[...le].filter(dt=>!ne.some(Ut=>Ut.busId===dt)),Ze=(t.planeReservationRetryCount??0)===0?FSo({candidateBusIds:Xe,activeBusIds:new Set(ne.map(dt=>dt.busId)),planeBuses:Y}):Xe;if(Ze.length>0)return o("plane-reservation-core",Ze),o("promote-reservations",Ze),yield*this.routeDenseThroughAllMixedTerminationSteps({...t,preferredBoundaryViaPoints:e,promotedPlaneReservationBusIds:[...t.promotedPlaneReservationBusIds??[],...Ze],planeReservationRetryCount:(t.planeReservationRetryCount??0)+1})}if(_&&!ge)return yield*this.routeDenseThroughAllMixedTerminationSteps({...t,lengthMatchingStage:"before-planes"});if(n&&!g){const Xe=yield*this.routeDenseThroughAllMixedTerminationSteps({...t,denseRoutingStrategy:"boundary-aligned"});if(Xe)return Xe;if(!d&&_e){const Ze=_e.busId,dt=he.get(Ze)??!0,Ut=ve.get(Ze)??1;for(const[Wt,Xt]of[[!dt,-Ut],[!dt,Ut],[dt,-Ut],[dt,Ut]]){const Jt=yield*this.routeDenseThroughAllMixedTerminationSteps({...t,boundaryRecovery:{busId:Ze,preferOutward:Wt,perpendicularSide:Xt}});if(Jt)return Jt}}}if(!n||FA.env.FANOUT_DEBUG_DENSE_ONLY==="1")return null;const Yt=8,pn=(Xe,Ze=[])=>{let dt=[{plans:[...Ze],failedBusIds:[]}];for(const Ut of U){const Wt=t.busLayerAssignments[Ut.busId];if(!Wt)return null;const Xt=[],Jt=dt.map(yn=>({state:yn,alternatives:BO({srj:this.routingSrj,bus:Ut,targetLayer:Wt,acceptedPlans:yn.plans,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache},Xe)}));for(let yn=0;yn<Xe;yn++){for(const{state:An,alternatives:kn}of Jt){const $n=kn[yn];if($n&&(Xt.push({plans:[...An.plans,...$n],failedBusIds:[]}),Xt.length>=Yt))break}if(Xt.length>=Yt)break}if(Xt.length===0)return null;dt=Xt}return dt},be=Xe=>{if(U.length!==2)return null;const[Ze,dt]=U;if(!Ze||!dt)return null;const Ut=(ht,Kt,rn)=>{const Lt=t.busLayerAssignments[ht.busId];return Lt?BO({srj:this.routingSrj,bus:ht,targetLayer:Lt,acceptedPlans:Kt,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,rejectedViaMinimalCandidates:rn,stopAfterFirstRejectedViaMinimalCandidate:rn!==void 0},1)[0]??null:null},Wt=Ut(Ze,[...Xe]);if(!Wt)return null;const Xt=[],Jt=Ut(dt,[...Xe,...Wt],Xt);if(Jt)return{plans:[...Xe,...Wt,...Jt],failedBusIds:[]};const yn=Xt[0];if(!yn)return null;const An=yn.map(ht=>({...ht,termination:{type:"plane",layer:ht.targetLayer}})),kn=Ut(Ze,[...Xe,...An]);if(!kn)return null;const $n=[...Xe,...kn,...yn];return Wh({plans:$n,srj:this.routingSrj,sharedBoundary:Ze.sharedBoundary,clearance:this.config.clearance,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges})?{plans:$n,failedBusIds:[]}:null},et=new Map(Y.map(Xe=>[Xe.busId,Xe])),It=(Xe,Ze,dt)=>{const Ut=t.busLayerAssignments[Xe.busId];return Ut?nR({srj:this.routingSrj,bus:Xe,targetLayer:Ut,acceptedPlans:Ze,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:!1,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:dt}):null},Bt=(Xe,Ze)=>{const dt={plans:[...Xe],failedBusIds:[]};for(const Ut of Ze){const Wt=new Map;let Xt=It(Ut,dt.plans,Wt);if(!Xt){const Jt=[...Wt.entries()].filter(([An])=>dt.plans.some(kn=>kn.busId===An)).filter(([An])=>et.has(An)).toSorted(([,An],[,kn])=>kn-An).slice(0,8).map(([An])=>An),yn=[...Jt.map(An=>[An]),...Jt.flatMap((An,kn)=>Jt.slice(kn+1).map($n=>[An,$n]))];for(const An of yn){const kn=new Set(An),$n=dt.plans.filter(rn=>!kn.has(rn.busId)),ht=It(Ut,$n);if(!ht)continue;$n.push(...ht);let Kt=!0;for(const rn of An){const Lt=et.get(rn),Ho=Lt?It(Lt,$n):null;if(!Ho){Kt=!1;break}$n.push(...Ho)}if(Kt){dt.plans=$n,Xt=[];break}}}Xt?dt.plans.push(...Xt):dt.failedBusIds.push(Ut.busId)}return dt};let mt=null,st=null;const xt=(Xe,Ze)=>{let dt=null;for(const Ut of Xe){let Wt=[...Ze];const Xt=new Set;for(let Jt=0;Jt<3;Jt++){const yn=Wt.map($n=>$n.busId).join("\0");if(Xt.has(yn))break;Xt.add(yn);const An=Bt(Ut.plans,Wt);if((!mt||An.plans.length>mt.plans.length||An.plans.length===mt.plans.length&&An.failedBusIds.length<mt.failedBusIds.length)&&(mt=An),(!dt||An.plans.length>dt.plans.length||An.plans.length===dt.plans.length&&An.failedBusIds.length<dt.failedBusIds.length)&&(dt=An),An.failedBusIds.length===0)return An;const kn=new Set(An.failedBusIds);Wt=[...An.failedBusIds.flatMap($n=>{const ht=et.get($n);return ht?[ht]:[]}),...Wt.filter($n=>!kn.has($n.busId))]}}return st=dt,null};for(const Xe of[1,4]){const Ze=pn(Xe);if(!Ze)continue;const dt=xt(Ze,Y);if(dt)return dt;const Ut=mt?.failedBusIds.slice(0,3);if(Xe===1&&Ut)for(const Wt of Ut){const Xt=[],Jt=new Set;let yn=Wt;for(let $n=0;$n<3&&yn;$n++){const ht=et.get(yn);if(!ht)break;const Kt=It(ht,Xt);if(!Kt)break;Xt.push(...Kt),Jt.add(yn);const rn=be(Xt);if(!rn)break;const Lt=xt([rn],Y.filter(Ao=>!Jt.has(Ao.busId)));if(Lt)return Lt;yn=st?.failedBusIds?.find(Ao=>!Jt.has(Ao))}if(Xt.length===0)continue;const An=pn(1,Xt);if(!An)continue;const kn=xt(An,Y.filter($n=>!Jt.has($n.busId)));if(kn)return kn}}return mt}*evaluateAssignmentWithStrategySteps(t,e,n){let o=[],i=[],r=new Map;const s=this.config.escapeLayers.length===1,a=s&&this.config.singleLayerPushAndShove&&!this.preparedBuses.some(y=>y.exitEdge&&y.preferredExit?.includes("-"));if(a){const y={srj:this.routingSrj,buses:this.preparedBuses,traceWidth:this.config.traceWidth,clearance:this.config.clearance,borderDistribution:this.config.borderDistribution};let x=pvo(y);!x&&this.config.singleLayerAdaptiveExits&&(this.setInProgressPlans({phase:"prepare-single-layer-adaptive-exits",plans:o,strategy:n}),yield,this.setInProgressPlans({phase:"route-single-layer-adaptive-exits",plans:o,strategy:n}),this.activeAdaptiveVisualization=null,x=yield{type:"subsolver",solver:this.createWorkSolver("SingleLayerAdaptiveExitSolver",AR({...y,availableBoundaryRegions:ONt(this.options.availableCornersAndSides),onProgress:(B,S)=>{this.activeAdaptiveVisualization=B,this.stats={...this.stats,...S}}}),void 0,()=>this.visualizeAdaptiveRoutingState())}),x?o.push(...x):i.push(...this.preparedBuses.map(E=>E.busId)),this.setInProgressPlans({phase:"route-single-layer",plans:o,strategy:n,unitIndex:1,unitCount:1}),yield}const A=[...this.preparedBuses].sort((y,x)=>{const E=a6(y),B=a6(x),S=this.config.layerNames.indexOf(e[y.busId]??""),Q=this.config.layerNames.indexOf(e[x.busId]??"");return lRt(y,x,this.config.allowBlindAndBuriedVias)||Number(B)-Number(E)||(E&&B?Q-S:0)||(n==="group-by-layer"?(e[y.busId]??"").localeCompare(e[x.busId]??""):0)||x.componentObstacles.length-y.componentObstacles.length||(s?wO(x)-wO(y):x.connections.length-y.connections.length||(n==="deep-first"?wO(x)-wO(y):wO(y)-wO(x)))});let c=null;!a&&n==="default"&&(c=yield{type:"subsolver",solver:this.createWorkSolver("PeripheralMixedTerminationSolver",this.routePeripheralMixedTerminationSteps({busLayerAssignments:e,busesInRoutingOrder:A}))}),!c&&!a&&n==="default"&&(c=yield{type:"subsolver",solver:this.createWorkSolver("DenseMixedTerminationSolver",this.routeDenseThroughAllMixedTerminationSteps({busLayerAssignments:e,busesInRoutingOrder:A}),()=>{const x=Number(this.stats.workUnit??0),E=Number(this.stats.workUnitCount??0);return E>0?x/E:0})}),!c&&!a&&n==="default"&&FA.env.FANOUT_DEBUG_DENSE_ONLY==="1"&&(c={plans:[],failedBusIds:this.preparedBuses.map(y=>y.busId)}),c&&(o=c.plans,i=c.failedBusIds,this.setInProgressPlans({phase:"route-dense-mixed-terminations",plans:o,strategy:n,unitIndex:this.preparedBuses.length,unitCount:this.preparedBuses.length}),yield);let l=`${n}|`,u=0;for(const y of a||c?[]:A){u++;const x=e[y.busId];if(!x)throw new Error(`FanoutSolver: assignment ${t} has no layer for bus "${y.busId}"`);l+=`${y.busId.length}:${y.busId};${x.length}:${x};`;const E=this.routingPrefixCache.get(l);if(E){o=[...E.plans],i=[...E.failedBusIds],r=new Map(E.blockingBusCounts),this.setInProgressPlans({phase:"route-assignment",plans:o,strategy:n,unitIndex:u,unitCount:A.length,busId:y.busId}),yield;continue}const B=new Map,S=nR({srj:this.routingSrj,bus:y,targetLayer:x,acceptedPlans:o,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache,blockingBusCounts:B});if(S)o.push(...S);else{i.push(y.busId);for(const[Q,w]of B)r.set(Q,(r.get(Q)??0)+w)}this.routingPrefixCache.set(l,{plans:[...o],failedBusIds:[...i],blockingBusCounts:new Map(r)}),this.setInProgressPlans({phase:"route-assignment",plans:o,strategy:n,unitIndex:u,unitCount:A.length,busId:y.busId}),yield}let g;const h=c?.stopAfterCompleteValidation===!0&&o.length===this.inputSrj.connections.length;if(!h&&o.length===this.inputSrj.connections.length){const y=this.matchCompletePlanLengths(o);if(y.plans)o=y.plans;else{const x=y.failedBus,E={code:"bus-length-skew",message:`Bus ${x.busId} could not satisfy its ${x.maxLengthSkew.toFixed(6)}mm routed-length skew within the fanout boundary`,busId:x.busId};g=[E],this.lengthMatchingFailure??=E,o=[],i=[x.busId,...this.preparedBuses.map(B=>B.busId).filter(B=>B!==x.busId)],r.clear()}}if(!h&&o.length===this.inputSrj.connections.length){const y=this.normalizeCompletePlanCorners(o);y?o=y:(g=[{code:"fanout-normalization",message:"Completed fanout could not normalize every corner while preserving its original clearance and length constraints"}],o=[],i=this.preparedBuses.map(x=>x.busId),r.clear())}let d=aR({inputSrj:this.inputSrj,plans:o,layerNames:this.config.layerNames});const p=o.length===this.inputSrj.connections.length?this.validateCompletePlans(o,d):null;p&&!p.valid&&(g=p.issues,o=[],i=this.preparedBuses.map(y=>y.busId),r.clear(),d=aR({inputSrj:this.inputSrj,plans:o,layerNames:this.config.layerNames}));const m=this.preparedBuses.length-i.length,_=o.reduce((y,x)=>y+x.length,0),I=(this.inputSrj.connections.length-o.length)*1e6+i.length*1e5+_+bue(o)*.1+Eue(e,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config),C={assignmentIndex:t,busLayerAssignments:e,routedBusCount:m,routedConnectionCount:o.length,failedBusIds:i,score:I,...g?{validationIssues:g}:{}};return this.setInProgressPlans({phase:"finalize-assignment-strategy",plans:o,strategy:n}),{summary:C,plans:o,...c?.stopAfterCompleteValidation&&p?.valid?{stopAfterCompleteValidation:!0}:{},blockingBusIds:[...r.entries()].toSorted(([,y],[,x])=>x-y).map(([y])=>y),outputSrj:d}}*evaluateAssignmentSteps(t,e){let n=yield*this.evaluateAssignmentWithStrategySteps(t,e,"default");if(FA.env.FANOUT_DEBUG_DENSE_ONLY==="1"||n.summary.routedConnectionCount===this.inputSrj.connections.length&&(n.stopAfterCompleteValidation||this.getCoordinatedAdditionalViaCount(n.plans)===0))return n;for(const o of["group-by-layer","deep-first"]){const i=yield*this.evaluateAssignmentWithStrategySteps(t,e,o);if(this.isAttemptBetter(i,n)&&(n=i),n.summary.routedConnectionCount===this.inputSrj.connections.length&&(n.stopAfterCompleteValidation||this.getCoordinatedAdditionalViaCount(n.plans)===0))return n}return n}*evaluateGroupedBeamSteps(t,e=!1){if(this.config.escapeLayers.length<2||this.preparedBuses.length>56)return null;const n=this.inputSrj.connections.length;if(n>64||new Set(this.preparedBuses.map(C=>C.componentId)).size!==1)return null;const o=C=>{const y=this.config.layerNames.indexOf(C.connections[0]?.sourceLayer??""),x=C.termination.type==="plane"?[C.termination.layer]:this.escapeLayersByBusId[C.busId]??this.config.escapeLayers;return Math.max(0,...x.map(E=>Math.abs(this.config.layerNames.indexOf(E)-y)))},i=[...this.preparedBuses].sort((C,y)=>{const x=a6(C),E=a6(y),B=C.termination.type==="plane"?1:this.escapeLayersByBusId[C.busId]?.length??this.config.escapeLayers.length,S=y.termination.type==="plane"?1:this.escapeLayersByBusId[y.busId]?.length??this.config.escapeLayers.length;return lRt(C,y,this.config.allowBlindAndBuriedVias)||Number(E)-Number(x)||(x&&E?o(y)-o(C):0)||(e?C.direction.localeCompare(y.direction):0)||B-S||y.componentObstacles.length-C.componentObstacles.length||y.connections.length-C.connections.length||oMe(y)-oMe(C)||C.busId.localeCompare(y.busId)}),r=n<=24,s=this.preparedBuses.some(C=>C.connections.length>1),a=r?48:n<=32?24:12,A=r&&!s?4:1;let c=[{assignment:{},plans:[]}];const l=C=>{const y=C.plans.reduce((B,S)=>B+S.length,0),x=bue(C.plans),E=this.preparedBuses.reduce((B,S)=>{if(S.termination.type!=="boundary"||!nMe(S))return B;const Q=S.connections[0]?.sourceLayer,w=PO(S)??Q;return C.assignment[S.busId]===w?B:B+S.connections.length},0);return y+x*.1+E*1e4+Eue(C.assignment,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config)};let u=0;for(const C of i){u++;const y=[];for(const E of c){const B=C.termination.type==="plane"?[C.termination.layer]:this.escapeLayersByBusId[C.busId]??this.config.escapeLayers,S=new Map;for(const[R,F]of Object.entries(E.assignment)){const O=this.preparedBuses.find(U=>U.busId===R);S.set(F,(S.get(F)??0)+(this.config.balanceLayerLoadByConnectionCount?O?.connections.length??1:1))}const Q=C.connections[0]?.sourceLayer,w=PO(C),M=nMe(C),k=B.toSorted((R,F)=>(S.get(R)??0)-(S.get(F)??0)||+(F===w)-+(R===w)||(M?+(F===Q)-+(R===Q):+(R===Q)-+(F===Q))||R.localeCompare(F));for(const R of k){const F=BO({srj:this.routingSrj,bus:C,targetLayer:R,acceptedPlans:E.plans,layerNames:this.config.layerNames,traceWidth:this.config.traceWidth,viaDiameter:this.config.viaDiameter,viaHoleDiameter:this.config.viaHoleDiameter,clearance:this.config.clearance,compactBusTracks:this.config.compactBusTracks,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias,allowSameNetMerges:this.config.allowSameNetMerges,staticClearanceCache:this.routeStaticClearanceCache},A);for(const O of F)y.push({assignment:{...E.assignment,[C.busId]:R},plans:[...E.plans,...O]})}}if(y.length===0)return null;y.sort((E,B)=>{const S=this.getCoordinatedAdditionalViaCount(E.plans)-this.getCoordinatedAdditionalViaCount(B.plans);if(S!==0)return S;const Q=l(E)-l(B);return Math.abs(Q)>1e-9?Q:JSON.stringify(E.assignment).localeCompare(JSON.stringify(B.assignment))});const x=new Map;c=[];for(const E of y){const B=JSON.stringify(E.assignment),S=x.get(B)??0;if(!(S>=2)&&(x.set(B,S+1),c.push(E),c.length>=a))break}this.setInProgressPlans({phase:"route-grouped-beam",plans:c[0]?.plans??[],strategy:"grouped-beam",unitIndex:u,unitCount:i.length,busId:C.busId}),yield}let g,h,d=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY;const m=C=>C.plans.reduce((y,x)=>y+x.length,0)+bue(C.plans)*.1+Eue(C.assignment,this.preparedBuses,this.config.balanceLayerLoadByConnectionCount)*Bue(this.config),_=this.preparedBuses.some(C=>C.maxLengthSkew!==void 0);for(const C of c){if(C.plans.length!==this.inputSrj.connections.length){yield;continue}const y=this.matchCompletePlanLengths(C.plans);if(!y.plans){yield;continue}const x=this.normalizeCompletePlanCorners(y.plans);if(!x){yield;continue}const E=aR({inputSrj:this.inputSrj,plans:x,layerNames:this.config.layerNames});if(!this.validateCompletePlans(x,E).valid){yield;continue}const B={...C,plans:x},S=this.getCoordinatedAdditionalViaCount(x),Q=m(B);if((!g||S<p||S===p&&Q<d)&&(g=B,h=E,d=Q,p=S),!_)break;this.setInProgressPlans({phase:"validate-grouped-beam",plans:x,strategy:"grouped-beam"}),yield}if(!g||!h)return null;const f=d;return Number.isFinite(f)?{summary:{assignmentIndex:t,busLayerAssignments:g.assignment,routedBusCount:this.preparedBuses.length,routedConnectionCount:g.plans.length,failedBusIds:[],score:f},plans:g.plans,blockingBusIds:[],outputSrj:h}:null}*evaluateGroupedBeamAlternativesSteps(t){const e=yield*this.evaluateGroupedBeamSteps(t);return e||(yield*this.evaluateGroupedBeamSteps(t,!0))}prioritizeFailedBusRepairs(t,e,n){const o=JSON.stringify(t),i=this.assignmentRepairDepthByKey.get(o)??0;if(i>=2)return;const r=8,s=[],a=new Set,A=l=>{const u=JSON.stringify(l);a.has(u)||this.evaluatedAssignmentKeys.has(u)||this.queuedAssignmentKeys.has(u)||(a.add(u),this.queuedAssignmentKeys.add(u),this.assignmentRepairDepthByKey.set(u,i+1),s.push(l))},c=[];for(let l=0;l<Math.max(e.length,n.length);l++){const u=e[l],g=n[l];u&&!c.includes(u)&&c.push(u),g&&!c.includes(g)&&c.push(g)}for(const l of e){const u=t[l],g=this.escapeLayersByBusId[l];if(!(!u||!g)){for(const h of n.slice(0,4)){const d=t[h],p=this.escapeLayersByBusId[h];if(!(!d||!p||!g.includes(d)||!p.includes(u))&&(A({...t,[l]:d,[h]:u}),s.length>=r))break}if(s.length>=r)break}}for(const l of c){const u=t[l],g=this.escapeLayersByBusId[l];if(!u||!g)continue;const h=g.indexOf(u);for(let d=1;d<g.length;d++){const p=g[(Math.max(h,0)+d)%g.length];if(p!==u&&(A({...t,[l]:p}),s.length>=r))break}if(s.length>=r)break}this.pendingRepairAssignments.push(...s)}hasCompleteBestAttempt(){return this.bestAttempt?.summary.routedConnectionCount===this.inputSrj.connections.length}getCoordinatedAdditionalViaCount(t){const e=new Set(this.preparedBuses.filter(a6).map(n=>n.busId));return t.reduce((n,o)=>n+(e.has(o.busId)?o.additionalVias?.length??0:0),0)}isAttemptBetter(t,e){if(t.summary.routedConnectionCount!==e.summary.routedConnectionCount)return t.summary.routedConnectionCount>e.summary.routedConnectionCount;if(t.summary.routedBusCount!==e.summary.routedBusCount)return t.summary.routedBusCount>e.summary.routedBusCount;const n=this.getCoordinatedAdditionalViaCount(t.plans),o=this.getCoordinatedAdditionalViaCount(e.plans);return n!==o?n<o:t.summary.score<e.summary.score}hasGloballyViaMinimalBestAttempt(){return!this.hasCompleteBestAttempt()||!this.bestAttempt||this.preparedBuses.length===0||!this.preparedBuses.every(a6)?!1:this.bestAttempt.plans.every(t=>t.via!==void 0&&(t.additionalVias?.length??0)===0)}shouldEvaluateGroupedBeam(){return this.groupedBeamEvaluated||this.nextAssignmentIndex===0?!1:this.hasCompleteBestAttempt()||this.pendingRepairAssignments.length===0||this.nextAssignmentIndex>=this.config.maxLayerCombinations}commitGroupedBeamAttempt(t){if(!t){this.hasCompleteBestAttempt()&&this.bestAttempt&&this.getCoordinatedAdditionalViaCount(this.bestAttempt.plans)===0&&(this.completeBestAttemptEndpoints(),this.solved=!0);return}this.attempts.push(t.summary),(!this.bestAttempt||this.isAttemptBetter(t,this.bestAttempt))&&(this.bestAttempt=t);const e=this.bestAttempt.summary;this.stats={phase:"complete-grouped-beam",assignment:e.assignmentIndex<0?0:e.assignmentIndex+1,assignmentCount:this.config.maxLayerCombinations,routedBuses:`${e.routedBusCount}/${this.preparedBuses.length}`,routedConnections:`${e.routedConnectionCount}/${this.inputSrj.connections.length}`,failedBuses:"none",bestScore:e.score},this.getCoordinatedAdditionalViaCount(this.bestAttempt.plans)===0&&(this.completeBestAttemptEndpoints(),this.solved=!0)}commitAssignmentAttempt(t,e){this.nextAssignmentIndex++,this.evaluatedAssignmentKeys.add(JSON.stringify(t)),(!this.bestAttempt||e.summary.routedConnectionCount>=this.bestAttempt.summary.routedConnectionCount)&&this.prioritizeFailedBusRepairs(t,e.summary.failedBusIds,e.blockingBusIds),this.attempts.push(e.summary),(!this.bestAttempt||this.isAttemptBetter(e,this.bestAttempt))&&(this.bestAttempt=e),this.stats={phase:"complete-assignment",assignment:e.summary.assignmentIndex+1,assignmentCount:this.config.maxLayerCombinations,routedBuses:`${e.summary.routedBusCount}/${this.preparedBuses.length}`,routedConnections:`${e.summary.routedConnectionCount}/${this.inputSrj.connections.length}`,failedBuses:e.summary.failedBusIds.join(", ")||"none",bestScore:this.bestAttempt.summary.score},(e.stopAfterCompleteValidation&&this.hasCompleteBestAttempt()||this.groupedBeamEvaluated&&e.summary.routedConnectionCount===this.inputSrj.connections.length&&this.getCoordinatedAdditionalViaCount(this.bestAttempt.plans)===0)&&(this.completeBestAttemptEndpoints(),this.solved=!0)}getNextAssignment(){let t;for(;!t&&this.nextAssignmentIndex<this.config.maxLayerCombinations;){const e=this.nextAssignmentIndex%3===0;let n,o=!1;if(!this.groupedBeamEvaluated&&this.nextAssignmentIndex>0?(n=this.pendingRepairAssignments.pop(),o=n!==void 0):e?n=this.layerAssignments[this.nextGeneratedAssignmentIndex++]:(n=this.pendingRepairAssignments.pop(),o=n!==void 0),!n&&(this.groupedBeamEvaluated||this.nextAssignmentIndex===0)&&(n=e?this.pendingRepairAssignments.pop():this.layerAssignments[this.nextGeneratedAssignmentIndex++],o=e&&n!==void 0),!n)break;const i=JSON.stringify(n);o&&this.queuedAssignmentKeys.delete(i),!this.evaluatedAssignmentKeys.has(i)&&(t=n)}return t}finishWithoutAnotherAssignment(){if(this.hasCompleteBestAttempt()){this.completeBestAttemptEndpoints(),this.solved=!0;return}this.failed=!0;const t=this.lengthMatchingFailure?.message??this.bestAttempt?.summary.validationIssues?.[0]?.message;this.error=t?`FanoutSolver: ${t}`:this.bestAttempt?`FanoutSolver: best layer assignment routed ${this.bestAttempt.summary.routedConnectionCount}/${this.inputSrj.connections.length} connections`:"FanoutSolver: no layer assignment could be evaluated"}_step(){if(this.activeOperation){this.stepActiveOperation();return}if(!this.layerReservedRoutingEvaluated){this.layerReservedRoutingEvaluated=!0;const e=vSo(this.preparedBuses,this.config.allowBlindAndBuriedVias),n=!e&&KPe({...this.config,srj:this.routingSrj,buses:this.preparedBuses})!==null;if(n||e||this.shouldTryLayerReservedRouting()){this.startOperation({name:"FanoutLayerReservedSolver",generator:this.evaluateLayerReservedRoutingSteps(e,n),onSolved:o=>{if(!o){this.inProgressPlans=[],this.stats={phase:"layer-reserved-fallback"};return}const i=o.summary.busLayerAssignments;this.layerAssignments.push(i),this.routingInitialized=!0,this.commitAssignmentAttempt(i,o)},getProgress:()=>Number(this.stats.workUnit??0)/Math.max(1,this.inputSrj.connections.length)}),this.stats={phase:"prepare-layer-reserved-routing"};return}}if(!this.routingInitialized){this.startOperation({name:"FanoutCandidateLayerSolver",generator:this.initializeRoutingSteps(),onSolved:()=>{},getProgress:()=>this.nextCandidateLayerBusIndex/Math.max(1,this.boundaryBuses.length+1)});return}if(this.nextAssignmentIndex>0&&this.hasGloballyViaMinimalBestAttempt()){this.completeBestAttemptEndpoints(),this.solved=!0;return}if(this.shouldEvaluateGroupedBeam()){this.groupedBeamEvaluated=!0,this.startOperation({name:"FanoutGroupedBeamSolver",generator:this.evaluateGroupedBeamAlternativesSteps(-1),onSolved:e=>this.commitGroupedBeamAttempt(e),getProgress:()=>{const e=Number(this.stats.workUnit??0),n=Number(this.stats.workUnitCount??0);return n>0?e/n:0}}),this.stats={...this.stats,phase:"prepare-grouped-beam"};return}const t=this.getNextAssignment();if(!(!t&&!this.groupedBeamEvaluated)){if(!t){this.finishWithoutAnotherAssignment();return}this.startOperation({name:"FanoutAssignmentSolver",generator:this.evaluateAssignmentSteps(this.nextAssignmentIndex,t),onSolved:e=>this.commitAssignmentAttempt(t,e),getProgress:()=>{const e=this.stats.routingStrategy==="group-by-layer"?1:this.stats.routingStrategy==="deep-first"?2:0,n=Number(this.stats.workUnit??0),o=Number(this.stats.workUnitCount??0),i=o>0?Math.min(1,n/o):0;return(e+i)/3}}),this.stats={...this.stats,phase:"prepare-assignment",assignment:this.nextAssignmentIndex+1,assignmentCount:this.config.maxLayerCombinations,routedConnections:`0/${this.inputSrj.connections.length}`}}}computeProgress(){if(this.solved||this.failed)return 1;if(this.activeSubSolver?.getSolverName()==="FanoutLayerReservedSolver")return Math.min(.99,Number(this.stats.workUnit??0)/Math.max(1,this.inputSrj.connections.length));if(!this.routingInitialized)return .05*(this.nextCandidateLayerBusIndex/Math.max(1,this.boundaryBuses.length+1));let t=0;if(this.activeSubSolver?.getSolverName()==="FanoutAssignmentSolver"){const e=this.stats.routingStrategy==="group-by-layer"?1:this.stats.routingStrategy==="deep-first"?2:0,n=Number(this.stats.workUnit??0),o=Number(this.stats.workUnitCount??0),i=o>0?Math.min(1,n/o):0;t=(e+i)/3}return Math.min(.99,.05+.95*((this.nextAssignmentIndex+t)/this.config.maxLayerCombinations))}getConstructorParams(){return[this.inputSrj,this.options]}getOutput(){if(!this.solved||!this.bestAttempt)throw new Error("FanoutSolver: getOutput() called before a complete fanout was solved");const t=this.validateCompletePlans(this.bestAttempt.plans,this.bestAttempt.outputSrj);if(!t.valid)throw new Error(`FanoutSolver: completed output failed validation: ${t.issues[0]?.message??"unknown validation error"}`);const e=OSo({srj:this.endpointCompletion?.simpleRouteJson??this.bestAttempt.outputSrj,layerNames:this.config.layerNames,allowBlindAndBuriedVias:this.config.allowBlindAndBuriedVias}),n=new Map((e.traces??[]).map(o=>[o.pcb_trace_id,o]));return{simpleRouteJson:e,fanoutTraces:this.bestAttempt.plans.flatMap(o=>[n.get(o.trace.pcb_trace_id)??o.trace,...o.planeEndpointTrace?[n.get(o.planeEndpointTrace.pcb_trace_id)??o.planeEndpointTrace]:[]]),completionTraces:(this.endpointCompletion?.traces??[]).map(o=>n.get(o.pcb_trace_id)??o),...this.endpointCompletion?{endpointCompletion:this.endpointCompletion.report}:{},planeTerminations:this.bestAttempt.plans.flatMap(o=>o.termination.type==="plane"&&o.via?[{busId:o.busId,connectionName:o.connectionName,layer:o.termination.layer,via:o.via}]:[]),busLayerAssignments:this.bestAttempt.summary.busLayerAssignments,busDirections:Object.fromEntries(this.preparedBuses.map(o=>[o.busId,o.direction])),attempts:[...this.attempts],validation:t}}getOutputSimpleRouteJson(){return this.getOutput().simpleRouteJson}visualize(){return this.activeSubSolver?.visualize()??this.visualizeCurrentState()}},$vo=t=>{if(typeof t!="object"){const e=lt.parse(t);return{top:e,right:e,bottom:e,left:e}}return{top:t.top===void 0?0:lt.parse(t.top),right:t.right===void 0?0:lt.parse(t.right),bottom:t.bottom===void 0?0:lt.parse(t.bottom),left:t.left===void 0?0:lt.parse(t.left)}},qvo=t=>{const e=(t.ccwRotationDegrees??0)*Math.PI/180,n=Math.abs(Math.cos(e)),o=Math.abs(Math.sin(e));return{x:(n*t.width+o*t.height)/2,y:(o*t.width+n*t.height)/2}},Xvo=({preparedBuses:t,padding:e})=>{if(e===void 0)return;const n=new Map;for(const a of t)n.has(a.componentId)||n.set(a.componentId,a.componentObstacles.filter(A=>A.connectedTo.length>0));const o=[...n.values()].flat();if(o.length===0)throw new Error("Cannot apply fanout boundary padding without source pad obstacles");const i=o.map(a=>{const A=qvo(a);return{minX:a.center.x-A.x,maxX:a.center.x+A.x,minY:a.center.y-A.y,maxY:a.center.y+A.y}}),r=$vo(e),s={minX:Math.min(...i.map(a=>a.minX))-r.left,maxX:Math.max(...i.map(a=>a.maxX))+r.right,minY:Math.min(...i.map(a=>a.minY))-r.bottom,maxY:Math.max(...i.map(a=>a.maxY))+r.top};for(const a of t)if(a.termination.type==="boundary")for(const A of a.connections)a.direction==="left"||a.direction==="right"?(s.minY=Math.min(s.minY,A.targetPoint.y),s.maxY=Math.max(s.maxY,A.targetPoint.y)):(s.minX=Math.min(s.minX,A.targetPoint.x),s.maxX=Math.max(s.maxX,A.targetPoint.x));return s},Zvo=t=>Math.round(t*1e3)/1e3,ewo=(t,e)=>{let n;for(const o of t.obstacles){if(!o.componentId||!e.has(o.componentId))continue;const i=o.center.x-o.width/2,r=o.center.x+o.width/2,s=o.center.y-o.height/2,a=o.center.y+o.height/2;n=n?{minX:Math.min(n.minX,i),maxX:Math.max(n.maxX,r),minY:Math.min(n.minY,s),maxY:Math.max(n.maxY,a)}:{minX:i,maxX:r,minY:s,maxY:a}}return n},two=(t,e)=>Math.min(t.minX-e.minX,e.maxX-t.maxX,t.minY-e.minY,e.maxY-t.maxY),nwo=({input:t,solverError:e,componentIds:n,sharedBoundary:o,componentNamesById:i})=>{const r=e?.match(/routed (\d+)\/(\d+) connections/),s=r?Number(r[1]):void 0,a=r?Number(r[2]):t.connections.length,A=[...n].map(g=>i?.get(g)??g).sort(),c=A.length>0?` for ${A.join(", ")}`:"",l=[s===void 0?`Fanout failed${c}: ${e??"the fanout solver did not report a reason"}.`:`Fanout failed${c}: only ${s} of ${a} connections could escape to the breakout boundary.`],u=ewo(t,n);if(u&&o){const g=two(u,o);l.push(`The breakout boundary is ${Zvo(g)}mm from the pads at its narrowest point, which all ${a} escapes have to share.`)}return l.push("Give the fanout more room by increasing the breakout's padding, or by extending the breakout to include the parts crowding it (decoupling capacitors, series resistors) so their pads sit inside the boundary instead of against it."),l.join(" ")},owo=(t,e)=>Math.abs(t.minX-e.minX)>1e-6||Math.abs(t.maxX-e.maxX)>1e-6||Math.abs(t.minY-e.minY)>1e-6||Math.abs(t.maxY-e.maxY)>1e-6,iwo=(t,e)=>{if(!(!t&&e.length===0))return{minX:Math.min(t?.minX??Number.POSITIVE_INFINITY,...e.map(n=>n.x)),maxX:Math.max(t?.maxX??Number.NEGATIVE_INFINITY,...e.map(n=>n.x)),minY:Math.min(t?.minY??Number.POSITIVE_INFINITY,...e.map(n=>n.y)),maxY:Math.max(t?.maxY??Number.NEGATIVE_INFINITY,...e.map(n=>n.y))}},rwo=(t,e)=>t?.map(n=>{const{preferredLayer:o,preferredLayers:i,...r}=n,s=e?.[n.busId],a=s===void 0?void 0:rMe(s),A=a&&a!=="center"&&sMe(a)?a:void 0,c={...r,...n.termination?.type==="plane"?{}:A?{exitPosition:A}:{}},l=[...o===void 0?[]:[o],...i??[]].filter((h,d,p)=>p.indexOf(h)===d);if(l.length===0)return c;const u=n.allowedLayers,g=u===void 0?l:l.filter(h=>u.includes(h));return{...c,allowedLayers:g}}),rMe=t=>typeof t=="string"?t:t.direction,swo=new Set(rlt),sMe=t=>swo.has(t),awo=t=>{switch(t){case"top_left":return"top-left";case"top_center":return"top";case"top_right":return"top-right";case"center_left":return"left";case"center":return;case"center_right":return"right";case"bottom_left":return"bottom-left";case"bottom_center":return"bottom";case"bottom_right":return"bottom-right"}},Awo=t=>{switch(t){case"top_left":case"top_center":case"top_right":return"up";case"center_left":return"left";case"center":return;case"center_right":return"right";case"bottom_left":case"bottom_center":case"bottom_right":return"down"}},cwo=t=>{const e=rMe(t);return sMe(e)?XDt(e).direction:Awo(e)},lwo=(t,e)=>t.obstacles.find(o=>o.componentId&&o.layers.includes(e.layer)&&(e.pointId&&o.connectedTo.includes(e.pointId)||e.x>=o.center.x-o.width/2&&e.x<=o.center.x+o.width/2&&e.y>=o.center.y-o.height/2&&e.y<=o.center.y+o.height/2))?.componentId,uwo=(t,e)=>{const n=new Set(e.connectionNames),o=new Map;for(const f of t.connections)if(n.has(f.name))for(const I of f.pointsToConnect){const C=lwo(t,I);if(!C)continue;const y=o.get(C)??[];y.push(I),o.set(C,y)}const i=[...o.entries()].sort(([f,I],[C,y])=>y.length-I.length||f.localeCompare(C))[0];if(!i)return;const[r,s]=i,a=t.obstacles.filter(f=>f.componentId===r);if(a.length===0)return;const A=a.map(f=>f.center.x),c=a.map(f=>f.center.y),l=Math.min(...A),u=Math.max(...A),g=Math.min(...c),h=Math.max(...c),d={x:(l+u)/2,y:(g+h)/2},p={x:Math.max((u-l)/2,1e-6),y:Math.max((h-g)/2,1e-6)},m={x:s.reduce((f,I)=>f+I.x,0)/s.length,y:s.reduce((f,I)=>f+I.y,0)/s.length},_={x:(m.x-d.x)/p.x,y:(m.y-d.y)/p.y};return Math.abs(_.x)>Math.abs(_.y)?_.x>=0?"right":"left":Math.abs(_.y)>1e-9?_.y>=0?"up":"down":"right"},gwo=({fanoutSimpleRouteJson:t,sourceComponentIds:e})=>{const n=new Map;for(const i of t.obstacles){if(!i.componentId||!e.has(i.componentId))continue;const r=n.get(i.componentId)??[];r.push(i),n.set(i.componentId,r)}const o=[];for(const[i,r]of n){const s=Math.min(...r.map(l=>l.center.x-l.width/2)),a=Math.max(...r.map(l=>l.center.x+l.width/2)),A=Math.min(...r.map(l=>l.center.y-l.height/2)),c=Math.max(...r.map(l=>l.center.y+l.height/2));o.push({obstacleId:`fanout-source-keepout:${i}`,componentId:i,isFanoutSourceKeepout:!0,type:"rect",layers:WN(t.layerCount),center:{x:(s+a)/2,y:(A+c)/2},width:a-s,height:c-A,connectedTo:[]})}return{...t,obstacles:[...t.obstacles.filter(i=>!i.componentId||!e.has(i.componentId)),...o]}},aMe=class xit{constructor(e,n){this.input=e,this.options=n}input;options;isRouting=!1;outputSimpleRouteJson;startTimeoutId;eventHandlers={complete:[],error:[],progress:[]};getLegacyBusExitPreferences(){if(!this.options.busFanoutDirections)return;const e=new Set(this.input.buses?.map(i=>i.busId)??[]),n=new Set(this.input.buses?.filter(i=>i.termination?.type==="plane").map(i=>i.busId)??[]),o={};for(const[i,r]of Object.entries(this.options.busFanoutDirections)){if(!e.has(i))throw new Error(`Fanout direction references unknown bus "${i}" in this autorouting phase`);if(n.has(i))continue;const s=rMe(r);if(sMe(s))continue;const a=awo(s);a&&(o[i]=a)}return Object.keys(o).length>0?o:void 0}getPlaneBusDirections(){const e=this.input.buses?.filter(i=>i.termination?.type==="plane")??[],n=new Set(e.map(i=>i.busId)),o={};for(const[i,r]of Object.entries(this.options.busFanoutDirections??{})){if(!n.has(i))continue;const s=cwo(r);s&&(o[i]=s)}for(const i of e){if(o[i.busId])continue;const r=uwo(this.input,i);r&&(o[i.busId]=r)}return Object.keys(o).length>0?o:void 0}getFanoutSolverOptions(){const e={buses:rwo(this.input.buses,this.options.busFanoutDirections),borderDistribution:"even",compactBusTracks:!0,busDirections:this.getPlaneBusDirections(),busExitPreferences:this.getLegacyBusExitPreferences(),escapeLayers:this.options.fanoutRoutingLayers,allowBlindAndBuriedVias:this.options.allowBlindAndBuriedVias??this.input.allowBlindAndBuriedVias};return this.options.mode==="single_layer_fanout"?{...e,escapeLayers:["top"],singleLayerPushAndShove:!0}:e}static resolveFanoutBounds(e,n){let o,i;if(n.fanoutBoundaryPadding!==void 0){const r=new xit(e,n),s=new Sue(e,r.getFanoutSolverOptions());o=Xvo({preparedBuses:s.preparedBuses,padding:n.fanoutBoundaryPadding})}else if(n.fanoutBounds===void 0){const r=new xit(e,n);i=new Sue(e,r.getFanoutSolverOptions()).preparedBuses[0]?.sharedBoundary}return n.fanoutBounds&&o&&owo(n.fanoutBounds,o)&&n.onFanoutBoundsConflict?.(),iwo(n.fanoutBounds??o??i,n.breakoutPoints??[])}solveFanout(){const e=this.getFanoutSolverOptions(),n=new Sue(this.input,{...e,...this.options.fanoutBounds?{sharedBoundary:this.options.fanoutBounds}:{}}),o=n.getConstructorParams();if(this.options.onSolverStarted?.({solverName:"FanoutSolver",solverParams:o[0],solverConstructorArgs:o}),n.solve(),n.failed)throw new Error(nwo({input:this.input,solverError:n.error,componentIds:new Set(n.preparedBuses.map(a=>a.componentId)),sharedBoundary:this.options.fanoutBounds??e.sharedBoundary,componentNamesById:this.options.componentNamesById}));const i=n.getOutput(),r=i.simpleRouteJson,s=i.fanoutTraces;return{downstreamSimpleRouteJson:gwo({fanoutSimpleRouteJson:r,sourceComponentIds:new Set(n.preparedBuses.map(a=>a.componentId))}),fanoutTraces:s,debugGraphics:n.visualize()}}startFanout(){try{const{downstreamSimpleRouteJson:e,fanoutTraces:n,debugGraphics:o}=this.solveFanout();if(!this.isRouting)return;this.outputSimpleRouteJson=e,this.emitEvent({type:"progress",steps:1,progress:1,phase:this.options.mode,debugGraphics:o}),this.isRouting=!1,this.emitEvent({type:"complete",traces:n})}catch(e){this.isRouting=!1,this.emitEvent({type:"error",error:e instanceof Error?e:new Error(String(e))})}}start(){this.isRouting||(this.isRouting=!0,this.startTimeoutId=setTimeout(()=>{this.startTimeoutId=void 0,this.startFanout()},0))}stop(){this.startTimeoutId!==void 0&&(clearTimeout(this.startTimeoutId),this.startTimeoutId=void 0),this.isRouting=!1}on(e,n){e==="complete"?this.eventHandlers.complete.push(n):e==="error"?this.eventHandlers.error.push(n):this.eventHandlers.progress.push(n)}emitEvent(e){if(e.type==="complete")for(const n of this.eventHandlers.complete)n(e);else if(e.type==="error")for(const n of this.eventHandlers.error)n(e);else for(const n of this.eventHandlers.progress)n(e)}solveSync(){const{downstreamSimpleRouteJson:e,fanoutTraces:n}=this.solveFanout();return this.outputSimpleRouteJson=e,n}getOutputSimpleRouteJson(){return this.outputSimpleRouteJson}},Que=1e-6;function dwo(t,e){if(!t.subcircuit_connectivity_map_key||t.subcircuit_connectivity_map_key!==e.subcircuit_connectivity_map_key||t.subcircuit_id!==e.subcircuit_id)return!1;const n=t.layers.toSorted(),o=e.layers.toSorted();return Math.abs(t.x-e.x)<=Que&&Math.abs(t.y-e.y)<=Que&&Math.abs(t.hole_diameter-e.hole_diameter)<=Que&&Math.abs(t.outer_diameter-e.outer_diameter)<=Que&&n.length===o.length&&n.every((i,r)=>i===o[r])}var hwo=({db:t,connectedOffboardObstacles:e,simpleRouteJson:n,subcircuit_id:o})=>{if(Object.keys(e).length===0)return;const i=new Map;for(const a of t.pcb_port.list())if(a.source_port_id){const A=t.pcb_smtpad.getWhere({pcb_port_id:a.pcb_port_id});A&&i.set(A.pcb_smtpad_id,a.source_port_id);const c=t.pcb_plated_hole.getWhere({pcb_port_id:a.pcb_port_id});c&&i.set(c.pcb_plated_hole_id,a.source_port_id)}const r=new Map;for(const a of n.obstacles)a.obstacleId&&r.set(a.obstacleId,a);const s=new Map;for(const[a,A]of Object.entries(e))s.has(A)||s.set(A,[]),s.get(A).push(a);for(const[a,A]of s){const c=new Set;for(const h of A){const d=r.get(h);if(d)for(const p of d.connectedTo){const m=i.get(p);m&&c.add(m)}}if(c.size<2)continue;const l=Array.from(c);t.source_trace.list().some(h=>{const d=new Set(h.connected_source_port_ids);return l.every(p=>d.has(p))})||t.source_trace.insert({connected_source_port_ids:l,connected_source_net_ids:[],subcircuit_id:o??void 0,display_name:`offboard_${a}`})}},gRt=({traceWidth:t,traceToPadClearance:e,viaPadDiameter:n})=>(n??Math.max(t*2,.3))+2*(t+e),pwo=t=>{const e=new Map;for(const n of t.pcb_component.list()){const o=t.source_component.get(n.source_component_id);o?.name&&e.set(n.pcb_component_id,o.name)}return e},AMe=t=>t?.replace(/-/g,"_");function dRt(t){if(!t)return null;if(typeof t=="string"){const n=AMe(t);return n==="sequential_trace"||n==="auto_cloud"?n:null}const e=AMe(t.preset);return e==="sequential_trace"||e==="auto_cloud"?e:AMe(t.groupMode)==="sequential_trace"?"sequential_trace":null}function h$(t,e){const n={serverUrl:"https://registry-api.tscircuit.com",serverMode:"job",serverCacheEnabled:!0};if(typeof t=="object"&&!t.preset)return{local:!(t.serverUrl||t.serverMode||t.serverCacheEnabled),...n,...t};const o=typeof t=="object"?t.preset:t,i=typeof t=="object"?t:{},r=typeof o=="string"?o.replace(/_/g,"-"):o,s=r&&typeof r=="string"?e?.autorouterMap?.[r]:void 0;if(s)return{local:!0,groupMode:"subcircuit",algorithmFn:async a=>s.createAutorouter(a)};switch(r){case"default":case"auto":case"auto-local":return{local:!0,groupMode:"subcircuit"};case"sequential-trace":return{local:!0,groupMode:"sequential-trace"};case"subcircuit":return{local:!0,groupMode:"subcircuit"};case"beta-pipeline9":return{local:!0,groupMode:"subcircuit",autorouterVersion:"beta_pipeline9"};case"single-layer-fanout":return{local:!0,groupMode:"subcircuit",preset:"single_layer_fanout"};case"fanout":return{local:!0,groupMode:"subcircuit",preset:"fanout"};case"simplify":return{local:!0,groupMode:"subcircuit",preset:"simplify"};case"auto-cloud":{const{preset:a,local:A,groupMode:c,...l}=i;return{local:!1,groupMode:"subcircuit",...n,...l}}case"laser-prefab":{const{preset:a,local:A,groupMode:c,...l}=i;return{local:!0,groupMode:"subcircuit",preset:"laser_prefab",...l}}case"auto-jumper":{const{preset:a,local:A,groupMode:c,...l}=i;return{local:!0,groupMode:"subcircuit",preset:"auto_jumper",...l}}default:return{local:!0,groupMode:"subcircuit"}}}var hRt=new WeakMap,pRt=t=>{const e=hRt.get(t);if(e)return e;const n={toLocal:D0(l3e(-t.rotation),M0(-t.x,-t.y)),toWorld:D0(M0(t.x,t.y),l3e(t.rotation))};return hRt.set(t,n),n},mwo=(t,e)=>{if(nD(t,e))return 0;let n=Number.POSITIVE_INFINITY;for(let o=0;o<e.length;o++){const i=e[o],r=e[(o+1)%e.length];n=Math.min(n,Zd(t,i,r))}return n},mRt=(t,e,n)=>{const o={x:e,y:n};if(t.kind==="circle")return Math.max(ad(o,t)-t.radius,0);if(t.kind==="segment")return Math.max(Zd(o,{x:t.x1,y:t.y1},{x:t.x2,y:t.y2})-t.halfWidth,0);if(t.kind==="polygon")return mwo(o,t.points);const{toLocal:i}=pRt(t);return EQn(ts(i,o),{center:{x:0,y:0},width:t.halfWidth*2,height:t.halfHeight*2})},_wo=(t,e)=>{if(mRt(t,e.x,e.y)===0)return e;if(t.kind==="circle"){const r={x:t.x,y:t.y},s=Bxe(r,e);return{x:t.x+s.x*t.radius,y:t.y+s.y*t.radius}}if(t.kind==="segment"){const r=SQ(e,{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}),s=Bxe(r,e);return{x:r.x+s.x*t.halfWidth,y:r.y+s.y*t.halfWidth}}if(t.kind==="polygon"){let r=t.points[0],s=Number.POSITIVE_INFINITY;for(let a=0;a<t.points.length;a++){const A=t.points[a],c=t.points[(a+1)%t.points.length],l=SQ(e,A,c),u=ad(e,l);u<s&&(s=u,r=l)}return r}const{toLocal:n,toWorld:o}=pRt(t),i=ts(n,e);return ts(o,{x:fp(i.x,-t.halfWidth,t.halfWidth),y:fp(i.y,-t.halfHeight,t.halfHeight)})},_Rt=({start:t,end:e,trace:n,clearance:o=0})=>{const i=n.halfWidth+o,r=Oh([t,e]),s={minX:r.minX-i,minY:r.minY-i,maxX:r.maxX+i,maxY:r.maxY+i},a={x:n.x1,y:n.y1},A={x:n.x2,y:n.y2},c=Oh([a,A]);return z4(c,s)?xV(t,e,a,A)<=i:!1},fRt=(t,e)=>{const n=new Set(t),o=new Map,i=(s,a,A,c)=>{const l=`${s},${a}`,u=o.get(l)??[];u.push([A,c]),o.set(l,u)};for(const s of t){const a=s%e,A=Math.floor(s/e);(A===0||!n.has(s-e))&&i(a,A,a+1,A),(a===e-1||!n.has(s+1))&&i(a+1,A,a+1,A+1),n.has(s+e)||i(a+1,A+1,a,A+1),(a===0||!n.has(s-1))&&i(a,A+1,a,A)}const r=[];for(const[s,a]of o)for(;a.length>0;){const[A,c]=s.split(",").map(Number),l=[[A,c]];let u=a.pop();for(;u[0]!==A||u[1]!==c;){l.push(u);const h=o.get(`${u[0]},${u[1]}`);if(!h||h.length===0)break;u=h.pop()}const g=l.filter((h,d)=>{const p=l[(d+l.length-1)%l.length],m=l[(d+1)%l.length],_=p[0]===h[0]&&h[0]===m[0],f=p[1]===h[1]&&h[1]===m[1];return!_&&!f});g.length>=3&&r.push(g)}return r},fwo=2,cMe=9,lMe=(t,{nx:e,ny:n})=>{const o=t%e,i=Math.floor(t/e),r=[];return o>0&&r.push(t-1),o<e-1&&r.push(t+1),i>0&&r.push(t-e),i<n-1&&r.push(t+e),r},Iwo=(t,e)=>{const n=new Uint8Array(e.labels.length*2);return(o,i)=>{const r=Math.min(o,i)*2+(Math.abs(o-i)===e.nx?1:0),s=n[r];if(s!==0)return s===1;const a=e.gridCells[o].center,A=e.gridCells[i].center,c=zne(a,A),l=a.y===A.y,u=l?{minX:c.x,minY:c.y-e.gridPitch/2,maxX:c.x,maxY:c.y+e.gridPitch/2}:{minX:c.x-e.gridPitch/2,minY:c.y,maxX:c.x+e.gridPitch/2,maxY:c.y};let g=0;const h=(1<<cMe)-1;for(const d of e.traceBarriers)if(!(d.netIndex===t||d.maxX<u.minX||d.minX>u.maxX||d.maxY<u.minY||d.minY>u.maxY)){for(let p=0;p<cMe;p++){const m=1<<p;if((g&m)!==0)continue;const _=-e.gridPitch/2+e.gridPitch*p/(cMe-1),f=l?{x:c.x,y:c.y+_}:{x:c.x+_,y:c.y},I=SQ(f,d.start,d.end);bxe(f,I)<=d.radiusSquared&&(g|=m)}if(g===h)return n[r]=2,!1}return n[r]=1,!0}},uMe=(t,e)=>{let n=e.canCrossGridEdgeByNetIndex.get(t);return n||(n=Iwo(t,e),e.canCrossGridEdgeByNetIndex.set(t,n)),n},Cwo=({labeledLayer:t,insideCells:e,connectivitySeedNetIndices:n,traceBarriers:o,gridCells:i,traceClearance:r,gridPitch:s})=>{if(r===0)return;const{labels:a,nx:A,ny:c}=t,l=o.map(_=>{const f=_.halfWidth+r,I={x:_.x1,y:_.y1},C={x:_.x2,y:_.y2},y=Oh([I,C]);return{netIndex:_.netIndex,start:I,end:C,radiusSquared:f**2,minX:y.minX-f,minY:y.minY-f,maxX:y.maxX+f,maxY:y.maxY+f}}),u={labels:a,nx:A,traceBarriers:l,gridCells:i,gridPitch:s,canCrossGridEdgeByNetIndex:new Map},g=new Uint8Array(a.length),h=[];for(let _=0;_<a.length;_++)e[_]!==1||n[_]!==a[_]||(g[_]=1,h.push(_));let d=0;for(;d<h.length;){const _=h[d++],f=a[_];for(const I of lMe(_,t))e[I]!==1||g[I]===1||a[I]!==f||!uMe(f,u)(_,I)||(g[I]=1,h.push(I))}const p=new Uint8Array(a.length),m=[];for(let _=0;_<a.length;_++){if(e[_]!==1||a[_]<0||g[_]===1||p[_]===1)continue;const f=a[_],I=[],C=[_];for(p[_]=1;C.length>0;){const E=C.pop();I.push(E);for(const B of lMe(E,t))e[B]!==1||p[B]===1||g[B]===1||a[B]!==f||!uMe(f,u)(E,B)||(p[B]=1,C.push(B))}const y=new Map;for(const E of I)for(const B of lMe(E,t)){const S=a[B];g[B]!==1||S<0||S===f||!uMe(S,u)(E,B)||y.set(S,(y.get(S)??0)+1)}const x=[...y.entries()].sort((E,B)=>B[1]-E[1])[0]?.[0];x!==void 0?m.push({cells:I,netIndex:x}):m.push({cells:I,netIndex:-1})}for(const _ of m)for(const f of _.cells)a[f]=_.netIndex},ywo=({labeledLayer:t,insideCells:e,visibleCells:n,traceBarriers:o,gridCells:i,traceClearance:r})=>{const{labels:s,nx:a,ny:A}=t,c=new Set;for(let g=0;g<s.length;g++)n[g]===1&&s[g]>=0&&c.add(s[g]);const l=new Map;for(const g of c){const h=new Int8Array(s.length).fill(-1),d=[];for(let m=0;m<s.length;m++)n[m]!==1||s[m]!==g||(h[m]=0,d.push(m));let p=0;for(;p<d.length;){const m=d[p++];if(h[m]>=fwo)continue;const _=m%a,f=Math.floor(m/a),I=[];_>0&&I.push(m-1),_<a-1&&I.push(m+1),f>0&&I.push(m-a),f<A-1&&I.push(m+a);const C=i[m].center;for(const y of I){if(e[y]!==1||h[y]>=0||n[y]===1&&s[y]!==g)continue;const x=i[y].center;o.some(B=>B.netIndex!==g&&_Rt({start:C,end:x,trace:B,clearance:r}))||(h[y]=h[m]+1,d.push(y))}}l.set(g,h)}const u=[];for(let g=0;g<s.length;g++){const h=s[g];if(e[g]!==1||h<0||n[g]===1)continue;const d=l.get(h)?.[g]??-1,p=Array.from(l.entries()).map(([m,_])=>({netIndex:m,distance:_[g]})).filter(m=>m.netIndex!==h&&m.distance>=0&&(d<0||m.distance<d)).sort((m,_)=>m.distance-_.distance)[0];p&&u.push({cell:g,netIndex:p.netIndex})}for(const g of u)s[g.cell]=g.netIndex},xwo=t=>{const{bounds:e,boardOutline:n,gridPitch:o,regionNormalizationArea:i,traceClearance:r}=t,s=Math.max(1,Math.round((e.maxX-e.minX)/o)),a=Math.max(1,Math.round((e.maxY-e.minY)/o)),A=Math.max(1,Math.round(i/o**2)),c=xQn({rows:a,cols:s,xSpacing:o,ySpacing:o,offsetX:e.minX,offsetY:e.minY,yDirection:"up-is-negative",centered:!1}),l=[];for(const u of t.layers){const g=t.primitives.filter(y=>y.layers.includes(u)&&t.nets[y.netIndex]?.isPower),h=t.primitives.filter(y=>y.kind==="segment"&&y.isTrace===!0&&y.layers.includes(u)),d=new Int32Array(s*a).fill(-1),p=new Uint8Array(s*a),m=new Uint8Array(s*a),_=new Uint8Array(s*a),f=new Int32Array(s*a).fill(-1),I=o*Math.SQRT2/2;for(const{index:y,center:x}of c){if(!nD(x,n))continue;m[y]=1;const E=g.map(M=>({primitive:M,distance:mRt(M,x.x,x.y)})).sort((M,k)=>M.distance-k.distance);let B=E[0]?.primitive.netIndex??-1,S=E[0]?.distance??Number.POSITIVE_INFINITY,Q=!1,w=!1;for(const M of E){if(M.distance===0){B=M.primitive.netIndex,S=M.distance,Q=!0,w=!0;break}const k=_wo(M.primitive,x);if(!h.some(F=>F.netIndex!==M.primitive.netIndex&&_Rt({start:x,end:k,trace:F,clearance:r}))){B=M.primitive.netIndex,S=M.distance,w=!0;break}}d[y]=B,Q&&(p[y]=1),w&&(_[y]=1),w&&S<=I&&(f[y]=B)}const C={layer:u,labels:d,nx:s,ny:a};ywo({labeledLayer:C,insideCells:m,visibleCells:_,traceBarriers:h,gridCells:c,traceClearance:r}),Cwo({labeledLayer:C,insideCells:m,connectivitySeedNetIndices:f,traceBarriers:h,gridCells:c,traceClearance:r,gridPitch:o}),Bwo(C,p,A),l.push(C)}return{...t,labeledLayers:l}},IRt=t=>{const{labels:e,nx:n,ny:o}=t,i=new Int32Array(n*o).fill(-1),r=[],s=[];for(let a=0;a<n*o;a++){if(i[a]!==-1||e[a]<0)continue;const A=e[a],c=[];for(i[a]=r.length,s.push(a);s.length>0;){const l=s.pop();c.push(l);const u=l%n,g=Math.floor(l/n),h=[];u>0&&h.push(l-1),u<n-1&&h.push(l+1),g>0&&h.push(l-n),g<o-1&&h.push(l+n);for(const d of h)i[d]===-1&&e[d]===A&&(i[d]=r.length,s.push(d))}r.push({netIndex:A,cells:c})}return{component:i,regions:r}},Ewo=t=>IRt(t).regions,Bwo=(t,e,n)=>{if(!(n<=1))for(;;){const{component:o,regions:i}=IRt(t),r=[];for(const s of i){if(s.cells.length>=n||s.cells.some(c=>e[c]===1))continue;const a=new Map;for(const c of s.cells){const l=c%t.nx,u=Math.floor(c/t.nx),g=[];l>0&&g.push(c-1),l<t.nx-1&&g.push(c+1),u>0&&g.push(c-t.nx),u<t.ny-1&&g.push(c+t.nx);for(const h of g){const d=o[h];d<0||i[d]===s||a.set(d,(a.get(d)??0)+1)}}const A=[...a.entries()].map(([c,l])=>({region:i[c],sharedEdges:l})).filter(c=>c.region.cells.length>s.cells.length).sort((c,l)=>l.sharedEdges-c.sharedEdges||l.region.cells.length-c.region.cells.length)[0]?.region;A&&r.push({cells:s.cells,netIndex:A.netIndex})}if(r.length===0)return;for(const s of r)for(const a of s.cells)t.labels[a]=s.netIndex}},bwo=(t,e)=>{const n=new Set(t),o=[],i=[];for(;n.size>0;){const r=n.values().next().value,s=[];for(n.delete(r),i.push(r);i.length>0;){const a=i.pop();s.push(a);const A=a%e,c=[a-e,a+e];A>0&&c.push(a-1),A<e-1&&c.push(a+1);for(const l of c)n.has(l)&&(n.delete(l),i.push(l))}o.push(s)}return o},CRt=t=>Math.abs(t.reduce((e,n,o)=>{const i=t[(o+1)%t.length];return e+n[0]*i[1]-i[0]*n[1]},0)/2),Swo=(t,e)=>{const n=[t],o=[];for(;n.length>0;){const i=n.pop(),r=fRt(i,e);if(r.length<=1){o.push(i);continue}const s=r.reduce((h,d,p)=>CRt(d)>CRt(r[h])?p:h,0),A=r.find((h,d)=>d!==s).map(h=>h[1]),c=Math.round((Math.min(...A)+Math.max(...A))/2),l=i.filter(h=>Math.floor(h/e)<c),u=i.filter(h=>Math.floor(h/e)>=c),g=[l,u].filter(h=>h.length>0).flatMap(h=>bwo(h,e));if(g.length<2||g.some(h=>h.length===i.length))throw new Error("Unable to split an implicit copper region around a hole");n.push(...g)}return o},yRt=t=>t.replace(/[^a-zA-Z0-9_]+/g,"_"),Qwo=t=>{const e=[],n=Math.max(1,Math.round(t.minRegionArea/t.gridPitch**2)),o=D0(M0(t.bounds.minX,t.bounds.minY),FV(t.gridPitch));for(const i of t.labeledLayers){const r=Ewo(i);for(const[s,a]of r.entries()){const A=t.nets[a.netIndex];if(!A?.isPower||a.cells.length<n)continue;const c=Swo(a.cells,i.nx);for(const[l,u]of c.entries()){const g=fRt(u,i.nx);if(g.length!==1)throw new Error("Implicit copper region part must have one outline");const d=g[0].map(([p,m])=>{const _=ts(o,{x:p,y:m});return{x:fp(_.x,t.bounds.minX,t.bounds.maxX),y:fp(_.y,t.bounds.minY,t.bounds.maxY)}});e.push({type:"pcb_copper_pour",pcb_copper_pour_id:`pcb_copper_pour_${yRt(i.layer)}_${yRt(A.sourceNet.source_net_id)}_${s}_${l}`,shape:"polygon",layer:i.layer,source_net_id:A.sourceNet.source_net_id,covered_with_solder_mask:t.coveredWithSolderMask,subcircuit_id:A.sourceNet.subcircuit_id,points:d})}}}return e},xRt=t=>t==="top"?"#c2453a":t==="bottom"?"#5b7fd8":"#c58b43",vwo=.25,wwo=.2,Pwo=0,Mwo=.5,Dwo=t=>{if(t.outline&&t.outline.length>=3)return t.outline;if(t.width===void 0||t.height===void 0)throw new Error("pcb_board must provide an outline or width and height");const e=Ey({center:t.center,width:t.width,height:t.height});return[{x:e.minX,y:e.minY},{x:e.maxX,y:e.minY},{x:e.maxX,y:e.maxY},{x:e.minX,y:e.maxY}]},ERt=(t,e)=>{const{layers:n,netIndex:o,x:i,y:r,width:s,height:a,rotation:A}=e,c=Math.min(s,a)/2,u=(Math.max(s,a)-c*2)/2,g=D0(M0(i,r),l3e(A+(a>s?90:0))),[h,d]=IRn(g,[{x:-u,y:0},{x:u,y:0}]);t.push({kind:"segment",layers:n,netIndex:o,x1:h.x,y1:h.y,x2:d.x,y2:d.y,halfWidth:c})},Nwo=(t,e,n)=>{const o=[e.layer];e.shape==="circle"?t.push({kind:"circle",layers:o,netIndex:n,x:e.x,y:e.y,radius:e.radius}):e.shape==="rect"||e.shape==="rotated_rect"?t.push({kind:"rect",layers:o,netIndex:n,x:e.x,y:e.y,halfWidth:e.width/2,halfHeight:e.height/2,rotation:e.shape==="rotated_rect"?e.ccw_rotation:0}):e.shape==="polygon"?t.push({kind:"polygon",layers:o,netIndex:n,points:e.points}):ERt(t,{layers:o,netIndex:n,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.shape==="rotated_pill"?e.ccw_rotation:0})},Rwo=(t,e,n)=>{const o=e.layers;if(e.shape==="circle")t.push({kind:"circle",layers:o,netIndex:n,x:e.x,y:e.y,radius:e.outer_diameter/2});else if(e.shape==="oval"||e.shape==="pill")ERt(t,{layers:o,netIndex:n,x:e.x,y:e.y,width:e.outer_width,height:e.outer_height,rotation:e.ccw_rotation});else if(e.shape==="hole_with_polygon_pad")t.push({kind:"polygon",layers:o,netIndex:n,points:e.pad_outline});else if("rect_pad_width"in e&&"rect_pad_height"in e){const i=e.shape==="circular_hole_with_rect_pad"?e.rect_ccw_rotation??0:e.shape==="rotated_pill_hole_with_rect_pad"?e.rect_ccw_rotation:0;t.push({kind:"rect",layers:o,netIndex:n,x:e.x,y:e.y,halfWidth:e.rect_pad_width/2,halfHeight:e.rect_pad_height/2,rotation:i})}},Two=(t,e,n)=>{let o=null;for(const i of e.route){if(i.route_type!=="wire"){o=null,i.route_type==="via"&&t.push({kind:"circle",layers:[i.from_layer,i.to_layer],netIndex:n,x:i.x,y:i.y,radius:.3});continue}o&&o.layer===i.layer&&t.push({kind:"segment",layers:[i.layer],netIndex:n,isTrace:!0,x1:o.x,y1:o.y,x2:i.x,y2:i.y,halfWidth:i.width/2}),o=i}},BRt=t=>{const e=t.gridPitch??vwo,n=t.traceClearance??wwo,o=t.edgeSimplificationTolerance??e,i=t.minRegionArea??Pwo,r=t.regionNormalizationArea??Mwo;if(!(e>0))throw new Error("gridPitch must be greater than zero");if(!Number.isFinite(n)||n<0)throw new Error("traceClearance must be zero or greater");if(!Number.isFinite(o)||o<0)throw new Error("edgeSimplificationTolerance must be zero or greater");if(!(i>=0))throw new Error("minRegionArea must be zero or greater");if(!(r>=0))throw new Error("regionNormalizationArea must be zero or greater");const s=t.circuitJson.find(E=>E.type==="pcb_board");if(!s)throw new Error("No pcb_board found in Circuit JSON");const a=Dwo(s),A=Oh(a),c=t.circuitJson.filter(E=>E.type==="source_net"),l=c.map(E=>({sourceNet:E,isPower:!!(E.is_power||E.is_ground||E.is_positive_voltage_source)})),u=new Map,g=new Map;for(const[E,B]of c.entries())u.set(B.source_net_id,E),B.subcircuit_connectivity_map_key&&g.set(B.subcircuit_connectivity_map_key,E);const h=new Map,d=(E,B=E)=>{const S=h.get(E);if(S!==void 0)return S;const Q=`source_net_implicit_${E.replace(/[^a-zA-Z0-9_]+/g,"_")}`;let w=Q,M=1;for(;u.has(w);)w=`${Q}_${M++}`;const k={type:"source_net",source_net_id:w,name:B,member_source_group_ids:[],is_ground:!1,is_power:!1,is_positive_voltage_source:!1},R=l.length;return l.push({sourceNet:k,isPower:!1}),u.set(w,R),h.set(E,R),R},p=E=>{const B=E.subcircuit_connectivity_map_key;if(!B)return;const S=g.get(B);if(S!==void 0)return S;const Q=d(`connectivity:${B}`,B);return g.set(B,Q),Q},m=Mxe(t.circuitJson),_=Object.values(m.netMap);for(const E of t.circuitJson){if(E.type==="source_trace"){_.push([E.source_trace_id,...E.connected_source_port_ids,...E.connected_source_net_ids]);continue}if(E.type==="pcb_port"){_.push([E.pcb_port_id,E.source_port_id]);continue}if(E.type==="pcb_smtpad"&&E.pcb_port_id){_.push([E.pcb_smtpad_id,E.pcb_port_id]);continue}if(E.type==="pcb_plated_hole"&&E.pcb_port_id){_.push([E.pcb_plated_hole_id,E.pcb_port_id]);continue}if(E.type==="pcb_trace"){const B=Array.from(new Set(E.route.flatMap(w=>w.route_type==="wire"?[w.start_pcb_port_id,w.end_pcb_port_id].filter(M=>!!M):[]))),S=E.source_net_id,Q=[...S?[S]:[],...B.length>0?B:E.source_trace_id?[E.source_trace_id]:[]];Q.length>0&&_.push([E.pcb_trace_id,...Q]);continue}if(E.type==="pcb_via"){const B=E,S=B.source_net_id??B.pcb_trace_id??B.source_trace_id;S&&_.push([B.pcb_via_id,S])}}const f=new wQ($ne(_)),I=new Map,C=E=>{const B=hz(E),S=f.getNetConnectedToId(B);if(S){const Q=c.flatMap((k,R)=>f.areIdsConnected(B,k.source_net_id)?[R]:[]);if(Q.length>1){const k=Q.map(R=>c[R].source_net_id);throw new Error(`Circuit JSON connectivity assigns ${B} to multiple source nets: ${k.join(", ")}`)}if(Q[0]!==void 0)return I.set(S,Q[0]),Q[0];const w=I.get(S);if(w!==void 0)return w;const M=p(E)??d(`connectivity-network:${S}`,S);return I.set(S,M),M}return p(E)},y=E=>{const B=E.source_net_id;if(B)return u.get(B)??d(`source-net-id:${B}`,B);const S=C(E);if(S!==void 0)return S;const Q=hz(E);return d(`${E.type}:${Q}`,Q)},x=[];for(const E of t.circuitJson){if(E.type!=="pcb_smtpad"&&E.type!=="pcb_plated_hole"&&E.type!=="pcb_via"&&E.type!=="pcb_trace")continue;const B=y(E);if(B!==void 0)if(E.type==="pcb_smtpad")Nwo(x,E,B);else if(E.type==="pcb_plated_hole")Rwo(x,E,B);else if(E.type==="pcb_via"){const S=E;x.push({kind:"circle",layers:S.layers,netIndex:B,x:S.x,y:S.y,radius:S.outer_diameter/2})}else E.type==="pcb_trace"&&Two(x,E,B)}return{bounds:A,boardOutline:a,layers:t.layers??["top","bottom"],nets:l,primitives:x,gridPitch:e,traceClearance:n,minRegionArea:i,regionNormalizationArea:r,coveredWithSolderMask:t.coveredWithSolderMask??!0}},xw=(t,e)=>t.x===e.x&&t.y===e.y,kwo=(t,e)=>{if(t.length<=2)return[...t];const n=new Uint8Array(t.length);n[0]=1,n[t.length-1]=1;const o=[[0,t.length-1]];for(;o.length>0;){const[i,r]=o.pop(),s=t[i],a=t[r];let A=-1,c=e;for(let l=i+1;l<r;l++){const u=Zd(t[l],s,a);u>c&&(c=u,A=l)}A!==-1&&(n[A]=1,o.push([i,A],[A,r]))}return t.filter((i,r)=>n[r]===1)},bRt=t=>{let e=0;for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];e+=o.x*i.y-i.x*o.y}return e/2},SRt=(t,e,n)=>(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x),gMe=(t,e)=>{if(t.length<=2)return[...t];const n=t.map((r,s)=>s===0||s===t.length-1?0:Math.sign(SRt(t[s-1],t[s],t[s+1]))),o=[0];for(let r=1;r<t.length-1;r++){const s=n[r];if(s===0)continue;const a=s===n[r-1]||s===n[r+1],A=t[r-1],c=t[r],l=t[r+1],u=Math.min(ad(c,A),ad(l,c));(a||u>e)&&o.push(r)}o.push(t.length-1);const i=[];for(let r=0;r<o.length-1;r++){const s=o[r],a=o[r+1],A=kwo(t.slice(s,a+1),e);i.push(...r===0?A:A.slice(1))}return i},Fwo=t=>{for(let e=0;e<t.length;e++){const n=(e+1)%t.length;for(let o=e+1;o<t.length;o++){const i=(o+1)%t.length;if(!(e===o||e===i||n===o||n===i)&&X1(t[e],t[n],t[o],t[i]))return!1}}return!0},QRt=t=>{const e=t.filter((n,o)=>o===0||!xw(n,t[o-1]));return e.length>1&&xw(e[0],e[e.length-1])&&e.pop(),e},Lwo=(t,e,n)=>{if(xw(t,e)||xw(t,n))return!1;const o=SRt(e,n,t);return Math.abs(o)>1e-9?!1:CV(e,t,n)},Hwo=(t,e)=>{const n=[];for(let o=0;o<t.length;o++){const i=t[o],r=t[(o+1)%t.length],s=r.x-i.x,a=r.y-i.y,A=e.filter(c=>Lwo(c,i,r)).map(c=>({point:c,position:Math.abs(s)>=Math.abs(a)?(c.x-i.x)/s:(c.y-i.y)/a})).sort((c,l)=>c.position-l.position);n.push(i);for(const{point:c}of A)xw(n[n.length-1],c)||n.push(c)}return n},vRt=(t,e)=>{if(e.length<3)return!1;const n=bRt(t),o=bRt(e);return n!==0&&o!==0&&Math.sign(n)===Math.sign(o)&&Fwo(e)},Owo=(t,e)=>{const n=QRt(t);if(n.length<4||e<=0)return n;const o=[...n,n[0]],i=gMe(o,e);return xw(i[0],i[i.length-1])&&i.pop(),vRt(n,i)?i:n},dMe=t=>`${t.x},${t.y}`,Gwo=(t,e)=>{const n=dMe(t),o=dMe(e);return n<o?`${n}|${o}`:`${o}|${n}`},wRt=t=>t.map(dMe).join("|"),Ywo=t=>{const e=wRt(t),n=[...t].reverse(),o=wRt(n);return e<=o?{points:[...t],reversed:!1,key:e}:{points:n,reversed:!0,key:o}},Uwo=t=>{const e=new Map;for(const[o,i]of t.entries())for(let r=0;r<i.length;r++){const s=Gwo(i[r],i[(r+1)%i.length]),a=e.get(s)??[];a.push({polygonIndex:o,edgeIndex:r}),e.set(s,a)}const n=t.map((o,i)=>o.map(()=>`outer:${i}`));for(const o of e.values()){if(o.length!==2||o[0].polygonIndex===o[1].polygonIndex)continue;const i=o[0].polygonIndex,r=o[1].polygonIndex,s=i<r?`${i}:${r}`:`${r}:${i}`;for(const a of o)n[a.polygonIndex][a.edgeIndex]=`shared:${s}`}return n},Kwo=(t,e,n)=>{const o=[t[e]];let i=e;for(;i!==n;)o.push(t[(i+1)%t.length]),i=(i+1)%t.length;return o},Vwo=(t,e)=>{const n=[];for(const o of t.chains){const i=e.get(o.arcKey),r=i.disabled?i.original:i.simplified,s=o.reversed?[...r].reverse():r;if(n.length===0)n.push(...s);else if(xw(n[n.length-1],s[0]))n.push(...s.slice(1));else return[]}return n.length>1&&xw(n[0],n[n.length-1])&&n.pop(),n},zwo=(t,e)=>{const n=t.map(QRt),o=n.flat(),i=n.map(c=>Hwo(c,o));if(e<=0||i.length===0)return i;const r=Uwo(i),s=new Map,a=[];for(const[c,l]of i.entries()){if(l.length<4){a.push({original:l,mode:"fixed"});continue}const u=r[c],g=u.flatMap((d,p)=>u[(p+l.length-1)%l.length]===d?[]:[p]);if(g.length===0){u[0]?.startsWith("shared:")?a.push({original:l,mode:"fixed"}):a.push({original:l,mode:"standalone",simplified:Owo(l,e)});continue}const h=[];for(let d=0;d<g.length;d++){const p=g[d],m=g[(d+1)%g.length],_=Kwo(l,p,m),f=u[p];if(f.startsWith("shared:")){const I=Ywo(_),C=`${f}:${I.key}`;s.has(C)||s.set(C,{original:I.points,simplified:gMe(I.points,e),disabled:!1}),h.push({arcKey:C,reversed:I.reversed})}else{const I=`outer:${c}:${d}`;s.set(I,{original:_,simplified:gMe(_,e),disabled:!1}),h.push({arcKey:I,reversed:!1})}}a.push({original:l,mode:"chains",chains:h})}let A=i;for(let c=0;c<=s.size;c++){A=a.map(g=>g.mode==="fixed"?g.original:g.mode==="standalone"?g.simplified:Vwo(g,s));const l=A.flatMap((g,h)=>vRt(a[h].original,g)?[]:[h]);if(l.length===0)return A;let u=!1;for(const g of l){const h=a[g];if(h.mode==="chains")for(const d of h.chains){const p=s.get(d.arcKey);p.disabled||(p.disabled=!0,u=!0)}}if(!u)return A.map((g,h)=>l.includes(h)?a[h].original:g)}return i},Jwo="#555a66",Wwo="red",PRt="blue",jwo="rgba(255, 0, 0, 0.5)",$wo="rgba(0, 0, 255, 0.5)",qwo=.35,MRt=["#ed9148","#d93bd0","#b6df38","#438bd9","#e5485f","#43d16d","#8b48df","#e6b93f","#43ced2","#cf3d99"],Xwo=(t,e)=>{const n=Number.parseInt(t.slice(1,3),16),o=Number.parseInt(t.slice(3,5),16),i=Number.parseInt(t.slice(5,7),16);return`rgba(${n}, ${o}, ${i}, ${e})`},DRt=t=>{const e=t.map(n=>n==="top"?0:n==="bottom"?1:null).filter(n=>n!==null);return`z${Array.from(new Set(e)).join(",")}`},Zwo=t=>t.includes("top")?Wwo:PRt,ePo=t=>t.includes("top")?jwo:$wo,tPo=(t,e,n)=>{const o=t.nets[e]?.sourceNet;return`${o?.name??o?.source_net_id??"unknown net"} ${n}`},nPo=t=>{const e={coordinateSystem:"cartesian",title:"Circuit JSON copper obstacles",points:[],rects:[],circles:[],lines:[{points:[...t.boardOutline,t.boardOutline[0]],strokeColor:Jwo,strokeWidth:.08,label:"PCB outline"}],polygons:[],texts:[]};for(const n of t.primitives){const o=Zwo(n.layers),i=ePo(n.layers),r=DRt(n.layers),s=tPo(t,n.netIndex,n.kind);if(n.kind==="rect"){e.rects.push({center:{x:n.x,y:n.y},width:n.halfWidth*2,height:n.halfHeight*2,ccwRotationDegrees:n.rotation,fill:i,layer:r,label:s});continue}if(n.kind==="segment"){const A=n.layers.includes("top");e.lines.push({points:[{x:n.x1,y:n.y1},{x:n.x2,y:n.y2}],strokeColor:A?o:"rgba(0, 0, 255, 0.5)",strokeWidth:n.halfWidth*2,...A?{}:{strokeDash:[.2,.2]},layer:r,label:s});continue}if(n.kind==="polygon"){e.polygons.push({points:n.points,fill:i,stroke:o,strokeWidth:.04,layer:r,label:s});continue}const a=n.layers.includes("top")&&n.layers.includes("bottom");e.circles.push({center:{x:n.x,y:n.y},radius:n.radius,fill:a?PRt:i,stroke:"none",layer:r,label:s})}return e},oPo=(t,e)=>({coordinateSystem:"cartesian",title:"Power-net copper pour polygons",points:[],rects:[],circles:[],lines:[],polygons:e.flatMap(n=>{if(n.shape!=="polygon")return[];const o=t.nets.findIndex(({sourceNet:s})=>s.source_net_id===n.source_net_id),i=MRt[Math.max(0,o)%MRt.length],r=t.nets[o]?.sourceNet;return[{points:n.points,fill:Xwo(i,qwo),stroke:i,strokeWidth:.06,layer:DRt([n.layer]),label:`${r?.name??n.source_net_id??"power net"} ${n.layer} pour`}]}),texts:[]}),iPo=(t,e)=>({coordinateSystem:"cartesian",title:e.polygons?.length?e.title:t.title,polygons:[...e.polygons??[],...t.polygons??[]],rects:[...t.rects??[],...e.rects??[]],lines:[...t.lines??[],...e.lines??[]],circles:[...t.circles??[],...e.circles??[]],points:[...t.points??[],...e.points??[]],texts:[...t.texts??[],...e.texts??[]]}),rPo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){this.output=BRt(this.input),this.solved=!0}getOutput(){if(!this.output)throw new Error("Circuit JSON has not been prepared");return this.output}},sPo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){this.output=xwo(this.input),this.stats={layers:this.output.labeledLayers.length,samples:this.output.labeledLayers.reduce((t,e)=>t+e.nx*e.ny,0)},this.solved=!0}getOutput(){if(!this.output)throw new Error("Grid cells have not been assigned");return this.output}},aPo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){this.output=Qwo(this.input),this.stats={polygons:this.output.length},this.solved=!0}getOutput(){if(!this.output)throw new Error("Power polygons have not been traced");return this.output}visualize(){return{points:[],rects:[],circles:[],texts:[],lines:(this.output??[]).flatMap(t=>t.shape!=="polygon"?[]:[{points:[...t.points,t.points[0]],strokeColor:xRt(t.layer),strokeWidth:.08,label:t.source_net_id}])}}},APo=class extends fC{constructor(t){super(),this.input=t}input;output;_step(){let t=0,e=0;const n=[...this.input.pours],o=new Map;for(const[i,r]of this.input.pours.entries()){if(r.shape!=="polygon")continue;t+=r.points.length;const s=o.get(r.layer)??[];s.push(i),o.set(r.layer,s)}for(const i of o.values()){const r=zwo(i.map(s=>{const a=this.input.pours[s];return a.shape!=="polygon"?[]:a.points}),this.input.tolerance);for(const[s,a]of r.entries()){const A=i[s],c=this.input.pours[A];c.shape==="polygon"&&(n[A]={...c,points:a},e+=a.length)}}this.output=n,this.stats={polygons:this.output.length,inputPoints:t,outputPoints:e,pointsRemoved:t-e},this.solved=!0}getOutput(){if(!this.output)throw new Error("Polygon edges have not been simplified");return this.output}visualize(){return{points:[],rects:[],circles:[],texts:[],lines:(this.output??[]).flatMap(t=>t.shape!=="polygon"?[]:[{points:[...t.points,t.points[0]],strokeColor:xRt(t.layer),strokeWidth:.08,label:t.source_net_id}])}}},NRt=class extends eve{initialPreparedProblem;pipelineDef=[TH("prepareCircuitJson",rPo,t=>[t.inputProblem]),TH("assignGridCells",sPo,t=>[t.getStageOutput("prepareCircuitJson")]),TH("tracePowerPolygons",aPo,t=>[t.getStageOutput("assignGridCells")]),TH("simplifyPolygonEdges",APo,t=>{const e=t.getStageOutput("prepareCircuitJson");return[{pours:t.getStageOutput("tracePowerPolygons"),tolerance:t.inputProblem.edgeSimplificationTolerance??e.gridPitch}]})];getSolverName(){return"ImplicitCopperPourPipelineSolver"}getConstructorParams(){return[this.inputProblem]}getOutput(){return this.getStageOutput("simplifyPolygonEdges")??[]}visualize(){const t=this.getStageOutput("prepareCircuitJson")??(this.initialPreparedProblem??=BRt(this.inputProblem)),e=nPo(t),n=this.getStageOutput("simplifyPolygonEdges")??this.getStageOutput("tracePowerPolygons")??[];return iPo(e,oPo(t,n))}},hMe=1e-8,cPo=(t,e,n)=>{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)>hMe)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i<-hMe)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return i<=r+hMe},RRt=(t,e)=>{let n=!1;for(let o=0,i=e.vertices.length-1;o<e.vertices.length;i=o++){const r=e.vertices[o],s=e.vertices[i];if(cPo(t,s,r))return!0;r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},lPo=(t,e)=>RRt(t,e.outer_ring)&&!e.inner_rings.some(n=>RRt(t,n)),uPo=(t,e)=>e.some(n=>lPo(t,n)),TRt=t=>{const e=t.flatMap(n=>n.outer_ring.vertices);if(e.length!==0)return{minX:Math.min(...e.map(n=>n.x)),maxX:Math.max(...e.map(n=>n.x)),minY:Math.min(...e.map(n=>n.y)),maxY:Math.max(...e.map(n=>n.y))}},kRt=({center:t,radius:e,shapes:n})=>{const o=[t];for(let i=0;i<32;i++){const r=i/32*Math.PI*2;o.push({x:t.x+Math.cos(r)*e,y:t.y+Math.sin(r)*e})}return o.every(i=>uPo(i,n))},pMe=(t,e)=>e.some(n=>String(n)===String(t)),gPo=t=>{if(!(t.do_not_place||!t.obstructs_within_bounds))return{kind:"rect",center:t.center,width:t.width,height:t.height,ccwRotation:t.rotation}},dPo=t=>t.shape==="circle"?{kind:"circle",center:{x:t.x,y:t.y},radius:t.radius}:t.shape==="polygon"?{kind:"polygon",points:t.points}:{kind:"rect",center:{x:t.x,y:t.y},width:t.width,height:t.height,ccwRotation:t.shape==="rotated_rect"||t.shape==="rotated_pill"?t.ccw_rotation:0},hPo=t=>{if(t.shape==="circle")return{kind:"circle",center:{x:t.x,y:t.y},radius:t.outer_diameter/2};if("outer_width"in t)return{kind:"rect",center:{x:t.x,y:t.y},width:t.outer_width,height:t.outer_height,ccwRotation:t.ccw_rotation};if(t.shape==="hole_with_polygon_pad"){const e=(t.ccw_rotation??0)*Math.PI/180,n=Math.cos(e),o=Math.sin(e);return{kind:"polygon",points:t.pad_outline.map(i=>({x:t.x+i.x*n-i.y*o,y:t.y+i.x*o+i.y*n}))}}return{kind:"rect",center:{x:t.x,y:t.y},width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:"rect_ccw_rotation"in t?t.rect_ccw_rotation??0:0}},pPo=t=>"hole_diameter"in t?t.hole_shape==="circle"?{kind:"circle",center:{x:t.x,y:t.y},radius:t.hole_diameter/2}:{kind:"rect",center:{x:t.x,y:t.y},width:t.hole_diameter,height:t.hole_diameter,ccwRotation:0}:{kind:"rect",center:{x:t.x,y:t.y},width:t.hole_width,height:t.hole_height,ccwRotation:t.hole_shape==="rotated_pill"?t.ccw_rotation:0},mPo=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o**2+i**2;if(r===0)return Math.hypot(t.x-e.x,t.y-e.y);const s=Math.max(0,Math.min(1,((t.x-e.x)*o+(t.y-e.y)*i)/r));return Math.hypot(t.x-(e.x+s*o),t.y-(e.y+s*i))},_Po=(t,e)=>{let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o],s=e[i];r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},fPo=(t,e,n)=>{if(n.kind==="circle")return Math.hypot(t.x-n.center.x,t.y-n.center.y)<e+n.radius;if(n.kind==="polygon")return _Po(t,n.points)?!0:n.points.some((l,u)=>mPo(t,l,n.points[(u+1)%n.points.length])<e);const o=-n.ccwRotation*Math.PI/180,i=t.x-n.center.x,r=t.y-n.center.y,s=i*Math.cos(o)-r*Math.sin(o),a=i*Math.sin(o)+r*Math.cos(o),A=Math.max(Math.abs(s)-n.width/2,0),c=Math.max(Math.abs(a)-n.height/2,0);return Math.hypot(A,c)<e},IPo=(t,e)=>t.flatMap(n=>{if(n.type==="pcb_component"&&pMe(n.layer,e)){const o=gPo(n);return o?[o]:[]}return n.type==="pcb_smtpad"&&pMe(n.layer,e)?[dPo(n)]:n.type==="pcb_plated_hole"&&n.layers.some(o=>pMe(o,e))?[hPo(n)]:n.type==="pcb_hole"?[pPo(n)]:[]}),CPo=({center:t,radius:e,obstacles:n})=>n.some(o=>fPo(t,e,o)),yPo=(t={})=>{const e={sourceNetIds:t.sourceNetIds?new Set(t.sourceNetIds):void 0,layers:t.layers??["top","bottom"],viaStitchPitch:t.viaStitchPitch??1,viaHoleDiameter:t.viaHoleDiameter??.3,viaOuterDiameter:t.viaOuterDiameter??.6,pourEdgeClearance:t.pourEdgeClearance??.2,obstacleClearance:t.obstacleClearance??.2,minimumViaSeparation:t.minimumViaSeparation??Math.max(t.viaOuterDiameter??.6,.8),gridOrigin:t.gridOrigin??{x:0,y:0},isTented:t.isTented??!0};for(const[n,o]of[["viaStitchPitch",e.viaStitchPitch],["viaHoleDiameter",e.viaHoleDiameter],["viaOuterDiameter",e.viaOuterDiameter],["minimumViaSeparation",e.minimumViaSeparation]])if(!Number.isFinite(o)||o<=0)throw new Error(`${n} must be a finite number greater than zero`);if(!Number.isFinite(e.pourEdgeClearance)||e.pourEdgeClearance<0)throw new Error("pourEdgeClearance must be a finite non-negative number");if(!Number.isFinite(e.obstacleClearance)||e.obstacleClearance<0)throw new Error("obstacleClearance must be a finite non-negative number");if(!Number.isFinite(e.gridOrigin.x)||!Number.isFinite(e.gridOrigin.y))throw new Error("gridOrigin coordinates must be finite numbers");if(e.viaHoleDiameter>=e.viaOuterDiameter)throw new Error("viaHoleDiameter must be smaller than viaOuterDiameter");if(String(e.layers[0])===String(e.layers[1]))throw new Error("layers must contain two distinct PCB layers");return e},xPo=t=>t.type==="pcb_copper_pour"&&t.shape==="brep",EPo=(t,e)=>{const n=new Map(t.circuitJson.filter(a=>a.type==="source_net").map(a=>[a.source_net_id,a])),o=new Map;for(const a of t.circuitJson){if(!xPo(a)||!a.source_net_id||e.sourceNetIds&&!e.sourceNetIds.has(a.source_net_id))continue;const A=o.get(a.source_net_id)??[];A.push(a),o.set(a.source_net_id,A)}const[i,r]=e.layers,s=[];for(const[a,A]of o){const c=A.filter(u=>String(u.layer)===String(i)),l=A.filter(u=>String(u.layer)===String(r));c.length===0||l.length===0||s.push({sourceNetId:a,sourceNet:n.get(a),fromLayerPours:c,toLayerPours:l})}return s},BPo=(t,e)=>(t.outer_diameter??e*2)/2,bPo=({center:t,radius:e,occupiedVias:n,minimumViaSeparation:o})=>n.some(i=>Math.hypot(t.x-i.center.x,t.y-i.center.y)<Math.max(o,e+i.radius)),FRt=({minimum:t,maximum:e,origin:n,pitch:o})=>{const i=[],r=Math.ceil((t-n)/o),s=Math.floor((e-n)/o);for(let a=r;a<=s;a++)i.push(n+a*o);return i},LRt=class extends fC{constructor(t){super(),this.input=t,this.options=yPo(t.options),this.copperPourPairContexts=EPo(t,this.options),this.stitchingObstacles=IPo(t.circuitJson,this.options.layers);const e=this.options.viaOuterDiameter/2;for(const n of t.circuitJson)if(n.type==="pcb_via"){const o=n;this.existingPcbViaIds.add(o.pcb_via_id),this.occupiedVias.push({center:{x:o.x,y:o.y},radius:o.outer_diameter/2})}else if(n.type==="pcb_trace")for(const o of n.route)o.route_type==="via"&&this.occupiedVias.push({center:{x:o.x,y:o.y},radius:BPo(o,e)})}input;options;copperPourPairContexts;pcbVias=[];occupiedVias=[];existingPcbViaIds=new Set;stitchingObstacles;nextCopperPourPairIndex=0;nextViaId=0;_step(){const t=this.copperPourPairContexts[this.nextCopperPourPairIndex];if(!t){this.solved=!0,this.progress=1;return}this.processCopperPourPair(t),this.nextCopperPourPairIndex+=1,this.progress=this.copperPourPairContexts.length===0?1:this.nextCopperPourPairIndex/this.copperPourPairContexts.length,this.solved=this.nextCopperPourPairIndex===this.copperPourPairContexts.length}processCopperPourPair(t){const[e,n]=this.options.layers,o=t.fromLayerPours.map(h=>h.brep_shape),i=t.toLayerPours.map(h=>h.brep_shape),r=TRt(o),s=TRt(i);if(!r||!s)return;const a={minX:Math.max(r.minX,s.minX),maxX:Math.min(r.maxX,s.maxX),minY:Math.max(r.minY,s.minY),maxY:Math.min(r.maxY,s.maxY)};if(a.minX>a.maxX||a.minY>a.maxY)return;const A=this.options.viaOuterDiameter/2,c=A+this.options.pourEdgeClearance,l=A+this.options.obstacleClearance,u=FRt({minimum:a.minX+c,maximum:a.maxX-c,origin:this.options.gridOrigin.x,pitch:this.options.viaStitchPitch}),g=FRt({minimum:a.minY+c,maximum:a.maxY-c,origin:this.options.gridOrigin.y,pitch:this.options.viaStitchPitch});for(const h of g)for(const d of u){const p={x:d,y:h};if(bPo({center:p,radius:A,occupiedVias:this.occupiedVias,minimumViaSeparation:this.options.minimumViaSeparation})||CPo({center:p,radius:l,obstacles:this.stitchingObstacles})||!kRt({center:p,radius:c,shapes:o})||!kRt({center:p,radius:c,shapes:i}))continue;let m=`via_stitch_via_${this.nextViaId++}`;for(;this.existingPcbViaIds.has(m);)m=`via_stitch_via_${this.nextViaId++}`;const _=t.fromLayerPours[0],f={type:"pcb_via",pcb_via_id:m,x:d,y:h,hole_diameter:this.options.viaHoleDiameter,outer_diameter:this.options.viaOuterDiameter,layers:[e,n],from_layer:e,to_layer:n,source_net_id:t.sourceNetId,subcircuit_id:_.subcircuit_id,pcb_group_id:_.pcb_group_id,subcircuit_connectivity_map_key:t.sourceNet?.subcircuit_connectivity_map_key,is_tented:this.options.isTented};this.pcbVias.push(f),this.existingPcbViaIds.add(m),this.occupiedVias.push({center:p,radius:A})}}getOutput(){return{processedCopperPourPairCount:this.copperPourPairContexts.length,pcbVias:this.pcbVias}}},mMe={PackSolver2:rj,LayoutPipelineSolver:ZSt,AutoroutingPipelineSolver:F7t,AssignableAutoroutingPipeline2:ieo,AssignableAutoroutingPipeline3:Bno,AutoroutingPipeline1_OriginalUnravel:zZn,AutoroutingPipelineSolver3_HgPortPointPathing:Rno,AutoroutingPipelineSolver4:s9t,AutoroutingPipelineSolver5:$0o,AutoroutingPipelineSolver7_MultiGraph:F7t,AutoroutingPipelineSolver8:xgo,AutoroutingPipelineSolver9_PreloadedTraceGraph:X6t,AutoroutingPipelineSolver9_Networked:s8t,AutoroutingPipelineSolver11_Simplification:hho,CopperPourPipelineSolver:Rbt,CreateFdmEnclosureSolver:Vbt,FanoutSolver:Sue,ImplicitCopperPourPipelineSolver:NRt,SchematicTracePipelineSolver:Ewt,ViaStitchSolver:LRt},SPo="capacity-autorouter:",HRt=new WeakMap;function _Me(t){return typeof t=="object"&&t!==null&&"then"in t&&typeof t.then=="function"}function ORt(t){return t.constructor.name==="AsyncFunction"}var QPo=class{constructor(t){this.localCacheEngine=t,this.isSyncCache=!ORt(t.getItem)&&!ORt(t.setItem)}localCacheEngine;isSyncCache;cacheHits=0;cacheMisses=0;cacheHitsByPrefix={};cacheMissesByPrefix={};knownCacheKeys=new Set;getCachedSolutionSync(t){if(this.isSyncCache){this.knownCacheKeys.add(t);try{const e=this.localCacheEngine.getItem(this.getLocalCacheEngineKey(t));if(_Me(e)){this.isSyncCache=!1,Promise.resolve(e).catch(()=>{}),this.recordCacheMiss(t);return}return this.parseCachedItem(t,e)}catch{this.recordCacheMiss(t);return}}}async getCachedSolution(t){this.knownCacheKeys.add(t);try{const e=await this.localCacheEngine.getItem(this.getLocalCacheEngineKey(t));return this.parseCachedItem(t,e)}catch{this.recordCacheMiss(t);return}}setCachedSolutionSync(t,e){if(this.isSyncCache){this.knownCacheKeys.add(t);try{const n=JSON.stringify(e);if(n===void 0)return;const o=this.localCacheEngine.setItem(this.getLocalCacheEngineKey(t),n);_Me(o)&&(this.isSyncCache=!1,Promise.resolve(o).catch(()=>{}))}catch{}}}async setCachedSolution(t,e){this.knownCacheKeys.add(t);try{const n=JSON.stringify(e);if(n===void 0)return;await this.localCacheEngine.setItem(this.getLocalCacheEngineKey(t),n)}catch{}}getAllCacheKeys(){return[...this.knownCacheKeys]}clearCache(){for(const t of this.knownCacheKeys){const e=this.getLocalCacheEngineKey(t);try{const n=this.localCacheEngine.removeItem?this.localCacheEngine.removeItem(e):this.localCacheEngine.setItem(e,"null");_Me(n)&&Promise.resolve(n).catch(()=>{})}catch{}}this.knownCacheKeys.clear(),this.cacheHits=0,this.cacheMisses=0,this.cacheHitsByPrefix={},this.cacheMissesByPrefix={}}getLocalCacheEngineKey(t){return`${SPo}${t}`}parseCachedItem(t,e){if(e===null){this.recordCacheMiss(t);return}try{const n=JSON.parse(e);if(n===null){this.recordCacheMiss(t);return}return this.recordCacheHit(t),n}catch{this.recordCacheMiss(t);return}}recordCacheHit(t){this.cacheHits++;const e=t.split(":")[0];this.cacheHitsByPrefix[e]=(this.cacheHitsByPrefix[e]??0)+1}recordCacheMiss(t){this.cacheMisses++;const e=t.split(":")[0];this.cacheMissesByPrefix[e]=(this.cacheMissesByPrefix[e]??0)+1}};function vPo(t){let e=HRt.get(t);return e||(e=new QPo(t),HRt.set(t,e)),e}var GRt=({useAssignableSolver:t=!1,useAutoJumperSolver:e=!1,autorouterVersion:n,useLaserPrefabSolver:o=!1,useTraceSimplificationSolver:i=!1,platformConfig:r,effort:s})=>{const a=r?.useCloudAutorouter&&(s===void 0||s===1)?"AutoroutingPipelineSolver9_Networked":"AutoroutingPipelineSolver9_PreloadedTraceGraph";return i?"AutoroutingPipelineSolver11_Simplification":n==="beta_pipeline1"?"AutoroutingPipeline1_OriginalUnravel":n==="beta_pipeline3"?"AutoroutingPipelineSolver3_HgPortPointPathing":n==="beta_pipeline4"?"AutoroutingPipelineSolver4":n==="beta_pipeline5"?"AutoroutingPipelineSolver5":n==="beta_pipeline7"?"AutoroutingPipelineSolver7_MultiGraph":n==="beta_pipeline9"||n==="latest"?a:o?"AutoroutingPipelineSolver8":e?"AssignableAutoroutingPipeline3":t?"AssignableAutoroutingPipeline2":a};function wPo(t){return t?.localCacheEngine?vPo(t.localCacheEngine):null}var PPo=class{input;isRouting=!1;solver;eventHandlers={complete:[],error:[],progress:[]};cycleCount=0;stepDelay;timeoutId;constructor(t,e={}){this.input=t;const{capacityDepth:n,targetMinCapacity:o,stepDelay:i=0,useAssignableSolver:r=!1,useAutoJumperSolver:s=!1,autorouterVersion:a,useLaserPrefabSolver:A=!1,useTraceSimplificationSolver:c=!1,effort:l,platformConfig:u,onSolverStarted:g}=e,h=GRt({useAssignableSolver:r,useAutoJumperSolver:s,autorouterVersion:a,useLaserPrefabSolver:A,useTraceSimplificationSolver:c,platformConfig:u,effort:l}),d=wPo(u),p={capacityDepth:n,targetMinCapacity:o,cacheProvider:d,effort:l};this.solver=h==="AutoroutingPipelineSolver9_Networked"?new s8t(t,{...p,effort:1}):new mMe[h](t,p),g?.({solverName:h,solverParams:{input:t,options:{capacityDepth:n,targetMinCapacity:o,cacheProvider:d,effort:l}}}),this.stepDelay=i}start(){this.isRouting||(this.isRouting=!0,this.cycleCount=0,this.runCycleAndQueueNextCycle())}async stepSolver(){if("stepAsync"in this.solver&&typeof this.solver.stepAsync=="function"){await this.solver.stepAsync();return}this.solver.step()}async runCycleAndQueueNextCycle(){if(this.isRouting)try{if(this.solver.solved||this.solver.failed){this.solver.failed?this.emitEvent({type:"error",error:new Oj(this.solver.error||"Routing failed")}):this.emitEvent({type:"complete",traces:this.solver.getOutputSimplifiedPcbTraces()}),this.isRouting=!1;return}const t=Date.now(),e=this.solver.iterations;for(;Date.now()-t<250&&!this.solver.failed&&!this.solver.solved;)await this.stepSolver();const n=(this.solver.iterations-e)/(Date.now()-t)*1e3;this.cycleCount++;const o=this.solver?.preview()||void 0,i=this.solver.progress;this.emitEvent({type:"progress",steps:this.cycleCount,iterationsPerSecond:n,progress:i,phase:"getCurrentPhase"in this.solver?this.solver.getCurrentPhase():this.solver.activeSubSolver?.getSolverName()??this.solver.getSolverName(),debugGraphics:o}),this.stepDelay>0?this.timeoutId=setTimeout(()=>{this.runCycleAndQueueNextCycle()},this.stepDelay):this.timeoutId=setTimeout(()=>{this.runCycleAndQueueNextCycle()},0)}catch(t){this.emitEvent({type:"error",error:t instanceof Error?new Oj(t.message):new Oj(String(t))}),this.isRouting=!1}}stop(){this.isRouting&&(this.isRouting=!1,this.timeoutId!==void 0&&(clearTimeout(this.timeoutId),this.timeoutId=void 0))}on(t,e){t==="complete"?this.eventHandlers.complete.push(e):t==="error"?this.eventHandlers.error.push(e):t==="progress"&&this.eventHandlers.progress.push(e)}emitEvent(t){if(t.type==="complete")for(const e of this.eventHandlers.complete)e(t);else if(t.type==="error")for(const e of this.eventHandlers.error)e(t);else if(t.type==="progress")for(const e of this.eventHandlers.progress)e(t)}solveSync(){if(this.solver.solve(),this.solver.failed)throw new Oj(this.solver.error||"Routing failed");return this.solver.getOutputSimplifiedPcbTraces()}getConnectedOffboardObstacles(){return"getConnectedOffboardObstacles"in this.solver?this.solver.getConnectedOffboardObstacles():{}}},YRt=(t,e)=>({name:t,cacheable:!0,getSolverName:n=>GRt({...n,...e}),create:({simpleRouteJson:n,commonAutorouterOptions:o,onSolverStarted:i})=>new PPo(n,{...o,...e,onSolverStarted:r=>i?.({...r,solverConstructorArgs:[r.solverParams]})})}),MPo=YRt("tscircuit",{}),DPo=YRt("tscircuit_simplify",{useTraceSimplificationSolver:!0}),URt=t=>({name:t,cacheable:!1,followUpAutorouter:"default",getSolverName:()=>"FanoutSolver",create:({simpleRouteJson:e,busFanoutDirections:n,fanoutBounds:o,fanoutRoutingLayers:i,allowBlindAndBuriedVias:r,componentNamesById:s,onSolverStarted:a})=>new aMe(e,{mode:t,busFanoutDirections:n,fanoutBounds:o,fanoutRoutingLayers:i,allowBlindAndBuriedVias:r,componentNamesById:s,onSolverStarted:a})}),NPo=new Map([["single_layer_fanout",URt("single_layer_fanout")],["fanout",URt("fanout")],["simplify",DPo]]),KRt=t=>NPo.get(t??"")??MPo,RPo=(t,e)=>{const n=KRt(t.preset),o=[{autorouterConfig:t,strategy:n,usesPreviousStageOutput:!1}];if(n.followUpAutorouter){const i=h$(n.followUpAutorouter,e);o.push({autorouterConfig:i,strategy:KRt(i.preset),usesPreviousStageOutput:!0})}return o},TPo=({circuitJson:t,editEvents:e,manualEditsFile:n})=>{const o={...n,pcb_placements:[...n.pcb_placements??[]]};for(const i of e)if(i.edit_event_type==="edit_pcb_component_location"){const{pcb_component_id:r,new_center:s}=i,a=Mr(t).pcb_component.get(r);if(!a)continue;const A=Mr(t).source_component.get(a.source_component_id);if(!A)continue;const c=o.pcb_placements?.findIndex(u=>u.selector===A.name),l={selector:A.name,center:s,relative_to:"group_center"};c>=0?o.pcb_placements[c]=l:o.pcb_placements.push(l)}return o},kPo=({circuitJson:t,editEvents:e,manualEditsFile:n})=>{const o={...n,schematic_placements:[...n.schematic_placements??[]]};for(const i of e)if(i.edit_event_type==="edit_schematic_component_location"){const{schematic_component_id:r,new_center:s}=i,a=Mr(t).schematic_component.get(r);if(!a||!a.source_component_id)continue;const A=Mr(t).source_component.get(a.source_component_id);if(!A)continue;const c=o.schematic_placements?.findIndex(u=>u.selector===A.name),l={selector:A.name,center:s,relative_to:"group_center"};c>=0?o.schematic_placements[c]=l:o.schematic_placements.push(l)}return o},VRt=({circuitJson:t,editEvents:e,manualEditsFile:n})=>{const o=e.filter(s=>s.edit_event_type==="edit_schematic_component_location"),i=e.filter(s=>s.edit_event_type==="edit_pcb_component_location");let r=n;return o.length>0&&(r=kPo({circuitJson:t,editEvents:o,manualEditsFile:r})),i.length>0&&(r=TPo({circuitJson:t,editEvents:i,manualEditsFile:r})),r},FPo=class extends Ir{get config(){return{componentName:"Bus",zodProps:wPn}}},LPo=(t,e)=>{const{db:n}=t.root,o=t.getSubcircuit(),r=n.source_trace.list().filter(c=>c.subcircuit_id===o.subcircuit_id).filter(c=>c.name===e),s=new Set;if(r.length>0)for(const c of r)c.subcircuit_connectivity_map_key&&s.add(c.subcircuit_connectivity_map_key);else{const c=o.selectOne(e,{type:"port"});if(c?.source_port_id){const l=n.source_port.get(c.source_port_id);l?.subcircuit_connectivity_map_key&&s.add(l.subcircuit_connectivity_map_key)}}if(s.size!==1)return;const a=s.values().next().value;return a?{sourcePorts:n.source_port.list().filter(c=>c.subcircuit_connectivity_map_key===a),sourceTraceName:r.length>0?e:void 0}:void 0},HPo=t=>t.length<=1?t.join(""):t.length===2?`${t[0]} and ${t[1]}`:`${t.slice(0,-1).join(", ")}, and ${t.at(-1)}`,OPo=(t,e)=>{let n;if(t.source_component_id&&(n=e.get(t.source_component_id)),!n?.name)return t.source_port_id;const o=t.most_frequently_referenced_by_name??t.name;return`.${n.name} > .${o}`},GPo=({differentialPairName:t,connectionPolarity:e,connectionSelector:n,sourceTraceName:o,terminalPinSelectors:i})=>{const r=HPo(i),s=r?`: ${r}`:"";return o&&i.length>2?`Differential pair "${t}" ${e}Connection uses the ambiguous trace name "${o}": its connection has more than 2 terminal pins${s}.`:`Differential pair "${t}" ${e}Connection="${n}" is not point-to-point: expected exactly 2 terminal pins, found ${i.length}${s}.`},YPo=t=>{const{db:e}=t.root,n=new Map;for(const o of e.source_component.list())n.set(o.source_component_id,{name:o.name});for(const o of["positive","negative"]){let i=t._parsedProps.negativeConnection;o==="positive"&&(i=t._parsedProps.positiveConnection);const r=LPo(t,i);if(!r)continue;const s=r.sourcePorts;if(s.length===2)continue;let a="";const A=s[0];if(A){if(!A.source_component_id)throw new Error(`Differential pair "${t.name}" resolved terminal port "${A.source_port_id}" without a source_component_id`);a=A.source_component_id}const c=s.map(l=>OPo(l,n)).sort((l,u)=>l.localeCompare(u));e.source_property_ignored_warning.insert({source_component_id:a,property_name:`${o}Connection`,error_type:"source_property_ignored_warning",message:GPo({differentialPairName:t.name,connectionPolarity:o,connectionSelector:i,sourceTraceName:r.sourceTraceName,terminalPinSelectors:c}),subcircuit_id:t.getSubcircuit().subcircuit_id??void 0})}},UPo=class extends Ir{get config(){return{componentName:"DifferentialPair",zodProps:PPn}}doInitialSourceDesignRuleChecks(){YPo(this)}},zRt=t=>{const e={...t.bounds};for(const n of t.connections)if(!n.isOffBoard)for(const o of n.pointsToConnect)e.minX=Math.min(e.minX,o.x),e.maxX=Math.max(e.maxX,o.x),e.minY=Math.min(e.minY,o.y),e.maxY=Math.max(e.maxY,o.y);return e},KPo=({bus:t,busSourceTraces:e,traceNameOrPortSelector:n})=>{const o=e.filter(A=>A.name===n),r=(o.length===0?t.getSubcircuit().selectOne(n,{type:"port"}):null)?.source_port_id??void 0,s=r?e.filter(A=>A.connected_source_port_ids.includes(r)):o;if(s.length===0)throw new Error(`Could not find source trace for trace name or port selector "${n}" in bus "${t.name}"`);if(s.length>1)throw new Error(`Trace name or port selector "${n}" matches multiple source traces in bus "${t.name}"`);return s[0].source_trace_id},VPo=({srjConnections:t,bus:e,sourceTraceId:n,traceNameOrPortSelector:o})=>{const i=t.filter(r=>r.source_trace_id===n);if(i.length===0)throw new Error(`Could not find an SRJ connection for "${o}" in bus "${e.name}"`);return i.map(r=>r.name)},zPo=t=>t.trim().replace(/^net\./,"").replace(/^\./,""),JPo=({fanoutPourNetMap:t,sourceNets:e,sourceTraces:n,subcircuitId:o})=>{const i=new Map;if(!t)return i;const r=new Map;for(const[s,a]of Object.entries(t)){const A=Array.isArray(a)?a:[a];for(const c of A){const l=zPo(c);for(const u of e){if(u.name!==l)continue;const g=r.get(u.source_net_id);if(g&&g!==s)throw new Error(`Fanout plane net "${l}" maps to multiple layers ("${g}" and "${s}"); use fanoutPourNetMap to select one`);r.set(u.source_net_id,s)}}}for(const s of n){if(o&&s.subcircuit_id!==o||s.connected_source_port_ids.length!==1)continue;const a=new Set((s.connected_source_net_ids??[]).map(c=>r.get(c)).filter(c=>c!==void 0));if(a.size>1)throw new Error(`Source trace "${s.name??s.source_trace_id}" connects to fanout planes on multiple layers`);const A=a.values().next().value;A&&i.set(s.source_trace_id,A)}return i},WPo=({srjConnections:t,buses:e,sourceTraces:n,subcircuitId:o,planeTerminatedSourceTraceLayers:i})=>{const r=[];for(const A of e){const c=A.getSubcircuit().subcircuit_id;if(o&&c!==o)continue;const l=n.filter(g=>g.subcircuit_id===c),u=A._parsedProps.connections.flatMap(g=>{const h=KPo({bus:A,busSourceTraces:l,traceNameOrPortSelector:g});return VPo({srjConnections:t,bus:A,sourceTraceId:h,traceNameOrPortSelector:g})});if(new Set(u).size!==u.length)throw new Error(`Bus "${A.name}" resolves multiple entries to one trace`);r.push({busId:A.name,name:A.name,connectionNames:u,...A._parsedProps.maxLengthSkew!==void 0?{maxLengthSkew:A._parsedProps.maxLengthSkew}:{},...A._parsedProps.pcbTraceWidth!==void 0?{traceWidth:A._parsedProps.pcbTraceWidth}:{},...A._parsedProps.pcbAllowedLayers!==void 0?{allowedLayers:A._parsedProps.pcbAllowedLayers}:{},...A._parsedProps.preferredLayer!==void 0?{preferredLayer:A._parsedProps.preferredLayer}:{},...A._parsedProps.preferredLayers!==void 0?{preferredLayers:A._parsedProps.preferredLayers}:{}})}const s=[];for(const[A,c]of i??[]){const l=n.find(h=>h.source_trace_id===A),u=t.find(h=>h.source_trace_id===A);if(!l||!u)continue;const g=l.name??l.source_trace_id;if([...r,...s].some(h=>h.busId===g))throw new Error(`Fanout plane trace "${g}" conflicts with an existing bus name`);s.push({busId:g,name:g,connectionNames:[u.name],termination:{type:"plane",layer:c}})}const a=[...s,...r];return a.length>0?a:void 0},jPo=(t,e)=>t.filter(n=>n.name===e),$Po=(t,e)=>t.filter(n=>n.connected_source_port_ids.includes(e)),JRt=({differentialPair:t,differentialPairSourceTraces:e,traceNameOrPortSelector:n})=>{const o=t.getSubcircuit(),i=jPo(e,n),s=(i.length===0?o.selectOne(n,{type:"port"}):null)?.source_port_id??void 0,a=s?$Po(e,s):i;if(a.length===0)throw new Error(`Could not find source trace for trace name or port selector "${n}" in differential pair "${t.name}"`);if(a.length>1)throw new Error(`Trace name or port selector "${n}" matches multiple source traces for differential pair "${t.name}"`);const A=a[0];if(!A)throw new Error(`Expected one source trace for trace name or port selector "${n}" in differential pair "${t.name}"`);const c=A.subcircuit_connectivity_map_key;if(!c)throw new Error(`Source trace "${A.source_trace_id}" does not have a subcircuit connectivity map key for differential pair "${t.name}"`);return c},WRt=({srjConnections:t,differentialPairName:e,differentialPairSourceTraces:n,traceSubcircuitConnectivityMapKey:o,traceNameOrPortSelector:i})=>{const r=[],s=new Set;for(const c of n)if(c.subcircuit_connectivity_map_key===o){r.push(c.source_trace_id);for(const l of c.connected_source_net_ids??[])s.add(l)}const a=[];for(const c of t)(s.has(c.name)||c.source_trace_id&&r.includes(c.source_trace_id))&&a.push(c);if(a.length===0)throw new Error(`Could not find an SRJ connection for trace name or port selector "${i}" in differential pair "${e}"`);const A=new Map;for(const c of a){const l=c.routingPcbGroupId;if(A.has(l)){const u=l===void 0?"the global routing cohort":`routing PCB group "${l}"`;throw new Error(`Subcircuit connectivity map key "${o}" matches multiple SRJ connections in ${u} for differential pair "${e}"`)}A.set(l,c.name)}return A},jRt=t=>t===void 0?"the global routing cohort":`routing PCB group "${t}"`,qPo=({srjConnections:t,differentialPairs:e,sourceTraces:n,subcircuitId:o})=>{const i=[];for(const r of e){const s=r.getSubcircuit().subcircuit_id;if(o&&s!==o)continue;const a=n.filter(p=>p.subcircuit_id===s),A=r._parsedProps.positiveConnection,c=r._parsedProps.negativeConnection,l=JRt({differentialPair:r,differentialPairSourceTraces:a,traceNameOrPortSelector:A}),u=JRt({differentialPair:r,differentialPairSourceTraces:a,traceNameOrPortSelector:c}),g=WRt({srjConnections:t,differentialPairName:r.name,differentialPairSourceTraces:a,traceSubcircuitConnectivityMapKey:l,traceNameOrPortSelector:A}),h=WRt({srjConnections:t,differentialPairName:r.name,differentialPairSourceTraces:a,traceSubcircuitConnectivityMapKey:u,traceNameOrPortSelector:c}),d=r._parsedProps.maxLengthSkew??.1;for(const p of g.keys())if(!h.has(p))throw new Error(`Differential pair "${r.name}" has a positive SRJ connection in ${jRt(p)} without a matching negative SRJ connection`);for(const p of h.keys())if(!g.has(p))throw new Error(`Differential pair "${r.name}" has a negative SRJ connection in ${jRt(p)} without a matching positive SRJ connection`);for(const[p,m]of g){const _=h.get(p);i.push({connectionNames:[m,_],lengthTolerance:d,...r._parsedProps.pcbTraceGap!==void 0?{traceGap:r._parsedProps.pcbTraceGap}:{},...r._parsedProps.maxUncoupledLength!==void 0?{maxUncoupledLength:r._parsedProps.maxUncoupledLength}:{}})}}return i.length>0?i:void 0},p$=t=>typeof t=="string"?t:t.name,XPo=t=>t.source_trace_id??t.connection_name??t.pcb_trace_id,ZPo=t=>{const e=new Set(t.connectsTo??[]);for(const n of t.route)if(n.route_type==="wire")for(const o of[n.start_pcb_port_id,n.end_pcb_port_id])o&&e.add(o);return Array.from(e)},eMo=t=>t.route.map(e=>{if(e.route_type==="wire")return{route_type:"wire",x:e.x,y:e.y,width:e.width,layer:p$(e.layer)};if(e.route_type==="via"){const n=e,o=n.outer_diameter??n.via_diameter,i=n.hole_diameter??n.via_hole_diameter;return{route_type:"via",x:e.x,y:e.y,from_layer:p$(e.from_layer),to_layer:p$(e.to_layer),...o!==void 0?{via_diameter:o}:{},...i!==void 0?{via_hole_diameter:i}:{}}}return{route_type:"through_obstacle",start:e.start,end:e.end,from_layer:p$(e.start_layer),to_layer:p$(e.end_layer),width:e.width}}),tMo=({scopedDb:t,relevantSubcircuitIds:e})=>t.pcb_trace.list().filter(n=>!n.subcircuit_id||n.pcb_component_id&&!n.source_trace_id?!1:e===null||e.has(n.subcircuit_id)).map(n=>{const o=n,i=XPo(o);return{type:"pcb_trace",pcb_trace_id:n.pcb_trace_id,source_trace_id:n.source_trace_id,connection_name:i,connectsTo:ZPo(o),route:eMo(o)}}).filter(n=>n.route.length>=2),nMo=.5,oMo=t=>Array.from(new Set(t.filter(e=>!!e))),iMo=t=>typeof t=="string"?t:t.name,$Rt=({layer:t,connectedTo:e,center:n,width:o,height:i})=>({type:"rect",layers:[t],center:n,width:o,height:i,connectedTo:e,isCopperPour:!0}),rMo=({outline:t,group:e,board:n})=>t&&t.length>=3?t:e?.outline&&e.outline.length>=3?e.outline:n?.outline&&n.outline.length>=3?n.outline:null,sMo=({group:t,board:e})=>t?.width&&t.height?{center:t.center,width:t.width,height:t.height}:e?.width&&e.height?{center:e.center,width:e.width,height:e.height}:null,aMo=(t,e)=>oMo([t.source_net_id,t.subcircuit_connectivity_map_key,t.source_net_id?e.getNetConnectedToId(t.source_net_id):null]),AMo=({connMap:t,subcircuitComponent:e,board:n,group:o})=>{if(!e)return[];const i=[],r=e.selectAll("copperpour");for(const s of r){const a=s._parsedProps;if(!a.unbroken)continue;const A=s.getSubcircuit().selectOne(a.connectsTo);if(!A?.source_net_id)continue;const c=iMo(a.layer),l=aMo(A,t);if(l.length===0)continue;const u=rMo({outline:a.outline,group:o,board:n});if(u){const h=Gwe(u,{rectHeight:nMo});if(h.length>0){i.push(...h.map(d=>$Rt({layer:c,connectedTo:l,center:d.center,width:d.width,height:d.height})));continue}}const g=sMo({group:o,board:n});g&&i.push($Rt({layer:c,connectedTo:l,center:g.center,width:g.width,height:g.height}))}return i},cMo=(t,e)=>{const n=new Set;let o=e,i=!0;for(;o&&!n.has(o);){n.add(o);const r=t.source_group.getWhere({subcircuit_id:o}),s=r?t.source_board.getWhere({source_group_id:r.source_group_id}):void 0;if(s)return{board:t.pcb_board.getWhere({source_board_id:s.source_board_id})??null,subcircuitIsBoard:i};o=r?.parent_subcircuit_id??null,i=!1}return{board:null,subcircuitIsBoard:!1}},fMe=({db:t,circuitJson:e,subcircuit_id:n,minTraceWidth:o,minTraceToPadEdgeClearance:i,minViaEdgeToPadEdgeClearance:r,minViaHoleEdgeToViaHoleEdgeClearance:s,minPlatedHoleDrillEdgeToDrillEdgeClearance:a,minPadEdgeToPadEdgeClearance:A,minBoardEdgeClearance:c,minViaHoleDiameter:l,minViaPadDiameter:u,nominalTraceWidth:g,subcircuitComponent:h,routingPcbGroupId:d,fanoutPourNetMap:p,ignoreExistingTopLevelPcbRouteState:m=!1})=>{if(!t&&e&&(t=Mr(e)),!t)throw new Error("db or circuitJson is required");const _=t.pcb_trace_hint.list(),f=n?new Set([n]):null;if(n){const it=uPe(t,n);for(const Yt of it)f.add(Yt)}const I=(e??t.toArray()).filter(it=>!n||"subcircuit_id"in it&&f.has(it.subcircuit_id));let C=null,y=!1;if(n){const it=cMo(t,n);C=it.board,y=it.subcircuitIsBoard&&C!==null}C||(C=t.pcb_board.list()[0]),t=Mr(I);const x=it=>{if(!it?.source_component_id)return;const Yt=t.source_component.get(it.source_component_id);if(Yt?.name)return`${Yt.name}.${it.name}`},E=d?t.pcb_group.get(d):n?t.pcb_group.getWhere({subcircuit_id:n}):void 0;let B=h?.pcb_group_id;B==null&&!y&&(B=E?.pcb_group_id);const S=Vf(I),Q=t.pcb_breakout_point.list().filter(it=>!n||f?.has(it.subcircuit_id)),w=it=>it.subcircuit_id===n&&(B?it.pcb_group_id===B:!y),M=tMo({scopedDb:t,relevantSubcircuitIds:f}),k=new Map(M.map(it=>[it.pcb_trace_id,it])),R=it=>{if(!it.pcb_trace_id)return!1;const Yt=k.get(it.pcb_trace_id);if(!Yt)return!1;const pn=new Set(it.layers);return Yt.route.some(be=>{if(be.route_type!=="via"||be.x!==it.x||be.y!==it.y)return!1;const et=new Set(lw({fromLayer:be.from_layer,toLayer:be.to_layer,layerCount:C?.num_layers??2}));return et.size===pn.size&&[...et].every(It=>pn.has(It))})},F=_Mt([...C?[C]:[],...t.source_component.list(),...t.source_port.list(),...t.pcb_port.list(),...t.pcb_component.list(),...t.pcb_smtpad.list(),...t.pcb_plated_hole.list(),...t.pcb_hole.list(),...t.pcb_trace.list().filter(it=>!it.source_trace_id),...t.pcb_via.list().filter(it=>(!m||!!it.subcircuit_id)&&!R(it)),...t.pcb_keepout.list(),...t.pcb_cutout.list()].filter(it=>it.type==="pcb_board"||!n||f?.has(it.subcircuit_id)),S);F.push(...AMo({connMap:S,subcircuitComponent:h,board:C,group:E}));for(const it of F){const Yt=it.connectedTo.flatMap(pn=>S.getIdsConnectedToNet(pn));it.connectedTo=[...new Set([...it.connectedTo,...Yt])]}const O=t.source_component_internal_connection.list(),U=new Map;for(const it of O)for(const Yt of it.source_port_ids)U.set(Yt,it.source_component_internal_connection_id);const Y=new Map;for(const it of t.pcb_port.list())if(it.source_port_id){const Yt=t.pcb_smtpad.getWhere({pcb_port_id:it.pcb_port_id});Yt&&Y.set(Yt.pcb_smtpad_id,it.source_port_id);const pn=t.pcb_plated_hole.getWhere({pcb_port_id:it.pcb_port_id});pn&&Y.set(pn.pcb_plated_hole_id,it.source_port_id)}for(const it of F)for(const Yt of it.connectedTo){const pn=Y.get(Yt);if(pn){const be=U.get(pn);if(be){it.offBoardConnectsTo=[be],it.netIsAssignable=!0;break}}}const W=F.flatMap(it=>[{x:it.center.x-it.width/2,y:it.center.y-it.height/2},{x:it.center.x+it.width/2,y:it.center.y+it.height/2}]).concat(C?.outline??[]);let te;const j=!!(E?.width&&E.height&&n&&!y);if(j?te={minX:E.center.x-E.width/2,maxX:E.center.x+E.width/2,minY:E.center.y-E.height/2,maxY:E.center.y+E.height/2}:C&&!C.outline?te={minX:C.center.x-C.width/2,maxX:C.center.x+C.width/2,minY:C.center.y-C.height/2,maxY:C.center.y+C.height/2}:te={minX:Math.min(...W.map(it=>it.x))-1,maxX:Math.max(...W.map(it=>it.x))+1,minY:Math.min(...W.map(it=>it.y))-1,maxY:Math.max(...W.map(it=>it.y))+1},E?.width&&E.height&&!j){const it={minX:E.center.x-E.width/2,maxX:E.center.x+E.width/2,minY:E.center.y-E.height/2,maxY:E.center.y+E.height/2};te={minX:Math.min(te.minX,it.minX),maxX:Math.max(te.maxX,it.maxX),minY:Math.min(te.minY,it.minY),maxY:Math.max(te.maxY,it.maxY)}}const J=new Set(t.pcb_trace.list().filter(it=>it.source_trace_id?n?it.subcircuit_id===n:it.subcircuit_id?t.source_trace.get(it.source_trace_id)?.subcircuit_id===it.subcircuit_id:!1:!1).map(it=>it.source_trace_id).filter(it=>!!it)),oe=new Map;for(const it of Q){const Yt=it.source_port_id;Yt&&oe.set(Yt,it)}const ie=it=>{const Yt=it.layers?.[0]??"top",pn=oe.get(it.source_port_id),be=x(t.source_port.get(it.source_port_id));return pn&&!w(pn)?{x:pn.x,y:pn.y,layer:pn.layer??Yt,pointId:pn.pcb_breakout_point_id,port_selector:be}:{x:it.x,y:it.y,layer:Yt,pointId:it.pcb_port_id,pcb_port_id:it.pcb_port_id,port_selector:be}},ne=t.source_trace.list(),le=JPo({fanoutPourNetMap:p,sourceNets:t.source_net.list(),sourceTraces:ne,subcircuitId:n}),ge=ne.filter(it=>!J.has(it.source_trace_id)).filter(it=>!n||it.subcircuit_id===n).map(it=>{const Yt=it.connected_source_port_ids.map(xt=>t.pcb_port.getWhere({source_port_id:xt})).filter(xt=>xt!==null),pn=le.has(it.source_trace_id);if(Yt.length<2&&!(pn&&Yt.length===1))return null;for(const xt of Yt)if(xt.x===void 0||xt.y===void 0)return console.error(`(source_port_id: ${xt.source_port_id}) for trace ${it.source_trace_id} does not have x/y coordinates. Skipping this trace.`),null;const be=new Set(Yt.map(xt=>xt.pcb_port_id)),et=_.filter(xt=>be.has(xt.pcb_port_id)),It=[];for(const xt of et){const Ze=t.pcb_port.get(xt.pcb_port_id)?.layers?.[0]??"top";for(const dt of xt.route)It.push({x:dt.x,y:dt.y,layer:Ze})}const Bt=Yt.map(xt=>ie(xt)),[mt,...st]=Bt;return{name:it.source_trace_id??S.getNetConnectedToId(it.source_trace_id)??"",source_trace_id:it.source_trace_id,nominalTraceWidth:it.min_trace_thickness,width:it.min_trace_thickness,pointsToConnect:[mt,...It,...st]}}).filter(it=>it!==null),_e=t.source_net.list().filter(it=>!n||it.subcircuit_id===n),ue=[],fe=new Map,pe=new Set,ye=new Set(_e.map(it=>it.source_net_id)),Me=t.source_trace.list().filter(it=>!n||it.subcircuit_id===n),ve=new Set((h?.selectAll("trace")??[]).flatMap(it=>{const Yt=it;return Yt._exposesSubcircuitConnection&&Yt.source_trace_id?[Yt.source_trace_id]:[]})),he=new Set;for(const it of Me)if(ve.has(it.source_trace_id))for(const Yt of it.connected_source_net_ids??[])ye.has(Yt)||he.add(Yt);const Qe=new Set(n?t.pcb_trace.list().filter(it=>it.subcircuit_id&&it.subcircuit_id!==n&&f?.has(it.subcircuit_id)).map(it=>it.source_trace_id).filter(it=>!!it):[]),Pe=t.source_trace.list().filter(it=>!le.has(it.source_trace_id)).filter(it=>!J.has(it.source_trace_id)||n!=null&&it.subcircuit_id===n).filter(it=>!n||it.subcircuit_id===n||(it.connected_source_net_ids?.some(Yt=>ye.has(Yt))??!1)||(it.connected_source_net_ids?.some(Yt=>he.has(Yt))??!1)&&!Qe.has(it.source_trace_id)),we=it=>it?S.getNetConnectedToId(it)??it:null;for(const it of _e){const Yt=we(it.source_net_id);if(!Yt||pe.has(Yt))continue;pe.add(Yt);const pn=_e.filter(st=>we(st.source_net_id)===Yt).map(st=>st.source_net_id),be=Pe.filter(st=>[st.source_trace_id,...st.connected_source_net_ids??[]].some(xt=>we(xt)===Yt));let et;for(const st of be)st.min_trace_thickness!==void 0&&(et=Math.max(et??0,st.min_trace_thickness));const It=[],Bt=new Set;for(const st of be){const xt=t.pcb_port.list().filter(Xe=>st.connected_source_port_ids.includes(Xe.source_port_id));for(const Xe of xt){const Ze=ie(Xe);Bt.has(Ze.pointId)||(Bt.add(Ze.pointId),It.push(Ze))}}const mt={name:it.source_net_id??S.getNetConnectedToId(it.source_net_id),nominalTraceWidth:et,width:et,pointsToConnect:It};if(It.length!==0){ue.push(mt);for(const st of pn)fe.set(st,mt)}}const Te=[];for(const it of Q){const Yt=it.source_port_id,pn={x:it.x,y:it.y,layer:it.layer??"top",pointId:it.pcb_breakout_point_id};if(Yt){const be=t.pcb_port.getWhere({source_port_id:Yt});if(!be)continue;const et={x:be.x,y:be.y,layer:be.layers?.[0]??"top",pointId:be.pcb_port_id,pcb_port_id:be.pcb_port_id,port_selector:x(t.source_port.get(be.source_port_id))},It=w(it),Bt=!It&&it.subcircuit_id===n;if(It||Bt){Te.push({name:Bt?`breakout:${it.pcb_breakout_point_id}`:Yt,source_trace_id:it.source_trace_id,routingPcbGroupId:Bt?it.pcb_group_id:void 0,pointsToConnect:[et,pn]});continue}it.source_trace_id||Te.push({name:Yt,pointsToConnect:[et,pn]});continue}if(it.source_net_id){const be=fe.get(it.source_net_id);be?be.pointsToConnect.push(pn):Te.push({name:it.source_net_id,pointsToConnect:[pn]})}}const Re=ue.filter(it=>it.pointsToConnect.length>=2),Ee=[...ge,...Re,...Te],ke=o??C?.min_trace_width??.1;for(const it of Ee)it.nominalTraceWidth??=g??ke,it.width??=g??ke;te=zRt({bounds:te,connections:Ee});const Ce=h?.selectAll("differentialpair")??[],Le=h?.selectAll("bus")??[],Ye=qPo({srjConnections:Ee,differentialPairs:Ce,sourceTraces:t.source_trace.list(),subcircuitId:n}),tt=WPo({srjConnections:Ee,buses:Le,sourceTraces:t.source_trace.list(),subcircuitId:n,planeTerminatedSourceTraceLayers:le});if(n){const it=new Map;for(const pn of Ee)for(const be of pn.pointsToConnect)be.pointId&&it.set(be.pointId,pn);const Yt=t.pcb_trace.list().filter(pn=>f?.has(pn.subcircuit_id));for(const pn of Yt){const be=new Set;for(const Bt of pn.route)Bt.start_pcb_port_id&&be.add(Bt.start_pcb_port_id),Bt.end_pcb_port_id&&be.add(Bt.end_pcb_port_id);if(be.size<2)continue;const et=be.values().next().value;if(!et)continue;const It=it.get(et);It&&[...be].every(Bt=>it.get(Bt)===It)&&(It.externallyConnectedPointIds??=[],It.externallyConnectedPointIds.push([...be]))}}const At=l??C?.min_via_hole_diameter,at=u??C?.min_via_pad_diameter,nt=i??C?.min_trace_to_pad_edge_clearance,gt=r??C?.min_via_edge_to_pad_edge_clearance,bt=s??C?.min_via_hole_edge_to_via_hole_edge_clearance,Ct=a??C?.min_plated_hole_drill_edge_to_drill_edge_clearance,Dt=A??C?.min_pad_edge_to_pad_edge_clearance,kt=c??C?.min_board_edge_clearance;return{simpleRouteJson:{bounds:te,obstacles:F,connections:Ee,differentialPairs:Ye,...tt?{buses:tt}:{},traces:M.length>0?M:void 0,layerCount:C?.num_layers??2,allowBlindAndBuriedVias:C?.allow_blind_and_buried_vias??!1,minTraceWidth:Math.min(ke,...Ee.map(it=>it.width)),minViaDiameter:at,minViaHoleDiameter:At,minViaPadDiameter:at,min_via_hole_diameter:At,min_via_pad_diameter:at,minTraceToPadEdgeClearance:nt,minViaEdgeToPadEdgeClearance:gt,minViaHoleEdgeToViaHoleEdgeClearance:bt,minPlatedHoleDrillEdgeToDrillEdgeClearance:Ct,minPadEdgeToPadEdgeClearance:Dt,minBoardEdgeClearance:kt,nominalTraceWidth:g,outline:C?.outline?.map(it=>({...it}))},connMap:S}},qRt=class extends Ir{matchedPort=null;get config(){return{componentName:"TraceHint",zodProps:yDn}}doInitialPortMatching(){const{db:t}=this.root,{_parsedProps:e,parent:n}=this;if(!n)return;if(n.componentName==="Trace"){this.renderError(`Port inference inside trace is not yet supported (${this})`);return}if(!n)throw new Error("TraceHint has no parent");if(!e.for){this.renderError(`TraceHint has no for property (${this})`);return}const o=n.selectOne(e.for,{type:"port"});o||this.renderError(`${this} could not find port for selector "${e.for}"`),this.matchedPort=o,o.registerMatch(this)}getPcbRouteHints(){const{_parsedProps:t}=this,e=t.offset?[t.offset]:t.offsets;if(!e)return[];const n=this._computePcbGlobalTransformBeforeLayout();return e.map(o=>({...ts(n,o),via:o.via,to_layer:o.to_layer,trace_width:o.trace_width}))}doInitialPcbTraceHintRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this;t.pcb_trace_hint.insert({pcb_component_id:this.matchedPort?.pcb_component_id,pcb_port_id:this.matchedPort?.pcb_port_id,route:this.getPcbRouteHints()})}};function lMo({anchor:t,x:e,y:n,width:o,height:i,isInside:r}){switch(t){case"top_left":return{x:e,y:n+i,textAnchor:r?"top_left":"bottom_left"};case"top_center":return{x:e+o/2,y:n+i,textAnchor:r?"top_center":"bottom_center"};case"top_right":return{x:e+o,y:n+i,textAnchor:r?"top_right":"bottom_right"};case"center_left":return{x:e,y:n+i/2,textAnchor:r?"center_left":"center_right"};case"center":return{x:e+o/2,y:n+i/2,textAnchor:"center"};case"center_right":return{x:e+o,y:n+i/2,textAnchor:r?"center_right":"center_left"};case"bottom_left":return{x:e,y:n,textAnchor:r?"bottom_left":"top_left"};case"bottom_center":return{x:e+o/2,y:n,textAnchor:r?"bottom_center":"top_center"};case"bottom_right":return{x:e+o,y:n,textAnchor:r?"bottom_right":"top_right"};default:return{x:e+o/2,y:n+i,textAnchor:"center"}}}var XRt=t=>t?Object.entries(t).map(([e,n])=>{const o=uw(e);if(o===null)throw new Error(`Invalid schematicbox pinLabels key "${e}". Expected pin<number>.`);const i=typeof n=="string"?[n]:[...n];return{pinNumber:o,displayPinLabel:i[0]??e,pinAliases:i}}):[],uMo=({referencedChip:t,schematicBoxPins:e})=>{const n=Kj(t._parsedProps.schPinStyle,t._parsedProps.pinLabels);if(!n)return;const o={};for(const{pinNumber:i,referencedSourcePort:r}of e){if(r.pin_number===void 0)continue;const s=n[`pin${r.pin_number}`];s&&(o[`pin${i}`]=s)}return Object.keys(o).length>0?o:void 0},gMo=({inheritedPinStyle:t,overridePinStyle:e})=>{if(!t&&!e)return;const n={...t};for(const[o,i]of Object.entries(e??{}))n[o]={...n[o],...i};return Object.keys(n).length>0?n:void 0},dMo=t=>{if(t.root?.schematicDisabled)return;const{db:e}=t.root,n=t._parsedProps;if(!n.chipRef)return;const o=t.getSubcircuit().selectOne(n.chipRef);if(!o?.source_component_id)throw new Error(`Could not resolve chipRef "${n.chipRef}" for ${t.getString()}`);const i=XRt(n.pinLabels),r=Object.fromEntries(i.map(({pinNumber:f,displayPinLabel:I})=>[`pin${f}`,I])),s=e.source_port.list({source_component_id:o.source_component_id}),a=i.map(f=>{const I=s.find(C=>f.pinAliases.some(y=>C.name===y||C.port_hints?.includes(y)));if(!I)throw new Error(`Could not find pin "${f.displayPinLabel}" on chipRef "${n.chipRef}"`);return{...f,referencedSourcePort:I}}),A=uMo({referencedChip:o,schematicBoxPins:a}),c=gMo({inheritedPinStyle:A,overridePinStyle:Kj(n.schPinStyle,n.pinLabels)}),l=sPe({schWidth:n.width,schHeight:n.height,schPinSpacing:.2,pinCount:i.length,schPortArrangement:n.schPinArrangement,numericSchPinStyle:Kj(c),pinLabels:r}),u=t._getGlobalSchematicPositionBeforeLayout(),g=l.getSize(),h=t._resolveSchematicSheetId(),d=Object.fromEntries(i.map(({pinNumber:f,displayPinLabel:I})=>[String(f),I])),p=e.schematic_component.insert({center:u,size:g,source_component_id:o.source_component_id,is_box_with_pins:!0,port_arrangement:ePe(n.schPinArrangement),port_labels:d,pin_spacing:.2,pin_styles:Zwe(c),schematic_sheet_id:h});t.schematic_component_id=p.schematic_component_id;for(const{pinNumber:f,displayPinLabel:I,referencedSourcePort:C}of a){const y=l.getPortPositionByPinNumber(f);if(!y)throw new Error(`Could not determine schematic position for ${t.getString()} pin${f}`);const x={left:"left",right:"right",top:"up",bottom:"down"}[y.side];e.schematic_port.insert({schematic_component_id:p.schematic_component_id,center:{x:u.x+y.x,y:u.y+y.y},source_port_id:C.source_port_id,facing_direction:x,distance_from_component_edge:.4,side_of_component:y.side,pin_number:f,true_ccw_index:y.trueIndex,display_pin_label:I,is_connected:!1,schematic_sheet_id:h})}const m=n.name??n.chipRef;e.schematic_text.insert({text:m,schematic_component_id:p.schematic_component_id,anchor:"left",rotation:0,position:{x:u.x-g.width/2,y:u.y+g.height/2+.13},color:"#006464",font_size:.18,schematic_sheet_id:h});const _=e.source_component.get(o.source_component_id);e.schematic_text.insert({text:_?.manufacturer_part_number??"",schematic_component_id:p.schematic_component_id,anchor:"left",rotation:0,position:{x:u.x-g.width/2,y:u.y-g.height/2-.13},color:"#006464",font_size:.18,schematic_sheet_id:h})},ZRt=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:"SchematicBox",zodProps:XMn,shouldRenderAsSchematicBox:!0}}doInitialSchematicComponentRender(){dMo(this)}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this;if(e.chipRef)return;const n=.6,o=typeof e.padding=="number"?e.padding:0,i=typeof e.paddingTop=="number"?e.paddingTop:o,r=typeof e.paddingBottom=="number"?e.paddingBottom:o,s=typeof e.paddingLeft=="number"?e.paddingLeft:o,a=typeof e.paddingRight=="number"?e.paddingRight:o,A=e.overlay&&e.overlay.length>0,c=typeof e.width=="number"&&typeof e.height=="number";let l,u,g,h,d,p;if(A){const _=e.overlay.map(te=>({selector:te,port:this.getSubcircuit().selectOne(te,{type:"port"})})).filter(({port:te})=>te!=null).map(({port:te})=>({position:te._getGlobalSchematicPositionAfterLayout()}));if(_.length===0)return;const f=_.map(te=>te.position.x),I=_.map(te=>te.position.y),C=Math.min(...f),y=Math.max(...f),x=Math.min(...I),E=Math.max(...I),B=y-C,S=E-x,Q=B===0?n:0,w=S===0?n:0,M=s+Q/2,k=a+Q/2,R=i+w/2,F=r+w/2,O=C-M,U=y+k,Y=x-F,W=E+R;l=U-O,u=W-Y,g=O+(e.schX??0),h=Y+(e.schY??0),d=g+l/2,p=h+u/2}else if(c){l=e.width,u=e.height;const m=this._getGlobalSchematicPositionBeforeLayout();d=m.x,p=m.y,g=d-l/2,h=p-u/2}else return;if(t.schematic_box.insert({height:u,width:l,x:g,y:h,is_dashed:e.strokeStyle==="dashed",schematic_sheet_id:this._resolveSchematicSheetId()}),e.title){const m=e.titleInside,_=.1,f=e.titleAlignment,I=lMo({anchor:f,x:g,y:h,width:l,height:u,isInside:m});let C,y;const x=I.textAnchor;m?(C=f.includes("top")?-_:f.includes("bottom")?_:0,y=f.includes("left")?_:f.includes("right")?-_:0):(C=f.includes("top")?_:f.includes("bottom")?-_:0,y=f.includes("center_left")?-_:f.includes("center_right")?_:0);const E=I.x+y,B=I.y+C;t.schematic_text.insert({anchor:x,text:e.title,font_size:e.titleFontSize??.18,color:e.titleColor??"#000000",position:{x:E,y:B},rotation:0,schematic_sheet_id:this._resolveSchematicSheetId()})}}},hMo=t=>{if(!t.isSubcircuit||t.root?.schematicDisabled)return;const{db:e}=t.root,n=new Map,o=new Set,i=t.getDescendants().filter(s=>s instanceof ZRt&&s.getSubcircuit()===t);for(const s of i){const{chipRef:a,pinLabels:A}=s._parsedProps,c=s._resolveSchematicSheetId();if(!a||!c)continue;const l=s.getSubcircuit().selectOne(a);if(!(l instanceof g0)||!l.source_component_id)continue;o.add(l.source_component_id);const u=e.source_port.list({source_component_id:l.source_component_id});for(const{pinAliases:g}of XRt(A)){const d=u.find(m=>g.some(_=>m.name===_||m.port_hints?.includes(_)))?.subcircuit_connectivity_map_key;if(!d)continue;const p=n.get(d)??new Set;p.add(c),n.set(d,p)}}const r=t.getDescendants().filter(s=>s instanceof g0&&s.getSubcircuit()===t);for(const s of r){if(!s.source_component_id||o.has(s.source_component_id)||s._resolveSchematicSheetId())continue;const a=new Set,A=e.source_port.list({source_component_id:s.source_component_id});for(const l of A){const u=l.subcircuit_connectivity_map_key;if(!u)continue;const g=n.get(u);if(g)for(const h of g)a.add(h)}if(a.size!==1)continue;const[c]=a;c&&(s.schematic_sheet_id=c)}},pMo=new Set(["x","y","minx","maxx","miny","maxy","width","height"]);function mMo(t){if(t.root?.pcbDisabled||!t.isSubcircuit)return;const{db:e}=t.root,n=t.getNormalComponentNameMap?.()??new Map,o=fMo(t),i={};for(const u of o)eTt(u,i);const r=new Map,s=new Map,a=new Map;for(const u of o){if(!_Mo(u))continue;const g=IMo(u);if(!u.name)throw new Error(`Invalid pcb position expression for ${u.getString()}: component-relative calc requires the component to have a name`);r.set(u.name,{component:u,refs:g}),s.set(u.name,0)}for(const[u,g]of r.entries()){const h=new Set;for(const d of g.refs){const{referencePath:p,field:m}=CMo(d);if(!pMo.has(m))throw new Error(`Invalid pcb position expression for ${g.component.getString()}: unsupported component field "${m}" in "${d}"`);const _=yMo({token:d,referencePath:p,candidate:g,normalComponentNameMap:n});r.has(_)&&_!==u&&h.add(_)}for(const d of h)s.set(u,(s.get(u)??0)+1),a.has(d)||a.set(d,new Set),a.get(d).add(u)}const A=[...s.entries()].filter(([,u])=>u===0).map(([u])=>u);let c=0;for(;A.length>0;){const u=A.shift(),g=r.get(u);if(g){l(g.component,i),c++;for(const h of a.get(u)??[]){const d=(s.get(h)??0)-1;s.set(h,d),d===0&&A.push(h)}}}if(c<r.size){const u=[...r.keys()].filter(g=>(s.get(g)??0)>0);throw new Error(`Circular pcb position calc references detected among: ${u.join(", ")}`)}function l(u,g){if(!u.pcb_component_id)return;const h=e.pcb_component.get(u.pcb_component_id);if(!h)return;const d=u._parsedProps.pcbX,p=u._parsedProps.pcbY,m=u.props,_=u._parsedProps.pcbLeftEdgeX??m.pcbLeftEdgeX,f=u._parsedProps.pcbRightEdgeX??m.pcbRightEdgeX,I=u._parsedProps.pcbTopEdgeY??m.pcbTopEdgeY,C=u._parsedProps.pcbBottomEdgeY??m.pcbBottomEdgeY;if(_!==void 0&&f!==void 0)throw new Error(`${u.componentName} cannot set both pcbLeftEdgeX and pcbRightEdgeX`);if(I!==void 0&&C!==void 0)throw new Error(`${u.componentName} cannot set both pcbTopEdgeY and pcbBottomEdgeY`);const y=h.width??0,x=h.height??0,E={x:h.center.x,y:h.center.y};if(d!==void 0){const B=u.resolvePcbCoordinate({rawValue:d,axis:"pcbX",allowComponentVariables:!0,componentVariables:g});u._resolvedPcbCalcOffsetX=B,E.x=B}else if(_!==void 0){const S=u.resolvePcbCoordinate({rawValue:_,axis:"pcbX",allowComponentVariables:!0,componentVariables:g,propertyName:"pcbLeftEdgeX"})+y/2;u._resolvedPcbCalcOffsetX=S,E.x=S}else if(f!==void 0){const S=u.resolvePcbCoordinate({rawValue:f,axis:"pcbX",allowComponentVariables:!0,componentVariables:g,propertyName:"pcbRightEdgeX"})-y/2;u._resolvedPcbCalcOffsetX=S,E.x=S}if(p!==void 0){const B=u.resolvePcbCoordinate({rawValue:p,axis:"pcbY",allowComponentVariables:!0,componentVariables:g});u._resolvedPcbCalcOffsetY=B,E.y=B}else if(I!==void 0){const S=u.resolvePcbCoordinate({rawValue:I,axis:"pcbY",allowComponentVariables:!0,componentVariables:g,propertyName:"pcbTopEdgeY"})-x/2;u._resolvedPcbCalcOffsetY=S,E.y=S}else if(C!==void 0){const S=u.resolvePcbCoordinate({rawValue:C,axis:"pcbY",allowComponentVariables:!0,componentVariables:g,propertyName:"pcbBottomEdgeY"})+x/2;u._resolvedPcbCalcOffsetY=S,E.y=S}u._repositionOnPcb(E),eTt(u,g)}}function _Mo(t){const e=t._parsedProps,n=t.props,o=e.pcbX,i=e.pcbY,r=e.pcbLeftEdgeX??n.pcbLeftEdgeX,s=e.pcbRightEdgeX??n.pcbRightEdgeX,a=e.pcbTopEdgeY??n.pcbTopEdgeY,A=e.pcbBottomEdgeY??n.pcbBottomEdgeY;return r!==void 0||s!==void 0||a!==void 0||A!==void 0?!0:typeof o=="string"||typeof i=="string"}function fMo(t){const e=[],n=o=>{o._isNormalComponent&&e.push(o);for(const i of o.children)i.isSubcircuit||n(i)};for(const o of t.children)o.isSubcircuit||n(o);return e}function IMo(t){const e=new Set,n=t._parsedProps.pcbX,o=t._parsedProps.pcbY,i=t.props,r=t._parsedProps.pcbLeftEdgeX??i.pcbLeftEdgeX,s=t._parsedProps.pcbRightEdgeX??i.pcbRightEdgeX,a=t._parsedProps.pcbTopEdgeY??i.pcbTopEdgeY,A=t._parsedProps.pcbBottomEdgeY??i.pcbBottomEdgeY,c=l=>{if(typeof l!="string")return;const u=Nwe(l);for(const g of u)g.startsWith("board.")||e.add(g)};return c(n),c(o),c(r),c(s),c(a),c(A),e}function CMo(t){const e=t.lastIndexOf(".");if(e<=0||e===t.length-1)throw new Error(`Invalid component reference token: "${t}"`);return{referencePath:t.slice(0,e),field:t.slice(e+1).toLowerCase()}}function yMo(t){const{token:e,referencePath:n,candidate:o,normalComponentNameMap:i}=t,r=i.get(n);if(r&&r.length>0){if(r.length>1)throw new Error(`Invalid pcb position expression for ${o.component.getString()}: ambiguous component reference "${n}" in "${e}"`);return n}let s=null;for(const a of i.keys())n.startsWith(`${a}.`)&&(!s||a.length>s.length)&&(s=a);if(!s)throw new Error(`Invalid pcb position expression for ${o.component.getString()}: unknown component reference "${n}" in "${e}"`);return s}function eTt(t,e){if(!t.name||!t.pcb_component_id||!t.root)return;const n=t.root.db.pcb_component.get(t.pcb_component_id);if(!n)return;const o=n.width??0,i=n.height??0,r=n.center.x,s=n.center.y;aMt({vars:e,componentName:t.name,position:{x:r,y:s},size:{width:o,height:i}});const a=xMo(t);for(const[A,c]of a.entries()){const l=H8(c),u=l.minX,g=l.maxX,h=l.minY,d=l.maxY;e[`${A}.x`]=(u+g)/2,e[`${A}.y`]=(h+d)/2,e[`${A}.width`]=g-u,e[`${A}.height`]=d-h,e[`${A}.minX`]=u,e[`${A}.maxX`]=g,e[`${A}.minY`]=h,e[`${A}.maxY`]=d}}function xMo(t){const e=new Map;if(!t.name||!t.pcb_component_id||!t.root)return e;const{db:n}=t.root,o=[...n.pcb_smtpad.list({pcb_component_id:t.pcb_component_id}),...n.pcb_plated_hole.list({pcb_component_id:t.pcb_component_id})];for(const i of o){const r=new Set;for(const a of i.port_hints??[])typeof a=="string"&&a.length>0&&r.add(a);const s=i.pcb_port_id;if(s){const a=n.pcb_port.get(s),A=a?.source_port_id?n.source_port.get(a.source_port_id):null;A?.name&&r.add(A.name),A?.pin_number!=null&&r.add(`pin${A.pin_number}`)}for(const a of r){const A=`${t.name}.${a}`;e.has(A)||e.set(A,[]),e.get(A).push(i)}}return e}function EMo(t){if(t.root?.pcbDisabled||!t.pcb_group_id)return;const e=t._parsedProps?.pcbPositionAnchor;if(!e)return;const n=t._getGlobalPcbPositionBeforeLayout(),{pcbX:o,pcbY:i}=t._parsedProps;if(o===void 0&&i===void 0)return;const{db:r}=t.root,s=r.pcb_group.get(t.pcb_group_id);if(!s)return;let a=s.width,A=s.height;const{center:c}=s;if(s.outline&&s.outline.length>0){const p=Oh(s.outline);p&&(a=p.maxX-p.minX,A=p.maxY-p.minY)}if(!a||!A)return;const l={left:c.x-a/2,right:c.x+a/2,top:c.y+A/2,bottom:c.y-A/2},u={...c};let g=null;if(new Set(["center","top_left","top_center","top_right","center_left","center_right","bottom_left","bottom_center","bottom_right"]).has(e))switch(e){case"center":g=u;break;case"top_left":g={x:l.left,y:l.top};break;case"top_center":g={x:u.x,y:l.top};break;case"top_right":g={x:l.right,y:l.top};break;case"center_left":g={x:l.left,y:u.y};break;case"center_right":g={x:l.right,y:u.y};break;case"bottom_left":g={x:l.left,y:l.bottom};break;case"bottom_center":g={x:u.x,y:l.bottom};break;case"bottom_right":g={x:l.right,y:l.bottom};break}if(!g)return;const d={...u};n.x!==void 0&&(d.x+=n.x-g.x),n.y!==void 0&&(d.y+=n.y-g.y),(Math.abs(d.x-u.x)>1e-6||Math.abs(d.y-u.y)>1e-6)&&(t._repositionOnPcb(d),r.pcb_group.update(t.pcb_group_id,{center:d})),r.pcb_group.update(t.pcb_group_id,{anchor_position:n,anchor_alignment:e,display_offset_x:o,display_offset_y:i})}var BMo=t=>{const{db:e}=t.root,{_parsedProps:n}=t,o=t.children.filter(y=>y.pcb_component_id||y.pcb_group_id);if(o.some(y=>{const x=y._parsedProps;return x?.pcbX!==void 0||x?.pcbY!==void 0}))return;const r=n.pcbJustifyContent??n.justifyContent,s=n.pcbAlignItems??n.alignItems,a=n.pcbFlexGap??n.pcbGap??n.gap,A=n.pcbFlexDirection??"row",c={start:"flex-start",end:"flex-end","flex-start":"flex-start","flex-end":"flex-end",stretch:"space-between","space-between":"space-between","space-around":"space-around","space-evenly":"space-evenly",center:"center"}[r??"space-between"],l={start:"flex-start",end:"flex-end","flex-start":"flex-start","flex-end":"flex-end",stretch:"stretch",center:"center"}[s??"center"];if(!c)throw new Error(`Invalid justifyContent value: "${r}"`);if(!l)throw new Error(`Invalid alignItems value: "${s}"`);let u=0,g=0;typeof a=="object"?(u=a.y??0,g=a.x??0):typeof a=="number"?(u=a,g=a):typeof a=="string"&&(u=ce.parse(a),g=ce.parse(a));let h,d=n.width??n.pcbWidth??void 0,p=n.height??n.pcbHeight??void 0;(d===void 0||p===void 0)&&(h=lmt(o.map(y=>y._getMinimumFlexContainerSize()).filter(y=>y!==null),{direction:A,rowGap:u,columnGap:g}),d=h.width,p=h.height);const _=new Qwt(d,p,{alignItems:l,justifyContent:c,direction:A,rowGap:u,columnGap:g});for(const y of o){const x=y._getMinimumFlexContainerSize();_.addChild({metadata:y,width:x?.width??0,height:x?.height??0,flexBasis:x?A==="row"?x.width:x.height:void 0})}_.build();const f={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,width:0,height:0};for(const y of _.children)f.minX=Math.min(f.minX,y.position.x),f.minY=Math.min(f.minY,y.position.y),f.maxX=Math.max(f.maxX,y.position.x+y.size.width),f.maxY=Math.max(f.maxY,y.position.y+y.size.height);f.width=f.maxX-f.minX,f.height=f.maxY-f.minY;const I=t._getGlobalPcbPositionBeforeLayout(),C={x:I.x-(f.maxX+f.minX)/2,y:I.y-(f.maxY+f.minY)/2};for(const y of _.children)y.metadata._repositionOnPcb({x:y.position.x+y.size.width/2+C.x,y:y.position.y+y.size.height/2+C.y});e.pcb_group.update(t.pcb_group_id,{width:f.width,height:f.height,center:I})},IMe=1;function bMo(t){const{db:e}=t.root,n=t._parsedProps,o=SMo(t);if(o.length===0)return;const i=QMo({db:e,pcbChildren:o}),r=vMo(n),s=wMo({props:n,pcbChildren:o,childDimensions:i,gridConfig:r}),a=DMo({pcbChildren:o,childDimensions:i,gridLayout:s,gridConfig:r}),{itemCoordinates:A}=a.layout();NMo({db:e,group:t,pcbChildren:o,itemCoordinates:A,gridLayout:s}),RMo({db:e,group:t,props:n,gridLayout:s})}function SMo(t){return t.children.filter(e=>e.pcb_component_id||e.pcb_group_id)}function QMo(t){const{db:e,pcbChildren:n}=t;let o=0,i=0;for(const r of n){let s=0,a=0;if(r.pcb_group_id){const A=e.pcb_group.get(r.pcb_group_id);s=A?.width??0,a=A?.height??0}else if(r.pcb_component_id){const A=e.pcb_component.get(r.pcb_component_id);s=A?.width??0,a=A?.height??0}o=Math.max(o,s),i=Math.max(i,a)}return{width:o,height:i}}function vMo(t){const e=t.pcbGridCols??t.gridCols??t.pcbLayout?.grid?.cols,n=t.pcbGridRows??t.pcbLayout?.grid?.rows,o=t.pcbGridTemplateColumns,i=t.pcbGridTemplateRows,r=u=>u===void 0?IMe:typeof u=="number"?u:ce.parse(u),s=t.pcbGridGap??t.gridGap??t.pcbLayout?.gridGap,a=t.pcbGridRowGap??t.gridRowGap??t.pcbLayout?.gridRowGap,A=t.pcbGridColumnGap??t.gridColumnGap??t.pcbLayout?.gridColumnGap;let c=IMe,l=IMe;if(a!==void 0||A!==void 0){const u=typeof s=="object"?s?.x:s,g=typeof s=="object"?s?.y:s;c=r(A??u),l=r(a??g)}else if(typeof s=="object"&&s!==null)c=r(s.x),l=r(s.y);else{const u=r(s);c=u,l=u}return{cols:e,rows:n,gapX:c,gapY:l,templateColumns:o,templateRows:i}}function wMo(t){const{props:e,pcbChildren:n,childDimensions:o,gridConfig:i}=t;return e.pcbGridTemplateColumns||e.pcbGridTemplateRows?PMo({props:e,gridConfig:i,pcbChildren:n,childDimensions:o}):MMo({gridConfig:i,pcbChildren:n,childDimensions:o})}function PMo(t){const{props:e,gridConfig:n,pcbChildren:o,childDimensions:i}=t,r=e.pcbGridTemplateColumns??"",s=e.pcbGridTemplateRows??"",a=g=>{const h=g.match(/repeat\((\d+),/);return h?parseInt(h[1]):Math.ceil(Math.sqrt(o.length))},A=e.pcbGridTemplateColumns?a(r):Math.ceil(Math.sqrt(o.length)),c=e.pcbGridTemplateRows?a(s):Math.ceil(o.length/A),l=A*i.width+Math.max(0,A-1)*n.gapX,u=c*i.height+Math.max(0,c-1)*n.gapY;return{gridTemplateColumns:r,gridTemplateRows:s,containerWidth:l,containerHeight:u}}function MMo(t){const{gridConfig:e,pcbChildren:n,childDimensions:o}=t;let i,r;e.cols!==void 0&&e.rows!==void 0?(i=e.cols,r=e.rows):e.cols!==void 0?(i=e.cols,r=Math.ceil(n.length/i)):e.rows!==void 0?(r=e.rows,i=Math.ceil(n.length/r)):(i=Math.ceil(Math.sqrt(n.length)),r=Math.ceil(n.length/i)),i=Math.max(1,i),r=Math.max(1,r);const s=i*o.width+Math.max(0,i-1)*e.gapX,a=r*o.height+Math.max(0,r-1)*e.gapY,A=`repeat(${i}, ${o.width}px)`,c=`repeat(${r}, ${o.height}px)`;return{gridTemplateColumns:A,gridTemplateRows:c,containerWidth:s,containerHeight:a}}function DMo(t){const{pcbChildren:e,childDimensions:n,gridLayout:o,gridConfig:i}=t,r=e.map((s,a)=>({key:s.getString()||`child-${a}`,contentWidth:n.width,contentHeight:n.height}));return new oEo({containerWidth:o.containerWidth,containerHeight:o.containerHeight,gridTemplateColumns:o.gridTemplateColumns,gridTemplateRows:o.gridTemplateRows,gap:[i.gapY,i.gapX],children:r})}function NMo(t){const{db:e,group:n,pcbChildren:o,itemCoordinates:i,gridLayout:r}=t,s=n._getGlobalPcbPositionBeforeLayout(),a=e.toArray();for(let A=0;A<o.length;A++){const c=o[A],l=c.getString()||`child-${A}`,u=i[l];if(!u){console.warn(`PCB grid layout: No coordinates found for child ${l}`);continue}const g=s.x-r.containerWidth/2+u.x+u.width/2,h=s.y+r.containerHeight/2-u.y-u.height/2;if(c.pcb_component_id)smt(a,c.pcb_component_id,{x:g,y:h});else{const d=c;d.pcb_group_id&&d.source_group_id&&Amt(a,d.source_group_id,{x:g,y:h})}}}function RMo(t){const{db:e,group:n,props:o,gridLayout:i}=t;if(n.pcb_group_id){const r=n._getGlobalPcbPositionBeforeLayout();e.pcb_group.update(n.pcb_group_id,{width:o.width??i.containerWidth,height:o.height??i.containerHeight,center:r})}}var TMo=(t,e,n=()=>performance.now())=>{if(e===void 0||!Number.isFinite(e)||e<=0)return t.solve(),{elapsedMs:0,timedOut:!1};const o=n();let i=0;for(;!t.solved&&!t.failed&&(t.step(),!(t.solved||t.failed));)if(i=n()-o,i>=e)return{elapsedMs:i,timedOut:!0};return{elapsedMs:i,timedOut:!1}},kMo=(t,e)=>{const n=t.children.filter(u=>u.componentName==="Constraint"&&u._parsedProps.pcb),o=new Map,i={},r=u=>(i[u]!==u&&(i[u]=r(i[u])),i[u]),s=(u,g)=>{const h=r(u),d=r(g);h!==d&&(i[d]=h)},a=u=>{u in i||(i[u]=u)},A=u=>{const g=u.startsWith(".")?u.slice(1):u;return t.children.find(d=>d.name===g)?.pcb_component_id??void 0};for(const u of n){const g=u._parsedProps;if("left"in g&&"right"in g){const h=A(g.left),d=A(g.right);h&&d&&(a(h),a(d),s(h,d))}else if("top"in g&&"bottom"in g){const h=A(g.top),d=A(g.bottom);h&&d&&(a(h),a(d),s(h,d))}else if("for"in g&&Array.isArray(g.for)){const h=g.for.map(d=>A(d)).filter(d=>!!d);for(const d of h)a(d);for(let d=1;d<h.length;d++)s(h[0],h[d])}}for(const u of Object.keys(i)){const g=r(u);o.has(g)||o.set(g,{componentIds:[],constraints:[]}),o.get(g).componentIds.push(u)}for(const u of n){const g=u._parsedProps;let h;if("left"in g?h=A(g.left):"top"in g?h=A(g.top):"for"in g&&(h=A(g.for[0])),!h)continue;const d=r(h);o.get(d)?.constraints.push(u)}const c={},l=Object.fromEntries(e.components.map(u=>[u.componentId,u]));for(const[u,g]of o.entries()){if(g.componentIds.length<=1)continue;const h=new qpt,d={},p=(S,Q)=>{const w=`${S}_${Q}`;return d[w]||(d[w]=new gse(w)),d[w]},m=g.componentIds[0];h.addConstraint(new ux(p(m,"x"),V_.Eq,0,wg.required)),h.addConstraint(new ux(p(m,"y"),V_.Eq,0,wg.required));for(const S of g.constraints){const Q=S._parsedProps;if("xDist"in Q){const w=A(Q.left),M=A(Q.right);w&&M&&h.addConstraint(new ux(new Gh(p(M,"x"),[-1,p(w,"x")]),V_.Eq,Q.xDist,wg.required))}else if("yDist"in Q){const w=A(Q.top),M=A(Q.bottom);w&&M&&h.addConstraint(new ux(new Gh(p(w,"y"),[-1,p(M,"y")]),V_.Eq,Q.yDist,wg.required))}else if("sameX"in Q&&Array.isArray(Q.for)){const w=Q.for.map(M=>A(M)).filter(M=>!!M);if(w.length>1){const M=p(w[0],"x");for(let k=1;k<w.length;k++)h.addConstraint(new ux(new Gh(p(w[k],"x"),[-1,M]),V_.Eq,0,wg.required))}}else if("sameY"in Q&&Array.isArray(Q.for)){const w=Q.for.map(M=>A(M)).filter(M=>!!M);if(w.length>1){const M=p(w[0],"y");for(let k=1;k<w.length;k++)h.addConstraint(new ux(new Gh(p(w[k],"y"),[-1,M]),V_.Eq,0,wg.required))}}}h.updateVariables();const _={};for(const S of g.componentIds)_[S]={x:p(S,"x").value(),y:p(S,"y").value()};let f=1/0,I=1/0,C=-1/0,y=-1/0;for(const S of g.componentIds){const Q=l[S],w=_[S];if(Q)for(const M of Q.pads){const k=w.x+M.offset.x,R=w.y+M.offset.y;f=Math.min(f,k-M.size.x/2),C=Math.max(C,k+M.size.x/2),I=Math.min(I,R-M.size.y/2),y=Math.max(y,R+M.size.y/2)}}const x={x:(f+C)/2,y:(I+y)/2},E=[],B={};for(const S of g.componentIds){const Q=l[S],w=_[S];if(Q){B[S]={x:w.x-x.x,y:w.y-x.y};for(const M of Q.pads)E.push({padId:M.padId,networkId:M.networkId,type:M.type,size:M.size,offset:{x:w.x+M.offset.x-x.x,y:w.y+M.offset.y-x.y}})}}e.components=e.components.filter(S=>!g.componentIds.includes(S.componentId)),e.components.push({componentId:g.componentIds[0],pads:E,availableRotationDegrees:[0]}),g.relativeCenters=B,c[g.componentIds[0]]=g}return c},tTt=({db:t,pcbComponentId:e,rotationDegrees:n,layer:o})=>{if(n==null||!t?.cad_component?.list)return;const i=t.cad_component.getWhere({pcb_component_id:e});if(!i)return;const r=o?.toLowerCase?.()==="bottom"?-n:n,s=i.rotation?.z??0,a={...i.rotation??{x:0,y:0,z:0},z:k9(s+r)};t.cad_component.update(i.cad_component_id,{rotation:a}),i.rotation=a},m$=(t,e,n)=>{if(e===n)return!0;const o=t.source_group.get(e);return!o||!o.parent_source_group_id?!1:m$(t,o.parent_source_group_id,n)},FMo=(t,e,n,o)=>{const{db:i}=t.root;for(const r of e.components){if(r.isStatic)continue;const{center:s,componentId:a,ccwRotationOffset:A,ccwRotationDegrees:c}=r,l=n[a];if(l){const f=c??A??0,I=f*Math.PI/180;for(const C of l.componentIds){const y=l.relativeCenters[C];if(!y)continue;i.pcb_component.update(C,{position_mode:"packed"});const x={x:y.x*Math.cos(I)-y.y*Math.sin(I),y:y.x*Math.sin(I)+y.y*Math.cos(I)},E=i.pcb_component.get(C);if(!E)continue;const B=E.center,S=D0(t._computePcbGlobalTransformBeforeLayout(),M0(s.x+x.x,s.y+x.y),W4(I),M0(-B.x,-B.y)),Q=i.toArray().filter(w=>"pcb_component_id"in w&&w.pcb_component_id===C);FF(Q,S),tTt({db:i,pcbComponentId:C,rotationDegrees:f,layer:E.layer})}continue}const u=i.pcb_component.get(a);if(u){i.pcb_component.update(a,{position_mode:"packed"});const f=t.source_group_id,C=i.source_component.get(u.source_component_id)?.source_group_id;if(C!==void 0&&!m$(i,C,f))continue;const y=u.center,x=c??A??0,E=D0(t._computePcbGlobalTransformBeforeLayout(),M0(s.x,s.y),W4(x*Math.PI/180),M0(-y.x,-y.y)),B=i.toArray().filter(S=>"pcb_component_id"in S&&S.pcb_component_id===a);FF(B,E),tTt({db:i,pcbComponentId:a,rotationDegrees:x,layer:u.layer});continue}const g=i.pcb_group.list().find(f=>f.source_group_id===a);if(!g)continue;const d=o.components.find(f=>f.componentId===a)?.center??g.center,p=c??A??0,m=D0(t._computePcbGlobalTransformBeforeLayout(),M0(s.x,s.y),W4(p*Math.PI/180),M0(-d.x,-d.y)),_=i.toArray().filter(f=>{if("source_group_id"in f&&f.source_group_id&&(f.source_group_id===a||m$(i,f.source_group_id,a)))return!0;if("source_component_id"in f&&f.source_component_id){const I=i.source_component.get(f.source_component_id);if(I?.source_group_id&&(I.source_group_id===a||m$(i,I.source_group_id,a)))return!0}if("pcb_component_id"in f&&f.pcb_component_id){const I=i.pcb_component.get(f.pcb_component_id);if(I?.source_component_id){const C=i.source_component.get(I.source_component_id);if(C?.source_group_id&&(C.source_group_id===a||m$(i,C.source_group_id,a)))return!0}}return!1});for(const f of _)f.type==="pcb_component"&&i.pcb_component.update(f.pcb_component_id,{position_mode:"packed"});FF(_,m),i.pcb_group.update(g.pcb_group_id,{center:s})}if(t.pcb_group_id){const r=i.pcb_component.list({pcb_group_id:t.pcb_group_id});t.calculatePcbGroupBounds(N9e(r))}},nTt=t=>(t??"top").toLowerCase(),LMo=(t,e)=>{const n=new Set,o=e.pcb_component.get(t.componentId);o&&n.add(nTt(o.layer));for(const i of t.pads){const r=e.pcb_via.get(i.padId),s=e.pcb_smtpad.get(i.padId)?.pcb_component_id??e.pcb_plated_hole.get(i.padId)?.pcb_component_id??r?.pcb_component_id;if(!s)continue;const a=e.pcb_component.get(s);a&&n.add(nTt(a.layer))}return n.size===1?n.values().next().value:void 0},HMo=(t,e)=>{const n=new Map;for(const i of t.components){const r=LMo(i,e);if(!r)return[t];const s=n.get(r)??[];s.push(i),n.set(r,s)}if(n.size<=1)return[t];const o=i=>i==="top"?0:i==="bottom"?1:2;return Array.from(n.entries()).sort(([i],[r])=>o(i)-o(r)||i.localeCompare(r)).map(([,i])=>({...t,components:i}))},OMo="1mm",oTt=vc("Group_doInitialPcbLayoutPack"),iTt=t=>{if(t.courtyard&&t.center)return{obstacleId:t.componentId,absoluteCenter:{x:t.center.x+t.courtyard.offsetFromCenter.x,y:t.center.y+t.courtyard.offsetFromCenter.y},width:t.courtyard.width,height:t.courtyard.height};if(t.pads.length===0)return;let e=1/0,n=1/0,o=-1/0,i=-1/0;for(const r of t.pads){const s=r.absoluteCenter??(t.center?{x:t.center.x+r.offset.x,y:t.center.y+r.offset.y}:r.offset);e=Math.min(e,s.x-r.size.x/2),n=Math.min(n,s.y-r.size.y/2),o=Math.max(o,s.x+r.size.x/2),i=Math.max(i,s.y+r.size.y/2)}return{obstacleId:t.componentId,absoluteCenter:{x:(e+o)/2,y:(n+i)/2},width:o-e,height:i-n}},GMo=t=>{const{db:e}=t.root,{_parsedProps:n}=t;t.root?.emit("packing:start",{subcircuit_id:t.subcircuit_id,componentDisplayName:t.getString()});const{packOrderStrategy:o,packPlacementStrategy:i,gap:r,pcbGap:s,pcbPackGap:a}=n,A=a??s??r,c=ce.parse(A??OMo),l={},u=new Set,g=B=>{if(B?.pcb_component_id&&B?._parsedProps){const S=B._parsedProps,Q=ce.parse(S.pcbMarginLeft??S.pcbMarginX??0),w=ce.parse(S.pcbMarginRight??S.pcbMarginX??0),M=ce.parse(S.pcbMarginTop??S.pcbMarginY??0),k=ce.parse(S.pcbMarginBottom??S.pcbMarginY??0);(Q||w||M||k)&&(l[B.pcb_component_id]={left:Q,right:w,top:M,bottom:k})}B?.children&&B.children.forEach(g)};g(t);const h=new Set;for(const B of t.children){const S=B;S._isNormalComponent&&S.isRelativelyPositioned?.()&&(S.pcb_component_id&&u.add(S.pcb_component_id),S.pcb_group_id&&h.add(S.pcb_group_id))}const d=(B,S,Q)=>{if(S===Q)return!0;const w=B.source_group.get(S);return!w||!w.parent_source_group_id?!1:d(B,w.parent_source_group_id,Q)};if(h.size>0)for(const B of e.toArray()){if(B.type!=="pcb_component")continue;const S=e.source_component.get(B.source_component_id);if(S?.source_group_id)for(const Q of h)d(e,S.source_group_id,Q)&&u.add(B.pcb_component_id)}const p=e.toArray();let m;if(n.width!==void 0&&n.height!==void 0){const B=ce.parse(n.width),S=ce.parse(n.height);m={minX:-B/2,maxX:B/2,minY:-S/2,maxY:S/2}}const _=xfo(p,{source_group_id:t.source_group_id,chipMarginsMap:l,staticPcbComponentIds:Array.from(u)}),f={...Efo(_),packOrderStrategy:o??"largest_to_smallest",packPlacementStrategy:i??"minimum_sum_squared_distance_to_network",minGap:c,bounds:m},I=kMo(t,f);oTt.enabled&&(t.root?.emit("debug:logOutput",{type:"debug:logOutput",name:`packInput-circuitjson-${t.name}`,content:JSON.stringify(e.toArray())}),t.root?.emit("debug:logOutput",{type:"debug:logOutput",name:`packInput-${t.name}`,content:f}));const C=HMo(f,e),y={...f,components:[]};let x=!1;const E=B=>{const S=`Unable to pack all PCB components within the layout bounds: ${B}`;e.pcb_packing_error.insert({error_type:"pcb_packing_error",message:S,pcb_group_id:t.pcb_group_id??void 0,subcircuit_id:t.subcircuit_id??void 0}),t.root?.emit("packing:error",{subcircuit_id:t.subcircuit_id,componentDisplayName:t.getString(),error:{message:S}})};try{for(const B of C){const S=new Set(B.components.map(J=>J.componentId)),Q=B.components.flatMap(J=>{if(!J.isStatic)return[];const oe=iTt(J);return oe?[oe]:[]}),w=B.components.every(J=>!!e.pcb_component.get(J.componentId)&&!I[J.componentId]),M=f.components.filter(J=>J.isStatic&&!S.has(J.componentId)),k=w?[]:M.flatMap(J=>{const oe=iTt(J);return oe?[oe]:[]}),R=new Set([...B.components.filter(J=>J.isStatic),...w?[]:M].flatMap(J=>J.pads.map(oe=>oe.padId))),F=new Map([...y.components.map(J=>[J.componentId,{component:J,courtyardSize:Number.EPSILON}]),...w?M.map(J=>[J.componentId,{component:J,courtyardSize:1e-6}]):[]]),O=Array.from(F.values(),({component:J,courtyardSize:oe})=>({...J,componentId:`network_reference_${J.componentId}`,isStatic:!0,courtyard:{offsetFromCenter:{x:0,y:0},width:oe,height:oe}})),U={...B,weightedConnections:B.weightedConnections?.filter(J=>J.padIds.every(oe=>!R.has(oe))),obstacles:[...B.obstacles??[],...Q,...k],components:[...O,...B.components.filter(J=>!J.isStatic)]},Y=new rj(U),W=Y.getConstructorParams();t.root?.emit("solver:started",{type:"solver:started",solverName:"PackSolver2",solverParams:W,solverConstructorArgs:[W],componentName:t.getString()});const te=t.root?.platform?.pcbPackSolverTimeoutMs,{timedOut:j}=TMo(Y,te);if(j&&(x=!0,E(`PackSolver2 timed out after ${te}ms`)),Y.failed){x=!0;const J=Y.error??Y.activeSubSolver?.error??"No valid packing solution found";E(J)}if(y.components.push(...Y.packedComponents.filter(J=>S.has(J.componentId))),j)break}}catch(B){throw E(B instanceof Error?B.message:String(B)),B}if(oTt.enabled&&global?.debugGraphics){const B=Zbt(y);B.title=`packOutput-${t.name}`,global.debugGraphics?.push(B)}FMo(t,y,I,_),!x&&t.root?.emit("packing:end",{subcircuit_id:t.subcircuit_id,componentDisplayName:t.getString()})},YMo=t=>{if(!t)return null;const e=t.match(/^pin(\d+)$/i)??t.match(/^(\d+)$/);if(!e)return null;const n=Number(e[1]);return Number.isFinite(n)&&n>0?n:null},rTt=t=>t.children.filter(e=>e.componentName==="Port"),UMo=t=>{const{db:e}=t.root,n=rTt(t);for(const r of n){if(r._parsedProps.pinNumber!==void 0)continue;const s=YMo(r._parsedProps.name);s!==null&&(r._parsedProps.pinNumber=s)}const o=new Set(n.map(r=>r._parsedProps.pinNumber).filter(r=>r!==void 0));let i=1;for(const r of n){if(r._parsedProps.pinNumber===void 0){for(;o.has(i);)i++;r._parsedProps.pinNumber=i,o.add(i)}r.source_port_id&&e.source_port.update(r.source_port_id,{pin_number:r._parsedProps.pinNumber,port_hints:r.getNameAndAliases()})}},KMo=t=>{const e={};for(const n of rTt(t)){const o=n._parsedProps.pinNumber,i=n._parsedProps.name;o===void 0||!i||i===`pin${o}`||i===String(o)||(e[`pin${o}`]=i)}return e},VMo=t=>{if(t.root?.schematicDisabled)return;const{db:e}=t.root,n=t._parsedProps;n.schPinSpacing!==void 0&&e.source_property_ignored_warning.insert({source_component_id:t.source_group_id??"",property_name:"schPinSpacing",error_type:"source_property_ignored_warning",message:"schPinSpacing is deprecated and will be ignored. Pin spacing is always 0.2."}),UMo(t);const o=t._getSchematicBoxDimensions();if(!o)return;const i=t._getGlobalSchematicPositionBeforeLayout(),r=o.getSize(),s=t._getPinLabelsFromPorts(),a=t._getSchematicPortArrangement(),A=e.schematic_component.insert({center:i,size:r,source_group_id:t.source_group_id,schematic_group_id:t.schematic_group_id??void 0,subcircuit_id:t.subcircuit_id??t.getSubcircuit()?.subcircuit_id??void 0,is_schematic_group:!0,is_box_with_pins:!0,port_arrangement:ePe(a),pin_spacing:.2,pin_styles:Zwe(n.schPinStyle,s),port_labels:s,schematic_sheet_id:t._resolveSchematicSheetId()});t.schematic_component_id=A.schematic_component_id,t.schematic_group_id&&e.schematic_group.update(t.schematic_group_id,{center:i,width:r.width,height:r.height,schematic_component_ids:[A.schematic_component_id]});const c=n.schTitle??n.name;c&&e.schematic_text.insert({text:c,schematic_component_id:A.schematic_component_id,anchor:"left",rotation:0,position:{x:i.x-r.width/2,y:i.y+r.height/2+.13},color:"#006464",font_size:.18,schematic_sheet_id:t._resolveSchematicSheetId()})},sTt=(t,e)=>{const{sourceComponent:n,sourceGroup:o}=e;if(e.nodeType==="component"){const i=t.schematic_component.getWhere({source_component_id:n?.source_component_id});return i?.size?{width:i.size.width,height:i.size.height}:null}if(e.nodeType==="group"){const i=t.schematic_group.getWhere({source_group_id:o?.source_group_id});if(i?.width&&i?.height)return{width:i.width,height:i.height};const r=t.schematic_component.list({schematic_group_id:i?.schematic_group_id});let s=1/0,a=-1/0,A=1/0,c=-1/0;for(const g of r)if(g.center&&g.size){const h=g.size.width/2,d=g.size.height/2;s=Math.min(s,g.center.x-h),a=Math.max(a,g.center.x+h),A=Math.min(A,g.center.y-d),c=Math.max(c,g.center.y+d)}const l=a-s,u=c-A;return{width:l,height:u}}return null},zMo=t=>{const{db:e}=t.root,n=t._parsedProps,o=mz(e.toArray(),{source_group_id:t.source_group_id}),i=n.schJustifyContent??n.justifyContent,r=n.schAlignItems??n.alignItems,s=n.schFlexGap??n.schGap??n.gap,a=n.schFlexDirection??"row",A={start:"flex-start",end:"flex-end","flex-start":"flex-start","flex-end":"flex-end",stretch:"space-between","space-between":"space-between","space-around":"space-around","space-evenly":"space-evenly",center:"center"}[i??"space-between"],c={start:"flex-start",end:"flex-end","flex-start":"flex-start","flex-end":"flex-end",stretch:"stretch",center:"center"}[r??"center"];if(!A)throw new Error(`Invalid justifyContent value: "${i}"`);if(!c)throw new Error(`Invalid alignItems value: "${r}"`);let l=0,u=0;typeof s=="object"?(l=s.y??0,u=s.x??0):typeof s=="number"?(l=s,u=s):typeof s=="string"&&(l=ce.parse(s),u=ce.parse(s));let g,h=n.width??n.schWidth??void 0,d=n.height??n.schHeight??void 0;(h===void 0||d===void 0)&&(g=lmt(o.childNodes.map(C=>sTt(e,C)).filter(C=>C!==null),{direction:a,rowGap:l,columnGap:u}),h=g.width,d=g.height);const m=new Qwt(h,d,{alignItems:c,justifyContent:A,direction:a,rowGap:l,columnGap:u});for(const C of o.childNodes){const y=sTt(e,C);m.addChild({metadata:C,width:y?.width??0,height:y?.height??0,flexBasis:y?a==="row"?y.width:y.height:void 0})}m.build();const _={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,width:0,height:0};for(const C of m.children)_.minX=Math.min(_.minX,C.position.x),_.minY=Math.min(_.minY,C.position.y),_.maxX=Math.max(_.maxX,C.position.x+C.size.width),_.maxY=Math.max(_.maxY,C.position.y+C.size.height);_.width=_.maxX-_.minX,_.height=_.maxY-_.minY;const f={x:-(_.maxX+_.minX)/2,y:-(_.maxY+_.minY)/2},I=e.toArray();for(const C of m.children){const{sourceComponent:y,sourceGroup:x}=C.metadata;if(y){const E=e.schematic_component.getWhere({source_component_id:y.source_component_id});if(!E)continue;DWn(I,E.schematic_component_id,{x:C.position.x+C.size.width/2+f.x,y:C.position.y+C.size.height/2+f.y})}if(x){if(!e.schematic_group.getWhere({source_group_id:x.source_group_id}))continue;NWn(I,x.source_group_id,{x:C.position.x+C.size.width/2+f.x,y:C.position.y+C.size.height/2+f.y})}}t.schematic_group_id&&e.schematic_group.update(t.schematic_group_id,{width:_.width,height:_.height})};function MO({db:t,schematicComponentId:e,deltaX:n,deltaY:o}){const i=t.schematic_rect.list({schematic_component_id:e});for(const c of i)c.center.x+=n,c.center.y+=o;const r=t.schematic_line.list({schematic_component_id:e});for(const c of r)c.x1+=n,c.y1+=o,c.x2+=n,c.y2+=o;const s=t.schematic_circle.list({schematic_component_id:e});for(const c of s)c.center.x+=n,c.center.y+=o;const a=t.schematic_arc.list({schematic_component_id:e});for(const c of a)c.center.x+=n,c.center.y+=o;const A=t.schematic_path.list({schematic_component_id:e});for(const c of A)for(const l of c.points)l.x+=n,l.y+=o}function JMo(t){const{db:e}=t.root,n=t._parsedProps,o=t.children.filter(y=>{const x=y._parsedProps?.schX!==void 0||y._parsedProps?.schY!==void 0;return y.schematic_component_id&&!x});if(o.length===0)return;let i=0,r=0;for(const y of o){const x=e.schematic_component.get(y.schematic_component_id);x?.size&&(i=Math.max(i,x.size.width),r=Math.max(r,x.size.height))}i===0&&o.length>0&&(i=1),r===0&&o.length>0&&(r=1);let s=n.gridCols,a,A=n.gridGap,c=n.gridRowGap,l=n.gridColumnGap;n.schLayout?.grid&&(s=n.schLayout.grid.cols??s,a=n.schLayout.grid.rows,A=n.schLayout.gridGap??A,c=n.schLayout.gridRowGap??c,l=n.schLayout.gridColumnGap??l);let u,g;s!==void 0&&a!==void 0?(u=s,g=a):s!==void 0?(u=s,g=Math.ceil(o.length/u)):a!==void 0?(g=a,u=Math.ceil(o.length/g)):(u=Math.ceil(Math.sqrt(o.length)),g=Math.ceil(o.length/u)),u===0&&o.length>0&&(u=1),g===0&&o.length>0&&(g=o.length);let h,d;const p=y=>{if(y!==void 0)return typeof y=="number"?y:ce.parse(y)};if(c!==void 0||l!==void 0){const y=typeof A=="object"&&A!==null?A.x:A,x=typeof A=="object"&&A!==null?A.y:A;h=p(l??y)??1,d=p(c??x)??1}else if(typeof A=="number")h=A,d=A;else if(typeof A=="string"){const y=ce.parse(A);h=y,d=y}else if(typeof A=="object"&&A!==null){const y=A.x,x=A.y;h=typeof y=="number"?y:ce.parse(y??"0mm"),d=typeof x=="number"?x:ce.parse(x??"0mm")}else h=1,d=1;const m=u*i+Math.max(0,u-1)*h,_=g*r+Math.max(0,g-1)*d,f=t._getGlobalSchematicPositionBeforeLayout(),I=f.x-m/2+i/2,C=f.y+_/2-r/2;for(let y=0;y<o.length;y++){const x=o[y];if(!x.schematic_component_id)continue;const E=Math.floor(y/u),B=y%u;if(E>=g||B>=u){console.warn(`Schematic grid layout: Child ${x.getString()} at index ${y} (row ${E}, col ${B}) exceeds specified grid dimensions (${g}x${u}). Skipping placement.`);continue}const S=I+B*(i+h),Q=C-E*(r+d),w=e.schematic_component.get(x.schematic_component_id);if(w){const M=w.center,k={x:S,y:Q};e.schematic_component.update(x.schematic_component_id,{center:k});const R=k.x-M.x,F=k.y-M.y,O=e.schematic_port.list({schematic_component_id:x.schematic_component_id});for(const Y of O)e.schematic_port.update(Y.schematic_port_id,{center:{x:Y.center.x+R,y:Y.center.y+F}});const U=e.schematic_text.list({schematic_component_id:x.schematic_component_id});for(const Y of U)e.schematic_text.update(Y.schematic_text_id,{position:{x:Y.position.x+R,y:Y.position.y+F}});MO({db:e,schematicComponentId:x.schematic_component_id,deltaX:R,deltaY:F})}}t.schematic_group_id&&e.schematic_group.update(t.schematic_group_id,{width:m,height:_,center:f})}var aTt=vc("Group_doInitialSchematicLayoutMatchAdapt");function WMo(t){const{db:e}=t.root,n=dz(e.toArray(),{source_group_id:t.source_group_id});if(n.filter(A=>A.type==="source_component").length<=1)return;const i=lEo(n);aTt.enabled&&global?.debugGraphics&&global.debugGraphics?.push(zN(i,{title:`floatingBpcGraph-${t.name}`}));const r={boxes:i.boxes,pins:i.pins.map(A=>({...A,color:A.color.replace("not_connected","normal")}))},{result:s}=HEo([{variantName:"default",floatingGraph:i},{variantName:"noNotConnected",floatingGraph:r}],{singletonKeys:["vcc/2","gnd/2"],centerPinColors:["netlabel_center","component_center"],floatingBoxIdsWithMutablePinOffsets:new Set(i.boxes.filter(A=>i.pins.filter(u=>u.boxId===A.boxId).filter(u=>!u.color.includes("center")).length<=2).map(A=>A.boxId)),corpus:{}});aTt.enabled&&global?.debugGraphics&&global.debugGraphics?.push(zN(s,{title:`laidOutBpcGraph-${t.name}`}));const a=t._getGlobalSchematicPositionBeforeLayout();for(const A of s.boxes){if(!A.center)continue;const c=e.schematic_component.get(A.boxId);if(c){const u={x:A.center.x+a.x,y:A.center.y+a.y},g=e.schematic_port.list({schematic_component_id:c.schematic_component_id}),h=e.schematic_text.list({schematic_component_id:c.schematic_component_id}),d={x:u.x-c.center.x,y:u.y-c.center.y};for(const p of g)p.center.x+=d.x,p.center.y+=d.y;for(const p of h)p.position.x+=d.x,p.position.y+=d.y;MO({db:e,schematicComponentId:c.schematic_component_id,deltaX:d.x,deltaY:d.y}),c.center=u;continue}const l=e.schematic_net_label.get(A.boxId);if(l){const u=s.pins.find(h=>h.boxId===A.boxId&&h.color==="netlabel_center");if(!u)throw new Error(`No pin found for net label: ${A.boxId}`);const g={x:A.center.x+a.x,y:A.center.y+a.y};l.center=g,l.anchor_position={x:g.x+u.offset.x,y:g.y+u.offset.y};continue}console.error(`No schematic element found for box: ${A.boxId}. This is a bug in the matchAdapt binding with @tscircuit/core`)}}function ATt({text:t,fontSize:e}){const o=.12*(e/.18);return t.length*o}var jMo=.18,$Mo=new Set(["simple_resistor","simple_capacitor","simple_inductor","simple_crystal","simple_resonator","simple_potentiometer","simple_fuse","simple_diode","simple_led","simple_transistor","simple_mosfet","simple_op_amp","simple_voltage_source","simple_test_point"]);function cTt({text:t,position:e,anchor:n,fontSize:o}){const i=ATt({text:t,fontSize:o}),r=o;let s,a;n.includes("left")?(s=0,a=i):n.includes("right")?(s=-i,a=0):(s=-i/2,a=i/2);let A,c;return n.includes("top")?(A=-r,c=0):n.includes("bottom")?(A=0,c=r):(A=-r/2,c=r/2),{minX:e.x+s,maxX:e.x+a,minY:e.y+A,maxY:e.y+c}}function qMo({schematicComponent:t,sourceComponent:e}){if(!t.symbol_name)return[];const n=Su[t.symbol_name];if(!n?.primitives||!n.center)return[];const o=[];for(const i of n.primitives){if(i.type!=="text")continue;let r;i.text==="{REF}"?r=e?.display_name??e?.name??"":i.text==="{VAL}"?r=t.symbol_display_value??"":r=i.text??"",r&&o.push(cTt({text:r,position:{x:i.x-n.center.x+t.center.x,y:i.y-n.center.y+t.center.y},anchor:i.anchor??"center",fontSize:jMo}))}return o}function lTt(t){return Ey({center:t.center,width:t.size.width,height:t.size.height})}function XMo(t,e){if(!e.center||!e.size)return null;const n=e.source_component_id?t.source_component.get(e.source_component_id):void 0;if(!n||!$Mo.has(n.ftype))return null;const o=qMo({schematicComponent:e,sourceComponent:n});if(o.length===0)return null;const i=lTt(e),r={...i};for(const s of o)r.minX=Math.min(r.minX,s.minX),r.maxX=Math.max(r.maxX,s.maxX),r.minY=Math.min(r.minY,s.minY),r.maxY=Math.max(r.maxY,s.maxY);return r.minX===i.minX&&r.maxX===i.maxX&&r.minY===i.minY&&r.maxY===i.maxY?null:r}function ZMo(t,e){let n=t.size;return n&&(n=kwe(n,e)),{...t,symbol_name:Rwe(t.symbol_name,e),size:n}}function vue({db:t,schematicComponent:e,ccwRotationDegrees:n=0}){const o=ZMo(e,n),i=XMo(t,o);if(!i)return null;const r=lTt(o);if(o.size.height>o.size.width)return i;const a=Math.max(0,r.minX-i.minX),A=Math.max(0,i.maxX-r.maxX),c=Math.max(0,i.maxY-r.maxY),l=Math.max(0,r.minY-i.minY);let u=a,g=A;a>0&&A>0&&(u=Math.max(a,A),g=u);let h=c,d=l;return c>0&&l>0&&(h=Math.max(c,l),d=h),{minX:r.minX-u,maxX:r.maxX+g,minY:r.minY-d,maxY:r.maxY+h}}var js=vc("Group_doInitialSchematicLayoutMatchpack"),uTt=[0,90,180,270],eDo={"y+":0,"x+":90,"y-":180,"x-":270};function CMe(t){switch(t){case"up":return"y+";case"down":return"y-";case"left":return"x-";case"right":return"x+";default:return"y+"}}function tDo(t,e){if(e.length!==2)return null;const n=new Set;for(const o of e){const r=t.source_port.get(o.source_port_id)?.subcircuit_connectivity_map_key;if(!r)continue;const s=t.source_net.getWhere({subcircuit_connectivity_map_key:r});if(!s)continue;const a=s.is_ground??!1,A=s.is_power===!0||s.is_positive_voltage_source===!0;if(A===a)continue;const c=eDo[CMe(o.facing_direction)],l=A?c:(c+180)%360;n.add(l)}return n.size===1?n.values().next().value:null}function gTt({db:t,schematicComponent:e,component:n,ccwRotationDegrees:o}){let i=e.size;i&&(i=kwe(i,o));const r=vue({db:t,schematicComponent:e,ccwRotationDegrees:o});let s=0,a=0,A=0,c=0;if(r&&e.center){const m=(i?.width??0)/2,_=(i?.height??0)/2;s=e.center.x-m-r.minX,a=r.maxX-(e.center.x+m),A=r.maxY-(e.center.y+_),c=e.center.y-_-r.minY}const l=(n?._parsedProps?.schMarginLeft??n?._parsedProps?.schMarginX??0)+s,u=(n?._parsedProps?.schMarginRight??n?._parsedProps?.schMarginX??0)+a;let g=(n?._parsedProps?.schMarginTop??n?._parsedProps?.schMarginY??0)+A,h=(n?._parsedProps?.schMarginBottom??n?._parsedProps?.schMarginY??0)+c;n?.config.shouldRenderAsSchematicBox&&(g+=.4,h+=.4);const d={width:(i?.width||1)+l+u,height:(i?.height||1)+g+h},p=kwe(d,o);return{x:p.width,y:p.height}}function nDo({db:t,schematicComponent:e,component:n,ccwRotationDegrees:o,chipGap:i}){const r=gTt({db:t,schematicComponent:e,component:n,ccwRotationDegrees:0});if(!Twe(o))return r;const s=gTt({db:t,schematicComponent:e,component:n,ccwRotationDegrees:o});return s.x-r.x>=i||s.y-r.y>=i?s:r}function oDo({db:t,schematicGroup:e,groupComponents:n,groupInstance:o}){let i=1/0,r=-1/0,s=1/0,a=-1/0,A=!1;for(const d of n){if(!d.center||!d.size)continue;A=!0;const p=vue({db:t,schematicComponent:d})??Ey({center:d.center,width:d.size.width,height:d.size.height});i=Math.min(i,p.minX),r=Math.max(r,p.maxX),s=Math.min(s,p.minY),a=Math.max(a,p.maxY)}const c=o?._parsedProps?.schMarginLeft??o?._parsedProps?.schMarginX??0,l=o?._parsedProps?.schMarginRight??o?._parsedProps?.schMarginX??0,u=o?._parsedProps?.schMarginTop??o?._parsedProps?.schMarginY??0,g=o?._parsedProps?.schMarginBottom??o?._parsedProps?.schMarginY??0,h=A?{x:(i+r)/2,y:(s+a)/2}:e.center??{x:0,y:0};return{center:{x:h.x+(l-c)/2,y:h.y+(u-g)/2},size:{x:(A?r-i:2)+c+l,y:(A?a-s:2)+u+g}}}function iDo(t,e){if(t.nodeType==="component"&&t.sourceComponent){const n=e.children.find(o=>o.source_component_id===t.sourceComponent?.source_component_id);return n?._parsedProps?.schX!==void 0||n?._parsedProps?.schY!==void 0}if(t.nodeType==="group"&&t.sourceGroup){const n=e.children.find(o=>o.source_group_id===t.sourceGroup?.source_group_id);return n?._parsedProps?.schX!==void 0||n?._parsedProps?.schY!==void 0}return!1}function DO(t,e){return t.nodeType==="component"&&t.sourceComponent?t.sourceComponent.name||`chip_${e}`:t.nodeType==="group"&&t.sourceGroup?t.sourceGroup.name||`group_${e}`:null}var dTt=({db:t,sourceComponentId:e,schematicSheetId:n})=>t.schematic_component.getWhere({source_component_id:e,...n?{schematic_sheet_id:n}:{}});function rDo(t,e,n,o={}){const i={chipMap:{},chipPinMap:{},netMap:{},pinStrongConnMap:{},netConnMap:{},chipGap:.6,decouplingCapsGap:.4,partitionGap:1.2},r={},s=n._getGlobalSchematicPositionBeforeLayout();js(`[${n.name}] Processing ${t.childNodes.length} child nodes for input problem`),t.childNodes.forEach((A,c)=>{const l=iDo(A,n);if(js(l?`[${n.name}] Child ${c} explicitly positioned, including as fixed chip`:`[${n.name}] Processing child ${c}: nodeType=${A.nodeType}`),A.nodeType==="component"?js(`[${n.name}] - Component: ${A.sourceComponent?.name}`):A.nodeType==="group"&&js(`[${n.name}] - Group: ${A.sourceGroup?.name}`),A.nodeType==="component"&&A.sourceComponent){const u=DO(A,c),g=dTt({db:e,sourceComponentId:A.sourceComponent.source_component_id,schematicSheetId:o.schematicSheetId});if(!g)return;const h=n.children.find(_=>_.source_component_id===A.sourceComponent?.source_component_id),d=e.schematic_port.list({schematic_component_id:g.schematic_component_id});let p=[...uTt];if(h?._parsedProps?.schOrientation&&(p=[0]),h?._parsedProps?.schRotation!==void 0&&(p=[0]),h?._parsedProps?.facingDirection&&(p=[0]),h?._parsedProps?.schFacingDirection&&(p=[0]),h?.componentName==="Chip"&&(p=[0]),p.length===uTt.length){const _=tDo(e,d);_!==null&&(p=[_])}const m=p.length===1?p[0]:0;i.chipMap[u]={chipId:u,pins:[],size:nDo({db:e,schematicComponent:g,component:h,ccwRotationDegrees:m,chipGap:i.chipGap}),isCapacitor:A.sourceComponent.ftype==="simple_capacitor",isCrystal:A.sourceComponent.ftype==="simple_crystal",isResistor:A.sourceComponent.ftype==="simple_resistor",isTestPoint:A.sourceComponent.ftype==="simple_test_point",availableRotations:p,...l&&{fixedPosition:{x:g.center.x-s.x,y:g.center.y-s.y}}};for(const _ of d){const f=e.source_port.get(_.source_port_id);if(!f)continue;const I=`${u}.${f.pin_number||f.name||_.schematic_port_id}`;i.chipMap[u].pins.push(I);const C=CMe(_.facing_direction);i.chipPinMap[I]={pinId:I,offset:{x:(_.center?.x||0)-(g.center.x||0),y:(_.center?.y||0)-(g.center.y||0)},side:C}}}else if(A.nodeType==="group"&&A.sourceGroup){const u=DO(A,c);js(`[${n.name}] Processing nested group: ${u}`);const g=e.schematic_group?.getWhere?.({source_group_id:A.sourceGroup.source_group_id}),h=n.children.find(d=>d.source_group_id===A.sourceGroup?.source_group_id);if(js(`[${n.name}] Found schematic_group for ${u}:`,g),g){js(`[${n.name}] Treating group ${u} as composite chip`);const d=e.schematic_component.list({schematic_group_id:g.schematic_group_id});js(`[${n.name}] Group ${u} has ${d.length} components:`,d.map(_=>_.source_component_id));const p=oDo({db:e,schematicGroup:g,groupComponents:d,groupInstance:h});r[u]=p,js(`[${n.name}] Group ${u} computed proxy: ${p.size.x} x ${p.size.y} centered at (${p.center.x}, ${p.center.y})`);const m=[];for(const _ of d){const f=e.schematic_port.list({schematic_component_id:_.schematic_component_id});for(const I of f){const C=e.source_port.get(I.source_port_id);if(!C)continue;const y=`${u}.${C.pin_number||C.name||I.schematic_port_id}`;m.push(y);const x=CMe(I.facing_direction);i.chipPinMap[y]={pinId:y,offset:{x:(I.center?.x||0)-p.center.x,y:(I.center?.y||0)-p.center.y},side:x}}}js(`[${n.name}] Group ${u} has ${m.length} pins:`,m),i.chipMap[u]={chipId:u,pins:m,size:p.size},js(`[${n.name}] Added group ${u} to chipMap`)}else js(`[${n.name}] Warning: No schematic_group found for group ${u}`)}}),js(`[${n.name}] Creating connections using connectivity keys`);const a=new Map;for(const[A,c]of Object.entries(i.chipMap))for(const l of c.pins){const u=l.split(".").pop(),g=t.childNodes.find(h=>DO(h,t.childNodes.indexOf(h))===A);if(g?.nodeType==="group"&&g.sourceGroup){const h=e.schematic_group?.getWhere?.({source_group_id:g.sourceGroup.source_group_id});if(h){const d=e.schematic_component.list({schematic_group_id:h.schematic_group_id});for(const p of d){const m=e.source_port.list({source_component_id:p.source_component_id});for(const _ of m){const f=_.pin_number||_.name;if(String(f)===String(u))if(_.subcircuit_connectivity_map_key){const I=_.subcircuit_connectivity_map_key;a.has(I)||a.set(I,[]),a.get(I).push(l),js(`[${n.name}] ✓ Pin ${l} has connectivity key: ${I}`)}else js(`[${n.name}] Pin ${l} has no connectivity key`)}}}}else if(g?.nodeType==="component"&&g.sourceComponent){const h=e.source_port.list({source_component_id:g.sourceComponent.source_component_id});for(const d of h){const p=d.pin_number||d.name;if(String(p)===String(u)&&d.subcircuit_connectivity_map_key){const m=d.subcircuit_connectivity_map_key;a.has(m)||a.set(m,[]),a.get(m).push(l),js(`[${n.name}] Pin ${l} has connectivity key: ${m}`)}}}}js(`[${n.name}] Found ${a.size} connectivity groups:`,Array.from(a.entries()).map(([A,c])=>({key:A,pins:c})));for(const[A,c]of a){const l=e.source_trace.list().filter(h=>h.subcircuit_connectivity_map_key===A),u=l.some(h=>h.connected_source_net_ids&&h.connected_source_net_ids.length>0),g=l.some(h=>h.connected_source_port_ids&&h.connected_source_port_ids.length>=2);if(js(`[${n.name}] Connectivity ${A}: hasNetConnections=${u}, hasDirectConnections=${g}`),c.length>=2&&g){for(const h of l)if(h.connected_source_port_ids&&h.connected_source_port_ids.length>=2){const d=[];for(const p of h.connected_source_port_ids)for(const m of c){const _=m.split(".").pop(),f=e.source_port.get(p);if(f&&String(f.pin_number||f.name)===String(_)){const I=m.split(".")[0],C=t.childNodes.find(y=>DO(y,t.childNodes.indexOf(y))===I);C?.nodeType==="component"&&C.sourceComponent&&e.source_port.list({source_component_id:C.sourceComponent.source_component_id}).some(x=>x.source_port_id===p)&&d.push(m)}}for(let p=0;p<d.length;p++)for(let m=p+1;m<d.length;m++){const _=d[p],f=d[m];i.pinStrongConnMap[`${_}-${f}`]=!0,i.pinStrongConnMap[`${f}-${_}`]=!0,js(`[${n.name}] Created strong connection: ${_} <-> ${f}`)}}}if(u){const h=e.source_net.getWhere({subcircuit_connectivity_map_key:A}),d=h?.is_ground??!1,p=h?.is_power===!0||h?.is_positive_voltage_source===!0;i.netMap[A]={netId:A,isGround:d,isPositiveVoltageSource:p};for(const m of c)i.netConnMap[`${m}-${A}`]=!0;js(`[${n.name}] Created net ${A} with ${c.length} pins:`,c)}}return{inputProblem:i,nestedGroupMatchpackProxyMap:r}}function hTt(t,e,n={}){const{db:o}=t.root;if(js(`[${t.name}] Starting matchpack layout with ${e.childNodes.length} children`),js(`[${t.name}] Tree structure:`,JSON.stringify(e,null,2)),e.childNodes.length<=1){js(`[${t.name}] Only ${e.childNodes.length} children, skipping layout`);return}js("Converting circuit tree to InputProblem...");const{inputProblem:i,nestedGroupMatchpackProxyMap:r}=rDo(e,o,t,n);js.enabled&&t.root?.emit("debug:logOutput",{type:"debug:logOutput",name:`matchpack-input-problem-${t.name}`,content:JSON.stringify(i,null,2)});const s=new ZSt(i);if(t.root?.emit("solver:started",{type:"solver:started",solverName:"LayoutPipelineSolver",solverParams:i,solverConstructorArgs:[i],componentName:t.getString()}),js("Starting LayoutPipelineSolver..."),js.enabled&&global?.debugGraphics){const l=s.visualize();global.debugGraphics.push({...l,title:`matchpack-initial-${t.name}`})}if(s.solve(),t.root?.emit("solver:ended",{type:"solver:ended",solverName:"LayoutPipelineSolver",componentName:t.getString(),solved:s.solved,failed:s.failed,iterations:s.iterations,error:s.error}),js(`Solver completed in ${s.iterations} iterations`),js(`Solved: ${s.solved}, Failed: ${s.failed}`),s.failed){const l=s.error??"Unknown Matchpack failure";js(`Solver failed with error: ${l}`),o.schematic_layout_error.insert({error_type:"schematic_layout_error",message:`Matchpack layout solver failed: ${l}`,is_fatal:!1,source_group_id:t.source_group_id,schematic_group_id:t.schematic_group_id,subcircuit_id:t.subcircuit_id??void 0});return}const a=s.getOutputLayout();if(js("OutputLayout:",JSON.stringify(a,null,2)),js("Solver completed successfully:",!s.failed),js.enabled&&global?.debugGraphics){const l=s.visualize();global.debugGraphics.push({...l,title:`matchpack-final-${t.name}`})}const A=s.checkForOverlaps(a);if(A.length>0){js(`Warning: Found ${A.length} overlapping components:`);for(const l of A)js(`  ${l.chip1} overlaps ${l.chip2} (area: ${l.overlapArea})`)}const c=t._getGlobalSchematicPositionBeforeLayout();js(`Group offset: x=${c.x}, y=${c.y}`),js(`Applying layout results for ${Object.keys(a.chipPlacements).length} chip placements`);for(const[l,u]of Object.entries(a.chipPlacements)){js(`Processing placement for chip: ${l} at (${u.x}, ${u.y})`);const g=e.childNodes.find(d=>{const p=DO(d,e.childNodes.indexOf(d)),m=p===l;return js(`  Checking child ${p}: matches=${m}`),m});if(!g){js(`Warning: No tree node found for chip: ${l}`),js("Available tree nodes:",e.childNodes.map((d,p)=>({type:d.nodeType,name:d.nodeType==="component"?d.sourceComponent?.name:d.sourceGroup?.name,expectedChipId:DO(d,p)})));continue}const h={x:u.x+c.x,y:u.y+c.y};if(g.nodeType==="component"&&g.sourceComponent){const d=t.children.find(m=>m.source_component_id===g.sourceComponent?.source_component_id);if(d?._parsedProps?.schX!==void 0||d?._parsedProps?.schY!==void 0){js(`Skipping position update for fixed chip ${l}`);continue}const p=dTt({db:o,sourceComponentId:g.sourceComponent.source_component_id,schematicSheetId:n.schematicSheetId});if(p){js(`Moving component ${l} to (${h.x}, ${h.y})`);const m=o.schematic_port.list({schematic_component_id:p.schematic_component_id}),_=o.schematic_text.list({schematic_component_id:p.schematic_component_id}),f={x:h.x-p.center.x,y:h.y-p.center.y};for(const I of m)I.center.x+=f.x,I.center.y+=f.y;for(const I of _)I.position.x+=f.x,I.position.y+=f.y;if(MO({db:o,schematicComponentId:p.schematic_component_id,deltaX:f.x,deltaY:f.y}),p.center=h,u.ccwRotationDegrees!==0){js(`Component ${l} has rotation: ${u.ccwRotationDegrees}°`);const I=(Math.round(u.ccwRotationDegrees)%360+360)%360;if((I===90||I===270)&&p.size){const E=p.size.width;p.size.width=p.size.height,p.size.height=E}const C=u.ccwRotationDegrees*Math.PI/180,y=Math.cos(C),x=Math.sin(C);for(const E of m){const B=E.center.x-h.x,S=E.center.y-h.y,Q=B*y-S*x,w=B*x+S*y;E.center.x=h.x+Q,E.center.y=h.y+w;const M=E.facing_direction||"right";E.facing_direction=cMt(M,u.ccwRotationDegrees),E.side_of_component=(E.facing_direction==="up"?"top":E.facing_direction==="down"?"bottom":E.facing_direction)||E.side_of_component}for(const E of _){const B=E.position.x-h.x,S=E.position.y-h.y,Q=B*y-S*x,w=B*x+S*y;E.position.x=h.x+Q,E.position.y=h.y+w}p.symbol_name&&(p.symbol_name=Rwe(p.symbol_name,u.ccwRotationDegrees))}}}else if(g.nodeType==="group"&&g.sourceGroup){const d=o.schematic_group?.getWhere?.({source_group_id:g.sourceGroup.source_group_id});if(d){js(`Moving group ${l} to (${h.x}, ${h.y}) from (${d.center?.x}, ${d.center?.y})`);const p=o.schematic_component.list({schematic_group_id:d.schematic_group_id});js(`Group ${l} has ${p.length} components to move`);const m=r[l],_=m?.center??d.center??{x:0,y:0},f={x:h.x-_.x,y:h.y-_.y};js(`Position delta for group ${l}: (${f.x}, ${f.y})`);for(const I of p)if(I.center){const C={...I.center};I.center.x+=f.x,I.center.y+=f.y,js(`Moved component ${I.source_component_id} from (${C.x}, ${C.y}) to (${I.center.x}, ${I.center.y})`);const y=o.schematic_port.list({schematic_component_id:I.schematic_component_id}),x=o.schematic_text.list({schematic_component_id:I.schematic_component_id});for(const E of y)E.center&&(E.center.x+=f.x,E.center.y+=f.y);for(const E of x)E.position&&(E.position.x+=f.x,E.position.y+=f.y);MO({db:o,schematicComponentId:I.schematic_component_id,deltaX:f.x,deltaY:f.y})}d.center=h,m&&(d.width=m.size.x,d.height=m.size.y),js(`Updated group ${l} center to (${h.x}, ${h.y})`)}}}js("Matchpack layout completed successfully")}function sDo({circuitJson:t,schematicSheetIdsBySourceComponentId:e}){const n=new Map;for(const i of t)i.type==="source_group"&&n.set(i.source_group_id,i.parent_source_group_id);const o=new Map;for(const i of t){if(i.type!=="source_component"||!i.source_group_id)continue;const r=e.get(i.source_component_id);if(r!==void 0)for(const s of r){let a=i.source_group_id;const A=new Set;for(;a&&!A.has(a);){A.add(a);const c=o.get(a)??new Set;c.add(s),o.set(a,c),a=n.get(a)}}}return o}function aDo({circuitJson:t,schematicSheetId:e,rootSourceGroupId:n,schematicSheetIdsBySourceComponentId:o,schematicSheetIdsBySourceGroupId:i}){const r=s=>s===n||i.get(s)?.has(e)===!0;return t.filter(s=>s.type==="source_group"?r(s.source_group_id):s.type==="source_component"?o.get(s.source_component_id)?.has(e)!==!0?!1:s.source_group_id?r(s.source_group_id):!0:!0)}function ADo(t,e){const{source_group_id:n}=e,o=new Map;for(const s of t){if(s.type!=="schematic_component"||!s.source_component_id||!s.schematic_sheet_id)continue;const a=o.get(s.source_component_id)??new Set;a.add(s.schematic_sheet_id),o.set(s.source_component_id,a)}const i=new Set;for(const s of o.values())for(const a of s)i.add(a);if(i.size<=1)return[{tree:mz(t,{source_group_id:n}),schematicSheetId:i.values().next().value}];const r=sDo({circuitJson:t,schematicSheetIdsBySourceComponentId:o});return Array.from(i).map(s=>({tree:mz(aDo({circuitJson:t,schematicSheetId:s,rootSourceGroupId:n,schematicSheetIdsBySourceComponentId:o,schematicSheetIdsBySourceGroupId:r}),{source_group_id:n}),schematicSheetId:s}))}function cDo(t){const{db:e}=t.root,n=ADo(e.toArray(),{source_group_id:t.source_group_id});for(const{tree:o,schematicSheetId:i}of n)hTt(t,o,{schematicSheetId:i})}var yMe=1,wue=1.5;function lDo({sectionBlocks:t,groupSchPositionBeforeLayout:e}){const n=t.reduce((c,l)=>{const u=Math.max(l.size.x,.5)+wue*2,g=Math.max(l.size.y,.5)+wue*2;return c+u*g},0),o=Math.sqrt(n)*2,i=[];let r=[],s=0;for(const c of t){const l=Math.max(c.size.x,.5)+wue*2,u=Math.max(c.size.y,.5)+wue*2,g=s>0?s+yMe+l:l;r.length>0&&g>o&&(i.push(r),r=[],s=0);const h=s>0?s+yMe:0;r.push({sectionName:c.sectionName,rowOffset:h,width:l,height:u}),s=h+l}r.length>0&&i.push(r);const a=new Map;let A=0;for(const c of i){const l=Math.max(...c.map(h=>h.height)),g=-(c[c.length-1].rowOffset+c[c.length-1].width)/2;for(const h of c)a.set(h.sectionName,{x:g+h.rowOffset+h.width/2+e.x,y:A-l/2+e.y});A-=l+yMe}return a}var uDo=vc("Group_doInitialSchematicLayoutSections");function gDo(t){const{db:e}=t.root,n=new Set;let o=!1;for(const c of t.children){if(!c.source_component_id)continue;const l=c.getSchematicSectionName();l!==null?n.add(l):o=!0}const i=Array.from(n);if(o&&i.push(null),i.length===0)return;for(const c of i){const l=mz(e.toArray(),{source_group_id:t.source_group_id});l.childNodes=l.childNodes.filter(u=>u.nodeType!=="component"||!u.sourceComponent?!1:(t.children.find(d=>d.source_component_id===u.sourceComponent?.source_component_id)?.getSchematicSectionName()??null)===c),hTt(t,l)}if(i.length<=1)return;const r=new Map;for(const c of i){let l=1/0,u=-1/0,g=1/0,h=-1/0;const d=new Set;for(const p of t.children){const m=p.source_component_id;if(!m||p.getSchematicSectionName()!==c)continue;const f=e.schematic_component.getWhere({source_component_id:m});if(!f)continue;d.add(m);const I=f.size.width/2,C=f.size.height/2;l=Math.min(l,f.center.x-I),u=Math.max(u,f.center.x+I),g=Math.min(g,f.center.y-C),h=Math.max(h,f.center.y+C)}!Number.isFinite(l)||d.size===0||r.set(c,{sectionName:c,center:{x:(l+u)/2,y:(g+h)/2},size:{x:u-l,y:h-g},sourceCompIds:d})}if(r.size<=1)return;const s=new Set;for(const c of t.children){if(!c.source_component_id)continue;const l=c._parsedProps;(l?.schX!==void 0||l?.schY!==void 0)&&s.add(c.getSchematicSectionName())}const a=t._getGlobalSchematicPositionBeforeLayout(),A=lDo({sectionBlocks:Array.from(r.values()).map(c=>({sectionName:c.sectionName,size:c.size})),groupSchPositionBeforeLayout:a});for(const[c,l]of A){const u=r.get(c);if(!u)continue;if(s.has(c)){uDo(`[${t.name}] Section "${c}" anchored by manual position, skipping shift`);continue}const g={x:l.x-u.center.x,y:l.y-u.center.y};for(const h of u.sourceCompIds){const d=e.schematic_component.getWhere({source_component_id:h});if(!d)continue;const p=e.schematic_port.list({schematic_component_id:d.schematic_component_id}),m=e.schematic_text.list({schematic_component_id:d.schematic_component_id});for(const _ of p)_.center.x+=g.x,_.center.y+=g.y;for(const _ of m)_.position.x+=g.x,_.position.y+=g.y;MO({db:e,schematicComponentId:d.schematic_component_id,deltaX:g.x,deltaY:g.y}),d.center={x:d.center.x+g.x,y:d.center.y+g.y}}}}var dDo=({db:t,schematicDisabled:e})=>{const n=t.schematic_missing_sheet_warning.list()[0],o=t.schematic_component.list().length>0;if(!(!e&&o&&t.schematic_sheet.list().length===0)){n&&t.schematic_missing_sheet_warning.delete(n.schematic_missing_sheet_warning_id);return}n||t.schematic_missing_sheet_warning.insert({warning_type:"schematic_missing_sheet_warning",message:"No <schematicsheet> was found. Add a <schematicsheet> to define the schematic drawing area."})},pTt=t=>{const e=t.root;if(!e?.isRootCircuit)return;const n=e.firstChild===t,o=U0e(e.firstChild)&&t.parent===e.firstChild;!n&&!o||dDo({db:e.db,schematicDisabled:e.schematicDisabled})},hDo=t=>{pTt(t)},pDo=class extends Ir{source_net_label_id;schematic_net_label_id;get config(){return{componentName:"NetLabel",zodProps:HPn}}_getAnchorSide(){const{_parsedProps:t}=this;if(t.anchorSide)return t.anchorSide;if(!this._resolveConnectsTo())return"right";const n=this.getSubcircuit().selectOne(`net.${this._getNetName()}`);let o;if(n?.source_net_id&&(o=this.root?.db.source_net.get(n.source_net_id)),o?.is_ground)return"top";if(o?.is_power)return"bottom";const i=this._getGlobalSchematicPositionBeforeLayout(),r=this._getConnectedPorts();if(r.length===0)return"right";const s=r[0];if(s.facingDirection)return gO(s.facingDirection);const a=s._getGlobalSchematicPositionBeforeLayout(),A=a.x-i.x,c=a.y-i.y;if(Math.abs(A)>Math.abs(c)){if(A>0)return"right";if(A<0)return"left"}else{if(c>0)return"top";if(c<0)return"bottom"}return"right"}_getConnectedPorts(){const t=this._resolveConnectsTo();if(!t)return[];const e=[];for(const n of t){const o=this.getSubcircuit().selectOne(n);o&&e.push(o)}return e}computeSchematicPropsTransform(){const{_parsedProps:t}=this;if(t.schX===void 0&&t.schY===void 0){const e=this._getConnectedPorts();if(e.length>0){const n=e[0]._getGlobalSchematicPositionBeforeLayout(),o=ts(this.parent?.computeSchematicGlobalTransform?.()??hC(),{x:0,y:0});return M0(n.x-o.x,n.y-o.y)}}return super.computeSchematicPropsTransform()}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this;if(e.inline&&this.root?._featureMspSchematicTraceRouting&&this._getConnectedPorts().length>0)return;const n=this._getGlobalSchematicPositionBeforeLayout(),o=this.getSubcircuit().selectOne(`net.${this._getNetName()}`),i=this._getAnchorSide(),r=j7({anchor_position:n,anchor_side:i,text:e.net}),s=t.schematic_net_label.insert({text:e.net,source_net_id:o.source_net_id,anchor_position:n,center:r,anchor_side:i,schematic_sheet_id:this._resolveSchematicSheetId()});this.source_net_label_id=s.source_net_id,this.schematic_net_label_id=s.schematic_net_label_id}_resolveConnectsTo(){const{_parsedProps:t}=this,e=t.connectsTo??t.connection;if(Array.isArray(e))return e;if(typeof e=="string")return[e]}_getNetName(){const{_parsedProps:t}=this;return t.net}doInitialCreateNetsFromProps(){const{_parsedProps:t}=this;t.net&&Hj(this,[`net.${t.net}`])}doInitialCreateTracesFromNetLabels(){const t=this._resolveConnectsTo();if(t)for(const e of t)this.add(new t1({from:e,to:`net.${this._getNetName()}`}))}doInitialSchematicTraceRender(){if(!this.root?._featureMspSchematicTraceRouting||this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor()||this._parsedProps.inline)return;const{schX:t,schY:e}=this._parsedProps;if(t===void 0&&e===void 0)return;const{db:n}=this.root,o=this._resolveConnectsTo();if(!o||o.length===0)return;const i=this._getGlobalSchematicPositionBeforeLayout(),r=this._getAnchorSide(),a={left:"x-",right:"x+",top:"y+",bottom:"y-"}[r],A=this.getSubcircuit().selectOne(`net.${this._getNetName()}`);for(const c of o){const l=this.getSubcircuit().selectOne(c,{type:"port"});if(!l||!l.schematic_port_id)continue;let u=!1;if(A?.source_net_id){const f=n.source_trace.list().find(I=>I.connected_source_net_ids?.includes(A.source_net_id)&&I.connected_source_port_ids?.includes(l.source_port_id??""));if(f&&(u=n.schematic_trace.list().some(I=>I.source_trace_id===f.source_trace_id)),u)continue}const g=l._getGlobalSchematicPositionAfterLayout(),h=D0e(l.facingDirection??"right")??"x+",d=wF({x:g.x,y:g.y,facingDirection:h},{x:i.x,y:i.y,facingDirection:a});if(!Array.isArray(d)||d.length<2)continue;const p=[];for(let f=0;f<d.length-1;f++)p.push({from:{x:d[f].x,y:d[f].y},to:{x:d[f+1].x,y:d[f+1].y}});let m,_;if(A?.source_net_id&&l.source_port_id){const f=n.source_trace.list().find(I=>I.connected_source_net_ids?.includes(A.source_net_id)&&I.connected_source_port_ids?.includes(l.source_port_id));m=f?.source_trace_id,_=f?.subcircuit_connectivity_map_key||n.source_net.get(A.source_net_id)?.subcircuit_connectivity_map_key}n.schematic_trace.insert({source_trace_id:m,edges:p,junctions:[],subcircuit_connectivity_map_key:_,schematic_sheet_id:this._resolveSchematicSheetId()}),n.schematic_port.update(l.schematic_port_id,{is_connected:!0})}}},xMe=t=>{const e=[...new Set(t.flatMap(s=>s._getDirectlyConnectedTraces()))],n=e.find(s=>s._parsedProps.schDisplayLabel)?._parsedProps.schDisplayLabel??e.find(s=>s._parsedProps.displayName)?._parsedProps.displayName??e.find(s=>s._parsedProps.name)?._parsedProps.name;if(n)return{name:n,wasAssignedDisplayLabel:!0};const o=t.find(s=>s.root)?.root?.db,i=t.map(s=>s.source_port_id).filter(s=>!!s);return{name:(o?Vwe(o,i):t.map(s=>s._getNetLabelText()).filter(s=>!!s).sort((s,a)=>s.localeCompare(a,void 0,{numeric:!0,sensitivity:"base"}))[0])??"",wasAssignedDisplayLabel:!1}},mTt=(t,e,n)=>{const o=t.get(e);o?o.push(n):t.set(e,[n])},EMe=t=>{const{db:e}=t.root,n=new Map,o=new Map,i=new Map,r=new Map;for(const s of e.source_net.list())s.subcircuit_connectivity_map_key&&n.set(s.subcircuit_connectivity_map_key,s);for(const s of t.selectAll("port")){const a=s._getSubcircuitConnectivityKey();a&&mTt(o,a,s)}for(const s of e.source_port.list())s.subcircuit_connectivity_map_key&&mTt(i,s.subcircuit_connectivity_map_key,s.source_port_id);return({subcircuitConnectivityMapKey:s})=>{const a=r.get(s);if(a)return a;const A=n.get(s);if(A?.name){const u={name:A.name,wasAssignedDisplayLabel:!0};return r.set(s,u),u}const c=xMe(o.get(s)??[]);if(c.name)return r.set(s,c),c;const l={name:Vwe(e,i.get(s)??[])??"",wasAssignedDisplayLabel:!1};return r.set(s,l),l}},Am=t=>t,NO=t=>t,mDo=vc("Group_doInitialSchematicTraceRender"),_Do="rgb(132, 0, 0)",fDo=-90;function IDo(t){const{group:e,solver:n,userNetIdToConnKey:o,sourceTraceIdByPinPairKey:i,crossScopeSourceTraceIdBySchematicPortIdAndNetId:r}=t,{db:s}=e.root,a=n.inlineNetLabelSolver?.getOutput().inlineNetLabelPlacements??[];if(a.length===0)return;const A=EMe(e),c=n.mspConnectionPairSolver.globalConnMap;for(const l of a){const u=l.pinIds.map(Am),g=c.getIdsConnectedToNet(l.globalConnNetId).find(S=>o.has(S)),h=u.length===1?r.get(u[0])?.get(l.netId??l.globalConnNetId):void 0,d=(h?s.source_trace.get(h)?.subcircuit_connectivity_map_key:void 0)??(g?o.get(g):void 0),p=l.netLabelText??(d?A({subcircuitConnectivityMapKey:d}).name:l.netId??l.globalConnNetId);if(!p){mDo(`skipping inline net label for "${l.netId}" REASON:no resolvable text`);continue}let m=h??i.get([...u].sort().join("::"));if(!m&&d){const S=u.flatMap(Q=>{const w=s.schematic_port.get(Q)?.source_port_id;return w?[w]:[]});m=s.source_trace.list().find(Q=>Q.subcircuit_connectivity_map_key===d&&S.some(w=>Q.connected_source_port_ids.includes(w)))?.source_trace_id}let _=e._resolveSchematicSheetId();const f=s.schematic_port.get(u[0]);f?.schematic_sheet_id&&(_=f.schematic_sheet_id);let I={x:0,y:0},C=l.stubTracePath?.map(S=>({...S}));if(C&&u.length===1){const S=s.schematic_port.get(u[0])?.center;S&&(I={x:S.x-C[0].x,y:S.y-C[0].y},C=C.map(Q=>({x:Q.x+I.x,y:Q.y+I.y})))}const y={x:l.anchorPoint.x+I.x,y:l.anchorPoint.y+I.y},x={x:l.center.x+I.x,y:l.center.y+I.y};let E="center";const B=l.height/2;switch(l.side){case"y+":x.y=y.y+B;break;case"y-":x.y=y.y-B;break;case"x+":x.x=y.x+B;break;case"x-":x.x=y.x-B;break}if(C&&C.length===2){const[S,Q]=C;if(l.axis==="x"){const w=Q.x>S.x;E=w?"left":"right",x.x+=w?-l.width/2:l.width/2}else{const w=Q.y>S.y;E=w?"left":"right",x.y+=w?-l.width/2:l.width/2}}C&&C.length===2&&(s.schematic_trace.insert({source_trace_id:m,edges:[{from:C[0],to:C[1]}],junctions:[],subcircuit_connectivity_map_key:d,schematic_sheet_id:_}),s.schematic_port.update(u[0],{is_connected:!0})),s.schematic_text.insert({text:p,source_trace_id:m,anchor:E,position:x,rotation:l.axis==="y"?fDo:0,font_size:l.height,color:_Do,schematic_sheet_id:_})}}var CDo=.18,_Tt=({center:t,text:e})=>{const o=vb({text:e})/2,i=CDo/2;return{minX:t.x-o,maxX:t.x+o,minY:t.y-i,maxY:t.y+i}},yDo=t=>{switch(t){case"x+":return"left";case"x-":return"right";case"y+":return"bottom";case"y-":return"top";case"left":return"right";case"top":return"bottom";case"right":return"left";case"bottom":return"top"}},_$=vc("Group_doInitialSchematicTraceRender"),fTt=(t,e)=>t.schematicNetLabel.source_net_id!=null&&t.schematicNetLabel.source_net_id===e.source_net_id,xDo=(t,e)=>fTt(t,e.sourceNet)?t.schematicPortIds.some(n=>e.schematicPortIds.has(n))?!0:t.schematicNetLabel.center?z4(_Tt({center:t.schematicNetLabel.center,text:t.schematicNetLabel.text}),e.bounds):!1:!1;function EDo(t){const{group:e,routedSchematicPortIdBySchematicPortId:n,solver:o,connKeyToSourceNet:i,userNetIdToConnKey:r,crossScopeSourceTraceIdBySchematicPortIdAndNetId:s,sourceTraceIdByPortOnlyLabelSchematicPortId:a,connKeysWithExplicitPortNetTraces:A,schematicPortIdsWithPreExistingNetLabels:c,schematicPortIdsWithRoutedTraces:l,netLabels:u}=t,{db:g}=e.root,h=EMe(e),d=o.inlineNetLabelSolver?.getOutput().netLabelPlacements??o.netLabelNetLabelCollisionSolver?.getOutput().netLabelPlacements??o.netLabelTraceCollisionSolver?.getOutput().netLabelPlacements??o.netLabelPlacementSolver?.netLabelPlacements??o.traceLabelOverlapAvoidanceSolver?.getOutput().netLabelPlacements??[],p=[],m=new Set;for(const x of d){const E=[...x.pinIds??[]].sort(),B=`${x.globalConnNetId}|${E.join("::")}|${x.netId??""}`;if(m.has(B)){_$(`skipping duplicate placement for "${x.netId}" REASON:identical net label placement`);continue}m.add(B),p.push(x)}const _=new Map,f=new Map,I=new Set;for(const x of p)_.set(x.globalConnNetId,(_.get(x.globalConnNetId)??0)+1),(x.pinIds?.length??0)>1&&(f.has(x.globalConnNetId)||f.set(x.globalConnNetId,new Set),f.get(x.globalConnNetId).add(x.pinIds.slice().sort().join("::"))),(x.pinIds?.length??0)<=1&&I.add(x.globalConnNetId);const C=o.mspConnectionPairSolver.globalConnMap,y=u.map(x=>{if(!x.schematic_net_label_id)return null;const E=g.schematic_net_label.get(x.schematic_net_label_id);return E?{schematicNetLabel:E,schematicPortIds:x._getConnectedPorts().map(B=>B.schematic_port_id).filter(B=>!!B).map(B=>n.get(B)??B),shouldUseSchematicTraceSolver:x._parsedProps.schX===void 0&&x._parsedProps.schY===void 0}:null}).filter(x=>x!==null);for(const x of p){_$(`processing placement: ${x.netId}`);const E=x.pinIds.map(Am),S=(E.length===1?s.get(E[0])?.get(x.netId??x.globalConnNetId):void 0)??(E.length===1?a.get(E[0]):void 0),Q=S?g.source_trace.get(S):void 0,w=C.getIdsConnectedToNet(x.globalConnNetId).find(ge=>r.get(ge)),M=Q?.subcircuit_connectivity_map_key??r.get(w),k=x.orientation,R=yDo(k);let F;M&&(F=i.get(M));const O=M?h({subcircuitConnectivityMapKey:M}):{name:x.netId??x.globalConnNetId,wasAssignedDisplayLabel:!1},U=x.netLabelText?{name:x.netLabelText,wasAssignedDisplayLabel:!0}:O;let Y=e._resolveSchematicSheetId();const W=g.schematic_port.get(E[0]);W?.schematic_sheet_id&&(Y=W.schematic_sheet_id);let te=x.anchorPoint;if(E.length===1&&E[0]){const ge=g.schematic_port.get(E[0]);ge?.center&&!ge.is_connected&&(te=ge.center)}if(E.some(ge=>c.has(ge))){_$(`skipping net label placement for "${x.netId}" REASON:schematic port has pre-existing net label`);continue}if(F){const ge=F.is_ground||F.is_power,_e=A.has(M),ue=E.some(Qe=>l.has(Qe)),fe=(_.get(x.globalConnNetId)??0)<=1;if(!_e&&!ge&&ue&&fe){_$(`skipping net label placement for "${x.netId}" REASON:schematic port has routed trace`);continue}const ye=U.name,Me=j7({anchor_position:te,anchor_side:R,text:ye}),ve=y.find(Qe=>Qe.shouldUseSchematicTraceSolver&&fTt(Qe,F)&&Qe.schematicPortIds.some(Pe=>E.includes(Pe)));if(ve){g.schematic_net_label.update(ve.schematicNetLabel.schematic_net_label_id,{anchor_position:te,center:Me,anchor_side:R,schematic_sheet_id:Y,source_trace_id:S});continue}if(!ge){const Qe={sourceNet:F,schematicPortIds:new Set(E),bounds:_Tt({center:Me,text:ye})};if(y.some(Pe=>xDo(Pe,Qe)))continue}const he={text:ye,source_net_id:F.source_net_id,anchor_position:te,center:Me,anchor_side:R,schematic_sheet_id:Y,source_trace_id:S};g.schematic_net_label.insert(he);continue}const{name:j,wasAssignedDisplayLabel:J}=U,ie=(x.pinIds?.length??0)>1&&(I.has(x.globalConnNetId)||(f.get(x.globalConnNetId)?.size??0)>1);if(!J&&!ie&&E.some(ge=>l.has(ge))){_$(`skipping net label placement for "${x.netId}" REASON:schematic port has routed traces and no display label`);continue}const ne=j7({anchor_position:te,anchor_side:R,text:j}),le={text:j,source_net_id:M??x.netId??x.globalConnNetId,anchor_position:te,center:ne,anchor_side:R,schematic_sheet_id:Y,source_trace_id:S};g.schematic_net_label.insert(le)}}var Pue=(t,e,n,o)=>t*o-e*n;function ITt(t,e,n,o,i){const r={x:e.x-t.x,y:e.y-t.y},s={x:o.x-n.x,y:o.y-n.y},a=Pue(r.x,r.y,s.x,s.y),A={x:n.x-t.x,y:n.y-t.y},c=Pue(A.x,A.y,r.x,r.y);if(Math.abs(a)<i&&Math.abs(c)<i||Math.abs(a)<i&&Math.abs(c)>=i)return null;const l=Pue(A.x,A.y,s.x,s.y)/a,u=Pue(A.x,A.y,r.x,r.y)/a;return l<-i||l>1+i||u<-i||u>1+i?null:{x:t.x+l*r.x,y:t.y+l*r.y}}var Ew=1e-6;function CTt(t){const e=Math.abs(t.to.x-t.from.x),n=Math.abs(t.to.y-t.from.y);return e>=n}function uR(t,e){return Math.hypot(e.x-t.x,e.y-t.y)}function gR(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}}function RO(t,e,n){const o=uR(t,e);if(o<Ew)return 0;const i=((n.x-t.x)*(e.x-t.x)+(n.y-t.y)*(e.y-t.y))/((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y));return Math.max(0,Math.min(1,i))*o}function yTt(t,e=Ew){if(t.length===0)return t;t.sort((i,r)=>i.start-r.start);const n=[];let o={...t[0]};for(let i=1;i<t.length;i++){const r=t[i];r.start<=o.end+e?o.end=Math.max(o.end,r.end):(n.push(o),o={...r})}return n.push(o),n}function BDo(t,e,n){const o=uR(t.from,t.to);if(o<Ew||e.length===0)return[t];const i=n/2,r=e.map(l=>({start:Math.max(0,l-i),end:Math.min(o,l+i)})).filter(l=>l.end-l.start>Ew),s=yTt(r),a=[];let A=0;t.to.x-t.from.x,t.to.y-t.from.y;const c=(l,u,g)=>{if(u-l<=Ew)return;const h=l/o,d=u/o;a.push({from:gR(t.from,t.to,h),to:gR(t.from,t.to,d),...g?{is_crossing:!0}:{}})};for(const l of s)l.start-A>Ew&&c(A,l.start,!1),c(l.start,l.end,!0),A=l.end;return o-A>Ew&&c(A,o,!1),a.length>0?a:[t]}function bDo(t,e={}){const n=e.crossSegmentLength??.075,o=e.tolerance??Ew,i=new Map,r=a=>`${a.traceIdx}:${a.edgeIdx}`;for(let a=0;a<t.length;a++){const A=t[a];for(let c=0;c<A.edges.length;c++){const l=A.edges[c];for(let u=a;u<t.length;u++){const g=t[u];for(let h=u===a?c+1:0;h<g.edges.length;h++){const d=g.edges[h];if(A.connectivity_key!==void 0&&A.connectivity_key===g.connectivity_key)continue;const p=ITt(l.from,l.to,d.from,d.to,o);if(!p)continue;const m=uR(l.from,l.to),_=uR(d.from,d.to);if(m<o||_<o)continue;const f=RO(l.from,l.to,p),I=RO(d.from,d.to,p),C=f<=o||Math.abs(m-f)<=o||Number.isNaN(f),y=I<=o||Math.abs(_-I)<=o||Number.isNaN(I);if(!C&&!y){const x=CTt(l),E=CTt(d);let B;if(x!==E)B=x;else{const w=Math.abs(l.to.x-l.from.x),M=Math.abs(l.to.y-l.from.y),k=Math.abs(d.to.x-d.from.x),R=Math.abs(d.to.y-d.from.y),F=w-M,O=k-R;B=F===O?!0:F>O}const S=r({traceIdx:B?a:u,edgeIdx:B?c:h}),Q=i.get(S)??[];Q.push(B?f:I),i.set(S,Q)}}}}}const s=t.map(a=>({source_trace_id:a.source_trace_id,connectivity_key:a.connectivity_key,edges:[]}));for(let a=0;a<t.length;a++){const A=t[a];for(let c=0;c<A.edges.length;c++){const l=r({traceIdx:a,edgeIdx:c}),u=i.get(l)??[];if(u.length===0){s[a].edges.push(A.edges[c]);continue}const g=Array.from(new Set(u.map(d=>Number(d.toFixed(6))))).sort((d,p)=>d-p),h=BDo(A.edges[c],g,n);s[a].edges.push(...h)}}return s}var QB=1e-6;function Mue(t,e,n=QB){return Math.abs(t-e)<=n}function Bw(t,e,n=QB){return Mue(t.x,e.x,n)&&Mue(t.y,e.y,n)}function xTt(t,e,n,o=QB){const i=Math.min(e.x,n.x)-o,r=Math.max(e.x,n.x)+o,s=Math.min(e.y,n.y)-o,a=Math.max(e.y,n.y)+o;return t.x<i||t.x>r||t.y<s||t.y>a?!1:Math.abs((n.x-e.x)*(t.y-e.y)-(n.y-e.y)*(t.x-e.x))<=o}function ETt(t,e=QB){const n=new Map;for(const o of t){const i=`${o.x.toFixed(6)},${o.y.toFixed(6)}`;n.has(i)||n.set(i,o)}return Array.from(n.values())}function BTt(t){return{x:t.to.x-t.from.x,y:t.to.y-t.from.y}}function bTt(t,e,n=QB){return Bw(t,e.from,n)||Bw(t,e.to,n)}function BMe(t,e,n=QB){const o=BTt(t),i=BTt(e),r=Math.hypot(o.x,o.y),s=Math.hypot(i.x,i.y);if(r<n||s<n)return!0;const a=o.x*i.y-o.y*i.x;return Math.abs(a)<=n*r*s}function f$(t,e,n=QB){return t.edges.filter(o=>Bw(o.from,e,n)||Bw(o.to,e,n))}function STt(t,e,n=QB){for(const o of t.edges){if(Bw(o.from,e,n))return o.from;if(Bw(o.to,e,n))return o.to}return null}function SDo(t,e,n=QB){const o=Bw(t.from,e,n)||Mue(t.from.x,e.x,n)&&Mue(t.from.y,e.y,n)?t.to:t.from,i=o.x-e.x,r=o.y-e.y;return Math.abs(i)<n&&Math.abs(r)<n?null:Math.abs(i)>=Math.abs(r)?i>=0?"right":"left":r>=0?"up":"down"}function TO(t,e,n=QB){const o=f$(t,e,n);if(o.length<2)return null;const i=o.map(u=>SDo(u,e,n)),r=i.includes("up"),s=i.includes("down"),a=i.includes("left"),A=i.includes("right"),c=r?"up":s?"down":null,l=A?"right":a?"left":null;return c&&l?`${c}-${l}`:null}function QDo(t,e={}){const n=e.tolerance??QB,o={};for(const r of t)o[r.source_trace_id]=[];const i=t.map(r=>{const s=[];for(const a of r.edges)s.push(a.from,a.to);return ETt(s,n)});for(let r=0;r<t.length;r++){const s=t[r],a=i[r];for(let A=r+1;A<t.length;A++){const c=t[A],l=i[A];if(s.connectivity_key!==void 0&&s.connectivity_key===c.connectivity_key){for(const g of s.edges)for(const h of c.edges){const d=ITt(g.from,g.to,h.from,h.to,n);d&&(bTt(d,g,n)||bTt(d,h,n)||(o[s.source_trace_id].push(d),s.source_trace_id!==c.source_trace_id&&o[c.source_trace_id].push(d)))}for(const g of a)for(const h of l)if(Bw(g,h,n)){const d=f$(s,g,n),p=f$(c,h,n),m=d.some(C=>p.some(y=>!BMe(C,y,n))),_=TO(s,g,n),f=TO(c,h,n);m&&!(_!==null&&f!==null&&_===f)&&(o[s.source_trace_id].push(g),s.source_trace_id!==c.source_trace_id&&o[c.source_trace_id].push(h))}for(const g of a)for(const h of c.edges)if(xTt(g,h.from,h.to,n)){const p=f$(s,g,n).some(C=>!BMe(C,h,n)),m=TO(s,g,n),_=STt(c,g,n*1e3),f=_?TO(c,_,n):null;p&&!(m!==null&&f!==null&&m===f)&&(o[s.source_trace_id].push(g),s.source_trace_id!==c.source_trace_id&&o[c.source_trace_id].push(g))}for(const g of l)for(const h of s.edges)if(xTt(g,h.from,h.to,n)){const p=f$(c,g,n).some(C=>!BMe(h,C,n)),m=TO(c,g,n),_=STt(s,g,n*1e3),f=_?TO(s,_,n):null;p&&!(f!==null&&m!==null&&f===m)&&(o[c.source_trace_id].push(g),s.source_trace_id!==c.source_trace_id&&o[s.source_trace_id].push(g))}}}}for(const r of Object.keys(o))o[r]=ETt(o[r],n);return o}var bw=1e-6;function vDo(t,e,n=bw){const o=t.to.x-t.from.x,i=t.to.y-t.from.y,r=e.to.x-e.from.x,s=e.to.y-e.from.y,a=Math.hypot(o,i),A=Math.hypot(r,s);if(a<=n||A<=n)return!1;const c=o*s-i*r;if(Math.abs(c)>n*a*A)return!1;const l=o*(e.from.y-t.from.y)-i*(e.from.x-t.from.x);return Math.abs(l)<=n*a}function wDo(t,e){const n=yTt(e);if(n.length===0)return[t];const o=uR(t.from,t.to);if(o<=bw)return[t];const i=[];let r=0;for(const s of n)s.start-r>bw&&i.push({from:gR(t.from,t.to,r/o),to:gR(t.from,t.to,s.start/o)}),s.end-s.start>bw&&i.push({from:gR(t.from,t.to,s.start/o),to:gR(t.from,t.to,s.end/o),is_crossing:!0}),r=Math.max(r,s.end);return o-r>bw&&i.push({from:gR(t.from,t.to,r/o),to:t.to}),i}function PDo(t){const e=new Map;for(let n=0;n<t.length;n++){const o=t[n];if(o.connectivity_key){for(const i of o.edges)if(!(!i.is_crossing||uR(i.from,i.to)<=bw))for(let r=0;r<t.length;r++){const s=t[r];if(!(r===n||s.connectivity_key!==o.connectivity_key))for(let a=0;a<s.edges.length;a++){const A=s.edges[a],c=uR(A.from,A.to);if(A.is_crossing||c<=bw||!vDo(A,i))continue;const l=Math.max(0,Math.min(RO(A.from,A.to,i.from),RO(A.from,A.to,i.to))),u=Math.min(c,Math.max(RO(A.from,A.to,i.from),RO(A.from,A.to,i.to)));if(u-l<=bw)continue;const g=`${r}:${a}`,h=e.get(g)??[];h.push({start:l,end:u}),e.set(g,h)}}}}return e.size===0?t:t.map((n,o)=>({...n,edges:n.edges.flatMap((i,r)=>{const s=e.get(`${o}:${r}`);return s?wDo(i,s):[i]})}))}var Due=vc("Group_doInitialSchematicTraceRender"),MDo=1.5;function DDo(t,e){const{points:n,schematicPortIds:o,componentBoundsByPortId:i}=t,r=o.map(h=>{const d=e.schematic_port.get(h)?.center,p=i.get(h);return!d||!p?null:{center:d,bounds:p}}).filter(h=>!!h);if(r.length===0)return n;const s=n.map(h=>({x:h.x,y:h.y})),a=(h,d)=>(h.x-d.x)**2+(h.y-d.y)**2,A=new Set;for(let h=0;h<r.length;h++)s.some(d=>a(r[h].center,d)<=1e-12)&&A.add(h);const c=.001,l=["start","end"],u=[];for(const h of l){const d=h==="start"?s[0]:s[s.length-1];for(let p=0;p<r.length;p++){if(A.has(p))continue;const{center:m,bounds:_}=r[p],f=a(m,d);Math.abs(m.x-d.x)>c&&Math.abs(m.y-d.y)>c||f>MDo**2&&BQn(d,_)>c||u.push({endpoint:h,centerIndex:p,dist:f})}}u.sort((h,d)=>h.dist-d.dist);const g=new Set;for(const{endpoint:h,centerIndex:d,dist:p}of u){if(g.has(h)||A.has(d)||(A.add(d),g.add(h),p<=1e-12))continue;const m=r[d].center;h==="start"?s.unshift({x:m.x,y:m.y}):s.push({x:m.x,y:m.y})}return s}function NDo(t){const{group:e,solver:n,userNetIdToConnKey:o,schematicPortIdsWithPreExistingNetLabels:i}=t,{db:r}=e.root,s=new Set(e.selectAll("port").filter(_=>{if(!_._getSymbolAncestor())return!1;const f=_.getParentNormalComponent()?._parsedProps.symbol;return ee.isValidElement(f)||aPe(f)}).map(_=>_.schematic_port_id).filter(_=>_!=null).map(Am)),a=new Map;for(const _ of r.schematic_component.list()){const f=vue({db:r,schematicComponent:_}),I=Ey({center:_.center,width:_.size.width,height:_.size.height});for(const C of r.schematic_port.list({schematic_component_id:_.schematic_component_id})){const y=C.center.x>I.minX&&C.center.x<I.maxX&&C.center.y>I.minY&&C.center.y<I.maxY,x=Am(C.schematic_port_id);!f&&!s.has(x)||!f&&y||a.set(x,f??I)}}const A=n.inlineNetLabelSolver?.getOutput().traces??n.sameNetJunctionAlignmentSolver?.getOutput().traces??n.netLabelTraceCollisionSolver?.getOutput().traces??n.traceCleanupSolver?.getOutput().traces??n.traceLabelOverlapAvoidanceSolver?.getOutput().traces??n.schematicTraceLinesSolver?.solvedTracePaths,c=[];Due(`Traces inside SchematicTraceSolver output: ${(A??[]).length}`);for(const _ of A??[]){const I=Array.from(new Set(_.pinIds??[])).map(Am);if(I.length>0&&I.every(M=>i.has(M))){Due(`Skipping solver netlabel-covered trace ${_?.mspPairId} because all schematic ports already have netlabels`);continue}const y=_?.tracePath;if(!Array.isArray(y)||y.length<2){Due(`Skipping trace ${_?.pinIds.join(",")} because it has less than 2 points`);continue}const x=DDo({points:y,schematicPortIds:I,componentBoundsByPortId:a},r),E=[];for(let M=0;M<x.length-1;M++)E.push({from:{x:x[M].x,y:x[M].y},to:{x:x[M+1].x,y:x[M+1].y}});const B=String(_?.mspPairId);let S;if(Array.isArray(_?.pins)&&_.pins.length===2){const M=_.pins[0]?.pinId,k=_.pins[1]?.pinId,R=M?Am(M):void 0,F=k?Am(k):void 0;if(R&&F){const O=new Set([R,F]);for(const U of O)r.schematic_port.update(U,{is_connected:!0});S=o.get(String(_.userNetId))}}if(S||(S=o.get(String(_.userNetId))),!S){const M=I.map(R=>{const O=r.schematic_port.get(R)?.source_port_id;if(O)return r.source_port.get(O)?.subcircuit_connectivity_map_key}).filter(R=>!!R);new Set(M).size===1&&(S=M[0])}const Q=new Set(I.map(M=>r.schematic_port.get(M)?.schematic_sheet_id).filter(M=>!!M));let w;Q.size===1?w=Q.values().next().value:Q.size===0&&(w=e._resolveSchematicSheetId()),c.push({source_trace_id:B,edges:E,subcircuit_connectivity_map_key:S,schematic_sheet_id:w})}Due(`Applying ${c.length} traces from SchematicTraceSolver output`);const l=bDo(c.map(_=>({source_trace_id:_.source_trace_id,edges:_.edges,connectivity_key:_.subcircuit_connectivity_map_key}))),u=[],g=e._resolveSchematicSheetId();for(const _ of r.schematic_trace.list()){if(_.edges.length===0||_.schematic_sheet_id!==g)continue;const f=_.source_trace_id?r.source_trace.get(_.source_trace_id):void 0;u.push({schematic_trace_id:_.schematic_trace_id,source_trace_id:_.source_trace_id??_.schematic_trace_id,edges:_.edges,connectivity_key:_.subcircuit_connectivity_map_key??f?.subcircuit_connectivity_map_key})}const h=PDo([...l,...u]),d=h.slice(0,l.length),p=h.slice(l.length);for(const _ of p)_.schematic_trace_id&&r.schematic_trace.update(_.schematic_trace_id,{edges:_.edges});const m=QDo([...d,...p]);for(const _ of d){const f=c.find(C=>C.source_trace_id===_.source_trace_id);let I=g;f?.schematic_sheet_id&&(I=f.schematic_sheet_id),r.schematic_trace.insert({source_trace_id:_.source_trace_id,edges:_.edges,junctions:m[_.source_trace_id]??[],subcircuit_connectivity_map_key:f?.subcircuit_connectivity_map_key,schematic_sheet_id:I})}}var QTt=.12,vTt=(t,e)=>{t.anchoredNetLabelWidth??=Number(vb({text:e}).toFixed(2)),t.allowInlineNetLabel=!0,t.inlineNetLabelHeight=QTt,t.inlineNetLabelWidth=Number(vb({text:e,font_size:QTt}).toFixed(2))},RDo=({directConnections:t,netConnections:e,connKeyToSchematicPortIds:n,connKeyToSourceNet:o,connKeysWithExplicitPortNetTraces:i,schematicPortIdsWithExplicitNetLabels:r,schematicPortIdsWithInlineNetLabels:s,areSchematicPortsOnDifferentComponents:a,resolveCanonicalNetLabelText:A})=>{for(const c of t){const{connKey:l}=c;if(!l||n.get(l)?.length!==2)continue;const g=o.get(l);if(g?.is_power||g?.is_ground)continue;const{name:h,wasAssignedDisplayLabel:d}=A({subcircuitConnectivityMapKey:l});!h||!d||vTt(c,h)}for(const c of e){const{schematicPortIds:l}=c,{isSameSheetCrossSectionConnection:u}=c,g=l.some(C=>s.has(C)),h=l.length===1,d=l[0],p=d!==void 0&&l.slice(1).some(C=>a([d,C]));if(!g&&!u&&!h&&!p||!g&&l.some(C=>r.has(C)))continue;const{connKey:m}=c;if(!m&&!u||m&&!u&&!i.has(m))continue;const _=m?o.get(m):void 0;if(!g&&(c.isPowerOrGroundConnection||_?.is_power||_?.is_ground))continue;let f=c.netLabelText??"",I=!!f;if(!u){if(!m)continue;const C=A({subcircuitConnectivityMapKey:m});f=C.name,I=C.wasAssignedDisplayLabel}!f||!g&&!I||vTt(c,f)}},TDo=t=>{const{schX:e,schY:n}=t._parsedProps;if(e!==void 0&&n!==void 0||!t.getParentNormalComponent()?.getSchematicSymbol())return t;const o=t._getPortsInternallyConnectedToThisPort(),i=t.schematicSymbolPortDef??o.find(r=>r.schematicSymbolPortDef)?.schematicSymbolPortDef;return i?o.find(r=>r.schematicSymbolPortDef===i)??t:t};function kDo(t){const{db:e}=t.root,n=new Map;for(const o of t.selectAll("port")){if(!o.schematic_port_id)continue;const i=e.schematic_port.get(o.schematic_port_id),r=TDo(o),s=r.schematic_port_id?e.schematic_port.get(r.schematic_port_id):void 0;!i||!s||i.schematic_component_id!==s.schematic_component_id||i.schematic_sheet_id!==s.schematic_sheet_id||n.set(Am(i.schematic_port_id),Am(s.schematic_port_id))}return n}var wTt=({db:t,sourcePortId:e,otherSourcePortId:n,sourcePortIdsInSchematicScope:o,schematicSheetId:i})=>{if(o.has(n))return!1;const r=t.source_port.get(e),s=t.source_port.get(n);if(!r||!s)return!1;if(r.subcircuit_id!==s.subcircuit_id)return!0;if(!i)return!1;const a=t.schematic_port.list({source_port_id:n});return a.some(c=>c.schematic_sheet_id===i)?!1:a.some(c=>c.schematic_sheet_id!==void 0)},PTt=({db:t,sourcePortId:e,sourcePortIdsInSchematicScope:n,schematicSheetId:o})=>{if(t.source_port.get(e))for(const i of t.source_trace.list()){const r=(i.connected_source_port_ids??[]).map(NO);if(r.length!==2||(i.connected_source_net_ids??[]).length>0||!r.includes(e))continue;const s=r.find(a=>a!==e);if(s&&wTt({db:t,sourcePortId:e,otherSourcePortId:s,sourcePortIdsInSchematicScope:n,schematicSheetId:o}))return s}},MTt=({group:t,sourcePortId:e,connectedSourcePortIdsForKey:n,sourcePortIdsInSchematicScope:o,schematicSheetId:i,connKey:r,sourceNet:s})=>{const{db:a}=t.root,A=t.selectAll("port").filter(m=>m._getSubcircuitConnectivityKey()===r),{name:c,wasAssignedDisplayLabel:l}=xMe(A),u=l?c:void 0,g=l?void 0:c||void 0,h=Vwe(a,n),d=PTt({db:a,sourcePortId:e,sourcePortIdsInSchematicScope:o,schematicSheetId:i}),p=d?xMt(a,d):void 0;return{text:s?.name||s?.source_net_id||u||p||g||h||r,wasAssignedDisplayLabel:l,directConnectionOutsideSchematicScopeSourcePortId:d}},FDo=.18;function LDo(t){const e=t.font_size??FDo,n=ATt({text:t.text??"",fontSize:e}),o=e,i=t.anchor??"center";let r,s;i.includes("left")?(r=0,s=n):i.includes("right")?(r=-n,s=0):(r=-n/2,s=n/2);let a,A;i.includes("top")?(a=-o,A=0):i.includes("bottom")?(a=0,A=o):(a=-o/2,A=o/2);const c=(t.rotation??0)*Math.PI/180,l=Math.cos(c),u=Math.sin(c),g=[{x:r,y:a},{x:r,y:A},{x:s,y:a},{x:s,y:A}].map(h=>({x:t.position.x+h.x*l-h.y*u,y:t.position.y+h.x*u+h.y*l}));return Oh(g)}var HDo=.01,bMe=.06;function ODo(t,e){return e?t.text===e.display_name||t.text===e.name:!1}function GDo(t,e={}){if(!t.text)return null;const n=LDo(t);if(ODo(t,e.sourceComponent)&&e.schematicComponent?.center&&e.schematicComponent?.size){const o=Ey({center:e.schematicComponent.center,width:e.schematicComponent.size.width,height:e.schematicComponent.size.height}),i=n.maxY-n.minY;n.minY>o.maxY&&(n.minX-=bMe,n.maxX+=bMe,n.minY=o.maxY-HDo,n.maxY=o.maxY+i+bMe)}return{chipId:t.schematic_component_id,center:oD(n),width:n.maxX-n.minX,height:n.maxY-n.minY,text:t.text}}var DTt=2.4,YDo=.42;function UDo(t,e={}){const{db:n}=t.root,o=kDo(t),i=Qe=>o.get(Qe)??Qe,r=Mxe(n.toArray()),s=Qe=>{const Pe=[...r.getIdsConnectedToNet(Qe)].sort()[0];return Pe?`source_connectivity_${Pe}`:`source_${Qe}`},a=Qe=>{const Pe=[...Qe.connected_source_port_ids,...Qe.connected_source_net_ids].map(we=>r.getNetConnectedToId(we)).find(we=>!!we);return Pe?s(Pe):Qe.subcircuit_connectivity_map_key??Qe.source_trace_id},A=new Set;for(const Qe of n.source_net.list()){if(!Qe.is_power&&!Qe.is_ground)continue;const Pe=r.getNetConnectedToId(Qe.source_net_id);Pe&&A.add(s(Pe))}const c=new Map,l=[],u=[...t.children].reverse();for(;u.length>0;){const Qe=u.pop();if(Qe instanceof A6){if(Qe.isSubcircuit){Qe._parsedProps.showAsSchematicBox&&l.push(Qe);continue}l.push(Qe)}u.push(...[...Qe.children].reverse())}const g=[t.schematic_group_id,...l.map(Qe=>Qe.schematic_group_id)],h=n.schematic_component.list().filter(Qe=>g.includes(Qe.schematic_group_id)).filter(Qe=>e.schematicSheetId===void 0||Qe.schematic_sheet_id===e.schematicSheetId),d=new Set(h.map(Qe=>Qe.schematic_component_id)),p=new Map(h.map(Qe=>[Qe.schematic_component_id,Qe])),m=n.schematic_text.list().filter(Qe=>Qe.schematic_component_id&&d.has(Qe.schematic_component_id)).map(Qe=>{const Pe=p.get(Qe.schematic_component_id);if(!Pe)return;const we=n.source_component.get(Pe.source_component_id);return GDo(Qe,{schematicComponent:Pe,sourceComponent:we})}).filter(Qe=>!!Qe),_=new Map,f=t._getBoard()?.getDescendants()??[];for(const Qe of f){const Pe=Qe.schematic_component_id,we=Qe.getSchematicSectionName();Pe&&we&&_.set(Pe,we)}const I=[];for(const Qe of h){const Pe=Qe.schematic_component_id,Te=n.schematic_port.list({schematic_component_id:Qe.schematic_component_id}).filter(ke=>{const Ce=Am(ke.schematic_port_id);return i(Ce)===Ce}).map(ke=>{const Ce=Am(ke.schematic_port_id),Le=ke.source_port_id?n.source_port.get(ke.source_port_id):void 0;return{pinId:Ce,displayName:ke.display_pin_label??ke.pin_number?.toString()??Le?.name,x:ke.center.x,y:ke.center.y,_facingDirection:D0e(ke.facing_direction??null)}}),Re=_.get(Qe.schematic_component_id),Ee=vue({db:n,schematicComponent:Qe})??Ey({center:Qe.center,width:Qe.size.width,height:Qe.size.height});I.push({chipId:Pe,center:oD(Ee),width:Ee.maxX-Ee.minX,height:Ee.maxY-Ee.minY,pins:Te,sectionId:Re})}const C=new Set,y=new Map,x=new Map,E=new Map,B=new Map(t.selectAll("port").filter(Qe=>Qe.schematic_port_id).map(Qe=>[Am(Qe.schematic_port_id),Qe])),S=EMe(t);for(const Qe of h){const Pe=n.schematic_port.list({schematic_component_id:Qe.schematic_component_id});for(const we of Pe){const Te=Am(we.schematic_port_id);if(C.add(Te),we.source_port_id){const Re=NO(we.source_port_id);y.set(Te,Re),x.set(Re,Te)}}}const Q=new Set(x.keys()),w=(e.netLabels??[]).filter(Qe=>Qe._getConnectedPorts().some(Pe=>Pe.schematic_port_id?C.has(Am(Pe.schematic_port_id)):!1)),M=new Set(w.filter(Qe=>!Qe._parsedProps.inline).flatMap(Qe=>Qe._getConnectedPorts()).map(Qe=>Qe.schematic_port_id).filter(Qe=>Qe!=null).map(Am).map(i)),k=new Set(w.filter(Qe=>Qe._parsedProps.inline||Qe._parsedProps.schX===void 0&&Qe._parsedProps.schY===void 0).flatMap(Qe=>Qe._getConnectedPorts()).map(Qe=>Qe.schematic_port_id).filter(Qe=>Qe!=null).map(Am).map(i)),R=new Set(w.filter(Qe=>Qe._parsedProps.inline).flatMap(Qe=>Qe._getConnectedPorts()).map(Qe=>Qe.schematic_port_id).filter(Qe=>Qe!=null).map(Am).map(i)),F=new Set;t.subcircuit_id&&F.add(t.subcircuit_id);for(const Qe of l)Qe.subcircuit_id&&F.add(Qe.subcircuit_id);const O=n.source_trace.list().filter(Qe=>{if(Qe.subcircuit_id===t.subcircuit_id)return!0;for(const Pe of Qe.connected_source_port_ids)if(x.has(NO(Pe)))return!0;return!1}),U=new Set;for(const Qe of O)if(Qe.subcircuit_id!==t.subcircuit_id&&Qe.connected_source_net_ids.length!==0)for(const Pe of Qe.connected_source_port_ids){const we=NO(Pe),Te=x.get(we);!Te||k.has(Te)||!n.schematic_port.list({source_port_id:Pe}).some(Ee=>Ee.schematic_port_id===Te?!1:(Ee.schematic_component_id?n.schematic_component.get(Ee.schematic_component_id):void 0)?.schematic_sheet_id===e.schematicSheetId)||U.add(Te)}const Y=O.flatMap(Qe=>Qe.connected_source_net_ids);for(const Qe of Y){const Pe=n.source_net.get(Qe);Pe?.subcircuit_id&&F.add(Pe.subcircuit_id)}for(const Qe of n.source_net.list().filter(Pe=>!Pe.subcircuit_id||F.has(Pe.subcircuit_id)))Qe.subcircuit_connectivity_map_key&&c.set(Qe.subcircuit_connectivity_map_key,Qe);const W=[],te=[],j=new Set,J=new Map,oe=new Map,ie=({schematicPortId:Qe,netId:Pe,sourceTraceId:we,replaceExisting:Te=!1})=>{const Re=J.get(Qe)??new Map;return Re.has(Pe)&&!Te?!1:(Re.set(Pe,we),J.set(Qe,Re),!0)},ne=({sourceConnectivityNetId:Qe,schematicPortId:Pe,text:we,sourceTraceId:Te,connKey:Re,preferInScopeTraceMetadata:Ee=!1})=>{const ke=Qe;if(ie({schematicPortId:Pe,netId:ke,sourceTraceId:Te,replaceExisting:Ee}),M.has(Pe))return;let Ce=oe.get(Qe);Ce?Ee&&(Ce.netLabelText=we,Ce.netLabelWidth=Number(vb({text:we}).toFixed(2)),Ce.connKey=Re??Ce.connKey):(Ce={netId:ke,netLabelText:we,schematicPortIds:[],netLabelWidth:Number(vb({text:we}).toFixed(2)),connKey:Re,isSameSheetCrossSectionConnection:!0,isPowerOrGroundConnection:A.has(ke)},oe.set(Qe,Ce),te.push(Ce)),Ce.schematicPortIds.includes(Pe)||Ce.schematicPortIds.push(Pe)},le=new Map,ge=new Map,_e=new Set;for(const Qe of O)Qe?.subcircuit_connectivity_map_key&&(Qe.connected_source_port_ids?.length??0)>0&&(Qe.connected_source_net_ids?.length??0)>0&&_e.add(Qe.subcircuit_connectivity_map_key);const ue=(Qe,Pe)=>{const we=n.schematic_port.get(Qe),Te=n.schematic_port.get(Pe);if(!we||!Te||!(we.schematic_sheet_id===Te.schematic_sheet_id))return!1;const Ee=we.schematic_component_id?_.get(we.schematic_component_id):void 0,ke=Te.schematic_component_id?_.get(Te.schematic_component_id):void 0;return Ee!==ke&&(Ee!==void 0||ke!==void 0)},fe=({schematicPortId:Qe,otherSourcePortId:Pe})=>n.schematic_port.list({source_port_id:Pe}).some(we=>ue(Qe,Am(we.schematic_port_id)));for(const Qe of O){const Pe=Array.from(new Set((Qe.connected_source_port_ids??[]).map(ke=>x.get(NO(ke))).filter(ke=>!!ke&&C.has(ke)).map(i))),we=Pe.length===1?y.get(Pe[0]):void 0,Te=we?Qe.connected_source_port_ids.map(NO).find(ke=>ke!==we):void 0,Re=!!(we&&Te&&wTt({db:n,sourcePortId:we,otherSourcePortId:Te,sourcePortIdsInSchematicScope:Q,schematicSheetId:e.schematicSheetId})),Ee=!!(Pe.length===1&&Te&&fe({schematicPortId:Pe[0],otherSourcePortId:Te}));if(Pe.length===1&&Qe.connected_source_port_ids.length===2&&Re&&Qe.connected_source_net_ids.length===0&&Qe.subcircuit_connectivity_map_key){const ke=Pe[0],Ce=y.get(ke);if(Ce){const Le=Qe.subcircuit_connectivity_map_key,Ye=n.source_port.get(Ce)?.subcircuit_connectivity_map_key,tt=n.source_net.list().find(gt=>gt.subcircuit_id===t.subcircuit_id&&r.areIdsConnected(gt.source_net_id,Ce)),At=c.get(Le)??(Ye?c.get(Ye):void 0)??tt,at=Array.from(C).map(gt=>y.get(gt)).filter(gt=>gt?n.source_port.get(gt)?.subcircuit_connectivity_map_key===Le:!1),{text:nt}=MTt({group:t,sourcePortId:Ce,connectedSourcePortIdsForKey:at,sourcePortIdsInSchematicScope:Q,schematicSheetId:e.schematicSheetId,connKey:Le,sourceNet:At});if(nt){const gt=a(Qe);E.has(gt)||E.set(gt,Le),Ee?ne({sourceConnectivityNetId:gt,schematicPortId:ke,text:nt,sourceTraceId:Qe.source_trace_id,connKey:Le}):ie({schematicPortId:ke,netId:gt,sourceTraceId:Qe.source_trace_id})&&te.push({netId:gt,netLabelText:nt,schematicPortIds:[ke],netLabelWidth:Number(vb({text:nt}).toFixed(2)),connKey:Le})}}}else if(Pe.length>=2){for(const gt of Pe){const bt=le.get(gt)??new Set;bt.add(Qe.source_trace_id),le.set(gt,bt)}const ke=Qe.name??Qe.display_name,Ce=ke??Qe.source_trace_id;Qe.subcircuit_connectivity_map_key&&E.set(Ce,Qe.subcircuit_connectivity_map_key);const Le=t._parsedProps.schMaxTraceDistance??DTt,Ye=Pe.map(gt=>B.get(gt)).filter(gt=>!!gt),tt=Qe.subcircuit_connectivity_map_key?S({subcircuitConnectivityMapKey:Qe.subcircuit_connectivity_map_key}).name:xMe(Ye).name||ke,At=Pe.slice(1).some((gt,bt)=>{const Ct=Pe[bt],Dt=n.schematic_port.get(Ct),kt=n.schematic_port.get(gt);return!Dt||!kt?!1:Math.sqrt((Dt.center.x-kt.center.x)**2+(Dt.center.y-kt.center.y)**2)>Le}),at=tt&&At?Number(vb({text:tt}).toFixed(2)):void 0,nt=tt;for(let gt=0;gt<Pe.length-1;gt++){const bt=Pe[gt],Ct=Pe[gt+1],Dt=[bt,Ct].sort().join("::");if(!j.has(Dt)){if(j.add(Dt),nt&&ue(bt,Ct)){const kt=a(Qe);Qe.subcircuit_connectivity_map_key&&E.set(kt,Qe.subcircuit_connectivity_map_key),ne({sourceConnectivityNetId:kt,schematicPortId:bt,text:nt,sourceTraceId:Qe.source_trace_id,connKey:Qe.subcircuit_connectivity_map_key,preferInScopeTraceMetadata:!0}),ne({sourceConnectivityNetId:kt,schematicPortId:Ct,text:nt,sourceTraceId:Qe.source_trace_id,connKey:Qe.subcircuit_connectivity_map_key,preferInScopeTraceMetadata:!0});continue}ge.set(Dt,Qe.source_trace_id),W.push({schematicPortIds:[bt,Ct],netId:Ce,netLabelWidth:at,connKey:Qe.subcircuit_connectivity_map_key})}}}}const pe=[...te],ye=new Map;for(const[Qe,Pe]of y){if(U.has(Qe))continue;const we=n.source_port.get(Pe);if(!we?.subcircuit_connectivity_map_key)continue;const Te=we.subcircuit_connectivity_map_key;ye.has(Te)||ye.set(Te,[]);const Re=i(Qe),Ee=ye.get(Te);Ee.includes(Re)||Ee.push(Re)}for(const[Qe,Pe]of ye){const we=c.get(Qe);if(we&&Pe.length>=1){const Te=String(we.name||we.source_net_id||Qe);E.set(Te,Qe);const Re=Number(vb({text:String(Te)}).toFixed(2));let Ee=Re,ke;(we.is_ground||we.is_power)&&(Ee=YDo,ke=Re),pe.push({netId:Te,schematicPortIds:Pe,isGround:we.is_ground,netLabelWidth:Ee,netLabelHeight:ke,connKey:Qe})}}RDo({directConnections:W,netConnections:pe,connKeyToSchematicPortIds:ye,connKeyToSourceNet:c,connKeysWithExplicitPortNetTraces:_e,schematicPortIdsWithExplicitNetLabels:M,schematicPortIdsWithInlineNetLabels:R,areSchematicPortsOnDifferentComponents:Qe=>{const Pe=Qe.map(we=>n.schematic_port.get(we)?.schematic_component_id);return Pe.every(we=>!!we)&&Pe[0]!==Pe[1]},resolveCanonicalNetLabelText:S});const Me=(()=>{const Qe={},Pe=new Set(pe.map(we=>we.netId));for(const we of n.source_net.list().filter(Te=>!Te.subcircuit_id||F.has(Te.subcircuit_id)))we.name&&Pe.has(we.name)&&(we.is_ground?Qe[we.name]=["y-"]:we.is_power?Qe[we.name]=["y+"]:Qe[we.name]=["x-","x+"]);for(const{netId:we}of te)Qe[we]??=["x-","x+"];return Qe})(),ve={chips:I,directConnections:W.map(({schematicPortIds:Qe,connKey:Pe,...we})=>({...we,pinIds:Qe})),netConnections:pe.map(({schematicPortIds:Qe,connKey:Pe,isSameSheetCrossSectionConnection:we,isPowerOrGroundConnection:Te,...Re})=>({...Re,pinIds:Qe})),textBoxes:m,availableNetLabelOrientations:Me,maxMspPairDistance:t._parsedProps.schMaxTraceDistance??DTt},he=new Map(Array.from(le).flatMap(([Qe,Pe])=>Pe.size!==1?[]:[[Qe,Pe.values().next().value]]));return{inputProblem:ve,routedSchematicPortIdBySchematicPortId:o,connKeyToSourceNet:c,userNetIdToConnKey:E,crossScopeSourceTraceIdBySchematicPortIdAndNetId:J,sourceTraceIdByPortOnlyLabelSchematicPortId:he,connKeysWithExplicitPortNetTraces:_e,schematicPortIdsInScope:C,schematicPortIdsWithExternallyRoutedRepresentations:U,schPortIdToSourcePortId:y,netLabelsInScope:w,sourceTraceIdByPinPairKey:ge}}var KDo=(t,e)=>{const n=new Set;for(const o of t){const{inline:i,schX:r,schY:s}=o._parsedProps;if(i||r===void 0&&s===void 0)continue;const a=o._getConnectedPorts();for(const A of a)A.schematic_port_id&&n.add(e.get(Am(A.schematic_port_id))??Am(A.schematic_port_id))}return n},VDo=({solver:t})=>{const e=t.traceCleanupSolver?.getOutput().traces??t.traceLabelOverlapAvoidanceSolver?.getOutput().traces??t.schematicTraceLinesSolver?.solvedTracePaths??[],n=new Set;for(const o of e){const i=o?.tracePath;if(!Array.isArray(i)||i.length<2)continue;const r=Array.isArray(o.pins)?o.pins.map(s=>s.pinId):o.pinIds;for(const s of r){const a=Am(s);a&&n.add(a)}}return n},NTt=.5,Nue=.1,RTt=t=>{const{nl:e,connKey:n,sourceNet:o,text:i}=t;return o?.source_net_id&&e.source_net_id?e.source_net_id===o.source_net_id:e.source_net_id?e.source_net_id===n:e.text===i},TTt=({schematicPortIdsInScope:t,schematicPortIdsWithExternallyRoutedRepresentations:e,group:n,schPortIdToSourcePortId:o,connKeyToSourceNet:i})=>{const{db:r}=n.root,s=new Set(Array.from(t).map(a=>o.get(a)).filter(a=>a!==void 0));for(const a of t){if(e.has(a))continue;const A=r.schematic_port.get(a);if(!A||A.is_connected)continue;const c=o.get(a);if(!c)continue;const l=r.source_port.get(c);if(n._parsedProps.showAsSchematicBox&&l?.subcircuit_id===n.subcircuit_id&&!l.source_component_id&&PTt({db:r,sourcePortId:c,sourcePortIdsInSchematicScope:s,schematicSheetId:A.schematic_sheet_id}))continue;const u=l?.subcircuit_connectivity_map_key;if(!u)continue;const g=i.get(u),h=A.schematic_component_id?r.schematic_component.get(A.schematic_component_id):void 0,d=h?.schematic_sheet_id??n._resolveSchematicSheetId(),p=Array.from(t).map(F=>o.get(F)).filter(F=>F?r.source_port.get(F)?.subcircuit_connectivity_map_key===u:!1),{text:m,wasAssignedDisplayLabel:_,directConnectionOutsideSchematicScopeSourcePortId:f}=MTt({group:n,sourcePortId:c,connectedSourcePortIdsForKey:p,sourcePortIdsInSchematicScope:s,schematicSheetId:A.schematic_sheet_id,connKey:u,sourceNet:g}),C=f?r.schematic_port.list({source_port_id:f}).some(F=>!F.is_connected):!1,y=h?.is_box_with_pins&&l&&!l.source_component_id,x=r.source_trace.list().some(F=>F.connected_source_port_ids.includes(c)&&F.subcircuit_id!==l?.subcircuit_id);if(y&&!x&&!!!(g||_))continue;const B=Array.from(t).filter(F=>{const O=o.get(F);return O?r.source_port.get(O)?.subcircuit_connectivity_map_key===u:!1}).length,S=g?.is_ground??!1,Q=!S&&(g?.is_power??!1);let w;S?w="top":Q?w="bottom":w=gO(A.facing_direction||"right")||"right";const M=j7({anchor_position:A.center,anchor_side:w,text:m}),k=r.schematic_net_label.list().find(F=>F.schematic_sheet_id!==d?!1:RTt({nl:F,connKey:u,sourceNet:g,text:m}));if(k&&B<=1&&!C){r.schematic_net_label.update(k.schematic_net_label_id,{text:m,anchor_position:A.center,center:M,anchor_side:w});continue}if(k){const F=k.anchor_position.x-A.center.x,O=k.anchor_position.y-A.center.y;if(F*F+O*O<NTt*NTt){if(S){const W=k.anchor_side??w;r.schematic_net_label.update(k.schematic_net_label_id,{text:m,anchor_position:A.center,center:j7({anchor_position:A.center,anchor_side:W,text:m}),anchor_side:W})}else if(!Q&&k.text===m){const W=k.anchor_side??w;r.schematic_net_label.update(k.schematic_net_label_id,{text:m,anchor_position:A.center,center:j7({anchor_position:A.center,anchor_side:W,text:m}),anchor_side:W})}continue}if(r.schematic_net_label.list().some(W=>{if(W.schematic_sheet_id!==d)return!1;const te=W.anchor_position.x-A.center.x,j=W.anchor_position.y-A.center.y;return te*te+j*j>=Nue*Nue?!1:RTt({nl:W,connKey:u,sourceNet:g,text:m})}))continue}if(!g&&!C)for(const F of r.schematic_net_label.list()){if(F.source_net_id!==u||F.schematic_sheet_id!==d)continue;p.some(U=>{const Y=Array.from(o.entries()).find(([,J])=>J===U)?.[0];let W;if(Y&&(W=r.schematic_port.get(Y)),!W?.center||!F.anchor_position)return!1;const te=F.anchor_position.x-W.center.x,j=F.anchor_position.y-W.center.y;return te*te+j*j<Nue*Nue})||r.schematic_net_label.delete(F.schematic_net_label_id)}const R={text:m,source_net_id:g?.source_net_id??u,anchor_position:A.center,center:M,anchor_side:w,schematic_sheet_id:d};r.schematic_net_label.insert(R)}},zDo=vc("Group_doInitialSchematicTraceRender"),kTt=({group:t,schematicSheetId:e,netLabels:n})=>{const{inputProblem:o,routedSchematicPortIdBySchematicPortId:i,connKeyToSourceNet:r,schematicPortIdsInScope:s,schematicPortIdsWithExternallyRoutedRepresentations:a,schPortIdToSourcePortId:A,userNetIdToConnKey:c,crossScopeSourceTraceIdBySchematicPortIdAndNetId:l,sourceTraceIdByPortOnlyLabelSchematicPortId:u,connKeysWithExplicitPortNetTraces:g,netLabelsInScope:h,sourceTraceIdByPinPairKey:d}=UDo(t,{schematicSheetId:e,netLabels:n});if(o.chips.length===0)return;const p=KDo(h,i);if(!(o.directConnections.length>0||o.netConnections.length>0)){TTt({group:t,schematicPortIdsInScope:s,schematicPortIdsWithExternallyRoutedRepresentations:a,schPortIdToSourcePortId:A,connKeyToSourceNet:r});return}zDo.enabled&&t.root?.emit("debug:logOutput",{type:"debug:logOutput",name:"group-trace-render-input-problem",content:JSON.stringify(o,null,2)});const _=new Ewt(o),f=_.getConstructorParams();t.root?.emit("solver:started",{type:"solver:started",solverName:"SchematicTracePipelineSolver",solverParams:f[0],solverConstructorArgs:f,componentName:t.getString()}),_.solve();const I=VDo({solver:_});NDo({group:t,solver:_,userNetIdToConnKey:c,schematicPortIdsWithPreExistingNetLabels:p}),EDo({group:t,routedSchematicPortIdBySchematicPortId:i,solver:_,connKeyToSourceNet:r,userNetIdToConnKey:c,crossScopeSourceTraceIdBySchematicPortIdAndNetId:l,sourceTraceIdByPortOnlyLabelSchematicPortId:u,connKeysWithExplicitPortNetTraces:g,schematicPortIdsWithPreExistingNetLabels:p,schematicPortIdsWithRoutedTraces:I,netLabels:h}),IDo({group:t,solver:_,userNetIdToConnKey:c,sourceTraceIdByPinPairKey:d,crossScopeSourceTraceIdBySchematicPortIdAndNetId:l});const{db:C}=t.root;for(const[y,x]of i)C.schematic_port.get(x)?.is_connected&&C.schematic_port.update(y,{is_connected:!0});TTt({group:t,schematicPortIdsInScope:s,schematicPortIdsWithExternallyRoutedRepresentations:a,schPortIdToSourcePortId:A,connKeyToSourceNet:r})},JDo=t=>{if(!t.root?._featureMspSchematicTraceRouting||!t.isSubcircuit||t.root?.schematicDisabled)return;const e=new Set,n=t._getBoard();let o=t;for(;o;){if(o instanceof A6)for(const a of o.selectAll("netlabel"))e.add(a);if(o===n)break;o=o.parent}const i=[...e],r=new Set([t,...t.getDescendants().filter(a=>a instanceof A6)].map(a=>a.schematic_group_id).filter(a=>!!a)),s=new Set(t.root.db.schematic_component.list().filter(a=>r.has(a.schematic_group_id)).map(a=>a.schematic_sheet_id).filter(a=>!!a));if(s.size===0){kTt({group:t,netLabels:i});return}for(const a of s)kTt({group:t,schematicSheetId:a,netLabels:i})};function WDo(t){const e=[];for(const n of t.printStatements){const o=n.match(/^\.PRINT\s+TRAN\s+(.+)$/i);if(o)for(const i of o[1].match(/V\(([^)]+)\)/g)??[]){const r=i.slice(2,-1);e.push(r.replace(",","-"))}}return e}var FTt=["rgb(0, 150, 0)","rgb(0, 0, 220)","rgb(220, 0, 0)","rgb(0, 160, 160)","rgb(180, 0, 180)","rgb(170, 140, 0)","rgb(220, 120, 0)","rgb(128, 128, 128)","rgb(100, 0, 180)","rgb(140, 70, 0)","rgb(220, 80, 120)","rgb(0, 120, 220)","rgb(0, 120, 120)","rgb(120, 0, 0)","rgb(0, 0, 132)","rgb(80, 80, 80)"],Rue=new Map,Tue=0;function jDo(t){if(Rue.has(t))return Rue.get(t);const e=FTt[Tue];return Tue=(Tue+1)%FTt.length,Rue.set(t,e),e}function $Do(){Rue.clear(),Tue=0}var qDo=()=>({async simulate(t){const e="spice-experiment-1",{circuit:n,tran:o}=r5o(t);return{simulationResultCircuitJson:s5o(o,n,e)}}}),SMe=t=>t.type==="simulation_transient_current_graph",LTt=t=>t.type==="simulation_dc_operating_point_current"||t.type==="simulation_dc_sweep_current_graph"||t.type==="simulation_ac_sweep_current_graph",HTt=t=>t.type==="simulation_dc_operating_point_voltage"||t.type==="simulation_dc_sweep_voltage_graph"||t.type==="simulation_ac_sweep_voltage_graph",QMe=t=>t.type==="simulation_transient_voltage_graph",XDo=t=>QMe(t)||SMe(t)||HTt(t)||LTt(t),ZDo=({simulationResult:t,simulationParameterSweepCoordinate:e})=>{if(!e||!XDo(t))return t;const n={...t},o=`${n.type}_id`;return Reflect.deleteProperty(n,o),n.simulation_parameter_sweep_coordinate=e,n},vMe=({circuitJson:t,sourceComponentId:e,isMatchingSourceComponent:n})=>{const o=t.find(i=>n(i)&&i.source_component_id===e);if(!o)throw new Error(`Parameter sweep target ${e} was not found`);return o},eNo=({circuitJson:t,parameterSweep:e,simulationParameterSweepCoordinate:n})=>{const o=structuredClone(t),i=n.parameter_value;if(e.parameter_type==="resistance"){const r=vMe({circuitJson:o,sourceComponentId:e.resistor_source_component_id,isMatchingSourceComponent:s=>s.type==="source_component"&&s.ftype==="simple_resistor"});return r.resistance=i,o}if(e.parameter_type==="capacitance"){const r=vMe({circuitJson:o,sourceComponentId:e.capacitor_source_component_id,isMatchingSourceComponent:s=>s.type==="source_component"&&s.ftype==="simple_capacitor"});return r.capacitance=i,o}if(e.parameter_type==="inductance"){const r=vMe({circuitJson:o,sourceComponentId:e.inductor_source_component_id,isMatchingSourceComponent:s=>s.type==="source_component"&&s.ftype==="simple_inductor"});return r.inductance=i,o}if(e.parameter_type==="voltage"){const r=o.find(a=>a.type==="source_net"&&a.name.toUpperCase()==="GND");if(!r||r.type!=="source_net")throw new Error("A voltage parameter sweep requires a GND net");const s={type:"simulation_voltage_source",simulation_voltage_source_id:`simulation_voltage_source_${n.simulation_parameter_sweep_id}_${n.sweep_index}`,is_dc_source:!0,positive_source_net_id:e.source_net_id,negative_source_net_id:r.source_net_id,voltage:i};return o.push(s),o}if(e.parameter_type==="current"){const r=new Set(o.filter(a=>a.type==="source_port"&&a.source_component_id===e.current_source_component_id).map(a=>a.source_port_id)),s=o.find(a=>a.type==="simulation_current_source"&&(a.is_dc_source?!!(a.positive_source_port_id&&r.has(a.positive_source_port_id)):!!(a.terminal1_source_port_id&&r.has(a.terminal1_source_port_id))));if(!s)throw new Error(`Current sweep target ${e.current_source_component_id} has no simulation source`);return s.current=i,o}throw new Error("Parameter sweep target is incomplete")},OTt=({circuitJson:t,simulationParameterSweepCoordinate:e})=>{const n=T4o(t);return{spiceNetlist:n,spiceString:n.toSpiceString(),simulationParameterSweepCoordinate:e}},tNo=({circuitJson:t,simulationExperimentId:e})=>{const n=t.find(o=>o.type==="simulation_parameter_sweep"&&o.simulation_experiment_id===e);return n?n.parameter_values.map((o,i)=>{const r={simulation_parameter_sweep_id:n.simulation_parameter_sweep_id,sweep_index:i,parameter_value:o,parameter_unit:n.parameter_unit};return OTt({circuitJson:eNo({circuitJson:t,parameterSweep:n,simulationParameterSweepCoordinate:r}),simulationParameterSweepCoordinate:r})}):[OTt({circuitJson:t})]},nNo={p:1e-12,n:1e-9,u:1e-6,µ:1e-6,m:.001,"":1,k:1e3,K:1e3,M:1e6,G:1e9},Sw=t=>{if(t===void 0)return;if(typeof t=="number")return t;const n=t.trim().match(/^([+-]?(?:\d+(?:\.\d*)?|\.\d+))\s*([pnumµkKMG]?)/);if(!n)return;const o=Number(n[1]);if(Number.isFinite(o))return o*(nNo[n[2]??""]??1)},oNo=t=>{const{graphDisplayName:e,graphCenter:n,graphVerticalOffset:o,graphVoltagePerDiv:i}=t._parsedProps;return{displayName:e,color:t.color??void 0,center:n,verticalOffset:Sw(o),valuePerDiv:Sw(i)}},iNo=t=>{const{color:e,graphDisplayName:n,graphCenter:o,graphVerticalOffset:i,graphCurrentPerDiv:r}=t._parsedProps;return{displayName:n,color:e,center:o,verticalOffset:Sw(i),valuePerDiv:Sw(r)}},rNo=t=>{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;for(const o of t)Number.isFinite(o)&&(e=Math.min(e,o),n=Math.max(n,o));return e===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY?null:{min:e,max:n}},sNo=t=>t.type==="simulation_transient_current_graph"?t.current_levels:t.voltage_levels,GTt=2,aNo=.8,ANo=({graph:t,index:e,graphCount:n})=>{const o=rNo(sNo(t));if(!o)return null;const i=(o.min+o.max)/2,r=o.max-o.min,s=r>0?r/(GTt*aNo):Math.max(Math.abs(i)/10,Number.EPSILON);return{display_center_value:i,display_center_offset_divs:((n-1)/2-e)*GTt,value_per_div:s}},cNo=t=>t!==void 0,lNo=t=>{const e=new Map;for(const n of t)n.simulation_voltage_probe_id&&e.set(n.simulation_voltage_probe_id,n);return e},uNo=t=>{const e=new Map;for(const n of t)n.simulation_current_probe_id&&e.set(n.simulation_current_probe_id,n);return e},gNo=({db:t,graphs:e,graphDisplayOverridesByProbeId:n})=>{if(e.length===0)return;const o=t.simulation_oscilloscope_trace.list(),i=lNo(o),r=uNo(o),s=new Set(o.flatMap(a=>[a.simulation_transient_voltage_graph_id,a.simulation_transient_current_graph_id]).filter(cNo));for(const[a,{type:A,graph:c}]of e.entries()){const l=ANo({graph:c,index:a,graphCount:e.length});if(!l)continue;const u=A==="voltage"?c.simulation_transient_voltage_graph_id:c.simulation_transient_current_graph_id;if(s.has(u))continue;const g=c.source_probe_id??void 0,h=g===void 0?void 0:A==="voltage"?i.get(g):r.get(g),d=g===void 0?void 0:n?.get(g),p=d?.valuePerDiv??l.value_per_div,m=d?.center??l.display_center_value,_=d?.verticalOffset!==void 0&&p!==0?d.verticalOffset/p:h?.display_center_offset_divs??l.display_center_offset_divs;t.simulation_oscilloscope_trace.insert({...A==="voltage"?{simulation_transient_voltage_graph_id:c.simulation_transient_voltage_graph_id,volts_per_div:p}:{simulation_transient_current_graph_id:c.simulation_transient_current_graph_id,amps_per_div:p},display_name:d?.displayName??h?.display_name,color:d?.color??h?.color??c.color,display_center_value:m,display_center_offset_divs:_})}},dNo=t=>!!(t&&typeof t=="object"&&"type"in t),vB=vc("tscircuit:core:Group_doInitialSimulationSpiceEngineRender"),hNo=({circuitJson:t,simulationExperimentId:e,voltageProbes:n,ammeters:o})=>{const i=new Set(n.map(s=>s.simulation_voltage_probe_id).filter(s=>!!s)),r=new Set(o.map(s=>s.simulation_current_probe_id).filter(s=>!!s));return t.filter(s=>{if(s.type==="simulation_experiment")return s.simulation_experiment_id===e;if(s.type==="simulation_voltage_probe")return i.has(s.simulation_voltage_probe_id);if(s.type==="simulation_current_probe")return r.has(s.simulation_current_probe_id);if(s.type==="simulation_parameter_sweep")return s.simulation_experiment_id===e;if(s.type==="simulation_oscilloscope_trace"){if(s.simulation_voltage_probe_id)return i.has(s.simulation_voltage_probe_id);if(s.simulation_current_probe_id)return r.has(s.simulation_current_probe_id)}return!(s.type==="simulation_transient_voltage_graph"||s.type==="simulation_transient_current_graph"||s.type==="simulation_dc_operating_point_voltage"||s.type==="simulation_dc_operating_point_current"||s.type==="simulation_dc_sweep_voltage_graph"||s.type==="simulation_dc_sweep_current_graph"||s.type==="simulation_ac_sweep_voltage_graph"||s.type==="simulation_ac_sweep_current_graph"||s.type==="simulation_unknown_experiment_error")})};function pNo(t){if(t.getInheritedProperty("analogSimulationDisabled")||!t.isSubcircuit)return;const{root:e}=t;if(!e)return;const n=[...t.selectAll("analogsimulation"),...t.selectAll("analogtransientsimulation"),...t.selectAll("analogdcoperatingpointsimulation"),...t.selectAll("analogdcsweepsimulation"),...t.selectAll("analogacsweepsimulation")];if(n.length===0)return;$Do();const o={...e.platform?.spiceEngineMap};o.spicey||(o.spicey=qDo());for(const i of n){const r=i.simulation_experiment_id;if(!r){vB("No simulation experiment id found, skipping simulation");continue}const s=e.db.simulation_experiment.get(r);if(!s){vB("No simulation experiment found, skipping simulation");continue}const a=i.getGroup()??t,A=a.selectAll("voltageprobe"),c=a.selectAll("ammeter"),l=hNo({circuitJson:e.db.toArray(),simulationExperimentId:r,voltageProbes:A,ammeters:c});let u;try{u=tNo({circuitJson:l,simulationExperimentId:r}),vB(`Generated ${u.length} SPICE run(s):
${u.map(B=>B.spiceString).join(`
`)}`)}catch(B){vB(`Failed to convert circuit JSON to SPICE: ${B}`),e.db.simulation_unknown_experiment_error.insert({simulation_experiment_id:r,error_type:"simulation_unknown_experiment_error",message:B instanceof Error?B.message:String(B)});continue}const g=new Map,h=new Map,d=new Map;for(const B of A)B.finalProbeName&&g.set(B.finalProbeName,B),B.simulation_voltage_probe_id&&(h.set(B.simulation_voltage_probe_id,B),d.set(B.simulation_voltage_probe_id,oNo(B)));for(const B of c)B.simulation_current_probe_id&&d.set(B.simulation_current_probe_id,iNo(B));const p=new Set(c.map(B=>B.simulation_current_probe_id).filter(B=>!!B)),m=new Map,_=new Map;for(const B of e.db.simulation_current_probe.list().filter(S=>p.has(S.simulation_current_probe_id)))m.set(B.simulation_current_probe_id,B),B.name!==void 0&&_.set(B.name,B);const f=e.db.simulation_voltage_probe.list().filter(B=>h.has(B.simulation_voltage_probe_id)),I=u[0]?.spiceNetlist,C=I?WDo(I):[];if(C.length===f.length)for(const[B,S]of f.entries()){const Q=h.get(S.simulation_voltage_probe_id),w=C[B];Q&&w&&g.set(w,Q)}else vB(`Skipping probe-to-graph order mapping because counts differ: probes=${f.length} graphNames=${C.length}`);const y=i.getSpiceEngineName()??"spicey",x=o[y];if(!x)throw new Error(`SPICE engine "${y}" not found in platform config. Available engines: ${JSON.stringify(Object.keys(o).filter(B=>B!=="spicey"))}`);const E=`spice-simulation-${y}-${r}`;vB(`Queueing simulation for spice engine: ${y} (id: ${E})`),t._queueAsyncEffect(E,async()=>{try{const B=[],S=[];for(const Q of u){vB(`Running simulation with engine: ${y}`);const w=await x.simulate(Q.spiceString);vB(`Simulation completed, received ${w.simulationResultCircuitJson.length} elements`);for(const M of w.simulationResultCircuitJson){if(!dNo(M)){vB("Skipping invalid simulation result element");continue}const k=ZDo({simulationResult:M,simulationParameterSweepCoordinate:Q.simulationParameterSweepCoordinate});if(QMe(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=k.name?g.get(k.name):void 0;F&&(k.color=F.color??void 0,k.source_probe_id=F.simulation_voltage_probe_id??void 0)}else if(HTt(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=h.get(k.simulation_voltage_probe_id)??(k.name?g.get(k.name):void 0);F?.simulation_voltage_probe_id&&(k.color=F.color??void 0,k.simulation_voltage_probe_id=F.simulation_voltage_probe_id)}if(SMe(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=(k.source_probe_id?m.get(k.source_probe_id):void 0)??(k.name?_.get(k.name):void 0);F&&(k.color=F.color,k.source_probe_id=F.simulation_current_probe_id)}else if(LTt(k)){k.simulation_experiment_id=s.simulation_experiment_id;const F=m.get(k.simulation_current_probe_id)??(k.name?_.get(k.name):void 0);F&&(k.color=F.color,k.simulation_current_probe_id=F.simulation_current_probe_id)}const R=e.db.insert(k);QMe(R)&&B.push({type:"voltage",graph:R}),SMe(R)&&S.push({type:"current",graph:R}),vB(`Inserted ${k.type} into database`)}}i.usesIndependentGraphAxes()&&gNo({db:e.db,graphs:[...B,...S],graphDisplayOverridesByProbeId:d}),t._markDirty("SimulationSpiceEngineRender")}catch(B){vB(`Simulation failed for engine ${y}: ${B}`),e.db.simulation_unknown_experiment_error.insert({simulation_experiment_id:r,error_type:"simulation_unknown_experiment_error",message:B instanceof Error?B.message:String(B)})}})}}function mNo(t){if(!t.isSubcircuit)return;const{db:e}=t.root,n=t.selectAll("trace"),o=t.selectAll("via"),i=t.selectAll("net"),r=new wQ({});r.addConnections(n.map(l=>{const u=e.source_trace.get(l.source_trace_id);return u?[u.source_trace_id,...u.connected_source_port_ids,...u.connected_source_net_ids]:null}).filter(l=>l!==null));const s=e.source_net.list().filter(l=>l.subcircuit_id===t.subcircuit_id);for(const l of s)r.addConnections([[l.source_net_id]]);const{name:a}=t._parsedProps;for(const l of n){if(!l.source_trace_id)continue;const u=r.getNetConnectedToId(l.source_trace_id);u&&(l.subcircuit_connectivity_map_key=`${a??`unnamedsubcircuit${t.subcircuit_id??t.source_group_id??t._renderId}`}_${u}`,e.source_trace.update(l.source_trace_id,{subcircuit_connectivity_map_key:l.subcircuit_connectivity_map_key}))}const A=new Set;for(const l of n){if(!l.source_trace_id)continue;const u=e.source_trace.get(l.source_trace_id);if(u)for(const g of u.connected_source_port_ids)A.add(g)}for(const l of A){const u=r.getNetConnectedToId(l);if(!u)continue;const g=`${a??`unnamedsubcircuit${t.subcircuit_id??t.source_group_id??t._renderId}`}_${u}`;e.source_port.update(l,{subcircuit_connectivity_map_key:g})}const c=new Set;for(const l of n){if(!l.source_trace_id)continue;const u=e.source_trace.get(l.source_trace_id);if(u)for(const g of u.connected_source_net_ids)c.add(g)}for(const l of s)c.add(l.source_net_id);for(const l of c){const u=r.getNetConnectedToId(l);if(!u)continue;const g=`${a??`unnamedsubcircuit${t.subcircuit_id??t.source_group_id??t._renderId}`}_${u}`;e.source_net.update(l,{subcircuit_connectivity_map_key:g});const h=i.find(d=>d.source_net_id===l);h&&(h.subcircuit_connectivity_map_key=g)}for(const l of o){const u=l._getConnectedNetOrTrace();u&&u.subcircuit_connectivity_map_key&&(l.subcircuit_connectivity_map_key=u.subcircuit_connectivity_map_key)}}var _No=t=>{const e=t.root?.firstChild===t;if(!t.isSubcircuit||!e||t._getBoard())return;const n=t.root?.pcbRoutingDisabled||t.getInheritedProperty("routingDisabled"),o=t.root?.platform?.drcChecksDisabled??t.getInheritedProperty("drcChecksDisabled"),i=t.root?.platform?.routingDrcChecksDisabled??t.getInheritedProperty("routingDrcChecksDisabled");if(t.root?.pcbDisabled||n||o||i||t._hasIncompleteAsyncEffectsInSubtreeForPhase("PcbTraceRender")||t._hasTracesToRoute()&&!t._areChildSubcircuitsRouted()||t._standaloneSubcircuitDrcChecksComplete||t._standaloneSubcircuitDrcChecksInProgress)return;const{db:r}=t.root,s=r.subtree({subcircuit_id:t.subcircuit_id}).toArray();t._standaloneSubcircuitDrcChecksInProgress=!0,t._queueAsyncEffect("standalone-subcircuit:routing-drc-checks",async()=>{try{const a=await jmt(s);r.insertAll(Ymt(a)),t._standaloneSubcircuitDrcChecksComplete=!0}finally{t._standaloneSubcircuitDrcChecksInProgress=!1}})},YTt=(t,e)=>{for(const[n,o]of Object.entries(e)){if(!o)continue;const i=Array.isArray(o)?o:[o],r=t.get(n)??new Set;for(const s of i)r.add(s);t.set(n,r)}},UTt=t=>Object.fromEntries(Array.from(t,([e,n])=>[e,n.size===1?Array.from(n)[0]:Array.from(n)])),fNo=(t,e)=>{const n=e.map(r=>r.fanoutPourNetMap).filter(r=>r!==void 0),o=new Map;if(n.length>0){for(const r of n)YTt(o,r);return UTt(o)}let i=t;for(;i;){if(i.isSubcircuit){const r=i,s=r.selectAll("copperpour");for(const a of s){if(a.getSubcircuit()!==r)continue;const{layer:A,connectsTo:c}=a._parsedProps;YTt(o,{[A]:c})}}i=i.parent}return o.size>0?UTt(o):void 0},KTt=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y)<1e-4&&t.layer===e.layer;function INo(t,e,n){const o=t.getGroup(),i=o._computePcbGlobalTransformBeforeLayout(),r=WN(e.layerCount),s=new Map(e.connections.map(g=>[g,[...g.pointsToConnect]])),a=new Set,A=new Set,c=[];for(const[g,h]of(t._parsedProps.pcbTracePaths??[]).entries()){const d=t.getSubcircuit().selectOne(h.connection,{type:"port"});if(!d)throw new Error(`Saved phase path "${h.connection}" must select a PCB port`);if(A.has(d))throw new Error(`Duplicate saved phase path for "${h.connection}"`);A.add(d);const p=e.connections.filter(F=>F.pointsToConnect.some(O=>O.pcb_port_id===d.pcb_port_id));if(p.length!==1)throw new Error(`Saved phase path "${h.connection}" must select exactly one connection in this phase`);const m=p[0],_=s.get(m),f=_.findIndex(F=>F.pcb_port_id===d.pcb_port_id);if(f<0)throw new Error(`Saved phase path "${h.connection}" starts at an endpoint already joined by another path`);const I=d._getGlobalPcbPositionBeforeLayout(),C=d._getGlobalPcbPositionAfterLayout(),y=D0(M0(C.x-I.x,C.y-I.y),i),x=h.route.map(F=>({...F,...ts(y,F)}));for(const F of x)if((F.route_type==="wire"?[F.layer]:[F.from_layer,F.to_layer]).some(U=>!r.includes(U)))throw new Error(`Saved phase path "${h.connection}" uses a layer unavailable on this board`);const E=x[0],B=x.at(-1),S=E.route_type==="wire"?E.layer:E.from_layer,Q=B.route_type==="wire"?B.layer:B.to_layer;if(!KTt(_[f],{...E,layer:S}))throw new Error(`Saved phase path "${h.connection}" must start at its PCB port on an available layer`);const w=_.findIndex((F,O)=>O!==f&&KTt(F,{...B,layer:Q}));if(!e.allowViaInPad&&(E.route_type==="via"||B.route_type==="via"&&w>=0))throw new Error(`Saved phase path "${h.connection}" has a via at a pad; enable allowViaInPad`);const M=`saved_phase_${o.pcb_group_id}_${t._parsedProps.phaseIndex??"default"}_${g}`;if(w<0&&!n)throw new Error(`Saved phase path "${h.connection}" must end at another connection endpoint; use autorouter="fanout" for saved escapes`);w>=0?_.splice(f,1):_[f]={x:B.x,y:B.y,layer:Q,pointId:`${M}_exit`};const k=x.find(F=>F.route_type==="wire")?.width??e.minTraceWidth,R=x.flatMap(F=>F.route_type==="via"?[{route_type:"wire",x:F.x,y:F.y,layer:F.from_layer,width:k},F,{route_type:"wire",x:F.x,y:F.y,layer:F.to_layer,width:k}]:[F]);B.route_type==="via"&&R.push({route_type:"wire",x:B.x,y:B.y,layer:B.to_layer,width:k}),a.add(m),c.push({type:"pcb_trace",pcb_trace_id:M,connection_name:m.name,connectsTo:[m.source_trace_id,...m.pointsToConnect.map(F=>F.pointId)].filter(F=>!!F),route:R})}for(const g of e.connections){if(!a.has(g))throw new Error(`pcbTracePaths must cover every connection in the phase; missing: ${g.name}`);if(!n&&s.get(g).length>1)throw new Error(`Saved phase paths for "${g.name}" must connect every endpoint; use autorouter="fanout" for saved escapes`)}const l=e.connections.flatMap(g=>{const h=s.get(g);return h.length>1?[{...g,pointsToConnect:h}]:[]}),u=new Set(l.map(g=>g.name));return{traces:c,outputSimpleRouteJson:n?{...e,connections:l,buses:e.buses?.map(g=>({...g,connectionNames:g.connectionNames.filter(h=>u.has(h))})).filter(g=>g.connectionNames.length>0),differentialPairs:e.differentialPairs?.filter(g=>g.connectionNames.every(h=>u.has(h))),traces:[...e.traces??[],...c]}:void 0}}var CNo=qa.omit({pcbRotation:!0,layer:!0}),VTt=class extends Ir{pcb_breakout_point_id=null;matchedPort=null;matchedNet=null;matchedSourceTraceId=null;isPcbPrimitive=!0;_getSourceTraceIdForPort(t){const{db:e}=this.root;return e.source_trace.list().find(o=>o.connected_source_port_ids.includes(t.source_port_id))?.source_trace_id}_getSourceNetIdForPort(t){const{db:e}=this.root;return e.source_trace.list().find(o=>o.connected_source_port_ids.includes(t.source_port_id))?.connected_source_net_ids[0]}_renderPcbBreakoutPoint({layer:t}={}){if(this.pcb_breakout_point_id||this.root?.pcbDisabled)return;const{db:e}=this.root,n=this._getGlobalPcbPositionBeforeLayout(),o=this.parent?.getGroup(),i=this.getSubcircuit();if(!o||!o.pcb_group_id)return;const r=e.pcb_breakout_point.insert({pcb_group_id:o.pcb_group_id,subcircuit_id:i?.subcircuit_id??void 0,source_port_id:this.matchedPort?.source_port_id??void 0,source_trace_id:this.matchedPort?this.matchedSourceTraceId??this._getSourceTraceIdForPort(this.matchedPort):void 0,source_net_id:this.matchedNet?this.matchedNet.source_net_id:this.matchedPort?this._getSourceNetIdForPort(this.matchedPort):void 0,layer:t,x:n.x,y:n.y});this.pcb_breakout_point_id=r.pcb_breakout_point_id}_getPcbCircuitJsonBounds(){const t=this._getGlobalPcbPositionBeforeLayout();return{center:{x:t.x,y:t.y},bounds:{left:t.x,top:t.y,right:t.x,bottom:t.y},width:0,height:0}}_setPositionFromLayout(t){const{db:e}=this.root;if(!this.pcb_breakout_point_id)return;const n={x:t.x,y:t.y};this.matchedSourceTraceId&&(n.source_trace_id=this.matchedSourceTraceId),e.pcb_breakout_point.update(this.pcb_breakout_point_id,n)}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_breakout_point_id)return;const o=n.pcb_breakout_point.get(this.pcb_breakout_point_id);o&&n.pcb_breakout_point.update(this.pcb_breakout_point_id,{x:o.x+t,y:o.y+e})}getPcbSize(){return{width:0,height:0}}},dR=class extends VTt{get config(){return{componentName:"BreakoutPoint",zodProps:wMn}}_matchConnection(){if(this.matchedPort)return;const{connection:t}=this._parsedProps,e=this.getSubcircuit();e&&(this.matchedPort=e.selectOne(t,{type:"port"}),this.matchedPort||(this.matchedNet=e.selectOne(t,{type:"net"})),!this.matchedPort&&!this.matchedNet&&this.renderError(`Could not find connection target "${t}"`))}doInitialPcbPrimitiveRender(){this._matchConnection(),this._renderPcbBreakoutPoint()}},zTt=class extends dR{exitLayer="top";doInitialPcbPrimitiveRender(){this._matchConnection(),this._renderPcbBreakoutPoint({layer:this.exitLayer})}};function yNo(t,e){const{db:n}=t.root,o=WN(e.layerCount),i=new Set,r=t.children.filter(A=>A instanceof zTt),s=(t._parsedProps.pcbTracePaths??[]).map((A,c)=>{for(const S of A.route)if((S.route_type==="wire"?[S.layer]:[S.from_layer,S.to_layer]).some(w=>!o.includes(w)))throw new Error(`Saved fanout path "${A.connection}" uses a layer unavailable on this board`);const l=r[c],u=l.matchedPort,g=e.connections.find(S=>S.pointsToConnect.some(Q=>Q.pcb_port_id===u.pcb_port_id));if(!g)throw new Error(`No fanout connection for saved path "${A.connection}"`);const h=n.pcb_breakout_point.get(l.pcb_breakout_point_id),d=A.route.at(-1),p=D0(l._computePcbGlobalTransformBeforeLayout(),M0(-d.x,-d.y)),m=ts(p,d),_=A.route.map(S=>{const Q=ts(p,S);return{...S,x:Q.x+h.x-m.x,y:Q.y+h.y-m.y}}),f=_[0],I=f.route_type==="wire"?f.layer:f.from_layer,C=u._getGlobalPcbPositionAfterLayout();if(Math.hypot(f.x-C.x,f.y-C.y)>1e-4||!u.getAvailablePcbLayers().includes(I))throw new Error(`Saved fanout path "${A.connection}" must start at its PCB port on an available layer`);if(f.route_type==="via"&&!e.allowViaInPad)throw new Error(`Saved fanout path "${A.connection}" starts with a via at a pad; enable allowViaInPad`);const y=_.at(-1),x=y.route_type==="wire"?y.layer:y.to_layer,E=[{...f,layer:I},{...y,layer:x}];if(g.pointsToConnect.some(S=>!E.some(Q=>Math.hypot(S.x-Q.x,S.y-Q.y)<1e-4&&S.layer===Q.layer)))throw new Error(`Saved fanout path "${A.connection}" does not cover its connection endpoints`);const B=_.find(S=>S.route_type==="wire")?.width??e.minTraceWidth;return f.route_type==="via"&&(_.splice(1,0,{route_type:"wire",x:f.x,y:f.y,layer:f.to_layer,width:B}),_.unshift({route_type:"wire",x:f.x,y:f.y,layer:f.from_layer,width:B})),y.route_type==="via"&&(_.splice(_.length-1,0,{route_type:"wire",x:y.x,y:y.y,layer:y.from_layer,width:B}),_.push({route_type:"wire",x:y.x,y:y.y,layer:y.to_layer,width:B})),y.route_type==="via"&&_.push({route_type:"wire",x:y.x,y:y.y,layer:y.to_layer,width:B}),i.add(g),{type:"pcb_trace",pcb_trace_id:`saved_fanout_${t.pcb_group_id}_${c}`,connection_name:g.name,source_trace_id:g.source_trace_id,connectsTo:[g.source_trace_id,...g.pointsToConnect.map(S=>S.pointId)].filter(S=>!!S),route:_}}),a=e.connections.filter(A=>!i.has(A));if(a.length)throw new Error(`pcbTracePaths must cover every fanout connection; missing: ${a.map(A=>A.name).join(", ")}`);return s}function JTt(t){return t===null?Number.POSITIVE_INFINITY:t}function xNo(t,e){return JTt(t.routingPhaseIndex)-JTt(e.routingPhaseIndex)}function kue(t,e){let n=t.get(e);return n||(n={routingPhaseIndex:e,nets:[],traces:[]},t.set(e,n)),n}function WTt(t){return t.props.routingPhaseIndex??null}function ENo(t,e=[]){const n=new Set;for(const a of e){if(a._parsedProps.routingPhaseIndex===void 0)continue;a._parsedProps.connections.some(c=>c===t.name||PMe(t,Fue(c)))&&n.add(a._parsedProps.routingPhaseIndex)}if(n.size>1)throw new Error(`Trace "${t.name}" belongs to buses with different routing phases`);const o=n.values().next().value;if(o!==void 0)return o;const i=t.props.routingPhaseIndex;if(i!==void 0)return i;let r=null;const s=t._findConnectedNets().nets;for(const a of s){const A=WTt(a);typeof A=="number"&&(r===null||A<r)&&(r=A)}return r}function Fue(t){return t.trim().replace(/\s*>\s*/g,".").replace(/\s+/g,".").replace(/^\./,"").replace(/\.\./g,".")}function wMe(t){return t.connection===void 0&&t.connections===void 0?t.pcbTracePaths?.map(e=>e.connection)??[]:[...t.connection?[t.connection]:[],...t.connections??[]]}function PMe(t,e){if(t.getTracePortPathSelectors().some(o=>Fue(o)===e))return!0;const n=t.getSubcircuit().selectOne(e,{type:"port"});return n!==null&&(t._findConnectedPorts().ports?.includes(n)??!1)}function BNo(t){const e=t.selectAll("autoroutingphase"),n=new Map;for(const o of e){const{phaseIndex:i,autorouter:r}=o._parsedProps;r!==void 0&&n.set(i??null,r)}return n}function bNo(t){const e=t.selectAll("autoroutingphase"),n=new Map;for(const o of e){const i=o._parsedProps;n.set(i.phaseIndex??null,i)}return n}function Fb(t){if(t!==void 0)return Number(t)}function SNo(t){const{minTraceWidth:e,minViaHoleEdgeToViaHoleEdgeClearance:n,minPlatedHoleDrillEdgeToDrillEdgeClearance:o,minTraceToPadEdgeClearance:i,minPadEdgeToPadEdgeClearance:r,minBoardEdgeClearance:s,minViaEdgeToPadEdgeClearance:a,minViaHoleDiameter:A,minViaPadDiameter:c}=t;if(!(e===void 0&&n===void 0&&o===void 0&&i===void 0&&r===void 0&&s===void 0&&a===void 0&&A===void 0&&c===void 0))return{minTraceWidth:Fb(e),minViaHoleEdgeToViaHoleEdgeClearance:Fb(n),minPlatedHoleDrillEdgeToDrillEdgeClearance:Fb(o),minTraceToPadEdgeClearance:Fb(i),minPadEdgeToPadEdgeClearance:Fb(r),minBoardEdgeClearance:Fb(s),minViaEdgeToPadEdgeClearance:Fb(a),minViaHoleDiameter:Fb(A),minViaPadDiameter:Fb(c)}}function QNo(t){const e=t.selectAll("trace"),n=t.selectAll("net"),o=t.selectAll("bus"),i=t.selectAll("group").filter(_=>_.isRoutingDirective),r=new Map,s=new Map;for(const _ of e){let f=_.parent;for(;f&&f!==t;){if(f.isRoutingDirective){r.set(_,f);break}f=f.parent}}for(const _ of n)_.parent?.isRoutingDirective&&i.includes(_.parent)&&s.set(_,_.parent);const a=new Map,A=BNo(t),c=bNo(t),l=t._parsedProps,u=e.length>0||n.length>0,g=Array.from(c.values()).some(_=>_.reroute),h=Array.from(c.values()).some(_=>wMe(_).length>0);if(!u&&!g&&!h&&i.length===0)return[];for(const _ of n){if(s.has(_))continue;const f=WTt(_);kue(a,f).nets.push(_)}for(const _ of e){if(r.has(_))continue;const f=ENo(_,o);kue(a,f).traces.push(_)}for(const[_,f]of c){const I=wMe(f);if(I.length>0){const C=kue(a,_),y=I.map(Fue);C.connectionSelectors=I;for(const x of e)if(!r.has(x)&&y.some(E=>PMe(x,E))){if(!f.reroute)for(const E of a.values())E!==C&&(E.traces=E.traces.filter(B=>B!==x));if(C.traces.includes(x))continue;C.traces.push(x)}}(f.reroute||f.pcbTracePaths!==void 0)&&kue(a,_)}const d=Array.from(a.values()).sort(xNo);for(const _ of d){_.autorouter=A.get(_.routingPhaseIndex);const f=c.get(_.routingPhaseIndex);_.phaseName=f?.name,_.reroute=f?.reroute,_.region=f?.region,_.connectionSelectors=f?wMe(f):void 0,_.busFanoutDirections=f?.busFanoutDirections??l.busFanoutDirections,_.fanoutBoundaryPadding=f?.fanoutBoundaryPadding??l.fanoutBoundaryPadding;const I=f?.fanoutRoutingLayers??l.fanoutRoutingLayers;_.fanoutRoutingLayers=I?.map(C=>typeof C=="string"?C:C.name),_.fanoutPourNetMap=f?.fanoutPourNetMap??l.fanoutPourNetMap,_.drcTolerances=f?SNo(f):void 0}for(const _ of t.selectAll("autoroutingphase")){if(_._parsedProps.pcbTracePaths===void 0)continue;const f=a.get(_._parsedProps.phaseIndex??null);if(!f)continue;const I=f.autorouter!==void 0?h$(f.autorouter,t.root?.platform):t._getAutorouterConfig(),C=["fanout","single_layer_fanout"].includes(I.preset??"");f.getPrecomputedRoutingResult=y=>INo(_,y,C)}const p=[];for(const _ of i){const f=_._parsedProps,C=_.children.some(O=>O instanceof dR)&&_.props.autorouter===void 0,y=e.filter(O=>r.get(O)===_),x=y.filter(O=>!O.pcb_trace_id),E=_.pcb_group_id?_.root?.db.pcb_group.get(_.pcb_group_id):null,B=E?.outline?Oh(E.outline):null,S=E?.width??(B?B.maxX-B.minX:void 0),Q=E?.height??(B?B.maxY-B.minY:void 0),w=E&&S&&Q?{minX:E.center.x-S/2,maxX:E.center.x+S/2,minY:E.center.y-Q/2,maxY:E.center.y+Q/2}:void 0,M=_.props,k=M.width!==void 0||M.height!==void 0||!!M.outline?.length,R=M.fanoutBoundaryPadding!==void 0,F={routingPhaseIndex:null,routingPcbGroupId:_.pcb_group_id??void 0,fanoutRegionPcbGroupId:_.pcb_group_id??void 0,routingBounds:w,fanoutBounds:k?w:R?void 0:w,autorouter:f.autorouter??"fanout",busFanoutDirections:f.busFanoutDirections,fanoutBoundaryPadding:f.fanoutBoundaryPadding,fanoutRoutingLayers:f.fanoutRoutingLayers?.map(O=>typeof O=="string"?O:O.name),fanoutPourNetMap:f.fanoutPourNetMap,nets:n.filter(O=>s.get(O)===_),traces:y};if(_._parsedProps.pcbTracePaths!==void 0){p.push({...F,autorouter:{local:!0,groupMode:"subcircuit",allowViaInPad:(typeof f.autorouter=="object"?f.autorouter.allowViaInPad:void 0)??t._getAutorouterConfig().allowViaInPad},getPrecomputedRoutingResult:O=>({traces:yNo(_,O)})});continue}if(!C){p.push(F);continue}if(p.push({...F,autorouter:"default",traces:[]}),x.length>0){const O=new Set(o.filter(Y=>x.some(W=>Y._parsedProps.connections.some(te=>te===W.name||PMe(W,Fue(te))))).map(Y=>Y.name));for(const Y of x)Y.name&&O.add(Y.name);const U=f.busFanoutDirections?Object.fromEntries(Object.entries(f.busFanoutDirections).filter(([Y])=>O.has(Y))):void 0;p.push({...F,routingPcbGroupId:void 0,busFanoutDirections:U,traces:x})}}const m=c.get(null);if(u&&c.size===1&&m?.reroute&&d.length===1&&d[0]?.routingPhaseIndex===null){const _=d[0];return[...p,{routingPhaseIndex:null,nets:[..._.nets],traces:[..._.traces]},_]}return[...p,...d]}var jTt={version:"0.0.1910"},$Tt=t=>{let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0},qTt=t=>{const e=JSON.stringify(t),n=$Tt(e),o=$Tt(`${e}${n}`);return`${n.toString(16).padStart(8,"0")}${o.toString(16).padStart(8,"0")}`},vNo=(t,e)=>`routes:core@${jTt.version}:solver:${qTt(e)}:srj:${qTt(t)}`,wNo=async({cacheEngine:t,cacheKey:e})=>{if(!t)return null;try{const n=await t.getItem(e);if(!n)return null;const o=JSON.parse(n);return!o||!Array.isArray(o.traces)?null:o}catch{return null}},PNo=async({cacheEngine:t,cacheKey:e,result:n})=>{if(t)try{await t.setItem(e,JSON.stringify(n))}catch{}},XTt=1e-6,ZTt=(t,e)=>t.pointId!==void 0&&e.pointId!==void 0&&t.pointId===e.pointId,ekt=(t,e)=>Math.abs(t.x-e.x)<=XTt&&Math.abs(t.y-e.y)<=XTt&&t.layer===e.layer,I$=(t,e)=>t.pointId!==void 0&&e.pointId!==void 0?ZTt(t,e):ekt(t,e),MNo=(t,e)=>{const n=t.connections.find(i=>i.routingPcbGroupId!==e.routingPcbGroupId&&i.source_trace_id===e.source_trace_id&&i.pointsToConnect.some(r=>e.pointsToConnect.some(s=>I$(r,s))));if(!n)return;const o=n.pointsToConnect.filter(i=>!e.pointsToConnect.some(r=>I$(i,r)));return o.length===1?o[0]:void 0},DNo=(t,e)=>{if(!e.routingPcbGroupId||!e.source_trace_id)return;const n=MNo(t,e);if(!(!n||!t.connections.some(i=>i.routingPcbGroupId!==void 0&&i.routingPcbGroupId!==e.routingPcbGroupId&&i.source_trace_id===e.source_trace_id&&i.pointsToConnect.some(r=>I$(r,n)))))return{x:n.x,y:n.y,layer:n.layer}};function tkt(t,e){if(t.routingPcbGroupId)return t.routingPcbGroupId===e.routingPcbGroupId;for(const n of e.traces)if(n.source_trace_id&&(t.source_trace_id===n.source_trace_id||t.name===n.source_trace_id||t.rootConnectionName===n.source_trace_id||t.mergedConnectionNames?.includes(n.source_trace_id)))return!0;for(const n of e.nets)if(n.source_net_id&&t.name===n.source_net_id)return!0;return!1}function NNo(t){for(const e of t)if(e.routingPcbGroupId||e.routingPhaseIndex!==null)return!0;return!1}function Lue(t,e){const n=[];for(const A of t.connections)tkt(A,e)&&n.push(A);const o=new Set;for(const A of n)o.add(A.name);const i=[];for(const A of t.differentialPairs??[]){const c=o.has(A.connectionNames[0]),l=o.has(A.connectionNames[1]);if(c!==l)throw new Error(`Differential pair "${A.connectionNames.join("/")}" cannot be split across autorouting phases`);c&&i.push(A)}const r=new Map(n.map(A=>[A.name,A])),s=(t.buses??[]).map(A=>{const c=A.connectionNames.filter(u=>o.has(u)),l=Object.fromEntries(c.flatMap(u=>{const g=r.get(u);if(!g)return[];const h=DNo(t,g);return h?[[u,h]]:[]}));return{...A,connectionNames:c,...Object.keys(l).length>0?{connectionExitTargets:l}:{}}}).filter(A=>A.connectionNames.length>0),a=zRt({bounds:e.routingBounds??t.bounds,connections:n});return{...t,bounds:a,connections:n,differentialPairs:i.length>0?i:void 0,buses:s.length>0?s:void 0}}function RNo(t){return t?Object.values(t).some(e=>e!==void 0):!1}function TNo(t,e){return e===void 0?t:t.map(n=>({...n,nominalTraceWidth:Math.max(n.nominalTraceWidth??e,e),width:Math.max(n.width??e,e)}))}function nkt(t,e){if(!RNo(e))return t;const n=e.minTraceWidth??t.minTraceWidth,o=e.minViaHoleDiameter??t.minViaHoleDiameter,i=e.minViaPadDiameter??t.minViaPadDiameter,r=e.minTraceToPadEdgeClearance??t.minTraceToPadEdgeClearance,s=e.minViaEdgeToPadEdgeClearance??t.minViaEdgeToPadEdgeClearance,a=e.minViaHoleEdgeToViaHoleEdgeClearance??t.minViaHoleEdgeToViaHoleEdgeClearance,A=e.minPlatedHoleDrillEdgeToDrillEdgeClearance??t.minPlatedHoleDrillEdgeToDrillEdgeClearance,c=e.minPadEdgeToPadEdgeClearance??t.minPadEdgeToPadEdgeClearance,l=e.minBoardEdgeClearance??t.minBoardEdgeClearance;return{...t,connections:TNo(t.connections,e.minTraceWidth),minTraceWidth:n,minViaDiameter:i,minViaHoleDiameter:o,minViaPadDiameter:i,min_via_hole_diameter:o,min_via_pad_diameter:i,minTraceToPadEdgeClearance:r,minViaEdgeToPadEdgeClearance:s,minViaHoleEdgeToViaHoleEdgeClearance:a,minPlatedHoleDrillEdgeToDrillEdgeClearance:A,minPadEdgeToPadEdgeClearance:c,minBoardEdgeClearance:l}}var kNo=(t,e)=>{const n=t.connections.filter(s=>s.routingPcbGroupId!==e),o=new Set(n.map(s=>s.name)),i=[];for(const s of t.differentialPairs??[]){const a=o.has(s.connectionNames[0]),A=o.has(s.connectionNames[1]);if(a!==A)throw new Error(`Differential pair "${s.connectionNames.join("/")}" cannot be split at a breakout boundary`);a&&i.push(s)}const r=(t.buses??[]).map(s=>({...s,connectionNames:s.connectionNames.filter(a=>o.has(a))})).filter(s=>s.connectionNames.length>0);return{...t,connections:n,differentialPairs:i.length>0?i:void 0,buses:r.length>0?r:void 0}},FNo=(t,e)=>({...t,traces:t.traces?.map(n=>{const o=e.get(n.connection_name??"");return o?{...n,connectsTo:[...new Set([...n.connectsTo??[],o])]}:n})});function LNo({fanoutInputSimpleRouteJson:t,fanoutOutputSimpleRouteJson:e,baseSimpleRouteJson:n,routingPhasePlan:o}){const i=o.routingPcbGroupId;if(!i)return{downstreamSimpleRouteJson:e,baseSimpleRouteJson:n,synchronizedBreakoutPoints:[]};const r=new Map(e.connections.map(g=>[g.name,g])),s=n.connections.map(g=>({...g,pointsToConnect:g.pointsToConnect.map(h=>({...h}))})),a=[],A=new Map;for(const g of t.connections){if(g.routingPcbGroupId!==i||!g.source_trace_id)continue;const h=r.get(g.name);if(!h)continue;const p=s.filter(f=>{if(f.routingPcbGroupId===i)return!1;const I=f.source_trace_id===g.source_trace_id,C=f.pointsToConnect.some(y=>g.pointsToConnect.some(x=>ZTt(y,x)));return!I&&!C?!1:f.pointsToConnect.some(y=>g.pointsToConnect.some(x=>I$(y,x)))}).flatMap(f=>f.pointsToConnect.flatMap((I,C)=>g.pointsToConnect.some(y=>I$(I,y))?[{globalConnection:f,pointIndex:C,previousPoint:I}]:[]));if(p.length===0)continue;const m=h.pointsToConnect.findIndex((f,I)=>{const C=g.pointsToConnect[I];return C!==void 0&&!ekt(f,C)});if(m<0)continue;const _=h.pointsToConnect[m];for(const{globalConnection:f,pointIndex:I,previousPoint:C}of p){const{terminalVia:y,...x}=C,E={...x,x:_.x,y:_.y,layer:_.layer,..._.terminalVia?{terminalVia:{..._.terminalVia}}:{}};f.pointsToConnect[I]=E,C.pointId&&A.set(g.name,C.pointId),a.push({sourceTraceId:g.source_trace_id,routingPcbGroupId:i,previousPoint:C,fanoutExitPoint:_})}}const c=e.obstacles.filter(g=>g.isFanoutSourceKeepout===!0&&g.componentId!==void 0),l=new Set(c.flatMap(g=>g.componentId===void 0?[]:[g.componentId])),u=n.obstacles.filter(g=>!g.componentId||!l.has(g.componentId));return{downstreamSimpleRouteJson:kNo(FNo(e,A),i),baseSimpleRouteJson:{...n,connections:s,obstacles:[...u,...c]},synchronizedBreakoutPoints:a}}function HNo(t){const e=[],o=t.pcb_smtpad.list().filter(i=>{const r=t.pcb_component.get(i.pcb_component_id);return r?t.source_component.get(r.source_component_id)?.name?.startsWith("__autoplaced_jumper"):!1});for(const i of o)if(i.shape!=="polygon"&&i.pcb_port_id){if(i.shape==="rect"||i.shape==="rotated_rect"){const r=i.width/2,s=i.height/2;e.push({pcb_port_id:i.pcb_port_id,x:i.x,y:i.y,minX:i.x-r,maxX:i.x+r,minY:i.y-s,maxY:i.y+s})}else if(i.shape==="circle"){const r=i.radius;e.push({pcb_port_id:i.pcb_port_id,x:i.x,y:i.y,minX:i.x-r,maxX:i.x+r,minY:i.y-r,maxY:i.y+r})}}return e}function okt(t,e,n,o=.01){for(const i of t)if(Math.abs(i.x-e)<o&&Math.abs(i.y-n)<o)return i.pcb_port_id}function ONo(t,e,n){for(const o of t)if(e>=o.minX&&e<=o.maxX&&n>=o.minY&&n<=o.maxY)return o}function GNo(t,e){if(t.length===0||e.length===0)return[t];const n=[];let o=[];for(let i=0;i<t.length;i++){const r=t[i];if(o.push(r),r.route_type==="wire"&&i>0&&i<t.length-1){const s=ONo(e,r.x,r.y);if(s){r.end_pcb_port_id||(r.end_pcb_port_id=s.pcb_port_id),n.push(o);const a={...r};delete a.end_pcb_port_id,a.start_pcb_port_id||(a.start_pcb_port_id=s.pcb_port_id),o=[a]}}}return o.length>0&&n.push(o),n}function YNo(t,e){const n=HNo(e);if(n.length===0)return t;const o=[];for(const i of t){const r=GNo(i,n);for(const s of r)if(s.length>0){const a=s[0],A=s[s.length-1];if(a.route_type==="wire"&&!a.start_pcb_port_id){const c=okt(n,a.x,a.y);c&&(a.start_pcb_port_id=c)}if(A.route_type==="wire"&&!A.end_pcb_port_id){const c=okt(n,A.x,A.y);c&&(A.end_pcb_port_id=c)}o.push(s)}}return o}var ikt=({db:t,pcbTrace:e,routeWithSrjMetadata:n})=>{for(const o of n){if(o.route_type!=="through_pad")continue;const i=o.circuitJsonMetadata?.pcb_via_id;if(!i)continue;const r=t.pcb_via.get(i);!r?.net_is_assignable||r.net_assigned&&r.pcb_trace_id!==e.pcb_trace_id||t.pcb_via.update(r.pcb_via_id,{pcb_trace_id:e.pcb_trace_id,net_assigned:!0})}},rkt=(t,e,n,o)=>Math.max(n-e,t-o),UNo=t=>{for(let e=0;e<t.length;e++){const n=t[e];for(let o=e+1;o<t.length;o++){const i=t[o];if(n.regionId&&n.regionId===i.regionId)continue;const r=rkt(n.bounds.minX,n.bounds.maxX,i.bounds.minX,i.bounds.maxX),s=rkt(n.bounds.minY,n.bounds.maxY,i.bounds.minY,i.bounds.maxY),a=Math.max(r,s),A=n.boundaryKeepaway+i.boundaryKeepaway;if(a+1e-6<A)return{firstRegion:n,secondRegion:i,availableGap:a,requiredGap:A}}}};function kO({accumulatedPcbTraces:t,stageOutputPcbTraces:e}){const n=new Set(e.flatMap(o=>[o.pcb_trace_id,...o.__replaces_pcb_trace_id?[o.__replaces_pcb_trace_id]:[]]));return[...t.filter(o=>!n.has(o.pcb_trace_id)),...e]}var KNo=1e-6;function VNo({point:t,segmentStart:e,segmentEnd:n}){return t.layer&&(e.layer!==t.layer||n.layer!==t.layer)?!1:Zd(t,e,n)<=KNo}function zNo({point:t,pad:e,traceWidth:n=0}){return e.shape==="rect"||e.shape==="rotated_rect"?Math.abs(t.x-e.x)<=e.width/2+n/2&&Math.abs(t.y-e.y)<=e.height/2+n/2:e.shape==="circle"?ad(t,e)<=e.radius+n/2:!1}function JNo({point:t,hole:e,traceWidth:n=0}){return ad(t,e)<=(e.outer_diameter??e.hole_diameter??0)/2+n/2}function WNo(t,e){const n=new Set,o=e.route,i=[o[0],o[o.length-1]].filter(r=>!!r&&r.route_type==="wire"&&r.x!==void 0&&r.y!==void 0);for(const r of i){for(const s of t.pcb_port.list())s.source_port_id&&(r.layer&&s.layers&&!s.layers.includes(r.layer)||ad(r,s)<=.01&&n.add(s.source_port_id));for(const s of t.pcb_smtpad.list()){if(!s.pcb_port_id||r.layer&&s.layer!==r.layer||!zNo({point:r,pad:s,traceWidth:r.width}))continue;const a=t.pcb_port.get(s.pcb_port_id)?.source_port_id;a&&n.add(a)}for(const s of t.pcb_plated_hole.list()){if(!s.pcb_port_id||!JNo({point:r,hole:s,traceWidth:r.width}))continue;const a=t.pcb_port.get(s.pcb_port_id)?.source_port_id;a&&n.add(a)}}return[...n]}function jNo(t){const e=t.route.filter(n=>n.route_type==="wire"&&n.x!==void 0&&n.y!==void 0);return[e[0],e[e.length-1]].filter(n=>!!n)}function $No(t,e){const n=new Set,o=jNo(e);if(o.length===0)return[];for(const i of t.pcb_trace.list()){if(!i.source_trace_id||i.pcb_trace_id===e.pcb_trace_id||!t.source_trace.get(i.source_trace_id)&&!t.source_net.get(i.source_trace_id))continue;const r=i.route.filter(s=>s.route_type==="wire");for(let s=0;s<r.length-1;s++){const a=r[s],A=r[s+1];if(!(!a||!A))for(const c of o)VNo({point:c,segmentStart:a,segmentEnd:A})&&n.add(i.source_trace_id)}}return[...n]}function qNo(t,e){const n=new Set;for(const o of e.route)for(const i of[o.start_pcb_port_id,o.end_pcb_port_id]){if(!i)continue;const r=t.pcb_port.get(i)?.source_port_id;r&&n.add(r)}return n.size>0?[...n]:WNo(t,e)}function XNo(t){const e=new wQ({});return e.addConnections(t.map(n=>[n.source_trace_id,...n.connected_source_port_ids,...n.connected_source_net_ids])),e}function MMe({db:t,trace:e,subcircuit_id:n}){if(e.source_trace_id&&(t.source_trace.get(e.source_trace_id)??t.source_net.get(e.source_trace_id)))return e.source_trace_id;const o=qNo(t,e);if(o.length===0)return $No(t,e)[0];const i=t.source_trace.list(),r=XNo(i),s=o.map(u=>r.getNetConnectedToId(u)).filter(u=>!!u),a=o.length>=2?i.find(u=>o.every(g=>u.connected_source_port_ids.includes(g))):void 0;if(a)return a.source_trace_id;const A=i.filter(u=>{const g=r.getNetConnectedToId(u.source_trace_id);return s.some(h=>h===g)}),c=A.filter(u=>u.connected_source_port_ids.some(g=>o.includes(g))),l=c.length>0?c:A;if(l.length!==0)return(l.find(u=>u.subcircuit_id===n)??l[0])?.source_trace_id}function ZNo(t,e){const o=[];for(const i of t){const r=e==="vertical"?i.center.y:i.center.x;let s=!1;for(const a of o){const A=e==="vertical"?a[0].center.y:a[0].center.x;if(Math.abs(r-A)<.01){a.push(i),s=!0;break}}s||o.push([i])}return o.filter(i=>i.length>=2)}function eRo(t){const{db:e,output_jumpers:n,subcircuit_id:o}=t;for(let i=0;i<n.length;i++){const r=n[i],s=e.source_component.insert({ftype:"simple_chip",name:`__autoplaced_jumper_${i}`,supplier_part_numbers:{}}),a=r.orientation==="horizontal"?0:90,A=r.pads[0]?.layer||r.pads[0]?.layers?.[0]||"top",c=e.pcb_component.insert({source_component_id:s.source_component_id,center:r.center,rotation:a,layer:A,width:r.width||0,height:r.height||0,obstructs_within_bounds:!1}),l=[];for(let g=0;g<r.pads.length;g++){const h=r.pads[g],d=g+1,p=e.source_port.insert({source_component_id:s.source_component_id,name:`pin${d}`,pin_number:d}),m=h.layer||h.layers?.[0]||"top",_=e.pcb_port.insert({pcb_component_id:c.pcb_component_id,source_port_id:p.source_port_id,x:h.center.x,y:h.center.y,layers:[m]}),f=e.pcb_smtpad.insert({pcb_component_id:c.pcb_component_id,pcb_port_id:_.pcb_port_id,shape:"rect",x:h.center.x,y:h.center.y,width:h.width,height:h.height,layer:m});l.push({pad:h,sourcePortId:p.source_port_id,pcbSmtpadId:f.pcb_smtpad_id})}const u=ZNo(r.pads,r.orientation);for(const g of u){const h=[];for(const d of g){const p=l.find(m=>Math.abs(m.pad.center.x-d.center.x)<.01&&Math.abs(m.pad.center.y-d.center.y)<.01);p&&h.push(p.sourcePortId)}h.length>=2&&e.source_component_internal_connection.insert({source_component_id:s.source_component_id,subcircuit_id:o??void 0,source_port_ids:h})}}}function tRo(t){return{...t,type:"pcb_trace",pcb_trace_id:t.pcb_trace_id,connection_name:t.connection_name??t.source_trace_id??t.pcb_trace_id,route:t.route.map(e=>({...e}))}}function nRo(t){const e=new Set;if(!t.subcircuit_id)return e;e.add(t.subcircuit_id);const n=t.root?.db;if(!n)return e;for(const o of uPe(n,t.subcircuit_id))e.add(o);return e}function DMe(t){const e=t.root?.db;if(!e)return[];const n=nRo(t);return e.pcb_trace.list().filter(o=>!o.route||o.route.length<2?!1:t.subcircuit_id?!!(o.subcircuit_id&&n.has(o.subcircuit_id)):!0)}function NMe(t){return typeof t!="string"||t.length===0?[]:t.split("__").flatMap(e=>{if(e.length===0)return[];const n=[e],o=e.indexOf("_reroute_");return o>0&&n.push(e.slice(0,o)),n})}function RMe(t,e){if(!(typeof e!="string"||e.length===0)){t.add(e);for(const n of NMe(e))t.add(n)}}function oRo({group:t,outputPcbTraces:e,pcbTraceIdsToReplace:n=[]}){const o=t.root?.db;if(!o)return;const i=new Set(n),r=new Set;for(const A of e){if(A.type!=="pcb_trace")continue;const c=A;i.add(c.pcb_trace_id),RMe(r,c.source_trace_id),RMe(r,c.connection_name),RMe(r,c.rootConnectionName)}if(i.size===0&&r.size===0)return;const s=DMe(t).filter(A=>i.has(A.pcb_trace_id)||!!(A.source_trace_id&&A.subcircuit_id===t.subcircuit_id&&r.has(A.source_trace_id)));if(s.length===0)return;const a=new Set(s.map(A=>A.pcb_trace_id));for(const A of o.pcb_via.list())A.pcb_trace_id&&a.has(A.pcb_trace_id)&&o.pcb_via.delete(A.pcb_via_id);for(const A of s)o.pcb_trace.delete(A.pcb_trace_id)}function iRo(t){return DMe(t).map(tRo)}function rRo(t){const e=t.filter(s=>s.route_type==="jumper"),n=t.filter(s=>s.route_type!=="jumper");if(e.length===0)return null;const o=[];for(const s of e){const a=s.start,A=s.end;let c=-1,l=-1,u=1/0,g=1/0;for(let h=0;h<n.length;h++){const d=n[h];if(d.route_type!=="wire")continue;const p=Math.hypot(d.x-a.x,d.y-a.y),m=Math.hypot(d.x-A.x,d.y-A.y);p<u&&(u=p,c=h),m<g&&(g=m,l=h)}c>l&&([c,l]=[l,c]),c>=0&&l>=0&&c!==l&&o.push({startIdx:c,endIdx:l})}o.sort((s,a)=>s.startIdx-a.startIdx);const i=[];let r=0;for(const s of o)r<s.startIdx&&i.push(n.slice(r,s.startIdx+1)),r=s.endIdx;return r<n.length&&i.push(n.slice(r)),i}function skt(t,e){const{width:n,height:o,pcbAnchorAlignment:i}=e;if(!i)return t;const r=i;if(typeof n!="number"||typeof o!="number")return t;const s=t.x,a=t.y;switch(r){case"top_left":return{x:s+n/2,y:a-o/2};case"top_center":return{x:s,y:a-o/2};case"top_right":return{x:s-n/2,y:a-o/2};case"center_left":return{x:s+n/2,y:a};case"center_right":return{x:s-n/2,y:a};case"bottom_left":return{x:s+n/2,y:a+o/2};case"bottom_center":return{x:s,y:a+o/2};case"bottom_right":return{x:s-n/2,y:a+o/2};default:return t}}var akt=(t,e)=>{const n=W7(t);return Math.hypot(n.x-e.x,n.y-e.y)},Akt=t=>{const e=t.root?.platform;return e!==void 0&&"allowLegacyAutorouters"in e&&e.allowLegacyAutorouters===!0},ckt=t=>{if(Akt(t))return null;const e=t._parsedProps.autorouter??t.getInheritedProperty("autorouter");return dRt(e)},lkt=t=>{if(Akt(t))return null;const e=ckt(t);if(e)return e;const n=t.selectAll("autoroutingphase").map(o=>o._parsedProps.autorouter);for(const o of n){const i=dRt(o);if(i)return i}return null},sRo=({db:t,route:e,routeThicknessMode:n,sourceTraceId:o})=>{if(!o||e.length<2)return e;const r=t.source_trace.get(o)?.connected_source_port_ids[0];if(!r)return e;const s=t.pcb_port.list().find(c=>c.source_port_id===r);if(!s)return e;const a=e[0],A=e[e.length-1];return akt(A,s)<akt(a,s)?B0e(e,n):e},A6=class extends g0{pcb_group_id=null;schematic_group_id=null;subcircuit_id=null;_hasStartedAsyncAutorouting=!1;_pcbPlacementDrcErrorCount=null;_pcbPlacementDrcCheckError=null;_pcbPlacementDrcChecksPending=!1;_standaloneSubcircuitDrcChecksComplete=!1;_standaloneSubcircuitDrcChecksInProgress=!1;_isInflatedFromCircuitJson=!1;_isolatedCircuitJson=null;get _isIsolatedSubcircuit(){return!!this.getInheritedProperty("_subcircuitCachingEnabled")}_normalComponentNameMap=null;getNormalComponentNameMap(){if(this._normalComponentNameMap)return this._normalComponentNameMap;const t=new Map,e=n=>{if(n._isNormalComponent&&n.name){const o=t.get(n.name);o?o.push(n):t.set(n.name,[n])}for(const o of n.children)o.isSubcircuit||e(o)};for(const n of this.children)n.isSubcircuit||e(n);return this._normalComponentNameMap=t,t}_asyncAutoroutingResult=null;get config(){return{zodProps:mwn,componentName:"Group"}}initPorts(t={}){const e=this._getSchematicPortArrangement();this._parsedProps?.showAsSchematicBox&&!this._parsedProps.pinLabels&&e&&rPe(e).some(o=>typeof o=="string")||super.initPorts(t)}_getSchematicPortArrangementFromPortDirections(){if(!this._parsedProps?.showAsSchematicBox)return null;const t={leftSide:[],rightSide:[],topSide:[],bottomSide:[]};for(const n of this.children){if(n.componentName!=="Port")continue;const o=n._parsedProps.direction;if(!o)continue;const i=n._parsedProps.pinNumber??n._parsedProps.name??void 0;if(i===void 0)continue;t[o==="left"?"leftSide":o==="right"?"rightSide":o==="up"?"topSide":"bottomSide"].push(i)}if(t.leftSide.length===0&&t.rightSide.length===0&&t.topSide.length===0&&t.bottomSide.length===0)return null;const e={};return t.leftSide.length>0&&(e.leftSide={pins:t.leftSide,direction:"top-to-bottom"}),t.rightSide.length>0&&(e.rightSide={pins:t.rightSide,direction:"top-to-bottom"}),t.topSide.length>0&&(e.topSide={pins:t.topSide,direction:"left-to-right"}),t.bottomSide.length>0&&(e.bottomSide={pins:t.bottomSide,direction:"left-to-right"}),e}_getSchematicPortArrangement(){return super._getSchematicPortArrangement()??this._getSchematicPortArrangementFromPortDirections()}_ensureSchematicBoxPortsFromConnections(){if(this._parsedProps?.showAsSchematicBox&&this._parsedProps?.connections)for(const[t,e]of Object.entries(this._parsedProps.connections)){if(this.children.find(r=>r.componentName==="Port"&&r.isMatchingAnyOf([t])))continue;const o=t.match(/^pin(\d+)$/i)??t.match(/^(\d+)$/),i=o?Number(o[1]):void 0;this.add(new Pu({name:t,pinNumber:i,connectsTo:e}))}}doInitialInitializePortsFromChildren(){super.doInitialInitializePortsFromChildren(),this._ensureSchematicBoxPortsFromConnections()}updateInitializePortsFromChildren(){super.updateInitializePortsFromChildren(),this._ensureSchematicBoxPortsFromConnections()}_getPrimaryPinCount(){const t=super._getPrimaryPinCount();if(!this._parsedProps?.showAsSchematicBox)return t;const e=this.children.filter(n=>n.componentName==="Port").map(n=>n._parsedProps.pinNumber).filter(n=>n!==void 0);return e.length===0?t:Math.max(t,...e)}_getPinLabelsFromPorts(){return this._parsedProps?.showAsSchematicBox?KMo(this):super._getPinLabelsFromPorts()}doInitialSourceGroupRender(){const{db:t}=this.root,e=typeof this._parsedProps.name=="string"&&this._parsedProps.name.length>0,n=t.source_group.insert({name:this.name,is_subcircuit:this.isSubcircuit,was_automatically_named:!e});this.source_group_id=n.source_group_id,this.isSubcircuit&&(this.subcircuit_id=`subcircuit_${n.source_group_id}`,t.source_group.update(n.source_group_id,{subcircuit_id:this.subcircuit_id}))}doInitialSourceRender(){const{db:t}=this.root;for(const n of this.getDescendants())n.getGroup()?.source_group_id===this.source_group_id&&t.source_component.update(n.source_component_id,{source_group_id:this.source_group_id});if(!this.isSubcircuit)return;const e=lkt(this);e&&t.source_property_ignored_warning.insert({source_component_id:this.source_component_id??"",property_name:"autorouter",subcircuit_id:this.subcircuit_id??void 0,error_type:"source_property_ignored_warning",message:`The "${e}" autorouter is deprecated, so autorouting has been disabled for this subcircuit. Use the default autorouter and introduce <autoroutingphase /> or <fanout /> elements as needed.`})}doInitialSourceParentAttachment(){const{db:t}=this.root,e=this.parent?.getGroup?.();if(e?.source_group_id&&t.source_group.update(this.source_group_id,{parent_source_group_id:e.source_group_id}),!this.isSubcircuit||U0e(this.parent))return;const n=this.parent?.getSubcircuit?.()?.subcircuit_id;n&&t.source_group.update(this.source_group_id,{parent_subcircuit_id:n})}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=e,o=n.outline&&n.outline.length>0,i=o?n.outline.map(c=>({x:lt.parse(c.x),y:lt.parse(c.y)})):void 0,r=this.props,s=this._getGlobalPcbPositionBeforeLayout(),a=skt(s,r),A=t.pcb_group.insert({is_subcircuit:this.isSubcircuit,subcircuit_id:this.subcircuit_id??this.getSubcircuit()?.subcircuit_id,name:this.name,anchor_position:s,center:a,...o?{outline:i}:{width:0,height:0},pcb_component_ids:[],source_group_id:this.source_group_id,autorouter_configuration:e.autorouter?{trace_clearance:e.autorouter.traceClearance}:void 0,anchor_alignment:e.pcbAnchorAlignment??null});this.pcb_group_id=A.pcb_group_id;for(const c of this.children)t.pcb_component.update(c.pcb_component_id,{pcb_group_id:A.pcb_group_id})}doInitialPcbPrimitiveRender(){this.calculatePcbGroupBounds()}calculatePcbGroupBounds(t){if(!this.pcb_group_id||this.root?.pcbDisabled)return;const{db:e}=this.root,n=this._parsedProps,o=n.outline&&n.outline.length>0,i=this._parsedProps.pcbX!==void 0||this._parsedProps.pcbY!==void 0;if(o){const m=n.outline.map(y=>({x:lt.parse(y.x),y:lt.parse(y.y)})),_=Oh(m);if(!_)return;const f=(_.minX+_.maxX)/2,I=(_.minY+_.maxY)/2,C=i?e.pcb_group.get(this.pcb_group_id)?.center??{x:f,y:I}:{x:f,y:I};e.pcb_group.update(this.pcb_group_id,{center:C});return}let r=t;if(!r){const m=L0e(this.children);r={center:{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2},width:m.width,height:m.height}}let{width:s,height:a}=r,{x:A,y:c}=r.center;if(this.isSubcircuit||this.isRoutingDirective){const{padLeft:m,padRight:_,padTop:f,padBottom:I}=this._resolvePcbPadding();s+=m+_,a+=f+I,A+=(_-m)/2,c+=(f-I)/2}const l=Number(n.width??s),u=Number(n.height??a),h=e.pcb_group.get(this.pcb_group_id)?.center??{x:A,y:c},d=this.isSubcircuit||t!==void 0;let p=i?d?{x:n.width===void 0?A:h.x,y:n.height===void 0?c:h.y}:h:{x:A,y:c};if(i&&n.pcbAnchorAlignment){const m=this._getGlobalPcbPositionBeforeLayout(),_=skt(m,{...this.props,width:l,height:u});(Math.abs(_.x-p.x)>1e-6||Math.abs(_.y-p.y)>1e-6)&&this._repositionOnPcb(_),p=_}e.pcb_group.update(this.pcb_group_id,{width:l,height:u,center:p})}updatePcbPrimitiveRender(){this.calculatePcbGroupBounds()}unnamedElementCounter={};getNextAvailableName(t){return this.unnamedElementCounter[t.lowercaseComponentName]??=1,`unnamed_${t.lowercaseComponentName}${this.unnamedElementCounter[t.lowercaseComponentName]++}`}_resolvePcbPadding(){const t=this._parsedProps,e=t.pcbLayout,n=l=>{const u=e?.[l],g=t[l];if(typeof u=="number")return u;if(typeof g=="number")return g},o=n("padding")??0,i=n("paddingX"),r=n("paddingY"),s=n("paddingLeft")??i??o,a=n("paddingRight")??i??o,A=n("paddingTop")??r??o,c=n("paddingBottom")??r??o;return{padLeft:s,padRight:a,padTop:A,padBottom:c}}doInitialCreateTraceHintsFromProps(){const{_parsedProps:t}=this,{db:e}=this.root,n=t;if(!this.isSubcircuit)return;const o=n.manualEdits?.manual_trace_hints;if(o)for(const i of o)this.add(new qRt({for:i.pcb_port_selector,offsets:i.offsets}))}doInitialSourceAddConnectivityMapKey(){mNo(this),hMo(this)}_areChildSubcircuitsRouted(){const t=this._findDirectChildSubcircuits();for(const e of t)if(!e._isInflatedFromCircuitJson&&e._hasTracesToRoute()&&e._shouldRouteAsync()&&!e._asyncAutoroutingResult)return!1;return!0}_findDirectChildSubcircuits(){const t=[],e=n=>{for(const o of n)o.isSubcircuit&&o!==this?t.push(o):e(o.children)};return e(this.children),t}_shouldRouteAsync(){if(this._isLegacyAutorouterDisabled())return!1;const t=this._getAutorouterConfig();return t.groupMode==="sequential-trace"?!1:!!(t.local&&t.groupMode==="subcircuit"||!t.local)}_getRoutingPhasePlans(){return QNo(this)}_hasTracesToRoute(){const t=vc("tscircuit:core:_hasTracesToRoute"),e=this._getRoutingPhasePlans();let n=0,o=!1;for(const i of e){n+=i.traces.length;const r=i.autorouter?h$(i.autorouter,this.root?.platform):void 0;o||=!!(i.reroute&&(i.region||r?.preset==="simplify"))}if(t(`[${this.getString()}] has ${n} traces to route`),n>0)return!0;if(o){const i=DMe(this).length;return t(`[${this.getString()}] has ${i} existing pcb traces available for reroute`),i>0}return!1}async _runEffectMakeHttpAutoroutingRequest(){const{db:t}=this.root,e=vc("tscircuit:core:_runEffectMakeHttpAutoroutingRequest"),n=this._parsedProps,o=this._getAutorouterConfig(),i=o.serverUrl,r=o.serverMode,s=(c,l)=>(e("fetching",c),l.headers&&(l.headers["Tscircuit-Core-Version"]=this.root?.getCoreVersion()),fetch(c,l)),a=this.root.db.toArray().filter(c=>c.type.startsWith("source_")||c.type.startsWith("pcb_"));if(r==="solve-endpoint"){if(this.props.autorouter?.inputFormat==="simplified"){const l=n.defaultTraceWidth??n.nominalTraceWidth,{simpleRouteJson:u}=fMe({db:t,minTraceWidth:Number(n.minTraceWidth??.15),nominalTraceWidth:l!=null?Number(l):void 0,subcircuit_id:this.subcircuit_id,subcircuitComponent:this});u.allowViaInPad=o.allowViaInPad;const{autorouting_result:g}=await s(`${i}/autorouting/solve`,{method:"POST",body:JSON.stringify({input_simple_route_json:u,subcircuit_id:this.subcircuit_id}),headers:{"Content-Type":"application/json"}}).then(h=>h.json());this._asyncAutoroutingResult=g,this._markDirty("PcbTraceRender");return}const{autorouting_result:c}=await s(`${i}/autorouting/solve`,{method:"POST",body:JSON.stringify({input_circuit_json:a,subcircuit_id:this.subcircuit_id}),headers:{"Content-Type":"application/json"}}).then(l=>l.json());this._asyncAutoroutingResult=c,this._markDirty("PcbTraceRender");return}const{autorouting_job:A}=await s(`${i}/autorouting/jobs/create`,{method:"POST",body:JSON.stringify({input_circuit_json:a,provider:"freerouting",autostart:!0,display_name:this.root?.name,subcircuit_id:this.subcircuit_id,server_cache_enabled:o.serverCacheEnabled}),headers:{"Content-Type":"application/json"}}).then(c=>c.json());for(;;){const{autorouting_job:c}=await s(`${i}/autorouting/jobs/get`,{method:"POST",body:JSON.stringify({autorouting_job_id:A.autorouting_job_id}),headers:{"Content-Type":"application/json"}}).then(l=>l.json());if(c.is_finished){const{autorouting_job_output:l}=await s(`${i}/autorouting/jobs/get_output`,{method:"POST",body:JSON.stringify({autorouting_job_id:A.autorouting_job_id}),headers:{"Content-Type":"application/json"}}).then(u=>u.json());this._asyncAutoroutingResult={output_pcb_traces:l.output_pcb_traces},this._markDirty("PcbTraceRender");break}if(c.has_error){const l=new Oj(`Autorouting job failed: ${JSON.stringify(c.error)}`);throw t.pcb_autorouting_error.insert({pcb_error_id:A.autorouting_job_id,error_type:"pcb_autorouting_error",message:l.message}),l}await new Promise(l=>setTimeout(l,100))}}async _runLocalAutorouting(){const{db:t}=this.root,e=this._parsedProps,n=vc("tscircuit:core:_runLocalAutorouting");n(`[${this.getString()}] starting local autorouting`);const o=this._getAutorouterConfig(),i=this._isLaserPrefabAutorouter(o),r=this._isAutoJumperAutorouter(o),s=this._getSubcircuitLayerCount()===1,a=Number(e.minTraceWidth??.15),A=Number(e.defaultTraceWidth??e.nominalTraceWidth??a),c=this._getRoutingPhasePlans(),l=NNo(c),u=c.length>1,g=new Map(c.map((k,R)=>[k,R]));if(u)for(const k of t.pcb_debug_object.list())k.subcircuit_id===this.subcircuit_id&&(k.label?.startsWith("Autorouting phase: ")||/^autorouting phase \d+(?: |$)/.test(k.label??""))&&t.pcb_debug_object.delete(k.pcb_debug_object_id);const h=(k,R)=>{if(!u)return;const F=g.get(k);if(F===void 0)return;const O=k.phaseName?.trim();t.pcb_debug_object.insert({shape:"rect",center:{x:(R.minX+R.maxX)/2,y:(R.minY+R.maxY)/2},size:{width:R.maxX-R.minX,height:R.maxY-R.minY},label:`autorouting phase ${F}${O?` ${O}`:""}`,subcircuit_id:this.subcircuit_id??void 0})},d=c.flatMap(k=>{const R=k.autorouter?h$(k.autorouter,this.root?.platform):o,F=k.getPrecomputedRoutingResult?{...R,allowViaInPad:(typeof k.autorouter=="object"?k.autorouter.allowViaInPad:void 0)??o.allowViaInPad}:R,O=RPo(F,this.root?.platform);return O.map((U,Y)=>({...U,routingPhasePlan:k,phaseStageIndex:Y,phaseStageCount:O.length}))}),m=d.some(({autorouterConfig:k})=>["fanout","single_layer_fanout"].includes(k.preset??""))?fNo(this,c):void 0;let{simpleRouteJson:_}=fMe({db:t,minTraceWidth:a,nominalTraceWidth:A,subcircuit_id:this.subcircuit_id,subcircuitComponent:this,fanoutPourNetMap:m});const f=k=>{const R=k.fanoutRegionPcbGroupId;if(!R)return;const F=t.pcb_group.get(R),O=t.pcb_component.list().find(W=>W.pcb_group_id===R)?.source_component_id;if(!O)return;const U=`${F?.name??"Breakout"} defines conflicting fanout bounds with explicit breakout geometry and fanoutBoundaryPadding. Explicit breakout geometry takes precedence, so fanoutBoundaryPadding is ignored.`;t.source_property_ignored_warning.list().some(W=>W.source_component_id===O&&W.property_name==="fanoutBoundaryPadding"&&W.message===U)||t.source_property_ignored_warning.insert({source_component_id:O,property_name:"fanoutBoundaryPadding",message:U,error_type:"source_property_ignored_warning",subcircuit_id:F?.subcircuit_id})},I=new Map;for(const k of d){const R=k.autorouterConfig.preset;(R==="fanout"||R==="single_layer_fanout")&&!I.has(k.routingPhasePlan)&&I.set(k.routingPhasePlan,k.autorouterConfig)}const C=[];for(const[k,R]of I){const F=k.fanoutRegionPcbGroupId;if(!F)continue;let O=Lue(_,k);if(O.connections.length===0)continue;O=nkt(O,k.drcTolerances);const U=t.pcb_breakout_point.list().filter(ie=>ie.pcb_group_id===F).map(ie=>({x:ie.x,y:ie.y})),Y=R.preset,W=aMe.resolveFanoutBounds(O,{mode:Y,busFanoutDirections:k.busFanoutDirections,fanoutBounds:k.fanoutBounds,fanoutBoundaryPadding:k.fanoutBoundaryPadding,fanoutRoutingLayers:k.fanoutRoutingLayers,allowBlindAndBuriedVias:O.allowBlindAndBuriedVias,breakoutPoints:U,onFanoutBoundsConflict:()=>f(k)});if(k.fanoutBounds=W,!W)continue;const te=t.pcb_group.get(F),j=Math.max(O.minTraceWidth,...O.connections.map(ie=>ie.nominalTraceWidth??ie.width??O.minTraceWidth)),J=O.minViaPadDiameter??O.min_via_pad_diameter??O.minViaDiameter,oe=O.minTraceToPadEdgeClearance??O.defaultObstacleMargin??j;C.push({regionId:F,name:te?.name??k.phaseName??F,bounds:W,boundaryKeepaway:gRt({traceWidth:j,traceToPadClearance:oe,viaPadDiameter:J})/2})}const y=UNo(C);if(y){const{firstRegion:k,secondRegion:R,availableGap:F,requiredGap:O}=y,U=F<0?`overlap by ${Math.abs(F).toFixed(3)}mm`:`are only ${F.toFixed(3)}mm apart`,Y=`Fanout regions "${k.name}" and "${R.name}" ${U}, but at least ${O.toFixed(3)}mm of separation is required for a via-safe routing channel. Move the components farther apart or reduce their facing fanout padding.`;throw t.pcb_autorouting_error.insert({pcb_error_id:`pcb_autorouter_error_subcircuit_${this.subcircuit_id}`,error_type:"pcb_autorouting_error",message:Y}),this.root?.emit("autorouting:error",{subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),error:{message:Y},simpleRouteJson:_}),new Error(Y)}for(const{regionId:k,bounds:R}of C)t.pcb_group.update(k,{center:{x:(R.minX+R.maxX)/2,y:(R.minY+R.maxY)/2},width:R.maxX-R.minX,height:R.maxY-R.minY});const x=[],E=[],B=new Set,S=iRo(this),Q=(k,R)=>{const F=k.connection_name??k.pcb_trace_id,O=new Set([F,k.pcb_trace_id,...NMe(F),...NMe(k.pcb_trace_id)]);return _.connections.some(U=>tkt(U,R)?O.has(U.name)||(U.source_trace_id?O.has(U.source_trace_id):!1)||(U.rootConnectionName?O.has(U.rootConnectionName):!1)||U.mergedConnectionNames?.some(Y=>O.has(Y)):!1)},w=new Set;let M;for(const[k,{routingPhasePlan:R,autorouterConfig:F,strategy:O,usesPreviousStageOutput:U,phaseStageIndex:Y,phaseStageCount:W}]of d.entries()){if(U||(M=void 0),U&&M===void 0)throw new Error("Autorouting follow-up stage is missing the preceding stage output");let te=M??_;const j=!!(R.reroute&&F.preset==="simplify"),J=!!(R.reroute&&R.region&&!j),oe=!!(R.reroute&&!j&&!R.region&&R.traces.length>0),ie=J||oe||j,ne=J?{..._,traces:[...S,...x]}:null;if(!U&&j)te={...Lue(_,R),traces:kO({accumulatedPcbTraces:S,stageOutputPcbTraces:x})};else if(!U&&J&&ne)te=Iho(ne,{...R.region});else if(!U&&oe){const Le=Lue(_,R);te={...Le,traces:[...Le.traces??[],...x.filter(Ye=>!Q(Ye,R))]}}else if(!U&&l){const Le=Lue(_,R),Ye=R.routingPcbGroupId;if(Ye){const At=fMe({db:t,minTraceWidth:a,nominalTraceWidth:A,subcircuit_id:this.subcircuit_id,subcircuitComponent:this,routingPcbGroupId:Ye,fanoutPourNetMap:m}).simpleRouteJson.obstacles.filter(nt=>nt.isCopperPour),at=Le.obstacles.filter(nt=>!nt.isCopperPour);Le.obstacles=at.concat(At)}te={...Le,traces:kO({accumulatedPcbTraces:Le.traces??[],stageOutputPcbTraces:x})}}te=U8o(te,w),te=nkt(te,R.drcTolerances),te.allowViaInPad=F.allowViaInPad;const le=U?void 0:R.getPrecomputedRoutingResult,ge=!!(j&&te.traces?.length===0);if((l||ie||U)&&(te.connections.length===0&&!j&&!le||ge)){Y===0&&h(R,te.bounds),M=te;continue}const _e=R.autorouter!==void 0?this._isAutoJumperAutorouter(F):r,ue=R.autorouter!==void 0?this._isLaserPrefabAutorouter(F):i;_e&&(te.allowJumpers=!0,F.availableJumperTypes&&(te.availableJumperTypes=F.availableJumperTypes));const fe=F.preset;if((fe==="fanout"||fe==="single_layer_fanout")&&!R.fanoutRegionPcbGroupId&&!le&&(R.fanoutBounds=aMe.resolveFanoutBounds(te,{mode:fe,busFanoutDirections:R.busFanoutDirections,fanoutBounds:R.fanoutBounds,fanoutBoundaryPadding:R.fanoutBoundaryPadding,fanoutRoutingLayers:R.fanoutRoutingLayers,allowBlindAndBuriedVias:te.allowBlindAndBuriedVias})),Y===0&&h(R,R.fanoutBounds??te.bounds),n.enabled&&global.debugOutputArray?.push({name:`simpleroutejson-${this.props.name}.json`,obj:te}),n.enabled){const Le=mx(te);Le.title=`autorouting-${this.props.name}`,global.debugGraphics?.push(Le)}const pe=F.autorouterVersion??this.props.autorouterVersion,ye=this.props.autorouterEffortLevel,Me=ye?Number.parseInt(ye.replace("x",""),10):void 0,ve={capacityDepth:F.capacityDepth,targetMinCapacity:F.targetMinCapacity,platformConfig:this.root?.platform,useAssignableSolver:ue||s,useAutoJumperSolver:_e,useLaserPrefabSolver:ue,autorouterVersion:pe,effort:Me},he=le?"precomputed":F.algorithmFn?"custom":O.name,Qe=le||F.algorithmFn?void 0:O.getSolverName(ve),Pe={autorouterName:he,solverName:Qe,capacityDepth:ve.capacityDepth,targetMinCapacity:ve.targetMinCapacity,useAssignableSolver:ve.useAssignableSolver,useAutoJumperSolver:ve.useAutoJumperSolver,useLaserPrefabSolver:ve.useLaserPrefabSolver,useTraceSimplificationSolver:F.preset==="simplify",autorouterVersion:ve.autorouterVersion,effort:ve.effort},we=le||F.algorithmFn||!O.cacheable?void 0:this.root?.platform?.localCacheEngine,Te=we?vNo(te,Pe):void 0,Re=Te?await wNo({cacheEngine:we,cacheKey:Te}):null,Ee=le?"precomputed":F.algorithmFn?"custom_algorithm":O.cacheable?we?void 0:"no_cache_engine":"strategy_not_cacheable",ke={routingPhaseIndex:k,phaseOrdinal:k+1,phaseCount:d.length,connectionCount:te.connections.length,obstacleCount:te.obstacles.length,previousTraceCount:te.traces?.length??0,isReroutePhase:ie,autorouterName:he,autorouterVersion:pe,solverName:Qe,effort:Me,cacheStatus:we?Re?"hit":"miss":"disabled",cacheKey:Te,cacheDisabledReason:Ee};this.root?.emit("autorouting:start",{type:"autorouting:start",subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,simpleRouteJson:te});let Ce;try{let Le,Ye;if(le){const bt=le(te);Le=bt.traces,Ye=bt.outputSimpleRouteJson;for(const Ct of Le)w.add(Ct.pcb_trace_id)}else if(Re)n(`[${this.getString()}] using cached local autorouting result`),Le=Re.traces;else{if(F.algorithmFn?Ce=await F.algorithmFn(te):Ce=O.create({simpleRouteJson:te,commonAutorouterOptions:ve,busFanoutDirections:R.busFanoutDirections,fanoutBounds:R.fanoutBounds,fanoutRoutingLayers:R.fanoutRoutingLayers,allowBlindAndBuriedVias:te.allowBlindAndBuriedVias,componentNamesById:pwo(t),onSolverStarted:({solverName:Dt,solverParams:kt,solverConstructorArgs:it})=>this.root?.emit("solver:started",{type:"solver:started",solverName:Dt,solverParams:kt,solverConstructorArgs:it,componentName:this.getString()})}),!Ce)throw new Error("Failed to create local autorouter");const bt=Ce,Ct=new Promise((Dt,kt)=>{bt.on("complete",it=>{n(`[${this.getString()}] local autorouting complete`),Dt(it.traces)}),bt.on("error",it=>{n(`[${this.getString()}] local autorouting error: ${it.error.message}`),kt(it.error)})});bt.on("progress",Dt=>{this.root?.emit("autorouting:progress",{subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,...Dt,type:"autorouting:progress"})}),bt.start(),Le=await Ct}let tt=Ye??Ce?.getOutputSimpleRouteJson?.();if(tt&&!U&&["fanout","single_layer_fanout"].includes(F.preset??"")&&R.routingPcbGroupId){const bt=LNo({fanoutInputSimpleRouteJson:te,fanoutOutputSimpleRouteJson:tt,baseSimpleRouteJson:_,routingPhasePlan:R});_=bt.baseSimpleRouteJson,tt=bt.downstreamSimpleRouteJson;for(const Ct of bt.synchronizedBreakoutPoints){const Dt=t.pcb_breakout_point.list().find(kt=>kt.pcb_group_id===Ct.routingPcbGroupId&&kt.source_trace_id===Ct.sourceTraceId&&Math.abs(kt.x-Ct.previousPoint.x)<=1e-6&&Math.abs(kt.y-Ct.previousPoint.y)<=1e-6);Dt&&t.pcb_breakout_point.update(Dt.pcb_breakout_point_id,{x:Ct.fanoutExitPoint.x,y:Ct.fanoutExitPoint.y})}}let At=Le;tt?.traces?At=tt.traces:U&&(At=kO({accumulatedPcbTraces:te.traces??[],stageOutputPcbTraces:Le}));let at=At;!tt&&!U&&R.routingPhaseIndex!==null&&(at=kO({accumulatedPcbTraces:te.traces??[],stageOutputPcbTraces:Le}));const nt={...tt??te,traces:at};if(M=tt?nt:void 0,!Re&&Te&&await PNo({cacheEngine:we,cacheKey:Te,result:{...te,traces:Le}}),this.root?.emit("autorouting:end",{type:"autorouting:end",subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,simpleRouteJson:nt}),Ce?.getConnectedOffboardObstacles){const bt=Ce.getConnectedOffboardObstacles();hwo({db:t,connectedOffboardObstacles:bt,simpleRouteJson:te,subcircuit_id:this.subcircuit_id})}const gt=Ce?.solver;if(gt?.getOutputJumpers&&E.push(...gt.getOutputJumpers()||[]),J&&ne){for(const Ct of ne.traces??[])Ct.type==="pcb_trace"&&B.add(Ct.pcb_trace_id);const bt=Cho(ne,{...te,traces:[...te.traces??[],...Le]});x.splice(0,x.length,...bt.traces??[])}else if(oe){const bt=x.filter(Ct=>!Q(Ct,R));x.splice(0,x.length,...kO({accumulatedPcbTraces:bt,stageOutputPcbTraces:At}))}else{if(j)for(const bt of S)B.add(bt.pcb_trace_id);x.splice(0,x.length,...kO({accumulatedPcbTraces:x,stageOutputPcbTraces:At}))}}catch(Le){const{db:Ye}=this.root;throw Ye.pcb_autorouting_error.insert({pcb_error_id:`pcb_autorouter_error_subcircuit_${this.subcircuit_id}`,error_type:"pcb_autorouting_error",message:Le instanceof Error?Le.message:String(Le)}),this.root?.emit("autorouting:error",{type:"autorouting:error",subcircuit_id:this.subcircuit_id,componentDisplayName:this.getString(),...R.phaseName!==void 0?{phaseName:R.phaseName,phaseStageIndex:Y,phaseStageCount:W}:{},...ke,error:{message:Le instanceof Error?Le.message:String(Le)},simpleRouteJson:te}),Le}finally{Ce?.stop()}}this._asyncAutoroutingResult={output_pcb_traces:x,output_jumpers:E,pcb_trace_ids_to_be_replaced:[...B]},this._markDirty("PcbTraceRender")}_startAsyncAutorouting(){this._hasStartedAsyncAutorouting||(this._hasStartedAsyncAutorouting=!0,this._getAutorouterConfig().local?this._queueAsyncEffect("autorouting",async()=>this._runLocalAutorouting()):this._queueAsyncEffect("make-http-autorouting-request",async()=>this._runEffectMakeHttpAutoroutingRequest()))}doInitialPcbTraceRender(){const t=vc("tscircuit:core:doInitialPcbTraceRender");if(!this.isSubcircuit||this.root?.pcbDisabled||this.root?.pcbRoutingDisabled||this.getInheritedProperty("routingDisabled")||this._isInflatedFromCircuitJson||this._isLegacyAutorouterDisabled()||this._shouldUseTraceByTraceRouting())return;if(!this._areChildSubcircuitsRouted()){t(`[${this.getString()}] child subcircuits are not routed, skipping async autorouting until subcircuits routed`);return}if(t(`[${this.getString()}] no child subcircuits to wait for, initiating async routing`),!this._hasTracesToRoute())return;const e=jwe({component:this,subcircuit:this}),n=$we({component:this,subcircuit:this});e||n||this._startAsyncAutorouting()}doInitialSchematicTraceRender(){this._parsedProps.showAsSchematicBox||JDo(this)}doInitialSchematicSheetRender(){pTt(this)}updateSchematicSheetRender(){hDo(this)}updatePcbTraceRender(){const t=vc("tscircuit:core:updatePcbTraceRender");if(t(`[${this.getString()}] updating...`),!this.isSubcircuit||this._isInflatedFromCircuitJson||this._isLegacyAutorouterDisabled())return;if(this._shouldRouteAsync()&&this._hasTracesToRoute()&&!this._hasStartedAsyncAutorouting){if(this._areChildSubcircuitsRouted()){const n=jwe({component:this,subcircuit:this}),o=$we({component:this,subcircuit:this});if(n||o)return;t(`[${this.getString()}] child subcircuits are now routed, starting async autorouting`),this._startAsyncAutorouting()}return}if(!this._asyncAutoroutingResult||this._shouldUseTraceByTraceRouting())return;const{db:e}=this.root;if(this._asyncAutoroutingResult.output_simple_route_json){t(`[${this.getString()}] updating PCB traces from simple route json (${this._asyncAutoroutingResult.output_simple_route_json.traces?.length} traces)`),this._updatePcbTraceRenderFromSimpleRouteJson();return}if(this._asyncAutoroutingResult.output_pcb_traces){t(`[${this.getString()}] updating PCB traces from ${this._asyncAutoroutingResult.output_pcb_traces.length} traces`),this._updatePcbTraceRenderFromPcbTraces();return}}_updatePcbTraceRenderFromSimpleRouteJson(){const{db:t}=this.root,{traces:e}=this._asyncAutoroutingResult.output_simple_route_json;if(e)for(const n of e){const o=n.route.map(r=>r.route_type!=="through_obstacle"?r:{route_type:"through_pad",start:r.start,end:r.end,start_layer:r.from_layer,end_layer:r.to_layer,width:r.width,circuitJsonMetadata:r.circuitJsonMetadata}),i=t.pcb_trace.insert({subcircuit_id:this.subcircuit_id,route:Wwe(o)});ikt({db:t,pcbTrace:i,routeWithSrjMetadata:o})}}_updatePcbTraceRenderFromPcbTraces(){const{output_pcb_traces:t,output_jumpers:e,pcb_trace_ids_to_be_replaced:n}=this._asyncAutoroutingResult;if(!t)return;const{db:o}=this.root,i=this.getInheritedMergedProperty("pcbStyle"),{holeDiameter:r,padDiameter:s}=$N(i),a=this._getBoard(),A=a?.pcb_board_id?o.pcb_board.get(a.pcb_board_id):o.pcb_board.list()[0],c=A?.min_via_hole_diameter??r,l=A?.min_via_pad_diameter??s;e&&e.length>0&&eRo({db:o,output_jumpers:e,subcircuit_id:this.subcircuit_id}),oRo({group:this,outputPcbTraces:t,pcbTraceIdsToReplace:n});const u=o.pcb_via.list();for(const g of t){if(g.type!=="pcb_trace")continue;g.subcircuit_id??=this.subcircuit_id;let h=g.route.map(_=>_.route_type!=="through_obstacle"?_:{route_type:"through_pad",start:_.start,end:_.end,start_layer:_.from_layer,end_layer:_.to_layer,width:_.width,circuitJsonMetadata:_.circuitJsonMetadata});const d=MMe({db:o,trace:{...g,route:h},subcircuit_id:this.subcircuit_id});h=sRo({db:o,route:h,routeThicknessMode:g.route_thickness_mode,sourceTraceId:d}),g.route=h;let p=rRo(h);p===null&&(p=[h]);const m=YNo(p,o);for(const _ of m)if(_.length>0){const f=Wwe(_),I=MMe({db:o,trace:{...g,route:f},subcircuit_id:this.subcircuit_id}),C=o.pcb_trace.insert({...g,source_trace_id:I,route:f});ikt({db:o,pcbTrace:C,routeWithSrjMetadata:_})}}for(const g of t)if(g.type!=="pcb_via"&&g.type==="pcb_trace"){const h=MMe({db:o,trace:g,subcircuit_id:this.subcircuit_id}),{connection_name:d}=g;let p;if(h&&(p=o.source_trace.get(h)?.subcircuit_connectivity_map_key),!p&&d){const m=o.source_net.get(d);m&&(p=m.subcircuit_connectivity_map_key)}for(const m of g.route)if(m.route_type==="via"){const _=m,f=m.from_layer,I=m.to_layer,C={pcb_trace_id:g.pcb_trace_id,x:m.x,y:m.y,hole_diameter:_.via_hole_diameter??_.hole_diameter??c,outer_diameter:_.via_diameter??_.outer_diameter??l,layers:hMt({fromLayer:f,toLayer:I,layerCount:this._getSubcircuitLayerCount(),allowBlindAndBuriedVias:A?.allow_blind_and_buried_vias??!1,physicalLayers:_.layers}),from_layer:f,to_layer:I,subcircuit_id:this.subcircuit_id,pcb_group_id:this.pcb_group_id??void 0,subcircuit_connectivity_map_key:p};if(u.some(y=>dwo(y,C)))continue;u.push(o.pcb_via.insert(C))}}}doInitialSchematicComponentRender(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=t.schematic_group.insert({is_subcircuit:this.isSubcircuit,subcircuit_id:this.subcircuit_id,name:this.name,center:this._getGlobalSchematicPositionBeforeLayout(),width:0,height:0,schematic_component_ids:[],source_group_id:this.source_group_id,show_as_schematic_box:e.showAsSchematicBox??!1});this.schematic_group_id=n.schematic_group_id,e.showAsSchematicBox&&VMo(this);for(const o of this.getDescendants())o.getGroup()?.source_group_id===this.source_group_id&&(o._parsedProps?.showAsSchematicBox||o.schematic_component_id&&t.schematic_component.update(o.schematic_component_id,{schematic_group_id:n.schematic_group_id}))}_getSchematicLayoutMode(){const t=this._parsedProps,e=t.schAutoLayoutEnabled??!1;if(t.schLayout?.layoutMode==="none"||t.schLayout?.layoutMode==="relative")return"relative";if(t.schLayout?.matchAdapt)return"match-adapt";if(t.schLayout?.flex)return"flex";if(t.schLayout?.grid)return"grid";if(t.schMatchAdapt)return"match-adapt";if(t.schFlex)return"flex";if(t.schGrid)return"grid";if(t.matchAdapt)return"match-adapt";if(t.flex)return"flex";if(t.grid)return"grid";if(t.relative||t.schRelative)return"relative";const n=this.children.some(i=>{const r=i._parsedProps;return(i.source_component_id!==null||i.source_group_id!==null)&&(r?.schX!==void 0||r?.schY!==void 0)}),o=(t.manualEdits?.schematic_placements?.length??0)>0;return e&&!o||!n&&!o?"match-adapt":"relative"}doInitialSchematicLayout(){if(this._parsedProps.showAsSchematicBox){this._insertSchematicBorder();return}if(this.children.some(o=>o.source_component_id!==null&&o._parsedProps?.schSectionName!==void 0)){this._doInitialSchematicLayoutSections(),this._insertSchematicBorder();return}const n=this._getSchematicLayoutMode();n==="match-adapt"&&this._doInitialSchematicLayoutMatchpack(),n==="grid"&&this._doInitialSchematicLayoutGrid(),n==="flex"&&this._doInitialSchematicLayoutFlex(),this._insertSchematicBorder()}_doInitialSchematicLayoutSections(){gDo(this)}_doInitialSchematicLayoutMatchAdapt(){WMo(this)}_doInitialSchematicLayoutMatchpack(){cDo(this)}_doInitialSchematicLayoutGrid(){JMo(this)}_doInitialSchematicLayoutFlex(){zMo(this)}_getPcbLayoutMode(){const t=this._parsedProps,e=this.props;if(this._isInflatedFromCircuitJson||t.pcbRelative)return"none";if(t.pcbLayout?.matchAdapt)return"match-adapt";if(t.pcbLayout?.flex)return"flex";if(t.pcbLayout?.grid)return"grid";if(t.pcbLayout?.pack)return"pack";if(t.pcbFlex)return"flex";if(t.pcbGrid)return"grid";if(t.pcbPack||t.pack)return"pack";if(t.matchAdapt)return"match-adapt";if(t.flex)return"flex";if(t.grid)return"grid";t.pcbX!==void 0||t.pcbY!==void 0||t.pcbLeftEdgeX!==void 0||t.pcbRightEdgeX!==void 0||t.pcbTopEdgeY!==void 0||t.pcbBottomEdgeY!==void 0||e.pcbLeftEdgeX!==void 0||e.pcbRightEdgeX!==void 0||e.pcbTopEdgeY!==void 0||e.pcbBottomEdgeY;const n=(t.manualEdits?.pcb_placements?.length??0)>0,o=this.children.reduce((i,r)=>{if(!r.pcb_component_id&&!r.pcb_group_id)return i;const s=r._parsedProps,a=r.props,A=s?.pcbX!==void 0||s?.pcbY!==void 0||s?.pcbLeftEdgeX!==void 0||s?.pcbRightEdgeX!==void 0||s?.pcbTopEdgeY!==void 0||s?.pcbBottomEdgeY!==void 0||a?.pcbLeftEdgeX!==void 0||a?.pcbRightEdgeX!==void 0||a?.pcbTopEdgeY!==void 0||a?.pcbBottomEdgeY!==void 0;return i+(A?0:1)},0);return!n&&o>1?"pack":"none"}doInitialPcbLayout(){if(this.root?.pcbDisabled)return;if(this.pcb_group_id){const{db:e}=this.root,n=this._parsedProps;if(n.pcbX!==void 0||n.pcbY!==void 0){const i=this.parent?.getGroup?.(),r=i?.pcb_group_id?e.pcb_group.get(i.pcb_group_id)?.pcb_group_id:void 0,s=r?void 0:this._getBoard()?.pcb_board_id??void 0;e.pcb_group.update(this.pcb_group_id,{position_mode:"relative_to_group_anchor",positioned_relative_to_pcb_group_id:r,positioned_relative_to_pcb_board_id:s,display_offset_x:n.pcbX,display_offset_y:n.pcbY})}}const t=this._getPcbLayoutMode();t==="grid"?this._doInitialPcbLayoutGrid():t==="pack"?this._doInitialPcbLayoutPack():t==="flex"&&this._doInitialPcbLayoutFlex()}_doInitialPcbLayoutGrid(){bMo(this)}_doInitialPcbLayoutPack(){GMo(this)}_doInitialPcbLayoutFlex(){BMo(this)}_insertSchematicBorder(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,e=this._parsedProps;if(!e.border)return;let n=typeof e.schWidth=="number"?e.schWidth:void 0,o=typeof e.schHeight=="number"?e.schHeight:void 0;const i=typeof e.schPadding=="number"?e.schPadding:0,r=typeof e.schPaddingLeft=="number"?e.schPaddingLeft:i,s=typeof e.schPaddingRight=="number"?e.schPaddingRight:i,a=typeof e.schPaddingTop=="number"?e.schPaddingTop:i,A=typeof e.schPaddingBottom=="number"?e.schPaddingBottom:i,c=this.schematic_group_id?t.schematic_group.get(this.schematic_group_id):null;if(c&&(n===void 0&&typeof c.width=="number"&&(n=c.width),o===void 0&&typeof c.height=="number"&&(o=c.height)),n===void 0||o===void 0)return;const l=c?.center??this._getGlobalSchematicPositionBeforeLayout(),u=l.x-n/2-r,g=l.y-o/2-A,h=n+r+s,d=o+a+A;t.schematic_box.insert({width:h,height:d,x:u,y:g,is_dashed:e.border?.dashed??!1})}_determineSideFromPosition(t,e){if(!t.center||!e.center)return"left";const n=t.center.x-e.center.x,o=t.center.y-e.center.y;return Math.abs(n)>Math.abs(o)?n>0?"right":"left":o>0?"bottom":"top"}_calculateSchematicBounds(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const s of t)e=Math.min(e,s.centerX),n=Math.max(n,s.centerX),o=Math.min(o,s.centerY),i=Math.max(i,s.centerY);const r=2;return{minX:e-r,maxX:n+r,minY:o-r,maxY:i+r}}_getAutorouterConfig(){const t=this._parsedProps.autorouter||this.getInheritedProperty("autorouter");return h$(t,this.root?.platform)}_isLegacyAutorouterDisabled(){return lkt(this)!==null}_isLaserPrefabAutorouter(t=this._getAutorouterConfig()){const e=this.props.autorouter,n=o=>o?.replace(/-/g,"_")??o;return t.preset==="laser_prefab"?!0:typeof e=="string"?n(e)==="laser_prefab":typeof e=="object"&&e?n(e.preset)==="laser_prefab":!1}_isAutoJumperAutorouter(t=this._getAutorouterConfig()){const e=this.props.autorouter,n=o=>o?.replace(/-/g,"_")??o;return t.preset==="auto_jumper"?!0:typeof e=="string"?n(e)==="auto_jumper":typeof e=="object"&&e?n(e.preset)==="auto_jumper":!1}_getSubcircuitLayerCount(){const t=this.getInheritedProperty("layers");return typeof t=="number"?t:2}_shouldUseTraceByTraceRouting(){return ckt(this)?!1:this._getAutorouterConfig().groupMode==="sequential-trace"}doInitialPcbDesignRuleChecks(){if(this.root?.pcbDisabled||this._isLegacyAutorouterDisabled()||this.root?.pcbRoutingDisabled||this.getInheritedProperty("routingDisabled"))return;const{db:t}=this.root;if(this.isSubcircuit){const e=new Map;for(const n of this.children)if(!n.isSubcircuit&&n._parsedProps.name){const o=e.get(n._parsedProps.name)||[];o.push(n),e.set(n._parsedProps.name,o)}for(const[n,o]of e.entries()){if(o.length<=1)continue;const i=o.filter(A=>A instanceof t1),r=i.length===o.length,s=i.map(A=>A.subcircuit_connectivity_map_key),a=r&&s.every(Boolean)&&new Set(s).size===1;if(!r||!a){const A=this.name||"unnamed",c=r?`Trace "${n}" in subcircuit "${A}" shares a name with another trace, but the traces are not mutually connected. Same-named traces must have the same subcircuit connectivity map key.`:`Multiple immediate children found with name "${n}" in subcircuit "${A}". Names must be unique.`;t.pcb_trace_error.insert({error_type:"pcb_trace_error",message:c,source_trace_id:"",pcb_trace_id:"",pcb_component_ids:o.map(l=>l.pcb_component_id).filter(Boolean),pcb_port_ids:[]})}}}_No(this)}doInitialSchematicLabelNetsWithConflictingNames(){this.root?.schematicDisabled||this.getTopLevelRenderable()===this&&K8o(this.root.db)}updateSchematicLabelNetsWithConflictingNames(){this.doInitialSchematicLabelNetsWithConflictingNames()}doInitialSchematicReplaceNetLabelsWithSymbols(){if(this.root?.schematicDisabled||!this.isSubcircuit)return;const{db:t}=this.root,e=t;for(const n of e.schematic_net_label.list()){const o=e.source_net.get(n.source_net_id),i=n.text||o?.name||"",r=o?.is_ground||Q0e.test(i),s=o?.is_power||Hwe.test(i);if(n.anchor_side==="top"&&r){e.schematic_net_label.update(n.schematic_net_label_id,{symbol_name:"rail_down"});continue}n.anchor_side==="bottom"&&s&&e.schematic_net_label.update(n.schematic_net_label_id,{symbol_name:"rail_up"})}}doInitialSimulationSpiceEngineRender(){pNo(this)}doInitialPcbComponentAnchorAlignment(){EMo(this)}updatePcbComponentAnchorAlignment(){this.doInitialPcbComponentAnchorAlignment()}doInitialPcbCalcPlacementResolution(){mMo(this)}updatePcbCalcPlacementResolution(){this.doInitialPcbCalcPlacementResolution()}_getMinimumFlexContainerSize(){return super._getMinimumFlexContainerSize()}_repositionOnPcb(t){return super._repositionOnPcb(t)}};function aRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_group.getWhere({source_group_id:t.source_group_id}),s={name:t.name??`inflated_group_${t.source_group_id}`};if(r?.position_mode==="relative_to_group_anchor"&&r.anchor_position){let A={x:0,y:0};if(t.parent_source_group_id){const c=n.pcb_group.getWhere({source_group_id:t.parent_source_group_id});c?.anchor_position&&(A=c.anchor_position)}s.pcbX=r.anchor_position.x-A.x,s.pcbY=r.anchor_position.y-A.y}r?.anchor_alignment&&(s.pcbAnchorAlignment=r.anchor_alignment);const a=new A6(s);return a._isInflatedFromCircuitJson=!0,a.source_group_id=t.source_group_id,i&&i.set(t.source_group_id,a),t.parent_source_group_id&&i?.has(t.parent_source_group_id)?i.get(t.parent_source_group_id).add(a):o.add(a),a}var ukt=class extends g0{_adjustSilkscreenTextAutomatically=!0;get config(){return{componentName:"Inductor",schematicSymbolName:this.props.symbolName??"inductor",zodProps:dMn,sourceFtype:$7.simple_inductor}}_getSchematicSymbolDisplayValue(){return`${H_(this._parsedProps.inductance)}H`}initPorts(){super.initPorts({additionalAliases:{pin1:["anode","pos","left"],pin2:["cathode","neg","right"]}})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({name:this.name,ftype:$7.simple_inductor,inductance:this.props.inductance,max_current_rating:e.maxCurrentRating===void 0?void 0:q1(e.maxCurrentRating,"A").value,display_inductance:this._getSchematicSymbolDisplayValue(),supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}};function ARo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new ukt({name:t.name,inductance:t.inductance,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c&&A.add(c)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var TMe=new WeakMap,gkt=t=>{const e=[t.name,...t.port_hints??[]].map(i=>i.toLowerCase().replace(/[^a-z0-9+-]/g,"")),n=e.some(i=>["a","anode","pos","positive","+"].includes(i)),o=e.some(i=>["k","c","cathode","neg","negative","-"].includes(i));return n===o?null:n?"anode":"cathode"},cRo=t=>{const e=t.root;if(!e)return;const{db:n}=e,o=TMe.get(t);for(const y of o??[])n.pcb_fabrication_note_path.delete(y.pcb_fabrication_note_path_id);if(TMe.delete(t),e.pcbDisabled||!t.pcb_component_id)return;const i=n.pcb_component.get(t.pcb_component_id);if(!i||i.layer!=="top"&&i.layer!=="bottom")return;const r=n.source_port.list({source_component_id:t.source_component_id}),s=r.filter(y=>gkt(y)==="anode"),a=r.filter(y=>gkt(y)==="cathode");if(s.length!==1||a.length!==1)return;const A=s[0],c=a[0],l=n.pcb_port.getWhere({source_port_id:A.source_port_id}),u=n.pcb_port.getWhere({source_port_id:c.source_port_id});if(!l||!u)return;const g=Math.hypot(u.x-l.x,u.y-l.y);if(g<1e-6)return;const h=Math.atan2(u.y-l.y,u.x-l.x),d=D0(M0((l.x+u.x)/2,(l.y+u.y)/2),W4(h)),p=(y,x)=>ts(d,{x:y,y:x}),m={pcb_component_id:i.pcb_component_id,subcircuit_id:t.getSubcircuit()?.subcircuit_id??void 0,layer:i.layer},_=[];TMe.set(t,_);const f=Math.min(g*.2,.4),I=f*.75,C=[[p(-g/2,0),p(-f,0)],[p(-f,-I),p(f,0),p(-f,I),p(-f,-I)],[p(f,-I),p(f,I)],[p(f,0),p(g/2,0)]];for(const y of C)_.push(n.pcb_fabrication_note_path.insert({...m,route:y,stroke_width:.08}))},dkt=class extends g0{get config(){const t={laser:"laser_diode"},e=this.props.laser?"laser":null;return{schematicSymbolName:e?t[e]:this.props.symbolName??"led",componentName:"Led",zodProps:yMn,sourceFtype:"simple_led"}}initPorts(){const t=this.children.some(i=>i.componentName==="Footprint"),e=this.resolveFootprint(),n=!!this._resolvePinLabels(),o=!n&&!t&&(!e||HDt(e));super.initPorts({pinCount:2,ignoreSymbolPorts:!n&&!o,additionalAliases:{pin1:o?["anode","pos","left"]:[],pin2:o?["cathode","neg","right"]:[]}})}_getSchematicSymbolDisplayValue(){return this._parsedProps.schDisplayValue||this._parsedProps.color||void 0}getFootprinterString(){const t=super.getFootprinterString();return t&&this.props.color?`${t}_color(${this.props.color})`:t}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_led",name:this.name,wave_length:e.wavelength,color:e.color,symbol_display_value:this._getSchematicSymbolDisplayValue(),manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}get pos(){return this.portMap.pos}doInitialPcbComponentSizeCalculation(){super.doInitialPcbComponentSizeCalculation(),cRo(this)}get anode(){return this.portMap.anode}get neg(){return this.portMap.neg}get cathode(){return this.portMap.cathode}};function lRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new dkt({name:t.name,color:t.color,wavelength:t.wavelength??t.wave_length,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c&&A.add(c)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var uRo=[{gate:"left",drain:"top",source:"bottom"},{gate:"left",drain:"bottom",source:"top"},{gate:"right",drain:"top",source:"bottom"},{gate:"right",drain:"bottom",source:"top"},{gate:"top",drain:"left",source:"right"},{gate:"top",drain:"right",source:"left"},{gate:"bottom",drain:"left",source:"right"},{gate:"bottom",drain:"right",source:"left"}],gRo=t=>{const e=(t%360+360)%360;if(e%90!==0)throw new Error(`Schematic rotation ${t} is not supported for Mosfet`);return[{gate:"left",drain:"top",source:"bottom"},{gate:"top",drain:"right",source:"left"},{gate:"right",drain:"bottom",source:"top"},{gate:"bottom",drain:"left",source:"right"}][e/90]},dRo=t=>{const e={drain:t.symbolDrainSide,source:t.symbolSourceSide,gate:t.symbolGateSide},n=gRo(Number(t.schRotation??0)),o=uRo.filter(i=>Object.keys(e).every(r=>e[r]===void 0||e[r]===i[r]));if(o.length===0){const i=Object.entries(e).filter(([,r])=>r!==void 0).map(([r,s])=>`${r}=${s}`).join(", ");throw new Error(`Invalid MOSFET symbol port side combination (${i}). The gate must be perpendicular to the drain and source, and the drain and source must be opposite.`)}return o.sort((i,r)=>{const s=a=>Object.keys(n).filter(A=>a[A]!==n[A]).length;return s(i)-s(r)})[0]},hRo=t=>{const e=t.mosfetMode==="depletion"?"d":"e",n=`${t.channelType}_channel_${e}_mosfet_transistor`;if(!(t.symbolDrainSide!==void 0||t.symbolSourceSide!==void 0||t.symbolGateSide!==void 0))return n;const{gate:i,drain:r}=dRo(t);return`${n}_gate_${i}_drain_${r}`},hkt=class extends g0{get config(){return{componentName:"Mosfet",schematicSymbolName:this.props.symbolName??hRo(this.props),zodProps:cMn,shouldRenderAsSchematicBox:!1}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_mosfet",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,mosfet_mode:e.mosfetMode,channel_type:e.channelType,display_name:e.displayName});this.source_component_id=n.source_component_id}};function pRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new hkt({name:t.name,channelType:t.channel_type,mosfetMode:t.mosfet_mode,manufacturerPartNumber:t.manufacturer_part_number,supplierPartNumbers:t.supplier_part_numbers??void 0,displayName:t.display_name,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c&&A.add(c)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}function mRo(t,e){const{injectionDb:n,subcircuit:o}=e;if(t.source_component_id!==null)return;const i=n.pcb_port.getWhere({source_port_id:t.source_port_id}),r=new Pu({name:t.name,pinNumber:t.pin_number});o.add(r),r.source_port_id=t.source_port_id;const s=o.root;if(s&&i){const{db:a}=s,A=a.pcb_port.insert({pcb_component_id:void 0,layers:i.layers,subcircuit_id:o.subcircuit_id??void 0,pcb_group_id:o.getGroup()?.pcb_group_id??void 0,x:i.x,y:i.y,source_port_id:t.source_port_id,is_board_pinout:!1});r.pcb_port_id=A.pcb_port_id}}var pkt=class extends g0{get config(){return{componentName:"PushButton",schematicSymbolName:this.props.symbolName??"push_button_normally_open_momentary",zodProps:OPn,sourceFtype:$7.simple_push_button}}get defaultInternallyConnectedPinNames(){return[]}initPorts(){super.initPorts({pinCount:2,ignoreSymbolPorts:!0});const e=Su[this._getSchematicSymbolNameOrThrow()],n=e.ports.find(A=>A.labels.includes("1")),o=e.ports.find(A=>A.labels.includes("2")),i=this.selectAll("port"),r=i.find(A=>A.props.pinNumber===1);r.schematicSymbolPortDef=n;const s=new Set(r._getPortsInternallyConnectedToThisPort()),a=i.filter(A=>A!==r&&!s.has(A)).sort((A,c)=>(A.props.pinNumber??0)-(c.props.pinNumber??0))[0];a&&(a.schematicSymbolPortDef=o)}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({name:this.name,ftype:$7.simple_push_button,supplier_part_numbers:n.supplierPartNumbers,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,are_pins_interchangeable:!0,display_name:n.displayName});this.source_component_id=o.source_component_id}};function _Ro(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new pkt({name:t.name,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c&&A.add(c)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}var mkt=class extends g0{_adjustSilkscreenTextAutomatically=!0;get config(){const t=this.props.symbolName??"boxresistor",e=this.props.schSize==="sm"||this.props.schSize==="xs"?this.props.schSize:void 0,n=e&&(t==="boxresistor"||t==="resistor")?`${t}_${e}`:void 0;return{componentName:"Resistor",schematicSymbolName:n&&`${n}_right`in Su?n:t,zodProps:Kwn,sourceFtype:"simple_resistor"}}initPorts(){super.initPorts({additionalAliases:{pin1:["anode","pos","left"],pin2:["cathode","neg","right"]}})}_getSchematicSymbolDisplayValue(){return`${H_(this._parsedProps.resistance)}Ω`}doInitialCreateNetsFromProps(){this._createNetsFromProps([this.props.pullupFor,this.props.pullupTo,this.props.pulldownFor,this.props.pulldownTo,...this._getNetsFromConnectionsProp()])}doInitialCreateTracesFromProps(){this.props.pullupFor&&this.props.pullupTo&&(this.add(new t1({from:`${this.getSubcircuitSelector()} > port.1`,to:this.props.pullupFor})),this.add(new t1({from:`${this.getSubcircuitSelector()} > port.2`,to:this.props.pullupTo}))),this.props.pulldownFor&&this.props.pulldownTo&&(this.add(new t1({from:`${this.getSubcircuitSelector()} > port.1`,to:this.props.pulldownFor})),this.add(new t1({from:`${this.getSubcircuitSelector()} > port.2`,to:this.props.pulldownTo}))),this._createTracesFromConnectionsProp()}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_resistor",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,resistance:e.resistance,display_resistance:this._getSchematicSymbolDisplayValue(),are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}};function fRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new mkt({name:t.name,resistance:t.resistance,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c&&A.add(c)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}function IRo(t){return t.simSwitchFrequency!==void 0||t.simCloseAt!==void 0||t.simOpenAt!==void 0||t.simStartClosed!==void 0||t.simStartOpen!==void 0}var _kt=class extends g0{_getSwitchType(){const t=this._parsedProps;return t?t.dpdt?"dpdt":t.spst?"spst":t.spdt?"spdt":t.dpst?"dpst":t.type??"spst":"spst"}get config(){const t=this._getSwitchType(),e=this._parsedProps?.isNormallyClosed??!1,n={spst:e?"spst_normally_closed_switch":"spst_switch",spdt:e?"spdt_normally_closed_switch":"spdt_switch",dpst:e?"dpst_normally_closed_switch":"dpst_switch",dpdt:e?"dpdt_normally_closed_switch":"dpdt_switch"};return{componentName:"Switch",schematicSymbolName:this.props.symbolName??n[t],zodProps:xMn,shouldRenderAsSchematicBox:!1}}doInitialSourceRender(){const{db:t}=this.root,e=this._parsedProps??{},n=t.source_component.insert({ftype:"simple_switch",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:this._getSwitchType()==="spst",display_name:e?.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{_parsedProps:t}=this;if(!IRo(t))return;const{db:e}=this.root,n={type:"simulation_switch",source_component_id:this.source_component_id||""};t.simSwitchFrequency!==void 0&&(n.switching_frequency=Cy.parse(t.simSwitchFrequency)),t.simCloseAt!==void 0&&(n.closes_at=Ml.parse(t.simCloseAt)),t.simOpenAt!==void 0&&(n.opens_at=Ml.parse(t.simOpenAt)),t.simStartOpen!==void 0&&(n.starts_closed=!t.simStartOpen),t.simStartClosed!==void 0&&(n.starts_closed=t.simStartClosed),e.simulation_switch.insert(n)}},CRo=(t,e)=>{const n=e.injectionDb.source_port.list().filter(s=>s.source_component_id===t.source_component_id),o={};let i=0;for(const s of n){const a=s.pin_number;if(a==null)continue;i=Math.max(i,a);const A=Array.from(new Set([s.name,...s.port_hints??[]].filter(c=>typeof c=="string"&&c.length>0)));A.length>0&&(o[`pin${a}`]=A)}let r="spst";return i>=5?r="dpdt":i===4?r="dpst":i===3&&(r="spdt"),{type:r,pinLabels:Object.keys(o).length>0?o:void 0}};function yRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id}),{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=CRo(t,e),c=new _kt({name:t.name,displayName:t.display_name,...A,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const l=e4(r,{...e,normalComponent:c});l&&c.add(l)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(c):o.add(c)}function xRo(t){if(t.length<=2)return[];const e=t[0],n=t[t.length-1];return t.slice(1,-1).filter(o=>{const i=W7(o),r=W7(e),s=W7(n),a=i.x===r.x&&i.y===r.y,A=i.x===s.x&&i.y===s.y;return!a&&!A}).map(o=>{if(o.route_type==="via")return{x:o.x,y:o.y,via:!0,fromLayer:o.from_layer,toLayer:o.to_layer};const i=W7(o);return{x:i.x,y:i.y}})}var ERo=(t,e)=>{const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=[];let s=t.source_group_id;for(;s&&s!==o.source_group_id;){const a=n.source_group.get(s),A=i?.get(s);if(!a||!A)break;const c=A.props.name??A.fallbackUnassignedName;r.unshift(`.${c}`),s=a.parent_source_group_id}return r.push(`.${t.name}`),r.join(" > ")};function BRo(t,e){const{injectionDb:n,subcircuit:o}=e,i=[];for(const u of t.connected_source_port_ids){const g=n.source_port.get(u);if(!g)continue;let h;if(g.source_component_id){const d=n.source_component.get(g.source_component_id);d&&(h=`${ERo({name:d.name,source_group_id:d.source_group_id},e)} > .${g.name}`)}else h=`.${g.name}`;h&&i.push(h)}for(const u of t.connected_source_net_ids){const g=n.source_net.get(u);g&&i.push(`net.${g.name}`)}if(i.length<2)return;const r=n.pcb_trace.list().filter(u=>u.source_trace_id===t.source_trace_id),s=r[0];let a;s&&(a=xRo(s.route));let A=t.min_trace_thickness;if(!A&&s?.route){const u=s.route.find(g=>g.route_type==="wire");u&&u.route_type==="wire"&&(A=u.width)}const c={path:i};A!==void 0&&(c.thickness=A),a&&a.length>0?c.pcbPath=a:!s&&t.connected_source_port_ids.length===2&&t.connected_source_net_ids.length===0&&(c.pcbStraightLine=!0);const l=new t1(c);l._inflatedPcbTraces=r.length>0?r:void 0,l._inflatedPcbVias=s?n.pcb_via.list().filter(u=>r.some(g=>u.pcb_trace_id===g.pcb_trace_id)):void 0,o.add(l)}var bRo={collector:["c"],base:["b"],emitter:["e"]},fkt=class extends g0{get config(){const t=this.props.type==="npn"?"npn_bipolar_transistor":"pnp_bipolar_transistor";return{componentName:"Transistor",schematicSymbolName:this.props.symbolName??t,zodProps:aMn,sourceFtype:"simple_transistor",shouldRenderAsSchematicBox:!1}}initPorts(){const t={},e=this.getSchematicSymbol();for(const n of e?.ports??[]){const o=H0e(n.labels);if(o)for(const i of n.labels){const r=bRo[i];r&&(t[`pin${o}`]=r)}}super.initPorts({pinCount:3,additionalAliases:t})}get collector(){return this.portMap.collector}get base(){return this.portMap.base}get emitter(){return this.portMap.emitter}doInitialCreateNetsFromProps(){this._createNetsFromProps([...this._getNetsFromConnectionsProp()])}doInitialCreateTracesFromProps(){this._createTracesFromConnectionsProp()}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_transistor",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,transistor_type:e.type,display_name:e.displayName});this.source_component_id=n.source_component_id}};function SRo(t,e){const{injectionDb:n,subcircuit:o,groupsMap:i}=e,r=n.pcb_component.getWhere({source_component_id:t.source_component_id});n.cad_component.getWhere({source_component_id:t.source_component_id});const{pcbX:s,pcbY:a}=t4({pcbComponent:r,sourceGroupId:t.source_group_id,inflatorContext:e}),A=new fkt({name:t.name,type:t.transistor_type,layer:r?.layer,pcbX:s,pcbY:a,pcbRotation:r?.rotation,doNotPlace:r?.do_not_place,obstructsWithinBounds:r?.obstructs_within_bounds});if(r){const c=e4(r,{...e,normalComponent:A});c&&A.add(c)}t.source_group_id&&i?.has(t.source_group_id)?i.get(t.source_group_id).add(A):o.add(A)}function QRo(t){const{injectionDb:e,subcircuit:n,groupsMap:o}=t,i=["pcb_silkscreen_rect","pcb_silkscreen_circle","pcb_silkscreen_line","pcb_silkscreen_path","pcb_silkscreen_text","pcb_fabrication_note_text","pcb_fabrication_note_path","pcb_fabrication_note_rect","pcb_note_text","pcb_note_rect","pcb_note_path","pcb_note_line","pcb_via","pcb_hole","pcb_plated_hole","pcb_cutout"],r=e.toArray().filter(a=>{if(!i.includes(a.type))return!1;if(a.type==="pcb_via"){if(!a.pcb_trace_id)return!0;const A=e.pcb_trace.get(a.pcb_trace_id),c=A?.source_trace_id;return!(c&&e.source_trace.get(c)&&A?.route.some(u=>u.route_type==="via"&&Math.abs(u.x-a.x)<1e-4&&Math.abs(u.y-a.y)<1e-4))}return a.type==="pcb_cutout"?!0:"pcb_component_id"in a&&(a.pcb_component_id===null||a.pcb_component_id===void 0)});if(r.length===0)return;const s=Db({componentName:"",componentRotation:"0deg"},r);for(const a of s)n.add(a)}var Hue=(t,e,n)=>{if(!e)return;const o=Xc(e);if(e&&n?.length>0)throw new Error("Component cannot have both circuitJson and children");const r={injectionDb:o,subcircuit:t,groupsMap:new Map},s=o.source_group.list(),a=new Set,A=[...s];for(;A.length>0;){const h=A.findIndex(p=>!p.parent_source_group_id||a.has(p.parent_source_group_id));if(h===-1){const p=A.map(m=>m.source_group_id).join(", ");throw new Error(`Cannot inflate source_groups: cyclic dependency or missing parent detected. Remaining groups: ${p}`)}const d=A[h];aRo(d,r),a.add(d.source_group_id),A.splice(h,1)}const c=o.pcb_board.list();for(const h of c)g8o(h,r);const l=o.source_component.list();for(const h of l)switch(h.ftype){case"simple_resistor":fRo(h,r);break;case"simple_capacitor":I8o(h,r);break;case"simple_inductor":ARo(h,r);break;case"simple_diode":O8o(h,r);break;case"simple_fiducial":Y8o(h,r);break;case"simple_led":lRo(h,r);break;case"simple_chip":x8o(h,r);break;case"simple_connector":F8o(h,r);break;case"simple_transistor":SRo(h,r);break;case"simple_mosfet":pRo(h,r);break;case"simple_push_button":_Ro(h,r);break;case"simple_switch":yRo(h,r);break;default:throw new Error(`No inflator implemented for source component ftype: "${h.ftype}"`)}const u=o.source_port.list();for(const h of u)mRo(h,r);const g=o.source_trace.list();for(const h of g)BRo(h,r);QRo(r)},vRo=t=>!t||typeof t!="object"?!1:typeof t.getSourcePort=="function",wRo=t=>!t||typeof t!="object"?!1:typeof t.getSourceNet=="function",PRo=t=>!t||typeof t!="object"?!1:typeof t.getPorts=="function",MRo=t=>!t||typeof t!="object"?!1:typeof t.type=="string",C$=t=>typeof t=="string"&&t.length>0,kMe=class{constructor(t){this.port=t}port;getPcbPort(){const t=this.port.pcb_port_id;return t?this.port.root?.db.pcb_port.get(t)??null:null}getSourcePort(){const t=this.port.source_port_id;return t?this.port.root?.db.source_port.get(t)??null:null}},DRo=class{constructor(t){this.net=t}net;getSourceNet(){const t=this.net.source_net_id;return t?this.net.root?.db.source_net.get(t)??null:null}},NRo=class{constructor(t){this.component=t}component;getPort(t){const e=this.component.selectOne(`port.${t}`,{type:"port"})??this.component.selectOne(`.${t}`,{type:"port"});return e?new kMe(e):null}getPorts(){return this.component.selectAll("port").map(t=>new kMe(t))}getPcbComponent(){const t=this.component.pcb_component_id;return t?this.component.root?.db.pcb_component.get(t)??null:null}getSourceComponent(){const t=this.component.source_component_id;return t?this.component.root?.db.source_component.get(t)??null:null}},RRo=class extends Ir{get config(){return{componentName:"DrcCheck",zodProps:APn}}constructor(t){super(t)}async runCustomDrcCheck(t){const e=await this._parsedProps.checkFn(this.createCustomDrcCheckContext(t));let n=[];return Array.isArray(e)?n=e:e&&(n=[e]),n.map((o,i)=>this.createCircuitJsonDiagnostic(o,i)).filter(o=>!!o)}createCustomDrcCheckContext(t){return{select:this.selectCustomDrcElement.bind(this),selectAll:this.selectAllCustomDrcElements.bind(this),isConnected:(e,n)=>this.isConnected(e,n,t),isPulledUp:e=>this.isConnected(e,"net.VCC",t)||this.isConnected(e,"net.VDD",t)||this.getResistanceBetween(e,"net.VCC",t)!==null||this.getResistanceBetween(e,"net.VDD",t)!==null,isPulledDown:e=>this.isConnected(e,"net.GND",t)||this.getResistanceBetween(e,"net.GND",t)!==null,getResistanceBetween:(e,n)=>this.getResistanceBetween(e,n,t)}}selectCustomDrcElement(t){return this.wrapSelectionResult(this.getSubcircuit().selectOne(t))}selectAllCustomDrcElements(t){const e=[];for(const n of this.getSubcircuit().selectAll(t)){const o=this.wrapSelectionResult(n);o&&e.push(o)}return e}wrapSelectionResult(t){return t?t instanceof Pu?new kMe(t):t instanceof Qb?new DRo(t):new NRo(t):null}createCircuitJsonDiagnostic(t,e){const n=t;let o="source_component_misconfigured_error";typeof n.error_type=="string"?o=n.error_type:typeof n.warning_type=="string"&&(o=n.warning_type);const i={...t};typeof n.type=="string"?i.type=n.type:i.type=o,typeof n.warning_type!="string"&&(typeof n.error_type=="string"?i.error_type=n.error_type:i.error_type=o);const r=`${o}_id`;return n[r]?i[r]=n[r]:i[r]=`${o}_${this._renderId}_${e}`,dxe.parse(i)}isConnected(t,e,n){const o=this.getConnectivityKeys(t,n),i=this.getConnectivityKeys(e,n);return o.some(r=>i.includes(r))}getResistanceBetween(t,e,n){if(this.isConnected(t,e,n))return 0;const o=this.getConnectivityKeys(t,n),i=this.getConnectivityKeys(e,n);if(o.length===0||i.length===0)return null;const r=n.filter(a=>a.type==="source_component"&&a.ftype==="simple_resistor"),s=this.root;if(!s)return null;for(const a of r){const A=s.db.source_port.list({source_component_id:a.source_component_id});if(A.length!==2)continue;const c=A.map(g=>g.subcircuit_connectivity_map_key),l=c.some(g=>g&&o.includes(g)),u=c.some(g=>g&&i.includes(g));if(l&&u)return a.resistance}return null}getConnectivityKeys(t,e){if(!t)return[];if(typeof t=="string"){const n=this.selectCustomDrcElement(t);return n?this.getConnectivityKeys(n,e):[]}return vRo(t)?[t.getSourcePort()?.subcircuit_connectivity_map_key].filter(C$):wRo(t)?[t.getSourceNet()?.subcircuit_connectivity_map_key].filter(C$):PRo(t)?t.getPorts().flatMap(n=>this.getConnectivityKeys(n,e)):MRo(t)?this.getCircuitJsonElementConnectivityKeys(t,e):[]}getCircuitJsonElementConnectivityKeys(t,e){if(!t)return[];if(t.type==="source_port")return[t.subcircuit_connectivity_map_key].filter(C$);if(t.type==="source_net")return[t.subcircuit_connectivity_map_key].filter(C$);if(t.type==="pcb_port")return this.getConnectivityKeys(t.source_port_id,e);if(t.type==="source_component"){const n=this.root;return n?n.db.source_port.list({source_component_id:t.source_component_id}).map(o=>o.subcircuit_connectivity_map_key).filter(C$):[]}return[]}},Ikt=class{firstChild=null;children;db;root=null;isRootCircuit=!1;cachedSubcircuits;pendingSubcircuitRenders;_schematicDisabledOverride;get schematicDisabled(){return this._schematicDisabledOverride!==void 0?this._schematicDisabledOverride:this.platform?.schematicDisabled!==void 0?this.platform.schematicDisabled:this._getBoard()?._parsedProps?.schematicDisabled??!1}set schematicDisabled(t){this._schematicDisabledOverride=t}pcbDisabled=!1;pcbRoutingDisabled=!1;_featureMspSchematicTraceRouting=!0;_featurePcbViaStitching=!0;name;platform;projectUrl;_hasRenderedAtleastOnce=!1;_asyncEffectIdsByPhase=new Map;_asyncEffectPhaseById=new Map;_hasUnrenderedUpdatesFromAsyncEffects=!1;_runningAsyncEffectsById=new Map;constructor({platform:t,projectUrl:e,cachedSubcircuits:n,pendingSubcircuitRenders:o}={}){this.children=[],this.db=Mr([]),this.platform=t,this.projectUrl=e,this.pcbDisabled=t?.pcbDisabled??!1,this.pcbRoutingDisabled=t?.routingDisabled??!1,this.cachedSubcircuits=n,this.pendingSubcircuitRenders=o,this.root=this}add(t){let e;ee.isValidElement(t)?e=RMt(t):e=t,this.children.push(e)}setPlatform(t){this.platform={...this.platform,...t},t.pcbDisabled!==void 0&&(this.pcbDisabled=t.pcbDisabled),t.routingDisabled!==void 0&&(this.pcbRoutingDisabled=t.routingDisabled)}_getBoard(){const t=e=>{for(const n of e){if(n.componentName==="Board")return n;if(U0e(n)){const o=t(n.children);if(o)return o}}};return t(this.children)}_guessRootComponent(){if(this.firstChild)return;if(this.children.length===0)throw new Error("Not able to guess root component: IsolatedCircuit has no children (use circuit.add(...))");const t=this.children.filter(n=>n.lowercaseComponentName==="panel");if(t.length>1)throw new Error("Only one <panel> is allowed per circuit");if(t.length===1){if(this.children.length!==1)throw new Error("<panel> must be the root element of the circuit");this.firstChild=t[0];return}if(this.children.length===1&&(this.children[0].isGroup||U0e(this.children[0]))){this.firstChild=this.children[0];return}const e=new A6({subcircuit:!0});e.parent=this,e.addAll(this.children),this.children=[e],this.firstChild=e}render(){this.firstChild||this._guessRootComponent();const{firstChild:t,db:e}=this;if(!t)throw new Error("IsolatedCircuit has no root component");t.parent=this,t.runRenderCycle(),this._hasUnrenderedUpdatesFromAsyncEffects=!1,this._hasRenderedAtleastOnce=!0}async renderUntilSettled(){for(this.db.source_project_metadata.list()?.[0]||this.db.source_project_metadata.insert({software_used_string:`@tscircuit/core@${this.getCoreVersion()}`,...this.projectUrl?{project_url:this.projectUrl}:{}}),this.render();!this.isDoneRendering();)await new Promise(e=>setTimeout(e,100)),this.render();this.emit("renderComplete")}isDoneRendering(){return this._hasRenderedAtleastOnce&&!this._hasIncompleteAsyncEffects()}_hasIncompleteAsyncEffects(){return this._asyncEffectPhaseById.size>0||this._hasUnrenderedUpdatesFromAsyncEffects?!0:this.children.some(t=>t._hasIncompleteAsyncEffects())}_hasIncompleteAsyncEffectsForPhase(t){return(this._asyncEffectIdsByPhase.get(t)?.size??0)>0}getRunningAsyncEffects(){return Array.from(this._runningAsyncEffectsById.values())}getCircuitJson(){return this._hasRenderedAtleastOnce||this.render(),this.db.toArray()}toJson(){return this.getCircuitJson()}async getSvg(t){const e=await Promise.resolve().then(()=>njo).catch(n=>{throw new Error(`To use circuit.getSvg, you must install the "circuit-to-svg" package.

"${n.message}"`)});if(t.view==="pcb")return e.convertCircuitJsonToPcbSvg(this.getCircuitJson());if(t.view==="schematic")return e.convertCircuitJsonToSchematicSvg(this.getCircuitJson());throw new Error(`Invalid view: ${t.view}`)}getCoreVersion(){const[t,e,n]=jTt.version.split(".").map(Number);return`${t}.${e}.${n+1}`}async preview(t){throw new Error("project.preview is not yet implemented")}computeSchematicGlobalTransform(){return hC()}_computePcbGlobalTransformBeforeLayout(){return hC()}selectAll(t){return this._guessRootComponent(),this.firstChild?.selectAll(t)??[]}selectOne(t,e){return this._guessRootComponent(),this.firstChild?.selectOne(t,e)??null}_eventListeners={};emit(t,...e){if(t==="asyncEffect:start"?this._registerAsyncEffectStart(e[0]):t==="asyncEffect:end"&&this._registerAsyncEffectEnd(e[0]),!!this._eventListeners[t])for(const n of this._eventListeners[t])n(...e)}on(t,e){this._eventListeners[t]||(this._eventListeners[t]=[]),this._eventListeners[t].push(e)}removeListener(t,e){this._eventListeners[t]&&(this._eventListeners[t]=this._eventListeners[t].filter(n=>n!==e))}enableDebug(t){typeof t=="string"?vc.enable(t):(t===null||t===!1)&&vc.disable()}getClientOrigin(){return typeof window<"u"&&window.location?window.location.origin:typeof self<"u"&&self.location?self.location.origin:""}_registerAsyncEffectStart(t){if(!t?.asyncEffectId||!t.phase)return;const{asyncEffectId:e,phase:n}=t,o=this._asyncEffectPhaseById.get(e);o&&o!==n&&this._asyncEffectIdsByPhase.get(o)?.delete(e),this._asyncEffectIdsByPhase.has(n)||this._asyncEffectIdsByPhase.set(n,new Set),this._asyncEffectIdsByPhase.get(n).add(e),this._asyncEffectPhaseById.set(e,n),this._runningAsyncEffectsById.set(e,{asyncEffectId:e,effectName:t.effectName,componentDisplayName:t.componentDisplayName,phase:n,error:t.error})}_registerAsyncEffectEnd(t){if(!t?.asyncEffectId)return;const{asyncEffectId:e}=t,n=this._asyncEffectPhaseById.get(e)??t.phase;if(n){const o=this._asyncEffectIdsByPhase.get(n);o?.delete(e),o&&o.size===0&&this._asyncEffectIdsByPhase.delete(n)}this._asyncEffectPhaseById.delete(e),this._runningAsyncEffectsById.delete(e),this._hasUnrenderedUpdatesFromAsyncEffects=!0}};function Ckt(t){if(!t._isIsolatedSubcircuit||t._isolatedCircuitJson||!t.getSubcircuitPropHash)return;const e=t.getSubcircuitPropHash(),n=t.root?.cachedSubcircuits,o=t.root?.pendingSubcircuitRenders,i=n?.get(e);if(i){t._isolatedCircuitJson=i,t.children=[],t._normalComponentNameMap=null;return}const r=[...t.children];t.children=[],t._normalComponentNameMap=null;const s=t.root;t._queueAsyncEffect("render-isolated-subcircuit",async()=>{const a=n?.get(e);if(a){t._isolatedCircuitJson=a;return}const A=o?.get(e);if(A){t._isolatedCircuitJson=await A;return}let c,l;const u=new Promise((g,h)=>{c=g,l=h});o?.set(e,u);try{const g=new Ikt({platform:{...s.platform,pcbDisabled:s.pcbDisabled,schematicDisabled:s.schematicDisabled},cachedSubcircuits:n,pendingSubcircuitRenders:o});for(const d of r)g.add(d);await g.renderUntilSettled();const h=g.getCircuitJson();n?.set(e,h),t._isolatedCircuitJson=h,c(h)}catch(g){throw l(g instanceof Error?g:new Error(String(g))),g}finally{o?.delete(e)}})}var TRo=new Set(["name","key","pcbX","pcbY","schX","schY","pcbLeftEdgeX","pcbRightEdgeX","pcbTopEdgeY","pcbBottomEdgeY","pcbRotation","schRotation"]);function Oue(t,e=new WeakSet){if(t===null)return"null";if(t===void 0)return"undefined";const n=typeof t;if(n==="string")return`"${t}"`;if(n==="number"||n==="boolean")return String(t);if(n==="function")return"[function]";if(n==="symbol")return"[symbol]";if(n==="object"){if(e.has(t))return"[circular]";if(e.add(t),t.$$typeof!==void 0){const r=typeof t.type=="string"?t.type:t.type?.name||"[component]",s=t.props?Oue(t.props,e):"{}";return`ReactElement(${r},${s})`}return Array.isArray(t)?`[${t.map(s=>Oue(s,e)).join(",")}]`:`{${Object.keys(t).sort().map(r=>`${r}:${Oue(t[r],e)}`).join(",")}}`}return String(t)}function ykt(t){const e={},n=Object.keys(t).sort();for(const o of n)!TRo.has(o)&&t[o]!==void 0&&(e[o]=t[o]);return e}function xkt(t){return t.map(e=>({componentName:e.componentName,props:ykt(e.props??{}),children:xkt(e.children)}))}function Ekt(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}function kRo(t){const e=Oue(t),n=Ekt(e),o=Ekt(e+n.toString());return n.toString(16).padStart(8,"0")+o.toString(16).padStart(8,"0")}function Bkt(t){const e={props:ykt(t.props??{}),children:xkt(t.children)};return kRo(e)}var FO=1e-9,bkt=t=>t.route_type==="wire",FRo=(t,e,n)=>{const o=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(o)>FO)return!1;const i=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(i<-FO)return!1;const r=(n.x-e.x)**2+(n.y-e.y)**2;return!(i-r>FO)},Skt=(t,e)=>{if(e.length<3)return!1;let n=!1,o=e[e.length-1];for(const i of e){if(FRo(t,o,i))return!0;i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(n=!n),o=i}return n},LRo=(t,e)=>{const{center:n,width:o,height:i}=e,r=(e.rotation??0)*Math.PI/180,s=Math.cos(-r),a=Math.sin(-r),A=t.x-n.x,c=t.y-n.y,l=A*s-c*a,u=A*a+c*s;return Math.abs(l)<=o/2+FO&&Math.abs(u)<=i/2+FO},HRo=(t,e)=>{const n=e.brep_shape.outer_ring.vertices.map(o=>({x:o.x,y:o.y}));if(!Skt(t,n))return!1;for(const o of e.brep_shape.inner_rings){const i=o.vertices.map(r=>({x:r.x,y:r.y}));if(Skt(t,i))return!1}return!0},ORo=(t,e)=>e.shape==="rect"?LRo(t,e):e.shape==="brep"?HRo(t,e):!1,GRo=(t,e,n)=>{if(t.source_trace_id===e)return!0;if(!t.source_trace_id)return!1;const o=n.get(t.source_trace_id);return o?o.connected_source_net_ids.includes(e):!1},YRo=(t,e,n)=>{const o=e.x-t.x,i=e.y-t.y;return Math.hypot(o,i)<=FO?!1:[0,.25,.5,.75,1].every(a=>ORo({x:t.x+o*a,y:t.y+i*a},n))},URo=({db:t,copperPour:e})=>{if(!e.source_net_id)return;const n=new Map(t.source_trace.list().map(o=>[o.source_trace_id,o]));for(const o of t.pcb_trace.list()){if(!GRo(o,e.source_net_id,n))continue;let i=!1;const r=o.route.map(s=>({...s}));for(let s=0;s<r.length-1;s++){const a=r[s],A=r[s+1];!a||!A||!bkt(a)||!bkt(A)||a.layer!==e.layer||A.layer!==e.layer||YRo({x:a.x,y:a.y},{x:A.x,y:A.y},e)&&(a.is_inside_copper_pour=!0,a.copper_pour_id=e.pcb_copper_pour_id,A.is_inside_copper_pour=!0,A.copper_pour_id=e.pcb_copper_pour_id,i=!0)}i&&t.pcb_trace.update(o.pcb_trace_id,{route:r})}},FMe=new WeakMap,KRo=.3,VRo=async t=>{if(!t.root)return;const{db:e}=t.root,n=t.selectAll("copperpour").filter(u=>u.getSubcircuit()===t),o=[];for(const u of n){const{_parsedProps:g}=u,d=t.selectOne(g.connectsTo)?.source_net_id;if(!d){u.renderError(`Net "${g.connectsTo}" not found for copper pour`);continue}o.push({copperPour:u,sourceNetId:d})}if(o.length===0)return;const i=e.toArray(),r=t._getBoard(),s=r?.pcb_board_id?e.pcb_board.get(r.pcb_board_id):void 0;let a=s?.outline?.length?s.outline:void 0;if(!a&&s?.width!==void 0&&s.height!==void 0){const{center:u,width:g,height:h}=s;a=[{x:u.x-g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y+h/2},{x:u.x-g/2,y:u.y+h/2}]}const A=Tbt(i,o.map(({copperPour:u,sourceNetId:g})=>{const{_parsedProps:h}=u,d=h.clearance??.2;return{layer:h.layer,subcircuit_id:t.subcircuit_id??void 0,source_net_id:g,pad_margin:h.padMargin??d,trace_margin:h.traceMargin??d,pour_margin:d,board_edge_margin:h.boardEdgeMargin??d,board_edge_outline:u._isImplicitCopperPour?a:void 0,cutout_margin:h.cutoutMargin??d,...h.useThermalReliefs?{use_thermal_reliefs:!0,thermal_relief_spoke_width:KRo}:{},outline:h.outline??a}}));await Umo();const c=new Rbt(A);t.root.emit("solver:started",{type:"solver:started",solverName:"CopperPourPipelineSolver",solverParams:A,solverConstructorArgs:[A],componentName:t.getString()});const{brep_shapes_by_region:l}=c.getOutput();for(const[u,{copperPour:g,sourceNetId:h}]of o.entries()){const{_parsedProps:d}=g,p=d.coveredWithSolderMask??!1;for(const m of l[u]??[]){const _=e.pcb_copper_pour.insert({shape:"brep",layer:d.layer,brep_shape:m,source_net_id:h,subcircuit_id:t.subcircuit_id??void 0,covered_with_solder_mask:p});URo({db:e,copperPour:_})}}};function zRo(t){t.root?.pcbDisabled||t._queueAsyncEffect("PcbCopperPourRender",async()=>{const e=t.getSubcircuit(),n=FMe.get(e);if(n){await n;return}const o=VRo(e);FMe.set(e,o);try{await o}finally{FMe.delete(e)}})}var JRo=t=>{const e=t.getSubcircuit();if(!e.root)return;const n=e.selectAll("copperpour").filter(g=>g.getSubcircuit()===e);if(n[0]!==t)return;const o=n.flatMap(g=>{const h=e.selectOne(g._parsedProps.connectsTo);return h?.source_net_id?[h.source_net_id]:[]});if(o.length===0)return;const{db:i}=e.root,r=t.getInheritedMergedProperty("pcbStyle"),{holeDiameter:s,padDiameter:a}=$N(r),A=t._getBoard(),c=A?.pcb_board_id?i.pcb_board.get(A.pcb_board_id):void 0,l={circuitJson:i.toArray(),options:{sourceNetIds:[...new Set(o)],viaHoleDiameter:c?.min_via_hole_diameter??s,viaOuterDiameter:c?.min_via_pad_diameter??a,viaStitchPitch:A?._parsedProps.viaStitchPitch}},u=new LRt(l);if(e.root.emit("solver:started",{type:"solver:started",solverName:"ViaStitchSolver",solverParams:l,solverConstructorArgs:[l],componentName:e.getString()}),u.solve(),u.failed)throw new Error(u.error??"Via stitching solver failed");for(const g of u.getOutput().pcbVias){const{pcb_via_id:h,...d}=g,p=i.pcb_via.insert(d);A?._generatedStitchingViaIds?.add(p.pcb_via_id)}};function WRo(t){t.root?.pcbDisabled||!t.root?._featurePcbViaStitching||t._getBoard()?._parsedProps.enableViaStitching&&t._queueAsyncEffect("PcbViaStitchRender",async()=>{JRo(t)})}var Qkt=class extends Ir{isPcbPrimitive=!0;_isImplicitCopperPour=!1;get config(){return{componentName:"CopperPour",zodProps:RMn}}getPcbSize(){return{width:0,height:0}}doInitialCreateNetsFromProps(){const{_parsedProps:t}=this;Hj(this,[t.connectsTo])}doInitialPcbCopperPourRender(){zRo(this)}doInitialPcbViaStitchRender(){WRo(this)}},jRo=t=>{const{root:e}=t;if(!e||e.pcbDisabled||!t._parsedProps.automaticPoursEnabled||e.pcbRoutingDisabled||t.getInheritedProperty("routingDisabled"))return;const{db:n}=e,o=n.subtree({subcircuit_id:t.subcircuit_id}).toArray();if(!o.some(c=>c.type==="source_net"&&(c.is_power||c.is_ground||c.is_positive_voltage_source)))return;const r={circuitJson:o,layers:[...t.allLayers]},s=new NRt(r),a=s.getConstructorParams();e.emit("solver:started",{type:"solver:started",solverName:"ImplicitCopperPourPipelineSolver",solverParams:a[0],solverConstructorArgs:a,componentName:t.getString()}),s.solve();const A=t.selectAll("net");for(const c of s.getOutput()){if(c.shape!=="polygon")continue;const l=A.find(g=>g.source_net_id===c.source_net_id);if(!l)throw new Error(`Unable to find the power net for implicit copper region ${c.pcb_copper_pour_id}`);const u=new Qkt({layer:c.layer,connectsTo:l.getPortSelector(),outline:c.points,coveredWithSolderMask:c.covered_with_solder_mask});u._isImplicitCopperPour=!0,l.getSubcircuit().add(u)}},LMe=(t,e,n=0)=>{const{a:o,b:i,c:r,d:s,e:a,f:A}=D0(M0(e.x,e.y),W4(n*Math.PI/180));return t.transform(new QF(o,i,r,s,a,A))},Qw=t=>t.orientation()===mF.CCW?t:t.reverse(),y$=(t,e)=>Qw(new Ip(new fD(new Gc(t.x,t.y),e))),LO=(t,e,n,o=0,i=0)=>{const r=e/2,s=n/2,a=Math.max(0,Math.min(o,r,s));if(a===0)return LMe(Qw(new Ip(new VBe(-r,-s,r,s))),t,i);const A=[new T8(new Gc(r-a,-s+a),a,-Math.PI/2,0,!0),new T8(new Gc(r-a,s-a),a,0,Math.PI/2,!0),new T8(new Gc(-r+a,s-a),a,Math.PI/2,Math.PI,!0),new T8(new Gc(-r+a,-s+a),a,Math.PI,Math.PI*1.5,!0)],c=[];for(let l=0;l<A.length;l++){const u=A[l],g=A[(l+1)%A.length];c.push(u),u.end.distanceTo(g.start)[0]>1e-12&&c.push(new _D(u.end,g.start))}return LMe(Qw(new Ip(c)),t,i)},vkt=t=>{const e=[];for(let n=0;n<t.vertices.length;n++){const o=t.vertices[n],i=t.vertices[(n+1)%t.vertices.length],r=i.x-o.x,s=i.y-o.y;if(r===0&&s===0)continue;const a=o.bulge??0;if(a===0)e.push(new _D(new Gc(o.x,o.y),new Gc(i.x,i.y)));else{const A=(1-a*a)/(4*a),c=new Gc((o.x+i.x)/2-s*A,(o.y+i.y)/2+r*A);e.push(new T8(c,Math.hypot(r,s)*(1+a*a)/(4*Math.abs(a)),Math.atan2(o.y-c.y,o.x-c.x),Math.atan2(i.y-c.y,i.x-c.x),a>0))}}return Qw(new Ip(e))},x$=(t,e)=>{for(const n of e.reverse().faces)t.addFace(n.shapes);return t},$Ro=t=>{if(t.shape==="rect")return LO(t.center,t.width,t.height,0,t.rotation);if(t.shape==="polygon")return Qw(new Ip(t.points.map(n=>new Gc(n.x,n.y))));const e=vkt(t.brep_shape.outer_ring);for(const n of t.brep_shape.inner_rings)x$(e,vkt(n));return e},qRo=t=>{if(t.shape==="polygon")return Qw(new Ip(t.points.map(n=>new Gc(n.x,n.y))));if(t.shape==="circle")return y$(t,t.radius);const e=t.shape==="pill"||t.shape==="rotated_pill"?t.radius:t.corner_radius??t.rect_border_radius??0;return LO(t,t.width,t.height,e,"ccw_rotation"in t?t.ccw_rotation:0)},HMe=(t,e,n)=>x$(y$(t,e/2),y$(t,n/2)),XRo=(t,e=0)=>{if(t.shape==="circle")return HMe(t,t.outer_diameter,t.hole_diameter);if("outer_width"in t)return x$(LO(t,t.outer_width,t.outer_height,Math.min(t.outer_width,t.outer_height)/2,t.ccw_rotation),LO(t,t.hole_width,t.hole_height,Math.min(t.hole_width,t.hole_height)/2,t.ccw_rotation));const n={x:t.x+t.hole_offset_x,y:t.y+t.hole_offset_y},o=t.shape==="hole_with_polygon_pad"?LMe(Qw(new Ip(t.pad_outline.map(i=>new Gc(i.x,i.y)))),t,t.ccw_rotation??e):LO(t,t.rect_pad_width,t.rect_pad_height,t.rect_border_radius,"rect_ccw_rotation"in t?t.rect_ccw_rotation:0);if(t.shape==="circular_hole_with_rect_pad"||t.shape==="hole_with_polygon_pad"&&t.hole_shape==="circle"){if(t.hole_diameter===void 0)throw new Error("Circular plated hole requires hole_diameter");return x$(o,y$(n,t.hole_diameter/2))}if(!("hole_width"in t)||t.hole_width===void 0||t.hole_height===void 0)throw new Error("Slotted plated hole requires hole_width and hole_height");return x$(o,LO(n,t.hole_width,t.hole_height,Math.min(t.hole_width,t.hole_height)/2,"hole_ccw_rotation"in t?t.hole_ccw_rotation:t.shape==="hole_with_polygon_pad"?t.ccw_rotation??e:0))},ZRo=(t,e,n,o=n)=>{const i=Math.hypot(e.x-t.x,e.y-t.y),r=n/2,s=o/2;if(i<=Math.abs(s-r))return y$(r>=s?t:e,Math.max(r,s));const a=Math.atan2(e.y-t.y,e.x-t.x),A=Math.acos((r-s)/i),c=new T8(new Gc(t.x,t.y),r,a+A,a-A,!0),l=new T8(new Gc(e.x,e.y),s,a-A,a+A,!0);return Qw(new Ip([c,new _D(c.end,l.start),l,new _D(l.end,c.start)]))},eTo=(t,e,n=1e-7)=>t.vertices.some(o=>e.contains(o))||e.vertices.some(o=>t.contains(o))||t.distanceTo(e)[0]<=n,OMe=1e6,E$=1e-7*OMe,wkt=(t,e)=>t.route_type==="wire"?{point:t,layer:t.layer}:t.route_type==="via"?{point:t,layer:e==="start"?t.from_layer:t.to_layer}:{point:t[e],layer:e==="start"?t.start_layer:t.end_layer},tTo=(t,e=new Set)=>{const n=Vf(t),o=t.filter(f=>f.type==="pcb_copper_pour"),i=new Set(o.flatMap(f=>f.source_net_id?[n.getNetConnectedToId(f.source_net_id)??f.source_net_id]:[])),r=[],s=f=>{i.has(f.netId)&&!f.polygon.isEmpty()&&r.push({...f,polygon:f.polygon.scale(OMe,OMe)})},a=new Map(t.filter(f=>f.type==="pcb_component").map(f=>[f.pcb_component_id,f])),A=t.filter(f=>f.type==="pcb_via"),c=t.find(f=>f.type==="pcb_board");for(const f of o)f.source_net_id&&s({polygon:$Ro(f),layers:[f.layer],netId:n.getNetConnectedToId(f.source_net_id)??f.source_net_id,isTerminal:!1,pourId:f.pcb_copper_pour_id});for(const f of t)if(f.type==="pcb_smtpad"){const I=n.getNetConnectedToId(f.pcb_smtpad_id);I&&i.has(I)&&s({polygon:qRo(f),layers:[f.layer],netId:I,isTerminal:!!f.pcb_port_id})}else if(f.type==="pcb_plated_hole"){const I=n.getNetConnectedToId(f.pcb_plated_hole_id);I&&i.has(I)&&s({polygon:XRo(f,f.pcb_component_id?a.get(f.pcb_component_id)?.rotation:0),layers:f.layers,netId:I,isTerminal:!!f.pcb_port_id})}else if(f.type==="pcb_via"){const I=n.getNetConnectedToId(f.pcb_via_id);I&&i.has(I)&&s({polygon:HMe(f,f.outer_diameter,f.hole_diameter),layers:f.layers,netId:I,isTerminal:!e.has(f.pcb_via_id),viaId:f.pcb_via_id})}else if(f.type==="pcb_trace"){const I=n.getNetConnectedToId(f.pcb_trace_id);if(!I||!i.has(I))continue;for(let C=0;C<f.route.length;C++){const y=f.route[C];if(y.route_type==="via"){const w=A.find(M=>M.x===y.x&&M.y===y.y&&M.layers.includes(y.from_layer)&&M.layers.includes(y.to_layer));s({polygon:HMe(y,w?.outer_diameter??y.outer_diameter??c?.min_via_pad_diameter??.3,w?.hole_diameter??y.hole_diameter??c?.min_via_hole_diameter??.2),layers:w?.layers??lw({fromLayer:y.from_layer,toLayer:y.to_layer,layerCount:c?.num_layers??2}),netId:I,isTerminal:!1})}const x=f.route[C+1];if(!x)continue;const E=wkt(y,"end"),B=wkt(x,"start");if(E.layer!==B.layer)continue;const S=y.route_type==="via"?x.route_type==="via"?void 0:x.width:y.width;if(S===void 0)continue;const Q=f.route_thickness_mode==="interpolated"&&x.route_type!=="via"?x.width:S;s({polygon:ZRo(E.point,B.point,S,Q),layers:[E.layer],netId:I,isTerminal:!1})}}const l=new Set,u=new Set;if(r.length===0)return{floatingPourIds:l,floatingViaIds:u};const g=r.map((f,I)=>I),h=f=>{for(;g[f]!==f;)g[f]=g[g[f]],f=g[f];return f},d=r.map(f=>f.polygon.box),p=new UH(r.length);for(const f of d)p.add(f.xmin,f.ymin,f.xmax,f.ymax);p.finish();for(const[f,I]of r.entries()){const C=d[f];for(const y of p.search(C.xmin-E$,C.ymin-E$,C.xmax+E$,C.ymax+E$)){if(y<=f||h(f)===h(y))continue;const x=r[y];I.netId!==x.netId||!I.layers.some(E=>x.layers.includes(E))||eTo(I.polygon,x.polygon,E$)&&(g[h(y)]=h(f))}}const m=new Set(r.flatMap(f=>f.isTerminal?[f.netId]:[])),_=new Set(r.flatMap((f,I)=>f.isTerminal?[h(I)]:[]));for(const[f,I]of r.entries())!m.has(I.netId)||_.has(h(f))||(I.pourId&&l.add(I.pourId),I.viaId&&u.add(I.viaId));return{floatingPourIds:l,floatingViaIds:u}},nTo=t=>{if(!t.root||t.root.pcbDisabled)return;const{db:e}=t.root,n=e.subtree({subcircuit_id:t.subcircuit_id}).toArray();if(e.pcb_autorouting_error.list().length>0||!n.some(r=>r.type==="pcb_copper_pour"))return;const{floatingPourIds:o,floatingViaIds:i}=tTo(n,t._generatedStitchingViaIds);for(const r of o)e.pcb_copper_pour.delete(r);for(const r of i)t._generatedStitchingViaIds.has(r)&&e.pcb_via.delete(r);for(const r of e.pcb_trace.list())r.route.some(s=>"copper_pour_id"in s&&s.copper_pour_id&&o.has(s.copper_pour_id))&&e.pcb_trace.update(r.pcb_trace_id,{route:r.route.map(s=>{if(!("copper_pour_id"in s)||!s.copper_pour_id||!o.has(s.copper_pour_id))return s;const{copper_pour_id:a,is_inside_copper_pour:A,...c}=s;return c})})},Pkt=t=>{t._pcbTraceRenderWaitingForPlacementChecks&&(t.renderPhaseStates.PcbTraceRender.initialized=!1,t.renderPhaseStates.PcbTraceRender.dirty=!1,t._pcbTraceRenderWaitingForPlacementChecks=!1);for(const e of t.children)Pkt(e)},oTo=t=>{if(t.root?.pcbDisabled)return;const e=t.root?.platform?.placementDrcChecksDisabled??t.getInheritedProperty("placementDrcChecksDisabled"),n=t.root?.platform?.drcChecksDisabled??t.getInheritedProperty("drcChecksDisabled");if(t._pcbPlacementDrcErrorCount=null,t._pcbPlacementDrcCheckError=null,t._pcbPlacementDrcChecksPending=!1,e||n){t._pcbPlacementDrcErrorCount=0;return}const{db:o}=t.root,i=o.subtree({subcircuit_id:t.subcircuit_id}).toArray(),r=o.toArray();t._pcbPlacementDrcChecksPending=!0,t._queueAsyncEffect("board:pre-route-placement-checks",async()=>{try{const s=await Wmt(i,{consolidateOverlaps:!1}),a=Bse(i,s.filter(c=>!t._isExpectedCastellatedHoleDrcError(c))),A=a.filter(c=>!r.some(l=>l.type===c.type&&"message"in l&&l.message===c.message));o.insertAll(A),t._pcbPlacementDrcErrorCount=a.filter(c=>c.type.endsWith("_error")).length}catch(s){t._pcbPlacementDrcCheckError=s instanceof Error?s.message:String(s)}finally{t._pcbPlacementDrcChecksPending=!1,Pkt(t)}})},iTo=1e-6,rTo=t=>t?Array.isArray(t)?t:[t]:[],sTo=class h4n extends Pb{outlinePointIndex;holeDiameter;padDiameter;port;trace;static fromBoardOutline(e){return(e??[]).flatMap((n,o)=>n.isCastellatedHole?[new h4n(n,o)]:[])}constructor(e,n){const o=`castellated_hole_${n+1}`,i=rTo(e.connectsTo),r=lt.parse(e.holeDiameter),s=lt.parse(e.padDiameter);super({shape:"circle",holeDiameter:r,outerDiameter:s,portHints:[o]}),this.outlinePointIndex=n,this.holeDiameter=r,this.padDiameter=s,this.port=i.length>0?new Pu({name:o}):null,this.trace=this.port?new t1({path:[`port.${o}`,...i],displayName:`Castellated hole ${n+1} connectivity`}):null}_getParentBoard(){if(this.parent?.componentName!=="Board")throw new Error("A board castellated hole must be a direct board child");return this.parent}_getPositionFromBoardOutline(){const e=this._getParentBoard(),o=(e.pcb_board_id?e.root?.db.pcb_board.get(e.pcb_board_id):null)?.outline?.[this.outlinePointIndex];if(!o)throw new Error(`Missing emitted board outline point ${this.outlinePointIndex}`);return o}_getGlobalPcbPositionBeforeLayout(){return this._getPositionFromBoardOutline()}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:e}=this.root,n=this._getPositionFromBoardOutline(),o=e.pcb_plated_hole.insert({shape:"circle",outer_diameter:this.padDiameter,hole_diameter:this.holeDiameter,...n,layers:this.getAvailablePcbLayers(),port_hints:this.getNameAndAliases(),subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0});this.pcb_plated_hole_id=o.pcb_plated_hole_id}syncPositionToBoardOutline(){this.pcb_plated_hole_id&&this._setPositionFromLayout(this._getPositionFromBoardOutline())}removePcbPrimitiveRender(){const{db:e}=this.root;this.pcb_plated_hole_id&&(e.pcb_plated_hole.delete(this.pcb_plated_hole_id),this.pcb_plated_hole_id=null),this.matchedPort?.pcb_port_id&&(e.pcb_port.delete(this.matchedPort.pcb_port_id),this.matchedPort.pcb_port_id=null)}isExpectedBoardEdgeDrcError(e){if(!this.pcb_plated_hole_id)return!1;if(e.type==="pcb_placement_error")return e.pcb_placement_error_id===`copper_too_close_to_board_edge_${this.pcb_plated_hole_id}`;if(e.type!=="pcb_trace_error"||!e.pcb_trace_error_id.startsWith("trace_too_close_to_board_"))return!1;const n=e.pcb_trace_error_id.match(/_segment_(\d+)$/);if(!n)return!1;const o=this.root?.db.pcb_trace.get(e.pcb_trace_id),i=Number(n[1]),r=[o?.route[i],o?.route[i+1]].flatMap(a=>a&&"x"in a&&"y"in a?[{x:a.x,y:a.y}]:[]),s=this.root?.db.pcb_plated_hole.get(this.pcb_plated_hole_id);return s?r.some(a=>Math.hypot(a.x-s.x,a.y-s.y)<=iTo):!1}},aTo=.01,ATo=.15,Mkt=(t,e,n)=>{const o=t/2,i=e/2,r=Math.min(n,o,i);if(r<aTo)return[{x:-o,y:-i},{x:o,y:-i},{x:o,y:i},{x:-o,y:i}];const a=Math.max(1,Math.ceil(Math.PI/2*r/.1)),A=Math.PI/2/a,c=[];c.push({x:-o+r,y:-i}),c.push({x:o-r,y:-i});for(let l=1;l<=a;l++){const u=-Math.PI/2+l*A;c.push({x:o-r+r*Math.cos(u),y:-i+r+r*Math.sin(u)})}c.push({x:o,y:i-r});for(let l=1;l<=a;l++){const u=0+l*A;c.push({x:o-r+r*Math.cos(u),y:i-r+r*Math.sin(u)})}c.push({x:-o+r,y:i});for(let l=1;l<=a;l++){const u=Math.PI/2+l*A;c.push({x:-o+r+r*Math.cos(u),y:i-r+r*Math.sin(u)})}c.push({x:-o,y:-i+r});for(let l=1;l<=a;l++){const u=Math.PI+l*A;c.push({x:-o+r+r*Math.cos(u),y:-i+r+r*Math.sin(u)})}return c},wB=class extends A6{pcb_board_id=null;source_board_id=null;_drcChecksComplete=!1;_drcChecksInProgress=!1;_connectedSchematicPortPairs=new Set;_panelPositionOffset=null;_castellatedHoles;constructor(t){super(t),this._castellatedHoles=sTo.fromBoardOutline(this._parsedProps.outline);for(const e of this._castellatedHoles)e.port&&this.add(e.port),this.add(e),e.trace&&this.add(e.trace)}get isSubcircuit(){return!0}get isGroup(){return!0}get config(){return{componentName:"Board",zodProps:nlt}}get boardThickness(){return this._parsedProps.thickness??1.4}get allLayers(){return Owe(this._parsedProps.layers??2)}_getSubcircuitLayerCount(){return this._parsedProps.layers??2}_computePcbGlobalTransformBeforeLayout(){if(this._panelPositionOffset){const t=this.parent?._computePcbGlobalTransformBeforeLayout?.()??{a:1,b:0,c:0,d:1,e:0,f:0};return D0(t,M0(this._panelPositionOffset.x,this._panelPositionOffset.y))}return super._computePcbGlobalTransformBeforeLayout()}_getBoardCalcVariables(){const{_parsedProps:t}=this;if((t.width==null||t.height==null)&&!t.outline)return{};const n=this.pcb_board_id?this.root?.db.pcb_board.get(this.pcb_board_id):null;let o=n?.width??t.width,i=n?.height??t.height;if((o==null||i==null)&&t.outline?.length){const l=Oh(t.outline);l&&(o??=l.maxX-l.minX,i??=l.maxY-l.minY)}const{pcbX:r,pcbY:s}=this.getResolvedPcbPositionProp(),a=n?.center??{x:r+(t.outlineOffsetX??0),y:s+(t.outlineOffsetY??0)},A=o??0,c=i??0;return{"board.minX":a.x-A/2,"board.maxX":a.x+A/2,"board.minY":a.y-c/2,"board.maxY":a.y+c/2}}doInitialPcbBoardAutoSize(){if(this.root?.pcbDisabled||!this.pcb_board_id)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),o=t.pcb_board.get(this.pcb_board_id);if(o?.width&&o?.height||o?.outline&&o.outline.length>0)return;let i=1/0,r=1/0,s=-1/0,a=-1/0;const A=uPe(t,this.subcircuit_id),c=new Set([this.subcircuit_id,...A]),l=t.pcb_component.list().filter(x=>x.subcircuit_id&&c.has(x.subcircuit_id)),u=t.pcb_group.list().filter(x=>x.subcircuit_id&&c.has(x.subcircuit_id));let g=!1;const h=(x,E,B)=>{E===0||B===0||(g=!0,i=Math.min(i,x.x-E/2),r=Math.min(r,x.y-B/2),s=Math.max(s,x.x+E/2),a=Math.max(a,x.y+B/2))};for(const x of l)h(x.center,x.width,x.height);for(const x of u){let E=x.width??0,B=x.height??0;if(x.outline&&x.outline.length>0){const S=Oh(x.outline);S&&(E=S.maxX-S.minX,B=S.maxY-S.minY)}h(x.center,E,B)}if(e.boardAnchorPosition){const{x,y:E}=e.boardAnchorPosition;i=Math.min(i,x),r=Math.min(r,E),s=Math.max(s,x),a=Math.max(a,E)}const d=2,p=g?s-i+d*2:0,m=g?a-r+d*2:0,_={x:g?(i+s)/2+(e.outlineOffsetX??0):(e.outlineOffsetX??0)+n.x,y:g?(r+a)/2+(e.outlineOffsetY??0):(e.outlineOffsetY??0)+n.y},f=e.width??p,I=e.height??m;let C=e.outline;!C&&e.borderRadius!=null&&f>0&&I>0&&(C=Mkt(f,I,e.borderRadius));const y={width:f,height:I,center:_};C&&(y.outline=C.map(x=>({x:x.x+(e.outlineOffsetX??0),y:x.y+(e.outlineOffsetY??0)}))),t.pcb_board.update(this.pcb_board_id,y)}updatePcbBoardAutoSize(){this.doInitialPcbBoardAutoSize()}_addBoardInformationToSilkscreen(){const t=this.root?.platform;if(!t?.printBoardInformationToSilkscreen)return;const e=this.root.db.pcb_board.get(this.pcb_board_id);if(!e)return;const n=[];if(t.projectName&&n.push(t.projectName),t.version&&n.push(`v${t.version}`),t.url&&n.push(t.url),n.length===0)return;const o=n.join(`
`),s={x:e.center.x+e.width/2-.25,y:e.center.y-e.height/2+1};this.root.db.pcb_silkscreen_text.insert({pcb_component_id:this.pcb_board_id,layer:"top",font:"tscircuit2024",font_size:.45,text:o,ccw_rotation:0,anchor_alignment:"bottom_right",anchor_position:s})}doInitialSourceRender(){const t=this.getDescendants().find(o=>o.lowercaseComponentName==="board");if(t)throw new Error(`Nested boards are not supported: found board "${t.name}" inside board "${this.name}"`);super.doInitialSourceRender();const{db:e}=this.root,n=e.source_board.insert({source_group_id:this.source_group_id,title:this.props.title||this.props.name});this.source_board_id=n.source_board_id}getSubcircuitPropHash(){return Bkt(this)}doInitialRenderIsolatedSubcircuits(){Ckt(this)}doInitialInflateSubcircuitCircuitJson(){const t=this._isolatedCircuitJson;if(t){this._isInflatedFromCircuitJson=!0,this._isolatedCircuitJson=null,Hue(this,t,[]);return}const{circuitJson:e,children:n}=this._parsedProps;e&&(this._isInflatedFromCircuitJson=!0),Hue(this,e,n)}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,o=e.circuitJson?.find(x=>x.type==="pcb_board"),i=this.props,r=i.isViaInPadAllowed??o?.is_via_in_pad_allowed,s=i.allowBlindAndBuriedVias??o?.allow_blind_and_buried_vias;let a=e.width??o?.width??0,A=e.height??o?.height??0;const c=this._getGlobalPcbPositionBeforeLayout();let l={x:c.x+(e.outlineOffsetX??0),y:c.y+(e.outlineOffsetY??0)};const{boardAnchorPosition:u,boardAnchorAlignment:g}=e;if(u&&(l=u8o({boardAnchorPosition:u,boardAnchorAlignment:g??"center",width:a,height:A})),e.outline){const x=e.outline.map(M=>M.x),E=e.outline.map(M=>M.y),B=Math.min(...x),S=Math.max(...x),Q=Math.min(...E),w=Math.max(...E);a=S-B,A=w-Q}let h=e.outline;!h&&e.borderRadius!=null&&a>0&&A>0&&(h=Mkt(a,A,e.borderRadius));let d={x:0,y:0};if(h&&h.length>0&&(this.parent?.lowercaseComponentName==="panel"||this.parent?.lowercaseComponentName==="subpanel")){const x=Oh(h);if(x){const E=(x.minX+x.maxX)/2,B=(x.minY+x.maxY)/2;d={x:l.x-E,y:l.y-B}}}const p=this.getSubcircuit()._parsedProps,m=this.getInheritedMergedProperty("pcbStyle"),_=$N(m),f=p.minViaHoleDiameter??(m?.viaHoleDiameter!==void 0?_.holeDiameter:void 0),I=f??EB.min_via_hole_diameter,C=p.minViaPadDiameter??(m?.viaPadDiameter!==void 0?_.padDiameter:f!==void 0?f+ATo:EB.min_via_pad_diameter),y=t.pcb_board.insert({source_board_id:this.source_board_id,center:l,thickness:this.boardThickness,num_layers:this.allLayers.length,width:a,height:A,outline:h?.map(x=>({x:x.x+(e.outlineOffsetX??0)+d.x,y:x.y+(e.outlineOffsetY??0)+d.y})),material:e.material,...r!==void 0&&{is_via_in_pad_allowed:r},...s!==void 0&&{allow_blind_and_buried_vias:s},...e.solderMaskColor!==void 0&&{solder_mask_color:e.solderMaskColor},...e.silkscreenColor!==void 0&&{silkscreen_color:e.silkscreenColor},min_trace_width:p.minTraceWidth??EB.min_trace_width,min_via_hole_diameter:I,min_via_pad_diameter:C,min_via_hole_edge_to_via_hole_edge_clearance:p.minViaHoleEdgeToViaHoleEdgeClearance??EB.min_via_hole_edge_to_via_hole_edge_clearance,min_via_edge_to_pad_edge_clearance:p.minViaEdgeToPadEdgeClearance??EB.min_via_edge_to_pad_edge_clearance,min_trace_to_pad_edge_clearance:p.minTraceToPadEdgeClearance??EB.min_trace_to_pad_edge_clearance,min_pad_edge_to_pad_edge_clearance:p.minPadEdgeToPadEdgeClearance??EB.min_pad_edge_to_pad_edge_clearance,min_plated_hole_drill_edge_to_drill_edge_clearance:p.minPlatedHoleDrillEdgeToDrillEdgeClearance??EB.min_plated_hole_drill_edge_to_drill_edge_clearance,min_board_edge_clearance:p.minBoardEdgeClearance??EB.min_board_edge_clearance});this.pcb_board_id=y.pcb_board_id,this._addBoardInformationToSilkscreen()}removePcbComponentRender(){const{db:t}=this.root;this.pcb_board_id&&(t.pcb_board.delete(this.pcb_board_id),this.pcb_board_id=null)}doInitialPcbDesignRuleChecks(){super.doInitialPcbDesignRuleChecks(),this.updatePcbDesignRuleChecks()}doInitialPcbPlacementDesignRuleChecks(){oTo(this)}doInitialPcbImplicitCopperPourRender(){jRo(this)}_generatedStitchingViaIds=new Set;doInitialPcbCopperPourCleanup(){nTo(this)}updatePcbDesignRuleChecks(){const{db:t}=this.root,e=this.root?.pcbRoutingDisabled||this.getInheritedProperty("routingDisabled"),n=this.root?.pcbDisabled,o=this.root?.schematicDisabled,i=this.root?.platform?.drcChecksDisabled??this.getInheritedProperty("drcChecksDisabled"),r=this.root?.platform?.netlistDrcChecksDisabled??this.getInheritedProperty("netlistDrcChecksDisabled"),s=this.getInheritedProperty("pinSpecificationDrcChecksDisabled"),a=this.root?.platform?.placementDrcChecksDisabled??this.getInheritedProperty("placementDrcChecksDisabled"),A=this.root?.platform?.routingDrcChecksDisabled??this.getInheritedProperty("routingDrcChecksDisabled"),c=!i&&!r,l=!i&&!s,u=!i&&!o,g=!i&&!n&&!a,h=!i&&!n&&!e&&!A,d=this.root?.platform?.fabricatorEngine,p=this._parsedProps.fabricatorPreset,m=!i&&!n&&!!d&&!!p;if((h||m)&&this._hasIncompleteAsyncEffectsInSubtreeForPhase("PcbTraceRender"))return;const _=this._hasTracesToRoute();if((h||m)&&_&&!this._areChildSubcircuitsRouted()||this._drcChecksComplete||this._drcChecksInProgress)return;const f=async y=>{const x=[];if(m&&d&&p&&this.pcb_board_id&&x.push(Promise.resolve(d.runDrcChecks({circuitJson:y,fabricatorPreset:p,pcbBoardId:this.pcb_board_id}))),h&&x.push(jmt(y).then(B=>B.filter(S=>!this._isExpectedCastellatedHoleDrcError(S)))),g){const B=t.toArray();x.push(Wmt(y,{consolidateOverlaps:!1}).then(S=>Bse(y,S.filter(Q=>!this._isExpectedCastellatedHoleDrcError(Q))).filter(Q=>!B.some(w=>w.type===Q.type&&"message"in w&&w.message===Q.message))))}if(c&&x.push(y$n(y)),l&&x.push(E$n(y)),u&&x.push(x$n(y)),!i)for(const B of this.selectAll("drccheck"))x.push(B.runCustomDrcCheck(y));const E=await Promise.all(x);t.insertAll(Bse(y,Ymt(E.flat())))},C=t.subtree({subcircuit_id:this.subcircuit_id}).toArray();this._drcChecksInProgress=!0,this._queueAsyncEffect("board:drc-checks",async()=>{try{await f(C),this._drcChecksComplete=!0}finally{this._drcChecksInProgress=!1}})}runRenderPhaseForChildren(t){this.root?.emit("board:renderPhaseStarted",{renderId:this._renderId,phase:t}),super.runRenderPhaseForChildren(t)}_repositionOnPcb(t){const{db:e}=this.root,n=this.pcb_board_id?e.pcb_board.get(this.pcb_board_id):null,o=n?.center;if(!o){this.pcb_board_id&&e.pcb_board.update(this.pcb_board_id,{center:t});return}const i=t.x-o.x,r=t.y-o.y;if(!(Math.abs(i)<1e-6&&Math.abs(r)<1e-6)&&this.pcb_board_id&&(e.pcb_board.update(this.pcb_board_id,{center:t}),n?.outline)){const s=Oh(n.outline);if(s){const a={x:(s.minX+s.maxX)/2,y:(s.minY+s.maxY)/2},A=t.x-a.x,c=t.y-a.y,l=n.outline.map(u=>({x:u.x+A,y:u.y+c}));e.pcb_board.update(this.pcb_board_id,{outline:l});for(const u of this._castellatedHoles)u.syncPositionToBoardOutline()}}}_isExpectedCastellatedHoleDrcError(t){return this._castellatedHoles.some(e=>e.isExpectedBoardEdgeDrcError(t))}},Dkt=class extends A6{constructor(t){super({...t,subcircuit:!0})}getSubcircuitPropHash(){return Bkt(this)}doInitialRenderIsolatedSubcircuits(){Ckt(this)}doInitialCreateNetsFromProps(){super.doInitialCreateNetsFromProps(),this._createTracesForExposedConnections()}_createTracesForExposedConnections(){const t=this._getNetNamesToExpose();if(!t?.length)return;const e=this.parent?.getSubcircuit?.();if(e&&this.name)for(const n of t){const o=cTo(n),i=`> net.${o}`,r=`.${this.name} > net.${o}`;if(e.children.find(c=>c instanceof Qb&&c._parsedProps.name===o)||e.add(new Qb({name:o})),e.children.find(c=>{if(!(c instanceof t1)||!c._exposesSubcircuitConnection)return!1;const l=c._parsedProps;return l.from===r&&l.to===i}))continue;const A=new t1({from:r,to:i,displayName:o});A._exposesSubcircuitConnection=!0,e.add(A)}}_getNetNamesToExpose(){const t=this._parsedProps.exposedNets??[];if(!this._parsedProps.exposeNets)return t;const e=this.selectAll("net").filter(n=>n instanceof Qb&&n.getSubcircuit()===this).map(n=>n._parsedProps.name);return Array.from(new Set([...t,...e]))}doInitialInflateSubcircuitCircuitJson(){const t=this._isolatedCircuitJson;if(t){this._isInflatedFromCircuitJson=!0,this._isolatedCircuitJson=null,Hue(this,t,[]);return}const{circuitJson:e,children:n}=this._parsedProps;e&&(this._isInflatedFromCircuitJson=!0),Hue(this,e,n)}},cTo=t=>t.startsWith("net.")?t.slice(4):t,lTo=class extends Dkt{pcb_board_id=null;get config(){return{componentName:"MountedBoard",zodProps:kPn}}get boardThickness(){return 1.4}get allLayers(){return["top","bottom"]}_connectedSchematicPortPairs=new Set;_getBoardCalcVariables(){return this._findCarrierBoard()?._getBoardCalcVariables()??{}}_findCarrierBoard(){let t=this.parent;for(;t;){if(t instanceof wB)return t;t=t.parent}return null}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),o=t.pcb_board.insert({center:{x:n.x,y:n.y},width:e.width??0,height:e.height??0,is_mounted_to_carrier_board:!0});this.pcb_board_id=o.pcb_board_id}doInitialPcbBoardAutoSize(){if(!this.pcb_board_id||!this.root)return;const t=this._findCarrierBoard();t?.pcb_board_id&&this.root.db.pcb_board.update(this.pcb_board_id,{carrier_pcb_board_id:t.pcb_board_id})}},Nkt=5,GMe=2,Rkt=(t,e)=>{const{gapLength:n,cutoutWidth:o,mouseBites:i,mouseBiteHoleDiameter:r,mouseBiteHoleSpacing:s}=e,a=[],A=[];if(t.length<2)return{tabCutouts:a,mouseBiteHoles:A};const c=new Ip(t.map(u=>by(u.x,u.y)));let l;if(t.length>2){const u=by(t[0].x,t[0].y),g=by(t[1].x,t[1].y),h=vF(u,g).normalize(),d=h.rotate(Math.PI/2),m=u.translate(h.multiply(KBe(u,g).length/2)).translate(d.multiply(.01));l=c.contains(m)}else l=c.area()>0;for(let u=0;u<t.length;u++){const g=t[u],h=t[(u+1)%t.length];if(!g||!h)continue;const d=by(g.x,g.y),p=by(h.x,h.y),m=KBe(d,p),_=m.length;if(_<1e-6)continue;const f=vF(d,p),I=f.normalize();let C=I.rotate(Math.PI/2);const x=m.middle().translate(C.multiply(.01));c.contains(x)&&(C=C.multiply(-1));const E=2,B=E*r+(E-1)*s;let S;i?S=B:S=n,S=Math.min(S,_*.9);const Q=(_-S)/2,w=Q+S;if(i){const Y=r+s;if(S>=B&&Y>0){const W=(S-B)/2+r/2,te=Q+W;for(let j=0;j<E;j++){const J=te+j*Y,oe=d.translate(I.multiply(J));A.push({x:oe.x,y:oe.y})}}}const M=t[(u-1+t.length)%t.length],k=t[(u+2)%t.length];let R=0,F=0;if(M&&k){const Y=vF(by(M.x,M.y),d),W=Y.cross(f),te=l?W>1e-9:W<-1e-9,j=vF(p,by(k.x,k.y)),J=f.cross(j),oe=l?J>1e-9:J<-1e-9;if(te){let ie=Y.angleTo(f);ie>Math.PI&&(ie=2*Math.PI-ie),R=o*Math.tan(ie/2)}else R=0;if(oe){let ie=f.angleTo(j);ie>Math.PI&&(ie=2*Math.PI-ie),F=o*Math.tan(ie/2)}else F=0}const O=S<1e-6?[{start:0-R,end:_+F}]:[{start:0-R,end:Q},{start:w,end:_+F}],U=C.multiply(o);for(const Y of O){const W=Y.end-Y.start;if(W<1e-6)continue;const j=d.translate(I.multiply(Y.start+W/2)).translate(U.multiply(.5)),J=W,oe=o,ie=I.slope*180/Math.PI;a.push({type:"pcb_cutout",shape:"rect",center:{x:j.x,y:j.y},width:J,height:oe,rotation:ie,corner_radius:o/2})}}return{tabCutouts:a,mouseBiteHoles:A}};function uTo(t,e){const n=[],o=[];let{tabWidth:i,tabLength:r,mouseBites:s}=e;const a=[];for(const g of t)if(g.width&&g.height)a.push(Math.min(g.width,g.height));else if(g.outline&&g.outline.length>0){const h=new Ip(g.outline.map(p=>by(p.x,p.y))),d=Math.abs(h.area());d>0&&a.push(Math.sqrt(d))}if(a.length>0){const h=Math.min(...a)/20;i=Math.min(i,GMe*Math.max(h,.3)),r=Math.min(r,Nkt*Math.max(h,.3))}const A=t.map(g=>{if((!g.outline||g.outline.length===0)&&g.width&&g.height){const h=g.width/2,d=g.height/2;return{...g,outline:[{x:g.center.x-h,y:g.center.y-d},{x:g.center.x+h,y:g.center.y-d},{x:g.center.x+h,y:g.center.y+d},{x:g.center.x-h,y:g.center.y+d}]}}return g});for(const g of A)if(g.outline&&g.outline.length>0){const h=i*.45,d=h*.1,p=Rkt(g.outline,{gapLength:r,cutoutWidth:i,mouseBites:s,mouseBiteHoleDiameter:h,mouseBiteHoleSpacing:d});n.push(...p.tabCutouts),o.push(...p.mouseBiteHoles)}const c=n.map((g,h)=>({...g,pcb_cutout_id:`panel_tab_${h}`})),l=i*.45,u=o.map((g,h)=>({type:"pcb_hole",pcb_hole_id:`panel_mouse_bite_${h}`,hole_shape:"circle",hole_diameter:l,x:g.x,y:g.y}));return{tabCutouts:c,mouseBiteHoles:u}}function gTo(t,e){return t.map(i=>{if((!i.outline||i.outline.length===0)&&i.width&&i.height){const r=i.width/2,s=i.height/2;return{...i,outline:[{x:i.center.x-r,y:i.center.y-s},{x:i.center.x+r,y:i.center.y-s},{x:i.center.x+r,y:i.center.y+s},{x:i.center.x-r,y:i.center.y+s}]}}return i}).flatMap(i=>{if(!i.outline||i.outline.length===0)return[];const{tabCutouts:r}=Rkt(i.outline,{gapLength:0,cutoutWidth:e.cutoutWidth,mouseBites:!1,mouseBiteHoleDiameter:0,mouseBiteHoleSpacing:0});return r.map(s=>({...s,pcb_board_id:i.pcb_board_id}))}).map((i,r)=>({...i,pcb_cutout_id:`panel_outline_routing_cutout_${r}`}))}var Gue=t=>{const e=t._parsedProps;let n=e.width!=null?lt.parse(e.width):void 0,o=e.height!=null?lt.parse(e.height):void 0;if((n===void 0||o===void 0)&&e.outline?.length){const i=Oh(e.outline);i&&(n??=i.maxX-i.minX,o??=i.maxY-i.minY)}if((n===void 0||o===void 0)&&e.circuitJson?.length){const i=e.circuitJson.find(r=>r.type==="pcb_board");i&&(n??=i.width,o??=i.height)}return{width:n??0,height:o??0}};function dTo({items:t,db:e,row:n,col:o,cellWidth:i,cellHeight:r,boardGap:s,availablePanelWidth:a,availablePanelHeight:A}){const c=t.map(E=>{const B=hTo(E,e);return{item:E,width:B.width,height:B.height}}).filter(E=>!(E.width===0&&E.height===0));if(c.length===0)return{positions:[],gridWidth:0,gridHeight:0};let l,u;const g=i?lt.parse(i):0,h=r?lt.parse(r):0;if(o!==void 0)l=o,u=n??Math.ceil(c.length/l);else if(n!==void 0)u=n,l=Math.ceil(c.length/u);else if(a!==void 0&&A!==void 0){const E=Math.max(...c.map(w=>w.width),g),B=Math.max(...c.map(w=>w.height),h),S=Math.max(1,Math.floor((a+s)/(E+s))),Q=Math.max(1,Math.floor((A+s)/(B+s)));l=S,u=Math.ceil(c.length/l),u>Q&&(u=Q,l=Math.ceil(c.length/u),l>S&&(l=S,u=Math.ceil(c.length/l))),l=Math.max(1,l),u=Math.max(1,u)}else l=Math.ceil(Math.sqrt(c.length)),u=Math.ceil(c.length/l);const d=Array(l).fill(0),p=Array(u).fill(0);c.forEach((E,B)=>{const S=B%l,Q=Math.floor(B/l);Q<p.length&&E.height>p[Q]&&(p[Q]=E.height),S<d.length&&E.width>d[S]&&(d[S]=E.width)});for(let E=0;E<d.length;E++)d[E]=Math.max(d[E],g);for(let E=0;E<p.length;E++)p[E]=Math.max(p[E],h);const m=d.reduce((E,B)=>E+B,0)+(l>1?(l-1)*s:0),_=p.reduce((E,B)=>E+B,0)+(u>1?(u-1)*s:0),f=-m/2,I=-_/2,C=[f];for(let E=1;E<l;E++)C.push(C[E-1]+d[E-1]+s);const y=[I];for(let E=1;E<u;E++)y.push(y[E-1]+p[E-1]+s);const x=[];return c.forEach((E,B)=>{const S=B%l,Q=Math.floor(B/l);if(Q>=y.length||S>=C.length)return;const w=C[S]+d[S]/2,M=y[Q]+p[Q]/2;x.push({item:E.item,pos:{x:w,y:M}})}),{positions:x,gridWidth:m,gridHeight:_}}function hTo(t,e){if(t.componentName==="Board"){const n=t;if(e&&n.pcb_board_id){const o=e.pcb_board.get(n.pcb_board_id);if(o?.width!==void 0&&o?.height!==void 0)return{width:o.width,height:o.height}}return Gue(n)}if(t.componentName==="Subpanel"){const n=t,o=n._parsedProps;if(o.width!==void 0&&o.height!==void 0)return{width:lt.parse(o.width),height:lt.parse(o.height)};const i=n._getDirectBoardChildren();if(i.length===0){const a=n._getAllBoardInstances();if(a.length===0)return{width:0,height:0};let A=1/0,c=1/0,l=-1/0,u=-1/0;for(const g of a){const h=Gue(g);if(h.width===0||h.height===0)continue;const d=g._panelPositionOffset??{x:0,y:0};A=Math.min(A,d.x-h.width/2),l=Math.max(l,d.x+h.width/2),c=Math.min(c,d.y-h.height/2),u=Math.max(u,d.y+h.height/2)}return A===1/0?{width:0,height:0}:{width:l-A,height:u-c}}if(i.length===1)return Gue(i[0]);if(n._cachedGridWidth>0&&n._cachedGridHeight>0){const a=lt.parse(o.edgePadding??5);return{width:n._cachedGridWidth+a*2,height:n._cachedGridHeight+a*2}}let r=0,s=0;for(const a of i){const A=Gue(a);r=Math.max(r,A.width),s=Math.max(s,A.height)}return{width:r,height:s}}return{width:0,height:0}}var Tkt=class Wye extends A6{pcb_panel_id=null;_panelizationFeaturesGenerated=!1;get config(){return{componentName:"Subpanel",zodProps:fwn}}get _errorComponentName(){return this.componentName.toLowerCase()}get isGroup(){return!0}get isSubcircuit(){return!0}_getPcbLayoutMode(){return"none"}doInitialSchematicComponentRender(){}doInitialSchematicLayout(){}doInitialSchematicTraceRender(){}add(e){if(e.lowercaseComponentName!=="board"&&e.lowercaseComponentName!=="subpanel")throw new Error(`<${this._errorComponentName}> can only contain <board> or <subpanel> elements`);super.add(e)}_cachedGridWidth=0;_cachedGridHeight=0;_panelPositionOffset=null;_computePcbGlobalTransformBeforeLayout(){if(this._panelPositionOffset){const e=this.parent?._computePcbGlobalTransformBeforeLayout?.()??hC();return D0(e,M0(this._panelPositionOffset.x,this._panelPositionOffset.y))}return super._computePcbGlobalTransformBeforeLayout()}_getAllBoardInstances(){const e=[];for(const n of this.children)n instanceof wB?e.push(n):n instanceof Wye&&e.push(...n._getAllBoardInstances());return e}_containsBoards(){for(const e of this.children)if(e.componentName==="Board"||e.componentName==="Subpanel"&&"_containsBoards"in e&&e._containsBoards())return!0;return!1}_getDirectBoardChildren(){return this.children.filter(e=>e instanceof wB)}doInitialPanelBoardLayout(){if(this.root?.pcbDisabled)return;const e=this._parsedProps.layoutMode??"none",n=this.children.filter(h=>h instanceof wB||h instanceof Wye);if(e!=="none")for(const h of n)h instanceof wB&&h._hasUserDefinedPcbPosition()&&this.root.db.source_property_ignored_warning.insert({source_component_id:h.source_component_id,property_name:"pcbX/pcbY",message:`Board has manual positioning but ${this._errorComponentName} layout mode is "${e}". Manual positioning will be ignored.`,error_type:"source_property_ignored_warning"});if(e==="none"&&n.length>1&&n.filter(d=>!d._hasUserDefinedPcbPosition()).length>1&&this.root.db.pcb_placement_error.insert({error_type:"pcb_placement_error",message:`Multiple boards/subpanels in ${this._errorComponentName} without positions. When layoutMode="none", each item must have explicit positioning. Use layoutMode="grid" for automatic positioning.`}),e!=="grid")return;const o=this._parsedProps.tabWidth??GMe,i=this._parsedProps.boardGap??o;let r,s;const a=this._parsedProps.row!==void 0||this._parsedProps.col!==void 0,A=this._parsedProps.width!==void 0,c=this._parsedProps.height!==void 0;if(!a&&A&&c){const{edgePadding:h,edgePaddingLeft:d,edgePaddingRight:p,edgePaddingTop:m,edgePaddingBottom:_}=this._parsedProps,f=lt.parse(h??5),I=lt.parse(d??f),C=lt.parse(p??f),y=lt.parse(m??f),x=lt.parse(_??f),E=lt.parse(this._parsedProps.width),B=lt.parse(this._parsedProps.height);r=E-I-C,s=B-y-x}const{positions:l,gridWidth:u,gridHeight:g}=dTo({items:n,row:this._parsedProps.row,col:this._parsedProps.col,cellWidth:this._parsedProps.cellWidth,cellHeight:this._parsedProps.cellHeight,boardGap:i,availablePanelHeight:s,availablePanelWidth:r});this._cachedGridWidth=u,this._cachedGridHeight=g;for(const{item:h,pos:d}of l)h._panelPositionOffset=d}doInitialPanelLayout(){if(this.root?.pcbDisabled)return;const{db:e}=this.root;if((this._parsedProps.layoutMode??"none")==="grid"){for(const o of this.children)if(o instanceof wB){if(!o.pcb_board_id||!o._panelPositionOffset)continue;e.pcb_board.update(o.pcb_board_id,{position_mode:"relative_to_panel_anchor",display_offset_x:`${o._panelPositionOffset.x}mm`,display_offset_y:`${o._panelPositionOffset.y}mm`})}else if(o instanceof Wye&&o._panelPositionOffset)for(const i of o._getAllBoardInstances()){if(!i.pcb_board_id)continue;const r=i._panelPositionOffset??{x:0,y:0};e.pcb_board.update(i.pcb_board_id,{position_mode:"relative_to_panel_anchor",display_offset_x:`${o._panelPositionOffset.x+r.x}mm`,display_offset_y:`${o._panelPositionOffset.y+r.y}mm`})}this._updatePanelDimensions()}else{const o=this._getGlobalPcbPositionBeforeLayout();for(const i of this._getDirectBoardChildren()){if(!i.pcb_board_id)continue;const r=e.pcb_board.get(i.pcb_board_id);if(!r)continue;const s=r.center.x-o.x,a=r.center.y-o.y;e.pcb_board.update(i.pcb_board_id,{position_mode:"relative_to_panel_anchor",display_offset_x:`${s}mm`,display_offset_y:`${a}mm`})}}this._generatePanelizationFeatures()}_updatePanelDimensions(){const{db:e}=this.root,n=this._parsedProps.width!==void 0,o=this._parsedProps.height!==void 0,i=this._cachedGridWidth,r=this._cachedGridHeight;if(this.pcb_group_id){if(n&&o)e.pcb_group.update(this.pcb_group_id,{width:lt.parse(this._parsedProps.width),height:lt.parse(this._parsedProps.height)});else if(i>0||r>0){const{edgePadding:s,edgePaddingLeft:a,edgePaddingRight:A,edgePaddingTop:c,edgePaddingBottom:l}=this._parsedProps,u=lt.parse(s??5),g=lt.parse(a??u),h=lt.parse(A??u),d=lt.parse(c??u),p=lt.parse(l??u);e.pcb_group.update(this.pcb_group_id,{width:n?lt.parse(this._parsedProps.width):i+g+h,height:o?lt.parse(this._parsedProps.height):r+d+p})}}}_generatePanelizationFeatures(){if(this._panelizationFeaturesGenerated)return;const{db:e}=this.root,n=this._parsedProps,o=n.panelizationMethod??"none",i=this._getAllBoardInstances();if(o!=="none"){const r=i.map(A=>A.pcb_board_id).filter(A=>!!A),s=e.pcb_board.list().filter(A=>r.includes(A.pcb_board_id));if(s.length===0)return;const a=n.tabWidth??GMe;if(o==="outline_routing"){const A=gTo(s,{cutoutWidth:a});for(const c of A)e.pcb_cutout.insert({...c,pcb_group_id:this.pcb_group_id??void 0,pcb_panel_id:this.pcb_panel_id??void 0})}else{n.boardGap;const{tabCutouts:A,mouseBiteHoles:c}=uTo(s,{tabWidth:a,tabLength:n.tabLength??Nkt,mouseBites:n.mouseBites??!0});for(const l of A)e.pcb_cutout.insert(l);for(const l of c)e.pcb_hole.insert(l)}}this._panelizationFeaturesGenerated=!0}doInitialPcbComponentRender(){if(!this.root?.pcbDisabled){if(!this._containsBoards())throw new Error(`<${this._errorComponentName}> must contain at least one <board>`);super.doInitialPcbComponentRender()}}},pTo=class extends Tkt{get config(){return{componentName:"Panel",zodProps:olt}}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;if(!this._containsBoards())throw new Error(`<${this._errorComponentName}> must contain at least one <board>`);const{db:t}=this.root,e=this._parsedProps,n=t.pcb_panel.insert({width:e.width!==void 0?lt.parse(e.width):0,height:e.height!==void 0?lt.parse(e.height):0,thickness:1.6,center:this._getGlobalPcbPositionBeforeLayout(),covered_with_solder_mask:!(e.noSolderMask??!1)});this.pcb_panel_id=n.pcb_panel_id}_updatePanelDimensions(){const{db:t}=this.root,e=this._parsedProps.width!==void 0,n=this._parsedProps.height!==void 0,o=this._cachedGridWidth,i=this._cachedGridHeight;if(this.pcb_panel_id){if(e&&n)t.pcb_panel.update(this.pcb_panel_id,{width:lt.parse(this._parsedProps.width),height:lt.parse(this._parsedProps.height)});else if(o>0||i>0){const{edgePadding:r,edgePaddingLeft:s,edgePaddingRight:a,edgePaddingTop:A,edgePaddingBottom:c}=this._parsedProps,l=lt.parse(r??5),u=lt.parse(s??l),g=lt.parse(a??l),h=lt.parse(A??l),d=lt.parse(c??l);t.pcb_panel.update(this.pcb_panel_id,{width:e?lt.parse(this._parsedProps.width):o+u+g,height:n?lt.parse(this._parsedProps.height):i+h+d})}}}updatePcbComponentRender(){if(this.root?.pcbDisabled||!this.pcb_panel_id)return;const{db:t}=this.root,e=this._parsedProps,n=t.pcb_panel.get(this.pcb_panel_id);t.pcb_panel.update(this.pcb_panel_id,{width:e.width!==void 0?lt.parse(e.width):n?.width,height:e.height!==void 0?lt.parse(e.height):n?.height,center:this._getGlobalPcbPositionBeforeLayout(),covered_with_solder_mask:!(e.noSolderMask??!1)})}removePcbComponentRender(){this.pcb_panel_id&&(this.root?.db.pcb_panel.delete(this.pcb_panel_id),this.pcb_panel_id=null)}},mTo=1,Yue=1,_To=t=>{const e=t.route.map(p=>p.x),n=t.route.map(p=>p.y),o=t.traceWidth/2+mTo,i=Math.min(...e)-o,r=Math.max(...e)+o,s=Math.min(...n)-o,a=Math.max(...n)+o,A=[t.feedPoint,...t.secondaryPort?[t.secondaryPort.point]:[]],c=Math.min(...A.map(p=>p.x))-Yue,l=Math.max(...A.map(p=>p.x))+Yue,u=Math.min(...A.map(p=>p.y))-Yue,g=Math.max(...A.map(p=>p.y))+Yue,h=[],d=(p,m,_,f)=>{m<=p||f<=_||h.push({center:{x:(p+m)/2,y:(_+f)/2},width:m-p,height:f-_})};return t.feedKeepoutOpeningDirection==="left"?(d(i,r,g,a),d(i,r,s,u),d(l,r,u,g)):(d(i,c,s,g),d(l,r,s,g),d(i,r,g,a)),h},fTo=t=>{switch(t){case"2.4ghz_quarter_wave_monopole":return{traceWidth:.6,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:"left",route:[{x:0,y:0},{x:31,y:0}]};case"2.4ghz_meandered_monopole":return{traceWidth:.5,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:"bottom",route:[{x:0,y:0},{x:0,y:6},{x:3,y:6},{x:3,y:1.5},{x:6,y:1.5},{x:6,y:6},{x:9,y:6},{x:9,y:1.5},{x:12,y:1.5},{x:12,y:6},{x:15,y:6}]};case"2.4ghz_inverted_f":return{traceWidth:.8,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:"bottom",secondaryPort:{point:{x:-4,y:0},role:"ground"},groundViaPoint:{x:-4,y:0},route:[{x:-4,y:0},{x:-4,y:3},{x:0,y:3},{x:0,y:0},{x:0,y:3},{x:-4,y:3},{x:-4,y:8},{x:22,y:8}]};case"2.4ghz_meandered_inverted_f":return{traceWidth:.5,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:"bottom",secondaryPort:{point:{x:-1.7,y:0},role:"ground"},groundViaPoint:{x:-1.7,y:0},route:[{x:-1.7,y:0},{x:-1.7,y:4.9},{x:0,y:4.9},{x:0,y:0},{x:0,y:4.9},{x:-1.7,y:4.9},{x:2.3,y:4.9},{x:2.3,y:1.4},{x:5.3,y:1.4},{x:5.3,y:4.9},{x:8.3,y:4.9},{x:8.3,y:1.4},{x:11.3,y:1.4},{x:11.3,y:4.9},{x:13.3,y:4.9}]};case"2.4ghz_folded_dipole":return{traceWidth:.9,feedPoint:{x:0,y:0},feedKeepoutOpeningDirection:"bottom",secondaryPort:{point:{x:1.2,y:0},role:"feed2"},route:[{x:0,y:0},{x:-22.4,y:0},{x:-22.4,y:9},{x:23.6,y:9},{x:23.6,y:0},{x:1.2,y:0}]}}},ITo=class extends g0{get config(){return{componentName:"Antenna",zodProps:QPn,sourceFtype:$7.simple_chip,shouldRenderAsSchematicBox:!0}}getRefDesPrefixes(){return["ANT"]}initPorts(){const{antennaShape:t,pcbPath:e}=this._parsedProps,n=e?void 0:t==="2.4ghz_inverted_f"||t==="2.4ghz_meandered_inverted_f"?"ground":t==="2.4ghz_folded_dipole"?"feed2":void 0;super.initPorts({pinCount:n?2:1,additionalAliases:{pin1:n==="feed2"?["feed","feed1"]:["feed"],...n==="ground"?{pin2:["ground","gnd"]}:n==="feed2"?{pin2:["feed2"]}:{}}})}doInitialReactSubtreesRender(){super.doInitialReactSubtreesRender();const{antennaShape:t,pcbPath:e}=this._parsedProps;if(!t)return;const n=this.children.some(r=>r.componentName==="Footprint");if(e&&n)return;const o=e?void 0:fTo(t),i=new Y0e({name:`${this.name}_generated_antenna`});if(n||i.add(new Mb({shape:"rect",width:.8,height:.8,pcbX:o?.feedPoint.x??0,pcbY:o?.feedPoint.y??0,layer:"top",portHints:["pin1"],coveredWithSolderMask:!0})),o){const r=_To(o);for(const s of r)i.add(new k0e({shape:"rect",pcbX:s.center.x,pcbY:s.center.y,width:s.width,height:s.height,layers:[...this.root?._getBoard()?.allLayers??["top","bottom"]],excludeRefs:[this.getSubcircuitSelector()]}));i.add(new tPe({route:o.route.map(s=>({route_type:"wire",...s,width:o.traceWidth,layer:"top"}))})),o.secondaryPort&&!o.groundViaPoint&&!n&&i.add(new Mb({shape:"rect",width:.8,height:.8,pcbX:o.secondaryPort.point.x,pcbY:o.secondaryPort.point.y,layer:"top",portHints:["pin2"],coveredWithSolderMask:!0})),o.groundViaPoint&&i.add(new Pb({shape:"circle",pcbX:o.groundViaPoint.x,pcbY:o.groundViaPoint.y,holeDiameter:.3,outerDiameter:.7,portHints:["pin2"],coveredWithSolderMask:!0}))}this.add(i)}doInitialCreateTracesFromProps(){super.doInitialCreateTracesFromProps();const{pcbPath:t}=this._parsedProps;t&&this.add(new t1({name:`${this.name}_pcb_path`,path:[`${this.getSubcircuitSelector()} > port.pin1`],pcbPath:t}))}},CTo=class extends zj{constructor(t){super(t)}get config(){return{...super.config,componentName:"Pinout",zodProps:wwn}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_pinout",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,display_name:e.displayName});this.source_component_id=n.source_component_id}},yTo=class extends g0{get config(){return{componentName:"fuse",schematicSymbolName:this.props.symbolName??"fuse",zodProps:Rwn,sourceFtype:$7.simple_fuse}}_getSchematicSymbolDisplayValue(){if(this._parsedProps.schShowRatings===!1)return"";const e=this._parsedProps.currentRating,n=this._parsedProps.voltageRating,o=q1(e,"A").value,i=q1(n,"V").value;return`${H_(o)}A / ${H_(i)}V`}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=q1(n.currentRating,"A").value,i=q1(n.voltageRating,"V").value;let r,s;n.schShowRatings!==!1&&(r=`${H_(o)}A`,s=`${H_(i)}V`);const a=e.source_component.insert({name:this.name,ftype:$7.simple_fuse,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,...o!=null?{current_rating_amps:o}:{},...i!=null?{voltage_rating_volts:i}:{},display_current_rating:r,display_voltage_rating:s,display_name:n.displayName});this.source_component_id=a.source_component_id}},xTo=class extends g0{schematicDimensions=null;get config(){return{schematicSymbolName:void 0,componentName:"Jumper",zodProps:clt,shouldRenderAsSchematicBox:!0}}_getSchematicPortArrangement(){const t=super._getSchematicPortArrangement();if(t&&Object.keys(t).length>0)return t;const e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:this.getPortsFromFootprint().length),n=this._parsedProps.schDirection??"right";return{leftSize:n==="left"?e:0,rightSize:n==="right"?e:0}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=t.source_component.insert({ftype:"simple_chip",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=i.source_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=this.getGlobalTransformRotation(),r=t.pcb_component.insert({center:{x:n,y:o},width:2,height:3,layer:e.layer??"top",rotation:k9(i),insertion_direction:this._getPcbComponentInsertionDirection(e.layer??"top",i),source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0});this.pcb_component_id=r.pcb_component_id}doInitialPcbPortAttachment(){const{db:t}=this.root,e=t.pcb_port.list({pcb_component_id:this.pcb_component_id}),n={};for(let r=0;r<e.length;r++){const s=e[r],a=t.source_port.get(s.source_port_id);let A="";if(typeof a?.pin_number=="number")A=a.pin_number.toString();else if(Array.isArray(a?.port_hints)){let c=a.port_hints.find(l=>/^(pin)?\d+$/.test(l));c&&(/^pin\d+$/.test(c)?A=c.replace(/^pin/,""):A=c)}n[A]=s.pcb_port_id}const o=t.pcb_trace.list({pcb_component_id:this.pcb_component_id}),i=r=>{if(r&&typeof r=="string"&&r.startsWith("{PIN")){const s=r.replace("{PIN","").replace("}","");return n[s]||r}return r};for(const r of o)if(r.route)for(const s of r.route)s.route_type==="wire"&&(s.start_pcb_port_id=i(s.start_pcb_port_id),s.end_pcb_port_id=i(s.end_pcb_port_id))}},kkt={"0402":"0402","0603":"0603","0805":"0805",1206:"1206"},ETo=class extends g0{get config(){return{componentName:"Interconnect",zodProps:Nwn,shouldRenderAsSchematicBox:!0,sourceFtype:"interconnect"}}get defaultInternallyConnectedPinNames(){const{standard:t}=this._parsedProps;return t&&kkt[t]?[["pin1","pin2"]]:[]}_getImpliedFootprintString(){const{standard:t}=this._parsedProps;return t?kkt[t]??null:null}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"interconnect",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSourceParentAttachment(){const{db:t}=this.root,e=this._getInternallyConnectedPins();for(const n of e){const o=n.map(i=>i.source_port_id).filter(i=>i!==null);o.length>=2&&t.source_component_internal_connection.insert({source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id,source_port_ids:o})}}},BTo=class extends g0{schematicDimensions=null;_getPinCountFromFootprintString(t){const e=t.match(/^solderjumper([23])(?:_|$)/);return e?Number(e[1]):null}_getPinNumberFromBridgedPinsProp(t){const e=t.match(/^(?:pin)?(\d+)$/i);if(e)return Number(e[1]);const n=this._parsedProps.pinLabels??this.props.pinLabels;if(Array.isArray(n)){const o=n.findIndex(i=>i===t);return o>=0?o+1:null}if(n&&typeof n=="object")for(const[o,i]of Object.entries(n)){if(!(Array.isArray(i)?i:[i]).includes(t))continue;const s=o.match(/^(?:pin)?(\d+)$/i);return s?Number(s[1]):null}return null}_getBridgedPinNumbersForFootprint(t){const e=this._parsedProps??this.props;return Array.isArray(e.bridgedPins)&&e.bridgedPins.length>0?Array.from(new Set(e.bridgedPins.flat().map(n=>this._getPinNumberFromBridgedPinsProp(n)).filter(n=>n!==null&&n>=1&&n<=t))).sort((n,o)=>n-o):e.bridged?Array.from({length:t},(n,o)=>o+1):[]}resolveFootprint(){const t=super.resolveFootprint();if(typeof t!="string")return t;const e=this._getPinCountFromFootprintString(t);if(!e||/_bridged\d+/.test(t))return t;const n=this._getBridgedPinNumbersForFootprint(e);return n.length===0?t:t.replace(/^solderjumper[23]/,`solderjumper${e}_bridged${n.join("")}`)}_getPinNumberFromBridgedPinName(t){return this.selectOne(`port.${t}`,{type:"port"})?._parsedProps.pinNumber??null}get defaultInternallyConnectedPinNames(){if(this._parsedProps.bridged){const t=this.children.filter(e=>e.componentName==="Port").map(e=>e.name);return t.length>0?[t]:[]}return this._parsedProps.bridgedPins??[]}get config(){const t=this._parsedProps??this.props;let e=t.pinCount;if(t.pinCount==null&&!t.footprint&&(e=2),t.pinCount==null){const i=(t.bridgedPins??[]).flat().map(A=>this._getPinNumberFromBridgedPinName(A)).filter(A=>A!==null),r=i.length>0?Math.max(...i):0,s=t.pinLabels?Object.keys(t.pinLabels).length:0,a=Math.max(r,s);(a===2||a===3)&&(e=a),e==null&&t.footprint&&[2,3].includes(this.getPortsFromFootprint().length)&&(e=this.getPortsFromFootprint().length)}let n="";e?n+=`solderjumper${e}`:n="solderjumper";let o=[];return Array.isArray(t.bridgedPins)&&t.bridgedPins.length>0?o=Array.from(new Set(t.bridgedPins.flat().map(i=>this._getPinNumberFromBridgedPinName(i)).filter(i=>i!==null))).sort((i,r)=>i-r):t.bridged&&e&&(o=Array.from({length:e},(i,r)=>r+1)),o.length>0&&(n+=`_bridged${o.join("")}`),{schematicSymbolName:t.symbolName??n,componentName:"SolderJumper",zodProps:Pwn,shouldRenderAsSchematicBox:!0}}_getSchematicPortArrangement(){const t=super._getSchematicPortArrangement();if(t&&Object.keys(t).length>0)return t;let e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:this.getPortsFromFootprint().length);e==null&&!this._parsedProps.footprint&&(e=2);const n=this._parsedProps.schDirection??"right";return{leftSize:n==="left"?e:0,rightSize:n==="right"?e:0}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=t.source_component.insert({ftype:"simple_chip",name:this.name,manufacturer_part_number:e.manufacturerPartNumber,supplier_part_numbers:e.supplierPartNumbers,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=i.source_component_id}doInitialPcbComponentRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{pcbX:n,pcbY:o}=this.getResolvedPcbPositionProp(),i=this.getGlobalTransformRotation(),r=t.pcb_component.insert({center:{x:n,y:o},width:2,height:3,layer:e.layer??"top",rotation:k9(i),insertion_direction:this._getPcbComponentInsertionDirection(e.layer??"top",i),source_component_id:this.source_component_id,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0,do_not_place:e.doNotPlace??!1,obstructs_within_bounds:e.obstructsWithinBounds??!0,is_allowed_to_be_off_board:e.allowOffBoard??!1,metadata:e.kicadFootprintMetadata?{kicad_footprint:e.kicadFootprintMetadata}:void 0});this.pcb_component_id=r.pcb_component_id}doInitialPcbPortAttachment(){const{db:t}=this.root,e=t.pcb_port.list({pcb_component_id:this.pcb_component_id}),n={};for(let r=0;r<e.length;r++){const s=e[r],a=t.source_port.get(s.source_port_id);let A="";if(typeof a?.pin_number=="number")A=a.pin_number.toString();else if(Array.isArray(a?.port_hints)){let c=a.port_hints.find(l=>/^(pin)?\d+$/.test(l));c&&(/^pin\d+$/.test(c)?A=c.replace(/^pin/,""):A=c)}n[A]=s.pcb_port_id}const o=t.pcb_trace.list({pcb_component_id:this.pcb_component_id}),i=r=>{if(r&&typeof r=="string"&&r.startsWith("{PIN")){const s=r.replace("{PIN","").replace("}","");return n[s]||r}return r};for(const r of o)if(r.route)for(const s of r.route)s.route_type==="wire"&&(s.start_pcb_port_id=i(s.start_pcb_port_id),s.end_pcb_port_id=i(s.end_pcb_port_id))}},bTo=class extends g0{get config(){return{schematicSymbolName:this.props.symbolName??"power_factor_meter_horz",componentName:"PowerSource",zodProps:OMn,sourceFtype:"simple_power_source"}}initPorts(){this.add(new Pu({name:"pin1",pinNumber:1,aliases:["positive","pos"]})),this.add(new Pu({name:"pin2",pinNumber:2,aliases:["negative","neg"]}))}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_power_source",name:this.name,voltage:e.voltage,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}pos=this.portMap.pin1;positive=this.portMap.pin1;neg=this.portMap.pin2;negative=this.portMap.pin2},Fkt=class extends g0{simulation_voltage_source_id=null;get config(){return{componentName:"VoltageSource",schematicSymbolName:this.props.waveShape==="square"?"square_wave":"ac_voltmeter",zodProps:UMn,sourceFtype:"simple_voltage_source"}}runRenderPhaseForChildren(t){if(!t.startsWith("Pcb"))for(const e of this.children)e.runRenderPhaseForChildren(t),e.runRenderPhase(t)}doInitialPcbComponentRender(){const t=this._hasUserDefinedPcbPosition();if(!this._parsedProps.footprint){if(!t)return;throw new Error("VoltageSource requires a footprint when pcbX/pcbY or pcb edge position props are used")}super.doInitialPcbComponentRender()}initPorts(){super.initPorts({additionalAliases:{pin1:["terminal1"],pin2:["terminal2"]}})}_getSchematicSymbolDisplayValue(){const{voltage:t,frequency:e}=this._parsedProps,n=[];return t!==void 0&&n.push(`${H_(t)}V`),e!==void 0&&n.push(`${H_(e)}Hz`),n.length>0?n.join(" "):void 0}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_voltage_source",name:this.name,voltage:e.voltage,frequency:e.frequency,peak_to_peak_voltage:e.peakToPeakVoltage,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,pulse_delay:e.pulseDelay,rise_time:e.riseTime,fall_time:e.fallTime,pulse_width:e.pulseWidth,period:e.period,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=this.portMap.terminal1,o=this.portMap.terminal2,i=t.simulation_voltage_source.insert({is_dc_source:!1,terminal1_source_port_id:n.source_port_id??void 0,terminal2_source_port_id:o.source_port_id??void 0,voltage:e.voltage,frequency:e.frequency,peak_to_peak_voltage:e.peakToPeakVoltage,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,pulse_delay:e.pulseDelay,rise_time:e.riseTime,fall_time:e.fallTime,pulse_width:e.pulseWidth,period:e.period,ac_magnitude:e.acMagnitude,ac_phase:e.acPhase});this.simulation_voltage_source_id=i.simulation_voltage_source_id}terminal1=this.portMap.terminal1;terminal2=this.portMap.terminal2},Lkt=class extends g0{simulation_current_source_id=null;get config(){return{componentName:"CurrentSource",schematicSymbolName:"current_source",zodProps:zMn,sourceFtype:"simple_current_source"}}runRenderPhaseForChildren(t){if(!t.startsWith("Pcb"))for(const e of this.children)e.runRenderPhaseForChildren(t),e.runRenderPhase(t)}doInitialPcbComponentRender(){const t=this._hasUserDefinedPcbPosition();if(!this._parsedProps.footprint){if(!t)return;throw new Error("CurrentSource requires a footprint when pcbX/pcbY or pcb edge position props are used")}super.doInitialPcbComponentRender()}initPorts(){super.initPorts({additionalAliases:{pin1:["pos"],pin2:["neg"]}})}_getSchematicSymbolDisplayValue(){const{current:t,frequency:e,peakToPeakCurrent:n}=this._parsedProps,o=[];return t!==void 0&&o.push(`${H_(t)}A`),n!==void 0&&o.push(`${H_(n)}A p-p`),e!==void 0&&o.push(`${H_(e)}Hz`),o.length>0?o.join(" "):void 0}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_current_source",name:this.name,current:e.current,frequency:e.frequency,peak_to_peak_current:e.peakToPeakCurrent,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=e.frequency!==void 0||e.peakToPeakCurrent!==void 0||e.waveShape!==void 0||e.acMagnitude!==void 0||e.acPhase!==void 0,o=this.portMap.pos,i=this.portMap.neg;if(n){const r=t.simulation_current_source.insert({is_dc_source:!1,terminal1_source_port_id:o.source_port_id??void 0,terminal2_source_port_id:i.source_port_id??void 0,current:e.current,frequency:e.frequency,peak_to_peak_current:e.peakToPeakCurrent,wave_shape:e.waveShape,phase:e.phase,duty_cycle:e.dutyCycle,ac_magnitude:e.acMagnitude,ac_phase:e.acPhase});this.simulation_current_source_id=r.simulation_current_source_id}else{if(e.current===void 0)return;const r=t.simulation_current_source.insert({is_dc_source:!0,positive_source_port_id:o.source_port_id??void 0,negative_source_port_id:i.source_port_id??void 0,current:e.current,ac_magnitude:e.acMagnitude,ac_phase:e.acPhase});this.simulation_current_source_id=r.simulation_current_source_id}}pos=this.portMap.pos;neg=this.portMap.neg},Uue=.25,Hkt=(t,e)=>({left:t.center.x-t.size.width/2-e,right:t.center.x+t.size.width/2+e,bottom:t.center.y-t.size.height/2-e,top:t.center.y+t.size.height/2+e}),STo=(t,e)=>t.left<e.right&&t.right>e.left&&t.bottom<e.top&&t.top>e.bottom,QTo=({baseCenter:t,size:e})=>{const n=e.width+Uue*2,o=e.height+Uue*2;return[t,{x:t.x,y:t.y+o},{x:t.x,y:t.y-o},{x:t.x+n,y:t.y},{x:t.x-n,y:t.y},{x:t.x+n,y:t.y+o},{x:t.x-n,y:t.y+o},{x:t.x+n,y:t.y-o},{x:t.x-n,y:t.y-o},{x:t.x,y:t.y+o*2},{x:t.x,y:t.y-o*2}]},vTo=({ammeterSourcePortId:t,schematicPorts:e,sourceTraces:n})=>{for(const o of n){if(!o.connected_source_port_ids.includes(t))continue;const i=o.connected_source_port_ids.find(s=>s!==t);if(i===void 0)continue;const r=e.find(s=>s.source_port_id===i);if(r)return r}return null},wTo=t=>({x:t.reduce((e,n)=>e+n.center.x,0)/t.length,y:t.reduce((e,n)=>e+n.center.y,0)/t.length}),PTo=({ammeter:t,db:e,oldCenter:n,newCenter:o})=>{const i=t.schematic_component_id;if(!i)return;const r=o.x-n.x,s=o.y-n.y;if(!(r===0&&s===0)){e.schematic_component.update(i,{center:o});for(const a of e.schematic_port.list({schematic_component_id:i}))e.schematic_port.update(a.schematic_port_id,{center:{x:a.center.x+r,y:a.center.y+s}});for(const a of e.schematic_text.list({schematic_component_id:i}))e.schematic_text.update(a.schematic_text_id,{position:{x:a.position.x+r,y:a.position.y+s}});MO({db:e,schematicComponentId:i,deltaX:r,deltaY:s})}},MTo=t=>{const{root:e}=t;if(!e||e.schematicDisabled||!t.schematic_component_id||t._parsedProps.schX!==void 0||t._parsedProps.schY!==void 0||t.getGroup()?._getSchematicLayoutMode()!=="relative")return;const{db:n}=e,o=n.schematic_component.get(t.schematic_component_id);if(!o)return;const i=[t.portMap.pos.source_port_id,t.portMap.neg.source_port_id].filter(u=>typeof u=="string");if(i.length===0)return;const r=n.schematic_port.list(),s=n.source_trace.list(),a=i.map(u=>vTo({ammeterSourcePortId:u,schematicPorts:r,sourceTraces:s})).filter(u=>u!==null);if(a.length===0)return;const A=wTo(a),c=n.schematic_component.list().filter(u=>u.schematic_component_id!==o.schematic_component_id&&!u.is_schematic_group&&u.schematic_sheet_id===o.schematic_sheet_id).map(u=>Hkt(u,Uue)),l=QTo({baseCenter:A,size:o.size}).find(u=>{const g=Hkt({...o,center:u},Uue);return!c.some(h=>STo(g,h))})??A;PTo({ammeter:t,db:n,oldCenter:o.center,newCenter:l})},DTo=class extends g0{simulation_current_probe_id=null;get config(){return{componentName:"Ammeter",schematicSymbolName:"dc_ammeter",zodProps:$Mn,sourceFtype:"simple_ammeter"}}runRenderPhaseForChildren(t){if(!t.startsWith("Pcb"))for(const e of this.children)e.runRenderPhaseForChildren(t),e.runRenderPhase(t)}doInitialPcbComponentRender(){const t=this._hasUserDefinedPcbPosition();if(!this._parsedProps.footprint){if(!t)return;throw new Error("Ammeter requires a footprint when pcbX/pcbY or pcb edge position props are used")}super.doInitialPcbComponentRender()}initPorts(){super.initPorts({ignoreSymbolPorts:!0,pinCount:2,additionalAliases:{pin1:["pos"],pin2:["neg"]}});const t=Su[this._getSchematicSymbolNameOrThrow()];this.portMap.pos.schematicSymbolPortDef=t.ports.find(e=>e.labels.includes("1"))??null,this.portMap.neg.schematicSymbolPortDef=t.ports.find(e=>e.labels.includes("2"))??null}doInitialSourceRender(){const{db:t}=this.root,{supplierPartNumbers:e,displayName:n}=this._parsedProps,o=t.source_component.insert({ftype:"simple_ammeter",name:this.name,supplier_part_numbers:e,manufacturer_part_number:this._parsedProps.manufacturerPartNumber??this._parsedProps.mfn,display_name:n});this.source_component_id=o.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,{color:e,graphDisplayName:n,graphCenter:o,graphVerticalOffset:i,graphCurrentPerDiv:r}=this._parsedProps,s=this.portMap.pos,a=this.portMap.neg,{simulation_current_probe_id:A}=t.simulation_current_probe.insert({type:"simulation_current_probe",name:this.name,source_component_id:this.source_component_id,positive_source_port_id:s.source_port_id,negative_source_port_id:a.source_port_id,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,color:e});if(this.simulation_current_probe_id=A,n!==void 0||o!==void 0||i!==void 0||r!==void 0){const l=Sw(r),u=Sw(i);t.simulation_oscilloscope_trace.insert({simulation_current_probe_id:A,display_name:n,color:e,display_center_value:o,amps_per_div:l,display_center_offset_divs:u!==void 0&&l!==void 0&&l!==0?u/l:void 0})}}doInitialSchematicLayout(){MTo(this)}pos=this.portMap.pos;neg=this.portMap.neg},NTo=["leftedge","rightedge","topedge","bottomedge","center"],RTo=class extends Ir{get config(){return{componentName:"Constraint",zodProps:oPn}}constructor(t){if(super(t),("xdist"in t||"ydist"in t)&&!("edgeToEdge"in t)&&!("centerToCenter"in t))throw new Error(`edgeToEdge, centerToCenter must be set for xDist or yDist for ${this}`);if("for"in t&&t.for.length<2)throw new Error(`"for" must have at least two selectors for ${this}`)}_getAllReferencedComponents(){const t=[],e=this.getPrimitiveContainer();function n(o){const i=o.split(" ").pop(),r=NTo.includes(i)?i:void 0,s=r?o.replace(` ${r}`,""):o,a=e.selectOne(s,{pcbPrimitive:!0});a&&t.push({selector:o,component:a,componentSelector:s,edge:r})}for(const o of["left","right","top","bottom"])o in this._parsedProps&&n(this._parsedProps[o]);if("for"in this._parsedProps)for(const o of this._parsedProps.for)n(o);return{componentsWithSelectors:t}}},TTo=class extends Ir{get config(){return{componentName:"AutoroutingPhase",zodProps:iMn}}add(t){throw new Error("<autoroutingphase> cannot contain children")}},kTo=class extends Ir{fabrication_note_dimension_id=null;isPcbPrimitive=!0;get config(){return{componentName:"FabricationNoteDimension",zodProps:SMn}}_resolvePoint(t,e){if(typeof t=="string"){const i=this.getSubcircuit().selectOne(t);return i?i._getGlobalPcbPositionBeforeLayout():(this.renderError(`FabricationNoteDimension could not find selector "${t}"`),ts(e,{x:0,y:0}))}const n=typeof t.x=="string"?parseFloat(t.x):t.x,o=typeof t.y=="string"?parseFloat(t.y):t.y;return ts(e,{x:n,y:o})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=this._resolvePoint(e.from,n),i=this._resolvePoint(e.to,n),r=this.getSubcircuit(),s=this.getGroup(),{maybeFlipLayer:a}=this._getPcbPrimitiveFlippedHelpers(),A=a(e.layer??"top");if(A!=="top"&&A!=="bottom")throw new Error(`Invalid layer "${A}" for FabricationNoteDimension. Must be "top" or "bottom".`);const c=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,l=e.text??this._formatDistanceText({from:o,to:i,units:e.units??"mm"}),u=t.pcb_fabrication_note_dimension.insert({pcb_component_id:c,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:s?.pcb_group_id??void 0,layer:A,from:o,to:i,text:l,offset:e.offset,font:e.font??"tscircuit2024",font_size:e.fontSize??1,color:e.color,arrow_size:e.arrowSize??1});this.fabrication_note_dimension_id=u.pcb_fabrication_note_dimension_id}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.fabrication_note_dimension_id)return;const o=n.pcb_fabrication_note_dimension.get(this.fabrication_note_dimension_id);o&&n.pcb_fabrication_note_dimension.update(this.fabrication_note_dimension_id,{from:{x:o.from.x+t,y:o.from.y+e},to:{x:o.to.x+t,y:o.to.y+e}})}getPcbSize(){const t=this._computePcbGlobalTransformBeforeLayout(),e=this._resolvePoint(this._parsedProps.from,t),n=this._resolvePoint(this._parsedProps.to,t);return{width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}}_formatDistanceText({from:t,to:e,units:n}){const o=e.x-t.x,i=e.y-t.y,r=Math.sqrt(o*o+i*i),s=n==="in"?r/25.4:r,a=Math.round(s);if(Math.abs(s-a)<1e-9)return`${a}${n}`;const c=n==="in"?3:2;return`${n==="in"?Number(s.toFixed(c)).toString():s.toFixed(c)}${n}`}},FTo=class extends Ir{pcb_note_dimension_id=null;isPcbPrimitive=!0;get config(){return{componentName:"PcbNoteDimension",zodProps:QDn}}_resolvePoint(t,e){if(typeof t=="string"){const i=this.getSubcircuit().selectOne(`.${t}`);if(!i)return this.renderError(`PcbNoteDimension could not find selector "${t}"`),ts(e,{x:0,y:0});const r=i.pcb_component_id,s=this.root;if(r&&s){const a=s.db.pcb_component.get(r);if(a?.center)return{x:a.center.x,y:a.center.y}}return i._getGlobalPcbPositionBeforeLayout()}const n=typeof t.x=="string"?parseFloat(t.x):t.x,o=typeof t.y=="string"?parseFloat(t.y):t.y;return ts(e,{x:n,y:o})}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._computePcbGlobalTransformBeforeLayout(),o=this._resolvePoint(e.from,n),i=this._resolvePoint(e.to,n),r=this.getSubcircuit(),s=this.getGroup(),a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??void 0,A=e.text??this._formatDistanceText({from:o,to:i,units:e.units??"mm"}),c=t.pcb_note_dimension.insert({pcb_component_id:a,subcircuit_id:r?.subcircuit_id??void 0,pcb_group_id:s?.pcb_group_id??void 0,from:o,to:i,text:A,font:e.font??"tscircuit2024",font_size:e.fontSize??1,layer:e.layer==="bottom"?"bottom":"top",color:e.color,arrow_size:e.arrowSize??1});this.pcb_note_dimension_id=c.pcb_note_dimension_id}doInitialPcbLayout(){const t=this.root;if(!t||t.pcbDisabled||!this.pcb_note_dimension_id)return;const{db:e}=t,n=this._computePcbGlobalTransformBeforeLayout(),o=this._resolvePoint(this._parsedProps.from,n),i=this._resolvePoint(this._parsedProps.to,n);e.pcb_note_dimension.update(this.pcb_note_dimension_id,{from:o,to:i})}getPcbSize(){const t=this._computePcbGlobalTransformBeforeLayout(),e=this._resolvePoint(this._parsedProps.from,t),n=this._resolvePoint(this._parsedProps.to,t);return{width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}}_formatDistanceText({from:t,to:e,units:n}){const o=e.x-t.x,i=e.y-t.y,r=Math.sqrt(o*o+i*i),s=n==="in"?r/25.4:r,a=Math.round(s);if(Math.abs(s-a)<1e-9)return`${a}${n}`;const c=n==="in"?3:2;return`${n==="in"?Number(s.toFixed(c)).toString():s.toFixed(c)}${n}`}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_note_dimension_id)return;const o=n.pcb_note_dimension.get(this.pcb_note_dimension_id);o&&n.pcb_note_dimension.update(this.pcb_note_dimension_id,{from:{x:o.from.x+t,y:o.from.y+e},to:{x:o.to.x+t,y:o.to.y+e}})}},Kue=class extends VTt{get config(){return{componentName:"AutoplacedBreakoutPoint",zodProps:CNo}}_applySolvedBreakoutPoint({sourceTraceId:t,layer:e,position:n}){this.matchedSourceTraceId=t,this._renderPcbBreakoutPoint({layer:Pr.parse(e)}),this._setPositionFromLayout(n)}},Okt=[{id:"DQ0",layer:"inner3",soc:{x:-6,y:-3},ram:{x:3.941917,y:-3.650917}},{id:"DQ1",layer:"inner6",fullLayer:"inner2",soc:{x:-5.5,y:-3},ram:{x:4.591917,y:-3.650917}},{id:"DQ2",layer:"inner5",fullLayer:"inner4",soc:{x:-4.5,y:-3},ram:{x:5.891917,y:-3.650917}},{id:"DQ3",layer:"inner2",fullLayer:"inner6",soc:{x:-4.5,y:-3.5},ram:{x:6.541917,y:-3.650917}},{id:"DQ4",layer:"inner3",fullLayer:"inner2",soc:{x:-6,y:-2.5},ram:{x:6.541917,y:-2.050917}},{id:"DQ5",layer:"inner2",fullLayer:"inner5",soc:{x:-6,y:-2},ram:{x:5.891917,y:-2.050917}},{id:"DQ6",layer:"inner5",fullLayer:"inner4",soc:{x:-5,y:-2},ram:{x:4.591917,y:-2.050917}},{id:"DQ7",layer:"inner4",fullLayer:"inner6",soc:{x:-5.5,y:-2},ram:{x:3.941917,y:-2.050917}},{id:"DM0",layer:"inner4",fullLayer:"inner5",soc:{x:-5,y:-3},ram:{x:4.591917,y:-2.850917}},{id:"DQS0",layer:"inner1",differentialPairId:"DQS0",soc:{x:-4.5,y:-2.5},ram:{x:5.241917,y:-2.850917}},{id:"DQS0_n",layer:"inner1",differentialPairId:"DQS0",soc:{x:-5,y:-2.5},ram:{x:5.891917,y:-2.850917}}],Gkt=[{id:"DQ8",layer:"inner6",fullLayer:"inner4",soc:{x:-6,y:3},ram:{x:3.941917,y:3.549083}},{id:"DQ9",layer:"inner3",fullLayer:"inner4",soc:{x:-5.5,y:2},ram:{x:4.591917,y:3.549083}},{id:"DQ10",layer:"inner3",fullLayer:"inner2",soc:{x:-4.5,y:2},ram:{x:5.891917,y:3.549083}},{id:"DQ11",layer:"inner6",fullLayer:"inner5",soc:{x:-4.5,y:2.5},ram:{x:6.541917,y:3.549083}},{id:"DQ12",layer:"inner5",fullLayer:"inner1",soc:{x:-6,y:2.5},ram:{x:6.541917,y:1.949083}},{id:"DQ13",layer:"inner2",fullLayer:"inner3",soc:{x:-6.5,y:3},ram:{x:5.891917,y:1.949083}},{id:"DQ14",layer:"inner5",fullLayer:"inner6",soc:{x:-5,y:2.5},ram:{x:4.591917,y:1.949083}},{id:"DQ15",layer:"inner4",fullLayer:"inner1",soc:{x:-4.5,y:3.5},ram:{x:3.941917,y:1.949083}},{id:"DM1",layer:"inner4",fullLayer:"inner5",soc:{x:-5,y:3.5},ram:{x:4.591917,y:2.749083}},{id:"DQS1",layer:"inner1",fullLayer:"bottom",differentialPairId:"DQS1",soc:{x:-4.5,y:3},ram:{x:5.241917,y:2.749083}},{id:"DQS1_n",layer:"inner1",fullLayer:"bottom",differentialPairId:"DQS1",soc:{x:-5,y:3},ram:{x:5.891917,y:2.749083}}],Ykt=[{id:"A0",layer:"bottom",soc:{x:-6.5,y:-.5},ram:{x:7.841917,y:-3.650917}},{id:"A1",layer:"inner3",soc:{x:-7,y:-2},ram:{x:8.491917,y:-3.650917}},{id:"A2",layer:"inner3",soc:{x:-7,y:-.5},ram:{x:7.841917,y:1.949083}},{id:"A3",layer:"inner6",soc:{x:-5,y:-1},ram:{x:7.841917,y:2.749083}},{id:"A4",layer:"inner4",soc:{x:-4.5,y:-1.5},ram:{x:7.841917,y:3.549083}},{id:"A5",layer:"inner2",soc:{x:-6.5,y:-2},ram:{x:8.491917,y:3.549083}},{id:"CS0_n",layer:"inner5",soc:{x:-5.5,y:-.5},ram:{x:7.841917,y:-2.050917}},{id:"CKE0",layer:"inner1",soc:{x:-4.5,y:-1},ram:{x:8.491917,y:-2.050917}},{id:"CK0",layer:"bottom",differentialPairId:"CK0",soc:{x:-4.5,y:1},ram:{x:8.491917,y:1.149083}},{id:"CK0_n",layer:"bottom",differentialPairId:"CK0",soc:{x:-5,y:1},ram:{x:8.491917,y:1.949083}},{id:"DDR_LINK_RESET0_n",layer:"inner6",soc:{x:-5,y:-1.5},ram:{x:13.041917,y:3.549083}}],Vue=t=>{const e=t.buses.flatMap(s=>s.ports),n=new Set,o=s=>[{regionId:"soc",position:s.soc},{regionId:"ram",position:s.ram}],i=[];for(const s of e){if(!s.differentialPairId){i.push({id:s.id,endpoints:o(s)});continue}if(n.has(s.differentialPairId))continue;n.add(s.differentialPairId);const a=e.filter(l=>l.differentialPairId===s.differentialPairId);if(a.length!==2)throw new Error(`Differential pair ${s.differentialPairId} must have two members`);const[A,c]=a;i.push({type:"differential",connections:[{id:A.id,endpoints:o(A)},{id:c.id,endpoints:o(c)}]})}const r=t.buses.map(s=>{let a={id:s.id,connectionIds:s.ports.map(A=>A.id)};return s.preferredLayer!==void 0&&(a={...a,preferredLayer:s.preferredLayer}),s.preferredLayers!==void 0&&(a={...a,preferredLayers:s.preferredLayers}),a});return{regions:[{id:"soc",bounds:{minX:-16.62808,maxX:-2.37192,minY:-10.62808,maxY:10.62808},edge:"right"},{id:"ram",bounds:{minX:1.091917,maxX:18.141917,minY:-9.650917,maxY:9.549083},edge:"left"}],connections:i,buses:r,boundaryPointSpacing:.48}};Vue({buses:[{id:"DDR_BYTE0",ports:Okt,preferredLayers:["inner1","inner4"]}]}),Vue({buses:[{id:"DDR_BYTE1",ports:Gkt,preferredLayers:["inner2","inner5"]}]}),Vue({buses:[{id:"DDR_BYTE0",ports:Okt,preferredLayers:["inner1","inner4"]},{id:"DDR_BYTE1",ports:Gkt,preferredLayers:["inner2","inner5"]},{id:"DDR_ADDR_CTRL",ports:Ykt,preferredLayers:["inner3","inner6"]}]}),Vue({buses:[{id:"DDR_ADDR_CTRL",ports:Ykt,preferredLayers:["inner3","inner6"]}]});var LTo=class extends Error{name="WindingBreakoutInputError"},Ukt=class extends Error{name="WindingBreakoutInfeasibleError"},YMe=class extends Error{name="WindingBreakoutInvariantError"},HTo=class extends Error{name="WindingBreakoutOutputUnavailableError"},zue=t=>{const e=[];for(const n of t.connections)"type"in n?e.push(...n.connections):e.push(n);return e},UMe=t=>t.preferredLayer!==void 0?[t.preferredLayer]:t.preferredLayers!==void 0?[...new Set(t.preferredLayers)]:["top"],KMe=t=>{const e=new Map;for(const n of t.buses){const o=UMe(n);for(const i of n.connectionIds)e.set(i,o)}return Object.fromEntries(zue(t).map(n=>[n.id,e.get(n.id)??["top"]]))},R0=t=>{throw new LTo(`WindingBreakoutSolver: ${t}`)},OTo=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),hR=(t,e)=>{OTo(t)||R0(`${e} must be an object`)},pR=(t,e)=>{(typeof t!="string"||t.trim().length===0)&&R0(`${e} must be a non-empty string`)},mR=(t,e)=>{(typeof t!="number"||!Number.isFinite(t))&&R0(`${e} must be finite`)},GTo=(t,e)=>{mR(t,e),t<=0&&R0(`${e} must be positive`)},B$=(t,e)=>Array.isArray(t)?t:R0(e),YTo=(t,e)=>(hR(t,e),mR(t.x,`${e}.x`),mR(t.y,`${e}.y`),t),UTo=(t,e)=>(hR(t,e),mR(t.minX,`${e}.minX`),mR(t.maxX,`${e}.maxX`),mR(t.minY,`${e}.minY`),mR(t.maxY,`${e}.maxY`),(t.minX>=t.maxX||t.minY>=t.maxY)&&R0(`${e} must have positive width and height`),{minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.maxY}),KTo=(t,e)=>t.x>=e.minX&&t.x<=e.maxX&&t.y>=e.minY&&t.y<=e.maxY,VTo=t=>{(!Array.isArray(t.regions)||t.regions.length===0)&&R0("at least one region is required"),GTo(t.boundaryPointSpacing,"boundaryPointSpacing");const e=new Set,n=t.regions.map((d,p)=>{hR(d,`regions[${p}]`),pR(d.id,`regions[${p}].id`),e.has(d.id)&&R0(`duplicate region id "${d.id}"`),e.add(d.id);const m=UTo(d.bounds,`region "${d.id}" bounds`);return(typeof d.edge!="string"||!new Set(["left","right","bottom","top"]).has(d.edge))&&R0(`region "${d.id}" has invalid edge`),{id:d.id,bounds:m,edge:d.edge,center:{x:(m.minX+m.maxX)/2,y:(m.minY+m.maxY)/2}}}),o=n.every(d=>d.edge==="left"||d.edge==="right"),i=n.every(d=>d.edge==="bottom"||d.edge==="top");!o&&!i&&R0("all coordinated region edges must be parallel"),(!Array.isArray(t.connections)||t.connections.length===0)&&R0("at least one connection is required");const r=[],s=new Set,a=[],A=(d,p)=>{hR(d,p),pR(d.id,`${p}.id`),s.has(d.id)&&R0(`duplicate connection id "${d.id}"`),"layer"in d&&R0(`${p}.layer is not accepted; declare layer preferences on a bus`);const m=B$(d.endpoints,`${p}.endpoints must be an array`),_=new Set,f=m.map((I,C)=>{const y=`${p}.endpoints[${C}]`;hR(I,y),pR(I.regionId,`${y}.regionId`),e.has(I.regionId)||R0(`${y} references unknown region "${I.regionId}"`),_.has(I.regionId)&&R0(`${p} has duplicate endpoint for region "${I.regionId}"`),_.add(I.regionId);const x=YTo(I.position,`${y}.position`),E=n.find(B=>B.id===I.regionId);return KTo(x,E.bounds)||R0(`${p} endpoint for region "${E.id}" is outside its bounds`),{regionId:I.regionId,position:x}});for(const I of n)_.has(I.id)||R0(`${p} is missing endpoint for region "${I.id}"`);return f.length!==n.length&&R0(`${p} must contain exactly one endpoint for every region`),s.add(d.id),{id:d.id,endpoints:f}};for(const[d,p]of t.connections.entries()){const m=`connections[${d}]`;if(hR(p,m),"type"in p||"connections"in p){p.type!=="differential"&&R0(`${m} has invalid differential-pair type`),"layer"in p&&R0(`${m}.layer is not accepted; declare layer preferences on a bus`);const _=B$(p.connections,`${m}.connections must contain exactly two members`);_.length!==2&&R0(`${m}.connections must contain exactly two members`);const f=A(_[0],`${m}.connections[0]`),I=A(_[1],`${m}.connections[1]`);f.id===I.id&&R0(`${m} members must have distinct connection ids`),r.push(f,I),a.push([f.id,I.id])}else r.push(A(p,m))}const c=B$(t.buses,"buses must be an array"),l=new Set,u=new Map,g=c.map((d,p)=>{const m=`buses[${p}]`;hR(d,m),pR(d.id,`${m}.id`);const _=d.id;l.has(_)&&R0(`duplicate bus id "${_}"`),l.add(_);const f=B$(d.connectionIds,`${m}.connectionIds must be a non-empty array`);f.length===0&&R0(`${m}.connectionIds must be a non-empty array`);const I=new Set,C=f.map((B,S)=>{pR(B,`${m}.connectionIds[${S}]`),s.has(B)||R0(`${m} references unknown connection "${B}"`),I.has(B)&&R0(`${m} contains duplicate connection "${B}"`),I.add(B);const Q=u.get(B);return Q!==void 0&&R0(`connection "${B}" belongs to multiple buses "${Q}" and "${d.id}"`),u.set(B,_),B});let y;d.preferredLayer!==void 0&&(pR(d.preferredLayer,`${m}.preferredLayer`),y=d.preferredLayer);let x;if(d.preferredLayers!==void 0){const B=B$(d.preferredLayers,`${m}.preferredLayers must be a non-empty array`);B.length===0&&R0(`${m}.preferredLayers must be a non-empty array`);const S=new Set;x=B.map((Q,w)=>(pR(Q,`${m}.preferredLayers[${w}]`),S.has(Q)&&R0(`${m}.preferredLayers contains duplicate layer "${Q}"`),S.add(Q),Q))}let E={id:_,connectionIds:C};return y!==void 0&&(E={...E,preferredLayer:y}),x!==void 0&&(E={...E,preferredLayers:x}),E});for(const[d,p]of a){const m=u.get(d),_=u.get(p);m!==_&&R0(`differential pair "${d}/${p}" must belong to the same bus`)}const h=[...new Set([...g.flatMap(d=>UMe(d)),...r.filter(d=>!u.has(d.id)).map(()=>"top")])].sort((d,p)=>d.localeCompare(p));return{regions:n,connections:r,buses:g,layerNames:h,atomicConnectionGroups:a}},zTo=1e-9,JTo=t=>t==="left"||t==="right",WTo=(t,e)=>e?t.bounds.minY:t.bounds.minX,jTo=(t,e)=>e?t.bounds.maxY:t.bounds.maxX,$To=(t,e)=>e?t.y:t.x,qTo=(t,e)=>{const n=e/2;return Object.fromEntries(t.map((o,i)=>[o,(i-(t.length-1)/2)*n]))},XTo=({referenceOrder:t,layer:e,layerByConnection:n,atomicGroups:o})=>{const i=t.filter(A=>n[A]===e),r=new Map(o.flatMap(A=>A.map(c=>[c,A]))),s=new Set,a=[];for(const A of i){const c=r.get(A);if(!c){a.push(A);continue}s.has(c)||(s.add(c),a.push(...i.filter(l=>c.includes(l))))}return a},ZTo=({regions:t,connections:e,spacing:n,count:o,layerOffsets:i})=>{const r=t.every(h=>JTo(h.edge)),s=Math.max(...t.map(h=>WTo(h,r))),a=Math.min(...t.map(h=>jTo(h,r))),A=Math.min(...Object.values(i)),c=Math.max(...Object.values(i)),l=n*Math.max(0,o-1)+c-A;if(a-s+zTo<l)throw new Ukt(`WindingBreakoutSolver: declared breakout edges need ${l.toFixed(2)}mm but expose only ${(a-s).toFixed(2)}mm`);const u=t.reduce((h,d)=>{const p=e.map(m=>m.endpoints.find(_=>_.regionId===d.id).position);return h+p.reduce((m,_)=>m+$To(_,r),0)/p.length},0)/t.length,g=Math.max(s-A,Math.min(a-n*Math.max(0,o-1)-c,u-n*Math.max(0,o-1)/2));return{vertical:r,axes:Array.from({length:o},(h,d)=>g+d*n)}},eko=(t,e,n)=>{if(n){let i=t.bounds.maxX;return t.edge==="left"&&(i=t.bounds.minX),{x:i,y:e}}let o=t.bounds.maxY;return t.edge==="bottom"&&(o=t.bounds.minY),{x:e,y:o}},tko=({regions:t,connections:e,referenceOrder:n,layerNames:o,layerByConnection:i,boundaryPointSpacing:r,atomicGroups:s})=>{const a=qTo(o,r),A=Object.fromEntries(o.map(h=>[h,XTo({referenceOrder:n,layer:h,layerByConnection:i,atomicGroups:s})])),c=Math.max(...o.map(h=>e.filter(d=>i[d.id]===h).length)),{vertical:l,axes:u}=ZTo({regions:t,connections:e,spacing:r,count:c,layerOffsets:a});return{breakoutPoints:t.flatMap(h=>o.flatMap(d=>A[d].map((p,m)=>({regionId:h.id,connectionId:p,layer:d,...eko(h,u[m]+a[d],l)}))))}},nko=(t,e)=>{const n=new Set(t),o=new Map(e.flatMap(s=>s.map(a=>[a,s]))),i=new Set,r=[];for(const s of t){const a=o.get(s);if(!a){r.push([s]);continue}i.has(a)||(i.add(a),r.push(a.filter(A=>n.has(A))))}return r},oko=({validated:t,referenceOrder:e})=>{const n=new Map;for(const r of t.buses){const s=new Set(r.connectionIds),a=e.filter(l=>s.has(l)),A=UMe(r),c=nko(a,t.atomicConnectionGroups);for(const[l,u]of c.entries()){const g=A[l%A.length];for(const h of u)n.set(h,g)}}for(const r of e)n.has(r)||n.set(r,"top");const o=Object.fromEntries(e.map(r=>[r,n.get(r)])),i=[...new Set(Object.values(o))].sort((r,s)=>r.localeCompare(s));return{layerByConnection:o,layerNames:i}},VMe=t=>[...new Set(Object.values(KMe(t)).flat())].sort((e,n)=>e.localeCompare(n)),Kkt=["#2563eb","#dc2626","#059669","#7c3aed","#d97706","#0891b2","#db2777","#4f46e5","#65a30d","#c2410c","#0f766e","#9333ea"],Jue=t=>{let e=2166136261;for(const n of t)e^=n.charCodeAt(0),e=Math.imul(e,16777619);return Kkt[(e>>>0)%Kkt.length]},vw=(t,e)=>{const n=VMe(t),o=[...new Set(e)].map(i=>{const r=n.indexOf(i);if(r<0)throw new Error(`Cannot visualize unknown signal layer "${i}"`);return r});if(o.length===0)throw new Error("Cannot create graphics metadata without a signal layer");return o.sort((i,r)=>i-r),`z${o.join(",")}`},iko=(t,e)=>{const n={circles:[],rects:[],texts:[]};let i=VMe(t);e&&(i=[e]);const r=vw(t,i),s=zue(t),a=KMe(t),A=Math.min(.12,t.boundaryPointSpacing/4);for(const c of t.regions){const l={x:(c.bounds.minX+c.bounds.maxX)/2,y:(c.bounds.minY+c.bounds.maxY)/2};n.rects.push({center:l,width:c.bounds.maxX-c.bounds.minX,height:c.bounds.maxY-c.bounds.minY,fill:"rgba(226, 232, 240, 0.035)",stroke:"rgba(71, 85, 105, 0.55)",layer:r});for(const u of s){const g=a[u.id];if(e&&!g.includes(e))continue;const h=u.endpoints.find(p=>p.regionId===c.id);if(!h)continue;const d=Jue(u.id);n.circles.push({center:h.position,radius:A,fill:`${d}70`,stroke:d,layer:vw(t,g)})}n.texts.push({x:l.x,y:c.bounds.maxY+.35,text:c.id,anchorSide:"bottom_center",color:"#334155",fontSize:.34,layer:r})}return n},rko=(t,e,n)=>{const o=zue(t),i=e.breakoutPoints.filter(a=>!n||a.layer===n),r=new Map;for(const a of e.breakoutPoints){const A=`${a.regionId}:${a.x.toFixed(9)}:${a.y.toFixed(9)}`,c=r.get(A)??{x:a.x,y:a.y,layers:new Set};c.layers.add(a.layer),r.set(A,c)}return{lines:e.referenceOrder.flatMap(a=>{const A=o.find(g=>g.id===a);if(!A)return[];const c=i.filter(g=>g.connectionId===a),l=c[0]?.layer;if(!l||n&&l!==n)return[];if(c.length!==t.regions.length)return[];const u=t.regions.flatMap((g,h)=>{const d=A.endpoints.find(m=>m.regionId===g.id),p=c.find(m=>m.regionId===g.id);return!d||!p?[]:h===0?[d.position,p]:[p,d.position]});return u.length<2?[]:[{points:u,strokeColor:`${Jue(a)}55`,strokeWidth:.012,strokeDash:[.025,.07],layer:vw(t,[l])}]}),circles:[...r.values()].flatMap(a=>{const A=[...a.layers].filter(c=>!n||c===n);return A.length===0?[]:[{center:a,radius:.11,fill:"rgba(15, 23, 42, 0.06)",stroke:"#475569",layer:vw(t,A)}]}),points:i.map(a=>({x:a.x,y:a.y,color:Jue(a.connectionId),label:`${a.connectionId} · ${a.layer}`,layer:vw(t,[a.layer])}))}},Wue=({input:t,phase:e,detail:n,activeLayer:o,referenceOrder:i,referenceRegionId:r,showReferenceNumbers:s=!1,state:a})=>{const A=iko(t,o);let c;a&&(c=rko(t,a,o));let l=VMe(t);o&&(l=[o]);const u=vw(t,l),g=Math.max(...t.regions.map(_=>_.bounds.maxY)),h=Math.min(...t.regions.map(_=>_.bounds.minX)),d=[...A.texts??[],...c?.texts??[],{x:h,y:g+1.05,text:e,anchorSide:"bottom_left",color:"#0f172a",fontSize:.42,layer:u},{x:h,y:g+.68,text:n,anchorSide:"bottom_left",color:"#475569",fontSize:.25,layer:u}],p=[],m=[];if(s&&i){const _=t.regions.find(x=>x.id===r)??t.regions[0],f=zue(t),I=KMe(t),C=[];for(const[x,E]of i.entries()){const B=f.find(w=>w.id===E),S=I[E];if(!B||!S||o&&!S.includes(o))continue;const Q=B.endpoints.find(w=>w.regionId===_.id);Q&&(C.push(Q.position),d.push({x:Q.position.x+.18,y:Q.position.y+.18,text:`${x+1} · ${E}`,anchorSide:"bottom_left",color:Jue(E),fontSize:.21,layer:vw(t,S)}))}const y={x:(_.bounds.minX+_.bounds.maxX)/2,y:(_.bounds.minY+_.bounds.maxY)/2};p.push(...C.map(x=>({points:[y,x],strokeColor:"rgba(100, 116, 139, 0.35)",strokeWidth:.01,strokeDash:[.03,.05],layer:u}))),C.length>1&&p.push({points:C,strokeColor:"rgba(15, 23, 42, 0.65)",strokeWidth:.018,strokeDash:[.04,.04],label:`${_.id} angular winding order`,layer:u}),m.push({center:y,radius:.07,fill:"#0f172a",stroke:"#ffffff",label:`${_.id} angular reference center`,layer:u})}return{title:e,coordinateSystem:"cartesian",rects:A.rects,polygons:A.polygons,lines:[...c?.lines??[],...p],circles:[...A.circles??[],...c?.circles??[],...m],points:c?.points,texts:d}},Vkt=t=>new Set(t.map(e=>`${e.regionId}:${e.x.toFixed(9)}:${e.y.toFixed(9)}`)).size,sko=class extends fC{constructor(t){super(),this.params=t,this.visualizationLayer=t.visualizationLayer;const e=oko({validated:t.validated,referenceOrder:t.ordering.referenceOrder});this.layerByConnection=e.layerByConnection,this.placementBatches=t.validated.regions.flatMap(n=>e.layerNames.map(o=>({regionId:n.id,layer:o}))),this.MAX_ITERATIONS=this.placementBatches.length+2}params;batchIndex=0;output;plannedPlacement;placementBatches;visibleBreakoutPoints=[];layerByConnection;visualizationLayer;setVisualizationLayer(t){this.visualizationLayer=t}_step(){if(!this.plannedPlacement){this.plannedPlacement=tko({regions:this.params.validated.regions,connections:this.params.validated.connections,referenceOrder:this.params.ordering.referenceOrder,layerNames:[...new Set(Object.values(this.layerByConnection))].sort((e,n)=>e.localeCompare(n)),layerByConnection:this.layerByConnection,boundaryPointSpacing:this.params.input.boundaryPointSpacing,atomicGroups:this.params.validated.atomicConnectionGroups}),this.stats={phase:"plan-gate-grid",regionLayerBatches:this.placementBatches.length,placedBreakpoints:0};return}const t=this.placementBatches[this.batchIndex];if(t){this.visibleBreakoutPoints.push(...this.plannedPlacement.breakoutPoints.filter(e=>e.regionId===t.regionId&&e.layer===t.layer)),this.batchIndex+=1,this.stats={phase:"place-region-layer-batch",regionId:t.regionId,layer:t.layer,completedBatches:this.batchIndex,totalBatches:this.placementBatches.length,placedBreakpoints:this.visibleBreakoutPoints.length};return}this.output=this.plannedPlacement,this.stats={phase:"finalize-shared-gate-slots",placedBreakpoints:this.output.breakoutPoints.length,sharedGateSlots:Vkt(this.output.breakoutPoints)},this.solved=!0}computeProgress(){let t=this.batchIndex;return this.plannedPlacement&&(t+=1),this.output&&(t+=1),t/this.MAX_ITERATIONS}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved||!this.output)throw new YMe("WindingBreakoutSolver: gate placement requested before placement completed");return this.output}visualize(){let t="Next microstep: derive layer offsets, atomic gate orders, and the common boundary slot grid";if(this.plannedPlacement&&this.batchIndex===0)t=`Gate grid planned · ${this.placementBatches.length} region/layer batches remain`;else if(this.plannedPlacement&&!this.output){const i=this.placementBatches[this.batchIndex-1];t=`Placed region “${i.regionId}” on layer “${i.layer}” · ${this.batchIndex}/${this.placementBatches.length} batches`}else if(this.output){const i=Vkt(this.output.breakoutPoints);t=`${this.output.breakoutPoints.length} gates placed; coincident layer positions form ${i} shared slots`}let e;if(this.plannedPlacement){let i=this.visibleBreakoutPoints;this.output&&(i=this.output.breakoutPoints),e={referenceOrder:this.params.ordering.referenceOrder,breakoutPoints:i}}const n=Wue({input:this.params.input,activeLayer:this.visualizationLayer,phase:"Step 2 · Place boundary gates",detail:t,state:e}),o=(this.plannedPlacement?.breakoutPoints??[]).filter(i=>!this.visualizationLayer||i.layer===this.visualizationLayer).map(i=>({center:i,radius:.065,fill:"rgba(255, 255, 255, 0.75)",stroke:"rgba(100, 116, 139, 0.5)",label:`planned slot ${i.regionId} · ${i.layer}`,layer:vw(this.params.input,[i.layer])}));return{...n,circles:[...n.circles??[],...o]}}},ako=(t,e)=>e.map(n=>{const o=n.endpoints.find(i=>i.regionId===t.id).position;return{id:n.id,angle:Math.atan2(o.y-t.center.y,o.x-t.center.x),radius:Math.hypot(o.x-t.center.x,o.y-t.center.y)}}).sort((n,o)=>n.angle-o.angle||o.radius-n.radius||n.id.localeCompare(o.id)).map(n=>n.id),Ako=(t,e,n)=>{const o=new Map(e.flatMap(c=>c.map(l=>[l,c]))),i=new Set,r=[];for(const c of t){const l=o.get(c);if(!l){r.push(c);continue}i.has(l)||(i.add(l),r.push(...t.filter(u=>l.includes(u))))}const s=new Map(n.flatMap(c=>c.connectionIds.map(l=>[l,c]))),a=new Set,A=[];for(const c of r){const l=s.get(c);if(!l){A.push(c);continue}if(a.has(l))continue;a.add(l);const u=new Set(l.connectionIds);A.push(...r.filter(g=>u.has(g)))}return A},cko=class extends fC{constructor(t){super(),this.params=t,this.visualizationLayer=t.visualizationLayer,this.MAX_ITERATIONS=t.validated.regions.length+1}params;naturalOrderByRegion={};currentRegionIndex=0;output;visualizedOrder;visualizedRegionId;visualizationLayer;setVisualizationLayer(t){this.visualizationLayer=t}_step(){const t=this.params.validated.regions[this.currentRegionIndex];if(t){const o=ako(t,this.params.validated.connections);this.naturalOrderByRegion[t.id]=o,this.visualizedRegionId=t.id,this.visualizedOrder=o,this.currentRegionIndex+=1,this.stats={phase:"derive-natural-order",regionId:t.id,completedRegions:this.currentRegionIndex,totalRegions:this.params.validated.regions.length,naturalOrder:o};return}const e=this.params.validated.regions[0],n=Ako(this.naturalOrderByRegion[e.id],this.params.validated.atomicConnectionGroups,this.params.validated.buses);this.output={naturalOrderByRegion:this.naturalOrderByRegion,referenceOrder:n},this.visualizedRegionId=e.id,this.visualizedOrder=n,this.stats={phase:"atomicize-reference-order",referenceRegion:e.id,referenceOrder:n},this.solved=!0}computeProgress(){let t=this.currentRegionIndex;return this.output&&(t+=1),t/this.MAX_ITERATIONS}getConstructorParams(){return[this.params]}getOutput(){if(!this.solved||!this.output)throw new YMe("WindingBreakoutSolver: reference order requested before ordering completed");return this.output}visualize(){const t=this.params.validated.regions[0].id;let e=`Next microstep: derive natural order for region “${t}”`;return this.visualizedRegionId&&!this.output&&(e=`Natural order for region “${this.visualizedRegionId}” · ${this.currentRegionIndex}/${this.params.validated.regions.length} regions processed`),this.output&&(e=`Reference region “${t}” finalized; buses are contiguous and differential pairs are atomic`),Wue({input:this.params.input,activeLayer:this.visualizationLayer,phase:"Step 1 · Derive reference order",detail:e,referenceOrder:this.visualizedOrder,referenceRegionId:this.visualizedRegionId,showReferenceNumbers:!0})}},lko=({points:t,connectionIds:e,regions:n,atomicGroups:o})=>{const i=n.map(u=>u.id),r=new Map,s=new Map;let a=!0;for(const u of t){const g=`${u.regionId}:${u.connectionId}`;r.set(g,(r.get(g)??0)+1);const h=s.get(u.connectionId);h!==void 0&&h!==u.layer&&(a=!1),s.set(u.connectionId,u.layer)}const A=i.flatMap(u=>e.map(g=>`${u}:${g}`)),c=r.size===A.length&&A.every(u=>r.get(u)===1),l=o.every(u=>{const g=s.get(u[0]);return!g||u.some(h=>s.get(h)!==g)?!1:n.every(h=>{const d=t.filter(I=>I.regionId===h.id&&I.layer===g),p=h.edge==="left"||h.edge==="right",m=[...d].sort((I,C)=>p?I.y-C.y:I.x-C.x).map(I=>I.connectionId),_=m.indexOf(u[0]),f=m.indexOf(u[1]);return _!==-1&&f!==-1&&Math.abs(_-f)===1})});return c&&a&&l},uko=({validated:t,placement:e})=>{if(!lko({points:e.breakoutPoints,connectionIds:t.connections.map(o=>o.id),regions:t.regions,atomicGroups:t.atomicConnectionGroups}))throw new YMe("WindingBreakoutSolver: generated invalid breakout points");return{breakoutPoints:e.breakoutPoints}},gko=["referenceOrdering","gatePlacement"],dko=class extends eve{validatedInput;output;visualizationLayer;pipelineDef=[TH("referenceOrdering",cko,t=>[{input:t.inputProblem,validated:t.getValidatedInput(),visualizationLayer:t.visualizationLayer}]),TH("gatePlacement",sko,t=>[{input:t.inputProblem,validated:t.getValidatedInput(),ordering:t.getRequiredStageOutput("referenceOrdering"),visualizationLayer:t.visualizationLayer}])];constructor(t){super(t)}_setup(){this.validatedInput=VTo(this.inputProblem),this.stats={phase:"setup-input-validation",regionCount:this.validatedInput.regions.length,connectionCount:this.validatedInput.connections.length,layerCount:this.validatedInput.layerNames.length}}getValidatedInput(){if(!this.validatedInput)throw new Error("WindingBreakoutSolver: input has not been validated");return this.validatedInput}_step(){super._step(),!this.output&&!this.activeSubSolver&&this.currentPipelineStageIndex>=this.pipelineDef.length&&(this.output=uko({validated:this.getValidatedInput(),placement:this.getRequiredStageOutput("gatePlacement")}),this.solved=!0),this.stats={phase:this.getCurrentStageName(),completedStages:this.currentPipelineStageIndex,totalStages:this.pipelineDef.length},this.solved&&(this.stats.phase="finalize-output-validation"),this.output&&(this.stats.valid=!0,this.stats.breakoutPointCount=this.output.breakoutPoints.length)}getRequiredStageOutput(t){const e=this.getStageOutput(t);if(e===void 0)throw new Error(`WindingBreakoutSolver: pipeline stage “${t}” has no output`);return e}setVisualizationLayer(t){this.visualizationLayer=t;for(const e of gko){const n=this.getSolver(e);n&&"setVisualizationLayer"in n&&n.setVisualizationLayer(t)}}getConstructorParams(){return[this.inputProblem]}getOutput(){if(!this.solved||!this.output)throw new HTo("WindingBreakoutSolver: getOutput() called before successful completion");return this.output}initialVisualize(){return Wue({input:this.inputProblem,activeLayer:this.visualizationLayer,phase:"Input · Validated during setup",detail:"Region bounds, breakout edges, bus layer preferences, and canonical endpoints"})}finalVisualize(){if(!this.output)return null;const t=this.getRequiredStageOutput("referenceOrdering");return Wue({input:this.inputProblem,activeLayer:this.visualizationLayer,phase:"Output · Validated after gate placement",detail:"Valid: one bus-constrained breakout point per connection and region; pairs are adjacent",state:{referenceOrder:t.referenceOrder,breakoutPoints:this.output.breakoutPoints}})}visualize(){return{...super.visualize(),title:"Winding breakout solver · step-by-step pipeline",coordinateSystem:"cartesian"}}},zkt=t=>({id:t.connectionId,endpoints:t.endpoints}),hko=t=>{const e={regions:t.regions.map(o=>({id:o.regionId,bounds:o.bounds,edge:o.edge})),connections:t.connections.map(o=>"type"in o?{type:"differential",connections:o.connections.map(zkt)}:zkt(o)),buses:t.buses.map(o=>({id:o.busId,connectionIds:o.connectionIds,preferredLayers:o.targetLayers})),boundaryPointSpacing:t.boundaryPointSpacing},n=new dko(e);return n.solve(),n.getOutput()},Jkt=t=>{const e=t.outline?Oh(t.outline):null,n=t.width??(e?e.maxX-e.minX:void 0),o=t.height??(e?e.maxY-e.minY:void 0);return n===void 0||o===void 0?null:{minX:t.center.x-n/2,maxX:t.center.x+n/2,minY:t.center.y-o/2,maxY:t.center.y+o/2}},Wkt=(t,e,n,o)=>Math.max(t-o,n-e,0),pko=t=>{if(t.root?.pcbDisabled||!t.pcb_group_id)return;const e=t.root;if(!e)return;const n=t.parent?.children.filter(a=>a instanceof t.constructor);if(!n)return;const o=n.indexOf(t);if(o<0)return;const{db:i}=e,r=i.pcb_group.get(t.pcb_group_id);if(!r)return;const s=Jkt(r);if(s)for(const a of n.slice(o+1)){if(!a.pcb_group_id)continue;const A=i.pcb_group.get(a.pcb_group_id);if(!A)continue;const c=Jkt(A);if(!c)continue;const l=t._parsedProps.fanoutMargin,u=a._parsedProps.fanoutMargin,g=Math.max(typeof l=="number"?l:0,typeof u=="number"?u:0),h=Wkt(s.minX,s.maxX,c.minX,c.maxX),d=Wkt(s.minY,s.maxY,c.minY,c.maxY),p=Math.min(s.maxX,c.maxX)-Math.max(s.minX,c.minX),m=Math.min(s.maxY,c.maxY)-Math.max(s.minY,c.minY),_=p>0&&m>0,f=g>0&&h<g&&d<g;if(!_&&!f)continue;const I=_?`Fanout boundaries "${t.name}" and "${a.name}" overlap. Fanout boundaries may not overlap.`:`Fanout boundaries "${t.name}" and "${a.name}" do not maintain the required ${g}mm fanoutMargin.`;i.pcb_placement_error.list().some(y=>y.message===I)||i.pcb_placement_error.insert({error_type:"pcb_placement_error",message:I,subcircuit_id:t.subcircuit_id??void 0})}},mko=(t,e)=>{if(!(e instanceof Ukt)||!t.root||!t.pcb_group_id)return!1;const n=t.root.db.pcb_component.list().filter(o=>o.pcb_group_id===t.pcb_group_id).map(o=>o.source_component_id?t.root.db.source_component.get(o.source_component_id)?.name:void 0).filter(o=>!!o);return t.root.db.pcb_autorouting_error.insert({pcb_error_id:`pcb_autorouting_error_winding_breakout_${t.pcb_group_id}`,error_type:"pcb_autorouting_error",message:`Winding fanout failed for ${n.join(", ")||t.name}: ${e.message}. The connections could not escape to the breakout boundary. Give the fanout more room by increasing the breakout's padding, or by extending the breakout to include the parts crowding it (decoupling capacitors, series resistors).`}),!0},_ko=t=>{const e=t.parent;if(!e?.selectAll)throw new Error(`Automatic breakout "${t.name}" has no coordinated routing scope`);return e},fko=(t,e)=>{const n=[];for(const r of t.selectAll("group")){if(!r.isRoutingDirective||r.parent!==t)continue;const s=r;s.children.some(A=>A instanceof Kue)&&n.push(s)}const o=r=>new Set(jkt(r).endpointBySourceTraceId.keys()),i=o(e);return n.filter(r=>{const s=o(r);return s.size===i.size&&[...i].every(a=>s.has(a))})},jkt=t=>{if(!t.root||!t.pcb_group_id)throw new Error(`Automatic breakout "${t.name}" has no PCB region`);const e=t.root.db.pcb_group.get(t.pcb_group_id);if(!e||!e.width||!e.height)throw new Error(`Automatic breakout "${t.name}" has invalid PCB region bounds`);const n={minX:e.center.x-e.width/2,maxX:e.center.x+e.width/2,minY:e.center.y-e.height/2,maxY:e.center.y+e.height/2},o={x:(n.minX+n.maxX)/2,y:(n.minY+n.maxY)/2},i=new Map,r=new Map;for(const s of t.children.filter(a=>a instanceof Kue)){const a=s.matchedPort;if(!a?.pcb_port_id||!a.source_port_id)throw new Error(`Automatic breakout "${t.name}" is missing a PCB endpoint`);let A=s.matchedSourceTraceId;if(!A){const l=t.root.db.source_trace.list().filter(h=>h.connected_source_port_ids.includes(a.source_port_id));if(l.length===0)throw new Error(`Automatic breakout "${t.name}" has a point without a source trace identity`);const u=l.filter(h=>h.connected_source_port_ids.some(d=>{if(d===a.source_port_id)return!1;const p=t.root.db.pcb_port.getWhere({source_port_id:d});return!p||p.pcb_group_id===t.pcb_group_id?!1:!(p.x>=n.minX&&p.x<=n.maxX&&p.y>=n.minY&&p.y<=n.maxY)}));A=(u.length>0?u:l).slice().sort((h,d)=>h.source_trace_id.localeCompare(d.source_trace_id))[0].source_trace_id,s.matchedSourceTraceId=A}if(i.has(A))throw new Error(`Connection "${A}" has duplicate endpoint for region "${t.pcb_group_id}"`);const c=t.root.db.pcb_port.get(a.pcb_port_id);if(!c)throw new Error(`Connection "${A}" references unknown PCB endpoint "${a.pcb_port_id}"`);if(c.pcb_group_id!==t.pcb_group_id)throw new Error(`Connection "${A}" endpoint references unknown region "${c.pcb_group_id??"unassigned"}" instead of "${t.pcb_group_id}"`);if(c.x===void 0||c.y===void 0)throw new Error(`Connection "${A}" is missing endpoint coordinates for region "${t.pcb_group_id}"`);i.set(A,{regionId:t.pcb_group_id,position:{x:c.x,y:c.y}}),r.set(A,a.source_port_id)}return{breakout:t,pcbGroupId:t.pcb_group_id,bounds:n,center:o,endpointBySourceTraceId:i,sourcePortIdBySourceTraceId:r}},Iko=t=>{const e=t.map(s=>s.center.x),n=t.map(s=>s.center.y),o=Math.max(...e)-Math.min(...e),i=Math.max(...n)-Math.min(...n),r=o>=i;return t.sort((s,a)=>{if(r){const A=s.center.x-a.center.x;if(A!==0)return A;const c=s.center.y-a.center.y;if(c!==0)return c}else{const A=s.center.y-a.center.y;if(A!==0)return A;const c=s.center.x-a.center.x;if(c!==0)return c}return s.breakout.name.localeCompare(a.breakout.name)}),{regions:t,horizontalPlacement:r}},Cko=({region:t,regionIndex:e,regions:n,horizontalPlacement:o,singleRegionPreferredEdge:i})=>{if(n.length===1&&i)return i;const r=n.filter(a=>a!==t),s=r.reduce((a,A)=>({x:a.x+A.center.x/r.length,y:a.y+A.center.y/r.length}),{x:0,y:0});return o?s.x>t.center.x?"right":s.x<t.center.x?"left":e<n.length/2?"right":"left":s.y>t.center.y?"top":s.y<t.center.y?"bottom":e<n.length/2?"top":"bottom"},yko=({region:t,sourceTraces:e})=>{const n=t.breakout.root;if(!n)return;const o=new Set(t.sourcePortIdBySourceTraceId.values()),i=new Map;for(const a of e)if(a.connected_source_port_ids.some(A=>o.has(A)))for(const A of a.connected_source_port_ids){if(o.has(A))continue;const c=n.db.pcb_port.getWhere({source_port_id:A});!c?.pcb_port_id||c.x===void 0||c.y===void 0||c.x>=t.bounds.minX&&c.x<=t.bounds.maxX&&c.y>=t.bounds.minY&&c.y<=t.bounds.maxY||i.set(c.pcb_port_id,{x:c.x,y:c.y})}if(i.size===0)return;const r=(a,A)=>{const c=A==="left"||A==="right"?{x:A==="left"?t.bounds.minX:t.bounds.maxX,y:Math.max(t.bounds.minY,Math.min(t.bounds.maxY,a.y))}:{x:Math.max(t.bounds.minX,Math.min(t.bounds.maxX,a.x)),y:A==="bottom"?t.bounds.minY:t.bounds.maxY};return Math.hypot(a.x-c.x,a.y-c.y)},s=["right","left","top","bottom"];return s.reduce((a,A)=>{const c=[...i.values()].reduce((u,g)=>u+r(g,a),0);return[...i.values()].reduce((u,g)=>u+r(g,A),0)<c?A:a},s[0])},zMe=({connectionOwner:t,connectionOwnerLabel:e,connectionSelector:n,sourceTraces:o})=>{let r=o.filter(s=>s.name===n);if(r.length===0){const s=t.getSubcircuit().selectOne(n,{type:"port"});s?.source_port_id&&(r=o.filter(a=>a.connected_source_port_ids.includes(s.source_port_id)))}if(r.length===0)throw new Error(`Could not resolve "${n}" in ${e}`);if(r.length>1)throw new Error(`Connection "${n}" resolves to multiple source traces in ${e}`);return r[0]},xko=({routingScope:t,sourceTraces:e,coordinatedSourceTraceIds:n,availableLayers:o})=>{const i=[],r=t.getSubcircuit().subcircuit_id;for(const s of t.selectAll("bus")){if(s.getSubcircuit().subcircuit_id!==r)continue;const a=[];for(const c of s._parsedProps.connections){const l=zMe({connectionOwner:s,connectionOwnerLabel:`bus "${s.name}"`,connectionSelector:c,sourceTraces:e});n.has(l.source_trace_id)&&a.push(l.source_trace_id)}if(a.length===0)continue;let A={busId:s.name,connectionIds:a};if(s._parsedProps.preferredLayer!==void 0)A={...A,targetLayers:[s._parsedProps.preferredLayer]};else if(s._parsedProps.preferredLayers!==void 0)A={...A,targetLayers:s._parsedProps.preferredLayers};else{const c=s._parsedProps.pcbAllowedLayers??o;A={...A,targetLayers:[...new Set(c)]}}i.push(A)}return i},Eko=({routingScope:t,sourceTraces:e})=>{const n=t.getSubcircuit().subcircuit_id,o=[];for(const i of t.selectAll("differentialpair")){if(i.getSubcircuit().subcircuit_id!==n)continue;const r=zMe({connectionOwner:i,connectionOwnerLabel:`differential pair "${i.name}"`,connectionSelector:i._parsedProps.positiveConnection,sourceTraces:e}),s=zMe({connectionOwner:i,connectionOwnerLabel:`differential pair "${i.name}"`,connectionSelector:i._parsedProps.negativeConnection,sourceTraces:e});o.push({differentialPair:i,positiveSourceTraceId:r.source_trace_id,negativeSourceTraceId:s.source_trace_id})}return o},Bko=t=>{const e=t.root?.db.pcb_board.list()[0],n=e?.min_trace_width??.15,o=e?.min_trace_to_pad_edge_clearance??.2,i=e?.min_via_pad_diameter??.3;return gRt({traceWidth:n,traceToPadClearance:o,viaPadDiameter:i})},bko=({routingScope:t,automaticBreakouts:e})=>{let n=Owe(t._getSubcircuitLayerCount());for(const o of e){const i=o._parsedProps.fanoutRoutingLayers?.map(String);if(!i)continue;const r=new Set(i);n=n.filter(s=>r.has(s))}if(n.length===0)throw new Error(`Automatic breakouts in routing scope "${t.name}" have no shared fanout routing layer`);return n},Sko=t=>{if(!t.root)throw new Error(`Automatic breakout "${t.name}" has no circuit root`);const e=_ko(t),n=fko(e,t),o=new Set,i=n.map(I=>{const C=jkt(I);if(o.has(C.pcbGroupId))throw new Error(`Duplicate automatic breakout region "${C.pcbGroupId}"`);return o.add(C.pcbGroupId),C}),{regions:r,horizontalPlacement:s}=Iko(i),a=new Set;for(const I of r)for(const C of I.endpointBySourceTraceId.keys())a.add(C);const A=t.root.db.source_trace.list().filter(I=>I.subcircuit_id===e.getSubcircuit().subcircuit_id),c=new Map;for(const I of A){if(c.has(I.source_trace_id))throw new Error(`Duplicate connection identity "${I.source_trace_id}"`);c.set(I.source_trace_id,I)}const l=[...a].sort((I,C)=>{const y=c.get(I)?.name??I,x=c.get(C)?.name??C,E=y.localeCompare(x);return E!==0?E:I.localeCompare(C)});for(const I of l){if(!c.has(I))throw new Error(`Unknown connection identity "${I}"`);for(const C of r)if(!C.endpointBySourceTraceId.has(I))throw new Error(`Connection "${I}" is missing endpoint for region "${C.pcbGroupId}"`)}const u=xko({routingScope:e,sourceTraces:A,coordinatedSourceTraceIds:a,availableLayers:bko({routingScope:e,automaticBreakouts:n})}),g=new Map;for(const I of l)g.set(I,r.map(C=>C.endpointBySourceTraceId.get(I)));const h=new Map;for(const I of Eko({routingScope:e,sourceTraces:A})){const C=a.has(I.positiveSourceTraceId),y=a.has(I.negativeSourceTraceId);if(C!==y)throw new Error(`Differential pair "${I.differentialPair.name}" is missing one coordinated member`);if(C){if(h.has(I.positiveSourceTraceId)||h.has(I.negativeSourceTraceId))throw new Error("A connection belongs to multiple differential pairs");h.set(I.positiveSourceTraceId,I),h.set(I.negativeSourceTraceId,I)}}const d=[],p=new Set;for(const I of l){const C=h.get(I);if(!C){d.push({connectionId:I,endpoints:g.get(I)});continue}p.has(C.differentialPair)||(p.add(C.differentialPair),d.push({type:"differential",connections:[{connectionId:C.positiveSourceTraceId,endpoints:g.get(C.positiveSourceTraceId)},{connectionId:C.negativeSourceTraceId,endpoints:g.get(C.negativeSourceTraceId)}]}))}const m=new Map,_=r.length===1?yko({region:r[0],sourceTraces:A}):void 0;return{input:{regions:r.map((I,C)=>(m.set(I.pcbGroupId,I.sourcePortIdBySourceTraceId),{regionId:I.pcbGroupId,bounds:I.bounds,edge:Cko({region:I,regionIndex:C,regions:r,horizontalPlacement:s,singleRegionPreferredEdge:_})})),connections:d,buses:u,boundaryPointSpacing:Bko(t)},sourcePortIdByConnectionIdByRegionId:m}},$kt=new WeakMap,Qko=(t,e)=>{const n=Sko(t),o=e(n.input);if(o instanceof Promise)throw new Error("Implicit breakout point solvers must return synchronously during PCB layout");let i=0;for(const a of n.input.connections){if("type"in a){i+=a.connections.length;continue}i+=1}const r=new Map,s=new Set;for(const a of n.input.regions)r.set(a.regionId,[]);for(const a of o.breakoutPoints){const A=r.get(a.regionId);if(!A)throw new Error(`Implicit breakout point solver returned unknown region "${a.regionId}"`);const c=`${a.regionId}:${a.connectionId}`;if(s.has(c))throw new Error(`Implicit breakout point solver returned duplicate endpoint for connection "${a.connectionId}" in region "${a.regionId}"`);s.add(c);const l=n.sourcePortIdByConnectionIdByRegionId.get(a.regionId)?.get(a.connectionId);if(!l)throw new Error(`Implicit breakout point solver returned unknown connection "${a.connectionId}" for region "${a.regionId}"`);A.push({sourcePortId:l,sourceTraceId:a.connectionId,layer:a.layer,x:a.x,y:a.y})}for(const[a,A]of r)if(A.length!==i)throw new Error(`Implicit breakout point solver output is missing endpoints for region "${a}"`);return{breakoutPointsByRegionId:r}},vko=(t,e)=>{const n=t.parent;if(!n||!t.pcb_group_id)throw new Error(`Automatic breakout "${t.name}" has no coordinated PCB region`);let o=$kt.get(n);(!o||o.solverFn!==e)&&(o={solverFn:e,solutions:[]},$kt.set(n,o));let i=o.solutions.find(s=>s.breakoutPointsByRegionId.has(t.pcb_group_id));i||(i=Qko(t,e),o.solutions.push(i));const r=i.breakoutPointsByRegionId.get(t.pcb_group_id);if(!r)throw new Error(`Automatic breakout "${t.name}" references unknown implicit-breakout region "${t.pcb_group_id}"`);return r},JMe=class extends A6{get isRoutingDirective(){return!0}get config(){return{...super.config,zodProps:Ewn}}doInitialCreateAutoplacedBreakoutPoints(){for(const s of this._parsedProps.pcbTracePaths??[]){const a=s.route.at(-1),A=new zTt({connection:s.connection,pcbX:a.x,pcbY:a.y});if(A.exitLayer=a.route_type==="wire"?a.layer:a.to_layer,this.add(A),A._matchConnection(),!A.matchedPort||!this.selectAll("port").includes(A.matchedPort))throw new Error(`Fanout trace path "${s.connection}" must select a port inside the fanout`);if(this.children.some(l=>!(l instanceof dR)||l===A?!1:(l._matchConnection(),l.matchedPort===A.matchedPort)))throw new Error(`Duplicate fanout exit for "${s.connection}"`)}const t=this.selectAll("port"),e=new Set(t),n=this.children.filter(s=>s instanceof dR),o=new Set(n.map(s=>(s._matchConnection(),s.matchedPort)).filter(Boolean)),i=this.getSubcircuit().selectAll("trace"),r=new Set;for(const s of i){const a=s._findConnectedPorts();if(!(!a.allPortsFound||!a.ports))for(const A of a.ports){const c=e.has(A),l=a.ports.some(g=>!e.has(g));if(!c||!l||o.has(A)||r.has(A))continue;r.add(A);const u=new Kue({});u.matchedPort=A,u.matchedSourceTraceId=s.source_trace_id,this.add(u)}}}doInitialPcbAutoplaceBreakoutPoints(){if(this.root?.pcbDisabled)return;const t=this.props.autorouter,e=t===void 0?this.parent?.getInheritedProperty("autorouter"):void 0,n=typeof t=="object"?t.implicitBreakoutPointSolverFn:typeof e=="object"?e.implicitBreakoutPointSolverFn:void 0,o=this.children.filter(c=>c instanceof Kue);if(o.length===0||!this.root||!this.pcb_group_id)return;const i=this.root.db.pcb_group.get(this.pcb_group_id);if(!i?.width||!i.height)return;const r={minX:i.center.x-i.width/2,maxX:i.center.x+i.width/2,minY:i.center.y-i.height/2,maxY:i.center.y+i.height/2};let s;try{s=vko(this,n??hko)}catch(c){if(n||!mko(this,c))throw c;return}const a=1e-4,A=(c,l)=>({x:Math.max(r.minX+a,Math.min(r.maxX-a,c)),y:Math.max(r.minY+a,Math.min(r.maxY-a,l))});for(const c of s){const l=o.find(u=>u.matchedPort?.source_port_id===c.sourcePortId);if(l){const u=A(c.x,c.y);l._applySolvedBreakoutPoint({sourceTraceId:c.sourceTraceId,layer:c.layer,position:u})}}}doInitialPcbPrimitiveRender(){super.doInitialPcbPrimitiveRender()}doInitialPcbPlacementDesignRuleChecks(){pko(this)}},wko=class extends Ir{pcb_silkscreen_graphic_id=null;pcb_silkscreen_graphic_ids=[];pcb_silkscreen_path_ids=[];isPcbPrimitive=!0;get config(){return{componentName:"SilkscreenGraphic",zodProps:CDn}}doInitialPcbPrimitiveRender(){this.root?.pcbDisabled||this._queueAsyncEffect("SilkscreenGraphicRender",async()=>{if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,{maybeFlipLayer:n}=this._getPcbPrimitiveFlippedHelpers(),o=n(e.layer??"top");if(o!=="top"&&o!=="bottom")throw new Error(`Invalid layer "${o}" for SilkscreenGraphic. Must be "top" or "bottom".`);const i=await xPt(e.imageUrl);if(i.mimetype!==Eb&&i.mimetype!==yPt)throw new Error(`Unsupported imageUrl for SilkscreenGraphic: "${e.imageUrl}". Expected an SVG or PNG image.`);const r={project_relative_path:i.projectRelativePath,url:i.dataUrl,mimetype:i.mimetype},s=i.mimetype===Eb?eBo({svg:i.text,width:e.width,height:e.height,transform:this._computePcbGlobalTransformBeforeLayout()}):[this.getPlacementBoxBRepShape()],a=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??"";for(const A of s){const c=t.insert({type:"pcb_silkscreen_graphic",pcb_component_id:a,pcb_group_id:this.getGroup()?.pcb_group_id??void 0,subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,layer:o,shape:"brep",brep_shape:A,image_asset:r});this.pcb_silkscreen_graphic_ids.push(c.pcb_silkscreen_graphic_id)}this.pcb_silkscreen_graphic_id=this.pcb_silkscreen_graphic_ids[0]??null,i.mimetype===Eb&&this.insertRenderableSilkscreenPaths(i.text,o)})}insertRenderableSilkscreenPaths(t,e){const{db:n}=this.root,{_parsedProps:o}=this,i=this._computePcbGlobalTransformBeforeLayout(),r=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id??"";for(const s of EPt({svg:t,width:o.width,height:o.height,transform:i})){if(s.length<2)continue;const a=n.pcb_silkscreen_path.insert({pcb_component_id:r,layer:e,route:s,stroke_width:Math.max(Math.min(o.width,o.height)/60,.05),subcircuit_id:this.getSubcircuit()?.subcircuit_id??void 0,pcb_group_id:this.getGroup()?.pcb_group_id??void 0});this.pcb_silkscreen_path_ids.push(a.pcb_silkscreen_path_id)}}getPcbSize(){const{_parsedProps:t}=this;return{width:t.width,height:t.height}}getPlacementBoxBRepShape(){const{_parsedProps:t}=this,e=t.width/2,n=t.height/2,o=this._computePcbGlobalTransformBeforeLayout();return{outer_ring:{vertices:BPt([{x:-e,y:n},{x:e,y:n},{x:e,y:-n},{x:-e,y:-n}]).map(i=>ts(o,i))},inner_rings:[]}}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root,o=i=>({...i,x:i.x+t,y:i.y+e});for(const i of this.pcb_silkscreen_graphic_ids){const r=n.pcb_silkscreen_graphic.get(i);r&&n.pcb_silkscreen_graphic.update(i,{brep_shape:{outer_ring:{vertices:r.brep_shape.outer_ring.vertices.map(o)},inner_rings:r.brep_shape.inner_rings.map(s=>({vertices:s.vertices.map(o)}))}})}for(const i of this.pcb_silkscreen_path_ids){const r=n.pcb_silkscreen_path.get(i);r&&n.pcb_silkscreen_path.update(i,{route:r.route.map(s=>({...s,x:s.x+t,y:s.y+e}))})}}},Pko=class extends Ir{pcb_smtpad_id=null;isPcbPrimitive=!0;get config(){return{componentName:"Fiducial",zodProps:llt,sourceFtype:"simple_fiducial"}}doInitialPcbPrimitiveRender(){if(this.root?.pcbDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=this._getGlobalPcbPositionBeforeLayout(),{maybeFlipLayer:o}=this._getPcbPrimitiveFlippedHelpers(),i=this.parent?.pcb_component_id??this.getPrimitiveContainer()?.pcb_component_id,r=t.pcb_smtpad.insert({pcb_component_id:i,layer:o(e.layer||"top"),shape:"circle",x:n.x,y:n.y,radius:lt.parse(e.padDiameter)/2,soldermask_margin:e.soldermaskPullback?lt.parse(e.soldermaskPullback):lt.parse(e.padDiameter)/2,is_covered_with_solder_mask:!0});this.pcb_smtpad_id=r.pcb_smtpad_id}getPcbSize(){const{_parsedProps:t}=this,e=lt.parse(t.padDiameter);return{width:e,height:e}}_setPositionFromLayout(t){if(!this.pcb_smtpad_id)return;const{db:e}=this.root;e.pcb_smtpad.update(this.pcb_smtpad_id,{x:t.x,y:t.y})}_moveCircuitJsonElements({deltaX:t,deltaY:e}){if(this.root?.pcbDisabled)return;const{db:n}=this.root;if(!this.pcb_smtpad_id)return;const o=n.pcb_smtpad.get(this.pcb_smtpad_id);o&&(o.shape==="rect"||o.shape==="circle"||o.shape==="rotated_rect"||o.shape==="pill"?this._setPositionFromLayout({x:o.x+t,y:o.y+e}):o.shape==="polygon"&&n.pcb_smtpad.update(this.pcb_smtpad_id,{points:o.points.map(i=>({x:i.x+t,y:i.y+e}))}))}},qkt=class extends Ir{isAssemblyDeviceContainer=!0;get config(){return{componentName:"AssemblyDevice",zodProps:mvn}}doInitialAssignNameToUnnamedComponents(){}computeSchematicGlobalTransform(){return hC()}_computePcbGlobalTransformBeforeLayout(){return hC()}},Mko=({cad:t,authoredModel:e})=>{const n=t.model_bounds??e?.modelBounds,o=t.model_origin_position??e?.modelOriginPosition;if(!n?.min||!n?.max||!o)return;const i=t.model_board_normal_direction??e?.modelBoardNormalDirection??"z+",r=i[0];if(r!=="x"&&r!=="y"&&r!=="z")return;const s=n.min[r],a=n.max[r],A=o[r];if(s===void 0||a===void 0||A===void 0)return;const c=i.endsWith("-")?A-s:a-A;return Number.isFinite(c)&&c>=0?c:void 0},Dko=({owner:t,pcbComponent:e,cadComponent:n,boardSurfaceZ:o})=>{const i=t?._parsedProps?.cadModel,r=i&&typeof i=="object"?i:void 0,s=n?.size??r?.size,a=s?.x,A=s?.y,c=s?.z,l=n?Mko({cad:n,authoredModel:r}):void 0,u=n?.position?.z,g=l!==void 0&&u!==void 0?l+Math.abs(u-o):void 0;return{size:a!==void 0&&A!==void 0?{x:a,y:A,z:c}:void 0,aboveBoardHeight:g,rotation:n?.rotation?.z??e.rotation??0,footprint:{width:e.width,height:e.height}}},Nko=({point:t,board:e})=>{const n=(e.width??0)/2,o=(e.height??0)/2,i=[["x_neg",Math.abs(t.x-(e.center.x-n))],["x_pos",Math.abs(t.x-(e.center.x+n))],["y_neg",Math.abs(t.y-(e.center.y-o))],["y_pos",Math.abs(t.y-(e.center.y+o))]];return i.sort((r,s)=>r[1]-s[1]),i[0][0]},Rko=t=>t,Tko={from_top:"y_pos",from_bottom:"y_neg",from_left:"x_neg",from_right:"x_pos"},kko=(t,{board:e,pcbBoard:n})=>{let o=t.parent;for(;o&&o!==e&&!o.pcb_component_id;)o=o.parent;const i=o?.pcb_component_id?t.root?.db.pcb_component.get(o.pcb_component_id):null;if(!i)throw new Error("<enclosure.cutoutaperture /> must be nested inside a component with a PCB footprint");const r=t._parsedProps,a=o?._getEnclosureApertureAxisDirection?.(i.layer,i.rotation??0),A=a?a.z!==0?a.z>0?"from_above":"from_below":Math.abs(a.x)>=Math.abs(a.y)?a.x>=0?"from_right":"from_left":a.y>=0?"from_top":"from_bottom":i.insertion_direction,c=A==="from_above"?"z_pos":A==="from_below"?"z_neg":void 0,l=i.layer==="bottom"?"bottom":"top";let u,g;if(c)u=c,g={x:i.center.x-n.center.x,y:i.center.y-n.center.y};else{const _=i.cable_insertion_center??i.center,f=Tko[A]??Nko({point:_,board:n}),I=i.cable_insertion_center?{x:i.cable_insertion_center.x-i.center.x,y:i.cable_insertion_center.y-i.center.y}:null,C=I!=null&&(f==="x_neg"||f==="x_pos"?Math.abs(I.x)>=Math.abs(I.y):Math.abs(I.y)>=Math.abs(I.x)),y=a?i.center:C?_:i.center;u=Rko(f),g={x:y.x-n.center.x,y:y.y-n.center.y}}const h=t.root?.db.cad_component.getWhere({pcb_component_id:i.pcb_component_id})??null,d=(l==="bottom"?-1:1)*((n.thickness??e.boardThickness)/2),p=Dko({owner:o,pcbComponent:i,cadComponent:h,boardSurfaceZ:d}),m={face:u,center:g,boardSide:l,apertureAxisDirection:a,rotation:i.rotation??void 0,depth:r.depth,componentBody:p,widthDimensionOffset:r.widthDimensionOffset,heightDimensionOffset:r.heightDimensionOffset,margin:r.margin};switch(r.shape){case"pill":case"rect":return{...m,shape:r.shape,width:r.width,height:r.height};case"circle":return{...m,shape:"circle",radius:r.radius}}},WMe=class extends Ir{get config(){return{componentName:"EnclosureCutoutAperture",zodProps:fvn}}getFdmEnclosureSolverInput(t){return kko(this,t)}},Xkt=(t,e)=>{const n=t.root?.firstChild,o=n?poe(e,n,{adapter:S0e}):null,i=o instanceof wB?o:[n,...n?.getDescendants()??[]].find(r=>r instanceof wB&&r.isMatchingNameOrAlias(e));if(!(i instanceof wB))throw new Error(`Could not find a <board /> matching enclosure boardRef "${e}"`);return i},Fko=t=>{const e=t.root;if(!e||e.pcbDisabled||!t.source_component_id||!t.pcb_component_id)return;const{db:n}=e,o=t._parsedProps,i=Xkt(t,o.boardRef),r=i.pcb_board_id?n.pcb_board.get(i.pcb_board_id):null;if(!r?.width||!r.height)throw new Error(`Could not resolve dimensions for boardRef "${o.boardRef}"`);const s=r.thickness??i.boardThickness,a={board:{width:r.width,height:r.height,thickness:s},width:o.width,height:o.height,depth:o.depth,wallThickness:o.wallThickness,floorThickness:o.floorThickness,lidThickness:o.lidThickness,boardClearance:o.boardClearance,standoffHeight:o.standoffHeight,topHeadroom:o.topHeadroom,lidLipDepth:o.lidLipDepth,apertures:o.disableCutouts?[]:i.getDescendants().filter(h=>h instanceof WMe).map(h=>h.getFdmEnclosureSolverInput({board:i,pcbBoard:r}))},A=new Vbt(a),c=A.getConstructorParams();if(e.emit("solver:started",{type:"solver:started",solverName:"CreateFdmEnclosureSolver",solverParams:c[0],solverConstructorArgs:c,componentName:t.getString()}),A.solve(),A.failed)throw new Error(A.error??"Failed to create FDM enclosure");const l=A.getOutput();n.pcb_component.update(t.pcb_component_id,{center:r.center,width:l.dimensions.width,height:l.dimensions.height});const u={x:r.center.x,y:r.center.y,z:-s/2-l.dimensions.floorThickness-l.dimensions.standoffHeight},g=l.parts.map(h=>n.cad_component.insert({position:u,rotation:{x:0,y:0,z:0},pcb_component_id:t.pcb_component_id,source_component_id:t.source_component_id,model_jscad:h.jscadPlan,model_unit_to_mm_scale_factor:1,model_object_fit:"contain_within_bounds",model_origin_alignment:"bottom_center_of_component",anchor_alignment:"center",show_as_translucent_model:!1,show_hidden_edges:o.showHiddenEdges}));t.cad_component_id=g[0]?.cad_component_id??null},Zkt=class p4n extends Ir{get config(){return{componentName:"EnclosureFdmBox",zodProps:Ivn}}doInitialAssignNameToUnnamedComponents(){if(this._parsedProps.name)return;let e=this;for(;e.parent instanceof Ir;)e=e.parent;const o=[e,...e.getDescendants()].filter(i=>i instanceof p4n).indexOf(this);this.fallbackUnassignedName=`unnamed_enclosure_fdm_box_${o===-1?0:o+1}`}doInitialSourceRender(){const e=this.root.db.source_component.insert({ftype:"simple_chip",name:this.name});this.source_component_id=e.source_component_id}doInitialPcbComponentRender(){const e=this.root;if(!e||e.pcbDisabled||!this.source_component_id)return;const n=Xkt(this,this._parsedProps.boardRef),i=(n.pcb_board_id?e.db.pcb_board.get(n.pcb_board_id):null)?.center??n._getGlobalPcbPositionBeforeLayout(),r=e.db.pcb_component.insert({center:i,width:0,height:0,layer:"top",rotation:0,source_component_id:this.source_component_id,obstructs_within_bounds:!1,do_not_place:!0,is_allowed_to_be_off_board:!0});this.pcb_component_id=r.pcb_component_id}doInitialCadModelRender(){Fko(this)}},Lko=class extends g0{get config(){return{componentName:"Battery",schematicSymbolName:this.props.symbolName??"battery",zodProps:TPn,sourceFtype:"simple_power_source"}}initPorts(){super.initPorts({additionalAliases:{pin1:["anode","pos","left"],pin2:["cathode","neg","right"]}})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({name:this.name,ftype:"simple_power_source",capacity:e.capacity,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,are_pins_interchangeable:!1,display_name:e.displayName});this.source_component_id=n.source_component_id}},Hko=class extends g0{_getPcbRotationBeforeLayout(){const e=this.props.pcbOrientation==="vertical"?-90:0;return(super._getPcbRotationBeforeLayout()??0)+e}get config(){return{componentName:"PinHeader",zodProps:LPn,shouldRenderAsSchematicBox:!0}}_getImpliedFootprintString(){const e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:0),n=this._parsedProps.holeDiameter,o=this._parsedProps.platedDiameter,i=this._parsedProps.pitch,r=this._parsedProps.showSilkscreenPinLabels,s=this._parsedProps.doubleRow?2:1,a=this._parsedProps.gender;if(e>0){let A;if(i)!n&&!o?A=`pinrow${e}_p${i}`:A=`pinrow${e}_p${i}_id${n}_od${o}`;else if(!n&&!o)A=`pinrow${e}`;else return null;return r!==!0&&(A+="_nopinlabels"),a==="female"&&(A+="_female"),s>1&&(A+=`_rows${s}`),A}return null}initPorts(){const e=this._parsedProps.pinCount??(Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels.length:this._parsedProps.pinLabels?Object.keys(this._parsedProps.pinLabels).length:1);for(let n=1;n<=e;n++){const o=Array.isArray(this._parsedProps.pinLabels)?this._parsedProps.pinLabels[n-1]:this._parsedProps.pinLabels?.[`pin${n}`];if(o){const i=Array.isArray(o)?o[0]:o,r=Array.isArray(o)?o.slice(1):[];this.add(new Pu({pinNumber:n,name:i,aliases:[`pin${n}`,...r]}))}else this.add(new Pu({pinNumber:n,name:`pin${n}`}))}}_getSchematicPortArrangement(){const e=this._parsedProps.pinCount??1,n=this._parsedProps.schFacingDirection??this._parsedProps.facingDirection??"right",o=this._parsedProps.schPinArrangement,i=Array.from({length:e},(r,s)=>`pin${s+1}`);return n==="left"?{leftSide:{direction:o?.leftSide?.direction??"top-to-bottom",pins:o?.leftSide?.pins??i}}:n==="up"?{topSide:{direction:o?.topSide?.direction??"left-to-right",pins:o?.topSide?.pins??i}}:n==="down"?{bottomSide:{direction:o?.bottomSide?.direction??"left-to-right",pins:o?.bottomSide?.pins??i}}:{rightSide:{direction:o?.rightSide?.direction??"top-to-bottom",pins:o?.rightSide?.pins??i}}}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({ftype:"simple_pin_header",name:this.name,supplier_part_numbers:n.supplierPartNumbers,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,pin_count:n.pinCount,gender:n.gender,are_pins_interchangeable:!0,display_name:n.displayName});this.source_component_id=o.source_component_id}};function Oko(t){switch(t){case"two_ground_pins":return"crystal_4pin";case"ground_pin":return"resonator";case"no_ground":return"crystal";default:return"crystal"}}var Gko=class extends g0{get config(){return{componentName:"Resonator",schematicSymbolName:this.props.symbolName??Oko(this.props.pinVariant),zodProps:jwn,shouldRenderAsSchematicBox:!1}}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=e.pinVariant||"no_ground",o=t.source_component.insert({ftype:"simple_resonator",name:this.name,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,frequency:e.frequency,load_capacitance:e.loadCapacitance,supplier_part_numbers:e.supplierPartNumbers,pin_variant:n,are_pins_interchangeable:n==="no_ground"||n==="ground_pin",display_name:e.displayName});this.source_component_id=o.source_component_id}_getSchematicSymbolDisplayValue(){const t=`${H_(this._parsedProps.frequency)}Hz`;return this._parsedProps.loadCapacitance?`${t} / ${H_(this._parsedProps.loadCapacitance)}F`:t}};function Yko(t){switch(t){case"three_pin":return"potentiometer3";case"two_pin":return"potentiometer2";default:return"potentiometer2"}}var Uko=class extends g0{get config(){return{componentName:"Potentiometer",schematicSymbolName:this.props.symbolName??Yko(this.props.pinVariant),zodProps:zwn,shouldRenderAsSchematicBox:!1}}_getSchematicSymbolDisplayValue(){return`${H_(this._parsedProps.maxResistance)}Ω`}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=n.pinVariant||"two_pin",i=e.source_component.insert({ftype:"simple_potentiometer",name:this.name,manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,max_resistance:n.maxResistance,pin_variant:o,are_pins_interchangeable:o==="two_pin",display_name:n.displayName,display_max_resistance:this._getSchematicSymbolDisplayValue()});this.source_component_id=i.source_component_id}},Kko=10,eFt=0,Vko=class extends g0{get config(){return{schematicSymbolName:this.props.symbolName??(this.props.pinVariant==="four_pin"?"crystal_4pin":"crystal"),componentName:"Crystal",zodProps:Wwn,sourceFtype:"simple_crystal"}}initPorts(){const e=this.props.pinVariant==="four_pin"?{pin1:["left1","1","X1"],pin2:["top1","2","gnd1"],pin3:["right1","3","X2"],pin4:["bottom1","4","gnd2"]}:{pin1:["pos","left","X1"],pin2:["neg","right","X2"]};super.initPorts({additionalAliases:e})}_getSchematicSymbolDisplayValue(){const e=`${H_(this._parsedProps.frequency)}Hz`;return this._parsedProps.loadCapacitance?`${e} / ${H_(this._parsedProps.loadCapacitance)}F`:e}doInitialSourceRender(){const{db:e}=this.root,{_parsedProps:n}=this,o=e.source_component.insert({name:this.name,ftype:"simple_crystal",manufacturer_part_number:n.manufacturerPartNumber??n.mfn,supplier_part_numbers:n.supplierPartNumbers,frequency:n.frequency,load_capacitance:n.loadCapacitance,pin_variant:n.pinVariant||"two_pin",are_pins_interchangeable:(n.pinVariant||"two_pin")==="two_pin",display_name:n.displayName});this.source_component_id=o.source_component_id}doInitialSourceDesignRuleChecks(){if(super.doInitialSourceDesignRuleChecks(),!this.source_component_id)return;const{db:e}=this.root,n=this._parsedProps.maxTraceLength??Kko,o=new Set,i=new Set;for(const r of[this.portMap.X1,this.portMap.X2]){if(!r.source_port_id)continue;const s=e.source_port.get(r.source_port_id);s&&(o.add(r.source_port_id),s.subcircuit_connectivity_map_key&&i.add(s.subcircuit_connectivity_map_key))}for(const r of e.source_trace.list()){const s=r.connected_source_port_ids.some(l=>o.has(l)),a=r.subcircuit_connectivity_map_key!==void 0&&i.has(r.subcircuit_connectivity_map_key);if(!s&&!a)continue;const A=typeof r.max_length!="number"||r.max_length>n,c=r.max_via_count!==eFt;!A&&!c||e.source_trace.update(r.source_trace_id,{...A?{max_length:n}:{},...c?{max_via_count:eFt}:{}})}}},zko=class extends g0{getSchematicSymbolName(){return this.props.symbolName?this.props.symbolName:this.props.connections?.positive_supply||this.props.connections?.negative_supply?"opamp_with_power":"opamp_no_power"}get config(){return{componentName:"OpAmp",schematicSymbolName:this.getSchematicSymbolName(),zodProps:uMn,sourceFtype:"simple_op_amp"}}initPorts(){const t={pin1:["non_inverting_input"],pin2:["inverting_input"]};this.getSchematicSymbolName()==="opamp_with_power"?Object.assign(t,{pin4:["output"],pin5:["positive_supply","vcc","vdd"],pin3:["negative_supply","vee","vss","gnd"]}):Object.assign(t,{pin3:["output"],pin4:["positive_supply","vcc","vdd"],pin5:["negative_supply","vee","vss","gnd"]}),super.initPorts({pinCount:5,additionalAliases:t})}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,n=t.source_component.insert({ftype:"simple_op_amp",name:this.name,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,display_name:e.displayName});this.source_component_id=n.source_component_id}doInitialSimulationRender(){const{db:t}=this.root,e=this.portMap.inverting_input,n=this.portMap.non_inverting_input,o=this.portMap.output,i=this.portMap.positive_supply,r=this.portMap.negative_supply;!e?.source_port_id||!n?.source_port_id||!o?.source_port_id||!i?.source_port_id||!r?.source_port_id||t.simulation_op_amp.insert({type:"simulation_op_amp",source_component_id:this.source_component_id,inverting_input_source_port_id:e.source_port_id,non_inverting_input_source_port_id:n.source_port_id,output_source_port_id:o.source_port_id,positive_supply_source_port_id:i.source_port_id,negative_supply_source_port_id:r.source_port_id})}inverting_input=this.portMap.inverting_input;non_inverting_input=this.portMap.non_inverting_input;output=this.portMap.output;positive_supply=this.portMap.positive_supply;negative_supply=this.portMap.negative_supply},jMe={HOLE_DIAMETER:.5,SMT_CIRCLE_DIAMETER:1.2,SMT_RECT_SIZE:2},Jko=class extends g0{get config(){return{componentName:"TestPoint",schematicSymbolName:this.props.symbolName??"testpoint",zodProps:vMn,sourceFtype:$7.simple_test_point}}_getPropsWithDefaults(){let{padShape:t,holeDiameter:e,footprintVariant:n,padDiameter:o,width:i,height:r}=this._parsedProps;return!n&&e&&(n="through_hole"),n??="through_hole",t??="circle",n==="pad"?t==="circle"?o??=jMe.SMT_CIRCLE_DIAMETER:t==="rect"&&(i??=jMe.SMT_RECT_SIZE,r??=i):n==="through_hole"&&(e??=jMe.HOLE_DIAMETER),{padShape:t,holeDiameter:e,footprintVariant:n,padDiameter:o,width:i,height:r}}_getImpliedFootprintString(){const{padShape:t,holeDiameter:e,footprintVariant:n,padDiameter:o,width:i,height:r}=this._getPropsWithDefaults();if(n==="through_hole")return`platedhole_d${e}`;if(n==="pad"){if(t==="circle")return`smtpad_circle_d${o}`;if(t==="rect")return`smtpad_rect_w${i}_h${r}`}throw new Error(`Footprint variant "${n}" with pad shape "${t}" not implemented`)}doInitialSourceRender(){const{db:t}=this.root,{_parsedProps:e}=this,{padShape:n,holeDiameter:o,footprintVariant:i,padDiameter:r,width:s,height:a}=this._getPropsWithDefaults(),A=t.source_component.insert({ftype:$7.simple_test_point,name:this.name,supplier_part_numbers:e.supplierPartNumbers,manufacturer_part_number:e.manufacturerPartNumber??e.mfn,footprint_variant:i,pad_shape:n,pad_diameter:r,hole_diameter:o,width:s,height:a,are_pins_interchangeable:!0,display_name:e.displayName});this.source_component_id=A.source_component_id}},Wko=t=>{if(t.root?.schematicDisabled||t.getCollapsedSchematicBoxAncestor())return;const{db:e}=t.root,n=t._getSchematicSymbolNameOrThrow(),o=Su[n];if(!o)throw new Error(`No schematic symbol found for "${n}"`);const i=t._getGlobalSchematicPositionBeforeLayout(),r=t._resolveSchematicSheetId(),s=t.getSubcircuit().subcircuit_id??void 0,a=e.schematic_component.insert({center:i,size:{...o.size},is_box_with_pins:!0,symbol_name:n,source_component_id:t.source_component_id??void 0,schematic_sheet_id:r});t.schematic_component_id=a.schematic_component_id;for(const A of o.ports){const c=t.getPortForSymbolPort(A);if(!c?.source_port_id)throw new Error(`Missing source port for schematic symbol port "${A.labels.join("/")}" on ${t.getString()}`);const l={x:i.x+A.x-o.center.x,y:i.y+A.y-o.center.y},u=e.schematic_port.insert({schematic_component_id:a.schematic_component_id,center:l,source_port_id:c.source_port_id,facing_direction:IMt(i,l),distance_from_component_edge:.4,pin_number:c._parsedProps.pinNumber,display_pin_label:c._parsedProps.aliases?.[0],is_connected:!1,schematic_sheet_id:r,subcircuit_id:s});c.schematic_port_id=u.schematic_port_id}},jko=(t,e)=>{const n=Array.isArray(e)?e:[e];if(n.length!==1)throw new Error(`SchematicSymbol connection "${t}" must select exactly one physical port`);return n[0]},$ko=t=>{const{db:e}=t.root,{chipRef:n,connections:o}=t._parsedProps;if(n&&!o){e.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:"chipRef",message:`${t.getString()} has chipRef "${n}" without connections. chipRef will be ignored.`,error_type:"source_property_ignored_warning",subcircuit_id:t.getSubcircuit().subcircuit_id??void 0});return}if(o&&!n){e.source_property_ignored_warning.insert({source_component_id:t.source_component_id,property_name:"connections",message:`${t.getString()} has connections without chipRef. connections will be ignored.`,error_type:"source_property_ignored_warning",subcircuit_id:t.getSubcircuit().subcircuit_id??void 0});return}if(!n||!o)return;const i=t.getSubcircuit().selectOne(n);if(!i?.source_component_id)throw new Error(`Could not resolve chipRef "${n}" for ${t.getString()}`);const r=new Set;for(const a of t.ports){const A=a.schematicSymbolPortDef,c=Object.entries(o).filter(([p])=>a.isMatchingAnyOf([p]));if(c.length===0)throw new Error(`${t.getString()} is missing an explicit connection for symbol port "${A.labels.join("/")}"`);if(c.length>1)throw new Error(`${t.getString()} has multiple connections for symbol port "${A.labels.join("/")}"`);const[l,u]=c[0];r.add(l);const g=jko(l,u),h=t.getSubcircuit().selectOne(g,{type:"port"});if(!h?.source_port_id)throw new Error(`Could not resolve connection "${l}" target "${g}" for ${t.getString()}`);if(e.source_port.get(h.source_port_id)?.source_component_id!==i.source_component_id)throw new Error(`Connection "${l}" target "${g}" does not belong to chipRef "${n}"`);a.source_port_id=h.source_port_id,a.source_component_id=h.source_component_id}const s=Object.keys(o).filter(a=>!r.has(a));if(s.length>0)throw new Error(`${t.getString()} has connections that do not match symbol ports: ${s.join(", ")}`)},qko=class extends Ir{isSchematicPrimitive=!0;isPrimitiveContainer=!0;get config(){return{componentName:"SchematicSymbol",schematicSymbolName:this.props.symbolName,zodProps:eDn}}initPorts(){const t=Su[this._getSchematicSymbolNameOrThrow()],e=!(this._parsedProps.chipRef&&this._parsedProps.connections);for(const n of t.ports){const o=H0e(n.labels);if(!o)throw new Error(`Schematic symbol port must have a numeric pin label: ${n.labels.join("/")}`);const i=this.ports.find(a=>a._parsedProps.pinNumber===o);if(i){i.schematicSymbolPortDef=n;continue}const r=n.labels.filter(a=>a!==o.toString()&&a!==`pin${o}`),s=new Pu({pinNumber:o,aliases:r},{shouldCreateSourcePort:e});s.schematicSymbolPortDef=n,this.add(s)}}doInitialInitializePortsFromChildren(){this.initPorts()}updateInitializePortsFromChildren(){this.initPorts()}get ports(){return this.children.filter(t=>t instanceof Pu)}getPortForSymbolPort(t){return this.ports.find(e=>e.schematicSymbolPortDef===t)??null}doInitialSourceRender(){const t=this.root.db.source_component.insert({ftype:"simple_chip",name:this.name,display_name:this._parsedProps.displayName,are_pins_interchangeable:!1});this.source_component_id=t.source_component_id}doInitialPortMatching(){$ko(this)}doInitialSchematicComponentRender(){Wko(this)}},Xko=class m4n extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:"SchematicSection",zodProps:lDn}}_computeSectionBounds(e,n,o){const{db:i}=this.root,r=e.getDescendants().filter(a=>a.getSchematicSectionName()===n);if(r.length===0)return null;const s=[];for(const a of r){const A=a.schematic_component_id;if(!A)continue;const c=i.schematic_component.get(A);if(!c||c.schematic_sheet_id!==o)continue;const l=c.size.width/2,u=c.size.height/2;s.push({minX:c.center.x-l,maxX:c.center.x+l,minY:c.center.y-u,maxY:c.center.y+u});for(const g of i.schematic_text.list({schematic_component_id:A}))s.push(cTt({text:g.text,position:g.position,anchor:g.anchor,fontSize:g.font_size}))}return s.length===0?null:Dwe(s)}doInitialSchematicSectionRender(){if(this.root?.schematicDisabled)return;const e=this.root?._getBoard();if(!e)return;const n=this._resolveSchematicSheetId(),o=e.getDescendants().filter(_=>_ instanceof m4n&&_._resolveSchematicSheetId()===n);if(o[0]!==this)return;const{db:i}=this.root,r=.5,s=.2,a=.02,A=.001,c=o.map(_=>{const f=_._computeSectionBounds(e,_._parsedProps.name,n);return f?{displayName:_._parsedProps.displayName,sectionTitleFontSize:_._parsedProps.sectionTitleFontSize,rawBounds:f,cell:{minX:f.minX-r,maxX:f.maxX+r,minY:f.minY-r,maxY:f.maxY+r}}:null}).filter(_=>_!==null),l=this._computeSectionBounds(e,null,n),u=[...c];if(l&&u.push({displayName:void 0,sectionTitleFontSize:void 0,rawBounds:l,cell:{minX:l.minX-r,maxX:l.maxX+r,minY:l.minY-r,maxY:l.maxY+r}}),u.length===0)return;const g=u.map(_=>_.cell),h=Dwe(g),d=C9o(u.map(_=>_.rawBounds),{cellMargin:1});for(const _ of d)i.schematic_line.insert({x1:_.start.x,y1:_.start.y,x2:_.end.x,y2:_.end.y,stroke_width:a,color:"#000000",is_dashed:!0,schematic_sheet_id:n});const p=d.filter(_=>Math.abs(_.start.y-_.end.y)<A),m=d.filter(_=>Math.abs(_.start.x-_.end.x)<A);for(const _ of u){const{displayName:f,sectionTitleFontSize:I,rawBounds:C,cell:y}=_;if(!f)continue;const x=u.some(M=>M!==_&&z4(M.rawBounds,C)),E=p.map(M=>M.start.y).filter(M=>M>C.maxY),B=E.length>0?Math.min(...E):h.maxY,S=m.map(M=>M.start.x).filter(M=>M<C.minX);let Q=h.minX;x&&(Q=y.minX),S.length>0&&(Q=Math.max(...S));const w=I??.18;i.schematic_text.insert({anchor:"top_left",text:f,font_size:w,color:"#000000",position:{x:Q+s,y:Math.max(B-s,C.maxY+s+w)},rotation:0,schematic_sheet_id:n})}}},Zko=t=>L2e.parse(t.toLowerCase()),eFo={a4:{width:297,height:210},ansi_b:{width:431.8,height:279.4}},tFt=({sheetSize:t,sheetWidth:e,sheetHeight:n})=>{const o=Zko(t),i=eFo[o];return{sheetSize:o,sheetWidth:e??i.width,sheetHeight:n??i.height}},$Me=10.16/1.1,jue=5/$Me,$ue=1e-6,tFo=t=>{switch(t.type){case"schematic_component":return t.schematic_component_id;case"schematic_net_label":return t.schematic_net_label_id;case"schematic_trace":return t.schematic_trace_id}},nFo=({db:t,schematicSheetId:e,schematicSheetName:n,schematicSheetCenter:o,sheetWidth:i,sheetHeight:r})=>{const s=i/$Me,a=r/$Me,A={minX:o.x-s/2+jue,maxX:o.x+s/2-jue,minY:o.y-a/2+jue,maxY:o.y+a/2-jue},c=[...t.schematic_component.list(),...t.schematic_net_label.list(),...t.schematic_trace.list()].filter(l=>l.schematic_sheet_id===e);for(const l of c){const u=vWn(l);if(!u||!(u.minX<A.minX-$ue||u.maxX>A.maxX+$ue||u.minY<A.minY-$ue||u.maxY>A.maxY+$ue))continue;const h=tFo(l);t.schematic_element_outside_sheet_warning.insert({warning_type:"schematic_element_outside_sheet_warning",message:`${l.type} ${h} extends outside the drawing area of schematic sheet "${n}"`,schematic_sheet_id:e,schematic_element_type:l.type,schematic_element_id:h})}},oFo=class extends Ir{isSchematicPrimitive=!0;resolvedSchematicSheetDisplayName="Schematic Sheet";get config(){return{componentName:"SchematicSheet",zodProps:uDn}}doInitialSourceGroupRender(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{_parsedProps:e}=this,n=new Set(this.root.children.flatMap(l=>[l,...l.getDescendants()]).filter(l=>l.componentName==="SchematicSheet").map(l=>l._parsedProps.sheetIndex).filter(l=>l!==void 0)),o=new Set([...n,...t.schematic_sheet.list().map(l=>l.sheet_index).filter(l=>l!==void 0)]);let i=0;for(;o.has(i);)i+=1;const r=e.sheetIndex??i,s=e.name??e.displayName??`Sheet ${r+1}`,a=e.displayName??s;this.resolvedSchematicSheetDisplayName=a;const A=tFt(e),c=t.schematic_sheet.insert({name:s,display_name:a,sheet_index:r,sheet_size:A.sheetSize,sheet_width:A.sheetWidth,sheet_height:A.sheetHeight,subcircuit_id:this.getSubcircuit().subcircuit_id??void 0});this.schematic_sheet_id=c.schematic_sheet_id}doInitialSchematicSheetRender(){if(this.root?.schematicDisabled||!this.schematic_sheet_id)return;const{db:t}=this.root,e=tFt(this._parsedProps),n=[...t.schematic_component.list(),...t.schematic_port.list(),...t.schematic_text.list(),...t.schematic_line.list(),...t.schematic_rect.list(),...t.schematic_circle.list(),...t.schematic_arc.list(),...t.schematic_path.list()].filter(i=>i.schematic_sheet_id===this.schematic_sheet_id);let o={x:0,y:0};if(n.length>0){const i=Gj(n);Number.isFinite(i.minX)&&Number.isFinite(i.maxX)&&Number.isFinite(i.minY)&&Number.isFinite(i.maxY)&&(o={x:(i.minX+i.maxX)/2,y:(i.minY+i.maxY)/2},t.schematic_sheet.update(this.schematic_sheet_id,{center:o}))}nFo({db:t,schematicSheetId:this.schematic_sheet_id,schematicSheetName:this.resolvedSchematicSheetDisplayName,schematicSheetCenter:o,sheetWidth:e.sheetWidth,sheetHeight:e.sheetHeight})}},iFo=class extends Ir{isSchematicPrimitive=!0;schematic_graphic_id;get config(){return{componentName:"SchematicGraphic",zodProps:dDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{imageUrl:e,svgContent:n,width:o,height:i}=this._parsedProps;if(e!==void 0){this._queueAsyncEffect("SchematicGraphicRender",async()=>{if(this.root?.schematicDisabled)return;const r=await EDt(e,this.root?.platform),s=await xPt(r).catch(l=>{if(n===void 0||r.startsWith("data:"))throw l;return null});if(s===null){const l={project_relative_path:e.startsWith("data:")?"inline":e,url:r,mimetype:Eb},u=this.root.db.schematic_graphic.insert({asset:l,schematic_sheet_id:this._resolveSchematicSheetId(),svg_content:n,...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}});this.schematic_graphic_id=u.schematic_graphic_id;return}if(s.mimetype!==Eb)throw new Error(`Unsupported imageUrl for SchematicGraphic: "${e}". Expected an SVG image.`);const a={project_relative_path:e.startsWith("data:")?s.projectRelativePath:e,url:s.dataUrl,mimetype:s.mimetype},A=s.dataUrl.startsWith("data:")?n:s.text,c=this.root.db.schematic_graphic.insert({asset:a,schematic_sheet_id:this._resolveSchematicSheetId(),...A===void 0?{}:{svg_content:A},...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}});this.schematic_graphic_id=c.schematic_graphic_id});return}if(n!==void 0){const r={project_relative_path:"inline",url:`data:image/svg+xml,${encodeURIComponent(n)}`,mimetype:Eb},s=t.schematic_graphic.insert({asset:r,schematic_sheet_id:this._resolveSchematicSheetId(),...o===void 0?{}:{width:o},...i===void 0?{}:{height:i}});this.schematic_graphic_id=s.schematic_graphic_id}}},rFo=class extends Ir{isSchematicPrimitive=!0;schematic_table_id=null;get config(){return{componentName:"SchematicTable",zodProps:aDn}}doInitialSchematicPrimitiveRender(){if(this.root?.schematicDisabled||this.getCollapsedSchematicBoxAncestor())return;const{db:t}=this.root,{_parsedProps:e}=this,n=this.children.filter(u=>u.componentName==="SchematicRow");if(n.length===0)return;const o=[];let i=0;for(const u of n){const g=u.children.filter(h=>h.componentName==="SchematicCell");i=Math.max(i,g.length)}for(let u=0;u<n.length;u++)o[u]=[];for(let u=0;u<n.length;u++){const h=n[u].children.filter(p=>p.componentName==="SchematicCell");let d=0;for(let p=0;p<h.length;p++){for(;o[u][d];)d++;const m=h[p],_=m._parsedProps.colSpan??1,f=m._parsedProps.rowSpan??1;for(let I=0;I<f;I++)for(let C=0;C<_;C++)o[u+I]||(o[u+I]=[]),o[u+I][d+C]=m;d+=_}}i=Math.max(0,...o.map(u=>u.length));const r=n.map((u,g)=>u._parsedProps.height??1),s=Array.from({length:i},(u,g)=>{let h=0;for(let d=0;d<n.length;d++){const p=o[d]?.[g];if(p){const m=p._parsedProps.text??p._parsedProps.children,_=p._parsedProps.width??(m?.length??2)*.5;_>h&&(h=_)}}return h||10}),a=this._getGlobalSchematicPositionBeforeLayout(),A=t.schematic_table.insert({anchor_position:a,column_widths:s,row_heights:r,cell_padding:e.cellPadding,border_width:e.borderWidth,anchor:e.anchor,subcircuit_id:this.getSubcircuit()?.subcircuit_id||"",schematic_component_id:this.parent?.schematic_component_id||"",schematic_sheet_id:this._resolveSchematicSheetId()});this.schematic_table_id=A.schematic_table_id;const c=new Set;let l=0;for(let u=0;u<n.length;u++){let g=0;for(let h=0;h<i;h++){const d=o[u]?.[h];if(d&&!c.has(d)){c.add(d);const p=d._parsedProps,m=p.rowSpan??1,_=p.colSpan??1;let f=0;for(let C=0;C<_;C++)f+=s[h+C];let I=0;for(let C=0;C<m;C++)I+=r[u+C];t.schematic_table_cell.insert({schematic_table_id:this.schematic_table_id,start_row_index:u,end_row_index:u+m-1,start_column_index:h,end_column_index:h+_-1,text:p.text??p.children,center:{x:a.x+g+f/2,y:a.y-l-I/2},width:f,height:I,horizontal_align:p.horizontalAlign,vertical_align:p.verticalAlign,font_size:p.fontSize??e.fontSize,subcircuit_id:this.getSubcircuit()?.subcircuit_id||""})}s[h]&&(g+=s[h])}l+=r[u]}}},sFo=class extends Ir{isSchematicPrimitive=!0;get config(){return{componentName:"SchematicRow",zodProps:ADn}}},aFo=class extends Ir{isSchematicPrimitive=!0;canHaveTextChildren=!0;get config(){return{componentName:"SchematicCell",zodProps:cDn}}},AFo=class extends Ir{simulation_experiment_id=null;get config(){return{componentName:"AnalogSimulation",zodProps:GPn}}getSpiceEngineName(){return this._parsedProps.spiceEngine}usesIndependentGraphAxes(){return this._parsedProps.graphIndependentAxes===!0}doInitialSimulationRender(){const{db:t}=this.root,{duration:e,name:n,startTime:o,timePerStep:i,spiceOptions:r}=this._parsedProps,s=e||10,a=i||.01,A=t.simulation_experiment.insert({name:n??"spice_transient_analysis",experiment_type:"spice_transient_analysis",end_time_ms:s,start_time_ms:o,time_per_step:a,spice_options:r});this.simulation_experiment_id=A.simulation_experiment_id}},HO=class extends Ir{simulation_experiment_id=null;getSpiceEngineName(){return typeof this.props.spiceEngine=="string"?this.props.spiceEngine:void 0}usesIndependentGraphAxes(){return this.props.graphIndependentAxes===!0}getOrCreateSimulationExperiment(){if(this.simulation_experiment_id)return this.root?.db.simulation_experiment.get(this.simulation_experiment_id)??null;if(this.children.filter(n=>n.componentName==="AnalogSweepParameter").length>1)return this.renderError("An analog simulation can contain at most one sweep parameter."),null;const e=this.insertSimulationExperiment();return this.simulation_experiment_id=e?.simulation_experiment_id??null,e}doInitialSimulationRender(){this.getOrCreateSimulationExperiment()}},cFo=class extends HO{get config(){return{componentName:"AnalogTransientSimulation",zodProps:YPn}}insertSimulationExperiment(){const{db:t}=this.root,{duration:e,name:n,startTime:o,timePerStep:i,spiceOptions:r}=this._parsedProps;return t.simulation_experiment.insert({name:n??"spice_transient_analysis",experiment_type:"spice_transient_analysis",end_time_ms:e,start_time_ms:o,time_per_step:i,spice_options:r})}},lFo=class extends HO{get config(){return{componentName:"AnalogDcOperatingPointSimulation",zodProps:UPn}}insertSimulationExperiment(){const{name:t,spiceOptions:e}=this._parsedProps;return this.root.db.simulation_experiment.insert({name:t??"spice_dc_operating_point",experiment_type:"spice_dc_operating_point",spice_options:e})}},uFo=class extends HO{get config(){return{componentName:"AnalogDcSweepSimulation",zodProps:KPn}}insertSimulationExperiment(){const{name:t,spiceOptions:e,sweepSource:n,sweepStart:o,sweepStop:i,sweepStep:r}=this._parsedProps,a=(this.getGroup()??this.getSubcircuit())?.selectOne(n);let A;if(a instanceof Fkt){a.runRenderPhase("SimulationRender");const c=a.simulation_voltage_source_id;if(!c)return this.renderError(`DC sweep source "${n}" must resolve to one voltage or current source.`),null;A={dc_sweep_voltage_source_id:c,dc_sweep_unit:"V"}}else if(a instanceof Lkt){a.runRenderPhase("SimulationRender");const c=a.simulation_current_source_id;if(!c)return this.renderError(`DC sweep source "${n}" must resolve to one voltage or current source.`),null;A={dc_sweep_current_source_id:c,dc_sweep_unit:"A"}}else return this.renderError(`DC sweep source "${n}" must resolve to one voltage or current source.`),null;return this.root.db.simulation_experiment.insert({name:t??"spice_dc_sweep",experiment_type:"spice_dc_sweep",spice_options:e,...A,dc_sweep_start:o,dc_sweep_stop:i,dc_sweep_step:r})}},gFo=class extends HO{get config(){return{componentName:"AnalogAcSweepSimulation",zodProps:VPn}}insertSimulationExperiment(){const{name:t,spiceOptions:e,sweepType:n,samplesPerInterval:o,sampleCount:i,startFrequency:r,stopFrequency:s}=this._parsedProps;return this.root.db.simulation_experiment.insert({name:t??"spice_ac_analysis",experiment_type:"spice_ac_analysis",spice_options:e,ac_sweep_type:n,ac_samples_per_interval:o,ac_sample_count:i,ac_start_frequency_hz:r,ac_stop_frequency_hz:s})}},dFo={resistance:"Ω",capacitance:"F",inductance:"H",voltage:"V",current:"A"},hFo=({parameterSweepCoordinate:t,stop:e,step:n})=>{const o=Math.abs(n)*1e-9;return n>0?t<=e+o:t>=e-o},pFo=({start:t,stop:e,step:n})=>{const o=[];for(let i=t;hFo({parameterSweepCoordinate:i,stop:e,step:n});i=t+o.length*n)if(o.push(i),o.length>1e6)throw new Error("Parameter sweep exceeds 1,000,000 points");return o},mFo=t=>t.parameterType==="resistance"?t.resistorRef:t.parameterType==="capacitance"?t.capacitorRef:t.parameterType==="inductance"?t.inductorRef:t.parameterType==="voltage"?t.net:t.currentSourceRef,_Fo=t=>{if(!(t.parent instanceof HO)){t.renderError("analog.sweepparameter must be nested directly in an analog simulation.");return}const e=t.parent.getOrCreateSimulationExperiment();if(!e)return;const n=t._parsedProps,o=n.values??pFo({start:n.start,stop:n.stop,step:n.step}),i=t.parent.getGroup()??t.parent.getSubcircuit(),r=mFo(n),s=dFo[n.parameterType],a=t.root.db.simulation_parameter_sweep,A={simulation_experiment_id:e.simulation_experiment_id,name:n.name,parameter_type:n.parameterType,parameter_values:o,parameter_unit:s};let c;if(n.parameterType==="voltage"){const l=i?.selectOne(r,{type:"net"});if(!l?.source_net_id){t.renderError(`Voltage sweep net "${r}" could not be resolved.`);return}c=a.insert({...A,parameter_type:"voltage",source_net_id:l.source_net_id}).simulation_parameter_sweep_id}else{const u=i?.selectOne(r)?.source_component_id;if(!u){t.renderError(`Parameter sweep target "${r}" could not be resolved.`);return}n.parameterType==="resistance"?c=a.insert({...A,parameter_type:"resistance",resistor_source_component_id:u}).simulation_parameter_sweep_id:n.parameterType==="capacitance"?c=a.insert({...A,parameter_type:"capacitance",capacitor_source_component_id:u}).simulation_parameter_sweep_id:n.parameterType==="inductance"?c=a.insert({...A,parameter_type:"inductance",inductor_source_component_id:u}).simulation_parameter_sweep_id:c=a.insert({...A,parameter_type:"current",current_source_component_id:u}).simulation_parameter_sweep_id}t.simulation_parameter_sweep_id=c},fFo=class extends Ir{simulation_parameter_sweep_id=null;get config(){return{componentName:"AnalogSweepParameter",zodProps:oMn}}doInitialSimulationRender(){_Fo(this)}};function IFo(t,e,n,o=.3){const r=Math.max(e.length*.1,.3),a=.25+.2;let A=t.x,c=t.y;const l=o+r/2;n.includes("top")?c+=l:n.includes("bottom")&&(c-=l),n.includes("right")?A+=l:n.includes("left")&&(A-=l);let u,g,h,d;return n.includes("left")?(u=A,g=A+r):n.includes("right")?(u=A-r,g=A):(u=A-r/2,g=A+r/2),n.includes("top")?(h=c-a,d=c):n.includes("bottom")?(h=c,d=c+a):(h=c-a/2,d=c+a/2),{minX:u,maxX:g,minY:h,maxY:d}}function CFo(t){let e,n,o,i;if(t.type==="schematic_component")e=t.center?.x,n=t.center?.y,o=t.size?.width,i=t.size?.height;else if(t.type==="schematic_text")e=t.position?.x,n=t.position?.y,o=(t.text?.length??0)*.1,i=.2;else return null;return typeof e=="number"&&typeof n=="number"&&typeof o=="number"&&typeof i=="number"?{minX:e-o/2,maxX:e+o/2,minY:n-i/2,maxY:n+i/2}:null}function yFo(t,e){if(!z4(t,e))return 0;const n=Math.min(t.maxX,e.maxX)-Math.max(t.minX,e.minX),o=Math.min(t.maxY,e.maxY)-Math.max(t.minY,e.minY);return n*o}function xFo({probePosition:t,labelText:e,schematicElements:n,defaultAlignment:o="top_right"}){const r=[o,...["top_right","top_left","bottom_right","bottom_left","top_center","bottom_center","center_right","center_left"].filter(A=>A!==o)];let s=o,a=1/0;for(const A of r){const c=IFo(t,e,A);let l=0;for(const u of n){const g=CFo(u);g&&(l+=yFo(c,g))}if(l===0)return A;l<a&&(a=l,s=A)}return s}var EFo=class extends Ir{simulation_voltage_probe_id=null;schematic_voltage_probe_id=null;finalProbeName=null;color=null;get config(){return{componentName:"VoltageProbe",zodProps:JMn}}doInitialSimulationRender(){const{db:t}=this.root,{connectsTo:e,name:n,referenceTo:o,color:i,graphDisplayName:r,graphCenter:s,graphVerticalOffset:a,graphVoltagePerDiv:A}=this._parsedProps,c=this.getSubcircuit();if(!c){this.renderError("VoltageProbe must be inside a subcircuit");return}const l=Array.isArray(e)?e:[e];if(l.length!==1){this.renderError("VoltageProbe must connect to exactly one port or net");return}const u=l[0],g=c.selectOne(u,{type:"port"}),h=g?null:c.selectOne(u,{type:"net"});if(h&&h.componentName!=="Net"){this.renderError(`VoltageProbe connection target "${u}" resolved to a non-net component "${h.componentName}".`);return}if(!g&&!h){this.renderError(`VoltageProbe could not find connection target "${u}"`);return}const d=g?.source_port_id??h?.source_net_id;if(!d){this.renderError("Could not identify connected source for VoltageProbe");return}let p=null,m=null;if(o){const C=Array.isArray(o)?o:[o];if(C.length!==1){this.renderError("VoltageProbe must reference exactly one port or net");return}const y=C[0];if(p=c.selectOne(y,{type:"port"}),m=p?null:c.selectOne(y,{type:"net"}),m&&m.componentName!=="Net"){this.renderError(`VoltageProbe reference target "${y}" resolved to a non-net component "${m.componentName}".`);return}if(!p&&!m){this.renderError(`VoltageProbe could not find reference target "${y}"`);return}}this.color=i??jDo(d);let _=n;_||(_=l[0].split(" > ").map(C=>C.replace(/^\./,"")).join(".")),this.finalProbeName=_??null;const{simulation_voltage_probe_id:f}=t.simulation_voltage_probe.insert({name:_,signal_input_source_port_id:g?.source_port_id??void 0,signal_input_source_net_id:h?.source_net_id??void 0,reference_input_source_port_id:p?.source_port_id??void 0,reference_input_source_net_id:m?.source_net_id??void 0,subcircuit_id:c.subcircuit_id||void 0,color:this.color});if(this.simulation_voltage_probe_id=f,r!==void 0||s!==void 0||a!==void 0||A!==void 0){const C=Sw(A),y=Sw(a);t.simulation_oscilloscope_trace.insert({simulation_voltage_probe_id:f,display_name:r,color:i??void 0,display_center_value:s,volts_per_div:C,display_center_offset_divs:y!==void 0&&C!==void 0&&C!==0?y/C:void 0})}}doInitialSchematicReplaceNetLabelsWithSymbols(){if(this.root?.schematicDisabled)return;const{db:t}=this.root,{connectsTo:e,name:n}=this._parsedProps,o=this.getSubcircuit();if(!o)return;const i=Array.isArray(e)?e:[e];if(i.length!==1)return;const r=i[0],s=o.selectOne(r,{type:"port"});if(!s||!s.schematic_port_id)return;const a=s._getGlobalSchematicPositionAfterLayout();let A=null;for(const g of t.schematic_trace.list()){for(const h of g.edges)if(Math.abs(h.from.x-a.x)<1e-6&&Math.abs(h.from.y-a.y)<1e-6||Math.abs(h.to.x-a.x)<1e-6&&Math.abs(h.to.y-a.y)<1e-6){A=g.schematic_trace_id;break}if(A)break}if(!A)return;const c=this.finalProbeName,l=xFo({probePosition:a,labelText:c,schematicElements:[...t.schematic_component.list(),...t.schematic_text.list()],defaultAlignment:"top_right"}),u=t.schematic_voltage_probe.insert({name:c,position:a,schematic_trace_id:A,subcircuit_id:o.subcircuit_id||void 0,color:this.color??void 0,label_alignment:l});this.schematic_voltage_probe_id=u.schematic_voltage_probe_id}},BFo=class extends Ir{get config(){return{componentName:"SpiceModel",zodProps:rMn}}doInitialSimulationRender(){if(this.getInheritedProperty("analogSimulationDisabled"))return;const t=this.parent;if(!t)return;const e=t.source_component_id;if(!e){this._insertSpiceModelError("spicemodel must be attached to a source component.",this._parsedProps);return}const{source:n,spicePinMapping:o}=this._parsedProps,i=W5o(n).subckts[0]??null,r=i?.pins.map(c=>c.name);if(!i||!r||r.length===0){this._insertSpiceModelError("spicemodel source must contain a .subckt declaration with a model name and pins.",n);return}const s=o??{};for(const c of Object.keys(s))if(!r.includes(c)){this._insertSpiceModelError(`spicePinMapping references SPICE pin "${c}", but it is not present in .subckt ${i.name}.`,s);return}const a={},A=new Set;for(const c of r){const l=s[c]??c,u=t.selectAll("port").filter(h=>h instanceof Pu&&h.isMatchingAnyOf([l]));if(u.length!==1||!u[0].source_port_id){this._insertSpiceModelError(`Could not resolve SPICE pin "${c}" to exactly one component port using "${l}".`,s);return}const g=u[0].source_port_id;if(A.has(g)){this._insertSpiceModelError(`spicePinMapping maps more than one SPICE pin to component port "${l}".`,s);return}A.add(g),a[c]=g}this.root.db.simulation_spice_subcircuit.insert({source_component_id:e,spice_pin_to_source_port_map:a,subcircuit_source:n})}_insertSpiceModelError(t,e){this.root.db.source_invalid_component_property_error.insert({source_component_id:this.parent?.source_component_id||"",property_name:"spiceModel",property_value:e,message:t,error_type:"source_invalid_component_property_error"})}},bFo=class extends Ikt{isRootCircuit=!0;constructor({platform:t,projectUrl:e}={}){super({platform:t,projectUrl:e,cachedSubcircuits:new Map,pendingSubcircuitRenders:new Map}),this.root=this}},SFo=bFo;new Proxy(t=>new Proxy({},{get:(e,n)=>`.${t} > .${n}`}),{get:(t,e)=>{const n=(...o)=>(o[0],new Proxy({},{get:(i,r)=>`.${e} > .${r}`}));return new Proxy(n,{get:(o,i)=>e==="net"?`net.${i}`:e==="subcircuit"?new Proxy({},{get:(r,s)=>new Proxy({},{get:(a,A)=>`subcircuit.${i} > .${s} > .${A}`})}):`.${e} > .${i}`,apply:(o,i,r)=>e==="net"?new Proxy({},{get:(s,a)=>`net.${a}`}):new Proxy({},{get:(s,a)=>{const A=`.${e} > .${a}`;return["U","J","CN"].some(l=>e.startsWith(l))?A:new Proxy(new String(A),{get:(l,u)=>typeof u=="symbol"||u==="toString"?()=>A:`.${e} > .${a} > .${u}`})}})})}}),NMt(qPt),NMt({"assembly.device":qkt,Bug:zj,"enclosure.cutoutaperture":WMe,"enclosure.fdm.box":Zkt,Fanout:JMe,FanoutPoint:dR});const nFt=vc("run-frame"),QFo={},oFt=t=>{let e;const n=new Set,o=(l,u)=>{const g=typeof l=="function"?l(e):l;if(!Object.is(g,e)){const h=e;e=u??(typeof g!="object"||g===null)?g:Object.assign({},e,g),n.forEach(d=>d(e,h))}},i=()=>e,A={setState:o,getState:i,getInitialState:()=>c,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(QFo?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(o,i,A);return A},iFt=t=>t?oFt(t):oFt;var que={exports:{}},qMe={},Xue={exports:{}},XMe={};var rFt;function vFo(){if(rFt)return XMe;rFt=1;var t=L3();function e(u,g){return u===g&&(u!==0||1/u===1/g)||u!==u&&g!==g}var n=typeof Object.is=="function"?Object.is:e,o=t.useState,i=t.useEffect,r=t.useLayoutEffect,s=t.useDebugValue;function a(u,g){var h=g(),d=o({inst:{value:h,getSnapshot:g}}),p=d[0].inst,m=d[1];return r(function(){p.value=h,p.getSnapshot=g,A(p)&&m({inst:p})},[u,h,g]),i(function(){return A(p)&&m({inst:p}),u(function(){A(p)&&m({inst:p})})},[u]),s(h),h}function A(u){var g=u.getSnapshot;u=u.value;try{var h=g();return!n(u,h)}catch{return!0}}function c(u,g){return g()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return XMe.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:l,XMe}var ZMe={},sFt;function wFo(){if(sFt)return ZMe;sFt=1;var t={env:{}};return t.env.NODE_ENV!=="production"&&(function(){function e(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}function n(d,p){u||r.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=p();if(!g){var _=p();s(m,_)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),g=!0)}_=a({inst:{value:m,getSnapshot:p}});var f=_[0].inst,I=_[1];return c(function(){f.value=m,f.getSnapshot=p,o(f)&&I({inst:f})},[d,m,p]),A(function(){return o(f)&&I({inst:f}),d(function(){o(f)&&I({inst:f})})},[d]),l(m),m}function o(d){var p=d.getSnapshot;d=d.value;try{var m=p();return!s(d,m)}catch{return!0}}function i(d,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=L3(),s=typeof Object.is=="function"?Object.is:e,a=r.useState,A=r.useEffect,c=r.useLayoutEffect,l=r.useDebugValue,u=!1,g=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:n;ZMe.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),ZMe}var aFt;function AFt(){if(aFt)return Xue.exports;aFt=1;var t={env:{}};return t.env.NODE_ENV==="production"?Xue.exports=vFo():Xue.exports=wFo(),Xue.exports}var cFt;function PFo(){if(cFt)return qMe;cFt=1;var t=L3(),e=AFt();function n(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var o=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,r=t.useRef,s=t.useEffect,a=t.useMemo,A=t.useDebugValue;return qMe.useSyncExternalStoreWithSelector=function(c,l,u,g,h){var d=r(null);if(d.current===null){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=a(function(){function _(x){if(!f){if(f=!0,I=x,x=g(x),h!==void 0&&p.hasValue){var E=p.value;if(h(E,x))return C=E}return C=x}if(E=C,o(I,x))return E;var B=g(x);return h!==void 0&&h(E,B)?(I=x,E):(I=x,C=B)}var f=!1,I,C,y=u===void 0?null:u;return[function(){return _(l())},y===null?void 0:function(){return _(y())}]},[l,u,g,h]);var m=i(c,d[0],d[1]);return s(function(){p.hasValue=!0,p.value=m},[m]),A(m),m},qMe}var eDe={},lFt;function MFo(){if(lFt)return eDe;lFt=1;var t={env:{}};return t.env.NODE_ENV!=="production"&&(function(){function e(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=L3(),o=AFt(),i=typeof Object.is=="function"?Object.is:e,r=o.useSyncExternalStore,s=n.useRef,a=n.useEffect,A=n.useMemo,c=n.useDebugValue;eDe.useSyncExternalStoreWithSelector=function(l,u,g,h,d){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=A(function(){function f(E){if(!I){if(I=!0,C=E,E=h(E),d!==void 0&&m.hasValue){var B=m.value;if(d(B,E))return y=B}return y=E}if(B=y,i(C,E))return B;var S=h(E);return d!==void 0&&d(B,S)?(C=E,B):(C=E,y=S)}var I=!1,C,y,x=g===void 0?null:g;return[function(){return f(u())},x===null?void 0:function(){return f(x())}]},[u,g,h,d]);var _=r(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.value=_},[_]),c(_),_},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),eDe}var uFt;function DFo(){if(uFt)return que.exports;uFt=1;var t={env:{}};return t.env.NODE_ENV==="production"?que.exports=PFo():que.exports=MFo(),que.exports}var NFo=DFo();const RFo=_y(NFo),gFt={},{useDebugValue:TFo}=Fs,{useSyncExternalStoreWithSelector:kFo}=RFo;let dFt=!1;const FFo=t=>t;function hFt(t,e=FFo,n){(gFt?"production":void 0)!=="production"&&n&&!dFt&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),dFt=!0);const o=kFo(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return TFo(o),o}const LFo=t=>{(gFt?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?iFt(t):t,n=(o,i)=>hFt(e,o,i);return Object.assign(n,e),n},pFt=t=>LFo,tDe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},nDe=new Map,Zue=t=>{const e=nDe.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,o])=>[n,o.getState()])):{}},HFo=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const o=nDe.get(n.name);if(o)return{type:"tracked",store:t,...o};const i={connection:e.connect(n),stores:{}};return nDe.set(n.name,i),{type:"tracked",store:t,...i}},mFt=(t,e={})=>(n,o,i)=>{const{enabled:r,anonymousActionType:s,store:a,...A}=e;let c;try{c=(r??(tDe?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(tDe?"production":void 0)!=="production"&&r&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,o,i);const{connection:l,...u}=HFo(a,c,A);let g=!0;i.setState=(p,m,_)=>{const f=n(p,m);if(!g)return f;const I=_===void 0?{type:s||"anonymous"}:typeof _=="string"?{type:_}:_;return a===void 0?(l?.send(I,o()),f):(l?.send({...I,type:`${a}/${I.type}`},{...Zue(A.name),[a]:i.getState()}),f)};const h=(...p)=>{const m=g;g=!1,n(...p),g=m},d=t(i.setState,o,i);if(u.type==="untracked"?l?.init(d):(u.stores[u.store]=i,l?.init(Object.fromEntries(Object.entries(u.stores).map(([p,m])=>[p,p===u.store?d:m.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let p=!1;const m=i.dispatch;i.dispatch=(..._)=>{(tDe?"production":void 0)!=="production"&&_[0].type==="__setState"&&!p&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),p=!0),m(..._)}}return l.subscribe(p=>{var m;switch(p.type){case"ACTION":if(typeof p.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return oDe(p.payload,_=>{if(_.type==="__setState"){if(a===void 0){h(_.state);return}Object.keys(_.state).length!==1&&console.error(`
                    [zustand devtools middleware] Unsupported __setState action format. 
                    When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
                    `);const f=_.state[a];if(f==null)return;JSON.stringify(i.getState())!==JSON.stringify(f)&&h(f);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(p.payload.type){case"RESET":return h(d),a===void 0?l?.init(i.getState()):l?.init(Zue(A.name));case"COMMIT":if(a===void 0){l?.init(i.getState());return}return l?.init(Zue(A.name));case"ROLLBACK":return oDe(p.state,_=>{if(a===void 0){h(_),l?.init(i.getState());return}h(_[a]),l?.init(Zue(A.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return oDe(p.state,_=>{if(a===void 0){h(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[a])&&h(_[a])});case"IMPORT_STATE":{const{nextLiftedState:_}=p.payload,f=(m=_.computedStates.slice(-1)[0])==null?void 0:m.state;if(!f)return;h(a===void 0?f:f[a]),l?.send(null,_);return}case"PAUSE_RECORDING":return g=!g}return}}),d},oDe=(t,e)=>{let n;try{n=JSON.parse(t)}catch(o){console.error("[zustand devtools middleware] Could not parse the received json",o)}n!==void 0&&e(n)},QC=window.TSCIRCUIT_FILESERVER_API_BASE_URL??"/api",OFo=[".tsx",".ts",".jsx",".js",".mjs",".json",".kicad_pcb",".kicad_sym",".kicad_sch",".kicad_prl",".kicad_pro"],iDe=t=>OFo.some(e=>t.endsWith(e)),b$=nFt.extend("store");async function _Ft(t,e){return(await(await fetch(`${QC}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:t,text_content:e})})).json()).file}async function rDe(t){return(await(await fetch(`${QC}/files/get?file_path=${encodeURIComponent(t)}`)).json()).file}async function GFo(t){const e=t?`${QC}/events/list?since=${encodeURIComponent(t)}`:`${QC}/events/list`;return(await(await fetch(e)).json()).event_list}async function YFo(){const t=await fetch(`${QC}/files/list`),{file_list:e}=await t.json(),n=new Map;for(const o of e){if(iDe(o.file_path)){const i=await rDe(o.file_path);n.set(o.file_path,i.text_content);continue}n.set(o.file_path,"__STATIC_ASSET__")}return n}const UFo=["manual-edits.json","manual_edits.json"],md=pFt()(mFt((t,e)=>({fsMap:new Map,lastEventTime:new Date().toISOString(),isPolling:!1,error:null,circuitJson:null,lastManualEditsChangeSentAt:0,recentEvents:[],simulateScenarioOrder:void 0,currentMainComponentPath:null,recentlySavedFiles:[],loadInitialFiles:async()=>{const n=await YFo();b$("loaded initial files",{fsMap:n}),t({fsMap:n})},upsertFile:async(n,o)=>{try{const i=await _Ft(n,o);t(r=>({fsMap:new Map(r.fsMap).set(i.file_path,i.text_content)}))}catch(i){t({error:i})}},getFile:async n=>{try{const o=await rDe(n);t(i=>({fsMap:new Map(i.fsMap).set(o.file_path,o.text_content)}))}catch(o){t({error:o})}},setCircuitJson:n=>{n!==e().circuitJson&&t({circuitJson:n})},addRecentlySavedFile:n=>{t(o=>{if(UFo.includes(n)||!iDe(n))return o;const i=o.recentlySavedFiles.filter(r=>r!==n);return{recentlySavedFiles:[n,...i].slice(0,10)}})},startPolling:()=>{const n=async()=>{const o=e();if(o.isPolling){try{const i=await GFo(o.lastEventTime);if(i.length>0){const r=i[i.length-1].created_at;b$("received events",i.map(A=>A.event_type)),t(A=>({recentEvents:[...A.recentEvents,...i].slice(0,100),lastEventTime:r}));let s=0;const a=new Map(o.fsMap);for(const A of i)if(A.event_type==="FILE_UPDATED"){s++;const c=await rDe(A.file_path);if(A.file_path==="manual_edits.json"&&Date.now()-o.lastManualEditsChangeSentAt<1e3)continue;iDe(c.file_path)?a.set(c.file_path,c.text_content??""):a.set(c.file_path,"__STATIC_ASSET__"),e().addRecentlySavedFile(A.file_path)}else A.event_type==="FILE_DELETED"&&(s++,a.delete(A.file_path));s>0&&(b$("updating fsMap, fsUpdateCount:",s),t({fsMap:a}))}}catch(i){t({error:i})}setTimeout(n,1e3)}};t({isPolling:!0}),n()},stopPolling:()=>{t({isPolling:!1})},pushEvent:async n=>{await fetch(`${QC}/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},applyEditEventsAndUpdateManualEditsJson:async n=>{b$("applyEditEventsAndUpdateManualEditsJson",{editEvents:n});const o=e();if(!o.circuitJson)return;const i=o.fsMap.get("manual-edits.json"),r=i?JSON.parse(i):{},s=VRt({circuitJson:o.circuitJson,editEvents:n,manualEditsFile:r});b$("updatedManualEditsFileContent",s),t(a=>({lastManualEditsChangeSentAt:Date.now(),fsMap:new Map(a.fsMap).set("manual-edits.json",JSON.stringify(s))})),await _Ft("manual-edits.json",JSON.stringify(s,null,2))},setSimulateScenarioOrder:n=>t({simulateScenarioOrder:n}),setCurrentMainComponentPath:n=>t({currentMainComponentPath:n})}),{name:"run-frame-store"})),KFo=nFt.extend("useEditEventController"),VFo=()=>{const t=md(h=>h.applyEditEventsAndUpdateManualEditsJson),[e,n]=ee.useState([]),[o,i]=ee.useState(!1),r=e.filter(h=>!h._applied),s=e.filter(h=>h._applied),a=o?e:r,A=ee.useCallback(h=>{n(d=>[...d,{...h,_applied:!1}])},[]),c=ee.useCallback(h=>{n(d=>d.map(p=>p===h?{...p,_applied:!0}:p))},[]),l=ee.useCallback(()=>{n(h=>h.map(d=>({...d,_applied:!0})))},[]),u=ee.useCallback(()=>{i(!0),e.length!==0&&(KFo("removing edit events that are applied"),n(h=>h.filter(d=>!d._applied)))},[e]),g=ee.useCallback(()=>{i(!1)},[]);return ee.useEffect(()=>{if(e.filter(d=>!d._applied).length===0)return;const h=setTimeout(()=>{l(),t(e)},1e3);return()=>clearTimeout(h)},[e]),{unappliedEditEvents:r,appliedEditEvents:s,editEventsForRender:a,pushEditEvent:A,markEditEventApplied:c,markRenderStarted:u,markRenderComplete:g,markAllEditEventsApplied:l}},sDe=vc("run-frame:useHasReceivedInitialFilesLoaded"),zFo=()=>{const[t,e]=ee.useState(!1),n=md(i=>i.recentEvents),o=md(i=>i.loadInitialFiles);return ee.useEffect(()=>{(async()=>{await o();try{const r=await fetch(`${QC}/events/list?event_type=INITIAL_FILES_UPLOADED`);if(r.ok){const{event_list:s}=await r.json();if(s.length>0){sDe("INITIAL_FILES_UPLOADED found in history. Assuming ready."),e(!0);return}}}catch(r){console.error("Failed to check for event history",r)}sDe("No INITIAL_FILES_UPLOADED in history, waiting for polling.")})()},[o]),ee.useEffect(()=>{t||n.some(i=>i.event_type==="INITIAL_FILES_UPLOADED")&&(sDe("INITIAL_FILES_UPLOADED received via polling. Assuming ready."),e(!0))},[n,t]),t};function OO(t,e,n){const[o,i]=ee.useState(()=>{if(n!==void 0)return n;try{const r=window.localStorage.getItem(t);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return ee.useEffect(()=>{try{window.localStorage.setItem(t,JSON.stringify(o))}catch(r){console.error("Error writing to localStorage:",r)}},[t,o]),[o,i]}var JFo=Object.defineProperty,GO=(t,e)=>JFo(t,"name",{value:e,configurable:!0}),fFt=!!(typeof window<"u"&&window.document&&window.document.createElement);function ar(t,e,{checkForDefaultPrevented:n=!0}={}){return GO(function(i){if(t?.(i),n===!1||!i||!i.defaultPrevented)return e?.(i)},"handleEvent")}GO(ar,"composeEventHandlers");function WFo(t){if(!fFt)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}GO(WFo,"getOwnerWindow");function aDe(t){if(!fFt)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}GO(aDe,"getOwnerDocument");function IFt(t,e=!1){const{activeElement:n}=aDe(t);if(!n?.nodeName)return null;if(CFt(n)&&n.contentDocument)return IFt(n.contentDocument.body,e);if(e){const o=n.getAttribute("aria-activedescendant");if(o){const i=aDe(n).getElementById(o);if(i)return i}}return n}GO(IFt,"getActiveElement");function CFt(t){return t.tagName==="IFRAME"}GO(CFt,"isFrame");var jFo=Object.defineProperty,s4=(t,e)=>jFo(t,"name",{value:e,configurable:!0});function $Fo(t,e){const n=ee.createContext(e);n.displayName=t+"Context";const o=s4(r=>{const{children:s,...a}=r,A=ee.useMemo(()=>a,Object.values(a));return K.jsx(n.Provider,{value:A,children:s})},"Provider");o.displayName=t+"Provider";function i(r,s={}){const{optional:a=!1}=s,A=ee.useContext(n);if(A)return A;if(e!==void 0)return e;if(!a)throw new Error(`\`${r}\` must be used within \`${t}\``)}return s4(i,"useContext"),[o,i]}s4($Fo,"createContext");function Nx(t,e=[]){let n=[];function o(r,s){const a=ee.createContext(s);a.displayName=r+"Context";const A=n.length;n=[...n,s];const c=s4(u=>{const{scope:g,children:h,...d}=u,p=g?.[t]?.[A]||a,m=ee.useMemo(()=>d,Object.values(d));return K.jsx(p.Provider,{value:m,children:h})},"Provider");c.displayName=r+"Provider";function l(u,g,h={}){const{optional:d=!1}=h,p=g?.[t]?.[A]||a,m=ee.useContext(p);if(m)return m;if(s!==void 0)return s;if(!d)throw new Error(`\`${u}\` must be used within \`${r}\``)}return s4(l,"useContext"),[c,l]}s4(o,"createContext");const i=s4(()=>{const r=n.map(s=>ee.createContext(s));return s4(function(a){const A=a?.[t]||r;return ee.useMemo(()=>({[`__scope${t}`]:{...a,[t]:A}}),[a,A])},"useScope")},"createScope");return i.scopeName=t,[o,yFt(i,...e)]}s4(Nx,"createContextScope");function yFt(...t){const e=t[0];if(t.length===1)return e;const n=s4(()=>{const o=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return s4(function(r){const s=o.reduce((a,{useScope:A,scopeName:c})=>{const u=A(r)[`__scope${c}`];return{...a,...u}},{});return ee.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}s4(yFt,"composeContextScopes");var qFo=Object.defineProperty,ADe=(t,e)=>qFo(t,"name",{value:e,configurable:!0});function cDe(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}ADe(cDe,"setRef");function _R(...t){return e=>{let n=!1;const o=t.map(i=>{const r=cDe(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<o.length;i++){const r=o[i];typeof r=="function"?r():cDe(t[i],null)}}}}ADe(_R,"composeRefs");function $A(...t){return ee.useCallback(_R(...t),t)}ADe($A,"useComposedRefs");var XFo=Object.defineProperty,PB=(t,e)=>XFo(t,"name",{value:e,configurable:!0});function MB(t){const e=ee.forwardRef((n,o)=>{let{children:i,...r}=n,s=null,a=!1;const A=[];lDe(i)&&typeof ege=="function"&&(i=ege(i._payload)),ee.Children.forEach(i,g=>{if(SFt(g)){a=!0;const h=g;let d="child"in h.props?h.props.child:h.props.children;lDe(d)&&typeof ege=="function"&&(d=ege(d._payload)),s=eLo(h,d),A.push(s?.props?.children)}else A.push(g)}),s?s=ee.cloneElement(s,void 0,A):!a&&ee.Children.count(i)===1&&ee.isValidElement(i)&&(s=i);const c=s?bFt(s):void 0,l=$A(o,c);if(!s){if(i||i===0)throw new Error(a?oLo(t):nLo(t));return i}const u=BFt(r,s.props??{});return s.type!==ee.Fragment&&(u.ref=o?l:c),ee.cloneElement(s,u)});return e.displayName=`${t}.Slot`,e}PB(MB,"createSlot");var ZFo=MB("Slot"),xFt=Symbol.for("radix.slottable");function EFt(t){const e=PB(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=xFt,e}PB(EFt,"createSlottable");var eLo=PB((t,e)=>{if("child"in t.props){const n=t.props.child;return ee.isValidElement(n)?ee.cloneElement(n,void 0,t.props.children(n.props.children)):null}return ee.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function BFt(t,e){const n={...e};for(const o in e){const i=t[o],r=e[o];/^on[A-Z]/.test(o)?i&&r?n[o]=(...a)=>{const A=r(...a);return i(...a),A}:i&&(n[o]=i):o==="style"?n[o]={...i,...r}:o==="className"&&(n[o]=[i,r].filter(Boolean).join(" "))}return{...t,...n}}PB(BFt,"mergeProps");function bFt(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}PB(bFt,"getElementRef");function SFt(t){return ee.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===xFt}PB(SFt,"isSlottable");var tLo=Symbol.for("react.lazy");function lDe(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===tLo&&"_payload"in t&&QFt(t._payload)}PB(lDe,"isLazyComponent");function QFt(t){return typeof t=="object"&&t!==null&&"then"in t}PB(QFt,"isPromiseLike");var nLo=PB(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),oLo=PB(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ege=Q5[" use ".trim().toString()],iLo=Object.defineProperty,o1=(t,e)=>iLo(t,"name",{value:e,configurable:!0});function tge(t){const e=t+"CollectionProvider",[n,o]=Nx(e),[i,r]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=o1(p=>{const{scope:m,children:_}=p,f=ee.useRef(null),I=ee.useRef(new Map).current;return K.jsx(i,{scope:m,itemMap:I,collectionRef:f,children:_})},"CollectionProvider");s.displayName=e;const a=t+"CollectionSlot",A=MB(a),c=ee.forwardRef((p,m)=>{const{scope:_,children:f}=p,I=r(a,_),C=$A(m,I.collectionRef);return K.jsx(A,{ref:C,children:f})});c.displayName=a;const l=t+"CollectionItemSlot",u="data-radix-collection-item",g=MB(l),h=ee.forwardRef((p,m)=>{const{scope:_,children:f,...I}=p,C=ee.useRef(null),y=$A(m,C),x=r(l,_);return ee.useEffect(()=>(x.itemMap.set(C,{ref:C,...I}),()=>{x.itemMap.delete(C)})),K.jsx(g,{[u]:"",ref:y,children:f})});h.displayName=l;function d(p){const m=r(t+"CollectionConsumer",p);return ee.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const I=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((x,E)=>I.indexOf(x.ref.current)-I.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return o1(d,"useCollection"),[{Provider:s,Slot:c,ItemSlot:h},d,o]}o1(tge,"createCollection");var vFt=new WeakMap,uDe=(YE=class extends Map{constructor(n){super(n);uit(this,h_);Yte(this,h_,[...super.keys()]),vFt.set(this,!0)}set(n,o){return vFt.get(this)&&(this.has(n)?w0(this,h_)[w0(this,h_).indexOf(n)]=n:w0(this,h_).push(n)),super.set(n,o),this}insert(n,o,i){const r=this.has(o),s=w0(this,h_).length,a=gDe(n);let A=a>=0?a:s+a;const c=A<0||A>=s?-1:A;if(c===this.size||r&&c===this.size-1||c===-1)return this.set(o,i),this;const l=this.size+(r?0:1);a<0&&A++;const u=[...w0(this,h_)];let g,h=!1;for(let d=A;d<l;d++)if(A===d){let p=u[d];u[d]===o&&(p=u[d+1]),r&&this.delete(o),g=this.get(p),this.set(o,i)}else{!h&&u[d-1]===o&&(h=!0);const p=u[h?d:d-1],m=g;g=this.get(p),this.delete(p),this.set(p,m)}return this}with(n,o,i){const r=new YE(this);return r.insert(n,o,i),r}before(n){const o=w0(this,h_).indexOf(n)-1;if(!(o<0))return this.entryAt(o)}setBefore(n,o,i){const r=w0(this,h_).indexOf(n);return r===-1?this:this.insert(r,o,i)}after(n){let o=w0(this,h_).indexOf(n);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(n,o,i){const r=w0(this,h_).indexOf(n);return r===-1?this:this.insert(r+1,o,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Yte(this,h_,[]),super.clear()}delete(n){const o=super.delete(n);return o&&w0(this,h_).splice(w0(this,h_).indexOf(n),1),o}deleteAt(n){const o=this.keyAt(n);return o!==void 0?this.delete(o):!1}at(n){const o=nge(w0(this,h_),n);if(o!==void 0)return this.get(o)}entryAt(n){const o=nge(w0(this,h_),n);if(o!==void 0)return[o,this.get(o)]}indexOf(n){return w0(this,h_).indexOf(n)}keyAt(n){return nge(w0(this,h_),n)}from(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return r;i++}}findIndex(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return i;i++}return-1}filter(n,o){const i=[];let r=0;for(const s of this)Reflect.apply(n,o,[s,r,this])&&i.push(s),r++;return new YE(i)}map(n,o){const i=[];let r=0;for(const s of this)i.push([s[0],Reflect.apply(n,o,[s,r,this])]),r++;return new YE(i)}reduce(...n){const[o,i]=n;let r=0,s=i??this.at(0);for(const a of this)r===0&&n.length===1?s=a:s=Reflect.apply(o,this,[s,a,r,this]),r++;return s}reduceRight(...n){const[o,i]=n;let r=i??this.at(-1);for(let s=this.size-1;s>=0;s--){const a=this.at(s);s===this.size-1&&n.length===1?r=a:r=Reflect.apply(o,this,[r,a,s,this])}return r}toSorted(n){const o=[...this.entries()].sort(n);return new YE(o)}toReversed(){const n=new YE;for(let o=this.size-1;o>=0;o--){const i=this.keyAt(o),r=this.get(i);n.set(i,r)}return n}toSpliced(...n){const o=[...this.entries()];return o.splice(...n),new YE(o)}slice(n,o){const i=new YE;let r=this.size-1;if(n===void 0)return i;n<0&&(n=n+this.size),o!==void 0&&o>0&&(r=o-1);for(let s=n;s<=r;s++){const a=this.keyAt(s),A=this.get(a);i.set(a,A)}return i}every(n,o){let i=0;for(const r of this){if(!Reflect.apply(n,o,[r,i,this]))return!1;i++}return!0}some(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return!0;i++}return!1}},h_=new WeakMap,o1(YE,"OrderedDict"),YE);function nge(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=wFt(t,e);return n===-1?void 0:t[n]}o1(nge,"at");function wFt(t,e){const n=t.length,o=gDe(e),i=o>=0?o:n+o;return i<0||i>=n?-1:i}o1(wFt,"toSafeIndex");function gDe(t){return t!==t||t===0?0:Math.trunc(t)}o1(gDe,"toSafeInteger");function rLo(t){const e=t+"CollectionProvider",[n,o]=Nx(e),[i,r]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new uDe,setItemMap:o1(()=>{},"setItemMap")}),s=o1(({state:I,...C})=>I?K.jsx(A,{...C,state:I}):K.jsx(a,{...C}),"CollectionProvider");s.displayName=e;const a=o1(I=>{const C=m();return K.jsx(A,{...I,state:C})},"CollectionInit");a.displayName=e+"Init";const A=o1(I=>{const{scope:C,children:y,state:x}=I,E=ee.useRef(null),[B,S]=ee.useState(null),Q=$A(E,S),[w,M]=x;return ee.useEffect(()=>{if(!B)return;const k=DFt(()=>{});return k.observe(B,{childList:!0,subtree:!0}),()=>{k.disconnect()}},[B]),K.jsx(i,{scope:C,itemMap:w,setItemMap:M,collectionRef:Q,collectionRefObject:E,collectionElement:B,children:y})},"CollectionProviderImpl");A.displayName=e+"Impl";const c=t+"CollectionSlot",l=MB(c),u=ee.forwardRef((I,C)=>{const{scope:y,children:x}=I,E=r(c,y),B=$A(C,E.collectionRef);return K.jsx(l,{ref:B,children:x})});u.displayName=c;const g=t+"CollectionItemSlot",h="data-radix-collection-item",d=MB(g),p=ee.forwardRef((I,C)=>{const{scope:y,children:x,...E}=I,B=ee.useRef(null),[S,Q]=ee.useState(null),w=$A(C,B,Q),M=r(g,y),{setItemMap:k}=M,R=ee.useRef(E);PFt(R.current,E)||(R.current=E);const F=R.current;return ee.useEffect(()=>{const O=F;return k(U=>S?U.has(S)?U.set(S,{...O,element:S}).toSorted(dDe):(U.set(S,{...O,element:S}),U.toSorted(dDe)):U),()=>{k(U=>!S||!U.has(S)?U:(U.delete(S),new uDe(U)))}},[S,F,k]),K.jsx(d,{[h]:"",ref:w,children:x})});p.displayName=g;function m(){return ee.useState(new uDe)}o1(m,"useInitCollection");function _(I){const{itemMap:C}=r(t+"CollectionConsumer",I);return C}return o1(_,"useCollection"),[{Provider:s,Slot:u,ItemSlot:p},{createCollectionScope:o,useCollection:_,useInitCollection:m}]}o1(rLo,"createCollection");function PFt(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(e,i)||t[i]!==e[i])return!1;return!0}o1(PFt,"shallowEqual");function MFt(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}o1(MFt,"isElementPreceding");function dDe(t,e){return!t[1].element||!e[1].element?0:MFt(t[1].element,e[1].element)?-1:1}o1(dDe,"sortByDocumentPosition");function DFt(t){return new MutationObserver(n=>{for(const o of n)if(o.type==="childList"){t();return}})}o1(DFt,"getChildListObserver");var Ep=globalThis?.document?ee.useLayoutEffect:()=>{},sLo=Object.defineProperty,aLo=(t,e)=>sLo(t,"name",{value:e,configurable:!0}),ALo=Q5[" useId ".trim().toString()]||(()=>{}),cLo=0;function t_(t){const[e,n]=ee.useState(ALo());return Ep(()=>{t||n(o=>o??String(cLo++))},[t]),t||(e?`radix-${e}`:"")}aLo(t_,"useId");var c6=Xye();const NFt=_y(c6);var lLo=Object.defineProperty,uLo=(t,e)=>lLo(t,"name",{value:e,configurable:!0}),gLo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Na=gLo.reduce((t,e)=>{const n=MB(`Primitive.${e}`),o=ee.forwardRef((i,r)=>{const{asChild:s,...a}=i,A=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),K.jsx(A,{...a,ref:r})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function hDe(t,e){t&&c6.flushSync(()=>t.dispatchEvent(e))}uLo(hDe,"dispatchDiscreteCustomEvent");var dLo=Object.defineProperty,hLo=(t,e)=>dLo(t,"name",{value:e,configurable:!0});function lE(t){const e=ee.useRef(t);return ee.useEffect(()=>{e.current=t}),ee.useMemo(()=>((...n)=>e.current?.(...n)),[])}hLo(lE,"useCallbackRef");var pLo=Object.defineProperty,mLo=(t,e)=>pLo(t,"name",{value:e,configurable:!0}),RFt=Q5[" useEffectEvent ".trim().toString()],TFt=Q5[" useInsertionEffect ".trim().toString()];function kFt(t){if(typeof RFt=="function")return RFt(t);const e=ee.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof TFt=="function"?TFt(()=>{e.current=t}):Ep(()=>{e.current=t}),ee.useMemo(()=>((...n)=>e.current?.(...n)),[])}mLo(kFt,"useEffectEvent");var _Lo=Object.defineProperty,S$=(t,e)=>_Lo(t,"name",{value:e,configurable:!0}),fLo=Q5[" useInsertionEffect ".trim().toString()]||Ep;function DB({prop:t,defaultProp:e,onChange:n=S$(()=>{},"onChange"),caller:o}){const[i,r,s]=FFt({defaultProp:e,onChange:n}),a=t!==void 0,A=a?t:i,c=ee.useCallback(l=>{if(a){const u=LFt(l)?l(t):l;u!==t&&s.current?.(u)}else r(l)},[a,t,r,s]);return[A,c]}S$(DB,"useControllableState");function FFt({defaultProp:t,onChange:e}){const[n,o]=ee.useState(t),i=ee.useRef(n),r=ee.useRef(e);return fLo(()=>{r.current=e},[e]),ee.useEffect(()=>{i.current!==n&&(r.current?.(n),i.current=n)},[n,i]),[n,o,r]}S$(FFt,"useUncontrolledState");function LFt(t){return typeof t=="function"}S$(LFt,"isFunction");var HFt=Symbol("RADIX:SYNC_STATE");function ILo(t,e,n,o){const{prop:i,defaultProp:r,onChange:s,caller:a}=e,A=i!==void 0,c=kFt(s),l=[{...n,state:r}];o&&l.push(o);const[u,g]=ee.useReducer((m,_)=>{if(_.type===HFt)return{...m,state:_.state};const f=t(m,_);return A&&!Object.is(f.state,m.state)&&c(f.state),f},...l),h=u.state,d=ee.useRef(h);ee.useEffect(()=>{d.current!==h&&(d.current=h,A||c(h))},[h,d,A]);const p=ee.useMemo(()=>i!==void 0?{...u,state:i}:u,[u,i]);return ee.useEffect(()=>{A&&!Object.is(i,u.state)&&g({type:HFt,state:i})},[i,u.state,A]),[p,g]}S$(ILo,"useControllableStateReducer");var CLo=Object.defineProperty,yLo=(t,e)=>CLo(t,"name",{value:e,configurable:!0}),xLo=ee.createContext(void 0);function Q$(t){const e=ee.useContext(xLo);return t||e||"ltr"}yLo(Q$,"useDirection");var ELo=Object.defineProperty,pDe=(t,e)=>ELo(t,"name",{value:e,configurable:!0}),mDe=!1;function OFt(){const[t,e]=ee.useState(mDe);return ee.useEffect(()=>{mDe||(mDe=!0,e(!0))},[]),t}pDe(OFt,"useIsHydrated");var GFt=Q5[" useSyncExternalStore ".trim().toString()];function YFt(){return()=>{}}pDe(YFt,"subscribe");function UFt(){return GFt(YFt,()=>!0,()=>!1)}pDe(UFt,"useIsHydratedModern");var BLo=typeof GFt=="function"?UFt:OFt,bLo=Object.defineProperty,fR=(t,e)=>bLo(t,"name",{value:e,configurable:!0}),_De="rovingFocusGroup.onEntryFocus",SLo={bubbles:!1,cancelable:!0},oge="RovingFocusGroup",[fDe,KFt,QLo]=tge(oge),[vLo,ige]=Nx(oge,[QLo]),[wLo,PLo]=vLo(oge),MLo=ee.forwardRef(fR(function(e,n){return K.jsx(fDe.Provider,{scope:e.__scopeRovingFocusGroup,children:K.jsx(fDe.Slot,{scope:e.__scopeRovingFocusGroup,children:K.jsx(DLo,{...e,ref:n})})})},"RovingFocusGroup")),DLo=ee.forwardRef(fR(function(e,n){const{__scopeRovingFocusGroup:o,orientation:i,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:A,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...g}=e,h=ee.useRef(null),d=$A(n,h),p=Q$(s),[m,_]=DB({prop:a,defaultProp:A??null,onChange:c,caller:oge}),[f,I]=ee.useState(!1),C=lE(l),y=KFt(o),x=ee.useRef(!1),[E,B]=ee.useState(0);return ee.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(_De,C),()=>S.removeEventListener(_De,C)},[C]),K.jsx(wLo,{scope:o,orientation:i,dir:p,loop:r,currentTabStopId:m,onItemFocus:ee.useCallback(S=>_(S),[_]),onItemShiftTab:ee.useCallback(()=>I(!0),[]),onFocusableItemAdd:ee.useCallback(()=>B(S=>S+1),[]),onFocusableItemRemove:ee.useCallback(()=>B(S=>S-1),[]),children:K.jsx(Na.div,{tabIndex:f||E===0?-1:0,"data-orientation":i,...g,ref:d,style:{outline:"none",...e.style},onMouseDown:ar(e.onMouseDown,()=>{x.current=!0}),onFocus:ar(e.onFocus,S=>{const Q=!x.current;if(S.target===S.currentTarget&&Q&&!f){const w=new CustomEvent(_De,SLo);if(S.currentTarget.dispatchEvent(w),!w.defaultPrevented){const M=y().filter(U=>U.focusable),k=M.find(U=>U.active),R=M.find(U=>U.id===m),O=[k,R,...M].filter(Boolean).map(U=>U.ref.current);IDe(O,u)}}x.current=!1}),onBlur:ar(e.onBlur,()=>I(!1))})})},"RovingFocusGroupImpl")),NLo="RovingFocusGroupItem",RLo=ee.forwardRef(fR(function(e,n){const{__scopeRovingFocusGroup:o,focusable:i=!0,active:r=!1,tabStopId:s,children:a,...A}=e,c=t_(),l=s||c,u=PLo(NLo,o),g=u.currentTabStopId===l,h=KFt(o),{onFocusableItemAdd:d,onFocusableItemRemove:p,currentTabStopId:m}=u,_=BLo();return Ep(()=>{if(!(!_||!i))return d(),()=>p()},[_,i,d,p]),ee.useEffect(()=>{if(!(_||!i))return d(),()=>p()},[_,i,d,p]),K.jsx(fDe.ItemSlot,{scope:o,id:l,focusable:i,active:r,children:K.jsx(Na.span,{tabIndex:g?0:-1,"data-orientation":u.orientation,...A,ref:n,onMouseDown:ar(e.onMouseDown,f=>{i?u.onItemFocus(l):f.preventDefault()}),onFocus:ar(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ar(e.onKeyDown,f=>{if(f.key==="Tab"&&f.shiftKey){u.onItemShiftTab();return}if(f.target!==f.currentTarget)return;const I=zFt(f,u.orientation,u.dir);if(I!==void 0){if(f.metaKey||f.ctrlKey||f.altKey||f.shiftKey)return;f.preventDefault();let y=h().filter(x=>x.focusable).map(x=>x.ref.current);if(I==="last")y.reverse();else if(I==="prev"||I==="next"){I==="prev"&&y.reverse();const x=y.indexOf(f.currentTarget);y=u.loop?JFt(y,x+1):y.slice(x+1)}setTimeout(()=>IDe(y))}}),children:typeof a=="function"?a({isCurrentTabStop:g,hasTabStop:m!=null}):a})})},"RovingFocusGroupItem")),TLo={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VFt(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}fR(VFt,"getDirectionAwareKey");function zFt(t,e,n){const o=VFt(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return TLo[o]}fR(zFt,"getFocusIntent");function IDe(t,e=!1){const n=document.activeElement;for(const o of t)if(o===n||(o.focus({preventScroll:e}),document.activeElement!==n))return}fR(IDe,"focusFirst");function JFt(t,e){return t.map((n,o)=>t[(e+o)%t.length])}fR(JFt,"wrapArray");var WFt=MLo,jFt=RLo,kLo=Object.defineProperty,Lb=(t,e)=>kLo(t,"name",{value:e,configurable:!0});function $Ft(t,e){return ee.useReducer((n,o)=>e[n][o]??n,t)}Lb($Ft,"useStateMachine");var uE=Lb(t=>{const{present:e,children:n}=t,o=qFt(e),i=typeof n=="function"?n({present:o.isPresent}):ee.Children.only(n),r=XFt(o.ref,ZFt(i));return typeof n=="function"||o.isPresent?ee.cloneElement(i,{ref:r}):null},"Presence");function qFt(t){const[e,n]=ee.useState(),o=ee.useRef(null),i=ee.useRef(t),r=ee.useRef("none"),s=ee.useRef(void 0),a=t?"mounted":"unmounted",[A,c]=$Ft(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ee.useEffect(()=>{A==="mounted"?(r.current=s.current??YO(o.current),s.current=void 0):r.current="none"},[A]),Ep(()=>{const l=o.current,u=i.current;if(u!==t){const h=r.current,d=YO(l);t?(s.current=d,c("MOUNT")):d==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),Ep(()=>{if(e){let l;const u=e.ownerDocument.defaultView??window,g=Lb(d=>{const m=YO(o.current).includes(CSS.escape(d.animationName));if(d.target===e&&m&&(c("ANIMATION_END"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=_)})}},"handleAnimationEnd"),h=Lb(d=>{d.target===e&&(r.current=YO(o.current))},"handleAnimationStart");return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(A),ref:ee.useCallback(l=>{if(l){const u=getComputedStyle(l);o.current=u,s.current=YO(u)}else o.current=null;n(l)},[])}}Lb(qFt,"usePresence");function CDe(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Lb(CDe,"setRef");function XFt(...t){const e=ee.useRef(t);return e.current=t,ee.useCallback(n=>{const o=e.current;let i=!1;const r=o.map(s=>{const a=CDe(s,n);return!i&&typeof a=="function"&&(i=!0),a});if(i)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():CDe(o[s],null)}}},[])}Lb(XFt,"useStableComposedRefs");function YO(t){return t?.animationName||"none"}Lb(YO,"getAnimationName");function ZFt(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Lb(ZFt,"getElementRef");var FLo=Object.defineProperty,UO=(t,e)=>FLo(t,"name",{value:e,configurable:!0}),yDe="Tabs",[LLo,zhr]=Nx(yDe,[ige]),eLt=ige(),[HLo,xDe]=LLo(yDe),OLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,value:i,onValueChange:r,defaultValue:s,orientation:a="horizontal",dir:A,activationMode:c="automatic",...l}=e,u=Q$(A),[g,h]=DB({prop:i,onChange:r,defaultProp:s??"",caller:yDe});return K.jsx(HLo,{scope:o,baseId:t_(),value:g,onValueChange:h,orientation:a,dir:u,activationMode:c,children:K.jsx(Na.div,{dir:u,"data-orientation":a,...l,ref:n})})},"Tabs")),GLo="TabsList",YLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,loop:i=!0,...r}=e,s=xDe(GLo,o),a=eLt(o);return K.jsx(WFt,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:i,children:K.jsx(Na.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:n})})},"TabsList")),ULo="TabsTrigger",KLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,value:i,disabled:r=!1,...s}=e,a=xDe(ULo,o),A=eLt(o),c=EDe(a.baseId,i),l=BDe(a.baseId,i),u=i===a.value;return K.jsx(jFt,{asChild:!0,...A,focusable:!r,active:u,children:K.jsx(Na.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:c,...s,ref:n,onMouseDown:ar(e.onMouseDown,g=>{!r&&g.button===0&&g.ctrlKey===!1?a.onValueChange(i):g.preventDefault()}),onKeyDown:ar(e.onKeyDown,g=>{r||g.target!==g.currentTarget||[" ","Enter"].includes(g.key)&&a.onValueChange(i)}),onFocus:ar(e.onFocus,()=>{const g=a.activationMode!=="manual";!u&&!r&&g&&a.onValueChange(i)})})})},"TabsTrigger")),VLo="TabsContent",zLo=ee.forwardRef(UO(function(e,n){const{__scopeTabs:o,value:i,forceMount:r,children:s,...a}=e,A=xDe(VLo,o),c=EDe(A.baseId,i),l=BDe(A.baseId,i),u=i===A.value,g=ee.useRef(u);return ee.useEffect(()=>{const h=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(h)},[]),K.jsx(uE,{present:r||u,children:({present:h})=>K.jsx(Na.div,{"data-state":u?"active":"inactive","data-orientation":A.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:l,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:h&&s})})},"TabsContent"));function EDe(t,e){return`${t}-trigger-${e}`}UO(EDe,"makeTriggerId");function BDe(t,e){return`${t}-content-${e}`}UO(BDe,"makeContentId");var JLo=OLo,tLt=YLo,nLt=KLo,oLt=zLo;function iLt(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=iLt(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function NB(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=iLt(t))&&(o&&(o+=" "),o+=e);return o}const bDe="-",WLo=t=>{const e=$Lo(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:s=>{const a=s.split(bDe);return a[0]===""&&a.length!==1&&a.shift(),rLt(a,e)||jLo(s)},getConflictingClassGroupIds:(s,a)=>{const A=n[s]||[];return a&&o[s]?[...A,...o[s]]:A}}},rLt=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],o=e.nextPart.get(n),i=o?rLt(t.slice(1),o):void 0;if(i)return i;if(e.validators.length===0)return;const r=t.join(bDe);return e.validators.find(({validator:s})=>s(r))?.classGroupId},sLt=/^\[(.+)\]$/,jLo=t=>{if(sLt.test(t)){const e=sLt.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},$Lo=t=>{const{theme:e,prefix:n}=t,o={nextPart:new Map,validators:[]};return XLo(Object.entries(t.classGroups),n).forEach(([r,s])=>{SDe(s,o,r,e)}),o},SDe=(t,e,n,o)=>{t.forEach(i=>{if(typeof i=="string"){const r=i===""?e:aLt(e,i);r.classGroupId=n;return}if(typeof i=="function"){if(qLo(i)){SDe(i(o),e,n,o);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([r,s])=>{SDe(s,aLt(e,r),n,o)})})},aLt=(t,e)=>{let n=t;return e.split(bDe).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},qLo=t=>t.isThemeGetter,XLo=(t,e)=>e?t.map(([n,o])=>{const i=o.map(r=>typeof r=="string"?e+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([s,a])=>[e+s,a])):r);return[n,i]}):t,ZLo=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,o=new Map;const i=(r,s)=>{n.set(r,s),e++,e>t&&(e=0,o=n,n=new Map)};return{get(r){let s=n.get(r);if(s!==void 0)return s;if((s=o.get(r))!==void 0)return i(r,s),s},set(r,s){n.has(r)?n.set(r,s):i(r,s)}}},ALt="!",eHo=t=>{const{separator:e,experimentalParseClassName:n}=t,o=e.length===1,i=e[0],r=e.length,s=a=>{const A=[];let c=0,l=0,u;for(let m=0;m<a.length;m++){let _=a[m];if(c===0){if(_===i&&(o||a.slice(m,m+r)===e)){A.push(a.slice(l,m)),l=m+r;continue}if(_==="/"){u=m;continue}}_==="["?c++:_==="]"&&c--}const g=A.length===0?a:a.substring(l),h=g.startsWith(ALt),d=h?g.substring(1):g,p=u&&u>l?u-l:void 0;return{modifiers:A,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:p}};return n?a=>n({className:a,parseClassName:s}):s},tHo=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(o=>{o[0]==="["?(e.push(...n.sort(),o),n=[]):n.push(o)}),e.push(...n.sort()),e},nHo=t=>({cache:ZLo(t.cacheSize),parseClassName:eHo(t),...WLo(t)}),oHo=/\s+/,iHo=(t,e)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=e,r=[],s=t.trim().split(oHo);let a="";for(let A=s.length-1;A>=0;A-=1){const c=s[A],{modifiers:l,hasImportantModifier:u,baseClassName:g,maybePostfixModifierPosition:h}=n(c);let d=!!h,p=o(d?g.substring(0,h):g);if(!p){if(!d){a=c+(a.length>0?" "+a:a);continue}if(p=o(g),!p){a=c+(a.length>0?" "+a:a);continue}d=!1}const m=tHo(l).join(":"),_=u?m+ALt:m,f=_+p;if(r.includes(f))continue;r.push(f);const I=i(p,d);for(let C=0;C<I.length;++C){const y=I[C];r.push(_+y)}a=c+(a.length>0?" "+a:a)}return a};function rHo(){let t=0,e,n,o="";for(;t<arguments.length;)(e=arguments[t++])&&(n=cLt(e))&&(o&&(o+=" "),o+=n);return o}const cLt=t=>{if(typeof t=="string")return t;let e,n="";for(let o=0;o<t.length;o++)t[o]&&(e=cLt(t[o]))&&(n&&(n+=" "),n+=e);return n};function sHo(t,...e){let n,o,i,r=s;function s(A){const c=e.reduce((l,u)=>u(l),t());return n=nHo(c),o=n.cache.get,i=n.cache.set,r=a,a(A)}function a(A){const c=o(A);if(c)return c;const l=iHo(A,n);return i(A,l),l}return function(){return r(rHo.apply(null,arguments))}}const _d=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},lLt=/^\[(?:([a-z-]+):)?(.+)\]$/i,aHo=/^\d+\/\d+$/,AHo=new Set(["px","full","screen"]),cHo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lHo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uHo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gHo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dHo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hb=t=>KO(t)||AHo.has(t)||aHo.test(t),ww=t=>VO(t,"length",yHo),KO=t=>!!t&&!Number.isNaN(Number(t)),QDe=t=>VO(t,"number",KO),v$=t=>!!t&&Number.isInteger(Number(t)),hHo=t=>t.endsWith("%")&&KO(t.slice(0,-1)),LA=t=>lLt.test(t),Pw=t=>cHo.test(t),pHo=new Set(["length","size","percentage"]),mHo=t=>VO(t,pHo,uLt),_Ho=t=>VO(t,"position",uLt),fHo=new Set(["image","url"]),IHo=t=>VO(t,fHo,EHo),CHo=t=>VO(t,"",xHo),w$=()=>!0,VO=(t,e,n)=>{const o=lLt.exec(t);return o?o[1]?typeof e=="string"?o[1]===e:e.has(o[1]):n(o[2]):!1},yHo=t=>lHo.test(t)&&!uHo.test(t),uLt=()=>!1,xHo=t=>gHo.test(t),EHo=t=>dHo.test(t),BHo=sHo(()=>{const t=_d("colors"),e=_d("spacing"),n=_d("blur"),o=_d("brightness"),i=_d("borderColor"),r=_d("borderRadius"),s=_d("borderSpacing"),a=_d("borderWidth"),A=_d("contrast"),c=_d("grayscale"),l=_d("hueRotate"),u=_d("invert"),g=_d("gap"),h=_d("gradientColorStops"),d=_d("gradientColorStopPositions"),p=_d("inset"),m=_d("margin"),_=_d("opacity"),f=_d("padding"),I=_d("saturate"),C=_d("scale"),y=_d("sepia"),x=_d("skew"),E=_d("space"),B=_d("translate"),S=()=>["auto","contain","none"],Q=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto",LA,e],M=()=>[LA,e],k=()=>["",Hb,ww],R=()=>["auto",KO,LA],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",LA],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[KO,LA];return{cacheSize:500,separator:":",theme:{colors:[w$],spacing:[Hb,ww],blur:["none","",Pw,LA],brightness:j(),borderColor:[t],borderRadius:["none","","full",Pw,LA],borderSpacing:M(),borderWidth:k(),contrast:j(),grayscale:W(),hueRotate:j(),invert:W(),gap:M(),gradientColorStops:[t],gradientColorStopPositions:[hHo,ww],inset:w(),margin:w(),opacity:j(),padding:M(),saturate:j(),scale:j(),sepia:W(),skew:j(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",LA]}],container:["container"],columns:[{columns:[Pw]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F(),LA]}],overflow:[{overflow:Q()}],"overflow-x":[{"overflow-x":Q()}],"overflow-y":[{"overflow-y":Q()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",v$,LA]}],basis:[{basis:w()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",LA]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",v$,LA]}],"grid-cols":[{"grid-cols":[w$]}],"col-start-end":[{col:["auto",{span:["full",v$,LA]},LA]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[w$]}],"row-start-end":[{row:["auto",{span:[v$,LA]},LA]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",LA]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",LA]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...Y()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Y(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Y(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[f]}],px:[{px:[f]}],py:[{py:[f]}],ps:[{ps:[f]}],pe:[{pe:[f]}],pt:[{pt:[f]}],pr:[{pr:[f]}],pb:[{pb:[f]}],pl:[{pl:[f]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",LA,e]}],"min-w":[{"min-w":[LA,e,"min","max","fit"]}],"max-w":[{"max-w":[LA,e,"none","full","min","max","fit","prose",{screen:[Pw]},Pw]}],h:[{h:[LA,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[LA,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[LA,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[LA,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Pw,ww]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",QDe]}],"font-family":[{font:[w$]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",LA]}],"line-clamp":[{"line-clamp":["none",KO,QDe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hb,LA]}],"list-image":[{"list-image":["none",LA]}],"list-style-type":[{list:["none","disc","decimal",LA]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hb,ww]}],"underline-offset":[{"underline-offset":["auto",Hb,LA]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",LA]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",LA]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),_Ho]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mHo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IHo]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[d]}],"gradient-via-pos":[{via:[d]}],"gradient-to-pos":[{to:[d]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-se":[{"rounded-se":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[Hb,LA]}],"outline-w":[{outline:[Hb,ww]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Hb,ww]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Pw,CHo]}],"shadow-color":[{shadow:[w$]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[A]}],"drop-shadow":[{"drop-shadow":["","none",Pw,LA]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[l]}],invert:[{invert:[u]}],saturate:[{saturate:[I]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[A]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[l]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",LA]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",LA]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",LA]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[v$,LA]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",LA]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",LA]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",LA]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Hb,ww,QDe]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),Fn="u">typeof window?window:void 0,vC="u">typeof globalThis?globalThis:Fn,tf=vC?.navigator,No=vC?.document,fd=vC?.location,P$=vC?.fetch,vDe=vC?.XMLHttpRequest&&"withCredentials"in new vC.XMLHttpRequest?vC.XMLHttpRequest:void 0,gLt=vC?.AbortController,bHo=vC?.CompressionStream,jy=tf?.userAgent;function dLt(){return!(!Fn||Fn.navigator.onLine===!1)}const M$=typeof globalThis<"u"?globalThis:Fn;M$&&typeof self>"u"&&(M$.self=M$),M$&&typeof File>"u"&&(M$.File=function(){});const Vr=Fn??{},SHo="0.9.1",Ob={DEBUG:!1,LIB_VERSION:SHo,LIB_NAME:"browser-common"};var l6=(function(t){return t.AnonymousId="anonymous_id",t.DistinctId="distinct_id",t.Props="props",t.EnablePersonProcessing="enable_person_processing",t.PersonMode="person_mode",t.FeatureFlagDetails="feature_flag_details",t.FeatureFlags="feature_flags",t.FeatureFlagPayloads="feature_flag_payloads",t.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",t.BootstrapFeatureFlags="bootstrap_feature_flags",t.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",t.OverrideFeatureFlags="override_feature_flags",t.Queue="queue",t.AiQueue="ai_queue",t.AiCaptureQueue="ai_capture_queue",t.LogsQueue="logs_queue",t.OptedOut="opted_out",t.SessionId="session_id",t.SessionStartTimestamp="session_start_timestamp",t.SessionLastTimestamp="session_timestamp",t.PersonProperties="person_properties",t.GroupProperties="group_properties",t.InstalledAppBuild="installed_app_build",t.InstalledAppVersion="installed_app_version",t.SessionReplay="session_replay",t.PushRegistered="push_registered",t.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",t.SurveyLastSeenDate="survey_last_seen_date",t.SurveysInProgress="surveys_in_progress",t.SurveysSeen="surveys_seen",t.Surveys="surveys",t.RemoteConfig="remote_config",t.FlagsEndpointWasHit="flags_endpoint_was_hit",t.DeviceId="device_id",t})({}),wDe=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({});const QHo=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],vHo=["token"];function as(t,e){return t.indexOf(e)!==-1}const rge=function(t){return t.trim()},PDe=function(t){return t.replace(/^\$/,"")};function hLt(t){var e;const n=[];return(e=JSON.stringify(t,function(o,i){if(typeof i=="bigint")return i.toString();if(typeof i!="function"&&typeof i!="symbol"){if(i instanceof Error)return{name:i.name,message:i.message,stack:i.stack};if(i&&typeof i=="object"){for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(i))return"[Circular]";n.push(i)}return i}}))!==null&&e!==void 0?e:"null"}const pLt=Object.prototype,MDe=pLt.hasOwnProperty,sge=pLt.toString,As=Array.isArray||function(t){return sge.call(t)==="[object Array]"},nf=t=>typeof t=="function",QA=t=>t===Object(t)&&!As(t),Rx=t=>{if(QA(t)){for(const e in t)if(MDe.call(t,e))return!1;return!0}return!1},Eo=t=>t===void 0,rA=t=>sge.call(t)=="[object String]",D$=t=>rA(t)&&t.trim().length===0,Id=t=>t===null,Hs=t=>Eo(t)||Id(t),Ah=t=>sge.call(t)=="[object Number]"&&t==t,Gb=t=>Ah(t)&&t>0,$y=t=>sge.call(t)==="[object Boolean]",wHo=t=>as(QHo,t),PHo=t=>as(vHo,t);function mLt(t){return t===null||typeof t!="object"}function age(t,e){return{}.toString.call(t)===`[object ${e}]`}function zO(t){switch({}.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return _Lt(t,Error)}}function DDe(t){return"u">typeof Event&&_Lt(t,Event)}function _Lt(t,e){try{return t instanceof e}catch{return!1}}const MHo=[!0,"true",1,"1","yes"],NDe=t=>as(MHo,t),DHo=[!1,"false",0,"0","no"];function fLt(t,e,n,o,i,r,s){try{var a=t[r](s),A=a.value}catch(c){return void n(c)}a.done?e(A):Promise.resolve(A).then(o,i)}function Zu(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var r=t.apply(e,n);function s(A){fLt(r,o,i,s,a,"next",A)}function a(A){fLt(r,o,i,s,a,"throw",A)}s(void 0)})}}const NHo=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterestbot","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],ILt=function(t,e=[]){if(!t)return!1;const n=t.toLowerCase();return NHo.concat(e).some(o=>{const i=o.toLowerCase();return n.indexOf(i)!==-1})};function u6(t,e,n,o,i){return e>n&&(o.warn("min cannot be greater than max."),e=n),Ah(t)?t>n?(o.warn(" cannot be  greater than max: "+n+". Using max value instead."),n):e>t?(o.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(o.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),u6(i??n,e,n,o))}var RHo=class{constructor(e){this.C={},this.I=e.I,this.R=u6(e.bucketSize,0,100,e.A),this.$=u6(e.refillRate,0,this.R,e.A),this.O=u6(e.refillInterval,0,864e5,e.A)}F(e,n){const o=Math.floor((n-e.lastAccess)/this.O);o>0&&(e.tokens=Math.min(e.tokens+o*this.$,this.R),e.lastAccess=e.lastAccess+o*this.O)}consumeRateLimit(e){var n;const o=Date.now(),i=String(e);let r=this.C[i];return r?this.F(r,o):(r={tokens:this.R,lastAccess:o},this.C[i]=r),r.tokens===0||(r.tokens--,r.tokens===0&&((n=this.I)===null||n===void 0||n.call(this,e)),r.tokens===0)}stop(){this.C={}}};const JO="Mobile",N$="Android",Age="Tablet",CLt="Android Tablet",yLt="iPad",xLt="Apple Watch",cge="Safari",lge="BlackBerry",ELt="Samsung Internet",uge="Chrome",BLt="Chrome iOS",bLt="Internet Explorer",SLt="Internet Explorer Mobile",QLt="Opera",vLt="Microsoft Edge",gge="Firefox",wLt="Firefox iOS",dge="Nintendo",hge="PlayStation",pge="Xbox",PLt="Android Mobile",MLt="Mobile Safari",RDe="Windows",DLt="Windows Phone",NLt="Nokia",TDe="Ouya",THo="Generic "+JO.toLowerCase(),RLt="Generic "+Age.toLowerCase(),kDe="Konqueror",TLt="Oculus Browser",kLt="Vivaldi",FLt="Yandex",LLt="Whale",HLt="DuckDuckGo",OLt="Pale Moon",GLt="Waterfox",FDe="Brave",YLt="Claude",ULt="Codex",KLt="ChatGPT",VLt="Google Search App",LDe=new RegExp("Version/(\\d+(\\.\\d+)?)"),HDe=new RegExp("(Claude|Codex|ChatGPT)\\/(\\d+(\\.\\d+)?)"),kHo=new RegExp(pge,"i"),FHo=new RegExp("PlayStation \\w+","i"),LHo=new RegExp("Nintendo \\w+","i"),ODe=new RegExp("BlackBerry|PlayBook|BB10","i"),HHo={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},zLt=function(t,e,n,o){return e=e||"",(function(r){return r?.brave?FDe:null})(n)||(o?.detectGoogleSearchApp&&as(t,"GSA/")?VLt:as(t," OPR/")&&as(t,"Mini")?"Opera Mini":as(t," OPR/")?QLt:ODe.test(t)?lge:as(t,"IEMobile")||as(t,"WPDesktop")?SLt:as(t,"OculusBrowser")?TLt:as(t,"SamsungBrowser")?ELt:as(t,"Edge")||as(t,"Edg/")?vLt:as(t,"Vivaldi/")?kLt:as(t,"YaBrowser/")?FLt:as(t,"Whale/")?LLt:as(t,"DuckDuckGo/")||as(t,"Ddg/")?HLt:as(t,"Claude/")?YLt:as(t,"Codex/")?ULt:as(t,"ChatGPT/")?KLt:as(t,"FBIOS")?"Facebook Mobile":as(t,"UCWEB")||as(t,"UCBrowser")?"UC Browser":as(t,"CriOS")?BLt:as(t,"CrMo")||as(t,uge)?uge:as(t,N$)&&as(t,cge)?PLt:as(t,"FxiOS")?wLt:as(t.toLowerCase(),kDe.toLowerCase())?kDe:as(t,"Brave/")?FDe:((r,s)=>s&&as(s,"Apple")||(function(a){return as(a,cge)&&!as(a,uge)&&!as(a,N$)})(r))(t,e)?as(t,JO)?MLt:cge:as(t,"PaleMoon/")?OLt:as(t,"Waterfox/")?GLt:as(t,gge)?gge:as(t,"MSIE")||as(t,"Trident/")?bLt:as(t,"Gecko")?gge:"")},OHo={[SLt]:[new RegExp("rv:(\\d+(\\.\\d+)?)")],[vLt]:[new RegExp("Edge?\\/(\\d+(\\.\\d+)?)")],[uge]:[new RegExp("(Chrome|CrMo)\\/(\\d+(\\.\\d+)?)")],[BLt]:[new RegExp("CriOS\\/(\\d+(\\.\\d+)?)")],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)")],[cge]:[LDe],[MLt]:[LDe],[QLt]:[new RegExp("(Opera|OPR)\\/(\\d+(\\.\\d+)?)")],[gge]:[new RegExp("Firefox\\/(\\d+(\\.\\d+)?)")],[wLt]:[new RegExp("FxiOS\\/(\\d+(\\.\\d+)?)")],[kDe]:[new RegExp("Konqueror[:/]?(\\d+(\\.\\d+)?)","i")],[lge]:[new RegExp("BlackBerry (\\d+(\\.\\d+)?)"),LDe],[PLt]:[new RegExp("android\\s(\\d+(\\.\\d+)?)","i")],[ELt]:[new RegExp("SamsungBrowser\\/(\\d+(\\.\\d+)?)")],[TLt]:[new RegExp("OculusBrowser\\/(\\d+(\\.\\d+)?)")],[kLt]:[new RegExp("Vivaldi\\/(\\d+(\\.\\d+)?)")],[FLt]:[new RegExp("YaBrowser\\/(\\d+(\\.\\d+)?)")],[LLt]:[new RegExp("Whale\\/(\\d+(\\.\\d+)?)")],[FDe]:[new RegExp("Brave\\/(\\d+(\\.\\d+)?)")],[YLt]:[HDe],[ULt]:[HDe],[KLt]:[HDe],[HLt]:[new RegExp("(DuckDuckGo|Ddg)\\/(\\d+(\\.\\d+)?)")],[OLt]:[new RegExp("PaleMoon\\/(\\d+(\\.\\d+)?)")],[GLt]:[new RegExp("Waterfox\\/(\\d+(\\.\\d+)?)")],[VLt]:[new RegExp("GSA\\/(\\d+(\\.\\d+)?)")],[bLt]:[new RegExp("(rv:|MSIE )(\\d+(\\.\\d+)?)")],Mozilla:[new RegExp("rv:(\\d+(\\.\\d+)?)")]},GHo=function(t,e,n,o){const i=zLt(t,e,n,o),r=OHo[i];if(Eo(r))return null;for(let s=0;r.length>s;s++){const a=t.match(r[s]);if(a)return parseFloat(a[a.length-2])}return null},JLt=[[new RegExp("Xbox; Xbox (.*?)[);]","i"),t=>[pge,t&&t[1]||""]],[new RegExp(dge,"i"),[dge,""]],[new RegExp(hge,"i"),[hge,""]],[ODe,[lge,""]],[new RegExp(RDe,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[DLt,""];if(new RegExp(JO).test(e)&&!/IEMobile\b/.test(e))return["Windows Mobile",""];const n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){let o=HHo[n[1]]||"";return/arm/i.test(e)&&(o="RT"),[RDe,o]}return[RDe,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?["iOS",[t[3],t[4],t[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{let e="";return t&&t.length>=3&&(e=Eo(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("(Android (\\d+)\\.(\\d+)\\.?(\\d+)?|Android)","i"),t=>t&&t[2]?[N$,[t[2],t[3],t[4]||"0"].join(".")]:[N$,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{const e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,["Chrome OS",""]],[/Linux|debian/i,["Linux",""]]],WLt=function(t){for(let e=0;JLt.length>e;e++){const[n,o]=JLt[e],i=n.exec(t),r=i&&(nf(o)?o(i,t):o);if(r)return r}return["",""]},jLt=function(t){return LHo.test(t)?dge:FHo.test(t)?hge:kHo.test(t)?pge:new RegExp(TDe,"i").test(t)?TDe:new RegExp("(Windows Phone|WPDesktop)","i").test(t)?DLt:/iPad/.test(t)?yLt:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?xLt:ODe.test(t)?lge:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(NLt,"i").test(t)?NLt:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(JO).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?N$:CLt:new RegExp("(pda|Mobile)","i").test(t)?THo:new RegExp(Age,"i").test(t)&&!new RegExp("Tablet pc","i").test(t)?RLt:""},YHo=function(t,e){var n;const o=jLt(t);return o===yLt||o===CLt||o==="Kobo"||o==="Kindle Fire"||o===RLt?Age:o===dge||o===pge||o===hge||o===TDe?"Console":o===xLt?"Wearable":o?JO:e?.userAgentDataPlatform==="Android"&&((n=e?.maxTouchPoints)!==null&&n!==void 0?n:0)>0?600>Math.min((i=e?.screenWidth)!==null&&i!==void 0?i:0,(r=e?.screenHeight)!==null&&r!==void 0?r:0)/((s=e?.devicePixelRatio)!==null&&s!==void 0?s:1)?JO:Age:"Desktop";var i,r,s},GDe=/\bFBAV\/(\d+(?:\.\d+)*)/i,$Lt=[[/\bInstagram(?:[ /](\d+(?:\.\d+)*))?\b/i,"Instagram"],[/\bBarcelona[ /](\d+(?:\.\d+)*)?/i,"Threads"],[/\b(?:MessengerForiOS|(?:FBAN|FB_IAB)\/Orca-Android)\b/i,"Messenger",GDe],[/\bFBAN\/EMA\b/i,"Facebook Lite",GDe],[/\b(?:FBIOS|(?:FBAN|FB_IAB)\/(?:FB4A|FBIOS))\b/i,"Facebook",GDe],[/\bLinkedInApp(?:\]?\/(\d+(?:\.\d+)*))?\b/i,"LinkedIn"],[/\bTwitter(?:Android| for (?:iPhone|iPad|Android))(?:\/(\d+(?:\.\d+)*))?\b/i,"Twitter"],[/\b(?:musical_ly|trill)(?:[_/](\d+\.\d+(?:\.\d+)*))?(?=\b|_)/i,"TikTok",/\bapp_version\/(\d+(?:\.\d+)*)/i],[/\b(?:MicroMessenger|WeChat)\/(\d+(?:\.\d+)*)?/i,"WeChat"],[/\bLine\/(\d+(?:\.\d+)*)?/i,"Line"],[/\bGSA\/(\d+(?:\.\d+)*)?/i,"Google"],[/\[Pinterest\/(?:iOS|Android)\b|\bPinterest(?: for (?:Android(?: Tablet)?|iOS))?\/(\d+(?:\.\d+)*)/i,"Pinterest"],[/\b(?:WA4A|WAiOS)\/(\d+(?:\.\d+)*)?/i,"WhatsApp"],[/\bSnapchat[ /](\d+(?:\.\d+)*)?/i,"Snapchat"],[/\bBing(?:Web|Sapphire)\/(\d+(?:\.\d+)*)?/i,"Bing"],[/\bNAVER\(inapp; search;/i,"Naver",/\bNAVER\(inapp; search;[^;)]*; (\d+(?:\.\d+)*)/i],[/\bKAKAOTALK[ /](\d+\.\d+(?:\.\d+)*)?/i,"KakaoTalk"]],YDe="[Truncated]",R$="[Unserializable]";function WO(t){let e="";for(let n=0;t.length>n;n++){const o=t.charCodeAt(n);if(55296>o||o>56319)e+=56320>o||o>57343?t[n]:"�";else{const i=t.charCodeAt(n+1);56320>i||i>57343?e+="�":(e+=t[n]+t[n+1],n++)}}return e}function qLt(t,e){if(!e)return t;let n=[];try{n=Object.keys(e)}catch{n=[]}for(const o of n){let i;try{i=e[o]}catch{i=R$}Object.defineProperty(t,o,{value:i,enumerable:!0,writable:!0,configurable:!0})}return t}const mge=3e5;var XLt=class{record(e){if(e.kind==="too-large")return;if(e.kind!=="retry-later")return void this.reset();if(!e.retryAfterMs)return;const n=this.isOpen(),o=Date.now(),i=Math.min(e.retryAfterMs,mge);if(!n)return this.ts=o,void(this.es=o+i);this.es=Math.max(this.es,Math.min(o+i,this.ts+mge))}remainingMs(){const e=Date.now();if(this.ts-5e3>e)return this.reset(),0;const n=Math.min(mge,Math.max(0,this.es-e));return n===0&&this.reset(),n}isOpen(){return this.remainingMs()>0}reset(){this.es=0,this.ts=0}constructor(){this.es=0,this.ts=0}};const UHo=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ZLt(t,e){return typeof(n=t)=="string"&&UHo.test(n)?t:e();var n}function eHt(t,e){const n=new Error(e);try{Object.defineProperty(n,"name",{value:t,writable:!0,enumerable:!0,configurable:!0})}catch{}return n}function Mw(t){return t&&t.split("#")[0]}function tHt(t){try{return t()}catch{return}}function nHt(t,e){const n=setTimeout(t,e);return n!=null&&n.unref&&n?.unref(),n}function oHt(t,e,n){return iHt.apply(this,arguments)}function iHt(){return(iHt=Zu(function*(t,e,n){let o;try{return yield Promise.race([t,new Promise((i,r)=>{o=nHt(()=>{try{n?.(),i()}catch(s){r(s)}},e)})])}finally{clearTimeout(o)}})).apply(this,arguments)}let _ge,rHt,UDe;function KHo(t){const e=globalThis._posthogChunkIds;if(!e)return;const n=Object.keys(e);return UDe&&n.length===rHt||(rHt=n.length,UDe=n.reduce((o,i)=>{_ge||(_ge={});const r=_ge[i];if(r)o[r[0]]=r[1];else{const s=t(i);for(let a=s.length-1;a>=0;a--){const A=s[a],c=A?.filename,l=e[i];if(c&&l){o[c]=l,_ge[i]=[c,l];break}}}return o},{})),UDe}function T$(t){return T$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T$(t)}function VHo(t,e,n){return(e=(function(o){var i=(function(r){if(T$(r)!="object"||!r)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var a=s.call(r,"string");if(T$(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)})(o);return T$(i)=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sHt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function sn(t){for(var e=1;arguments.length>e;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sHt(Object(n),!0).forEach(function(o){VHo(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sHt(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}var zHo=class{constructor(e,n,o=[]){this.coercers=e,this.stackParser=n,this.modifiers=o}buildFromUnknown(e,n={}){const o=n&&n.mechanism||{handled:!0,type:"generic"},i=this.buildCoercingContext(o,n,0).apply(e),r=this.buildParsingContext(n),s=this.parseStacktrace(i,r);return{$exception_list:this.convertToExceptionList(s,o),$exception_level:"error"}}modifyFrames(e){var n=this;return Zu(function*(){for(const o of e)o.stacktrace&&o.stacktrace.frames&&As(o.stacktrace.frames)&&(o.stacktrace.frames=yield n.applyModifiers(o.stacktrace.frames));return e})()}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)===null||n===void 0?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var o;let i,r;if(e.cause!=null&&(i=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null)try{r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)}catch{}return sn(sn({},e),{},{cause:i,stack:r,errors:(o=e.errors)===null||o===void 0?void 0:o.map(s=>this.parseStacktrace(s,n))})}applyChunkIds(e,n){return e.map(o=>(o.filename&&n&&(o.chunk_id=n[o.filename]),o))}applyCoercers(e,n){for(const o of this.coercers)if(o.match(e))return o.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return Zu(function*(){let o=e;for(const i of n.modifiers)o=yield i(o);return o})()}convertToExceptionList(e,n){const o=[],i=(r,s,a)=>{var A;const c=o.length,l=s===void 0?sn(sn({type:typeof n.type=="string"&&n.type.length>0?n.type:"generic"},typeof n.handled=="boolean"?{handled:n.handled}:n.handled===void 0?{handled:!0}:{}),{},{synthetic:typeof n.synthetic=="boolean"?n.synthetic:r.synthetic,exception_id:c}):{type:"chained",source:a,synthetic:r.synthetic,exception_id:c,parent_id:s},u={type:r.type,value:r.value,mechanism:l};r.stack&&(u.stacktrace={type:"raw",frames:r.stack}),o.push(u),r.cause&&i(r.cause,c,"cause");for(const g of(A=r.errors)!==null&&A!==void 0?A:[])i(g,c,"member")};return i(e),o}buildParsingContext(e){var n;return{chunkIdMap:KHo(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}getAggregateErrors(e){try{if(zO(e)){let o=Object.getPrototypeOf(e);for(let i=0;o&&100>i;i++){var n;const r=(n=Object.getOwnPropertyDescriptor(o,"constructor"))===null||n===void 0?void 0:n.value;if(typeof r=="function"&&r.name==="AggregateError"){const s=e.errors;return As(s)?s:void 0}o=Object.getPrototypeOf(o)}}}catch{}}buildCoercingContext(e,n,o=0){let i=0,r=0,s=!1;const a=new Set,A=[],c={},l=(h,d,p=0)=>{const m=u(d,p),_=m.apply;if(m.apply=E=>{A.push(h);try{return _(E)}finally{A.pop()}},p>4||p>0&&A.indexOf(h)!==-1)return this.coerceFallback(m);const f=typeof h=="object"&&h!==null||typeof h=="function";if(p===0&&i>=50||f&&a.has(h))return;f&&a.add(h),p===0&&i++;const I=this.getAggregateErrors(h);let C,y;s||(s=!!I);try{if(C=this.applyCoercers(h,m),!C)throw c}catch(E){if(E===c)return void(p===0&&i--);if(!s)throw E;C=this.coerceFallback(m)}if(!I||i>=50)return C;try{y=I.length}catch{return C}if(!Number.isInteger(y)||0>y||y>4294967295)return C;const x=[];for(let E=0;50>i&&1e3>r&&y>E;E++){let B;r++;try{B=m.next(I[E])}catch{i++,B=this.coerceFallback(u(d+1))}B&&x.push(B)}return sn(sn({},C),{},{errors:x})},u=(h,d=0)=>sn(sn({},n),{},{syntheticException:h==0?n.syntheticException:void 0,mechanism:h==0?e:{},apply(p){const m=l(p,h,d+1);if(!m)throw c;return m},next:p=>l(p,h+1)}),g=u(o);return sn(sn({},g),{},{apply:h=>{var d;return(d=l(h,o))!==null&&d!==void 0?d:this.coerceFallback(g)}})}};const JHo=/^([a-z][a-z0-9.+-]+):/i,WHo=["http","https","file","blob","app","capacitor","ionic","webpack","webpack-internal","ng"];function jHo(t){if(!t||t==="<anonymous>")return!1;const e=JHo.exec(t);return!e||WHo.includes(e[1].toLowerCase())}function KDe(t,e,n,o,i){const r={platform:t,filename:e,function:n==="<anonymous>"?"?":n,in_app:jHo(e)};return Eo(o)||(r.lineno=o),Eo(i)||(r.colno=i),r}const aHt=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,o=t.indexOf("safari-web-extension")!==-1;return n||o?[t.indexOf("@")!==-1?t.split("@")[0]:"?",n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},$Ho=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,qHo=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,XHo=/\((\S*)(?::(\d+))(?::(\d+))\)/,ZHo=(t,e)=>{const n=$Ho.exec(t);if(n){const[,i,r,s]=n;return KDe(e,i,"?",+r,+s)}const o=qHo.exec(t);if(o){if(o[2]&&o[2].indexOf("eval")===0){const s=XHo.exec(o[2]);s&&(o[2]=s[1],o[3]=s[2],o[4]=s[3])}const[i,r]=aHt(o[1]||"?",o[2]);return KDe(e,r,i,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},eOo=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tOo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,nOo=(t,e)=>{const n=eOo.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const r=tOo.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}let o=n[3],i=n[1]||"?";return[i,o]=aHt(i,o),KDe(e,o,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},AHt=/\(error: (.*)\)/;function VDe(t,e){return t.filename===e.filename&&t.function===e.function&&t.module===e.module&&t.lineno===e.lineno&&t.colno===e.colno}function oOo(t){for(let e=1;10>=e;e++){const n=t.length-2*e;if(0>n)break;let o=!0;for(let i=0;e>i;i++)if(!VDe(t[n+i],t[n+e+i])){o=!1;break}if(o){for(let i=0;e>i;i++)t[n+i]=t[n+e+i];return t.length=n+e,{start:n,length:e}}}}function iOo(t,e){const n=e.start+e.length,o=lHt(t,e);o&&t.splice(n+o===t.length?n:e.start,o)}function cHt(t,e){let n=e.start;for(;n>0&&VDe(t[n-1],t[n-1+e.length]);)n--;return e.start-n}function lHt(t,e){const n=e.start+e.length;let o=n;for(;t.length>o&&VDe(t[o],t[o-e.length]);)o++;return o-n}function rOo(t,e){const n=e[0];let o=t.length-(n?cHt(t,n):0);for(const i of e)o-=lHt(t,i);return o}function sOo(t,e,n){for(let o=0;t.length>o;o++){const i=t[(e+o)%t.length],r=t[(n+o)%t.length];if(i!==r)return r>i}return!1}var aOo=class{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){const o=rA(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:o?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){const n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?`${n}: ${e.message}`:n}isDOMException(e){return age(e,"DOMException")}isDOMError(e){return age(e,"DOMError")}},AOo=class{match(e){return zO(e)}coerce(e,n){var o;const i=this.getStack(e),r=i===void 0?(o=n.syntheticException)===null||o===void 0?void 0:o.stack:void 0,s=!!r;return{type:this.getType(e),value:this.getMessage(e,n),stack:i??r,cause:e.cause?n.next(e.cause):void 0,synthetic:s}}getType(e){return e.name||e.constructor.name}getMessage(e,n){const o=e.message;return String(o.error&&typeof o.error.message=="string"?o.error.message:o)}getStack(e){try{const n=e.stacktrace;if(typeof n=="string"&&n.length>0)return n;const o=e.stack;return typeof o=="string"&&o.length>0?o:void 0}catch{return}}},cOo=class{match(e){return!!age(e,"ErrorEvent")&&(e.error!=null||this.ar(e))}coerce(e,n){var o;if(e.error!=null)return n.apply(e.error);const i=n.apply(e.message);return sn(sn({},i),{},{stack:(o=this.lr(e))!==null&&o!==void 0?o:i.stack,synthetic:!0})}ar(e){return rA(e.message)&&e.message.length>0}lr(e){var n,o;const i=e,r=(n=i.lineno)!==null&&n!==void 0?n:0,s=(o=i.colno)!==null&&o!==void 0?o:0;if(rA(i.filename)&&i.filename.length!==0&&r!==0)return`Error
    at ${i.filename}:${r}:${s}`}};const lOo=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;var uOo=class{match(e){return typeof e=="string"}coerce(e,n){var o;const[i,r]=this.getInfos(e);return{type:i??"Error",value:r??e,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}}getInfos(e){let n="Error",o=e;const i=e.match(lOo);return i&&(n=i[1],o=i[2]),[n,o]}};const gOo=["fatal","error","warning","log","info","debug"];function uHt(t,e=40){const n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(let o=n.length;o>0;o--){const i=n.slice(0,o).join(", ");if(e>=i.length)return o===n.length?i:i.length>e?`${i.slice(0,e)}...`:i}return""}var dOo=class{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var o,i;const r=this.getErrorPropertyFromObject(e);return r?n.apply(r):{type:this.getType(e),value:this.getValue(e),stack:(o=this.getStack(e))!==null&&o!==void 0?o:(i=n.syntheticException)===null||i===void 0?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if(DDe(e))return e.constructor.name;const n="name"in e?e.name:void 0;return rA(n)&&!D$(n)?n:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){let o=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(o+=` with message: '${e.message}'`),o}if("message"in e&&typeof e.message=="string")return e.message;const n=this.getObjectClassName(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${uHt(e)}`}isSeverityLevel(e){return rA(e)&&!D$(e)&&gOo.indexOf(e)>=0}getStack(e){try{return rA(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:rA(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(const n in e)if({}.hasOwnProperty.call(e,n)){const o=e[n];if(zO(o))return o}}getObjectClassName(e){try{const n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}},hOo=class{match(e){return DDe(e)}coerce(e,n){var o;const i=e.constructor.name;return{type:i,value:`${i} captured as exception with keys: ${uHt(e)}`,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}}},pOo=class{match(e){return mLt(e)}coerce(e,n){var o;return{type:"Error",value:`Primitive value captured as exception: ${String(e)}`,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}}},mOo=class{match(e){return age(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!DDe(e))return!1;try{const n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var o;const i=this.getUnhandledRejectionReason(e);return mLt(i)?{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`,stack:(o=n.syntheticException)===null||o===void 0?void 0:o.stack,synthetic:!0}:n.apply(i)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}};const fge="$message",Ige="$timestamp",_Oo=new Set([fge,Ige]),zDe={enabled:!0,max_bytes:32768};function Cge(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:zDe.enabled,max_bytes:IOo(t.max_bytes,zDe.max_bytes)}:sn({},zDe)}var fOo=class{constructor(e){this.ns=[],this.ss=0,this.Mr=Cge(e)}setConfig(e){this.Mr=Cge(e),this.rs()}add(e){const n=(function(i){let r;try{r=hLt(i)}catch{return}try{const s=JSON.parse(r);if(!QA(s))return;const a=s,A=a[fge],c=a[Ige];return!rA(A)||A.trim().length===0||!rA(c)&&!Ah(c)?void 0:{step:a,json:r}}catch{return}})(e);if(!n)return;const o=(function(i){if("u">typeof TextEncoder)return new TextEncoder().encode(i).length;const r=encodeURIComponent(i);let s=0;for(let a=0;r.length>a;a++)r[a]==="%"?(s+=1,a+=2):s+=1;return s})(n.json);o>this.Mr.max_bytes||(this.ns.push({step:n.step,bytes:o}),this.ss+=o,this.rs())}getAttachable(){return this.ns.map(e=>e.step)}clear(){this.ns=[],this.ss=0}size(){return this.ns.length}rs(){for(;this.ss>this.Mr.max_bytes&&this.ns.length>0;){const e=this.ns.shift();e&&(this.ss-=e.bytes)}}};function IOo(t,e){if(!Ah(t)||t===1/0||t===-1/0)return e;const n=Math.floor(t);return 0>n?e:n}const gHt=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function dHt(t){return typeof t=="string"||t}function hHt(t){return typeof t=="string"?t:void 0}const COo=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","irclid","_kx","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],pHt="NativeGzipValidationError",JDe=t=>t.length>=2&&t[0]===31&&t[1]===139,mHt=(t,e)=>t===wDe.GZipJS||e===wDe.GZipJS||e==="gzip",_Ht=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError";let k$;const yge=t=>{throw eHt(pHt,`Native gzip produced invalid output: ${t}`)},yOo=(fHt=Zu(function*(t,e){18>t.size&&yge("too-short");const n=new Uint8Array(yield t.slice(0,10).arrayBuffer());JDe(n)&&n[2]===8||yge("invalid-header");const o=new DataView(yield t.slice(t.size-8).arrayBuffer());o.getUint32(0,!0)!==(r=>{const s=(()=>{if(k$)return k$;k$=[];for(let A=0;256>A;A++){let c=A;for(let l=0;8>l;l++)c=1&c?3988292384^c>>>1:c>>>1;k$[A]=c>>>0}return k$})();let a=4294967295;for(let A=0;r.length>A;A++)a=s[255&(a^r[A])]^a>>>8;return(4294967295^a)>>>0})(e)&&yge("invalid-crc");const i=e.length>>>0;o.getUint32(4,!0)!==i&&yge("invalid-size")}),function(t,e){return fHt.apply(this,arguments)});var fHt;function WDe(){return WDe=Zu(function*(t,e=!0,n){try{const i=new TextEncoder().encode(t),r=new globalThis.CompressionStream("gzip"),s=r.writable.getWriter(),a=s.write(i).then(()=>s.close()).catch((o=Zu(function*(l){try{yield s.abort(l)}catch{}throw l}),function(l){return o.apply(this,arguments)})),A=new Response(r.readable).blob(),[c]=yield Promise.all([A,a]);return yield yOo(c,i),c}catch(i){if(n?.rethrow)throw i;return e&&console.error("Failed to gzip compress data",i),null}var o}),WDe.apply(this,arguments)}function IHt(t,e){if(t==null)return{};var n,o,i=(function(s,a){if(s==null)return{};var A={};for(var c in s)if({}.hasOwnProperty.call(s,c)){if(a.includes(c))continue;A[c]=s[c]}return A})(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;r.length>o;o++)e.includes(n=r[o])||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}const xOo={}.propertyIsEnumerable;function xge(t,e){try{return CHt(t,e,{ancestors:new WeakSet,remainingNodes:1e4},0)}catch{return[]}}function jDe(t,e,n,o){if(0>=n.remainingNodes)return{stringValue:YDe};if(n.remainingNodes--,$y(t))return{boolValue:t};if(typeof t=="bigint")return(function(i,r){const s=i.toString(),a=BigInt("9223372036854775808");return i>=a||-a>i?(r?.debug(`Attribute ${s} is outside the int64 range; encoding it as a string`),{stringValue:s}):{intValue:s}})(t,e);if(typeof t=="number"){if(!Number.isFinite(t))return{stringValue:String(t)};if(Number.isInteger(t)){if(Number.isSafeInteger(t))return{intValue:String(t)};if(typeof BigInt>"u")return{stringValue:String(t)};const i=BigInt(t).toString();return t>=9223372036854776e3||-9223372036854776e3>t?(e?.debug(`Attribute ${i} is outside the int64 range; encoding it as a string`),{stringValue:i}):{intValue:i}}return{doubleValue:t}}if(typeof t=="string")return{stringValue:WO(t)};if(typeof t=="function")return{stringValue:"[Function]"};if(typeof t=="symbol")return{stringValue:String(t)};if(typeof t=="object"&&t!==null){if(n.ancestors.has(t))return{stringValue:"[Circular]"};if(o>=20)return{stringValue:YDe};if(t instanceof Date){const i=t.getTime(),r=Number.isFinite(i)?t.toISOString():String(t);return{stringValue:typeof r=="string"?WO(r):String(r)}}n.ancestors.add(t);try{try{const i=t.toJSON;if(typeof i=="function")return jDe(i.call(t),e,n,o+1)}catch{}return As(t)?{arrayValue:{values:EOo(t,e,n,o+1)}}:{kvlistValue:{values:CHt(t,e,n,o+1)}}}finally{n.ancestors.delete(t)}}return{stringValue:WO(String(t))}}function EOo(t,e,n,o){const i=[],r=Math.min(t.length,1e3);let s=0;for(;r>s&&n.remainingNodes>0;s++)try{const a=s in t?t[s]:void 0;if(Hs(a))continue;i.push(jDe(a,e,n,o))}catch{i.push({stringValue:R$})}return t.length>s&&i.push({stringValue:YDe}),i}function CHt(t,e,n,o){const i=[];for(const r in t)if(xOo.call(t,r)){if(!r){e?.debug("Dropping an attribute with an empty key");continue}if(i.length>=1e3||0>=n.remainingNodes){e?.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{const s=t[r];if(Id(s)||Eo(s))continue;i.push({key:WO(r),value:jDe(s,e,n,o)})}catch{i.push({key:WO(r),value:{stringValue:R$}})}}return i}function yHt(t,e,n){return sn(sn(sn(sn({},qLt({},t.resourceAttributes)),{},{"service.name":t.serviceName||"unknown_service"},t.environment&&{"deployment.environment":t.environment}),t.serviceVersion&&{"service.version":t.serviceVersion}),{},{"telemetry.sdk.name":e,"telemetry.sdk.version":n})}const BOo=["service.name","deployment.environment","service.version","telemetry.sdk.name","telemetry.sdk.version"];function xHt(t,e){const n=qLt({},t),o={};for(const i of BOo)({}).hasOwnProperty.call(n,i)&&(o[i]=n[i],delete n[i]);return[...xge(n,e),...xge(o,e)]}const EHt={darwin:"macOS",win32:"Windows",cygwin:"Windows",linux:"Linux",android:"Android",freebsd:"FreeBSD",openbsd:"OpenBSD",netbsd:"NetBSD",sunos:"SunOS",aix:"AIX",haiku:"Haiku","Mac OS X":"macOS"},BHt={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},bOo=BHt.info;function SOo(t){try{return WO(String(t))}catch{return R$}}function QOo(t,e,n,o){const i=t.level||"info",{text:r,number:s}=BHt[i]||bOo,a=(function(g=Date.now()){return String(g)+"000000"})(Ah(o)?o:void 0),A={};e.distinctId&&(A.posthogDistinctId=e.distinctId),e.sessionId&&(A.sessionId=e.sessionId),e.windowId&&(A["window.id"]=e.windowId),Hs(e.sessionStartTimestamp)||(A.sessionStartTimestamp=String(e.sessionStartTimestamp)),Hs(e.lastActivityTimestamp)||(A.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(A["url.full"]=e.currentUrl),e.screenName&&(A["screen.name"]=e.screenName),e.appState&&(A["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(A.feature_flags=e.activeFeatureFlags);const c=sn({},A),l=t.attributes;if(l){let g=[];try{g=Object.keys(l)}catch{g=[]}for(const h of g){let d;try{d=l[h]}catch{d=R$}Object.defineProperty(c,h,{value:d,enumerable:!0,writable:!0,configurable:!0})}}const u={timeUnixNano:a,observedTimeUnixNano:a,severityNumber:s,severityText:r,body:{stringValue:SOo(t.body)},attributes:xge(c,n)};return t.trace_id&&(u.traceId=t.trace_id),t.span_id&&(u.spanId=t.span_id),Eo(t.trace_flags)||(u.flags=t.trace_flags),u}function bHt(t,e,n){return yHt(t,e,n)}function SHt(t,e,n,o){return{resourceLogs:[{resource:{attributes:xHt(e)},scopeLogs:[{scope:{name:n,version:o},logRecords:t}]}]}}var QHt=class{constructor(e){this.ls=e,this.us=0}get pending(){return!!this.hs}arm(e){this.clear(),this.us=Date.now()+e,this.hs=nHt(()=>{this.hs=void 0,this.ls()},e)}armNoEarlierThan(e){this.hs&&Date.now()+e<=this.us||this.arm(e)}clear(){this.hs&&(clearTimeout(this.hs),this.hs=void 0)}};function vHt(){return .75+.5*Math.random()}function wHt(t,e,n,o){const i=Math.min(Math.max(0,e-1),6),r=t*Math.pow(2,i);return Math.round(Math.min(r,Math.max(o,t))*n)}var vOo=class{constructor(e,n,o,i,r,s=()=>Promise.resolve(),a){var A;this._instance=e,this.Mr=n,this.A=o,this.cs=i,this.ds=r,this.vs=s,this.fs=a,this.ps=new QHt(()=>this.gs()),this.ys=null,this.bs=0,this._s=0,this.ws=new XLt,this.ks=0,this.Ss=1,this.xs=0,this.$s=0,this.Cs=!1,this.Ts=n.maxBufferSize,this.Is=Math.max((A=n.maxQueueSize)!==null&&A!==void 0?A:n.maxBufferSize,n.maxBufferSize),this.Ms=n.flushIntervalMs,this.Es=n.maxBatchRecordsPerPost,this.Ps=n.rateCapWindowMs,this.Rs=n.maxLogsPerInterval}clearQueue(){this._s++,this._instance.setPersistedProperty(l6.LogsQueue,[])}reset(){this.ps.clear(),this.xs=0,this.$s=0,this.Cs=!1,this.ks=0,this.Ss=1,this.ws.reset(),this.Es=this.Mr.maxBatchRecordsPerPost}onReconnect(){this.ks=0,this.Ss=1,this.ws.isOpen()?this.As()&&this.Os():this.gs()}captureLog(e,n){var o;if(this._instance.isDisabled||this._instance.optedOut||!e?.body)return;const i=this.Fs(e);if(i===null)return;if(!i.body)return void this.A.info("Log was rejected in beforeSend function");if(!this.Ds())return;const r={record:QOo(i,(o=n?.context)!==null&&o!==void 0?o:this.cs(),this.A,n?.occurredAtMs)};this.ds(()=>this.Ls(r))}Fs(e){const n=this.Mr.beforeSend;if(!n)return e;const o=As(n)?n:[n];let i=e;for(const r of o)try{const s=r(i);if(!s)return this.A.info("Log was rejected in beforeSend function"),null;i=s}catch(s){return this.A.error("Error in beforeSend function for log:",s),null}return i}Ds(){if(this.Rs===void 0)return!0;const e=Date.now(),n=e-this.xs;return this.Ps>n&&n>=0||(this.xs=e,this.$s=0,this.Cs=!1),this.Rs>this.$s?(this.$s++,!0):(this.Cs||(this.A.warn(`captureLog dropping logs: exceeded ${this.Rs} logs per ${this.Ps}ms`),this.Cs=!0),!1)}flush(){var e=this;return Zu(function*(){if(!e._instance.isDisabled)return e.ys||(e.ys=e.Ns().finally(()=>{e.ys=null})),e.ys})()}Ns(){var e=this;return Zu(function*(){var n;e.ps.clear();let o=(n=e._instance.getPersistedProperty(l6.LogsQueue))!==null&&n!==void 0?n:[];if(o.length===0)return;const i=o.length;let r=0;for(;o.length>0&&i>r;){var s,a;const A=e._s;e.bs=0;const c=Math.min(o.length,e.Es),l=o.slice(0,c),u=SHt(l.map(h=>h.record),e.qs(),(s=e.fs)!==null&&s!==void 0?s:e._instance.getLibraryId(),e._instance.getLibraryVersion()),g=yield e._instance.js(u);if(e._s!==A)return;if(g.kind==="too-large"&&l.length>1)e.Es=Math.max(1,Math.floor(l.length/2)),e.A.warn(`Logs batch of size ${l.length} was too large for the ingestion endpoint, reducing batch size to ${e.Es}`);else if(e.ws.record(g),e.ps.pending&&e.ps.arm(Math.max(e.Ms,e.ws.remainingMs())),g.kind==="retry-later"||(g.kind==="too-large"?e.A.warn("Dropping a single log record with batch size 1 — the record is larger than the server cap and cannot be split further."):g.kind==="ok"&&e.Mr.maxBatchRecordsPerPost>e.Es&&(e.Es=Math.min(e.Mr.maxBatchRecordsPerPost,e.Es+1)),yield e.Bs(l.length),o=(a=e._instance.getPersistedProperty(l6.LogsQueue))!==null&&a!==void 0?a:[],r+=l.length,g.kind==="fatal"))throw g.error}})()}Bs(e){var n=this;return Zu(function*(){var o;const i=Math.max(0,e-n.bs),r=(o=n._instance.getPersistedProperty(l6.LogsQueue))!==null&&o!==void 0?o:[];n._instance.setPersistedProperty(l6.LogsQueue,r.slice(i)),yield n.vs()})()}qs(){return bHt(this.Mr,this._instance.getLibraryId(),this._instance.getLibraryVersion())}Ls(e){var n;if(this._instance.optedOut)return;const o=(n=this._instance.getPersistedProperty(l6.LogsQueue))!==null&&n!==void 0?n:[];this.Is>o.length||(o.shift(),this.bs++,this.A.info("Logs queue is full, dropping oldest record.")),o.push(e),this._instance.setPersistedProperty(l6.LogsQueue,o),this.Ts>o.length||this.ws.isOpen()?this.Os():this.gs()}Os(){this.ps.pending||this.ps.arm(Math.max(this.Ms,this.ws.remainingMs()))}Hs(){return Math.max(wHt(this.Ms,this.ks,this.Ss,3e4),this.ws.remainingMs())}As(){const e=this._instance.getPersistedProperty(l6.LogsQueue);return!!e&&e.length>0}shutdown(e){var n=this;return Zu(function*(){n.ps.clear();const o=n.flush().catch(()=>{});e!==void 0?yield oHt(o,e):yield o})()}flushWithTimeout(e){var n=this;return Zu(function*(){const o=n.flush();yield oHt(o,e,()=>{o.catch(()=>{})})})()}gs(){this.flush().then(()=>{this.ks=0,this.Ss=1},e=>{this.ks++,this.Ss=vHt(),this.A.error("PostHog logs flush failed:",e)}).finally(()=>{!this._instance.isDisabled&&this.As()&&this.ps.armNoEarlierThan(this.Hs())})}};const $De=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function PHt(t){return String(t)+"000000"}function MHt(t,e,n,o){let i="";return o&&(i=Object.keys(o).sort().map(r=>`${JSON.stringify(r)}:${JSON.stringify(o[r])}`).join(",")),`${t}\0${e}\0${n??""}\0${i}`}var wOo=class{constructor(e,n,o){this._instance=e,this.Mr=n,this.A=o,this.zs=new Map,this.ps=new QHt(()=>this.flush().catch(i=>{this.A.error("Metrics flush failed:",i)})),this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.ws=new XLt,this.ks=0,this.Ss=1,this.Gs=0}count(e,n=1,o){this.Qs({name:e,type:"count",value:n,unit:o?.unit,attributes:o?.attributes})}gauge(e,n,o){this.Qs({name:e,type:"gauge",value:n,unit:o?.unit,attributes:o?.attributes})}histogram(e,n,o){this.Qs({name:e,type:"histogram",value:n,unit:o?.unit,attributes:o?.attributes})}flush(){var e=this;const n=this.ys,o=(function(){var i=Zu(function*(){n&&(yield n.catch(()=>{})),yield e.Js()});return function(){return i.apply(this,arguments)}})()().finally(()=>{this.ys===o&&(this.ys=null)});return this.ys=o,o}drainWindow(){if(this.zs.size===0)return null;const e=this.zs;return this.zs=new Map,this.Us=!1,this.Ws=new Map,this.Vs=new Set,this.Zs(e)}reset(){this.Gs++,this.ws.reset(),this.ks=0,this.Ss=1,this.ps.clear(),this.zs=new Map,this.ys=null,this.Us=!1,this.Ws=new Map,this.Vs=new Set}Qs(e){if(this._instance.isDisabled||this._instance.optedOut)return;const n=this.Fs(e);if(n===null)return;if(!n.name||typeof n.name!="string")return void this.A.warn("Dropping metric with empty name");if(typeof n.value!="number"||!Number.isFinite(n.value))return void this.A.warn(`Dropping metric '${n.name}': value must be a finite number`);if(n.type==="count"&&0>n.value)return void this.A.warn(`Dropping count '${n.name}': counters are monotonic, value must be >= 0`);let o,i;try{o=n.attributes?sn({},n.attributes):void 0,i=MHt(n.type,n.name,n.unit,o)}catch(a){return void this.A.warn(`Dropping metric '${n.name}': attributes could not be serialized`,a)}let r=this.zs.get(i);if(!r){if(!this.Ks())return;r={name:n.name,type:n.type,unit:n.unit,attributes:o,windowStartMs:Date.now()},this.zs.set(i,r)}const s=this.Ws.get(n.name);s===void 0?this.Ws.set(n.name,n.type):s===n.type||this.Vs.has(n.name)||(this.Vs.add(n.name),this.A.warn(`Metric name '${n.name}' is already used as a ${s}; recording it as a ${n.type} too will blend both series in charts. Use a distinct name.`)),this.Xs(r,n.value),this.Os()}Ks(){return this.Mr.maxSeriesPerFlush>this.zs.size||(this.Us||(this.Us=!0,this.A.warn(`Metric series cap reached (${this.Mr.maxSeriesPerFlush} per flush window); dropping new series until the next flush. Reduce attribute cardinality.`)),!1)}Xs(e,n){switch(e.type){case"count":var o;e.total=((o=e.total)!==null&&o!==void 0?o:0)+n;break;case"gauge":e.last=n;break;case"histogram":{e.hist||(e.hist={count:0,sum:0,min:n,max:n,bucketCounts:new Array($De.length+1).fill(0)});const i=e.hist;i.count+=1,i.sum+=n,i.min=Math.min(i.min,n),i.max=Math.max(i.max,n),i.bucketCounts[(function(r,s){for(let a=0;s.length>a;a++)if(s[a]>=r)return a;return s.length})(n,$De)]+=1;break}}}Fs(e){const n=this.Mr.beforeSend;if(!n)return e;const o=As(n)?n:[n];let i=e;for(const r of o)try{const s=r(i);if(!s)return this.A.info("Metric was rejected in beforeSend function"),null;i=s}catch(s){return this.A.error("Error in beforeSend function for metric:",s),null}return i}Os(){this.ps.pending||this.ps.arm(this.Hs())}Hs(){return Math.max(wHt(this.Mr.flushIntervalMs,this.ks,this.Ss,3e4),this.ws.remainingMs())}Js(){var e=this;return Zu(function*(){if(e.ps.clear(),e.zs.size===0)return;const n=e.zs;e.zs=new Map,e.Us=!1,e.Ws=new Map,e.Vs=new Set;const o=e.Gs,i=yield e._instance.Ys(e.Zs(n));if(o===e.Gs)switch(e.ws.record(i),i.kind==="retry-later"?(e.ks++,e.Ss=vHt()):(e.ks=0,e.Ss=1),e.ps.pending&&e.ps.arm(e.Hs()),i.kind){case"ok":return;case"retry-later":return e.ho(n),void e.ps.armNoEarlierThan(e.Hs());case"too-large":return void e.A.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void e.A.error("Failed to send metrics batch:",i.error)}})()}Zs(e){return n=this.co(e),o=(function(s,a,A){return yHt(s,a,A)})(this.Mr,this._instance.getLibraryId(),this._instance.getLibraryVersion()),i=this._instance.getLibraryId(),r=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:xHt(o)},scopeMetrics:[{scope:{name:i,version:r},metrics:n}]}]};var n,o,i,r}co(e){const n=PHt(Date.now()),o=new Map;for(const a of e.values()){var i;const A=MHt(a.type,a.name,a.unit,void 0);let c=o.get(A);c||(c=sn({name:a.name},a.unit&&{unit:a.unit}),a.type==="count"?c.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:a.type==="gauge"?c.gauge={dataPoints:[]}:c.histogram={aggregationTemporality:1,dataPoints:[]},o.set(A,c));const l=xge((i=a.attributes)!==null&&i!==void 0?i:{},this.A),u=PHt(a.windowStartMs);if(a.type==="count"){var r;const g={attributes:l,startTimeUnixNano:u,timeUnixNano:n,asDouble:(r=a.total)!==null&&r!==void 0?r:0};c.sum.dataPoints.push(g)}else if(a.type==="gauge"){var s;const g={attributes:l,timeUnixNano:n,asDouble:(s=a.last)!==null&&s!==void 0?s:0};c.gauge.dataPoints.push(g)}else a.hist&&c.histogram.dataPoints.push({attributes:l,startTimeUnixNano:u,timeUnixNano:n,count:a.hist.count,sum:a.hist.sum,min:a.hist.min,max:a.hist.max,bucketCounts:a.hist.bucketCounts,explicitBounds:$De})}return Array.from(o.values())}ho(e){for(const[i,r]of e){const s=this.zs.get(i);if(s)switch(s.windowStartMs=Math.min(s.windowStartMs,r.windowStartMs),s.type){case"count":var n,o;s.total=((n=s.total)!==null&&n!==void 0?n:0)+((o=r.total)!==null&&o!==void 0?o:0);break;case"gauge":break;case"histogram":if(r.hist)if(s.hist){s.hist.count+=r.hist.count,s.hist.sum+=r.hist.sum,s.hist.min=Math.min(s.hist.min,r.hist.min),s.hist.max=Math.max(s.hist.max,r.hist.max);for(let a=0;s.hist.bucketCounts.length>a;a++)s.hist.bucketCounts[a]+=r.hist.bucketCounts[a]}else s.hist=r.hist}else this.Ks()&&this.zs.set(i,r)}}};const DHt=(t,{debugEnabled:e}={})=>{const n={N(o,...i){Fn&&(Ob.DEBUG||Fn.POSTHOG_DEBUG||e)&&!Eo(Fn.console)&&Fn.console&&("__rrweb_original__"in Fn.console[o]?Fn.console[o].__rrweb_original__:Fn.console[o])(t,...i)},debug(...o){n.N("debug",...o)},info(...o){n.N("log",...o)},warn(...o){n.N("warn",...o)},error(...o){n.N("error",...o)},critical(...o){console.error(t,...o)},uninitializedWarning(o){n.error(`You must initialize PostHog before calling ${o}`)},createLogger:(o,i)=>DHt(`${t} ${o}`,i)};return n},ui=DHt("[PostHog.js]"),Cd=ui.createLogger,POo=Cd("[ExternalScriptsLoader]"),Ege=t=>{const e=No?.querySelectorAll("script");if(e){for(let n=0;e.length>n;n++)if(e[n].src===t||e[n].getAttribute("src")===t)return e[n]}},IR=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return POo.warn(`${e} was requested but loading of external scripts is disabled.`),n("Loading of external scripts is disabled");const o=Ege(e);if(o){if(o.__posthog_loading_callback_fired)return n();const r=o.__posthog_loading_error;return r?n(r):(o.addEventListener("load",s=>{o.__posthog_loading_callback_fired=!0,n(void 0,s)}),void o.addEventListener("error",s=>{o.__posthog_loading_error=s,n(s)}))}const i=()=>{if(!No)return n("document not found");if(Ege(e))return IR(t,e,n);let r=No.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=e,r.onload=a=>{r.__posthog_loading_callback_fired=!0,n(void 0,a)},r.onerror=a=>{r.__posthog_loading_error=a,n(a)},t.config.prepare_external_dependency_script&&(r=t.config.prepare_external_dependency_script(r)),!r)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")No.head.appendChild(r);else{const a=No.querySelectorAll("body > script");var s;a.length>0?(s=a[0].parentNode)===null||s===void 0||s.insertBefore(r,a[0]):No.body.appendChild(r)}};No?.body?i():No?.addEventListener("DOMContentLoaded",i)},qDe={},NHt=(t,e)=>{let n=`/static/${e}.js?v=${t.version}`;return e==="toolbar"&&(n=`${n}&t=${Math.floor(Date.now()/3e5)*3e5}`),t.requestRouter.endpointFor("assets",n)};Vr.__PosthogExtensions__=Vr.__PosthogExtensions__||{},Vr.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e==="remote-config"){const i=t.requestRouter.endpointFor("assets",`/array/${t.config.token}/config.js`);return void IR(t,i,n)}const o=t.config.strict_script_versioning;if(o){const i=t.requestRouter.endpointFor("assets",`/static/${t.version}/${e}.js`),r=qDe[i];if(o==="fallback"&&r){if(Ege(r))return void IR(t,r,n);delete qDe[i]}return void IR(t,i,o==="fallback"?(s,a)=>{if(s)if(typeof s=="string")n(s);else{var A;const c=NHt(t,e);qDe[i]=c;const l=Ege(i);l==null||(A=l.parentNode)===null||A===void 0||A.removeChild(l),IR(t,c,n)}else n(void 0,a)}:n)}IR(t,NHt(t,e),n)},Vr.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{const o=t.requestRouter.endpointFor("api",e);IR(t,o,n)},Ob.DEBUG=!1,Ob.LIB_VERSION="1.435.8",Ob.LIB_NAME="web";var n_=Ob;const MOo="$people_distinct_id",RB="distinct_id",XDe="$device_id",ZDe="$device_model",Bge="__alias",DOo="__cmpns",RHt="$fbc",jO="$fbc_persistence",THt="$fbp",F$="$fbp_persistence",eNe="__timers",kHt="$autocapture_disabled_server_side",tNe="$heatmaps_enabled_server_side",nNe="$exception_capture_enabled_server_side",FHt="$error_tracking_suppression_rules",oNe="$error_tracking_capture_extension_exceptions",iNe="$web_vitals_enabled_server_side",rNe="$dead_clicks_enabled_server_side",sNe="$product_tours_enabled_server_side",LHt="$logs_capture_enabled_server_side",HHt="$web_vitals_allowed_metrics",L$="$session_recording_remote_config",NOo="$session_recording_enabled_server_side",ROo="$replay_sample_rate",TOo="$replay_override_sampling",kOo="$replay_override_linked_flag",FOo="$replay_override_url_trigger",LOo="$replay_override_event_trigger",$O="$sesid",OHt="$session_is_sampled",HOo="$session_past_minimum_duration",OOo="$session_recording_url_trigger_activated_session",GOo="$session_recording_event_trigger_activated_session",YOo="$debug_first_full_snapshot_timestamp",UOo="$sess_rec_flush_size",TB="$enabled_feature_flags",Yb="$active_feature_flags",aNe="$early_access_features",CR="$feature_flag_details",Dw="$feature_flag_payloads",yR="$feature_flag_request_id",H$="$minimal_flag_called_events",g6="$override_feature_flags",xR="$override_feature_flag_payloads",Nw="$stored_person_properties",Rw="$stored_group_properties",GHt="$groups",O$="$surveys",bge="$surveys_loaded_at",YHt="$surveys_activated",UHt="$surveys_activated_session",KHt="$surveys_activated_timestamps",ANe="ph_product_tours",KOo="$product_tours_activated",VOo="$product_tours_activated_session",zOo="$conversations_widget_session_id",JOo="$conversations_ticket_id",WOo="$conversations_widget_state",jOo="$conversations_user_traits",Tw="$flag_call_reported",G$="$flag_call_reported_session_id",Y$="$feature_flag_errors",kw="$feature_flag_evaluated_at",qy="$user_state",cNe="$client_session_props",$Oo="$capture_rate_limit",VHt="$initial_campaign_params",zHt="$initial_referrer_info",qO="$initial_person_info",lNe="$epp",uNe="$posthog_cookieless",JHt="$cookieless_mode",WHt="$sdk_debug_extensions_init_method",jHt="$sdk_debug_extensions_init_time_ms",gNe="$sdk_debug_recording_script_not_loaded",dNe="$sdk_debug_replay_stale_config",$Ht="$sdk_debug_replay_event_trigger_status",qHt="$sdk_debug_replay_linked_flag_trigger_status",XHt="$sdk_debug_replay_matched_recording_trigger_groups",ZHt="$sdk_debug_replay_pending_trigger_conditions",eOt="$sdk_debug_replay_remote_trigger_matching_config",tOt="$sdk_debug_replay_trigger_groups_count",nOt="$sdk_debug_replay_url_trigger_status",qOo="$session_recording_start_reason",hNe="PostHog loadExternalDependency extension not found.",Ub="anonymous",Sge="identified",oOt="identified_only",U$="visibilitychange",Qge="beforeunload",pNe="$pageview",iOt="$pageleave",rOt="$identify",sOt="$groupidentify";function XO(t,e){As(t)&&t.forEach(e)}function kl(t,e){if(!Hs(t))if(As(t))t.forEach(e);else if((n=>n instanceof FormData)(t))t.forEach((n,o)=>e(n,o));else for(const n in t)MDe.call(t,n)&&e(t[n],n)}const eg=function(t,...e){for(const n of e)for(const o in n)n[o]!==void 0&&(t[o]=n[o]);return t};function vge(t){const e=Object.keys(t);let n=e.length;const o=new Array(n);for(;n--;)o[n]=[e[n],t[e[n]]];return o}const XOo=function(t){return function(...e){try{return t.apply(this,e)}catch(n){ui.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ui.critical(n)}}},mNe=function(t){const e={};return kl(t,function(n,o){(rA(n)&&n.length>0||Ah(n))&&(e[o]=n)}),e};function aOt(t){const e=sn({},t);for(const n of["name","message","stack","cause","errors"])try{n in t&&(e[n]=t[n])}catch{}return e}const ZOo=["herokuapp.com","vercel.app","netlify.app"];function eGo(t){const e=t?.hostname;if(!rA(e))return!1;const n=e.split(".").slice(-2).join(".");for(const o of ZOo)if(n===o)return!1;return!0}function el(t,e,n,o){const{capture:i=!1,passive:r=!0}=o??{};t?.addEventListener(e,n,{capture:i,passive:r})}function _Ne(t){return t.name==="ph_toolbar_internal"}const K$=t=>{if(No){try{const e=t+"=",n=No.cookie.split(";").filter(o=>o.length);for(let o=0;n.length>o;o++){let i=n[o];for(;i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Ah(t)&&isFinite(t)&&Math.floor(t)===t});var tGo=class Eit{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,o,i){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(o)||!Number.isInteger(i)||0>e||0>n||0>o||0>i||e>0xffffffffffff||n>4095||o>1073741823||i>4294967295)throw new RangeError("invalid field value");const r=new Uint8Array(16);return r[0]=e/Math.pow(2,40),r[1]=e/Math.pow(2,32),r[2]=e/Math.pow(2,24),r[3]=e/Math.pow(2,16),r[4]=e/256,r[5]=e,r[6]=112|n>>>8,r[7]=n,r[8]=128|o>>>24,r[9]=o>>>16,r[10]=o>>>8,r[11]=o,r[12]=i>>>24,r[13]=i>>>16,r[14]=i>>>8,r[15]=i,new Eit(r)}toString(){let e="";for(let n=0;this.bytes.length>n;n++)e=e+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Eit(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(let n=0;16>n;n++){const o=this.bytes[n]-e.bytes[n];if(o!==0)return Math.sign(o)}return 0}},nGo=class{generate(){const e=this.generateOrAbort();if(!Eo(e))return e;{this.Ct=0;const n=this.generateOrAbort();if(Eo(n))throw new Error("Could not generate UUID after timestamp reset");return n}}generateOrAbort(){const e=(()=>{const n=Date.now();return Ah(n)&&isFinite(n)?Math.min(Math.max(Math.floor(n),0),0xffffffffffff):0})();if(e>this.Ct)this.Ct=e,this.It();else{if(this.Ct>=e+1e4)return;this.Mt++,this.Mt>4398046511103&&(this.Ct++,this.It())}return tGo.fromFieldsV7(this.Ct,Math.trunc(this.Mt/Math.pow(2,30)),this.Mt&Math.pow(2,30)-1,this.Tt.nextUint32())}It(){this.Mt=1024*this.Tt.nextUint32()+(1023&this.Tt.nextUint32())}constructor(){this.Ct=0,this.Mt=0,this.Tt=new oGo}};let AOt=t=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(let e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};Fn&&!Eo(Fn.crypto)&&crypto.getRandomValues&&(AOt=t=>crypto.getRandomValues(t));var oGo=class{nextUint32(){return this.Rt.length>this.At||(AOt(this.Rt),this.At=0),this.Rt[this.At++]}constructor(){this.Rt=new Uint32Array(8),this.At=1/0}};let cOt;const kB=()=>iGo().toString(),iGo=()=>(cOt||(cOt=new nGo)).generate();let V$="";const rGo=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;let ZO=null;const yd={Et(){if(!Id(ZO))return ZO;if(ZO=!1,No)try{const t=`__ph_cookie_support_${kB()}`;yd.$t(t,"xyz"),ZO=K$(t)==='"xyz"',yd.Pt(t)}catch{ZO=!1}return ZO},Dt(t){ui.error("cookieStore error: "+t)},Ot:K$,Lt(t){let e;try{e=JSON.parse(yd.Ot(t))||{}}catch{}return e},$t(t,e,n,o,i){if(!No)return!1;try{let r="",s="";const a=(function(c,l){if(l){let u=(function(g,h=No){if(V$)return V$;if(!h||["localhost","127.0.0.1"].includes(g))return"";const d=g.split(".");let p=Math.min(d.length,8);const m="dmn_chk_"+kB();for(;!V$&&p--;){const _=d.slice(p).join("."),f=m+"=1;domain=."+_+";path=/";h.cookie=f+";max-age=3",h.cookie.includes(m)&&(h.cookie=f+";max-age=0",V$=_)}return V$})(c);if(!u){const g=(h=>{const d=h.match(rGo);return d?d[0]:""})(c);g!==u&&ui.info("Warning: cookie subdomain discovery mismatch",g,u),u=g}return u?"; domain=."+u:""}return""})(No.location.hostname,o);if(n){const c=new Date;c.setTime(c.getTime()+864e5*n),r="; expires="+c.toUTCString()}i&&(s="; secure");const A=t+"="+encodeURIComponent(JSON.stringify(e))+r+"; SameSite=Lax; path=/"+a+s;return A.length>3686.4&&ui.warn("cookieStore warning: large cookie, len="+A.length),No.cookie=A,!0}catch{return!1}},Pt(t,e){if(No?.cookie&&(!e||!Id(K$(t))))try{yd.$t(t,"",-1,e)}catch{return}}};let fNe=null;const hc={Et(){if(!Id(fNe))return fNe;let t=!0;if(Eo(Fn))t=!1;else try{const e="__mplssupport__";hc.$t(e,"xyz"),hc.Ot(e)!=='"xyz"'&&(t=!1),hc.Pt(e)}catch{t=!1}return t||ui.error("localStorage unsupported; falling back to cookie store"),fNe=t,t},Dt(t){ui.error("localStorage error: "+t)},Ot(t){try{return Fn?.localStorage.getItem(t)}catch(e){hc.Dt(e)}return null},Lt(t){try{return JSON.parse(hc.Ot(t))||{}}catch{}return null},$t(t,e){try{return Fn?.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){hc.Dt(n)}return!1},Pt(t){try{Fn?.localStorage.removeItem(t)}catch(e){hc.Dt(e)}}},INe=[Nw,Yb,TB,CR,Dw,yR,kw,Y$,Tw],ER=[XDe,RB,$O,OHt,lNe,qO,jO,qy],wge=t=>t+"_cpm",sGo=["__proto__","constructor","prototype"],CNe=t=>{if(!QA(t))return{};const e={};return Object.keys(t).forEach(n=>{sGo.indexOf(n)===-1&&(e[n]=t[n])}),e},yNe=(t,e=[])=>{const n={};return[...ER,...e].forEach(o=>{const i=t[o];Eo(i)||Id(i)||i===""||(n[o]=i)}),n},lOt=t=>{let e=5381,n=2166136261;for(let o=0;t.length>o;o++){const i=t.charCodeAt(o);e=33*e^i,n=Math.imul(n^i,16777619)}return t.length.toString(36)+"."+(e>>>0).toString(36)+"."+(n>>>0).toString(36)},uOt=(t,e)=>({p:e,f:lOt(JSON.stringify(t))}),gOt=(t,e)=>{if(!e)return{properties:[],isValid:!1};try{const n=yd.Lt(wge(t)),o=n?.f===lOt(e)&&As(n.p);return{properties:o?n.p:[],isValid:o}}catch{return{properties:[],isValid:!1}}},xNe=(t,e)=>e+"|"+(yd.Ot(wge(t))||""),eG={},ENe={Et:()=>!0,Dt(t){ui.error("memoryStorage error: "+t)},Ot:t=>t in eG?eG[t]:null,Lt:t=>t in eG?eG[t]:null,$t:(t,e)=>(eG[t]=e,!0),Pt(t){delete eG[t]}};let BR=null;const nu={Et(){if(!Id(BR))return BR;if(BR=!0,Eo(Fn))BR=!1;else try{const t="__support__";nu.$t(t,"xyz"),nu.Ot(t)!=='"xyz"'&&(BR=!1),nu.Pt(t)}catch{BR=!1}return BR},Dt(t){ui.error("sessionStorage error: ",t)},Ot(t){try{return Fn?.sessionStorage.getItem(t)}catch(e){nu.Dt(e)}return null},Lt(t){try{return JSON.parse(nu.Ot(t))||null}catch{}return null},$t(t,e){try{return Fn?.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){nu.Dt(n)}return!1},Pt(t){try{Fn?.sessionStorage.removeItem(t)}catch(e){nu.Dt(e)}}};var aGo=class{constructor(e){this._instance=e}get Mr(){return this._instance.config}get consent(){return this.Do()?0:this.Lo}isOptedOut(){return this.Mr.cookieless_mode==="always"||this.isRejected()||this.consent===-1&&this.Mr.cookieless_mode==="on_reject"}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Mr.opt_out_capturing_by_default}optInOut(e){this.No.$t(this.qo,e?1:0,this.Mr.cookie_expiration,this.Mr.cross_subdomain_cookie,this.Mr.secure_cookie)}reset(){this.No.Pt(this.qo,this.Mr.cross_subdomain_cookie)}get qo(){const{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:o}=this._instance.config;return o||(n?n+e:"__ph_opt_in_out_"+e)}get Lo(){const e=this.No.Ot(this.qo);return NDe(e)?1:as(DHo,e)?0:-1}get No(){const e=this.Mr.opt_out_capturing_persistence_type,n=e==="localStorage"?hc:yd,o=n.Et()?n:ENe;if(!this.jo||this.jo!==o){this.jo=o;const i=e==="localStorage"?yd:hc;i.Ot(this.qo)&&(this.jo.Ot(this.qo)||this.optInOut(NDe(i.Ot(this.qo))),i.Pt(this.qo,this.Mr.cross_subdomain_cookie))}return this.jo}Do(){return!!this.Mr.respect_dnt&&[tf?.doNotTrack,tf?.msDoNotTrack,Vr.doNotTrack,tf?.globalPrivacyControl].some(e=>NDe(e))}};function dOt(t,e){var n;const o=t==null||(n=t.config)===null||n===void 0?void 0:n.get_current_url;if(!nf(o))return e;try{const i=o(e);return rA(i)&&i?i:e}catch(i){return ui.error("Error in get_current_url, falling back to window.location.href",i),e}}function hOt(t){var e;return t instanceof Element&&(t.id==="__POSTHOG_TOOLBAR__"||!!(!((e=t.closest)===null||e===void 0)&&e.call(t,".toolbar-global-fade-container")))}function d6(t){return!!t&&t.nodeType===1}function AI(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function pOt(t){return!!t&&t.nodeType===3}function BNe(t){return!!t&&t.nodeType===11&&d6(t.host)}function bNe(t){return t?rge(t).split(/\s+/):[]}function mOt(t,e){const n=(function(o){var i;const r=Fn==null||(i=Fn.location)===null||i===void 0?void 0:i.href;return Eo(r)?void 0:dOt(o,r)})(e);return!!(n&&t&&t.some(o=>n.match(o)))}function tG(t){let e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return bNe(e)}function _Ot(t){return Hs(t)?null:rge(t).split(/(\s+)/).filter(e=>j$(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function z$(t){let e="";return nG(t)&&!W$(t)&&t.childNodes&&t.childNodes.length&&kl(t.childNodes,function(n){var o;pOt(n)&&n.textContent&&(e+=(o=_Ot(n.textContent))!==null&&o!==void 0?o:"")}),rge(e)}function J$(t){var e;return Eo(t.target)?t.srcElement||null:!((e=t.target)===null||e===void 0)&&e.shadowRoot?t.composedPath()[0]||null:t.target||null}const SNe=["a","button","form","input","select","textarea","label"];function QNe(t,e){const n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector;try{return!!n&&n.call(t,e)}catch{return!1}}function vNe(t,e){if(Eo(e))return!0;for(const n of t)if(e.some(o=>QNe(n,o)))return!0;return!1}function fOt(t){const e=t.parentNode;return!(!e||!d6(e))&&e}const wNe=[".ph-no-autocapture","[data-ph-no-autocapture]"],IOt=["next","previous","prev",">","<"],AGo=[...IOt,"+","-","−","–"],COt=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,yOt=[".ph-no-rageclick",".ph-no-capture"],cGo=["","text","search","email","password","url","tel","number"];function xOt(t,e){if(!Fn||PNe(t))return!1;let n,o,i;var r,s;if($y(e)?(n=!!e&&yOt,o=void 0,i=!1):(n=(r=e?.css_selector_ignorelist)!==null&&r!==void 0?r:yOt,o=e?.content_ignorelist,i=(s=e?.ignore_text_selection)!==null&&s!==void 0&&s),n===!1||i&&(function(A){return!(!A||!d6(A))&&(!!AI(A,"textarea")||(AI(A,"input")?as(cGo,(A.getAttribute("type")||"").toLowerCase()):(function(c){var l;if(c.isContentEditable)return!0;const u=(l=c.getAttribute)===null||l===void 0?void 0:l.call(c,"contenteditable");return u==="true"||u===""})(A)))})(t))return!1;const{targetElementList:a}=EOt(t,!1);return!(function(A,c){if(A===!1||Eo(A))return!1;let l;if(A===!0)l=IOt;else{if(!As(A))return!1;if(A.length>10)return ui.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;l=A.map(u=>u.toLowerCase())}return c.some(({safeText:u,ariaLabel:g})=>l.some(h=>COt(u,h)||COt(g,h)))})(o,a.map(A=>{var c;return{safeText:z$(A).toLowerCase(),ariaLabel:((c=A.getAttribute("aria-label"))===null||c===void 0?void 0:c.toLowerCase().trim())||""}}))&&!vNe(a,n)}const PNe=t=>!t||AI(t,"html")||!d6(t),EOt=(t,e)=>{if(!Fn||PNe(t))return{parentIsUsefulElement:!1,targetElementList:[]};let n=!1;const o=[t];let i=t;for(;i.parentNode&&!AI(i,"body");){if(BNe(i.parentNode)){o.push(i.parentNode.host),i=i.parentNode.host;continue}const r=fOt(i);if(!r)break;if(e||SNe.indexOf(r.tagName.toLowerCase())>-1)n=!0;else try{const s=Fn.getComputedStyle(r);s&&s.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}o.push(r),i=r}return{parentIsUsefulElement:n,targetElementList:o}};function nG(t){const e=new Set;let n=0;for(let r=t;r.parentNode&&!AI(r,"body");r=r.parentNode){if(n++>=1e3||e.has(r))return!1;e.add(r);const s=tG(r);if(as(s,"ph-sensitive")||as(s,"ph-no-capture"))return!1}if(as(tG(t),"ph-include"))return!0;const o=t.type||"";if(rA(o))switch(o.toLowerCase()){case"hidden":case"password":return!1}const i=t.name||t.id||"";return!rA(i)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,""))}function W$(t){return!!(AI(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||AI(t,"select")||AI(t,"textarea")||t.getAttribute("contenteditable")==="true")}const BOt=new RegExp("^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$"),bOt=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,lGo=[16,15,14,13],uGo=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),SOt=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),QOt=/[0-9A-Za-z_]/;function gGo(t){let e=0,n=!1;for(let o=t.length-1;o>=0;o--){let i=t.charCodeAt(o)-48;n&&(i*=2,i>9&&(i-=9)),e+=i,n=!n}return e%10==0}function j$(t,e=!0){return!(Hs(t)||rA(t)&&(t=rge(t),(e?BOt.test((t||"").replace(/[- ]/g,"")):(function(n){let o;for(bOt.lastIndex=0;o=bOt.exec(n);){const i=o[2];if(!i)continue;const r=i.replace(/[- ]/g,"");for(let s=0;r.length>s;s++)for(const a of lGo){const A=s+a;if(r.length>=A){const c=r.slice(s,A);if(BOt.test(c)&&gGo(c))return!0}}}return!1})(t))||(e?uGo.test(t):(function(n){let o;for(SOt.lastIndex=0;o=SOt.exec(n);){const i=o[1],r=o[3];if(!(i&&r&&QOt.test(i)&&QOt.test(r)))return!0}return!1})(t))))}function vOt(t){let e=z$(t);return e=`${e} ${wOt(t)}`.trim(),j$(e)?e:""}function wOt(t){let e="";return t&&t.childNodes&&t.childNodes.length&&kl(t.childNodes,function(n){var o;if(n&&((o=n.tagName)===null||o===void 0?void 0:o.toLowerCase())==="span")try{const i=z$(n);e=`${e} ${i}`.trim(),n.childNodes&&n.childNodes.length&&(e=`${e} ${wOt(n)}`.trim())}catch(i){ui.error("[AutoCapture]",i)}}),e}function POt(t){return t.replace(/"|\\"/g,'\\"')}function dGo(t){const e=t.attr__class;if(e)return As(e)?e:bNe(e)}const Pge=Cd("[Dead Clicks]"),hGo=()=>!0,pGo=t=>{var e;const n=!!(!((e=t.instance.persistence)===null||e===void 0)&&e.get_property(rNe)),o=t.instance.config.capture_dead_clicks;return $y(o)?o:!!QA(o)||n};var MOt=class{get lazyLoadedDeadClicksAutocapture(){return this.Bo}constructor(e,n,o){this.instance=e,this.isEnabled=n,this.onCapture=o,this.startIfEnabledOrStop()}onRemoteConfig(e){if(!e.ok)return;const n=e.config;"captureDeadClicks"in n&&(this.instance.persistence&&this.instance.persistence.register({[rNe]:n.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Ho(()=>{this.zo()}):this.stop()}Ho(e){var n,o,i;!((n=Vr.__PosthogExtensions__)===null||n===void 0)&&n.initDeadClicksAutocapture?e():(o=Vr.__PosthogExtensions__)===null||o===void 0||(i=o.loadExternalDependency)===null||i===void 0||i.call(o,this.instance,"dead-clicks-autocapture",r=>{r?Pge.error("failed to load script",r):e()})}zo(){var e;if(No){if(!this.Bo&&(!((e=Vr.__PosthogExtensions__)===null||e===void 0)&&e.initDeadClicksAutocapture)){const n=QA(this.instance.config.capture_dead_clicks)?sn({},this.instance.config.capture_dead_clicks):{};n.__onCapture=this.onCapture,this.onCapture&&(n.capture_dead_swipes=!1),this.Bo=Vr.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Bo.start(No),Pge.info("starting...")}}else Pge.error("`document` not found. Cannot start.")}stop(){this.Bo&&(this.Bo.stop(),this.Bo=void 0,Pge.info("stopping..."))}};const $$=Cd("[SegmentIntegration]");function DOt(t,e,n=!0){const o=t.config.segment;if(!o)return e();const{analytics:i,filterProperties:r}=(a=>nf(a.register))(s=o)?{analytics:s}:s;var s;(function(a,A,c,l){const u=h=>{const d=()=>h.anonymousId()||kB();a.config.get_device_id=d,l&&h.id()&&(a.register({distinct_id:h.id(),$device_id:d()}),a.persistence.set_property(qy,Sge)),c(l?void 0:h.anonymousId()||void 0)},g=A.user();"then"in g&&nf(g.then)?g.then(u):u(g)})(t,i,a=>{i.register(((A,c,{filterProperties:l}={})=>{typeof Promise<"u"&&Promise.resolve||$$.warn("This browser does not have Promise support, and can not use the segment integration");const u=(g,h)=>{if(!h)return g;const d=!!c&&g.event.anonymousId===c&&!g.event.userId;d||g.event.userId||g.event.anonymousId===A.get_distinct_id()||($$.info("No userId set, resetting PostHog"),A.reset()),d||(c=void 0),g.event.userId&&g.event.userId!==A.get_distinct_id()&&($$.info("UserId set, identifying with PostHog"),A.identify(g.event.userId));let p=A.calculateEventProperties(h,g.event.properties);if(!Hs(l)){const m=g.event.properties||{},_={};for(const I of Object.keys(p))MDe.call(m,I)||(_[I]=p[I]);const f=((I,C)=>{const y=As(I)?I:[I];let x=sn({},C);for(const E of y)try{if(x=E(x),Hs(x))return null}catch(B){return $$.error("Error in Segment filterProperties:",B),null}return x})(l,_);if(Hs(f))return g;p=f}return g.event.properties=Object.assign({},p,g.event.properties),g};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded(){return!0},load(){return Promise.resolve()},track(g){return u(g,g.event.event)},page(g){return u(g,pNe)},identify(g){return u(g,rOt)},screen(g){return u(g,"$screen")}}})(t,a,{filterProperties:r})).then(()=>{e()},A=>{$$.error("Failed to register the Segment integration",A),e()})},n)}const NOt="posthog-js";function ROt(t,{organization:e,projectId:n,prefix:o,severityAllowList:i=["error"],sendExceptionsToPostHog:r=!0}={}){return s=>{var a,A,c,l,u;if(i!=="*"&&!i.includes(s.level)||!t.__loaded)return s;s.tags||(s.tags={});const g=t.requestRouter.endpointFor("ui",`/project/${t.config.token}/person/${t.get_distinct_id()}`);s.tags["PostHog Person URL"]=g,t.sessionRecordingStarted()&&(s.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));const h=((a=s.exception)===null||a===void 0?void 0:a.values)||[],d=h.map(_=>sn(sn({},_),{},{stacktrace:_.stacktrace?sn(sn({},_.stacktrace),{},{type:"raw",frames:(_.stacktrace.frames||[]).map(f=>sn(sn({},f),{},{platform:"web:javascript"}))}):void 0})),p={$exception_message:((A=h[0])===null||A===void 0?void 0:A.value)||s.message,$exception_type:(c=h[0])===null||c===void 0?void 0:c.type,$exception_level:s.level,$exception_list:d,$sentry_event_id:s.event_id,$sentry_exception:s.exception,$sentry_exception_message:((l=h[0])===null||l===void 0?void 0:l.value)||s.message,$sentry_exception_type:(u=h[0])===null||u===void 0?void 0:u.type,$sentry_tags:s.tags};var m;return e&&n&&(p.$sentry_url=(o||"https://sentry.io/organizations/")+e+"/issues/?project="+n+"&query="+s.event_id),r&&((m=t.exceptions)===null||m===void 0||m.sendExceptionEvent(p)),s}}var mGo=class{constructor(e,n,o,i,r,s){this.name=NOt,this.setupOnce=function(a){a(ROt(e,{organization:n,projectId:o,prefix:i,severityAllowList:r,sendExceptionsToPostHog:s==null||s}))}}},TOt=class{constructor(e){this.Uo=(n,o,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength||i.crossTabAdoption)&&(ui.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:i}),this.Wo=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Vo()}Vo(){var e;this.Go=(e=this._instance.sessionManager)===null||e===void 0?void 0:e.onSessionId(this.Uo)}destroy(){var e;(e=this.Go)===null||e===void 0||e.call(this),this.Go=void 0}doPageView(e,n){var o;const i=this.Qo(e,n);return this.Wo={pathname:(o=Fn?.location.pathname)!==null&&o!==void 0?o:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),i}doPageLeave(e){var n;return this.Qo(e,(n=this.Wo)===null||n===void 0?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.Wo)===null||e===void 0?void 0:e.pageViewId}}Qo(e,n){const o=this.Wo;if(!o)return{$pageview_id:n};let i={$pageview_id:n,$prev_pageview_id:o.pageViewId};const r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){let{maxScrollHeight:s,lastScrollY:a,maxScrollY:A,maxContentHeight:c,lastContentY:l,maxContentY:u}=r;if(!(Eo(s)||Eo(a)||Eo(A)||Eo(c)||Eo(l)||Eo(u))){s=Math.ceil(s),a=Math.ceil(a),A=Math.ceil(A),c=Math.ceil(c),l=Math.ceil(l),u=Math.ceil(u);const g=s>1?u6(a/s,0,1,ui):1,h=s>1?u6(A/s,0,1,ui):1,d=c>1?u6(l/c,0,1,ui):1,p=c>1?u6(u/c,0,1,ui):1;i=eg(i,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:g,$prev_pageview_max_scroll:A,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:d,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:p})}}return o.pathname&&(i.$prev_pageview_pathname=o.pathname),o.timestamp&&(i.$prev_pageview_duration=(e.getTime()-o.timestamp.getTime())/1e3),i}};const q$=["flags","surveys"],_Go={[MOo]:{exposure:"hidden"},[Bge]:{exposure:"hidden"},[DOo]:{exposure:"hidden"},[eNe]:{exposure:"hidden"},[jO]:{exposure:"hidden"},[F$]:{exposure:"hidden"},[kHt]:{exposure:"event"},[tNe]:{exposure:"hidden"},[LHt]:{exposure:"hidden"},[nNe]:{exposure:"event"},[FHt]:{exposure:"hidden"},[oNe]:{exposure:"event"},[iNe]:{exposure:"event"},[rNe]:{exposure:"event"},[sNe]:{exposure:"hidden"},[HHt]:{exposure:"event"},[L$]:{exposure:"hidden"},[NOo]:{exposure:"hidden"},[$O]:{exposure:"hidden"},[OHt]:{exposure:"event"},[ROo]:{exposure:"event",shouldSkipFromEventProperties:t=>Id(t)},[HOo]:{exposure:"event"},[OOo]:{exposure:"event"},[GOo]:{exposure:"event"},[YOo]:{exposure:"event"},[UOo]:{exposure:"hidden"},[TB]:{exposure:"hidden",storageGroup:"flags"},[Yb]:{exposure:"hidden",storageGroup:"flags"},[aNe]:{exposure:"hidden"},[CR]:{exposure:"hidden",storageGroup:"flags"},[Dw]:{exposure:"hidden",storageGroup:"flags"},[yR]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[H$]:{exposure:"hidden",storageGroup:"flags"},[g6]:{exposure:"hidden"},[xR]:{exposure:"hidden"},[Nw]:{exposure:"hidden"},[Rw]:{exposure:"hidden"},[O$]:{exposure:"hidden",storageGroup:"surveys"},[bge]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[YHt]:{exposure:"event"},[UHt]:{exposure:"hidden"},[KHt]:{exposure:"hidden"},[ANe]:{exposure:"hidden"},[KOo]:{exposure:"hidden"},[VOo]:{exposure:"hidden"},[zOo]:{exposure:"event"},[JOo]:{exposure:"event"},[WOo]:{exposure:"event"},[jOo]:{exposure:"event"},[Tw]:{exposure:"hidden"},[G$]:{exposure:"hidden"},[GHt]:{exposure:"event"},[Y$]:{exposure:"hidden"},[kw]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[qy]:{exposure:"hidden"},[cNe]:{exposure:"hidden"},[$Oo]:{exposure:"hidden"},[VHt]:{exposure:"hidden"},[zHt]:{exposure:"hidden"},[qO]:{exposure:"hidden"},[lNe]:{exposure:"hidden"},[TOo]:{exposure:"event"},[kOo]:{exposure:"event"},[FOo]:{exposure:"event"},[LOo]:{exposure:"event"},[WHt]:{exposure:"event"},[jHt]:{exposure:"event"},[gNe]:{exposure:"hidden"},[dNe]:{exposure:"hidden"},[$Ht]:{exposure:"hidden"},[qHt]:{exposure:"hidden"},[XHt]:{exposure:"hidden"},[ZHt]:{exposure:"hidden"},[eOt]:{exposure:"hidden"},[tOt]:{exposure:"hidden"},[nOt]:{exposure:"hidden"},[qOo]:{exposure:"event"}},fGo=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],i1=t=>{const e=_Go[t];if(e)return e;for(const[n,o]of fGo)if(t.indexOf(n)===0)return o},oG=(t,e)=>{try{let n;return JSON.stringify(t,(o,i)=>{var r;return zO(i)?((r=n)!==null&&r!==void 0||(n=new WeakMap),n.has(i)||n.set(i,aOt(i)),n.get(i)):typeof i=="bigint"?i.toString():i},e)}catch{return hLt(t)}},Kb=t=>{const e=No?.createElement("a");return Eo(e)?null:(e.href=t,e)},iG=function(t,e){const n=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&");let o;for(let i=0;n.length>i;i++){const r=n[i].split("=");if(r[0]===e){o=r;break}}if(!As(o)||2>o.length)return"";{let i=o[1];try{i=decodeURIComponent(i)}catch{ui.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")}},X$=function(t,e,n){if(!t||!e||!e.length)return t;const o=t.split("#"),i=o[1],r=(o[0]||"").split("?"),s=r[1],a=r[0],A=(s||"").split("&"),c=[];for(let u=0;A.length>u;u++){const g=A[u].split("=");As(g)&&(e.includes(g[0])?c.push(g[0]+"="+n):c.push(A[u]))}let l=a;return s!=null&&(l+="?"+c.join("&")),i!=null&&(l+="#"+i),l},Mge=function(t,e){const n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},kOt=(t,e)=>t>=e&&dLt(),FOt=(t,e,n,o)=>{if(t===0){if(dLt()){const i=e+1;return i===n&&o(),i}return e}return 0},rG=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","oppref","irclid","_kx"],IGo=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...rG],Z$="<masked>",CGo=["li_fat_id"];function LOt(t,e,n){if(!No)return{};const o=e?[...rG,...n||[]]:[],i=HOt(X$(No.URL,o,Z$),t),r=(function(){const s={};return kl(CGo,function(a){const A=K$(a);s[a]=A||null}),s})();return eg(r,i)}function HOt(t,e){const n=IGo.concat(e||[]),o={};return kl(n,function(i){const r=iG(t,i);o[i]=r||null}),o}function OOt(t){const e=(function(i){return i?i.search("https?://(.*)google.([^/?]*)")===0?"google":i.search("https?://(.*)bing.com")===0?"bing":i.search("https?://(.*)yahoo.com")===0?"yahoo":i.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",o={};if(!Id(e)){o.$search_engine=e;const i=No?iG(No.referrer,n):"";i.length&&(o.ph_keyword=i)}return o}function GOt(){return navigator.language||navigator.userLanguage}function yGo(){const t=GOt();return typeof t=="string"?t.split("-")[0]:void 0}const Dge="$direct";function YOt(){return No?.referrer||Dge}function UOt(t,e,n=!1){const o=t?[...rG,...e||[]]:[],i=n?Mw(fd?.href):fd?.href,r=i?.substring(0,1e3);return{r:YOt().substring(0,1e3),u:r?X$(r,o,Z$):void 0}}function KOt(t,e=!1){var n;const{r:o,u:i}=t,r=e?Mw(i):i,s={$referrer:o,$referring_domain:o==null?void 0:o==Dge?Dge:(n=Kb(o))===null||n===void 0?void 0:n.host};if(r){s.$current_url=r;const a=Kb(r);s.$host=a?.host,s.$pathname=a?.pathname;const A=HOt(r);eg(s,A)}if(o){const a=OOt(o);eg(s,a)}return s}function VOt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function xGo(){try{return new Date().getTimezoneOffset()}catch{return}}const EGo={flags:kw,surveys:bge},BGo=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],Nge=t=>`${t}_cookie_identity_change_pending`,Rge=t=>{let e="",n=0;for(const o of t){const i=encodeURIComponent(JSON.stringify(o).slice(1,-1)).length;if(n+i>1e3)break;e+=o,n+=i}return e},o_="main",Vb=[TB,Yb,CR,Dw,yR,kw,H$,Nw],MNe=t=>Vb.indexOf(t)!==-1,zOt=[jO,F$],JOt=t=>zOt.indexOf(t)!==-1,Fw=(t,e)=>{try{return JSON.stringify(t)===JSON.stringify(e)}catch{return t===e}},sG=t=>{if(!t)return{};const e=JSON.parse(t);return QA(e)?e:{}},WOt=(t,e)=>{kl(t,(n,o)=>{const i=i1(o);i&&i.exposure!=="event"||{}.hasOwnProperty.call(e,o)||delete t[o]})};var DNe=class{constructor(e,n,o=!0,i=!e.cookieless_mode){if(this.Jo={},this.Zo=!1,this.Ko=!1,this.Xo=!1,this.Yo=!1,this.ta=!1,this.ea=new Map,this.ia=!1,this.na=!1,this.sa=!1,this.ra=new Set,this.oa=new Set,this.Mr=e,this.aa=o,this.props={},this.la=void 0,this.ua=(r=>{let s="";return r.token&&(s=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+s+"_posthog"})(e),this.hi=e.disable_persistence||!!n,this.No=this.ha(e),this.Xo=this.ca(e),this.load(i),this.da(),e.debug&&ui.info("Persistence loaded",e.persistence,sn({},this.props)),this.update_config(e,e,n),this.save(),Fn){const r=()=>this.flush();el(Fn,"beforeunload",r,{capture:!1}),el(Fn,"pagehide",r,{capture:!1}),this.va=s=>{if(this.Zo&&(!s.storageArea||s.storageArea===Fn?.localStorage)&&s.key)if(s.key!==this.ua){if(this.Xo){const a=q$.find(A=>s.key===this.fa(A));a&&this.pa(s.key,a)}}else this.pa(s.key,o_)},el(Fn,"storage",this.va)}}markCrossTabFeatureFlagChanges(e){Object.entries(e).forEach(([n,o])=>{const i=this.ea.get(n);if(!MNe(n)||i===!0)return;if(o===!0)return void this.ga(n,!0);const r=new Set(i||[]);o.forEach(s=>r.add(s)),r.size&&this.ga(n,r)})}onCrossTabFeatureFlagChange(e){return this.oa.add(e),()=>this.oa.delete(e)}destroy(){this.va&&Fn&&(Fn.removeEventListener("storage",this.va),this.va=void 0),this.oa.clear()}pa(e,n,o=!0){if(this.hi)return!1;let i,r;try{if(r=hc.Ot(e),Id(r)){const A=this.ma(n);return A.storageValue=null,n!==o_&&(A.persisted=!1),!1}i=sG(r)}catch{return!1}const s=n===o_?i:hc.Lt(this.ua);if(s&&this.ya(s))return!1;const a=this.ba(i,n,o);return n===o_&&this.Xo&&!Fw(this._a().main,i)||this.wa(i,n,!0,r),a}ya(e){const n=this.props[RB],o=e[RB];return!Eo(n)&&!Eo(o)&&n!==o}wa(e,n,o,i){const r=this.ma(n);r.storageValue=i,n!==o_&&(r.persisted=o);try{r.fingerprint=this.ka(e,n)}catch{r.fingerprint=void 0}}ba(e,n,o){let i=!1;return Vb.forEach(r=>{var s;const a=(s=i1(r))===null||s===void 0?void 0:s.storageGroup;if(n===o_&&this.Xo&&a||n!==o_&&a!==n)return;const A=r in e,c=this.Sa(r,A?e[r]:void 0),l=this.ea.has(r)?r in this.props:A;l===r in this.props&&Fw(c,this.props[r])||(l?this.xa(r,c,!1):this.$a(r,!1),i=!0)}),i&&o&&this.oa.forEach(r=>r()),i}Ca(){if(!this.Zo)return!1;try{this.sa=!1;const e=hc.Ot(this.ua),n=this.ma(o_);let o,i=!1,r=!1;if(e!==n.storageValue)if(Id(e))n.storageValue=null;else{if(o=sG(e),this.sa=!this.na&&this.ya(o),this.sa)return!1;r=this.ba(o,o_,!1),!this.Xo||Fw(this._a().main,o)?this.wa(o,o_,!0,e):n.storageValue=e,i=!0}return this.Xo&&q$.forEach(s=>{const a=hc.Ot(this.fa(s)),A=this.ma(s),c=o||{},l=i&&Vb.some(g=>{var h;return((h=i1(g))===null||h===void 0?void 0:h.storageGroup)===s&&g in c});if(a===A.storageValue&&!l)return;if(Id(a))return A.storageValue=null,A.persisted=!1,void(l&&(r=this.ba(c,s,!1)||r));const u=sG(a);r=this.ba(u,s,!1)||r,this.wa(u,s,!0,a)}),r}catch{return!1}}ga(e,n){this.ea.set(e,n);const o=i1(e);o?.volatile||(this.ma((this.Xo?o?.storageGroup:void 0)||o_).fingerprint=void 0,this.Ta(e))}Ia(){Vb.forEach(e=>this.ea.set(e,!0))}da(){if(this.Zo)try{const e=hc.Ot(this.ua),n=sG(e);this.ma(o_).storageValue=e,Vb.forEach(o=>{var i;const r=this.Xo?(i=i1(o))===null||i===void 0?void 0:i.storageGroup:void 0,s=r?hc.Ot(this.fa(r)):null;if(r){const A=this.ma(r);A.storageValue=s,A.persisted=!Id(s)}const a=r&&!Id(s)?sG(s):n;o in this.props?this.Ma(o,a[o],this.props[o]):o in a&&this.ga(o,!0)})}catch{}}Sa(e,n){const o=this.ea.get(e);if(!o)return n;if(o===!0)return this.props[e];if(e==="$active_feature_flags"){const s=new Set(As(n)?n:[]),a=new Set(As(this.props[e])?this.props[e]:[]);return o.forEach(A=>a.has(A)?s.add(A):s.delete(A)),Array.from(s)}const i=QA(n)?sn({},n):{},r=QA(this.props[e])?this.props[e]:{};return o.forEach(s=>{s in r?i[s]=r[s]:delete i[s]}),i}Ma(e,n,o){if(!MNe(e))return;const i=this.ea.get(e);if(i===!0)return;let r=n;if(this.Zo)try{var s;const A=this.Xo?(s=i1(e))===null||s===void 0?void 0:s.storageGroup:void 0,c=A?this.fa(A):this.ua;r=sG(hc.Ot(c))[e]}catch{}const a=new Set(i||[]);if(e==="$active_feature_flags"){if(!Eo(n)&&!As(n)||!Eo(r)&&!As(r)||!As(o))return void this.ga(e,!0);const A=new Set(n||[]),c=new Set(r||[]),l=new Set(o);new Set([...A,...l]).forEach(u=>{A.has(u)!==l.has(u)&&a.add(u)}),a.forEach(u=>{c.has(u)===l.has(u)&&a.delete(u)})}else{if(!QA(o))return void(Fw(r,o)?this.ea.delete(e):this.ga(e,!0));{if(!Eo(n)&&!QA(n)||Eo(n)&&Rx(o)&&Eo(r))return void this.ga(e,!0);const A=QA(n)?n:{},c=QA(r)?r:{};new Set([...Object.keys(A),...Object.keys(o)]).forEach(l=>{l in A==l in o&&Fw(A[l],o[l])||a.add(l)}),a.forEach(l=>{l in c==l in o&&Fw(c[l],o[l])&&a.delete(l)})}}a.size?this.ga(e,a):this.ea.delete(e)}Ea(){var e;const n=(e=this.Mr)===null||e===void 0?void 0:e.persistence_save_debounce_ms;return Ah(n)&&n>0?n:0}Pa(e){if(this.Mr.cookieWinsOnConflict&&this.Mr.persistence.toLowerCase()==="localstorage+cookie")if(e)try{const n=yNe(e,this.Mr.cookie_persisted_properties||[]),o=uOt(n,this.Mr.cookie_persisted_properties||[]),i=JSON.stringify(n)+"|"+JSON.stringify(o),r=yd.Ot(this.ua)||void 0;r&&xNe(this.ua,r)===i&&(this.Ra=i,this.Aa=r)}catch{}else try{const n=yd.Ot(this.ua)||void 0;this.Ra=n?xNe(this.ua,n):void 0,this.Aa=n}catch{}}syncCookieProperties(){return this.Oa(this.Mr)}Oa(e,n=!1){if(this.hi&&!n||this.ta||!e.cookieWinsOnConflict||e.persistence.toLowerCase()!=="localstorage+cookie")return!1;let o;try{o=yd.Ot(this.ua)||void 0}catch{}if(!o||o===this.Aa)return!1;const i=xNe(this.ua,o);let r;try{r=CNe(JSON.parse(o))}catch{return!1}if((yd.Ot(this.ua)||void 0)!==o)return!1;this.Ra=i,this.Aa=o;const s=gOt(this.ua,o),a=[...ER,...s.properties],A={};if(Object.keys(r).forEach(m=>{const _=r[m];(Eo(_)||Id(_)||_===""||m==="$user_state"&&_!=="anonymous"&&_!=="identified")&&(A[m]=!0,delete r[m])}),Rx(r))return!1;const c="distinct_id"in r||r.$user_state==="anonymous"||r.$user_state==="identified",l=this.props,u=l[RB],g=l[qy],h=eg({},l);[...ER,...e.cookie_persisted_properties||[]].forEach(m=>{if(a.indexOf(m)!==-1&&!(m in r)&&!A[m]&&(c||m!=="distinct_id"&&m!=="$user_state")){const _=h[m];(s.isValid||ER.indexOf(m)===-1||_!==!1&&_!==0)&&delete h[m]}}),this.props=eg(h,r),Vb.forEach(m=>{const _=m in this.props;m in l===_&&Fw(l[m],this.props[m])||(_?this.Ma(m,l[m],this.props[m]):this.ga(m,!0))}),!c||"$user_state"in r||"$user_state"in this.props||this.xa(qy,Ub);const d=this.props[RB],p=this.props[qy];return!c||d===u&&p===g||(this.na=!0,this.Yo=!0,nu.$t(Nge(this.ua),!0),this.$a(Nw),this.$a(Yb),this.$a(TB),this.$a(CR),this.$a(Dw),this.$a(yR),this.$a(kw),this.$a(Y$),this.$a(Tw),p!=="anonymous"||g!=="identified"&&r.$user_state!=="anonymous"&&(Eo(u)||d===u)||(WOt(this.props,r),this.$a(Rw)),p==="identified"?this.props.$user_id=d:delete this.props.$user_id,this.$a(Bge)),!0}consumeCookieIdentityChange(){const e=Nge(this.ua),n=this.Yo||!!nu.Ot(e);return this.Yo=!1,n&&nu.Pt(e),n}Fa(e=!1){return!(this.ta||this.hi&&!e||!this.Mr.cookieWinsOnConflict||this.Mr.persistence.toLowerCase()!=="localstorage+cookie"||(this.ta=!0,0))}Da(){this.ta&&(Eo(this.La)||(clearTimeout(this.La),this.La=void 0),delete this.Jo[o_],this.Na(!0))}qa(e=!0){if(this.ta)try{e?this.Da():Eo(this.La)||(clearTimeout(this.La),this.La=void 0)}finally{this.ta=!1}}isDisabled(){return!!this.hi}ha(e){BGo.indexOf(e.persistence.toLowerCase())===-1&&(ui.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");const n=((a=[],A=!1,c=()=>!1)=>{const l=[...ER,...a];return sn(sn({},hc),{},{Lt(u){try{let h,d={};try{h=yd.Ot(u)||void 0,d=h?CNe(JSON.parse(h)):{}}catch{}const p=JSON.parse(hc.Ot(u)||"{}");let m;if(A){const _=gOt(u,h),f=[...ER,..._.properties],I={};Object.keys(d).forEach(y=>{const x=d[y];Id(x)||x===""||y==="$user_state"&&x!=="anonymous"&&x!=="identified"||(I[y]=x)});const C="distinct_id"in I||I.$user_state==="anonymous"||I.$user_state==="identified";if(Object.keys(I).length>0){var g;const y=p[RB],x=(g=p.$user_state)!==null&&g!==void 0?g:Ub;l.forEach(E=>{if(f.indexOf(E)!==-1&&!(E in d)&&(C||E!=="distinct_id"&&E!=="$user_state")){const B=p[E];(_.isValid||ER.indexOf(E)===-1||B!==!1&&B!==0)&&delete p[E]}}),!C||"$user_state"in d||"$user_state"in p||(p[qy]=Ub),!C||("distinct_id"in I?I[RB]:p[RB])===y&&("$user_state"in I?I[qy]:p[qy])===x||(INe.forEach(E=>delete p[E]),I.$user_state==="identified"&&"distinct_id"in I?p.$user_id=I[RB]:delete p.$user_id,I.$user_state!=="identified"&&(delete p[GHt],delete p[Rw]),delete p.__alias)}m=eg(p,I)}else m=eg(d,p);return c()||hc.$t(u,m),m}catch{}return null},$t(u,g,h,d,p,m){const _=hc.$t(u,g,void 0,void 0,m);try{const f=yNe(g,a);if(Object.keys(f).length){if(A){const I=wge(u),C=uOt(f,a);if(yd.$t(I,C,h,d,p,m),yd.Ot(I)!==JSON.stringify(C)){yd.Pt(I,d);const y=yNe(g);return yd.$t(u,y,h,d,p,m),_}}yd.$t(u,f,h,d,p,m)}}catch(f){hc.Dt(f)}return _},Pt(u,g){try{Fn?.localStorage.removeItem(u),yd.Pt(u,g),yd.Pt(wge(u),g)}catch(h){hc.Dt(h)}}})})(e.cookie_persisted_properties||[],e.cookieWinsOnConflict,()=>!!this.hi);let o,i=!1,r=!1;const s=e.persistence.toLowerCase();return s==="localstorage"&&hc.Et()?(o=hc,r=!0):s==="localstorage+cookie"&&n.Et()?(o=n,r=!0,i=!0):s==="sessionstorage"&&nu.Et()?o=nu:s==="memory"?o=ENe:s==="cookie"&&yd.Et()?(o=yd,i=!0):n.Et()?(o=n,r=!0,i=!0):yd.Et()?(o=yd,i=!0):o=ENe,this.Zo=r,this.Ko=i,o}fa(e){return`${this.ua}__${e}`}ca(e){return this.Zo&&!!e.split_storage}properties(){const e={};return kl(this.props,(n,o)=>{const i=i1(o);if(!i||i.exposure==="event"){var r;if(!(i==null||(r=i.shouldSkipFromEventProperties)===null||r===void 0)&&r.call(i,n))return;e[o]=n}}),e}load(e=!1){if(this.hi&&!e)return;const n=this.Mr.cookieWinsOnConflict&&this.Mr.persistence.toLowerCase()==="localstorage+cookie",o=n?hc.Lt(this.ua):null;let i={};if(n)try{i=CNe(yd.Lt(this.ua)),kl(i,(A,c)=>{(Eo(A)||Id(A)||A==="")&&delete i[c]})}catch{}const r=this.No.Lt(this.ua);if(r&&(this.props=eg({},r)),this.Xo&&this.ja(),n&&r){var s,a;const A=o?.[RB],c=(s=o?.$user_state)!==null&&s!==void 0?s:Ub,l=r[RB],u=(a=r.$user_state)!==null&&a!==void 0?a:Ub;if(l!==A||u!==c){this.Yo=!0,this.hi||nu.$t(Nge(this.ua),!0);const g=eg({},this.props);INe.forEach(d=>delete g[d]),u!=="anonymous"||c!=="identified"&&i.$user_state!=="anonymous"&&(Eo(A)||l===A)||(WOt(g,i),delete g[Rw]),this.props=g;const h=new Set;INe.forEach(d=>{var p;const m=(p=i1(d))===null||p===void 0?void 0:p.storageGroup;m&&h.add(m)}),h.forEach(d=>{if(this.hi)return;const p={};kl(this.props,(m,_)=>{var f;((f=i1(_))===null||f===void 0?void 0:f.storageGroup)===d&&(p[_]=m)}),Rx(p)?(hc.Pt(this.fa(d)),this.Jo[d]={}):hc.$t(this.fa(d),p)&&(this.Jo[d]={persisted:!0,fingerprint:this.ka(p,d)})})}}nu.Ot(Nge(this.ua))&&(this.Yo=!0)}ja(){for(const e of q$){const n=hc.Lt(this.fa(e));if(n&&!Rx(n)){const o=this.ma(e);o.persisted=!0,this.Ba(e)||(o.fingerprint=this.ka(n,e)),this.Ha(e,n)||eg(this.props,n)}}}Ba(e){return Object.keys(this.props).some(n=>{var o;return((o=i1(n))===null||o===void 0?void 0:o.storageGroup)===e})}Ha(e,n){const o=EGo[e];if(!o)return!1;const i=n[o],r=this.props[o];return Ah(i)&&Ah(r)&&r>i}refreshKey(e){var n;if(this.hi||this.ra.has(e))return;const o=this.Xo?(n=i1(e))===null||n===void 0?void 0:n.storageGroup:void 0,i=o?hc.Lt(this.fa(o)):this.No.Lt(this.ua);if(i&&e in i)this.xa(e,i[e],!1);else{if(o){const r=this.No.Lt(this.ua);if(r&&e in r)return void this.xa(e,r[e],!1)}this.$a(e,!1)}}save(){if(this.hi)return;const e=this.Ea();e>0?Eo(this.La)&&(this.La=setTimeout(()=>{this.La=void 0,this.Na()},e)):this.Na()}flush(){Eo(this.La)||(clearTimeout(this.La),this.La=void 0,this.Na())}Na(e=!1){if(this.hi||this.ta&&!e)return;e||(this.syncCookieProperties(),this.Mr.cookieWinsOnConflict&&this.Mr.persistence.toLowerCase()==="localstorage+cookie"||zOt.forEach(r=>this.refreshKey(r)));const n=!e&&!this.ia;n||(this.sa=!1);const o=!!n&&this.Ca();if(this.sa)return void(this.Mr.debug&&ui.warn("skipping persistence write because storage belongs to a different distinct ID"));if(this.Xo)return this.za(),void(o&&this.oa.forEach(r=>r()));const i=this.Ua(this.No,this.ua,this.props,o_);i==="written"&&this.Pa(this.props),i!=="failed"&&(this.ea.clear(),this.na=!1,this.ra.clear()),o&&this.oa.forEach(r=>r())}za(){const{main:e,groups:n}=this._a(),o=this.Ua(this.No,this.ua,e,o_);o==="written"&&this.Pa(e),o!=="failed"&&(this.na=!1,this.ra.clear(),Vb.forEach(r=>{var s;!((s=i1(r))===null||s===void 0)&&s.storageGroup||this.ea.delete(r)}));for(const r of q$){var i;const s=n[r];if(Rx(s)&&!(!((i=this.Jo[r])===null||i===void 0)&&i.persisted)){Vb.forEach(A=>{var c;((c=i1(A))===null||c===void 0?void 0:c.storageGroup)===r&&this.ea.delete(A)});continue}const a=this.Ua(hc,this.fa(r),s,r);a!=="failed"&&Vb.forEach(A=>{const c=i1(A);c?.storageGroup!==r||a!=="written"&&c.volatile||this.ea.delete(A)})}}_a(){const e={},n={flags:{},surveys:{}};return kl(this.props,(o,i)=>{var r;const s=(r=i1(i))===null||r===void 0?void 0:r.storageGroup;s?n[s][i]=o:e[i]=o}),{main:e,groups:n}}ka(e,n){if(n===o_)return JSON.stringify(e)+"|"+this.Wa+"|"+this.Va+"|"+this.Ga;const o={};return kl(e,(i,r)=>{var s;o[r]=!((s=i1(r))===null||s===void 0)&&s.volatile?"__volatile__":i}),JSON.stringify(o)}Ua(e,n,o,i){const r=this.ma(i);if(i!==o_&&!r.dirty&&!Eo(r.fingerprint))return"skipped";let s;try{if(s=this.ka(o,i),s===r.fingerprint)return r.dirty=!1,"skipped"}catch{s=void 0}return e.$t(n,o,this.Wa,this.Va,this.Ga,this.Mr.debug)?(r.dirty=!1,i!==o_&&(r.persisted=!0),Eo(s)||(r.fingerprint=s),this.Zo&&(r.storageValue=hc.Ot(n)),"written"):(this.Mr.debug&&ui.warn(`failed to persist storage entry "${n}"; will retry on next save`),"failed")}remove({keepGroupEntries:e=!1}={}){if(this.Ia(),Eo(this.La)||(clearTimeout(this.La),this.La=void 0),this.No.Pt(this.ua,!1),this.No.Pt(this.ua,!0),!e&&this.aa)for(const n of q$)hc.Pt(this.fa(n));e?delete this.Jo[o_]:this.Jo={},this.Ra=void 0,this.Aa=void 0}clear(){this.remove(),this.props={}}register_once(e,n,o){if(QA(e)){this.syncCookieProperties(),Eo(n)&&(n="None"),this.Wa=Eo(o)?this.Qa:o;let i=!1;if(kl(e,(r,s)=>{this.props.hasOwnProperty(s)&&this.props[s]!==n||(this.xa(s,r),i=!0)}),i)return this.save(),!0}return!1}register(e,n){if(QA(e)){this.syncCookieProperties(),this.Wa=Eo(n)?this.Qa:n;let o=!1;if(kl(e,(i,r)=>{e.hasOwnProperty(r)&&(this.props[r]!==i||QA(i)||As(i))&&(this.xa(r,i),o=!0)}),o)return this.save(),!0}return!1}unregister(e){this.syncCookieProperties();const n=typeof e=="string"?[e]:e;let o=!1;for(const i of n)i in this.props&&(this.$a(i),o=!0);o&&this.save()}update_campaign_params(){const e=No?.URL;if(e===this.la)return;const n=LOt(this.Mr.custom_campaign_params,this.Mr.mask_personal_data_properties,this.Mr.custom_personal_data_properties),o=!Rx(mNe(n));return o&&this.register(n),this.la=e,o?n:void 0}update_search_keyword(){this.register((function(){const e=No?.referrer;return e?OOt(e):{}})())}update_referrer_info(){var e;this.register_once({$referrer:YOt(),$referring_domain:No?.referrer&&((e=Kb(No.referrer))===null||e===void 0?void 0:e.host)||Dge},void 0)}set_initial_person_info(){if(this.props.$initial_campaign_params||this.props.$initial_referrer_info)return;const e=UOt(this.Mr.mask_personal_data_properties,this.Mr.custom_personal_data_properties,this.Mr.disable_capture_url_hashes);this.register_once({[qO]:this.Ko?{r:Rge(e.r),u:e.u?Rge(e.u):void 0}:e},void 0)}get_initial_props(){const e={};kl([zHt,VHt],o=>{const i=this.props[o];i&&kl(i,function(r,s){e["$initial_"+PDe(s)]=r})});const n=this.props[qO];if(n){const o=(function(i,r=!1){const s=KOt(i,r),a={};return kl(s,function(A,c){a[`$initial_${PDe(c)}`]=A}),a})(n,this.Mr.disable_capture_url_hashes);eg(e,o)}return e}safe_merge(e){return kl(this.props,function(n,o){o in e||(e[o]=n)}),e}update_config(e,n,o){const i=e.persistence!==n.persistence,r=!((d,p)=>{if(d.length!==p.length)return!1;const m=[...d].sort(),_=[...p].sort();return m.every((f,I)=>f===_[I])})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),s=i||r,a=e.cookieWinsOnConflict!==n.cookieWinsOnConflict,A=e.disable_persistence||!!o,c=!!this.hi&&!A;A||this.Oa(n,c),this.Mr=e,!A&&(i||r||a)&&(this.Ra=void 0,this.Aa=void 0,this.Oa(sn(sn({},e),{},{cookie_persisted_properties:n.cookie_persisted_properties}),c));const l=s||a?this.ha(e):this.No;this.Ja();const u=this.ca(e),g=s||u!==this.Xo,h=!A&&(g||e.cross_subdomain_cookie!==this.Va||e.secure_cookie!==this.Ga)&&this.Fa(c);this.ia=g;try{if(this.Qa=this.Wa=e.cookie_expiration,this.set_disabled(A),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),g){const d=this.props;this.clear(),this.No=l,this.Xo=u,this.props=d,this.save()}else a&&(this.No=l,A||(delete this.Jo[o_],this.Na()))}finally{this.ia=!1,h&&this.qa()}}Ja(){const e=this.props[qO];if(!this.Ko||!QA(e)||typeof e.r!="string")return;const n=Rge(e.r),o=typeof e.u=="string"?Rge(e.u):e.u;n===e.r&&o===e.u||this.xa(qO,sn(sn({},e),{},{r:n,u:o}))}set_disabled(e){this.hi=e,this.hi?this.remove():this.save()}set_cross_subdomain(e){e!==this.Va&&(this.Va=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.Ga&&(this.Ga=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){const o=this.props.__timers||{};o[e]=n,this.xa(eNe,o),this.save()}remove_event_timer(e){const n=this.props.__timers||{},o=n[e];return Eo(o)||(delete n[e],this.xa(eNe,n),this.save()),o}get_property(e){return this.props[e]}set_property(e,n){this.xa(e,n),this.save()}xa(e,n,o=!0){var i;const r=this.props[e];this.props[e]=n,o&&(e!=="distinct_id"&&e!=="$user_state"||r===n||(this.na=!0),JOt(e)&&!Fw(r,n)&&this.ra.add(e),this.Ma(e,r,n),!((i=i1(e))===null||i===void 0)&&i.volatile||this.Ta(e))}$a(e,n=!0){delete this.props[e],n&&(MNe(e)&&this.ga(e,!0),JOt(e)&&this.ra.add(e),this.Ta(e))}Ta(e){var n;const o=(n=i1(e))===null||n===void 0?void 0:n.storageGroup;o&&(this.ma(o).dirty=!0)}ma(e){return this.Jo[e]||(this.Jo[e]={})}};const gE={GZipJS:"gzip-js",Base64:"base64"},eq={Activation:"events",Cancellation:"cancelEvents"},NNe={Popover:"popover",API:"api",Widget:"widget"},dE={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},RNe={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},TNe={Popover:"popover",Inline:"inline"};function Tge(t){let e=!0;return{dispose(){if(e){e=!1;const n=t();n&&nf(n.then)&&n.then(void 0,()=>{})}}}}const bGo={SHOWN:"product tour shown"},jOt={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},$Ot=Cd("[RateLimiter]");var SGo=class{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{const o=n.text;if(o&&o.length)try{(JSON.parse(o).quota_limited||[]).forEach(i=>{$Ot.info(`${i||"events"} is quota limited.`),this.serverLimits[i]=new Date().getTime()+6e4})}catch(i){return void $Ot.warn(`could not rate limit - continuing. Error: "${i?.message}"`,{text:o})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)===null||e===void 0?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)===null||e===void 0?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e=!1){var n,o,i;const{captureEventsBurstLimit:r,captureEventsPerSecond:s}=this,a=new Date().getTime(),A=(n=(o=this.instance.persistence)===null||o===void 0?void 0:o.get_property("$capture_rate_limit"))!==null&&n!==void 0?n:{tokens:r,last:a};A.tokens+=(a-A.last)/1e3*s,A.last=a,A.tokens>r&&(A.tokens=r);const c=1>A.tokens;if(c||e||(A.tokens=Math.max(0,A.tokens-1)),c&&!e){const l=(Ah(A.dropped)?A.dropped:0)+1;A.dropped=l,!this.lastEventRateLimited&&this.Za(l)&&(A.dropped=0)}return this.lastEventRateLimited=c,(i=this.instance.persistence)===null||i===void 0||i.set_property("$capture_rate_limit",A),{isRateLimited:c,remainingTokens:A.tokens}}Ka(e){const n=this.instance.config.property_denylist;return!As(n)||!n.includes(e)}Xa(){var e;if(this.Ka("$current_url")&&this.Ka("$pathname")&&fd?.pathname)return`${(e=fd.origin)!==null&&e!==void 0?e:""}${fd.pathname}`}Za(e){var n,o;const{captureEventsBurstLimit:i,captureEventsPerSecond:r}=this,s=this.Xa(),a=this.Ka("$session_id")?(n=(o=this.instance).get_session_id)===null||n===void 0?void 0:n.call(o):void 0,A=[`${e} event(s) dropped since the last warning`,s?`triggered on ${s}`:void 0,a?`session ${a}`:void 0].filter(Boolean).join(", ");return!!this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:`posthog-js client rate limited: ${A}. Config is set to ${r} events per second and ${i} events burst limit.`},{skip_client_rate_limiting:!0})}isServerRateLimited(e){const n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}};const Lw=Cd("[RemoteConfig]");var qOt=class{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Vr._POSTHOG_REMOTE_CONFIG)===null||e===void 0||(e=e[this._instance.config.token])===null||e===void 0?void 0:e.config}Ya(e){var n,o,i;!((n=Vr.__PosthogExtensions__)===null||n===void 0)&&n.loadExternalDependency?(o=Vr.__PosthogExtensions__)===null||o===void 0||(i=o.loadExternalDependency)===null||i===void 0||i.call(o,this._instance,"remote-config",()=>e(this.remoteConfig)):e()}tl(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets",`/array/${this._instance.config.token}/config`),callback:e})}load(){try{if(this.remoteConfig)return Lw.info("Using preloaded remote config",this.remoteConfig),void this.el(this.remoteConfig);if(this._instance.il())return void Lw.warn("Remote config is disabled. Falling back to local config.");this.Ya(e=>{if(!e)return Lw.info("No config found after loading remote JS config. Falling back to JSON."),void this.tl(n=>{this.el(n.json,n)});this.el(e)})}catch(e){Lw.error("Error loading remote config",e),this.el()}}el(e,n){!e&&n&&(n.statusCode===0?n.error||Lw.warn("Failed to fetch remote config from PostHog."):Lw.error("Failed to fetch remote config from PostHog."));try{this._instance.el(e?{ok:!0,config:e}:{ok:!1})}catch(i){Lw.error("Error applying remote config",i)}if(e?.hasFeatureFlags!==!1&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var o;(o=this._instance.featureFlags)===null||o===void 0||o.ensureFlagsLoaded()}catch(i){Lw.error("Error loading feature flags",i)}}},a4=Uint8Array,Tx=Uint16Array,aG=Uint32Array,kNe=new a4([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),FNe=new a4([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),XOt=new a4([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ZOt=function(t,e){for(var n=new Tx(31),o=0;31>o;++o)n[o]=e+=1<<t[o-1];var i=new aG(n[30]);for(o=1;30>o;++o)for(var r=n[o];n[o+1]>r;++r)i[r]=r-n[o]<<5|o;return[n,i]},eGt=ZOt(kNe,2),LNe=eGt[1];eGt[0][28]=258,LNe[258]=28;for(var tGt=ZOt(FNe,0)[1],nGt=new Tx(32768),xd=0;32768>xd;++xd){var AG=(43690&xd)>>>1|(21845&xd)<<1;nGt[xd]=((65280&(AG=(61680&(AG=(52428&AG)>>>2|(13107&AG)<<2))>>>4|(3855&AG)<<4))>>>8|(255&AG)<<8)>>>1}var tq=function(t,e,n){for(var o=t.length,i=0,r=new Tx(e);o>i;++i)++r[t[i]-1];var s,a=new Tx(e);for(i=0;e>i;++i)a[i]=a[i-1]+r[i-1]<<1;for(s=new Tx(o),i=0;o>i;++i)s[i]=nGt[a[t[i]-1]++]>>>15-t[i];return s},bR=new a4(288);for(xd=0;144>xd;++xd)bR[xd]=8;for(xd=144;256>xd;++xd)bR[xd]=9;for(xd=256;280>xd;++xd)bR[xd]=7;for(xd=280;288>xd;++xd)bR[xd]=8;var kge=new a4(32);for(xd=0;32>xd;++xd)kge[xd]=5;var QGo=tq(bR,9),vGo=tq(kge,5),oGt=function(t){return(t/8|0)+(7&t&&1)},iGt=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var o=new(t instanceof Tx?Tx:t instanceof aG?aG:a4)(n-e);return o.set(t.subarray(e,n)),o},zb=function(t,e,n){var o=e/8|0;t[o]|=n<<=7&e,t[o+1]|=n>>>8},nq=function(t,e,n){var o=e/8|0;t[o]|=n<<=7&e,t[o+1]|=n>>>8,t[o+2]|=n>>>16},HNe=function(t,e){for(var n=[],o=0;t.length>o;++o)t[o]&&n.push({s:o,f:t[o]});var i=n.length,r=n.slice();if(!i)return[new a4(0),0];if(i==1){var s=new a4(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(y,x){return y.f-x.f}),n.push({s:-1,f:25001});var a=n[0],A=n[1],c=0,l=1,u=2;for(n[0]={s:-1,f:a.f+A.f,l:a,r:A};l!=i-1;)a=n[n[u].f>n[c].f?c++:u++],A=n[c!=l&&n[u].f>n[c].f?c++:u++],n[l++]={s:-1,f:a.f+A.f,l:a,r:A};var g=r[0].s;for(o=1;i>o;++o)r[o].s>g&&(g=r[o].s);var h=new Tx(g+1),d=ONe(n[l-1],h,0);if(d>e){o=0;var p=0,m=d-e,_=1<<m;for(r.sort(function(y,x){return h[x.s]-h[y.s]||y.f-x.f});i>o;++o){var f=r[o].s;if(e>=h[f])break;p+=_-(1<<d-h[f]),h[f]=e}for(p>>>=m;p>0;){var I=r[o].s;e>h[I]?p-=1<<e-h[I]++-1:++o}for(;o>=0&&p;--o){var C=r[o].s;h[C]==e&&(--h[C],++p)}d=e}return[new a4(h),d]},ONe=function(t,e,n){return t.s==-1?Math.max(ONe(t.l,e,n+1),ONe(t.r,e,n+1)):e[t.s]=n},rGt=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new Tx(++e),o=0,i=t[0],r=1,s=function(A){n[o++]=A},a=1;e>=a;++a)if(t[a]==i&&a!=e)++r;else{if(!i&&r>2){for(;r>138;r-=138)s(32754);r>2&&(s(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(s(i),--r;r>6;r-=6)s(8304);r>2&&(s(r-3<<5|8208),r=0)}for(;r--;)s(i);r=1,i=t[a]}return[n.subarray(0,o),e]},oq=function(t,e){for(var n=0,o=0;e.length>o;++o)n+=t[o]*e[o];return n},GNe=function(t,e,n){var o=n.length,i=oGt(e+2);t[i]=255&o,t[i+1]=o>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var r=0;o>r;++r)t[i+r+4]=n[r];return 8*(i+4+o)},sGt=function(t,e,n,o,i,r,s,a,A,c,l){zb(e,l++,n),++i[256];for(var u=HNe(i,15),g=u[0],h=u[1],d=HNe(r,15),p=d[0],m=d[1],_=rGt(g),f=_[0],I=_[1],C=rGt(p),y=C[0],x=C[1],E=new Tx(19),B=0;f.length>B;++B)E[31&f[B]]++;for(B=0;y.length>B;++B)E[31&y[B]]++;for(var S=HNe(E,7),Q=S[0],w=S[1],M=19;M>4&&!Q[XOt[M-1]];--M);var k,R,F,O,U=c+5<<3,Y=oq(i,bR)+oq(r,kge)+s,W=oq(i,g)+oq(r,p)+s+14+3*M+oq(E,Q)+(2*E[16]+3*E[17]+7*E[18]);if(Y>=U&&W>=U)return GNe(e,l,t.subarray(A,A+c));if(zb(e,l,1+(Y>W)),l+=2,Y>W){k=tq(g,h),R=g,F=tq(p,m),O=p;var te=tq(Q,w);for(zb(e,l,I-257),zb(e,l+5,x-1),zb(e,l+10,M-4),l+=14,B=0;M>B;++B)zb(e,l+3*B,Q[XOt[B]]);l+=3*M;for(var j=[f,y],J=0;2>J;++J){var oe=j[J];for(B=0;oe.length>B;++B)zb(e,l,te[ie=31&oe[B]]),l+=Q[ie],ie>15&&(zb(e,l,oe[B]>>>5&127),l+=oe[B]>>>12)}}else k=QGo,R=bR,F=vGo,O=kge;for(B=0;a>B;++B)if(o[B]>255){var ie;nq(e,l,k[257+(ie=o[B]>>>18&31)]),l+=R[ie+257],ie>7&&(zb(e,l,o[B]>>>23&31),l+=kNe[ie]);var ne=31&o[B];nq(e,l,F[ne]),l+=O[ne],ne>3&&(nq(e,l,o[B]>>>5&8191),l+=FNe[ne])}else nq(e,l,k[o[B]]),l+=R[o[B]];return nq(e,l,k[256]),l+R[256]},wGo=new aG([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),PGo=(function(){for(var t=new aG(256),e=0;256>e;++e){for(var n=e,o=9;--o;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),YNe=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function MGo(t,e){e===void 0&&(e={});var n=(function(){var u=4294967295;return{p(g){for(var h=u,d=0;g.length>d;++d)h=PGo[255&h^g[d]]^h>>>8;u=h},d(){return 4294967295^u}}})(),o=t.length;n.p(t);var i,r,s,a,A,c=(a=10+((i=e).filename&&i.filename.length+1||0),A=8,(function(u,g,h,d,p,m){var _=u.length,f=new a4(d+_+5*(1+Math.floor(_/7e3))+p),I=f.subarray(d,f.length-p),C=0;if(!g||8>_)for(var y=0;_>=y;y+=65535){var x=y+65535;_>x?C=GNe(I,C,u.subarray(y,x)):(I[y]=m,C=GNe(I,C,u.subarray(y,_)))}else{for(var E=wGo[g-1],B=E>>>13,S=8191&E,Q=(1<<h)-1,w=new Tx(32768),M=new Tx(Q+1),k=Math.ceil(h/3),R=2*k,F=function(Ce){return(u[Ce]^u[Ce+1]<<k^u[Ce+2]<<R)&Q},O=new aG(25e3),U=new Tx(288),Y=new Tx(32),W=0,te=0,j=(y=0,0),J=0,oe=0;_>y;++y){var ie=F(y),ne=32767&y,le=M[ie];if(w[ne]=le,M[ie]=ne,y>=J){var ge=_-y;if((W>7e3||j>24576)&&ge>423){C=sGt(u,I,0,O,U,Y,te,j,oe,y-oe,C),j=W=te=0,oe=y;for(var _e=0;286>_e;++_e)U[_e]=0;for(_e=0;30>_e;++_e)Y[_e]=0}var ue=2,fe=0,pe=S,ye=ne-le&32767;if(ge>2&&ie==F(y-ye))for(var Me=Math.min(B,ge)-1,ve=Math.min(32767,y),he=Math.min(258,ge);ve>=ye&&--pe&&ne!=le;){if(u[y+ue]==u[y+ue-ye]){for(var Qe=0;he>Qe&&u[y+Qe]==u[y+Qe-ye];++Qe);if(Qe>ue){if(ue=Qe,fe=ye,Qe>Me)break;var Pe=Math.min(ye,Qe-2),we=0;for(_e=0;Pe>_e;++_e){var Te=y-ye+_e+32768&32767,Re=Te-w[Te]+32768&32767;Re>we&&(we=Re,le=Te)}}}ye+=(ne=le)-(le=w[ne])+32768&32767}if(fe){O[j++]=268435456|LNe[ue]<<18|tGt[fe];var Ee=31&LNe[ue],ke=31&tGt[fe];te+=kNe[Ee]+FNe[ke],++U[257+Ee],++Y[ke],J=y+ue,++W}else O[j++]=u[y],++U[u[y]]}}C=sGt(u,I,m,O,U,Y,te,j,oe,y-oe,C)}return iGt(f,0,d+oGt(C)+p)})(r=t,(s=e).level==null?6:s.level,s.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+s.mem,a,A,!0)),l=c.length;return(function(u,g){var h=g.filename;if(u[0]=31,u[1]=139,u[2]=8,u[8]=2>g.level?4:g.level==9?2:0,u[9]=3,g.mtime!=0&&YNe(u,4,Math.floor(new Date(g.mtime||Date.now())/1e3)),h){u[3]=8;for(var d=0;h.length>=d;++d)u[d+10]=h.charCodeAt(d)}})(c,e),YNe(c,l-8,n.d()),YNe(c,l-4,o),c}const DGo=!!vDe||!!P$,aGt=new WeakMap,AGt="text/plain";let UNe=0,Fge=!1;const cGt=(t,e)=>{const[n,o]=t.split("#"),[i,r]=n.split("?");if(!r)return t;const s=r.split("&").filter(a=>a.split("=")[0]!==e).join("&");return`${i}${s?`?${s}`:""}${o?`#${o}`:""}`},iq=(t,e,n=!0)=>{var o;const[i,r]=t.split("?"),s=sn({},e),a=(o=r?.split("&").map(c=>{var l;const[u,g]=c.split("="),h=n&&(l=s[u])!==null&&l!==void 0?l:g;return delete s[u],`${u}=${h}`}))!==null&&o!==void 0?o:[],A=(function(c,l="&"){let u,g;const h=[];return kl(c,function(d,p){Eo(d)||Eo(p)||p==="undefined"||(u=encodeURIComponent((m=>m instanceof File)(d)?d.name:d.toString()),g=encodeURIComponent(p),h[h.length]=g+"="+u)}),h.join(l)})(s);return A&&a.push(A),a.length>0?`${i}?${a.join("&")}`:i},KNe=t=>{if(t.nl)return t.nl;const{data:e,compression:n}=t;if(!e)return;if(n===gE.GZipJS){const i=MGo((function(r){var s=r.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(r);for(var a=new a4(r.length+(r.length>>>1)),A=0,c=function(h){a[A++]=h},l=0;s>l;++l){if(A+5>a.length){var u=new a4(A+8+(s-l<<1));u.set(a),a=u}var g=r.charCodeAt(l);128>g?c(g):2048>g?(c(192|g>>>6),c(128|63&g)):g>55295&&57344>g?(c(240|(g=65536+(1047552&g)|1023&r.charCodeAt(++l))>>>18),c(128|g>>>12&63),c(128|g>>>6&63),c(128|63&g)):(c(224|g>>>12),c(128|g>>>6&63),c(128|63&g))}return iGt(a,0,A)})(oG(e)),{mtime:0});return{contentType:AGt,body:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength),estimatedSize:i.byteLength}}if(n===gE.Base64){const i=(function(s){return s&&btoa(encodeURIComponent(s).replace(/%([0-9A-F]{2})/g,(a,A)=>String.fromCharCode(parseInt(A,16))))})(oG(e)),r=(s=>"data="+encodeURIComponent(typeof s=="string"?s:oG(s)))(i);return{contentType:"application/x-www-form-urlencoded",body:r,estimatedSize:new Blob([r]).size}}const o=oG(e);return{contentType:"application/json",body:o,estimatedSize:new Blob([o]).size}},lGt=t=>{const e=()=>t.transport==="sendBeacon"?{url:iq(t.url,{compression:gE.Base64}),encodedBody:KNe(sn(sn({},t),{},{compression:gE.Base64,nl:void 0}))}:{url:cGt(t.url,"compression"),encodedBody:KNe(sn(sn({},t),{},{compression:void 0,nl:void 0}))};let n;try{n=KNe(t)}catch(i){if(mHt(t.compression,iG(t.url,"compression")))return ui.error("Failed to gzip request body, sending uncompressed payload",i),e();throw i}return n&&mHt(t.compression,iG(t.url,"compression"))&&!((o=n.body)instanceof ArrayBuffer?JDe(new Uint8Array(o)):ArrayBuffer.isView(o)&&JDe(new Uint8Array(o.buffer,o.byteOffset,o.byteLength)))?(Fge=!0,e()):{url:t.url,encodedBody:n};var o},uGt=t=>{try{return lGt(t)}catch(n){var e;return ui.error(n),void((e=t.callback)===null||e===void 0||e.call(t,{statusCode:0,error:n}))}},NGo=(function(){var t=Zu(function*(e){const n=yield(function(i){return WDe.apply(this,arguments)})(oG(e.data),n_.DEBUG,{rethrow:!0});if(!n)return e;const o=yield n.arrayBuffer();return sn(sn({},e),{},{nl:{contentType:AGt,body:o,estimatedSize:o.byteLength}})});return function(e){return t.apply(this,arguments)}})(),RGo=/Failed to fetch|NetworkError|Load failed/i,gGt=t=>t?.name==="TypeError"&&RGo.test(t?.message||""),dGt=t=>{try{const e=(function(n,o=Date.now()){if(typeof n!="string"||!n)return;const i=n.trim(),r=/^\d+\s*,/.test(i)?i.slice(0,i.indexOf(",")).trim():i;if(/^\d+$/.test(r)){const A=1e3*Math.min(Number(r),300);return A>0?A:void 0}if(!/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)[a-z]*[ ,]/.test(r))return;const s=/^\w{3} \w{3} /.test(r)?r+" GMT":r,a=Date.parse(s)-o;return Number.isFinite(a)&&a>0?Math.min(a,mge):void 0})(t());return Eo(e)?void 0:Math.min(e,3e4)}catch{return}},hGt=t=>{const e=uGt(t);if(!e)return;const n=new vDe;aGt.set(n,!0);const{url:o,encodedBody:i}=e;n.open(t.method||"GET",o,!0);const{contentType:r,body:s}=i??{};kl(t.headers,function(a,A){n.setRequestHeader(A,a)}),r&&n.setRequestHeader("Content-Type",r),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var a;const A={statusCode:n.status,text:n.responseText};if(n.status===200)try{A.json=JSON.parse(n.responseText)}catch{}(a=t.callback)===null||a===void 0||a.call(t,A,dGt(()=>n.getResponseHeader("Retry-After")))}},n.send(s)},pGt=t=>{const e=uGt(t);if(!e)return;const{url:n,encodedBody:o}=e,{contentType:i,body:r,estimatedSize:s}=o??{},a=new Headers;kl(t.headers,function(d,p){a.append(p,d)}),i&&a.append("Content-Type",i);let A=null,c=!1;if(gLt){const d=new gLt;A={signal:d.signal,timeout:setTimeout(()=>{c=!0;try{d.abort(eHt("AbortError","PostHog request timed out"+((p=t.timeout)?` after ${p}ms`:"")))}catch(m){u(m)}var p},t.timeout)}}let l=!1;const u=d=>{var p;l||(l=!0,c&&d?.name==="AbortError"||gGt(d)?ui.warn(d):ui.error(d),(p=t.callback)===null||p===void 0||p.call(t,{statusCode:0,error:d}))};let g=0;const h=()=>{UNe-=g,g=0,A&&clearTimeout(A.timeout)};try{const d=sn({method:t?.method||"GET",headers:a,referrerPolicy:"strict-origin",body:r,signal:A?.signal},t.fetchOptions),p=s??(Eo(r)?0:void 0);d.keepalive=d.method==="POST"&&!t.sl&&d.keepalive!==!1&&d.body===r&&!Eo(p)&&p>=0&&52428.8>UNe+p,d.keepalive&&(g=p,UNe+=g),P$(n,d).then(m=>m.text().then(_=>{var f;if(l)return;const I={statusCode:m.status,text:_};if(m.status===200)try{I.json=JSON.parse(_)}catch(C){ui.error(C)}l=!0,h(),(f=t.callback)===null||f===void 0||f.call(t,I,dGt(()=>m.headers.get("Retry-After")))})).catch(m=>{h(),u(m)}).finally(h)}catch(d){h(),u(d)}},VNe=t=>{try{var e;const{url:n,encodedBody:o}=lGt(t),{contentType:i,body:r,estimatedSize:s}=o??{};if(!r)return;const a=r instanceof Blob?r:new Blob([r],{type:i});if(tf.sendBeacon(n,a))return;const A=As(t.data)?t.data:(e=t.data)===null||e===void 0?void 0:e.batch;if(As(A)&&A.length>1&&(s??0)>16384){const c=Math.ceil(A.length/2),l=u=>As(t.data)?u:sn(sn({},t.data),{},{batch:u});return VNe(sn(sn({},t),{},{data:l(A.slice(0,c))})),void VNe(sn(sn({},t),{},{data:l(A.slice(c))}))}ui.warn(`Beacon of ~${s??0} bytes was rejected by the browser, falling back to ${P$?"fetch":"XHR"}`),P$?pGt(sn(sn({},t),{},{sl:!0})):hGt(t)}catch(n){ui.warn("Beacon send failed",n)}},mGt=(t,e,n,o)=>{const i=o==="query"?e==="POST"?"sent_at":"_":void 0;return iq(n===gE.GZipJS?cGt(t,"compression"):t,sn(sn({},i?{[i]:Date.now().toString()}:{}),n===gE.GZipJS?{}:{compression:n}))},TGo=(()=>{const t=[];return P$&&t.push({transport:"fetch",method:pGt}),vDe&&t.push({transport:"XHR",method:hGt}),tf?.sendBeacon&&t.push({transport:"sendBeacon",method:VNe}),t})();let _Gt=!DGo&&jy?.indexOf("MSIE")===-1&&jy?.indexOf("Mozilla")===-1;function fGt(t,e,n){var o,i,r;n&&(e=sn(sn({},e),{},{callback:s=>n(s)})),t.__loaded?_Gt?t.__request_queue.push(e):t.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&((i=e.callback)===null||i===void 0||i.call(e,{statusCode:429})):(e.transport=e.transport||t.config.api_transport,e.headers=sn(sn({},t.config.request_headers),e.headers),e.compression=e.compression==="best-available"?(o=t.compression)!==null&&o!==void 0?o:e.compressionFallback:e.compression,(Eo(t.config.disable_beacon)?t.config.__preview_disable_beacon:t.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||t.config.fetch_options,((s,a)=>{var A,c,l;const u=sn(sn({},s),{},{callback:a??(m=>{var _;return(_=s.callback)===null||_===void 0?void 0:_.call(s,m)})});u.timeout=u.timeout||6e4;const g=(A=u.transport)!==null&&A!==void 0?A:"fetch";g==="sendBeacon"&&Eo(u.compression)&&u.data&&(u.compression=gE.Base64),u.method==="POST"&&u.data&&(u.timestampMode==="capture-body"?u.data=(m=>{var _,f;const I=(As(m)?m:[m]).map(y=>sn(sn({},y),y.timestamp instanceof Date&&!isNaN(y.timestamp.getTime())?{timestamp:y.timestamp.toISOString()}:{})),C=I[0];return{api_key:(_=C==null||(f=C.properties)===null||f===void 0?void 0:f.token)!==null&&_!==void 0?_:C?.token,batch:I,sent_at:new Date().toISOString()}})(u.data):u.timestampMode==="body"&&(u.data=((m,_=new Date().toISOString())=>As(m)?m.map(f=>sn(sn({},f),{},{sent_at:_})):sn(sn({},m),{},{sent_at:_}))(u.data))),u.url=mGt(u.url,u.method,u.compression,u.timestampMode);const h=TGo.filter(m=>!u.disableTransport||!m.transport||!u.disableTransport.includes(m.transport)),d=(c=(l=(function(m,_){for(let f=0;m.length>f;f++)if(_(m[f]))return m[f]})(h,m=>m.transport===g))===null||l===void 0?void 0:l.method)!==null&&c!==void 0?c:h[0].method;if(!d)throw new Error("No available transport method");const p=m=>{try{d(m)}catch(f){var _;gGt(f)?ui.warn(f):ui.error(f),(_=u.callback)===null||_===void 0||_.call(u,{statusCode:0,error:f})}};g!=="sendBeacon"&&!u.preferSyncCompression&&u.data&&u.compression===gE.GZipJS&&bHo&&typeof Promise<"u"&&!Fge?NGo(u).then(m=>{p(m)}).catch(m=>{if(_Ht(m))return Fge=!0,void p(sn(sn({},u),{},{compression:void 0,url:mGt(s.url,s.method,void 0,s.timestampMode)}));(_=>{if(!_||typeof _!="object")return!1;const f="name"in _?String(_.name):"";return _Ht(_)||f===pHt})(m)&&(Fge=!0),p(u)}):p(u)})(e,(s,a)=>{var A,c,l;t.rateLimiter.checkForLimiting(s),400>s.statusCode||(A=(c=t.config).on_request_error)===null||A===void 0||A.call(c,s),n?n(s,a):(l=e.callback)===null||l===void 0||l.call(e,s)})):e.fireCallbackOnDrop&&((r=e.callback)===null||r===void 0||r.call(e,{statusCode:0}))}var kGo=class{constructor(e,n){this.rl=!0,this.ol=[],this.al=u6(n?.flush_interval_ms||3e3,250,5e3,ui.createLogger("flush interval"),3e3),this.ll=e}enqueue(e){this.ol.push(e),this.ul||this.hl()}unload(){this.cl();const e=this.ol.length>0?this.dl():{},n=Object.values(e);[...n.filter(o=>o.url.indexOf("/e")===0),...n.filter(o=>o.url.indexOf("/e")!==0)].map(o=>{this.vl(o,"sendBeacon")})}enable(){this.rl=!1,this.hl()}hl(){this.rl||(this.ul=setTimeout(()=>{if(this.cl(),this.ol.length>0){const e=this.dl();for(const n in e)this.vl(e[n])}},this.al))}vl(e,n){try{this.ll(e,n)}catch(o){ui.error(o)}}cl(){clearTimeout(this.ul),this.ul=void 0}dl(){const e={};return kl(this.ol,n=>{var o;const i=n,r=((i?i.batchKey:null)||i.url)+(i.batchGroup?`:${i.batchGroup}`:"");Eo(e[r])&&(e[r]=sn(sn({},i),{},{data:[]})),(o=e[r].data)===null||o===void 0||o.push(i.data)}),this.ol=[],e}};const FGo=["retriesPerformedSoFar"];var LGo=class{constructor(e){this._instance=e,this.fl=!1,this.pl=3e3,this.ol=[],this.ol=[],this.gl=!0,this.resume()}resume(){if(!Eo(Fn)&&"onLine"in Fn.navigator){if(this.gl=Fn.navigator.onLine,this.ml)return;this.ml=()=>{this.gl=!0,this.yl()},this.bl=()=>{this.gl=!1},el(Fn,"online",this.ml),el(Fn,"offline",this.bl)}}get length(){return this.ol.length}retriableRequest(e,n){let{retriesPerformedSoFar:o}=e,i=IHt(e,FGo);Gb(o)&&(i.url=iq(i.url,{retry_count:o})),fGt(this._instance,n?sn(sn({},i),{},{transport:n}):i,(r,s)=>{var a;if(r.statusCode!==200&&(400>r.statusCode||r.statusCode>=500)){if((r.statusCode===0?3:10)>(o??0))return void this.Ls(sn({retriesPerformedSoFar:o},i),s);r.statusCode===0&&ui.warn(`Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after ${o??0} retries.`)}(a=i.callback)===null||a===void 0||a.call(i,r)})}Ls(e,n){const o=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=o+1;const i=Math.max((function(a){const A=3e3*Math.pow(2,a),c=A/2,l=Math.min(18e5,A),u=(Math.random()-.5)*(l-c);return Math.ceil(l+u)})(o),n??0),r=Date.now()+i;this.ol.push({retryAt:r,requestOptions:e});let s=`Enqueued failed request for retry in ${i}`;navigator.onLine||(s+=" (Browser is offline)"),ui.warn(s),this.fl||(this.fl=!0,this._l())}_l(){if(this.wl&&clearTimeout(this.wl),this.ol.length===0)return this.fl=!1,void(this.wl=void 0);this.wl=setTimeout(()=>{this.gl&&this.ol.length>0&&this.yl(),this._l()},this.pl)}yl(){const e=Date.now(),n=[],o=this.ol.filter(i=>e>i.retryAt||(n.push(i),!1));if(this.ol=n,o.length>0)for(const{requestOptions:i}of o)this.retriableRequest(i)}unload(){this.wl&&(clearTimeout(this.wl),this.wl=void 0),this.fl=!1,Eo(Fn)||(this.ml&&(Fn.removeEventListener("online",this.ml),this.ml=void 0),this.bl&&(Fn.removeEventListener("offline",this.bl),this.bl=void 0));for(const{requestOptions:e}of this.ol)try{this._instance._send_request(sn(sn({},e),{},{transport:"sendBeacon"}))}catch(n){ui.error(n)}this.ol=[]}},HGo=class{constructor(e){this._instance=e,this.kl=()=>{var n,o,i,r;this.Sl||(this.Sl={});const s=this.scrollElement(),a=this.scrollY(),A=s?Math.max(0,s.scrollHeight-s.clientHeight):0,c=a+(s?.clientHeight||0),l=s?.scrollHeight||0;this.Sl.lastScrollY=Math.ceil(a),this.Sl.maxScrollY=Math.max(a,(n=this.Sl.maxScrollY)!==null&&n!==void 0?n:0),this.Sl.maxScrollHeight=Math.max(A,(o=this.Sl.maxScrollHeight)!==null&&o!==void 0?o:0),this.Sl.lastContentY=c,this.Sl.maxContentY=Math.max(c,(i=this.Sl.maxContentY)!==null&&i!==void 0?i:0),this.Sl.maxContentHeight=Math.max(l,(r=this.Sl.maxContentHeight)!==null&&r!==void 0?r:0)}}get xl(){return this._instance.config.scroll_root_selector}getContext(){return this.Sl}resetContext(){const e=this.Sl;return this.Sl=void 0,setTimeout(this.kl,0),e}startMeasuringScrollPosition(){el(Fn,"scroll",this.kl,{capture:!0}),el(Fn,"scrollend",this.kl,{capture:!0}),el(Fn,"resize",this.kl)}scrollElement(){if(this.xl){const o=As(this.xl)?this.xl:[this.xl];for(const i of o){var e;const r=Fn==null||(e=Fn.document)===null||e===void 0?void 0:e.querySelector(i);if(r)return r}return}var n;return Fn==null||(n=Fn.document)===null||n===void 0?void 0:n.documentElement}$l(e){var n,o;const i=e==="y"?"scrollTop":"scrollLeft";if(this.xl){const r=this.scrollElement();return r&&r[i]||0}return Fn?e==="y"?Fn.scrollY||Fn.pageYOffset||((n=Fn.document)===null||n===void 0||(n=n.documentElement)===null||n===void 0?void 0:n.scrollTop)||0:Fn.scrollX||Fn.pageXOffset||((o=Fn.document)===null||o===void 0||(o=o.documentElement)===null||o===void 0?void 0:o.scrollLeft)||0:0}scrollY(){return this.$l("y")}scrollX(){return this.$l("x")}};const OGo=t=>UOt(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties,t?.config.disable_capture_url_hashes);var IGt=class{constructor(e,n,o,i){this.qe=r=>{const s=this.Cl();if(s&&s.sessionId===r)return;const a={sessionId:r,props:this.Tl(this._instance)};this.Il.register({[cNe]:a})},this._instance=e,this.Ml=n,this.Il=o,this.Tl=i||OGo,this.Ml.onSessionId(this.qe)}Cl(){return this.Il.props[cNe]}getSetOnceProps(){var e;const n=(e=this.Cl())===null||e===void 0?void 0:e.props;return n?"r"in n?KOt(n,this._instance.config.disable_capture_url_hashes):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){const e={};return kl(mNe(this.getSetOnceProps()),(n,o)=>{o==="$current_url"&&(o="url"),e[`$session_entry_${PDe(o)}`]=n}),e}},Lge=class{on(t,e){return this.El[t]||(this.El[t]=[]),this.El[t].push(e),()=>{this.El[t]=this.El[t].filter(n=>n!==e)}}emit(t,e){for(const n of this.El[t]||[])n(e);for(const n of this.El["*"]||[])n(t,e)}constructor(){this.El={}}};const cG=Cd("[SessionId]"),CGt=864e5;var yGt=class{on(e,n){return this.Pl.on(e,n)}constructor(e,n,o){var i;if(this.Rl=null,this.Al=null,this.Ol=[],this.Fl=void 0,this.Dl=!1,this.Pl=new Lge,this.Ll=(s,a)=>!(!Gb(s)||!Gb(a))&&Math.abs(s-a)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Mr=e.config,this.Il=e.persistence,this.je=void 0,this.Xt=void 0,this._sessionStartTimestamp=null,this.Nl=void 0,this._sessionActivityTimestamp=null,this.ql=n||kB,this.jl=o||kB;const r=this.Mr.persistence_name||this.Mr.token;if(this._sessionTimeoutMs=1e3*u6(this.Mr.session_idle_timeout_seconds||1800,60,36e3,cG.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Bl(),this.Hl="ph_"+r+"_window_id",this.zl="ph_"+r+"_primary_window_exists",this.Ul()){const s=nu.Lt(this.Hl),a=nu.Lt(this.zl);s&&!a?this.je=s:nu.Pt(this.Hl),nu.$t(this.zl,!0)}!((i=this.Mr.bootstrap)===null||i===void 0)&&i.sessionID&&this.setBootstrapSessionId(this.Mr.bootstrap.sessionID),this.Wl()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return Eo(this.Ol)&&(this.Ol=[]),this.Ol.push(e),this.Xt&&e(this.Xt,this.je),()=>{this.Ol=this.Ol.filter(n=>n!==e)}}Ul(){return this.Mr.persistence!=="memory"&&!this.Il.hi&&nu.Et()}Vl(e){e!==this.je&&(this.je=e,this.Ul()&&nu.$t(this.Hl,e))}Gl(){return this.je?this.je:this.Ul()?nu.Lt(this.Hl):null}Ql(e){const n=this.Rl;return!Id(n)&&!Id(e)&&5e3>Math.abs(e-n)}Jl(e,n,o){const i=n!==this._sessionActivityTimestamp,r=!(e!==this.Xt||o!==this._sessionStartTimestamp);this._sessionStartTimestamp=o,this._sessionActivityTimestamp=n,this.Xt=e,r&&!i||r&&this.Ql(n)||(this.Rl=n,this.Il.register({[$O]:[n,e,o]}))}Zl(){var e;const n=(e=this.Mr)===null||e===void 0?void 0:e.persistence_save_debounce_ms;return Gb(n)&&n>0}Kl(){this.Zl()?this.Il.refreshKey($O):(this.Il.flush(),this.Il.load())}Xl(){var e;if(Id(this._sessionActivityTimestamp)||this._sessionActivityTimestamp===this.Rl)return;this.Kl();const[,n,o]=this.Yl();n===this.Xt&&o===this._sessionStartTimestamp&&(this.Rl=this._sessionActivityTimestamp,this.Il.register({[$O]:[this._sessionActivityTimestamp,(e=this.Xt)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.Il.flush())}tu(){const[e]=this.Yl(),n=Gb(e)?e:0,o=Gb(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,o)}eu(e){return this.Kl(),this.Ll(e,this.tu())}Yl(){const e=this.Il.props[$O];return As(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Rl=null,this.Nl=void 0,clearTimeout(this.iu),this.iu=void 0,this.Jl(null,null,null)}setBootstrapSessionId(e,n=!1){const o=((i,r=new Date().getTime())=>{try{const s=(a=>{const A=a.replace(/-/g,"");if(A.length!==32)throw new Error("Not a valid UUID");if(A[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(A.substring(0,12),16)})(i);return s>r+6e4?void cG.error("Bootstrap sessionID cannot be in the future"):s}catch(s){return void cG.error("Invalid sessionID in bootstrap",s)}})(e);return!Eo(o)&&(n?this.Nl={sessionId:e,sessionStartTimestamp:o}:this.Jl(e,new Date().getTime(),o),!0)}destroy(){this.Dl=!0,this.Xl(),clearTimeout(this.iu),this.iu=void 0,this.Fl&&Fn&&(Fn.removeEventListener(Qge,this.Fl,{capture:!1}),this.Fl=void 0),this.Ol=[]}Wl(){this.Fl=()=>{this.Xl(),this.Ul()&&nu.Pt(this.zl)},el(Fn,Qge,this.Fl,{capture:!1})}checkAndGetSessionAndWindowId(e=!1,n=null,o=!1){if(this.Mr.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');const i=n||new Date().getTime(),r=this.Xt;if(o)this.Al=i;else if(Id(this.Al)||this.Al>i||i-this.Al>=1e3){var s,a;(s=(a=this.Il).syncCookieProperties)===null||s===void 0||s.call(a),this.Al=i}let[,A,c]=this.Yl();const l=!Eo(r)&&A!==r,u=this.tu();let g=this.Gl();const h=this.Nl,d=!!h&&(h.sessionStartTimestamp>i+6e4||i-h.sessionStartTimestamp>CGt),p=h?d:Gb(c)&&Math.abs(i-c)>CGt;let m=!1,_=l,f=!A||!!h;const I=A;let C=!f&&!e&&this.Ll(i,u);if(C&&(C=this.eu(i),C||cG.info("cross-tab refresh kept the session alive",{sessionId:A}),[,A,c]=this.Yl(),C||(f=!A||!!h)),f||C||p){_=!1;const B=h&&!d;A=B?h.sessionId:this.ql(),g=this.jl(),cG.info("new session ID assigned",{sessionId:A,windowId:g,bootstrapped:!!B,changeReason:{noSessionId:f,activityTimeout:C,sessionPastMaximumLength:p}}),c=B?h.sessionStartTimestamp:i,this.Nl=void 0,m=!0}else g||(g=this.jl(),m=!0),_=_||A!==I,_&&(cG.info("adopted cross-tab session id",{sessionId:A,windowId:g}),m=!0);const y=Gb(u)&&e&&!p?u:i,x=Gb(c)?c:new Date().getTime();this.Vl(g),this.Jl(A,y,x),e||this.Bl();const E={noSessionId:f,activityTimeout:C,sessionPastMaximumLength:p,crossTabAdoption:_};return m&&this.Ol.forEach(B=>B(A,g,E)),{sessionId:A,windowId:g,sessionStartTimestamp:x,changeReason:m?E:void 0,lastActivityTimestamp:u}}Bl(){this.Dl||(clearTimeout(this.iu),this.iu=setTimeout(()=>{if(!this.Dl)if(this.eu(new Date().getTime())){const e=this.Xt;this.resetSessionId(),this.Pl.emit("forcedIdleReset",{idleSessionId:e})}else this.Bl()},1.1*this.sessionTimeoutMs))}};const xGt=function(t,e){if(!t)return!1;const n=t.userAgent;if(n&&ILt(n,e))return!0;try{const o=t?.userAgentData;if(o?.brands&&o.brands.some(i=>ILt(i?.brand,e)))return!0}catch{}return!!t.webdriver};function EGt(){return(EGt=Zu(function*(){const t=tf?.userAgentData;if(t?.getHighEntropyValues)try{const e=yield t.getHighEntropyValues(["model"]),n=e?.model;return rA(n)&&n.length>0?n:void 0}catch(e){return void ui.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",e)}})).apply(this,arguments)}function GGo(t,e){let n=`$survey_${e}/${t.id}`;return t.current_iteration&&t.current_iteration>0&&(n=`$survey_${e}/${t.id}/${t.current_iteration}`),n}function BGt(t){var e;return!!(!((e=t.conditions)===null||e===void 0||(e=e.events)===null||e===void 0||(e=e.values)===null||e===void 0)&&e.length)}const Hge=(t,e)=>{if(!(n=>{try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}},Oge=t=>t.toLowerCase(),bGt={exact:(t,e)=>e.some(n=>t.some(o=>n===o)),is_not:(t,e)=>e.every(n=>t.every(o=>n!==o)),regex:(t,e)=>e.some(n=>t.some(o=>Hge(n,o))),not_regex:(t,e)=>e.every(n=>t.every(o=>!Hge(n,o))),icontains:(t,e)=>e.map(Oge).some(n=>t.map(Oge).some(o=>n.includes(o))),not_icontains:(t,e)=>e.map(Oge).every(n=>t.map(Oge).every(o=>!n.includes(o))),gt:(t,e)=>e.some(n=>{const o=parseFloat(n);return!isNaN(o)&&t.some(i=>o>parseFloat(i))}),lt:(t,e)=>e.some(n=>{const o=parseFloat(n);return!isNaN(o)&&t.some(i=>o<parseFloat(i))})};function SGt(t,e){return!t||Object.entries(t).every(([n,o])=>{const i=e?.[n];if(i==null)return!1;const r=bGt[o.operator];return!!r&&r(o.values.map(String),[String(i)])})}function zNe(t,e,n){return oG({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}const JNe="custom",QGt="i.posthog.com",YGo=/^\/static\//,UGo=["/s/","/e/","/i/"];var KGo=class{constructor(t){this.nu={},this.instance=t}get apiHost(){const t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){const t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t;let e=(t=this.instance.config.ui_host)===null||t===void 0?void 0:t.replace(/\/$/,"");return e||(e=this.apiHost.replace(`.${QGt}`,".posthog.com")),e==="https://app.posthog.com"?"https://us.posthog.com":e}get region(){return this.nu[this.apiHost]||(this.nu[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":JNe),this.nu[this.apiHost]}su(t){if(!YGo.test(t))return;const e=this.instance.config.asset_host;return typeof e=="string"&&e.trim().replace(/\/$/,"")||void 0}ru(t){const e=Kb(t);return e?e.protocol+"//"+e.host+e.pathname:void 0}ou(t,e,n){if(t==="ui")return n;let o=n;const i=this.instance.config.rewriteRequestPath;if(i){var r;const s=((r=Kb(n))===null||r===void 0?void 0:r.href)||n;o=i(new URL(s)).toString()}if(i&&t==="api"&&UGo.some(s=>e.indexOf(s)===0)){const s=this.ru(o);if(s){const a=this.apiHost;let A=this.au;A?.apiHost===a&&A.rewriteRequestPath===i||(A={apiHost:a,rewriteRequestPath:i,urls:new Set},this.au=A),A.urls.add(s)}}return o}isIngestionEndpoint(t){const e=this.au,n=this.ru(t);return e?.apiHost===this.apiHost&&e.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!n&&e.urls.has(n)}endpointFor(t,e=""){if(e&&(e=e[0]==="/"?e:`/${e}`),t==="ui")return this.ou(t,e,this.uiHost+e);if(t==="flags")return this.ou(t,e,this.flagsApiHost+e);if(t==="assets"){const o=this.su(e);if(o)return this.ou(t,e,`${o}${e}`)}if(this.region===JNe)return this.ou(t,e,this.apiHost+e);const n=QGt+e;switch(t){case"assets":return this.ou(t,e,`https://${this.region}-assets.${n}`);case"api":return this.ou(t,e,`https://${this.region}.${n}`)}}};const yl=Cd("[Surveys]"),vGt=t=>{try{const e=(n=>((o,i)=>`seenSurvey_${(function(r){return r.current_iteration&&r.current_iteration>0?`${r.id}_${r.current_iteration}`:r.id})(i)}`)(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(e){yl.error("Failed to persist survey seen state",e)}},VGo=[NNe.Popover,NNe.Widget,NNe.API],zGo={ignoreConditions:!1,ignoreDelay:!1,displayType:TNe.Popover},JGo=Cd("[PostHog ExternalIntegrations]"),WGo={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};var jGo=class{constructor(t){this._instance=t}Ho(t,e){var n,o;(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,t,i=>{if(i)return JGo.error("failed to load script",i);e()})}startIfEnabledOrStop(){var t;for(const[i,r]of Object.entries((t=this._instance.config.integrations)!==null&&t!==void 0?t:{})){var e,n,o;r&&!(!((e=Vr.__PosthogExtensions__)===null||e===void 0||(e=e.integrations)===null||e===void 0)&&e[i])&&this.Ho(WGo[i],()=>{var s;(s=Vr.__PosthogExtensions__)===null||s===void 0||(s=s.integrations)===null||s===void 0||(s=s[i])===null||s===void 0||s.start(this._instance)}),!r&&(!((n=Vr.__PosthogExtensions__)===null||n===void 0||(n=n.integrations)===null||n===void 0)&&n[i])&&((o=Vr.__PosthogExtensions__)===null||o===void 0||(o=o.integrations)===null||o===void 0||(o=o[i])===null||o===void 0||o.stop())}}},$Go=class{constructor(e,n){this.A=e,this.bo=n,this.lu=new Map,this.To=!1}add(e){var n=this;return Zu(function*(){if(n.To)throw new Error("Cannot add an extension to a disposed ExtensionRuntime");if(n.lu.has(e.name))throw new Error(`Browser extension "${e.name}" is already registered`);n.lu.set(e.name,e);try{const o=e.setup(n.bo);o&&(yield o)}catch(o){const i=n.lu.get(e.name)===e;i&&n.lu.delete(e.name),n.A.error(`Failed to set up browser extension "${e.name}"`,o),i&&n.uu(e)}})()}getExtension(e){return this.lu.get(e)}dispose(){if(this.To)return;this.To=!0;const e=Array.from(this.lu.values()).reverse();this.lu.clear();for(const n of e)this.uu(n)}uu(e){try{var n;const o=(n=e.dispose)===null||n===void 0?void 0:n.call(e);o&&nf(o.then)&&o.then(void 0,i=>{this.A.error(`Failed to dispose browser extension "${e.name}"`,i)})}catch(o){this.A.error(`Failed to dispose browser extension "${e.name}"`,o)}}},qGo=class{constructor(t){this._instance=t}initialize(){}get(t){const e=this._instance.persistence;if(typeof t=="string")return e?.get_property(t);const n={};for(const o of t){const i=e?.get_property(o);Eo(i)||(n[o]=i)}return n}set(t,e){var n;(n=this._instance.persistence)===null||n===void 0||n.register(typeof t=="string"?{[t]:e}:t)}remove(t){var e;(e=this._instance.persistence)===null||e===void 0||e.unregister(t)}};const wGt="extensionsRemoteConfig";var XGo=class{constructor(t){this.instance=t,this.To=!1,this.A=ui,this.hu=t.cu,this.kv=new qGo(t),this.onEvent=e=>Tge(this.instance.on("eventCaptured",n=>{try{e({event:n.event,properties:n.properties})}catch(o){this.A.error("Browser extension event listener failed",o)}})),this.onRemoteConfig=e=>{if(this.To)return Tge(()=>{});const n=i=>{try{e(i)}catch(r){this.A.error("Browser extension remote config listener failed",r)}},o=this.instance.du.on(wGt,n);return this.hu&&n(this.hu),Tge(o)},this.vu=new $Go(ui.createLogger("[BrowserExtensions]"),this)}get logger(){return this.A}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var t;return(t=this.instance.get_property("$device_id"))!==null&&t!==void 0?t:this.distinctId}get deviceId(){const t=this.instance.get_property(XDe);return typeof t=="string"?t:void 0}get library(){return{name:n_.LIB_NAME,version:n_.LIB_VERSION}}get initialPersonProperties(){var t,e;return(t=(e=this.instance.persistence)===null||e===void 0?void 0:e.get_initial_props())!==null&&t!==void 0?t:{}}get groups(){return this.instance.getGroups()}get session(){try{var t,e,n,o;const i=(t=this.instance.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId(!0);return{sessionId:(e=i?.sessionId)!==null&&e!==void 0?e:"",windowId:(n=i?.windowId)!==null&&n!==void 0?n:"",sessionStartTimestamp:(o=i?.sessionStartTimestamp)!==null&&o!==void 0?o:0}}catch{return{sessionId:"",windowId:"",sessionStartTimestamp:0}}}get canCapture(){return this.instance.is_capturing()}get projectToken(){return this.instance.config.token}add(t){return this.vu.add(t)}getExtension(t){return this.vu.getExtension(t)}capture(t,e,n){n?this.instance.capture(t,e,{timestamp:n.timestamp,uuid:n.uuid,$set:n.set,$set_once:n.setOnce}):this.instance.capture(t,e)}registerDynamicEventProperties(t){return Tge(this.instance.fu(t))}handleRemoteConfig(t){this.To||(this.hu=t,this.instance.du.emit(wGt,t))}sendRequest(t){var e=this;return Zu(function*(n,o={}){var i;const r=e.instance.requestRouter.endpointFor((i=o.target)!==null&&i!==void 0?i:"api",n),s={method:o.method,url:o.query?iq(r,o.query):r,data:o.body,headers:o.headers,timeout:o.timeoutMs,fireCallbackOnDrop:!0,transport:o.transport,compression:o.compression,compressionFallback:o.target==="flags"&&o.compression==="best-available"?wDe.Base64:void 0,timestampMode:o.sentAt};return o.transport==="sendBeacon"?(e.instance._send_request(s),{statusCode:202}):new Promise(a=>{s.callback=a,e.instance._send_request(s)})}).apply(this,arguments)}dispose(){this.To||(this.To=!0,this.vu.dispose())}};const rq={};let WNe=0;const sq=()=>{},PGt='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',lG="Surveys module not available",MGt="sanitize_properties is deprecated. Use before_send instead",DGt="Invalid value for property_denylist config: ",ZGo=["$recording_status","$sdk_debug_recording_script_not_loaded","$sdk_debug_replay_url_trigger_status","$sdk_debug_replay_event_trigger_status","$sdk_debug_replay_linked_flag_trigger_status","$sdk_debug_replay_rrweb_error","$sdk_debug_replay_internal_buffer_length","$sdk_debug_replay_flushed_size"],eYo=["$feature_flag_called","$$heatmap","$snapshot"],NGt=t=>t.charAt(0)==="$"&&!as(eYo,t),tYo=/^[A-Za-z0-9_-]{1,400}$/,RGt=/^fb\.[0-9]+\.[0-9]+\.[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)?$/,TGt=/^fb\.[0-9]+\.[0-9]+\.[0-9]+$/,nYo=["token","distinct_id",JHt],aq="posthog",oYo=t=>{const e={};return t&&t!=="unset"&&("2025-11-30">t||(e.strictMinimumDuration=!0),"2026-05-30">t||(e.canvasCapture={resolutionScale:.6}),"2026-06-25">t||(e.streamNetworkBody=!0),"2026-08-30">t||(e.captureJsonLd=!0)),e},jNe=t=>{var e;return sn({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:eGo(No?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:sq,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:fd&&rA(fd?.search)&&fd.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,reuseAnonymousId:!1,disable_external_dependency_loading:!1,strict_script_versioning:"fallback",enable_recording_console_log:void 0,secure_cookie:(Fn==null||(e=Fn.location)===null||e===void 0?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,feature_flag_request_max_retries:1,surveys_request_timeout_ms:1e4,on_request_error(n){ui.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:oOt,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:sq},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:AGo,ignore_text_selection:!0}:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:oYo(n),external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:n&&n>="2026-05-30"?250:0,split_storage:!(!n||"2026-05-30">n),detect_google_search_app:!(!n||"2026-05-30">n),disable_capture_url_hashes:!(!n||"2026-06-25">n),cookieWinsOnConflict:!(!n||n==="unset"||"2026-08-29">n)}))(t))},iYo=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"],["__preview_cookie_wins_on_conflict","cookieWinsOnConflict"]],kGt=t=>{const e={};for(const[i,r]of iYo)Eo(t[i])||(e[r]=t[i]);const n=eg({},e,t),o=t.__preview_external_dependency_versioned_paths;return Eo(o)||(Eo(t.strict_script_versioning)&&(n.strict_script_versioning=!!o),rA(o)&&Eo(t.asset_host)&&(n.asset_host=o)),As(t.property_blacklist)&&(Eo(t.property_denylist)?n.property_denylist=t.property_blacklist:As(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:ui.error(DGt+t.property_denylist)),n};var rYo=class{constructor(){this.__forceAllowLocalhost=!1}get pu(){return this.__forceAllowLocalhost}set pu(t){ui.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}},Aq=class KM{gu(e){if(!e)return;const n=this.lu.indexOf(e);n!==-1&&this.lu.splice(n,1)}mu(e,n){var o;return this.gu(e),this.lu.push(n),(o=n.initialize)===null||o===void 0||o.call(n),n}yu(){return this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isRejected()}bu(){if(this._u||this.config.reuseAnonymousId||this.config.segment||this.yu())return;const e=this.config.persistence==="memory"||this.config.persistence==="sessionStorage";if(!e&&!this.config.disable_persistence||this.wu)return;let n,o,i;e?(n=`persistence is set to '${this.config.persistence}'`,o=this.config.persistence==="memory"?"on every page load":"for every new browser tab or window",i="Either set persistence to 'localStorage+cookie', keep this persistence and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId."):(n="persistence is disabled (disable_persistence is true)",o="on every page load",i="Either set disable_persistence to false, keep persistence disabled and pass a stable ID through bootstrap.distinctID, or enable reuseAnonymousId."),this._u=!0,console.warn("[PostHog.js]",`${n} but no bootstrap.distinctID was provided. PostHog will mint a new distinct ID ${o}, so calling identify() merges a new ID onto the person each time. A person can then pass the distinct-ID limit and its events stop appearing on person pages and the session tab. ${i}`)}ku(){const e=this.persistence;if(!e||this.Su)return;if(this.yu())return void(this.config.cookieless_mode==="on_reject"&&this.get_distinct_id()!=="$posthog_cookieless"&&(this.xu(),this.$u()));if(this.get_distinct_id()!=="$posthog_cookieless")return;this.Cu()||e.load(!0);const n=this.get_distinct_id();if(!n||n==="$posthog_cookieless"){const o=this.config.get_device_id(kB());this.register({distinct_id:o,$device_id:o}),e.set_property(qy,Ub)}this.xu()}get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)===null||n===void 0?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)===null||n===void 0?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.Tu=!1,this.Iu=!1,this.webPerformance=new rYo,this.Mu=!1,this.version=n_.LIB_VERSION,this.Eu=new Set,this.Pu="",this.du=new Lge,this.lu=[],this.Ru=[],this.Au=!1,this.wu=!1,this._u=!1,this.Su=!1,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=jNe(),this.SentryIntegration=mGo,this.sentryIntegration=o=>(function(i,r){const s=ROt(i,r);return{name:NOt,processEvent:a=>s(a)}})(this,o),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ou=!1,this.Fu=null,this.Du=null,this.Lu=null,this.scrollManager=new HGo(this),this.pageViewManager=new TOt(this),this.rateLimiter=new SGo(this),this.requestRouter=new KGo(this),this.consent=new aGo(this),this.externalIntegrations=new jGo(this);const n=(e=KM.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.metrics=n.metrics&&new n.metrics(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(o,i,r)=>{const s=rA(o)?{[o]:i}:o;this.setPersonProperties(s),r?.({})},set_once:(o,i,r)=>{const s=rA(o)?{[o]:i}:o;this.setPersonProperties(void 0,s),r?.({})}},this.on("eventCaptured",o=>ui.info(`send "${o?.event}"`,o))}init(e,n,o){if(o&&o!==aq){var i;const r=(i=rq[o])!==null&&i!==void 0?i:new KM;return r._init(e,n,o),rq[o]=r,rq[aq][o]=r,r}return this._init(e,n,o)}_init(e,n={},o){var i,r,s;const a=rA(e)?e.trim():"";if(!a)return ui.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;var A;if(this.__loaded)return a!==((A=this.config)===null||A===void 0?void 0:A.token)?console.warn("[PostHog.js]",`You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('${a}', { ... }, 'project2')`):console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=jNe(n.defaults),n.debug=this.Nu(n.debug),this.qu=n,this.ju=[],n.person_profiles?this.Du=n.person_profiles:n.process_person&&(this.Du=n.process_person);const c=jNe(n.defaults),l=kGt(n),u=eg({},c,l,{name:o,token:a});QA(c.rageclick)&&QA(l.rageclick)&&(u.rageclick=eg({},c.rageclick,l.rageclick)),QA(c.session_recording)&&QA(l.session_recording)&&(u.session_recording=eg({},c.session_recording,l.session_recording)),this.set_config(u),this.config.on_xhr_error&&ui.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:gE.GZipJS;const g=this.Cu(),h=!this.yu();if(this.persistence=new DNe(this.config,g,!0,h),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new DNe(sn(sn({},this.config),{},{persistence:"sessionStorage"}),g,!1,h),this.Pu="ph_"+(this.config.persistence_name||this.config.token)+"_session_registered_properties",this.config.persistence!=="memory"&&!g&&nu.Et()){const f=nu.Lt(this.Pu);As(f)&&f.forEach(I=>{rA(I)&&this.Eu.add(I)})}else nu.Pt(this.Pu);const d=sn({},this.persistence.props),p=sn({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Bu=new kGo((f,I)=>this.Hu(f,I),this.config.request_queue_config),this.zu=new LGo(this),this.__request_queue=[];const m=this.yu();m||(this.sessionManager=new yGt(this),this.sessionPropsManager=new IGt(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId((f,I,C)=>{(C?.activityTimeout||C?.sessionPastMaximumLength||C?.crossTabAdoption)&&this.Uu()})),this.Wu(),this.config.__preview_deferred_init_extensions?(ui.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vu(m)},0)):(ui.info("Initializing extensions synchronously"),this.Vu(m)),n_.DEBUG=n_.DEBUG||this.config.debug,n_.DEBUG&&ui.info("Starting in debug mode",{this:this,config:n,thisC:sn({},this.config),p:d,s:p}),this.config.identity_distinct_id&&!(!((i=n.bootstrap)===null||i===void 0)&&i.distinctID)&&(n.bootstrap=sn(sn({},n.bootstrap),{},{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0}));const _=(r=n.bootstrap)===null||r===void 0?void 0:r.distinctID;if(this.wu=!!_&&!D$(_),(s=n.bootstrap)===null||s===void 0?void 0:s.distinctID){const f=n.bootstrap.distinctID,I=this.get_distinct_id(),C=this.persistence.get_property(qy);if(n.bootstrap.isIdentifiedID&&I!=null&&I!==f&&C==="anonymous")this.identify(f);else if(n.bootstrap.isIdentifiedID&&I!=null&&I!==f&&C==="identified")ui.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{const y=this.config.get_device_id(kB()),x=n.bootstrap.isIdentifiedID?y:f;this.persistence.set_property(qy,n.bootstrap.isIdentifiedID?Sge:Ub),this.register({distinct_id:f,$device_id:x})}}if(m)this.register_once({distinct_id:uNe,$device_id:null},"");else if(!this.get_distinct_id()){const f=this.config.get_device_id(kB());this.register_once({distinct_id:f,$device_id:f},""),this.persistence.set_property(qy,Ub)}return el(Fn,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),el(Fn,"pageshow",()=>{var f;this.Tu=!1,this.Iu||(f=this.zu)===null||f===void 0||f.resume()}),n.segment?DOt(this,()=>this.Gu()):this.Gu(),nf(this.config._onCapture)&&this.config._onCapture!==sq&&(ui.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",f=>this.config._onCapture(f.event,f))),this.config.ip&&ui.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return EGt.apply(this,arguments)})().then(f=>{f&&this.register({[ZDe]:f})}).catch(sq),this}Qu(e){const n=e;return rA(n.name)&&nf(n.setup)}Ju(e,n){this.Qu(e)?n.push(()=>{this.Zu().add(e).catch(()=>{var o;return(o=e.dispose)===null||o===void 0?void 0:o.call(e)}).catch(o=>{ui.error(`Failed to dispose browser extension "${e.name}"`,o)})}):this.lu.push(e)}Wu(){var e,n,o;const i=(e=(n=this.config.__extensionClasses)===null||n===void 0?void 0:n.featureFlags)!==null&&e!==void 0?e:(o=KM.__defaultExtensionClasses)===null||o===void 0?void 0:o.featureFlags;var r,s,a;i&&(this.featureFlags&&this.featureFlags instanceof i||((r=this.Ku)===null||r===void 0||r.call(this),this.Ku=void 0,this.featureFlags=new i(this)),nf(this.featureFlags.onReloading)&&nf(this.featureFlags.setup)?this.Ku||(this.Ku=this.featureFlags.onReloading(()=>{this.du.emit("featureFlagsReloading",!0)}),this.Zu().add(this.featureFlags)):(s=(a=this.featureFlags).initialize)===null||s===void 0||s.call(a))}Vu(e){const n=performance.now(),o=sn(sn({},KM.__defaultExtensionClasses),this.config.__extensionClasses),i=[];var r,s,a,A,c,l,u;o.exceptions&&this.lu.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new o.exceptions(this)),o.historyAutocapture&&this.lu.push(this.historyAutocapture=new o.historyAutocapture(this)),o.tracingHeaders&&this.lu.push(this.tracingHeaders=new o.tracingHeaders(this)),o.siteApps&&this.lu.push(this.siteApps=new o.siteApps(this)),o.sessionRecording&&!e&&this.lu.push(this.sessionRecording=new o.sessionRecording(this)),this.config.disable_scroll_properties||i.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),o.autocapture&&this.Ju(this.autocapture=new o.autocapture(this),i),o.surveys&&this.Ju(this.surveys=(s=this.surveys)!==null&&s!==void 0?s:new o.surveys(this),i),o.logs&&this.Ju(this.logs=(a=this.logs)!==null&&a!==void 0?a:new o.logs(this),i),o.metrics&&this.lu.push(this.metrics=(A=this.metrics)!==null&&A!==void 0?A:new o.metrics(this)),o.conversations&&this.lu.push(this.conversations=(c=this.conversations)!==null&&c!==void 0?c:new o.conversations(this)),o.productTours&&this.lu.push(this.productTours=new o.productTours(this)),o.heatmaps&&this.lu.push(this.heatmaps=new o.heatmaps(this)),o.webVitalsAutocapture&&this.lu.push(this.webVitalsAutocapture=new o.webVitalsAutocapture(this)),o.exceptionObserver&&this.lu.push(this.exceptionObserver=new o.exceptionObserver(this)),o.deadClicksAutocapture&&this.lu.push(this.deadClicksAutocapture=new o.deadClicksAutocapture(this,pGo)),o.toolbar&&this.lu.push(this.toolbar=(l=this.toolbar)!==null&&l!==void 0?l:new o.toolbar(this)),o.experiments&&this.lu.push(this.experiments=(u=this.experiments)!==null&&u!==void 0?u:new o.experiments(this)),this.lu.forEach(g=>{g.initialize&&i.push(()=>{var h;(h=g.initialize)===null||h===void 0||h.call(g)})}),i.push(()=>{if(this.Xu){const g=this.Xu;this.Xu=void 0,this.lu.forEach(h=>{var d;return(d=h.onRemoteConfig)===null||d===void 0?void 0:d.call(h,g)})}}),this.Yu(i,n)}Yu(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout(()=>{this.Yu(e,n)},0);const i=e.shift();if(i)try{i()}catch(r){ui.error("Error initializing extension:",r)}}const o=Math.round(performance.now()-n);this.register_for_session({[WHt]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[jHt]:o}),this.config.__preview_deferred_init_extensions&&ui.info(`PostHog extensions initialized (${o}ms)`)}el(e){var n;if(!No||!No.body)return ui.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.el(e)},500);if(this.config.__preview_deferred_init_extensions&&(this.Xu=e),this.cu=e,this.compression=void 0,e.ok){var o;const i=e.config;i.supportedCompression&&!this.config.disable_compression&&(this.compression=as(i.supportedCompression,gE.GZipJS)?gE.GZipJS:as(i.supportedCompression,gE.Base64)?gE.Base64:void 0),!((o=i.analytics)===null||o===void 0)&&o.endpoint&&(this.analyticsDefaultEndpoint=i.analytics.endpoint)}this.set_config({person_profiles:this.Du?this.Du:oOt}),(n=this.th)===null||n===void 0||n.handleRemoteConfig(e),this.lu.forEach(i=>{var r;return(r=i.onRemoteConfig)===null||r===void 0?void 0:r.call(i,e)})}Gu(){try{this.config.loaded(this)}catch(e){ui.critical("`loaded` function failed",e)}if(this.eh(),this.config.internal_or_test_user_hostname&&fd?.hostname){const e=fd.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?e===n:n.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.yu())&&this.ih()},1),this.nh=new qOt(this),this.nh.load()}eh(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Bu)===null||e===void 0||e.enable())}_dom_loaded(){this.is_capturing()&&XO(this.__request_queue,e=>this.Hu(e)),this.__request_queue=[],this.eh()}_handle_unload(){var e,n,o,i,r,s;this.Tu=!0,(e=this.surveys)===null||e===void 0||(n=e.handlePageUnload)===null||n===void 0||n.call(e),(o=this.metrics)===null||o===void 0||o.flush("sendBeacon"),this.config.request_batching?(this.sh()&&this.capture(iOt),(i=this.logs)===null||i===void 0||i.flushLogs("sendBeacon"),(r=this.Bu)===null||r===void 0||r.unload(),(s=this.zu)===null||s===void 0||s.unload()):this.sh()&&this.capture(iOt,null,{transport:"sendBeacon"})}_send_request(e){fGt(this,e)}Hu(e,n){this.zu?this.zu.retriableRequest(e,n):this._send_request(n?sn(sn({},e),{},{transport:n}):e)}_execute_array(e){WNe++;try{let n;const o=[],i=[],r=[];XO(e,a=>{if(a)if(n=a[0],As(n))r.push(a);else if(nf(a))try{a.call(this)}catch(A){ui.error("Error executing queued PostHog call",a,A)}else As(a)&&n==="alias"?o.push(a):As(a)&&n.indexOf("capture")!==-1&&nf(this[n])?r.push(a):i.push(a)});const s=function(a,A){XO(a,function(c){try{if(As(c[0])){let l=A;kl(c,function(u){l=l[u[0]].apply(l,u.slice(1))})}else A[c[0]].apply(A,c.slice(1))}catch(l){ui.error("Error executing queued PostHog call",c,l)}})};s(o,this),s(i,this),s(r,this)}finally{WNe--}}push(e){if(WNe>0&&As(e)&&rA(e[0])){const n=KM.prototype[e[0]];return void(nf(n)&&n.apply(this,e.slice(1)))}this._execute_array([e])}get rh(){return{property:RHt,persistenceKey:jO,cookieName:"_fbc",pattern:RGt,register:(e,n)=>{var o;return(o=this.persistence)===null||o===void 0?void 0:o.register({[jO]:{value:e,delivered:n}})},unregister:()=>{var e;return(e=this.persistence)===null||e===void 0?void 0:e.unregister(jO)}}}get oh(){return{property:THt,persistenceKey:F$,cookieName:"_fbp",pattern:TGt,register:(e,n)=>{var o;return(o=this.persistence)===null||o===void 0?void 0:o.register({[F$]:{value:e,delivered:n}})},unregister:()=>{var e;return(e=this.persistence)===null||e===void 0?void 0:e.unregister(F$)}}}ah(e){var n;const o=(n=this.persistence)===null||n===void 0?void 0:n.get_property(e.persistenceKey);return rA(o)&&e.pattern.test(o)?{value:o,delivered:!1}:QA(o)&&rA(o.value)&&e.pattern.test(o.value)?{value:o.value,delivered:o.delivered===!0}:void 0}uh(e,n,o){return n===o?.value?{value:n,pending:!o.delivered}:(e.register(n,!1),{value:n,pending:!0})}hh(e){if(!this.config.save_campaign_params||this.yu())return;const n=K$(e.cookieName);return rA(n)&&e.pattern.test(n)?n:void 0}dh(e,n,o,i){if(!this.persistence)return;const r=this.rh;this.persistence.refreshKey(r.persistenceKey);const s=this.ah(r);if(i)return void r.unregister();if(o)return rA(n)&&RGt.test(n)?this.uh(r,n,s):void r.unregister();const a=rA(e)&&tYo.test(e)?e:void 0,A=this.hh(r);return A&&((c,l,u)=>{const g=c.split(".");if(l)return g[3]===l;if(!u)return!0;const h=u.value.split(".");return g[3]===h[3]||Number(g[2])>Number(h[2])})(A,a,s)?this.uh(r,A,s):a?s?.value.split(".")[3]===a?{value:s.value,pending:!s.delivered}:this.uh(r,`fb.1.${Date.now()}.${a}`,s):s?{value:s.value,pending:!s.delivered}:void 0}fh(e,n,o){if(!this.persistence)return;const i=this.oh;this.persistence.refreshKey(i.persistenceKey);const r=this.ah(i);if(o)return void i.unregister();if(n)return rA(e)&&TGt.test(e)?this.uh(i,e,r):void i.unregister();const s=this.hh(i);return s?this.uh(i,s,r):r?{value:r.value,pending:!r.delivered}:void 0}ph(e,n){if(!this.persistence)return;this.persistence.refreshKey(e.persistenceKey);const o=this.ah(e);o?.value!==n||o.delivered||e.register(n,!0)}capture(e,n,o){var i,r;if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Bu))return void ui.uninitializedWarning("posthog.capture");if(!this.is_capturing())return;if(Eo(e)||!rA(e))return void ui.error("No event name provided to posthog.capture");if(this.ku(),e==="$snapshot"&&this.yu())return;const s=!this.config.opt_out_useragent_filter&&this._is_bot();if(s&&!this.config.__preview_capture_bot_pageviews)return;const a=o?.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(a?.isRateLimited)return void ui.critical("This capture call is ignored due to client rate limiting.");let A;n?.$current_url&&!rA(n?.$current_url)&&(ui.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),e!=="$exception"||o?.gh||ui.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&(A=this.sessionPersistence.update_campaign_params()),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();const c=new Date,l=o?.timestamp||c,u=ZLt(o?.uuid,kB);let g={uuid:u,event:e,properties:this.calculateEventProperties(e,n||{},l,u)};e==="$pageview"&&this.config.__preview_capture_bot_pageviews&&s&&(g.event="$bot_pageview",g.properties.$browser_type="bot"),a&&(g.properties.$lib_rate_limit_remaining_tokens=a.remainingTokens);const h=e==="$feature_flag_called"&&g.properties.$feature_flag_has_experiment===!1&&this.get_property("$minimal_flag_called_events")===!0;o?.$set&&!h&&(g.$set=o?.$set);const d=QA(n?.$set)?n.$set:void 0,p=As(n?.$unset)?n.$unset:[],m=o?.$unset||[],_=R=>{var F;const O=!!o?.$set&&R in o.$set;return{hasProvided:O||!!d&&R in d,provided:O?o==null||(F=o.$set)===null||F===void 0?void 0:F[R]:d?.[R],unset:p.indexOf(R)!==-1||m.indexOf(R)!==-1}},f=_(RHt),I=_(THt),C=[{channel:this.rh,hasProvided:f.hasProvided,update:this.dh(A?.fbclid,f.provided,f.hasProvided,f.unset)},{channel:this.oh,hasProvided:I.hasProvided,update:this.fh(I.provided,I.hasProvided,I.unset)}];for(const{channel:R,hasProvided:F,update:O}of C)O&&g.properties.$process_person_profile===!0&&O.pending&&!F&&!h&&(g.$set=sn({[R.property]:O.value},g.$set));const y=o?.$unset;y&&(g.$unset=y);const x=h?void 0:this.mh(o?.$set_once,e!==sOt,e===rOt);if(x&&(g.$set_once=x),o?._noTruncate||(E=this.config.properties_string_max_length,g=(function(R,F){const O=new Set;return(function U(Y,W){if(Y!==Object(Y))return F?F(Y):Y;if(O.has(Y))return;let te;if(O.add(Y),As(Y))te=[],XO(Y,j=>{te.push(U(j))});else{const j={};kl(zO(Y)?aOt(Y):Y,(J,oe)=>{O.has(J)||(j[oe]=U(J))}),te=j}return te})(R)})(g,R=>rA(R)?R.slice(0,E):R)),g.timestamp=l,Eo(o?.timestamp)||(g.properties.$event_time_override_provided=!0,g.properties.$event_time_override_system_time=c),h&&(g.properties=((R,F=[])=>{const O={},U=Y=>{R[Y]!==void 0&&(O[Y]=R[Y])};return COo.forEach(U),F.forEach(U),O})(g.properties,nYo)),e===dE.DISMISSED||e===dE.SENT){const R=n?.[RNe.SURVEY_ID],F=n?.[RNe.SURVEY_ITERATION];vGt({id:R,current_iteration:F}),g.$set=sn(sn({},g.$set),{},{[GGo({id:R,current_iteration:F},e===dE.SENT?"responded":"dismissed")]:!0})}else e===dE.SHOWN&&(g.$set=sn(sn({},g.$set),{},{[RNe.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));var E;if(e===bGo.SHOWN){const R=n?.[jOt.TOUR_TYPE];R&&(g.$set=sn(sn({},g.$set),{},{[`${jOt.TOUR_LAST_SEEN_DATE}/${R}`]:new Date().toISOString()}))}const B=sn(sn({},g.properties.$set),g.$set);if(Rx(B)||this.setPersonPropertiesForFlags(B),!Hs(this.config.before_send)){const R=this.Fs(g);if(!R)return;g=R,g.uuid=ZLt(g.uuid,kB)}this.sessionRecording&&!this.Au&&NGt(e)&&(this.Au=!0,setTimeout(()=>this.Au=!1,3e4));const S=C.filter(({channel:R,update:F})=>{var O,U,Y;const W=(O=(U=g.$set)===null||U===void 0?void 0:U[R.property])!==null&&O!==void 0?O:QA((Y=g.properties)===null||Y===void 0?void 0:Y.$set)?g.properties.$set[R.property]:void 0;return F?.pending&&W===F.value});this.du.emit("eventCaptured",g);const Q=(i=o?._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),w=o?._batchKey==="recordings"||/\/s\/(?:\?|$)/.test(Q),M=sn(sn(sn({method:"POST",url:Q,data:g,compression:"best-available",preferSyncCompression:o?.send_instantly,timestampMode:w?"body":"capture-body",batchKey:o?._batchKey},w&&(!((r=g.properties)===null||r===void 0)&&r.$session_id)?{batchGroup:g.properties.$session_id+(g.properties.$window_id?`-${g.properties.$window_id}`:"")}:{}),o?.transport?{transport:o.transport}:{}),S.length?{fireCallbackOnDrop:!0,callback:R=>{if(R.statusCode>=200&&300>R.statusCode)for(const{channel:F,update:O}of S)this.ph(F,O.value)}}:{});if(!this.config.request_batching||o&&!o?._batchKey||o?.send_instantly||S.length){var k;let R;!M.transport&&!M.callback&&Rx((k=this.config.request_headers)!==null&&k!==void 0?k:{})&&this.Tu&&(R="sendBeacon"),this.Hu(M,R)}else this.Bu.enqueue(M);return g}_addCaptureHook(e){return this.on("eventCaptured",n=>e(n.event,n))}getExtension(e){var n;return(n=this.th)===null||n===void 0?void 0:n.getExtension(e)}Zu(){var e;return(e=this.th)!==null&&e!==void 0?e:this.th=new XGo(this)}fu(e){this.Ru.push(e);let n=!0;return()=>{if(!n)return;n=!1;const o=this.Ru.indexOf(e);o!==-1&&this.Ru.splice(o,1)}}yh(e=!0){var n,o,i;return!!(!((n=this.persistence)===null||n===void 0)&&n.consumeCookieIdentityChange())&&(this.Lu=null,this.persistence.get_property("$user_state")==="anonymous"&&((i=this.sessionPersistence)===null||i===void 0||i.clear(),this.Eu.clear(),this.bh()),(o=this.featureFlags)===null||o===void 0||o.reset(),e&&this.reloadFeatureFlags(),!0)}calculateEventProperties(e,n,o,i,r){if(o=o||new Date,!this.persistence||!this.sessionPersistence)return n;this.ku(),this.persistence.syncCookieProperties(),this.yh();const s=r?void 0:this.persistence.remove_event_timer(e);let a=sn({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,this.yu()&&(a[JHt]=!0),e==="$snapshot"){const f=sn(sn({},this.persistence.properties()),this.sessionPersistence.properties());return a.distinct_id=f.distinct_id,(!rA(a.distinct_id)&&!Ah(a.distinct_id)||D$(a.distinct_id))&&ui.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}const A=(function(f,I,C,y=!1){var x,E,B,S;if(!jy)return{};const Q=f?[...rG,...I||[]]:[],[w,M]=WLt(jy),[k,R]=(function(ie){for(let ne=0;$Lt.length>ne;ne++){const[le,ge,_e]=$Lt[ne],ue=ie.match(le);if(ue){const fe=_e&&ie.match(_e)||ue;return[ge,fe?.[1]||""]}}return["",""]})(jy),F=(function(){const ie="u">typeof navigator?navigator:void 0;return ie?.brave?{brave:!0}:{}})(),O={};Eo(C)||(O.detectGoogleSearchApp=C);const U={},Y=(x=navigator)===null||x===void 0||(x=x.userAgentData)===null||x===void 0?void 0:x.platform,W=(E=navigator)===null||E===void 0?void 0:E.maxTouchPoints,te=Fn==null||(B=Fn.screen)===null||B===void 0?void 0:B.width,j=Fn==null||(S=Fn.screen)===null||S===void 0?void 0:S.height,J=Fn?.devicePixelRatio;Eo(Y)||(U.userAgentDataPlatform=Y),Eo(W)||(U.maxTouchPoints=W),Eo(te)||(U.screenWidth=te),Eo(j)||(U.screenHeight=j),Eo(J)||(U.devicePixelRatio=J);const oe=eg(mNe({$os:w,$os_version:M,$browser:zLt(jy,navigator.vendor,F,O),$webview_app:k,$webview_app_version:R,$device:jLt(jy),$device_type:YHo(jy,U),$timezone:VOt(),$timezone_offset:xGo()}),{$current_url:X$(y?Mw(fd?.href):fd?.href,Q,Z$),$host:fd?.host,$pathname:fd?.pathname,$raw_user_agent:jy.length>1e3?jy.substring(0,997)+"...":jy,$browser_version:GHo(jy,navigator.vendor,F,O),$browser_language:GOt(),$browser_language_prefix:yGo(),$screen_height:Fn?.screen.height,$screen_width:Fn?.screen.width,$viewport_height:Fn?.innerHeight,$viewport_width:Fn?.innerWidth,$lib:Ob.LIB_NAME,$lib_version:Ob.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return Ob.SDK_DIST_CHANNEL&&(oe.$sdk_dist_channel=Ob.SDK_DIST_CHANNEL),oe})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){const{sessionId:f,windowId:I}=this.sessionManager.checkAndGetSessionAndWindowId(r,o.getTime(),!0);a.$session_id=f,a.$window_id=I}this.sessionPropsManager&&eg(a,this.sessionPropsManager.getSessionProps());try{var c;if(this.sessionRecording){const f=this.sessionRecording.sdkDebugProperties,I=!this.Au&&NGt(e);for(const C in f)(I||as(ZGo,C))&&(a[C]=f[C])}a.$sdk_debug_retry_queue_size=(c=this.zu)===null||c===void 0?void 0:c.length}catch(f){a.$sdk_debug_error_capturing_properties=String(f)}let l;if(this.requestRouter.region===JNe&&(a.$lib_custom_api_host=this.config.api_host),l=e!=="$pageview"||r?e!=="$pageleave"||r?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(o):this.pageViewManager.doPageView(o,i),a=eg(a,l),e==="$pageview"&&No&&(a.title=No.title),!Eo(s)){const f=o.getTime()-s;a.$duration=parseFloat((f/1e3).toFixed(3))}jy&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser");const u=this.persistence.properties(),g=this.sessionPersistence.properties(),h=a.$groups,d=u.$groups;QA(h)&&!Rx(h)&&(a.$groups=sn(sn({},QA(d)?d:{}),h)),kl(["$referrer","$referring_domain"],f=>{f in u&&delete g[f]});const p={};if(this.Ru.length>0)for(const f of this.Ru.slice())try{eg(p,f())}catch(I){ui.error("Failed to produce browser extension event properties",I)}a=eg({},A,u,g,sn(sn({},p),a)),a.$is_identified=this._isIdentified(),As(this.config.property_denylist)?kl(this.config.property_denylist,function(f){delete a[f]}):ui.error(DGt+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);const m=this.config.sanitize_properties;m&&(ui.error(MGt),a=m(a,e));const _=this._h();return a.$process_person_profile=_,_&&!r&&this.wh("_calculate_event_properties"),a}mh(e,n=!0,o=!1){var i;if(!this.persistence||!this._h()||this.Mu&&!o)return e;const r=this.persistence.get_initial_props(),s=(i=this.sessionPropsManager)===null||i===void 0?void 0:i.getSetOnceProps();let a=eg({},r,s||{},e||{});const A=this.config.sanitize_properties;return A&&(ui.error(MGt),a=A(a,"$set_once")),n&&(this.Mu=!0),Rx(a)?void 0:a}register(e,n){var o;(o=this.persistence)===null||o===void 0||o.register(e,n)}register_once(e,n,o){var i;(i=this.persistence)===null||i===void 0||i.register_once(e,n,o)}register_for_session(e){var n,o;(n=this.persistence)===null||n===void 0||n.syncCookieProperties(),this.yh(),(o=this.sessionPersistence)===null||o===void 0||o.register(e),Object.keys(e).forEach(i=>this.Eu.add(i)),this.bh()}unregister(e){var n;(n=this.persistence)===null||n===void 0||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)===null||n===void 0||n.unregister(e),this.Eu.delete(e),this.bh()}kh(e,n){this.register({[e]:n})}Uu(){this.Eu.forEach(e=>{var n;(n=this.sessionPersistence)===null||n===void 0||n.unregister(e)}),this.Eu.clear(),this.bh()}bh(){var e;if(!this.Pu)return;if(this.config.persistence==="memory"||!((e=this.sessionPersistence)===null||e===void 0)&&e.hi||!nu.Et())return void nu.Pt(this.Pu);const n=[];this.Eu.forEach(o=>n.push(o)),n.length>0?nu.$t(this.Pu,n):nu.Pt(this.Pu)}getFeatureFlag(e,n){var o;return(o=this.featureFlags)===null||o===void 0?void 0:o.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)===null||n===void 0?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var o;return(o=this.featureFlags)===null||o===void 0?void 0:o.getFeatureFlagResult(e,n)}getAllFeatureFlags(){var e,n;return(e=(n=this.featureFlags)===null||n===void 0?void 0:n.getAllFeatureFlags())!==null&&e!==void 0?e:[]}isFeatureEnabled(e,n){var o,i;return(o=(i=this.featureFlags)===null||i===void 0?void 0:i.isFeatureEnabled(e,n))!==null&&o!==void 0?o:n?.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)===null||e===void 0||e.reloadFeatureFlags()}updateFlags(e,n,o){var i;(i=this.featureFlags)===null||i===void 0||i.updateFlags(e,n,o)}updateEarlyAccessFeatureEnrollment(e,n,o){var i;(i=this.featureFlags)===null||i===void 0||i.updateEarlyAccessFeatureEnrollment(e,n,o)}getEarlyAccessFeatures(e,n=!1,o){var i;return(i=this.featureFlags)===null||i===void 0?void 0:i.getEarlyAccessFeatures(e,n,o)}on(e,n){return this.du.on(e,n)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:lG}),()=>{})}onSessionId(e){var n,o;return(n=(o=this.sessionManager)===null||o===void 0?void 0:o.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n=!1){this.surveys?this.surveys.getSurveys(e,n):e([],{isLoaded:!1,error:lG})}getActiveMatchingSurveys(e,n=!1){this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:lG})}onActiveMatchingSurveysChanged(e){return this.surveys?this.surveys.onActiveMatchingSurveysChanged(e):(e([],{isLoaded:!1,error:lG}),()=>{})}renderSurvey(e,n){var o;(o=this.surveys)===null||o===void 0||o.renderSurvey(e,n)}displaySurvey(e,n=zGo){var o;(o=this.surveys)===null||o===void 0||o.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)===null||n===void 0||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,o;return(n=(o=this.surveys)===null||o===void 0?void 0:o.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:lG}}canRenderSurveyAsync(e,n=!1){var o,i;return(o=(i=this.surveys)===null||i===void 0?void 0:i.canRenderSurveyAsync(e,n))!==null&&o!==void 0?o:Promise.resolve({visible:!1,disabledReason:lG})}Sh(e){return!e||D$(e)?(ui.critical("Unique user id has not been set in posthog.identify"),!1):e==="$posthog_cookieless"?(ui.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.`),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(ui.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.`),!1)}identify(e,n,o){if(!this.__loaded||!this.persistence)return ui.uninitializedWarning("posthog.identify");if(Ah(e)&&(e=e.toString(),ui.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),!this.Sh(e)||!this.wh("posthog.identify"))return;this.ku();const i=this.get_distinct_id(),r=this.persistence.syncCookieProperties()&&this.get_distinct_id()!==i,s=this.yh(!1),a=this.persistence.Fa();let A=!1;try{const l=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:l},""),e!==l&&e!==this.get_property("__alias")&&(this.unregister(Bge),this.register({distinct_id:e}));const u=(this.persistence.get_property("$user_state")||"anonymous")===Ub,g=e!==l,h=!g&&u;if(g&&u){var c;const d=this.config.reuseAnonymousId?{distinct_id:e}:{distinct_id:e,$anon_distinct_id:l};this.persistence.set_property(qy,Sge),this.setPersonPropertiesForFlags({$set:n||{},$set_once:o||{}},!1),this.config.cookieWinsOnConflict&&this.persistence.Da(),this.capture("$identify",d,{$set:n||{},$set_once:o||{}})&&(this.Lu=zNe(e,n,o)),(c=this.featureFlags)===null||c===void 0||c.setAnonymousDistinctId(this.config.reuseAnonymousId?void 0:l)}else if(h){this.persistence.set_property(qy,Sge);const d=n||{},p=o||{};this.setPersonPropertiesForFlags({$set:d,$set_once:p},!1),this.config.cookieWinsOnConflict&&this.persistence.Da(),this.capture("$set",{$set:d,$set_once:p})&&(this.Lu=zNe(e,n,o))}else(n||o)&&this.setPersonProperties(n,o);g||r||s?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(Tw)):h&&(n||o)&&this.reloadFeatureFlags(),A=!0}finally{a&&this.persistence.qa(A)}}setPersonProperties(e,n){if(!e&&!n||!this.wh("posthog.setPersonProperties"))return;const o=zNe(this.get_distinct_id(),e,n);this.Lu!==o?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}})&&(this.Lu=o)):ui.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}unsetPersonProperties(e){var n;const o=(As(e)?e:[e]).filter(i=>rA(i)&&i.length>0);o.length!==0&&this.wh("posthog.unsetPersonProperties")&&((n=this.featureFlags)===null||n===void 0||n.unsetPersonPropertiesForFlags(o,!0),this.capture("$set",{$unset:o}),this.Lu=null)}group(e,n,o){var i;if(!e||!n)return void ui.error("posthog.group requires a group type and group key");(i=this.persistence)===null||i===void 0||i.syncCookieProperties(),this.yh();const r=this.getGroups(),s=r[e]!==n;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:sn(sn({},r),{},{[e]:n})}),(s||o)&&this._h()){const a={$group_type:e,$group_key:n};o&&(a.$group_set=o),this.capture(sOt,a)}o&&this.setGroupPropertiesForFlags({[e]:o}),s&&!o&&this.reloadFeatureFlags()}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n=!0){var o;(o=this.featureFlags)===null||o===void 0||o.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e=!0){var n;(n=this.featureFlags)===null||n===void 0||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n=!0){var o;this.wh("posthog.setGroupPropertiesForFlags")&&((o=this.featureFlags)===null||o===void 0||o.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)===null||n===void 0||n.resetGroupPropertiesForFlags(e)}reset(e){const n=$y(e)?e:e?.resetDeviceID,o=$y(e)||e==null?void 0:e.bootstrap;this.xh(n,!1,o)}xh(e,n=!1,o){var i,r,s,a,A,c;if(ui.info("reset"),!this.__loaded)return ui.uninitializedWarning("posthog.reset");const l=o?.sessionID;this.config.bootstrap=o||((i=this.qu)===null||i===void 0?void 0:i.bootstrap)||{},(r=this.featureFlags)===null||r===void 0||(s=r.updateConfig)===null||s===void 0||s.call(r,this.config,this.il());const u=this.get_property(XDe),g=this.get_property(ZDe),h=this.get_property(L$);(a=this.sessionRecording)===null||a===void 0||a.flushBeforeIdentityReset();const d=this.is_capturing();n||this.consent.reset(),n||!d||this.is_capturing()||console.warn("[PostHog.js]","reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.");const p=(A=this.persistence)===null||A===void 0||(c=A.Fa)===null||c===void 0?void 0:c.call(A),m=this.Su;this.Su=m||n;let _=!1;try{var f,I,C,y,x,E,B,S,Q,w,M,k,R;if((f=this.persistence)===null||f===void 0||f.clear(),(I=this.sessionPersistence)===null||I===void 0||I.clear(),this.Eu.clear(),this.bh(),Eo(h)||(w=this.persistence)===null||w===void 0||w.register({$session_recording_remote_config:h}),(C=this.surveys)===null||C===void 0||C.reset(),(y=this.featureFlags)===null||y===void 0||y.reset(),(x=this.conversations)===null||x===void 0||x.reset(),(E=this.logs)===null||E===void 0||E.reset(),(B=this.metrics)===null||B===void 0||B.reset(),(S=this.persistence)===null||S===void 0||S.set_property("$user_state","anonymous"),(Q=this.sessionManager)===null||Q===void 0||Q.resetSessionId(),this.Lu=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:uNe,$device_id:null},"");else{const U=this.config.get_device_id(kB());this.register_once({distinct_id:U,$device_id:e?U:u},""),e||Eo(g)||this.register({[ZDe]:g})}if(this.register({$last_posthog_reset:new Date().toISOString()},1),o&&(o.distinctID&&!this.yu()&&((R=this.persistence)===null||R===void 0||R.set_property("$user_state",o.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:o.distinctID})),(M=this.featureFlags)===null||M===void 0||M.initialize(),!Hs(l)&&!(!((k=this.sessionManager)===null||k===void 0)&&k.setBootstrapSessionId(l,!0)))){const U=sn({},o);delete U.sessionID,this.config.bootstrap=U}delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,_=!0}finally{var F,O;this.Su=m,p&&((F=this.persistence)===null||F===void 0||(O=F.qa)===null||O===void 0||O.call(F,_))}this.reloadFeatureFlags()}shutdown(e){var n=this;return Zu(function*(){var o,i,r,s,a,A,c,l;if(n.__loaded){n.Iu=!0,n.Zu().dispose(),(o=n.sessionRecording)===null||o===void 0||o.dispose(),(i=n.logs)===null||i===void 0||i.flushLogs("sendBeacon"),(r=n.metrics)===null||r===void 0||r.flush("sendBeacon"),(s=n.metrics)===null||s===void 0||s.dispose(),(a=n.Bu)===null||a===void 0||a.unload(),(A=n.zu)===null||A===void 0||A.unload();try{var u;(u=n.featureFlags)===null||u===void 0||u.destroy()}catch(g){ui.error("Error while destroying feature flags",g)}(c=n.persistence)===null||c===void 0||c.destroy(),(l=n.sessionPersistence)===null||l===void 0||l.destroy()}else ui.uninitializedWarning("posthog.shutdown")})()}setIdentity(e,n){var o;delete this.config.identity_claims,this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(o=this.conversations)===null||o===void 0||o.$h()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,delete this.config.identity_claims,(e=this.conversations)===null||e===void 0||e.Ch()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)===null||n===void 0?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";const{sessionId:n,sessionStartTimestamp:o}=this.sessionManager.checkAndGetSessionAndWindowId(!0);let i=this.requestRouter.endpointFor("ui",`/project/${this.config.token}/replay/${n}`);if(e?.withTimestamp&&o){var r;const s=(r=e.timestampLookBack)!==null&&r!==void 0?r:10;if(!o)return i;i+=`?t=${Math.max(Math.floor((new Date().getTime()-o)/1e3)-s,0)}`}return i}alias(e,n){return e===this.get_property("$people_distinct_id")?(ui.critical("Attempting to create alias for existing People user - aborting."),-2):this.wh("posthog.alias")?(Eo(n)&&(n=this.get_distinct_id()),e!==n?(this.kh(Bge,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(ui.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){const n=sn({},this.config);if(QA(e)){var o,i,r,s,a,A,c,l,u,g,h,d,p;eg(this.config,kGt(e));const C=this.Cu();if(this.persistence){const x=this.config.persistence==="sessionStorage"||this.config.persistence==="memory";var m,_;if(x&&this.sessionPersistence!==this.persistence&&((m=this.sessionPersistence)===null||m===void 0||m.remove(),(_=this.sessionPersistence)===null||_===void 0||_.destroy()),this.persistence.update_config(this.config,n,C),x)this.sessionPersistence=this.persistence;else if(this.sessionPersistence===this.persistence)this.sessionPersistence=new DNe(sn(sn({},this.config),{},{persistence:"sessionStorage"}),C,!1);else{var f;(f=this.sessionPersistence)===null||f===void 0||f.update_config(sn(sn({},this.config),{},{persistence:"sessionStorage"}),sn(sn({},n),{},{persistence:"sessionStorage"}),C)}}const y=this.Nu(this.config.debug);var I;$y(y)&&(this.config.debug=y),$y(this.config.debug)&&(this.config.debug?(n_.DEBUG=!0,hc.Et()&&hc.$t("ph_debug",!0),ui.info("set_config",{config:e,oldConfig:n,newConfig:sn({},this.config)})):(n_.DEBUG=!1,hc.Et()&&hc.Pt("ph_debug"))),(o=this.featureFlags)===null||o===void 0||(i=o.updateConfig)===null||i===void 0||i.call(o,this.config,this.il()),(r=this.exceptionObserver)===null||r===void 0||r.onConfigChange(),(s=this.exceptions)===null||s===void 0||s.onConfigChange(),(a=this.metrics)===null||a===void 0||a.onConfigChange(),(A=this.sessionRecording)===null||A===void 0||A.startIfEnabledOrStop(),(c=this.tracingHeaders)===null||c===void 0||c.startIfEnabledOrStop(),(l=this.autocapture)===null||l===void 0||l.startIfEnabled(),(u=this.heatmaps)===null||u===void 0||u.startIfEnabled(),("capture_pageview"in e||"disable_capture_url_hashes"in e)&&((I=this.historyAutocapture)===null||I===void 0||I.startIfEnabledOrStop()),(g=this.exceptionObserver)===null||g===void 0||g.startIfEnabledOrStop(),(h=this.deadClicksAutocapture)===null||h===void 0||h.startIfEnabledOrStop(),(d=this.surveys)===null||d===void 0||d.loadIfEnabled(),this.xu(),(p=this.externalIntegrations)===null||p===void 0||p.startIfEnabledOrStop(),!n.segment&&this.config.segment&&this.persistence&&DOt(this,sq,!1)}}_overrideSDKInfo(e,n){n_.LIB_NAME=e,n_.LIB_VERSION=n}startSessionRecording(e){const n=e===!0,o={sampling:n||!!e?.sampling,linked_flag:n||!!e?.linked_flag,url_trigger:n||!!e?.url_trigger,event_trigger:n||!!e?.event_trigger};var i,r,s,a,A;Object.values(o).some(Boolean)&&((i=this.sessionManager)===null||i===void 0||i.checkAndGetSessionAndWindowId(),o.sampling&&((r=this.sessionRecording)===null||r===void 0||r.overrideSampling()),o.linked_flag&&((s=this.sessionRecording)===null||s===void 0||s.overrideLinkedFlag()),o.url_trigger&&((a=this.sessionRecording)===null||a===void 0||a.overrideTrigger("url")),o.event_trigger&&((A=this.sessionRecording)===null||A===void 0||A.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!!(!((e=this.sessionRecording)===null||e===void 0)&&e.started)}captureException(e,n){try{if(!this.exceptions)return;const o=this.exceptions.buildProperties(e,{handled:!0,syntheticException:new Error("PostHog syntheticException")});return this.exceptions.sendExceptionEvent(sn(sn({},o),n))}catch{return}}addExceptionStep(e,n){var o;(o=this.exceptions)===null||o===void 0||o.addExceptionStep(e,n)}captureLog(e){var n;(n=this.logs)===null||n===void 0||n.captureLog(e)}get logger(){var e,n;return(e=(n=this.logs)===null||n===void 0?void 0:n.logger)!==null&&e!==void 0?e:KM.Th}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,o;return(n=(o=this.toolbar)===null||o===void 0?void 0:o.loadToolbar(e))!==null&&n!==void 0&&n}get_property(e){var n;return(n=this.persistence)===null||n===void 0?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)===null||n===void 0?void 0:n.props[e]}toString(){var e;let n=(e=this.config.name)!==null&&e!==void 0?e:aq;return n!==aq&&(n="posthog."+n),n}_isIdentified(){var e,n;return((e=this.persistence)===null||e===void 0?void 0:e.get_property("$user_state"))==="identified"||((n=this.sessionPersistence)===null||n===void 0?void 0:n.get_property("$user_state"))==="identified"}_h(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&Rx(this.getGroups())&&!(!((e=this.persistence)===null||e===void 0||(e=e.props)===null||e===void 0)&&e.__alias)&&!(!((n=this.persistence)===null||n===void 0||(n=n.props)===null||n===void 0)&&n.$epp))}sh(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&!!this.config.capture_pageview}createPersonProfile(){this._h()||this.wh("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.wh("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}wh(e){return this.config.person_profiles==="never"?(ui.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.bu(),this.kh(lNe,!0),!0)}Cu(){if(this.config.cookieless_mode==="always")return!0;const e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!=="on_reject")}xu(){var e,n;const o=this.Cu();var i,r,s;return this.is_capturing()||(i=this.logs)===null||i===void 0||i.Ih(),((e=this.persistence)===null||e===void 0?void 0:e.hi)!==o&&((r=this.persistence)===null||r===void 0||r.set_disabled(o)),((n=this.sessionPersistence)===null||n===void 0?void 0:n.hi)!==o&&((s=this.sessionPersistence)===null||s===void 0||s.set_disabled(o)),this.bh(),o}opt_in_capturing(e){var n;if(this.config.cookieless_mode!=="always"){if(this.yu()){var o,i,r,s,a,A;(o=this.sessionRecording)===null||o===void 0||o.dispose({discardBufferedEvents:!0}),this.xh(!0,!0),(i=this.sessionManager)===null||i===void 0||i.destroy(),(r=this.pageViewManager)===null||r===void 0||r.destroy(),this.sessionManager=new yGt(this),this.pageViewManager=new TOt(this),this.persistence&&(this.sessionPropsManager=new IGt(this,this.sessionManager,this.persistence));const h=(s=(a=this.config.__extensionClasses)===null||a===void 0?void 0:a.sessionRecording)!==null&&s!==void 0?s:(A=KM.__defaultExtensionClasses)===null||A===void 0?void 0:A.sessionRecording;var c,l;h&&(this.sessionRecording=this.mu(this.sessionRecording,new h(this)),this.cu&&((c=this.sessionRecording)===null||c===void 0||(l=c.onRemoteConfig)===null||l===void 0||l.call(c,this.cu)))}var u,g;this.consent.optInOut(!0),this.xu(),this.eh(),(n=this.sessionRecording)===null||n===void 0||n.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&((u=this.surveys)===null||u===void 0||u.loadIfEnabled()),(Eo(e?.captureEventName)||e?.captureEventName)&&this.capture((g=e?.captureEventName)!==null&&g!==void 0?g:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.ih()}else ui.warn(PGt)}opt_out_capturing(){this.config.cookieless_mode!=="always"?(this.consent.optInOut(!1),this.xu(),this.config.cookieless_mode==="on_reject"&&this.$u()):ui.warn(PGt)}$u(){var e,n;const o=this.sessionRecording;o?.dispose({discardBufferedEvents:!0}),this.get_distinct_id()!=="$posthog_cookieless"&&this.xh(!0,!0),this.register({distinct_id:uNe,$device_id:null}),this.gu(o),this.sessionRecording=void 0,(e=this.sessionManager)===null||e===void 0||e.destroy(),(n=this.pageViewManager)===null||n===void 0||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.ih(),this.eh()}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){const e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return!this.Su&&(this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing()))}clear_opt_in_out_capturing(){this.consent.reset(),this.xu()}_is_bot(){return tf?xGt(tf,this.config.custom_blocked_useragents):void 0}ih(){No&&(No.visibilityState==="visible"?this.Ou||(this.Ou=!0,this.capture(pNe,{title:No.title},{send_instantly:!0}),this.Fu&&(No.removeEventListener(U$,this.Fu),this.Fu=null)):this.Fu||(this.Fu=this.ih.bind(this),el(No,U$,this.Fu)))}debug(e){e===!1?(Fn?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(Fn?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}il(){const e=this.qu||{};return"advanced_disable_flags"in e?!!e.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(ui.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(function(n,o,i,r,s){const a=o in n&&!Hs(n[o]),A=i in n&&!Hs(n[i]);return a?n[o]:!!A&&(s&&s.warn(`Config field '${i}' is deprecated. Please use '${o}' instead. The old field will be removed in a future major version.`),n[i])})(e,"advanced_disable_flags","advanced_disable_decide",0,ui)}Fs(e){var n;if(Hs(this.config.before_send))return e;const o=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(PHo),i=As(this.config.before_send)?this.config.before_send:[this.config.before_send];let r=e;for(const s of i)try{if(r=s(r),Hs(r)){const a=`Event '${e.event}' was rejected in beforeSend function`;return wHo(e.event)?ui.warn(`${a}. This can cause unexpected behavior.`):ui.info(a),null}r.properties&&!Rx(r.properties)||ui.warn(`Event '${e.event}' has no properties after beforeSend function, this is likely an error.`)}catch(a){return ui.error(`Error in beforeSend function for event '${e.event}':`,a),null}for(const s of o)if(r.properties&&Hs(r.properties[s]))return ui.warn(`Event '${e.event}' had its '${s}' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped.`),null;return r}getPageViewId(){var e;return(e=this.pageViewManager.Wo)===null||e===void 0?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,o){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(o)})}Nu(e){const n=$y(e)&&!e,o=hc.Et()&&hc.Ot("ph_debug")==="true";return!n&&(!!o||e)}};Aq.__defaultExtensionClasses={},Aq.Th=(()=>{const t=()=>{};return{trace:t,debug:t,info:t,warn:t,error:t,fatal:t}})(),(function(t,e){for(let n=0;e.length>n;n++)t.prototype[e[n]]=XOo(t.prototype[e[n]])})(Aq,["identify"]);var FGt=class{constructor(t){this.disabled=t===!1;const e=QA(t)?t:{};this.thresholdPx=e.threshold_px||30,this.timeoutMs=e.timeout_ms||1e3,this.clickCount=e.click_count||3,this.clicks=[]}isRageClick(t,e,n){if(this.disabled)return!1;const o=this.clicks[this.clicks.length-1];if(o&&Math.abs(t-o.x)+Math.abs(e-o.y)<this.thresholdPx&&this.timeoutMs>n-o.timestamp){if(this.clicks.push({x:t,y:e,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:e,timestamp:n}];return!1}};const $Ne="$copy_autocapture",qNe=Cd("[AutoCapture]");function XNe(t,e){return e.length>t?e.slice(0,t)+"...":e}function sYo(t){if(t.previousElementSibling)return t.previousElementSibling;let e=t;do e=e.previousSibling;while(e&&!d6(e));return e}function aYo(t,{e,maskAllElementAttributes:n,maskAllText:o,elementAttributeIgnoreList:i,elementsChainAsString:r,disableCaptureUrlHashes:s}){var a,A;if(!d6(t))return{props:{}};const c=[t],l=new Set([t]);let u=t;for(;u.parentNode&&!AI(u,"body")&&1e3>c.length;){if(BNe(u.parentNode)){const x=u.parentNode.host;if(l.has(x))break;l.add(x),c.push(x),u=x;continue}if(!d6(u.parentNode)||l.has(u.parentNode))break;l.add(u.parentNode),c.push(u.parentNode),u=u.parentNode}const g=e.type==="click"&&t.namespaceURI==="http://www.w3.org/2000/svg"?c.findIndex(x=>AI(x,"button")||AI(x,"a")):-1;g>0&&(o=o||c.slice(0,g+1).some(x=>!nG(x)||W$(x)));const h=[],d={};let p,m=!1,_=!1;if(kl(c,x=>{const E=nG(x);if(AI(x,"a")&&!n&&!i?.includes("href")){const B=x.getAttribute("href");m=!!(E&&B&&j$(B))&&(s?Mw(B):B)}as(tG(x),"ph-no-capture")&&(_=!0),h.push((function(B,S,Q,w,M=!1){const k=B.tagName.toLowerCase(),R={tag_name:k};SNe.indexOf(k)>-1&&!Q&&(R.$el_text=k.toLowerCase()==="a"||k.toLowerCase()==="button"?XNe(1024,vOt(B)):XNe(1024,z$(B)));const F=tG(B);S||w?.includes("class")||0>=F.length||(R.classes=F.filter(function(W){return W!==""})),kl(B.attributes,function(W){var te;if((!W$(B)||["name","id","class","aria-label"].indexOf(W.name)!==-1)&&!w?.includes(W.name)&&!S&&j$(W.value)&&(!rA(te=W.name)||te.substring(0,10)!=="_ngcontent"&&te.substring(0,7)!=="_nghost")){let j=W.value;W.name==="class"&&(j=bNe(j).join(" ")),R["attr__"+W.name]=XNe(1024,W.name==="href"&&M?Mw(j):j)}});let O=1,U=1,Y=B;for(;Y=sYo(Y);)O++,Y.tagName===B.tagName&&U++;return R.nth_child=O,R.nth_of_type=U,R})(x,n,o,i,s)),kl((function(B){if(!nG(B))return{};const S={};return kl(B.attributes,function(Q){if(Q.name&&Q.name.indexOf("data-ph-capture-attribute")===0){const w=Q.name.replace("data-ph-capture-attribute-",""),M=Q.value;w&&M&&j$(M)&&(S[w]=M)}}),S})(x),(B,S)=>{({}).hasOwnProperty.call(d,S)||(d[S]=B)})}),_)return{props:{},explicitNoCapture:_};if(g>0&&(t=c[g],h.splice(0,g)),o||(h[0].$el_text=AI(t,"a")||AI(t,"button")?vOt(t):z$(t)),m){var f,I;h[0].attr__href=m;const x=(f=Kb(m))===null||f===void 0?void 0:f.host,E=Fn==null||(I=Fn.location)===null||I===void 0?void 0:I.host;x&&E&&x!==E&&(p=m)}return{props:eg((y=e.type,{$event_type:y,$ce_version:1}),r?{}:{$elements:h},{$elements_chain:(C=h,As(C)?(function(x){return x.map(E=>{var B,S;let Q="";if(E.tag_name&&(Q+=E.tag_name),E.attr_class){E.attr_class.sort();for(const k of E.attr_class)Q+=`.${k.replace(/"/g,"")}`}const w=sn(sn(sn(sn({},E.text?{text:E.text}:{}),{},{"nth-child":(B=E.nth_child)!==null&&B!==void 0?B:0,"nth-of-type":(S=E.nth_of_type)!==null&&S!==void 0?S:0},E.href?{href:E.href}:{}),E.attr_id?{attr_id:E.attr_id}:{}),E.attributes),M={};return vge(w).sort(([k],[R])=>(function(F,O){return O>F?-1:F>O?1:0})(k,R)).forEach(([k,R])=>M[POt(k.toString())]=POt(R.toString())),Q+=":",Q+=vge(M).map(([k,R])=>`${k}="${R}"`).join(""),Q}).join(";")})((function(x){return x.map(E=>{var B,S;const Q={text:(B=E.$el_text)===null||B===void 0?void 0:B.slice(0,400),tag_name:E.tag_name,href:(S=E.attr__href)===null||S===void 0?void 0:S.slice(0,2048),attr_class:dGo(E),attr_id:E.attr__id,nth_child:E.nth_child,nth_of_type:E.nth_of_type,attributes:{}};return vge(E).filter(([w])=>w.indexOf("attr__")===0).forEach(([w,M])=>Q.attributes[w]=M),Q})})(C)):"")},!((a=h[0])===null||a===void 0)&&a.$el_text?{$el_text:(A=h[0])===null||A===void 0?void 0:A.$el_text}:{},p&&e.type==="click"?{$external_click_url:p}:{},d),target:t};var C,y}var AYo=class{do(){this.vo=void 0,clearTimeout(this.fo),this.fo=void 0}po(t){var e;if(!nG(t))return!0;const n=(e=this.mo().css_selector_ignorelist)!==null&&e!==void 0?e:wNe,o=new Set;let i=t;for(;i;){if(o.size>=1e3||o.has(i))return!0;o.add(i);const r=i,s=tG(r);if(as(s,"ph-no-capture")||as(s,"ph-sensitive")||W$(r)||n.some(A=>QNe(r,A)))return!0;const a=i.parentNode;i=BNe(a)?a.host:a&&d6(a)?a:null}return!1}yo(t){if(!this.isEnabled||t.type==="pointercancel")return void this.do();if(t.type==="pointerdown"){this.do();const o=J$(t);var e;return void(t.isPrimary&&t.button===0&&!t.ctrlKey&&o&&d6(o)&&(this.vo={target:o,excluded:this.po(o),id:t.pointerId,x:t.clientX,y:t.clientY,released:!1,distinctId:(e=this.bo)===null||e===void 0?void 0:e.distinctId}))}const n=this.vo;n&&(t.pointerId!==n.id||Math.abs(t.clientX-n.x)>5||Math.abs(t.clientY-n.y)>5?this.do():t.type==="pointerup"&&(n.released=!0,this.fo=setTimeout(()=>this.do(),0)))}_o(t){var e;const n=this.vo;this.do();const o=J$(t);if(n?.released&&n.target.isConnected&&n.distinctId===((e=this.bo)===null||e===void 0?void 0:e.distinctId)&&t.pointerId===n.id&&(t.detail>0||t.pointerType==="touch"||t.pointerType==="pen")&&t.button===0&&5>=Math.abs(t.clientX-n.x)&&5>=Math.abs(t.clientY-n.y)&&o&&(AI(o,"html")||AI(o,"body"))){var i;if(n.excluded)return null;const r=(i=this.mo().css_selector_ignorelist)!==null&&i!==void 0?i:wNe;return[o,No?.documentElement,No?.body].some(s=>{if(!s)return!1;const a=tG(s);return as(a,"ph-no-capture")||as(a,"ph-sensitive")||!nG(s)||W$(s)||r.some(A=>QNe(s,A))})?null:n.target}}constructor(t){this.wo=t,this.name="autocapture",this.ko=!1,this.So=null,this.xo=!1,this.$o=new Map,this.Co=!1,this.Mr={enabled:!1,rageclick:!1,maskAllElementAttributes:!1,maskAllText:!1,disableCaptureUrlHashes:!1,remoteRequestsDisabled:!1},this.To=!1,this.wo.refresh(this.Mr),this.rageclicks=new FGt(this.Mr.rageclick),this.Io=null}setup(t){this.Mo(),this.bo=t;const e=t.onRemoteConfig(this.onRemoteConfig.bind(this));this.To?e.dispose():(this.Eo=e,this.startIfEnabled())}dispose(){var t;this.To||(this.To=!0,this.bo=void 0,(t=this.Eo)===null||t===void 0||t.dispose(),this.Eo=void 0,this.$o.clear(),this.Io=null,this.Po())}mo(){return this.wo.refresh(this.Mr),this.Mr}Mo(){var t,e;return this.mo(),this.Mr.url_allowlist=(t=this.Mr.url_allowlist)===null||t===void 0?void 0:t.map(n=>new RegExp(n)),this.Mr.url_ignorelist=(e=this.Mr.url_ignorelist)===null||e===void 0?void 0:e.map(n=>new RegExp(n)),this.Mr}Ro(){if(!this.isBrowserSupported())return void qNe.info("Disabling Automatic Event Collection because this browser is not supported");if(!Fn||!No)return;const t=this.Ao=e=>{e=e||Fn?.event;try{if(e.type==="blur")return void this.do();if(e.type.indexOf("pointer")===0)return void this.yo(e);const n=e.type==="click"?this._o(e):void 0;if(Id(n))return;this.Oo(e,"$autocapture",n)}catch(n){qNe.error("Failed to capture event",n)}};if(el(Fn,"blur",t),el(No,"submit",t,{capture:!0}),el(No,"change",t,{capture:!0}),el(No,"click",t,{capture:!0}),kl(["pointerdown","pointermove","pointerup","pointercancel"],e=>{el(No,e,t,{capture:!0})}),this.mo().capture_copied_text){const e=this.Fo=n=>{n=n||Fn?.event;try{this.Oo(n,$Ne)}catch(o){qNe.error("Failed to capture clipboard event",o)}};el(No,"copy",e,{capture:!0}),el(No,"cut",e,{capture:!0}),el(No,"paste",e,{capture:!0})}}Po(){this.do(),this.Ao&&(Fn?.removeEventListener("blur",this.Ao),kl(["pointerdown","pointermove","pointerup","pointercancel"],t=>{No?.removeEventListener(t,this.Ao,!0)}),No?.removeEventListener("submit",this.Ao,!0),No?.removeEventListener("change",this.Ao,!0),No?.removeEventListener("click",this.Ao,!0),this.Ao=void 0),this.Fo&&(No?.removeEventListener("copy",this.Fo,!0),No?.removeEventListener("cut",this.Fo,!0),No?.removeEventListener("paste",this.Fo,!0),this.Fo=void 0),this.ko=!1}startIfEnabled(){this.isEnabled||this.do(),!this.To&&this.bo&&this.isEnabled&&!this.ko&&(this.Ro(),this.ko=!0)}onRemoteConfig(t){if(this.To)return;if(this.xo=!0,!t.ok)return void this.startIfEnabled();const e=t.config;e.elementsChainAsString&&(this.Co=e.elementsChainAsString);const n=e.autocapture_opt_out;var o;$y(n)&&((o=this.bo)===null||o===void 0||o.kv.set("$autocapture_disabled_server_side",n),this.So=n),this.startIfEnabled()}setElementSelectors(t,e=this){if(this.To)return;t.size?this.$o.set(e,new Set(t)):this.$o.delete(e);const n=new Set;this.$o.forEach(o=>{o.forEach(i=>n.add(i))}),this.Io=n}getElementSelectors(t,e){var n;const o=[];return(n=this.Io)===null||n===void 0||n.forEach(i=>{const r=No?.querySelectorAll(i);r?.forEach(s=>{t!==s&&e!==s||as(o,i)||o.push(i)})}),o}get isEnabled(){var t,e;if(this.To)return!1;const n=(t=this.bo)===null||t===void 0?void 0:t.kv.get(kHt),o=this.So,i=this.mo();if(!i.remoteRequestsDisabled&&!this.xo)return!1;const r=i.remoteRequestsDisabled&&!this.xo;if(Id(o)&&!$y(n)&&!r)return!1;const s=(e=this.So)!==null&&e!==void 0?e:!!n;return!!i.enabled&&!s}Oo(t,e="$autocapture",n){if(!this.isEnabled)return void this.do();let o=n||J$(t);pOt(o)&&(o=o.parentNode||null);const i=this.Mo();var r;e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&i.rageclick&&(!((r=this.rageclicks)===null||r===void 0)&&r.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime()))&&xOt(o,i.rageclick)&&this.Oo(t,"$rageclick",n);const s=e===$Ne,a=s?sn(sn({},i),{},{dom_event_allowlist:void 0}):i;if(o&&(function(u,g,h,d,p,m){var _;if(!Fn||PNe(u)||h?.url_allowlist&&!mOt(h.url_allowlist,m)||h?.url_ignorelist&&mOt(h.url_ignorelist,m))return!1;if(h?.dom_event_allowlist){const y=h.dom_event_allowlist;if(y&&!y.some(x=>g.type===x))return!1}const{parentIsUsefulElement:f,targetElementList:I}=EOt(u,d);if(!(function(y,x){const E=x?.element_allowlist;if(Eo(E))return!0;for(const B of y)if(E.some(S=>B.tagName.toLowerCase()===S))return!0;return!1})(I,h)||!vNe(I,h?.css_selector_allowlist)||vNe(I,(_=h?.css_selector_ignorelist)!==null&&_!==void 0?_:wNe))return!1;try{const y=Fn.getComputedStyle(u);if(y&&y.getPropertyValue("cursor")==="pointer"&&g.type==="click")return!0}catch{}const C=u.tagName.toLowerCase();switch(C){case"html":return!1;case"form":return(p||["submit"]).indexOf(g.type)>=0;case"input":case"select":case"textarea":return(p||["change","click"]).indexOf(g.type)>=0;default:return f?(p||["click"]).indexOf(g.type)>=0:(p||["click"]).indexOf(g.type)>=0&&(SNe.indexOf(C)>-1||u.getAttribute("contenteditable")==="true")}})(o,t,a,s,s?["copy","cut","paste"]:void 0,{config:{get_current_url:i.getCurrentUrl}})){var A;const{props:u,explicitNoCapture:g,target:h}=aYo(o,{e:t,maskAllElementAttributes:i.maskAllElementAttributes,maskAllText:i.maskAllText,elementAttributeIgnoreList:i.element_attribute_ignorelist,elementsChainAsString:this.Co,disableCaptureUrlHashes:i.disableCaptureUrlHashes});if(g)return!1;const d=this.getElementSelectors(o,h);if(d&&d.length>0&&(u.$element_selectors=d),e===$Ne){const p=t.type||"clipboard";if(p!=="paste"){var c,l;const m=Fn==null||(c=Fn.getSelection())===null||c===void 0?void 0:c.toString(),_=_Ot(m);if(!_)return!1;u.$selected_content=_,u.$clipboard_text_length=(l=m?.length)!==null&&l!==void 0?l:0}u.$copy_type=p}return(A=this.bo)===null||A===void 0||A.capture(e,u),!0}}isBrowserSupported(){return nf(No?.querySelectorAll)}},cYo=class{constructor(t){this._instance=t}refresh(t){const e=this._instance.config,n=QA(e.autocapture)?e.autocapture:void 0;t.enabled=!!e.autocapture,t.rageclick=e.rageclick,t.maskAllElementAttributes=e.mask_all_element_attributes,t.maskAllText=e.mask_all_text,t.disableCaptureUrlHashes=e.disable_capture_url_hashes,t.getCurrentUrl=e.get_current_url,t.remoteRequestsDisabled=this._instance.il(),t.url_allowlist=n?.url_allowlist,t.url_ignorelist=n?.url_ignorelist,t.dom_event_allowlist=n?.dom_event_allowlist,t.element_allowlist=n?.element_allowlist,t.css_selector_allowlist=n?.css_selector_allowlist,t.css_selector_ignorelist=n?.css_selector_ignorelist,t.element_attribute_ignorelist=n?.element_attribute_ignorelist,t.capture_copied_text=n?.capture_copied_text}};const cq=Cd("[ExceptionAutocapture]"),LGt=()=>{},HGt=t=>{var e;if(nf(t))return(e=t.__posthog_layer__)!==null&&e!==void 0?e:t.__rrweb_layer__};function lq(t,e,n){try{if(!(e in t))return LGt;const o={next:t[e]},i=n(function(...r){return o.next.apply(this,r)});return nf(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:o}})),t[e]=i,()=>{if(t[e]===i)return void(t[e]=o.next);let r=t[e],s=HGt(r);for(;s;){if(s.next===i)return void(s.next=o.next);r=s.next,s=HGt(r)}}}catch{return LGt}}const lYo=Cd("[TracingHeaders]"),SR=Cd("[Web Vitals]"),OGt=9e5,GGt=["CLS","FCP","INP","LCP"],uYo=["INP","LCP"],gYo=["interactionTarget","interactionType","inputDelay","processingDuration","presentationDelay","loadState","target","url","timeToFirstByte","resourceLoadDelay","resourceLoadDuration","elementRenderDelay","largestShiftTarget","largestShiftTime","largestShiftValue","firstByteToFCP"],ZNe="disabled",YGt="lazy_loading",Jb=Cd("[SessionRecording]"),dYo=[gNe,dNe,$Ht,qHt,XHt,ZHt,eOt,tOt,nOt],hYo=Cd("[Heatmaps]");function eRe(t){return QA(t)&&"clientX"in t&&"clientY"in t&&Ah(t.clientX)&&Ah(t.clientY)}const Gge=Cd("[Product Tours]"),tRe=t=>{var e;return!t.config.disable_product_tours&&!!(!((e=t.persistence)===null||e===void 0)&&e.get_property(sNe))},pYo=["$set_once","$set"],h6=Cd("[SiteApps]"),UGt="Error while initializing PostHog app with config id ",KGt=(t,e)=>t?.then?t.then(e):e(t),uG="SDK is not enabled or survey functionality is not yet loaded",VGt="Disabled. Not loading surveys.";var mYo=class{constructor(t,e){this.wo=t,this.Mh=e,this.name="surveys",this._surveyEventReceiver=null,this._surveyManager=null,this.Eh=!1,this.Ph=!1,this.Rh=[],this.Ah=[],this.Oh=null,this.Fh=null,this.To=!1,this.Dh=new Set,this.onRemoteConfig=n=>{if(this.To||this.Mr.disableSurveys)return;if(!n.ok)return this.Ph=!0,this.Lh({isLoaded:!1,error:"Remote config unavailable. Not loading surveys."}),yl.warn("Remote config unavailable. Not loading surveys.");const o=n.config.surveys;if(Hs(o))return yl.warn("Flags not loaded yet. Not loading surveys.");this.Nh=$y(o)?o:o.length>0,yl.info(`flags response received, isSurveysEnabled: ${this.Nh}`),this.loadIfEnabled()},this.Lh=n=>{this.Ah.slice().forEach(o=>this.qh(o,n))}}setup(t){if(!this.To)return this.jh=t,KGt(t.kv.initialize(),()=>{if(this.jh!==t||this.To)return;this.jh=void 0,this.bo=t;const e=t.onRemoteConfig(this.onRemoteConfig);this.To?e.dispose():(this.Eo=e,this.loadIfEnabled())})}dispose(){var t,e,n,o,i;this.To||(this.To=!0,this.jh=void 0,this.bo=void 0,(t=this.Eo)===null||t===void 0||t.dispose(),this.Eo=void 0,(e=this._surveyEventReceiver)===null||e===void 0||e.dispose(),this._surveyEventReceiver=null,(n=this._surveyManager)===null||n===void 0||(o=n.dispose)===null||o===void 0||o.call(n),this._surveyManager=null,this.Rh=[],this.Ah.forEach(r=>{r.active=!1}),this.Ah=[],(i=this.Bh)===null||i===void 0||i.call(this),this.Bh=void 0,this.Oh=null,this.Dh.forEach(r=>clearTimeout(r)),this.Dh.clear())}get Mr(){return this.wo.get()}initialize(){this.loadIfEnabled()}reset(){var t,e;(t=this._surveyManager)===null||t===void 0||(e=t.clearInMemoryInProgressSurveyState)===null||e===void 0||e.call(t);try{var n;(n=this._surveyEventReceiver)===null||n===void 0||n.reset(),localStorage.removeItem("lastSeenSurveyDate");const o=[];for(let i=0;i<localStorage.length;i++){const r=localStorage.key(i);(r?.startsWith("seenSurvey_")||r?.startsWith("inProgressSurvey_"))&&o.push(r)}o.forEach(i=>localStorage.removeItem(i))}catch{}this.Lh()}loadIfEnabled(){if(this.To||!this.bo)return;const t=this.Mr;if(this._surveyManager)return;if(this.Eh)return void yl.info("Already initializing surveys, skipping...");if(t.disableSurveys)return void yl.info(VGt);if(t.cookielessMode&&this.wo.isOptedOut())return void yl.info("Not loading surveys in cookieless mode without consent.");const e=this.wo.getExtensions();if(!e)return void this.Hh("PostHog Extensions not found.");if(Eo(this.Nh)&&!t.advancedEnableSurveys)return;const n=this.Nh||t.advancedEnableSurveys;this.Eh=!0,this.Ph=!1;try{const o=e.generateSurveys;if(o)return this.zh(o,n),void(this.Eh=!1);const i=e.loadExternalDependency;if(!i)return this.Hh(hNe),void(this.Eh=!1);i(r=>{try{if(this.To)return;const s=this.wo.getExtensions();r||!s?.generateSurveys?this.Hh("Could not load surveys script",r):this.zh(s.generateSurveys,n)}finally{this.Eh=!1}})}catch(o){throw this.Eh=!1,this.Hh("Error initializing surveys",o),o}}zh(t,e){var n,o;if(this.To)return;this._surveyManager=t(e),this._surveyEventReceiver=this.wo.createEventReceiver(this.Lh);const i=(n=(o=this.bo)!==null&&o!==void 0?o:this.Mh)===null||n===void 0?void 0:n.kv.get(O$);i&&this.Uh(i),yl.info("Surveys loaded successfully"),this.Wh(),this.Lh(),this.Vh({isLoaded:!0})}Hh(t,e){this.Ph=!0,yl.error(t,e),this.Lh({isLoaded:!1,error:t}),this.Vh({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.Rh.push(t),this._surveyManager&&this.Vh({isLoaded:!0}),()=>{this.Rh=this.Rh.filter(e=>e!==t)}}getSurveys(t,e=!1){var n;const o=(n=this.bo)!==null&&n!==void 0?n:this.Mh;if(!o||this.To)return;if(this.Mr.disableSurveys)return yl.info(VGt),t([]);const i=o.kv.get(O$);if(i&&!e)return t(i,{isLoaded:!0}),void(this.Gh()&&this.getSurveys(()=>{},!0));if(this.Oh)return void this.Oh.then(({surveys:a,context:A})=>{this.To||t(a,A)}).catch(a=>yl.error("Error in survey callback",a));const r=this.Qh("/api/surveys/",{method:"GET",query:{token:o.projectToken},sentAt:"query",timeoutMs:this.Mr.requestTimeoutMs}).then(a=>{try{return this.Jh(o,a)}catch(A){return yl.error("Error processing surveys response",A),this.Jh(o,{statusCode:0,error:A})}},a=>this.Jh(o,{statusCode:0,error:a}));this.Oh=r;const s=()=>{this.Oh===r&&(this.Oh=null)};r.then(a=>{s(),this.To||(this.Lh(a.context),t(a.surveys,a.context))},s).catch(a=>yl.error("Error in survey callback",a))}Qh(t,e){const n=this.bo;return n?n.sendRequest(t,e):new Promise(o=>o({statusCode:0,error:new Error(uG)}))}Jh(t,e){if(this.To)return{surveys:[],context:{isLoaded:!1,error:uG}};const n=e.statusCode;if(n!==200||!e.json){const i=`Surveys API could not be loaded, status: ${n}`;return n!==0?yl.error(i):e.error||yl.warn(i),this.Fh=Date.now(),{surveys:[],context:{isLoaded:!1,error:i}}}this.Fh=null;const o=e.json.surveys||[];return t.kv.set({[O$]:o,[bge]:Date.now()}),this.Uh(o),{surveys:o,context:{isLoaded:!0}}}Uh(t){var e;const n=t.filter(o=>(function(i){return!(!i.start_date||i.end_date)})(o)&&(BGt(o)||(function(i){var r;return!!(!((r=i.conditions)===null||r===void 0||(r=r.actions)===null||r===void 0||(r=r.values)===null||r===void 0)&&r.length)})(o)));(e=this._surveyEventReceiver)===null||e===void 0||e.replace(n)}Gh(){return this.Zh()&&!this.Oh&&!this.Kh()}Zh(){var t,e;const n=(t=(e=this.bo)!==null&&e!==void 0?e:this.Mh)===null||t===void 0?void 0:t.kv.get(bge);return Ah(n)&&Date.now()-n>3e5}Kh(){return Ah(this.Fh)&&3e5>Date.now()-this.Fh}markSurveyAsSeen(t,e){var n;const o={id:t,current_iteration:(n=e?.iteration)!==null&&n!==void 0?n:null};vGt(o);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}this.Lh()}Vh(t){for(const e of this.Rh)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){yl.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,e=!1){if(!Hs(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);yl.warn("init was not called")}onActiveMatchingSurveysChanged(t){var e,n;if(this.To)return()=>{};const o={callback:t,active:!0,revision:0};this.Ah.push(o),this.Wh();const i=(e=(n=this.bo)!==null&&n!==void 0?n:this.Mh)===null||e===void 0?void 0:e.kv.get(O$);return this.Mr.disableSurveys||!this._surveyManager&&this.Ph&&!this.Eh||!i&&!Hs(this.Fh)&&!this.Oh?this.qh(o,{isLoaded:!1}):this._surveyManager&&this.qh(o),()=>{var r;o.active=!1,this.Ah=this.Ah.filter(s=>s!==o),this.Ah.length===0&&((r=this.Bh)===null||r===void 0||r.call(this),this.Bh=void 0)}}Wh(){var t,e,n;this._surveyManager&&this.Ah.length>0&&((t=this.Bh)!==null&&t!==void 0||(this.Bh=(e=(n=this.wo).onMatchingConditionsChanged)===null||e===void 0?void 0:e.call(n,this.Lh)))}qh(t,e){if(this.To||!t.active)return;const n=++t.revision,o=i=>{if(!this.To&&t.active&&n===t.revision)try{const r=e??{isLoaded:!0},s=JSON.stringify([i,r]);if(s===t.lastResult)return;t.lastResult=s,t.callback(i,r)}catch(r){yl.error("Error in active matching surveys callback",r)}};try{e&&!e.isLoaded?o([]):this.getActiveMatchingSurveys(o)}catch(i){yl.error("Error in active matching surveys callback",i)}}Xh(t){let e=null;return this.getSurveys(n=>{var o;e=(o=n.find(i=>i.id===t))!==null&&o!==void 0?o:null}),e}Yh(t){if(Hs(this._surveyManager))return{eligible:!1,reason:uG};const e=typeof t=="string"?this.Xh(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}tc(t){if(!this.wo.isCapturing())return{eligible:!1,reason:"PostHog is not capturing, so a survey response cannot be recorded"};if(Hs(this._surveyManager))return{eligible:!1,reason:uG};const e=typeof t=="string"?this.Xh(t):t;return e?this._surveyManager.checkSurveyRenderability(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(Hs(this._surveyManager))return yl.warn("init was not called"),{visible:!1,disabledReason:uG};const e=this.tc(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return Hs(this._surveyManager)?(yl.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:uG})):new Promise(n=>{this.getSurveys(o=>{var i;const r=(i=o.find(s=>s.id===t))!==null&&i!==void 0?i:null;if(r){const s=this.tc(r);n({visible:s.eligible,disabledReason:s.reason})}else n({visible:!1,disabledReason:"Survey not found"})},e)})}renderSurvey(t,e,n){var o;if(!this.wo.isCapturing())return;if(Hs(this._surveyManager))return void yl.warn("init was not called");const i=typeof t=="string"?this.Xh(t):t;if(!i?.id)return void yl.warn("Survey not found");if(!VGo.includes(i.type))return void yl.warn(`Surveys of type ${i.type} cannot be rendered in the app`);const r=No?.querySelector(e);if(r){if(!((o=i.appearance)===null||o===void 0)&&o.surveyPopupDelaySeconds){yl.info(`Rendering survey ${i.id} with delay of ${i.appearance.surveyPopupDelaySeconds} seconds`);const s=setTimeout(()=>{var a,A;this.Dh.delete(s),!this.To&&this.wo.isCapturing()&&(yl.info(`Rendering survey ${i.id} with delay of ${(a=i.appearance)===null||a===void 0?void 0:a.surveyPopupDelaySeconds} seconds`),(A=this._surveyManager)===null||A===void 0||A.renderSurvey(i,r,n),yl.info(`Survey ${i.id} rendered`))},1e3*i.appearance.surveyPopupDelaySeconds);return void this.Dh.add(s)}this._surveyManager.renderSurvey(i,r,n)}else yl.warn("Survey element not found")}displaySurvey(t,e){var n;if(!this.wo.isCapturing())return;if(Hs(this._surveyManager))return void yl.warn("init was not called");const o=this.Xh(t);if(!o)return void yl.warn("Survey not found");let i=o;if(!((n=o.appearance)===null||n===void 0)&&n.surveyPopupDelaySeconds&&e.ignoreDelay&&(i=sn(sn({},o),{},{appearance:sn(sn({},o.appearance),{},{surveyPopupDelaySeconds:0})})),e.displayType!==TNe.Popover&&e.initialResponses&&yl.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){const r=this.Yh(o);if(!r.eligible)return void yl.warn("Survey is not eligible to be displayed: ",r.reason)}e.displayType!==TNe.Inline?this._surveyManager.handlePopoverSurvey(i,e):this.renderSurvey(i,e.selector,e.properties)}cancelPendingSurvey(t){Hs(this._surveyManager)?yl.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t,e;(t=this._surveyManager)===null||t===void 0||(e=t.handlePageUnload)===null||e===void 0||e.call(t)}};function gG(t,e,n){if(Hs(t))return!1;switch(n){case"exact":return t===e;case"contains":{const o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(o,"i").test(t)}case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}var _Yo=class{constructor(e){this._instance=e,this.ec=new Set,this.nc=new Set,this.sc=new Lge,this.rc=(n,o)=>this.oc(n,o)&&this.ac(n,o)&&this.lc(n,o)&&this.uc(n,o),this.oc=(n,o)=>!o?.event||n?.event===o?.event}init(){var e,n;Eo((e=this._instance)===null||e===void 0?void 0:e._addCaptureHook)||(this.hc=(n=this._instance)===null||n===void 0?void 0:n._addCaptureHook((o,i)=>{this.on(o,i)}))}dispose(){var e,n;(e=this.hc)===null||e===void 0||e.call(this),this.hc=void 0,(n=this._instance)===null||n===void 0||(n=n.autocapture)===null||n===void 0||n.setElementSelectors(new Set,this),this.sc=new Lge}register(e){var n,o;if(!Eo((n=this._instance)===null||n===void 0?void 0:n._addCaptureHook)&&(e.forEach(i=>{var r;this.ec.add(i),(r=i.steps)===null||r===void 0||r.forEach(s=>{this.nc.add(s?.event||"")})}),(o=this._instance)===null||o===void 0?void 0:o.autocapture)){const i=new Set;this.ec.forEach(r=>{var s;(s=r.steps)===null||s===void 0||s.forEach(a=>{a?.selector&&i.add(a.selector)})}),this._instance.autocapture.setElementSelectors(i,this)}}replace(e){this.ec.clear(),this.nc.clear(),this.register(e)}on(e,n){n!=null&&e.length!=0&&(this.nc.has(e)||this.nc.has(n.event))&&this.ec.forEach(o=>{this.cc(n,o)&&this.sc.emit("actionCaptured",o.name)})}dc(e){this.onAction("actionCaptured",n=>e(n))}cc(e,n){if(n?.steps==null)return!1;for(const o of n.steps)if(this.rc(e,o))return!0;return!1}onAction(e,n){return this.sc.on(e,n)}ac(e,n){if(n?.url){var o;const i=e==null||(o=e.properties)===null||o===void 0?void 0:o.$current_url;if(!i||typeof i!="string"||!gG(i,n.url,n.url_matching||"contains"))return!1}return!0}lc(e,n){return!!this.vc(e,n)&&!!this.fc(e,n)&&!!this.gc(e,n)}vc(e,n){var o;if(!n?.href)return!0;const i=this.mc(e);if(i.length>0)return i.some(s=>gG(s.href,n.href,n.href_matching||"exact"));const r=(e==null||(o=e.properties)===null||o===void 0?void 0:o.$elements_chain)||"";return!!r&&gG((function(s){const a=s.match(/(?::|")href="(.*?)"/);return a?a[1]:""})(r),n.href,n.href_matching||"exact")}fc(e,n){var o;if(!n?.text)return!0;const i=this.mc(e);if(i.length>0)return i.some(c=>gG(c.text,n.text,n.text_matching||"exact")||gG(c.$el_text,n.text,n.text_matching||"exact"));const r=(e==null||(o=e.properties)===null||o===void 0?void 0:o.$elements_chain)||"";return!!r&&(s=(function(c){const l=[],u=/(?::|")text="(.*?)"/g;let g;for(;!Hs(g=u.exec(c));)l.includes(g[1])||l.push(g[1]);return l})(r),a=n.text,A=n.text_matching||"exact",s.some(c=>gG(c,a,A)));var s,a,A}gc(e,n){var o,i;if(!n?.selector)return!0;const r=e==null||(o=e.properties)===null||o===void 0?void 0:o.$element_selectors;if(r?.includes(n.selector))return!0;const s=(e==null||(i=e.properties)===null||i===void 0?void 0:i.$elements_chain)||"";if(n.selector_regex&&s)try{return new RegExp(n.selector_regex).test(s)}catch{return!1}return!1}mc(e){var n;return(e==null||(n=e.properties)===null||n===void 0?void 0:n.$elements)==null?[]:e?.properties.$elements}uc(e,n){return!n?.properties||n.properties.length===0||SGt(n.properties.reduce((o,i)=>{const r=As(i.value)?i.value.map(String):i.value!=null?[String(i.value)]:[];return o[i.key]={values:r,operator:i.operator||"exact"},o},{}),e?.properties)}},fYo=class{constructor(e,n){var o,i;this.yc=[],this._instance=e,this.bc=n,this._c=new Map,this.wc=new Map,this.kc=new Map,this.Sc=(o=this._instance)===null||o===void 0||(i=o.onSessionId)===null||i===void 0?void 0:i.call(o,r=>this.xc(r))}$c(e){return!1}Cc(){return null}Tc(e){}Ic(){}Mc(e,n){return!!e&&SGt(e.propertyFilters,n?.properties)}Ec(e,n){const o=new Map;return e.forEach(i=>{var r;(r=i.conditions)===null||r===void 0||(r=r[n])===null||r===void 0||(r=r.values)===null||r===void 0||r.forEach(s=>{if(s?.name){const a=o.get(s.name)||[];a.push(i.id),o.set(s.name,a)}})}),o}Pc(e,n,o){const i=(o===eq.Activation?this._c:this.wc).get(e);let r=[];return this.Rc(s=>{r=s.filter(a=>i?.includes(a.id))}),r.filter(s=>{var a;const A=(a=s.conditions)===null||a===void 0||(a=a[o])===null||a===void 0||(a=a.values)===null||a===void 0?void 0:a.find(c=>c.name===e);return this.Mc(A,n)})}register(e){this.Ac(e,!1)}replace(e){this.Ac(e,!0)}Ac(e,n){var o;Eo((o=this._instance)===null||o===void 0?void 0:o._addCaptureHook)||(this.Oc(e,n),this.Fc(e,n))}Fc(e,n){const o=e.filter(s=>{var a;return(a=s.conditions)===null||a===void 0||(a=a.actions)===null||a===void 0||(a=a.values)===null||a===void 0?void 0:a.length});var i;if(n&&this.kc.clear(),o.length===0)return void(n&&((i=this.Dc)===null||i===void 0||i.replace([])));this.Dc||(this.Dc=new _Yo(this._instance),this.Dc.init(),this.Dc.dc(s=>this.onAction(s)));const r=[];o.forEach(s=>{var a;(a=s.conditions)===null||a===void 0||(a=a.actions)===null||a===void 0||a.values.forEach(A=>{if(r.push(A),A.name){var c;const l=(c=this.kc.get(A.name))!==null&&c!==void 0?c:[];l.includes(s.id)||l.push(s.id),this.kc.set(A.name,l)}})}),n?this.Dc.replace(r):this.Dc.register(r)}Lc(e,n){n.forEach((o,i)=>{var r;const s=(r=e.get(i))!==null&&r!==void 0?r:[];o.forEach(a=>{s.includes(a)||s.push(a)}),e.set(i,s)})}Oc(e,n){var o,i;const r=e.filter(c=>{var l,u;return((l=c.conditions)===null||l===void 0?void 0:l.events)&&((u=c.conditions)===null||u===void 0||(u=u.events)===null||u===void 0||(u=u.values)===null||u===void 0?void 0:u.length)>0}),s=e.filter(c=>{var l,u;return((l=c.conditions)===null||l===void 0?void 0:l.cancelEvents)&&((u=c.conditions)===null||u===void 0||(u=u.cancelEvents)===null||u===void 0||(u=u.values)===null||u===void 0?void 0:u.length)>0}),a=this.Ec(e,eq.Activation),A=this.Ec(e,eq.Cancellation);n?(this._c=a,this.wc=A):(this.Lc(this._c,a),this.Lc(this.wc,A)),(r.length!==0||s.length!==0||e.some(c=>{var l;return(l=c.conditions)===null||l===void 0||(l=l.actions)===null||l===void 0||(l=l.values)===null||l===void 0?void 0:l.length}))&&((o=this.hc)!==null&&o!==void 0||(this.hc=(i=this._instance)===null||i===void 0?void 0:i._addCaptureHook((c,l)=>{this.onEvent(c,l)})))}onEvent(e,n){var o,i;const r=this.Nc(),s=(n==null||(o=n.properties)===null||o===void 0?void 0:o.$survey_id)||(n==null||(i=n.properties)===null||i===void 0?void 0:i.$product_tour_id);if(s&&this.getActivatedIds().includes(s)){const A=this.qc(e,s,n);if(A==="consume")return r.info("event consumed activated item, removing it",{event:e,itemId:s}),void this.jc([s]);if(A==="persist")return r.info("shown item promoted to persisted activation",{event:e,itemId:s}),this.Bc(s),void this.Hc([s])}if(this.wc.has(e)){const A=this.Pc(e,n,eq.Cancellation);A.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:A.map(c=>c.id)}),this.jc(A.map(c=>c.id)),A.forEach(c=>this.zc(c.id)))}if(!this._c.has(e))return;r.info("event name matched",{event:e,eventPayload:n,items:this._c.get(e)});const a=this.Pc(e,n,eq.Activation);this.Uc(a.map(A=>A.id))}onAction(e){this.kc.has(e)&&this.Uc(this.kc.get(e)||[])}Uc(e){var n,o;if(e.length===0)return;const i=!!(!((n=this._instance)===null||n===void 0||(o=n.get_session_id)===null||o===void 0)&&o.call(n)),r=[];for(const s of e)i&&this.$c(s)?this.Bc(s)&&this.Wc(s):r.push(s);r.length>0&&(this.yc=[...new Set([...this.yc,...r])]),this.Nc().info("updating activated items",{activatedItems:this.getActivatedIds()}),this.Vc()}Bc(e){this.yc=this.yc.filter(o=>o!==e);const n=this.Gc();return!n.includes(e)&&(this.Qc([...n,e]),this.Jc(),!0)}jc(e){const n=new Set(e);this.yc=this.yc.filter(r=>!n.has(r));const o=this.Zc(),i=o.filter(r=>!n.has(r));i.length!==o.length&&(this.Qc(i),i.length===0&&this.Kc()),this.Hc(e),this.Vc()}Vc(){try{var e;(e=this.bc)===null||e===void 0||e.call(this)}catch(n){this.Nc().error("Error while handling activated items change",n)}}Xc(){var e;const n=this.Cc();if(!n)return{};const o=(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.props[n];return o&&typeof o=="object"?o:{}}Wc(e){if(!this.Cc())return;const n=this.Xc();this.Tc(sn(sn({},n),{},{[e]:Date.now()}))}Hc(e){if(!this.Cc())return;const n=this.Xc(),o={};let i=!1;for(const[r,s]of Object.entries(n))e.includes(r)?i=!0:o[r]=s;i&&(Rx(o)?this.Ic():this.Tc(o))}Yc(){this.Cc()&&this.Ic()}getActivationTimestamp(e){if(!this.Gc().includes(e))return;const n=this.Xc()[e];return Ah(n)?n:void 0}Zc(){var e;const n=this.td();return((e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.props[n])||[]}Gc(){var e,n,o;const i=this.Zc();if(i.length===0)return[];const r=(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.props[this.ed()],s=(n=this._instance)===null||n===void 0||(o=n.get_session_id)===null||o===void 0?void 0:o.call(n);return s&&r===s?i:[]}Jc(){var e,n;const o=(e=this._instance)===null||e===void 0||(n=e.get_session_id)===null||n===void 0?void 0:n.call(e);o&&this.nd(o)}Kc(){this.sd()}xc(e){var n;const o=(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0?void 0:n.props[this.ed()];if(o&&o!==e){const i=this.Zc(),r=this.Xc();i.length>0&&(this.Qc([]),i.filter(s=>Ah(r[s])).forEach(s=>this.zc(s))),this.Kc(),this.Yc(),i.length>0&&this.Vc()}}getActivatedIds(){return[...new Set([...this.Gc(),...this.yc])].filter(e=>!this.rd(e))}dispose(){var e,n,o;(e=this.Sc)===null||e===void 0||e.call(this),this.Sc=void 0,(n=this.hc)===null||n===void 0||n.call(this),this.hc=void 0,(o=this.Dc)===null||o===void 0||o.dispose(),this.Dc=void 0}reset(){this.yc=[],this.Zc().length>0&&this.Qc([]),this.Kc(),this.Yc(),this.Vc()}getEventToItemsMap(){return this._c}od(){return this.Dc}},IYo=class extends fYo{constructor(e,n){super(e,n)}td(){return YHt}ed(){return UHt}Cc(){return KHt}Tc(e){var n;(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$surveys_activated_timestamps:e})}Ic(){var e;(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0||e.unregister("$surveys_activated_timestamps")}$c(e){var n;let o;this.Rc(r=>{o=r.find(s=>s.id===e)});const i=o==null||(n=o.appearance)===null||n===void 0?void 0:n.surveyPopupDelaySeconds;return Ah(i)&&i>0}ad(){return dE.SHOWN}Rc(e){var n;(n=this._instance)===null||n===void 0||n.getSurveys(e)}zc(e){var n;(n=this._instance)===null||n===void 0||n.cancelPendingSurvey(e)}Nc(){return yl}Qc(e){var n;(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$surveys_activated:e})}nd(e){var n;(n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$surveys_activated_session:e})}sd(){var e;(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0||e.unregister("$surveys_activated_session")}rd(){return!1}qc(e,n,o){var i;if(e===dE.SENT&&(o==null||(i=o.properties)===null||i===void 0?void 0:i.$survey_completed)===!1)return"ignore";let r;return this.Rc(s=>{r=s.find(a=>a.id===n)}),!r||(function(s){var a;return BGt(s)&&!!(!((a=s.conditions)===null||a===void 0||(a=a.events)===null||a===void 0)&&a.repeatedActivation)||s.schedule==="always"})(r)?e===dE.SHOWN?"consume":"ignore":e===dE.SHOWN?"persist":e===dE.DISMISSED||e===dE.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}},CYo=class{constructor(e){this._instance=e}initialize(){}get(e){if(typeof e=="string")return this._instance.get_property(e);const n={};for(const o of e){const i=this._instance.get_property(o);Eo(i)||(n[o]=i)}return n}set(e,n){this._instance.register(typeof e=="string"?{[e]:n}:e)}remove(e){typeof e!="string"?e.forEach(n=>this._instance.unregister(n)):this._instance.unregister(e)}},yYo=class{constructor(e){this._instance=e}get(){const e=this._instance.config;return{disableSurveys:e.disable_surveys,cookielessMode:!!e.cookieless_mode,advancedEnableSurveys:e.advanced_enable_surveys,requestTimeoutMs:e.surveys_request_timeout_ms}}isOptedOut(){return this._instance.consent.isOptedOut()}isCapturing(){return this._instance.is_capturing()}getExtensions(){const e=Vr?.__PosthogExtensions__;if(!e)return;const{generateSurveys:n,loadExternalDependency:o}=e;return{generateSurveys:n?i=>n(this._instance,i):void 0,loadExternalDependency:o?i=>o(this._instance,"surveys",i):void 0}}createEventReceiver(e){return new IYo(this._instance,e)}onMatchingConditionsChanged(e){const n=this._instance._addCaptureHook(s=>{s!=="$pageview"&&s!==dE.SHOWN&&s!==dE.DISMISSED&&s!==dE.SENT||e()}),o=()=>e();el(Fn,"PHSurveyShown",o);let i=!1;const r=this._instance.onFeatureFlags(()=>{i&&e()});return i=!0,()=>{i=!1,n(),r(),Fn?.removeEventListener("PHSurveyShown",o)}}};const xYo=Fn?.location?Mge(Fn.location.hash,"__posthog")||Mge(location.hash,"state"):null,zGt="_postHogToolbarParams",JGt=Cd("[Toolbar]"),WGt=Cd("[FeatureFlags]");var EYo=class{constructor(e,n=!1){this.ld=!1,this.update(e,n)}update(e,n){this.ud=((o,i)=>{var r,s,a,A,c,l,u,g;return{bootstrap:{featureFlags:(r=(s=o.bootstrap)===null||s===void 0?void 0:s.featureFlags)!==null&&r!==void 0?r:void 0,featureFlagPayloads:(a=(A=o.bootstrap)===null||A===void 0?void 0:A.featureFlagPayloads)!==null&&a!==void 0?a:void 0},remoteRequestsDisabled:i,featureFlagsDisabled:!!o.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!o.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!o.advanced_feature_flags_dedup_per_session,cacheTtlMs:o.feature_flag_cache_ttl_ms,refreshIntervalMs:(c=o.remote_config_refresh_interval_ms)!==null&&c!==void 0?c:3e5,idleRefreshBackoff:Eo(o.remote_config_refresh_interval_ms),requestTimeoutMs:o.feature_flag_request_timeout_ms,requestMaxRetries:Math.max(0,(l=o.feature_flag_request_max_retries)!==null&&l!==void 0?l:1),compression:o.disable_compression?void 0:"best-available",evaluationContexts:(u=(g=o.evaluation_contexts)!==null&&g!==void 0?g:o.evaluation_environments)!==null&&u!==void 0?u:[],flagKeys:As(o.flag_keys)?o.flag_keys:void 0}})(e,n),!e.evaluation_environments||e.evaluation_contexts||this.ld||(WGt.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ld=!0),Eo(e.flag_keys)||As(e.flag_keys)||WGt.error("Invalid flag_keys found:",e.flag_keys,"Expected array of non-empty strings")}get(){return this.ud}};const jGt=Cd("[FeatureFlags]"),QR=Cd("[FeatureFlags]",{debugEnabled:!0}),nRe=`" failed. Feature flags didn't load in time.`,BYo=[502,504],$Gt=["click","keydown","wheel","touchstart","pointerdown"],qGt="connection_error",XGt=t=>{const e={};for(let n=0;t.length>n;n++)e[t[n]]=!0;return e},ZGt=t=>{const e={};for(const[n,o]of vge(t||{}))o&&(e[n]=o);return e},eYt=t=>zO(t)&&(t.name==="RangeError"&&t.message.indexOf("Maximum call stack size exceeded")===0||t.name==="InternalError"&&t.message==="too much recursion"),FB=Cd("[Error tracking]"),oRe="webkit-masked-url:",bYo=[{value:"isolatedAPI.contexts.topHostname",exact:!1},{value:"No response from target",exact:!0}],SYo=["chrome-extension://","moz-extension://","safari-extension:","safari-web-extension:",oRe],QYo=["__firefox__","__gCrWeb"],tYt="Refusing to render web experiment since the viewer is a likely bot",vYo={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>Hge(e,t),not_regex:(t,e)=>!Hge(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t},A4=Cd("[Conversations]"),vR="Conversations not available yet.";function nYt(t,e){var n,o,i,r,s,a,A;const c=(n=t?.flushIntervalMs)!==null&&n!==void 0?n:3e3,l=(o=t?.maxBufferSize)!==null&&o!==void 0?o:100,u=e?.consoleCapture?void 0:(i=t?.maxLogsPerInterval)!==null&&i!==void 0?i:1e3,g=Eo(u)?Math.max(l,2048):Math.max(l,u),h=sn(sn({},(function(){let d="",p="";try{const m=tf?.userAgent;m&&([d,p]=WLt(m))}catch{}return(function(m,_){const f=(function(I){if(I)return{}.hasOwnProperty.call(EHt,I)?EHt[I]:I})(m);return sn(sn({},f?{"os.name":f}:{}),_?{"os.version":_}:{})})(d,p)})()),t?.resourceAttributes);return{serviceName:(r=(s=h?.["service.name"])!==null&&s!==void 0?s:t?.serviceName)!==null&&r!==void 0?r:e?.serviceNameDefault,serviceVersion:(a=h?.["service.version"])!==null&&a!==void 0?a:t?.serviceVersion,environment:(A=h?.["deployment.environment"])!==null&&A!==void 0?A:t?.environment,resourceAttributes:h,beforeSend:t?.beforeSend,flushIntervalMs:c,maxBufferSize:l,maxQueueSize:g,maxBatchRecordsPerPost:100,rateCapWindowMs:c,maxLogsPerInterval:u,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}const wYo=["debug","log","warn","error","info"],PYo=t=>{for(;t?.__rrweb_original__;)t=t.__rrweb_original__;return t},oYt="console",iYt="__posthogHandledLogsRequestError",iRe=(t,e)=>{const n=t instanceof Error?t:new Error(e);return n[iYt]=!0,n},rYt=t=>!!t&&typeof t=="object"&&t[iYt]===!0,Yge=Cd("[NetworkMetrics]"),rRe=()=>{var t;return!(Fn==null||(t=Fn.performance)===null||t===void 0)&&t.now?Fn.performance.now():Date.now()},MYo={"http:":80,"https:":443},DYo=new Set(["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]),sYt=(t,e)=>{var n;const o=String(e);return{method:String(t).toUpperCase(),url:((n=Kb(o))===null||n===void 0?void 0:n.href)||o}},sRe=(t,e,n,o,i,r,s=!1)=>{try{var a,A;const c=i();if(!c)return;const l=n||void 0,u=rRe()-o,g=Kb(e.url);if(g&&g.protocol!=="http:"&&g.protocol!=="https:")return;const h={url:g?.href||e.url,method:e.method},d=nf(c.name)?c.name(h):rA(c.name)?c.name:"http.client.request.duration";if(!d)return;const p=s&&!l?void 0:((_,f)=>_?400>_?void 0:String(_):f?.name||"_OTHER")(l,r),m=sn(sn(sn(sn(sn({},(_=>{const f=DYo.has(_)?_:"_OTHER";return sn({"http.request.method":f},f==="_OTHER"&&_!==f?{"http.request.method_original":_}:{})})(h.method)),g?(_=>{return{"server.address":_.hostname.startsWith("[")&&_.hostname.endsWith("]")?_.hostname.slice(1,-1):_.hostname,"server.port":Number(_.port)||MYo[_.protocol],"url.scheme":_.protocol.slice(0,-1),"url.template":(f=_.pathname,f.split("/").map(I=>(C=>/^\d+$/.test(C)||C.length>=8&&/^[0-9a-f-]*\d[0-9a-f-]*$/i.test(C))(I)?":id":I).join("/"))};var f})(g):{}),l?{"http.response.status_code":l}:{}),p?{"error.type":p}:{}),(a=c.attributes)===null||a===void 0?void 0:a.call(c,h,{status:l,durationMs:u}));(A=t.metrics)===null||A===void 0||A.histogram(d,u,{unit:"ms",attributes:m})}catch(c){Yge.error("Failed to record network metric",c)}},aYt=()=>{},NYo=(t,e)=>nf(Fn?.fetch)?lq(Fn,"fetch",n=>function(...o){const i=rRe(),r=n.apply(this,o);if(!e())return r;try{var s,a,A;const[c,l]=o,u=sYt((s=(a=l?.method)!==null&&a!==void 0?a:c?.method)!==null&&s!==void 0?s:"GET",(A=c?.url)!==null&&A!==void 0?A:c);return r.then(g=>(sRe(t,u,g?.status,i,e,void 0,!0),g),g=>{throw sRe(t,u,void 0,i,e,g),g})}catch(c){return Yge.error("Failed to observe fetch",c),r}}):aYt,RYo=(t,e)=>{var n;const o=Fn==null||(n=Fn.XMLHttpRequest)===null||n===void 0?void 0:n.prototype;if(!o)return aYt;const i=new WeakMap,r=lq(o,"open",a=>function(...A){try{aGt.has(this)||i.set(this,sYt(A[0],A[1]))}catch(c){Yge.error("Failed to observe XHR open",c)}return a.apply(this,A)}),s=lq(o,"send",a=>function(...A){let c;try{const l=i.get(this);if(l&&e()){const u=rRe();c=()=>{this.removeEventListener("loadend",c),sRe(t,l,this.status,u,e)},el(this,"loadend",c)}}catch(l){Yge.error("Failed to observe XHR send",l)}try{return a.apply(this,A)}catch(l){throw c&&this.removeEventListener("loadend",c),l}});return()=>{r(),s()}},Uge={featureFlags:class{constructor(t){this.name="featureFlags",this.hd=!1,this.featureFlagEventHandlers=[],this.A=jGt,this.dd={},this.vd={},this.fd=[],this.pd=!1,this.gd=!1,this.md=0,this.yd=!1,this.bd=!1,this._d=!1,this.wd=!1,this.kd=0,this.Sd=!1,this.rn=()=>{const e=this.xd();this.kd=0,e&&this.reloadFeatureFlags()},this.$d=()=>{var e,n;const o=this.Cd,i=(e=this.Td)!==null&&e!==void 0?e:o;Eo(o)||Eo(i)||this.Mr.remoteRequestsDisabled||!No||No.visibilityState==="hidden"||Date.now()-((n=this.Id)!==null&&n!==void 0?n:0)<i||(this.Td=this.Sd||!this.Mr.idleRefreshBackoff?o:Math.min(2*i,36e5),this.Sd=!1,this.reloadFeatureFlags(),this.Md())},this.Ed=()=>{this.Sd&&this.Td===this.Cd||this.Pd()},this.sn=()=>{No?.visibilityState==="visible"&&this.Pd()},"get"in t?this.wo=t:(this._instance=t,this.Rd=new EYo(t.config,t.il()),this.wo=this.Rd)}updateConfig(t,e){var n;(n=this.Rd)===null||n===void 0||n.update(t,e),this.bo&&this.Ad()}setup(t){return this.jh=t,this.A=t.logger.createLogger("[FeatureFlags]"),KGt(t.kv.initialize(),()=>{this.jh===t&&(this.jh=void 0,this.bo=t,this.Od(t))})}Od(t){var e;if(this.bo===t)return Fn&&el(Fn,"online",this.rn),this.Ad(),this.Fd=t.registerDynamicEventProperties(()=>this.Dd()?this.dd:this.vd),this.Ld=(e=this._instance)===null||e===void 0||(e=e.persistence)===null||e===void 0?void 0:e.onCrossTabFeatureFlagChange(()=>{this.Nd(),this.qd(),this.jd()}),this.qd(),this.initialize()}Pd(){this.Sd=!0,this.Td=this.Cd,this.$d()}Ad(){const t=this.Mr.refreshIntervalMs,e=!this.Mr.remoteRequestsDisabled&&No&&!Eo(t)&&t>0?t:void 0;this.Mr.idleRefreshBackoff||(this.Td=e),e!==this.Cd&&(this.Bd(),Eo(e)||(this.Cd=e,this.Td=e,this.Md(),No?.addEventListener&&(el(No,U$,this.sn),XO($Gt,n=>{el(No,n,this.Ed,{capture:!0})}))))}Md(){Eo(this.Cd)||(Eo(this.Hd)||clearInterval(this.Hd),this.Id=Date.now(),this.Hd=setInterval(this.$d,this.Cd))}Bd(){var t;Eo(this.Hd)||(clearInterval(this.Hd),this.Hd=void 0,No==null||(t=No.removeEventListener)===null||t===void 0||t.call(No,"visibilitychange",this.sn),XO($Gt,e=>{var n;No==null||(n=No.removeEventListener)===null||n===void 0||n.call(No,e,this.Ed,{capture:!0})})),this.Cd=void 0,this.Td=void 0,this.Sd=!1,this.Id=void 0}destroy(){this.zd()}dispose(){this.zd()}zd(){var t,e;this.Bd(),this.md++,this.bd=!1,this.jh=void 0,this.bo&&(this.Ud(),(t=this.Fd)===null||t===void 0||t.dispose(),this.Fd=void 0,(e=this.Ld)===null||e===void 0||e.call(this),this.Ld=void 0,this.fd=[],Fn?.removeEventListener("online",this.rn),this.bo=void 0)}get Mr(){return this.wo.get()}Wd(t){var e;return this.Vd&&t in this.Vd?this.Vd[t]:(e=this.bo)===null||e===void 0?void 0:e.kv.get(t)}Nd(){return!!this.Vd&&(this.Vd=void 0,!0)}Gd(){var t;return!Eo((t=this.bo)===null||t===void 0?void 0:t.kv.get("$enabled_feature_flags"))&&this.Nd()}$t(t){this.Qd(()=>{var e;return(e=this.bo)===null||e===void 0?void 0:e.kv.set(t)})}Jd(t,e,n){var o;if(!(!((o=this._instance)===null||o===void 0)&&o.persistence)||!t.$enabled_feature_flags)return;const i=this.Wd("$enabled_feature_flags")||{},r=t.$enabled_feature_flags||{},s=e.flags||e.featureFlags,a=e.flags?Object.entries(e.flags).filter(([,_])=>!_?.failed).map(([_])=>_):[],A=!!e.errorsWhileComputingFlags&&!!e.flags,c=A?a:n&&!As(s)?Object.keys(s||{}):Array.from(new Set([...Object.keys(i),...Object.keys(r)])),l=this.Wd("$feature_flag_payloads")||{},u=t.$feature_flag_payloads||{},g=A||n?c:Array.from(new Set([...Object.keys(l),...Object.keys(u)])),h=!A&&!n,d=!!h||c,p=!!h||g,m={[Yb]:d,[TB]:d,[Dw]:p};t.$feature_flag_details&&(m[CR]=d);for(const _ of[yR,kw,H$])Eo(t[_])||(m[_]=!0);this._instance.persistence.markCrossTabFeatureFlagChanges(m)}Pt(t){this.Qd(()=>{var e;return(e=this.bo)===null||e===void 0?void 0:e.kv.remove(t)})}Qd(t){try{t()}catch(e){this.A.error("Failed to update feature flag persistence",e)}}qd(){const t={};for(const o of[Yb,Dw,yR,g6]){const i=this.Wd(o);Eo(i)||(t[o]=i)}this.dd=t;const e=sn({},t),n=this.Wd(TB);if(n)for(const[o,i]of Object.entries(n))e[`$feature/${o}`]=i;this.vd=e}Dd(){const t=this.Mr.cacheTtlMs;if(!t||0>=t)return!1;const e=this.Wd(kw);return typeof e!="number"||Date.now()-e>t}Zd(){return!!this.Dd()&&(this.wd||this.gd||(this.wd=!0,this.A.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Kd(){const t=this.Mr.evaluationContexts;return t?.length?t.filter(e=>{const n=e&&typeof e=="string"&&e.trim().length>0;return n||this.A.error("Invalid evaluation context found:",e,"Expected non-empty string"),n}):[]}Xd(){const t=this.Mr.flagKeys;if(!Eo(t))return t.filter(e=>{const n=e&&typeof e=="string"&&e.trim().length>0;return n||this.A.error("Invalid flag key found:",e,"Expected non-empty string"),n})}initialize(){var t,e;const n=this.Mr,o=(t=(e=n.bootstrap)===null||e===void 0?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(o).length){var i,r;const s=(i=(r=n.bootstrap)===null||r===void 0?void 0:r.featureFlagPayloads)!==null&&i!==void 0?i:{},a=Object.keys(o).filter(c=>!Eo(o[c])).reduce((c,l)=>(c[l]=o[l],c),{}),A=Object.keys(s).filter(c=>a[c]).reduce((c,l)=>(c[l]=s[l],c),{});return this.Yd({featureFlags:a,featureFlagPayloads:A},void 0,{persist:!1})}}updateFlags(t,e,n){var o,i;const r=n?.merge&&(o=this.Wd("$enabled_feature_flags"))!==null&&o!==void 0?o:{},s=n?.merge&&(i=this.Wd("$feature_flag_payloads"))!==null&&i!==void 0?i:{},a=sn(sn({},r),t),A=sn(sn({},s),e),c={};for(const[l,u]of Object.entries(a))c[l]={key:l,enabled:dHt(u),variant:hHt(u),reason:void 0,metadata:Eo(A?.[l])?void 0:{id:0,version:void 0,description:void 0,payload:A[l]}};this.Yd({flags:c})}get hasLoadedFlags(){return this.pd}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){const t=this.Wd(CR),e=this.Wd(g6),n=this.Wd(xR);if(!n&&!e)return t||{};const o=eg({},t||{}),i=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(const a of i){var r;const A=o[a],c=e?.[a],l=Eo(c)?(r=A?.enabled)!==null&&r!==void 0&&r:!!c,u=Eo(c)?A?.variant:typeof c=="string"?c:void 0,g=n?.[a],h=sn(sn({},A),{},{enabled:l,variant:l?u??A?.variant:void 0});var s;l!==A?.enabled&&(h.original_enabled=A?.enabled),u!==A?.variant&&(h.original_variant=A?.variant),g&&(h.metadata=sn(sn({},A?.metadata),{},{payload:g,original_payload:A==null||(s=A.metadata)===null||s===void 0?void 0:s.payload})),o[a]=h}return this.hd||(this.A.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:o}),this.hd=!0),o}getAllFeatureFlags(){const t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map(n=>{const o=t[n];return{key:n,enabled:dHt(o),variant:hHt(o),payload:gHt(e[n])}})}getFlagVariants(){const t=this.Wd(TB),e=this.Wd(g6);if(!e)return t||{};const n=eg({},t||{}),o=Object.keys(e);for(let i=0;o.length>i;i++)n[o[i]]=e[o[i]];return this.hd||(this.A.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.hd=!0),n}getFlagPayloads(){const t=this.Wd(Dw),e=this.Wd(xR);if(!e)return t||{};const n=eg({},t||{}),o=Object.keys(e);for(let i=0;o.length>i;i++)n[o[i]]=e[o[i]];return this.hd||(this.A.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.hd=!0),n}reloadFeatureFlags(){this.yd||this.Mr.featureFlagsDisabled||this.xd()||(this.gd&&(this.bd=!0),this.tv||(this.fd.slice().forEach(t=>{try{t()}catch(e){this.A.error("Error while running feature flags reloading callback",e)}}),this.tv=setTimeout(()=>{this.ev()},5)))}Ud(){clearTimeout(this.tv),this.tv=void 0}onReloading(t){return this.fd.push(t),()=>{this.fd=this.fd.filter(e=>e!==t)}}ensureFlagsLoaded(){this.pd||this.gd||this.tv||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.yd=t}resetFlagCallReported(){this.Pt(Tw)}ev(t){this.Ud();const e=this.bo;if(!e||this.Mr.remoteRequestsDisabled||this.xd())return;if(this.gd)return void(this.bd=!0);const n={token:e.projectToken,distinct_id:e.distinctId,groups:e.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:sn(sn(sn({},e.initialPersonProperties),this.Wd("$stored_person_properties")||{}),{},{$lib:e.library.name,$lib_version:e.library.version}),group_properties:this.Wd(Rw),timezone:VOt()};Eo(e.deviceId)||(n.$device_id=e.deviceId),(t?.disableFlags||this.Mr.featureFlagsDisabled)&&(n.disable_flags=!0);const o=this.Kd();o.length&&(n.evaluation_contexts=o);const i=this.Xd();Eo(i)||(n.flag_keys=i);const r=this.Mr.onlyEvaluateSurveyFeatureFlags,s="/flags/?v=2"+(r?"&only_evaluate_survey_feature_flags=true":""),a=this.md;this.gd=!0;const A=()=>{this.bd&&(this.bd=!1,this.ev())},c=d=>{var p,m;const _=(p=d.json)!==null&&p!==void 0?p:{},f=d.statusCode!==200;if(this.gd=!1,a!==this.md)return void A();if(this.iv(d.statusCode),f||this.bd||(this.$anon_distinct_id=void 0),n.disable_flags&&!this.bd)return;this._d=!f;const I=[];d.error?I.push(d.error instanceof Error&&d.error.name==="AbortError"?"timeout":d.error instanceof Error?qGt:"unknown_error"):d.statusCode!==200&&I.push(`api_error_${d.statusCode}`),_.errorsWhileComputingFlags&&I.push("errors_while_computing_flags");const C=!!(!((m=_.quotaLimited)===null||m===void 0)&&m.includes("feature_flags"));C&&I.push("quota_limited"),this.$t({[Y$]:I}),C?this.A.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):n.disable_flags||this.Yd(_,f,{partialResponse:r}),A()},l=d=>{this.gd=!1,a===this.md&&(this.$t({[Y$]:[qGt]}),this.A.error("Feature flag request failed",d),this.Gd()&&this.jd(!0)),A()};let u=this.Mr.requestMaxRetries;const g=()=>u>0&&a===this.md,h=()=>{if(a!==this.md||!this.bo||this.Mr.remoteRequestsDisabled)return this.gd=!1,void A();try{e.sendRequest(s,{target:"flags",method:"POST",body:n,compression:this.Mr.compression,sentAt:"body",timeoutMs:this.Mr.requestTimeoutMs}).then(d=>{if((p=>BYo.includes(p.statusCode)||(m=>m.statusCode===0&&m.error instanceof Error&&m.error.name==="AbortError")(p))(d)&&g())return u--,void setTimeout(h,500);c(d)}).catch(l)}catch(d){l(d)}};h()}xd(){return kOt(this.kd,3)}iv(t){this.kd=FOt(t,this.kd,3,()=>this.A.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes."))}getFeatureFlag(t,e={}){var n;if(e.fresh&&!this._d)return;if(!(this.pd||this.getFlags()&&this.getFlags().length>0))return void this.A.warn('getFeatureFlag for key "'+t+nRe);if(this.Zd())return;const o=this.getFeatureFlagResult(t,e);return(n=o?.variant)!==null&&n!==void 0?n:o?.enabled}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){const e=this.getFeatureFlagResult(t,{send_event:!1});return e?.payload}getFeatureFlagResult(t,e={}){if(e.fresh&&!this._d)return;if(!(this.pd||this.getFlags()&&this.getFlags().length>0))return void this.A.warn('getFeatureFlagResult for key "'+t+nRe);if(this.Zd())return;const n=this.getFlagVariants(),o=t in n,i=n[t],r=this.getFlagPayloads()[t],s=String(i),a=this.Wd("$feature_flag_request_id")||void 0,A=this.Wd("$feature_flag_evaluated_at")||void 0;let c,l=this.Wd("$flag_call_reported")||{};if(this.Mr.deduplicateCallsPerSession){var u;const S=(u=this.bo)===null||u===void 0?void 0:u.session.sessionId,Q=this.Wd(G$);S&&S!==Q&&(l={},c=S)}if(e.send_event||!("send_event"in e))if(t in l&&l[t].includes(s))c&&this.$t({[Tw]:l,[G$]:c});else{var g,h,d,p,m,_,f,I,C,y,x,E;As(l[t])?l[t].push(s):l[t]=[s],this.$t(sn({[Tw]:l},c?{[G$]:c}:{}));const S=this.getFeatureFlagDetails(t),Q=[...(g=this.Wd("$feature_flag_errors"))!==null&&g!==void 0?g:[]];Eo(i)&&Q.push("flag_missing");const w={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:r??null,$feature_flag_request_id:a,$feature_flag_evaluated_at:A,$feature_flag_bootstrapped_response:(h=(d=this.Mr.bootstrap)===null||d===void 0||(d=d.featureFlags)===null||d===void 0?void 0:d[t])!==null&&h!==void 0?h:null,$feature_flag_bootstrapped_payload:(p=(m=this.Mr.bootstrap)===null||m===void 0||(m=m.featureFlagPayloads)===null||m===void 0?void 0:m[t])!==null&&p!==void 0?p:null,$used_bootstrap_value:!this._d};Eo(S==null||(_=S.metadata)===null||_===void 0?void 0:_.has_experiment)||(w.$feature_flag_has_experiment=S.metadata.has_experiment),Eo(S==null||(f=S.metadata)===null||f===void 0?void 0:f.version)||(w.$feature_flag_version=S.metadata.version);const M=(I=S==null||(C=S.reason)===null||C===void 0?void 0:C.description)!==null&&I!==void 0?I:S==null||(y=S.reason)===null||y===void 0?void 0:y.code;var B;M&&(w.$feature_flag_reason=M),!(S==null||(x=S.metadata)===null||x===void 0)&&x.id&&(w.$feature_flag_id=S.metadata.id),Eo(S?.original_variant)&&Eo(S?.original_enabled)||(w.$feature_flag_original_response=Eo(S.original_variant)?S.original_enabled:S.original_variant),!(S==null||(E=S.metadata)===null||E===void 0)&&E.original_payload&&(w.$feature_flag_original_payload=S==null||(B=S.metadata)===null||B===void 0?void 0:B.original_payload),Q.length&&(w.$feature_flag_error=Q.join(",")),this.nv(w)}else c&&this.$t({[Tw]:l,[G$]:c});return o?{key:t,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:gHt(r)}:void 0}nv(t){try{var e;(e=this.bo)===null||e===void 0||e.capture("$feature_flag_called",t)}catch(n){this.A.error("Failed to capture feature flag call",n)}}getRemoteConfigPayload(t,e){this.sv(t,e)}sv(t,e){var n=this;return Zu(function*(){const o=n.bo;if(!o)return;const i={distinct_id:o.distinctId,token:o.projectToken,person_properties:{$lib:o.library.name,$lib_version:o.library.version}},r=n.Kd();r.length&&(i.evaluation_contexts=r);const s=n.Xd();let a;Eo(s)||(i.flag_keys=s);try{var A;const c=(A=(yield o.sendRequest("/flags/?v=2",{target:"flags",method:"POST",body:i,compression:n.Mr.compression,sentAt:"body",timeoutMs:n.Mr.requestTimeoutMs})).json)===null||A===void 0?void 0:A.featureFlagPayloads;a=c?.[t]||void 0}catch(c){return void n.A.error("Remote config feature flag request failed",c)}try{e(a)}catch(c){n.A.error("Remote config feature flag callback failed",c)}})()}isFeatureEnabled(t,e={}){if(e.fresh&&!this._d)return e.defaultValue;if(!(this.pd||this.getFlags()&&this.getFlags().length>0))return this.A.warn('isFeatureEnabled for key "'+t+nRe),e.defaultValue;const n=this.getFeatureFlag(t,e);return Eo(n)?e.defaultValue:!!n}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(e=>e!==t)}receivedFeatureFlags(t,e,n){this.Yd(t,e,n)}Yd(t,e,n){if(!this.bo)return;this.pd=!0;const o=((i,r={},s={},a={},A,c=jGt)=>{const l=((I,C)=>{const y=I.flags;if(y){const x=Object.fromEntries(Object.keys(y).map(B=>{var S;return[B,(S=y[B].variant)!==null&&S!==void 0?S:y[B].enabled]})),E=Object.fromEntries(Object.keys(y).filter(B=>y[B].enabled).filter(B=>{var S;return!Eo((S=y[B].metadata)===null||S===void 0?void 0:S.payload)}).map(B=>{var S;return[B,(S=y[B].metadata)===null||S===void 0?void 0:S.payload]}));return sn(sn({},I),{},{featureFlags:x,featureFlagPayloads:E})}return I.featureFlags&&C.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),I})(i,c),u=l.flags,g=l.featureFlags,h=l.featureFlagPayloads;if(!g)return;const d=i.requestId,p=i.evaluatedAt;if(As(g)){c.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");const I={};if(g)for(let C=0;g.length>C;C++)I[g[C]]=!0;return{[Yb]:g,[TB]:I,[H$]:!1}}let m=g,_=h,f=u;if(A?.partialResponse){const I=Object.keys(m),C=_||{};m=sn(sn({},r),m),_=sn(sn({},s),C),I.forEach(y=>{y in C||_==null||delete _[y]}),f=sn(sn({},a),f)}else if(i.errorsWhileComputingFlags)if(u){const I=new Set(Object.keys(u).filter(y=>{var x;return!(!((x=u[y])===null||x===void 0)&&x.failed)}));m=sn(sn({},r),Object.fromEntries(Object.entries(m).filter(([y])=>I.has(y))));const C=Object.fromEntries(Object.entries(_||{}).filter(([y])=>I.has(y)));_=sn(sn({},s),C),I.forEach(y=>{y in C||_==null||delete _[y]}),f=sn(sn({},a),Object.fromEntries(Object.entries(f||{}).filter(([y])=>I.has(y))))}else m=sn(sn({},r),m),_=sn(sn({},s),_),f=sn(sn({},a),f);return sn(sn({[Yb]:Object.keys(ZGt(m)),[TB]:m||{},[Dw]:_||{},[CR]:f||{},[H$]:i.minimalFlagCalledEvents===!0},d?{[yR]:d}:{}),p?{[kw]:p}:{})})(t,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),n,this.A);if(o)if(n?.persist===!1){const i=!Eo(this.bo.kv.get(TB));this.Vd=o,i||this.$t(o)}else this.Nd(),this.Jd(o,t,!!n?.partialResponse),this.$t(o);else e&&this.Gd();e||(this.wd=!1),this.jd(e)}override(t,e=!1){this.A.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){this.rv(t)}rv(t){if(this.bo){if(t===!1)return this.Pt([g6,xR]),this.jd(),void QR.info("All overrides cleared");if(As(t))return this.$t({[g6]:XGt(t)}),this.jd(),void QR.info("Flag overrides set",{flags:t});if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var e;const n=t;this.hd=!!((e=n.suppressWarning)!==null&&e!==void 0&&e);const o={},i=n.flags,r=n.payloads;return i&&(o[g6]=As(i)?XGt(i):i),r&&(o[xR]=r),Object.keys(o).length&&this.$t(o),i===!1&&r===!1?this.Pt([g6,xR]):i===!1?this.Pt(g6):r===!1&&this.Pt(xR),this.jd(),i===!1?QR.info("Flag overrides cleared"):i&&QR.info("Flag overrides set",{flags:i}),void(r===!1?QR.info("Payload overrides cleared"):r&&QR.info("Payload overrides set",{payloads:r}))}if(t&&typeof t=="object")return this.$t({[g6]:t}),this.jd(),void QR.info("Flag overrides set",{flags:t});this.A.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}else this.A.warn("posthog.featureFlags.overrideFeatureFlags called before feature flags were ready")}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.pd){const{flags:e,flagVariants:n}=this.ov();try{t(e,n)}catch(o){this.A.error("Error while running feature flags callback",o)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var o;const i=(this.Wd("$early_access_features")||[]).find(c=>c.flagKey===t),r={[`$feature_enrollment/${t}`]:e},s={$feature_flag:t,$feature_enrollment:e,$set:r};i&&(s.$early_access_feature_name=i.name),n&&(s.$feature_enrollment_stage=n);const a=sn(sn({},this.getFlagVariants()),{},{[t]:e});(o=this._instance)===null||o===void 0||(o=o.persistence)===null||o===void 0||o.markCrossTabFeatureFlagChanges({$active_feature_flags:[t],$enabled_feature_flags:[t],$stored_person_properties:Object.keys(r)}),this.$t({[Yb]:Object.keys(ZGt(a)),[TB]:a,[Nw]:sn(sn({},this.Wd("$stored_person_properties")||{}),r)}),this.jd();try{var A;(A=this.bo)===null||A===void 0||A.capture("$feature_enrollment_update",s)}catch(c){this.A.error("Failed to capture early access feature enrollment",c)}}getEarlyAccessFeatures(t,e=!1,n){const o=this.Wd(aNe);!o||e?this.av(t,n):t(o)}av(t,e){var n=this;return Zu(function*(){const o=n.bo;if(!o)return;const i=e?`&${e.map(s=>`stage=${s}`).join("&")}`:"";let r;try{const s=yield o.sendRequest(`/api/early_access_features/?token=${o.projectToken}${i}`,{target:"api",method:"GET",sentAt:"query"});if(!s.json)return;r=s.json.earlyAccessFeatures,n.$t({[aNe]:r})}catch(s){return void n.A.error("Early access feature request failed",s)}try{t(r)}catch(s){n.A.error("Early access feature callback failed",s)}})()}ov(){const t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter(n=>e[n]),flagVariants:Object.keys(e).filter(n=>e[n]).reduce((n,o)=>(n[o]=e[o],n),{})}}jd(t){this.qd();const{flags:e,flagVariants:n}=this.ov();this.featureFlagEventHandlers.forEach(o=>{try{o(e,n,{errorsLoading:t})}catch(i){this.A.error("Error while running feature flags callback",i)}})}setPersonPropertiesForFlags(t,e=!0){this.lv(t,e)}lv(t,e=!0){const n=this.Wd("$stored_person_properties")||{},o=t?.$set||(t?.$set_once?{}:t),i=t?.$set_once,r={};if(i)for(const s in i)({}).hasOwnProperty.call(i,s)&&(s in n||(r[s]=i[s]));this.$t({[Nw]:sn(sn(sn({},n),r),o)}),e&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e=!0){const n=sn({},this.Wd("$stored_person_properties")||{});t.forEach(o=>{delete n[o]}),this.$t({[Nw]:n}),e&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(t=!0){this.Pt(Nw),t&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e=!0){const n=this.Wd("$stored_group_properties")||{},o=sn({},n);for(const i of Object.keys(t))o[i]=sn(sn({},n[i]),t[i]);this.$t({[Rw]:o}),e&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){const e=this.Wd("$stored_group_properties")||{};this.$t({[Rw]:sn(sn({},e),{},{[t]:{}})})}else this.Pt(Rw)}reset(){this.md++,this.bd=!1,this.dd={},this.vd={},this.Vd=void 0,this.pd=!1,this.yd=!1,this._d=!1,this.$anon_distinct_id=void 0,this.Ud(),this.hd=!1,this.kd=0}}},TYo={sessionRecording:class{get Mr(){return this._instance.config}get Il(){return this._instance.persistence}get started(){var t;return!!(!((t=this.uv)===null||t===void 0)&&t.isStarted)}get status(){var t,e;return this.hv==="awaiting_config"||this.hv==="missing_config"?this.hv:(t=(e=this.uv)===null||e===void 0?void 0:e.status)!==null&&t!==void 0?t:this.hv}constructor(t){if(this._instance=t,this._forceAllowLocalhostNetworkCapture=!1,this.hv=ZNe,this.dv=void 0,this.vv=!1,this.Je=(()=>{var e,n;if(!No?.visibilityState||No.visibilityState==="visible")return!0;const o=Fn==null||(e=Fn.performance)===null||e===void 0||(n=e.getEntriesByType)===null||n===void 0?void 0:n.call(e,"visibility-state");return!o?.length||o.some(i=>i.name==="visible")})(),this.sn=()=>{var e,n;No?.visibilityState==="visible"&&(this.Je=!0,(e=this.uv)===null||e===void 0||(n=e.setDocumentWasEverVisible)===null||n===void 0||n.call(e,!0))},!this._instance.sessionManager)throw Jb.error("started without valid sessionManager"),new Error("[SessionRecording] started without valid sessionManager. This is a bug.");if(this.Mr.cookieless_mode==="always")throw new Error('[SessionRecording] cannot be used with cookieless_mode="always"');No?.addEventListener&&el(No,"visibilitychange",this.sn)}initialize(){this.startIfEnabledOrStop()}dispose({discardBufferedEvents:t=!1}={}){var e;this.vv=!0,No==null||(e=No.removeEventListener)===null||e===void 0||e.call(No,"visibilitychange",this.sn),t?this.fv(!0):this.stopRecording()}get pv(){var t;const e=!!(!((t=this._instance.get_property("$session_recording_remote_config"))===null||t===void 0)&&t.enabled),n=!this.Mr.disable_session_recording,o=this.Mr.disable_session_recording||this._instance.consent.isOptedOut();return Fn&&e&&n&&!o}startIfEnabledOrStop(t){var e;if(this.vv||this.pv&&(!((e=this.uv)===null||e===void 0)&&e.isStarted))return;const n=!Eo(Object.assign)&&!Eo(Array.from);this.pv&&n?(this.gv(t),Jb.info("starting")):(this.hv=ZNe,this.stopRecording())}gv(t){var e,n;if(this.pv)if(this.hv!=="awaiting_config"&&this.hv!=="missing_config"&&(this.hv=YGt),(Vr==null||(e=Vr.__PosthogExtensions__)===null||e===void 0||(e=e.rrweb)===null||e===void 0?void 0:e.record)&&((n=Vr.__PosthogExtensions__)===null||n===void 0?void 0:n.initSessionRecording))this.mv(t);else{var o,i;const r=this._instance.sessionManager;(o=Vr.__PosthogExtensions__)===null||o===void 0||(i=o.loadExternalDependency)===null||i===void 0||i.call(o,this._instance,this.yv,s=>{if(!this.vv&&this.pv&&this._instance.sessionManager===r)return s?(this._instance.register_for_session({$sdk_debug_recording_script_not_loaded:!0}),Jb.error("could not load recorder",s)):void this.mv(t);this.hv="disabled"})}}stopRecording(){var t,e;(t=this.dv)===null||t===void 0||t.call(this),this.dv=void 0,(e=this.uv)===null||e===void 0||e.stop()}fv(t=!1){var e,n;(e=this.dv)===null||e===void 0||e.call(this),this.dv=void 0,(n=this.uv)===null||n===void 0||n.discard({discardProducerEvents:t})}bv(){var t,e;(t=this.Il)===null||t===void 0||t.unregister("$session_is_sampled"),(e=this.Il)===null||e===void 0||e.unregister("$replay_sample_rate")}_v(t,e){if(Hs(t))return null;const n=Ah(t)?t:parseFloat(t);return typeof(o=n)!="number"||!Number.isFinite(o)||0>o||o>1?(Jb.warn(`${e} must be between 0 and 1. Ignoring invalid value:`,t),null):n;var o}wv(t){if(this.Il){var e,n;const o=this.Il,i=()=>{var r;const s=t.sessionRecording===!1?void 0:t.sessionRecording,a=this._v((r=this.Mr.session_recording)===null||r===void 0?void 0:r.sampleRate,"session_recording.sampleRate"),A=this._v(s?.sampleRate,"remote config sampleRate"),c=a??A;Hs(c)&&this.bv();const l=s?.minimumDurationMilliseconds;o.register({[L$]:sn(sn({cache_timestamp:Date.now(),enabled:!!s},s),{},{networkPayloadCapture:sn({capturePerformance:t.capturePerformance},s?.networkPayloadCapture),canvasRecording:{enabled:s?.recordCanvas,fps:s?.canvasFps,quality:s?.canvasQuality},sampleRate:c,minimumDurationMilliseconds:Eo(l)?null:l,endpoint:s?.endpoint,triggerMatchType:s?.triggerMatchType,masking:s?.masking,urlTriggers:s?.urlTriggers,version:s?.version,triggerGroups:s?.triggerGroups})})};i(),(e=this.dv)===null||e===void 0||e.call(this),this.dv=(n=this._instance.sessionManager)===null||n===void 0?void 0:n.onSessionId(i)}}onRemoteConfig(t){const e=t.ok?t.config:void 0;return e&&"sessionRecording"in e?e.sessionRecording===!1?(this.wv(e),void this.fv()):(this.wv(e),void this.startIfEnabledOrStop()):(this.hv==="awaiting_config"&&(this.hv="missing_config",this._instance.register_for_session({[dNe]:!0}),Jb.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(t,e="log"){var n;!((n=this.uv)===null||n===void 0)&&n.log?this.uv.log(t,e):Jb.warn("log called before recorder was ready")}get yv(){var t,e;const n=(t=this._instance)===null||t===void 0||(t=t.persistence)===null||t===void 0?void 0:t.get_property(L$);return(n==null||(e=n.scriptConfig)===null||e===void 0?void 0:e.script)||"lazy-recorder"}Sv(){const t=this._instance.get_property(L$);if(!t)return!1;let e;try{e=typeof t=="object"?t:JSON.parse(t)}catch(n){return Jb.warn("persisted remote config for session recording is invalid and will be ignored",n),!1}return!Hs(e.cache_timestamp)&&36e5>=Date.now()-e.cache_timestamp}mv(t){var e,n,o;if(!this.vv&&this.pv&&this._instance.sessionManager){if(!(!((e=Vr.__PosthogExtensions__)===null||e===void 0)&&e.initSessionRecording))return Jb.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[gNe]:!0});var i;if(this.uv||(this.uv=(i=Vr.__PosthogExtensions__)===null||i===void 0?void 0:i.initSessionRecording(this._instance,this.Je),this.uv._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Sv())return this.hv==="missing_config"||this.hv==="awaiting_config"?void 0:(this.hv="awaiting_config",Jb.info("persisted remote config is stale, requesting fresh config before starting"),void new qOt(this._instance).load());this.hv=YGt,(n=(o=this.uv).setDocumentWasEverVisible)===null||n===void 0||n.call(o,this.Je),this.uv.start(t)}else this.hv=ZNe}onRRwebEmit(t){var e,n;(e=this.uv)===null||e===void 0||(n=e.onRRwebEmit)===null||n===void 0||n.call(e,t)}overrideLinkedFlag(){var t,e;this.uv||(e=this.Il)===null||e===void 0||e.register({$replay_override_linked_flag:!0}),(t=this.uv)===null||t===void 0||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.uv||(e=this.Il)===null||e===void 0||e.register({$replay_override_sampling:!0}),(t=this.uv)===null||t===void 0||t.overrideSampling()}overrideTrigger(t){var e,n;this.uv||(n=this.Il)===null||n===void 0||n.register({[t==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(e=this.uv)===null||e===void 0||e.overrideTrigger(t)}get sdkDebugProperties(){var t;const e={};for(const o of dYo){var n;const i=(n=this._instance.sessionPersistence)===null||n===void 0?void 0:n.get_property(o);Eo(i)||(e[o]=i)}return sn(sn({},e),((t=this.uv)===null||t===void 0?void 0:t.sdkDebugProperties)||{$recording_status:this.status})}tryAddCustomEvent(t,e){var n;return!!(!((n=this.uv)===null||n===void 0)&&n.tryAddCustomEvent(t,e))}flushBeforeIdentityReset(){var t,e;(t=this.uv)===null||t===void 0||(e=t.flushBeforeIdentityReset)===null||e===void 0||e.call(t)}}},kYo={autocapture:class extends AYo{constructor(t){super(new cYo(t)),this.instance=t}},historyAutocapture:class{constructor(t){this.xv=!1,this._instance=t,this.$v=this.Cv()}initialize(){this.startIfEnabled()}get isEnabled(){const t=this.Tv();return!!(t.path||t.search||this.Iv(t))}startIfEnabled(){this.isEnabled&&(ui.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}startIfEnabledOrStop(){this.stop(),this.$v=this.Cv(),this.startIfEnabled()}stop(){this.Mv&&this.Mv(),this.Mv=void 0,this.Ev&&this.Ev(),this.Ev=void 0,ui.info("History API monitoring stopped")}monitorHistoryChanges(){Fn&&Fn.history&&(this.Pv("pushState"),this.Pv("replaceState"),this.Rv(),this.Iv()&&this.Av())}Pv(t){var e;if(!Fn||!((e=Fn.history[t])===null||e===void 0)&&e.__posthog_wrapped__)return;const n=this;lq(Fn.history,t,o=>function(i,r,s){var a;n.Ov(s)&&n.Fv(),o.call(this,i,r,s),n.Dv(t,!n.xv&&(Fn==null||(a=Fn.event)===null||a===void 0?void 0:a.type)!=="popstate")})}Cv(){const t=Fn?.location;if(t?.pathname)return{pathname:t.pathname,search:t.search,hash:t.hash}}Tv(){const t=this._instance.config.capture_pageview;return t==="history_change"?{path:!0}:QA(t)?t:{}}Iv(t=this.Tv()){return!!t.hash&&!this._instance.config.disable_capture_url_hashes}Lv(t){const e=this.Tv(),n=this.$v;return!(!n||!(e.path&&t.pathname!==n.pathname||e.search&&t.search!==n.search||this.Iv(e)&&t.hash!==n.hash))}Dv(t,e=!1){try{e||this.Fv();const n=this.Cv();if(!n)return;if(this.Lv(n)){const o=()=>this._instance.capture(pNe,{navigation_type:t});e?(this.Nv=o,Promise.resolve().then(()=>this.Fv())):o()}this.$v=n}catch(n){ui.error(`Error capturing ${t} pageview`,n)}}Ov(t){var e,n;return!(Hs(t)||!Fn)&&((e=Kb(String(t)))===null||e===void 0?void 0:e.href)!==((n=Fn.location)===null||n===void 0?void 0:n.href)}Fv(){const t=this.Nv;if(t){this.Nv=void 0,this.xv=!0;try{t()}catch(e){ui.error("Error capturing deferred pageview",e)}finally{this.xv=!1}this.$v=this.Cv()}}Rv(){if(this.Mv)return;const t=()=>{this.Dv("popstate")};el(Fn,"popstate",t),this.Mv=()=>{Fn&&Fn.removeEventListener("popstate",t)}}Av(){if(this.Ev)return;const t=()=>{this.Dv("hashchange")};el(Fn,"hashchange",t),this.Ev=()=>{Fn&&Fn.removeEventListener("hashchange",t)}}},heatmaps:class{get Mr(){return this.instance.config}constructor(t){var e;this.qv=!1,this.ko=!1,this.jv=null,this.instance=t,this.qv=!!(!((e=this.instance.persistence)===null||e===void 0)&&e.props[tNe]),this.rageclicks=new FGt(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){let t=5e3;return QA(this.Mr.capture_heatmaps)&&this.Mr.capture_heatmaps.flush_interval_milliseconds&&(t=this.Mr.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return Hs(this.Mr.capture_heatmaps)?Hs(this.Mr.enable_heatmaps)?this.qv:this.Mr.enable_heatmaps:this.Mr.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.ko)return;hYo.info("starting..."),this.Bv(),this.sn()}else{var t;clearInterval((t=this.jv)!==null&&t!==void 0?t:void 0),this.Hv(),this.getAndClearBuffer()}}onRemoteConfig(t){if(!t.ok)return;const e=t.config;if(!("heatmaps"in e))return;const n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[tNe]:n}),this.qv=n,this.startIfEnabled()}getAndClearBuffer(){const t=this.Rt;return this.Rt=void 0,t}zv(t){eRe(t.originalEvent)&&this.Ir(t.originalEvent,"deadclick")}sn(){this.jv&&clearInterval(this.jv),this.jv=No?.visibilityState==="visible"?setInterval(this.yl.bind(this),this.flushIntervalMilliseconds):null}Bv(){Fn&&No&&(this.Uv=this.yl.bind(this),el(Fn,Qge,this.Uv),this.Wv=t=>this.Ir(t||Fn?.event),el(No,"click",this.Wv,{capture:!0}),this.Vv=t=>this.Gv(t||Fn?.event),el(No,"mousemove",this.Vv,{capture:!0}),this.Qv=new MOt(this.instance,hGo,this.zv.bind(this)),this.Qv.startIfEnabledOrStop(),this.Jv=this.sn.bind(this),el(No,U$,this.Jv),this.ko=!0)}Hv(){var t;Fn&&No&&(this.Uv&&Fn.removeEventListener(Qge,this.Uv),this.Wv&&No.removeEventListener("click",this.Wv,{capture:!0}),this.Vv&&No.removeEventListener("mousemove",this.Vv,{capture:!0}),this.Jv&&No.removeEventListener(U$,this.Jv),clearTimeout(this.Zv),(t=this.Qv)===null||t===void 0||t.stop(),this.ko=!1)}Kv(t,e){const n=this.instance.scrollManager.scrollY(),o=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),r=(function(s,a,A){let c=s;for(;c&&d6(c)&&!AI(c,"body");){if(c===A)return!1;let h;try{var l,u,g;h=(l=(u=(g=c.ownerDocument)===null||g===void 0?void 0:g.defaultView)!==null&&u!==void 0?u:Fn)===null||l===void 0?void 0:l.getComputedStyle(c).position}catch{return!1}if(as(a,h))return!0;c=fOt(c)}return!1})(J$(t),["fixed","sticky"],i);return{x:t.clientX+(r?0:o),y:t.clientY+(r?0:n),target_fixed:r,type:e}}Ir(t,e="click"){var n;if(hOt(t.target)||!eRe(t))return;const o=this.Kv(t,e);!((n=this.rageclicks)===null||n===void 0)&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&xOt(J$(t),this.instance.config.rageclick)&&this.Qs(sn(sn({},o),{},{type:"rageclick"})),this.Qs(o)}Gv(t){!hOt(t.target)&&eRe(t)&&(clearTimeout(this.Zv),this.Zv=setTimeout(()=>{this.Qs(this.Kv(t,"mousemove"))},500))}Qs(t){if(!Fn)return;const e=this.Mr.disable_capture_url_hashes?Mw(Fn.location.href):Fn.location.href,n=this.Mr.custom_personal_data_properties,o=this.Mr.mask_personal_data_properties?[...rG,...n||[]]:[],i=X$(e,o,Z$);this.Rt=this.Rt||{},this.Rt[i]||(this.Rt[i]=[]),this.Rt[i].push(t)}yl(){this.Rt&&!Rx(this.Rt)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:MOt,webVitalsAutocapture:class{constructor(t){var e;this._instance=t,this.qv=!1,this.ko=!1,this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Xv=()=>{clearTimeout(this.Yv),this.Yv=void 0,this.Rt.metrics.length!==0&&(this._instance.capture("$web_vitals",sn({$current_url:this.Rt.url},this.Rt.metrics.reduce((n,o)=>sn(sn({},n),{},{[`$web_vitals_${o.name}_event`]:sn({},o),[`$web_vitals_${o.name}_value`]:o.value}),{}))),this.Rt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.tf=n=>{var o;if(this.Rt=this.Rt||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},Hs(n?.name)||Hs(n?.value))return void SR.error("Invalid metric received",n);const i=typeof n.navigationURL=="string"?n.navigationURL:void 0,r=this.ef(i);if(Eo(r))return;const s=Ah(n.navigationId)||typeof n.navigationId=="string"?`navigation:${n.navigationId}`:`url:${r}`;if(this.if&&n.value>=this.if)return void SR.error("Ignoring metric with value >= "+this.if,n);this.Rt.navigationKey!==s&&(this.Xv(),this.Yv=setTimeout(this.Xv,this.flushToCaptureTimeoutMs)),Eo(this.Rt.navigationKey)&&(this.Rt.navigationKey=s,this.Rt.url=r),this.Rt.firstMetricTimestamp=Eo(this.Rt.firstMetricTimestamp)?Date.now():this.Rt.firstMetricTimestamp;const a=(o=this._instance.sessionManager)===null||o===void 0?void 0:o.checkAndGetSessionAndWindowId(!0),A=sn(sn(sn({},n),i?{navigationURL:r}:{}),{},{$current_url:r,timestamp:Date.now()});if(delete A.entries,QA(n.attribution)&&this.attributionMetrics.indexOf(n.name)>-1){const c={};for(const l of gYo){const u=l==="url"&&typeof n.attribution[l]=="string"?this.ef(n.attribution[l]):n.attribution[l];Eo(u)||(c[l]=u)}A.attribution=c}else delete A.attribution;Eo(a)||(A.$session_id=a.sessionId,A.$window_id=a.windowId),this.Rt.metrics.push(A),this.Rt.metrics.length===this.allowedMetrics.length&&this.Xv()},this.nf=()=>{if(this.ko)return;let n,o,i,r,s=!1;const a=Vr.__PosthogExtensions__,A=a?.postHogWebVitalsCallbacksByFlavor,c=A?.[this.sf]||(this.sf==="web-vitals"&&Eo(A)?a?.postHogWebVitalsCallbacks:void 0);if(!Eo(c)){const g=c.withoutAttribution,h=this.attributionMetrics;s=!Eo(g),n=h.indexOf("LCP")>-1?c.onLCP:g?.onLCP||c.onLCP,o=h.indexOf("CLS")>-1?c.onCLS:g?.onCLS||c.onCLS,i=h.indexOf("FCP")>-1?c.onFCP:g?.onFCP||c.onFCP,r=h.indexOf("INP")>-1?c.onINP:g?.onINP||c.onINP}if(!(n&&o&&i&&r))return void SR.error("web vitals callbacks not loaded - not starting");const l={reportSoftNavs:this.useSoftNavs},u=s&&this.attributionMetrics.indexOf("INP")>-1?sn(sn({},l),{},{includeProcessedEventEntries:!1}):l;this.allowedMetrics.indexOf("LCP")>-1&&n(this.tf.bind(this),l),this.allowedMetrics.indexOf("CLS")>-1&&o(this.tf.bind(this),l),this.allowedMetrics.indexOf("FCP")>-1&&i(this.tf.bind(this),l),this.allowedMetrics.indexOf("INP")>-1&&r(this.tf.bind(this),u),this.ko=!0},this.qv=!!(!((e=this._instance.persistence)===null||e===void 0)&&e.props[iNe]),this.startIfEnabled()}get rf(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e;const n=QA(this.rf)?(t=this.rf)===null||t===void 0?void 0:t.web_vitals_allowed_metrics:void 0;return Hs(n)?((e=this._instance.persistence)===null||e===void 0?void 0:e.props.$web_vitals_allowed_metrics)||GGt:n}get flushToCaptureTimeoutMs(){return(QA(this.rf)?this.rf.web_vitals_delayed_flush_ms:void 0)||5e3}get attributionMetrics(){const t=QA(this.rf)?this.rf.web_vitals_attribution:void 0;return $y(t)?t?GGt:[]:As(t)?t:uYo}get useAttribution(){return this.attributionMetrics.length>0}get useSoftNavs(){const t=QA(this.rf)?this.rf.__preview_web_vitals_soft_navs:void 0;return t!=null&&t}get if(){const t=QA(this.rf)&&Ah(this.rf.__web_vitals_max_value)?this.rf.__web_vitals_max_value:OGt;return t>0&&6e4>=t?OGt:t}get isEnabled(){const t=fd?.protocol;if(t!=="http:"&&t!=="https:")return SR.info("Web Vitals are disabled on non-http/https protocols"),!1;const e=QA(this.rf)?this.rf.web_vitals:$y(this.rf)?this.rf:void 0;return $y(e)?e:this.qv}startIfEnabled(){this.isEnabled&&!this.ko&&(SR.info("enabled, starting..."),this.Ho(this.nf))}onRemoteConfig(t){if(!t.ok)return;const e=t.config;if(!("capturePerformance"in e))return;const n=QA(e.capturePerformance)&&!!e.capturePerformance.web_vitals,o=QA(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[iNe]:n}),this._instance.persistence.register({[HHt]:o})),this.qv=n,this.startIfEnabled()}get sf(){return this.useSoftNavs?this.useAttribution?"web-vitals-with-attribution-soft-navs":"web-vitals-soft-navs":this.useAttribution?"web-vitals-with-attribution":"web-vitals"}Ho(t){var e;const n=Vr.__PosthogExtensions__,o=this.sf,i=n?.postHogWebVitalsCallbacksByFlavor;i?.[o]||o==="web-vitals"&&Eo(i)&&n?.postHogWebVitalsCallbacks?t():n==null||(e=n.loadExternalDependency)===null||e===void 0||e.call(n,this._instance,o,r=>{r?SR.error("failed to load script",r):t()})}ef(t){const e=t||Fn?.location.href;if(!e)return void SR.error("Could not determine current URL");const n=this._instance.config.disable_capture_url_hashes?Mw(e):e,o=this._instance.config.custom_personal_data_properties,i=this._instance.config.mask_personal_data_properties?[...rG,...o||[]]:[];return X$(n,i,Z$)}}},FYo={exceptionObserver:class{constructor(t){var e;this.nf=()=>{var n;if(!Fn||!this.isEnabled||!(!((n=Vr.__PosthogExtensions__)===null||n===void 0)&&n.errorWrappingFunctions))return;const o=Vr.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=Vr.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=Vr.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.af&&this.Mr.capture_unhandled_errors&&(this.af=o(this.captureException.bind(this))),!this.lf&&this.Mr.capture_unhandled_rejections&&(this.lf=i(this.captureException.bind(this))),!this.uf&&this.Mr.capture_console_errors&&(this.uf=r(this.captureException.bind(this)))}catch(s){cq.error("failed to start",s),this.hf()}},this._instance=t,this.cf=!!(!((e=this._instance.persistence)===null||e===void 0)&&e.props[nNe]),this.wt=new RHo(sn(sn({},(function(n={}){var o,i,r,s;return{refillRate:(o=(i=n.exceptionRateLimiterRefillRate)!==null&&i!==void 0?i:n.__exceptionRateLimiterRefillRate)!==null&&o!==void 0?o:1,bucketSize:(r=(s=n.exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:n.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10}})(this._instance.config.error_tracking)),{},{refillInterval:1e4,A:cq})),this.Mr=this.df(),this.startIfEnabledOrStop()}df(){const t=this._instance.config.capture_exceptions;let e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return QA(t)?e=sn(sn({},e),t):(Eo(t)?this.cf:t)&&(e=sn(sn({},e),{},{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Mr.capture_console_errors||this.Mr.capture_unhandled_errors||this.Mr.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(cq.info("enabled"),this.hf(),this.Ho(this.nf)):this.hf()}Ho(t){var e,n,o;!((e=Vr.__PosthogExtensions__)===null||e===void 0)&&e.errorWrappingFunctions?t():(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,"exception-autocapture",i=>{if(i)return cq.error("failed to load script",i);t()})}hf(){var t,e,n;(t=this.af)===null||t===void 0||t.call(this),this.af=void 0,(e=this.lf)===null||e===void 0||e.call(this),this.lf=void 0,(n=this.uf)===null||n===void 0||n.call(this),this.uf=void 0}onRemoteConfig(t){if(!t.ok)return;const e=t.config;"autocaptureExceptions"in e&&(this.cf=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[nNe]:this.cf}),this.Mr=this.df(),this.startIfEnabledOrStop())}onConfigChange(){this.Mr=this.df()}captureException(t){try{var e,n,o;const i=(e=t==null||(n=t.$exception_list)===null||n===void 0||(n=n[0])===null||n===void 0?void 0:n.type)!==null&&e!==void 0?e:"Exception";if(this.wt.consumeRateLimit(i))return void cq.info("Skipping exception capture because of client rate limiting.",{exception:i});(o=this._instance.exceptions)===null||o===void 0||o.sendExceptionEvent(t)}catch{}}},exceptions:class{constructor(t){var e,n;this.vf=[],this.ff=new zHo([new aOo,new mOo,new cOo,new AOo,new hOo,new dOo,new uOo,new pOo],(function(o,...i){return(r,s=0)=>{const a=[],A=r.split(`
`),c=Math.min(A.length,s+1e3),l=[];for(let h=s;c>h;h++){const d=A[h];if(d.length>1024)continue;const p=AHt.test(d)?d.replace(AHt,"$1"):d;if(!p.match(/\S*Error: /)){for(const m of i){const _=m(p,o);if(_){a.push(_);const f=oOo(a);if(f){for(let I=l.length-1;I>=0;I--){const C=l[I];if(f.start>=C.start+C.length)break;l.pop()}l.push(f)}break}}if(rOo(a,l)>=50)break}}const u=[...l].sort((h,d)=>d.start-h.start),g=u[u.length-1];if(g){const h=cHt(a,g);a.splice(g.start-h,h);for(const d of u)d.start-=h}for(const h of u)iOo(a,h);return l.some(h=>h.start===0&&a.length===h.length)&&(function(h){const d=h.map(m=>`${m.function}|${m.filename}|${m.lineno}|${m.colno}|${m.module}`);let p=0;for(let m=1;d.length>m;m++)sOo(d,m,p)&&(p=m);h.push(...h.splice(0,p))})(a),(function(h){if(!h.length)return[];const d=Array.from(h);return d.reverse(),d.slice(0,50).map(p=>{return sn(sn({},p),{},{filename:p.filename||(m=d,m[m.length-1]||{}).filename,function:p.function||"?"});var m})})(a)}})("web:javascript",ZHo,nOo)),this._instance=t,this.vf=(e=(n=this._instance.persistence)===null||n===void 0?void 0:n.get_property("$error_tracking_suppression_rules"))!==null&&e!==void 0?e:[],this.pf=Cge(this.gf()),this.mf=new fOo(this.pf)}onConfigChange(){this.pf=Cge(this.gf()),this.mf.setConfig(this.pf)}onRemoteConfig(t){var e,n,o;if(!t.ok)return;const i=t.config;if(!("errorTracking"in i))return;const r=(e=(n=i.errorTracking)===null||n===void 0?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],s=(o=i.errorTracking)===null||o===void 0?void 0:o.captureExtensionExceptions;this.vf=r,this._instance.persistence&&this._instance.persistence.register({[FHt]:this.vf,[oNe]:s})}get yf(){var t;const e=!!this._instance.get_property(oNe),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.ff.buildFromUnknown(t,{syntheticException:e?.syntheticException,mechanism:{handled:e?.handled}})}addExceptionStep(t,e){if(this.pf.enabled)try{if(!rA(t)||t.trim().length===0)return void FB.warn("Ignoring exception step because message must be a non-empty string");const{sanitizedProperties:n,droppedKeys:o}=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};const r=[];return{sanitizedProperties:Object.keys(i).reduce((s,a)=>_Oo.has(a)?(r.push(a),s):(s[a]=i[a],s),{}),droppedKeys:r}})(this.bf(e));o.length>0&&FB.warn("Ignoring reserved exception step fields",{droppedKeys:o}),this.mf.add(sn({[fge]:t,[Ige]:new Date().toISOString()},n))}catch(n){FB.error("Failed to add exception step. Ignoring breadcrumb.",n)}}sendExceptionEvent(t){try{const e=t.$exception_list;if(this._f(e)){if(this.wf(e))return this.kf("Exception dropped: matched a suppression rule"),void FB.info("Skipping exception capture because a suppression rule matched");if(!this.yf&&this.Sf(e))return this.kf("Exception dropped: thrown by a browser extension"),void FB.info("Skipping exception capture because it was thrown by an extension");if(!this.yf&&this.xf(e))return this.kf("Exception dropped: thrown by an injected browser script"),void FB.info("Skipping exception capture because it was thrown by an injected browser script");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.$f(e))return this.kf("Exception dropped: thrown by the PostHog SDK"),void FB.info("Skipping exception capture because it was thrown by the PostHog SDK")}const n=this.pf.enabled&&Hs(t.$exception_steps)?this.Cf(t):t,o=(function(){const i=globalThis._posthogReleaseId;return typeof i=="string"&&i.length>0?i:void 0})();o&&(n.$release_id=o);try{const i=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",gh:!0});return i&&this.mf.clear(),i}catch(i){return eYt(i)||FB.error("Failed to capture exception event. Dropping this exception.",i),void this.mf.clear()}}catch(e){return void(eYt(e)||FB.error("Failed to process exception event. Ignoring this exception.",e))}}Cf(t){try{const e=this.mf.getAttachable();return e.length===0?t:sn(sn({},t),{},{$exception_steps:e})}catch(e){return FB.error("Failed to read buffered exception steps. Capturing exception without steps.",e),t}}kf(t){this.pf.enabled&&this.mf.add({[fge]:t,[Ige]:new Date().toISOString()})}bf(t){return QA(t)?sn({},t):{}}gf(){var t,e;return(t=(e=this._instance.config.error_tracking)===null||e===void 0?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}wf(t){if(t.length===0)return!1;try{const e=t.reduce((n,{type:o,value:i})=>(rA(o)&&o.length>0&&n.$exception_types.push(o),rA(i)&&i.length>0&&n.$exception_values.push(i),n),{$exception_types:[],$exception_values:[]});return this.vf.some(n=>{const o=n.values.map(i=>{const r=bGt[i.operator],s=e[i.key];if(!r||!s)return!1;const a=As(i.value)?i.value:[i.value];return a.length>0&&r(a,s)});return n.type==="OR"?o.some(Boolean):o.every(Boolean)})}catch(e){return FB.warn("Failed to evaluate suppression rules. Capturing the exception.",e),!1}}Sf(t){const e=t.flatMap(o=>{var i,r;return(i=(r=o.stacktrace)===null||r===void 0?void 0:r.frames)!==null&&i!==void 0?i:[]}),n=e.filter(({filename:o})=>!!o&&SYo.some(i=>o.startsWith(i)));return n.length!==0&&(!n.every(({filename:o})=>!!o&&o.startsWith(oRe))||t.some(({type:o,value:i})=>o==="NoResponse"||rA(i)&&bYo.some(({value:r,exact:s})=>s?i===r:i.includes(r)))&&!e.some(({in_app:o,filename:i})=>o&&!i?.startsWith(oRe)))}xf(t){return t.some(({value:e})=>rA(e)&&QYo.some(n=>e.includes(n)))}$f(t){if(t.length>0){var e,n,o,i;const r=(e=(n=t[0].stacktrace)===null||n===void 0?void 0:n.frames)!==null&&e!==void 0?e:[],s=r[r.length-1];return(o=s==null||(i=s.filename)===null||i===void 0?void 0:i.includes("posthog.com/static"))!==null&&o!==void 0&&o}return!1}_f(t){return!Hs(t)&&As(t)}}},LYo=sn({productTours:class{get Il(){return this._instance.persistence}constructor(t){this.Tf=null,this.If=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!t.ok)return;const e=t.config;if("productTours"in e){var n,o;if(this.Il&&this.Il.register({[sNe]:!!e.productTours}),!tRe(this._instance))return!this.Tf&&Hs((n=this.Il)===null||n===void 0?void 0:n.props.ph_product_tours)||Gge.info("product tours disabled; stopping and clearing cached tours"),(o=this.Tf)===null||o===void 0||o.stop(),this.Tf=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Tf&&tRe(this._instance)&&this.Ho(()=>this.Mf())}Ho(t){var e,n,o;!((e=Vr.__PosthogExtensions__)===null||e===void 0)&&e.generateProductTours?t():(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,"product-tours",i=>{i?Gge.error("Could not load product tours script",i):t()})}Mf(){var t;!this.Tf&&(!((t=Vr.__PosthogExtensions__)===null||t===void 0)&&t.generateProductTours)&&(this.Tf=Vr.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e=!1){if(As(this.If)&&!e)return void t(this.If,{isLoaded:!0});const n=this.Il;if(n){const o=n.props[ANe];if(As(o)&&!e)return this.If=o,void t(o,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api",`/api/product_tours/?token=${this._instance.config.token}`),method:"GET",timestampMode:"query",callback:o=>{if(!tRe(this._instance))return void t([],{isLoaded:!0});const i=o.statusCode;if(i!==200||!o.json){const s=`Product Tours API could not be loaded, status: ${i}`;return i===0?o.error||Gge.warn(s):Gge.error(s),void t([],{isLoaded:!1,error:s})}const r=As(o.json.product_tours)?o.json.product_tours:[];this.If=r,n&&n.register({[ANe]:r}),t(r,{isLoaded:!0})}})}getActiveProductTours(t){Hs(this.Tf)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.Tf.getActiveProductTours(t)}showProductTour(t){var e;(e=this.Tf)===null||e===void 0||e.showTourById(t)}previewTour(t){this.Tf?this.Tf.previewTour(t):this.Ho(()=>{var e;this.Mf(),(e=this.Tf)===null||e===void 0||e.previewTour(t)})}dismissProductTour(){var t;(t=this.Tf)===null||t===void 0||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.Tf)===null||t===void 0||t.nextStep()}previousStep(){var t;(t=this.Tf)===null||t===void 0||t.previousStep()}clearCache(){var t;this.If=null,(t=this.Il)===null||t===void 0||t.unregister("ph_product_tours")}resetTour(t){var e;(e=this.Tf)===null||e===void 0||e.resetTour(t)}resetAllTours(){var t;(t=this.Tf)===null||t===void 0||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.Tf)===null||e===void 0||e.cancelPendingTour(t)}}},Uge),HYo={siteApps:class{constructor(t){this._instance=t,this.Ef=0,this.Pf=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Rf(t,e){if(!e)return;const n=this.globalsForEvent(e);this.Pf.push(n),this.Pf.length>1e3&&(this.Pf=this.Pf.slice(10))}get siteAppLoaders(){var t;return(t=Vr._POSTHOG_REMOTE_CONFIG)===null||t===void 0||(t=t[this._instance.config.token])===null||t===void 0?void 0:t.siteApps}initialize(){if(this.isEnabled){const t=this._instance._addCaptureHook(this.Rf.bind(this));this.Af=()=>{t(),this.Pf=[],this.Af=void 0}}}globalsForEvent(t){var e,n,o,i,r,s,a;if(!t)throw new Error("Event payload is required");const A={},c=this._instance.get_property("$groups")||[],l=this._instance.get_property("$stored_group_properties")||{};for(const[h,d]of Object.entries(l))A[h]={id:c[h],type:h,properties:d};const{$set_once:u,$set:g}=t;return{event:sn(sn({},IHt(t,pYo)),{},{properties:sn(sn(sn({},t.properties),g?{$set:sn(sn({},(e=(n=t.properties)===null||n===void 0?void 0:n.$set)!==null&&e!==void 0?e:{}),g)}:{}),u?{$set_once:sn(sn({},(o=(i=t.properties)===null||i===void 0?void 0:i.$set_once)!==null&&o!==void 0?o:{}),u)}:{}),elements_chain:(r=(s=t.properties)===null||s===void 0?void 0:s.$elements_chain)!==null&&r!==void 0?r:"",distinct_id:(a=t.properties)===null||a===void 0?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:A}}Of(t){var e;const n=(e=t.tagName)===null||e===void 0?void 0:e.toLowerCase();return n==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(t)||(h6.error("prepare_external_dependency_stylesheet returned null"),null):n==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(t)||(h6.error("prepare_external_dependency_script returned null"),null):t}Ff(){var t,e,n,o,i,r,s,a;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};const A=No?.defaultView,c=A==null||(t=A.Node)===null||t===void 0?void 0:t.prototype;if(!A||!c)return()=>{};if(this.Ef++,this.Df)return this.Lf();const l=[],u=this,g=new WeakSet,h=(m,_,f)=>{if(!m?.[_])return;const I=m[_];m[_]=f(I),l.push(()=>{m[_]=I})},d=m=>{if(g.has(m))return m;const _=u.Of(m);return _&&g.add(_),_},p=m=>m.map(_=>typeof _=="string"?_:d(_)).filter(_=>!Id(_));return h(c,"appendChild",m=>function(_){const f=d(_);return f?m.call(this,f):_}),h(c,"insertBefore",m=>function(_,f){const I=d(_);return I?m.call(this,I,f):_}),h(c,"replaceChild",m=>function(_,f){const I=d(_);return I?m.call(this,I,f):f}),[(e=A.Element)===null||e===void 0?void 0:e.prototype,(n=A.Document)===null||n===void 0?void 0:n.prototype,(o=A.DocumentFragment)===null||o===void 0?void 0:o.prototype].forEach(m=>{h(m,"append",_=>function(...f){return _.apply(this,p(f))}),h(m,"prepend",_=>function(...f){return _.apply(this,p(f))})}),[(i=A.Element)===null||i===void 0?void 0:i.prototype,(r=A.CharacterData)===null||r===void 0?void 0:r.prototype,(s=A.DocumentType)===null||s===void 0?void 0:s.prototype].forEach(m=>{h(m,"before",_=>function(...f){return _.apply(this,p(f))}),h(m,"after",_=>function(...f){return _.apply(this,p(f))}),h(m,"replaceWith",_=>function(...f){const I=p(f);return f.length&&!I.length?void 0:_.apply(this,I)})}),h((a=A.Element)===null||a===void 0?void 0:a.prototype,"insertAdjacentElement",m=>function(_,f){const I=d(f);return I?m.call(this,_,I):null}),this.Df=()=>{l.forEach(m=>m()),this.Df=void 0},this.Lf()}Lf(){let t=!1;return()=>{var e;t||(t=!0,this.Ef--,this.Ef===0&&((e=this.Df)===null||e===void 0||e.call(this)))}}Nf(t,e=!0){const n=this.Ff();try{const o=t(n);return e&&n(),o}catch(o){throw n(),o}}setupSiteApp(t){const e=this.apps[t.id],n=()=>{var r;!e.errored&&this.Pf.length&&(h6.info(`Processing ${this.Pf.length} events for site app with id ${t.id}`),this.Pf.forEach(s=>this.Nf(()=>{var a;return(a=e.processEvent)===null||a===void 0?void 0:a.call(e,s)})),e.processedBuffer=!0),Object.values(this.apps).every(s=>s.processedBuffer||s.errored)&&((r=this.Af)===null||r===void 0||r.call(this))};let o=!1;const i=r=>{e.errored=!r,e.loaded=!0,h6.info(`Site app with id ${t.id} ${r?"loaded":"errored"}`),o&&n()};try{const{processEvent:r}=this.Nf(s=>t.init({posthog:this._instance,callback(a){s(),i(a)}}),!1);r&&(e.processEvent=r),o=!0}catch(r){h6.error(UGt+t.id,r),i(!1)}if(o&&e.loaded)try{n()}catch(r){h6.error(`Error while processing buffered events PostHog app with config id ${t.id}`,r),e.errored=!0}}qf(){const t=this.siteAppLoaders||[];for(const e of t)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(const e of t)this.setupSiteApp(e)}jf(t){if(Object.keys(this.apps).length===0)return;const e=this.globalsForEvent(t);for(const n of Object.values(this.apps))try{this.Nf(()=>{var o;return(o=n.processEvent)===null||o===void 0?void 0:o.call(n,e)})}catch(o){h6.error(`Error while processing event ${t.event} for site app ${n.id}`,o)}}onRemoteConfig(t){var e,n,o;if(!((e=this.siteAppLoaders)===null||e===void 0)&&e.length)return this.isEnabled?(this.qf(),void this._instance.on("eventCaptured",a=>this.jf(a))):void h6.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Af)===null||n===void 0||n.call(this),!t.ok)return;const i=t.config;if(!((o=i.siteApps)===null||o===void 0)&&o.length)if(this.isEnabled)for(const{id:a,url:A}of i.siteApps){var r,s;Vr[`__$$ph_site_app_${a}`]=this._instance,(r=Vr.__PosthogExtensions__)===null||r===void 0||(s=r.loadSiteApp)===null||s===void 0||s.call(r,this._instance,A,c=>{if(c)return h6.error(UGt+a,c)})}else h6.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},OYo={tracingHeaders:class{constructor(t){this._instance=t,this.Bf=void 0,this.Hf=void 0,this.zf=void 0,this.nf=()=>{const e=this.Uf();var n,o;e?(Eo(this.Bf)&&(this.Bf=(n=Vr.__PosthogExtensions__)===null||n===void 0||(n=n.tracingHeadersPatchFns)===null||n===void 0?void 0:n._patchXHR(e,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),Eo(this.Hf)&&(this.Hf=(o=Vr.__PosthogExtensions__)===null||o===void 0||(o=o.tracingHeadersPatchFns)===null||o===void 0?void 0:o._patchFetch(e,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.hf()}}initialize(){this.startIfEnabledOrStop()}Ho(t){var e,n,o;!((e=Vr.__PosthogExtensions__)===null||e===void 0)&&e.tracingHeadersPatchFns?t():(n=Vr.__PosthogExtensions__)===null||n===void 0||(o=n.loadExternalDependency)===null||o===void 0||o.call(n,this._instance,"tracing-headers",i=>{if(i)return lYo.error("failed to load script",i);t()})}Wf(){var t,e;return(t=(e=this._instance.config.tracing_headers)!==null&&e!==void 0?e:this._instance.config.addTracingHeaders)!==null&&t!==void 0?t:this._instance.config.__add_tracing_headers}Uf(){const t=this.Wf();return As(t)?(As(this.zf)?this.zf.splice(0,this.zf.length,...t):this.zf=[...t],t.length>0?this.zf:void 0):(As(this.zf)&&this.zf.splice(0),this.zf=t||void 0,this.zf)}hf(){var t,e;(t=this.Bf)===null||t===void 0||t.call(this),(e=this.Hf)===null||e===void 0||e.call(this),this.Bf=void 0,this.Hf=void 0}startIfEnabledOrStop(){this.Uf()?this.Ho(this.nf):this.hf()}}},GYo=sn({surveys:class extends mYo{constructor(t){var e;super(new yYo(t),(e=t,{get projectToken(){return e.config.token},kv:new CYo(e)})),this._instance=t}Qh(t,e){const n=e.query?iq(t,e.query):t;return new Promise(o=>{var i;this._instance._send_request({method:e.method,url:this._instance.requestRouter.endpointFor((i=e.target)!==null&&i!==void 0?i:"api",n),data:e.body,headers:e.headers,timeout:e.timeoutMs,fireCallbackOnDrop:!0,transport:e.transport,compression:e.compression,timestampMode:e.sentAt,callback:o})})}}},Uge),YYo={toolbar:class{constructor(t){this.instance=t}Vf(t){Vr.ph_toolbar_state=t}Gf(){var t;return(t=Vr.ph_toolbar_state)!==null&&t!==void 0?t:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(t=void 0,e=void 0,n=void 0){var o,i;if(_Ne(this.instance.config)||!Fn||!No)return!1;t=(o=t)!==null&&o!==void 0?o:Fn.location,n=(i=n)!==null&&i!==void 0?i:Fn.history;try{if(!e){try{Fn.localStorage.setItem("test","test"),Fn.localStorage.removeItem("test")}catch{return!1}e=Fn?.localStorage}const r=xYo||Mge(t.hash,"__posthog")||Mge(t.hash,"state");let s;const a=r?tHt(()=>JSON.parse(atob(decodeURIComponent(r))))||tHt(()=>JSON.parse(decodeURIComponent(r))):null;return a&&a.action==="ph_authorize"?(s=a,s.source="url",s&&Object.keys(s).length>0&&(a.desiredHash?t.hash=a.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):(s=JSON.parse(e.getItem(zGt)||"{}"),s.source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch{return!1}}Qf(t){const e=Vr.ph_load_toolbar||Vr.ph_load_editor;!Hs(e)&&nf(e)?e(t,this.instance):JGt.warn("No toolbar load function found")}loadToolbar(t){const e=!!No?.getElementById("__POSTHOG_TOOLBAR__");if(!Fn||e)return!1;const n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,o=sn(sn({token:this.instance.config.token},t),{},{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(Fn.localStorage.setItem(zGt,JSON.stringify(sn(sn({},o),{},{source:void 0}))),this.Gf()===2)this.Qf(o);else if(this.Gf()===0){var i,r;this.Vf(1),(i=Vr.__PosthogExtensions__)===null||i===void 0||(r=i.loadExternalDependency)===null||r===void 0||r.call(i,this.instance,"toolbar",s=>{if(s)return JGt.error("[Toolbar] Failed to load",s),void this.Vf(0);this.Vf(2),this.Qf(o)}),el(Fn,"turbolinks:load",()=>{this.Vf(0),this.loadToolbar(o)})}return!0}Jf(t){return this.loadToolbar(t)}maybeLoadEditor(t=void 0,e=void 0,n=void 0){return this.maybeLoadToolbar(t,e,n)}}},UYo=sn({experiments:class sx{get Mr(){return this._instance.config}constructor(e){this._instance=e,this.getWebExperimentsAndEvaluateDisplayLogic=(n=!1)=>{this.getWebExperiments(o=>{sx.Zf("retrieved web experiments from the server"),this.Kf=new Map,o.forEach(i=>{if(i.feature_flag_key){var r;this.Kf&&(sx.Zf("setting flag key ",i.feature_flag_key," to web experiment ",i),(r=this.Kf)===null||r===void 0||r.set(i.feature_flag_key,i));const s=this._instance.getFeatureFlag(i.feature_flag_key);rA(s)&&i.variants[s]&&this.Xf(i.name,s,i.variants[s].transforms)}else if(i.variants)for(const s in i.variants){const a=i.variants[s];sx.Yf(a,this._instance)&&this.Xf(i.name,s,a.transforms)}})},n)},this._instance.onFeatureFlags(n=>{this.onFeatureFlags(n)})}initialize(){}onFeatureFlags(e){if(this._is_bot())sx.Zf(tYt);else if(!this.Mr.disable_web_experiments){if(Hs(this.Kf))return this.Kf=new Map,this.loadIfEnabled(),void this.previewWebExperiment();sx.Zf("applying feature flags",e),e.forEach(n=>{var o;if(this.Kf&&(!((o=this.Kf)===null||o===void 0)&&o.has(n))){var i;const r=this._instance.getFeatureFlag(n),s=(i=this.Kf)===null||i===void 0?void 0:i.get(n);r&&s?.variants[r]&&this.Xf(s.name,r,s.variants[r].transforms)}})}}previewWebExperiment(){const e=sx.getWindowLocation();if(e?.search){const n=iG(e?.search,"__experiment_id"),o=iG(e?.search,"__experiment_variant");n&&o&&(sx.Zf(`previewing web experiments ${n} && ${o}`),this.getWebExperiments(i=>{this.tp(parseInt(n),o,i)},!1,!0))}}loadIfEnabled(){this.Mr.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,o){if(this.Mr.disable_web_experiments&&!o)return e([]);const i=this._instance.get_property("$web_experiments");if(i&&!n)return e(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api",`/api/web_experiments/?token=${this.Mr.token}`),method:"GET",timestampMode:"query",callback:r=>e(r.statusCode===200&&r.json&&r.json.experiments||[])})}tp(e,n,o){const i=o.filter(r=>r.id===e);i&&i.length>0&&(sx.Zf(`Previewing web experiment [${i[0].name}] with variant [${n}]`),this.Xf(i[0].name,n,i[0].variants[n].transforms))}static Yf(e,n){return!Hs(e.conditions)&&sx.ep(e,n)&&sx.np(e)}static ep(e,n){var o;if(Hs(e.conditions)||Hs((o=e.conditions)===null||o===void 0?void 0:o.url))return!0;const i=sx.getWindowLocation();if(i){var r,s,a;const A=dOt(n,i.href);return!(!((r=e.conditions)===null||r===void 0)&&r.url)||vYo[(s=(a=e.conditions)===null||a===void 0?void 0:a.urlMatchType)!==null&&s!==void 0?s:"icontains"](e.conditions.url,A)}return!1}static getWindowLocation(){return Fn?.location}static np(e){var n;if(Hs(e.conditions)||Hs((n=e.conditions)===null||n===void 0?void 0:n.utm))return!0;const o=LOt();if(o.utm_source){var i,r,s,a,A,c,l,u;const g=!(!((i=e.conditions)===null||i===void 0||(i=i.utm)===null||i===void 0)&&i.utm_campaign)||((r=e.conditions)===null||r===void 0||(r=r.utm)===null||r===void 0?void 0:r.utm_campaign)==o.utm_campaign,h=!(!((s=e.conditions)===null||s===void 0||(s=s.utm)===null||s===void 0)&&s.utm_source)||((a=e.conditions)===null||a===void 0||(a=a.utm)===null||a===void 0?void 0:a.utm_source)==o.utm_source,d=!(!((A=e.conditions)===null||A===void 0||(A=A.utm)===null||A===void 0)&&A.utm_medium)||((c=e.conditions)===null||c===void 0||(c=c.utm)===null||c===void 0?void 0:c.utm_medium)==o.utm_medium,p=!(!((l=e.conditions)===null||l===void 0||(l=l.utm)===null||l===void 0)&&l.utm_term)||((u=e.conditions)===null||u===void 0||(u=u.utm)===null||u===void 0?void 0:u.utm_term)==o.utm_term;return g&&d&&p&&h}return!1}static Zf(e,...n){ui.info(`[WebExperiments] ${e}`,n)}Xf(e,n,o){this._is_bot()?sx.Zf(tYt):n!=="control"?o.forEach(i=>{if(i.selector){var r;sx.Zf(`applying transform of variant ${n} for experiment ${e} `,i);const s=(r=document)===null||r===void 0?void 0:r.querySelectorAll(i.selector);s?.forEach(a=>{const A=a;i.html&&(A.innerHTML=i.html),i.css&&A.setAttribute("style",i.css)})}}):sx.Zf("Control variants leave the page unmodified.")}_is_bot(){return tf&&this._instance?xGt(tf,this.Mr.custom_blocked_useragents):void 0}}},Uge),KYo={conversations:class{constructor(t){this._instance=t,this.sp=void 0,this._conversationsManager=null,this.rp=!1,this.ne=null,this.op=!1}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(this._instance.config.disable_conversations||(this.ap=t.ok,!t.ok))return;const e=t.config.conversations;Hs(e)||($y(e)?this.sp=e:(this.sp=e.enabled,this.ne=e),this.loadIfEnabled())}reset(){var t;(t=this._conversationsManager)===null||t===void 0||t.reset(),this._conversationsManager=null,this.sp=void 0,this.ne=null,this.ap=void 0,this.op=!1}loadIfEnabled(){if(this._conversationsManager||this.rp||this._instance.config.disable_conversations||_Ne(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())return;const t=Vr?.__PosthogExtensions__;if(t&&!Eo(this.sp)&&this.sp)if(this.ne&&this.ne.token){this.rp=!0;try{const e=t.initConversations;if(e)return this.lp(e),void(this.rp=!1);const n=t.loadExternalDependency;if(!n)return void this.up(hNe);n(this._instance,"conversations",o=>{o||!t.initConversations?this.up("Could not load conversations script",o):this.lp(t.initConversations),this.rp=!1})}catch(e){this.up("Error initializing conversations",e),this.rp=!1}}else A4.error("Conversations enabled but missing token in remote config.")}lp(t){if(this.ne)try{this._conversationsManager=t(this.ne,this._instance),this.op=!1,A4.info("Conversations loaded successfully")}catch(e){this.up("Error completing conversations initialization",e)}else A4.error("Cannot complete initialization: remote config is null")}up(t,e){A4.error(t,e),this._conversationsManager=null,this.rp=!1,this.op=!0}show(){this._conversationsManager?this._conversationsManager.show():A4.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.sp===!0&&!Id(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?"disabled_by_config":_Ne(this._instance.config)?"disabled_for_toolbar":this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?"consent_opted_out":this.ap===!1?"remote_config_failed":Eo(this.sp)?this.ap?"disabled_in_project":"remote_config_pending":this.sp?Hs(this.ne)||!this.ne.token?"missing_token":Vr?.__PosthogExtensions__?this.rp?"initializing":this.op?"load_failed":"not_loaded":"extensions_unavailable":"disabled_in_project"}isVisible(){var t,e;return(t=(e=this._conversationsManager)===null||e===void 0?void 0:e.isVisible())!==null&&t!==void 0&&t}sendMessage(t,e,n){var o=this;return Zu(function*(){return o._conversationsManager?o._conversationsManager.sendMessage(t,e,n):(A4.warn(vR),null)})()}getMessages(t,e){var n=this;return Zu(function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(A4.warn(vR),null)})()}markAsRead(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(A4.warn(vR),null)})()}getTickets(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(A4.warn(vR),null)})()}requestRestoreLink(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(A4.warn(vR),null)})()}restoreFromToken(t){var e=this;return Zu(function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(A4.warn(vR),null)})()}restoreFromUrlToken(){var t=this;return Zu(function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(A4.warn(vR),null)})()}getCurrentTicketId(){var t,e;return(t=(e=this._conversationsManager)===null||e===void 0?void 0:e.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,e;return(t=(e=this._conversationsManager)===null||e===void 0?void 0:e.getWidgetSessionId())!==null&&t!==void 0?t:null}$h(){var t;(t=this._conversationsManager)===null||t===void 0||t.setIdentity()}Ch(){var t;(t=this._conversationsManager)===null||t===void 0||t.clearIdentity()}}},VYo={logs:class{constructor(t){var e;this._instance=t,this.name="logs",this.hp=!1,this.cp=!1,this.dp=!1,this.A=Cd("[logs]"),this.vp=sn(sn({},this.A),{},{error:(...n)=>{n.some(rYt)||this.A.error(...n)}}),this.ol=[],this.fp=[],this.kd=0,this.To=!1,this.pp=[],this.gp=[],this.mp=!1,this.yp=!1,this.bp=()=>{var n,o;this.To||(this.kd=0,(n=this._p)===null||n===void 0||n.onReconnect(),(o=this.wp)===null||o===void 0||o.onReconnect())},this._instance&&(!((e=this._instance.config.logs)===null||e===void 0)&&e.captureConsoleLogs)&&(this.hp=!0),Fn&&el(Fn,"online",this.bp)}kp(t,e,n,o){var i;const r=nYt((i=this._instance)===null||i===void 0||(i=i.config)===null||i===void 0?void 0:i.logs,n);return[new vOo(this.Sp(t,e),r,this.vp,()=>this.xp(),s=>s(),void 0,o),r]}$p(){var t;const e=(t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.logs;var n;return this._p&&this.Cp===e||((n=this._p)===null||n===void 0||n.reset(),this.Cp=e,[this._p,this.Tp]=this.kp(()=>this.ol,o=>{this.ol=o})),this._p}Ip(){var t;const e=(t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.logs;var n;return this.wp&&this.Mp===e||((n=this.wp)===null||n===void 0||n.reset(),this.Mp=e,[this.wp,this.Ep]=this.kp(()=>this.fp,o=>{this.fp=o},{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},oYt)),this.wp}setup(t){var e;if(this.To)return;this.bo=t,!((e=this._instance)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.logs)===null||e===void 0)&&e.captureConsoleLogs&&(this.hp=!0),(this.hp||this.Pp()&&this.Rp())&&this.Ap();let n=!1;const o=t.onRemoteConfig(i=>{var r;n=i.ok&&((r=i.config.logs)===null||r===void 0?void 0:r.captureConsoleLogs)===!0,this.onRemoteConfig(i)});this.To?o.dispose():(this.Eo=o,n||this.loadIfEnabled())}dispose(){var t,e,n,o;this.To||(this.To=!0,this.Op(),(t=this.Eo)===null||t===void 0||t.dispose(),this.Eo=void 0,this.bo=void 0,this.dp=!1,Fn?.removeEventListener("online",this.bp),(e=this.Fp)===null||e===void 0||e.call(this),this.Fp=void 0,(n=this._p)===null||n===void 0||n.reset(),(o=this.wp)===null||o===void 0||o.reset())}onRemoteConfig(t){var e,n;if(this.To)return;const o=t.ok?(e=t.config.logs)===null||e===void 0?void 0:e.captureConsoleLogs:void 0;Hs(o)?this.Dp():((n=this._instance)===null||n===void 0||(n=n.persistence)===null||n===void 0||n.register({$logs_capture_enabled_server_side:!!o}),o?(this.hp=!0,this.cp||this.Ap(),this.loadIfEnabled()):this.Dp())}reset(){var t,e,n,o;this.Op(),(t=this._p)===null||t===void 0||t.clearQueue(),this.ol=[],(e=this._p)===null||e===void 0||e.reset(),(n=this.wp)===null||n===void 0||n.clearQueue(),this.fp=[],(o=this.wp)===null||o===void 0||o.reset(),this.kd=0}captureLog(t){this.To||this.$p().captureLog(t)}captureConsoleLog(t){this.To||this.Ip().captureLog(t)}captureBufferedConsoleLog(t,e,n){this.To||this.Ip().captureLog(t,{context:e,occurredAtMs:n})}Rp(){var t;return!!(!((t=this._instance)===null||t===void 0||(t=t.persistence)===null||t===void 0||(t=t.props)===null||t===void 0)&&t[LHt])}Pp(){var t,e,n;return!(!((t=this._instance)===null||t===void 0||(e=t.il)===null||e===void 0)&&e.call(t))||!!(!((n=Vr._POSTHOG_REMOTE_CONFIG)===null||n===void 0||(n=n[this._instance.config.token])===null||n===void 0)&&n.config)}Ih(){var t;this.Op(),(t=this.wp)===null||t===void 0||t.clearQueue(),this.fp=[]}Dp(){this.hp||this.Op()}Ap(){var t;if(this.mp||!Vr?.console)return;const e=nYt((t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.logs).maxBufferSize;let n=!0;this.gp.push(()=>{n=!1});for(const o of wYo){let i;try{i=PYo(Vr.console[o])}catch{continue}i&&this.gp.push(lq(Vr.console,o,r=>{const s=(...a)=>{try{n&&this.Lp(o,a,e)}catch{}return r.apply(Vr.console,a)};return s.__rrweb_original__=i,s}))}this.mp=!0,this.Np=setTimeout(()=>{this.Op()},3e4)}Lp(t,e,n){var o;if(this.mp&&!this.yp&&e.length!==0)if(!((o=this._instance)===null||o===void 0)&&o.is_capturing()){if(n>this.pp.length){this.yp=!0;try{this.pp.push({level:t,args:e,occurredAtMs:Date.now(),context:this.xp()})}finally{this.yp=!1}}}else this.Op()}Op(){if(this.pp=[],this.mp){this.mp=!1,this.Np&&(clearTimeout(this.Np),this.Np=void 0);for(const t of this.gp)t();this.gp=[]}}qp(){const t=this.pp;return this.Op(),t}get logger(){return this.jp||(this.jp={trace:(t,e)=>this.captureLog({body:t,level:"trace",attributes:e}),debug:(t,e)=>this.captureLog({body:t,level:"debug",attributes:e}),info:(t,e)=>this.captureLog({body:t,level:"info",attributes:e}),warn:(t,e)=>this.captureLog({body:t,level:"warn",attributes:e}),error:(t,e)=>this.captureLog({body:t,level:"error",attributes:e}),fatal:(t,e)=>this.captureLog({body:t,level:"fatal",attributes:e})}),this.jp}flushLogs(t){t?this.Bp(t):(this._p&&this._p.flush().catch(e=>this.Hp(e)),this.wp&&this.wp.flush().catch(e=>this.Hp(e)))}Hp(t){rYt(t)||this.A.error("PostHog logs flush failed:",t)}loadIfEnabled(){if(this.To||!this.hp||this.cp||this.dp)return;const t=Vr?.__PosthogExtensions__;if(!t)return this.A.error("PostHog Extensions not found."),void this.Op();const e=t.loadExternalDependency;if(!e)return this.A.error(hNe),void this.Op();this.dp=!0;try{e(this._instance,"logs",n=>{if(this.dp=!1,this.To||!this.hp)return;const o=t.logs;if(n||!o?.initializeLogs)this.A.error("Could not load logs script",n),this.Op();else{var i;const a=this.qp();var r,s;this.Fp=o.initializeLogs((i=this.bo)!==null&&i!==void 0?i:this._instance),this.cp=!0,a.length>0&&((r=o.replayConsoleBuffer)===null||r===void 0||r.call(o,(s=this.bo)!==null&&s!==void 0?s:this._instance,a))}})}catch(n){throw this.dp=!1,n}}Sp(t,e){const n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:o=>o===l6.LogsQueue?t():void 0,setPersistedProperty(o,i){var r;o===l6.LogsQueue&&e((r=i)!==null&&r!==void 0?r:[])},js:o=>this.js(o),getLibraryId:()=>n_.LIB_NAME,getLibraryVersion:()=>n_.LIB_VERSION}}js(t){return new Promise(e=>{if(kOt(this.kd,3))return void e({kind:"fatal",error:iRe(void 0,"logs endpoint is unreachable, dropping batch")});let n=!1;const o=r=>{n||(n=!0,clearTimeout(i),e(r))},i=setTimeout(()=>{this.A.warn("Logs request timed out before receiving a response"),o({kind:"retry-later",error:iRe(void 0,"logs request timed out")})},9e4);this._instance._send_request({method:"POST",url:this.zp(),data:t,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:r=>{const s=r.statusCode;if(this.Up(s),s>=200&&300>s)o({kind:"ok"});else if(s===413)o({kind:"too-large"});else if(s!==0&&s!==408&&s!==429&&500>s)o({kind:"fatal",error:new Error(`logs request failed with status ${s}`)});else{var a;s===0?(r.error||this.A.warn("Logs request failed before receiving an HTTP response"),o({kind:"retry-later",error:iRe(r.error,"logs request failed before receiving an HTTP response")})):o({kind:"retry-later",error:(a=r.error)!==null&&a!==void 0?a:new Error(`logs request failed with status ${s}`)})}}})})}Up(t){(t!==0||this._instance.__loaded)&&(this.kd=FOt(t,this.kd,3,()=>this.A.warn("Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes.")))}Bp(t){this.ol.length>0&&this.Wp(t,this.ol,this.Tp,n_.LIB_NAME,e=>{this.ol=e}),this.fp.length>0&&this.Wp(t,this.fp,this.Ep,oYt,e=>{this.fp=e})}Wp(t,e,n,o,i){if(e.length===0)return;const r=e.map(a=>a.record);i([]);const s=SHt(r,bHt(n,n_.LIB_NAME,n_.LIB_VERSION),o,n_.LIB_VERSION);this._instance._send_request({method:"POST",url:this.zp(),data:s,compression:"best-available",batchKey:"logs",transport:t})}zp(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}xp(){var t;const e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){const{sessionId:n,windowId:o,sessionStartTimestamp:i,lastActivityTimestamp:r}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);e.sessionId=n,e.windowId=o,Hs(i)||(e.sessionStartTimestamp=i),Hs(r)||(e.lastActivityTimestamp=r)}if(!(Vr==null||(t=Vr.location)===null||t===void 0)&&t.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?Mw(Vr.location.href):Vr.location.href),this._instance.featureFlags){const n=this._instance.featureFlags.getFlags();n&&n.length>0&&(e.activeFeatureFlags=n)}return e}}},zYo={metrics:class{constructor(t){this._instance=t,this.A=Cd("[metrics]"),this.To=!1}initialize(){this.onConfigChange()}onConfigChange(){var t;if(this.To)return;const e=!!(!((t=this._instance.config.metrics)===null||t===void 0)&&t.network);e&&!this.Vp?this.Vp=(n=>{let o=!0;const i=()=>o?(a=>{var A;const c=(A=a.config.metrics)===null||A===void 0?void 0:A.network;return c===!0?{}:c||void 0})(n):void 0,r=NYo(n,i),s=RYo(n,i);return()=>{o=!1,r(),s()}})(this._instance):!e&&this.Vp&&(this.Vp(),this.Vp=void 0)}$p(){var t;const e=(t=this._instance)===null||t===void 0||(t=t.config)===null||t===void 0?void 0:t.metrics;var n;return this._p&&this.Cp===e||((n=this._p)===null||n===void 0||n.reset(),this.Cp=e,this._p=new wOo(this.Sp(),(function(o){var i,r,s,a,A;const c=o?.resourceAttributes;return{serviceName:(i=c?.["service.name"])!==null&&i!==void 0?i:o?.serviceName,serviceVersion:(r=c?.["service.version"])!==null&&r!==void 0?r:o?.serviceVersion,environment:(s=c?.["deployment.environment"])!==null&&s!==void 0?s:o?.environment,resourceAttributes:c,beforeSend:o?.beforeSend,flushIntervalMs:(a=o?.flushIntervalMs)!==null&&a!==void 0?a:1e4,maxSeriesPerFlush:(A=o?.maxSeriesPerFlush)!==null&&A!==void 0?A:1e3}})(e),this.A)),this._p}count(t,e=1,n){this.$p().count(t,e,n)}gauge(t,e,n){this.$p().gauge(t,e,n)}histogram(t,e,n){this.$p().histogram(t,e,n)}flush(t){if(!this._p)return Promise.resolve();if(t){const e=this._p.drainWindow();return e&&this.Ys(e,t),Promise.resolve()}return this._p.flush().catch(e=>this.A.error("PostHog metrics flush failed:",e))}reset(){var t;(t=this._p)===null||t===void 0||t.reset()}dispose(){var t,e;this.To=!0,(t=this.Vp)===null||t===void 0||t.call(this),this.Vp=void 0,(e=this._p)===null||e===void 0||e.reset()}Sp(){const t=this._instance,e=this;return{get isDisabled(){return!1},get optedOut(){return!t.is_capturing()},Ys:n=>e.Ys(n),getLibraryId:()=>n_.LIB_NAME,getLibraryVersion:()=>n_.LIB_VERSION}}Ys(t,e){return new Promise(n=>{let o=!1;const i=s=>{o||(o=!0,clearTimeout(r),n(s))},r=setTimeout(()=>i({kind:"retry-later",error:new Error("metrics request timed out")}),9e4);this._instance._send_request(sn(sn({method:"POST",url:this.Gp(),data:t,compression:"best-available",batchKey:"metrics"},e&&{transport:e}),{},{fireCallbackOnDrop:!0,callback(s){const a=s.statusCode;if(a>=200&&300>a)i({kind:"ok"});else if(a===413)i({kind:"too-large"});else if(a!==0&&a!==408&&a!==429&&500>a)i({kind:"fatal",error:new Error(`metrics request failed with status ${a}`)});else{var A;i({kind:"retry-later",error:(A=s.error)!==null&&A!==void 0?A:new Error(`metrics request failed with status ${a}`)})}}}))})}Gp(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}};Aq.__defaultExtensionClasses=sn({},sn(sn(sn(sn(sn(sn(sn(sn(sn(sn(sn(sn(sn({},Uge),TYo),kYo),FYo),LYo),HYo),GYo),OYo),YYo),UYo),KYo),VYo),zYo));var dG=(function(){n_.SDK_DIST_CHANNEL="npm";const t=rq[aq]=new Aq;return(function(){function e(){e.done||(e.done=!0,_Gt=!1,kl(rq,function(n){n._dom_loaded()}))}No?.addEventListener?No.readyState==="complete"?e():el(No,"DOMContentLoaded",e,{capture:!1}):Fn&&ui.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),t})();class Wb extends Error{response;request;options;constructor(e,n,o){const i=e.status||e.status===0?e.status:"",r=e.statusText??"",s=`${i} ${r}`.trim(),a=s?`status code ${s}`:"an unknown error";super(`Request failed with ${a}: ${n.method} ${n.url}`),this.name="HTTPError",this.response=e,this.request=n,this.options=o}}class AYt extends Error{name="NonError";value;constructor(e){let n="Non-error value was thrown";try{typeof e=="string"?n=e:e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"&&(n=e.message)}catch{}super(n),this.value=e}}class aRe extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const n=e?.cause?e.cause instanceof Error?e.cause:new AYt(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",n?{cause:n}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}const cYt=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",o=typeof globalThis.Request=="function";if(n&&o)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return t&&!e})(),JYo=typeof globalThis.AbortController=="function",lYt=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",WYo=typeof globalThis.ReadableStream=="function",jYo=typeof globalThis.FormData=="function",uYt=["get","post","put","patch","head","delete"],$Yo={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},ARe=2147483647,qYo=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,gYt=Symbol("stop");class dYt{options;constructor(e){this.options=e}}const XYo=t=>new dYt(t),ZYo={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},eUo={next:!0},tUo={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},nUo=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,o]of t)e+=qYo,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,e+=typeof o=="string"?new TextEncoder().encode(o).length:o.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},hYt=(t,e,n)=>{let o,i=0;return t.pipeThrough(new TransformStream({transform(r,s){if(s.enqueue(r),o){i+=o.byteLength;let a=e===0?0:i/e;a>=1&&(a=1-Number.EPSILON),n?.({percent:a,totalBytes:Math.max(e,i),transferredBytes:i},o)}o=r},flush(){o&&(i+=o.byteLength,n?.({percent:1,totalBytes:Math.max(e,i),transferredBytes:i},o))}}))},oUo=(t,e)=>{if(!t.body)return t;if(t.status===204)return new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers});const n=Math.max(0,Number(t.headers.get("content-length"))||0);return new Response(hYt(t.body,n,e),{status:t.status,statusText:t.statusText,headers:t.headers})},iUo=(t,e,n)=>{if(!t.body)return t;const o=nUo(n??t.body);return new Request(t,{duplex:"half",body:hYt(t.body,o,e)})},wR=t=>t!==null&&typeof t=="object",Kge=(...t)=>{for(const e of t)if((!wR(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return cRe({},...t)},pYt=(t={},e={})=>{const n=new globalThis.Headers(t),o=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[r,s]of i.entries())o&&s==="undefined"||s===void 0?n.delete(r):n.set(r,s);return n};function Vge(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:cRe(t[n]??[],e[n]??[])}const mYt=(t={},e={})=>({beforeRequest:Vge(t,e,"beforeRequest"),beforeRetry:Vge(t,e,"beforeRetry"),afterResponse:Vge(t,e,"afterResponse"),beforeError:Vge(t,e,"beforeError")}),rUo=(t,e)=>{const n=new URLSearchParams;for(const o of[t,e])if(o!==void 0)if(o instanceof URLSearchParams)for(const[i,r]of o.entries())n.append(i,r);else if(Array.isArray(o))for(const i of o){if(!Array.isArray(i)||i.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(i[0]),String(i[1]))}else if(wR(o))for(const[i,r]of Object.entries(o))r!==void 0&&n.append(i,String(r));else{const i=new URLSearchParams(o);for(const[r,s]of i.entries())n.append(r,s)}return n},cRe=(...t)=>{let e={},n={},o={},i;const r=[];for(const s of t)if(Array.isArray(s))Array.isArray(e)||(e=[]),e=[...e,...s];else if(wR(s)){for(let[a,A]of Object.entries(s)){if(a==="signal"&&A instanceof globalThis.AbortSignal){r.push(A);continue}if(a==="context"){if(A!=null&&(!wR(A)||Array.isArray(A)))throw new TypeError("The `context` option must be an object");e={...e,context:A==null?{}:{...e.context,...A}};continue}if(a==="searchParams"){A==null?i=void 0:i=i===void 0?A:rUo(i,A);continue}wR(A)&&a in e&&(A=cRe(e[a],A)),e={...e,[a]:A}}wR(s.hooks)&&(o=mYt(o,s.hooks),e.hooks=o),wR(s.headers)&&(n=pYt(n,s.headers),e.headers=n)}return i!==void 0&&(e.searchParams=i),r.length>0&&(r.length===1?e.signal=r[0]:lYt?e.signal=AbortSignal.any(r):e.signal=r.at(-1)),e},sUo=t=>uYt.includes(t)?t.toUpperCase():t,_Yt={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3,jitter:void 0,retryOnTimeout:!1},aUo=(t={})=>{if(typeof t=="number")return{..._Yt,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.methods&&=t.methods.map(n=>n.toLowerCase()),t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");const e=Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0));return{..._Yt,...e}};class lRe extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}async function AUo(t,e,n,o){return new Promise((i,r)=>{const s=setTimeout(()=>{n&&n.abort(),r(new lRe(t))},o.timeout);o.fetch(t,e).then(i).catch(r).then(()=>{clearTimeout(s)})})}async function cUo(t,{signal:e}){return new Promise((n,o)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(r),o(e.reason)}const r=setTimeout(()=>{e?.removeEventListener("abort",i),n()},t)})}const lUo=(t,e)=>{const n={};for(const o in e)Object.hasOwn(e,o)&&!(o in tUo)&&!(o in ZYo)&&(!(o in t)||o in eUo)&&(n[o]=e[o]);return n},uUo=t=>t===void 0?!1:Array.isArray(t)?t.length>0:t instanceof URLSearchParams?t.size>0:typeof t=="object"?Object.keys(t).length>0:typeof t=="string"?t.trim().length>0:!!t;function gUo(t){return t instanceof Wb||t?.name===Wb.name}function dUo(t){return t instanceof lRe||t?.name===lRe.name}let fYt=class Bit{static create(e,n){const o=new Bit(e,n),i=async()=>{if(typeof o.#e.timeout=="number"&&o.#e.timeout>ARe)throw new RangeError(`The \`timeout\` option cannot be greater than ${ARe}`);await Promise.resolve();let s=await o.#_();for(const a of o.#e.hooks.afterResponse){const A=o.#g(s.clone());let c;try{c=await a(o.request,o.#u(),A,{retryCount:o.#i})}catch(u){throw o.#A(A),o.#A(s),u}if(c instanceof dYt)throw o.#A(A),o.#A(s),new aRe(c.options);const l=c instanceof globalThis.Response?c:s;A!==l&&o.#A(A),s!==l&&o.#A(s),s=l}if(o.#g(s),!s.ok&&(typeof o.#e.throwHttpErrors=="function"?o.#e.throwHttpErrors(s.status):o.#e.throwHttpErrors)){let a=new Wb(s,o.request,o.#u());for(const A of o.#e.hooks.beforeError)a=await A(a,{retryCount:o.#i});throw a}if(o.#e.onDownloadProgress){if(typeof o.#e.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!WYo)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const a=s.clone();return o.#A(s),oUo(a,o.#e.onDownloadProgress)}return s},r=o.#m(i).finally(()=>{const s=o.#s;o.#d(s?.body??void 0),o.#d(o.request.body??void 0)});for(const[s,a]of Object.entries($Yo))s==="bytes"&&typeof globalThis.Response?.prototype?.bytes!="function"||(r[s]=async()=>{o.request.headers.set("accept",o.request.headers.get("accept")||a);const A=await r;if(s==="json"){if(A.status===204)return"";const c=await A.text();return c===""?"":n.parseJson?n.parseJson(c):JSON.parse(c)}return A[s]()});return r}static#o(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0)):e}request;#n;#i=0;#t;#e;#s;#r;#c;constructor(e,n={}){if(this.#t=e,this.#e={...n,headers:pYt(this.#t.headers,n.headers),hooks:mYt({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:sUo(n.method??this.#t.method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:aUo(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}},typeof this.#t!="string"&&!(this.#t instanceof URL||this.#t instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#e.prefixUrl&&typeof this.#t=="string"){if(this.#t.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#e.prefixUrl.endsWith("/")||(this.#e.prefixUrl+="/"),this.#t=this.#e.prefixUrl+this.#t}JYo&&lYt&&(this.#r=this.#e.signal??this.#t.signal,this.#n=new globalThis.AbortController,this.#e.signal=this.#r?AbortSignal.any([this.#r,this.#n.signal]):this.#n.signal),cYt&&(this.#e.duplex="half"),this.#e.json!==void 0&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));const o=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(this.#t instanceof globalThis.Request&&(jYo&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!o&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#t,this.#e),uUo(this.#e.searchParams)){const r="?"+(typeof this.#e.searchParams=="string"?this.#e.searchParams.replace(/^\?/,""):new URLSearchParams(Bit.#o(this.#e.searchParams)).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,r);this.request=new globalThis.Request(s,this.#e)}if(this.#e.onUploadProgress){if(typeof this.#e.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!cYt)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#p(this.request,this.#e.body??void 0)}}#a(){const e=this.#e.retry.delay(this.#i);let n=e;this.#e.retry.jitter===!0?n=Math.random()*e:typeof this.#e.retry.jitter=="function"&&(n=this.#e.retry.jitter(e),(!Number.isFinite(n)||n<0)&&(n=e));const o=this.#e.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(o,n)}async#l(e){if(this.#i++,this.#i>this.#e.retry.limit)throw e;const n=e instanceof Error?e:new AYt(e);if(n instanceof aRe)return n.customDelay??this.#a();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(this.#e.retry.shouldRetry!==void 0){const o=await this.#e.retry.shouldRetry({error:n,retryCount:this.#i});if(o===!1)throw e;if(o===!0)return this.#a()}if(dUo(e)&&!this.#e.retry.retryOnTimeout)throw e;if(gUo(e)){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;const o=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(o&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let i=Number(o)*1e3;Number.isNaN(i)?i=Date.parse(o)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const r=this.#e.retry.maxRetryAfter??i;return i<r?i:r}if(e.response.status===413)throw e}return this.#a()}#g(e){return this.#e.parseJson&&(e.json=async()=>this.#e.parseJson(await e.text())),e}#d(e){e&&e.cancel().catch(()=>{})}#A(e){this.#d(e.body??void 0)}async#m(e){try{return await e()}catch(n){const o=Math.min(await this.#l(n),ARe);if(this.#i<1)throw n;if(await cUo(o,this.#r?{signal:this.#r}:{}),n instanceof aRe&&n.customRequest){const i=this.#e.signal?new globalThis.Request(n.customRequest,{signal:this.#e.signal}):new globalThis.Request(n.customRequest);this.#h(i)}for(const i of this.#e.hooks.beforeRetry){const r=await i({request:this.request,options:this.#u(),error:n,retryCount:this.#i});if(r instanceof globalThis.Request){this.#h(r);break}if(r instanceof globalThis.Response)return r;if(r===gYt)return}return this.#m(e)}}async#_(){this.#n?.signal.aborted&&(this.#n=new globalThis.AbortController,this.#e.signal=this.#r?AbortSignal.any([this.#r,this.#n.signal]):this.#n.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal}));for(const n of this.#e.hooks.beforeRequest){const o=await n(this.request,this.#u(),{retryCount:this.#i});if(o instanceof Response)return o;if(o instanceof globalThis.Request){this.#h(o);break}}const e=lUo(this.request,this.#e);return this.#s=this.request,this.request=this.#s.clone(),this.#e.timeout===!1?this.#e.fetch(this.#s,e):AUo(this.#s,e,this.#n,this.#e)}#u(){if(!this.#c){const{hooks:e,...n}=this.#e;this.#c=Object.freeze(n)}return this.#c}#h(e){this.#c=void 0,this.request=this.#p(e)}#p(e,n){return!this.#e.onUploadProgress||!e.body?e:iUo(e,this.#e.onUploadProgress,n??this.#e.body??void 0)}};const uRe=t=>{const e=(n,o)=>fYt.create(n,Kge(t,o));for(const n of uYt)e[n]=(o,i)=>fYt.create(o,Kge(t,i,{method:n}));return e.create=n=>uRe(Kge(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),uRe(Kge(t,n))),e.stop=gYt,e.retry=XYo,e},hUo=uRe();class pUo extends Wb{constructor(e,n,o,i){super(e,n,o),this.name="RegistryHTTPError",this.message=i}}function uq(t){return typeof window<"u"?window[t]:null}function Hw(){const t=uq("TSCIRCUIT_REGISTRY_API_BASE_URL")||void 0||"https://registry-api.tscircuit.com",e=uq("TSCIRCUIT_REGISTRY_TOKEN");return hUo.create({prefixUrl:t,headers:{Authorization:`Bearer ${e}`},timeout:3e4,hooks:{afterResponse:[async(n,o,i)=>{if(i.ok)return i;let r=null;try{r=await i.clone().json()}catch(u){console.error("Failed to parse registry error response",u)}const s=r?.error?.message??r?.error?.error_message??r?.message,a=r?.error?.error_code??r?.error_code,A=new URL(i.url),l=[`Registry request failed for ${`${A.pathname}${A.search}`} (${i.status})`];throw s&&l.push(`Server message: ${s}`),a&&l.push(`Error code: ${a}`),new pUo(i,n,o,l.join(" | "))}]}})}function zge(){return!!uq("TSCIRCUIT_REGISTRY_TOKEN")}const gq={get:(t,e)=>Hw().get(t,e),post:(t,e)=>Hw().post(t,e),put:(t,e)=>Hw().put(t,e),delete:(t,e)=>Hw().delete(t,e),patch:(t,e)=>Hw().patch(t,e)},mUo="phc_htd8AQjSfVEsFCLQMAiUooG4Q0DKBCjqYuQglc9V3Wo",_Uo="https://postpig.tscircuit.com",IYt="runframe:anonymous-id",gRe=()=>typeof window<"u",CYt=t=>t.includes("localhost")||t.includes("127.0.0.1"),fUo=t=>{try{return new URL(t).hostname}catch{return null}},IUo=()=>{if(!gRe())return null;let t=null;return document.referrer&&(t=fUo(document.referrer)),t??window.location.hostname},CUo=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,yUo=()=>{if(!gRe())return null;try{const t=window.localStorage.getItem(IYt);if(t)return t;const e=CUo();return window.localStorage.setItem(IYt,e),e}catch{return null}},xUo=()=>uq("TSCIRCUIT_USE_RUNFRAME_FOR_CLI")===!0,yYt=()=>!gRe()||CYt(window.location.hostname)&&!xUo()?!1:(dG.__loaded||dG.init(mUo,{api_host:_Uo,person_profiles:"always"}),!0),EUo=()=>{if(!yYt())return null;const t=IUo(),e=t!=null&&!CYt(t);let n=null;e||(n=yUo());let o,i;return e?(o=`domain:${t}`,i="domain"):(o=void 0,n&&(o=`anonymous:${n}`),i="anonymous_id"),{embedDomain:t,anonymousId:n,distinctId:o,identityType:i}},BUo=(t,{source:e,...n})=>{const o=EUo();if(!o)return;const{embedDomain:i,anonymousId:r,distinctId:s,identityType:a}=o;if(s){const A={};a==="domain"&&i&&(A.embed_domain=i),a==="anonymous_id"&&r&&(A.runframe_anonymous_id=r),dG.identify(s,A)}dG.capture(t,{...n,source:e,embed_domain:i,runframe_anonymous_id:r,identity_type:a})},bUo=t=>{BUo("runframe_activity",t)};yYt();function SUo(t){const e=String.fromCodePoint(...t);return btoa(e)}function QUo(t,e){const n=JSON.stringify(t),o=RQe(TQe(n));return`https://tscircuit.com/editor?#data:application/gzip;base64,${SUo(o)}`}function Oi(...t){return BHo(NB(t))}const xYt=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),dRe=JLo,Jge=ee.forwardRef(({className:t,...e},n)=>K.jsx(tLt,{ref:n,className:Oi("rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",t),...e}));Jge.displayName=tLt.displayName;const p6=ee.forwardRef(({className:t,...e},n)=>K.jsx(nLt,{ref:n,className:Oi("rf-inline-flex rf-items-center rf-justify-center rf-whitespace-nowrap rf-rounded-md rf-px-3 rf-py-1 rf-text-sm rf-font-medium rf-ring-offset-white rf-transition-all focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 disabled:rf-pointer-events-none disabled:rf-opacity-50 data-[state=active]:rf-bg-white data-[state=active]:rf-text-zinc-950 data-[state=active]:rf-shadow dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=active]:rf-bg-zinc-950 dark:data-[state=active]:rf-text-zinc-50",t),...e}));p6.displayName=nLt.displayName;const cI=ee.forwardRef(({className:t,...e},n)=>K.jsx(oLt,{ref:n,className:Oi("rf-h-full rf-mt-2 rf-ring-offset-white focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-950 focus-visible:rf-ring-offset-2 dark:rf-ring-offset-zinc-950 dark:focus-visible:rf-ring-zinc-300",t),...e}));cI.displayName=oLt.displayName;const EYt="T1RUTwAJAIAAAwAQQ0ZGIFhQSpcAAAcwAABJ3U9TLzJqmmVhAAABAAAAAGBjbWFwFN0WswAABEwAAALEaGVhZC1P1HwAAACcAAAANmhoZWEDrgI1AAAA1AAAACRobXR44xAAAAAAURAAAAFQbWF4cABUUAAAAAD4AAAABm5hbWUZQ94BAAABYAAAAutwb3N0AAMAAAAABxAAAAAgAAEAAAABAADb+Z65Xw889QADA+gAAAAA5e9IsgAAAADl70iy/9P/PwKHAvkAAAADAAIAAAAAAAAAAQAAA6z/LAAAArQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAFQAAFAAAFQAAAADArQB9AAFAAACigK7AAAAjAKKArsAAAHfADEBAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAABYWFhYAEAAIQB6A6z/LAAAAvkAwQAAAAEAAAAAAiwC1wAAAAAAAAAAACIBngABAAAAAAAAAAEAWQABAAAAAAABABEAAAABAAAAAAACAAcAMwABAAAAAAADABsA/AABAAAAAAAEABkASAABAAAAAAAFAAsA2wABAAAAAAAGABgAkwABAAAAAAAHAAEAWQABAAAAAAAIAAEAWQABAAAAAAAJAAEAWQABAAAAAAAKAAEAWQABAAAAAAALAAEAWQABAAAAAAAMAAEAWQABAAAAAAANAAEAW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/^matrix\(\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*,\s*([0-9_+-.e]+)\s*\)$/i;function wUo(t){const e=t.match(vUo);if(e===null||e.length<7)throw new Error(`'${t}' is not a matrix`);return{a:parseFloat(e[1]),b:parseFloat(e[2]),c:parseFloat(e[3]),d:parseFloat(e[4]),e:parseFloat(e[5]),f:parseFloat(e[6])}}function PUo(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function dq(t){return typeof t>"u"}function of(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function hq(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return hq(r,...i)}}}function m0(...t){return hq(...t)}const{cos:MUo,sin:DUo}=Math;function jb(t,e,n){const o=MUo(t),i=DUo(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return dq(e)||dq(n)?r:hq([of(e,n),r,of(-e,-n)])}function kx(t,e=void 0,n=void 0,o=void 0){dq(e)&&(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return dq(n)||dq(o)?i:hq([of(n,o),i,of(-n,-o)])}function NUo(t){return $b(t)}function $b(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function RUo(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function TUo(t,e){const n=t[0].x!=null?t[0].x:t[0][0],o=t[0].y!=null?t[0].y:t[0][1],i=e[0].x!=null?e[0].x:e[0][0],r=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],A=e[1].x!=null?e[1].x:e[1][0],c=e[1].y!=null?e[1].y:e[1][1],l=t[2].x!=null?t[2].x:t[2][0],u=t[2].y!=null?t[2].y:t[2][1],g=e[2].x!=null?e[2].x:e[2][0],h=e[2].y!=null?e[2].y:e[2][1],d={a:n-l,b:o-u,c:s-l,d:a-u,e:l,f:u},p={a:i-g,b:r-h,c:A-g,d:c-h,e:g,f:h},m=PUo(d),_=hq([p,m]);return RUo(_)}function kUo(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Wge(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,Wge.prototype),i.expected=e,i.found=n,i.location=o,i.name="SyntaxError",i}kUo(Wge,Error);function hRe(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Wge.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,r=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+r.line+":"+r.column;if(n){var a=this.location.end,A=hRe("",r.line.toString().length," "),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`
 --> `+s+`
`+A+` |
`+r.line+" | "+c+`
`+A+" | "+hRe("",i.column-1," ")+hRe("",u,"^")}else e+=`
 at `+s}return e},Wge.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+"-"+r(u[1]):r(u)});return"["+(c.inverted?"^":"")+l.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function r(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length>0){for(u=1,g=1;u<l.length;u++)l[u-1]!==l[u]&&(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function A(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(t)+" but "+A(e)+" found."};var pq="TscircuitAlphabet",BYt="data-tscircuit-alphabet-font";function Ow(t){const e=o=>({...o,children:(o.children??[]).filter(i=>!(BYt in(i.attributes??{}))).map(e)}),n=e(t);return n.children.push({name:"style",type:"element",value:"",attributes:{[BYt]:"",type:"text/css"},children:[{name:"",type:"text",value:`@font-face { font-family: '${pq}'; src: url('data:font/ttf;base64,${EYt}') format('truetype'); font-weight: normal; font-style: normal; }`,attributes:{},children:[]}]}),Cbt(n)}function FUo(t,e,n){const{transform:o,shouldDrawErrors:i}=n;if(!i)return[];const{pcb_port_ids:r}=t,s=e.find(g=>g.type==="pcb_port"&&g.pcb_port_id===r?.[0]),a=e.find(g=>g.type==="pcb_port"&&g.pcb_port_id===r?.[1]);if(!s||!a){const h=t.message?.match(/pcb_via\[#?(pcb_via_\d+)\]/)?.[1],d=e.find(p=>p.type==="pcb_via"&&p.pcb_via_id===h);if(d&&d.type==="pcb_via")return LUo(t,d,n);if(t.center){const p=hn(o,{x:t.center.x,y:t.center.y});return pRe([{name:"rect",type:"element",attributes:{x:(p.x-5).toString(),y:(p.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${p.x} ${p.y})`},children:[],value:""},{name:"text",type:"element",attributes:{x:p.x.toString(),y:(p.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:t.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}])}else return[]}const A=hn(o,{x:s.x,y:s.y}),c=hn(o,{x:a.x,y:a.y}),l={x:(A.x+c.x)/2,y:(A.y+c.y)/2};if(isNaN(A.x)||isNaN(A.y)||isNaN(c.x)||isNaN(c.y)||isNaN(l.x)||isNaN(l.y))return[];const u=[{name:"line",type:"element",attributes:{x1:A.x.toString(),y1:A.y.toString(),x2:l.x.toString(),y2:l.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2"},children:[],value:""},{name:"line",type:"element",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:c.x.toString(),y2:c.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2"},children:[],value:""},{name:"rect",type:"element",attributes:{x:(l.x-5).toString(),y:(l.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${l.x} ${l.y})`},children:[],value:""},{name:"text",type:"element",attributes:{x:l.x.toString(),y:(l.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:t.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}];return pRe(u)}function LUo(t,e,n){const{transform:o}=n;if(t.center&&e){const i=hn(o,{x:t.center.x,y:t.center.y}),r=hn(o,{x:e.x,y:e.y}),s=r.x-i.x,a=r.y-i.y,A=Math.sqrt(s*s+a*a),c=Math.atan2(a,s)*180/Math.PI,u=A+10*2,g=20,h=(i.x+r.x)/2,d=(i.y+r.y)/2;return pRe([{name:"rect",type:"element",attributes:{x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),fill:"none",stroke:"red","stroke-width":"1","stroke-dasharray":"3,2",transform:`rotate(${c} ${h} ${d})`},children:[],value:""},{name:"rect",type:"element",attributes:{x:(h-5).toString(),y:(d-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${h} ${d})`},children:[],value:""},{name:"text",type:"element",attributes:{x:h.toString(),y:(d-g/2-5).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:t.message||"Pcb Trace Error",name:"",attributes:{},children:[]}],value:""}])}return[]}function pRe(t){return t.map(e=>({...e,attributes:{...e.attributes??{},"data-type":e.attributes?.["data-type"]??"pcb_trace_error","data-pcb-layer":e.attributes?.["data-pcb-layer"]??"overlay"},children:(e.children??[]).map(n=>n?.type==="element"?{...n,attributes:{...n.attributes??{},"data-type":n.attributes?.["data-type"]??"pcb_trace_error","data-pcb-layer":n.attributes?.["data-pcb-layer"]??"overlay"}}:n)}))}function HUo(t){return t.map(e=>({...e,attributes:{...e.attributes??{},"data-type":e.attributes?.["data-type"]??"pcb_footprint_overlap_error","data-pcb-layer":e.attributes?.["data-pcb-layer"]??"overlay"},children:(e.children??[]).map(n=>n?.type==="element"?{...n,attributes:{...n.attributes??{},"data-type":n.attributes?.["data-type"]??"pcb_footprint_overlap_error","data-pcb-layer":n.attributes?.["data-pcb-layer"]??"overlay"}}:n)}))}function OUo(t,e,n){const{transform:o,shouldDrawErrors:i}=n;if(!i)return[];const r=[],s=[];let a=[];if(t.pcb_smtpad_ids)for(const l of t.pcb_smtpad_ids){const u=e.find(g=>g.type==="pcb_smtpad"&&g.pcb_smtpad_id===l);u&&(s.push({x:u.x,y:u.y,type:"pcb_smtpad",id:l,pcb_port_id:u.pcb_port_id}),u.pcb_port_id&&a.push(u.pcb_port_id))}const A=a.length>1&&a.every(l=>l===a[0]);let c=s;if(A&&(c=s.filter(l=>l.type!=="pcb_smtpad")),t.pcb_plated_hole_ids)for(const l of t.pcb_plated_hole_ids){const u=e.find(g=>g.type==="pcb_plated_hole"&&g.pcb_plated_hole_id===l);u&&c.push({x:u.x,y:u.y,type:"pcb_plated_hole",id:l})}if(t.pcb_hole_ids)for(const l of t.pcb_hole_ids){const u=e.find(g=>g.type==="pcb_hole"&&g.pcb_hole_id===l);u&&c.push({x:u.x,y:u.y,type:"pcb_hole",id:l})}if(c.length>0){const l=c.reduce((h,d)=>h+d.x,0)/c.length,u=c.reduce((h,d)=>h+d.y,0)/c.length,g=hn(o,{x:l,y:u});r.push({name:"rect",type:"element",attributes:{x:(g.x-5).toString(),y:(g.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${g.x} ${g.y})`},children:[],value:""}),r.push({name:"text",type:"element",attributes:{x:g.x.toString(),y:(g.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",value:t.message||"PCB Footprint Overlap Error",name:"",attributes:{},children:[]}],value:""});for(const h of c){const d=hn(o,{x:h.x,y:h.y});r.push({name:"rect",type:"element",attributes:{x:(d.x-5).toString(),y:(d.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${d.x} ${d.y})`},children:[],value:""}),c.length>1&&r.push({name:"line",type:"element",attributes:{x1:g.x.toString(),y1:g.y.toString(),x2:d.x.toString(),y2:d.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2"},children:[],value:""})}}return HUo(r)}function GUo(t,e,n){const{transform:o,shouldDrawErrors:i}=n;if(!i)return[];const r=[],s=[];for(const l of t.pcb_component_ids){const u=e.find(g=>g.type==="pcb_component"&&g.pcb_component_id===l);u&&s.push(u.center)}if(s.length===0)return[];const a=s.reduce((l,u)=>l+u.x,0)/s.length,A=s.reduce((l,u)=>l+u.y,0)/s.length,c=hn(o,{x:a,y:A});r.push({name:"rect",type:"element",attributes:{x:(c.x-5).toString(),y:(c.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${c.x} ${c.y})`,"data-type":"pcb_courtyard_overlap_error","data-pcb-layer":"overlay"},children:[],value:""}),r.push({name:"text",type:"element",attributes:{x:c.x.toString(),y:(c.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle","data-type":"pcb_courtyard_overlap_error","data-pcb-layer":"overlay"},children:[{type:"text",value:t.message||"PCB Courtyard Overlap",name:"",attributes:{},children:[]}],value:""});for(const l of s){const u=hn(o,l);r.push({name:"rect",type:"element",attributes:{x:(u.x-5).toString(),y:(u.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${u.x} ${u.y})`,"data-type":"pcb_courtyard_overlap_error","data-pcb-layer":"overlay"},children:[],value:""})}if(s.length===2){const l=s.map(h=>hn(o,h)),u=l[0],g=l[1];r.push({name:"line",type:"element",attributes:{x1:u.x.toString(),y1:u.y.toString(),x2:g.x.toString(),y2:g.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"4,3","data-type":"pcb_courtyard_overlap_error","data-pcb-layer":"overlay"},children:[],value:""})}return r}function YUo(t){return t.map(e=>({...e,attributes:{...e.attributes??{},"data-type":e.attributes?.["data-type"]??"pcb_component_outside_board_error","data-pcb-layer":e.attributes?.["data-pcb-layer"]??"overlay"}}))}function UUo(t,e){const n=t.pcb_component_id;if(!n)return t.component_bounds??null;const o=e.find(i=>i.type==="pcb_component"&&i.pcb_component_id===n);return o?.center&&o?.width&&o?.height?{min_x:o.center.x-o.width/2,max_x:o.center.x+o.width/2,min_y:o.center.y-o.height/2,max_y:o.center.y+o.height/2}:t.component_bounds??null}function KUo(t,e,n){const{shouldDrawErrors:o,transform:i}=n;if(!o)return[];const r=UUo(t,e);if(!r)return[];const s=hn(i,{x:r.min_x,y:r.min_y}),a=hn(i,{x:r.max_x,y:r.max_y}),A=Math.min(s.x,a.x),c=Math.min(s.y,a.y),l=Math.abs(a.x-s.x),u=Math.abs(a.y-s.y),g=A+l/2,h=c+u/2,d=[{type:"element",name:"rect",value:"",attributes:{x:A.toString(),y:c.toString(),width:l.toString(),height:u.toString(),fill:"none",stroke:"red","stroke-width":"1.5","stroke-dasharray":"4,2"},children:[]},{type:"element",name:"rect",value:"",attributes:{x:(g-5).toString(),y:(h-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${g} ${h})`},children:[]},{type:"element",name:"text",value:"",attributes:{x:g.toString(),y:(c-10).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",name:"",value:t.message??"PCB component extends outside board boundaries",attributes:{},children:[]}]}];return YUo(d)}function mq(t){return t!==void 0&&typeof t.x=="number"&&Number.isFinite(t.x)&&typeof t.y=="number"&&Number.isFinite(t.y)}function VUo(t,e){return t.type==="pcb_via_trace_clearance_error"?e.find(n=>n.type==="pcb_via"&&n.pcb_via_id===t.pcb_via_id):e.find(n=>n.type==="pcb_smtpad"&&n.pcb_smtpad_id===t.pcb_pad_id||n.type==="pcb_plated_hole"&&n.pcb_plated_hole_id===t.pcb_pad_id)}function zUo(t){if(t){if("x"in t&&"y"in t&&mq(t))return{x:t.x,y:t.y};if(t.type==="pcb_smtpad"&&t.shape==="polygon"&&t.points.length>0){const e=t.points.filter(mq);if(e.length===0)return;const n=e.map(i=>i.x),o=e.map(i=>i.y);return{x:(Math.min(...n)+Math.max(...n))/2,y:(Math.min(...o)+Math.max(...o))/2}}}}function JUo(t){return t.route_type==="through_pad"?[t.start,t.end].filter(mq):mq(t)?[{x:t.x,y:t.y}]:[]}function WUo(t){if(!t)return;let e,n;for(const o of t.route){const i=JUo(o);!e&&i[0]&&(e=i[0]),i.length>0&&(n=i[i.length-1])}return e&&n?{start:e,end:n}:void 0}function jUo(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function mRe(t,e,n){const o=t.x-e.x,i=t.y-e.y;if(!(o*o+i*i<.25))return{type:"element",name:"line",value:"",attributes:{x1:t.x.toString(),y1:t.y.toString(),x2:e.x.toString(),y2:e.y.toString(),stroke:"red","stroke-width":"1.5","stroke-dasharray":"2,2","data-error-reference":n},children:[]}}function $Uo(t,e){return t.map(n=>({...n,attributes:{...n.attributes??{},"data-type":n.attributes?.["data-type"]??e,"data-pcb-layer":n.attributes?.["data-pcb-layer"]??"overlay"}}))}function qUo(t,e,n){const{shouldDrawErrors:o,transform:i}=n;if(!o)return[];const r=zUo(VUo(t,e)),s=e.find(I=>I.type==="pcb_trace"&&I.pcb_trace_id===t.pcb_trace_id),a=WUo(s),A=mq(t.center)?t.center:r??(a?jUo(a.start,a.end):void 0);if(!A)return[];const c=hn(i,A),l=r?hn(i,r):void 0,u=a?{start:hn(i,a.start),end:hn(i,a.end)}:void 0,g=[u?mRe(u.start,c,"trace-start"):void 0,u?mRe(u.end,c,"trace-end"):void 0,l?mRe(l,c,"obstacle"):void 0].filter(I=>I!==void 0),h=t.type==="pcb_pad_trace_clearance_error"?"Pad/trace":"Via/trace",d=t.actual_clearance,p=t.minimum_clearance,m=d!==void 0&&p!==void 0?`${h} clearance ${d} is below minimum ${p}`:t.type==="pcb_pad_trace_clearance_error"?"Pad and trace too close":"Via and trace too close",_=t.message??m,f=[...g,{type:"element",name:"rect",value:"",attributes:{x:(c.x-5).toString(),y:(c.y-5).toString(),width:"10",height:"10",fill:"red",transform:`rotate(45 ${c.x} ${c.y})`},children:[]},{type:"element",name:"text",value:"",attributes:{x:c.x.toString(),y:(c.y-15).toString(),fill:"red","font-family":"sans-serif","font-size":"12","text-anchor":"middle"},children:[{type:"text",name:"",value:_,attributes:{},children:[]}]}];return $Uo(f,t.type)}function XUo(t,e){const{transform:n,layer:o}=e;if(!t.route||!Array.isArray(t.route))return[];const i=t.route[0],r=t.route[t.route.length-1],s=i.x===r.x&&i.y===r.y,a=t.route.slice(0,s?-1:void 0).map((A,c)=>{const[l,u]=hn(n,[A.x,A.y]);return c===0?`M ${l} ${u}`:`L ${l} ${u}`}).join(" ")+(s?" Z":"");return[{name:"path",type:"element",attributes:{class:"pcb-fabrication-note-path",stroke:t.color||"rgba(255,255,255,0.5)",fill:"none",d:a,"stroke-width":(t.stroke_width*Math.abs(n.a)).toString(),"data-pcb-component-id":t.pcb_component_id,"data-pcb-fabrication-note-path-id":t.pcb_fabrication_note_path_id,"data-type":"pcb_fabrication_note_path","data-pcb-layer":"overlay"},value:"",children:[]}]}var bYt=vc("circuit-to-svg"),cm=bYt.extend("pcb");bYt.extend("sch");function SYt(t){switch(t){case"top_left":return{textAnchor:"start",dominantBaseline:"text-before-edge"};case"top_center":return{textAnchor:"middle",dominantBaseline:"text-before-edge"};case"top_right":return{textAnchor:"end",dominantBaseline:"text-before-edge"};case"center_left":return{textAnchor:"start",dominantBaseline:"central"};case"center_right":return{textAnchor:"end",dominantBaseline:"central"};case"bottom_left":return{textAnchor:"start",dominantBaseline:"text-after-edge"};case"bottom_center":return{textAnchor:"middle",dominantBaseline:"text-after-edge"};case"bottom_right":return{textAnchor:"end",dominantBaseline:"text-after-edge"};default:return{textAnchor:"middle",dominantBaseline:"central"}}}function ZUo(t,e){const{transform:n,layer:o}=e,{anchor_position:i,anchor_alignment:r="center",text:s,font_size:a=1,layer:A="top",color:c,ccw_rotation:l=0}=t;if(o&&A!==o)return[];if(!i||typeof i.x!="number"||typeof i.y!="number")return cm(`[pcb_fabrication_note_text] Invalid anchor_position for "${t.pcb_fabrication_note_text_id}": expected {x: number, y: number}, got ${JSON.stringify(i)}`),[];const[u,g]=hn(n,[i.x,i.y]),h=a*Math.abs(n.a),{textAnchor:d,dominantBaseline:p}=SYt(r),m=m0(of(u,g),jb(-l*Math.PI/180));return[{name:"text",type:"element",attributes:{x:"0",y:"0","font-family":pq,"font-size":h.toString(),"text-anchor":d,"dominant-baseline":p,transform:$b(m),class:"pcb-fabrication-note-text",fill:c||"rgba(255,255,255,0.5)","data-type":"pcb_fabrication_note_text","data-pcb-layer":"overlay"},children:[{type:"text",value:s,name:"",attributes:{},children:[]}],value:""}]}var eKo="rgba(255,255,255,0.5)",tKo="rgba(255,255,255,0.2)";function nKo(t,e){const{transform:n,layer:o}=e,{center:i,width:r,height:s,stroke_width:a,is_filled:A,has_stroke:c,is_stroke_dashed:l,color:u,layer:g="top",pcb_component_id:h,pcb_fabrication_note_rect_id:d,corner_radius:p}=t;if(o&&g!==o)return[];if(!i||typeof i.x!="number"||typeof i.y!="number"||typeof r!="number"||typeof s!="number")return cm(`[pcb_fabrication_note_rect] Invalid data for "${d}": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(i)}, width=${JSON.stringify(r)}, height=${JSON.stringify(s)}`),[];const m=r/2,_=s/2,[f,I]=hn(n,[i.x-m,i.y+_]),[C,y]=hn(n,[i.x+m,i.y-_]),x=Math.min(f,C),E=Math.min(I,y),B=Math.abs(C-f),S=Math.abs(y-I),w=(typeof a=="number"?a:0)*Math.abs(n.a),M=u??eKo,k=typeof p=="number"&&p>0?p:0,R=k*Math.abs(n.a),F=k*Math.abs(n.d),O={x:x.toString(),y:E.toString(),width:B.toString(),height:S.toString(),class:"pcb-fabrication-note-rect","data-type":"pcb_fabrication_note_rect","data-pcb-fabrication-note-rect-id":d,"data-pcb-layer":"overlay"};if(h!==void 0&&(O["data-pcb-component-id"]=h),R>0&&(O.rx=R.toString()),F>0&&(O.ry=F.toString()),A?O.fill=u??tKo:O.fill="none",c??w>0){if(O.stroke=M,O["stroke-width"]=w.toString(),l){const W=.2*Math.abs(n.a),te=.1*Math.abs(n.a);O["stroke-dasharray"]=`${W} ${te}`}}else O.stroke="none";return[{name:"rect",type:"element",value:"",attributes:O,children:[]}]}function _Re(t){const e=Math.hypot(t.x,t.y)||1;return{x:t.x/e,y:t.y/e}}var oKo=1.5,iKo=.6,rKo=.3;function QYt(t){return t.map((e,n)=>n===0?`M ${e.x} ${e.y}`:`L ${e.x} ${e.y}`).join(" ")}function sKo(t,e){const{transform:n,layer:o}=e,{from:i,to:r,text:s,font_size:a=1,color:A,arrow_size:c,layer:l,pcb_component_id:u,pcb_fabrication_note_dimension_id:g,offset_distance:h,offset_direction:d,text_ccw_rotation:p}=t;if(o&&l&&l!==o)return[];if(!i||!r||typeof i!="object"||typeof r!="object")return cm(`[pcb_fabrication_note_dimension] Invalid endpoints for "${g}": expected {from: {x, y}, to: {x, y}}, got from=${JSON.stringify(i)}, to=${JSON.stringify(r)}`),[];if(typeof i.x!="number"||typeof i.y!="number"||typeof r.x!="number"||typeof r.y!="number")return cm(`[pcb_fabrication_note_dimension] Invalid point values for "${g}": x and y must be numbers, got from=${JSON.stringify(i)}, to=${JSON.stringify(r)}`),[];const m=typeof c=="number"?c:void 0;if(m===void 0||!Number.isFinite(m)||m<=0)return cm(`[pcb_fabrication_note_dimension] Invalid arrow_size for "${g}": expected positive number, got ${JSON.stringify(c)}`),[];const _=m,f=_Re({x:r.x-i.x,y:r.y-i.y});if(Number.isNaN(f.x)||Number.isNaN(f.y))return[];const I={x:-f.y,y:f.x},C=d&&typeof d.x=="number"&&typeof d.y=="number",y=C?_Re({x:d.x,y:d.y}):{x:0,y:0},x=typeof h=="number"?h:0,E={x:y.x*x,y:y.y*x},B=Ce=>({x:Ce.x+E.x,y:Ce.y+E.y}),S=B(i),Q=B(r),w=_/2,M={x:S.x+f.x*_,y:S.y+f.y*_},k={x:Q.x-f.x*_,y:Q.y-f.y*_},R=[ke(S),ke({x:M.x+I.x*w,y:M.y+I.y*w}),ke({x:M.x-I.x*w,y:M.y-I.y*w})],F=[ke(Q),ke({x:k.x+I.x*w,y:k.y+I.y*w}),ke({x:k.x-I.x*w,y:k.y-I.y*w})],[O,U]=hn(n,[M.x,M.y]),[Y,W]=hn(n,[k.x,k.y]),te=_/5*Math.abs(n.a),j=A||"rgba(255,255,255,0.5)",J=C&&(Math.abs(y.x)>Number.EPSILON||Math.abs(y.y)>Number.EPSILON)?y:I,oe=x+_,ie=Ce=>{const Le={x:Ce.x+J.x*oe,y:Ce.y+J.y*oe},[Ye,tt]=hn(n,[Ce.x,Ce.y]),[At,at]=hn(n,[Le.x,Le.y]);return{name:"path",type:"element",value:"",attributes:{d:`M ${Ye} ${tt} L ${At} ${at}`,stroke:j,fill:"none","stroke-width":te.toString(),"stroke-linecap":"round",class:"pcb-fabrication-note-dimension-extension"},children:[]}},ne=[ie(i),ie(r)],le={x:(i.x+r.x)/2+E.x,y:(i.y+r.y)/2+E.y},[ge,_e]=hn(n,[S.x,S.y]),[ue,fe]=hn(n,[Q.x,Q.y]),pe=_Re({x:ue-ge,y:fe-_e});let ye=Math.atan2(pe.y,pe.x)*180/Math.PI;(ye>90||ye<-90)&&(ye+=180);const Me=typeof p=="number"&&Number.isFinite(p)?ye-p:ye;let ve=0;if(s&&typeof p=="number"&&Number.isFinite(p)){const Ce=s.length*a*iKo,Le=a,Ye=p*Math.PI/180,tt=Math.abs(Math.sin(Ye)),At=Math.abs(Math.cos(Ye)),at=Ce/2,nt=Le/2;ve=at*tt+nt*At+a*rKo}const he=_*oKo+ve,Qe={x:le.x+I.x*he,y:le.y+I.y*he},[Pe,we]=hn(n,[Qe.x,Qe.y]),Te=a*Math.abs(n.a),Re=[...ne,{name:"path",type:"element",value:"",attributes:{d:`M ${O} ${U} L ${Y} ${W}`,stroke:j,fill:"none","stroke-width":te.toString(),"stroke-linecap":"round",class:"pcb-fabrication-note-dimension-line"},children:[]},{name:"path",type:"element",value:"",attributes:{d:`${QYt(R)} Z`,fill:j,class:"pcb-fabrication-note-dimension-arrow"},children:[]},{name:"path",type:"element",value:"",attributes:{d:`${QYt(F)} Z`,fill:j,class:"pcb-fabrication-note-dimension-arrow"},children:[]}];s&&Re.push({name:"text",type:"element",value:"",attributes:{x:Pe.toString(),y:we.toString(),fill:j,"font-size":Te.toString(),"font-family":pq,"text-anchor":"middle","dominant-baseline":"central",class:"pcb-fabrication-note-dimension-text",transform:`rotate(${Me} ${Pe} ${we})`},children:[{type:"text",name:"",value:s,attributes:{},children:[]}]});const Ee={class:"pcb-fabrication-note-dimension","data-type":"pcb_fabrication_note_dimension","data-pcb-fabrication-note-dimension-id":g,"data-pcb-layer":l??"overlay"};return u!==void 0&&(Ee["data-pcb-component-id"]=u),[{name:"g",type:"element",value:"",attributes:Ee,children:Re}];function ke(Ce){const[Le,Ye]=hn(n,[Ce.x,Ce.y]);return{x:Le,y:Ye}}}var Lg={"3d_viewer":{background_bottom:"rgb(102, 102, 128)",background_top:"rgb(204, 204, 230)",board:"rgb(51, 43, 23)",copper:"rgb(179, 156, 0)",silkscreen_bottom:"rgb(230, 230, 230)",silkscreen_top:"rgb(230, 230, 230)",soldermask:"rgb(20, 51, 36)",solderpaste:"rgb(128, 128, 128)"},board:{anchor:"rgb(255, 38, 226)",aux_items:"rgb(255, 255, 255)",b_adhes:"rgb(0, 0, 132)",b_crtyd:"rgb(255, 38, 226)",b_fab:"rgb(88, 93, 132)",b_mask:"rgba(2, 255, 238, 0.400)",b_paste:"rgb(0, 194, 194)",b_silks:"rgb(232, 178, 167)",background:"rgb(0, 16, 35)",cmts_user:"rgb(89, 148, 220)",copper:{b:"rgb(77, 127, 196)",f:"rgb(200, 52, 52)",in1:"rgb(127, 200, 127)",in10:"rgb(237, 124, 51)",in11:"rgb(91, 195, 235)",in12:"rgb(247, 111, 142)",in13:"rgb(167, 165, 198)",in14:"rgb(40, 204, 217)",in15:"rgb(232, 178, 167)",in16:"rgb(242, 237, 161)",in17:"rgb(237, 124, 51)",in18:"rgb(91, 195, 235)",in19:"rgb(247, 111, 142)",in2:"rgb(206, 125, 44)",in20:"rgb(167, 165, 198)",in21:"rgb(40, 204, 217)",in22:"rgb(232, 178, 167)",in23:"rgb(242, 237, 161)",in24:"rgb(237, 124, 51)",in25:"rgb(91, 195, 235)",in26:"rgb(247, 111, 142)",in27:"rgb(167, 165, 198)",in28:"rgb(40, 204, 217)",in29:"rgb(232, 178, 167)",in3:"rgb(79, 203, 203)",in30:"rgb(242, 237, 161)",in4:"rgb(219, 98, 139)",in5:"rgb(167, 165, 198)",in6:"rgb(40, 204, 217)",in7:"rgb(232, 178, 167)",in8:"rgb(242, 237, 161)",in9:"rgb(141, 203, 129)"},cursor:"rgb(255, 255, 255)",drc:"rgb(194, 194, 194)",drc_error:"rgba(215, 91, 107, 0.800)",drc_exclusion:"rgb(255, 255, 255)",drc_warning:"rgba(255, 208, 66, 0.902)",dwgs_user:"rgb(194, 194, 194)",eco1_user:"rgb(180, 219, 210)",eco2_user:"rgb(216, 200, 82)",edge_cuts:"rgb(208, 210, 205)",f_adhes:"rgb(132, 0, 132)",f_crtyd:"rgb(255, 0, 245)",f_fab:"rgb(175, 175, 175)",f_mask:"rgba(216, 100, 255, 0.400)",f_paste:"rgba(180, 160, 154, 0.902)",f_silks:"rgb(242, 237, 161)",footprint_text_back:"rgb(0, 0, 132)",footprint_text_front:"rgb(194, 194, 194)",footprint_text_invisible:"rgb(132, 132, 132)",grid:"rgb(132, 132, 132)",grid_axes:"rgb(194, 194, 194)",margin:"rgb(255, 38, 226)",microvia:"rgb(0, 132, 132)",no_connect:"rgb(0, 0, 132)",pad_back:"rgb(77, 127, 196)",pad_front:"rgb(200, 52, 52)",pad_plated_hole:"rgb(194, 194, 0)",pad_through_hole:"rgb(227, 183, 46)",plated_hole:"rgb(26, 196, 210)",ratsnest:"rgba(245, 255, 213, 0.702)",select_overlay:"rgb(4, 255, 67)",through_via:"rgb(236, 236, 236)",user_1:"rgb(194, 194, 194)",user_2:"rgb(89, 148, 220)",user_3:"rgb(180, 219, 210)",user_4:"rgb(216, 200, 82)",user_5:"rgb(194, 194, 194)",user_6:"rgb(89, 148, 220)",user_7:"rgb(180, 219, 210)",user_8:"rgb(216, 200, 82)",user_9:"rgb(232, 178, 167)",via_blind_buried:"rgb(187, 151, 38)",via_hole:"rgb(227, 183, 46)",via_micro:"rgb(0, 132, 132)",via_through:"rgb(236, 236, 236)",worksheet:"rgb(200, 114, 171)"},gerbview:{axes:"rgb(0, 0, 132)",background:"rgb(0, 0, 0)",dcodes:"rgb(255, 255, 255)",grid:"rgb(132, 132, 132)",layers:["rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)"],negative_objects:"rgb(132, 132, 132)",worksheet:"rgb(0, 0, 132)"},meta:{filename:"kicad_2020",name:"KiCad 2020",version:2},simulation_palette:["#1f77b4","#d62728","#2ca02c","#ff7f0e","#9467bd","#17becf","#8c564b","#e377c2","#7f7f7f","#bcbd22"],palette:["rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)"],schematic:{aux_items:"rgb(46, 46, 46)",background:"rgb(245, 241, 237)",brightened:"rgb(255, 0, 255)",bus:"rgb(0, 0, 132)",bus_junction:"rgb(0, 0, 132)",component_body:"rgb(255, 255, 194)",component_outline:"rgb(132, 0, 0)",cursor:"rgb(15, 15, 15)",erc_error:"rgba(230, 9, 13, 0.800)",erc_warning:"rgba(209, 146, 0, 0.800)",fields:"rgb(132, 0, 132)",grid:"rgb(181, 181, 181)",grid_axes:"rgb(0, 0, 132)",hidden:"rgb(194, 194, 194)",junction:"rgb(0, 150, 0)",label_global:"rgb(132, 0, 0)",label_background:"rgba(255, 255, 255, 0.6)",label_hier:"rgb(114, 86, 0)",label_local:"rgb(15, 15, 15)",net_name:"rgb(132, 132, 132)",no_connect:"rgb(132, 0, 0)",note:"rgb(0, 0, 194)",override_item_colors:!1,pin:"rgb(132, 0, 0)",pin_name:"rgb(0, 100, 100)",pin_number:"rgb(169, 0, 0)",reference:"rgb(0, 100, 100)",shadow:"rgba(102, 179, 255, 0.800)",sheet:"rgb(132, 0, 0)",sheet_background:"rgba(253, 255, 231, 0.000)",sheet_fields:"rgb(132, 0, 132)",sheet_filename:"rgb(114, 86, 0)",sheet_label:"rgb(0, 100, 100)",sheet_name:"rgb(0, 100, 100)",table:"rgb(102, 102, 102)",value:"rgb(0, 100, 100)",wire:"rgb(0, 150, 0)",wire_crossing:"rgb(30, 180, 30)",worksheet:"rgb(132, 0, 0)"}};function fRe(t){const e=Math.hypot(t.x,t.y)||1;return{x:t.x/e,y:t.y/e}}function vYt(t){return t.map((e,n)=>n===0?`M ${e.x} ${e.y}`:`L ${e.x} ${e.y}`).join(" ")}function aKo(t,e){const{transform:n}=e,{from:o,to:i,text:r,font_size:s=1,color:a,arrow_size:A,offset_distance:c,offset_direction:l,text_ccw_rotation:u}=t;if(!o||!i)return cm(`[pcb_note_dimension] Invalid endpoints for "${t.pcb_note_dimension_id}": expected {from: {x, y}, to: {x, y}}, got from=${JSON.stringify(o)}, to=${JSON.stringify(i)}`),[];if(!Number.isFinite(A)||A<=0)return cm(`[pcb_note_dimension] Invalid arrow_size for "${t.pcb_note_dimension_id}": expected positive number, got ${JSON.stringify(A)}`),[];const g=fRe({x:i.x-o.x,y:i.y-o.y});if(Number.isNaN(g.x)||Number.isNaN(g.y))return[];const h={x:-g.y,y:g.x},d=l&&typeof l.x=="number"&&typeof l.y=="number",p=d?fRe({x:l.x,y:l.y}):{x:0,y:0},m=typeof c=="number"?c:0,_={x:p.x*m,y:p.y*m},f=Qe=>({x:Qe.x+_.x,y:Qe.y+_.y}),I=f(o),C=f(i),y=A/2,x={x:I.x+g.x*A,y:I.y+g.y*A},E={x:C.x-g.x*A,y:C.y-g.y*A},B=[he(I),he({x:x.x+h.x*y,y:x.y+h.y*y}),he({x:x.x-h.x*y,y:x.y-h.y*y})],S=[he(C),he({x:E.x+h.x*y,y:E.y+h.y*y}),he({x:E.x-h.x*y,y:E.y-h.y*y})],[Q,w]=hn(n,[x.x,x.y]),[M,k]=hn(n,[E.x,E.y]),R=A/5*Math.abs(n.a),F=a||Lg.board.user_2,O=d&&(Math.abs(p.x)>Number.EPSILON||Math.abs(p.y)>Number.EPSILON)?p:h,U=m+A,Y=Qe=>{const Pe={x:Qe.x+O.x*U,y:Qe.y+O.y*U},[we,Te]=hn(n,[Qe.x,Qe.y]),[Re,Ee]=hn(n,[Pe.x,Pe.y]);return{name:"path",type:"element",value:"",attributes:{d:`M ${we} ${Te} L ${Re} ${Ee}`,stroke:F,fill:"none","stroke-width":R.toString(),"stroke-linecap":"round",class:"pcb-note-dimension-extension"},children:[]}},W=[Y(o),Y(i)],te={x:(o.x+i.x)/2+_.x,y:(o.y+i.y)/2+_.y},[j,J]=hn(n,[I.x,I.y]),[oe,ie]=hn(n,[C.x,C.y]),ne=fRe({x:oe-j,y:ie-J});let le=Math.atan2(ne.y,ne.x)*180/Math.PI;(le>90||le<-90)&&(le+=180);const ge=typeof u=="number"&&Number.isFinite(u)?le-u:le;let _e=0;if(r&&typeof u=="number"&&Number.isFinite(u)){const Qe=r.length*s*.6,Pe=s,we=u*Math.PI/180,Te=Math.abs(Math.sin(we)),Re=Math.abs(Math.cos(we)),Ee=Qe/2,ke=Pe/2;_e=Ee*Te+ke*Re+s*.3}const ue=A*1.5+_e,fe={x:te.x+h.x*ue,y:te.y+h.y*ue},[pe,ye]=hn(n,[fe.x,fe.y]),Me=s*Math.abs(n.a),ve=[...W,{name:"path",type:"element",value:"",attributes:{d:`M ${Q} ${w} L ${M} ${k}`,stroke:F,fill:"none","stroke-width":R.toString(),"stroke-linecap":"round",class:"pcb-note-dimension-line"},children:[]},{name:"path",type:"element",value:"",attributes:{d:`${vYt(B)} Z`,fill:F,class:"pcb-note-dimension-arrow"},children:[]},{name:"path",type:"element",value:"",attributes:{d:`${vYt(S)} Z`,fill:F,class:"pcb-note-dimension-arrow"},children:[]}];return r&&ve.push({name:"text",type:"element",value:"",attributes:{x:pe.toString(),y:ye.toString(),fill:F,"font-size":Me.toString(),"font-family":"Arial, sans-serif","text-anchor":"middle","dominant-baseline":"central",class:"pcb-note-dimension-text",transform:`rotate(${ge} ${pe} ${ye})`},children:[{type:"text",name:"",value:r,attributes:{},children:[]}]}),[{name:"g",type:"element",value:"",attributes:{class:"pcb-note-dimension","data-type":"pcb_note_dimension","data-pcb-note-dimension-id":t.pcb_note_dimension_id,"data-pcb-layer":"overlay"},children:ve}];function he(Qe){const[Pe,we]=hn(n,[Qe.x,Qe.y]);return{x:Pe,y:we}}}var AKo=Lg.board.user_2;function cKo(t,e){const{transform:n}=e,{anchor_position:o,text:i,font_size:r=1,anchor_alignment:s="center",color:a}=t;if(!o||typeof o.x!="number"||typeof o.y!="number")return cm(`[pcb_note_text] Invalid anchor_position for "${t.pcb_note_text_id}": expected {x: number, y: number}, got ${JSON.stringify(o)}`),[];if(typeof i!="string"||i.length===0)return cm(`[pcb_note_text] Invalid text for "${t.pcb_note_text_id}": expected non-empty string, got ${JSON.stringify(i)}`),[];const[A,c]=hn(n,[o.x,o.y]),l=r*Math.abs(n.a),{textAnchor:u,dominantBaseline:g}=SYt(s),h=i.split(`
`),d=h.length===1?[{type:"text",name:"",value:i,attributes:{},children:[]}]:h.map((m,_)=>({type:"element",name:"tspan",value:"",attributes:{x:A.toString(),..._>0?{dy:"1em"}:{}},children:[{type:"text",name:"",value:m,attributes:{},children:[]}]}));return[{name:"text",type:"element",value:"",attributes:{x:A.toString(),y:c.toString(),fill:a??AKo,"font-family":"Arial, sans-serif","font-size":l.toString(),"text-anchor":u,"dominant-baseline":g,class:"pcb-note-text","data-type":"pcb_note_text","data-pcb-note-text-id":t.pcb_note_text_id,"data-pcb-layer":"overlay"},children:d}]}var lKo=Lg.board.user_2,uKo=Lg.board.user_2;function gKo(t,e){const{transform:n}=e,{center:o,width:i,height:r,stroke_width:s,is_filled:a,has_stroke:A,is_stroke_dashed:c,color:l,corner_radius:u}=t;if(!o||typeof o.x!="number"||typeof o.y!="number"||typeof i!="number"||typeof r!="number")return cm(`[pcb_note_rect] Invalid data for "${t.pcb_note_rect_id}": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(o)}, width=${JSON.stringify(i)}, height=${JSON.stringify(r)}`),[];const g=i/2,h=r/2,[d,p]=hn(n,[o.x-g,o.y+h]),[m,_]=hn(n,[o.x+g,o.y-h]),f=Math.min(d,m),I=Math.min(p,_),C=Math.abs(m-d),y=Math.abs(_-p),E=(typeof s=="number"?s:0)*Math.abs(n.a),B=typeof u=="number"&&u>0?u:0,S=B*Math.abs(n.a),Q=B*Math.abs(n.d),w=l??lKo,M={x:f.toString(),y:I.toString(),width:C.toString(),height:y.toString(),class:"pcb-note-rect","data-type":"pcb_note_rect","data-pcb-note-rect-id":t.pcb_note_rect_id,"data-pcb-layer":"overlay"};if(S>0&&(M.rx=S.toString()),Q>0&&(M.ry=Q.toString()),a?M.fill=l??uKo:M.fill="none",A??E>0){if(M.stroke=w,M["stroke-width"]=E.toString(),c){const F=.2*Math.abs(n.a),O=.1*Math.abs(n.a);M["stroke-dasharray"]=`${F} ${O}`}}else M.stroke="none";return[{name:"rect",type:"element",value:"",attributes:M,children:[]}]}var dKo=Lg.board.user_2;function hKo(t,e){const{transform:n}=e;if(!Array.isArray(t.route)||t.route.length===0)return cm(`[pcb_note_path] Invalid route for "${t.pcb_note_path_id}": expected non-empty array of points, got ${JSON.stringify(t.route)}`),[];for(const s of t.route)if(typeof s.x!="number"||typeof s.y!="number")return cm(`[pcb_note_path] Invalid point in route for "${t.pcb_note_path_id}": expected {x: number, y: number}, got ${JSON.stringify(s)}`),[];const o=t.route.map((s,a)=>{const[A,c]=hn(n,[s.x,s.y]);return a===0?`M ${A} ${c}`:`L ${A} ${c}`}).join(" "),i=t.stroke_width*Math.abs(n.a);return[{name:"path",type:"element",value:"",attributes:{d:o,stroke:t.color??dKo,fill:"none","stroke-width":i.toString(),class:"pcb-note-path","data-type":"pcb_note_path","data-pcb-note-path-id":t.pcb_note_path_id,"data-pcb-layer":"overlay"},children:[]}]}var pKo=Lg.board.user_2;function mKo(t,e){const{transform:n}=e,{x1:o,y1:i,x2:r,y2:s,stroke_width:a,color:A,is_dashed:c}=t;if(typeof o!="number"||typeof i!="number"||typeof r!="number"||typeof s!="number")return cm(`[pcb_note_line] Invalid coordinates for "${t.pcb_note_line_id}": expected x1, y1, x2, y2 as numbers, got x1=${JSON.stringify(o)}, y1=${JSON.stringify(i)}, x2=${JSON.stringify(r)}, y2=${JSON.stringify(s)}`),[];const[l,u]=hn(n,[o,i]),[g,h]=hn(n,[r,s]),p=(typeof a=="number"?a:0)*Math.abs(n.a),m={x1:l.toString(),y1:u.toString(),x2:g.toString(),y2:h.toString(),stroke:A??pKo,"stroke-width":p.toString(),"stroke-linecap":"round",class:"pcb-note-line","data-type":"pcb_note_line","data-pcb-note-line-id":t.pcb_note_line_id,"data-pcb-layer":"overlay"};if(c){const f=.2*Math.abs(n.a),I=.1*Math.abs(n.a);m["stroke-dasharray"]=`${f} ${I}`}return[{name:"line",type:"element",value:"",attributes:m,children:[]}]}function wYt(t,e){if(!e)return{};const n=PYt(t,e);if(!n)return{};const o=e.find(a=>a.type==="source_port"&&a.source_port_id===n),i=e.find(a=>a.type==="source_component"&&a.source_component_id===o?.source_component_id),r={};i?.name&&o?.name&&(r["data-pad-name"]=`${i.name}.${o.name}`);const s=fKo(n,e);return s&&(r["data-pad-net-name"]=s),r}function _Ko(t,e){if(e){const i=PYt(t,e),r=e.find(s=>s.type==="source_port"&&s.source_port_id===i);if(r?.type==="source_port"&&r.pin_number!=null)return r.pin_number.toString()}const n=t.port_hints?.find(i=>i.trim().length>0);return n?n.match(/^pin(\d+)$/i)?.[1]??n:void 0}function PYt(t,e){if(t.source_port_id)return t.source_port_id;if(t.pcb_port_id){const i=e.find(r=>r.type==="pcb_port"&&r.pcb_port_id===t.pcb_port_id);if(i?.source_port_id)return i.source_port_id}const n=t.pcb_smtpad_id??t.pcb_plated_hole_id;return n?e.find(i=>{if(i.type!=="pcb_port")return!1;const r=i;return r.pcb_smtpad_id===n||r.pcb_plated_hole_id===n})?.source_port_id:void 0}function fKo(t,e){const o=e.find(r=>r.type!=="source_trace"?!1:r.connected_source_port_ids?.includes(t))?.connected_source_net_ids?.[0];return o?e.find(r=>r.type==="source_net"&&r.source_net_id===o)?.name:void 0}function IKo(t,e){const{transform:n,colorMap:o,showSolderMask:i}=e,[r,s]=hn(n,[t.x,t.y]),a=wYt(t,e.circuitJson),A=Array.isArray(t.layers)&&t.layers[0]||t.layer||"top",c=A,l=!!t.is_covered_with_solder_mask,u=(t.soldermask_margin??0)*Math.abs(n.a),g=i&&l&&u!==0,h=o.soldermaskWithCopperUnderneath.top;if(t.shape==="pill"){const d=t.outer_width*Math.abs(n.a),p=t.outer_height*Math.abs(n.a),m=t.hole_width*Math.abs(n.a),_=t.hole_height*Math.abs(n.a),f=t.ccw_rotation||0,I=f?`translate(${r} ${s}) rotate(${-f})`:`translate(${r} ${s})`,C=f?`translate(${r} ${s}) rotate(${-f})`:`translate(${r} ${s})`,y=(E,B)=>{if(E>B){const S=B/2,Q=E-2*S;return`M${-E/2+S},${-S} h${Q} a${S},${S} 0 0 1 0,${B} h${-Q} a${S},${S} 0 0 1 0,${-B} z`}else if(B>E){const S=E/2,Q=B-2*S;return`M${S},${-B/2+S} v${Q} a${S},${S} 0 0 1 ${-E},0 v${-Q} a${S},${S} 0 0 1 ${E},0 z`}else{const S=E/2;return`M${-S},0 a${S},${S} 0 0 1 ${E},0 a${S},${S} 0 0 1 ${-E},0 z`}};let x=[{name:"path",type:"element",attributes:{class:"pcb-hole-outer",fill:o.copper.top,d:y(d,p),transform:I,"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"path",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,d:y(m,_),transform:C,"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}];if(g){const E=d+2*u,B=p+2*u;u<0?x=[{name:"path",type:"element",attributes:{class:"pcb-hole-outer-covered",fill:h,d:y(d,p),transform:I,"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"path",type:"element",attributes:{class:"pcb-hole-outer-exposed",fill:o.copper.top,d:y(E,B),transform:I,"data-type":"pcb_soldermask","data-pcb-layer":c},value:"",children:[]},x[1]]:x.unshift({name:"path",type:"element",attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,d:y(E,B),transform:I,"data-type":"pcb_soldermask_opening","data-pcb-layer":c},value:"",children:[]})}return[{name:"g",type:"element",attributes:{"data-type":"pcb_plated_hole","data-pcb-layer":"through",...a},children:x,value:""}]}if(t.shape==="oval"){const d=t.outer_width*Math.abs(n.a),p=t.outer_height*Math.abs(n.a),m=t.hole_width*Math.abs(n.a),_=t.hole_height*Math.abs(n.a),f=t.ccw_rotation||0,I=f?`translate(${r} ${s}) rotate(${-f})`:`translate(${r} ${s})`,C=[{name:"ellipse",type:"element",attributes:{class:"pcb-hole-outer",fill:o.copper.top,cx:"0",cy:"0",rx:(d/2).toString(),ry:(p/2).toString(),transform:I,"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"ellipse",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,cx:"0",cy:"0",rx:(m/2).toString(),ry:(_/2).toString(),transform:I,"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}];return[{name:"g",type:"element",attributes:{"data-type":"pcb_plated_hole","data-pcb-layer":"through",...a},children:C,value:""}]}if(t.shape==="circle"){const d=t.outer_diameter*Math.abs(n.a),p=t.outer_diameter*Math.abs(n.a),m=t.hole_diameter*Math.abs(n.a),_=t.hole_diameter*Math.abs(n.a),f=Math.min(d,p)/2,I=Math.min(m,_)/2;let C=[{name:"circle",type:"element",attributes:{class:"pcb-hole-outer",fill:o.copper.top,cx:r.toString(),cy:s.toString(),r:f.toString(),"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,cx:r.toString(),cy:s.toString(),r:I.toString(),"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}];if(g){const y=f+u;u<0?C=[{name:"circle",type:"element",attributes:{class:"pcb-hole-outer-covered",fill:h,cx:r.toString(),cy:s.toString(),r:f.toString(),"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pcb-hole-outer-exposed",fill:o.copper.top,cx:r.toString(),cy:s.toString(),r:y.toString(),"data-type":"pcb_soldermask","data-pcb-layer":c},value:"",children:[]},C[1]]:C.unshift({name:"circle",type:"element",attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,cx:r.toString(),cy:s.toString(),r:y.toString(),"data-type":"pcb_soldermask_opening","data-pcb-layer":c},value:"",children:[]})}return[{name:"g",type:"element",attributes:{"data-type":"pcb_plated_hole","data-pcb-layer":"through",...a},children:C,value:""}]}if(t.shape==="circular_hole_with_rect_pad"){const d=t,p=t.hole_diameter*Math.abs(n.a),m=t.rect_pad_width*Math.abs(n.a),_=t.rect_pad_height*Math.abs(n.a),f=(t.rect_border_radius??0)*Math.abs(n.a),I=t.rect_ccw_rotation??0,C=d.rect_ccw_rotation??0,y=C?`translate(${r} ${s}) rotate(${-C})`:void 0;C?(-m/2).toString():(r-m/2).toString(),C?(-_/2).toString():(s-_/2).toString();const x=p/2,[E,B]=hn(n,[d.x+(d.hole_offset_x??0),d.y+(d.hole_offset_y??0)]);let S=[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:o.copper.top,...I?{x:(-m/2).toString(),y:(-_/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-m/2).toString(),y:(s-_/2).toString()},width:m.toString(),height:_.toString(),...y?{transform:y}:{},...f?{rx:f.toString(),ry:f.toString()}:{},"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,cx:E.toString(),cy:B.toString(),r:x.toString(),"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}];if(g){const Q=m+2*u,w=_+2*u,M=f+u;u<0?S=[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-covered",fill:h,...I?{x:(-m/2).toString(),y:(-_/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-m/2).toString(),y:(s-_/2).toString()},width:m.toString(),height:_.toString(),...y?{transform:y}:{},...f?{rx:f.toString(),ry:f.toString()}:{},"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-exposed",fill:o.copper.top,...I?{x:(-Q/2).toString(),y:(-w/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-Q/2).toString(),y:(s-w/2).toString()},width:Q.toString(),height:w.toString(),...y?{transform:y}:{},...M>0?{rx:M.toString(),ry:M.toString()}:{},"data-type":"pcb_soldermask","data-pcb-layer":c},value:"",children:[]},S[1]]:S.unshift({name:"rect",type:"element",attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,...I?{x:(-Q/2).toString(),y:(-w/2).toString(),transform:`translate(${r} ${s}) rotate(${-I})`}:{x:(r-Q/2).toString(),y:(s-w/2).toString()},width:Q.toString(),height:w.toString(),...y?{transform:y}:{},...f?{rx:M.toString(),ry:M.toString()}:{},"data-type":"pcb_soldermask_opening","data-pcb-layer":c},value:"",children:[]})}return[{name:"g",type:"element",attributes:{"data-type":"pcb_plated_hole","data-pcb-layer":"through",...a},children:S,value:""}]}if(t.shape==="pill_hole_with_rect_pad"){const d=t,p=d.rect_pad_width*Math.abs(n.a),m=d.rect_pad_height*Math.abs(n.a),_=(d.rect_border_radius??0)*Math.abs(n.a),f=d.hole_height*Math.abs(n.a),I=d.hole_width*Math.abs(n.a),C=d,y=C.hole_offset_x??0,x=C.hole_offset_y??0,[E,B]=hn(n,[d.x+y,d.y+x]),S=Math.min(f,I)/2;let Q=[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:o.copper.top,x:(r-p/2).toString(),y:(s-m/2).toString(),width:p.toString(),height:m.toString(),..._?{rx:_.toString(),ry:_.toString()}:{},"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,x:(E-I/2).toString(),y:(B-f/2).toString(),width:I.toString(),height:f.toString(),rx:S.toString(),ry:S.toString(),"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}];if(g){const w=p+2*u,M=m+2*u,k=_+u;u<0?Q=[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-covered",fill:h,x:(r-p/2).toString(),y:(s-m/2).toString(),width:p.toString(),height:m.toString(),..._?{rx:_.toString(),ry:_.toString()}:{},"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-exposed",fill:o.copper.top,x:(r-w/2).toString(),y:(s-M/2).toString(),width:w.toString(),height:M.toString(),...k>0?{rx:k.toString(),ry:k.toString()}:{},"data-type":"pcb_soldermask","data-pcb-layer":c},value:"",children:[]},Q[1]]:Q.unshift({name:"rect",type:"element",attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,x:(r-w/2).toString(),y:(s-M/2).toString(),width:w.toString(),height:M.toString(),..._?{rx:k.toString(),ry:k.toString()}:{},"data-type":"pcb_soldermask_opening","data-pcb-layer":c},value:"",children:[]})}return[{name:"g",type:"element",attributes:{"data-type":"pcb_plated_hole","data-pcb-layer":"through",...a},children:Q,value:""}]}if(t.shape==="rotated_pill_hole_with_rect_pad"){const d=t,p=d.rect_pad_width*Math.abs(n.a),m=d.rect_pad_height*Math.abs(n.a),_=(d.rect_border_radius??0)*Math.abs(n.a),f=d.hole_height*Math.abs(n.a),I=d.hole_width*Math.abs(n.a),C=d,y=C.hole_offset_x??0,x=C.hole_offset_y??0,[E,B]=hn(n,[d.x+y,d.y+x]),S=Math.min(f,I)/2;let Q=[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:o.copper.top,x:(-p/2).toString(),y:(-m/2).toString(),width:p.toString(),height:m.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,..._?{rx:_.toString(),ry:_.toString()}:{},"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,x:(-I/2).toString(),y:(-f/2).toString(),width:I.toString(),height:f.toString(),rx:S.toString(),ry:S.toString(),transform:`translate(${E} ${B}) rotate(${-d.hole_ccw_rotation})`,"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}];if(g){const w=p+2*u,M=m+2*u,k=_+u;u<0?Q=[{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-covered",fill:h,x:(-p/2).toString(),y:(-m/2).toString(),width:p.toString(),height:m.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,..._?{rx:_.toString(),ry:_.toString()}:{},"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pcb-hole-outer-exposed",fill:o.copper.top,x:(-w/2).toString(),y:(-M/2).toString(),width:w.toString(),height:M.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,...k>0?{rx:k.toString(),ry:k.toString()}:{},"data-type":"pcb_soldermask","data-pcb-layer":c},value:"",children:[]},Q[1]]:Q.push({name:"rect",type:"element",attributes:{class:"pcb-solder-mask",fill:h,x:(-w/2).toString(),y:(-M/2).toString(),width:w.toString(),height:M.toString(),transform:`translate(${r} ${s}) rotate(${-d.rect_ccw_rotation})`,..._?{rx:k.toString(),ry:k.toString()}:{},"data-type":"pcb_soldermask","data-pcb-layer":c},value:"",children:[]})}return[{name:"g",type:"element",attributes:{"data-type":"pcb_plated_hole","data-pcb-layer":"through",...a},children:Q,value:""}]}if(t.shape==="hole_with_polygon_pad"){const d=t,p=d.pad_outline||[],m=d.x??0,_=d.y??0,I=p.map(E=>hn(n,[m+E.x,_+E.y])).map(E=>E.join(",")).join(" "),[C,y]=hn(n,[m+d.hole_offset_x,_+d.hole_offset_y]),x=()=>{if(d.hole_shape==="circle"){const B=(d.hole_diameter??0)*Math.abs(n.a)/2;return{name:"circle",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,cx:C.toString(),cy:y.toString(),r:B.toString(),"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}}if(d.hole_shape==="oval"){const E=(d.hole_width??0)*Math.abs(n.a),B=(d.hole_height??0)*Math.abs(n.a),S=E/2,Q=B/2;return{name:"ellipse",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,cx:C.toString(),cy:y.toString(),rx:S.toString(),ry:Q.toString(),"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}}if(d.hole_shape==="pill"||d.hole_shape==="rotated_pill"){const E=(d.hole_width??0)*Math.abs(n.a),B=(d.hole_height??0)*Math.abs(n.a),S=E>B,Q=Math.min(E,B)/2,w=Math.abs(S?E-B:B-E),M=S?`M${-w/2},${-Q} h${w} a${Q},${Q} 0 0 1 0,${B} h-${w} a${Q},${Q} 0 0 1 0,-${B} z`:`M${-Q},${-w/2} v${w} a${Q},${Q} 0 0 0 ${E},0 v-${w} a${Q},${Q} 0 0 0 -${E},0 z`;return{name:"path",type:"element",attributes:{class:"pcb-hole-inner",fill:o.drill,d:M,transform:`translate(${C} ${y})`,"data-type":"pcb_plated_hole_drill","data-pcb-layer":"drill"},value:"",children:[]}}return{name:"g",type:"element",attributes:{},value:"",children:[]}};return[{name:"g",type:"element",attributes:{"data-type":"pcb_plated_hole","data-pcb-layer":"through",...a},children:[{name:"polygon",type:"element",attributes:{class:"pcb-hole-outer-pad",fill:o.copper.top,points:I,"data-type":"pcb_plated_hole","data-pcb-layer":A},value:"",children:[]},x()],value:""}]}return[]}function CKo(t,e){const{transform:n,layer:o,colorMap:i}=e;if(!t.route||!Array.isArray(t.route))return[];let r=t.route.map((l,u)=>{const[g,h]=hn(n,[l.x,l.y]);return u===0?`M ${g} ${h}`:`L ${g} ${h}`}).join(" ");const s=t.route[0],a=t.route[t.route.length-1];s&&a&&s.x===a.x&&s.y===a.y&&(r+=" Z");const A=t.layer||"top";if(o&&A!==o)return[];const c=A==="bottom"?i.silkscreen.bottom:i.silkscreen.top;return[{name:"path",type:"element",attributes:{class:`pcb-silkscreen pcb-silkscreen-${A}`,d:r,fill:"none",stroke:c,"stroke-width":(t.stroke_width*Math.abs(n.a)).toString(),"stroke-linecap":"round","stroke-linejoin":"round","data-pcb-component-id":t.pcb_component_id,"data-pcb-silkscreen-path-id":t.pcb_silkscreen_path_id,"data-type":"pcb_silkscreen_path","data-pcb-layer":A},value:"",children:[]}]}function jge(t,e){if(t.length===0)return"";const n=t.map(i=>{const[r,s]=hn(e,[i.x,i.y]);return{...i,x:r,y:s}});let o=`M ${n[0].x} ${n[0].y}`;for(let i=0;i<n.length;i++){const r=n[i],s=n[(i+1)%n.length];if(r.bulge){if(Math.hypot(s.x-r.x,s.y-r.y)<1e-9)continue;const a=r.bulge,A=s.x-r.x,c=s.y-r.y,l=Math.hypot(A,c),u=Math.abs(l/4/a*(a*a+1)),g=a<0?1:0,h=Math.abs(a)>1?1:0;o+=` A ${u} ${u} 0 ${h} ${g} ${s.x} ${s.y}`}else o+=` L ${s.x} ${s.y}`}return o+=" Z",o}function yKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{layer:r="top"}=t;if(o&&r!==o)return[];if(t.shape!=="brep")return[];const s=r==="bottom"?i.silkscreen.bottom:i.silkscreen.top;let a=jge(t.brep_shape.outer_ring.vertices,n);for(const A of t.brep_shape.inner_rings??[])a+=` ${jge(A.vertices,n)}`;return[{name:"path",type:"element",attributes:{class:`pcb-silkscreen pcb-silkscreen-${r}`,d:a,fill:s,"fill-rule":"evenodd",stroke:"none","data-pcb-component-id":t.pcb_component_id,"data-pcb-silkscreen-graphic-id":t.pcb_silkscreen_graphic_id,"data-type":"pcb_silkscreen_graphic","data-pcb-layer":r},value:"",children:[]}]}function MYt(t){const{text:e,anchorAlignment:n,fontSize:o,charAdvance:i,spaceAdvance:r,trailingSpacing:s,lineHeight:a,mapSegment:A}=t,c=e.split(`
`),l=c.length*a,u=c.map(f=>xKo(f,i,r,s)),g=[];let h=-l/2;for(let f=0;f<c.length;f++){const I=c[f]??"";let y=-(u[f]??0)/2;for(const x of I){if(x===" "){y+=r;continue}const E=Ov[x];if(E)for(const B of E)g.push(A(B,y,h,o));y+=i}h+=a}const d=EKo(g);if(!d)return{pathData:"",bounds:null};const p=IRe(n,d),m=SKo(g,p),_=QKo(d,p);return{pathData:vKo(m),bounds:_}}function xKo(t,e,n,o){let i=0;for(const r of t)i+=r===" "?n:e;return i>0?i-o:0}function EKo(t){if(t.length===0)return null;let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)e=Math.min(e,r.x1,r.x2),n=Math.min(n,r.y1,r.y2),o=Math.max(o,r.x1,r.x2),i=Math.max(i,r.y1,r.y2);return{minX:e,minY:n,maxX:o,maxY:i}}function IRe(t,e){return{x:-BKo(t,e),y:-bKo(t,e)}}function BKo(t,e){return t==="top_left"||t==="center_left"||t==="bottom_left"?e.minX:t==="top_right"||t==="center_right"||t==="bottom_right"?e.maxX:(e.minX+e.maxX)/2}function bKo(t,e){return t==="top_left"||t==="top_center"||t==="top_right"?e.minY:t==="bottom_left"||t==="bottom_center"||t==="bottom_right"?e.maxY:(e.minY+e.maxY)/2}function SKo(t,e){return e.x===0&&e.y===0?t:t.map(n=>({x1:n.x1+e.x,y1:n.y1+e.y,x2:n.x2+e.x,y2:n.y2+e.y}))}function QKo(t,e){return{minX:t.minX+e.x,minY:t.minY+e.y,maxX:t.maxX+e.x,maxY:t.maxY+e.y}}function vKo(t){return t.map(e=>`M${e.x1} ${e.y1}L${e.x2} ${e.y2}`).join(" ")}var DYt=.94,$ge=.09/2,NYt=Object.fromEntries(Object.entries(Ov).map(([t,e])=>{const n=e.flatMap(i=>[i.x1,i.x2]),o=e.flatMap(i=>[i.y1,i.y2]);return[t,e.length?{minX:Math.min(...n)-$ge,maxX:Math.max(...n)+$ge,minY:-(Math.max(...o)+$ge)*DYt,maxY:-(Math.min(...o)-$ge)*DYt}:null]})),RYt=Math.round(Math.max(...Object.values(NYt).map(t=>t?t.maxX-t.minX:0))*1e3)/1e3;function wKo(t,e){let n=null;const i=t.split(`
`).map((r,s)=>{const a=Array.from(r),A=-(a.length*RYt*e)/2,c=s*e*1.1;return a.forEach((l,u)=>{const g=NYt[l];if(!g)return;const h=A+u*RYt*e,d={minX:h+g.minX*e,maxX:h+g.maxX*e,minY:c+g.minY*e,maxY:c+g.maxY*e};n=n?{minX:Math.min(n.minX,d.minX),maxX:Math.max(n.maxX,d.maxX),minY:Math.min(n.minY,d.minY),maxY:Math.max(n.maxY,d.maxY)}:d}),{name:"tspan",type:"element",value:"",attributes:{x:A.toString(),y:c.toString()},children:[{name:"",type:"text",value:r,attributes:{},children:[]}]}});return{bounds:n,textNode:{name:"text",type:"element",value:"",attributes:{"font-family":pq,"font-size":e.toString(),"text-anchor":"start","dominant-baseline":"alphabetic","xml:space":"preserve",fill:"black",stroke:"none"},children:i}}}var PKo=0;function MKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{anchor_position:r,text:s,font_size:a=1,layer:A="top",ccw_rotation:c=0,anchor_alignment:l="center",is_knockout:u=!1,knockout_padding:g,is_mirrored:h=!1}=t;if(o&&A!==o)return[];if(!r||typeof r.x!="number"||typeof r.y!="number")return cm(`[pcb_silkscreen_text] Invalid anchor_position for "${t.pcb_silkscreen_text_id}": expected {x: number, y: number}, got ${JSON.stringify(r)}`),[];if(!s)return[];const[d,p]=hn(n,[r.x,r.y]),m=Math.abs(n.a),_=A==="bottom"?i.silkscreen.bottom:i.silkscreen.top,I=A==="bottom"?!0:h===!0;if(u){const Q=wKo(s,a);if(!Q.bounds)return[];const w=g?.left??a*.5,M=g?.right??a*.5,k=g?.top??a*.3,R=g?.bottom??a*.3,F=Q.bounds.minX-w,O=Q.bounds.minY-k,U=Q.bounds.maxX-Q.bounds.minX+w+M,Y=Q.bounds.maxY-Q.bounds.minY+k+R,W={minX:F,minY:O,maxX:F+U,maxY:O+Y},te=IRe(l,W),j=F+te.x,J=O+te.y,oe=[{name:"rect",type:"element",value:"",attributes:{x:F.toString(),y:O.toString(),width:U.toString(),height:Y.toString(),fill:"white"},children:[]},Q.textNode],ne=te.x!==0||te.y!==0?[{name:"g",type:"element",value:"",attributes:{transform:`translate(${te.x} ${te.y})`},children:oe}]:oe,le=$b(m0(of(d,p),jb(-c*Math.PI/180),...I?[kx(-1,1)]:[],kx(m,m))),ge=`silkscreen-knockout-mask-${t.pcb_silkscreen_text_id}-${PKo++}`;return[{name:"defs",type:"element",value:"",children:[{name:"mask",type:"element",value:"",attributes:{id:ge},children:ne}],attributes:{}},{name:"rect",type:"element",value:"",children:[],attributes:{x:j.toString(),y:J.toString(),width:U.toString(),height:Y.toString(),fill:_,mask:`url(#${ge})`,transform:le,class:`pcb-silkscreen-text-knockout pcb-silkscreen-${A}`,"data-type":"pcb_silkscreen_text","data-pcb-silkscreen-text-id":t.pcb_silkscreen_text_id,"data-pcb-layer":A}}]}const C=a*m;let y="middle",x="central";switch(l){case"top_left":y="start",x="text-before-edge";break;case"top_center":y="middle",x="text-before-edge";break;case"top_right":y="end",x="text-before-edge";break;case"center_left":y="start",x="central";break;case"center_right":y="end",x="central";break;case"bottom_left":y="start",x="text-after-edge";break;case"bottom_center":y="middle",x="text-after-edge";break;case"bottom_right":y="end",x="text-after-edge";break;default:y="middle",x="central";break}const E=m0(of(d,p),jb(-c*Math.PI/180),...I?[kx(-1,1)]:[]),B=s.split(`
`),S=B.length===1?[{type:"text",value:s,name:"",attributes:{},children:[]}]:B.map((Q,w)=>({type:"element",name:"tspan",value:"",attributes:{x:"0",...w>0?{dy:C.toString()}:{}},children:[{type:"text",value:Q,name:"",attributes:{},children:[]}]}));return[{name:"text",type:"element",attributes:{x:"0",y:"0",dx:"0",dy:"0",fill:_,"font-family":pq,"font-size":C.toString(),"text-anchor":y,"dominant-baseline":x,transform:$b(E),class:`pcb-silkscreen-text pcb-silkscreen-${A}`,"data-pcb-silkscreen-text-id":t.pcb_silkscreen_text_id,stroke:"none","data-type":"pcb_silkscreen_text","data-pcb-layer":A},children:S,value:""}]}function DKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,width:s,height:a,layer:A="top",pcb_silkscreen_rect_id:c,stroke_width:l,is_filled:u,has_stroke:g,is_stroke_dashed:h,corner_radius:d,ccw_rotation:p=0}=t;if(o&&A!==o)return[];if(!r||typeof r.x!="number"||typeof r.y!="number"||typeof s!="number"||typeof a!="number")return cm(`[pcb_silkscreen_rect] Invalid data for "${c}": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(r)}, width=${JSON.stringify(s)}, height=${JSON.stringify(a)}`),[];const[m,_]=hn(n,[r.x,r.y]),f=typeof d=="number"&&d>0?d:0,I=f*Math.abs(n.a),C=f*Math.abs(n.d),y=s*Math.abs(n.a),x=a*Math.abs(n.d),E=l*Math.abs(n.a),B=A==="bottom"?i.silkscreen.bottom:i.silkscreen.top,S={x:(-y/2).toString(),y:(-x/2).toString(),width:y.toString(),height:x.toString(),class:`pcb-silkscreen-rect pcb-silkscreen-${A}`,"data-pcb-silkscreen-rect-id":c,"data-type":"pcb_silkscreen_rect","data-pcb-layer":A};typeof p=="number"&&p!==0?S.transform=`translate(${m} ${_}) rotate(${-p})`:(S.x=(m-y/2).toString(),S.y=(_-x/2).toString()),I>0&&(S.rx=I.toString()),C>0&&(S.ry=C.toString()),S.fill=u?B:"none";let Q;if(g===void 0?Q=E>0:Q=g,Q){if(S.stroke=B,S["stroke-width"]=E.toString(),h){const M=.1*Math.abs(n.a),k=.05*Math.abs(n.a);S["stroke-dasharray"]=`${M} ${k}`}}else S.stroke="none";return[{name:"rect",type:"element",attributes:S,value:"",children:[]}]}var ch={copper:{top:"rgb(200, 52, 52)",inner1:"rgb(255, 140, 0)",inner2:"rgb(255, 215, 0)",inner3:"rgb(50, 205, 50)",inner4:"rgb(64, 224, 208)",inner5:"rgb(138, 43, 226)",inner6:"rgb(255, 105, 180)",inner7:"rgb(0, 191, 255)",inner8:"rgb(160, 82, 45)",bottom:"rgb(77, 127, 196)"},soldermaskWithCopperUnderneath:{top:"rgb(18, 82, 50)",bottom:"rgb(77, 127, 196)"},soldermask:{top:"rgb(12, 55, 33)",bottom:"rgb(12, 55, 33)"},soldermaskOverCopper:{top:"rgb(52, 135, 73)",bottom:"rgb(52, 135, 73)"},substrate:"rgb(201, 162, 110)",drill:"#FF26E2",silkscreen:{top:"#f2eda1",bottom:"#5da9e9"},boardOutline:"rgba(255, 255, 255, 0.5)",courtyard:{top:"#FF00FF",bottom:"rgb(38, 233, 255)"},keepout:"#FF6B6B",debugComponent:{fill:null,stroke:null}};ch.drill,ch.silkscreen.top,ch.silkscreen.bottom,{...ch.copper};function Fx(t,e=ch){return e.copper[t]??"white"}var NKo={bottom:"rgb(105, 105, 105)",top:"rgb(105, 105, 105)"};function hG(t){return NKo[t]??"rgb(105, 105, 105)"}var qge=1,pG=.2,TYt=1.4,kYt=.53,RKo=0;function TKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{anchor_position:r,text:s,font_size:a="0.2mm",layer:A,ccw_rotation:c=0,anchor_alignment:l="center",is_knockout:u=!1,knockout_padding:g,is_mirrored:h=!1}=t,d=A??"top";if(o&&o!==d)return[];if(!r)return[];if(!s)return[];const[p,m]=hn(n,[r.x,r.y]),_=lt.parse(a)??.2,f=Math.abs(n.a),I=Fx(d,i),y=d==="bottom"?!0:h===!0;if(u){const Q=_*kYt,w=MYt({text:s,anchorAlignment:l,fontSize:Q,charAdvance:(qge+pG)*Q,spaceAdvance:(qge+pG)*Q*.6,trailingSpacing:pG*Q,lineHeight:Q*TYt,mapSegment:(fe,pe,ye,Me)=>({x1:pe+fe.x1*Me,y1:ye+(1-fe.y1)*Me,x2:pe+fe.x2*Me,y2:ye+(1-fe.y2)*Me})});if(!w.bounds||!w.pathData)return[];const M=g?.left??Q*.5,k=g?.right??Q*.5,R=g?.top??Q*.3,F=g?.bottom??Q*.3,O=w.bounds.minX-M,U=w.bounds.minY-R,Y=w.bounds.maxX-w.bounds.minX+M+k,W=w.bounds.maxY-w.bounds.minY+R+F,te=Q*.15,j={minX:O,minY:U,maxX:O+Y,maxY:U+W},J=IRe(l,j),oe=O+J.x,ie=U+J.y,ne=[{name:"rect",type:"element",value:"",attributes:{x:O.toString(),y:U.toString(),width:Y.toString(),height:W.toString(),fill:"white"},children:[]},{name:"path",type:"element",value:"",attributes:{d:w.pathData,fill:"none",stroke:"black","stroke-width":te.toString(),"stroke-linecap":"round","stroke-linejoin":"round"},children:[]}],ge=J.x!==0||J.y!==0?[{name:"g",type:"element",value:"",attributes:{transform:`translate(${J.x} ${J.y})`},children:ne}]:ne,_e=$b(m0(of(p,m),jb(-c*Math.PI/180),...y?[kx(-1,1)]:[],kx(f,f))),ue=`knockout-mask-${t.pcb_copper_text_id}-${RKo++}`;return[{name:"defs",type:"element",value:"",children:[{name:"mask",type:"element",value:"",attributes:{id:ue},children:ge}],attributes:{}},{name:"rect",type:"element",value:"",children:[],attributes:{x:oe.toString(),y:ie.toString(),width:Y.toString(),height:W.toString(),fill:I,mask:`url(#${ue})`,transform:_e,class:`pcb-copper-text-knockout pcb-copper-${d}`,"data-type":"pcb_copper_text","data-pcb-copper-text-id":t.pcb_copper_text_id}}]}const x=_*kYt,E=MYt({text:s,anchorAlignment:l,fontSize:x,charAdvance:(qge+pG)*x,spaceAdvance:(qge+pG)*x*.6,trailingSpacing:pG*x,lineHeight:x*TYt,mapSegment:(Q,w,M,k)=>({x1:w+Q.x1*k,y1:M+(1-Q.y1)*k,x2:w+Q.x2*k,y2:M+(1-Q.y2)*k})});if(!E.pathData)return[];const B=$b(m0(of(p,m),jb(-c*Math.PI/180),...y?[kx(-1,1)]:[],kx(f,f))),S=x*.15;return[{name:"path",type:"element",attributes:{d:E.pathData,fill:"none",stroke:I,"stroke-width":S.toString(),"stroke-linecap":"round","stroke-linejoin":"round",transform:B,class:`pcb-copper-text pcb-copper-${d}`,"data-type":"pcb_copper_text","data-pcb-copper-text-id":t.pcb_copper_text_id},children:[],value:""}]}function kKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,radius:s,layer:a="top",pcb_silkscreen_circle_id:A,stroke_width:c=1,is_filled:l}=t;if(o&&a!==o)return[];if(!r||typeof r.x!="number"||typeof r.y!="number"||typeof s!="number")return console.error("Invalid PCB Silkscreen Circle data:",{center:r,radius:s}),[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=c*Math.abs(n.a),p=a==="bottom"?i.silkscreen.bottom:i.silkscreen.top;return[{name:"circle",type:"element",attributes:{cx:u.toString(),cy:g.toString(),r:h.toString(),class:`pcb-silkscreen-circle pcb-silkscreen-${a}`,fill:l?p:"none",stroke:p,"stroke-width":d.toString(),"data-pcb-silkscreen-circle-id":A,"data-type":"pcb_silkscreen_circle","data-pcb-layer":a},value:"",children:[]}]}function FKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{x1:r,y1:s,x2:a,y2:A,stroke_width:c,layer:l="top",pcb_silkscreen_line_id:u}=t;if(o&&l!==o)return[];if(typeof r!="number"||typeof s!="number"||typeof a!="number"||typeof A!="number")return cm(`[pcb_silkscreen_line] Invalid coordinates for "${u}": expected x1, y1, x2, y2 as numbers, got x1=${JSON.stringify(r)}, y1=${JSON.stringify(s)}, x2=${JSON.stringify(a)}, y2=${JSON.stringify(A)}`),[];const[g,h]=hn(n,[r,s]),[d,p]=hn(n,[a,A]),m=c*Math.abs(n.a),_=l==="bottom"?i.silkscreen.bottom:i.silkscreen.top;return[{name:"line",type:"element",attributes:{x1:g.toString(),y1:h.toString(),x2:d.toString(),y2:p.toString(),stroke:_,"stroke-width":m.toString(),class:`pcb-silkscreen-line pcb-silkscreen-${l}`,"data-pcb-silkscreen-line-id":u,"data-type":"pcb_silkscreen_line","data-pcb-layer":l},value:"",children:[]}]}function LKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,width:s,height:a,layer:A="top",pcb_silkscreen_pill_id:c,ccw_rotation:l=0}=t;if(o&&A!==o)return[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=a*Math.abs(n.d),m=Math.min(s,a)/2,_=m*Math.abs(n.a),f=m*Math.abs(n.d),I=A==="bottom"?i.silkscreen.bottom:i.silkscreen.top;return[{name:"rect",type:"element",attributes:{x:(u-h/2).toString(),y:(g-d/2).toString(),width:h.toString(),height:d.toString(),rx:_.toString(),ry:f.toString(),fill:"none",stroke:I,"stroke-width":(.1*Math.abs(n.a)).toString(),class:`pcb-silkscreen-pill pcb-silkscreen-${A}`,"data-pcb-silkscreen-pill-id":c,"data-type":"pcb_silkscreen_pill","data-pcb-layer":A,...l!==0&&{transform:`rotate(${-l} ${u} ${g})`}},value:"",children:[]}]}function HKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,radius_x:s,radius_y:a,layer:A="top",pcb_silkscreen_oval_id:c,ccw_rotation:l=0}=t;if(o&&A!==o)return[];if(!r||typeof r.x!="number"||typeof r.y!="number"||typeof s!="number"||typeof a!="number")return cm(`[pcb_silkscreen_oval] Invalid data for "${c}": expected center {x: number, y: number}, radius_x: number, radius_y: number, got center=${JSON.stringify(r)}, radius_x=${JSON.stringify(s)}, radius_y=${JSON.stringify(a)}`),[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=a*Math.abs(n.d),p=A==="bottom"?i.silkscreen.bottom:i.silkscreen.top;return[{name:"ellipse",type:"element",attributes:{cx:u.toString(),cy:g.toString(),rx:h.toString(),ry:d.toString(),fill:"none",stroke:p,"stroke-width":(.1*Math.abs(n.a)).toString(),class:`pcb-silkscreen-oval pcb-silkscreen-${A}`,"data-pcb-silkscreen-oval-id":c,"data-type":"pcb_silkscreen_oval","data-pcb-layer":A,...l!==0&&{transform:`rotate(${-l} ${u} ${g})`}},value:"",children:[]}]}function OKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,width:s,height:a,layer:A="top",pcb_courtyard_rect_id:c,ccw_rotation:l=0}=t;if(o&&A!==o)return[];if(!r||typeof r.x!="number"||typeof r.y!="number"||typeof s!="number"||typeof a!="number")return cm(`[pcb_courtyard_rect] Invalid data for "${c}": expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(r)}, width=${JSON.stringify(s)}, height=${JSON.stringify(a)}`),[];const[u,g]=hn(n,[r.x,r.y]),h=s*Math.abs(n.a),d=a*Math.abs(n.d),p=.05*Math.abs(n.a),m=A==="bottom"?i.courtyard.bottom:i.courtyard.top,_={x:(-h/2).toString(),y:(-d/2).toString(),width:h.toString(),height:d.toString(),class:`pcb-courtyard-rect pcb-courtyard-${A}`,"data-pcb-courtyard-rect-id":c,"data-type":"pcb_courtyard_rect","data-pcb-layer":A,"stroke-linejoin":"round"};return typeof l=="number"&&l!==0?_.transform=`translate(${u} ${g}) rotate(${-l})`:(_.x=(u-h/2).toString(),_.y=(g-d/2).toString()),_.fill="none",_.stroke=m,_["stroke-width"]=p.toString(),[{name:"rect",type:"element",attributes:_,value:"",children:[]}]}function GKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{layer:r="top",pcb_courtyard_polygon_id:s,points:a,color:A}=t;if(o&&r!==o)return[];if(!a||a.length===0)return cm(`[pcb_courtyard_polygon] Invalid data for "${s}": expected non-empty array of points, got ${JSON.stringify(a)}`),[];const l=a.map(p=>hn(n,[p.x,p.y])).map(p=>`${p[0]},${p[1]}`).join(" "),u=.05*Math.abs(n.a),g=A??(r==="bottom"?i.courtyard.bottom:i.courtyard.top);return[{name:"polygon",type:"element",attributes:{points:l,class:`pcb-courtyard-polygon pcb-courtyard-${r}`,"data-pcb-courtyard-polygon-id":s,"data-type":"pcb_courtyard_polygon","data-pcb-layer":r,fill:"none",stroke:g,"stroke-width":u.toString(),"stroke-linejoin":"round"},value:"",children:[]}]}function YKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{layer:r,pcb_courtyard_outline_id:s,outline:a}=t;if(o&&r!==o)return[];if(!a||a.length===0)return cm(`[pcb_courtyard_outline] Invalid data for "${s}": expected non-empty array of points, got ${JSON.stringify(a)}`),[];const c=a.map(d=>hn(n,[d.x,d.y])).map(d=>`${d[0]},${d[1]}`).join(" "),l=.05*Math.abs(n.a),u=r==="bottom"?i.courtyard.bottom:i.courtyard.top;return[{name:"polygon",type:"element",attributes:{points:c,class:`pcb-courtyard-outline pcb-courtyard-${r}`,"data-pcb-courtyard-outline-id":s,"data-type":"pcb_courtyard_outline","data-pcb-layer":r,fill:"none",stroke:u,"stroke-width":l.toString(),"stroke-linejoin":"round"},value:"",children:[]}]}function UKo(t,e){const{transform:n,layer:o,colorMap:i}=e,{center:r,radius:s,layer:a="top",pcb_courtyard_circle_id:A}=t;if(o&&a!==o)return[];if(!r||typeof r.x!="number"||typeof r.y!="number"||typeof s!="number")return console.error(`[pcb_courtyard_circle] Invalid data for "${A}": expected center {x: number, y: number}, radius: number, got center=${JSON.stringify(r)}, radius=${JSON.stringify(s)}`),[];const[c,l]=hn(n,[r.x,r.y]),u=s*Math.abs(n.a),g=.05*Math.abs(n.a),h=a==="bottom"?i.courtyard.bottom:i.courtyard.top,d={cx:c.toString(),cy:l.toString(),r:u.toString(),class:`pcb-courtyard-circle pcb-courtyard-${a}`,"data-pcb-courtyard-circle-id":A,"data-type":"pcb_courtyard_circle","data-pcb-layer":a};return d.fill="none",d.stroke=h,d["stroke-width"]=g.toString(),[{name:"circle",type:"element",attributes:d,value:"",children:[]}]}var Lx=1e-9;function KKo(t,e){const{startIsInsideCopperPour:n,endIsInsideCopperPour:o,start:i,end:r}=t;if(n===o)return t;const s=PR(i),a=PR(r),A=zKo(e).flatMap(h=>WKo(h,s,a));if(A.length===0)return t;const c=o?Math.min(...A):Math.max(...A),l=HYt(s,a,c),u=VKo(t.startWidth,t.endWidth,c),g={...t,start:n?l:i,end:o?l:r,startWidth:n?u:t.startWidth,endWidth:o?u:t.endWidth};return $Ko(g.start,g.end)?null:g}function VKo(t,e,n){return t+(e-t)*n}function zKo(t){switch(t.shape){case"rect":return[JKo(t)];case"polygon":return[t.points.map(PR)];case"brep":return[t.brep_shape.outer_ring.vertices.map(OYt),...t.brep_shape.inner_rings.map(e=>e.vertices.map(OYt))]}}function JKo(t){const e=PR(t.center),n=t.width/2,o=t.height/2,i=(t.rotation??0)*Math.PI/180,r=Math.cos(i),s=Math.sin(i);return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(a=>({x:e.x+a.x*r-a.y*s,y:e.y+a.x*s+a.y*r}))}function WKo(t,e,n){const o=[];for(let i=0;i<t.length;i++){const r=t[i],s=t[(i+1)%t.length];if(!r||!s)continue;if(r.bulge){o.push(...jKo(e,n,r,s,r.bulge));continue}const a=FYt(e,n,r,s);a!==null&&o.push(a)}return o}function jKo(t,e,n,o,i){const r=o.x-n.x,s=o.y-n.y,a=Math.hypot(r,s);if(a<Lx||Math.abs(i)<Lx){const C=FYt(t,e,n,o);return C===null?[]:[C]}const A=a*(1-i**2)/(4*i),c={x:(n.x+o.x)/2-s/a*A,y:(n.y+o.y)/2+r/a*A},l=Math.atan2(n.y-c.y,n.x-c.x),u=4*Math.atan(i),g=Math.hypot(n.x-c.x,n.y-c.y),h={x:e.x-t.x,y:e.y-t.y},d={x:t.x-c.x,y:t.y-c.y},p=yRe(h,h);if(p<Lx)return[];const m=2*yRe(d,h),_=yRe(d,d)-g**2,f=m**2-4*p*_;if(f<-Lx)return[];const I=Math.sqrt(Math.max(0,f));return[(-m-I)/(2*p),(-m+I)/(2*p)].filter(C=>{if(C<-Lx||C>1+Lx)return!1;const y=HYt(t,e,C),x=Math.atan2(y.y-c.y,y.x-c.x);return(u>0?LYt(x-l):LYt(l-x))<=Math.abs(u)+Lx})}function FYt(t,e,n,o){const i={x:e.x-t.x,y:e.y-t.y},r={x:o.x-n.x,y:o.y-n.y},s=CRe(i,r);if(Math.abs(s)<Lx)return null;const a={x:n.x-t.x,y:n.y-t.y},A=CRe(a,r)/s,c=CRe(a,i)/s;return A<-Lx||A>1+Lx||c<-Lx||c>1+Lx?null:Math.min(1,Math.max(0,A))}function CRe(t,e){return t.x*e.y-t.y*e.x}function yRe(t,e){return t.x*e.x+t.y*e.y}function LYt(t){const e=2*Math.PI,n=t%e;return n<0?n+e:n}function HYt(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}}function PR(t){return{x:lt.parse(t.x),y:lt.parse(t.y)}}function OYt(t){return{...PR(t),bulge:t.bulge}}function $Ko(t,e){const n=PR(t),o=PR(e);return Math.abs(n.x-o.x)<Lx&&Math.abs(n.y-o.y)<Lx}function qKo(t){return t.route_type==="through_pad"?[t.start,t.end]:[t]}function XKo(t){const e=[];for(let n=0;n<t.length-1;n++){const o=t[n],i=t[n+1];if(!o||!i)continue;const r=o.route_type==="through_pad"?o.end:o,s=i.route_type==="through_pad"?i.start:i,a=o.route_type==="wire"?o.layer:o.route_type==="through_pad"?o.end_layer:i.route_type==="wire"?i.layer:i.route_type==="through_pad"?i.start_layer:null;if(!a||ZKo(r,s))continue;const A=GYt(o),c=GYt(i),l=xRe(o)??xRe(i)??0,u=xRe(i)??l;e.push({start:r,end:s,layer:a,width:l,startWidth:l,endWidth:u,isInsideCopperPour:A&&c,startIsInsideCopperPour:A,endIsInsideCopperPour:c,copperPourId:A?YYt(o):c?YYt(i):void 0})}for(const n of t)if(!(!n||n.route_type!=="through_pad"))for(const o of new Set([n.start_layer,n.end_layer]))e.push({start:n.start,end:n.end,layer:o,width:n.width,startWidth:n.width,endWidth:n.width,isInsideCopperPour:!1,startIsInsideCopperPour:!1,endIsInsideCopperPour:!1});return e}function xRe(t){return"width"in t?lt.parse(t.width):void 0}function GYt(t){return"is_inside_copper_pour"in t&&t.is_inside_copper_pour===!0}function YYt(t){if("copper_pour_id"in t)return t.copper_pour_id}function ZKo(t,e){const n=lt.parse(t.x),o=lt.parse(t.y),i=lt.parse(e.x),r=lt.parse(e.y);return n===i&&o===r}function eVo(t){const e=[],n=[];for(let o=0;o<t.length;o++){const i=t[o];if(!i)continue;const r=tVo(t,o),s=ERe(-r.y,r.x),a=i.width/2;e.push({x:i.x+s.x*a,y:i.y+s.y*a}),n.push({x:i.x-s.x*a,y:i.y-s.y*a})}return e.concat(n.reverse())}function tVo(t,e){if(t.length<2)return{x:1,y:0};if(e<=0)return Xge(t[0],t[1]);if(e>=t.length-1)return Xge(t[t.length-2],t[t.length-1]);const n=Xge(t[e-1],t[e]),o=Xge(t[e],t[e+1]),i=ERe(n.x+o.x,n.y+o.y);return i.x!==0||i.y!==0?i:n.x!==0||n.y!==0?n:o.x!==0||o.y!==0?o:{x:1,y:0}}function Xge(t,e){if(!t||!e)return{x:1,y:0};const n=ERe(e.x-t.x,e.y-t.y);return n.x===0&&n.y===0?{x:1,y:0}:n}function ERe(t,e){const n=Math.hypot(t,e);return n<=Number.EPSILON?{x:0,y:0}:{x:t/n,y:e/n}}function UYt({elementType:t,shapeAttributes:e,layer:n,fillColor:o,fillOpacity:i,className:r,additionalAttributes:s}){const a={class:r,fill:o,"fill-opacity":i,"data-type":"pcb_soldermask","data-pcb-layer":n,...e,...s};return{name:t,type:"element",value:"",children:[],attributes:a}}function KYt(t,e){const{transform:n,colorMap:o}=e,i=e.layer??"top",r=e.showSolderMask&&(i==="top"||i==="bottom");if(r&&!t.layers.includes(i))return[];const s=t,a=(i==="top"?s.tented_on_top:s.tented_on_bottom)??s.is_tented,[A,c]=hn(n,[t.x,t.y]),l=t.outer_diameter*Math.abs(n.a),u=t.outer_diameter*Math.abs(n.a),g=t.hole_diameter*Math.abs(n.a),h=t.hole_diameter*Math.abs(n.a),d=Math.min(l,u)/2,p=Math.min(g,h)/2,m={name:"g",type:"element",value:"",attributes:{"data-type":"pcb_via","data-pcb-layer":"through"},children:[{name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-hole-outer",fill:o.copper[r?i:"top"],cx:A.toString(),cy:c.toString(),r:d.toString(),"data-type":"pcb_via","data-pcb-layer":r?i:"top"}},{name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-hole-inner",fill:o.drill,cx:A.toString(),cy:c.toString(),r:p.toString(),"data-type":"pcb_via","data-pcb-layer":"drill"}}]};return r&&a&&m.children.push(UYt({elementType:"circle",shapeAttributes:{cx:A.toString(),cy:c.toString(),r:d.toString()},layer:i,fillColor:o.soldermaskWithCopperUnderneath[i],fillOpacity:"1",className:"pcb-via-tenting"})),[m]}function VYt(t,e){if(t.shape==="rect"){const[n,o]=hn(e,[t.center.x,t.center.y]),i=t.width*Math.abs(e.a),r=t.height*Math.abs(e.d),s=-(t.rotation??0);return{elementType:"rect",shapeAttributes:{x:(-i/2).toString(),y:(-r/2).toString(),width:i.toString(),height:r.toString(),transform:$b(m0(of(n,o),jb(s*Math.PI/180)))}}}if(t.shape==="polygon")return!t.points||t.points.length===0?null:{elementType:"polygon",shapeAttributes:{points:t.points.map(o=>hn(e,[o.x,o.y])).map(o=>`${o[0]},${o[1]}`).join(" ")}};if(t.shape==="brep"){const{brep_shape:n}=t;let o=jge(n.outer_ring.vertices,e);for(const i of n.inner_rings??[])o+=` ${jge(i.vertices,e)}`;return{elementType:"path",shapeAttributes:{d:o,"fill-rule":"evenodd"}}}return null}function zYt(t){return`copper-pour-trace-mask-${t}`.replace(/[^a-zA-Z0-9_-]/g,"_")}function nVo({layer:t,circuitJson:e}){for(const n of e)if(!(n.type!=="pcb_copper_pour"||n.layer!==t))return zYt(t)}function oVo({circuitJson:t,transform:e,svgWidth:n,svgHeight:o,usedMaskIds:i}){if(i.size===0)return null;const r=new Map;for(const a of t){if(a.type!=="pcb_copper_pour")continue;const A=a,c=zYt(A.layer);if(!i.has(c))continue;const l=r.get(c);l?l.push(A):r.set(c,[A])}if(r.size===0)return null;const s=[];for(const[a,A]of r){const c=[{name:"rect",type:"element",value:"",children:[],attributes:{x:"0",y:"0",width:n.toString(),height:o.toString(),fill:"#fff"}}];for(const l of A){const u=VYt(l,e);u&&c.push({name:u.elementType,type:"element",value:"",children:[],attributes:{...u.shapeAttributes,fill:"#000"}})}s.push({name:"mask",type:"element",value:"",children:c,attributes:{id:a,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:n.toString(),height:o.toString()}})}return{name:"defs",type:"element",value:"",children:s,attributes:{class:"copper-pour-trace-mask-defs"}}}function iVo(t){const e=[],n=new Map;for(const o of t){const i=o.attributes?.["data-type"],r=o.attributes?.mask;if(!(i==="pcb_trace"||i==="pcb_trace_soldermask")||!r?.includes("#copper-pour-trace-mask-")){e.push(o);continue}let a=n.get(r);if(!a){const d={name:"g",type:"element",value:"",children:[],attributes:{class:"pcb-trace-mask-group",mask:r}};a={object:d,pathsByAttributes:new Map},n.set(r,a),e.push(d)}const{mask:A,d:c="",...l}=o.attributes,u=JSON.stringify(l),g=a.pathsByAttributes.get(u);if(g){g.attributes.d+=` ${c}`;continue}const h={...o,attributes:{...l,d:c}};a.pathsByAttributes.set(u,h),a.object.children.push(h)}return e}function rVo(t,e){const{transform:n,layer:o,colorMap:i,showSolderMask:r}=e;if(!t.route||!Array.isArray(t.route)||t.route.length<2)return[];const s=[],a=gVo(e),A=new Map,c=[];for(const u of XKo(t.route)){let g=u;if(g.isInsideCopperPour)continue;if(g.copperPourId&&g.startIsInsideCopperPour!==g.endIsInsideCopperPour){const d=e.circuitJson?.find(p=>p.type==="pcb_copper_pour"&&p.pcb_copper_pour_id===g.copperPourId);if(d){const p=KKo(g,d);if(!p)continue;g=p}}const h=g.layer;h&&(o&&h!==o||c.push(g))}const l=u=>{A.has(u)||A.set(u,e.circuitJson?nVo({layer:u,circuitJson:e.circuitJson}):void 0);const g=A.get(u);return g?(e.usedCopperPourTraceMaskIds?.add(g),{mask:`url(#${g})`}):{}};if(t.route_thickness_mode==="interpolated")for(const u of sVo(c)){const g=u[0]?.layer;if(!g)continue;const h=aVo(u,n);if(!h)continue;const d=Fx(g,i),p=i.soldermaskWithCopperUnderneath[g];s.push({name:"path",type:"element",value:"",children:[],attributes:{class:r?"pcb-soldermask":"pcb-trace",fill:r?p:d,stroke:"none",d:h,"shape-rendering":"geometricPrecision","data-type":r?"pcb_trace_soldermask":"pcb_trace","data-pcb-layer":g,...l(g)}})}else for(const u of c){const g=hn(n,[u.start.x,u.start.y]),h=hn(n,[u.end.x,u.end.y]),d=u.layer,p=Fx(d,i),m=i.soldermaskWithCopperUnderneath[d],_=u.width?(u.width*Math.abs(n.a)).toString():"0.3",f=l(d);if(r){const I={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask",stroke:m,fill:"none",d:`M ${g[0]} ${g[1]} L ${h[0]} ${h[1]}`,"stroke-width":_,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"crispEdges","data-type":"pcb_trace_soldermask","data-pcb-layer":d,...f}};s.push(I)}else{const I={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-trace",stroke:p,fill:"none",d:`M ${g[0]} ${g[1]} L ${h[0]} ${h[1]}`,"stroke-width":_,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"crispEdges","data-type":"pcb_trace","data-pcb-layer":d,...f}};s.push(I)}}for(const[u,g]of t.route.entries())!g||g.route_type!=="via"||a.has(WYt(g))||s.push(...KYt(cVo(t,g,u,e),e));return s}function sVo(t){const e=[];for(const n of t){const o=e[e.length-1],i=o?.[o.length-1];o&&i?.layer===n.layer&&AVo(i.end,n.start)?o.push(n):e.push([n])}return e}function aVo(t,e){const n=t[0];if(!n)return"";const o=[{x:lt.parse(n.start.x),y:lt.parse(n.start.y),width:n.startWidth},...t.map(A=>({x:lt.parse(A.end.x),y:lt.parse(A.end.y),width:A.endWidth}))],r=eVo(o).map(A=>hn(e,[A.x,A.y])),[s,...a]=r;return s?[`M ${s[0]} ${s[1]}`,...a.map(A=>`L ${A[0]} ${A[1]}`),"Z"].join(" "):""}function AVo(t,e){return lt.parse(t.x)===lt.parse(e.x)&&lt.parse(t.y)===lt.parse(e.y)}function cVo(t,e,n,o){const i=lVo(t.route,n),{holeDiameter:r,outerDiameter:s}=uVo(o,i);return{type:"pcb_via",pcb_via_id:`${t.pcb_trace_id}_route_via_${n}`,pcb_trace_id:t.pcb_trace_id,x:e.x,y:e.y,outer_diameter:s,hole_diameter:r,layers:[e.from_layer,e.to_layer]}}function lVo(t,e){const n=JYt(t,e,-1),o=JYt(t,e,1);return Math.max(n??0,o??0)}function JYt(t,e,n){for(let o=e+n;o>=0&&o<t.length;o+=n){const i=t[o];if(!(!i||!("width"in i)||typeof i.width!="number"))return i.width}}function uVo(t,e){const n=t.circuitJson?.find(c=>c.type==="pcb_board"),o=Zge(n?.min_via_hole_diameter),i=Zge(n?.min_via_pad_diameter),r=Math.max(e,.3),s=Math.max(r*2,.6);return{holeDiameter:o??r,outerDiameter:i??s}}function gVo(t){return new Set(t.circuitJson?.filter(e=>e.type==="pcb_via").map(e=>WYt(e))??[])}function WYt(t){const e=Zge(t.x),n=Zge(t.y);return e!==void 0&&n!==void 0?`${e}:${n}`:`${String(t.x)}:${String(t.y)}`}function Zge(t){if(t==null)return;const e=lt.safeParse(t);return e.success?e.data:void 0}function dVo(t,e){const{transform:n,layer:o,colorMap:i,showSolderMask:r}=e;if(o&&t.layer!==o)return[];const s=wYt(t,e.circuitJson),a=!!t?.is_covered_with_solder_mask,A=r&&a,c=i.soldermaskWithCopperUnderneath[t.layer]??i.soldermaskWithCopperUnderneath.top,l=(t.soldermask_margin??0)*Math.abs(n.a);if(t.shape==="rect"||t.shape==="rotated_rect"){const u=t.width*Math.abs(n.a),g=t.height*Math.abs(n.d),[h,d]=hn(n,[t.x,t.y]),m=(t.corner_radius??t.rect_border_radius??0)*Math.abs(n.a),_={left:(t.soldermask_margin_left??t.soldermask_margin??0)*Math.abs(n.a),right:(t.soldermask_margin_right??t.soldermask_margin??0)*Math.abs(n.a),top:(t.soldermask_margin_top??t.soldermask_margin??0)*Math.abs(n.a),bottom:(t.soldermask_margin_bottom??t.soldermask_margin??0)*Math.abs(n.a)},f=_.left<0||_.right<0||_.top<0||_.bottom<0,I=_.left===0&&_.right===0&&_.top===0&&_.bottom===0;if(t.shape==="rotated_rect"&&t.ccw_rotation){const S={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:Fx(t.layer,i),x:(-u/2).toString(),y:(-g/2).toString(),width:u.toString(),height:g.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...s,...m?{rx:m.toString(),ry:m.toString()}:{}}};if(!A)return[S];const Q=u+_.left+_.right,w=g+_.top+_.bottom,M=m?m+l:0;if(f){const R={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,x:(-u/2).toString(),y:(-g/2).toString(),width:u.toString(),height:g.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...m?{rx:m.toString(),ry:m.toString()}:{}}},F={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-exposed",fill:Fx(t.layer,i),x:(-u/2-_.left).toString(),y:(-g/2-_.top).toString(),width:Q.toString(),height:w.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,"data-type":"pcb_soldermask","data-pcb-layer":t.layer,...M>0?{rx:M.toString(),ry:M.toString()}:{}}};return[R,F]}return I?[{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,x:(-u/2).toString(),y:(-g/2).toString(),width:u.toString(),height:g.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...m?{rx:m.toString(),ry:m.toString()}:{}}}]:[{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:i.substrate,x:(-u/2-_.left).toString(),y:(-g/2-_.top).toString(),width:Q.toString(),height:w.toString(),transform:`translate(${h} ${d}) rotate(${-t.ccw_rotation})`,...M>0?{rx:M.toString(),ry:M.toString()}:{},"data-type":"pcb_soldermask_opening","data-pcb-layer":t.layer}},S]}const C={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:Fx(t.layer,i),x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...s,...m?{rx:m.toString(),ry:m.toString()}:{}}};if(!A)return[C];const y=u+_.left+_.right,x=g+_.top+_.bottom,E=m?m+l:0;if(f){const S={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...m?{rx:m.toString(),ry:m.toString()}:{}}},Q={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-exposed",fill:Fx(t.layer,i),x:(h-u/2-_.left).toString(),y:(d-g/2-_.top).toString(),width:y.toString(),height:x.toString(),"data-type":"pcb_soldermask","data-pcb-layer":t.layer,...E>0?{rx:E.toString(),ry:E.toString()}:{}}};return[S,Q]}return I?[{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,x:(h-u/2).toString(),y:(d-g/2).toString(),width:u.toString(),height:g.toString(),...E>0?{rx:m.toString(),ry:m.toString()}:{},"data-type":"pcb_smtpad","data-pcb-layer":t.layer}}]:[{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:i.substrate,x:(h-u/2-_.left).toString(),y:(d-g/2-_.top).toString(),width:y.toString(),height:x.toString(),...E>0?{rx:E.toString(),ry:E.toString()}:{},"data-type":"pcb_soldermask_opening","data-pcb-layer":t.layer}},C]}if(t.shape==="pill"||t.shape==="rotated_pill"){const u=t.shape==="rotated_pill",g=t.width*Math.abs(n.a),h=t.height*Math.abs(n.d),d=t.radius*Math.abs(n.a),[p,m]=hn(n,[t.x,t.y]),_=u?{transform:`translate(${p} ${m}) rotate(${-(t.ccw_rotation??0)})`}:void 0,f={class:"pcb-pad",fill:Fx(t.layer,i),x:u?(-g/2).toString():(p-g/2).toString(),y:u?(-h/2).toString():(m-h/2).toString(),width:g.toString(),height:h.toString(),rx:d.toString(),ry:d.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...s,..._??{}},I={name:"rect",type:"element",value:"",children:[],attributes:f};if(!A)return[I];const C=g+2*l,y=h+2*l,x=d+l;if(l<0){const S={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,x:u?(-g/2).toString():(p-g/2).toString(),y:u?(-h/2).toString():(m-h/2).toString(),width:g.toString(),height:h.toString(),rx:d.toString(),ry:d.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer,..._??{}}},Q={class:"pcb-pad-exposed",fill:Fx(t.layer,i),x:u?(-C/2).toString():(p-C/2).toString(),y:u?(-y/2).toString():(m-y/2).toString(),width:C.toString(),height:y.toString(),rx:x.toString(),ry:x.toString(),"data-type":"pcb_soldermask","data-pcb-layer":t.layer,..._??{}};return[S,{name:"rect",type:"element",value:"",children:[],attributes:Q}]}if(l===0)return[{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,x:u?(-g/2).toString():(p-g/2).toString(),y:u?(-h/2).toString():(m-h/2).toString(),width:g.toString(),height:h.toString(),rx:d.toString(),ry:d.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer,..._??{}}}];const E={class:"pcb-soldermask-cutout",fill:i.substrate,x:u?(-C/2).toString():(p-C/2).toString(),y:u?(-y/2).toString():(m-y/2).toString(),width:C.toString(),height:y.toString(),rx:x.toString(),ry:x.toString(),"data-type":"pcb_soldermask_opening","data-pcb-layer":t.layer,..._??{}};return[{name:"rect",type:"element",value:"",children:[],attributes:E},I]}if(t.shape==="circle"){const u=t.radius*Math.abs(n.a),[g,h]=hn(n,[t.x,t.y]),d={name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:Fx(t.layer,i),cx:g.toString(),cy:h.toString(),r:u.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...s}};if(!A)return[d];const p=u+l;if(l<0){const _={name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,cx:g.toString(),cy:h.toString(),r:u.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer}},f={name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-pad-exposed",fill:Fx(t.layer,i),cx:g.toString(),cy:h.toString(),r:p.toString(),"data-type":"pcb_soldermask","data-pcb-layer":t.layer}};return[_,f]}return l===0?[{name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,cx:g.toString(),cy:h.toString(),r:u.toString(),"data-type":"pcb_smtpad","data-pcb-layer":t.layer}}]:[{name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:i.substrate,cx:g.toString(),cy:h.toString(),r:p.toString(),"data-type":"pcb_soldermask_opening","data-pcb-layer":t.layer}},d]}if(t.shape==="polygon"){const u=(t.points??[]).map(p=>hn(n,[p.x,p.y])),g={name:"polygon",type:"element",value:"",children:[],attributes:{class:"pcb-pad",fill:Fx(t.layer,i),points:u.map(p=>p.join(",")).join(" "),"data-type":"pcb_smtpad","data-pcb-layer":t.layer,...s}};if(!A)return[g];let h=u;if(l!==0){const p=u.reduce((_,f)=>_+f[0],0)/u.length,m=u.reduce((_,f)=>_+f[1],0)/u.length;h=u.map(([_,f])=>{const I=_-p,C=f-m,y=Math.sqrt(I*I+C*C);if(y===0)return[_,f];const x=I/y,E=C/y;return[_+x*l,f+E*l]})}if(l<0){const p={name:"polygon",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,points:u.map(_=>_.join(",")).join(" "),"data-type":"pcb_smtpad","data-pcb-layer":t.layer}},m={name:"polygon",type:"element",value:"",children:[],attributes:{class:"pcb-pad-exposed",fill:Fx(t.layer,i),points:h.map(_=>_.join(",")).join(" "),"data-type":"pcb_soldermask","data-pcb-layer":t.layer}};return[p,m]}return l===0?[{name:"polygon",type:"element",value:"",children:[],attributes:{class:"pcb-pad-covered",fill:c,points:u.map(m=>m.join(",")).join(" "),"data-type":"pcb_smtpad","data-pcb-layer":t.layer}}]:[{name:"polygon",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:i.substrate,points:h.map(p=>p.join(",")).join(" "),"data-type":"pcb_soldermask_opening","data-pcb-layer":t.layer}},g]}return[]}var jYt=.05,hE=4,$Yt=8,qYt=11,mG=1,_G=5,XYt=1.5,ZYt=2,BRe=_G+2,bRe=ZYt+2,_q=_G+hE+6,hVo=15,pVo=10,mVo=.2,_Vo=50;function SRe(t){const{groupAnchorPosition:e,componentPosition:n,transform:o,componentWidth:i=0,componentHeight:r=0,displayXOffset:s,displayYOffset:a}=t,A=[],[c,l]=hn(o,[e.x,e.y]),[u,g]=hn(o,[n.x,n.y]),h=n.x-e.x,d=n.y-e.y,p=Math.abs(o.a),m=i*p,_=r*p;A.push(IVo(c,l));const f=fVo(c,l,u,g);A.push({name:"line",type:"element",attributes:{x1:f.x1.toString(),y1:f.y1.toString(),x2:f.x2.toString(),y2:f.y2.toString(),stroke:"#ffffff","stroke-width":"0.5","stroke-dasharray":"3,3",opacity:"0.5",class:"anchor-offset-connector"},children:[],value:""}),A.push({name:"circle",type:"element",attributes:{cx:u.toString(),cy:g.toString(),r:ZYt.toString(),fill:"#ffffff",opacity:"0.7",class:"anchor-offset-component-marker"},children:[],value:""});const I=Math.abs(g-l),C=Math.abs(u-c),y=Math.sqrt(C*C+I*I),x=_/2+hVo,E=Math.max(x,Math.min(_Vo,y*mVo));let B=d>0?g-E:g+E;const S=m/2+pVo;let Q=h>0?u+S:u-S;if(ede(B,l)||ede(B,g)){const w=Math.min(l,g),M=Math.max(l,g),k=w-_q,R=M+_q;B=Math.abs(B-k)<Math.abs(B-R)?k:R}if(ede(Q,c)||ede(Q,u)){const w=Math.min(c,u),M=Math.max(c,u),k=w-_q,R=M+_q;Q=Math.abs(Q-k)<Math.abs(Q-R)?k:R}return Math.abs(h)>jYt&&A.push(...CVo({startX:c,endX:u,y:B,offsetMm:h,offsetY:d,displayOffset:s})),Math.abs(d)>jYt&&A.push(...yVo({x:Q,startY:l,endY:g,offsetMm:d,offsetX:h,displayOffset:a})),A}function fVo(t,e,n,o){const i=n-t,r=o-e,s=Math.hypot(i,r),a=BRe+bRe;if(!(s>a))return{x1:t,y1:e,x2:n,y2:o};const A=i/s,c=r/s;return{x1:t+A*BRe,y1:e+c*BRe,x2:n-A*bRe,y2:o-c*bRe}}function ede(t,e){return Math.abs(t-e)<_q}function IVo(t,e){return{name:"g",type:"element",attributes:{class:"anchor-offset-marker","data-type":"anchor_offset_marker"},children:[{name:"line",type:"element",attributes:{x1:t.toString(),y1:(e-_G).toString(),x2:t.toString(),y2:(e+_G).toString(),stroke:"#ffffff","stroke-width":XYt.toString(),"stroke-linecap":"round"},children:[],value:""},{name:"line",type:"element",attributes:{x1:(t-_G).toString(),y1:e.toString(),x2:(t+_G).toString(),y2:e.toString(),stroke:"#ffffff","stroke-width":XYt.toString(),"stroke-linecap":"round"},children:[],value:""}],value:""}}function CVo({startX:t,endX:e,y:n,offsetMm:o,offsetY:i,displayOffset:r}){const s=[];s.push({name:"line",type:"element",attributes:{x1:t.toString(),y1:n.toString(),x2:e.toString(),y2:n.toString(),stroke:"#ffffff","stroke-width":mG.toString(),class:"anchor-offset-dimension-x"},children:[],value:""}),s.push({name:"line",type:"element",attributes:{x1:t.toString(),y1:(n-hE).toString(),x2:t.toString(),y2:(n+hE).toString(),stroke:"#ffffff","stroke-width":mG.toString()},children:[],value:""}),s.push({name:"line",type:"element",attributes:{x1:e.toString(),y1:(n-hE).toString(),x2:e.toString(),y2:(n+hE).toString(),stroke:"#ffffff","stroke-width":mG.toString()},children:[],value:""});const a=(t+e)/2,A=i>0?n-hE-$Yt:n+hE+$Yt;return s.push({name:"text",type:"element",attributes:{x:a.toString(),y:A.toString(),fill:"#ffffff","font-size":qYt.toString(),"font-family":"Arial, sans-serif","text-anchor":"middle","dominant-baseline":i>0?"baseline":"hanging",class:"anchor-offset-label"},children:[{type:"text",value:eUt("X",o,r),name:"",attributes:{},children:[]}],value:""}),s}function yVo({x:t,startY:e,endY:n,offsetMm:o,offsetX:i,displayOffset:r}){const s=[];s.push({name:"line",type:"element",attributes:{x1:t.toString(),y1:e.toString(),x2:t.toString(),y2:n.toString(),stroke:"#ffffff","stroke-width":mG.toString(),class:"anchor-offset-dimension-y"},children:[],value:""}),s.push({name:"line",type:"element",attributes:{x1:(t-hE).toString(),y1:e.toString(),x2:(t+hE).toString(),y2:e.toString(),stroke:"#ffffff","stroke-width":mG.toString()},children:[],value:""}),s.push({name:"line",type:"element",attributes:{x1:(t-hE).toString(),y1:n.toString(),x2:(t+hE).toString(),y2:n.toString(),stroke:"#ffffff","stroke-width":mG.toString()},children:[],value:""});const a=(e+n)/2,A=i<0?t-hE-4:t+hE+4;return s.push({name:"text",type:"element",attributes:{x:A.toString(),y:a.toString(),fill:"#ffffff","font-size":qYt.toString(),"font-family":"Arial, sans-serif","text-anchor":i<0?"end":"start","dominant-baseline":"middle",class:"anchor-offset-label"},children:[{type:"text",value:eUt("Y",o,r),name:"",attributes:{},children:[]}],value:""}),s}function eUt(t,e,n){const o=typeof n=="string"?n:e.toFixed(2),r=typeof o=="string"&&o.trim().endsWith("mm")?"":"mm";return`${t}: ${o}${r}`}function fq(t){const e=t?.anchor_position??t?.center;if(e&&typeof e.x=="number"&&typeof e.y=="number")return{x:e.x,y:e.y}}function tUt(t,e){const{transform:n,colorMap:o,showSolderMask:i,circuitJson:r}=e,{width:s,height:a,center:A,outline:c,position_mode:l,anchor_position:u,display_offset_x:g,display_offset_y:h}=t;let d;if(c&&Array.isArray(c)&&c.length>=3)d=c.map((m,_)=>{const[f,I]=hn(n,[m.x,m.y]);return _===0?`M ${f} ${I}`:`L ${f} ${I}`}).join(" ");else{const m=s/2,_=a/2,f=hn(n,[A.x-m,A.y-_]),I=hn(n,[A.x+m,A.y-_]),C=hn(n,[A.x+m,A.y+_]),y=hn(n,[A.x-m,A.y+_]);d=`M ${f[0]} ${f[1]} L ${I[0]} ${I[1]} L ${C[0]} ${C[1]} L ${y[0]} ${y[1]}`}d+=" Z";const p=[];if(i){const _=(e.layer??"top")==="bottom"?"soldermask-bottom":"soldermask-top";p.push({name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-board-soldermask",d,fill:o.soldermask.top,"fill-opacity":"0.8",stroke:"none","data-type":"pcb_soldermask","data-pcb-layer":_}})}if(p.push({name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-board",d,fill:"none",stroke:o.boardOutline,"stroke-width":(.1*Math.abs(n.a)).toString(),"data-type":"pcb_board","data-pcb-layer":"board"}}),e.showAnchorOffsets&&r&&l==="relative_to_panel_anchor"){const m=r.find(_=>_.type==="pcb_panel");if(m){const _=fq(m);_&&p.push(...SRe({groupAnchorPosition:_,componentPosition:u??A,transform:n,componentWidth:s,componentHeight:a,displayXOffset:g,displayYOffset:h}))}}return p}function xVo(t,e){const{transform:n,colorMap:o,showSolderMask:i}=e,r=Number(t.width),s=Number(t.height),a=t.center??{x:r/2,y:s/2},A=r/2,c=s/2,l=hn(n,[a.x-A,a.y-c]),u=hn(n,[a.x+A,a.y-c]),g=hn(n,[a.x+A,a.y+c]),h=hn(n,[a.x-A,a.y+c]),d=`M ${l[0]} ${l[1]} L ${u[0]} ${u[1]} L ${g[0]} ${g[1]} L ${h[0]} ${h[1]} Z`;return t.covered_with_solder_mask,[{name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-panel",d,fill:"none",stroke:o.boardOutline,"stroke-width":(.1*Math.abs(n.a)).toString(),"data-type":"pcb_panel","data-pcb-layer":"board"}}]}function EVo(t,e){const{transform:n,colorMap:o,showSolderMask:i}=e,r=e.layer??"top",[s,a]=hn(n,[t.x,t.y]),A=!!t.is_covered_with_solder_mask,c=(t.soldermask_margin??0)*Math.abs(n.a),l=i&&A&&c!==0,u=o.soldermask.top;if(t.hole_shape==="circle"||t.hole_shape==="square"){const g=t.hole_diameter*Math.abs(n.a),h=g/2;if(t.hole_shape==="circle"){const _={name:"circle",type:"element",attributes:{class:"pcb-hole",cx:s.toString(),cy:a.toString(),r:h.toString(),fill:o.drill,"data-type":"pcb_hole","data-pcb-layer":"drill"},children:[],value:""};if(!l)return[_];const f=h+c;if(c<0){const C={name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-hole-covered",fill:u,cx:s.toString(),cy:a.toString(),r:h.toString(),"data-type":"pcb_hole","data-pcb-layer":"drill"}},y={name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-hole-exposed",fill:o.drill,cx:s.toString(),cy:a.toString(),r:f.toString(),"data-type":"pcb_soldermask","data-pcb-layer":"drill"}};return[C,y]}return[{name:"circle",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,cx:s.toString(),cy:a.toString(),r:f.toString(),"data-type":"pcb_soldermask_opening","data-pcb-layer":r}},_]}const d={name:"rect",type:"element",attributes:{class:"pcb-hole",x:(s-h).toString(),y:(a-h).toString(),width:g.toString(),height:g.toString(),fill:o.drill,"data-type":"pcb_hole","data-pcb-layer":"drill"},children:[],value:""};if(!l)return[d];const p=g+2*c;if(c<0){const _={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-hole-covered",fill:u,x:(s-h).toString(),y:(a-h).toString(),width:g.toString(),height:g.toString(),"data-type":"pcb_hole","data-pcb-layer":"drill"}},f={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-hole-exposed",fill:o.drill,x:(s-p/2).toString(),y:(a-p/2).toString(),width:p.toString(),height:p.toString(),"data-type":"pcb_soldermask","data-pcb-layer":"drill"}};return[_,f]}return[{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,x:(s-p/2).toString(),y:(a-p/2).toString(),width:p.toString(),height:p.toString(),"data-type":"pcb_soldermask_opening","data-pcb-layer":r}},d]}if(t.hole_shape==="oval"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d=g/2,p=h/2,m={name:"ellipse",type:"element",attributes:{class:"pcb-hole",cx:s.toString(),cy:a.toString(),rx:d.toString(),ry:p.toString(),fill:o.drill,"data-type":"pcb_hole","data-pcb-layer":"drill"},children:[],value:""};if(!l)return[m];const _=d+c,f=p+c;if(c<0){const C={name:"ellipse",type:"element",value:"",children:[],attributes:{class:"pcb-hole-covered",fill:u,cx:s.toString(),cy:a.toString(),rx:d.toString(),ry:p.toString(),"data-type":"pcb_hole","data-pcb-layer":"drill"}},y={name:"ellipse",type:"element",value:"",children:[],attributes:{class:"pcb-hole-exposed",fill:o.drill,cx:s.toString(),cy:a.toString(),rx:_.toString(),ry:f.toString(),"data-type":"pcb_soldermask","data-pcb-layer":"drill"}};return[C,y]}return[{name:"ellipse",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,cx:s.toString(),cy:a.toString(),rx:_.toString(),ry:f.toString(),"data-type":"pcb_soldermask_opening","data-pcb-layer":r}},m]}if(t.hole_shape==="rect"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d={name:"rect",type:"element",attributes:{class:"pcb-hole",x:(s-g/2).toString(),y:(a-h/2).toString(),width:g.toString(),height:h.toString(),fill:o.drill,"data-type":"pcb_hole","data-pcb-layer":"drill"},children:[],value:""};if(!l)return[d];const p=g+2*c,m=h+2*c;if(c<0){const f={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-hole-covered",fill:u,x:(s-g/2).toString(),y:(a-h/2).toString(),width:g.toString(),height:h.toString(),"data-type":"pcb_hole","data-pcb-layer":"drill"}},I={name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-hole-exposed",fill:o.drill,x:(s-p/2).toString(),y:(a-m/2).toString(),width:p.toString(),height:m.toString(),"data-type":"pcb_soldermask","data-pcb-layer":"drill"}};return[f,I]}return[{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,x:(s-p/2).toString(),y:(a-m/2).toString(),width:p.toString(),height:m.toString(),"data-type":"pcb_soldermask_opening","data-pcb-layer":r}},d]}if(t.hole_shape==="pill"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d=g>h,p=Math.min(g,h)/2,m=Math.abs(d?g-h:h-g),_=d?`M${s-m/2},${a-p} h${m} a${p},${p} 0 0 1 0,${h} h-${m} a${p},${p} 0 0 1 0,-${h} z`:`M${s-p},${a-m/2} v${m} a${p},${p} 0 0 0 ${g},0 v-${m} a${p},${p} 0 0 0 -${g},0 z`,f={name:"path",type:"element",attributes:{class:"pcb-hole",fill:o.drill,d:_,"data-type":"pcb_hole","data-pcb-layer":"drill"},children:[],value:""};if(!l)return[f];const I=g+2*c,C=h+2*c,y=I>C,x=Math.min(I,C)/2,E=Math.abs(y?I-C:C-I),B=y?`M${s-E/2},${a-x} h${E} a${x},${x} 0 0 1 0,${C} h-${E} a${x},${x} 0 0 1 0,-${C} z`:`M${s-x},${a-E/2} v${E} a${x},${x} 0 0 0 ${I},0 v-${E} a${x},${x} 0 0 0 -${I},0 z`;if(c<0){const Q={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-hole-covered",fill:u,d:_,"data-type":"pcb_hole","data-pcb-layer":"drill"}},w={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-hole-exposed",fill:o.drill,d:B,"data-type":"pcb_soldermask","data-pcb-layer":"drill"}};return[Q,w]}return[{name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,d:B,"data-type":"pcb_soldermask_opening","data-pcb-layer":r}},f]}if(t.hole_shape==="rotated_pill"){const g=t.hole_width*Math.abs(n.a),h=t.hole_height*Math.abs(n.a),d="ccw_rotation"in t?t.ccw_rotation??0:0,p=g>h,m=Math.min(g,h)/2,_=Math.abs(p?g-h:h-g),f=p?`M${-_/2},${-m} h${_} a${m},${m} 0 0 1 0,${h} h-${_} a${m},${m} 0 0 1 0,-${h} z`:`M${-m},${-_/2} v${_} a${m},${m} 0 0 0 ${g},0 v-${_} a${m},${m} 0 0 0 -${g},0 z`,I={name:"path",type:"element",attributes:{class:"pcb-hole",fill:o.drill,d:f,transform:`translate(${s} ${a}) rotate(${-d})`,"data-type":"pcb_hole","data-pcb-layer":"drill"},children:[],value:""};if(!l)return[I];const C=g+2*c,y=h+2*c,x=C>y,E=Math.min(C,y)/2,B=Math.abs(x?C-y:y-C),S=x?`M${-B/2},${-E} h${B} a${E},${E} 0 0 1 0,${y} h-${B} a${E},${E} 0 0 1 0,-${y} z`:`M${-E},${-B/2} v${B} a${E},${E} 0 0 0 ${C},0 v-${B} a${E},${E} 0 0 0 -${C},0 z`;if(c<0){const w={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-hole-covered",fill:u,d:f,transform:`translate(${s} ${a}) rotate(${-d})`,"data-type":"pcb_hole","data-pcb-layer":"drill"}},M={name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-hole-exposed",fill:o.drill,d:S,transform:`translate(${s} ${a}) rotate(${-d})`,"data-type":"pcb_soldermask","data-pcb-layer":"drill"}};return[w,M]}return[{name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-soldermask-cutout",fill:o.substrate,d:S,"data-type":"pcb_soldermask_opening","data-pcb-layer":r}},I]}return[]}var BVo=(t,e)=>{const n=Mr(e).pcb_smtpad.get(t);if(n&&"x"in n&&"y"in n)return{x:n.x,y:n.y};const o=Mr(e).pcb_plated_hole.get(t);return o&&"x"in o&&"y"in o?{x:o.x,y:o.y}:null},bVo=(t,e,n,o)=>{const i=n.getIdsConnectedToNet(e);let r=null,s=1/0;for(const a of i){const A=BVo(a,o);if(A){const c=t.x-A.x,l=t.y-A.y,u=Math.sqrt(c*c+l*l);u>0&&u<s&&(s=u,r=A)}}return r};function SVo(t,e){const{transform:n}=e,o=Vf(t),i=t.filter(A=>A.type==="pcb_port"),r=t.filter(A=>A.type==="source_trace"),s=[];i.forEach((A,c)=>{const l=A.pcb_port_id;if(!l)return;const u=o.getNetConnectedToId(l);if(!u)return;let g=!1;const h=Mr(t).source_port.getWhere({pcb_port_id:l});if(h&&h.source_port_id){const m=h.source_port_id;for(const _ of r)if(Array.isArray(_.connected_source_port_ids)&&_.connected_source_port_ids.includes(m)&&Array.isArray(_.connected_source_net_ids)&&_.connected_source_net_ids.length>0){g=!0;break}}const d={x:A.x,y:A.y},p=bVo(d,u,o,t);p&&s.push({key:`${l}-${c}`,startPoint:d,endPoint:p,isInNet:g})});const a=[];for(const A of s){const c=hn(n,[A.startPoint.x,A.startPoint.y]),l=hn(n,[A.endPoint.x,A.endPoint.y]),u={x1:c[0].toString(),y1:c[1].toString(),x2:l[0].toString(),y2:l[1].toString(),stroke:"white","stroke-width":"1","stroke-dasharray":"6,6","data-type":"pcb_rats_nest","data-pcb-layer":"overlay"};a.push({name:"line",type:"element",attributes:u,value:"",children:[]})}return a}function QVo(t,e){const{transform:n,colorMap:o}=e;if(t.shape==="rect"){const i=t,[r,s]=hn(n,[i.center.x,i.center.y]),a=i.width*Math.abs(n.a),A=i.height*Math.abs(n.d),c=-(i.rotation??0),{corner_radius:l}=i,u=typeof l=="number"&&l>0?l:0,g=u*Math.abs(n.a),h=u*Math.abs(n.d),d={class:"pcb-cutout pcb-cutout-rect",x:(-a/2).toString(),y:(-A/2).toString(),width:a.toString(),height:A.toString(),fill:o.drill,transform:$b(m0(of(r,s),jb(c*Math.PI/180))),"data-type":"pcb_cutout","data-pcb-layer":"drill"};return g>0&&(d.rx=g.toString()),h>0&&(d.ry=h.toString()),[{name:"rect",type:"element",attributes:d,children:[],value:""}]}if(t.shape==="circle"){const i=t,[r,s]=hn(n,[i.center.x,i.center.y]),a=i.radius*Math.abs(n.a);return[{name:"circle",type:"element",attributes:{class:"pcb-cutout pcb-cutout-circle",cx:r.toString(),cy:s.toString(),r:a.toString(),fill:o.drill,"data-type":"pcb_cutout","data-pcb-layer":"drill"},children:[],value:""}]}if(t.shape==="polygon"){const i=t;return!i.points||i.points.length===0?[]:[{name:"polygon",type:"element",attributes:{class:"pcb-cutout pcb-cutout-polygon",points:i.points.map(a=>hn(n,[a.x,a.y])).map(a=>`${a[0]},${a[1]}`).join(" "),fill:o.drill,"data-type":"pcb_cutout","data-pcb-layer":"drill"},children:[],value:""}]}return[]}function vVo(t,e){const{transform:n,colorMap:o}=e;if(!t.route||!Array.isArray(t.route))return[];const i=t.route[0],r=t.route[t.route.length-1],s=i&&r&&i.x===r.x&&i.y===r.y;return[{name:"path",type:"element",attributes:{class:"pcb-cutout pcb-cutout-path",d:t.route.slice(0,s?-1:void 0).map((A,c)=>{const[l,u]=hn(n,[A.x,A.y]);return c===0?`M ${l} ${u}`:`L ${l} ${u}`}).join(" ")+(s?" Z":""),fill:o.drill,"data-type":"pcb_cutout_path","data-pcb-cutout-id":t.pcb_cutout_id,"data-pcb-layer":"drill"},value:"",children:[]}]}var nUt="pcb-keepout-pattern",fG=20,wVo=5,oUt="rgba(255, 107, 107, 0.2)";function PVo(t){const e=[];for(let n=-fG;n<=fG;n+=wVo)e.push({name:"line",type:"element",value:"",attributes:{x1:n.toString(),y1:"0",x2:(n+fG).toString(),y2:fG.toString(),stroke:t,"stroke-width":"1"},children:[]});return e}function MVo(t){return{name:"defs",type:"element",value:"",attributes:{},children:[{name:"pattern",type:"element",value:"",attributes:{id:nUt,width:fG.toString(),height:fG.toString(),patternUnits:"userSpaceOnUse"},children:PVo(t)}]}}function iUt(t,e,n,o){const i={class:`pcb-keepout ${n} pcb-keepout-background`,"data-type":"pcb_keepout","data-pcb-layer":e,"data-pcb-keepout-id":t,stroke:"none"};return o&&(i["data-description"]=o),i}function rUt(t,e,n,o){const i={class:`pcb-keepout ${n} pcb-keepout-pattern`,fill:`url(#${nUt})`,"data-type":"pcb_keepout","data-pcb-layer":e,"data-pcb-keepout-id":t,stroke:"none"};return o&&(i["data-description"]=o),i}function DVo(t,e){const{transform:n,layer:o,colorMap:i}=e;if(o&&!t.layers.includes(o))return[];const r=[];i.keepout;for(const s of t.layers)if(!(o&&s!==o)){if(t.shape==="rect"){const a=t,[A,c]=hn(n,[a.center.x,a.center.y]),l=a.width*Math.abs(n.a),u=a.height*Math.abs(n.d),g=$b(m0(of(A,c))),h={...iUt(a.pcb_keepout_id,s,"pcb-keepout-rect",a.description),x:(-l/2).toString(),y:(-u/2).toString(),width:l.toString(),height:u.toString(),fill:oUt,transform:g},d={...rUt(a.pcb_keepout_id,s,"pcb-keepout-rect",a.description),x:(-l/2).toString(),y:(-u/2).toString(),width:l.toString(),height:u.toString(),transform:g};r.push({name:"rect",type:"element",attributes:h,children:[],value:""},{name:"rect",type:"element",attributes:d,children:[],value:""})}else if(t.shape==="circle"){const a=t,[A,c]=hn(n,[a.center.x,a.center.y]),l=a.radius*Math.abs(n.a),u={...iUt(a.pcb_keepout_id,s,"pcb-keepout-circle",a.description),cx:A.toString(),cy:c.toString(),r:l.toString(),fill:oUt},g={...rUt(a.pcb_keepout_id,s,"pcb-keepout-circle",a.description),cx:A.toString(),cy:c.toString(),r:l.toString()};r.push({name:"circle",type:"element",attributes:u,children:[],value:""},{name:"circle",type:"element",attributes:g,children:[],value:""})}}return r}function NVo({elementType:t,shapeAttributes:e,layer:n,colorMap:o,additionalAttributes:i}){const r={class:"pcb-soldermask-cutout",fill:o.substrate,"data-type":"pcb_soldermask_opening","data-pcb-layer":n,...e,...i};return{name:t,type:"element",value:"",children:[],attributes:r}}function RVo(t,e){const{transform:n,layer:o,colorMap:i,showSolderMask:r}=e,{layer:s}=t;if(o&&s!==o)return[];const a=VYt(t,n);if(!a)return[];const{elementType:A,shapeAttributes:c}=a,l=Fx(s,i),u="0.5",g=t.covered_with_solder_mask!==!1,h=s==="bottom"?i.soldermaskOverCopper.bottom:i.soldermaskOverCopper.top,d="0.9",p={name:A,type:"element",value:"",children:[],attributes:{class:`pcb-copper-pour pcb-copper-pour-${t.shape}`,...c,fill:l,"fill-opacity":u,"data-type":"pcb_copper_pour","data-pcb-layer":s}},m=r?g?UYt({elementType:A,shapeAttributes:c,layer:s,fillColor:h,fillOpacity:d,className:"pcb-soldermask-covered-pour"}):NVo({elementType:A,shapeAttributes:c,layer:s,colorMap:i}):null;return m?!g&&t.pcb_copper_pour_id?.includes("substrate_only")?[m]:[p,m]:[p]}function sUt(t,e){const{transform:n,layer:o}=e;if(o&&t.layer!==o)return[];const[i,r]=hn(n,[t.x,t.y]);if(t.shape==="rect"||t.shape==="rotated_rect"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d);return t.shape==="rotated_rect"&&t.ccw_rotation?[{name:"rect",type:"element",attributes:{class:"pcb-solder-paste",fill:hG(t.layer),x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),transform:`translate(${i} ${r}) rotate(${-t.ccw_rotation})`,"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]:[{name:"rect",type:"element",attributes:{class:"pcb-solder-paste",fill:hG(t.layer),x:(i-s/2).toString(),y:(r-a/2).toString(),width:s.toString(),height:a.toString(),"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}if(t.shape==="pill"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d),A=t.radius*Math.abs(n.a);return[{name:"rect",type:"element",attributes:{class:"pcb-solder-paste",fill:hG(t.layer),x:(i-s/2).toString(),y:(r-a/2).toString(),width:s.toString(),height:a.toString(),rx:A.toString(),"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}if(t.shape==="rotated_pill"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d),A=t.radius*Math.abs(n.a);return[{name:"rect",type:"element",attributes:{class:"pcb-solder-paste",fill:hG(t.layer),x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),rx:A.toString(),transform:`translate(${i} ${r}) rotate(${-t.ccw_rotation})`,"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}if(t.shape==="oval"){const s=t.width*Math.abs(n.a),a=t.height*Math.abs(n.d);return[{name:"ellipse",type:"element",attributes:{class:"pcb-solder-paste",fill:hG(t.layer),cx:i.toString(),cy:r.toString(),rx:(s/2).toString(),ry:(a/2).toString(),"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}if(t.shape==="circle"){const s=t.radius*Math.abs(n.a);return[{name:"circle",type:"element",attributes:{class:"pcb-solder-paste",fill:hG(t.layer),cx:i.toString(),cy:r.toString(),r:s.toString(),"data-type":"pcb_solder_paste","data-pcb-layer":t.layer}}]}}var TVo="rgba(255, 255, 255, 0.5)",aUt="pcb-grid-pattern";function kVo({grid:t,svgWidth:e,svgHeight:n}){if(!t)return{};const o=t.lineColor??TVo,i=t.cellSize,r=t.majorCellSize,s=t.majorLineColor??o;if(r!==void 0){if(!i||i<=0)throw new Error("grid.majorCellSize requires a positive grid.cellSize");if(r<=0)throw new Error("grid.majorCellSize must be a positive multiple of grid.cellSize");const u=r/i,g=Math.round(u);if(!Number.isFinite(u)||Math.abs(u-g)>1e-6)throw new Error("grid.majorCellSize must be a positive multiple of grid.cellSize")}if(!i||i<=0)return{};const a=r!==void 0,A=a?FVo(i,r,o,s):[{name:"path",type:"element",value:"",attributes:{d:`M ${i} 0 L 0 0 0 ${i}`,fill:"none",stroke:o,"stroke-width":"1","shape-rendering":"crispEdges"},children:[]}],c={name:"defs",type:"element",value:"",attributes:{},children:[{name:"pattern",type:"element",value:"",attributes:{id:aUt,width:a?r.toString():i.toString(),height:a?r.toString():i.toString(),patternUnits:"userSpaceOnUse"},children:A}]},l={name:"rect",type:"element",value:"",attributes:{x:"0",y:"0",width:e.toString(),height:n.toString(),fill:`url(#${aUt})`,"pointer-events":"none","data-type":"pcb_grid","data-pcb-layer":"global"},children:[]};return{defs:c,rect:l}}function FVo(t,e,n,o){const i=[],r=Math.round(e/t);for(let s=0;s<r;s+=1){const A=Number((s*t).toFixed(6)).toString(),c=s===0?o:n,l=e.toString();i.push({name:"line",type:"element",value:"",attributes:{x1:A,y1:"0",x2:A,y2:l,stroke:c,"stroke-width":"1","shape-rendering":"crispEdges"},children:[]}),i.push({name:"line",type:"element",value:"",attributes:{x1:"0",y1:A,x2:l,y2:A,stroke:c,"stroke-width":"1","shape-rendering":"crispEdges"},children:[]})}return i}function LVo(t,e){const{transform:n,circuitJson:o}=e,{center:i,width:r,height:s,rotation:a=0}=t,[A,c]=hn(n,[i.x,i.y]),l=r*Math.abs(n.a),u=s*Math.abs(n.d),g=`translate(${A}, ${c}) rotate(${-a}) scale(1, -1)`,h=[];if(e.showAnchorOffsets&&o&&t.position_mode==="relative_to_group_anchor"&&(t.positioned_relative_to_pcb_group_id||t.positioned_relative_to_pcb_board_id)){const d=HVo(t,o);d&&h.push(...SRe({groupAnchorPosition:d,componentPosition:i,transform:n,componentWidth:r,componentHeight:s,displayXOffset:t.display_offset_x,displayYOffset:t.display_offset_y}))}return!e.colorMap.debugComponent?.fill&&!e.colorMap.debugComponent?.stroke||h.push({name:"g",type:"element",attributes:{transform:g,"data-type":"pcb_component","data-pcb-layer":t.layer??"top"},children:[{name:"rect",type:"element",attributes:{class:"pcb-component",x:(-l/2).toString(),y:(-u/2).toString(),width:l.toString(),height:u.toString(),fill:e.colorMap.debugComponent.fill??"transparent",stroke:e.colorMap.debugComponent.stroke??"transparent","data-type":"pcb_component","data-pcb-layer":t.layer??"top"}}],value:""}),h}function HVo(t,e){if(t.positioned_relative_to_pcb_group_id){const n=e.find(i=>i.type==="pcb_group"&&i.pcb_group_id===t.positioned_relative_to_pcb_group_id),o=fq(n);if(o)return o}if(t.positioned_relative_to_pcb_board_id){const n=e.find(i=>i.type==="pcb_board"&&i.pcb_board_id===t.positioned_relative_to_pcb_board_id),o=fq(n);if(o)return o}}var AUt=["rgba(100, 200, 255, 0.6)","rgba(255, 150, 100, 0.6)","rgba(100, 255, 150, 0.6)","rgba(200, 100, 255, 0.6)","rgba(255, 220, 100, 0.6)","rgba(255, 100, 200, 0.6)","rgba(100, 255, 255, 0.6)","rgba(180, 255, 100, 0.6)"],OVo=.1;function GVo(t,e){const{transform:n,circuitJson:o}=e,{center:i,width:r,height:s}=t,a=[];if(e.showAnchorOffsets&&t.position_mode==="relative_to_group_anchor"&&o){const B=UVo(t,o);B&&a.push(...SRe({groupAnchorPosition:B,componentPosition:t.anchor_position??t.center,transform:n,componentWidth:t.width,componentHeight:t.height,displayXOffset:t.display_offset_x,displayYOffset:t.display_offset_y}))}const A=Array.isArray(t.outline)?t.outline:void 0,c=OVo*Math.abs(n.a),l=.3*Math.abs(n.a),u=.15*Math.abs(n.a),g={class:"pcb-group",fill:"none",stroke:YVo(t.pcb_group_id),"stroke-width":c.toString(),"stroke-dasharray":`${l} ${u}`,"data-type":"pcb_group","data-pcb-group-id":t.pcb_group_id,"data-pcb-layer":"overlay"};if(t.name&&(g["data-group-name"]=t.name),A&&A.length>=3&&A.every(B=>B&&typeof B.x=="number"&&typeof B.y=="number")){const B=A.map((S,Q)=>{const[w,M]=hn(n,[S.x,S.y]);return Q===0?`M ${w} ${M}`:`L ${w} ${M}`}).join(" ");return a.push({name:"path",type:"element",value:"",children:[],attributes:{...g,d:`${B} Z`}}),a}if(!i||typeof i.x!="number"||typeof i.y!="number"||typeof r!="number"||typeof s!="number")return cm(`[pcb_group] Invalid data for "${t.pcb_group_id}"${t.name?` (name: "${t.name}")`:""}: expected center {x: number, y: number}, width: number, height: number, got center=${JSON.stringify(i)}, width=${JSON.stringify(r)}, height=${JSON.stringify(s)}`),a;const h=r/2,d=s/2,[p,m]=hn(n,[i.x-h,i.y+d]),[_,f]=hn(n,[i.x+h,i.y-d]),I=Math.min(p,_),C=Math.min(m,f),y=Math.abs(_-p),x=Math.abs(f-m),E={name:"rect",type:"element",value:"",attributes:{...g,x:I.toString(),y:C.toString(),width:y.toString(),height:x.toString()},children:[]};return a.push(E),a}function YVo(t){const e=t.match(/(\d+)$/),n=e?Number.parseInt(e[1],10):0;return AUt[n%AUt.length]}function UVo(t,e){if(t.positioned_relative_to_pcb_group_id){const n=e.find(i=>i.type==="pcb_group"&&i.pcb_group_id===t.positioned_relative_to_pcb_group_id),o=fq(n);if(o)return o}if(t.positioned_relative_to_pcb_board_id){const n=e.find(i=>i.type==="pcb_board"&&i.pcb_board_id===t.positioned_relative_to_pcb_board_id),o=fq(n);if(o)return o}}function Gw(t){return t.find(n=>n.type==="project_software_metadata"||n.type==="source_project_metadata")?.software_used_string}var KVo={version:"0.0.420"},Yw=KVo.version,VVo={pcb_background:0,pcb_boundary:1,pcb_panel:5,pcb_board:10,pcb_cutout:15,pcb_cutout_path:15,pcb_keepout:16,pcb_hole:18,pcb_plated_hole_drill:19,pcb_plated_hole:20,pcb_trace_soldermask:25,pcb_trace:30,pcb_smtpad:30,pcb_copper_pour:35,pcb_via:36,pcb_soldermask:40,pcb_soldermask_opening:25,pcb_solder_paste:45,pcb_silkscreen_text:50,pcb_silkscreen_path:50,pcb_silkscreen_graphic:50,pcb_silkscreen_rect:50,pcb_silkscreen_circle:50,pcb_silkscreen_line:50,pcb_silkscreen_oval:50,pcb_silkscreen_pill:50,pcb_component:60,pcb_pad_pin_number:65,pcb_fabrication_note_text:70,pcb_fabrication_note_path:70,pcb_fabrication_note_rect:70,pcb_fabrication_note_dimension:70,pcb_note_dimension:70,pcb_note_text:70,pcb_note_rect:70,pcb_note_path:70,pcb_note_line:70,pcb_trace_error:80,pcb_footprint_overlap_error:80,pcb_component_outside_board_error:80,pcb_pad_trace_clearance_error:80,pcb_via_trace_clearance_error:80,pcb_connector_not_in_accessible_orientation_warning:80,pcb_manual_edit_conflict_warning:80,pcb_rats_nest:85,pcb_debug_object:90},cUt=100;function zVo(t){return t.map((e,n)=>({object:e,index:n,layerPriority:JVo(e.attributes?.["data-pcb-layer"]??void 0),typePriority:WVo(e.attributes?.["data-type"]??void 0)})).sort((e,n)=>e.layerPriority!==n.layerPriority?e.layerPriority-n.layerPriority:e.typePriority!==n.typePriority?e.typePriority-n.typePriority:e.index-n.index).map(({object:e})=>e)}function JVo(t){if(!t)return 500;const e=t.toLowerCase();if(e==="global")return-100;if(e==="bottom")return 4;if(e==="board")return 2;if(e==="soldermask-top"||e==="soldermask-bottom")return 3;if(e.startsWith("inner")){const n=e.match(/\d+/);return 5+(n?Number.parseInt(n[0],10):0)}return e==="through"?18:e==="top"?17:e==="drill"?30:e==="overlay"?40:10}function WVo(t){return t?VVo[t]??cUt:cUt}function IG(t,e="error_text_overlay"){const n=t.filter(r=>r.type.endsWith("_error"));if(n.length===0)return null;const o=n.map(r=>r.message).filter(r=>!!r);return o.length===0?null:{name:"text",type:"element",value:"",attributes:{x:"10",y:"20",fill:"red","font-family":"monospace","font-size":"12px","data-type":e,"data-layer":"global"},children:o.map((r,s)=>({name:"tspan",type:"element",value:"",attributes:{x:"10",dy:s===0?"0":"1.2em"},children:[{type:"text",value:r,name:"",attributes:{},children:[]}]}))}}function jVo({anchorPosition:t,textWidth:e,textHeight:n,anchorAlignment:o}){switch(o){case"top_left":return{x:t.x+e/2,y:t.y+n/2};case"top_center":return{x:t.x,y:t.y+n/2};case"top_right":return{x:t.x-e/2,y:t.y+n/2};case"center_left":return{x:t.x+e/2,y:t.y};case"center_right":return{x:t.x-e/2,y:t.y};case"bottom_left":return{x:t.x+e/2,y:t.y-n/2};case"bottom_center":return{x:t.x,y:t.y-n/2};case"bottom_right":return{x:t.x-e/2,y:t.y-n/2};default:return t}}function $Vo(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=!1,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=!1;for(const I of t)if(I.type==="pcb_panel"){const C=I,y=lt.parse(C.width),x=lt.parse(C.height);if(y===void 0||x===void 0)continue;const E=C.center??{x:y/2,y:x/2};u({center:E,width:y,height:x})}else if(I.type==="pcb_board")I.outline&&Array.isArray(I.outline)&&I.outline.length>=3?(h(I.outline),d(I.outline)):"center"in I&&"width"in I&&"height"in I&&(u({center:I.center,width:I.width,height:I.height}),g({center:I.center,width:I.width,height:I.height}));else if(I.type==="pcb_courtyard_rect")u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.ccw_rotation});else if(I.type==="pcb_smtpad"){const C=I;if(C.shape==="rect"||C.shape==="pill")u({center:{x:C.x,y:C.y},width:C.width,height:C.height});else if(C.shape==="rotated_rect"||C.shape==="rotated_pill")u({center:{x:C.x,y:C.y},width:C.width,height:C.height,ccwRotationDegrees:C.ccw_rotation});else if(C.shape==="circle"){const y=lt.parse(C.radius);y!==void 0&&u({center:{x:C.x,y:C.y},width:y*2,height:y*2})}else C.shape==="polygon"&&p(C.points)}else if(I.type==="pcb_via"){const C=lt.parse(I.outer_diameter);u({center:{x:I.x,y:I.y},width:C??0,height:C??0})}else if(I.type==="pcb_plated_hole"){const C=I,y={x:C.x,y:C.y};if(C.shape==="circle"){const x=lt.parse(C.outer_diameter);u({center:y,width:x??0,height:x??0})}else C.shape==="oval"||C.shape==="pill"?u({center:y,width:C.outer_width,height:C.outer_height}):C.shape==="circular_hole_with_rect_pad"||C.shape==="pill_hole_with_rect_pad"?u({center:y,width:C.rect_pad_width,height:C.rect_pad_height}):C.shape==="rotated_pill_hole_with_rect_pad"?u({center:y,width:C.rect_pad_width,height:C.rect_pad_height,ccwRotationDegrees:C.rect_ccw_rotation}):C.shape==="hole_with_polygon_pad"&&p((C.pad_outline??[]).map(x=>({x:C.x+x.x,y:C.y+x.y})))}else if(I.type==="pcb_hole"){const C=I,y={x:C.x,y:C.y};if(C.hole_shape==="circle"||C.hole_shape==="square"){const x=lt.parse(C.hole_diameter);u({center:y,width:x??0,height:x??0})}else C.hole_shape==="rotated_pill"?u({center:y,width:C.hole_width,height:C.hole_height,ccwRotationDegrees:C.ccw_rotation}):(C.hole_shape==="oval"||C.hole_shape==="rect"||C.hole_shape==="pill")&&u({center:y,width:C.hole_width,height:C.hole_height})}else if(I.type==="pcb_note_line")p([{x:I.x1,y:I.y1},{x:I.x2,y:I.y2}]);else if("x"in I&&"y"in I)u({center:{x:I.x,y:I.y},width:0,height:0});else if("route"in I)p(I.route);else if(I.type==="pcb_note_rect"||I.type==="pcb_fabrication_note_rect")u({center:I.center,width:I.width,height:I.height});else if(I.type==="pcb_note_dimension"||I.type==="pcb_fabrication_note_dimension"){const C=I,{from:y,to:x,text:E,font_size:B=1,arrow_size:S,offset_distance:Q,offset_direction:w}=C;if(!y||!x||!S)continue;u({center:y,width:0,height:0}),u({center:x,width:0,height:0});const M=ye=>{const Me=Math.hypot(ye.x,ye.y)||1;return{x:ye.x/Me,y:ye.y/Me}},k=M({x:x.x-y.x,y:x.y-y.y});if(Number.isNaN(k.x)||Number.isNaN(k.y))continue;const R={x:-k.y,y:k.x},F=w&&typeof w.x=="number"&&typeof w.y=="number",O=F?M(w):{x:0,y:0},U=typeof Q=="number"?Q:0,Y={x:O.x*U,y:O.y*U},W={x:y.x+Y.x,y:y.y+Y.y},te={x:x.x+Y.x,y:x.y+Y.y};u({center:W,width:0,height:0}),u({center:te,width:0,height:0});const j=F&&(Math.abs(O.x)>Number.EPSILON||Math.abs(O.y)>Number.EPSILON)?O:R,J=U+S,oe={x:y.x+j.x*J,y:y.y+j.y*J},ie={x:x.x+j.x*J,y:x.y+j.y*J};u({center:oe,width:0,height:0}),u({center:ie,width:0,height:0});const ne=S/2,le={x:W.x+k.x*S,y:W.y+k.y*S},ge={x:te.x-k.x*S,y:te.y-k.y*S},_e={x:le.x+R.x*ne,y:le.y+R.y*ne},ue={x:le.x-R.x*ne,y:le.y-R.y*ne};u({center:_e,width:0,height:0}),u({center:ue,width:0,height:0});const fe={x:ge.x+R.x*ne,y:ge.y+R.y*ne},pe={x:ge.x-R.x*ne,y:ge.y-R.y*ne};if(u({center:fe,width:0,height:0}),u({center:pe,width:0,height:0}),E){const ye={x:(y.x+x.x)/2+Y.x,y:(y.y+x.y)/2+Y.y},Me=S*1.5,ve={x:ye.x+R.x*Me,y:ye.y+R.y*Me},he=E.length*B*.6;u({center:ve,width:he,height:B})}}else if(I.type==="pcb_note_text"||I.type==="pcb_fabrication_note_text")_({text:I.text,anchorPosition:I.anchor_position,fontSize:I.font_size,anchorAlignment:I.anchor_alignment,ccwRotationDegrees:I.type==="pcb_fabrication_note_text"?I.ccw_rotation??1:0});else if(I.type==="pcb_cutout"){const C=I;if(C.shape==="rect")u({center:C.center,width:C.width,height:C.height,ccwRotationDegrees:C.rotation});else if(C.shape==="circle"){const y=lt.parse(C.radius);y!==void 0&&u({center:C.center,width:y*2,height:y*2})}else if(C.shape==="polygon")p(C.points);else if(C.shape==="path"){const y=C;y.route&&Array.isArray(y.route)&&p(y.route)}}else if(I.type==="pcb_keepout"){const C=I;if(C.shape==="rect")u({center:C.center,width:C.width,height:C.height});else if(C.shape==="circle"){const y=typeof C.radius=="number"?C.radius:lt.parse(C.radius)??0;y>0&&u({center:C.center,width:y*2,height:y*2})}}else I.type==="pcb_silkscreen_graphic"||I.type==="pcb_silkscreen_text"||I.type==="pcb_silkscreen_rect"||I.type==="pcb_silkscreen_circle"||I.type==="pcb_silkscreen_line"||I.type==="pcb_silkscreen_oval"||I.type==="pcb_silkscreen_pill"?f(I):I.type==="pcb_copper_text"?u({center:I.anchor_position,width:0,height:0}):I.type==="pcb_copper_pour"&&(I.shape==="rect"?u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.rotation}):I.shape==="polygon"?p(I.points):I.shape==="brep"&&p(I.brep_shape.outer_ring.vertices));return{minX:e,minY:n,maxX:o,maxY:i,boardMinX:s,boardMinY:a,boardMaxX:A,boardMaxY:c,hasBounds:r,hasBoardBounds:l};function u({center:I,width:C,height:y,ccwRotationDegrees:x}){if(!I)return;const E=lt.parse(I.x),B=lt.parse(I.y);if(E===void 0||B===void 0)return;const S=lt.parse(C)??0,Q=lt.parse(y)??0;let w=S/2,M=Q/2;if(typeof x=="number"&&x!==0){const k=x*Math.PI/180,R=Math.abs(Math.cos(k)),F=Math.abs(Math.sin(k)),O=w*R+M*F,U=w*F+M*R;w=O,M=U}e=Math.min(e,E-w),n=Math.min(n,B-M),o=Math.max(o,E+w),i=Math.max(i,B+M),r=!0}function g({center:I,width:C,height:y}){if(!I)return;const x=lt.parse(I.x),E=lt.parse(I.y);if(x===void 0||E===void 0)return;const B=lt.parse(C)??0,S=lt.parse(y)??0,Q=B/2,w=S/2;s=Math.min(s,x-Q),a=Math.min(a,E-w),A=Math.max(A,x+Q),c=Math.max(c,E+w),r=!0,l=!0}function h(I){let C=!1;for(const y of I){const x=lt.parse(y.x),E=lt.parse(y.y);x===void 0||E===void 0||(e=Math.min(e,x),n=Math.min(n,E),o=Math.max(o,x),i=Math.max(i,E),C=!0)}C&&(r=!0)}function d(I){let C=!1;for(const y of I){const x=lt.parse(y.x),E=lt.parse(y.y);x===void 0||E===void 0||(s=Math.min(s,x),a=Math.min(a,E),A=Math.max(A,x),c=Math.max(c,E),C=!0)}C&&(r=!0,l=!0)}function p(I){let C=!1;for(const y of I)for(const x of m(y)){const E=lt.parse(x.x),B=lt.parse(x.y);E===void 0||B===void 0||(e=Math.min(e,E),n=Math.min(n,B),o=Math.max(o,E),i=Math.max(i,B),C=!0)}C&&(r=!0)}function m(I){return"route_type"in I?qKo(I):[I]}function _({text:I,anchorPosition:C,fontSize:y=1,anchorAlignment:x="center",ccwRotationDegrees:E=0}){if(!I||!C)return;const B=I.split(`
`),Q=Math.max(...B.map(k=>k.length),0)*y*.6,w=Math.max(B.length,1)*y,M=jVo({anchorPosition:C,textWidth:Q,textHeight:w,anchorAlignment:x});u({center:M,width:Q,height:w,ccwRotationDegrees:E})}function f(I){if(I.type==="pcb_silkscreen_text")u({center:I.anchor_position,width:0,height:0});else if(I.type==="pcb_silkscreen_graphic"){for(const C of I.brep_shape.outer_ring.vertices)u({center:{x:C.x,y:C.y},width:0,height:0});for(const C of I.brep_shape.inner_rings??[])for(const y of C.vertices)u({center:{x:y.x,y:y.y},width:0,height:0})}else if(I.type==="pcb_silkscreen_path")p(I.route);else if(I.type==="pcb_silkscreen_rect")u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.ccw_rotation});else if(I.type==="pcb_silkscreen_circle"){const C=lt.parse(I.radius);C!==void 0&&u({center:I.center,width:C*2,height:C*2})}else if(I.type==="pcb_silkscreen_line")u({center:{x:I.x1,y:I.y1},width:0,height:0}),u({center:{x:I.x2,y:I.y2},width:0,height:0});else if(I.type==="pcb_silkscreen_oval"){const C=lt.parse(I.radius_x),y=lt.parse(I.radius_y);C!==void 0&&y!==void 0&&u({center:I.center,width:C*2,height:y*2})}else if(I.type==="pcb_silkscreen_pill")u({center:I.center,width:I.width,height:I.height,ccwRotationDegrees:I.ccw_rotation});else if(I.type==="pcb_cutout"){const C=I;if(C.shape==="rect")u({center:C.center,width:C.width,height:C.height,ccwRotationDegrees:C.rotation});else if(C.shape==="circle"){const y=lt.parse(C.radius);y!==void 0&&u({center:C.center,width:y*2,height:y*2})}else if(C.shape==="polygon")p(C.points);else if(C.shape==="path"){const y=C;y.route&&Array.isArray(y.route)&&p(y.route)}}}}var qVo=({circuitJson:t,drawPaddingOutsideBoard:e,baseBounds:n,viewportOptions:o})=>{let i=e?1:0,r=e||!n.hasBoardBounds?n.minX:n.boardMinX,s=e||!n.hasBoardBounds?n.minY:n.boardMinY,a=e||!n.hasBoardBounds?n.maxX:n.boardMaxX,A=e||!n.hasBoardBounds?n.maxY:n.boardMaxY,c=!1,l=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;const d=new Map,p=new Map;for(const m of t)if(m.type==="pcb_panel"){const _=m,f=lUt(_.center,_.width,_.height);if(!f)continue;l=Math.min(l,f.minX),u=Math.min(u,f.minY),g=Math.max(g,f.maxX),h=Math.max(h,f.maxY),c=!0,_.pcb_panel_id&&d.set(_.pcb_panel_id,f)}else if(m.type==="pcb_board"){const _=m,I=XVo(_.outline)??lUt(_.center,_.width,_.height);I&&_.pcb_board_id&&p.set(_.pcb_board_id,I)}if(o?.viewport){const{minX:m,minY:_,maxX:f,maxY:I}=o.viewport;r=m,s=_,a=f,A=I,i=0}else if(o?.viewportTarget?.pcb_panel_id){const m=d.get(o.viewportTarget.pcb_panel_id);if(!m)throw new Error(`Viewport target panel '${o.viewportTarget.pcb_panel_id}' not found`);r=m.minX,s=m.minY,a=m.maxX,A=m.maxY,i=0}else if(o?.viewportTarget?.pcb_board_id){const m=p.get(o.viewportTarget.pcb_board_id);if(!m)throw new Error(`Viewport target board '${o.viewportTarget.pcb_board_id}' not found`);r=m.minX,s=m.minY,a=m.maxX,A=m.maxY,i=0}else c&&(r=l,s=u,a=g,A=h);return{boundsMinX:r,boundsMinY:s,boundsMaxX:a,boundsMaxY:A,padding:i}};function lUt(t,e,n){if(!t||e===void 0||n===void 0)return;const o=lt.parse(t.x),i=lt.parse(t.y);if(o===void 0||i===void 0)return;const r=lt.parse(e),s=lt.parse(n);if(r===void 0||s===void 0)return;const a=r/2,A=s/2;return{minX:o-a,minY:i-A,maxX:o+a,maxY:i+A}}function XVo(t){if(!t||t.length<3)return;let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t){const s=lt.parse(r.x),a=lt.parse(r.y);s===void 0||a===void 0||(e=Math.min(e,s),n=Math.min(n,a),o=Math.max(o,s),i=Math.max(i,a))}if(!(!Number.isFinite(e)||!Number.isFinite(n))&&!(!Number.isFinite(o)||!Number.isFinite(i)))return{minX:e,minY:n,maxX:o,maxY:i}}var ZVo=.5,ezo=.42,tzo=.58,nzo=.75;function uUt(t,e){if(!e.showPinNumbers)return[];if(t.type==="pcb_smtpad"){if(e.layer&&t.layer!==e.layer)return[]}else if(e.layer&&!t.layers.includes(e.layer))return[];const n=_Ko(t,e.circuitJson);if(!n)return[];const o=ozo(t);if(!o||o.width<=0||o.height<=0)return[];const i=Math.abs(e.transform.a),r=Math.min(ZVo,o.height*ezo,o.width*nzo/(n.length*tzo));if(r<=0)return[];const[s,a]=hn(e.transform,[o.centerX,o.centerY]),A=t.type==="pcb_smtpad"?t.layer:"through",c=o.ccwRotation?`rotate(${-o.ccwRotation} ${s} ${a})`:void 0;return[{name:"text",type:"element",value:"",attributes:{class:"pcb-pad-pin-number",x:s.toString(),y:a.toString(),fill:"#b0b0b0","font-family":"Arial, sans-serif","font-size":(r*i).toString(),"font-weight":"500","text-anchor":"middle","dominant-baseline":"central","pointer-events":"none","data-type":"pcb_pad_pin_number","data-pcb-layer":A,"data-pin-number":n,...c?{transform:c}:{}},children:[{type:"text",value:n,name:"",attributes:{},children:[]}]}]}function ozo(t){if(t.type==="pcb_smtpad")return t.shape==="polygon"?gUt(t.points):t.shape==="circle"?{centerX:t.x,centerY:t.y,width:t.radius*2,height:t.radius*2,ccwRotation:0}:{centerX:t.x,centerY:t.y,width:t.width,height:t.height,ccwRotation:t.shape==="rotated_rect"||t.shape==="rotated_pill"?t.ccw_rotation:0};if(t.shape==="circle")return{centerX:t.x,centerY:t.y,width:t.outer_diameter,height:t.outer_diameter,ccwRotation:0};if(t.shape==="oval"||t.shape==="pill")return{centerX:t.x,centerY:t.y,width:t.outer_width,height:t.outer_height,ccwRotation:t.ccw_rotation};if(t.shape==="hole_with_polygon_pad"){const e=gUt(t.pad_outline);return e?{...e,centerX:t.x+e.centerX,centerY:t.y+e.centerY,ccwRotation:0}:void 0}if("rect_pad_width"in t)return{centerX:t.x,centerY:t.y,width:t.rect_pad_width,height:t.rect_pad_height,ccwRotation:t.shape==="rotated_pill_hole_with_rect_pad"?t.rect_ccw_rotation:t.shape==="circular_hole_with_rect_pad"?t.rect_ccw_rotation??0:0}}function gUt(t){if(t.length===0)return;const e=t.map(a=>a.x),n=t.map(a=>a.y),o=Math.min(...e),i=Math.max(...e),r=Math.min(...n),s=Math.max(...n);return{centerX:(o+i)/2,centerY:(r+s)/2,width:i-o,height:s-r,ccwRotation:0}}var dUt="rgb(255, 208, 66)";function izo(t,e){return t.map(n=>({...n,attributes:{...n.attributes??{},"data-type":e.type,"data-pcb-layer":"overlay"}}))}function rzo(t,e,n){if(!n.shouldDrawWarnings)return[];const o=e.find(_=>_.type==="pcb_component"&&_.pcb_component_id===t.pcb_component_id);if(!o)return[];const i=(o.rotation??0)*Math.PI/180,r=Math.cos(i),s=Math.sin(i),a=o.width/2,A=o.height/2,c=[{x:-a,y:-A},{x:a,y:-A},{x:a,y:A},{x:-a,y:A}].map(_=>hn(n.transform,{x:o.center.x+_.x*r-_.y*s,y:o.center.y+_.x*s+_.y*r})),l=Math.min(...c.map(_=>_.x)),u=Math.min(...c.map(_=>_.y)),g=Math.max(...c.map(_=>_.x)),h=Math.max(...c.map(_=>_.y)),d=g-l,p=h-u,m=l+d/2;return izo([{name:"rect",type:"element",value:"",attributes:{x:l.toString(),y:u.toString(),width:d.toString(),height:p.toString(),fill:"none",stroke:dUt,"stroke-width":"2","stroke-dasharray":"6,3"},children:[]},{name:"text",type:"element",value:"",attributes:{x:m.toString(),y:(u-10).toString(),fill:dUt,"font-family":"sans-serif","font-size":"12","font-weight":"600","text-anchor":"middle"},children:[{type:"text",name:"",value:t.message,attributes:{},children:[]}]}],t)}var hUt="#ff4d4d",szo=t=>({type:"text",value:t,name:"",attributes:{},children:[]}),QRe=({label:t,x:e,y:n,style:o,anchor:i="start"})=>t?[{name:"text",type:"element",value:"",attributes:{x:e.toString(),y:n.toString(),fill:hUt,"font-family":"monospace","font-size":o.fontSize.toString(),"font-weight":"600","text-anchor":i},children:[szo(t)]}]:[],azo=t=>({"data-type":"pcb_debug_object","data-pcb-layer":"overlay","data-pcb-debug-object-id":t.pcb_debug_object_id,"data-debug-shape":t.shape});function Azo({debugObject:t,transform:e,style:n,labelStackIndex:o=0}){const i=azo(t),r={fill:"none",stroke:hUt,"stroke-width":n.strokeWidth.toString(),"stroke-dasharray":`${n.dashLength},${n.dashLength}`};if(t.shape==="rect"){const A=hn(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),c=hn(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]),l=Math.min(A[0],c[0]),u=Math.min(A[1],c[1]),g=Math.abs(c[0]-A[0]),h=Math.abs(c[1]-A[1]);return[{name:"g",type:"element",value:"",attributes:i,children:[{name:"rect",type:"element",value:"",attributes:{x:l.toString(),y:u.toString(),width:g.toString(),height:h.toString(),...r},children:[]},...QRe({label:t.label,x:l,y:u-n.labelGap-o*(n.fontSize+n.labelGap),style:n})]}]}if(t.shape==="line"){const[A,c]=hn(e,[t.start.x,t.start.y]),[l,u]=hn(e,[t.end.x,t.end.y]);return[{name:"g",type:"element",value:"",attributes:i,children:[{name:"line",type:"element",value:"",attributes:{x1:A.toString(),y1:c.toString(),x2:l.toString(),y2:u.toString(),...r},children:[]},...QRe({label:t.label,x:(A+l)/2,y:(c+u)/2-n.labelGap,style:n,anchor:"middle"})]}]}const[s,a]=hn(e,[t.center.x,t.center.y]);return[{name:"g",type:"element",value:"",attributes:i,children:[{name:"circle",type:"element",value:"",attributes:{cx:s.toString(),cy:a.toString(),r:n.pointRadius.toString(),...r},children:[]},...QRe({label:t.label,x:s+n.pointRadius+n.labelGap,y:a-n.pointRadius,style:n})]}]}function pUt(t,e){const n=e?.drawPaddingOutsideBoard??!0,o=e?.layer,i=e?.colorOverrides,r={...ch.copper};if(i?.copper)for(const[fe,pe]of Object.entries(i.copper))pe!==void 0&&(r[fe]=pe);const s={copper:r,drill:i?.drill??ch.drill,silkscreen:{top:i?.silkscreen?.top??ch.silkscreen.top,bottom:i?.silkscreen?.bottom??ch.silkscreen.bottom},boardOutline:i?.boardOutline??ch.boardOutline,soldermask:{top:i?.soldermask?.top??ch.soldermask.top,bottom:i?.soldermask?.bottom??ch.soldermask.bottom},soldermaskOverCopper:{top:i?.soldermaskOverCopper?.top??ch.soldermaskOverCopper.top,bottom:i?.soldermaskOverCopper?.bottom??ch.soldermaskOverCopper.bottom},soldermaskWithCopperUnderneath:{top:i?.soldermaskWithCopperUnderneath?.top??ch.soldermaskWithCopperUnderneath.top,bottom:i?.soldermaskWithCopperUnderneath?.bottom??ch.soldermaskWithCopperUnderneath.bottom},substrate:i?.substrate??ch.substrate,courtyard:{top:i?.courtyard?.top??ch.courtyard.top,bottom:i?.courtyard?.bottom??ch.courtyard.bottom},keepout:i?.keepout??ch.keepout,debugComponent:{fill:i?.debugComponent?.fill??ch.debugComponent.fill,stroke:i?.debugComponent?.stroke??ch.debugComponent.stroke}},a=e?.showCourtyards?t:t.filter(fe=>fe.type!=="pcb_courtyard_rect"),{minX:A,minY:c,maxX:l,maxY:u,boardMinX:g,boardMinY:h,boardMaxX:d,boardMaxY:p,hasBoardBounds:m}=$Vo(a),{boundsMinX:_,boundsMinY:f,boundsMaxX:I,boundsMaxY:C,padding:y}=qVo({circuitJson:t,drawPaddingOutsideBoard:n,baseBounds:{minX:A,minY:c,maxX:l,maxY:u,boardMinX:g,boardMinY:h,boardMaxX:d,boardMaxY:p,hasBoardBounds:m},viewportOptions:{viewport:e?.viewport,viewportTarget:e?.viewportTarget}}),x=I-_+2*y,E=C-f+2*y;let B=e?.width??800,S=e?.height??600;if(e?.matchBoardAspectRatio){const fe=I-_,pe=C-f;if(fe>0&&pe>0){const ye=fe/pe;e?.width&&!e?.height?S=e.width/ye:e?.height&&!e?.width?B=e.height*ye:S=B/ye}}const Q=[];for(const fe of t)"route"in fe&&fe.route!==void 0&&Q.push(fe.route);const w=B/x,M=S/E,k=Math.min(w,M),R=(B-x*k)/2,F=(S-E*k)/2,O=m0(of(R-_*k+y*k,S-F+f*k-y*k),kx(k,-k)),U=Math.min(B,S),Y=Math.max(1,Math.min(2,U*.002)),W=Math.max(10,Math.min(18,U*.02)),te={transform:O,layer:o,shouldDrawErrors:e?.shouldDrawErrors,shouldDrawWarnings:e?.shouldDrawWarnings,showCourtyards:e?.showCourtyards,showPcbGroups:e?.showPcbGroups,drawPaddingOutsideBoard:n,colorMap:s,showSolderMask:e?.showSolderMask,showSolderPaste:e?.showSolderPaste,showPcbNotes:e?.showPcbNotes??!0,showDebugObjects:e?.showDebugObjects,debugObjectStyle:{fontSize:W,strokeWidth:Y,dashLength:Y*4,labelGap:W*.35,pointRadius:Y*3},showAnchorOffsets:e?.showAnchorOffsets,showPinNumbers:e?.showPinNumbers,circuitJson:t,usedCopperPourTraceMaskIds:new Set};let j=t.flatMap(fe=>czo({elm:fe,circuitJson:t,ctx:te}));for(const fe of t)if("stroke_width"in fe){String(k*fe.stroke_width);break}if(e?.shouldDrawRatsNest){const fe=SVo(t,te);j=[...j,...fe]}const J=iVo(zVo(j)),oe=[{name:"style",type:"element",value:"",attributes:{},children:[{type:"text",value:"",name:"",attributes:{},children:[]}]}],ie=kVo({grid:e?.grid,svgWidth:B,svgHeight:S});ie.defs&&oe.push(ie.defs),t.some(fe=>fe.type==="pcb_keepout")&&oe.push(MVo(s.keepout??ch.keepout));const le=oVo({circuitJson:t,transform:O,svgWidth:B,svgHeight:S,usedMaskIds:te.usedCopperPourTraceMaskIds});if(le&&oe.push(le),oe.push({name:"rect",type:"element",value:"",attributes:{class:"boundary",x:"0",y:"0",fill:e?.backgroundColor??"#000",width:B.toString(),height:S.toString(),"data-type":"pcb_background","data-pcb-layer":"global"},children:[]}),n&&oe.push(lzo(O,A,c,l,u)),oe.push(...J),ie.rect&&oe.push(ie.rect),e?.showErrorsInTextOverlay){const fe=IG(t,"pcb_error_text_overlay");fe&&oe.push(fe)}const ge=Gw(t),_e=Yw,ue={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",width:B.toString(),height:S.toString(),...ge&&{"data-software-used-string":ge},...e?.includeVersion&&{"data-circuit-to-svg-version":_e}},value:"",children:oe.filter(fe=>fe!==null)};try{return Ow(ue)}catch(fe){throw console.error("Error stringifying SVG object:",fe),fe}}function czo({elm:t,circuitJson:e,ctx:n}){switch(t.type){case"pcb_debug_object":return n.showDebugObjects?Azo({debugObject:t,transform:n.transform,style:n.debugObjectStyle,labelStackIndex:t.shape==="rect"?e.slice(0,e.indexOf(t)).filter(i=>i.type==="pcb_debug_object"&&i.shape==="rect"&&i.center.x===t.center.x&&i.center.y===t.center.y&&i.size.width===t.size.width&&i.size.height===t.size.height).length:0}):[];case"pcb_trace_error":return FUo(t,e,n).filter(Boolean);case"pcb_footprint_overlap_error":return OUo(t,e,n).filter(Boolean);case"pcb_courtyard_overlap_error":return GUo(t,e,n).filter(Boolean);case"pcb_component_outside_board_error":return KUo(t,e,n).filter(Boolean);case"pcb_pad_trace_clearance_error":case"pcb_via_trace_clearance_error":return qUo(t,e,n).filter(Boolean);case"pcb_connector_not_in_accessible_orientation_warning":case"pcb_manual_edit_conflict_warning":return rzo(t,e,n);case"pcb_component":return LVo(t,n).filter(Boolean);case"pcb_trace":return rVo(t,n);case"pcb_copper_pour":return RVo(t,n);case"pcb_plated_hole":return[...IKo(t,n).filter(Boolean),...uUt(t,n)];case"pcb_hole":return EVo(t,n);case"pcb_smtpad":return[...dVo(t,n),...uUt(t,n)];case"pcb_solder_paste":return n.showSolderPaste?sUt(t,n):[];case"pcb_silkscreen_text":return MKo(t,n);case"pcb_silkscreen_rect":return DKo(t,n);case"pcb_silkscreen_circle":return kKo(t,n);case"pcb_silkscreen_line":return FKo(t,n);case"pcb_silkscreen_pill":return LKo(t,n);case"pcb_silkscreen_oval":return HKo(t,n);case"pcb_copper_text":return TKo(t,n);case"pcb_courtyard_rect":return n.showCourtyards?OKo(t,n):[];case"pcb_courtyard_polygon":return n.showCourtyards?GKo(t,n):[];case"pcb_courtyard_circle":return n.showCourtyards?UKo(t,n):[];case"pcb_courtyard_outline":return n.showCourtyards?YKo(t,n):[];case"pcb_fabrication_note_path":return XUo(t,n);case"pcb_fabrication_note_text":return ZUo(t,n);case"pcb_fabrication_note_rect":return nKo(t,n);case"pcb_fabrication_note_dimension":return sKo(t,n);case"pcb_note_dimension":return n.showPcbNotes?aKo(t,n):[];case"pcb_note_text":return n.showPcbNotes?cKo(t,n):[];case"pcb_note_rect":return n.showPcbNotes?gKo(t,n):[];case"pcb_note_path":return n.showPcbNotes?hKo(t,n):[];case"pcb_note_line":return n.showPcbNotes?mKo(t,n):[];case"pcb_silkscreen_path":return CKo(t,n);case"pcb_silkscreen_graphic":return yKo(t,n);case"pcb_panel":return n.drawPaddingOutsideBoard?xVo(t,n):[];case"pcb_board":return n.drawPaddingOutsideBoard?tUt(t,n):[];case"pcb_via":return KYt(t,n);case"pcb_cutout":const o=t;return o.shape==="path"?vVo(o,n):QVo(t,n);case"pcb_keepout":return DVo(t,n);case"pcb_group":return n.showPcbGroups?GVo(t,n):[];default:return[]}}function lzo(t,e,n,o,i){const[r,s]=hn(t,[e,n]),[a,A]=hn(t,[o,i]),c=Math.abs(a-r),l=Math.abs(A-s),u=Math.min(r,a),g=Math.min(s,A);return{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-boundary",fill:"none",stroke:"#fff","stroke-width":"0.3",x:u.toString(),y:g.toString(),width:c.toString(),height:l.toString(),"data-type":"pcb_boundary","data-pcb-layer":"global"}}}var uzo=pUt,tde={fill:"none",stroke:"rgb(0,0,0)",strokeOpacity:"0.8",strokeWidthFactor:.2};function gzo(t,e,n={}){const{width:o,height:i,center:r,outline:s}=t;let a;if(s&&Array.isArray(s)&&s.length>=3)a=s.map((A,c)=>{const[l,u]=hn(e,[A.x,A.y]);return c===0?`M ${l} ${u}`:`L ${l} ${u}`}).join(" ");else{const A=o/2,c=i/2,l=hn(e,[r.x-A,r.y-c]),u=hn(e,[r.x+A,r.y-c]),g=hn(e,[r.x+A,r.y+c]),h=hn(e,[r.x-A,r.y+c]);a=`M ${l[0]} ${l[1]} L ${u[0]} ${u[1]} L ${g[0]} ${g[1]} L ${h[0]} ${h[1]}`}return a+=" Z",[{name:"path",type:"element",value:"",children:[],attributes:{class:"pcb-board",d:a,fill:n.fill??tde.fill,stroke:n.stroke??tde.stroke,"stroke-opacity":n.strokeOpacity??tde.strokeOpacity,"stroke-width":((n.strokeWidthFactor??tde.strokeWidthFactor)*Math.abs(e.a)).toString()}}]}var dzo={pin_number:.15,negated_pin_number:.15*.8,reference_designator:.18,manufacturer_number:.18,net_label:.18,error:.05},Uw=(t,e)=>e??dzo[t],pE=(t,e,n)=>Math.abs(t.a)*Uw(e,n);function hzo(t,e){const{elm:n,portPosition:o,name:i,arePinsInterchangeable:r}=t,{transform:s}=e,{center:a,width:A,height:c,rotation:l=0,layer:u="top"}=n;if(!a||typeof A!="number"||typeof c!="number")return null;const[g,h]=hn(s,[a.x,a.y]),[d,p]=hn(s,[o.x,o.y]),m=A*Math.abs(s.a),_=c*Math.abs(s.d),f=p>h,I=d<g,C=[pzo(m,_,l,u),mzo(m,_,i??"")];return r||C.push(_zo(m,_,l,u,f,I)),{name:"g",type:"element",value:"",attributes:{transform:`translate(${g}, ${h}) scale(1, -1)`},children:C}}function pzo(t,e,n,o){const i=t/2,r=e/2;return{name:"path",type:"element",attributes:{class:"assembly-component",d:fzo(i,r,n),"stroke-width":.8.toFixed(2),transform:`rotate(${-n})`,"stroke-dasharray":o==="bottom"?"2,2":""},value:"",children:[]}}function mzo(t,e,n,o){const i=Math.min(t,e),A=Math.min(58,Math.max(3,i*.8)),c=e>t;return{name:"text",type:"element",attributes:{x:"0",y:"0",class:"assembly-component-label","text-anchor":"middle",dy:".10em",style:"pointer-events: none","font-size":`${A.toFixed(1)}px`,transform:c?"rotate(90) scale(1, -1)":"scale(1, -1)"},children:[{type:"text",value:n||"",name:"",attributes:{},children:[]}],value:""}}function _zo(t,e,n,o,i,r){const s=t/2,a=e/2,A=Math.min(s,a)*.5;let c;return i&&r?c=[[-s,-a],[-s+A,-a],[-s,-a+A]]:i&&!r?c=[[s,-a],[s-A,-a],[s,-a+A]]:!i&&r?c=[[-s,a],[-s+A,a],[-s,a-A]]:c=[[s,a],[s-A,a],[s,a-A]],{name:"polygon",type:"element",attributes:{class:"assembly-pin1-indicator",points:c.map(u=>u.join(",")).join(" "),fill:"#333",stroke:"none",transform:`rotate(${-n})`},value:"",children:[]}}function fzo(t,e,n){const o=(a,A,c)=>{const l=Math.PI/180*c,u=Math.cos(l),g=Math.sin(l);return[a*u-A*g,a*g+A*u]};return`${[[-t,-e],[t,-e],[t,e],[-t,e]].map(([a,A])=>o(a,A,n)).map(([a,A],c)=>c===0?`M${a},${A}`:`L${a},${A}`).join(" ")} Z`}var vRe="rgb(190, 190, 190)";function Izo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.hole_shape==="circle"||t.hole_shape==="square"){const r=t.hole_diameter*Math.abs(n.a),s=r/2;return t.hole_shape==="circle"?[{name:"circle",type:"element",attributes:{class:"assembly-hole",cx:o.toString(),cy:i.toString(),r:s.toString(),fill:vRe},children:[],value:""}]:[{name:"rect",type:"element",attributes:{class:"assembly-hole",x:(o-s).toString(),y:(i-s).toString(),width:r.toString(),height:r.toString(),fill:vRe},children:[],value:""}]}if(t.hole_shape==="oval"){const r=t.hole_width*Math.abs(n.a),s=t.hole_height*Math.abs(n.a),a=r/2,A=s/2;return[{name:"ellipse",type:"element",attributes:{class:"assembly-hole",cx:o.toString(),cy:i.toString(),rx:a.toString(),ry:A.toString(),fill:vRe},children:[],value:""}]}return[]}var Iq="rgb(210, 210, 210)",Cq="rgb(190, 190, 190)";function Czo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.shape==="pill"){const r=t.outer_width*Math.abs(n.a),s=t.outer_height*Math.abs(n.a),a=t.hole_width*Math.abs(n.a),A=t.hole_height*Math.abs(n.a),c=r/2,l=s-r,u=a/2;return[{name:"g",type:"element",children:[{name:"path",type:"element",attributes:{class:"assembly-hole-outer",fill:Iq,d:`M${o-c},${i-l/2} v${l} a${c},${c} 0 0 0 ${r},0 v-${l} a${c},${c} 0 0 0 -${r},0 z`},value:"",children:[]},{name:"path",type:"element",attributes:{class:"assembly-hole-inner",fill:Cq,d:`M${o-u},${i-(A-a)/2} v${A-a} a${u},${u} 0 0 0 ${a},0 v-${A-a} a${u},${u} 0 0 0 -${a},0 z`},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="circle"){const r=t.outer_diameter*Math.abs(n.a),s=t.outer_diameter*Math.abs(n.a),a=t.hole_diameter*Math.abs(n.a),A=t.hole_diameter*Math.abs(n.a),c=Math.min(r,s)/2,l=Math.min(a,A)/2;return[{name:"g",type:"element",children:[{name:"circle",type:"element",attributes:{class:"assembly-hole-outer",fill:Iq,cx:o.toString(),cy:i.toString(),r:c.toString()},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"assembly-hole-inner",fill:Cq,cx:o.toString(),cy:i.toString(),r:l.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="circular_hole_with_rect_pad"){const r=t,s=r.hole_diameter*Math.abs(n.a),a=r.rect_pad_width*Math.abs(n.a),A=r.rect_pad_height*Math.abs(n.a),c=(r.rect_border_radius??0)*Math.abs(n.a),l=r.rect_ccw_rotation??0,u=s/2,[g,h]=hn(n,[r.x+r.hole_offset_x,r.y+r.hole_offset_y]);return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"assembly-hole-outer-pad",fill:Iq,...l?{x:(-a/2).toString(),y:(-A/2).toString(),transform:`translate(${o} ${i}) rotate(${-l})`}:{x:(o-a/2).toString(),y:(i-A/2).toString()},width:a.toString(),height:A.toString(),...c?{rx:c.toString(),ry:c.toString()}:{}},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"assembly-hole-inner",fill:Cq,cx:g.toString(),cy:h.toString(),r:u.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="pill_hole_with_rect_pad"){const r=t,s=r.rect_pad_width*Math.abs(n.a),a=r.rect_pad_height*Math.abs(n.a),A=(r.rect_border_radius??0)*Math.abs(n.a),c=r.hole_height*Math.abs(n.a),l=r.hole_width*Math.abs(n.a),u=r,g=u.hole_offset_x??0,h=u.hole_offset_y??0,[d,p]=hn(n,[r.x+g,r.y+h]),m=Math.min(c,l)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"assembly-hole-outer-pad",fill:Iq,x:(o-s/2).toString(),y:(i-a/2).toString(),width:s.toString(),height:a.toString(),...A?{rx:A.toString(),ry:A.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"assembly-hole-inner",fill:Cq,x:(d-l/2).toString(),y:(p-c/2).toString(),width:l.toString(),height:c.toString(),rx:m.toString(),ry:m.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="rotated_pill_hole_with_rect_pad"){const r=t,s=r.rect_pad_width*Math.abs(n.a),a=r.rect_pad_height*Math.abs(n.a),A=(r.rect_border_radius??0)*Math.abs(n.a),c=r.hole_height*Math.abs(n.a),l=r.hole_width*Math.abs(n.a),u=r,g=u.hole_offset_x??0,h=u.hole_offset_y??0,[d,p]=hn(n,[r.x+g,r.y+h]),m=Math.min(c,l)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"assembly-hole-outer-pad",fill:Iq,x:(-s/2).toString(),y:(-a/2).toString(),width:s.toString(),height:a.toString(),transform:`translate(${o} ${i}) rotate(${-r.rect_ccw_rotation})`,...A?{rx:A.toString(),ry:A.toString()}:{}},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"assembly-hole-inner",fill:Cq,x:(-l/2).toString(),y:(-c/2).toString(),width:l.toString(),height:c.toString(),rx:m.toString(),ry:m.toString(),transform:`translate(${d} ${p}) rotate(${-r.hole_ccw_rotation})`},value:"",children:[]}],value:"",attributes:{}}]}return[]}var yq="rgb(210, 210, 210)";function yzo(t,e){const{transform:n}=e;if(t.shape==="rect"||t.shape==="rotated_rect"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),[r,s]=hn(n,[t.x,t.y]),a=(t.rect_border_radius??0)*Math.abs(n.a);return t.shape==="rotated_rect"&&t.ccw_rotation?[{name:"rect",type:"element",attributes:{class:"assembly-pad",fill:yq,x:(-o/2).toString(),y:(-i/2).toString(),width:o.toString(),height:i.toString(),transform:`translate(${r} ${s}) rotate(${-t.ccw_rotation})`,"data-layer":t.layer,...a?{rx:a.toString(),ry:a.toString()}:{}},value:"",children:[]}]:[{name:"rect",type:"element",attributes:{class:"assembly-pad",fill:yq,x:(r-o/2).toString(),y:(s-i/2).toString(),width:o.toString(),height:i.toString(),"data-layer":t.layer,...a?{rx:a.toString(),ry:a.toString()}:{}},value:"",children:[]}]}if(t.shape==="pill"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),r=t.radius*Math.abs(n.a),[s,a]=hn(n,[t.x,t.y]);return[{name:"rect",type:"element",attributes:{class:"assembly-pad",fill:yq,x:(s-o/2).toString(),y:(a-i/2).toString(),width:o.toString(),height:i.toString(),rx:r.toString(),ry:r.toString(),"data-layer":t.layer},value:"",children:[]}]}if(t.shape==="circle"){const o=t.radius*Math.abs(n.a),[i,r]=hn(n,[t.x,t.y]);return[{name:"circle",type:"element",attributes:{class:"assembly-pad",fill:yq,cx:i.toString(),cy:r.toString(),r:o.toString(),"data-layer":t.layer},value:"",children:[]}]}if(t.shape==="polygon"){const o=(t.points??[]).map(i=>hn(n,[i.x,i.y]));return[{name:"polygon",type:"element",attributes:{class:"assembly-pad",fill:yq,points:o.map(i=>i.join(",")).join(" "),"data-layer":t.layer},value:"",children:[]}]}return[]}var mUt=["pcb_component","pcb_smtpad","pcb_hole","pcb_plated_hole","pcb_board"];function _Ut(t,e){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const E of t)if(E.type==="pcb_board"){const B=E.center,S=E.width||0,Q=E.height||0;n=Math.min(n,B.x-S/2),o=Math.min(o,B.y-Q/2),i=Math.max(i,B.x+S/2),r=Math.max(r,B.y+Q/2)}const s=1,a=i-n+2*s,A=r-o+2*s,c=e?.width??800,l=e?.height??600,u=c/a,g=l/A,h=Math.min(u,g),d=(c-a*h)/2,p=(l-A*h)/2,m=m0(of(d-n*h+s*h,l-p+o*h-s*h),kx(h,-h)),_={transform:m},f=t.sort((E,B)=>(mUt.indexOf(B.type)??9999)-(mUt.indexOf(E.type)??9999)).flatMap(E=>xzo(E,_,t)),I=Gw(t),C=Yw,y=[{name:"style",type:"element",children:[{type:"text",value:`
              .assembly-component { 
                fill: none; 
                stroke: #000; 
              }
              .assembly-board { 
                fill: #f2f2f2; 
                stroke: rgb(0,0,0); 
                stroke-opacity: 0.8;
              }
              .assembly-component-label { 
                fill: #000; 
                font-family: Arial, serif;
                font-weight: bold;
                dominant-baseline: middle;
                text-anchor: middle;
              }
              .assembly-boundary { 
                fill: none; 
                stroke: #fff;
                stroke-width: 0.2; 
              }
            `,name:"",attributes:{},children:[]}],value:"",attributes:{}},{name:"rect",type:"element",attributes:{fill:"#fff",x:"0",y:"0",width:c.toString(),height:l.toString()},value:"",children:[]},Ezo(m,n,o,i,r),...f].filter(E=>E!==null);if(e?.showErrorsInTextOverlay){const E=IG(t);E&&y.push(E)}const x={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",width:c.toString(),height:l.toString(),...I&&{"data-software-used-string":I},...e?.includeVersion&&{"data-circuit-to-svg-version":C}},value:"",children:y};return Ow(x)}function xzo(t,e,n){const o=Mr(n).source_component.list();switch(t.type){case"pcb_board":return gzo(t,e.transform);case"pcb_component":{const i=o.find(a=>a.source_component_id===t.source_component_id),s=Mr(n).pcb_port.list().filter(a=>a.pcb_component_id===t.pcb_component_id)[0];if(i&&s){const a=i.are_pins_interchangeable,A=hzo({elm:t,portPosition:{x:s.x,y:s.y},name:i.name,arePinsInterchangeable:a},e);return A?[A]:[]}return[]}case"pcb_smtpad":return yzo(t,e);case"pcb_hole":return Izo(t,e);case"pcb_plated_hole":return Czo(t,e);default:return[]}}function Ezo(t,e,n,o,i){const[r,s]=hn(t,[e,n]),[a,A]=hn(t,[o,i]),c=Math.abs(a-r),l=Math.abs(A-s),u=Math.min(r,a),g=Math.min(s,A);return{name:"rect",type:"element",value:"",children:[],attributes:{class:"assembly-boundary",x:u.toString(),y:g.toString(),width:c.toString(),height:l.toString()}}}var Bzo="rgb(26, 115, 143)",bzo="rgba(0,0,0,0.9)";function Szo(t,e){const{transform:n,soup:o}=e,{width:i,height:r,center:s,outline:a}=t,c=o.find(h=>h.type==="source_board"&&h.title)?.title;let l;if(a&&Array.isArray(a)&&a.length>=3)l=a.map((h,d)=>{const[p,m]=hn(n,[h.x,h.y]);return d===0?`M ${p} ${m}`:`L ${p} ${m}`}).join(" ");else{const h=i/2,d=r/2,p=hn(n,[s.x-h,s.y-d]),m=hn(n,[s.x+h,s.y-d]),_=hn(n,[s.x+h,s.y+d]),f=hn(n,[s.x-h,s.y+d]);l=`M ${p[0]} ${p[1]} L ${m[0]} ${m[1]} L ${_[0]} ${_[1]} L ${f[0]} ${f[1]}`}l+=" Z";const u=Mr(o).pcb_cutout.list();for(const h of u)if(h.shape==="rect"){const{x:d,y:p,width:m,height:_}=h.center?(()=>{const{x:B,y:S}=h.center,{width:Q,height:w}=h;return{x:B,y:S,width:Q,height:w}})():{x:0,y:0,width:0,height:0},f=m/2,I=_/2,[C,y,x,E]=[hn(n,[d-f,p-I]),hn(n,[d+f,p-I]),hn(n,[d+f,p+I]),hn(n,[d-f,p+I])];l+=` M ${C[0]} ${C[1]} L ${y[0]} ${y[1]} L ${x[0]} ${x[1]} L ${E[0]} ${E[1]} Z`}else h.shape;const g=[{name:"path",type:"element",value:"",children:[],attributes:{class:"pinout-board",d:l,fill:Bzo,stroke:bzo,"fill-rule":"evenodd","stroke-opacity":"0.8","stroke-width":(.2*Math.abs(n.a)).toString()}}];if(c){const h=e.svgWidth/2;g.push({name:"text",type:"element",value:"",children:[{name:"",type:"text",value:c,attributes:{},children:[]}],attributes:{x:h.toString(),y:30 .toString(),"text-anchor":"middle","font-size":"18px","font-weight":"bold","font-family":"Arial, sans-serif",fill:"black",class:"pinout-board-title"}})}return g}var Qzo="rgba(120, 120, 120, 0.6)",vzo="rgba(255, 255, 255, 0.9)";function wzo(t,e){const{transform:n,soup:o}=e,{center:i,width:r,height:s,rotation:a=0,source_component_id:A}=t,c=Mr(o).source_component.get(A);if(!i||typeof r!="number"||typeof s!="number"||r===0||s===0)return[];const[l,u]=hn(n,[i.x,i.y]),g=r*Math.abs(n.a),h=s*Math.abs(n.d),d=`translate(${l}, ${u})`,p=[{name:"rect",type:"element",attributes:{class:"pinout-component-box",x:(-g/2).toString(),y:(-h/2).toString(),width:g.toString(),height:h.toString(),fill:Qzo,transform:`rotate(${a}deg)`},value:"",children:[]}];if(c?.name){const m=Math.min(g,h)*.4;p.push({name:"text",type:"element",attributes:{x:"0",y:"0",fill:vzo,"font-size":`${m}px`,"font-family":"sans-serif","text-anchor":"middle","dominant-baseline":"middle"},children:[{type:"text",value:c.name,name:"",attributes:{},children:[]}],value:""})}return[{name:"g",type:"element",attributes:{transform:d},children:p,value:""}]}var wRe="rgb(50, 50, 50)";function Pzo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.hole_shape==="circle"||t.hole_shape==="square"){const r=t.hole_diameter*Math.abs(n.a),s=r/2;return t.hole_shape==="circle"?[{name:"circle",type:"element",attributes:{class:"pinout-hole",cx:o.toString(),cy:i.toString(),r:s.toString(),fill:wRe},children:[],value:""}]:[{name:"rect",type:"element",attributes:{class:"pinout-hole",x:(o-s).toString(),y:(i-s).toString(),width:r.toString(),height:r.toString(),fill:wRe},children:[],value:""}]}if(t.hole_shape==="oval"){const r=t.hole_width*Math.abs(n.a),s=t.hole_height*Math.abs(n.a),a=r/2,A=s/2;return[{name:"ellipse",type:"element",attributes:{class:"pinout-hole",cx:o.toString(),cy:i.toString(),rx:a.toString(),ry:A.toString(),fill:wRe},children:[],value:""}]}return[]}var xq="rgb(218, 165, 32)",Eq="rgb(40, 40, 40)";function Mzo(t,e){const{transform:n}=e,[o,i]=hn(n,[t.x,t.y]);if(t.shape==="pill"){const r=t.outer_width*Math.abs(n.a),s=t.outer_height*Math.abs(n.a),a=t.hole_width*Math.abs(n.a),A=t.hole_height*Math.abs(n.a),c=r/2,l=s-r,u=a/2;return[{name:"g",type:"element",children:[{name:"path",type:"element",attributes:{class:"pinout-hole-outer",fill:xq,d:`M${o-c},${i-l/2} v${l} a${c},${c} 0 0 0 ${r},0 v-${l} a${c},${c} 0 0 0 -${r},0 z`},value:"",children:[]},{name:"path",type:"element",attributes:{class:"pinout-hole-inner",fill:Eq,d:`M${o-u},${i-(A-a)/2} v${A-a} a${u},${u} 0 0 0 ${a},0 v-${A-a} a${u},${u} 0 0 0 -${a},0 z`},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="circle"){const r=t.outer_diameter*Math.abs(n.a),s=t.outer_diameter*Math.abs(n.a),a=t.hole_diameter*Math.abs(n.a),A=t.hole_diameter*Math.abs(n.a),c=Math.min(r,s)/2,l=Math.min(a,A)/2;return[{name:"g",type:"element",children:[{name:"circle",type:"element",attributes:{class:"pinout-hole-outer",fill:xq,cx:o.toString(),cy:i.toString(),r:c.toString()},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pinout-hole-inner",fill:Eq,cx:o.toString(),cy:i.toString(),r:l.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="circular_hole_with_rect_pad"){const r=t.hole_diameter*Math.abs(n.a),s=t.rect_pad_width*Math.abs(n.a),a=t.rect_pad_height*Math.abs(n.a),A=r/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pinout-hole-outer-pad",fill:xq,x:(o-s/2).toString(),y:(i-a/2).toString(),width:s.toString(),height:a.toString()},value:"",children:[]},{name:"circle",type:"element",attributes:{class:"pinout-hole-inner",fill:Eq,cx:o.toString(),cy:i.toString(),r:A.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="pill_hole_with_rect_pad"){const r=t.rect_pad_width*Math.abs(n.a),s=t.rect_pad_height*Math.abs(n.a),a=t.hole_height*Math.abs(n.a),A=t.hole_width*Math.abs(n.a),c=Math.min(a,A)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pinout-hole-outer-pad",fill:xq,x:(o-r/2).toString(),y:(i-s/2).toString(),width:r.toString(),height:s.toString()},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pinout-hole-inner",fill:Eq,x:(o-A/2).toString(),y:(i-a/2).toString(),width:A.toString(),height:a.toString(),rx:c.toString(),ry:c.toString()},value:"",children:[]}],value:"",attributes:{}}]}if(t.shape==="rotated_pill_hole_with_rect_pad"){const r=t.rect_pad_width*Math.abs(n.a),s=t.rect_pad_height*Math.abs(n.a),a=t.hole_height*Math.abs(n.a),A=t.hole_width*Math.abs(n.a),c=Math.min(a,A)/2;return[{name:"g",type:"element",children:[{name:"rect",type:"element",attributes:{class:"pinout-hole-outer-pad",fill:xq,x:(-r/2).toString(),y:(-s/2).toString(),width:r.toString(),height:s.toString(),transform:`translate(${o} ${i}) rotate(${-t.rect_ccw_rotation})`},value:"",children:[]},{name:"rect",type:"element",attributes:{class:"pinout-hole-inner",fill:Eq,x:(-A/2).toString(),y:(-a/2).toString(),width:A.toString(),height:a.toString(),rx:c.toString(),ry:c.toString(),transform:`translate(${o} ${i}) rotate(${-t.hole_ccw_rotation})`},value:"",children:[]}],value:"",attributes:{}}]}return[]}var Bq="rgb(218, 165, 32)";function Dzo(t,e){const{transform:n}=e;if(t.shape==="rect"||t.shape==="rotated_rect"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),[r,s]=hn(n,[t.x,t.y]);return t.shape==="rotated_rect"&&t.ccw_rotation?[{name:"rect",type:"element",attributes:{class:"pinout-pad",fill:Bq,x:(-o/2).toString(),y:(-i/2).toString(),width:o.toString(),height:i.toString(),transform:`translate(${r} ${s}) rotate(${-t.ccw_rotation})`,"data-layer":t.layer},value:"",children:[]}]:[{name:"rect",type:"element",attributes:{class:"pinout-pad",fill:Bq,x:(r-o/2).toString(),y:(s-i/2).toString(),width:o.toString(),height:i.toString(),"data-layer":t.layer},value:"",children:[]}]}if(t.shape==="pill"){const o=t.width*Math.abs(n.a),i=t.height*Math.abs(n.d),r=t.radius*Math.abs(n.a),[s,a]=hn(n,[t.x,t.y]);return[{name:"rect",type:"element",attributes:{class:"pinout-pad",fill:Bq,x:(s-o/2).toString(),y:(a-i/2).toString(),width:o.toString(),height:i.toString(),rx:r.toString(),ry:r.toString(),"data-layer":t.layer},value:"",children:[]}]}if(t.shape==="circle"){const o=t.radius*Math.abs(n.a),[i,r]=hn(n,[t.x,t.y]);return[{name:"circle",type:"element",attributes:{class:"pinout-pad",fill:Bq,cx:i.toString(),cy:r.toString(),r:o.toString(),"data-layer":t.layer},value:"",children:[]}]}if(t.shape==="polygon"){const o=(t.points??[]).map(i=>hn(n,[i.x,i.y]));return[{name:"polygon",type:"element",attributes:{class:"pinout-pad",fill:Bq,points:o.map(i=>i.join(",")).join(" "),"data-layer":t.layer},value:"",children:[]}]}return[]}function PRe(t){const{rectX:e,rectY:n,rectWidth:o,rectHeight:i,textX:r,textY:s,text:a,fontSize:A,labelBackground:c,labelColor:l,rx:u=4,ry:g=4,fontFamily:h="Arial, sans-serif",fontWeight:d="bold",textAnchor:p="middle",dominantBaseline:m="middle"}=t;return[{name:"rect",type:"element",attributes:{x:e.toString(),y:n.toString(),width:o.toString(),height:i.toString(),fill:c,rx:typeof u=="number"?u.toString():u,ry:typeof g=="number"?g.toString():g,stroke:"none"},children:[],value:""},{name:"text",type:"element",attributes:{x:r.toString(),y:s.toString(),fill:l,"font-size":`${A}px`,"font-family":h,"font-weight":d,"text-anchor":p,"dominant-baseline":m},children:[{type:"text",value:a,name:"",attributes:{},children:[]}],value:""}]}var fUt="rgb(255, 255, 255)",IUt="rgb(0, 0, 0)",Nzo="rgba(0, 0, 0, 0.6)",Rzo="rgb(200, 200, 200)",Tzo="rgb(0, 0, 0)";function kzo(t,e){const n=e.label_positions.get(t.pcb_port_id);if(!n)return[];const{text:o,aliases:i,elbow_end:r,label_pos:s,edge:a}=n,[A,c]=hn(e.transform,[t.x,t.y]),l=a==="left"?"x-":a==="right"?"x+":a==="top"?"y-":"y+",u=a==="left"?"x+":a==="right"?"x-":a==="top"?"y+":"y-",g=wF({x:A,y:c,facingDirection:l},{x:r.x,y:r.y,facingDirection:u},{}),h=/^pin(\d+)$/i.exec(o),d=[{text:h?h[1]:o,bg:h?Rzo:IUt,color:h?Tzo:fUt},...i.map(F=>({text:F,bg:IUt,color:fUt}))],p=Math.abs(e.transform.a),m=e.styleScale??1,f=1.6*m*p,I=Math.max(.08,.25*m),y=.3*m*p,x=I*p,E={x:s.x+(a==="left"?-x/2:x/2),y:s.y},B=[...g,E].map(F=>`${F.x},${F.y}`).join(" "),S=f*(11/21),Q=(f-S)/2,w=Q,M=d.map(({text:F,bg:O,color:U})=>{const Y=F??"",te=Y.length*S*.6+2*Q;return{text:Y,rectWidth:te,bg:O,color:U}}),k=s.y,R=[{name:"polyline",type:"element",attributes:{points:B,stroke:Nzo,"stroke-width":(I*p).toString(),fill:"none"},children:[],value:""}];if(a==="left"){let F=s.x;for(const{text:O,rectWidth:U,bg:Y,color:W}of M){const te=F-U,j=te+U/2;R.push(...PRe({rectX:te,rectY:k-f/2,rectWidth:U,rectHeight:f,textX:j,textY:k,text:O,fontSize:S,labelBackground:Y,labelColor:W,rx:y,ry:y})),F=te-w}}else if(a==="right"){let F=s.x;for(const{text:O,rectWidth:U,bg:Y,color:W}of M){const te=F,j=te+U/2;R.push(...PRe({rectX:te,rectY:k-f/2,rectWidth:U,rectHeight:f,textX:j,textY:k,text:O,fontSize:S,labelBackground:Y,labelColor:W,rx:y,ry:y})),F=te+U+w}}else{const F=M.reduce((U,Y)=>U+Y.rectWidth,0)+w*Math.max(0,M.length-1);let O=s.x-F/2;for(const{text:U,rectWidth:Y,bg:W,color:te}of M){const j=O,J=j+Y/2;R.push(...PRe({rectX:j,rectY:k-f/2,rectWidth:Y,rectHeight:f,textX:J,textY:k,text:U,fontSize:S,labelBackground:W,labelColor:te,rx:y,ry:y})),O=j+Y+w}}return R}var CUt=1.6,Fzo=11/21,Lzo=.6,yUt=.1,xUt=.1,MRe=3,EUt=.1,Hzo=.8;function BUt(t,e,{transform:n,soup:o,board_bounds:i,svgHeight:r,styleScale:s},a){const A=e.map(R=>R.pcb_port.x),c={};for(const R of A){const F=R.toFixed(1);c[F]=(c[F]||0)+1}let l;if(Object.keys(c).length>1&&e.length>2){const R=Object.entries(c).sort((J,oe)=>oe[1]-J[1]),F=parseFloat(R[0][0]),O=e.filter(J=>Math.abs(J.pcb_port.x-F)<.2),U=e.filter(J=>Math.abs(J.pcb_port.x-F)>=.2),Y=J=>({pcb_port:J.pcb_port,y:hn(n,[J.pcb_port.x,J.pcb_port.y])[1],aliases:J.aliases});O.sort((J,oe)=>oe.pcb_port.y-J.pcb_port.y),U.sort((J,oe)=>oe.pcb_port.y-J.pcb_port.y);const W=O.length>0?Math.max(...O.map(J=>J.pcb_port.y)):-1/0;l=((U.length>0?Math.max(...U.map(J=>J.pcb_port.y)):-1/0)>W?[...U,...O]:[...O,...U]).map(Y)}else l=e.map(R=>({pcb_port:R.pcb_port,y:hn(n,[R.pcb_port.x,R.pcb_port.y])[1],aliases:R.aliases})).sort((R,F)=>R.y-F.y);if(l.length===0)return;const u=hn(n,[t==="left"?i.minX:i.maxX,0])[0],g=l.length,h={};for(const R of e){const F=R.pcb_port.x.toFixed(1);h[F]=(h[F]||0)+1}let d=new Set;if(Object.keys(h).length>1&&e.length>2){const R=Object.entries(h).sort((U,Y)=>Y[1]-U[1]),F=parseFloat(R[0][0]),O=e.filter(U=>Math.abs(U.pcb_port.x-F)<.2);d=new Set(O.map(U=>U.pcb_port.pcb_port_id))}const p=l.map((R,F)=>d.has(R.pcb_port.pcb_port_id)?F:-1).filter(R=>R!==-1),m=(g-1)/2,_=Math.abs(n.a),f=CUt*s*_,C=Math.max(.2*_,.3*s*_),y=Hzo*s*_,x=(yUt+g*xUt)*s*_,B=x+m*(MRe*s*_)+EUt*s*_,S=g-p.length,Q=p.length===0?g:S,w=Q*f+Math.max(0,Q-1)*C;let M;if(p.length>0&&S>0){const R=p.map(j=>l[j].y),F=Math.min(...R),O=Math.max(...R),U=F-f/2,Y=O+f/2;l.map((j,J)=>J).filter(j=>!p.includes(j))[0]<p[0]?M=U-(C*2+y)-w+f/2:M=Y+(C*2+y)+f/2}else M=(r-w)/2+f/2;const k=p.length===g;l.forEach(({pcb_port:R,aliases:F},O)=>{let U;if(p.length>0)if(p.includes(O))U=m;else{const ie=Math.min(...p),ne=Math.max(...p);let le;O<ie?le=ie-O:le=O-ne,U=m-le}else{const ie=Math.abs(O-m);U=m-ie}const Y=x+U*(MRe*s*_),W=t==="left"?-1:1,te=p.includes(O),j=k||p.length>0&&te?l[O].y:M,J={x:u+W*Y,y:j},oe={x:u+W*B,y:j};a.set(R.pcb_port_id,{text:F[0],aliases:F.slice(1),elbow_end:J,label_pos:oe,edge:t}),p.length>0&&te||(M+=f+C)})}var Ozo=({left_labels:t,right_labels:e,transform:n,soup:o,board_bounds:i,svgWidth:r,svgHeight:s,styleScale:a})=>{const A=new Map,c={transform:n,soup:o,board_bounds:i};return BUt("left",t,{...c,svgHeight:s,styleScale:a},A),BUt("right",e,{...c,svgHeight:s,styleScale:a},A),A};function Gzo(t,e){const n=Mr(e).source_port.get(t.source_port_id);if(!n)return null;const o=n.port_hints?.filter(s=>!/^\d+$/.test(s)&&!["left","right","top","bottom"].includes(s))??[];let i=o[0];if(i||(i=n.name),!i)return null;const r=o.filter(s=>s!==i);return{text:i,aliases:r}}function Yzo(t,e){const n={left:t.x-e.minX,right:e.maxX-t.x,top:e.maxY-t.y,bottom:t.y-e.minY};let o="left",i=n.left;return n.right<i&&(i=n.right,o="right"),n.top<i&&(i=n.top,o="top"),n.bottom<i&&(i=n.bottom,o="bottom"),o}var bUt=["pcb_board","pcb_smtpad","pcb_hole","pcb_plated_hole","pcb_component","pcb_port"];function SUt(t,e){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const pe of t)if(pe.type==="pcb_board")if("outline"in pe&&pe.outline&&Array.isArray(pe.outline)&&pe.outline.length>0)for(const ye of pe.outline)n=Math.min(n,ye.x),o=Math.min(o,ye.y),i=Math.max(i,ye.x),r=Math.max(r,ye.y);else{const ye=pe.center,Me=pe.width||0,ve=pe.height||0;n=Math.min(n,ye.x-Me/2),o=Math.min(o,ye.y-ve/2),i=Math.max(i,ye.x+Me/2),r=Math.max(r,ye.y+ve/2)}const s=2;let a=e?.width??1200,A=e?.height??768;t.find(pe=>pe.type==="source_board"&&!!pe.title)?.title;const c={minX:n,minY:o,maxX:i,maxY:r},l=t.filter(pe=>pe.type==="pcb_port"&&pe.is_board_pinout),u=[];for(const pe of l){const ye=Gzo(pe,t);if(!ye)continue;const Me=Yzo({x:pe.x,y:pe.y},c);u.push({pcb_port:pe,aliases:[ye.text,...ye.aliases],edge:Me})}const g=u.filter(pe=>pe.edge==="left"),h=u.filter(pe=>pe.edge==="right"),d=u.filter(pe=>pe.edge==="top"),p=u.filter(pe=>pe.edge==="bottom"),m=(n+i)/2;d.length>0&&(d.filter(ye=>ye.pcb_port.x<m).length>d.length/2?g.push(...d):h.push(...d)),p.length>0&&(p.filter(ye=>ye.pcb_port.x<m).length>p.length/2?g.push(...p):h.push(...p));const f=t.filter(pe=>pe.type==="pcb_smtpad").map(pe=>{if(typeof pe.height=="number")return pe.height;if(typeof pe.radius=="number")return pe.radius*2}).filter(pe=>Number.isFinite(pe)),I=f.length?f.reduce((pe,ye)=>pe+ye,0)/f.length:void 0,y=I?Math.max(.5,Math.min(1,I/1)):1,x=CUt*y;function E(pe){const ye=[...pe.aliases??[]];if(ye.length===0)return ye;const Me=/^pin(\d+)$/i.exec(ye[0]);return Me&&(ye[0]=Me[1]),ye}function B(pe){if(pe.length===0)return 0;const ye=x,Me=ye*Fzo,ve=(ye-Me)/2,he=ve;return pe.map(we=>(we??"").length*Me*Lzo+2*ve).reduce((we,Te)=>we+Te,0)+he*Math.max(0,pe.length-1)}function S(pe){if(pe<=0)return 0;const ye=(pe-1)/2;return(yUt+pe*xUt)*y+ye*(MRe*y)+EUt*y}const Q=Math.max(0,...g.map(pe=>B(E(pe)))),w=Math.max(0,...h.map(pe=>B(E(pe)))),M=S(g.length)+Q,k=S(h.length)+w,R=n-M,O=i+k-R+2*s,U=r-o+2*s,Y=a/O,W=A/U,te=Math.min(Y,W),j=(a-O*te)/2,J=(A-U*te)/2,oe=m0(of(j-R*te+s*te,A-J+o*te-s*te),kx(te,-te)),ie=Ozo({left_labels:g,right_labels:h,transform:oe,soup:t,board_bounds:c,svgWidth:a,svgHeight:A,styleScale:y}),ne={transform:oe,soup:t,styleScale:y,label_positions:ie,svgWidth:a},le=t.sort((pe,ye)=>(bUt.indexOf(pe.type)??9999)-(bUt.indexOf(ye.type)??9999)).flatMap(pe=>Uzo(pe,ne)),ge=Gw(t),_e=Yw,ue=[{name:"rect",type:"element",attributes:{fill:"rgb(255, 255, 255)",x:"0",y:"0",width:a.toString(),height:A.toString()},value:"",children:[]},...le].filter(pe=>pe!==null);if(e?.showErrorsInTextOverlay){const pe=IG(t);pe&&ue.push(pe)}const fe={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",width:a.toString(),height:A.toString(),...ge&&{"data-software-used-string":ge},...e?.includeVersion&&{"data-circuit-to-svg-version":_e}},value:"",children:ue};return Ow(fe)}function Uzo(t,e,n){switch(t.type){case"pcb_board":return Szo(t,e);case"pcb_component":return wzo(t,e);case"pcb_smtpad":return Dzo(t,e);case"pcb_hole":return Pzo(t,e);case"pcb_plated_hole":return Mzo(t,e);case"pcb_port":return t.is_board_pinout?kzo(t,e):[];default:return[]}}function Kzo(t){const{minX:e,minY:n,maxX:o,maxY:i}=t.bounds,r=t.cellSize??1,s=t.labelCells??!1,a=[],A=(c,l)=>{const[u,g]=hn(t.transform,[c,l]);return{x:u,y:g}};for(let c=Math.floor(e);c<=Math.ceil(o);c+=r){const l=A(c,n),u=A(c,i);a.push({name:"line",type:"element",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:Lg.schematic.grid,"stroke-width":(.01*Math.abs(t.transform.a)).toString(),"stroke-opacity":"0.5"}})}for(let c=Math.floor(n);c<=Math.ceil(i);c+=r){const l=A(e,c),u=A(o,c);a.push({name:"line",type:"element",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:Lg.schematic.grid,"stroke-width":(.01*Math.abs(t.transform.a)).toString(),"stroke-opacity":"0.5"}})}if(s){const c=(l,u)=>r<=.1?`${l.toFixed(1)},${u.toFixed(1)}`:`${l},${u}`;for(let l=Math.floor(e);l<=Math.ceil(o);l+=r)for(let u=Math.floor(n);u<=Math.ceil(i);u+=r){const g=A(l,u);a.push({name:"text",type:"element",attributes:{x:(g.x-2.5).toString(),y:(g.y-5).toString(),fill:Lg.schematic.grid,"font-size":(r/5*Math.abs(t.transform.a)).toString(),"fill-opacity":"0.5","text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif"},children:[{type:"text",value:c(l,u),name:"",attributes:{},children:[]}]})}}return{name:"g",value:"",type:"element",attributes:{class:"grid sch-grid"},children:a}}function Vzo(t){const{points:e,transform:n}=t,o=[];for(const i of e){const[r,s]=hn(n,[i.x-.1,i.y-.1]),[a,A]=hn(n,[i.x+.1,i.y+.1]),[c,l]=hn(n,[i.x-.1,i.y+.1]),[u,g]=hn(n,[i.x+.1,i.y-.1]);o.push({name:"path",type:"element",attributes:{d:`M${r},${s} L${a},${A} M${c},${l} L${u},${g}`,stroke:Lg.schematic.grid,"stroke-width":(.02*Math.abs(n.a)).toString(),"stroke-opacity":"0.7"}});const[h,d]=hn(n,[i.x+.15,i.y-.15]);o.push({name:"text",type:"element",attributes:{x:h.toString(),y:d.toString(),fill:Lg.schematic.grid,"font-size":(.1*Math.abs(n.a)).toString(),"fill-opacity":"0.7","text-anchor":"start","font-family":"sans-serif","dominant-baseline":"middle"},children:[{type:"text",value:i.label||`(${i.x},${i.y})`,name:"",attributes:{},children:[]}]})}return{name:"g",value:"",type:"element",attributes:{class:"labeled-points sch-labeled-points"},children:o}}function zzo(t){return t.reduce((e,n)=>e?n.sheet_index===void 0?e:e.sheet_index===void 0||n.sheet_index<e.sheet_index?n:e:n,void 0)}var QUt={0:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},1:{width:13,height:27,ascent:22,descent:5,left:-3,right:9},2:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},3:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},4:{width:13,height:27,ascent:22,descent:5,left:0,right:12},5:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},6:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},7:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},8:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},9:{width:13,height:27,ascent:22,descent:5,left:-1,right:12}," ":{width:7,height:27,ascent:22,descent:5,left:0,right:0},"!":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},'"':{width:9,height:27,ascent:22,descent:5,left:-1,right:7},"#":{width:13,height:27,ascent:22,descent:5,left:0,right:13},$:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"%":{width:21,height:27,ascent:22,descent:5,left:-1,right:20},"&":{width:16,height:27,ascent:22,descent:5,left:-1,right:15},"'":{width:5,height:27,ascent:22,descent:5,left:-1,right:3},"(":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},")":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"*":{width:9,height:27,ascent:22,descent:5,left:-1,right:8},"+":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},",":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"-":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},".":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"/":{width:7,height:27,ascent:22,descent:5,left:0,right:7},":":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},";":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"<":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},"=":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},">":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},"?":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"@":{width:24,height:27,ascent:22,descent:5,left:-1,right:23},A:{width:16,height:27,ascent:22,descent:5,left:0,right:16},B:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},C:{width:17,height:27,ascent:22,descent:5,left:-1,right:16},D:{width:17,height:27,ascent:22,descent:5,left:-2,right:16},E:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},F:{width:15,height:27,ascent:22,descent:5,left:-2,right:14},G:{width:19,height:27,ascent:22,descent:5,left:-1,right:17},H:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},I:{width:7,height:27,ascent:22,descent:5,left:-2,right:5},J:{width:12,height:27,ascent:22,descent:5,left:-1,right:10},K:{width:16,height:27,ascent:22,descent:5,left:-2,right:16},L:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},M:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},N:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},O:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},P:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},Q:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},R:{width:17,height:27,ascent:22,descent:5,left:-2,right:17},S:{width:16,height:27,ascent:22,descent:5,left:-1,right:15},T:{width:15,height:27,ascent:22,descent:5,left:-1,right:14},U:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},V:{width:16,height:27,ascent:22,descent:5,left:0,right:16},W:{width:23,height:27,ascent:22,descent:5,left:0,right:22},X:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Y:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Z:{width:15,height:27,ascent:22,descent:5,left:0,right:14},"[":{width:7,height:27,ascent:22,descent:5,left:-2,right:6},"\\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},"]":{width:7,height:27,ascent:22,descent:5,left:0,right:5},"^":{width:11,height:27,ascent:22,descent:5,left:-1,right:11},_:{width:13,height:27,ascent:22,descent:5,left:0,right:14},"`":{width:8,height:27,ascent:22,descent:5,left:-1,right:5},a:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},b:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},c:{width:12,height:27,ascent:22,descent:5,left:-1,right:12},d:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},e:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},f:{width:7,height:27,ascent:22,descent:5,left:0,right:8},g:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},h:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},i:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},j:{width:5,height:27,ascent:22,descent:5,left:1,right:4},k:{width:12,height:27,ascent:22,descent:5,left:-2,right:12},l:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},m:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},n:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},o:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},p:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},q:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},r:{width:8,height:27,ascent:22,descent:5,left:-2,right:8},s:{width:12,height:27,ascent:22,descent:5,left:-1,right:11},t:{width:7,height:27,ascent:22,descent:5,left:0,right:6},u:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},v:{width:12,height:27,ascent:22,descent:5,left:0,right:12},w:{width:17,height:27,ascent:22,descent:5,left:0,right:17},x:{width:12,height:27,ascent:22,descent:5,left:0,right:12},y:{width:12,height:27,ascent:22,descent:5,left:0,right:12},z:{width:12,height:27,ascent:22,descent:5,left:0,right:11},"{":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"|":{width:6,height:27,ascent:22,descent:5,left:-2,right:4},"}":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"~":{width:14,height:27,ascent:22,descent:5,left:-1,right:13}},bq=t=>{if(!t)return 0;let e=0;for(const n of t){const o=QUt[n];o?e+=o.width:e+=QUt["?"].width}return e/27},vUt=.65,wUt=.08;function nde(t){return bq(t.text||"")+(t.display_superscript?wUt+bq(t.display_superscript)*vUt:0)}function DRe(t,e,n,o="central"){const i=[{type:"text",value:t,name:"",attributes:{},children:[]}];return e&&i.push({type:"element",name:"tspan",value:"",attributes:{class:"sch-net-label-superscript","font-size":`${n*vUt}px`,dx:`${n*wUt}`,dy:`${-n*(o==="ideographic"?.5:.25)}`},children:[{type:"text",value:e,name:"",attributes:{},children:[]}]}),i}var CG=t=>{switch(t){case"top":return{x:0,y:-1};case"bottom":return{x:0,y:1};case"left":return{x:1,y:0};case"right":return{x:-1,y:0}}throw new Error(`Invalid side: ${t}`)},Kw=.3,yG=.3,xG=.06,PUt=.2,MUt=t=>({"data-circuit-json-type":"schematic_net_label","data-schematic-net-label-id":t.schematic_net_label_id}),Jzo={top_left:"start",top_right:"end",middle_left:"start",middle_right:"end",bottom_left:"start",bottom_right:"end",center:"middle",middle_top:"middle",middle_bottom:"middle"},DUt={top_left:"hanging",top_right:"hanging",bottom_left:"ideographic",bottom_right:"ideographic",center:"middle",middle_left:"middle",middle_right:"middle",middle_top:"hanging",middle_bottom:"ideographic"};function Wzo(t){return{left:180,top:90,bottom:-90,right:0}[t]??0}function jzo(t,e,n){const o=n+Kw*2+xG*t.text.length+yG,i=CG(t.anchor_side);return t.anchor_position??{x:t.center.x-i.x*o*e/2,y:t.center.y-i.y*o*e/2}}var $zo=(t,e)=>{const n=t<0?t+2*Math.PI:t,o=e<0?e+2*Math.PI:e;let i=Math.abs(n-o);return i>Math.PI&&(i=2*Math.PI-i),i},NUt=({schPorts:t,symbol:e,schComponent:n})=>{const o=t.map(a=>{const A=a.center.x-n.center.x,c=a.center.y-n.center.y;return{port:a,angle:Math.atan2(c,A)}}),i=e.ports.map(a=>{const A=a.x-e.center.x,c=a.y-e.center.y;return{port:a,angle:Math.atan2(c,A)}});o.sort((a,A)=>a.angle-A.angle),i.sort((a,A)=>a.angle-A.angle);const r=[],s=new Set;for(const a of o){let A=null;for(const c of i){if(s.has(c.port))continue;const l=$zo(a.angle,c.angle);(A===null||l<A.angleDiff)&&(A={symbolPort:c.port,angleDiff:l})}A&&A.angleDiff<Math.PI/4&&(r.push({schPort:a.port,symbolPort:A.symbolPort}),s.add(A.symbolPort))}return r};function RUt(t,e,n,o){const i=e.x-t.x,r=e.y-t.y,s=Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2),A=Math.sqrt((o.x-e.x)**2+(o.y-e.y)**2)/s,c=of(i,r),l=kx(A,A);return m0(c,l)}function qzo(t){const e=[],n=new Map,o=new Map;let i=null;for(const r of t)if(r.type==="schematic_component")e.push(r);else if(r.type==="schematic_port"&&r.schematic_component_id){const s=n.get(r.schematic_component_id)??[];s.push(r),n.set(r.schematic_component_id,s)}else r.type==="source_component"&&o.set(r.source_component_id,r);for(const r of e){const s=Xzo({component:r,schematicPorts:n.get(r.schematic_component_id)??[],sourceComponent:r.source_component_id?o.get(r.source_component_id):void 0});s&&(i=i?TUt(i,s):s)}return i}function Xzo({component:t,schematicPorts:e,sourceComponent:n}){if(!t.symbol_name)return null;const o=Su[t.symbol_name];if(!o)return null;const i=NUt({schPorts:e,symbol:o,schComponent:t});if(!i[0])return null;const r=RUt(i[1]?.symbolPort??o.center,i[1]?.schPort.center??t.center,i[0].symbolPort,i[0].schPort.center);let s=null;for(const a of o.primitives){if(a.type!=="text")continue;const A=Zzo({primitive:a,component:t,sourceComponent:n});if(!A)continue;const c=hn(r,a),l=Uw("reference_designator"),u=eJo({x:c.x,y:c.y,width:bq(A)*l,height:l,anchor:a.anchor});s=s?TUt(s,u):u}return s}function Zzo({primitive:t,component:e,sourceComponent:n}){return t.text==="{REF}"?n?.display_name??n?.name??"":t.text==="{VAL}"?e.symbol_display_value??"":""}function eJo({x:t,y:e,width:n,height:o,anchor:i}){let r=t,s=t,a=e-o/2,A=e+o/2;return i.includes("left")?s=t+n:i.includes("right")?r=t-n:(r=t-n/2,s=t+n/2),i.includes("top")?(a=e-o,A=e):i.includes("bottom")&&(a=e,A=e+o),{minX:r,minY:a,maxX:s,maxY:A}}function TUt(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}var kUt=(t,e)=>{if(t.column_widths&&t.column_widths.length>0&&t.row_heights&&t.row_heights.length>0){const l=u=>typeof u=="number"?u:u.endsWith("mm")?parseFloat(u):u.endsWith("in")?parseFloat(u)*25.4:parseFloat(u);return{column_widths:t.column_widths.map(l),row_heights:t.row_heights.map(l)}}const n=e.filter(l=>l.type==="schematic_table_cell"&&l.schematic_table_id===t.schematic_table_id);if(n.length===0)return{column_widths:[],row_heights:[]};const o=n.reduce((l,u)=>Math.max(l,u.end_column_index),-1)+1,i=n.reduce((l,u)=>Math.max(l,u.end_row_index),-1)+1,{cell_padding:r=.2}=t,s=new Array(o).fill(0),a=new Array(i).fill(0),A={},c={};for(const l of n){const u=Uw("reference_designator",l.font_size),h=bq(l.text??"")*u+2*r,d=u*1.2+2*r,p=`${l.start_row_index}-${l.start_column_index}`;A[p]=h,c[p]=d}for(let l=0;l<i;l++)for(let u=0;u<o;u++){const g=`${l}-${u}`;A[g]&&A[g]>s[u]&&(s[u]=A[g]),c[g]&&c[g]>a[l]&&(a[l]=c[g])}for(const l of n){if(l.start_column_index===l.end_column_index&&l.start_row_index===l.end_row_index)continue;const u=`${l.start_row_index}-${l.start_column_index}`,g=A[u],h=c[u];if(g===void 0||h===void 0)continue;let d=0;for(let m=l.start_column_index;m<=l.end_column_index;m++)d+=s[m];if(g>d){const _=(g-d)/(l.end_column_index-l.start_column_index+1);for(let f=l.start_column_index;f<=l.end_column_index;f++)s[f]+=_}let p=0;for(let m=l.start_row_index;m<=l.end_row_index;m++)p+=a[m];if(h>p){const _=(h-p)/(l.end_row_index-l.start_row_index+1);for(let f=l.start_row_index;f<=l.end_row_index;f++)a[f]+=_}}return{column_widths:s,row_heights:a}},tJo=10.16,nJo=1.1,MR=tJo/nJo,oJo=297/MR,iJo=210/MR,ode=5/MR;function Sq(t={}){const e=t.center??{x:0,y:0},n=t.sheet_width===void 0?oJo:t.sheet_width/MR,o=t.sheet_height===void 0?iJo:t.sheet_height/MR,i=e.x-n/2,r=e.x+n/2,s=e.y-o/2,a=e.y+o/2;return{center:e,width:n,height:o,minX:i,maxX:r,minY:s,maxY:a,innerMinX:i+ode,innerMaxX:r-ode,innerMinY:s+ode,innerMaxY:a-ode}}function rJo(t,e=.5){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=.2;for(const c of t)if(c.type==="schematic_sheet"){const l=Sq(c);A(l.center,{width:l.width,height:l.height},0)}else if(c.type==="schematic_component")A(c.center,c.size,0);else if(c.type==="schematic_port")A(c.center,{width:s,height:s},0);else if(c.type==="schematic_debug_object")c.shape==="rect"?A(c.center,c.size,0):c.shape==="line"&&(A(c.start,{width:.1,height:.1},0),A(c.end,{width:.1,height:.1},0));else if(c.type==="schematic_net_label"){const l=Uw("net_label"),u=nde(c),h=(u+Kw*2+xG*(c.text?.length||0)+yG)*l,d=PUt,p=Wzo(c.anchor_side)/180*Math.PI,m=jzo(c,l,u),_=CG(c.anchor_side),f={x:m.x+_.x*h/2,y:m.y+_.y*h/2};A(f,{width:h,height:d},p)}else if(c.type==="schematic_trace")for(const l of c.edges)A(l.from,{width:.1,height:.1},0),A(l.to,{width:.1,height:.1},0);else if(c.type==="schematic_text"){const u=Uw("reference_designator",c.font_size)??.18,g=c.text??"",h=c.display_superscript;if(h){const d=g.split(`
`),p=Math.max(...d.map((x,E)=>nde({text:x,display_superscript:E===d.length-1?h:void 0})))*u,m=c.anchor,_=m==="left"||m.endsWith("_left")?p/2:m==="right"||m.endsWith("_right")?-p/2:0,f=m==="top"||m.startsWith("top_")?0:m==="bottom"||m.startsWith("bottom_")?-u:-u/2,I=(d.length+.3)*u,C=-(f-.3*u+I/2),y=-(c.rotation??0)*Math.PI/180;A({x:c.position.x+_*Math.cos(y)-C*Math.sin(y),y:c.position.y+_*Math.sin(y)+C*Math.cos(y)},{width:p,height:I},y)}else{const d=g.length*u,p=u;A(c.position,{width:d,height:p},c.rotation??0)}}else if(c.type==="schematic_voltage_probe"){if(A(c.position,{width:.2,height:.4},0),c.name){const l=Uw("net_label"),u=bq(c.name)*l,g=l,h=.3,d=c.label_alignment??"top_right";let p=c.position.x,m=c.position.y;d.includes("top")?m+=h+g/2:d.includes("bottom")&&(m-=h+g/2),d.includes("right")?p+=h+u/2:d.includes("left")&&(p-=h+u/2),A({x:p,y:m},{width:u,height:g},0)}}else if(c.type==="schematic_box")A({x:c.x+c.width/2,y:c.y+c.height/2},{width:c.width,height:c.height},0);else if(c.type==="schematic_table"){const{column_widths:l,row_heights:u}=kUt(c,t),g=l.reduce((I,C)=>I+C,0),h=u.reduce((I,C)=>I+C,0),d=c.anchor??"center";let p=c.anchor_position.x,m=c.anchor_position.y;d.includes("center")?p-=g/2:d.includes("right")&&(p-=g),d.includes("center")?m+=h/2:d.includes("bottom")&&(m+=h);const _=p+g/2,f=m-h/2;A({x:_,y:f},{width:g,height:h},0)}else if(c.type==="schematic_line")A({x:c.x1,y:c.y1},{width:.02,height:.02},0),A({x:c.x2,y:c.y2},{width:.02,height:.02},0);else if(c.type==="schematic_circle")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type==="schematic_rect")A(c.center,{width:c.width,height:c.height},c.rotation);else if(c.type==="schematic_arc")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type==="schematic_path"&&c.points&&c.points.length>0)for(const l of c.points)A(l,{width:.02,height:.02},0);Number.isFinite(n)||(n=-1,o=-1,i=1,r=1),n-=e,o-=e,i+=e,r+=e;const a=qzo(t);return a&&(a.minX<n&&(n=a.minX-e),a.minY<o&&(o=a.minY-e),a.maxX>i&&(i=a.maxX+e),a.maxY>r&&(r=a.maxY+e)),{minX:n,minY:o,maxX:i,maxY:r};function A(c,l,u){const g=[{x:-l.width/2,y:-l.height/2},{x:l.width/2,y:-l.height/2},{x:l.width/2,y:l.height/2},{x:-l.width/2,y:l.height/2}];for(const h of g){const d=h.x*Math.cos(u)-h.y*Math.sin(u)+c.x,p=h.x*Math.sin(u)+h.y*Math.cos(u)+c.y;n=Math.min(n,d),o=Math.min(o,p),i=Math.max(i,d),r=Math.max(r,p)}}}function NRe(t){if(t.type!=="element")throw new Error("Expected SVG root element to be of type 'element'");return t}function FUt(t){return{...t,attributes:{...t.attributes??{}},children:t.children?.map(FUt)??[]}}function Qq(t,e,n,o,i){const r=FUt(t);return r.attributes={...r.attributes,x:lm(e),y:lm(n),width:lm(o),height:lm(i)},delete r.attributes.xmlns,r}function lm(t){return Number.isFinite(t)?Number.parseFloat(t.toFixed(6)).toString():"0"}var vq="image/svg+xml";function sJo({schematicGraphic:t,viewport:e}){const n=aJo(t);return{name:"g",type:"element",value:"",attributes:{class:"schematic-graphic","pointer-events":"none","data-circuit-json-type":"schematic_graphic","data-schematic-graphic-id":t.schematic_graphic_id,...t.schematic_sheet_id?{"data-schematic-sheet-id":t.schematic_sheet_id}:{}},children:[{name:"image",type:"element",value:"",attributes:{href:n,x:lm(e.x),y:lm(e.y),width:lm(e.width),height:lm(e.height),preserveAspectRatio:"xMidYMid meet",overflow:"hidden","pointer-events":"none"},children:[]}]}}function aJo(t){const e=`Unable to render schematic graphic "${t.schematic_graphic_id}"`,{asset:n,svg_content:o}=t;if(!n){if(o!==void 0)return LUt(o);throw new Error(`${e}: asset or svg_content is required`)}if(HUt(n.mimetype)!==vq)throw new Error(`${e}: asset.mimetype must be "${vq}" (received ${JSON.stringify(n.mimetype)})`);const i=n.url.trim();if(i.toLowerCase().startsWith("data:"))return AJo(i,e),i;if(o!==void 0)return LUt(o);throw new Error(`${e}: asset.url must be an inline SVG data URL because circuit-to-svg cannot synchronously load ${JSON.stringify(n.url)}`)}function AJo(t,e){const n=t.match(/^data:([^,]*),(.*)$/is);if(!n)throw new Error(`${e}: asset.url is not a valid SVG data URL`);const o=n[1].split(";").map(A=>A.trim());if(HUt(o.shift()??"")!==vq)throw new Error(`${e}: asset.url must use the "${vq}" media type`);const r=n[2],s=o.findIndex(A=>A.toLowerCase()==="base64"),a=s!==-1;if(a&&s!==o.length-1)throw new Error(`${e}: asset.url must place "base64" as its final metadata token`);if(a){const A=r.replace(/\s+/g,"");if(!/^(?:[a-z\d+/]{4})*(?:[a-z\d+/]{2}==|[a-z\d+/]{3}=)?$/i.test(A))throw new Error(`${e}: asset.url is not a valid SVG data URL`);return}if(r.includes("#"))throw new Error(`${e}: asset.url must percent-encode "#" in a non-base64 SVG data URL`);try{decodeURIComponent(r)}catch(A){throw new Error(`${e}: asset.url is not a valid SVG data URL`,{cause:A})}}function LUt(t){const e=new TextEncoder().encode(t);let n="";const o=32768;for(let i=0;i<e.length;i+=o)n+=String.fromCharCode(...e.subarray(i,i+o));return`data:${vq};base64,${btoa(n)}`}function HUt(t){return(t.split(";",1)[0]??"").trim().toLowerCase()}var i_=t=>Math.abs(t.a)*.02,RRe=({text:t,realCenter:e,realToScreenTransform:n})=>{const o=hn(n,e);return{type:"element",name:"text",value:"",attributes:{x:o.x.toString(),y:o.y.toString(),fill:"red","text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif","font-size":`${pE(n,"error")}px`},children:[{type:"text",value:t,name:"",attributes:{},children:[]}]}},cJo=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=>{if(!t.text)return[];const o=t.text.startsWith("N_"),i=o?t.text.slice(2):t.text,r=MUt(t),s=[],a=Su[t.symbol_name];if(!a){const O=RRe({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e});return O.attributes={...O.attributes,...r},s.push(O),s}const A=a.primitives.filter(O=>O.type==="path"),c=a.primitives.filter(O=>O.type==="text"),l=a.primitives.filter(O=>O.type==="circle"),u=a.primitives.filter(O=>O.type==="box"),g={minX:Math.min(...A.flatMap(O=>O.points.map(U=>U.x))),maxX:Math.max(...A.flatMap(O=>O.points.map(U=>U.x))),minY:Math.min(...A.flatMap(O=>O.points.map(U=>U.y))),maxY:Math.max(...A.flatMap(O=>O.points.map(U=>U.y)))},h=Uw("net_label"),p=nde({...t,text:i})+Kw*2+xG*i.length+yG,m=CG(t.anchor_side),_=t.anchor_position??{x:t.center.x-m.x*p*h/2,y:t.center.y-m.y*p*h/2},I=jb(0/180*Math.PI),C={minX:Math.min(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.x):[])),maxX:Math.max(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.x):[])),minY:Math.min(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.y):[])),maxY:Math.max(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.y):[]))},y=a.ports?.[0]?{x:a.ports[0].x,y:a.ports[0].y}:{x:C.minX,y:(C.minY+C.maxY)/2},x=hn(I,y),E=m0(of(_.x-x.x,_.y-x.y),I,kx(1)),[B,S]=hn(m0(e,E),[g.minX,g.minY]),[Q,w]=hn(m0(e,E),[g.maxX,g.maxY]),M=Math.abs(w-S),k=Math.min(S,w),R=Math.abs(Q-B),F=Math.min(B,Q);s.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay sch-net-label-overlay",...r,x:F.toString(),y:k.toString(),width:R.toString(),height:M.toString(),fill:"transparent"},children:[]});for(const O of A){const U=O.points.map((Y,W)=>{const[te,j]=hn(m0(e,E),[Y.x,Y.y]);return`${W===0?"M":"L"} ${te} ${j}`}).join(" ");s.push({name:"path",type:"element",attributes:{class:"sch-net-label-symbol-path",...r,d:U+(O.closed?" Z":""),stroke:n.schematic.component_outline,fill:"none","stroke-width":`${i_(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}for(const O of c){const U=hn(m0(e,E),O);let Y=O.text;Y==="{REF}"?Y=i||"":Y==="{VAL}"&&(Y=""),Math.abs(e.a);const W={x:U.x,y:U.y};s.push({name:"text",type:"element",attributes:{class:"sch-net-label-symbol-text",...r,x:W.x.toString(),y:W.y.toString(),fill:n.schematic.label_local,"font-family":"sans-serif","text-anchor":Jzo[O.anchor],"dominant-baseline":DUt[O.anchor],"font-size":`${pE(e,"reference_designator")}px`,...o&&Y===i?{style:"text-decoration: overline;"}:{}},children:DRe(Y,O.text==="{REF}"?t.display_superscript:void 0,pE(e,"reference_designator"),DUt[O.anchor]),value:""})}for(const O of u){const U=hn(m0(e,E),O),Y=m0(e,E).a;s.push({name:"rect",type:"element",attributes:{class:"sch-net-label-symbol-box",...r,x:U.x.toString(),y:U.y.toString(),width:(O.width*Y).toString(),height:(O.height*Y).toString(),fill:"red"},value:"",children:[]})}for(const O of l){const U=hn(m0(e,E),O),Y=m0(e,E).a;s.push({name:"circle",type:"element",attributes:{class:"sch-net-label-symbol-circle",...r,cx:U.x.toString(),cy:U.y.toString(),r:(O.radius*Y).toString(),fill:"none",stroke:n.schematic.component_outline,"stroke-width":`${i_(e)}px`},value:"",children:[]})}return s},lJo=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=>{if(!t.text)return[];const o=t.text;if(t.symbol_name)return cJo({schNetLabel:t,realToScreenTransform:e,colorMap:n});const i=MUt(t),r=[],s=pE(e,"net_label"),a=Uw("net_label"),A=PUt/a/2,c=nde({...t,text:o}),l=hn(e,t.center),u=CG(t.anchor_side),g={...u};g.y*=-1;const h=c+Kw*2+xG*o.length+yG,d=t.anchor_position?hn(e,t.anchor_position):{x:l.x-g.x*h*s/2,y:l.y-g.y*h*s/2},p=t.anchor_position??{x:t.center.x-u.x*h*a/2,y:t.center.y-u.y*h*a/2},m={left:0,top:-90,bottom:90,right:180}[t.anchor_side],_=[{x:0,y:0},{x:Kw,y:A},{x:Kw*2+yG+xG*o.length+c,y:A},{x:Kw*2+yG+xG*o.length+c,y:-A},{x:Kw,y:-A}].map(x=>hn(m0(e,of(p.x,p.y),kx(a),jb(m/180*Math.PI)),x)),f=`
    M ${_[0].x},${_[0].y}
    L ${_[1].x},${_[1].y}
    L ${_[2].x},${_[2].y}
    L ${_[3].x},${_[3].y}
    L ${_[4].x},${_[4].y}
    Z
  `;r.push({name:"path",type:"element",attributes:{class:"net-label sch-net-label",...i,d:f,fill:n.schematic.label_background,stroke:n.schematic.label_global,"stroke-width":`${i_(e)}px`},value:"",children:[]});const I={x:d.x+g.x*s*.5,y:d.y+g.y*s*.5},C={left:"start",top:"start",bottom:"start",right:"end"}[t.anchor_side],y={left:"",right:"",top:`rotate(90 ${I.x} ${I.y})`,bottom:`rotate(-90 ${I.x} ${I.y})`}[t.anchor_side];return r.push({name:"text",type:"element",attributes:{class:"net-label-text sch-net-label-text",...i,x:I.x.toString(),y:I.y.toString(),fill:n.schematic.label_global,"text-anchor":C,"dominant-baseline":"central","font-family":"sans-serif","font-variant-numeric":"tabular-nums","font-size":`${s}px`,transform:y},children:DRe(o,t.display_superscript,s),value:""}),r},uJo=.02,gJo=({schPort:t,transform:e})=>{const n=hn(e,t.center),o=Math.abs(e.a)*uJo*2;return[{name:"g",type:"element",value:"",attributes:{class:"schematic-port-hover sch-port-hover","data-schematic-port-id":t.source_port_id,...t.schematic_sheet_id?{"data-schematic-sheet-id":t.schematic_sheet_id}:{}},children:[{name:"circle",type:"element",value:"",attributes:{cx:n.x.toString(),cy:n.y.toString(),r:o.toString(),fill:"red",opacity:"0"},children:[]}]}]},OUt=({component:t,transform:e,circuitJson:n})=>{const o=Mr(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),i=[];for(const r of o)i.push(...gJo({schPort:r,transform:e}));return i},dJo=({schPort:t,transform:e,colorMap:n})=>{const{x:i,y:r}=t.center,s=[-1,1].map(a=>{const A=hn(e,{x:i-.05,y:r-a*.05}),c=hn(e,{x:i+.05,y:r+a*.05});return`M ${A.x} ${A.y} L ${c.x} ${c.y}`}).join(" ");return{name:"path",type:"element",value:"",attributes:{class:"sch-port-no-connect","data-schematic-port-id":t.schematic_port_id,"data-source-port-id":t.source_port_id,d:s,fill:"none",stroke:n.schematic.no_connect,"stroke-width":`${i_(e)}px`,"stroke-linecap":"round"},children:[]}},GUt=.02,hJo=({schPort:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=Math.abs(e.a)*GUt,s=Math.abs(e.a)*GUt,a=hn(e,t.center),A=n.find(l=>l.type==="source_port"&&l.source_port_id===t.source_port_id);A?.do_not_connect||i.push({name:"circle",type:"element",value:"",attributes:{class:"component-pin sch-component-pin sch-port-indicator",cx:a.x.toString(),cy:a.y.toString(),r:r.toString(),fill:"none",stroke:o.schematic.component_outline,"stroke-width":s.toString(),"data-schematic-port-id":t.schematic_port_id},children:[]});const c=t.display_pin_label??A?.name;if(c){const l={...t.center},u=t.distance_from_component_edge??0,g=.05;let h="middle",d="";switch(t.facing_direction){case"left":l.x+=u/2,l.y+=g,h="start";break;case"right":l.x-=u/2,l.y+=g,h="end";break;case"up":l.y-=u/2,l.x-=g,h="middle";break;case"down":l.y+=u/2,l.x-=g,h="middle";break}const p=hn(e,l),m=pE(e,"pin_number");(t.facing_direction==="up"||t.facing_direction==="down")&&(d=`rotate(-90 ${p.x} ${p.y})`),i.push({name:"text",type:"element",value:"",attributes:{class:"port-indicator-label sch-port-label",x:p.x.toString(),y:p.y.toString(),fill:o.schematic.component_outline,"font-family":"sans-serif","font-size":`${m*.7}px`,"text-anchor":h,"dominant-baseline":"middle",...d&&{transform:d}},children:[{type:"text",value:c,name:"",attributes:{},children:[]}]})}return i},YUt=t=>({type:"element",name:"tspan",value:"",attributes:t.is_overlined?{"text-decoration":"overline"}:{},children:[{type:"text",name:"",value:t.text,attributes:{},children:[]}]}),pJo=t=>t.filter(e=>e.text).map(YUt),mJo=t=>{const e=[[]];for(const n of t)n.text.split(`
`).forEach((o,i)=>{i>0&&e.push([]),o&&e.at(-1).push(YUt({...n,text:o}))});return e},TRe=({elm:t,transform:e,colorMap:n})=>{const o=hn(e,t.position),i={center:"middle",center_right:"end",bottom_left:"start",bottom_center:"middle",bottom_right:"end",left:"start",right:"end",top:"middle",bottom:"middle",top_left:"start",top_center:"middle",top_right:"end",center_left:"start"},r={center:"middle",center_right:"middle",bottom_left:"ideographic",bottom_center:"ideographic",bottom_right:"ideographic",left:"middle",right:"middle",top:"hanging",bottom:"ideographic",top_left:"hanging",top_center:"hanging",top_right:"hanging",center_left:"middle"},s=t.text.split(`
`),a=mJo(t.text_parts??[]),A=s.length===1?t.text_parts?.length?a[0]:[{type:"text",value:t.text,name:t.schematic_text_id,attributes:{},children:[]}]:s.map((c,l)=>({type:"element",name:"tspan",value:"",attributes:{x:o.x.toString(),...l>0?{dy:"1em"}:{}},children:t.text_parts?.length?a[l]??[]:[{type:"text",value:c,name:l===0?t.schematic_text_id:"",attributes:{},children:[]}]}));return t.display_superscript&&(s.length===1?A:A[A.length-1].children).push(...DRe("",t.display_superscript,pE(e,"reference_designator",t.font_size),r[t.anchor]).slice(1)),{type:"element",name:"text",value:"",attributes:{class:"sch-text",x:o.x.toString(),y:o.y.toString(),fill:t.color??n.schematic.sheet_label,"text-anchor":i[t.anchor],"dominant-baseline":r[t.anchor],"font-family":"sans-serif","font-size":`${pE(e,"reference_designator",t.font_size)}px`,transform:`rotate(${t.rotation}, ${o.x}, ${o.y})`},children:A}};function UUt({schArc:t,transform:e,colorMap:n}){const o=hn(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=t.start_angle_degrees*Math.PI/180,A=t.end_angle_degrees*Math.PI/180,c=o.x+i*Math.cos(a),l=o.y+i*Math.sin(a),u=o.x+i*Math.cos(A),g=o.y+i*Math.sin(A);let h=t.end_angle_degrees-t.start_angle_degrees;t.direction==="clockwise"&&(h=-h),h<0&&(h+=360);const d=h>180?1:0,p=t.direction==="clockwise"?1:0;return[{name:"path",type:"element",attributes:{class:"sch-arc",d:`M ${c} ${l} A ${i} ${i} 0 ${d} ${p} ${u} ${g}`,fill:"none",stroke:t.color,"stroke-width":s.toString(),...t.is_dashed&&{"stroke-dasharray":(s*3).toString()},"data-schematic-arc-id":t.schematic_arc_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var _Jo=({schematicBox:t,transform:e,colorMap:n})=>{const o=hn(e,{x:t.x,y:t.y}),i=hn(e,{x:t.x+t.width,y:t.y+t.height}),r=Math.min(o.y,i.y),s=Math.max(o.y,i.y),a=Math.min(o.x,i.x),A=Math.max(o.x,i.x),c=i_(e),l={class:"schematic-box sch-box",x:a.toString(),y:r.toString(),width:(A-a).toString(),height:(s-r).toString(),"stroke-width":`${c}px`,stroke:n.schematic.component_outline||"black",fill:"transparent"};if(t.is_dashed){const u=8*c,g=4*c;l["stroke-dasharray"]=`${u} ${g}`}return[{name:"rect",type:"element",value:"",attributes:l,children:[]}]};function KUt({schCircle:t,transform:e,colorMap:n}){const o=hn(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r;return[{name:"circle",type:"element",attributes:{class:"sch-circle",cx:o.x.toString(),cy:o.y.toString(),r:i.toString(),fill:t.is_filled?t.fill_color??t.color:"none",stroke:t.color,"stroke-width":s.toString(),...t.is_dashed&&{"stroke-dasharray":(s*3).toString()},"data-schematic-circle-id":t.schematic_circle_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var VUt=(t,e)=>{for(const n of t){if(n.type!=="source_trace")continue;const o=n;if(Array.isArray(o.connected_source_port_ids)&&o.connected_source_port_ids.includes(e))return!0}return!1},fJo={top_left:"start",top_right:"end",middle_left:"start",middle_right:"end",bottom_left:"start",bottom_right:"end",center:"middle",middle_top:"middle",middle_bottom:"middle"},IJo={top_left:"hanging",top_right:"hanging",bottom_left:"ideographic",bottom_right:"ideographic",center:"middle",middle_left:"middle",middle_right:"middle",middle_top:"hanging",middle_bottom:"ideographic"},CJo=({component:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=Su[t.symbol_name];if(!r)return[RRe({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const s=Mr(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),a=Mr(n).source_component.get(t.source_component_id),A=NUt({schPorts:s,symbol:r,schComponent:t});if(!A[0])return[RRe({text:`Could not match ports for symbol ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const c=RUt(A[1]?.symbolPort??r.center,A[1]?.schPort.center??t.center,A[0].symbolPort,A[0].schPort.center),l=r.primitives.filter(B=>B.type==="path"),u=r.primitives.filter(B=>B.type==="text"),g=r.primitives.filter(B=>B.type==="circle"),h=r.primitives.filter(B=>B.type==="box"),d=new Set;for(const B of A)(VUt(n,B.schPort.source_port_id)||Mr(n).source_port.get(B.schPort.source_port_id)?.do_not_connect)&&d.add(B.symbolPort);const p={minX:Math.min(...l.flatMap(B=>B.points.map(S=>S.x))),maxX:Math.max(...l.flatMap(B=>B.points.map(S=>S.x))),minY:Math.min(...l.flatMap(B=>B.points.map(S=>S.y))),maxY:Math.max(...l.flatMap(B=>B.points.map(S=>S.y)))},[m,_]=hn(m0(e,c),[p.minX,p.minY]),[f,I]=hn(m0(e,c),[p.maxX,p.maxY]),C=Math.abs(I-_),y=Math.min(_,I),x=Math.abs(f-m),E=Math.min(m,f);i.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay",x:E.toString(),y:y.toString(),width:x.toString(),height:C.toString(),fill:"transparent"},children:[]});for(const B of l){const{points:S,color:Q,closed:w,fill:M}=B;i.push({type:"element",name:"path",attributes:{class:"sch-component-symbol-path",d:S.map((k,R)=>{const[F,O]=hn(m0(e,c),[k.x,k.y]);return`${R===0?"M":"L"} ${F} ${O}`}).join(" ")+(w?" Z":""),stroke:o.schematic.component_outline,fill:"none","stroke-width":`${i_(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}for(const B of u){const S=hn(m0(e,c),B);let Q="";const w=B.text==="{REF}";w?Q=a?.display_name??a?.name??"":B.text==="{VAL}"&&(Q=t.symbol_display_value??"");const M=IJo[B.anchor];i.push({name:"text",type:"element",attributes:{class:w?"sch-component-name sch-component-text":"sch-component-text",x:S.x.toString(),y:S.y.toString(),...w?{stroke:o.schematic.background,"stroke-width":`${i_(e)}px`,"paint-order":"stroke"}:{},fill:o.schematic.label_local,"font-family":"sans-serif","text-anchor":fJo[B.anchor],"dominant-baseline":M,"font-size":`${pE(e,"reference_designator")}px`},value:"",children:[{type:"text",value:Q,name:"",attributes:{},children:[]}]})}for(const B of h){const S=hn(m0(e,c),B),Q=m0(e,c).a;i.push({name:"rect",type:"element",attributes:{class:"sch-component-symbol-box",x:S.x.toString(),y:S.y.toString(),width:(B.width*Q).toString(),height:(B.height*Q).toString(),fill:"red"},value:"",children:[]})}for(const B of r.ports){if(d.has(B))continue;const S=hn(m0(e,c),B);i.push({type:"element",name:"circle",attributes:{class:"component-pin sch-component-pin",cx:S.x.toString(),cy:S.y.toString(),r:`${Math.abs(e.a)*.02}px`,"stroke-width":`${i_(e)}px`,fill:"none",stroke:o.schematic.component_outline},value:"",children:[]})}for(const B of g){const S=hn(m0(e,c),B),Q=Math.abs(B.radius*e.a);i.push({type:"element",name:"circle",attributes:{class:"sch-component-symbol-circle",cx:S.x.toString(),cy:S.y.toString(),r:`${Q}px`,"stroke-width":`${i_(e)}px`,fill:"none",stroke:o.schematic.component_outline},value:"",children:[]})}return i},wq=.02,zUt=(t,e,n,o,i)=>{const r=Math.PI/6,s={x:t.x-n*Math.cos(e-r),y:t.y-n*Math.sin(e-r)},a={x:t.x-n*Math.cos(e+r),y:t.y-n*Math.sin(e+r)};return{name:"polygon",type:"element",attributes:{points:`${t.x},${t.y} ${s.x},${s.y} ${a.x},${a.y}`,fill:"white",stroke:o,"stroke-width":`${i}px`},value:"",children:[]}},yJo=({schPort:t,schComponent:e,transform:n,circuitJson:o})=>{const i=[],r=Mr(o).source_port.get(t.source_port_id),s={x:t.center.x,y:t.center.y},a=t.distance_from_component_edge??.4;switch(t.side_of_component){case"left":s.x+=a;break;case"right":s.x-=a;break;case"top":s.y-=a;break;case"bottom":s.y+=a;break}const A=hn(n,t.center),c=hn(n,s),l=r!=null&&r.source_component_id==null&&typeof t.is_connected=="boolean"?t.is_connected:VUt(o,t.source_port_id),u=t.is_drawn_with_inversion_circle??!1,g=.06,h={...t.center};if(!l&&!r?.do_not_connect)switch(t.side_of_component){case"left":h.x+=wq;break;case"right":h.x-=wq;break;case"top":h.y-=wq;break;case"bottom":h.y+=wq;break}const d=hn(n,h);if(u){const I=Math.abs(n.a)*g,C={...c};switch(t.side_of_component){case"left":C.x-=I,c.x-=I*2;break;case"right":C.x+=I,c.x+=I*2;break;case"top":C.y-=I,c.y-=I*2;break;case"bottom":C.y+=I,c.y+=I*2;break}i.push({name:"circle",type:"element",attributes:{class:"component-pin sch-component-pin sch-inversion-bubble",cx:C.x.toString(),cy:C.y.toString(),r:I.toString(),fill:"white",stroke:Lg.schematic.component_outline,"stroke-width":`${i_(n)}px`},value:"",children:[]})}i.push({name:"line",type:"element",attributes:{class:"component-pin sch-component-pin sch-port-line",x1:c.x.toString(),y1:c.y.toString(),x2:d.x.toString(),y2:d.y.toString(),"stroke-width":`${i_(n)}px`},value:"",children:[]});const p=Math.abs(n.a)*wq,m=[];!l&&!r?.do_not_connect&&m.push({name:"circle",type:"element",attributes:{class:"component-pin sch-component-pin sch-port-terminal",cx:A.x.toString(),cy:A.y.toString(),r:p.toString(),"stroke-width":`${i_(n)}px`},value:"",children:[]}),m.push({name:"rect",type:"element",attributes:{x:(A.x-p).toString(),y:(A.y-p).toString(),width:(p*2).toString(),height:(p*2).toString(),opacity:"0"},value:"",children:[]}),i.push({name:"g",type:"element",value:"",attributes:{class:"sch-port","data-schematic-port-id":t.source_port_id},children:m});const{has_input_arrow:_,has_output_arrow:f}=t;if((_||f)&&t.side_of_component){const I=Math.abs(n.a)*.1,C=Lg.schematic.component_outline,y=I*Math.cos(Math.PI/6),x=i_(n)/3;let E=0,B=0;t.side_of_component==="left"?(E=0,B=Math.PI):t.side_of_component==="right"?(E=Math.PI,B=0):t.side_of_component==="top"?(E=Math.PI/2,B=-Math.PI/2):t.side_of_component==="bottom"&&(E=-Math.PI/2,B=Math.PI/2);const S=_&&f;let Q={...c},w={...c};if(S){const M=y;t.side_of_component==="left"?w.x-=M:t.side_of_component==="right"?w.x+=M:t.side_of_component==="top"?w.y-=M:t.side_of_component==="bottom"&&(w.y+=M)}if(_&&i.push(zUt(Q,E,I,C,x)),f){const M={x:w.x+I*Math.cos(B),y:w.y+I*Math.sin(B)};i.push(zUt(M,B,I,C,x))}}return i},xJo=t=>{const e=[],{schPort:n,transform:o}=t,i={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const r=CG(n.side_of_component),s=n.distance_from_component_edge??.4;i.x+=r.x*s/2,i.y+=r.y*s/2,n.side_of_component==="top"||n.side_of_component==="bottom"?i.x-=.02:i.y+=.02;const a=hn(o,i);return e.push({name:"text",type:"element",attributes:{class:"pin-number sch-pin-number",x:a.x.toString(),y:a.y.toString(),style:"font-family: sans-serif;",fill:Lg.schematic.pin_number,"text-anchor":"middle","dominant-baseline":"auto","font-size":`${pE(o,"pin_number")}px`,transform:n.side_of_component==="top"||n.side_of_component==="bottom"?`rotate(-90 ${a.x} ${a.y})`:""},children:[{type:"text",value:n.pin_number?.toString()||"",name:"",attributes:{},children:[]}],value:""}),e},JUt=.1,WUt=t=>{const e=[],{schPort:n,schComponent:o,transform:i,labelColor:r=Lg.schematic.pin_number,labelClassName:s="pin-number sch-pin-label"}=t,a={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const A=CG(n.side_of_component),c=n.distance_from_component_edge??.4;a.x+=A.x*(c+JUt),a.y+=A.y*(c+JUt);const l=hn(i,a),u=n.display_pin_label??o.port_labels?.[`${n.pin_number}`];if(!u)return[];const g=u.startsWith("N_"),h=g?u.slice(2):u,d=n.display_pin_label_text_parts,p=n.is_drawn_with_inversion_circle??!1,m=pE(i,g||p?"negated_pin_number":"pin_number",n.display_pin_label_font_size);return e.push({name:"text",type:"element",attributes:{class:s,x:l.x.toString(),y:l.y.toString(),style:`font-family: sans-serif;${g&&!d?.length?" text-decoration: overline;":""}`,fill:r,"text-anchor":n.side_of_component==="left"||n.side_of_component==="bottom"?"start":"end","dominant-baseline":"middle","font-size":`${m}px`,transform:n.side_of_component==="top"||n.side_of_component==="bottom"?`rotate(-90 ${l.x} ${l.y})`:""},children:d?.length?pJo(d):[{type:"text",value:h||"",name:"",attributes:{},children:[]}],value:""}),e},EJo=t=>{const e=[];return e.push(...yJo(t)),e.push(...xJo(t)),e.push(...WUt(t)),e},BJo=({component:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=hn(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),s=hn(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2}),a=s.x-r.x,A=s.y-r.y;i.push({name:"rect",type:"element",value:"",attributes:{class:"component chip sch-component-body",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),"stroke-width":`${i_(e)}px`,fill:o.schematic.component_body,stroke:o.schematic.component_outline},children:[]}),i.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),fill:"transparent"},children:[]});const c=Mr(n).schematic_text.list();for(const u of c)u.schematic_component_id===t.schematic_component_id&&i.push(TRe({elm:u,transform:e,colorMap:o}));const l=Mr(n).schematic_port.list({schematic_component_id:t.schematic_component_id});for(const u of l)i.push(...EJo({schPort:u,schComponent:t,transform:e,circuitJson:n}));return i};function jUt({isDashed:t,dashLength:e,dashGap:n,strokeWidth:o,transform:i}){if(!t)return;const r=Math.abs(i.a),s=o*r*3,a=e!==void 0?e*r:s,A=n!==void 0?n*r:s;return`${a} ${A}`}function $Ut({schLine:t,transform:e,colorMap:n}){const o=hn(e,{x:t.x1,y:t.y1}),i=hn(e,{x:t.x2,y:t.y2}),r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=jUt({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return[{name:"line",type:"element",attributes:{class:"sch-line",x1:o.x.toString(),y1:o.y.toString(),x2:i.x.toString(),y2:i.y.toString(),stroke:t.color,"stroke-width":s.toString(),...a&&{"stroke-dasharray":a},"data-schematic-line-id":t.schematic_line_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}function qUt({schRect:t,transform:e,colorMap:n}){const o=hn(e,t.center),i=Math.abs(e.a)*t.width,r=Math.abs(e.d)*t.height,s=t.stroke_width??.02,a=Math.abs(e.a)*s,A=o.x-i/2,c=o.y-r/2;return[{name:"rect",type:"element",attributes:{class:"sch-rect",x:A.toString(),y:c.toString(),width:i.toString(),height:r.toString(),fill:t.is_filled?t.fill_color??t.color:"none",stroke:t.color,"stroke-width":a.toString(),...t.is_dashed&&{"stroke-dasharray":(a*3).toString()},...t.rotation!==0&&{transform:`rotate(${t.rotation} ${o.x} ${o.y})`},"data-schematic-rect-id":t.schematic_rect_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}function XUt({schPath:t,transform:e,colorMap:n}){const o=t.stroke_color??n.schematic.component_outline,i=t.fill_color??"none",r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=jUt({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return!t.points||t.points.length<2?[]:[{name:"path",type:"element",attributes:{class:"sch-path",d:t.points.map(l=>hn(e,{x:l.x,y:l.y})).map((l,u)=>`${u===0?"M":"L"} ${l.x} ${l.y}`).join(" "),stroke:o,"stroke-width":s.toString(),fill:t.is_filled?i:"none","stroke-linecap":"round","stroke-linejoin":"round",...a&&{"stroke-dasharray":a},...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var bJo=({component:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=t.schematic_component_id;for(const s of n)!("schematic_component_id"in s)||s.schematic_component_id!==r||(s.type==="schematic_text"&&t.is_box_with_pins===!1?i.push(TRe({elm:s,transform:e,colorMap:o})):s.type==="schematic_line"?i.push(...$Ut({schLine:s,transform:e,colorMap:o})):s.type==="schematic_circle"?i.push(...KUt({schCircle:s,transform:e,colorMap:o})):s.type==="schematic_rect"?i.push(...qUt({schRect:s,transform:e,colorMap:o})):s.type==="schematic_arc"?i.push(...UUt({schArc:s,transform:e,colorMap:o})):s.type==="schematic_path"&&i.push(...XUt({schPath:s,transform:e,colorMap:o})));if(t.is_box_with_pins===!1){const s=n.filter(A=>A.type==="schematic_line"&&A.schematic_component_id===r),a=n.filter(A=>A.type==="schematic_port"&&A.schematic_component_id===r);for(const A of a){const c=s.find(p=>p.x1===A.center.x&&p.y1===A.center.y||p.x2===A.center.x&&p.y2===A.center.y);if(!c)continue;const l=c.x1===A.center.x&&c.y1===A.center.y?{x:c.x2,y:c.y2}:{x:c.x1,y:c.y1},u=l.x-A.center.x,g=l.y-A.center.y,h=Math.abs(u)>Math.abs(g)?u>0?"left":"right":g>0?"bottom":"top",d=Math.max(Math.abs(u),Math.abs(g));i.push(...WUt({schPort:{...A,side_of_component:h,distance_from_component_edge:d},schComponent:t,transform:e,labelClassName:"port-label sch-pin-label",labelColor:o.schematic.pin_name}))}}return i};function SJo(t){const{component:e}=t;let n=[];e.is_box_with_pins!==!1&&(e.symbol_name?n=CJo(t):n=BJo(t));const o=bJo(t),i=[...n,...o];return[{type:"element",name:"g",attributes:{class:"sch-component","data-circuit-json-type":"schematic_component","data-schematic-component-id":e.schematic_component_id,...e.schematic_sheet_id?{"data-schematic-sheet-id":e.schematic_sheet_id}:{}},children:i,value:""}]}function QJo({debugObject:t,transform:e}){if(t.shape==="rect"){let[n,o]=hn(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),[i,r]=hn(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]);[o,r]=[Math.min(o,r),Math.max(o,r)];const s=Math.abs(i-n),a=Math.abs(r-o),[A,c]=hn(e,[t.center.x,t.center.y]);return[{name:"rect",type:"element",value:"",attributes:{x:n.toString(),y:o.toString(),width:s.toString(),height:a.toString(),fill:"none",stroke:"red","stroke-width":(.02*Math.abs(e.a)).toString(),"stroke-dasharray":"5,5"},children:t.label?[{name:"text",type:"element",value:"",attributes:{x:A.toString(),y:(c-10).toString(),"text-anchor":"middle","font-size":(.2*Math.abs(e.a)).toString(),fill:"red"},children:[{type:"text",value:t.label,name:"",attributes:{},children:[]}]}]:[]}]}if(t.shape==="line"){const[n,o]=hn(e,[t.start.x,t.start.y]),[i,r]=hn(e,[t.end.x,t.end.y]),s=(n+i)/2,a=(o+r)/2;return[{name:"line",type:"element",value:"",attributes:{x1:n.toString(),y1:o.toString(),x2:i.toString(),y2:r.toString(),stroke:"red","stroke-width":(.02*Math.abs(e.a)).toString(),"stroke-dasharray":"5,5"},children:t.label?[{name:"text",type:"element",value:"",attributes:{x:s.toString(),y:(a-10).toString(),"text-anchor":"middle","font-size":(.2*Math.abs(e.a)).toString(),fill:"red"},children:[{type:"text",value:t.label,name:"",attributes:{},children:[]}]}]:[]}]}return[]}var ZUt=.2/MR,vJo=3/MR,ide=["1","2","3","4","5","6"],Pq=["A","B","C","D"];function wJo({schematicSheet:t,transform:e,colorMap:n}){const o=Sq(t),i=n.schematic.sheet,r=n.schematic.net_name,s=[eKt({id:`${t.schematic_sheet_id}_outer`,center:o.center,width:o.width,height:o.height,transform:e,color:i}),eKt({id:`${t.schematic_sheet_id}_inner`,center:o.center,width:o.innerMaxX-o.innerMinX,height:o.innerMaxY-o.innerMinY,transform:e,color:i})];for(let a=1;a<ide.length;a++){const A=o.innerMinX+(o.innerMaxX-o.innerMinX)*a/ide.length;s.push(rde({id:`${t.schematic_sheet_id}_top_column_${a}`,x1:A,y1:o.maxY,x2:A,y2:o.innerMaxY,transform:e,color:i}),rde({id:`${t.schematic_sheet_id}_bottom_column_${a}`,x1:A,y1:o.minY,x2:A,y2:o.innerMinY,transform:e,color:i}))}for(let a=1;a<Pq.length;a++){const A=o.innerMinY+(o.innerMaxY-o.innerMinY)*a/Pq.length;s.push(rde({id:`${t.schematic_sheet_id}_left_row_${a}`,x1:o.minX,y1:A,x2:o.innerMinX,y2:A,transform:e,color:i}),rde({id:`${t.schematic_sheet_id}_right_row_${a}`,x1:o.maxX,y1:A,x2:o.innerMaxX,y2:A,transform:e,color:i}))}return ide.forEach((a,A)=>{const c=o.innerMinX+(o.innerMaxX-o.innerMinX)*(A+.5)/ide.length;s.push(sde({text:a,x:c,y:(o.maxY+o.innerMaxY)/2,transform:e,color:r}),sde({text:a,x:c,y:(o.minY+o.innerMinY)/2,transform:e,color:r}))}),Pq.forEach((a,A)=>{const c=o.innerMinY+(o.innerMaxY-o.innerMinY)*(Pq.length-A-.5)/Pq.length;s.push(sde({text:a,x:(o.minX+o.innerMinX)/2,y:c,transform:e,color:r}),sde({text:a,x:(o.maxX+o.innerMaxX)/2,y:c,transform:e,color:r}))}),[{name:"g",type:"element",value:"",attributes:{class:"schematic-sheet","data-circuit-json-type":"schematic_sheet","data-schematic-sheet-id":t.schematic_sheet_id},children:s}]}function eKt({id:t,center:e,width:n,height:o,transform:i,color:r}){const s=hn(i,e),a=Math.abs(i.a)*n,A=Math.abs(i.d)*o;return{name:"rect",type:"element",value:"",attributes:{class:"sch-rect",x:(s.x-a/2).toString(),y:(s.y-A/2).toString(),width:a.toString(),height:A.toString(),fill:"none",stroke:r,"stroke-width":(Math.abs(i.a)*ZUt).toString(),"data-schematic-rect-id":t},children:[]}}function rde({id:t,x1:e,y1:n,x2:o,y2:i,transform:r,color:s}){const a=hn(r,{x:e,y:n}),A=hn(r,{x:o,y:i});return{name:"line",type:"element",value:"",attributes:{class:"sch-line",x1:a.x.toString(),y1:a.y.toString(),x2:A.x.toString(),y2:A.y.toString(),stroke:s,"stroke-width":(Math.abs(r.a)*ZUt).toString(),"data-schematic-line-id":t},children:[]}}function sde({text:t,x:e,y:n,transform:o,color:i}){const r=hn(o,{x:e,y:n});return{type:"element",name:"text",value:"",attributes:{class:"sch-text",x:r.x.toString(),y:r.y.toString(),fill:i,"text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif","font-size":`${pE(o,"reference_designator",vJo)}px`,transform:`rotate(0, ${r.x}, ${r.y})`},children:[{type:"text",value:t,name:"",attributes:{},children:[]}]}}var PJo=({schematicTable:t,transform:e,colorMap:n,circuitJson:o})=>{const{anchor_position:i,border_width:r=.05,anchor:s="center"}=t,{column_widths:a,row_heights:A}=kUt(t,o),c=a.reduce((E,B)=>E+B,0),l=A.reduce((E,B)=>E+B,0);let u=i.x,g=i.y;s.includes("center")?u-=c/2:s.includes("right")&&(u-=c),s.includes("center")?g+=l/2:s.includes("bottom")&&(g+=l);const h=[],d=r*Math.abs(e.a),p=i_(e),[m,_]=hn(e,[u,g]),[f,I]=hn(e,[u+c,g-l]);h.push({name:"rect",type:"element",attributes:{class:"sch-table-border",x:m.toString(),y:_.toString(),width:(f-m).toString(),height:(I-_).toString(),fill:"none",stroke:n.schematic.table,"stroke-width":d.toString()},children:[],value:""});const C=o.filter(E=>E.type==="schematic_table_cell"&&E.schematic_table_id===t.schematic_table_id);let y=u;for(let E=0;E<a.length-1;E++){y+=a[E];let B=g;for(let S=0;S<A.length;S++){const Q=B-A[S];if(!C.some(M=>M.start_column_index<=E&&M.end_column_index>E&&M.start_row_index<=S&&M.end_row_index>=S)){const M=hn(e,{x:y,y:B}),k=hn(e,{x:y,y:Q});h.push({name:"line",type:"element",attributes:{class:"sch-table-grid-line",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,"stroke-width":p.toString()},children:[],value:""})}B=Q}}let x=g;for(let E=0;E<A.length-1;E++){x-=A[E];let B=u;for(let S=0;S<a.length;S++){const Q=B+a[S];if(!C.some(M=>M.start_row_index<=E&&M.end_row_index>E&&M.start_column_index<=S&&M.end_column_index>=S)){const M=hn(e,{x:B,y:x}),k=hn(e,{x:Q,y:x});h.push({name:"line",type:"element",attributes:{class:"sch-table-grid-line",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,"stroke-width":p.toString()},children:[],value:""})}B=Q}}for(const E of C)if(E.text){const B=a.slice(E.start_column_index,E.end_column_index+1).reduce((te,j)=>te+j,0),S=A.slice(E.start_row_index,E.end_row_index+1).reduce((te,j)=>te+j,0),Q=u+a.slice(0,E.start_column_index).reduce((te,j)=>te+j,0),w=g-A.slice(0,E.start_row_index).reduce((te,j)=>te+j,0),{cell_padding:M=.2}=t,k=E.horizontal_align??"center",R=E.vertical_align??"middle";let F={x:Q+B/2,y:w-S/2};k==="left"?F.x=Q+M:k==="right"&&(F.x=Q+B-M),R==="top"?F.y=w-M:R==="bottom"&&(F.y=w-S+M);const O=hn(e,F),U=pE(e,"reference_designator",E.font_size),Y={left:"start",center:"middle",right:"end"},W={top:"hanging",middle:"middle",bottom:"ideographic"};h.push({name:"text",type:"element",attributes:{class:"sch-table-text",x:O.x.toString(),y:O.y.toString(),"font-size":`${U}px`,"text-anchor":Y[k],"dominant-baseline":W[R],fill:n.schematic.table,"font-family":"sans-serif"},children:[{type:"text",value:E.text,name:"",attributes:{},children:[]}],value:""})}return[{name:"g",type:"element",attributes:{class:"sch-table","data-schematic-table-id":t.schematic_table_id},children:h,value:""}]};function MJo({trace:t,transform:e,colorMap:n}){const o=t.edges;if(o.length===0)return[];const i=[],r=[];let s="";for(let a=0;a<o.length;a++){const A=o[a];if(A.is_crossing)continue;const[c,l]=hn(e,[A.from.x,A.from.y]),[u,g]=hn(e,[A.to.x,A.to.y]);a===0||o[a-1]?.is_crossing?s+=`M ${c} ${l} L ${u} ${g}`:s+=` L ${u} ${g}`}s&&(i.push({name:"path",type:"element",attributes:{d:s,class:"trace-invisible-hover-outline sch-trace-hitbox",stroke:n.schematic.wire,fill:"none","stroke-width":`${i_(e)*8}px`,"stroke-linecap":"round",opacity:"0","stroke-linejoin":"round"},value:"",children:[]}),i.push({name:"path",type:"element",attributes:{class:"sch-trace-path",d:s,stroke:n.schematic.wire,fill:"none","stroke-width":`${i_(e)}px`,"stroke-linecap":"round","stroke-linejoin":"round"},value:"",children:[]}));for(const a of o){if(!a.is_crossing)continue;const[A,c]=hn(e,[a.from.x,a.from.y]),[l,u]=hn(e,[a.to.x,a.to.y]),g=(A+l)/2,h=(c+u)/2,d=l-A,p=u-c,m=Math.sqrt(d*d+p*p),_=m*.7,f=-p/m*_,I=d/m*_,C=g+f,y=h-Math.abs(I);r.push({name:"path",type:"element",attributes:{class:"trace-crossing-outline sch-trace-crossing-outline",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.background,fill:"none","stroke-width":`${i_(e)*1.5}px`,"stroke-linecap":"butt"},value:"",children:[]}),r.push({name:"path",type:"element",attributes:{class:"sch-trace-crossing-path",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.wire,fill:"none","stroke-width":`${i_(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}if(t.junctions)for(const a of t.junctions){const[A,c]=hn(e,[a.x,a.y]);r.push({name:"circle",type:"element",attributes:{cx:A.toString(),cy:c.toString(),r:(Math.abs(e.a)*.03).toString(),class:"trace-junction sch-trace-junction",fill:n.schematic.junction},value:"",children:[]})}return[{name:"g",type:"element",value:"",attributes:{class:"trace sch-trace","data-layer":"base","data-circuit-json-type":"schematic_trace","data-schematic-trace-id":t.schematic_trace_id,...t.subcircuit_connectivity_map_key&&{"data-subcircuit-connectivity-map-key":t.subcircuit_connectivity_map_key}},children:i},{name:"g",type:"element",value:"",attributes:{class:"trace-overlays sch-trace-overlays","data-layer":"overlay","data-circuit-json-type":"schematic_trace","data-schematic-trace-id":t.schematic_trace_id,...t.subcircuit_connectivity_map_key&&{"data-subcircuit-connectivity-map-key":t.subcircuit_connectivity_map_key}},children:r}]}function DJo({probe:t,transform:e,colorMap:n,fallbackColor:o}){const[i,r]=hn(e,[t.position.x,t.position.y]),s=t.color??o??n.schematic.reference,a=Math.abs(e.a)*.6,A=Math.abs(e.a)*.28,c=t.label_alignment??"top_right";let l,u,g,h;switch(c){case"top_left":l=-135*Math.PI/180,u="end",g=-8,h=-8;break;case"top_center":l=-90*Math.PI/180,u="middle",g=0,h=-8;break;case"top_right":l=-45*Math.PI/180,u="start",g=8,h=-8;break;case"center_left":l=180*Math.PI/180,u="end",g=-8,h=0;break;case"center":l=-90*Math.PI/180,u="middle",g=0,h=-8;break;case"center_right":l=0*Math.PI/180,u="start",g=8,h=0;break;case"bottom_left":l=135*Math.PI/180,u="end",g=-8,h=8;break;case"bottom_center":l=90*Math.PI/180,u="middle",g=0,h=8;break;case"bottom_right":l=45*Math.PI/180,u="start",g=8,h=8;break;default:l=-50*Math.PI/180,u="start",g=8,h=0}const d=i+a*Math.cos(l),p=r+a*Math.sin(l),m=i,_=r,f=[`M ${d},${p}`,`L ${m},${_}`,`M ${m},${_}`,`L ${m-A*Math.cos((l*180/Math.PI+150)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+150)*Math.PI/180)}`,`L ${m-A*Math.cos((l*180/Math.PI+210)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+210)*Math.PI/180)}`,"Z"].join(" "),I=(d+g).toString(),C=(p+h).toString(),y=[];if(t.name&&t.voltage!==void 0)y.push({type:"element",name:"tspan",value:"",attributes:{x:I},children:[{type:"text",value:t.name,name:"",attributes:{},children:[]}]}),y.push({type:"element",name:"tspan",value:"",attributes:{x:I,dy:"1.2em"},children:[{type:"text",value:`${t.voltage}V`,name:"",attributes:{},children:[]}]});else{const x=[];t.name&&x.push(t.name),t.voltage!==void 0&&x.push(`${t.voltage}V`),y.push({type:"text",value:x.join(" "),name:"",attributes:{},children:[]})}return[{name:"path",type:"element",attributes:{class:"sch-voltage-probe",d:f,stroke:s,fill:s,"stroke-width":`${i_(e)}px`},value:"",children:[]},{type:"element",name:"text",value:"",attributes:{class:"sch-voltage-probe-label",x:I,y:C,fill:s,"text-anchor":u,"dominant-baseline":"middle","font-family":"sans-serif","font-size":`${pE(e,"reference_designator")}px`,"font-weight":"bold","data-schematic-voltage-probe-id":t.schematic_voltage_probe_id},children:y}]}var Mq=6,ade=12,lI=12,EG=6,tKt=14,Ade=11,nKt=280,NJo=140,oKt=t=>t.type==="schematic_component_overlap_warning"||t.type==="schematic_component_styling_warning"||t.type==="schematic_element_outside_sheet_warning"||t.type==="schematic_manual_edit_conflict_warning";function RJo({circuitJson:t,transform:e,svgWidth:n,svgHeight:o,colorMap:i}){const r=i.schematic.erc_warning,s=[];return t.filter(oKt).flatMap(a=>{const A=TJo(a,t,e);if(!A)return[];const c=Math.max(1,n-lI*2),l=YJo(a.message,Math.max(12,Math.floor((Math.min(nKt,c)-EG*2)/(Ade*.56)))),u=Math.max(...l.map(I=>I.length)),g=Math.min(nKt,c,Math.max(Math.min(NJo,c),u*Ade*.56+EG*2)),h=EG*2+l.length*tKt,d=HJo({targetBounds:A,calloutWidth:g,calloutHeight:h,svgWidth:n,svgHeight:o,occupiedCalloutBounds:s});s.push(d);const p=GJo(a),m=cde(A,Mq),_=OJo(d,m);return[{name:"g",type:"element",value:"",attributes:{class:"schematic-warning","data-type":a.type,"data-warning-id":p,role:"note","aria-label":a.message},children:[{name:"rect",type:"element",value:"",attributes:{x:m.minX.toString(),y:m.minY.toString(),width:(m.maxX-m.minX).toString(),height:(m.maxY-m.minY).toString(),rx:"6",fill:"none",stroke:r,"stroke-width":"1","stroke-dasharray":"4,3","data-warning-reference":"target"},children:[]},{name:"line",type:"element",value:"",attributes:{x1:_.from.x.toString(),y1:_.from.y.toString(),x2:_.to.x.toString(),y2:_.to.y.toString(),stroke:r,"stroke-width":"1","data-warning-reference":"leader"},children:[]},{name:"rect",type:"element",value:"",attributes:{x:d.minX.toString(),y:d.minY.toString(),width:g.toString(),height:h.toString(),fill:"rgba(255, 250, 235, 0.97)",stroke:r,"stroke-width":"1","data-warning-reference":"callout"},children:[]},{name:"text",type:"element",value:"",attributes:{x:(d.minX+EG).toString(),y:(d.minY+EG+Ade).toString(),fill:"#5c4300","font-family":"sans-serif","font-size":Ade.toString()},children:l.map((I,C)=>({name:"tspan",type:"element",value:"",attributes:{x:(d.minX+EG).toString(),dy:C===0?"0":tKt.toString()},children:[VJo(I)]}))}]}]})}function TJo(t,e,n){const i=kJo(t).map(r=>FJo(e,r)).filter(r=>!!r).map(r=>LJo(r,n)).filter(r=>!!r);return i.length===0?null:i.reduce(UJo)}function kJo(t){switch(t.type){case"schematic_component_overlap_warning":return t.schematic_component_ids;case"schematic_component_styling_warning":return[t.schematic_component_id,...t.schematic_port_ids??[]];case"schematic_manual_edit_conflict_warning":return[t.schematic_component_id];case"schematic_element_outside_sheet_warning":return[t.schematic_element_id]}}function FJo(t,e){return t.find(n=>{if(!n.type.startsWith("schematic_"))return!1;const o=`${n.type}_id`;return n[o]===e})}function LJo(t,e){if(t.type==="schematic_component"){const n=hn(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),o=hn(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2});return kRe([n,o])}if(t.type==="schematic_port"){const n=hn(e,t.center);return cde(kRe([n]),4)}if(t.type==="schematic_net_label"){const n=hn(e,t.anchor_position??t.center),o=Math.max(28,t.text.length*8);return{minX:n.x-o/2,minY:n.y-10,maxX:n.x+o/2,maxY:n.y+10}}if(t.type==="schematic_trace"){const n=t.edges.flatMap(o=>[hn(e,o.from),hn(e,o.to)]);return n.length===0?null:cde(kRe(n),4)}return null}function HJo({targetBounds:t,calloutWidth:e,calloutHeight:n,svgWidth:o,svgHeight:i,occupiedCalloutBounds:r}){const s=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2,A=t.minY-Mq-ade-n,c=t.maxY+Mq+ade,l=t.minX-Mq-ade-e,u=t.maxX+Mq+ade,g=[];A>=lI&&g.push(Dq({x:BG(s-e/2,lI,o-lI-e),y:A,width:e,height:n,side:"top"})),c+n<=i-lI&&g.push(Dq({x:BG(s-e/2,lI,o-lI-e),y:c,width:e,height:n,side:"bottom"})),u+e<=o-lI&&g.push(Dq({x:u,y:BG(a-n/2,lI,i-lI-n),width:e,height:n,side:"right"})),l>=lI&&g.push(Dq({x:l,y:BG(a-n/2,lI,i-lI-n),width:e,height:n,side:"left"}));const h=g.find(d=>r.every(p=>!KJo(cde(d,4),p)));return h||(g[0]?g[0]:Dq({x:BG(s-e/2,lI,o-lI-e),y:BG(A,lI,i-lI-n),width:e,height:n,side:"top"}))}function OJo(t,e){const n=(e.minX+e.maxX)/2,o=(e.minY+e.maxY)/2,i=(t.minX+t.maxX)/2,r=(t.minY+t.maxY)/2;switch(t.side){case"top":return{from:{x:i,y:t.maxY},to:{x:n,y:e.minY}};case"bottom":return{from:{x:i,y:t.minY},to:{x:n,y:e.maxY}};case"left":return{from:{x:t.maxX,y:r},to:{x:e.minX,y:o}};case"right":return{from:{x:t.minX,y:r},to:{x:e.maxX,y:o}}}}function GJo(t){switch(t.type){case"schematic_component_overlap_warning":return t.schematic_component_overlap_warning_id;case"schematic_component_styling_warning":return t.schematic_component_styling_warning_id;case"schematic_element_outside_sheet_warning":return t.schematic_element_outside_sheet_warning_id;case"schematic_manual_edit_conflict_warning":return t.schematic_manual_edit_conflict_warning_id}}function YJo(t,e){const n=t.trim().split(/\s+/),o=[];let i="";for(const r of n){const s=i?`${i} ${r}`:r;if(s.length<=e||i.length===0){i=s;continue}o.push(i),i=r}return i&&o.push(i),o.length>0?o:["Warning"]}function kRe(t){return{minX:Math.min(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxX:Math.max(...t.map(e=>e.x)),maxY:Math.max(...t.map(e=>e.y))}}function UJo(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}function cde(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function KJo(t,e){return!(t.maxX<=e.minX||t.minX>=e.maxX||t.maxY<=e.minY||t.minY>=e.maxY)}function Dq({x:t,y:e,width:n,height:o,side:i}){return{minX:t,minY:e,maxX:t+n,maxY:e+o,side:i}}function BG(t,e,n){return n<e?(e+n)/2:Math.min(Math.max(t,e),n)}function VJo(t){return{name:"",type:"text",value:t,attributes:{},children:[]}}function Nq(t,e){const n=t.filter(ge=>ge.type==="schematic_sheet"),o=zzo(n);let i=o;e?.schematicSheetId!==void 0?i=n.find(ge=>ge.schematic_sheet_id===e.schematicSheetId)??o:e?.schematicSheetIndex!==void 0&&(i=n.find(ge=>ge.sheet_index===e.schematicSheetIndex)??o);const r=i?t.filter(ge=>!ge.type.startsWith("schematic_")||oKt(ge)||"schematic_sheet_id"in ge&&ge.schematic_sheet_id===i.schematic_sheet_id):t,s=rJo(r),a=s.maxX-s.minX,A=s.maxY-s.minY,c=e?.width??1200,l=e?.height??600,u=e?.colorOverrides,g={...Lg,schematic:{...Lg.schematic,...u?.schematic??{}}},h=a/A,d=c/l;let p;if(h>d){const ge=c/h;p={x:0,y:(l-ge)/2}}else{const ge=l*h;p={x:(c-ge)/2,y:0}}const m=TUo([{x:s.minX,y:s.maxY},{x:s.maxX,y:s.maxY},{x:s.maxX,y:s.minY}],[{x:p.x,y:p.y},{x:c-p.x,y:p.y},{x:c-p.x,y:l-p.y}]),_=[];if(_.push({name:"rect",type:"element",attributes:{class:"boundary",x:"0",y:"0",width:c.toString(),height:l.toString()},children:[],value:""}),e?.grid){const ge=typeof e.grid=="object"?e.grid:{};_.push(Kzo({bounds:s,transform:m,...ge}))}const f=[],I=[],C=[],y=[],x=[],E=[],B=[],S=[],Q=[],w=[],M=[],k=[],R=[],F=[],O=[],U=[],Y=[],W=JJo({transform:m,svgWidth:c,svgHeight:l,schematicSheet:i}),te=Array.isArray(g.simulation_palette)?g.simulation_palette:Array.isArray(g.palette)?g.palette:[];let j=0;for(const ge of r)if(ge.type==="schematic_sheet")U.push(...wJo({schematicSheet:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_graphic")Y.push(sJo({schematicGraphic:ge,viewport:WJo({availableViewport:W,schematicGraphic:ge,transform:m})}));else if(ge.type==="schematic_debug_object")f.push(...QJo({debugObject:ge,transform:m}));else if(ge.type==="schematic_component")I.push(...SJo({component:ge,transform:m,circuitJson:r,colorMap:g})),Q.push(...OUt({component:ge,transform:m,circuitJson:r}));else if(ge.type==="schematic_box")B.push(..._Jo({schematicBox:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_trace")C.push(...MJo({trace:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_net_label")y.push(...lJo({schNetLabel:ge,realToScreenTransform:m,colorMap:g}));else if(ge.type==="schematic_text"&&!ge.schematic_component_id)x.push(TRe({elm:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_voltage_probe"){const _e=te.length>0?te[j%te.length]:void 0;j+=1,E.push(...DJo({probe:ge,transform:m,colorMap:g,fallbackColor:_e}))}else if(ge.type==="schematic_table")S.push(...PJo({schematicTable:ge,transform:m,colorMap:g,circuitJson:r}));else if(ge.type==="schematic_line"){if(ge.schematic_component_id)continue;M.push(...$Ut({schLine:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_circle"){if(ge.schematic_component_id)continue;k.push(...KUt({schCircle:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_rect"){if(ge.schematic_component_id)continue;R.push(...qUt({schRect:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_arc"){if(ge.schematic_component_id)continue;F.push(...UUt({schArc:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_path"){if(ge.schematic_component_id)continue;O.push(...XUt({schPath:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_port"){const _e=r.find(ue=>ue.type==="source_port"&&ue.source_port_id===ge.source_port_id);_e?.type==="source_port"&&_e.do_not_connect===!0&&w.push(dJo({schPort:ge,transform:m,colorMap:g})),e?.drawPorts&&w.push(...hJo({schPort:ge,transform:m,circuitJson:r,colorMap:g}))}const J=C.filter(ge=>ge.attributes?.["data-layer"]!=="overlay"),oe=C.filter(ge=>ge.attributes?.["data-layer"]==="overlay");_.push(...Y,...f,...U,...J,...oe,...M,...k,...R,...F,...O,...I,...Q,...w,...y,...x,...B,...E,...S),e?.labeledPoints&&_.push(Vzo({points:e.labeledPoints,transform:m})),e?.shouldDrawWarnings&&_.push(...RJo({circuitJson:r,transform:m,svgWidth:c,svgHeight:l,colorMap:g}));const ie=Gw(t),ne=Yw;if(e?.showErrorsInTextOverlay){const ge=IG(t);ge&&_.push(ge)}const le={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",class:["tscircuit-schematic",e?.className].filter(Boolean).join(" "),width:c.toString(),height:l.toString(),style:`background-color: ${g.schematic.background}`,"data-real-to-screen-transform":NUo(m),...ie&&{"data-software-used-string":ie},...e?.includeVersion&&{"data-circuit-to-svg-version":ne}},children:[{name:"style",type:"element",children:[{type:"text",value:`
              .boundary { fill: ${g.schematic.background}; }
              .schematic-boundary { fill: none; stroke: #fff; }
              .component { fill: none; stroke: ${g.schematic.component_outline}; }
              .chip { fill: ${g.schematic.component_body}; stroke: ${g.schematic.component_outline}; }
              .component-pin { fill: none; stroke: ${g.schematic.component_outline}; }
              .text { font-family: sans-serif; fill: ${g.schematic.wire}; }
              .pin-number { fill: ${g.schematic.pin_number}; }
              .port-label { fill: ${g.schematic.reference}; }
              .component-name { fill: ${g.schematic.reference}; }
              ${e?.css??""}
            `,name:"",attributes:{},children:[]}],value:"",attributes:{}},..._],value:""};return Ow(le)}var zJo=Nq;function JJo({transform:t,svgWidth:e,svgHeight:n,schematicSheet:o}){if(!o)return{x:0,y:0,width:e,height:n};const i=Sq(o),r=hn(t,{x:i.innerMinX,y:i.innerMaxY}),s=hn(t,{x:i.innerMaxX,y:i.innerMinY});return{x:Math.min(r.x,s.x),y:Math.min(r.y,s.y),width:Math.abs(s.x-r.x),height:Math.abs(s.y-r.y)}}function WJo({availableViewport:t,schematicGraphic:e,transform:n}){if(e.width===void 0&&e.height===void 0)return t;const o=e.width===void 0?t.width:iKt(e.width*Math.hypot(n.a,n.b),t.width),i=e.height===void 0?t.height:iKt(e.height*Math.hypot(n.c,n.d),t.height);return{x:t.x+(t.width-o)/2,y:t.y+(t.height-i)/2,width:o,height:i}}function iKt(t,e){return Number.isFinite(t)?Math.max(0,Math.min(t,e)):e}var jJo=1e3,$Jo=28,qJo=16;function XJo(t,e){const n=t.filter(u=>u.type==="schematic_sheet").slice().sort((u,g)=>(u.sheet_index??0)-(g.sheet_index??0));if(n.length<=1)return Nq(t,e);const o=e?.width??jJo,i=e?.sheetLabelHeight??$Jo,r=e?.sheetGap??qJo,s={...Lg,schematic:{...Lg.schematic,...e?.colorOverrides?.schematic??{}}},a=[];let A=0;n.forEach((u,g)=>{const h=Sq(u),d=e?.height??Math.round(o*h.height/h.width),p=Nq(t,{...e,schematicSheetId:u.schematic_sheet_id,schematicSheetIndex:void 0,width:o,height:d}),m=NRe($W(p)),_=A+i,f=u.display_name??u.name??`Sheet ${u.sheet_index??g+1}`,I=ZJo({transformStr:m.attributes?.["data-real-to-screen-transform"],panelTop:_,labelHeight:i,schematicSheet:u});a.push({name:"text",type:"element",value:"",attributes:{class:"stacked-sheet-label",x:lm(I.x),y:lm(I.y),"font-family":"sans-serif","font-size":`${lm(i*.55)}px`,fill:s.schematic.reference,"data-schematic-sheet-id":u.schematic_sheet_id},children:[{name:"",type:"text",value:f,attributes:{},children:[]}]},Qq(m,0,_,o,d)),A=_+d+r});const c=Math.max(0,A-r),l={name:"svg",type:"element",value:"",attributes:{xmlns:"http://www.w3.org/2000/svg",class:"tscircuit-stacked-schematic",width:lm(o),height:lm(c),viewBox:`0 0 ${lm(o)} ${lm(c)}`,style:`background-color: ${s.schematic.background}`},children:[{name:"rect",type:"element",value:"",attributes:{class:"boundary",x:"0",y:"0",width:lm(o),height:lm(c),fill:s.schematic.background},children:[]},...a]};return Ow(l)}function ZJo({transformStr:t,panelTop:e,labelHeight:n,schematicSheet:o}){const i=e-n*.28;if(!t)return{x:4,y:i};const r=Sq(o),s=hn(wUo(t),{x:r.minX,y:r.maxY});return{x:Math.max(2,s.x),y:i}}var rKt=({simulationResult:t,fallbackName:e})=>{const n=t.name??e,o=t.simulation_parameter_sweep_coordinate;return o?`${n} (${o.parameter_value}${o.parameter_unit})`:n},eWo=t=>{const e=t[0]??0,n=t[1];return{timestamps_ms:t,start_time_ms:e,end_time_ms:t.at(-1)??0,time_per_step:n===void 0?1:Math.abs(n-e)}},tWo=t=>t.type==="simulation_transient_voltage_graph"?t.simulation_transient_voltage_graph_id:t.simulation_transient_current_graph_id,sKt=t=>{switch(t.type){case"simulation_transient_voltage_graph":return t.simulation_transient_voltage_graph_id;case"simulation_transient_current_graph":return t.simulation_transient_current_graph_id;case"simulation_dc_operating_point_voltage":return t.simulation_dc_operating_point_voltage_id;case"simulation_dc_operating_point_current":return t.simulation_dc_operating_point_current_id;case"simulation_dc_sweep_voltage_graph":return t.simulation_dc_sweep_voltage_graph_id;case"simulation_dc_sweep_current_graph":return t.simulation_dc_sweep_current_graph_id;case"simulation_ac_sweep_voltage_graph":return t.simulation_ac_sweep_voltage_graph_id;case"simulation_ac_sweep_current_graph":return t.simulation_ac_sweep_current_graph_id}},nWo=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=>{switch(t.type){case"simulation_dc_operating_point_voltage":return{horizontalCoordinates:[0],measuredLevels:[t.voltage],isCurrent:!1};case"simulation_dc_operating_point_current":return{horizontalCoordinates:[0],measuredLevels:[t.current],isCurrent:!0};case"simulation_dc_sweep_voltage_graph":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.voltage_levels,isCurrent:!1};case"simulation_dc_sweep_current_graph":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.current_levels,isCurrent:!0};case"simulation_ac_sweep_voltage_graph":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_voltages.map(o=>e==="phase"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!1};case"simulation_ac_sweep_current_graph":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_currents.map(o=>e==="phase"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!0}}},oWo=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=>{if(t.type==="simulation_transient_voltage_graph"||t.type==="simulation_transient_current_graph")return t.simulation_parameter_sweep_coordinate?{...t,name:rKt({simulationResult:t,fallbackName:t.name??tWo(t)})}:t;const o=sKt(t),{horizontalCoordinates:i,measuredLevels:r,isCurrent:s}=nWo({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n}),a={simulation_experiment_id:t.simulation_experiment_id,simulation_parameter_sweep_coordinate:t.simulation_parameter_sweep_coordinate,name:rKt({simulationResult:t,fallbackName:o}),color:t.color,...eWo(i)};return s?{type:"simulation_transient_current_graph",simulation_transient_current_graph_id:o,current_levels:r,...a}:{type:"simulation_transient_voltage_graph",simulation_transient_voltage_graph_id:o,voltage_levels:r,...a}},iWo=({simulationResultType:t,experiment:e})=>t?.startsWith("simulation_ac_sweep_")?"Frequency (Hz)":t?.startsWith("simulation_dc_sweep_")?e?.dc_sweep_unit?`DC Sweep (${e.dc_sweep_unit})`:"DC Sweep":t?.startsWith("simulation_dc_operating_point_")?"Operating Point":"Time (ms)",rWo=({results:t,acSweepView:e,experiment:n})=>{const o=t[0]?.type,i=o?.startsWith("simulation_ac_sweep_")??!1,r=i&&n?.ac_sweep_type!=="linear";return{graphs:t.map(a=>oWo({simulationResult:a,acSweepView:e,usesLogarithmicXValues:r})),xAxisTitle:iWo({simulationResultType:o,experiment:n}),yAxisTitle:i&&e==="phase"?"Phase (deg)":void 0,usesLogarithmicXValues:r}};function Rq(t){return t?.valuePerDiv!==void 0&&Number.isFinite(t.valuePerDiv)&&Math.abs(t.valuePerDiv)>Number.EPSILON}var sWo=1200,aWo=600,um={top:64,right:100,bottom:80,left:100},FRe=24,LRe=56,AWo=56,cWo=8,aKt="#1f77b4";function Hx(t){return t.type==="simulation_transient_current_graph"}function HRe(t){return Hx(t)?t.simulation_transient_current_graph_id:t.simulation_transient_voltage_graph_id}function AKt(t){return Hx(t)?"data-simulation-transient-current-graph-id":"data-simulation-transient-voltage-graph-id"}function cKt(t){return Hx(t)?t.current_levels:t.voltage_levels}function lWo(t){const e=t.some(o=>Hx(o.graph)),n=t.some(o=>!Hx(o.graph));return e&&!n?"Current (A)":n&&!e?"Voltage (V)":"Value"}function uWo(t){return`simulation-graph-${t.replace(/[^a-zA-Z0-9_-]+/g,"-")}`}function ji(t){if(!Number.isFinite(t))return"0";const e=Number.parseFloat(t.toFixed(6));return Number.isInteger(e),e.toString()}function ac(t,e,n=[]){return{name:t,type:"element",value:"",attributes:e,children:n}}function LB(t){return{name:"",type:"text",value:t,attributes:{},children:[]}}function ORe(t,e){if(!Number.isFinite(t))return`0 ${e}`;if(t===0)return`0 ${e}`;const n=Math.abs(t),o=[{threshold:1e6,factor:1e6,prefix:"M"},{threshold:1e3,factor:1e3,prefix:"k"},{threshold:1,factor:1,prefix:""},{threshold:.001,factor:.001,prefix:"m"},{threshold:1e-6,factor:1e-6,prefix:"µ"},{threshold:1e-9,factor:1e-9,prefix:"n"}],i=o.find(s=>n>=s.threshold)??o[o.length-1],r=t/i.factor;return`${lKt(r)} ${i.prefix}${e}`}function gWo(t){return`${lKt(t)} div`}function lKt(t){if(!Number.isFinite(t))return"0";const e=Math.abs(t),n=e>=100?0:e>=10?1:e>=1?2:3;return Number.parseFloat(t.toFixed(n)).toString()}function uKt(t,e){const n=e.tickLabelOverrides?.get(t);if(n!==void 0)return n;const{ticks:o}=e;if(o.length<=1)return ji(t);const i=o[o.length-1]-o[0];if(!Number.isFinite(i)||i===0)return ji(t);const r=dWo(i),s=10**r;return(Math.round(t*s)/s).toFixed(r).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function dWo(t){return t>=100?0:t>=10?1:t>=1?2:3}function hWo({graphs:t,valueAxis:e,scaleY:n,plotLeft:o,plotWidth:i,plotHeight:r}){const s=um.top,a=um.top+r,A=o,c=o+i,l=[],u=t.filter(g=>Rq(g.scopeTraceDisplay));for(const[g,h]of u.entries()){const d=g%2===0?"left":"right",p=Math.floor(g/2),m=d==="left"?A-10-p*LRe:c+10+p*LRe,_=d==="left"?m-6:m+6,f=d==="left"?"end":"start",I=d==="left"?m+6:m-6,C=h.scopeTraceDisplay;if(Rq(C)){l.push(ac("line",{class:"axis axis-y axis-y-scope",x1:ji(m),y1:ji(s),x2:ji(m),y2:ji(a),style:`stroke: ${h.color};`}),ac("text",{class:"axis-title axis-title-y axis-title-y-scope",x:ji(m),y:ji(s-12),"text-anchor":"middle",style:`fill: ${h.color}; font-size: 10px;`},[LB(h.label)]));for(const y of e.ticks){const x=n(y),E=(C.center??0)+(y-(C.offsetDivs??0))*C.valuePerDiv;l.push(ac("line",{class:"axis-tick axis-tick-y axis-tick-y-scope",x1:ji(m),y1:ji(x),x2:ji(I),y2:ji(x),style:`stroke: ${h.color};`}),ac("text",{class:"axis-label axis-label-y axis-label-y-scope",x:ji(_),y:ji(x),"text-anchor":f,"dominant-baseline":"middle",style:`fill: ${h.color}; font-size: 10px;`},[LB(ORe(E,Hx(h.graph)?"A":"V"))]))}}}return l}function pWo({timeAxis:t,valueAxis:e,graphs:n,scaleX:o,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a,yAxisTitle:A,xAxisTitle:c,usesScopeTraceDisplay:l}){const u=um.top+a,g=r,h=r+s,d=[ac("line",{class:"axis axis-x",x1:ji(g),y1:ji(u),x2:ji(h),y2:ji(u)}),...l?[]:[ac("line",{class:"axis axis-y",x1:ji(g),y1:ji(um.top),x2:ji(g),y2:ji(u)})]];for(const p of t.ticks){const m=ji(o(p));d.push(ac("line",{class:"axis-tick axis-tick-x",x1:m,y1:ji(u),x2:m,y2:ji(u+6)}),ac("text",{class:"axis-label axis-label-x",x:m,y:ji(u+22),"text-anchor":"middle"},[LB(uKt(p,t))]))}if(l)d.push(...hWo({graphs:n,valueAxis:e,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a}));else{for(const p of e.ticks){const m=ji(i(p));d.push(ac("line",{class:"axis-tick axis-tick-y",x1:ji(g-6),y1:m,x2:ji(g),y2:m}),ac("text",{class:"axis-label axis-label-y",x:ji(g-10),y:m,"text-anchor":"end","dominant-baseline":"middle"},[LB(uKt(p,e))]))}d.push(ac("text",{class:"axis-title axis-title-y",x:ji(g-64),y:ji(um.top+a/2),transform:`rotate(-90 ${ji(g-64)} ${ji(um.top+a/2)})`,"text-anchor":"middle"},[LB(A)]))}return d.push(ac("text",{class:"axis-title axis-title-x",x:ji(g+s/2),y:ji(u+48),"text-anchor":"middle"},[LB(c)])),ac("g",{class:"axes"},d)}function lde(t,e=!1){if(t.length===0)return{domainMin:0,domainMax:1,ticks:[0,1]};const n=Math.min(...t),o=Math.max(...t);if(n===o){const A=n===0?1:Math.abs(n)*.1||1;return{domainMin:n-A,domainMax:n+A,ticks:[n-A,n,n+A]}}const i=gKt(n,o),r=i.length>0?[...i]:[n,o];let s=r[0],a=r[r.length-1];if(e&&r.length>1){const A=Math.abs(r[1]-r[0]),c=.1;n<s+A*c&&(s-=A,r.unshift(s)),o>a-A*c&&(a+=A,r.push(a))}return{domainMin:s,domainMax:a,ticks:r}}function mWo({values:t,graphs:e,experiment:n}){const o=ude(n?.start_time_ms),i=ude(n?.end_time_ms),r=e.map(p=>ude(p.start_time_ms)).filter(p=>p!==void 0),s=e.map(p=>ude(p.end_time_ms)).filter(p=>p!==void 0),a=o??(r.length>0?Math.min(...r):void 0),A=i??(s.length>0?Math.max(...s):void 0);if(a===void 0||A===void 0||a===A)return lde(t);const c=Math.min(a,A),l=Math.max(a,A),g=(l-c)*.12,h=gKt(c,l).filter(p=>p>c+g&&p<l-g),d=_Wo([c,...h,l]);return{domainMin:c,domainMax:l,ticks:d,tickLabelOverrides:new Map([[c,ji(c)],[l,ji(l)]])}}function ude(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function _Wo(t){const e=[...t].sort((o,i)=>o-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)>1e-12)&&n.push(o)}return n}function gKt(t,e,n=6){const o=e-t;if(!Number.isFinite(o)||o<=Number.EPSILON)return[t,e];const i=fWo(o/Math.max(1,n-1)),r=Math.floor(t/i)*i,s=Math.ceil(e/i)*i,a=[];for(let A=r;A<=s+i/2;A+=i)a.push(Number.parseFloat(A.toPrecision(12)));return a}function fWo(t){if(!Number.isFinite(t)||t<=0)return 1;const e=Math.floor(Math.log10(t)),n=t/10**e;let o;return n<=1?o=1:n<=2?o=2:n<=5?o=5:o=10,o*10**e}function IWo(t,e){return ac("rect",{class:"background",x:"0",y:"0",width:ji(t),height:ji(e)})}function CWo(t,e,n,o){return ac("defs",{},[ac("clipPath",{id:t},[ac("rect",{x:ji(e),y:ji(um.top),width:ji(n),height:ji(o)})])])}function yWo({timeAxis:t,valueAxis:e,scaleX:n,scaleY:o,plotLeft:i,plotWidth:r,plotHeight:s}){const a=um.top,A=um.top+s,c=i,l=i+r,u=[];for(const g of t.ticks){const h=ji(n(g));u.push(ac("line",{class:"grid-line grid-line-x",x1:h,y1:ji(a),x2:h,y2:ji(A)}))}for(const g of e.ticks){const h=ji(o(g));u.push(ac("line",{class:"grid-line grid-line-y",x1:ji(c),y1:h,x2:ji(l),y2:h}))}return ac("g",{class:"grid"},u)}function dKt(t,e,n,o){if(!Number.isFinite(t)||!Number.isFinite(e)){const r=(n+o)/2;return()=>r}const i=e-t;if(Math.abs(i)<Number.EPSILON){const r=(n+o)/2;return()=>r}return r=>n+(r-t)/i*(o-n)}function xWo(t,e,n){return ac("rect",{class:"plot-background",x:ji(t),y:ji(um.top),width:ji(e),height:ji(n)})}function EWo(){const t=`
:root { color-scheme: light; }
svg { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; }
.background { fill: ${Lg.schematic.background}; }
.plot-background { fill: #ffffff; }
.grid-line { stroke: rgba(0, 0, 0, 0.08); stroke-width: 1; }
.axis { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1.5; }
.axis-tick { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1; }
.axis-label { fill: rgba(0, 0, 0, 0.75); font-size: 12px; }
.axis-title { fill: rgba(0, 0, 0, 0.9); font-size: 14px; font-weight: 600; }
.legend-label { fill: rgba(0, 0, 0, 0.75); font-size: 11px; }
.legend-line { stroke-width: 3; }
.scope-channel-card { fill: #ffffff; stroke: rgba(0, 0, 0, 0.22); stroke-width: 1; }
.scope-channel-header-text { fill: #ffffff; font-size: 14px; font-weight: 700; }
.scope-channel-detail { fill: rgba(0, 0, 0, 0.42); font-size: 14px; }
.simulation-line { fill: none; stroke-width: 2.5; }
.simulation-point { stroke-width: 0; }
.chart-title { fill: rgba(0, 0, 0, 0.85); font-size: 18px; font-weight: 600; }
`;return ac("style",{},[LB(t)])}function hKt(t,e){const n=t[e];if(typeof n=="string")return n}function BWo(t,e,n,o){const r=[4,8],s=r.map(g=>ji(g)).join(" "),A=r.reduce((g,h)=>g+h,0)/3,c=[];t.forEach((g,h)=>{if(g.points.length===0)return;const d=[];g.points.forEach((I,C)=>{const y=ji(n(I.timeMs)),x=ji(o(I.displayValue));d.push(`${C===0?"M":"L"} ${y} ${x}`)});const p={class:"simulation-line",d:d.join(" "),stroke:g.color,"clip-path":`url(#${e})`,[AKt(g.graph)]:HRe(g.graph)};g.graph.source_component_id&&(p["data-source-component-id"]=g.graph.source_component_id);const m=hKt(g.graph,"source_probe_id");m&&(p["data-source-probe-id"]=m);const _=hKt(g.graph,"source_probe_name");_&&(p["data-source-probe-name"]=_),g.graph.subcircuit_connectivity_map_key&&(p["data-subcircuit-connectivity-map-key"]=g.graph.subcircuit_connectivity_map_key);const f=g.points.map(I=>{const C=ji(n(I.timeMs)),y=ji(o(I.displayValue));return ac("circle",{class:"simulation-point",cx:C,cy:y,r:"2.5",fill:g.color,"clip-path":`url(#${e})`})});c.push({entry:g,graphIndex:h,pathAttributes:p,pointElements:f})});const l=[];for(let g=0;g<3;g++)for(const h of c){const d=(h.graphIndex+g)%3,p=ji(d*A);l.push(ac("path",{...h.pathAttributes,"stroke-dasharray":s,"stroke-dashoffset":p}))}const u=c.flatMap(g=>g.pointElements);return ac("g",{class:"data-series"},[...l,...u])}function bWo(t,e){return t?.name?ac("text",{class:"chart-title",x:ji(e/2),y:ji(um.top-40),"text-anchor":"middle"},[LB(t.name)]):null}var pKt=16;function SWo(t,e,n,o){const i=o.map((r,s)=>ac("tspan",{x:"20",dy:s===0?"0":String(pKt)},[LB(r)]));return ac("g",{class:"legend-item",transform:`translate(${ji(e)} ${ji(n)})`},[ac("line",{class:"legend-line",x1:"0",y1:"0",x2:"16",y2:"0",stroke:t.color}),ac("text",{class:"legend-label",x:"20",y:"0","dominant-baseline":"middle"},i)])}var QWo=15;function vWo(t){const e=t.split("_");if(e.length<=1)return[t];const n=[];let o=e[0]??"";for(let i=1;i<e.length;i++){const r=e[i]??"",s=`${o}_${r}`;s.length>QWo?(n.push(o),o=r):o=s}return o&&n.push(o),n}var wWo=24;function PWo(t,e){let n=um.top;const o=t.map(i=>{const r=e-um.right+10,s=vWo(i.label),a=SWo(i,r,n,s),A=s.length*pKt;return n+=Math.max(A,wWo),a});return ac("g",{class:"legend"},o)}var DR=118,gde=94,bG=18;function mKt(t,e){const n=Math.floor((e+bG)/(DR+bG)),o=Math.max(1,Math.min(n,t)),i=Math.max(1,Math.ceil(t/o)),r=o*DR+(o-1)*bG,s=i*gde+(i-1)*bG;return{columns:o,rows:i,x:Math.max(0,(e-r)/2),height:s}}var dde=20,GRe=8,MWo=14;function DWo(t,e,n){const o=mKt(t.length,e),i=[];for(const[r,s]of t.entries()){const a=r%o.columns,A=Math.floor(r/o.columns);i.push(NWo(s,r,o.x+a*(DR+bG),n+FRe+A*(gde+bG)))}return ac("g",{class:"scope-legend"},i)}function NWo(t,e,n,o){const i=t.scopeTraceDisplay,r=Hx(t.graph)?"A":"V",s=i&&Rq(i)?ORe(i.valuePerDiv,r):`1 ${r}`,a=ORe(i?.center??0,r),A=gWo(i?.offsetDivs??0),c=`Ch${e+1}`,u=[t.label===c?void 0:t.label,`${s}/div`,A,a].filter(h=>!!h),g=u.length>1?(gde-dde-GRe*2-MWo)/(u.length-1):0;return ac("g",{class:"scope-channel",transform:`translate(${ji(n)} ${ji(o)})`,[AKt(t.graph)]:HRe(t.graph)},[ac("rect",{class:"scope-channel-card",x:"0",y:"0",width:ji(DR),height:ji(gde),rx:"6",ry:"6"}),ac("rect",{x:"0",y:"0",width:ji(DR),height:ji(dde),rx:"6",ry:"6",fill:t.color}),ac("rect",{x:"0",y:ji(dde-6),width:ji(DR),height:"6",fill:t.color}),ac("text",{class:"scope-channel-header-text",x:ji(DR/2),y:"14","text-anchor":"middle"},[LB(c)]),...u.map((h,d)=>ac("text",{class:"scope-channel-detail",x:ji(GRe),y:ji(dde+GRe+d*g),"dominant-baseline":"hanging"},[LB(h)]))])}function RWo(t){const e=Math.ceil(t/2),n=Math.floor(t/2);return{left:_Kt(e),right:_Kt(n)}}function _Kt(t){if(t<=1)return 0;const e=10+(t-1)*LRe+6+AWo+cWo;return Math.max(0,e-um.left)}function hde(t){return t.type==="simulation_transient_voltage_graph"||t.type==="simulation_transient_current_graph"||t.type==="simulation_dc_operating_point_voltage"||t.type==="simulation_dc_operating_point_current"||t.type==="simulation_dc_sweep_voltage_graph"||t.type==="simulation_dc_sweep_current_graph"||t.type==="simulation_ac_sweep_voltage_graph"||t.type==="simulation_ac_sweep_current_graph"}function TWo(t){return t?.type==="simulation_transient_current_graph"}function kWo(t){return t?.type==="simulation_transient_voltage_graph"}function YRe(t){return t?.type==="simulation_experiment"}function fKt(t){return t?.type==="simulation_voltage_probe"}function IKt(t){return t?.type==="simulation_current_probe"}function CKt(t){return t?.type==="simulation_oscilloscope_trace"}function FWo(t,e){const n=HWo(t),o=cKt(t),i=Math.min(n.length,o.length),r=[],s=LWo(e);for(let a=0;a<i;a++){const A=Number(n[a]??Number.NaN),c=Number(o[a]??Number.NaN);!Number.isFinite(A)||!Number.isFinite(c)||r.push({timeMs:A,rawValue:c,displayValue:s(c)})}return r}function LWo(t){if(!Rq(t))return i=>i;const e=t.center??0,n=t.offsetDivs??0,o=t.valuePerDiv;return i=>n+(i-e)/o}function HWo(t){const e=cKt(t);if(Array.isArray(t.timestamps_ms)&&t.timestamps_ms.length===e.length)return t.timestamps_ms.map(r=>Number(r));const n=e.length;if(n===0)return[];const o=[];for(let r=0;r<n;r++)o.push(t.start_time_ms+t.time_per_step*r);const i=o.length>0?o[o.length-1]:void 0;return i!==void 0&&Number.isFinite(t.end_time_ms)&&Number.isFinite(i)&&Math.abs(i-t.end_time_ms)>t.time_per_step/2&&o.push(t.end_time_ms),o}function pde(t,e){const n=t[e];if(typeof n=="string")return n}function OWo(t,e,n,o){const i=Hx(t)?"I":"V";if(n?.displayName)return n.displayName;if(t.simulation_parameter_sweep_coordinate&&t.name)return t.name;if(e?.name)return`${i}(${e.name})`;const r=pde(t,"source_probe_name");if(r)return`${i}(${r})`;if(t.source_component_id){const s=o.get(t.source_component_id);if(s)return`${i}(${s})`}return t.name?t.name:t.source_component_id?`Probe ${t.source_component_id}`:HRe(t)}function GWo(t,e,n,o,i,r){if(Hx(t)){const A=o.get(t.simulation_transient_current_graph_id);if(A)return A;const c=pde(t,"source_probe_id")??(e?.type==="simulation_current_probe"?e.simulation_current_probe_id:void 0);return c?r.get(c):void 0}const s=n.get(t.simulation_transient_voltage_graph_id);if(s)return s;const a=pde(t,"source_probe_id")??(e?.type==="simulation_voltage_probe"?e.simulation_voltage_probe_id:void 0);return a?i.get(a):void 0}function YWo(t,e,n,o,i){const r=pde(t,"source_probe_id");if(r){const s=Hx(t)?n.get(r):e.get(r);if(s)return s}if(t.source_component_id)return Hx(t)?i.get(t.source_component_id):o.get(t.source_component_id)}function UWo(t,e){if(e)return{displayName:e.display_name,color:e.color,center:e.display_center_value,offsetDivs:e.display_center_offset_divs,valuePerDiv:Hx(t)?e.amps_per_div:e.volts_per_div}}function KWo(t,e){const n=Array.isArray(Lg.simulation_palette)?Lg.simulation_palette:Array.isArray(Lg.palette)?Lg.palette:[],o=e.filter(fKt),i=e.filter(IKt),r=e.filter(CKt),s=new Map,a=new Map,A=new Map,c=new Map,l=new Map,u=new Map,g=new Map,h=new Map,d=new Map,p=new Map,m=new Map,_=new Map;for(const f of r)f.simulation_transient_voltage_graph_id&&d.set(f.simulation_transient_voltage_graph_id,f),f.simulation_transient_current_graph_id&&p.set(f.simulation_transient_current_graph_id,f),f.simulation_voltage_probe_id&&m.set(f.simulation_voltage_probe_id,f),f.simulation_current_probe_id&&_.set(f.simulation_current_probe_id,f);for(const f of o)l.set(f.simulation_voltage_probe_id,f),f.name&&f.source_component_id&&s.set(f.source_component_id,f.name),f.color&&f.source_component_id&&a.set(f.source_component_id,f.color),f.source_component_id&&g.set(f.source_component_id,f);for(const f of i)u.set(f.simulation_current_probe_id,f),f.name&&f.source_component_id&&A.set(f.source_component_id,f.name),f.color&&f.source_component_id&&c.set(f.source_component_id,f.color),f.source_component_id&&h.set(f.source_component_id,f);return t.map((f,I)=>{const C=YWo(f,l,u,g,h),y=GWo(f,C,d,p,m,_),x=UWo(f,y),E=FWo(f,x),B=VWo(n,I),S=zWo(f,C,Hx(f)?c:a),Q=f.color??x?.color??S??B,w=OWo(f,C,x,Hx(f)?A:s);return{graph:f,points:E,color:Q,label:w,scopeTraceDisplay:x,usesScopeTraceDisplay:Rq(x)}}).filter(f=>f.points.length>0)}function VWo(t,e){return t.length===0?aKt:t[e%t.length]??aKt}function zWo(t,e,n){if(e?.color)return e.color;if(t.source_component_id)return n.get(t.source_component_id)}function yKt({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r="magnitude",width:s=sWo,height:a=aWo,includeVersion:A}){const c=o?new Set(o):null,l=n?new Set(n):null,u=!!(c||l),g=i?new Set(i):null,h=t.find(J=>YRe(J)&&J.simulation_experiment_id===e),d=t.filter(J=>hde(J)&&J.simulation_experiment_id===e&&(!g||g.has(sKt(J)))&&(!u||J.type==="simulation_transient_voltage_graph"&&(c?.has(J.simulation_transient_voltage_graph_id)??!1)||J.type==="simulation_transient_current_graph"&&(l?.has(J.simulation_transient_current_graph_id)??!1))),p=rWo({results:d,acSweepView:r,experiment:h}),m=p.graphs;if(m.length===0)throw new Error(`No simulation analysis results found for simulation_experiment_id "${e}"`);const _=KWo(m,t),f=_.flatMap(J=>J.points);if(f.length===0)throw new Error(`Simulation results for simulation_experiment_id "${e}" do not contain any datapoints`);const I=f.map(J=>J.timeMs);let C;p.usesLogarithmicXValues?C=JWo(I):p.xAxisTitle==="Time (ms)"?C=mWo({values:I,graphs:m,experiment:h}):C=lde(I);const y=lde(f.map(J=>J.displayValue),!0),x=_.some(J=>J.usesScopeTraceDisplay),E=x?RWo(_.length):{left:0,right:0},B=s+E.left+E.right,S=x?mKt(_.length,B):null,Q=S?a+FRe+S.height+FRe:a,w=Math.max(1,s-um.left-um.right),M=Math.max(1,a-um.top-um.bottom),k=um.left+E.left,R=dKt(C.domainMin,C.domainMax,k,k+w),F=dKt(y.domainMin,y.domainMax,um.top+M,um.top),O=uWo(e),U=Gw(t),Y=Yw,W=bWo(h,B),te=[EWo(),IWo(B,Q),CWo(O,k,w,M),xWo(k,w,M),yWo({timeAxis:C,valueAxis:y,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M}),BWo(_,O,R,F),pWo({timeAxis:C,valueAxis:y,graphs:_,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M,yAxisTitle:p.yAxisTitle??lWo(_),xAxisTitle:p.xAxisTitle,usesScopeTraceDisplay:x}),x?DWo(_,B,a):PWo(_,B),...W?[W]:[]],j=ac("svg",{xmlns:"http://www.w3.org/2000/svg",width:B.toString(),height:Q.toString(),style:`background-color: ${Lg.schematic.background}`,viewBox:`0 0 ${ji(B)} ${ji(Q)}`,"data-simulation-experiment-id":e,...h?.name&&{"data-simulation-experiment-name":h.name},...U&&{"data-software-used-string":U},...A&&{"data-circuit-to-svg-version":Y}},te);return Ow(j)}var JWo=t=>{const e=lde(t);return{...e,tickLabelOverrides:new Map(e.ticks.map(n=>[n,ji(10**n)]))}},WWo=1200,jWo=1200,xKt=.55;function $Wo({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s=WWo,height:a=jWo,schematicHeightRatio:A=xKt,schematicOptions:c,includeVersion:l,graphAboveSchematic:u=!1,showErrorsInTextOverlay:g}){const h=t.filter(F=>!YRe(F)&&!hde(F)),d=XWo(A),p=Math.max(1,a*d),m=Math.max(1,a-p),_=p+m,f=_===0?1:a/_,I=p*f,C=m*f,y=Nq(h,{...c,width:s,height:I,includeVersion:!1,showErrorsInTextOverlay:g}),x=yKt({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s,height:C,includeVersion:!1}),E=NRe($W(y)),B=NRe($W(x)),S=qWo(B)??{width:s,height:C},Q=S.width>0?s*(S.height/S.width):C,w=I+Q,M=[];u?(M.push(Qq(B,0,0,s,Q)),M.push(Qq(E,0,Q,s,I))):(M.push(Qq(E,0,0,s,I)),M.push(Qq(B,0,I,s,Q)));const k=Gw(h),R={name:"svg",type:"element",value:"",attributes:{xmlns:"http://www.w3.org/2000/svg",width:lm(s),height:lm(w),viewBox:`0 0 ${lm(s)} ${lm(w)}`,"data-simulation-experiment-id":e,...k&&{"data-software-used-string":k},...l&&{"data-circuit-to-svg-version":Yw}},children:M};return Ow(R)}function qWo(t){const e=t.attributes?.viewBox;if(typeof e!="string")return null;const n=e.trim().split(/[\s,]+/).map(r=>Number.parseFloat(r));if(n.length!==4)return null;const o=n.at(2),i=n.at(3);return!Number.isFinite(o)||!Number.isFinite(i)||o===void 0||i===void 0||o<=0||i<=0?null:{width:o,height:i}}function XWo(t){return Number.isFinite(t)?t<=0?0:t>=1?1:t:xKt}var EKt=["pcb_board","pcb_solder_paste"];function ZWo(t,e){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=t.filter(Q=>Q.type==="pcb_board"||Q.type==="pcb_panel"||Q.type==="pcb_solder_paste"&&Q.layer===e.layer);for(const Q of s)if(Q.type==="pcb_board")Q.outline&&Array.isArray(Q.outline)&&Q.outline.length>=3?S(Q.outline):"center"in Q&&"width"in Q&&"height"in Q&&B(Q.center,Q.width,Q.height);else if(Q.type==="pcb_panel"){const w=Q,M=lt.parse(w.width),k=lt.parse(w.height);if(M!==void 0&&k!==void 0){const R=w.center??{x:M/2,y:k/2};B(R,M,k)}}else Q.type==="pcb_solder_paste"&&"x"in Q&&"y"in Q&&B({x:Q.x,y:Q.y},0,0);const a=1,A=i-n+2*a,c=r-o+2*a,l=e.width??800,u=e.height??600,g=l/A,h=u/c,d=Math.min(g,h),p=(l-A*d)/2,m=(u-c*d)/2,_=m0(of(p-n*d+a*d,u-m+o*d-a*d),kx(d,-d)),f={transform:_,layer:e.layer,colorMap:ch},I=s.sort((Q,w)=>(EKt.indexOf(w.type)??9999)-(EKt.indexOf(Q.type)??9999)).flatMap(Q=>ejo({elm:Q,ctx:f})),C=Gw(t),y=Yw,x=[{name:"style",type:"element",children:[{type:"text",value:""}]},{name:"rect",type:"element",attributes:{class:"boundary",x:"0",y:"0",fill:"#000",width:l.toString(),height:u.toString()}},tjo(_,n,o,i,r),...I].filter(Q=>Q!==null);if(e?.showErrorsInTextOverlay){const Q=IG(t);Q&&x.push(Q)}const E={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",width:l.toString(),height:u.toString(),...C&&{"data-software-used-string":C},...e.includeVersion&&{"data-circuit-to-svg-version":y}},value:"",children:x};try{return Ow(E)}catch(Q){throw console.error("Error stringifying SVG object:",Q),Q}function B(Q,w,M){const k=w/2,R=M/2;n=Math.min(n,Q.x-k),o=Math.min(o,Q.y-R),i=Math.max(i,Q.x+k),r=Math.max(r,Q.y+R)}function S(Q){for(const w of Q)n=Math.min(n,w.x),o=Math.min(o,w.y),i=Math.max(i,w.x),r=Math.max(r,w.y)}}function ejo({elm:t,ctx:e}){const{transform:n}=e;switch(t.type){case"pcb_board":return tUt(t,e);case"pcb_solder_paste":return sUt(t,e);default:return[]}}function tjo(t,e,n,o,i){const[r,s]=hn(t,[e,n]),[a,A]=hn(t,[o,i]),c=Math.abs(a-r),l=Math.abs(A-s),u=Math.min(r,a),g=Math.min(s,A);return{name:"rect",type:"element",value:"",children:[],attributes:{class:"pcb-boundary",fill:"none",stroke:"#fff","stroke-width":"0.3",x:u.toString(),y:g.toString(),width:c.toString(),height:l.toString()}}}const njo=Object.freeze(Object.defineProperty({__proto__:null,CIRCUIT_TO_SVG_VERSION:Yw,circuitJsonToPcbSvg:uzo,circuitJsonToSchematicSvg:zJo,colorMap:Lg,convertCircuitJsonToAssemblySvg:_Ut,convertCircuitJsonToPcbSvg:pUt,convertCircuitJsonToPinoutSvg:SUt,convertCircuitJsonToSchematicSimulationSvg:$Wo,convertCircuitJsonToSchematicSvg:Nq,convertCircuitJsonToSimulationGraphSvg:yKt,convertCircuitJsonToSolderPasteMask:ZWo,convertCircuitJsonToStackedSchematicSheetsSvg:XJo,createErrorTextOverlay:IG,createSvgObjectsForSchComponentPortHovers:OUt,getSoftwareUsedString:Gw,isSimulationAnalysisResult:hde,isSimulationCurrentProbe:IKt,isSimulationExperiment:YRe,isSimulationOscilloscopeTrace:CKt,isSimulationTransientCurrentGraph:TWo,isSimulationTransientVoltageGraph:kWo,isSimulationVoltageProbe:fKt},Symbol.toStringTag,{value:"Module"})),ojo=t=>t.some(hde);const mde="165",Vw={ROTATE:0,DOLLY:1,PAN:2},SG={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},ijo=0,BKt=1,rjo=2,bKt=1,SKt=2,qb=3,mE=0,uI=1,r_=2,zw=0,QG=1,QKt=2,vKt=3,wKt=4,sjo=5,NR=100,ajo=101,Ajo=102,cjo=103,ljo=104,ujo=200,gjo=201,djo=202,hjo=203,URe=204,KRe=205,pjo=206,mjo=207,_jo=208,fjo=209,Ijo=210,Cjo=211,yjo=212,xjo=213,Ejo=214,Bjo=0,bjo=1,Sjo=2,_de=3,Qjo=4,vjo=5,wjo=6,Pjo=7,VRe=0,Mjo=1,Djo=2,Jw=0,Njo=1,Rjo=2,Tjo=3,PKt=4,kjo=5,Fjo=6,Ljo=7,MKt="attached",Hjo="detached",DKt=300,vG=301,wG=302,fde=303,zRe=304,Ide=306,c4=1e3,Xy=1001,Tq=1002,wC=1003,JRe=1004,PG=1005,Fl=1006,kq=1007,gm=1008,Ww=1009,Ojo=1010,Gjo=1011,Cde=1012,NKt=1013,MG=1014,m6=1015,yde=1016,RKt=1017,TKt=1018,DG=1020,Yjo=35902,Ujo=1021,Kjo=1022,l4=1023,Vjo=1024,zjo=1025,NG=1026,RG=1027,kKt=1028,FKt=1029,Jjo=1030,LKt=1031,HKt=1033,WRe=33776,jRe=33777,$Re=33778,qRe=33779,OKt=35840,GKt=35841,YKt=35842,UKt=35843,KKt=36196,VKt=37492,zKt=37496,JKt=37808,WKt=37809,jKt=37810,$Kt=37811,qKt=37812,XKt=37813,ZKt=37814,eVt=37815,tVt=37816,nVt=37817,oVt=37818,iVt=37819,rVt=37820,sVt=37821,XRe=36492,aVt=36494,AVt=36495,Wjo=36283,cVt=36284,lVt=36285,uVt=36286,TG=2300,kG=2301,ZRe=2302,gVt=2400,dVt=2401,hVt=2402,jjo=2500,$jo=0,pVt=1,eTe=2,qjo=3200,mVt=3201,tTe=0,Xjo=1,_6="",Ox="srgb",jw="srgb-linear",nTe="display-p3",xde="display-p3-linear",Ede="linear",Ed="srgb",Bde="rec709",bde="p3",FG=7680,_Vt=519,Zjo=512,e$o=513,t$o=514,fVt=515,n$o=516,o$o=517,i$o=518,r$o=519,oTe=35044,IVt="300 es",Xb=2e3,Sde=2001;class RR{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const o=this._listeners;o[e]===void 0&&(o[e]=[]),o[e].indexOf(n)===-1&&o[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const o=this._listeners;return o[e]!==void 0&&o[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const o=this._listeners[e.type];if(o!==void 0){e.target=this;const i=o.slice(0);for(let r=0,s=i.length;r<s;r++)i[r].call(this,e);e.target=null}}}const PC=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let CVt=1234567;const LG=Math.PI/180,HG=180/Math.PI;function u4(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,o=Math.random()*4294967295|0;return(PC[t&255]+PC[t>>8&255]+PC[t>>16&255]+PC[t>>24&255]+"-"+PC[e&255]+PC[e>>8&255]+"-"+PC[e>>16&15|64]+PC[e>>24&255]+"-"+PC[n&63|128]+PC[n>>8&255]+"-"+PC[n>>16&255]+PC[n>>24&255]+PC[o&255]+PC[o>>8&255]+PC[o>>16&255]+PC[o>>24&255]).toLowerCase()}function rf(t,e,n){return Math.max(e,Math.min(n,t))}function iTe(t,e){return(t%e+e)%e}function s$o(t,e,n,o,i){return o+(t-e)*(i-o)/(n-e)}function a$o(t,e,n){return t!==e?(n-t)/(e-t):0}function Fq(t,e,n){return(1-n)*t+n*e}function A$o(t,e,n,o){return Fq(t,e,1-Math.exp(-n*o))}function c$o(t,e=1){return e-Math.abs(iTe(t,e*2)-e)}function l$o(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function u$o(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function g$o(t,e){return t+Math.floor(Math.random()*(e-t+1))}function d$o(t,e){return t+Math.random()*(e-t)}function h$o(t){return t*(.5-Math.random())}function p$o(t){t!==void 0&&(CVt=t);let e=CVt+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function m$o(t){return t*LG}function _$o(t){return t*HG}function f$o(t){return(t&t-1)===0&&t!==0}function I$o(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function C$o(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function y$o(t,e,n,o,i){const r=Math.cos,s=Math.sin,a=r(n/2),A=s(n/2),c=r((e+o)/2),l=s((e+o)/2),u=r((e-o)/2),g=s((e-o)/2),h=r((o-e)/2),d=s((o-e)/2);switch(i){case"XYX":t.set(a*l,A*u,A*g,a*c);break;case"YZY":t.set(A*g,a*l,A*u,a*c);break;case"ZXZ":t.set(A*u,A*g,a*l,a*c);break;case"XZX":t.set(a*l,A*d,A*h,a*c);break;case"YXY":t.set(A*h,a*l,A*d,a*c);break;case"ZYZ":t.set(A*d,A*h,a*l,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function HB(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function ou(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const OG={DEG2RAD:LG,RAD2DEG:HG,generateUUID:u4,clamp:rf,euclideanModulo:iTe,mapLinear:s$o,inverseLerp:a$o,lerp:Fq,damp:A$o,pingpong:c$o,smoothstep:l$o,smootherstep:u$o,randInt:g$o,randFloat:d$o,randFloatSpread:h$o,seededRandom:p$o,degToRad:m$o,radToDeg:_$o,isPowerOfTwo:f$o,ceilPowerOfTwo:I$o,floorPowerOfTwo:C$o,setQuaternionFromProperEuler:y$o,normalize:ou,denormalize:HB};let ni=class _4n{constructor(e=0,n=0){_4n.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,o=this.y,i=e.elements;return this.x=i[0]*n+i[3]*o+i[6],this.y=i[1]*n+i[4]*o+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const o=this.length();return this.divideScalar(o||1).multiplyScalar(Math.max(e,Math.min(n,o)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const o=this.dot(e)/n;return Math.acos(rf(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,o=this.y-e.y;return n*n+o*o}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,o){return this.x=e.x+(n.x-e.x)*o,this.y=e.y+(n.y-e.y)*o,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const o=Math.cos(n),i=Math.sin(n),r=this.x-e.x,s=this.y-e.y;return this.x=r*o-s*i+e.x,this.y=r*i+s*o+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};class HA{constructor(e,n,o,i,r,s,a,A,c){HA.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,o,i,r,s,a,A,c)}set(e,n,o,i,r,s,a,A,c){const l=this.elements;return l[0]=e,l[1]=i,l[2]=a,l[3]=n,l[4]=r,l[5]=A,l[6]=o,l[7]=s,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,o=e.elements;return n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],this}extractBasis(e,n,o){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),o.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const o=e.elements,i=n.elements,r=this.elements,s=o[0],a=o[3],A=o[6],c=o[1],l=o[4],u=o[7],g=o[2],h=o[5],d=o[8],p=i[0],m=i[3],_=i[6],f=i[1],I=i[4],C=i[7],y=i[2],x=i[5],E=i[8];return r[0]=s*p+a*f+A*y,r[3]=s*m+a*I+A*x,r[6]=s*_+a*C+A*E,r[1]=c*p+l*f+u*y,r[4]=c*m+l*I+u*x,r[7]=c*_+l*C+u*E,r[2]=g*p+h*f+d*y,r[5]=g*m+h*I+d*x,r[8]=g*_+h*C+d*E,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],o=e[1],i=e[2],r=e[3],s=e[4],a=e[5],A=e[6],c=e[7],l=e[8];return n*s*l-n*a*c-o*r*l+o*a*A+i*r*c-i*s*A}invert(){const e=this.elements,n=e[0],o=e[1],i=e[2],r=e[3],s=e[4],a=e[5],A=e[6],c=e[7],l=e[8],u=l*s-a*c,g=a*A-l*r,h=c*r-s*A,d=n*u+o*g+i*h;if(d===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/d;return e[0]=u*p,e[1]=(i*c-l*o)*p,e[2]=(a*o-i*s)*p,e[3]=g*p,e[4]=(l*n-i*A)*p,e[5]=(i*r-a*n)*p,e[6]=h*p,e[7]=(o*A-c*n)*p,e[8]=(s*n-o*r)*p,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,o,i,r,s,a){const A=Math.cos(r),c=Math.sin(r);return this.set(o*A,o*c,-o*(A*s+c*a)+s+e,-i*c,i*A,-i*(-c*s+A*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(rTe.makeScale(e,n)),this}rotate(e){return this.premultiply(rTe.makeRotation(-e)),this}translate(e,n){return this.premultiply(rTe.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),o=Math.sin(e);return this.set(n,-o,0,o,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,o=e.elements;for(let i=0;i<9;i++)if(n[i]!==o[i])return!1;return!0}fromArray(e,n=0){for(let o=0;o<9;o++)this.elements[o]=e[o+n];return this}toArray(e=[],n=0){const o=this.elements;return e[n]=o[0],e[n+1]=o[1],e[n+2]=o[2],e[n+3]=o[3],e[n+4]=o[4],e[n+5]=o[5],e[n+6]=o[6],e[n+7]=o[7],e[n+8]=o[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const rTe=new HA;function yVt(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Lq(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function x$o(){const t=Lq("canvas");return t.style.display="block",t}const xVt={};function sTe(t){t in xVt||(xVt[t]=!0,console.warn(t))}function E$o(t,e,n){return new Promise(function(o,i){function r(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(r,n);break;default:o()}}setTimeout(r,n)})}const EVt=new HA().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),BVt=new HA().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Qde={[jw]:{transfer:Ede,primaries:Bde,toReference:t=>t,fromReference:t=>t},[Ox]:{transfer:Ed,primaries:Bde,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[xde]:{transfer:Ede,primaries:bde,toReference:t=>t.applyMatrix3(BVt),fromReference:t=>t.applyMatrix3(EVt)},[nTe]:{transfer:Ed,primaries:bde,toReference:t=>t.convertSRGBToLinear().applyMatrix3(BVt),fromReference:t=>t.applyMatrix3(EVt).convertLinearToSRGB()}},B$o=new Set([jw,xde]),iu={enabled:!0,_workingColorSpace:jw,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!B$o.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const o=Qde[e].toReference,i=Qde[n].fromReference;return i(o(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Qde[t].primaries},getTransfer:function(t){return t===_6?Ede:Qde[t].transfer}};function GG(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function aTe(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let YG;class b$o{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{YG===void 0&&(YG=Lq("canvas")),YG.width=e.width,YG.height=e.height;const o=YG.getContext("2d");e instanceof ImageData?o.putImageData(e,0,0):o.drawImage(e,0,0,e.width,e.height),n=YG}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Lq("canvas");n.width=e.width,n.height=e.height;const o=n.getContext("2d");o.drawImage(e,0,0,e.width,e.height);const i=o.getImageData(0,0,e.width,e.height),r=i.data;for(let s=0;s<r.length;s++)r[s]=GG(r[s]/255)*255;return o.putImageData(i,0,0),n}else if(e.data){const n=e.data.slice(0);for(let o=0;o<n.length;o++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[o]=Math.floor(GG(n[o]/255)*255):n[o]=GG(n[o]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let S$o=0;class bVt{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:S$o++}),this.uuid=u4(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const o={uuid:this.uuid,url:""},i=this.data;if(i!==null){let r;if(Array.isArray(i)){r=[];for(let s=0,a=i.length;s<a;s++)i[s].isDataTexture?r.push(ATe(i[s].image)):r.push(ATe(i[s]))}else r=ATe(i);o.url=r}return n||(e.images[this.uuid]=o),o}}function ATe(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?b$o.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Q$o=0;class Hg extends RR{constructor(e=Hg.DEFAULT_IMAGE,n=Hg.DEFAULT_MAPPING,o=Xy,i=Xy,r=Fl,s=gm,a=l4,A=Ww,c=Hg.DEFAULT_ANISOTROPY,l=_6){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Q$o++}),this.uuid=u4(),this.name="",this.source=new bVt(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=o,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=A,this.offset=new ni(0,0),this.repeat=new ni(1,1),this.center=new ni(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new HA,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=l,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const o={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(o.userData=this.userData),n||(e.textures[this.uuid]=o),o}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==DKt)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case c4:e.x=e.x-Math.floor(e.x);break;case Xy:e.x=e.x<0?0:1;break;case Tq:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case c4:e.y=e.y-Math.floor(e.y);break;case Xy:e.y=e.y<0?0:1;break;case Tq:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Hg.DEFAULT_IMAGE=null,Hg.DEFAULT_MAPPING=DKt,Hg.DEFAULT_ANISOTROPY=1;class ru{constructor(e=0,n=0,o=0,i=1){ru.prototype.isVector4=!0,this.x=e,this.y=n,this.z=o,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,o,i){return this.x=e,this.y=n,this.z=o,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,o=this.y,i=this.z,r=this.w,s=e.elements;return this.x=s[0]*n+s[4]*o+s[8]*i+s[12]*r,this.y=s[1]*n+s[5]*o+s[9]*i+s[13]*r,this.z=s[2]*n+s[6]*o+s[10]*i+s[14]*r,this.w=s[3]*n+s[7]*o+s[11]*i+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,o,i,r;const A=e.elements,c=A[0],l=A[4],u=A[8],g=A[1],h=A[5],d=A[9],p=A[2],m=A[6],_=A[10];if(Math.abs(l-g)<.01&&Math.abs(u-p)<.01&&Math.abs(d-m)<.01){if(Math.abs(l+g)<.1&&Math.abs(u+p)<.1&&Math.abs(d+m)<.1&&Math.abs(c+h+_-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const I=(c+1)/2,C=(h+1)/2,y=(_+1)/2,x=(l+g)/4,E=(u+p)/4,B=(d+m)/4;return I>C&&I>y?I<.01?(o=0,i=.707106781,r=.707106781):(o=Math.sqrt(I),i=x/o,r=E/o):C>y?C<.01?(o=.707106781,i=0,r=.707106781):(i=Math.sqrt(C),o=x/i,r=B/i):y<.01?(o=.707106781,i=.707106781,r=0):(r=Math.sqrt(y),o=E/r,i=B/r),this.set(o,i,r,n),this}let f=Math.sqrt((m-d)*(m-d)+(u-p)*(u-p)+(g-l)*(g-l));return Math.abs(f)<.001&&(f=1),this.x=(m-d)/f,this.y=(u-p)/f,this.z=(g-l)/f,this.w=Math.acos((c+h+_-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const o=this.length();return this.divideScalar(o||1).multiplyScalar(Math.max(e,Math.min(n,o)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,o){return this.x=e.x+(n.x-e.x)*o,this.y=e.y+(n.y-e.y)*o,this.z=e.z+(n.z-e.z)*o,this.w=e.w+(n.w-e.w)*o,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class v$o extends RR{constructor(e=1,n=1,o={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new ru(0,0,e,n),this.scissorTest=!1,this.viewport=new ru(0,0,e,n);const i={width:e,height:n,depth:1};o=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Fl,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},o);const r=new Hg(i,o.mapping,o.wrapS,o.wrapT,o.magFilter,o.minFilter,o.format,o.type,o.anisotropy,o.colorSpace);r.flipY=!1,r.generateMipmaps=o.generateMipmaps,r.internalFormat=o.internalFormat,this.textures=[];const s=o.count;for(let a=0;a<s;a++)this.textures[a]=r.clone(),this.textures[a].isRenderTargetTexture=!0;this.depthBuffer=o.depthBuffer,this.stencilBuffer=o.stencilBuffer,this.resolveDepthBuffer=o.resolveDepthBuffer,this.resolveStencilBuffer=o.resolveStencilBuffer,this.depthTexture=o.depthTexture,this.samples=o.samples}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}setSize(e,n,o=1){if(this.width!==e||this.height!==n||this.depth!==o){this.width=e,this.height=n,this.depth=o;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=n,this.textures[i].image.depth=o;this.dispose()}this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let o=0,i=e.textures.length;o<i;o++)this.textures[o]=e.textures[o].clone(),this.textures[o].isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new bVt(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class TR extends v$o{constructor(e=1,n=1,o={}){super(e,n,o),this.isWebGLRenderTarget=!0}}class SVt extends Hg{constructor(e=null,n=1,o=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:o,depth:i},this.magFilter=wC,this.minFilter=wC,this.wrapR=Xy,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class w$o extends Hg{constructor(e=null,n=1,o=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:o,depth:i},this.magFilter=wC,this.minFilter=wC,this.wrapR=Xy,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Zy{constructor(e=0,n=0,o=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=o,this._w=i}static slerpFlat(e,n,o,i,r,s,a){let A=o[i+0],c=o[i+1],l=o[i+2],u=o[i+3];const g=r[s+0],h=r[s+1],d=r[s+2],p=r[s+3];if(a===0){e[n+0]=A,e[n+1]=c,e[n+2]=l,e[n+3]=u;return}if(a===1){e[n+0]=g,e[n+1]=h,e[n+2]=d,e[n+3]=p;return}if(u!==p||A!==g||c!==h||l!==d){let m=1-a;const _=A*g+c*h+l*d+u*p,f=_>=0?1:-1,I=1-_*_;if(I>Number.EPSILON){const y=Math.sqrt(I),x=Math.atan2(y,_*f);m=Math.sin(m*x)/y,a=Math.sin(a*x)/y}const C=a*f;if(A=A*m+g*C,c=c*m+h*C,l=l*m+d*C,u=u*m+p*C,m===1-a){const y=1/Math.sqrt(A*A+c*c+l*l+u*u);A*=y,c*=y,l*=y,u*=y}}e[n]=A,e[n+1]=c,e[n+2]=l,e[n+3]=u}static multiplyQuaternionsFlat(e,n,o,i,r,s){const a=o[i],A=o[i+1],c=o[i+2],l=o[i+3],u=r[s],g=r[s+1],h=r[s+2],d=r[s+3];return e[n]=a*d+l*u+A*h-c*g,e[n+1]=A*d+l*g+c*u-a*h,e[n+2]=c*d+l*h+a*g-A*u,e[n+3]=l*d-a*u-A*g-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,o,i){return this._x=e,this._y=n,this._z=o,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const o=e._x,i=e._y,r=e._z,s=e._order,a=Math.cos,A=Math.sin,c=a(o/2),l=a(i/2),u=a(r/2),g=A(o/2),h=A(i/2),d=A(r/2);switch(s){case"XYZ":this._x=g*l*u+c*h*d,this._y=c*h*u-g*l*d,this._z=c*l*d+g*h*u,this._w=c*l*u-g*h*d;break;case"YXZ":this._x=g*l*u+c*h*d,this._y=c*h*u-g*l*d,this._z=c*l*d-g*h*u,this._w=c*l*u+g*h*d;break;case"ZXY":this._x=g*l*u-c*h*d,this._y=c*h*u+g*l*d,this._z=c*l*d+g*h*u,this._w=c*l*u-g*h*d;break;case"ZYX":this._x=g*l*u-c*h*d,this._y=c*h*u+g*l*d,this._z=c*l*d-g*h*u,this._w=c*l*u+g*h*d;break;case"YZX":this._x=g*l*u+c*h*d,this._y=c*h*u+g*l*d,this._z=c*l*d-g*h*u,this._w=c*l*u-g*h*d;break;case"XZY":this._x=g*l*u-c*h*d,this._y=c*h*u-g*l*d,this._z=c*l*d+g*h*u,this._w=c*l*u+g*h*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const o=n/2,i=Math.sin(o);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(o),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,o=n[0],i=n[4],r=n[8],s=n[1],a=n[5],A=n[9],c=n[2],l=n[6],u=n[10],g=o+a+u;if(g>0){const h=.5/Math.sqrt(g+1);this._w=.25/h,this._x=(l-A)*h,this._y=(r-c)*h,this._z=(s-i)*h}else if(o>a&&o>u){const h=2*Math.sqrt(1+o-a-u);this._w=(l-A)/h,this._x=.25*h,this._y=(i+s)/h,this._z=(r+c)/h}else if(a>u){const h=2*Math.sqrt(1+a-o-u);this._w=(r-c)/h,this._x=(i+s)/h,this._y=.25*h,this._z=(A+l)/h}else{const h=2*Math.sqrt(1+u-o-a);this._w=(s-i)/h,this._x=(r+c)/h,this._y=(A+l)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let o=e.dot(n)+1;return o<Number.EPSILON?(o=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=o):(this._x=0,this._y=-e.z,this._z=e.y,this._w=o)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=o),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(rf(this.dot(e),-1,1)))}rotateTowards(e,n){const o=this.angleTo(e);if(o===0)return this;const i=Math.min(1,n/o);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const o=e._x,i=e._y,r=e._z,s=e._w,a=n._x,A=n._y,c=n._z,l=n._w;return this._x=o*l+s*a+i*c-r*A,this._y=i*l+s*A+r*a-o*c,this._z=r*l+s*c+o*A-i*a,this._w=s*l-o*a-i*A-r*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const o=this._x,i=this._y,r=this._z,s=this._w;let a=s*e._w+o*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=o,this._y=i,this._z=r,this;const A=1-a*a;if(A<=Number.EPSILON){const h=1-n;return this._w=h*s+n*this._w,this._x=h*o+n*this._x,this._y=h*i+n*this._y,this._z=h*r+n*this._z,this.normalize(),this}const c=Math.sqrt(A),l=Math.atan2(c,a),u=Math.sin((1-n)*l)/c,g=Math.sin(n*l)/c;return this._w=s*u+this._w*g,this._x=o*u+this._x*g,this._y=i*u+this._y*g,this._z=r*u+this._z*g,this._onChangeCallback(),this}slerpQuaternions(e,n,o){return this.copy(e).slerp(n,o)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),o=Math.random(),i=Math.sqrt(1-o),r=Math.sqrt(o);return this.set(i*Math.sin(e),i*Math.cos(e),r*Math.sin(n),r*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class jt{constructor(e=0,n=0,o=0){jt.prototype.isVector3=!0,this.x=e,this.y=n,this.z=o}set(e,n,o){return o===void 0&&(o=this.z),this.x=e,this.y=n,this.z=o,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(QVt.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(QVt.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,o=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[3]*o+r[6]*i,this.y=r[1]*n+r[4]*o+r[7]*i,this.z=r[2]*n+r[5]*o+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,o=this.y,i=this.z,r=e.elements,s=1/(r[3]*n+r[7]*o+r[11]*i+r[15]);return this.x=(r[0]*n+r[4]*o+r[8]*i+r[12])*s,this.y=(r[1]*n+r[5]*o+r[9]*i+r[13])*s,this.z=(r[2]*n+r[6]*o+r[10]*i+r[14])*s,this}applyQuaternion(e){const n=this.x,o=this.y,i=this.z,r=e.x,s=e.y,a=e.z,A=e.w,c=2*(s*i-a*o),l=2*(a*n-r*i),u=2*(r*o-s*n);return this.x=n+A*c+s*u-a*l,this.y=o+A*l+a*c-r*u,this.z=i+A*u+r*l-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,o=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[4]*o+r[8]*i,this.y=r[1]*n+r[5]*o+r[9]*i,this.z=r[2]*n+r[6]*o+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const o=this.length();return this.divideScalar(o||1).multiplyScalar(Math.max(e,Math.min(n,o)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,o){return this.x=e.x+(n.x-e.x)*o,this.y=e.y+(n.y-e.y)*o,this.z=e.z+(n.z-e.z)*o,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const o=e.x,i=e.y,r=e.z,s=n.x,a=n.y,A=n.z;return this.x=i*A-r*a,this.y=r*s-o*A,this.z=o*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const o=e.dot(this)/n;return this.copy(e).multiplyScalar(o)}projectOnPlane(e){return cTe.copy(this).projectOnVector(e),this.sub(cTe)}reflect(e){return this.sub(cTe.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const o=this.dot(e)/n;return Math.acos(rf(o,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,o=this.y-e.y,i=this.z-e.z;return n*n+o*o+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,o){const i=Math.sin(n)*e;return this.x=i*Math.sin(o),this.y=Math.cos(n)*e,this.z=i*Math.cos(o),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,o){return this.x=e*Math.sin(n),this.y=o,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),o=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=o,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,o=Math.sqrt(1-n*n);return this.x=o*Math.cos(e),this.y=n,this.z=o*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const cTe=new jt,QVt=new Zy;class e2{constructor(e=new jt(1/0,1/0,1/0),n=new jt(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,o=e.length;n<o;n+=3)this.expandByPoint(OB.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,o=e.count;n<o;n++)this.expandByPoint(OB.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,o=e.length;n<o;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const o=OB.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(o),this.max.copy(e).add(o),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,n=!1){e.updateWorldMatrix(!1,!1);const o=e.geometry;if(o!==void 0){const r=o.getAttribute("position");if(n===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=r.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,OB):OB.fromBufferAttribute(r,s),OB.applyMatrix4(e.matrixWorld),this.expandByPoint(OB);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),vde.copy(e.boundingBox)):(o.boundingBox===null&&o.computeBoundingBox(),vde.copy(o.boundingBox)),vde.applyMatrix4(e.matrixWorld),this.union(vde)}const i=e.children;for(let r=0,s=i.length;r<s;r++)this.expandByObject(i[r],n);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,OB),OB.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,o;return e.normal.x>0?(n=e.normal.x*this.min.x,o=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,o=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,o+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,o+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,o+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,o+=e.normal.z*this.min.z),n<=-e.constant&&o>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Hq),wde.subVectors(this.max,Hq),UG.subVectors(e.a,Hq),KG.subVectors(e.b,Hq),VG.subVectors(e.c,Hq),$w.subVectors(KG,UG),qw.subVectors(VG,KG),kR.subVectors(UG,VG);let n=[0,-$w.z,$w.y,0,-qw.z,qw.y,0,-kR.z,kR.y,$w.z,0,-$w.x,qw.z,0,-qw.x,kR.z,0,-kR.x,-$w.y,$w.x,0,-qw.y,qw.x,0,-kR.y,kR.x,0];return!lTe(n,UG,KG,VG,wde)||(n=[1,0,0,0,1,0,0,0,1],!lTe(n,UG,KG,VG,wde))?!1:(Pde.crossVectors($w,qw),n=[Pde.x,Pde.y,Pde.z],lTe(n,UG,KG,VG,wde))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,OB).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(OB).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Zb[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Zb[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Zb[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Zb[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Zb[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Zb[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Zb[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Zb[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Zb),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Zb=[new jt,new jt,new jt,new jt,new jt,new jt,new jt,new jt],OB=new jt,vde=new e2,UG=new jt,KG=new jt,VG=new jt,$w=new jt,qw=new jt,kR=new jt,Hq=new jt,wde=new jt,Pde=new jt,FR=new jt;function lTe(t,e,n,o,i){for(let r=0,s=t.length-3;r<=s;r+=3){FR.fromArray(t,r);const a=i.x*Math.abs(FR.x)+i.y*Math.abs(FR.y)+i.z*Math.abs(FR.z),A=e.dot(FR),c=n.dot(FR),l=o.dot(FR);if(Math.max(-Math.max(A,c,l),Math.min(A,c,l))>a)return!1}return!0}const P$o=new e2,Oq=new jt,uTe=new jt;let GB=class{constructor(e=new jt,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const o=this.center;n!==void 0?o.copy(n):P$o.setFromPoints(e).getCenter(o);let i=0;for(let r=0,s=e.length;r<s;r++)i=Math.max(i,o.distanceToSquared(e[r]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const n=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,n){const o=this.center.distanceToSquared(e);return n.copy(e),o>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Oq.subVectors(e,this.center);const n=Oq.lengthSq();if(n>this.radius*this.radius){const o=Math.sqrt(n),i=(o-this.radius)*.5;this.center.addScaledVector(Oq,i/o),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(uTe.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Oq.copy(e.center).add(uTe)),this.expandByPoint(Oq.copy(e.center).sub(uTe))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};const eS=new jt,gTe=new jt,Mde=new jt,Xw=new jt,dTe=new jt,Dde=new jt,hTe=new jt;let zG=class{constructor(e=new jt,n=new jt(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,eS)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const o=n.dot(this.direction);return o<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,o)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=eS.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(eS.copy(this.origin).addScaledVector(this.direction,n),eS.distanceToSquared(e))}distanceSqToSegment(e,n,o,i){gTe.copy(e).add(n).multiplyScalar(.5),Mde.copy(n).sub(e).normalize(),Xw.copy(this.origin).sub(gTe);const r=e.distanceTo(n)*.5,s=-this.direction.dot(Mde),a=Xw.dot(this.direction),A=-Xw.dot(Mde),c=Xw.lengthSq(),l=Math.abs(1-s*s);let u,g,h,d;if(l>0)if(u=s*A-a,g=s*a-A,d=r*l,u>=0)if(g>=-d)if(g<=d){const p=1/l;u*=p,g*=p,h=u*(u+s*g+2*a)+g*(s*u+g+2*A)+c}else g=r,u=Math.max(0,-(s*g+a)),h=-u*u+g*(g+2*A)+c;else g=-r,u=Math.max(0,-(s*g+a)),h=-u*u+g*(g+2*A)+c;else g<=-d?(u=Math.max(0,-(-s*r+a)),g=u>0?-r:Math.min(Math.max(-r,-A),r),h=-u*u+g*(g+2*A)+c):g<=d?(u=0,g=Math.min(Math.max(-r,-A),r),h=g*(g+2*A)+c):(u=Math.max(0,-(s*r+a)),g=u>0?r:Math.min(Math.max(-r,-A),r),h=-u*u+g*(g+2*A)+c);else g=s>0?-r:r,u=Math.max(0,-(s*g+a)),h=-u*u+g*(g+2*A)+c;return o&&o.copy(this.origin).addScaledVector(this.direction,u),i&&i.copy(gTe).addScaledVector(Mde,g),h}intersectSphere(e,n){eS.subVectors(e.center,this.origin);const o=eS.dot(this.direction),i=eS.dot(eS)-o*o,r=e.radius*e.radius;if(i>r)return null;const s=Math.sqrt(r-i),a=o-s,A=o+s;return A<0?null:a<0?this.at(A,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const o=-(this.origin.dot(e.normal)+e.constant)/n;return o>=0?o:null}intersectPlane(e,n){const o=this.distanceToPlane(e);return o===null?null:this.at(o,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let o,i,r,s,a,A;const c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,g=this.origin;return c>=0?(o=(e.min.x-g.x)*c,i=(e.max.x-g.x)*c):(o=(e.max.x-g.x)*c,i=(e.min.x-g.x)*c),l>=0?(r=(e.min.y-g.y)*l,s=(e.max.y-g.y)*l):(r=(e.max.y-g.y)*l,s=(e.min.y-g.y)*l),o>s||r>i||((r>o||isNaN(o))&&(o=r),(s<i||isNaN(i))&&(i=s),u>=0?(a=(e.min.z-g.z)*u,A=(e.max.z-g.z)*u):(a=(e.max.z-g.z)*u,A=(e.min.z-g.z)*u),o>A||a>i)||((a>o||o!==o)&&(o=a),(A<i||i!==i)&&(i=A),i<0)?null:this.at(o>=0?o:i,n)}intersectsBox(e){return this.intersectBox(e,eS)!==null}intersectTriangle(e,n,o,i,r){dTe.subVectors(n,e),Dde.subVectors(o,e),hTe.crossVectors(dTe,Dde);let s=this.direction.dot(hTe),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;Xw.subVectors(this.origin,e);const A=a*this.direction.dot(Dde.crossVectors(Xw,Dde));if(A<0)return null;const c=a*this.direction.dot(dTe.cross(Xw));if(c<0||A+c>s)return null;const l=-a*Xw.dot(hTe);return l<0?null:this.at(l/s,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}};class va{constructor(e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m){va.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m)}set(e,n,o,i,r,s,a,A,c,l,u,g,h,d,p,m){const _=this.elements;return _[0]=e,_[4]=n,_[8]=o,_[12]=i,_[1]=r,_[5]=s,_[9]=a,_[13]=A,_[2]=c,_[6]=l,_[10]=u,_[14]=g,_[3]=h,_[7]=d,_[11]=p,_[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new va().fromArray(this.elements)}copy(e){const n=this.elements,o=e.elements;return n[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=o[6],n[7]=o[7],n[8]=o[8],n[9]=o[9],n[10]=o[10],n[11]=o[11],n[12]=o[12],n[13]=o[13],n[14]=o[14],n[15]=o[15],this}copyPosition(e){const n=this.elements,o=e.elements;return n[12]=o[12],n[13]=o[13],n[14]=o[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,o){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),o.setFromMatrixColumn(this,2),this}makeBasis(e,n,o){return this.set(e.x,n.x,o.x,0,e.y,n.y,o.y,0,e.z,n.z,o.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,o=e.elements,i=1/JG.setFromMatrixColumn(e,0).length(),r=1/JG.setFromMatrixColumn(e,1).length(),s=1/JG.setFromMatrixColumn(e,2).length();return n[0]=o[0]*i,n[1]=o[1]*i,n[2]=o[2]*i,n[3]=0,n[4]=o[4]*r,n[5]=o[5]*r,n[6]=o[6]*r,n[7]=0,n[8]=o[8]*s,n[9]=o[9]*s,n[10]=o[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,o=e.x,i=e.y,r=e.z,s=Math.cos(o),a=Math.sin(o),A=Math.cos(i),c=Math.sin(i),l=Math.cos(r),u=Math.sin(r);if(e.order==="XYZ"){const g=s*l,h=s*u,d=a*l,p=a*u;n[0]=A*l,n[4]=-A*u,n[8]=c,n[1]=h+d*c,n[5]=g-p*c,n[9]=-a*A,n[2]=p-g*c,n[6]=d+h*c,n[10]=s*A}else if(e.order==="YXZ"){const g=A*l,h=A*u,d=c*l,p=c*u;n[0]=g+p*a,n[4]=d*a-h,n[8]=s*c,n[1]=s*u,n[5]=s*l,n[9]=-a,n[2]=h*a-d,n[6]=p+g*a,n[10]=s*A}else if(e.order==="ZXY"){const g=A*l,h=A*u,d=c*l,p=c*u;n[0]=g-p*a,n[4]=-s*u,n[8]=d+h*a,n[1]=h+d*a,n[5]=s*l,n[9]=p-g*a,n[2]=-s*c,n[6]=a,n[10]=s*A}else if(e.order==="ZYX"){const g=s*l,h=s*u,d=a*l,p=a*u;n[0]=A*l,n[4]=d*c-h,n[8]=g*c+p,n[1]=A*u,n[5]=p*c+g,n[9]=h*c-d,n[2]=-c,n[6]=a*A,n[10]=s*A}else if(e.order==="YZX"){const g=s*A,h=s*c,d=a*A,p=a*c;n[0]=A*l,n[4]=p-g*u,n[8]=d*u+h,n[1]=u,n[5]=s*l,n[9]=-a*l,n[2]=-c*l,n[6]=h*u+d,n[10]=g-p*u}else if(e.order==="XZY"){const g=s*A,h=s*c,d=a*A,p=a*c;n[0]=A*l,n[4]=-u,n[8]=c*l,n[1]=g*u+p,n[5]=s*l,n[9]=h*u-d,n[2]=d*u-h,n[6]=a*l,n[10]=p*u+g}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(M$o,e,D$o)}lookAt(e,n,o){const i=this.elements;return _E.subVectors(e,n),_E.lengthSq()===0&&(_E.z=1),_E.normalize(),Zw.crossVectors(o,_E),Zw.lengthSq()===0&&(Math.abs(o.z)===1?_E.x+=1e-4:_E.z+=1e-4,_E.normalize(),Zw.crossVectors(o,_E)),Zw.normalize(),Nde.crossVectors(_E,Zw),i[0]=Zw.x,i[4]=Nde.x,i[8]=_E.x,i[1]=Zw.y,i[5]=Nde.y,i[9]=_E.y,i[2]=Zw.z,i[6]=Nde.z,i[10]=_E.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const o=e.elements,i=n.elements,r=this.elements,s=o[0],a=o[4],A=o[8],c=o[12],l=o[1],u=o[5],g=o[9],h=o[13],d=o[2],p=o[6],m=o[10],_=o[14],f=o[3],I=o[7],C=o[11],y=o[15],x=i[0],E=i[4],B=i[8],S=i[12],Q=i[1],w=i[5],M=i[9],k=i[13],R=i[2],F=i[6],O=i[10],U=i[14],Y=i[3],W=i[7],te=i[11],j=i[15];return r[0]=s*x+a*Q+A*R+c*Y,r[4]=s*E+a*w+A*F+c*W,r[8]=s*B+a*M+A*O+c*te,r[12]=s*S+a*k+A*U+c*j,r[1]=l*x+u*Q+g*R+h*Y,r[5]=l*E+u*w+g*F+h*W,r[9]=l*B+u*M+g*O+h*te,r[13]=l*S+u*k+g*U+h*j,r[2]=d*x+p*Q+m*R+_*Y,r[6]=d*E+p*w+m*F+_*W,r[10]=d*B+p*M+m*O+_*te,r[14]=d*S+p*k+m*U+_*j,r[3]=f*x+I*Q+C*R+y*Y,r[7]=f*E+I*w+C*F+y*W,r[11]=f*B+I*M+C*O+y*te,r[15]=f*S+I*k+C*U+y*j,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],o=e[4],i=e[8],r=e[12],s=e[1],a=e[5],A=e[9],c=e[13],l=e[2],u=e[6],g=e[10],h=e[14],d=e[3],p=e[7],m=e[11],_=e[15];return d*(+r*A*u-i*c*u-r*a*g+o*c*g+i*a*h-o*A*h)+p*(+n*A*h-n*c*g+r*s*g-i*s*h+i*c*l-r*A*l)+m*(+n*c*u-n*a*h-r*s*u+o*s*h+r*a*l-o*c*l)+_*(-i*a*l-n*A*u+n*a*g+i*s*u-o*s*g+o*A*l)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,o){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=o),this}invert(){const e=this.elements,n=e[0],o=e[1],i=e[2],r=e[3],s=e[4],a=e[5],A=e[6],c=e[7],l=e[8],u=e[9],g=e[10],h=e[11],d=e[12],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6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,o,i))}makeTranslation(e,n,o){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,o,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),o=Math.sin(e);return this.set(1,0,0,0,0,n,-o,0,0,o,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),o=Math.sin(e);return this.set(n,0,o,0,0,1,0,0,-o,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),o=Math.sin(e);return this.set(n,-o,0,0,o,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const o=Math.cos(n),i=Math.sin(n),r=1-o,s=e.x,a=e.y,A=e.z,c=r*s,l=r*a;return this.set(c*s+o,c*a-i*A,c*A+i*a,0,c*a+i*A,l*a+o,l*A-i*s,0,c*A-i*a,l*A+i*s,r*A*A+o,0,0,0,0,1),this}makeScale(e,n,o){return this.set(e,0,0,0,0,n,0,0,0,0,o,0,0,0,0,1),this}makeShear(e,n,o,i,r,s){return this.set(1,o,r,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,o){const i=this.elements,r=n._x,s=n._y,a=n._z,A=n._w,c=r+r,l=s+s,u=a+a,g=r*c,h=r*l,d=r*u,p=s*l,m=s*u,_=a*u,f=A*c,I=A*l,C=A*u,y=o.x,x=o.y,E=o.z;return i[0]=(1-(p+_))*y,i[1]=(h+C)*y,i[2]=(d-I)*y,i[3]=0,i[4]=(h-C)*x,i[5]=(1-(g+_))*x,i[6]=(m+f)*x,i[7]=0,i[8]=(d+I)*E,i[9]=(m-f)*E,i[10]=(1-(g+p))*E,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,o){const i=this.elements;let r=JG.set(i[0],i[1],i[2]).length();const s=JG.set(i[4],i[5],i[6]).length(),a=JG.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],YB.copy(this);const c=1/r,l=1/s,u=1/a;return YB.elements[0]*=c,YB.elements[1]*=c,YB.elements[2]*=c,YB.elements[4]*=l,YB.elements[5]*=l,YB.elements[6]*=l,YB.elements[8]*=u,YB.elements[9]*=u,YB.elements[10]*=u,n.setFromRotationMatrix(YB),o.x=r,o.y=s,o.z=a,this}makePerspective(e,n,o,i,r,s,a=Xb){const A=this.elements,c=2*r/(n-e),l=2*r/(o-i),u=(n+e)/(n-e),g=(o+i)/(o-i);let h,d;if(a===Xb)h=-(s+r)/(s-r),d=-2*s*r/(s-r);else if(a===Sde)h=-s/(s-r),d=-s*r/(s-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return A[0]=c,A[4]=0,A[8]=u,A[12]=0,A[1]=0,A[5]=l,A[9]=g,A[13]=0,A[2]=0,A[6]=0,A[10]=h,A[14]=d,A[3]=0,A[7]=0,A[11]=-1,A[15]=0,this}makeOrthographic(e,n,o,i,r,s,a=Xb){const A=this.elements,c=1/(n-e),l=1/(o-i),u=1/(s-r),g=(n+e)*c,h=(o+i)*l;let d,p;if(a===Xb)d=(s+r)*u,p=-2*u;else if(a===Sde)d=r*u,p=-1*u;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return A[0]=2*c,A[4]=0,A[8]=0,A[12]=-g,A[1]=0,A[5]=2*l,A[9]=0,A[13]=-h,A[2]=0,A[6]=0,A[10]=p,A[14]=-d,A[3]=0,A[7]=0,A[11]=0,A[15]=1,this}equals(e){const n=this.elements,o=e.elements;for(let i=0;i<16;i++)if(n[i]!==o[i])return!1;return!0}fromArray(e,n=0){for(let o=0;o<16;o++)this.elements[o]=e[o+n];return this}toArray(e=[],n=0){const o=this.elements;return e[n]=o[0],e[n+1]=o[1],e[n+2]=o[2],e[n+3]=o[3],e[n+4]=o[4],e[n+5]=o[5],e[n+6]=o[6],e[n+7]=o[7],e[n+8]=o[8],e[n+9]=o[9],e[n+10]=o[10],e[n+11]=o[11],e[n+12]=o[12],e[n+13]=o[13],e[n+14]=o[14],e[n+15]=o[15],e}}const JG=new jt,YB=new va,M$o=new jt(0,0,0),D$o=new jt(1,1,1),Zw=new jt,Nde=new jt,_E=new jt,vVt=new va,wVt=new Zy;class t2{constructor(e=0,n=0,o=0,i=t2.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=o,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,o,i=this._order){return this._x=e,this._y=n,this._z=o,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,o=!0){const i=e.elements,r=i[0],s=i[4],a=i[8],A=i[1],c=i[5],l=i[9],u=i[2],g=i[6],h=i[10];switch(n){case"XYZ":this._y=Math.asin(rf(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-l,h),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(g,c),this._z=0);break;case"YXZ":this._x=Math.asin(-rf(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(A,c)):(this._y=Math.atan2(-u,r),this._z=0);break;case"ZXY":this._x=Math.asin(rf(g,-1,1)),Math.abs(g)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(A,r));break;case"ZYX":this._y=Math.asin(-rf(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(g,h),this._z=Math.atan2(A,r)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(rf(A,-1,1)),Math.abs(A)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-rf(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(g,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-l,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,o===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,o){return vVt.makeRotationFromQuaternion(e),this.setFromRotationMatrix(vVt,n,o)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return wVt.setFromEuler(this),this.setFromQuaternion(wVt,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}t2.DEFAULT_ORDER="XYZ";class pTe{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let N$o=0;const PVt=new jt,WG=new Zy,tS=new va,Rde=new jt,Gq=new jt,R$o=new jt,T$o=new Zy,MVt=new jt(1,0,0),DVt=new jt(0,1,0),NVt=new jt(0,0,1),RVt={type:"added"},k$o={type:"removed"},jG={type:"childadded",child:null},mTe={type:"childremoved",child:null};class T0 extends RR{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:N$o++}),this.uuid=u4(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=T0.DEFAULT_UP.clone();const e=new jt,n=new t2,o=new Zy,i=new jt(1,1,1);function r(){o.setFromEuler(n,!1)}function s(){n.setFromQuaternion(o,void 0,!1)}n._onChange(r),o._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:o},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new va},normalMatrix:{value:new HA}}),this.matrix=new va,this.matrixWorld=new va,this.matrixAutoUpdate=T0.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=T0.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new pTe,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return WG.setFromAxisAngle(e,n),this.quaternion.multiply(WG),this}rotateOnWorldAxis(e,n){return WG.setFromAxisAngle(e,n),this.quaternion.premultiply(WG),this}rotateX(e){return this.rotateOnAxis(MVt,e)}rotateY(e){return this.rotateOnAxis(DVt,e)}rotateZ(e){return this.rotateOnAxis(NVt,e)}translateOnAxis(e,n){return PVt.copy(e).applyQuaternion(this.quaternion),this.position.add(PVt.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(MVt,e)}translateY(e){return this.translateOnAxis(DVt,e)}translateZ(e){return this.translateOnAxis(NVt,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(tS.copy(this.matrixWorld).invert())}lookAt(e,n,o){e.isVector3?Rde.copy(e):Rde.set(e,n,o);const i=this.parent;this.updateWorldMatrix(!0,!1),Gq.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?tS.lookAt(Gq,Rde,this.up):tS.lookAt(Rde,Gq,this.up),this.quaternion.setFromRotationMatrix(tS),i&&(tS.extractRotation(i.matrixWorld),WG.setFromRotationMatrix(tS),this.quaternion.premultiply(WG.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(RVt),jG.child=e,this.dispatchEvent(jG),jG.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let o=0;o<arguments.length;o++)this.remove(arguments[o]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(k$o),mTe.child=e,this.dispatchEvent(mTe),mTe.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),tS.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),tS.multiply(e.parent.matrixWorld)),e.applyMatrix4(tS),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(RVt),jG.child=e,this.dispatchEvent(jG),jG.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let o=0,i=this.children.length;o<i;o++){const s=this.children[o].getObjectByProperty(e,n);if(s!==void 0)return s}}getObjectsByProperty(e,n,o=[]){this[e]===n&&o.push(this);const i=this.children;for(let r=0,s=i.length;r<s;r++)i[r].getObjectsByProperty(e,n,o);return o}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Gq,e,R$o),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Gq,T$o,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let o=0,i=n.length;o<i;o++)n[o].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let o=0,i=n.length;o<i;o++)n[o].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let o=0,i=n.length;o<i;o++){const r=n[o];(r.matrixWorldAutoUpdate===!0||e===!0)&&r.updateMatrixWorld(e)}}updateWorldMatrix(e,n){const o=this.parent;if(e===!0&&o!==null&&o.matrixWorldAutoUpdate===!0&&o.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),n===!0){const i=this.children;for(let r=0,s=i.length;r<s;r++){const a=i[r];a.matrixWorldAutoUpdate===!0&&a.updateWorldMatrix(!1,!0)}}}toJSON(e){const n=e===void 0||typeof e=="string",o={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},o.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function r(a,A){return a[A.uuid]===void 0&&(a[A.uuid]=A.toJSON(e)),A.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const A=a.shapes;if(Array.isArray(A))for(let c=0,l=A.length;c<l;c++){const u=A[c];r(e.shapes,u)}else r(e.shapes,A)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let A=0,c=this.material.length;A<c;A++)a.push(r(e.materials,this.material[A]));i.material=a}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let a=0;a<this.children.length;a++)i.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let a=0;a<this.animations.length;a++){const A=this.animations[a];i.animations.push(r(e.animations,A))}}if(n){const a=s(e.geometries),A=s(e.materials),c=s(e.textures),l=s(e.images),u=s(e.shapes),g=s(e.skeletons),h=s(e.animations),d=s(e.nodes);a.length>0&&(o.geometries=a),A.length>0&&(o.materials=A),c.length>0&&(o.textures=c),l.length>0&&(o.images=l),u.length>0&&(o.shapes=u),g.length>0&&(o.skeletons=g),h.length>0&&(o.animations=h),d.length>0&&(o.nodes=d)}return o.object=i,o;function s(a){const A=[];for(const c in a){const l=a[c];delete l.metadata,A.push(l)}return A}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let o=0;o<e.children.length;o++){const i=e.children[o];this.add(i.clone())}return this}}T0.DEFAULT_UP=new jt(0,1,0),T0.DEFAULT_MATRIX_AUTO_UPDATE=!0,T0.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const UB=new jt,nS=new jt,_Te=new jt,oS=new jt,$G=new jt,qG=new jt,TVt=new jt,fTe=new jt,ITe=new jt,CTe=new jt;class KB{constructor(e=new jt,n=new jt,o=new jt){this.a=e,this.b=n,this.c=o}static getNormal(e,n,o,i){i.subVectors(o,n),UB.subVectors(e,n),i.cross(UB);const r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,n,o,i,r){UB.subVectors(i,n),nS.subVectors(o,n),_Te.subVectors(e,n);const s=UB.dot(UB),a=UB.dot(nS),A=UB.dot(_Te),c=nS.dot(nS),l=nS.dot(_Te),u=s*c-a*a;if(u===0)return r.set(0,0,0),null;const g=1/u,h=(c*A-a*l)*g,d=(s*l-a*A)*g;return r.set(1-h-d,d,h)}static containsPoint(e,n,o,i){return this.getBarycoord(e,n,o,i,oS)===null?!1:oS.x>=0&&oS.y>=0&&oS.x+oS.y<=1}static getInterpolation(e,n,o,i,r,s,a,A){return this.getBarycoord(e,n,o,i,oS)===null?(A.x=0,A.y=0,"z"in A&&(A.z=0),"w"in A&&(A.w=0),null):(A.setScalar(0),A.addScaledVector(r,oS.x),A.addScaledVector(s,oS.y),A.addScaledVector(a,oS.z),A)}static isFrontFacing(e,n,o,i){return UB.subVectors(o,n),nS.subVectors(e,n),UB.cross(nS).dot(i)<0}set(e,n,o){return this.a.copy(e),this.b.copy(n),this.c.copy(o),this}setFromPointsAndIndices(e,n,o,i){return this.a.copy(e[n]),this.b.copy(e[o]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,o,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,o),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return UB.subVectors(this.c,this.b),nS.subVectors(this.a,this.b),UB.cross(nS).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return KB.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return KB.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,o,i,r){return KB.getInterpolation(e,this.a,this.b,this.c,n,o,i,r)}containsPoint(e){return KB.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return KB.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const o=this.a,i=this.b,r=this.c;let s,a;$G.subVectors(i,o),qG.subVectors(r,o),fTe.subVectors(e,o);const A=$G.dot(fTe),c=qG.dot(fTe);if(A<=0&&c<=0)return n.copy(o);ITe.subVectors(e,i);const l=$G.dot(ITe),u=qG.dot(ITe);if(l>=0&&u<=l)return n.copy(i);const g=A*u-l*c;if(g<=0&&A>=0&&l<=0)return s=A/(A-l),n.copy(o).addScaledVector($G,s);CTe.subVectors(e,r);const h=$G.dot(CTe),d=qG.dot(CTe);if(d>=0&&h<=d)return n.copy(r);const p=h*c-A*d;if(p<=0&&c>=0&&d<=0)return a=c/(c-d),n.copy(o).addScaledVector(qG,a);const m=l*d-h*u;if(m<=0&&u-l>=0&&h-d>=0)return TVt.subVectors(r,i),a=(u-l)/(u-l+(h-d)),n.copy(i).addScaledVector(TVt,a);const _=1/(m+p+g);return s=p*_,a=g*_,n.copy(o).addScaledVector($G,s).addScaledVector(qG,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const kVt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},eP={h:0,s:0,l:0},Tde={h:0,s:0,l:0};function yTe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Vi{constructor(e,n,o){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,o)}set(e,n,o){if(n===void 0&&o===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,o);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Ox){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,iu.toWorkingColorSpace(this,n),this}setRGB(e,n,o,i=iu.workingColorSpace){return this.r=e,this.g=n,this.b=o,iu.toWorkingColorSpace(this,i),this}setHSL(e,n,o,i=iu.workingColorSpace){if(e=iTe(e,1),n=rf(n,0,1),o=rf(o,0,1),n===0)this.r=this.g=this.b=o;else{const r=o<=.5?o*(1+n):o+n-o*n,s=2*o-r;this.r=yTe(s,r,e+1/3),this.g=yTe(s,r,e),this.b=yTe(s,r,e-1/3)}return iu.toWorkingColorSpace(this,i),this}setStyle(e,n=Ox){function o(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return o(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return o(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return o(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],s=r.length;if(s===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Ox){const o=kVt[e.toLowerCase()];return o!==void 0?this.setHex(o,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=GG(e.r),this.g=GG(e.g),this.b=GG(e.b),this}copyLinearToSRGB(e){return this.r=aTe(e.r),this.g=aTe(e.g),this.b=aTe(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ox){return iu.fromWorkingColorSpace(MC.copy(this),e),Math.round(rf(MC.r*255,0,255))*65536+Math.round(rf(MC.g*255,0,255))*256+Math.round(rf(MC.b*255,0,255))}getHexString(e=Ox){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=iu.workingColorSpace){iu.fromWorkingColorSpace(MC.copy(this),n);const o=MC.r,i=MC.g,r=MC.b,s=Math.max(o,i,r),a=Math.min(o,i,r);let A,c;const l=(a+s)/2;if(a===s)A=0,c=0;else{const u=s-a;switch(c=l<=.5?u/(s+a):u/(2-s-a),s){case o:A=(i-r)/u+(i<r?6:0);break;case i:A=(r-o)/u+2;break;case r:A=(o-i)/u+4;break}A/=6}return e.h=A,e.s=c,e.l=l,e}getRGB(e,n=iu.workingColorSpace){return iu.fromWorkingColorSpace(MC.copy(this),n),e.r=MC.r,e.g=MC.g,e.b=MC.b,e}getStyle(e=Ox){iu.fromWorkingColorSpace(MC.copy(this),e);const n=MC.r,o=MC.g,i=MC.b;return e!==Ox?`color(${e} ${n.toFixed(3)} ${o.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(o*255)},${Math.round(i*255)})`}offsetHSL(e,n,o){return this.getHSL(eP),this.setHSL(eP.h+e,eP.s+n,eP.l+o)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,o){return this.r=e.r+(n.r-e.r)*o,this.g=e.g+(n.g-e.g)*o,this.b=e.b+(n.b-e.b)*o,this}lerpHSL(e,n){this.getHSL(eP),e.getHSL(Tde);const o=Fq(eP.h,Tde.h,n),i=Fq(eP.s,Tde.s,n),r=Fq(eP.l,Tde.l,n);return this.setHSL(o,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,o=this.g,i=this.b,r=e.elements;return this.r=r[0]*n+r[3]*o+r[6]*i,this.g=r[1]*n+r[4]*o+r[7]*i,this.b=r[2]*n+r[5]*o+r[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const MC=new Vi;Vi.NAMES=kVt;let F$o=0;class Gx extends RR{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:F$o++}),this.uuid=u4(),this.name="",this.type="Material",this.blending=QG,this.side=mE,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=URe,this.blendDst=KRe,this.blendEquation=NR,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Vi(0,0,0),this.blendAlpha=0,this.depthFunc=_de,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=_Vt,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=FG,this.stencilZFail=FG,this.stencilZPass=FG,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const o=e[n];if(o===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(o):i&&i.isVector3&&o&&o.isVector3?i.copy(o):this[n]=o}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const o={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.color&&this.color.isColor&&(o.color=this.color.getHex()),this.roughness!==void 0&&(o.roughness=this.roughness),this.metalness!==void 0&&(o.metalness=this.metalness),this.sheen!==void 0&&(o.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(o.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(o.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(o.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(o.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(o.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(o.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(o.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(o.shininess=this.shininess),this.clearcoat!==void 0&&(o.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(o.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(o.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(o.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(o.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,o.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(o.dispersion=this.dispersion),this.iridescence!==void 0&&(o.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(o.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(o.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(o.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(o.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(o.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(o.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(o.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(o.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(o.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(o.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(o.lightMap=this.lightMap.toJSON(e).uuid,o.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(o.aoMap=this.aoMap.toJSON(e).uuid,o.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(o.bumpMap=this.bumpMap.toJSON(e).uuid,o.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(o.normalMap=this.normalMap.toJSON(e).uuid,o.normalMapType=this.normalMapType,o.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(o.displacementMap=this.displacementMap.toJSON(e).uuid,o.displacementScale=this.displacementScale,o.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(o.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(o.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(o.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(o.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(o.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(o.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(o.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(o.combine=this.combine)),this.envMapRotation!==void 0&&(o.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(o.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(o.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(o.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(o.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(o.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(o.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(o.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(o.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(o.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(o.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(o.size=this.size),this.shadowSide!==null&&(o.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(o.sizeAttenuation=this.sizeAttenuation),this.blending!==QG&&(o.blending=this.blending),this.side!==mE&&(o.side=this.side),this.vertexColors===!0&&(o.vertexColors=!0),this.opacity<1&&(o.opacity=this.opacity),this.transparent===!0&&(o.transparent=!0),this.blendSrc!==URe&&(o.blendSrc=this.blendSrc),this.blendDst!==KRe&&(o.blendDst=this.blendDst),this.blendEquation!==NR&&(o.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(o.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(o.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(o.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(o.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(o.blendAlpha=this.blendAlpha),this.depthFunc!==_de&&(o.depthFunc=this.depthFunc),this.depthTest===!1&&(o.depthTest=this.depthTest),this.depthWrite===!1&&(o.depthWrite=this.depthWrite),this.colorWrite===!1&&(o.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(o.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_Vt&&(o.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(o.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(o.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==FG&&(o.stencilFail=this.stencilFail),this.stencilZFail!==FG&&(o.stencilZFail=this.stencilZFail),this.stencilZPass!==FG&&(o.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(o.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(o.rotation=this.rotation),this.polygonOffset===!0&&(o.polygonOffset=!0),this.polygonOffsetFactor!==0&&(o.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(o.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(o.linewidth=this.linewidth),this.dashSize!==void 0&&(o.dashSize=this.dashSize),this.gapSize!==void 0&&(o.gapSize=this.gapSize),this.scale!==void 0&&(o.scale=this.scale),this.dithering===!0&&(o.dithering=!0),this.alphaTest>0&&(o.alphaTest=this.alphaTest),this.alphaHash===!0&&(o.alphaHash=!0),this.alphaToCoverage===!0&&(o.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(o.premultipliedAlpha=!0),this.forceSinglePass===!0&&(o.forceSinglePass=!0),this.wireframe===!0&&(o.wireframe=!0),this.wireframeLinewidth>1&&(o.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(o.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(o.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(o.flatShading=!0),this.visible===!1&&(o.visible=!1),this.toneMapped===!1&&(o.toneMapped=!1),this.fog===!1&&(o.fog=!1),Object.keys(this.userData).length>0&&(o.userData=this.userData);function i(r){const s=[];for(const a in r){const A=r[a];delete A.metadata,s.push(A)}return s}if(n){const r=i(e.textures),s=i(e.images);r.length>0&&(o.textures=r),s.length>0&&(o.images=s)}return o}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let o=null;if(n!==null){const i=n.length;o=new Array(i);for(let r=0;r!==i;++r)o[r]=n[r].clone()}return this.clippingPlanes=o,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class fE extends Gx{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Vi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new t2,this.combine=VRe,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const s_=new jt,kde=new ni;class tg{constructor(e,n,o=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=o,this.usage=oTe,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=m6,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return sTe("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,o){e*=this.itemSize,o*=n.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=n.array[o+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,o=this.count;n<o;n++)kde.fromBufferAttribute(this,n),kde.applyMatrix3(e),this.setXY(n,kde.x,kde.y);else if(this.itemSize===3)for(let n=0,o=this.count;n<o;n++)s_.fromBufferAttribute(this,n),s_.applyMatrix3(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}applyMatrix4(e){for(let n=0,o=this.count;n<o;n++)s_.fromBufferAttribute(this,n),s_.applyMatrix4(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}applyNormalMatrix(e){for(let n=0,o=this.count;n<o;n++)s_.fromBufferAttribute(this,n),s_.applyNormalMatrix(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}transformDirection(e){for(let n=0,o=this.count;n<o;n++)s_.fromBufferAttribute(this,n),s_.transformDirection(e),this.setXYZ(n,s_.x,s_.y,s_.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let o=this.array[e*this.itemSize+n];return this.normalized&&(o=HB(o,this.array)),o}setComponent(e,n,o){return this.normalized&&(o=ou(o,this.array)),this.array[e*this.itemSize+n]=o,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=HB(n,this.array)),n}setX(e,n){return this.normalized&&(n=ou(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=HB(n,this.array)),n}setY(e,n){return this.normalized&&(n=ou(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized&&(n=HB(n,this.array)),n}setZ(e,n){return this.normalized&&(n=ou(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized&&(n=HB(n,this.array)),n}setW(e,n){return this.normalized&&(n=ou(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,o){return e*=this.itemSize,this.normalized&&(n=ou(n,this.array),o=ou(o,this.array)),this.array[e+0]=n,this.array[e+1]=o,this}setXYZ(e,n,o,i){return e*=this.itemSize,this.normalized&&(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array)),this.array[e+0]=n,this.array[e+1]=o,this.array[e+2]=i,this}setXYZW(e,n,o,i,r){return e*=this.itemSize,this.normalized&&(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array),r=ou(r,this.array)),this.array[e+0]=n,this.array[e+1]=o,this.array[e+2]=i,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==oTe&&(e.usage=this.usage),e}}class FVt extends tg{constructor(e,n,o){super(new Uint16Array(e),n,o)}}class xTe extends tg{constructor(e,n,o){super(new Uint32Array(e),n,o)}}class Bs extends tg{constructor(e,n,o){super(new Float32Array(e),n,o)}}let L$o=0;const g4=new va,ETe=new T0,XG=new jt,IE=new e2,Yq=new e2,r1=new jt;class Zl extends RR{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:L$o++}),this.uuid=u4(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(yVt(e)?xTe:FVt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,o=0){this.groups.push({start:e,count:n,materialIndex:o})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(e),n.needsUpdate=!0);const o=this.attributes.normal;if(o!==void 0){const r=new HA().getNormalMatrix(e);o.applyNormalMatrix(r),o.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return g4.makeRotationFromQuaternion(e),this.applyMatrix4(g4),this}rotateX(e){return g4.makeRotationX(e),this.applyMatrix4(g4),this}rotateY(e){return g4.makeRotationY(e),this.applyMatrix4(g4),this}rotateZ(e){return g4.makeRotationZ(e),this.applyMatrix4(g4),this}translate(e,n,o){return g4.makeTranslation(e,n,o),this.applyMatrix4(g4),this}scale(e,n,o){return g4.makeScale(e,n,o),this.applyMatrix4(g4),this}lookAt(e){return ETe.lookAt(e),ETe.updateMatrix(),this.applyMatrix4(ETe.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(XG).negate(),this.translate(XG.x,XG.y,XG.z),this}setFromPoints(e){const n=[];for(let o=0,i=e.length;o<i;o++){const r=e[o];n.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new Bs(n,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new e2);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new jt(-1/0,-1/0,-1/0),new jt(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let o=0,i=n.length;o<i;o++){const r=n[o];IE.setFromBufferAttribute(r),this.morphTargetsRelative?(r1.addVectors(this.boundingBox.min,IE.min),this.boundingBox.expandByPoint(r1),r1.addVectors(this.boundingBox.max,IE.max),this.boundingBox.expandByPoint(r1)):(this.boundingBox.expandByPoint(IE.min),this.boundingBox.expandByPoint(IE.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new GB);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new jt,1/0);return}if(e){const o=this.boundingSphere.center;if(IE.setFromBufferAttribute(e),n)for(let r=0,s=n.length;r<s;r++){const a=n[r];Yq.setFromBufferAttribute(a),this.morphTargetsRelative?(r1.addVectors(IE.min,Yq.min),IE.expandByPoint(r1),r1.addVectors(IE.max,Yq.max),IE.expandByPoint(r1)):(IE.expandByPoint(Yq.min),IE.expandByPoint(Yq.max))}IE.getCenter(o);let i=0;for(let r=0,s=e.count;r<s;r++)r1.fromBufferAttribute(e,r),i=Math.max(i,o.distanceToSquared(r1));if(n)for(let r=0,s=n.length;r<s;r++){const a=n[r],A=this.morphTargetsRelative;for(let c=0,l=a.count;c<l;c++)r1.fromBufferAttribute(a,c),A&&(XG.fromBufferAttribute(e,c),r1.add(XG)),i=Math.max(i,o.distanceToSquared(r1))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const o=n.position,i=n.normal,r=n.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new tg(new Float32Array(4*o.count),4));const s=this.getAttribute("tangent"),a=[],A=[];for(let B=0;B<o.count;B++)a[B]=new jt,A[B]=new jt;const c=new jt,l=new jt,u=new jt,g=new ni,h=new ni,d=new ni,p=new jt,m=new jt;function _(B,S,Q){c.fromBufferAttribute(o,B),l.fromBufferAttribute(o,S),u.fromBufferAttribute(o,Q),g.fromBufferAttribute(r,B),h.fromBufferAttribute(r,S),d.fromBufferAttribute(r,Q),l.sub(c),u.sub(c),h.sub(g),d.sub(g);const w=1/(h.x*d.y-d.x*h.y);isFinite(w)&&(p.copy(l).multiplyScalar(d.y).addScaledVector(u,-h.y).multiplyScalar(w),m.copy(u).multiplyScalar(h.x).addScaledVector(l,-d.x).multiplyScalar(w),a[B].add(p),a[S].add(p),a[Q].add(p),A[B].add(m),A[S].add(m),A[Q].add(m))}let f=this.groups;f.length===0&&(f=[{start:0,count:e.count}]);for(let B=0,S=f.length;B<S;++B){const Q=f[B],w=Q.start,M=Q.count;for(let k=w,R=w+M;k<R;k+=3)_(e.getX(k+0),e.getX(k+1),e.getX(k+2))}const I=new jt,C=new jt,y=new jt,x=new jt;function E(B){y.fromBufferAttribute(i,B),x.copy(y);const S=a[B];I.copy(S),I.sub(y.multiplyScalar(y.dot(S))).normalize(),C.crossVectors(x,S);const w=C.dot(A[B])<0?-1:1;s.setXYZW(B,I.x,I.y,I.z,w)}for(let B=0,S=f.length;B<S;++B){const Q=f[B],w=Q.start,M=Q.count;for(let k=w,R=w+M;k<R;k+=3)E(e.getX(k+0)),E(e.getX(k+1)),E(e.getX(k+2))}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let o=this.getAttribute("normal");if(o===void 0)o=new tg(new Float32Array(n.count*3),3),this.setAttribute("normal",o);else for(let g=0,h=o.count;g<h;g++)o.setXYZ(g,0,0,0);const i=new jt,r=new jt,s=new jt,a=new jt,A=new jt,c=new jt,l=new jt,u=new jt;if(e)for(let g=0,h=e.count;g<h;g+=3){const d=e.getX(g+0),p=e.getX(g+1),m=e.getX(g+2);i.fromBufferAttribute(n,d),r.fromBufferAttribute(n,p),s.fromBufferAttribute(n,m),l.subVectors(s,r),u.subVectors(i,r),l.cross(u),a.fromBufferAttribute(o,d),A.fromBufferAttribute(o,p),c.fromBufferAttribute(o,m),a.add(l),A.add(l),c.add(l),o.setXYZ(d,a.x,a.y,a.z),o.setXYZ(p,A.x,A.y,A.z),o.setXYZ(m,c.x,c.y,c.z)}else for(let g=0,h=n.count;g<h;g+=3)i.fromBufferAttribute(n,g+0),r.fromBufferAttribute(n,g+1),s.fromBufferAttribute(n,g+2),l.subVectors(s,r),u.subVectors(i,r),l.cross(u),o.setXYZ(g+0,l.x,l.y,l.z),o.setXYZ(g+1,l.x,l.y,l.z),o.setXYZ(g+2,l.x,l.y,l.z);this.normalizeNormals(),o.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,o=e.count;n<o;n++)r1.fromBufferAttribute(e,n),r1.normalize(),e.setXYZ(n,r1.x,r1.y,r1.z)}toNonIndexed(){function e(a,A){const c=a.array,l=a.itemSize,u=a.normalized,g=new c.constructor(A.length*l);let h=0,d=0;for(let p=0,m=A.length;p<m;p++){a.isInterleavedBufferAttribute?h=A[p]*a.data.stride+a.offset:h=A[p]*l;for(let _=0;_<l;_++)g[d++]=c[h++]}return new tg(g,l,u)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new Zl,o=this.index.array,i=this.attributes;for(const a in i){const A=i[a],c=e(A,o);n.setAttribute(a,c)}const r=this.morphAttributes;for(const a in r){const A=[],c=r[a];for(let l=0,u=c.length;l<u;l++){const g=c[l],h=e(g,o);A.push(h)}n.morphAttributes[a]=A}n.morphTargetsRelative=this.morphTargetsRelative;const s=this.groups;for(let a=0,A=s.length;a<A;a++){const c=s[a];n.addGroup(c.start,c.count,c.materialIndex)}return n}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const A=this.parameters;for(const c in A)A[c]!==void 0&&(e[c]=A[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const o=this.attributes;for(const A in o){const c=o[A];e.data.attributes[A]=c.toJSON(e.data)}const i={};let r=!1;for(const A in this.morphAttributes){const c=this.morphAttributes[A],l=[];for(let u=0,g=c.length;u<g;u++){const h=c[u];l.push(h.toJSON(e.data))}l.length>0&&(i[A]=l,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const o=e.index;o!==null&&this.setIndex(o.clone(n));const i=e.attributes;for(const c in i){const l=i[c];this.setAttribute(c,l.clone(n))}const r=e.morphAttributes;for(const c in r){const l=[],u=r[c];for(let g=0,h=u.length;g<h;g++)l.push(u[g].clone(n));this.morphAttributes[c]=l}this.morphTargetsRelative=e.morphTargetsRelative;const s=e.groups;for(let c=0,l=s.length;c<l;c++){const u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const A=e.boundingSphere;return A!==null&&(this.boundingSphere=A.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const LVt=new va,LR=new zG,Fde=new GB,HVt=new jt,ZG=new jt,eY=new jt,tY=new jt,BTe=new jt,Lde=new jt,Hde=new ni,Ode=new ni,Gde=new ni,OVt=new jt,GVt=new jt,YVt=new jt,Yde=new jt,Ude=new jt;class Er extends T0{constructor(e=new Zl,n=new fE){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const n=this.geometry.morphAttributes,o=Object.keys(n);if(o.length>0){const i=n[o[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=i.length;r<s;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}getVertexPosition(e,n){const o=this.geometry,i=o.attributes.position,r=o.morphAttributes.position,s=o.morphTargetsRelative;n.fromBufferAttribute(i,e);const a=this.morphTargetInfluences;if(r&&a){Lde.set(0,0,0);for(let A=0,c=r.length;A<c;A++){const l=a[A],u=r[A];l!==0&&(BTe.fromBufferAttribute(u,e),s?Lde.addScaledVector(BTe,l):Lde.addScaledVector(BTe.sub(n),l))}n.add(Lde)}return n}raycast(e,n){const o=this.geometry,i=this.material,r=this.matrixWorld;i!==void 0&&(o.boundingSphere===null&&o.computeBoundingSphere(),Fde.copy(o.boundingSphere),Fde.applyMatrix4(r),LR.copy(e.ray).recast(e.near),!(Fde.containsPoint(LR.origin)===!1&&(LR.intersectSphere(Fde,HVt)===null||LR.origin.distanceToSquared(HVt)>(e.far-e.near)**2))&&(LVt.copy(r).invert(),LR.copy(e.ray).applyMatrix4(LVt),!(o.boundingBox!==null&&LR.intersectsBox(o.boundingBox)===!1)&&this._computeIntersections(e,n,LR)))}_computeIntersections(e,n,o){let i;const r=this.geometry,s=this.material,a=r.index,A=r.attributes.position,c=r.attributes.uv,l=r.attributes.uv1,u=r.attributes.normal,g=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(s))for(let d=0,p=g.length;d<p;d++){const m=g[d],_=s[m.materialIndex],f=Math.max(m.start,h.start),I=Math.min(a.count,Math.min(m.start+m.count,h.start+h.count));for(let C=f,y=I;C<y;C+=3){const x=a.getX(C),E=a.getX(C+1),B=a.getX(C+2);i=Kde(this,_,e,o,c,l,u,x,E,B),i&&(i.faceIndex=Math.floor(C/3),i.face.materialIndex=m.materialIndex,n.push(i))}}else{const d=Math.max(0,h.start),p=Math.min(a.count,h.start+h.count);for(let m=d,_=p;m<_;m+=3){const f=a.getX(m),I=a.getX(m+1),C=a.getX(m+2);i=Kde(this,s,e,o,c,l,u,f,I,C),i&&(i.faceIndex=Math.floor(m/3),n.push(i))}}else if(A!==void 0)if(Array.isArray(s))for(let d=0,p=g.length;d<p;d++){const m=g[d],_=s[m.materialIndex],f=Math.max(m.start,h.start),I=Math.min(A.count,Math.min(m.start+m.count,h.start+h.count));for(let C=f,y=I;C<y;C+=3){const x=C,E=C+1,B=C+2;i=Kde(this,_,e,o,c,l,u,x,E,B),i&&(i.faceIndex=Math.floor(C/3),i.face.materialIndex=m.materialIndex,n.push(i))}}else{const d=Math.max(0,h.start),p=Math.min(A.count,h.start+h.count);for(let m=d,_=p;m<_;m+=3){const f=m,I=m+1,C=m+2;i=Kde(this,s,e,o,c,l,u,f,I,C),i&&(i.faceIndex=Math.floor(m/3),n.push(i))}}}}function H$o(t,e,n,o,i,r,s,a){let A;if(e.side===uI?A=o.intersectTriangle(s,r,i,!0,a):A=o.intersectTriangle(i,r,s,e.side===mE,a),A===null)return null;Ude.copy(a),Ude.applyMatrix4(t.matrixWorld);const c=n.ray.origin.distanceTo(Ude);return c<n.near||c>n.far?null:{distance:c,point:Ude.clone(),object:t}}function Kde(t,e,n,o,i,r,s,a,A,c){t.getVertexPosition(a,ZG),t.getVertexPosition(A,eY),t.getVertexPosition(c,tY);const l=H$o(t,e,n,o,ZG,eY,tY,Yde);if(l){i&&(Hde.fromBufferAttribute(i,a),Ode.fromBufferAttribute(i,A),Gde.fromBufferAttribute(i,c),l.uv=KB.getInterpolation(Yde,ZG,eY,tY,Hde,Ode,Gde,new ni)),r&&(Hde.fromBufferAttribute(r,a),Ode.fromBufferAttribute(r,A),Gde.fromBufferAttribute(r,c),l.uv1=KB.getInterpolation(Yde,ZG,eY,tY,Hde,Ode,Gde,new ni)),s&&(OVt.fromBufferAttribute(s,a),GVt.fromBufferAttribute(s,A),YVt.fromBufferAttribute(s,c),l.normal=KB.getInterpolation(Yde,ZG,eY,tY,OVt,GVt,YVt,new jt),l.normal.dot(o.direction)>0&&l.normal.multiplyScalar(-1));const u={a,b:A,c,normal:new jt,materialIndex:0};KB.getNormal(ZG,eY,tY,u.normal),l.face=u}return l}class Yx extends Zl{constructor(e=1,n=1,o=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:o,widthSegments:i,heightSegments:r,depthSegments:s};const a=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const A=[],c=[],l=[],u=[];let g=0,h=0;d("z","y","x",-1,-1,o,n,e,s,r,0),d("z","y","x",1,-1,o,n,-e,s,r,1),d("x","z","y",1,1,e,o,n,i,s,2),d("x","z","y",1,-1,e,o,-n,i,s,3),d("x","y","z",1,-1,e,n,o,i,r,4),d("x","y","z",-1,-1,e,n,-o,i,r,5),this.setIndex(A),this.setAttribute("position",new Bs(c,3)),this.setAttribute("normal",new Bs(l,3)),this.setAttribute("uv",new Bs(u,2));function d(p,m,_,f,I,C,y,x,E,B,S){const Q=C/E,w=y/B,M=C/2,k=y/2,R=x/2,F=E+1,O=B+1;let U=0,Y=0;const W=new jt;for(let te=0;te<O;te++){const j=te*w-k;for(let J=0;J<F;J++){const oe=J*Q-M;W[p]=oe*f,W[m]=j*I,W[_]=R,c.push(W.x,W.y,W.z),W[p]=0,W[m]=0,W[_]=x>0?1:-1,l.push(W.x,W.y,W.z),u.push(J/E),u.push(1-te/B),U+=1}}for(let te=0;te<B;te++)for(let j=0;j<E;j++){const J=g+j+F*te,oe=g+j+F*(te+1),ie=g+(j+1)+F*(te+1),ne=g+(j+1)+F*te;A.push(J,oe,ne),A.push(oe,ie,ne),Y+=6}a.addGroup(h,Y,S),h+=Y,g+=U}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Yx(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function nY(t){const e={};for(const n in t){e[n]={};for(const o in t[n]){const i=t[n][o];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][o]=null):e[n][o]=i.clone():Array.isArray(i)?e[n][o]=i.slice():e[n][o]=i}}return e}function n2(t){const e={};for(let n=0;n<t.length;n++){const o=nY(t[n]);for(const i in o)e[i]=o[i]}return e}function O$o(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function UVt(t){const e=t.getRenderTarget();return e===null?t.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:iu.workingColorSpace}const KVt={clone:nY,merge:n2};var G$o=`void main() {
	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,Y$o=`void main() {
	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class f6 extends Gx{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=G$o,this.fragmentShader=Y$o,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=nY(e.uniforms),this.uniformsGroups=O$o(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const s=this.uniforms[i].value;s&&s.isTexture?n.uniforms[i]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?n.uniforms[i]={type:"c",value:s.getHex()}:s&&s.isVector2?n.uniforms[i]={type:"v2",value:s.toArray()}:s&&s.isVector3?n.uniforms[i]={type:"v3",value:s.toArray()}:s&&s.isVector4?n.uniforms[i]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?n.uniforms[i]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?n.uniforms[i]={type:"m4",value:s.toArray()}:n.uniforms[i]={value:s}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const o={};for(const i in this.extensions)this.extensions[i]===!0&&(o[i]=!0);return Object.keys(o).length>0&&(n.extensions=o),n}}class VVt extends T0{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new va,this.projectionMatrix=new va,this.projectionMatrixInverse=new va,this.coordinateSystem=Xb}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const tP=new jt,zVt=new ni,JVt=new ni;class sf extends VVt{constructor(e=50,n=1,o=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=o,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=HG*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(LG*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return HG*2*Math.atan(Math.tan(LG*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,o){tP.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(tP.x,tP.y).multiplyScalar(-e/tP.z),tP.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),o.set(tP.x,tP.y).multiplyScalar(-e/tP.z)}getViewSize(e,n){return this.getViewBounds(e,zVt,JVt),n.subVectors(JVt,zVt)}setViewOffset(e,n,o,i,r,s){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=o,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(LG*.5*this.fov)/this.zoom,o=2*n,i=this.aspect*o,r=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const A=s.fullWidth,c=s.fullHeight;r+=s.offsetX*i/A,n-=s.offsetY*o/c,i*=s.width/A,o*=s.height/c}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,n,n-o,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const oY=-90,iY=1;class U$o extends T0{constructor(e,n,o){super(),this.type="CubeCamera",this.renderTarget=o,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new sf(oY,iY,e,n);i.layers=this.layers,this.add(i);const r=new sf(oY,iY,e,n);r.layers=this.layers,this.add(r);const s=new sf(oY,iY,e,n);s.layers=this.layers,this.add(s);const a=new sf(oY,iY,e,n);a.layers=this.layers,this.add(a);const A=new sf(oY,iY,e,n);A.layers=this.layers,this.add(A);const c=new sf(oY,iY,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[o,i,r,s,a,A]=n;for(const c of n)this.remove(c);if(e===Xb)o.up.set(0,1,0),o.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),A.up.set(0,1,0),A.lookAt(0,0,-1);else if(e===Sde)o.up.set(0,-1,0),o.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),A.up.set(0,-1,0),A.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:o,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,s,a,A,c,l]=this.children,u=e.getRenderTarget(),g=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.xr.enabled;e.xr.enabled=!1;const p=o.texture.generateMipmaps;o.texture.generateMipmaps=!1,e.setRenderTarget(o,0,i),e.render(n,r),e.setRenderTarget(o,1,i),e.render(n,s),e.setRenderTarget(o,2,i),e.render(n,a),e.setRenderTarget(o,3,i),e.render(n,A),e.setRenderTarget(o,4,i),e.render(n,c),o.texture.generateMipmaps=p,e.setRenderTarget(o,5,i),e.render(n,l),e.setRenderTarget(u,g,h),e.xr.enabled=d,o.texture.needsPMREMUpdate=!0}}class WVt extends Hg{constructor(e,n,o,i,r,s,a,A,c,l){e=e!==void 0?e:[],n=n!==void 0?n:vG,super(e,n,o,i,r,s,a,A,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class K$o extends TR{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const o={width:e,height:e,depth:1},i=[o,o,o,o,o,o];this.texture=new WVt(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Fl}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const o={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {

					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`},i=new Yx(5,5,5),r=new f6({name:"CubemapFromEquirect",uniforms:nY(o.uniforms),vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,side:uI,blending:zw});r.uniforms.tEquirect.value=n;const s=new Er(i,r),a=n.minFilter;return n.minFilter===gm&&(n.minFilter=Fl),new U$o(1,10,this).update(e,s),n.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,n,o,i){const r=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(n,o,i);e.setRenderTarget(r)}}const bTe=new jt,V$o=new jt,z$o=new HA;class nP{constructor(e=new jt(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,o,i){return this.normal.set(e,n,o),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,o){const i=bTe.subVectors(o,n).cross(V$o.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const o=e.delta(bTe),i=this.normal.dot(o);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:n.copy(e.start).addScaledVector(o,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),o=this.distanceToPoint(e.end);return n<0&&o>0||o<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const o=n||z$o.getNormalMatrix(e),i=this.coplanarPoint(bTe).applyMatrix4(e),r=this.normal.applyMatrix3(o).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const HR=new GB,Vde=new jt;class STe{constructor(e=new nP,n=new nP,o=new nP,i=new nP,r=new nP,s=new nP){this.planes=[e,n,o,i,r,s]}set(e,n,o,i,r,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(o),a[3].copy(i),a[4].copy(r),a[5].copy(s),this}copy(e){const n=this.planes;for(let o=0;o<6;o++)n[o].copy(e.planes[o]);return this}setFromProjectionMatrix(e,n=Xb){const o=this.planes,i=e.elements,r=i[0],s=i[1],a=i[2],A=i[3],c=i[4],l=i[5],u=i[6],g=i[7],h=i[8],d=i[9],p=i[10],m=i[11],_=i[12],f=i[13],I=i[14],C=i[15];if(o[0].setComponents(A-r,g-c,m-h,C-_).normalize(),o[1].setComponents(A+r,g+c,m+h,C+_).normalize(),o[2].setComponents(A+s,g+l,m+d,C+f).normalize(),o[3].setComponents(A-s,g-l,m-d,C-f).normalize(),o[4].setComponents(A-a,g-u,m-p,C-I).normalize(),n===Xb)o[5].setComponents(A+a,g+u,m+p,C+I).normalize();else if(n===Sde)o[5].setComponents(a,u,p,I).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),HR.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),HR.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(HR)}intersectsSprite(e){return HR.center.set(0,0,0),HR.radius=.7071067811865476,HR.applyMatrix4(e.matrixWorld),this.intersectsSphere(HR)}intersectsSphere(e){const n=this.planes,o=e.center,i=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(o)<i)return!1;return!0}intersectsBox(e){const n=this.planes;for(let o=0;o<6;o++){const i=n[o];if(Vde.x=i.normal.x>0?e.max.x:e.min.x,Vde.y=i.normal.y>0?e.max.y:e.min.y,Vde.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Vde)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let o=0;o<6;o++)if(n[o].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function jVt(){let t=null,e=!1,n=null,o=null;function i(r,s){n(r,s),o=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(o=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(o),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function J$o(t){const e=new WeakMap;function n(a,A){const c=a.array,l=a.usage,u=c.byteLength,g=t.createBuffer();t.bindBuffer(A,g),t.bufferData(A,c,l),a.onUploadCallback();let h;if(c instanceof Float32Array)h=t.FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?h=t.HALF_FLOAT:h=t.UNSIGNED_SHORT;else if(c instanceof Int16Array)h=t.SHORT;else if(c instanceof Uint32Array)h=t.UNSIGNED_INT;else if(c instanceof Int32Array)h=t.INT;else if(c instanceof Int8Array)h=t.BYTE;else if(c instanceof Uint8Array)h=t.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)h=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:g,type:h,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:u}}function o(a,A,c){const l=A.array,u=A._updateRange,g=A.updateRanges;if(t.bindBuffer(c,a),u.count===-1&&g.length===0&&t.bufferSubData(c,0,l),g.length!==0){for(let h=0,d=g.length;h<d;h++){const p=g[h];t.bufferSubData(c,p.start*l.BYTES_PER_ELEMENT,l,p.start,p.count)}A.clearUpdateRanges()}u.count!==-1&&(t.bufferSubData(c,u.offset*l.BYTES_PER_ELEMENT,l,u.offset,u.count),u.count=-1),A.onUploadCallback()}function i(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function r(a){a.isInterleavedBufferAttribute&&(a=a.data);const A=e.get(a);A&&(t.deleteBuffer(A.buffer),e.delete(a))}function s(a,A){if(a.isGLBufferAttribute){const l=e.get(a);(!l||l.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}a.isInterleavedBufferAttribute&&(a=a.data);const c=e.get(a);if(c===void 0)e.set(a,n(a,A));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");o(c.buffer,a,A),c.version=a.version}}return{get:i,remove:r,update:s}}class VB extends Zl{constructor(e=1,n=1,o=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:o,heightSegments:i};const r=e/2,s=n/2,a=Math.floor(o),A=Math.floor(i),c=a+1,l=A+1,u=e/a,g=n/A,h=[],d=[],p=[],m=[];for(let _=0;_<l;_++){const f=_*g-s;for(let I=0;I<c;I++){const C=I*u-r;d.push(C,-f,0),p.push(0,0,1),m.push(I/a),m.push(1-_/A)}}for(let _=0;_<A;_++)for(let f=0;f<a;f++){const I=f+c*_,C=f+c*(_+1),y=f+1+c*(_+1),x=f+1+c*_;h.push(I,C,x),h.push(C,y,x)}this.setIndex(h),this.setAttribute("position",new Bs(d,3)),this.setAttribute("normal",new Bs(p,3)),this.setAttribute("uv",new Bs(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new VB(e.width,e.height,e.widthSegments,e.heightSegments)}}var W$o=`#ifdef USE_ALPHAHASH
	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
#endif`,j$o=`#ifdef USE_ALPHAHASH
	const float ALPHA_HASH_SCALE = 0.05;
	float hash2D( vec2 value ) {
		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
	}
	float hash3D( vec3 value ) {
		return hash2D( vec2( hash2D( value.xy ), value.z ) );
	}
	float getAlphaHashThreshold( vec3 position ) {
		float maxDeriv = max(
			length( dFdx( position.xyz ) ),
			length( dFdy( position.xyz ) )
		);
		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
		vec2 pixScales = vec2(
			exp2( floor( log2( pixScale ) ) ),
			exp2( ceil( log2( pixScale ) ) )
		);
		vec2 alpha = vec2(
			hash3D( floor( pixScales.x * position.xyz ) ),
			hash3D( floor( pixScales.y * position.xyz ) )
		);
		float lerpFactor = fract( log2( pixScale ) );
		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
		float a = min( lerpFactor, 1.0 - lerpFactor );
		vec3 cases = vec3(
			x * x / ( 2.0 * a * ( 1.0 - a ) ),
			( x - 0.5 * a ) / ( 1.0 - a ),
			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
		);
		float threshold = ( x < ( 1.0 - a ) )
			? ( ( x < a ) ? cases.x : cases.y )
			: cases.z;
		return clamp( threshold , 1.0e-6, 1.0 );
	}
#endif`,$$o=`#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
#endif`,q$o=`#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,X$o=`#ifdef USE_ALPHATEST
	#ifdef ALPHA_TO_COVERAGE
	diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
	if ( diffuseColor.a == 0.0 ) discard;
	#else
	if ( diffuseColor.a < alphaTest ) discard;
	#endif
#endif`,Z$o=`#ifdef USE_ALPHATEST
	uniform float alphaTest;
#endif`,eqo=`#ifdef USE_AOMAP
	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
	reflectedLight.indirectDiffuse *= ambientOcclusion;
	#if defined( USE_CLEARCOAT ) 
		clearcoatSpecularIndirect *= ambientOcclusion;
	#endif
	#if defined( USE_SHEEN ) 
		sheenSpecularIndirect *= ambientOcclusion;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD )
		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
	#endif
#endif`,tqo=`#ifdef USE_AOMAP
	uniform sampler2D aoMap;
	uniform float aoMapIntensity;
#endif`,nqo=`#ifdef USE_BATCHING
	attribute float batchId;
	uniform highp sampler2D batchingTexture;
	mat4 getBatchingMatrix( const in float i ) {
		int size = textureSize( batchingTexture, 0 ).x;
		int j = int( i ) * 4;
		int x = j % size;
		int y = j / size;
		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
		return mat4( v1, v2, v3, v4 );
	}
#endif
#ifdef USE_BATCHING_COLOR
	uniform sampler2D batchingColorTexture;
	vec3 getBatchingColor( const in float i ) {
		int size = textureSize( batchingColorTexture, 0 ).x;
		int j = int( i );
		int x = j % size;
		int y = j / size;
		return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
	}
#endif`,oqo=`#ifdef USE_BATCHING
	mat4 batchingMatrix = getBatchingMatrix( batchId );
#endif`,iqo=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
	vPosition = vec3( position );
#endif`,rqo=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
	vec3 objectTangent = vec3( tangent.xyz );
#endif`,sqo=`float G_BlinnPhong_Implicit( ) {
	return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
	float G = G_BlinnPhong_Implicit( );
	float D = D_BlinnPhong( shininess, dotNH );
	return F * ( G * D );
} // validated`,aqo=`#ifdef USE_IRIDESCENCE
	const mat3 XYZ_TO_REC709 = mat3(
		 3.2404542, -0.9692660,  0.0556434,
		-1.5371385,  1.8760108, -0.2040259,
		-0.4985314,  0.0415560,  1.0572252
	);
	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
		vec3 sqrtF0 = sqrt( fresnel0 );
		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
	}
	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
	}
	float IorToFresnel0( float transmittedIor, float incidentIor ) {
		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
	}
	vec3 evalSensitivity( float OPD, vec3 shift ) {
		float phase = 2.0 * PI * OPD * 1.0e-9;
		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
		xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );
		xyz /= 1.0685e-7;
		vec3 rgb = XYZ_TO_REC709 * xyz;
		return rgb;
	}
	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
		vec3 I;
		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
		float cosTheta2Sq = 1.0 - sinTheta2Sq;
		if ( cosTheta2Sq < 0.0 ) {
			return vec3( 1.0 );
		}
		float cosTheta2 = sqrt( cosTheta2Sq );
		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
		float T121 = 1.0 - R12;
		float phi12 = 0.0;
		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
		float phi21 = PI - phi12;
		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
		vec3 phi23 = vec3( 0.0 );
		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
		vec3 phi = vec3( phi21 ) + phi23;
		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
		vec3 r123 = sqrt( R123 );
		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
		vec3 C0 = R12 + Rs;
		I = C0;
		vec3 Cm = Rs - T121;
		for ( int m = 1; m <= 2; ++ m ) {
			Cm *= r123;
			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
			I += Cm * Sm;
		}
		return max( I, vec3( 0.0 ) );
	}
#endif`,Aqo=`#ifdef USE_BUMPMAP
	uniform sampler2D bumpMap;
	uniform float bumpScale;
	vec2 dHdxy_fwd() {
		vec2 dSTdx = dFdx( vBumpMapUv );
		vec2 dSTdy = dFdy( vBumpMapUv );
		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
		return vec2( dBx, dBy );
	}
	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
		vec3 vN = surf_norm;
		vec3 R1 = cross( vSigmaY, vN );
		vec3 R2 = cross( vN, vSigmaX );
		float fDet = dot( vSigmaX, R1 ) * faceDirection;
		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
		return normalize( abs( fDet ) * surf_norm - vGrad );
	}
#endif`,cqo=`#if NUM_CLIPPING_PLANES > 0
	vec4 plane;
	#ifdef ALPHA_TO_COVERAGE
		float distanceToPlane, distanceGradient;
		float clipOpacity = 1.0;
		#pragma unroll_loop_start
		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
			plane = clippingPlanes[ i ];
			distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
			distanceGradient = fwidth( distanceToPlane ) / 2.0;
			clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
			if ( clipOpacity == 0.0 ) discard;
		}
		#pragma unroll_loop_end
		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
			float unionClipOpacity = 1.0;
			#pragma unroll_loop_start
			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
				plane = clippingPlanes[ i ];
				distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
				distanceGradient = fwidth( distanceToPlane ) / 2.0;
				unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
			}
			#pragma unroll_loop_end
			clipOpacity *= 1.0 - unionClipOpacity;
		#endif
		diffuseColor.a *= clipOpacity;
		if ( diffuseColor.a == 0.0 ) discard;
	#else
		#pragma unroll_loop_start
		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
			plane = clippingPlanes[ i ];
			if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
		}
		#pragma unroll_loop_end
		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
			bool clipped = true;
			#pragma unroll_loop_start
			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
				plane = clippingPlanes[ i ];
				clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
			}
			#pragma unroll_loop_end
			if ( clipped ) discard;
		#endif
	#endif
#endif`,lqo=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,uqo=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
#endif`,gqo=`#if NUM_CLIPPING_PLANES > 0
	vClipPosition = - mvPosition.xyz;
#endif`,dqo=`#if defined( USE_COLOR_ALPHA )
	diffuseColor *= vColor;
#elif defined( USE_COLOR )
	diffuseColor.rgb *= vColor;
#endif`,hqo=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR )
	varying vec3 vColor;
#endif`,pqo=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
	varying vec3 vColor;
#endif`,mqo=`#if defined( USE_COLOR_ALPHA )
	vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
	vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
	vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
	vColor.xyz *= instanceColor.xyz;
#endif
#ifdef USE_BATCHING_COLOR
	vec3 batchingColor = getBatchingColor( batchId );
	vColor.xyz *= batchingColor.xyz;
#endif`,_qo=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
vec3 pow2( const in vec3 x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
highp float rand( const in vec2 uv ) {
	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
	return fract( sin( sn ) * c );
}
#ifdef HIGH_PRECISION
	float precisionSafeLength( vec3 v ) { return length( v ); }
#else
	float precisionSafeLength( vec3 v ) {
		float maxComponent = max3( abs( v ) );
		return length( v / maxComponent ) * maxComponent;
	}
#endif
struct IncidentLight {
	vec3 color;
	vec3 direction;
	bool visible;
};
struct ReflectedLight {
	vec3 directDiffuse;
	vec3 directSpecular;
	vec3 indirectDiffuse;
	vec3 indirectSpecular;
};
#ifdef USE_ALPHAHASH
	varying vec3 vPosition;
#endif
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
mat3 transposeMat3( const in mat3 m ) {
	mat3 tmp;
	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
	return tmp;
}
float luminance( const in vec3 rgb ) {
	const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );
	return dot( weights, rgb );
}
bool isPerspectiveMatrix( mat4 m ) {
	return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
	return vec2( u, v );
}
vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
	return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
}
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
} // validated`,fqo=`#ifdef ENVMAP_TYPE_CUBE_UV
	#define cubeUV_minMipLevel 4.0
	#define cubeUV_minTileSize 16.0
	float getFace( vec3 direction ) {
		vec3 absDirection = abs( direction );
		float face = - 1.0;
		if ( absDirection.x > absDirection.z ) {
			if ( absDirection.x > absDirection.y )
				face = direction.x > 0.0 ? 0.0 : 3.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		} else {
			if ( absDirection.z > absDirection.y )
				face = direction.z > 0.0 ? 2.0 : 5.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		}
		return face;
	}
	vec2 getUV( vec3 direction, float face ) {
		vec2 uv;
		if ( face == 0.0 ) {
			uv = vec2( direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 1.0 ) {
			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
		} else if ( face == 2.0 ) {
			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
		} else if ( face == 3.0 ) {
			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 4.0 ) {
			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
		} else {
			uv = vec2( direction.x, direction.y ) / abs( direction.z );
		}
		return 0.5 * ( uv + 1.0 );
	}
	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
		float face = getFace( direction );
		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
		mipInt = max( mipInt, cubeUV_minMipLevel );
		float faceSize = exp2( mipInt );
		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
		if ( face > 2.0 ) {
			uv.y += faceSize;
			face -= 3.0;
		}
		uv.x += face * faceSize;
		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
		uv.x *= CUBEUV_TEXEL_WIDTH;
		uv.y *= CUBEUV_TEXEL_HEIGHT;
		#ifdef texture2DGradEXT
			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
		#else
			return texture2D( envMap, uv ).rgb;
		#endif
	}
	#define cubeUV_r0 1.0
	#define cubeUV_m0 - 2.0
	#define cubeUV_r1 0.8
	#define cubeUV_m1 - 1.0
	#define cubeUV_r4 0.4
	#define cubeUV_m4 2.0
	#define cubeUV_r5 0.305
	#define cubeUV_m5 3.0
	#define cubeUV_r6 0.21
	#define cubeUV_m6 4.0
	float roughnessToMip( float roughness ) {
		float mip = 0.0;
		if ( roughness >= cubeUV_r1 ) {
			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
		} else if ( roughness >= cubeUV_r4 ) {
			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
		} else if ( roughness >= cubeUV_r5 ) {
			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
		} else if ( roughness >= cubeUV_r6 ) {
			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
		} else {
			mip = - 2.0 * log2( 1.16 * roughness );		}
		return mip;
	}
	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
		float mipF = fract( mip );
		float mipInt = floor( mip );
		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
		if ( mipF == 0.0 ) {
			return vec4( color0, 1.0 );
		} else {
			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
			return vec4( mix( color0, color1, mipF ), 1.0 );
		}
	}
#endif`,Iqo=`vec3 transformedNormal = objectNormal;
#ifdef USE_TANGENT
	vec3 transformedTangent = objectTangent;
#endif
#ifdef USE_BATCHING
	mat3 bm = mat3( batchingMatrix );
	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
	transformedNormal = bm * transformedNormal;
	#ifdef USE_TANGENT
		transformedTangent = bm * transformedTangent;
	#endif
#endif
#ifdef USE_INSTANCING
	mat3 im = mat3( instanceMatrix );
	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
	transformedNormal = im * transformedNormal;
	#ifdef USE_TANGENT
		transformedTangent = im * transformedTangent;
	#endif
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
	transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
	#ifdef FLIP_SIDED
		transformedTangent = - transformedTangent;
	#endif
#endif`,Cqo=`#ifdef USE_DISPLACEMENTMAP
	uniform sampler2D displacementMap;
	uniform float displacementScale;
	uniform float displacementBias;
#endif`,yqo=`#ifdef USE_DISPLACEMENTMAP
	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
#endif`,xqo=`#ifdef USE_EMISSIVEMAP
	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
	totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,Eqo=`#ifdef USE_EMISSIVEMAP
	uniform sampler2D emissiveMap;
#endif`,Bqo="gl_FragColor = linearToOutputTexel( gl_FragColor );",bqo=`
const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(
	vec3( 0.8224621, 0.177538, 0.0 ),
	vec3( 0.0331941, 0.9668058, 0.0 ),
	vec3( 0.0170827, 0.0723974, 0.9105199 )
);
const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(
	vec3( 1.2249401, - 0.2249404, 0.0 ),
	vec3( - 0.0420569, 1.0420571, 0.0 ),
	vec3( - 0.0196376, - 0.0786361, 1.0982735 )
);
vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {
	return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );
}
vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {
	return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );
}
vec4 LinearTransferOETF( in vec4 value ) {
	return value;
}
vec4 sRGBTransferOETF( in vec4 value ) {
	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
}
vec4 LinearToLinear( in vec4 value ) {
	return value;
}
vec4 LinearTosRGB( in vec4 value ) {
	return sRGBTransferOETF( value );
}`,Sqo=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vec3 cameraToFrag;
		if ( isOrthographic ) {
			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToFrag = normalize( vWorldPosition - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
		#else
			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
		#endif
	#else
		vec3 reflectVec = vReflect;
	#endif
	#ifdef ENVMAP_TYPE_CUBE
		vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
	#else
		vec4 envColor = vec4( 0.0 );
	#endif
	#ifdef ENVMAP_BLENDING_MULTIPLY
		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_MIX )
		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_ADD )
		outgoingLight += envColor.xyz * specularStrength * reflectivity;
	#endif
#endif`,Qqo=`#ifdef USE_ENVMAP
	uniform float envMapIntensity;
	uniform float flipEnvMap;
	uniform mat3 envMapRotation;
	#ifdef ENVMAP_TYPE_CUBE
		uniform samplerCube envMap;
	#else
		uniform sampler2D envMap;
	#endif
	
#endif`,vqo=`#ifdef USE_ENVMAP
	uniform float reflectivity;
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		varying vec3 vWorldPosition;
		uniform float refractionRatio;
	#else
		varying vec3 vReflect;
	#endif
#endif`,wqo=`#ifdef USE_ENVMAP
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		
		varying vec3 vWorldPosition;
	#else
		varying vec3 vReflect;
		uniform float refractionRatio;
	#endif
#endif`,Pqo=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vWorldPosition = worldPosition.xyz;
	#else
		vec3 cameraToVertex;
		if ( isOrthographic ) {
			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vReflect = reflect( cameraToVertex, worldNormal );
		#else
			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
		#endif
	#endif
#endif`,Mqo=`#ifdef USE_FOG
	vFogDepth = - mvPosition.z;
#endif`,Dqo=`#ifdef USE_FOG
	varying float vFogDepth;
#endif`,Nqo=`#ifdef USE_FOG
	#ifdef FOG_EXP2
		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
	#else
		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
	#endif
	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,Rqo=`#ifdef USE_FOG
	uniform vec3 fogColor;
	varying float vFogDepth;
	#ifdef FOG_EXP2
		uniform float fogDensity;
	#else
		uniform float fogNear;
		uniform float fogFar;
	#endif
#endif`,Tqo=`#ifdef USE_GRADIENTMAP
	uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
	float dotNL = dot( normal, lightDirection );
	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
	#ifdef USE_GRADIENTMAP
		return vec3( texture2D( gradientMap, coord ).r );
	#else
		vec2 fw = fwidth( coord ) * 0.5;
		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
	#endif
}`,kqo=`#ifdef USE_LIGHTMAP
	uniform sampler2D lightMap;
	uniform float lightMapIntensity;
#endif`,Fqo=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularStrength = specularStrength;`,Lqo=`varying vec3 vViewPosition;
struct LambertMaterial {
	vec3 diffuseColor;
	float specularStrength;
};
void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Lambert
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,Hqo=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
#if defined( USE_LIGHT_PROBES )
	uniform vec3 lightProbe[ 9 ];
#endif
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
	float x = normal.x, y = normal.y, z = normal.z;
	vec3 result = shCoefficients[ 0 ] * 0.886227;
	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
	return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
	return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
	vec3 irradiance = ambientLightColor;
	return irradiance;
}
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
	float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
	if ( cutoffDistance > 0.0 ) {
		distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
	}
	return distanceFalloff;
}
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
	return smoothstep( coneCosine, penumbraCosine, angleCosine );
}
#if NUM_DIR_LIGHTS > 0
	struct DirectionalLight {
		vec3 direction;
		vec3 color;
	};
	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
		light.color = directionalLight.color;
		light.direction = directionalLight.direction;
		light.visible = true;
	}
#endif
#if NUM_POINT_LIGHTS > 0
	struct PointLight {
		vec3 position;
		vec3 color;
		float distance;
		float decay;
	};
	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
		vec3 lVector = pointLight.position - geometryPosition;
		light.direction = normalize( lVector );
		float lightDistance = length( lVector );
		light.color = pointLight.color;
		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
		light.visible = ( light.color != vec3( 0.0 ) );
	}
#endif
#if NUM_SPOT_LIGHTS > 0
	struct SpotLight {
		vec3 position;
		vec3 direction;
		vec3 color;
		float distance;
		float decay;
		float coneCos;
		float penumbraCos;
	};
	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
		vec3 lVector = spotLight.position - geometryPosition;
		light.direction = normalize( lVector );
		float angleCos = dot( light.direction, spotLight.direction );
		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
		if ( spotAttenuation > 0.0 ) {
			float lightDistance = length( lVector );
			light.color = spotLight.color * spotAttenuation;
			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
			light.visible = ( light.color != vec3( 0.0 ) );
		} else {
			light.color = vec3( 0.0 );
			light.visible = false;
		}
	}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
	struct RectAreaLight {
		vec3 color;
		vec3 position;
		vec3 halfWidth;
		vec3 halfHeight;
	};
	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
	struct HemisphereLight {
		vec3 direction;
		vec3 skyColor;
		vec3 groundColor;
	};
	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
		float dotNL = dot( normal, hemiLight.direction );
		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
		return irradiance;
	}
#endif`,Oqo=`#ifdef USE_ENVMAP
	vec3 getIBLIrradiance( const in vec3 normal ) {
		#ifdef ENVMAP_TYPE_CUBE_UV
			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
			return PI * envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
		#ifdef ENVMAP_TYPE_CUBE_UV
			vec3 reflectVec = reflect( - viewDir, normal );
			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
			return envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	#ifdef USE_ANISOTROPY
		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
			#ifdef ENVMAP_TYPE_CUBE_UV
				vec3 bentNormal = cross( bitangent, viewDir );
				bentNormal = normalize( cross( bentNormal, bitangent ) );
				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
				return getIBLRadiance( viewDir, bentNormal, roughness );
			#else
				return vec3( 0.0 );
			#endif
		}
	#endif
#endif`,Gqo=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,Yqo=`varying vec3 vViewPosition;
struct ToonMaterial {
	vec3 diffuseColor;
};
void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Toon
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,Uqo=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,Kqo=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
	vec3 diffuseColor;
	vec3 specularColor;
	float specularShininess;
	float specularStrength;
};
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_BlinnPhong
#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,Vqo=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
material.roughness = min( material.roughness, 1.0 );
#ifdef IOR
	material.ior = ior;
	#ifdef USE_SPECULAR
		float specularIntensityFactor = specularIntensity;
		vec3 specularColorFactor = specularColor;
		#ifdef USE_SPECULAR_COLORMAP
			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
		#endif
		#ifdef USE_SPECULAR_INTENSITYMAP
			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
		#endif
		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
	#else
		float specularIntensityFactor = 1.0;
		vec3 specularColorFactor = vec3( 1.0 );
		material.specularF90 = 1.0;
	#endif
	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
#else
	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
	material.specularF90 = 1.0;
#endif
#ifdef USE_CLEARCOAT
	material.clearcoat = clearcoat;
	material.clearcoatRoughness = clearcoatRoughness;
	material.clearcoatF0 = vec3( 0.04 );
	material.clearcoatF90 = 1.0;
	#ifdef USE_CLEARCOATMAP
		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
	#endif
	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
	#endif
	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
	material.clearcoatRoughness += geometryRoughness;
	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_DISPERSION
	material.dispersion = dispersion;
#endif
#ifdef USE_IRIDESCENCE
	material.iridescence = iridescence;
	material.iridescenceIOR = iridescenceIOR;
	#ifdef USE_IRIDESCENCEMAP
		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
	#endif
	#ifdef USE_IRIDESCENCE_THICKNESSMAP
		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
	#else
		material.iridescenceThickness = iridescenceThicknessMaximum;
	#endif
#endif
#ifdef USE_SHEEN
	material.sheenColor = sheenColor;
	#ifdef USE_SHEEN_COLORMAP
		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
	#endif
	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
	#ifdef USE_SHEEN_ROUGHNESSMAP
		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
	#endif
#endif
#ifdef USE_ANISOTROPY
	#ifdef USE_ANISOTROPYMAP
		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
	#else
		vec2 anisotropyV = anisotropyVector;
	#endif
	material.anisotropy = length( anisotropyV );
	if( material.anisotropy == 0.0 ) {
		anisotropyV = vec2( 1.0, 0.0 );
	} else {
		anisotropyV /= material.anisotropy;
		material.anisotropy = saturate( material.anisotropy );
	}
	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
#endif`,zqo=`struct PhysicalMaterial {
	vec3 diffuseColor;
	float roughness;
	vec3 specularColor;
	float specularF90;
	float dispersion;
	#ifdef USE_CLEARCOAT
		float clearcoat;
		float clearcoatRoughness;
		vec3 clearcoatF0;
		float clearcoatF90;
	#endif
	#ifdef USE_IRIDESCENCE
		float iridescence;
		float iridescenceIOR;
		float iridescenceThickness;
		vec3 iridescenceFresnel;
		vec3 iridescenceF0;
	#endif
	#ifdef USE_SHEEN
		vec3 sheenColor;
		float sheenRoughness;
	#endif
	#ifdef IOR
		float ior;
	#endif
	#ifdef USE_TRANSMISSION
		float transmission;
		float transmissionAlpha;
		float thickness;
		float attenuationDistance;
		vec3 attenuationColor;
	#endif
	#ifdef USE_ANISOTROPY
		float anisotropy;
		float alphaT;
		vec3 anisotropyT;
		vec3 anisotropyB;
	#endif
};
vec3 clearcoatSpecularDirect = vec3( 0.0 );
vec3 clearcoatSpecularIndirect = vec3( 0.0 );
vec3 sheenSpecularDirect = vec3( 0.0 );
vec3 sheenSpecularIndirect = vec3(0.0 );
vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
    float x2 = x * x;
    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
}
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
	float a2 = pow2( alpha );
	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
	return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
	float a2 = pow2( alpha );
	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
	return RECIPROCAL_PI * a2 / pow2( denom );
}
#ifdef USE_ANISOTROPY
	float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {
		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
		float v = 0.5 / ( gv + gl );
		return saturate(v);
	}
	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
		float a2 = alphaT * alphaB;
		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
		highp float v2 = dot( v, v );
		float w2 = a2 / v2;
		return RECIPROCAL_PI * a2 * pow2 ( w2 );
	}
#endif
#ifdef USE_CLEARCOAT
	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
		vec3 f0 = material.clearcoatF0;
		float f90 = material.clearcoatF90;
		float roughness = material.clearcoatRoughness;
		float alpha = pow2( roughness );
		vec3 halfDir = normalize( lightDir + viewDir );
		float dotNL = saturate( dot( normal, lightDir ) );
		float dotNV = saturate( dot( normal, viewDir ) );
		float dotNH = saturate( dot( normal, halfDir ) );
		float dotVH = saturate( dot( viewDir, halfDir ) );
		vec3 F = F_Schlick( f0, f90, dotVH );
		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
		float D = D_GGX( alpha, dotNH );
		return F * ( V * D );
	}
#endif
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
	vec3 f0 = material.specularColor;
	float f90 = material.specularF90;
	float roughness = material.roughness;
	float alpha = pow2( roughness );
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( f0, f90, dotVH );
	#ifdef USE_IRIDESCENCE
		F = mix( F, material.iridescenceFresnel, material.iridescence );
	#endif
	#ifdef USE_ANISOTROPY
		float dotTL = dot( material.anisotropyT, lightDir );
		float dotTV = dot( material.anisotropyT, viewDir );
		float dotTH = dot( material.anisotropyT, halfDir );
		float dotBL = dot( material.anisotropyB, lightDir );
		float dotBV = dot( material.anisotropyB, viewDir );
		float dotBH = dot( material.anisotropyB, halfDir );
		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
	#else
		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
		float D = D_GGX( alpha, dotNH );
	#endif
	return F * ( V * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
	const float LUT_SIZE = 64.0;
	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
	const float LUT_BIAS = 0.5 / LUT_SIZE;
	float dotNV = saturate( dot( N, V ) );
	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
	uv = uv * LUT_SCALE + LUT_BIAS;
	return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
	float l = length( f );
	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
	float x = dot( v1, v2 );
	float y = abs( x );
	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
	float b = 3.4175940 + ( 4.1616724 + y ) * y;
	float v = a / b;
	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
	return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
	vec3 lightNormal = cross( v1, v2 );
	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
	vec3 T1, T2;
	T1 = normalize( V - N * dot( V, N ) );
	T2 = - cross( N, T1 );
	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
	vec3 coords[ 4 ];
	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
	coords[ 0 ] = normalize( coords[ 0 ] );
	coords[ 1 ] = normalize( coords[ 1 ] );
	coords[ 2 ] = normalize( coords[ 2 ] );
	coords[ 3 ] = normalize( coords[ 3 ] );
	vec3 vectorFormFactor = vec3( 0.0 );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
	return vec3( result );
}
#if defined( USE_SHEEN )
float D_Charlie( float roughness, float dotNH ) {
	float alpha = pow2( roughness );
	float invAlpha = 1.0 / alpha;
	float cos2h = dotNH * dotNH;
	float sin2h = max( 1.0 - cos2h, 0.0078125 );
	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
}
float V_Neubelt( float dotNV, float dotNL ) {
	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
}
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float D = D_Charlie( sheenRoughness, dotNH );
	float V = V_Neubelt( dotNV, dotNL );
	return sheenColor * ( D * V );
}
#endif
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	float r2 = roughness * roughness;
	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
	return saturate( DG * RECIPROCAL_PI );
}
vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
	vec4 r = roughness * c0 + c1;
	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
	return fab;
}
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	return specularColor * fab.x + specularF90 * fab.y;
}
#ifdef USE_IRIDESCENCE
void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#else
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#endif
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	#ifdef USE_IRIDESCENCE
		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
	#else
		vec3 Fr = specularColor;
	#endif
	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
	float Ess = fab.x + fab.y;
	float Ems = 1.0 - Ess;
	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
	singleScatter += FssEss;
	multiScatter += Fms * Ems;
}
#if NUM_RECT_AREA_LIGHTS > 0
	void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
		vec3 normal = geometryNormal;
		vec3 viewDir = geometryViewDir;
		vec3 position = geometryPosition;
		vec3 lightPos = rectAreaLight.position;
		vec3 halfWidth = rectAreaLight.halfWidth;
		vec3 halfHeight = rectAreaLight.halfHeight;
		vec3 lightColor = rectAreaLight.color;
		float roughness = material.roughness;
		vec3 rectCoords[ 4 ];
		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
		vec2 uv = LTC_Uv( normal, viewDir, roughness );
		vec4 t1 = texture2D( ltc_1, uv );
		vec4 t2 = texture2D( ltc_2, uv );
		mat3 mInv = mat3(
			vec3( t1.x, 0, t1.y ),
			vec3(    0, 1,    0 ),
			vec3( t1.z, 0, t1.w )
		);
		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
	}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	#ifdef USE_CLEARCOAT
		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
		vec3 ccIrradiance = dotNLcc * directLight.color;
		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
	#endif
	#ifdef USE_SHEEN
		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
	#endif
	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
	#ifdef USE_CLEARCOAT
		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
	#endif
	#ifdef USE_SHEEN
		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
	#endif
	vec3 singleScattering = vec3( 0.0 );
	vec3 multiScattering = vec3( 0.0 );
	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
	#ifdef USE_IRIDESCENCE
		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
	#else
		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
	#endif
	vec3 totalScattering = singleScattering + multiScattering;
	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
	reflectedLight.indirectSpecular += radiance * singleScattering;
	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct				RE_Direct_Physical
#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,Jqo=`
vec3 geometryPosition = - vViewPosition;
vec3 geometryNormal = normal;
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
vec3 geometryClearcoatNormal = vec3( 0.0 );
#ifdef USE_CLEARCOAT
	geometryClearcoatNormal = clearcoatNormal;
#endif
#ifdef USE_IRIDESCENCE
	float dotNVi = saturate( dot( normal, geometryViewDir ) );
	if ( material.iridescenceThickness == 0.0 ) {
		material.iridescence = 0.0;
	} else {
		material.iridescence = saturate( material.iridescence );
	}
	if ( material.iridescence > 0.0 ) {
		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
	}
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
	PointLight pointLight;
	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
		pointLight = pointLights[ i ];
		getPointLightInfo( pointLight, geometryPosition, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
		pointLightShadow = pointLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
	SpotLight spotLight;
	vec4 spotColor;
	vec3 spotLightCoord;
	bool inSpotLightMap;
	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
		spotLight = spotLights[ i ];
		getSpotLightInfo( spotLight, geometryPosition, directLight );
		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
		#else
		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
		#endif
		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
		#endif
		#undef SPOT_LIGHT_MAP_INDEX
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		spotLightShadow = spotLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
	DirectionalLight directionalLight;
	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
		directionalLight = directionalLights[ i ];
		getDirectionalLightInfo( directionalLight, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
		directionalLightShadow = directionalLightShadows[ i ];
		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
	RectAreaLight rectAreaLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
		rectAreaLight = rectAreaLights[ i ];
		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
	vec3 iblIrradiance = vec3( 0.0 );
	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
	#if defined( USE_LIGHT_PROBES )
		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
	#endif
	#if ( NUM_HEMI_LIGHTS > 0 )
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
		}
		#pragma unroll_loop_end
	#endif
#endif
#if defined( RE_IndirectSpecular )
	vec3 radiance = vec3( 0.0 );
	vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,Wqo=`#if defined( RE_IndirectDiffuse )
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
		irradiance += lightMapIrradiance;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
		iblIrradiance += getIBLIrradiance( geometryNormal );
	#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
	#ifdef USE_ANISOTROPY
		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
	#else
		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
	#endif
	#ifdef USE_CLEARCOAT
		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
	#endif
#endif`,jqo=`#if defined( RE_IndirectDiffuse )
	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif`,$qo=`#if defined( USE_LOGDEPTHBUF )
	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,qqo=`#if defined( USE_LOGDEPTHBUF )
	uniform float logDepthBufFC;
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,Xqo=`#ifdef USE_LOGDEPTHBUF
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,Zqo=`#ifdef USE_LOGDEPTHBUF
	vFragDepth = 1.0 + gl_Position.w;
	vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
#endif`,eXo=`#ifdef USE_MAP
	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
	#ifdef DECODE_VIDEO_TEXTURE
		sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );
	
	#endif
	diffuseColor *= sampledDiffuseColor;
#endif`,tXo=`#ifdef USE_MAP
	uniform sampler2D map;
#endif`,nXo=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
	#if defined( USE_POINTS_UV )
		vec2 uv = vUv;
	#else
		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
	#endif
#endif
#ifdef USE_MAP
	diffuseColor *= texture2D( map, uv );
#endif
#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,oXo=`#if defined( USE_POINTS_UV )
	varying vec2 vUv;
#else
	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
		uniform mat3 uvTransform;
	#endif
#endif
#ifdef USE_MAP
	uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,iXo=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
	metalnessFactor *= texelMetalness.b;
#endif`,rXo=`#ifdef USE_METALNESSMAP
	uniform sampler2D metalnessMap;
#endif`,sXo=`#ifdef USE_INSTANCING_MORPH
	float morphTargetInfluences[ MORPHTARGETS_COUNT ];
	float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		morphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
	}
#endif`,aXo=`#if defined( USE_MORPHCOLORS )
	vColor *= morphTargetBaseInfluence;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		#if defined( USE_COLOR_ALPHA )
			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
		#elif defined( USE_COLOR )
			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
		#endif
	}
#endif`,AXo=`#ifdef USE_MORPHNORMALS
	objectNormal *= morphTargetBaseInfluence;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
	}
#endif`,cXo=`#ifdef USE_MORPHTARGETS
	#ifndef USE_INSTANCING_MORPH
		uniform float morphTargetBaseInfluence;
		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
	#endif
	uniform sampler2DArray morphTargetsTexture;
	uniform ivec2 morphTargetsTextureSize;
	vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
		int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
		int y = texelIndex / morphTargetsTextureSize.x;
		int x = texelIndex - y * morphTargetsTextureSize.x;
		ivec3 morphUV = ivec3( x, y, morphTargetIndex );
		return texelFetch( morphTargetsTexture, morphUV, 0 );
	}
#endif`,lXo=`#ifdef USE_MORPHTARGETS
	transformed *= morphTargetBaseInfluence;
	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
		if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
	}
#endif`,uXo=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
	vec3 fdx = dFdx( vViewPosition );
	vec3 fdy = dFdy( vViewPosition );
	vec3 normal = normalize( cross( fdx, fdy ) );
#else
	vec3 normal = normalize( vNormal );
	#ifdef DOUBLE_SIDED
		normal *= faceDirection;
	#endif
#endif
#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
	#ifdef USE_TANGENT
		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
	#else
		mat3 tbn = getTangentFrame( - vViewPosition, normal,
		#if defined( USE_NORMALMAP )
			vNormalMapUv
		#elif defined( USE_CLEARCOAT_NORMALMAP )
			vClearcoatNormalMapUv
		#else
			vUv
		#endif
		);
	#endif
	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
		tbn[0] *= faceDirection;
		tbn[1] *= faceDirection;
	#endif
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	#ifdef USE_TANGENT
		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
	#else
		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
	#endif
	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
		tbn2[0] *= faceDirection;
		tbn2[1] *= faceDirection;
	#endif
#endif
vec3 nonPerturbedNormal = normal;`,gXo=`#ifdef USE_NORMALMAP_OBJECTSPACE
	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
	#ifdef FLIP_SIDED
		normal = - normal;
	#endif
	#ifdef DOUBLE_SIDED
		normal = normal * faceDirection;
	#endif
	normal = normalize( normalMatrix * normal );
#elif defined( USE_NORMALMAP_TANGENTSPACE )
	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
	mapN.xy *= normalScale;
	normal = normalize( tbn * mapN );
#elif defined( USE_BUMPMAP )
	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,dXo=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,hXo=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,pXo=`#ifndef FLAT_SHADED
	vNormal = normalize( transformedNormal );
	#ifdef USE_TANGENT
		vTangent = normalize( transformedTangent );
		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
	#endif
#endif`,mXo=`#ifdef USE_NORMALMAP
	uniform sampler2D normalMap;
	uniform vec2 normalScale;
#endif
#ifdef USE_NORMALMAP_OBJECTSPACE
	uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
		vec3 q0 = dFdx( eye_pos.xyz );
		vec3 q1 = dFdy( eye_pos.xyz );
		vec2 st0 = dFdx( uv.st );
		vec2 st1 = dFdy( uv.st );
		vec3 N = surf_norm;
		vec3 q1perp = cross( q1, N );
		vec3 q0perp = cross( N, q0 );
		vec3 T = q1perp * st0.x + q0perp * st1.x;
		vec3 B = q1perp * st0.y + q0perp * st1.y;
		float det = max( dot( T, T ), dot( B, B ) );
		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
		return mat3( T * scale, B * scale, N );
	}
#endif`,_Xo=`#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal = nonPerturbedNormal;
#endif`,fXo=`#ifdef USE_CLEARCOAT_NORMALMAP
	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
	clearcoatMapN.xy *= clearcoatNormalScale;
	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
#endif`,IXo=`#ifdef USE_CLEARCOATMAP
	uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform sampler2D clearcoatNormalMap;
	uniform vec2 clearcoatNormalScale;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform sampler2D clearcoatRoughnessMap;
#endif`,CXo=`#ifdef USE_IRIDESCENCEMAP
	uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	uniform sampler2D iridescenceThicknessMap;
#endif`,yXo=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,xXo=`vec3 packNormalToRGB( const in vec3 normal ) {
	return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
	return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
const float ShiftRight8 = 1. / 256.;
vec4 packDepthToRGBA( const in float v ) {
	vec4 r = vec4( fract( v * PackFactors ), v );
	r.yzw -= r.xyz * ShiftRight8;	return r * PackUpscale;
}
float unpackRGBAToDepth( const in vec4 v ) {
	return dot( v, UnpackFactors );
}
vec2 packDepthToRG( in highp float v ) {
	return packDepthToRGBA( v ).yx;
}
float unpackRGToDepth( const in highp vec2 v ) {
	return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );
}
vec4 pack2HalfToRGBA( vec2 v ) {
	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
}
vec2 unpackRGBATo2Half( vec4 v ) {
	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
	return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
	return depth * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
	return ( near * far ) / ( ( far - near ) * depth - far );
}`,EXo=`#ifdef PREMULTIPLIED_ALPHA
	gl_FragColor.rgb *= gl_FragColor.a;
#endif`,BXo=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
	mvPosition = batchingMatrix * mvPosition;
#endif
#ifdef USE_INSTANCING
	mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,bXo=`#ifdef DITHERING
	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,SXo=`#ifdef DITHERING
	vec3 dithering( vec3 color ) {
		float grid_position = rand( gl_FragCoord.xy );
		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
		return color + dither_shift_RGB;
	}
#endif`,QXo=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
	roughnessFactor *= texelRoughness.g;
#endif`,vXo=`#ifdef USE_ROUGHNESSMAP
	uniform sampler2D roughnessMap;
#endif`,wXo=`#if NUM_SPOT_LIGHT_COORDS > 0
	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#if NUM_SPOT_LIGHT_MAPS > 0
	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
#endif
#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
		return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
	}
	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
		return unpackRGBATo2Half( texture2D( shadow, uv ) );
	}
	float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
		float occlusion = 1.0;
		vec2 distribution = texture2DDistribution( shadow, uv );
		float hard_shadow = step( compare , distribution.x );
		if (hard_shadow != 1.0 ) {
			float distance = compare - distribution.x ;
			float variance = max( 0.00000, distribution.y * distribution.y );
			float softness_probability = variance / (variance + distance * distance );			softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );			occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
		}
		return occlusion;
	}
	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
		float shadow = 1.0;
		shadowCoord.xyz /= shadowCoord.w;
		shadowCoord.z += shadowBias;
		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
		if ( frustumTest ) {
		#if defined( SHADOWMAP_TYPE_PCF )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx0 = - texelSize.x * shadowRadius;
			float dy0 = - texelSize.y * shadowRadius;
			float dx1 = + texelSize.x * shadowRadius;
			float dy1 = + texelSize.y * shadowRadius;
			float dx2 = dx0 / 2.0;
			float dy2 = dy0 / 2.0;
			float dx3 = dx1 / 2.0;
			float dy3 = dy1 / 2.0;
			shadow = (
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
			) * ( 1.0 / 17.0 );
		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx = texelSize.x;
			float dy = texelSize.y;
			vec2 uv = shadowCoord.xy;
			vec2 f = fract( uv * shadowMapSize + 0.5 );
			uv -= f * texelSize;
			shadow = (
				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
						  f.x ),
					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
						  f.x ),
					 f.y )
			) * ( 1.0 / 9.0 );
		#elif defined( SHADOWMAP_TYPE_VSM )
			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
		#else
			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
		#endif
		}
		return shadow;
	}
	vec2 cubeToUV( vec3 v, float texelSizeY ) {
		vec3 absV = abs( v );
		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
		absV *= scaleToCube;
		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
		vec2 planar = v.xy;
		float almostATexel = 1.5 * texelSizeY;
		float almostOne = 1.0 - almostATexel;
		if ( absV.z >= almostOne ) {
			if ( v.z > 0.0 )
				planar.x = 4.0 - v.x;
		} else if ( absV.x >= almostOne ) {
			float signX = sign( v.x );
			planar.x = v.z * signX + 2.0 * signX;
		} else if ( absV.y >= almostOne ) {
			float signY = sign( v.y );
			planar.x = v.x + 2.0 * signY + 2.0;
			planar.y = v.z * signY - 2.0;
		}
		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
	}
	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
		float shadow = 1.0;
		vec3 lightToPosition = shadowCoord.xyz;
		
		float lightToPositionLength = length( lightToPosition );
		if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
			float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );			dp += shadowBias;
			vec3 bd3D = normalize( lightToPosition );
			vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
			#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
				vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
				shadow = (
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
				) * ( 1.0 / 9.0 );
			#else
				shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
			#endif
		}
		return shadow;
	}
#endif`,PXo=`#if NUM_SPOT_LIGHT_COORDS > 0
	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
#endif`,MXo=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
	vec4 shadowWorldPosition;
#endif
#if defined( USE_SHADOWMAP )
	#if NUM_DIR_LIGHT_SHADOWS > 0
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
		}
		#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
		}
		#pragma unroll_loop_end
	#endif
#endif
#if NUM_SPOT_LIGHT_COORDS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
		shadowWorldPosition = worldPosition;
		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
		#endif
		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
#endif`,DXo=`float getShadowMask() {
	float shadow = 1.0;
	#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
		directionalLight = directionalLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
		spotLight = spotLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
		pointLight = pointLightShadows[ i ];
		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#endif
	return shadow;
}`,NXo=`#ifdef USE_SKINNING
	mat4 boneMatX = getBoneMatrix( skinIndex.x );
	mat4 boneMatY = getBoneMatrix( skinIndex.y );
	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
	mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,RXo=`#ifdef USE_SKINNING
	uniform mat4 bindMatrix;
	uniform mat4 bindMatrixInverse;
	uniform highp sampler2D boneTexture;
	mat4 getBoneMatrix( const in float i ) {
		int size = textureSize( boneTexture, 0 ).x;
		int j = int( i ) * 4;
		int x = j % size;
		int y = j / size;
		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
		return mat4( v1, v2, v3, v4 );
	}
#endif`,TXo=`#ifdef USE_SKINNING
	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
	vec4 skinned = vec4( 0.0 );
	skinned += boneMatX * skinVertex * skinWeight.x;
	skinned += boneMatY * skinVertex * skinWeight.y;
	skinned += boneMatZ * skinVertex * skinWeight.z;
	skinned += boneMatW * skinVertex * skinWeight.w;
	transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,kXo=`#ifdef USE_SKINNING
	mat4 skinMatrix = mat4( 0.0 );
	skinMatrix += skinWeight.x * boneMatX;
	skinMatrix += skinWeight.y * boneMatY;
	skinMatrix += skinWeight.z * boneMatZ;
	skinMatrix += skinWeight.w * boneMatW;
	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
	#ifdef USE_TANGENT
		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
	#endif
#endif`,FXo=`float specularStrength;
#ifdef USE_SPECULARMAP
	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
	specularStrength = texelSpecular.r;
#else
	specularStrength = 1.0;
#endif`,LXo=`#ifdef USE_SPECULARMAP
	uniform sampler2D specularMap;
#endif`,HXo=`#if defined( TONE_MAPPING )
	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,OXo=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
	return saturate( toneMappingExposure * color );
}
vec3 ReinhardToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 OptimizedCineonToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	color = max( vec3( 0.0 ), color - 0.004 );
	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
	return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
	const mat3 ACESInputMat = mat3(
		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
		vec3( 0.04823, 0.01566, 0.83777 )
	);
	const mat3 ACESOutputMat = mat3(
		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
		vec3( -0.07367, -0.00605,  1.07602 )
	);
	color *= toneMappingExposure / 0.6;
	color = ACESInputMat * color;
	color = RRTAndODTFit( color );
	color = ACESOutputMat * color;
	return saturate( color );
}
const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
	vec3( 1.6605, - 0.1246, - 0.0182 ),
	vec3( - 0.5876, 1.1329, - 0.1006 ),
	vec3( - 0.0728, - 0.0083, 1.1187 )
);
const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
	vec3( 0.6274, 0.0691, 0.0164 ),
	vec3( 0.3293, 0.9195, 0.0880 ),
	vec3( 0.0433, 0.0113, 0.8956 )
);
vec3 agxDefaultContrastApprox( vec3 x ) {
	vec3 x2 = x * x;
	vec3 x4 = x2 * x2;
	return + 15.5 * x4 * x2
		- 40.14 * x4 * x
		+ 31.96 * x4
		- 6.868 * x2 * x
		+ 0.4298 * x2
		+ 0.1191 * x
		- 0.00232;
}
vec3 AgXToneMapping( vec3 color ) {
	const mat3 AgXInsetMatrix = mat3(
		vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
		vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
		vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
	);
	const mat3 AgXOutsetMatrix = mat3(
		vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
		vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
		vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
	);
	const float AgxMinEv = - 12.47393;	const float AgxMaxEv = 4.026069;
	color *= toneMappingExposure;
	color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
	color = AgXInsetMatrix * color;
	color = max( color, 1e-10 );	color = log2( color );
	color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
	color = clamp( color, 0.0, 1.0 );
	color = agxDefaultContrastApprox( color );
	color = AgXOutsetMatrix * color;
	color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
	color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
	color = clamp( color, 0.0, 1.0 );
	return color;
}
vec3 NeutralToneMapping( vec3 color ) {
	const float StartCompression = 0.8 - 0.04;
	const float Desaturation = 0.15;
	color *= toneMappingExposure;
	float x = min( color.r, min( color.g, color.b ) );
	float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
	color -= offset;
	float peak = max( color.r, max( color.g, color.b ) );
	if ( peak < StartCompression ) return color;
	float d = 1. - StartCompression;
	float newPeak = 1. - d * d / ( peak + d - StartCompression );
	color *= newPeak / peak;
	float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
	return mix( color, vec3( newPeak ), g );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,GXo=`#ifdef USE_TRANSMISSION
	material.transmission = transmission;
	material.transmissionAlpha = 1.0;
	material.thickness = thickness;
	material.attenuationDistance = attenuationDistance;
	material.attenuationColor = attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
	#endif
	#ifdef USE_THICKNESSMAP
		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
	#endif
	vec3 pos = vWorldPosition;
	vec3 v = normalize( cameraPosition - pos );
	vec3 n = inverseTransformDirection( normal, viewMatrix );
	vec4 transmitted = getIBLVolumeRefraction(
		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
		pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
		material.attenuationColor, material.attenuationDistance );
	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
#endif`,YXo=`#ifdef USE_TRANSMISSION
	uniform float transmission;
	uniform float thickness;
	uniform float attenuationDistance;
	uniform vec3 attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		uniform sampler2D transmissionMap;
	#endif
	#ifdef USE_THICKNESSMAP
		uniform sampler2D thicknessMap;
	#endif
	uniform vec2 transmissionSamplerSize;
	uniform sampler2D transmissionSamplerMap;
	uniform mat4 modelMatrix;
	uniform mat4 projectionMatrix;
	varying vec3 vWorldPosition;
	float w0( float a ) {
		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
	}
	float w1( float a ) {
		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
	}
	float w2( float a ){
		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
	}
	float w3( float a ) {
		return ( 1.0 / 6.0 ) * ( a * a * a );
	}
	float g0( float a ) {
		return w0( a ) + w1( a );
	}
	float g1( float a ) {
		return w2( a ) + w3( a );
	}
	float h0( float a ) {
		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
	}
	float h1( float a ) {
		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
	}
	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
		uv = uv * texelSize.zw + 0.5;
		vec2 iuv = floor( uv );
		vec2 fuv = fract( uv );
		float g0x = g0( fuv.x );
		float g1x = g1( fuv.x );
		float h0x = h0( fuv.x );
		float h1x = h1( fuv.x );
		float h0y = h0( fuv.y );
		float h1y = h1( fuv.y );
		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
	}
	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
		vec2 fLodSizeInv = 1.0 / fLodSize;
		vec2 cLodSizeInv = 1.0 / cLodSize;
		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
		return mix( fSample, cSample, fract( lod ) );
	}
	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
		vec3 modelScale;
		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
		return normalize( refractionVector ) * thickness * modelScale;
	}
	float applyIorToRoughness( const in float roughness, const in float ior ) {
		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
	}
	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
	}
	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
		if ( isinf( attenuationDistance ) ) {
			return vec3( 1.0 );
		} else {
			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
		}
	}
	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
		const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
		const in vec3 attenuationColor, const in float attenuationDistance ) {
		vec4 transmittedLight;
		vec3 transmittance;
		#ifdef USE_DISPERSION
			float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
			vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
			for ( int i = 0; i < 3; i ++ ) {
				vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
				vec3 refractedRayExit = position + transmissionRay;
		
				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
				vec2 refractionCoords = ndcPos.xy / ndcPos.w;
				refractionCoords += 1.0;
				refractionCoords /= 2.0;
		
				vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
				transmittedLight[ i ] = transmissionSample[ i ];
				transmittedLight.a += transmissionSample.a;
				transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
			}
			transmittedLight.a /= 3.0;
		
		#else
		
			vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
			vec3 refractedRayExit = position + transmissionRay;
			vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
			vec2 refractionCoords = ndcPos.xy / ndcPos.w;
			refractionCoords += 1.0;
			refractionCoords /= 2.0;
			transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
			transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
		
		#endif
		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
	}
#endif`,UXo=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	varying vec2 vUv;
#endif
#ifdef USE_MAP
	varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
	varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
	varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
	varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
	varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
	varying vec2 vNormalMapUv;
#endif
#ifdef USE_EMISSIVEMAP
	varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
	varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
	varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
	varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
	varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
	varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
	varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_SPECULARMAP
	varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
	varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
	uniform mat3 transmissionMapTransform;
	varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
	uniform mat3 thicknessMapTransform;
	varying vec2 vThicknessMapUv;
#endif`,KXo=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	varying vec2 vUv;
#endif
#ifdef USE_MAP
	uniform mat3 mapTransform;
	varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
	uniform mat3 alphaMapTransform;
	varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
	uniform mat3 lightMapTransform;
	varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
	uniform mat3 aoMapTransform;
	varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
	uniform mat3 bumpMapTransform;
	varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
	uniform mat3 normalMapTransform;
	varying vec2 vNormalMapUv;
#endif
#ifdef USE_DISPLACEMENTMAP
	uniform mat3 displacementMapTransform;
	varying vec2 vDisplacementMapUv;
#endif
#ifdef USE_EMISSIVEMAP
	uniform mat3 emissiveMapTransform;
	varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
	uniform mat3 metalnessMapTransform;
	varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
	uniform mat3 roughnessMapTransform;
	varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
	uniform mat3 anisotropyMapTransform;
	varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
	uniform mat3 clearcoatMapTransform;
	varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform mat3 clearcoatNormalMapTransform;
	varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform mat3 clearcoatRoughnessMapTransform;
	varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
	uniform mat3 sheenColorMapTransform;
	varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	uniform mat3 sheenRoughnessMapTransform;
	varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
	uniform mat3 iridescenceMapTransform;
	varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	uniform mat3 iridescenceThicknessMapTransform;
	varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SPECULARMAP
	uniform mat3 specularMapTransform;
	varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
	uniform mat3 specularColorMapTransform;
	varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	uniform mat3 specularIntensityMapTransform;
	varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
	uniform mat3 transmissionMapTransform;
	varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
	uniform mat3 thicknessMapTransform;
	varying vec2 vThicknessMapUv;
#endif`,VXo=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
	vUv = vec3( uv, 1 ).xy;
#endif
#ifdef USE_MAP
	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ALPHAMAP
	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_LIGHTMAP
	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_AOMAP
	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_BUMPMAP
	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_NORMALMAP
	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_DISPLACEMENTMAP
	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_EMISSIVEMAP
	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_METALNESSMAP
	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ROUGHNESSMAP
	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ANISOTROPYMAP
	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOATMAP
	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCEMAP
	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_COLORMAP
	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULARMAP
	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_COLORMAP
	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_TRANSMISSIONMAP
	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_THICKNESSMAP
	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
#endif`,zXo=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
	vec4 worldPosition = vec4( transformed, 1.0 );
	#ifdef USE_BATCHING
		worldPosition = batchingMatrix * worldPosition;
	#endif
	#ifdef USE_INSTANCING
		worldPosition = instanceMatrix * worldPosition;
	#endif
	worldPosition = modelMatrix * worldPosition;
#endif`;const OA={alphahash_fragment:W$o,alphahash_pars_fragment:j$o,alphamap_fragment:$$o,alphamap_pars_fragment:q$o,alphatest_fragment:X$o,alphatest_pars_fragment:Z$o,aomap_fragment:eqo,aomap_pars_fragment:tqo,batching_pars_vertex:nqo,batching_vertex:oqo,begin_vertex:iqo,beginnormal_vertex:rqo,bsdfs:sqo,iridescence_fragment:aqo,bumpmap_pars_fragment:Aqo,clipping_planes_fragment:cqo,clipping_planes_pars_fragment:lqo,clipping_planes_pars_vertex:uqo,clipping_planes_vertex:gqo,color_fragment:dqo,color_pars_fragment:hqo,color_pars_vertex:pqo,color_vertex:mqo,common:_qo,cube_uv_reflection_fragment:fqo,defaultnormal_vertex:Iqo,displacementmap_pars_vertex:Cqo,displacementmap_vertex:yqo,emissivemap_fragment:xqo,emissivemap_pars_fragment:Eqo,colorspace_fragment:Bqo,colorspace_pars_fragment:bqo,envmap_fragment:Sqo,envmap_common_pars_fragment:Qqo,envmap_pars_fragment:vqo,envmap_pars_vertex:wqo,envmap_physical_pars_fragment:Oqo,envmap_vertex:Pqo,fog_vertex:Mqo,fog_pars_vertex:Dqo,fog_fragment:Nqo,fog_pars_fragment:Rqo,gradientmap_pars_fragment:Tqo,lightmap_pars_fragment:kqo,lights_lambert_fragment:Fqo,lights_lambert_pars_fragment:Lqo,lights_pars_begin:Hqo,lights_toon_fragment:Gqo,lights_toon_pars_fragment:Yqo,lights_phong_fragment:Uqo,lights_phong_pars_fragment:Kqo,lights_physical_fragment:Vqo,lights_physical_pars_fragment:zqo,lights_fragment_begin:Jqo,lights_fragment_maps:Wqo,lights_fragment_end:jqo,logdepthbuf_fragment:$qo,logdepthbuf_pars_fragment:qqo,logdepthbuf_pars_vertex:Xqo,logdepthbuf_vertex:Zqo,map_fragment:eXo,map_pars_fragment:tXo,map_particle_fragment:nXo,map_particle_pars_fragment:oXo,metalnessmap_fragment:iXo,metalnessmap_pars_fragment:rXo,morphinstance_vertex:sXo,morphcolor_vertex:aXo,morphnormal_vertex:AXo,morphtarget_pars_vertex:cXo,morphtarget_vertex:lXo,normal_fragment_begin:uXo,normal_fragment_maps:gXo,normal_pars_fragment:dXo,normal_pars_vertex:hXo,normal_vertex:pXo,normalmap_pars_fragment:mXo,clearcoat_normal_fragment_begin:_Xo,clearcoat_normal_fragment_maps:fXo,clearcoat_pars_fragment:IXo,iridescence_pars_fragment:CXo,opaque_fragment:yXo,packing:xXo,premultiplied_alpha_fragment:EXo,project_vertex:BXo,dithering_fragment:bXo,dithering_pars_fragment:SXo,roughnessmap_fragment:QXo,roughnessmap_pars_fragment:vXo,shadowmap_pars_fragment:wXo,shadowmap_pars_vertex:PXo,shadowmap_vertex:MXo,shadowmask_pars_fragment:DXo,skinbase_vertex:NXo,skinning_pars_vertex:RXo,skinning_vertex:TXo,skinnormal_vertex:kXo,specularmap_fragment:FXo,specularmap_pars_fragment:LXo,tonemapping_fragment:HXo,tonemapping_pars_fragment:OXo,transmission_fragment:GXo,transmission_pars_fragment:YXo,uv_pars_fragment:UXo,uv_pars_vertex:KXo,uv_vertex:VXo,worldpos_vertex:zXo,background_vert:`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,background_frag:`uniform sampler2D t2D;
uniform float backgroundIntensity;
varying vec2 vUv;
void main() {
	vec4 texColor = texture2D( t2D, vUv );
	#ifdef DECODE_VIDEO_TEXTURE
		texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
	#endif
	texColor.rgb *= backgroundIntensity;
	gl_FragColor = texColor;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,backgroundCube_vert:`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,backgroundCube_frag:`#ifdef ENVMAP_TYPE_CUBE
	uniform samplerCube envMap;
#elif defined( ENVMAP_TYPE_CUBE_UV )
	uniform sampler2D envMap;
#endif
uniform float flipEnvMap;
uniform float backgroundBlurriness;
uniform float backgroundIntensity;
uniform mat3 backgroundRotation;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
	#ifdef ENVMAP_TYPE_CUBE
		vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
	#elif defined( ENVMAP_TYPE_CUBE_UV )
		vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
	#else
		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
	#endif
	texColor.rgb *= backgroundIntensity;
	gl_FragColor = texColor;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,cube_vert:`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,cube_frag:`uniform samplerCube tCube;
uniform float tFlip;
uniform float opacity;
varying vec3 vWorldDirection;
void main() {
	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
	gl_FragColor = texColor;
	gl_FragColor.a *= opacity;
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,depth_vert:`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <skinbase_vertex>
	#include <morphinstance_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vHighPrecisionZW = gl_Position.zw;
}`,depth_frag:`#if DEPTH_PACKING == 3200
	uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
	vec4 diffuseColor = vec4( 1.0 );
	#include <clipping_planes_fragment>
	#if DEPTH_PACKING == 3200
		diffuseColor.a = opacity;
	#endif
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <logdepthbuf_fragment>
	float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
	#if DEPTH_PACKING == 3200
		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
	#elif DEPTH_PACKING == 3201
		gl_FragColor = packDepthToRGBA( fragCoordZ );
	#endif
}`,distanceRGBA_vert:`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <skinbase_vertex>
	#include <morphinstance_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <worldpos_vertex>
	#include <clipping_planes_vertex>
	vWorldPosition = worldPosition.xyz;
}`,distanceRGBA_frag:`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
	vec4 diffuseColor = vec4( 1.0 );
	#include <clipping_planes_fragment>
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	float dist = length( vWorldPosition - referencePosition );
	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
	dist = saturate( dist );
	gl_FragColor = packDepthToRGBA( dist );
}`,equirect_vert:`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
}`,equirect_frag:`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
	vec3 direction = normalize( vWorldDirection );
	vec2 sampleUV = equirectUv( direction );
	gl_FragColor = texture2D( tEquirect, sampleUV );
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
}`,linedashed_vert:`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	vLineDistance = scale * lineDistance;
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,linedashed_frag:`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	if ( mod( vLineDistance, totalSize ) > dashSize ) {
		discard;
	}
	vec3 outgoingLight = vec3( 0.0 );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,meshbasic_vert:`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinbase_vertex>
		#include <skinnormal_vertex>
		#include <defaultnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <fog_vertex>
}`,meshbasic_frag:`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
	varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
	#else
		reflectedLight.indirectDiffuse += vec3( 1.0 );
	#endif
	#include <aomap_fragment>
	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
	vec3 outgoingLight = reflectedLight.indirectDiffuse;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,meshlambert_vert:`#define LAMBERT
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,meshlambert_frag:`#define LAMBERT
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_lambert_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_lambert_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,meshmatcap_vert:`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
	vViewPosition = - mvPosition.xyz;
}`,meshmatcap_frag:`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	vec3 viewDir = normalize( vViewPosition );
	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
	vec3 y = cross( viewDir, x );
	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
	#ifdef USE_MATCAP
		vec4 matcapColor = texture2D( matcap, uv );
	#else
		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
	#endif
	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,meshnormal_vert:`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	varying vec3 vViewPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphinstance_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	vViewPosition = - mvPosition.xyz;
#endif
}`,meshnormal_frag:`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
	varying vec3 vViewPosition;
#endif
#include <packing>
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
	#ifdef OPAQUE
		gl_FragColor.a = 1.0;
	#endif
}`,meshphong_vert:`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphinstance_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,meshphong_frag:`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_phong_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,meshphysical_vert:`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
	varying vec3 vWorldPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
#ifdef USE_TRANSMISSION
	vWorldPosition = worldPosition.xyz;
#endif
}`,meshphysical_frag:`#define STANDARD
#ifdef PHYSICAL
	#define IOR
	#define USE_SPECULAR
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef IOR
	uniform float ior;
#endif
#ifdef USE_SPECULAR
	uniform float specularIntensity;
	uniform vec3 specularColor;
	#ifdef USE_SPECULAR_COLORMAP
		uniform sampler2D specularColorMap;
	#endif
	#ifdef USE_SPECULAR_INTENSITYMAP
		uniform sampler2D specularIntensityMap;
	#endif
#endif
#ifdef USE_CLEARCOAT
	uniform float clearcoat;
	uniform float clearcoatRoughness;
#endif
#ifdef USE_DISPERSION
	uniform float dispersion;
#endif
#ifdef USE_IRIDESCENCE
	uniform float iridescence;
	uniform float iridescenceIOR;
	uniform float iridescenceThicknessMinimum;
	uniform float iridescenceThicknessMaximum;
#endif
#ifdef USE_SHEEN
	uniform vec3 sheenColor;
	uniform float sheenRoughness;
	#ifdef USE_SHEEN_COLORMAP
		uniform sampler2D sheenColorMap;
	#endif
	#ifdef USE_SHEEN_ROUGHNESSMAP
		uniform sampler2D sheenRoughnessMap;
	#endif
#endif
#ifdef USE_ANISOTROPY
	uniform vec2 anisotropyVector;
	#ifdef USE_ANISOTROPYMAP
		uniform sampler2D anisotropyMap;
	#endif
#endif
varying vec3 vViewPosition;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <iridescence_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_physical_pars_fragment>
#include <transmission_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <iridescence_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <roughnessmap_fragment>
	#include <metalnessmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <clearcoat_normal_fragment_begin>
	#include <clearcoat_normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_physical_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
	#include <transmission_fragment>
	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
	#ifdef USE_SHEEN
		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
	#endif
	#ifdef USE_CLEARCOAT
		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
	#endif
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,meshtoon_vert:`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,meshtoon_frag:`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_toon_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,points_vert:`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
#ifdef USE_POINTS_UV
	varying vec2 vUv;
	uniform mat3 uvTransform;
#endif
void main() {
	#ifdef USE_POINTS_UV
		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	#endif
	#include <color_vertex>
	#include <morphinstance_vertex>
	#include <morphcolor_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	gl_PointSize = size;
	#ifdef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
	#endif
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <fog_vertex>
}`,points_frag:`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	#include <logdepthbuf_fragment>
	#include <map_particle_fragment>
	#include <color_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,shadow_vert:`#include <common>
#include <batching_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
	#include <batching_vertex>
	#include <beginnormal_vertex>
	#include <morphinstance_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,shadow_frag:`uniform vec3 color;
uniform float opacity;
#include <common>
#include <packing>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <logdepthbuf_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
	#include <logdepthbuf_fragment>
	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
}`,sprite_vert:`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
	vec2 scale;
	scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
	scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
	#ifndef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) scale *= - mvPosition.z;
	#endif
	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
	vec2 rotatedPosition;
	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
	mvPosition.xy += rotatedPosition;
	gl_Position = projectionMatrix * mvPosition;
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,sprite_frag:`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <alphahash_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <opaque_fragment>
	#include <tonemapping_fragment>
	#include <colorspace_fragment>
	#include <fog_fragment>
}`},or={common:{diffuse:{value:new Vi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new HA},alphaMap:{value:null},alphaMapTransform:{value:new HA},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new HA}},envmap:{envMap:{value:null},envMapRotation:{value:new HA},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new HA}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new HA}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new HA},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new HA},normalScale:{value:new ni(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new HA},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new HA}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new HA}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new HA}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Vi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Vi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new HA},alphaTest:{value:0},uvTransform:{value:new HA}},sprite:{diffuse:{value:new Vi(16777215)},opacity:{value:1},center:{value:new ni(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new HA},alphaMap:{value:null},alphaMapTransform:{value:new HA},alphaTest:{value:0}}},I6={basic:{uniforms:n2([or.common,or.specularmap,or.envmap,or.aomap,or.lightmap,or.fog]),vertexShader:OA.meshbasic_vert,fragmentShader:OA.meshbasic_frag},lambert:{uniforms:n2([or.common,or.specularmap,or.envmap,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.fog,or.lights,{emissive:{value:new Vi(0)}}]),vertexShader:OA.meshlambert_vert,fragmentShader:OA.meshlambert_frag},phong:{uniforms:n2([or.common,or.specularmap,or.envmap,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.fog,or.lights,{emissive:{value:new Vi(0)},specular:{value:new Vi(1118481)},shininess:{value:30}}]),vertexShader:OA.meshphong_vert,fragmentShader:OA.meshphong_frag},standard:{uniforms:n2([or.common,or.envmap,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.roughnessmap,or.metalnessmap,or.fog,or.lights,{emissive:{value:new Vi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:OA.meshphysical_vert,fragmentShader:OA.meshphysical_frag},toon:{uniforms:n2([or.common,or.aomap,or.lightmap,or.emissivemap,or.bumpmap,or.normalmap,or.displacementmap,or.gradientmap,or.fog,or.lights,{emissive:{value:new Vi(0)}}]),vertexShader:OA.meshtoon_vert,fragmentShader:OA.meshtoon_frag},matcap:{uniforms:n2([or.common,or.bumpmap,or.normalmap,or.displacementmap,or.fog,{matcap:{value:null}}]),vertexShader:OA.meshmatcap_vert,fragmentShader:OA.meshmatcap_frag},points:{uniforms:n2([or.points,or.fog]),vertexShader:OA.points_vert,fragmentShader:OA.points_frag},dashed:{uniforms:n2([or.common,or.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:OA.linedashed_vert,fragmentShader:OA.linedashed_frag},depth:{uniforms:n2([or.common,or.displacementmap]),vertexShader:OA.depth_vert,fragmentShader:OA.depth_frag},normal:{uniforms:n2([or.common,or.bumpmap,or.normalmap,or.displacementmap,{opacity:{value:1}}]),vertexShader:OA.meshnormal_vert,fragmentShader:OA.meshnormal_frag},sprite:{uniforms:n2([or.sprite,or.fog]),vertexShader:OA.sprite_vert,fragmentShader:OA.sprite_frag},background:{uniforms:{uvTransform:{value:new HA},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:OA.background_vert,fragmentShader:OA.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new HA}},vertexShader:OA.backgroundCube_vert,fragmentShader:OA.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:OA.cube_vert,fragmentShader:OA.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:OA.equirect_vert,fragmentShader:OA.equirect_frag},distanceRGBA:{uniforms:n2([or.common,or.displacementmap,{referencePosition:{value:new jt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:OA.distanceRGBA_vert,fragmentShader:OA.distanceRGBA_frag},shadow:{uniforms:n2([or.lights,or.fog,{color:{value:new Vi(0)},opacity:{value:1}}]),vertexShader:OA.shadow_vert,fragmentShader:OA.shadow_frag}};I6.physical={uniforms:n2([I6.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new HA},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new HA},clearcoatNormalScale:{value:new ni(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new HA},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new HA},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new HA},sheen:{value:0},sheenColor:{value:new Vi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new HA},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new HA},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new HA},transmissionSamplerSize:{value:new ni},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new HA},attenuationDistance:{value:0},attenuationColor:{value:new Vi(0)},specularColor:{value:new Vi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new HA},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new HA},anisotropyVector:{value:new ni},anisotropyMap:{value:null},anisotropyMapTransform:{value:new HA}}]),vertexShader:OA.meshphysical_vert,fragmentShader:OA.meshphysical_frag};const zde={r:0,b:0,g:0},OR=new t2,JXo=new va;function WXo(t,e,n,o,i,r,s){const a=new Vi(0);let A=r===!0?0:1,c,l,u=null,g=0,h=null;function d(f){let I=f.isScene===!0?f.background:null;return I&&I.isTexture&&(I=(f.backgroundBlurriness>0?n:e).get(I)),I}function p(f){let I=!1;const C=d(f);C===null?_(a,A):C&&C.isColor&&(_(C,1),I=!0);const y=t.xr.getEnvironmentBlendMode();y==="additive"?o.buffers.color.setClear(0,0,0,1,s):y==="alpha-blend"&&o.buffers.color.setClear(0,0,0,0,s),(t.autoClear||I)&&(o.buffers.depth.setTest(!0),o.buffers.depth.setMask(!0),o.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function m(f,I){const C=d(I);C&&(C.isCubeTexture||C.mapping===Ide)?(l===void 0&&(l=new Er(new Yx(1,1,1),new f6({name:"BackgroundCubeMaterial",uniforms:nY(I6.backgroundCube.uniforms),vertexShader:I6.backgroundCube.vertexShader,fragmentShader:I6.backgroundCube.fragmentShader,side:uI,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(y,x,E){this.matrixWorld.copyPosition(E.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),OR.copy(I.backgroundRotation),OR.x*=-1,OR.y*=-1,OR.z*=-1,C.isCubeTexture&&C.isRenderTargetTexture===!1&&(OR.y*=-1,OR.z*=-1),l.material.uniforms.envMap.value=C,l.material.uniforms.flipEnvMap.value=C.isCubeTexture&&C.isRenderTargetTexture===!1?-1:1,l.material.uniforms.backgroundBlurriness.value=I.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=I.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(JXo.makeRotationFromEuler(OR)),l.material.toneMapped=iu.getTransfer(C.colorSpace)!==Ed,(u!==C||g!==C.version||h!==t.toneMapping)&&(l.material.needsUpdate=!0,u=C,g=C.version,h=t.toneMapping),l.layers.enableAll(),f.unshift(l,l.geometry,l.material,0,0,null)):C&&C.isTexture&&(c===void 0&&(c=new Er(new VB(2,2),new f6({name:"BackgroundMaterial",uniforms:nY(I6.background.uniforms),vertexShader:I6.background.vertexShader,fragmentShader:I6.background.fragmentShader,side:mE,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=C,c.material.uniforms.backgroundIntensity.value=I.backgroundIntensity,c.material.toneMapped=iu.getTransfer(C.colorSpace)!==Ed,C.matrixAutoUpdate===!0&&C.updateMatrix(),c.material.uniforms.uvTransform.value.copy(C.matrix),(u!==C||g!==C.version||h!==t.toneMapping)&&(c.material.needsUpdate=!0,u=C,g=C.version,h=t.toneMapping),c.layers.enableAll(),f.unshift(c,c.geometry,c.material,0,0,null))}function _(f,I){f.getRGB(zde,UVt(t)),o.buffers.color.setClear(zde.r,zde.g,zde.b,I,s)}return{getClearColor:function(){return a},setClearColor:function(f,I=1){a.set(f),A=I,_(a,A)},getClearAlpha:function(){return A},setClearAlpha:function(f){A=f,_(a,A)},render:p,addToRenderList:m}}function jXo(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),o={},i=g(null);let r=i,s=!1;function a(Q,w,M,k,R){let F=!1;const O=u(k,M,w);r!==O&&(r=O,c(r.object)),F=h(Q,k,M,R),F&&d(Q,k,M,R),R!==null&&e.update(R,t.ELEMENT_ARRAY_BUFFER),(F||s)&&(s=!1,C(Q,w,M,k),R!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(R).buffer))}function A(){return t.createVertexArray()}function c(Q){return t.bindVertexArray(Q)}function l(Q){return t.deleteVertexArray(Q)}function u(Q,w,M){const k=M.wireframe===!0;let R=o[Q.id];R===void 0&&(R={},o[Q.id]=R);let F=R[w.id];F===void 0&&(F={},R[w.id]=F);let O=F[k];return O===void 0&&(O=g(A()),F[k]=O),O}function g(Q){const w=[],M=[],k=[];for(let R=0;R<n;R++)w[R]=0,M[R]=0,k[R]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:w,enabledAttributes:M,attributeDivisors:k,object:Q,attributes:{},index:null}}function h(Q,w,M,k){const R=r.attributes,F=w.attributes;let O=0;const U=M.getAttributes();for(const Y in U)if(U[Y].location>=0){const te=R[Y];let j=F[Y];if(j===void 0&&(Y==="instanceMatrix"&&Q.instanceMatrix&&(j=Q.instanceMatrix),Y==="instanceColor"&&Q.instanceColor&&(j=Q.instanceColor)),te===void 0||te.attribute!==j||j&&te.data!==j.data)return!0;O++}return r.attributesNum!==O||r.index!==k}function d(Q,w,M,k){const R={},F=w.attributes;let O=0;const U=M.getAttributes();for(const Y in U)if(U[Y].location>=0){let te=F[Y];te===void 0&&(Y==="instanceMatrix"&&Q.instanceMatrix&&(te=Q.instanceMatrix),Y==="instanceColor"&&Q.instanceColor&&(te=Q.instanceColor));const j={};j.attribute=te,te&&te.data&&(j.data=te.data),R[Y]=j,O++}r.attributes=R,r.attributesNum=O,r.index=k}function p(){const Q=r.newAttributes;for(let w=0,M=Q.length;w<M;w++)Q[w]=0}function m(Q){_(Q,0)}function _(Q,w){const M=r.newAttributes,k=r.enabledAttributes,R=r.attributeDivisors;M[Q]=1,k[Q]===0&&(t.enableVertexAttribArray(Q),k[Q]=1),R[Q]!==w&&(t.vertexAttribDivisor(Q,w),R[Q]=w)}function f(){const Q=r.newAttributes,w=r.enabledAttributes;for(let M=0,k=w.length;M<k;M++)w[M]!==Q[M]&&(t.disableVertexAttribArray(M),w[M]=0)}function I(Q,w,M,k,R,F,O){O===!0?t.vertexAttribIPointer(Q,w,M,R,F):t.vertexAttribPointer(Q,w,M,k,R,F)}function C(Q,w,M,k){p();const R=k.attributes,F=M.getAttributes(),O=w.defaultAttributeValues;for(const U in F){const Y=F[U];if(Y.location>=0){let W=R[U];if(W===void 0&&(U==="instanceMatrix"&&Q.instanceMatrix&&(W=Q.instanceMatrix),U==="instanceColor"&&Q.instanceColor&&(W=Q.instanceColor)),W!==void 0){const te=W.normalized,j=W.itemSize,J=e.get(W);if(J===void 0)continue;const oe=J.buffer,ie=J.type,ne=J.bytesPerElement,le=ie===t.INT||ie===t.UNSIGNED_INT||W.gpuType===NKt;if(W.isInterleavedBufferAttribute){const ge=W.data,_e=ge.stride,ue=W.offset;if(ge.isInstancedInterleavedBuffer){for(let fe=0;fe<Y.locationSize;fe++)_(Y.location+fe,ge.meshPerAttribute);Q.isInstancedMesh!==!0&&k._maxInstanceCount===void 0&&(k._maxInstanceCount=ge.meshPerAttribute*ge.count)}else for(let fe=0;fe<Y.locationSize;fe++)m(Y.location+fe);t.bindBuffer(t.ARRAY_BUFFER,oe);for(let fe=0;fe<Y.locationSize;fe++)I(Y.location+fe,j/Y.locationSize,ie,te,_e*ne,(ue+j/Y.locationSize*fe)*ne,le)}else{if(W.isInstancedBufferAttribute){for(let ge=0;ge<Y.locationSize;ge++)_(Y.location+ge,W.meshPerAttribute);Q.isInstancedMesh!==!0&&k._maxInstanceCount===void 0&&(k._maxInstanceCount=W.meshPerAttribute*W.count)}else for(let ge=0;ge<Y.locationSize;ge++)m(Y.location+ge);t.bindBuffer(t.ARRAY_BUFFER,oe);for(let ge=0;ge<Y.locationSize;ge++)I(Y.location+ge,j/Y.locationSize,ie,te,j*ne,j/Y.locationSize*ge*ne,le)}}else if(O!==void 0){const te=O[U];if(te!==void 0)switch(te.length){case 2:t.vertexAttrib2fv(Y.location,te);break;case 3:t.vertexAttrib3fv(Y.location,te);break;case 4:t.vertexAttrib4fv(Y.location,te);break;default:t.vertexAttrib1fv(Y.location,te)}}}}f()}function y(){B();for(const Q in o){const w=o[Q];for(const M in w){const k=w[M];for(const R in k)l(k[R].object),delete k[R];delete w[M]}delete o[Q]}}function x(Q){if(o[Q.id]===void 0)return;const w=o[Q.id];for(const M in w){const k=w[M];for(const R in k)l(k[R].object),delete k[R];delete w[M]}delete o[Q.id]}function E(Q){for(const w in o){const M=o[w];if(M[Q.id]===void 0)continue;const k=M[Q.id];for(const R in k)l(k[R].object),delete k[R];delete M[Q.id]}}function B(){S(),s=!0,r!==i&&(r=i,c(r.object))}function S(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:a,reset:B,resetDefaultState:S,dispose:y,releaseStatesOfGeometry:x,releaseStatesOfProgram:E,initAttributes:p,enableAttribute:m,disableUnusedAttributes:f}}function $Xo(t,e,n){let o;function i(c){o=c}function r(c,l){t.drawArrays(o,c,l),n.update(l,o,1)}function s(c,l,u){u!==0&&(t.drawArraysInstanced(o,c,l,u),n.update(l,o,u))}function a(c,l,u){if(u===0)return;const g=e.get("WEBGL_multi_draw");if(g===null)for(let h=0;h<u;h++)this.render(c[h],l[h]);else{g.multiDrawArraysWEBGL(o,c,0,l,0,u);let h=0;for(let d=0;d<u;d++)h+=l[d];n.update(h,o,1)}}function A(c,l,u,g){if(u===0)return;const h=e.get("WEBGL_multi_draw");if(h===null)for(let d=0;d<c.length;d++)s(c[d],l[d],g[d]);else{h.multiDrawArraysInstancedWEBGL(o,c,0,l,0,g,0,u);let d=0;for(let p=0;p<u;p++)d+=l[p];for(let p=0;p<g.length;p++)n.update(d,o,g[p])}}this.setMode=i,this.render=r,this.renderInstances=s,this.renderMultiDraw=a,this.renderMultiDrawInstances=A}function qXo(t,e,n,o){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const x=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(x.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(x){return!(x!==l4&&o.convert(x)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(x){const E=x===yde&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(x!==Ww&&o.convert(x)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&x!==m6&&!E)}function A(x){if(x==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";x="mediump"}return x==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const l=A(c);l!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",l,"instead."),c=l);const u=n.logarithmicDepthBuffer===!0,g=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_TEXTURE_SIZE),p=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),m=t.getParameter(t.MAX_VERTEX_ATTRIBS),_=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),I=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),C=h>0,y=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:A,textureFormatReadable:s,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:u,maxTextures:g,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:_,maxVaryings:f,maxFragmentUniforms:I,vertexTextures:C,maxSamples:y}}function XXo(t){const e=this;let n=null,o=0,i=!1,r=!1;const s=new nP,a=new HA,A={value:null,needsUpdate:!1};this.uniform=A,this.numPlanes=0,this.numIntersection=0,this.init=function(u,g){const h=u.length!==0||g||o!==0||i;return i=g,o=u.length,h},this.beginShadows=function(){r=!0,l(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(u,g){n=l(u,g,0)},this.setState=function(u,g,h){const d=u.clippingPlanes,p=u.clipIntersection,m=u.clipShadows,_=t.get(u);if(!i||d===null||d.length===0||r&&!m)r?l(null):c();else{const f=r?0:o,I=f*4;let C=_.clippingState||null;A.value=C,C=l(d,g,I,h);for(let y=0;y!==I;++y)C[y]=n[y];_.clippingState=C,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=f}};function c(){A.value!==n&&(A.value=n,A.needsUpdate=o>0),e.numPlanes=o,e.numIntersection=0}function l(u,g,h,d){const p=u!==null?u.length:0;let m=null;if(p!==0){if(m=A.value,d!==!0||m===null){const _=h+p*4,f=g.matrixWorldInverse;a.getNormalMatrix(f),(m===null||m.length<_)&&(m=new Float32Array(_));for(let I=0,C=h;I!==p;++I,C+=4)s.copy(u[I]).applyMatrix4(f,a),s.normal.toArray(m,C),m[C+3]=s.constant}A.value=m,A.needsUpdate=!0}return e.numPlanes=p,e.numIntersection=0,m}}function ZXo(t){let e=new WeakMap;function n(s,a){return a===fde?s.mapping=vG:a===zRe&&(s.mapping=wG),s}function o(s){if(s&&s.isTexture){const a=s.mapping;if(a===fde||a===zRe)if(e.has(s)){const A=e.get(s).texture;return n(A,s.mapping)}else{const A=s.image;if(A&&A.height>0){const c=new K$o(A.height);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const A=e.get(a);A!==void 0&&(e.delete(a),A.dispose())}function r(){e=new WeakMap}return{get:o,dispose:r}}class rY extends VVt{constructor(e=-1,n=1,o=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=o,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,o,i,r,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=o,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),o=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=o-e,s=o+e,a=i+n,A=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,l=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,s=r+c*this.view.width,a-=l*this.view.offsetY,A=a-l*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,A,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const sY=4,$Vt=[.125,.215,.35,.446,.526,.582],GR=20,QTe=new rY,qVt=new Vi;let vTe=null,wTe=0,PTe=0,MTe=!1;const YR=(1+Math.sqrt(5))/2,aY=1/YR,XVt=[new jt(-YR,aY,0),new jt(YR,aY,0),new jt(-aY,0,YR),new jt(aY,0,YR),new jt(0,YR,-aY),new jt(0,YR,aY),new jt(-1,1,-1),new jt(1,1,-1),new jt(-1,1,1),new jt(1,1,1)];class DTe{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,o=.1,i=100){vTe=this._renderer.getRenderTarget(),wTe=this._renderer.getActiveCubeFace(),PTe=this._renderer.getActiveMipmapLevel(),MTe=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,o,i,r),n>0&&this._blur(r,0,0,n),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=tzt(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=ezt(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(vTe,wTe,PTe),this._renderer.xr.enabled=MTe,e.scissorTest=!1,Jde(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===vG||e.mapping===wG?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),vTe=this._renderer.getRenderTarget(),wTe=this._renderer.getActiveCubeFace(),PTe=this._renderer.getActiveMipmapLevel(),MTe=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const o=n||this._allocateTargets();return this._textureToCubeUV(e,o),this._applyPMREM(o),this._cleanup(o),o}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,o={magFilter:Fl,minFilter:Fl,generateMipmaps:!1,type:yde,format:l4,colorSpace:jw,depthBuffer:!1},i=ZVt(e,n,o);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=ZVt(e,n,o);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=eZo(r)),this._blurMaterial=tZo(r,e,n)}return i}_compileMaterial(e){const n=new Er(this._lodPlanes[0],e);this._renderer.compile(n,QTe)}_sceneToCubeUV(e,n,o,i){const a=new sf(90,1,n,o),A=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],l=this._renderer,u=l.autoClear,g=l.toneMapping;l.getClearColor(qVt),l.toneMapping=Jw,l.autoClear=!1;const h=new fE({name:"PMREM.Background",side:uI,depthWrite:!1,depthTest:!1}),d=new Er(new Yx,h);let p=!1;const m=e.background;m?m.isColor&&(h.color.copy(m),e.background=null,p=!0):(h.color.copy(qVt),p=!0);for(let _=0;_<6;_++){const f=_%3;f===0?(a.up.set(0,A[_],0),a.lookAt(c[_],0,0)):f===1?(a.up.set(0,0,A[_]),a.lookAt(0,c[_],0)):(a.up.set(0,A[_],0),a.lookAt(0,0,c[_]));const I=this._cubeSize;Jde(i,f*I,_>2?I:0,I,I),l.setRenderTarget(i),p&&l.render(d,a),l.render(e,a)}d.geometry.dispose(),d.material.dispose(),l.toneMapping=g,l.autoClear=u,e.background=m}_textureToCubeUV(e,n){const o=this._renderer,i=e.mapping===vG||e.mapping===wG;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=tzt()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=ezt());const r=i?this._cubemapMaterial:this._equirectMaterial,s=new Er(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const A=this._cubeSize;Jde(n,0,0,3*A,2*A),o.setRenderTarget(n),o.render(s,QTe)}_applyPMREM(e){const n=this._renderer,o=n.autoClear;n.autoClear=!1;const i=this._lodPlanes.length;for(let r=1;r<i;r++){const s=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=XVt[(i-r-1)%XVt.length];this._blur(e,r-1,r,s,a)}n.autoClear=o}_blur(e,n,o,i,r){const s=this._pingPongRenderTarget;this._halfBlur(e,s,n,o,i,"latitudinal",r),this._halfBlur(s,e,o,o,i,"longitudinal",r)}_halfBlur(e,n,o,i,r,s,a){const A=this._renderer,c=this._blurMaterial;s!=="latitudinal"&&s!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const l=3,u=new Er(this._lodPlanes[i],c),g=c.uniforms,h=this._sizeLods[o]-1,d=isFinite(r)?Math.PI/(2*h):2*Math.PI/(2*GR-1),p=r/d,m=isFinite(r)?1+Math.floor(l*p):GR;m>GR&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${GR}`);const _=[];let f=0;for(let E=0;E<GR;++E){const B=E/p,S=Math.exp(-B*B/2);_.push(S),E===0?f+=S:E<m&&(f+=2*S)}for(let E=0;E<_.length;E++)_[E]=_[E]/f;g.envMap.value=e.texture,g.samples.value=m,g.weights.value=_,g.latitudinal.value=s==="latitudinal",a&&(g.poleAxis.value=a);const{_lodMax:I}=this;g.dTheta.value=d,g.mipInt.value=I-o;const C=this._sizeLods[i],y=3*C*(i>I-sY?i-I+sY:0),x=4*(this._cubeSize-C);Jde(n,y,x,3*C,2*C),A.setRenderTarget(n),A.render(u,QTe)}}function eZo(t){const e=[],n=[],o=[];let i=t;const r=t-sY+1+$Vt.length;for(let s=0;s<r;s++){const a=Math.pow(2,i);n.push(a);let A=1/a;s>t-sY?A=$Vt[s-t+sY-1]:s===0&&(A=0),o.push(A);const c=1/(a-2),l=-c,u=1+c,g=[l,l,u,l,u,u,l,l,u,u,l,u],h=6,d=6,p=3,m=2,_=1,f=new Float32Array(p*d*h),I=new Float32Array(m*d*h),C=new Float32Array(_*d*h);for(let x=0;x<h;x++){const E=x%3*2/3-1,B=x>2?0:-1,S=[E,B,0,E+2/3,B,0,E+2/3,B+1,0,E,B,0,E+2/3,B+1,0,E,B+1,0];f.set(S,p*d*x),I.set(g,m*d*x);const Q=[x,x,x,x,x,x];C.set(Q,_*d*x)}const y=new Zl;y.setAttribute("position",new tg(f,p)),y.setAttribute("uv",new tg(I,m)),y.setAttribute("faceIndex",new tg(C,_)),e.push(y),i>sY&&i--}return{lodPlanes:e,sizeLods:n,sigmas:o}}function ZVt(t,e,n){const o=new TR(t,e,n);return o.texture.mapping=Ide,o.texture.name="PMREM.cubeUv",o.scissorTest=!0,o}function Jde(t,e,n,o,i){t.viewport.set(e,n,o,i),t.scissor.set(e,n,o,i)}function tZo(t,e,n){const o=new Float32Array(GR),i=new jt(0,1,0);return new f6({name:"SphericalGaussianBlur",defines:{n:GR,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:o},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:NTe(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform int samples;
			uniform float weights[ n ];
			uniform bool latitudinal;
			uniform float dTheta;
			uniform float mipInt;
			uniform vec3 poleAxis;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

				float cosTheta = cos( theta );
				// Rodrigues' axis-angle rotation
				vec3 sampleDirection = vOutputDirection * cosTheta
					+ cross( axis, vOutputDirection ) * sin( theta )
					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

				}

				axis = normalize( axis );

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

				for ( int i = 1; i < n; i++ ) {

					if ( i >= samples ) {

						break;

					}

					float theta = dTheta * float( i );
					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

				}

			}
		`,blending:zw,depthTest:!1,depthWrite:!1})}function ezt(){return new f6({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:NTe(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;

			#include <common>

			void main() {

				vec3 outputDirection = normalize( vOutputDirection );
				vec2 uv = equirectUv( outputDirection );

				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );

			}
		`,blending:zw,depthTest:!1,depthWrite:!1})}function tzt(){return new f6({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:NTe(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

			}
		`,blending:zw,depthTest:!1,depthWrite:!1})}function NTe(){return`

		precision mediump float;
		precision mediump int;

		attribute float faceIndex;

		varying vec3 vOutputDirection;

		// RH coordinate system; PMREM face-indexing convention
		vec3 getDirection( vec2 uv, float face ) {

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

				direction = direction.zyx; // ( 1, v, u ) pos x

			} else if ( face == 1.0 ) {

				direction = direction.xzy;
				direction.xz *= -1.0; // ( -u, 1, -v ) pos y

			} else if ( face == 2.0 ) {

				direction.x *= -1.0; // ( -u, v, 1 ) pos z

			} else if ( face == 3.0 ) {

				direction = direction.zyx;
				direction.xz *= -1.0; // ( -1, v, -u ) neg x

			} else if ( face == 4.0 ) {

				direction = direction.xzy;
				direction.xy *= -1.0; // ( -u, -1, v ) neg y

			} else if ( face == 5.0 ) {

				direction.z *= -1.0; // ( u, v, -1 ) neg z

			}

			return direction;

		}

		void main() {

			vOutputDirection = getDirection( uv, faceIndex );
			gl_Position = vec4( position, 1.0 );

		}
	`}function nZo(t){let e=new WeakMap,n=null;function o(a){if(a&&a.isTexture){const A=a.mapping,c=A===fde||A===zRe,l=A===vG||A===wG;if(c||l){let u=e.get(a);const g=u!==void 0?u.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==g)return n===null&&(n=new DTe(t)),u=c?n.fromEquirectangular(a,u):n.fromCubemap(a,u),u.texture.pmremVersion=a.pmremVersion,e.set(a,u),u.texture;if(u!==void 0)return u.texture;{const h=a.image;return c&&h&&h.height>0||l&&h&&i(h)?(n===null&&(n=new DTe(t)),u=c?n.fromEquirectangular(a):n.fromCubemap(a),u.texture.pmremVersion=a.pmremVersion,e.set(a,u),a.addEventListener("dispose",r),u.texture):null}}}return a}function i(a){let A=0;const c=6;for(let l=0;l<c;l++)a[l]!==void 0&&A++;return A===c}function r(a){const A=a.target;A.removeEventListener("dispose",r);const c=e.get(A);c!==void 0&&(e.delete(A),c.dispose())}function s(){e=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:o,dispose:s}}function oZo(t){const e={};function n(o){if(e[o]!==void 0)return e[o];let i;switch(o){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(o)}return e[o]=i,i}return{has:function(o){return n(o)!==null},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(o){const i=n(o);return i===null&&sTe("THREE.WebGLRenderer: "+o+" extension not supported."),i}}}function iZo(t,e,n,o){const i={},r=new WeakMap;function s(u){const g=u.target;g.index!==null&&e.remove(g.index);for(const d in g.attributes)e.remove(g.attributes[d]);for(const d in g.morphAttributes){const p=g.morphAttributes[d];for(let m=0,_=p.length;m<_;m++)e.remove(p[m])}g.removeEventListener("dispose",s),delete i[g.id];const h=r.get(g);h&&(e.remove(h),r.delete(g)),o.releaseStatesOfGeometry(g),g.isInstancedBufferGeometry===!0&&delete g._maxInstanceCount,n.memory.geometries--}function a(u,g){return i[g.id]===!0||(g.addEventListener("dispose",s),i[g.id]=!0,n.memory.geometries++),g}function A(u){const g=u.attributes;for(const d in g)e.update(g[d],t.ARRAY_BUFFER);const h=u.morphAttributes;for(const d in h){const p=h[d];for(let m=0,_=p.length;m<_;m++)e.update(p[m],t.ARRAY_BUFFER)}}function c(u){const g=[],h=u.index,d=u.attributes.position;let p=0;if(h!==null){const f=h.array;p=h.version;for(let I=0,C=f.length;I<C;I+=3){const y=f[I+0],x=f[I+1],E=f[I+2];g.push(y,x,x,E,E,y)}}else if(d!==void 0){const f=d.array;p=d.version;for(let I=0,C=f.length/3-1;I<C;I+=3){const y=I+0,x=I+1,E=I+2;g.push(y,x,x,E,E,y)}}else return;const m=new(yVt(g)?xTe:FVt)(g,1);m.version=p;const _=r.get(u);_&&e.remove(_),r.set(u,m)}function l(u){const g=r.get(u);if(g){const h=u.index;h!==null&&g.version<h.version&&c(u)}else c(u);return r.get(u)}return{get:a,update:A,getWireframeAttribute:l}}function rZo(t,e,n){let o;function i(g){o=g}let r,s;function a(g){r=g.type,s=g.bytesPerElement}function A(g,h){t.drawElements(o,h,r,g*s),n.update(h,o,1)}function c(g,h,d){d!==0&&(t.drawElementsInstanced(o,h,r,g*s,d),n.update(h,o,d))}function l(g,h,d){if(d===0)return;const p=e.get("WEBGL_multi_draw");if(p===null)for(let m=0;m<d;m++)this.render(g[m]/s,h[m]);else{p.multiDrawElementsWEBGL(o,h,0,r,g,0,d);let m=0;for(let _=0;_<d;_++)m+=h[_];n.update(m,o,1)}}function u(g,h,d,p){if(d===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let _=0;_<g.length;_++)c(g[_]/s,h[_],p[_]);else{m.multiDrawElementsInstancedWEBGL(o,h,0,r,g,0,p,0,d);let _=0;for(let f=0;f<d;f++)_+=h[f];for(let f=0;f<p.length;f++)n.update(_,o,p[f])}}this.setMode=i,this.setIndex=a,this.render=A,this.renderInstances=c,this.renderMultiDraw=l,this.renderMultiDrawInstances=u}function sZo(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function o(r,s,a){switch(n.calls++,s){case t.TRIANGLES:n.triangles+=a*(r/3);break;case t.LINES:n.lines+=a*(r/2);break;case t.LINE_STRIP:n.lines+=a*(r-1);break;case t.LINE_LOOP:n.lines+=a*r;break;case t.POINTS:n.points+=a*r;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",s);break}}function i(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:i,update:o}}function aZo(t,e,n){const o=new WeakMap,i=new ru;function r(s,a,A){const c=s.morphTargetInfluences,l=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,u=l!==void 0?l.length:0;let g=o.get(a);if(g===void 0||g.count!==u){let h=function(){B.dispose(),o.delete(a),a.removeEventListener("dispose",h)};g!==void 0&&g.texture.dispose();const d=a.morphAttributes.position!==void 0,p=a.morphAttributes.normal!==void 0,m=a.morphAttributes.color!==void 0,_=a.morphAttributes.position||[],f=a.morphAttributes.normal||[],I=a.morphAttributes.color||[];let C=0;d===!0&&(C=1),p===!0&&(C=2),m===!0&&(C=3);let y=a.attributes.position.count*C,x=1;y>e.maxTextureSize&&(x=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const E=new Float32Array(y*x*4*u),B=new SVt(E,y,x,u);B.type=m6,B.needsUpdate=!0;const S=C*4;for(let Q=0;Q<u;Q++){const w=_[Q],M=f[Q],k=I[Q],R=y*x*4*Q;for(let F=0;F<w.count;F++){const O=F*S;d===!0&&(i.fromBufferAttribute(w,F),E[R+O+0]=i.x,E[R+O+1]=i.y,E[R+O+2]=i.z,E[R+O+3]=0),p===!0&&(i.fromBufferAttribute(M,F),E[R+O+4]=i.x,E[R+O+5]=i.y,E[R+O+6]=i.z,E[R+O+7]=0),m===!0&&(i.fromBufferAttribute(k,F),E[R+O+8]=i.x,E[R+O+9]=i.y,E[R+O+10]=i.z,E[R+O+11]=k.itemSize===4?i.w:1)}}g={count:u,texture:B,size:new ni(y,x)},o.set(a,g),a.addEventListener("dispose",h)}if(s.isInstancedMesh===!0&&s.morphTexture!==null)A.getUniforms().setValue(t,"morphTexture",s.morphTexture,n);else{let h=0;for(let p=0;p<c.length;p++)h+=c[p];const d=a.morphTargetsRelative?1:1-h;A.getUniforms().setValue(t,"morphTargetBaseInfluence",d),A.getUniforms().setValue(t,"morphTargetInfluences",c)}A.getUniforms().setValue(t,"morphTargetsTexture",g.texture,n),A.getUniforms().setValue(t,"morphTargetsTextureSize",g.size)}return{update:r}}function AZo(t,e,n,o){let i=new WeakMap;function r(A){const c=o.render.frame,l=A.geometry,u=e.get(A,l);if(i.get(u)!==c&&(e.update(u),i.set(u,c)),A.isInstancedMesh&&(A.hasEventListener("dispose",a)===!1&&A.addEventListener("dispose",a),i.get(A)!==c&&(n.update(A.instanceMatrix,t.ARRAY_BUFFER),A.instanceColor!==null&&n.update(A.instanceColor,t.ARRAY_BUFFER),i.set(A,c))),A.isSkinnedMesh){const g=A.skeleton;i.get(g)!==c&&(g.update(),i.set(g,c))}return u}function s(){i=new WeakMap}function a(A){const c=A.target;c.removeEventListener("dispose",a),n.remove(c.instanceMatrix),c.instanceColor!==null&&n.remove(c.instanceColor)}return{update:r,dispose:s}}class nzt extends Hg{constructor(e,n,o,i,r,s,a,A,c,l=NG){if(l!==NG&&l!==RG)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");o===void 0&&l===NG&&(o=MG),o===void 0&&l===RG&&(o=DG),super(null,i,r,s,a,A,l,o,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:wC,this.minFilter=A!==void 0?A:wC,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}const ozt=new Hg,izt=new nzt(1,1);izt.compareFunction=fVt;const rzt=new SVt,szt=new w$o,azt=new WVt,Azt=[],czt=[],lzt=new Float32Array(16),uzt=new Float32Array(9),gzt=new Float32Array(4);function AY(t,e,n){const o=t[0];if(o<=0||o>0)return t;const i=e*n;let r=Azt[i];if(r===void 0&&(r=new Float32Array(i),Azt[i]=r),e!==0){o.toArray(r,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(r,a)}return r}function af(t,e){if(t.length!==e.length)return!1;for(let n=0,o=t.length;n<o;n++)if(t[n]!==e[n])return!1;return!0}function Af(t,e){for(let n=0,o=e.length;n<o;n++)t[n]=e[n]}function Wde(t,e){let n=czt[e];n===void 0&&(n=new Int32Array(e),czt[e]=n);for(let o=0;o!==e;++o)n[o]=t.allocateTextureUnit();return n}function cZo(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function lZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(af(n,e))return;t.uniform2fv(this.addr,e),Af(n,e)}}function uZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(af(n,e))return;t.uniform3fv(this.addr,e),Af(n,e)}}function gZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(af(n,e))return;t.uniform4fv(this.addr,e),Af(n,e)}}function dZo(t,e){const n=this.cache,o=e.elements;if(o===void 0){if(af(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Af(n,e)}else{if(af(n,o))return;gzt.set(o),t.uniformMatrix2fv(this.addr,!1,gzt),Af(n,o)}}function hZo(t,e){const n=this.cache,o=e.elements;if(o===void 0){if(af(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Af(n,e)}else{if(af(n,o))return;uzt.set(o),t.uniformMatrix3fv(this.addr,!1,uzt),Af(n,o)}}function pZo(t,e){const n=this.cache,o=e.elements;if(o===void 0){if(af(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Af(n,e)}else{if(af(n,o))return;lzt.set(o),t.uniformMatrix4fv(this.addr,!1,lzt),Af(n,o)}}function mZo(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function _Zo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(af(n,e))return;t.uniform2iv(this.addr,e),Af(n,e)}}function fZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(af(n,e))return;t.uniform3iv(this.addr,e),Af(n,e)}}function IZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(af(n,e))return;t.uniform4iv(this.addr,e),Af(n,e)}}function CZo(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function yZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(af(n,e))return;t.uniform2uiv(this.addr,e),Af(n,e)}}function xZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(af(n,e))return;t.uniform3uiv(this.addr,e),Af(n,e)}}function EZo(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(af(n,e))return;t.uniform4uiv(this.addr,e),Af(n,e)}}function BZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i&&(t.uniform1i(this.addr,i),o[0]=i);const r=this.type===t.SAMPLER_2D_SHADOW?izt:ozt;n.setTexture2D(e||r,i)}function bZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i&&(t.uniform1i(this.addr,i),o[0]=i),n.setTexture3D(e||szt,i)}function SZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i&&(t.uniform1i(this.addr,i),o[0]=i),n.setTextureCube(e||azt,i)}function QZo(t,e,n){const o=this.cache,i=n.allocateTextureUnit();o[0]!==i&&(t.uniform1i(this.addr,i),o[0]=i),n.setTexture2DArray(e||rzt,i)}function vZo(t){switch(t){case 5126:return cZo;case 35664:return lZo;case 35665:return uZo;case 35666:return gZo;case 35674:return dZo;case 35675:return hZo;case 35676:return pZo;case 5124:case 35670:return mZo;case 35667:case 35671:return _Zo;case 35668:case 35672:return fZo;case 35669:case 35673:return IZo;case 5125:return CZo;case 36294:return yZo;case 36295:return xZo;case 36296:return EZo;case 35678:case 36198:case 36298:case 36306:case 35682:return BZo;case 35679:case 36299:case 36307:return bZo;case 35680:case 36300:case 36308:case 36293:return SZo;case 36289:case 36303:case 36311:case 36292:return QZo}}function wZo(t,e){t.uniform1fv(this.addr,e)}function PZo(t,e){const n=AY(e,this.size,2);t.uniform2fv(this.addr,n)}function MZo(t,e){const n=AY(e,this.size,3);t.uniform3fv(this.addr,n)}function DZo(t,e){const n=AY(e,this.size,4);t.uniform4fv(this.addr,n)}function NZo(t,e){const n=AY(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function RZo(t,e){const n=AY(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function TZo(t,e){const n=AY(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function kZo(t,e){t.uniform1iv(this.addr,e)}function FZo(t,e){t.uniform2iv(this.addr,e)}function LZo(t,e){t.uniform3iv(this.addr,e)}function HZo(t,e){t.uniform4iv(this.addr,e)}function OZo(t,e){t.uniform1uiv(this.addr,e)}function GZo(t,e){t.uniform2uiv(this.addr,e)}function YZo(t,e){t.uniform3uiv(this.addr,e)}function UZo(t,e){t.uniform4uiv(this.addr,e)}function KZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTexture2D(e[s]||ozt,r[s])}function VZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTexture3D(e[s]||szt,r[s])}function zZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTextureCube(e[s]||azt,r[s])}function JZo(t,e,n){const o=this.cache,i=e.length,r=Wde(n,i);af(o,r)||(t.uniform1iv(this.addr,r),Af(o,r));for(let s=0;s!==i;++s)n.setTexture2DArray(e[s]||rzt,r[s])}function WZo(t){switch(t){case 5126:return wZo;case 35664:return PZo;case 35665:return MZo;case 35666:return DZo;case 35674:return NZo;case 35675:return RZo;case 35676:return TZo;case 5124:case 35670:return kZo;case 35667:case 35671:return FZo;case 35668:case 35672:return LZo;case 35669:case 35673:return HZo;case 5125:return OZo;case 36294:return GZo;case 36295:return YZo;case 36296:return UZo;case 35678:case 36198:case 36298:case 36306:case 35682:return KZo;case 35679:case 36299:case 36307:return VZo;case 35680:case 36300:case 36308:case 36293:return zZo;case 36289:case 36303:case 36311:case 36292:return JZo}}class jZo{constructor(e,n,o){this.id=e,this.addr=o,this.cache=[],this.type=n.type,this.setValue=vZo(n.type)}}class $Zo{constructor(e,n,o){this.id=e,this.addr=o,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=WZo(n.type)}}class qZo{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,o){const i=this.seq;for(let r=0,s=i.length;r!==s;++r){const a=i[r];a.setValue(e,n[a.id],o)}}}const RTe=/(\w+)(\])?(\[|\.)?/g;function dzt(t,e){t.seq.push(e),t.map[e.id]=e}function XZo(t,e,n){const o=t.name,i=o.length;for(RTe.lastIndex=0;;){const r=RTe.exec(o),s=RTe.lastIndex;let a=r[1];const A=r[2]==="]",c=r[3];if(A&&(a=a|0),c===void 0||c==="["&&s+2===i){dzt(n,c===void 0?new jZo(a,t,e):new $Zo(a,t,e));break}else{let u=n.map[a];u===void 0&&(u=new qZo(a),dzt(n,u)),n=u}}}class jde{constructor(e,n){this.seq=[],this.map={};const o=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let i=0;i<o;++i){const r=e.getActiveUniform(n,i),s=e.getUniformLocation(n,r.name);XZo(r,s,this)}}setValue(e,n,o,i){const r=this.map[n];r!==void 0&&r.setValue(e,o,i)}setOptional(e,n,o){const i=n[o];i!==void 0&&this.setValue(e,o,i)}static upload(e,n,o,i){for(let r=0,s=n.length;r!==s;++r){const a=n[r],A=o[a.id];A.needsUpdate!==!1&&a.setValue(e,A.value,i)}}static seqWithValue(e,n){const o=[];for(let i=0,r=e.length;i!==r;++i){const s=e[i];s.id in n&&o.push(s)}return o}}function hzt(t,e,n){const o=t.createShader(e);return t.shaderSource(o,n),t.compileShader(o),o}const ZZo=37297;let eei=0;function tei(t,e){const n=t.split(`
`),o=[],i=Math.max(e-6,0),r=Math.min(e+6,n.length);for(let s=i;s<r;s++){const a=s+1;o.push(`${a===e?">":" "} ${a}: ${n[s]}`)}return o.join(`
`)}function nei(t){const e=iu.getPrimaries(iu.workingColorSpace),n=iu.getPrimaries(t);let o;switch(e===n?o="":e===bde&&n===Bde?o="LinearDisplayP3ToLinearSRGB":e===Bde&&n===bde&&(o="LinearSRGBToLinearDisplayP3"),t){case jw:case xde:return[o,"LinearTransferOETF"];case Ox:case nTe:return[o,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[o,"LinearTransferOETF"]}}function pzt(t,e,n){const o=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(o&&i==="")return"";const r=/ERROR: 0:(\d+)/.exec(i);if(r){const s=parseInt(r[1]);return n.toUpperCase()+`

`+i+`

`+tei(t.getShaderSource(e),s)}else return i}function oei(t,e){const n=nei(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function iei(t,e){let n;switch(e){case Njo:n="Linear";break;case Rjo:n="Reinhard";break;case Tjo:n="OptimizedCineon";break;case PKt:n="ACESFilmic";break;case Fjo:n="AgX";break;case Ljo:n="Neutral";break;case kjo:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function rei(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Uq).join(`
`)}function sei(t){const e=[];for(const n in t){const o=t[n];o!==!1&&e.push("#define "+n+" "+o)}return e.join(`
`)}function aei(t,e){const n={},o=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<o;i++){const r=t.getActiveAttrib(e,i),s=r.name;let a=1;r.type===t.FLOAT_MAT2&&(a=2),r.type===t.FLOAT_MAT3&&(a=3),r.type===t.FLOAT_MAT4&&(a=4),n[s]={type:r.type,location:t.getAttribLocation(e,s),locationSize:a}}return n}function Uq(t){return t!==""}function mzt(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function _zt(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Aei=/^[ \t]*#include +<([\w\d./]+)>/gm;function TTe(t){return t.replace(Aei,lei)}const cei=new Map;function lei(t,e){let n=OA[e];if(n===void 0){const o=cei.get(e);if(o!==void 0)n=OA[o],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,o);else throw new Error("Can not resolve #include <"+e+">")}return TTe(n)}const uei=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function fzt(t){return t.replace(uei,gei)}function gei(t,e,n,o){let i="";for(let r=parseInt(e);r<parseInt(n);r++)i+=o.replace(/\[\s*i\s*\]/g,"[ "+r+" ]").replace(/UNROLLED_LOOP_INDEX/g,r);return i}function Izt(t){let e=`precision ${t.precision} float;
	precision ${t.precision} int;
	precision ${t.precision} sampler2D;
	precision ${t.precision} samplerCube;
	precision ${t.precision} sampler3D;
	precision ${t.precision} sampler2DArray;
	precision ${t.precision} sampler2DShadow;
	precision ${t.precision} samplerCubeShadow;
	precision ${t.precision} sampler2DArrayShadow;
	precision ${t.precision} isampler2D;
	precision ${t.precision} isampler3D;
	precision ${t.precision} isamplerCube;
	precision ${t.precision} isampler2DArray;
	precision ${t.precision} usampler2D;
	precision ${t.precision} usampler3D;
	precision ${t.precision} usamplerCube;
	precision ${t.precision} usampler2DArray;
	`;return t.precision==="highp"?e+=`
#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
#define LOW_PRECISION`),e}function dei(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===bKt?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===SKt?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===qb&&(e="SHADOWMAP_TYPE_VSM"),e}function hei(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case vG:case wG:e="ENVMAP_TYPE_CUBE";break;case Ide:e="ENVMAP_TYPE_CUBE_UV";break}return e}function pei(t){let e="ENVMAP_MODE_REFLECTION";return t.envMap&&t.envMapMode===wG&&(e="ENVMAP_MODE_REFRACTION"),e}function mei(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case VRe:e="ENVMAP_BLENDING_MULTIPLY";break;case Mjo:e="ENVMAP_BLENDING_MIX";break;case Djo:e="ENVMAP_BLENDING_ADD";break}return e}function _ei(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,o=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:o,maxMip:n}}function fei(t,e,n,o){const i=t.getContext(),r=n.defines;let s=n.vertexShader,a=n.fragmentShader;const A=dei(n),c=hei(n),l=pei(n),u=mei(n),g=_ei(n),h=rei(n),d=sei(r),p=i.createProgram();let m,_,f=n.glslVersion?"#version "+n.glslVersion+`
`:"";n.isRawShaderMaterial?(m=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,d].filter(Uq).join(`
`),m.length>0&&(m+=`
`),_=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,d].filter(Uq).join(`
`),_.length>0&&(_+=`
`)):(m=[Izt(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,d,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+A:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","	uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","	attribute vec2 uv1;","#endif","#ifdef USE_UV2","	attribute vec2 uv2;","#endif","#ifdef USE_UV3","	attribute vec2 uv3;","#endif","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
`].filter(Uq).join(`
`),_=[Izt(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,d,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+l:"",n.envMap?"#define "+u:"",g?"#define CUBEUV_TEXEL_WIDTH "+g.texelWidth:"",g?"#define CUBEUV_TEXEL_HEIGHT "+g.texelHeight:"",g?"#define CUBEUV_MAX_MIP "+g.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+A:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Jw?"#define TONE_MAPPING":"",n.toneMapping!==Jw?OA.tonemapping_pars_fragment:"",n.toneMapping!==Jw?iei("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",OA.colorspace_pars_fragment,oei("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
`].filter(Uq).join(`
`)),s=TTe(s),s=mzt(s,n),s=_zt(s,n),a=TTe(a),a=mzt(a,n),a=_zt(a,n),s=fzt(s),a=fzt(a),n.isRawShaderMaterial!==!0&&(f=`#version 300 es
`,m=[h,"#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+m,_=["#define varying in",n.glslVersion===IVt?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===IVt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
`)+`
`+_);const I=f+m+s,C=f+_+a,y=hzt(i,i.VERTEX_SHADER,I),x=hzt(i,i.FRAGMENT_SHADER,C);i.attachShader(p,y),i.attachShader(p,x),n.index0AttributeName!==void 0?i.bindAttribLocation(p,0,n.index0AttributeName):n.morphTargets===!0&&i.bindAttribLocation(p,0,"position"),i.linkProgram(p);function E(w){if(t.debug.checkShaderErrors){const M=i.getProgramInfoLog(p).trim(),k=i.getShaderInfoLog(y).trim(),R=i.getShaderInfoLog(x).trim();let F=!0,O=!0;if(i.getProgramParameter(p,i.LINK_STATUS)===!1)if(F=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(i,p,y,x);else{const U=pzt(i,y,"vertex"),Y=pzt(i,x,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(p,i.VALIDATE_STATUS)+`

Material Name: `+w.name+`
Material Type: `+w.type+`

Program Info Log: `+M+`
`+U+`
`+Y)}else M!==""?console.warn("THREE.WebGLProgram: Program Info Log:",M):(k===""||R==="")&&(O=!1);O&&(w.diagnostics={runnable:F,programLog:M,vertexShader:{log:k,prefix:m},fragmentShader:{log:R,prefix:_}})}i.deleteShader(y),i.deleteShader(x),B=new jde(i,p),S=aei(i,p)}let B;this.getUniforms=function(){return B===void 0&&E(this),B};let S;this.getAttributes=function(){return S===void 0&&E(this),S};let Q=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return Q===!1&&(Q=i.getProgramParameter(p,ZZo)),Q},this.destroy=function(){o.releaseStatesOfProgram(this),i.deleteProgram(p),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=eei++,this.cacheKey=e,this.usedTimes=1,this.program=p,this.vertexShader=y,this.fragmentShader=x,this}let Iei=0;class Cei{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,o=e.fragmentShader,i=this._getShaderStage(n),r=this._getShaderStage(o),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(r)===!1&&(s.add(r),r.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const o of n)o.usedTimes--,o.usedTimes===0&&this.shaderCache.delete(o.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let o=n.get(e);return o===void 0&&(o=new Set,n.set(e,o)),o}_getShaderStage(e){const n=this.shaderCache;let o=n.get(e);return o===void 0&&(o=new yei(e),n.set(e,o)),o}}class yei{constructor(e){this.id=Iei++,this.code=e,this.usedTimes=0}}function xei(t,e,n,o,i,r,s){const a=new pTe,A=new Cei,c=new Set,l=[],u=i.logarithmicDepthBuffer,g=i.vertexTextures;let h=i.precision;const d={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(S){return c.add(S),S===0?"uv":`uv${S}`}function m(S,Q,w,M,k){const R=M.fog,F=k.geometry,O=S.isMeshStandardMaterial?M.environment:null,U=(S.isMeshStandardMaterial?n:e).get(S.envMap||O),Y=U&&U.mapping===Ide?U.image.height:null,W=d[S.type];S.precision!==null&&(h=i.getMaxPrecision(S.precision),h!==S.precision&&console.warn("THREE.WebGLProgram.getParameters:",S.precision,"not supported, using",h,"instead."));const te=F.morphAttributes.position||F.morphAttributes.normal||F.morphAttributes.color,j=te!==void 0?te.length:0;let J=0;F.morphAttributes.position!==void 0&&(J=1),F.morphAttributes.normal!==void 0&&(J=2),F.morphAttributes.color!==void 0&&(J=3);let oe,ie,ne,le;if(W){const dt=I6[W];oe=dt.vertexShader,ie=dt.fragmentShader}else oe=S.vertexShader,ie=S.fragmentShader,A.update(S),ne=A.getVertexShaderID(S),le=A.getFragmentShaderID(S);const ge=t.getRenderTarget(),_e=k.isInstancedMesh===!0,ue=k.isBatchedMesh===!0,fe=!!S.map,pe=!!S.matcap,ye=!!U,Me=!!S.aoMap,ve=!!S.lightMap,he=!!S.bumpMap,Qe=!!S.normalMap,Pe=!!S.displacementMap,we=!!S.emissiveMap,Te=!!S.metalnessMap,Re=!!S.roughnessMap,Ee=S.anisotropy>0,ke=S.clearcoat>0,Ce=S.dispersion>0,Le=S.iridescence>0,Ye=S.sheen>0,tt=S.transmission>0,At=Ee&&!!S.anisotropyMap,at=ke&&!!S.clearcoatMap,nt=ke&&!!S.clearcoatNormalMap,gt=ke&&!!S.clearcoatRoughnessMap,bt=Le&&!!S.iridescenceMap,Ct=Le&&!!S.iridescenceThicknessMap,Dt=Ye&&!!S.sheenColorMap,kt=Ye&&!!S.sheenRoughnessMap,it=!!S.specularMap,Yt=!!S.specularColorMap,pn=!!S.specularIntensityMap,be=tt&&!!S.transmissionMap,et=tt&&!!S.thicknessMap,It=!!S.gradientMap,Bt=!!S.alphaMap,mt=S.alphaTest>0,st=!!S.alphaHash,xt=!!S.extensions;let Xe=Jw;S.toneMapped&&(ge===null||ge.isXRRenderTarget===!0)&&(Xe=t.toneMapping);const Ze={shaderID:W,shaderType:S.type,shaderName:S.name,vertexShader:oe,fragmentShader:ie,defines:S.defines,customVertexShaderID:ne,customFragmentShaderID:le,isRawShaderMaterial:S.isRawShaderMaterial===!0,glslVersion:S.glslVersion,precision:h,batching:ue,batchingColor:ue&&k._colorsTexture!==null,instancing:_e,instancingColor:_e&&k.instanceColor!==null,instancingMorph:_e&&k.morphTexture!==null,supportsVertexTextures:g,outputColorSpace:ge===null?t.outputColorSpace:ge.isXRRenderTarget===!0?ge.texture.colorSpace:jw,alphaToCoverage:!!S.alphaToCoverage,map:fe,matcap:pe,envMap:ye,envMapMode:ye&&U.mapping,envMapCubeUVHeight:Y,aoMap:Me,lightMap:ve,bumpMap:he,normalMap:Qe,displacementMap:g&&Pe,emissiveMap:we,normalMapObjectSpace:Qe&&S.normalMapType===Xjo,normalMapTangentSpace:Qe&&S.normalMapType===tTe,metalnessMap:Te,roughnessMap:Re,anisotropy:Ee,anisotropyMap:At,clearcoat:ke,clearcoatMap:at,clearcoatNormalMap:nt,clearcoatRoughnessMap:gt,dispersion:Ce,iridescence:Le,iridescenceMap:bt,iridescenceThicknessMap:Ct,sheen:Ye,sheenColorMap:Dt,sheenRoughnessMap:kt,specularMap:it,specularColorMap:Yt,specularIntensityMap:pn,transmission:tt,transmissionMap:be,thicknessMap:et,gradientMap:It,opaque:S.transparent===!1&&S.blending===QG&&S.alphaToCoverage===!1,alphaMap:Bt,alphaTest:mt,alphaHash:st,combine:S.combine,mapUv:fe&&p(S.map.channel),aoMapUv:Me&&p(S.aoMap.channel),lightMapUv:ve&&p(S.lightMap.channel),bumpMapUv:he&&p(S.bumpMap.channel),normalMapUv:Qe&&p(S.normalMap.channel),displacementMapUv:Pe&&p(S.displacementMap.channel),emissiveMapUv:we&&p(S.emissiveMap.channel),metalnessMapUv:Te&&p(S.metalnessMap.channel),roughnessMapUv:Re&&p(S.roughnessMap.channel),anisotropyMapUv:At&&p(S.anisotropyMap.channel),clearcoatMapUv:at&&p(S.clearcoatMap.channel),clearcoatNormalMapUv:nt&&p(S.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:gt&&p(S.clearcoatRoughnessMap.channel),iridescenceMapUv:bt&&p(S.iridescenceMap.channel),iridescenceThicknessMapUv:Ct&&p(S.iridescenceThicknessMap.channel),sheenColorMapUv:Dt&&p(S.sheenColorMap.channel),sheenRoughnessMapUv:kt&&p(S.sheenRoughnessMap.channel),specularMapUv:it&&p(S.specularMap.channel),specularColorMapUv:Yt&&p(S.specularColorMap.channel),specularIntensityMapUv:pn&&p(S.specularIntensityMap.channel),transmissionMapUv:be&&p(S.transmissionMap.channel),thicknessMapUv:et&&p(S.thicknessMap.channel),alphaMapUv:Bt&&p(S.alphaMap.channel),vertexTangents:!!F.attributes.tangent&&(Qe||Ee),vertexColors:S.vertexColors,vertexAlphas:S.vertexColors===!0&&!!F.attributes.color&&F.attributes.color.itemSize===4,pointsUvs:k.isPoints===!0&&!!F.attributes.uv&&(fe||Bt),fog:!!R,useFog:S.fog===!0,fogExp2:!!R&&R.isFogExp2,flatShading:S.flatShading===!0,sizeAttenuation:S.sizeAttenuation===!0,logarithmicDepthBuffer:u,skinning:k.isSkinnedMesh===!0,morphTargets:F.morphAttributes.position!==void 0,morphNormals:F.morphAttributes.normal!==void 0,morphColors:F.morphAttributes.color!==void 0,morphTargetsCount:j,morphTextureStride:J,numDirLights:Q.directional.length,numPointLights:Q.point.length,numSpotLights:Q.spot.length,numSpotLightMaps:Q.spotLightMap.length,numRectAreaLights:Q.rectArea.length,numHemiLights:Q.hemi.length,numDirLightShadows:Q.directionalShadowMap.length,numPointLightShadows:Q.pointShadowMap.length,numSpotLightShadows:Q.spotShadowMap.length,numSpotLightShadowsWithMaps:Q.numSpotLightShadowsWithMaps,numLightProbes:Q.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:S.dithering,shadowMapEnabled:t.shadowMap.enabled&&w.length>0,shadowMapType:t.shadowMap.type,toneMapping:Xe,decodeVideoTexture:fe&&S.map.isVideoTexture===!0&&iu.getTransfer(S.map.colorSpace)===Ed,premultipliedAlpha:S.premultipliedAlpha,doubleSided:S.side===r_,flipSided:S.side===uI,useDepthPacking:S.depthPacking>=0,depthPacking:S.depthPacking||0,index0AttributeName:S.index0AttributeName,extensionClipCullDistance:xt&&S.extensions.clipCullDistance===!0&&o.has("WEBGL_clip_cull_distance"),extensionMultiDraw:xt&&S.extensions.multiDraw===!0&&o.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:o.has("KHR_parallel_shader_compile"),customProgramCacheKey:S.customProgramCacheKey()};return Ze.vertexUv1s=c.has(1),Ze.vertexUv2s=c.has(2),Ze.vertexUv3s=c.has(3),c.clear(),Ze}function _(S){const Q=[];if(S.shaderID?Q.push(S.shaderID):(Q.push(S.customVertexShaderID),Q.push(S.customFragmentShaderID)),S.defines!==void 0)for(const w in S.defines)Q.push(w),Q.push(S.defines[w]);return S.isRawShaderMaterial===!1&&(f(Q,S),I(Q,S),Q.push(t.outputColorSpace)),Q.push(S.customProgramCacheKey),Q.join()}function f(S,Q){S.push(Q.precision),S.push(Q.outputColorSpace),S.push(Q.envMapMode),S.push(Q.envMapCubeUVHeight),S.push(Q.mapUv),S.push(Q.alphaMapUv),S.push(Q.lightMapUv),S.push(Q.aoMapUv),S.push(Q.bumpMapUv),S.push(Q.normalMapUv),S.push(Q.displacementMapUv),S.push(Q.emissiveMapUv),S.push(Q.metalnessMapUv),S.push(Q.roughnessMapUv),S.push(Q.anisotropyMapUv),S.push(Q.clearcoatMapUv),S.push(Q.clearcoatNormalMapUv),S.push(Q.clearcoatRoughnessMapUv),S.push(Q.iridescenceMapUv),S.push(Q.iridescenceThicknessMapUv),S.push(Q.sheenColorMapUv),S.push(Q.sheenRoughnessMapUv),S.push(Q.specularMapUv),S.push(Q.specularColorMapUv),S.push(Q.specularIntensityMapUv),S.push(Q.transmissionMapUv),S.push(Q.thicknessMapUv),S.push(Q.combine),S.push(Q.fogExp2),S.push(Q.sizeAttenuation),S.push(Q.morphTargetsCount),S.push(Q.morphAttributeCount),S.push(Q.numDirLights),S.push(Q.numPointLights),S.push(Q.numSpotLights),S.push(Q.numSpotLightMaps),S.push(Q.numHemiLights),S.push(Q.numRectAreaLights),S.push(Q.numDirLightShadows),S.push(Q.numPointLightShadows),S.push(Q.numSpotLightShadows),S.push(Q.numSpotLightShadowsWithMaps),S.push(Q.numLightProbes),S.push(Q.shadowMapType),S.push(Q.toneMapping),S.push(Q.numClippingPlanes),S.push(Q.numClipIntersection),S.push(Q.depthPacking)}function I(S,Q){a.disableAll(),Q.supportsVertexTextures&&a.enable(0),Q.instancing&&a.enable(1),Q.instancingColor&&a.enable(2),Q.instancingMorph&&a.enable(3),Q.matcap&&a.enable(4),Q.envMap&&a.enable(5),Q.normalMapObjectSpace&&a.enable(6),Q.normalMapTangentSpace&&a.enable(7),Q.clearcoat&&a.enable(8),Q.iridescence&&a.enable(9),Q.alphaTest&&a.enable(10),Q.vertexColors&&a.enable(11),Q.vertexAlphas&&a.enable(12),Q.vertexUv1s&&a.enable(13),Q.vertexUv2s&&a.enable(14),Q.vertexUv3s&&a.enable(15),Q.vertexTangents&&a.enable(16),Q.anisotropy&&a.enable(17),Q.alphaHash&&a.enable(18),Q.batching&&a.enable(19),Q.dispersion&&a.enable(20),Q.batchingColor&&a.enable(21),S.push(a.mask),a.disableAll(),Q.fog&&a.enable(0),Q.useFog&&a.enable(1),Q.flatShading&&a.enable(2),Q.logarithmicDepthBuffer&&a.enable(3),Q.skinning&&a.enable(4),Q.morphTargets&&a.enable(5),Q.morphNormals&&a.enable(6),Q.morphColors&&a.enable(7),Q.premultipliedAlpha&&a.enable(8),Q.shadowMapEnabled&&a.enable(9),Q.doubleSided&&a.enable(10),Q.flipSided&&a.enable(11),Q.useDepthPacking&&a.enable(12),Q.dithering&&a.enable(13),Q.transmission&&a.enable(14),Q.sheen&&a.enable(15),Q.opaque&&a.enable(16),Q.pointsUvs&&a.enable(17),Q.decodeVideoTexture&&a.enable(18),Q.alphaToCoverage&&a.enable(19),S.push(a.mask)}function C(S){const Q=d[S.type];let w;if(Q){const M=I6[Q];w=KVt.clone(M.uniforms)}else w=S.uniforms;return w}function y(S,Q){let w;for(let M=0,k=l.length;M<k;M++){const R=l[M];if(R.cacheKey===Q){w=R,++w.usedTimes;break}}return w===void 0&&(w=new fei(t,Q,S,r),l.push(w)),w}function x(S){if(--S.usedTimes===0){const Q=l.indexOf(S);l[Q]=l[l.length-1],l.pop(),S.destroy()}}function E(S){A.remove(S)}function B(){A.dispose()}return{getParameters:m,getProgramCacheKey:_,getUniforms:C,acquireProgram:y,releaseProgram:x,releaseShaderCache:E,programs:l,dispose:B}}function Eei(){let t=new WeakMap;function e(r){let s=t.get(r);return s===void 0&&(s={},t.set(r,s)),s}function n(r){t.delete(r)}function o(r,s,a){t.get(r)[s]=a}function i(){t=new WeakMap}return{get:e,remove:n,update:o,dispose:i}}function Bei(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function Czt(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function yzt(){const t=[];let e=0;const n=[],o=[],i=[];function r(){e=0,n.length=0,o.length=0,i.length=0}function s(u,g,h,d,p,m){let _=t[e];return _===void 0?(_={id:u.id,object:u,geometry:g,material:h,groupOrder:d,renderOrder:u.renderOrder,z:p,group:m},t[e]=_):(_.id=u.id,_.object=u,_.geometry=g,_.material=h,_.groupOrder=d,_.renderOrder=u.renderOrder,_.z=p,_.group=m),e++,_}function a(u,g,h,d,p,m){const _=s(u,g,h,d,p,m);h.transmission>0?o.push(_):h.transparent===!0?i.push(_):n.push(_)}function A(u,g,h,d,p,m){const _=s(u,g,h,d,p,m);h.transmission>0?o.unshift(_):h.transparent===!0?i.unshift(_):n.unshift(_)}function c(u,g){n.length>1&&n.sort(u||Bei),o.length>1&&o.sort(g||Czt),i.length>1&&i.sort(g||Czt)}function l(){for(let u=e,g=t.length;u<g;u++){const h=t[u];if(h.id===null)break;h.id=null,h.object=null,h.geometry=null,h.material=null,h.group=null}}return{opaque:n,transmissive:o,transparent:i,init:r,push:a,unshift:A,finish:l,sort:c}}function bei(){let t=new WeakMap;function e(o,i){const r=t.get(o);let s;return r===void 0?(s=new yzt,t.set(o,[s])):i>=r.length?(s=new yzt,r.push(s)):s=r[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function Sei(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new jt,color:new Vi};break;case"SpotLight":n={position:new jt,direction:new jt,color:new Vi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new jt,color:new Vi,distance:0,decay:0};break;case"HemisphereLight":n={direction:new jt,skyColor:new Vi,groundColor:new Vi};break;case"RectAreaLight":n={color:new Vi,position:new jt,halfWidth:new jt,halfHeight:new jt};break}return t[e.id]=n,n}}}function Qei(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ni};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ni};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ni,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let vei=0;function wei(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Pei(t){const e=new Sei,n=Qei(),o={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)o.probe.push(new jt);const i=new jt,r=new va,s=new va;function a(c){let l=0,u=0,g=0;for(let S=0;S<9;S++)o.probe[S].set(0,0,0);let h=0,d=0,p=0,m=0,_=0,f=0,I=0,C=0,y=0,x=0,E=0;c.sort(wei);for(let S=0,Q=c.length;S<Q;S++){const w=c[S],M=w.color,k=w.intensity,R=w.distance,F=w.shadow&&w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)l+=M.r*k,u+=M.g*k,g+=M.b*k;else if(w.isLightProbe){for(let O=0;O<9;O++)o.probe[O].addScaledVector(w.sh.coefficients[O],k);E++}else if(w.isDirectionalLight){const O=e.get(w);if(O.color.copy(w.color).multiplyScalar(w.intensity),w.castShadow){const U=w.shadow,Y=n.get(w);Y.shadowBias=U.bias,Y.shadowNormalBias=U.normalBias,Y.shadowRadius=U.radius,Y.shadowMapSize=U.mapSize,o.directionalShadow[h]=Y,o.directionalShadowMap[h]=F,o.directionalShadowMatrix[h]=w.shadow.matrix,f++}o.directional[h]=O,h++}else if(w.isSpotLight){const O=e.get(w);O.position.setFromMatrixPosition(w.matrixWorld),O.color.copy(M).multiplyScalar(k),O.distance=R,O.coneCos=Math.cos(w.angle),O.penumbraCos=Math.cos(w.angle*(1-w.penumbra)),O.decay=w.decay,o.spot[p]=O;const U=w.shadow;if(w.map&&(o.spotLightMap[y]=w.map,y++,U.updateMatrices(w),w.castShadow&&x++),o.spotLightMatrix[p]=U.matrix,w.castShadow){const Y=n.get(w);Y.shadowBias=U.bias,Y.shadowNormalBias=U.normalBias,Y.shadowRadius=U.radius,Y.shadowMapSize=U.mapSize,o.spotShadow[p]=Y,o.spotShadowMap[p]=F,C++}p++}else if(w.isRectAreaLight){const O=e.get(w);O.color.copy(M).multiplyScalar(k),O.halfWidth.set(w.width*.5,0,0),O.halfHeight.set(0,w.height*.5,0),o.rectArea[m]=O,m++}else if(w.isPointLight){const O=e.get(w);if(O.color.copy(w.color).multiplyScalar(w.intensity),O.distance=w.distance,O.decay=w.decay,w.castShadow){const U=w.shadow,Y=n.get(w);Y.shadowBias=U.bias,Y.shadowNormalBias=U.normalBias,Y.shadowRadius=U.radius,Y.shadowMapSize=U.mapSize,Y.shadowCameraNear=U.camera.near,Y.shadowCameraFar=U.camera.far,o.pointShadow[d]=Y,o.pointShadowMap[d]=F,o.pointShadowMatrix[d]=w.shadow.matrix,I++}o.point[d]=O,d++}else if(w.isHemisphereLight){const O=e.get(w);O.skyColor.copy(w.color).multiplyScalar(k),O.groundColor.copy(w.groundColor).multiplyScalar(k),o.hemi[_]=O,_++}}m>0&&(t.has("OES_texture_float_linear")===!0?(o.rectAreaLTC1=or.LTC_FLOAT_1,o.rectAreaLTC2=or.LTC_FLOAT_2):(o.rectAreaLTC1=or.LTC_HALF_1,o.rectAreaLTC2=or.LTC_HALF_2)),o.ambient[0]=l,o.ambient[1]=u,o.ambient[2]=g;const B=o.hash;(B.directionalLength!==h||B.pointLength!==d||B.spotLength!==p||B.rectAreaLength!==m||B.hemiLength!==_||B.numDirectionalShadows!==f||B.numPointShadows!==I||B.numSpotShadows!==C||B.numSpotMaps!==y||B.numLightProbes!==E)&&(o.directional.length=h,o.spot.length=p,o.rectArea.length=m,o.point.length=d,o.hemi.length=_,o.directionalShadow.length=f,o.directionalShadowMap.length=f,o.pointShadow.length=I,o.pointShadowMap.length=I,o.spotShadow.length=C,o.spotShadowMap.length=C,o.directionalShadowMatrix.length=f,o.pointShadowMatrix.length=I,o.spotLightMatrix.length=C+y-x,o.spotLightMap.length=y,o.numSpotLightShadowsWithMaps=x,o.numLightProbes=E,B.directionalLength=h,B.pointLength=d,B.spotLength=p,B.rectAreaLength=m,B.hemiLength=_,B.numDirectionalShadows=f,B.numPointShadows=I,B.numSpotShadows=C,B.numSpotMaps=y,B.numLightProbes=E,o.version=vei++)}function A(c,l){let u=0,g=0,h=0,d=0,p=0;const m=l.matrixWorldInverse;for(let _=0,f=c.length;_<f;_++){const I=c[_];if(I.isDirectionalLight){const C=o.directional[u];C.direction.setFromMatrixPosition(I.matrixWorld),i.setFromMatrixPosition(I.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),u++}else if(I.isSpotLight){const C=o.spot[h];C.position.setFromMatrixPosition(I.matrixWorld),C.position.applyMatrix4(m),C.direction.setFromMatrixPosition(I.matrixWorld),i.setFromMatrixPosition(I.target.matrixWorld),C.direction.sub(i),C.direction.transformDirection(m),h++}else if(I.isRectAreaLight){const C=o.rectArea[d];C.position.setFromMatrixPosition(I.matrixWorld),C.position.applyMatrix4(m),s.identity(),r.copy(I.matrixWorld),r.premultiply(m),s.extractRotation(r),C.halfWidth.set(I.width*.5,0,0),C.halfHeight.set(0,I.height*.5,0),C.halfWidth.applyMatrix4(s),C.halfHeight.applyMatrix4(s),d++}else if(I.isPointLight){const C=o.point[g];C.position.setFromMatrixPosition(I.matrixWorld),C.position.applyMatrix4(m),g++}else if(I.isHemisphereLight){const C=o.hemi[p];C.direction.setFromMatrixPosition(I.matrixWorld),C.direction.transformDirection(m),p++}}}return{setup:a,setupView:A,state:o}}function xzt(t){const e=new Pei(t),n=[],o=[];function i(l){c.camera=l,n.length=0,o.length=0}function r(l){n.push(l)}function s(l){o.push(l)}function a(){e.setup(n)}function A(l){e.setupView(n,l)}const c={lightsArray:n,shadowsArray:o,camera:null,lights:e,transmissionRenderTarget:{}};return{init:i,state:c,setupLights:a,setupLightsView:A,pushLight:r,pushShadow:s}}function Mei(t){let e=new WeakMap;function n(i,r=0){const s=e.get(i);let a;return s===void 0?(a=new xzt(t),e.set(i,[a])):r>=s.length?(a=new xzt(t),s.push(a)):a=s[r],a}function o(){e=new WeakMap}return{get:n,dispose:o}}class Ezt extends Gx{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=qjo,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Bzt extends Gx{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Dei=`void main() {
	gl_Position = vec4( position, 1.0 );
}`,Nei=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
	const float samples = float( VSM_SAMPLES );
	float mean = 0.0;
	float squared_mean = 0.0;
	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
	for ( float i = 0.0; i < samples; i ++ ) {
		float uvOffset = uvStart + i * uvStride;
		#ifdef HORIZONTAL_PASS
			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
			mean += distribution.x;
			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
		#else
			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
			mean += depth;
			squared_mean += depth * depth;
		#endif
	}
	mean = mean / samples;
	squared_mean = squared_mean / samples;
	float std_dev = sqrt( squared_mean - mean * mean );
	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`;function Rei(t,e,n){let o=new STe;const i=new ni,r=new ni,s=new ru,a=new Ezt({depthPacking:mVt}),A=new Bzt,c={},l=n.maxTextureSize,u={[mE]:uI,[uI]:mE,[r_]:r_},g=new f6({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ni},radius:{value:4}},vertexShader:Dei,fragmentShader:Nei}),h=g.clone();h.defines.HORIZONTAL_PASS=1;const d=new Zl;d.setAttribute("position",new tg(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Er(d,g),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bKt;let _=this.type;this.render=function(x,E,B){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||x.length===0)return;const S=t.getRenderTarget(),Q=t.getActiveCubeFace(),w=t.getActiveMipmapLevel(),M=t.state;M.setBlending(zw),M.buffers.color.setClear(1,1,1,1),M.buffers.depth.setTest(!0),M.setScissorTest(!1);const k=_!==qb&&this.type===qb,R=_===qb&&this.type!==qb;for(let F=0,O=x.length;F<O;F++){const U=x[F],Y=U.shadow;if(Y===void 0){console.warn("THREE.WebGLShadowMap:",U,"has no shadow.");continue}if(Y.autoUpdate===!1&&Y.needsUpdate===!1)continue;i.copy(Y.mapSize);const W=Y.getFrameExtents();if(i.multiply(W),r.copy(Y.mapSize),(i.x>l||i.y>l)&&(i.x>l&&(r.x=Math.floor(l/W.x),i.x=r.x*W.x,Y.mapSize.x=r.x),i.y>l&&(r.y=Math.floor(l/W.y),i.y=r.y*W.y,Y.mapSize.y=r.y)),Y.map===null||k===!0||R===!0){const j=this.type!==qb?{minFilter:wC,magFilter:wC}:{};Y.map!==null&&Y.map.dispose(),Y.map=new TR(i.x,i.y,j),Y.map.texture.name=U.name+".shadowMap",Y.camera.updateProjectionMatrix()}t.setRenderTarget(Y.map),t.clear();const te=Y.getViewportCount();for(let j=0;j<te;j++){const J=Y.getViewport(j);s.set(r.x*J.x,r.y*J.y,r.x*J.z,r.y*J.w),M.viewport(s),Y.updateMatrices(U,j),o=Y.getFrustum(),C(E,B,Y.camera,U,this.type)}Y.isPointLightShadow!==!0&&this.type===qb&&f(Y,B),Y.needsUpdate=!1}_=this.type,m.needsUpdate=!1,t.setRenderTarget(S,Q,w)};function f(x,E){const B=e.update(p);g.defines.VSM_SAMPLES!==x.blurSamples&&(g.defines.VSM_SAMPLES=x.blurSamples,h.defines.VSM_SAMPLES=x.blurSamples,g.needsUpdate=!0,h.needsUpdate=!0),x.mapPass===null&&(x.mapPass=new TR(i.x,i.y)),g.uniforms.shadow_pass.value=x.map.texture,g.uniforms.resolution.value=x.mapSize,g.uniforms.radius.value=x.radius,t.setRenderTarget(x.mapPass),t.clear(),t.renderBufferDirect(E,null,B,g,p,null),h.uniforms.shadow_pass.value=x.mapPass.texture,h.uniforms.resolution.value=x.mapSize,h.uniforms.radius.value=x.radius,t.setRenderTarget(x.map),t.clear(),t.renderBufferDirect(E,null,B,h,p,null)}function I(x,E,B,S){let Q=null;const w=B.isPointLight===!0?x.customDistanceMaterial:x.customDepthMaterial;if(w!==void 0)Q=w;else if(Q=B.isPointLight===!0?A:a,t.localClippingEnabled&&E.clipShadows===!0&&Array.isArray(E.clippingPlanes)&&E.clippingPlanes.length!==0||E.displacementMap&&E.displacementScale!==0||E.alphaMap&&E.alphaTest>0||E.map&&E.alphaTest>0){const M=Q.uuid,k=E.uuid;let R=c[M];R===void 0&&(R={},c[M]=R);let F=R[k];F===void 0&&(F=Q.clone(),R[k]=F,E.addEventListener("dispose",y)),Q=F}if(Q.visible=E.visible,Q.wireframe=E.wireframe,S===qb?Q.side=E.shadowSide!==null?E.shadowSide:E.side:Q.side=E.shadowSide!==null?E.shadowSide:u[E.side],Q.alphaMap=E.alphaMap,Q.alphaTest=E.alphaTest,Q.map=E.map,Q.clipShadows=E.clipShadows,Q.clippingPlanes=E.clippingPlanes,Q.clipIntersection=E.clipIntersection,Q.displacementMap=E.displacementMap,Q.displacementScale=E.displacementScale,Q.displacementBias=E.displacementBias,Q.wireframeLinewidth=E.wireframeLinewidth,Q.linewidth=E.linewidth,B.isPointLight===!0&&Q.isMeshDistanceMaterial===!0){const M=t.properties.get(Q);M.light=B}return Q}function C(x,E,B,S,Q){if(x.visible===!1)return;if(x.layers.test(E.layers)&&(x.isMesh||x.isLine||x.isPoints)&&(x.castShadow||x.receiveShadow&&Q===qb)&&(!x.frustumCulled||o.intersectsObject(x))){x.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,x.matrixWorld);const k=e.update(x),R=x.material;if(Array.isArray(R)){const F=k.groups;for(let O=0,U=F.length;O<U;O++){const Y=F[O],W=R[Y.materialIndex];if(W&&W.visible){const te=I(x,W,S,Q);x.onBeforeShadow(t,x,E,B,k,te,Y),t.renderBufferDirect(B,null,k,te,x,Y),x.onAfterShadow(t,x,E,B,k,te,Y)}}}else if(R.visible){const F=I(x,R,S,Q);x.onBeforeShadow(t,x,E,B,k,F,null),t.renderBufferDirect(B,null,k,F,x,null),x.onAfterShadow(t,x,E,B,k,F,null)}}const M=x.children;for(let k=0,R=M.length;k<R;k++)C(M[k],E,B,S,Q)}function y(x){x.target.removeEventListener("dispose",y);for(const B in c){const S=c[B],Q=x.target.uuid;Q in S&&(S[Q].dispose(),delete S[Q])}}}function Tei(t){function e(){let be=!1;const et=new ru;let It=null;const Bt=new ru(0,0,0,0);return{setMask:function(mt){It!==mt&&!be&&(t.colorMask(mt,mt,mt,mt),It=mt)},setLocked:function(mt){be=mt},setClear:function(mt,st,xt,Xe,Ze){Ze===!0&&(mt*=Xe,st*=Xe,xt*=Xe),et.set(mt,st,xt,Xe),Bt.equals(et)===!1&&(t.clearColor(mt,st,xt,Xe),Bt.copy(et))},reset:function(){be=!1,It=null,Bt.set(-1,0,0,0)}}}function n(){let be=!1,et=null,It=null,Bt=null;return{setTest:function(mt){mt?le(t.DEPTH_TEST):ge(t.DEPTH_TEST)},setMask:function(mt){et!==mt&&!be&&(t.depthMask(mt),et=mt)},setFunc:function(mt){if(It!==mt){switch(mt){case Bjo:t.depthFunc(t.NEVER);break;case bjo:t.depthFunc(t.ALWAYS);break;case Sjo:t.depthFunc(t.LESS);break;case _de:t.depthFunc(t.LEQUAL);break;case Qjo:t.depthFunc(t.EQUAL);break;case vjo:t.depthFunc(t.GEQUAL);break;case wjo:t.depthFunc(t.GREATER);break;case Pjo:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}It=mt}},setLocked:function(mt){be=mt},setClear:function(mt){Bt!==mt&&(t.clearDepth(mt),Bt=mt)},reset:function(){be=!1,et=null,It=null,Bt=null}}}function o(){let be=!1,et=null,It=null,Bt=null,mt=null,st=null,xt=null,Xe=null,Ze=null;return{setTest:function(dt){be||(dt?le(t.STENCIL_TEST):ge(t.STENCIL_TEST))},setMask:function(dt){et!==dt&&!be&&(t.stencilMask(dt),et=dt)},setFunc:function(dt,Ut,Wt){(It!==dt||Bt!==Ut||mt!==Wt)&&(t.stencilFunc(dt,Ut,Wt),It=dt,Bt=Ut,mt=Wt)},setOp:function(dt,Ut,Wt){(st!==dt||xt!==Ut||Xe!==Wt)&&(t.stencilOp(dt,Ut,Wt),st=dt,xt=Ut,Xe=Wt)},setLocked:function(dt){be=dt},setClear:function(dt){Ze!==dt&&(t.clearStencil(dt),Ze=dt)},reset:function(){be=!1,et=null,It=null,Bt=null,mt=null,st=null,xt=null,Xe=null,Ze=null}}}const i=new e,r=new n,s=new o,a=new WeakMap,A=new WeakMap;let c={},l={},u=new WeakMap,g=[],h=null,d=!1,p=null,m=null,_=null,f=null,I=null,C=null,y=null,x=new Vi(0,0,0),E=0,B=!1,S=null,Q=null,w=null,M=null,k=null;const R=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let F=!1,O=0;const U=t.getParameter(t.VERSION);U.indexOf("WebGL")!==-1?(O=parseFloat(/^WebGL (\d)/.exec(U)[1]),F=O>=1):U.indexOf("OpenGL ES")!==-1&&(O=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),F=O>=2);let Y=null,W={};const te=t.getParameter(t.SCISSOR_BOX),j=t.getParameter(t.VIEWPORT),J=new ru().fromArray(te),oe=new ru().fromArray(j);function ie(be,et,It,Bt){const mt=new Uint8Array(4),st=t.createTexture();t.bindTexture(be,st),t.texParameteri(be,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(be,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let xt=0;xt<It;xt++)be===t.TEXTURE_3D||be===t.TEXTURE_2D_ARRAY?t.texImage3D(et,0,t.RGBA,1,1,Bt,0,t.RGBA,t.UNSIGNED_BYTE,mt):t.texImage2D(et+xt,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,mt);return st}const ne={};ne[t.TEXTURE_2D]=ie(t.TEXTURE_2D,t.TEXTURE_2D,1),ne[t.TEXTURE_CUBE_MAP]=ie(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),ne[t.TEXTURE_2D_ARRAY]=ie(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),ne[t.TEXTURE_3D]=ie(t.TEXTURE_3D,t.TEXTURE_3D,1,1),i.setClear(0,0,0,1),r.setClear(1),s.setClear(0),le(t.DEPTH_TEST),r.setFunc(_de),he(!1),Qe(BKt),le(t.CULL_FACE),Me(zw);function le(be){c[be]!==!0&&(t.enable(be),c[be]=!0)}function ge(be){c[be]!==!1&&(t.disable(be),c[be]=!1)}function _e(be,et){return l[be]!==et?(t.bindFramebuffer(be,et),l[be]=et,be===t.DRAW_FRAMEBUFFER&&(l[t.FRAMEBUFFER]=et),be===t.FRAMEBUFFER&&(l[t.DRAW_FRAMEBUFFER]=et),!0):!1}function ue(be,et){let It=g,Bt=!1;if(be){It=u.get(et),It===void 0&&(It=[],u.set(et,It));const mt=be.textures;if(It.length!==mt.length||It[0]!==t.COLOR_ATTACHMENT0){for(let st=0,xt=mt.length;st<xt;st++)It[st]=t.COLOR_ATTACHMENT0+st;It.length=mt.length,Bt=!0}}else It[0]!==t.BACK&&(It[0]=t.BACK,Bt=!0);Bt&&t.drawBuffers(It)}function fe(be){return h!==be?(t.useProgram(be),h=be,!0):!1}const pe={[NR]:t.FUNC_ADD,[ajo]:t.FUNC_SUBTRACT,[Ajo]:t.FUNC_REVERSE_SUBTRACT};pe[cjo]=t.MIN,pe[ljo]=t.MAX;const ye={[ujo]:t.ZERO,[gjo]:t.ONE,[djo]:t.SRC_COLOR,[URe]:t.SRC_ALPHA,[Ijo]:t.SRC_ALPHA_SATURATE,[_jo]:t.DST_COLOR,[pjo]:t.DST_ALPHA,[hjo]:t.ONE_MINUS_SRC_COLOR,[KRe]:t.ONE_MINUS_SRC_ALPHA,[fjo]:t.ONE_MINUS_DST_COLOR,[mjo]:t.ONE_MINUS_DST_ALPHA,[Cjo]:t.CONSTANT_COLOR,[yjo]:t.ONE_MINUS_CONSTANT_COLOR,[xjo]:t.CONSTANT_ALPHA,[Ejo]:t.ONE_MINUS_CONSTANT_ALPHA};function Me(be,et,It,Bt,mt,st,xt,Xe,Ze,dt){if(be===zw){d===!0&&(ge(t.BLEND),d=!1);return}if(d===!1&&(le(t.BLEND),d=!0),be!==sjo){if(be!==p||dt!==B){if((m!==NR||I!==NR)&&(t.blendEquation(t.FUNC_ADD),m=NR,I=NR),dt)switch(be){case QG:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case QKt:t.blendFunc(t.ONE,t.ONE);break;case vKt:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case wKt:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",be);break}else switch(be){case QG:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case QKt:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case vKt:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case wKt:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",be);break}_=null,f=null,C=null,y=null,x.set(0,0,0),E=0,p=be,B=dt}return}mt=mt||et,st=st||It,xt=xt||Bt,(et!==m||mt!==I)&&(t.blendEquationSeparate(pe[et],pe[mt]),m=et,I=mt),(It!==_||Bt!==f||st!==C||xt!==y)&&(t.blendFuncSeparate(ye[It],ye[Bt],ye[st],ye[xt]),_=It,f=Bt,C=st,y=xt),(Xe.equals(x)===!1||Ze!==E)&&(t.blendColor(Xe.r,Xe.g,Xe.b,Ze),x.copy(Xe),E=Ze),p=be,B=!1}function ve(be,et){be.side===r_?ge(t.CULL_FACE):le(t.CULL_FACE);let It=be.side===uI;et&&(It=!It),he(It),be.blending===QG&&be.transparent===!1?Me(zw):Me(be.blending,be.blendEquation,be.blendSrc,be.blendDst,be.blendEquationAlpha,be.blendSrcAlpha,be.blendDstAlpha,be.blendColor,be.blendAlpha,be.premultipliedAlpha),r.setFunc(be.depthFunc),r.setTest(be.depthTest),r.setMask(be.depthWrite),i.setMask(be.colorWrite);const Bt=be.stencilWrite;s.setTest(Bt),Bt&&(s.setMask(be.stencilWriteMask),s.setFunc(be.stencilFunc,be.stencilRef,be.stencilFuncMask),s.setOp(be.stencilFail,be.stencilZFail,be.stencilZPass)),we(be.polygonOffset,be.polygonOffsetFactor,be.polygonOffsetUnits),be.alphaToCoverage===!0?le(t.SAMPLE_ALPHA_TO_COVERAGE):ge(t.SAMPLE_ALPHA_TO_COVERAGE)}function he(be){S!==be&&(be?t.frontFace(t.CW):t.frontFace(t.CCW),S=be)}function Qe(be){be!==ijo?(le(t.CULL_FACE),be!==Q&&(be===BKt?t.cullFace(t.BACK):be===rjo?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):ge(t.CULL_FACE),Q=be}function Pe(be){be!==w&&(F&&t.lineWidth(be),w=be)}function we(be,et,It){be?(le(t.POLYGON_OFFSET_FILL),(M!==et||k!==It)&&(t.polygonOffset(et,It),M=et,k=It)):ge(t.POLYGON_OFFSET_FILL)}function Te(be){be?le(t.SCISSOR_TEST):ge(t.SCISSOR_TEST)}function Re(be){be===void 0&&(be=t.TEXTURE0+R-1),Y!==be&&(t.activeTexture(be),Y=be)}function Ee(be,et,It){It===void 0&&(Y===null?It=t.TEXTURE0+R-1:It=Y);let Bt=W[It];Bt===void 0&&(Bt={type:void 0,texture:void 0},W[It]=Bt),(Bt.type!==be||Bt.texture!==et)&&(Y!==It&&(t.activeTexture(It),Y=It),t.bindTexture(be,et||ne[be]),Bt.type=be,Bt.texture=et)}function ke(){const be=W[Y];be!==void 0&&be.type!==void 0&&(t.bindTexture(be.type,null),be.type=void 0,be.texture=void 0)}function Ce(){try{t.compressedTexImage2D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function Le(){try{t.compressedTexImage3D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function Ye(){try{t.texSubImage2D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function tt(){try{t.texSubImage3D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function At(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function at(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function nt(){try{t.texStorage2D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function gt(){try{t.texStorage3D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function bt(){try{t.texImage2D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function Ct(){try{t.texImage3D.apply(t,arguments)}catch(be){console.error("THREE.WebGLState:",be)}}function Dt(be){J.equals(be)===!1&&(t.scissor(be.x,be.y,be.z,be.w),J.copy(be))}function kt(be){oe.equals(be)===!1&&(t.viewport(be.x,be.y,be.z,be.w),oe.copy(be))}function it(be,et){let It=A.get(et);It===void 0&&(It=new WeakMap,A.set(et,It));let Bt=It.get(be);Bt===void 0&&(Bt=t.getUniformBlockIndex(et,be.name),It.set(be,Bt))}function Yt(be,et){const Bt=A.get(et).get(be);a.get(et)!==Bt&&(t.uniformBlockBinding(et,Bt,be.__bindingPointIndex),a.set(et,Bt))}function pn(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),c={},Y=null,W={},l={},u=new WeakMap,g=[],h=null,d=!1,p=null,m=null,_=null,f=null,I=null,C=null,y=null,x=new Vi(0,0,0),E=0,B=!1,S=null,Q=null,w=null,M=null,k=null,J.set(0,0,t.canvas.width,t.canvas.height),oe.set(0,0,t.canvas.width,t.canvas.height),i.reset(),r.reset(),s.reset()}return{buffers:{color:i,depth:r,stencil:s},enable:le,disable:ge,bindFramebuffer:_e,drawBuffers:ue,useProgram:fe,setBlending:Me,setMaterial:ve,setFlipSided:he,setCullFace:Qe,setLineWidth:Pe,setPolygonOffset:we,setScissorTest:Te,activeTexture:Re,bindTexture:Ee,unbindTexture:ke,compressedTexImage2D:Ce,compressedTexImage3D:Le,texImage2D:bt,texImage3D:Ct,updateUBOMapping:it,uniformBlockBinding:Yt,texStorage2D:nt,texStorage3D:gt,texSubImage2D:Ye,texSubImage3D:tt,compressedTexSubImage2D:At,compressedTexSubImage3D:at,scissor:Dt,viewport:kt,reset:pn}}function kei(t,e,n,o,i,r,s){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,A=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new ni,l=new WeakMap;let u;const g=new WeakMap;let h=!1;try{h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function d(Re,Ee){return h?new OffscreenCanvas(Re,Ee):Lq("canvas")}function p(Re,Ee,ke){let Ce=1;const Le=Te(Re);if((Le.width>ke||Le.height>ke)&&(Ce=ke/Math.max(Le.width,Le.height)),Ce<1)if(typeof HTMLImageElement<"u"&&Re instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Re instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Re instanceof ImageBitmap||typeof VideoFrame<"u"&&Re instanceof VideoFrame){const Ye=Math.floor(Ce*Le.width),tt=Math.floor(Ce*Le.height);u===void 0&&(u=d(Ye,tt));const At=Ee?d(Ye,tt):u;return At.width=Ye,At.height=tt,At.getContext("2d").drawImage(Re,0,0,Ye,tt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Le.width+"x"+Le.height+") to ("+Ye+"x"+tt+")."),At}else return"data"in Re&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Le.width+"x"+Le.height+")."),Re;return Re}function m(Re){return Re.generateMipmaps&&Re.minFilter!==wC&&Re.minFilter!==Fl}function _(Re){t.generateMipmap(Re)}function f(Re,Ee,ke,Ce,Le=!1){if(Re!==null){if(t[Re]!==void 0)return t[Re];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Re+"'")}let Ye=Ee;if(Ee===t.RED&&(ke===t.FLOAT&&(Ye=t.R32F),ke===t.HALF_FLOAT&&(Ye=t.R16F),ke===t.UNSIGNED_BYTE&&(Ye=t.R8)),Ee===t.RED_INTEGER&&(ke===t.UNSIGNED_BYTE&&(Ye=t.R8UI),ke===t.UNSIGNED_SHORT&&(Ye=t.R16UI),ke===t.UNSIGNED_INT&&(Ye=t.R32UI),ke===t.BYTE&&(Ye=t.R8I),ke===t.SHORT&&(Ye=t.R16I),ke===t.INT&&(Ye=t.R32I)),Ee===t.RG&&(ke===t.FLOAT&&(Ye=t.RG32F),ke===t.HALF_FLOAT&&(Ye=t.RG16F),ke===t.UNSIGNED_BYTE&&(Ye=t.RG8)),Ee===t.RG_INTEGER&&(ke===t.UNSIGNED_BYTE&&(Ye=t.RG8UI),ke===t.UNSIGNED_SHORT&&(Ye=t.RG16UI),ke===t.UNSIGNED_INT&&(Ye=t.RG32UI),ke===t.BYTE&&(Ye=t.RG8I),ke===t.SHORT&&(Ye=t.RG16I),ke===t.INT&&(Ye=t.RG32I)),Ee===t.RGB&&ke===t.UNSIGNED_INT_5_9_9_9_REV&&(Ye=t.RGB9_E5),Ee===t.RGBA){const tt=Le?Ede:iu.getTransfer(Ce);ke===t.FLOAT&&(Ye=t.RGBA32F),ke===t.HALF_FLOAT&&(Ye=t.RGBA16F),ke===t.UNSIGNED_BYTE&&(Ye=tt===Ed?t.SRGB8_ALPHA8:t.RGBA8),ke===t.UNSIGNED_SHORT_4_4_4_4&&(Ye=t.RGBA4),ke===t.UNSIGNED_SHORT_5_5_5_1&&(Ye=t.RGB5_A1)}return(Ye===t.R16F||Ye===t.R32F||Ye===t.RG16F||Ye===t.RG32F||Ye===t.RGBA16F||Ye===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ye}function I(Re,Ee){let ke;return Re?Ee===null||Ee===MG||Ee===DG?ke=t.DEPTH24_STENCIL8:Ee===m6?ke=t.DEPTH32F_STENCIL8:Ee===Cde&&(ke=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):Ee===null||Ee===MG||Ee===DG?ke=t.DEPTH_COMPONENT24:Ee===m6?ke=t.DEPTH_COMPONENT32F:Ee===Cde&&(ke=t.DEPTH_COMPONENT16),ke}function C(Re,Ee){return m(Re)===!0||Re.isFramebufferTexture&&Re.minFilter!==wC&&Re.minFilter!==Fl?Math.log2(Math.max(Ee.width,Ee.height))+1:Re.mipmaps!==void 0&&Re.mipmaps.length>0?Re.mipmaps.length:Re.isCompressedTexture&&Array.isArray(Re.image)?Ee.mipmaps.length:1}function y(Re){const Ee=Re.target;Ee.removeEventListener("dispose",y),E(Ee),Ee.isVideoTexture&&l.delete(Ee)}function x(Re){const Ee=Re.target;Ee.removeEventListener("dispose",x),S(Ee)}function E(Re){const Ee=o.get(Re);if(Ee.__webglInit===void 0)return;const ke=Re.source,Ce=g.get(ke);if(Ce){const Le=Ce[Ee.__cacheKey];Le.usedTimes--,Le.usedTimes===0&&B(Re),Object.keys(Ce).length===0&&g.delete(ke)}o.remove(Re)}function B(Re){const Ee=o.get(Re);t.deleteTexture(Ee.__webglTexture);const ke=Re.source,Ce=g.get(ke);delete Ce[Ee.__cacheKey],s.memory.textures--}function S(Re){const Ee=o.get(Re);if(Re.depthTexture&&Re.depthTexture.dispose(),Re.isWebGLCubeRenderTarget)for(let Ce=0;Ce<6;Ce++){if(Array.isArray(Ee.__webglFramebuffer[Ce]))for(let Le=0;Le<Ee.__webglFramebuffer[Ce].length;Le++)t.deleteFramebuffer(Ee.__webglFramebuffer[Ce][Le]);else t.deleteFramebuffer(Ee.__webglFramebuffer[Ce]);Ee.__webglDepthbuffer&&t.deleteRenderbuffer(Ee.__webglDepthbuffer[Ce])}else{if(Array.isArray(Ee.__webglFramebuffer))for(let Ce=0;Ce<Ee.__webglFramebuffer.length;Ce++)t.deleteFramebuffer(Ee.__webglFramebuffer[Ce]);else t.deleteFramebuffer(Ee.__webglFramebuffer);if(Ee.__webglDepthbuffer&&t.deleteRenderbuffer(Ee.__webglDepthbuffer),Ee.__webglMultisampledFramebuffer&&t.deleteFramebuffer(Ee.__webglMultisampledFramebuffer),Ee.__webglColorRenderbuffer)for(let Ce=0;Ce<Ee.__webglColorRenderbuffer.length;Ce++)Ee.__webglColorRenderbuffer[Ce]&&t.deleteRenderbuffer(Ee.__webglColorRenderbuffer[Ce]);Ee.__webglDepthRenderbuffer&&t.deleteRenderbuffer(Ee.__webglDepthRenderbuffer)}const ke=Re.textures;for(let Ce=0,Le=ke.length;Ce<Le;Ce++){const Ye=o.get(ke[Ce]);Ye.__webglTexture&&(t.deleteTexture(Ye.__webglTexture),s.memory.textures--),o.remove(ke[Ce])}o.remove(Re)}let Q=0;function w(){Q=0}function M(){const Re=Q;return Re>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+Re+" texture units while this GPU supports only "+i.maxTextures),Q+=1,Re}function k(Re){const Ee=[];return Ee.push(Re.wrapS),Ee.push(Re.wrapT),Ee.push(Re.wrapR||0),Ee.push(Re.magFilter),Ee.push(Re.minFilter),Ee.push(Re.anisotropy),Ee.push(Re.internalFormat),Ee.push(Re.format),Ee.push(Re.type),Ee.push(Re.generateMipmaps),Ee.push(Re.premultiplyAlpha),Ee.push(Re.flipY),Ee.push(Re.unpackAlignment),Ee.push(Re.colorSpace),Ee.join()}function R(Re,Ee){const ke=o.get(Re);if(Re.isVideoTexture&&Pe(Re),Re.isRenderTargetTexture===!1&&Re.version>0&&ke.__version!==Re.version){const Ce=Re.image;if(Ce===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ce.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{oe(ke,Re,Ee);return}}n.bindTexture(t.TEXTURE_2D,ke.__webglTexture,t.TEXTURE0+Ee)}function F(Re,Ee){const ke=o.get(Re);if(Re.version>0&&ke.__version!==Re.version){oe(ke,Re,Ee);return}n.bindTexture(t.TEXTURE_2D_ARRAY,ke.__webglTexture,t.TEXTURE0+Ee)}function O(Re,Ee){const ke=o.get(Re);if(Re.version>0&&ke.__version!==Re.version){oe(ke,Re,Ee);return}n.bindTexture(t.TEXTURE_3D,ke.__webglTexture,t.TEXTURE0+Ee)}function U(Re,Ee){const ke=o.get(Re);if(Re.version>0&&ke.__version!==Re.version){ie(ke,Re,Ee);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ke.__webglTexture,t.TEXTURE0+Ee)}const Y={[c4]:t.REPEAT,[Xy]:t.CLAMP_TO_EDGE,[Tq]:t.MIRRORED_REPEAT},W={[wC]:t.NEAREST,[JRe]:t.NEAREST_MIPMAP_NEAREST,[PG]:t.NEAREST_MIPMAP_LINEAR,[Fl]:t.LINEAR,[kq]:t.LINEAR_MIPMAP_NEAREST,[gm]:t.LINEAR_MIPMAP_LINEAR},te={[Zjo]:t.NEVER,[r$o]:t.ALWAYS,[e$o]:t.LESS,[fVt]:t.LEQUAL,[t$o]:t.EQUAL,[i$o]:t.GEQUAL,[n$o]:t.GREATER,[o$o]:t.NOTEQUAL};function j(Re,Ee){if(Ee.type===m6&&e.has("OES_texture_float_linear")===!1&&(Ee.magFilter===Fl||Ee.magFilter===kq||Ee.magFilter===PG||Ee.magFilter===gm||Ee.minFilter===Fl||Ee.minFilter===kq||Ee.minFilter===PG||Ee.minFilter===gm)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(Re,t.TEXTURE_WRAP_S,Y[Ee.wrapS]),t.texParameteri(Re,t.TEXTURE_WRAP_T,Y[Ee.wrapT]),(Re===t.TEXTURE_3D||Re===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Re,t.TEXTURE_WRAP_R,Y[Ee.wrapR]),t.texParameteri(Re,t.TEXTURE_MAG_FILTER,W[Ee.magFilter]),t.texParameteri(Re,t.TEXTURE_MIN_FILTER,W[Ee.minFilter]),Ee.compareFunction&&(t.texParameteri(Re,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(Re,t.TEXTURE_COMPARE_FUNC,te[Ee.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(Ee.magFilter===wC||Ee.minFilter!==PG&&Ee.minFilter!==gm||Ee.type===m6&&e.has("OES_texture_float_linear")===!1)return;if(Ee.anisotropy>1||o.get(Ee).__currentAnisotropy){const ke=e.get("EXT_texture_filter_anisotropic");t.texParameterf(Re,ke.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Ee.anisotropy,i.getMaxAnisotropy())),o.get(Ee).__currentAnisotropy=Ee.anisotropy}}}function J(Re,Ee){let ke=!1;Re.__webglInit===void 0&&(Re.__webglInit=!0,Ee.addEventListener("dispose",y));const Ce=Ee.source;let Le=g.get(Ce);Le===void 0&&(Le={},g.set(Ce,Le));const Ye=k(Ee);if(Ye!==Re.__cacheKey){Le[Ye]===void 0&&(Le[Ye]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,ke=!0),Le[Ye].usedTimes++;const tt=Le[Re.__cacheKey];tt!==void 0&&(Le[Re.__cacheKey].usedTimes--,tt.usedTimes===0&&B(Ee)),Re.__cacheKey=Ye,Re.__webglTexture=Le[Ye].texture}return ke}function oe(Re,Ee,ke){let Ce=t.TEXTURE_2D;(Ee.isDataArrayTexture||Ee.isCompressedArrayTexture)&&(Ce=t.TEXTURE_2D_ARRAY),Ee.isData3DTexture&&(Ce=t.TEXTURE_3D);const Le=J(Re,Ee),Ye=Ee.source;n.bindTexture(Ce,Re.__webglTexture,t.TEXTURE0+ke);const tt=o.get(Ye);if(Ye.version!==tt.__version||Le===!0){n.activeTexture(t.TEXTURE0+ke);const At=iu.getPrimaries(iu.workingColorSpace),at=Ee.colorSpace===_6?null:iu.getPrimaries(Ee.colorSpace),nt=Ee.colorSpace===_6||At===at?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,Ee.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ee.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,Ee.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,nt);let gt=p(Ee.image,!1,i.maxTextureSize);gt=we(Ee,gt);const bt=r.convert(Ee.format,Ee.colorSpace),Ct=r.convert(Ee.type);let Dt=f(Ee.internalFormat,bt,Ct,Ee.colorSpace,Ee.isVideoTexture);j(Ce,Ee);let kt;const it=Ee.mipmaps,Yt=Ee.isVideoTexture!==!0,pn=tt.__version===void 0||Le===!0,be=Ye.dataReady,et=C(Ee,gt);if(Ee.isDepthTexture)Dt=I(Ee.format===RG,Ee.type),pn&&(Yt?n.texStorage2D(t.TEXTURE_2D,1,Dt,gt.width,gt.height):n.texImage2D(t.TEXTURE_2D,0,Dt,gt.width,gt.height,0,bt,Ct,null));else if(Ee.isDataTexture)if(it.length>0){Yt&&pn&&n.texStorage2D(t.TEXTURE_2D,et,Dt,it[0].width,it[0].height);for(let It=0,Bt=it.length;It<Bt;It++)kt=it[It],Yt?be&&n.texSubImage2D(t.TEXTURE_2D,It,0,0,kt.width,kt.height,bt,Ct,kt.data):n.texImage2D(t.TEXTURE_2D,It,Dt,kt.width,kt.height,0,bt,Ct,kt.data);Ee.generateMipmaps=!1}else Yt?(pn&&n.texStorage2D(t.TEXTURE_2D,et,Dt,gt.width,gt.height),be&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,gt.width,gt.height,bt,Ct,gt.data)):n.texImage2D(t.TEXTURE_2D,0,Dt,gt.width,gt.height,0,bt,Ct,gt.data);else if(Ee.isCompressedTexture)if(Ee.isCompressedArrayTexture){Yt&&pn&&n.texStorage3D(t.TEXTURE_2D_ARRAY,et,Dt,it[0].width,it[0].height,gt.depth);for(let It=0,Bt=it.length;It<Bt;It++)if(kt=it[It],Ee.format!==l4)if(bt!==null)if(Yt){if(be)if(Ee.layerUpdates.size>0){for(const mt of Ee.layerUpdates){const st=kt.width*kt.height;n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,It,0,0,mt,kt.width,kt.height,1,bt,kt.data.slice(st*mt,st*(mt+1)),0,0)}Ee.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,It,0,0,0,kt.width,kt.height,gt.depth,bt,kt.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,It,Dt,kt.width,kt.height,gt.depth,0,kt.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Yt?be&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,It,0,0,0,kt.width,kt.height,gt.depth,bt,Ct,kt.data):n.texImage3D(t.TEXTURE_2D_ARRAY,It,Dt,kt.width,kt.height,gt.depth,0,bt,Ct,kt.data)}else{Yt&&pn&&n.texStorage2D(t.TEXTURE_2D,et,Dt,it[0].width,it[0].height);for(let It=0,Bt=it.length;It<Bt;It++)kt=it[It],Ee.format!==l4?bt!==null?Yt?be&&n.compressedTexSubImage2D(t.TEXTURE_2D,It,0,0,kt.width,kt.height,bt,kt.data):n.compressedTexImage2D(t.TEXTURE_2D,It,Dt,kt.width,kt.height,0,kt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Yt?be&&n.texSubImage2D(t.TEXTURE_2D,It,0,0,kt.width,kt.height,bt,Ct,kt.data):n.texImage2D(t.TEXTURE_2D,It,Dt,kt.width,kt.height,0,bt,Ct,kt.data)}else if(Ee.isDataArrayTexture)if(Yt){if(pn&&n.texStorage3D(t.TEXTURE_2D_ARRAY,et,Dt,gt.width,gt.height,gt.depth),be)if(Ee.layerUpdates.size>0){let It;switch(Ct){case t.UNSIGNED_BYTE:switch(bt){case t.ALPHA:It=1;break;case t.LUMINANCE:It=1;break;case t.LUMINANCE_ALPHA:It=2;break;case t.RGB:It=3;break;case t.RGBA:It=4;break;default:throw new Error(`Unknown texel size for format ${bt}.`)}break;case t.UNSIGNED_SHORT_4_4_4_4:case t.UNSIGNED_SHORT_5_5_5_1:case t.UNSIGNED_SHORT_5_6_5:It=1;break;default:throw new Error(`Unknown texel size for type ${Ct}.`)}const Bt=gt.width*gt.height*It;for(const mt of Ee.layerUpdates)n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,mt,gt.width,gt.height,1,bt,Ct,gt.data.slice(Bt*mt,Bt*(mt+1)));Ee.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,gt.width,gt.height,gt.depth,bt,Ct,gt.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,Dt,gt.width,gt.height,gt.depth,0,bt,Ct,gt.data);else if(Ee.isData3DTexture)Yt?(pn&&n.texStorage3D(t.TEXTURE_3D,et,Dt,gt.width,gt.height,gt.depth),be&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,gt.width,gt.height,gt.depth,bt,Ct,gt.data)):n.texImage3D(t.TEXTURE_3D,0,Dt,gt.width,gt.height,gt.depth,0,bt,Ct,gt.data);else if(Ee.isFramebufferTexture){if(pn)if(Yt)n.texStorage2D(t.TEXTURE_2D,et,Dt,gt.width,gt.height);else{let It=gt.width,Bt=gt.height;for(let mt=0;mt<et;mt++)n.texImage2D(t.TEXTURE_2D,mt,Dt,It,Bt,0,bt,Ct,null),It>>=1,Bt>>=1}}else if(it.length>0){if(Yt&&pn){const It=Te(it[0]);n.texStorage2D(t.TEXTURE_2D,et,Dt,It.width,It.height)}for(let It=0,Bt=it.length;It<Bt;It++)kt=it[It],Yt?be&&n.texSubImage2D(t.TEXTURE_2D,It,0,0,bt,Ct,kt):n.texImage2D(t.TEXTURE_2D,It,Dt,bt,Ct,kt);Ee.generateMipmaps=!1}else if(Yt){if(pn){const It=Te(gt);n.texStorage2D(t.TEXTURE_2D,et,Dt,It.width,It.height)}be&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,bt,Ct,gt)}else n.texImage2D(t.TEXTURE_2D,0,Dt,bt,Ct,gt);m(Ee)&&_(Ce),tt.__version=Ye.version,Ee.onUpdate&&Ee.onUpdate(Ee)}Re.__version=Ee.version}function ie(Re,Ee,ke){if(Ee.image.length!==6)return;const Ce=J(Re,Ee),Le=Ee.source;n.bindTexture(t.TEXTURE_CUBE_MAP,Re.__webglTexture,t.TEXTURE0+ke);const Ye=o.get(Le);if(Le.version!==Ye.__version||Ce===!0){n.activeTexture(t.TEXTURE0+ke);const tt=iu.getPrimaries(iu.workingColorSpace),At=Ee.colorSpace===_6?null:iu.getPrimaries(Ee.colorSpace),at=Ee.colorSpace===_6||tt===At?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,Ee.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ee.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,Ee.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,at);const nt=Ee.isCompressedTexture||Ee.image[0].isCompressedTexture,gt=Ee.image[0]&&Ee.image[0].isDataTexture,bt=[];for(let Bt=0;Bt<6;Bt++)!nt&&!gt?bt[Bt]=p(Ee.image[Bt],!0,i.maxCubemapSize):bt[Bt]=gt?Ee.image[Bt].image:Ee.image[Bt],bt[Bt]=we(Ee,bt[Bt]);const Ct=bt[0],Dt=r.convert(Ee.format,Ee.colorSpace),kt=r.convert(Ee.type),it=f(Ee.internalFormat,Dt,kt,Ee.colorSpace),Yt=Ee.isVideoTexture!==!0,pn=Ye.__version===void 0||Ce===!0,be=Le.dataReady;let et=C(Ee,Ct);j(t.TEXTURE_CUBE_MAP,Ee);let It;if(nt){Yt&&pn&&n.texStorage2D(t.TEXTURE_CUBE_MAP,et,it,Ct.width,Ct.height);for(let Bt=0;Bt<6;Bt++){It=bt[Bt].mipmaps;for(let mt=0;mt<It.length;mt++){const st=It[mt];Ee.format!==l4?Dt!==null?Yt?be&&n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,0,0,st.width,st.height,Dt,st.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,it,st.width,st.height,0,st.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Yt?be&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,0,0,st.width,st.height,Dt,kt,st.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt,it,st.width,st.height,0,Dt,kt,st.data)}}}else{if(It=Ee.mipmaps,Yt&&pn){It.length>0&&et++;const Bt=Te(bt[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,et,it,Bt.width,Bt.height)}for(let Bt=0;Bt<6;Bt++)if(gt){Yt?be&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,0,0,bt[Bt].width,bt[Bt].height,Dt,kt,bt[Bt].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,it,bt[Bt].width,bt[Bt].height,0,Dt,kt,bt[Bt].data);for(let mt=0;mt<It.length;mt++){const xt=It[mt].image[Bt].image;Yt?be&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,0,0,xt.width,xt.height,Dt,kt,xt.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,it,xt.width,xt.height,0,Dt,kt,xt.data)}}else{Yt?be&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,0,0,Dt,kt,bt[Bt]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,0,it,Dt,kt,bt[Bt]);for(let mt=0;mt<It.length;mt++){const st=It[mt];Yt?be&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,0,0,Dt,kt,st.image[Bt]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Bt,mt+1,it,Dt,kt,st.image[Bt])}}}m(Ee)&&_(t.TEXTURE_CUBE_MAP),Ye.__version=Le.version,Ee.onUpdate&&Ee.onUpdate(Ee)}Re.__version=Ee.version}function ne(Re,Ee,ke,Ce,Le,Ye){const tt=r.convert(ke.format,ke.colorSpace),At=r.convert(ke.type),at=f(ke.internalFormat,tt,At,ke.colorSpace);if(!o.get(Ee).__hasExternalTextures){const gt=Math.max(1,Ee.width>>Ye),bt=Math.max(1,Ee.height>>Ye);Le===t.TEXTURE_3D||Le===t.TEXTURE_2D_ARRAY?n.texImage3D(Le,Ye,at,gt,bt,Ee.depth,0,tt,At,null):n.texImage2D(Le,Ye,at,gt,bt,0,tt,At,null)}n.bindFramebuffer(t.FRAMEBUFFER,Re),Qe(Ee)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Ce,Le,o.get(ke).__webglTexture,0,he(Ee)):(Le===t.TEXTURE_2D||Le>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Le<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,Ce,Le,o.get(ke).__webglTexture,Ye),n.bindFramebuffer(t.FRAMEBUFFER,null)}function le(Re,Ee,ke){if(t.bindRenderbuffer(t.RENDERBUFFER,Re),Ee.depthBuffer){const Ce=Ee.depthTexture,Le=Ce&&Ce.isDepthTexture?Ce.type:null,Ye=I(Ee.stencilBuffer,Le),tt=Ee.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,At=he(Ee);Qe(Ee)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,At,Ye,Ee.width,Ee.height):ke?t.renderbufferStorageMultisample(t.RENDERBUFFER,At,Ye,Ee.width,Ee.height):t.renderbufferStorage(t.RENDERBUFFER,Ye,Ee.width,Ee.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,tt,t.RENDERBUFFER,Re)}else{const Ce=Ee.textures;for(let Le=0;Le<Ce.length;Le++){const Ye=Ce[Le],tt=r.convert(Ye.format,Ye.colorSpace),At=r.convert(Ye.type),at=f(Ye.internalFormat,tt,At,Ye.colorSpace),nt=he(Ee);ke&&Qe(Ee)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,nt,at,Ee.width,Ee.height):Qe(Ee)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,nt,at,Ee.width,Ee.height):t.renderbufferStorage(t.RENDERBUFFER,at,Ee.width,Ee.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function ge(Re,Ee){if(Ee&&Ee.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,Re),!(Ee.depthTexture&&Ee.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!o.get(Ee.depthTexture).__webglTexture||Ee.depthTexture.image.width!==Ee.width||Ee.depthTexture.image.height!==Ee.height)&&(Ee.depthTexture.image.width=Ee.width,Ee.depthTexture.image.height=Ee.height,Ee.depthTexture.needsUpdate=!0),R(Ee.depthTexture,0);const Ce=o.get(Ee.depthTexture).__webglTexture,Le=he(Ee);if(Ee.depthTexture.format===NG)Qe(Ee)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Ce,0,Le):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Ce,0);else if(Ee.depthTexture.format===RG)Qe(Ee)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Ce,0,Le):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Ce,0);else throw new Error("Unknown depthTexture format")}function _e(Re){const Ee=o.get(Re),ke=Re.isWebGLCubeRenderTarget===!0;if(Re.depthTexture&&!Ee.__autoAllocateDepthBuffer){if(ke)throw new Error("target.depthTexture not supported in Cube render targets");ge(Ee.__webglFramebuffer,Re)}else if(ke){Ee.__webglDepthbuffer=[];for(let Ce=0;Ce<6;Ce++)n.bindFramebuffer(t.FRAMEBUFFER,Ee.__webglFramebuffer[Ce]),Ee.__webglDepthbuffer[Ce]=t.createRenderbuffer(),le(Ee.__webglDepthbuffer[Ce],Re,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,Ee.__webglFramebuffer),Ee.__webglDepthbuffer=t.createRenderbuffer(),le(Ee.__webglDepthbuffer,Re,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function ue(Re,Ee,ke){const Ce=o.get(Re);Ee!==void 0&&ne(Ce.__webglFramebuffer,Re,Re.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ke!==void 0&&_e(Re)}function fe(Re){const Ee=Re.texture,ke=o.get(Re),Ce=o.get(Ee);Re.addEventListener("dispose",x);const Le=Re.textures,Ye=Re.isWebGLCubeRenderTarget===!0,tt=Le.length>1;if(tt||(Ce.__webglTexture===void 0&&(Ce.__webglTexture=t.createTexture()),Ce.__version=Ee.version,s.memory.textures++),Ye){ke.__webglFramebuffer=[];for(let At=0;At<6;At++)if(Ee.mipmaps&&Ee.mipmaps.length>0){ke.__webglFramebuffer[At]=[];for(let at=0;at<Ee.mipmaps.length;at++)ke.__webglFramebuffer[At][at]=t.createFramebuffer()}else ke.__webglFramebuffer[At]=t.createFramebuffer()}else{if(Ee.mipmaps&&Ee.mipmaps.length>0){ke.__webglFramebuffer=[];for(let At=0;At<Ee.mipmaps.length;At++)ke.__webglFramebuffer[At]=t.createFramebuffer()}else ke.__webglFramebuffer=t.createFramebuffer();if(tt)for(let At=0,at=Le.length;At<at;At++){const nt=o.get(Le[At]);nt.__webglTexture===void 0&&(nt.__webglTexture=t.createTexture(),s.memory.textures++)}if(Re.samples>0&&Qe(Re)===!1){ke.__webglMultisampledFramebuffer=t.createFramebuffer(),ke.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ke.__webglMultisampledFramebuffer);for(let At=0;At<Le.length;At++){const at=Le[At];ke.__webglColorRenderbuffer[At]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,ke.__webglColorRenderbuffer[At]);const nt=r.convert(at.format,at.colorSpace),gt=r.convert(at.type),bt=f(at.internalFormat,nt,gt,at.colorSpace,Re.isXRRenderTarget===!0),Ct=he(Re);t.renderbufferStorageMultisample(t.RENDERBUFFER,Ct,bt,Re.width,Re.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+At,t.RENDERBUFFER,ke.__webglColorRenderbuffer[At])}t.bindRenderbuffer(t.RENDERBUFFER,null),Re.depthBuffer&&(ke.__webglDepthRenderbuffer=t.createRenderbuffer(),le(ke.__webglDepthRenderbuffer,Re,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(Ye){n.bindTexture(t.TEXTURE_CUBE_MAP,Ce.__webglTexture),j(t.TEXTURE_CUBE_MAP,Ee);for(let At=0;At<6;At++)if(Ee.mipmaps&&Ee.mipmaps.length>0)for(let at=0;at<Ee.mipmaps.length;at++)ne(ke.__webglFramebuffer[At][at],Re,Ee,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+At,at);else ne(ke.__webglFramebuffer[At],Re,Ee,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+At,0);m(Ee)&&_(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(tt){for(let At=0,at=Le.length;At<at;At++){const nt=Le[At],gt=o.get(nt);n.bindTexture(t.TEXTURE_2D,gt.__webglTexture),j(t.TEXTURE_2D,nt),ne(ke.__webglFramebuffer,Re,nt,t.COLOR_ATTACHMENT0+At,t.TEXTURE_2D,0),m(nt)&&_(t.TEXTURE_2D)}n.unbindTexture()}else{let At=t.TEXTURE_2D;if((Re.isWebGL3DRenderTarget||Re.isWebGLArrayRenderTarget)&&(At=Re.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(At,Ce.__webglTexture),j(At,Ee),Ee.mipmaps&&Ee.mipmaps.length>0)for(let at=0;at<Ee.mipmaps.length;at++)ne(ke.__webglFramebuffer[at],Re,Ee,t.COLOR_ATTACHMENT0,At,at);else ne(ke.__webglFramebuffer,Re,Ee,t.COLOR_ATTACHMENT0,At,0);m(Ee)&&_(At),n.unbindTexture()}Re.depthBuffer&&_e(Re)}function pe(Re){const Ee=Re.textures;for(let ke=0,Ce=Ee.length;ke<Ce;ke++){const Le=Ee[ke];if(m(Le)){const Ye=Re.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,tt=o.get(Le).__webglTexture;n.bindTexture(Ye,tt),_(Ye),n.unbindTexture()}}}const ye=[],Me=[];function ve(Re){if(Re.samples>0){if(Qe(Re)===!1){const Ee=Re.textures,ke=Re.width,Ce=Re.height;let Le=t.COLOR_BUFFER_BIT;const Ye=Re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,tt=o.get(Re),At=Ee.length>1;if(At)for(let at=0;at<Ee.length;at++)n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,tt.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,tt.__webglFramebuffer);for(let at=0;at<Ee.length;at++){if(Re.resolveDepthBuffer&&(Re.depthBuffer&&(Le|=t.DEPTH_BUFFER_BIT),Re.stencilBuffer&&Re.resolveStencilBuffer&&(Le|=t.STENCIL_BUFFER_BIT)),At){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,tt.__webglColorRenderbuffer[at]);const nt=o.get(Ee[at]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,nt,0)}t.blitFramebuffer(0,0,ke,Ce,0,0,ke,Ce,Le,t.NEAREST),A===!0&&(ye.length=0,Me.length=0,ye.push(t.COLOR_ATTACHMENT0+at),Re.depthBuffer&&Re.resolveDepthBuffer===!1&&(ye.push(Ye),Me.push(Ye),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,Me)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,ye))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),At)for(let at=0;at<Ee.length;at++){n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.RENDERBUFFER,tt.__webglColorRenderbuffer[at]);const nt=o.get(Ee[at]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,tt.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+at,t.TEXTURE_2D,nt,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,tt.__webglMultisampledFramebuffer)}else if(Re.depthBuffer&&Re.resolveDepthBuffer===!1&&A){const Ee=Re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[Ee])}}}function he(Re){return Math.min(i.maxSamples,Re.samples)}function Qe(Re){const Ee=o.get(Re);return Re.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&Ee.__useRenderToTexture!==!1}function Pe(Re){const Ee=s.render.frame;l.get(Re)!==Ee&&(l.set(Re,Ee),Re.update())}function we(Re,Ee){const ke=Re.colorSpace,Ce=Re.format,Le=Re.type;return Re.isCompressedTexture===!0||Re.isVideoTexture===!0||ke!==jw&&ke!==_6&&(iu.getTransfer(ke)===Ed?(Ce!==l4||Le!==Ww)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ke)),Ee}function Te(Re){return typeof HTMLImageElement<"u"&&Re instanceof HTMLImageElement?(c.width=Re.naturalWidth||Re.width,c.height=Re.naturalHeight||Re.height):typeof VideoFrame<"u"&&Re instanceof VideoFrame?(c.width=Re.displayWidth,c.height=Re.displayHeight):(c.width=Re.width,c.height=Re.height),c}this.allocateTextureUnit=M,this.resetTextureUnits=w,this.setTexture2D=R,this.setTexture2DArray=F,this.setTexture3D=O,this.setTextureCube=U,this.rebindTextures=ue,this.setupRenderTarget=fe,this.updateRenderTargetMipmap=pe,this.updateMultisampleRenderTarget=ve,this.setupDepthRenderbuffer=_e,this.setupFrameBufferTexture=ne,this.useMultisampledRTT=Qe}function Fei(t,e){function n(o,i=_6){let r;const s=iu.getTransfer(i);if(o===Ww)return t.UNSIGNED_BYTE;if(o===RKt)return t.UNSIGNED_SHORT_4_4_4_4;if(o===TKt)return t.UNSIGNED_SHORT_5_5_5_1;if(o===Yjo)return t.UNSIGNED_INT_5_9_9_9_REV;if(o===Ojo)return t.BYTE;if(o===Gjo)return t.SHORT;if(o===Cde)return t.UNSIGNED_SHORT;if(o===NKt)return t.INT;if(o===MG)return t.UNSIGNED_INT;if(o===m6)return t.FLOAT;if(o===yde)return t.HALF_FLOAT;if(o===Ujo)return t.ALPHA;if(o===Kjo)return t.RGB;if(o===l4)return t.RGBA;if(o===Vjo)return t.LUMINANCE;if(o===zjo)return t.LUMINANCE_ALPHA;if(o===NG)return t.DEPTH_COMPONENT;if(o===RG)return t.DEPTH_STENCIL;if(o===kKt)return t.RED;if(o===FKt)return t.RED_INTEGER;if(o===Jjo)return t.RG;if(o===LKt)return t.RG_INTEGER;if(o===HKt)return t.RGBA_INTEGER;if(o===WRe||o===jRe||o===$Re||o===qRe)if(s===Ed)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(o===WRe)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===jRe)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===$Re)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===qRe)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(o===WRe)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===jRe)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===$Re)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===qRe)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===OKt||o===GKt||o===YKt||o===UKt)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(o===OKt)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===GKt)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===YKt)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===UKt)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===KKt||o===VKt||o===zKt)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(o===KKt||o===VKt)return s===Ed?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(o===zKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===JKt||o===WKt||o===jKt||o===$Kt||o===qKt||o===XKt||o===ZKt||o===eVt||o===tVt||o===nVt||o===oVt||o===iVt||o===rVt||o===sVt)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(o===JKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===WKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===jKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===$Kt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===qKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===XKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===ZKt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===eVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===tVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===nVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===oVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===iVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===rVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===sVt)return s===Ed?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===XRe||o===aVt||o===AVt)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(o===XRe)return s===Ed?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===aVt)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===AVt)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===Wjo||o===cVt||o===lVt||o===uVt)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(o===XRe)return r.COMPRESSED_RED_RGTC1_EXT;if(o===cVt)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===lVt)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===uVt)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===DG?t.UNSIGNED_INT_24_8:t[o]!==void 0?t[o]:null}return{convert:n}}class Lei extends sf{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class lh extends T0{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Hei={type:"move"};class kTe{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new lh,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new lh,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new jt,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new jt),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new lh,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new jt,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new jt),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const o of e.hand.values())this._getHandJoint(n,o)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,o){let i=null,r=null,s=null;const a=this._targetRay,A=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const p of e.hand.values()){const m=n.getJointPose(p,o),_=this._getHandJoint(c,p);m!==null&&(_.matrix.fromArray(m.transform.matrix),_.matrix.decompose(_.position,_.rotation,_.scale),_.matrixWorldNeedsUpdate=!0,_.jointRadius=m.radius),_.visible=m!==null}const l=c.joints["index-finger-tip"],u=c.joints["thumb-tip"],g=l.position.distanceTo(u.position),h=.02,d=.005;c.inputState.pinching&&g>h+d?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&g<=h-d&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else A!==null&&e.gripSpace&&(r=n.getPose(e.gripSpace,o),r!==null&&(A.matrix.fromArray(r.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),A.matrixWorldNeedsUpdate=!0,r.linearVelocity?(A.hasLinearVelocity=!0,A.linearVelocity.copy(r.linearVelocity)):A.hasLinearVelocity=!1,r.angularVelocity?(A.hasAngularVelocity=!0,A.angularVelocity.copy(r.angularVelocity)):A.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,o),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Hei)))}return a!==null&&(a.visible=i!==null),A!==null&&(A.visible=r!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const o=new lh;o.matrixAutoUpdate=!1,o.visible=!1,e.joints[n.jointName]=o,e.add(o)}return e.joints[n.jointName]}}const Oei=`
void main() {

	gl_Position = vec4( position, 1.0 );

}`,Gei=`
uniform sampler2DArray depthColor;
uniform float depthWidth;
uniform float depthHeight;

void main() {

	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );

	if ( coord.x >= 1.0 ) {

		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;

	} else {

		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;

	}

}`;class Yei{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,o){if(this.texture===null){const i=new Hg,r=e.properties.get(i);r.__webglTexture=n.texture,(n.depthNear!=o.depthNear||n.depthFar!=o.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,o=new f6({vertexShader:Oei,fragmentShader:Gei,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new Er(new VB(20,20),o)}return this.mesh}reset(){this.texture=null,this.mesh=null}}class Uei extends RR{constructor(e,n){super();const o=this;let i=null,r=1,s=null,a="local-floor",A=1,c=null,l=null,u=null,g=null,h=null,d=null;const p=new Yei,m=n.getContextAttributes();let _=null,f=null;const I=[],C=[],y=new ni;let x=null;const E=new sf;E.layers.enable(1),E.viewport=new ru;const B=new sf;B.layers.enable(2),B.viewport=new ru;const S=[E,B],Q=new Lei;Q.layers.enable(1),Q.layers.enable(2);let w=null,M=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ie){let ne=I[ie];return ne===void 0&&(ne=new kTe,I[ie]=ne),ne.getTargetRaySpace()},this.getControllerGrip=function(ie){let ne=I[ie];return ne===void 0&&(ne=new kTe,I[ie]=ne),ne.getGripSpace()},this.getHand=function(ie){let ne=I[ie];return ne===void 0&&(ne=new kTe,I[ie]=ne),ne.getHandSpace()};function k(ie){const ne=C.indexOf(ie.inputSource);if(ne===-1)return;const le=I[ne];le!==void 0&&(le.update(ie.inputSource,ie.frame,c||s),le.dispatchEvent({type:ie.type,data:ie.inputSource}))}function R(){i.removeEventListener("select",k),i.removeEventListener("selectstart",k),i.removeEventListener("selectend",k),i.removeEventListener("squeeze",k),i.removeEventListener("squeezestart",k),i.removeEventListener("squeezeend",k),i.removeEventListener("end",R),i.removeEventListener("inputsourceschange",F);for(let ie=0;ie<I.length;ie++){const ne=C[ie];ne!==null&&(C[ie]=null,I[ie].disconnect(ne))}w=null,M=null,p.reset(),e.setRenderTarget(_),h=null,g=null,u=null,i=null,f=null,oe.stop(),o.isPresenting=!1,e.setPixelRatio(x),e.setSize(y.width,y.height,!1),o.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(ie){r=ie,o.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ie){a=ie,o.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||s},this.setReferenceSpace=function(ie){c=ie},this.getBaseLayer=function(){return g!==null?g:h},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return i},this.setSession=async function(ie){if(i=ie,i!==null){if(_=e.getRenderTarget(),i.addEventListener("select",k),i.addEventListener("selectstart",k),i.addEventListener("selectend",k),i.addEventListener("squeeze",k),i.addEventListener("squeezestart",k),i.addEventListener("squeezeend",k),i.addEventListener("end",R),i.addEventListener("inputsourceschange",F),m.xrCompatible!==!0&&await n.makeXRCompatible(),x=e.getPixelRatio(),e.getSize(y),i.renderState.layers===void 0){const ne={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,n,ne),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),f=new TR(h.framebufferWidth,h.framebufferHeight,{format:l4,type:Ww,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let ne=null,le=null,ge=null;m.depth&&(ge=m.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,ne=m.stencil?RG:NG,le=m.stencil?DG:MG);const _e={colorFormat:n.RGBA8,depthFormat:ge,scaleFactor:r};u=new XRWebGLBinding(i,n),g=u.createProjectionLayer(_e),i.updateRenderState({layers:[g]}),e.setPixelRatio(1),e.setSize(g.textureWidth,g.textureHeight,!1),f=new TR(g.textureWidth,g.textureHeight,{format:l4,type:Ww,depthTexture:new nzt(g.textureWidth,g.textureHeight,le,void 0,void 0,void 0,void 0,void 0,void 0,ne),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:g.ignoreDepthValues===!1})}f.isXRRenderTarget=!0,this.setFoveation(A),c=null,s=await i.requestReferenceSpace(a),oe.setContext(i),oe.start(),o.isPresenting=!0,o.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function F(ie){for(let ne=0;ne<ie.removed.length;ne++){const le=ie.removed[ne],ge=C.indexOf(le);ge>=0&&(C[ge]=null,I[ge].disconnect(le))}for(let ne=0;ne<ie.added.length;ne++){const le=ie.added[ne];let ge=C.indexOf(le);if(ge===-1){for(let ue=0;ue<I.length;ue++)if(ue>=C.length){C.push(le),ge=ue;break}else if(C[ue]===null){C[ue]=le,ge=ue;break}if(ge===-1)break}const _e=I[ge];_e&&_e.connect(le)}}const O=new jt,U=new jt;function Y(ie,ne,le){O.setFromMatrixPosition(ne.matrixWorld),U.setFromMatrixPosition(le.matrixWorld);const ge=O.distanceTo(U),_e=ne.projectionMatrix.elements,ue=le.projectionMatrix.elements,fe=_e[14]/(_e[10]-1),pe=_e[14]/(_e[10]+1),ye=(_e[9]+1)/_e[5],Me=(_e[9]-1)/_e[5],ve=(_e[8]-1)/_e[0],he=(ue[8]+1)/ue[0],Qe=fe*ve,Pe=fe*he,we=ge/(-ve+he),Te=we*-ve;ne.matrixWorld.decompose(ie.position,ie.quaternion,ie.scale),ie.translateX(Te),ie.translateZ(we),ie.matrixWorld.compose(ie.position,ie.quaternion,ie.scale),ie.matrixWorldInverse.copy(ie.matrixWorld).invert();const Re=fe+we,Ee=pe+we,ke=Qe-Te,Ce=Pe+(ge-Te),Le=ye*pe/Ee*Re,Ye=Me*pe/Ee*Re;ie.projectionMatrix.makePerspective(ke,Ce,Le,Ye,Re,Ee),ie.projectionMatrixInverse.copy(ie.projectionMatrix).invert()}function W(ie,ne){ne===null?ie.matrixWorld.copy(ie.matrix):ie.matrixWorld.multiplyMatrices(ne.matrixWorld,ie.matrix),ie.matrixWorldInverse.copy(ie.matrixWorld).invert()}this.updateCamera=function(ie){if(i===null)return;p.texture!==null&&(ie.near=p.depthNear,ie.far=p.depthFar),Q.near=B.near=E.near=ie.near,Q.far=B.far=E.far=ie.far,(w!==Q.near||M!==Q.far)&&(i.updateRenderState({depthNear:Q.near,depthFar:Q.far}),w=Q.near,M=Q.far,E.near=w,E.far=M,B.near=w,B.far=M,E.updateProjectionMatrix(),B.updateProjectionMatrix(),ie.updateProjectionMatrix());const ne=ie.parent,le=Q.cameras;W(Q,ne);for(let ge=0;ge<le.length;ge++)W(le[ge],ne);le.length===2?Y(Q,E,B):Q.projectionMatrix.copy(E.projectionMatrix),te(ie,Q,ne)};function te(ie,ne,le){le===null?ie.matrix.copy(ne.matrixWorld):(ie.matrix.copy(le.matrixWorld),ie.matrix.invert(),ie.matrix.multiply(ne.matrixWorld)),ie.matrix.decompose(ie.position,ie.quaternion,ie.scale),ie.updateMatrixWorld(!0),ie.projectionMatrix.copy(ne.projectionMatrix),ie.projectionMatrixInverse.copy(ne.projectionMatrixInverse),ie.isPerspectiveCamera&&(ie.fov=HG*2*Math.atan(1/ie.projectionMatrix.elements[5]),ie.zoom=1)}this.getCamera=function(){return Q},this.getFoveation=function(){if(!(g===null&&h===null))return A},this.setFoveation=function(ie){A=ie,g!==null&&(g.fixedFoveation=ie),h!==null&&h.fixedFoveation!==void 0&&(h.fixedFoveation=ie)},this.hasDepthSensing=function(){return p.texture!==null},this.getDepthSensingMesh=function(){return p.getMesh(Q)};let j=null;function J(ie,ne){if(l=ne.getViewerPose(c||s),d=ne,l!==null){const le=l.views;h!==null&&(e.setRenderTargetFramebuffer(f,h.framebuffer),e.setRenderTarget(f));let ge=!1;le.length!==Q.cameras.length&&(Q.cameras.length=0,ge=!0);for(let ue=0;ue<le.length;ue++){const fe=le[ue];let pe=null;if(h!==null)pe=h.getViewport(fe);else{const Me=u.getViewSubImage(g,fe);pe=Me.viewport,ue===0&&(e.setRenderTargetTextures(f,Me.colorTexture,g.ignoreDepthValues?void 0:Me.depthStencilTexture),e.setRenderTarget(f))}let ye=S[ue];ye===void 0&&(ye=new sf,ye.layers.enable(ue),ye.viewport=new ru,S[ue]=ye),ye.matrix.fromArray(fe.transform.matrix),ye.matrix.decompose(ye.position,ye.quaternion,ye.scale),ye.projectionMatrix.fromArray(fe.projectionMatrix),ye.projectionMatrixInverse.copy(ye.projectionMatrix).invert(),ye.viewport.set(pe.x,pe.y,pe.width,pe.height),ue===0&&(Q.matrix.copy(ye.matrix),Q.matrix.decompose(Q.position,Q.quaternion,Q.scale)),ge===!0&&Q.cameras.push(ye)}const _e=i.enabledFeatures;if(_e&&_e.includes("depth-sensing")){const ue=u.getDepthInformation(le[0]);ue&&ue.isValid&&ue.texture&&p.init(e,ue,i.renderState)}}for(let le=0;le<I.length;le++){const ge=C[le],_e=I[le];ge!==null&&_e!==void 0&&_e.update(ge,ne,c||s)}j&&j(ie,ne),ne.detectedPlanes&&o.dispatchEvent({type:"planesdetected",data:ne}),d=null}const oe=new jVt;oe.setAnimationLoop(J),this.setAnimationLoop=function(ie){j=ie},this.dispose=function(){}}}const UR=new t2,Kei=new va;function Vei(t,e){function n(m,_){m.matrixAutoUpdate===!0&&m.updateMatrix(),_.value.copy(m.matrix)}function o(m,_){_.color.getRGB(m.fogColor.value,UVt(t)),_.isFog?(m.fogNear.value=_.near,m.fogFar.value=_.far):_.isFogExp2&&(m.fogDensity.value=_.density)}function i(m,_,f,I,C){_.isMeshBasicMaterial||_.isMeshLambertMaterial?r(m,_):_.isMeshToonMaterial?(r(m,_),u(m,_)):_.isMeshPhongMaterial?(r(m,_),l(m,_)):_.isMeshStandardMaterial?(r(m,_),g(m,_),_.isMeshPhysicalMaterial&&h(m,_,C)):_.isMeshMatcapMaterial?(r(m,_),d(m,_)):_.isMeshDepthMaterial?r(m,_):_.isMeshDistanceMaterial?(r(m,_),p(m,_)):_.isMeshNormalMaterial?r(m,_):_.isLineBasicMaterial?(s(m,_),_.isLineDashedMaterial&&a(m,_)):_.isPointsMaterial?A(m,_,f,I):_.isSpriteMaterial?c(m,_):_.isShadowMaterial?(m.color.value.copy(_.color),m.opacity.value=_.opacity):_.isShaderMaterial&&(_.uniformsNeedUpdate=!1)}function r(m,_){m.opacity.value=_.opacity,_.color&&m.diffuse.value.copy(_.color),_.emissive&&m.emissive.value.copy(_.emissive).multiplyScalar(_.emissiveIntensity),_.map&&(m.map.value=_.map,n(_.map,m.mapTransform)),_.alphaMap&&(m.alphaMap.value=_.alphaMap,n(_.alphaMap,m.alphaMapTransform)),_.bumpMap&&(m.bumpMap.value=_.bumpMap,n(_.bumpMap,m.bumpMapTransform),m.bumpScale.value=_.bumpScale,_.side===uI&&(m.bumpScale.value*=-1)),_.normalMap&&(m.normalMap.value=_.normalMap,n(_.normalMap,m.normalMapTransform),m.normalScale.value.copy(_.normalScale),_.side===uI&&m.normalScale.value.negate()),_.displacementMap&&(m.displacementMap.value=_.displacementMap,n(_.displacementMap,m.displacementMapTransform),m.displacementScale.value=_.displacementScale,m.displacementBias.value=_.displacementBias),_.emissiveMap&&(m.emissiveMap.value=_.emissiveMap,n(_.emissiveMap,m.emissiveMapTransform)),_.specularMap&&(m.specularMap.value=_.specularMap,n(_.specularMap,m.specularMapTransform)),_.alphaTest>0&&(m.alphaTest.value=_.alphaTest);const f=e.get(_),I=f.envMap,C=f.envMapRotation;I&&(m.envMap.value=I,UR.copy(C),UR.x*=-1,UR.y*=-1,UR.z*=-1,I.isCubeTexture&&I.isRenderTargetTexture===!1&&(UR.y*=-1,UR.z*=-1),m.envMapRotation.value.setFromMatrix4(Kei.makeRotationFromEuler(UR)),m.flipEnvMap.value=I.isCubeTexture&&I.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=_.reflectivity,m.ior.value=_.ior,m.refractionRatio.value=_.refractionRatio),_.lightMap&&(m.lightMap.value=_.lightMap,m.lightMapIntensity.value=_.lightMapIntensity,n(_.lightMap,m.lightMapTransform)),_.aoMap&&(m.aoMap.value=_.aoMap,m.aoMapIntensity.value=_.aoMapIntensity,n(_.aoMap,m.aoMapTransform))}function s(m,_){m.diffuse.value.copy(_.color),m.opacity.value=_.opacity,_.map&&(m.map.value=_.map,n(_.map,m.mapTransform))}function a(m,_){m.dashSize.value=_.dashSize,m.totalSize.value=_.dashSize+_.gapSize,m.scale.value=_.scale}function A(m,_,f,I){m.diffuse.value.copy(_.color),m.opacity.value=_.opacity,m.size.value=_.size*f,m.scale.value=I*.5,_.map&&(m.map.value=_.map,n(_.map,m.uvTransform)),_.alphaMap&&(m.alphaMap.value=_.alphaMap,n(_.alphaMap,m.alphaMapTransform)),_.alphaTest>0&&(m.alphaTest.value=_.alphaTest)}function c(m,_){m.diffuse.value.copy(_.color),m.opacity.value=_.opacity,m.rotation.value=_.rotation,_.map&&(m.map.value=_.map,n(_.map,m.mapTransform)),_.alphaMap&&(m.alphaMap.value=_.alphaMap,n(_.alphaMap,m.alphaMapTransform)),_.alphaTest>0&&(m.alphaTest.value=_.alphaTest)}function l(m,_){m.specular.value.copy(_.specular),m.shininess.value=Math.max(_.shininess,1e-4)}function u(m,_){_.gradientMap&&(m.gradientMap.value=_.gradientMap)}function g(m,_){m.metalness.value=_.metalness,_.metalnessMap&&(m.metalnessMap.value=_.metalnessMap,n(_.metalnessMap,m.metalnessMapTransform)),m.roughness.value=_.roughness,_.roughnessMap&&(m.roughnessMap.value=_.roughnessMap,n(_.roughnessMap,m.roughnessMapTransform)),_.envMap&&(m.envMapIntensity.value=_.envMapIntensity)}function h(m,_,f){m.ior.value=_.ior,_.sheen>0&&(m.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),m.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(m.sheenColorMap.value=_.sheenColorMap,n(_.sheenColorMap,m.sheenColorMapTransform)),_.sheenRoughnessMap&&(m.sheenRoughnessMap.value=_.sheenRoughnessMap,n(_.sheenRoughnessMap,m.sheenRoughnessMapTransform))),_.clearcoat>0&&(m.clearcoat.value=_.clearcoat,m.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(m.clearcoatMap.value=_.clearcoatMap,n(_.clearcoatMap,m.clearcoatMapTransform)),_.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,n(_.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap&&(m.clearcoatNormalMap.value=_.clearcoatNormalMap,n(_.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===uI&&m.clearcoatNormalScale.value.negate())),_.dispersion>0&&(m.dispersion.value=_.dispersion),_.iridescence>0&&(m.iridescence.value=_.iridescence,m.iridescenceIOR.value=_.iridescenceIOR,m.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap&&(m.iridescenceMap.value=_.iridescenceMap,n(_.iridescenceMap,m.iridescenceMapTransform)),_.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=_.iridescenceThicknessMap,n(_.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),_.transmission>0&&(m.transmission.value=_.transmission,m.transmissionSamplerMap.value=f.texture,m.transmissionSamplerSize.value.set(f.width,f.height),_.transmissionMap&&(m.transmissionMap.value=_.transmissionMap,n(_.transmissionMap,m.transmissionMapTransform)),m.thickness.value=_.thickness,_.thicknessMap&&(m.thicknessMap.value=_.thicknessMap,n(_.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=_.attenuationDistance,m.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy>0&&(m.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap&&(m.anisotropyMap.value=_.anisotropyMap,n(_.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=_.specularIntensity,m.specularColor.value.copy(_.specularColor),_.specularColorMap&&(m.specularColorMap.value=_.specularColorMap,n(_.specularColorMap,m.specularColorMapTransform)),_.specularIntensityMap&&(m.specularIntensityMap.value=_.specularIntensityMap,n(_.specularIntensityMap,m.specularIntensityMapTransform))}function d(m,_){_.matcap&&(m.matcap.value=_.matcap)}function p(m,_){const f=e.get(_).light;m.referencePosition.value.setFromMatrixPosition(f.matrixWorld),m.nearDistance.value=f.shadow.camera.near,m.farDistance.value=f.shadow.camera.far}return{refreshFogUniforms:o,refreshMaterialUniforms:i}}function zei(t,e,n,o){let i={},r={},s=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function A(f,I){const C=I.program;o.uniformBlockBinding(f,C)}function c(f,I){let C=i[f.id];C===void 0&&(d(f),C=l(f),i[f.id]=C,f.addEventListener("dispose",m));const y=I.program;o.updateUBOMapping(f,y);const x=e.render.frame;r[f.id]!==x&&(g(f),r[f.id]=x)}function l(f){const I=u();f.__bindingPointIndex=I;const C=t.createBuffer(),y=f.__size,x=f.usage;return t.bindBuffer(t.UNIFORM_BUFFER,C),t.bufferData(t.UNIFORM_BUFFER,y,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,I,C),C}function u(){for(let f=0;f<a;f++)if(s.indexOf(f)===-1)return s.push(f),f;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function g(f){const I=i[f.id],C=f.uniforms,y=f.__cache;t.bindBuffer(t.UNIFORM_BUFFER,I);for(let x=0,E=C.length;x<E;x++){const B=Array.isArray(C[x])?C[x]:[C[x]];for(let S=0,Q=B.length;S<Q;S++){const w=B[S];if(h(w,x,S,y)===!0){const M=w.__offset,k=Array.isArray(w.value)?w.value:[w.value];let R=0;for(let F=0;F<k.length;F++){const O=k[F],U=p(O);typeof O=="number"||typeof O=="boolean"?(w.__data[0]=O,t.bufferSubData(t.UNIFORM_BUFFER,M+R,w.__data)):O.isMatrix3?(w.__data[0]=O.elements[0],w.__data[1]=O.elements[1],w.__data[2]=O.elements[2],w.__data[3]=0,w.__data[4]=O.elements[3],w.__data[5]=O.elements[4],w.__data[6]=O.elements[5],w.__data[7]=0,w.__data[8]=O.elements[6],w.__data[9]=O.elements[7],w.__data[10]=O.elements[8],w.__data[11]=0):(O.toArray(w.__data,R),R+=U.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,M,w.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function h(f,I,C,y){const x=f.value,E=I+"_"+C;if(y[E]===void 0)return typeof x=="number"||typeof x=="boolean"?y[E]=x:y[E]=x.clone(),!0;{const B=y[E];if(typeof x=="number"||typeof x=="boolean"){if(B!==x)return y[E]=x,!0}else if(B.equals(x)===!1)return B.copy(x),!0}return!1}function d(f){const I=f.uniforms;let C=0;const y=16;for(let E=0,B=I.length;E<B;E++){const S=Array.isArray(I[E])?I[E]:[I[E]];for(let Q=0,w=S.length;Q<w;Q++){const M=S[Q],k=Array.isArray(M.value)?M.value:[M.value];for(let R=0,F=k.length;R<F;R++){const O=k[R],U=p(O),Y=C%y;Y!==0&&y-Y<U.boundary&&(C+=y-Y),M.__data=new Float32Array(U.storage/Float32Array.BYTES_PER_ELEMENT),M.__offset=C,C+=U.storage}}}const x=C%y;return x>0&&(C+=y-x),f.__size=C,f.__cache={},this}function p(f){const I={boundary:0,storage:0};return typeof f=="number"||typeof f=="boolean"?(I.boundary=4,I.storage=4):f.isVector2?(I.boundary=8,I.storage=8):f.isVector3||f.isColor?(I.boundary=16,I.storage=12):f.isVector4?(I.boundary=16,I.storage=16):f.isMatrix3?(I.boundary=48,I.storage=48):f.isMatrix4?(I.boundary=64,I.storage=64):f.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",f),I}function m(f){const I=f.target;I.removeEventListener("dispose",m);const C=s.indexOf(I.__bindingPointIndex);s.splice(C,1),t.deleteBuffer(i[I.id]),delete i[I.id],delete r[I.id]}function _(){for(const f in i)t.deleteBuffer(i[f]);s=[],i={},r={}}return{bind:A,update:c,dispose:_}}class $de{constructor(e={}){const{canvas:n=x$o(),context:o=null,depth:i=!0,stencil:r=!1,alpha:s=!1,antialias:a=!1,premultipliedAlpha:A=!0,preserveDrawingBuffer:c=!1,powerPreference:l="default",failIfMajorPerformanceCaveat:u=!1}=e;this.isWebGLRenderer=!0;let g;if(o!==null){if(typeof WebGLRenderingContext<"u"&&o instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");g=o.getContextAttributes().alpha}else g=s;const h=new Uint32Array(4),d=new Int32Array(4);let p=null,m=null;const _=[],f=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Ox,this.toneMapping=Jw,this.toneMappingExposure=1;const I=this;let C=!1,y=0,x=0,E=null,B=-1,S=null;const Q=new ru,w=new ru;let M=null;const k=new Vi(0);let R=0,F=n.width,O=n.height,U=1,Y=null,W=null;const te=new ru(0,0,F,O),j=new ru(0,0,F,O);let J=!1;const oe=new STe;let ie=!1,ne=!1;const le=new va,ge=new jt,_e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ue=!1;function fe(){return E===null?U:1}let pe=o;function ye(qe,vt){return n.getContext(qe,vt)}try{const qe={alpha:!0,depth:i,stencil:r,antialias:a,premultipliedAlpha:A,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${mde}`),n.addEventListener("webglcontextlost",et,!1),n.addEventListener("webglcontextrestored",It,!1),n.addEventListener("webglcontextcreationerror",Bt,!1),pe===null){const vt="webgl2";if(pe=ye(vt,qe),pe===null)throw ye(vt)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(qe){throw console.error("THREE.WebGLRenderer: "+qe.message),qe}let Me,ve,he,Qe,Pe,we,Te,Re,Ee,ke,Ce,Le,Ye,tt,At,at,nt,gt,bt,Ct,Dt,kt,it,Yt;function pn(){Me=new oZo(pe),Me.init(),kt=new Fei(pe,Me),ve=new qXo(pe,Me,e,kt),he=new Tei(pe),Qe=new sZo(pe),Pe=new Eei,we=new kei(pe,Me,he,Pe,ve,kt,Qe),Te=new ZXo(I),Re=new nZo(I),Ee=new J$o(pe),it=new jXo(pe,Ee),ke=new iZo(pe,Ee,Qe,it),Ce=new AZo(pe,ke,Ee,Qe),bt=new aZo(pe,ve,we),at=new XXo(Pe),Le=new xei(I,Te,Re,Me,ve,it,at),Ye=new Vei(I,Pe),tt=new bei,At=new Mei(Me),gt=new WXo(I,Te,Re,he,Ce,g,A),nt=new Rei(I,Ce,ve),Yt=new zei(pe,Qe,ve,he),Ct=new $Xo(pe,Me,Qe),Dt=new rZo(pe,Me,Qe),Qe.programs=Le.programs,I.capabilities=ve,I.extensions=Me,I.properties=Pe,I.renderLists=tt,I.shadowMap=nt,I.state=he,I.info=Qe}pn();const be=new Uei(I,pe);this.xr=be,this.getContext=function(){return pe},this.getContextAttributes=function(){return pe.getContextAttributes()},this.forceContextLoss=function(){const qe=Me.get("WEBGL_lose_context");qe&&qe.loseContext()},this.forceContextRestore=function(){const qe=Me.get("WEBGL_lose_context");qe&&qe.restoreContext()},this.getPixelRatio=function(){return U},this.setPixelRatio=function(qe){qe!==void 0&&(U=qe,this.setSize(F,O,!1))},this.getSize=function(qe){return qe.set(F,O)},this.setSize=function(qe,vt,qt=!0){if(be.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}F=qe,O=vt,n.width=Math.floor(qe*U),n.height=Math.floor(vt*U),qt===!0&&(n.style.width=qe+"px",n.style.height=vt+"px"),this.setViewport(0,0,qe,vt)},this.getDrawingBufferSize=function(qe){return qe.set(F*U,O*U).floor()},this.setDrawingBufferSize=function(qe,vt,qt){F=qe,O=vt,U=qt,n.width=Math.floor(qe*qt),n.height=Math.floor(vt*qt),this.setViewport(0,0,qe,vt)},this.getCurrentViewport=function(qe){return qe.copy(Q)},this.getViewport=function(qe){return qe.copy(te)},this.setViewport=function(qe,vt,qt,Zt){qe.isVector4?te.set(qe.x,qe.y,qe.z,qe.w):te.set(qe,vt,qt,Zt),he.viewport(Q.copy(te).multiplyScalar(U).round())},this.getScissor=function(qe){return qe.copy(j)},this.setScissor=function(qe,vt,qt,Zt){qe.isVector4?j.set(qe.x,qe.y,qe.z,qe.w):j.set(qe,vt,qt,Zt),he.scissor(w.copy(j).multiplyScalar(U).round())},this.getScissorTest=function(){return J},this.setScissorTest=function(qe){he.setScissorTest(J=qe)},this.setOpaqueSort=function(qe){Y=qe},this.setTransparentSort=function(qe){W=qe},this.getClearColor=function(qe){return qe.copy(gt.getClearColor())},this.setClearColor=function(){gt.setClearColor.apply(gt,arguments)},this.getClearAlpha=function(){return gt.getClearAlpha()},this.setClearAlpha=function(){gt.setClearAlpha.apply(gt,arguments)},this.clear=function(qe=!0,vt=!0,qt=!0){let Zt=0;if(qe){let nn=!1;if(E!==null){const zn=E.texture.format;nn=zn===HKt||zn===LKt||zn===FKt}if(nn){const zn=E.texture.type,Nn=zn===Ww||zn===MG||zn===Cde||zn===DG||zn===RKt||zn===TKt,Co=gt.getClearColor(),ei=gt.getClearAlpha(),ro=Co.r,To=Co.g,yo=Co.b;Nn?(h[0]=ro,h[1]=To,h[2]=yo,h[3]=ei,pe.clearBufferuiv(pe.COLOR,0,h)):(d[0]=ro,d[1]=To,d[2]=yo,d[3]=ei,pe.clearBufferiv(pe.COLOR,0,d))}else Zt|=pe.COLOR_BUFFER_BIT}vt&&(Zt|=pe.DEPTH_BUFFER_BIT),qt&&(Zt|=pe.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),pe.clear(Zt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",et,!1),n.removeEventListener("webglcontextrestored",It,!1),n.removeEventListener("webglcontextcreationerror",Bt,!1),tt.dispose(),At.dispose(),Pe.dispose(),Te.dispose(),Re.dispose(),Ce.dispose(),it.dispose(),Yt.dispose(),Le.dispose(),be.dispose(),be.removeEventListener("sessionstart",Ut),be.removeEventListener("sessionend",Wt),Xt.stop()};function et(qe){qe.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),C=!0}function It(){console.log("THREE.WebGLRenderer: Context Restored."),C=!1;const qe=Qe.autoReset,vt=nt.enabled,qt=nt.autoUpdate,Zt=nt.needsUpdate,nn=nt.type;pn(),Qe.autoReset=qe,nt.enabled=vt,nt.autoUpdate=qt,nt.needsUpdate=Zt,nt.type=nn}function Bt(qe){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",qe.statusMessage)}function mt(qe){const vt=qe.target;vt.removeEventListener("dispose",mt),st(vt)}function st(qe){xt(qe),Pe.remove(qe)}function xt(qe){const vt=Pe.get(qe).programs;vt!==void 0&&(vt.forEach(function(qt){Le.releaseProgram(qt)}),qe.isShaderMaterial&&Le.releaseShaderCache(qe))}this.renderBufferDirect=function(qe,vt,qt,Zt,nn,zn){vt===null&&(vt=_e);const Nn=nn.isMesh&&nn.matrixWorld.determinant()<0,Co=Lt(qe,vt,qt,Zt,nn);he.setMaterial(Zt,Nn);let ei=qt.index,ro=1;if(Zt.wireframe===!0){if(ei=ke.getWireframeAttribute(qt),ei===void 0)return;ro=2}const To=qt.drawRange,yo=qt.attributes.position;let Ro=To.start*ro,On=(To.start+To.count)*ro;zn!==null&&(Ro=Math.max(Ro,zn.start*ro),On=Math.min(On,(zn.start+zn.count)*ro)),ei!==null?(Ro=Math.max(Ro,0),On=Math.min(On,ei.count)):yo!=null&&(Ro=Math.max(Ro,0),On=Math.min(On,yo.count));const uo=On-Ro;if(uo<0||uo===1/0)return;it.setup(nn,Zt,Co,qt,ei);let Oo,ko=Ct;if(ei!==null&&(Oo=Ee.get(ei),ko=Dt,ko.setIndex(Oo)),nn.isMesh)Zt.wireframe===!0?(he.setLineWidth(Zt.wireframeLinewidth*fe()),ko.setMode(pe.LINES)):ko.setMode(pe.TRIANGLES);else if(nn.isLine){let Ko=Zt.linewidth;Ko===void 0&&(Ko=1),he.setLineWidth(Ko*fe()),nn.isLineSegments?ko.setMode(pe.LINES):nn.isLineLoop?ko.setMode(pe.LINE_LOOP):ko.setMode(pe.LINE_STRIP)}else nn.isPoints?ko.setMode(pe.POINTS):nn.isSprite&&ko.setMode(pe.TRIANGLES);if(nn.isBatchedMesh)nn._multiDrawInstances!==null?ko.renderMultiDrawInstances(nn._multiDrawStarts,nn._multiDrawCounts,nn._multiDrawCount,nn._multiDrawInstances):ko.renderMultiDraw(nn._multiDrawStarts,nn._multiDrawCounts,nn._multiDrawCount);else if(nn.isInstancedMesh)ko.renderInstances(Ro,uo,nn.count);else if(qt.isInstancedBufferGeometry){const Ko=qt._maxInstanceCount!==void 0?qt._maxInstanceCount:1/0,mi=Math.min(qt.instanceCount,Ko);ko.renderInstances(Ro,uo,mi)}else ko.render(Ro,uo)};function Xe(qe,vt,qt){qe.transparent===!0&&qe.side===r_&&qe.forceSinglePass===!1?(qe.side=uI,qe.needsUpdate=!0,ht(qe,vt,qt),qe.side=mE,qe.needsUpdate=!0,ht(qe,vt,qt),qe.side=r_):ht(qe,vt,qt)}this.compile=function(qe,vt,qt=null){qt===null&&(qt=qe),m=At.get(qt),m.init(vt),f.push(m),qt.traverseVisible(function(nn){nn.isLight&&nn.layers.test(vt.layers)&&(m.pushLight(nn),nn.castShadow&&m.pushShadow(nn))}),qe!==qt&&qe.traverseVisible(function(nn){nn.isLight&&nn.layers.test(vt.layers)&&(m.pushLight(nn),nn.castShadow&&m.pushShadow(nn))}),m.setupLights();const Zt=new Set;return qe.traverse(function(nn){const zn=nn.material;if(zn)if(Array.isArray(zn))for(let Nn=0;Nn<zn.length;Nn++){const Co=zn[Nn];Xe(Co,qt,nn),Zt.add(Co)}else Xe(zn,qt,nn),Zt.add(zn)}),f.pop(),m=null,Zt},this.compileAsync=function(qe,vt,qt=null){const Zt=this.compile(qe,vt,qt);return new Promise(nn=>{function zn(){if(Zt.forEach(function(Nn){Pe.get(Nn).currentProgram.isReady()&&Zt.delete(Nn)}),Zt.size===0){nn(qe);return}setTimeout(zn,10)}Me.get("KHR_parallel_shader_compile")!==null?zn():setTimeout(zn,10)})};let Ze=null;function dt(qe){Ze&&Ze(qe)}function Ut(){Xt.stop()}function Wt(){Xt.start()}const Xt=new jVt;Xt.setAnimationLoop(dt),typeof self<"u"&&Xt.setContext(self),this.setAnimationLoop=function(qe){Ze=qe,be.setAnimationLoop(qe),qe===null?Xt.stop():Xt.start()},be.addEventListener("sessionstart",Ut),be.addEventListener("sessionend",Wt),this.render=function(qe,vt){if(vt!==void 0&&vt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(C===!0)return;if(qe.matrixWorldAutoUpdate===!0&&qe.updateMatrixWorld(),vt.parent===null&&vt.matrixWorldAutoUpdate===!0&&vt.updateMatrixWorld(),be.enabled===!0&&be.isPresenting===!0&&(be.cameraAutoUpdate===!0&&be.updateCamera(vt),vt=be.getCamera()),qe.isScene===!0&&qe.onBeforeRender(I,qe,vt,E),m=At.get(qe,f.length),m.init(vt),f.push(m),le.multiplyMatrices(vt.projectionMatrix,vt.matrixWorldInverse),oe.setFromProjectionMatrix(le),ne=this.localClippingEnabled,ie=at.init(this.clippingPlanes,ne),p=tt.get(qe,_.length),p.init(),_.push(p),be.enabled===!0&&be.isPresenting===!0){const zn=I.xr.getDepthSensingMesh();zn!==null&&Jt(zn,vt,-1/0,I.sortObjects)}Jt(qe,vt,0,I.sortObjects),p.finish(),I.sortObjects===!0&&p.sort(Y,W),ue=be.enabled===!1||be.isPresenting===!1||be.hasDepthSensing()===!1,ue&&gt.addToRenderList(p,qe),this.info.render.frame++,ie===!0&&at.beginShadows();const qt=m.state.shadowsArray;nt.render(qt,qe,vt),ie===!0&&at.endShadows(),this.info.autoReset===!0&&this.info.reset();const Zt=p.opaque,nn=p.transmissive;if(m.setupLights(),vt.isArrayCamera){const zn=vt.cameras;if(nn.length>0)for(let Nn=0,Co=zn.length;Nn<Co;Nn++){const ei=zn[Nn];An(Zt,nn,qe,ei)}ue&&gt.render(qe);for(let Nn=0,Co=zn.length;Nn<Co;Nn++){const ei=zn[Nn];yn(p,qe,ei,ei.viewport)}}else nn.length>0&&An(Zt,nn,qe,vt),ue&&gt.render(qe),yn(p,qe,vt);E!==null&&(we.updateMultisampleRenderTarget(E),we.updateRenderTargetMipmap(E)),qe.isScene===!0&&qe.onAfterRender(I,qe,vt),it.resetDefaultState(),B=-1,S=null,f.pop(),f.length>0?(m=f[f.length-1],ie===!0&&at.setGlobalState(I.clippingPlanes,m.state.camera)):m=null,_.pop(),_.length>0?p=_[_.length-1]:p=null};function Jt(qe,vt,qt,Zt){if(qe.visible===!1)return;if(qe.layers.test(vt.layers)){if(qe.isGroup)qt=qe.renderOrder;else if(qe.isLOD)qe.autoUpdate===!0&&qe.update(vt);else if(qe.isLight)m.pushLight(qe),qe.castShadow&&m.pushShadow(qe);else if(qe.isSprite){if(!qe.frustumCulled||oe.intersectsSprite(qe)){Zt&&ge.setFromMatrixPosition(qe.matrixWorld).applyMatrix4(le);const Nn=Ce.update(qe),Co=qe.material;Co.visible&&p.push(qe,Nn,Co,qt,ge.z,null)}}else if((qe.isMesh||qe.isLine||qe.isPoints)&&(!qe.frustumCulled||oe.intersectsObject(qe))){const Nn=Ce.update(qe),Co=qe.material;if(Zt&&(qe.boundingSphere!==void 0?(qe.boundingSphere===null&&qe.computeBoundingSphere(),ge.copy(qe.boundingSphere.center)):(Nn.boundingSphere===null&&Nn.computeBoundingSphere(),ge.copy(Nn.boundingSphere.center)),ge.applyMatrix4(qe.matrixWorld).applyMatrix4(le)),Array.isArray(Co)){const ei=Nn.groups;for(let ro=0,To=ei.length;ro<To;ro++){const yo=ei[ro],Ro=Co[yo.materialIndex];Ro&&Ro.visible&&p.push(qe,Nn,Ro,qt,ge.z,yo)}}else Co.visible&&p.push(qe,Nn,Co,qt,ge.z,null)}}const zn=qe.children;for(let Nn=0,Co=zn.length;Nn<Co;Nn++)Jt(zn[Nn],vt,qt,Zt)}function yn(qe,vt,qt,Zt){const nn=qe.opaque,zn=qe.transmissive,Nn=qe.transparent;m.setupLightsView(qt),ie===!0&&at.setGlobalState(I.clippingPlanes,qt),Zt&&he.viewport(Q.copy(Zt)),nn.length>0&&kn(nn,vt,qt),zn.length>0&&kn(zn,vt,qt),Nn.length>0&&kn(Nn,vt,qt),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function An(qe,vt,qt,Zt){if((qt.isScene===!0?qt.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[Zt.id]===void 0&&(m.state.transmissionRenderTarget[Zt.id]=new TR(1,1,{generateMipmaps:!0,type:Me.has("EXT_color_buffer_half_float")||Me.has("EXT_color_buffer_float")?yde:Ww,minFilter:gm,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:iu.workingColorSpace}));const zn=m.state.transmissionRenderTarget[Zt.id],Nn=Zt.viewport||Q;zn.setSize(Nn.z,Nn.w);const Co=I.getRenderTarget();I.setRenderTarget(zn),I.getClearColor(k),R=I.getClearAlpha(),R<1&&I.setClearColor(16777215,.5),ue?gt.render(qt):I.clear();const ei=I.toneMapping;I.toneMapping=Jw;const ro=Zt.viewport;if(Zt.viewport!==void 0&&(Zt.viewport=void 0),m.setupLightsView(Zt),ie===!0&&at.setGlobalState(I.clippingPlanes,Zt),kn(qe,qt,Zt),we.updateMultisampleRenderTarget(zn),we.updateRenderTargetMipmap(zn),Me.has("WEBGL_multisampled_render_to_texture")===!1){let To=!1;for(let yo=0,Ro=vt.length;yo<Ro;yo++){const On=vt[yo],uo=On.object,Oo=On.geometry,ko=On.material,Ko=On.group;if(ko.side===r_&&uo.layers.test(Zt.layers)){const mi=ko.side;ko.side=uI,ko.needsUpdate=!0,$n(uo,qt,Zt,Oo,ko,Ko),ko.side=mi,ko.needsUpdate=!0,To=!0}}To===!0&&(we.updateMultisampleRenderTarget(zn),we.updateRenderTargetMipmap(zn))}I.setRenderTarget(Co),I.setClearColor(k,R),ro!==void 0&&(Zt.viewport=ro),I.toneMapping=ei}function kn(qe,vt,qt){const Zt=vt.isScene===!0?vt.overrideMaterial:null;for(let nn=0,zn=qe.length;nn<zn;nn++){const Nn=qe[nn],Co=Nn.object,ei=Nn.geometry,ro=Zt===null?Nn.material:Zt,To=Nn.group;Co.layers.test(qt.layers)&&$n(Co,vt,qt,ei,ro,To)}}function $n(qe,vt,qt,Zt,nn,zn){qe.onBeforeRender(I,vt,qt,Zt,nn,zn),qe.modelViewMatrix.multiplyMatrices(qt.matrixWorldInverse,qe.matrixWorld),qe.normalMatrix.getNormalMatrix(qe.modelViewMatrix),nn.onBeforeRender(I,vt,qt,Zt,qe,zn),nn.transparent===!0&&nn.side===r_&&nn.forceSinglePass===!1?(nn.side=uI,nn.needsUpdate=!0,I.renderBufferDirect(qt,vt,Zt,nn,qe,zn),nn.side=mE,nn.needsUpdate=!0,I.renderBufferDirect(qt,vt,Zt,nn,qe,zn),nn.side=r_):I.renderBufferDirect(qt,vt,Zt,nn,qe,zn),qe.onAfterRender(I,vt,qt,Zt,nn,zn)}function ht(qe,vt,qt){vt.isScene!==!0&&(vt=_e);const Zt=Pe.get(qe),nn=m.state.lights,zn=m.state.shadowsArray,Nn=nn.state.version,Co=Le.getParameters(qe,nn.state,zn,vt,qt),ei=Le.getProgramCacheKey(Co);let ro=Zt.programs;Zt.environment=qe.isMeshStandardMaterial?vt.environment:null,Zt.fog=vt.fog,Zt.envMap=(qe.isMeshStandardMaterial?Re:Te).get(qe.envMap||Zt.environment),Zt.envMapRotation=Zt.environment!==null&&qe.envMap===null?vt.environmentRotation:qe.envMapRotation,ro===void 0&&(qe.addEventListener("dispose",mt),ro=new Map,Zt.programs=ro);let To=ro.get(ei);if(To!==void 0){if(Zt.currentProgram===To&&Zt.lightsStateVersion===Nn)return rn(qe,Co),To}else Co.uniforms=Le.getUniforms(qe),qe.onBuild(qt,Co,I),qe.onBeforeCompile(Co,I),To=Le.acquireProgram(Co,ei),ro.set(ei,To),Zt.uniforms=Co.uniforms;const yo=Zt.uniforms;return(!qe.isShaderMaterial&&!qe.isRawShaderMaterial||qe.clipping===!0)&&(yo.clippingPlanes=at.uniform),rn(qe,Co),Zt.needsLights=Ao(qe),Zt.lightsStateVersion=Nn,Zt.needsLights&&(yo.ambientLightColor.value=nn.state.ambient,yo.lightProbe.value=nn.state.probe,yo.directionalLights.value=nn.state.directional,yo.directionalLightShadows.value=nn.state.directionalShadow,yo.spotLights.value=nn.state.spot,yo.spotLightShadows.value=nn.state.spotShadow,yo.rectAreaLights.value=nn.state.rectArea,yo.ltc_1.value=nn.state.rectAreaLTC1,yo.ltc_2.value=nn.state.rectAreaLTC2,yo.pointLights.value=nn.state.point,yo.pointLightShadows.value=nn.state.pointShadow,yo.hemisphereLights.value=nn.state.hemi,yo.directionalShadowMap.value=nn.state.directionalShadowMap,yo.directionalShadowMatrix.value=nn.state.directionalShadowMatrix,yo.spotShadowMap.value=nn.state.spotShadowMap,yo.spotLightMatrix.value=nn.state.spotLightMatrix,yo.spotLightMap.value=nn.state.spotLightMap,yo.pointShadowMap.value=nn.state.pointShadowMap,yo.pointShadowMatrix.value=nn.state.pointShadowMatrix),Zt.currentProgram=To,Zt.uniformsList=null,To}function Kt(qe){if(qe.uniformsList===null){const vt=qe.currentProgram.getUniforms();qe.uniformsList=jde.seqWithValue(vt.seq,qe.uniforms)}return qe.uniformsList}function rn(qe,vt){const qt=Pe.get(qe);qt.outputColorSpace=vt.outputColorSpace,qt.batching=vt.batching,qt.batchingColor=vt.batchingColor,qt.instancing=vt.instancing,qt.instancingColor=vt.instancingColor,qt.instancingMorph=vt.instancingMorph,qt.skinning=vt.skinning,qt.morphTargets=vt.morphTargets,qt.morphNormals=vt.morphNormals,qt.morphColors=vt.morphColors,qt.morphTargetsCount=vt.morphTargetsCount,qt.numClippingPlanes=vt.numClippingPlanes,qt.numIntersection=vt.numClipIntersection,qt.vertexAlphas=vt.vertexAlphas,qt.vertexTangents=vt.vertexTangents,qt.toneMapping=vt.toneMapping}function Lt(qe,vt,qt,Zt,nn){vt.isScene!==!0&&(vt=_e),we.resetTextureUnits();const zn=vt.fog,Nn=Zt.isMeshStandardMaterial?vt.environment:null,Co=E===null?I.outputColorSpace:E.isXRRenderTarget===!0?E.texture.colorSpace:jw,ei=(Zt.isMeshStandardMaterial?Re:Te).get(Zt.envMap||Nn),ro=Zt.vertexColors===!0&&!!qt.attributes.color&&qt.attributes.color.itemSize===4,To=!!qt.attributes.tangent&&(!!Zt.normalMap||Zt.anisotropy>0),yo=!!qt.morphAttributes.position,Ro=!!qt.morphAttributes.normal,On=!!qt.morphAttributes.color;let uo=Jw;Zt.toneMapped&&(E===null||E.isXRRenderTarget===!0)&&(uo=I.toneMapping);const Oo=qt.morphAttributes.position||qt.morphAttributes.normal||qt.morphAttributes.color,ko=Oo!==void 0?Oo.length:0,Ko=Pe.get(Zt),mi=m.state.lights;if(ie===!0&&(ne===!0||qe!==S)){const ds=qe===S&&Zt.id===B;at.setState(Zt,qe,ds)}let Fo=!1;Zt.version===Ko.__version?(Ko.needsLights&&Ko.lightsStateVersion!==mi.state.version||Ko.outputColorSpace!==Co||nn.isBatchedMesh&&Ko.batching===!1||!nn.isBatchedMesh&&Ko.batching===!0||nn.isBatchedMesh&&Ko.batchingColor===!0&&nn.colorTexture===null||nn.isBatchedMesh&&Ko.batchingColor===!1&&nn.colorTexture!==null||nn.isInstancedMesh&&Ko.instancing===!1||!nn.isInstancedMesh&&Ko.instancing===!0||nn.isSkinnedMesh&&Ko.skinning===!1||!nn.isSkinnedMesh&&Ko.skinning===!0||nn.isInstancedMesh&&Ko.instancingColor===!0&&nn.instanceColor===null||nn.isInstancedMesh&&Ko.instancingColor===!1&&nn.instanceColor!==null||nn.isInstancedMesh&&Ko.instancingMorph===!0&&nn.morphTexture===null||nn.isInstancedMesh&&Ko.instancingMorph===!1&&nn.morphTexture!==null||Ko.envMap!==ei||Zt.fog===!0&&Ko.fog!==zn||Ko.numClippingPlanes!==void 0&&(Ko.numClippingPlanes!==at.numPlanes||Ko.numIntersection!==at.numIntersection)||Ko.vertexAlphas!==ro||Ko.vertexTangents!==To||Ko.morphTargets!==yo||Ko.morphNormals!==Ro||Ko.morphColors!==On||Ko.toneMapping!==uo||Ko.morphTargetsCount!==ko)&&(Fo=!0):(Fo=!0,Ko.__version=Zt.version);let Nr=Ko.currentProgram;Fo===!0&&(Nr=ht(Zt,vt,nn));let Rs=!1,ur=!1,zi=!1;const bi=Nr.getUniforms(),Ar=Ko.uniforms;if(he.useProgram(Nr.program)&&(Rs=!0,ur=!0,zi=!0),Zt.id!==B&&(B=Zt.id,ur=!0),Rs||S!==qe){bi.setValue(pe,"projectionMatrix",qe.projectionMatrix),bi.setValue(pe,"viewMatrix",qe.matrixWorldInverse);const ds=bi.map.cameraPosition;ds!==void 0&&ds.setValue(pe,ge.setFromMatrixPosition(qe.matrixWorld)),ve.logarithmicDepthBuffer&&bi.setValue(pe,"logDepthBufFC",2/(Math.log(qe.far+1)/Math.LN2)),(Zt.isMeshPhongMaterial||Zt.isMeshToonMaterial||Zt.isMeshLambertMaterial||Zt.isMeshBasicMaterial||Zt.isMeshStandardMaterial||Zt.isShaderMaterial)&&bi.setValue(pe,"isOrthographic",qe.isOrthographicCamera===!0),S!==qe&&(S=qe,ur=!0,zi=!0)}if(nn.isSkinnedMesh){bi.setOptional(pe,nn,"bindMatrix"),bi.setOptional(pe,nn,"bindMatrixInverse");const ds=nn.skeleton;ds&&(ds.boneTexture===null&&ds.computeBoneTexture(),bi.setValue(pe,"boneTexture",ds.boneTexture,we))}nn.isBatchedMesh&&(bi.setOptional(pe,nn,"batchingTexture"),bi.setValue(pe,"batchingTexture",nn._matricesTexture,we),bi.setOptional(pe,nn,"batchingColorTexture"),nn._colorsTexture!==null&&bi.setValue(pe,"batchingColorTexture",nn._colorsTexture,we));const ws=qt.morphAttributes;if((ws.position!==void 0||ws.normal!==void 0||ws.color!==void 0)&&bt.update(nn,qt,Nr),(ur||Ko.receiveShadow!==nn.receiveShadow)&&(Ko.receiveShadow=nn.receiveShadow,bi.setValue(pe,"receiveShadow",nn.receiveShadow)),Zt.isMeshGouraudMaterial&&Zt.envMap!==null&&(Ar.envMap.value=ei,Ar.flipEnvMap.value=ei.isCubeTexture&&ei.isRenderTargetTexture===!1?-1:1),Zt.isMeshStandardMaterial&&Zt.envMap===null&&vt.environment!==null&&(Ar.envMapIntensity.value=vt.environmentIntensity),ur&&(bi.setValue(pe,"toneMappingExposure",I.toneMappingExposure),Ko.needsLights&&Ho(Ar,zi),zn&&Zt.fog===!0&&Ye.refreshFogUniforms(Ar,zn),Ye.refreshMaterialUniforms(Ar,Zt,U,O,m.state.transmissionRenderTarget[qe.id]),jde.upload(pe,Kt(Ko),Ar,we)),Zt.isShaderMaterial&&Zt.uniformsNeedUpdate===!0&&(jde.upload(pe,Kt(Ko),Ar,we),Zt.uniformsNeedUpdate=!1),Zt.isSpriteMaterial&&bi.setValue(pe,"center",nn.center),bi.setValue(pe,"modelViewMatrix",nn.modelViewMatrix),bi.setValue(pe,"normalMatrix",nn.normalMatrix),bi.setValue(pe,"modelMatrix",nn.matrixWorld),Zt.isShaderMaterial||Zt.isRawShaderMaterial){const ds=Zt.uniformsGroups;for(let Et=0,Gt=ds.length;Et<Gt;Et++){const Rt=ds[Et];Yt.update(Rt,Nr),Yt.bind(Rt,Nr)}}return Nr}function Ho(qe,vt){qe.ambientLightColor.needsUpdate=vt,qe.lightProbe.needsUpdate=vt,qe.directionalLights.needsUpdate=vt,qe.directionalLightShadows.needsUpdate=vt,qe.pointLights.needsUpdate=vt,qe.pointLightShadows.needsUpdate=vt,qe.spotLights.needsUpdate=vt,qe.spotLightShadows.needsUpdate=vt,qe.rectAreaLights.needsUpdate=vt,qe.hemisphereLights.needsUpdate=vt}function Ao(qe){return qe.isMeshLambertMaterial||qe.isMeshToonMaterial||qe.isMeshPhongMaterial||qe.isMeshStandardMaterial||qe.isShadowMaterial||qe.isShaderMaterial&&qe.lights===!0}this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return E},this.setRenderTargetTextures=function(qe,vt,qt){Pe.get(qe.texture).__webglTexture=vt,Pe.get(qe.depthTexture).__webglTexture=qt;const Zt=Pe.get(qe);Zt.__hasExternalTextures=!0,Zt.__autoAllocateDepthBuffer=qt===void 0,Zt.__autoAllocateDepthBuffer||Me.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),Zt.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(qe,vt){const qt=Pe.get(qe);qt.__webglFramebuffer=vt,qt.__useDefaultFramebuffer=vt===void 0},this.setRenderTarget=function(qe,vt=0,qt=0){E=qe,y=vt,x=qt;let Zt=!0,nn=null,zn=!1,Nn=!1;if(qe){const ei=Pe.get(qe);ei.__useDefaultFramebuffer!==void 0?(he.bindFramebuffer(pe.FRAMEBUFFER,null),Zt=!1):ei.__webglFramebuffer===void 0?we.setupRenderTarget(qe):ei.__hasExternalTextures&&we.rebindTextures(qe,Pe.get(qe.texture).__webglTexture,Pe.get(qe.depthTexture).__webglTexture);const ro=qe.texture;(ro.isData3DTexture||ro.isDataArrayTexture||ro.isCompressedArrayTexture)&&(Nn=!0);const To=Pe.get(qe).__webglFramebuffer;qe.isWebGLCubeRenderTarget?(Array.isArray(To[vt])?nn=To[vt][qt]:nn=To[vt],zn=!0):qe.samples>0&&we.useMultisampledRTT(qe)===!1?nn=Pe.get(qe).__webglMultisampledFramebuffer:Array.isArray(To)?nn=To[qt]:nn=To,Q.copy(qe.viewport),w.copy(qe.scissor),M=qe.scissorTest}else Q.copy(te).multiplyScalar(U).floor(),w.copy(j).multiplyScalar(U).floor(),M=J;if(he.bindFramebuffer(pe.FRAMEBUFFER,nn)&&Zt&&he.drawBuffers(qe,nn),he.viewport(Q),he.scissor(w),he.setScissorTest(M),zn){const ei=Pe.get(qe.texture);pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_CUBE_MAP_POSITIVE_X+vt,ei.__webglTexture,qt)}else if(Nn){const ei=Pe.get(qe.texture),ro=vt||0;pe.framebufferTextureLayer(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,ei.__webglTexture,qt||0,ro)}B=-1},this.readRenderTargetPixels=function(qe,vt,qt,Zt,nn,zn,Nn){if(!(qe&&qe.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Co=Pe.get(qe).__webglFramebuffer;if(qe.isWebGLCubeRenderTarget&&Nn!==void 0&&(Co=Co[Nn]),Co){he.bindFramebuffer(pe.FRAMEBUFFER,Co);try{const ei=qe.texture,ro=ei.format,To=ei.type;if(!ve.textureFormatReadable(ro)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ve.textureTypeReadable(To)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}vt>=0&&vt<=qe.width-Zt&&qt>=0&&qt<=qe.height-nn&&pe.readPixels(vt,qt,Zt,nn,kt.convert(ro),kt.convert(To),zn)}finally{const ei=E!==null?Pe.get(E).__webglFramebuffer:null;he.bindFramebuffer(pe.FRAMEBUFFER,ei)}}},this.readRenderTargetPixelsAsync=async function(qe,vt,qt,Zt,nn,zn,Nn){if(!(qe&&qe.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Co=Pe.get(qe).__webglFramebuffer;if(qe.isWebGLCubeRenderTarget&&Nn!==void 0&&(Co=Co[Nn]),Co){he.bindFramebuffer(pe.FRAMEBUFFER,Co);try{const ei=qe.texture,ro=ei.format,To=ei.type;if(!ve.textureFormatReadable(ro))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ve.textureTypeReadable(To))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(vt>=0&&vt<=qe.width-Zt&&qt>=0&&qt<=qe.height-nn){const yo=pe.createBuffer();pe.bindBuffer(pe.PIXEL_PACK_BUFFER,yo),pe.bufferData(pe.PIXEL_PACK_BUFFER,zn.byteLength,pe.STREAM_READ),pe.readPixels(vt,qt,Zt,nn,kt.convert(ro),kt.convert(To),0),pe.flush();const Ro=pe.fenceSync(pe.SYNC_GPU_COMMANDS_COMPLETE,0);await E$o(pe,Ro,4);try{pe.bindBuffer(pe.PIXEL_PACK_BUFFER,yo),pe.getBufferSubData(pe.PIXEL_PACK_BUFFER,0,zn)}finally{pe.deleteBuffer(yo),pe.deleteSync(Ro)}return zn}}finally{const ei=E!==null?Pe.get(E).__webglFramebuffer:null;he.bindFramebuffer(pe.FRAMEBUFFER,ei)}}},this.copyFramebufferToTexture=function(qe,vt=null,qt=0){qe.isTexture!==!0&&(console.warn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),vt=arguments[0]||null,qe=arguments[1]);const Zt=Math.pow(2,-qt),nn=Math.floor(qe.image.width*Zt),zn=Math.floor(qe.image.height*Zt),Nn=vt!==null?vt.x:0,Co=vt!==null?vt.y:0;we.setTexture2D(qe,0),pe.copyTexSubImage2D(pe.TEXTURE_2D,qt,0,0,Nn,Co,nn,zn),he.unbindTexture()},this.copyTextureToTexture=function(qe,vt,qt=null,Zt=null,nn=0){qe.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture function signature has changed."),Zt=arguments[0]||null,qe=arguments[1],vt=arguments[2],nn=arguments[3]||0,qt=null);let zn,Nn,Co,ei,ro,To;qt!==null?(zn=qt.max.x-qt.min.x,Nn=qt.max.y-qt.min.y,Co=qt.min.x,ei=qt.min.y):(zn=qe.image.width,Nn=qe.image.height,Co=0,ei=0),Zt!==null?(ro=Zt.x,To=Zt.y):(ro=0,To=0);const yo=kt.convert(vt.format),Ro=kt.convert(vt.type);we.setTexture2D(vt,0),pe.pixelStorei(pe.UNPACK_FLIP_Y_WEBGL,vt.flipY),pe.pixelStorei(pe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,vt.premultiplyAlpha),pe.pixelStorei(pe.UNPACK_ALIGNMENT,vt.unpackAlignment);const On=pe.getParameter(pe.UNPACK_ROW_LENGTH),uo=pe.getParameter(pe.UNPACK_IMAGE_HEIGHT),Oo=pe.getParameter(pe.UNPACK_SKIP_PIXELS),ko=pe.getParameter(pe.UNPACK_SKIP_ROWS),Ko=pe.getParameter(pe.UNPACK_SKIP_IMAGES),mi=qe.isCompressedTexture?qe.mipmaps[nn]:qe.image;pe.pixelStorei(pe.UNPACK_ROW_LENGTH,mi.width),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,mi.height),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,Co),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,ei),qe.isDataTexture?pe.texSubImage2D(pe.TEXTURE_2D,nn,ro,To,zn,Nn,yo,Ro,mi.data):qe.isCompressedTexture?pe.compressedTexSubImage2D(pe.TEXTURE_2D,nn,ro,To,mi.width,mi.height,yo,mi.data):pe.texSubImage2D(pe.TEXTURE_2D,nn,ro,To,yo,Ro,mi),pe.pixelStorei(pe.UNPACK_ROW_LENGTH,On),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,uo),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,Oo),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,ko),pe.pixelStorei(pe.UNPACK_SKIP_IMAGES,Ko),nn===0&&vt.generateMipmaps&&pe.generateMipmap(pe.TEXTURE_2D),he.unbindTexture()},this.copyTextureToTexture3D=function(qe,vt,qt=null,Zt=null,nn=0){qe.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),qt=arguments[0]||null,Zt=arguments[1]||null,qe=arguments[2],vt=arguments[3],nn=arguments[4]||0);let zn,Nn,Co,ei,ro,To,yo,Ro,On;const uo=qe.isCompressedTexture?qe.mipmaps[nn]:qe.image;qt!==null?(zn=qt.max.x-qt.min.x,Nn=qt.max.y-qt.min.y,Co=qt.max.z-qt.min.z,ei=qt.min.x,ro=qt.min.y,To=qt.min.z):(zn=uo.width,Nn=uo.height,Co=uo.depth,ei=0,ro=0,To=0),Zt!==null?(yo=Zt.x,Ro=Zt.y,On=Zt.z):(yo=0,Ro=0,On=0);const Oo=kt.convert(vt.format),ko=kt.convert(vt.type);let Ko;if(vt.isData3DTexture)we.setTexture3D(vt,0),Ko=pe.TEXTURE_3D;else if(vt.isDataArrayTexture||vt.isCompressedArrayTexture)we.setTexture2DArray(vt,0),Ko=pe.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}pe.pixelStorei(pe.UNPACK_FLIP_Y_WEBGL,vt.flipY),pe.pixelStorei(pe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,vt.premultiplyAlpha),pe.pixelStorei(pe.UNPACK_ALIGNMENT,vt.unpackAlignment);const mi=pe.getParameter(pe.UNPACK_ROW_LENGTH),Fo=pe.getParameter(pe.UNPACK_IMAGE_HEIGHT),Nr=pe.getParameter(pe.UNPACK_SKIP_PIXELS),Rs=pe.getParameter(pe.UNPACK_SKIP_ROWS),ur=pe.getParameter(pe.UNPACK_SKIP_IMAGES);pe.pixelStorei(pe.UNPACK_ROW_LENGTH,uo.width),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,uo.height),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,ei),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,ro),pe.pixelStorei(pe.UNPACK_SKIP_IMAGES,To),qe.isDataTexture||qe.isData3DTexture?pe.texSubImage3D(Ko,nn,yo,Ro,On,zn,Nn,Co,Oo,ko,uo.data):vt.isCompressedArrayTexture?pe.compressedTexSubImage3D(Ko,nn,yo,Ro,On,zn,Nn,Co,Oo,uo.data):pe.texSubImage3D(Ko,nn,yo,Ro,On,zn,Nn,Co,Oo,ko,uo),pe.pixelStorei(pe.UNPACK_ROW_LENGTH,mi),pe.pixelStorei(pe.UNPACK_IMAGE_HEIGHT,Fo),pe.pixelStorei(pe.UNPACK_SKIP_PIXELS,Nr),pe.pixelStorei(pe.UNPACK_SKIP_ROWS,Rs),pe.pixelStorei(pe.UNPACK_SKIP_IMAGES,ur),nn===0&&vt.generateMipmaps&&pe.generateMipmap(Ko),he.unbindTexture()},this.initRenderTarget=function(qe){Pe.get(qe).__webglFramebuffer===void 0&&we.setupRenderTarget(qe)},this.initTexture=function(qe){qe.isCubeTexture?we.setTextureCube(qe,0):qe.isData3DTexture?we.setTexture3D(qe,0):qe.isDataArrayTexture||qe.isCompressedArrayTexture?we.setTexture2DArray(qe,0):we.setTexture2D(qe,0),he.unbindTexture()},this.resetState=function(){y=0,x=0,E=null,he.reset(),it.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Xb}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===nTe?"display-p3":"srgb",n.unpackColorSpace=iu.workingColorSpace===xde?"display-p3":"srgb"}}class KR extends T0{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new t2,this.environmentIntensity=1,this.environmentRotation=new t2,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class Jei{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=oTe,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=u4()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return sTe("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,o){e*=this.stride,o*=n.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=n.array[o+i];return this}set(e,n=0){return this.array.set(e,n),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=u4()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const n=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),o=new this.constructor(n,this.stride);return o.setUsage(this.usage),o}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=u4()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const o2=new jt;class FTe{constructor(e,n,o,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=n,this.offset=o,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let n=0,o=this.data.count;n<o;n++)o2.fromBufferAttribute(this,n),o2.applyMatrix4(e),this.setXYZ(n,o2.x,o2.y,o2.z);return this}applyNormalMatrix(e){for(let n=0,o=this.count;n<o;n++)o2.fromBufferAttribute(this,n),o2.applyNormalMatrix(e),this.setXYZ(n,o2.x,o2.y,o2.z);return this}transformDirection(e){for(let n=0,o=this.count;n<o;n++)o2.fromBufferAttribute(this,n),o2.transformDirection(e),this.setXYZ(n,o2.x,o2.y,o2.z);return this}getComponent(e,n){let o=this.array[e*this.data.stride+this.offset+n];return this.normalized&&(o=HB(o,this.array)),o}setComponent(e,n,o){return this.normalized&&(o=ou(o,this.array)),this.data.array[e*this.data.stride+this.offset+n]=o,this}setX(e,n){return this.normalized&&(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset]=n,this}setY(e,n){return this.normalized&&(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset+1]=n,this}setZ(e,n){return this.normalized&&(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset+2]=n,this}setW(e,n){return this.normalized&&(n=ou(n,this.array)),this.data.array[e*this.data.stride+this.offset+3]=n,this}getX(e){let n=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(n=HB(n,this.array)),n}getY(e){let n=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(n=HB(n,this.array)),n}getZ(e){let n=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(n=HB(n,this.array)),n}getW(e){let n=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(n=HB(n,this.array)),n}setXY(e,n,o){return e=e*this.data.stride+this.offset,this.normalized&&(n=ou(n,this.array),o=ou(o,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=o,this}setXYZ(e,n,o,i){return e=e*this.data.stride+this.offset,this.normalized&&(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=o,this.data.array[e+2]=i,this}setXYZW(e,n,o,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(n=ou(n,this.array),o=ou(o,this.array),i=ou(i,this.array),r=ou(r,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=o,this.data.array[e+2]=i,this.data.array[e+3]=r,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let o=0;o<this.count;o++){const i=o*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)n.push(this.data.array[i+r])}return new tg(new this.array.constructor(n),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new FTe(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let o=0;o<this.count;o++){const i=o*this.data.stride+this.offset;for(let r=0;r<this.itemSize;r++)n.push(this.data.array[i+r])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:n,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const bzt=new jt,Szt=new ru,Qzt=new ru,Wei=new jt,vzt=new va,qde=new jt,LTe=new GB,wzt=new va,HTe=new zG;class jei extends Er{constructor(e,n){super(e,n),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=MKt,this.bindMatrix=new va,this.bindMatrixInverse=new va,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new e2),this.boundingBox.makeEmpty();const n=e.getAttribute("position");for(let o=0;o<n.count;o++)this.getVertexPosition(o,qde),this.boundingBox.expandByPoint(qde)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new GB),this.boundingSphere.makeEmpty();const n=e.getAttribute("position");for(let o=0;o<n.count;o++)this.getVertexPosition(o,qde),this.boundingSphere.expandByPoint(qde)}copy(e,n){return super.copy(e,n),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,n){const o=this.material,i=this.matrixWorld;o!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),LTe.copy(this.boundingSphere),LTe.applyMatrix4(i),e.ray.intersectsSphere(LTe)!==!1&&(wzt.copy(i).invert(),HTe.copy(e.ray).applyMatrix4(wzt),!(this.boundingBox!==null&&HTe.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,n,HTe)))}getVertexPosition(e,n){return super.getVertexPosition(e,n),this.applyBoneTransform(e,n),n}bind(e,n){this.skeleton=e,n===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),n=this.matrixWorld),this.bindMatrix.copy(n),this.bindMatrixInverse.copy(n).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new ru,n=this.geometry.attributes.skinWeight;for(let o=0,i=n.count;o<i;o++){e.fromBufferAttribute(n,o);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),n.setXYZW(o,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===MKt?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===Hjo?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,n){const o=this.skeleton,i=this.geometry;Szt.fromBufferAttribute(i.attributes.skinIndex,e),Qzt.fromBufferAttribute(i.attributes.skinWeight,e),bzt.copy(n).applyMatrix4(this.bindMatrix),n.set(0,0,0);for(let r=0;r<4;r++){const s=Qzt.getComponent(r);if(s!==0){const a=Szt.getComponent(r);vzt.multiplyMatrices(o.bones[a].matrixWorld,o.boneInverses[a]),n.addScaledVector(Wei.copy(bzt).applyMatrix4(vzt),s)}}return n.applyMatrix4(this.bindMatrixInverse)}}class Pzt extends T0{constructor(){super(),this.isBone=!0,this.type="Bone"}}class OTe extends Hg{constructor(e=null,n=1,o=1,i,r,s,a,A,c=wC,l=wC,u,g){super(null,s,a,A,c,l,i,r,u,g),this.isDataTexture=!0,this.image={data:e,width:n,height:o},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Mzt=new va,$ei=new va;class GTe{constructor(e=[],n=[]){this.uuid=u4(),this.bones=e.slice(0),this.boneInverses=n,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,n=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),n.length===0)this.calculateInverses();else if(e.length!==n.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let o=0,i=this.bones.length;o<i;o++)this.boneInverses.push(new va)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,n=this.bones.length;e<n;e++){const o=new va;this.bones[e]&&o.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(o)}}pose(){for(let e=0,n=this.bones.length;e<n;e++){const o=this.bones[e];o&&o.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,n=this.bones.length;e<n;e++){const o=this.bones[e];o&&(o.parent&&o.parent.isBone?(o.matrix.copy(o.parent.matrixWorld).invert(),o.matrix.multiply(o.matrixWorld)):o.matrix.copy(o.matrixWorld),o.matrix.decompose(o.position,o.quaternion,o.scale))}}update(){const e=this.bones,n=this.boneInverses,o=this.boneMatrices,i=this.boneTexture;for(let r=0,s=e.length;r<s;r++){const a=e[r]?e[r].matrixWorld:$ei;Mzt.multiplyMatrices(a,n[r]),Mzt.toArray(o,r*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new GTe(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const n=new Float32Array(e*e*4);n.set(this.boneMatrices);const o=new OTe(n,e,e,l4,m6);return o.needsUpdate=!0,this.boneMatrices=n,this.boneTexture=o,this}getBoneByName(e){for(let n=0,o=this.bones.length;n<o;n++){const i=this.bones[n];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,n){this.uuid=e.uuid;for(let o=0,i=e.bones.length;o<i;o++){const r=e.bones[o];let s=n[r];s===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),s=new Pzt),this.bones.push(s),this.boneInverses.push(new va().fromArray(e.boneInverses[o]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const n=this.bones,o=this.boneInverses;for(let i=0,r=n.length;i<r;i++){const s=n[i];e.bones.push(s.uuid);const a=o[i];e.boneInverses.push(a.toArray())}return e}}class Xde extends tg{constructor(e,n,o,i=1){super(e,n,o),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const cY=new va,Dzt=new va,Zde=[],Nzt=new e2,qei=new va,Kq=new Er,Vq=new GB;class Xei extends Er{constructor(e,n,o){super(e,n),this.isInstancedMesh=!0,this.instanceMatrix=new Xde(new Float32Array(o*16),16),this.instanceColor=null,this.morphTexture=null,this.count=o,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<o;i++)this.setMatrixAt(i,qei)}computeBoundingBox(){const e=this.geometry,n=this.count;this.boundingBox===null&&(this.boundingBox=new e2),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let o=0;o<n;o++)this.getMatrixAt(o,cY),Nzt.copy(e.boundingBox).applyMatrix4(cY),this.boundingBox.union(Nzt)}computeBoundingSphere(){const e=this.geometry,n=this.count;this.boundingSphere===null&&(this.boundingSphere=new GB),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let o=0;o<n;o++)this.getMatrixAt(o,cY),Vq.copy(e.boundingSphere).applyMatrix4(cY),this.boundingSphere.union(Vq)}copy(e,n){return super.copy(e,n),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,n){n.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,n){n.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,n){const o=n.morphTargetInfluences,i=this.morphTexture.source.data.data,r=o.length+1,s=e*r+1;for(let a=0;a<o.length;a++)o[a]=i[s+a]}raycast(e,n){const o=this.matrixWorld,i=this.count;if(Kq.geometry=this.geometry,Kq.material=this.material,Kq.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Vq.copy(this.boundingSphere),Vq.applyMatrix4(o),e.ray.intersectsSphere(Vq)!==!1))for(let r=0;r<i;r++){this.getMatrixAt(r,cY),Dzt.multiplyMatrices(o,cY),Kq.matrixWorld=Dzt,Kq.raycast(e,Zde);for(let s=0,a=Zde.length;s<a;s++){const A=Zde[s];A.instanceId=r,A.object=this,n.push(A)}Zde.length=0}}setColorAt(e,n){this.instanceColor===null&&(this.instanceColor=new Xde(new Float32Array(this.instanceMatrix.count*3),3)),n.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,n){n.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,n){const o=n.morphTargetInfluences,i=o.length+1;this.morphTexture===null&&(this.morphTexture=new OTe(new Float32Array(i*this.count),i,this.count,kKt,m6));const r=this.morphTexture.source.data.data;let s=0;for(let c=0;c<o.length;c++)s+=o[c];const a=this.geometry.morphTargetsRelative?1:1-s,A=i*e;r[A]=a,r.set(o,A+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}class VR extends Gx{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Vi(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const ehe=new jt,the=new jt,Rzt=new va,zq=new zG,nhe=new GB,YTe=new jt,Tzt=new jt;let UTe=class extends T0{constructor(e=new Zl,n=new VR){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,o=[0];for(let i=1,r=n.count;i<r;i++)ehe.fromBufferAttribute(n,i-1),the.fromBufferAttribute(n,i),o[i]=o[i-1],o[i]+=ehe.distanceTo(the);e.setAttribute("lineDistance",new Bs(o,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,n){const o=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,s=o.drawRange;if(o.boundingSphere===null&&o.computeBoundingSphere(),nhe.copy(o.boundingSphere),nhe.applyMatrix4(i),nhe.radius+=r,e.ray.intersectsSphere(nhe)===!1)return;Rzt.copy(i).invert(),zq.copy(e.ray).applyMatrix4(Rzt);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,c=this.isLineSegments?2:1,l=o.index,g=o.attributes.position;if(l!==null){const h=Math.max(0,s.start),d=Math.min(l.count,s.start+s.count);for(let p=h,m=d-1;p<m;p+=c){const _=l.getX(p),f=l.getX(p+1),I=ohe(this,e,zq,A,_,f);I&&n.push(I)}if(this.isLineLoop){const p=l.getX(d-1),m=l.getX(h),_=ohe(this,e,zq,A,p,m);_&&n.push(_)}}else{const h=Math.max(0,s.start),d=Math.min(g.count,s.start+s.count);for(let p=h,m=d-1;p<m;p+=c){const _=ohe(this,e,zq,A,p,p+1);_&&n.push(_)}if(this.isLineLoop){const p=ohe(this,e,zq,A,d-1,h);p&&n.push(p)}}}updateMorphTargets(){const n=this.geometry.morphAttributes,o=Object.keys(n);if(o.length>0){const i=n[o[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=i.length;r<s;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}};function ohe(t,e,n,o,i,r){const s=t.geometry.attributes.position;if(ehe.fromBufferAttribute(s,i),the.fromBufferAttribute(s,r),n.distanceSqToSegment(ehe,the,YTe,Tzt)>o)return;YTe.applyMatrix4(t.matrixWorld);const A=e.ray.origin.distanceTo(YTe);if(!(A<e.near||A>e.far))return{distance:A,point:Tzt.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,object:t}}const kzt=new jt,Fzt=new jt;class Jq extends UTe{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,o=[];for(let i=0,r=n.count;i<r;i+=2)kzt.fromBufferAttribute(n,i),Fzt.fromBufferAttribute(n,i+1),o[i]=i===0?0:o[i-1],o[i+1]=o[i]+kzt.distanceTo(Fzt);e.setAttribute("lineDistance",new Bs(o,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Zei extends UTe{constructor(e,n){super(e,n),this.isLineLoop=!0,this.type="LineLoop"}}class zR extends Gx{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Vi(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const Lzt=new va,KTe=new zG,ihe=new GB,rhe=new jt;class Wq extends T0{constructor(e=new Zl,n=new zR){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,n){const o=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,s=o.drawRange;if(o.boundingSphere===null&&o.computeBoundingSphere(),ihe.copy(o.boundingSphere),ihe.applyMatrix4(i),ihe.radius+=r,e.ray.intersectsSphere(ihe)===!1)return;Lzt.copy(i).invert(),KTe.copy(e.ray).applyMatrix4(Lzt);const a=r/((this.scale.x+this.scale.y+this.scale.z)/3),A=a*a,c=o.index,u=o.attributes.position;if(c!==null){const g=Math.max(0,s.start),h=Math.min(c.count,s.start+s.count);for(let d=g,p=h;d<p;d++){const m=c.getX(d);rhe.fromBufferAttribute(u,m),Hzt(rhe,m,A,i,e,n,this)}}else{const g=Math.max(0,s.start),h=Math.min(u.count,s.start+s.count);for(let d=g,p=h;d<p;d++)rhe.fromBufferAttribute(u,d),Hzt(rhe,d,A,i,e,n,this)}}updateMorphTargets(){const n=this.geometry.morphAttributes,o=Object.keys(n);if(o.length>0){const i=n[o[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=i.length;r<s;r++){const a=i[r].name||String(r);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=r}}}}}function Hzt(t,e,n,o,i,r,s){const a=KTe.distanceSqToPoint(t);if(a<n){const A=new jt;KTe.closestPointToPoint(t,A),A.applyMatrix4(o);const c=i.ray.origin.distanceTo(A);if(c<i.near||c>i.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:A,index:e,face:null,object:s})}}class VTe extends Hg{constructor(e,n,o,i,r,s,a,A,c,l,u,g){super(null,s,a,A,c,l,i,r,u,g),this.isCompressedTexture=!0,this.image={width:n,height:o},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Ux extends Hg{constructor(e,n,o,i,r,s,a,A,c){super(e,n,o,i,r,s,a,A,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class C6{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const o=this.getUtoTmapping(e);return this.getPoint(o,n)}getPoints(e=5){const n=[];for(let o=0;o<=e;o++)n.push(this.getPoint(o/e));return n}getSpacedPoints(e=5){const n=[];for(let o=0;o<=e;o++)n.push(this.getPointAt(o/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let o,i=this.getPoint(0),r=0;n.push(0);for(let s=1;s<=e;s++)o=this.getPoint(s/e),r+=o.distanceTo(i),n.push(r),i=o;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const o=this.getLengths();let i=0;const r=o.length;let s;n?s=n:s=e*o[r-1];let a=0,A=r-1,c;for(;a<=A;)if(i=Math.floor(a+(A-a)/2),c=o[i]-s,c<0)a=i+1;else if(c>0)A=i-1;else{A=i;break}if(i=A,o[i]===s)return i/(r-1);const l=o[i],g=o[i+1]-l,h=(s-l)/g;return(i+h)/(r-1)}getTangent(e,n){let i=e-1e-4,r=e+1e-4;i<0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),a=this.getPoint(r),A=n||(s.isVector2?new ni:new jt);return A.copy(a).sub(s).normalize(),A}getTangentAt(e,n){const o=this.getUtoTmapping(e);return this.getTangent(o,n)}computeFrenetFrames(e,n){const o=new jt,i=[],r=[],s=[],a=new jt,A=new va;for(let h=0;h<=e;h++){const d=h/e;i[h]=this.getTangentAt(d,new jt)}r[0]=new jt,s[0]=new jt;let c=Number.MAX_VALUE;const l=Math.abs(i[0].x),u=Math.abs(i[0].y),g=Math.abs(i[0].z);l<=c&&(c=l,o.set(1,0,0)),u<=c&&(c=u,o.set(0,1,0)),g<=c&&o.set(0,0,1),a.crossVectors(i[0],o).normalize(),r[0].crossVectors(i[0],a),s[0].crossVectors(i[0],r[0]);for(let h=1;h<=e;h++){if(r[h]=r[h-1].clone(),s[h]=s[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()>Number.EPSILON){a.normalize();const d=Math.acos(rf(i[h-1].dot(i[h]),-1,1));r[h].applyMatrix4(A.makeRotationAxis(a,d))}s[h].crossVectors(i[h],r[h])}if(n===!0){let h=Math.acos(rf(r[0].dot(r[e]),-1,1));h/=e,i[0].dot(a.crossVectors(r[0],r[e]))>0&&(h=-h);for(let d=1;d<=e;d++)r[d].applyMatrix4(A.makeRotationAxis(i[d],h*d)),s[d].crossVectors(i[d],r[d])}return{tangents:i,normals:r,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class zTe extends C6{constructor(e=0,n=0,o=1,i=1,r=0,s=Math.PI*2,a=!1,A=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=o,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=a,this.aRotation=A}getPoint(e,n=new ni){const o=n,i=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)<Number.EPSILON;for(;r<0;)r+=i;for(;r>i;)r-=i;r<Number.EPSILON&&(s?r=0:r=i),this.aClockwise===!0&&!s&&(r===i?r=-i:r=r-i);const a=this.aStartAngle+e*r;let A=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const l=Math.cos(this.aRotation),u=Math.sin(this.aRotation),g=A-this.aX,h=c-this.aY;A=g*l-h*u+this.aX,c=g*u+h*l+this.aY}return o.set(A,c)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class eti extends zTe{constructor(e,n,o,i,r,s){super(e,n,o,o,i,r,s),this.isArcCurve=!0,this.type="ArcCurve"}}function JTe(){let t=0,e=0,n=0,o=0;function i(r,s,a,A){t=r,e=a,n=-3*r+3*s-2*a-A,o=2*r-2*s+a+A}return{initCatmullRom:function(r,s,a,A,c){i(s,a,c*(a-r),c*(A-s))},initNonuniformCatmullRom:function(r,s,a,A,c,l,u){let g=(s-r)/c-(a-r)/(c+l)+(a-s)/l,h=(a-s)/l-(A-s)/(l+u)+(A-a)/u;g*=l,h*=l,i(s,a,g,h)},calc:function(r){const s=r*r,a=s*r;return t+e*r+n*s+o*a}}}const she=new jt,WTe=new JTe,jTe=new JTe,$Te=new JTe;class Ozt extends C6{constructor(e=[],n=!1,o="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=n,this.curveType=o,this.tension=i}getPoint(e,n=new jt){const o=n,i=this.points,r=i.length,s=(r-(this.closed?0:1))*e;let a=Math.floor(s),A=s-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/r)+1)*r:A===0&&a===r-1&&(a=r-2,A=1);let c,l;this.closed||a>0?c=i[(a-1)%r]:(she.subVectors(i[0],i[1]).add(i[0]),c=she);const u=i[a%r],g=i[(a+1)%r];if(this.closed||a+2<r?l=i[(a+2)%r]:(she.subVectors(i[r-1],i[r-2]).add(i[r-1]),l=she),this.curveType==="centripetal"||this.curveType==="chordal"){const h=this.curveType==="chordal"?.5:.25;let d=Math.pow(c.distanceToSquared(u),h),p=Math.pow(u.distanceToSquared(g),h),m=Math.pow(g.distanceToSquared(l),h);p<1e-4&&(p=1),d<1e-4&&(d=p),m<1e-4&&(m=p),WTe.initNonuniformCatmullRom(c.x,u.x,g.x,l.x,d,p,m),jTe.initNonuniformCatmullRom(c.y,u.y,g.y,l.y,d,p,m),$Te.initNonuniformCatmullRom(c.z,u.z,g.z,l.z,d,p,m)}else this.curveType==="catmullrom"&&(WTe.initCatmullRom(c.x,u.x,g.x,l.x,this.tension),jTe.initCatmullRom(c.y,u.y,g.y,l.y,this.tension),$Te.initCatmullRom(c.z,u.z,g.z,l.z,this.tension));return o.set(WTe.calc(A),jTe.calc(A),$Te.calc(A)),o}copy(e){super.copy(e),this.points=[];for(let n=0,o=e.points.length;n<o;n++){const i=e.points[n];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,o=this.points.length;n<o;n++){const i=this.points[n];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,o=e.points.length;n<o;n++){const i=e.points[n];this.points.push(new jt().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Gzt(t,e,n,o,i){const r=(o-e)*.5,s=(i-n)*.5,a=t*t,A=t*a;return(2*n-2*o+r+s)*A+(-3*n+3*o-2*r-s)*a+r*t+n}function tti(t,e){const n=1-t;return n*n*e}function nti(t,e){return 2*(1-t)*t*e}function oti(t,e){return t*t*e}function jq(t,e,n,o){return tti(t,e)+nti(t,n)+oti(t,o)}function iti(t,e){const n=1-t;return n*n*n*e}function rti(t,e){const n=1-t;return 3*n*n*t*e}function sti(t,e){return 3*(1-t)*t*t*e}function ati(t,e){return t*t*t*e}function $q(t,e,n,o,i){return iti(t,e)+rti(t,n)+sti(t,o)+ati(t,i)}class Yzt extends C6{constructor(e=new ni,n=new ni,o=new ni,i=new ni){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=n,this.v2=o,this.v3=i}getPoint(e,n=new ni){const o=n,i=this.v0,r=this.v1,s=this.v2,a=this.v3;return o.set($q(e,i.x,r.x,s.x,a.x),$q(e,i.y,r.y,s.y,a.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Ati extends C6{constructor(e=new jt,n=new jt,o=new jt,i=new jt){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=n,this.v2=o,this.v3=i}getPoint(e,n=new jt){const o=n,i=this.v0,r=this.v1,s=this.v2,a=this.v3;return o.set($q(e,i.x,r.x,s.x,a.x),$q(e,i.y,r.y,s.y,a.y),$q(e,i.z,r.z,s.z,a.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Uzt extends C6{constructor(e=new ni,n=new ni){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=n}getPoint(e,n=new ni){const o=n;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new ni){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class cti extends C6{constructor(e=new jt,n=new jt){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=n}getPoint(e,n=new jt){const o=n;return e===1?o.copy(this.v2):(o.copy(this.v2).sub(this.v1),o.multiplyScalar(e).add(this.v1)),o}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new jt){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Kzt extends C6{constructor(e=new ni,n=new ni,o=new ni){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=n,this.v2=o}getPoint(e,n=new ni){const o=n,i=this.v0,r=this.v1,s=this.v2;return o.set(jq(e,i.x,r.x,s.x),jq(e,i.y,r.y,s.y)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class lti extends C6{constructor(e=new jt,n=new jt,o=new jt){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=n,this.v2=o}getPoint(e,n=new jt){const o=n,i=this.v0,r=this.v1,s=this.v2;return o.set(jq(e,i.x,r.x,s.x),jq(e,i.y,r.y,s.y),jq(e,i.z,r.z,s.z)),o}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Vzt extends C6{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,n=new ni){const o=n,i=this.points,r=(i.length-1)*e,s=Math.floor(r),a=r-s,A=i[s===0?s:s-1],c=i[s],l=i[s>i.length-2?i.length-1:s+1],u=i[s>i.length-3?i.length-1:s+2];return o.set(Gzt(a,A.x,c.x,l.x,u.x),Gzt(a,A.y,c.y,l.y,u.y)),o}copy(e){super.copy(e),this.points=[];for(let n=0,o=e.points.length;n<o;n++){const i=e.points[n];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,o=this.points.length;n<o;n++){const i=this.points[n];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,o=e.points.length;n<o;n++){const i=e.points[n];this.points.push(new ni().fromArray(i))}return this}}var qTe=Object.freeze({__proto__:null,ArcCurve:eti,CatmullRomCurve3:Ozt,CubicBezierCurve:Yzt,CubicBezierCurve3:Ati,EllipseCurve:zTe,LineCurve:Uzt,LineCurve3:cti,QuadraticBezierCurve:Kzt,QuadraticBezierCurve3:lti,SplineCurve:Vzt});class uti extends C6{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),n=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(n)){const o=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new qTe[o](n,e))}return this}getPoint(e,n){const o=e*this.getLength(),i=this.getCurveLengths();let r=0;for(;r<i.length;){if(i[r]>=o){const s=i[r]-o,a=this.curves[r],A=a.getLength(),c=A===0?0:1-s/A;return a.getPointAt(c,n)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let o=0,i=this.curves.length;o<i;o++)n+=this.curves[o].getLength(),e.push(n);return this.cacheLengths=e,e}getSpacedPoints(e=40){const n=[];for(let o=0;o<=e;o++)n.push(this.getPoint(o/e));return this.autoClose&&n.push(n[0]),n}getPoints(e=12){const n=[];let o;for(let i=0,r=this.curves;i<r.length;i++){const s=r[i],a=s.isEllipseCurve?e*2:s.isLineCurve||s.isLineCurve3?1:s.isSplineCurve?e*s.points.length:e,A=s.getPoints(a);for(let c=0;c<A.length;c++){const l=A[c];o&&o.equals(l)||(n.push(l),o=l)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,o=e.curves.length;n<o;n++){const i=e.curves[n];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let n=0,o=this.curves.length;n<o;n++){const i=this.curves[n];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let n=0,o=e.curves.length;n<o;n++){const i=e.curves[n];this.curves.push(new qTe[i.type]().fromJSON(i))}return this}}class XTe extends uti{constructor(e){super(),this.type="Path",this.currentPoint=new ni,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let n=1,o=e.length;n<o;n++)this.lineTo(e[n].x,e[n].y);return this}moveTo(e,n){return this.currentPoint.set(e,n),this}lineTo(e,n){const o=new Uzt(this.currentPoint.clone(),new ni(e,n));return this.curves.push(o),this.currentPoint.set(e,n),this}quadraticCurveTo(e,n,o,i){const r=new Kzt(this.currentPoint.clone(),new ni(e,n),new ni(o,i));return this.curves.push(r),this.currentPoint.set(o,i),this}bezierCurveTo(e,n,o,i,r,s){const a=new Yzt(this.currentPoint.clone(),new ni(e,n),new ni(o,i),new ni(r,s));return this.curves.push(a),this.currentPoint.set(r,s),this}splineThru(e){const n=[this.currentPoint.clone()].concat(e),o=new Vzt(n);return this.curves.push(o),this.currentPoint.copy(e[e.length-1]),this}arc(e,n,o,i,r,s){const a=this.currentPoint.x,A=this.currentPoint.y;return this.absarc(e+a,n+A,o,i,r,s),this}absarc(e,n,o,i,r,s){return this.absellipse(e,n,o,o,i,r,s),this}ellipse(e,n,o,i,r,s,a,A){const c=this.currentPoint.x,l=this.currentPoint.y;return this.absellipse(e+c,n+l,o,i,r,s,a,A),this}absellipse(e,n,o,i,r,s,a,A){const c=new zTe(e,n,o,i,r,s,a,A);if(this.curves.length>0){const u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);const l=c.getPoint(1);return this.currentPoint.copy(l),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class lY extends Zl{constructor(e=1,n=1,o=1,i=32,r=1,s=!1,a=0,A=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:n,height:o,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:a,thetaLength:A};const c=this;i=Math.floor(i),r=Math.floor(r);const l=[],u=[],g=[],h=[];let d=0;const p=[],m=o/2;let _=0;f(),s===!1&&(e>0&&I(!0),n>0&&I(!1)),this.setIndex(l),this.setAttribute("position",new Bs(u,3)),this.setAttribute("normal",new Bs(g,3)),this.setAttribute("uv",new Bs(h,2));function f(){const C=new jt,y=new jt;let x=0;const E=(n-e)/o;for(let B=0;B<=r;B++){const S=[],Q=B/r,w=Q*(n-e)+e;for(let M=0;M<=i;M++){const k=M/i,R=k*A+a,F=Math.sin(R),O=Math.cos(R);y.x=w*F,y.y=-Q*o+m,y.z=w*O,u.push(y.x,y.y,y.z),C.set(F,E,O).normalize(),g.push(C.x,C.y,C.z),h.push(k,1-Q),S.push(d++)}p.push(S)}for(let B=0;B<i;B++)for(let S=0;S<r;S++){const Q=p[S][B],w=p[S+1][B],M=p[S+1][B+1],k=p[S][B+1];l.push(Q,w,k),l.push(w,M,k),x+=6}c.addGroup(_,x,0),_+=x}function I(C){const y=d,x=new ni,E=new jt;let B=0;const S=C===!0?e:n,Q=C===!0?1:-1;for(let M=1;M<=i;M++)u.push(0,m*Q,0),g.push(0,Q,0),h.push(.5,.5),d++;const w=d;for(let M=0;M<=i;M++){const R=M/i*A+a,F=Math.cos(R),O=Math.sin(R);E.x=S*O,E.y=m*Q,E.z=S*F,u.push(E.x,E.y,E.z),g.push(0,Q,0),x.x=F*.5+.5,x.y=O*.5*Q+.5,h.push(x.x,x.y),d++}for(let M=0;M<i;M++){const k=y+M,R=w+M;C===!0?l.push(R,R+1,k):l.push(R+1,R,k),B+=3}c.addGroup(_,B,C===!0?1:2),_+=B}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new lY(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ZTe extends lY{constructor(e=1,n=1,o=32,i=1,r=!1,s=0,a=Math.PI*2){super(0,e,n,o,i,r,s,a),this.type="ConeGeometry",this.parameters={radius:e,height:n,radialSegments:o,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:a}}static fromJSON(e){return new ZTe(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}const ahe=new jt,Ahe=new jt,eke=new jt,che=new KB;class gti extends Zl{constructor(e=null,n=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:n},e!==null){const i=Math.pow(10,4),r=Math.cos(LG*n),s=e.getIndex(),a=e.getAttribute("position"),A=s?s.count:a.count,c=[0,0,0],l=["a","b","c"],u=new Array(3),g={},h=[];for(let d=0;d<A;d+=3){s?(c[0]=s.getX(d),c[1]=s.getX(d+1),c[2]=s.getX(d+2)):(c[0]=d,c[1]=d+1,c[2]=d+2);const{a:p,b:m,c:_}=che;if(p.fromBufferAttribute(a,c[0]),m.fromBufferAttribute(a,c[1]),_.fromBufferAttribute(a,c[2]),che.getNormal(eke),u[0]=`${Math.round(p.x*i)},${Math.round(p.y*i)},${Math.round(p.z*i)}`,u[1]=`${Math.round(m.x*i)},${Math.round(m.y*i)},${Math.round(m.z*i)}`,u[2]=`${Math.round(_.x*i)},${Math.round(_.y*i)},${Math.round(_.z*i)}`,!(u[0]===u[1]||u[1]===u[2]||u[2]===u[0]))for(let f=0;f<3;f++){const I=(f+1)%3,C=u[f],y=u[I],x=che[l[f]],E=che[l[I]],B=`${C}_${y}`,S=`${y}_${C}`;S in g&&g[S]?(eke.dot(g[S].normal)<=r&&(h.push(x.x,x.y,x.z),h.push(E.x,E.y,E.z)),g[S]=null):B in g||(g[B]={index0:c[f],index1:c[I],normal:eke.clone()})}}for(const d in g)if(g[d]){const{index0:p,index1:m}=g[d];ahe.fromBufferAttribute(a,p),Ahe.fromBufferAttribute(a,m),h.push(ahe.x,ahe.y,ahe.z),h.push(Ahe.x,Ahe.y,Ahe.z)}this.setAttribute("position",new Bs(h,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}let zzt=class extends XTe{constructor(e){super(e),this.uuid=u4(),this.type="Shape",this.holes=[]}getPointsHoles(e){const n=[];for(let o=0,i=this.holes.length;o<i;o++)n[o]=this.holes[o].getPoints(e);return n}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let n=0,o=e.holes.length;n<o;n++){const i=e.holes[n];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let n=0,o=this.holes.length;n<o;n++){const i=this.holes[n];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let n=0,o=e.holes.length;n<o;n++){const i=e.holes[n];this.holes.push(new XTe().fromJSON(i))}return this}};const dti={triangulate:function(t,e,n=2){const o=e&&e.length,i=o?e[0]*n:t.length;let r=Jzt(t,0,i,n,!0);const s=[];if(!r||r.next===r.prev)return s;let a,A,c,l,u,g,h;if(o&&(r=fti(t,e,r,n)),t.length>80*n){a=c=t[0],A=l=t[1];for(let d=n;d<i;d+=n)u=t[d],g=t[d+1],u<a&&(a=u),g<A&&(A=g),u>c&&(c=u),g>l&&(l=g);h=Math.max(c-a,l-A),h=h!==0?32767/h:0}return qq(r,s,n,a,A,h,0),s}};function Jzt(t,e,n,o,i){let r,s;if(i===wti(t,e,n,o)>0)for(r=e;r<n;r+=o)s=$zt(r,t[r],t[r+1],s);else for(r=n-o;r>=e;r-=o)s=$zt(r,t[r],t[r+1],s);return s&&lhe(s,s.next)&&(Zq(s),s=s.next),s}function JR(t,e){if(!t)return t;e||(e=t);let n=t,o;do if(o=!1,!n.steiner&&(lhe(n,n.next)||jh(n.prev,n,n.next)===0)){if(Zq(n),n=e=n.prev,n===n.next)break;o=!0}else n=n.next;while(o||n!==e);return e}function qq(t,e,n,o,i,r,s){if(!t)return;!s&&r&&Eti(t,o,i,r);let a=t,A,c;for(;t.prev!==t.next;){if(A=t.prev,c=t.next,r?pti(t,o,i,r):hti(t)){e.push(A.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),Zq(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=mti(JR(t),e,n),qq(t,e,n,o,i,r,2)):s===2&&_ti(t,e,n,o,i,r):qq(JR(t),e,n,o,i,r,1);break}}}function hti(t){const e=t.prev,n=t,o=t.next;if(jh(e,n,o)>=0)return!1;const i=e.x,r=n.x,s=o.x,a=e.y,A=n.y,c=o.y,l=i<r?i<s?i:s:r<s?r:s,u=a<A?a<c?a:c:A<c?A:c,g=i>r?i>s?i:s:r>s?r:s,h=a>A?a>c?a:c:A>c?A:c;let d=o.next;for(;d!==e;){if(d.x>=l&&d.x<=g&&d.y>=u&&d.y<=h&&uY(i,a,r,A,s,c,d.x,d.y)&&jh(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function pti(t,e,n,o){const i=t.prev,r=t,s=t.next;if(jh(i,r,s)>=0)return!1;const a=i.x,A=r.x,c=s.x,l=i.y,u=r.y,g=s.y,h=a<A?a<c?a:c:A<c?A:c,d=l<u?l<g?l:g:u<g?u:g,p=a>A?a>c?a:c:A>c?A:c,m=l>u?l>g?l:g:u>g?u:g,_=tke(h,d,e,n,o),f=tke(p,m,e,n,o);let I=t.prevZ,C=t.nextZ;for(;I&&I.z>=_&&C&&C.z<=f;){if(I.x>=h&&I.x<=p&&I.y>=d&&I.y<=m&&I!==i&&I!==s&&uY(a,l,A,u,c,g,I.x,I.y)&&jh(I.prev,I,I.next)>=0||(I=I.prevZ,C.x>=h&&C.x<=p&&C.y>=d&&C.y<=m&&C!==i&&C!==s&&uY(a,l,A,u,c,g,C.x,C.y)&&jh(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;I&&I.z>=_;){if(I.x>=h&&I.x<=p&&I.y>=d&&I.y<=m&&I!==i&&I!==s&&uY(a,l,A,u,c,g,I.x,I.y)&&jh(I.prev,I,I.next)>=0)return!1;I=I.prevZ}for(;C&&C.z<=f;){if(C.x>=h&&C.x<=p&&C.y>=d&&C.y<=m&&C!==i&&C!==s&&uY(a,l,A,u,c,g,C.x,C.y)&&jh(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function mti(t,e,n){let o=t;do{const i=o.prev,r=o.next.next;!lhe(i,r)&&Wzt(i,o,o.next,r)&&Xq(i,r)&&Xq(r,i)&&(e.push(i.i/n|0),e.push(o.i/n|0),e.push(r.i/n|0),Zq(o),Zq(o.next),o=t=r),o=o.next}while(o!==t);return JR(o)}function _ti(t,e,n,o,i,r){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Sti(s,a)){let A=jzt(s,a);s=JR(s,s.next),A=JR(A,A.next),qq(s,e,n,o,i,r,0),qq(A,e,n,o,i,r,0);return}a=a.next}s=s.next}while(s!==t)}function fti(t,e,n,o){const i=[];let r,s,a,A,c;for(r=0,s=e.length;r<s;r++)a=e[r]*o,A=r<s-1?e[r+1]*o:t.length,c=Jzt(t,a,A,o,!1),c===c.next&&(c.steiner=!0),i.push(bti(c));for(i.sort(Iti),r=0;r<i.length;r++)n=Cti(i[r],n);return n}function Iti(t,e){return t.x-e.x}function Cti(t,e){const n=yti(t,e);if(!n)return e;const o=jzt(n,t);return JR(o,o.next),JR(n,n.next)}function yti(t,e){let n=e,o=-1/0,i;const r=t.x,s=t.y;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){const g=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(g<=r&&g>o&&(o=g,i=n.x<n.next.x?n:n.next,g===r))return i}n=n.next}while(n!==e);if(!i)return null;const a=i,A=i.x,c=i.y;let l=1/0,u;n=i;do r>=n.x&&n.x>=A&&r!==n.x&&uY(s<c?r:o,s,A,c,s<c?o:r,s,n.x,n.y)&&(u=Math.abs(s-n.y)/(r-n.x),Xq(n,t)&&(u<l||u===l&&(n.x>i.x||n.x===i.x&&xti(i,n)))&&(i=n,l=u)),n=n.next;while(n!==a);return i}function xti(t,e){return jh(t.prev,t,e.prev)<0&&jh(e.next,t,t.next)<0}function Eti(t,e,n,o){let i=t;do i.z===0&&(i.z=tke(i.x,i.y,e,n,o)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,Bti(i)}function Bti(t){let e,n,o,i,r,s,a,A,c=1;do{for(n=t,t=null,r=null,s=0;n;){for(s++,o=n,a=0,e=0;e<c&&(a++,o=o.nextZ,!!o);e++);for(A=c;a>0||A>0&&o;)a!==0&&(A===0||!o||n.z<=o.z)?(i=n,n=n.nextZ,a--):(i=o,o=o.nextZ,A--),r?r.nextZ=i:t=i,i.prevZ=r,r=i;n=o}r.nextZ=null,c*=2}while(s>1);return t}function tke(t,e,n,o,i){return t=(t-n)*i|0,e=(e-o)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function bti(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function uY(t,e,n,o,i,r,s,a){return(i-s)*(e-a)>=(t-s)*(r-a)&&(t-s)*(o-a)>=(n-s)*(e-a)&&(n-s)*(r-a)>=(i-s)*(o-a)}function Sti(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Qti(t,e)&&(Xq(t,e)&&Xq(e,t)&&vti(t,e)&&(jh(t.prev,t,e.prev)||jh(t,e.prev,e))||lhe(t,e)&&jh(t.prev,t,t.next)>0&&jh(e.prev,e,e.next)>0)}function jh(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function lhe(t,e){return t.x===e.x&&t.y===e.y}function Wzt(t,e,n,o){const i=ghe(jh(t,e,n)),r=ghe(jh(t,e,o)),s=ghe(jh(n,o,t)),a=ghe(jh(n,o,e));return!!(i!==r&&s!==a||i===0&&uhe(t,n,e)||r===0&&uhe(t,o,e)||s===0&&uhe(n,t,o)||a===0&&uhe(n,e,o))}function uhe(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function ghe(t){return t>0?1:t<0?-1:0}function Qti(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Wzt(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function Xq(t,e){return jh(t.prev,t,t.next)<0?jh(t,e,t.next)>=0&&jh(t,t.prev,e)>=0:jh(t,e,t.prev)<0||jh(t,t.next,e)<0}function vti(t,e){let n=t,o=!1;const i=(t.x+e.x)/2,r=(t.y+e.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&i<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(o=!o),n=n.next;while(n!==t);return o}function jzt(t,e){const n=new nke(t.i,t.x,t.y),o=new nke(e.i,e.x,e.y),i=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,o.next=n,n.prev=o,r.next=o,o.prev=r,o}function $zt(t,e,n,o){const i=new nke(t,e,n);return o?(i.next=o.next,i.prev=o,o.next.prev=i,o.next=i):(i.prev=i,i.next=i),i}function Zq(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function nke(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function wti(t,e,n,o){let i=0;for(let r=e,s=n-o;r<n;r+=o)i+=(t[s]-t[r])*(t[r+1]+t[s+1]),s=r;return i}class gY{static area(e){const n=e.length;let o=0;for(let i=n-1,r=0;r<n;i=r++)o+=e[i].x*e[r].y-e[r].x*e[i].y;return o*.5}static isClockWise(e){return gY.area(e)<0}static triangulateShape(e,n){const o=[],i=[],r=[];qzt(e),Xzt(o,e);let s=e.length;n.forEach(qzt);for(let A=0;A<n.length;A++)i.push(s),s+=n[A].length,Xzt(o,n[A]);const a=dti.triangulate(o,i);for(let A=0;A<a.length;A+=3)r.push(a.slice(A,A+3));return r}}function qzt(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Xzt(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class oke extends Zl{constructor(e=new zzt([new ni(.5,.5),new ni(-.5,.5),new ni(-.5,-.5),new ni(.5,-.5)]),n={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:n},e=Array.isArray(e)?e:[e];const o=this,i=[],r=[];for(let a=0,A=e.length;a<A;a++){const c=e[a];s(c)}this.setAttribute("position",new Bs(i,3)),this.setAttribute("uv",new Bs(r,2)),this.computeVertexNormals();function s(a){const A=[],c=n.curveSegments!==void 0?n.curveSegments:12,l=n.steps!==void 0?n.steps:1,u=n.depth!==void 0?n.depth:1;let g=n.bevelEnabled!==void 0?n.bevelEnabled:!0,h=n.bevelThickness!==void 0?n.bevelThickness:.2,d=n.bevelSize!==void 0?n.bevelSize:h-.1,p=n.bevelOffset!==void 0?n.bevelOffset:0,m=n.bevelSegments!==void 0?n.bevelSegments:3;const _=n.extrudePath,f=n.UVGenerator!==void 0?n.UVGenerator:Pti;let I,C=!1,y,x,E,B;_&&(I=_.getSpacedPoints(l),C=!0,g=!1,y=_.computeFrenetFrames(l,!1),x=new jt,E=new jt,B=new jt),g||(m=0,h=0,d=0,p=0);const S=a.extractPoints(c);let Q=S.shape;const w=S.holes;if(!gY.isClockWise(Q)){Q=Q.reverse();for(let ye=0,Me=w.length;ye<Me;ye++){const ve=w[ye];gY.isClockWise(ve)&&(w[ye]=ve.reverse())}}const k=gY.triangulateShape(Q,w),R=Q;for(let ye=0,Me=w.length;ye<Me;ye++){const ve=w[ye];Q=Q.concat(ve)}function F(ye,Me,ve){return Me||console.error("THREE.ExtrudeGeometry: vec does not exist"),ye.clone().addScaledVector(Me,ve)}const O=Q.length,U=k.length;function Y(ye,Me,ve){let he,Qe,Pe;const we=ye.x-Me.x,Te=ye.y-Me.y,Re=ve.x-ye.x,Ee=ve.y-ye.y,ke=we*we+Te*Te,Ce=we*Ee-Te*Re;if(Math.abs(Ce)>Number.EPSILON){const Le=Math.sqrt(ke),Ye=Math.sqrt(Re*Re+Ee*Ee),tt=Me.x-Te/Le,At=Me.y+we/Le,at=ve.x-Ee/Ye,nt=ve.y+Re/Ye,gt=((at-tt)*Ee-(nt-At)*Re)/(we*Ee-Te*Re);he=tt+we*gt-ye.x,Qe=At+Te*gt-ye.y;const bt=he*he+Qe*Qe;if(bt<=2)return new ni(he,Qe);Pe=Math.sqrt(bt/2)}else{let Le=!1;we>Number.EPSILON?Re>Number.EPSILON&&(Le=!0):we<-Number.EPSILON?Re<-Number.EPSILON&&(Le=!0):Math.sign(Te)===Math.sign(Ee)&&(Le=!0),Le?(he=-Te,Qe=we,Pe=Math.sqrt(ke)):(he=we,Qe=Te,Pe=Math.sqrt(ke/2))}return new ni(he/Pe,Qe/Pe)}const W=[];for(let ye=0,Me=R.length,ve=Me-1,he=ye+1;ye<Me;ye++,ve++,he++)ve===Me&&(ve=0),he===Me&&(he=0),W[ye]=Y(R[ye],R[ve],R[he]);const te=[];let j,J=W.concat();for(let ye=0,Me=w.length;ye<Me;ye++){const ve=w[ye];j=[];for(let he=0,Qe=ve.length,Pe=Qe-1,we=he+1;he<Qe;he++,Pe++,we++)Pe===Qe&&(Pe=0),we===Qe&&(we=0),j[he]=Y(ve[he],ve[Pe],ve[we]);te.push(j),J=J.concat(j)}for(let ye=0;ye<m;ye++){const Me=ye/m,ve=h*Math.cos(Me*Math.PI/2),he=d*Math.sin(Me*Math.PI/2)+p;for(let Qe=0,Pe=R.length;Qe<Pe;Qe++){const we=F(R[Qe],W[Qe],he);ge(we.x,we.y,-ve)}for(let Qe=0,Pe=w.length;Qe<Pe;Qe++){const we=w[Qe];j=te[Qe];for(let Te=0,Re=we.length;Te<Re;Te++){const Ee=F(we[Te],j[Te],he);ge(Ee.x,Ee.y,-ve)}}}const oe=d+p;for(let ye=0;ye<O;ye++){const Me=g?F(Q[ye],J[ye],oe):Q[ye];C?(E.copy(y.normals[0]).multiplyScalar(Me.x),x.copy(y.binormals[0]).multiplyScalar(Me.y),B.copy(I[0]).add(E).add(x),ge(B.x,B.y,B.z)):ge(Me.x,Me.y,0)}for(let ye=1;ye<=l;ye++)for(let Me=0;Me<O;Me++){const ve=g?F(Q[Me],J[Me],oe):Q[Me];C?(E.copy(y.normals[ye]).multiplyScalar(ve.x),x.copy(y.binormals[ye]).multiplyScalar(ve.y),B.copy(I[ye]).add(E).add(x),ge(B.x,B.y,B.z)):ge(ve.x,ve.y,u/l*ye)}for(let ye=m-1;ye>=0;ye--){const Me=ye/m,ve=h*Math.cos(Me*Math.PI/2),he=d*Math.sin(Me*Math.PI/2)+p;for(let Qe=0,Pe=R.length;Qe<Pe;Qe++){const we=F(R[Qe],W[Qe],he);ge(we.x,we.y,u+ve)}for(let Qe=0,Pe=w.length;Qe<Pe;Qe++){const we=w[Qe];j=te[Qe];for(let Te=0,Re=we.length;Te<Re;Te++){const Ee=F(we[Te],j[Te],he);C?ge(Ee.x,Ee.y+I[l-1].y,I[l-1].x+ve):ge(Ee.x,Ee.y,u+ve)}}}ie(),ne();function ie(){const ye=i.length/3;if(g){let Me=0,ve=O*Me;for(let he=0;he<U;he++){const Qe=k[he];_e(Qe[2]+ve,Qe[1]+ve,Qe[0]+ve)}Me=l+m*2,ve=O*Me;for(let he=0;he<U;he++){const Qe=k[he];_e(Qe[0]+ve,Qe[1]+ve,Qe[2]+ve)}}else{for(let Me=0;Me<U;Me++){const ve=k[Me];_e(ve[2],ve[1],ve[0])}for(let Me=0;Me<U;Me++){const ve=k[Me];_e(ve[0]+O*l,ve[1]+O*l,ve[2]+O*l)}}o.addGroup(ye,i.length/3-ye,0)}function ne(){const ye=i.length/3;let Me=0;le(R,Me),Me+=R.length;for(let ve=0,he=w.length;ve<he;ve++){const Qe=w[ve];le(Qe,Me),Me+=Qe.length}o.addGroup(ye,i.length/3-ye,1)}function le(ye,Me){let ve=ye.length;for(;--ve>=0;){const he=ve;let Qe=ve-1;Qe<0&&(Qe=ye.length-1);for(let Pe=0,we=l+m*2;Pe<we;Pe++){const Te=O*Pe,Re=O*(Pe+1),Ee=Me+he+Te,ke=Me+Qe+Te,Ce=Me+Qe+Re,Le=Me+he+Re;ue(Ee,ke,Ce,Le)}}}function ge(ye,Me,ve){A.push(ye),A.push(Me),A.push(ve)}function _e(ye,Me,ve){fe(ye),fe(Me),fe(ve);const he=i.length/3,Qe=f.generateTopUV(o,i,he-3,he-2,he-1);pe(Qe[0]),pe(Qe[1]),pe(Qe[2])}function ue(ye,Me,ve,he){fe(ye),fe(Me),fe(he),fe(Me),fe(ve),fe(he);const Qe=i.length/3,Pe=f.generateSideWallUV(o,i,Qe-6,Qe-3,Qe-2,Qe-1);pe(Pe[0]),pe(Pe[1]),pe(Pe[3]),pe(Pe[1]),pe(Pe[2]),pe(Pe[3])}function fe(ye){i.push(A[ye*3+0]),i.push(A[ye*3+1]),i.push(A[ye*3+2])}function pe(ye){r.push(ye.x),r.push(ye.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes,o=this.parameters.options;return Mti(n,o,e)}static fromJSON(e,n){const o=[];for(let r=0,s=e.shapes.length;r<s;r++){const a=n[e.shapes[r]];o.push(a)}const i=e.options.extrudePath;return i!==void 0&&(e.options.extrudePath=new qTe[i.type]().fromJSON(i)),new oke(o,e.options)}}const Pti={generateTopUV:function(t,e,n,o,i){const r=e[n*3],s=e[n*3+1],a=e[o*3],A=e[o*3+1],c=e[i*3],l=e[i*3+1];return[new ni(r,s),new ni(a,A),new ni(c,l)]},generateSideWallUV:function(t,e,n,o,i,r){const s=e[n*3],a=e[n*3+1],A=e[n*3+2],c=e[o*3],l=e[o*3+1],u=e[o*3+2],g=e[i*3],h=e[i*3+1],d=e[i*3+2],p=e[r*3],m=e[r*3+1],_=e[r*3+2];return Math.abs(a-l)<Math.abs(s-c)?[new ni(s,1-A),new ni(c,1-u),new ni(g,1-d),new ni(p,1-_)]:[new ni(a,1-A),new ni(l,1-u),new ni(h,1-d),new ni(m,1-_)]}};function Mti(t,e,n){if(n.shapes=[],Array.isArray(t))for(let o=0,i=t.length;o<i;o++){const r=t[o];n.shapes.push(r.uuid)}else n.shapes.push(t.uuid);return n.options=Object.assign({},e),e.extrudePath!==void 0&&(n.options.extrudePath=e.extrudePath.toJSON()),n}class WR extends Zl{constructor(e=1,n=32,o=16,i=0,r=Math.PI*2,s=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:n,heightSegments:o,phiStart:i,phiLength:r,thetaStart:s,thetaLength:a},n=Math.max(3,Math.floor(n)),o=Math.max(2,Math.floor(o));const A=Math.min(s+a,Math.PI);let c=0;const l=[],u=new jt,g=new jt,h=[],d=[],p=[],m=[];for(let _=0;_<=o;_++){const f=[],I=_/o;let C=0;_===0&&s===0?C=.5/n:_===o&&A===Math.PI&&(C=-.5/n);for(let y=0;y<=n;y++){const x=y/n;u.x=-e*Math.cos(i+x*r)*Math.sin(s+I*a),u.y=e*Math.cos(s+I*a),u.z=e*Math.sin(i+x*r)*Math.sin(s+I*a),d.push(u.x,u.y,u.z),g.copy(u).normalize(),p.push(g.x,g.y,g.z),m.push(x+C,1-I),f.push(c++)}l.push(f)}for(let _=0;_<o;_++)for(let f=0;f<n;f++){const I=l[_][f+1],C=l[_][f],y=l[_+1][f],x=l[_+1][f+1];(_!==0||s>0)&&h.push(I,C,x),(_!==o-1||A<Math.PI)&&h.push(C,y,x)}this.setIndex(h),this.setAttribute("position",new Bs(d,3)),this.setAttribute("normal",new Bs(p,3)),this.setAttribute("uv",new Bs(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new WR(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class su extends Gx{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Vi(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Vi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tTe,this.normalScale=new ni(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new t2,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class CE extends su{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new ni(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return rf(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Vi(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Vi(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Vi(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class ike extends Gx{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Vi(16777215),this.specular=new Vi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Vi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=tTe,this.normalScale=new ni(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new t2,this.combine=VRe,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function dhe(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function Dti(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Nti(t){function e(i,r){return t[i]-t[r]}const n=t.length,o=new Array(n);for(let i=0;i!==n;++i)o[i]=i;return o.sort(e),o}function Zzt(t,e,n){const o=t.length,i=new t.constructor(o);for(let r=0,s=0;s!==o;++r){const a=n[r]*e;for(let A=0;A!==e;++A)i[s++]=t[a+A]}return i}function eJt(t,e,n,o){let i=1,r=t[0];for(;r!==void 0&&r[o]===void 0;)r=t[i++];if(r===void 0)return;let s=r[o];if(s!==void 0)if(Array.isArray(s))do s=r[o],s!==void 0&&(e.push(r.time),n.push.apply(n,s)),r=t[i++];while(r!==void 0);else if(s.toArray!==void 0)do s=r[o],s!==void 0&&(e.push(r.time),s.toArray(n,n.length)),r=t[i++];while(r!==void 0);else do s=r[o],s!==void 0&&(e.push(r.time),n.push(s)),r=t[i++];while(r!==void 0)}class eX{constructor(e,n,o,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(o),this.sampleValues=n,this.valueSize=o,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let o=this._cachedIndex,i=n[o],r=n[o-1];e:{t:{let s;n:{o:if(!(e<i)){for(let a=o+2;;){if(i===void 0){if(e<r)break o;return o=n.length,this._cachedIndex=o,this.copySampleValue_(o-1)}if(o===a)break;if(r=i,i=n[++o],e<i)break t}s=n.length;break n}if(!(e>=r)){const a=n[1];e<a&&(o=2,r=a);for(let A=o-2;;){if(r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(o===A)break;if(i=r,r=n[--o-1],e>=r)break t}s=o,o=0;break n}break e}for(;o<s;){const a=o+s>>>1;e<n[a]?s=a:o=a+1}if(i=n[o],r=n[o-1],r===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return o=n.length,this._cachedIndex=o,this.copySampleValue_(o-1)}this._cachedIndex=o,this.intervalChanged_(o,r,i)}return this.interpolate_(o,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const n=this.resultBuffer,o=this.sampleValues,i=this.valueSize,r=e*i;for(let s=0;s!==i;++s)n[s]=o[r+s];return n}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class Rti extends eX{constructor(e,n,o,i){super(e,n,o,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:gVt,endingEnd:gVt}}intervalChanged_(e,n,o){const i=this.parameterPositions;let r=e-2,s=e+1,a=i[r],A=i[s];if(a===void 0)switch(this.getSettings_().endingStart){case dVt:r=e,a=2*n-o;break;case hVt:r=i.length-2,a=n+i[r]-i[r+1];break;default:r=e,a=o}if(A===void 0)switch(this.getSettings_().endingEnd){case dVt:s=e,A=2*o-n;break;case hVt:s=1,A=o+i[1]-i[0];break;default:s=e-1,A=n}const c=(o-n)*.5,l=this.valueSize;this._weightPrev=c/(n-a),this._weightNext=c/(A-o),this._offsetPrev=r*l,this._offsetNext=s*l}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=e*a,c=A-a,l=this._offsetPrev,u=this._offsetNext,g=this._weightPrev,h=this._weightNext,d=(o-n)/(i-n),p=d*d,m=p*d,_=-g*m+2*g*p-g*d,f=(1+g)*m+(-1.5-2*g)*p+(-.5+g)*d+1,I=(-1-h)*m+(1.5+h)*p+.5*d,C=h*m-h*p;for(let y=0;y!==a;++y)r[y]=_*s[l+y]+f*s[c+y]+I*s[A+y]+C*s[u+y];return r}}class Tti extends eX{constructor(e,n,o,i){super(e,n,o,i)}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=e*a,c=A-a,l=(o-n)/(i-n),u=1-l;for(let g=0;g!==a;++g)r[g]=s[c+g]*u+s[A+g]*l;return r}}class kti extends eX{constructor(e,n,o,i){super(e,n,o,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class y6{constructor(e,n,o,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(n===void 0||n.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=dhe(n,this.TimeBufferType),this.values=dhe(o,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const n=e.constructor;let o;if(n.toJSON!==this.toJSON)o=n.toJSON(e);else{o={name:e.name,times:dhe(e.times,Array),values:dhe(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(o.interpolation=i)}return o.type=e.ValueTypeName,o}InterpolantFactoryMethodDiscrete(e){return new kti(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Tti(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Rti(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let n;switch(e){case TG:n=this.InterpolantFactoryMethodDiscrete;break;case kG:n=this.InterpolantFactoryMethodLinear;break;case ZRe:n=this.InterpolantFactoryMethodSmooth;break}if(n===void 0){const o="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(o);return console.warn("THREE.KeyframeTrack:",o),this}return this.createInterpolant=n,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return TG;case this.InterpolantFactoryMethodLinear:return kG;case this.InterpolantFactoryMethodSmooth:return ZRe}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const n=this.times;for(let o=0,i=n.length;o!==i;++o)n[o]+=e}return this}scale(e){if(e!==1){const n=this.times;for(let o=0,i=n.length;o!==i;++o)n[o]*=e}return this}trim(e,n){const o=this.times,i=o.length;let r=0,s=i-1;for(;r!==i&&o[r]<e;)++r;for(;s!==-1&&o[s]>n;)--s;if(++s,r!==0||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const a=this.getValueSize();this.times=o.slice(r,s),this.values=this.values.slice(r*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const o=this.times,i=this.values,r=o.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==r;a++){const A=o[a];if(typeof A=="number"&&isNaN(A)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,A),e=!1;break}if(s!==null&&s>A){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,A,s),e=!1;break}s=A}if(i!==void 0&&Dti(i))for(let a=0,A=i.length;a!==A;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),o=this.getValueSize(),i=this.getInterpolation()===ZRe,r=e.length-1;let s=1;for(let a=1;a<r;++a){let A=!1;const c=e[a],l=e[a+1];if(c!==l&&(a!==1||c!==e[0]))if(i)A=!0;else{const u=a*o,g=u-o,h=u+o;for(let d=0;d!==o;++d){const p=n[u+d];if(p!==n[g+d]||p!==n[h+d]){A=!0;break}}}if(A){if(a!==s){e[s]=e[a];const u=a*o,g=s*o;for(let h=0;h!==o;++h)n[g+h]=n[u+h]}++s}}if(r>0){e[s]=e[r];for(let a=r*o,A=s*o,c=0;c!==o;++c)n[A+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*o)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),o=this.constructor,i=new o(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}y6.prototype.TimeBufferType=Float32Array,y6.prototype.ValueBufferType=Float32Array,y6.prototype.DefaultInterpolation=kG;class dY extends y6{constructor(e,n,o){super(e,n,o)}}dY.prototype.ValueTypeName="bool",dY.prototype.ValueBufferType=Array,dY.prototype.DefaultInterpolation=TG,dY.prototype.InterpolantFactoryMethodLinear=void 0,dY.prototype.InterpolantFactoryMethodSmooth=void 0;class tJt extends y6{}tJt.prototype.ValueTypeName="color";class hY extends y6{}hY.prototype.ValueTypeName="number";class Fti extends eX{constructor(e,n,o,i){super(e,n,o,i)}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=(o-n)/(i-n);let c=e*a;for(let l=c+a;c!==l;c+=4)Zy.slerpFlat(r,0,s,c-a,s,c,A);return r}}class pY extends y6{InterpolantFactoryMethodLinear(e){return new Fti(this.times,this.values,this.getValueSize(),e)}}pY.prototype.ValueTypeName="quaternion",pY.prototype.InterpolantFactoryMethodSmooth=void 0;class mY extends y6{constructor(e,n,o){super(e,n,o)}}mY.prototype.ValueTypeName="string",mY.prototype.ValueBufferType=Array,mY.prototype.DefaultInterpolation=TG,mY.prototype.InterpolantFactoryMethodLinear=void 0,mY.prototype.InterpolantFactoryMethodSmooth=void 0;class _Y extends y6{}_Y.prototype.ValueTypeName="vector";class Lti{constructor(e="",n=-1,o=[],i=jjo){this.name=e,this.tracks=o,this.duration=n,this.blendMode=i,this.uuid=u4(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],o=e.tracks,i=1/(e.fps||1);for(let s=0,a=o.length;s!==a;++s)n.push(Oti(o[s]).scale(i));const r=new this(e.name,e.duration,n,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const n=[],o=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,s=o.length;r!==s;++r)n.push(y6.toJSON(o[r]));return i}static CreateFromMorphTargetSequence(e,n,o,i){const r=n.length,s=[];for(let a=0;a<r;a++){let A=[],c=[];A.push((a+r-1)%r,a,(a+1)%r),c.push(0,1,0);const l=Nti(A);A=Zzt(A,1,l),c=Zzt(c,1,l),!i&&A[0]===0&&(A.push(r),c.push(c[0])),s.push(new hY(".morphTargetInfluences["+n[a].name+"]",A,c).scale(1/o))}return new this(e,-1,s)}static findByName(e,n){let o=e;if(!Array.isArray(e)){const i=e;o=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<o.length;i++)if(o[i].name===n)return o[i];return null}static CreateClipsFromMorphTargetSequences(e,n,o){const i={},r=/^([\w-]*?)([\d]+)$/;for(let a=0,A=e.length;a<A;a++){const c=e[a],l=c.name.match(r);if(l&&l.length>1){const u=l[1];let g=i[u];g||(i[u]=g=[]),g.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,o));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const o=function(u,g,h,d,p){if(h.length!==0){const m=[],_=[];eJt(h,m,_,d),m.length!==0&&p.push(new u(g,m,_))}},i=[],r=e.name||"default",s=e.fps||30,a=e.blendMode;let A=e.length||-1;const c=e.hierarchy||[];for(let u=0;u<c.length;u++){const g=c[u].keys;if(!(!g||g.length===0))if(g[0].morphTargets){const h={};let d;for(d=0;d<g.length;d++)if(g[d].morphTargets)for(let p=0;p<g[d].morphTargets.length;p++)h[g[d].morphTargets[p]]=-1;for(const p in h){const m=[],_=[];for(let f=0;f!==g[d].morphTargets.length;++f){const I=g[d];m.push(I.time),_.push(I.morphTarget===p?1:0)}i.push(new hY(".morphTargetInfluence["+p+"]",m,_))}A=h.length*s}else{const h=".bones["+n[u].name+"]";o(_Y,h+".position",g,"pos",i),o(pY,h+".quaternion",g,"rot",i),o(_Y,h+".scale",g,"scl",i)}}return i.length===0?null:new this(r,A,i,a)}resetDuration(){const e=this.tracks;let n=0;for(let o=0,i=e.length;o!==i;++o){const r=this.tracks[o];n=Math.max(n,r.times[r.times.length-1])}return this.duration=n,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let n=0;n<this.tracks.length;n++)e=e&&this.tracks[n].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Hti(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return hY;case"vector":case"vector2":case"vector3":case"vector4":return _Y;case"color":return tJt;case"quaternion":return pY;case"bool":case"boolean":return dY;case"string":return mY}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function Oti(t){if(t.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=Hti(t.type);if(t.times===void 0){const n=[],o=[];eJt(t.keys,n,o,"value"),t.times=n,t.values=o}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const oP={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class Gti{constructor(e,n,o){const i=this;let r=!1,s=0,a=0,A;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=o,this.itemStart=function(l){a++,r===!1&&i.onStart!==void 0&&i.onStart(l,s,a),r=!0},this.itemEnd=function(l){s++,i.onProgress!==void 0&&i.onProgress(l,s,a),s===a&&(r=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(l){i.onError!==void 0&&i.onError(l)},this.resolveURL=function(l){return A?A(l):l},this.setURLModifier=function(l){return A=l,this},this.addHandler=function(l,u){return c.push(l,u),this},this.removeHandler=function(l){const u=c.indexOf(l);return u!==-1&&c.splice(u,2),this},this.getHandler=function(l){for(let u=0,g=c.length;u<g;u+=2){const h=c[u],d=c[u+1];if(h.global&&(h.lastIndex=0),h.test(l))return d}return null}}}const nJt=new Gti;class x6{constructor(e){this.manager=e!==void 0?e:nJt,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){const o=this;return new Promise(function(i,r){o.load(e,i,n,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}x6.DEFAULT_MATERIAL_NAME="__DEFAULT";const iS={};class Yti extends Error{constructor(e,n){super(e),this.response=n}}class fY extends x6{constructor(e){super(e)}load(e,n,o,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=oP.get(e);if(r!==void 0)return this.manager.itemStart(e),setTimeout(()=>{n&&n(r),this.manager.itemEnd(e)},0),r;if(iS[e]!==void 0){iS[e].push({onLoad:n,onProgress:o,onError:i});return}iS[e]=[],iS[e].push({onLoad:n,onProgress:o,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,A=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const l=iS[e],u=c.body.getReader(),g=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),h=g?parseInt(g):0,d=h!==0;let p=0;const m=new ReadableStream({start(_){f();function f(){u.read().then(({done:I,value:C})=>{if(I)_.close();else{p+=C.byteLength;const y=new ProgressEvent("progress",{lengthComputable:d,loaded:p,total:h});for(let x=0,E=l.length;x<E;x++){const B=l[x];B.onProgress&&B.onProgress(y)}_.enqueue(C),f()}},I=>{_.error(I)})}}});return new Response(m)}else throw new Yti(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(A){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(l=>new DOMParser().parseFromString(l,a));case"json":return c.json();default:if(a===void 0)return c.text();{const u=/charset="?([^;"\s]*)"?/i.exec(a),g=u&&u[1]?u[1].toLowerCase():void 0,h=new TextDecoder(g);return c.arrayBuffer().then(d=>h.decode(d))}}}).then(c=>{oP.add(e,c);const l=iS[e];delete iS[e];for(let u=0,g=l.length;u<g;u++){const h=l[u];h.onLoad&&h.onLoad(c)}}).catch(c=>{const l=iS[e];if(l===void 0)throw this.manager.itemError(e),c;delete iS[e];for(let u=0,g=l.length;u<g;u++){const h=l[u];h.onError&&h.onError(c)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Uti extends x6{constructor(e){super(e)}load(e,n,o,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,s=oP.get(e);if(s!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(s),r.manager.itemEnd(e)},0),s;const a=Lq("img");function A(){l(),oP.add(e,this),n&&n(this),r.manager.itemEnd(e)}function c(u){l(),i&&i(u),r.manager.itemError(e),r.manager.itemEnd(e)}function l(){a.removeEventListener("load",A,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",A,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class rke extends x6{constructor(e){super(e)}load(e,n,o,i){const r=new Hg,s=new Uti(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){r.image=a,r.needsUpdate=!0,n!==void 0&&n(r)},o,i),r}}class tX extends T0{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new Vi(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}class Kti extends tX{constructor(e,n,o){super(e,o),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(T0.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Vi(n)}copy(e,n){return super.copy(e,n),this.groundColor.copy(e.groundColor),this}}const ske=new va,oJt=new jt,iJt=new jt;class ake{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ni(512,512),this.map=null,this.mapPass=null,this.matrix=new va,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new STe,this._frameExtents=new ni(1,1),this._viewportCount=1,this._viewports=[new ru(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,o=this.matrix;oJt.setFromMatrixPosition(e.matrixWorld),n.position.copy(oJt),iJt.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(iJt),n.updateMatrixWorld(),ske.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ske),o.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),o.multiply(ske)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Vti extends ake{constructor(){super(new sf(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,o=HG*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||n.far;(o!==n.fov||i!==n.aspect||r!==n.far)&&(n.fov=o,n.aspect=i,n.far=r,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class zti extends tX{constructor(e,n,o=0,i=Math.PI/3,r=0,s=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(T0.DEFAULT_UP),this.updateMatrix(),this.target=new T0,this.distance=o,this.angle=i,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new Vti}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const rJt=new va,nX=new jt,Ake=new jt;class Jti extends ake{constructor(){super(new sf(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new ni(4,2),this._viewportCount=6,this._viewports=[new ru(2,1,1,1),new ru(0,1,1,1),new ru(3,1,1,1),new ru(1,1,1,1),new ru(3,0,1,1),new ru(1,0,1,1)],this._cubeDirections=[new jt(1,0,0),new jt(-1,0,0),new jt(0,0,1),new jt(0,0,-1),new jt(0,1,0),new jt(0,-1,0)],this._cubeUps=[new jt(0,1,0),new jt(0,1,0),new jt(0,1,0),new jt(0,1,0),new jt(0,0,1),new jt(0,0,-1)]}updateMatrices(e,n=0){const o=this.camera,i=this.matrix,r=e.distance||o.far;r!==o.far&&(o.far=r,o.updateProjectionMatrix()),nX.setFromMatrixPosition(e.matrixWorld),o.position.copy(nX),Ake.copy(o.position),Ake.add(this._cubeDirections[n]),o.up.copy(this._cubeUps[n]),o.lookAt(Ake),o.updateMatrixWorld(),i.makeTranslation(-nX.x,-nX.y,-nX.z),rJt.multiplyMatrices(o.projectionMatrix,o.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rJt)}}class sJt extends tX{constructor(e,n,o=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=o,this.decay=i,this.shadow=new Jti}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Wti extends ake{constructor(){super(new rY(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class aJt extends tX{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(T0.DEFAULT_UP),this.updateMatrix(),this.target=new T0,this.shadow=new Wti}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class AJt extends tX{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class jR{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let o=0,i=e.length;o<i;o++)n+=String.fromCharCode(e[o]);try{return decodeURIComponent(escape(n))}catch{return n}}static extractUrlBase(e){const n=e.lastIndexOf("/");return n===-1?"./":e.slice(0,n+1)}static resolveURL(e,n){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(n)&&/^\//.test(e)&&(n=n.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:n+e)}}class jti extends Zl{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class $ti extends x6{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,o,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,s=oP.get(e);if(s!==void 0){if(r.manager.itemStart(e),s.then){s.then(c=>{n&&n(c),r.manager.itemEnd(e)}).catch(c=>{i&&i(c)});return}return setTimeout(function(){n&&n(s),r.manager.itemEnd(e)},0),s}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const A=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){return oP.add(e,c),n&&n(c),r.manager.itemEnd(e),c}).catch(function(c){i&&i(c),oP.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)});oP.add(e,A),r.manager.itemStart(e)}}let qti=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=cJt(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=cJt();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}};function cJt(){return(typeof performance>"u"?Date:performance).now()}const cke="\\[\\]\\.:\\/",Xti=new RegExp("["+cke+"]","g"),lke="[^"+cke+"]",Zti="[^"+cke.replace("\\.","")+"]",eni=/((?:WC+[\/:])*)/.source.replace("WC",lke),tni=/(WCOD+)?/.source.replace("WCOD",Zti),nni=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lke),oni=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lke),ini=new RegExp("^"+eni+tni+nni+oni+"$"),rni=["material","materials","bones","map"];class sni{constructor(e,n,o){const i=o||Ll.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const o=this._targetGroup.nCachedObjects_,i=this._bindings[o];i!==void 0&&i.getValue(e,n)}setValue(e,n){const o=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=o.length;i!==r;++i)o[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,o=e.length;n!==o;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,o=e.length;n!==o;++n)e[n].unbind()}}class Ll{constructor(e,n,o){this.path=n,this.parsedPath=o||Ll.parseTrackName(n),this.node=Ll.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,o){return e&&e.isAnimationObjectGroup?new Ll.Composite(e,n,o):new Ll(e,n,o)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Xti,"")}static parseTrackName(e){const n=ini.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const o={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=o.nodeName&&o.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const r=o.nodeName.substring(i+1);rni.indexOf(r)!==-1&&(o.nodeName=o.nodeName.substring(0,i),o.objectName=r)}if(o.propertyName===null||o.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return o}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const o=e.skeleton.getBoneByName(n);if(o!==void 0)return o}if(e.children){const o=function(r){for(let s=0;s<r.length;s++){const a=r[s];if(a.name===n||a.uuid===n)return a;const A=o(a.children);if(A)return A}return null},i=o(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,n){e[n]=this.targetObject[this.propertyName]}_getValue_array(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)e[n++]=o[i]}_getValue_arrayElement(e,n){e[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,n){this.resolvedProperty.toArray(e,n)}_setValue_direct(e,n){this.targetObject[this.propertyName]=e[n]}_setValue_direct_setNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)o[i]=e[n++]}_setValue_array_setNeedsUpdate(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)o[i]=e[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,n){const o=this.resolvedProperty;for(let i=0,r=o.length;i!==r;++i)o[i]=e[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,n){this.resolvedProperty[this.propertyIndex]=e[n]}_setValue_arrayElement_setNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,n){this.resolvedProperty.fromArray(e,n)}_setValue_fromArray_setNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,n){this.bind(),this.getValue(e,n)}_setValue_unbound(e,n){this.bind(),this.setValue(e,n)}bind(){let e=this.node;const n=this.parsedPath,o=n.objectName,i=n.propertyName;let r=n.propertyIndex;if(e||(e=Ll.findNode(this.rootNode,n.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(o){let c=n.objectIndex;switch(o){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let l=0;l<e.length;l++)if(e[l].name===c){c=l;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[o]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[o]}if(c!==void 0){if(e[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[c]}}const s=e[i];if(s===void 0){const c=n.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",e);return}let a=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?a=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let A=this.BindingType.Direct;if(r!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[r]!==void 0&&(r=e.morphTargetDictionary[r])}A=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else s.fromArray!==void 0&&s.toArray!==void 0?(A=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(A=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=i;this.getValue=this.GetterByBindingType[A],this.setValue=this.SetterByBindingTypeAndVersioning[A][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ll.Composite=sni,Ll.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ll.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ll.prototype.GetterByBindingType=[Ll.prototype._getValue_direct,Ll.prototype._getValue_array,Ll.prototype._getValue_arrayElement,Ll.prototype._getValue_toArray],Ll.prototype.SetterByBindingTypeAndVersioning=[[Ll.prototype._setValue_direct,Ll.prototype._setValue_direct_setNeedsUpdate,Ll.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ll.prototype._setValue_array,Ll.prototype._setValue_array_setNeedsUpdate,Ll.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ll.prototype._setValue_arrayElement,Ll.prototype._setValue_arrayElement_setNeedsUpdate,Ll.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ll.prototype._setValue_fromArray,Ll.prototype._setValue_fromArray_setNeedsUpdate,Ll.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class uke{constructor(e){this.value=e}clone(){return new uke(this.value.clone===void 0?this.value:this.value.clone())}}const lJt=new va;class uJt{constructor(e,n,o=0,i=1/0){this.ray=new zG(e,n),this.near=o,this.far=i,this.camera=null,this.layers=new pTe,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,n){this.ray.set(e,n)}setFromCamera(e,n){n.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(n).sub(this.ray.origin).normalize(),this.camera=n):n.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld),this.camera=n):console.error("THREE.Raycaster: Unsupported camera type: "+n.type)}setFromXRController(e){return lJt.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(lJt),this}intersectObject(e,n=!0,o=[]){return gke(e,this,o,n),o.sort(gJt),o}intersectObjects(e,n=!0,o=[]){for(let i=0,r=e.length;i<r;i++)gke(e[i],this,o,n);return o.sort(gJt),o}}function gJt(t,e){return t.distance-e.distance}function gke(t,e,n,o){let i=!0;if(t.layers.test(e.layers)&&t.raycast(e,n)===!1&&(i=!1),i===!0&&o===!0){const r=t.children;for(let s=0,a=r.length;s<a;s++)gke(r[s],e,n,!0)}}class dJt{constructor(e=1,n=0,o=0){return this.radius=e,this.phi=n,this.theta=o,this}set(e,n,o){return this.radius=e,this.phi=n,this.theta=o,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,o){return this.radius=Math.sqrt(e*e+n*n+o*o),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,o),this.phi=Math.acos(rf(n/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:mde}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=mde);const hJt=parseInt(mde.replace(/\D+/g,""));function pJt(t,e){if(e===$jo)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===eTe||e===pVt){let n=t.getIndex();if(n===null){const s=[],a=t.getAttribute("position");if(a!==void 0){for(let A=0;A<a.count;A++)s.push(A);t.setIndex(s),n=t.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t}const o=n.count-2,i=[];if(n)if(e===eTe)for(let s=1;s<=o;s++)i.push(n.getX(0)),i.push(n.getX(s)),i.push(n.getX(s+1));else for(let s=0;s<o;s++)s%2===0?(i.push(n.getX(s)),i.push(n.getX(s+1)),i.push(n.getX(s+2))):(i.push(n.getX(s+2)),i.push(n.getX(s+1)),i.push(n.getX(s)));i.length/3!==o&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const r=t.clone();return r.setIndex(i),r.clearGroups(),r}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),t}var ani=Object.defineProperty,Ani=(t,e,n)=>e in t?ani(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cni=(t,e,n)=>(Ani(t,e+"",n),n);async function mJt(t){const e=await t.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(e)));return`data:${t.type||""};base64,${n}`}let hhe,dke,IY,phe;function hke(t,e=1/0,n=null){dke||(dke=new VB(2,2,1,1)),IY||(IY=new f6({uniforms:{blitTexture:new uke(t)},vertexShader:`
        varying vec2 vUv;
        void main(){
            vUv = uv;
            gl_Position = vec4(position.xy * 1.0,0.,.999999);
        }
      `,fragmentShader:`
          uniform sampler2D blitTexture; 
          varying vec2 vUv;

          void main(){ 
              gl_FragColor = vec4(vUv.xy, 0, 1);
              
              #ifdef IS_SRGB
              gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) );
              #else
              gl_FragColor = texture2D( blitTexture, vUv);
              #endif
          }
      `})),IY.uniforms.blitTexture.value=t,IY.defines.IS_SRGB="colorSpace"in t?t.colorSpace==="srgb":t.encoding===3001,IY.needsUpdate=!0,phe||(phe=new Er(dke,IY),phe.frustrumCulled=!1);const o=new sf,i=new KR;i.add(phe),n||(n=hhe=new $de({antialias:!1})),n.setSize(Math.min(t.image.width,e),Math.min(t.image.height,e)),n.clear(),n.render(i,o);const r=new Hg(n.domElement);return r.minFilter=t.minFilter,r.magFilter=t.magFilter,r.wrapS=t.wrapS,r.wrapT=t.wrapT,r.name=t.name,hhe&&(hhe.dispose(),hhe=null),r}const _Jt={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]},pke=(()=>{class t{constructor(){this.pluginCallbacks=[],this.register(function(n){return new Ini(n)}),this.register(function(n){return new Cni(n)}),this.register(function(n){return new Eni(n)}),this.register(function(n){return new Bni(n)}),this.register(function(n){return new bni(n)}),this.register(function(n){return new Sni(n)}),this.register(function(n){return new yni(n)}),this.register(function(n){return new xni(n)}),this.register(function(n){return new Qni(n)}),this.register(function(n){return new vni(n)}),this.register(function(n){return new wni(n)})}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,o,i,r){const s=new fni,a=[];for(let A=0,c=this.pluginCallbacks.length;A<c;A++)a.push(this.pluginCallbacks[A](s));s.setPlugins(a),s.write(n,o,r).catch(i)}parseAsync(n,o){const i=this;return new Promise(function(r,s){i.parse(n,r,s,o)})}}return cni(t,"Utils",{insertKeyframe:function(e,n){const i=e.getValueSize(),r=new e.TimeBufferType(e.times.length+1),s=new e.ValueBufferType(e.values.length+i),a=e.createInterpolant(new e.ValueBufferType(i));let A;if(e.times.length===0){r[0]=n;for(let c=0;c<i;c++)s[c]=0;A=0}else if(n<e.times[0]){if(Math.abs(e.times[0]-n)<.001)return 0;r[0]=n,r.set(e.times,1),s.set(a.evaluate(n),0),s.set(e.values,i),A=0}else if(n>e.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-n)<.001)return e.times.length-1;r[r.length-1]=n,r.set(e.times,0),s.set(e.values,0),s.set(a.evaluate(n),e.values.length),A=r.length-1}else for(let c=0;c<e.times.length;c++){if(Math.abs(e.times[c]-n)<.001)return c;if(e.times[c]<n&&e.times[c+1]>n){r.set(e.times.slice(0,c+1),0),r[c+1]=n,r.set(e.times.slice(c+1),c+2),s.set(e.values.slice(0,(c+1)*i),0),s.set(a.evaluate(n),(c+1)*i),s.set(e.values.slice((c+1)*i),(c+2)*i),A=c+1;break}}return e.times=r,e.values=s,A},mergeMorphTargetTracks:function(e,n){const o=[],i={},r=e.tracks;for(let s=0;s<r.length;++s){let a=r[s];const A=Ll.parseTrackName(a.name),c=Ll.findNode(n,A.nodeName);if(A.propertyName!=="morphTargetInfluences"||A.propertyIndex===void 0){o.push(a);continue}if(a.createInterpolant!==a.InterpolantFactoryMethodDiscrete&&a.createInterpolant!==a.InterpolantFactoryMethodLinear){if(a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),a=a.clone(),a.setInterpolation(kG)}const l=c.morphTargetInfluences.length,u=c.morphTargetDictionary[A.propertyIndex];if(u===void 0)throw new Error("THREE.GLTFExporter: Morph target name not found: "+A.propertyIndex);let g;if(i[c.uuid]===void 0){g=a.clone();const d=new g.ValueBufferType(l*g.times.length);for(let p=0;p<g.times.length;p++)d[p*l+u]=g.values[p];g.name=(A.nodeName||"")+".morphTargetInfluences",g.values=d,i[c.uuid]=g,o.push(g);continue}const h=a.createInterpolant(new a.ValueBufferType(1));g=i[c.uuid];for(let d=0;d<g.times.length;d++)g.values[d*l+u]=h.evaluate(g.times[d]);for(let d=0;d<a.times.length;d++){const p=this.insertKeyframe(g,a.times[d]);g.values[p*l+u]=a.values[d]}}return e.tracks=o,e}}),t})(),Nc={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},mke="KHR_mesh_quantization",yE={};yE[wC]=Nc.NEAREST,yE[JRe]=Nc.NEAREST_MIPMAP_NEAREST,yE[PG]=Nc.NEAREST_MIPMAP_LINEAR,yE[Fl]=Nc.LINEAR,yE[kq]=Nc.LINEAR_MIPMAP_NEAREST,yE[gm]=Nc.LINEAR_MIPMAP_LINEAR,yE[Xy]=Nc.CLAMP_TO_EDGE,yE[c4]=Nc.REPEAT,yE[Tq]=Nc.MIRRORED_REPEAT;const fJt={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},lni=new Vi,IJt=12,uni=1179937895,gni=2,CJt=8,dni=1313821514,hni=5130562;function oX(t,e){return t.length===e.length&&t.every(function(n,o){return n===e[o]})}function pni(t){return new TextEncoder().encode(t).buffer}function mni(t){return oX(t.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}function _ni(t,e,n){const o={min:new Array(t.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(t.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let i=e;i<e+n;i++)for(let r=0;r<t.itemSize;r++){let s;t.itemSize>4?s=t.array[i*t.itemSize+r]:(r===0?s=t.getX(i):r===1?s=t.getY(i):r===2?s=t.getZ(i):r===3&&(s=t.getW(i)),t.normalized===!0&&(s=OG.normalize(s,t.array))),o.min[r]=Math.min(o.min[r],s),o.max[r]=Math.max(o.max[r],s)}return o}function yJt(t){return Math.ceil(t/4)*4}function _ke(t,e=0){const n=yJt(t.byteLength);if(n!==t.byteLength){const o=new Uint8Array(n);if(o.set(new Uint8Array(t)),e!==0)for(let i=t.byteLength;i<n;i++)o[i]=e;return o.buffer}return t}function xJt(){return typeof document>"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function EJt(t,e){if(t.toBlob!==void 0)return new Promise(o=>t.toBlob(o,e));let n;return e==="image/jpeg"?n=.92:e==="image/webp"&&(n=.8),t.convertToBlob({type:e,quality:n})}class fni{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,n,o={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},o),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const i=this,r=i.buffers,s=i.json;o=i.options;const a=i.extensionsUsed,A=i.extensionsRequired,c=new Blob(r,{type:"application/octet-stream"}),l=Object.keys(a),u=Object.keys(A);l.length>0&&(s.extensionsUsed=l),u.length>0&&(s.extensionsRequired=u),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=c.size),o.binary===!0?c.arrayBuffer().then(g=>{const h=_ke(g),d=new DataView(new ArrayBuffer(CJt));d.setUint32(0,h.byteLength,!0),d.setUint32(4,hni,!0);const p=_ke(pni(JSON.stringify(s)),32),m=new DataView(new ArrayBuffer(CJt));m.setUint32(0,p.byteLength,!0),m.setUint32(4,dni,!0);const _=new ArrayBuffer(IJt),f=new DataView(_);f.setUint32(0,uni,!0),f.setUint32(4,gni,!0);const I=IJt+m.byteLength+p.byteLength+d.byteLength+h.byteLength;f.setUint32(8,I,!0),new Blob([_,m,p,d,h],{type:"application/octet-stream"}).arrayBuffer().then(n)}):s.buffers&&s.buffers.length>0?mJt(c).then(g=>{s.buffers[0].uri=g,n(s)}):n(s)}serializeUserData(e,n){if(Object.keys(e.userData).length===0)return;const o=this.options,i=this.extensionsUsed;try{const r=JSON.parse(JSON.stringify(e.userData));if(o.includeCustomExtensions&&r.gltfExtensions){n.extensions===void 0&&(n.extensions={});for(const s in r.gltfExtensions)n.extensions[s]=r.gltfExtensions[s],i[s]=!0;delete r.gltfExtensions}Object.keys(r).length>0&&(n.extras=r)}catch(r){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+r.message)}}getUID(e,n=!1){if(this.uids.has(e)===!1){const i=new Map;i.set(!0,this.uid++),i.set(!1,this.uid++),this.uids.set(e,i)}return this.uids.get(e).get(n)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const o=new jt;for(let i=0,r=e.count;i<r;i++)if(Math.abs(o.fromBufferAttribute(e,i).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const n=this.cache;if(n.attributesNormalized.has(e))return n.attributesNormalized.get(e);const o=e.clone(),i=new jt;for(let r=0,s=o.count;r<s;r++)i.fromBufferAttribute(o,r),i.x===0&&i.y===0&&i.z===0?i.setX(1):i.normalize(),o.setXYZ(r,i.x,i.y,i.z);return n.attributesNormalized.set(e,o),o}applyTextureTransform(e,n){let o=!1;const i={};(n.offset.x!==0||n.offset.y!==0)&&(i.offset=n.offset.toArray(),o=!0),n.rotation!==0&&(i.rotation=n.rotation,o=!0),(n.repeat.x!==1||n.repeat.y!==1)&&(i.scale=n.repeat.toArray(),o=!0),o&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=i,this.extensionsUsed.KHR_texture_transform=!0)}buildMetalRoughTexture(e,n){if(e===n)return e;function o(h){return("colorSpace"in h?h.colorSpace==="srgb":h.encoding===3001)?function(p){return p<.04045?p*.0773993808:Math.pow(p*.9478672986+.0521327014,2.4)}:function(p){return p}}console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."),e instanceof VTe&&(e=hke(e)),n instanceof VTe&&(n=hke(n));const i=e?e.image:null,r=n?n.image:null,s=Math.max(i?i.width:0,r?r.width:0),a=Math.max(i?i.height:0,r?r.height:0),A=xJt();A.width=s,A.height=a;const c=A.getContext("2d");c.fillStyle="#00ffff",c.fillRect(0,0,s,a);const l=c.getImageData(0,0,s,a);if(i){c.drawImage(i,0,0,s,a);const h=o(e),d=c.getImageData(0,0,s,a).data;for(let p=2;p<d.length;p+=4)l.data[p]=h(d[p]/256)*256}if(r){c.drawImage(r,0,0,s,a);const h=o(n),d=c.getImageData(0,0,s,a).data;for(let p=1;p<d.length;p+=4)l.data[p]=h(d[p]/256)*256}c.putImageData(l,0,0);const g=(e||n).clone();return g.source=new Hg(A).source,"colorSpace"in g?g.colorSpace="":g.encoding=3e3,g.channel=(e||n).channel,e&&n&&e.channel!==n.channel&&console.warn("THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."),g}processBuffer(e){const n=this.json,o=this.buffers;return n.buffers||(n.buffers=[{byteLength:0}]),o.push(e),0}processBufferView(e,n,o,i,r){const s=this.json;s.bufferViews||(s.bufferViews=[]);let a;switch(n){case Nc.BYTE:case Nc.UNSIGNED_BYTE:a=1;break;case Nc.SHORT:case Nc.UNSIGNED_SHORT:a=2;break;default:a=4}let A=e.itemSize*a;r===Nc.ARRAY_BUFFER&&(A=Math.ceil(A/4)*4);const c=yJt(i*A),l=new DataView(new ArrayBuffer(c));let u=0;for(let d=o;d<o+i;d++){for(let p=0;p<e.itemSize;p++){let m;e.itemSize>4?m=e.array[d*e.itemSize+p]:(p===0?m=e.getX(d):p===1?m=e.getY(d):p===2?m=e.getZ(d):p===3&&(m=e.getW(d)),e.normalized===!0&&(m=OG.normalize(m,e.array))),n===Nc.FLOAT?l.setFloat32(u,m,!0):n===Nc.INT?l.setInt32(u,m,!0):n===Nc.UNSIGNED_INT?l.setUint32(u,m,!0):n===Nc.SHORT?l.setInt16(u,m,!0):n===Nc.UNSIGNED_SHORT?l.setUint16(u,m,!0):n===Nc.BYTE?l.setInt8(u,m):n===Nc.UNSIGNED_BYTE&&l.setUint8(u,m),u+=a}u%A!==0&&(u+=A-u%A)}const g={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:c};return r!==void 0&&(g.target=r),r===Nc.ARRAY_BUFFER&&(g.byteStride=A),this.byteOffset+=c,s.bufferViews.push(g),{id:s.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const n=this,o=n.json;return o.bufferViews||(o.bufferViews=[]),e.arrayBuffer().then(i=>{const r=_ke(i),s={buffer:n.processBuffer(r),byteOffset:n.byteOffset,byteLength:r.byteLength};return n.byteOffset+=r.byteLength,o.bufferViews.push(s)-1})}processAccessor(e,n,o,i){const r=this.json,s={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let a;if(e.array.constructor===Float32Array)a=Nc.FLOAT;else if(e.array.constructor===Int32Array)a=Nc.INT;else if(e.array.constructor===Uint32Array)a=Nc.UNSIGNED_INT;else if(e.array.constructor===Int16Array)a=Nc.SHORT;else if(e.array.constructor===Uint16Array)a=Nc.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)a=Nc.BYTE;else if(e.array.constructor===Uint8Array)a=Nc.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);if(o===void 0&&(o=0),i===void 0&&(i=e.count),i===0)return null;const A=_ni(e,o,i);let c;n!==void 0&&(c=e===n.index?Nc.ELEMENT_ARRAY_BUFFER:Nc.ARRAY_BUFFER);const l=this.processBufferView(e,a,o,i,c),u={bufferView:l.id,byteOffset:l.byteOffset,componentType:a,count:i,max:A.max,min:A.min,type:s[e.itemSize]};return e.normalized===!0&&(u.normalized=!0),r.accessors||(r.accessors=[]),r.accessors.push(u)-1}processImage(e,n,o,i="image/png"){if(e!==null){const r=this,s=r.cache,a=r.json,A=r.options,c=r.pending;s.images.has(e)||s.images.set(e,{});const l=s.images.get(e),u=i+":flipY/"+o.toString();if(l[u]!==void 0)return l[u];a.images||(a.images=[]);const g={mimeType:i},h=xJt();h.width=Math.min(e.width,A.maxTextureSize),h.height=Math.min(e.height,A.maxTextureSize);const d=h.getContext("2d");if(o===!0&&(d.translate(0,h.height),d.scale(1,-1)),e.data!==void 0){n!==l4&&console.error("GLTFExporter: Only RGBAFormat is supported.",n),(e.width>A.maxTextureSize||e.height>A.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const m=new Uint8ClampedArray(e.height*e.width*4);for(let _=0;_<m.length;_+=4)m[_+0]=e.data[_+0],m[_+1]=e.data[_+1],m[_+2]=e.data[_+2],m[_+3]=e.data[_+3];d.putImageData(new ImageData(m,e.width,e.height),0,0)}else d.drawImage(e,0,0,h.width,h.height);A.binary===!0?c.push(EJt(h,i).then(m=>r.processBufferViewImage(m)).then(m=>{g.bufferView=m})):h.toDataURL!==void 0?g.uri=h.toDataURL(i):c.push(EJt(h,i).then(mJt).then(m=>{g.uri=m}));const p=a.images.push(g)-1;return l[u]=p,p}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const n=this.json;n.samplers||(n.samplers=[]);const o={magFilter:yE[e.magFilter],minFilter:yE[e.minFilter],wrapS:yE[e.wrapS],wrapT:yE[e.wrapT]};return n.samplers.push(o)-1}processTexture(e){const o=this.options,i=this.cache,r=this.json;if(i.textures.has(e))return i.textures.get(e);r.textures||(r.textures=[]),e instanceof VTe&&(e=hke(e,o.maxTextureSize));let s=e.userData.mimeType;s==="image/webp"&&(s="image/png");const a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,s)};e.name&&(a.name=e.name),this._invokeAll(function(c){c.writeTexture&&c.writeTexture(e,a)});const A=r.textures.push(a)-1;return i.textures.set(e,A),A}processMaterial(e){const n=this.cache,o=this.json;if(n.materials.has(e))return n.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;o.materials||(o.materials=[]);const i={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const r=e.color.toArray().concat([e.opacity]);if(oX(r,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=r),e.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=e.metalness,i.pbrMetallicRoughness.roughnessFactor=e.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const a=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),A={index:this.processTexture(a),channel:a.channel};this.applyTextureTransform(A,a),i.pbrMetallicRoughness.metallicRoughnessTexture=A}if(e.map){const a={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(a,e.map),i.pbrMetallicRoughness.baseColorTexture=a}if(e.emissive){const a=e.emissive;if(Math.max(a.r,a.g,a.b)>0&&(i.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const c={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(c,e.emissiveMap),i.emissiveTexture=c}}if(e.normalMap){const a={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(a.scale=e.normalScale.x),this.applyTextureTransform(a,e.normalMap),i.normalTexture=a}if(e.aoMap){const a={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(a.strength=e.aoMapIntensity),this.applyTextureTransform(a,e.aoMap),i.occlusionTexture=a}e.transparent?i.alphaMode="BLEND":e.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=e.alphaTest),e.side===r_&&(i.doubleSided=!0),e.name!==""&&(i.name=e.name),this.serializeUserData(e,i),this._invokeAll(function(a){a.writeMaterial&&a.writeMaterial(e,i)});const s=o.materials.push(i)-1;return n.materials.set(e,s),s}processMesh(e){const n=this.cache,o=this.json,i=[e.geometry.uuid];if(Array.isArray(e.material))for(let I=0,C=e.material.length;I<C;I++)i.push(e.material[I].uuid);else i.push(e.material.uuid);const r=i.join(":");if(n.meshes.has(r))return n.meshes.get(r);const s=e.geometry;let a;e.isLineSegments?a=Nc.LINES:e.isLineLoop?a=Nc.LINE_LOOP:e.isLine?a=Nc.LINE_STRIP:e.isPoints?a=Nc.POINTS:a=e.material.wireframe?Nc.LINES:Nc.TRIANGLES;const A={},c={},l=[],u=[],g={...hJt>=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},h=s.getAttribute("normal");h!==void 0&&!this.isNormalizedNormalAttribute(h)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),s.setAttribute("normal",this.createNormalizedNormalAttribute(h)));let d=null;for(let I in s.attributes){if(I.slice(0,5)==="morph")continue;const C=s.attributes[I];if(I=g[I]||I.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(I)||(I="_"+I),n.attributes.has(this.getUID(C))){c[I]=n.attributes.get(this.getUID(C));continue}d=null;const x=C.array;I==="JOINTS_0"&&!(x instanceof Uint16Array)&&!(x instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),d=new tg(new Uint16Array(x),C.itemSize,C.normalized));const E=this.processAccessor(d||C,s);E!==null&&(I.startsWith("_")||this.detectMeshQuantization(I,C),c[I]=E,n.attributes.set(this.getUID(C),E))}if(h!==void 0&&s.setAttribute("normal",h),Object.keys(c).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){const I=[],C=[],y={};if(e.morphTargetDictionary!==void 0)for(const x in e.morphTargetDictionary)y[e.morphTargetDictionary[x]]=x;for(let x=0;x<e.morphTargetInfluences.length;++x){const E={};let B=!1;for(const S in s.morphAttributes){if(S!=="position"&&S!=="normal"){B||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),B=!0);continue}const Q=s.morphAttributes[S][x],w=S.toUpperCase(),M=s.attributes[S];if(n.attributes.has(this.getUID(Q,!0))){E[w]=n.attributes.get(this.getUID(Q,!0));continue}const k=Q.clone();if(!s.morphTargetsRelative)for(let R=0,F=Q.count;R<F;R++)for(let O=0;O<Q.itemSize;O++)O===0&&k.setX(R,Q.getX(R)-M.getX(R)),O===1&&k.setY(R,Q.getY(R)-M.getY(R)),O===2&&k.setZ(R,Q.getZ(R)-M.getZ(R)),O===3&&k.setW(R,Q.getW(R)-M.getW(R));E[w]=this.processAccessor(k,s),n.attributes.set(this.getUID(M,!0),E[w])}u.push(E),I.push(e.morphTargetInfluences[x]),e.morphTargetDictionary!==void 0&&C.push(y[x])}A.weights=I,C.length>0&&(A.extras={},A.extras.targetNames=C)}const p=Array.isArray(e.material);if(p&&s.groups.length===0)return null;const m=p?e.material:[e.material],_=p?s.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let I=0,C=_.length;I<C;I++){const y={mode:a,attributes:c};if(this.serializeUserData(s,y),u.length>0&&(y.targets=u),s.index!==null){let E=this.getUID(s.index);(_[I].start!==void 0||_[I].count!==void 0)&&(E+=":"+_[I].start+":"+_[I].count),n.attributes.has(E)?y.indices=n.attributes.get(E):(y.indices=this.processAccessor(s.index,s,_[I].start,_[I].count),n.attributes.set(E,y.indices)),y.indices===null&&delete y.indices}const x=this.processMaterial(m[_[I].materialIndex]);x!==null&&(y.material=x),l.push(y)}A.primitives=l,o.meshes||(o.meshes=[]),this._invokeAll(function(I){I.writeMesh&&I.writeMesh(e,A)});const f=o.meshes.push(A)-1;return n.meshes.set(r,f),f}detectMeshQuantization(e,n){if(this.extensionsUsed[mke])return;let o;switch(n.array.constructor){case Int8Array:o="byte";break;case Uint8Array:o="unsigned byte";break;case Int16Array:o="short";break;case Uint16Array:o="unsigned short";break;default:return}n.normalized&&(o+=" normalized");const i=e.split("_",1)[0];_Jt[i]&&_Jt[i].includes(o)&&(this.extensionsUsed[mke]=!0,this.extensionsRequired[mke]=!0)}processCamera(e){const n=this.json;n.cameras||(n.cameras=[]);const o=e.isOrthographicCamera,i={type:o?"orthographic":"perspective"};return o?i.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:i.perspective={aspectRatio:e.aspect,yfov:OG.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==""&&(i.name=e.type),n.cameras.push(i)-1}processAnimation(e,n){const o=this.json,i=this.nodeMap;o.animations||(o.animations=[]),e=pke.Utils.mergeMorphTargetTracks(e.clone(),n);const r=e.tracks,s=[],a=[];for(let A=0;A<r.length;++A){const c=r[A],l=Ll.parseTrackName(c.name);let u=Ll.findNode(n,l.nodeName);const g=fJt[l.propertyName];if(l.objectName==="bones"&&(u.isSkinnedMesh===!0?u=u.skeleton.getBoneByName(l.objectIndex):u=void 0),!u||!g)return console.warn('THREE.GLTFExporter: Could not export animation track "%s".',c.name),null;const h=1;let d=c.values.length/c.times.length;g===fJt.morphTargetInfluences&&(d/=u.morphTargetInfluences.length);let p;c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline===!0?(p="CUBICSPLINE",d/=3):c.getInterpolation()===TG?p="STEP":p="LINEAR",a.push({input:this.processAccessor(new tg(c.times,h)),output:this.processAccessor(new tg(c.values,d)),interpolation:p}),s.push({sampler:a.length-1,target:{node:i.get(u),path:g}})}return o.animations.push({name:e.name||"clip_"+o.animations.length,samplers:a,channels:s}),o.animations.length-1}processSkin(e){const n=this.json,o=this.nodeMap,i=n.nodes[o.get(e)],r=e.skeleton;if(r===void 0)return null;const s=e.skeleton.bones[0];if(s===void 0)return null;const a=[],A=new Float32Array(r.bones.length*16),c=new va;for(let u=0;u<r.bones.length;++u)a.push(o.get(r.bones[u])),c.copy(r.boneInverses[u]),c.multiply(e.bindMatrix).toArray(A,u*16);return n.skins===void 0&&(n.skins=[]),n.skins.push({inverseBindMatrices:this.processAccessor(new tg(A,16)),joints:a,skeleton:o.get(s)}),i.skin=n.skins.length-1}processNode(e){const n=this.json,o=this.options,i=this.nodeMap;n.nodes||(n.nodes=[]);const r={};if(o.trs){const a=e.quaternion.toArray(),A=e.position.toArray(),c=e.scale.toArray();oX(a,[0,0,0,1])||(r.rotation=a),oX(A,[0,0,0])||(r.translation=A),oX(c,[1,1,1])||(r.scale=c)}else e.matrixAutoUpdate&&e.updateMatrix(),mni(e.matrix)===!1&&(r.matrix=e.matrix.elements);if(e.name!==""&&(r.name=String(e.name)),this.serializeUserData(e,r),e.isMesh||e.isLine||e.isPoints){const a=this.processMesh(e);a!==null&&(r.mesh=a)}else e.isCamera&&(r.camera=this.processCamera(e));if(e.isSkinnedMesh&&this.skins.push(e),e.children.length>0){const a=[];for(let A=0,c=e.children.length;A<c;A++){const l=e.children[A];if(l.visible||o.onlyVisible===!1){const u=this.processNode(l);u!==null&&a.push(u)}}a.length>0&&(r.children=a)}this._invokeAll(function(a){a.writeNode&&a.writeNode(e,r)});const s=n.nodes.push(r)-1;return i.set(e,s),s}processScene(e){const n=this.json,o=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};e.name!==""&&(i.name=e.name),n.scenes.push(i);const r=[];for(let s=0,a=e.children.length;s<a;s++){const A=e.children[s];if(A.visible||o.onlyVisible===!1){const c=this.processNode(A);c!==null&&r.push(c)}}r.length>0&&(i.nodes=r),this.serializeUserData(e,i)}processObjects(e){const n=new KR;n.name="AuxScene";for(let o=0;o<e.length;o++)n.children.push(e[o]);this.processScene(n)}processInput(e){const n=this.options;e=e instanceof Array?e:[e],this._invokeAll(function(i){i.beforeParse&&i.beforeParse(e)});const o=[];for(let i=0;i<e.length;i++)e[i]instanceof KR?this.processScene(e[i]):o.push(e[i]);o.length>0&&this.processObjects(o);for(let i=0;i<this.skins.length;++i)this.processSkin(this.skins[i]);for(let i=0;i<n.animations.length;++i)this.processAnimation(n.animations[i],e[0]);this._invokeAll(function(i){i.afterParse&&i.afterParse(e)})}_invokeAll(e){for(let n=0,o=this.plugins.length;n<o;n++)e(this.plugins[n])}}class Ini{constructor(e){this.writer=e,this.name="KHR_lights_punctual"}writeNode(e,n){if(!e.isLight)return;if(!e.isDirectionalLight&&!e.isPointLight&&!e.isSpotLight){console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.",e);return}const o=this.writer,i=o.json,r=o.extensionsUsed,s={};e.name&&(s.name=e.name),s.color=e.color.toArray(),s.intensity=e.intensity,e.isDirectionalLight?s.type="directional":e.isPointLight?(s.type="point",e.distance>0&&(s.range=e.distance)):e.isSpotLight&&(s.type="spot",e.distance>0&&(s.range=e.distance),s.spot={},s.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,s.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),r[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},r[this.name]=!0);const a=i.extensions[this.name].lights;a.push(s),n.extensions=n.extensions||{},n.extensions[this.name]={light:a.length-1}}}let Cni=class{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,n){if(!e.isMeshBasicMaterial)return;const i=this.writer.extensionsUsed;n.extensions=n.extensions||{},n.extensions[this.name]={},i[this.name]=!0,n.pbrMetallicRoughness.metallicFactor=0,n.pbrMetallicRoughness.roughnessFactor=.9}},yni=class{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.clearcoat===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.clearcoatFactor=e.clearcoat,e.clearcoatMap){const s={index:o.processTexture(e.clearcoatMap),texCoord:e.clearcoatMap.channel};o.applyTextureTransform(s,e.clearcoatMap),r.clearcoatTexture=s}if(r.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const s={index:o.processTexture(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};o.applyTextureTransform(s,e.clearcoatRoughnessMap),r.clearcoatRoughnessTexture=s}if(e.clearcoatNormalMap){const s={index:o.processTexture(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};o.applyTextureTransform(s,e.clearcoatNormalMap),r.clearcoatNormalTexture=s}n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},xni=class{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.iridescence===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.iridescenceFactor=e.iridescence,e.iridescenceMap){const s={index:o.processTexture(e.iridescenceMap),texCoord:e.iridescenceMap.channel};o.applyTextureTransform(s,e.iridescenceMap),r.iridescenceTexture=s}if(r.iridescenceIor=e.iridescenceIOR,r.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const s={index:o.processTexture(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};o.applyTextureTransform(s,e.iridescenceThicknessMap),r.iridescenceThicknessTexture=s}n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Eni=class{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.transmissionFactor=e.transmission,e.transmissionMap){const s={index:o.processTexture(e.transmissionMap),texCoord:e.transmissionMap.channel};o.applyTextureTransform(s,e.transmissionMap),r.transmissionTexture=s}n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Bni=class{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.transmission===0)return;const o=this.writer,i=o.extensionsUsed,r={};if(r.thicknessFactor=e.thickness,e.thicknessMap){const s={index:o.processTexture(e.thicknessMap),texCoord:e.thicknessMap.channel};o.applyTextureTransform(s,e.thicknessMap),r.thicknessTexture=s}r.attenuationDistance=e.attenuationDistance,r.attenuationColor=e.attenuationColor.toArray(),n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},bni=class{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.ior===1.5)return;const i=this.writer.extensionsUsed,r={};r.ior=e.ior,n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Sni=class{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.specularIntensity===1&&e.specularColor.equals(lni)&&!e.specularIntensityMap&&!e.specularColorTexture)return;const o=this.writer,i=o.extensionsUsed,r={};if(e.specularIntensityMap){const s={index:o.processTexture(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};o.applyTextureTransform(s,e.specularIntensityMap),r.specularTexture=s}if(e.specularColorMap){const s={index:o.processTexture(e.specularColorMap),texCoord:e.specularColorMap.channel};o.applyTextureTransform(s,e.specularColorMap),r.specularColorTexture=s}r.specularFactor=e.specularIntensity,r.specularColorFactor=e.specularColor.toArray(),n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},Qni=class{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.sheen==0)return;const o=this.writer,i=o.extensionsUsed,r={};if(e.sheenRoughnessMap){const s={index:o.processTexture(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};o.applyTextureTransform(s,e.sheenRoughnessMap),r.sheenRoughnessTexture=s}if(e.sheenColorMap){const s={index:o.processTexture(e.sheenColorMap),texCoord:e.sheenColorMap.channel};o.applyTextureTransform(s,e.sheenColorMap),r.sheenColorTexture=s}r.sheenRoughnessFactor=e.sheenRoughness,r.sheenColorFactor=e.sheenColor.toArray(),n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},vni=class{constructor(e){this.writer=e,this.name="KHR_materials_anisotropy"}writeMaterial(e,n){if(!e.isMeshPhysicalMaterial||e.anisotropy==0)return;const o=this.writer,i=o.extensionsUsed,r={};if(e.anisotropyMap){const s={index:o.processTexture(e.anisotropyMap)};o.applyTextureTransform(s,e.anisotropyMap),r.anisotropyTexture=s}r.anisotropyStrength=e.anisotropy,r.anisotropyRotation=e.anisotropyRotation,n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}},wni=class{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}writeMaterial(e,n){if(!e.isMeshStandardMaterial||e.emissiveIntensity===1)return;const i=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,n.extensions=n.extensions||{},n.extensions[this.name]=r,i[this.name]=!0}};function Pni(){const t=new KR,e=new Yx;e.deleteAttribute("uv");const n=new su({side:uI}),o=new su,i=new sJt(16777215,5,28,2);i.position.set(.418,16.199,.3),t.add(i);const r=new Er(e,n);r.position.set(-.757,13.219,.717),r.scale.set(31.713,28.305,28.591),t.add(r);const s=new Er(e,o);s.position.set(-10.906,2.009,1.846),s.rotation.set(0,-.195,0),s.scale.set(2.328,7.905,4.651),t.add(s);const a=new Er(e,o);a.position.set(-5.607,-.754,-.758),a.rotation.set(0,.994,0),a.scale.set(1.97,1.534,3.955),t.add(a);const A=new Er(e,o);A.position.set(6.167,.857,7.803),A.rotation.set(0,.561,0),A.scale.set(3.927,6.285,3.687),t.add(A);const c=new Er(e,o);c.position.set(-2.017,.018,6.124),c.rotation.set(0,.333,0),c.scale.set(2.002,4.566,2.064),t.add(c);const l=new Er(e,o);l.position.set(2.291,-.756,-2.621),l.rotation.set(0,-.286,0),l.scale.set(1.546,1.552,1.496),t.add(l);const u=new Er(e,o);u.position.set(-2.193,-.369,-5.547),u.rotation.set(0,.516,0),u.scale.set(3.875,3.487,2.986),t.add(u);const g=new Er(e,f(50));g.position.set(-16.116,14.37,8.208),g.scale.set(.1,2.428,2.739),t.add(g);const h=new Er(e,f(50));h.position.set(-16.109,18.021,-8.207),h.scale.set(.1,2.425,2.751),t.add(h);const d=new Er(e,f(17));d.position.set(14.904,12.198,-1.832),d.scale.set(.15,4.265,6.331),t.add(d);const p=new Er(e,f(43));p.position.set(-.462,8.89,14.52),p.scale.set(4.38,5.441,.088),t.add(p);const m=new Er(e,f(20));m.position.set(3.235,11.486,-12.541),m.scale.set(2.5,2,.1),t.add(m);const _=new Er(e,f(100));_.position.set(0,20,0),_.scale.set(1,.1,1),t.add(_);function f(I){const C=new fE;return C.color.setScalar(I),C}return t}function iX(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let e="";for(let n=0,o=t.length;n<o;n++)e+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(e))}catch{return e}}const $R="srgb",rS="srgb-linear",BJt=3001,Mni=3e3;class Dni extends x6{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(n){return new Fni(n)}),this.register(function(n){return new Lni(n)}),this.register(function(n){return new Jni(n)}),this.register(function(n){return new Wni(n)}),this.register(function(n){return new jni(n)}),this.register(function(n){return new Oni(n)}),this.register(function(n){return new Gni(n)}),this.register(function(n){return new Yni(n)}),this.register(function(n){return new Uni(n)}),this.register(function(n){return new kni(n)}),this.register(function(n){return new Kni(n)}),this.register(function(n){return new Hni(n)}),this.register(function(n){return new zni(n)}),this.register(function(n){return new Vni(n)}),this.register(function(n){return new Rni(n)}),this.register(function(n){return new $ni(n)}),this.register(function(n){return new qni(n)})}load(e,n,o,i){const r=this;let s;if(this.resourcePath!=="")s=this.resourcePath;else if(this.path!==""){const c=jR.extractUrlBase(e);s=jR.resolveURL(c,this.path)}else s=jR.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){i?i(c):console.error(c),r.manager.itemError(e),r.manager.itemEnd(e)},A=new fY(this.manager);A.setPath(this.path),A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(e,function(c){try{r.parse(c,s,function(l){n(l),r.manager.itemEnd(e)},a)}catch(l){a(l)}},o,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,o,i){let r;const s={},a={};if(typeof e=="string")r=JSON.parse(e);else if(e instanceof ArrayBuffer)if(iX(new Uint8Array(e.slice(0,4)))===bJt){try{s[Rc.KHR_BINARY_GLTF]=new Xni(e)}catch(l){i&&i(l);return}r=JSON.parse(s[Rc.KHR_BINARY_GLTF].content)}else r=JSON.parse(iX(new Uint8Array(e)));else r=e;if(r.asset===void 0||r.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const A=new uoi(r,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});A.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c<this.pluginCallbacks.length;c++){const l=this.pluginCallbacks[c](A);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,s[l.name]=!0}if(r.extensionsUsed)for(let c=0;c<r.extensionsUsed.length;++c){const l=r.extensionsUsed[c],u=r.extensionsRequired||[];switch(l){case Rc.KHR_MATERIALS_UNLIT:s[l]=new Tni;break;case Rc.KHR_DRACO_MESH_COMPRESSION:s[l]=new Zni(r,this.dracoLoader);break;case Rc.KHR_TEXTURE_TRANSFORM:s[l]=new eoi;break;case Rc.KHR_MESH_QUANTIZATION:s[l]=new toi;break;default:u.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}A.setExtensions(s),A.setPlugins(a),A.parse(o,i)}parseAsync(e,n){const o=this;return new Promise(function(i,r){o.parse(e,n,i,r)})}}function Nni(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Rc={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Rni{constructor(e){this.parser=e,this.name=Rc.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let o=0,i=n.length;o<i;o++){const r=n[o];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const n=this.parser,o="light:"+e;let i=n.cache.get(o);if(i)return i;const r=n.json,A=((r.extensions&&r.extensions[this.name]||{}).lights||[])[e];let c;const l=new Vi(16777215);A.color!==void 0&&l.setRGB(A.color[0],A.color[1],A.color[2],rS);const u=A.range!==void 0?A.range:0;switch(A.type){case"directional":c=new aJt(l),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new sJt(l),c.distance=u;break;case"spot":c=new zti(l),c.distance=u,A.spot=A.spot||{},A.spot.innerConeAngle=A.spot.innerConeAngle!==void 0?A.spot.innerConeAngle:0,A.spot.outerConeAngle=A.spot.outerConeAngle!==void 0?A.spot.outerConeAngle:Math.PI/4,c.angle=A.spot.outerConeAngle,c.penumbra=1-A.spot.innerConeAngle/A.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+A.type)}return c.position.set(0,0,0),c.decay=2,sS(c,A),A.intensity!==void 0&&(c.intensity=A.intensity),c.name=n.createUniqueName(A.name||"light_"+e),i=Promise.resolve(c),n.cache.add(o,i),i}getDependency(e,n){if(e==="light")return this._loadLight(n)}createNodeAttachment(e){const n=this,o=this.parser,r=o.json.nodes[e],a=(r.extensions&&r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(A){return o._getNodeRef(n.cache,a,A)})}}class Tni{constructor(){this.name=Rc.KHR_MATERIALS_UNLIT}getMaterialType(){return fE}extendParams(e,n,o){const i=[];e.color=new Vi(1,1,1),e.opacity=1;const r=n.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const s=r.baseColorFactor;e.color.setRGB(s[0],s[1],s[2],rS),e.opacity=s[3]}r.baseColorTexture!==void 0&&i.push(o.assignTexture(e,"map",r.baseColorTexture,$R))}return Promise.all(i)}}class kni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,n){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=i.extensions[this.name].emissiveStrength;return r!==void 0&&(n.emissiveIntensity=r),Promise.resolve()}}class Fni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];if(s.clearcoatFactor!==void 0&&(n.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&r.push(o.assignTexture(n,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(n.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&r.push(o.assignTexture(n,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(r.push(o.assignTexture(n,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const a=s.clearcoatNormalTexture.scale;n.clearcoatNormalScale=new ni(a,a)}return Promise.all(r)}}class Lni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_DISPERSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=i.extensions[this.name];return n.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}}class Hni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return s.iridescenceFactor!==void 0&&(n.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&r.push(o.assignTexture(n,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(n.iridescenceIOR=s.iridescenceIor),n.iridescenceThicknessRange===void 0&&(n.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(n.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(n.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&r.push(o.assignTexture(n,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(r)}}class Oni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_SHEEN}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[];n.sheenColor=new Vi(0,0,0),n.sheenRoughness=0,n.sheen=1;const s=i.extensions[this.name];if(s.sheenColorFactor!==void 0){const a=s.sheenColorFactor;n.sheenColor.setRGB(a[0],a[1],a[2],rS)}return s.sheenRoughnessFactor!==void 0&&(n.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&r.push(o.assignTexture(n,"sheenColorMap",s.sheenColorTexture,$R)),s.sheenRoughnessTexture!==void 0&&r.push(o.assignTexture(n,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(r)}}class Gni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return s.transmissionFactor!==void 0&&(n.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&r.push(o.assignTexture(n,"transmissionMap",s.transmissionTexture)),Promise.all(r)}}class Yni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_VOLUME}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];n.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&r.push(o.assignTexture(n,"thicknessMap",s.thicknessTexture)),n.attenuationDistance=s.attenuationDistance||1/0;const a=s.attenuationColor||[1,1,1];return n.attenuationColor=new Vi().setRGB(a[0],a[1],a[2],rS),Promise.all(r)}}class Uni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_IOR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=i.extensions[this.name];return n.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class Kni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_SPECULAR}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];n.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&r.push(o.assignTexture(n,"specularIntensityMap",s.specularTexture));const a=s.specularColorFactor||[1,1,1];return n.specularColor=new Vi().setRGB(a[0],a[1],a[2],rS),s.specularColorTexture!==void 0&&r.push(o.assignTexture(n,"specularColorMap",s.specularColorTexture,$R)),Promise.all(r)}}class Vni{constructor(e){this.parser=e,this.name=Rc.EXT_MATERIALS_BUMP}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return n.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&r.push(o.assignTexture(n,"bumpMap",s.bumpTexture)),Promise.all(r)}}class zni{constructor(e){this.parser=e,this.name=Rc.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const o=this.parser.json.materials[e];return!o.extensions||!o.extensions[this.name]?null:CE}extendMaterialParams(e,n){const o=this.parser,i=o.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const r=[],s=i.extensions[this.name];return s.anisotropyStrength!==void 0&&(n.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(n.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&r.push(o.assignTexture(n,"anisotropyMap",s.anisotropyTexture)),Promise.all(r)}}class Jni{constructor(e){this.parser=e,this.name=Rc.KHR_TEXTURE_BASISU}loadTexture(e){const n=this.parser,o=n.json,i=o.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const r=i.extensions[this.name],s=n.options.ktx2Loader;if(!s){if(o.extensionsRequired&&o.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,r.source,s)}}class Wni{constructor(e){this.parser=e,this.name=Rc.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,o=this.parser,i=o.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const s=r.extensions[n],a=i.images[s.source];let A=o.textureLoader;if(a.uri){const c=o.options.manager.getHandler(a.uri);c!==null&&(A=c)}return this.detectSupport().then(function(c){if(c)return o.loadTextureImage(e,s.source,A);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class jni{constructor(e){this.parser=e,this.name=Rc.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,o=this.parser,i=o.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const s=r.extensions[n],a=i.images[s.source];let A=o.textureLoader;if(a.uri){const c=o.options.manager.getHandler(a.uri);c!==null&&(A=c)}return this.detectSupport().then(function(c){if(c)return o.loadTextureImage(e,s.source,A);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return o.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class $ni{constructor(e){this.name=Rc.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,o=n.bufferViews[e];if(o.extensions&&o.extensions[this.name]){const i=o.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const A=i.byteOffset||0,c=i.byteLength||0,l=i.count,u=i.byteStride,g=new Uint8Array(a,A,c);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(l,u,g,i.mode,i.filter).then(function(h){return h.buffer}):s.ready.then(function(){const h=new ArrayBuffer(l*u);return s.decodeGltfBuffer(new Uint8Array(h),l,u,g,i.mode,i.filter),h})})}else return null}}class qni{constructor(e){this.name=Rc.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,o=n.nodes[e];if(!o.extensions||!o.extensions[this.name]||o.mesh===void 0)return null;const i=n.meshes[o.mesh];for(const c of i.primitives)if(c.mode!==d4.TRIANGLES&&c.mode!==d4.TRIANGLE_STRIP&&c.mode!==d4.TRIANGLE_FAN&&c.mode!==void 0)return null;const s=o.extensions[this.name].attributes,a=[],A={};for(const c in s)a.push(this.parser.getDependency("accessor",s[c]).then(l=>(A[c]=l,A[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const l=c.pop(),u=l.isGroup?l.children:[l],g=c[0].count,h=[];for(const d of u){const p=new va,m=new jt,_=new Zy,f=new jt(1,1,1),I=new Xei(d.geometry,d.material,g);for(let C=0;C<g;C++)A.TRANSLATION&&m.fromBufferAttribute(A.TRANSLATION,C),A.ROTATION&&_.fromBufferAttribute(A.ROTATION,C),A.SCALE&&f.fromBufferAttribute(A.SCALE,C),I.setMatrixAt(C,p.compose(m,_,f));for(const C in A)if(C==="_COLOR_0"){const y=A[C];I.instanceColor=new Xde(y.array,y.itemSize,y.normalized)}else C!=="TRANSLATION"&&C!=="ROTATION"&&C!=="SCALE"&&d.geometry.setAttribute(C,A[C]);T0.prototype.copy.call(I,d),this.parser.assignFinalMaterial(I),h.push(I)}return l.isGroup?(l.clear(),l.add(...h),l):h[0]}))}}const bJt="glTF",rX=12,SJt={JSON:1313821514,BIN:5130562};class Xni{constructor(e){this.name=Rc.KHR_BINARY_GLTF,this.content=null,this.body=null;const n=new DataView(e,0,rX);if(this.header={magic:iX(new Uint8Array(e.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==bJt)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const o=this.header.length-rX,i=new DataView(e,rX);let r=0;for(;r<o;){const s=i.getUint32(r,!0);r+=4;const a=i.getUint32(r,!0);if(r+=4,a===SJt.JSON){const A=new Uint8Array(e,rX+r,s);this.content=iX(A)}else if(a===SJt.BIN){const A=rX+r;this.body=e.slice(A,A+s)}r+=s}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Zni{constructor(e,n){if(!n)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Rc.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=n,this.dracoLoader.preload()}decodePrimitive(e,n){const o=this.json,i=this.dracoLoader,r=e.extensions[this.name].bufferView,s=e.extensions[this.name].attributes,a={},A={},c={};for(const l in s){const u=Ike[l]||l.toLowerCase();a[u]=s[l]}for(const l in e.attributes){const u=Ike[l]||l.toLowerCase();if(s[l]!==void 0){const g=o.accessors[e.attributes[l]],h=CY[g.componentType];c[u]=h.name,A[u]=g.normalized===!0}}return n.getDependency("bufferView",r).then(function(l){return new Promise(function(u,g){i.decodeDracoFile(l,function(h){for(const d in h.attributes){const p=h.attributes[d],m=A[d];m!==void 0&&(p.normalized=m)}u(h)},a,c,rS,g)})})}}class eoi{constructor(){this.name=Rc.KHR_TEXTURE_TRANSFORM}extendTexture(e,n){return(n.texCoord===void 0||n.texCoord===e.channel)&&n.offset===void 0&&n.rotation===void 0&&n.scale===void 0||(e=e.clone(),n.texCoord!==void 0&&(e.channel=n.texCoord),n.offset!==void 0&&e.offset.fromArray(n.offset),n.rotation!==void 0&&(e.rotation=n.rotation),n.scale!==void 0&&e.repeat.fromArray(n.scale),e.needsUpdate=!0),e}}class toi{constructor(){this.name=Rc.KHR_MESH_QUANTIZATION}}class QJt extends eX{constructor(e,n,o,i){super(e,n,o,i)}copySampleValue_(e){const n=this.resultBuffer,o=this.sampleValues,i=this.valueSize,r=e*i*3+i;for(let s=0;s!==i;s++)n[s]=o[r+s];return n}interpolate_(e,n,o,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,A=a*2,c=a*3,l=i-n,u=(o-n)/l,g=u*u,h=g*u,d=e*c,p=d-c,m=-2*h+3*g,_=h-g,f=1-m,I=_-g+u;for(let C=0;C!==a;C++){const y=s[p+C+a],x=s[p+C+A]*l,E=s[d+C+a],B=s[d+C]*l;r[C]=f*y+I*x+m*E+_*B}return r}}const noi=new Zy;class ooi extends QJt{interpolate_(e,n,o,i){const r=super.interpolate_(e,n,o,i);return noi.fromArray(r).normalize().toArray(r),r}}const d4={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},CY={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},vJt={9728:wC,9729:Fl,9984:JRe,9985:kq,9986:PG,9987:gm},wJt={33071:Xy,33648:Tq,10497:c4},fke={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ike={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...hJt>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},iP={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},ioi={CUBICSPLINE:void 0,LINEAR:kG,STEP:TG},Cke={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function roi(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new su({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:mE})),t.DefaultMaterial}function qR(t,e,n){for(const o in n.extensions)t[o]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[o]=n.extensions[o])}function sS(t,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(t.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function soi(t,e,n){let o=!1,i=!1,r=!1;for(let c=0,l=e.length;c<l;c++){const u=e[c];if(u.POSITION!==void 0&&(o=!0),u.NORMAL!==void 0&&(i=!0),u.COLOR_0!==void 0&&(r=!0),o&&i&&r)break}if(!o&&!i&&!r)return Promise.resolve(t);const s=[],a=[],A=[];for(let c=0,l=e.length;c<l;c++){const u=e[c];if(o){const g=u.POSITION!==void 0?n.getDependency("accessor",u.POSITION):t.attributes.position;s.push(g)}if(i){const g=u.NORMAL!==void 0?n.getDependency("accessor",u.NORMAL):t.attributes.normal;a.push(g)}if(r){const g=u.COLOR_0!==void 0?n.getDependency("accessor",u.COLOR_0):t.attributes.color;A.push(g)}}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(A)]).then(function(c){const l=c[0],u=c[1],g=c[2];return o&&(t.morphAttributes.position=l),i&&(t.morphAttributes.normal=u),r&&(t.morphAttributes.color=g),t.morphTargetsRelative=!0,t})}function aoi(t,e){if(t.updateMorphTargets(),e.weights!==void 0)for(let n=0,o=e.weights.length;n<o;n++)t.morphTargetInfluences[n]=e.weights[n];if(e.extras&&Array.isArray(e.extras.targetNames)){const n=e.extras.targetNames;if(t.morphTargetInfluences.length===n.length){t.morphTargetDictionary={};for(let o=0,i=n.length;o<i;o++)t.morphTargetDictionary[n[o]]=o}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Aoi(t){let e;const n=t.extensions&&t.extensions[Rc.KHR_DRACO_MESH_COMPRESSION];if(n?e="draco:"+n.bufferView+":"+n.indices+":"+yke(n.attributes):e=t.indices+":"+yke(t.attributes)+":"+t.mode,t.targets!==void 0)for(let o=0,i=t.targets.length;o<i;o++)e+=":"+yke(t.targets[o]);return e}function yke(t){let e="";const n=Object.keys(t).sort();for(let o=0,i=n.length;o<i;o++)e+=n[o]+":"+t[n[o]]+";";return e}function xke(t){switch(t){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function coi(t){return t.search(/\.jpe?g($|\?)/i)>0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const loi=new va;class uoi{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new Nni,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let o=!1,i=!1,r=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,r=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||o||i&&r<98?this.textureLoader=new rke(this.options.manager):this.textureLoader=new $ti(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new fY(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const o=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([o.getDependencies("scene"),o.getDependencies("animation"),o.getDependencies("camera")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:o,userData:{}};return qR(r,a,i),sS(a,i),Promise.all(o._invokeAll(function(A){return A.afterRoot&&A.afterRoot(a)})).then(function(){for(const A of a.scenes)A.updateMatrixWorld();e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],o=this.json.meshes||[];for(let i=0,r=n.length;i<r;i++){const s=n[i].joints;for(let a=0,A=s.length;a<A;a++)e[s[a]].isBone=!0}for(let i=0,r=e.length;i<r;i++){const s=e[i];s.mesh!==void 0&&(this._addNodeRef(this.meshCache,s.mesh),s.skin!==void 0&&(o[s.mesh].isSkinnedMesh=!0)),s.camera!==void 0&&this._addNodeRef(this.cameraCache,s.camera)}}_addNodeRef(e,n){n!==void 0&&(e.refs[n]===void 0&&(e.refs[n]=e.uses[n]=0),e.refs[n]++)}_getNodeRef(e,n,o){if(e.refs[n]<=1)return o;const i=o.clone(),r=(s,a)=>{const A=this.associations.get(s);A!=null&&this.associations.set(a,A);for(const[c,l]of s.children.entries())r(l,a.children[c])};return r(o,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let o=0;o<n.length;o++){const i=e(n[o]);if(i)return i}return null}_invokeAll(e){const n=Object.values(this.plugins);n.unshift(this);const o=[];for(let i=0;i<n.length;i++){const r=e(n[i]);r&&o.push(r)}return o}getDependency(e,n){const o=e+":"+n;let i=this.cache.get(o);if(!i){switch(e){case"scene":i=this.loadScene(n);break;case"node":i=this._invokeOne(function(r){return r.loadNode&&r.loadNode(n)});break;case"mesh":i=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(n)});break;case"accessor":i=this.loadAccessor(n);break;case"bufferView":i=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(n)});break;case"buffer":i=this.loadBuffer(n);break;case"material":i=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(n)});break;case"texture":i=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(n)});break;case"skin":i=this.loadSkin(n);break;case"animation":i=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(n)});break;case"camera":i=this.loadCamera(n);break;default:if(i=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(e,n)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(o,i)}return i}getDependencies(e){let n=this.cache.get(e);if(!n){const o=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];n=Promise.all(i.map(function(r,s){return o.getDependency(e,s)})),this.cache.add(e,n)}return n}loadBuffer(e){const n=this.json.buffers[e],o=this.fileLoader;if(n.type&&n.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+n.type+" buffer type is not supported.");if(n.uri===void 0&&e===0)return Promise.resolve(this.extensions[Rc.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(r,s){o.load(jR.resolveURL(n.uri,i.path),r,void 0,function(){s(new Error('THREE.GLTFLoader: Failed to load buffer "'+n.uri+'".'))})})}loadBufferView(e){const n=this.json.bufferViews[e];return this.getDependency("buffer",n.buffer).then(function(o){const i=n.byteLength||0,r=n.byteOffset||0;return o.slice(r,r+i)})}loadAccessor(e){const n=this,o=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){const s=fke[i.type],a=CY[i.componentType],A=i.normalized===!0,c=new a(i.count*s);return Promise.resolve(new tg(c,s,A))}const r=[];return i.bufferView!==void 0?r.push(this.getDependency("bufferView",i.bufferView)):r.push(null),i.sparse!==void 0&&(r.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(r).then(function(s){const a=s[0],A=fke[i.type],c=CY[i.componentType],l=c.BYTES_PER_ELEMENT,u=l*A,g=i.byteOffset||0,h=i.bufferView!==void 0?o.bufferViews[i.bufferView].byteStride:void 0,d=i.normalized===!0;let p,m;if(h&&h!==u){const _=Math.floor(g/h),f="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+_+":"+i.count;let I=n.cache.get(f);I||(p=new c(a,_*h,i.count*h/l),I=new Jei(p,h/l),n.cache.add(f,I)),m=new FTe(I,A,g%h/l,d)}else a===null?p=new c(i.count*A):p=new c(a,g,i.count*A),m=new tg(p,A,d);if(i.sparse!==void 0){const _=fke.SCALAR,f=CY[i.sparse.indices.componentType],I=i.sparse.indices.byteOffset||0,C=i.sparse.values.byteOffset||0,y=new f(s[1],I,i.sparse.count*_),x=new c(s[2],C,i.sparse.count*A);a!==null&&(m=new tg(m.array.slice(),m.itemSize,m.normalized));for(let E=0,B=y.length;E<B;E++){const S=y[E];if(m.setX(S,x[E*A]),A>=2&&m.setY(S,x[E*A+1]),A>=3&&m.setZ(S,x[E*A+2]),A>=4&&m.setW(S,x[E*A+3]),A>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return m})}loadTexture(e){const n=this.json,o=this.options,r=n.textures[e].source,s=n.images[r];let a=this.textureLoader;if(s.uri){const A=o.manager.getHandler(s.uri);A!==null&&(a=A)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,n,o){const i=this,r=this.json,s=r.textures[e],a=r.images[n],A=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[A])return this.textureCache[A];const c=this.loadImageSource(n,o).then(function(l){l.flipY=!1,l.name=s.name||a.name||"",l.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(l.name=a.uri);const g=(r.samplers||{})[s.sampler]||{};return l.magFilter=vJt[g.magFilter]||Fl,l.minFilter=vJt[g.minFilter]||gm,l.wrapS=wJt[g.wrapS]||c4,l.wrapT=wJt[g.wrapT]||c4,i.associations.set(l,{textures:e}),l}).catch(function(){return null});return this.textureCache[A]=c,c}loadImageSource(e,n){const o=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(u=>u.clone());const s=i.images[e],a=self.URL||self.webkitURL;let A=s.uri||"",c=!1;if(s.bufferView!==void 0)A=o.getDependency("bufferView",s.bufferView).then(function(u){c=!0;const g=new Blob([u],{type:s.mimeType});return A=a.createObjectURL(g),A});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const l=Promise.resolve(A).then(function(u){return new Promise(function(g,h){let d=g;n.isImageBitmapLoader===!0&&(d=function(p){const m=new Hg(p);m.needsUpdate=!0,g(m)}),n.load(jR.resolveURL(u,r.path),d,void 0,h)})}).then(function(u){return c===!0&&a.revokeObjectURL(A),sS(u,s),u.userData.mimeType=s.mimeType||coi(s.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",A),u});return this.sourceCache[e]=l,l}assignTexture(e,n,o,i){const r=this;return this.getDependency("texture",o.index).then(function(s){if(!s)return null;if(o.texCoord!==void 0&&o.texCoord>0&&(s=s.clone(),s.channel=o.texCoord),r.extensions[Rc.KHR_TEXTURE_TRANSFORM]){const a=o.extensions!==void 0?o.extensions[Rc.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const A=r.associations.get(s);s=r.extensions[Rc.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),r.associations.set(s,A)}}return i!==void 0&&(typeof i=="number"&&(i=i===BJt?$R:rS),"colorSpace"in s?s.colorSpace=i:s.encoding=i===$R?BJt:Mni),e[n]=s,s})}assignFinalMaterial(e){const n=e.geometry;let o=e.material;const i=n.attributes.tangent===void 0,r=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+o.uuid;let A=this.cache.get(a);A||(A=new zR,Gx.prototype.copy.call(A,o),A.color.copy(o.color),A.map=o.map,A.sizeAttenuation=!1,this.cache.add(a,A)),o=A}else if(e.isLine){const a="LineBasicMaterial:"+o.uuid;let A=this.cache.get(a);A||(A=new VR,Gx.prototype.copy.call(A,o),A.color.copy(o.color),A.map=o.map,this.cache.add(a,A)),o=A}if(i||r||s){let a="ClonedMaterial:"+o.uuid+":";i&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let A=this.cache.get(a);A||(A=o.clone(),r&&(A.vertexColors=!0),s&&(A.flatShading=!0),i&&(A.normalScale&&(A.normalScale.y*=-1),A.clearcoatNormalScale&&(A.clearcoatNormalScale.y*=-1)),this.cache.add(a,A),this.associations.set(A,this.associations.get(o))),o=A}e.material=o}getMaterialType(){return su}loadMaterial(e){const n=this,o=this.json,i=this.extensions,r=o.materials[e];let s;const a={},A=r.extensions||{},c=[];if(A[Rc.KHR_MATERIALS_UNLIT]){const u=i[Rc.KHR_MATERIALS_UNLIT];s=u.getMaterialType(),c.push(u.extendParams(a,r,n))}else{const u=r.pbrMetallicRoughness||{};if(a.color=new Vi(1,1,1),a.opacity=1,Array.isArray(u.baseColorFactor)){const g=u.baseColorFactor;a.color.setRGB(g[0],g[1],g[2],rS),a.opacity=g[3]}u.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",u.baseColorTexture,$R)),a.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,a.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",u.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",u.metallicRoughnessTexture))),s=this._invokeOne(function(g){return g.getMaterialType&&g.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(g){return g.extendMaterialParams&&g.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=r_);const l=r.alphaMode||Cke.OPAQUE;if(l===Cke.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,l===Cke.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&s!==fE&&(c.push(n.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new ni(1,1),r.normalTexture.scale!==void 0)){const u=r.normalTexture.scale;a.normalScale.set(u,u)}if(r.occlusionTexture!==void 0&&s!==fE&&(c.push(n.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&s!==fE){const u=r.emissiveFactor;a.emissive=new Vi().setRGB(u[0],u[1],u[2],rS)}return r.emissiveTexture!==void 0&&s!==fE&&c.push(n.assignTexture(a,"emissiveMap",r.emissiveTexture,$R)),Promise.all(c).then(function(){const u=new s(a);return r.name&&(u.name=r.name),sS(u,r),n.associations.set(u,{materials:e}),r.extensions&&qR(i,u,r),u})}createUniqueName(e){const n=Ll.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,o=this.extensions,i=this.primitiveCache;function r(a){return o[Rc.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(A){return PJt(A,a,n)})}const s=[];for(let a=0,A=e.length;a<A;a++){const c=e[a],l=Aoi(c),u=i[l];if(u)s.push(u.promise);else{let g;c.extensions&&c.extensions[Rc.KHR_DRACO_MESH_COMPRESSION]?g=r(c):g=PJt(new Zl,c,n),i[l]={primitive:c,promise:g},s.push(g)}}return Promise.all(s)}loadMesh(e){const n=this,o=this.json,i=this.extensions,r=o.meshes[e],s=r.primitives,a=[];for(let A=0,c=s.length;A<c;A++){const l=s[A].material===void 0?roi(this.cache):this.getDependency("material",s[A].material);a.push(l)}return a.push(n.loadGeometries(s)),Promise.all(a).then(function(A){const c=A.slice(0,A.length-1),l=A[A.length-1],u=[];for(let h=0,d=l.length;h<d;h++){const p=l[h],m=s[h];let _;const f=c[h];if(m.mode===d4.TRIANGLES||m.mode===d4.TRIANGLE_STRIP||m.mode===d4.TRIANGLE_FAN||m.mode===void 0)_=r.isSkinnedMesh===!0?new jei(p,f):new Er(p,f),_.isSkinnedMesh===!0&&_.normalizeSkinWeights(),m.mode===d4.TRIANGLE_STRIP?_.geometry=pJt(_.geometry,pVt):m.mode===d4.TRIANGLE_FAN&&(_.geometry=pJt(_.geometry,eTe));else if(m.mode===d4.LINES)_=new Jq(p,f);else if(m.mode===d4.LINE_STRIP)_=new UTe(p,f);else if(m.mode===d4.LINE_LOOP)_=new Zei(p,f);else if(m.mode===d4.POINTS)_=new Wq(p,f);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(_.geometry.morphAttributes).length>0&&aoi(_,r),_.name=n.createUniqueName(r.name||"mesh_"+e),sS(_,r),m.extensions&&qR(i,_,m),n.assignFinalMaterial(_),u.push(_)}for(let h=0,d=u.length;h<d;h++)n.associations.set(u[h],{meshes:e,primitives:h});if(u.length===1)return r.extensions&&qR(i,u[0],r),u[0];const g=new lh;r.extensions&&qR(i,g,r),n.associations.set(g,{meshes:e});for(let h=0,d=u.length;h<d;h++)g.add(u[h]);return g})}loadCamera(e){let n;const o=this.json.cameras[e],i=o[o.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return o.type==="perspective"?n=new sf(OG.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):o.type==="orthographic"&&(n=new rY(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),o.name&&(n.name=this.createUniqueName(o.name)),sS(n,o),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],o=[];for(let i=0,r=n.joints.length;i<r;i++)o.push(this._loadNodeShallow(n.joints[i]));return n.inverseBindMatrices!==void 0?o.push(this.getDependency("accessor",n.inverseBindMatrices)):o.push(null),Promise.all(o).then(function(i){const r=i.pop(),s=i,a=[],A=[];for(let c=0,l=s.length;c<l;c++){const u=s[c];if(u){a.push(u);const g=new va;r!==null&&g.fromArray(r.array,c*16),A.push(g)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',n.joints[c])}return new GTe(a,A)})}loadAnimation(e){const n=this.json,o=this,i=n.animations[e],r=i.name?i.name:"animation_"+e,s=[],a=[],A=[],c=[],l=[];for(let u=0,g=i.channels.length;u<g;u++){const h=i.channels[u],d=i.samplers[h.sampler],p=h.target,m=p.node,_=i.parameters!==void 0?i.parameters[d.input]:d.input,f=i.parameters!==void 0?i.parameters[d.output]:d.output;p.node!==void 0&&(s.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",_)),A.push(this.getDependency("accessor",f)),c.push(d),l.push(p))}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(A),Promise.all(c),Promise.all(l)]).then(function(u){const g=u[0],h=u[1],d=u[2],p=u[3],m=u[4],_=[];for(let f=0,I=g.length;f<I;f++){const C=g[f],y=h[f],x=d[f],E=p[f],B=m[f];if(C===void 0)continue;C.updateMatrix&&C.updateMatrix();const S=o._createAnimationTracks(C,y,x,E,B);if(S)for(let Q=0;Q<S.length;Q++)_.push(S[Q])}return new Lti(r,void 0,_)})}createNodeMesh(e){const n=this.json,o=this,i=n.nodes[e];return i.mesh===void 0?null:o.getDependency("mesh",i.mesh).then(function(r){const s=o._getNodeRef(o.meshCache,i.mesh,r);return i.weights!==void 0&&s.traverse(function(a){if(a.isMesh)for(let A=0,c=i.weights.length;A<c;A++)a.morphTargetInfluences[A]=i.weights[A]}),s})}loadNode(e){const n=this.json,o=this,i=n.nodes[e],r=o._loadNodeShallow(e),s=[],a=i.children||[];for(let c=0,l=a.length;c<l;c++)s.push(o.getDependency("node",a[c]));const A=i.skin===void 0?Promise.resolve(null):o.getDependency("skin",i.skin);return Promise.all([r,Promise.all(s),A]).then(function(c){const l=c[0],u=c[1],g=c[2];g!==null&&l.traverse(function(h){h.isSkinnedMesh&&h.bind(g,loi)});for(let h=0,d=u.length;h<d;h++)l.add(u[h]);return l})}_loadNodeShallow(e){const n=this.json,o=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const r=n.nodes[e],s=r.name?i.createUniqueName(r.name):"",a=[],A=i._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return A&&a.push(A),r.camera!==void 0&&a.push(i.getDependency("camera",r.camera).then(function(c){return i._getNodeRef(i.cameraCache,r.camera,c)})),i._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let l;if(r.isBone===!0?l=new Pzt:c.length>1?l=new lh:c.length===1?l=c[0]:l=new T0,l!==c[0])for(let u=0,g=c.length;u<g;u++)l.add(c[u]);if(r.name&&(l.userData.name=r.name,l.name=s),sS(l,r),r.extensions&&qR(o,l,r),r.matrix!==void 0){const u=new va;u.fromArray(r.matrix),l.applyMatrix4(u)}else r.translation!==void 0&&l.position.fromArray(r.translation),r.rotation!==void 0&&l.quaternion.fromArray(r.rotation),r.scale!==void 0&&l.scale.fromArray(r.scale);return i.associations.has(l)||i.associations.set(l,{}),i.associations.get(l).nodes=e,l}),this.nodeCache[e]}loadScene(e){const n=this.extensions,o=this.json.scenes[e],i=this,r=new lh;o.name&&(r.name=i.createUniqueName(o.name)),sS(r,o),o.extensions&&qR(n,r,o);const s=o.nodes||[],a=[];for(let A=0,c=s.length;A<c;A++)a.push(i.getDependency("node",s[A]));return Promise.all(a).then(function(A){for(let l=0,u=A.length;l<u;l++)r.add(A[l]);const c=l=>{const u=new Map;for(const[g,h]of i.associations)(g instanceof Gx||g instanceof Hg)&&u.set(g,h);return l.traverse(g=>{const h=i.associations.get(g);h!=null&&u.set(g,h)}),u};return i.associations=c(r),r})}_createAnimationTracks(e,n,o,i,r){const s=[],a=e.name?e.name:e.uuid,A=[];iP[r.path]===iP.weights?e.traverse(function(g){g.morphTargetInfluences&&A.push(g.name?g.name:g.uuid)}):A.push(a);let c;switch(iP[r.path]){case iP.weights:c=hY;break;case iP.rotation:c=pY;break;case iP.position:case iP.scale:c=_Y;break;default:o.itemSize===1?c=hY:c=_Y;break}const l=i.interpolation!==void 0?ioi[i.interpolation]:kG,u=this._getArrayFromAccessor(o);for(let g=0,h=A.length;g<h;g++){const d=new c(A[g]+"."+iP[r.path],n.array,u,l);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(d),s.push(d)}return s}_getArrayFromAccessor(e){let n=e.array;if(e.normalized){const o=xke(n.constructor),i=new Float32Array(n.length);for(let r=0,s=n.length;r<s;r++)i[r]=n[r]*o;n=i}return n}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(o){const i=this instanceof pY?ooi:QJt;return new i(this.times,this.values,this.getValueSize()/3,o)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function goi(t,e,n){const o=e.attributes,i=new e2;if(o.POSITION!==void 0){const a=n.json.accessors[o.POSITION],A=a.min,c=a.max;if(A!==void 0&&c!==void 0){if(i.set(new jt(A[0],A[1],A[2]),new jt(c[0],c[1],c[2])),a.normalized){const l=xke(CY[a.componentType]);i.min.multiplyScalar(l),i.max.multiplyScalar(l)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const r=e.targets;if(r!==void 0){const a=new jt,A=new jt;for(let c=0,l=r.length;c<l;c++){const u=r[c];if(u.POSITION!==void 0){const g=n.json.accessors[u.POSITION],h=g.min,d=g.max;if(h!==void 0&&d!==void 0){if(A.setX(Math.max(Math.abs(h[0]),Math.abs(d[0]))),A.setY(Math.max(Math.abs(h[1]),Math.abs(d[1]))),A.setZ(Math.max(Math.abs(h[2]),Math.abs(d[2]))),g.normalized){const p=xke(CY[g.componentType]);A.multiplyScalar(p)}a.max(A)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(a)}t.boundingBox=i;const s=new GB;i.getCenter(s.center),s.radius=i.min.distanceTo(i.max)/2,t.boundingSphere=s}function PJt(t,e,n){const o=e.attributes,i=[];function r(s,a){return n.getDependency("accessor",s).then(function(A){t.setAttribute(a,A)})}for(const s in o){const a=Ike[s]||s.toLowerCase();a in t.attributes||i.push(r(o[s],a))}if(e.indices!==void 0&&!t.index){const s=n.getDependency("accessor",e.indices).then(function(a){t.setIndex(a)});i.push(s)}return sS(t,e),goi(t,e,n),Promise.all(i).then(function(){return e.targets!==void 0?soi(t,e.targets,n):t})}class doi extends x6{constructor(e){super(e)}load(e,n,o,i){const r=this,s=new fY(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(r.parse(a))}catch(A){i?i(A):console.error(A),r.manager.itemError(e)}},o,i)}parse(e){function n(c){const l=new DataView(c),u=32/8*3+32/8*3*3+16/8,g=l.getUint32(80,!0);if(80+32/8+g*u===l.byteLength)return!0;const d=[115,111,108,105,100];for(let p=0;p<5;p++)if(o(d,l,p))return!1;return!0}function o(c,l,u){for(let g=0,h=c.length;g<h;g++)if(c[g]!==l.getUint8(u+g,!1))return!1;return!0}function i(c){const l=new DataView(c),u=l.getUint32(80,!0);let g,h,d,p=!1,m,_,f,I,C;for(let Q=0;Q<70;Q++)l.getUint32(Q,!1)==1129270351&&l.getUint8(Q+4)==82&&l.getUint8(Q+5)==61&&(p=!0,m=new Float32Array(u*3*3),_=l.getUint8(Q+6)/255,f=l.getUint8(Q+7)/255,I=l.getUint8(Q+8)/255,C=l.getUint8(Q+9)/255);const y=84,x=50,E=new Zl,B=new Float32Array(u*3*3),S=new Float32Array(u*3*3);for(let Q=0;Q<u;Q++){const w=y+Q*x,M=l.getFloat32(w,!0),k=l.getFloat32(w+4,!0),R=l.getFloat32(w+8,!0);if(p){const F=l.getUint16(w+48,!0);(F&32768)===0?(g=(F&31)/31,h=(F>>5&31)/31,d=(F>>10&31)/31):(g=_,h=f,d=I)}for(let F=1;F<=3;F++){const O=w+F*12,U=Q*3*3+(F-1)*3;B[U]=l.getFloat32(O,!0),B[U+1]=l.getFloat32(O+4,!0),B[U+2]=l.getFloat32(O+8,!0),S[U]=M,S[U+1]=k,S[U+2]=R,p&&(m[U]=g,m[U+1]=h,m[U+2]=d)}}return E.setAttribute("position",new tg(B,3)),E.setAttribute("normal",new tg(S,3)),p&&(E.setAttribute("color",new tg(m,3)),E.hasColors=!0,E.alpha=C),E}function r(c){const l=new Zl,u=/solid([\s\S]*?)endsolid/g,g=/facet([\s\S]*?)endfacet/g;let h=0;const d=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,p=new RegExp("vertex"+d+d+d,"g"),m=new RegExp("normal"+d+d+d,"g"),_=[],f=[],I=new jt;let C,y=0,x=0,E=0;for(;(C=u.exec(c))!==null;){x=E;const B=C[0];for(;(C=g.exec(B))!==null;){let w=0,M=0;const k=C[0];for(;(C=m.exec(k))!==null;)I.x=parseFloat(C[1]),I.y=parseFloat(C[2]),I.z=parseFloat(C[3]),M++;for(;(C=p.exec(k))!==null;)_.push(parseFloat(C[1]),parseFloat(C[2]),parseFloat(C[3])),f.push(I.x,I.y,I.z),w++,E++;M!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+h),w!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+h),h++}const S=x,Q=E-x;l.addGroup(S,Q,y),y++}return l.setAttribute("position",new Bs(_,3)),l.setAttribute("normal",new Bs(f,3)),l}function s(c){return typeof c!="string"?iX(new Uint8Array(c)):c}function a(c){if(typeof c=="string"){const l=new Uint8Array(c.length);for(let u=0;u<c.length;u++)l[u]=c.charCodeAt(u)&255;return l.buffer||l}else return c}const A=a(e);return n(A)?i(A):r(s(e))}}class hoi extends x6{constructor(e){super(e)}load(e,n,o,i){const r=this,s=this.path===""?jR.extractUrlBase(e):this.path,a=new fY(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(A){try{n(r.parse(A,s))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},o,i)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,n){const o=e.split(`
`);let i={};const r=/\s+/,s={};for(let A=0;A<o.length;A++){let c=o[A];if(c=c.trim(),c.length===0||c.charAt(0)==="#")continue;const l=c.indexOf(" ");let u=l>=0?c.substring(0,l):c;u=u.toLowerCase();let g=l>=0?c.substring(l+1):"";if(g=g.trim(),u==="newmtl")i={name:g},s[g]=i;else if(u==="ka"||u==="kd"||u==="ks"||u==="ke"){const h=g.split(r,3);i[u]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else i[u]=g}const a=new poi(this.resourcePath||n,this.materialOptions);return a.setCrossOrigin(this.crossOrigin),a.setManager(this.manager),a.setMaterials(s),a}}class poi{constructor(e="",n={}){this.baseUrl=e,this.options=n,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:mE,this.wrap=this.options.wrap!==void 0?this.options.wrap:c4}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const n={};for(const o in e){const i=e[o],r={};n[o]=r;for(const s in i){let a=!0,A=i[s];const c=s.toLowerCase();switch(c){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(A=[A[0]/255,A[1]/255,A[2]/255]),this.options&&this.options.ignoreZeroRGBs&&A[0]===0&&A[1]===0&&A[2]===0&&(a=!1);break}a&&(r[c]=A)}}return n}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const n in this.materialsInfo)this.materialsArray[e]=this.create(n),this.nameLookup[n]=e,e++;return this.materialsArray}create(e){return this.materials[e]===void 0&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const n=this,o=this.materialsInfo[e],i={name:e,side:this.side};function r(a,A){return typeof A!="string"||A===""?"":/^https?:\/\//i.test(A)?A:a+A}function s(a,A){if(i[a])return;const c=n.getTextureParams(A,i),l=n.loadTexture(r(n.baseUrl,c.url));l.repeat.copy(c.scale),l.offset.copy(c.offset),l.wrapS=n.wrap,l.wrapT=n.wrap,i[a]=l}for(const a in o){const A=o[a];let c;if(A!=="")switch(a.toLowerCase()){case"kd":i.color=new Vi().fromArray(A);break;case"ks":i.specular=new Vi().fromArray(A);break;case"ke":i.emissive=new Vi().fromArray(A);break;case"map_kd":s("map",A);break;case"map_ks":s("specularMap",A);break;case"map_ke":s("emissiveMap",A);break;case"norm":s("normalMap",A);break;case"map_bump":case"bump":s("bumpMap",A);break;case"map_d":s("alphaMap",A),i.transparent=!0;break;case"ns":i.shininess=parseFloat(A);break;case"d":c=parseFloat(A),c<1&&(i.opacity=c,i.transparent=!0);break;case"tr":c=parseFloat(A),this.options&&this.options.invertTrProperty&&(c=1-c),c>0&&(i.opacity=1-c,i.transparent=!0);break}}return this.materials[e]=new ike(i),this.materials[e]}getTextureParams(e,n){const o={scale:new ni(1,1),offset:new ni(0,0)},i=e.split(/\s+/);let r;return r=i.indexOf("-bm"),r>=0&&(n.bumpScale=parseFloat(i[r+1]),i.splice(r,2)),r=i.indexOf("-s"),r>=0&&(o.scale.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),r=i.indexOf("-o"),r>=0&&(o.offset.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),o.url=i.join(" ").trim(),o}loadTexture(e,n,o,i,r){const s=this.manager!==void 0?this.manager:nJt;let a=s.getHandler(e);a===null&&(a=new rke(s)),a.setCrossOrigin&&a.setCrossOrigin(this.crossOrigin);const A=a.load(e,o,i,r);return n!==void 0&&(A.mapping=n),A}}const{CstParser:moi,Lexer:Eke,createToken:a_}=(()=>{var t=typeof global=="object"&&global&&global.Object===Object&&global;const e=t;var n=typeof self=="object"&&self&&self.Object===Object&&self,o=e||n||Function("return this")();const i=o;var r=i.Symbol;const s=r;var a=Object.prototype,A=a.hasOwnProperty,c=a.toString,l=s?s.toStringTag:void 0;function u(re){var X=A.call(re,l),me=re[l];try{re[l]=void 0;var He=!0}catch{}var We=c.call(re);return He&&(X?re[l]=me:delete re[l]),We}var g=Object.prototype,h=g.toString;function d(re){return h.call(re)}var p="[object Null]",m="[object Undefined]",_=s?s.toStringTag:void 0;function f(re){return re==null?re===void 0?m:p:_&&_ in Object(re)?u(re):d(re)}function I(re){return re!=null&&typeof re=="object"}var C="[object Symbol]";function y(re){return typeof re=="symbol"||I(re)&&f(re)==C}function x(re,X){for(var me=-1,He=re==null?0:re.length,We=Array(He);++me<He;)We[me]=X(re[me],me,re);return We}var E=Array.isArray;const B=E;var S=s?s.prototype:void 0,Q=S?S.toString:void 0;function w(re){if(typeof re=="string")return re;if(B(re))return x(re,w)+"";if(y(re))return Q?Q.call(re):"";var X=re+"";return X=="0"&&1/re==-1/0?"-0":X}var M=/\s/;function k(re){for(var X=re.length;X--&&M.test(re.charAt(X)););return X}var R=/^\s+/;function F(re){return re&&re.slice(0,k(re)+1).replace(R,"")}function O(re){var X=typeof re;return re!=null&&(X=="object"||X=="function")}var U=NaN,Y=/^[-+]0x[0-9a-f]+$/i,W=/^0b[01]+$/i,te=/^0o[0-7]+$/i,j=parseInt;function J(re){if(typeof re=="number")return re;if(y(re))return U;if(O(re)){var X=typeof re.valueOf=="function"?re.valueOf():re;re=O(X)?X+"":X}if(typeof re!="string")return re===0?re:+re;re=F(re);var me=W.test(re);return me||te.test(re)?j(re.slice(2),me?2:8):Y.test(re)?U:+re}var oe=1/0,ie=17976931348623157e292;function ne(re){if(!re)return re===0?re:0;if(re=J(re),re===oe||re===-oe){var X=re<0?-1:1;return X*ie}return re===re?re:0}function le(re){var X=ne(re),me=X%1;return X===X?me?X-me:X:0}function ge(re){return re}var _e="[object AsyncFunction]",ue="[object Function]",fe="[object GeneratorFunction]",pe="[object Proxy]";function ye(re){if(!O(re))return!1;var X=f(re);return X==ue||X==fe||X==_e||X==pe}var Me=i["__core-js_shared__"];const ve=Me;var he=(function(){var re=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||"");return re?"Symbol(src)_1."+re:""})();function Qe(re){return!!he&&he in re}var Pe=Function.prototype,we=Pe.toString;function Te(re){if(re!=null){try{return we.call(re)}catch{}try{return re+""}catch{}}return""}var Re=/[\\^$.*+?()[\]{}|]/g,Ee=/^\[object .+?Constructor\]$/,ke=Function.prototype,Ce=Object.prototype,Le=ke.toString,Ye=Ce.hasOwnProperty,tt=RegExp("^"+Le.call(Ye).replace(Re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function At(re){if(!O(re)||Qe(re))return!1;var X=ye(re)?tt:Ee;return X.test(Te(re))}function at(re,X){return re?.[X]}function nt(re,X){var me=at(re,X);return At(me)?me:void 0}var gt=nt(i,"WeakMap");const bt=gt;var Ct=Object.create,Dt=(function(){function re(){}return function(X){if(!O(X))return{};if(Ct)return Ct(X);re.prototype=X;var me=new re;return re.prototype=void 0,me}})();const kt=Dt;function it(re,X,me){switch(me.length){case 0:return re.call(X);case 1:return re.call(X,me[0]);case 2:return re.call(X,me[0],me[1]);case 3:return re.call(X,me[0],me[1],me[2])}return re.apply(X,me)}function Yt(){}function pn(re,X){var me=-1,He=re.length;for(X||(X=Array(He));++me<He;)X[me]=re[me];return X}var be=800,et=16,It=Date.now;function Bt(re){var X=0,me=0;return function(){var He=It(),We=et-(He-me);if(me=He,We>0){if(++X>=be)return arguments[0]}else X=0;return re.apply(void 0,arguments)}}function mt(re){return function(){return re}}var st=(function(){try{var re=nt(Object,"defineProperty");return re({},"",{}),re}catch{}})();const xt=st;var Xe=xt?function(re,X){return xt(re,"toString",{configurable:!0,enumerable:!1,value:mt(X),writable:!0})}:ge,dt=Bt(Xe);const Ut=dt;function Wt(re,X){for(var me=-1,He=re==null?0:re.length;++me<He&&X(re[me],me,re)!==!1;);return re}function Xt(re,X,me,He){for(var We=re.length,ft=me+-1;++ft<We;)if(X(re[ft],ft,re))return ft;return-1}function Jt(re){return re!==re}function yn(re,X,me){for(var He=me-1,We=re.length;++He<We;)if(re[He]===X)return He;return-1}function An(re,X,me){return X===X?yn(re,X,me):Xt(re,Jt,me)}function kn(re,X){var me=re==null?0:re.length;return!!me&&An(re,X,0)>-1}var $n=9007199254740991,ht=/^(?:0|[1-9]\d*)$/;function Kt(re,X){var me=typeof re;return X=X??$n,!!X&&(me=="number"||me!="symbol"&&ht.test(re))&&re>-1&&re%1==0&&re<X}function rn(re,X,me){X=="__proto__"&&xt?xt(re,X,{configurable:!0,enumerable:!0,value:me,writable:!0}):re[X]=me}function Lt(re,X){return re===X||re!==re&&X!==X}var Ho=Object.prototype,Ao=Ho.hasOwnProperty;function qe(re,X,me){var He=re[X];(!(Ao.call(re,X)&&Lt(He,me))||me===void 0&&!(X in re))&&rn(re,X,me)}function vt(re,X,me,He){var We=!me;me||(me={});for(var ft=-1,wt=X.length;++ft<wt;){var zt=X[ft],en=void 0;en===void 0&&(en=re[zt]),We?rn(me,zt,en):qe(me,zt,en)}return me}var qt=Math.max;function Zt(re,X,me){return X=qt(X===void 0?re.length-1:X,0),function(){for(var He=arguments,We=-1,ft=qt(He.length-X,0),wt=Array(ft);++We<ft;)wt[We]=He[X+We];We=-1;for(var zt=Array(X+1);++We<X;)zt[We]=He[We];return zt[X]=me(wt),it(re,this,zt)}}function nn(re,X){return Ut(Zt(re,X,ge),re+"")}var zn=9007199254740991;function Nn(re){return typeof re=="number"&&re>-1&&re%1==0&&re<=zn}function Co(re){return re!=null&&Nn(re.length)&&!ye(re)}function ei(re,X,me){if(!O(me))return!1;var He=typeof X;return(He=="number"?Co(me)&&Kt(X,me.length):He=="string"&&X in me)?Lt(me[X],re):!1}function ro(re){return nn(function(X,me){var He=-1,We=me.length,ft=We>1?me[We-1]:void 0,wt=We>2?me[2]:void 0;for(ft=re.length>3&&typeof ft=="function"?(We--,ft):void 0,wt&&ei(me[0],me[1],wt)&&(ft=We<3?void 0:ft,We=1),X=Object(X);++He<We;){var zt=me[He];zt&&re(X,zt,He,ft)}return X})}var To=Object.prototype;function yo(re){var X=re&&re.constructor,me=typeof X=="function"&&X.prototype||To;return re===me}function Ro(re,X){for(var me=-1,He=Array(re);++me<re;)He[me]=X(me);return He}var On="[object Arguments]";function uo(re){return I(re)&&f(re)==On}var Oo=Object.prototype,ko=Oo.hasOwnProperty,Ko=Oo.propertyIsEnumerable,mi=uo((function(){return arguments})())?uo:function(re){return I(re)&&ko.call(re,"callee")&&!Ko.call(re,"callee")};const Fo=mi;function Nr(){return!1}var Rs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ur=Rs&&typeof module=="object"&&module&&!module.nodeType&&module,zi=ur&&ur.exports===Rs,bi=zi?i.Buffer:void 0,Ar=bi?bi.isBuffer:void 0,ws=Ar||Nr;const ds=ws;var Et="[object Arguments]",Gt="[object Array]",Rt="[object Boolean]",Ht="[object Date]",Qt="[object Error]",Nt="[object Function]",_n="[object Map]",qn="[object Number]",En="[object Object]",Rn="[object RegExp]",Hn="[object Set]",Lo="[object String]",Io="[object WeakMap]",gi="[object ArrayBuffer]",jo="[object DataView]",oi="[object Float32Array]",Ji="[object Float64Array]",wi="[object Int8Array]",Br="[object Int16Array]",gr="[object Int32Array]",oa="[object Uint8Array]",hs="[object Uint8ClampedArray]",Li="[object Uint16Array]",ys="[object Uint32Array]",dr={};dr[oi]=dr[Ji]=dr[wi]=dr[Br]=dr[gr]=dr[oa]=dr[hs]=dr[Li]=dr[ys]=!0,dr[Et]=dr[Gt]=dr[gi]=dr[Rt]=dr[jo]=dr[Ht]=dr[Qt]=dr[Nt]=dr[_n]=dr[qn]=dr[En]=dr[Rn]=dr[Hn]=dr[Lo]=dr[Io]=!1;function cA(re){return I(re)&&Nn(re.length)&&!!dr[f(re)]}function vA(re){return function(X){return re(X)}}var Yl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,H0=Yl&&typeof module=="object"&&module&&!module.nodeType&&module,ph=H0&&H0.exports===Yl,Xh=ph&&e.process,Bl=(function(){try{var re=H0&&H0.require&&H0.require("util").types;return re||Xh&&Xh.binding&&Xh.binding("util")}catch{}})();const fc=Bl;var Nd=fc&&fc.isTypedArray,il=Nd?vA(Nd):cA;const Ul=il;var m_=Object.prototype,ag=m_.hasOwnProperty;function Rd(re,X){var me=B(re),He=!me&&Fo(re),We=!me&&!He&&ds(re),ft=!me&&!He&&!We&&Ul(re),wt=me||He||We||ft,zt=wt?Ro(re.length,String):[],en=zt.length;for(var In in re)(X||ag.call(re,In))&&!(wt&&(In=="length"||We&&(In=="offset"||In=="parent")||ft&&(In=="buffer"||In=="byteLength"||In=="byteOffset")||Kt(In,en)))&&zt.push(In);return zt}function mh(re,X){return function(me){return re(X(me))}}var mm=mh(Object.keys,Object);const gu=mm;var Ag=Object.prototype,C0=Ag.hasOwnProperty;function FC(re){if(!yo(re))return gu(re);var X=[];for(var me in Object(re))C0.call(re,me)&&me!="constructor"&&X.push(me);return X}function O0(re){return Co(re)?Rd(re):FC(re)}var __=Object.prototype,Qp=__.hasOwnProperty,_1=ro(function(re,X){if(yo(X)||Co(X)){vt(X,O0(X),re);return}for(var me in X)Qp.call(X,me)&&qe(re,me,X[me])});const tr=_1;function Vo(re){var X=[];if(re!=null)for(var me in Object(re))X.push(me);return X}var wA=Object.prototype,Td=wA.hasOwnProperty;function da(re){if(!O(re))return Vo(re);var X=yo(re),me=[];for(var He in re)He=="constructor"&&(X||!Td.call(re,He))||me.push(He);return me}function Zh(re){return Co(re)?Rd(re,!0):da(re)}var mf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,LC=/^\w*$/;function _f(re,X){if(B(re))return!1;var me=typeof re;return me=="number"||me=="symbol"||me=="boolean"||re==null||y(re)?!0:LC.test(re)||!mf.test(re)||X!=null&&re in Object(X)}var _m=nt(Object,"create");const du=_m;function cg(){this.__data__=du?du(null):{},this.size=0}function Ug(re){var X=this.has(re)&&delete this.__data__[re];return this.size-=X?1:0,X}var Vc="__lodash_hash_undefined__",ha=Object.prototype,BI=ha.hasOwnProperty;function G0(re){var X=this.__data__;if(du){var me=X[re];return me===Vc?void 0:me}return BI.call(X,re)?X[re]:void 0}var PA=Object.prototype,_h=PA.hasOwnProperty;function n0(re){var X=this.__data__;return du?X[re]!==void 0:_h.call(X,re)}var HC="__lodash_hash_undefined__";function f1(re,X){var me=this.__data__;return this.size+=this.has(re)?0:1,me[re]=du&&X===void 0?HC:X,this}function fm(re){var X=-1,me=re==null?0:re.length;for(this.clear();++X<me;){var He=re[X];this.set(He[0],He[1])}}fm.prototype.clear=cg,fm.prototype.delete=Ug,fm.prototype.get=G0,fm.prototype.has=n0,fm.prototype.set=f1;function vp(){this.__data__=[],this.size=0}function ku(re,X){for(var me=re.length;me--;)if(Lt(re[me][0],X))return me;return-1}var ot=Array.prototype,rt=ot.splice;function Ot(re){var X=this.__data__,me=ku(X,re);if(me<0)return!1;var He=X.length-1;return me==He?X.pop():rt.call(X,me,1),--this.size,!0}function an(re){var X=this.__data__,me=ku(X,re);return me<0?void 0:X[me][1]}function Dn(re){return ku(this.__data__,re)>-1}function Xn(re,X){var me=this.__data__,He=ku(me,re);return He<0?(++this.size,me.push([re,X])):me[He][1]=X,this}function oo(re){var X=-1,me=re==null?0:re.length;for(this.clear();++X<me;){var He=re[X];this.set(He[0],He[1])}}oo.prototype.clear=vp,oo.prototype.delete=Ot,oo.prototype.get=an,oo.prototype.has=Dn,oo.prototype.set=Xn;var vo=nt(i,"Map");const Xo=vo;function Ti(){this.size=0,this.__data__={hash:new fm,map:new(Xo||oo),string:new fm}}function ir(re){var X=typeof re;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?re!=="__proto__":re===null}function Gs(re,X){var me=re.__data__;return ir(X)?me[typeof X=="string"?"string":"hash"]:me.map}function qr(re){var X=Gs(this,re).delete(re);return this.size-=X?1:0,X}function ps(re){return Gs(this,re).get(re)}function Ic(re){return Gs(this,re).has(re)}function lc(re,X){var me=Gs(this,re),He=me.size;return me.set(re,X),this.size+=me.size==He?0:1,this}function ka(re){var X=-1,me=re==null?0:re.length;for(this.clear();++X<me;){var He=re[X];this.set(He[0],He[1])}}ka.prototype.clear=Ti,ka.prototype.delete=qr,ka.prototype.get=ps,ka.prototype.has=Ic,ka.prototype.set=lc;var gn="Expected a function";function bn(re,X){if(typeof re!="function"||X!=null&&typeof X!="function")throw new TypeError(gn);var me=function(){var He=arguments,We=X?X.apply(this,He):He[0],ft=me.cache;if(ft.has(We))return ft.get(We);var wt=re.apply(this,He);return me.cache=ft.set(We,wt)||ft,wt};return me.cache=new(bn.Cache||ka),me}bn.Cache=ka;var go=500;function Go(re){var X=bn(re,function(He){return me.size===go&&me.clear(),He}),me=X.cache;return X}var hr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ia=/\\(\\)?/g,lA=Go(function(re){var X=[];return re.charCodeAt(0)===46&&X.push(""),re.replace(hr,function(me,He,We,ft){X.push(We?ft.replace(ia,"$1"):He||me)}),X});const MA=lA;function Fa(re){return re==null?"":w(re)}function La(re,X){return B(re)?re:_f(re,X)?[re]:MA(Fa(re))}function Y0(re){if(typeof re=="string"||y(re))return re;var X=re+"";return X=="0"&&1/re==-1/0?"-0":X}function Hr(re,X){X=La(X,re);for(var me=0,He=X.length;re!=null&&me<He;)re=re[Y0(X[me++])];return me&&me==He?re:void 0}function fh(re,X,me){var He=re==null?void 0:Hr(re,X);return He===void 0?me:He}function Ih(re,X){for(var me=-1,He=X.length,We=re.length;++me<He;)re[We+me]=X[me];return re}var DA=s?s.isConcatSpreadable:void 0;function OC(re){return B(re)||Fo(re)||!!(DA&&re&&re[DA])}function bI(re,X,me,He,We){var ft=-1,wt=re.length;for(me||(me=OC),We||(We=[]);++ft<wt;){var zt=re[ft];me(zt)?Ih(We,zt):He||(We[We.length]=zt)}return We}function hu(re){var X=re==null?0:re.length;return X?bI(re):[]}var lg=mh(Object.getPrototypeOf,Object);const wp=lg;function kd(re,X,me){var He=-1,We=re.length;X<0&&(X=-X>We?0:We+X),me=me>We?We:me,me<0&&(me+=We),We=X>me?0:me-X>>>0,X>>>=0;for(var ft=Array(We);++He<We;)ft[He]=re[He+X];return ft}function ff(re,X,me,He){var We=-1,ft=re==null?0:re.length;for(He&&ft&&(me=re[++We]);++We<ft;)me=X(me,re[We],We,re);return me}function I1(){this.__data__=new oo,this.size=0}function p2(re){var X=this.__data__,me=X.delete(re);return this.size=X.size,me}function Pp(re){return this.__data__.get(re)}function SI(re){return this.__data__.has(re)}var Mp=200;function f_(re,X){var me=this.__data__;if(me instanceof oo){var He=me.__data__;if(!Xo||He.length<Mp-1)return He.push([re,X]),this.size=++me.size,this;me=this.__data__=new ka(He)}return me.set(re,X),this.size=me.size,this}function U0(re){var X=this.__data__=new oo(re);this.size=X.size}U0.prototype.clear=I1,U0.prototype.delete=p2,U0.prototype.get=Pp,U0.prototype.has=SI,U0.prototype.set=f_;function S4(re,X){return re&&vt(X,O0(X),re)}var ep=typeof exports=="object"&&exports&&!exports.nodeType&&exports,If=ep&&typeof module=="object"&&module&&!module.nodeType&&module,A3=If&&If.exports===ep,m2=A3?i.Buffer:void 0,KE=m2?m2.allocUnsafe:void 0;function Fd(re,X){var me=re.length,He=KE?KE(me):new re.constructor(me);return re.copy(He),He}function _2(re,X){for(var me=-1,He=re==null?0:re.length,We=0,ft=[];++me<He;){var wt=re[me];X(wt,me,re)&&(ft[We++]=wt)}return ft}function o0(){return[]}var tp=Object.prototype,Im=tp.propertyIsEnumerable,pu=Object.getOwnPropertySymbols,K0=pu?function(re){return re==null?[]:(re=Object(re),_2(pu(re),function(X){return Im.call(re,X)}))}:o0;const zc=K0;function np(re,X){return vt(re,zc(re),X)}var y0=Object.getOwnPropertySymbols,Cm=y0?function(re){for(var X=[];re;)Ih(X,zc(re)),re=wp(re);return X}:o0;const Dp=Cm;function Kg(re,X,me){var He=X(re);return B(re)?He:Ih(He,me(re))}function Ld(re){return Kg(re,O0,zc)}function f2(re){return Kg(re,Zh,Dp)}var Np=nt(i,"DataView");const QI=Np;var V0=nt(i,"Promise");const Vg=V0;var op=nt(i,"Set");const bs=op;var Zo="[object Map]",ip="[object Object]",vI="[object Promise]",nc="[object Set]",i0="[object WeakMap]",Cf="[object DataView]",ug=Te(QI),wI=Te(Xo),rp=Te(Vg),Rp=Te(bs),oc=Te(bt),gg=f;(QI&&gg(new QI(new ArrayBuffer(1)))!=Cf||Xo&&gg(new Xo)!=Zo||Vg&&gg(Vg.resolve())!=vI||bs&&gg(new bs)!=nc||bt&&gg(new bt)!=i0)&&(gg=function(re){var X=f(re),me=X==ip?re.constructor:void 0,He=me?Te(me):"";if(He)switch(He){case ug:return Cf;case wI:return Zo;case rp:return vI;case Rp:return nc;case oc:return i0}return X});const Cc=gg;var pa=Object.prototype,c3=pa.hasOwnProperty;function PI(re){var X=re.length,me=new re.constructor(X);return X&&typeof re[0]=="string"&&c3.call(re,"index")&&(me.index=re.index,me.input=re.input),me}var Tp=i.Uint8Array;const rl=Tp;function IA(re){var X=new re.constructor(re.byteLength);return new rl(X).set(new rl(re)),X}function uA(re,X){var me=re.buffer;return new re.constructor(me,re.byteOffset,re.byteLength)}var ym=/\w*$/;function kp(re){var X=new re.constructor(re.source,ym.exec(re));return X.lastIndex=re.lastIndex,X}var C1=s?s.prototype:void 0,xm=C1?C1.valueOf:void 0;function I2(re){return xm?Object(xm.call(re)):{}}function y1(re,X){var me=re.buffer;return new re.constructor(me,re.byteOffset,re.length)}var I_="[object Boolean]",MI="[object Date]",VE="[object Map]",GC="[object Number]",YC="[object RegExp]",yf="[object Set]",Fu="[object String]",sp="[object Symbol]",xf="[object ArrayBuffer]",C2="[object DataView]",$s="[object Float32Array]",DI="[object Float64Array]",y2="[object Int8Array]",x1="[object Int16Array]",dg="[object Int32Array]",x2="[object Uint8Array]",zE="[object Uint8ClampedArray]",E2="[object Uint16Array]",NI="[object Uint32Array]";function Fp(re,X,me){var He=re.constructor;switch(X){case xf:return IA(re);case I_:case MI:return new He(+re);case C2:return uA(re);case $s:case DI:case y2:case x1:case dg:case x2:case zE:case E2:case NI:return y1(re);case VE:return new He;case GC:case Fu:return new He(re);case YC:return kp(re);case yf:return new He;case sp:return I2(re)}}function qs(re){return typeof re.constructor=="function"&&!yo(re)?kt(wp(re)):{}}var RI="[object Map]";function Ch(re){return I(re)&&Cc(re)==RI}var C_=fc&&fc.isMap,yh=C_?vA(C_):Ch;const Em=yh;var z0="[object Set]";function TI(re){return I(re)&&Cc(re)==z0}var Ef=fc&&fc.isSet,Q4=Ef?vA(Ef):TI;const B2=Q4;var Lp="[object Arguments]",ma="[object Array]",b2="[object Boolean]",Hd="[object Date]",E1="[object Error]",kI="[object Function]",Od="[object GeneratorFunction]",B1="[object Map]",FI="[object Number]",UC="[object Object]",S2="[object RegExp]",KC="[object Set]",l3="[object String]",y_="[object Symbol]",ap="[object WeakMap]",u3="[object ArrayBuffer]",Q2="[object DataView]",Gd="[object Float32Array]",Yd="[object Float64Array]",b1="[object Int8Array]",v4="[object Int16Array]",Hp="[object Int32Array]",VC="[object Uint8Array]",Bm="[object Uint8ClampedArray]",Xr="[object Uint16Array]",v2="[object Uint32Array]",Ts={};Ts[Lp]=Ts[ma]=Ts[u3]=Ts[Q2]=Ts[b2]=Ts[Hd]=Ts[Gd]=Ts[Yd]=Ts[b1]=Ts[v4]=Ts[Hp]=Ts[B1]=Ts[FI]=Ts[UC]=Ts[S2]=Ts[KC]=Ts[l3]=Ts[y_]=Ts[VC]=Ts[Bm]=Ts[Xr]=Ts[v2]=!0,Ts[E1]=Ts[kI]=Ts[ap]=!1;function S1(re,X,me,He,We,ft){var wt;if(wt!==void 0)return wt;if(!O(re))return re;var zt=B(re);if(zt)return wt=PI(re),pn(re,wt);var en=Cc(re),In=en==kI||en==Od;if(ds(re))return Fd(re);if(en==UC||en==Lp||In&&!We)return wt=In?{}:qs(re),np(re,S4(wt,re));if(!Ts[en])return We?re:{};wt=Fp(re,en),ft||(ft=new U0);var po=ft.get(re);if(po)return po;ft.set(re,wt),B2(re)?re.forEach(function(Hi){wt.add(S1(Hi,X,me,Hi,re,ft))}):Em(re)&&re.forEach(function(Hi,pr){wt.set(pr,S1(Hi,X,me,pr,re,ft))});var wo=Ld,ci=zt?void 0:wo(re);return Wt(ci||re,function(Hi,pr){ci&&(pr=Hi,Hi=re[pr]),qe(wt,pr,S1(Hi,X,me,pr,re,ft))}),wt}var CA=4;function x0(re){return S1(re,CA)}function zg(re){for(var X=-1,me=re==null?0:re.length,He=0,We=[];++X<me;){var ft=re[X];ft&&(We[He++]=ft)}return We}var bm="__lodash_hash_undefined__";function Ss(re){return this.__data__.set(re,bm),this}function ic(re){return this.__data__.has(re)}function Va(re){var X=-1,me=re==null?0:re.length;for(this.__data__=new ka;++X<me;)this.add(re[X])}Va.prototype.add=Va.prototype.push=Ss,Va.prototype.has=ic;function LI(re,X){for(var me=-1,He=re==null?0:re.length;++me<He;)if(X(re[me],me,re))return!0;return!1}function Lu(re,X){return re.has(X)}var Jg=1,x_=2;function hg(re,X,me,He,We,ft){var wt=me&Jg,zt=re.length,en=X.length;if(zt!=en&&!(wt&&en>zt))return!1;var In=ft.get(re),po=ft.get(X);if(In&&po)return In==X&&po==re;var wo=-1,ci=!0,Hi=me&x_?new Va:void 0;for(ft.set(re,X),ft.set(X,re);++wo<zt;){var pr=re[wo],Wr=X[wo];if(He)var Ca=wt?He(Wr,pr,wo,X,re,ft):He(pr,Wr,wo,re,X,ft);if(Ca!==void 0){if(Ca)continue;ci=!1;break}if(Hi){if(!LI(X,function(rr,Wi){if(!Lu(Hi,Wi)&&(pr===rr||We(pr,rr,me,He,ft)))return Hi.push(Wi)})){ci=!1;break}}else if(!(pr===Wr||We(pr,Wr,me,He,ft))){ci=!1;break}}return ft.delete(re),ft.delete(X),ci}function xh(re){var X=-1,me=Array(re.size);return re.forEach(function(He,We){me[++X]=[We,He]}),me}function Ud(re){var X=-1,me=Array(re.size);return re.forEach(function(He){me[++X]=He}),me}var Ks=1,E_=2,Eh="[object Boolean]",B_="[object Date]",w4="[object Error]",J0="[object Map]",Sm="[object Number]",w2="[object RegExp]",g3="[object Set]",Wg="[object String]",r0="[object Symbol]",P2="[object ArrayBuffer]",zC="[object DataView]",W0=s?s.prototype:void 0,M2=W0?W0.valueOf:void 0;function sl(re,X,me,He,We,ft,wt){switch(me){case zC:if(re.byteLength!=X.byteLength||re.byteOffset!=X.byteOffset)return!1;re=re.buffer,X=X.buffer;case P2:return!(re.byteLength!=X.byteLength||!ft(new rl(re),new rl(X)));case Eh:case B_:case Sm:return Lt(+re,+X);case w4:return re.name==X.name&&re.message==X.message;case w2:case Wg:return re==X+"";case J0:var zt=xh;case g3:var en=He&Ks;if(zt||(zt=Ud),re.size!=X.size&&!en)return!1;var In=wt.get(re);if(In)return In==X;He|=E_,wt.set(re,X);var po=hg(zt(re),zt(X),He,We,ft,wt);return wt.delete(re),po;case r0:if(M2)return M2.call(re)==M2.call(X)}return!1}var b_=1,s0=Object.prototype,JE=s0.hasOwnProperty;function d3(re,X,me,He,We,ft){var wt=me&b_,zt=Ld(re),en=zt.length,In=Ld(X),po=In.length;if(en!=po&&!wt)return!1;for(var wo=en;wo--;){var ci=zt[wo];if(!(wt?ci in X:JE.call(X,ci)))return!1}var Hi=ft.get(re),pr=ft.get(X);if(Hi&&pr)return Hi==X&&pr==re;var Wr=!0;ft.set(re,X),ft.set(X,re);for(var Ca=wt;++wo<en;){ci=zt[wo];var rr=re[ci],Wi=X[ci];if(He)var Mi=wt?He(Wi,rr,ci,X,re,ft):He(rr,Wi,ci,re,X,ft);if(!(Mi===void 0?rr===Wi||We(rr,Wi,me,He,ft):Mi)){Wr=!1;break}Ca||(Ca=ci=="constructor")}if(Wr&&!Ca){var Gr=re.constructor,Bc=X.constructor;Gr!=Bc&&"constructor"in re&&"constructor"in X&&!(typeof Gr=="function"&&Gr instanceof Gr&&typeof Bc=="function"&&Bc instanceof Bc)&&(Wr=!1)}return ft.delete(re),ft.delete(X),Wr}var JC=1,Bf="[object Arguments]",D2="[object Array]",WC="[object Object]",Qm=Object.prototype,N2=Qm.hasOwnProperty;function WE(re,X,me,He,We,ft){var wt=B(re),zt=B(X),en=wt?D2:Cc(re),In=zt?D2:Cc(X);en=en==Bf?WC:en,In=In==Bf?WC:In;var po=en==WC,wo=In==WC,ci=en==In;if(ci&&ds(re)){if(!ds(X))return!1;wt=!0,po=!1}if(ci&&!po)return ft||(ft=new U0),wt||Ul(re)?hg(re,X,me,He,We,ft):sl(re,X,en,me,He,We,ft);if(!(me&JC)){var Hi=po&&N2.call(re,"__wrapped__"),pr=wo&&N2.call(X,"__wrapped__");if(Hi||pr){var Wr=Hi?re.value():re,Ca=pr?X.value():X;return ft||(ft=new U0),We(Wr,Ca,me,He,ft)}}return ci?(ft||(ft=new U0),d3(re,X,me,He,We,ft)):!1}function jE(re,X,me,He,We){return re===X?!0:re==null||X==null||!I(re)&&!I(X)?re!==re&&X!==X:WE(re,X,me,He,jE,We)}var $E=1,R2=2;function h3(re,X,me,He){var We=me.length,ft=We;if(re==null)return!ft;for(re=Object(re);We--;){var wt=me[We];if(wt[2]?wt[1]!==re[wt[0]]:!(wt[0]in re))return!1}for(;++We<ft;){wt=me[We];var zt=wt[0],en=re[zt],In=wt[1];if(wt[2]){if(en===void 0&&!(zt in re))return!1}else{var po=new U0,wo;if(!(wo===void 0?jE(In,en,$E|R2,He,po):wo))return!1}}return!0}function p3(re){return re===re&&!O(re)}function l9(re){for(var X=O0(re),me=X.length;me--;){var He=X[me],We=re[He];X[me]=[He,We,p3(We)]}return X}function qE(re,X){return function(me){return me==null?!1:me[re]===X&&(X!==void 0||re in Object(me))}}function P4(re){var X=l9(re);return X.length==1&&X[0][2]?qE(X[0][0],X[0][1]):function(me){return me===re||h3(me,re,X)}}function bf(re,X){return re!=null&&X in Object(re)}function XE(re,X,me){X=La(X,re);for(var He=-1,We=X.length,ft=!1;++He<We;){var wt=Y0(X[He]);if(!(ft=re!=null&&me(re,wt)))break;re=re[wt]}return ft||++He!=We?ft:(We=re==null?0:re.length,!!We&&Nn(We)&&Kt(wt,We)&&(B(re)||Fo(re)))}function T2(re,X){return re!=null&&XE(re,X,bf)}var k2=1,Ap=2;function F2(re,X){return _f(re)&&p3(X)?qE(Y0(re),X):function(me){var He=fh(me,re);return He===void 0&&He===X?T2(me,re):jE(X,He,k2|Ap)}}function m3(re){return function(X){return X?.[re]}}function HI(re){return function(X){return Hr(X,re)}}function kc(re){return _f(re)?m3(Y0(re)):HI(re)}function S_(re){return typeof re=="function"?re:re==null?ge:typeof re=="object"?B(re)?F2(re[0],re[1]):P4(re):kc(re)}function M4(re,X,me,He){for(var We=-1,ft=re==null?0:re.length;++We<ft;){var wt=re[We];X(He,wt,me(wt),re)}return He}function jC(re){return function(X,me,He){for(var We=-1,ft=Object(X),wt=He(X),zt=wt.length;zt--;){var en=wt[++We];if(me(ft[en],en,ft)===!1)break}return X}}var vm=jC();const ZE=vm;function NA(re,X){return re&&ZE(re,X,O0)}function Sf(re,X){return function(me,He){if(me==null)return me;if(!Co(me))return re(me,He);for(var We=me.length,ft=-1,wt=Object(me);++ft<We&&He(wt[ft],ft,wt)!==!1;);return me}}var OI=Sf(NA);const Q1=OI;function e5(re,X,me,He){return Q1(re,function(We,ft,wt){X(He,We,me(We),wt)}),He}function u9(re,X){return function(me,He){var We=B(me)?M4:e5,ft={};return We(me,re,S_(He),ft)}}var t5=Object.prototype,g9=t5.hasOwnProperty,n5=nn(function(re,X){re=Object(re);var me=-1,He=X.length,We=He>2?X[2]:void 0;for(We&&ei(X[0],X[1],We)&&(He=1);++me<He;)for(var ft=X[me],wt=Zh(ft),zt=-1,en=wt.length;++zt<en;){var In=wt[zt],po=re[In];(po===void 0||Lt(po,t5[In])&&!g9.call(re,In))&&(re[In]=ft[In])}return re});const o5=n5;function Qf(re){return I(re)&&Co(re)}var Q_=200;function d9(re,X,me,He){var We=-1,ft=kn,wt=!0,zt=re.length,en=[],In=X.length;if(!zt)return en;X.length>=Q_&&(ft=Lu,wt=!1,X=new Va(X));e:for(;++We<zt;){var po=re[We],wo=po;if(po=po!==0?po:0,wt&&wo===wo){for(var ci=In;ci--;)if(X[ci]===wo)continue e;en.push(po)}else ft(X,wo,He)||en.push(po)}return en}var $C=nn(function(re,X){return Qf(re)?d9(re,bI(X,1,Qf,!0)):[]});const L2=$C;function GI(re){var X=re==null?0:re.length;return X?re[X-1]:void 0}function Hu(re,X,me){var He=re==null?0:re.length;return He?(X=X===void 0?1:le(X),kd(re,X<0?0:X,He)):[]}function wm(re,X,me){var He=re==null?0:re.length;return He?(X=X===void 0?1:le(X),X=He-X,kd(re,0,X<0?0:X)):[]}function i5(re){return typeof re=="function"?re:ge}function zr(re,X){var me=B(re)?Wt:Q1;return me(re,i5(X))}function v1(re,X){for(var me=-1,He=re==null?0:re.length;++me<He;)if(!X(re[me],me,re))return!1;return!0}function D4(re,X){var me=!0;return Q1(re,function(He,We,ft){return me=!!X(He,We,ft),me}),me}function Bh(re,X,me){var He=B(re)?v1:D4;return He(re,S_(X))}function H2(re,X){var me=[];return Q1(re,function(He,We,ft){X(He,We,ft)&&me.push(He)}),me}function mu(re,X){var me=B(re)?_2:H2;return me(re,S_(X))}function vf(re){return function(X,me,He){var We=Object(X);if(!Co(X)){var ft=S_(me);X=O0(X),me=function(zt){return ft(We[zt],zt,We)}}var wt=re(X,me,He);return wt>-1?We[ft?X[wt]:wt]:void 0}}var YI=Math.max;function bh(re,X,me){var He=re==null?0:re.length;if(!He)return-1;var We=me==null?0:le(me);return We<0&&(We=YI(He+We,0)),Xt(re,S_(X),We)}var _3=vf(bh);const cp=_3;function Jc(re){return re&&re.length?re[0]:void 0}function r5(re,X){var me=-1,He=Co(re)?Array(re.length):[];return Q1(re,function(We,ft,wt){He[++me]=X(We,ft,wt)}),He}function Gi(re,X){var me=B(re)?x:r5;return me(re,S_(X))}function pg(re,X){return bI(Gi(re,X))}var Pm=Object.prototype,Op=Pm.hasOwnProperty,Sh=u9(function(re,X,me){Op.call(re,me)?re[me].push(X):rn(re,me,[X])});const Ys=Sh;var w1=Object.prototype,a0=w1.hasOwnProperty;function al(re,X){return re!=null&&a0.call(re,X)}function ai(re,X){return re!=null&&XE(re,X,al)}var v_="[object String]";function Al(re){return typeof re=="string"||!B(re)&&I(re)&&f(re)==v_}function P1(re,X){return x(X,function(me){return re[me]})}function Wc(re){return re==null?[]:P1(re,O0(re))}var Gp=Math.max;function A0(re,X,me,He){re=Co(re)?re:Wc(re),me=me?le(me):0;var We=re.length;return me<0&&(me=Gp(We+me,0)),Al(re)?me<=We&&re.indexOf(X,me)>-1:!!We&&An(re,X,me)>-1}function Mm(re,X,me){var He=re==null?0:re.length;if(!He)return-1;var We=0;return An(re,X,We)}var mg="[object Map]",_g="[object Set]",O2=Object.prototype,G2=O2.hasOwnProperty;function RA(re){if(re==null)return!0;if(Co(re)&&(B(re)||typeof re=="string"||typeof re.splice=="function"||ds(re)||Ul(re)||Fo(re)))return!re.length;var X=Cc(re);if(X==mg||X==_g)return!re.size;if(yo(re))return!FC(re).length;for(var me in re)if(G2.call(re,me))return!1;return!0}var jg="[object RegExp]";function qC(re){return I(re)&&f(re)==jg}var Kd=fc&&fc.isRegExp,h9=Kd?vA(Kd):qC;const yc=h9;function cs(re){return re===void 0}var Jn="Expected a function";function c8(re){if(typeof re!="function")throw new TypeError(Jn);return function(){var X=arguments;switch(X.length){case 0:return!re.call(this);case 1:return!re.call(this,X[0]);case 2:return!re.call(this,X[0],X[1]);case 3:return!re.call(this,X[0],X[1],X[2])}return!re.apply(this,X)}}function wf(re,X,me,He){if(!O(re))return re;X=La(X,re);for(var We=-1,ft=X.length,wt=ft-1,zt=re;zt!=null&&++We<ft;){var en=Y0(X[We]),In=me;if(en==="__proto__"||en==="constructor"||en==="prototype")return re;if(We!=wt){var po=zt[en];In=void 0,In===void 0&&(In=O(po)?po:Kt(X[We+1])?[]:{})}qe(zt,en,In),zt=zt[en]}return re}function XC(re,X,me){for(var He=-1,We=X.length,ft={};++He<We;){var wt=X[He],zt=Hr(re,wt);me(zt,wt)&&wf(ft,La(wt,re),zt)}return ft}function fg(re,X){if(re==null)return{};var me=x(f2(re),function(He){return[He]});return X=S_(X),XC(re,me,function(He,We){return X(He,We[0])})}function Y2(re,X,me,He,We){return We(re,function(ft,wt,zt){me=He?(He=!1,ft):X(me,ft,wt,zt)}),me}function _u(re,X,me){var He=B(re)?ff:Y2,We=arguments.length<3;return He(re,S_(X),me,We,Q1)}function Ig(re,X){var me=B(re)?_2:H2;return me(re,c8(S_(X)))}function s5(re,X){var me;return Q1(re,function(He,We,ft){return me=X(He,We,ft),!me}),!!me}function f3(re,X,me){var He=B(re)?LI:s5;return He(re,S_(X))}var ZC=1/0,I3=bs&&1/Ud(new bs([,-0]))[1]==ZC?function(re){return new bs(re)}:Yt;const Pf=I3;var UI=200;function C3(re,X,me){var He=-1,We=kn,ft=re.length,wt=!0,zt=[],en=zt;if(ft>=UI){var In=Pf(re);if(In)return Ud(In);wt=!1,We=Lu,en=new Va}else en=zt;e:for(;++He<ft;){var po=re[He],wo=po;if(po=po!==0?po:0,wt&&wo===wo){for(var ci=en.length;ci--;)if(en[ci]===wo)continue e;zt.push(po)}else We(en,wo,me)||(en!==zt&&en.push(wo),zt.push(po))}return zt}function KI(re){return re&&re.length?C3(re):[]}function E0(re){console&&console.error&&console.error(`Error: ${re}`)}function jc(re){console&&console.warn&&console.warn(`Warning: ${re}`)}function cl(re){const X=new Date().getTime(),me=re();return{time:new Date().getTime()-X,value:me}}function Ou(re){function X(){}X.prototype=re;const me=new X;function He(){return typeof me.bar}return He(),He(),re}function B0(re){return bl(re)?re.LABEL:re.name}function bl(re){return Al(re.LABEL)&&re.LABEL!==""}class Vd{get definition(){return this._definition}set definition(X){this._definition=X}constructor(X){this._definition=X}accept(X){X.visit(this),zr(this.definition,me=>{me.accept(X)})}}class za extends Vd{constructor(X){super([]),this.idx=1,tr(this,fg(X,me=>me!==void 0))}set definition(X){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(X){X.visit(this)}}class $g extends Vd{constructor(X){super(X.definition),this.orgText="",tr(this,fg(X,me=>me!==void 0))}}class Xa extends Vd{constructor(X){super(X.definition),this.ignoreAmbiguities=!1,tr(this,fg(X,me=>me!==void 0))}}class Za extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=>me!==void 0))}}class Vs extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=>me!==void 0))}}class fu extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=>me!==void 0))}}class Si extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=>me!==void 0))}}class lp extends Vd{constructor(X){super(X.definition),this.idx=1,tr(this,fg(X,me=>me!==void 0))}}class c0 extends Vd{get definition(){return this._definition}set definition(X){this._definition=X}constructor(X){super(X.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,tr(this,fg(X,me=>me!==void 0))}}class $c{constructor(X){this.idx=1,tr(this,fg(X,me=>me!==void 0))}accept(X){X.visit(this)}}function Qh(re){return Gi(re,Kl)}function Kl(re){function X(me){return Gi(me,Kl)}if(re instanceof za){const me={type:"NonTerminal",name:re.nonTerminalName,idx:re.idx};return Al(re.label)&&(me.label=re.label),me}else{if(re instanceof Xa)return{type:"Alternative",definition:X(re.definition)};if(re instanceof Za)return{type:"Option",idx:re.idx,definition:X(re.definition)};if(re instanceof Vs)return{type:"RepetitionMandatory",idx:re.idx,definition:X(re.definition)};if(re instanceof fu)return{type:"RepetitionMandatoryWithSeparator",idx:re.idx,separator:Kl(new $c({terminalType:re.separator})),definition:X(re.definition)};if(re instanceof lp)return{type:"RepetitionWithSeparator",idx:re.idx,separator:Kl(new $c({terminalType:re.separator})),definition:X(re.definition)};if(re instanceof Si)return{type:"Repetition",idx:re.idx,definition:X(re.definition)};if(re instanceof c0)return{type:"Alternation",idx:re.idx,definition:X(re.definition)};if(re instanceof $c){const me={type:"Terminal",name:re.terminalType.name,label:B0(re.terminalType),idx:re.idx};Al(re.label)&&(me.terminalLabel=re.label);const He=re.terminalType.PATTERN;return re.terminalType.PATTERN&&(me.pattern=yc(He)?He.source:He),me}else{if(re instanceof $g)return{type:"Rule",name:re.name,orgText:re.orgText,definition:X(re.definition)};throw Error("non exhaustive match")}}}class VI{visit(X){const me=X;switch(me.constructor){case za:return this.visitNonTerminal(me);case Xa:return this.visitAlternative(me);case Za:return this.visitOption(me);case Vs:return this.visitRepetitionMandatory(me);case fu:return this.visitRepetitionMandatoryWithSeparator(me);case lp:return this.visitRepetitionWithSeparator(me);case Si:return this.visitRepetition(me);case c0:return this.visitAlternation(me);case $c:return this.visitTerminal(me);case $g:return this.visitRule(me);default:throw Error("non exhaustive match")}}visitNonTerminal(X){}visitAlternative(X){}visitOption(X){}visitRepetition(X){}visitRepetitionMandatory(X){}visitRepetitionMandatoryWithSeparator(X){}visitRepetitionWithSeparator(X){}visitAlternation(X){}visitTerminal(X){}visitRule(X){}}function p9(re){return re instanceof Xa||re instanceof Za||re instanceof Si||re instanceof Vs||re instanceof fu||re instanceof lp||re instanceof $c||re instanceof $g}function zI(re,X=[]){return re instanceof Za||re instanceof Si||re instanceof lp?!0:re instanceof c0?f3(re.definition,He=>zI(He,X)):re instanceof za&&A0(X,re)?!1:re instanceof Vd?(re instanceof za&&X.push(re),Bh(re.definition,He=>zI(He,X))):!1}function rc(re){return re instanceof c0}function b0(re){if(re instanceof za)return"SUBRULE";if(re instanceof Za)return"OPTION";if(re instanceof c0)return"OR";if(re instanceof Vs)return"AT_LEAST_ONE";if(re instanceof fu)return"AT_LEAST_ONE_SEP";if(re instanceof lp)return"MANY_SEP";if(re instanceof Si)return"MANY";if(re instanceof $c)return"CONSUME";throw Error("non exhaustive match")}class Mf{walk(X,me=[]){zr(X.definition,(He,We)=>{const ft=Hu(X.definition,We+1);if(He instanceof za)this.walkProdRef(He,ft,me);else if(He instanceof $c)this.walkTerminal(He,ft,me);else if(He instanceof Xa)this.walkFlat(He,ft,me);else if(He instanceof Za)this.walkOption(He,ft,me);else if(He instanceof Vs)this.walkAtLeastOne(He,ft,me);else if(He instanceof fu)this.walkAtLeastOneSep(He,ft,me);else if(He instanceof lp)this.walkManySep(He,ft,me);else if(He instanceof Si)this.walkMany(He,ft,me);else if(He instanceof c0)this.walkOr(He,ft,me);else throw Error("non exhaustive match")})}walkTerminal(X,me,He){}walkProdRef(X,me,He){}walkFlat(X,me,He){const We=me.concat(He);this.walk(X,We)}walkOption(X,me,He){const We=me.concat(He);this.walk(X,We)}walkAtLeastOne(X,me,He){const We=[new Za({definition:X.definition})].concat(me,He);this.walk(X,We)}walkAtLeastOneSep(X,me,He){const We=a5(X,me,He);this.walk(X,We)}walkMany(X,me,He){const We=[new Za({definition:X.definition})].concat(me,He);this.walk(X,We)}walkManySep(X,me,He){const We=a5(X,me,He);this.walk(X,We)}walkOr(X,me,He){const We=me.concat(He);zr(X.definition,ft=>{const wt=new Xa({definition:[ft]});this.walk(wt,We)})}}function a5(re,X,me){return[new Za({definition:[new $c({terminalType:re.separator})].concat(re.definition)})].concat(X,me)}function Cg(re){if(re instanceof za)return Cg(re.referencedRule);if(re instanceof $c)return ey(re);if(p9(re))return Dm(re);if(rc(re))return JI(re);throw Error("non exhaustive match")}function Dm(re){let X=[];const me=re.definition;let He=0,We=me.length>He,ft,wt=!0;for(;We&&wt;)ft=me[He],wt=zI(ft),X=X.concat(Cg(ft)),He=He+1,We=me.length>He;return KI(X)}function JI(re){const X=Gi(re.definition,me=>Cg(me));return KI(hu(X))}function ey(re){return[re.terminalType]}const Nm="_~IN~_";class ll extends Mf{constructor(X){super(),this.topProd=X,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(X,me,He){}walkProdRef(X,me,He){const We=A5(X.referencedRule,X.idx)+this.topProd.name,ft=me.concat(He),wt=new Xa({definition:ft}),zt=Cg(wt);this.follows[We]=zt}}function WI(re){const X={};return zr(re,me=>{const He=new ll(me).startWalking();tr(X,He)}),X}function A5(re,X){return re.name+X+Nm}function Yi(re){return re.charCodeAt(0)}function c5(re,X){Array.isArray(re)?re.forEach(function(me){X.push(me)}):X.push(re)}function Df(re,X){if(re[X]===!0)throw"duplicate flag "+X;re[X],re[X]=!0}function M1(re){if(re===void 0)throw Error("Internal Error - Should never get here!");return!0}function ul(){throw Error("Internal Error - Should never get here!")}function Iu(re){return re.type==="Character"}const yg=[];for(let re=Yi("0");re<=Yi("9");re++)yg.push(re);const ss=[Yi("_")].concat(yg);for(let re=Yi("a");re<=Yi("z");re++)ss.push(re);for(let re=Yi("A");re<=Yi("Z");re++)ss.push(re);const D1=[Yi(" "),Yi("\f"),Yi(`
`),Yi("\r"),Yi("	"),Yi("\v"),Yi("	"),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi(" "),Yi("\u2028"),Yi("\u2029"),Yi(" "),Yi(" "),Yi(" "),Yi("\uFEFF")],l5=/[0-9a-fA-F]/,Yp=/[0-9]/,zd=/[1-9]/;class Gu{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(X){this.idx=X.idx,this.input=X.input,this.groupIdx=X.groupIdx}pattern(X){this.idx=0,this.input=X,this.groupIdx=0,this.consumeChar("/");const me=this.disjunction();this.consumeChar("/");const He={type:"Flags",loc:{begin:this.idx,end:X.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Df(He,"global");break;case"i":Df(He,"ignoreCase");break;case"m":Df(He,"multiLine");break;case"u":Df(He,"unicode");break;case"y":Df(He,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:He,value:me,loc:this.loc(0)}}disjunction(){const X=[],me=this.idx;for(X.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),X.push(this.alternative());return{type:"Disjunction",value:X,loc:this.loc(me)}}alternative(){const X=[],me=this.idx;for(;this.isTerm();)X.push(this.term());return{type:"Alternative",value:X,loc:this.loc(me)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const X=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(X)};case"$":return{type:"EndAnchor",loc:this.loc(X)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(X)};case"B":return{type:"NonWordBoundary",loc:this.loc(X)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let me;switch(this.popChar()){case"=":me="Lookahead";break;case"!":me="NegativeLookahead";break}M1(me);const He=this.disjunction();return this.consumeChar(")"),{type:me,value:He,loc:this.loc(X)}}return ul()}quantifier(X=!1){let me;const He=this.idx;switch(this.popChar()){case"*":me={atLeast:0,atMost:1/0};break;case"+":me={atLeast:1,atMost:1/0};break;case"?":me={atLeast:0,atMost:1};break;case"{":const We=this.integerIncludingZero();switch(this.popChar()){case"}":me={atLeast:We,atMost:We};break;case",":let ft;this.isDigit()?(ft=this.integerIncludingZero(),me={atLeast:We,atMost:ft}):me={atLeast:We,atMost:1/0},this.consumeChar("}");break}if(X===!0&&me===void 0)return;M1(me);break}if(!(X===!0&&me===void 0)&&M1(me))return this.peekChar(0)==="?"?(this.consumeChar("?"),me.greedy=!1):me.greedy=!0,me.type="Quantifier",me.loc=this.loc(He),me}atom(){let X;const me=this.idx;switch(this.peekChar()){case".":X=this.dotAll();break;case"\\":X=this.atomEscape();break;case"[":X=this.characterClass();break;case"(":X=this.group();break}if(X===void 0&&this.isPatternCharacter()&&(X=this.patternCharacter()),M1(X))return X.loc=this.loc(me),this.isQuantifier()&&(X.quantifier=this.quantifier()),X}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Yi(`
`),Yi("\r"),Yi("\u2028"),Yi("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let X,me=!1;switch(this.popChar()){case"d":X=yg;break;case"D":X=yg,me=!0;break;case"s":X=D1;break;case"S":X=D1,me=!0;break;case"w":X=ss;break;case"W":X=ss,me=!0;break}if(M1(X))return{type:"Set",value:X,complement:me}}controlEscapeAtom(){let X;switch(this.popChar()){case"f":X=Yi("\f");break;case"n":X=Yi(`
`);break;case"r":X=Yi("\r");break;case"t":X=Yi("	");break;case"v":X=Yi("\v");break}if(M1(X))return{type:"Character",value:X}}controlLetterEscapeAtom(){this.consumeChar("c");const X=this.popChar();if(/[a-zA-Z]/.test(X)===!1)throw Error("Invalid ");return{type:"Character",value:X.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Yi("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const X=this.popChar();return{type:"Character",value:Yi(X)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const X=this.popChar();return{type:"Character",value:Yi(X)}}}characterClass(){const X=[];let me=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),me=!0);this.isClassAtom();){const He=this.classAtom();if(He.type,Iu(He)&&this.isRangeDash()){this.consumeChar("-");const We=this.classAtom();if(We.type,Iu(We)){if(We.value<He.value)throw Error("Range out of order in character class");X.push({from:He.value,to:We.value})}else c5(He.value,X),X.push(Yi("-")),c5(We.value,X)}else c5(He.value,X)}return this.consumeChar("]"),{type:"Set",complement:me,value:X}}classAtom(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Yi("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let X=!0;this.consumeChar("("),this.peekChar(0)==="?"?(this.consumeChar("?"),this.consumeChar(":"),X=!1):this.groupIdx++;const me=this.disjunction();this.consumeChar(")");const He={type:"Group",capturing:X,value:me};return X&&(He.idx=this.groupIdx),He}positiveInteger(){let X=this.popChar();if(zd.test(X)===!1)throw Error("Expecting a positive integer");for(;Yp.test(this.peekChar(0));)X+=this.popChar();return parseInt(X,10)}integerIncludingZero(){let X=this.popChar();if(Yp.test(X)===!1)throw Error("Expecting an integer");for(;Yp.test(this.peekChar(0));)X+=this.popChar();return parseInt(X,10)}patternCharacter(){const X=this.popChar();switch(X){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Yi(X)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Yp.test(this.peekChar(0))}isClassAtom(X=0){switch(this.peekChar(X)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){const X=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(X)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(X){let me="";for(let We=0;We<X;We++){const ft=this.popChar();if(l5.test(ft)===!1)throw Error("Expecting a HexDecimal digits");me+=ft}return{type:"Character",value:parseInt(me,16)}}peekChar(X=0){return this.input[this.idx+X]}popChar(){const X=this.peekChar(0);return this.consumeChar(void 0),X}consumeChar(X){if(X!==void 0&&this.input[this.idx]!==X)throw Error("Expected: '"+X+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(X){return{begin:X,end:this.idx}}}class Nf{visitChildren(X){for(const me in X){const He=X[me];X.hasOwnProperty(me)&&(He.type!==void 0?this.visit(He):Array.isArray(He)&&He.forEach(We=>{this.visit(We)},this))}}visit(X){switch(X.type){case"Pattern":this.visitPattern(X);break;case"Flags":this.visitFlags(X);break;case"Disjunction":this.visitDisjunction(X);break;case"Alternative":this.visitAlternative(X);break;case"StartAnchor":this.visitStartAnchor(X);break;case"EndAnchor":this.visitEndAnchor(X);break;case"WordBoundary":this.visitWordBoundary(X);break;case"NonWordBoundary":this.visitNonWordBoundary(X);break;case"Lookahead":this.visitLookahead(X);break;case"NegativeLookahead":this.visitNegativeLookahead(X);break;case"Character":this.visitCharacter(X);break;case"Set":this.visitSet(X);break;case"Group":this.visitGroup(X);break;case"GroupBackReference":this.visitGroupBackReference(X);break;case"Quantifier":this.visitQuantifier(X);break}this.visitChildren(X)}visitPattern(X){}visitFlags(X){}visitDisjunction(X){}visitAlternative(X){}visitStartAnchor(X){}visitEndAnchor(X){}visitWordBoundary(X){}visitNonWordBoundary(X){}visitLookahead(X){}visitNegativeLookahead(X){}visitCharacter(X){}visitSet(X){}visitGroup(X){}visitGroupBackReference(X){}visitQuantifier(X){}}let Fc={};const _a=new Gu;function fa(re){const X=re.toString();if(Fc.hasOwnProperty(X))return Fc[X];{const me=_a.pattern(X);return Fc[X]=me,me}}function zs(){Fc={}}const Rm="Complement Sets are not supported for first char optimization",j0=`Unable to use "first char" lexer optimizations:
`;function w_(re,X=!1){try{const me=fa(re);return $0(me.value,{},me.flags.ignoreCase)}catch(me){if(me.message===Rm)X&&jc(`${j0}	Unable to optimize: < ${re.toString()} >
	Complement Sets cannot be automatically optimized.
	This will disable the lexer's first char optimizations.
	See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let He="";X&&(He=`
	This will disable the lexer's first char optimizations.
	See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),E0(`${j0}
	Failed parsing: < ${re.toString()} >
	Using the @chevrotain/regexp-to-ast library
	Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+He)}}return[]}function $0(re,X,me){switch(re.type){case"Disjunction":for(let We=0;We<re.value.length;We++)$0(re.value[We],X,me);break;case"Alternative":const He=re.value;for(let We=0;We<He.length;We++){const ft=He[We];switch(ft.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const wt=ft;switch(wt.type){case"Character":N1(wt.value,X,me);break;case"Set":if(wt.complement===!0)throw Error(Rm);zr(wt.value,en=>{if(typeof en=="number")N1(en,X,me);else{const In=en;if(me===!0)for(let po=In.from;po<=In.to;po++)N1(po,X,me);else{for(let po=In.from;po<=In.to&&po<Zr;po++)N1(po,X,me);if(In.to>=Zr){const po=In.from>=Zr?In.from:Zr,wo=In.to,ci=l0(po),Hi=l0(wo);for(let pr=ci;pr<=Hi;pr++)X[pr]=pr}}}});break;case"Group":$0(wt.value,X,me);break;default:throw Error("Non Exhaustive Match")}const zt=wt.quantifier!==void 0&&wt.quantifier.atLeast===0;if(wt.type==="Group"&&Kp(wt)===!1||wt.type!=="Group"&&zt===!1)break}break;default:throw Error("non exhaustive match!")}return Wc(X)}function N1(re,X,me){const He=l0(re);X[He]=He,me===!0&&Up(re,X)}function Up(re,X){const me=String.fromCharCode(re),He=me.toUpperCase();if(He!==me){const We=l0(He.charCodeAt(0));X[We]=We}else{const We=me.toLowerCase();if(We!==me){const ft=l0(We.charCodeAt(0));X[ft]=ft}}}function GA(re,X){return cp(re.value,me=>{if(typeof me=="number")return A0(X,me);{const He=me;return cp(X,We=>He.from<=We&&We<=He.to)!==void 0}})}function Kp(re){const X=re.quantifier;return X&&X.atLeast===0?!0:re.value?B(re.value)?Bh(re.value,Kp):Kp(re.value):!1}class S0 extends Nf{constructor(X){super(),this.targetCharCodes=X,this.found=!1}visitChildren(X){if(this.found!==!0){switch(X.type){case"Lookahead":this.visitLookahead(X);return;case"NegativeLookahead":this.visitNegativeLookahead(X);return}super.visitChildren(X)}}visitCharacter(X){A0(this.targetCharCodes,X.value)&&(this.found=!0)}visitSet(X){X.complement?GA(X,this.targetCharCodes)===void 0&&(this.found=!0):GA(X,this.targetCharCodes)!==void 0&&(this.found=!0)}}function u5(re,X){if(X instanceof RegExp){const me=fa(X),He=new S0(re);return He.visit(me),He.found}else return cp(X,me=>A0(re,me.charCodeAt(0)))!==void 0}const jI="PATTERN",vh="defaultMode",R1="modes";let Cu=typeof new RegExp("(?:)").sticky=="boolean";function N4(re,X){X=o5(X,{useSticky:Cu,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:(Wi,Mi)=>Mi()});const me=X.tracer;me("initCharCodeToOptimizedIndexMap",()=>{k1()});let He;me("Reject Lexer.NA",()=>{He=Ig(re,Wi=>Wi[jI]===yu.NA)});let We=!1,ft;me("Transform Patterns",()=>{We=!1,ft=Gi(He,Wi=>{const Mi=Wi[jI];if(yc(Mi)){const Gr=Mi.source;return Gr.length===1&&Gr!=="^"&&Gr!=="$"&&Gr!=="."&&!Mi.ignoreCase?Gr:Gr.length===2&&Gr[0]==="\\"&&!A0(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],Gr[1])?Gr[1]:X.useSticky?$I(Mi):xg(Mi)}else{if(ye(Mi))return We=!0,{exec:Mi};if(typeof Mi=="object")return We=!0,Mi;if(typeof Mi=="string"){if(Mi.length===1)return Mi;{const Gr=Mi.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),Bc=new RegExp(Gr);return X.useSticky?$I(Bc):xg(Bc)}}else throw Error("non exhaustive match")}})});let wt,zt,en,In,po;me("misc mapping",()=>{wt=Gi(He,Wi=>Wi.tokenTypeIdx),zt=Gi(He,Wi=>{const Mi=Wi.GROUP;if(Mi!==yu.SKIPPED){if(Al(Mi))return Mi;if(cs(Mi))return!1;throw Error("non exhaustive match")}}),en=Gi(He,Wi=>{const Mi=Wi.LONGER_ALT;if(Mi)return B(Mi)?Gi(Mi,Bc=>Mm(He,Bc)):[Mm(He,Mi)]}),In=Gi(He,Wi=>Wi.PUSH_MODE),po=Gi(He,Wi=>ai(Wi,"POP_MODE"))});let wo;me("Line Terminator Handling",()=>{const Wi=gA(X.lineTerminatorCharacters);wo=Gi(He,Mi=>!1),X.positionTracking!=="onlyOffset"&&(wo=Gi(He,Mi=>ai(Mi,"LINE_BREAKS")?!!Mi.LINE_BREAKS:qI(Mi,Wi)===!1&&u5(Wi,Mi.PATTERN)))});let ci,Hi,pr,Wr;me("Misc Mapping #2",()=>{ci=Gi(He,K2),Hi=Gi(ft,ty),pr=_u(He,(Wi,Mi)=>{const Gr=Mi.GROUP;return Al(Gr)&&Gr!==yu.SKIPPED&&(Wi[Gr]=[]),Wi},{}),Wr=Gi(ft,(Wi,Mi)=>({pattern:ft[Mi],longerAlt:en[Mi],canLineTerminator:wo[Mi],isCustom:ci[Mi],short:Hi[Mi],group:zt[Mi],push:In[Mi],pop:po[Mi],tokenTypeIdx:wt[Mi],tokenType:He[Mi]}))});let Ca=!0,rr=[];return X.safeMode||me("First Char Optimization",()=>{rr=_u(He,(Wi,Mi,Gr)=>{if(typeof Mi.PATTERN=="string"){const Bc=Mi.PATTERN.charCodeAt(0),qp=l0(Bc);Us(Wi,qp,Wr[Gr])}else if(B(Mi.START_CHARS_HINT)){let Bc;zr(Mi.START_CHARS_HINT,qp=>{const T_=typeof qp=="string"?qp.charCodeAt(0):qp,ly=l0(T_);Bc!==ly&&(Bc=ly,Us(Wi,ly,Wr[Gr]))})}else if(yc(Mi.PATTERN))if(Mi.PATTERN.unicode)Ca=!1,X.ensureOptimizations&&E0(`${j0}	Unable to analyze < ${Mi.PATTERN.toString()} > pattern.
	The regexp unicode flag is not currently supported by the regexp-to-ast library.
	This will disable the lexer's first char optimizations.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const Bc=w_(Mi.PATTERN,X.ensureOptimizations);RA(Bc)&&(Ca=!1),zr(Bc,qp=>{Us(Wi,qp,Wr[Gr])})}else X.ensureOptimizations&&E0(`${j0}	TokenType: <${Mi.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
	This will disable the lexer's first char optimizations.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),Ca=!1;return Wi},[])}),{emptyGroups:pr,patternIdxToConfig:Wr,charCodeToPatternIdxToConfig:rr,hasCustom:We,canBeOptimized:Ca}}function Vp(re,X){let me=[];const He=xs(re);me=me.concat(He.errors);const We=Lc(He.valid),ft=We.valid;return me=me.concat(We.errors),me=me.concat(Rf(ft)),me=me.concat(Tf(ft)),me=me.concat(Pa(ft,X)),me=me.concat(qc(ft)),me}function Rf(re){let X=[];const me=mu(re,He=>yc(He[jI]));return X=X.concat(Ja(me)),X=X.concat(qg(me)),X=X.concat(gl(me)),X=X.concat(y3(me)),X=X.concat(Ps(me)),X}function xs(re){const X=mu(re,We=>!ai(We,jI)),me=Gi(X,We=>({message:"Token Type: ->"+We.name+"<- missing static 'PATTERN' property",type:us.MISSING_PATTERN,tokenTypes:[We]})),He=L2(re,X);return{errors:me,valid:He}}function Lc(re){const X=mu(re,We=>{const ft=We[jI];return!yc(ft)&&!ye(ft)&&!ai(ft,"exec")&&!Al(ft)}),me=Gi(X,We=>({message:"Token Type: ->"+We.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:us.INVALID_PATTERN,tokenTypes:[We]})),He=L2(re,X);return{errors:me,valid:He}}const Ha=/[^\\][$]/;function Ja(re){class X extends Nf{constructor(){super(...arguments),this.found=!1}visitEndAnchor(ft){this.found=!0}}const me=mu(re,We=>{const ft=We.PATTERN;try{const wt=fa(ft),zt=new X;return zt.visit(wt),zt.found}catch{return Ha.test(ft.source)}});return Gi(me,We=>({message:`Unexpected RegExp Anchor Error:
	Token Type: ->`+We.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
	See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.`,type:us.EOI_ANCHOR_FOUND,tokenTypes:[We]}))}function Ps(re){const X=mu(re,He=>He.PATTERN.test(""));return Gi(X,He=>({message:"Token Type: ->"+He.name+"<- static 'PATTERN' must not match an empty string",type:us.EMPTY_MATCH_PATTERN,tokenTypes:[He]}))}const wh=/[^\\[][\^]|^\^/;function qg(re){class X extends Nf{constructor(){super(...arguments),this.found=!1}visitStartAnchor(ft){this.found=!0}}const me=mu(re,We=>{const ft=We.PATTERN;try{const wt=fa(ft),zt=new X;return zt.visit(wt),zt.found}catch{return wh.test(ft.source)}});return Gi(me,We=>({message:`Unexpected RegExp Anchor Error:
	Token Type: ->`+We.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
	See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS	for details.`,type:us.SOI_ANCHOR_FOUND,tokenTypes:[We]}))}function gl(re){const X=mu(re,He=>{const We=He[jI];return We instanceof RegExp&&(We.multiline||We.global)});return Gi(X,He=>({message:"Token Type: ->"+He.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:us.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[He]}))}function y3(re){const X=[];let me=Gi(re,ft=>_u(re,(wt,zt)=>(ft.PATTERN.source===zt.PATTERN.source&&!A0(X,zt)&&zt.PATTERN!==yu.NA&&(X.push(zt),wt.push(zt)),wt),[]));me=zg(me);const He=mu(me,ft=>ft.length>1);return Gi(He,ft=>{const wt=Gi(ft,en=>en.name);return{message:`The same RegExp pattern ->${Jc(ft).PATTERN}<-has been used in all of the following Token Types: ${wt.join(", ")} <-`,type:us.DUPLICATE_PATTERNS_FOUND,tokenTypes:ft}})}function Tf(re){const X=mu(re,He=>{if(!ai(He,"GROUP"))return!1;const We=He.GROUP;return We!==yu.SKIPPED&&We!==yu.NA&&!Al(We)});return Gi(X,He=>({message:"Token Type: ->"+He.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:us.INVALID_GROUP_TYPE_FOUND,tokenTypes:[He]}))}function Pa(re,X){const me=mu(re,We=>We.PUSH_MODE!==void 0&&!A0(X,We.PUSH_MODE));return Gi(me,We=>({message:`Token Type: ->${We.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${We.PUSH_MODE}<-which does not exist`,type:us.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[We]}))}function qc(re){const X=[],me=_u(re,(He,We,ft)=>{const wt=We.PATTERN;return wt===yu.NA||(Al(wt)?He.push({str:wt,idx:ft,tokenType:We}):yc(wt)&&xc(wt)&&He.push({str:wt.source,idx:ft,tokenType:We})),He},[]);return zr(re,(He,We)=>{zr(me,({str:ft,idx:wt,tokenType:zt})=>{if(We<wt&&Yu(ft,He.PATTERN)){const en=`Token: ->${zt.name}<- can never be matched.
Because it appears AFTER the Token Type ->${He.name}<-in the lexer's definition.
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;X.push({message:en,type:us.UNREACHABLE_PATTERN,tokenTypes:[He,zt]})}})}),X}function Yu(re,X){if(yc(X)){const me=X.exec(re);return me!==null&&me.index===0}else{if(ye(X))return X(re,0,[],{});if(ai(X,"exec"))return X.exec(re,0,[],{});if(typeof X=="string")return X===re;throw Error("non exhaustive match")}}function xc(re){return cp([".","\\","[","]","|","^","$","(",")","?","*","+","{"],me=>re.source.indexOf(me)!==-1)===void 0}function xg(re){const X=re.ignoreCase?"i":"";return new RegExp(`^(?:${re.source})`,X)}function $I(re){const X=re.ignoreCase?"iy":"y";return new RegExp(`${re.source}`,X)}function T1(re,X,me){const He=[];return ai(re,vh)||He.push({message:"A MultiMode Lexer cannot be initialized without a <"+vh+`> property in its definition
`,type:us.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),ai(re,R1)||He.push({message:"A MultiMode Lexer cannot be initialized without a <"+R1+`> property in its definition
`,type:us.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),ai(re,R1)&&ai(re,vh)&&!ai(re.modes,re.defaultMode)&&He.push({message:`A MultiMode Lexer cannot be initialized with a ${vh}: <${re.defaultMode}>which does not exist
`,type:us.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),ai(re,R1)&&zr(re.modes,(We,ft)=>{zr(We,(wt,zt)=>{if(cs(wt))He.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${ft}> at index: <${zt}>
`,type:us.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(ai(wt,"LONGER_ALT")){const en=B(wt.LONGER_ALT)?wt.LONGER_ALT:[wt.LONGER_ALT];zr(en,In=>{!cs(In)&&!A0(We,In)&&He.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${In.name}> on token <${wt.name}> outside of mode <${ft}>
`,type:us.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),He}function Xg(re,X,me){const He=[];let We=!1;const ft=zg(hu(Wc(re.modes))),wt=Ig(ft,en=>en[jI]===yu.NA),zt=gA(me);return X&&zr(wt,en=>{const In=qI(en,zt);if(In!==!1){const wo={message:ls(en,In),type:In.issue,tokenType:en};He.push(wo)}else ai(en,"LINE_BREAKS")?en.LINE_BREAKS===!0&&(We=!0):u5(zt,en.PATTERN)&&(We=!0)}),X&&!We&&He.push({message:`Warning: No LINE_BREAKS Found.
	This Lexer has been defined to track line and column information,
	But none of the Token Types can be identified as matching a line terminator.
	See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS 
	for details.`,type:us.NO_LINE_BREAKS_FLAGS}),He}function U2(re){const X={},me=O0(re);return zr(me,He=>{const We=re[He];if(B(We))X[He]=[];else throw Error("non exhaustive match")}),X}function K2(re){const X=re.PATTERN;if(yc(X))return!1;if(ye(X))return!0;if(ai(X,"exec"))return!0;if(Al(X))return!1;throw Error("non exhaustive match")}function ty(re){return Al(re)&&re.length===1?re.charCodeAt(0):!1}const kf={test:function(re){const X=re.length;for(let me=this.lastIndex;me<X;me++){const He=re.charCodeAt(me);if(He===10)return this.lastIndex=me+1,!0;if(He===13)return re.charCodeAt(me+1)===10?this.lastIndex=me+2:this.lastIndex=me+1,!0}return!1},lastIndex:0};function qI(re,X){if(ai(re,"LINE_BREAKS"))return!1;if(yc(re.PATTERN)){try{u5(X,re.PATTERN)}catch(me){return{issue:us.IDENTIFY_TERMINATOR,errMsg:me.message}}return!1}else{if(Al(re.PATTERN))return!1;if(K2(re))return{issue:us.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function ls(re,X){if(X.issue===us.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
	The problem is in the <${re.name}> Token Type
	 Root cause: ${X.errMsg}.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(X.issue===us.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
	The problem is in the <${re.name}> Token Type
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function gA(re){return Gi(re,me=>Al(me)?me.charCodeAt(0):me)}function Us(re,X,me){re[X]===void 0?re[X]=[me]:re[X].push(me)}const Zr=256;let os=[];function l0(re){return re<Zr?re:os[re]}function k1(){if(RA(os)){os=new Array(65536);for(let re=0;re<65536;re++)os[re]=re>255?255+~~(re/255):re}}function Ph(re,X){const me=re.tokenTypeIdx;return me===X.tokenTypeIdx?!0:X.isParent===!0&&X.categoryMatchesMap[me]===!0}function XI(re,X){return re.tokenTypeIdx===X.tokenTypeIdx}let dl=1;const hl={};function Sl(re){const X=Uu(re);zp(X),Jp(X),pl(X),zr(X,me=>{me.isParent=me.categoryMatches.length>0})}function Uu(re){let X=x0(re),me=re,He=!0;for(;He;){me=zg(hu(Gi(me,ft=>ft.CATEGORIES)));const We=L2(me,X);X=X.concat(We),RA(We)?He=!1:me=We}return X}function zp(re){zr(re,X=>{Vl(X)||(hl[dl]=X,X.tokenTypeIdx=dl++),Mh(X)&&!B(X.CATEGORIES)&&(X.CATEGORIES=[X.CATEGORIES]),Mh(X)||(X.CATEGORIES=[]),ny(X)||(X.categoryMatches=[]),x3(X)||(X.categoryMatchesMap={})})}function pl(re){zr(re,X=>{X.categoryMatches=[],zr(X.categoryMatchesMap,(me,He)=>{X.categoryMatches.push(hl[He].tokenTypeIdx)})})}function Jp(re){zr(re,X=>{P_([],X)})}function P_(re,X){zr(re,me=>{X.categoryMatchesMap[me.tokenTypeIdx]=!0}),zr(X.CATEGORIES,me=>{const He=re.concat(X);A0(He,me)||P_(He,me)})}function Vl(re){return ai(re,"tokenTypeIdx")}function Mh(re){return ai(re,"CATEGORIES")}function ny(re){return ai(re,"categoryMatches")}function x3(re){return ai(re,"categoryMatchesMap")}function F1(re){return ai(re,"tokenTypeIdx")}const Wp={buildUnableToPopLexerModeMessage(re){return`Unable to pop Lexer Mode after encountering Token ->${re.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(re,X,me,He,We){return`unexpected character: ->${re.charAt(X)}<- at offset: ${X}, skipped ${me} characters.`}};var us;(function(re){re[re.MISSING_PATTERN=0]="MISSING_PATTERN",re[re.INVALID_PATTERN=1]="INVALID_PATTERN",re[re.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",re[re.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",re[re.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",re[re.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",re[re.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",re[re.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",re[re.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",re[re.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",re[re.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",re[re.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",re[re.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",re[re.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",re[re.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",re[re.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",re[re.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",re[re.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(us||(us={}));const Jd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Wp,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Jd);class yu{constructor(X,me=Jd){if(this.lexerDefinition=X,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(We,ft)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const wt=new Array(this.traceInitIndent+1).join("	");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${wt}--> <${We}>`);const{time:zt,value:en}=cl(ft),In=zt>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&In(`${wt}<-- <${We}> time: ${zt}ms`),this.traceInitIndent--,en}else return ft()},typeof me=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
a boolean 2nd argument is no longer supported`);this.config=tr({},Jd,me);const He=this.config.traceInitPerf;He===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof He=="number"&&(this.traceInitMaxIdent=He,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let We,ft=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Jd.lineTerminatorsPattern)this.config.lineTerminatorsPattern=kf;else if(this.config.lineTerminatorCharacters===Jd.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(me.safeMode&&me.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),B(X)?We={modes:{defaultMode:x0(X)},defaultMode:vh}:(ft=!1,We=x0(X))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(T1(We,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Xg(We,this.trackStartLines,this.config.lineTerminatorCharacters))})),We.modes=We.modes?We.modes:{},zr(We.modes,(zt,en)=>{We.modes[en]=Ig(zt,In=>cs(In))});const wt=O0(We.modes);if(zr(We.modes,(zt,en)=>{this.TRACE_INIT(`Mode: <${en}> processing`,()=>{if(this.modes.push(en),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Vp(zt,wt))}),RA(this.lexerDefinitionErrors)){Sl(zt);let In;this.TRACE_INIT("analyzeTokenTypes",()=>{In=N4(zt,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:me.positionTracking,ensureOptimizations:me.ensureOptimizations,safeMode:me.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[en]=In.patternIdxToConfig,this.charCodeToPatternIdxToConfig[en]=In.charCodeToPatternIdxToConfig,this.emptyGroups=tr({},this.emptyGroups,In.emptyGroups),this.hasCustom=In.hasCustom||this.hasCustom,this.canModeBeOptimized[en]=In.canBeOptimized}})}),this.defaultMode=We.defaultMode,!RA(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const en=Gi(this.lexerDefinitionErrors,In=>In.message).join(`-----------------------
`);throw new Error(`Errors detected in definition of Lexer:
`+en)}zr(this.lexerDefinitionWarning,zt=>{jc(zt.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Cu?(this.chopInput=ge,this.match=this.matchWithTest):(this.updateLastIndex=Yt,this.match=this.matchWithExec),ft&&(this.handleModes=Yt),this.trackStartLines===!1&&(this.computeNewColumn=ge),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Yt),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const zt=_u(this.canModeBeOptimized,(en,In,po)=>(In===!1&&en.push(po),en),[]);if(me.ensureOptimizations&&!RA(zt))throw Error(`Lexer Modes: < ${zt.join(", ")} > cannot be optimized.
	 Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
	 Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{zs()}),this.TRACE_INIT("toFastProperties",()=>{Ou(this)})})}tokenize(X,me=this.defaultMode){if(!RA(this.lexerDefinitionErrors)){const We=Gi(this.lexerDefinitionErrors,ft=>ft.message).join(`-----------------------
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
`+We)}return this.tokenizeInternal(X,me)}tokenizeInternal(X,me){let He,We,ft,wt,zt,en,In,po,wo,ci,Hi,pr,Wr,Ca,rr;const Wi=X,Mi=Wi.length;let Gr=0,Bc=0;const qp=this.hasCustom?0:Math.floor(X.length/10),T_=new Array(qp),ly=[];let K1=this.trackStartLines?1:void 0,uy=this.trackStartLines?1:void 0;const Lm=U2(this.emptyGroups),gy=this.trackStartLines,rC=this.config.lineTerminatorsPattern;let dy=0,vr=[],sC=[];const D=[],H=[];Object.freeze(H);let z;function se(){return vr}function xe(Pn){const Zn=l0(Pn),Qo=sC[Zn];return Qo===void 0?H:Qo}const Fe=Pn=>{if(D.length===1&&Pn.tokenType.PUSH_MODE===void 0){const Zn=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Pn);ly.push({offset:Pn.startOffset,line:Pn.startLine,column:Pn.startColumn,length:Pn.image.length,message:Zn})}else{D.pop();const Zn=GI(D);vr=this.patternIdxToConfig[Zn],sC=this.charCodeToPatternIdxToConfig[Zn],dy=vr.length;const Qo=this.canModeBeOptimized[Zn]&&this.config.safeMode===!1;sC&&Qo?z=xe:z=se}};function pt(Pn){D.push(Pn),sC=this.charCodeToPatternIdxToConfig[Pn],vr=this.patternIdxToConfig[Pn],dy=vr.length,dy=vr.length;const Zn=this.canModeBeOptimized[Pn]&&this.config.safeMode===!1;sC&&Zn?z=xe:z=se}pt.call(this,me);let St;const on=this.config.recoveryEnabled;for(;Gr<Mi;){en=null;const Pn=Wi.charCodeAt(Gr),Zn=z(Pn),Qo=Zn.length;for(He=0;He<Qo;He++){St=Zn[He];const Gn=St.pattern;In=null;const jn=St.short;if(jn!==!1?Pn===jn&&(en=Gn):St.isCustom===!0?(rr=Gn.exec(Wi,Gr,T_,Lm),rr!==null?(en=rr[0],rr.payload!==void 0&&(In=rr.payload)):en=null):(this.updateLastIndex(Gn,Gr),en=this.match(Gn,X,Gr)),en!==null){if(zt=St.longerAlt,zt!==void 0){const wr=zt.length;for(ft=0;ft<wr;ft++){const br=vr[zt[ft]],tA=br.pattern;if(po=null,br.isCustom===!0?(rr=tA.exec(Wi,Gr,T_,Lm),rr!==null?(wt=rr[0],rr.payload!==void 0&&(po=rr.payload)):wt=null):(this.updateLastIndex(tA,Gr),wt=this.match(tA,X,Gr)),wt&&wt.length>en.length){en=wt,In=po,St=br;break}}}break}}if(en!==null){if(wo=en.length,ci=St.group,ci!==void 0&&(Hi=St.tokenTypeIdx,pr=this.createTokenInstance(en,Gr,Hi,St.tokenType,K1,uy,wo),this.handlePayload(pr,In),ci===!1?Bc=this.addToken(T_,Bc,pr):Lm[ci].push(pr)),X=this.chopInput(X,wo),Gr=Gr+wo,uy=this.computeNewColumn(uy,wo),gy===!0&&St.canLineTerminator===!0){let Gn=0,jn,wr;rC.lastIndex=0;do jn=rC.test(en),jn===!0&&(wr=rC.lastIndex-1,Gn++);while(jn===!0);Gn!==0&&(K1=K1+Gn,uy=wo-wr,this.updateTokenEndLineColumnLocation(pr,ci,wr,Gn,K1,uy,wo))}this.handleModes(St,Fe,pt,pr)}else{const Gn=Gr,jn=K1,wr=uy;let br=on===!1;for(;br===!1&&Gr<Mi;)for(X=this.chopInput(X,1),Gr++,We=0;We<dy;We++){const tA=vr[We],Mn=tA.pattern,Cn=tA.short;if(Cn!==!1?Wi.charCodeAt(Gr)===Cn&&(br=!0):tA.isCustom===!0?br=Mn.exec(Wi,Gr,T_,Lm)!==null:(this.updateLastIndex(Mn,Gr),br=Mn.exec(X)!==null),br===!0)break}if(Wr=Gr-Gn,uy=this.computeNewColumn(uy,Wr),Ca=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(Wi,Gn,Wr,jn,wr),ly.push({offset:Gn,line:jn,column:wr,length:Wr,message:Ca}),on===!1)break}}return this.hasCustom||(T_.length=Bc),{tokens:T_,groups:Lm,errors:ly}}handleModes(X,me,He,We){if(X.pop===!0){const ft=X.push;me(We),ft!==void 0&&He.call(this,ft)}else X.push!==void 0&&He.call(this,X.push)}chopInput(X,me){return X.substring(me)}updateLastIndex(X,me){X.lastIndex=me}updateTokenEndLineColumnLocation(X,me,He,We,ft,wt,zt){let en,In;me!==void 0&&(en=He===zt-1,In=en?-1:0,We===1&&en===!0||(X.endLine=ft+In,X.endColumn=wt-1+-In))}computeNewColumn(X,me){return X+me}createOffsetOnlyToken(X,me,He,We){return{image:X,startOffset:me,tokenTypeIdx:He,tokenType:We}}createStartOnlyToken(X,me,He,We,ft,wt){return{image:X,startOffset:me,startLine:ft,startColumn:wt,tokenTypeIdx:He,tokenType:We}}createFullToken(X,me,He,We,ft,wt,zt){return{image:X,startOffset:me,endOffset:me+zt-1,startLine:ft,endLine:ft,startColumn:wt,endColumn:wt+zt-1,tokenTypeIdx:He,tokenType:We}}addTokenUsingPush(X,me,He){return X.push(He),me}addTokenUsingMemberAccess(X,me,He){return X[me]=He,me++,me}handlePayloadNoCustom(X,me){}handlePayloadWithCustom(X,me){me!==null&&(X.payload=me)}matchWithTest(X,me,He){return X.test(me)===!0?me.substring(He,X.lastIndex):null}matchWithExec(X,me){const He=X.exec(me);return He!==null?He[0]:null}}yu.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",yu.NA=/NOT_APPLICABLE/;function Dh(re){return V2(re)?re.LABEL:re.name}function V2(re){return Al(re.LABEL)&&re.LABEL!==""}const g5="parent",oy="categories",up="label",Ku="group",G="push_mode",V="pop_mode",Ae="longer_alt",Be="line_breaks",Oe="start_chars_hint";function Je(re){return Tt(re)}function Tt(re){const X=re.pattern,me={};if(me.name=re.name,cs(X)||(me.PATTERN=X),ai(re,g5))throw`The parent property is no longer supported.
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return ai(re,oy)&&(me.CATEGORIES=re[oy]),Sl([me]),ai(re,up)&&(me.LABEL=re[up]),ai(re,Ku)&&(me.GROUP=re[Ku]),ai(re,V)&&(me.POP_MODE=re[V]),ai(re,G)&&(me.PUSH_MODE=re[G]),ai(re,Ae)&&(me.LONGER_ALT=re[Ae]),ai(re,Be)&&(me.LINE_BREAKS=re[Be]),ai(re,Oe)&&(me.START_CHARS_HINT=re[Oe]),me}const ln=Je({name:"EOF",pattern:yu.NA});Sl([ln]);function wn(re,X,me,He,We,ft,wt,zt){return{image:X,startOffset:me,endOffset:He,startLine:We,endLine:ft,startColumn:wt,endColumn:zt,tokenTypeIdx:re.tokenTypeIdx,tokenType:re}}function $o(re,X){return Ph(re,X)}const Ai={buildMismatchTokenMessage({expected:re,actual:X,previous:me,ruleName:He}){return`Expecting ${V2(re)?`--> ${Dh(re)} <--`:`token of type --> ${re.name} <--`} but found --> '${X.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:re,ruleName:X}){return"Redundant input, expecting EOF but found: "+re.image},buildNoViableAltMessage({expectedPathsPerAlt:re,actual:X,previous:me,customUserDescription:He,ruleName:We}){const ft="Expecting: ",zt=`
but found: '`+Jc(X).image+"'";if(He)return ft+He+zt;{const en=_u(re,(ci,Hi)=>ci.concat(Hi),[]),In=Gi(en,ci=>`[${Gi(ci,Hi=>Dh(Hi)).join(", ")}]`),wo=`one of these possible Token sequences:
${Gi(In,(ci,Hi)=>`  ${Hi+1}. ${ci}`).join(`
`)}`;return ft+wo+zt}},buildEarlyExitMessage({expectedIterationPaths:re,actual:X,customUserDescription:me,ruleName:He}){const We="Expecting: ",wt=`
but found: '`+Jc(X).image+"'";if(me)return We+me+wt;{const en=`expecting at least one iteration which starts with one of these possible Token sequences::
  <${Gi(re,In=>`[${Gi(In,po=>Dh(po)).join(",")}]`).join(" ,")}>`;return We+en+wt}}};Object.freeze(Ai);const Qi={buildRuleNotFoundError(re,X){return"Invalid grammar, reference to a rule which is not defined: ->"+X.nonTerminalName+`<-
inside top level rule: ->`+re.name+"<-"}},Ni={buildDuplicateFoundError(re,X){function me(po){return po instanceof $c?po.terminalType.name:po instanceof za?po.nonTerminalName:""}const He=re.name,We=Jc(X),ft=We.idx,wt=b0(We),zt=me(We),en=ft>0;let In=`->${wt}${en?ft:""}<- ${zt?`with argument: ->${zt}<-`:""}
                  appears more than once (${X.length} times) in the top level rule: ->${He}<-.                  
                  For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES 
                  `;return In=In.replace(/[ \t]+/g," "),In=In.replace(/\s\s+/g,`
`),In},buildNamespaceConflictError(re){return`Namespace conflict found in grammar.
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${re.name}>.
To resolve this make sure each Terminal and Non-Terminal names are unique
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(re){const X=Gi(re.prefixPath,We=>Dh(We)).join(", "),me=re.alternation.idx===0?"":re.alternation.idx;return`Ambiguous alternatives: <${re.ambiguityIndices.join(" ,")}> due to common lookahead prefix
in <OR${me}> inside <${re.topLevelRule.name}> Rule,
<${X}> may appears as a prefix path in all these alternatives.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
For Further details.`},buildAlternationAmbiguityError(re){const X=Gi(re.prefixPath,We=>Dh(We)).join(", "),me=re.alternation.idx===0?"":re.alternation.idx;let He=`Ambiguous Alternatives Detected: <${re.ambiguityIndices.join(" ,")}> in <OR${me}> inside <${re.topLevelRule.name}> Rule,
<${X}> may appears as a prefix path in all these alternatives.
`;return He=He+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`,He},buildEmptyRepetitionError(re){let X=b0(re.repetition);return re.repetition.idx!==0&&(X+=re.repetition.idx),`The repetition <${X}> within Rule <${re.topLevelRule.name}> can never consume any tokens.
This could lead to an infinite loop.`},buildTokenNameError(re){return"deprecated"},buildEmptyAlternationError(re){return`Ambiguous empty alternative: <${re.emptyChoiceIdx+1}> in <OR${re.alternation.idx}> inside <${re.topLevelRule.name}> Rule.
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(re){return`An Alternation cannot have more than 256 alternatives:
<OR${re.alternation.idx}> inside <${re.topLevelRule.name}> Rule.
 has ${re.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(re){const X=re.topLevelRule.name,me=Gi(re.leftRecursionPath,ft=>ft.name),He=`${X} --> ${me.concat([X]).join(" --> ")}`;return`Left Recursion found in grammar.
rule: <${X}> can be invoked from itself (directly or indirectly)
without consuming any Tokens. The grammar path that causes this is: 
 ${He}
 To fix this refactor your grammar to remove the left recursion.
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(re){return"deprecated"},buildDuplicateRuleNameError(re){let X;return re.topLevelRule instanceof $g?X=re.topLevelRule.name:X=re.topLevelRule,`Duplicate definition, rule: ->${X}<- is already defined in the grammar: ->${re.grammarName}<-`}};function Xs(re,X){const me=new jp(re,X);return me.resolveRefs(),me.errors}class jp extends VI{constructor(X,me){super(),this.nameToTopRule=X,this.errMsgProvider=me,this.errors=[]}resolveRefs(){zr(Wc(this.nameToTopRule),X=>{this.currTopLevel=X,X.accept(this)})}visitNonTerminal(X){const me=this.nameToTopRule[X.nonTerminalName];if(me)X.referencedRule=me;else{const He=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,X);this.errors.push({message:He,type:pp.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:X.nonTerminalName})}}}class L1 extends Mf{constructor(X,me){super(),this.topProd=X,this.path=me,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=x0(this.path.ruleStack).reverse(),this.occurrenceStack=x0(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(X,me=[]){this.found||super.walk(X,me)}walkProdRef(X,me,He){if(X.referencedRule.name===this.nextProductionName&&X.idx===this.nextProductionOccurrence){const We=me.concat(He);this.updateExpectedNext(),this.walk(X.referencedRule,We)}}updateExpectedNext(){RA(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Eg extends L1{constructor(X,me){super(X,me),this.path=me,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(X,me,He){if(this.isAtEndOfPath&&X.terminalType.name===this.nextTerminalName&&X.idx===this.nextTerminalOccurrence&&!this.found){const We=me.concat(He),ft=new Xa({definition:We});this.possibleTokTypes=Cg(ft),this.found=!0}}}class Yn extends Mf{constructor(X,me){super(),this.topRule=X,this.occurrence=me,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class Qn extends Yn{walkMany(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c&&(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkMany(X,me,He)}}class to extends Yn{walkManySep(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c&&(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkManySep(X,me,He)}}class zo extends Yn{walkAtLeastOne(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c&&(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkAtLeastOne(X,me,He)}}class Bi extends Yn{walkAtLeastOneSep(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c&&(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkAtLeastOneSep(X,me,He)}}function eA(re,X,me=[]){me=x0(me);let He=[],We=0;function ft(zt){return zt.concat(Hu(re,We+1))}function wt(zt){const en=eA(ft(zt),X,me);return He.concat(en)}for(;me.length<X&&We<re.length;){const zt=re[We];if(zt instanceof Xa)return wt(zt.definition);if(zt instanceof za)return wt(zt.definition);if(zt instanceof Za)He=wt(zt.definition);else if(zt instanceof Vs){const en=zt.definition.concat([new Si({definition:zt.definition})]);return wt(en)}else if(zt instanceof fu){const en=[new Xa({definition:zt.definition}),new Si({definition:[new $c({terminalType:zt.separator})].concat(zt.definition)})];return wt(en)}else if(zt instanceof lp){const en=zt.definition.concat([new Si({definition:[new $c({terminalType:zt.separator})].concat(zt.definition)})]);He=wt(en)}else if(zt instanceof Si){const en=zt.definition.concat([new Si({definition:zt.definition})]);He=wt(en)}else{if(zt instanceof c0)return zr(zt.definition,en=>{RA(en.definition)===!1&&(He=wt(en.definition))}),He;if(zt instanceof $c)me.push(zt.terminalType);else throw Error("non exhaustive match")}We++}return He.push({partialPath:me,suffixDef:Hu(re,We)}),He}function Or(re,X,me,He){const We="EXIT_NONE_TERMINAL",ft=[We],wt="EXIT_ALTERNATIVE";let zt=!1;const en=X.length,In=en-He-1,po=[],wo=[];for(wo.push({idx:-1,def:re,ruleStack:[],occurrenceStack:[]});!RA(wo);){const ci=wo.pop();if(ci===wt){zt&&GI(wo).idx<=In&&wo.pop();continue}const Hi=ci.def,pr=ci.idx,Wr=ci.ruleStack,Ca=ci.occurrenceStack;if(RA(Hi))continue;const rr=Hi[0];if(rr===We){const Wi={idx:pr,def:Hu(Hi),ruleStack:wm(Wr),occurrenceStack:wm(Ca)};wo.push(Wi)}else if(rr instanceof $c)if(pr<en-1){const Wi=pr+1,Mi=X[Wi];if(me(Mi,rr.terminalType)){const Gr={idx:Wi,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Gr)}}else if(pr===en-1)po.push({nextTokenType:rr.terminalType,nextTokenOccurrence:rr.idx,ruleStack:Wr,occurrenceStack:Ca}),zt=!0;else throw Error("non exhaustive match");else if(rr instanceof za){const Wi=x0(Wr);Wi.push(rr.nonTerminalName);const Mi=x0(Ca);Mi.push(rr.idx);const Gr={idx:pr,def:rr.definition.concat(ft,Hu(Hi)),ruleStack:Wi,occurrenceStack:Mi};wo.push(Gr)}else if(rr instanceof Za){const Wi={idx:pr,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Wi),wo.push(wt);const Mi={idx:pr,def:rr.definition.concat(Hu(Hi)),ruleStack:Wr,occurrenceStack:Ca};wo.push(Mi)}else if(rr instanceof Vs){const Wi=new Si({definition:rr.definition,idx:rr.idx}),Mi=rr.definition.concat([Wi],Hu(Hi)),Gr={idx:pr,def:Mi,ruleStack:Wr,occurrenceStack:Ca};wo.push(Gr)}else if(rr instanceof fu){const Wi=new $c({terminalType:rr.separator}),Mi=new Si({definition:[Wi].concat(rr.definition),idx:rr.idx}),Gr=rr.definition.concat([Mi],Hu(Hi)),Bc={idx:pr,def:Gr,ruleStack:Wr,occurrenceStack:Ca};wo.push(Bc)}else if(rr instanceof lp){const Wi={idx:pr,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Wi),wo.push(wt);const Mi=new $c({terminalType:rr.separator}),Gr=new Si({definition:[Mi].concat(rr.definition),idx:rr.idx}),Bc=rr.definition.concat([Gr],Hu(Hi)),qp={idx:pr,def:Bc,ruleStack:Wr,occurrenceStack:Ca};wo.push(qp)}else if(rr instanceof Si){const Wi={idx:pr,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Wi),wo.push(wt);const Mi=new Si({definition:rr.definition,idx:rr.idx}),Gr=rr.definition.concat([Mi],Hu(Hi)),Bc={idx:pr,def:Gr,ruleStack:Wr,occurrenceStack:Ca};wo.push(Bc)}else if(rr instanceof c0)for(let Wi=rr.definition.length-1;Wi>=0;Wi--){const Mi=rr.definition[Wi],Gr={idx:pr,def:Mi.definition.concat(Hu(Hi)),ruleStack:Wr,occurrenceStack:Ca};wo.push(Gr),wo.push(wt)}else if(rr instanceof Xa)wo.push({idx:pr,def:rr.definition.concat(Hu(Hi)),ruleStack:Wr,occurrenceStack:Ca});else if(rr instanceof $g)wo.push(Js(rr,pr,Wr,Ca));else throw Error("non exhaustive match")}return po}function Js(re,X,me,He){const We=x0(me);We.push(re.name);const ft=x0(He);return ft.push(1),{idx:X,def:re.definition,ruleStack:We,occurrenceStack:ft}}var Qs;(function(re){re[re.OPTION=0]="OPTION",re[re.REPETITION=1]="REPETITION",re[re.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",re[re.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",re[re.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",re[re.ALTERNATION=5]="ALTERNATION"})(Qs||(Qs={}));function Wa(re){if(re instanceof Za||re==="Option")return Qs.OPTION;if(re instanceof Si||re==="Repetition")return Qs.REPETITION;if(re instanceof Vs||re==="RepetitionMandatory")return Qs.REPETITION_MANDATORY;if(re instanceof fu||re==="RepetitionMandatoryWithSeparator")return Qs.REPETITION_MANDATORY_WITH_SEPARATOR;if(re instanceof lp||re==="RepetitionWithSeparator")return Qs.REPETITION_WITH_SEPARATOR;if(re instanceof c0||re==="Alternation")return Qs.ALTERNATION;throw Error("non exhaustive match")}function Bg(re,X,me,He,We,ft){const wt=Ff(re,X,me),zt=h5(wt)?XI:Ph;return ft(wt,He,zt,We)}function d5(re,X,me,He,We,ft){const wt=Wd(re,X,We,me),zt=h5(wt)?XI:Ph;return ft(wt[0],zt,He)}function E3(re,X,me,He){const We=re.length,ft=Bh(re,wt=>Bh(wt,zt=>zt.length===1));if(X)return function(wt){const zt=Gi(wt,en=>en.GATE);for(let en=0;en<We;en++){const In=re[en],po=In.length,wo=zt[en];if(!(wo!==void 0&&wo.call(this)===!1))e:for(let ci=0;ci<po;ci++){const Hi=In[ci],pr=Hi.length;for(let Wr=0;Wr<pr;Wr++){const Ca=this.LA(Wr+1);if(me(Ca,Hi[Wr])===!1)continue e}return en}}};if(ft&&!He){const wt=Gi(re,en=>hu(en)),zt=_u(wt,(en,In,po)=>(zr(In,wo=>{ai(en,wo.tokenTypeIdx)||(en[wo.tokenTypeIdx]=po),zr(wo.categoryMatches,ci=>{ai(en,ci)||(en[ci]=po)})}),en),{});return function(){const en=this.LA(1);return zt[en.tokenTypeIdx]}}else return function(){for(let wt=0;wt<We;wt++){const zt=re[wt],en=zt.length;e:for(let In=0;In<en;In++){const po=zt[In],wo=po.length;for(let ci=0;ci<wo;ci++){const Hi=this.LA(ci+1);if(me(Hi,po[ci])===!1)continue e}return wt}}}}function H1(re,X,me){const He=Bh(re,ft=>ft.length===1),We=re.length;if(He&&!me){const ft=hu(re);if(ft.length===1&&RA(ft[0].categoryMatches)){const zt=ft[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===zt}}else{const wt=_u(ft,(zt,en,In)=>(zt[en.tokenTypeIdx]=!0,zr(en.categoryMatches,po=>{zt[po]=!0}),zt),[]);return function(){const zt=this.LA(1);return wt[zt.tokenTypeIdx]===!0}}}else return function(){e:for(let ft=0;ft<We;ft++){const wt=re[ft],zt=wt.length;for(let en=0;en<zt;en++){const In=this.LA(en+1);if(X(In,wt[en])===!1)continue e}return!0}return!1}}class M_ extends Mf{constructor(X,me,He){super(),this.topProd=X,this.targetOccurrence=me,this.targetProdType=He}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(X,me,He,We){return X.idx===this.targetOccurrence&&this.targetProdType===me?(this.restDef=He.concat(We),!0):!1}walkOption(X,me,He){this.checkIsTarget(X,Qs.OPTION,me,He)||super.walkOption(X,me,He)}walkAtLeastOne(X,me,He){this.checkIsTarget(X,Qs.REPETITION_MANDATORY,me,He)||super.walkOption(X,me,He)}walkAtLeastOneSep(X,me,He){this.checkIsTarget(X,Qs.REPETITION_MANDATORY_WITH_SEPARATOR,me,He)||super.walkOption(X,me,He)}walkMany(X,me,He){this.checkIsTarget(X,Qs.REPETITION,me,He)||super.walkOption(X,me,He)}walkManySep(X,me,He){this.checkIsTarget(X,Qs.REPETITION_WITH_SEPARATOR,me,He)||super.walkOption(X,me,He)}}class gp extends VI{constructor(X,me,He){super(),this.targetOccurrence=X,this.targetProdType=me,this.targetRef=He,this.result=[]}checkIsTarget(X,me){X.idx===this.targetOccurrence&&this.targetProdType===me&&(this.targetRef===void 0||X===this.targetRef)&&(this.result=X.definition)}visitOption(X){this.checkIsTarget(X,Qs.OPTION)}visitRepetition(X){this.checkIsTarget(X,Qs.REPETITION)}visitRepetitionMandatory(X){this.checkIsTarget(X,Qs.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(X){this.checkIsTarget(X,Qs.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(X){this.checkIsTarget(X,Qs.REPETITION_WITH_SEPARATOR)}visitAlternation(X){this.checkIsTarget(X,Qs.ALTERNATION)}}function Ma(re){const X=new Array(re);for(let me=0;me<re;me++)X[me]=[];return X}function ja(re){let X=[""];for(let me=0;me<re.length;me++){const He=re[me],We=[];for(let ft=0;ft<X.length;ft++){const wt=X[ft];We.push(wt+"_"+He.tokenTypeIdx);for(let zt=0;zt<He.categoryMatches.length;zt++){const en="_"+He.categoryMatches[zt];We.push(wt+en)}}X=We}return X}function z2(re,X,me){for(let He=0;He<re.length;He++){if(He===me)continue;const We=re[He];for(let ft=0;ft<X.length;ft++){const wt=X[ft];if(We[wt]===!0)return!1}}return!0}function ms(re,X){const me=Gi(re,wt=>eA([wt],1)),He=Ma(me.length),We=Gi(me,wt=>{const zt={};return zr(wt,en=>{const In=ja(en.partialPath);zr(In,po=>{zt[po]=!0})}),zt});let ft=me;for(let wt=1;wt<=X;wt++){const zt=ft;ft=Ma(zt.length);for(let en=0;en<zt.length;en++){const In=zt[en];for(let po=0;po<In.length;po++){const wo=In[po].partialPath,ci=In[po].suffixDef,Hi=ja(wo);if(z2(We,Hi,en)||RA(ci)||wo.length===X){const Wr=He[en];if(ZI(Wr,wo)===!1){Wr.push(wo);for(let Ca=0;Ca<Hi.length;Ca++){const rr=Hi[Ca];We[en][rr]=!0}}}else{const Wr=eA(ci,wt+1,wo);ft[en]=ft[en].concat(Wr),zr(Wr,Ca=>{const rr=ja(Ca.partialPath);zr(rr,Wi=>{We[en][Wi]=!0})})}}}}return He}function Ff(re,X,me,He){const We=new gp(re,Qs.ALTERNATION,He);return X.accept(We),ms(We.result,me)}function Wd(re,X,me,He){const We=new gp(re,me);X.accept(We);const ft=We.result,zt=new M_(X,re,me).startWalking(),en=new Xa({definition:ft}),In=new Xa({definition:zt});return ms([en,In],He)}function ZI(re,X){e:for(let me=0;me<re.length;me++){const He=re[me];if(He.length===X.length){for(let We=0;We<He.length;We++){const ft=X[We],wt=He[We];if((ft===wt||wt.categoryMatchesMap[ft.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Ia(re,X){return re.length<X.length&&Bh(re,(me,He)=>{const We=X[He];return me===We||We.categoryMatchesMap[me.tokenTypeIdx]})}function h5(re){return Bh(re,X=>Bh(X,me=>Bh(me,He=>RA(He.categoryMatches))))}function p5(re){const X=re.lookaheadStrategy.validate({rules:re.rules,tokenTypes:re.tokenTypes,grammarName:re.grammarName});return Gi(X,me=>Object.assign({type:pp.CUSTOM_LOOKAHEAD_VALIDATION},me))}function zS(re,X,me,He){const We=pg(re,en=>Nh(en,me)),ft=tC(re,X,me),wt=pg(re,en=>Wn(en,me)),zt=pg(re,en=>iy(en,re,He,me));return We.concat(ft,wt,zt)}function Nh(re,X){const me=new B3;re.accept(me);const He=me.allProductions,We=Ys(He,yA),ft=fg(We,zt=>zt.length>1);return Gi(Wc(ft),zt=>{const en=Jc(zt),In=X.buildDuplicateFoundError(re,zt),po=b0(en),wo={message:In,type:pp.DUPLICATE_PRODUCTIONS,ruleName:re.name,dslName:po,occurrence:en.idx},ci=Lf(en);return ci&&(wo.parameter=ci),wo})}function yA(re){return`${b0(re)}_#_${re.idx}_#_${Lf(re)}`}function Lf(re){return re instanceof $c?re.terminalType.name:re instanceof za?re.nonTerminalName:""}class B3 extends VI{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(X){this.allProductions.push(X)}visitOption(X){this.allProductions.push(X)}visitRepetitionWithSeparator(X){this.allProductions.push(X)}visitRepetitionMandatory(X){this.allProductions.push(X)}visitRepetitionMandatoryWithSeparator(X){this.allProductions.push(X)}visitRepetition(X){this.allProductions.push(X)}visitAlternation(X){this.allProductions.push(X)}visitTerminal(X){this.allProductions.push(X)}}function iy(re,X,me,He){const We=[];if(_u(X,(wt,zt)=>zt.name===re.name?wt+1:wt,0)>1){const wt=He.buildDuplicateRuleNameError({topLevelRule:re,grammarName:me});We.push({message:wt,type:pp.DUPLICATE_RULE_NAME,ruleName:re.name})}return We}function b3(re,X,me){const He=[];let We;return A0(X,re)||(We=`Invalid rule override, rule: ->${re}<- cannot be overridden in the grammar: ->${me}<-as it is not defined in any of the super grammars `,He.push({message:We,type:pp.INVALID_RULE_OVERRIDE,ruleName:re})),He}function dp(re,X,me,He=[]){const We=[],ft=eC(X.definition);if(RA(ft))return[];{const wt=re.name;A0(ft,re)&&We.push({message:me.buildLeftRecursionError({topLevelRule:re,leftRecursionPath:He}),type:pp.LEFT_RECURSION,ruleName:wt});const en=L2(ft,He.concat([re])),In=pg(en,po=>{const wo=x0(He);return wo.push(po),dp(re,po,me,wo)});return We.concat(In)}}function eC(re){let X=[];if(RA(re))return X;const me=Jc(re);if(me instanceof za)X.push(me.referencedRule);else if(me instanceof Xa||me instanceof Za||me instanceof Vs||me instanceof fu||me instanceof lp||me instanceof Si)X=X.concat(eC(me.definition));else if(me instanceof c0)X=hu(Gi(me.definition,ft=>eC(ft.definition)));else if(!(me instanceof $c))throw Error("non exhaustive match");const He=zI(me),We=re.length>1;if(He&&We){const ft=Hu(re);return X.concat(eC(ft))}else return X}class J2 extends VI{constructor(){super(...arguments),this.alternations=[]}visitAlternation(X){this.alternations.push(X)}}function JS(re,X){const me=new J2;re.accept(me);const He=me.alternations;return pg(He,ft=>{const wt=wm(ft.definition);return pg(wt,(zt,en)=>{const In=Or([zt],[],Ph,1);return RA(In)?[{message:X.buildEmptyAlternationError({topLevelRule:re,alternation:ft,emptyChoiceIdx:en}),type:pp.NONE_LAST_EMPTY_ALT,ruleName:re.name,occurrence:ft.idx,alternative:en+1}]:[]})})}function l8(re,X,me){const He=new J2;re.accept(He);let We=He.alternations;return We=Ig(We,wt=>wt.ignoreAmbiguities===!0),pg(We,wt=>{const zt=wt.idx,en=wt.maxLookahead||X,In=Ff(zt,re,en,wt),po=u8(In,wt,re,me),wo=Rh(In,wt,re,me);return po.concat(wo)})}class ra extends VI{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(X){this.allProductions.push(X)}visitRepetitionMandatory(X){this.allProductions.push(X)}visitRepetitionMandatoryWithSeparator(X){this.allProductions.push(X)}visitRepetition(X){this.allProductions.push(X)}}function Wn(re,X){const me=new J2;re.accept(me);const He=me.alternations;return pg(He,ft=>ft.definition.length>255?[{message:X.buildTooManyAlternativesError({topLevelRule:re,alternation:ft}),type:pp.TOO_MANY_ALTS,ruleName:re.name,occurrence:ft.idx}]:[])}function _s(re,X,me){const He=[];return zr(re,We=>{const ft=new ra;We.accept(ft);const wt=ft.allProductions;zr(wt,zt=>{const en=Wa(zt),In=zt.maxLookahead||X,po=zt.idx,ci=Wd(po,We,en,In)[0];if(RA(hu(ci))){const Hi=me.buildEmptyRepetitionError({topLevelRule:We,repetition:zt});He.push({message:Hi,type:pp.NO_NON_EMPTY_LOOKAHEAD,ruleName:We.name})}})}),He}function u8(re,X,me,He){const We=[],ft=_u(re,(zt,en,In)=>(X.definition[In].ignoreAmbiguities===!0||zr(en,po=>{const wo=[In];zr(re,(ci,Hi)=>{In!==Hi&&ZI(ci,po)&&X.definition[Hi].ignoreAmbiguities!==!0&&wo.push(Hi)}),wo.length>1&&!ZI(We,po)&&(We.push(po),zt.push({alts:wo,path:po}))}),zt),[]);return Gi(ft,zt=>{const en=Gi(zt.alts,po=>po+1);return{message:He.buildAlternationAmbiguityError({topLevelRule:me,alternation:X,ambiguityIndices:en,prefixPath:zt.path}),type:pp.AMBIGUOUS_ALTS,ruleName:me.name,occurrence:X.idx,alternatives:zt.alts}})}function Rh(re,X,me,He){const We=_u(re,(wt,zt,en)=>{const In=Gi(zt,po=>({idx:en,path:po}));return wt.concat(In)},[]);return zg(pg(We,wt=>{if(X.definition[wt.idx].ignoreAmbiguities===!0)return[];const en=wt.idx,In=wt.path,po=mu(We,ci=>X.definition[ci.idx].ignoreAmbiguities!==!0&&ci.idx<en&&Ia(ci.path,In));return Gi(po,ci=>{const Hi=[ci.idx+1,en+1],pr=X.idx===0?"":X.idx;return{message:He.buildAlternationPrefixAmbiguityError({topLevelRule:me,alternation:X,ambiguityIndices:Hi,prefixPath:ci.path}),type:pp.AMBIGUOUS_PREFIX_ALTS,ruleName:me.name,occurrence:pr,alternatives:Hi}})}))}function tC(re,X,me){const He=[],We=Gi(X,ft=>ft.name);return zr(re,ft=>{const wt=ft.name;if(A0(We,wt)){const zt=me.buildNamespaceConflictError(ft);He.push({message:zt,type:pp.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:wt})}}),He}function Tm(re){const X=o5(re,{errMsgProvider:Qi}),me={};return zr(re.rules,He=>{me[He.name]=He}),Xs(me,X.errMsgProvider)}function O1(re){return re=o5(re,{errMsgProvider:Ni}),zS(re.rules,re.tokenTypes,re.errMsgProvider,re.grammarName)}const ry="MismatchedTokenException",$p="NoViableAltException",W2="EarlyExitException",G1="NotAllInputParsedException",S3=[ry,$p,W2,G1];Object.freeze(S3);function R4(re){return A0(S3,re.name)}class sy extends Error{constructor(X,me){super(X),this.token=me,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class g8 extends sy{constructor(X,me,He){super(X,me),this.previousToken=He,this.name=ry}}class D_ extends sy{constructor(X,me,He){super(X,me),this.previousToken=He,this.name=$p}}class ay extends sy{constructor(X,me){super(X,me),this.name=G1}}class Ay extends sy{constructor(X,me,He){super(X,me),this.previousToken=He,this.name=W2}}const Y1={},Q3="InRuleRecoveryException";class m5 extends Error{constructor(X){super(X),this.name=Q3}}class m9{initRecoverable(X){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=ai(X,"recoveryEnabled")?X.recoveryEnabled:Fm.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=nC)}getTokenToInsert(X){const me=wn(X,"",NaN,NaN,NaN,NaN,NaN,NaN);return me.isInsertedInRecovery=!0,me}canTokenTypeBeInsertedInRecovery(X){return!0}canTokenTypeBeDeletedInRecovery(X){return!0}tryInRepetitionRecovery(X,me,He,We){const ft=this.findReSyncTokenType(),wt=this.exportLexerState(),zt=[];let en=!1;const In=this.LA(1);let po=this.LA(1);const wo=()=>{const ci=this.LA(0),Hi=this.errorMessageProvider.buildMismatchTokenMessage({expected:We,actual:In,previous:ci,ruleName:this.getCurrRuleFullName()}),pr=new g8(Hi,In,this.LA(0));pr.resyncedTokens=wm(zt),this.SAVE_ERROR(pr)};for(;!en;)if(this.tokenMatcher(po,We)){wo();return}else if(He.call(this)){wo(),X.apply(this,me);return}else this.tokenMatcher(po,ft)?en=!0:(po=this.SKIP_TOKEN(),this.addToResyncTokens(po,zt));this.importLexerState(wt)}shouldInRepetitionRecoveryBeTried(X,me,He){return!(He===!1||this.tokenMatcher(this.LA(1),X)||this.isBackTracking()||this.canPerformInRuleRecovery(X,this.getFollowsForInRuleRecovery(X,me)))}getFollowsForInRuleRecovery(X,me){const He=this.getCurrentGrammarPath(X,me);return this.getNextPossibleTokenTypes(He)}tryInRuleRecovery(X,me){if(this.canRecoverWithSingleTokenInsertion(X,me))return this.getTokenToInsert(X);if(this.canRecoverWithSingleTokenDeletion(X)){const He=this.SKIP_TOKEN();return this.consumeToken(),He}throw new m5("sad sad panda")}canPerformInRuleRecovery(X,me){return this.canRecoverWithSingleTokenInsertion(X,me)||this.canRecoverWithSingleTokenDeletion(X)}canRecoverWithSingleTokenInsertion(X,me){if(!this.canTokenTypeBeInsertedInRecovery(X)||RA(me))return!1;const He=this.LA(1);return cp(me,ft=>this.tokenMatcher(He,ft))!==void 0}canRecoverWithSingleTokenDeletion(X){return this.canTokenTypeBeDeletedInRecovery(X)?this.tokenMatcher(this.LA(2),X):!1}isInCurrentRuleReSyncSet(X){const me=this.getCurrFollowKey(),He=this.getFollowSetFromFollowKey(me);return A0(He,X)}findReSyncTokenType(){const X=this.flattenFollowSet();let me=this.LA(1),He=2;for(;;){const We=cp(X,ft=>$o(me,ft));if(We!==void 0)return We;me=this.LA(He),He++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Y1;const X=this.getLastExplicitRuleShortName(),me=this.getLastExplicitRuleOccurrenceIndex(),He=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(X),idxInCallingRule:me,inRule:this.shortRuleNameToFullName(He)}}buildFullFollowKeyStack(){const X=this.RULE_STACK,me=this.RULE_OCCURRENCE_STACK;return Gi(X,(He,We)=>We===0?Y1:{ruleName:this.shortRuleNameToFullName(He),idxInCallingRule:me[We],inRule:this.shortRuleNameToFullName(X[We-1])})}flattenFollowSet(){const X=Gi(this.buildFullFollowKeyStack(),me=>this.getFollowSetFromFollowKey(me));return hu(X)}getFollowSetFromFollowKey(X){if(X===Y1)return[ln];const me=X.ruleName+X.idxInCallingRule+Nm+X.inRule;return this.resyncFollows[me]}addToResyncTokens(X,me){return this.tokenMatcher(X,ln)||me.push(X),me}reSyncTo(X){const me=[];let He=this.LA(1);for(;this.tokenMatcher(He,X)===!1;)He=this.SKIP_TOKEN(),this.addToResyncTokens(He,me);return wm(me)}attemptInRepetitionRecovery(X,me,He,We,ft,wt,zt){}getCurrentGrammarPath(X,me){const He=this.getHumanReadableRuleStack(),We=x0(this.RULE_OCCURRENCE_STACK);return{ruleStack:He,occurrenceStack:We,lastTok:X,lastTokOccurrence:me}}getHumanReadableRuleStack(){return Gi(this.RULE_STACK,X=>this.shortRuleNameToFullName(X))}}function nC(re,X,me,He,We,ft,wt){const zt=this.getKeyForAutomaticLookahead(He,We);let en=this.firstAfterRepMap[zt];if(en===void 0){const ci=this.getCurrRuleFullName(),Hi=this.getGAstProductions()[ci];en=new ft(Hi,We).startWalking(),this.firstAfterRepMap[zt]=en}let In=en.token,po=en.occurrence;const wo=en.isEndOfRule;this.RULE_STACK.length===1&&wo&&In===void 0&&(In=ln,po=1),!(In===void 0||po===void 0)&&this.shouldInRepetitionRecoveryBeTried(In,po,wt)&&this.tryInRepetitionRecovery(re,X,me,In)}const km=4,jd=8,Vu=1<<jd,Pi=2<<jd,Zg=3<<jd,Ql=4<<jd,q0=5<<jd,cy=6<<jd;function U1(re,X,me){return me|X|re}class v3{constructor(X){var me;this.maxLookahead=(me=X?.maxLookahead)!==null&&me!==void 0?me:Fm.maxLookahead}validate(X){const me=this.validateNoLeftRecursion(X.rules);if(RA(me)){const He=this.validateEmptyOrAlternatives(X.rules),We=this.validateAmbiguousAlternationAlternatives(X.rules,this.maxLookahead),ft=this.validateSomeNonEmptyLookaheadPath(X.rules,this.maxLookahead);return[...me,...He,...We,...ft]}return me}validateNoLeftRecursion(X){return pg(X,me=>dp(me,me,Ni))}validateEmptyOrAlternatives(X){return pg(X,me=>JS(me,Ni))}validateAmbiguousAlternationAlternatives(X,me){return pg(X,He=>l8(He,me,Ni))}validateSomeNonEmptyLookaheadPath(X,me){return _s(X,me,Ni)}buildLookaheadForAlternation(X){return Bg(X.prodOccurrence,X.rule,X.maxLookahead,X.hasPredicates,X.dynamicTokensEnabled,E3)}buildLookaheadForOptional(X){return d5(X.prodOccurrence,X.rule,X.maxLookahead,X.dynamicTokensEnabled,Wa(X.prodType),H1)}}class T4{initLooksAhead(X){this.dynamicTokensEnabled=ai(X,"dynamicTokensEnabled")?X.dynamicTokensEnabled:Fm.dynamicTokensEnabled,this.maxLookahead=ai(X,"maxLookahead")?X.maxLookahead:Fm.maxLookahead,this.lookaheadStrategy=ai(X,"lookaheadStrategy")?X.lookaheadStrategy:new v3({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(X){zr(X,me=>{this.TRACE_INIT(`${me.name} Rule Lookahead`,()=>{const{alternation:He,repetition:We,option:ft,repetitionMandatory:wt,repetitionMandatoryWithSeparator:zt,repetitionWithSeparator:en}=N_(me);zr(He,In=>{const po=In.idx===0?"":In.idx;this.TRACE_INIT(`${b0(In)}${po}`,()=>{const wo=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:In.idx,rule:me,maxLookahead:In.maxLookahead||this.maxLookahead,hasPredicates:In.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),ci=U1(this.fullRuleNameToShort[me.name],Vu,In.idx);this.setLaFuncCache(ci,wo)})}),zr(We,In=>{this.computeLookaheadFunc(me,In.idx,Zg,"Repetition",In.maxLookahead,b0(In))}),zr(ft,In=>{this.computeLookaheadFunc(me,In.idx,Pi,"Option",In.maxLookahead,b0(In))}),zr(wt,In=>{this.computeLookaheadFunc(me,In.idx,Ql,"RepetitionMandatory",In.maxLookahead,b0(In))}),zr(zt,In=>{this.computeLookaheadFunc(me,In.idx,cy,"RepetitionMandatoryWithSeparator",In.maxLookahead,b0(In))}),zr(en,In=>{this.computeLookaheadFunc(me,In.idx,q0,"RepetitionWithSeparator",In.maxLookahead,b0(In))})})})}computeLookaheadFunc(X,me,He,We,ft,wt){this.TRACE_INIT(`${wt}${me===0?"":me}`,()=>{const zt=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:me,rule:X,maxLookahead:ft||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:We}),en=U1(this.fullRuleNameToShort[X.name],He,me);this.setLaFuncCache(en,zt)})}getKeyForAutomaticLookahead(X,me){const He=this.getLastExplicitRuleShortName();return U1(He,X,me)}getLaFuncFromCache(X){return this.lookAheadFuncsCache.get(X)}setLaFuncCache(X,me){this.lookAheadFuncsCache.set(X,me)}}class ed extends VI{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(X){this.dslMethods.option.push(X)}visitRepetitionWithSeparator(X){this.dslMethods.repetitionWithSeparator.push(X)}visitRepetitionMandatory(X){this.dslMethods.repetitionMandatory.push(X)}visitRepetitionMandatoryWithSeparator(X){this.dslMethods.repetitionMandatoryWithSeparator.push(X)}visitRepetition(X){this.dslMethods.repetition.push(X)}visitAlternation(X){this.dslMethods.alternation.push(X)}}const hp=new ed;function N_(re){hp.reset(),re.accept(hp);const X=hp.dslMethods;return hp.reset(),X}function w3(re,X){isNaN(re.startOffset)===!0?(re.startOffset=X.startOffset,re.endOffset=X.endOffset):re.endOffset<X.endOffset&&(re.endOffset=X.endOffset)}function td(re,X){isNaN(re.startOffset)===!0?(re.startOffset=X.startOffset,re.startColumn=X.startColumn,re.startLine=X.startLine,re.endOffset=X.endOffset,re.endColumn=X.endColumn,re.endLine=X.endLine):re.endOffset<X.endOffset&&(re.endOffset=X.endOffset,re.endColumn=X.endColumn,re.endLine=X.endLine)}function zl(re,X,me){re.children[me]===void 0?re.children[me]=[X]:re.children[me].push(X)}function vl(re,X,me){re.children[X]===void 0?re.children[X]=[me]:re.children[X].push(me)}const X0="name";function zu(re,X){Object.defineProperty(re,X0,{enumerable:!1,configurable:!0,writable:!1,value:X})}function Hf(re,X){const me=O0(re),He=me.length;for(let We=0;We<He;We++){const ft=me[We],wt=re[ft],zt=wt.length;for(let en=0;en<zt;en++){const In=wt[en];In.tokenTypeIdx===void 0&&this[In.name](In.children,X)}}}function oC(re,X){const me=function(){};zu(me,re+"BaseSemantics");const He={visit:function(We,ft){if(B(We)&&(We=We[0]),!cs(We))return this[We.name](We.children,ft)},validateVisitor:function(){const We=WS(this,X);if(!RA(We)){const ft=Gi(We,wt=>wt.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
	${ft.join(`

`).replace(/\n/g,`
	`)}`)}}};return me.prototype=He,me.prototype.constructor=me,me._RULE_NAMES=X,me}function P3(re,X,me){const He=function(){};zu(He,re+"BaseSemanticsWithDefaults");const We=Object.create(me.prototype);return zr(X,ft=>{We[ft]=Hf}),He.prototype=We,He.prototype.constructor=He,He}var j2;(function(re){re[re.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",re[re.MISSING_METHOD=1]="MISSING_METHOD"})(j2||(j2={}));function WS(re,X){return Of(re,X)}function Of(re,X){const me=mu(X,We=>ye(re[We])===!1),He=Gi(me,We=>({msg:`Missing visitor method: <${We}> on ${re.constructor.name} CST Visitor.`,type:j2.MISSING_METHOD,methodName:We}));return zg(He)}class $2{initTreeBuilder(X){if(this.CST_STACK=[],this.outputCst=X.outputCst,this.nodeLocationTracking=ai(X,"nodeLocationTracking")?X.nodeLocationTracking:Fm.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Yt,this.cstFinallyStateUpdate=Yt,this.cstPostTerminal=Yt,this.cstPostNonTerminal=Yt,this.cstPostRule=Yt;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=td,this.setNodeLocationFromNode=td,this.cstPostRule=Yt,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=w3,this.setNodeLocationFromNode=w3,this.cstPostRule=Yt,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=Yt,this.setInitialNodeLocation=Yt;else throw Error(`Invalid <nodeLocationTracking> config option: "${X.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(X){X.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(X){X.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(X){X.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(X){const me=this.LA(1);X.location={startOffset:me.startOffset,startLine:me.startLine,startColumn:me.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(X){const me={name:X,children:Object.create(null)};this.setInitialNodeLocation(me),this.CST_STACK.push(me)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(X){const me=this.LA(0),He=X.location;He.startOffset<=me.startOffset?(He.endOffset=me.endOffset,He.endLine=me.endLine,He.endColumn=me.endColumn):(He.startOffset=NaN,He.startLine=NaN,He.startColumn=NaN)}cstPostRuleOnlyOffset(X){const me=this.LA(0),He=X.location;He.startOffset<=me.startOffset?He.endOffset=me.endOffset:He.startOffset=NaN}cstPostTerminal(X,me){const He=this.CST_STACK[this.CST_STACK.length-1];zl(He,me,X),this.setNodeLocationFromToken(He.location,me)}cstPostNonTerminal(X,me){const He=this.CST_STACK[this.CST_STACK.length-1];vl(He,me,X),this.setNodeLocationFromNode(He.location,X.location)}getBaseCstVisitorConstructor(){if(cs(this.baseCstVisitorConstructor)){const X=oC(this.className,O0(this.gastProductionsCache));return this.baseCstVisitorConstructor=X,X}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(cs(this.baseCstVisitorWithDefaultsConstructor)){const X=P3(this.className,O0(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=X,X}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const X=this.RULE_STACK;return X[X.length-1]}getPreviousExplicitRuleShortName(){const X=this.RULE_STACK;return X[X.length-2]}getLastExplicitRuleOccurrenceIndex(){const X=this.RULE_OCCURRENCE_STACK;return X[X.length-1]}}class q2{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(X){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=X,this.tokVectorLength=X.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):_5}LA(X){const me=this.currIdx+X;return me<0||this.tokVectorLength<=me?_5:this.tokVector[me]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(X){this.currIdx=X}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class _9{ACTION(X){return X.call(this)}consume(X,me,He){return this.consumeInternal(me,X,He)}subrule(X,me,He){return this.subruleInternal(me,X,He)}option(X,me){return this.optionInternal(me,X)}or(X,me){return this.orInternal(me,X)}many(X,me){return this.manyInternal(X,me)}atLeastOne(X,me){return this.atLeastOneInternal(X,me)}CONSUME(X,me){return this.consumeInternal(X,0,me)}CONSUME1(X,me){return this.consumeInternal(X,1,me)}CONSUME2(X,me){return this.consumeInternal(X,2,me)}CONSUME3(X,me){return this.consumeInternal(X,3,me)}CONSUME4(X,me){return this.consumeInternal(X,4,me)}CONSUME5(X,me){return this.consumeInternal(X,5,me)}CONSUME6(X,me){return this.consumeInternal(X,6,me)}CONSUME7(X,me){return this.consumeInternal(X,7,me)}CONSUME8(X,me){return this.consumeInternal(X,8,me)}CONSUME9(X,me){return this.consumeInternal(X,9,me)}SUBRULE(X,me){return this.subruleInternal(X,0,me)}SUBRULE1(X,me){return this.subruleInternal(X,1,me)}SUBRULE2(X,me){return this.subruleInternal(X,2,me)}SUBRULE3(X,me){return this.subruleInternal(X,3,me)}SUBRULE4(X,me){return this.subruleInternal(X,4,me)}SUBRULE5(X,me){return this.subruleInternal(X,5,me)}SUBRULE6(X,me){return this.subruleInternal(X,6,me)}SUBRULE7(X,me){return this.subruleInternal(X,7,me)}SUBRULE8(X,me){return this.subruleInternal(X,8,me)}SUBRULE9(X,me){return this.subruleInternal(X,9,me)}OPTION(X){return this.optionInternal(X,0)}OPTION1(X){return this.optionInternal(X,1)}OPTION2(X){return this.optionInternal(X,2)}OPTION3(X){return this.optionInternal(X,3)}OPTION4(X){return this.optionInternal(X,4)}OPTION5(X){return this.optionInternal(X,5)}OPTION6(X){return this.optionInternal(X,6)}OPTION7(X){return this.optionInternal(X,7)}OPTION8(X){return this.optionInternal(X,8)}OPTION9(X){return this.optionInternal(X,9)}OR(X){return this.orInternal(X,0)}OR1(X){return this.orInternal(X,1)}OR2(X){return this.orInternal(X,2)}OR3(X){return this.orInternal(X,3)}OR4(X){return this.orInternal(X,4)}OR5(X){return this.orInternal(X,5)}OR6(X){return this.orInternal(X,6)}OR7(X){return this.orInternal(X,7)}OR8(X){return this.orInternal(X,8)}OR9(X){return this.orInternal(X,9)}MANY(X){this.manyInternal(0,X)}MANY1(X){this.manyInternal(1,X)}MANY2(X){this.manyInternal(2,X)}MANY3(X){this.manyInternal(3,X)}MANY4(X){this.manyInternal(4,X)}MANY5(X){this.manyInternal(5,X)}MANY6(X){this.manyInternal(6,X)}MANY7(X){this.manyInternal(7,X)}MANY8(X){this.manyInternal(8,X)}MANY9(X){this.manyInternal(9,X)}MANY_SEP(X){this.manySepFirstInternal(0,X)}MANY_SEP1(X){this.manySepFirstInternal(1,X)}MANY_SEP2(X){this.manySepFirstInternal(2,X)}MANY_SEP3(X){this.manySepFirstInternal(3,X)}MANY_SEP4(X){this.manySepFirstInternal(4,X)}MANY_SEP5(X){this.manySepFirstInternal(5,X)}MANY_SEP6(X){this.manySepFirstInternal(6,X)}MANY_SEP7(X){this.manySepFirstInternal(7,X)}MANY_SEP8(X){this.manySepFirstInternal(8,X)}MANY_SEP9(X){this.manySepFirstInternal(9,X)}AT_LEAST_ONE(X){this.atLeastOneInternal(0,X)}AT_LEAST_ONE1(X){return this.atLeastOneInternal(1,X)}AT_LEAST_ONE2(X){this.atLeastOneInternal(2,X)}AT_LEAST_ONE3(X){this.atLeastOneInternal(3,X)}AT_LEAST_ONE4(X){this.atLeastOneInternal(4,X)}AT_LEAST_ONE5(X){this.atLeastOneInternal(5,X)}AT_LEAST_ONE6(X){this.atLeastOneInternal(6,X)}AT_LEAST_ONE7(X){this.atLeastOneInternal(7,X)}AT_LEAST_ONE8(X){this.atLeastOneInternal(8,X)}AT_LEAST_ONE9(X){this.atLeastOneInternal(9,X)}AT_LEAST_ONE_SEP(X){this.atLeastOneSepFirstInternal(0,X)}AT_LEAST_ONE_SEP1(X){this.atLeastOneSepFirstInternal(1,X)}AT_LEAST_ONE_SEP2(X){this.atLeastOneSepFirstInternal(2,X)}AT_LEAST_ONE_SEP3(X){this.atLeastOneSepFirstInternal(3,X)}AT_LEAST_ONE_SEP4(X){this.atLeastOneSepFirstInternal(4,X)}AT_LEAST_ONE_SEP5(X){this.atLeastOneSepFirstInternal(5,X)}AT_LEAST_ONE_SEP6(X){this.atLeastOneSepFirstInternal(6,X)}AT_LEAST_ONE_SEP7(X){this.atLeastOneSepFirstInternal(7,X)}AT_LEAST_ONE_SEP8(X){this.atLeastOneSepFirstInternal(8,X)}AT_LEAST_ONE_SEP9(X){this.atLeastOneSepFirstInternal(9,X)}RULE(X,me,He=R_){if(A0(this.definedRulesNames,X)){const wt={message:Ni.buildDuplicateRuleNameError({topLevelRule:X,grammarName:this.className}),type:pp.DUPLICATE_RULE_NAME,ruleName:X};this.definitionErrors.push(wt)}this.definedRulesNames.push(X);const We=this.defineRule(X,me,He);return this[X]=We,We}OVERRIDE_RULE(X,me,He=R_){const We=b3(X,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(We);const ft=this.defineRule(X,me,He);return this[X]=ft,ft}BACKTRACK(X,me){return function(){this.isBackTrackingStack.push(1);const He=this.saveRecogState();try{return X.apply(this,me),!0}catch(We){if(R4(We))return!1;throw We}finally{this.reloadRecogState(He),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Qh(Wc(this.gastProductionsCache))}}class k4{initRecognizerEngine(X,me){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=XI,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},ai(me,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
	See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
	For Further details.`);if(B(X)){if(RA(X))throw Error(`A Token Vocabulary cannot be empty.
	Note that the first argument for the parser constructor
	is no longer a Token vector (since v4.0).`);if(typeof X[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
	See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
	For Further details.`)}if(B(X))this.tokensMap=_u(X,(ft,wt)=>(ft[wt.name]=wt,ft),{});else if(ai(X,"modes")&&Bh(hu(Wc(X.modes)),F1)){const ft=hu(Wc(X.modes)),wt=KI(ft);this.tokensMap=_u(wt,(zt,en)=>(zt[en.name]=en,zt),{})}else if(O(X))this.tokensMap=x0(X);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=ln;const He=ai(X,"modes")?hu(Wc(X.modes)):Wc(X),We=Bh(He,ft=>RA(ft.categoryMatches));this.tokenMatcher=We?XI:Ph,Sl(Wc(this.tokensMap))}defineRule(X,me,He){if(this.selfAnalysisDone)throw Error(`Grammar rule <${X}> may not be defined after the 'performSelfAnalysis' method has been called'
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const We=ai(He,"resyncEnabled")?He.resyncEnabled:R_.resyncEnabled,ft=ai(He,"recoveryValueFunc")?He.recoveryValueFunc:R_.recoveryValueFunc,wt=this.ruleShortNameIdx<<km+jd;this.ruleShortNameIdx++,this.shortRuleNameToFull[wt]=X,this.fullRuleNameToShort[X]=wt;let zt;return this.outputCst===!0?zt=function(...po){try{this.ruleInvocationStateUpdate(wt,X,this.subruleIdx),me.apply(this,po);const wo=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(wo),wo}catch(wo){return this.invokeRuleCatch(wo,We,ft)}finally{this.ruleFinallyStateUpdate()}}:zt=function(...po){try{return this.ruleInvocationStateUpdate(wt,X,this.subruleIdx),me.apply(this,po)}catch(wo){return this.invokeRuleCatch(wo,We,ft)}finally{this.ruleFinallyStateUpdate()}},Object.assign(zt,{ruleName:X,originalGrammarAction:me})}invokeRuleCatch(X,me,He){const We=this.RULE_STACK.length===1,ft=me&&!this.isBackTracking()&&this.recoveryEnabled;if(R4(X)){const wt=X;if(ft){const zt=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(zt))if(wt.resyncedTokens=this.reSyncTo(zt),this.outputCst){const en=this.CST_STACK[this.CST_STACK.length-1];return en.recoveredNode=!0,en}else return He(X);else{if(this.outputCst){const en=this.CST_STACK[this.CST_STACK.length-1];en.recoveredNode=!0,wt.partialCstResult=en}throw wt}}else{if(We)return this.moveToTerminatedState(),He(X);throw wt}}else throw X}optionInternal(X,me){const He=this.getKeyForAutomaticLookahead(Pi,me);return this.optionInternalLogic(X,me,He)}optionInternalLogic(X,me,He){let We=this.getLaFuncFromCache(He),ft;if(typeof X!="function"){ft=X.DEF;const wt=X.GATE;if(wt!==void 0){const zt=We;We=()=>wt.call(this)&&zt.call(this)}}else ft=X;if(We.call(this)===!0)return ft.call(this)}atLeastOneInternal(X,me){const He=this.getKeyForAutomaticLookahead(Ql,X);return this.atLeastOneInternalLogic(X,me,He)}atLeastOneInternalLogic(X,me,He){let We=this.getLaFuncFromCache(He),ft;if(typeof me!="function"){ft=me.DEF;const wt=me.GATE;if(wt!==void 0){const zt=We;We=()=>wt.call(this)&&zt.call(this)}}else ft=me;if(We.call(this)===!0){let wt=this.doSingleRepetition(ft);for(;We.call(this)===!0&&wt===!0;)wt=this.doSingleRepetition(ft)}else throw this.raiseEarlyExitException(X,Qs.REPETITION_MANDATORY,me.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[X,me],We,Ql,X,zo)}atLeastOneSepFirstInternal(X,me){const He=this.getKeyForAutomaticLookahead(cy,X);this.atLeastOneSepFirstInternalLogic(X,me,He)}atLeastOneSepFirstInternalLogic(X,me,He){const We=me.DEF,ft=me.SEP;if(this.getLaFuncFromCache(He).call(this)===!0){We.call(this);const zt=()=>this.tokenMatcher(this.LA(1),ft);for(;this.tokenMatcher(this.LA(1),ft)===!0;)this.CONSUME(ft),We.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[X,ft,zt,We,Bi],zt,cy,X,Bi)}else throw this.raiseEarlyExitException(X,Qs.REPETITION_MANDATORY_WITH_SEPARATOR,me.ERR_MSG)}manyInternal(X,me){const He=this.getKeyForAutomaticLookahead(Zg,X);return this.manyInternalLogic(X,me,He)}manyInternalLogic(X,me,He){let We=this.getLaFuncFromCache(He),ft;if(typeof me!="function"){ft=me.DEF;const zt=me.GATE;if(zt!==void 0){const en=We;We=()=>zt.call(this)&&en.call(this)}}else ft=me;let wt=!0;for(;We.call(this)===!0&&wt===!0;)wt=this.doSingleRepetition(ft);this.attemptInRepetitionRecovery(this.manyInternal,[X,me],We,Zg,X,Qn,wt)}manySepFirstInternal(X,me){const He=this.getKeyForAutomaticLookahead(q0,X);this.manySepFirstInternalLogic(X,me,He)}manySepFirstInternalLogic(X,me,He){const We=me.DEF,ft=me.SEP;if(this.getLaFuncFromCache(He).call(this)===!0){We.call(this);const zt=()=>this.tokenMatcher(this.LA(1),ft);for(;this.tokenMatcher(this.LA(1),ft)===!0;)this.CONSUME(ft),We.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[X,ft,zt,We,to],zt,q0,X,to)}}repetitionSepSecondInternal(X,me,He,We,ft){for(;He();)this.CONSUME(me),We.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[X,me,He,We,ft],He,cy,X,ft)}doSingleRepetition(X){const me=this.getLexerPosition();return X.call(this),this.getLexerPosition()>me}orInternal(X,me){const He=this.getKeyForAutomaticLookahead(Vu,me),We=B(X)?X:X.DEF,wt=this.getLaFuncFromCache(He).call(this,We);if(wt!==void 0)return We[wt].ALT.call(this);this.raiseNoAltException(me,X.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const X=this.LA(1),me=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:X,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new ay(me,X))}}subruleInternal(X,me,He){let We;try{const ft=He!==void 0?He.ARGS:void 0;return this.subruleIdx=me,We=X.apply(this,ft),this.cstPostNonTerminal(We,He!==void 0&&He.LABEL!==void 0?He.LABEL:X.ruleName),We}catch(ft){throw this.subruleInternalError(ft,He,X.ruleName)}}subruleInternalError(X,me,He){throw R4(X)&&X.partialCstResult!==void 0&&(this.cstPostNonTerminal(X.partialCstResult,me!==void 0&&me.LABEL!==void 0?me.LABEL:He),delete X.partialCstResult),X}consumeInternal(X,me,He){let We;try{const ft=this.LA(1);this.tokenMatcher(ft,X)===!0?(this.consumeToken(),We=ft):this.consumeInternalError(X,ft,He)}catch(ft){We=this.consumeInternalRecovery(X,me,ft)}return this.cstPostTerminal(He!==void 0&&He.LABEL!==void 0?He.LABEL:X.name,We),We}consumeInternalError(X,me,He){let We;const ft=this.LA(0);throw He!==void 0&&He.ERR_MSG?We=He.ERR_MSG:We=this.errorMessageProvider.buildMismatchTokenMessage({expected:X,actual:me,previous:ft,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new g8(We,me,ft))}consumeInternalRecovery(X,me,He){if(this.recoveryEnabled&&He.name==="MismatchedTokenException"&&!this.isBackTracking()){const We=this.getFollowsForInRuleRecovery(X,me);try{return this.tryInRuleRecovery(X,We)}catch(ft){throw ft.name===Q3?He:ft}}else throw He}saveRecogState(){const X=this.errors,me=x0(this.RULE_STACK);return{errors:X,lexerState:this.exportLexerState(),RULE_STACK:me,CST_STACK:this.CST_STACK}}reloadRecogState(X){this.errors=X.errors,this.importLexerState(X.lexerState),this.RULE_STACK=X.RULE_STACK}ruleInvocationStateUpdate(X,me,He){this.RULE_OCCURRENCE_STACK.push(He),this.RULE_STACK.push(X),this.cstInvocationStateUpdate(me)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const X=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[X]}shortRuleNameToFullName(X){return this.shortRuleNameToFull[X]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),ln)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class F4{initErrorHandler(X){this._errors=[],this.errorMessageProvider=ai(X,"errorMessageProvider")?X.errorMessageProvider:Fm.errorMessageProvider}SAVE_ERROR(X){if(R4(X))return X.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:x0(this.RULE_OCCURRENCE_STACK)},this._errors.push(X),X;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return x0(this._errors)}set errors(X){this._errors=X}raiseEarlyExitException(X,me,He){const We=this.getCurrRuleFullName(),ft=this.getGAstProductions()[We],zt=Wd(X,ft,me,this.maxLookahead)[0],en=[];for(let po=1;po<=this.maxLookahead;po++)en.push(this.LA(po));const In=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:zt,actual:en,previous:this.LA(0),customUserDescription:He,ruleName:We});throw this.SAVE_ERROR(new Ay(In,this.LA(1),this.LA(0)))}raiseNoAltException(X,me){const He=this.getCurrRuleFullName(),We=this.getGAstProductions()[He],ft=Ff(X,We,this.maxLookahead),wt=[];for(let In=1;In<=this.maxLookahead;In++)wt.push(this.LA(In));const zt=this.LA(0),en=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:ft,actual:wt,previous:zt,customUserDescription:me,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new D_(en,this.LA(1),zt))}}class Gf{initContentAssist(){}computeContentAssist(X,me){const He=this.gastProductionsCache[X];if(cs(He))throw Error(`Rule ->${X}<- does not exist in this grammar.`);return Or([He],me,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(X){const me=Jc(X.ruleStack),We=this.getGAstProductions()[me];return new Eg(We,X).startWalking()}}const X2={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(X2);const Z2=!0,d8=Math.pow(2,jd)-1,f9=Je({name:"RECORDING_PHASE_TOKEN",pattern:yu.NA});Sl([f9]);const ex=wn(f9,`This IToken indicates the Parser is in Recording Phase
	See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(ex);const jS={name:`This CSTNode indicates the Parser is in Recording Phase
	See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class tx{initGastRecorder(X){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let X=0;X<10;X++){const me=X>0?X:"";this[`CONSUME${me}`]=function(He,We){return this.consumeInternalRecord(He,X,We)},this[`SUBRULE${me}`]=function(He,We){return this.subruleInternalRecord(He,X,We)},this[`OPTION${me}`]=function(He){return this.optionInternalRecord(He,X)},this[`OR${me}`]=function(He){return this.orInternalRecord(He,X)},this[`MANY${me}`]=function(He){this.manyInternalRecord(X,He)},this[`MANY_SEP${me}`]=function(He){this.manySepFirstInternalRecord(X,He)},this[`AT_LEAST_ONE${me}`]=function(He){this.atLeastOneInternalRecord(X,He)},this[`AT_LEAST_ONE_SEP${me}`]=function(He){this.atLeastOneSepFirstInternalRecord(X,He)}}this.consume=function(X,me,He){return this.consumeInternalRecord(me,X,He)},this.subrule=function(X,me,He){return this.subruleInternalRecord(me,X,He)},this.option=function(X,me){return this.optionInternalRecord(me,X)},this.or=function(X,me){return this.orInternalRecord(me,X)},this.many=function(X,me){this.manyInternalRecord(X,me)},this.atLeastOne=function(X,me){this.atLeastOneInternalRecord(X,me)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const X=this;for(let me=0;me<10;me++){const He=me>0?me:"";delete X[`CONSUME${He}`],delete X[`SUBRULE${He}`],delete X[`OPTION${He}`],delete X[`OR${He}`],delete X[`MANY${He}`],delete X[`MANY_SEP${He}`],delete X[`AT_LEAST_ONE${He}`],delete X[`AT_LEAST_ONE_SEP${He}`]}delete X.consume,delete X.subrule,delete X.option,delete X.or,delete X.many,delete X.atLeastOne,delete X.ACTION,delete X.BACKTRACK,delete X.LA})}ACTION_RECORD(X){}BACKTRACK_RECORD(X,me){return()=>!0}LA_RECORD(X){return _5}topLevelRuleRecord(X,me){try{const He=new $g({definition:[],name:X});return He.name=X,this.recordingProdStack.push(He),me.call(this),this.recordingProdStack.pop(),He}catch(He){if(He.KNOWN_RECORDER_ERROR!==!0)try{He.message=He.message+`
	 This error was thrown during the "grammar recording phase" For more info see:
	https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw He}throw He}}optionInternalRecord(X,me){return fs.call(this,Za,X,me)}atLeastOneInternalRecord(X,me){fs.call(this,Vs,me,X)}atLeastOneSepFirstInternalRecord(X,me){fs.call(this,fu,me,X,Z2)}manyInternalRecord(X,me){fs.call(this,Si,me,X)}manySepFirstInternalRecord(X,me){fs.call(this,lp,me,X,Z2)}orInternalRecord(X,me){return Ec.call(this,X,me)}subruleInternalRecord(X,me,He){if(iC(me),!X||ai(X,"ruleName")===!1){const zt=new Error(`<SUBRULE${u0(me)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(X)}>
 inside top level rule: <${this.recordingProdStack[0].name}>`);throw zt.KNOWN_RECORDER_ERROR=!0,zt}const We=GI(this.recordingProdStack),ft=X.ruleName,wt=new za({idx:me,nonTerminalName:ft,label:He?.LABEL,referencedRule:void 0});return We.definition.push(wt),this.outputCst?jS:X2}consumeInternalRecord(X,me,He){if(iC(me),!Vl(X)){const wt=new Error(`<CONSUME${u0(me)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(X)}>
 inside top level rule: <${this.recordingProdStack[0].name}>`);throw wt.KNOWN_RECORDER_ERROR=!0,wt}const We=GI(this.recordingProdStack),ft=new $c({idx:me,terminalType:X,label:He?.LABEL});return We.definition.push(ft),ex}}function fs(re,X,me,He=!1){iC(me);const We=GI(this.recordingProdStack),ft=ye(X)?X:X.DEF,wt=new re({definition:[],idx:me});return He&&(wt.separator=X.SEP),ai(X,"MAX_LOOKAHEAD")&&(wt.maxLookahead=X.MAX_LOOKAHEAD),this.recordingProdStack.push(wt),ft.call(this),We.definition.push(wt),this.recordingProdStack.pop(),X2}function Ec(re,X){iC(X);const me=GI(this.recordingProdStack),He=B(re)===!1,We=He===!1?re:re.DEF,ft=new c0({definition:[],idx:X,ignoreAmbiguities:He&&re.IGNORE_AMBIGUITIES===!0});ai(re,"MAX_LOOKAHEAD")&&(ft.maxLookahead=re.MAX_LOOKAHEAD);const wt=f3(We,zt=>ye(zt.GATE));return ft.hasPredicates=wt,me.definition.push(ft),zr(We,zt=>{const en=new Xa({definition:[]});ft.definition.push(en),ai(zt,"IGNORE_AMBIGUITIES")?en.ignoreAmbiguities=zt.IGNORE_AMBIGUITIES:ai(zt,"GATE")&&(en.ignoreAmbiguities=!0),this.recordingProdStack.push(en),zt.ALT.call(this),this.recordingProdStack.pop()}),X2}function u0(re){return re===0?"":`${re}`}function iC(re){if(re<0||re>d8){const X=new Error(`Invalid DSL Method idx value: <${re}>
	Idx value must be a none negative value smaller than ${d8+1}`);throw X.KNOWN_RECORDER_ERROR=!0,X}}class Th{initPerformanceTracer(X){if(ai(X,"traceInitPerf")){const me=X.traceInitPerf,He=typeof me=="number";this.traceInitMaxIdent=He?me:1/0,this.traceInitPerf=He?me>0:me}else this.traceInitMaxIdent=0,this.traceInitPerf=Fm.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(X,me){if(this.traceInitPerf===!0){this.traceInitIndent++;const He=new Array(this.traceInitIndent+1).join("	");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${He}--> <${X}>`);const{time:We,value:ft}=cl(me),wt=We>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&wt(`${He}<-- <${X}> time: ${We}ms`),this.traceInitIndent--,ft}else return me()}}function nd(re,X){X.forEach(me=>{const He=me.prototype;Object.getOwnPropertyNames(He).forEach(We=>{if(We==="constructor")return;const ft=Object.getOwnPropertyDescriptor(He,We);ft&&(ft.get||ft.set)?Object.defineProperty(re.prototype,We,ft):re.prototype[We]=me.prototype[We]})})}const _5=wn(ln,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(_5);const Fm=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ai,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),R_=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var pp;(function(re){re[re.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",re[re.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",re[re.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",re[re.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",re[re.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",re[re.LEFT_RECURSION=5]="LEFT_RECURSION",re[re.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",re[re.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",re[re.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",re[re.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",re[re.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",re[re.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",re[re.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",re[re.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(pp||(pp={}));class f5{static performSelfAnalysis(X){throw Error("The **static** `performSelfAnalysis` method has been deprecated.	\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let X;this.selfAnalysisDone=!0;const me=this.className;this.TRACE_INIT("toFastProps",()=>{Ou(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),zr(this.definedRulesNames,We=>{const wt=this[We].originalGrammarAction;let zt;this.TRACE_INIT(`${We} Rule`,()=>{zt=this.topLevelRuleRecord(We,wt)}),this.gastProductionsCache[We]=zt})}finally{this.disableRecording()}});let He=[];if(this.TRACE_INIT("Grammar Resolving",()=>{He=Tm({rules:Wc(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(He)}),this.TRACE_INIT("Grammar Validations",()=>{if(RA(He)&&this.skipValidations===!1){const We=O1({rules:Wc(this.gastProductionsCache),tokenTypes:Wc(this.tokensMap),errMsgProvider:Ni,grammarName:me}),ft=p5({lookaheadStrategy:this.lookaheadStrategy,rules:Wc(this.gastProductionsCache),tokenTypes:Wc(this.tokensMap),grammarName:me});this.definitionErrors=this.definitionErrors.concat(We,ft)}}),RA(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const We=WI(Wc(this.gastProductionsCache));this.resyncFollows=We}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var We,ft;(ft=(We=this.lookaheadStrategy).initialize)===null||ft===void 0||ft.call(We,{rules:Wc(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Wc(this.gastProductionsCache))})),!f5.DEFER_DEFINITION_ERRORS_HANDLING&&!RA(this.definitionErrors))throw X=Gi(this.definitionErrors,We=>We.message),new Error(`Parser Definition Errors detected:
 ${X.join(`
-------------------------------
`)}`)})}constructor(X,me){this.definitionErrors=[],this.selfAnalysisDone=!1;const He=this;if(He.initErrorHandler(me),He.initLexerAdapter(),He.initLooksAhead(me),He.initRecognizerEngine(X,me),He.initRecoverable(me),He.initTreeBuilder(me),He.initContentAssist(),He.initGastRecorder(me),He.initPerformanceTracer(me),ai(me,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
	Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
	See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
	For further details.`);this.skipValidations=ai(me,"skipValidations")?me.skipValidations:Fm.skipValidations}}f5.DEFER_DEFINITION_ERRORS_HANDLING=!1,nd(f5,[m9,T4,$2,q2,k4,_9,F4,Gf,tx,Th]);class co extends f5{constructor(X,me=Fm){const He=x0(me);He.outputCst=!0,super(X,He)}}return{CstParser:co,Lexer:yu,createToken:Je}})();class _oi extends x6{constructor(e){super(e)}load(e,n,o,i){const r=this,s=r.path===""?jR.extractUrlBase(e):r.path,a=new fY(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(A){try{n(r.parse(A,s))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},o,i)}parse(e,n){const o={};function i(ke){const Ce=r(),Le=new foi(Ce.tokens),Ye=new Ioi(Ce.tokenVocabulary),tt=s(Ye.getBaseCstVisitorConstructor()),At=Le.lex(ke);Ye.input=At.tokens;const at=Ye.vrml();if(Ye.errors.length>0)throw console.error(Ye.errors),Error("THREE.VRMLLoader: Parsing errors detected.");return tt.visit(at)}function r(){const ke=a_({name:"RouteIdentifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*[\.][^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*/}),Ce=a_({name:"Identifier",pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*/,longer_alt:ke}),Le=["Anchor","Billboard","Collision","Group","Transform","Inline","LOD","Switch","AudioClip","DirectionalLight","PointLight","Script","Shape","Sound","SpotLight","WorldInfo","CylinderSensor","PlaneSensor","ProximitySensor","SphereSensor","TimeSensor","TouchSensor","VisibilitySensor","Box","Cone","Cylinder","ElevationGrid","Extrusion","IndexedFaceSet","IndexedLineSet","PointSet","Sphere","Color","Coordinate","Normal","TextureCoordinate","Appearance","FontStyle","ImageTexture","Material","MovieTexture","PixelTexture","TextureTransform","ColorInterpolator","CoordinateInterpolator","NormalInterpolator","OrientationInterpolator","PositionInterpolator","ScalarInterpolator","Background","Fog","NavigationInfo","Viewpoint","Text"],Ye=a_({name:"Version",pattern:/#VRML.*/,longer_alt:Ce}),tt=a_({name:"NodeName",pattern:new RegExp(Le.join("|")),longer_alt:Ce}),At=a_({name:"DEF",pattern:/DEF/,longer_alt:Ce}),at=a_({name:"USE",pattern:/USE/,longer_alt:Ce}),nt=a_({name:"ROUTE",pattern:/ROUTE/,longer_alt:Ce}),gt=a_({name:"TO",pattern:/TO/,longer_alt:Ce}),bt=a_({name:"StringLiteral",pattern:/"(?:[^\\"\n\r]|\\[bfnrtv"\\/]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*"/}),Ct=a_({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]+/}),Dt=a_({name:"NumberLiteral",pattern:/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/}),kt=a_({name:"TrueLiteral",pattern:/TRUE/}),it=a_({name:"FalseLiteral",pattern:/FALSE/}),Yt=a_({name:"NullLiteral",pattern:/NULL/}),pn=a_({name:"LSquare",pattern:/\[/}),be=a_({name:"RSquare",pattern:/]/}),et=a_({name:"LCurly",pattern:/{/}),It=a_({name:"RCurly",pattern:/}/}),Bt=a_({name:"Comment",pattern:/#.*/,group:Eke.SKIPPED}),st=[a_({name:"WhiteSpace",pattern:/[ ,\s]/,group:Eke.SKIPPED}),tt,At,at,nt,gt,kt,it,Yt,Ye,Ce,ke,bt,Ct,Dt,pn,be,et,It,Bt],xt={};for(let Xe=0,Ze=st.length;Xe<Ze;Xe++){const dt=st[Xe];xt[dt.name]=dt}return{tokens:st,tokenVocabulary:xt}}function s(ke){function Ce(){ke.call(this),this.validateVisitor()}Ce.prototype=Object.assign(Object.create(ke.prototype),{constructor:Ce,vrml:function(Ye){const tt={version:this.visit(Ye.version),nodes:[],routes:[]};for(let At=0,at=Ye.node.length;At<at;At++){const nt=Ye.node[At];tt.nodes.push(this.visit(nt))}if(Ye.route)for(let At=0,at=Ye.route.length;At<at;At++){const nt=Ye.route[At];tt.routes.push(this.visit(nt))}return tt},version:function(Ye){return Ye.Version[0].image},node:function(Ye){const tt={name:Ye.NodeName[0].image,fields:[]};if(Ye.field)for(let At=0,at=Ye.field.length;At<at;At++){const nt=Ye.field[At];tt.fields.push(this.visit(nt))}return Ye.def&&(tt.DEF=this.visit(Ye.def[0])),tt},field:function(Ye){const tt={name:Ye.Identifier[0].image,type:null,values:null};let At;return Ye.singleFieldValue&&(At=this.visit(Ye.singleFieldValue[0])),Ye.multiFieldValue&&(At=this.visit(Ye.multiFieldValue[0])),tt.type=At.type,tt.values=At.values,tt},def:function(Ye){return(Ye.Identifier||Ye.NodeName)[0].image},use:function(Ye){return{USE:(Ye.Identifier||Ye.NodeName)[0].image}},singleFieldValue:function(Ye){return Le(this,Ye)},multiFieldValue:function(Ye){return Le(this,Ye)},route:function(Ye){return{FROM:Ye.RouteIdentifier[0].image,TO:Ye.RouteIdentifier[1].image}}});function Le(Ye,tt){const At={type:null,values:[]};if(tt.node){At.type="node";for(let at=0,nt=tt.node.length;at<nt;at++){const gt=tt.node[at];At.values.push(Ye.visit(gt))}}if(tt.use){At.type="use";for(let at=0,nt=tt.use.length;at<nt;at++){const gt=tt.use[at];At.values.push(Ye.visit(gt))}}if(tt.StringLiteral){At.type="string";for(let at=0,nt=tt.StringLiteral.length;at<nt;at++){const gt=tt.StringLiteral[at];At.values.push(gt.image.replace(/'|"/g,""))}}if(tt.NumberLiteral){At.type="number";for(let at=0,nt=tt.NumberLiteral.length;at<nt;at++){const gt=tt.NumberLiteral[at];At.values.push(parseFloat(gt.image))}}if(tt.HexLiteral){At.type="hex";for(let at=0,nt=tt.HexLiteral.length;at<nt;at++){const gt=tt.HexLiteral[at];At.values.push(gt.image)}}if(tt.TrueLiteral){At.type="boolean";for(let at=0,nt=tt.TrueLiteral.length;at<nt;at++)tt.TrueLiteral[at].image==="TRUE"&&At.values.push(!0)}if(tt.FalseLiteral){At.type="boolean";for(let at=0,nt=tt.FalseLiteral.length;at<nt;at++)tt.FalseLiteral[at].image==="FALSE"&&At.values.push(!1)}return tt.NullLiteral&&(At.type="null",tt.NullLiteral.forEach(function(){At.values.push(null)})),At}return new Ce}function a(ke){const Ce=ke.nodes,Le=new KR;for(let Ye=0,tt=Ce.length;Ye<tt;Ye++){const At=Ce[Ye];A(At)}for(let Ye=0,tt=Ce.length;Ye<tt;Ye++){const At=Ce[Ye],at=c(At);at instanceof T0&&Le.add(at),At.name==="WorldInfo"&&(Le.userData.worldInfo=at)}return Le}function A(ke){ke.DEF&&(o[ke.DEF]=ke);const Ce=ke.fields;for(let Le=0,Ye=Ce.length;Le<Ye;Le++){const tt=Ce[Le];if(tt.type==="node"){const At=tt.values;for(let at=0,nt=At.length;at<nt;at++)A(At[at])}}}function c(ke){return ke.USE?O(ke.USE):(ke.build!==void 0||(ke.build=l(ke)),ke.build)}function l(ke){const Ce=ke.name;let Le;switch(Ce){case"Group":case"Transform":case"Collision":Le=u(ke);break;case"Background":Le=g(ke);break;case"Shape":Le=h(ke);break;case"Appearance":Le=d(ke);break;case"Material":Le=p(ke);break;case"ImageTexture":Le=I(ke);break;case"PixelTexture":Le=f(ke);break;case"TextureTransform":Le=C(ke);break;case"IndexedFaceSet":Le=E(ke);break;case"IndexedLineSet":Le=B(ke);break;case"PointSet":Le=S(ke);break;case"Box":Le=Q(ke);break;case"Cone":Le=w(ke);break;case"Cylinder":Le=M(ke);break;case"Sphere":Le=k(ke);break;case"ElevationGrid":Le=R(ke);break;case"Extrusion":Le=F(ke);break;case"Color":case"Coordinate":case"Normal":case"TextureCoordinate":Le=y(ke);break;case"WorldInfo":Le=x(ke);break;case"Anchor":case"Billboard":case"Inline":case"LOD":case"Switch":case"AudioClip":case"DirectionalLight":case"PointLight":case"Script":case"Sound":case"SpotLight":case"CylinderSensor":case"PlaneSensor":case"ProximitySensor":case"SphereSensor":case"TimeSensor":case"TouchSensor":case"VisibilitySensor":case"Text":case"FontStyle":case"MovieTexture":case"ColorInterpolator":case"CoordinateInterpolator":case"NormalInterpolator":case"OrientationInterpolator":case"PositionInterpolator":case"ScalarInterpolator":case"Fog":case"NavigationInfo":case"Viewpoint":break;default:console.warn("THREE.VRMLLoader: Unknown node:",Ce);break}return Le!==void 0&&ke.DEF!==void 0&&Le.hasOwnProperty("name")===!0&&(Le.name=ke.DEF),Le}function u(ke){const Ce=new lh,Le=ke.fields;for(let Ye=0,tt=Le.length;Ye<tt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case"bboxCenter":break;case"bboxSize":break;case"center":break;case"children":U(nt,Ce);break;case"collide":break;case"rotation":const gt=new jt(nt[0],nt[1],nt[2]).normalize(),bt=nt[3];Ce.quaternion.setFromAxisAngle(gt,bt);break;case"scale":Ce.scale.set(nt[0],nt[1],nt[2]);break;case"scaleOrientation":break;case"translation":Ce.position.set(nt[0],nt[1],nt[2]);break;case"proxy":break;default:console.warn("THREE.VRMLLoader: Unknown field:",at);break}}return Ce}function g(ke){const Ce=new lh;let Le,Ye,tt,At;const at=ke.fields;for(let gt=0,bt=at.length;gt<bt;gt++){const Ct=at[gt],Dt=Ct.name,kt=Ct.values;switch(Dt){case"groundAngle":Le=kt;break;case"groundColor":Ye=kt;break;case"backUrl":break;case"bottomUrl":break;case"frontUrl":break;case"leftUrl":break;case"rightUrl":break;case"topUrl":break;case"skyAngle":tt=kt;break;case"skyColor":At=kt;break;default:console.warn("THREE.VRMLLoader: Unknown field:",Dt);break}}const nt=1e4;if(At){const gt=new WR(nt,32,16),bt=new fE({fog:!1,side:uI,depthWrite:!1,depthTest:!1});At.length>3?(we(gt,nt,tt,Pe(At),!0),bt.vertexColors=!0):bt.color.setRGB(At[0],At[1],At[2]);const Ct=new Er(gt,bt);Ce.add(Ct)}if(Ye&&Ye.length>0){const gt=new WR(nt,32,16,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),bt=new fE({fog:!1,side:uI,vertexColors:!0,depthWrite:!1,depthTest:!1});we(gt,nt,Le,Pe(Ye),!1);const Ct=new Er(gt,bt);Ce.add(Ct)}return Ce.renderOrder=-1/0,Ce}function h(ke){const Ce=ke.fields;let Le=new fE({color:0}),Ye;for(let At=0,at=Ce.length;At<at;At++){const nt=Ce[At],gt=nt.name,bt=nt.values;switch(gt){case"appearance":bt[0]!==null&&(Le=c(bt[0]));break;case"geometry":bt[0]!==null&&(Ye=c(bt[0]));break;default:console.warn("THREE.VRMLLoader: Unknown field:",gt);break}}let tt;if(Ye&&Ye.attributes.position){const At=Ye._type;if(At==="points"){const at=new zR({color:16777215});Ye.attributes.color!==void 0?at.vertexColors=!0:Le.isMeshPhongMaterial&&at.color.copy(Le.emissive),tt=new Wq(Ye,at)}else if(At==="line"){const at=new VR({color:16777215});Ye.attributes.color!==void 0?at.vertexColors=!0:Le.isMeshPhongMaterial&&at.color.copy(Le.emissive),tt=new Jq(Ye,at)}else Ye._solid!==void 0&&(Le.side=Ye._solid?mE:r_),Ye.attributes.color!==void 0&&(Le.vertexColors=!0),tt=new Er(Ye,Le)}else tt=new T0,tt.visible=!1;return tt}function d(ke){let Ce=new ike,Le;const Ye=ke.fields;for(let tt=0,At=Ye.length;tt<At;tt++){const at=Ye[tt],nt=at.name,gt=at.values;switch(nt){case"material":if(gt[0]!==null){const Ct=c(gt[0]);Ct.diffuseColor&&Ce.color.copy(Ct.diffuseColor),Ct.emissiveColor&&Ce.emissive.copy(Ct.emissiveColor),Ct.shininess&&(Ce.shininess=Ct.shininess),Ct.specularColor&&Ce.specular.copy(Ct.specularColor),Ct.transparency&&(Ce.opacity=1-Ct.transparency),Ct.transparency>0&&(Ce.transparent=!0)}else Ce=new fE({color:0});break;case"texture":const bt=gt[0];bt!==null&&(bt.name==="ImageTexture"||bt.name==="PixelTexture")&&(Ce.map=c(bt));break;case"textureTransform":gt[0]!==null&&(Le=c(gt[0]));break;default:console.warn("THREE.VRMLLoader: Unknown field:",nt);break}}if(Ce.map){if(Ce.map.__type){switch(Ce.map.__type){case zB.INTENSITY_ALPHA:Ce.opacity=1;break;case zB.RGB:Ce.color.set(16777215);break;case zB.RGBA:Ce.color.set(16777215),Ce.opacity=1;break}delete Ce.map.__type}Le&&(Ce.map.center.copy(Le.center),Ce.map.rotation=Le.rotation,Ce.map.repeat.copy(Le.scale),Ce.map.offset.copy(Le.translation))}return Ce}function p(ke){const Ce={},Le=ke.fields;for(let Ye=0,tt=Le.length;Ye<tt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case"ambientIntensity":break;case"diffuseColor":Ce.diffuseColor=new Vi(nt[0],nt[1],nt[2]);break;case"emissiveColor":Ce.emissiveColor=new Vi(nt[0],nt[1],nt[2]);break;case"shininess":Ce.shininess=nt[0];break;case"specularColor":Ce.emissiveColor=new Vi(nt[0],nt[1],nt[2]);break;case"transparency":Ce.transparency=nt[0];break;default:console.warn("THREE.VRMLLoader: Unknown field:",at);break}}return Ce}function m(ke,Ce,Le){let Ye;switch(Ce){case zB.INTENSITY:Ye=parseInt(ke),Le.r=Ye,Le.g=Ye,Le.b=Ye,Le.a=1;break;case zB.INTENSITY_ALPHA:Ye=parseInt("0x"+ke.substring(2,4)),Le.r=Ye,Le.g=Ye,Le.b=Ye,Le.a=parseInt("0x"+ke.substring(4,6));break;case zB.RGB:Le.r=parseInt("0x"+ke.substring(2,4)),Le.g=parseInt("0x"+ke.substring(4,6)),Le.b=parseInt("0x"+ke.substring(6,8)),Le.a=1;break;case zB.RGBA:Le.r=parseInt("0x"+ke.substring(2,4)),Le.g=parseInt("0x"+ke.substring(4,6)),Le.b=parseInt("0x"+ke.substring(6,8)),Le.a=parseInt("0x"+ke.substring(8,10));break}}function _(ke){let Ce;switch(ke){case 1:Ce=zB.INTENSITY;break;case 2:Ce=zB.INTENSITY_ALPHA;break;case 3:Ce=zB.RGB;break;case 4:Ce=zB.RGBA;break}return Ce}function f(ke){let Ce,Le=c4,Ye=c4;const tt=ke.fields;for(let At=0,at=tt.length;At<at;At++){const nt=tt[At],gt=nt.name,bt=nt.values;switch(gt){case"image":const Ct=bt[0],Dt=bt[1],kt=bt[2],it=_(kt),Yt=new Uint8Array(4*Ct*Dt),pn={r:0,g:0,b:0,a:0};for(let be=3,et=0,It=bt.length;be<It;be++,et++){m(bt[be],it,pn);const Bt=et*4;Yt[Bt+0]=pn.r,Yt[Bt+1]=pn.g,Yt[Bt+2]=pn.b,Yt[Bt+3]=pn.a}Ce=new OTe(Yt,Ct,Dt),Ce.needsUpdate=!0,Ce.__type=it;break;case"repeatS":bt[0]===!1&&(Le=Xy);break;case"repeatT":bt[0]===!1&&(Ye=Xy);break;default:console.warn("THREE.VRMLLoader: Unknown field:",gt);break}}return Ce&&(Ce.wrapS=Le,Ce.wrapT=Ye),Ce}function I(ke){let Ce,Le=c4,Ye=c4;const tt=ke.fields;for(let At=0,at=tt.length;At<at;At++){const nt=tt[At],gt=nt.name,bt=nt.values;switch(gt){case"url":const Ct=bt[0];Ct&&(Ce=Te.load(Ct));break;case"repeatS":bt[0]===!1&&(Le=Xy);break;case"repeatT":bt[0]===!1&&(Ye=Xy);break;default:console.warn("THREE.VRMLLoader: Unknown field:",gt);break}}return Ce&&(Ce.wrapS=Le,Ce.wrapT=Ye),Ce}function C(ke){const Ce={center:new ni,rotation:new ni,scale:new ni,translation:new ni},Le=ke.fields;for(let Ye=0,tt=Le.length;Ye<tt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case"center":Ce.center.set(nt[0],nt[1]);break;case"rotation":Ce.rotation=nt[0];break;case"scale":Ce.scale.set(nt[0],nt[1]);break;case"translation":Ce.translation.set(nt[0],nt[1]);break;default:console.warn("THREE.VRMLLoader: Unknown field:",at);break}}return Ce}function y(ke){return ke.fields[0].values}function x(ke){const Ce={},Le=ke.fields;for(let Ye=0,tt=Le.length;Ye<tt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case"title":Ce.title=nt[0];break;case"info":Ce.info=nt;break;default:console.warn("THREE.VRMLLoader: Unknown field:",at);break}}return Ce}function E(ke){let Ce,Le,Ye,tt,At=!0,at=!0,nt=0,gt,bt,Ct,Dt,kt=!0,it=!0;const Yt=ke.fields;for(let st=0,xt=Yt.length;st<xt;st++){const Xe=Yt[st],Ze=Xe.name,dt=Xe.values;switch(Ze){case"color":const Ut=dt[0];Ut!==null&&(Ce=c(Ut));break;case"coord":const Wt=dt[0];Wt!==null&&(Le=c(Wt));break;case"normal":const Xt=dt[0];Xt!==null&&(Ye=c(Xt));break;case"texCoord":const Jt=dt[0];Jt!==null&&(tt=c(Jt));break;case"ccw":At=dt[0];break;case"colorIndex":gt=dt;break;case"colorPerVertex":kt=dt[0];break;case"convex":break;case"coordIndex":bt=dt;break;case"creaseAngle":nt=dt[0];break;case"normalIndex":Ct=dt;break;case"normalPerVertex":it=dt[0];break;case"solid":at=dt[0];break;case"texCoordIndex":Dt=dt;break;default:console.warn("THREE.VRMLLoader: Unknown field:",Ze);break}}if(bt===void 0)return console.warn("THREE.VRMLLoader: Missing coordIndex."),new Zl;const pn=Y(bt,At);let be,et,It;if(Ce)if(kt===!0)if(gt&&gt.length>0){const st=Y(gt,At);be=ue(pn,st,Ce,3)}else be=ye(pn,new Bs(Ce,3));else if(gt&&gt.length>0){const st=te(Ce,gt),xt=W(st,bt);be=fe(pn,xt)}else{const st=W(Ce,bt);be=fe(pn,st)}if(Ye)if(it===!0)if(Ct&&Ct.length>0){const st=Y(Ct,At);et=ue(pn,st,Ye,3)}else et=ye(pn,new Bs(Ye,3));else if(Ct&&Ct.length>0){const st=te(Ye,Ct),xt=W(st,bt);et=fe(pn,xt)}else{const st=W(Ye,bt);et=fe(pn,st)}else et=he(pn,Le,nt);if(tt)if(Dt&&Dt.length>0){const st=Y(Dt,At);It=ue(pn,st,tt,2)}else It=ye(pn,new Bs(tt,2));const Bt=new Zl,mt=ye(pn,new Bs(Le,3));return Bt.setAttribute("position",mt),Bt.setAttribute("normal",et),be&&Bt.setAttribute("color",be),It&&Bt.setAttribute("uv",It),Bt._solid=at,Bt._type="mesh",Bt}function B(ke){let Ce,Le,Ye,tt,At=!0;const at=ke.fields;for(let Dt=0,kt=at.length;Dt<kt;Dt++){const it=at[Dt],Yt=it.name,pn=it.values;switch(Yt){case"color":const be=pn[0];be!==null&&(Ce=c(be));break;case"coord":const et=pn[0];et!==null&&(Le=c(et));break;case"colorIndex":Ye=pn;break;case"colorPerVertex":At=pn[0];break;case"coordIndex":tt=pn;break;default:console.warn("THREE.VRMLLoader: Unknown field:",Yt);break}}let nt;const gt=j(tt);if(Ce)if(At===!0)if(Ye.length>0){const Dt=j(Ye);nt=ue(gt,Dt,Ce,3)}else nt=ye(gt,new Bs(Ce,3));else if(Ye.length>0){const Dt=te(Ce,Ye),kt=J(Dt,tt);nt=pe(gt,kt)}else{const Dt=J(Ce,tt);nt=pe(gt,Dt)}const bt=new Zl,Ct=ye(gt,new Bs(Le,3));return bt.setAttribute("position",Ct),nt&&bt.setAttribute("color",nt),bt._type="line",bt}function S(ke){let Ce,Le;const Ye=ke.fields;for(let At=0,at=Ye.length;At<at;At++){const nt=Ye[At],gt=nt.name,bt=nt.values;switch(gt){case"color":const Ct=bt[0];Ct!==null&&(Ce=c(Ct));break;case"coord":const Dt=bt[0];Dt!==null&&(Le=c(Dt));break;default:console.warn("THREE.VRMLLoader: Unknown field:",gt);break}}const tt=new Zl;return tt.setAttribute("position",new Bs(Le,3)),Ce&&tt.setAttribute("color",new Bs(Ce,3)),tt._type="points",tt}function Q(ke){const Ce=new jt(2,2,2),Le=ke.fields;for(let tt=0,At=Le.length;tt<At;tt++){const at=Le[tt],nt=at.name,gt=at.values;nt==="size"?(Ce.x=gt[0],Ce.y=gt[1],Ce.z=gt[2]):console.warn("THREE.VRMLLoader: Unknown field:",nt)}return new Yx(Ce.x,Ce.y,Ce.z)}function w(ke){let Ce=1,Le=2,Ye=!1;const tt=ke.fields;for(let at=0,nt=tt.length;at<nt;at++){const gt=tt[at],bt=gt.name,Ct=gt.values;switch(bt){case"bottom":Ye=!Ct[0];break;case"bottomRadius":Ce=Ct[0];break;case"height":Le=Ct[0];break;case"side":break;default:console.warn("THREE.VRMLLoader: Unknown field:",bt);break}}return new ZTe(Ce,Le,16,1,Ye)}function M(ke){let Ce=1,Le=2;const Ye=ke.fields;for(let At=0,at=Ye.length;At<at;At++){const nt=Ye[At],gt=nt.name,bt=nt.values;switch(gt){case"bottom":break;case"radius":Ce=bt[0];break;case"height":Le=bt[0];break;case"side":break;case"top":break;default:console.warn("THREE.VRMLLoader: Unknown field:",gt);break}}return new lY(Ce,Ce,Le,16,1)}function k(ke){let Ce=1;const Le=ke.fields;for(let tt=0,At=Le.length;tt<At;tt++){const at=Le[tt],nt=at.name,gt=at.values;nt==="radius"?Ce=gt[0]:console.warn("THREE.VRMLLoader: Unknown field:",nt)}return new WR(Ce,16,16)}function R(ke){let Ce,Le,Ye,tt,At=!0,at=!0,nt=!0,gt=!0,bt=0,Ct=2,Dt=2,kt=1,it=1;const Yt=ke.fields;for(let dt=0,Ut=Yt.length;dt<Ut;dt++){const Wt=Yt[dt],Xt=Wt.name,Jt=Wt.values;switch(Xt){case"color":const yn=Jt[0];yn!==null&&(Ce=c(yn));break;case"normal":const An=Jt[0];An!==null&&(Le=c(An));break;case"texCoord":const kn=Jt[0];kn!==null&&(Ye=c(kn));break;case"height":tt=Jt;break;case"ccw":gt=Jt[0];break;case"colorPerVertex":At=Jt[0];break;case"creaseAngle":bt=Jt[0];break;case"normalPerVertex":at=Jt[0];break;case"solid":nt=Jt[0];break;case"xDimension":Ct=Jt[0];break;case"xSpacing":kt=Jt[0];break;case"zDimension":Dt=Jt[0];break;case"zSpacing":it=Jt[0];break;default:console.warn("THREE.VRMLLoader: Unknown field:",Xt);break}}const pn=[],be=[],et=[],It=[];for(let dt=0;dt<Dt;dt++)for(let Ut=0;Ut<Ct;Ut++){const Wt=dt*Ct+Ut,Xt=kt*dt,Jt=tt[Wt],yn=it*Ut;if(pn.push(Xt,Jt,yn),Ce&&At===!0){const An=Ce[Wt*3+0],kn=Ce[Wt*3+1],$n=Ce[Wt*3+2];et.push(An,kn,$n)}if(Le&&at===!0){const An=Le[Wt*3+0],kn=Le[Wt*3+1],$n=Le[Wt*3+2];be.push(An,kn,$n)}if(Ye){const An=Ye[Wt*2+0],kn=Ye[Wt*2+1];It.push(An,kn)}else It.push(dt/(Ct-1),Ut/(Dt-1))}const Bt=[];for(let dt=0;dt<Ct-1;dt++)for(let Ut=0;Ut<Dt-1;Ut++){const Wt=dt+Ut*Ct,Xt=dt+(Ut+1)*Ct,Jt=dt+1+(Ut+1)*Ct,yn=dt+1+Ut*Ct;gt===!0?(Bt.push(Wt,Jt,Xt),Bt.push(Jt,Wt,yn)):(Bt.push(Wt,Xt,Jt),Bt.push(Jt,yn,Wt))}const mt=ye(Bt,new Bs(pn,3)),st=ye(Bt,new Bs(It,2));let xt,Xe;if(Ce)if(At===!1){for(let dt=0;dt<Ct-1;dt++)for(let Ut=0;Ut<Dt-1;Ut++){const Wt=dt+Ut*(Ct-1),Xt=Ce[Wt*3+0],Jt=Ce[Wt*3+1],yn=Ce[Wt*3+2];et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn)}xt=new Bs(et,3)}else xt=ye(Bt,new Bs(et,3));if(Le)if(at===!1){for(let dt=0;dt<Ct-1;dt++)for(let Ut=0;Ut<Dt-1;Ut++){const Wt=dt+Ut*(Ct-1),Xt=Le[Wt*3+0],Jt=Le[Wt*3+1],yn=Le[Wt*3+2];be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn)}Xe=new Bs(be,3)}else Xe=ye(Bt,new Bs(be,3));else Xe=he(Bt,pn,bt);const Ze=new Zl;return Ze.setAttribute("position",mt),Ze.setAttribute("normal",Xe),Ze.setAttribute("uv",st),xt&&Ze.setAttribute("color",xt),Ze._solid=nt,Ze._type="mesh",Ze}function F(ke){let Ce=[1,1,1,-1,-1,-1,-1,1,1,1],Le=[0,0,0,0,1,0],Ye,tt,At=!0,at=!0,nt=0,gt=!0,bt=!0;const Ct=ke.fields;for(let Ze=0,dt=Ct.length;Ze<dt;Ze++){const Ut=Ct[Ze],Wt=Ut.name,Xt=Ut.values;switch(Wt){case"beginCap":At=Xt[0];break;case"ccw":at=Xt[0];break;case"convex":break;case"creaseAngle":nt=Xt[0];break;case"crossSection":Ce=Xt;break;case"endCap":gt=Xt[0];break;case"orientation":tt=Xt;break;case"scale":Ye=Xt;break;case"solid":bt=Xt[0];break;case"spine":Le=Xt;break;default:console.warn("THREE.VRMLLoader: Unknown field:",Wt);break}}const Dt=Ce[0]===Ce[Ce.length-2]&&Ce[1]===Ce[Ce.length-1],kt=[],it=new jt,Yt=new jt,pn=new jt,be=new jt,et=new Zy;for(let Ze=0,dt=0,Ut=0,Wt=Le.length;Ze<Wt;Ze+=3,dt+=2,Ut+=4){it.fromArray(Le,Ze),Yt.x=Ye?Ye[dt+0]:1,Yt.y=1,Yt.z=Ye?Ye[dt+1]:1,pn.x=tt?tt[Ut+0]:0,pn.y=tt?tt[Ut+1]:0,pn.z=tt?tt[Ut+2]:1;const Xt=tt?tt[Ut+3]:0;for(let Jt=0,yn=Ce.length;Jt<yn;Jt+=2)be.x=Ce[Jt+0],be.y=0,be.z=Ce[Jt+1],be.multiply(Yt),et.setFromAxisAngle(pn,Xt),be.applyQuaternion(et),be.add(it),kt.push(be.x,be.y,be.z)}const It=[],Bt=Le.length/3,mt=Ce.length/2;for(let Ze=0;Ze<Bt-1;Ze++)for(let dt=0;dt<mt-1;dt++){const Ut=dt+Ze*mt;let Wt=dt+1+Ze*mt;const Xt=dt+(Ze+1)*mt;let Jt=dt+1+(Ze+1)*mt;dt===mt-2&&Dt===!0&&(Wt=Ze*mt,Jt=(Ze+1)*mt),at===!0?(It.push(Ut,Wt,Xt),It.push(Xt,Wt,Jt)):(It.push(Ut,Xt,Wt),It.push(Xt,Jt,Wt))}if(At===!0||gt===!0){const Ze=[];for(let Wt=0,Xt=Ce.length;Wt<Xt;Wt+=2)Ze.push(new ni(Ce[Wt],Ce[Wt+1]));const dt=gY.triangulateShape(Ze,[]),Ut=[];for(let Wt=0,Xt=dt.length;Wt<Xt;Wt++){const Jt=dt[Wt];Ut.push(Jt[0],Jt[1],Jt[2])}if(At===!0)for(let Wt=0,Xt=Ut.length;Wt<Xt;Wt+=3)at===!0?It.push(Ut[Wt+0],Ut[Wt+1],Ut[Wt+2]):It.push(Ut[Wt+0],Ut[Wt+2],Ut[Wt+1]);if(gt===!0){const Wt=mt*(Bt-1);for(let Xt=0,Jt=Ut.length;Xt<Jt;Xt+=3)at===!0?It.push(Wt+Ut[Xt+0],Wt+Ut[Xt+2],Wt+Ut[Xt+1]):It.push(Wt+Ut[Xt+0],Wt+Ut[Xt+1],Wt+Ut[Xt+2])}}const st=ye(It,new Bs(kt,3)),xt=he(It,kt,nt),Xe=new Zl;return Xe.setAttribute("position",st),Xe.setAttribute("normal",xt),Xe._solid=bt,Xe._type="mesh",Xe}function O(ke){const Ce=o[ke],Le=c(Ce);return Le.isObject3D||Le.isMaterial?Le.clone():Le}function U(ke,Ce){for(let Le=0,Ye=ke.length;Le<Ye;Le++){const tt=c(ke[Le]);tt instanceof T0&&Ce.add(tt)}}function Y(ke,Ce){const Le=[];let Ye=0;for(let tt=0,At=ke.length;tt<At;tt++){const at=ke[Ye],nt=ke[tt+(Ce?1:2)],gt=ke[tt+(Ce?2:1)];Le.push(at,nt,gt),(ke[tt+3]===-1||tt+3>=At)&&(tt+=3,Ye=tt+1)}return Le}function W(ke,Ce){const Le=[];let Ye=0;for(let tt=0,At=Ce.length;tt<At;tt++){const at=Ye*3,nt=ke[at],gt=ke[at+1],bt=ke[at+2];Le.push(nt,gt,bt),(Ce[tt+3]===-1||tt+3>=At)&&(tt+=3,Ye++)}return Le}function te(ke,Ce){const Le=[];for(let Ye=0,tt=Ce.length;Ye<tt;Ye++){const at=Ce[Ye]*3,nt=ke[at],gt=ke[at+1],bt=ke[at+2];Le.push(nt,gt,bt)}return Le}function j(ke){const Ce=[];for(let Le=0,Ye=ke.length;Le<Ye;Le++){const tt=ke[Le],At=ke[Le+1];Ce.push(tt,At),(ke[Le+2]===-1||Le+2>=Ye)&&(Le+=2)}return Ce}function J(ke,Ce){const Le=[];let Ye=0;for(let tt=0,At=Ce.length;tt<At;tt++){const at=Ye*3,nt=ke[at],gt=ke[at+1],bt=ke[at+2];Le.push(nt,gt,bt),(Ce[tt+2]===-1||tt+2>=At)&&(tt+=2,Ye++)}return Le}const oe=new jt,ie=new jt,ne=new jt,le=new ni,ge=new ni,_e=new ni;function ue(ke,Ce,Le,Ye){const tt=[];for(let At=0,at=ke.length;At<at;At+=3){const nt=Ce[At],gt=Ce[At+1],bt=Ce[At+2];Ye===2?(le.fromArray(Le,nt*Ye),ge.fromArray(Le,gt*Ye),_e.fromArray(Le,bt*Ye),tt.push(le.x,le.y),tt.push(ge.x,ge.y),tt.push(_e.x,_e.y)):(oe.fromArray(Le,nt*Ye),ie.fromArray(Le,gt*Ye),ne.fromArray(Le,bt*Ye),tt.push(oe.x,oe.y,oe.z),tt.push(ie.x,ie.y,ie.z),tt.push(ne.x,ne.y,ne.z))}return new Bs(tt,Ye)}function fe(ke,Ce){const Le=[];for(let Ye=0,tt=0,At=ke.length;Ye<At;Ye+=3,tt++)oe.fromArray(Ce,tt*3),Le.push(oe.x,oe.y,oe.z),Le.push(oe.x,oe.y,oe.z),Le.push(oe.x,oe.y,oe.z);return new Bs(Le,3)}function pe(ke,Ce){const Le=[];for(let Ye=0,tt=0,At=ke.length;Ye<At;Ye+=2,tt++)oe.fromArray(Ce,tt*3),Le.push(oe.x,oe.y,oe.z),Le.push(oe.x,oe.y,oe.z);return new Bs(Le,3)}function ye(ke,Ce){const Le=Ce.array,Ye=Ce.itemSize,tt=new Le.constructor(ke.length*Ye);let At=0,at=0;for(let nt=0,gt=ke.length;nt<gt;nt++){At=ke[nt]*Ye;for(let bt=0;bt<Ye;bt++)tt[at++]=Le[At++]}return new Bs(tt,Ye)}const Me=new jt,ve=new jt;function he(ke,Ce,Le){const Ye=[],tt={};for(let at=0,nt=ke.length;at<nt;at+=3){const gt=ke[at],bt=ke[at+1],Ct=ke[at+2],Dt=new Coi(gt,bt,Ct);oe.fromArray(Ce,gt*3),ie.fromArray(Ce,bt*3),ne.fromArray(Ce,Ct*3),ve.subVectors(ne,ie),Me.subVectors(oe,ie),ve.cross(Me),ve.normalize(),Dt.normal.copy(ve),tt[gt]===void 0&&(tt[gt]=[]),tt[bt]===void 0&&(tt[bt]=[]),tt[Ct]===void 0&&(tt[Ct]=[]),tt[gt].push(Dt.normal),tt[bt].push(Dt.normal),tt[Ct].push(Dt.normal),Ye.push(Dt)}const At=[];for(let at=0,nt=Ye.length;at<nt;at++){const gt=Ye[at],bt=Qe(tt[gt.a],gt.normal,Le),Ct=Qe(tt[gt.b],gt.normal,Le),Dt=Qe(tt[gt.c],gt.normal,Le);oe.fromArray(Ce,gt.a*3),ie.fromArray(Ce,gt.b*3),ne.fromArray(Ce,gt.c*3),At.push(bt.x,bt.y,bt.z),At.push(Ct.x,Ct.y,Ct.z),At.push(Dt.x,Dt.y,Dt.z)}return new Bs(At,3)}function Qe(ke,Ce,Le){const Ye=new jt;if(Le===0)Ye.copy(Ce);else for(let tt=0,At=ke.length;tt<At;tt++)ke[tt].angleTo(Ce)<Le&&Ye.add(ke[tt]);return Ye.normalize()}function Pe(ke){const Ce=[];for(let Le=0,Ye=ke.length;Le<Ye;Le+=3)Ce.push(new Vi(ke[Le],ke[Le+1],ke[Le+2]));return Ce}function we(ke,Ce,Le,Ye,tt){const At=[],at=tt===!0?0:Math.PI;for(let kt=0,it=Ye.length;kt<it;kt++){let Yt=kt===0?0:Le[kt-1];Yt=tt===!0?Yt:at-Yt;const pn=new jt;pn.setFromSphericalCoords(Ce,Yt,0),At.push(pn)}const nt=ke.index,gt=ke.attributes.position,bt=new tg(new Float32Array(ke.attributes.position.count*3),3),Ct=new jt,Dt=new Vi;for(let kt=0;kt<nt.count;kt++){const it=nt.getX(kt);Ct.fromBufferAttribute(gt,it);let Yt,pn,be=1;for(let Bt=1;Bt<At.length;Bt++){Yt=Bt-1,pn=Bt;const mt=At[Yt],st=At[pn];if(tt===!0){if(Ct.y<=mt.y&&Ct.y>st.y){be=Math.abs(mt.y-Ct.y)/Math.abs(mt.y-st.y);break}}else if(Ct.y>=mt.y&&Ct.y<st.y){be=Math.abs(mt.y-Ct.y)/Math.abs(mt.y-st.y);break}}const et=Ye[Yt],It=Ye[pn];Dt.copy(et).lerp(It,be),bt.setXYZ(it,Dt.r,Dt.g,Dt.b)}ke.setAttribute("color",bt)}const Te=new rke(this.manager);if(Te.setPath(this.resourcePath||n).setCrossOrigin(this.crossOrigin),e.indexOf("#VRML V2.0")===-1)throw Error("THREE.VRMLLexer: Version of VRML asset not supported.");const Re=i(e);return a(Re)}}class foi{constructor(e){this.lexer=new Eke(e)}lex(e){const n=this.lexer.tokenize(e);if(n.errors.length>0)throw console.error(n.errors),Error("THREE.VRMLLexer: Lexing errors detected.");return n}}class Ioi extends moi{constructor(e){super(e);const n=this,o=e.Version,i=e.LCurly,r=e.RCurly,s=e.LSquare,a=e.RSquare,A=e.Identifier,c=e.RouteIdentifier,l=e.StringLiteral,u=e.HexLiteral,g=e.NumberLiteral,h=e.TrueLiteral,d=e.FalseLiteral,p=e.NullLiteral,m=e.DEF,_=e.USE,f=e.ROUTE,I=e.TO,C=e.NodeName;n.RULE("vrml",function(){n.SUBRULE(n.version),n.AT_LEAST_ONE(function(){n.SUBRULE(n.node)}),n.MANY(function(){n.SUBRULE(n.route)})}),n.RULE("version",function(){n.CONSUME(o)}),n.RULE("node",function(){n.OPTION(function(){n.SUBRULE(n.def)}),n.CONSUME(C),n.CONSUME(i),n.MANY(function(){n.SUBRULE(n.field)}),n.CONSUME(r)}),n.RULE("field",function(){n.CONSUME(A),n.OR2([{ALT:function(){n.SUBRULE(n.singleFieldValue)}},{ALT:function(){n.SUBRULE(n.multiFieldValue)}}])}),n.RULE("def",function(){n.CONSUME(m),n.OR([{ALT:function(){n.CONSUME(A)}},{ALT:function(){n.CONSUME(C)}}])}),n.RULE("use",function(){n.CONSUME(_),n.OR([{ALT:function(){n.CONSUME(A)}},{ALT:function(){n.CONSUME(C)}}])}),n.RULE("singleFieldValue",function(){n.AT_LEAST_ONE(function(){n.OR([{ALT:function(){n.SUBRULE(n.node)}},{ALT:function(){n.SUBRULE(n.use)}},{ALT:function(){n.CONSUME(l)}},{ALT:function(){n.CONSUME(u)}},{ALT:function(){n.CONSUME(g)}},{ALT:function(){n.CONSUME(h)}},{ALT:function(){n.CONSUME(d)}},{ALT:function(){n.CONSUME(p)}}])})}),n.RULE("multiFieldValue",function(){n.CONSUME(s),n.MANY(function(){n.OR([{ALT:function(){n.SUBRULE(n.node)}},{ALT:function(){n.SUBRULE(n.use)}},{ALT:function(){n.CONSUME(l)}},{ALT:function(){n.CONSUME(u)}},{ALT:function(){n.CONSUME(g)}},{ALT:function(){n.CONSUME(p)}}])}),n.CONSUME(a)}),n.RULE("route",function(){n.CONSUME(f),n.CONSUME(c),n.CONSUME(I),n.CONSUME2(c)}),this.performSelfAnalysis()}}let Coi=class{constructor(e,n,o){this.a=e,this.b=n,this.c=o,this.normal=new jt}};const zB={INTENSITY:1,INTENSITY_ALPHA:2,RGB:3,RGBA:4},yoi=/^[og]\s*(.+)?/,xoi=/^mtllib /,Eoi=/^usemtl /,Boi=/^usemap /,MJt=new jt,Bke=new jt,DJt=new jt,NJt=new jt,h4=new jt;function boi(){const t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,n){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=n!==!1;return}const o=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:n!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(i,r){const s=this._finalize(!1);s&&(s.inherited||s.groupCount<=0)&&this.materials.splice(s.index,1);const a={index:this.materials.length,name:i||"",mtllib:Array.isArray(r)&&r.length>0?r[r.length-1]:"",smooth:s!==void 0?s.smooth:this.smooth,groupStart:s!==void 0?s.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(A){const c={index:typeof A=="number"?A:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(i){const r=this.currentMaterial();if(r&&r.groupEnd===-1&&(r.groupEnd=this.geometry.vertices.length/3,r.groupCount=r.groupEnd-r.groupStart,r.inherited=!1),i&&this.materials.length>1)for(let s=this.materials.length-1;s>=0;s--)this.materials[s].groupCount<=0&&this.materials.splice(s,1);return i&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),r}},o&&o.name&&typeof o.clone=="function"){const i=o.clone(0);i.inherited=!0,this.object.materials.push(i)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,n){const o=parseInt(e,10);return(o>=0?o-1:o+n/3)*3},parseNormalIndex:function(e,n){const o=parseInt(e,10);return(o>=0?o-1:o+n/3)*3},parseUVIndex:function(e,n){const o=parseInt(e,10);return(o>=0?o-1:o+n/2)*2},addVertex:function(e,n,o){const i=this.vertices,r=this.object.geometry.vertices;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[n+0],i[n+1],i[n+2]),r.push(i[o+0],i[o+1],i[o+2])},addVertexPoint:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addVertexLine:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addNormal:function(e,n,o){const i=this.normals,r=this.object.geometry.normals;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[n+0],i[n+1],i[n+2]),r.push(i[o+0],i[o+1],i[o+2])},addFaceNormal:function(e,n,o){const i=this.vertices,r=this.object.geometry.normals;MJt.fromArray(i,e),Bke.fromArray(i,n),DJt.fromArray(i,o),h4.subVectors(DJt,Bke),NJt.subVectors(MJt,Bke),h4.cross(NJt),h4.normalize(),r.push(h4.x,h4.y,h4.z),r.push(h4.x,h4.y,h4.z),r.push(h4.x,h4.y,h4.z)},addColor:function(e,n,o){const i=this.colors,r=this.object.geometry.colors;i[e]!==void 0&&r.push(i[e+0],i[e+1],i[e+2]),i[n]!==void 0&&r.push(i[n+0],i[n+1],i[n+2]),i[o]!==void 0&&r.push(i[o+0],i[o+1],i[o+2])},addUV:function(e,n,o){const i=this.uvs,r=this.object.geometry.uvs;r.push(i[e+0],i[e+1]),r.push(i[n+0],i[n+1]),r.push(i[o+0],i[o+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const n=this.uvs;this.object.geometry.uvs.push(n[e+0],n[e+1])},addFace:function(e,n,o,i,r,s,a,A,c){const l=this.vertices.length;let u=this.parseVertexIndex(e,l),g=this.parseVertexIndex(n,l),h=this.parseVertexIndex(o,l);if(this.addVertex(u,g,h),this.addColor(u,g,h),a!==void 0&&a!==""){const d=this.normals.length;u=this.parseNormalIndex(a,d),g=this.parseNormalIndex(A,d),h=this.parseNormalIndex(c,d),this.addNormal(u,g,h)}else this.addFaceNormal(u,g,h);if(i!==void 0&&i!==""){const d=this.uvs.length;u=this.parseUVIndex(i,d),g=this.parseUVIndex(r,d),h=this.parseUVIndex(s,d),this.addUV(u,g,h),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const n=this.vertices.length;for(let o=0,i=e.length;o<i;o++){const r=this.parseVertexIndex(e[o],n);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(e,n){this.object.geometry.type="Line";const o=this.vertices.length,i=this.uvs.length;for(let r=0,s=e.length;r<s;r++)this.addVertexLine(this.parseVertexIndex(e[r],o));for(let r=0,s=n.length;r<s;r++)this.addUVLine(this.parseUVIndex(n[r],i))}};return t.startObject("",!1),t}class Soi extends x6{constructor(e){super(e),this.materials=null}load(e,n,o,i){const r=this,s=new fY(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(r.parse(a))}catch(A){i?i(A):console.error(A),r.manager.itemError(e)}},o,i)}setMaterials(e){return this.materials=e,this}parse(e){const n=new boi;e.indexOf(`\r
`)!==-1&&(e=e.replace(/\r\n/g,`
`)),e.indexOf(`\\
`)!==-1&&(e=e.replace(/\\\n/g,""));const o=e.split(`
`);let i="",r="",s=0,a=[];const A=typeof"".trimLeft=="function";for(let u=0,g=o.length;u<g;u++)if(i=o[u],i=A?i.trimLeft():i.trim(),s=i.length,s!==0&&(r=i.charAt(0),r!=="#"))if(r==="v"){const h=i.split(/\s+/);switch(h[0]){case"v":n.vertices.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3])),h.length>=7?n.colors.push(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])):n.colors.push(void 0,void 0,void 0);break;case"vn":n.normals.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));break;case"vt":n.uvs.push(parseFloat(h[1]),parseFloat(h[2]));break}}else if(r==="f"){const d=i.substr(1).trim().split(/\s+/),p=[];for(let _=0,f=d.length;_<f;_++){const I=d[_];if(I.length>0){const C=I.split("/");p.push(C)}}const m=p[0];for(let _=1,f=p.length-1;_<f;_++){const I=p[_],C=p[_+1];n.addFace(m[0],I[0],C[0],m[1],I[1],C[1],m[2],I[2],C[2])}}else if(r==="l"){const h=i.substring(1).trim().split(" ");let d=[];const p=[];if(i.indexOf("/")===-1)d=h;else for(let m=0,_=h.length;m<_;m++){const f=h[m].split("/");f[0]!==""&&d.push(f[0]),f[1]!==""&&p.push(f[1])}n.addLineGeometry(d,p)}else if(r==="p"){const d=i.substr(1).trim().split(" ");n.addPointGeometry(d)}else if((a=yoi.exec(i))!==null){const h=(" "+a[0].substr(1).trim()).substr(1);n.startObject(h)}else if(Eoi.test(i))n.object.startMaterial(i.substring(7).trim(),n.materialLibraries);else if(xoi.test(i))n.materialLibraries.push(i.substring(7).trim());else if(Boi.test(i))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(r==="s"){if(a=i.split(" "),a.length>1){const d=a[1].trim().toLowerCase();n.object.smooth=d!=="0"&&d!=="off"}else n.object.smooth=!0;const h=n.object.currentMaterial();h&&(h.smooth=n.object.smooth)}else{if(i==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+i+'"')}n.finalize();const c=new lh;if(c.materialLibraries=[].concat(n.materialLibraries),!(n.objects.length===1&&n.objects[0].geometry.vertices.length===0)===!0)for(let u=0,g=n.objects.length;u<g;u++){const h=n.objects[u],d=h.geometry,p=h.materials,m=d.type==="Line",_=d.type==="Points";let f=!1;if(d.vertices.length===0)continue;const I=new Zl;I.setAttribute("position",new Bs(d.vertices,3)),d.normals.length>0&&I.setAttribute("normal",new Bs(d.normals,3)),d.colors.length>0&&(f=!0,I.setAttribute("color",new Bs(d.colors,3))),d.hasUVIndices===!0&&I.setAttribute("uv",new Bs(d.uvs,2));const C=[];for(let x=0,E=p.length;x<E;x++){const B=p[x],S=B.name+"_"+B.smooth+"_"+f;let Q=n.materials[S];if(this.materials!==null){if(Q=this.materials.create(B.name),m&&Q&&!(Q instanceof VR)){const w=new VR;Gx.prototype.copy.call(w,Q),w.color.copy(Q.color),Q=w}else if(_&&Q&&!(Q instanceof zR)){const w=new zR({size:10,sizeAttenuation:!1});Gx.prototype.copy.call(w,Q),w.color.copy(Q.color),w.map=Q.map,Q=w}}Q===void 0&&(m?Q=new VR:_?Q=new zR({size:1,sizeAttenuation:!1}):Q=new ike,Q.name=B.name,Q.flatShading=!B.smooth,Q.vertexColors=f,n.materials[S]=Q),C.push(Q)}let y;if(C.length>1){for(let x=0,E=p.length;x<E;x++){const B=p[x];I.addGroup(B.groupStart,B.groupCount,x)}m?y=new Jq(I,C):_?y=new Wq(I,C):y=new Er(I,C)}else m?y=new Jq(I,C[0]):_?y=new Wq(I,C[0]):y=new Er(I,C[0]);y.name=h.name,c.add(y)}else if(n.vertices.length>0){const u=new zR({size:1,sizeAttenuation:!1}),g=new Zl;g.setAttribute("position",new Bs(n.vertices,3)),n.colors.length>0&&n.colors[0]!==void 0&&(g.setAttribute("color",new Bs(n.colors,3)),u.vertexColors=!0);const h=new Wq(g,u);c.add(h)}return c}}const RJt={type:"change"},bke={type:"start"},TJt={type:"end"},mhe=new zG,kJt=new nP,Qoi=Math.cos(70*OG.DEG2RAD);let voi=class extends RR{constructor(e,n){super(),this.object=e,this.domElement=n,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new jt,this.cursor=new jt,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Vw.ROTATE,MIDDLE:Vw.DOLLY,RIGHT:Vw.PAN},this.touches={ONE:SG.ROTATE,TWO:SG.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(be){be.addEventListener("keydown",at),this._domElementKeyEvents=be},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",at),this._domElementKeyEvents=null},this.saveState=function(){o.target0.copy(o.target),o.position0.copy(o.object.position),o.zoom0=o.object.zoom},this.reset=function(){o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),o.dispatchEvent(RJt),o.update(),r=i.NONE},this.update=(function(){const be=new jt,et=new Zy().setFromUnitVectors(e.up,new jt(0,1,0)),It=et.clone().invert(),Bt=new jt,mt=new Zy,st=new jt,xt=2*Math.PI;return function(Ze=null){const dt=o.object.position;be.copy(dt).sub(o.target),be.applyQuaternion(et),a.setFromVector3(be),o.autoRotate&&r===i.NONE&&M(Q(Ze)),o.enableDamping?(a.theta+=A.theta*o.dampingFactor,a.phi+=A.phi*o.dampingFactor):(a.theta+=A.theta,a.phi+=A.phi);let Ut=o.minAzimuthAngle,Wt=o.maxAzimuthAngle;isFinite(Ut)&&isFinite(Wt)&&(Ut<-Math.PI?Ut+=xt:Ut>Math.PI&&(Ut-=xt),Wt<-Math.PI?Wt+=xt:Wt>Math.PI&&(Wt-=xt),Ut<=Wt?a.theta=Math.max(Ut,Math.min(Wt,a.theta)):a.theta=a.theta>(Ut+Wt)/2?Math.max(Ut,a.theta):Math.min(Wt,a.theta)),a.phi=Math.max(o.minPolarAngle,Math.min(o.maxPolarAngle,a.phi)),a.makeSafe(),o.enableDamping===!0?o.target.addScaledVector(l,o.dampingFactor):o.target.add(l),o.target.sub(o.cursor),o.target.clampLength(o.minTargetRadius,o.maxTargetRadius),o.target.add(o.cursor);let Xt=!1;if(o.zoomToCursor&&x||o.object.isOrthographicCamera)a.radius=te(a.radius);else{const Jt=a.radius;a.radius=te(a.radius*c),Xt=Jt!=a.radius}if(be.setFromSpherical(a),be.applyQuaternion(It),dt.copy(o.target).add(be),o.object.lookAt(o.target),o.enableDamping===!0?(A.theta*=1-o.dampingFactor,A.phi*=1-o.dampingFactor,l.multiplyScalar(1-o.dampingFactor)):(A.set(0,0,0),l.set(0,0,0)),o.zoomToCursor&&x){let Jt=null;if(o.object.isPerspectiveCamera){const yn=be.length();Jt=te(yn*c);const An=yn-Jt;o.object.position.addScaledVector(C,An),o.object.updateMatrixWorld(),Xt=!!An}else if(o.object.isOrthographicCamera){const yn=new jt(y.x,y.y,0);yn.unproject(o.object);const An=o.object.zoom;o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/c)),o.object.updateProjectionMatrix(),Xt=An!==o.object.zoom;const kn=new jt(y.x,y.y,0);kn.unproject(o.object),o.object.position.sub(kn).add(yn),o.object.updateMatrixWorld(),Jt=be.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),o.zoomToCursor=!1;Jt!==null&&(this.screenSpacePanning?o.target.set(0,0,-1).transformDirection(o.object.matrix).multiplyScalar(Jt).add(o.object.position):(mhe.origin.copy(o.object.position),mhe.direction.set(0,0,-1).transformDirection(o.object.matrix),Math.abs(o.object.up.dot(mhe.direction))<Qoi?e.lookAt(o.target):(kJt.setFromNormalAndCoplanarPoint(o.object.up,o.target),mhe.intersectPlane(kJt,o.target))))}else if(o.object.isOrthographicCamera){const Jt=o.object.zoom;o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/c)),Jt!==o.object.zoom&&(o.object.updateProjectionMatrix(),Xt=!0)}return c=1,x=!1,Xt||Bt.distanceToSquared(o.object.position)>s||8*(1-mt.dot(o.object.quaternion))>s||st.distanceToSquared(o.target)>s?(o.dispatchEvent(RJt),Bt.copy(o.object.position),mt.copy(o.object.quaternion),st.copy(o.target),!0):!1}})(),this.dispose=function(){o.domElement.removeEventListener("contextmenu",bt),o.domElement.removeEventListener("pointerdown",Te),o.domElement.removeEventListener("pointercancel",Ee),o.domElement.removeEventListener("wheel",Le),o.domElement.removeEventListener("pointermove",Re),o.domElement.removeEventListener("pointerup",Ee),o.domElement.getRootNode().removeEventListener("keydown",tt,{capture:!0}),o._domElementKeyEvents!==null&&(o._domElementKeyEvents.removeEventListener("keydown",at),o._domElementKeyEvents=null)};const o=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let r=i.NONE;const s=1e-6,a=new dJt,A=new dJt;let c=1;const l=new jt,u=new ni,g=new ni,h=new ni,d=new ni,p=new ni,m=new ni,_=new ni,f=new ni,I=new ni,C=new jt,y=new ni;let x=!1;const E=[],B={};let S=!1;function Q(be){return be!==null?2*Math.PI/60*o.autoRotateSpeed*be:2*Math.PI/60/60*o.autoRotateSpeed}function w(be){const et=Math.abs(be*.01);return Math.pow(.95,o.zoomSpeed*et)}function M(be){A.theta-=be}function k(be){A.phi-=be}const R=(function(){const be=new jt;return function(It,Bt){be.setFromMatrixColumn(Bt,0),be.multiplyScalar(-It),l.add(be)}})(),F=(function(){const be=new jt;return function(It,Bt){o.screenSpacePanning===!0?be.setFromMatrixColumn(Bt,1):(be.setFromMatrixColumn(Bt,0),be.crossVectors(o.object.up,be)),be.multiplyScalar(It),l.add(be)}})(),O=(function(){const be=new jt;return function(It,Bt){const mt=o.domElement;if(o.object.isPerspectiveCamera){const st=o.object.position;be.copy(st).sub(o.target);let xt=be.length();xt*=Math.tan(o.object.fov/2*Math.PI/180),R(2*It*xt/mt.clientHeight,o.object.matrix),F(2*Bt*xt/mt.clientHeight,o.object.matrix)}else o.object.isOrthographicCamera?(R(It*(o.object.right-o.object.left)/o.object.zoom/mt.clientWidth,o.object.matrix),F(Bt*(o.object.top-o.object.bottom)/o.object.zoom/mt.clientHeight,o.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),o.enablePan=!1)}})();function U(be){o.object.isPerspectiveCamera||o.object.isOrthographicCamera?c/=be:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function Y(be){o.object.isPerspectiveCamera||o.object.isOrthographicCamera?c*=be:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function W(be,et){if(!o.zoomToCursor)return;x=!0;const It=o.domElement.getBoundingClientRect(),Bt=be-It.left,mt=et-It.top,st=It.width,xt=It.height;y.x=Bt/st*2-1,y.y=-(mt/xt)*2+1,C.set(y.x,y.y,1).unproject(o.object).sub(o.object.position).normalize()}function te(be){return Math.max(o.minDistance,Math.min(o.maxDistance,be))}function j(be){u.set(be.clientX,be.clientY)}function J(be){W(be.clientX,be.clientX),_.set(be.clientX,be.clientY)}function oe(be){d.set(be.clientX,be.clientY)}function ie(be){g.set(be.clientX,be.clientY),h.subVectors(g,u).multiplyScalar(o.rotateSpeed);const et=o.domElement;M(2*Math.PI*h.x/et.clientHeight),k(2*Math.PI*h.y/et.clientHeight),u.copy(g),o.update()}function ne(be){f.set(be.clientX,be.clientY),I.subVectors(f,_),I.y>0?U(w(I.y)):I.y<0&&Y(w(I.y)),_.copy(f),o.update()}function le(be){p.set(be.clientX,be.clientY),m.subVectors(p,d).multiplyScalar(o.panSpeed),O(m.x,m.y),d.copy(p),o.update()}function ge(be){W(be.clientX,be.clientY),be.deltaY<0?Y(w(be.deltaY)):be.deltaY>0&&U(w(be.deltaY)),o.update()}function _e(be){let et=!1;switch(be.code){case o.keys.UP:be.ctrlKey||be.metaKey||be.shiftKey?k(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(0,o.keyPanSpeed),et=!0;break;case o.keys.BOTTOM:be.ctrlKey||be.metaKey||be.shiftKey?k(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(0,-o.keyPanSpeed),et=!0;break;case o.keys.LEFT:be.ctrlKey||be.metaKey||be.shiftKey?M(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(o.keyPanSpeed,0),et=!0;break;case o.keys.RIGHT:be.ctrlKey||be.metaKey||be.shiftKey?M(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(-o.keyPanSpeed,0),et=!0;break}et&&(be.preventDefault(),o.update())}function ue(be){if(E.length===1)u.set(be.pageX,be.pageY);else{const et=Yt(be),It=.5*(be.pageX+et.x),Bt=.5*(be.pageY+et.y);u.set(It,Bt)}}function fe(be){if(E.length===1)d.set(be.pageX,be.pageY);else{const et=Yt(be),It=.5*(be.pageX+et.x),Bt=.5*(be.pageY+et.y);d.set(It,Bt)}}function pe(be){const et=Yt(be),It=be.pageX-et.x,Bt=be.pageY-et.y,mt=Math.sqrt(It*It+Bt*Bt);_.set(0,mt)}function ye(be){o.enableZoom&&pe(be),o.enablePan&&fe(be)}function Me(be){o.enableZoom&&pe(be),o.enableRotate&&ue(be)}function ve(be){if(E.length==1)g.set(be.pageX,be.pageY);else{const It=Yt(be),Bt=.5*(be.pageX+It.x),mt=.5*(be.pageY+It.y);g.set(Bt,mt)}h.subVectors(g,u).multiplyScalar(o.rotateSpeed);const et=o.domElement;M(2*Math.PI*h.x/et.clientHeight),k(2*Math.PI*h.y/et.clientHeight),u.copy(g)}function he(be){if(E.length===1)p.set(be.pageX,be.pageY);else{const et=Yt(be),It=.5*(be.pageX+et.x),Bt=.5*(be.pageY+et.y);p.set(It,Bt)}m.subVectors(p,d).multiplyScalar(o.panSpeed),O(m.x,m.y),d.copy(p)}function Qe(be){const et=Yt(be),It=be.pageX-et.x,Bt=be.pageY-et.y,mt=Math.sqrt(It*It+Bt*Bt);f.set(0,mt),I.set(0,Math.pow(f.y/_.y,o.zoomSpeed)),U(I.y),_.copy(f);const st=(be.pageX+et.x)*.5,xt=(be.pageY+et.y)*.5;W(st,xt)}function Pe(be){o.enableZoom&&Qe(be),o.enablePan&&he(be)}function we(be){o.enableZoom&&Qe(be),o.enableRotate&&ve(be)}function Te(be){o.enabled!==!1&&(E.length===0&&(o.domElement.setPointerCapture(be.pointerId),o.domElement.addEventListener("pointermove",Re),o.domElement.addEventListener("pointerup",Ee)),!kt(be)&&(Ct(be),be.pointerType==="touch"?nt(be):ke(be)))}function Re(be){o.enabled!==!1&&(be.pointerType==="touch"?gt(be):Ce(be))}function Ee(be){switch(Dt(be),E.length){case 0:o.domElement.releasePointerCapture(be.pointerId),o.domElement.removeEventListener("pointermove",Re),o.domElement.removeEventListener("pointerup",Ee),o.dispatchEvent(TJt),r=i.NONE;break;case 1:const et=E[0],It=B[et];nt({pointerId:et,pageX:It.x,pageY:It.y});break}}function ke(be){let et;switch(be.button){case 0:et=o.mouseButtons.LEFT;break;case 1:et=o.mouseButtons.MIDDLE;break;case 2:et=o.mouseButtons.RIGHT;break;default:et=-1}switch(et){case Vw.DOLLY:if(o.enableZoom===!1)return;J(be),r=i.DOLLY;break;case Vw.ROTATE:if(be.ctrlKey||be.metaKey||be.shiftKey){if(o.enablePan===!1)return;oe(be),r=i.PAN}else{if(o.enableRotate===!1)return;j(be),r=i.ROTATE}break;case Vw.PAN:if(be.ctrlKey||be.metaKey||be.shiftKey){if(o.enableRotate===!1)return;j(be),r=i.ROTATE}else{if(o.enablePan===!1)return;oe(be),r=i.PAN}break;default:r=i.NONE}r!==i.NONE&&o.dispatchEvent(bke)}function Ce(be){switch(r){case i.ROTATE:if(o.enableRotate===!1)return;ie(be);break;case i.DOLLY:if(o.enableZoom===!1)return;ne(be);break;case i.PAN:if(o.enablePan===!1)return;le(be);break}}function Le(be){o.enabled===!1||o.enableZoom===!1||r!==i.NONE||(be.preventDefault(),o.dispatchEvent(bke),ge(Ye(be)),o.dispatchEvent(TJt))}function Ye(be){const et=be.deltaMode,It={clientX:be.clientX,clientY:be.clientY,deltaY:be.deltaY};switch(et){case 1:It.deltaY*=16;break;case 2:It.deltaY*=100;break}return be.ctrlKey&&!S&&(It.deltaY*=10),It}function tt(be){be.key==="Control"&&(S=!0,o.domElement.getRootNode().addEventListener("keyup",At,{passive:!0,capture:!0}))}function At(be){be.key==="Control"&&(S=!1,o.domElement.getRootNode().removeEventListener("keyup",At,{passive:!0,capture:!0}))}function at(be){o.enabled===!1||o.enablePan===!1||_e(be)}function nt(be){switch(it(be),E.length){case 1:switch(o.touches.ONE){case SG.ROTATE:if(o.enableRotate===!1)return;ue(be),r=i.TOUCH_ROTATE;break;case SG.PAN:if(o.enablePan===!1)return;fe(be),r=i.TOUCH_PAN;break;default:r=i.NONE}break;case 2:switch(o.touches.TWO){case SG.DOLLY_PAN:if(o.enableZoom===!1&&o.enablePan===!1)return;ye(be),r=i.TOUCH_DOLLY_PAN;break;case SG.DOLLY_ROTATE:if(o.enableZoom===!1&&o.enableRotate===!1)return;Me(be),r=i.TOUCH_DOLLY_ROTATE;break;default:r=i.NONE}break;default:r=i.NONE}r!==i.NONE&&o.dispatchEvent(bke)}function gt(be){switch(it(be),r){case i.TOUCH_ROTATE:if(o.enableRotate===!1)return;ve(be),o.update();break;case i.TOUCH_PAN:if(o.enablePan===!1)return;he(be),o.update();break;case i.TOUCH_DOLLY_PAN:if(o.enableZoom===!1&&o.enablePan===!1)return;Pe(be),o.update();break;case i.TOUCH_DOLLY_ROTATE:if(o.enableZoom===!1&&o.enableRotate===!1)return;we(be),o.update();break;default:r=i.NONE}}function bt(be){o.enabled!==!1&&be.preventDefault()}function Ct(be){E.push(be.pointerId)}function Dt(be){delete B[be.pointerId];for(let et=0;et<E.length;et++)if(E[et]==be.pointerId){E.splice(et,1);return}}function kt(be){for(let et=0;et<E.length;et++)if(E[et]==be.pointerId)return!0;return!1}function it(be){let et=B[be.pointerId];et===void 0&&(et=new ni,B[be.pointerId]=et),et.set(be.pageX,be.pageY)}function Yt(be){const et=be.pointerId===E[0]?E[1]:E[0];return B[et]}o.domElement.addEventListener("contextmenu",bt),o.domElement.addEventListener("pointerdown",Te),o.domElement.addEventListener("pointercancel",Ee),o.domElement.addEventListener("wheel",Le,{passive:!1}),o.domElement.getRootNode().addEventListener("keydown",tt,{passive:!0,capture:!0}),this.update()}};var FJt={env:{}};function woi(){var t=Object.create(null);function e(i,r){var s=i.id,a=i.name,A=i.dependencies;A===void 0&&(A=[]);var c=i.init;c===void 0&&(c=function(){});var l=i.getTransferables;if(l===void 0&&(l=null),!t[s])try{A=A.map(function(g){return g&&g.isWorkerModule&&(e(g,function(h){if(h instanceof Error)throw h}),g=t[g.id].value),g}),c=o("<"+a+">.init",c),l&&(l=o("<"+a+">.getTransferables",l));var u=null;typeof c=="function"?u=c.apply(void 0,A):console.error("worker module init function failed to rehydrate"),t[s]={id:s,value:u,getTransferables:l},r(u)}catch(g){g&&g.noLog||console.error(g),r(g)}}function n(i,r){var s,a=i.id,A=i.args;(!t[a]||typeof t[a].value!="function")&&r(new Error("Worker module "+a+": not found or its 'init' did not return a function"));try{var c=(s=t[a]).value.apply(s,A);c&&typeof c.then=="function"?c.then(l,function(u){return r(u instanceof Error?u:new Error(""+u))}):l(c)}catch(u){r(u)}function l(u){try{var g=t[a].getTransferables&&t[a].getTransferables(u);(!g||!Array.isArray(g)||!g.length)&&(g=void 0),r(u,g)}catch(h){console.error(h),r(h)}}}function o(i,r){var s=void 0;self.troikaDefine=function(A){return s=A};var a=URL.createObjectURL(new Blob(["/** "+i.replace(/\*/g,"")+` **/

troikaDefine(
`+r+`
)`],{type:"application/javascript"}));try{importScripts(a)}catch(A){console.error(A)}return URL.revokeObjectURL(a),delete self.troikaDefine,s}self.addEventListener("message",function(i){var r=i.data,s=r.messageId,a=r.action,A=r.data;try{a==="registerModule"&&e(A,function(c){c instanceof Error?postMessage({messageId:s,success:!1,error:c.message}):postMessage({messageId:s,success:!0,result:{isCallable:typeof c=="function"}})}),a==="callModule"&&n(A,function(c,l){c instanceof Error?postMessage({messageId:s,success:!1,error:c.message}):postMessage({messageId:s,success:!0,result:c},l||void 0)})}catch(c){postMessage({messageId:s,success:!1,error:c.stack})}})}function Poi(t){var e=function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return e._getInitResult().then(function(i){if(typeof i=="function")return i.apply(void 0,n);throw new Error("Worker module function was called but `init` did not return a callable function")})};return e._getInitResult=function(){var n=t.dependencies,o=t.init;n=Array.isArray(n)?n.map(function(r){return r&&(r=r.onMainThread||r,r._getInitResult&&(r=r._getInitResult())),r}):[];var i=Promise.all(n).then(function(r){return o.apply(null,r)});return e._getInitResult=function(){return i},i},e}var LJt=function(){var t=!1;if(typeof window<"u"&&typeof window.document<"u")try{var e=new Worker(URL.createObjectURL(new Blob([""],{type:"application/javascript"})));e.terminate(),t=!0}catch(n){typeof FJt<"u"&&FJt.env.NODE_ENV==="test"||console.log("Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: ["+n.message+"]")}return LJt=function(){return t},t},Moi=0,Doi=0,Ske=!1,sX=Object.create(null),aX=Object.create(null),Qke=Object.create(null);function yY(t){if((!t||typeof t.init!="function")&&!Ske)throw new Error("requires `options.init` function");var e=t.dependencies,n=t.init,o=t.getTransferables,i=t.workerId,r=Poi(t);i==null&&(i="#default");var s="workerModule"+ ++Moi,a=t.name||s,A=null;e=e&&e.map(function(l){return typeof l=="function"&&!l.workerModuleData&&(Ske=!0,l=yY({workerId:i,name:"<"+a+"> function dependency: "+l.name,init:`function(){return (
`+_he(l)+`
)}`}),Ske=!1),l&&l.workerModuleData&&(l=l.workerModuleData),l});function c(){for(var l=[],u=arguments.length;u--;)l[u]=arguments[u];if(!LJt())return r.apply(void 0,l);if(!A){A=HJt(i,"registerModule",c.workerModuleData);var g=function(){A=null,aX[i].delete(g)};(aX[i]||(aX[i]=new Set)).add(g)}return A.then(function(h){var d=h.isCallable;if(d)return HJt(i,"callModule",{id:s,args:l});throw new Error("Worker module function was called but `init` did not return a callable function")})}return c.workerModuleData={isWorkerModule:!0,id:s,name:a,dependencies:e,init:_he(n),getTransferables:o&&_he(o)},c.onMainThread=r,c}function Noi(t){aX[t]&&aX[t].forEach(function(e){e()}),sX[t]&&(sX[t].terminate(),delete sX[t])}function _he(t){var e=t.toString();return!/^function/.test(e)&&/^\w+\s*\(/.test(e)&&(e="function "+e),e}function Roi(t){var e=sX[t];if(!e){var n=_he(woi);e=sX[t]=new Worker(URL.createObjectURL(new Blob(["/** Worker Module Bootstrap: "+t.replace(/\*/g,"")+` **/

;(`+n+")()"],{type:"application/javascript"}))),e.onmessage=function(o){var i=o.data,r=i.messageId,s=Qke[r];if(!s)throw new Error("WorkerModule response with empty or unknown messageId");delete Qke[r],s(i)}}return e}function HJt(t,e,n){return new Promise(function(o,i){var r=++Doi;Qke[r]=function(s){s.success?o(s.result):i(new Error("Error in worker "+e+" call: "+s.error))},Roi(t).postMessage({messageId:r,action:e,data:n})})}function OJt(){var t=(function(e){function n(W,te,j,J,oe,ie,ne,le){var ge=1-ne;le.x=ge*ge*W+2*ge*ne*j+ne*ne*oe,le.y=ge*ge*te+2*ge*ne*J+ne*ne*ie}function o(W,te,j,J,oe,ie,ne,le,ge,_e){var ue=1-ge;_e.x=ue*ue*ue*W+3*ue*ue*ge*j+3*ue*ge*ge*oe+ge*ge*ge*ne,_e.y=ue*ue*ue*te+3*ue*ue*ge*J+3*ue*ge*ge*ie+ge*ge*ge*le}function i(W,te){for(var j=/([MLQCZ])([^MLQCZ]*)/g,J,oe,ie,ne,le;J=j.exec(W);){var ge=J[2].replace(/^\s*|\s*$/g,"").split(/[,\s]+/).map(function(_e){return parseFloat(_e)});switch(J[1]){case"M":ne=oe=ge[0],le=ie=ge[1];break;case"L":(ge[0]!==ne||ge[1]!==le)&&te("L",ne,le,ne=ge[0],le=ge[1]);break;case"Q":{te("Q",ne,le,ne=ge[2],le=ge[3],ge[0],ge[1]);break}case"C":{te("C",ne,le,ne=ge[4],le=ge[5],ge[0],ge[1],ge[2],ge[3]);break}case"Z":(ne!==oe||le!==ie)&&te("L",ne,le,oe,ie);break}}}function r(W,te,j){j===void 0&&(j=16);var J={x:0,y:0};i(W,function(oe,ie,ne,le,ge,_e,ue,fe,pe){switch(oe){case"L":te(ie,ne,le,ge);break;case"Q":{for(var ye=ie,Me=ne,ve=1;ve<j;ve++)n(ie,ne,_e,ue,le,ge,ve/(j-1),J),te(ye,Me,J.x,J.y),ye=J.x,Me=J.y;break}case"C":{for(var he=ie,Qe=ne,Pe=1;Pe<j;Pe++)o(ie,ne,_e,ue,fe,pe,le,ge,Pe/(j-1),J),te(he,Qe,J.x,J.y),he=J.x,Qe=J.y;break}}})}var s="precision highp float;attribute vec2 aUV;varying vec2 vUV;void main(){vUV=aUV;gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}",a="precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){gl_FragColor=texture2D(tex,vUV);}",A=new WeakMap,c={premultipliedAlpha:!1,preserveDrawingBuffer:!0,antialias:!1,depth:!1};function l(W,te){var j=W.getContext?W.getContext("webgl",c):W,J=A.get(j);if(!J){let ue=function(he){var Qe=ie[he];if(!Qe&&(Qe=ie[he]=j.getExtension(he),!Qe))throw new Error(he+" not supported");return Qe},fe=function(he,Qe){var Pe=j.createShader(Qe);return j.shaderSource(Pe,he),j.compileShader(Pe),Pe},pe=function(he,Qe,Pe,we){if(!ne[he]){var Te={},Re={},Ee=j.createProgram();j.attachShader(Ee,fe(Qe,j.VERTEX_SHADER)),j.attachShader(Ee,fe(Pe,j.FRAGMENT_SHADER)),j.linkProgram(Ee),ne[he]={program:Ee,transaction:function(Ce){j.useProgram(Ee),Ce({setUniform:function(Ye,tt){for(var At=[],at=arguments.length-2;at-- >0;)At[at]=arguments[at+2];var nt=Re[tt]||(Re[tt]=j.getUniformLocation(Ee,tt));j["uniform"+Ye].apply(j,[nt].concat(At))},setAttribute:function(Ye,tt,At,at,nt){var gt=Te[Ye];gt||(gt=Te[Ye]={buf:j.createBuffer(),loc:j.getAttribLocation(Ee,Ye),data:null}),j.bindBuffer(j.ARRAY_BUFFER,gt.buf),j.vertexAttribPointer(gt.loc,tt,j.FLOAT,!1,0,0),j.enableVertexAttribArray(gt.loc),oe?j.vertexAttribDivisor(gt.loc,at):ue("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(gt.loc,at),nt!==gt.data&&(j.bufferData(j.ARRAY_BUFFER,nt,At),gt.data=nt)}})}}}ne[he].transaction(we)},ye=function(he,Qe){ge++;try{j.activeTexture(j.TEXTURE0+ge);var Pe=le[he];Pe||(Pe=le[he]=j.createTexture(),j.bindTexture(j.TEXTURE_2D,Pe),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_MIN_FILTER,j.NEAREST),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_MAG_FILTER,j.NEAREST)),j.bindTexture(j.TEXTURE_2D,Pe),Qe(Pe,ge)}finally{ge--}},Me=function(he,Qe,Pe){var we=j.createFramebuffer();_e.push(we),j.bindFramebuffer(j.FRAMEBUFFER,we),j.activeTexture(j.TEXTURE0+Qe),j.bindTexture(j.TEXTURE_2D,he),j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_2D,he,0);try{Pe(we)}finally{j.deleteFramebuffer(we),j.bindFramebuffer(j.FRAMEBUFFER,_e[--_e.length-1]||null)}},ve=function(){ie={},ne={},le={},ge=-1,_e.length=0};var oe=typeof WebGL2RenderingContext<"u"&&j instanceof WebGL2RenderingContext,ie={},ne={},le={},ge=-1,_e=[];j.canvas.addEventListener("webglcontextlost",function(he){ve(),he.preventDefault()},!1),A.set(j,J={gl:j,isWebGL2:oe,getExtension:ue,withProgram:pe,withTexture:ye,withTextureFramebuffer:Me,handleContextLoss:ve})}te(J)}function u(W,te,j,J,oe,ie,ne,le){ne===void 0&&(ne=15),le===void 0&&(le=null),l(W,function(ge){var _e=ge.gl,ue=ge.withProgram,fe=ge.withTexture;fe("copy",function(pe,ye){_e.texImage2D(_e.TEXTURE_2D,0,_e.RGBA,oe,ie,0,_e.RGBA,_e.UNSIGNED_BYTE,te),ue("copy",s,a,function(Me){var ve=Me.setUniform,he=Me.setAttribute;he("aUV",2,_e.STATIC_DRAW,0,new Float32Array([0,0,2,0,0,2])),ve("1i","image",ye),_e.bindFramebuffer(_e.FRAMEBUFFER,le||null),_e.disable(_e.BLEND),_e.colorMask(ne&8,ne&4,ne&2,ne&1),_e.viewport(j,J,oe,ie),_e.scissor(j,J,oe,ie),_e.drawArrays(_e.TRIANGLES,0,3)})})})}function g(W,te,j){var J=W.width,oe=W.height;l(W,function(ie){var ne=ie.gl,le=new Uint8Array(J*oe*4);ne.readPixels(0,0,J,oe,ne.RGBA,ne.UNSIGNED_BYTE,le),W.width=te,W.height=j,u(ne,le,0,0,J,oe)})}var h=Object.freeze({__proto__:null,withWebGLContext:l,renderImageData:u,resizeWebGLCanvasWithoutClearing:g});function d(W,te,j,J,oe,ie){ie===void 0&&(ie=1);var ne=new Uint8Array(W*te),le=J[2]-J[0],ge=J[3]-J[1],_e=[];r(j,function(he,Qe,Pe,we){_e.push({x1:he,y1:Qe,x2:Pe,y2:we,minX:Math.min(he,Pe),minY:Math.min(Qe,we),maxX:Math.max(he,Pe),maxY:Math.max(Qe,we)})}),_e.sort(function(he,Qe){return he.maxX-Qe.maxX});for(var ue=0;ue<W;ue++)for(var fe=0;fe<te;fe++){var pe=Me(J[0]+le*(ue+.5)/W,J[1]+ge*(fe+.5)/te),ye=Math.pow(1-Math.abs(pe)/oe,ie)/2;pe<0&&(ye=1-ye),ye=Math.max(0,Math.min(255,Math.round(ye*255))),ne[fe*W+ue]=ye}return ne;function Me(he,Qe){for(var Pe=1/0,we=1/0,Te=_e.length;Te--;){var Re=_e[Te];if(Re.maxX+we<=he)break;if(he+we>Re.minX&&Qe-we<Re.maxY&&Qe+we>Re.minY){var Ee=_(he,Qe,Re.x1,Re.y1,Re.x2,Re.y2);Ee<Pe&&(Pe=Ee,we=Math.sqrt(Pe))}}return ve(he,Qe)&&(we=-we),we}function ve(he,Qe){for(var Pe=0,we=_e.length;we--;){var Te=_e[we];if(Te.maxX<=he)break;var Re=Te.y1>Qe!=Te.y2>Qe&&he<(Te.x2-Te.x1)*(Qe-Te.y1)/(Te.y2-Te.y1)+Te.x1;Re&&(Pe+=Te.y1<Te.y2?1:-1)}return Pe!==0}}function p(W,te,j,J,oe,ie,ne,le,ge,_e){ie===void 0&&(ie=1),le===void 0&&(le=0),ge===void 0&&(ge=0),_e===void 0&&(_e=0),m(W,te,j,J,oe,ie,ne,null,le,ge,_e)}function m(W,te,j,J,oe,ie,ne,le,ge,_e,ue){ie===void 0&&(ie=1),ge===void 0&&(ge=0),_e===void 0&&(_e=0),ue===void 0&&(ue=0);for(var fe=d(W,te,j,J,oe,ie),pe=new Uint8Array(fe.length*4),ye=0;ye<fe.length;ye++)pe[ye*4+ue]=fe[ye];u(ne,pe,ge,_e,W,te,1<<3-ue,le)}function _(W,te,j,J,oe,ie){var ne=oe-j,le=ie-J,ge=ne*ne+le*le,_e=ge?Math.max(0,Math.min(1,((W-j)*ne+(te-J)*le)/ge)):0,ue=W-(j+_e*ne),fe=te-(J+_e*le);return ue*ue+fe*fe}var f=Object.freeze({__proto__:null,generate:d,generateIntoCanvas:p,generateIntoFramebuffer:m}),I="precision highp float;uniform vec4 uGlyphBounds;attribute vec2 aUV;attribute vec4 aLineSegment;varying vec4 vLineSegment;varying vec2 vGlyphXY;void main(){vLineSegment=aLineSegment;vGlyphXY=mix(uGlyphBounds.xy,uGlyphBounds.zw,aUV);gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}",C="precision highp float;uniform vec4 uGlyphBounds;uniform float uMaxDistance;uniform float uExponent;varying vec4 vLineSegment;varying vec2 vGlyphXY;float absDistToSegment(vec2 point,vec2 lineA,vec2 lineB){vec2 lineDir=lineB-lineA;float lenSq=dot(lineDir,lineDir);float t=lenSq==0.0 ? 0.0 : clamp(dot(point-lineA,lineDir)/lenSq,0.0,1.0);vec2 linePt=lineA+t*lineDir;return distance(point,linePt);}void main(){vec4 seg=vLineSegment;vec2 p=vGlyphXY;float dist=absDistToSegment(p,seg.xy,seg.zw);float val=pow(1.0-clamp(dist/uMaxDistance,0.0,1.0),uExponent)*0.5;bool crossing=(seg.y>p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y<vLineSegment.w;gl_FragColor=vec4(crossingUp ? 1.0/255.0 : 0.0,crossing&&!crossingUp ? 1.0/255.0 : 0.0,0.0,val);}",y="precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){vec4 color=texture2D(tex,vUV);bool inside=color.r!=color.g;float val=inside ? 1.0-color.a : color.a;gl_FragColor=vec4(val);}",x=new Float32Array([0,0,2,0,0,2]),E=null,B=!1,S={},Q=new WeakMap;function w(W){if(!B&&!F(W))throw new Error("WebGL generation not supported")}function M(W,te,j,J,oe,ie,ne){if(ie===void 0&&(ie=1),ne===void 0&&(ne=null),!ne&&(ne=E,!ne)){var le=typeof OffscreenCanvas=="function"?new OffscreenCanvas(1,1):typeof document<"u"?document.createElement("canvas"):null;if(!le)throw new Error("OffscreenCanvas or DOM canvas not supported");ne=E=le.getContext("webgl",{depth:!1})}w(ne);var ge=new Uint8Array(W*te*4);l(ne,function(pe){var ye=pe.gl,Me=pe.withTexture,ve=pe.withTextureFramebuffer;Me("readable",function(he,Qe){ye.texImage2D(ye.TEXTURE_2D,0,ye.RGBA,W,te,0,ye.RGBA,ye.UNSIGNED_BYTE,null),ve(he,Qe,function(Pe){R(W,te,j,J,oe,ie,ye,Pe,0,0,0),ye.readPixels(0,0,W,te,ye.RGBA,ye.UNSIGNED_BYTE,ge)})})});for(var _e=new Uint8Array(W*te),ue=0,fe=0;ue<ge.length;ue+=4)_e[fe++]=ge[ue];return _e}function k(W,te,j,J,oe,ie,ne,le,ge,_e){ie===void 0&&(ie=1),le===void 0&&(le=0),ge===void 0&&(ge=0),_e===void 0&&(_e=0),R(W,te,j,J,oe,ie,ne,null,le,ge,_e)}function R(W,te,j,J,oe,ie,ne,le,ge,_e,ue){ie===void 0&&(ie=1),ge===void 0&&(ge=0),_e===void 0&&(_e=0),ue===void 0&&(ue=0),w(ne);var fe=[];r(j,function(pe,ye,Me,ve){fe.push(pe,ye,Me,ve)}),fe=new Float32Array(fe),l(ne,function(pe){var ye=pe.gl,Me=pe.isWebGL2,ve=pe.getExtension,he=pe.withProgram,Qe=pe.withTexture,Pe=pe.withTextureFramebuffer,we=pe.handleContextLoss;if(Qe("rawDistances",function(Te,Re){(W!==Te._lastWidth||te!==Te._lastHeight)&&ye.texImage2D(ye.TEXTURE_2D,0,ye.RGBA,Te._lastWidth=W,Te._lastHeight=te,0,ye.RGBA,ye.UNSIGNED_BYTE,null),he("main",I,C,function(Ee){var ke=Ee.setAttribute,Ce=Ee.setUniform,Le=!Me&&ve("ANGLE_instanced_arrays"),Ye=!Me&&ve("EXT_blend_minmax");ke("aUV",2,ye.STATIC_DRAW,0,x),ke("aLineSegment",4,ye.DYNAMIC_DRAW,1,fe),Ce.apply(void 0,["4f","uGlyphBounds"].concat(J)),Ce("1f","uMaxDistance",oe),Ce("1f","uExponent",ie),Pe(Te,Re,function(tt){ye.enable(ye.BLEND),ye.colorMask(!0,!0,!0,!0),ye.viewport(0,0,W,te),ye.scissor(0,0,W,te),ye.blendFunc(ye.ONE,ye.ONE),ye.blendEquationSeparate(ye.FUNC_ADD,Me?ye.MAX:Ye.MAX_EXT),ye.clear(ye.COLOR_BUFFER_BIT),Me?ye.drawArraysInstanced(ye.TRIANGLES,0,3,fe.length/4):Le.drawArraysInstancedANGLE(ye.TRIANGLES,0,3,fe.length/4)})}),he("post",s,y,function(Ee){Ee.setAttribute("aUV",2,ye.STATIC_DRAW,0,x),Ee.setUniform("1i","tex",Re),ye.bindFramebuffer(ye.FRAMEBUFFER,le),ye.disable(ye.BLEND),ye.colorMask(ue===0,ue===1,ue===2,ue===3),ye.viewport(ge,_e,W,te),ye.scissor(ge,_e,W,te),ye.drawArrays(ye.TRIANGLES,0,3)})}),ye.isContextLost())throw we(),new Error("webgl context lost")})}function F(W){var te=!W||W===E?S:W.canvas||W,j=Q.get(te);if(j===void 0){B=!0;var J=null;try{var oe=[97,106,97,61,99,137,118,80,80,118,137,99,61,97,106,97],ie=M(4,4,"M8,8L16,8L24,24L16,24Z",[0,0,32,32],24,1,W);j=ie&&oe.length===ie.length&&ie.every(function(ne,le){return ne===oe[le]}),j||(J="bad trial run results",console.info(oe,ie))}catch(ne){j=!1,J=ne.message}J&&console.warn("WebGL SDF generation not supported:",J),B=!1,Q.set(te,j)}return j}var O=Object.freeze({__proto__:null,generate:M,generateIntoCanvas:k,generateIntoFramebuffer:R,isSupported:F});function U(W,te,j,J,oe,ie){oe===void 0&&(oe=Math.max(J[2]-J[0],J[3]-J[1])/2),ie===void 0&&(ie=1);try{return M.apply(O,arguments)}catch(ne){return console.info("WebGL SDF generation failed, falling back to JS",ne),d.apply(f,arguments)}}function Y(W,te,j,J,oe,ie,ne,le,ge,_e){oe===void 0&&(oe=Math.max(J[2]-J[0],J[3]-J[1])/2),ie===void 0&&(ie=1),le===void 0&&(le=0),ge===void 0&&(ge=0),_e===void 0&&(_e=0);try{return k.apply(O,arguments)}catch(ue){return console.info("WebGL SDF generation failed, falling back to JS",ue),p.apply(f,arguments)}}return e.forEachPathCommand=i,e.generate=U,e.generateIntoCanvas=Y,e.javascript=f,e.pathToLineSegments=r,e.webgl=O,e.webglUtils=h,Object.defineProperty(e,"__esModule",{value:!0}),e})({});return t}function Toi(){var t=(function(e){var n={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17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+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},o={},i={};o.L=1,i[1]="L",Object.keys(n).forEach(function(we,Te){o[we]=1<<Te+1,i[o[we]]=we}),Object.freeze(o);var r=o.LRI|o.RLI|o.FSI,s=o.L|o.R|o.AL,a=o.B|o.S|o.WS|o.ON|o.FSI|o.LRI|o.RLI|o.PDI,A=o.BN|o.RLE|o.LRE|o.RLO|o.LRO|o.PDF,c=o.S|o.WS|o.B|r|o.PDI|A,l=null;function u(){if(!l){l=new Map;var we=0;for(var Te in n)if(n.hasOwnProperty(Te))for(var Re=n[Te],Ee="",ke=void 0,Ce=!1,Le=0,Ye=0;Ye<=Re.length+1;Ye+=1){var tt=Re[Ye];if(tt!==","&&Ye!==Re.length)tt==="+"?(Ce=!0,Le=we=Le+parseInt(Ee,36),Ee=""):Ee+=tt;else{Ce?ke=we+parseInt(Ee,36):(Le=we=Le+parseInt(Ee,36),ke=we),Ce=!1,Ee="",Le=ke;for(var At=we;At<ke+1;At+=1)l.set(At,o[Te])}}}}function g(we){return u(),l.get(we.codePointAt(0))||o.L}function h(we){return i[g(we)]}var d={pairs:"14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function p(we,Te){var Re=36,Ee=0,ke=new Map,Ce=Te&&new Map,Le;return we.split(",").forEach(function Ye(tt){if(tt.indexOf("+")!==-1)for(var At=+tt;At--;)Ye(Le);else{Le=tt;var at=tt.split(">"),nt=at[0],gt=at[1];nt=String.fromCodePoint(Ee+=parseInt(nt,Re)),gt=String.fromCodePoint(Ee+=parseInt(gt,Re)),ke.set(nt,gt),Te&&Ce.set(gt,nt)}}),{map:ke,reverseMap:Ce}}var m,_,f;function I(){if(!m){var we=p(d.pairs,!0),Te=we.map,Re=we.reverseMap;m=Te,_=Re,f=p(d.canonical,!1).map}}function C(we){return I(),m.get(we)||null}function y(we){return I(),_.get(we)||null}function x(we){return I(),f.get(we)||null}var E=o.L,B=o.R,S=o.EN,Q=o.ES,w=o.ET,M=o.AN,k=o.CS,R=o.B,F=o.S,O=o.ON,U=o.BN,Y=o.NSM,W=o.AL,te=o.LRO,j=o.RLO,J=o.LRE,oe=o.RLE,ie=o.PDF,ne=o.LRI,le=o.RLI,ge=o.FSI,_e=o.PDI;function ue(we,Te){for(var Re=125,Ee=new Uint32Array(we.length),ke=0;ke<we.length;ke++)Ee[ke]=g(we[ke]);var Ce=new Map;function Le(tr,Vo){var wA=Ee[tr];Ee[tr]=Vo,Ce.set(wA,Ce.get(wA)-1),wA&a&&Ce.set(a,Ce.get(a)-1),Ce.set(Vo,(Ce.get(Vo)||0)+1),Vo&a&&Ce.set(a,(Ce.get(a)||0)+1)}for(var Ye=new Uint8Array(we.length),tt=new Map,At=[],at=null,nt=0;nt<we.length;nt++)at||At.push(at={start:nt,end:we.length-1,level:Te==="rtl"?1:Te==="ltr"?0:Qp(nt,!1)}),Ee[nt]&R&&(at.end=nt,at=null);for(var gt=oe|J|j|te|r|_e|ie|R,bt=function(tr){return tr+(tr&1?1:2)},Ct=function(tr){return tr+(tr&1?2:1)},Dt=0;Dt<At.length;Dt++){at=At[Dt];var kt=[{_level:at.level,_override:0,_isolate:0}],it=void 0,Yt=0,pn=0,be=0;Ce.clear();for(var et=at.start;et<=at.end;et++){var It=Ee[et];if(it=kt[kt.length-1],Ce.set(It,(Ce.get(It)||0)+1),It&a&&Ce.set(a,(Ce.get(a)||0)+1),It&gt)if(It&(oe|J)){Ye[et]=it._level;var Bt=(It===oe?Ct:bt)(it._level);Bt<=Re&&!Yt&&!pn?kt.push({_level:Bt,_override:0,_isolate:0}):Yt||pn++}else if(It&(j|te)){Ye[et]=it._level;var mt=(It===j?Ct:bt)(it._level);mt<=Re&&!Yt&&!pn?kt.push({_level:mt,_override:It&j?B:E,_isolate:0}):Yt||pn++}else if(It&r){It&ge&&(It=Qp(et+1,!0)===1?le:ne),Ye[et]=it._level,it._override&&Le(et,it._override);var st=(It===le?Ct:bt)(it._level);st<=Re&&Yt===0&&pn===0?(be++,kt.push({_level:st,_override:0,_isolate:1,_isolInitIndex:et})):Yt++}else if(It&_e){if(Yt>0)Yt--;else if(be>0){for(pn=0;!kt[kt.length-1]._isolate;)kt.pop();var xt=kt[kt.length-1]._isolInitIndex;xt!=null&&(tt.set(xt,et),tt.set(et,xt)),kt.pop(),be--}it=kt[kt.length-1],Ye[et]=it._level,it._override&&Le(et,it._override)}else It&ie?(Yt===0&&(pn>0?pn--:!it._isolate&&kt.length>1&&(kt.pop(),it=kt[kt.length-1])),Ye[et]=it._level):It&R&&(Ye[et]=at.level);else Ye[et]=it._level,it._override&&It!==U&&Le(et,it._override)}for(var Xe=[],Ze=null,dt=at.start;dt<=at.end;dt++){var Ut=Ee[dt];if(!(Ut&A)){var Wt=Ye[dt],Xt=Ut&r,Jt=Ut===_e;Ze&&Wt===Ze._level?(Ze._end=dt,Ze._endsWithIsolInit=Xt):Xe.push(Ze={_start:dt,_end:dt,_level:Wt,_startsWithPDI:Jt,_endsWithIsolInit:Xt})}}for(var yn=[],An=0;An<Xe.length;An++){var kn=Xe[An];if(!kn._startsWithPDI||kn._startsWithPDI&&!tt.has(kn._start)){for(var $n=[Ze=kn],ht=void 0;Ze&&Ze._endsWithIsolInit&&(ht=tt.get(Ze._end))!=null;)for(var Kt=An+1;Kt<Xe.length;Kt++)if(Xe[Kt]._start===ht){$n.push(Ze=Xe[Kt]);break}for(var rn=[],Lt=0;Lt<$n.length;Lt++)for(var Ho=$n[Lt],Ao=Ho._start;Ao<=Ho._end;Ao++)rn.push(Ao);for(var qe=Ye[rn[0]],vt=at.level,qt=rn[0]-1;qt>=0;qt--)if(!(Ee[qt]&A)){vt=Ye[qt];break}var Zt=rn[rn.length-1],nn=Ye[Zt],zn=at.level;if(!(Ee[Zt]&r)){for(var Nn=Zt+1;Nn<=at.end;Nn++)if(!(Ee[Nn]&A)){zn=Ye[Nn];break}}yn.push({_seqIndices:rn,_sosType:Math.max(vt,qe)%2?B:E,_eosType:Math.max(zn,nn)%2?B:E})}}for(var Co=0;Co<yn.length;Co++){var ei=yn[Co],ro=ei._seqIndices,To=ei._sosType,yo=ei._eosType,Ro=Ye[ro[0]]&1?B:E;if(Ce.get(Y))for(var On=0;On<ro.length;On++){var uo=ro[On];if(Ee[uo]&Y){for(var Oo=To,ko=On-1;ko>=0;ko--)if(!(Ee[ro[ko]]&A)){Oo=Ee[ro[ko]];break}Le(uo,Oo&(r|_e)?O:Oo)}}if(Ce.get(S))for(var Ko=0;Ko<ro.length;Ko++){var mi=ro[Ko];if(Ee[mi]&S)for(var Fo=Ko-1;Fo>=-1;Fo--){var Nr=Fo===-1?To:Ee[ro[Fo]];if(Nr&s){Nr===W&&Le(mi,M);break}}}if(Ce.get(W))for(var Rs=0;Rs<ro.length;Rs++){var ur=ro[Rs];Ee[ur]&W&&Le(ur,B)}if(Ce.get(Q)||Ce.get(k))for(var zi=1;zi<ro.length-1;zi++){var bi=ro[zi];if(Ee[bi]&(Q|k)){for(var Ar=0,ws=0,ds=zi-1;ds>=0&&(Ar=Ee[ro[ds]],!!(Ar&A));ds--);for(var Et=zi+1;Et<ro.length&&(ws=Ee[ro[Et]],!!(ws&A));Et++);Ar===ws&&(Ee[bi]===Q?Ar===S:Ar&(S|M))&&Le(bi,Ar)}}if(Ce.get(S))for(var Gt=0;Gt<ro.length;Gt++){var Rt=ro[Gt];if(Ee[Rt]&S){for(var Ht=Gt-1;Ht>=0&&Ee[ro[Ht]]&(w|A);Ht--)Le(ro[Ht],S);for(Gt++;Gt<ro.length&&Ee[ro[Gt]]&(w|A|S);Gt++)Ee[ro[Gt]]!==S&&Le(ro[Gt],S)}}if(Ce.get(w)||Ce.get(Q)||Ce.get(k))for(var Qt=0;Qt<ro.length;Qt++){var Nt=ro[Qt];if(Ee[Nt]&(w|Q|k)){Le(Nt,O);for(var _n=Qt-1;_n>=0&&Ee[ro[_n]]&A;_n--)Le(ro[_n],O);for(var qn=Qt+1;qn<ro.length&&Ee[ro[qn]]&A;qn++)Le(ro[qn],O)}}if(Ce.get(S))for(var En=0,Rn=To;En<ro.length;En++){var Hn=ro[En],Lo=Ee[Hn];Lo&S?Rn===E&&Le(Hn,E):Lo&s&&(Rn=Lo)}if(Ce.get(a)){var Io=B|S|M,gi=Io|E,jo=[];{for(var oi=[],Ji=0;Ji<ro.length;Ji++)if(Ee[ro[Ji]]&a){var wi=we[ro[Ji]],Br=void 0;if(C(wi)!==null)if(oi.length<63)oi.push({char:wi,seqIndex:Ji});else break;else if((Br=y(wi))!==null)for(var gr=oi.length-1;gr>=0;gr--){var oa=oi[gr].char;if(oa===Br||oa===y(x(wi))||C(x(oa))===wi){jo.push([oi[gr].seqIndex,Ji]),oi.length=gr;break}}}jo.sort(function(tr,Vo){return tr[0]-Vo[0]})}for(var hs=0;hs<jo.length;hs++){for(var Li=jo[hs],ys=Li[0],dr=Li[1],cA=!1,vA=0,Yl=ys+1;Yl<dr;Yl++){var H0=ro[Yl];if(Ee[H0]&gi){cA=!0;var ph=Ee[H0]&Io?B:E;if(ph===Ro){vA=ph;break}}}if(cA&&!vA){vA=To;for(var Xh=ys-1;Xh>=0;Xh--){var Bl=ro[Xh];if(Ee[Bl]&gi){var fc=Ee[Bl]&Io?B:E;fc!==Ro?vA=fc:vA=Ro;break}}}if(vA){if(Ee[ro[ys]]=Ee[ro[dr]]=vA,vA!==Ro){for(var Nd=ys+1;Nd<ro.length;Nd++)if(!(Ee[ro[Nd]]&A)){g(we[ro[Nd]])&Y&&(Ee[ro[Nd]]=vA);break}}if(vA!==Ro){for(var il=dr+1;il<ro.length;il++)if(!(Ee[ro[il]]&A)){g(we[ro[il]])&Y&&(Ee[ro[il]]=vA);break}}}}for(var Ul=0;Ul<ro.length;Ul++)if(Ee[ro[Ul]]&a){for(var m_=Ul,ag=Ul,Rd=To,mh=Ul-1;mh>=0;mh--)if(Ee[ro[mh]]&A)m_=mh;else{Rd=Ee[ro[mh]]&Io?B:E;break}for(var mm=yo,gu=Ul+1;gu<ro.length;gu++)if(Ee[ro[gu]]&(a|A))ag=gu;else{mm=Ee[ro[gu]]&Io?B:E;break}for(var Ag=m_;Ag<=ag;Ag++)Ee[ro[Ag]]=Rd===mm?Rd:Ro;Ul=ag}}}for(var C0=at.start;C0<=at.end;C0++){var FC=Ye[C0],O0=Ee[C0];if(FC&1?O0&(E|S|M)&&Ye[C0]++:O0&B?Ye[C0]++:O0&(M|S)&&(Ye[C0]+=2),O0&A&&(Ye[C0]=C0===0?at.level:Ye[C0-1]),C0===at.end||g(we[C0])&(F|R))for(var __=C0;__>=0&&g(we[__])&c;__--)Ye[__]=at.level}}return{levels:Ye,paragraphs:At};function Qp(tr,Vo){for(var wA=tr;wA<we.length;wA++){var Td=Ee[wA];if(Td&(B|W))return 1;if(Td&(R|E)||Vo&&Td===_e)return 0;if(Td&r){var da=_1(wA);wA=da===-1?we.length:da}}return 0}function _1(tr){for(var Vo=1,wA=tr+1;wA<we.length;wA++){var Td=Ee[wA];if(Td&R)break;if(Td&_e){if(--Vo===0)return wA}else Td&r&&Vo++}return-1}}var fe="14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1",pe;function ye(){if(!pe){var we=p(fe,!0),Te=we.map,Re=we.reverseMap;Re.forEach(function(Ee,ke){Te.set(ke,Ee)}),pe=Te}}function Me(we){return ye(),pe.get(we)||null}function ve(we,Te,Re,Ee){var ke=we.length;Re=Math.max(0,Re==null?0:+Re),Ee=Math.min(ke-1,Ee==null?ke-1:+Ee);for(var Ce=new Map,Le=Re;Le<=Ee;Le++)if(Te[Le]&1){var Ye=Me(we[Le]);Ye!==null&&Ce.set(Le,Ye)}return Ce}function he(we,Te,Re,Ee){var ke=we.length;Re=Math.max(0,Re==null?0:+Re),Ee=Math.min(ke-1,Ee==null?ke-1:+Ee);var Ce=[];return Te.paragraphs.forEach(function(Le){var Ye=Math.max(Re,Le.start),tt=Math.min(Ee,Le.end);if(Ye<tt){for(var At=Te.levels.slice(Ye,tt+1),at=tt;at>=Ye&&g(we[at])&c;at--)At[at]=Le.level;for(var nt=Le.level,gt=1/0,bt=0;bt<At.length;bt++){var Ct=At[bt];Ct>nt&&(nt=Ct),Ct<gt&&(gt=Ct|1)}for(var Dt=nt;Dt>=gt;Dt--)for(var kt=0;kt<At.length;kt++)if(At[kt]>=Dt){for(var it=kt;kt+1<At.length&&At[kt+1]>=Dt;)kt++;kt>it&&Ce.push([it+Ye,kt+Ye])}}}),Ce}function Qe(we,Te,Re,Ee){var ke=Pe(we,Te,Re,Ee),Ce=[].concat(we);return ke.forEach(function(Le,Ye){Ce[Ye]=(Te.levels[Le]&1?Me(we[Le]):null)||we[Le]}),Ce.join("")}function Pe(we,Te,Re,Ee){for(var ke=he(we,Te,Re,Ee),Ce=[],Le=0;Le<we.length;Le++)Ce[Le]=Le;return ke.forEach(function(Ye){for(var tt=Ye[0],At=Ye[1],at=Ce.slice(tt,At+1),nt=at.length;nt--;)Ce[At-nt]=at[nt]}),Ce}return e.closingToOpeningBracket=y,e.getBidiCharType=g,e.getBidiCharTypeName=h,e.getCanonicalBracket=x,e.getEmbeddingLevels=ue,e.getMirroredCharacter=Me,e.getMirroredCharactersMap=ve,e.getReorderSegments=he,e.getReorderedIndices=Pe,e.getReorderedString=Qe,e.openingToClosingBracket=C,Object.defineProperty(e,"__esModule",{value:!0}),e})({});return t}const GJt=/\bvoid\s+main\s*\(\s*\)\s*{/g;function vke(t){const e=/^[ \t]*#include +<([\w\d./]+)>/gm;function n(o,i){let r=OA[i];return r?vke(r):o}return t.replace(e,n)}const gI=[];for(let t=0;t<256;t++)gI[t]=(t<16?"0":"")+t.toString(16);function koi(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,o=Math.random()*4294967295|0;return(gI[t&255]+gI[t>>8&255]+gI[t>>16&255]+gI[t>>24&255]+"-"+gI[e&255]+gI[e>>8&255]+"-"+gI[e>>16&15|64]+gI[e>>24&255]+"-"+gI[n&63|128]+gI[n>>8&255]+"-"+gI[n>>16&255]+gI[n>>24&255]+gI[o&255]+gI[o>>8&255]+gI[o>>16&255]+gI[o>>24&255]).toUpperCase()}const XR=Object.assign||function(){let t=arguments[0];for(let e=1,n=arguments.length;e<n;e++){let o=arguments[e];if(o)for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},Foi=Date.now(),YJt=new WeakMap,UJt=new Map;let Loi=1e10;function wke(t,e){const n=Yoi(e);let o=YJt.get(t);if(o||YJt.set(t,o=Object.create(null)),o[n])return new o[n];const i=`_onBeforeCompile${n}`,r=function(c,l){t.onBeforeCompile.call(this,c,l);const u=this.customProgramCacheKey()+"|"+c.vertexShader+"|"+c.fragmentShader;let g=UJt[u];if(!g){const h=Hoi(this,c,e,n);g=UJt[u]=h}c.vertexShader=g.vertexShader,c.fragmentShader=g.fragmentShader,XR(c.uniforms,this.uniforms),e.timeUniform&&(c.uniforms[e.timeUniform]={get value(){return Date.now()-Foi}}),this[i]&&this[i](c)},s=function(){return a(e.chained?t:t.clone())},a=function(c){const l=Object.create(c,A);return Object.defineProperty(l,"baseMaterial",{value:t}),Object.defineProperty(l,"id",{value:Loi++}),l.uuid=koi(),l.uniforms=XR({},c.uniforms,e.uniforms),l.defines=XR({},c.defines,e.defines),l.defines[`TROIKA_DERIVED_MATERIAL_${n}`]="",l.extensions=XR({},c.extensions,e.extensions),l._listeners=void 0,l},A={constructor:{value:s},isDerivedMaterial:{value:!0},type:{get:()=>t.type,set:c=>{t.type=c}},isDerivedFrom:{writable:!0,configurable:!0,value:function(c){const l=this.baseMaterial;return c===l||l.isDerivedMaterial&&l.isDerivedFrom(c)||!1}},customProgramCacheKey:{writable:!0,configurable:!0,value:function(){return t.customProgramCacheKey()+"|"+n}},onBeforeCompile:{get(){return r},set(c){this[i]=c}},copy:{writable:!0,configurable:!0,value:function(c){return t.copy.call(this,c),!t.isShaderMaterial&&!t.isDerivedMaterial&&(XR(this.extensions,c.extensions),XR(this.defines,c.defines),XR(this.uniforms,KVt.clone(c.uniforms))),this}},clone:{writable:!0,configurable:!0,value:function(){const c=new t.constructor;return a(c).copy(this)}},getDepthMaterial:{writable:!0,configurable:!0,value:function(){let c=this._depthMaterial;return c||(c=this._depthMaterial=wke(t.isDerivedMaterial?t.getDepthMaterial():new Ezt({depthPacking:mVt}),e),c.defines.IS_DEPTH_MATERIAL="",c.uniforms=this.uniforms),c}},getDistanceMaterial:{writable:!0,configurable:!0,value:function(){let c=this._distanceMaterial;return c||(c=this._distanceMaterial=wke(t.isDerivedMaterial?t.getDistanceMaterial():new Bzt,e),c.defines.IS_DISTANCE_MATERIAL="",c.uniforms=this.uniforms),c}},dispose:{writable:!0,configurable:!0,value(){const{_depthMaterial:c,_distanceMaterial:l}=this;c&&c.dispose(),l&&l.dispose(),t.dispose.call(this)}}};return o[n]=s,new s}function Hoi(t,{vertexShader:e,fragmentShader:n},o,i){let{vertexDefs:r,vertexMainIntro:s,vertexMainOutro:a,vertexTransform:A,fragmentDefs:c,fragmentMainIntro:l,fragmentMainOutro:u,fragmentColorTransform:g,customRewriter:h,timeUniform:d}=o;if(r=r||"",s=s||"",a=a||"",c=c||"",l=l||"",u=u||"",(A||h)&&(e=vke(e)),(g||h)&&(n=n.replace(/^[ \t]*#include <((?:tonemapping|encodings|colorspace|fog|premultiplied_alpha|dithering)_fragment)>/gm,`
//!BEGIN_POST_CHUNK $1
$&
//!END_POST_CHUNK
`),n=vke(n)),h){let p=h({vertexShader:e,fragmentShader:n});e=p.vertexShader,n=p.fragmentShader}if(g){let p=[];n=n.replace(/^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm,m=>(p.push(m),"")),u=`${g}
${p.join(`
`)}
${u}`}if(d){const p=`
uniform float ${d};
`;r=p+r,c=p+c}return A&&(e=`vec3 troika_position_${i};
vec3 troika_normal_${i};
vec2 troika_uv_${i};
${e}
`,r=`${r}
void troikaVertexTransform${i}() {
  vec3 position = troika_position_${i};
  vec3 normal = troika_normal_${i};
  vec2 uv = troika_uv_${i};
  ${A}
  troika_position_${i} = position;
  troika_normal_${i} = normal;
  troika_uv_${i} = uv;
}
`,s=`
troika_position_${i} = vec3(position);
troika_normal_${i} = vec3(normal);
troika_uv_${i} = vec2(uv);
troikaVertexTransform${i}();
${s}
`,e=e.replace(/\b(position|normal|uv)\b/g,(p,m,_,f)=>/\battribute\s+vec[23]\s+$/.test(f.substr(0,_))?m:`troika_${m}_${i}`),t.map&&t.map.channel>0||(e=e.replace(/\bMAP_UV\b/g,`troika_uv_${i}`))),e=KJt(e,i,r,s,a),n=KJt(n,i,c,l,u),{vertexShader:e,fragmentShader:n}}function KJt(t,e,n,o,i){return(o||i||n)&&(t=t.replace(GJt,`
${n}
void troikaOrigMain${e}() {`),t+=`
void main() {
  ${o}
  troikaOrigMain${e}();
  ${i}
}`),t}function Ooi(t,e){return t==="uniforms"?void 0:typeof e=="function"?e.toString():e}let Goi=0;const VJt=new Map;function Yoi(t){const e=JSON.stringify(t,Ooi);let n=VJt.get(e);return n==null&&VJt.set(e,n=++Goi),n}function Uoi(){return typeof window>"u"&&(self.window=self),(function(t){var e={parse:function(i){var r=e._bin,s=new Uint8Array(i);if(r.readASCII(s,0,4)=="ttcf"){var a=4;r.readUshort(s,a),a+=2,r.readUshort(s,a),a+=2;var A=r.readUint(s,a);a+=4;for(var c=[],l=0;l<A;l++){var u=r.readUint(s,a);a+=4,c.push(e._readFont(s,u))}return c}return[e._readFont(s,0)]},_readFont:function(i,r){var s=e._bin,a=r;s.readFixed(i,r),r+=4;var A=s.readUshort(i,r);r+=2,s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2;for(var c=["cmap","head","hhea","maxp","hmtx","name","OS/2","post","loca","glyf","kern","CFF ","GDEF","GPOS","GSUB","SVG "],l={_data:i,_offset:a},u={},g=0;g<A;g++){var h=s.readASCII(i,r,4);r+=4,s.readUint(i,r),r+=4;var d=s.readUint(i,r);r+=4;var p=s.readUint(i,r);r+=4,u[h]={offset:d,length:p}}for(g=0;g<c.length;g++){var m=c[g];u[m]&&(l[m.trim()]=e[m.trim()].parse(i,u[m].offset,u[m].length,l))}return l},_tabOffset:function(i,r,s){for(var a=e._bin,A=a.readUshort(i,s+4),c=s+12,l=0;l<A;l++){var u=a.readASCII(i,c,4);c+=4,a.readUint(i,c),c+=4;var g=a.readUint(i,c);if(c+=4,a.readUint(i,c),c+=4,u==r)return g}return 0}};e._bin={readFixed:function(i,r){return(i[r]<<8|i[r+1])+(i[r+2]<<8|i[r+3])/65540},readF2dot14:function(i,r){return e._bin.readShort(i,r)/16384},readInt:function(i,r){return e._bin._view(i).getInt32(r)},readInt8:function(i,r){return e._bin._view(i).getInt8(r)},readShort:function(i,r){return e._bin._view(i).getInt16(r)},readUshort:function(i,r){return e._bin._view(i).getUint16(r)},readUshorts:function(i,r,s){for(var a=[],A=0;A<s;A++)a.push(e._bin.readUshort(i,r+2*A));return a},readUint:function(i,r){return e._bin._view(i).getUint32(r)},readUint64:function(i,r){return 4294967296*e._bin.readUint(i,r)+e._bin.readUint(i,r+4)},readASCII:function(i,r,s){for(var a="",A=0;A<s;A++)a+=String.fromCharCode(i[r+A]);return a},readUnicode:function(i,r,s){for(var a="",A=0;A<s;A++){var c=i[r++]<<8|i[r++];a+=String.fromCharCode(c)}return a},_tdec:typeof window<"u"&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(i,r,s){var a=e._bin._tdec;return a&&r==0&&s==i.length?a.decode(i):e._bin.readASCII(i,r,s)},readBytes:function(i,r,s){for(var a=[],A=0;A<s;A++)a.push(i[r+A]);return a},readASCIIArray:function(i,r,s){for(var a=[],A=0;A<s;A++)a.push(String.fromCharCode(i[r+A]));return a},_view:function(i){return i._dataView||(i._dataView=i.buffer?new DataView(i.buffer,i.byteOffset,i.byteLength):new DataView(new Uint8Array(i).buffer))}},e._lctf={},e._lctf.parse=function(i,r,s,a,A){var c=e._bin,l={},u=r;c.readFixed(i,r),r+=4;var g=c.readUshort(i,r);r+=2;var h=c.readUshort(i,r);r+=2;var d=c.readUshort(i,r);return r+=2,l.scriptList=e._lctf.readScriptList(i,u+g),l.featureList=e._lctf.readFeatureList(i,u+h),l.lookupList=e._lctf.readLookupList(i,u+d,A),l},e._lctf.readLookupList=function(i,r,s){var a=e._bin,A=r,c=[],l=a.readUshort(i,r);r+=2;for(var u=0;u<l;u++){var g=a.readUshort(i,r);r+=2;var h=e._lctf.readLookupTable(i,A+g,s);c.push(h)}return c},e._lctf.readLookupTable=function(i,r,s){var a=e._bin,A=r,c={tabs:[]};c.ltype=a.readUshort(i,r),r+=2,c.flag=a.readUshort(i,r),r+=2;var l=a.readUshort(i,r);r+=2;for(var u=c.ltype,g=0;g<l;g++){var h=a.readUshort(i,r);r+=2;var d=s(i,u,A+h,c);c.tabs.push(d)}return c},e._lctf.numOfOnes=function(i){for(var r=0,s=0;s<32;s++)(i>>>s&1)!=0&&r++;return r},e._lctf.readClassDef=function(i,r){var s=e._bin,a=[],A=s.readUshort(i,r);if(r+=2,A==1){var c=s.readUshort(i,r);r+=2;var l=s.readUshort(i,r);r+=2;for(var u=0;u<l;u++)a.push(c+u),a.push(c+u),a.push(s.readUshort(i,r)),r+=2}if(A==2){var g=s.readUshort(i,r);for(r+=2,u=0;u<g;u++)a.push(s.readUshort(i,r)),r+=2,a.push(s.readUshort(i,r)),r+=2,a.push(s.readUshort(i,r)),r+=2}return a},e._lctf.getInterval=function(i,r){for(var s=0;s<i.length;s+=3){var a=i[s],A=i[s+1];if(i[s+2],a<=r&&r<=A)return s}return-1},e._lctf.readCoverage=function(i,r){var s=e._bin,a={};a.fmt=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);return r+=2,a.fmt==1&&(a.tab=s.readUshorts(i,r,A)),a.fmt==2&&(a.tab=s.readUshorts(i,r,3*A)),a},e._lctf.coverageIndex=function(i,r){var s=i.tab;if(i.fmt==1)return s.indexOf(r);if(i.fmt==2){var a=e._lctf.getInterval(s,r);if(a!=-1)return s[a+2]+(r-s[a])}return-1},e._lctf.readFeatureList=function(i,r){var s=e._bin,a=r,A=[],c=s.readUshort(i,r);r+=2;for(var l=0;l<c;l++){var u=s.readASCII(i,r,4);r+=4;var g=s.readUshort(i,r);r+=2;var h=e._lctf.readFeatureTable(i,a+g);h.tag=u.trim(),A.push(h)}return A},e._lctf.readFeatureTable=function(i,r){var s=e._bin,a=r,A={},c=s.readUshort(i,r);r+=2,c>0&&(A.featureParams=a+c);var l=s.readUshort(i,r);r+=2,A.tab=[];for(var u=0;u<l;u++)A.tab.push(s.readUshort(i,r+2*u));return A},e._lctf.readScriptList=function(i,r){var s=e._bin,a=r,A={},c=s.readUshort(i,r);r+=2;for(var l=0;l<c;l++){var u=s.readASCII(i,r,4);r+=4;var g=s.readUshort(i,r);r+=2,A[u.trim()]=e._lctf.readScriptTable(i,a+g)}return A},e._lctf.readScriptTable=function(i,r){var s=e._bin,a=r,A={},c=s.readUshort(i,r);r+=2,c>0&&(A.default=e._lctf.readLangSysTable(i,a+c));var l=s.readUshort(i,r);r+=2;for(var u=0;u<l;u++){var g=s.readASCII(i,r,4);r+=4;var h=s.readUshort(i,r);r+=2,A[g.trim()]=e._lctf.readLangSysTable(i,a+h)}return A},e._lctf.readLangSysTable=function(i,r){var s=e._bin,a={};s.readUshort(i,r),r+=2,a.reqFeature=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);return r+=2,a.features=s.readUshorts(i,r,A),a},e.CFF={},e.CFF.parse=function(i,r,s){var a=e._bin;(i=new Uint8Array(i.buffer,r,s))[r=0],i[++r],i[++r],i[++r],r++;var A=[];r=e.CFF.readIndex(i,r,A);for(var c=[],l=0;l<A.length-1;l++)c.push(a.readASCII(i,r+A[l],A[l+1]-A[l]));r+=A[A.length-1];var u=[];r=e.CFF.readIndex(i,r,u);var g=[];for(l=0;l<u.length-1;l++)g.push(e.CFF.readDict(i,r+u[l],r+u[l+1]));r+=u[u.length-1];var h=g[0],d=[];r=e.CFF.readIndex(i,r,d);var p=[];for(l=0;l<d.length-1;l++)p.push(a.readASCII(i,r+d[l],d[l+1]-d[l]));if(r+=d[d.length-1],e.CFF.readSubrs(i,r,h),h.CharStrings){r=h.CharStrings,d=[],r=e.CFF.readIndex(i,r,d);var m=[];for(l=0;l<d.length-1;l++)m.push(a.readBytes(i,r+d[l],d[l+1]-d[l]));h.CharStrings=m}if(h.ROS){r=h.FDArray;var _=[];for(r=e.CFF.readIndex(i,r,_),h.FDArray=[],l=0;l<_.length-1;l++){var f=e.CFF.readDict(i,r+_[l],r+_[l+1]);e.CFF._readFDict(i,f,p),h.FDArray.push(f)}r+=_[_.length-1],r=h.FDSelect,h.FDSelect=[];var I=i[r];if(r++,I!=3)throw I;var C=a.readUshort(i,r);for(r+=2,l=0;l<C+1;l++)h.FDSelect.push(a.readUshort(i,r),i[r+2]),r+=3}return h.Encoding&&(h.Encoding=e.CFF.readEncoding(i,h.Encoding,h.CharStrings.length)),h.charset&&(h.charset=e.CFF.readCharset(i,h.charset,h.CharStrings.length)),e.CFF._readFDict(i,h,p),h},e.CFF._readFDict=function(i,r,s){var a;for(var A in r.Private&&(a=r.Private[1],r.Private=e.CFF.readDict(i,a,a+r.Private[0]),r.Private.Subrs&&e.CFF.readSubrs(i,a+r.Private.Subrs,r.Private)),r)["FamilyName","FontName","FullName","Notice","version","Copyright"].indexOf(A)!=-1&&(r[A]=s[r[A]-426+35])},e.CFF.readSubrs=function(i,r,s){var a=e._bin,A=[];r=e.CFF.readIndex(i,r,A);var c,l=A.length;c=l<1240?107:l<33900?1131:32768,s.Bias=c,s.Subrs=[];for(var u=0;u<A.length-1;u++)s.Subrs.push(a.readBytes(i,r+A[u],A[u+1]-A[u]))},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(i,r){for(var s=0;s<i.charset.length;s++)if(i.charset[s]==r)return s;return-1},e.CFF.glyphBySE=function(i,r){return r<0||r>255?-1:e.CFF.glyphByUnicode(i,e.CFF.tableSE[r])},e.CFF.readEncoding=function(i,r,s){e._bin;var a=[".notdef"],A=i[r];if(r++,A!=0)throw"error: unknown encoding format: "+A;var c=i[r];r++;for(var l=0;l<c;l++)a.push(i[r+l]);return a},e.CFF.readCharset=function(i,r,s){var a=e._bin,A=[".notdef"],c=i[r];if(r++,c==0)for(var l=0;l<s;l++){var u=a.readUshort(i,r);r+=2,A.push(u)}else{if(c!=1&&c!=2)throw"error: format: "+c;for(;A.length<s;){u=a.readUshort(i,r),r+=2;var g=0;for(c==1?(g=i[r],r++):(g=a.readUshort(i,r),r+=2),l=0;l<=g;l++)A.push(u),u++}}return A},e.CFF.readIndex=function(i,r,s){var a=e._bin,A=a.readUshort(i,r)+1,c=i[r+=2];if(r++,c==1)for(var l=0;l<A;l++)s.push(i[r+l]);else if(c==2)for(l=0;l<A;l++)s.push(a.readUshort(i,r+2*l));else if(c==3)for(l=0;l<A;l++)s.push(16777215&a.readUint(i,r+3*l-1));else if(A!=1)throw"unsupported offset size: "+c+", count: "+A;return(r+=A*c)-1},e.CFF.getCharString=function(i,r,s){var a=e._bin,A=i[r],c=i[r+1];i[r+2],i[r+3],i[r+4];var l=1,u=null,g=null;A<=20&&(u=A,l=1),A==12&&(u=100*A+c,l=2),21<=A&&A<=27&&(u=A,l=1),A==28&&(g=a.readShort(i,r+1),l=3),29<=A&&A<=31&&(u=A,l=1),32<=A&&A<=246&&(g=A-139,l=1),247<=A&&A<=250&&(g=256*(A-247)+c+108,l=2),251<=A&&A<=254&&(g=256*-(A-251)-c-108,l=2),A==255&&(g=a.readInt(i,r+1)/65535,l=5),s.val=g??"o"+u,s.size=l},e.CFF.readCharString=function(i,r,s){for(var a=r+s,A=e._bin,c=[];r<a;){var l=i[r],u=i[r+1];i[r+2],i[r+3],i[r+4];var g=1,h=null,d=null;l<=20&&(h=l,g=1),l==12&&(h=100*l+u,g=2),l!=19&&l!=20||(h=l,g=2),21<=l&&l<=27&&(h=l,g=1),l==28&&(d=A.readShort(i,r+1),g=3),29<=l&&l<=31&&(h=l,g=1),32<=l&&l<=246&&(d=l-139,g=1),247<=l&&l<=250&&(d=256*(l-247)+u+108,g=2),251<=l&&l<=254&&(d=256*-(l-251)-u-108,g=2),l==255&&(d=A.readInt(i,r+1)/65535,g=5),c.push(d??"o"+h),r+=g}return c},e.CFF.readDict=function(i,r,s){for(var a=e._bin,A={},c=[];r<s;){var l=i[r],u=i[r+1];i[r+2],i[r+3],i[r+4];var g=1,h=null,d=null;if(l==28&&(d=a.readShort(i,r+1),g=3),l==29&&(d=a.readInt(i,r+1),g=5),32<=l&&l<=246&&(d=l-139,g=1),247<=l&&l<=250&&(d=256*(l-247)+u+108,g=2),251<=l&&l<=254&&(d=256*-(l-251)-u-108,g=2),l==255)throw d=a.readInt(i,r+1)/65535,g=5,"unknown number";if(l==30){var p=[];for(g=1;;){var m=i[r+g];g++;var _=m>>4,f=15&m;if(_!=15&&p.push(_),f!=15&&p.push(f),f==15)break}for(var I="",C=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],y=0;y<p.length;y++)I+=C[p[y]];d=parseFloat(I)}l<=21&&(h=["version","Notice","FullName","FamilyName","Weight","FontBBox","BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StdHW","StdVW","escape","UniqueID","XUID","charset","Encoding","CharStrings","Private","Subrs","defaultWidthX","nominalWidthX"][l],g=1,l==12&&(h=["Copyright","isFixedPitch","ItalicAngle","UnderlinePosition","UnderlineThickness","PaintType","CharstringType","FontMatrix","StrokeWidth","BlueScale","BlueShift","BlueFuzz","StemSnapH","StemSnapV","ForceBold",0,0,"LanguageGroup","ExpansionFactor","initialRandomSeed","SyntheticBase","PostScript","BaseFontName","BaseFontBlend",0,0,0,0,0,0,"ROS","CIDFontVersion","CIDFontRevision","CIDFontType","CIDCount","UIDBase","FDArray","FDSelect","FontName"][u],g=2)),h!=null?(A[h]=c.length==1?c[0]:c,c=[]):c.push(d),r+=g}return A},e.cmap={},e.cmap.parse=function(i,r,s){i=new Uint8Array(i.buffer,r,s),r=0;var a=e._bin,A={};a.readUshort(i,r),r+=2;var c=a.readUshort(i,r);r+=2;var l=[];A.tables=[];for(var u=0;u<c;u++){var g=a.readUshort(i,r);r+=2;var h=a.readUshort(i,r);r+=2;var d=a.readUint(i,r);r+=4;var p="p"+g+"e"+h,m=l.indexOf(d);if(m==-1){var _;m=A.tables.length,l.push(d);var f=a.readUshort(i,d);f==0?_=e.cmap.parse0(i,d):f==4?_=e.cmap.parse4(i,d):f==6?_=e.cmap.parse6(i,d):f==12?_=e.cmap.parse12(i,d):console.debug("unknown format: "+f,g,h,d),A.tables.push(_)}if(A[p]!=null)throw"multiple tables for one platform+encoding";A[p]=m}return A},e.cmap.parse0=function(i,r){var s=e._bin,a={};a.format=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);r+=2,s.readUshort(i,r),r+=2,a.map=[];for(var c=0;c<A-6;c++)a.map.push(i[r+c]);return a},e.cmap.parse4=function(i,r){var s=e._bin,a=r,A={};A.format=s.readUshort(i,r),r+=2;var c=s.readUshort(i,r);r+=2,s.readUshort(i,r),r+=2;var l=s.readUshort(i,r);r+=2;var u=l/2;A.searchRange=s.readUshort(i,r),r+=2,A.entrySelector=s.readUshort(i,r),r+=2,A.rangeShift=s.readUshort(i,r),r+=2,A.endCount=s.readUshorts(i,r,u),r+=2*u,r+=2,A.startCount=s.readUshorts(i,r,u),r+=2*u,A.idDelta=[];for(var g=0;g<u;g++)A.idDelta.push(s.readShort(i,r)),r+=2;for(A.idRangeOffset=s.readUshorts(i,r,u),r+=2*u,A.glyphIdArray=[];r<a+c;)A.glyphIdArray.push(s.readUshort(i,r)),r+=2;return A},e.cmap.parse6=function(i,r){var s=e._bin,a={};a.format=s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2,a.firstCode=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);r+=2,a.glyphIdArray=[];for(var c=0;c<A;c++)a.glyphIdArray.push(s.readUshort(i,r)),r+=2;return a},e.cmap.parse12=function(i,r){var s=e._bin,a={};a.format=s.readUshort(i,r),r+=2,r+=2,s.readUint(i,r),r+=4,s.readUint(i,r),r+=4;var A=s.readUint(i,r);r+=4,a.groups=[];for(var c=0;c<A;c++){var l=r+12*c,u=s.readUint(i,l+0),g=s.readUint(i,l+4),h=s.readUint(i,l+8);a.groups.push([u,g,h])}return a},e.glyf={},e.glyf.parse=function(i,r,s,a){for(var A=[],c=0;c<a.maxp.numGlyphs;c++)A.push(null);return A},e.glyf._parseGlyf=function(i,r){var s=e._bin,a=i._data,A=e._tabOffset(a,"glyf",i._offset)+i.loca[r];if(i.loca[r]==i.loca[r+1])return null;var c={};if(c.noc=s.readShort(a,A),A+=2,c.xMin=s.readShort(a,A),A+=2,c.yMin=s.readShort(a,A),A+=2,c.xMax=s.readShort(a,A),A+=2,c.yMax=s.readShort(a,A),A+=2,c.xMin>=c.xMax||c.yMin>=c.yMax)return null;if(c.noc>0){c.endPts=[];for(var l=0;l<c.noc;l++)c.endPts.push(s.readUshort(a,A)),A+=2;var u=s.readUshort(a,A);if(A+=2,a.length-A<u)return null;c.instructions=s.readBytes(a,A,u),A+=u;var g=c.endPts[c.noc-1]+1;for(c.flags=[],l=0;l<g;l++){var h=a[A];if(A++,c.flags.push(h),(8&h)!=0){var d=a[A];A++;for(var p=0;p<d;p++)c.flags.push(h),l++}}for(c.xs=[],l=0;l<g;l++){var m=(2&c.flags[l])!=0,_=(16&c.flags[l])!=0;m?(c.xs.push(_?a[A]:-a[A]),A++):_?c.xs.push(0):(c.xs.push(s.readShort(a,A)),A+=2)}for(c.ys=[],l=0;l<g;l++)m=(4&c.flags[l])!=0,_=(32&c.flags[l])!=0,m?(c.ys.push(_?a[A]:-a[A]),A++):_?c.ys.push(0):(c.ys.push(s.readShort(a,A)),A+=2);var f=0,I=0;for(l=0;l<g;l++)f+=c.xs[l],I+=c.ys[l],c.xs[l]=f,c.ys[l]=I}else{var C;c.parts=[];do{C=s.readUshort(a,A),A+=2;var y={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(c.parts.push(y),y.glyphIndex=s.readUshort(a,A),A+=2,1&C){var x=s.readShort(a,A);A+=2;var E=s.readShort(a,A);A+=2}else x=s.readInt8(a,A),A++,E=s.readInt8(a,A),A++;2&C?(y.m.tx=x,y.m.ty=E):(y.p1=x,y.p2=E),8&C?(y.m.a=y.m.d=s.readF2dot14(a,A),A+=2):64&C?(y.m.a=s.readF2dot14(a,A),A+=2,y.m.d=s.readF2dot14(a,A),A+=2):128&C&&(y.m.a=s.readF2dot14(a,A),A+=2,y.m.b=s.readF2dot14(a,A),A+=2,y.m.c=s.readF2dot14(a,A),A+=2,y.m.d=s.readF2dot14(a,A),A+=2)}while(32&C);if(256&C){var B=s.readUshort(a,A);for(A+=2,c.instr=[],l=0;l<B;l++)c.instr.push(a[A]),A++}}return c},e.GDEF={},e.GDEF.parse=function(i,r,s,a){var A=r;r+=4;var c=e._bin.readUshort(i,r);return{glyphClassDef:c===0?null:e._lctf.readClassDef(i,A+c)}},e.GPOS={},e.GPOS.parse=function(i,r,s,a){return e._lctf.parse(i,r,s,a,e.GPOS.subt)},e.GPOS.subt=function(i,r,s,a){var A=e._bin,c=s,l={};if(l.fmt=A.readUshort(i,s),s+=2,r==1||r==2||r==3||r==7||r==8&&l.fmt<=2){var u=A.readUshort(i,s);s+=2,l.coverage=e._lctf.readCoverage(i,u+c)}if(r==1&&l.fmt==1){var g=A.readUshort(i,s);s+=2,g!=0&&(l.pos=e.GPOS.readValueRecord(i,s,g))}else if(r==2&&l.fmt>=1&&l.fmt<=2){g=A.readUshort(i,s),s+=2;var h=A.readUshort(i,s);s+=2;var d=e._lctf.numOfOnes(g),p=e._lctf.numOfOnes(h);if(l.fmt==1){l.pairsets=[];var m=A.readUshort(i,s);s+=2;for(var _=0;_<m;_++){var f=c+A.readUshort(i,s);s+=2;var I=A.readUshort(i,f);f+=2;for(var C=[],y=0;y<I;y++){var x=A.readUshort(i,f);f+=2,g!=0&&(M=e.GPOS.readValueRecord(i,f,g),f+=2*d),h!=0&&(k=e.GPOS.readValueRecord(i,f,h),f+=2*p),C.push({gid2:x,val1:M,val2:k})}l.pairsets.push(C)}}if(l.fmt==2){var E=A.readUshort(i,s);s+=2;var B=A.readUshort(i,s);s+=2;var S=A.readUshort(i,s);s+=2;var Q=A.readUshort(i,s);for(s+=2,l.classDef1=e._lctf.readClassDef(i,c+E),l.classDef2=e._lctf.readClassDef(i,c+B),l.matrix=[],_=0;_<S;_++){var w=[];for(y=0;y<Q;y++){var M=null,k=null;g!=0&&(M=e.GPOS.readValueRecord(i,s,g),s+=2*d),h!=0&&(k=e.GPOS.readValueRecord(i,s,h),s+=2*p),w.push({val1:M,val2:k})}l.matrix.push(w)}}}else if(r==4&&l.fmt==1)l.markCoverage=e._lctf.readCoverage(i,A.readUshort(i,s)+c),l.baseCoverage=e._lctf.readCoverage(i,A.readUshort(i,s+2)+c),l.markClassCount=A.readUshort(i,s+4),l.markArray=e.GPOS.readMarkArray(i,A.readUshort(i,s+6)+c),l.baseArray=e.GPOS.readBaseArray(i,A.readUshort(i,s+8)+c,l.markClassCount);else if(r==6&&l.fmt==1)l.mark1Coverage=e._lctf.readCoverage(i,A.readUshort(i,s)+c),l.mark2Coverage=e._lctf.readCoverage(i,A.readUshort(i,s+2)+c),l.markClassCount=A.readUshort(i,s+4),l.mark1Array=e.GPOS.readMarkArray(i,A.readUshort(i,s+6)+c),l.mark2Array=e.GPOS.readBaseArray(i,A.readUshort(i,s+8)+c,l.markClassCount);else{if(r==9&&l.fmt==1){var R=A.readUshort(i,s);s+=2;var F=A.readUint(i,s);if(s+=4,a.ltype==9)a.ltype=R;else if(a.ltype!=R)throw"invalid extension substitution";return e.GPOS.subt(i,a.ltype,c+F)}console.debug("unsupported GPOS table LookupType",r,"format",l.fmt)}return l},e.GPOS.readValueRecord=function(i,r,s){var a=e._bin,A=[];return A.push(1&s?a.readShort(i,r):0),r+=1&s?2:0,A.push(2&s?a.readShort(i,r):0),r+=2&s?2:0,A.push(4&s?a.readShort(i,r):0),r+=4&s?2:0,A.push(8&s?a.readShort(i,r):0),r+=8&s?2:0,A},e.GPOS.readBaseArray=function(i,r,s){var a=e._bin,A=[],c=r,l=a.readUshort(i,r);r+=2;for(var u=0;u<l;u++){for(var g=[],h=0;h<s;h++)g.push(e.GPOS.readAnchorRecord(i,c+a.readUshort(i,r))),r+=2;A.push(g)}return A},e.GPOS.readMarkArray=function(i,r){var s=e._bin,a=[],A=r,c=s.readUshort(i,r);r+=2;for(var l=0;l<c;l++){var u=e.GPOS.readAnchorRecord(i,s.readUshort(i,r+2)+A);u.markClass=s.readUshort(i,r),a.push(u),r+=4}return a},e.GPOS.readAnchorRecord=function(i,r){var s=e._bin,a={};return a.fmt=s.readUshort(i,r),a.x=s.readShort(i,r+2),a.y=s.readShort(i,r+4),a},e.GSUB={},e.GSUB.parse=function(i,r,s,a){return e._lctf.parse(i,r,s,a,e.GSUB.subt)},e.GSUB.subt=function(i,r,s,a){var A=e._bin,c=s,l={};if(l.fmt=A.readUshort(i,s),s+=2,r!=1&&r!=2&&r!=4&&r!=5&&r!=6)return null;if(r==1||r==2||r==4||r==5&&l.fmt<=2||r==6&&l.fmt<=2){var u=A.readUshort(i,s);s+=2,l.coverage=e._lctf.readCoverage(i,c+u)}if(r==1&&l.fmt>=1&&l.fmt<=2){if(l.fmt==1)l.delta=A.readShort(i,s),s+=2;else if(l.fmt==2){var g=A.readUshort(i,s);s+=2,l.newg=A.readUshorts(i,s,g),s+=2*l.newg.length}}else if(r==2&&l.fmt==1){g=A.readUshort(i,s),s+=2,l.seqs=[];for(var h=0;h<g;h++){var d=A.readUshort(i,s)+c;s+=2;var p=A.readUshort(i,d);l.seqs.push(A.readUshorts(i,d+2,p))}}else if(r==4)for(l.vals=[],g=A.readUshort(i,s),s+=2,h=0;h<g;h++){var m=A.readUshort(i,s);s+=2,l.vals.push(e.GSUB.readLigatureSet(i,c+m))}else if(r==5&&l.fmt==2){if(l.fmt==2){var _=A.readUshort(i,s);s+=2,l.cDef=e._lctf.readClassDef(i,c+_),l.scset=[];var f=A.readUshort(i,s);for(s+=2,h=0;h<f;h++){var I=A.readUshort(i,s);s+=2,l.scset.push(I==0?null:e.GSUB.readSubClassSet(i,c+I))}}}else if(r==6&&l.fmt==3){if(l.fmt==3){for(h=0;h<3;h++){g=A.readUshort(i,s),s+=2;for(var C=[],y=0;y<g;y++)C.push(e._lctf.readCoverage(i,c+A.readUshort(i,s+2*y)));s+=2*g,h==0&&(l.backCvg=C),h==1&&(l.inptCvg=C),h==2&&(l.ahedCvg=C)}g=A.readUshort(i,s),s+=2,l.lookupRec=e.GSUB.readSubstLookupRecords(i,s,g)}}else{if(r==7&&l.fmt==1){var x=A.readUshort(i,s);s+=2;var E=A.readUint(i,s);if(s+=4,a.ltype==9)a.ltype=x;else if(a.ltype!=x)throw"invalid extension substitution";return e.GSUB.subt(i,a.ltype,c+E)}console.debug("unsupported GSUB table LookupType",r,"format",l.fmt)}return l},e.GSUB.readSubClassSet=function(i,r){var s=e._bin.readUshort,a=r,A=[],c=s(i,r);r+=2;for(var l=0;l<c;l++){var u=s(i,r);r+=2,A.push(e.GSUB.readSubClassRule(i,a+u))}return A},e.GSUB.readSubClassRule=function(i,r){var s=e._bin.readUshort,a={},A=s(i,r),c=s(i,r+=2);r+=2,a.input=[];for(var l=0;l<A-1;l++)a.input.push(s(i,r)),r+=2;return a.substLookupRecords=e.GSUB.readSubstLookupRecords(i,r,c),a},e.GSUB.readSubstLookupRecords=function(i,r,s){for(var a=e._bin.readUshort,A=[],c=0;c<s;c++)A.push(a(i,r),a(i,r+2)),r+=4;return A},e.GSUB.readChainSubClassSet=function(i,r){var s=e._bin,a=r,A=[],c=s.readUshort(i,r);r+=2;for(var l=0;l<c;l++){var u=s.readUshort(i,r);r+=2,A.push(e.GSUB.readChainSubClassRule(i,a+u))}return A},e.GSUB.readChainSubClassRule=function(i,r){for(var s=e._bin,a={},A=["backtrack","input","lookahead"],c=0;c<A.length;c++){var l=s.readUshort(i,r);r+=2,c==1&&l--,a[A[c]]=s.readUshorts(i,r,l),r+=2*a[A[c]].length}return l=s.readUshort(i,r),r+=2,a.subst=s.readUshorts(i,r,2*l),r+=2*a.subst.length,a},e.GSUB.readLigatureSet=function(i,r){var s=e._bin,a=r,A=[],c=s.readUshort(i,r);r+=2;for(var l=0;l<c;l++){var u=s.readUshort(i,r);r+=2,A.push(e.GSUB.readLigature(i,a+u))}return A},e.GSUB.readLigature=function(i,r){var s=e._bin,a={chain:[]};a.nglyph=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);r+=2;for(var c=0;c<A-1;c++)a.chain.push(s.readUshort(i,r)),r+=2;return a},e.head={},e.head.parse=function(i,r,s){var a=e._bin,A={};return a.readFixed(i,r),r+=4,A.fontRevision=a.readFixed(i,r),r+=4,a.readUint(i,r),r+=4,a.readUint(i,r),r+=4,A.flags=a.readUshort(i,r),r+=2,A.unitsPerEm=a.readUshort(i,r),r+=2,A.created=a.readUint64(i,r),r+=8,A.modified=a.readUint64(i,r),r+=8,A.xMin=a.readShort(i,r),r+=2,A.yMin=a.readShort(i,r),r+=2,A.xMax=a.readShort(i,r),r+=2,A.yMax=a.readShort(i,r),r+=2,A.macStyle=a.readUshort(i,r),r+=2,A.lowestRecPPEM=a.readUshort(i,r),r+=2,A.fontDirectionHint=a.readShort(i,r),r+=2,A.indexToLocFormat=a.readShort(i,r),r+=2,A.glyphDataFormat=a.readShort(i,r),r+=2,A},e.hhea={},e.hhea.parse=function(i,r,s){var a=e._bin,A={};return a.readFixed(i,r),r+=4,A.ascender=a.readShort(i,r),r+=2,A.descender=a.readShort(i,r),r+=2,A.lineGap=a.readShort(i,r),r+=2,A.advanceWidthMax=a.readUshort(i,r),r+=2,A.minLeftSideBearing=a.readShort(i,r),r+=2,A.minRightSideBearing=a.readShort(i,r),r+=2,A.xMaxExtent=a.readShort(i,r),r+=2,A.caretSlopeRise=a.readShort(i,r),r+=2,A.caretSlopeRun=a.readShort(i,r),r+=2,A.caretOffset=a.readShort(i,r),r+=2,r+=8,A.metricDataFormat=a.readShort(i,r),r+=2,A.numberOfHMetrics=a.readUshort(i,r),r+=2,A},e.hmtx={},e.hmtx.parse=function(i,r,s,a){for(var A=e._bin,c={aWidth:[],lsBearing:[]},l=0,u=0,g=0;g<a.maxp.numGlyphs;g++)g<a.hhea.numberOfHMetrics&&(l=A.readUshort(i,r),r+=2,u=A.readShort(i,r),r+=2),c.aWidth.push(l),c.lsBearing.push(u);return c},e.kern={},e.kern.parse=function(i,r,s,a){var A=e._bin,c=A.readUshort(i,r);if(r+=2,c==1)return e.kern.parseV1(i,r-2,s,a);var l=A.readUshort(i,r);r+=2;for(var u={glyph1:[],rval:[]},g=0;g<l;g++){r+=2,s=A.readUshort(i,r),r+=2;var h=A.readUshort(i,r);r+=2;var d=h>>>8;if((d&=15)!=0)throw"unknown kern table format: "+d;r=e.kern.readFormat0(i,r,u)}return u},e.kern.parseV1=function(i,r,s,a){var A=e._bin;A.readFixed(i,r),r+=4;var c=A.readUint(i,r);r+=4;for(var l={glyph1:[],rval:[]},u=0;u<c;u++){A.readUint(i,r),r+=4;var g=A.readUshort(i,r);r+=2,A.readUshort(i,r),r+=2;var h=g>>>8;if((h&=15)!=0)throw"unknown kern table format: "+h;r=e.kern.readFormat0(i,r,l)}return l},e.kern.readFormat0=function(i,r,s){var a=e._bin,A=-1,c=a.readUshort(i,r);r+=2,a.readUshort(i,r),r+=2,a.readUshort(i,r),r+=2,a.readUshort(i,r),r+=2;for(var l=0;l<c;l++){var u=a.readUshort(i,r);r+=2;var g=a.readUshort(i,r);r+=2;var h=a.readShort(i,r);r+=2,u!=A&&(s.glyph1.push(u),s.rval.push({glyph2:[],vals:[]}));var d=s.rval[s.rval.length-1];d.glyph2.push(g),d.vals.push(h),A=u}return r},e.loca={},e.loca.parse=function(i,r,s,a){var A=e._bin,c=[],l=a.head.indexToLocFormat,u=a.maxp.numGlyphs+1;if(l==0)for(var g=0;g<u;g++)c.push(A.readUshort(i,r+(g<<1))<<1);if(l==1)for(g=0;g<u;g++)c.push(A.readUint(i,r+(g<<2)));return c},e.maxp={},e.maxp.parse=function(i,r,s){var a=e._bin,A={},c=a.readUint(i,r);return r+=4,A.numGlyphs=a.readUshort(i,r),r+=2,c==65536&&(A.maxPoints=a.readUshort(i,r),r+=2,A.maxContours=a.readUshort(i,r),r+=2,A.maxCompositePoints=a.readUshort(i,r),r+=2,A.maxCompositeContours=a.readUshort(i,r),r+=2,A.maxZones=a.readUshort(i,r),r+=2,A.maxTwilightPoints=a.readUshort(i,r),r+=2,A.maxStorage=a.readUshort(i,r),r+=2,A.maxFunctionDefs=a.readUshort(i,r),r+=2,A.maxInstructionDefs=a.readUshort(i,r),r+=2,A.maxStackElements=a.readUshort(i,r),r+=2,A.maxSizeOfInstructions=a.readUshort(i,r),r+=2,A.maxComponentElements=a.readUshort(i,r),r+=2,A.maxComponentDepth=a.readUshort(i,r),r+=2),A},e.name={},e.name.parse=function(i,r,s){var a=e._bin,A={};a.readUshort(i,r),r+=2;var c=a.readUshort(i,r);r+=2,a.readUshort(i,r);for(var l,u=["copyright","fontFamily","fontSubfamily","ID","fullName","version","postScriptName","trademark","manufacturer","designer","description","urlVendor","urlDesigner","licence","licenceURL","---","typoFamilyName","typoSubfamilyName","compatibleFull","sampleText","postScriptCID","wwsFamilyName","wwsSubfamilyName","lightPalette","darkPalette"],g=r+=2,h=0;h<c;h++){var d=a.readUshort(i,r);r+=2;var p=a.readUshort(i,r);r+=2;var m=a.readUshort(i,r);r+=2;var _=a.readUshort(i,r);r+=2;var f=a.readUshort(i,r);r+=2;var I=a.readUshort(i,r);r+=2;var C,y=u[_],x=g+12*c+I;if(d==0)C=a.readUnicode(i,x,f/2);else if(d==3&&p==0)C=a.readUnicode(i,x,f/2);else if(p==0)C=a.readASCII(i,x,f);else if(p==1)C=a.readUnicode(i,x,f/2);else if(p==3)C=a.readUnicode(i,x,f/2);else{if(d!=1)throw"unknown encoding "+p+", platformID: "+d;C=a.readASCII(i,x,f),console.debug("reading unknown MAC encoding "+p+" as ASCII")}var E="p"+d+","+m.toString(16);A[E]==null&&(A[E]={}),A[E][y!==void 0?y:_]=C,A[E]._lang=m}for(var B in A)if(A[B].postScriptName!=null&&A[B]._lang==1033)return A[B];for(var B in A)if(A[B].postScriptName!=null&&A[B]._lang==0)return A[B];for(var B in A)if(A[B].postScriptName!=null&&A[B]._lang==3084)return A[B];for(var B in A)if(A[B].postScriptName!=null)return A[B];for(var B in A){l=B;break}return console.debug("returning name table with languageID "+A[l]._lang),A[l]},e["OS/2"]={},e["OS/2"].parse=function(i,r,s){var a=e._bin.readUshort(i,r);r+=2;var A={};if(a==0)e["OS/2"].version0(i,r,A);else if(a==1)e["OS/2"].version1(i,r,A);else if(a==2||a==3||a==4)e["OS/2"].version2(i,r,A);else{if(a!=5)throw"unknown OS/2 table version: "+a;e["OS/2"].version5(i,r,A)}return A},e["OS/2"].version0=function(i,r,s){var a=e._bin;return s.xAvgCharWidth=a.readShort(i,r),r+=2,s.usWeightClass=a.readUshort(i,r),r+=2,s.usWidthClass=a.readUshort(i,r),r+=2,s.fsType=a.readUshort(i,r),r+=2,s.ySubscriptXSize=a.readShort(i,r),r+=2,s.ySubscriptYSize=a.readShort(i,r),r+=2,s.ySubscriptXOffset=a.readShort(i,r),r+=2,s.ySubscriptYOffset=a.readShort(i,r),r+=2,s.ySuperscriptXSize=a.readShort(i,r),r+=2,s.ySuperscriptYSize=a.readShort(i,r),r+=2,s.ySuperscriptXOffset=a.readShort(i,r),r+=2,s.ySuperscriptYOffset=a.readShort(i,r),r+=2,s.yStrikeoutSize=a.readShort(i,r),r+=2,s.yStrikeoutPosition=a.readShort(i,r),r+=2,s.sFamilyClass=a.readShort(i,r),r+=2,s.panose=a.readBytes(i,r,10),r+=10,s.ulUnicodeRange1=a.readUint(i,r),r+=4,s.ulUnicodeRange2=a.readUint(i,r),r+=4,s.ulUnicodeRange3=a.readUint(i,r),r+=4,s.ulUnicodeRange4=a.readUint(i,r),r+=4,s.achVendID=[a.readInt8(i,r),a.readInt8(i,r+1),a.readInt8(i,r+2),a.readInt8(i,r+3)],r+=4,s.fsSelection=a.readUshort(i,r),r+=2,s.usFirstCharIndex=a.readUshort(i,r),r+=2,s.usLastCharIndex=a.readUshort(i,r),r+=2,s.sTypoAscender=a.readShort(i,r),r+=2,s.sTypoDescender=a.readShort(i,r),r+=2,s.sTypoLineGap=a.readShort(i,r),r+=2,s.usWinAscent=a.readUshort(i,r),r+=2,s.usWinDescent=a.readUshort(i,r),r+=2},e["OS/2"].version1=function(i,r,s){var a=e._bin;return r=e["OS/2"].version0(i,r,s),s.ulCodePageRange1=a.readUint(i,r),r+=4,s.ulCodePageRange2=a.readUint(i,r),r+=4},e["OS/2"].version2=function(i,r,s){var a=e._bin;return r=e["OS/2"].version1(i,r,s),s.sxHeight=a.readShort(i,r),r+=2,s.sCapHeight=a.readShort(i,r),r+=2,s.usDefault=a.readUshort(i,r),r+=2,s.usBreak=a.readUshort(i,r),r+=2,s.usMaxContext=a.readUshort(i,r),r+=2},e["OS/2"].version5=function(i,r,s){var a=e._bin;return r=e["OS/2"].version2(i,r,s),s.usLowerOpticalPointSize=a.readUshort(i,r),r+=2,s.usUpperOpticalPointSize=a.readUshort(i,r),r+=2},e.post={},e.post.parse=function(i,r,s){var a=e._bin,A={};return A.version=a.readFixed(i,r),r+=4,A.italicAngle=a.readFixed(i,r),r+=4,A.underlinePosition=a.readShort(i,r),r+=2,A.underlineThickness=a.readShort(i,r),r+=2,A},e==null&&(e={}),e.U==null&&(e.U={}),e.U.codeToGlyph=function(i,r){var s=i.cmap,a=-1;if(s.p0e4!=null?a=s.p0e4:s.p3e1!=null?a=s.p3e1:s.p1e0!=null?a=s.p1e0:s.p0e3!=null&&(a=s.p0e3),a==-1)throw"no familiar platform and encoding!";var A=s.tables[a];if(A.format==0)return r>=A.map.length?0:A.map[r];if(A.format==4){for(var c=-1,l=0;l<A.endCount.length;l++)if(r<=A.endCount[l]){c=l;break}return c==-1||A.startCount[c]>r?0:65535&(A.idRangeOffset[c]!=0?A.glyphIdArray[r-A.startCount[c]+(A.idRangeOffset[c]>>1)-(A.idRangeOffset.length-c)]:r+A.idDelta[c])}if(A.format==12){if(r>A.groups[A.groups.length-1][1])return 0;for(l=0;l<A.groups.length;l++){var u=A.groups[l];if(u[0]<=r&&r<=u[1])return u[2]+(r-u[0])}return 0}throw"unknown cmap table format "+A.format},e.U.glyphToPath=function(i,r){var s={cmds:[],crds:[]};if(i.SVG&&i.SVG.entries[r]){var a=i.SVG.entries[r];return a==null?s:(typeof a=="string"&&(a=e.SVG.toPath(a),i.SVG.entries[r]=a),a)}if(i.CFF){var A={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:i.CFF.Private?i.CFF.Private.defaultWidthX:0,open:!1},c=i.CFF,l=i.CFF.Private;if(c.ROS){for(var u=0;c.FDSelect[u+2]<=r;)u+=2;l=c.FDArray[c.FDSelect[u+1]].Private}e.U._drawCFF(i.CFF.CharStrings[r],A,c,l,s)}else i.glyf&&e.U._drawGlyf(r,i,s);return s},e.U._drawGlyf=function(i,r,s){var a=r.glyf[i];a==null&&(a=r.glyf[i]=e.glyf._parseGlyf(r,i)),a!=null&&(a.noc>-1?e.U._simpleGlyph(a,s):e.U._compoGlyph(a,r,s))},e.U._simpleGlyph=function(i,r){for(var s=0;s<i.noc;s++){for(var a=s==0?0:i.endPts[s-1]+1,A=i.endPts[s],c=a;c<=A;c++){var l=c==a?A:c-1,u=c==A?a:c+1,g=1&i.flags[c],h=1&i.flags[l],d=1&i.flags[u],p=i.xs[c],m=i.ys[c];if(c==a)if(g){if(!h){e.U.P.moveTo(r,p,m);continue}e.U.P.moveTo(r,i.xs[l],i.ys[l])}else h?e.U.P.moveTo(r,i.xs[l],i.ys[l]):e.U.P.moveTo(r,(i.xs[l]+p)/2,(i.ys[l]+m)/2);g?h&&e.U.P.lineTo(r,p,m):d?e.U.P.qcurveTo(r,p,m,i.xs[u],i.ys[u]):e.U.P.qcurveTo(r,p,m,(p+i.xs[u])/2,(m+i.ys[u])/2)}e.U.P.closePath(r)}},e.U._compoGlyph=function(i,r,s){for(var a=0;a<i.parts.length;a++){var A={cmds:[],crds:[]},c=i.parts[a];e.U._drawGlyf(c.glyphIndex,r,A);for(var l=c.m,u=0;u<A.crds.length;u+=2){var g=A.crds[u],h=A.crds[u+1];s.crds.push(g*l.a+h*l.b+l.tx),s.crds.push(g*l.c+h*l.d+l.ty)}for(u=0;u<A.cmds.length;u++)s.cmds.push(A.cmds[u])}},e.U._getGlyphClass=function(i,r){var s=e._lctf.getInterval(r,i);return s==-1?0:r[s+2]},e.U._applySubs=function(i,r,s,a){for(var A=i.length-r-1,c=0;c<s.tabs.length;c++)if(s.tabs[c]!=null){var l,u=s.tabs[c];if(!u.coverage||(l=e._lctf.coverageIndex(u.coverage,i[r]))!=-1){if(s.ltype==1)i[r],u.fmt==1?i[r]=i[r]+u.delta:i[r]=u.newg[l];else if(s.ltype==4)for(var g=u.vals[l],h=0;h<g.length;h++){var d=g[h],p=d.chain.length;if(!(p>A)){for(var m=!0,_=0,f=0;f<p;f++){for(;i[r+_+(1+f)]==-1;)_++;d.chain[f]!=i[r+_+(1+f)]&&(m=!1)}if(m){for(i[r]=d.nglyph,f=0;f<p+_;f++)i[r+f+1]=-1;break}}}else if(s.ltype==5&&u.fmt==2)for(var I=e._lctf.getInterval(u.cDef,i[r]),C=u.cDef[I+2],y=u.scset[C],x=0;x<y.length;x++){var E=y[x],B=E.input;if(!(B.length>A)){for(m=!0,f=0;f<B.length;f++){var S=e._lctf.getInterval(u.cDef,i[r+1+f]);if(I==-1&&u.cDef[S+2]!=B[f]){m=!1;break}}if(m){var Q=E.substLookupRecords;for(h=0;h<Q.length;h+=2)Q[h],Q[h+1]}}}else if(s.ltype==6&&u.fmt==3){if(!e.U._glsCovered(i,u.backCvg,r-u.backCvg.length)||!e.U._glsCovered(i,u.inptCvg,r)||!e.U._glsCovered(i,u.ahedCvg,r+u.inptCvg.length))continue;var w=u.lookupRec;for(x=0;x<w.length;x+=2){I=w[x];var M=a[w[x+1]];e.U._applySubs(i,r+I,M,a)}}}}},e.U._glsCovered=function(i,r,s){for(var a=0;a<r.length;a++)if(e._lctf.coverageIndex(r[a],i[s+a])==-1)return!1;return!0},e.U.glyphsToPath=function(i,r,s){for(var a={cmds:[],crds:[]},A=0,c=0;c<r.length;c++){var l=r[c];if(l!=-1){for(var u=c<r.length-1&&r[c+1]!=-1?r[c+1]:0,g=e.U.glyphToPath(i,l),h=0;h<g.crds.length;h+=2)a.crds.push(g.crds[h]+A),a.crds.push(g.crds[h+1]);for(s&&a.cmds.push(s),h=0;h<g.cmds.length;h++)a.cmds.push(g.cmds[h]);s&&a.cmds.push("X"),A+=i.hmtx.aWidth[l],c<r.length-1&&(A+=e.U.getPairAdjustment(i,l,u))}}return a},e.U.P={},e.U.P.moveTo=function(i,r,s){i.cmds.push("M"),i.crds.push(r,s)},e.U.P.lineTo=function(i,r,s){i.cmds.push("L"),i.crds.push(r,s)},e.U.P.curveTo=function(i,r,s,a,A,c,l){i.cmds.push("C"),i.crds.push(r,s,a,A,c,l)},e.U.P.qcurveTo=function(i,r,s,a,A){i.cmds.push("Q"),i.crds.push(r,s,a,A)},e.U.P.closePath=function(i){i.cmds.push("Z")},e.U._drawCFF=function(i,r,s,a,A){for(var c=r.stack,l=r.nStems,u=r.haveWidth,g=r.width,h=r.open,d=0,p=r.x,m=r.y,_=0,f=0,I=0,C=0,y=0,x=0,E=0,B=0,S=0,Q=0,w={val:0,size:0};d<i.length;){e.CFF.getCharString(i,d,w);var M=w.val;if(d+=w.size,M=="o1"||M=="o18")c.length%2!=0&&!u&&(g=c.shift()+a.nominalWidthX),l+=c.length>>1,c.length=0,u=!0;else if(M=="o3"||M=="o23")c.length%2!=0&&!u&&(g=c.shift()+a.nominalWidthX),l+=c.length>>1,c.length=0,u=!0;else if(M=="o4")c.length>1&&!u&&(g=c.shift()+a.nominalWidthX,u=!0),h&&e.U.P.closePath(A),m+=c.pop(),e.U.P.moveTo(A,p,m),h=!0;else if(M=="o5")for(;c.length>0;)p+=c.shift(),m+=c.shift(),e.U.P.lineTo(A,p,m);else if(M=="o6"||M=="o7")for(var k=c.length,R=M=="o6",F=0;F<k;F++){var O=c.shift();R?p+=O:m+=O,R=!R,e.U.P.lineTo(A,p,m)}else if(M=="o8"||M=="o24"){k=c.length;for(var U=0;U+6<=k;)_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),p=I+c.shift(),m=C+c.shift(),e.U.P.curveTo(A,_,f,I,C,p,m),U+=6;M=="o24"&&(p+=c.shift(),m+=c.shift(),e.U.P.lineTo(A,p,m))}else{if(M=="o11")break;if(M=="o1234"||M=="o1235"||M=="o1236"||M=="o1237")M=="o1234"&&(f=m,I=(_=p+c.shift())+c.shift(),Q=C=f+c.shift(),x=C,B=m,p=(E=(y=(S=I+c.shift())+c.shift())+c.shift())+c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m)),M=="o1235"&&(_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),S=I+c.shift(),Q=C+c.shift(),y=S+c.shift(),x=Q+c.shift(),E=y+c.shift(),B=x+c.shift(),p=E+c.shift(),m=B+c.shift(),c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m)),M=="o1236"&&(_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),Q=C=f+c.shift(),x=C,E=(y=(S=I+c.shift())+c.shift())+c.shift(),B=x+c.shift(),p=E+c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m)),M=="o1237"&&(_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),S=I+c.shift(),Q=C+c.shift(),y=S+c.shift(),x=Q+c.shift(),E=y+c.shift(),B=x+c.shift(),Math.abs(E-p)>Math.abs(B-m)?p=E+c.shift():m=B+c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m));else if(M=="o14"){if(c.length>0&&!u&&(g=c.shift()+s.nominalWidthX,u=!0),c.length==4){var Y=c.shift(),W=c.shift(),te=c.shift(),j=c.shift(),J=e.CFF.glyphBySE(s,te),oe=e.CFF.glyphBySE(s,j);e.U._drawCFF(s.CharStrings[J],r,s,a,A),r.x=Y,r.y=W,e.U._drawCFF(s.CharStrings[oe],r,s,a,A)}h&&(e.U.P.closePath(A),h=!1)}else if(M=="o19"||M=="o20")c.length%2!=0&&!u&&(g=c.shift()+a.nominalWidthX),l+=c.length>>1,c.length=0,u=!0,d+=l+7>>3;else if(M=="o21")c.length>2&&!u&&(g=c.shift()+a.nominalWidthX,u=!0),m+=c.pop(),p+=c.pop(),h&&e.U.P.closePath(A),e.U.P.moveTo(A,p,m),h=!0;else if(M=="o22")c.length>1&&!u&&(g=c.shift()+a.nominalWidthX,u=!0),p+=c.pop(),h&&e.U.P.closePath(A),e.U.P.moveTo(A,p,m),h=!0;else if(M=="o25"){for(;c.length>6;)p+=c.shift(),m+=c.shift(),e.U.P.lineTo(A,p,m);_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),p=I+c.shift(),m=C+c.shift(),e.U.P.curveTo(A,_,f,I,C,p,m)}else if(M=="o26")for(c.length%2&&(p+=c.shift());c.length>0;)_=p,f=m+c.shift(),p=I=_+c.shift(),m=(C=f+c.shift())+c.shift(),e.U.P.curveTo(A,_,f,I,C,p,m);else if(M=="o27")for(c.length%2&&(m+=c.shift());c.length>0;)f=m,I=(_=p+c.shift())+c.shift(),C=f+c.shift(),p=I+c.shift(),m=C,e.U.P.curveTo(A,_,f,I,C,p,m);else if(M=="o10"||M=="o29"){var ie=M=="o10"?a:s;if(c.length==0)console.debug("error: empty stack");else{var ne=c.pop(),le=ie.Subrs[ne+ie.Bias];r.x=p,r.y=m,r.nStems=l,r.haveWidth=u,r.width=g,r.open=h,e.U._drawCFF(le,r,s,a,A),p=r.x,m=r.y,l=r.nStems,u=r.haveWidth,g=r.width,h=r.open}}else if(M=="o30"||M=="o31"){var ge=c.length,_e=(U=0,M=="o31");for(U+=ge-(k=-3&ge);U<k;)_e?(f=m,I=(_=p+c.shift())+c.shift(),m=(C=f+c.shift())+c.shift(),k-U==5?(p=I+c.shift(),U++):p=I,_e=!1):(_=p,f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),p=I+c.shift(),k-U==5?(m=C+c.shift(),U++):m=C,_e=!0),e.U.P.curveTo(A,_,f,I,C,p,m),U+=4}else{if((M+"").charAt(0)=="o")throw console.debug("Unknown operation: "+M,i),M;c.push(M)}}}r.x=p,r.y=m,r.nStems=l,r.haveWidth=u,r.width=g,r.open=h};var n=e,o={Typr:n};return t.Typr=n,t.default=o,Object.defineProperty(t,"__esModule",{value:!0}),t})({}).Typr}function Koi(){return(function(t){var e=Uint8Array,n=Uint16Array,o=Uint32Array,i=new e([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),r=new e([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(M,k){for(var R=new n(31),F=0;F<31;++F)R[F]=k+=1<<M[F-1];var O=new o(R[30]);for(F=1;F<30;++F)for(var U=R[F];U<R[F+1];++U)O[U]=U-R[F]<<5|F;return[R,O]},A=a(i,2),c=A[0],l=A[1];c[28]=258,l[258]=28;for(var u=a(r,0)[0],g=new n(32768),h=0;h<32768;++h){var d=(43690&h)>>>1|(21845&h)<<1;d=(61680&(d=(52428&d)>>>2|(13107&d)<<2))>>>4|(3855&d)<<4,g[h]=((65280&d)>>>8|(255&d)<<8)>>>1}var p=function(M,k,R){for(var F=M.length,O=0,U=new n(k);O<F;++O)++U[M[O]-1];var Y,W=new n(k);for(O=0;O<k;++O)W[O]=W[O-1]+U[O-1]<<1;{Y=new n(1<<k);var te=15-k;for(O=0;O<F;++O)if(M[O])for(var j=O<<4|M[O],J=k-M[O],oe=W[M[O]-1]++<<J,ie=oe|(1<<J)-1;oe<=ie;++oe)Y[g[oe]>>>te]=j}return Y},m=new e(288);for(h=0;h<144;++h)m[h]=8;for(h=144;h<256;++h)m[h]=9;for(h=256;h<280;++h)m[h]=7;for(h=280;h<288;++h)m[h]=8;var _=new e(32);for(h=0;h<32;++h)_[h]=5;var f=p(m,9),I=p(_,5),C=function(M){for(var k=M[0],R=1;R<M.length;++R)M[R]>k&&(k=M[R]);return k},y=function(M,k,R){var F=k/8|0;return(M[F]|M[F+1]<<8)>>(7&k)&R},x=function(M,k){var R=k/8|0;return(M[R]|M[R+1]<<8|M[R+2]<<16)>>(7&k)},E=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],B=function(M,k,R){var F=new Error(k||E[M]);if(F.code=M,Error.captureStackTrace&&Error.captureStackTrace(F,B),!R)throw F;return F},S=function(M,k,R){var F=M.length;if(!F||R&&!R.l&&F<5)return k||new e(0);var O=!k||R,U=!R||R.i;R||(R={}),k||(k=new e(3*F));var Y,W=function(it){var Yt=k.length;if(it>Yt){var pn=new e(Math.max(2*Yt,it));pn.set(k),k=pn}},te=R.f||0,j=R.p||0,J=R.b||0,oe=R.l,ie=R.d,ne=R.m,le=R.n,ge=8*F;do{if(!oe){R.f=te=y(M,j,1);var _e=y(M,j+1,3);if(j+=3,!_e){var ue=M[(Re=((Y=j)/8|0)+(7&Y&&1)+4)-4]|M[Re-3]<<8,fe=Re+ue;if(fe>F){U&&B(0);break}O&&W(J+ue),k.set(M.subarray(Re,fe),J),R.b=J+=ue,R.p=j=8*fe;continue}if(_e==1)oe=f,ie=I,ne=9,le=5;else if(_e==2){var pe=y(M,j,31)+257,ye=y(M,j+10,15)+4,Me=pe+y(M,j+5,31)+1;j+=14;for(var ve=new e(Me),he=new e(19),Qe=0;Qe<ye;++Qe)he[s[Qe]]=y(M,j+3*Qe,7);j+=3*ye;var Pe=C(he),we=(1<<Pe)-1,Te=p(he,Pe);for(Qe=0;Qe<Me;){var Re,Ee=Te[y(M,j,we)];if(j+=15&Ee,(Re=Ee>>>4)<16)ve[Qe++]=Re;else{var ke=0,Ce=0;for(Re==16?(Ce=3+y(M,j,3),j+=2,ke=ve[Qe-1]):Re==17?(Ce=3+y(M,j,7),j+=3):Re==18&&(Ce=11+y(M,j,127),j+=7);Ce--;)ve[Qe++]=ke}}var Le=ve.subarray(0,pe),Ye=ve.subarray(pe);ne=C(Le),le=C(Ye),oe=p(Le,ne),ie=p(Ye,le)}else B(1);if(j>ge){U&&B(0);break}}O&&W(J+131072);for(var tt=(1<<ne)-1,At=(1<<le)-1,at=j;;at=j){var nt=(ke=oe[x(M,j)&tt])>>>4;if((j+=15&ke)>ge){U&&B(0);break}if(ke||B(2),nt<256)k[J++]=nt;else{if(nt==256){at=j,oe=null;break}var gt=nt-254;if(nt>264){var bt=i[Qe=nt-257];gt=y(M,j,(1<<bt)-1)+c[Qe],j+=bt}var Ct=ie[x(M,j)&At],Dt=Ct>>>4;if(Ct||B(3),j+=15&Ct,Ye=u[Dt],Dt>3&&(bt=r[Dt],Ye+=x(M,j)&(1<<bt)-1,j+=bt),j>ge){U&&B(0);break}O&&W(J+131072);for(var kt=J+gt;J<kt;J+=4)k[J]=k[J-Ye],k[J+1]=k[J+1-Ye],k[J+2]=k[J+2-Ye],k[J+3]=k[J+3-Ye];J=kt}}R.l=oe,R.p=at,R.b=J,oe&&(te=1,R.m=ne,R.d=ie,R.n=le)}while(!te);return J==k.length?k:(function(it,Yt,pn){(pn==null||pn>it.length)&&(pn=it.length);var be=new(it instanceof n?n:it instanceof o?o:e)(pn-Yt);return be.set(it.subarray(Yt,pn)),be})(k,0,J)},Q=new e(0),w=typeof TextDecoder<"u"&&new TextDecoder;try{w.decode(Q,{stream:!0})}catch{}return t.convert_streams=function(M){var k=new DataView(M),R=0;function F(){var pe=k.getUint16(R);return R+=2,pe}function O(){var pe=k.getUint32(R);return R+=4,pe}function U(pe){ue.setUint16(fe,pe),fe+=2}function Y(pe){ue.setUint32(fe,pe),fe+=4}for(var W={signature:O(),flavor:O(),length:O(),numTables:F(),reserved:F(),totalSfntSize:O(),majorVersion:F(),minorVersion:F(),metaOffset:O(),metaLength:O(),metaOrigLength:O(),privOffset:O(),privLength:O()},te=0;Math.pow(2,te)<=W.numTables;)te++;te--;for(var j=16*Math.pow(2,te),J=16*W.numTables-j,oe=12,ie=[],ne=0;ne<W.numTables;ne++)ie.push({tag:O(),offset:O(),compLength:O(),origLength:O(),origChecksum:O()}),oe+=16;var le,ge=new Uint8Array(12+16*ie.length+ie.reduce((function(pe,ye){return pe+ye.origLength+4}),0)),_e=ge.buffer,ue=new DataView(_e),fe=0;return Y(W.flavor),U(W.numTables),U(j),U(te),U(J),ie.forEach((function(pe){Y(pe.tag),Y(pe.origChecksum),Y(oe),Y(pe.origLength),pe.outOffset=oe,(oe+=pe.origLength)%4!=0&&(oe+=4-oe%4)})),ie.forEach((function(pe){var ye,Me=M.slice(pe.offset,pe.offset+pe.compLength);if(pe.compLength!=pe.origLength){var ve=new Uint8Array(pe.origLength);ye=new Uint8Array(Me,2),S(ye,ve)}else ve=new Uint8Array(Me);ge.set(ve,pe.outOffset);var he=0;(oe=pe.outOffset+pe.origLength)%4!=0&&(he=4-oe%4),ge.set(new Uint8Array(he).buffer,pe.outOffset+pe.origLength),le=oe+he})),_e.slice(0,le)},Object.defineProperty(t,"__esModule",{value:!0}),t})({}).convert_streams}function Voi(t,e){const n={M:2,L:2,Q:4,C:6,Z:0},o={C:"18g,ca,368,1kz",D:"17k,6,2,2+4,5+c,2+6,2+1,10+1,9+f,j+11,2+1,a,2,2+1,15+2,3,j+2,6+3,2+8,2,2,2+1,w+a,4+e,3+3,2,3+2,3+5,23+w,2f+4,3,2+9,2,b,2+3,3,1k+9,6+1,3+1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,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,5s,6y+2,ea,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+9,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2,2b+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,470+8,at4+4,1o+6,t5,1s+3,2a,f5l+1,2+3,43o+2,a+7,1+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,1,gzau,v+2n,3l+6n"},i=1,r=2,s=4,a=8,A=16,c=32;let l;function u(E){if(!l){const B={R:r,L:i,D:s,C:A,U:c,T:a};l=new Map;for(let S in o){let Q=0;o[S].split(",").forEach(w=>{let[M,k]=w.split("+");M=parseInt(M,36),k=k?parseInt(k,36):0,l.set(Q+=M,B[S]);for(let R=k;R--;)l.set(++Q,B[S])})}}return l.get(E)||c}const g=1,h=2,d=3,p=4,m=[null,"isol","init","fina","medi"];function _(E){const B=new Uint8Array(E.length);let S=c,Q=g,w=-1;for(let M=0;M<E.length;M++){const k=E.codePointAt(M);let R=u(k)|0,F=g;R&a||(S&(i|s|A)?R&(r|s|A)?(F=d,(Q===g||Q===d)&&B[w]++):R&(i|c)&&(Q===h||Q===p)&&B[w]--:S&(r|c)&&(Q===h||Q===p)&&B[w]--,Q=B[M]=F,S=R,w=M,k>65535&&M++)}return B}function f(E,B){const S=[];for(let w=0;w<B.length;w++){const M=B.codePointAt(w);M>65535&&w++,S.push(t.U.codeToGlyph(E,M))}const Q=E.GSUB;if(Q){const{lookupList:w,featureList:M}=Q;let k;const R=/^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws|ccmp)$/,F=[];M.forEach(O=>{if(R.test(O.tag))for(let U=0;U<O.tab.length;U++){if(F[O.tab[U]])continue;F[O.tab[U]]=!0;const Y=w[O.tab[U]],W=/^(isol|init|fina|medi)$/.test(O.tag);W&&!k&&(k=_(B));for(let te=0;te<S.length;te++)(!k||!W||m[k[te]]===O.tag)&&t.U._applySubs(S,te,Y,w)}})}return S}function I(E,B){const S=new Int16Array(B.length*3);let Q=0;for(;Q<B.length;Q++){const R=B[Q];if(R===-1)continue;S[Q*3+2]=E.hmtx.aWidth[R];const F=E.GPOS;if(F){const O=F.lookupList;for(let U=0;U<O.length;U++){const Y=O[U];for(let W=0;W<Y.tabs.length;W++){const te=Y.tabs[W];if(Y.ltype===1){if(t._lctf.coverageIndex(te.coverage,R)!==-1&&te.pos){k(te.pos,Q);break}}else if(Y.ltype===2){let j=null,J=w();if(J!==-1){const oe=t._lctf.coverageIndex(te.coverage,B[J]);if(oe!==-1){if(te.fmt===1){const ie=te.pairsets[oe];for(let ne=0;ne<ie.length;ne++)ie[ne].gid2===R&&(j=ie[ne])}else if(te.fmt===2){const ie=t.U._getGlyphClass(B[J],te.classDef1),ne=t.U._getGlyphClass(R,te.classDef2);j=te.matrix[ie][ne]}if(j){j.val1&&k(j.val1,J),j.val2&&k(j.val2,Q);break}}}}else if(Y.ltype===4){const j=t._lctf.coverageIndex(te.markCoverage,R);if(j!==-1){const J=w(M),oe=J===-1?-1:t._lctf.coverageIndex(te.baseCoverage,B[J]);if(oe!==-1){const ie=te.markArray[j],ne=te.baseArray[oe][ie.markClass];S[Q*3]=ne.x-ie.x+S[J*3]-S[J*3+2],S[Q*3+1]=ne.y-ie.y+S[J*3+1];break}}}else if(Y.ltype===6){const j=t._lctf.coverageIndex(te.mark1Coverage,R);if(j!==-1){const J=w();if(J!==-1){const oe=B[J];if(C(E,oe)===3){const ie=t._lctf.coverageIndex(te.mark2Coverage,oe);if(ie!==-1){const ne=te.mark1Array[j],le=te.mark2Array[ie][ne.markClass];S[Q*3]=le.x-ne.x+S[J*3]-S[J*3+2],S[Q*3+1]=le.y-ne.y+S[J*3+1];break}}}}}}}}else if(E.kern&&!E.cff){const O=w();if(O!==-1){const U=E.kern.glyph1.indexOf(B[O]);if(U!==-1){const Y=E.kern.rval[U].glyph2.indexOf(R);Y!==-1&&(S[O*3+2]+=E.kern.rval[U].vals[Y])}}}}return S;function w(R){for(let F=Q-1;F>=0;F--)if(B[F]!==-1&&(!R||R(B[F])))return F;return-1}function M(R){return C(E,R)===1}function k(R,F){for(let O=0;O<3;O++)S[F*3+O]+=R[O]||0}}function C(E,B){const S=E.GDEF&&E.GDEF.glyphClassDef;return S?t.U._getGlyphClass(B,S):0}function y(...E){for(let B=0;B<E.length;B++)if(typeof E[B]=="number")return E[B]}function x(E){const B=Object.create(null),S=E["OS/2"],Q=E.hhea,w=E.head.unitsPerEm,M=y(S&&S.sTypoAscender,Q&&Q.ascender,w),k={unitsPerEm:w,ascender:M,descender:y(S&&S.sTypoDescender,Q&&Q.descender,0),capHeight:y(S&&S.sCapHeight,M),xHeight:y(S&&S.sxHeight,M),lineGap:y(S&&S.sTypoLineGap,Q&&Q.lineGap),supportsCodePoint(R){return t.U.codeToGlyph(E,R)>0},forEachGlyph(R,F,O,U){let Y=0;const W=1/k.unitsPerEm*F,te=f(E,R);let j=0;const J=I(E,te);return te.forEach((oe,ie)=>{if(oe!==-1){let ne=B[oe];if(!ne){const{cmds:le,crds:ge}=t.U.glyphToPath(E,oe);let _e="",ue=0;for(let ve=0,he=le.length;ve<he;ve++){const Qe=n[le[ve]];_e+=le[ve];for(let Pe=1;Pe<=Qe;Pe++)_e+=(Pe>1?",":"")+ge[ue++]}let fe,pe,ye,Me;if(ge.length){fe=pe=1/0,ye=Me=-1/0;for(let ve=0,he=ge.length;ve<he;ve+=2){let Qe=ge[ve],Pe=ge[ve+1];Qe<fe&&(fe=Qe),Pe<pe&&(pe=Pe),Qe>ye&&(ye=Qe),Pe>Me&&(Me=Pe)}}else fe=ye=pe=Me=0;ne=B[oe]={index:oe,advanceWidth:E.hmtx.aWidth[oe],xMin:fe,yMin:pe,xMax:ye,yMax:Me,path:_e}}U.call(null,ne,Y+J[ie*3]*W,J[ie*3+1]*W,j),Y+=J[ie*3+2]*W,O&&(Y+=O*F)}j+=R.codePointAt(j)>65535?2:1}),Y}};return k}return function(B){const S=new Uint8Array(B,0,4),Q=t._bin.readASCII(S,0,4);if(Q==="wOFF")B=e(B);else if(Q==="wOF2")throw new Error("woff2 fonts not supported");return x(t.parse(B)[0])}}const zoi=yY({name:"Typr Font Parser",dependencies:[Uoi,Koi,Voi],init(t,e,n){const o=t(),i=e();return n(o,i)}});function Joi(){return(function(t){var e=function(){this.buckets=new Map};e.prototype.add=function(I){var C=I>>5;this.buckets.set(C,(this.buckets.get(C)||0)|1<<(31&I))},e.prototype.has=function(I){var C=this.buckets.get(I>>5);return C!==void 0&&(C&1<<(31&I))!=0},e.prototype.serialize=function(){var I=[];return this.buckets.forEach((function(C,y){I.push((+y).toString(36)+":"+C.toString(36))})),I.join(",")},e.prototype.deserialize=function(I){var C=this;this.buckets.clear(),I.split(",").forEach((function(y){var x=y.split(":");C.buckets.set(parseInt(x[0],36),parseInt(x[1],36))}))};var n=Math.pow(2,8),o=n-1,i=~o;function r(I){var C=(function(x){return x&i})(I).toString(16),y=(function(x){return(x&i)+n-1})(I).toString(16);return"codepoint-index/plane"+(I>>16)+"/"+C+"-"+y+".json"}function s(I,C){var y=I&o,x=C.codePointAt(y/6|0);return((x=(x||48)-48)&1<<y%6)!=0}function a(I,C){var y;(y=I,y.replace(/U\+/gi,"").replace(/^,+|,+$/g,"").split(/,+/).map((function(x){return x.split("-").map((function(E){return parseInt(E.trim(),16)}))}))).forEach((function(x){var E=x[0],B=x[1];B===void 0&&(B=E),C(E,B)}))}function A(I,C){a(I,(function(y,x){for(var E=y;E<=x;E++)C(E)}))}var c={},l={},u=new WeakMap,g="https://cdn.jsdelivr.net/gh/lojjic/unicode-font-resolver@v1.0.1/packages/data";function h(I){var C=u.get(I);return C||(C=new e,A(I.ranges,(function(y){return C.add(y)})),u.set(I,C)),C}var d,p=new Map;function m(I,C,y){return I[C]?C:I[y]?y:(function(x){for(var E in x)return E})(I)}function _(I,C){var y=C;if(!I.includes(y)){y=1/0;for(var x=0;x<I.length;x++)Math.abs(I[x]-C)<Math.abs(y-C)&&(y=I[x])}return y}function f(I){return d||(d=new Set,A("9-D,20,85,A0,1680,2000-200A,2028-202F,205F,3000",(function(C){d.add(C)}))),d.has(I)}return t.CodePointSet=e,t.clearCache=function(){c={},l={}},t.getFontsForString=function(I,C){C===void 0&&(C={});var y,x=C.lang;x===void 0&&(x=new RegExp("\\p{Script=Hangul}","u").test(y=I)?"ko":new RegExp("\\p{Script=Hiragana}|\\p{Script=Katakana}","u").test(y)?"ja":"en");var E=C.category;E===void 0&&(E="sans-serif");var B=C.style;B===void 0&&(B="normal");var S=C.weight;S===void 0&&(S=400);var Q=(C.dataUrl||g).replace(/\/$/g,""),w=new Map,M=new Uint8Array(I.length),k={},R={},F=new Array(I.length),O=new Map,U=!1;function Y(j){var J=p.get(j);return J||(J=fetch(Q+"/"+j).then((function(oe){if(!oe.ok)throw new Error(oe.statusText);return oe.json().then((function(ie){if(!Array.isArray(ie)||ie[0]!==1)throw new Error("Incorrect schema version; need 1, got "+ie[0]);return ie[1]}))})).catch((function(oe){if(Q!==g)return U||(console.error('unicode-font-resolver: Failed loading from dataUrl "'+Q+'", trying default CDN. '+oe.message),U=!0),Q=g,p.delete(j),Y(j);throw oe})),p.set(j,J)),J}for(var W=function(j){var J=I.codePointAt(j),oe=r(J);F[j]=oe,c[oe]||O.has(oe)||O.set(oe,Y(oe).then((function(ie){c[oe]=ie}))),J>65535&&(j++,te=j)},te=0;te<I.length;te++)W(te);return Promise.all(O.values()).then((function(){O.clear();for(var j=function(oe){var ie=I.codePointAt(oe),ne=null,le=c[F[oe]],ge=void 0;for(var _e in le){var ue=R[_e];if(ue===void 0&&(ue=R[_e]=new RegExp(_e).test(x||"en")),ue){for(var fe in ge=_e,le[_e])if(s(ie,le[_e][fe])){ne=fe;break}break}}if(!ne){e:for(var pe in le)if(pe!==ge){for(var ye in le[pe])if(s(ie,le[pe][ye])){ne=ye;break e}}}ne||(console.debug("No font coverage for U+"+ie.toString(16)),ne="latin"),F[oe]=ne,l[ne]||O.has(ne)||O.set(ne,Y("font-meta/"+ne+".json").then((function(Me){l[ne]=Me}))),ie>65535&&(oe++,J=oe)},J=0;J<I.length;J++)j(J);return Promise.all(O.values())})).then((function(){for(var j,J=null,oe=0;oe<I.length;oe++){var ie=I.codePointAt(oe);if(J&&(f(ie)||h(J).has(ie)))M[oe]=M[oe-1];else{J=l[F[oe]];var ne=k[J.id];if(!ne){var le=J.typeforms,ge=m(le,E,"sans-serif"),_e=m(le[ge],B,"normal"),ue=_((j=le[ge])===null||j===void 0?void 0:j[_e],S);ne=k[J.id]=Q+"/font-files/"+J.id+"/"+ge+"."+_e+"."+ue+".woff"}var fe=w.get(ne);fe==null&&(fe=w.size,w.set(ne,fe)),M[oe]=fe}ie>65535&&(oe++,M[oe]=M[oe-1])}return{fontUrls:Array.from(w.keys()),chars:M}}))},Object.defineProperty(t,"__esModule",{value:!0}),t})({})}function Woi(t,e){const n=Object.create(null),o=Object.create(null);function i(s,a){const A=c=>{console.error(`Failure loading font ${s}`,c)};try{const c=new XMLHttpRequest;c.open("get",s,!0),c.responseType="arraybuffer",c.onload=function(){if(c.status>=400)A(new Error(c.statusText));else if(c.status>0)try{const l=t(c.response);l.src=s,a(l)}catch(l){A(l)}},c.onerror=A,c.send()}catch(c){A(c)}}function r(s,a){let A=n[s];A?a(A):o[s]?o[s].push(a):(o[s]=[a],i(s,c=>{c.src=s,n[s]=c,o[s].forEach(l=>l(c)),delete o[s]}))}return function(s,a,{lang:A,fonts:c=[],style:l="normal",weight:u="normal",unicodeFontsURL:g}={}){const h=new Uint8Array(s.length),d=[];s.length||f();const p=new Map,m=[];if(l!=="italic"&&(l="normal"),typeof u!="number"&&(u=u==="bold"?700:400),c&&!Array.isArray(c)&&(c=[c]),c=c.slice().filter(C=>!C.lang||C.lang.test(A)).reverse(),c.length){let E=0;(function B(S=0){for(let Q=S,w=s.length;Q<w;Q++){const M=s.codePointAt(Q);if(E===1&&d[h[Q-1]].supportsCodePoint(M)||Q>0&&/\s/.test(s[Q]))h[Q]=h[Q-1],E===2&&(m[m.length-1][1]=Q);else for(let k=h[Q],R=c.length;k<=R;k++)if(k===R){const F=E===2?m[m.length-1]:m[m.length]=[Q,Q];F[1]=Q,E=2}else{h[Q]=k;const{src:F,unicodeRange:O}=c[k];if(!O||I(M,O)){const U=n[F];if(!U){r(F,()=>{B(Q)});return}if(U.supportsCodePoint(M)){let Y=p.get(U);typeof Y!="number"&&(Y=d.length,d.push(U),p.set(U,Y)),h[Q]=Y,E=1;break}}}M>65535&&Q+1<w&&(h[Q+1]=h[Q],Q++,E===2&&(m[m.length-1][1]=Q))}_()})()}else m.push([0,s.length-1]),_();function _(){if(m.length){const C=m.map(y=>s.substring(y[0],y[1]+1)).join(`
`);e.getFontsForString(C,{lang:A||void 0,style:l,weight:u,dataUrl:g}).then(({fontUrls:y,chars:x})=>{const E=d.length;let B=0;m.forEach(Q=>{for(let w=0,M=Q[1]-Q[0];w<=M;w++)h[Q[0]+w]=x[B++]+E;B++});let S=0;y.forEach((Q,w)=>{r(Q,M=>{d[w+E]=M,++S===y.length&&f()})})})}else f()}function f(){a({chars:h,fonts:d})}function I(C,y){for(let x=0;x<y.length;x++){const[E,B=E]=y[x];if(E<=C&&C<=B)return!0}return!1}}}const joi=yY({name:"FontResolver",dependencies:[Woi,zoi,Joi],init(t,e,n){return t(e,n())}});function $oi(t,e){const o=/[\u00AD\u034F\u061C\u115F-\u1160\u17B4-\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8]/,i="[^\\S\\u00A0]",r=new RegExp(`${i}|[\\-\\u007C\\u00AD\\u2010\\u2012-\\u2014\\u2027\\u2056\\u2E17\\u2E40]`);function s({text:d,lang:p,fonts:m,style:_,weight:f,preResolvedFonts:I,unicodeFontsURL:C},y){const x=({chars:E,fonts:B})=>{let S,Q;const w=[];for(let M=0;M<E.length;M++)E[M]!==Q?(Q=E[M],w.push(S={start:M,end:M,fontObj:B[E[M]]})):S.end=M;y(w)};I?x(I):t(d,x,{lang:p,fonts:m,style:_,weight:f,unicodeFontsURL:C})}function a({text:d="",font:p,lang:m,sdfGlyphSize:_=64,fontSize:f=400,fontWeight:I=1,fontStyle:C="normal",letterSpacing:y=0,lineHeight:x="normal",maxWidth:E=1/0,direction:B,textAlign:S="left",textIndent:Q=0,whiteSpace:w="normal",overflowWrap:M="normal",anchorX:k=0,anchorY:R=0,metricsOnly:F=!1,unicodeFontsURL:O,preResolvedFonts:U=null,includeCaretPositions:Y=!1,chunkedBoundsSize:W=8192,colorRanges:te=null},j){const J=u(),oe={fontLoad:0,typesetting:0};d.indexOf("\r")>-1&&(console.info("Typesetter: got text with \\r chars; normalizing to \\n"),d=d.replace(/\r\n/g,`
`).replace(/\r/g,`
`)),f=+f,y=+y,E=+E,x=x||"normal",Q=+Q,s({text:d,lang:m,style:C,weight:I,fonts:typeof p=="string"?[{src:p}]:p,unicodeFontsURL:O,preResolvedFonts:U},ie=>{oe.fontLoad=u()-J;const ne=isFinite(E);let le=null,ge=null,_e=null,ue=null,fe=null,pe=null,ye=null,Me=null,ve=0,he=0,Qe=w!=="nowrap";const Pe=new Map,we=u();let Te=Q,Re=0,Ee=new g;const ke=[Ee];ie.forEach(At=>{const{fontObj:at}=At,{ascender:nt,descender:gt,unitsPerEm:bt,lineGap:Ct,capHeight:Dt,xHeight:kt}=at;let it=Pe.get(at);if(!it){const It=f/bt,Bt=x==="normal"?(nt-gt+Ct)*It:x*f,mt=(Bt-(nt-gt)*It)/2,st=Math.min(Bt,(nt-gt)*It),xt=(nt+gt)/2*It+st/2;it={index:Pe.size,src:at.src,fontObj:at,fontSizeMult:It,unitsPerEm:bt,ascender:nt*It,descender:gt*It,capHeight:Dt*It,xHeight:kt*It,lineHeight:Bt,baseline:-mt-nt*It,caretTop:xt,caretBottom:xt-st},Pe.set(at,it)}const{fontSizeMult:Yt}=it,pn=d.slice(At.start,At.end+1);let be,et;at.forEachGlyph(pn,f,y,(It,Bt,mt,st)=>{Bt+=Re,st+=At.start,be=Bt,et=It;const xt=d.charAt(st),Xe=It.advanceWidth*Yt,Ze=Ee.count;let dt;if("isEmpty"in It||(It.isWhitespace=!!xt&&new RegExp(i).test(xt),It.canBreakAfter=!!xt&&r.test(xt),It.isEmpty=It.xMin===It.xMax||It.yMin===It.yMax||o.test(xt)),!It.isWhitespace&&!It.isEmpty&&he++,Qe&&ne&&!It.isWhitespace&&Bt+Xe+Te>E&&Ze){if(Ee.glyphAt(Ze-1).glyphObj.canBreakAfter)dt=new g,Te=-Bt;else for(let Wt=Ze;Wt--;)if(Wt===0&&M==="break-word"){dt=new g,Te=-Bt;break}else if(Ee.glyphAt(Wt).glyphObj.canBreakAfter){dt=Ee.splitAt(Wt+1);const Xt=dt.glyphAt(0).x;Te-=Xt;for(let Jt=dt.count;Jt--;)dt.glyphAt(Jt).x-=Xt;break}dt&&(Ee.isSoftWrapped=!0,Ee=dt,ke.push(Ee),ve=E)}let Ut=Ee.glyphAt(Ee.count);Ut.glyphObj=It,Ut.x=Bt+Te,Ut.y=mt,Ut.width=Xe,Ut.charIndex=st,Ut.fontData=it,xt===`
`&&(Ee=new g,ke.push(Ee),Te=-(Bt+Xe+y*f)+Q)}),Re=be+et.advanceWidth*Yt+y*f});let Ce=0;ke.forEach(At=>{let at=!0;for(let nt=At.count;nt--;){const gt=At.glyphAt(nt);at&&!gt.glyphObj.isWhitespace&&(At.width=gt.x+gt.width,At.width>ve&&(ve=At.width),at=!1);let{lineHeight:bt,capHeight:Ct,xHeight:Dt,baseline:kt}=gt.fontData;bt>At.lineHeight&&(At.lineHeight=bt);const it=kt-At.baseline;it<0&&(At.baseline+=it,At.cap+=it,At.ex+=it),At.cap=Math.max(At.cap,At.baseline+Ct),At.ex=Math.max(At.ex,At.baseline+Dt)}At.baseline-=Ce,At.cap-=Ce,At.ex-=Ce,Ce+=At.lineHeight});let Le=0,Ye=0;if(k&&(typeof k=="number"?Le=-k:typeof k=="string"&&(Le=-ve*(k==="left"?0:k==="center"?.5:k==="right"?1:c(k)))),R&&(typeof R=="number"?Ye=-R:typeof R=="string"&&(Ye=R==="top"?0:R==="top-baseline"?-ke[0].baseline:R==="top-cap"?-ke[0].cap:R==="top-ex"?-ke[0].ex:R==="middle"?Ce/2:R==="bottom"?Ce:R==="bottom-baseline"?-ke[ke.length-1].baseline:c(R)*Ce)),!F){const At=e.getEmbeddingLevels(d,B);le=new Uint16Array(he),ge=new Uint8Array(he),_e=new Float32Array(he*2),ue={},ye=[1/0,1/0,-1/0,-1/0],Me=[],Y&&(pe=new Float32Array(d.length*4)),te&&(fe=new Uint8Array(he*3));let at=0,nt=-1,gt=-1,bt,Ct;if(ke.forEach((Dt,kt)=>{let{count:it,width:Yt}=Dt;if(it>0){let pn=0;for(let st=it;st--&&Dt.glyphAt(st).glyphObj.isWhitespace;)pn++;let be=0,et=0;if(S==="center")be=(ve-Yt)/2;else if(S==="right")be=ve-Yt;else if(S==="justify"&&Dt.isSoftWrapped){let st=0;for(let xt=it-pn;xt--;)Dt.glyphAt(xt).glyphObj.isWhitespace&&st++;et=(ve-Yt)/st}if(et||be){let st=0;for(let xt=0;xt<it;xt++){let Xe=Dt.glyphAt(xt);const Ze=Xe.glyphObj;Xe.x+=be+st,et!==0&&Ze.isWhitespace&&xt<it-pn&&(st+=et,Xe.width+=et)}}const It=e.getReorderSegments(d,At,Dt.glyphAt(0).charIndex,Dt.glyphAt(Dt.count-1).charIndex);for(let st=0;st<It.length;st++){const[xt,Xe]=It[st];let Ze=1/0,dt=-1/0;for(let Ut=0;Ut<it;Ut++)if(Dt.glyphAt(Ut).charIndex>=xt){let Wt=Ut,Xt=Ut;for(;Xt<it;Xt++){let Jt=Dt.glyphAt(Xt);if(Jt.charIndex>Xe)break;Xt<it-pn&&(Ze=Math.min(Ze,Jt.x),dt=Math.max(dt,Jt.x+Jt.width))}for(let Jt=Wt;Jt<Xt;Jt++){const yn=Dt.glyphAt(Jt);yn.x=dt-(yn.x+yn.width-Ze)}break}}let Bt;const mt=st=>Bt=st;for(let st=0;st<it;st++){const xt=Dt.glyphAt(st);Bt=xt.glyphObj;const Xe=Bt.index,Ze=At.levels[xt.charIndex]&1;if(Ze){const dt=e.getMirroredCharacter(d[xt.charIndex]);dt&&xt.fontData.fontObj.forEachGlyph(dt,0,0,mt)}if(Y){const{charIndex:dt,fontData:Ut}=xt,Wt=xt.x+Le,Xt=xt.x+xt.width+Le;pe[dt*4]=Ze?Xt:Wt,pe[dt*4+1]=Ze?Wt:Xt,pe[dt*4+2]=Dt.baseline+Ut.caretBottom+Ye,pe[dt*4+3]=Dt.baseline+Ut.caretTop+Ye;const Jt=dt-nt;Jt>1&&l(pe,nt,Jt),nt=dt}if(te){const{charIndex:dt}=xt;for(;dt>gt;)gt++,te.hasOwnProperty(gt)&&(Ct=te[gt])}if(!Bt.isWhitespace&&!Bt.isEmpty){const dt=at++,{fontSizeMult:Ut,src:Wt,index:Xt}=xt.fontData,Jt=ue[Wt]||(ue[Wt]={});Jt[Xe]||(Jt[Xe]={path:Bt.path,pathBounds:[Bt.xMin,Bt.yMin,Bt.xMax,Bt.yMax]});const yn=xt.x+Le,An=xt.y+Dt.baseline+Ye;_e[dt*2]=yn,_e[dt*2+1]=An;const kn=yn+Bt.xMin*Ut,$n=An+Bt.yMin*Ut,ht=yn+Bt.xMax*Ut,Kt=An+Bt.yMax*Ut;kn<ye[0]&&(ye[0]=kn),$n<ye[1]&&(ye[1]=$n),ht>ye[2]&&(ye[2]=ht),Kt>ye[3]&&(ye[3]=Kt),dt%W===0&&(bt={start:dt,end:dt,rect:[1/0,1/0,-1/0,-1/0]},Me.push(bt)),bt.end++;const rn=bt.rect;if(kn<rn[0]&&(rn[0]=kn),$n<rn[1]&&(rn[1]=$n),ht>rn[2]&&(rn[2]=ht),Kt>rn[3]&&(rn[3]=Kt),le[dt]=Xe,ge[dt]=Xt,te){const Lt=dt*3;fe[Lt]=Ct>>16&255,fe[Lt+1]=Ct>>8&255,fe[Lt+2]=Ct&255}}}}}),pe){const Dt=d.length-nt;Dt>1&&l(pe,nt,Dt)}}const tt=[];Pe.forEach(({index:At,src:at,unitsPerEm:nt,ascender:gt,descender:bt,lineHeight:Ct,capHeight:Dt,xHeight:kt})=>{tt[At]={src:at,unitsPerEm:nt,ascender:gt,descender:bt,lineHeight:Ct,capHeight:Dt,xHeight:kt}}),oe.typesetting=u()-we,j({glyphIds:le,glyphFontIndices:ge,glyphPositions:_e,glyphData:ue,fontData:tt,caretPositions:pe,glyphColors:fe,chunkedBounds:Me,fontSize:f,topBaseline:Ye+ke[0].baseline,blockBounds:[Le,Ye-Ce,Le+ve,Ye],visibleBounds:ye,timings:oe})})}function A(d,p){a({...d,metricsOnly:!0},m=>{const[_,f,I,C]=m.blockBounds;p({width:I-_,height:C-f})})}function c(d){let p=d.match(/^([\d.]+)%$/),m=p?parseFloat(p[1]):NaN;return isNaN(m)?0:m/100}function l(d,p,m){const _=d[p*4],f=d[p*4+1],I=d[p*4+2],C=d[p*4+3],y=(f-_)/m;for(let x=0;x<m;x++){const E=(p+x)*4;d[E]=_+y*x,d[E+1]=_+y*(x+1),d[E+2]=I,d[E+3]=C}}function u(){return(self.performance||Date).now()}function g(){this.data=[]}const h=["glyphObj","x","y","width","charIndex","fontData"];return g.prototype={width:0,lineHeight:0,baseline:0,cap:0,ex:0,isSoftWrapped:!1,get count(){return Math.ceil(this.data.length/h.length)},glyphAt(d){let p=g.flyweight;return p.data=this.data,p.index=d,p},splitAt(d){let p=new g;return p.data=this.data.splice(d*h.length),p}},g.flyweight=h.reduce((d,p,m,_)=>(Object.defineProperty(d,p,{get(){return this.data[this.index*h.length+m]},set(f){this.data[this.index*h.length+m]=f}}),d),{data:null,index:0}),{typeset:a,measure:A}}const ZR=()=>(self.performance||Date).now(),fhe=OJt();let zJt;function qoi(t,e,n,o,i,r,s,a,A,c,l=!0){return l?Zoi(t,e,n,o,i,r,s,a,A,c).then(null,u=>(zJt||(console.warn("WebGL SDF generation failed, falling back to JS",u),zJt=!0),jJt(t,e,n,o,i,r,s,a,A,c))):jJt(t,e,n,o,i,r,s,a,A,c)}const Ihe=[],Xoi=5;let Pke=0;function JJt(){const t=ZR();for(;Ihe.length&&ZR()-t<Xoi;)Ihe.shift()();Pke=Ihe.length?setTimeout(JJt,0):0}const Zoi=(...t)=>new Promise((e,n)=>{Ihe.push(()=>{const o=ZR();try{fhe.webgl.generateIntoCanvas(...t),e({timing:ZR()-o})}catch(i){n(i)}}),Pke||(Pke=setTimeout(JJt,0))}),eii=4,tii=2e3,WJt={};let nii=0;function jJt(t,e,n,o,i,r,s,a,A,c){const l="TroikaTextSDFGenerator_JS_"+nii++%eii;let u=WJt[l];return u||(u=WJt[l]={workerModule:yY({name:l,workerId:l,dependencies:[OJt,ZR],init(g,h){const d=g().javascript.generate;return function(...p){const m=h();return{textureData:d(...p),timing:h()-m}}},getTransferables(g){return[g.textureData.buffer]}}),requests:0,idleTimer:null}),u.requests++,clearTimeout(u.idleTimer),u.workerModule(t,e,n,o,i,r).then(({textureData:g,timing:h})=>{const d=ZR(),p=new Uint8Array(g.length*4);for(let m=0;m<g.length;m++)p[m*4+c]=g[m];return fhe.webglUtils.renderImageData(s,p,a,A,t,e,1<<3-c),h+=ZR()-d,--u.requests===0&&(u.idleTimer=setTimeout(()=>{Noi(l)},tii)),{timing:h}})}function oii(t){t._warm||(fhe.webgl.isSupported(t),t._warm=!0)}const iii=fhe.webglUtils.resizeWebGLCanvasWithoutClearing,AX={unicodeFontsURL:null,sdfGlyphSize:64,sdfMargin:1/16,sdfExponent:9,textureWidth:2048},rii=new Vi;function xY(){return(self.performance||Date).now()}const $Jt=Object.create(null);function sii(t,e){t=Aii({},t);const n=xY(),o=[];if(t.font&&o.push({label:"user",src:cii(t.font)}),t.font=o,t.text=""+t.text,t.sdfGlyphSize=t.sdfGlyphSize||AX.sdfGlyphSize,t.unicodeFontsURL=t.unicodeFontsURL||AX.unicodeFontsURL,t.colorRanges!=null){let g={};for(let h in t.colorRanges)if(t.colorRanges.hasOwnProperty(h)){let d=t.colorRanges[h];typeof d!="number"&&(d=rii.set(d).getHex()),g[h]=d}t.colorRanges=g}Object.freeze(t);const{textureWidth:i,sdfExponent:r}=AX,{sdfGlyphSize:s}=t,a=i/s*4;let A=$Jt[s];if(!A){const g=document.createElement("canvas");g.width=i,g.height=s*256/a,A=$Jt[s]={glyphCount:0,sdfGlyphSize:s,sdfCanvas:g,sdfTexture:new Hg(g,void 0,void 0,void 0,Fl,Fl),contextLost:!1,glyphsByFont:new Map},A.sdfTexture.generateMipmaps=!1,aii(A)}const{sdfTexture:c,sdfCanvas:l}=A;ZJt(t).then(g=>{const{glyphIds:h,glyphFontIndices:d,fontData:p,glyphPositions:m,fontSize:_,timings:f}=g,I=[],C=new Float32Array(h.length*4);let y=0,x=0;const E=xY(),B=p.map(k=>{let R=A.glyphsByFont.get(k.src);return R||A.glyphsByFont.set(k.src,R=new Map),R});h.forEach((k,R)=>{const F=d[R],{src:O,unitsPerEm:U}=p[F];let Y=B[F].get(k);if(!Y){const{path:oe,pathBounds:ie}=g.glyphData[O][k],ne=Math.max(ie[2]-ie[0],ie[3]-ie[1])/s*(AX.sdfMargin*s+.5),le=A.glyphCount++,ge=[ie[0]-ne,ie[1]-ne,ie[2]+ne,ie[3]+ne];B[F].set(k,Y={path:oe,atlasIndex:le,sdfViewBox:ge}),I.push(Y)}const{sdfViewBox:W}=Y,te=m[x++],j=m[x++],J=_/U;C[y++]=te+W[0]*J,C[y++]=j+W[1]*J,C[y++]=te+W[2]*J,C[y++]=j+W[3]*J,h[R]=Y.atlasIndex}),f.quads=(f.quads||0)+(xY()-E);const S=xY();f.sdf={};const Q=l.height,w=Math.ceil(A.glyphCount/a),M=Math.pow(2,Math.ceil(Math.log2(w*s)));M>Q&&(console.info(`Increasing SDF texture size ${Q}->${M}`),iii(l,i,M),c.dispose()),Promise.all(I.map(k=>qJt(k,A,t.gpuAccelerateSDF).then(({timing:R})=>{f.sdf[k.atlasIndex]=R}))).then(()=>{I.length&&!A.contextLost&&(XJt(A),c.needsUpdate=!0),f.sdfTotal=xY()-S,f.total=xY()-n,e(Object.freeze({parameters:t,sdfTexture:c,sdfGlyphSize:s,sdfExponent:r,glyphBounds:C,glyphAtlasIndices:h,glyphColors:g.glyphColors,caretPositions:g.caretPositions,chunkedBounds:g.chunkedBounds,ascender:g.ascender,descender:g.descender,lineHeight:g.lineHeight,capHeight:g.capHeight,xHeight:g.xHeight,topBaseline:g.topBaseline,blockBounds:g.blockBounds,visibleBounds:g.visibleBounds,timings:g.timings}))})}),Promise.resolve().then(()=>{A.contextLost||oii(l)})}function qJt({path:t,atlasIndex:e,sdfViewBox:n},{sdfGlyphSize:o,sdfCanvas:i,contextLost:r},s){if(r)return Promise.resolve({timing:-1});const{textureWidth:a,sdfExponent:A}=AX,c=Math.max(n[2]-n[0],n[3]-n[1]),l=Math.floor(e/4),u=l%(a/o)*o,g=Math.floor(l/(a/o))*o,h=e%4;return qoi(o,o,t,n,c,A,i,u,g,h,s)}function aii(t){const e=t.sdfCanvas;e.addEventListener("webglcontextlost",n=>{console.log("Context Lost",n),n.preventDefault(),t.contextLost=!0}),e.addEventListener("webglcontextrestored",n=>{console.log("Context Restored",n),t.contextLost=!1;const o=[];t.glyphsByFont.forEach(i=>{i.forEach(r=>{o.push(qJt(r,t,!0))})}),Promise.all(o).then(()=>{XJt(t),t.sdfTexture.needsUpdate=!0})})}function Aii(t,e){for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}let Che;function cii(t){return Che||(Che=typeof document>"u"?{}:document.createElement("a")),Che.href=t,Che.href}function XJt(t){if(typeof createImageBitmap!="function"){console.info("Safari<15: applying SDF canvas workaround");const{sdfCanvas:e,sdfTexture:n}=t,{width:o,height:i}=e,r=t.sdfCanvas.getContext("webgl");let s=n.image.data;(!s||s.length!==o*i*4)&&(s=new Uint8Array(o*i*4),n.image={width:o,height:i,data:s},n.flipY=!1,n.isDataTexture=!0),r.readPixels(0,0,o,i,r.RGBA,r.UNSIGNED_BYTE,s)}}const ZJt=yY({name:"Typesetter",dependencies:[yY({name:"Typesetter",dependencies:[$oi,joi,Toi],init(t,e,n){return t(e,n())}})],init(t){return function(e){return new Promise(n=>{t.typeset(e,n)})}},getTransferables(t){const e=[];for(let n in t)t[n]&&t[n].buffer&&e.push(t[n].buffer);return e}});ZJt.onMainThread;const eWt={};function lii(t){let e=eWt[t];return e||(e=eWt[t]=new VB(1,1,t,t).translate(.5,.5,0)),e}const uii="aTroikaGlyphBounds",tWt="aTroikaGlyphIndex",gii="aTroikaGlyphColor";class dii extends jti{constructor(){super(),this.detail=1,this.curveRadius=0,this.groups=[{start:0,count:1/0,materialIndex:0},{start:0,count:1/0,materialIndex:1}],this.boundingSphere=new GB,this.boundingBox=new e2}computeBoundingSphere(){}computeBoundingBox(){}set detail(e){if(e!==this._detail){this._detail=e,(typeof e!="number"||e<1)&&(e=1);let n=lii(e);["position","normal","uv"].forEach(o=>{this.attributes[o]=n.attributes[o].clone()}),this.setIndex(n.getIndex().clone())}}get detail(){return this._detail}set curveRadius(e){e!==this._curveRadius&&(this._curveRadius=e,this._updateBounds())}get curveRadius(){return this._curveRadius}updateGlyphs(e,n,o,i,r){this.updateAttributeData(uii,e,4),this.updateAttributeData(tWt,n,1),this.updateAttributeData(gii,r,3),this._blockBounds=o,this._chunkedBounds=i,this.instanceCount=n.length,this._updateBounds()}_updateBounds(){const e=this._blockBounds;if(e){const{curveRadius:n,boundingBox:o}=this;if(n){const{PI:i,floor:r,min:s,max:a,sin:A,cos:c}=Math,l=i/2,u=i*2,g=Math.abs(n),h=e[0]/g,d=e[2]/g,p=r((h+l)/u)!==r((d+l)/u)?-g:s(A(h)*g,A(d)*g),m=r((h-l)/u)!==r((d-l)/u)?g:a(A(h)*g,A(d)*g),_=r((h+i)/u)!==r((d+i)/u)?g*2:a(g-c(h)*g,g-c(d)*g);o.min.set(p,e[1],n<0?-_:0),o.max.set(m,e[3],n<0?0:_)}else o.min.set(e[0],e[1],0),o.max.set(e[2],e[3],0);o.getBoundingSphere(this.boundingSphere)}}applyClipRect(e){let n=this.getAttribute(tWt).count,o=this._chunkedBounds;if(o)for(let i=o.length;i--;){n=o[i].end;let r=o[i].rect;if(r[1]<e.w&&r[3]>e.y&&r[0]<e.z&&r[2]>e.x)break}this.instanceCount=n}updateAttributeData(e,n,o){const i=this.getAttribute(e);n?i&&i.array.length===n.length?(i.array.set(n),i.needsUpdate=!0):(this.setAttribute(e,new Xde(n,o)),delete this._maxInstanceCount,this.dispose()):i&&this.deleteAttribute(e)}}const hii=`
uniform vec2 uTroikaSDFTextureSize;
uniform float uTroikaSDFGlyphSize;
uniform vec4 uTroikaTotalBounds;
uniform vec4 uTroikaClipRect;
uniform mat3 uTroikaOrient;
uniform bool uTroikaUseGlyphColors;
uniform float uTroikaEdgeOffset;
uniform float uTroikaBlurRadius;
uniform vec2 uTroikaPositionOffset;
uniform float uTroikaCurveRadius;
attribute vec4 aTroikaGlyphBounds;
attribute float aTroikaGlyphIndex;
attribute vec3 aTroikaGlyphColor;
varying vec2 vTroikaGlyphUV;
varying vec4 vTroikaTextureUVBounds;
varying float vTroikaTextureChannel;
varying vec3 vTroikaGlyphColor;
varying vec2 vTroikaGlyphDimensions;
`,pii=`
vec4 bounds = aTroikaGlyphBounds;
bounds.xz += uTroikaPositionOffset.x;
bounds.yw -= uTroikaPositionOffset.y;

vec4 outlineBounds = vec4(
  bounds.xy - uTroikaEdgeOffset - uTroikaBlurRadius,
  bounds.zw + uTroikaEdgeOffset + uTroikaBlurRadius
);
vec4 clippedBounds = vec4(
  clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw),
  clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw)
);

vec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy);

position.xy = mix(bounds.xy, bounds.zw, clippedXY);

uv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy);

float rad = uTroikaCurveRadius;
if (rad != 0.0) {
  float angle = position.x / rad;
  position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad);
  normal.xz = vec2(sin(angle), cos(angle));
}
  
position = uTroikaOrient * position;
normal = uTroikaOrient * normal;

vTroikaGlyphUV = clippedXY.xy;
vTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]);


float txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize;
vec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize;
vec2 txStartUV = txUvPerSquare * vec2(
  mod(floor(aTroikaGlyphIndex / 4.0), txCols),
  floor(floor(aTroikaGlyphIndex / 4.0) / txCols)
);
vTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare);
vTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0);
`,mii=`
uniform sampler2D uTroikaSDFTexture;
uniform vec2 uTroikaSDFTextureSize;
uniform float uTroikaSDFGlyphSize;
uniform float uTroikaSDFExponent;
uniform float uTroikaEdgeOffset;
uniform float uTroikaFillOpacity;
uniform float uTroikaBlurRadius;
uniform vec3 uTroikaStrokeColor;
uniform float uTroikaStrokeWidth;
uniform float uTroikaStrokeOpacity;
uniform bool uTroikaSDFDebug;
varying vec2 vTroikaGlyphUV;
varying vec4 vTroikaTextureUVBounds;
varying float vTroikaTextureChannel;
varying vec2 vTroikaGlyphDimensions;

float troikaSdfValueToSignedDistance(float alpha) {
  // Inverse of exponential encoding in webgl-sdf-generator
  
  float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y);
  float absDist = (1.0 - pow(2.0 * (alpha > 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension;
  float signedDist = absDist * (alpha > 0.5 ? -1.0 : 1.0);
  return signedDist;
}

float troikaGlyphUvToSdfValue(vec2 glyphUV) {
  vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV);
  vec4 rgba = texture2D(uTroikaSDFTexture, textureUV);
  float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1
  return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a;
}

float troikaGlyphUvToDistance(vec2 uv) {
  return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv));
}

float troikaGetAADist() {
  
  #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300
  return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5;
  #else
  return vTroikaGlyphDimensions.x / 64.0;
  #endif
}

float troikaGetFragDistValue() {
  vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize);
  float distance = troikaGlyphUvToDistance(clampedGlyphUV);
 
  // Extrapolate distance when outside bounds:
  distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : 
    length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);

  

  return distance;
}

float troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) {
  #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL)
  float alpha = step(-distanceOffset, -distance);
  #else

  float alpha = smoothstep(
    distanceOffset + aaDist,
    distanceOffset - aaDist,
    distance
  );
  #endif

  return alpha;
}
`,_ii=`
float aaDist = troikaGetAADist();
float fragDistance = troikaGetFragDistValue();
float edgeAlpha = uTroikaSDFDebug ?
  troikaGlyphUvToSdfValue(vTroikaGlyphUV) :
  troikaGetEdgeAlpha(fragDistance, uTroikaEdgeOffset, max(aaDist, uTroikaBlurRadius));

#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL)
vec4 fillRGBA = gl_FragColor;
fillRGBA.a *= uTroikaFillOpacity;
vec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity);
if (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb;
gl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep(
  -uTroikaStrokeWidth - aaDist,
  -uTroikaStrokeWidth + aaDist,
  fragDistance
));
gl_FragColor.a *= edgeAlpha;
#endif

if (edgeAlpha == 0.0) {
  discard;
}
`;function fii(t){const e=wke(t,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new ni},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new ru(0,0,0,0)},uTroikaClipRect:{value:new ru(0,0,0,0)},uTroikaEdgeOffset:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new ni},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new Vi},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new HA},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:hii,vertexTransform:pii,fragmentDefs:mii,fragmentColorTransform:_ii,customRewriter({vertexShader:n,fragmentShader:o}){let i=/\buniform\s+vec3\s+diffuse\b/;return i.test(o)&&(o=o.replace(i,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),i.test(n)||(n=n.replace(GJt,`uniform vec3 diffuse;
$&
vTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;
`))),{vertexShader:n,fragmentShader:o}}});return e.transparent=!0,e.forceSinglePass=!0,Object.defineProperties(e,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),e}const Mke=new fE({color:16777215,side:r_,transparent:!0}),nWt=8421504,oWt=new va,yhe=new jt,Dke=new jt,cX=[],Iii=new jt,Nke="+x+y";function iWt(t){return Array.isArray(t)?t[0]:t}let rWt=()=>{const t=new Er(new VB(1,1),Mke);return rWt=()=>t,t},sWt=()=>{const t=new Er(new VB(1,1,32,1),Mke);return sWt=()=>t,t};const Cii={type:"syncstart"},yii={type:"synccomplete"},aWt=["font","fontSize","fontStyle","fontWeight","lang","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],xii=aWt.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");let Rke=class extends Er{constructor(){const e=new dii;super(e,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.unicodeFontsURL=null,this.fontSize=.1,this.fontWeight="normal",this.fontStyle="normal",this.lang=null,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=nWt,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=Nke,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(e){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(e):(this._isSyncing=!0,this.dispatchEvent(Cii),sii({text:this.text,font:this.font,lang:this.lang,fontSize:this.fontSize||.1,fontWeight:this.fontWeight||"normal",fontStyle:this.fontStyle||"normal",letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF,unicodeFontsURL:this.unicodeFontsURL},n=>{this._isSyncing=!1,this._textRenderInfo=n,this.geometry.updateGlyphs(n.glyphBounds,n.glyphAtlasIndices,n.blockBounds,n.chunkedBounds,n.glyphColors);const o=this._queuedSyncs;o&&(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=>{o.forEach(i=>i&&i())})),this.dispatchEvent(yii),e&&e()})))}onBeforeRender(e,n,o,i,r,s){this.sync(),r.isTroikaTextMaterial&&this._prepareForRender(r)}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}createDerivedMaterial(e){return fii(e)}get material(){let e=this._derivedMaterial;const n=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=Mke.clone());if((!e||!e.isDerivedFrom(n))&&(e=this._derivedMaterial=this.createDerivedMaterial(n),n.addEventListener("dispose",function o(){n.removeEventListener("dispose",o),e.dispose()})),this.hasOutline()){let o=e._outlineMtl;return o||(o=e._outlineMtl=Object.create(e,{id:{value:e.id+.1}}),o.isTextOutlineMaterial=!0,o.depthWrite=!1,o.map=null,e.addEventListener("dispose",function i(){e.removeEventListener("dispose",i),o.dispose()})),[o,e]}else return e}set material(e){e&&e.isTroikaTextMaterial?(this._derivedMaterial=e,this._baseMaterial=e.baseMaterial):this._baseMaterial=e}hasOutline(){return!!(this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY)}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(e){this.geometry.detail=e}get curveRadius(){return this.geometry.curveRadius}set curveRadius(e){this.geometry.curveRadius=e}get customDepthMaterial(){return iWt(this.material).getDepthMaterial()}set customDepthMaterial(e){}get customDistanceMaterial(){return iWt(this.material).getDistanceMaterial()}set customDistanceMaterial(e){}_prepareForRender(e){const n=e.isTextOutlineMaterial,o=e.uniforms,i=this.textRenderInfo;if(i){const{sdfTexture:a,blockBounds:A}=i;o.uTroikaSDFTexture.value=a,o.uTroikaSDFTextureSize.value.set(a.image.width,a.image.height),o.uTroikaSDFGlyphSize.value=i.sdfGlyphSize,o.uTroikaSDFExponent.value=i.sdfExponent,o.uTroikaTotalBounds.value.fromArray(A),o.uTroikaUseGlyphColors.value=!n&&!!i.glyphColors;let c=0,l=0,u=0,g,h,d,p=0,m=0;if(n){let{outlineWidth:f,outlineOffsetX:I,outlineOffsetY:C,outlineBlur:y,outlineOpacity:x}=this;c=this._parsePercent(f)||0,l=Math.max(0,this._parsePercent(y)||0),g=x,p=this._parsePercent(I)||0,m=this._parsePercent(C)||0}else u=Math.max(0,this._parsePercent(this.strokeWidth)||0),u&&(d=this.strokeColor,o.uTroikaStrokeColor.value.set(d??nWt),h=this.strokeOpacity,h==null&&(h=1)),g=this.fillOpacity;o.uTroikaEdgeOffset.value=c,o.uTroikaPositionOffset.value.set(p,m),o.uTroikaBlurRadius.value=l,o.uTroikaStrokeWidth.value=u,o.uTroikaStrokeOpacity.value=h,o.uTroikaFillOpacity.value=g??1,o.uTroikaCurveRadius.value=this.curveRadius||0;let _=this.clipRect;if(_&&Array.isArray(_)&&_.length===4)o.uTroikaClipRect.value.fromArray(_);else{const f=(this.fontSize||.1)*100;o.uTroikaClipRect.value.set(A[0]-f,A[1]-f,A[2]+f,A[3]+f)}this.geometry.applyClipRect(o.uTroikaClipRect.value)}o.uTroikaSDFDebug.value=!!this.debugSDF,e.polygonOffset=!!this.depthOffset,e.polygonOffsetFactor=e.polygonOffsetUnits=this.depthOffset||0;const r=n?this.outlineColor||0:this.color;if(r==null)delete e.color;else{const a=e.hasOwnProperty("color")?e.color:e.color=new Vi;(r!==a._input||typeof r=="object")&&a.set(a._input=r)}let s=this.orientation||Nke;if(s!==e._orientation){let a=o.uTroikaOrient.value;s=s.replace(/[^-+xyz]/g,"");let A=s!==Nke&&s.match(/^([-+])([xyz])([-+])([xyz])$/);if(A){let[,c,l,u,g]=A;yhe.set(0,0,0)[l]=c==="-"?1:-1,Dke.set(0,0,0)[g]=u==="-"?-1:1,oWt.lookAt(Iii,yhe.cross(Dke),Dke),a.setFromMatrix4(oWt)}else a.identity();e._orientation=s}}_parsePercent(e){if(typeof e=="string"){let n=e.match(/^(-?[\d.]+)%$/),o=n?parseFloat(n[1]):NaN;e=(isNaN(o)?0:o/100)*this.fontSize}return e}localPositionToTextCoords(e,n=new ni){n.copy(e);const o=this.curveRadius;return o&&(n.x=Math.atan2(e.x,Math.abs(o)-Math.abs(e.z))*Math.abs(o)),n}worldPositionToTextCoords(e,n=new ni){return yhe.copy(e),this.localPositionToTextCoords(this.worldToLocal(yhe),n)}raycast(e,n){const{textRenderInfo:o,curveRadius:i}=this;if(o){const r=o.blockBounds,s=i?sWt():rWt(),a=s.geometry,{position:A,uv:c}=a.attributes;for(let l=0;l<c.count;l++){let u=r[0]+c.getX(l)*(r[2]-r[0]);const g=r[1]+c.getY(l)*(r[3]-r[1]);let h=0;i&&(h=i-Math.cos(u/i)*i,u=Math.sin(u/i)*i),A.setXYZ(l,u,g,h)}a.boundingSphere=this.geometry.boundingSphere,a.boundingBox=this.geometry.boundingBox,s.matrixWorld=this.matrixWorld,s.material.side=this.material.side,cX.length=0,s.raycast(e,cX);for(let l=0;l<cX.length;l++)cX[l].object=this,n.push(cX[l])}}copy(e){const n=this.geometry;return super.copy(e),this.geometry=n,xii.forEach(o=>{this[o]=e[o]}),this}clone(){return new this.constructor().copy(this)}};aWt.forEach(t=>{const e="_private_"+t;Object.defineProperty(Rke.prototype,t,{get(){return this[e]},set(n){n!==this[e]&&(this[e]=n,this._needsSync=!0)}})}),new e2,new Vi;var Tke,AWt;function la(){return AWt||(AWt=1,Tke=e=>e.flat(1/0)),Tke}var kke,cWt;function Eii(){return cWt||(cWt=1,kke=e=>Object.assign({},e)),kke}var Fke,lWt;function Bii(){return lWt||(lWt=1,Fke=(e,n,o)=>(e[0]=n[0]+o[0],e[1]=n[1]+o[1],e[2]=n[2]+o[2],e[3]=n[3]+o[3],e[4]=n[4]+o[4],e[5]=n[5]+o[5],e[6]=n[6]+o[6],e[7]=n[7]+o[7],e[8]=n[8]+o[8],e[9]=n[9]+o[9],e[10]=n[10]+o[10],e[11]=n[11]+o[11],e[12]=n[12]+o[12],e[13]=n[13]+o[13],e[14]=n[14]+o[14],e[15]=n[15]+o[15],e)),Fke}var Lke,uWt;function Hke(){return uWt||(uWt=1,Lke=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Lke}var Oke,gWt;function bii(){if(gWt)return Oke;gWt=1;const t=Hke();return Oke=n=>{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o[4]=n[4],o[5]=n[5],o[6]=n[6],o[7]=n[7],o[8]=n[8],o[9]=n[9],o[10]=n[10],o[11]=n[11],o[12]=n[12],o[13]=n[13],o[14]=n[14],o[15]=n[15],o},Oke}var Gke,dWt;function hWt(){return dWt||(dWt=1,Gke=(e,n)=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e)),Gke}var Yke,pWt;function Sii(){return pWt||(pWt=1,Yke=(e,n)=>{const o=n[0],i=n[1],r=n[2],s=n[3],a=n[4],A=n[5],c=n[6],l=n[7],u=n[8],g=n[9],h=n[10],d=n[11],p=n[12],m=n[13],_=n[14],f=n[15],I=o*A-i*a,C=o*c-r*a,y=o*l-s*a,x=i*c-r*A,E=i*l-s*A,B=r*l-s*c,S=u*m-g*p,Q=u*_-h*p,w=u*f-d*p,M=g*_-h*m,k=g*f-d*m,R=h*f-d*_;let F=I*R-C*k+y*M+x*w-E*Q+B*S;return F?(F=1/F,e[0]=(A*R-c*k+l*M)*F,e[1]=(r*k-i*R-s*M)*F,e[2]=(m*B-_*E+f*x)*F,e[3]=(h*E-g*B-d*x)*F,e[4]=(c*w-a*R-l*Q)*F,e[5]=(o*R-r*w+s*Q)*F,e[6]=(_*y-p*B-f*C)*F,e[7]=(u*B-h*y+d*C)*F,e[8]=(a*k-A*w+l*S)*F,e[9]=(i*w-o*k-s*S)*F,e[10]=(p*E-m*y+f*I)*F,e[11]=(g*y-u*E-d*I)*F,e[12]=(A*Q-a*M-c*S)*F,e[13]=(o*M-i*Q+r*S)*F,e[14]=(m*C-p*x-_*I)*F,e[15]=(u*x-g*C+h*I)*F,e):null}),Yke}var Uke,mWt;function Qii(){return mWt||(mWt=1,Uke=(e,n)=>e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]&&e[4]===n[4]&&e[5]===n[5]&&e[6]===n[6]&&e[7]===n[7]&&e[8]===n[8]&&e[9]===n[9]&&e[10]===n[10]&&e[11]===n[11]&&e[12]===n[12]&&e[13]===n[13]&&e[14]===n[14]&&e[15]===n[15]),Uke}var Kke,_Wt;function pc(){if(_Wt)return Kke;_Wt=1;const t=1e5,e=1e-5,n=1e-13,o=Math.PI*2;return Kke={EPS:e,NEPS:n,TAU:o,spatialResolution:t},Kke}var Vke,fWt;function dI(){if(fWt)return Vke;fWt=1;const{NEPS:t}=pc(),e=i=>Math.abs(i)<t?0:i;return Vke={sin:i=>e(Math.sin(i)),cos:i=>e(Math.cos(i))},Vke}var zke,IWt;function CWt(){return IWt||(IWt=1,zke=e=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)),zke}var Jke,yWt;function xWt(){if(yWt)return Jke;yWt=1;const{EPS:t}=pc(),{sin:e,cos:n}=dI(),o=CWt();return Jke=(r,s,a)=>{let[A,c,l]=a;const u=A*A+c*c+l*l;if(Math.abs(u)<t)return o(r);const g=1/Math.sqrt(u);A*=g,c*=g,l*=g;const h=e(s),d=n(s),p=1-d;return r[0]=A*A*p+d,r[1]=c*A*p+l*h,r[2]=l*A*p-c*h,r[3]=0,r[4]=A*c*p-l*h,r[5]=c*c*p+d,r[6]=l*c*p+A*h,r[7]=0,r[8]=A*l*p+c*h,r[9]=c*l*p-A*h,r[10]=l*l*p+d,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r},Jke}var Wke,EWt;function vii(){return EWt||(EWt=1,Wke=(e,n)=>(e[0]=n[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=n[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)),Wke}var jke,BWt;function wii(){if(BWt)return jke;BWt=1;const{sin:t,cos:e}=dI();return jke=(o,i,r,s)=>{const a=t(i),A=e(i),c=t(r),l=e(r),u=t(s),g=e(s);return o[0]=l*A,o[1]=l*a,o[2]=-c,o[3]=0,o[4]=u*c*A-g*a,o[5]=g*A+u*c*a,o[6]=u*l,o[7]=0,o[8]=u*a+g*c*A,o[9]=g*c*a-u*A,o[10]=g*l,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},jke}var $ke,bWt;function Pii(){return bWt||(bWt=1,$ke=(e,n)=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e)),$ke}var qke,SWt;function Mii(){if(SWt)return qke;SWt=1;const t=Hke();return qke=(n,o,i,r,s,a,A,c,l,u,g,h,d,p,m,_)=>{const f=t();return f[0]=n,f[1]=o,f[2]=i,f[3]=r,f[4]=s,f[5]=a,f[6]=A,f[7]=c,f[8]=l,f[9]=u,f[10]=g,f[11]=h,f[12]=d,f[13]=p,f[14]=m,f[15]=_,f},qke}var Xke,QWt;function vWt(){return QWt||(QWt=1,Xke=(e,n)=>(e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e[2]=Math.abs(n[2]),e)),Xke}var Zke,wWt;function PWt(){return wWt||(wWt=1,Zke=(e,n,o)=>(e[0]=n[0]+o[0],e[1]=n[1]+o[1],e[2]=n[2]+o[2],e)),Zke}var eFe,MWt;function xhe(){return MWt||(MWt=1,eFe=(e,n)=>e[0]*n[0]+e[1]*n[1]+e[2]*n[2]),eFe}var tFe,DWt;function Dii(){if(DWt)return tFe;DWt=1;const t=xhe();return tFe=(n,o)=>{const i=n[0],r=n[1],s=n[2],a=o[0],A=o[1],c=o[2],l=Math.sqrt(i*i+r*r+s*s),u=Math.sqrt(a*a+A*A+c*c),g=l*u,h=g&&t(n,o)/g;return Math.acos(Math.min(Math.max(h,-1),1))},tFe}var nFe,NWt;function Ehe(){return NWt||(NWt=1,nFe=()=>[0,0,0]),nFe}var oFe,RWt;function Nii(){if(RWt)return oFe;RWt=1;const t=Ehe();return oFe=n=>{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o},oFe}var iFe,TWt;function kWt(){return TWt||(TWt=1,iFe=(e,n)=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],e)),iFe}var rFe,FWt;function lX(){return FWt||(FWt=1,rFe=(e,n,o)=>{const i=n[0],r=n[1],s=n[2],a=o[0],A=o[1],c=o[2];return e[0]=r*c-s*A,e[1]=s*a-i*c,e[2]=i*A-r*a,e}),rFe}var sFe,LWt;function HWt(){return LWt||(LWt=1,sFe=(e,n)=>{const o=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2];return Math.sqrt(o*o+i*i+r*r)}),sFe}var aFe,OWt;function Rii(){return OWt||(OWt=1,aFe=(e,n,o)=>(e[0]=n[0]/o[0],e[1]=n[1]/o[1],e[2]=n[2]/o[2],e)),aFe}var AFe,GWt;function Tii(){return GWt||(GWt=1,AFe=(e,n)=>e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]),AFe}var cFe,YWt;function kii(){return YWt||(YWt=1,cFe=(e,n)=>(e[0]=n,e[1]=n,e[2]=n,e)),cFe}var lFe,UWt;function Fii(){if(UWt)return lFe;UWt=1;const t=Ehe();return lFe=(n,o,i)=>{const r=t();return r[0]=n,r[1]=o,r[2]=i,r},lFe}var uFe,KWt;function Lii(){return KWt||(KWt=1,uFe=(e,n,o=0)=>(e[0]=n[0],e[1]=n[1],e[2]=o,e)),uFe}var gFe,VWt;function zWt(){return VWt||(VWt=1,gFe=e=>{const n=e[0],o=e[1],i=e[2];return Math.sqrt(n*n+o*o+i*i)}),gFe}var dFe,JWt;function Hii(){return JWt||(JWt=1,dFe=(e,n,o,i)=>(e[0]=n[0]+i*(o[0]-n[0]),e[1]=n[1]+i*(o[1]-n[1]),e[2]=n[2]+i*(o[2]-n[2]),e)),dFe}var hFe,WWt;function jWt(){return WWt||(WWt=1,hFe=(e,n,o)=>(e[0]=Math.max(n[0],o[0]),e[1]=Math.max(n[1],o[1]),e[2]=Math.max(n[2],o[2]),e)),hFe}var pFe,$Wt;function qWt(){return $Wt||($Wt=1,pFe=(e,n,o)=>(e[0]=Math.min(n[0],o[0]),e[1]=Math.min(n[1],o[1]),e[2]=Math.min(n[2],o[2]),e)),pFe}var mFe,XWt;function Oii(){return XWt||(XWt=1,mFe=(e,n,o)=>(e[0]=n[0]*o[0],e[1]=n[1]*o[1],e[2]=n[2]*o[2],e)),mFe}var _Fe,ZWt;function Gii(){return ZWt||(ZWt=1,_Fe=(e,n)=>(e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e)),_Fe}var fFe,ejt;function IFe(){return ejt||(ejt=1,fFe=(e,n)=>{const o=n[0],i=n[1],r=n[2];let s=o*o+i*i+r*r;return s>0&&(s=1/Math.sqrt(s)),e[0]=o*s,e[1]=i*s,e[2]=r*s,e}),fFe}var CFe,tjt;function Yii(){if(tjt)return CFe;tjt=1;const t=vWt(),e=Ehe(),n=lX();return CFe=(i,r)=>{const s=t(e(),r),a=0+(s[0]<s[1]&&s[0]<s[2]),A=0+(s[1]<=s[0]&&s[1]<s[2]),c=0+(s[2]<=s[0]&&s[2]<=s[1]);return n(i,r,[a,A,c])},CFe}var yFe,njt;function Uii(){return njt||(njt=1,yFe=(e,n,o,i)=>{const r=[],s=[];return r[0]=n[0]-o[0],r[1]=n[1]-o[1],r[2]=n[2]-o[2],s[0]=r[0],s[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),s[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),e[0]=s[0]+o[0],e[1]=s[1]+o[1],e[2]=s[2]+o[2],e}),yFe}var xFe,ojt;function Kii(){return ojt||(ojt=1,xFe=(e,n,o,i)=>{const r=[],s=[];return r[0]=n[0]-o[0],r[1]=n[1]-o[1],r[2]=n[2]-o[2],s[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),s[1]=r[1],s[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),e[0]=s[0]+o[0],e[1]=s[1]+o[1],e[2]=s[2]+o[2],e}),xFe}var EFe,ijt;function Vii(){return ijt||(ijt=1,EFe=(e,n,o,i)=>{const r=[],s=[];return r[0]=n[0]-o[0],r[1]=n[1]-o[1],s[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),s[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),e[0]=s[0]+o[0],e[1]=s[1]+o[1],e[2]=n[2],e}),EFe}var BFe,rjt;function sjt(){return rjt||(rjt=1,BFe=(e,n,o)=>(e[0]=n[0]*o,e[1]=n[1]*o,e[2]=n[2]*o,e)),BFe}var bFe,ajt;function zii(){return ajt||(ajt=1,bFe=(e,n,o)=>(e[0]=Math.round(n[0]/o)*o+0,e[1]=Math.round(n[1]/o)*o+0,e[2]=Math.round(n[2]/o)*o+0,e)),bFe}var SFe,Ajt;function cjt(){return Ajt||(Ajt=1,SFe=(e,n)=>{const o=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2];return o*o+i*i+r*r}),SFe}var QFe,ljt;function ujt(){return ljt||(ljt=1,QFe=e=>{const n=e[0],o=e[1],i=e[2];return n*n+o*o+i*i}),QFe}var vFe,gjt;function Bhe(){return gjt||(gjt=1,vFe=(e,n,o)=>(e[0]=n[0]-o[0],e[1]=n[1]-o[1],e[2]=n[2]-o[2],e)),vFe}var wFe,djt;function Jii(){return djt||(djt=1,wFe=e=>`[${e[0].toFixed(7)}, ${e[1].toFixed(7)}, ${e[2].toFixed(7)}]`),wFe}var PFe,hjt;function Wii(){return hjt||(hjt=1,PFe=(e,n,o)=>{const i=n[0],r=n[1],s=n[2];let a=o[3]*i+o[7]*r+o[11]*s+o[15];return a=a||1,e[0]=(o[0]*i+o[4]*r+o[8]*s+o[12])/a,e[1]=(o[1]*i+o[5]*r+o[9]*s+o[13])/a,e[2]=(o[2]*i+o[6]*r+o[10]*s+o[14])/a,e}),PFe}var MFe,pjt;function jr(){return pjt||(pjt=1,MFe={abs:vWt(),add:PWt(),angle:Dii(),clone:Nii(),copy:kWt(),create:Ehe(),cross:lX(),distance:HWt(),divide:Rii(),dot:xhe(),equals:Tii(),fromScalar:kii(),fromValues:Fii(),fromVec2:Lii(),length:zWt(),lerp:Hii(),max:jWt(),min:qWt(),multiply:Oii(),negate:Gii(),normalize:IFe(),orthogonal:Yii(),rotateX:Uii(),rotateY:Kii(),rotateZ:Vii(),scale:sjt(),snap:zii(),squaredDistance:cjt(),squaredLength:ujt(),subtract:Bhe(),toString:Jii(),transform:Wii()}),MFe}var DFe,mjt;function jii(){if(mjt)return DFe;mjt=1;const t=jr(),e=xWt();return DFe=(o,i,r)=>{const s=t.normalize(t.create(),i),a=t.normalize(t.create(),r),A=t.cross(t.create(),a,s),c=t.dot(a,s);if(c===-1)return e(o,Math.PI,t.orthogonal(A,s));const l=1/(1+c);return o[0]=A[0]*A[0]*l+c,o[1]=A[1]*A[0]*l-A[2],o[2]=A[2]*A[0]*l+A[1],o[3]=0,o[4]=A[0]*A[1]*l+A[2],o[5]=A[1]*A[1]*l+c,o[6]=A[2]*A[1]*l-A[0],o[7]=0,o[8]=A[0]*A[2]*l-A[1],o[9]=A[1]*A[2]*l+A[0],o[10]=A[2]*A[2]*l+c,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},DFe}var NFe,_jt;function $ii(){if(_jt)return NFe;_jt=1;const{sin:t,cos:e}=dI();return NFe=(o,i)=>{const r=t(i),s=e(i);return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=r,o[7]=0,o[8]=0,o[9]=-r,o[10]=s,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},NFe}var RFe,fjt;function qii(){if(fjt)return RFe;fjt=1;const{sin:t,cos:e}=dI();return RFe=(o,i)=>{const r=t(i),s=e(i);return o[0]=s,o[1]=0,o[2]=-r,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=r,o[9]=0,o[10]=s,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},RFe}var TFe,Ijt;function Xii(){if(Ijt)return TFe;Ijt=1;const{sin:t,cos:e}=dI();return TFe=(o,i)=>{const r=t(i),s=e(i);return o[0]=s,o[1]=r,o[2]=0,o[3]=0,o[4]=-r,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},TFe}var kFe,Cjt;function Zii(){return Cjt||(Cjt=1,kFe=e=>e[0]===1&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0&&e[8]===0&&e[9]===0&&e[10]===1&&e[11]===0&&e[12]===0&&e[13]===0&&e[14]===0&&e[15]===1),kFe}var FFe,yjt;function eri(){if(yjt)return FFe;yjt=1;const t=n=>e(n[1])&&e(n[2])&&e(n[3])&&e(n[4])&&e(n[6])&&e(n[7])&&e(n[8])&&e(n[9])&&e(n[11])&&n[15]===1,e=n=>Math.abs(n)<Number.EPSILON;return FFe=t,FFe}var LFe,xjt;function tri(){return xjt||(xjt=1,LFe=e=>{const n=e[4]*e[9]-e[8]*e[5],o=e[8]*e[1]-e[0]*e[9],i=e[0]*e[5]-e[4]*e[1];return n*e[2]+o*e[6]+i*e[10]<0}),LFe}var HFe,Ejt;function nri(){return Ejt||(Ejt=1,HFe=(e,n)=>{const[o,i,r,s]=n;return e[0]=1-2*o*o,e[1]=-2*i*o,e[2]=-2*r*o,e[3]=0,e[4]=-2*o*i,e[5]=1-2*i*i,e[6]=-2*r*i,e[7]=0,e[8]=-2*o*r,e[9]=-2*i*r,e[10]=1-2*r*r,e[11]=0,e[12]=2*o*s,e[13]=2*i*s,e[14]=2*r*s,e[15]=1,e}),HFe}var OFe,Bjt;function ori(){return Bjt||(Bjt=1,OFe=(e,n,o)=>{const i=n[0],r=n[1],s=n[2],a=n[3],A=n[4],c=n[5],l=n[6],u=n[7],g=n[8],h=n[9],d=n[10],p=n[11],m=n[12],_=n[13],f=n[14],I=n[15];let C=o[0],y=o[1],x=o[2],E=o[3];return e[0]=C*i+y*A+x*g+E*m,e[1]=C*r+y*c+x*h+E*_,e[2]=C*s+y*l+x*d+E*f,e[3]=C*a+y*u+x*p+E*I,C=o[4],y=o[5],x=o[6],E=o[7],e[4]=C*i+y*A+x*g+E*m,e[5]=C*r+y*c+x*h+E*_,e[6]=C*s+y*l+x*d+E*f,e[7]=C*a+y*u+x*p+E*I,C=o[8],y=o[9],x=o[10],E=o[11],e[8]=C*i+y*A+x*g+E*m,e[9]=C*r+y*c+x*h+E*_,e[10]=C*s+y*l+x*d+E*f,e[11]=C*a+y*u+x*p+E*I,C=o[12],y=o[13],x=o[14],E=o[15],e[12]=C*i+y*A+x*g+E*m,e[13]=C*r+y*c+x*h+E*_,e[14]=C*s+y*l+x*d+E*f,e[15]=C*a+y*u+x*p+E*I,e}),OFe}var GFe,bjt;function iri(){if(bjt)return GFe;bjt=1;const{EPS:t}=pc(),{sin:e,cos:n}=dI(),o=hWt();return GFe=(r,s,a,A)=>{let[c,l,u]=A;const g=c*c+l*l+u*u;if(Math.abs(g)<t)return o(r,s);const h=1/Math.sqrt(g);c*=h,l*=h,u*=h;const d=e(a),p=n(a),m=1-p,_=s[0],f=s[1],I=s[2],C=s[3],y=s[4],x=s[5],E=s[6],B=s[7],S=s[8],Q=s[9],w=s[10],M=s[11],k=c*c*m+p,R=l*c*m+u*d,F=u*c*m-l*d,O=c*l*m-u*d,U=l*l*m+p,Y=u*l*m+c*d,W=c*u*m+l*d,te=l*u*m-c*d,j=u*u*m+p;return r[0]=_*k+y*R+S*F,r[1]=f*k+x*R+Q*F,r[2]=I*k+E*R+w*F,r[3]=C*k+B*R+M*F,r[4]=_*O+y*U+S*Y,r[5]=f*O+x*U+Q*Y,r[6]=I*O+E*U+w*Y,r[7]=C*O+B*U+M*Y,r[8]=_*W+y*te+S*j,r[9]=f*W+x*te+Q*j,r[10]=I*W+E*te+w*j,r[11]=C*W+B*te+M*j,s!==r&&(r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r},GFe}var YFe,Sjt;function rri(){if(Sjt)return YFe;Sjt=1;const{sin:t,cos:e}=dI();return YFe=(o,i,r)=>{const s=t(r),a=e(r),A=i[4],c=i[5],l=i[6],u=i[7],g=i[8],h=i[9],d=i[10],p=i[11];return i!==o&&(o[0]=i[0],o[1]=i[1],o[2]=i[2],o[3]=i[3],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15]),o[4]=A*a+g*s,o[5]=c*a+h*s,o[6]=l*a+d*s,o[7]=u*a+p*s,o[8]=g*a-A*s,o[9]=h*a-c*s,o[10]=d*a-l*s,o[11]=p*a-u*s,o},YFe}var UFe,Qjt;function sri(){if(Qjt)return UFe;Qjt=1;const{sin:t,cos:e}=dI();return UFe=(o,i,r)=>{const s=t(r),a=e(r),A=i[0],c=i[1],l=i[2],u=i[3],g=i[8],h=i[9],d=i[10],p=i[11];return i!==o&&(o[4]=i[4],o[5]=i[5],o[6]=i[6],o[7]=i[7],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15]),o[0]=A*a-g*s,o[1]=c*a-h*s,o[2]=l*a-d*s,o[3]=u*a-p*s,o[8]=A*s+g*a,o[9]=c*s+h*a,o[10]=l*s+d*a,o[11]=u*s+p*a,o},UFe}var KFe,vjt;function ari(){if(vjt)return KFe;vjt=1;const{sin:t,cos:e}=dI();return KFe=(o,i,r)=>{const s=t(r),a=e(r),A=i[0],c=i[1],l=i[2],u=i[3],g=i[4],h=i[5],d=i[6],p=i[7];return i!==o&&(o[8]=i[8],o[9]=i[9],o[10]=i[10],o[11]=i[11],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15]),o[0]=A*a+g*s,o[1]=c*a+h*s,o[2]=l*a+d*s,o[3]=u*a+p*s,o[4]=g*a-A*s,o[5]=h*a-c*s,o[6]=d*a-l*s,o[7]=p*a-u*s,o},KFe}var VFe,wjt;function Ari(){return wjt||(wjt=1,VFe=(e,n,o)=>{const i=o[0],r=o[1],s=o[2];return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=n[3]*i,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=n[7]*r,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=n[11]*s,e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e}),VFe}var zFe,Pjt;function cri(){return Pjt||(Pjt=1,zFe=(e,n,o)=>(e[0]=n[0]-o[0],e[1]=n[1]-o[1],e[2]=n[2]-o[2],e[3]=n[3]-o[3],e[4]=n[4]-o[4],e[5]=n[5]-o[5],e[6]=n[6]-o[6],e[7]=n[7]-o[7],e[8]=n[8]-o[8],e[9]=n[9]-o[9],e[10]=n[10]-o[10],e[11]=n[11]-o[11],e[12]=n[12]-o[12],e[13]=n[13]-o[13],e[14]=n[14]-o[14],e[15]=n[15]-o[15],e)),zFe}var JFe,Mjt;function lri(){return Mjt||(Mjt=1,JFe=e=>e.map(n=>n.toFixed(7)).toString()),JFe}var WFe,Djt;function uri(){return Djt||(Djt=1,WFe=(e,n,o)=>{const i=o[0],r=o[1],s=o[2];let a,A,c,l,u,g,h,d,p,m,_,f;return n===e?(e[12]=n[0]*i+n[4]*r+n[8]*s+n[12],e[13]=n[1]*i+n[5]*r+n[9]*s+n[13],e[14]=n[2]*i+n[6]*r+n[10]*s+n[14],e[15]=n[3]*i+n[7]*r+n[11]*s+n[15]):(a=n[0],A=n[1],c=n[2],l=n[3],u=n[4],g=n[5],h=n[6],d=n[7],p=n[8],m=n[9],_=n[10],f=n[11],e[0]=a,e[1]=A,e[2]=c,e[3]=l,e[4]=u,e[5]=g,e[6]=h,e[7]=d,e[8]=p,e[9]=m,e[10]=_,e[11]=f,e[12]=a*i+u*r+p*s+n[12],e[13]=A*i+g*r+m*s+n[13],e[14]=c*i+h*r+_*s+n[14],e[15]=l*i+d*r+f*s+n[15]),e}),WFe}var jFe,Njt;function Mu(){return Njt||(Njt=1,jFe={add:Bii(),clone:bii(),copy:hWt(),create:Hke(),invert:Sii(),equals:Qii(),fromRotation:xWt(),fromScaling:vii(),fromTaitBryanRotation:wii(),fromTranslation:Pii(),fromValues:Mii(),fromVectorRotation:jii(),fromXRotation:$ii(),fromYRotation:qii(),fromZRotation:Xii(),identity:CWt(),isIdentity:Zii(),isOnlyTransformScale:eri(),isMirroring:tri(),mirrorByPlane:nri(),multiply:ori(),rotate:iri(),rotateX:rri(),rotateY:sri(),rotateZ:ari(),scale:Ari(),subtract:cri(),toString:lri(),translate:uri()}),jFe}var $Fe,Rjt;function bhe(){if(Rjt)return $Fe;Rjt=1;const t=Mu();return $Fe=n=>(n===void 0&&(n=[]),{sides:n,transforms:t.create()}),$Fe}var qFe,Tjt;function gri(){return Tjt||(Tjt=1,qFe=(e,n)=>(e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e)),qFe}var XFe,kjt;function dri(){return kjt||(kjt=1,XFe=(e,n,o)=>(e[0]=n[0]+o[0],e[1]=n[1]+o[1],e)),XFe}var ZFe,Fjt;function eLe(){return Fjt||(Fjt=1,ZFe=e=>Math.atan2(e[1],e[0])),ZFe}var tLe,Ljt;function hri(){return Ljt||(Ljt=1,tLe=eLe()),tLe}var nLe,Hjt;function pri(){if(Hjt)return nLe;Hjt=1;const t=eLe();return nLe=n=>t(n)*57.29577951308232,nLe}var oLe,Ojt;function She(){return Ojt||(Ojt=1,oLe=()=>[0,0]),oLe}var iLe,Gjt;function mri(){if(Gjt)return iLe;Gjt=1;const t=She();return iLe=n=>{const o=t();return o[0]=n[0],o[1]=n[1],o},iLe}var rLe,Yjt;function _ri(){return Yjt||(Yjt=1,rLe=(e,n)=>(e[0]=n[0],e[1]=n[1],e)),rLe}var sLe,Ujt;function fri(){return Ujt||(Ujt=1,sLe=(e,n,o)=>(e[0]=0,e[1]=0,e[2]=n[0]*o[1]-n[1]*o[0],e)),sLe}var aLe,Kjt;function Iri(){return Kjt||(Kjt=1,aLe=(e,n)=>{const o=n[0]-e[0],i=n[1]-e[1];return Math.sqrt(o*o+i*i)}),aLe}var ALe,Vjt;function Cri(){return Vjt||(Vjt=1,ALe=(e,n,o)=>(e[0]=n[0]/o[0],e[1]=n[1]/o[1],e)),ALe}var cLe,zjt;function yri(){return zjt||(zjt=1,cLe=(e,n)=>e[0]*n[0]+e[1]*n[1]),cLe}var lLe,Jjt;function xri(){return Jjt||(Jjt=1,lLe=(e,n)=>e[0]===n[0]&&e[1]===n[1]),lLe}var uLe,Wjt;function jjt(){if(Wjt)return uLe;Wjt=1;const{sin:t,cos:e}=dI();return uLe=(o,i)=>(o[0]=e(i),o[1]=t(i),o),uLe}var gLe,$jt;function Eri(){if($jt)return gLe;$jt=1;const t=jjt();return gLe=(n,o)=>t(n,o*.017453292519943295),gLe}var dLe,qjt;function Bri(){return qjt||(qjt=1,dLe=(e,n)=>(e[0]=n,e[1]=n,e)),dLe}var hLe,Xjt;function bri(){if(Xjt)return hLe;Xjt=1;const t=She();return hLe=(n,o)=>{const i=t();return i[0]=n,i[1]=o,i},hLe}var pLe,Zjt;function Sri(){return Zjt||(Zjt=1,pLe=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1])),pLe}var mLe,e$t;function Qri(){return e$t||(e$t=1,mLe=(e,n,o,i)=>{const r=n[0],s=n[1];return e[0]=r+i*(o[0]-r),e[1]=s+i*(o[1]-s),e}),mLe}var _Le,t$t;function vri(){return t$t||(t$t=1,_Le=(e,n,o)=>(e[0]=Math.max(n[0],o[0]),e[1]=Math.max(n[1],o[1]),e)),_Le}var fLe,n$t;function wri(){return n$t||(n$t=1,fLe=(e,n,o)=>(e[0]=Math.min(n[0],o[0]),e[1]=Math.min(n[1],o[1]),e)),fLe}var ILe,o$t;function Pri(){return o$t||(o$t=1,ILe=(e,n,o)=>(e[0]=n[0]*o[0],e[1]=n[1]*o[1],e)),ILe}var CLe,i$t;function Mri(){return i$t||(i$t=1,CLe=(e,n)=>(e[0]=-n[0],e[1]=-n[1],e)),CLe}var yLe,r$t;function s$t(){return r$t||(r$t=1,yLe=(e,n,o,i)=>{const r=n[0]-o[0],s=n[1]-o[1],a=Math.cos(i),A=Math.sin(i);return e[0]=r*a-s*A+o[0],e[1]=r*A+s*a+o[1],e}),yLe}var xLe,a$t;function Dri(){if(a$t)return xLe;a$t=1;const{TAU:t}=pc(),e=She(),n=s$t();return xLe=(i,r)=>n(i,r,e(),t/4),xLe}var ELe,A$t;function Nri(){return A$t||(A$t=1,ELe=(e,n)=>{const o=n[0],i=n[1];let r=o*o+i*i;return r>0&&(r=1/Math.sqrt(r)),e[0]=o*r,e[1]=i*r,e}),ELe}var BLe,c$t;function Rri(){return c$t||(c$t=1,BLe=(e,n,o)=>(e[0]=n[0]*o,e[1]=n[1]*o,e)),BLe}var bLe,l$t;function Tri(){return l$t||(l$t=1,bLe=(e,n,o)=>(e[0]=Math.round(n[0]/o)*o+0,e[1]=Math.round(n[1]/o)*o+0,e)),bLe}var SLe,u$t;function kri(){return u$t||(u$t=1,SLe=(e,n)=>{const o=n[0]-e[0],i=n[1]-e[1];return o*o+i*i}),SLe}var QLe,g$t;function Fri(){return g$t||(g$t=1,QLe=e=>{const n=e[0],o=e[1];return n*n+o*o}),QLe}var vLe,d$t;function Lri(){return d$t||(d$t=1,vLe=(e,n,o)=>(e[0]=n[0]-o[0],e[1]=n[1]-o[1],e)),vLe}var wLe,h$t;function Hri(){return h$t||(h$t=1,wLe=e=>`[${e[0].toFixed(7)}, ${e[1].toFixed(7)}]`),wLe}var PLe,p$t;function Ori(){return p$t||(p$t=1,PLe=(e,n,o)=>{const i=n[0],r=n[1];return e[0]=o[0]*i+o[4]*r+o[12],e[1]=o[1]*i+o[5]*r+o[13],e}),PLe}var MLe,m$t;function mA(){return m$t||(m$t=1,MLe={abs:gri(),add:dri(),angle:hri(),angleDegrees:pri(),angleRadians:eLe(),clone:mri(),copy:_ri(),create:She(),cross:fri(),distance:Iri(),divide:Cri(),dot:yri(),equals:xri(),fromAngleDegrees:Eri(),fromAngleRadians:jjt(),fromScalar:Bri(),fromValues:bri(),length:Sri(),lerp:Qri(),max:vri(),min:wri(),multiply:Pri(),negate:Mri(),normal:Dri(),normalize:Nri(),rotate:s$t(),scale:Rri(),snap:Tri(),squaredDistance:kri(),squaredLength:Fri(),subtract:Lri(),toString:Hri(),transform:Ori()}),MLe}var DLe,_$t;function Gri(){if(_$t)return DLe;_$t=1;const t=mA(),e=bhe();return DLe=o=>{if(!Array.isArray(o))throw new Error("the given points must be an array");let i=o.length;if(i<3)throw new Error("the given points must define a closed geometry with three or more points");t.equals(o[0],o[i-1])&&--i;const r=[];let s=o[i-1];for(let a=0;a<i;a++){const A=o[a];r.push([t.clone(s),t.clone(A)]),s=A}return e(r)},DLe}var NLe,f$t;function Yri(){if(f$t)return NLe;f$t=1;const t=Mu(),e=mA(),n=bhe();return NLe=i=>{if(i[0]!==0)throw new Error("invalid compact binary data");const r=n();r.transforms=t.clone(i.slice(1,17));for(let s=21;s<i.length;s+=4){const a=e.fromValues(i[s+0],i[s+1]),A=e.fromValues(i[s+2],i[s+3]);r.sides.push([a,A])}return i[17]>=0&&(r.color=[i[17],i[18],i[19],i[20]]),r},NLe}var RLe,I$t;function C$t(){return I$t||(I$t=1,RLe=e=>!!(e&&typeof e=="object"&&"sides"in e&&"transforms"in e&&Array.isArray(e.sides)&&"length"in e.transforms)),RLe}var TLe,y$t;function Uri(){if(y$t)return TLe;y$t=1;const t=Mu(),e=mA();return TLe=o=>(t.isIdentity(o.transforms)||(o.sides=o.sides.map(i=>{const r=e.transform(e.create(),i[0],o.transforms),s=e.transform(e.create(),i[1],o.transforms);return[r,s]}),o.transforms=t.create()),o),TLe}var kLe,x$t;function uX(){if(x$t)return kLe;x$t=1;const t=Uri();return kLe=n=>t(n).sides,kLe}var FLe,E$t;function B$t(){if(E$t)return FLe;E$t=1;const t=bhe(),e=uX();return FLe=o=>{const r=e(o).map(s=>[s[1],s[0]]);return r.reverse(),t(r)},FLe}var LLe,b$t;function S$t(){if(b$t)return LLe;b$t=1;const t=mA(),e=uX(),n=s=>{const a=new Map,A=c=>{const l=c.toString();return a.has(l)?a.get(l):(a.set(l,c),c)};return s.map(c=>c.map(A))},o=s=>{const a=new Map;return n(s).forEach(c=>{a.has(c[0])?a.get(c[0]).push(c):a.set(c[0],[c])}),a},i=s=>{const a=o(e(s)),A=[];for(;;){let c;for(const[g,h]of a){if(c=h.shift(),!c){a.delete(g);continue}break}if(c===void 0)break;const l=[],u=c[0];for(;;){l.push(c[0]);const g=c[1];if(g===u)break;const h=a.get(g);if(!h)throw new Error(`geometry is not closed at vertex ${g}`);const d=r(c,h);h.length===0&&a.delete(g),c=d}l.length>0&&l.push(l.shift()),A.push(l)}return a.clear(),A},r=(s,a)=>{if(a.length===1)return a.pop();const A=t.create(),c=t.angleDegrees(t.subtract(A,s[1],s[0]));let l,u;a.forEach((h,d)=>{let m=t.angleDegrees(t.subtract(A,h[1],h[0]))-c;m<-180&&(m+=360),m>=180&&(m-=360),(u===void 0||m>l)&&(u=d,l=m)});const g=a[u];return a.splice(u,1),g};return LLe=i,LLe}var HLe,Q$t;function Kri(){if(Q$t)return HLe;Q$t=1;const t=uX();return HLe=n=>{const i=t(n).map(r=>r[0]);return i.length>0&&i.push(i.shift()),i},HLe}var OLe,v$t;function Vri(){if(v$t)return OLe;v$t=1;const t=mA(),e=uX();return OLe=o=>{const i=e(o);let r="geom2 ("+i.length+` sides):
[
`;return i.forEach(s=>{r+="  ["+t.toString(s[0])+", "+t.toString(s[1])+`]
`}),r+=`]
`,r},OLe}var GLe,w$t;function zri(){return w$t||(w$t=1,GLe=e=>{const n=e.sides,o=e.transforms;let i=[-1,-1,-1,-1];e.color&&(i=e.color);const r=new Float32Array(21+n.length*4);r[0]=0,r[1]=o[0],r[2]=o[1],r[3]=o[2],r[4]=o[3],r[5]=o[4],r[6]=o[5],r[7]=o[6],r[8]=o[7],r[9]=o[8],r[10]=o[9],r[11]=o[10],r[12]=o[11],r[13]=o[12],r[14]=o[13],r[15]=o[14],r[16]=o[15],r[17]=i[0],r[18]=i[1],r[19]=i[2],r[20]=i[3];for(let s=0;s<n.length;s++){const a=s*4+21,A=n[s][0],c=n[s][1];r[a+0]=A[0],r[a+1]=A[1],r[a+2]=c[0],r[a+3]=c[1]}return r}),GLe}var YLe,P$t;function Jri(){if(P$t)return YLe;P$t=1;const t=Mu(),e=B$t();return YLe=(o,i)=>{const r=t.multiply(t.create(),o,i.transforms),s=Object.assign({},i,{transforms:r});return o[0]*o[5]-o[4]*o[1]<0?e(s):s},YLe}var ULe,M$t;function Wri(){if(M$t)return ULe;M$t=1;const t=mA(),e=C$t(),n=S$t();return ULe=i=>{if(!e(i))throw new Error("invalid geom2 structure");if(n(i),i.sides.forEach(r=>{if(t.equals(r[0],r[1]))throw new Error(`geom2 self-edge ${r[0]}`)}),!i.transforms.every(Number.isFinite))throw new Error(`geom2 invalid transforms ${i.transforms}`)},ULe}var KLe,D$t;function Ga(){return D$t||(D$t=1,KLe={clone:Eii(),create:bhe(),fromPoints:Gri(),fromCompactBinary:Yri(),isA:C$t(),reverse:B$t(),toOutlines:S$t(),toPoints:Kri(),toSides:uX(),toString:Vri(),toCompactBinary:zri(),transform:Jri(),validate:Wri()}),KLe}var VLe,N$t;function jri(){return N$t||(N$t=1,VLe=e=>Object.assign({},e)),VLe}var zLe,R$t;function gX(){if(R$t)return zLe;R$t=1;const t=Mu();return zLe=n=>(n===void 0&&(n=[]),{polygons:n,transforms:t.create()}),zLe}var JLe,T$t;function $ri(){if(T$t)return JLe;T$t=1;const t=lX(),e=Bhe(),n=ujt(),o=(r,s,a)=>{const A=[],c=[],l=[];e(A,a,s),e(c,r,s);const u=n(t(l,c,A)),g=n(A);if(g===0)throw Error("a and b are the same point");return u/g};return JLe=(r,s,a)=>Math.sqrt(o(r,s,a)),JLe}var WLe,k$t;function qri(){if(k$t)return WLe;k$t=1;const t=lX(),e=IFe(),n=Bhe();return WLe=(i,r,s,a)=>{const A=[0,0,0];return n(i,r,s),n(A,s,a),t(i,i,A),e(i,i)},WLe}var jLe,F$t;function Xri(){if(F$t)return jLe;F$t=1;class t{constructor(){this.head=null,this.tail=null}clear(){this.head=this.tail=null}insertBefore(n,o){o.prev=n.prev,o.next=n,o.prev?o.prev.next=o:this.head=o,n.prev=o}insertAfter(n,o){o.prev=n,o.next=n.next,o.next?o.next.prev=o:this.tail=o,n.next=o}add(n){this.head?this.tail.next=n:this.head=n,n.prev=this.tail,n.next=null,this.tail=n}addAll(n){for(this.head?this.tail.next=n:this.head=n,n.prev=this.tail;n.next;)n=n.next;this.tail=n}remove(n){n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev}removeChain(n,o){n.prev?n.prev.next=o.next:this.head=o.next,o.next?o.next.prev=n.prev:this.tail=n.prev}first(){return this.head}isEmpty(){return!this.head}}return jLe=t,jLe}var $Le,L$t;function Zri(){if(L$t)return $Le;L$t=1;class t{constructor(n,o){this.point=n,this.index=o,this.next=null,this.prev=null,this.face=null}}return $Le=t,$Le}var qLe,H$t;function esi(){if(H$t)return qLe;H$t=1;const t=HWt(),e=cjt();class n{constructor(i,r){this.vertex=i,this.face=r,this.next=null,this.prev=null,this.opposite=null}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){return this.tail()?t(this.tail().point,this.head().point):-1}lengthSquared(){return this.tail()?e(this.tail().point,this.head().point):-1}setOpposite(i){this.opposite=i,i.opposite=this}}return qLe=n,qLe}var XLe,O$t;function tsi(){if(O$t)return XLe;O$t=1;const t=PWt(),e=kWt(),n=lX(),o=xhe(),i=zWt(),r=IFe(),s=sjt(),a=Bhe(),A=esi(),c=0,l=1,u=2;class g{constructor(){this.normal=[],this.centroid=[],this.offset=0,this.outside=null,this.mark=c,this.edge=null,this.nVertices=0}getEdge(d){if(typeof d!="number")throw Error("requires a number");let p=this.edge;for(;d>0;)p=p.next,d-=1;for(;d<0;)p=p.prev,d+=1;return p}computeNormal(){const d=this.edge,p=d.next;let m=p.next;const _=a([],p.head().point,d.head().point),f=[],I=[];for(this.nVertices=2,this.normal=[0,0,0];m!==d;)e(I,_),a(_,m.head().point,d.head().point),t(this.normal,this.normal,n(f,I,_)),m=m.next,this.nVertices+=1;this.area=i(this.normal),this.normal=s(this.normal,this.normal,1/this.area)}computeNormalMinArea(d){if(this.computeNormal(),this.area<d){let p,m=0,_=this.edge;do{const E=_.lengthSquared();E>m&&(p=_,m=E),_=_.next}while(_!==this.edge);const f=p.tail().point,I=p.head().point,C=a([],I,f),y=Math.sqrt(m);s(C,C,1/y);const x=o(this.normal,C);s(C,C,-x),t(this.normal,this.normal,C),r(this.normal,this.normal)}}computeCentroid(){this.centroid=[0,0,0];let d=this.edge;do t(this.centroid,this.centroid,d.head().point),d=d.next;while(d!==this.edge);s(this.centroid,this.centroid,1/this.nVertices)}computeNormalAndCentroid(d){typeof d<"u"?this.computeNormalMinArea(d):this.computeNormal(),this.computeCentroid(),this.offset=o(this.normal,this.centroid)}distanceToPlane(d){return o(this.normal,d)-this.offset}connectHalfEdges(d,p){let m;if(d.opposite.face===p.opposite.face){const _=p.opposite.face;let f;d===this.edge&&(this.edge=p),_.nVertices===3?(f=p.opposite.prev.opposite,_.mark=u,m=_):(f=p.opposite.next,_.edge===f.prev&&(_.edge=f),f.prev=f.prev.prev,f.prev.next=f),p.prev=d.prev,p.prev.next=p,p.setOpposite(f),_.computeNormalAndCentroid()}else d.next=p,p.prev=d;return m}mergeAdjacentFaces(d,p){const m=d.opposite,_=m.face;p.push(_),_.mark=u;let f=d.prev,I=d.next,C=m.prev,y=m.next;for(;f.opposite.face===_;)f=f.prev,y=y.next;for(;I.opposite.face===_;)I=I.next,C=C.prev;let x;for(x=y;x!==C.next;x=x.next)x.face=this;this.edge=I;let E;return E=this.connectHalfEdges(C,I),E&&p.push(E),E=this.connectHalfEdges(f,y),E&&p.push(E),this.computeNormalAndCentroid(),p}collectIndices(){const d=[];let p=this.edge;do d.push(p.head().index),p=p.next;while(p!==this.edge);return d}static createTriangle(d,p,m,_=0){const f=new g,I=new A(d,f),C=new A(p,f),y=new A(m,f);return I.next=y.prev=C,C.next=I.prev=y,y.next=C.prev=I,f.edge=I,f.computeNormalAndCentroid(_),f}}return XLe={VISIBLE:c,NON_CONVEX:l,DELETED:u,Face:g},XLe}var ZLe,G$t;function nsi(){if(G$t)return ZLe;G$t=1;const t=xhe(),e=$ri(),n=qri(),o=Xri(),i=Zri(),{Face:r,VISIBLE:s,NON_CONVEX:a,DELETED:A}=tsi(),c=1,l=2;class u{constructor(h){if(!Array.isArray(h))throw TypeError("input is not a valid array");if(h.length<4)throw Error("cannot build a simplex out of <4 points");this.tolerance=-1,this.nFaces=0,this.nPoints=h.length,this.faces=[],this.newFaces=[],this.claimed=new o,this.unclaimed=new o,this.vertices=[];for(let d=0;d<h.length;d+=1)this.vertices.push(new i(h[d],d));this.discardedFaces=[],this.vertexPointIndices=[]}addVertexToFace(h,d){h.face=d,d.outside?this.claimed.insertBefore(d.outside,h):this.claimed.add(h),d.outside=h}removeVertexFromFace(h,d){h===d.outside&&(h.next&&h.next.face===d?d.outside=h.next:d.outside=null),this.claimed.remove(h)}removeAllVerticesFromFace(h){if(h.outside){let d=h.outside;for(;d.next&&d.next.face===h;)d=d.next;return this.claimed.removeChain(h.outside,d),d.next=null,h.outside}}deleteFaceVertices(h,d){const p=this.removeAllVerticesFromFace(h);if(p)if(!d)this.unclaimed.addAll(p);else{let m;for(let _=p;_;_=m)m=_.next,d.distanceToPlane(_.point)>this.tolerance?this.addVertexToFace(_,d):this.unclaimed.add(_)}}resolveUnclaimedPoints(h){let d=this.unclaimed.first();for(let p=d;p;p=d){d=p.next;let m=this.tolerance,_;for(let f=0;f<h.length;f+=1){const I=h[f];if(I.mark===s){const C=I.distanceToPlane(p.point);if(C>m&&(m=C,_=I),m>1e3*this.tolerance)break}}_&&this.addVertexToFace(p,_)}}computeExtremes(){const h=[],d=[],p=[],m=[];let _,f;for(_=0;_<3;_+=1)p[_]=m[_]=this.vertices[0];for(_=0;_<3;_+=1)h[_]=d[_]=this.vertices[0].point[_];for(_=1;_<this.vertices.length;_+=1){const I=this.vertices[_],C=I.point;for(f=0;f<3;f+=1)C[f]<h[f]&&(h[f]=C[f],p[f]=I);for(f=0;f<3;f+=1)C[f]>d[f]&&(d[f]=C[f],m[f]=I)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(h[0]),Math.abs(d[0]))+Math.max(Math.abs(h[1]),Math.abs(d[1]))+Math.max(Math.abs(h[2]),Math.abs(d[2]))),[p,m]}createInitialSimplex(){const h=this.vertices,[d,p]=this.computeExtremes();let m,_,f,I,C=0,y=0;for(f=0;f<3;f+=1){const w=p[f].point[f]-d[f].point[f];w>C&&(C=w,y=f)}const x=d[y],E=p[y];for(C=0,f=0;f<this.vertices.length;f+=1){const w=this.vertices[f];if(w!==x&&w!==E){const M=e(w.point,x.point,E.point);M>C&&(C=M,m=w)}}const B=n([],x.point,E.point,m.point),S=t(x.point,B);for(C=-1,f=0;f<this.vertices.length;f+=1){const w=this.vertices[f];if(w!==x&&w!==E&&w!==m){const M=Math.abs(t(B,w.point)-S);M>C&&(C=M,_=w)}}const Q=[];if(t(_.point,B)-S<0)for(Q.push(r.createTriangle(x,E,m),r.createTriangle(_,E,x),r.createTriangle(_,m,E),r.createTriangle(_,x,m)),f=0;f<3;f+=1){const w=(f+1)%3;Q[f+1].getEdge(2).setOpposite(Q[0].getEdge(w)),Q[f+1].getEdge(1).setOpposite(Q[w+1].getEdge(0))}else for(Q.push(r.createTriangle(x,m,E),r.createTriangle(_,x,E),r.createTriangle(_,E,m),r.createTriangle(_,m,x)),f=0;f<3;f+=1){const w=(f+1)%3;Q[f+1].getEdge(2).setOpposite(Q[0].getEdge((3-f)%3)),Q[f+1].getEdge(0).setOpposite(Q[w+1].getEdge(1))}for(f=0;f<4;f+=1)this.faces.push(Q[f]);for(f=0;f<h.length;f+=1){const w=h[f];if(w!==x&&w!==E&&w!==m&&w!==_){C=this.tolerance;let M;for(I=0;I<4;I+=1){const k=Q[I].distanceToPlane(w.point);k>C&&(C=k,M=Q[I])}M&&this.addVertexToFace(w,M)}}}reindexFaceAndVertices(){const h=[];for(let d=0;d<this.faces.length;d+=1){const p=this.faces[d];p.mark===s&&h.push(p)}this.faces=h}collectFaces(h){const d=[];for(let p=0;p<this.faces.length;p+=1){if(this.faces[p].mark!==s)throw Error("attempt to include a destroyed face in the hull");const m=this.faces[p].collectIndices();if(h)d.push(m);else for(let _=0;_<m.length-2;_+=1)d.push([m[0],m[_+1],m[_+2]])}return d}nextVertexToAdd(){if(!this.claimed.isEmpty()){let h,d,p=0;const m=this.claimed.first().face;for(d=m.outside;d&&d.face===m;d=d.next){const _=m.distanceToPlane(d.point);_>p&&(p=_,h=d)}return h}}computeHorizon(h,d,p,m){this.deleteFaceVertices(p),p.mark=A;let _;d?_=d.next:_=d=p.getEdge(0);do{const f=_.opposite,I=f.face;I.mark===s&&(I.distanceToPlane(h)>this.tolerance?this.computeHorizon(h,f,I,m):m.push(_)),_=_.next}while(_!==d)}addAdjoiningFace(h,d){const p=r.createTriangle(h,d.tail(),d.head());return this.faces.push(p),p.getEdge(-1).setOpposite(d.opposite),p.getEdge(0)}addNewFaces(h,d){this.newFaces=[];let p,m;for(let _=0;_<d.length;_+=1){const f=d[_],I=this.addAdjoiningFace(h,f);p?I.next.setOpposite(m):p=I,this.newFaces.push(I.face),m=I}p.next.setOpposite(m)}oppositeFaceDistance(h){return h.face.distanceToPlane(h.opposite.face.centroid)}doAdjacentMerge(h,d){let p=h.edge,m=!0,_=0;do{if(_>=h.nVertices)throw Error("merge recursion limit exceeded");const f=p.opposite.face;let I=!1;if(d===l?(this.oppositeFaceDistance(p)>-this.tolerance||this.oppositeFaceDistance(p.opposite)>-this.tolerance)&&(I=!0):h.area>f.area?this.oppositeFaceDistance(p)>-this.tolerance?I=!0:this.oppositeFaceDistance(p.opposite)>-this.tolerance&&(m=!1):this.oppositeFaceDistance(p.opposite)>-this.tolerance?I=!0:this.oppositeFaceDistance(p)>-this.tolerance&&(m=!1),I){const C=h.mergeAdjacentFaces(p,[]);for(let y=0;y<C.length;y+=1)this.deleteFaceVertices(C[y],h);return!0}p=p.next,_+=1}while(p!==h.edge);return m||(h.mark=a),!1}addVertexToHull(h){const d=[];this.unclaimed.clear(),this.removeVertexFromFace(h,h.face),this.computeHorizon(h.point,null,h.face,d),this.addNewFaces(h,d);for(let p=0;p<this.newFaces.length;p+=1){const m=this.newFaces[p];if(m.mark===s)for(;this.doAdjacentMerge(m,c););}for(let p=0;p<this.newFaces.length;p+=1){const m=this.newFaces[p];if(m.mark===a)for(m.mark=s;this.doAdjacentMerge(m,l););}this.resolveUnclaimedPoints(this.newFaces)}build(){let h;for(this.createInitialSimplex();h=this.nextVertexToAdd();)this.addVertexToHull(h);this.reindexFaceAndVertices()}}return ZLe=u,ZLe}var eHe,Y$t;function U$t(){if(Y$t)return eHe;Y$t=1;const t=nsi();return eHe=(n,o={})=>{const i=new t(n);return i.build(),i.collectFaces(o.skipTriangulation)},eHe}var tHe,K$t;function EY(){return K$t||(K$t=1,tHe=e=>((e===void 0||e.length<3)&&(e=[]),{vertices:e})),tHe}var nHe,V$t;function osi(){if(V$t)return nHe;V$t=1;const t=EY(),e=jr();return nHe=(...o)=>{let i,r;return o.length===1?(i=t(),r=o[0]):(i=o[0],r=o[1]),i.vertices=r.vertices.map(s=>e.clone(s)),i},nHe}var oHe,z$t;function isi(){if(z$t)return oHe;z$t=1;const t=jr(),e=EY();return oHe=o=>{const i=o.map(r=>t.clone(r));return e(i)},oHe}var iHe,J$t;function rsi(){if(J$t)return iHe;J$t=1;const t=EY();return iHe=(n,o)=>{const i=t(n);return i.plane=o,i},iHe}var rHe,W$t;function Qhe(){return W$t||(W$t=1,rHe=()=>[0,0,0,0]),rHe}var sHe,j$t;function $$t(){if(j$t)return sHe;j$t=1;const t=Qhe();return sHe=n=>{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o},sHe}var aHe,q$t;function X$t(){return q$t||(q$t=1,aHe=(e,n)=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e)),aHe}var AHe,Z$t;function eqt(){return Z$t||(Z$t=1,AHe=(e,n)=>e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]),AHe}var cHe,tqt;function nqt(){return tqt||(tqt=1,cHe=(e,n)=>(e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e)),cHe}var lHe,oqt;function iqt(){if(oqt)return lHe;oqt=1;const t=jr();return lHe=(n,o,i)=>{const r=t.normalize(t.create(),o),s=t.dot(i,r);return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=s,n},lHe}var uHe,rqt;function sqt(){if(rqt)return uHe;rqt=1;const t=Qhe();return uHe=(n,o,i,r)=>{const s=t();return s[0]=n,s[1]=o,s[2]=i,s[3]=r,s},uHe}var gHe,aqt;function ssi(){if(aqt)return gHe;aqt=1;const t=jr(),e=iqt();return gHe=(o,...i)=>{o[0]=0,o[1]=0,o[2]=0,o[3]=0;const r=i.length;i.forEach(m=>{t.add(o,o,m)}),t.scale(o,o,1/r);let s=0,a=0,A=0,c=0,l=0,u=0;const g=t.create();i.forEach(m=>{t.subtract(g,m,o),s+=g[0]*g[0],a+=g[0]*g[1],A+=g[0]*g[2],c+=g[1]*g[1],l+=g[1]*g[2],u+=g[2]*g[2]}),s/=r,a/=r,A/=r,c/=r,l/=r,u/=r,g[0]=0,g[1]=0,g[2]=0;const h=t.create();let d=c*u-l*l;h[0]=d,h[1]=A*l-a*u,h[2]=a*l-A*c;let p=d*d;return t.add(g,g,t.scale(h,h,p)),d=s*u-A*A,h[0]=A*l-a*u,h[1]=d,h[2]=a*A-l*s,p=d*d,t.dot(g,h)<0&&(p=-p),t.add(g,g,t.scale(h,h,p)),d=s*c-a*a,h[0]=a*l-A*c,h[1]=a*A-l*s,h[2]=d,p=d*d,t.dot(g,h)<0&&(p=-p),t.add(g,g,t.scale(h,h,p)),e(o,g,o)},gHe}var dHe,Aqt;function cqt(){if(Aqt)return dHe;Aqt=1;const t=jr();return dHe=(n,...o)=>{const i=o.length,r=t.create(),s=t.create(),a=A=>{const c=o[A],l=o[(A+1)%i],u=o[(A+2)%i];return t.subtract(r,l,c),t.subtract(s,u,c),t.cross(r,r,s),t.normalize(r,r),r};return n[0]=0,n[1]=0,n[2]=0,i===3?t.copy(n,a(0)):(o.forEach((A,c)=>{t.add(n,n,a(c))}),t.normalize(n,n)),n[3]=t.dot(n,o[0]),n},dHe}var hHe,lqt;function asi(){if(lqt)return hHe;lqt=1;const{EPS:t}=pc(),e=jr();return hHe=(o,i,r,s)=>{let a=e.subtract(e.create(),r,i),A=e.subtract(e.create(),s,i);e.length(a)<t&&(a=e.orthogonal(a,A)),e.length(A)<t&&(A=e.orthogonal(A,a));let c=e.cross(e.create(),a,A);e.length(c)<t&&(A=e.orthogonal(A,a),c=e.cross(c,a,A)),c=e.normalize(c,c);const l=e.dot(c,i);return o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=l,o},hHe}var pHe,uqt;function Asi(){if(uqt)return pHe;uqt=1;const t=jr();return pHe=(n,o)=>{const i=o[0]*n[0]+o[1]*n[1]+o[2]*n[2]-n[3],r=o[0]-i*n[0],s=o[1]-i*n[1],a=o[2]-i*n[2];return t.fromValues(r,s,a)},pHe}var mHe,gqt;function dqt(){if(gqt)return mHe;gqt=1;const t=jr();return mHe=(n,o)=>t.dot(n,o)-n[3],mHe}var _He,hqt;function pqt(){return hqt||(hqt=1,_He=e=>`(${e[0].toFixed(9)}, ${e[1].toFixed(9)}, ${e[2].toFixed(9)}, ${e[3].toFixed(9)})`),_He}var fHe,mqt;function csi(){if(mqt)return fHe;mqt=1;const t=Mu(),e=jr(),n=cqt(),o=nqt();return fHe=(r,s,a)=>{const A=t.isMirroring(a),c=e.orthogonal(e.create(),s),l=e.cross(c,s,c),u=e.cross(e.create(),s,l);let g=e.fromScalar(e.create(),s[3]);e.multiply(g,g,s);let h=e.add(e.create(),g,l),d=e.add(e.create(),g,u);return g=e.transform(g,g,a),h=e.transform(h,h,a),d=e.transform(d,d,a),n(r,g,h,d),A&&o(r,r),r},fHe}var IHe,_qt;function E6(){return _qt||(_qt=1,IHe={clone:$$t(),copy:X$t(),create:Qhe(),equals:eqt(),flip:nqt(),fromNormalAndPoint:iqt(),fromValues:sqt(),fromNoisyPoints:ssi(),fromPoints:cqt(),fromPointsRandom:asi(),projectionOfPoint:Asi(),signedDistanceToPoint:dqt(),toString:pqt(),transform:csi()}),IHe}var CHe,fqt;function lsi(){if(fqt)return CHe;fqt=1;const t=E6(),e=EY();return CHe=o=>{const i=o.vertices.slice().reverse(),r=e(i);return o.plane&&(r.plane=t.flip(t.create(),o.plane)),r},CHe}var yHe,Iqt;function Cqt(){return Iqt||(Iqt=1,yHe=e=>!!(e&&typeof e=="object"&&"vertices"in e&&Array.isArray(e.vertices))),yHe}var xHe,yqt;function xqt(){if(yqt)return xHe;yqt=1;const t=E6(),e=jr(),n=r=>o(r.vertices),o=r=>{const s=r.length;if(s>2){const a=t.fromPoints(t.create(),...r);let A=r[s-2],c=r[s-1];for(let l=0;l<s;l++){const u=r[l];if(!i(A,c,u,a))return!1;A=c,c=u}}return!0},i=(r,s,a,A)=>{const c=e.cross(e.create(),e.subtract(e.create(),s,r),e.subtract(e.create(),a,s));return e.dot(c,A)>=0};return xHe=n,xHe}var EHe,Eqt;function BHe(){if(Eqt)return EHe;Eqt=1;const t=E6();return EHe=n=>(n.plane||(n.plane=t.fromPoints(t.create(),...n.vertices)),n.plane),EHe}var bHe,Bqt;function bqt(){if(Bqt)return bHe;Bqt=1;const t=BHe();return bHe=n=>{const o=n.vertices.length;if(o<3)return 0;const i=n.vertices,r=t(n),s=Math.abs(r[0]),a=Math.abs(r[1]),A=Math.abs(r[2]);if(s+a+A===0)return 0;let c=3;s>a&&s>A?c=1:a>A&&(c=2);let l=0,u=0,g=1,h=2;switch(c){case 1:for(g=1;g<o;g++)u=g-1,h=(g+1)%o,l+=i[g][1]*(i[h][2]-i[u][2]);l+=i[0][1]*(i[1][2]-i[o-1][2]),l/=2*r[0];break;case 2:for(g=1;g<o;g++)u=g-1,h=(g+1)%o,l+=i[g][2]*(i[h][0]-i[u][0]);l+=i[0][2]*(i[1][0]-i[o-1][0]),l/=2*r[1];break;default:for(g=1;g<o;g++)u=g-1,h=(g+1)%o,l+=i[g][0]*(i[h][1]-i[u][1]);l+=i[0][0]*(i[1][1]-i[o-1][1]),l/=2*r[2];break}return l},bHe}var SHe,Sqt;function usi(){if(Sqt)return SHe;Sqt=1;const t=jr();return SHe=n=>{const o=n.vertices,i=o.length,r=i===0?t.create():t.clone(o[0]),s=t.clone(r);for(let a=1;a<i;a++)t.min(r,r,o[a]),t.max(s,s,o[a]);return[r,s]},SHe}var QHe,Qqt;function gsi(){return Qqt||(Qqt=1,QHe=(e,n)=>e[0]*n[0]+e[1]*n[1]+e[2]*n[2]+e[3]*n[3]),QHe}var vHe,vqt;function dsi(){return vqt||(vqt=1,vHe=(e,n)=>(e[0]=n,e[1]=n,e[2]=n,e[3]=n,e)),vHe}var wHe,wqt;function hsi(){return wqt||(wqt=1,wHe=(e,n,o)=>{const[i,r,s,a]=n;return e[0]=o[0]*i+o[4]*r+o[8]*s+o[12]*a,e[1]=o[1]*i+o[5]*r+o[9]*s+o[13]*a,e[2]=o[2]*i+o[6]*r+o[10]*s+o[14]*a,e[3]=o[3]*i+o[7]*r+o[11]*s+o[15]*a,e}),wHe}var PHe,Pqt;function Mqt(){return Pqt||(Pqt=1,PHe={clone:$$t(),copy:X$t(),create:Qhe(),dot:gsi(),equals:eqt(),fromScalar:dsi(),fromValues:sqt(),toString:pqt(),transform:hsi()}),PHe}var MHe,Dqt;function psi(){if(Dqt)return MHe;Dqt=1;const t=Mqt(),e=new WeakMap;return MHe=o=>{const i=e.get(o);if(i)return i;const r=o.vertices,s=t.create();if(r.length===0)return s[0]=0,s[1]=0,s[2]=0,s[3]=0,s;let a=r[0],A=a,c=a,l=a,u=a,g=a;r.forEach(m=>{a[0]>m[0]&&(a=m),A[1]>m[1]&&(A=m),c[2]>m[2]&&(c=m),l[0]<m[0]&&(l=m),u[1]<m[1]&&(u=m),g[2]<m[2]&&(g=m)}),s[0]=(a[0]+l[0])*.5,s[1]=(A[1]+u[1])*.5,s[2]=(c[2]+g[2])*.5;const h=s[0]-l[0],d=s[1]-u[1],p=s[2]-g[2];return s[3]=Math.sqrt(h*h+d*d+p*p),e.set(o,s),s},MHe}var DHe,Nqt;function msi(){if(Nqt)return DHe;Nqt=1;const t=jr();return DHe=n=>{let o=0;const i=n.vertices,r=t.create();for(let s=0;s<i.length-2;s++)t.cross(r,i[s+1],i[s+2]),o+=t.dot(i[0],r);return o/=6,o},DHe}var NHe,Rqt;function _si(){return Rqt||(Rqt=1,NHe=e=>e.vertices),NHe}var RHe,Tqt;function fsi(){if(Tqt)return RHe;Tqt=1;const t=jr();return RHe=n=>{let o="poly3: vertices: [";return n.vertices.forEach(i=>{o+=`${t.toString(i)}, `}),o+="]",o},RHe}var THe,kqt;function Isi(){if(kqt)return THe;kqt=1;const t=Mu(),e=jr(),n=EY();return THe=(i,r)=>{const s=r.vertices.map(a=>e.transform(e.create(),a,i));return t.isMirroring(i)&&s.reverse(),n(s)},THe}var kHe,Fqt;function Csi(){if(Fqt)return kHe;Fqt=1;const t=dqt(),{NEPS:e}=pc(),n=jr(),o=Cqt(),i=xqt(),r=bqt(),s=BHe();return kHe=A=>{if(!o(A))throw new Error("invalid poly3 structure");if(A.vertices.length<3)throw new Error(`poly3 not enough vertices ${A.vertices.length}`);if(r(A)<=0)throw new Error("poly3 area must be greater than zero");for(let c=0;c<A.vertices.length;c++)if(n.equals(A.vertices[c],A.vertices[(c+1)%A.vertices.length]))throw new Error(`poly3 duplicate vertex ${A.vertices[c]}`);if(!i(A))throw new Error("poly3 must be convex");if(A.vertices.forEach(c=>{if(!c.every(Number.isFinite))throw new Error(`poly3 invalid vertex ${c}`)}),A.vertices.length>3){const c=s(A);A.vertices.forEach(l=>{const u=Math.abs(t(c,l));if(u>e)throw new Error(`poly3 must be coplanar: vertex ${l} distance ${u}`)})}},kHe}var FHe,Lqt;function qA(){return Lqt||(Lqt=1,FHe={clone:osi(),create:EY(),fromPoints:isi(),fromPointsAndPlane:rsi(),invert:lsi(),isA:Cqt(),isConvex:xqt(),measureArea:bqt(),measureBoundingBox:usi(),measureBoundingSphere:psi(),measureSignedVolume:msi(),plane:BHe(),toPoints:_si(),toString:fsi(),transform:Isi(),validate:Csi()}),FHe}var LHe,Hqt;function ysi(){if(Hqt)return LHe;Hqt=1;const t=U$t(),e=gX(),n=qA();return LHe=i=>{if(!Array.isArray(i))throw new Error("the given points must be an array");const s=t(i,{skipTriangulation:!0}).map(a=>{const A=a.map(c=>i[c]);return n.create(A)});return e(s)},LHe}var HHe,Oqt;function xsi(){if(Oqt)return HHe;Oqt=1;const t=qA(),e=gX();return HHe=o=>{if(!Array.isArray(o))throw new Error("the given points must be an array");const i=o.map((s,a)=>t.create(s));return e(i)},HHe}var OHe,Gqt;function Esi(){if(Gqt)return OHe;Gqt=1;const t=jr(),e=Mu(),n=qA(),o=gX();return OHe=r=>{if(r[0]!==1)throw new Error("invalid compact binary data");const s=o();s.transforms=e.clone(r.slice(1,17));const a=r[21];let A=22,c=r.length-a*3;for(;c<r.length;){const l=r[A];A++;const u=[];for(let g=0;g<l;g++)u.push(t.fromValues(r[c],r[c+1],r[c+2])),c+=3;s.polygons.push(n.create(u))}return r[17]>=0&&(s.color=[r[17],r[18],r[19],r[20]]),s},OHe}var GHe,Yqt;function Bsi(){if(Yqt)return GHe;Yqt=1;const t=Mu(),e=qA();return GHe=o=>(t.isIdentity(o.transforms)||(o.polygons=o.polygons.map(i=>e.transform(o.transforms,i)),o.transforms=t.create()),o),GHe}var YHe,Uqt;function dX(){if(Uqt)return YHe;Uqt=1;const t=Bsi();return YHe=n=>t(n).polygons,YHe}var UHe,Kqt;function bsi(){if(Kqt)return UHe;Kqt=1;const t=qA(),e=gX(),n=dX();return UHe=i=>{const s=n(i).map(a=>t.invert(a));return e(s)},UHe}var KHe,Vqt;function VHe(){return Vqt||(Vqt=1,KHe=e=>!!(e&&typeof e=="object"&&"polygons"in e&&"transforms"in e&&Array.isArray(e.polygons)&&"length"in e.transforms)),KHe}var zHe,zqt;function Ssi(){if(zqt)return zHe;zqt=1;const{EPS:t}=pc(),e=jr(),n=VHe(),o=dX(),i=qA();return zHe=s=>{if(!n(s))throw new Error("isConvex requires a geom3 geometry");const a=o(s);if(a.length===0)return!0;const A=[],c=new Set;for(let l=0;l<a.length;l++){const u=a[l].vertices;for(let g=0;g<u.length;g++){const h=u[g],d=`${h[0]},${h[1]},${h[2]}`;c.has(d)||(c.add(d),A.push(h))}}for(let l=0;l<a.length;l++){const u=i.plane(a[l]);for(let g=0;g<A.length;g++){const h=A[g];if(e.dot(u,h)-u[3]>t)return!1}}return!0},zHe}var JHe,Jqt;function Qsi(){if(Jqt)return JHe;Jqt=1;const t=qA(),e=dX();return JHe=o=>e(o).map(s=>t.toPoints(s)),JHe}var WHe,Wqt;function vsi(){if(Wqt)return WHe;Wqt=1;const t=qA(),e=dX();return WHe=o=>{const i=e(o);let r="geom3 ("+i.length+` polygons):
`;return i.forEach(s=>{r+="  "+t.toString(s)+`
`}),r},WHe}var jHe,jqt;function wsi(){if(jqt)return jHe;jqt=1;const t=qA();return jHe=n=>{const o=n.polygons,i=n.transforms,r=o.length,s=o.reduce((u,g)=>u+g.vertices.length,0);let a=[-1,-1,-1,-1];n.color&&(a=n.color);const A=new Float32Array(22+r+s*3);A[0]=1,A[1]=i[0],A[2]=i[1],A[3]=i[2],A[4]=i[3],A[5]=i[4],A[6]=i[5],A[7]=i[6],A[8]=i[7],A[9]=i[8],A[10]=i[9],A[11]=i[10],A[12]=i[11],A[13]=i[12],A[14]=i[13],A[15]=i[14],A[16]=i[15],A[17]=a[0],A[18]=a[1],A[19]=a[2],A[20]=a[3],A[21]=s;let c=22,l=c+r;return o.forEach(u=>{const g=t.toPoints(u);A[c]=g.length,c++;for(let h=0;h<g.length;h++){const d=g[h];A[l+0]=d[0],A[l+1]=d[1],A[l+2]=d[2],l+=3}}),A},jHe}var $He,$qt;function Psi(){if($qt)return $He;$qt=1;const t=Mu();return $He=(n,o)=>{const i=t.multiply(t.create(),n,o.transforms);return Object.assign({},o,{transforms:i})},$He}var qHe,qqt;function Msi(){if(qqt)return qHe;qqt=1;const t=qA(),e=VHe(),n=i=>{if(!e(i))throw new Error("invalid geom3 structure");if(i.polygons.forEach(t.validate),o(i),!i.transforms.every(Number.isFinite))throw new Error(`geom3 invalid transforms ${i.transforms}`)},o=i=>{const r=new Map;i.polygons.forEach(({vertices:a})=>{a.forEach((A,c)=>{const l=`${A}`,u=`${a[(c+1)%a.length]}`,g=`${l}/${u}`,h=r.has(g)?r.get(g):0;r.set(g,h+1)})});const s=[];if(r.forEach((a,A)=>{const c=A.split("/").reverse().join("/"),l=r.get(c);a!==l&&s.push(A.replace("/"," -> "))}),s.length>0)throw new Error(`non-manifold edges ${s.length}
${s.join(`
`)}`)};return qHe=n,qHe}var XHe,Xqt;function Ra(){return Xqt||(Xqt=1,XHe={clone:jri(),create:gX(),fromPointsConvex:ysi(),fromPoints:xsi(),fromCompactBinary:Esi(),invert:bsi(),isA:VHe(),isConvex:Ssi(),toPoints:Qsi(),toPolygons:dX(),toString:vsi(),toCompactBinary:wsi(),transform:Psi(),validate:Msi()}),XHe}var ZHe,Zqt;function eOe(){return Zqt||(Zqt=1,ZHe=e=>Object.assign({},e)),ZHe}var tOe,eXt;function tXt(){if(eXt)return tOe;eXt=1;const{EPS:t}=pc(),e=mA(),n=eOe();return tOe=i=>{if(i.isClosed)return i;const r=n(i);if(r.isClosed=!0,r.points.length>1){const s=r.points,a=s[0];let A=s[s.length-1];for(;e.distance(a,A)<t*t&&(s.pop(),s.length!==1);)A=s[s.length-1]}return r},tOe}var nOe,nXt;function vhe(){if(nXt)return nOe;nXt=1;const t=Mu();return nOe=n=>(n===void 0&&(n=[]),{points:n,isClosed:!1,transforms:t.create()}),nOe}var oOe,oXt;function iOe(){if(oXt)return oOe;oXt=1;const{EPS:t}=pc(),e=mA(),n=tXt(),o=vhe();return oOe=(r,s)=>{const a={closed:!1};let{closed:A}=Object.assign({},a,r),c=o();if(c.points=s.map(l=>e.clone(l)),c.points.length>1){const l=c.points[0],u=c.points[c.points.length-1];e.distance(l,u)<t*t&&(A=!0)}return A===!0&&(c=n(c)),c},oOe}var rOe,iXt;function Dsi(){if(iXt)return rOe;iXt=1;const t=Mu(),e=mA();return rOe=o=>(t.isIdentity(o.transforms)||(o.points=o.points.map(i=>e.transform(e.create(),i,o.transforms)),o.transforms=t.create()),o),rOe}var sOe,rXt;function BY(){if(rXt)return sOe;rXt=1;const t=Dsi();return sOe=n=>t(n).points,sOe}var aOe,sXt;function Nsi(){if(sXt)return aOe;sXt=1;const{TAU:t}=pc(),e=mA(),n=iOe(),o=BY();return aOe=(r,s)=>{const a={radius:[0,0],xaxisrotation:0,clockwise:!1,large:!1,segments:16};let{endpoint:A,radius:c,xaxisrotation:l,clockwise:u,large:g,segments:h}=Object.assign({},a,r);if(!Array.isArray(A))throw new Error("endpoint must be an array of X and Y values");if(A.length<2)throw new Error("endpoint must contain X and Y values");if(A=e.clone(A),!Array.isArray(c))throw new Error("radius must be an array of X and Y values");if(c.length<2)throw new Error("radius must contain X and Y values");if(h<4)throw new Error("segments must be four or more");const d=1e5;if(s.isClosed)throw new Error("the given path cannot be closed");const p=o(s);if(p.length<1)throw new Error("the given path must contain one or more points (as the starting point for the arc)");let m=c[0],_=c[1];const f=p[p.length-1];m=Math.round(m*d)/d,_=Math.round(_*d)/d,A=e.fromValues(Math.round(A[0]*d)/d,Math.round(A[1]*d)/d);const I=!u;let C=[];if(m===0||_===0)C.push(A);else{m=Math.abs(m),_=Math.abs(_);const x=l,E=Math.cos(x),B=Math.sin(x),S=e.subtract(e.create(),f,A);e.scale(S,S,.5);const Q=Math.round((E*S[0]+B*S[1])*d)/d,w=Math.round((-B*S[0]+E*S[1])*d)/d,M=e.fromValues(Q,w),k=M[0]*M[0]/(m*m)+M[1]*M[1]/(_*_);if(k>1){const oe=Math.sqrt(k);m*=oe,_*=oe,m=Math.round(m*d)/d,_=Math.round(_*d)/d}let R=Math.sqrt((m*m*_*_-m*m*M[1]*M[1]-_*_*M[0]*M[0])/(m*m*M[1]*M[1]+_*_*M[0]*M[0]));I===g&&(R=-R);const F=e.fromValues(m*M[1]/_,-_*M[0]/m);e.scale(F,F,R);let O=e.fromValues(E*F[0]-B*F[1],B*F[0]+E*F[1]);O=e.add(O,O,e.scale(e.create(),e.add(e.create(),f,A),.5));const U=e.fromValues((M[0]-F[0])/m,(M[1]-F[1])/_),Y=e.fromValues((-M[0]-F[0])/m,(-M[1]-F[1])/_),W=e.angleRadians(U);let j=e.angleRadians(Y)-W;j=j%t,!I&&j>0?j-=t:I&&j<0&&(j+=t);let J=Math.floor(h*(Math.abs(j)/t));J<1&&(J=1);for(let oe=1;oe<J;oe++){const ie=W+oe/J*j,ne=Math.cos(ie),le=Math.sin(ie),ge=e.fromValues(E*m*ne-B*_*le,B*m*ne+E*_*le);e.add(ge,ge,O),C.push(ge)}J&&C.push(r.endpoint)}return C=p.concat(C),n({},C)},aOe}var AOe,aXt;function AXt(){if(aXt)return AOe;aXt=1;const t=iOe(),e=BY(),{equals:n}=mA();return AOe=(...i)=>{let r=!1,s=[];return i.forEach((a,A)=>{const c=e(a).slice();if(s.length>0&&c.length>0&&n(c[0],s[s.length-1])&&c.shift(),c.length>0&&r)throw new Error(`Cannot concatenate to a closed path; check the ${A}th path`);r=a.isClosed,s=s.concat(c)}),t({closed:r},s)},AOe}var cOe,cXt;function lXt(){if(cXt)return cOe;cXt=1;const t=AXt(),e=vhe();return cOe=(o,i)=>t(i,e(o)),cOe}var lOe,uXt;function Rsi(){if(uXt)return lOe;uXt=1;const{TAU:t}=pc(),e=mA(),n=mA(),o=lXt(),i=BY();return lOe=(s,a)=>{const A={segments:16};let{controlPoints:c,segments:l}=Object.assign({},A,s);if(!Array.isArray(c))throw new Error("controlPoints must be an array of one or more points");if(c.length<1)throw new Error("controlPoints must be an array of one or more points");if(l<4)throw new Error("segments must be four or more");if(a.isClosed)throw new Error("the given geometry cannot be closed");const u=i(a);if(u.length<1)throw new Error("the given path must contain one or more points (as the starting point for the bezier curve)");if(c=c.slice(),c[0]===null){if(c.length<2)throw new Error("a null control point must be passed with one more control points");let M=u[u.length-2];if("lastBezierControlPoint"in a&&(M=a.lastBezierControlPoint),!Array.isArray(M))throw new Error("the given path must contain TWO or more points if given a null control point");const k=e.scale(e.create(),u[u.length-1],2);e.subtract(k,k,M),c[0]=k}c.unshift(u[u.length-1]);const h=c.length-1,d=[];let p=1;for(let M=0;M<=h;++M)M>0&&(p*=M),d.push(p);const m=[];for(let M=0;M<=h;++M){const k=d[h]/(d[M]*d[h-M]);m.push(k)}const _=e.create(),f=e.create(),I=n.create(),C=M=>{let k=1,R=Math.pow(1-M,h);const F=M!==1?1/(1-M):1,O=e.create();for(let U=0;U<=h;++U){U===h&&(R=1);const Y=m[U]*k*R,W=e.scale(_,c[U],Y);e.add(O,O,W),k*=M,R*=F}return O},y=[],x=[],E=h+1;for(let M=0;M<E;++M){const k=M/(E-1),R=C(k);y.push(R),x.push(k)}let B=1;const S=t/l,Q=Math.sin(S);for(;B<y.length-1;){const M=e.subtract(_,y[B],y[B-1]);e.normalize(M,M);const k=e.subtract(f,y[B+1],y[B]);e.normalize(k,k);const R=e.cross(I,M,k);if(Math.abs(R[2])>Q){const F=x[B-1],O=x[B+1],U=F+(O-F)*1/3,Y=F+(O-F)*2/3,W=C(U),te=C(Y);y.splice(B,1,W,te),x.splice(B,1,U,Y),B--,B<1&&(B=1)}else++B}y.shift();const w=o(y,a);return w.lastBezierControlPoint=c[c.length-2],w},lOe}var uOe,gXt;function Tsi(){if(gXt)return uOe;gXt=1;const t=mA(),e=BY();return uOe=(o,i)=>{if(o.isClosed!==i.isClosed||o.points.length!==i.points.length)return!1;const r=e(o),s=e(i),a=r.length;let A=0;do{let c=!1;for(let l=0;l<a;l++)if(!t.equals(r[l],s[(l+A)%a])){c=!0;break}if(c===!1)return!0;if(!o.isClosed)return!1}while(++A<a);return!1},uOe}var gOe,dXt;function ksi(){if(dXt)return gOe;dXt=1;const t=Mu(),e=mA(),n=vhe();return gOe=i=>{if(i[0]!==2)throw new Error("invalid compact binary data");const r=n();r.transforms=t.clone(i.slice(1,17)),r.isClosed=!!i[17];for(let s=22;s<i.length;s+=2){const a=e.fromValues(i[s],i[s+1]);r.points.push(a)}return i[18]>=0&&(r.color=[i[18],i[19],i[20],i[21]]),r},gOe}var dOe,hXt;function pXt(){return hXt||(hXt=1,dOe=e=>!!(e&&typeof e=="object"&&"points"in e&&"transforms"in e&&"isClosed"in e&&Array.isArray(e.points)&&"length"in e.transforms)),dOe}var hOe,mXt;function Fsi(){if(mXt)return hOe;mXt=1;const t=eOe();return hOe=n=>{const o=t(n);return o.points=n.points.slice().reverse(),o},hOe}var pOe,_Xt;function Lsi(){if(_Xt)return pOe;_Xt=1;const t=mA(),e=BY();return pOe=o=>{const i=e(o);let r="path ("+i.length+" points, "+o.isClosed+`):
[
`;return i.forEach(s=>{r+="  "+t.toString(s)+`,
`}),r+=`]
`,r},pOe}var mOe,fXt;function Hsi(){return fXt||(fXt=1,mOe=e=>{const n=e.points,o=e.transforms;let i=[-1,-1,-1,-1];e.color&&(i=e.color);const r=new Float32Array(22+n.length*2);r[0]=2,r[1]=o[0],r[2]=o[1],r[3]=o[2],r[4]=o[3],r[5]=o[4],r[6]=o[5],r[7]=o[6],r[8]=o[7],r[9]=o[8],r[10]=o[9],r[11]=o[10],r[12]=o[11],r[13]=o[12],r[14]=o[13],r[15]=o[14],r[16]=o[15],r[17]=e.isClosed?1:0,r[18]=i[0],r[19]=i[1],r[20]=i[2],r[21]=i[3];for(let s=0;s<n.length;s++){const a=s*2+22,A=n[s];r[a]=A[0],r[a+1]=A[1]}return r}),mOe}var _Oe,IXt;function Osi(){if(IXt)return _Oe;IXt=1;const t=Mu();return _Oe=(n,o)=>{const i=t.multiply(t.create(),n,o.transforms);return Object.assign({},o,{transforms:i})},_Oe}var fOe,CXt;function Gsi(){if(CXt)return fOe;CXt=1;const t=mA(),e=pXt();return fOe=o=>{if(!e(o))throw new Error("invalid path2 structure");if(o.points.length>1){for(let i=0;i<o.points.length;i++)if(t.equals(o.points[i],o.points[(i+1)%o.points.length]))throw new Error(`path2 duplicate points ${o.points[i]}`)}if(o.points.forEach(i=>{if(!i.every(Number.isFinite))throw new Error(`path2 invalid point ${i}`)}),!o.transforms.every(Number.isFinite))throw new Error(`path2 invalid transforms ${o.transforms}`)},fOe}var IOe,yXt;function au(){return yXt||(yXt=1,IOe={appendArc:Nsi(),appendBezier:Rsi(),appendPoints:lXt(),clone:eOe(),close:tXt(),concat:AXt(),create:vhe(),equals:Tsi(),fromPoints:iOe(),fromCompactBinary:ksi(),isA:pXt(),reverse:Fsi(),toPoints:BY(),toString:Lsi(),toCompactBinary:Hsi(),transform:Osi(),validate:Gsi()}),IOe}var COe,xXt;function Ysi(){if(xXt)return COe;xXt=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=qA(),r=(l,u)=>{const g=e.clone(u);return g.color=l,g},s=(l,u)=>{const g=n.clone(u);return g.color=l,g},a=(l,u)=>{const g=o.clone(u);return g.color=l,g},A=(l,u)=>{const g=i.clone(u);return g.color=l,g};return COe=(l,...u)=>{if(!Array.isArray(l))throw new Error("color must be an array");if(l.length<3)throw new Error("color must contain R, G and B values");if(l.length===3&&(l=[l[0],l[1],l[2],1]),u=t(u),u.length===0)throw new Error("wrong number of arguments");const g=u.map(h=>e.isA(h)?r(l,h):n.isA(h)?s(l,h):o.isA(h)?a(l,h):i.isA(h)?A(l,h):(h.color=l,h));return g.length===1?g[0]:g},COe}var yOe,EXt;function BXt(){return EXt||(EXt=1,yOe={black:[0/255,0/255,0/255],silver:[192/255,192/255,192/255],gray:[128/255,128/255,128/255],white:[255/255,255/255,255/255],maroon:[128/255,0/255,0/255],red:[255/255,0/255,0/255],purple:[128/255,0/255,128/255],fuchsia:[255/255,0/255,255/255],green:[0/255,128/255,0/255],lime:[0/255,255/255,0/255],olive:[128/255,128/255,0/255],yellow:[255/255,255/255,0/255],navy:[0/255,0/255,128/255],blue:[0/255,0/255,255/255],teal:[0/255,128/255,128/255],aqua:[0/255,255/255,255/255],aliceblue:[240/255,248/255,255/255],antiquewhite:[250/255,235/255,215/255],aquamarine:[127/255,255/255,212/255],azure:[240/255,255/255,255/255],beige:[245/255,245/255,220/255],bisque:[255/255,228/255,196/255],blanchedalmond:[255/255,235/255,205/255],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,255/255,0/255],chocolate:[210/255,105/255,30/255],coral:[255/255,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[255/255,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0/255,255/255,255/255],darkblue:[0/255,0/255,139/255],darkcyan:[0/255,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0/255,100/255,0/255],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0/255,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[255/255,140/255,0/255],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0/255,0/255],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0/255,206/255,209/255],darkviolet:[148/255,0/255,211/255],deeppink:[255/255,20/255,147/255],deepskyblue:[0/255,191/255,255/255],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,255/255],firebrick:[178/255,34/255,34/255],floralwhite:[255/255,250/255,240/255],forestgreen:[34/255,139/255,34/255],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,255/255],gold:[255/255,215/255,0/255],goldenrod:[218/255,165/255,32/255],greenyellow:[173/255,255/255,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,255/255,240/255],hotpink:[255/255,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0/255,130/255],ivory:[255/255,255/255,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[255/255,240/255,245/255],lawngreen:[124/255,252/255,0/255],lemonchiffon:[255/255,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,255/255,255/255],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[255/255,182/255,193/255],lightsalmon:[255/255,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[255/255,255/255,224/255],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[255/255,0/255,255/255],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0/255,0/255,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0/255,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,255/255,250/255],mistyrose:[255/255,228/255,225/255],moccasin:[255/255,228/255,181/255],navajowhite:[255/255,222/255,173/255],oldlace:[253/255,245/255,230/255],olivedrab:[107/255,142/255,35/255],orange:[255/255,165/255,0/255],orangered:[255/255,69/255,0/255],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[255/255,239/255,213/255],peachpuff:[255/255,218/255,185/255],peru:[205/255,133/255,63/255],pink:[255/255,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[255/255,245/255,238/255],sienna:[160/255,82/255,45/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[255/255,250/255,250/255],springgreen:[0/255,255/255,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],thistle:[216/255,191/255,216/255],tomato:[255/255,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],whitesmoke:[245/255,245/255,245/255],yellowgreen:[154/255,205/255,50/255]}),yOe}var xOe,bXt;function Usi(){if(bXt)return xOe;bXt=1;const t=BXt();return xOe=n=>t[n.toLowerCase()],xOe}var EOe,SXt;function Ksi(){return SXt||(SXt=1,EOe=e=>{if(e=e.replace("#",""),e.length<6)throw new Error("the given notation must contain 3 or more hex values");const n=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,i=parseInt(e.substring(4,6),16)/255;if(e.length>=8){const r=parseInt(e.substring(6,8),16)/255;return[n,o,i,r]}return[n,o,i]}),EOe}var BOe,QXt;function vXt(){return QXt||(QXt=1,BOe=(e,n,o)=>(o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(n-e)*6*o:o<1/2?n:o<2/3?e+(n-e)*(2/3-o)*6:e)),BOe}var bOe,wXt;function Vsi(){if(wXt)return bOe;wXt=1;const t=la(),e=vXt();return bOe=(...o)=>{if(o=t(o),o.length<3)throw new Error("values must contain H, S and L values");const i=o[0],r=o[1],s=o[2];let a=s,A=s,c=s;if(r!==0){const l=s<.5?s*(1+r):s+r-s*r,u=2*s-l;a=e(u,l,i+1/3),A=e(u,l,i),c=e(u,l,i-1/3)}if(o.length>3){const l=o[3];return[a,A,c,l]}return[a,A,c]},bOe}var SOe,PXt;function zsi(){if(PXt)return SOe;PXt=1;const t=la();return SOe=(...n)=>{if(n=t(n),n.length<3)throw new Error("values must contain H, S and V values");const o=n[0],i=n[1],r=n[2];let s=0,a=0,A=0;const c=Math.floor(o*6),l=o*6-c,u=r*(1-i),g=r*(1-l*i),h=r*(1-(1-l)*i);switch(c%6){case 0:s=r,a=h,A=u;break;case 1:s=g,a=r,A=u;break;case 2:s=u,a=r,A=h;break;case 3:s=u,a=g,A=r;break;case 4:s=h,a=u,A=r;break;case 5:s=r,a=u,A=g;break}if(n.length>3){const d=n[3];return[s,a,A,d]}return[s,a,A]},SOe}var QOe,MXt;function Jsi(){if(MXt)return QOe;MXt=1;const t=la();return QOe=(...n)=>{if(n=t(n),n.length<3)throw new Error("values must contain R, G and B values");const o=n[0]*255,i=n[1]*255,r=n[2]*255;let s=`#${Number(16777216+o*65536+i*256+r).toString(16).substring(1,7)}`;return n.length>3&&(s=s+Number(n[3]*255).toString(16)),s},QOe}var vOe,DXt;function Wsi(){if(DXt)return vOe;DXt=1;const t=la();return vOe=(...n)=>{if(n=t(n),n.length<3)throw new Error("values must contain R, G and B values");const o=n[0],i=n[1],r=n[2],s=Math.max(o,i,r),a=Math.min(o,i,r);let A,c;const l=(s+a)/2;if(s===a)A=c=0;else{const u=s-a;switch(c=l>.5?u/(2-s-a):u/(s+a),s){case o:A=(i-r)/u+(i<r?6:0);break;case i:A=(r-o)/u+2;break;case r:A=(o-i)/u+4;break}A/=6}if(n.length>3){const u=n[3];return[A,c,l,u]}return[A,c,l]},vOe}var wOe,NXt;function jsi(){if(NXt)return wOe;NXt=1;const t=la();return wOe=(...n)=>{if(n=t(n),n.length<3)throw new Error("values must contain R, G and B values");const o=n[0],i=n[1],r=n[2],s=Math.max(o,i,r),a=Math.min(o,i,r);let A;const c=s,l=s-a,u=s===0?0:l/s;if(s===a)A=0;else{switch(s){case o:A=(i-r)/l+(i<r?6:0);break;case i:A=(r-o)/l+2;break;case r:A=(o-i)/l+4;break}A/=6}if(n.length>3){const g=n[3];return[A,u,c,g]}return[A,u,c]},wOe}var POe,RXt;function $si(){return RXt||(RXt=1,POe={colorize:Ysi(),colorNameToRgb:Usi(),cssColors:BXt(),hexToRgb:Ksi(),hslToRgb:Vsi(),hsvToRgb:zsi(),hueToColorComponent:vXt(),rgbToHex:Jsi(),rgbToHsl:Wsi(),rgbToHsv:jsi()}),POe}var MOe,TXt;function qsi(){if(TXt)return MOe;TXt=1;const t=i=>{if(!Array.isArray(i))throw new Error("Bezier points must be a valid array/");if(i.length<2)throw new Error("Bezier points must contain at least 2 values.");const r=e(i);return{points:i,pointType:r,dimensions:r==="float_single"?0:i[0].length,permutations:n(i.length-1),tangentPermutations:n(i.length-2)}},e=function(i){let r=null;return i.forEach(s=>{let a="";if(Number.isFinite(s))a="float_single";else if(Array.isArray(s))s.forEach(A=>{if(!Number.isFinite(A))throw new Error("Bezier point values must all be numbers.")}),a="float_"+s.length;else throw new Error("Bezier points must all be numbers or arrays of number.");if(r==null)r=a;else if(r!==a)throw new Error("Bezier points must be either all numbers or all arrays of numbers of the same size.")}),r},n=function(i){const r=[];for(let s=0;s<=i;s++)r.push(o(i)/(o(s)*o(i-s)));return r},o=function(i){let r=1;for(let s=2;s<=i;s++)r*=s;return r};return MOe=t,MOe}var DOe,kXt;function FXt(){if(kXt)return DOe;kXt=1;const t=(n,o)=>{if(n<0||n>1)throw new Error("Bezier valueAt() input must be between 0 and 1");if(o.pointType==="float_single")return e(o,o.points,n);{const i=[];for(let r=0;r<o.dimensions;r++){const s=[];for(let a=0;a<o.points.length;a++)s.push(o.points[a][r]);i.push(e(o,s,n))}return i}},e=function(n,o,i){const r=o.length-1;let s=0;for(let a=0;a<=r;a++)s+=n.permutations[a]*Math.pow(1-i,r-a)*Math.pow(i,a)*o[a];return s};return DOe=t,DOe}var NOe,LXt;function Xsi(){if(LXt)return NOe;LXt=1;const t=(n,o)=>{if(n<0||n>1)throw new Error("Bezier tangentAt() input must be between 0 and 1");if(o.pointType==="float_single")return e(o,o.points,n);{const i=[];for(let r=0;r<o.dimensions;r++){const s=[];for(let a=0;a<o.points.length;a++)s.push(o.points[a][r]);i.push(e(o,s,n))}return i}},e=function(n,o,i){const r=o.length-1;let s=0;for(let a=0;a<r;a++){const A=r*(o[a+1]-o[a]);s+=n.tangentPermutations[a]*Math.pow(1-i,r-1-a)*Math.pow(i,a)*A}return s};return NOe=t,NOe}var ROe,HXt;function TOe(){if(HXt)return ROe;HXt=1;const t=FXt(),e=(o,i)=>{let r=0;const s=[0];let a=t(0,i);for(let A=1;A<=o;A++){const c=t(A/o,i);r+=n(c,a),s.push(r),a=c}return s},n=(o,i)=>{if(Number.isFinite(o)&&Number.isFinite(i))return Math.abs(o-i);if(Array.isArray(o)&&Array.isArray(i)){if(o.length!==i.length)throw new Error("The operands must have the same number of dimensions.");let r=0;for(let s=0;s<o.length;s++)r+=(i[s]-o[s])*(i[s]-o[s]);return Math.sqrt(r)}else throw new Error("The operands must be of the same type, either number or array.")};return ROe=e,ROe}var kOe,OXt;function Zsi(){if(OXt)return kOe;OXt=1;const t=TOe();return kOe=(n,o)=>t(n,o)[n],kOe}var FOe,GXt;function eai(){if(GXt)return FOe;GXt=1;const t=TOe();return FOe=(n,o)=>{const i={distance:0,segments:100},{distance:r,segments:s}=Object.assign({},i,n),a=t(s,o);let A=0,c=s;for(;A<=c;){const p=Math.floor(A+(c-A)/2),m=a[p]-r;if(m<0)A=p+1;else if(m>0)c=p-1;else{c=p;break}}const l=c;if(a[l]===r)return l/s;const u=a[l],h=a[l+1]-u,d=(r-u)/h;return(l+d)/s},FOe}var LOe,YXt;function tai(){return YXt||(YXt=1,LOe={create:qsi(),valueAt:FXt(),tangentAt:Xsi(),lengths:TOe(),length:Zsi(),arcLengthToT:eai()}),LOe}var HOe,UXt;function nai(){return UXt||(UXt=1,HOe={bezier:tai()}),HOe}var OOe,KXt;function whe(){return KXt||(KXt=1,OOe=e=>{let n=0;for(let o=0;o<e.length;o++){const i=(o+1)%e.length;n+=e[o][0]*e[i][1],n-=e[i][0]*e[o][1]}return n/2}),OOe}var GOe,VXt;function zXt(){if(VXt)return GOe;VXt=1;const t=whe();return GOe=n=>t(n.vertices),GOe}var YOe,JXt;function WXt(){return JXt||(JXt=1,YOe=e=>((e===void 0||e.length<3)&&(e=[]),{vertices:e})),YOe}var UOe,jXt;function $Xt(){if(jXt)return UOe;jXt=1;const t=WXt();return UOe=n=>{const o=n.vertices.slice().reverse();return t(o)},UOe}var KOe,qXt;function oai(){if(qXt)return KOe;qXt=1;const t=zXt(),e=$Xt(),n=(i,r)=>{if(i.length===0)return 0;const s=r.vertices;return s.length<3?0:(t(r)<0&&(r=e(r)),i.reduce((A,c)=>A+o(c,s),0)===i.length?1:0)},o=(i,r)=>{const s=r.length,a=i[0],A=i[1];let c=r[s-1],l=r[0],u=c[1]>A,g=0,h=0;for(let d=s+1;--d;){const p=l[1]>A;if(u!==p){const m=c[0]>a,_=l[0]>a;(m&&_||l[0]-(l[1]-A)*(c[0]-l[0])/(c[1]-l[1])>=a)&&(g=!g)}u=p,c=l,l=r[++h]}return g};return KOe=n,KOe}var VOe,XXt;function zOe(){return XXt||(XXt=1,VOe={arePointsInside:oai(),create:WXt(),flip:$Xt(),measureArea:zXt()}),VOe}var JOe,ZXt;function WOe(){return ZXt||(ZXt=1,JOe={geom2:Ga(),geom3:Ra(),path2:au(),poly2:zOe(),poly3:qA()}),JOe}var jOe,eZt;function $Oe(){return eZt||(eZt=1,jOe=()=>[0,1,0]),jOe}var qOe,tZt;function iai(){if(tZt)return qOe;tZt=1;const t=$Oe();return qOe=n=>{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o},qOe}var XOe,nZt;function ZOe(){if(nZt)return XOe;nZt=1;const t=mA();return XOe=n=>{const o=t.normal(t.create(),n);return t.negate(o,o),o},XOe}var eGe,oZt;function Phe(){if(oZt)return eGe;oZt=1;const t=mA();return eGe=n=>t.scale(t.create(),n,n[2]),eGe}var tGe,iZt;function rai(){if(iZt)return tGe;iZt=1;const t=mA(),e=ZOe(),n=Phe();return tGe=(i,r)=>{const s=n(i),a=e(i),A=t.subtract(t.create(),r,s),c=t.dot(A,a);return t.scale(A,a,c),t.add(A,A,s),A},tGe}var nGe,rZt;function sZt(){return rZt||(rZt=1,nGe=(e,n)=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],e)),nGe}var oGe,aZt;function sai(){if(aZt)return oGe;aZt=1;const t=mA();return oGe=(n,o)=>{let i=t.dot(o,n);return i=Math.abs(i-n[2]),i},oGe}var iGe,AZt;function aai(){return AZt||(AZt=1,iGe=(e,n)=>e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]),iGe}var rGe,cZt;function lZt(){if(cZt)return rGe;cZt=1;const t=mA();return rGe=(n,o,i)=>{const r=t.subtract(t.create(),i,o);t.normal(r,r),t.normalize(r,r);const s=t.dot(o,r);return n[0]=r[0],n[1]=r[1],n[2]=s,n},rGe}var sGe,uZt;function gZt(){if(uZt)return sGe;uZt=1;const t=$Oe();return sGe=(n,o,i)=>{const r=t();return r[0]=n,r[1]=o,r[2]=i,r},sGe}var aGe,dZt;function AGe(){if(dZt)return aGe;dZt=1;const{NEPS:t}=pc();return aGe=(n,o)=>Math.abs(n[0]-o[0])<=t&&Math.abs(n[1]-o[1])<=t&&Math.abs(n[2]-o[2])<=t,aGe}var cGe,hZt;function pZt(){return hZt||(hZt=1,cGe=(e,n,o)=>{let i=o-e[1],r=n[1]-e[1];r<0&&(i=-i,r=-r);let s;return i<=0?s=0:i>=r?s=1:r<1e-10?s=.5:s=i/r,e[0]+s*(n[0]-e[0])}),cGe}var lGe,mZt;function _Zt(){return mZt||(mZt=1,lGe=(e,n,o,i)=>{if(e[0]===n[0]&&e[1]===n[1]||o[0]===i[0]&&o[1]===i[1])return;const r=(i[1]-o[1])*(n[0]-e[0])-(i[0]-o[0])*(n[1]-e[1]);if(Math.abs(r)<Number.MIN_VALUE)return;const s=((i[0]-o[0])*(e[1]-o[1])-(i[1]-o[1])*(e[0]-o[0]))/r,a=((n[0]-e[0])*(e[1]-o[1])-(n[1]-e[1])*(e[0]-o[0]))/r;if(s<0||s>1||a<0||a>1)return;const A=e[0]+s*(n[0]-e[0]),c=e[1]+s*(n[1]-e[1]);return[A,c]}),lGe}var uGe,fZt;function Aai(){return fZt||(fZt=1,uGe=(e,n,o,i,r,s)=>{const A=1/(e*i-n*o);let c=r*i-n*s,l=-r*o+e*s;return c*=A,l*=A,[c,l]}),uGe}var gGe,IZt;function hX(){return IZt||(IZt=1,gGe={aboutEqualNormals:AGe(),area:whe(),cos:dI().cos,interpolateBetween2DPointsForY:pZt(),intersect:_Zt(),sin:dI().sin,solve2Linear:Aai()}),gGe}var dGe,CZt;function cai(){if(CZt)return dGe;CZt=1;const t=mA(),{solve2Linear:e}=hX();return dGe=(o,i)=>{const r=e(o[0],o[1],i[0],i[1],o[2],i[2]);return t.clone(r)},dGe}var hGe,yZt;function lai(){if(yZt)return hGe;yZt=1;const t=mA(),e=sZt(),n=gZt();return hGe=(i,r)=>{const s=t.negate(t.create(),r),a=-r[2];return e(i,n(s[0],s[1],a))},hGe}var pGe,xZt;function uai(){return xZt||(xZt=1,pGe=e=>`line2: (${e[0].toFixed(7)}, ${e[1].toFixed(7)}, ${e[2].toFixed(7)})`),pGe}var mGe,EZt;function gai(){if(EZt)return mGe;EZt=1;const t=mA(),e=lZt(),n=Phe(),o=ZOe();return mGe=(r,s,a)=>{const A=n(s),c=o(s);return t.transform(A,A,a),t.transform(c,c,a),e(r,A,c)},mGe}var _Ge,BZt;function dai(){if(BZt)return _Ge;BZt=1;const t=Phe();return _Ge=(n,o)=>{let i=(n[2]-n[1]*o)/n[0];return Number.isNaN(i)&&(i=t(n)[0]),i},_Ge}var fGe,bZt;function IGe(){return bZt||(bZt=1,fGe={clone:iai(),closestPoint:rai(),copy:sZt(),create:$Oe(),direction:ZOe(),distanceToPoint:sai(),equals:aai(),fromPoints:lZt(),fromValues:gZt(),intersectPointOfLines:cai(),origin:Phe(),reverse:lai(),toString:uai(),transform:gai(),xAtY:dai()}),fGe}var CGe,SZt;function QZt(){if(SZt)return CGe;SZt=1;const t=jr();return CGe=()=>[t.fromValues(0,0,0),t.fromValues(0,0,1)],CGe}var yGe,vZt;function hai(){if(vZt)return yGe;vZt=1;const t=jr(),e=QZt();return yGe=o=>{const i=e();return t.copy(i[0],o[0]),t.copy(i[1],o[1]),i},yGe}var xGe,wZt;function PZt(){if(wZt)return xGe;wZt=1;const t=jr();return xGe=(n,o)=>{const i=n[0],r=n[1],s=t.dot(t.subtract(t.create(),o,i),r),a=t.dot(r,r),A=s/a,c=t.scale(t.create(),r,A);return t.add(c,c,i),c},xGe}var EGe,MZt;function pai(){if(MZt)return EGe;MZt=1;const t=jr();return EGe=(n,o)=>(t.copy(n[0],o[0]),t.copy(n[1],o[1]),n),EGe}var BGe,DZt;function mai(){return DZt||(DZt=1,BGe=e=>e[1]),BGe}var bGe,NZt;function _ai(){if(NZt)return bGe;NZt=1;const t=jr(),e=PZt();return bGe=(o,i)=>{const r=e(o,i),s=t.subtract(t.create(),i,r);return t.length(s)},bGe}var SGe,RZt;function fai(){if(RZt)return SGe;RZt=1;const t=jr();return SGe=(n,o)=>!(!t.equals(n[1],o[1])||!t.equals(n[0],o[0])),SGe}var QGe,TZt;function pX(){if(TZt)return QGe;TZt=1;const t=jr();return QGe=(n,o,i)=>{const r=t.normalize(t.create(),i);return t.copy(n[0],o),t.copy(n[1],r),n},QGe}var vGe,kZt;function Iai(){if(kZt)return vGe;kZt=1;const t=jr(),{solve2Linear:e}=hX(),{EPS:n}=pc(),o=pX();return vGe=(r,s,a)=>{let A=t.cross(t.create(),s,a),c=t.length(A);if(c<n)throw new Error("parallel planes do not intersect");c=1/c,A=t.scale(A,A,c);const l=Math.abs(A[0]),u=Math.abs(A[1]),g=Math.abs(A[2]);let h,d;return l>=u&&l>=g?(d=e(s[1],s[2],a[1],a[2],s[3],a[3]),h=t.fromValues(0,d[0],d[1])):u>=l&&u>=g?(d=e(s[0],s[2],a[0],a[2],s[3],a[3]),h=t.fromValues(d[0],0,d[1])):(d=e(s[0],s[1],a[0],a[1],s[3],a[3]),h=t.fromValues(d[0],d[1],0)),o(r,h,A)},vGe}var wGe,FZt;function Cai(){if(FZt)return wGe;FZt=1;const t=jr(),e=pX();return wGe=(o,i,r)=>{const s=t.subtract(t.create(),r,i);return e(o,i,s)},wGe}var PGe,LZt;function yai(){if(LZt)return PGe;LZt=1;const t=jr();return PGe=(n,o)=>{const i=o,r=o[3],s=n[0],a=n[1],A=(r-t.dot(i,s))/t.dot(i,a);return t.add(t.create(),s,t.scale(t.create(),a,A))},PGe}var MGe,HZt;function xai(){return HZt||(HZt=1,MGe=e=>e[0]),MGe}var DGe,OZt;function Eai(){if(OZt)return DGe;OZt=1;const t=jr(),e=pX();return DGe=(o,i)=>{const r=t.clone(i[0]),s=t.negate(t.create(),i[1]);return e(o,r,s)},DGe}var NGe,GZt;function Bai(){return GZt||(GZt=1,NGe=e=>{const n=e[0],o=e[1];return`line3: point: (${n[0].toFixed(7)}, ${n[1].toFixed(7)}, ${n[2].toFixed(7)}) direction: (${o[0].toFixed(7)}, ${o[1].toFixed(7)}, ${o[2].toFixed(7)})`}),NGe}var RGe,YZt;function bai(){if(YZt)return RGe;YZt=1;const t=jr(),e=pX();return RGe=(o,i,r)=>{const s=i[0],a=i[1],A=t.add(t.create(),s,a),c=t.transform(t.create(),s,r),l=t.transform(A,A,r),u=t.subtract(l,l,c);return e(o,c,u)},RGe}var TGe,UZt;function Sai(){return UZt||(UZt=1,TGe={clone:hai(),closestPoint:PZt(),copy:pai(),create:QZt(),direction:mai(),distanceToPoint:_ai(),equals:fai(),fromPlanes:Iai(),fromPointAndDirection:pX(),fromPoints:Cai(),intersectPointOfLineAndPlane:yai(),origin:xai(),reverse:Eai(),toString:Bai(),transform:bai()}),TGe}var kGe,KZt;function Qai(){return KZt||(KZt=1,kGe={constants:pc(),line2:IGe(),line3:Sai(),mat4:Mu(),plane:E6(),utils:hX(),vec2:mA(),vec3:jr(),vec4:Mqt()}),kGe}var FGe,VZt;function zZt(){if(VZt)return FGe;VZt=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=qA(),r=new WeakMap,s=()=>0,a=l=>{let u=r.get(l);return u||(u=e.toSides(l).reduce((h,d)=>h+(d[0][0]*d[1][1]-d[0][1]*d[1][0]),0),u*=.5,r.set(l,u),u)},A=l=>{let u=r.get(l);return u||(u=n.toPolygons(l).reduce((h,d)=>h+i.measureArea(d),0),r.set(l,u),u)};return FGe=(...l)=>{if(l=t(l),l.length===0)throw new Error("wrong number of arguments");const u=l.map(g=>o.isA(g)?s():e.isA(g)?a(g):n.isA(g)?A(g):0);return u.length===1?u[0]:u},FGe}var LGe,JZt;function vai(){if(JZt)return LGe;JZt=1;const t=la(),e=zZt();return LGe=(...o)=>{if(o=t(o),o.length===0)throw new Error("measureAggregateArea: no geometries supplied");const i=e(o);return o.length===1?i:i.reduce((s,a)=>s+a,0)},LGe}var HGe,WZt;function eT(){if(WZt)return HGe;WZt=1;const t=la(),e=mA(),n=jr(),o=Ga(),i=Ra(),r=au(),s=qA(),a=new WeakMap,A=g=>{let h=a.get(g);if(h)return h;const d=r.toPoints(g);let p;d.length===0?p=e.create():p=e.clone(d[0]);let m=e.clone(p);return d.forEach(_=>{e.min(p,p,_),e.max(m,m,_)}),p=[p[0],p[1],0],m=[m[0],m[1],0],h=[p,m],a.set(g,h),h},c=g=>{let h=a.get(g);if(h)return h;const d=o.toPoints(g);let p;d.length===0?p=e.create():p=e.clone(d[0]);let m=e.clone(p);return d.forEach(_=>{e.min(p,p,_),e.max(m,m,_)}),p=[p[0],p[1],0],m=[m[0],m[1],0],h=[p,m],a.set(g,h),h},l=g=>{let h=a.get(g);if(h)return h;const d=i.toPolygons(g);let p=n.create();if(d.length>0){const _=s.toPoints(d[0]);n.copy(p,_[0])}let m=n.clone(p);return d.forEach(_=>{s.toPoints(_).forEach(f=>{n.min(p,p,f),n.max(m,m,f)})}),p=[p[0],p[1],p[2]],m=[m[0],m[1],m[2]],h=[p,m],a.set(g,h),h};return HGe=(...g)=>{if(g=t(g),g.length===0)throw new Error("wrong number of arguments");const h=g.map(d=>r.isA(d)?A(d):o.isA(d)?c(d):i.isA(d)?l(d):[[0,0,0],[0,0,0]]);return h.length===1?h[0]:h},HGe}var OGe,jZt;function GGe(){if(jZt)return OGe;jZt=1;const t=la(),e=qWt(),n=jWt(),o=eT();return OGe=(...r)=>{if(r=t(r),r.length===0)throw new Error("measureAggregateBoundingBox: no geometries supplied");const s=o(r);if(r.length===1)return s;const a=[[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE],[-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE]];return s.reduce((A,c)=>(A=[e(A[0],A[0],c[0]),n(A[1],A[1],c[1])],A),a)},OGe}var YGe,$Zt;function qZt(){if($Zt)return YGe;$Zt=1;const{EPS:t}=pc();return YGe=(n,o)=>{let i=0;for(let r=0;r<o;r++)i+=n[1][r]-n[0][r];return t*i/o},YGe}var UGe,XZt;function wai(){if(XZt)return UGe;XZt=1;const t=la(),e=GGe(),n=qZt(),{geom2:o,geom3:i,path2:r}=WOe();return UGe=(...a)=>{if(a=t(a),a.length===0)throw new Error("measureAggregateEpsilon: no geometries supplied");const A=e(a);let c=0;return c=a.reduce((l,u)=>r.isA(u)||o.isA(u)?Math.max(l,2):i.isA(u)?Math.max(l,3):0,c),n(A,c)},UGe}var KGe,ZZt;function een(){if(ZZt)return KGe;ZZt=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=qA(),r=new WeakMap,s=()=>0,a=()=>0,A=l=>{let u=r.get(l);return u||(u=n.toPolygons(l).reduce((h,d)=>h+i.measureSignedVolume(d),0),r.set(l,u),u)};return KGe=(...l)=>{if(l=t(l),l.length===0)throw new Error("wrong number of arguments");const u=l.map(g=>o.isA(g)?s():e.isA(g)?a():n.isA(g)?A(g):0);return u.length===1?u[0]:u},KGe}var VGe,ten;function Pai(){if(ten)return VGe;ten=1;const t=la(),e=een();return VGe=(...o)=>{if(o=t(o),o.length===0)throw new Error("measureAggregateVolume: no geometries supplied");const i=e(o);return o.length===1?i:i.reduce((s,a)=>s+a,0)},VGe}var zGe,nen;function Mai(){if(nen)return zGe;nen=1;const t=la(),e=mA(),n=jr(),o=Ga(),i=Ra(),r=au(),s=qA(),a=new WeakMap,A=g=>{let h=a.get(g);if(h!==void 0)return h;const d=n.create();let p=0;const m=r.toPoints(g);if(m.length>0){let _=0;const f=n.create();m.forEach(I=>{n.add(d,d,n.fromVec2(f,I,0)),_++}),n.scale(d,d,1/_),m.forEach(I=>{p=Math.max(p,e.squaredDistance(d,I))}),p=Math.sqrt(p)}return h=[d,p],a.set(g,h),h},c=g=>{let h=a.get(g);if(h!==void 0)return h;const d=n.create();let p=0;const m=o.toSides(g);if(m.length>0){let _=0;const f=n.create();m.forEach(I=>{n.add(d,d,n.fromVec2(f,I[0],0)),_++}),n.scale(d,d,1/_),m.forEach(I=>{p=Math.max(p,e.squaredDistance(d,I[0]))}),p=Math.sqrt(p)}return h=[d,p],a.set(g,h),h},l=g=>{let h=a.get(g);if(h!==void 0)return h;const d=n.create();let p=0;const m=i.toPolygons(g);if(m.length>0){let _=0;m.forEach(f=>{s.toPoints(f).forEach(I=>{n.add(d,d,I),_++})}),n.scale(d,d,1/_),m.forEach(f=>{s.toPoints(f).forEach(I=>{p=Math.max(p,n.squaredDistance(d,I))})}),p=Math.sqrt(p)}return h=[d,p],a.set(g,h),h};return zGe=(...g)=>{g=t(g);const h=g.map(d=>r.isA(d)?A(d):o.isA(d)?c(d):i.isA(d)?l(d):[[0,0,0],0]);return h.length===1?h[0]:h},zGe}var JGe,oen;function Dai(){if(oen)return JGe;oen=1;const t=la(),e=eT();return JGe=(...o)=>{o=t(o);const i=o.map(r=>{const s=e(r);return[s[0][0]+(s[1][0]-s[0][0])/2,s[0][1]+(s[1][1]-s[0][1])/2,s[0][2]+(s[1][2]-s[0][2])/2]});return i.length===1?i[0]:i},JGe}var WGe,ien;function Nai(){if(ien)return WGe;ien=1;const t=la(),e=jr(),n=Ga(),o=Ra(),i=new WeakMap,r=A=>{let c=i.get(A);if(c!==void 0)return c;const l=n.toSides(A);let u=0,g=0,h=0;if(l.length>0){for(let p=0;p<l.length;p++){const m=l[p][0],_=l[p][1],f=m[0]*_[1]-m[1]*_[0];u+=f,g+=(m[0]+_[0])*f,h+=(m[1]+_[1])*f}u/=2;const d=1/(u*6);g*=d,h*=d}return c=e.fromValues(g,h,0),i.set(A,c),c},s=A=>{let c=i.get(A);if(c!==void 0)return c;c=e.create();const l=o.toPolygons(A);if(l.length===0)return c;let u=0;const g=e.create();return l.forEach(h=>{const d=h.vertices;for(let p=0;p<d.length-2;p++){e.cross(g,d[p+1],d[p+2]);const m=e.dot(d[0],g)/6;u+=m,e.add(g,d[0],d[p+1]),e.add(g,g,d[p+2]);const _=e.scale(g,g,1/4*m);e.add(c,c,_)}}),e.scale(c,c,1/u),i.set(A,c),c};return WGe=(...A)=>{A=t(A);const c=A.map(l=>n.isA(l)?r(l):o.isA(l)?s(l):[0,0,0]);return c.length===1?c[0]:c},WGe}var jGe,ren;function Rai(){if(ren)return jGe;ren=1;const t=la(),e=eT();return jGe=(...o)=>{o=t(o);const i=o.map(r=>{const s=e(r);return[s[1][0]-s[0][0],s[1][1]-s[0][1],s[1][2]-s[0][2]]});return i.length===1?i[0]:i},jGe}var $Ge,sen;function rP(){if(sen)return $Ge;sen=1;const t=la(),{geom2:e,geom3:n,path2:o}=WOe(),i=qZt(),r=eT(),s=l=>i(r(l),2),a=l=>i(r(l),2),A=l=>i(r(l),3);return $Ge=(...l)=>{if(l=t(l),l.length===0)throw new Error("wrong number of arguments");const u=l.map(g=>o.isA(g)?s(g):e.isA(g)?a(g):n.isA(g)?A(g):0);return u.length===1?u[0]:u},$Ge}var qGe,aen;function Tai(){return aen||(aen=1,qGe={measureAggregateArea:vai(),measureAggregateBoundingBox:GGe(),measureAggregateEpsilon:wai(),measureAggregateVolume:Pai(),measureArea:zZt(),measureBoundingBox:eT(),measureBoundingSphere:Mai(),measureCenter:Dai(),measureCenterOfMass:Nai(),measureDimensions:Rai(),measureEpsilon:rP(),measureVolume:een()}),qGe}var XGe,Aen;function cf(){return Aen||(Aen=1,XGe={isNumberArray:(o,i)=>Array.isArray(o)&&o.length>=i?o.every(r=>Number.isFinite(r)):!1,isGT:(o,i)=>Number.isFinite(o)&&o>i,isGTE:(o,i)=>Number.isFinite(o)&&o>=i}),XGe}var ZGe,cen;function kai(){if(cen)return ZGe;cen=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=au(),{isGT:i,isGTE:r,isNumberArray:s}=cf();return ZGe=A=>{const c={center:[0,0],radius:1,startAngle:0,endAngle:e,makeTangent:!1,segments:32};let{center:l,radius:u,startAngle:g,endAngle:h,makeTangent:d,segments:p}=Object.assign({},c,A);if(!s(l,2))throw new Error("center must be an array of X and Y values");if(!i(u,0))throw new Error("radius must be greater than zero");if(!r(g,0))throw new Error("startAngle must be positive");if(!r(h,0))throw new Error("endAngle must be positive");if(!r(p,4))throw new Error("segments must be four or more");g=g%e,h=h%e;let m=e;g<h&&(m=h-g),g>h&&(m=h+(e-g));const _=Math.acos((u*u+u*u-t*t)/(2*u*u)),f=n.clone(l);let I;const C=[];if(m<_)I=n.fromAngleRadians(n.create(),g),n.scale(I,I,u),n.add(I,I,f),C.push(I);else{const y=Math.floor(p*(Math.abs(m)/e));let x=y*.5/m;x>.25&&(x=.25);const E=d?y+2:y;for(let B=0;B<=E;B++){let S=B;d&&(S=(B-1)*(y-2*x)/y+x,S<0&&(S=0),S>y&&(S=y));const Q=g+S*(m/y);I=n.fromAngleRadians(n.create(),Q),n.scale(I,I,u),n.add(I,I,f),C.push(I)}}return o.fromPoints({closed:!1},C)},ZGe}var eYe,len;function uen(){if(len)return eYe;len=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=Ga(),{sin:i,cos:r}=dI(),{isGTE:s,isNumberArray:a}=cf();return eYe=c=>{const l={center:[0,0],radius:[1,1],startAngle:0,endAngle:e,segments:32};let{center:u,radius:g,startAngle:h,endAngle:d,segments:p}=Object.assign({},l,c);if(!a(u,2))throw new Error("center must be an array of X and Y values");if(!a(g,2))throw new Error("radius must be an array of X and Y values");if(!g.every(x=>x>=0))throw new Error("radius values must be positive");if(!s(h,0))throw new Error("startAngle must be positive");if(!s(d,0))throw new Error("endAngle must be positive");if(!s(p,3))throw new Error("segments must be three or more");if(g[0]===0||g[1]===0)return o.create();h=h%e,d=d%e;let m=e;h<d&&(m=d-h),h>d&&(m=d+(e-h));const _=Math.min(g[0],g[1]),f=Math.acos((_*_+_*_-t*t)/(2*_*_));if(m<f)throw new Error("startAngle and endAngle do not define a significant rotation");p=Math.floor(p*(m/e));const I=n.clone(u),C=m/p,y=[];p=m<e?p+1:p;for(let x=0;x<p;x++){const E=C*x+h,B=n.fromValues(g[0]*r(E),g[1]*i(E));n.add(B,I,B),y.push(B)}return m<e&&y.push(I),o.fromPoints(y)},eYe}var tYe,gen;function den(){if(gen)return tYe;gen=1;const{TAU:t}=pc(),e=uen(),{isGTE:n}=cf();return tYe=i=>{const r={center:[0,0],radius:1,startAngle:0,endAngle:t,segments:32};let{center:s,radius:a,startAngle:A,endAngle:c,segments:l}=Object.assign({},r,i);if(!n(a,0))throw new Error("radius must be positive");return a=[a,a],e({center:s,radius:a,startAngle:A,endAngle:c,segments:l})},tYe}var nYe,hen;function oYe(){if(hen)return nYe;hen=1;const t=Ra(),e=qA(),{isNumberArray:n}=cf();return nYe=i=>{const r={center:[0,0,0],size:[2,2,2]},{center:s,size:a}=Object.assign({},r,i);if(!n(s,3))throw new Error("center must be an array of X, Y and Z values");if(!n(a,3))throw new Error("size must be an array of width, depth and height values");if(!a.every(c=>c>=0))throw new Error("size values must be positive");return a[0]===0||a[1]===0||a[2]===0?t.create():t.create([[[0,4,6,2],[-1,0,0]],[[1,3,7,5],[1,0,0]],[[0,1,5,4],[0,-1,0]],[[2,6,7,3],[0,1,0]],[[0,2,3,1],[0,0,-1]],[[4,5,7,6],[0,0,1]]].map(c=>{const l=c[0].map(u=>[s[0]+a[0]/2*(2*!!(u&1)-1),s[1]+a[1]/2*(2*!!(u&2)-1),s[2]+a[2]/2*(2*!!(u&4)-1)]);return e.create(l)}))},nYe}var iYe,pen;function Fai(){if(pen)return iYe;pen=1;const t=oYe(),{isGTE:e}=cf();return iYe=o=>{const i={center:[0,0,0],size:2};let{center:r,size:s}=Object.assign({},i,o);if(!e(s,0))throw new Error("size must be positive");return s=[s,s,s],t({center:r,size:s})},iYe}var rYe,men;function _en(){if(men)return rYe;men=1;const{EPS:t,TAU:e}=pc(),n=jr(),o=Ra(),i=qA(),{sin:r,cos:s}=dI(),{isGT:a,isGTE:A,isNumberArray:c}=cf();return rYe=u=>{const g={center:[0,0,0],height:2,startRadius:[1,1],startAngle:0,endRadius:[1,1],endAngle:e,segments:32};let{center:h,height:d,startRadius:p,startAngle:m,endRadius:_,endAngle:f,segments:I}=Object.assign({},g,u);if(!c(h,3))throw new Error("center must be an array of X, Y and Z values");if(!a(d,0))throw new Error("height must be greater then zero");if(!c(p,2))throw new Error("startRadius must be an array of X and Y values");if(!p.every(te=>te>=0))throw new Error("startRadius values must be positive");if(!c(_,2))throw new Error("endRadius must be an array of X and Y values");if(!_.every(te=>te>=0))throw new Error("endRadius values must be positive");if(_.every(te=>te===0)&&p.every(te=>te===0))throw new Error("at least one radius must be positive");if(!A(m,0))throw new Error("startAngle must be positive");if(!A(f,0))throw new Error("endAngle must be positive");if(!A(I,4))throw new Error("segments must be four or more");m=m%e,f=f%e;let C=e;m<f&&(C=f-m),m>f&&(C=f+(e-m));const y=Math.min(p[0],p[1],_[0],_[1]),x=Math.acos((y*y+y*y-t*t)/(2*y*y));if(C<x)throw new Error("startAngle and endAngle do not define a significant rotation");const E=Math.floor(I*(C/e)),B=n.fromValues(0,0,-(d/2)),S=n.fromValues(0,0,d/2),Q=n.subtract(n.create(),S,B),w=n.fromValues(1,0,0),M=n.fromValues(0,1,0),k=n.create(),R=n.create(),F=n.create(),O=(te,j,J)=>{const oe=j*C+m;return n.scale(k,w,J[0]*s(oe)),n.scale(R,M,J[1]*r(oe)),n.add(k,k,R),n.scale(F,Q,te),n.add(F,F,B),n.add(n.create(),k,F)},U=(...te)=>{const j=te.map(J=>n.add(n.create(),J,h));return i.create(j)},Y=[];for(let te=0;te<E;te++){const j=te/E;let J=(te+1)/E;C===e&&te===E-1&&(J=0),_[0]===p[0]&&_[1]===p[1]?(Y.push(U(B,O(0,J,_),O(0,j,_))),Y.push(U(O(0,J,_),O(1,J,_),O(1,j,_),O(0,j,_))),Y.push(U(S,O(1,j,_),O(1,J,_)))):(p[0]>0&&p[1]>0&&Y.push(U(B,O(0,J,p),O(0,j,p))),(p[0]>0||p[1]>0)&&Y.push(U(O(0,j,p),O(0,J,p),O(1,j,_))),_[0]>0&&_[1]>0&&Y.push(U(S,O(1,j,_),O(1,J,_))),(_[0]>0||_[1]>0)&&Y.push(U(O(1,j,_),O(0,J,p),O(1,J,_))))}return C<e&&(Y.push(U(B,O(0,0,p),S)),Y.push(U(O(0,0,p),O(1,0,_),S)),Y.push(U(B,S,O(0,1,p))),Y.push(U(O(0,1,p),S,O(1,1,_)))),o.create(Y)},rYe}var sYe,fen;function Ien(){if(fen)return sYe;fen=1;const t=Ra(),e=_en(),{isGTE:n}=cf();return sYe=i=>{const r={center:[0,0,0],height:2,radius:1,segments:32},{center:s,height:a,radius:A,segments:c}=Object.assign({},r,i);if(!n(A,0))throw new Error("radius must be positive");return a===0||A===0?t.create():e({center:s,height:a,startRadius:[A,A],endRadius:[A,A],segments:c})},sYe}var aYe,Cen;function yen(){if(Cen)return aYe;Cen=1;const{TAU:t}=pc(),e=jr(),n=Ra(),o=qA(),{sin:i,cos:r}=dI(),{isGTE:s,isNumberArray:a}=cf();return aYe=c=>{const l={center:[0,0,0],radius:[1,1,1],segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]},{center:u,radius:g,segments:h,axes:d}=Object.assign({},l,c);if(!a(u,3))throw new Error("center must be an array of X, Y and Z values");if(!a(g,3))throw new Error("radius must be an array of X, Y and Z values");if(!g.every(E=>E>=0))throw new Error("radius values must be positive");if(!s(h,4))throw new Error("segments must be four or more");if(g[0]===0||g[1]===0||g[2]===0)return n.create();const p=e.scale(e.create(),e.normalize(e.create(),d[0]),g[0]),m=e.scale(e.create(),e.normalize(e.create(),d[1]),g[1]),_=e.scale(e.create(),e.normalize(e.create(),d[2]),g[2]),f=Math.round(h/4);let I;const C=[],y=e.create(),x=e.create();for(let E=0;E<=h;E++){const B=t*E/h,S=e.add(e.create(),e.scale(y,p,r(B)),e.scale(x,m,i(B)));if(E>0){let Q,w;for(let M=0;M<=f;M++){const k=t/4*M/f,R=r(k),F=i(k);if(M>0){let O=[],U;U=e.subtract(e.create(),e.scale(y,I,Q),e.scale(x,_,w)),O.push(e.add(U,U,u)),U=e.subtract(e.create(),e.scale(y,S,Q),e.scale(x,_,w)),O.push(e.add(U,U,u)),M<f&&(U=e.subtract(e.create(),e.scale(y,S,R),e.scale(x,_,F)),O.push(e.add(U,U,u))),U=e.subtract(e.create(),e.scale(y,I,R),e.scale(x,_,F)),O.push(e.add(U,U,u)),C.push(o.create(O)),O=[],U=e.add(e.create(),e.scale(y,I,Q),e.scale(x,_,w)),O.push(e.add(e.create(),u,U)),U=e.add(U,e.scale(y,S,Q),e.scale(x,_,w)),O.push(e.add(e.create(),u,U)),M<f&&(U=e.add(U,e.scale(y,S,R),e.scale(x,_,F)),O.push(e.add(e.create(),u,U))),U=e.add(U,e.scale(y,I,R),e.scale(x,_,F)),O.push(e.add(e.create(),u,U)),O.reverse(),C.push(o.create(O))}Q=R,w=F}}I=S}return n.create(C)},aYe}var AYe,xen;function Een(){if(xen)return AYe;xen=1;const t=Ra(),e=qA(),{isNumberArray:n}=cf();return AYe=i=>{const r={points:[],faces:[],colors:void 0,orientation:"outward"},{points:s,faces:a,colors:A,orientation:c}=Object.assign({},r,i);if(!(Array.isArray(s)&&Array.isArray(a)))throw new Error("points and faces must be arrays");if(s.length<3)throw new Error("three or more points are required");if(a.length<1)throw new Error("one or more faces are required");if(A){if(!Array.isArray(A))throw new Error("colors must be an array");if(A.length!==a.length)throw new Error("faces and colors must have the same length")}s.forEach((u,g)=>{if(!n(u,3))throw new Error(`point ${g} must be an array of X, Y, Z values`)}),a.forEach((u,g)=>{if(u.length<3)throw new Error(`face ${g} must contain 3 or more indexes`);if(!n(u,u.length))throw new Error(`face ${g} must be an array of numbers`)}),c!=="outward"&&a.forEach(u=>u.reverse());const l=a.map((u,g)=>{const h=e.create(u.map(d=>s[d]));return A&&A[g]&&(h.color=A[g]),h});return t.create(l)},AYe}var cYe,Ben;function Lai(){if(Ben)return cYe;Ben=1;const t=Mu(),e=jr(),n=Ra(),o=Een(),{isGTE:i}=cf();return cYe=s=>{const a={radius:1,frequency:6};let{radius:A,frequency:c}=Object.assign({},a,s);if(!i(A,0))throw new Error("radius must be positive");if(!i(c,6))throw new Error("frequency must be six or more");if(A===0)return n.create();c=Math.floor(c/6);const l=[[.850651,0,-.525731],[.850651,-0,.525731],[-.850651,-0,.525731],[-.850651,0,-.525731],[0,-.525731,.850651],[0,.525731,.850651],[0,.525731,-.850651],[0,-.525731,-.850651],[-.525731,-.850651,-0],[.525731,-.850651,-0],[.525731,.850651,0],[-.525731,.850651,0]],u=[[0,9,1],[1,10,0],[6,7,0],[10,6,0],[7,9,0],[5,1,4],[4,1,9],[5,10,1],[2,8,3],[3,11,2],[2,5,4],[4,8,2],[2,11,5],[3,7,6],[6,11,3],[8,7,3],[9,8,4],[11,10,5],[10,11,6],[8,9,7]],g=(f,I,C)=>{const y=f[0],x=f[1],E=f[2];let B=C;const S=[],Q=[];for(let w=0;w<I;w++)for(let M=0;M<I-w;M++){const k=w/I,R=(w+1)/I,F=M/(I-w),O=(M+1)/(I-w),U=I-w-1?M/(I-w-1):1,Y=[];Y[0]=h(h(y,x,F),E,k),Y[1]=h(h(y,x,O),E,k),Y[2]=h(h(y,x,U),E,R);for(let W=0;W<3;W++){const te=e.length(Y[W]);for(let j=0;j<3;j++)Y[W][j]/=te}if(S.push(Y[0],Y[1],Y[2]),Q.push([B,B+1,B+2]),B+=3,M<I-w-1){const W=I-w-1?(M+1)/(I-w-1):1;Y[0]=h(h(y,x,O),E,k),Y[1]=h(h(y,x,W),E,R),Y[2]=h(h(y,x,U),E,R);for(let te=0;te<3;te++){const j=e.length(Y[te]);for(let J=0;J<3;J++)Y[te][J]/=j}S.push(Y[0],Y[1],Y[2]),Q.push([B,B+1,B+2]),B+=3}}return{points:S,triangles:Q,offset:B}},h=(f,I,C)=>{const y=1-C,x=[];for(let E=0;E<3;E++)x[E]=f[E]*y+I[E]*C;return x};let d=[],p=[],m=0;for(let f=0;f<u.length;f++){const I=g([l[u[f][0]],l[u[f][1]],l[u[f][2]]],c,m);d=d.concat(I.points),p=p.concat(I.triangles),m=I.offset}let _=o({points:d,faces:p,orientation:"inward"});return A!==1&&(_=n.transform(t.fromScaling(t.create(),[A,A,A]),_)),_},cYe}var lYe,ben;function Hai(){if(ben)return lYe;ben=1;const t=au();return lYe=n=>{if(!Array.isArray(n))throw new Error("points must be an array");return t.fromPoints({},n)},lYe}var uYe,Sen;function Oai(){if(Sen)return uYe;Sen=1;const t=Ga();return uYe=n=>{const o={points:[],paths:[],orientation:"counterclockwise"},{points:i,paths:r,orientation:s}=Object.assign({},o,n);if(!(Array.isArray(i)&&Array.isArray(r)))throw new Error("points and paths must be arrays");let a=i;Array.isArray(i[0])&&(Array.isArray(i[0][0])||(a=[i])),a.forEach((g,h)=>{if(!Array.isArray(g))throw new Error("list of points "+h+" must be an array");if(g.length<3)throw new Error("list of points "+h+" must contain three or more points");g.forEach((d,p)=>{if(!Array.isArray(d))throw new Error("list of points "+h+", point "+p+" must be an array");if(d.length<2)throw new Error("list of points "+h+", point "+p+" must contain by X and Y values")})});let A=r;if(r.length===0){let g=0;A=a.map(h=>h.map(d=>g++))}const c=[];a.forEach(g=>g.forEach(h=>c.push(h)));let l=[];A.forEach(g=>{const h=g.map(p=>c[p]),d=t.fromPoints(h);l=l.concat(t.toSides(d))});let u=t.create(l);return s==="clockwise"&&(u=t.reverse(u)),u},uYe}var gYe,Qen;function dYe(){if(Qen)return gYe;Qen=1;const t=mA(),e=Ga(),{isNumberArray:n}=cf();return gYe=i=>{const r={center:[0,0],size:[2,2]},{center:s,size:a}=Object.assign({},r,i);if(!n(s,2))throw new Error("center must be an array of X and Y values");if(!n(a,2))throw new Error("size must be an array of X and Y values");if(!a.every(u=>u>=0))throw new Error("size values must be positive");if(a[0]===0||a[1]===0)return e.create();const A=[a[0]/2,a[1]/2],c=[A[0],-A[1]],l=[t.subtract(t.create(),s,A),t.add(t.create(),s,c),t.add(t.create(),s,A),t.subtract(t.create(),s,c)];return e.fromPoints(l)},gYe}var hYe,ven;function Gai(){if(ven)return hYe;ven=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=jr(),i=Ra(),r=qA(),{sin:s,cos:a}=dI(),{isGTE:A,isNumberArray:c}=cf(),l=oYe(),u=(m,_,f,I,C,y)=>{const x=e/4*C/I,E=a(x),B=s(x),S=I-C;let Q=f*E,w=_[2]-(f-f*B);y||(w=f-f*B-_[2]),Q=Q>t?Q:0;const M=o.add(o.create(),m,[_[0]-f,_[1]-f,w]),k=o.add(o.create(),m,[f-_[0],_[1]-f,w]),R=o.add(o.create(),m,[f-_[0],f-_[1],w]),F=o.add(o.create(),m,[_[0]-f,f-_[1],w]),O=[],U=[],Y=[],W=[];for(let te=0;te<=S;te++){const j=S>0?e/4*te/S:0,J=n.fromAngleRadians(n.create(),j);n.scale(J,J,Q);const oe=o.fromVec2(o.create(),J);O.push(o.add(o.create(),M,oe)),o.rotateZ(oe,oe,[0,0,0],e/4),U.push(o.add(o.create(),k,oe)),o.rotateZ(oe,oe,[0,0,0],e/4),Y.push(o.add(o.create(),R,oe)),o.rotateZ(oe,oe,[0,0,0],e/4),W.push(o.add(o.create(),F,oe))}return y?[O,U,Y,W]:(O.reverse(),U.reverse(),Y.reverse(),W.reverse(),[W,Y,U,O])},g=(m,_)=>{const f=[];for(let I=0;I<m.length;I++){const C=m[I],y=_[I];for(let x=0;x<C.length-1;x++)f.push(r.create([C[x],C[x+1],y[x]])),x<y.length-1&&f.push(r.create([y[x],C[x+1],y[x+1]]))}return f},h=(m,_)=>{const f=[];for(let I=0;I<m.length;I++){let C=m[I],y=_[I];const x=C[C.length-1],E=y[y.length-1],B=(I+1)%m.length;C=m[B],y=_[B];const S=C[0],Q=y[0];f.push(r.create([x,S,Q,E]))}return f},d=(m,_)=>{m=[m[3],m[2],m[1],m[0]],m=m.map(y=>y.slice().reverse());const f=[];m.forEach(y=>{y.forEach(x=>f.push(x))});const I=[];_.forEach(y=>{y.forEach(x=>I.push(x))});const C=[];for(let y=0;y<I.length;y++){const x=(y+1)%I.length;C.push(r.create([f[y],f[x],I[x],I[y]]))}return C};return hYe=m=>{const _={center:[0,0,0],size:[2,2,2],roundRadius:.2,segments:32};let{center:f,size:I,roundRadius:C,segments:y}=Object.assign({},_,m);if(!c(f,3))throw new Error("center must be an array of X, Y and Z values");if(!c(I,3))throw new Error("size must be an array of X, Y and Z values");if(!I.every(S=>S>=0))throw new Error("size values must be positive");if(!A(C,0))throw new Error("roundRadius must be positive");if(!A(y,4))throw new Error("segments must be four or more");if(I[0]===0||I[1]===0||I[2]===0)return i.create();if(C===0)return l({center:f,size:I});if(I=I.map(S=>S/2),C>I[0]-t||C>I[1]-t||C>I[2]-t)throw new Error("roundRadius must be smaller than the radius of all dimensions");y=Math.floor(y/4);let x=null,E=null,B=[];for(let S=0;S<=y;S++){const Q=u(f,I,C,y,S,!0),w=u(f,I,C,y,S,!1);if(S===0&&(B=B.concat(d(w,Q))),x&&(B=B.concat(g(x,Q),h(x,Q))),E&&(B=B.concat(g(E,w),h(E,w))),S===y){let M=Q.map(k=>k[0]);B.push(r.create(M)),M=w.map(k=>k[0]),B.push(r.create(M))}x=Q,E=w}return i.create(B)},hYe}var pYe,wen;function Yai(){if(wen)return pYe;wen=1;const{EPS:t,TAU:e}=pc(),n=jr(),o=Ra(),i=qA(),{sin:r,cos:s}=dI(),{isGTE:a,isNumberArray:A}=cf(),c=Ien();return pYe=u=>{const g={center:[0,0,0],height:2,radius:1,roundRadius:.2,segments:32},{center:h,height:d,radius:p,roundRadius:m,segments:_}=Object.assign({},g,u);if(!A(h,3))throw new Error("center must be an array of X, Y and Z values");if(!a(d,0))throw new Error("height must be positive");if(!a(p,0))throw new Error("radius must be positive");if(!a(m,0))throw new Error("roundRadius must be positive");if(m>p)throw new Error("roundRadius must be smaller than the radius");if(!a(_,4))throw new Error("segments must be four or more");if(d===0||p===0)return o.create();if(m===0)return c({center:h,height:d,radius:p});const f=[0,0,-(d/2)],I=[0,0,d/2],C=n.subtract(n.create(),I,f),y=n.length(C);if(2*m>y-t)throw new Error("height must be larger than twice roundRadius");let x;Math.abs(C[0])>Math.abs(C[1])?x=n.fromValues(0,1,0):x=n.fromValues(1,0,0);const E=n.scale(n.create(),n.normalize(n.create(),C),m),B=n.scale(n.create(),n.normalize(n.create(),n.cross(n.create(),E,x)),p),S=n.scale(n.create(),n.normalize(n.create(),n.cross(n.create(),B,E)),p);n.add(f,f,E),n.subtract(I,I,E);const Q=Math.floor(.25*_),w=U=>{const Y=U.map(W=>n.add(W,W,h));return i.create(Y)},M=[],k=n.create(),R=n.create();let F;for(let U=0;U<=_;U++){const Y=e*U/_,W=n.add(n.create(),n.scale(k,B,s(Y)),n.scale(R,S,r(Y)));if(U>0){let te=[];te.push(n.add(n.create(),f,W)),te.push(n.add(n.create(),f,F)),te.push(n.add(n.create(),I,F)),te.push(n.add(n.create(),I,W)),M.push(w(te));let j,J;for(let oe=0;oe<=Q;oe++){const ie=e/4*oe/Q,ne=s(ie),le=r(ie);if(oe>0){te=[];let ge;ge=n.add(n.create(),f,n.subtract(k,n.scale(k,F,j),n.scale(R,E,J))),te.push(ge),ge=n.add(n.create(),f,n.subtract(k,n.scale(k,W,j),n.scale(R,E,J))),te.push(ge),oe<Q&&(ge=n.add(n.create(),f,n.subtract(k,n.scale(k,W,ne),n.scale(R,E,le))),te.push(ge)),ge=n.add(n.create(),f,n.subtract(k,n.scale(k,F,ne),n.scale(R,E,le))),te.push(ge),M.push(w(te)),te=[],ge=n.add(n.create(),n.scale(k,F,j),n.scale(R,E,J)),n.add(ge,ge,I),te.push(ge),ge=n.add(n.create(),n.scale(k,W,j),n.scale(R,E,J)),n.add(ge,ge,I),te.push(ge),oe<Q&&(ge=n.add(n.create(),n.scale(k,W,ne),n.scale(R,E,le)),n.add(ge,ge,I),te.push(ge)),ge=n.add(n.create(),n.scale(k,F,ne),n.scale(R,E,le)),n.add(ge,ge,I),te.push(ge),te.reverse(),M.push(w(te))}j=ne,J=le}}F=W}return o.create(M)},pYe}var mYe,Pen;function Uai(){if(Pen)return mYe;Pen=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=Ga(),{isGTE:i,isNumberArray:r}=cf(),s=dYe();return mYe=A=>{const c={center:[0,0],size:[2,2],roundRadius:.2,segments:32};let{center:l,size:u,roundRadius:g,segments:h}=Object.assign({},c,A);if(!r(l,2))throw new Error("center must be an array of X and Y values");if(!r(u,2))throw new Error("size must be an array of X and Y values");if(!u.every(E=>E>=0))throw new Error("size values must be positive");if(!i(g,0))throw new Error("roundRadius must be positive");if(!i(h,4))throw new Error("segments must be four or more");if(u[0]===0||u[1]===0)return o.create();if(g===0)return s({center:l,size:u});if(u=u.map(E=>E/2),g>u[0]-t||g>u[1]-t)throw new Error("roundRadius must be smaller than the radius of all dimensions");const d=Math.floor(h/4),p=n.add(n.create(),l,[u[0]-g,u[1]-g]),m=n.add(n.create(),l,[g-u[0],u[1]-g]),_=n.add(n.create(),l,[g-u[0],g-u[1]]),f=n.add(n.create(),l,[u[0]-g,g-u[1]]),I=[],C=[],y=[],x=[];for(let E=0;E<=d;E++){const B=e/4*E/d,S=n.fromAngleRadians(n.create(),B);n.scale(S,S,g),I.push(n.add(n.create(),p,S)),n.rotate(S,S,n.create(),e/4),C.push(n.add(n.create(),m,S)),n.rotate(S,S,n.create(),e/4),y.push(n.add(n.create(),_,S)),n.rotate(S,S,n.create(),e/4),x.push(n.add(n.create(),f,S))}return o.fromPoints(I.concat(C,y,x))},mYe}var _Ye,Men;function Den(){if(Men)return _Ye;Men=1;const t=yen(),{isGTE:e}=cf();return _Ye=o=>{const i={center:[0,0,0],radius:1,segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]};let{center:r,radius:s,segments:a,axes:A}=Object.assign({},i,o);if(!e(s,0))throw new Error("radius must be positive");return s=[s,s,s],t({center:r,radius:s,segments:a,axes:A})},_Ye}var fYe,Nen;function Kai(){if(Nen)return fYe;Nen=1;const t=dYe(),{isGTE:e}=cf();return fYe=o=>{const i={center:[0,0],size:2};let{center:r,size:s}=Object.assign({},i,o);if(!e(s,0))throw new Error("size must be positive");return s=[s,s],t({center:r,size:s})},fYe}var IYe,Ren;function Vai(){if(Ren)return IYe;Ren=1;const{TAU:t}=pc(),e=mA(),n=Ga(),{isGT:o,isGTE:i,isNumberArray:r}=cf(),s=(c,l)=>c>0&&l>1&&l<c/2?Math.cos(Math.PI*l/c)/Math.cos(Math.PI*(l-1)/c):0,a=(c,l,u,g)=>{const h=t/c,d=[];for(let p=0;p<c;p++){const m=e.fromAngleRadians(e.create(),h*p+u);e.scale(m,m,l),e.add(m,g,m),d.push(m)}return d};return IYe=c=>{const l={center:[0,0],vertices:5,outerRadius:1,innerRadius:0,density:2,startAngle:0};let{center:u,vertices:g,outerRadius:h,innerRadius:d,density:p,startAngle:m}=Object.assign({},l,c);if(!r(u,2))throw new Error("center must be an array of X and Y values");if(!i(g,2))throw new Error("vertices must be two or more");if(!o(h,0))throw new Error("outerRadius must be greater than zero");if(!i(d,0))throw new Error("innerRadius must be greater than zero");if(!i(m,0))throw new Error("startAngle must be greater than zero");if(g=Math.floor(g),p=Math.floor(p),m=m%t,d===0){if(!i(p,2))throw new Error("density must be two or more");d=h*s(g,p)}const _=e.clone(u),f=a(g,h,m,_),I=a(g,d,m+Math.PI/g,_),C=[];for(let y=0;y<g;y++)C.push(f[y]),C.push(I[y]);return n.fromPoints(C)},IYe}var CYe,Ten;function mX(){if(Ten)return CYe;Ten=1;const t=la(),e=Mu(),n=E6(),o=Ga(),i=Ra(),r=au(),s=(l,...u)=>{const g={origin:[0,0,0],normal:[0,0,1]},{origin:h,normal:d}=Object.assign({},g,l);if(u=t(u),u.length===0)throw new Error("wrong number of arguments");const p=n.fromNormalAndPoint(n.create(),d,h);if(Number.isNaN(p[0]))throw new Error("the given origin and normal do not define a proper plane");const m=e.mirrorByPlane(e.create(),p),_=u.map(f=>r.isA(f)?r.transform(m,f):o.isA(f)?o.transform(m,f):i.isA(f)?i.transform(m,f):f);return _.length===1?_[0]:_};return CYe={mirror:s,mirrorX:(...l)=>s({normal:[1,0,0]},l),mirrorY:(...l)=>s({normal:[0,1,0]},l),mirrorZ:(...l)=>s({normal:[0,0,1]},l)},CYe}var yYe,ken;function Fen(){if(ken)return yYe;ken=1;const t=E6(),e=jr();return yYe=o=>{const i=o.edges;if(i.length<3)throw new Error("slices must have 3 or more edges to calculate a plane");const r=i.reduce((c,l)=>e.add(e.create(),c,l[0]),e.create());e.scale(r,r,1/i.length);let s,a=0;i.forEach(c=>{if(!e.equals(c[0],c[1])){const l=e.squaredDistance(r,c[0]);l>a&&(s=c,a=l)}});const A=i.find(c=>e.equals(c[1],s[0]));return t.fromPoints(t.create(),A[0],s[0],s[1])},yYe}var xYe,Len;function tT(){return Len||(Len=1,xYe=e=>(e||(e=[]),{edges:e})),xYe}var EYe,Hen;function zai(){if(Hen)return EYe;Hen=1;const t=tT(),e=jr();return EYe=(...o)=>{let i,r;return o.length===1?(i=t(),r=o[0]):(i=o[0],r=o[1]),i.edges=r.edges.map(s=>[e.clone(s[0]),e.clone(s[1])]),i},EYe}var BYe,Oen;function Jai(){if(Oen)return BYe;Oen=1;const t=jr();return BYe=(n,o)=>{const i=n.edges,r=o.edges;return i.length!==r.length?!1:i.reduce((a,A,c)=>{const l=r[c],u=t.squaredDistance(A[0],l[0]);return a&&u<Number.EPSILON},!0)},BYe}var bYe,Gen;function Wai(){if(Gen)return bYe;Gen=1;const t=jr(),e=tT();return bYe=o=>{if(!Array.isArray(o))throw new Error("the given points must be an array");if(o.length<3)throw new Error("the given points must contain THREE or more points");const i=[];let r=o[o.length-1];return o.forEach(s=>{s.length===2&&i.push([t.fromVec2(t.create(),r),t.fromVec2(t.create(),s)]),s.length===3&&i.push([r,s]),r=s}),e(i)},bYe}var SYe,Yen;function jai(){if(Yen)return SYe;Yen=1;const t=jr(),e=tT();return SYe=o=>{if(!Array.isArray(o))throw new Error("the given sides must be an array");const i=[];return o.forEach(r=>{i.push([t.fromVec2(t.create(),r[0]),t.fromVec2(t.create(),r[1])])}),e(i)},SYe}var QYe,Uen;function $ai(){return Uen||(Uen=1,QYe=e=>!!(e&&typeof e=="object"&&"edges"in e&&Array.isArray(e.edges))),QYe}var vYe,Ken;function qai(){if(Ken)return vYe;Ken=1;const t=tT();return vYe=(...n)=>{let o,i;return n.length===1?(o=t(),i=n[0]):(o=n[0],i=n[1]),o.edges=i.edges.map(r=>[r[1],r[0]]),o},vYe}var wYe,Ven;function Xai(){return Ven||(Ven=1,wYe=e=>e.edges),wYe}var PYe,zen;function Zai(){return zen||(zen=1,PYe=(e,n)=>{let o,i,r,s,a,A=1;do{i=e,e=null;let c=null;for(a=0;i;){a++,r=i;let l=0;for(o=0;o<A&&(l++,r=r.nextZ,!!r);o++);let u=A;for(;l>0||u>0&&r;)l!==0&&(u===0||!r||n(i)<=n(r))?(s=i,i=i.nextZ,l--):(s=r,r=r.nextZ,u--),c?c.nextZ=s:e=s,s.prevZ=c,c=s;i=r}c.nextZ=null,A*=2}while(a>1);return e}),PYe}var MYe,Jen;function Wen(){if(Jen)return MYe;Jen=1;const t=Zai();class e{constructor(r,s,a){this.i=r,this.x=s,this.y=a,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}}return MYe={Node:e,insertNode:(i,r,s,a)=>{const A=new e(i,r,s);return a?(A.next=a.next,A.prev=a,a.next.prev=A,a.next=A):(A.prev=A,A.next=A),A},removeNode:i=>{i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)},sortLinked:t},MYe}var DYe,jen;function NYe(){return jen||(jen=1,DYe={area:(n,o,i)=>(o.y-n.y)*(i.x-o.x)-(o.x-n.x)*(i.y-o.y),pointInTriangle:(n,o,i,r,s,a,A,c)=>(s-A)*(o-c)-(n-A)*(a-c)>=0&&(n-A)*(r-c)-(i-A)*(o-c)>=0&&(i-A)*(a-c)-(s-A)*(r-c)>=0}),DYe}var RYe,$en;function qen(){if($en)return RYe;$en=1;const{Node:t,insertNode:e,removeNode:n}=Wen(),{area:o}=NYe(),i=(m,_,f,I,C)=>{let y;if(C===d(m,_,f,I)>0)for(let x=_;x<f;x+=I)y=e(x,m[x],m[x+1],y);else for(let x=f-I;x>=_;x-=I)y=e(x,m[x],m[x+1],y);return y&&p(y,y.next)&&(n(y),y=y.next),y},r=(m,_)=>{if(!m)return m;_||(_=m);let f=m,I;do if(I=!1,!f.steiner&&(p(f,f.next)||o(f.prev,f,f.next)===0)){if(n(f),f=_=f.prev,f===f.next)break;I=!0}else f=f.next;while(I||f!==_);return _},s=(m,_,f)=>{let I=m;do{const C=I.prev,y=I.next.next;!p(C,y)&&g(C,I,I.next,y)&&A(C,y)&&A(y,C)&&(_.push(C.i/f),_.push(I.i/f),_.push(y.i/f),n(I),n(I.next),I=m=y),I=I.next}while(I!==m);return r(I)},a=(m,_)=>{let f=m;do{if(f.i!==m.i&&f.next.i!==m.i&&f.i!==_.i&&f.next.i!==_.i&&g(f,f.next,m,_))return!0;f=f.next}while(f!==m);return!1},A=(m,_)=>o(m.prev,m,m.next)<0?o(m,_,m.next)>=0&&o(m,m.prev,_)>=0:o(m,_,m.prev)<0||o(m,m.next,_)<0,c=(m,_)=>{let f=m,I=!1;const C=(m.x+_.x)/2,y=(m.y+_.y)/2;do f.y>y!=f.next.y>y&&f.next.y!==f.y&&C<(f.next.x-f.x)*(y-f.y)/(f.next.y-f.y)+f.x&&(I=!I),f=f.next;while(f!==m);return I},l=(m,_)=>{const f=new t(m.i,m.x,m.y),I=new t(_.i,_.x,_.y),C=m.next,y=_.prev;return m.next=_,_.prev=m,f.next=C,C.prev=f,I.next=f,f.prev=I,y.next=I,I.prev=y,I},u=(m,_)=>m.next.i!==_.i&&m.prev.i!==_.i&&!a(m,_)&&(A(m,_)&&A(_,m)&&c(m,_)&&(o(m.prev,m,_.prev)||o(m,_.prev,_))||p(m,_)&&o(m.prev,m,m.next)>0&&o(_.prev,_,_.next)>0),g=(m,_,f,I)=>{const C=Math.sign(o(m,_,f)),y=Math.sign(o(m,_,I)),x=Math.sign(o(f,I,m)),E=Math.sign(o(f,I,_));return!!(C!==y&&x!==E||C===0&&h(m,f,_)||y===0&&h(m,I,_)||x===0&&h(f,m,I)||E===0&&h(f,_,I))},h=(m,_,f)=>_.x<=Math.max(m.x,f.x)&&_.x>=Math.min(m.x,f.x)&&_.y<=Math.max(m.y,f.y)&&_.y>=Math.min(m.y,f.y),d=(m,_,f,I)=>{let C=0;for(let y=_,x=f-I;y<f;y+=I)C+=(m[x]-m[y])*(m[y+1]+m[x+1]),x=y;return C},p=(m,_)=>m.x===_.x&&m.y===_.y;return RYe={cureLocalIntersections:s,filterPoints:r,isValidDiagonal:u,linkedPolygon:i,locallyInside:A,splitPolygon:l},RYe}var TYe,Xen;function eAi(){if(Xen)return TYe;Xen=1;const{filterPoints:t,linkedPolygon:e,locallyInside:n,splitPolygon:o}=qen(),{area:i,pointInTriangle:r}=NYe(),s=(u,g,h,d)=>{const p=[];for(let m=0,_=g.length;m<_;m++){const f=g[m]*d,I=m<_-1?g[m+1]*d:u.length,C=e(u,f,I,d,!1);C===C.next&&(C.steiner=!0),p.push(l(C))}p.sort((m,_)=>m.x-_.x);for(let m=0;m<p.length;m++)h=a(p[m],h),h=t(h,h.next);return h},a=(u,g)=>{const h=A(u,g);if(!h)return g;const d=o(h,u),p=t(h,h.next);return t(d,d.next),g===h?p:g},A=(u,g)=>{let h=g;const d=u.x,p=u.y;let m=-1/0,_;do{if(p<=h.y&&p>=h.next.y&&h.next.y!==h.y){const x=h.x+(p-h.y)*(h.next.x-h.x)/(h.next.y-h.y);if(x<=d&&x>m){if(m=x,x===d){if(p===h.y)return h;if(p===h.next.y)return h.next}_=h.x<h.next.x?h:h.next}}h=h.next}while(h!==g);if(!_)return null;if(d===m)return _;const f=_,I=_.x,C=_.y;let y=1/0;h=_;do{if(d>=h.x&&h.x>=I&&d!==h.x&&r(p<C?d:m,p,I,C,p<C?m:d,p,h.x,h.y)){const x=Math.abs(p-h.y)/(d-h.x);n(h,u)&&(x<y||x===y&&(h.x>_.x||h.x===_.x&&c(_,h)))&&(_=h,y=x)}h=h.next}while(h!==f);return _},c=(u,g)=>i(u.prev,u,g.prev)<0&&i(g.next,u,u.next)<0,l=u=>{let g=u,h=u;do(g.x<h.x||g.x===h.x&&g.y<h.y)&&(h=g),g=g.next;while(g!==u);return h};return TYe=s,TYe}var kYe,Zen;function tAi(){if(Zen)return kYe;Zen=1;const t=eAi(),{removeNode:e,sortLinked:n}=Wen(),{cureLocalIntersections:o,filterPoints:i,isValidDiagonal:r,linkedPolygon:s,splitPolygon:a}=qen(),{area:A,pointInTriangle:c}=NYe(),l=(_,f,I=2)=>{const C=f&&f.length,y=C?f[0]*I:_.length;let x=s(_,0,y,I,!0);const E=[];if(!x||x.next===x.prev)return E;let B,S,Q,w,M;if(C&&(x=t(_,f,x,I)),_.length>80*I){B=Q=_[0],S=w=_[1];for(let k=I;k<y;k+=I){const R=_[k],F=_[k+1];R<B&&(B=R),F<S&&(S=F),R>Q&&(Q=R),F>w&&(w=F)}M=Math.max(Q-B,w-S),M=M!==0?1/M:0}return u(x,E,I,B,S,M),E},u=(_,f,I,C,y,x,E)=>{if(!_)return;!E&&x&&p(_,C,y,x);let B=_,S,Q;for(;_.prev!==_.next;){if(S=_.prev,Q=_.next,x?h(_,C,y,x):g(_)){f.push(S.i/I),f.push(_.i/I),f.push(Q.i/I),e(_),_=Q.next,B=Q.next;continue}if(_=Q,_===B){E?E===1?(_=o(i(_),f,I),u(_,f,I,C,y,x,2)):E===2&&d(_,f,I,C,y,x):u(i(_),f,I,C,y,x,1);break}}},g=_=>{const f=_.prev,I=_,C=_.next;if(A(f,I,C)>=0)return!1;let y=_.next.next;for(;y!==_.prev;){if(c(f.x,f.y,I.x,I.y,C.x,C.y,y.x,y.y)&&A(y.prev,y,y.next)>=0)return!1;y=y.next}return!0},h=(_,f,I,C)=>{const y=_.prev,x=_,E=_.next;if(A(y,x,E)>=0)return!1;const B=y.x<x.x?y.x<E.x?y.x:E.x:x.x<E.x?x.x:E.x,S=y.y<x.y?y.y<E.y?y.y:E.y:x.y<E.y?x.y:E.y,Q=y.x>x.x?y.x>E.x?y.x:E.x:x.x>E.x?x.x:E.x,w=y.y>x.y?y.y>E.y?y.y:E.y:x.y>E.y?x.y:E.y,M=m(B,S,f,I,C),k=m(Q,w,f,I,C);let R=_.prevZ,F=_.nextZ;for(;R&&R.z>=M&&F&&F.z<=k;){if(R!==_.prev&&R!==_.next&&c(y.x,y.y,x.x,x.y,E.x,E.y,R.x,R.y)&&A(R.prev,R,R.next)>=0||(R=R.prevZ,F!==_.prev&&F!==_.next&&c(y.x,y.y,x.x,x.y,E.x,E.y,F.x,F.y)&&A(F.prev,F,F.next)>=0))return!1;F=F.nextZ}for(;R&&R.z>=M;){if(R!==_.prev&&R!==_.next&&c(y.x,y.y,x.x,x.y,E.x,E.y,R.x,R.y)&&A(R.prev,R,R.next)>=0)return!1;R=R.prevZ}for(;F&&F.z<=k;){if(F!==_.prev&&F!==_.next&&c(y.x,y.y,x.x,x.y,E.x,E.y,F.x,F.y)&&A(F.prev,F,F.next)>=0)return!1;F=F.nextZ}return!0},d=(_,f,I,C,y,x)=>{let E=_;do{let B=E.next.next;for(;B!==E.prev;){if(E.i!==B.i&&r(E,B)){let S=a(E,B);E=i(E,E.next),S=i(S,S.next),u(E,f,I,C,y,x),u(S,f,I,C,y,x);return}B=B.next}E=E.next}while(E!==_)},p=(_,f,I,C)=>{let y=_;do y.z===null&&(y.z=m(y.x,y.y,f,I,C)),y.prevZ=y.prev,y.nextZ=y.next,y=y.next;while(y!==_);y.prevZ.nextZ=null,y.prevZ=null,n(y,x=>x.z)},m=(_,f,I,C,y)=>(_=32767*(_-I)*y,f=32767*(f-C)*y,_=(_|_<<8)&16711935,_=(_|_<<4)&252645135,_=(_|_<<2)&858993459,_=(_|_<<1)&1431655765,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,_|f<<1);return kYe=l,kYe}var FYe,etn;function nAi(){if(etn)return FYe;etn=1;const{area:t}=hX(),{toOutlines:e}=Ga(),{arePointsInside:n}=zOe(),o=r=>{const s=e(r),a=[],A=[];s.forEach((u,g)=>{const h=t(u);h<0?A.push(g):h>0&&a.push(g)});const c=[],l=[];return a.forEach((u,g)=>{const h=s[u];c[g]=[],A.forEach((d,p)=>{const m=s[d];n([m[0]],{vertices:h})&&(c[g].push(d),l[p]||(l[p]=[]),l[p].push(g))})}),A.forEach((u,g)=>{if(l[g]&&l[g].length>1){const h=i(l[g],d=>c[d].length);l[g].forEach((d,p)=>{p!==h&&(c[d]=c[d].filter(m=>m!==u))})}}),c.map((u,g)=>({solid:s[a[g]],holes:u.map(h=>s[h])}))},i=(r,s)=>{let a,A;return r.forEach((c,l)=>{const u=s(c);(A===void 0||u<A)&&(a=l,A=u)}),a};return FYe=o,FYe}var LYe,ttn;function oAi(){if(ttn)return LYe;ttn=1;const t=Ga(),e=E6(),n=mA(),o=jr(),i=Fen(),r=nAi();class s{constructor(A){this.plane=i(A);const c=o.orthogonal(o.create(),this.plane),l=o.cross(o.create(),this.plane,c);this.v=o.normalize(l,l),this.u=o.cross(o.create(),this.v,this.plane),this.basisMap=new Map;const u=A.edges.map(h=>h.map(d=>this.to2D(d))),g=t.create(u);this.roots=r(g)}to2D(A){const c=n.fromValues(o.dot(A,this.u),o.dot(A,this.v));return this.basisMap.set(c,A),c}to3D(A){const c=this.basisMap.get(A);if(c)return c;{console.log("Warning: point not in original slice");const l=o.scale(o.create(),this.u,A[0]),u=o.scale(o.create(),this.v,A[1]),g=o.scale(o.create(),e,e[3]),h=o.add(l,l,g);return o.add(u,u,h)}}}return LYe=s,LYe}var HYe,ntn;function iAi(){if(ntn)return HYe;ntn=1;const t=qA(),e=tAi(),n=oAi();return HYe=i=>{const r=new n(i),s=[];return r.roots.forEach(({solid:a,holes:A})=>{let c=a.length;const l=[];A.forEach((p,m)=>{l.push(c),c+=p.length});const u=[a,...A].flat(),g=u.flat(),h=p=>r.to3D(u[p]),d=e(g,l);for(let p=0;p<d.length;p+=3){const m=d.slice(p,p+3).map(h);s.push(t.fromPointsAndPlane(m,r.plane))}}),s},HYe}var OYe,otn;function rAi(){if(otn)return OYe;otn=1;const t=jr(),e=o=>o.reduce((i,r)=>i+=`[${t.toString(r[0])}, ${t.toString(r[1])}], `,"");return OYe=o=>`[${e(o.edges)}]`,OYe}var GYe,itn;function sAi(){if(itn)return GYe;itn=1;const t=jr(),e=tT();return GYe=(o,i)=>{const r=i.edges.map(s=>[t.transform(t.create(),s[0],o),t.transform(t.create(),s[1],o)]);return e(r)},GYe}var YYe,rtn;function bY(){return rtn||(rtn=1,YYe={calculatePlane:Fen(),clone:zai(),create:tT(),equals:Jai(),fromPoints:Wai(),fromSides:jai(),isA:$ai(),reverse:qai(),toEdges:Xai(),toPolygons:iAi(),toString:rAi(),transform:sAi()}),YYe}var UYe,stn;function aAi(){if(stn)return UYe;stn=1;const t=jr(),e=tT();return UYe=o=>{if(!o.edges)return o;let i=o.edges;const r=new Map,s=new Map;i=i.filter(c=>!t.equals(c[0],c[1])),i.forEach(c=>{const l=c[0].toString(),u=c[1].toString();r.set(l,c[0]),r.set(u,c[1]),s.set(l,(s.get(l)||0)+1),s.set(u,(s.get(u)||0)-1)});const a=[],A=[];return s.forEach((c,l)=>{c<0&&a.push(l),c>0&&A.push(l)}),a.forEach(c=>{const l=r.get(c);let u=1/0,g;A.forEach(h=>{const d=r.get(h),p=t.distance(l,d);p<u&&(u=p,g=d)}),console.warn(`slice.repair: repairing vertex gap ${l} to ${g} distance ${u}`),i=i.map(h=>h[0].toString()===c?[g,h[1]]:h[1].toString()===c?[h[0],g]:h)}),e(i)},UYe}var KYe,atn;function AAi(){if(atn)return KYe;atn=1;const{EPS:t}=pc(),e=jr(),n=qA(),o=bY(),i=(c,l)=>c===l?c:c<l?i(l,c):l===1?1:l===0?c:i(l,c%l),r=(c,l)=>c*l/i(c,l),s=(c,l)=>{const u=c/l.length;if(u===1)return l;const g=e.fromValues(u,u,u),h=e.create(),d=[];return l.forEach(p=>{e.subtract(h,p[1],p[0]),e.divide(h,h,g);let m=p[0];for(let _=1;_<=u;++_){const f=e.add(e.create(),m,h);d.push([m,f]),m=f}}),d},a=t*t/2*Math.sin(Math.PI/3);return KYe=(c,l)=>{let u=o.toEdges(c),g=o.toEdges(l);if(u.length!==g.length){const d=r(u.length,g.length);d!==u.length&&(u=s(d,u)),d!==g.length&&(g=s(d,g))}const h=[];return u.forEach((d,p)=>{const m=g[p],_=n.create([d[0],d[1],m[1]]),f=n.measureArea(_);Number.isFinite(f)&&f>a&&h.push(_);const I=n.create([d[0],m[1],m[0]]),C=n.measureArea(I);Number.isFinite(C)&&C>a&&h.push(I)}),h},KYe}var VYe,Atn;function Mhe(){if(Atn)return VYe;Atn=1;const t=Mu(),e=Ga(),n=Ra(),o=qA(),i=bY(),r=aAi(),s=AAi(),a=(c,l,u)=>{let g=null;return e.isA(u)&&(g=i.fromSides(e.toSides(u))),o.isA(u)&&(g=i.fromPoints(o.toPoints(u))),c===0||c===1?i.transform(t.fromTranslation(t.create(),[0,0,c]),g):null};return VYe=(c,l)=>{const u={numberOfSlices:2,capStart:!0,capEnd:!0,close:!1,repair:!0,callback:a},{numberOfSlices:g,capStart:h,capEnd:d,close:p,repair:m,callback:_}=Object.assign({},u,c);if(g<2)throw new Error("numberOfSlices must be 2 or more");m&&(l=r(l));const f=g-1;let I=null,C=null,y=null,x=[];for(let E=0;E<g;E++){const B=_(E/f,E,l);if(B){if(!i.isA(B))throw new Error("the callback function must return slice objects");if(i.toEdges(B).length===0)throw new Error("the callback function must return slices with one or more edges");if(y){const Q=s(y,B);for(let w=0;w<Q.length;w++)x.push(Q[w])}E===0&&(I=B),E===g-1&&(C=B),y=B}}if(d){const E=i.toPolygons(C);for(let B=0;B<E.length;B++)x.push(E[B])}if(h){const E=i.toPolygons(I).map(o.invert);for(let B=0;B<E.length;B++)x.push(E[B])}if(!h&&!d&&p&&!i.equals(C,I)){const E=s(C,I);for(let B=0;B<E.length;B++)x.push(E[B])}return n.create(x)},VYe}var zYe,ctn;function ltn(){if(ctn)return zYe;ctn=1;const{TAU:t}=pc(),e=Mu(),{mirrorX:n}=mX(),o=Ga(),i=bY(),r=Mhe();return zYe=(a,A)=>{const c={segments:12,startAngle:0,angle:t,overflow:"cap"};let{segments:l,startAngle:u,angle:g,overflow:h}=Object.assign({},c,a);if(l<3)throw new Error("segments must be greater then 3");u=Math.abs(u)>t?u%t:u,g=Math.abs(g)>t?g%t:g;let d=u+g;if(d=Math.abs(d)>t?d%t:d,d<u){const w=u;u=d,d=w}let p=d-u;if(p<=0&&(p=t),Math.abs(p)<t){const w=t/l;l=Math.floor(Math.abs(p)/w),Math.abs(p)>l*w&&l++}let m=o.toSides(A);if(m.length===0)throw new Error("the given geometry cannot be empty");const _=m.filter(w=>w[0][0]<0),f=m.filter(w=>w[0][0]>=0);_.length>0&&f.length>0&&h==="cap"&&(_.length>f.length?(m=m.map(w=>{let M=w[0],k=w[1];return M=[Math.min(M[0],0),M[1]],k=[Math.min(k[0],0),k[1]],[M,k]}),A=o.create(m),A=n(A)):f.length>=_.length&&(m=m.map(w=>{let M=w[0],k=w[1];return M=[Math.max(M[0],0),M[1]],k=[Math.max(k[0],0),k[1]],[M,k]}),A=o.create(m)));const C=p/l,y=Math.abs(p)<t,x=i.fromSides(o.toSides(A));i.reverse(x,x);const E=e.create(),B=e.fromXRotation(e.create(),t/4),S=e.create(),Q=(w,M,k)=>{let R=C*M+u;return p===t&&M===l&&(R=u),e.fromZRotation(S,R),e.multiply(E,S,B),i.transform(E,k)};return a={numberOfSlices:l+1,capStart:y,capEnd:y,close:!y,callback:Q},r(a,x)},zYe}var JYe,utn;function _X(){if(utn)return JYe;utn=1;const t=la(),e=Mu(),n=Ga(),o=Ra(),i=au(),r=(c,...l)=>{if(!Array.isArray(c))throw new Error("angles must be an array");if(l=t(l),l.length===0)throw new Error("wrong number of arguments");for(c=c.slice();c.length<3;)c.push(0);const u=c[2],g=c[1],h=c[0],d=e.fromTaitBryanRotation(e.create(),u,g,h),p=l.map(m=>i.isA(m)?i.transform(d,m):n.isA(m)?n.transform(d,m):o.isA(m)?o.transform(d,m):m);return p.length===1?p[0]:p};return JYe={rotate:r,rotateX:(c,...l)=>r([c,0,0],l),rotateY:(c,...l)=>r([0,c,0],l),rotateZ:(c,...l)=>r([0,0,c],l)},JYe}var WYe,gtn;function nT(){if(gtn)return WYe;gtn=1;const t=la(),e=Mu(),n=Ga(),o=Ra(),i=au(),r=(c,...l)=>{if(!Array.isArray(c))throw new Error("offset must be an array");if(l=t(l),l.length===0)throw new Error("wrong number of arguments");for(c=c.slice();c.length<3;)c.push(0);const u=e.fromTranslation(e.create(),c),g=l.map(h=>i.isA(h)?i.transform(u,h):n.isA(h)?n.transform(u,h):o.isA(h)?o.transform(u,h):h);return g.length===1?g[0]:g};return WYe={translate:r,translateX:(c,...l)=>r([c,0,0],l),translateY:(c,...l)=>r([0,c,0],l),translateZ:(c,...l)=>r([0,0,c],l)},WYe}var jYe,dtn;function cAi(){if(dtn)return jYe;dtn=1;const{TAU:t}=pc(),e=ltn(),{rotate:n}=_X(),{translate:o}=nT(),i=den(),{isGT:r,isGTE:s}=cf();return jYe=A=>{const c={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:t},{innerRadius:l,innerSegments:u,outerRadius:g,outerSegments:h,innerRotation:d,startAngle:p,outerRotation:m}=Object.assign({},c,A);if(!r(l,0))throw new Error("innerRadius must be greater than zero");if(!s(u,3))throw new Error("innerSegments must be three or more");if(!r(g,0))throw new Error("outerRadius must be greater than zero");if(!s(h,3))throw new Error("outerSegments must be three or more");if(!s(p,0))throw new Error("startAngle must be positive");if(!r(m,0))throw new Error("outerRotation must be greater than zero");if(l>=g)throw new Error("inner circle is too large to rotate about the outer circle");let _=i({radius:l,segments:u});return d!==0&&(_=n([0,0,d],_)),_=o([g,0],_),e({startAngle:p,angle:m,segments:h},_)},jYe}var $Ye,htn;function lAi(){if(htn)return $Ye;htn=1;const{NEPS:t}=pc(),e=mA(),n=Ga(),{isNumberArray:o}=cf(),i=(d,p,m)=>Math.acos((d*d+p*p-m*m)/(2*d*p)),r=(d,p,m)=>p>t?Math.sqrt(d*d+m*m-2*d*m*Math.cos(p)):Math.sqrt((d-m)*(d-m)+d*m*p*p*(1-p*p/12)),s=d=>{if(Math.abs(d[0]+d[1]+d[2]-Math.PI)>t)throw new Error("AAA triangles require angles that sum to PI");const m=d[0],_=d[1],f=Math.PI-m-_,I=1,C=I/Math.sin(f)*Math.sin(m),y=I/Math.sin(f)*Math.sin(_);return g(m,_,f,C,y,I)},a=d=>{const p=d[0],m=d[1],_=Math.PI+t-p-m;if(_<t)throw new Error("AAS triangles require angles that sum to PI");const f=d[2],I=f/Math.sin(p)*Math.sin(m),C=f/Math.sin(p)*Math.sin(_);return g(p,m,_,f,I,C)},A=d=>{const p=d[0],m=d[2],_=Math.PI+t-p-m;if(_<t)throw new Error("ASA triangles require angles that sum to PI");const f=d[1],I=f/Math.sin(_)*Math.sin(p),C=f/Math.sin(_)*Math.sin(m);return g(p,m,_,I,C,f)},c=d=>{const p=d[0],m=d[1],_=d[2],f=r(p,m,_),I=i(f,p,_),C=Math.PI-I-m;return g(I,m,C,_,f,p)},l=d=>{const p=d[0],m=d[1],_=d[2],f=Math.asin(m*Math.sin(_)/p),I=Math.PI-f-_,C=p/Math.sin(_)*Math.sin(I);return g(f,I,_,m,C,p)},u=d=>{const p=d[1],m=d[2],_=d[0];if(p+m<=_||m+_<=p||_+p<=m)throw new Error("SSS triangle is incorrect, as the longest side is longer than the sum of the other sides");const f=i(m,_,p),I=i(_,p,m),C=Math.PI-f-I;return g(f,I,C,p,m,_)},g=(d,p,m,_,f,I)=>{const C=e.fromValues(0,0),y=e.fromValues(I,0),x=e.fromValues(_,0);return e.add(x,e.rotate(x,x,[0,0],Math.PI-p),y),n.fromPoints([C,y,x])};return $Ye=d=>{const p={type:"SSS",values:[1,1,1]};let{type:m,values:_}=Object.assign({},p,d);if(typeof m!="string")throw new Error("triangle type must be a string");if(m=m.toUpperCase(),!((m[0]==="A"||m[0]==="S")&&(m[1]==="A"||m[1]==="S")&&(m[2]==="A"||m[2]==="S")))throw new Error("triangle type must contain three letters; A or S");if(!o(_,3))throw new Error("triangle values must contain three values");if(!_.every(f=>f>0))throw new Error("triangle values must be greater than zero");switch(m){case"AAA":return s(_);case"AAS":return a(_);case"ASA":return A(_);case"SAS":return c(_);case"SSA":return l(_);case"SSS":return u(_);default:throw new Error("invalid triangle type, try again")}},$Ye}var qYe,ptn;function uAi(){return ptn||(ptn=1,qYe={arc:kai(),circle:den(),cube:Fai(),cuboid:oYe(),cylinder:Ien(),cylinderElliptic:_en(),ellipse:uen(),ellipsoid:yen(),geodesicSphere:Lai(),line:Hai(),polygon:Oai(),polyhedron:Een(),rectangle:dYe(),roundedCuboid:Gai(),roundedCylinder:Yai(),roundedRectangle:Uai(),sphere:Den(),square:Kai(),star:Vai(),torus:cAi(),triangle:lAi()}),qYe}var XYe,mtn;function gAi(){return mtn||(mtn=1,XYe={height:14,32:[16],33:[10,5,21,5,7,void 0,5,2,4,1,5,0,6,1,5,2],34:[16,4,21,4,14,void 0,12,21,12,14],35:[21,11,25,4,-7,void 0,17,25,10,-7,void 0,4,12,18,12,void 0,3,6,17,6],36:[20,8,25,8,-4,void 0,12,25,12,-4,void 0,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],37:[24,21,21,3,0,void 0,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,void 0,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7],38:[26,23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2],39:[10,5,19,4,20,5,21,6,20,6,18,5,16,4,15],40:[14,11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7],41:[14,3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7],42:[16,8,21,8,9,void 0,3,18,13,12,void 0,13,18,3,12],43:[26,13,18,13,0,void 0,4,9,22,9],44:[10,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],45:[26,4,9,22,9],46:[10,5,2,4,1,5,0,6,1,5,2],47:[22,20,25,2,-7],48:[20,9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21],49:[20,6,17,8,18,11,21,11,0],50:[20,4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0],51:[20,5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],52:[20,13,21,3,7,18,7,void 0,13,21,13,0],53:[20,15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],54:[20,16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7],55:[20,17,21,7,0,void 0,3,21,17,21],56:[20,8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21],57:[20,16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3],58:[10,5,14,4,13,5,12,6,13,5,14,void 0,5,2,4,1,5,0,6,1,5,2],59:[10,5,14,4,13,5,12,6,13,5,14,void 0,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],60:[24,20,18,4,9,20,0],61:[26,4,12,22,12,void 0,4,6,22,6],62:[24,4,18,20,9,4,0],63:[18,3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,void 0,9,2,8,1,9,0,10,1,9,2],64:[27,18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,void 0,12,16,10,14,9,11,9,8,10,6,11,5,void 0,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,void 0,19,16,18,8,18,6,19,5],65:[18,9,21,1,0,void 0,9,21,17,0,void 0,4,7,14,7],66:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,void 0,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0],67:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5],68:[21,4,21,4,0,void 0,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0],69:[19,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11,void 0,4,0,17,0],70:[18,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11],71:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,void 0,13,8,18,8],72:[22,4,21,4,0,void 0,18,21,18,0,void 0,4,11,18,11],73:[8,4,21,4,0],74:[16,12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7],75:[21,4,21,4,0,void 0,18,21,4,7,void 0,9,12,18,0],76:[17,4,21,4,0,void 0,4,0,16,0],77:[24,4,21,4,0,void 0,4,21,12,0,void 0,20,21,12,0,void 0,20,21,20,0],78:[22,4,21,4,0,void 0,4,21,18,0,void 0,18,21,18,0],79:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21],80:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10],81:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,void 0,12,4,18,-2],82:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,void 0,11,11,18,0],83:[20,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],84:[16,8,21,8,0,void 0,1,21,15,21],85:[22,4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21],86:[18,1,21,9,0,void 0,17,21,9,0],87:[24,2,21,7,0,void 0,12,21,7,0,void 0,12,21,17,0,void 0,22,21,17,0],88:[20,3,21,17,0,void 0,17,21,3,0],89:[18,1,21,9,11,9,0,void 0,17,21,9,11],90:[20,17,21,3,0,void 0,3,21,17,21,void 0,3,0,17,0],91:[14,4,25,4,-7,void 0,5,25,5,-7,void 0,4,25,11,25,void 0,4,-7,11,-7],92:[14,0,21,14,-3],93:[14,9,25,9,-7,void 0,10,25,10,-7,void 0,3,25,10,25,void 0,3,-7,10,-7],94:[16,6,15,8,18,10,15,void 0,3,12,8,17,13,12,void 0,8,17,8,0],95:[16,0,-2,16,-2],96:[10,6,21,5,20,4,18,4,16,5,15,6,16,5,17],97:[19,15,14,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],98:[19,4,21,4,0,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],99:[18,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],100:[19,15,21,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],101:[18,3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],102:[12,10,21,8,21,6,20,5,17,5,0,void 0,2,14,9,14],103:[19,15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],104:[19,4,21,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],105:[8,3,21,4,20,5,21,4,22,3,21,void 0,4,14,4,0],106:[10,5,21,6,20,7,21,6,22,5,21,void 0,6,14,6,-3,5,-6,3,-7,1,-7],107:[17,4,21,4,0,void 0,14,14,4,4,void 0,8,8,15,0],108:[8,4,21,4,0],109:[30,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0,void 0,15,10,18,13,20,14,23,14,25,13,26,10,26,0],110:[19,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],111:[19,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14],112:[19,4,14,4,-7,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],113:[19,15,14,15,-7,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],114:[13,4,14,4,0,void 0,4,8,5,11,7,13,9,14,12,14],115:[17,14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3],116:[12,5,21,5,4,6,1,8,0,10,0,void 0,2,14,9,14],117:[19,4,14,4,4,5,1,7,0,10,0,12,1,15,4,void 0,15,14,15,0],118:[16,2,14,8,0,void 0,14,14,8,0],119:[22,3,14,7,0,void 0,11,14,7,0,void 0,11,14,15,0,void 0,19,14,15,0],120:[17,3,14,14,0,void 0,14,14,3,0],121:[16,2,14,8,0,void 0,14,14,8,0,6,-4,4,-6,2,-7,1,-7],122:[17,14,14,3,0,void 0,3,14,14,14,void 0,3,0,14,0],123:[14,9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,void 0,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,void 0,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7],124:[8,4,25,4,-7],125:[14,5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,void 0,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,void 0,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7],126:[24,3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,void 0,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]}),XYe}var ZYe,_tn;function ftn(){if(_tn)return ZYe;_tn=1;const e={xOffset:0,yOffset:0,input:"?",align:"left",font:gAi(),height:14,lineSpacing:2.142857142857143,letterSpacing:1,extrudeOffset:0};return ZYe=(o,i)=>{!i&&typeof o=="string"&&(o={input:o}),o=o||{};const r=Object.assign({},e,o);return r.input=i||r.input,r},ZYe}var eUe,Itn;function Ctn(){if(Itn)return eUe;Itn=1;const t=ftn();return eUe=(n,o)=>{const{xOffset:i,yOffset:r,input:s,font:a,height:A,extrudeOffset:c}=t(n,o);let l=s.charCodeAt(0);(!l||!a[l])&&(l=63);const u=[].concat(a[l]),g=(A-c)/a.height,h=c/2,d=u.shift()*g,p=[];let m=[];for(let _=0,f=u.length;_<f;_+=2){const I=g*u[_]+i,C=g*u[_+1]+r+h;if(u[_]!==void 0){m.push([I,C]);continue}p.push(m),m=[],_--}return m.length&&p.push(m),{width:d,height:A,segments:p}},eUe}var tUe,ytn;function dAi(){if(ytn)return tUe;ytn=1;const t=Ctn(),e=ftn(),n=(i,r)=>{const{x:s,y:a}=Object.assign({x:0,y:0},i||{}),A=r.segments;let c=null,l=null;for(let u=0,g=A.length;u<g;u++){c=A[u];for(let h=0,d=c.length;h<d;h++)l=c[h],c[h]=[l[0]+s,l[1]+a]}return r};return tUe=(i,r)=>{const{xOffset:s,yOffset:a,input:A,font:c,height:l,align:u,extrudeOffset:g,lineSpacing:h,letterSpacing:d}=e(i,r);let[p,m]=[s,a],_,f,I,C,y,x,E={width:0,segments:[]};const B=[];let S=[],Q=0;const w=p,M=()=>{B.push(E),Q=Math.max(Q,E.width),E={width:0,segments:[]}};for(_=0,f=A.length;_<f;_++){if(I=A[_],C=t({xOffset:p,yOffset:m,font:c,height:l,extrudeOffset:g},I),I===`
`){p=w,m-=C.height*h,M();continue}y=C.width*d,E.width+=y,p+=y,I!==" "&&(E.segments=E.segments.concat(C.segments))}for(E.segments.length&&M(),_=0,f=B.length;_<f;_++)E=B[_],Q>E.width&&(x=Q-E.width,u==="right"?E=n({x},E):u==="center"&&(E=n({x:x/2},E))),S=S.concat(E.segments);return S},tUe}var nUe,xtn;function hAi(){return xtn||(xtn=1,nUe={vectorChar:Ctn(),vectorText:dAi()}),nUe}var oUe,Etn;function fX(){if(Etn)return oUe;Etn=1;const t=Ga(),e=Ra(),n=au();return oUe=i=>{let r;for(const s of i){let a=0;if(t.isA(s)&&(a=1),e.isA(s)&&(a=2),n.isA(s)&&(a=3),r&&a!==r)return!1;r=a}return!0},oUe}var iUe,Btn;function pAi(){return Btn||(Btn=1,iUe=e=>e*.017453292519943295),iUe}var rUe,btn;function Stn(){return btn||(btn=1,rUe=(e,n)=>e-n),rUe}var sUe,Qtn;function mAi(){return Qtn||(Qtn=1,sUe=(e,n,o)=>{let i=0,r=e.length;for(;r>i;){const s=Math.floor((i+r)/2),a=e[s];o(n,a)>0?i=s+1:r=s}e.splice(i,0,n)}),sUe}var aUe,vtn;function _Ai(){if(vtn)return aUe;vtn=1;const{TAU:t}=pc();return aUe=(n,o,i)=>{const r=o>0?n*t/o:0,s=i>0?t/i:0;return Math.ceil(Math.max(r,s,4))},aUe}var AUe,wtn;function fAi(){return wtn||(wtn=1,AUe=e=>e*57.29577951308232),AUe}var cUe,Ptn;function Mtn(){return Ptn||(Ptn=1,cUe={areAllShapesTheSameType:fX(),degToRad:pAi(),flatten:la(),fnNumberSort:Stn(),insertSorted:mAi(),radiusToSegments:_Ai(),radToDeg:fAi()}),cUe}var lUe,Dtn;function uUe(){if(Dtn)return lUe;Dtn=1;const t=mA(),e=Ga(),n=(i,r)=>{if(r.vertices.length<4)return null;const s=[],a=r.vertices.filter((l,u)=>l[2]>0?(s.push(u),!0):!1);if(a.length!==2)throw new Error("Assertion failed: fromFakePolygon: not enough points found");const A=a.map(l=>{const u=Math.round(l[0]/i)*i+0,g=Math.round(l[1]/i)*i+0;return t.fromValues(u,g)});if(t.equals(A[0],A[1]))return null;const c=s[1]-s[0];if(c===1||c===3)c===1&&A.reverse();else throw new Error("Assertion failed: fromFakePolygon: unknown index ordering");return A};return lUe=(i,r)=>{const s=r.map(a=>n(i,a)).filter(a=>a!==null);return e.create(s)},lUe}var gUe,Ntn;function dUe(){if(Ntn)return gUe;Ntn=1;const t=jr(),e=Ga(),n=Ra(),o=qA(),i=(s,a,A)=>{const c=[t.fromVec2(t.create(),A[0],s),t.fromVec2(t.create(),A[1],s),t.fromVec2(t.create(),A[1],a),t.fromVec2(t.create(),A[0],a)];return o.create(c)};return gUe=(s,a)=>{const c=e.toSides(a).map(u=>i(s.z0,s.z1,u));return n.create(c)},gUe}var hUe,Rtn;function IAi(){if(Rtn)return hUe;Rtn=1;const t=Mu(),e=mA(),n=jr(),o=function(i,r){arguments.length<2&&(r=n.orthogonal(n.create(),i)),this.v=n.normalize(n.create(),n.cross(n.create(),i,r)),this.u=n.cross(n.create(),this.v,i),this.plane=i,this.planeorigin=n.scale(n.create(),i,i[3])};return o.prototype={getProjectionMatrix:function(){return t.fromValues(this.u[0],this.v[0],this.plane[0],0,this.u[1],this.v[1],this.plane[1],0,this.u[2],this.v[2],this.plane[2],0,0,0,-this.plane[3],1)},getInverseProjectionMatrix:function(){const i=n.scale(n.create(),this.plane,this.plane[3]);return t.fromValues(this.u[0],this.u[1],this.u[2],0,this.v[0],this.v[1],this.v[2],0,this.plane[0],this.plane[1],this.plane[2],0,i[0],i[1],i[2],1)},to2D:function(i){return e.fromValues(n.dot(i,this.u),n.dot(i,this.v))},to3D:function(i){const r=n.scale(n.create(),this.u,i[0]),s=n.scale(n.create(),this.v,i[1]),a=n.add(r,r,this.planeorigin);return n.add(s,s,a)}},hUe=o,hUe}var pUe,Ttn;function CAi(){if(Ttn)return pUe;Ttn=1;const{EPS:t}=pc(),e=IGe(),n=mA(),o=IAi(),i=pZt(),{insertSorted:r,fnNumberSort:s}=Mtn(),a=qA();return pUe=c=>{if(c.length<2)return c;const l=[],u=c.length,g=a.plane(c[0]),h=new o(g),d=[],p=[],m=new Map,_=new Map,f=new Map,I=10/t;for(let E=0;E<u;E++){const B=c[E];let S=[],Q=B.vertices.length,w=-1;if(Q>0){let M,k;for(let R=0;R<Q;R++){let F=h.to2D(B.vertices[R]);const O=Math.floor(F[1]*I);let U;f.has(O)?U=f.get(O):f.has(O+1)?U=f.get(O+1):f.has(O-1)?U=f.get(O-1):(U=F[1],f.set(O,F[1])),F=n.fromValues(F[0],U),S.push(F);const Y=F[1];(R===0||Y<M)&&(M=Y,w=R),(R===0||Y>k)&&(k=Y);let W=_.get(Y);W||(W={},_.set(Y,W)),W[E]=!0}if(M>=k)S=[],Q=0,w=-1;else{let R=m.get(M);R||(R=[],m.set(M,R)),R.push(E)}}S.reverse(),w=Q-w-1,d.push(S),p.push(w)}const C=[];_.forEach((E,B)=>C.push(B)),C.sort(s);let y=[],x=[];for(let E=0;E<C.length;E++){const B=[],S=C[E],Q=_.get(S);let w=0;for(let k=0;k<y.length;++k){const R=y[k],F=R.polygonindex;if(Q[F]){const O=d[F],U=O.length;let Y=R.leftvertexindex,W=R.rightvertexindex;for(;;){let j=Y+1;if(j>=U&&(j=0),O[j][1]!==S)break;Y=j}let te=W-1;if(te<0&&(te=U-1),O[te][1]===S&&(W=te),Y!==R.leftvertexindex&&Y===W)R._remove=!0,w++;else{R.leftvertexindex=Y,R.rightvertexindex=W,R.topleft=O[Y],R.topright=O[W];let j=Y+1;j>=U&&(j=0),R.bottomleft=O[j];let J=W-1;J<0&&(J=U-1),R.bottomright=O[J]}}}w>0&&(y=y.filter(k=>!k._remove));let M;if(E>=C.length-1)y=[],M=null;else{M=Number(C[E+1]);const k=.5*(S+M),R=m.get(S);for(const F in R){const O=R[F],U=d[O],Y=U.length,W=p[O];let te=W;for(;;){let ne=te+1;if(ne>=Y&&(ne=0),U[ne][1]!==S||ne===W)break;te=ne}let j=W;for(;;){let ne=j-1;if(ne<0&&(ne=Y-1),U[ne][1]!==S||ne===te)break;j=ne}let J=te+1;J>=Y&&(J=0);let oe=j-1;oe<0&&(oe=Y-1);const ie={polygonindex:O,leftvertexindex:te,rightvertexindex:j,topleft:U[te],topright:U[j],bottomleft:U[J],bottomright:U[oe]};r(y,ie,(ne,le)=>{const ge=i(ne.topleft,ne.bottomleft,k),_e=i(le.topleft,le.bottomleft,k);return ge>_e?1:ge<_e?-1:0})}}for(const k in y){const R=y[k];let F=i(R.topleft,R.bottomleft,S);const O=n.fromValues(F,S);F=i(R.topright,R.bottomright,S);const U=n.fromValues(F,S);F=i(R.topleft,R.bottomleft,M);const Y=n.fromValues(F,M);F=i(R.topright,R.bottomright,M);const W=n.fromValues(F,M),te={topleft:O,topright:U,bottomleft:Y,bottomright:W,leftline:e.fromPoints(e.create(),O,Y),rightline:e.fromPoints(e.create(),W,U)};if(B.length>0){const j=B[B.length-1],J=n.distance(te.topleft,j.topright),oe=n.distance(te.bottomleft,j.bottomright);J<t&&oe<t&&(te.topleft=j.topleft,te.leftline=j.leftline,te.bottomleft=j.bottomleft,B.splice(B.length-1,1))}B.push(te)}if(E>0){const k=new Set,R=new Set;for(let F=0;F<B.length;F++){const O=B[F];for(let U=0;U<x.length;U++)if(!R.has(U)){const Y=x[U];if(n.distance(Y.bottomleft,O.topleft)<t&&n.distance(Y.bottomright,O.topright)<t){R.add(U);const W=e.direction(O.leftline),te=e.direction(Y.leftline),j=W[0]-te[0],J=e.direction(O.rightline),oe=e.direction(Y.rightline),ie=J[0]-oe[0],ne=Math.abs(j)<t,le=Math.abs(ie)<t,ge=ne||j>=0,_e=le||ie>=0;ge&&_e&&(O.outpolygon=Y.outpolygon,O.leftlinecontinues=ne,O.rightlinecontinues=le,k.add(U));break}}}for(let F=0;F<x.length;F++)if(!k.has(F)){const O=x[F];O.outpolygon.rightpoints.push(O.bottomright),n.distance(O.bottomright,O.bottomleft)>t&&O.outpolygon.leftpoints.push(O.bottomleft),O.outpolygon.leftpoints.reverse();const Y=O.outpolygon.rightpoints.concat(O.outpolygon.leftpoints).map(te=>h.to3D(te)),W=a.fromPointsAndPlane(Y,g);W.vertices.length&&l.push(W)}}for(let k=0;k<B.length;k++){const R=B[k];R.outpolygon?(R.leftlinecontinues||R.outpolygon.leftpoints.push(R.topleft),R.rightlinecontinues||R.outpolygon.rightpoints.push(R.topright)):(R.outpolygon={leftpoints:[],rightpoints:[]},R.outpolygon.leftpoints.push(R.topleft),n.distance(R.topleft,R.topright)>t&&R.outpolygon.rightpoints.push(R.topright))}x=B}return l},pUe}var mUe,ktn;function IX(){if(ktn)return mUe;ktn=1;const t=Ra(),e=qA(),{NEPS:n}=pc(),o=CAi(),i=a=>{if(a.isRetesselated)return a;const A=t.toPolygons(a).map((g,h)=>({vertices:g.vertices,plane:e.plane(g),index:h})),c=r(A),l=[];c.forEach(g=>{if(Array.isArray(g)){const h=o(g);for(let d=0;d<h.length;d++)l.push(h[d])}else l.push(g)});const u=t.create(l);return u.isRetesselated=!0,u},r=a=>{let A=[a];const c=[];for(let u=3;u>=0;u--){const g=[],h=u===3?15e-9:n;A.forEach(d=>{d.sort(s(u,h));let p=0;for(let m=1;m<d.length;m++)d[m].plane[u]-d[p].plane[u]>h&&(m-p===1?c.push(d[p]):g.push(d.slice(p,m)),p=m);d.length-p===1?c.push(d[p]):g.push(d.slice(p))}),A=g}const l=[];return A.forEach(u=>{u[0]&&(l[u[0].index]=u)}),c.forEach(u=>{l[u.index]=u}),l},s=(a,A)=>(c,l)=>c.plane[a]-l.plane[a]>A?1:l.plane[a]-c.plane[a]>A?-1:0;return mUe=i,mUe}var _Ue,Ftn;function fUe(){if(Ftn)return _Ue;Ftn=1;const{EPS:t}=pc(),e=eT();return _Ue=(o,i)=>{if(o.polygons.length===0||i.polygons.length===0)return!1;const r=e(o),s=r[0],a=r[1],A=e(i),c=A[0],l=A[1];return!(c[0]-a[0]>t||s[0]-l[0]>t||c[1]-a[1]>t||s[1]-l[1]>t||c[2]-a[2]>t||s[2]-l[2]>t)},_Ue}var IUe,Ltn;function yAi(){if(Ltn)return IUe;Ltn=1;const t=E6(),e=qA();class n{constructor(i){this.plane=null,this.front=null,this.back=null,this.polygontreenodes=[],this.parent=i}invert(){const i=[this];let r;for(let s=0;s<i.length;s++){r=i[s],r.plane&&(r.plane=t.flip(t.create(),r.plane)),r.front&&i.push(r.front),r.back&&i.push(r.back);const a=r.front;r.front=r.back,r.back=a}}clipPolygons(i,r){let s={node:this,polygontreenodes:i},a;const A=[];do{if(a=s.node,i=s.polygontreenodes,a.plane){const c=a.plane,l=[],u=[],g=r?l:u,h=i.length;for(let p=0;p<h;p++){const m=i[p];m.isRemoved()||m.splitByPlane(c,g,l,u,l)}a.front&&u.length>0&&A.push({node:a.front,polygontreenodes:u});const d=l.length;if(a.back&&d>0)A.push({node:a.back,polygontreenodes:l});else for(let p=0;p<d;p++)l[p].remove()}s=A.pop()}while(s!==void 0)}clipTo(i,r){let s=this;const a=[];do s.polygontreenodes.length>0&&i.rootnode.clipPolygons(s.polygontreenodes,r),s.front&&a.push(s.front),s.back&&a.push(s.back),s=a.pop();while(s!==void 0)}addPolygonTreeNodes(i){let r={node:this,polygontreenodes:i};const s=[];do{const a=r.node,A=r.polygontreenodes;if(A.length===0){r=s.pop();continue}if(!a.plane){let g=0;g=Math.floor(A.length/2);const h=A[g].getPolygon();a.plane=e.plane(h)}const c=[],l=[],u=A.length;for(let g=0;g<u;++g)A[g].splitByPlane(a.plane,a.polygontreenodes,l,c,l);c.length>0&&(a.front||(a.front=new n(a)),u===c.length&&l.length===0?a.front.polygontreenodes=c:s.push({node:a.front,polygontreenodes:c})),l.length>0&&(a.back||(a.back=new n(a)),u===l.length&&c.length===0?a.back.polygontreenodes=l:s.push({node:a.back,polygontreenodes:l})),r=s.pop()}while(r!==void 0)}}return IUe=n,IUe}var CUe,Htn;function xAi(){if(Htn)return CUe;Htn=1;const t=jr();return CUe=(n,o,i)=>{const r=t.subtract(t.create(),i,o);let s=(n[3]-t.dot(n,o))/t.dot(n,r);return Number.isNaN(s)&&(s=0),s>1&&(s=1),s<0&&(s=0),t.scale(r,r,s),t.add(r,o,r),r},CUe}var yUe,Otn;function EAi(){if(Otn)return yUe;Otn=1;const{EPS:t}=pc(),e=E6(),n=jr(),o=qA(),i=xAi(),r=t*t,s=A=>{const c=[];let l=A[A.length-1];for(let u=0;u<A.length;u++){const g=A[u];n.squaredDistance(g,l)>=r&&c.push(g),l=g}return c};return yUe=(A,c)=>{const l={type:null,front:null,back:null},u=c.vertices,g=u.length,h=o.plane(c);if(e.equals(h,A))l.type=0;else{let d=!1,p=!1;const m=[],_=-t;for(let f=0;f<g;f++){const I=n.dot(A,u[f])-A[3],C=I<_;m.push(C),I>t&&(d=!0),I<_&&(p=!0)}if(!d&&!p){const f=n.dot(A,h);l.type=f>=0?0:1}else if(!p)l.type=2;else if(!d)l.type=3;else{l.type=4;const f=[],I=[];let C=m[0];for(let y=0;y<g;y++){const x=u[y];let E=y+1;E>=g&&(E=0);const B=m[E];if(C===B)C?I.push(x):f.push(x);else{const S=u[E],Q=i(A,x,S);C?(I.push(x),I.push(Q),f.push(Q)):(f.push(x),f.push(Q),I.push(Q))}C=B}if(f.length>=3){const y=s(f);y.length>=3&&(l.front=o.fromPointsAndPlane(y,h))}if(I.length>=3){const y=s(I);y.length>=3&&(l.back=o.fromPointsAndPlane(y,h))}}}return l},yUe}var xUe,Gtn;function BAi(){if(Gtn)return xUe;Gtn=1;const{EPS:t}=pc(),e=jr(),n=qA(),o=EAi();class i{constructor(s,a){this.parent=s,this.children=[],this.polygon=a,this.removed=!1}addPolygons(s){if(!this.isRootNode())throw new Error("Assertion failed");const a=this;s.forEach(A=>{a.addChild(A)})}remove(){this.removed||(this.removed=!0,this.polygon=null,this.parent.recursivelyInvalidatePolygon())}isRemoved(){return this.removed}isRootNode(){return!this.parent}invert(){if(!this.isRootNode())throw new Error("Assertion failed");this.invertSub()}getPolygon(){if(!this.polygon)throw new Error("Assertion failed");return this.polygon}getPolygons(s){if(this.isRootNode()&&this.children.length>0){const h=[];for(let d=0;d<this.children.length;d++)this.children[d].removed||h.push(this.children[d]);this.children=h}let a=[this];const A=[a];let c,l,u,g;for(c=0;c<A.length;++c)for(a=A[c],l=0,u=a.length;l<u;l++)g=a[l],g.polygon?s.push(g.polygon):g.children.length>0&&A.push(g.children)}splitByPlane(s,a,A,c,l){if(this.children.length){const u=[this.children];let g,h,d,p,m;for(g=0;g<u.length;g++)for(m=u[g],h=0,d=m.length;h<d;h++)p=m[h],p.children.length>0?u.push(p.children):p._splitByPlane(s,a,A,c,l)}else this._splitByPlane(s,a,A,c,l)}_splitByPlane(s,a,A,c,l){const u=this.polygon;if(u){const g=n.measureBoundingSphere(u),h=g[3]+t,d=g,p=e.dot(s,d)-s[3];if(p>h)c.push(this);else if(p<-h)l.push(this);else{const m=o(s,u);switch(m.type){case 0:a.push(this);break;case 1:A.push(this);break;case 2:c.push(this);break;case 3:l.push(this);break;case 4:if(m.front){const _=this.addChild(m.front);c.push(_)}if(m.back){const _=this.addChild(m.back);l.push(_)}break}}}}addChild(s){const a=new i(this,s);return this.children.push(a),a}invertSub(){let s=[this];const a=[s];let A,c,l,u;for(A=0;A<a.length;A++)for(s=a[A],c=0,l=s.length;c<l;c++)u=s[c],u.polygon&&(u.polygon=n.invert(u.polygon)),u.children.length>0&&a.push(u.children)}recursivelyInvalidatePolygon(){this.polygon=null,this.parent&&this.parent.recursivelyInvalidatePolygon()}clear(){let s=[this];const a=[s];for(let A=0;A<a.length;++A){s=a[A];const c=s.length;for(let l=0;l<c;l++){const u=s[l];u.polygon&&(u.polygon=null),u.parent&&(u.parent=null),u.children.length>0&&a.push(u.children),u.children=[]}}}toString(){let s="",a=[this];const A=[a];let c,l,u,g;for(c=0;c<A.length;++c){a=A[c];const h=" ".repeat(c);for(l=0,u=a.length;l<u;l++)g=a[l],s+=`${h}PolygonTreeNode (${g.isRootNode()}): ${g.children.length}`,g.polygon?s+=`
 ${h}polygon: ${g.polygon.vertices}
`:s+=`
`,g.children.length>0&&A.push(g.children)}return s}}return xUe=i,xUe}var EUe,Ytn;function bAi(){if(Ytn)return EUe;Ytn=1;const t=yAi(),e=BAi();class n{constructor(i){this.polygonTree=new e,this.rootnode=new t(null),i&&this.addPolygons(i)}invert(){this.polygonTree.invert(),this.rootnode.invert()}clipTo(i,r=!1){this.rootnode.clipTo(i,r)}allPolygons(){const i=[];return this.polygonTree.getPolygons(i),i}addPolygons(i){const r=new Array(i.length);for(let s=0;s<i.length;s++)r[s]=this.polygonTree.addChild(i[s]);this.rootnode.addPolygonTreeNodes(r)}clear(){this.polygonTree.clear()}toString(){return"Tree: "+this.polygonTree.toString("")}}return EUe=n,EUe}var BUe,Utn;function bUe(){return Utn||(Utn=1,BUe={Tree:bAi()}),BUe}var SUe,Ktn;function SAi(){if(Ktn)return SUe;Ktn=1;const t=Ra(),e=fUe(),{Tree:n}=bUe();return SUe=(i,r)=>{if(!e(i,r))return t.create();const s=new n(t.toPolygons(i)),a=new n(t.toPolygons(r));s.invert(),a.clipTo(s),a.invert(),s.clipTo(a),a.clipTo(s),s.addPolygons(a.allPolygons()),s.invert();const A=s.allPolygons();return t.create(A)},SUe}var QUe,Vtn;function ztn(){if(Vtn)return QUe;Vtn=1;const t=la(),e=IX(),n=SAi();return QUe=(...i)=>{i=t(i);let r=i.shift();return i.forEach(s=>{r=n(r,s)}),r=e(r),r},QUe}var vUe,Jtn;function QAi(){if(Jtn)return vUe;Jtn=1;const t=la(),e=Ra(),n=rP(),o=uUe(),i=dUe(),r=ztn();return vUe=(...a)=>{a=t(a);const A=a.map(u=>i({z0:-1,z1:1},u)),c=r(A),l=n(c);return o(l,e.toPolygons(c))},vUe}var wUe,Wtn;function vAi(){if(Wtn)return wUe;Wtn=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=QAi(),r=ztn();return wUe=(...a)=>{if(a=t(a),a.length===0)throw new Error("wrong number of arguments");if(!e(a))throw new Error("only intersect of the types are supported");const A=a[0];return n.isA(A)?i(a):o.isA(A)?r(a):A},wUe}var PUe,jtn;function MUe(){if(jtn)return PUe;jtn=1;const t=qA(),e=U$t();return PUe=o=>e(o,{skipTriangulation:!0}).map(s=>{const a=s.map(A=>o[A]);return t.create(a)}),PUe}var DUe,$tn;function qtn(){if($tn)return DUe;$tn=1;const t=Ra(),e=fUe(),{Tree:n}=bUe(),o=(r,s)=>{if(!e(r,s))return i(r,s);const a=new n(t.toPolygons(r)),A=new n(t.toPolygons(s));a.clipTo(A,!1),A.clipTo(a),A.invert(),A.clipTo(a),A.invert();const c=a.allPolygons().concat(A.allPolygons());return t.create(c)},i=(r,s)=>{let a=t.toPolygons(r);return a=a.concat(t.toPolygons(s)),t.create(a)};return DUe=o,DUe}var NUe,Xtn;function RUe(){if(Xtn)return NUe;Xtn=1;const t=la(),e=IX(),n=qtn();return NUe=(...i)=>{i=t(i);let r;for(r=1;r<i.length;r+=2)i.push(n(i[r-1],i[r]));let s=i[r-1];return s=e(s),s},NUe}var TUe,Ztn;function enn(){if(Ztn)return TUe;Ztn=1;const t=la(),e=Ra(),n=qA(),o=MUe(),i=RUe(),r=(...u)=>{if(u=t(u),u.length!==2)throw new Error("minkowskiSum requires exactly two geometries");const[g,h]=u;if(!e.isA(g)||!e.isA(h))throw new Error("minkowskiSum requires geom3 geometries");const d=e.isConvex(g),p=e.isConvex(h);if(d&&p)return c(g,h);if(!d&&p)return s(g,h);if(d&&!p)return s(h,g);throw new Error("minkowskiSum of two non-convex geometries is not yet supported")},s=(u,g)=>{const h=a(u);if(h.length===0)return e.create();const d=h.map(p=>c(p,g));return d.length===1?d[0]:i(d)},a=u=>{const g=e.toPolygons(u);if(g.length===0)return[];const h=[];for(let d=0;d<g.length;d++){const p=g[d],m=p.vertices;let _=0,f=0,I=0;for(let Q=0;Q<m.length;Q++)_+=m[Q][0],f+=m[Q][1],I+=m[Q][2];_/=m.length,f/=m.length,I/=m.length;const C=n.plane(p),y=C[0],x=C[1],E=C[2],B=.1,S=[_-y*B,f-x*B,I-E*B];for(let Q=1;Q<m.length-1;Q++){const w=m[0],M=m[Q],k=m[Q+1],R=A(S,w,M,k);h.push(e.create(R))}}return h},A=(u,g,h,d)=>[n.create([u,h,g]),n.create([u,g,d]),n.create([g,h,d]),n.create([h,u,d])],c=(u,g)=>{const h=l(u),d=l(g);if(h.length===0||d.length===0)return e.create();const p=[];for(let _=0;_<h.length;_++){const f=h[_];for(let I=0;I<d.length;I++){const C=d[I];p.push([f[0]+C[0],f[1]+C[1],f[2]+C[2]])}}const m=o(p);return e.create(m)},l=u=>{const g=new Set,h=[],d=e.toPolygons(u);for(let p=0;p<d.length;p++){const m=d[p].vertices;for(let _=0;_<m.length;_++){const f=m[_],I=`${f[0]},${f[1]},${f[2]}`;g.has(I)||(g.add(I),h.push(f))}}return h};return TUe=r,TUe}var kUe,tnn;function wAi(){if(tnn)return kUe;tnn=1;const t=jr(),e=rP(),n=Ra(),o=a=>a.sort((A,c)=>A-c).filter((A,c,l)=>!c||A!==l[c-1]),i=(a,A,c)=>{const l=`${A}`,u=a.get(l);u===void 0?a.set(l,[c]):u.push(c)},r=(a,A)=>{const c=`${A}`;return a.get(c)};return kUe=a=>{const A=e(a),c=n.toPolygons(a),l=c.length,u=new Map,g=t.create();c.forEach((_,f)=>{_.vertices.forEach(I=>{i(u,t.snap(g,I,A),f)})});const h=c.map(_=>{let f=[];return _.vertices.forEach(I=>{f=f.concat(r(u,t.snap(g,I,A)))}),{e:1,d:o(f)}});u.clear();let d=0;const p=h.length;for(let _=0;_<p;_++){const f=h[_];if(f.e>0){const I=new Array(l);I[_]=!0;do d=0,I.forEach((C,y)=>{const x=h[y];if(x.e>0){x.e=-1;for(let E=0;E<x.d.length;E++)I[x.d[E]]=!0;d++}});while(d>0);f.indexes=I}}const m=[];for(let _=0;_<p;_++)if(h[_].indexes){const f=[];h[_].indexes.forEach((I,C)=>f.push(c[C])),m.push(n.create(f))}return m},kUe}var FUe,nnn;function PAi(){if(nnn)return FUe;nnn=1;const t=la(),e=Ra(),n=wAi();return FUe=(...i)=>{if(i=t(i),i.length===0)throw new Error("wrong number of arguments");const r=i.map(s=>e.isA(s)?n(s):s);return r.length===1?r[0]:r},FUe}var LUe,onn;function MAi(){if(onn)return LUe;onn=1;const t=Ra(),e=fUe(),{Tree:n}=bUe();return LUe=(i,r)=>{if(!e(i,r))return t.clone(i);const s=new n(t.toPolygons(i)),a=new n(t.toPolygons(r));s.invert(),s.clipTo(a),a.clipTo(s,!0),s.addPolygons(a.allPolygons()),s.invert();const A=s.allPolygons();return t.create(A)},LUe}var HUe,inn;function rnn(){if(inn)return HUe;inn=1;const t=la(),e=IX(),n=MAi();return HUe=(...i)=>{i=t(i);let r=i.shift();return i.forEach(s=>{r=n(r,s)}),r=e(r),r},HUe}var OUe,snn;function DAi(){if(snn)return OUe;snn=1;const t=la(),e=Ra(),n=rP(),o=uUe(),i=dUe(),r=rnn();return OUe=(...a)=>{a=t(a);const A=a.map(u=>i({z0:-1,z1:1},u)),c=r(A),l=n(c);return o(l,e.toPolygons(c))},OUe}var GUe,ann;function NAi(){if(ann)return GUe;ann=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=DAi(),r=rnn();return GUe=(...a)=>{if(a=t(a),a.length===0)throw new Error("wrong number of arguments");if(!e(a))throw new Error("only subtract of the types are supported");const A=a[0];return n.isA(A)?i(a):o.isA(A)?r(a):A},GUe}var YUe,Ann;function cnn(){if(Ann)return YUe;Ann=1;const t=la(),e=Ra(),n=rP(),o=uUe(),i=dUe(),r=RUe();return YUe=(...a)=>{a=t(a);const A=a.map(u=>i({z0:-1,z1:1},u)),c=r(A),l=n(c);return o(l,e.toPolygons(c))},YUe}var UUe,lnn;function KUe(){if(lnn)return UUe;lnn=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=cnn(),r=RUe();return UUe=(...a)=>{if(a=t(a),a.length===0)throw new Error("wrong number of arguments");if(!e(a))throw new Error("only unions of the same type are supported");const A=a[0];return n.isA(A)?i(a):o.isA(A)?r(a):A},UUe}var VUe,unn;function RAi(){return unn||(unn=1,VUe={intersect:vAi(),minkowski:enn(),scission:PAi(),subtract:NAi(),union:KUe()}),VUe}var zUe,gnn;function Dhe(){if(gnn)return zUe;gnn=1;const{EPS:t,TAU:e}=pc(),n=_Zt(),o=IGe(),i=mA(),r=whe();return zUe=(a,A)=>{const c={delta:1,corners:"edge",closed:!1,segments:16};let{delta:l,corners:u,closed:g,segments:h}=Object.assign({},c,a);if(Math.abs(l)<t)return A;let d=a.closed?r(A):1;d===0&&(d=1);const p=d>0&&l>=0||d<0&&l<0;l=Math.abs(l);let m=null,_=[];const f=[],I=i.create(),C=A.length;for(let y=0;y<C;y++){const x=(y+1)%C,E=A[y],B=A[x];p?i.subtract(I,E,B):i.subtract(I,B,E),i.normal(I,I),i.normalize(I,I),i.scale(I,I,l);const S=i.add(i.create(),E,I),Q=i.add(i.create(),B,I),w=[S,Q];if(m!=null&&(g||!g&&x!==0)){const M=n(m[0],m[1],w[0],w[1]);M?(_.pop(),w[0]=M):f.push({c:E,s0:m,s1:w})}m=[S,Q],!(x===0&&!g)&&(_.push(w[0]),_.push(w[1]))}if(g&&m!=null){const y=_[0],x=_[1],E=n(m[0],m[1],y,x);if(E)_[0]=E,_.pop();else{const B=A[0],S=[y,x];f.push({c:B,s0:m,s1:S})}}if(u==="edge"){const y=new Map;_.forEach((B,S)=>y.set(B,S));const x=o.create(),E=o.create();f.forEach(B=>{o.fromPoints(x,B.s0[0],B.s0[1]),o.fromPoints(E,B.s1[0],B.s1[1]);const S=o.intersectPointOfLines(x,E);if(Number.isFinite(S[0])&&Number.isFinite(S[1])){const Q=B.s0[1],w=y.get(Q);_[w]=S,_[(w+1)%_.length]=void 0}else{const Q=B.s1[0],w=y.get(Q);_[w]=void 0}}),_=_.filter(B=>B!==void 0)}if(u==="round"){let y=Math.floor(h/4);const x=i.create();f.forEach(E=>{let B=i.angle(i.subtract(x,E.s1[0],E.c));if(B-=i.angle(i.subtract(x,E.s0[1],E.c)),p&&B<0&&(B=B+Math.PI,B<0&&(B=B+Math.PI)),!p&&B>0&&(B=B-Math.PI,B>0&&(B=B-Math.PI)),B!==0){y=Math.floor(h*(Math.abs(B)/e));const S=B/y,Q=i.angle(i.subtract(x,E.s0[1],E.c)),w=[];for(let M=1;M<y;M++){const k=Q+S*M,R=i.fromAngleRadians(i.create(),k);i.scale(R,R,l),i.add(R,R,E.c),w.push(R)}if(w.length>0){const M=E.s0[1];let k=_.findIndex(R=>i.equals(M,R));k=(k+1)%_.length,_.splice(k,0,...w)}}else{const S=E.s1[0],Q=_.findIndex(w=>i.equals(S,w));_.splice(Q,1)}})}return _},zUe}var JUe,dnn;function TAi(){if(dnn)return JUe;dnn=1;const t=Ga(),e=Dhe();return JUe=(o,i)=>{const r={delta:1,corners:"edge",segments:16},{delta:s,corners:a,segments:A}=Object.assign({},r,o);if(!(a==="edge"||a==="chamfer"||a==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');const u=t.toOutlines(i).map(g=>(o={delta:s,corners:a,closed:!0,segments:A},e(o,g))).reduce((g,h)=>g.concat(t.toSides(t.fromPoints(h))),[]);return t.create(u)},JUe}var WUe,hnn;function kAi(){if(hnn)return WUe;hnn=1;const t=Mu(),e=jr(),n=Ra(),o=qA();return WUe=(r,s)=>{e.dot(o.plane(s),r)>0&&(s=o.invert(s));const A=[s],c=o.transform(t.fromTranslation(t.create(),r),s),l=s.vertices.length;for(let u=0;u<l;u++){const g=u<l-1?u+1:0,h=o.create([s.vertices[u],c.vertices[u],c.vertices[g],s.vertices[g]]);A.push(h)}return A.push(o.invert(c)),n.create(A)},WUe}var jUe,pnn;function FAi(){if(pnn)return jUe;pnn=1;const{EPS:t,TAU:e}=pc(),n=Mu(),o=jr(),i=Stn(),r=Ra(),s=qA(),a=Den(),A=IX(),c=qtn(),l=kAi(),u=(p,m,_)=>{const f=m.toString();if(p.has(f))p.get(f)[1].push(_);else{const I=[m,[_]];p.set(f,I)}},g=(p,m,_)=>{const f=m[0].toString(),I=m[1].toString(),C=f<I?`${f},${I}`:`${I},${f}`;if(p.has(C))p.get(C)[1].push(_);else{const y=[m,[_]];p.set(C,y)}},h=(p,m)=>{p.findIndex(f=>f===m)<0&&p.push(m)};return jUe=(p,m)=>{const _={delta:1,segments:12},{delta:f,segments:I}=Object.assign({},_,p);let C=r.create();const y=new Map,x=new Map,E=o.create(),B=o.create();return r.toPolygons(m).forEach((Q,w)=>{const M=o.scale(o.create(),s.plane(Q),2*f),k=s.transform(n.fromTranslation(n.create(),o.scale(o.create(),M,-.5)),Q),R=l(M,k);C=c(C,R);const F=Q.vertices;for(let O=0;O<F.length;O++){u(y,F[O],s.plane(Q));const U=(O+1)%F.length,Y=[F[O],F[U]];g(x,Y,s.plane(Q))}}),x.forEach(Q=>{const w=Q[0],M=Q[1],k=w[0],R=w[1],F=o.subtract(o.create(),R,k);o.normalize(F,F);const O=M[0],U=o.cross(o.create(),O,F);let Y=[];for(let le=0;le<I;le++)h(Y,le*e/I);for(let le=0,ge=M.length;le<ge;le++){const _e=M[le],ue=o.dot(U,_e),fe=o.dot(O,_e);let pe=Math.atan2(ue,fe);pe<0&&(pe+=e),h(Y,pe),pe=Math.atan2(-ue,-fe),pe<0&&(pe+=e),h(Y,pe)}Y=Y.sort(i);const W=Y.length;let te,j;const J=[],oe=[],ie=[];for(let le=-1;le<W;le++){const ge=Y[le<0?le+W:le],_e=Math.sin(ge),ue=Math.cos(ge);o.scale(E,O,ue*f),o.scale(B,U,_e*f),o.add(E,E,B);const fe=o.add(o.create(),k,E),pe=o.add(o.create(),R,E);let ye=!1;if(le>=0&&o.distance(fe,te)<t&&(ye=!0),!ye){if(le>=0){J.push(fe),oe.push(pe);const Me=[j,pe,fe,te],ve=s.create(Me);ie.push(ve)}te=fe,j=pe}}oe.reverse(),ie.push(s.create(J)),ie.push(s.create(oe));const ne=r.create(ie);C=c(C,ne)}),y.forEach(Q=>{const w=Q[0],M=Q[1],k=M[0];let R=null,F=0;for(let W=1;W<M.length;W++){const te=M[W],j=o.cross(E,k,te),J=o.length(j);J>.05&&J>F&&(F=J,R=te)}R||(R=o.orthogonal(E,k));const O=o.cross(E,k,R);o.normalize(O,O);const U=o.cross(B,O,k),Y=a({center:[w[0],w[1],w[2]],radius:f,segments:I,axes:[k,O,U]});C=c(C,Y)}),A(C)},jUe}var $Ue,mnn;function LAi(){if(mnn)return $Ue;mnn=1;const t=Ra(),e=KUe(),n=FAi();return $Ue=(i,r)=>{const s={delta:1,corners:"round",segments:12},{delta:a,corners:A,segments:c}=Object.assign({},s,i);if(A!=="round")throw new Error('corners must be "round" for 3D geometries');if(t.toPolygons(r).length===0)throw new Error("the given geometry cannot be empty");i={delta:a,corners:A,segments:c};const u=n(i,r);return e(r,u)},$Ue}var qUe,_nn;function HAi(){if(_nn)return qUe;_nn=1;const t=whe(),e=mA(),n=Ga(),o=au(),i=Dhe(),r=A=>{let{external:c,internal:l}=A;t(c)<0?c=c.reverse():l=l.reverse();const u=o.fromPoints({closed:!0},c),g=o.fromPoints({closed:!0},l),h=n.toSides(n.fromPoints(o.toPoints(u))),d=n.toSides(n.fromPoints(o.toPoints(g)));return h.push(...d),n.create(h)},s=(A,c,l,u)=>{const{points:g,external:h,internal:d}=A,p=Math.floor(c/2),m=[],_=[];if(l==="round"&&p>0){const I=Math.PI/p,C=g[g.length-1],y=e.angle(e.subtract(e.create(),h[h.length-1],C)),x=g[0],E=e.angle(e.subtract(e.create(),d[0],x));for(let B=1;B<p;B++){let S=y+I*B,Q=e.fromAngleRadians(e.create(),S);e.scale(Q,Q,u),e.add(Q,Q,C),m.push(Q),S=E+I*B,Q=e.fromAngleRadians(e.create(),S),e.scale(Q,Q,u),e.add(Q,Q,x),_.push(Q)}}const f=[];return f.push(...h,...m,...d.reverse(),..._),n.fromPoints(f)};return qUe=(A,c)=>{A=Object.assign({},{delta:1,corners:"edge",segments:16},A);const{delta:u,corners:g,segments:h}=A;if(u<=0)throw new Error("the given delta must be positive for paths");if(!(g==="edge"||g==="chamfer"||g==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');const d=c.isClosed,p=o.toPoints(c);if(p.length===0)throw new Error("the given geometry cannot be empty");const m={points:p,external:i({delta:u,corners:g,segments:h,closed:d},p),internal:i({delta:-u,corners:g,segments:h,closed:d},p)};return c.isClosed?r(m):s(m,h,g,u)},qUe}var XUe,fnn;function ZUe(){if(fnn)return XUe;fnn=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=TAi(),r=LAi(),s=HAi();return XUe=(A,...c)=>{if(c=t(c),c.length===0)throw new Error("wrong number of arguments");const l=c.map(u=>o.isA(u)?s(A,u):e.isA(u)?i(A,u):n.isA(u)?r(A,u):u);return l.length===1?l[0]:l},XUe}var eKe,Inn;function OAi(){if(Inn)return eKe;Inn=1;const t=Ga(),e=zOe(),n=Dhe();return eKe=(i,r)=>{const s={delta:1,corners:"edge",segments:0},{delta:a,corners:A,segments:c}=Object.assign({},s,i);if(!(A==="edge"||A==="chamfer"||A==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');const l=t.toOutlines(r),g=l.map(h=>(i={delta:l.reduce((m,_)=>m+e.arePointsInside(h,e.create(_)),0)%2===0?a:-a,corners:A,closed:!0,segments:c},n(i,h))).reduce((h,d)=>h.concat(t.toSides(t.fromPoints(d))),[]);return t.create(g)},eKe}var tKe,Cnn;function GAi(){if(Cnn)return tKe;Cnn=1;const t=au(),e=Dhe();return tKe=(o,i)=>{const r={delta:1,corners:"edge",closed:i.isClosed,segments:16},{delta:s,corners:a,closed:A,segments:c}=Object.assign({},r,o);if(!(a==="edge"||a==="chamfer"||a==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');o={delta:s,corners:a,closed:A,segments:c};const l=e(o,t.toPoints(i));return t.fromPoints({closed:A},l)},tKe}var nKe,ynn;function YAi(){if(ynn)return nKe;ynn=1;const t=la(),e=Ga(),n=au(),o=OAi(),i=GAi();return nKe=(s,...a)=>{if(a=t(a),a.length===0)throw new Error("wrong number of arguments");const A=a.map(c=>n.isA(c)?i(s,c):e.isA(c)?o(s,c):c);return A.length===1?A[0]:A},nKe}var oKe,xnn;function UAi(){return xnn||(xnn=1,oKe={expand:ZUe(),offset:YAi()}),oKe}var iKe,Enn;function Nhe(){if(Enn)return iKe;Enn=1;const t=Mu(),e=jr(),n=Ga(),o=bY(),i=Mhe();return iKe=(s,a)=>{const A={offset:[0,0,1],twistAngle:0,twistSteps:12,repair:!0};let{offset:c,twistAngle:l,twistSteps:u,repair:g}=Object.assign({},A,s);if(u<1)throw new Error("twistSteps must be 1 or more");l===0&&(u=1);const h=e.clone(c),d=n.toSides(a);if(d.length===0)throw new Error("the given geometry cannot be empty");const p=o.fromSides(d);h[2]<0&&o.reverse(p,p);const m=t.create(),_=(f,I,C)=>{const y=I/u*l,x=e.scale(e.create(),h,I/u);return t.multiply(m,t.fromZRotation(m,y),t.fromTranslation(t.create(),x)),o.transform(m,C)};return s={numberOfSlices:u+1,capStart:!0,capEnd:!0,repair:g,callback:_},i(s,p)},iKe}var rKe,Bnn;function KAi(){if(Bnn)return rKe;Bnn=1;const t=Ga(),e=au(),n=Nhe();return rKe=(i,r)=>{if(!r.isClosed)throw new Error("extruded path must be closed");const s=e.toPoints(r),a=t.fromPoints(s);return n(i,a)},rKe}var sKe,bnn;function VAi(){if(bnn)return sKe;bnn=1;const t=la(),e=Ga(),n=au(),o=Nhe(),i=KAi();return sKe=(s,...a)=>{const A={height:1,twistAngle:0,twistSteps:1,repair:!0},{height:c,twistAngle:l,twistSteps:u,repair:g}=Object.assign({},A,s);if(a=t(a),a.length===0)throw new Error("wrong number of arguments");s={offset:[0,0,c],twistAngle:l,twistSteps:u,repair:g};const h=a.map(d=>n.isA(d)?i(s,d):e.isA(d)?o(s,d):d);return h.length===1?h[0]:h},sKe}var aKe,Snn;function zAi(){if(Snn)return aKe;Snn=1;const t=au(),e=ZUe(),n=Nhe();return aKe=(i,r)=>{const s={size:1,height:1},{size:a,height:A}=Object.assign({},s,i);if(i.delta=a,i.offset=[0,0,A],t.toPoints(r).length===0)throw new Error("the given geometry cannot be empty");const l=e(i,r);return n(i,l)},aKe}var AKe,Qnn;function JAi(){if(Qnn)return AKe;Qnn=1;const{area:t}=hX(),e=Ga(),n=au(),o=ZUe(),i=Nhe();return AKe=(s,a)=>{const A={size:1,height:1},{size:c,height:l}=Object.assign({},A,s);s.delta=c,s.offset=[0,0,l];const u=e.toOutlines(a);if(u.length===0)throw new Error("the given geometry cannot be empty");const h=u.map(p=>(t(p)<0&&p.reverse(),o(s,n.fromPoints({closed:!0},p)))).reduce((p,m)=>p.concat(e.toSides(m)),[]),d=e.create(h);return i(s,d)},AKe}var cKe,vnn;function WAi(){if(vnn)return cKe;vnn=1;const t=la(),e=Ga(),n=au(),o=zAi(),i=JAi();return cKe=(s,...a)=>{const A={size:1,height:1},{size:c,height:l}=Object.assign({},A,s);if(a=t(a),a.length===0)throw new Error("wrong number of arguments");if(c<=0)throw new Error("size must be positive");if(l<=0)throw new Error("height must be positive");const u=a.map(g=>n.isA(g)?o(s,g):e.isA(g)?i(s,g):g);return u.length===1?u[0]:u},cKe}var lKe,wnn;function jAi(){if(wnn)return lKe;wnn=1;const{TAU:t}=pc(),e=Mu(),n=Ga(),o=Mhe(),i=bY();return lKe=(s,a)=>{const A={angle:t,startAngle:0,pitch:10,height:0,endOffset:0,segmentsPerRotation:32};let{angle:c,startAngle:l,pitch:u,height:g,endOffset:h,segmentsPerRotation:d}=Object.assign({},A,s);if(g!=0&&(u=g/(c/t)),d<3)throw new Error("The number of segments per rotation needs to be at least 3.");const m=n.toSides(a);if(m.length===0)throw new Error("The given geometry cannot be empty");const _=m.filter(B=>B[0][0]>=0);let f=i.fromSides(m);_.length===0&&(f=i.reverse(f));const I=Math.round(d/t*Math.abs(c)),C=I>=2?I:2,y=e.create(),x=e.create(),E=(B,S,Q)=>{const w=l+c/C*S,M=h/C*S,k=(w-l)/t*u;return e.multiply(y,e.fromTranslation(e.create(),[M,0,k*Math.sign(c)]),e.fromXRotation(e.create(),-t/4*Math.sign(c))),e.multiply(x,e.fromZRotation(e.create(),w),y),i.transform(x,Q)};return o({numberOfSlices:C+1,callback:E},f)},lKe}var uKe,Pnn;function $Ai(){if(Pnn)return uKe;Pnn=1;const t=la(),e=AGe(),n=E6(),o=Mu(),i=Ga(),r=Ra(),s=qA(),a=rP(),A=cnn(),c=(u,g)=>{const h=n.fromNormalAndPoint(n.create(),u.axis,u.origin);if(Number.isNaN(h[0])||Number.isNaN(h[1])||Number.isNaN(h[2])||Number.isNaN(h[3]))throw new Error("project: invalid axis or origin");const d=a(g),p=d*d*Math.sqrt(3)/4;if(d===0)return i.create();const m=r.toPolygons(g);let _=[];for(let I=0;I<m.length;I++){const C=m[I].vertices.map(E=>n.projectionOfPoint(h,E)),y=s.create(C),x=s.plane(y);e(h,x)&&(s.measureArea(y)<p||_.push(y))}if(!e(h,[0,0,1])){const I=o.fromVectorRotation(o.create(),h,[0,0,1]);_=_.map(C=>s.transform(I,C))}_=_.sort((I,C)=>s.measureArea(C)-s.measureArea(I));const f=_.map(I=>i.fromPoints(I.vertices));return A(f)};return uKe=(u,...g)=>{const h={axis:[0,0,1],origin:[0,0,0]},{axis:d,origin:p}=Object.assign({},h,u);if(g=t(g),g.length===0)throw new Error("wrong number of arguments");u={axis:d,origin:p};const m=g.map(_=>r.isA(_)?c(u,_):_);return m.length===1?m[0]:m},uKe}var gKe,Mnn;function qAi(){return Mnn||(Mnn=1,gKe={extrudeFromSlices:Mhe(),extrudeLinear:VAi(),extrudeRectangular:WAi(),extrudeRotate:ltn(),extrudeHelical:jAi(),project:$Ai(),slice:bY()}),gKe}var dKe,Dnn;function hKe(){if(Dnn)return dKe;Dnn=1;const t=mA(),e=i=>{let r=t.fromValues(1/0,1/0);i.forEach(A=>{(A[1]<r[1]||A[1]===r[1]&&A[0]<r[0])&&(r=A)});const s=[];i.forEach(A=>{const c=o(A[1]-r[1],A[0]-r[0]),l=t.squaredDistance(A,r);s.push({point:A,angle:c,distSq:l})}),s.sort((A,c)=>A.angle!==c.angle?A.angle-c.angle:A.distSq-c.distSq);const a=[];return s.forEach(A=>{let c=a.length;for(;c>1&&n(a[c-2],a[c-1],A.point)<=Number.EPSILON;)a.pop(),c=a.length;a.push(A.point)}),a},n=(i,r,s)=>(r[0]-i[0])*(s[1]-i[1])-(r[1]-i[1])*(s[0]-i[0]),o=(i,r)=>i===0&&r===0?-1/0:-r/i;return dKe=e,dKe}var pKe,Nnn;function mKe(){if(Nnn)return pKe;Nnn=1;const t=Ga(),e=Ra(),n=au();return pKe=i=>{const r=new Set,s=[],a=A=>{const c=A.toString();r.has(c)||(s.push(A),r.add(c))};return i.forEach(A=>{t.isA(A)?t.toPoints(A).forEach(a):e.isA(A)?e.toPoints(A).forEach(c=>c.forEach(a)):n.isA(A)&&n.toPoints(A).forEach(a)}),s},pKe}var _Ke,Rnn;function XAi(){if(Rnn)return _Ke;Rnn=1;const t=la(),e=au(),n=hKe(),o=mKe();return _Ke=(...r)=>{r=t(r);const s=o(r),a=n(s);return e.fromPoints({closed:!0},a)},_Ke}var fKe,Tnn;function ZAi(){if(Tnn)return fKe;Tnn=1;const t=la(),e=Ga(),n=hKe(),o=mKe();return fKe=(...r)=>{r=t(r);const s=o(r),a=n(s);return a.length<3?e.create():e.fromPoints(a)},fKe}var IKe,knn;function eci(){if(knn)return IKe;knn=1;const t=la(),e=Ra(),n=mKe(),o=MUe();return IKe=(...r)=>{r=t(r);const s=n(r);return s.length===0?e.create():e.create(o(s))},IKe}var CKe,Fnn;function Lnn(){if(Fnn)return CKe;Fnn=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=au(),r=XAi(),s=ZAi(),a=eci();return CKe=(...c)=>{if(c=t(c),c.length===0)throw new Error("wrong number of arguments");if(!e(c))throw new Error("only hulls of the same type are supported");const l=c[0];return i.isA(l)?r(c):n.isA(l)?s(c):o.isA(l)?a(c):l},CKe}var yKe,Hnn;function tci(){if(Hnn)return yKe;Hnn=1;const t=la(),e=KUe(),n=Lnn();return yKe=(...i)=>{if(i=t(i),i.length<2)throw new Error("wrong number of arguments");const r=[];for(let s=1;s<i.length;s++)r.push(n(i[s-1],i[s]));return e(r)},yKe}var xKe,Onn;function nci(){return Onn||(Onn=1,xKe={hull:Lnn(),hullChain:tci(),hullPoints2:hKe(),hullPoints3:MUe()}),xKe}var EKe,Gnn;function oci(){return Gnn||(Gnn=1,EKe={minkowskiSum:enn()}),EKe}var BKe,Ynn;function Unn(){if(Ynn)return BKe;Ynn=1;const t=jr(),e=qA(),n=(i,r)=>{const s=Math.abs(e.measureArea(r));return Number.isFinite(s)&&s>i};return BKe=(i,r)=>{let s=r.map(A=>{const c=A.vertices.map(g=>t.snap(t.create(),g,i)),l=[];for(let g=0;g<c.length;g++){const h=(g+1)%c.length;t.equals(c[g],c[h])||l.push(c[g])}const u=e.create(l);return A.color&&(u.color=A.color),u});const a=i*i*Math.sqrt(3)/4;return s=s.filter(A=>n(a,A)),s},BKe}var bKe,Knn;function ici(){if(Knn)return bKe;Knn=1;const t=AGe(),e=jr(),n=qA(),o=p=>{const m=n.toPoints(p),_=[];for(let f=0;f<m.length;f++){const I=(f+1)%m.length,C={v1:m[f],v2:m[I]};_.push(C)}for(let f=0;f<_.length;f++){const I=(f+1)%m.length;_[f].next=_[I],_[I].prev=_[f]}return _},i=(p,m)=>{const _=`${m.v1}:${m.v2}`;p.set(_,m)},r=(p,m)=>{const _=`${m.v1}:${m.v2}`;p.delete(_)},s=(p,m)=>{const _=`${m.v2}:${m.v1}`;return p.get(_)},a=(p,m,_)=>{let f=p.prev.v1,I=p.prev.v2,C=m.next.v2;const y=l(f,I,C,_);f=m.prev.v1,I=m.prev.v2,C=p.next.v2;const x=l(f,I,C,_);return[y,x]},A=e.create(),c=e.create(),l=(p,m,_,f)=>{const I=e.subtract(A,m,p),C=e.subtract(c,_,m);return e.cross(I,I,C),e.dot(I,f)},u=p=>{let m;const _=[];for(;p.next;){const f=p.next;_.push(p.v1),p.v1=null,p.v2=null,p.next=null,p.prev=null,p=f}return _.length>0&&(m=n.create(_)),m},g=p=>{if(p.length<2)return p;const m=p[0].plane,_=p.slice(),f=new Map;for(;_.length>0;){const C=_.shift(),y=o(C);for(let x=0;x<y.length;x++){const E=y[x],B=s(f,E);if(B){const S=a(E,B,m);if(S[0]>=0&&S[1]>=0){const Q=B.next,w=E.next;E.prev.next=B.next,E.next.prev=B.prev,B.prev.next=E.next,B.next.prev=E.prev,E.v1=null,E.v2=null,E.next=null,E.prev=null,r(f,B),B.v1=null,B.v2=null,B.next=null,B.prev=null;const M=(k,R,F)=>{const O={v1:F.v1,v2:R.v2,next:R.next,prev:F.prev};F.prev.next=O,R.next.prev=O,r(k,R),R.v1=null,R.v2=null,R.next=null,R.prev=null,r(k,F),F.v1=null,F.v2=null,F.next=null,F.prev=null};S[0]===0&&M(f,Q,Q.prev),S[1]===0&&M(f,w,w.prev)}}else E.next&&i(f,E)}}const I=[];return f.forEach(C=>{const y=u(C);y&&I.push(y)}),f.clear(),I},h=(p,m)=>Math.abs(p[3]-m[3])<15e-8?t(p,m):!1;return bKe=(p,m)=>{const _=[];m.forEach(I=>{const C=_.find(y=>h(y[0],n.plane(I)));C?C[1].push(I):_.push([n.plane(I),[I]])});let f=[];return _.forEach(I=>{const C=I[1],y=g(C);f=f.concat(y)}),f},bKe}var SKe,Vnn;function rci(){if(Vnn)return SKe;Vnn=1;const t=pc(),e=jr(),n=qA(),o=a=>`${a}`,i=(a,A,c,l,u,g)=>{const h=o(l),d=o(u),p=`${h}/${d}`,m=`${d}/${h}`;if(a.has(m))return r(a,A,c,u,l,null),null;const _={vertex0:l,vertex1:u,polygonindex:g};return a.has(p)?a.get(p).push(_):a.set(p,[_]),A.has(h)?A.get(h).push(p):A.set(h,[p]),c.has(d)?c.get(d).push(p):c.set(d,[p]),p},r=(a,A,c,l,u,g)=>{const h=o(l),d=o(u),p=`${h}/${d}`;let m=-1;const _=a.get(p);for(let f=0;f<_.length;f++){const I=_[f];let C=o(I.vertex0);if(C===h&&(C=o(I.vertex1),C===d&&!(g!==null&&I.polygonindex!==g))){m=f;break}}_.splice(m,1),_.length===0&&a.delete(p),m=A.get(h).indexOf(p),A.get(h).splice(m,1),A.get(h).length===0&&A.delete(h),m=c.get(d).indexOf(p),c.get(d).splice(m,1),c.get(d).length===0&&c.delete(d)};return SKe=a=>{const A=new Map;for(let c=0;c<a.length;c++){const l=a[c],u=l.vertices.length;if(u>=3){let g=l.vertices[0],h=o(g);for(let d=0;d<u;d++){let p=d+1;p===u&&(p=0);const m=l.vertices[p],_=o(m),f=`${h}/${_}`,I=`${_}/${h}`;if(A.has(I)){const C=A.get(I);C.splice(-1,1),C.length===0&&A.delete(I)}else{const C={vertex0:g,vertex1:m,polygonindex:c};A.has(f)?A.get(f).push(C):A.set(f,[C])}g=m,h=_}}else console.warn("warning: invalid polygon found during insertTjunctions")}if(A.size>0){const c=new Map,l=new Map,u=new Map;for(const[h,d]of A)u.set(h,!0),d.forEach(p=>{const m=o(p.vertex0),_=o(p.vertex1);c.has(m)?c.get(m).push(h):c.set(m,[h]),l.has(_)?l.get(_).push(h):l.set(_,[h])});const g=a.slice(0);for(;A.size!==0;){for(const d of A.keys())u.set(d,!0);let h=!1;for(;;){const d=Array.from(u.keys());if(d.length===0)break;const p=d[0];let m=!0;if(A.has(p)){const f=A.get(p)[0];for(let I=0;I<2;I++){const C=I===0?f.vertex0:f.vertex1,y=I===0?f.vertex1:f.vertex0,x=o(C),E=o(y);let B=[];I===0?l.has(x)&&(B=l.get(x)):c.has(x)&&(B=c.get(x));for(let S=0;S<B.length;S++){const Q=B[S],w=A.get(Q)[0],M=I===0?w.vertex0:w.vertex1;if(I===0?w.vertex1:w.vertex0,o(M)===E){r(A,c,l,C,y,null),r(A,c,l,y,C,null),m=!1,I=2,h=!0;break}else{const R=C,F=y,O=M,U=e.subtract(e.create(),O,R),Y=e.dot(e.subtract(e.create(),F,R),U)/e.dot(U,U);if(Y>0&&Y<1){const W=e.scale(e.create(),U,Y);if(e.add(W,W,R),e.squaredDistance(W,F)<t.EPS*t.EPS){const j=w.polygonindex,J=g[j],oe=o(w.vertex1);let ie=-1;for(let ue=0;ue<J.vertices.length;ue++)if(o(J.vertices[ue])===oe){ie=ue;break}const ne=J.vertices.slice(0);ne.splice(ie,0,y);const le=n.create(ne);g[j]=le,r(A,c,l,w.vertex0,w.vertex1,j);const ge=i(A,c,l,w.vertex0,y,j),_e=i(A,c,l,y,w.vertex1,j);ge!==null&&u.set(ge,!0),_e!==null&&u.set(_e,!0),m=!1,I=2,h=!0;break}}}}}}m&&u.delete(p)}if(!h)break}a=g}return A.clear(),a},SKe}var QKe,znn;function sci(){if(znn)return QKe;znn=1;const t=jr(),e=qA(),n=(i,r,s)=>{const a=r.vertices.length;if(a>3){if(a>4){const l=[0,0,0];r.vertices.forEach(u=>t.add(l,l,u)),t.snap(l,t.divide(l,l,[a,a,a]),i);for(let u=0;u<a;u++){const g=e.create([l,r.vertices[u],r.vertices[(u+1)%a]]);r.color&&(g.color=r.color),s.push(g)}return}const A=e.create([r.vertices[0],r.vertices[1],r.vertices[2]]),c=e.create([r.vertices[0],r.vertices[2],r.vertices[3]]);r.color&&(A.color=r.color,c.color=r.color),s.push(A,c);return}s.push(r)};return QKe=(i,r)=>{const s=[];return r.forEach(a=>{n(i,a,s)}),s},QKe}var vKe,Jnn;function aci(){if(Jnn)return vKe;Jnn=1;const t=la(),e=rP(),n=Ga(),o=Ra(),i=au(),r=Unn(),s=ici(),a=rci(),A=sci(),c=(h,d)=>d,l=(h,d)=>d,u=(h,d)=>{const p={snap:!1,simplify:!1,triangulate:!1},{snap:m,simplify:_,triangulate:f}=Object.assign({},p,h),I=e(d);let C=o.toPolygons(d);m&&(C=r(I,C)),_&&(C=s(I,C)),f&&(C=a(C),C=A(I,C));const y=Object.assign({},d);return y.polygons=C,y};return vKe=(h,...d)=>{if(d=t(d),d.length===0)throw new Error("wrong number of arguments");const p=d.map(m=>{if(i.isA(m))return c(h,m);if(n.isA(m))return l(h,m);if(o.isA(m))return u(h,m);throw new Error("invalid geometry")});return p.length===1?p[0]:p},vKe}var wKe,Wnn;function Aci(){if(Wnn)return wKe;Wnn=1;const t=la(),e=mA(),n=Ga(),o=Ra(),i=au(),r=rP(),s=Unn(),a=u=>{const g=r(u),d=i.toPoints(u).map(p=>e.snap(e.create(),p,g));return i.create(d)},A=u=>{const g=r(u);let d=n.toSides(u).map(p=>[e.snap(e.create(),p[0],g),e.snap(e.create(),p[1],g)]);return d=d.filter(p=>!e.equals(p[0],p[1])),n.create(d)},c=u=>{const g=r(u),h=o.toPolygons(u),d=s(g,h);return o.create(d)};return wKe=(...u)=>{if(u=t(u),u.length===0)throw new Error("wrong number of arguments");const g=u.map(h=>i.isA(h)?a(h):n.isA(h)?A(h):o.isA(h)?c(h):h);return g.length===1?g[0]:g},wKe}var PKe,jnn;function cci(){return jnn||(jnn=1,PKe={generalize:aci(),snap:Aci(),retessellate:IX()}),PKe}var MKe,$nn;function lci(){return $nn||($nn=1,MKe=(e,n,o)=>{for(e=e.slice();e.length<o;)e.push(n);return e}),MKe}var DKe,qnn;function uci(){if(qnn)return DKe;qnn=1;const t=la(),e=lci(),n=GGe(),{translate:o}=nT(),i=A=>{if(!Array.isArray(A.modes)||A.modes.length>3)throw new Error("align(): modes must be an array of length <= 3");if(A.modes=e(A.modes,"none",3),A.modes.filter(c=>["center","max","min","none"].includes(c)).length!==3)throw new Error('align(): all modes must be one of "center", "max" or "min"');if(!Array.isArray(A.relativeTo)||A.relativeTo.length>3)throw new Error("align(): relativeTo must be an array of length <= 3");if(A.relativeTo=e(A.relativeTo,0,3),A.relativeTo.filter(c=>Number.isFinite(c)||c==null).length!==3)throw new Error("align(): all relativeTo values must be a number, or null.");if(typeof A.grouped!="boolean")throw new Error("align(): grouped must be a boolean value.");return A},r=(A,c,l)=>{for(let u=0;u<3;u++)A[u]==null&&(c[u]==="center"?A[u]=(l[0][u]+l[1][u])/2:c[u]==="max"?A[u]=l[1][u]:c[u]==="min"&&(A[u]=l[0][u]));return A},s=(A,c,l)=>{const u=n(A),g=[0,0,0];for(let h=0;h<3;h++)c[h]==="center"?g[h]=l[h]-(u[0][h]+u[1][h])/2:c[h]==="max"?g[h]=l[h]-u[1][h]:c[h]==="min"&&(g[h]=l[h]-u[0][h]);return o(g,A)};return DKe=(A,...c)=>{A=Object.assign({},{modes:["center","center","min"],relativeTo:[0,0,0],grouped:!1},A),A=i(A);let{modes:u,relativeTo:g,grouped:h}=A;if(c=t(c),c.length===0)throw new Error("align(): No geometries were provided to act upon");if(g.filter(d=>d==null).length){const d=n(c);g=r(g,u,d)}return h?c=s(c,u,g):c=c.map(d=>s(d,u,g)),c.length===1?c[0]:c},DKe}var NKe,Xnn;function Rhe(){if(Xnn)return NKe;Xnn=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=eT(),{translate:r}=nT(),s=(u,g)=>{const h={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:d,relativeTo:p}=Object.assign({},h,u),m=i(g),_=[0,0,0];return d[0]&&(_[0]=p[0]-(m[0][0]+(m[1][0]-m[0][0])/2)),d[1]&&(_[1]=p[1]-(m[0][1]+(m[1][1]-m[0][1])/2)),d[2]&&(_[2]=p[2]-(m[0][2]+(m[1][2]-m[0][2])/2)),r(_,g)},a=(u,...g)=>{const h={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:d,relativeTo:p}=Object.assign({},h,u);if(g=t(g),g.length===0)throw new Error("wrong number of arguments");if(p.length!==3)throw new Error("relativeTo must be an array of length 3");u={axes:d,relativeTo:p};const m=g.map(_=>o.isA(_)||e.isA(_)||n.isA(_)?s(u,_):_);return m.length===1?m[0]:m};return NKe={center:a,centerX:(...u)=>a({axes:[!0,!1,!1]},u),centerY:(...u)=>a({axes:[!1,!0,!1]},u),centerZ:(...u)=>a({axes:[!1,!1,!0]},u)},NKe}var RKe,Znn;function The(){if(Znn)return RKe;Znn=1;const t=la(),e=Mu(),n=Ga(),o=Ra(),i=au(),r=(c,...l)=>{if(!Array.isArray(c))throw new Error("factors must be an array");if(l=t(l),l.length===0)throw new Error("wrong number of arguments");for(c=c.slice();c.length<3;)c.push(1);if(c[0]<=0||c[1]<=0||c[2]<=0)throw new Error("factors must be positive");const u=e.fromScaling(e.create(),c),g=l.map(h=>i.isA(h)?i.transform(u,h):n.isA(h)?n.transform(u,h):o.isA(h)?o.transform(u,h):h);return g.length===1?g[0]:g};return RKe={scale:r,scaleX:(c,...l)=>r([c,1,1],l),scaleY:(c,...l)=>r([1,c,1],l),scaleZ:(c,...l)=>r([1,1,c],l)},RKe}var TKe,eon;function gci(){if(eon)return TKe;eon=1;const t=la(),e=Ga(),n=Ra(),o=au();return TKe=(r,...s)=>{if(s=t(s),s.length===0)throw new Error("wrong number of arguments");const a=s.map(A=>o.isA(A)?o.transform(r,A):e.isA(A)?e.transform(r,A):n.isA(A)?n.transform(r,A):A);return a.length===1?a[0]:a},TKe}var kKe,ton;function dci(){return ton||(ton=1,kKe={align:uci(),center:Rhe().center,centerX:Rhe().centerX,centerY:Rhe().centerY,centerZ:Rhe().centerZ,mirror:mX().mirror,mirrorX:mX().mirrorX,mirrorY:mX().mirrorY,mirrorZ:mX().mirrorZ,rotate:_X().rotate,rotateX:_X().rotateX,rotateY:_X().rotateY,rotateZ:_X().rotateZ,scale:The().scale,scaleX:The().scaleX,scaleY:The().scaleY,scaleZ:The().scaleZ,transform:gci(),translate:nT().translate,translateX:nT().translateX,translateY:nT().translateY,translateZ:nT().translateZ}),kKe}var FKe,non;function LKe(){return non||(non=1,FKe={colors:$si(),curves:nai(),geometries:WOe(),maths:Qai(),measurements:Tai(),primitives:uAi(),text:hAi(),utils:Mtn(),booleans:RAi(),expansions:UAi(),extrusions:qAi(),hulls:nci(),minkowski:oci(),modifiers:cci(),transforms:dci()}),FKe}var HKe,oon;function hci(){if(oon)return HKe;oon=1;const t=e=>e.reduce((n,o)=>Array.isArray(o)?n.concat(t(o)):n.concat(o),[]);return HKe=t,HKe}var OKe,ion;function pci(){return ion||(ion=1,OKe=(e,n)=>e-n),OKe}var GKe,ron;function mci(){return ron||(ron=1,GKe=e=>{if(!(!Array.isArray(e)||e.length===0))return e[0]}),GKe}var YKe,son;function _ci(){return son||(son=1,YKe=(e,n,o)=>{let i=0,r=e.length;for(;r>i;){const s=Math.floor((i+r)/2),a=e[s];o(n,a)>0?i=s+1:r=s}return e.splice(i,0,n),e}),YKe}var UKe,aon;function fci(){return aon||(aon=1,UKe=(e,n)=>{if(!(!Array.isArray(e)||e.length<n))return e[n]}),UKe}var KKe,Aon;function Ici(){return Aon||(Aon=1,KKe=(e,n,o)=>{for(e=e.slice();e.length<o;)e.push(n);return e}),KKe}var VKe,con;function Cci(){return con||(con=1,VKe=e=>Array.isArray(e)?e:e==null?[]:[e]),VKe}var zKe,lon;function yci(){return lon||(lon=1,zKe={flatten:hci(),fnNumberSort:pci(),head:mci(),insertSorted:_ci(),nth:fci(),padToLength:Ici(),toArray:Cci()}),zKe}var JKe,uon;function xci(){if(uon)return JKe;uon=1;const{geometries:t}=LKe();return JKe={serializeBinary:(n,o)=>{o.statusCallback&&o.statusCallback({progress:0});const i=new ArrayBuffer(4),r=new Int32Array(i,0,1),s=new Int8Array(i,0,4);if(r[0]=287454020,s[0]!==68)throw new Error("Binary STL output is currently only supported on little-endian (Intel) processors");let a=0,A=0;n.forEach((f,I)=>{t.geom3.toPolygons(f).forEach(y=>{const x=y.vertices.length,E=x>=3?x-2:0;a+=E,A+=1})});const c=new Uint8Array(80);for(let f=0;f<80;f++)c[f]=65;const l=new Uint32Array(1);l[0]=a;const u=new ArrayBuffer(50*a),g=new Int8Array(u),h=new ArrayBuffer(50),d=new Int8Array(h),p=new Float32Array(h,0,12),m=new Uint16Array(h,48,1);let _=0;return n.forEach(f=>{t.geom3.toPolygons(f).forEach((C,y)=>{const x=C.vertices,E=x.length,B=t.poly3.plane(C);for(let S=0;S<E-2;S++){p[0]=B[0],p[1]=B[1],p[2]=B[2];let Q=3;for(let w=0;w<3;w++){const M=w+(w>0?S:0),k=x[M];p[Q++]=k[0],p[Q++]=k[1],p[Q++]=k[2]}m[0]=0,g.set(d,_),_+=50}o.statusCallback&&o.statusCallback({progress:100*y/A})})}),o.statusCallback&&o.statusCallback({progress:100}),[c.buffer,l.buffer,u]}},JKe}var WKe,gon;function Eci(){if(gon)return WKe;gon=1;const{geometries:t}=LKe(),e=(a,A)=>{A.statusCallback&&A.statusCallback({progress:0});const c=`solid JSCAD
${n(a,A)}
endsolid JSCAD
`;return A.statusCallback&&A.statusCallback({progress:100}),[c]},n=(a,A)=>{const c=[];return a.forEach((l,u)=>{c.push(o(l)),A.statusCallback&&A.statusCallback({progress:100*u/a.length})}),c.join(`
`)},o=(a,A)=>{const c=[];return t.geom3.toPolygons(a).forEach((u,g)=>{c.push(s(u))}),c.join(`
`)},i=a=>`${a[0]} ${a[1]} ${a[2]}`,r=a=>`vertex ${i(a)}`,s=a=>{const A=[];if(a.vertices.length>=3){const c=r(a.vertices[0]);for(let l=0;l<a.vertices.length-2;l++){const u=`facet normal ${i(t.poly3.plane(a))}
outer loop
${c}
${r(a.vertices[l+1])}
${r(a.vertices[l+2])}
endloop
endfacet`;A.push(u)}}return A.join(`
`)};return WKe={serializeText:e},WKe}var jKe,don;function Bci(){if(don)return jKe;don=1;const{geometries:t,modifiers:e}=LKe(),{flatten:n,toArray:o}=yci(),{serializeBinary:i}=xci(),{serializeText:r}=Eci();return jKe={mimeType:"application/sla",serialize:(A,...c)=>{A=Object.assign({},{binary:!0,statusCallback:null},A),c=n(c);let u=c.filter(g=>t.geom3.isA(g));if(u.length===0)throw new Error("only 3D geometries can be serialized to STL");return c.length!==u.length&&console.warn("some objects could not be serialized to STL"),u=o(e.generalize({snap:!0,triangulate:!0},u)),A.binary?i(u,A):r(u,A)}},jKe}var bci=Bci();const Sci=_y(bci);var Qci={0:[[{x:.019944796633211075,y:.35828068632415006},{x:.020222641007547733,y:.3550960892473839},{x:.020327535068617307,y:.3519011161217302},{x:.02060526835904108,y:.3507104904820116},{x:.02071153113201321,y:.34949252766745387},{x:.047065531132013214,y:.20882352766745393},{x:.047989939967683706,y:.20564918300405605},{x:.04875673163473768,y:.20243312543665407},{x:.04922094308839032,y:.20142201853303832},{x:.04953201774467938,y:.20035381349539033},{x:.05105794824635218,y:.1974208061920286},{x:.05243742793298141,y:.1944161379022362},{x:.1205174279329814,y:.07784313790223615},{x:.1216536619223176,y:.07627409360623287},{x:.12261018498510404,y:.07458945972562232},{x:.1242345189777056,y:.07271014544101197},{x:.12569143736362237,y:.07069826276137084},{x:.12711194429242206,y:.06938103546641537},{x:.12837874379901673,y:.06791537974577894},{x:.130338502698373,y:.06638906779986004},{x:.132159925645859,y:.06470007355882942},{x:.13381011622947792,y:.06368528357115737},{x:.13533850978527173,y:.062494930337889824},{x:.2330665097852717,y:.000743930337889824},{x:.2364974226485404,y:-.000978818921256936},{x:.23988324554357096,y:-.0027885789630079164},{x:.24043487144166406,y:-.0029559128497863825},{x:.24095002304009888,y:-.0032145836671228292},{x:.2446511035824589,y:-.0042348928870151745},{x:.24832493550927423,y:-.005349337618145378},{x:.24889860729226898,y:-.005405839357118937},{x:.2494543245702404,y:-.005559038796006631},{x:.2532833423420387,y:-.0058376980655201055},{x:.257104,y:-.006214000000000011},{x:.344948,y:-.006214000000000011},{x:.34876845169289644,y:-.005837718351308385},{x:.352597265623821,y:-.005559109487024962},{x:.35315318526669126,y:-.00540585978827806},{x:.3537270644907258,y:-.005349337618145378},{x:.3574006983675983,y:-.004234952964808514},{x:.36110158881940224,y:-.0032147329490055873},{x:.36161692908913895,y:-.0029559733581057666},{x:.36216875445642904,y:-.0027885789630079164},{x:.36555439482758706,y:-.000978916482299381},{x:.3689851386556908,y:.0007437082019616584},{x:.4667151386556908,y:.06249470820196166},{x:.46824382031514195,y:.0636852631221029},{x:.4698943035897058,y:.06470024765114774},{x:.4717154585013725,y:.06638901501054441},{x:.47367495473362387,y:.0679150932923645},{x:.4749419974608878,y:.0693810030307532},{x:.47636275350351887,y:.0706984782301942},{x:.4778194532662604,y:.07271008609647399},{x:.47944357522443626,y:.07458911996296573},{x:.4804002872780698,y:.07627405043044727},{x:.48153671723081914,y:.07784338646721853},{x:.5496157172308191,y:.19441638646721857},{x:.5509951179002539,y:.19742093333312605},{x:.5525209822553206,y:.20035381349539033},{x:.5528320971760705,y:.20142215679791795},{x:.5532963622471587,y:.2024333975455826},{x:.5540631001039363,y:.20564932060673602},{x:.5549874688679868,y:.20882352766745393},{x:.5813414688679868,y:.34949252766745387},{x:.5814477200321959,y:.3507103574246747},{x:.581725430046729,y:.351900851345405},{x:.5818303474337426,y:.35509595676374855},{x:.5821082033667889,y:.35828068632415006},{x:.5819748261451739,y:.3594958443979094},{x:.5820149461972951,y:.36071764184793353},{x:.5710349461972951,y:.5284976418479336},{x:.5705756858728281,y:.5312810757499365},{x:.5703149436633981,y:.5340900680661724},{x:.5698592272920282,y:.5356233082419208},{x:.5695988288779222,y:.5372015019922555},{x:.5686053720955593,y:.5398418557477263},{x:.5678016327590553,y:.5425460057826548},{x:.5216826327590552,y:.6556800057826547},{x:.5211943471023096,y:.656605995281004},{x:.5208498728309648,y:.6575945381025444},{x:.5191405880551111,y:.6605007631972294},{x:.5175679428069421,y:.6634831423933323},{x:.5169083878327574,y:.664296079457111},{x:.5163776774005638,y:.665198424109003},{x:.5141342596628157,y:.6677153419860701},{x:.5120099990343735,y:.6703336077343061},{x:.511204521070525,y:.6710022516480534},{x:.510507969381766,y:.6717837215313657},{x:.425955969381766,y:.7497057215313657},{x:.4243831978740034,y:.750892537075826},{x:.42294870744900304,y:.7522432326643229},{x:.4208707687817478,y:.7535430209032156},{x:.4189143183619635,y:.7550193610827685},{x:.4171402309909699,y:.7558765397994217},{x:.4154697962599445,y:.7569214269519826},{x:.41317820849544135,y:.7577908544006052},{x:.41097133104084405,y:.7588571425751742},{x:.40906410498936707,y:.7593517435666508},{x:.4072219198222394,y:.7600506678559823},{x:.3127869198222394,y:.7856226678559822},{x:.3097655669518694,y:.7861297177594856},{x:.3067801557646532,y:.7868174624905968},{x:.3054245519856559,y:.7868582361795984},{x:.30408703940192616,y:.7870827004032797},{x:.3010248204508113,y:.7869905707806608},{x:.2979626007613803,y:.7870826758597451},{x:.29662508997676323,y:.7868582009159747},{x:.29526948652460844,y:.786817416361878},{x:.2922840808497275,y:.7861296477028675},{x:.28926273204343433,y:.7856225735833884},{x:.19483073204343437,y:.7600505735833885},{x:.19298859701529922,y:.7593516514268194},{x:.1910814199885863,y:.7588570511522524},{x:.1888745059729717,y:.757790729268721},{x:.18658288068670334,y:.7569212665731724},{x:.18491249471518256,y:.7558763912940257},{x:.18313845528709377,y:.7550192228447639},{x:.18118197558509466,y:.7535428424712565},{x:.17910400699337814,y:.7522430123425641},{x:.17766956207459372,y:.7508923379118444},{x:.17609683558545802,y:.7497055417906873},{x:.09154583558545802,y:.6717835417906872},{x:.09084937681091164,y:.6710021668773223},{x:.09004400096562647,y:.6703336077343061},{x:.087919657143162,y:.6677152394449524},{x:.08567616637982708,y:.6651982097729843},{x:.0851455285488078,y:.6642959763928821},{x:.08448605719305789,y:.6634831423933323},{x:.08291335035419628,y:.6605006463960624},{x:.08120401576602496,y:.6575942974079984},{x:.08085959099279398,y:.6566058778839782},{x:.08037136724094471,y:.6556800057826547},{x:.03425236724094472,y:.5425460057826548},{x:.03344866581310472,y:.5398419832899659},{x:.03245524021837327,y:.537201759963462},{x:.0321948107181119,y:.5356234361255728},{x:.03173905633660196,y:.5340900680661724},{x:.03147832642517492,y:.5312812082371015},{x:.031019071243648687,y:.5284979083423142},{x:.020038071243648682,y:.36071790834231426},{x:.020078188427320915,y:.3594959771633442},{x:.019944796633211075,y:.35828068632415006}],[{x:.11021604810185967,y:.3604951889884744},{x:.12035004420691338,y:.5153337161267963},{x:.1599220965290545,y:.612407472440097},{x:.22898846858521874,y:.6760588762479813},{x:.301025186831377,y:.6955662779655215},{x:.373064807645506,y:.6760587099720985},{x:.44213195602343713,y:.6124073435241713},{x:.48170390405887986,y:.5153338430353971},{x:.49183697687726113,y:.3604953223188204},{x:.4679633532090146,y:.23306575687188358},{x:.4093572783633461,y:.13271343144136735},{x:.3319224534250481,y:.08378599999999999},{x:.27012977192577264,y:.08378599999999999},{x:.19269670382412518,y:.13271332265415062},{x:.13408961949133952,y:.23306590258843124},{x:.11021604810185967,y:.3604951889884744}]],1:[[{x:.17556757075794932,y:.5951166967821685},{x:.17573368487361973,y:.586296718297643},{x:.17761729959585784,y:.5776786204828649},{x:.18114602866723137,y:.5695935920037709},{x:.1861842650084615,y:.5623523359706766},{x:.19253839202243023,y:.5562331297919906},{x:.19996422417142623,y:.5514711311294693},{x:.20817639089041826,y:.548249340921154},{x:.21685930321783156,y:.5466915707579493},{x:.225679281702357,y:.5468576848736197},{x:.2342973795171352,y:.5487412995958578},{x:.24238240799622912,y:.5522700286672314},{x:.24962366402932343,y:.5573082650084615},{x:.33662600000000004,y:.6314944876419193},{x:.33662600000000004,y:.051034000000000024},{x:.33749066238185466,y:.042254935509274234},{x:.3400514210369921,y:.033813245543570986},{x:.3442098674463855,y:.026033339514117928},{x:.34980619484660536,y:.019214194846605387},{x:.35662533951411796,y:.013617867446385483},{x:.364405245543571,y:.00945942103699212},{x:.3728469355092743,y:.006898662381854659},{x:.381626,y:.0060340000000000255},{x:.3904050644907258,y:.006898662381854659},{x:.3988467544564291,y:.00945942103699212},{x:.40662666048588214,y:.01361786744638549},{x:.4134458051533947,y:.019214194846605387},{x:.41904213255361455,y:.026033339514117928},{x:.42320057896300795,y:.033813245543570986},{x:.4257613376181454,y:.042254935509274255},{x:.426626,y:.051034000000000024},{x:.426626,y:.729004},{x:.42636789988195944,y:.7316245344755278},{x:.4263183151263803,y:.7342572817023569},{x:.42593657376816557,y:.7360038620015019},{x:.4257613376181454,y:.7377830644907257},{x:.42499695590681574,y:.7403028932959718},{x:.4244347004041422,y:.7428753795171351},{x:.42371955318609683,y:.744513925721078},{x:.42320057896300795,y:.746224754456429},{x:.4219592904188853,y:.7485470419835442},{x:.42090597133276864,y:.7509604079962291},{x:.419884900961423,y:.7524279516932593},{x:.41904213255361455,y:.7540046604858821},{x:.41737163919932724,y:.7560401625275525},{x:.41586773499153856,y:.7582016640293234},{x:.4145799806286405,y:.7594418083381722},{x:.4134458051533947,y:.7608238051533946},{x:.41141030311172405,y:.7624942985076821},{x:.4095136079775698,y:.7643208702080094},{x:.40800865730110464,y:.7652859570783687},{x:.40662666048588214,y:.7664201325536145},{x:.40430437295876726,y:.767661421097737},{x:.4020877758285738,y:.7690828688705307},{x:.4004234632490515,y:.7697358105551997},{x:.3988467544564291,y:.7705785789630079},{x:.39632692565118355,y:.7713429606743374},{x:.3938756091095818,y:.772304659078846},{x:.39211589322607654,y:.7726203633950566},{x:.3904050644907258,y:.7731393376181454},{x:.3877845300151986,y:.7733974377361859},{x:.3851926967821685,y:.7738624292420507},{x:.38340520248922366,y:.7738287638499798},{x:.381626,y:.774004},{x:.37900546552447173,y:.7737458998819594},{x:.376372718297643,y:.7736963151263803},{x:.37462613799849803,y:.7733145737681656},{x:.3728469355092743,y:.7731393376181454},{x:.3703271067040287,y:.7723749559068158},{x:.36775462048286484,y:.7718127004041422},{x:.3661160742789217,y:.7710975531860966},{x:.364405245543571,y:.7705785789630079},{x:.3620829580164563,y:.7693372904188854},{x:.3596695920037709,y:.7682839713327686},{x:.35820204830674063,y:.7672629009614229},{x:.35662533951411796,y:.7664201325536145},{x:.3545898374724472,y:.7647496391993269},{x:.35242833597067663,y:.7632457349915385},{x:.1912283359706766,y:.6257917349915385},{x:.18510912979199054,y:.6194376079775697},{x:.18034713112946932,y:.6120117758285738},{x:.17712534092115398,y:.6037996091095817},{x:.17556757075794932,y:.5951166967821685}]],2:[[{x:.034589999999999996,y:.05195499999999997},{x:.034692251306008066,y:.05091682506774448},{x:.03463809526377374,y:.04987503351343359},{x:.03512383076438082,y:.04653492529109402},{x:.03545466238185463,y:.043175935509274184},{x:.03575748683953214,y:.042177657057450094},{x:.03590761484026801,y:.04114531791601493},{x:.0370356398580977,y:.03796415123181852},{x:.03801542103699209,y:.034734245543570935},{x:.03850718127225641,y:.0338142268532408},{x:.03885582398108696,y:.03283101233894428},{x:.040582789147307716,y:.02993103764454602},{x:.04217386744638545,y:.02695433951411788},{x:.04283566538917773,y:.026147936387598623},{x:.04336942466232366,y:.025251630882832152},{x:.04562896367409083,y:.022744292579413156},{x:.04777019484660536,y:.020135194846605337},{x:.04857659797312457,y:.019473396903813094},{x:.04927496174105457,y:.01869844492647086},{x:.0519802417813102,y:.01668009861889986},{x:.05458933951411791,y:.014538867446385433},{x:.055509358204447995,y:.01404710721112114},{x:.05634548873920743,y:.013423289731094336},{x:.05939254741314285,y:.011971499336069797},{x:.062369245543570956,y:.01038042103699207},{x:.0633675239953951,y:.010077596579314544},{x:.06430928926944049,y:.00962888655251979},{x:.06758102982102647,y:.008799443560749052},{x:.07081093550927423,y:.007819662381854608},{x:.0718491104415297,y:.007717411075846537},{x:.07286031894352762,y:.007461052176974015},{x:.07623101021818018,y:.0072858316174737835},{x:.07959,y:.006954999999999975},{x:.522462,y:.006954999999999975},{x:.5312410644907257,y:.007819662381854608},{x:.539682754456429,y:.01038042103699207},{x:.5474626604858821,y:.014538867446385433},{x:.5542818051533946,y:.020135194846605337},{x:.5598781325536145,y:.02695433951411788},{x:.5640365789630079,y:.034734245543570935},{x:.5665973376181453,y:.043175935509274205},{x:.567462,y:.05195499999999997},{x:.5665973376181453,y:.06073406449072574},{x:.5640365789630079,y:.06917575445642901},{x:.5598781325536145,y:.07695566048588207},{x:.5542818051533946,y:.08377480515339461},{x:.5474626604858821,y:.08937113255361451},{x:.539682754456429,y:.09352957896300787},{x:.5312410644907257,y:.09609033761814534},{x:.522462,y:.09695499999999997},{x:.1815000359059797,y:.09695499999999997},{x:.2783905550735291,y:.2032469617410546},{x:.2792807818102756,y:.20444017254595384},{x:.28031851181367967,y:.20550758629318672},{x:.43775551181367967,y:.4029575862931866},{x:.4393581707982963,y:.4054309283363016},{x:.4411189018513206,y:.4077943501865292},{x:.5036359018513206,y:.5115903501865292},{x:.5044316302389797,y:.5132634494776924},{x:.5054127007337849,y:.5148350555317778},{x:.5063216043693862,y:.5172373109446714},{x:.5074247535047713,y:.5195567934026113},{x:.5078787867151084,y:.5213529834674229},{x:.5085344010842773,y:.5230857889106145},{x:.5229384010842772,y:.5764717889106146},{x:.5230947969602031,y:.5774089507908463},{x:.5233933154704733,y:.5783109589719573},{x:.5238196553887738,y:.5817524776504878},{x:.5243904806061233,y:.5851730002877248},{x:.5243610401661515,y:.586122666187007},{x:.5244778496604383,y:.5870655806061408},{x:.5252778496604383,y:.6189585806061408},{x:.525154398698275,y:.6206444560860672},{x:.5252359209411441,y:.6223328785443973},{x:.5248330095087286,y:.6250334227224941},{x:.5246336028763079,y:.6277565667648055},{x:.5241836259995084,y:.6293859645321488},{x:.5239341869342451,y:.6310578486269935},{x:.5118811869342451,y:.6790048486269935},{x:.5115474759395316,y:.6799350391147754},{x:.5113589931552627,y:.6809051378786065},{x:.5100605296725933,y:.6840797730170447},{x:.5089023081582834,y:.6873082151493771},{x:.5083935381649621,y:.6881554285023456},{x:.5080194201443183,y:.6890701159233712},{x:.5061265656819337,y:.6919304336788418},{x:.5043607612540449,y:.6948708843926746},{x:.5036964840076373,y:.6956025626767983},{x:.5031511078963445,y:.6964266878303904},{x:.4695951078963445,y:.7376876878303904},{x:.46829294792790443,y:.7390014838193654},{x:.46714904955699066,y:.7404551608815331},{x:.46519525859727806,y:.7421268539092958},{x:.4633851429208498,y:.7439531446668906},{x:.4618516947085211,y:.7449876576267703},{x:.4604461776978856,y:.7461902391902692},{x:.4582037971525157,y:.7474486453977692},{x:.45607217068925404,y:.7488867084403534},{x:.4543663637878686,y:.7496021826182516},{x:.45275324136800726,y:.7505074541480116},{x:.3913892413680073,y:.7774134541480116},{x:.3883140702117422,y:.7784156528007931},{x:.3852957573995619,y:.7795779210778271},{x:.3841283231887951,y:.779779788263216},{x:.3830018757962646,y:.7801468976050565},{x:.3797902739335826,y:.7805299031606142},{x:.3766032098633093,y:.781080995160135},{x:.2948022098633093,y:.7870669951601349},{x:.29450281220893076,y:.7870594704966325},{x:.2942070489499988,y:.7871065838776864},{x:.29009611613079095,y:.7869487184427649},{x:.2859834519838158,y:.7868453561974301},{x:.28569127516043946,y:.7867795665334233},{x:.28539200354491423,y:.7867680740946454},{x:.2381110035449142,y:.7802710740946455},{x:.2365476307297285,y:.7798972084805876},{x:.2349498387179436,y:.7797212234138579},{x:.23226739693423346,y:.7788736316211718},{x:.2295313767481002,y:.7782193386355017},{x:.22807098126622102,y:.7775476578384392},{x:.22653822336325463,y:.7770633405173258},{x:.15287222336325462,y:.7455503405173259},{x:.15277120515837472,y:.7454948388638573},{x:.15266147866932564,y:.7454595513468599},{x:.14890641990559073,y:.7433714396994592},{x:.14514076206912752,y:.7413025033471496},{x:.1450525127361761,y:.7412283604682699},{x:.14495177886390068,y:.7411723444149347},{x:.14167624287507044,y:.7383917796239132},{x:.1383865705572421,y:.7356279539035645},{x:.138314481468594,y:.7355380190685297},{x:.13822661135931125,y:.7354634271443719},{x:.09327661135931127,y:.6889934271443718},{x:.09215967204365061,y:.6875853345117547},{x:.09088652507606766,y:.6863167230283468},{x:.0894249598835053,y:.6841377631074377},{x:.0877944205712414,y:.6820821900242812},{x:.08697364817646357,y:.6804832494460014},{x:.08597245819367963,y:.6789906353246448},{x:.0849640705590952,y:.6765684062835642},{x:.08376588401722862,y:.6742342280213215},{x:.08327282036617045,y:.6725058858871059},{x:.08258206253775009,y:.6708466294514168},{x:.06737006253775008,y:.6210196294514168},{x:.06563362911198059,y:.61237067498716},{x:.06561788807912042,y:.6035491464015462},{x:.0673234443582347,y:.5948940500909503},{x:.07068475437800403,y:.5867379965527546},{x:.07557264487941309,y:.5793944183504645},{x:.08179927697165325,y:.5731455250760676},{x:.08912536467535526,y:.5682314581936796},{x:.09726937054858317,y:.56484106253775},{x:.10591832501283995,y:.5631046291119806},{x:.11473985359845373,y:.5630888880791204},{x:.12339494990904962,y:.5647944443582347},{x:.13155100344724535,y:.568155754378004},{x:.13889458164953555,y:.5730436448794131},{x:.14514347492393234,y:.5792702769716532},{x:.15005754180632036,y:.5865963646753553},{x:.1534479374622499,y:.5947403705485832},{x:.16549687462406137,y:.6342067386764809},{x:.19660916323298405,y:.666371100226128},{x:.2563653288901179,y:.6919337213587163},{x:.29295461470925055,y:.696961546277117},{x:.3623268316838737,y:.6918850546595318},{x:.40664087103378327,y:.672454875030618},{x:.4270299373286165,y:.6473841495451277},{x:.4351521014718352,y:.6150740687208592},{x:.4346413299816387,y:.5947115247998124},{x:.4232850296720603,y:.5526213103922067},{x:.3655461500158852,y:.45675834907300783},{x:.21087613207581168,y:.2627785664153893},{x:.04633344492647088,y:.0822700382589454},{x:.04431509861889995,y:.07956475821868986},{x:.04217386744638545,y:.07695566048588207},{x:.04168210721112112,y:.0760356417955519},{x:.04105828973109435,y:.07519951126079251},{x:.03960649933606985,y:.07215245258685718},{x:.03801542103699209,y:.06917575445642901},{x:.037712596579314576,y:.0681774760046049},{x:.037263886552519804,y:.06723571073055948},{x:.036434443560749034,y:.06396397017897336},{x:.03545466238185463,y:.06073406449072574},{x:.03535241107584656,y:.059695889558470286},{x:.035096052176974035,y:.05868468105647236},{x:.03492083161747381,y:.05531398978181981},{x:.034589999999999996,y:.05195499999999997}]],3:[[{x:.02624429558875499,y:.07454886751538828},{x:.02628189246403191,y:.06572740500388341},{x:.028039748887915363,y:.057082779207475086},{x:.03145031142385274,y:.04894719824755728},{x:.036382514066253493,y:.04163330793793327},{x:.042646815033581253,y:.035422176981524986},{x:.05000248075272204,y:.030552495657744837},{x:.05816683711519421,y:.027211403088916904},{x:.11448783711519421,y:.010388403088916982},{x:.11753114712885143,y:.009796523380387901},{x:.12053464064709668,y:.009027703431080128},{x:.20267064064709667,y:-.0035892965689199724},{x:.20562630159751,y:-.003749783589053152},{x:.20856537842676282,y:-.004101230781641964},{x:.30947437842676284,y:-.00620423078164193},{x:.31075400531193675,y:-.006105070212514369},{x:.31203499449415534,y:-.0061847225744922005},{x:.3151428517207607,y:-.005764970678224511},{x:.3182695531731509,y:-.005522677007230838},{x:.31950524711917533,y:-.005175778959545043},{x:.3207771618583987,y:-.005003992231664048},{x:.3829651618583987,y:.009716007768336019},{x:.3849642059743718,y:.010402067561162992},{x:.38702295869345676,y:.010879972006216251},{x:.389126076828856,y:.011830396347599064},{x:.3913090018652735,y:.012579562954916447},{x:.3931357912831918,y:.013642434461507345},{x:.39506175111398195,y:.014512798837572657},{x:.47719975111398194,y:.06182779883757265},{x:.47924722409526294,y:.06329195880211928},{x:.48141099047099317,y:.06457804786673271},{x:.4828265323572166,y:.06585154318044145},{x:.484375351035892,y:.06695911252196202},{x:.4860978389589892,y:.06879458122658251},{x:.48796912564078,y:.07047808832945178},{x:.54077112564078,y:.12830608832945176},{x:.5409949120745448,y:.12860551518367325},{x:.5412686389329152,y:.1288600940829806},{x:.5436334835107667,y:.13213593090859313},{x:.5460522072884215,y:.13537218987116906},{x:.5462132784472015,y:.1357095218897727},{x:.546432079841298,y:.13601261058785885},{x:.5481124005325159,y:.13968686141763526},{x:.5498532864078638,y:.14333280617235186},{x:.5499454524173568,y:.14369507987504085},{x:.5501009199323095,y:.14403503084321223},{x:.5735679199323094,y:.2123790308432122},{x:.5742003382158373,y:.21504899342087444},{x:.5750294951185407,y:.21766455299430504},{x:.5752146521018063,y:.21933125436759},{x:.575601167738761,y:.22096305773765262},{x:.575700550423256,y:.22370509641963415},{x:.5760035049491392,y:.22643215923642232},{x:.5758599468852712,y:.22810295774565637},{x:.5759206866877095,y:.2297788119316045},{x:.5754832145523405,y:.2324875517091097},{x:.575248324328873,y:.23522131827456078},{x:.563515324328873,y:.2983063182745607},{x:.5624930457986839,y:.30183400865706583},{x:.561587550163308,y:.3053934651440046},{x:.5612670272694029,y:.3060647673464004},{x:.5610599744254687,y:.30677926765590185},{x:.5593691204378909,y:.31003973780923805},{x:.5577866081350055,y:.3133541469027738},{x:.5573412794357957,y:.31395001930700017},{x:.5569988129587381,y:.31461039668740554},{x:.5547043620842722,y:.317478348572073},{x:.5525056481741942,y:.32042033938948294},{x:.4997036481741942,y:.378250339389483},{x:.4970091109540712,y:.38067456957783247},{x:.49440132723244246,y:.38319188697894757},{x:.4937347452782226,y:.3836204617554604},{x:.49314561461057166,y:.3841504927896343},{x:.49002990831948917,y:.38600246394071897},{x:.48698112816844114,y:.387962658427834},{x:.4171684643874312,y:.4237087345514058},{x:.48487098803351525,y:.4540412587201935},{x:.4882241875669253,y:.4559584413246188},{x:.4916233115558361,y:.4577929691542233},{x:.4920492459188098,y:.45814540790983926},{x:.4925291804180174,y:.45841980913886743},{x:.49544392539098053,y:.4609543303938907},{x:.49841983754054403,y:.46341674447922576},{x:.545354837540544,y:.5107317444792258},{x:.5454749496657809,y:.5108793107625336},{x:.5456205162109946,y:.5110018387655073},{x:.548258239278959,y:.5142987798858712},{x:.5509236260451226,y:.5175733969812307},{x:.5510126414958236,y:.5177415605329735},{x:.5511315069931322,y:.5178901328189077},{x:.5530753456471339,y:.5216383183828395},{x:.5550506716503533,y:.525370005791429},{x:.5551051696126684,y:.5255523041806199},{x:.555192766127671,y:.525721211199887},{x:.5563680197383496,y:.5297766005381628},{x:.5575773743081012,y:.5338219516056334},{x:.5575952604559016,y:.5340113792074108},{x:.557648221703651,y:.5341941299579837},{x:.569382221703651,y:.5972801299579837},{x:.5696549699390315,y:.6004540423597167},{x:.5701008412017201,y:.6036082951002054},{x:.5700318821169291,y:.6048400880993865},{x:.5701375119403227,y:.6060692795769916},{x:.5697858198023349,y:.6092354166829699},{x:.5696077595908724,y:.6124160465097288},{x:.5692998146426919,y:.6136107177017713},{x:.5691636114574624,y:.614836897966064},{x:.5682009942777376,y:.6178735869028962},{x:.5674058453461934,y:.6209583639953996},{x:.5668707486862845,y:.622070002836373},{x:.5664979467044567,y:.623246050467446},{x:.5649613973213707,y:.6260365929822823},{x:.5635797167972587,y:.6289069710868302},{x:.5283787167972587,y:.6867359710868302},{x:.526364685994031,y:.6894131274243959},{x:.524479650893362,y:.6921826271628648},{x:.5237177195860089,y:.6929316152663909},{x:.5230754099184859,y:.6937854072711274},{x:.5205777908604191,y:.6960182048823972},{x:.5181886735848373,y:.6983667373551676},{x:.4595186735848373,y:.7456807373551677},{x:.45627545779875317,y:.7478078267647688},{x:.4530837115337172,y:.7500113951823929},{x:.4525909707504246,y:.7502243275150239},{x:.4521421155924859,y:.7505187128152536},{x:.44854624273044896,y:.7519722107862162},{x:.4449859301027389,y:.7535107594479447},{x:.362848930102739,y:.7797967594479446},{x:.36158078031831586,y:.7800691142952486},{x:.3603625229719573,y:.7805143446587972},{x:.35727696699365546,y:.7809934249999153},{x:.35422405316989464,y:.781649085623381},{x:.352927136733123,y:.7816688034988555},{x:.3516454277250751,y:.7818678086678129},{x:.2577774277250751,y:.7871168086678129},{x:.2534831925795917,y:.7869349938938289},{x:.24918809681378723,y:.7867747925856998},{x:.2490774333618657,y:.786748457272228},{x:.24896378128970398,y:.7867436453266514},{x:.24478752897123962,y:.7857275603552258},{x:.2406062159909945,y:.7847325056542677},{x:.16433721599099446,y:.7584545056542678},{x:.1612047546311144,y:.7570179671101032},{x:.15801334200327716,y:.7557176430739929},{x:.09817134200327716,y:.7241756430739928},{x:.09479788711775466,y:.721949723610623},{x:.09138819905405325,y:.7197797137879894},{x:.05384019905405325,y:.6903397137879895},{x:.04746503339724546,y:.6842424293748122},{x:.0424018859405069,y:.677018569451043},{x:.0388453306011542,y:.6689457429023652},{x:.036932043806339465,y:.6603341839257509},{x:.036735552094603836,y:.6515148299032538},{x:.03826340653223549,y:.6428266036640077},{x:.041456892530026886,y:.6346033888699733},{x:.046193286212010486,y:.6271611990540533},{x:.05229057062518783,y:.6207860333972455},{x:.05951443054895701,y:.615722885940507},{x:.06758725709763488,y:.6121663306011542},{x:.07619881607424907,y:.6102530438063395},{x:.08501817009674617,y:.6100565520946039},{x:.09370639633599236,y:.6115844065322356},{x:.1019296111300268,y:.6147778925300269},{x:.10937180094594674,y:.6195142862120105},{x:.14372643260130716,y:.6464504840370294},{x:.1969218011618275,y:.6744891243755197},{x:.2615721948597163,y:.6967640072977177},{x:.3408866683163358,y:.6923288252210377},{x:.40955721054777616,y:.6703524458415177},{x:.4555820596629536,y:.6332360369266462},{x:.477752059875079,y:.596814658492312},{x:.4716998550115053,y:.5642759337587675},{x:.44042564505409965,y:.532748518309004},{x:.3700728058889163,y:.5012285825754976},{x:.28267158635688694,y:.4816496665818946},{x:.2026156257994338,y:.47140070238604853},{x:.19958923290487823,y:.4707064281346213},{x:.19652752938874105,y:.4701896668089735},{x:.19529880233776667,y:.46972217540403877},{x:.1940174323454584,y:.4694282207777866},{x:.19118463692903986,y:.4681568668470777},{x:.18828257832087977,y:.4670527262205195},{x:.18716866396437967,y:.46635450477580015},{x:.18596926283986664,y:.4658162155208443},{x:.1834389276407875,y:.4640166393294268},{x:.18080803842542348,y:.46236755090702814},{x:.17985174386742717,y:.4614654316810775},{x:.17878040392329292,y:.4607034939516098},{x:.17664976830422657,y:.45844485220330683},{x:.1743911520787843,y:.45631418952832026},{x:.17362922718285934,y:.45524284045707714},{x:.17272711941234267,y:.45428653509274164},{x:.17107806250525512,y:.45165562612327925},{x:.16927851662463225,y:.44912526936741537},{x:.1687402417372368,y:.44792586179486843},{x:.1680420336360506,y:.4468119390745141},{x:.1669379277730794,y:.44390986724015796},{x:.1656666077762714,y:.4410770565945043},{x:.16537266849946,y:.43979568308103084},{x:.16490519181337332,y:.438566950430106},{x:.16438846716364272,y:.4355052407239498},{x:.16369422916516244,y:.43247883951296023},{x:.16365592142049992,y:.43116474252408066},{x:.16343714101639506,y:.42986841944927895},{x:.1635276550184117,y:.4267647316583033},{x:.16343717819520762,y:.42366104278329114},{x:.1636559741278381,y:.4223647223293339},{x:.1636942976139514,y:.42105062579943375},{x:.1643885718653787,y:.41802423290487795},{x:.16490533319102646,y:.414962529388741},{x:.1653728245959611,y:.41373380233776696},{x:.1656667792222133,y:.41245243234545836},{x:.1669381331529224,y:.40961963692903947},{x:.16804227377948042,y:.40671757832087974},{x:.16874049522419982,y:.4056036639643795},{x:.16927878447915568,y:.4044042628398666},{x:.17107836067057278,y:.40187392764078794},{x:.1727274490929718,y:.3992430384254234},{x:.17362956831892262,y:.3982867438674269},{x:.17439150604839013,y:.3972154039232929},{x:.1766501477966929,y:.39508476830422673},{x:.1787808104716797,y:.39282615207878424},{x:.17985215954292283,y:.39206422718285927},{x:.18080846490725827,y:.39116211941234263},{x:.18343937387672077,y:.38951306250525497},{x:.18596973063258454,y:.3877135166246322},{x:.18716913820513145,y:.3871752417372368},{x:.1882830609254858,y:.38647703363605057},{x:.19118513275984234,y:.3853729277730792},{x:.19401794340549564,y:.3841016077762714},{x:.19529931691896882,y:.38380766849946},{x:.19652804956989395,y:.38334019181337325},{x:.19958975927605035,y:.38282346716364263},{x:.20261616048703973,y:.3821292291651624},{x:.28149235433605535,y:.37203226198800626},{x:.3678476199052635,y:.34785057975990136},{x:.4387239808422848,y:.31155986033736477},{x:.4773813812672204,y:.26922136053481893},{x:.48460036747312013,y:.2304069273293995},{x:.4680118822440525,y:.1820955353962423},{x:.4262197745588727,y:.1363254129914362},{x:.35583608100487274,y:.09578139608686695},{x:.3056218275014876,y:.083895601213743},{x:.2134048551529998,y:.08581745449589688},{x:.13726972612583144,y:.09751265420048184},{x:.0839251628848058,y:.11344659691108305},{x:.0752658675153883,y:.11513070441124498},{x:.06644440500388343,y:.11509310753596806},{x:.05779977920747511,y:.11333525111208462},{x:.0496641982475573,y:.10992468857614723},{x:.04235030793793329,y:.10499248593374648},{x:.036139176981525016,y:.09872818496641873},{x:.03126949565774486,y:.09137251924727793},{x:.027928403088916927,y:.08320816288480577},{x:.02624429558875499,y:.07454886751538828}]],4:[[{x:.003828000000000005,y:.27580099999999996},{x:.0040512821902059844,y:.2735339778783202},{x:.004058111165048277,y:.2712559968420181},{x:.004482570943879651,y:.26915502967601196},{x:.004692662381854638,y:.26702193550927417},{x:.005353928343121064,y:.26484203377636983},{x:.005805038155045426,y:.26260915577382815},{x:.0066312204192078995,y:.26063136609773396},{x:.0072534210369921,y:.25858024554357095},{x:.008327258689269697,y:.2565712366005347},{x:.009205313441189196,y:.2544692698811785},{x:.010401468469599332,y:.25269066304309135},{x:.011411867446385462,y:.25080033951411784},{x:.01285700981091242,y:.2490394284479652},{x:.014128266351129452,y:.24714915041402313},{x:.01564842657685691,y:.24563807727727646},{x:.017008194846605366,y:.24398119484660533},{x:.018769105912757822,y:.24253605248207852},{x:.020384710565360974,y:.24093010545831445},{x:.022170457083446928,y:.23974463571613375},{x:.023827339514117918,y:.23838486744638543},{x:.025836348457154004,y:.2373110297941079},{x:.027734214441385185,y:.2360511294240198},{x:.029716922014597604,y:.23523682001377813},{x:.031607245543570965,y:.23422642103699207},{x:.03378714727647517,y:.23356515507572567},{x:.03589434066689576,y:.23269971862397582},{x:.03799781495511128,y:.23228786299963877},{x:.040048935509274235,y:.2316656623818546},{x:.04231595763095386,y:.23144238019164864},{x:.0445515001672978,y:.23100466589573537},{x:.046694905833262405,y:.23101109143797494},{x:.048828,y:.23080099999999998},{x:.36918100000000004,y:.23080099999999998},{x:.36918100000000004,y:.05103000000000002},{x:.37004566238185466,y:.04225093550927423},{x:.3726064210369921,y:.03380924554357098},{x:.3767648674463855,y:.026029339514117924},{x:.38236119484660536,y:.019210194846605383},{x:.38918033951411796,y:.013613867446385479},{x:.396960245543571,y:.009455421036992116},{x:.4054019355092743,y:.006894662381854655},{x:.414181,y:.0060300000000000215},{x:.4229600644907258,y:.006894662381854655},{x:.4314017544564291,y:.009455421036992116},{x:.43918166048588214,y:.013613867446385486},{x:.4460008051533947,y:.019210194846605383},{x:.45159713255361456,y:.026029339514117924},{x:.45575557896300795,y:.03380924554357098},{x:.4583163376181454,y:.04225093550927425},{x:.459181,y:.05103000000000002},{x:.459181,y:.23080099999999998},{x:.553224,y:.23080099999999998},{x:.5620030644907258,y:.2316656623818546},{x:.5704447544564291,y:.23422642103699207},{x:.5782246604858822,y:.23838486744638543},{x:.5850438051533947,y:.24398119484660533},{x:.5906401325536146,y:.25080033951411784},{x:.5947985789630079,y:.25858024554357095},{x:.5973593376181454,y:.26702193550927417},{x:.5982240000000001,y:.27580099999999996},{x:.5973593376181454,y:.28458006449072576},{x:.5947985789630079,y:.293021754456429},{x:.5906401325536146,y:.3008016604858821},{x:.5850438051533947,y:.3076208051533946},{x:.5782246604858822,y:.3132171325536145},{x:.5704447544564291,y:.3173755789630079},{x:.5620030644907258,y:.31993633761814533},{x:.553224,y:.32080099999999995},{x:.459181,y:.32080099999999995},{x:.459181,y:.421833},{x:.4583163376181454,y:.4306120644907258},{x:.45575557896300795,y:.439053754456429},{x:.45159713255361456,y:.4468336604858821},{x:.4460008051533947,y:.4536528051533947},{x:.43918166048588214,y:.45924913255361455},{x:.4314017544564291,y:.4634075789630079},{x:.4229600644907258,y:.4659683376181454},{x:.414181,y:.466833},{x:.4054019355092743,y:.4659683376181454},{x:.396960245543571,y:.4634075789630079},{x:.38918033951411796,y:.45924913255361455},{x:.38236119484660536,y:.4536528051533947},{x:.3767648674463855,y:.4468336604858821},{x:.3726064210369921,y:.439053754456429},{x:.37004566238185466,y:.4306120644907258},{x:.36918100000000004,y:.421833},{x:.36918100000000004,y:.32080099999999995},{x:.1436046917940101,y:.32080099999999995},{x:.4533648945416855,y:.700560710565361},{x:.45824387057598015,y:.7079102144413851},{x:.4615952813760241,y:.7160703406668958},{x:.46329033410426457,y:.7247275001672978},{x:.46326388883495173,y:.7335490031579818},{x:.46151696184495455,y:.7421958442261718},{x:.45811668655881077,y:.7503357301188214},{x:.4531937336488705,y:.7576558495859769},{x:.446937289434639,y:.7638748945416856},{x:.4395877855586148,y:.7687538705759801},{x:.43142765933310423,y:.7721052813760241},{x:.42277049983270215,y:.7738003341042645},{x:.41394899684201814,y:.7737738888349517},{x:.40530215577382817,y:.7720269618449546},{x:.39716226988117853,y:.7686266865588108},{x:.38984215041402315,y:.7637037336488706},{x:.38362310545831446,y:.757447289434639},{x:.013957105458314502,y:.304244289434639},{x:.012771635716133971,y:.30245854291655333},{x:.011411867446385462,y:.3008016604858821},{x:.010338029794107799,y:.29879265154284573},{x:.009078129424019837,y:.29689478555861476},{x:.008263820013778204,y:.2949120779854024},{x:.0072534210369921,y:.293021754456429},{x:.006592155075725704,y:.29084185272352475},{x:.005726718623975863,y:.2887346593331042},{x:.0053148629996388475,y:.28663118504488877},{x:.004692662381854638,y:.28458006449072576},{x:.00446938019164866,y:.282313042369046},{x:.00403166589573542,y:.2800774998327022},{x:.00403809143797499,y:.27793409416673776},{x:.003828000000000005,y:.27580099999999996}]],5:[[{x:.029951000000000005,y:.38529899999999995},{x:.030026331329377584,y:.3845341481773043},{x:.029977079633894697,y:.38376717530271315},{x:.030458063889865227,y:.38015069392879464},{x:.03081566238185464,y:.37651993550927415},{x:.03103876142924568,y:.3757844765131909},{x:.03114008507636279,y:.3750226322781917},{x:.0323173678705276,y:.3715694759531816},{x:.0333764210369921,y:.36807824554357094},{x:.033738714231120716,y:.3674004426508694},{x:.033986719409902104,y:.366673004302166},{x:.03581505842470893,y:.3635158758870829},{x:.03753486744638546,y:.3602983395141178},{x:.03802243206297786,y:.35970424030984804},{x:.03840758807348568,y:.3590391628952293},{x:.04081672126593952,y:.35629938906452685},{x:.04313119484660537,y:.3534791948466053},{x:.04372529405087513,y:.3529916302300129},{x:.04423279956362368,y:.3524144723015426},{x:.04713014529619686,y:.3501973410270508},{x:.04995033951411792,y:.3478828674463854},{x:.05062814240681941,y:.3475205742522568},{x:.05123849426956635,y:.347053515665452},{x:.054512709170605814,y:.34544423005866864},{x:.057730245543570965,y:.343724421036992},{x:.05846570453965444,y:.3435013219896009},{x:.05915544727260316,y:.34316231154402344},{x:.06268070509966306,y:.34222271554831923},{x:.06617193550927424,y:.3411636623818546},{x:.0669367873319697,y:.34108833105247705},{x:.06767941450870582,y:.34089039672943083},{x:.07132024158048059,y:.34065659849198926},{x:.074951,y:.34029899999999996},{x:.0757158518226955,y:.3403743313293775},{x:.07648282469728679,y:.34032507963389463},{x:.08009930607120508,y:.3408060638898651},{x:.08373006449072577,y:.3411636623818546},{x:.0844655234868091,y:.3413867614292456},{x:.08522736772180821,y:.34148808507636275},{x:.2701097088502776,y:.3848544225750548},{x:.39095673206080095,y:.3699215697302287},{x:.4312208460684155,y:.34735587040502247},{x:.4569274445394237,y:.3179203076157562},{x:.4808881134259603,y:.2201177906149206},{x:.47151862074291284,y:.1781066999956386},{x:.4461217481742335,y:.14395206669668215},{x:.3876788357927069,y:.10680533743499816},{x:.3169820044514503,y:.08634947983662909},{x:.2505487358362677,y:.08307118781270932},{x:.19638270317906092,y:.09339965838335124},{x:.15518503458472022,y:.11245499400015477},{x:.1051531598037562,y:.15775209985578706},{x:.09806479623887651,y:.16300326318775482},{x:.09008818244690309,y:.16677065575830224},{x:.0815298552225249,y:.16890949878372125},{x:.07271870628140957,y:.16933759772602197},{x:.06399334313601493,y:.16803850098293246},{x:.05568907659877849,y:.16506213211374782},{x:.04812503497563989,y:.16052287130494386},{x:.041591900144212934,y:.15459515980375618},{x:.03634073681224515,y:.1475067962388765},{x:.03257334424169774,y:.13953018244690307},{x:.03043450121627874,y:.13097185522252489},{x:.03000640227397801,y:.12216070628140954},{x:.031305499017067515,y:.1134353431360149},{x:.034281867886252176,y:.10513107659877846},{x:.03882112869505611,y:.09756703497563987},{x:.044748840196243804,y:.09103390014421289},{x:.09986584019624378,y:.041132900144212926},{x:.10178680031290575,y:.03970982481314967},{x:.10357183338498165,y:.03811957700249835},{x:.10532248536915285,y:.037090537646117014},{x:.10695420376112348,y:.035881736812245144},{x:.10911588139237749,y:.0348607662023731},{x:.11117685751196796,y:.03364931723433351},{x:.16362485751196798,y:.009390317234333478},{x:.1646572774363771,y:.009030847933342759},{x:.16562545909873666,y:.008523173483185618},{x:.16881529925253239,y:.0075831025339957205},{x:.1719558576504946,y:.006489618860012841},{x:.17303856889723523,y:.006338471796353147},{x:.17408718959239433,y:.0060294350406820685},{x:.23897018959239436,y:-.00634256495931787},{x:.2399001168767359,y:-.006426714843400178},{x:.24080591100583193,y:-.006653392925378379},{x:.24428588214420577,y:-.0068235863462415185},{x:.247755834543085,y:-.007137585190079683},{x:.24868431036339586,y:-.007038698344381461},{x:.24961692261229596,y:-.007084309202250054},{x:.32666292261229596,y:-.003282309202250082},{x:.32746661284147915,y:-.0031629125067284265},{x:.32827905619988357,y:-.00317336931171093},{x:.3318231917274382,y:-.002515696572186591},{x:.33538870069659477,y:-.001986002452099067},{x:.33615365510360457,y:-.0017121077449900682},{x:.3369525276121403,y:-.0015638637889859724},{x:.4188855276121403,y:.02214313621101406},{x:.4207304127428032,y:.02287964098341223},{x:.42264402370761556,y:.023412682727046455},{x:.4248170355152836,y:.024511079778651145},{x:.4270783417525648,y:.02541382586724525},{x:.42874409297954025,y:.02649609814118395},{x:.43051694316083267,y:.027392224616519634},{x:.5014129431608326,y:.07245422461651957},{x:.5044011686844615,y:.0747943741105689},{x:.5074525565132345,y:.07705154573740032},{x:.5078697672823866,y:.07751071502587484},{x:.5083582165656543,y:.07789323111579813},{x:.5108324836553944,y:.0807713891731658},{x:.5133848875831327,y:.08358048611421783},{x:.5494628875831328,y:.1320994861142178},{x:.5497798823390716,y:.1326268676033582},{x:.5501811109693575,y:.13309337858567127},{x:.5520495631508493,y:.13640291633591076},{x:.5540074974944301,y:.13966031511116345},{x:.5542155142604781,y:.14023940572188273},{x:.5545180216173755,y:.1407752286491667},{x:.5557049132287019,y:.14438569149730107},{x:.5569897394368822,y:.14796247431004633},{x:.5570807842453774,y:.1485710199149322},{x:.5572729451408087,y:.14915556341258465},{x:.5710219451408087,y:.2108035634125847},{x:.5712046210163666,y:.21230267395853206},{x:.5715791512667351,y:.2137656948046034},{x:.571736996194895,y:.21667155541097086},{x:.5720890113736304,y:.2195603313107129},{x:.5719757152243157,y:.2210662751632623},{x:.5720576277729665,y:.2225742517011615},{x:.5716455344736617,y:.2254550710286549},{x:.5714272135589309,y:.2283570146640783},{x:.5710222992922247,y:.22981191924551903},{x:.5708084462858501,y:.23130690078257787},{x:.5417354462858501,y:.3499769007825779},{x:.5411002871662289,y:.3517814599872898},{x:.540669734049328,y:.3536454570484658},{x:.5396393400617131,y:.355932176655931},{x:.5388066121493867,y:.3582980512419798},{x:.5378316053978042,y:.3599440229503987},{x:.537045677451414,y:.361688207084494},{x:.5355889653307644,y:.36372996812105773},{x:.5343106788169316,y:.36588792593376723},{x:.5330332933960605,y:.36731205637621067},{x:.5319221933904076,y:.36886939956510134},{x:.49389619339040763,y:.4124113995651013},{x:.49150876583293945,y:.41465677330496736},{x:.4892379705562563,y:.41702003426923534},{x:.48830169237996507,y:.41767302336482964},{x:.48747017448549057,y:.4184550652905171},{x:.4846905699931398,y:.420191530792605},{x:.4820023580684325,y:.4220663721783498},{x:.4272473580684325,y:.4527533721783498},{x:.42330567688981036,y:.45447898255061825},{x:.4193723578126433,y:.45622356923745777},{x:.4192660752068488,y:.4562474610875831},{x:.4191662841579818,y:.4562911481493166},{x:.41496369139475175,y:.45721461755172516},{x:.4107655979622113,y:.4581583300092093},{x:.27317359796221125,y:.47516033000920926},{x:.26964530070808584,y:.4752477446385603},{x:.2661231753027132,y:.4754739203661053},{x:.26524270860794985,y:.4753568201865933},{x:.26435476148695686,y:.47537881934450843},{x:.2608772057270339,y:.4747762176787918},{x:.2573786322781918,y:.4743109149236372},{x:.119951,y:.44207564006371447},{x:.119951,y:.684004},{x:.527101,y:.684004},{x:.5358800644907258,y:.6848686623818546},{x:.544321754456429,y:.6874294210369921},{x:.5521016604858822,y:.6915878674463855},{x:.5589208051533947,y:.6971841948466053},{x:.5645171325536146,y:.7040033395141179},{x:.5686755789630079,y:.711783245543571},{x:.5712363376181454,y:.7202249355092742},{x:.5721010000000001,y:.729004},{x:.5712363376181454,y:.7377830644907257},{x:.5686755789630079,y:.746224754456429},{x:.5645171325536146,y:.7540046604858821},{x:.5589208051533947,y:.7608238051533946},{x:.5521016604858822,y:.7664201325536145},{x:.544321754456429,y:.7705785789630079},{x:.5358800644907258,y:.7731393376181454},{x:.527101,y:.774004},{x:.074951,y:.774004},{x:.06617193550927424,y:.7731393376181454},{x:.05773024554357094,y:.7705785789630079},{x:.04995033951411792,y:.7664201325536145},{x:.04313119484660537,y:.7608238051533946},{x:.03753486744638546,y:.7540046604858821},{x:.0333764210369921,y:.746224754456429},{x:.03081566238185464,y:.7377830644907257},{x:.029951000000000005,y:.729004},{x:.029951000000000005,y:.38529899999999995}]],6:[[{x:.01994450211145162,y:.2755194646798348},{x:.020758274672659796,y:.26806396163938684},{x:.0201773643330274,y:.24423363638780976},{x:.020440223451033163,y:.2406784570189078},{x:.020568639264984916,y:.237115887070161},{x:.02076496657089406,y:.23628629421823594},{x:.02082782677693791,y:.23543610758842642},{x:.021779216218601925,y:.23200052126419074},{x:.022600187477202785,y:.22853145778054884},{x:.04459918747720279,y:.16442145778054884},{x:.04602253566469808,y:.16130748249724527},{x:.047307319174730654,y:.15813382633120915},{x:.06831231917473066,y:.11806482633120913},{x:.06934150993632018,y:.11649740482650416},{x:.07018719324152095,y:.11482382676006757},{x:.07175673818837072,y:.11281909673987861},{x:.07315419088510985,y:.11069082519836773},{x:.0744693948008918,y:.10935430641546007},{x:.07562532742241568,y:.1078778703106287},{x:.1253733274224157,y:.055788870310628645},{x:.12585541612958862,y:.055374327647901005},{x:.12626130847256478,y:.0548849335871293},{x:.1291958120945167,y:.0525019586891126},{x:.1320620582603259,y:.05003730581521479},{x:.13261575702973094,y:.04972477931463493},{x:.1331093263100589,y:.049323974491408525},{x:.1861743263100589,y:.014262974491408516},{x:.18683955107784095,y:.013911818906951787},{x:.187438960697758,y:.013457349607970202},{x:.1907349034619545,y:.011855559414887177},{x:.19397565070571454,y:.010144849670490022},{x:.19469660042216425,y:.009930220356283175},{x:.19537315511619574,y:.009601422573216056},{x:.19891826102894206,y:.008673416864759805},{x:.2024304811380398,y:.007627816351770726},{x:.20317945010986724,y:.007557961391993223},{x:.20390715026053782,y:.0073674706392518954},{x:.2857161502605378,y:-.005654529360748083},{x:.2860775594607644,y:-.005676122674759226},{x:.28642923596273784,y:-.0057621838110407525},{x:.2904772893795591,y:-.005938995755027237},{x:.2945219894833068,y:-.006180656673914681},{x:.2948806669536751,y:-.006131327641200151},{x:.2952423757850646,y:-.006147126454864343},{x:.38700037578506463,y:-.001139126454864331},{x:.39074801870473747,y:-.000562375362895672},{x:.3945101708776463,y:-8942684208443352e-20},{x:.395102371884912,y:.00010774663253235539},{x:.3957192721812796,y:.00020268575218489876},{x:.39928238663684656,y:.0014994835976446027},{x:.4028799824314506,y:.002697304024131271},{x:.47474098243145063,y:.03475230402413133},{x:.4764407459001163,y:.03572046389197228},{x:.4782361407270164,y:.03649705052245801},{x:.48026428101539703,y:.03789829234877595},{x:.4824063061811086,y:.03911835786940705},{x:.4838845305509628,y:.04039952221931584},{x:.48549392283388365,y:.041511451110380196},{x:.5363469228338836,y:.08458545111038014},{x:.5369424578291695,y:.08519979361043255},{x:.5376274627831791,y:.08571247952886965},{x:.5400078699953618,y:.08836201411598918},{x:.5424869876672573,y:.09091942444541115},{x:.5429512273484354,y:.09163814564059086},{x:.5435230500634102,y:.09227461827992436},{x:.5453408198626901,y:.09533763721244376},{x:.5472733759789791,y:.0983295594844189},{x:.5475884798754501,y:.09912503932225875},{x:.5480251455251356,y:.09986083939589693},{x:.5756631455251356,y:.15896283939589692},{x:.5756676990332947,y:.1589757429605767},{x:.575674675284325,y:.15898751446598428},{x:.5771354507402345,y:.1631350040011944},{x:.5785987361645655,y:.16728160865370237},{x:.5786006848177536,y:.16729515262537814},{x:.5786052305152959,y:.16730805894366996},{x:.5792288025114348,y:.17166083878445604},{x:.5798550088797246,y:.1760132404159827},{x:.5798542777922926,y:.17602690430741857},{x:.5798562182477396,y:.17604044945602063},{x:.5820672182477395,y:.2261264494560206},{x:.5819074721227447,y:.22907858468741052},{x:.5819395990078049,y:.232034864293962},{x:.5816696541741431,y:.23347350033714379},{x:.5815905637246603,y:.23493510513282764},{x:.580857954063737,y:.2377993509905685},{x:.5803127220992973,y:.2407050941577823},{x:.5648357220992973,y:.2937960941577823},{x:.5632290277642941,y:.2977974374258546},{x:.5616400226499054,y:.30180583827676916},{x:.5384240226499054,y:.3468838382767692},{x:.5373215489467563,y:.3485896803397862},{x:.5364060617863755,y:.35040275195151915},{x:.5349331318310961,y:.3522852445680167},{x:.5336357086983223,y:.35429272914301846},{x:.5322216254408594,y:.35575071197935654},{x:.5309700163849885,y:.3573503432435408},{x:.49559401638498846,y:.39441334324354077},{x:.4926979475395651,y:.39690515537305066},{x:.48986855873600776,y:.3994724304741097},{x:.48935820160472765,y:.3997787125549045},{x:.48890701524930746,y:.4001669186691625},{x:.48558046512393155,y:.4020458563236817},{x:.4823045917066957,y:.404011815580751},{x:.4336605917066957,y:.42705181558075106},{x:.43309173356321873,y:.4272557130907893},{x:.4325654489917744,y:.42755269513041455},{x:.42894434743018467,y:.4287422729922158},{x:.4253563740806812,y:.43002832091195864},{x:.42475866795602985,y:.4301173218701226},{x:.42418455747331046,y:.430305924456616},{x:.35674655747331047,y:.44533192445661596},{x:.3529000911149492,y:.4457998510145922},{x:.3490659246900917,y:.4463596961147396},{x:.28494592469009167,y:.4493636961147396},{x:.2805873413475358,y:.449139645094856},{x:.27622830276644406,y:.44892463285807194},{x:.20879130276644411,y:.4389076328580719},{x:.2058686377582091,y:.4381749274884603},{x:.2029059705898912,y:.4376259000221244},{x:.2015992206546876,y:.4371045944779896},{x:.20023455588710068,y:.4367624761715421},{x:.19751099279397463,y:.4354736658725529},{x:.19471236238975773,y:.4343572001231398},{x:.1250653623897577,y:.39829620012313977},{x:.12281565387932818,y:.3968352958512946},{x:.12046004217050754,y:.3955521266688945},{x:.11912493361112,y:.39443863469229795},{x:.1176668837895426,y:.39349181371392206},{x:.11574541108214431,y:.3916200839502759},{x:.11440461043594556,y:.3905018447245139},{x:.11499744675527566,y:.4076710597897629},{x:.14015918883207887,y:.48309781218266834},{x:.17625691985197756,y:.5624688107059582},{x:.22079283681825793,y:.6049160879451294},{x:.2812243215554422,y:.6473094683632384},{x:.35529887985725983,y:.6721340784004237},{x:.44197867319461825,y:.699237682451455},{x:.450099621980826,y:.7026829408131323},{x:.45739239245003865,y:.7076463180152294},{x:.4635767275229571,y:.7139370742553635},{x:.4684149666709443,y:.7213134592991232},{x:.47172117907685873,y:.729492002806001},{x:.4733683088520865,y:.7381584079356077},{x:.4732930577230865,y:.7469796295989887},{x:.471498317548545,y:.7556166731946181},{x:.4680530591868676,y:.7637376219808258},{x:.4630896819847706,y:.7710303924500386},{x:.4567989257446365,y:.7772147275229571},{x:.4494225407008768,y:.7820529666709441},{x:.4412439971939989,y:.7853591790768587},{x:.43257759206439217,y:.7870063088520864},{x:.4237563704010112,y:.7869310577230865},{x:.41511932680538177,y:.7851363175485448},{x:.32800332680538175,y:.7578963175485449},{x:.32758097645219697,y:.7577171382279785},{x:.32713377373466446,y:.7576146941984534},{x:.2464307737346645,y:.7305686941984535},{x:.24453959681011464,y:.7297206474805041},{x:.2425703892464572,y:.7290741531131611},{x:.24052462272791658,y:.727920241844807},{x:.2383814751569417,y:.7269592057619036},{x:.2366920823739949,y:.725758503708645},{x:.23488683737580707,y:.7247402582115807},{x:.16634483737580705,y:.6766572582115807},{x:.16379281785599412,y:.6744641039532857},{x:.16114120086592887,y:.6723924725748345},{x:.10785520086592887,y:.6216054725748346},{x:.10512406158167997,y:.61843588774195},{x:.10236095541706475,y:.6152941312068447},{x:.10224621895073822,y:.6150960484276141},{x:.1020967920615373,y:.6149226331776604},{x:.10003648617852028,y:.6112811321861437},{x:.09793939861820375,y:.6076606883504815},{x:.057256398618203745,y:.5182076883504814},{x:.05649445644348035,y:.515973451082899},{x:.055531562043165734,y:.5138181769891187},{x:.02756156204316574,y:.4299731769891187},{x:.02710606704062858,y:.4279720709807987},{x:.026442901166776424,y:.42602987841114226},{x:.0261294707087366,y:.42368163359604843},{x:.025603668479436986,y:.4213716499642221},{x:.02554732210120287,y:.4193201319800137},{x:.025275801747494525,y:.4172858808521062},{x:.022290801747494524,y:.3308368808521062},{x:.022305383523873214,y:.330608131273329},{x:.022277364333027405,y:.33038063638780973},{x:.021194122115214913,y:.2859434614650037},{x:.02071653916751727,y:.2843071590959475},{x:.01994450211145162,y:.2755194646798348}],[{x:.11034731747482908,y:.25010871966048204},{x:.11054573733688708,y:.2582483748303443},{x:.14138614929871246,y:.28974619429248377},{x:.17280436841728808,y:.32166563054627706},{x:.2294333737827033,y:.3509863272379111},{x:.2851142784460479,y:.35925709287120927},{x:.3409693478959939,y:.3566403020317264},{x:.39969116147327427,y:.34355637352239615},{x:.43624565447916347,y:.3262425111990739},{x:.46138408324665353,y:.29990528863548604},{x:.47964461062187336,y:.2644492215688011},{x:.49182659739178797,y:.22266115801633354},{x:.4903391577658353,y:.18896604218391924},{x:.47066764412974615,y:.14689983627465894},{x:.4322187986209955,y:.11433252320671945},{x:.3738017517723872,y:.08827446060346957},{x:.29512698962943984,y:.08398052210424463},{x:.22766698305582697,y:.09471851188045},{x:.18695506157646963,y:.1216176107024183},{x:.1450838647757246,y:.1654591474507099},{x:.12861258258928074,y:.1968796571354811},{x:.11034731747482908,y:.25010871966048204}]],7:[[{x:.026534000000000002,y:.729004},{x:.027398662381854635,y:.7202249355092742},{x:.029959421036992097,y:.711783245543571},{x:.03411786744638546,y:.7040033395141179},{x:.039714194846605363,y:.6971841948466053},{x:.046533339514117915,y:.6915878674463855},{x:.05431324554357096,y:.6874294210369921},{x:.06275493550927423,y:.6848686623818546},{x:.071534,y:.684004},{x:.4019606654607806,y:.684004},{x:.4004737160341744,y:.6825246433416329},{x:.3773547160341744,y:.6545006433416328},{x:.37631768094411194,y:.6529571778549935},{x:.37511206403824765,y:.6515414747212956},{x:.3516100640382476,y:.6177174747212957},{x:.35070717908442606,y:.6160998190359583},{x:.34962595461558005,y:.6145955036421288},{x:.32637595461558006,y:.5744575036421288},{x:.32562538351875275,y:.5728072168885044},{x:.3246890272988689,y:.5712547864166106},{x:.3023170272988689,y:.5242907864166106},{x:.3017220252289498,y:.5226423026482856},{x:.3009361907094137,y:.5210757809262708},{x:.2800741907094137,y:.4667717809262708},{x:.2796297795277362,y:.4651572895546526},{x:.27899211910181604,y:.46360891205912846},{x:.26027511910181605,y:.40145091205912853},{x:.2599700482242006,y:.399900691568321},{x:.2594722021762355,y:.3984012246220316},{x:.2435242021762355,y:.3278752246220315},{x:.24329560198997774,y:.32604433113097486},{x:.24285939794168837,y:.32425152465814894},{x:.22552039794168838,y:.201651524658149},{x:.22543629437721757,y:.19966542745190077},{x:.2251384028560513,y:.1976999971774209},{x:.21759140285605127,y:.0533799971774209},{x:.2179964236931644,y:.04456775725283754},{x:.22011284489303193,y:.03600385769296016},{x:.22385933357584556,y:.028017404355184638},{x:.22909191428257988,y:.020915312162427036},{x:.23560950187114016,y:.014970510534755857},{x:.24316162910560324,y:.010411454864839347},{x:.25145807197163045,y:.007413347105324521},{x:.2601800028225791,y:.006091402856051323},{x:.26899224274716244,y:.0064964236931644576},{x:.27755614230703984,y:.008612844893031955},{x:.2855425956448154,y:.0123593335758456},{x:.29264468783757297,y:.017591914282579925},{x:.29858948946524416,y:.02410950187114019},{x:.30314854513516065,y:.03166162910560326},{x:.30614665289467546,y:.03995807197163046},{x:.3074685971439487,y:.04868000282257914},{x:.3149118365119932,y:.19101580586964154},{x:.33171443080019297,y:.3098230069615897},{x:.3469078029209317,y:.3770118558572018},{x:.3646876244488305,y:.43605754408347375},{x:.3843219343355222,y:.48716585412502805},{x:.40516196826036527,y:.5309139031705462},{x:.42657620329737017,y:.5678827017045378},{x:.4479617026009278,y:.5986606409626235},{x:.4682073320853445,y:.6232016470905397},{x:.5069453480603512,y:.6602460238293135},{x:.5211069187127709,y:.670919967941474},{x:.553634852004927,y:.6903949675582732},{x:.5545334052571363,y:.6910607030437311},{x:.5555196604858821,y:.6915878674463855},{x:.5580709875097788,y:.6936816874233654},{x:.5607229359621996,y:.6956465083018619},{x:.5614743452153894,y:.6964747509099635},{x:.5623388051533946,y:.6971841948466053},{x:.5644326251303754,y:.699735521870503},{x:.5666502995990071,y:.7021799587443133},{x:.5672256886169725,y:.7031388795761127},{x:.5679351325536145,y:.7040033395141179},{x:.5694909811561905,y:.7069141275182039},{x:.5711891576548912,y:.709744242049125},{x:.5715664145603537,y:.7107969903148255},{x:.5720935789630078,y:.711783245543571},{x:.5730516658019124,y:.7149416345772374},{x:.5741650843601849,y:.7180486670509921},{x:.5743297113818354,y:.7191547862251302},{x:.5746543376181453,y:.7202249355092742},{x:.574977843953461,y:.7235095504532041},{x:.5754637165205229,y:.7267740993542682},{x:.5754093871342436,y:.7278910818973009},{x:.575519,y:.729004},{x:.5751954936646845,y:.7322886149439295},{x:.5750351484302645,y:.735585225488817},{x:.5747639504839017,y:.7366701463880269},{x:.5746543376181453,y:.7377830644907257},{x:.5736962507792408,y:.7409414535243923},{x:.5728958497207748,y:.7441434388186243},{x:.5724182051993175,y:.7451546051722857},{x:.5720935789630078,y:.746224754456429},{x:.570537730360432,y:.749135542460515},{x:.5691280324417267,y:.752119852004927},{x:.5684622969562688,y:.7530184052571364},{x:.5679351325536145,y:.7540046604858821},{x:.5658413125766343,y:.756555987509779},{x:.563876491698138,y:.7592079359621996},{x:.5630482490900365,y:.7599593452153895},{x:.5623388051533946,y:.7608238051533946},{x:.5597874781294971,y:.7629176251303754},{x:.5573430412556867,y:.7651352995990072},{x:.5563841204238874,y:.7657106886169726},{x:.5555196604858821,y:.7664201325536145},{x:.5526088724817957,y:.7679759811561907},{x:.5497787579508749,y:.7696741576548912},{x:.5487260096851745,y:.7700514145603538},{x:.547739754456429,y:.7705785789630079},{x:.5445813654227618,y:.7715366658019126},{x:.5414743329490078,y:.7726500843601849},{x:.5403682137748697,y:.7728147113818356},{x:.5392980644907257,y:.7731393376181454},{x:.5360134495467959,y:.773462843953461},{x:.5327489006457318,y:.7739487165205229},{x:.531631918102699,y:.7738943871342436},{x:.530519,y:.774004},{x:.071534,y:.774004},{x:.06275493550927423,y:.7731393376181454},{x:.054313245543570934,y:.7705785789630079},{x:.046533339514117915,y:.7664201325536145},{x:.039714194846605363,y:.7608238051533946},{x:.03411786744638546,y:.7540046604858821},{x:.029959421036992097,y:.746224754456429},{x:.027398662381854635,y:.7377830644907257},{x:.026534000000000002,y:.729004}]],8:[[{x:.018998734783549534,y:.19034712298183487},{x:.01918983868826437,y:.187136446932327},{x:.01920952916989005,y:.18392014879903562},{x:.019451409422642358,y:.18274188004279768},{x:.019522877627479743,y:.18154116541629586},{x:.0203366813486396,y:.1784294641291047},{x:.020983462121705806,y:.17527880768498513},{x:.021450563544301488,y:.17417036752890672},{x:.021754906310756543,y:.17300666705236456},{x:.02316013582774355,y:.17011352146289485},{x:.024409151469860245,y:.16714958466818597},{x:.06244715146986025,y:.097021584668186},{x:.06364531823888224,y:.0952519506947441},{x:.06465809579443724,y:.09337006609963419},{x:.0661122558858275,y:.09160840391706095},{x:.06739294989385258,y:.08971688123025286},{x:.06891333268610705,y:.08821500101819715},{x:.07027378747657535,y:.08656685940733966},{x:.07204368953204261,y:.0851227396301211},{x:.07366879313388441,y:.08351741302778071},{x:.0754529644913056,y:.08234100299139627},{x:.07710881500204132,y:.08098994152260804},{x:.14910981500204132,y:.03317594152260801},{x:.1504928100364302,y:.03244176283843531},{x:.15177178054792087,y:.031538475488709236},{x:.15438005907773164,y:.030378172358910993},{x:.15690151209615905,y:.029039630272177964},{x:.1584011644246711,y:.028589367572161194},{x:.15983178249634203,y:.027952951404511282},{x:.24949378249634205,y:-.0017990485954887184},{x:.251605077566582,y:-.002276091838878668},{x:.25365804064979064,y:-.002962007073194259},{x:.2558970148670134,y:-.0032458471890824472},{x:.2580984148155577,y:-.003743249464233246},{x:.2602622084630055,y:-.003799233220341744},{x:.26240953986016613,y:-.0040714555567724145},{x:.33848653986016614,y:-.006196455556772458},{x:.34211630259529946,y:-.0059410451417675775},{x:.3457527120689106,y:-.005810898556388326},{x:.34651004211407876,y:-.005631877045722989},{x:.3472863241290845,y:-.005577253499755554},{x:.35079651389094996,y:-.004618619143417753},{x:.3543376604369356,y:-.0037815449929937683},{x:.4535096604369356,y:.03022045500700621},{x:.45591274590665615,y:.03131812424947078},{x:.4583949217344816,y:.03222283453480715},{x:.45991547545056405,y:.03314647083206772},{x:.461533744189149,y:.033885655452327273},{x:.46367651039942226,y:.035431052006208004},{x:.4659344916938285,y:.03680262701864639},{x:.5338604916938285,y:.08780462701864639},{x:.5368034713408607,y:.09050382186837246},{x:.5397962541268131,y:.09314768896709699},{x:.5400513850489728,y:.09348269124727963},{x:.5403617177400871,y:.09376731720532937},{x:.5427215620660051,y:.09698879462990716},{x:.5451410464862535,y:.10016572352111452},{x:.5453259194365666,y:.1005440624001799},{x:.5455747614022292,y:.10088376225489704},{x:.547260782913003,y:.10450372268352329},{x:.5490139895381407,y:.10809162577156875},{x:.5802599895381407,y:.1920326257715688},{x:.5808621946470703,y:.19431314395649216},{x:.5816704362178704,y:.19652903198349428},{x:.5819856183913868,y:.19856748893015458},{x:.5825122482529622,y:.20056180773987195},{x:.5826579751325236,y:.20291599079595712},{x:.5830183882594349,y:.20524698126417715},{x:.5829298310737253,y:.20730775882392333},{x:.5830572695913885,y:.20936649774620245},{x:.5827409180393249,y:.21170387573884492},{x:.582639652248002,y:.21406038999182395},{x:.570412652248002,y:.30012638999182395},{x:.5703409363500996,y:.30042034316527866},{x:.5703238989157716,y:.30072243812390526},{x:.5692961437829783,y:.3047027979582916},{x:.5683217827960937,y:.30869656381164773},{x:.5681940974797931,y:.30897087767968473},{x:.5681184516122305,y:.3092638441298401},{x:.5663339148242972,y:.3129672173863048},{x:.5645991308441736,y:.31669415574996157},{x:.5644203829845738,y:.31693828858446854},{x:.5642890357120441,y:.31721086798977133},{x:.5618162960169492,y:.32049493611094637},{x:.5593877558190667,y:.3238118228336772},{x:.5591648145961691,y:.32401639274673566},{x:.5589828135206953,y:.3242581100335041},{x:.5032838135206953,y:.3848241100335041},{x:.5011622073766187,y:.38671918495638496},{x:.4991781602202921,y:.38875783119234486},{x:.4978799327840818,y:.3896509997457094},{x:.496704700181234,y:.39070074870143656},{x:.4942541493273608,y:.39214550546522026},{x:.4919105049301597,y:.39375791128677606},{x:.42072451102124153,y:.4330589294870645},{x:.4777200661568854,y:.4633968522602595},{x:.4805213378044988,y:.46526159042857346},{x:.48340658539474834,y:.46699355971902134},{x:.4841865730327025,y:.4677014480666941},{x:.48506339053858555,y:.46828512408085676},{x:.487447044167244,y:.4706605328159332},{x:.4899389620874836,y:.4729221066835925},{x:.4905658603159866,y:.4737685611946159},{x:.49131196047780046,y:.47451208064740324},{x:.493186393615322,y:.4773068743236967},{x:.4951892188573616,y:.48001114175313947},{x:.5250762188573616,y:.5299501417531395},{x:.5263287500632193,y:.5326029758232522},{x:.5277533683388757,y:.5351675080991},{x:.5282078804872482,y:.5365829335183069},{x:.5288425912810938,y:.5379272372855163},{x:.5295535131980511,y:.5407734546091212},{x:.5304504424054924,y:.5435666393545394},{x:.5306200854295579,y:.5450435386925929},{x:.5309803397786421,y:.5464858379730204},{x:.5311223320761199,y:.5494160600145488},{x:.5314571037289079,y:.5523305567062068},{x:.5328161037289079,y:.6362725567062067},{x:.5325682225912138,y:.6392892202473488},{x:.5325070847315841,y:.6423154334158161},{x:.5322077563487247,y:.6436760218476847},{x:.5320936668790056,y:.6450644677251389},{x:.5312620268462096,y:.647974807711247},{x:.530611678831884,y:.6509309456375182},{x:.530052664324664,y:.6522069946735811},{x:.5296698946987799,y:.6535465042014387},{x:.5282864552309536,y:.656238677898982},{x:.5270718895714029,y:.659011137860374},{x:.493108889571403,y:.7195761378603741},{x:.49086599866607616,y:.7227903647520136},{x:.4886941713149356,y:.7260530293196586},{x:.4883443495413535,y:.7264040725827037},{x:.48806074906628455,y:.7268104928286833},{x:.4852338901214668,y:.7295253929429124},{x:.4824672795427586,y:.7323016638284542},{x:.4820556943532359,y:.7325777150511769},{x:.48169825452511067,y:.7329209983380867},{x:.4783960621447291,y:.7350322395860499},{x:.4751409876314614,y:.737215426256307},{x:.4058559876314614,y:.774404426256307},{x:.40535390944732597,y:.7746134197603937},{x:.4048950878292554,y:.7749053846735706},{x:.40128606998249994,y:.7763066859700772},{x:.39771184087056327,y:.7777944834687843},{x:.3971786373679402,y:.7779015106266721},{x:.3966716723496766,y:.778098353858693},{x:.39285862044769176,y:.7787686450898307},{x:.3890628142527955,y:.7795305574683767},{x:.38851897614326597,y:.7795315052864096},{x:.3879833501061526,y:.7796256622622586},{x:.29017035010615255,y:.7870576622622585},{x:.28883979914978264,y:.7870279344512828},{x:.28751770557027906,y:.7871806372910648},{x:.2844390802539456,y:.7869296114679608},{x:.28135100845003463,y:.7868606162788429},{x:.2800518232654171,y:.7865718820648824},{x:.2787253424971381,y:.7864637231002555},{x:.20264834249713812,y:.7726567231002556},{x:.20090732012312768,y:.7721604024311715},{x:.19912055356042774,y:.7718689262507037},{x:.1966754417776232,y:.7709540028332816},{x:.19416478523538352,y:.7702382792713757},{x:.19255404347725652,y:.7694118386491953},{x:.19085847331495095,y:.7687773822377194},{x:.12157447331495094,y:.7347753822377193},{x:.11864840230662128,y:.7329636093328938},{x:.1156466869822177,y:.7312801255296781},{x:.11490452792065226,y:.7306454666247165},{x:.11407427694169714,y:.7301313894804525},{x:.11155788892673538,y:.7277835811487093},{x:.10894228211787771,y:.7255468394054793},{x:.1083381992447159,y:.7247795872431081},{x:.10762419278113186,y:.7241134140161837},{x:.10561419113974596,y:.7213197952150451},{x:.1034852091492498,y:.7186157522626143},{x:.05457920914924981,y:.6421127522626143},{x:.05400544809690788,y:.6409849569633866},{x:.05327967340990527,y:.639948436299892},{x:.05200937551205521,y:.6370614399018406},{x:.05057918033015655,y:.6342502218929852},{x:.050236465883645505,y:.633032161635733},{x:.04972685190376166,y:.6318739658087451},{x:.04904418748077848,y:.6287946194110116},{x:.04818991452487371,y:.6257584009293389},{x:.04809141700817653,y:.6244968850866522},{x:.047817547914863534,y:.6232615229122788},{x:.04774875137767971,y:.6201081640700103},{x:.04750322987838258,y:.6169636252890404},{x:.04765273449582791,y:.6157071332072875},{x:.04762513492475421,y:.6144420789610904},{x:.04817285008571219,y:.6113358894861711},{x:.048545515296550656,y:.608203873267779},{x:.04893727666953319,y:.607000691233013},{x:.04915700725673716,y:.6057545602402229},{x:.06817600725673716,y:.537751560240223},{x:.0695259178796919,y:.5342803033966695},{x:.07076883034011841,y:.5307693133112962},{x:.07112252784165454,y:.530174666206544},{x:.07137329591617819,y:.5295298232221028},{x:.07337447700044117,y:.5263886201035727},{x:.07527846743280868,y:.5231875729003385},{x:.0757413786311829,y:.522673354732434},{x:.07611313089295507,y:.5220898246495332},{x:.07868867817173447,y:.5193993899302627},{x:.08118057729149615,y:.5166313000580217},{x:.13823757729149616,y:.46456630005802163},{x:.1415344063491032,y:.46210392848613274},{x:.14479841194755694,y:.45959821041612353},{x:.17870395742216458,y:.4385038845164132},{x:.16590813892329467,y:.43401753680148847},{x:.1630836262780146,y:.43270367241359486},{x:.16018787852971583,y:.4315553012665589},{x:.15909238677042803,y:.43084708753997614},{x:.15790960896480868,y:.43029690071741367},{x:.15539569076452509,y:.4284572467838155},{x:.15277962009410193,y:.4267660089056696},{x:.07398562009410191,y:.3640750089056696},{x:.07334669706368892,y:.36345515994886657},{x:.07261876409580822,y:.3629427646304707},{x:.07018582297292754,y:.3603886489381779},{x:.067654053855944,y:.3579324619307791},{x:.06714833408498834,y:.3571998754981266},{x:.06653435151263618,y:.35655531303498644},{x:.06464644192410274,y:.3535756306924294},{x:.06264249835499126,y:.3506727149773525},{x:.06228941637067996,y:.3498555439546183},{x:.061812979199786275,y:.3491035845207174},{x:.026491979199786284,y:.27897658452071744},{x:.026206182636496978,y:.2782362375154344},{x:.02580526951533789,y:.27755135647970497},{x:.024619992088609113,y:.2741272608068926},{x:.023315086847465263,y:.27074694483548933},{x:.02317921632066564,y:.26996506724675395},{x:.022919620294515476,y:.2692151317381758},{x:.022425125568608657,y:.2656255929487299},{x:.02180476064715109,y:.2620556544171705},{x:.02182403758498896,y:.26126229336223583},{x:.021715734783549545,y:.26047612298183487},{x:.018998734783549534,y:.19034712298183487}],[{x:.10940940002433477,y:.19920410482166873},{x:.1112697837122767,y:.2472228194523932},{x:.137749803196691,y:.2997967648781603},{x:.20286290613296581,y:.3516028102138205},{x:.27392321813344717,y:.3765172983642545},{x:.30180455045059645,y:.38547932587505673},{x:.3589974388819276,y:.364332623176267},{x:.44199758150171664,y:.31850914110336725},{x:.48327372240847105,y:.27362627516037924},{x:.4919267227459848,y:.21271770175329152},{x:.46927072007314496,y:.15185335046477932},{x:.41758736799183827,y:.11304708595854013},{x:.33285528741119674,y:.08399594043457195},{x:.2715476841223936,y:.0857083982994813},{x:.19388634557978268,y:.1114782912788902},{x:.13622191473335832,y:.14977174687660325},{x:.10940940002433477,y:.19920410482166873}],[{x:.1412545940070051,y:.610603192179028},{x:.17253143522148345,y:.6595291354872365},{x:.22488466829434647,y:.6852221473073319},{x:.28911227954018853,y:.6968786351876549},{x:.37167628924266627,y:.6906052797020977},{x:.4210229734590171,y:.664118250196117},{x:.4426312796779887,y:.6255849325813003},{x:.4416638895166663,y:.5658316839266069},{x:.4243877259953326,y:.5369644730960824},{x:.3411654121752423,y:.49266641996418925},{x:.3038587353431559,y:.48067475972705925},{x:.2482367446999157,y:.5012406330709052},{x:.1958501022844071,y:.5338329684082593},{x:.1513751879049268,y:.5744167077770947},{x:.1412545940070051,y:.610603192179028}]],9:[[{x:.04617702144416433,y:.5785043710151274},{x:.046308257010348054,y:.5777836867379841},{x:.04632014162646953,y:.5770512474182771},{x:.047097404355444614,y:.5734500590446777},{x:.04775742235616295,y:.5698255492446179},{x:.06775742235616294,y:.499825549244618},{x:.06870401207934061,y:.497431122678351},{x:.06945142103699212,y:.4949672455435709},{x:.07032179921115676,y:.4933388825112154},{x:.07100061044171635,y:.4916218095236955},{x:.07239614115864691,y:.4894580616864063},{x:.07360986744638548,y:.48718733951411786},{x:.07478119941633177,y:.4857600673791044},{x:.07578195180149752,y:.48420841696912487},{x:.07757279404935197,y:.4823584994767568},{x:.07920619484660538,y:.4803681948466053},{x:.1292061948466054,y:.43036819484660543},{x:.1324047212320044,y:.4277432320802026},{x:.1355710052680468,y:.42507946670648067},{x:.13581237417673697,y:.4249466435819557},{x:.13602533951411794,y:.4247718674463855},{x:.13967451194327588,y:.422821344145996},{x:.14329963156393744,y:.42082647364918746},{x:.21329963156393744,y:.39082647364918743},{x:.21510775104315333,y:.39025382151681987},{x:.2168404136401385,y:.3894823898342746},{x:.21930272871556003,y:.3889252240779052},{x:.22170947225776405,y:.3881629808537447},{x:.22359456811709633,y:.38795407868297094},{x:.22544443694348562,y:.38753549554788497},{x:.30544443694348566,y:.37753549554788496},{x:.30933066171136914,y:.37743373006124875},{x:.3132134481214367,y:.3772411973248817},{x:.31373545479679327,y:.3773183852372503},{x:.314262956584918,y:.37730457196617717},{x:.3180943620951528,y:.37796292671622445},{x:.321940103126635,y:.37853158749346005},{x:.39912055139763536,y:.39782669956121014},{x:.3920145202755848,y:.3793136184800785},{x:.3919728818872528,y:.3791621799808353},{x:.39190347676812315,y:.3790212888743934},{x:.33928123709710245,y:.23902627390054626},{x:.29593066247424293,y:.13853176000209894},{x:.2601678276974797,y:.06104561798577861},{x:.25727396725620644,y:.05271224015242973},{x:.25606147289685455,y:.04397442167208486},{x:.2565769400976792,y:.035167952008718584},{x:.2588005597432301,y:.02663125885276897},{x:.2626468793775489,y:.018692402534786497},{x:.2679680870941297,y:.011656468850909336},{x:.274559691864592,y:.005793844786811796},{x:.2821683820142214,y:.0013298276974796769},{x:.29050175984757026,y:-.0015640327437935753},{x:.29923957832791515,y:-.002776527103145486},{x:.30804604799128144,y:-.002261059902320825},{x:.31658274114723106,y:-3744025676995222e-20},{x:.32452159746521353,y:.003808879377548882},{x:.3315575311490907,y:.009130087094129706},{x:.33742015521318824,y:.015721691864591977},{x:.34188417230252033,y:.023330382014221395},{x:.3778841723025203,y:.10133038201422136},{x:.3780704961344211,y:.10186693411204945},{x:.37834550457920557,y:.10236389998544072},{x:.42234550457920556,y:.2043638999854408},{x:.4226728981736059,y:.20538920106595157},{x:.42314852323187685,y:.20635471112560658},{x:.47609350933819694,y:.3472083534084579},{x:.5496013805841499,y:.5387157021808093},{x:.5512752235949963,y:.542063388202502},{x:.5520259437659378,y:.5440252139743784},{x:.5529745491659372,y:.5458993775022888},{x:.553598518494472,y:.5481347580495968},{x:.5544279630456541,y:.5503023109672317},{x:.5547815251174404,y:.5523728990468965},{x:.5553462721645,y:.554396114781092},{x:.555522150986547,y:.5567102734952235},{x:.5559127893965689,y:.5589979940959194},{x:.5558556061770612,y:.5610977729446709},{x:.5560147919588762,y:.5631922898391183},{x:.5557358213499382,y:.5654962948984841},{x:.5556726416037749,y:.5678162673625252},{x:.5552069106120301,y:.5698645436567753},{x:.5549544177082778,y:.5719498706018395},{x:.5349544177082779,y:.6619498706018395},{x:.5345092452033302,y:.663307558548854},{x:.5342480120020212,y:.6647122835522489},{x:.5331378863550271,y:.6674899313564284},{x:.5322058990004909,y:.6703323081518522},{x:.5315044085816177,y:.6715770596583215},{x:.5309741466497647,y:.6729038291953012},{x:.5293434595512297,y:.6754115305058349},{x:.5278748598680685,y:.6780174701150343},{x:.5269440094186665,y:.6791014500786302},{x:.5261650964249364,y:.6802992771399491},{x:.4861650964249363,y:.7302992771399491},{x:.4855393928217795,y:.7309407996522789},{x:.48502142797480674,y:.7316720783612058},{x:.48246447922773295,y:.7340934525762789},{x:.48000567043073006,y:.7366144244690945},{x:.4792668347133476,y:.7371215515888083},{x:.4786161570168623,y:.7377377290536072},{x:.47563595264764597,y:.7396137412876539},{x:.4727325719538572,y:.7416065836124539},{x:.4719089971645242,y:.7419598267287414},{x:.4711506117974981,y:.7424372235949962},{x:.4111506117974981,y:.7724372235949962},{x:.40814803697660645,y:.7735862009991664},{x:.4052110607504687,y:.7748937847545917},{x:.4040364518244048,y:.77515955677446},{x:.40291168903276836,y:.7755899630456542},{x:.39974265347336024,y:.7761310898824948},{x:.39660701348596056,y:.7768405731449995},{x:.3166070134859606,y:.7868395731449994},{x:.31542693671630134,y:.7868704603456931},{x:.31426350899694466,y:.7870703881908964},{x:.3110259999999998,y:.7869856499834279},{x:.3077884910030554,y:.7870703881908964},{x:.3066250632836987,y:.7868704603456931},{x:.30544498651403945,y:.7868395731449994},{x:.22544498651403946,y:.7768405731449995},{x:.22359484289355938,y:.7764219517671516},{x:.22170947225776405,y:.7762130191462554},{x:.21930299190993624,y:.775450859278766},{x:.2168409392495313,y:.7748937847545917},{x:.21510801459933976,y:.7741222619544408},{x:.21329963156393744,y:.7735495263508126},{x:.14329963156393744,y:.7435495263508126},{x:.1396745119432796,y:.741554655854006},{x:.13602533951411788,y:.7396041325536146},{x:.13581237417673678,y:.7394293564180442},{x:.1355710052680468,y:.7392965332935194},{x:.13240472123200803,y:.7366327679198006},{x:.12920619484660534,y:.7340078051533947},{x:.07920619484660535,y:.6840078051533947},{x:.07757279404935197,y:.6820175005232432},{x:.0757819518014975,y:.6801675830308751},{x:.07478119941633177,y:.6786159326208956},{x:.07360986744638545,y:.6771886604858821},{x:.07239614115864686,y:.6749179383135936},{x:.07100061044171635,y:.6727541904763045},{x:.07032179921115676,y:.6710371174887846},{x:.06945142103699209,y:.669408754456429},{x:.06870401207934061,y:.666944877321649},{x:.06775742235616294,y:.664550450755382},{x:.04775742235616295,y:.5945504507553819},{x:.0470974043554446,y:.590925940955322},{x:.04632014162646953,y:.5873247525817227},{x:.046308257010348054,y:.5865923132620157},{x:.04617702144416433,y:.5858716289848723},{x:.0462367922883029,y:.5821879999999999},{x:.04617702144416433,y:.5785043710151274}],[{x:.13782670643108905,y:.5821879999999999},{x:.15109114488080894,y:.6286135345740196},{x:.18671787059591238,y:.6642402602891231},{x:.24291204200407931,y:.688323476606909},{x:.311026,y:.696836869931924},{x:.377796042530131,y:.6884914492411893},{x:.4220611757635009,y:.6663588826245044},{x:.4493630453483168,y:.6322315456434845},{x:.46363172164975686,y:.5680225022870041},{x:.4540425513192988,y:.5488441616260881},{x:.42235697647551157,y:.5171585867823008},{x:.37255000597497323,y:.48395393978194207},{x:.30826669745594837,y:.4678831126521858},{x:.24291230161158606,y:.4760524121327311},{x:.1867178705959123,y:.500135739710877},{x:.15109114488080894,y:.5357624654259804},{x:.13782670643108905,y:.5821879999999999}]],"!":[[{x:.20646600000000004,y:.05103000000000002},{x:.20733066238185466,y:.04225093550927423},{x:.20989142103699213,y:.03380924554357098},{x:.2140498674463855,y:.026029339514117927},{x:.21964619484660539,y:.019210194846605383},{x:.22646533951411793,y:.013613867446385479},{x:.23424524554357098,y:.009455421036992116},{x:.24268693550927425,y:.006894662381854655},{x:.251466,y:.0060300000000000215},{x:.350587,y:.0060300000000000215},{x:.3593660644907258,y:.006894662381854655},{x:.36780775445642905,y:.009455421036992116},{x:.3755876604858821,y:.013613867446385479},{x:.38240680515339465,y:.019210194846605383},{x:.3880031325536145,y:.026029339514117927},{x:.3921615789630079,y:.03380924554357098},{x:.39472233761814535,y:.04225093550927425},{x:.39558699999999997,y:.05103000000000002},{x:.39472233761814535,y:.05980906449072579},{x:.3921615789630079,y:.06825075445642906},{x:.3880031325536145,y:.07603066048588211},{x:.38240680515339465,y:.08284980515339466},{x:.3755876604858821,y:.08844613255361455},{x:.36780775445642905,y:.09260457896300792},{x:.3593660644907258,y:.09516533761814538},{x:.350587,y:.09603000000000002},{x:.251466,y:.09603000000000002},{x:.24268693550927425,y:.09516533761814538},{x:.23424524554357098,y:.09260457896300792},{x:.22646533951411793,y:.08844613255361455},{x:.21964619484660539,y:.08284980515339466},{x:.2140498674463855,y:.07603066048588211},{x:.20989142103699213,y:.06825075445642906},{x:.20733066238185466,y:.05980906449072579},{x:.20646600000000004,y:.05103000000000002}],[{x:.25602600000000003,y:.25043400000000005},{x:.25689066238185465,y:.24165493550927428},{x:.2594514210369921,y:.233213245543571},{x:.2636098674463855,y:.22543333951411795},{x:.26920619484660535,y:.2186141948466054},{x:.27602533951411795,y:.2130178674463855},{x:.283805245543571,y:.20885942103699215},{x:.2922469355092743,y:.20629866238185468},{x:.301026,y:.20543400000000006},{x:.3098050644907258,y:.20629866238185468},{x:.3182467544564291,y:.20885942103699215},{x:.32602666048588214,y:.2130178674463855},{x:.3328458051533947,y:.2186141948466054},{x:.33844213255361455,y:.22543333951411795},{x:.34260057896300794,y:.233213245543571},{x:.3451613376181454,y:.24165493550927428},{x:.346026,y:.25043400000000005},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.25043400000000005}]],'"':[[{x:.12004,y:.476978},{x:.12090466238185463,y:.4681989355092742},{x:.1234654210369921,y:.459757245543571},{x:.12762386744638546,y:.4519773395141179},{x:.13322019484660536,y:.44515819484660535},{x:.1400393395141179,y:.4395618674463855},{x:.14781924554357095,y:.4354034210369921},{x:.15626093550927422,y:.43284266238185465},{x:.16504,y:.43197800000000003},{x:.17381906449072576,y:.43284266238185465},{x:.18226075445642903,y:.4354034210369921},{x:.19004066048588208,y:.4395618674463855},{x:.19685980515339463,y:.44515819484660535},{x:.20245613255361453,y:.4519773395141179},{x:.2066145789630079,y:.459757245543571},{x:.20917533761814536,y:.4681989355092742},{x:.21004,y:.476978},{x:.21004,y:.729004},{x:.20917533761814536,y:.7377830644907257},{x:.2066145789630079,y:.746224754456429},{x:.20245613255361453,y:.7540046604858821},{x:.19685980515339463,y:.7608238051533946},{x:.19004066048588208,y:.7664201325536145},{x:.18226075445642903,y:.7705785789630079},{x:.17381906449072576,y:.7731393376181454},{x:.16504,y:.774004},{x:.15626093550927422,y:.7731393376181454},{x:.14781924554357095,y:.7705785789630079},{x:.1400393395141179,y:.7664201325536145},{x:.13322019484660536,y:.7608238051533946},{x:.12762386744638546,y:.7540046604858821},{x:.1234654210369921,y:.746224754456429},{x:.12090466238185463,y:.7377830644907257},{x:.12004,y:.729004},{x:.12004,y:.476978}],[{x:.392013,y:.476978},{x:.3928776623818546,y:.4681989355092742},{x:.39543842103699206,y:.459757245543571},{x:.39959686744638545,y:.4519773395141179},{x:.4051931948466053,y:.44515819484660535},{x:.4120123395141179,y:.4395618674463855},{x:.419792245543571,y:.4354034210369921},{x:.42823393550927424,y:.43284266238185465},{x:.437013,y:.43197800000000003},{x:.4457920644907258,y:.43284266238185465},{x:.45423375445642905,y:.4354034210369921},{x:.4620136604858821,y:.4395618674463855},{x:.46883280515339465,y:.44515819484660535},{x:.4744291325536145,y:.4519773395141179},{x:.4785875789630079,y:.459757245543571},{x:.48114833761814535,y:.4681989355092742},{x:.48201299999999997,y:.476978},{x:.48201299999999997,y:.729004},{x:.48114833761814535,y:.7377830644907257},{x:.4785875789630079,y:.746224754456429},{x:.4744291325536145,y:.7540046604858821},{x:.46883280515339465,y:.7608238051533946},{x:.4620136604858821,y:.7664201325536145},{x:.45423375445642905,y:.7705785789630079},{x:.4457920644907258,y:.7731393376181454},{x:.437013,y:.774004},{x:.42823393550927424,y:.7731393376181454},{x:.419792245543571,y:.7705785789630079},{x:.4120123395141179,y:.7664201325536145},{x:.4051931948466053,y:.7608238051533946},{x:.39959686744638545,y:.7540046604858821},{x:.39543842103699206,y:.746224754456429},{x:.3928776623818546,y:.7377830644907257},{x:.392013,y:.729004},{x:.392013,y:.476978}]],"#":[[{x:-.04343582416242281,y:.17932596542766122},{x:-.043155600373289436,y:.1705088746946064},{x:-.04116063193533153,y:.16191587083690517},{x:-.037527584366828626,y:.15387717817379684},{x:-.03239607364840174,y:.1467017191561739},{x:-.025963300859175642,y:.14066524265003977},{x:-.01847647384989975,y:.13599972706223024},{x:-.010223307183879607,y:.1328844655403335},{x:-.0015209654276611437,y:.13143917583757725},{x:.007296125305393629,y:.13171939962671061},{x:.11028337660265361,y:.14517801654688708},{x:.10171449233133083,y:.05447855391336175},{x:.10174959121806887,y:.04565708110917159},{x:.10350499965956604,y:.03701195788446062},{x:.10691325829386003,y:.02887541147651351},{x:.11184338965300836,y:.02156012480075985},{x:.11810593155372849,y:.015347220221688843},{x:.1254602180228497,y:.01047545617803717},{x:.13362362795569505,y:.007132051829885598},{x:.14228244608663826,y:.005445492331330834},{x:.15110391889082841,y:.0054805912180688685},{x:.1597490421155394,y:.0072359996595660475},{x:.1678855885234865,y:.010644258293860037},{x:.17520087519924016,y:.015574389653008364},{x:.18141377977831116,y:.02183693155372849},{x:.18628554382196283,y:.029191218022849703},{x:.18962894817011441,y:.03735462795569504},{x:.19131550766866917,y:.04601344608663827},{x:.2018142041879224,y:.1571394809935999},{x:.36570083500909,y:.17855657247605955},{x:.35397849233133083,y:.05447855391336175},{x:.35401359121806886,y:.04565708110917159},{x:.35576899965956604,y:.03701195788446062},{x:.35917725829386,y:.02887541147651351},{x:.3641073896530084,y:.02156012480075985},{x:.3703699315537285,y:.015347220221688843},{x:.37772421802284967,y:.01047545617803717},{x:.38588762795569503,y:.007132051829885598},{x:.39454644608663825,y:.005445492331330834},{x:.4033679188908284,y:.0054805912180688685},{x:.4120130421155394,y:.0072359996595660475},{x:.4201495885234865,y:.010644258293860037},{x:.42746487519924015,y:.015574389653008364},{x:.4336777797783111,y:.02183693155372849},{x:.4385495438219628,y:.029191218022849703},{x:.44189294817011443,y:.03735462795569504},{x:.44357950766866916,y:.04601344608663827},{x:.45723166259435877,y:.19051803692277236},{x:.5748861253053936,y:.20589339962671058},{x:.5834791291630949,y:.20788836806466848},{x:.5915178218262032,y:.2115214156331714},{x:.5986932808438261,y:.21665292635159827},{x:.6047297573499603,y:.22308569914082438},{x:.6093952729377698,y:.23057252615010027},{x:.6125105344596665,y:.2388256928161204},{x:.6139558241624228,y:.24752803457233888},{x:.6136756003732894,y:.25634512530539366},{x:.6116806319353315,y:.2649381291630949},{x:.6080475843668286,y:.2729768218262032},{x:.6029160736484017,y:.2801522808438262},{x:.5964833008591757,y:.2861887573499603},{x:.5889964738498997,y:.29085427293776983},{x:.5807433071838796,y:.29396953445966656},{x:.5720409654276611,y:.2954148241624228},{x:.5632238746946063,y:.2951346003732895},{x:.4659139564059225,y:.28241791072205386},{x:.48521785958998953,y:.48674482074743597},{x:.6064180682130128,y:.5025833921657807},{x:.6150110746232834,y:.5045783496089273},{x:.6230497719348954,y:.5082113868918628},{x:.6302252375183169,y:.5133428884292346},{x:.6362617222552247,y:.5197756534947408},{x:.640927247422479,y:.5272624745344501},{x:.6440425195043586,y:.5355156372144642},{x:.645487820341822,y:.544217977121417},{x:.6452076078342193,y:.5530350682130128},{x:.6432126503910727,y:.5616280746232835},{x:.6395796131081373,y:.5696667719348955},{x:.6344481115707654,y:.576842237518317},{x:.6280153465052593,y:.5828787222552247},{x:.6205285254655499,y:.587544247422479},{x:.6122753627855358,y:.5906595195043587},{x:.603573022878583,y:.592104820341822},{x:.5947559317869872,y:.5918246078342193},{x:.493900150869001,y:.5786446677402959},{x:.5066445076686692,y:.7135404460866382},{x:.5066094087819312,y:.7223619188908285},{x:.5048540003404339,y:.7310070421155394},{x:.50144574170614,y:.7391435885234865},{x:.4965156103469916,y:.7464588751992401},{x:.4902530684462715,y:.7526717797783111},{x:.4828987819771503,y:.7575435438219629},{x:.47473537204430494,y:.7608869481701144},{x:.4660765539133617,y:.7625735076686692},{x:.45725508110917157,y:.7625384087819311},{x:.44860995788446056,y:.760783000340434},{x:.4404734114765135,y:.7573747417061399},{x:.43315812480075977,y:.7524446103469916},{x:.4269452202216888,y:.7461820684462716},{x:.42207345617803715,y:.7388277819771503},{x:.41873005182988554,y:.730664372044305},{x:.4170434923313308,y:.7220055539133617},{x:.40236933467780645,y:.5666833238969633},{x:.23848272425781383,y:.5452664483557571},{x:.25438050766866915,y:.7135404460866382},{x:.2543454087819311,y:.7223619188908285},{x:.25259000034043394,y:.7310070421155394},{x:.24918174170614,y:.7391435885234865},{x:.2442516103469916,y:.7464588751992401},{x:.23798906844627152,y:.7526717797783111},{x:.2306347819771503,y:.7575435438219629},{x:.22247137204430495,y:.7608869481701144},{x:.21381255391336174,y:.7625735076686692},{x:.20499108110917158,y:.7625384087819311},{x:.1963459578844606,y:.760783000340434},{x:.18820941147651346,y:.7573747417061399},{x:.1808941248007598,y:.7524446103469916},{x:.17468122022168883,y:.7461820684462716},{x:.16980945617803714,y:.7388277819771503},{x:.16646605182988555,y:.730664372044305},{x:.16477949233133082,y:.7220055539133617},{x:.14695190806661926,y:.5333051045124245},{x:.02716793178698713,y:.5176516078342193},{x:.01857492537671658,y:.5156566503910727},{x:.01053622806510461,y:.5120236131081373},{x:.0033607624816830023,y:.5068921115707654},{x:-.0026757222552247634,y:.5004593465052593},{x:-.0073412474224789775,y:.4929725254655499},{x:-.010456519504358698,y:.48471936278553585},{x:-.011901820341822023,y:.476017022878583},{x:-.011621607834219276,y:.4671999317869871},{x:-.00962665039107264,y:.45860692537671655},{x:-.005993613108137223,y:.45056822806510455},{x:-.0008621115707654614,y:.44339276248168297},{x:.005570653494740684,y:.4373562777447752},{x:.013057474534450029,y:.432690752577521},{x:.02131063721446411,y:.42957548049564126},{x:.03001297712141698,y:.42813017965817796},{x:.03883006821301287,y:.4284103921657807},{x:.13826961678760774,y:.4414052575195645},{x:.1189656704142173,y:.23707789034616855},{x:-.004366125305393629,y:.2209606003732895},{x:-.012959129163094893,y:.21896563193533158},{x:-.0209978218262032,y:.2153325843668287},{x:-.028173280843826164,y:.2102010736484018},{x:-.034209757349960276,y:.2037683008591757},{x:-.03887527293776982,y:.1962814738498998},{x:-.041990534459666565,y:.18802830718387967},{x:-.04343582416242281,y:.17932596542766122}],[{x:.2104964979994861,y:.24903935479288136},{x:.22980043297880234,y:.4533666013628972},{x:.39368704339879496,y:.4747834769041034},{x:.3743831288206537,y:.27045644627534104},{x:.2104964979994861,y:.24903935479288136}]],$:[[{x:.030517420733400163,y:.165091535964518},{x:.03086584266660257,y:.1562768767808978},{x:.032927224468652025,y:.14769956254897784},{x:.06950822446865203,y:.04228956254897785},{x:.0704003940010533,y:.04035550336969822},{x:.07109145007989037,y:.03834080913001754},{x:.07224350295250744,y:.03635998272422403},{x:.073203348392932,y:.034279214644477654},{x:.0744556913660193,y:.03255637151138059},{x:.07552651634405921,y:.03071520740954014},{x:.07704287290513265,y:.02899719639360223},{x:.07839021289928177,y:.02714366624511229},{x:.07995460247492134,y:.0256982470536212},{x:.08136404514878363,y:.02410136799351792},{x:.08318643266605391,y:.022712194567306505},{x:.08486948969354943,y:.02115713247420773},{x:.0866858072576693,y:.0200446838732511},{x:.08837970353582197,y:.01875345702162473},{x:.17373770353582196,y:-.03394954297837521},{x:.17475219432147746,y:-.03444582628601368},{x:.17568351020275566,y:-.03508468417701866},{x:.17870701554383397,y:-.03638050305696308},{x:.18166188368778688,y:-.037826008286632525},{x:.18275370138776084,y:-.03811483831561822},{x:.18379175728720304,y:-.038559730016208084},{x:.18700996854351615,y:-.03924079346911771},{x:.19019006380536974,y:-.04008205754340442},{x:.19131725047775072,y:-.0401523347177012},{x:.19242215448928965,y:-.04038616328932037},{x:.262121,y:-.048110644533924524},{x:.262121,y:-.08350199999999997},{x:.2629856623818546,y:-.09228106449072573},{x:.26554642103699205,y:-.100722754456429},{x:.26970486744638544,y:-.10850266048588206},{x:.2753011948466053,y:-.1153218051533946},{x:.2821203395141179,y:-.1209181325536145},{x:.28990024554357097,y:-.12507657896300786},{x:.29834193550927424,y:-.12763733761814533},{x:.307121,y:-.12850199999999995},{x:.3159000644907258,y:-.12763733761814533},{x:.32434175445642904,y:-.12507657896300786},{x:.3321216604858821,y:-.1209181325536145},{x:.33894080515339464,y:-.1153218051533946},{x:.3445371325536145,y:-.10850266048588206},{x:.3486955789630079,y:-.100722754456429},{x:.35125633761814534,y:-.09228106449072573},{x:.35212099999999996,y:-.08350199999999997},{x:.35212099999999996,y:-.05796857189257534},{x:.3537665284657676,y:-.05798865052825875},{x:.3565834008023822,y:-.05822276473922817},{x:.35816715833059226,y:-.05804234673933715},{x:.35976104048452195,y:-.05806179518994546},{x:.3625398346041163,y:-.05754422155704884},{x:.36534825494544937,y:-.05722429279787242},{x:.3668663832111493,y:-.05673836571308556},{x:.3684334335709129,y:-.056446489484502926},{x:.37105786033397337,y:-.05539674504422484},{x:.37374990266128777,y:-.05453506799769968},{x:.49568890266128773,y:-.0018330679976996528},{x:.4995437197067623,y:.0003036028478311586},{x:.5033988605511543,y:.0024396894158641644},{x:.5034014762743246,y:.0024419030290919073},{x:.503404473339876,y:.00244356426035406},{x:.5067683773534712,y:.005291217073469004},{x:.510132712931077,y:.008138360005776092},{x:.5101348465393426,y:.008141041387321917},{x:.510137461926978,y:.00814325539697476},{x:.5128811799638975,y:.011592456477016289},{x:.5156254207452635,y:.015041241667436683},{x:.5156269902452553,y:.015044287773311453},{x:.5156291234470946,y:.015046969478205698},{x:.5176472159618929,y:.018965167962033513},{x:.519665902312761,y:.02288306052976895},{x:.5684429023127611,y:.1458620605297689},{x:.5688122064775901,y:.14714915498994666},{x:.5693537919217377,y:.14837377040805427},{x:.5700262192706007,y:.15138021786244946},{x:.5708758841928585,y:.15434145989163614},{x:.5709869926090132,y:.15567587086110493},{x:.5712792610244494,y:.1569826137160382},{x:.5713522390683521,y:.16006247719363653},{x:.5716078682563359,y:.16313258119086366},{x:.5714565110896938,y:.16446302800441426},{x:.5714882307651191,y:.1658016809010868},{x:.5709589549987614,y:.16883660297565092},{x:.5706107247661352,y:.1718975865660398},{x:.570202718587728,y:.17317294089875004},{x:.5699726705538047,y:.1744920601570685},{x:.5455836705538047,y:.26233106015706853},{x:.5448796820390573,y:.26415145628779163},{x:.5443792359109676,y:.2660379863232085},{x:.5432925447356423,y:.2682555269445408},{x:.5424018225194911,y:.2705587850827968},{x:.5413562192793141,y:.27220686146627543},{x:.5404973453311464,y:.27395951015977},{x:.5389989139081434,y:.2759224384285429},{x:.5376759632977357,y:.2780076688235372},{x:.5363289272782685,y:.2794200908086057},{x:.5351446315541886,y:.28097150485378414},{x:.5332920437627642,y:.28260438653745124},{x:.5315877050081386,y:.28439145495451523},{x:.529991002048182,y:.2855139439563835},{x:.528526796368706,y:.2868045033815319},{x:.4553637963687061,y:.3395095033815319},{x:.4552094954443409,y:.33959910378534747},{x:.4550747122553104,y:.3397160246969866},{x:.45139660000367776,y:.341813199213456},{x:.44773515946955245,y:.3439393468807752},{x:.44756634322254935,y:.3439971230209339},{x:.4474113397164003,y:.34408550243429054},{x:.4433947629085852,y:.34542481622689836},{x:.43938888509457313,y:.34679579895012297},{x:.43921204103863115,y:.34681953052195974},{x:.439042773913178,y:.34687597206574233},{x:.35212099999999996,y:.3666493043587998},{x:.35212099999999996,y:.6320956693586206},{x:.3838005126074005,y:.6288356018928482},{x:.4577579663937751,y:.5527249728659002},{x:.46449612147708186,y:.5470313904751531},{x:.47221556762189953,y:.5427617575185425},{x:.48061965084199804,y:.5400801535961528},{x:.48938540693229315,y:.5390896312428609},{x:.49817597280212744,y:.5398282556772123},{x:.5066535319349293,y:.5422676419764202},{x:.5144922964874953,y:.5463140458930298},{x:.5213910271340998,y:.551811966393775},{x:.5270846095248467,y:.5585501214770818},{x:.5313542424814575,y:.5662695676218995},{x:.534035846403847,y:.5746736508419981},{x:.535026368757139,y:.5834394069322931},{x:.5342877443227877,y:.5922299728021274},{x:.5318483580235798,y:.6007075319349293},{x:.5278019541069703,y:.6085462964874953},{x:.5223040336062249,y:.6154450271340998},{x:.4369490336062249,y:.7032850271340998},{x:.435089451582588,y:.7048563301588934},{x:.43337550685970433,y:.706585327551969},{x:.43172842132509603,y:.7076963215886295},{x:.4302108785229181,y:.7089786095248467},{x:.4280804818333404,y:.7101569339468108},{x:.4260621594195314,y:.7115183351118896},{x:.4242299779872524,y:.7122866512623272},{x:.42249143237810044,y:.7132482424814575},{x:.4201720909726226,y:.7139883059538676},{x:.4179269538663623,y:.7149297930076584},{x:.4159800862413552,y:.7153259053130885},{x:.41408734915800194,y:.715929846403847},{x:.4116681940261354,y:.716203208702491},{x:.4092825215873294,y:.7166886008255086},{x:.35212099999999996,y:.7225709645831306},{x:.35212099999999996,y:.7597659999999999},{x:.35125633761814534,y:.7685450644907257},{x:.3486955789630079,y:.776986754456429},{x:.3445371325536145,y:.7847666604858821},{x:.33894080515339464,y:.7915858051533946},{x:.3321216604858821,y:.7971821325536145},{x:.32434175445642904,y:.8013405789630078},{x:.3159000644907258,y:.8039013376181453},{x:.307121,y:.804766},{x:.29834193550927424,y:.8039013376181453},{x:.28990024554357097,y:.8013405789630078},{x:.2821203395141179,y:.7971821325536145},{x:.2753011948466053,y:.7915858051533946},{x:.26970486744638544,y:.7847666604858821},{x:.26554642103699205,y:.776986754456429},{x:.2629856623818546,y:.7685450644907257},{x:.262121,y:.7597659999999999},{x:.262121,y:.7318326623736131},{x:.23856652158732947,y:.7342566008255086},{x:.23743405616423266,y:.7342615520061975},{x:.23631438427367413,y:.7344313675125375},{x:.2330314335362298,y:.7342808004350606},{x:.22974506326706257,y:.734295168567351},{x:.22863339192208898,y:.7340790915684273},{x:.22750210485113245,y:.7340272069677483},{x:.2243116092711877,y:.7332390610779145},{x:.22108558260167874,y:.7326120140964958},{x:.22003742624118275,y:.7321832126358507},{x:.21893799871753236,y:.7319116218242595},{x:.21596256725097532,y:.7305161851266182},{x:.21292085857685591,y:.729271820095334},{x:.21197649726195836,y:.7286467727726252},{x:.21095117966878213,y:.7281659128327016},{x:.2083051564782311,y:.7262168111769735},{x:.20556465695803808,y:.7244029483461277},{x:.204760381964467,y:.7236056753794367},{x:.20384857668186554,y:.7229340254890024},{x:.10629557668186554,y:.6350940254890024},{x:.10393291169686979,y:.6325042238563513},{x:.10146752815288923,y:.6300120075116347},{x:.10096488682836192,y:.6292508655939548},{x:.10035013880638408,y:.6285770182897039},{x:.09853811700104832,y:.6255760458964971},{x:.09660631239978806,y:.6226507443205297},{x:.09626182060918942,y:.6218061670735107},{x:.09579034588565258,y:.6210253361666956},{x:.09459860224176168,y:.6177285186990383},{x:.0932746147506803,y:.6144825495908574},{x:.056695614750680294,y:.49150554959085735},{x:.05654965816703397,y:.490750439567249},{x:.05628361804350595,y:.49002883224693095},{x:.05571374572525952,y:.48642582571377374},{x:.055021470477783566,y:.4828443224653027},{x:.055025633066628665,y:.4820752469521588},{x:.05490548343396577,y:.4813156032607913},{x:.055049472757300266,y:.47767065091379934},{x:.05506921600663437,y:.4740229090450286},{x:.05522333780201598,y:.4732694231830167},{x:.05525369594322076,y:.472500935801646},{x:.05610601347919053,y:.46895411111540136},{x:.056837016503334954,y:.46538031130067065},{x:.05713517469108906,y:.46467137112890816},{x:.05731487395982006,y:.46392357259662753},{x:.08169987395982006,y:.39365157259662753},{x:.08192222202041206,y:.3931695328553223},{x:.08205835369770847,y:.3926564352635495},{x:.08376780756696771,y:.3891683934837906},{x:.08539480756850773,y:.3856411369034641},{x:.08570692456181836,y:.38521173737536313},{x:.08594054088151196,y:.3847350567827023},{x:.08829763126802886,y:.38164753465350854},{x:.09058150254284453,y:.37850546527353984},{x:.0909713939878581,y:.378145207541698},{x:.09129351720579659,y:.37772326251599964},{x:.09420766244788897,y:.3751549117812935},{x:.09706063710369874,y:.372518777565862},{x:.09751331969083687,y:.37224150613287915},{x:.09791157079240381,y:.3718905117848512},{x:.17107757079240382,y:.3191875117848513},{x:.17123114354048857,y:.3190983419119289},{x:.17136528774468962,y:.3189819753030134},{x:.17504412834709762,y:.3168843854977816},{x:.17870637355344754,y:.314757953928811},{x:.1788743916234626,y:.3147004579868701},{x:.17902866028359976,y:.31461249756570947},{x:.183046032465951,y:.31327291855818423},{x:.1870527548771027,y:.3119018143721617},{x:.18722876142884332,y:.31187820189800686},{x:.18739722608682208,y:.3118220279342577},{x:.262121,y:.2948235482063542},{x:.262121,y:.04244038202745839},{x:.212402420161311,y:.04795051974434915},{x:.14928483997433578,y:.08692151049617265},{x:.11795277553134796,y:.17720643745102208},{x:.114257651607068,y:.18521678535552225},{x:.10907078710071823,y:.1923523337548876},{x:.10259151030645056,y:.1983388675257922},{x:.09506881619784838,y:.20294632753270694},{x:.08679179769072982,y:.20599765167145945},{x:.07807853596451803,y:.20737557926659977},{x:.06926387678089782,y:.20702715733339738},{x:.0606865625489779,y:.20496577553134793},{x:.052676214644477706,y:.20127065160706795},{x:.04554066624511235,y:.1960837871007182},{x:.039554132474207776,y:.18960451030645054},{x:.034946672467293015,y:.18208181619784836},{x:.03189534832854049,y:.1738047976907298},{x:.030517420733400163,y:.165091535964518}],[{x:.14709211773983194,y:.4797371545422716},{x:.17592903295677773,y:.5766856037244347},{x:.24922570721126042,y:.6426843927572041},{x:.262121,y:.6413573671491031},{x:.262121,y:.3871228845247169},{x:.21626819752335621,y:.3975536737173561},{x:.16206100150816494,y:.4366002507010456},{x:.14709211773983194,y:.4797371545422716}],[{x:.35212099999999996,y:.034163101195078524},{x:.35212099999999996,y:.2743499680404371},{x:.4101709471377665,y:.26114452085874473},{x:.4630938273127818,y:.2230200535785049},{x:.47920731446793274,y:.1649859973145621},{x:.44287681685863156,y:.07338773859643172},{x:.35212099999999996,y:.034163101195078524}]],"'":[[{x:.25602600000000003,y:.476978},{x:.25689066238185465,y:.4681989355092742},{x:.2594514210369921,y:.459757245543571},{x:.2636098674463855,y:.4519773395141179},{x:.26920619484660535,y:.44515819484660535},{x:.27602533951411795,y:.4395618674463855},{x:.283805245543571,y:.4354034210369921},{x:.2922469355092743,y:.43284266238185465},{x:.301026,y:.43197800000000003},{x:.3098050644907258,y:.43284266238185465},{x:.3182467544564291,y:.4354034210369921},{x:.32602666048588214,y:.4395618674463855},{x:.3328458051533947,y:.44515819484660535},{x:.33844213255361455,y:.4519773395141179},{x:.34260057896300794,y:.459757245543571},{x:.3451613376181454,y:.4681989355092742},{x:.346026,y:.476978},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.476978}]],"(":[[{x:.14398102142772873,y:.343473372436119},{x:.14438344127795402,y:.34024506484177663},{x:.14461855620935057,y:.33700027938992067},{x:.15480555620935058,y:.27783527938992064},{x:.15553530200183258,y:.27518493680242373},{x:.1560666158259812,y:.2724877993619115},{x:.1764416158259812,y:.20487079936191147},{x:.17757136816824137,y:.2021290142392397},{x:.17852197521392682,y:.19932008699588913},{x:.2090839752139268,y:.13170208699588917},{x:.21040800505224358,y:.12940389577393302},{x:.21154775445201235,y:.12700896170152925},{x:.25229575445201236,y:.05939296170152925},{x:.2531150427152032,y:.05829379345186112},{x:.2537782786760274,y:.05709399256856861},{x:.29452927867602746,y:-.0020700074314313824},{x:.29560111146026063,y:-.0033391000809501682},{x:.29650963843516415,y:-.004729783512322571},{x:.3372576384351641,y:-.05544378351232261},{x:.3386866074193021,y:-.05690267270426387},{x:.3399537097957662,y:-.05850416001284604},{x:.38070370979576623,y:-.10073716001284601},{x:.38742176905533504,y:-.10645444032360908},{x:.3951261287468799,y:-.11075123635207199},{x:.40352071464810957,y:-.11346242463653189},{x:.41228292753057777,y:-.11448381573166892},{x:.42107604046711683,y:-.11377615815049966},{x:.4295621390588101,y:-.11136664677700951},{x:.4374151072958377,y:-.10734787778201216},{x:.444333160012846,y:-.10187429020423372},{x:.4500504403236091,y:-.09515623094466494},{x:.45434723635207197,y:-.08745187125312004},{x:.4570584246365319,y:-.07905728535189037},{x:.45807981573166895,y:-.07029507246942218},{x:.4573721581504997,y:-.06150195953288313},{x:.45496264677700954,y:-.053015860941189874},{x:.45094387778201217,y:-.04516289270416226},{x:.44547029020423373,y:-.03824483998715393},{x:.4061377413616867,y:.0025191240684850026},{x:.3677075745656829,y:.050348403515145926},{x:.3286739379437331,y:.10701906379590062},{x:.2900025757951927,y:.1711891536907596},{x:.2617573982317254,y:.23368121626802973},{x:.24303344075060918,y:.2958190240226623},{x:.23462816944303005,y:.34463593546989096},{x:.24303340667749923,y:.39345182392970596},{x:.26175739639474455,y:.45558881969516635},{x:.2900026404789191,y:.5180819536434618},{x:.328674029726828,y:.5822520885061939},{x:.36770768599197223,y:.6389237351633864},{x:.4061420841180472,y:.6867582808236831},{x:.4454798975405431,y:.7275528000242046},{x:.45095135740921277,y:.7344725356602282},{x:.45496771125722263,y:.7423267393839987},{x:.45737461285859093,y:.7508135785511003},{x:.458079566334583,y:.759606908691815},{x:.4570554807184589,y:.768368807060192},{x:.4543417110461325,y:.7767625588156633},{x:.4500425459642118,y:.7844655967855365},{x:.4443231999757953,y:.791181897540543},{x:.4374034643397718,y:.7966533574092127},{x:.4295492606160011,y:.8006697112572226},{x:.42106242144889966,y:.8030766128585909},{x:.41226909130818484,y:.803781566334583},{x:.403507192939808,y:.8027574807184589},{x:.39511344118433667,y:.8000437110461325},{x:.3874104032144634,y:.7957445459642117},{x:.38069410245945684,y:.7900251999757952},{x:.33994410245945683,y:.7477661999757953},{x:.338681775527778,y:.7461697396410558},{x:.3372576384351641,y:.7447157835123226},{x:.29650963843516415,y:.6940017835123226},{x:.2956010143988682,y:.6926109515089496},{x:.29452907712829884,y:.6913417148135671},{x:.2537780771282988,y:.6321767148135672},{x:.25311493656839296,y:.6309770641401381},{x:.25229575445201236,y:.6298780382984708},{x:.21154775445201235,y:.5622620382984707},{x:.21040795156345282,y:.5598669918310725},{x:.2090838723444427,y:.5575686854051248},{x:.17852187234444272,y:.48994968540512485},{x:.17757135012625538,y:.48714095747585867},{x:.17644166886939822,y:.4843993766680373},{x:.1560666688693982,y:.4167833766680374},{x:.15553533856931018,y:.4140862136984408},{x:.15480557779123924,y:.4114358459543075},{x:.14461857779123924,y:.3522718459543075},{x:.14438345368873493,y:.3490270611669966},{x:.14398102471397584,y:.3457987547100726},{x:.14406527252602844,y:.3446360634540339},{x:.14398102142772873,y:.343473372436119}]],")":[[{x:.14397318426833106,y:-.07029507246942218},{x:.14499457536346808,y:-.07905728535189037},{x:.14770576364792798,y:-.08745187125312004},{x:.1520025596763909,y:-.09515623094466495},{x:.15771983998715397,y:-.10187429020423372},{x:.16463789270416226,y:-.10734787778201214},{x:.1724908609411899,y:-.11136664677700951},{x:.18097695953288315,y:-.11377615815049966},{x:.1897700724694222,y:-.11448381573166892},{x:.19853228535189038,y:-.11346242463653189},{x:.20692687125312006,y:-.11075123635207199},{x:.21463123094466496,y:-.10645444032360907},{x:.22134929020423375,y:-.10073716001284601},{x:.2620992902042337,y:-.05850416001284604},{x:.2633660586938147,y:-.05690309470300352},{x:.26479468609075496,y:-.05544462417080616},{x:.30554468609075497,y:-.004730624170806122},{x:.3064541047100432,y:-.003338648753719708},{x:.307526891803669,y:-.002068307996824087},{x:.348273891803669,y:.05709569200317591},{x:.3489362195699084,y:.058293979727073175},{x:.3497544895549002,y:.059391707275619196},{x:.39050548955490016,y:.12700770727561922},{x:.39164563057902163,y:.12940326331913213},{x:.3929700247860732,y:.13170208699588917},{x:.42353202478607316,y:.19932008699588913},{x:.4244827292530259,y:.20212930210713742},{x:.4256125601984483,y:.2048713835354543},{x:.4459865601984483,y:.27248838353545435},{x:.4465177787005257,y:.27518522990297933},{x:.4472474437906494,y:.27783527938992064},{x:.4574344437906494,y:.33700027938992067},{x:.45766955872204595,y:.3402450648417768},{x:.4580719785722712,y:.34347337243611903},{x:.45798772747397154,y:.3446360634540339},{x:.4580719752860241,y:.3457987547100726},{x:.45766954631126505,y:.34902706116699656},{x:.45743442220876074,y:.3522718459543075},{x:.44724742220876074,y:.4114358459543075},{x:.4465177421348676,y:.414085920594514},{x:.44598650715958776,y:.4167827924880124},{x:.42561250715958776,y:.4843987924880123},{x:.42448274729464536,y:.48714066960378194},{x:.42353212765555726,y:.48994968540512485},{x:.3929701276555573,y:.5575686854051248},{x:.39164568407140216,y:.5598676242877579},{x:.39050548955490016,y:.5622632927243807},{x:.3497544895549002,y:.6298792927243808},{x:.3489363257182038,y:.6309768778726063},{x:.34827409333092635,y:.6321750153799588},{x:.3075270933309263,y:.6913400153799587},{x:.3064542017711834,y:.692610500189881},{x:.30554468609075497,y:.6940026241708062},{x:.26479468609075496,y:.7447166241708062},{x:.26337089070969094,y:.7461701617493295},{x:.2621088975405431,y:.7477661999757953},{x:.2213588975405431,y:.7900251999757952},{x:.21464259678553657,y:.7957445459642117},{x:.20693955881566328,y:.8000437110461325},{x:.19854580706019195,y:.8027574807184589},{x:.1897839086918151,y:.803781566334583},{x:.1809905785511003,y:.8030766128585909},{x:.17250373938399882,y:.8006697112572226},{x:.16464953566022822,y:.7966533574092127},{x:.15772980002420467,y:.791181897540543},{x:.15201045403578817,y:.7844655967855365},{x:.14771128895386743,y:.7767625588156633},{x:.14499751928154103,y:.7683688070601918},{x:.14397343366541698,y:.759606908691815},{x:.14467838714140904,y:.7508135785511002},{x:.14708528874277732,y:.7423267393839987},{x:.1511016425907872,y:.7344725356602282},{x:.15657310245945688,y:.7275528000242046},{x:.19591129092993145,y:.6867578918874246},{x:.23434697314436972,y:.6389240958672278},{x:.27337685298529213,y:.5822523693404118},{x:.3120516621801016,y:.518081284004684},{x:.34029647741491703,y:.4555890988936643},{x:.35901954136421654,y:.39345212569273014},{x:.36742483055696995,y:.344635935469891},{x:.359019507292604,y:.29581872226323463},{x:.3402964755778617,y:.23368093707349602},{x:.3120517268674457,y:.17118982332763816},{x:.27337694476991303,y:.10701878295300266},{x:.23434708457036935,y:.05034804280413771},{x:.1959156338111051,y:.0025195128948044543},{x:.15658270979576625,y:-.03824483998715393},{x:.1511091222179878,y:-.045162892704162266},{x:.14709035322299047,y:-.053015860941189874},{x:.1446808418495003,y:-.06150195953288312},{x:.14397318426833106,y:-.07029507246942218}]],"*":[[{x:.03611444520266741,y:.4654782574484574},{x:.03652686631141767,y:.45666636076295464},{x:.038650478626155074,y:.4481042415682919},{x:.04240367291655979,y:.4401209373034283},{x:.04764221603086716,y:.4330232418741738},{x:.05416479369500318,y:.42708391573544136},{x:.06172074690723879,y:.42253120385992987},{x:.07001970462305517,y:.4195400644118251},{x:.0787427425515426,y:.41822544520266736},{x:.08755463923704532,y:.41863786631141764},{x:.09611675843170807,y:.42076147862615504},{x:.25602600000000003,y:.47756000598755177},{x:.25602600000000003,y:.31805799999999995},{x:.25689066238185465,y:.30927893550927416},{x:.2594514210369921,y:.30083724554357094},{x:.2636098674463855,y:.29305733951411783},{x:.26920619484660535,y:.2862381948466053},{x:.27602533951411795,y:.2806418674463854},{x:.283805245543571,y:.276483421036992},{x:.2922469355092743,y:.2739226623818546},{x:.301026,y:.27305799999999997},{x:.3098050644907258,y:.2739226623818546},{x:.3182467544564291,y:.276483421036992},{x:.32602666048588214,y:.2806418674463854},{x:.3328458051533947,y:.2862381948466053},{x:.33844213255361455,y:.29305733951411783},{x:.34260057896300794,y:.30083724554357094},{x:.3451613376181454,y:.30927893550927416},{x:.346026,y:.31805799999999995},{x:.346026,y:.47756000598755177},{x:.505935241568292,y:.42076147862615504},{x:.5144973607629547,y:.41863786631141764},{x:.5233092574484575,y:.41822544520266736},{x:.5320322953769449,y:.4195400644118251},{x:.5403312530927612,y:.42253120385992987},{x:.5478872063049969,y:.42708391573544136},{x:.5544097839691329,y:.4330232418741738},{x:.5596483270834403,y:.4401209373034283},{x:.5634015213738449,y:.4481042415682919},{x:.5655251336885824,y:.45666636076295464},{x:.5659375547973327,y:.4654782574484574},{x:.5646229355881749,y:.4742012953769448},{x:.5616317961400701,y:.4825002530927612},{x:.5570790842645587,y:.4900562063049968},{x:.5511397581258262,y:.4965787839691328},{x:.5440420626965717,y:.5018173270834402},{x:.5360587584317081,y:.5055705213738448},{x:.37146215609131306,y:.5640339630732496},{x:.47696549129035026,y:.7165911114148321},{x:.48124783600971727,y:.7243035129909579},{x:.48394328176908086,y:.732703166943666},{x:.4849482440995321,y:.7414672792821342},{x:.48422410286230105,y:.7502590500841659},{x:.48179868639903156,y:.758740616528321},{x:.47776520210421775,y:.7665860367726678},{x:.4722786545173053,y:.7734938157169785},{x:.4655498885851679,y:.7791984912903502},{x:.45783748700904214,y:.7834808360097172},{x:.449437833056334,y:.7861762817690807},{x:.4406737207178658,y:.7871812440995319},{x:.431881949915834,y:.786457102862301},{x:.4234003834716789,y:.7840316863990314},{x:.4155549632273321,y:.7799982021042177},{x:.40864718428302144,y:.7745116545173052},{x:.40294250870964976,y:.7677828885851677},{x:.301026,y:.6204122684209616},{x:.19910949129035027,y:.7677828885851677},{x:.19340481571697854,y:.7745116545173052},{x:.18649703677266788,y:.7799982021042177},{x:.17865161652832107,y:.7840316863990314},{x:.17017005008416597,y:.786457102862301},{x:.1613782792821342,y:.7871812440995319},{x:.15261416694366597,y:.7861762817690807},{x:.14421451299095783,y:.7834808360097172},{x:.13650211141483212,y:.7791984912903502},{x:.12977334548269473,y:.7734938157169785},{x:.12428679789578226,y:.7665860367726678},{x:.12025331360096844,y:.758740616528321},{x:.11782789713769894,y:.7502590500841659},{x:.11710375590046794,y:.7414672792821342},{x:.11810871823091917,y:.732703166943666},{x:.12080416399028275,y:.7243035129909579},{x:.1250865087096497,y:.7165911114148321},{x:.23058984390868703,y:.5640339630732496},{x:.06599324156829194,y:.5055705213738448},{x:.058009937303428294,y:.5018173270834402},{x:.05091224187417384,y:.4965787839691328},{x:.04497291573544139,y:.4900562063049968},{x:.04042020385992993,y:.4825002530927612},{x:.03742906441182516,y:.4742012953769448},{x:.03611444520266741,y:.4654782574484574}]],"+":[[{x:-.002030999999999998,y:.33155},{x:-.0011663376181453647,y:.3227709355092742},{x:.0013944210369920967,y:.314329245543571},{x:.005552867446385459,y:.3065493395141179},{x:.011149194846605363,y:.29973019484660535},{x:.017968339514117915,y:.2941338674463855},{x:.025748245543570962,y:.2899754210369921},{x:.03418993550927423,y:.28741466238185465},{x:.042969,y:.28655},{x:.256023,y:.28655},{x:.256023,y:.09133899999999995},{x:.2568876623818546,y:.08255993550927418},{x:.25944842103699206,y:.07411824554357091},{x:.26360686744638545,y:.06633833951411786},{x:.2692031948466054,y:.05951919484660531},{x:.2760223395141179,y:.053922867446385414},{x:.2838022455435709,y:.049764421036992045},{x:.2922439355092742,y:.04720366238185458},{x:.301023,y:.04633899999999995},{x:.3098020644907258,y:.04720366238185458},{x:.31824375445642905,y:.049764421036992045},{x:.3260236604858821,y:.053922867446385414},{x:.3328428051533946,y:.05951919484660531},{x:.3384391325536145,y:.06633833951411786},{x:.3425975789630079,y:.07411824554357091},{x:.34515833761814535,y:.08255993550927418},{x:.34602299999999997,y:.09133899999999995},{x:.34602299999999997,y:.28655},{x:.559083,y:.28655},{x:.5678620644907257,y:.28741466238185465},{x:.576303754456429,y:.2899754210369921},{x:.5840836604858821,y:.2941338674463855},{x:.5909028051533947,y:.29973019484660535},{x:.5964991325536145,y:.3065493395141179},{x:.6006575789630079,y:.314329245543571},{x:.6032183376181454,y:.3227709355092742},{x:.604083,y:.33155},{x:.6032183376181454,y:.3403290644907258},{x:.6006575789630079,y:.348770754456429},{x:.5964991325536145,y:.35655066048588213},{x:.5909028051533947,y:.3633698051533947},{x:.5840836604858821,y:.36896613255361455},{x:.576303754456429,y:.37312457896300794},{x:.5678620644907257,y:.3756853376181454},{x:.559083,y:.37655},{x:.34602299999999997,y:.37655},{x:.34602299999999997,y:.571777},{x:.34515833761814535,y:.5805560644907257},{x:.3425975789630079,y:.588997754456429},{x:.3384391325536145,y:.5967776604858821},{x:.3328428051533946,y:.6035968051533946},{x:.3260236604858821,y:.6091931325536145},{x:.31824375445642905,y:.6133515789630078},{x:.3098020644907258,y:.6159123376181453},{x:.301023,y:.616777},{x:.2922439355092742,y:.6159123376181453},{x:.2838022455435709,y:.6133515789630078},{x:.2760223395141179,y:.6091931325536145},{x:.2692031948466054,y:.6035968051533946},{x:.26360686744638545,y:.5967776604858821},{x:.25944842103699206,y:.588997754456429},{x:.2568876623818546,y:.5805560644907257},{x:.256023,y:.571777},{x:.256023,y:.37655},{x:.042969,y:.37655},{x:.03418993550927421,y:.3756853376181454},{x:.025748245543570934,y:.37312457896300794},{x:.017968339514117904,y:.36896613255361455},{x:.011149194846605356,y:.3633698051533947},{x:.005552867446385459,y:.35655066048588213},{x:.0013944210369920967,y:.348770754456429},{x:-.0011663376181453647,y:.3403290644907258},{x:-.002030999999999998,y:.33155}]],",":[[{x:.1703425796668749,y:-.03158948169003215},{x:.1707557440557006,y:-.035050650253961146},{x:.17102563140319493,y:-.03852592771911176},{x:.17127771326913271,y:-.039423300660751795},{x:.17138819577001116,y:-.0403488367651378},{x:.1724686618106471,y:-.0436628955719719},{x:.1734113563482083,y:-.04701874414557815},{x:.1738336633079298,y:-.04784969558537063},{x:.17412258605517572,y:-.048735893706360625},{x:.1758288320436127,y:-.05177548533469908},{x:.17740810654883146,y:-.054882941638058576},{x:.177984409582707,y:-.05561553857817519},{x:.17844066943717352,y:-.05642834261896521},{x:.18070712529694977,y:-.05907665726715373},{x:.18286228913625774,y:-.06181630349720979},{x:.26855428913625773,y:-.1511263034972098},{x:.27525630293239317,y:-.15686238451505874},{x:.2829485933055849,y:-.16118075031492074},{x:.2913355498506774,y:-.16391544852087458},{x:.3000948665311021,y:-.16496138621450188},{x:.3088899277191117,y:-.1642783685968051},{x:.3173827441455781,y:-.16189264365179173},{x:.3252469416380585,y:-.15789589345116858},{x:.33218030349720973,y:-.1524417108637423},{x:.3379163845150587,y:-.14573969706760687},{x:.3422347503149207,y:-.13804740669441512},{x:.3449694485208745,y:-.12966045014932262},{x:.3460153862145018,y:-.12090113346889794},{x:.34533236859680505,y:-.11210607228088836},{x:.34294664365179167,y:-.10361325585442197},{x:.33894989345116855,y:-.09574905836194152},{x:.33349571086374225,y:-.08881569650279031},{x:.277697993368333,y:-.03066214483501502},{x:.41918956700521515,y:.11679250439324337},{x:.42464400414059766,y:.12372566600271688},{x:.42864104306488354,y:.1315897167531037},{x:.43102707981377775,y:.14008244558427704},{x:.4317104203331251,y:.14887748169003212},{x:.4306648042299889,y:.15763683676513773},{x:.4279304139448243,y:.1660238937063606},{x:.4236123305628265,y:.17371634261896518},{x:.41787649560675666,y:.1804185670052151},{x:.41094333399728317,y:.18587300414059763},{x:.4030792832468963,y:.18987004306488353},{x:.39458655441572293,y:.19225607981377774},{x:.3857915183099679,y:.19293942033312508},{x:.37703216323486227,y:.19189380422998883},{x:.36864510629363945,y:.18915941394482427},{x:.3609526573810348,y:.18484133056282648},{x:.35425043299478487,y:.17910549560675662},{x:.18286343299478489,y:.000495495606756581},{x:.18070816857348473,y:-.0022440714967103576},{x:.1784416154849413,y:-.004892302932393237},{x:.17798532578947307,y:-.005705090221499034},{x:.17740899585940237,y:-.006437666002716908},{x:.1758296072680145,y:-.009545064322455634},{x:.1741232496850793,y:-.012584593305585},{x:.17383429440212667,y:-.013470780818460306},{x:.1734119569351165,y:-.014301716753103766},{x:.1724691391914766,y:-.01765753071433596},{x:.17138855147912546,y:-.02097154985067746},{x:.17127803499816427,y:-.02189708189818214},{x:.17102592018622226,y:-.022794445584277102},{x:.17075590524748027,y:-.02626971313843455},{x:.17034261378549817,y:-.029730866531102167},{x:.17041478319291342,y:-.03066017543569507},{x:.1703425796668749,y:-.03158948169003215}]],"-":[[{x:.12882900000000003,y:.31396500000000005},{x:.12969366238185465,y:.30518593550927425},{x:.13225442103699211,y:.29674424554357104},{x:.13641286744638548,y:.28896433951411793},{x:.14200919484660537,y:.2821451948466054},{x:.14882833951411792,y:.2765488674463855},{x:.15660824554357097,y:.2723904210369921},{x:.16504993550927424,y:.2698296623818547},{x:.173829,y:.26896500000000007},{x:.428224,y:.26896500000000007},{x:.4370030644907258,y:.2698296623818547},{x:.44544475445642906,y:.2723904210369921},{x:.4532246604858821,y:.2765488674463855},{x:.4600438051533946,y:.2821451948466054},{x:.4656401325536145,y:.28896433951411793},{x:.4697985789630079,y:.29674424554357104},{x:.47235933761814536,y:.30518593550927425},{x:.473224,y:.31396500000000005},{x:.47235933761814536,y:.32274406449072585},{x:.4697985789630079,y:.33118575445642906},{x:.4656401325536145,y:.33896566048588217},{x:.4600438051533946,y:.3457848051533947},{x:.4532246604858821,y:.3513811325536146},{x:.44544475445642906,y:.355539578963008},{x:.4370030644907258,y:.3581003376181454},{x:.428224,y:.35896500000000003},{x:.173829,y:.35896500000000003},{x:.16504993550927424,y:.3581003376181454},{x:.15660824554357097,y:.355539578963008},{x:.14882833951411792,y:.3513811325536146},{x:.14200919484660537,y:.3457848051533947},{x:.13641286744638548,y:.33896566048588217},{x:.13225442103699211,y:.33118575445642906},{x:.12969366238185465,y:.32274406449072585},{x:.12882900000000003,y:.31396500000000005}]],".":[[{x:.19450299999999998,y:.148926},{x:.19536766238185463,y:.14014693550927423},{x:.1979284210369921,y:.13170524554357096},{x:.20208686744638546,y:.12392533951411791},{x:.20768319484660536,y:.11710619484660537},{x:.2145023395141179,y:.11150986744638547},{x:.22228224554357093,y:.1073514210369921},{x:.2307239355092742,y:.10479066238185464},{x:.239503,y:.103926},{x:.362549,y:.103926},{x:.3713280644907258,y:.10479066238185464},{x:.3797697544564291,y:.1073514210369921},{x:.38754966048588213,y:.11150986744638547},{x:.3943688051533947,y:.11710619484660537},{x:.39996513255361454,y:.12392533951411791},{x:.40412357896300793,y:.13170524554357096},{x:.4066843376181454,y:.14014693550927423},{x:.407549,y:.148926},{x:.4066843376181454,y:.1577050644907258},{x:.40412357896300793,y:.16614675445642904},{x:.39996513255361454,y:.1739266604858821},{x:.3943688051533947,y:.18074580515339464},{x:.38754966048588213,y:.18634213255361454},{x:.3797697544564291,y:.1905005789630079},{x:.3713280644907258,y:.19306133761814537},{x:.362549,y:.193926},{x:.239503,y:.193926},{x:.2307239355092742,y:.19306133761814537},{x:.22228224554357093,y:.1905005789630079},{x:.2145023395141179,y:.18634213255361454},{x:.20768319484660536,y:.18074580515339464},{x:.20208686744638546,y:.1739266604858821},{x:.1979284210369921,y:.16614675445642904},{x:.19536766238185463,y:.1577050644907258},{x:.19450299999999998,y:.148926}]],"/":[[{x:.017522651058219416,y:-.036644753012328966},{x:.01865919532569161,y:-.04539277458837648},{x:.02148055556003016,y:-.053750976595687026},{x:.02587830846966649,y:-.06139815801845333},{x:.031683450876571484,y:-.06804044196318723},{x:.038672894413609195,y:-.07342256918292836},{x:.04657803868537635,y:-.0773377075469538},{x:.0550950934307649,y:-.07963540048356893},{x:.0638967530123289,y:-.08022734894178067},{x:.07264477458837641,y:-.07909080467430848},{x:.08100297659568695,y:-.07626944443996993},{x:.08865015801845323,y:-.0718716915303336},{x:.09529244196318715,y:-.0660665491234286},{x:.10067456918292828,y:-.059077105586390885},{x:.5777245691829282,y:.7051758944136092},{x:.5816397075469537,y:.7130810386853763},{x:.5839374004835688,y:.7215980934307649},{x:.5845293489417805,y:.7303997530123288},{x:.5833928046743084,y:.7391477745883763},{x:.5805714444399699,y:.747505976595687},{x:.5761736915303335,y:.7551531580184532},{x:.5703685491234285,y:.7617954419631872},{x:.5633791055863908,y:.7671775691829282},{x:.5554739613146237,y:.7710927075469537},{x:.5469569065692351,y:.7733904004835688},{x:.5381552469876711,y:.7739823489417805},{x:.5294072254116237,y:.7728458046743084},{x:.521049023404313,y:.7700244444399699},{x:.5134018419815468,y:.7656266915303335},{x:.5067595580368128,y:.7598215491234285},{x:.5013774308170718,y:.7528321055863908},{x:.024327430817071727,y:-.011420894413609283},{x:.020412292453046287,y:-.019326038685376436},{x:.018114599516431164,y:-.027843093430764996},{x:.017522651058219416,y:-.036644753012328966}]],"<":[[{x:-.002019645490236678,y:.32959917016575135},{x:-.0016099914284145765,y:.3262199732716625},{x:-.0013526191024594778,y:.3228257800560043},{x:-.001080072865731869,y:.3218487260950263},{x:-.0009579981642362373,y:.3208417436418168},{x:.00010303311987996846,y:.3176073966113462},{x:.0010176343561875828,y:.3143286327165328},{x:.0014755574652736251,y:.31342352370653337},{x:.001791739066671412,y:.3124597057316259},{x:.003463372735866293,y:.309494502707312},{x:.00500005526992945,y:.3064571691910689},{x:.005625757523098081,y:.30565878796371126},{x:.0061238953427729045,y:.3047751734513664},{x:.008341891452602095,y:.3021930655225286},{x:.010441601436418424,y:.2995138854085287},{x:.011211037446978121,y:.298852913306643},{x:.011871988327878901,y:.29808345906703315},{x:.014551110531708777,y:.29598367519331337},{x:.017133157288130564,y:.2937656078708368},{x:.01801675806170013,y:.2932674456816211},{x:.018815122032139454,y:.29264172140965955},{x:.021852413166145952,y:.29110495510775264},{x:.024817570086352318,y:.28943323966009543},{x:.5409315700863523,y:.06192123966009548},{x:.5493135321567164,y:.059171271257023414},{x:.5580709293975171,y:.05810938240515066},{x:.5668672199439956,y:.058776380897540545},{x:.5753643672834672,y:.061146634356187606},{x:.583235830808931,y:.06512905526992949},{x:.5901791145914712,y:.07057060143641844},{x:.5959273921291632,y:.07726215728813057},{x:.6002597603399046,y:.08494657008635234},{x:.6030097287429766,y:.09332853215671641},{x:.6040716175948494,y:.10208592939751719},{x:.6034046191024595,y:.11088221994399564},{x:.6010343656438124,y:.11937936728346718},{x:.5970519447300705,y:.12725083080893104},{x:.5916103985635816,y:.13419411459147126},{x:.5849188427118694,y:.1399423921291632},{x:.5772344299136477,y:.14427476033990455},{x:.15453394878652635,y:.33060846154195217},{x:.577233294268374,y:.5169277390666714},{x:.5849178265486336,y:.521259895342773},{x:.5916095409329668,y:.527007988327879},{x:.5970512785903404,y:.5339511220321395},{x:.6010339165943431,y:.5418224757210541},{x:.6034044043999703,y:.5503195576866639},{x:.6040716454902366,y:.5591158298342486},{x:.6030099981642363,y:.5678732563581832},{x:.6002602609333286,y:.5762552942683741},{x:.5959281046572271,y:.5839398265486336},{x:.5901800116721211,y:.5906315409329669},{x:.5832368779678606,y:.5960732785903404},{x:.5753655242789459,y:.6000559165943432},{x:.5668684423133362,y:.6024264043999704},{x:.5580721701657515,y:.6030936454902367},{x:.5493147436418169,y:.6020319981642364},{x:.540932705731626,y:.5992822609333287},{x:.024818705731625975,y:.37178726093332853},{x:.02185350270731245,y:.3701156272641339},{x:.018816169191068974,y:.3685789447300705},{x:.01801778796371134,y:.36795324247690187},{x:.01713417345136639,y:.367455104657227},{x:.01455206552252819,y:.3652371085473975},{x:.011872885408528756,y:.3631373985635815},{x:.011211913306643135,y:.3623679625530219},{x:.010442459067033207,y:.36170701167212105},{x:.008342675193313383,y:.3590278894682912},{x:.006124607870836803,y:.3564458427118694},{x:.005626445681621026,y:.3555622419382997},{x:.005000721409659611,y:.3547638779678605},{x:.0034639551077528313,y:.3517265868338544},{x:.0017922396600954515,y:.3487614299136476},{x:.0014760314771086122,y:.3477976206592673},{x:.0010180834056568513,y:.3468925242789459},{x:.00010339174271701993,y:.34361378560971106},{x:-.0009577287429766018,y:.3403794678432836},{x:-.0010798312165939596,y:.33937248875722786},{x:-.0013524043999703778,y:.33839544231333624},{x:-.001609870336301571,y:.33500125619719334},{x:-.0020196175948493655,y:.3316220706024828},{x:-.001942922029511974,y:.3306106193263084},{x:-.002019645490236678,y:.32959917016575135}]],"=":[[{x:-.002030999999999998,y:.19162999999999997},{x:-.0011663376181453647,y:.1828509355092742},{x:.0013944210369920967,y:.17440924554357093},{x:.005552867446385459,y:.16662933951411787},{x:.011149194846605363,y:.15981019484660533},{x:.017968339514117915,y:.15421386744638543},{x:.025748245543570962,y:.15005542103699207},{x:.03418993550927423,y:.1474946623818546},{x:.042969,y:.14662999999999998},{x:.559083,y:.14662999999999998},{x:.5678620644907257,y:.1474946623818546},{x:.576303754456429,y:.15005542103699207},{x:.5840836604858821,y:.15421386744638543},{x:.5909028051533947,y:.15981019484660533},{x:.5964991325536145,y:.16662933951411787},{x:.6006575789630079,y:.17440924554357093},{x:.6032183376181454,y:.1828509355092742},{x:.604083,y:.19162999999999997},{x:.6032183376181454,y:.20040906449072574},{x:.6006575789630079,y:.208850754456429},{x:.5964991325536145,y:.21663066048588206},{x:.5909028051533947,y:.2234498051533946},{x:.5840836604858821,y:.2290461325536145},{x:.576303754456429,y:.23320457896300786},{x:.5678620644907257,y:.23576533761814533},{x:.559083,y:.23662999999999995},{x:.042969,y:.23662999999999995},{x:.03418993550927421,y:.23576533761814533},{x:.025748245543570934,y:.23320457896300786},{x:.017968339514117904,y:.2290461325536145},{x:.011149194846605356,y:.2234498051533946},{x:.005552867446385459,y:.21663066048588206},{x:.0013944210369920967,y:.208850754456429},{x:-.0011663376181453647,y:.20040906449072574},{x:-.002030999999999998,y:.19162999999999997}],[{x:-.002030999999999998,y:.454102},{x:-.0011663376181453647,y:.4453229355092742},{x:.0013944210369920967,y:.436881245543571},{x:.005552867446385459,y:.4291013395141179},{x:.011149194846605363,y:.42228219484660534},{x:.017968339514117915,y:.41668586744638547},{x:.025748245543570962,y:.4125274210369921},{x:.03418993550927423,y:.40996666238185464},{x:.042969,y:.409102},{x:.559083,y:.409102},{x:.5678620644907257,y:.40996666238185464},{x:.576303754456429,y:.4125274210369921},{x:.5840836604858821,y:.41668586744638547},{x:.5909028051533947,y:.42228219484660534},{x:.5964991325536145,y:.4291013395141179},{x:.6006575789630079,y:.436881245543571},{x:.6032183376181454,y:.4453229355092742},{x:.604083,y:.454102},{x:.6032183376181454,y:.4628810644907258},{x:.6006575789630079,y:.471322754456429},{x:.5964991325536145,y:.4791026604858821},{x:.5909028051533947,y:.48592180515339467},{x:.5840836604858821,y:.49151813255361454},{x:.576303754456429,y:.49567657896300793},{x:.5678620644907257,y:.49823733761814537},{x:.559083,y:.499102},{x:.042969,y:.499102},{x:.03418993550927421,y:.49823733761814537},{x:.025748245543570934,y:.49567657896300793},{x:.017968339514117904,y:.49151813255361454},{x:.011149194846605356,y:.48592180515339467},{x:.005552867446385459,y:.4791026604858821},{x:.0013944210369920967,y:.471322754456429},{x:-.0011663376181453647,y:.4628810644907258},{x:-.002030999999999998,y:.454102}]],">":[[{x:-.002019645490236678,y:.5591158298342487},{x:-.0013524043999703708,y:.5503195576866637},{x:.0010180834056568513,y:.5418224757210541},{x:.005000721409659611,y:.5339511220321396},{x:.01044245906703322,y:.527007988327879},{x:.01713417345136643,y:.521259895342773},{x:.024818705731625975,y:.5169277390666714},{x:.44751805121347366,y:.33060846154195217},{x:.024817570086352318,y:.14427476033990455},{x:.017133157288130554,y:.1399423921291632},{x:.01044160143641841,y:.13419411459147126},{x:.00500005526992945,y:.12725083080893107},{x:.0010176343561875828,y:.11937936728346718},{x:-.0013526191024594778,y:.11088221994399562},{x:-.0020196175948493655,y:.10208592939751718},{x:-.0009577287429766018,y:.0933285321567164},{x:.0017922396600954585,y:.08494657008635234},{x:.00612460787083681,y:.07726215728813059},{x:.011872885408528759,y:.07057060143641844},{x:.018816169191068984,y:.06512905526992947},{x:.02668763271653284,y:.061146634356187606},{x:.03518478005600438,y:.058776380897540545},{x:.04398107060248284,y:.05810938240515066},{x:.052738467843283614,y:.05917127125702342},{x:.06112042991364768,y:.06192123966009548},{x:.5772344299136477,y:.28943323966009543},{x:.5801995868338548,y:.29110495510775297},{x:.5832368779678606,y:.2926417214096596},{x:.5840352419382998,y:.29326744568162105},{x:.5849188427118694,y:.2937656078708368},{x:.5875008894682915,y:.29598367519331353},{x:.5901800116721211,y:.29808345906703315},{x:.5908409625530218,y:.2988529133066429},{x:.5916103985635817,y:.29951388540852875},{x:.5937101085473976,y:.3021930655225282},{x:.5959281046572271,y:.3047751734513664},{x:.5964262424769022,y:.30565878796371176},{x:.5970519447300705,y:.30645716919106897},{x:.5985886272641329,y:.3094945027073105},{x:.6002602609333286,y:.31245970573162596},{x:.6005764425347265,y:.31342352370653376},{x:.6010343656438124,y:.31432863271653283},{x:.6019489668801197,y:.31760739661134507},{x:.6030099981642363,y:.32084174364181683},{x:.6031320728657319,y:.3218487260950267},{x:.6034046191024595,y:.3228257800560044},{x:.6036619914284146,y:.3262199732716634},{x:.6040716454902366,y:.32959917016575135},{x:.603994922029512,y:.330610619326308},{x:.6040716175948494,y:.33162207060248283},{x:.6036618703363014,y:.3350012561971954},{x:.6034044043999703,y:.33839544231333624},{x:.6031318312165941,y:.33937248875722736},{x:.6030097287429766,y:.3403794678432836},{x:.6019486082572825,y:.3436137856097129},{x:.6010339165943431,y:.3468925242789459},{x:.6005759685228916,y:.3477976206592668},{x:.6002597603399046,y:.34876142991364767},{x:.5985880448922466,y:.3517265868338553},{x:.5970512785903404,y:.3547638779678605},{x:.596425554318379,y:.35556224193829966},{x:.5959273921291631,y:.35644584271186947},{x:.5937093248066866,y:.3590278894682911},{x:.5916095409329668,y:.36170701167212105},{x:.5908400866933569,y:.3623679625530219},{x:.5901791145914712,y:.36313739856358157},{x:.5874999344774714,y:.3652371085473978},{x:.5849178265486336,y:.367455104657227},{x:.5840342120362888,y:.36795324247690175},{x:.583235830808931,y:.3685789447300705},{x:.5801984972926872,y:.37011562726413405},{x:.577233294268374,y:.37178726093332853},{x:.06111929426837402,y:.5992822609333287},{x:.05273725635818315,y:.6020319981642364},{x:.04397982983424857,y:.6030936454902367},{x:.035183557686663716,y:.6024264043999704},{x:.02668647572105406,y:.6000559165943432},{x:.018815122032139416,y:.5960732785903404},{x:.011871988327878898,y:.5906315409329669},{x:.006123895342772898,y:.5839398265486336},{x:.001791739066671405,y:.5762552942683741},{x:-.0009579981642362442,y:.5678732563581832},{x:-.002019645490236678,y:.5591158298342487}]],A:[[{x:-.026930267425517032,y:.05053409251215203},{x:-.025968910797820398,y:.041765089843587025},{x:-.02331527881378681,y:.03335213247651147},{x:-.019071349062388714,y:.025618525644501258},{x:-.013400213383949137,y:.018861467521053887},{x:-.006519810342180955,y:.013340628060451547},{x:.0013054500325951415,y:.009268170027042777},{x:.009774847372633092,y:.006800595699190677},{x:.018562907487847988,y:.006032732574482988},{x:.02733191015641301,y:.006994089202179622},{x:.035744867523488544,y:.00964772118621321},{x:.043478474355498745,y:.013891650937611293},{x:.05023553247894613,y:.019562786616050876},{x:.055756371939548466,y:.02644318965781906},{x:.05982882997295724,y:.03426845003259516},{x:.15465984441872488,y:.2705423452957767},{x:.155303,y:.27047899999999997},{x:.433548,y:.27047899999999997},{x:.439584057854266,y:.2710734998088117},{x:.5426964027293978,y:.03313672871631684},{x:.5469805748198717,y:.025425342079263714},{x:.5526868446471364,y:.018697928086846893},{x:.559595923461843,y:.013213017486017727},{x:.5674422992397985,y:.009181392315192764},{x:.5759244401601543,y:.006757985668725375},{x:.5847163823041805,y:.006035927704977205},{x:.5934802562658602,y:.007042966706560308},{x:.6018792712836831,y:.009740402729397836},{x:.6095906579207363,y:.01402457481987169},{x:.6163180719131531,y:.019730844647136342},{x:.6218029825139822,y:.026639923461843008},{x:.6258346076848073,y:.03448629923979854},{x:.6282580143312746,y:.042968440160154345},{x:.6289800722950228,y:.05176038230418057},{x:.6279730332934397,y:.060524256265860256},{x:.6252755972706022,y:.0689232712836832},{x:.3314685972706022,y:.7468972712836831},{x:.3293831787279993,y:.7506509647260751},{x:.32731734906238874,y:.7544154743554987},{x:.32724162770964893,y:.7545056950115825},{x:.32718442518012836,y:.7546086579207363},{x:.324406768107635,y:.7578833802211685},{x:.32164621338394916,y:.7611725324789461},{x:.3215543458189217,y:.761246247067332},{x:.32147815535286367,y:.7613360719131531},{x:.3181150035540548,y:.764005977330098},{x:.314765810342181,y:.7666933719395485},{x:.31466132698386995,y:.7667477476499444},{x:.314569076538157,y:.7668209825139822},{x:.31074967405057474,y:.7687834680795742},{x:.3069405499674049,y:.7707658299729572},{x:.30682746605267575,y:.7707987771773066},{x:.30672270076020147,y:.7708526076848072},{x:.3025938250794972,y:.7720322561793334},{x:.29847115262736695,y:.7732334043008093},{x:.2983538139076442,y:.7732436568565263},{x:.29824055983984565,y:.7732760143312747},{x:.29396088134293,y:.7736274925246428},{x:.289683092512152,y:.774001267425517},{x:.28956600824863027,y:.7739884313326351},{x:.2894486176958195,y:.7739980722950228},{x:.2851826020272766,y:.773507873077374},{x:.280914089843587,y:.7730399107978204},{x:.2808017595188513,y:.7730044793401902},{x:.28068474373413976,y:.7729910332934397},{x:.2765963314836881,y:.7716779947458032},{x:.2725011324765115,y:.7703862788137869},{x:.27239787288194656,y:.7703296136024552},{x:.27228572871631684,y:.7702935972706022},{x:.26853203527393116,y:.7682081787280027},{x:.2647675256445013,y:.7661423490623888},{x:.26467730498841713,y:.7660666277096486},{x:.2645743420792637,y:.7660094251801283},{x:.2612996197788366,y:.7632317681076393},{x:.2580104675210539,y:.7604712133839491},{x:.2579367529326681,y:.7603793458189217},{x:.2578469280868469,y:.7603031553528636},{x:.25517702266989234,y:.7569400035540427},{x:.25248962806045155,y:.7535908103421809},{x:.2524352523500559,y:.7534863269838704},{x:.2523620174860177,y:.753394076538157},{x:.2503995319204231,y:.7495746740505695},{x:.24841717002704278,y:.7457655499674049},{x:-.023694829972957243,y:.06779154996740488},{x:-.026162404300809343,y:.05932215262736691},{x:-.026930267425517032,y:.05053409251215203}],[{x:.19075686729109992,y:.36047899999999994},{x:.2917712201653896,y:.6121588409316518},{x:.4008392655839541,y:.36047899999999994},{x:.19075686729109992,y:.36047899999999994}]],B:[[{x:.018964999999999996,y:.05103000000000002},{x:.018993157630992935,y:.05074411077481729},{x:.01896863696544404,y:.050457886669927884},{x:.019425235762019696,y:.046357147889743},{x:.01982966238185463,y:.04225093550927423},{x:.019913053192865363,y:.04197603284668677},{x:.019944843237820968,y:.04169052471317667},{x:.02119268306568244,y:.037757658485048945},{x:.02239042103699209,y:.03380924554357098},{x:.0225258403659196,y:.03355589379873479},{x:.022612719447780122,y:.03328207355405998},{x:.02460384652213923,y:.029668217721559587},{x:.026548867446385453,y:.026029339514117924},{x:.02673111120436309,y:.02580727485250577},{x:.026869740608734982,y:.025555665255108946},{x:.029527637032761178,y:.022399698271204867},{x:.03214519484660536,y:.019210194846605383},{x:.03236725950821749,y:.019027951088627763},{x:.03255231178483501,y:.01880822135423258},{x:.03577483608951879,y:.016231425260229353},{x:.03896433951411791,y:.013613867446385479},{x:.03921769125895406,y:.013478448117457993},{x:.03944205495260531,y:.013299042336531411},{x:.04310536733612953,y:.011400441961238211},{x:.046744245543570956,y:.009455421036992116},{x:.04701914820615845,y:.009372030225981372},{x:.047274201145921,y:.009239842862072495},{x:.051237522567796415,y:.008092400353164256},{x:.055185935509274225,y:.006894662381854655},{x:.05547182473445692,y:.006866504750861718},{x:.05574776537889109,y:.006786615690234012},{x:.05985878761953148,y:.006434426619834929},{x:.063965,y:.0060300000000000215},{x:.06425088922518268,y:.006058157630992957},{x:.06453711333007213,y:.00603363696544406},{x:.4241221133300721,y:.01060563696544408},{x:.4260098351414485,y:.010815826288282449},{x:.4279092214657345,y:.010813640036582327},{x:.43038314701987823,y:.011302774871886453},{x:.43288947528682337,y:.011581843237821021},{x:.43469991915024053,y:.012156270087817089},{x:.43656323581544765,y:.012524677733968342},{x:.4388942001112364,y:.013487052913568918},{x:.44129792644594007,y:.014249719447780182},{x:.4429615180190356,y:.01516630892323094},{x:.4447171588106798,y:.015891152767997317},{x:.5224141588106799,y:.0573061527679973},{x:.525028554951968,y:.05904868699814221},{x:.5277374225537912,y:.06064039332865708},{x:.5286915199232336,y:.06149010807639827},{x:.529754639763497,y:.06219869339105244},{x:.5319788494519322,y:.06441778869965879},{x:.5343251404217865,y:.06650738469209135},{x:.5350951339540482,y:.06752690757225652},{x:.5359995881074716,y:.06842928201075814},{x:.5377481362120787,y:.07103965980959966},{x:.5396416839038074,y:.07354684346181917},{x:.5707946839038074,y:.12450984346181915},{x:.5718407730360667,y:.12667263757185424},{x:.573076251912317,y:.12873311634664666},{x:.5737567016649755,y:.13063382885667474},{x:.5746357412153917,y:.13245124718509382},{x:.57523978983892,y:.1347765656784282},{x:.576049549867314,y:.13703848290314058},{x:.576346114353134,y:.13903542291661675},{x:.5768537026781452,y:.1409894121704204},{x:.5769924975430949,y:.14338789436140983},{x:.5773454200998597,y:.14576432582559334},{x:.5830324200998597,y:.2611263258255933},{x:.5829003037879823,y:.26382496142481277},{x:.5829742287592172,y:.2665258175697889},{x:.5826851199428378,y:.2682203519457296},{x:.5826010630436497,y:.26993731586400416},{x:.5819450076216034,y:.2725583233230625},{x:.5814906012502021,y:.27522170532098544},{x:.5808764603215925,y:.2768272773619606},{x:.5804590555084463,y:.278494851612457},{x:.5793042728181804,y:.28093750708458076},{x:.5783389976861617,y:.283461062658912},{x:.5774234257367941,y:.284915971131802},{x:.5766887136425759,y:.2864700717712602},{x:.575079581335268,y:.2886405053765124},{x:.5736405324246225,y:.2909272557017569},{x:.5044305324246225,y:.38012925570175693},{x:.5017223718437749,y:.38298983800955333},{x:.499075053174031,y:.3859068173944946},{x:.49869279401231464,y:.38618992769627897},{x:.4983657648506557,y:.38653536283797296},{x:.49515156889241035,y:.38881264393905274},{x:.49198604326106643,y:.39115710813128307},{x:.4915558970220145,y:.39136020348505085},{x:.4911677605809681,y:.39163520096290155},{x:.48757104899345777,y:.3932416662216644},{x:.4840089657752798,y:.3949235187770668},{x:.3737297002329455,y:.43429966367120415},{x:.4408630401939032,y:.4733794631163462},{x:.44336631106573315,y:.475186847643908},{x:.4459719275146733,y:.476843279595192},{x:.4469351296354233,y:.4777635673817196},{x:.4480152047486495,y:.4785433915190981},{x:.45011777274311354,y:.48080441158023823},{x:.45235016915983667,y:.4829373462081214},{x:.4531153243813002,y:.4840278623347861},{x:.4540225100120052,y:.48500341457167107},{x:.4556435746202097,y:.4876311804334344},{x:.4574169612623637,y:.4901586502563309},{x:.45795466509848404,y:.4913774867999537},{x:.45865409861163536,y:.4925112772109775},{x:.4597313632297904,y:.4954048053049642},{x:.460977589843244,y:.49822968107500176},{x:.46126717863714684,y:.4995299988307428},{x:.46173198119508085,y:.5007784564862466},{x:.46222404714804793,y:.5038265501505143},{x:.4628952219429378,y:.5068402734760588},{x:.4768502219429378,y:.6216502734760588},{x:.47694604753136066,y:.6258560133977795},{x:.4770801736029929,y:.6300607061367898},{x:.47704647561686464,y:.6302637547476413},{x:.47705116403527437,y:.6304695272224051},{x:.47632464920624185,y:.6346131496757303},{x:.47563590322258376,y:.6387632171212809},{x:.475563239914934,y:.6389557900590453},{x:.4755276940283349,y:.6391585233384632},{x:.47400675833929046,y:.6430807912362932},{x:.4725216084222428,y:.647016748623825},{x:.4724127722032346,y:.6471914454185},{x:.4723383580201142,y:.6473833485763381},{x:.4700814501766401,y:.6509335313629835},{x:.46785696980463054,y:.6545041220574128},{x:.46771614318912413,y:.6546542292091504},{x:.46760572040480797,y:.6548279275146733},{x:.4646995721096373,y:.6578695936566139},{x:.4618212468158623,y:.6609376018599591},{x:.3721282468158623,y:.739463601859959},{x:.3693406873548985,y:.7414576112446344},{x:.36664335021940475,y:.7435720694617842},{x:.36575927454484214,y:.7440194833243711},{x:.36495338890552403,y:.7445959530105889},{x:.3618303796850022,y:.746007822191186},{x:.35877236079175173,y:.7475554273162446},{x:.35781798626885214,y:.7478217696388809},{x:.3569151218394033,y:.7482299421328396},{x:.35357667835226414,y:.7490054137685334},{x:.3502754956523681,y:.7499266922044516},{x:.21714549565236804,y:.7733246922044517},{x:.2164184100494338,y:.7733799121498203},{x:.21571010443589486,y:.773553134187072},{x:.21202614434596675,y:.7737134914026773},{x:.20834928456346336,y:.7739927377465721},{x:.20762539682958886,y:.7739050492917646},{x:.20689690716677497,y:.7739367593459113},{x:.061505907166774995,y:.7659797593459113},{x:.05835682356136361,y:.7654946428322841},{x:.055185935509274225,y:.7651823376181454},{x:.05400593378019863,y:.7648243880069794},{x:.05278721145616079,y:.7646366437616691},{x:.0497932781460736,y:.7635464928911877},{x:.046744245543570956,y:.7626215789630079},{x:.045656749721751114,y:.7620403003359452},{x:.0444980718907103,y:.7616184026130197},{x:.04177434405403643,y:.7599651112722733},{x:.03896433951411791,y:.7584631325536145},{x:.03801114145411163,y:.7576808631223083},{x:.03695703545532078,y:.7570410252146568},{x:.03460818442533898,y:.7548881284626934},{x:.03214519484660536,y:.7528668051533947},{x:.03136292541529926,y:.7519136070933885},{x:.03045389995114224,y:.7510804176129765},{x:.02857019075568381,y:.7485106500646154},{x:.026548867446385453,y:.7460476604858821},{x:.025967588819322866,y:.7449601646640625},{x:.025238577228599887,y:.7439656426153641},{x:.023892399755650346,y:.7410777589963466},{x:.02239042103699209,y:.738267754456429},{x:.022032471425826126,y:.7370877527273536},{x:.021511489215134356,y:.7359701170349662},{x:.02075457631003429,y:.7328750970932278},{x:.01982966238185463,y:.7298260644907257},{x:.019708797589401895,y:.7285989036590902},{x:.01941586581292807,y:.7274011044358949},{x:.019277305214138767,y:.7242178880520896},{x:.018964999999999996,y:.721047},{x:.018964999999999996,y:.05103000000000002}],[{x:.10896499999999999,y:.09660579683225357},{x:.10896499999999999,y:.37786028838708235},{x:.29722384626437015,y:.36605169579422814},{x:.44137514989764515,y:.3145812530901673},{x:.49232133133007555,y:.24891875813083103},{x:.48801965008125897,y:.1616582425292873},{x:.46925190911582665,y:.130956211173677},{x:.41203782454012283,y:.1004592638951106},{x:.10896499999999999,y:.09660579683225357}],[{x:.10896499999999999,y:.47257215902605326},{x:.10896499999999999,y:.6784424315209651},{x:.20665565807681563,y:.6837888736412973},{x:.32230778354311135,y:.6634626629325134},{x:.3846372425734713,y:.608893375476212},{x:.3762519660226853,y:.5399063743443061},{x:.2981741908903496,y:.4944555775409729},{x:.10896499999999999,y:.47257215902605326}]],C:[[{x:.028007484408327545,y:.4010798543150725},{x:.028340096336253087,y:.39680461654123217},{x:.028649292669517497,y:.39252762152779447},{x:.06572429266951751,y:.1769866215277945},{x:.0657499934516808,y:.17689321918606288},{x:.06575739253020782,y:.1767966283931179},{x:.06691993730130205,y:.17264138379230456},{x:.0680646634579554,y:.1684811950870131},{x:.0681080922997215,y:.16839460141895576},{x:.06813419313592875,y:.16830131007962543},{x:.07008504794245551,y:.16445270857242494},{x:.07201939106115751,y:.16059578172109576},{x:.07207887901649253,y:.16051932447281397},{x:.0721226785698821,y:.1604329177209502},{x:.1274306785698821,y:.07363491772095027},{x:.13009575906138268,y:.07023973030268985},{x:.13274648275581225,y:.06683332229320074},{x:.13281865262016482,y:.06677089175108791},{x:.13287757357360944,y:.06669582922279092},{x:.1361538134974972,y:.06388581079003605},{x:.13941816151489866,y:.0610619864944041},{x:.19692016151489866,y:.020443986494404057},{x:.19808425112310213,y:.019782383965415776},{x:.19914710087537263,y:.01896802966513257},{x:.20191114759162085,y:.01760739299916557},{x:.20458957759683996,y:.01608512525217841},{x:.2058603718000633,y:.015663337846789194},{x:.20706167183504787,y:.015071982836463577},{x:.21003805521400143,y:.014276729186446702},{x:.2129619996426652,y:.013306247159584957},{x:.21429066253234816,y:.013140483931242813},{x:.21558424756339917,y:.01279485365228588},{x:.32760524756339915,y:-.005618146347714133},{x:.32775803960473765,y:-.005628051859015257},{x:.32790622767465843,y:-.005666572281957827},{x:.3321581535063009,y:-.005913311337168391},{x:.3364083102547015,y:-.006188849089881349},{x:.3365600989091985,y:-.006168756021014132},{x:.33671295454862427,y:-.006177626226551311},{x:.34093131721939995,y:-.005590114680318674},{x:.3451535631465426,y:-.005031193603710363},{x:.34529851526132993,y:-.004981874120043047},{x:.3454501643137599,y:-.004960753231150514},{x:.44307616431375996,y:.01857424676884946},{x:.4458503498549469,y:.019539172468847843},{x:.4486819664572553,y:.020319643122350156},{x:.45000735163266253,y:.02098507354168687},{x:.45140809089867484,y:.021472282957461515},{x:.45394072357704407,y:.022959884631265325},{x:.4565656691892177,y:.024277779754777677},{x:.4577357684253341,y:.0251889939358613},{x:.459014543037309,y:.025940112433793877},{x:.4612082951993476,y:.027893222383335445},{x:.4635256946335971,y:.029697896006345384},{x:.5358116946335971,y:.09837789600634546},{x:.5383578959705028,y:.10132350300922108},{x:.5409714489909738,y:.10420951799057969},{x:.5412394420583803,y:.10465705806338507},{x:.5415805729157932,y:.10505169984914184},{x:.5435031902892489,y:.10843744707814906},{x:.545503491029224,y:.11177788699125937},{x:.5456790239480676,y:.11226911056087577},{x:.5459366092786453,y:.11272272074420048},{x:.5471617575812067,y:.11641849583208026},{x:.548471935605029,y:.12008498944441898},{x:.572709935605029,y:.21701898944441894},{x:.5740007070580636,y:.2257455880614603},{x:.5735642017652605,y:.23455632455146336},{x:.571417194380227,y:.24311260725223527},{x:.5676421931927146,y:.25108562301800397},{x:.5623842693813143,y:.2581689733242098},{x:.5558454820094204,y:.2640904489909738},{x:.5482771130087407,y:.26862249102922403},{x:.539970010555581,y:.27159093560502906},{x:.5312434119385397,y:.2728817070580635},{x:.5224326754485367,y:.2724452017652604},{x:.5138763927477648,y:.270298194380227},{x:.5059033769819961,y:.26652319319271456},{x:.49882002667579023,y:.2612652693813142},{x:.49289855100902624,y:.25472648200942033},{x:.488366508970776,y:.24715811300874066},{x:.48539806439497096,y:.23885101055558106},{x:.46433420621000654,y:.15461122058523102},{x:.4102697826671089,y:.10324381045150927},{x:.3332137540403124,y:.08466767669890593},{x:.24039332695070226,y:.09992465997883551},{x:.1985742470214596,y:.12946463056361485},{x:.15288732813236672,y:.2011637190451272},{x:.11884238546013813,y:.39908903228895243},{x:.16184523767713488,y:.5942488915238071},{x:.2166399992296726,y:.6603981208316636},{x:.2708106585112101,y:.6880654725502051},{x:.33167151101531583,y:.6962265900331734},{x:.41875307675349,y:.6679697644015699},{x:.4604926982936834,y:.628705384802963},{x:.487421989657252,y:.5630715564186946},{x:.49155436139101494,y:.5552777692634718},{x:.49712782320648147,y:.5484399232752638},{x:.5039281900917167,y:.5428207930406891},{x:.5116941277610109,y:.5386363185834178},{x:.5201271955849208,y:.5360473069101626},{x:.5289033154962927,y:.5351532522875923},{x:.5376852261286371,y:.5359885127334604},{x:.5461354435813054,y:.5385209896572519},{x:.5539292307365281,y:.5426533613910148},{x:.5607670767247361,y:.5482268232064814},{x:.5663862069593109,y:.5550271900917166},{x:.5705706814165822,y:.5627931277610108},{x:.5731596930898373,y:.5712261955849207},{x:.5740537477124077,y:.5800023154962926},{x:.5732184872665396,y:.588784226128637},{x:.570686010342748,y:.5972344435813053},{x:.540057010342748,y:.6718854435813053},{x:.5396985836895672,y:.6725614478775368},{x:.539454213118803,y:.6732865233897278},{x:.5376352487491008,y:.6764529645154376},{x:.5359246386089851,y:.679679230736528},{x:.5354412171276051,y:.6802723202285732},{x:.5350600868536766,y:.680935789284769},{x:.5326583313554347,y:.6836865257875079},{x:.5303511767935185,y:.686517076724736},{x:.5297613381003629,y:.6870044593160238},{x:.5292580947459566,y:.687580825172473},{x:.47307109474595666,y:.7404358251724731},{x:.4722065860115991,y:.7411021817697292},{x:.4714497622811152,y:.7418887085063782},{x:.4687194058651613,y:.7437900730587934},{x:.46608420409854834,y:.7458212660502541},{x:.46510630693397415,y:.746306161504971},{x:.46421058160492856,y:.7469299263656303},{x:.4611617503991064,y:.748262090618912},{x:.45818091720073817,y:.7497401524453693},{x:.45712721164557074,y:.7500249524971546},{x:.4561270069400303,y:.7504619845480405},{x:.3497190069400303,y:.7849899845480404},{x:.34852117258500637,y:.7852523061157466},{x:.34737251112679673,y:.7856814874310271},{x:.34422084285321763,y:.7861940634064482},{x:.3411016855274714,y:.7868771480384597},{x:.33987569082458696,y:.7869007432807547},{x:.3386653714532072,y:.7870975852636362},{x:.3354742629896646,y:.786985452257037},{x:.33228177619648713,y:.7870468942022847},{x:.3310747354346284,y:.7868308563672394},{x:.32984927004476555,y:.7867877944907101},{x:.25121827004476555,y:.7762437944907102},{x:.24809780050166644,y:.7755083028870222},{x:.24494229970605153,y:.7749416523797719},{x:.24381291428322105,y:.7744983594176508},{x:.24263200473447152,y:.7742200201979198},{x:.2397149814324578,y:.772889887451158},{x:.2367306607297473,y:.771718517308175},{x:.16743766072974728,y:.7363275173081749},{x:.16716950847174827,y:.7361554960544541},{x:.16687461978467572,y:.7360349240533984},{x:.16345937419922074,y:.733775423054901},{x:.16001260855282193,y:.7315643025810339},{x:.15978316844705134,y:.7313432727571054},{x:.15951746839392553,y:.7311674875843215},{x:.15660865257214304,y:.7282851209029094},{x:.15365948376641753,y:.7254440558690711},{x:.15347757306746915,y:.725182511527114},{x:.15325127235232486,y:.7249582685082102},{x:.08558827235232488,y:.6432742685082102},{x:.0845522070982367,y:.6417389136031936},{x:.0833480194008015,y:.6403315480201149},{x:.08209078724421986,y:.6380913122274521},{x:.0806538380596292,y:.6359618836319892},{x:.07993721339171088,y:.6342539038369039},{x:.07903072722802115,y:.632638655023214},{x:.07823470075697891,y:.6301961909068614},{x:.07724079305844417,y:.627827343805619},{x:.07687114846079628,y:.6260123758261444},{x:.07629719958575912,y:.6242513168879111},{x:.02905219958575911,y:.40983931688791114},{x:.028544362954760993,y:.4055813372409792},{x:.028013217832748447,y:.4013262022752188},{x:.028022142274708197,y:.401202753871557},{x:.028007484408327545,y:.4010798543150725}]],D:[[{x:.019456783112310236,y:.0515304721392918},{x:.019516560837245702,y:.0508455251733057},{x:.019462408649259272,y:.05016011050819538},{x:.01989956114396584,y:.04645701928180655},{x:.020223754746627687,y:.042742334175020345},{x:.02041601038349858,y:.04208221032853139},{x:.020496616482350807,y:.04139940114622653},{x:.021647806474261868,y:.03785274800035644},{x:.022690469901424933,y:.03427268656062632},{x:.023007815173924504,y:.033662754022853354},{x:.023220081912440925,y:.03300879029730612},{x:.025041069815762075,y:.029754871123364675},{x:.026762134096652887,y:.026447013104097812},{x:.027192373603928278,y:.025910711240413317},{x:.027528143690388265,y:.025310724430849408},{x:.029948949961216734,y:.02247458551787214},{x:.03228227556070457,y:.019566050047680916},{x:.03280887543977226,y:.01912398863794477},{x:.03325524541805519,y:.01860103590097925},{x:.03618283982900684,y:.01629166847686688},{x:.03903875835284746,y:.013894228942745224},{x:.03964148166567549,y:.013563396159022682},{x:.0401812977878431,y:.013137574275061882},{x:.04350317452751879,y:.011443726034814963},{x:.04677193462845869,y:.0096495146935595},{x:.04742761905614622,y:.009442624254195854},{x:.048040136491355995,y:.009130297319436702},{x:.05162863769958001,y:.008117061901006828},{x:.05518462276008175,y:.0069950292882567724},{x:.05586807071778482,y:.006920031876811272},{x:.05652975076450537,y:.006733202440201605},{x:.060246972352300414,y:.0064395179124900545},{x:.06395352786070822,y:.006032783112310258},{x:.06463847482669428,y:.006092560837245719},{x:.06532388949180462,y:.006038408649259287},{x:.22607288949180462,y:.009146408649259287},{x:.22716730592225892,y:.009275605270020776},{x:.2282688262216939,y:.009242558031150067},{x:.23153975417198444,y:.00979177582685766},{x:.23483359885377353,y:.010180616482350843},{x:.23588178136904675,y:.010520840680108605},{x:.23696858346127098,y:.010703324384590318},{x:.374121583461271,y:.04785532438459028},{x:.3763172878682137,y:.048688585594252994},{x:.37858028056243914,y:.049316523610364836},{x:.3804311803743379,y:.05024979166335608},{x:.3823691959266467,y:.050985260963484026},{x:.38436014929137596,y:.0522308719724549},{x:.38645715458576285,y:.05328823230909956},{x:.47004915458576285,y:.1063032323090996},{x:.47296331256678825,y:.10858070495130694},{x:.47594842000778254,y:.11076435600861785},{x:.476434095048061,y:.11129319075325024},{x:.4769998347544389,y:.11173532762855881},{x:.47941368513584726,y:.11453756329148114},{x:.48191542538645477,y:.11726162167794474},{x:.5445294253864548,y:.20053762167794476},{x:.5457907389554543,y:.20261097926106453},{x:.5472304508598836,y:.2045646816997861},{x:.5480776582474705,y:.2063702359380903},{x:.54911422277829,y:.20807414921008693},{x:.5499468085621922,y:.21035373787896267},{x:.5509777083681839,y:.21255077433219424},{x:.570480708368184,y:.26758877433219413},{x:.5715324066676154,y:.27184261440989077},{x:.5725895850614416,y:.2760950958693092},{x:.5821235850614417,y:.3411630958693092},{x:.5823063349967632,y:.3450227385412275},{x:.5825832689280143,y:.34887676846995497},{x:.5805752689280143,y:.424797768469955},{x:.5800798101377765,y:.42875301375722},{x:.5796594372976747,y:.43271694253692033},{x:.5588164372976746,y:.5335539425369203},{x:.5581925601051908,y:.535556542700639},{x:.5577783377379867,y:.5376127649642906},{x:.5568838034059929,y:.5397575559956548},{x:.5561926080991778,y:.5419762423834013},{x:.555190030621201,y:.5438186507441294},{x:.5543826183570809,y:.5457545524985521},{x:.5020956183570809,y:.6430055524985521},{x:.5018901867095668,y:.6433113858234256},{x:.5017428412228655,y:.6436490624319612},{x:.4994325691935421,y:.6469701275279692},{x:.4971767628200625,y:.6503284258808291},{x:.4969156133622187,y:.650588304977856},{x:.4967052216394318,y:.6508907475465959},{x:.49379143318032753,y:.6536972875938759},{x:.49092379998669317,y:.6565509711937552},{x:.49061696854573045,y:.6567549090549786},{x:.49035161582277553,y:.657010494885618},{x:.39890061582277553,y:.7292364948856179},{x:.3986791836579038,y:.7293785203585265},{x:.39848760231040037,y:.7295587979940886},{x:.39496847203231433,y:.7317585520660096},{x:.39147518928128755,y:.7339991259907827},{x:.39123030407812903,y:.7340952232117042},{x:.391007233490524,y:.7342346611962726},{x:.3871265715837099,y:.7357055993513507},{x:.38326329699273004,y:.7372216156196327},{x:.3830043695523095,y:.737268091626259},{x:.38275838220218455,y:.7373613314362847},{x:.25909638220218456,y:.7708063314362847},{x:.2580664240588666,y:.7709788511982676},{x:.2570738325025125,y:.7713034106651087},{x:.2537238261308602,y:.7717062438265866},{x:.2503960471743838,y:.7722636525302581},{x:.2493522224520667,y:.7722319225075465},{x:.24831538485324267,y:.7723566006488801},{x:.17218438485324267,y:.7739936006488801},{x:.16854768223369815,y:.7737142062783378},{x:.16490357022768087,y:.7735589167265521},{x:.06552457022768086,y:.7594769167265522},{x:.06454980411013514,y:.759239472501363},{x:.06355033417502035,y:.7591522452533723},{x:.06027159361314519,y:.7581973390517399},{x:.056953647958865025,y:.7573891174476861},{x:.056043934769293216,y:.7569660682109414},{x:.05508068656062633,y:.7566855300985751},{x:.05205123903764884,y:.7551093215998242},{x:.04895472299174925,y:.7536693306611393},{x:.04814502249785432,y:.7530769339577588},{x:.0472550131040978,y:.7526138659033472},{x:.04459127858939255,y:.7504769279161366},{x:.04183518952697092,y:.7484605056870383},{x:.041156618064647085,y:.7477215269901124},{x:.040374050047680896,y:.7470937244392954},{x:.03817839436480973,y:.744478178292066},{x:.035868647242901154,y:.7419628147479951},{x:.03534728193289863,y:.7411056525944231},{x:.03470222894274521,y:.7403372416471526},{x:.03305902990826266,y:.7373436013115269},{x:.03128438701344127,y:.73442596046285},{x:.030940263632238257,y:.7334835551134912},{x:.030457514693559486,y:.7326040653715413},{x:.029429919524844063,y:.7293473747667649},{x:.028258579388326675,y:.7261395799150647},{x:.028104922404476318,y:.7251481474789881},{x:.02780302928825676,y:.7241913772399183},{x:.02743052789135989,y:.7207967891595589},{x:.026907504457698045,y:.7174221140620348},{x:.02695021882291786,y:.7164197547317572},{x:.026840783112310238,y:.7154224721392919},{x:.019456783112310236,y:.0515304721392918}],[{x:.1099671672449683,y:.09691838411671685},{x:.1164055200593884,y:.675787686211921},{x:.17390769441284104,y:.6839357418297609},{x:.2408956143230629,y:.6824953400894312},{x:.35035782392371695,y:.652890743688808},{x:.42724604872976657,y:.5921661050862587},{x:.4720072878873445,y:.5089126143655517},{x:.4907125333997566,y:.41841792349882906},{x:.4925121994894803,y:.35037387509349616},{x:.4841787199640398,y:.2934992321564965},{x:.4684498534661817,y:.24911194023683725},{x:.41491413338319044,y:.1779099626338861},{x:.34401115658372555,y:.1329424859013802},{x:.21878934362335548,y:.0990224054430332},{x:.1099671672449683,y:.09691838411671685}]],E:[[{x:.035078,y:.05103000000000002},{x:.03594266238185463,y:.04225093550927423},{x:.03850342103699209,y:.03380924554357098},{x:.042661867446385456,y:.026029339514117924},{x:.04825819484660536,y:.019210194846605383},{x:.05507733951411791,y:.013613867446385479},{x:.06285724554357096,y:.009455421036992116},{x:.07129893550927423,y:.006894662381854655},{x:.080078,y:.0060300000000000215},{x:.521974,y:.0060300000000000215},{x:.5307530644907258,y:.006894662381854655},{x:.5391947544564291,y:.009455421036992116},{x:.5469746604858822,y:.013613867446385479},{x:.5537938051533947,y:.019210194846605383},{x:.5593901325536146,y:.026029339514117924},{x:.5635485789630079,y:.03380924554357098},{x:.5661093376181454,y:.04225093550927425},{x:.5669740000000001,y:.05103000000000002},{x:.5661093376181454,y:.05980906449072579},{x:.5635485789630079,y:.06825075445642906},{x:.5593901325536146,y:.07603066048588211},{x:.5537938051533947,y:.08284980515339466},{x:.5469746604858822,y:.08844613255361455},{x:.5391947544564291,y:.09260457896300792},{x:.5307530644907258,y:.09516533761814538},{x:.521974,y:.09603000000000002},{x:.125078,y:.09603000000000002},{x:.125078,y:.345019},{x:.389405,y:.345019},{x:.3981840644907258,y:.34588366238185464},{x:.40662575445642907,y:.3484444210369921},{x:.4144056604858821,y:.35260286744638547},{x:.42122480515339467,y:.35819919484660534},{x:.42682113255361454,y:.3650183395141179},{x:.4309795789630079,y:.372798245543571},{x:.43354033761814537,y:.3812399355092742},{x:.434405,y:.390019},{x:.43354033761814537,y:.3987980644907258},{x:.4309795789630079,y:.407239754456429},{x:.42682113255361454,y:.4150196604858821},{x:.42122480515339467,y:.42183880515339467},{x:.4144056604858821,y:.42743513255361454},{x:.40662575445642907,y:.43159357896300793},{x:.3981840644907258,y:.43415433761814537},{x:.389405,y:.435019},{x:.125078,y:.435019},{x:.125078,y:.684004},{x:.521974,y:.684004},{x:.5307530644907258,y:.6848686623818546},{x:.5391947544564291,y:.6874294210369921},{x:.5469746604858822,y:.6915878674463855},{x:.5537938051533947,y:.6971841948466053},{x:.5593901325536146,y:.7040033395141179},{x:.5635485789630079,y:.711783245543571},{x:.5661093376181454,y:.7202249355092742},{x:.5669740000000001,y:.729004},{x:.5661093376181454,y:.7377830644907257},{x:.5635485789630079,y:.746224754456429},{x:.5593901325536146,y:.7540046604858821},{x:.5537938051533947,y:.7608238051533946},{x:.5469746604858822,y:.7664201325536145},{x:.5391947544564291,y:.7705785789630079},{x:.5307530644907258,y:.7731393376181454},{x:.521974,y:.774004},{x:.080078,y:.774004},{x:.07129893550927423,y:.7731393376181454},{x:.06285724554357093,y:.7705785789630079},{x:.05507733951411791,y:.7664201325536145},{x:.04825819484660536,y:.7608238051533946},{x:.042661867446385456,y:.7540046604858821},{x:.03850342103699209,y:.746224754456429},{x:.03594266238185463,y:.7377830644907257},{x:.035078,y:.729004},{x:.035078,y:.05103000000000002}]],F:[[{x:.041426000000000004,y:.05103000000000002},{x:.04229066238185464,y:.04225093550927423},{x:.0448514210369921,y:.03380924554357098},{x:.04900986744638546,y:.026029339514117924},{x:.054606194846605366,y:.019210194846605383},{x:.06142533951411792,y:.013613867446385479},{x:.06920524554357096,y:.009455421036992116},{x:.07764693550927423,y:.006894662381854655},{x:.086426,y:.0060300000000000215},{x:.09520506449072577,y:.006894662381854655},{x:.10364675445642904,y:.009455421036992116},{x:.11142666048588211,y:.013613867446385486},{x:.11824580515339464,y:.019210194846605383},{x:.12384213255361454,y:.026029339514117924},{x:.1280005789630079,y:.03380924554357098},{x:.13056133761814537,y:.04225093550927425},{x:.131426,y:.05103000000000002},{x:.131426,y:.347323},{x:.447344,y:.347323},{x:.4561230644907258,y:.3481876623818546},{x:.4645647544564291,y:.35074842103699205},{x:.47234466048588214,y:.35490686744638544},{x:.47916380515339463,y:.3605031948466053},{x:.48476013255361455,y:.36732233951411786},{x:.48891857896300794,y:.37510224554357097},{x:.4914793376181454,y:.3835439355092742},{x:.492344,y:.392323},{x:.4914793376181454,y:.4011020644907258},{x:.48891857896300794,y:.409543754456429},{x:.48476013255361455,y:.4173236604858821},{x:.47916380515339463,y:.42414280515339464},{x:.47234466048588214,y:.4297391325536145},{x:.4645647544564291,y:.4338975789630079},{x:.4561230644907258,y:.43645833761814534},{x:.447344,y:.43732299999999996},{x:.131426,y:.43732299999999996},{x:.131426,y:.679393},{x:.515626,y:.679393},{x:.5244050644907258,y:.6802576623818547},{x:.532846754456429,y:.6828184210369922},{x:.5406266604858821,y:.6869768674463855},{x:.5474458051533947,y:.6925731948466054},{x:.5530421325536146,y:.6993923395141179},{x:.5572005789630079,y:.707172245543571},{x:.5597613376181454,y:.7156139355092743},{x:.5606260000000001,y:.7243930000000001},{x:.5597613376181454,y:.7331720644907258},{x:.5572005789630079,y:.7416137544564291},{x:.5530421325536146,y:.7493936604858822},{x:.5474458051533947,y:.7562128051533947},{x:.5406266604858821,y:.7618091325536146},{x:.532846754456429,y:.7659675789630079},{x:.5244050644907258,y:.7685283376181454},{x:.515626,y:.7693930000000001},{x:.10586481668800227,y:.7693930000000001},{x:.10364675445642904,y:.7705785789630079},{x:.09520506449072577,y:.7731393376181454},{x:.086426,y:.774004},{x:.0776469355092742,y:.7731393376181454},{x:.06920524554357094,y:.7705785789630079},{x:.06142533951411792,y:.7664201325536145},{x:.054606194846605366,y:.7608238051533946},{x:.04900986744638546,y:.7540046604858821},{x:.0448514210369921,y:.746224754456429},{x:.04229066238185464,y:.7377830644907257},{x:.041426000000000004,y:.729004},{x:.041426000000000004,y:.05103000000000002}]],G:[[{x:.011397831509003739,y:.41623356008285023},{x:.011618856500496228,y:.4138403978921803},{x:.011624876992355357,y:.4114370583257866},{x:.031979876992355355,y:.20994505832578658},{x:.0322125865037964,y:.20879027461506633},{x:.03227702681480045,y:.2076140405475535},{x:.033082276634523504,y:.2044745765152392},{x:.033722542929381774,y:.20129735748690203},{x:.034176068118796386,y:.2002101619949014},{x:.03446874211029117,y:.19906910061620064},{x:.03587099832954512,y:.19614705695158466},{x:.03711880677043453,y:.1931557970536144},{x:.03777571891913337,y:.19217797009338475},{x:.03828537929375919,y:.19111593175236494},{x:.08239837929375919,y:.11845093175236496},{x:.08400149586436068,y:.11631468084865614},{x:.08543403702225794,y:.1140604899753128},{x:.08664282877724949,y:.11279494315419919},{x:.08769326713863865,y:.11139516977529508},{x:.08968234215056696,y:.10961271886167734},{x:.09152712825517066,y:.10768131654967852},{x:.15960912825517065,y:.049144316549678456},{x:.16129904644183068,y:.0479582081853546},{x:.16285577619764602,y:.04660201166682107},{x:.1649006360722032,y:.045430348778213794},{x:.16682965744636918,y:.04407642028337947},{x:.16871850259167306,y:.043242789341903884},{x:.17050990103726027,y:.04221635466854622},{x:.25257090103726026,y:.005359354668546305},{x:.2555014876285109,y:.004375276469579791},{x:.2583690572759664,y:.003220377345201267},{x:.25967433471463813,y:.0029740526131209386},{x:.2609335532503684,y:.0025512125194529015},{x:.2639998135747395,y:.0021577721889240492},{x:.26703759331756605,y:.0015844992133087973},{x:.35309859331756605,y:-.006038500786691249},{x:.3541123404679588,y:-.006028536718703998},{x:.3551159915981175,y:-.006171599559831674},{x:.3585153812714738,y:-.005985259459774228},{x:.361919709861342,y:-.005951798491220829},{x:.36291203425126567,y:-.00574425362199294},{x:.3639243106821295,y:-.005688764928569123},{x:.3672220288859873,y:-.004842817275250554},{x:.37055441634545594,y:-.004145847688979236},{x:.3714871835051078,y:-.003748697851442632},{x:.37246918402112983,y:-.003496790022837183},{x:.4525501840211298,y:.02567020997716287},{x:.4548144879103283,y:.026756908839544704},{x:.45716266717941917,y:.02764799841997529},{x:.45878159595452606,y:.02866082810547922},{x:.4605032369247208,y:.02948708879101062},{x:.4625120284186098,y:.03099465081435172},{x:.46464124512829075,y:.032326725408117304},{x:.4660314733714444,y:.03363593119127184},{x:.46755883802994086,y:.034782191000688294},{x:.46923492039795345,y:.03665268142188218},{x:.47106334994415,y:.038374550149380404},{x:.53517534994415,y:.11188255014938031},{x:.5366918789074028,y:.11401106513419482},{x:.5383741006891446,y:.11601120663268963},{x:.5392453250303639,y:.11759493887966013},{x:.5402941837404813,y:.11906705813061697},{x:.5413663203511413,y:.12145053442062861},{x:.5426260104640281,y:.12374042895017842},{x:.5431715236397763,y:.1254636976633839},{x:.5439130326051668,y:.12711215273922669},{x:.5444995752545472,y:.12965899467727895},{x:.5452883245139833,y:.13215064287530112},{x:.5896823245139834,y:.3420786428753011},{x:.5897067631627176,y:.34229945557802055},{x:.5897717252277992,y:.3425119065778641},{x:.5901917436343531,y:.346681442891342},{x:.5906527316031134,y:.3508466486034176},{x:.590633622248786,y:.3510679861958218},{x:.5906558889520306,y:.35128902847947113},{x:.590254400640623,y:.3554603898480228},{x:.5898939395311937,y:.3596354965915505},{x:.5898320165355749,y:.3598488531940917},{x:.589810732180064,y:.3600699922305474},{x:.5886031661213459,y:.3640828755761044},{x:.5874351082520124,y:.3681074363403587},{x:.5873327512810971,y:.3683046127784522},{x:.5872687338126765,y:.3685173503185603},{x:.5853014960930706,y:.3722175427846122},{x:.5833707292727002,y:.37593689595641405},{x:.5832318718474782,y:.3761103148501221},{x:.583127581421558,y:.3763064755095204},{x:.5804762718833937,y:.37955178077467916},{x:.577856994398102,y:.38282299369748307},{x:.5776869727315521,y:.38296599065597503},{x:.5775464171707139,y:.38313803609053093},{x:.5743129241526703,y:.3858037388934479},{x:.5711057933673104,y:.38850110068914456},{x:.5709111412967293,y:.38860818041949885},{x:.5707397220723512,y:.3887494990196469},{x:.5670483068977423,y:.3907331578965531},{x:.5633765710498215,y:.39275301046402805},{x:.5631647689451196,y:.3928200579522583},{x:.5629690736018615,y:.39292521892344706},{x:.5589615952856832,y:.39415060297614785},{x:.5549663571246989,y:.39541532451398326},{x:.5547455444219794,y:.39543976316271745},{x:.5545330934221359,y:.39550472522779906},{x:.5503635571086607,y:.3959247436343527},{x:.5461983513965825,y:.39638573160311336},{x:.5459770138041778,y:.396366622248786},{x:.5457559715205288,y:.3963888889520305},{x:.32969497152052885,y:.39686888895203054},{x:.32091400776945256,y:.3960237321800639},{x:.31246664968143967,y:.39348173381267654},{x:.3046775244904796,y:.389340581421558},{x:.29784596390946905,y:.3837594171707138},{x:.2922345009803531,y:.3769527220723512},{x:.2880587810765529,y:.3691820736018615},{x:.2854792747722009,y:.3607460934221358},{x:.2845951110479695,y:.3519689715205288},{x:.2854402678199361,y:.3431880077694525},{x:.2879822661873235,y:.33474064968143963},{x:.29212341857844204,y:.32695152449047954},{x:.29770458282928614,y:.320119963909469},{x:.3045112779276488,y:.31450850098035305},{x:.31228192639813845,y:.3103327810765529},{x:.3207179065778642,y:.3077532747722009},{x:.3294950284794712,y:.30686911104796943},{x:.49017057214072013,y:.30651215509128404},{x:.45965681956734333,y:.16222033524572274},{x:.4108567628008364,y:.10626833604444391},{x:.35107150330533127,y:.0844934248457151},{x:.2825297162303303,y:.09056463065174497},{x:.21333680545064249,y:.12164203785622632},{x:.15562253329738823,y:.17126485077351794},{x:.1205010051965362,y:.2291186770707186},{x:.10185989085514695,y:.41364510354456796},{x:.13655871914038514,y:.5827099362211221},{x:.190187982415082,y:.6526649281775241},{x:.2569251189377254,y:.6872526727450867},{x:.3715857772516941,y:.6967797369989467},{x:.4883723057362636,y:.6711064406866752},{x:.49713228125159653,y:.6700660353148682},{x:.5059269093127409,y:.6707546074846872},{x:.5144182172953911,y:.6731456957538017},{x:.5222798889957544,y:.6771474119409674},{x:.529209804779262,y:.6826059723372997},{x:.5349416518686954,y:.6893116075279637},{x:.5392551585948644,y:.6970066237131456},{x:.5419845593133248,y:.7053953057362636},{x:.5430249646851317,y:.7141552812515966},{x:.5423363925153128,y:.722949909312741},{x:.5399453042461984,y:.7314412172953911},{x:.5359435880590326,y:.7393028889957545},{x:.5304850276627003,y:.7462328047792621},{x:.5237793924720363,y:.7519646518686954},{x:.5160843762868544,y:.7562781585948645},{x:.5076956942637364,y:.7590075593133249},{x:.38428269426373635,y:.7861375593133247},{x:.3819812519937546,y:.7864108971664274},{x:.3797153389243004,y:.7868977113667894},{x:.37761181025895013,y:.7869298473215656},{x:.37552271874840343,y:.7871779646851318},{x:.3732121724765259,y:.7869970613144796},{x:.370894825552222,y:.7870324638061055},{x:.24049282555222196,y:.7761974638061055},{x:.24043595887820252,y:.7761870527203061},{x:.24037815170992255,y:.776187787986971},{x:.2360978388350013,y:.7753928346522221},{x:.2318155069745089,y:.7746088302209789},{x:.231761764079766,y:.7745875250435272},{x:.2317049242166051,y:.7745769685631748},{x:.227661944055434,y:.7729622424167508},{x:.22361484767780643,y:.7713578609091699},{x:.22356629387164592,y:.7713264803860874},{x:.22351260563766895,y:.7713050378383375},{x:.13987060563766895,y:.7279560378383374},{x:.13900257424615298,y:.727391873258006},{x:.13805978359276902,y:.7269641982011581},{x:.13531067905832161,y:.7249923788161832},{x:.13247402218179744,y:.7231487342752945},{x:.13173273281971745,y:.7224260654354895},{x:.1308914928889356,y:.7218226787027751},{x:.128579894506033,y:.7193524235854973},{x:.12615742040314795,y:.7169907998540069},{x:.12557136040496888,y:.7161373985129647},{x:.12486399957555622,y:.7153814879181388},{x:.05884299957555622,y:.6292624879181389},{x:.05814177883495547,y:.6281337214080167},{x:.057292540659828396,y:.62711165542026},{x:.05581896837632758,y:.6243946553718145},{x:.05418793684040681,y:.6217691571968414},{x:.05372040128165289,y:.6205252782386133},{x:.05308687616260495,y:.6193571728131668},{x:.052171678571706244,y:.6164048994674943},{x:.051084196133809955,y:.613511651036194},{x:.05086831288622884,y:.6122004612006492},{x:.05047484683830003,y:.6109312059739318},{x:.012315846838300032,y:.4250072059739319},{x:.012065742114142504,y:.42261690788694145},{x:.011602778634016861,y:.4202585732767163},{x:.011607833784388823,y:.41824059149262255},{x:.011397831509003739,y:.41623356008285023}]],H:[[{x:.021894999999999998,y:.05103000000000002},{x:.02275966238185463,y:.04225093550927423},{x:.025320421036992093,y:.03380924554357098},{x:.029478867446385455,y:.026029339514117924},{x:.03507519484660536,y:.019210194846605383},{x:.04189433951411791,y:.013613867446385479},{x:.04967424554357096,y:.009455421036992116},{x:.05811593550927423,y:.006894662381854655},{x:.066895,y:.0060300000000000215},{x:.07567406449072576,y:.006894662381854655},{x:.08411575445642903,y:.009455421036992116},{x:.0918956604858821,y:.013613867446385486},{x:.09871480515339463,y:.019210194846605383},{x:.10431113255361453,y:.026029339514117924},{x:.1084695789630079,y:.03380924554357098},{x:.11103033761814536,y:.04225093550927425},{x:.111895,y:.05103000000000002},{x:.111895,y:.359342},{x:.490157,y:.359342},{x:.490157,y:.05103000000000002},{x:.49102166238185463,y:.04225093550927423},{x:.49358242103699207,y:.03380924554357098},{x:.49774086744638546,y:.026029339514117924},{x:.5033371948466053,y:.019210194846605383},{x:.5101563395141179,y:.013613867446385479},{x:.517936245543571,y:.009455421036992116},{x:.5263779355092743,y:.006894662381854655},{x:.535157,y:.0060300000000000215},{x:.5439360644907257,y:.006894662381854655},{x:.552377754456429,y:.009455421036992116},{x:.5601576604858821,y:.013613867446385486},{x:.5669768051533947,y:.019210194846605383},{x:.5725731325536145,y:.026029339514117924},{x:.5767315789630079,y:.03380924554357098},{x:.5792923376181454,y:.04225093550927425},{x:.580157,y:.05103000000000002},{x:.580157,y:.729004},{x:.5792923376181454,y:.7377830644907257},{x:.5767315789630079,y:.746224754456429},{x:.5725731325536145,y:.7540046604858821},{x:.5669768051533947,y:.7608238051533946},{x:.5601576604858821,y:.7664201325536145},{x:.552377754456429,y:.7705785789630079},{x:.5439360644907257,y:.7731393376181454},{x:.535157,y:.774004},{x:.5263779355092743,y:.7731393376181454},{x:.517936245543571,y:.7705785789630079},{x:.5101563395141179,y:.7664201325536145},{x:.5033371948466053,y:.7608238051533946},{x:.49774086744638546,y:.7540046604858821},{x:.49358242103699207,y:.746224754456429},{x:.49102166238185463,y:.7377830644907257},{x:.490157,y:.729004},{x:.490157,y:.44934199999999996},{x:.111895,y:.44934199999999996},{x:.111895,y:.729004},{x:.11103033761814536,y:.7377830644907257},{x:.10846957896300788,y:.746224754456429},{x:.10431113255361453,y:.7540046604858821},{x:.09871480515339463,y:.7608238051533946},{x:.09189566048588207,y:.7664201325536145},{x:.08411575445642903,y:.7705785789630079},{x:.07567406449072576,y:.7731393376181454},{x:.066895,y:.774004},{x:.05811593550927421,y:.7731393376181454},{x:.04967424554357093,y:.7705785789630079},{x:.04189433951411791,y:.7664201325536145},{x:.03507519484660536,y:.7608238051533946},{x:.029478867446385455,y:.7540046604858821},{x:.025320421036992093,y:.746224754456429},{x:.02275966238185463,y:.7377830644907257},{x:.021894999999999998,y:.729004},{x:.021894999999999998,y:.05103000000000002}]],I:[[{x:.25602600000000003,y:.05103000000000002},{x:.25689066238185465,y:.04225093550927423},{x:.2594514210369921,y:.03380924554357098},{x:.2636098674463855,y:.026029339514117924},{x:.26920619484660535,y:.019210194846605383},{x:.27602533951411795,y:.013613867446385479},{x:.283805245543571,y:.009455421036992116},{x:.2922469355092743,y:.006894662381854655},{x:.301026,y:.0060300000000000215},{x:.3098050644907258,y:.006894662381854655},{x:.3182467544564291,y:.009455421036992116},{x:.32602666048588214,y:.013613867446385486},{x:.3328458051533947,y:.019210194846605383},{x:.33844213255361455,y:.026029339514117924},{x:.34260057896300794,y:.03380924554357098},{x:.3451613376181454,y:.04225093550927425},{x:.346026,y:.05103000000000002},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.05103000000000002}]],J:[[{x:.0492700034030052,y:.22191686675397743},{x:.05066400340300519,y:.18438286675397747},{x:.05116783173382979,y:.18068175768771486},{x:.05155979864248331,y:.17696713613904605},{x:.05874879864248331,y:.14209513613904604},{x:.05880353678004782,y:.1419191061579158},{x:.05882437610196882,y:.14173594355086241},{x:.060112741823836933,y:.13770889095133898},{x:.06136821695472819,y:.13367146342030908},{x:.0614562450600313,y:.133509494686791},{x:.06151241721221637,y:.13333391704789688},{x:.07511841721221638,y:.10184091704789687},{x:.07557207470549994,y:.10102219111224012},{x:.07589401217340325,y:.10014328637013822},{x:.07770640675364808,y:.09717031380613761},{x:.07939396242231754,y:.09412474393402119},{x:.07999862852050488,y:.09341025377409445},{x:.08048584585939292,y:.09261104382444658},{x:.10112984585939291,y:.06520804382444652},{x:.10197173470408774,y:.06429305686105671},{x:.10267645797068833,y:.06326868237508665},{x:.10495244591663212,y:.06105354143298789},{x:.10710291637241387,y:.058716353519649434},{x:.10810713366035453,y:.05798319214000915},{x:.10899816141532707,y:.05711598541156246},{x:.1373061614153271,y:.03451898541156248},{x:.13912164740426522,y:.03334117545586675},{x:.1408101373903697,y:.03198757757075004},{x:.14281300361792376,y:.03094638082514127},{x:.14470672673278473,y:.029717813955661344},{x:.1467171079910441,y:.028916819034200267},{x:.14863722796281134,y:.027918638208003034},{x:.20683022796281134,y:.004592638208003076},{x:.20850921914024034,y:.004104279923540699},{x:.2101185278310492,y:.0034204446176558795},{x:.21273469892125257,y:.0028752394826936905},{x:.21530073387518742,y:.0021288719943945503},{x:.21704273768291169,y:.0019774523068977427},{x:.21875453360851305,y:.0016207172553791283},{x:.2976895336085131,y:-.0068802827446208525},{x:.29850402526559744,y:-.006887701289741747},{x:.2993068957135494,y:-.007024999279811796},{x:.30290822222422875,y:-.006927815554356645},{x:.3065107103471747,y:-.0069606277022222565},{x:.30731099906181086,y:-.006809004262418785},{x:.30812522808832776,y:-.0067870318558802545},{x:.3663632280883278,y:.0005399681441197179},{x:.367446910459264,y:.0007860908462292888},{x:.3685549625674647,y:.000870733572342984},{x:.37174033606180384,y:.0017612008405818037},{x:.37496569353784953,y:.0024937343933679954},{x:.37598053709868623,y:.002946543859479297},{x:.3770507853196353,y:.0032457304419443098},{x:.4423997853196353,y:.028649730441944292},{x:.44339023767510893,y:.0291515261148112},{x:.4444435524779453,y:.029502699422305954},{x:.4473177196266577,y:.03114131738307233},{x:.45026902431580135,y:.03263654520916596},{x:.4511425499275847,y:.03332192668785485},{x:.4521071150681948,y:.03387184382278591},{x:.4818761150681948,y:.0549598438227859},{x:.482276572000261,y:.05530719927286456},{x:.48273081061614365,y:.05558049186877649},{x:.48560514894853896,y:.05819439949693127},{x:.48854004666413575,y:.060740123232255375},{x:.48886504324193186,y:.061158929616590856},{x:.48925723704963914,y:.06151558852974905},{x:.5141262370496392,y:.08904658852974903},{x:.5149956342421861,y:.09022293690705172},{x:.5160117353213701,y:.09127516577002369},{x:.5176116053111659,y:.0937625081737249},{x:.5193693801104602,y:.0961408866071265},{x:.519992577896003,y:.09746424275846524},{x:.5207838752101566,y:.09869448482562238},{x:.5385188752101566,y:.1333154848256224},{x:.5396070973995049,y:.13607819549886616},{x:.5408707323766272,y:.1387652058155645},{x:.5412201620380835,y:.14017334347255597},{x:.5417518824254063,y:.14152324205357814},{x:.5422802166156467,y:.1444451696332536},{x:.5429953614930656,y:.1473270727547606},{x:.5523413614930656,y:.2113020727547606},{x:.5524962602601196,y:.21460328519222147},{x:.5528139181508881,y:.2178928278123641},{x:.5518389181508881,y:.7290898278123641},{x:.5509575131661891,y:.7378672271777721},{x:.5483806584624608,y:.7463040176932935},{x:.5442073811208505,y:.7540759782308231},{x:.5385980578491955,y:.7608844367054697},{x:.5317682517950807,y:.7664677478762799},{x:.5239804285749665,y:.7706113482261165},{x:.5155338698677402,y:.7731560015172932},{x:.5067531721876358,y:.7740039181508881},{x:.4979757728222279,y:.7731225131661891},{x:.4895389823067066,y:.7705456584624607},{x:.48176702176917696,y:.7663723811208505},{x:.4749585632945304,y:.7607630578491954},{x:.46937525212372017,y:.7539332517950806},{x:.4652316517738835,y:.7461454285749665},{x:.46268699848270683,y:.7376988698677401},{x:.461839081849112,y:.7289181721876359},{x:.462807763438783,y:.22103394388498027},{x:.45501827222953295,y:.16771351802238937},{x:.44337725180090903,y:.14498874958374325},{x:.42579959063650114,y:.12552955984883984},{x:.4046143325842134,y:.11052217895574154},{x:.34961801160788414,y:.08914271579513207},{x:.3021031758959219,y:.08316481131246532},{x:.2345584384824393,y:.09043912324952764},{x:.18827433696976265,y:.10899157718530504},{x:.16959144206995366,y:.1239052897771866},{x:.155605251275173,y:.14247066404328695},{x:.14596289111822178,y:.16478926233983734},{x:.14046290234137151,y:.19146830095804884},{x:.13920799659699482,y:.22525713324602253},{x:.1380181031040591,y:.23399805813086086},{x:.13514580323043823,y:.24233889189031887},{x:.13070147784947123,y:.24995910096061402},{x:.12485591989314217,y:.25656584498063745},{x:.11783377087548613,y:.26190523048280423},{x:.10990488804518514,y:.26577206787662816},{x:.10137397392283892,y:.2680177567696118},{x:.09256886675397746,y:.2685559965969948},{x:.08382794186913914,y:.26736610310405906},{x:.07548710810968112,y:.26449380323043825},{x:.06786689903938595,y:.2600494778494712},{x:.06126015501936256,y:.2542039198931421},{x:.055920769517195726,y:.24718177087548612},{x:.052053932123371845,y:.23925288804518513},{x:.04980824323038816,y:.2307219739228389},{x:.0492700034030052,y:.22191686675397743}]],K:[[{x:-.009598999999999996,y:.05103000000000002},{x:-.008734337618145363,y:.04225093550927423},{x:-.006173578963007902,y:.03380924554357098},{x:-.002015132553614539,y:.026029339514117924},{x:.003581194846605365,y:.019210194846605383},{x:.010400339514117916,y:.013613867446385479},{x:.018180245543570964,y:.009455421036992116},{x:.026621935509274233,y:.006894662381854655},{x:.035401,y:.0060300000000000215},{x:.04418006449072578,y:.006894662381854655},{x:.05262175445642904,y:.009455421036992116},{x:.06040166048588211,y:.013613867446385486},{x:.06722080515339464,y:.019210194846605383},{x:.07281713255361454,y:.026029339514117924},{x:.07697557896300791,y:.03380924554357098},{x:.07953633761814537,y:.04225093550927425},{x:.080401,y:.05103000000000002},{x:.080401,y:.29048154892126793},{x:.18934433769134518,y:.3772029724897202},{x:.5349508182082354,y:.03415901207017739},{x:.5417907398770268,y:.02858809778868676},{x:.5495860658299886,y:.024458629583942203},{x:.5580372260624178,y:.02192930060321959},{x:.5668194472260474,y:.021097311540784057},{x:.5755952334866855,y:.021994635269720175},{x:.5840273362998535,y:.024586788142349852},{x:.5917917146832189,y:.028774155177474024},{x:.5985899879298227,y:.03439581820823536},{x:.6041609022113132,y:.04123573987702663},{x:.6082903704160578,y:.04903106582998847},{x:.6108196993967804,y:.05748222606241771},{x:.6116516884592159,y:.06626444722604735},{x:.6107543647302798,y:.07504023348668547},{x:.6081622118576502,y:.08347233629985339},{x:.603974844822526,y:.0912367146832188},{x:.5983531817917647,y:.09803498792982254},{x:.26024203797571366,y:.43363918627462555},{x:.5302838206406747,y:.648598708462355},{x:.5366139141989896,y:.654742773070568},{x:.5416237292416561,y:.6620037211908337},{x:.545120741386121,y:.6701025186588768},{x:.5469705624168195,y:.6787279332298585},{x:.5471021047489336,y:.6875484950590041},{x:.5455103132844098,y:.6962252349018474},{x:.542256359676543,y:.7044247105121999},{x:.537465291537645,y:.7118318206406747},{x:.531321226929432,y:.7181619141989897},{x:.5240602788091663,y:.7231717292416562},{x:.5159614813411232,y:.726668741386121},{x:.5073360667701415,y:.7285185624168196},{x:.498515504940996,y:.7286501047489337},{x:.48983876509815266,y:.7270583132844098},{x:.48163928948780005,y:.723804359676543},{x:.47423217935932527,y:.719013291537645},{x:.080401,y:.4055145384845117},{x:.080401,y:.729004},{x:.07953633761814537,y:.7377830644907257},{x:.07697557896300788,y:.746224754456429},{x:.07281713255361454,y:.7540046604858821},{x:.06722080515339464,y:.7608238051533946},{x:.06040166048588208,y:.7664201325536145},{x:.052621754456429054,y:.7705785789630079},{x:.04418006449072578,y:.7731393376181454},{x:.035401,y:.774004},{x:.026621935509274212,y:.7731393376181454},{x:.018180245543570936,y:.7705785789630079},{x:.010400339514117906,y:.7664201325536145},{x:.003581194846605358,y:.7608238051533946},{x:-.002015132553614539,y:.7540046604858821},{x:-.006173578963007902,y:.746224754456429},{x:-.008734337618145363,y:.7377830644907257},{x:-.009598999999999996,y:.729004},{x:-.009598999999999996,y:.05103000000000002}]],L:[[{x:.030439999999999995,y:.05103000000000002},{x:.03130466238185463,y:.04225093550927423},{x:.03386542103699209,y:.03380924554357098},{x:.03802386744638545,y:.026029339514117924},{x:.043620194846605356,y:.019210194846605383},{x:.05043933951411791,y:.013613867446385479},{x:.058219245543570955,y:.009455421036992116},{x:.06666093550927422,y:.006894662381854655},{x:.07544,y:.0060300000000000215},{x:.526613,y:.0060300000000000215},{x:.5353920644907257,y:.006894662381854655},{x:.543833754456429,y:.009455421036992116},{x:.5516136604858821,y:.013613867446385479},{x:.5584328051533947,y:.019210194846605383},{x:.5640291325536145,y:.026029339514117924},{x:.5681875789630079,y:.03380924554357098},{x:.5707483376181454,y:.04225093550927425},{x:.571613,y:.05103000000000002},{x:.5707483376181454,y:.05980906449072579},{x:.5681875789630079,y:.06825075445642906},{x:.5640291325536145,y:.07603066048588211},{x:.5584328051533947,y:.08284980515339466},{x:.5516136604858821,y:.08844613255361455},{x:.543833754456429,y:.09260457896300792},{x:.5353920644907257,y:.09516533761814538},{x:.526613,y:.09603000000000002},{x:.12043999999999999,y:.09603000000000002},{x:.12043999999999999,y:.729004},{x:.11957533761814536,y:.7377830644907257},{x:.11701457896300788,y:.746224754456429},{x:.11285613255361453,y:.7540046604858821},{x:.10725980515339463,y:.7608238051533946},{x:.10044066048588207,y:.7664201325536145},{x:.09266075445642903,y:.7705785789630079},{x:.08421906449072576,y:.7731393376181454},{x:.07544,y:.774004},{x:.06666093550927422,y:.7731393376181454},{x:.05821924554357093,y:.7705785789630079},{x:.05043933951411791,y:.7664201325536145},{x:.043620194846605356,y:.7608238051533946},{x:.03802386744638545,y:.7540046604858821},{x:.03386542103699209,y:.746224754456429},{x:.03130466238185463,y:.7377830644907257},{x:.030439999999999995,y:.729004},{x:.030439999999999995,y:.05103000000000002}]],M:[[{x:-.0025190000000000004,y:.05103000000000002},{x:-.001654337618145367,y:.04225093550927423},{x:.0009064210369920944,y:.03380924554357098},{x:.005064867446385457,y:.026029339514117924},{x:.010661194846605361,y:.019210194846605383},{x:.017480339514117912,y:.013613867446385479},{x:.02526024554357096,y:.009455421036992116},{x:.03370193550927423,y:.006894662381854655},{x:.042481,y:.0060300000000000215},{x:.051260064490725774,y:.006894662381854655},{x:.05970175445642904,y:.009455421036992116},{x:.06748166048588208,y:.013613867446385486},{x:.07430080515339463,y:.019210194846605383},{x:.07989713255361454,y:.026029339514117924},{x:.0840555789630079,y:.03380924554357098},{x:.08661633761814536,y:.04225093550927425},{x:.087481,y:.05103000000000002},{x:.087481,y:.5631122522964573},{x:.26219554141599577,y:.26476777519375044},{x:.26376288989624813,y:.2626088267569117},{x:.2651577075441738,y:.2603345964826191},{x:.26634817172230724,y:.2590477232579252},{x:.26737807478439135,y:.2576290804774607},{x:.2693364970488442,y:.25581739014918375},{x:.271148193983327,y:.2538589739959976},{x:.27256684023788735,y:.25282907571933333},{x:.27385371747828813,y:.25163861588213104},{x:.27612795245761435,y:.25024380590572387},{x:.27828690618147356,y:.24867646470811877},{x:.2798792167324836,y:.24794311979268302},{x:.28137361418054185,y:.2470265916026687},{x:.2838762642998919,y:.24610226374330602},{x:.28629950743227456,y:.24498622954453103},{x:.28800429067823724,y:.24457762002415934},{x:.28964877947809164,y:.24397024514568044},{x:.29228366929688115,y:.24355192080462856},{x:.2948780779631802,y:.2429300821730634},{x:.29662982004000654,y:.24286191068247276},{x:.29836120340931876,y:.24258703019148947},{x:.3010270755894747,y:.24269078533857608},{x:.3036929481196057,y:.24258703918410057},{x:.30542433056167173,y:.24286192551544342},{x:.30717607240852984,y:.24293010291506947},{x:.3097704789772072,y:.24355195029817853},{x:.3124053673848756,y:.24397028352732772},{x:.31404985413590314,y:.24457766395304856},{x:.3157546360035206,y:.24498627922405064},{x:.3181778753712451,y:.24610232159698525},{x:.32068052237260675,y:.24702665789836697},{x:.32217491672899246,y:.24794319112932822},{x:.32376722480624953,y:.2486765414159958},{x:.3259261732430879,y:.2502438898962479},{x:.3282004035173809,y:.2516387075441738},{x:.329487276742075,y:.2528291717223074},{x:.3309059195225393,y:.2538590747843914},{x:.3327176098508159,y:.2558174970488439},{x:.33467602600400237,y:.257629193983327},{x:.3357059242806667,y:.2590478402378874},{x:.33689638411786893,y:.2603347174782881},{x:.3382911940942761,y:.2626089524576143},{x:.3398585352918812,y:.26476790618147356},{x:.514571,y:.5631111449291359},{x:.514571,y:.05103000000000002},{x:.5154356623818547,y:.04225093550927423},{x:.5179964210369922,y:.03380924554357098},{x:.5221548674463855,y:.026029339514117924},{x:.5277511948466054,y:.019210194846605383},{x:.5345703395141179,y:.013613867446385479},{x:.542350245543571,y:.009455421036992116},{x:.5507919355092743,y:.006894662381854655},{x:.559571,y:.0060300000000000215},{x:.5683500644907258,y:.006894662381854655},{x:.576791754456429,y:.009455421036992116},{x:.5845716604858822,y:.013613867446385486},{x:.5913908051533947,y:.019210194846605383},{x:.5969871325536146,y:.026029339514117924},{x:.6011455789630079,y:.03380924554357098},{x:.6037063376181454,y:.04225093550927425},{x:.6045710000000001,y:.05103000000000002},{x:.6045710000000001,y:.729004},{x:.6044399806971988,y:.7303342613054065},{x:.6044919608158994,y:.7316699481196056},{x:.6040085293496043,y:.7347148603514975},{x:.6037063376181454,y:.7377830644907257},{x:.6033183147080721,y:.7390622046001841},{x:.6031087164726723,y:.7403823673848756},{x:.6020405410986152,y:.7432744596816038},{x:.6011455789630079,y:.746224754456429},{x:.6005154639484909,y:.7474036167328832},{x:.600052342101633,y:.7486575223726067},{x:.5984404722003996,y:.7512856532491108},{x:.5969871325536146,y:.7540046604858821},{x:.596139140401289,y:.7550379419131618},{x:.5954402924558263,y:.7561774035173808},{x:.5933466712837743,y:.758440575377949},{x:.5913908051533947,y:.7608238051533946},{x:.5903575237261146,y:.7616717973057207},{x:.589449806016673,y:.7626530260040023},{x:.5869548902613284,y:.7644642664232344},{x:.5845716604858822,y:.7664201325536145},{x:.5833927982094276,y:.7670502475681318},{x:.5823110938185264,y:.7678355352918812},{x:.579510761693201,y:.7691252393162225},{x:.576791754456429,y:.7705785789630079},{x:.5755126143469705,y:.7709666018730812},{x:.5742984925677255,y:.7715257704554689},{x:.5713003592655512,y:.772244375482538},{x:.5683500644907258,y:.7731393376181454},{x:.5670198031853202,y:.7732703569209465},{x:.5657199220368199,y:.7735819178269366},{x:.5626392041392276,y:.7737018082685412},{x:.559571,y:.774004},{x:.5582407386945936,y:.7738729806971988},{x:.5569050518803944,y:.7739249608158993},{x:.5538601396485026,y:.7734415293496042},{x:.5507919355092743,y:.7731393376181454},{x:.5495127953998159,y:.772751314708072},{x:.5481926326151244,y:.7725417164726722},{x:.5453005403183963,y:.7714735410986151},{x:.542350245543571,y:.7705785789630079},{x:.5411713832671168,y:.7699484639484908},{x:.5399174776273933,y:.769485342101633},{x:.5372893467508892,y:.7678734722003996},{x:.5345703395141179,y:.7664201325536145},{x:.5335370580868383,y:.765572140401289},{x:.5323975964826192,y:.7648732924558262},{x:.5301344246220511,y:.7627796712837742},{x:.5277511948466054,y:.7608238051533946},{x:.5269032026942794,y:.7597905237261146},{x:.5259219739959977,y:.7588828060166729},{x:.5241107335767656,y:.7563878902613284},{x:.5221548674463855,y:.7540046604858821},{x:.5215247524318682,y:.7528257982094275},{x:.5207394647081188,y:.7517440938185264},{x:.30102684980758887,y:.3765575080608823},{x:.08131245858400418,y:.7517442248062496},{x:.0805272117946797,y:.752825865136849},{x:.07989713255361454,y:.7540046604858821},{x:.07794121846393844,y:.7563879486998997},{x:.0761299252156086,y:.7588829195225393},{x:.07514874916275306,y:.7597905823884902},{x:.07430080515339463,y:.7608238051533946},{x:.0719175169393771,y:.7627797192430708},{x:.06965428252171184,y:.764873384117869},{x:.06851488325078628,y:.7655721885442563},{x:.06748166048588208,y:.7664201325536145},{x:.06476258657702469,y:.7678735078373721},{x:.06213438581945812,y:.7694854083973313},{x:.06088054980546198,y:.7699484997219428},{x:.05970175445642904,y:.7705785789630079},{x:.056751387338174995,y:.7714735630437544},{x:.05385922052190834,y:.7725417548543195},{x:.05253913197970031,y:.7727513367372549},{x:.051260064490725774,y:.7731393376181454},{x:.04819178511684276,y:.773441536759571},{x:.0451467965906812,y:.7739249698085104},{x:.04381118578262464,y:.7738729881355436},{x:.042481,y:.774004},{x:.039412720626117295,y:.7737018008585744},{x:.03633192759147018,y:.7735818970849305},{x:.035032121291898165,y:.7732703494826018},{x:.03370193550927423,y:.7731393376181454},{x:.030751568391020223,y:.7722443535373988},{x:.02775336399647938,y:.7715257207759494},{x:.026539313032545114,y:.7709665798438982},{x:.02526024554357096,y:.7705785789630079},{x:.02254117163471342,y:.7691252036792503},{x:.01974077519375046,y:.7678354585840041},{x:.01865913486315115,y:.7670502117946798},{x:.017480339514117912,y:.7664201325536145},{x:.015097051300099952,y:.7644642184639381},{x:.012602080477460715,y:.7626529252156086},{x:.011694417611510011,y:.7616717491627533},{x:.010661194846605361,y:.7608238051533946},{x:.008705280756928618,y:.7584405169393763},{x:.006611615882131057,y:.7561772825217118},{x:.005912811455744052,y:.7550378832507868},{x:.005064867446385457,y:.7540046604858821},{x:.0036114921626275165,y:.7512855865770239},{x:.0019995916026687363,y:.7486573858194581},{x:.0015365002780573323,y:.7474035498054622},{x:.0009064210369920944,y:.746224754456429},{x:11436956245516774e-21,y:.7432743873381747},{x:-.0010567548543195318,y:.7403822205219084},{x:-.0012663367372549837,y:.7390621319797002},{x:-.001654337618145367,y:.7377830644907257},{x:-.0019565367595708303,y:.7347147851168438},{x:-.0024399698085105087,y:.7316697965906812},{x:-.0023879881355436095,y:.730334185782624},{x:-.0025190000000000004,y:.729004},{x:-.0025190000000000004,y:.05103000000000002}]],N:[[{x:.022871000000000002,y:.05103000000000002},{x:.023735662381854636,y:.04225093550927423},{x:.026296421036992097,y:.03380924554357098},{x:.03045486744638546,y:.026029339514117924},{x:.036051194846605364,y:.019210194846605383},{x:.042870339514117915,y:.013613867446385479},{x:.05065024554357096,y:.009455421036992116},{x:.05909193550927423,y:.006894662381854655},{x:.067871,y:.0060300000000000215},{x:.07665006449072577,y:.006894662381854655},{x:.08509175445642904,y:.009455421036992116},{x:.0928716604858821,y:.013613867446385486},{x:.09969080515339464,y:.019210194846605383},{x:.10528713255361455,y:.026029339514117924},{x:.10944557896300791,y:.03380924554357098},{x:.11200633761814537,y:.04225093550927425},{x:.112871,y:.05103000000000002},{x:.112871,y:.5841703094604355},{x:.49710429367778214,y:.025528669675955993},{x:.4971050718109503,y:.02552774709009411},{x:.49710565506134197,y:.025526690456344234},{x:.49994880496714983,y:.022156103119426583},{x:.5027917749380927,y:.01878536401177818},{x:.5027927181072235,y:.018784610959395015},{x:.5027934962896407,y:.018783688415073364},{x:.5062395848358414,y:.016032536999645196},{x:.5096855265142521,y:.01328120162562755},{x:.5096865984738844,y:.013280647046104224},{x:.5096875416832135,y:.013279894044071351},{x:.5136041376200112,y:.011253903755746949},{x:.5175206253992491,y:.009227704391234041},{x:.5175217849545753,y:.009227369596750634},{x:.5175228569438108,y:.00922681507445236},{x:.5217594476858983,y:.008003843583871996},{x:.5259959731369073,y:.006780645934087934},{x:.5259971757268666,y:.006780543790608634},{x:.5259983353000632,y:.006780209058025982},{x:.5303921110410749,y:.006407254473822295},{x:.5347858668666982,y:.00603406533837119},{x:.5347870662764328,y:.00603419977121261},{x:.5347882688718429,y:.006034097691931008},{x:.5391703792739257,y:.006525492449663053},{x:.5435525159020149,y:.007016653277689966},{x:.5435536660388816,y:.007017019120673398},{x:.543554865441438,y:.007017153617542397},{x:.547756908459233,y:.008354013692199154},{x:.5519590228368241,y:.009690649448577907},{x:.5519600795017079,y:.0096912326425627},{x:.551961229619043,y:.009691598546943021},{x:.555821723096155,y:.01182254915564361},{x:.559682330324044,y:.013953293677782128},{x:.5596832529099061,y:.01395407181095043},{x:.5596843095436558,y:.013954655061341997},{x:.5630548968806759,y:.016797804967236304},{x:.5664256359882218,y:.01964077493809272},{x:.5664263890406048,y:.019641718107223288},{x:.5664273115849267,y:.019642496289640633},{x:.5691784630004857,y:.02308858483600535},{x:.5719297983743725,y:.026534526514252196},{x:.5719303529538958,y:.0265355984738845},{x:.5719311059559287,y:.0265365416832135},{x:.5739570962443242,y:.03045313762014873},{x:.575983295608766,y:.03436962539924916},{x:.5759836304032494,y:.03437078495457533},{x:.5759841849255477,y:.0343718569438108},{x:.5772071564160691,y:.03860844768569421},{x:.5784303540659121,y:.04284497313690728},{x:.5784304562093915,y:.04284617572686688},{x:.578430790941974,y:.042847335300063204},{x:.5788037455260991,y:.04724111104014873},{x:.5791769346616289,y:.05163486686669809},{x:.5791768002287875,y:.05163606627643281},{x:.5791769023080691,y:.05163726887184294},{x:.5700269023080691,y:.7296112688718429},{x:.5690438463824576,y:.738377865441438},{x:.566369401453057,y:.746784229619043},{x:.5621063449386581,y:.7545073095436557},{x:.5564185037103594,y:.7612503115849266},{x:.5495244583167865,y:.7667541059559286},{x:.5416891430561892,y:.7708071849255477},{x:.5332136646999368,y:.773253790941974},{x:.5244237311281571,y:.773999902308069},{x:.515657134558562,y:.7730168463824576},{x:.507250770380957,y:.770342401453057},{x:.49952769045634426,y:.766079344938658},{x:.4927846884150734,y:.7603915037103594},{x:.4872808940440714,y:.7534974583167865},{x:.4832278150744524,y:.7456621430561892},{x:.480781209058026,y:.7371866646999369},{x:.48003509769193103,y:.7283967311281571},{x:.48718300813543913,y:.19876859615253395},{x:.10494770632221789,y:.754505330324044},{x:.1022980223560627,y:.75764690179997},{x:.09969080515339464,y:.7608238051533946},{x:.09945603456444842,y:.7610164763964532},{x:.09926022506190729,y:.7612486359882218},{x:.09604856383930557,y:.7638129153509474},{x:.0928716604858821,y:.7664201325536145},{x:.09260381265312083,y:.7665633002029657},{x:.09236647348574781,y:.7667527983743725},{x:.08871625734636118,y:.7686412418060533},{x:.08509175445642904,y:.7705785789630079},{x:.08480112262185491,y:.7706667411661766},{x:.08453137460075086,y:.770806295608766},{x:.08058287930375276,y:.7719463312873718},{x:.07665006449072577,y:.7731393376181454},{x:.07634781747275289,y:.773169106351106},{x:.07605602686309273,y:.7732533540659121},{x:.07196099086840901,y:.7736011710596524},{x:.067871,y:.774004},{x:.06756875298202693,y:.7739742312670393},{x:.06726613313330192,y:.7739999346616289},{x:.06318192637768459,y:.7735421665584931},{x:.05909193550927423,y:.7731393376181454},{x:.05880130367469977,y:.7730511754149765},{x:.05849948409798508,y:.77301734672231},{x:.054583060356599135,y:.7717715852937818},{x:.05065024554357096,y:.7705785789630079},{x:.0503823977108098,y:.7704354113136568},{x:.050092977163175983,y:.7703433505514221},{x:.04649484240404986,y:.768357469710569},{x:.042870339514117915,y:.7664201325536145},{x:.04263556892517204,y:.7662274613105563},{x:.04236966967595597,y:.7660807063222179},{x:.03922809820002561,y:.7634310223560591},{x:.036051194846605364,y:.7608238051533946},{x:.03585852360354703,y:.7605890345644487},{x:.035626364011778155,y:.7603932250619073},{x:.033062084649052234,y:.7571815638393052},{x:.03045486744638546,y:.7540046604858821},{x:.030311699797034096,y:.7537368126531205},{x:.03012220162562753,y:.7534994734857478},{x:.028233758193948882,y:.7498492573463653},{x:.026296421036992097,y:.746224754456429},{x:.026208258833823234,y:.7459341226218545},{x:.026068704391234022,y:.7456643746007509},{x:.02492866871262922,y:.741715879303756},{x:.023735662381854636,y:.7377830644907257},{x:.023705893648893955,y:.7374808174727527},{x:.023621645934087915,y:.7371890268630927},{x:.023273828940347806,y:.7330939908684111},{x:.022871000000000002,y:.729004},{x:.022871000000000002,y:.05103000000000002}]],O:[[{x:.012131736117046842,y:.4355587711738732},{x:.012426138979982786,y:.43287355609157196},{x:.012514983726773468,y:.43017371170811375},{x:.012905745911416293,y:.42849911573111366},{x:.01309315536666239,y:.42678977537085305},{x:.07316415536666239,y:.1412837753708531},{x:.07429915106219231,y:.13768552483470178},{x:.07533122192175289,y:.13405641311271962},{x:.07562440736087628,y:.1334840955199844},{x:.07581784742995093,y:.1328708369543332},{x:.07763301835724021,y:.12956315246900071},{x:.0793532628391043,y:.12620512014747703},{x:.07975246842568721,y:.12570099711853563},{x:.0800618324091279,y:.12513726042963025},{x:.08248742256740031,y:.1222472544549173},{x:.0848297326408542,y:.1192893488327618},{x:.1660597326408542,y:.03517334883276172},{x:.16792084009780786,y:.033590824390739155},{x:.16963596886504836,y:.031851158363102774},{x:.17127304088861567,y:.03074040344046043},{x:.172780173663761,y:.0294588683817891},{x:.1749142556657825,y:.0282698357562587},{x:.17693582072022015,y:.026898201947035502},{x:.17875813439943417,y:.026128166777013812},{x:.18048632312818114,y:.025165283073572443},{x:.1828113681007397,y:.02441543612151622},{x:.18506168183103927,y:.023464545648773483},{x:.2739246818310393,y:-.0041824543512264944},{x:.2748960678404206,y:-.004382857312604547},{x:.27582577451608603,y:-.004728396924478621},{x:.2792086173377598,y:-.005272563034129881},{x:.28256427991205235,y:-.0059648570457577},{x:.28355609768991147,y:-.005971901311054349},{x:.2845353517466465,y:-.006129424701440567},{x:.287959355733624,y:-.0060031749164705245},{x:.2913856000541485,y:-.006027509400590186},{x:.29235973459950004,y:-.005840924262640544},{x:.29335090385307644,y:-.005804377895986514},{x:.3811419038530764,y:.006122622104013507},{x:.38318930529213563,y:.00660893405691686},{x:.3852758334501729,y:.006882342567970358},{x:.387470347489584,y:.0076257947232155985},{x:.38972465411174423,y:.008161252125438313},{x:.3916378405507577,y:.009037647936572414},{x:.39363093730084414,y:.009712864429997858},{x:.3956382440479665,y:.010870159811164118},{x:.3977447722434711,y:.011835121954387393},{x:.39945022100051475,y:.01306792222421872},{x:.4012732927522862,y:.01411899850883961},{x:.4916652927522862,y:.07880999850883955},{x:.49276799959381884,y:.07977586317754862},{x:.49398769122063274,y:.08058901093294302},{x:.4960788615418114,y:.08267585840574071},{x:.4983012083703825,y:.08462241954283417},{x:.4991942961599152,y:.08578485282556958},{x:.5002319144966787,y:.08682032620708877},{x:.5018757798210403,y:.08927504258220473},{x:.5036756696393939,y:.09161775945128844},{x:.5043248175140242,y:.09293208968889465},{x:.5051404874699588,y:.09415009603518716},{x:.5560304874699588,y:.18912209603518723},{x:.5570965448702581,y:.19168827319789875},{x:.5583465570022521,y:.1941700494329812},{x:.5587848767756364,y:.19575236841213633},{x:.559414776433869,y:.19726864147332673},{x:.5599597135111237,y:.1999934877429328},{x:.5607015364856348,y:.20267144261291137},{x:.5892585364856349,y:.36700144261291134},{x:.5895780755292599,y:.371318367211785},{x:.589913428370686,y:.37563409214099147},{x:.5899036127276142,y:.3757163259822715},{x:.58990972616553,y:.3757989176124618},{x:.5893809351459178,y:.38009523269056544},{x:.5888678881103582,y:.38439345626922305},{x:.5314878881103581,y:.6446844562692231},{x:.5303800126922803,y:.6480826863142071},{x:.5293998170293023,y:.651519919480997},{x:.5290148883003433,y:.6522699863013032},{x:.5287535704445262,y:.6530715368858165},{x:.5270040207481954,y:.6561883351212919},{x:.5253720883446767,y:.6593682961290664},{x:.5248482251358019,y:.6600288547560561},{x:.5244355536676654,y:.6607640231862051},{x:.522111563906752,y:.6634796128039058},{x:.5198906090097624,y:.6662800975344761},{x:.4528876090097624,y:.7355630975344761},{x:.4513498405668143,y:.7368687638478525},{x:.44995999895015265,y:.7383308981052339},{x:.44799560298794544,y:.7397167316507253},{x:.4461630292013509,y:.741272707045399},{x:.44440008568631667,y:.7422532816059559},{x:.4427517012434998,y:.743416176715023},{x:.4405546878862334,y:.7443921472166956},{x:.43845377075029196,y:.7455607075703166},{x:.43653340109378364,y:.7461785074476045},{x:.43468982031452474,y:.7469974740014746},{x:.32025082031452473,y:.7849044740014746},{x:.3162756641960007,y:.785800462676764},{x:.3123143949565378,y:.7867559771378485},{x:.3119757732525013,y:.7867696456410259},{x:.3116451697261732,y:.786844162718285},{x:.30757159639863574,y:.7869474207351895},{x:.30350003021295163,y:.7871117699623142},{x:.30316524843732107,y:.7870591140117537},{x:.302826459804451,y:.7870677017158569},{x:.29881101440639224,y:.7863742609266953},{x:.29478561927964103,y:.7857411290712295},{x:.173234619279641,y:.7541621290712296},{x:.17180894449846637,y:.7536379076298808},{x:.17032768986057922,y:.753301394035824},{x:.16767817066393412,y:.7521190197025511},{x:.16495505208167519,y:.7511177274253745},{x:.16365904177145735,y:.7503254433998781},{x:.16227189957151614,y:.7497064173758784},{x:.15990395993272244,y:.7480298664806163},{x:.1574285077432372,y:.7465165596726792},{x:.15631196685338702,y:.745486660093817},{x:.15507224418821702,y:.7446089104628228},{x:.08487024418821705,y:.6837459104628228},{x:.08477922863788438,y:.6836498346778195},{x:.08467166808724909,y:.6835727301071804},{x:.08174665618590948,y:.6804486588585436},{x:.07880340242944883,y:.6773417676286113},{x:.07873287917322891,y:.6772297816598538},{x:.07864242772392874,y:.6771331746094597},{x:.07638309517198695,y:.6734984900001298},{x:.07410251962167697,y:.6698770964908778},{x:.07405519882875666,y:.6697535038963435},{x:.0739853324792622,y:.6696411069209627},{x:.07247850415964274,y:.6656354878421232},{x:.07094824805491862,y:.6616387601752097},{x:.07092594823683183,y:.6615083105489945},{x:.0708793519117729,y:.6613844430013583},{x:.013660351911772894,y:.4476944430013583},{x:.013380528959940628,y:.4459977798389246},{x:.012899536483696877,y:.44434683677239306},{x:.012664423003084308,y:.4416557821956227},{x:.012224847112815455,y:.43899048181468664},{x:.012281403443251489,y:.4372718288093888},{x:.012131736117046842,y:.4355587711738732}],[{x:.10337829031332789,y:.4348001396911351},{x:.15424861715004387,y:.6247803934833692},{x:.2060651876410252,y:.6697037849792326},{x:.3045603004668897,y:.6952928559694175},{x:.3958853477721772,y:.6650421672339206},{x:.4463402797077116,y:.6128703383711886},{x:.499069598507425,y:.373676069990286},{x:.47327322171072966,y:.22523195474705573},{x:.4307624349909165,y:.1458974207255564},{x:.35796896612556683,y:.09380119213930618},{x:.2911281310221294,y:.08472041346861442},{x:.22279798440939425,y:.10597924519162948},{x:.15856873728877424,y:.17249047688925445},{x:.10337829031332789,y:.4348001396911351}]],P:[[{x:.025556999999999996,y:.05103000000000002},{x:.02642166238185463,y:.04225093550927423},{x:.02898242103699209,y:.03380924554357098},{x:.033140867446385454,y:.026029339514117924},{x:.03873719484660536,y:.019210194846605383},{x:.04555633951411791,y:.013613867446385479},{x:.053336245543570956,y:.009455421036992116},{x:.061777935509274226,y:.006894662381854655},{x:.070557,y:.0060300000000000215},{x:.07933606449072576,y:.006894662381854655},{x:.08777775445642903,y:.009455421036992116},{x:.09555766048588209,y:.013613867446385486},{x:.10237680515339463,y:.019210194846605383},{x:.10797313255361454,y:.026029339514117924},{x:.1121315789630079,y:.03380924554357098},{x:.11469233761814536,y:.04225093550927425},{x:.11555699999999999,y:.05103000000000002},{x:.11555699999999999,y:.3249696679740436},{x:.22632413005583354,y:.32573306868659574},{x:.22797244585475993,y:.3259068917113995},{x:.2296296407459454,y:.32587748916779646},{x:.3399906407459454,y:.3347734891677965},{x:.3425199358315593,y:.3352301100895628},{x:.3450781711944775,y:.33547763407671893},{x:.4262801711944775,y:.3514846340767189},{x:.43023360415359113,y:.35267647626036297},{x:.4342017122431381,y:.35381850872164355},{x:.49034871224313803,y:.3761405087216436},{x:.49223471805815816,y:.37711419756221787},{x:.49421014578428074,y:.3778905822551455},{x:.4961445509948513,y:.379132728294546},{x:.49818726580808836,y:.3801873213410173},{x:.49984707528076383,y:.38151024250532195},{x:.5016330805772936,y:.3826570960152846},{x:.5368430805772937,y:.4104950960152846},{x:.538268982488492,y:.41186995272090265},{x:.539835277869678,y:.41308244849417974},{x:.5414366048100854,y:.41492417879038607},{x:.5431934850553138,y:.4166181652891421},{x:.5443237674236908,y:.41824478417169497},{x:.5456234206874699,y:.41973955124896434},{x:.546834674823181,y:.4218582966024136},{x:.5482273167355989,y:.4238624839583804},{x:.5490185434436073,y:.4256783549664296},{x:.5500016096439067,y:.4273979502871872},{x:.5725636096439066,y:.4777629502871872},{x:.5732747072201834,y:.47988746499756846},{x:.5741879174558705,y:.48193325814034926},{x:.5746713208988057,y:.4840600657825243},{x:.5753635933927087,y:.4861283376286891},{x:.5756465551694752,y:.4883507586397718},{x:.5761431038835471,y:.49053540091990977},{x:.5762022992770958,y:.49271564988294925},{x:.5764777701286589,y:.49487923612929946},{x:.5763217220435205,y:.4971141570479765},{x:.5763825271473633,y:.4993536938878067},{x:.5706825271473633,y:.5794656938878067},{x:.5700654182420953,y:.5830779192715516},{x:.5695689975224034,y:.5867086990904052},{x:.5693236589408173,y:.5874197813867033},{x:.5691969863455608,y:.5881612549906394},{x:.5678870248015591,y:.5915836805014664},{x:.5666918126627678,y:.5950478490261242},{x:.5415328126627678,y:.6498468490261241},{x:.5413708296623262,y:.6501242105110185},{x:.5412617638147841,y:.650426323944409},{x:.5391478795722351,y:.653930540410781},{x:.5370840246571379,y:.6574644536133865},{x:.536871043573226,y:.6577048843594048},{x:.5367051339883567,y:.6579799150765678},{x:.5339482287199508,y:.661004400648547},{x:.5312345979336611,y:.6640677725799057},{x:.5309788035098929,y:.664262032968313},{x:.5307624259999995,y:.6644994116930277},{x:.47414742599999943,y:.7155204116930277},{x:.47266946719886654,y:.7166100541651699},{x:.4713261182021025,y:.7178618913781634},{x:.46912758296129603,y:.7192213498885075},{x:.46704701478499566,y:.7207552731949938},{x:.4653848758470294,y:.7215356430341334},{x:.4638231175995642,y:.7225013521577397},{x:.4283261175995643,y:.7398953521577398},{x:.4243082080780145,y:.7413960258251278},{x:.4202985181688539,y:.7429185254841078},{x:.34090751816885384,y:.7644395254841077},{x:.3408415384597873,y:.7644506164558663},{x:.3407789202555512,y:.7644741810938074},{x:.33649241770984384,y:.7651816893280429},{x:.33220802793590354,y:.7659018811363755},{x:.33214115226719376,y:.7658998869955335},{x:.33207514002138977,y:.7659107826399355},{x:.2099811400213898,y:.7739077826399355},{x:.20641155146718015,y:.773790767187745},{x:.20284008504333162,y:.7738075792583221},{x:.0663570850433316,y:.7610135792583221},{x:.06408313636872824,y:.7605723800858132},{x:.061777935509274226,y:.7603453376181454},{x:.05976354040438703,y:.759734277543603},{x:.05769704052657306,y:.7593333282846051},{x:.05555285882676713,y:.7584569812513055},{x:.053336245543570956,y:.7577845789630079},{x:.05147976838249502,y:.7567922712467745},{x:.04953119704042999,y:.7559958719887517},{x:.04759918201567506,y:.7547180546196904},{x:.04555633951411791,y:.7536261325536145},{x:.043929123673028744,y:.7522907110247322},{x:.04217336337061703,y:.7511294669445447},{x:.04052776127482757,y:.7494992850446065},{x:.03873719484660536,y:.7480298051533947},{x:.037401773317722896,y:.7464025893123053},{x:.03590629693874444,y:.7449211263687215},{x:.034610347337597366,y:.7430012269141045},{x:.033140867446385454,y:.7412106604858821},{x:.032148559730151835,y:.7393541833248057},{x:.030970837593177758,y:.7376094333079335},{x:.030074343103068113,y:.7354735969579864},{x:.02898242103699209,y:.733430754456429},{x:.028371360962449563,y:.7314163593515414},{x:.027556652268729623,y:.729475372026062},{x:.027094064670152376,y:.7272056777739226},{x:.02642166238185463,y:.7249890644907258},{x:.02621533264498147,y:.722894163516222},{x:.025794946192721373,y:.7208315299365354},{x:.02578404246766777,y:.7185152008594541},{x:.025556999999999996,y:.71621},{x:.025556999999999996,y:.05103000000000002}],[{x:.11555699999999999,y:.414971805397996},{x:.11555699999999999,y:.6752310456989574},{x:.20767337575712835,y:.6838660911730216},{x:.3217031184787672,y:.6763972896549704},{x:.3925929523867085,y:.6571807523203506},{x:.4185706758911827,y:.6444513238436673},{x:.46361487793542,y:.6038578374443203},{x:.4814895996448674,y:.5649247767123354},{x:.48580725170954087,y:.5042413131675768},{x:.4723746184159119,y:.474255736718963},{x:.45098032059796866,y:.45734081304228297},{x:.40480552914494095,y:.4389833995595593},{x:.3301954695220376,y:.42427584033215343},{x:.22404845814303564,y:.41571952231013837},{x:.11555699999999999,y:.414971805397996}]],Q:[[{x:.012134510452571898,y:.39776120903599943},{x:.012467756958298536,y:.3937322544040442},{x:.012734737801221134,y:.38969836671479857},{x:.012831073490929856,y:.38933975275179394},{x:.012861682585025715,y:.38896968840207613},{x:.0716656825850257,y:.06709568840207614},{x:.07243605319674906,y:.06440524795975149},{x:.07301096718930201,y:.06166637692330789},{x:.07364750148994079,y:.06017438890024393},{x:.07409402290033937,y:.05861495861744442},{x:.07537446994903126,y:.05612650608452361},{x:.07647266436288541,y:.053552421842995857},{x:.07738804025928744,y:.05221328363312273},{x:.0781302116420243,y:.05077092937167972},{x:.07987152826568633,y:.04858009458346291},{x:.08145080010539194,y:.04626971775068952},{x:.16096480010539196,y:-.04855928224931053},{x:.16315500529851779,y:-.05070373085173594},{x:.16521251383898505,y:-.052975804178533654},{x:.1663001767861927,y:-.05378319510572523},{x:.1672680674520078,y:-.05473086511953138},{x:.1698345496348827,y:-.056406820906963286},{x:.172295783242646,y:-.058233836978172464},{x:.17352006120728586,y:-.058813521600477286},{x:.17465423537351554,y:-.059554156299027654},{x:.17749836607515132,y:-.06069721323044178},{x:.18026874092294012,y:-.06200896084304842},{x:.2672567409229401,y:-.09317596084304836},{x:.2695830047845554,y:-.09375972267138269},{x:.2718475349769373,y:-.09454977610873284},{x:.2738508793967248,y:-.09483071995927067},{x:.27581299058749986,y:-.09532309988014809},{x:.2782084422243766,y:-.09544181332278269},{x:.28058359188359605,y:-.09577489818042065},{x:.2826032520283714,y:-.0956596106656824},{x:.28462372036011635,y:-.09575974074040533},{x:.28699630390923414,y:-.09540884370631499},{x:.2893907973658866,y:-.09527215971995788},{x:.3753267973658866,y:-.08182715971995795},{x:.37840631600914065,y:-.08102976437129623},{x:.38152495221950905,y:-.08040256216817918},{x:.38266795913198753,y:-.07992627554804835},{x:.3838666954562622,y:-.07961588068444121},{x:.38673147789694834,y:-.07823302278004476},{x:.38966782930723504,y:-.07700945634885908},{x:.3906959547522998,y:-.07631933185595965},{x:.3918111026603398,y:-.07578103928710583},{x:.3943510569158511,y:-.07386586128072498},{x:.3969922811880835,y:-.07209295159323717},{x:.45217017177581864,y:-.026613783173476364},{x:.5097585536672307,y:-.09873256043298734},{x:.5159122791302333,y:-.10505326271144577},{x:.5231808703268614,y:-.11005198218579294},{x:.5312849993737013,y:-.11353662086994384},{x:.5399132291363312,y:-.11537326605347448},{x:.5487339815837399,y:-.1154913364919842},{x:.5574082801461085,y:-.11388629480473579},{x:.5656027763942881,y:-.11061982184365243},{x:.5730025604329874,y:-.10581744633276943},{x:.5793232627114457,y:-.0996637208697668},{x:.5843219821857929,y:-.09239512967313873},{x:.5878066208699438,y:-.08429100062629874},{x:.5896432660534744,y:-.07566277086366895},{x:.5897613364919841,y:-.06684201841626024},{x:.5881562948047357,y:-.058167719853891554},{x:.5848898218436525,y:-.04997322360571205},{x:.5800874463327694,y:-.042573439567012816},{x:.5106129498444961,y:.04443049374200151},{x:.5474711182959175,y:.12365010382899572},{x:.5481373073434039,y:.1255496832776173},{x:.5490025186311253,y:.12736726941208848},{x:.5495935209593992,y:.1297019482663393},{x:.5503905347901464,y:.13197456307270286},{x:.5506733336355601,y:.13396760967066554},{x:.5511673266667299,y:.13591906574595297},{x:.5791213266667299,y:.32118306574595296},{x:.5792865967797204,y:.3243841932678159},{x:.5796238248970751,y:.32757179562983435},{x:.579513579388425,y:.3287806341158348},{x:.5795761658223595,y:.3299928748079828},{x:.5791137513174164,y:.3331647361616822},{x:.5788226293197903,y:.33635687958013644},{x:.5226546293197903,y:.6297998795801365},{x:.5219105438778229,y:.6323181740447382},{x:.521369234544533,y:.6348876981954499},{x:.5206636104444891,y:.6365383151545928},{x:.5201549436340621,y:.6382598551025291},{x:.5189338607071872,y:.6405845973766512},{x:.5179016631869613,y:.6429991446291672},{x:.5168875780620563,y:.6444803850133782},{x:.5160528293589531,y:.6460696100820955},{x:.5144016744792594,y:.6481114616238732},{x:.5129182555439367,y:.6502782422813739},{x:.4473292555439367,y:.7283852422813738},{x:.4454767413796947,y:.7301964293264013},{x:.4437773055972873,y:.732151966404103},{x:.44233025961343425,y:.7332727172827731},{x:.4410215211764534,y:.7345522595114605},{x:.4388512574885805,y:.735967237520439},{x:.4368029695300015,y:.737553656027496},{x:.4351650804791521,y:.7383705673253327},{x:.43363186277883553,y:.7393702013057781},{x:.431227251583759,y:.7403345934673514},{x:.4289088260065632,y:.7414909282302113},{x:.3168848260065632,y:.7842309282302113},{x:.31544522398579106,y:.7846236280557255},{x:.31406876767085296,y:.7851998529634103},{x:.3111991137964475,y:.7857818972901452},{x:.30837424253549156,y:.7865524758495462},{x:.30688569012846406,y:.7866567776362199},{x:.305423266132861,y:.7869533972381565},{x:.30249520063786056,y:.7869644160479279},{x:.2995742760667897,y:.7871690831124285},{x:.29809397750772,y:.7869809786010931},{x:.2966017859654652,y:.7869865939723252},{x:.2937278327647654,y:.7864261638184524},{x:.2908231043767717,y:.786057054147543},{x:.2894079467091229,y:.7855837720890787},{x:.28794333170435554,y:.785298167434039},{x:.16895933170435556,y:.7496931674340391},{x:.16685145995859063,y:.7488293371508981},{x:.16467103610787698,y:.748169732810473},{x:.1627799564873854,y:.7471607878174731},{x:.16079664289106937,y:.7463480029082842},{x:.1588977982379503,y:.7450895455041626},{x:.15688795304330724,y:.7440172356850165},{x:.15523004539103946,y:.7426587459550258},{x:.15344340707901263,y:.7414746531917952},{x:.15182656105367498,y:.739869930478983},{x:.1500645317387979,y:.7384261234461069},{x:.08134353173879794,y:.6698101234461069},{x:.07898814712174665,y:.6669445493412297},{x:.07654417665723892,y:.6641541443502993},{x:.0761910053095167,y:.6635415309608049},{x:.07574199244846258,y:.6629952594015535},{x:.07399091166125166,y:.6597252337561722},{x:.07213828241215867,y:.6565116506297859},{x:.07191141209628055,y:.6558419081228384},{x:.07157759918584938,y:.6552185349547689},{x:.07049811528111428,y:.6516697230205841},{x:.06930802275051184,y:.6481564579560907},{x:.013298022750511833,y:.4072474579560906},{x:.013249789700227431,y:.40687927578320093},{x:.013136451320225305,y:.40652566731159423},{x:.012677284531251238,y:.4025091147450468},{x:.012152162963867598,y:.3985006516980174},{x:.01217668547678935,y:.39813013424102855},{x:.012134510452571898,y:.39776120903599943}],[{x:.1030741934540208,y:.3959601630333355},{x:.15405220468618464,y:.6152256818322884},{x:.20562817178182732,y:.6667228451191239},{x:.2990925609035841,y:.6946913078929434},{x:.38591644511804135,y:.6615657918309754},{x:.4364618489221904,y:.6013735361946543},{x:.4889800495366121,y:.3269984766785998},{x:.4631403994395801,y:.1557472448128009},{x:.4478929247459949,y:.12297570323093639},{x:.3763894463327694,y:.21252056043298723},{x:.3702357208697667,y:.2188412627114457},{x:.36296712967313866,y:.22383998218579282},{x:.35486300062629866,y:.22732462086994373},{x:.34623477086366883,y:.22916126605347437},{x:.3374140184162602,y:.2292793364919841},{x:.3287397198538915,y:.22767429480473567},{x:.32054522360571197,y:.22440782184365232},{x:.31314543956701274,y:.21960544633276935},{x:.3068247372885543,y:.2134517208697667},{x:.30182601781420715,y:.20618312967313862},{x:.2983413791300562,y:.19807900062629863},{x:.2965047339465256,y:.18945077086366885},{x:.29638666350801585,y:.18063001841626014},{x:.2979917051952643,y:.17195571985389144},{x:.30125817815634764,y:.16376122360571194},{x:.3060605536672306,y:.1563614395670127},{x:.3960043024488616,y:.04372356068896105},{x:.3492507773512258,y:.005187991106938553},{x:.28681342879982186,y:-.004580559340762309},{x:.22209853619564562,y:.018606191220169738},{x:.15806156000107346,y:.09497717514193305},{x:.1030741934540208,y:.3959601630333355}]],R:[[{x:-.010088,y:.05588800000000005},{x:-.009223337618145366,y:.04710893550927426},{x:-.006662578963007905,y:.03866724554357101},{x:-.0025041325536145423,y:.030887339514117953},{x:.0030921948466053617,y:.024068194846605412},{x:.009911339514117913,y:.018471867446385508},{x:.01769124554357096,y:.014313421036992145},{x:.02613293550927423,y:.011752662381854684},{x:.034912,y:.01088800000000005},{x:.043691064490725774,y:.011752662381854684},{x:.05213275445642904,y:.014313421036992145},{x:.059912660485882105,y:.018471867446385515},{x:.06673180515339464,y:.024068194846605412},{x:.07232813255361453,y:.030887339514117953},{x:.0764865789630079,y:.03866724554357101},{x:.07904733761814536,y:.04710893550927428},{x:.079912,y:.05588800000000005},{x:.079912,y:.36648688236049143},{x:.25933152798675563,y:.3728389247505383},{x:.2598033776805002,y:.3702688775066002},{x:.2630584474090824,y:.36206984491555727},{x:.26785052379396923,y:.35466338703825},{x:.5319365237939692,y:.022999387038250052},{x:.5380814500271169,y:.016670129897313986},{x:.5453430800394999,y:.011661303295187019},{x:.5534423534621115,y:.008165393629206541},{x:.5620680197594453,y:.00631674674730745},{x:.5708885994130244,y:.006186405112428031},{x:.5795651224933998,y:.00777937768050025},{x:.5877641550844427,y:.011034447409082423},{x:.59517061296175,y:.015826523793969254},{x:.601499870102686,y:.021971450027116944},{x:.606508696704813,y:.02923308003949996},{x:.6100046063707935,y:.03733235346211146},{x:.6118532532526926,y:.04595801975944533},{x:.6119835948875719,y:.05477859941302443},{x:.6103906223194997,y:.06345512249339977},{x:.6071355525909176,y:.07165415508444274},{x:.6023434762060308,y:.07906061296174999},{x:.36492288462028066,y:.3772356888373974},{x:.45122307475864126,y:.3907421966461853},{x:.4517263325772421,y:.3908725352482557},{x:.4522445282141884,y:.3909141268943158},{x:.4559919550269364,y:.3919772876167318},{x:.459762859565968,y:.3929539131315124},{x:.46023101962685037,y:.3931799280437793},{x:.4607311441523136,y:.39332181547170203},{x:.5072261441523136,y:.41160281547170213},{x:.5099186672764574,y:.4129799887569096},{x:.5126912264123276,y:.4141879634543456},{x:.5138373975854011,y:.41498434320238026},{x:.5150799754049854,y:.4156198976243936},{x:.5174520892726079,y:.41749589411441484},{x:.5199357102894067,y:.4192215573713852},{x:.5536387102894067,y:.4479225573713852},{x:.5544422891842978,y:.4487559165260936},{x:.5553578681885658,y:.44946439490120116},{x:.5574982196806069,y:.4519250983842071},{x:.5597619879819907,y:.4542727608851649},{x:.5603875460278954,y:.4552468777427617},{x:.5611473151639865,y:.4561203635073251},{x:.5627664809673836,y:.45895134712470415},{x:.5645287453623273,y:.46169553923588524},{x:.5649522427143585,y:.46277297903182424},{x:.5655270044804562,y:.4637779046177677},{x:.5843050044804562,y:.5056739046177676},{x:.5856980535944053,y:.5098331481877504},{x:.5870956418010017,y:.5139908687307394},{x:.5870987900445207,y:.5140153439302019},{x:.587106627133701,y:.514038743222053},{x:.5876614810321307,y:.5183898384933372},{x:.5882210839336397,y:.522740325535193},{x:.5899430839336397,y:.580600325535193},{x:.589777587866933,y:.5830153029012521},{x:.5898269599494498,y:.5854354407122341},{x:.5894767504310368,y:.5874052295805413},{x:.5893399666658296,y:.589401226848592},{x:.5887065118476329,y:.5917375144207835},{x:.5882827897945603,y:.5941207819778186},{x:.5699357897945603,y:.6593647819778187},{x:.5695566600666073,y:.6603356321127045},{x:.5693270257483343,y:.6613522723710545},{x:.5679549854437747,y:.6644370937206254},{x:.5667268644118839,y:.6675819841936177},{x:.5661656160899001,y:.668460215174679},{x:.5657420574552864,y:.6694125215424361},{x:.5637945617300048,y:.6721703971299327},{x:.5619765010042908,y:.6750152648867381},{x:.5612547025465381,y:.6757671267898905},{x:.5606534967163777,y:.6766185026674012},{x:.5398464967163776,y:.7006785026674012},{x:.5387925287989109,y:.70167944573824},{x:.5378793324857355,y:.7028102896247742},{x:.535601038014175,y:.7047103734673366},{x:.5334498940671065,y:.7067532939324781},{x:.5322209035416287,y:.707529385222465},{x:.5311046373415733,y:.7084603444980107},{x:.5029396373415734,y:.7276033444980106},{x:.49917038563569516,y:.7296565217962586},{x:.49541206095977475,y:.7317296332429761},{x:.4611910609597748,y:.7464366332429762},{x:.457170688924302,y:.7477143925092122},{x:.45316143447737084,y:.7490266191763204},{x:.37177643447737085,y:.7670666191763205},{x:.36787988134157384,y:.7675363076101905},{x:.36399443936523473,y:.7680904503837813},{x:.2290834393652347,y:.7739614503837813},{x:.2260604581328276,y:.7737959747883908},{x:.2230330269857825,y:.7738173839936113},{x:.030818026985782503,y:.7562573839936113},{x:.028490934977474184,y:.7558115802948838},{x:.02613293550927423,y:.7555793376181453},{x:.024169339379190496,y:.7549836872441402},{x:.022154034015341384,y:.7545976128723226},{x:.01995862841458906,y:.7537063820373993},{x:.01769124554357096,y:.7530185789630078},{x:.01588158498580211,y:.7520512952425895},{x:.013980322522940947,y:.7512794726091756},{x:.012000971535783972,y:.7499770641392344},{x:.009911339514117913,y:.7488601325536145},{x:.008325158769029223,y:.7475583876576994},{x:.006611003657363959,y:.7464304774736483},{x:.004923772632206568,y:.7447669421957904},{x:.0030921948466053617,y:.7432638051533946},{x:.0017904499506900475,y:.7416776244083056},{x:.0003292762098528329,y:.7402369716294513},{x:-.001000995511218774,y:.7382762382714833},{x:-.0025041325536145423,y:.7364446604858821},{x:-.0034714162740331275,y:.7346349999281129},{x:-.004623456556617868,y:.732936968032819},{x:-.005545647377387794,y:.7307543864780955},{x:-.006662578963007905,y:.728664754456429},{x:-.007258229337013042,y:.7267011583263452},{x:-.008056863899357211,y:.7248110017280808},{x:-.008535534543753812,y:.7224904473617442},{x:-.009223337618145366,y:.7202230644907257},{x:-.009424464135908606,y:.7181809926864091},{x:-.009839001899660749,y:.7161713490432334},{x:-.009855757323261527,y:.7138019994682},{x:-.010088,y:.711444},{x:-.010088,y:.05588800000000005}],[{x:.079912,y:.45654326739466394},{x:.079912,y:.6703676283824797},{x:.22820062174801237,y:.6839146886946046},{x:.3561457472749752,y:.6783468266821017},{x:.42954781695254723,y:.662076342723345},{x:.4559144639404158,y:.6507448714849071},{x:.47563211893454127,y:.6373433067928232},{x:.48601322722124407,y:.6253391992627579},{x:.4997779385388953,y:.5763903343143285},{x:.4985264355495565,y:.5343392524542002},{x:.48755361344964526,y:.5098575528750181},{x:.467303195590932,y:.4926125823096997},{x:.43241084881177044,y:.4788935374345549},{x:.3509044963348569,y:.4661372945522357},{x:.079912,y:.45654326739466394}]],S:[[{x:.021897597226735628,y:.20918252956592975},{x:.022856530106274857,y:.20041326151782815},{x:.025507836686771486,y:.19199957102060095},{x:.07532383668677148,y:.0752955710206009},{x:.07606476437254353,y:.07394451179196875},{x:.07662717764446286,y:.07250992955787258},{x:.07818101321859919,y:.07008559601860773},{x:.07956562874320691,y:.06756079148160443},{x:.08055589829123208,y:.06638024029801701},{x:.0813873780598424,y:.06508294454561242},{x:.08338432112997196,y:.06300833217803187},{x:.0852348965856767,y:.0608021661408081},{x:.08643645249257384,y:.05983749092219001},{x:.08750504545666679,y:.05872733599970995},{x:.08986835462050304,y:.05708217099364391},{x:.09211377343035676,y:.05527942517977789},{x:.09348044057646428,y:.05456769785378441},{x:.09474508130770348,y:.05368734639231786},{x:.18347008130770348,y:.00406434639231789},{x:.18531117162778632,y:.0032602675504258996},{x:.18705570252460849,y:.0022638899609980986},{x:.18934358471290644,y:.0014991491478438968},{x:.19155425509545604,y:.0005336596975895336},{x:.19351683738147718,y:.0001042099085839361},{x:.19542223123106015,y:-.0005326814704223887},{x:.1978153459361366,y:-.0008363843304376121},{x:.20017189655491793,y:-.0013520417748285815},{x:.2021805498702545,y:-.0013903589963945293},{x:.20417358345551592,y:-.0016432887864569548},{x:.36640558345551594,y:-.006196288786456984},{x:.3683537351453612,y:-.006059465175549666},{x:.37030515940756886,y:-.006136660097762148},{x:.3727431942064551,y:-.005751182385354602},{x:.3752054496398049,y:-.005578251970786187},{x:.37708947517888647,y:-.005063991846688501},{x:.37901846335331396,y:-.004758999502412188},{x:.3813344490261288,y:-.00390529164215812},{x:.3837156558614866,y:-.003255321831637216},{x:.38546315320491126,y:-.002383387922517842},{x:.38729557535780434,y:-.001707928996501587},{x:.5134735753578044,y:.059451071003498376},{x:.5144073364238021,y:.06002293670994077},{x:.5154151369003129,y:.060451046875811966},{x:.5181619939873726,y:.06232241135953579},{x:.5209964106485654,y:.06405830049148753},{x:.5218006642926897,y:.06480134570578519},{x:.5227055800155168,y:.06541784197435321},{x:.5250345719141375,y:.06778913394790613},{x:.5274758708842278,y:.07004463571609586},{x:.5281197100899656,y:.07093030562736781},{x:.5288869656553633,y:.07171149639276676},{x:.5307085905129939,y:.07449158843544039},{x:.5326629540416582,y:.07718002517181716},{x:.5331216364294024,y:.07817428398206286},{x:.5337217466362741,y:.07909014852127505},{x:.5349660004312154,y:.08217220325496363},{x:.5363583234240663,y:.08519025984344057},{x:.5366142220868877,y:.08625489874416871},{x:.5370241250365293,y:.08727024089657527},{x:.5783351250365293,y:.22800124089657534},{x:.5784689928995229,y:.22870739358153944},{x:.5787167010683089,y:.22938208824013706},{x:.5792894483007394,y:.23303529403132756},{x:.5799781923062021,y:.23666841715613338},{x:.579971724381043,y:.23738711763976203},{x:.5800830465086156,y:.23809717369609615},{x:.5799320834693805,y:.24179192160438975},{x:.5798988062915618,y:.2454896025769029},{x:.5797522511369868,y:.24619323160266243},{x:.5797229091764134,y:.2469113620006918},{x:.5788540372904492,y:.2505056649360105},{x:.5781000177526308,y:.2541258039501414},{x:.5778190074010411,y:.2547873214491718},{x:.5776501289474114,y:.2554859288404322},{x:.5462891289474114,y:.3454679288404322},{x:.5453940585085517,y:.34740151578805634},{x:.5446999978282894,y:.3494160105998292},{x:.5435456407901493,y:.3513945829466735},{x:.5425833616033817,y:.3534733584203385},{x:.5413282655917657,y:.35519517245680393},{x:.5402545326513293,y:.3570355547940282},{x:.5387363559437135,y:.3587509055417339},{x:.537387017705137,y:.36060200657115166},{x:.5358201287566253,y:.36204587934864135},{x:.5344079865107593,y:.36364142435019586},{x:.5325843328131388,y:.3650276335315076},{x:.5308997898345437,y:.36657992334222783},{x:.5290813226127058,y:.36769036763963614},{x:.5273850388959807,y:.368979759405903},{x:.44286903889598056,y:.42100375940590296},{x:.4391930936098881,y:.42279580082266366},{x:.4355432374645799,y:.42464039733796655},{x:.4352309585303121,y:.42472736117212373},{x:.4349395777453148,y:.4248694107387315},{x:.430984654780085,y:.42590987723258605},{x:.42704506666901776,y:.42700697873237736},{x:.18802361397643091,y:.46887992641475673},{x:.1445277950559712,y:.506325930968192},{x:.1345999941059918,y:.5433489412625321},{x:.1668438673565076,y:.6442112383308392},{x:.2418447705661005,y:.6964178007533797},{x:.3847076342900009,y:.6886954406015322},{x:.4475324208368403,y:.608018765726417},{x:.4536085342974724,y:.6016234190133417},{x:.4608155671913789,y:.5965363480257236},{x:.46887655728619765,y:.5929530460487544},{x:.47748172525324006,y:.5910112173678703},{x:.48630037931336645,y:.5907854853702875},{x:.49499362353660437,y:.5922845248100812},{x:.5032273814226823,y:.5954507284422511},{x:.5106852342735829,y:.6001624208368403},{x:.5170805809866582,y:.6062385342974724},{x:.5221676519742764,y:.6134455671913789},{x:.5257509539512455,y:.6215065572861976},{x:.5276927826321296,y:.63011172525324},{x:.5279185146297124,y:.6389303793133664},{x:.5264194751899187,y:.6476236235366044},{x:.5232532715577489,y:.6558573814226824},{x:.5185415791631597,y:.663315234273583},{x:.4431175791631597,y:.760171234273583},{x:.4420344490669973,y:.7613112710002186},{x:.44110391182703096,y:.7625789282836855},{x:.4390031114098716,y:.7645018722698176},{x:.4370414657025276,y:.7665665809866583},{x:.43575673751534005,y:.767473404028016},{x:.4345967726198766,y:.768535164822443},{x:.4321611907321885,y:.7700113141492059},{x:.4298344328086211,y:.7716536519742764},{x:.42839747791415833,y:.7722924126294288},{x:.42705266216361437,y:.7731074740629288},{x:.4243758968514515,y:.7740801011395291},{x:.42177344271380235,y:.7752369539512456},{x:.4202394824828045,y:.7755831050064366},{x:.4187614963922926,y:.7761201447252115},{x:.4159464142454535,y:.7765518720385514},{x:.41316827474676,y:.7771787826321297},{x:.4115962584106506,y:.7772190216964318},{x:.4100419001567639,y:.7774574015652649},{x:.23125890015676387,y:.7871214015652648},{x:.22961427991333744,y:.7870487065186679},{x:.22797320559841586,y:.7871788426312305},{x:.22521775007366066,y:.7868543723294609},{x:.22244596265035355,y:.7867318545526676},{x:.22084712542379714,y:.7863397068281228},{x:.21921219559556868,y:.7861471846952227},{x:.21657298639174055,y:.7852913862936938},{x:.21387836011908076,y:.7846304737606538},{x:.21238674832737245,y:.7839339433752962},{x:.2108207924222569,y:.7834261615145331},{x:.2083992528689725,y:.782071922865878},{x:.2058853407234555,y:.7808980140745921},{x:.20455827617124617,y:.7799238683005129},{x:.20312147299647784,y:.7791203404840283},{x:.10291447299647782,y:.7093683404840284},{x:.10181255131472464,y:.7084283417469311},{x:.10059641238964509,y:.7076416809983432},{x:.09846400643554813,y:.7055718520256913},{x:.09620311784593605,y:.7036431918911783},{x:.09530575393663021,y:.7025062807105057},{x:.09426645267874648,y:.7014974784931097},{x:.09257882390791694,y:.6990514089395268},{x:.09073764058529563,y:.6967187299857058},{x:.09007931964022471,y:.6954285972205445},{x:.08925679581402991,y:.6942364212378118},{x:.08807879885369768,y:.6915081121844703},{x:.08672807644060793,y:.6888610579553555},{x:.08633409736450004,y:.6874672826843552},{x:.08575996009935855,y:.6861375475907227},{x:.04484896009935855,y:.5581635475907226},{x:.04400698871411546,y:.5542371548008082},{x:.04309586967447821,y:.5503262293029391},{x:.04308290316808571,y:.5499278363503387},{x:.04299932697019912,y:.5495380927241992},{x:.04293953506277818,y:.5455228840020936},{x:.042808906634767226,y:.5415093553341928},{x:.04287391188557095,y:.5411160877505585},{x:.04286797679041901,y:.5407175280315513},{x:.04359266213029085,y:.5367678055966908},{x:.04424754429113727,y:.532805911414652},{x:.06119154429113727,y:.4696179114146519},{x:.06126294463056804,y:.4694283141856516},{x:.06129777501412092,y:.46922873472253734},{x:.06281676603792068,y:.46530228011432895},{x:.0643004966052513,y:.46136236601319713},{x:.0644075135916399,y:.46119034135699993},{x:.06448061074086608,y:.46100139182805006},{x:.06673642807197144,y:.45744672339211917},{x:.06896028828319853,y:.453871975109843},{x:.06909880931377366,y:.45372413383751425},{x:.06920736414622189,y:.4535530754671619},{x:.07211331798967527,y:.4505067971180214},{x:.07499184614403663,y:.4474345902263458},{x:.07515654793327702,y:.4473166137950705},{x:.07529638874761438,y:.44717002026055797},{x:.1386943887476144,y:.392590020260558},{x:.14135607757337018,y:.39071931904916735},{x:.1439175788350931,y:.3887136217356019},{x:.14495796828078528,y:.38818782053421796},{x:.14591168674437638,y:.38751752344016943},{x:.1488871876674173,y:.38620203695812855},{x:.15179076253542007,y:.38473460266203335},{x:.15291373991533655,y:.3844218744952798},{x:.15397990142199966,y:.3839505182141148},{x:.15715486761053352,y:.383240799869195},{x:.1602889333309822,y:.3823680212676226},{x:.4030282434963717,y:.3398437611206276},{x:.46657219784598525,y:.30072914754350266},{x:.487912612564808,y:.23949853636308405},{x:.45628203537627,y:.13174508671722343},{x:.35793695341674575,y:.08407681754539842},{x:.21775140382412592,y:.0880110894972649},{x:.15207256592030022,y:.12474460286217379},{x:.10828216331322851,y:.2273324289793991},{x:.10404037125679308,y:.23506720851839558},{x:.09837110341432329,y:.2418258338591919},{x:.09149222656964323,y:.24734857482022213},{x:.08366809210217534,y:.25142319556354265},{x:.07519937711167927,y:.2538931106990613},{x:.06641152956592972,y:.2546634027732644},{x:.05764226151782814,y:.2537044698937252},{x:.04922857102060091,y:.2510531633132285},{x:.04149379148160447,y:.24681137125679312},{x:.034735166140808106,y:.24114210341432332},{x:.029212425179777887,y:.23426322656964324},{x:.025137804436457384,y:.22643909210217536},{x:.022667889300938757,y:.21797037711167933},{x:.021897597226735628,y:.20918252956592975}]],T:[[{x:-.022050999999999998,y:.729004},{x:-.021186337618145364,y:.7202249355092742},{x:-.018625578963007903,y:.711783245543571},{x:-.01446713255361454,y:.7040033395141179},{x:-.008870805153394636,y:.6971841948466053},{x:-.002051660485882085,y:.6915878674463855},{x:.005728245543570962,y:.6874294210369921},{x:.014169935509274232,y:.6848686623818546},{x:.022949,y:.684004},{x:.264284,y:.684004},{x:.264284,y:.05103000000000002},{x:.26514866238185464,y:.04225093550927423},{x:.2677094210369921,y:.03380924554357098},{x:.27186786744638547,y:.026029339514117924},{x:.27746419484660534,y:.019210194846605383},{x:.28428333951411794,y:.013613867446385479},{x:.292063245543571,y:.009455421036992116},{x:.30050493550927426,y:.006894662381854655},{x:.309284,y:.0060300000000000215},{x:.3180630644907258,y:.006894662381854655},{x:.32650475445642907,y:.009455421036992116},{x:.3342846604858821,y:.013613867446385486},{x:.34110380515339467,y:.019210194846605383},{x:.34670013255361454,y:.026029339514117924},{x:.3508585789630079,y:.03380924554357098},{x:.35341933761814537,y:.04225093550927425},{x:.354284,y:.05103000000000002},{x:.354284,y:.684004},{x:.579103,y:.684004},{x:.5878820644907258,y:.6848686623818546},{x:.596323754456429,y:.6874294210369921},{x:.6041036604858822,y:.6915878674463855},{x:.6109228051533947,y:.6971841948466053},{x:.6165191325536146,y:.7040033395141179},{x:.6206775789630079,y:.711783245543571},{x:.6232383376181454,y:.7202249355092742},{x:.6241030000000001,y:.729004},{x:.6232383376181454,y:.7377830644907257},{x:.6206775789630079,y:.746224754456429},{x:.6165191325536146,y:.7540046604858821},{x:.6109228051533947,y:.7608238051533946},{x:.6041036604858822,y:.7664201325536145},{x:.596323754456429,y:.7705785789630079},{x:.5878820644907258,y:.7731393376181454},{x:.579103,y:.774004},{x:.022949,y:.774004},{x:.014169935509274211,y:.7731393376181454},{x:.005728245543570935,y:.7705785789630079},{x:-.0020516604858820953,y:.7664201325536145},{x:-.008870805153394643,y:.7608238051533946},{x:-.01446713255361454,y:.7540046604858821},{x:-.018625578963007903,y:.746224754456429},{x:-.021186337618145364,y:.7377830644907257},{x:-.022050999999999998,y:.729004}]],U:[[{x:.027022176378557076,y:.7288780077818786},{x:.02808017637855708,y:.35099900778187865},{x:.02823473618726791,y:.3494735334648019},{x:.028192796744230073,y:.34794082288884604},{x:.035484796744230065,y:.24514582288884607},{x:.03612518708694976,y:.24139252668431194},{x:.03666424897987138,y:.2376233431565944},{x:.055316248979871384,y:.16148034315659432},{x:.05618736340037885,y:.15900518320818077},{x:.05685851158014249,y:.15646848905542057},{x:.057648252259250334,y:.15485425480263812},{x:.058244846291224776,y:.15315910934454152},{x:.0595821022437829,y:.15090145489330362},{x:.06073523897858293,y:.14854443712190207},{x:.09649723897858292,y:.0906284371219021},{x:.09834293286415725,y:.08820732921922435},{x:.10003759110096133,y:.08567820232322114},{x:.10101147458130413,y:.08470684222595504},{x:.10184538199049184,y:.08361295562088691},{x:.10412794610596264,y:.08159844564215248},{x:.10628345014049506,y:.07944852663140606},{x:.15306845014049508,y:.041154526631406},{x:.15518086878702558,y:.03974701384514513},{x:.15716842451696925,y:.03816808161035298},{x:.15884280372557036,y:.03730705230772802},{x:.16040964618671547,y:.03626305906247794},{x:.1627560674239954,y:.03529470367371844},{x:.16501346722603244,y:.034133863066459845},{x:.23490646722603245,y:.006476863066459913},{x:.23625924682734178,y:.006089880823813601},{x:.23754823013535448,y:.005525708919597472},{x:.24049103862888763,y:.004879315347967098},{x:.24338780663402787,y:.004050652809021178},{x:.24479008944495417,y:.003935020529692536},{x:.24616436977860445,y:.0036331571990539033},{x:.3343553697786044,y:-.006825842800946093},{x:.3363658265006992,y:-.006865793301669296},{x:.3383604992721398,y:-.007120376900508131},{x:.34076517153289726,y:-.0069532142518240045},{x:.3431751712391958,y:-.00700110421331946},{x:.3451547915551648,y:-.0066480664270605625},{x:.3471608040448924,y:-.0065086169201366215},{x:.4090588040448924,y:.003962383079863387},{x:.4119620232343868,y:.004752615784895447},{x:.4149089852784979,y:.005359710588792872},{x:.4162090298953196,y:.005908616535408058},{x:.4175706649775032,y:.0062792425557079215},{x:.42026393287145114,y:.0076206811274584655},{x:.4230358315454356,y:.008791034549085273},{x:.4738028315454356,y:.03637303454908527},{x:.4760785863358737,y:.0379161826666043},{x:.4784624107710392,y:.03928649177082543},{x:.47972093897980134,y:.04038599604431689},{x:.48110410464379305,y:.04132389563682743},{x:.48303507818089647,y:.043281370330868374},{x:.4851057640535682,y:.045090410406577325},{x:.5154867640535682,y:.07740541040657731},{x:.5155903820373309,y:.07753992155387555},{x:.5157174079857786,y:.07765259073212467},{x:.5182811318880063,y:.08103290449336144},{x:.5208701788099869,y:.08439386230433626},{x:.5209455639802052,y:.08454600372347547},{x:.521048168494406,y:.08468128952824439},{x:.5340921684944061,y:.10592328952824437},{x:.5341054861393935,y:.10595068243490303},{x:.5341238592672674,y:.10597497562685786},{x:.5360339092314592,y:.10991723311331511},{x:.5379492688231333,y:.11385691363208547},{x:.5379569864823256,y:.11388637833537296},{x:.5379702672090579,y:.11391378915988949},{x:.557924267209058,y:.16807278915988946},{x:.5580810067186996,y:.16867450001810444},{x:.5583366124011981,y:.1692413235937006},{x:.5591915686944892,y:.17293786157308777},{x:.5601479818122073,y:.1766094575809222},{x:.5601843216510317,y:.17723018509512725},{x:.5603244341481242,y:.17783598350956487},{x:.5696394341481241,y:.2495799835095649},{x:.569721927352796,y:.25224539988339456},{x:.5700114646960025,y:.2548963275892337},{x:.5750284646960026,y:.7275053275892338},{x:.5742570402937379,y:.7362930758081182},{x:.5717860339652341,y:.7447614724740409},{x:.5677104050979391,y:.752585081852262},{x:.5621867778235843,y:.7594632470219072},{x:.5554274220406369,y:.7651316439528263},{x:.5476920960011455,y:.7693724393298378},{x:.5392780639467868,y:.7720226617648687},{x:.5305086724107663,y:.7729804646960026},{x:.5217209241918819,y:.7722090402937379},{x:.5132525275259592,y:.7697380339652341},{x:.505428918147738,y:.7656624050979391},{x:.4985507529780929,y:.7601387778235843},{x:.49288235604717384,y:.753379422040637},{x:.48864156067016223,y:.7456440960011456},{x:.48599133823513135,y:.7372300639467868},{x:.4850335353039975,y:.7284606724107663},{x:.48004487037154997,y:.258520878697574},{x:.4717248917269394,y:.19444051929027983},{x:.4550625667192203,y:.14921575933773623},{x:.4467624246683876,y:.135699076001046},{x:.42448554918380393,y:.11200409455592171},{x:.3866565267646711,y:.09145137140181527},{x:.33852910612300163,y:.08330987698295},{x:.2625775703514966,y:.09231733933890664},{x:.20464797458906397,y:.11524036210229632},{x:.16911733402594603,y:.14432255403825953},{x:.14104265103985364,y:.1897890642955865},{x:.12498883901236212,y:.25532548983758135},{x:.11807553704626646,y:.35278200048003916},{x:.11702182362144292,y:.7291299922181214},{x:.11613258476624799,y:.737906601393955},{x:.11354820087598706,y:.7463410885908555},{x:.10936798837422372,y:.7541093211959605},{x:.10375259048311052,y:.7609127703867312},{x:.09691780379445152,y:.7664899834261845},{x:.0891262853276994,y:.770626631144951},{x:.08067745876799748,y:.7731637444910576},{x:.07189600778187862,y:.7740038236214429},{x:.06311939860604492,y:.773114584766248},{x:.05468491140914452,y:.770530200875987},{x:.04691667880403945,y:.7663499883742237},{x:.04011322961326877,y:.7607345904831105},{x:.03453601657381558,y:.7538998037944515},{x:.030399368855048972,y:.7461082853276993},{x:.027862255508942363,y:.7376594587679974},{x:.027022176378557076,y:.7288780077818786}]],V:[[{x:-.017163400590915968,y:.72836062945125},{x:-.016173311217885875,y:.7195948244454146},{x:-.01349212241321528,y:.7111906087794154},{x:.27875887758678475,y:.033216608779415485},{x:.2789749302503264,y:.03282594254600198},{x:.27911899522766415,y:.032403397706182537},{x:.2811076886540147,y:.028969490703698003},{x:.2830281292409603,y:.025496951748158487},{x:.28331624571443165,y:.0251559418405784},{x:.28353997693249255,y:.024769621764193565},{x:.2861603801951793,y:.021789671162821947},{x:.2887213787977949,y:.018758515442121357},{x:.2890704869266977,y:.018480266679882864},{x:.2893652865202418,y:.018145017430816868},{x:.2925166989914198,y:.015733541060992128},{x:.2956198378696305,y:.013260254189586457},{x:.29601652162435305,y:.013055459516578674},{x:.296371060610326,y:.012784164535463174},{x:.29993237527606087,y:.011033834081706148},{x:.30345840254303674,y:.009213463087028258},{x:.303887417589348,y:.00908999264768462},{x:.3042880712333465,y:.00889307764850001},{x:.3081224287682413,y:.00787115732855266},{x:.3119358411735324,y:.006773658047051503},{x:.31238070070379703,y:.0067362567411129665},{x:.3128120721109714,y:.0066212890568466964},{x:.3167721203052928,y:.006367050695504971},{x:.32072637054875,y:.006034599409084053},{x:.3211699788607,y:.006084704547762943},{x:.3216154906697884,y:.006056102322046737},{x:.325549047092249,y:.006579316156958459},{x:.3294921755545854,y:.0070246887821141385},{x:.32991748502957097,y:.007160374853030322},{x:.330360016471596,y:.007219237253358143},{x:.3341159167548444,y:.008499796470269213},{x:.33789639122058457,y:.00970587758678474},{x:.33828705745399834,y:.009921930250326543},{x:.33870960229381747,y:.01006599522766418},{x:.3421435092963017,y:.012054688654014527},{x:.34561604825184156,y:.013975129240960359},{x:.3459570581594215,y:.014263245714431577},{x:.34634337823580646,y:.014486976932492547},{x:.34932332883717915,y:.01710738019518028},{x:.35235448455787866,y:.01966837879779494},{x:.3526327333201171,y:.020017486926697612},{x:.35296798256918316,y:.020312286520241793},{x:.3553794589390082,y:.023463698991420194},{x:.3578527458104136,y:.026566837869630475},{x:.3580575404834214,y:.026963521624353053},{x:.35832883546453687,y:.02731806061032596},{x:.3600791659182934,y:.03087937527605991},{x:.3618995369129718,y:.03440540254303673},{x:.3620230073523154,y:.034834417589348},{x:.3622199223515,y:.0352350712333465},{x:.6163569223515,y:.7132090712333464},{x:.6186287109431533,y:.7217330721109714},{x:.6191938976779532,y:.7305364906697883},{x:.6180307627466418,y:.7392810164715959},{x:.6151840047723358,y:.7476306022938175},{x:.6107630230675074,y:.7552643782358064},{x:.6049377134797582,y:.7618889825691831},{x:.597931939389674,y:.7672498354645368},{x:.5900149287666535,y:.7711409223515},{x:.5814909278890286,y:.7734127109431533},{x:.5726875093302116,y:.7739778976779532},{x:.5639429835284039,y:.7728147627466418},{x:.5555933977061824,y:.7699680047723358},{x:.5479596217641935,y:.7655470230675074},{x:.5413350174308168,y:.7597217134797583},{x:.5359741645354631,y:.7527159393896741},{x:.5320830776484999,y:.7447989287666535},{x:.3171703309688009,y:.17146543337864517},{x:.06915612241321528,y:.7468173912205845},{x:.06488687075903964,y:.7545370482518415},{x:.059193621202205074,y:.7612754845578786},{x:.05229516213036956,y:.7667737458104136},{x:.04445659745696326,y:.7708205369129717},{x:.0359791588264676,y:.7732603419529485},{x:.027188629451250054,y:.773999400590916},{x:.01842282444541461,y:.7730093112178859},{x:.010018608779415478,y:.7703281224132152},{x:.0022989517481584835,y:.7660588707590397},{x:-.004439484557878664,y:.7603656212022051},{x:-.009937745810413578,y:.7534671621303695},{x:-.013984536912971763,y:.7456285974569633},{x:-.016424341952948517,y:.7371511588264675},{x:-.017163400590915968,y:.72836062945125}]],W:[[{x:-.04486424190193638,y:.7324968210037928},{x:-.04468360364824366,y:.7236771280279449},{x:.03511539635175633,y:.05429612802794491},{x:.03538914303981033,y:.053053468981350556},{x:.035486899606724354,y:.05178477579191172},{x:.03633616861564037,y:.04875449496443272},{x:.037013200434797444,y:.04568114375463893},{x:.03752411791055629,y:.04451576738270255},{x:.03786750587531561,y:.043290523137271594},{x:.039291634880795206,y:.040484152470619886},{x:.040555238800576446,y:.03760193719815913},{x:.041283692791972554,y:.036558628261303676},{x:.041859515947665654,y:.035423918409107566},{x:.04380377647068911,y:.032949305154171604},{x:.045605392901094464,y:.030368987735599786},{x:.046523389329760155,y:.02948784001117424},{x:.047309519115439125,y:.028487270815480248},{x:.049699194314460494,y:.02643951297186818},{x:.05196958814642765,y:.024260253558522238},{x:.05304184892442764,y:.02357512905942291},{x:.054008074813295476,y:.022747151833295932},{x:.056751330810561565,y:.021204943586542027},{x:.059403252082379655,y:.019510489895534},{x:.060588570829346225,y:.019047717572039012},{x:.06169776130235942,y:.01842415101594414},{x:.06468917630833097,y:.01744675856409077},{x:.06762071317273859,y:.01630222750050557},{x:.06887353875396018,y:.016079591433481148},{x:.07008306824328207,y:.01568439886046892},{x:.07320768385688461,y:.015309382847312772},{x:.07630617899620724,y:.014758758098063603},{x:.07757836602719018,y:.014784814066709744},{x:.07884175299285809,y:.014633182505734484},{x:.08197949198836539,y:.014874954586349768},{x:.08512587197205507,y:.014939396351756326},{x:.08636853101864941,y:.015213143039810315},{x:.08763722420808827,y:.015310899606724347},{x:.09066750503556728,y:.016160168615640357},{x:.09374085624536103,y:.01683720043479743},{x:.09490623261729739,y:.017348117910556266},{x:.09613147686272838,y:.017691505875315594},{x:.09893784752938008,y:.01911563488079519},{x:.10182006280184085,y:.020379238800576432},{x:.10286337173869634,y:.02110769279197256},{x:.1039980815908924,y:.02168351594766564},{x:.10647269484582828,y:.023627776470689026},{x:.1090530122644002,y:.025429392901094458},{x:.10993415998882576,y:.026347389329760156},{x:.11093472918451973,y:.02713351911543911},{x:.11298248702813177,y:.02952319431446044},{x:.11516174644147774,y:.03179358814642764},{x:.11584687094057705,y:.032865848924427614},{x:.11667484816670405,y:.03383207481329547},{x:.118217056413458,y:.03657533081056164},{x:.11991151010446596,y:.039227252082379635},{x:.12037428242796094,y:.040412570829346184},{x:.12099784898405583,y:.041521761302359406},{x:.2862381791186236,y:.4176126753554925},{x:.4644074439049092,y:.03214939722735514},{x:.46457066699968924,y:.031871550040082325},{x:.46468087848244366,y:.03156873942729889},{x:.4668033610072479,y:.028070937443703255},{x:.4688757411162635,y:.024543219843286366},{x:.46909003322228215,y:.024302554657928657},{x:.4692572024422568,y:.02402706365982141},{x:.47202128937582516,y:.021010546759784428},{x:.47474207284479647,y:.017954914566682648},{x:.47499919883659564,y:.017760680011347015},{x:.4752169015744166,y:.01752309559247584},{x:.47851637060601154,y:.015103786828781735},{x:.4817809992520572,y:.012637666274559728},{x:.4820710779219699,y:.012497326674279732},{x:.48233094798351184,y:.012306779070622963},{x:.4860390023686124,y:.010577651122297159},{x:.4897220183436901,y:.008795813836836655},{x:.4900339021311097,y:.008714762363747632},{x:.4903259528556443,y:.008578574212853553},{x:.49430009414373083,y:.007606076497244536},{x:.4982599612093785,y:.006576997488159493},{x:.4985816645952609,y:.006558348904918078},{x:.4988946726372282,y:.006481753841050326},{x:.5029821768073245,y:.006303258899985619},{x:.5070667194929276,y:.00606648509648134},{x:.5073858795965667,y:.006110956057683261},{x:.5077078162324508,y:.006096897586191266},{x:.5117516027915979,y:.006719264880154805},{x:.5158038544123874,y:.0072838953667157535},{x:.5161082060899873,y:.007389776878261636},{x:.5164266994754154,y:.007438795258320738},{x:.5202713679739276,y:.008838107561233023},{x:.5241356027726449,y:.01018244390490916},{x:.524413449959918,y:.010345666999689355},{x:.5247162605727012,y:.010455878482443691},{x:.5282140625562944,y:.012578361007246536},{x:.5317417801567137,y:.014650741116263542},{x:.5319824453420714,y:.01486503322228222},{x:.5322579363401786,y:.01503220244225683},{x:.535274453240215,y:.01779628937582467},{x:.5383300854333174,y:.020517072844796484},{x:.5385243199886531,y:.020774198836595797},{x:.5387619044075241,y:.0209919015744166},{x:.5411812131712181,y:.024291370606011366},{x:.5436473337254403,y:.027555999252057217},{x:.5437876733257202,y:.027846077921969747},{x:.5439782209293771,y:.028105947983511865},{x:.5457073488777034,y:.03181400236861376},{x:.5474891861631633,y:.0354970183436901},{x:.5475702376362523,y:.03580890213110964},{x:.5477064257871465,y:.03610095285564429},{x:.548678923502756,y:.040075094143733274},{x:.5497080025118405,y:.04403496120937851},{x:.5497266510950819,y:.04435666459526063},{x:.5498032461589497,y:.04466967263722821},{x:.6466002461589497,y:.7226436726372282},{x:.6469851024138088,y:.7314568162324507},{x:.6456432047416794,y:.7401756994754154},{x:.6426261215175564,y:.7484652605727011},{x:.6380497975577433,y:.7560069363401786},{x:.6320900984255835,y:.7625109044075241},{x:.6249760520164882,y:.7677272209293771},{x:.6169810471443558,y:.7714554257871464},{x:.6084123273627718,y:.7735522461589497},{x:.5995991837675493,y:.7739371024138088},{x:.5908803005245846,y:.7725952047416793},{x:.5825907394272989,y:.7695781215175563},{x:.5750490636598214,y:.7650017975577432},{x:.5685450955924759,y:.7590420984255835},{x:.563328779070623,y:.7519280520164882},{x:.5596005742128536,y:.7439330471443557},{x:.5575037538410503,y:.7353643273627718},{x:.4822251865940539,y:.2081071670095049},{x:.3260455560950909,y:.5459966027726448},{x:.3245096626856286,y:.5486110836728201},{x:.32313748405233433,y:.5513150815908924},{x:.32228015650766817,y:.5524062697730983},{x:.32157725888373645,y:.5536027801567136},{x:.3195608173147473,y:.5558673865996665},{x:.3176874808845609,y:.5582517291845196},{x:.31663374639442166,y:.5591546941850146},{x:.31571092715520355,y:.5601910854333173},{x:.3132914281453504,y:.5620187898634509},{x:.3109889251867045,y:.563991848166704},{x:.30977927817660644,y:.5646718895469083},{x:.3086720007479428,y:.5655083337254402},{x:.3059424242873038,y:.566828898486493},{x:.3032992386976406,y:.5683148489840557},{x:.30198016522380455,y:.5687458331350992},{x:.3007309816563099,y:.5693501861631632},{x:.29779622383750376,y:.570112862691949},{x:.29491393175671793,y:.571054601139531},{x:.29353612307299787,y:.5712199655821879},{x:.29219303879062153,y:.5715690025118404},{x:.28916588071079274,y:.5717444815770724},{x:.2861552470071419,y:.5721058174942654},{x:.2847716515285703,y:.5719992073657418},{x:.2833862805070725,y:.5720795149035186},{x:.28038305415357795,y:.5716610529431293},{x:.27735977579191173,y:.5714281003932755},{x:.27602356431680025,y:.5710536126610233},{x:.27464914558761266,y:.5708621046332842},{x:.27178526326499086,y:.5698657829057354},{x:.26886552313727163,y:.5690474941246844},{x:.26762804552325165,y:.5684195201422382},{x:.26631739722735515,y:.5679635560950907},{x:.26370291632718046,y:.5664276626856288},{x:.2609989184091076,y:.5650554840523343},{x:.25990773022690183,y:.5641981565076682},{x:.2587112198432863,y:.5634952588837364},{x:.25644661340033337,y:.5614788173147471},{x:.2540622708154803,y:.5596054808845607},{x:.2531593058149851,y:.5585517463944213},{x:.2521229145666826,y:.5576289271552034},{x:.2502952101365493,y:.5552094281453507},{x:.24832215183329598,y:.5529069251867045},{x:.2476421104530918,y:.5516972781766065},{x:.24680566627455972,y:.5505900007479427},{x:.245485101513507,y:.5478604242873037},{x:.24399915101594416,y:.5452172386976405},{x:.10495542809967917,y:.22875042455884986},{x:.04468360364824366,y:.734330871972055},{x:.04278579956520255,y:.742945856245361},{x:.03924376119942353,y:.7510250628018409},{x:.034193607098905524,y:.7582580122644001},{x:.02782941185357234,y:.7643667464414777},{x:.020395747917620333,y:.7691165101044659},{x:.012178286827261426,y:.7723247724994944},{x:.003492821003792758,y:.7738682419019364},{x:-.00532687197205508,y:.7736876036482436},{x:-.013941856245361059,y:.7717897995652026},{x:-.022021062801840872,y:.7682477611994235},{x:-.029254012264400202,y:.7631976070989055},{x:-.035362746441477744,y:.7568334118535723},{x:-.04011251010446598,y:.7493997479176203},{x:-.04332077249949441,y:.7411822868272614},{x:-.04486424190193638,y:.7324968210037928}]],X:[[{x:-.03582341524240513,y:.7325834270170574},{x:-.035659804156077404,y:.7237634017461555},{x:-.03377863524060577,y:.7151447697271875},{x:-.030252200762440104,y:.7070587401552579},{x:-.02521601962092907,y:.6998160546121182},{x:.24190189785100796,y:.3863717955888736},{x:-.0190039697420246,y:.08021800391719859},{x:-.024040163260448045,y:.07297532698032597},{x:-.027566611556706647,y:.06488930343468059},{x:-.029447795200430175,y:.056270674630427356},{x:-.029611421359170286,y:.047450649639130975},{x:-.028051201971409197,y:.03876817707487998},{x:-.024827095393237467,y:.030556919489131844},{x:-.02006300223235442,y:.02313243090598055},{x:-.013942003917198569,y:.016780030257975413},{x:-.006699326980325947,y:.011743836739551976},{x:.0013866965653194212,y:.00821738844329338},{x:.010005325369572668,y:.006336204799569846},{x:.018825350360869044,y:.0061725786408297345},{x:.02750782292512003,y:.007732798028590823},{x:.03571908051086817,y:.010956904606762553},{x:.04314356909401947,y:.0157209977676456},{x:.049495969742024595,y:.021841996082801452},{x:.3010259353438819,y:.31699385831754345},{x:.5525549803790709,y:.021842054612118165},{x:.558907370566982,y:.01572104544144637},{x:.5663318510088331,y:.010956939592969957},{x:.5745431030849405,y:.007732818982704524},{x:.5832255729829426,y:.006172584757594898},{x:.5920455982538445,y:.006336195843922615},{x:.6006642302728125,y:.008217364759394247},{x:.6087502598447422,y:.011743799237559922},{x:.6159929453878819,y:.016779980379070948},{x:.6221139545585537,y:.023132370566981995},{x:.6268780604070301,y:.03055685100883309},{x:.6301021810172955,y:.0387681030849405},{x:.6316624152424052,y:.04745057298294264},{x:.6314988041560774,y:.05627059825384449},{x:.6296176352406058,y:.06488923027281246},{x:.6260912007624402,y:.07297525984474214},{x:.6210550196209291,y:.08021794538788188},{x:.36015009139561527,y:.3863716945525663},{x:.6272689697420246,y:.6998159960828014},{x:.632305163260448,y:.7070586730196741},{x:.6358316115567066,y:.7151446965653194},{x:.6377127952004301,y:.7237633253695727},{x:.6378764213591702,y:.7325833503608691},{x:.6363162019714091,y:.74126582292512},{x:.6330920953932374,y:.7494770805108681},{x:.6283280022323544,y:.7569015690940195},{x:.6222070039171985,y:.7632539697420246},{x:.6149643269803259,y:.7682901632604481},{x:.6068783034346805,y:.7718166115567067},{x:.5982596746304273,y:.7736977952004301},{x:.5894396496391309,y:.7738614213591702},{x:.58075717707488,y:.7723012019714092},{x:.5725459194891318,y:.7690770953932374},{x:.5651214309059804,y:.7643130022323544},{x:.5587690302579753,y:.7581920039171985},{x:.30102605390274134,y:.4557496318238965},{x:.04328401962092907,y:.7581919453878818},{x:.03693162943301802,y:.7643129545585536},{x:.029507148991166913,y:.76907706040703},{x:.021295896915059523,y:.7723011810172955},{x:.012613427017057378,y:.7738614152424051},{x:.003793401746155514,y:.7736978041560774},{x:-.004825230272812429,y:.7718166352406057},{x:-.012911259844742107,y:.7682902007624401},{x:-.02015394538788185,y:.7632540196209291},{x:-.02627495455855365,y:.756901629433018},{x:-.031039060407030063,y:.7494771489911669},{x:-.034263181017295495,y:.7412658969150595},{x:-.03582341524240513,y:.7325834270170574}]],Y:[[{x:-.02688005049839745,y:.731186349993587},{x:-.02644216088936969,y:.7223756821949907},{x:-.024293809188388457,y:.7138197369324374},{x:-.020517555346512936,y:.7058473143841377},{x:-.015258518681138845,y:.6987647902776368},{x:.25043465103960333,y:.4059541390643743},{x:.26029423204414154,y:.04978477430584237},{x:.26140149479875585,y:.04103299828270508},{x:.26419486861258723,y:.03266540142918031},{x:.26856700569651215,y:.025003545799746604},{x:.27434988727431814,y:.01834187220942495},{x:.28132128045004745,y:.012936385038381841},{x:.28921327849355916,y:.008994814127168342},{x:.2977225963459245,y:.006668631835443931},{x:.30652222569415766,y:.00604723204414153},{x:.3152740017172949,y:.007154494798755871},{x:.32364159857081976,y:.009947868612587236},{x:.3313034542002534,y:.014320005696512164},{x:.3379651277905751,y:.020102887274318144},{x:.3433706149616182,y:.027074280450047443},{x:.3473121858728317,y:.03496627849355913},{x:.3496383681645561,y:.04347559634592452},{x:.3502597679558585,y:.05227522569415767},{x:.34045421751128274,y:.4064927803087797},{x:.6166036868780955,y:.6970396048261934},{x:.6220250193382449,y:.7039986829780357},{x:.6259845336177533,y:.7118816938899454},{x:.6283300678033804,y:.7203856978734211},{x:.6289714843317633,y:.7291838908244783},{x:.6278841339254269,y:.7379381631220915},{x:.6251098028506934,y:.7463120929913156},{x:.620755107094902,y:.7539838750034306},{x:.6149873951738065,y:.7606586868780956},{x:.6080283170219642,y:.7660800193382449},{x:.6001453061100546,y:.7700395336177532},{x:.5916413021265788,y:.7723850678033803},{x:.5828431091755216,y:.7730264843317632},{x:.5740888368779085,y:.7719391339254268},{x:.5657149070086843,y:.7691648028506933},{x:.5580431249965694,y:.7648101070949019},{x:.5513683131219045,y:.7590423951738065},{x:.29567976193894085,y:.4900232412279098},{x:.051392518681138845,y:.7592432097223631},{x:.04485280102201476,y:.765163657957578},{x:.03728372005126494,y:.7696945108160528},{x:.028976151305805796,y:.7726616501633681},{x:.02024934999358704,y:.7739510504983974},{x:.011438682194990706,y:.7735131608893697},{x:.002882736932437466,y:.7713648091883885},{x:-.0050896856158622154,y:.7675885553465129},{x:-.012172209722363214,y:.7623295186811389},{x:-.01809265795757798,y:.7557898010220148},{x:-.022623510816052815,y:.7482207200512649},{x:-.025590650163368103,y:.7399131513058058},{x:-.02688005049839745,y:.731186349993587}]],Z:[[{x:.008711000000000003,y:.05103000000000002},{x:.00905278632815029,y:.04755978517413498},{x:.009251179439517476,y:.04407842782316871},{x:.009484424544736794,y:.043177288815328604},{x:.009575662381854637,y:.04225093550927423},{x:.01058788670939069,y:.038914079093048184},{x:.01146164687940622,y:.0355383196233794},{x:.011866213744552238,y:.0346999996115786},{x:.012136421036992098,y:.03380924554357098},{x:.013780184150668652,y:.030733981057728944},{x:.015295733266009179,y:.0275935480126292},{x:.015856074613338045,y:.026850263164785913},{x:.01629486744638546,y:.026029339514117927},{x:.01850700045157689,y:.023333847648222647},{x:.020606096809669634,y:.02054942610843994},{x:.02130067903544657,y:.01992974044441782},{x:.021891194846605365,y:.019210194846605383},{x:.024586686712500538,y:.016998061841414044},{x:.027188663217490867,y:.014676655565200585},{x:.02799079391630549,y:.014204383257544266},{x:.028710339514117916,y:.013613867446385479},{x:.03178560399995988,y:.01197010433270896},{x:.03479046815396611,y:.010200923661400137},{x:.035669321892902964,y:.00989421387003954},{x:.036490245543570964,y:.009455421036992116},{x:.03982710195979704,y:.008443196709456058},{x:.04311937851852794,y:.007294230264082269},{x:.04404118144126662,y:.007164869674294513},{x:.04493193550927423,y:.006894662381854655},{x:.048402150335139275,y:.006552876053704368},{x:.05185531895677298,y:.006068277970413476},{x:.052784646693945655,y:.006121237837117864},{x:.053711,y:.0060300000000000215},{x:.548341,y:.0060300000000000215},{x:.5571200644907257,y:.006894662381854655},{x:.565561754456429,y:.009455421036992116},{x:.5733416604858821,y:.013613867446385479},{x:.5801608051533946,y:.019210194846605383},{x:.5857571325536145,y:.026029339514117927},{x:.5899155789630078,y:.03380924554357098},{x:.5924763376181453,y:.04225093550927425},{x:.593341,y:.05103000000000002},{x:.5924763376181453,y:.05980906449072579},{x:.5899155789630078,y:.06825075445642906},{x:.5857571325536145,y:.07603066048588211},{x:.5801608051533946,y:.08284980515339466},{x:.5733416604858821,y:.08844613255361455},{x:.565561754456429,y:.09260457896300792},{x:.5571200644907257,y:.09516533761814538},{x:.548341,y:.09603000000000002},{x:.14224494935878249,y:.09603000000000002},{x:.5846943444347994,y:.7024816632174908},{x:.5851666167424556,y:.7032837939163054},{x:.5857571325536145,y:.7040033395141179},{x:.5874008956672913,y:.7070786039999603},{x:.5891700763385999,y:.7100834681539662},{x:.5894767861299605,y:.7109623218929031},{x:.5899155789630078,y:.711783245543571},{x:.5909278032905438,y:.7151201019597967},{x:.5920767697359177,y:.7184123785185279},{x:.5922061303257055,y:.7193341814412667},{x:.5924763376181453,y:.7202249355092742},{x:.5928181239462956,y:.7236951503351391},{x:.5933027220295866,y:.7271483189567729},{x:.5932497621628822,y:.7280776466939456},{x:.593341,y:.729004},{x:.5929992136718496,y:.7324742148258655},{x:.5928008205604824,y:.7359555721768313},{x:.5925675754552632,y:.7368567111846711},{x:.5924763376181453,y:.7377830644907257},{x:.5914641132906093,y:.7411199209069517},{x:.5905903531205937,y:.7444956803766206},{x:.5901857862554476,y:.7453340003884216},{x:.5899155789630078,y:.746224754456429},{x:.5882718158493319,y:.74930001894227},{x:.5867562667339908,y:.7524404519873709},{x:.5861959253866618,y:.7531837368352144},{x:.5857571325536145,y:.7540046604858821},{x:.5835449995484229,y:.7567001523517777},{x:.5814459031903303,y:.7594845738915601},{x:.5807513209645536,y:.760104259555582},{x:.5801608051533946,y:.7608238051533946},{x:.5774653132874991,y:.7630359381585863},{x:.5748633367825091,y:.7653573444347994},{x:.5740612060836946,y:.7658296167424556},{x:.5733416604858821,y:.7664201325536145},{x:.5702663960000408,y:.7680638956672906},{x:.5672615318460339,y:.7698330763385999},{x:.5663826781070966,y:.7701397861299606},{x:.565561754456429,y:.7705785789630079},{x:.5622248980402041,y:.7715908032905435},{x:.558932621481472,y:.7727397697359177},{x:.5580108185587332,y:.7728691303257055},{x:.5571200644907257,y:.7731393376181454},{x:.553649849664861,y:.7734811239462956},{x:.5501966810432269,y:.7739657220295866},{x:.5492673533060543,y:.7739127621628822},{x:.548341,y:.774004},{x:.053711,y:.774004},{x:.04493193550927421,y:.7731393376181454},{x:.036490245543570936,y:.7705785789630079},{x:.028710339514117906,y:.7664201325536145},{x:.021891194846605358,y:.7608238051533946},{x:.01629486744638546,y:.7540046604858821},{x:.012136421036992098,y:.746224754456429},{x:.009575662381854637,y:.7377830644907257},{x:.008711000000000003,y:.729004},{x:.009575662381854637,y:.7202249355092742},{x:.012136421036992098,y:.711783245543571},{x:.01629486744638546,y:.7040033395141179},{x:.021891194846605365,y:.6971841948466053},{x:.028710339514117916,y:.6915878674463855},{x:.036490245543570964,y:.6874294210369921},{x:.04493193550927423,y:.6848686623818546},{x:.053711,y:.684004},{x:.4598070506412174,y:.684004},{x:.017357655565200567,y:.07755233678250915},{x:.016885383257544267,y:.07675020608369457},{x:.01629486744638546,y:.07603066048588211},{x:.014651104332708876,y:.07295539600004002},{x:.012881923661400112,y:.06995053184603389},{x:.012575213870039523,y:.06907167810709706},{x:.012136421036992098,y:.06825075445642906},{x:.011124196709456038,y:.06491389804020298},{x:.00997523026408225,y:.06162162148147208},{x:.009845869674294495,y:.0606998185587334},{x:.009575662381854637,y:.05980906449072579},{x:.009233876053704348,y:.056338849664860746},{x:.008749277970413458,y:.05288568104322705},{x:.008802237837117845,y:.05195635330605437},{x:.008711000000000003,y:.05103000000000002}]],"[":[[{x:.152511,y:-.06942399999999993},{x:.15337566238185463,y:-.0782030644907257},{x:.1559364210369921,y:-.08664475445642897},{x:.16009486744638546,y:-.09442466048588202},{x:.16569119484660536,y:-.10124380515339457},{x:.1725103395141179,y:-.10684013255361446},{x:.18029024554357093,y:-.11099857896300783},{x:.1887319355092742,y:-.1135593376181453},{x:.197511,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.4486773376181454,y:-.06064493550927416},{x:.44611657896300794,y:-.05220324554357089},{x:.44195813255361455,y:-.04442333951411784},{x:.4363618051533946,y:-.03760419484660529},{x:.42954266048588213,y:-.032007867446385396},{x:.4217627544564291,y:-.027849421036992027},{x:.4133210644907258,y:-.025288662381854565},{x:.404542,y:-.024423999999999932},{x:.24251099999999998,y:-.024423999999999932},{x:.24251099999999998,y:.7147659999999999},{x:.404542,y:.7147659999999999},{x:.4133210644907258,y:.7156306623818546},{x:.4217627544564291,y:.7181914210369921},{x:.42954266048588213,y:.7223498674463854},{x:.4363618051533946,y:.7279461948466053},{x:.44195813255361455,y:.7347653395141178},{x:.44611657896300794,y:.7425452455435709},{x:.4486773376181454,y:.7509869355092742},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.197511,y:.804766},{x:.1887319355092742,y:.8039013376181453},{x:.18029024554357093,y:.8013405789630078},{x:.1725103395141179,y:.7971821325536145},{x:.16569119484660536,y:.7915858051533946},{x:.16009486744638546,y:.7847666604858821},{x:.1559364210369921,y:.776986754456429},{x:.15337566238185463,y:.7685450644907257},{x:.152511,y:.7597659999999999},{x:.152511,y:-.06942399999999993}]],"\\":[[{x:.017522651058219416,y:.7303997530123288},{x:.018114599516431164,y:.7215980934307649},{x:.020412292453046287,y:.7130810386853763},{x:.024327430817071727,y:.7051758944136092},{x:.5013774308170718,y:-.059077105586390885},{x:.5067595580368128,y:-.06606654912342862},{x:.5134018419815468,y:-.0718716915303336},{x:.521049023404313,y:-.07626944443996993},{x:.5294072254116235,y:-.07909080467430848},{x:.5381552469876711,y:-.08022734894178067},{x:.5469569065692351,y:-.07963540048356893},{x:.5554739613146237,y:-.0773377075469538},{x:.5633791055863908,y:-.07342256918292836},{x:.5703685491234285,y:-.06804044196318723},{x:.5761736915303335,y:-.06139815801845332},{x:.5805714444399699,y:-.05375097659568702},{x:.5833928046743084,y:-.04539277458837649},{x:.5845293489417805,y:-.03664475301232898},{x:.5839374004835688,y:-.02784309343076498},{x:.5816397075469537,y:-.01932603868537643},{x:.5777245691829282,y:-.011420894413609283},{x:.10067456918292828,y:.7528321055863908},{x:.09529244196318712,y:.7598215491234285},{x:.0886501580184532,y:.7656266915303336},{x:.08100297659568693,y:.7700244444399699},{x:.07264477458837638,y:.7728458046743084},{x:.06389675301232887,y:.7739823489417805},{x:.055095093430764894,y:.7733904004835688},{x:.04657803868537634,y:.7710927075469537},{x:.03867289441360919,y:.7671775691829282},{x:.03168345087657147,y:.7617954419631872},{x:.025878308469666468,y:.7551531580184532},{x:.021480555560030153,y:.747505976595687},{x:.01865919532569161,y:.7391477745883763},{x:.017522651058219416,y:.7303997530123288}]],"]":[[{x:.15250999999999998,y:-.06942399999999993},{x:.15337466238185463,y:-.0782030644907257},{x:.1559354210369921,y:-.08664475445642897},{x:.16009386744638546,y:-.09442466048588202},{x:.16569019484660535,y:-.10124380515339457},{x:.1725093395141179,y:-.10684013255361446},{x:.18028924554357095,y:-.11099857896300783},{x:.18873093550927422,y:-.1135593376181453},{x:.19751,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.19751,y:.804766},{x:.18873093550927422,y:.8039013376181453},{x:.18028924554357095,y:.8013405789630078},{x:.1725093395141179,y:.7971821325536145},{x:.16569019484660535,y:.7915858051533946},{x:.16009386744638546,y:.7847666604858821},{x:.1559354210369921,y:.776986754456429},{x:.15337466238185463,y:.7685450644907257},{x:.15250999999999998,y:.7597659999999999},{x:.15337466238185463,y:.7509869355092742},{x:.1559354210369921,y:.7425452455435709},{x:.16009386744638546,y:.7347653395141178},{x:.16569019484660535,y:.7279461948466053},{x:.1725093395141179,y:.7223498674463854},{x:.18028924554357095,y:.7181914210369921},{x:.18873093550927422,y:.7156306623818546},{x:.19751,y:.7147659999999999},{x:.35954200000000003,y:.7147659999999999},{x:.35954200000000003,y:-.024423999999999932},{x:.19751,y:-.024423999999999932},{x:.18873093550927422,y:-.025288662381854565},{x:.18028924554357095,y:-.027849421036992027},{x:.1725093395141179,y:-.03200786744638539},{x:.16569019484660535,y:-.03760419484660529},{x:.16009386744638546,y:-.04442333951411784},{x:.1559354210369921,y:-.052203245543570885},{x:.15337466238185463,y:-.06064493550927414},{x:.15250999999999998,y:-.06942399999999993}]],"^":[[{x:-.009830024293871129,y:.4771904357900641},{x:-.009184411720694952,y:.46839254975009553},{x:-.006834821991481832,y:.4598896653882279},{x:-.002871548521860348,y:.4520085437820153},{x:.002553102311361327,y:.44505205201500053},{x:.009230664218841726,y:.43928752416454453},{x:.016904522241296224,y:.4349364878031557},{x:.02527977431847106,y:.43216615081811305},{x:.034034564209935884,y:.43108297570612886},{x:.04283245024990444,y:.431728588279305},{x:.05133533461177206,y:.4340781780085181},{x:.05921645621798466,y:.4380414514781396},{x:.06617294798499941,y:.4434661023113613},{x:.30102423332324457,y:.6668931783680099},{x:.5358792969655858,y:.44346586927801307},{x:.5428358294884947,y:.4380412707099504},{x:.5507169808710617,y:.43407805645230807},{x:.5592198828854552,y:.4317285306064111},{x:.5680177737757447,y:.431082984132888},{x:.5767725555289304,y:.4321662250206897},{x:.5851477867919753,y:.43493662492998636},{x:.5928216121243246,y:.439287718945922},{x:.5994991307219868,y:.44505229696558585},{x:.6049237292900496,y:.45200882948849475},{x:.6088869435476919,y:.4598899808710617},{x:.6112364693935889,y:.4683928828854553},{x:.6118820158671119,y:.47719077377574476},{x:.6107987749793102,y:.4859455555289303},{x:.6080283750700135,y:.4943207867919753},{x:.6036772810540779,y:.5019946121243246},{x:.5979127030344141,y:.5086721307219868},{x:.33204070303441413,y:.7616071307219868},{x:.3294429315385385,y:.7636328335402047},{x:.3269493357811583,y:.7657854758354554},{x:.3259710287822201,y:.7663401706594313},{x:.32508417051150523,y:.7670317292900496},{x:.3221411194513825,y:.7685117087189752},{x:.3192754777587038,y:.7701365121968442},{x:.31820775306259985,y:.7704896904878621},{x:.3172030191289383,y:.7709949435476919},{x:.31402778830632944,y:.7718723248078522},{x:.310900225681529,y:.7729068491818869},{x:.30978411534954325,y:.7730449384962876},{x:.3087001171145447,y:.7733444693935889},{x:.30541472886927135,y:.7735855352151975},{x:.30214543579006414,y:.7739900242938711},{x:.3010238313163334,y:.7739077179367437},{x:.2999022262242552,y:.773990015867112},{x:.29663293618411596,y:.7735855022258356},{x:.2933475497500956,y:.7733444117206949},{x:.29226355376554153,y:.7730448726791859},{x:.29114744447106966,y:.7729067749793103},{x:.2880198896188706,y:.7718722271075298},{x:.28484466538822795,y:.7709948219914818},{x:.28383993525062523,y:.7704895613829726},{x:.2827722132080247,y:.7701363750700135},{x:.27990658372278143,y:.7685115500622604},{x:.2769635437820154,y:.7670315485218604},{x:.2760766907070934,y:.7663399832281829},{x:.2750983878756754,y:.765785281054078},{x:.27260480829144085,y:.7636326200241867},{x:.2700070520150006,y:.7616068976886387},{x:.004139052015000585,y:.5086718976886386},{x:-.001625475835455463,y:.5019943357811583},{x:-.0059765121968442594,y:.49432047775870375},{x:-.00874684918188691,y:.4859452256815289},{x:-.009830024293871129,y:.4771904357900641}]],_:[[{x:-.045,y:-.160601},{x:-.044135337618145365,y:-.16938006449072576},{x:-.041574578963007904,y:-.17782175445642903},{x:-.03741613255361454,y:-.1856016604858821},{x:-.03181980515339464,y:-.19242080515339463},{x:-.025000660485882086,y:-.19801713255361453},{x:-.017220754456429038,y:-.2021755789630079},{x:-.008779064490725769,y:-.20473633761814536},{x:0,y:-.20560099999999998},{x:.602052,y:-.20560099999999998},{x:.6108310644907258,y:-.20473633761814536},{x:.619272754456429,y:-.2021755789630079},{x:.6270526604858822,y:-.19801713255361453},{x:.6338718051533947,y:-.19242080515339463},{x:.6394681325536146,y:-.1856016604858821},{x:.6436265789630079,y:-.17782175445642903},{x:.6461873376181454,y:-.16938006449072576},{x:.6470520000000001,y:-.160601},{x:.6461873376181454,y:-.15182193550927423},{x:.6436265789630079,y:-.14338024554357096},{x:.6394681325536146,y:-.1356003395141179},{x:.6338718051533947,y:-.12878119484660536},{x:.6270526604858822,y:-.12318486744638546},{x:.619272754456429,y:-.1190264210369921},{x:.6108310644907258,y:-.11646566238185463},{x:.602052,y:-.115601},{x:0,y:-.115601},{x:-.00877906449072579,y:-.11646566238185463},{x:-.017220754456429066,y:-.1190264210369921},{x:-.025000660485882096,y:-.12318486744638546},{x:-.03181980515339464,y:-.12878119484660536},{x:-.03741613255361454,y:-.1356003395141179},{x:-.041574578963007904,y:-.14338024554357096},{x:-.044135337618145365,y:-.15182193550927423},{x:-.045,y:-.160601}]],a:[[{x:.029951000000000005,y:.25490100000000004},{x:.030216131121475042,y:.2522090785486062},{x:.03027571711850824,y:.2495047884160563},{x:.03064747136410999,y:.24782960757010103},{x:.03081566238185464,y:.24612193550927428},{x:.0316008669059687,y:.24353346308961055},{x:.0321868888075612,y:.2408927597850148},{x:.06949088880756119,y:.12701175978501478},{x:.07014919013856018,y:.12551652306247207},{x:.07061771774296957,y:.1239514111231075},{x:.07192248021942128,y:.12148874987750752},{x:.07304546130734973,y:.1189380599695235},{x:.0739828197765546,y:.11759998201998349},{x:.07474768294666384,y:.11615634846888903},{x:.07650781615341086,y:.11399555310027064},{x:.07810683439013419,y:.11171295672570881},{x:.07928722783725009,y:.11058345913436952},{x:.08031903331037206,y:.10931678199931477},{x:.15605303331037207,y:.033026781999314685},{x:.1581401110567553,y:.03130114899494214},{x:.16009013354595797,y:.02942202284781055},{x:.16153164054777758,y:.028496972085311937},{x:.16285166496406625,y:.027405552418137233},{x:.16523529439528092,y:.026120245637685162},{x:.16751444707429886,y:.024657656887915},{x:.24324744707429888,y:-.014037343112084925},{x:.24491821916217926,y:-.014693433733650136},{x:.24650124554357095,y:-.015539578963007873},{x:.24901423193062222,y:-.016301885049470277},{x:.2514585861893129,y:-.017261751399011975},{x:.25322525179064753,y:-.017579283958613606},{x:.2549429355092742,y:-.018100337618145335},{x:.2575563541074305,y:-.01835773688343746},{x:.2601410014196699,y:-.018822289810772906},{x:.26193566856615697,y:-.018789061710219754},{x:.263722,y:-.018964999999999968},{x:.376759,y:-.018964999999999968},{x:.3786816094876915,y:-.018775639493449434},{x:.3806133727303473,y:-.01879962736385296},{x:.3830607170270406,y:-.018344335046447002},{x:.3855380644907258,y:-.018100337618145335},{x:.3873867891740171,y:-.01753953311656589},{x:.3892861139289994,y:-.017186191753697247},{x:.3915976100664607,y:-.016262194563578608},{x:.3939797544564291,y:-.015539578963007873},{x:.3956835488825182,y:-.014628881868892333},{x:.3974774451646465,y:-.013911789983170525},{x:.4720844451646465,y:.0247832100168294},{x:.4742399118062311,y:.026185049737888398},{x:.4765030886255536,y:.02740538646642049},{x:.47792879308654873,y:.028584168427667152},{x:.47947957817165415,y:.02959274452399146},{x:.48132014276352414,y:.0313881589690925},{x:.48210100000000006,y:.032033776942416534},{x:.48210100000000006,y:.02603500000000003},{x:.4829656623818547,y:.01725593550927424},{x:.4855264210369921,y:.008814245543570985},{x:.4896848674463855,y:.0010343395141179344},{x:.4952811948466054,y:-.0057848051533946065},{x:.5021003395141179,y:-.01138113255361451},{x:.509880245543571,y:-.015539578963007873},{x:.5183219355092743,y:-.018100337618145335},{x:.527101,y:-.018964999999999968},{x:.5358800644907258,y:-.018100337618145335},{x:.544321754456429,y:-.015539578963007873},{x:.5521016604858822,y:-.011381132553614504},{x:.5589208051533947,y:-.0057848051533946065},{x:.5645171325536146,y:.0010343395141179344},{x:.5686755789630079,y:.008814245543570992},{x:.5712363376181454,y:.01725593550927426},{x:.5721010000000001,y:.02603500000000003},{x:.5721010000000001,y:.560059},{x:.5712363376181454,y:.5688380644907257},{x:.5686755789630079,y:.577279754456429},{x:.5645171325536146,y:.5850596604858821},{x:.5589208051533947,y:.5918788051533946},{x:.5521016604858822,y:.5974751325536145},{x:.544321754456429,y:.6016335789630078},{x:.5358800644907258,y:.6041943376181453},{x:.527101,y:.605059},{x:.5183219355092743,y:.6041943376181453},{x:.509880245543571,y:.6016335789630078},{x:.5021003395141179,y:.5974751325536145},{x:.4952811948466054,y:.5918788051533946},{x:.4896848674463855,y:.5850596604858821},{x:.4855264210369921,y:.577279754456429},{x:.4829656623818547,y:.5688380644907257},{x:.48210100000000006,y:.560059},{x:.48210100000000006,y:.5551612473179106},{x:.48111784979070266,y:.5559741116228759},{x:.47906658786156825,y:.5579287481398052},{x:.4777260461549398,y:.558778440075324},{x:.476502844006682,y:.5597897782764175},{x:.474008872962507,y:.5611345413953497},{x:.47161569478864906,y:.5626514387693977},{x:.3970086947886491,y:.6002454387693977},{x:.39545173243232984,y:.6008467903430146},{x:.3939797544564291,y:.6016335789630078},{x:.39134652561635536,y:.6024323601988234},{x:.3887796173011618,y:.6034237870938969},{x:.38713525366780027,y:.6037098355781862},{x:.3855380644907258,y:.6041943376181453},{x:.3827995979159321,y:.6044640530341434},{x:.3800885942320307,y:.6049356509696303},{x:.37842002129388747,y:.6048954036817589},{x:.376759,y:.605059},{x:.263722,y:.605059},{x:.26219504701733515,y:.604908608257877},{x:.26066140118579323,y:.6049547986330399},{x:.25781511370268967,y:.6044772224791067},{x:.2549429355092742,y:.6041943376181453},{x:.2534746624734083,y:.6037489418620853},{x:.2519614739213154,y:.6034950452430072},{x:.24926304753974865,y:.6024713624393285},{x:.24650124554357095,y:.6016335789630078},{x:.24514807736385555,y:.6009102955021357},{x:.24371349707866236,y:.6003660689935006},{x:.16798049707866233,y:.5627720689935006},{x:.1654642487594581,y:.5611982224645521},{x:.16285190958182658,y:.5597896123262998},{x:.16173267757498783,y:.5588642237445607},{x:.16050143578237863,y:.5580941146870384},{x:.15834057869520102,y:.5560596134829665},{x:.15605324108782545,y:.5541684273021619},{x:.08031924108782545,y:.47787942730216193},{x:.07924694249287094,y:.47656305714472025},{x:.07802357952480113,y:.4753857561141845},{x:.07646760484406812,y:.47315109973327435},{x:.07474784589903924,y:.4710398973462887},{x:.07395296229881854,y:.46953962579412084},{x:.07298278594430238,y:.4681462799973844},{x:.07189266871370663,y:.46565100631071576},{x:.07061782960809859,y:.46324486175923196},{x:.0701309079335922,y:.4616183434067253},{x:.06945120152585271,y:.46006249834135976},{x:.032147201525852716,y:.3450764983413597},{x:.031582343425880205,y:.34249647318004567},{x:.03081566238185464,y:.3399690644907258},{x:.030641204072877935,y:.33819775955415116},{x:.03026054307811779,y:.33645906634171463},{x:.03020987650767869,y:.3338184172918108},{x:.029951000000000005,y:.33119},{x:.029951000000000005,y:.25490100000000004}],[{x:.119951,y:.2620835578942187},{x:.119951,y:.3240730820964405},{x:.15174843963453788,y:.42208563822492473},{x:.21467365091165175,y:.4854719831046318},{x:.2742766075147511,y:.5150589999999999},{x:.3660620360389177,y:.5150589999999999},{x:.4245839309326211,y:.4855701837142105},{x:.48210100000000006,y:.4276323784447675},{x:.48210100000000006,y:.15956344905445352},{x:.4243936225653894,y:.10143318135145685},{x:.36578354074375496,y:.07103500000000003},{x:.2745522516182332,y:.07103500000000003},{x:.21486246778999646,y:.10153288315838035},{x:.15170083487400915,y:.1651582162341545},{x:.119951,y:.2620835578942187}]],b:[[{x:.03166000000000001,y:.04001500000000002},{x:.03252466238185464,y:.031235935509274233},{x:.0350854210369921,y:.022794245543570978},{x:.039243867446385465,y:.015014339514117927},{x:.04484019484660537,y:.008195194846605386},{x:.05165933951411792,y:.002598867446385482},{x:.05943924554357097,y:-.0015595789630078807},{x:.06788093550927424,y:-.004120337618145342},{x:.07666,y:-.0049849999999999756},{x:.08543906449072577,y:-.004120337618145342},{x:.09388075445642904,y:-.0015595789630078807},{x:.10166066048588211,y:.002598867446385489},{x:.10847980515339464,y:.008195194846605386},{x:.11407613255361454,y:.015014339514117927},{x:.1182345789630079,y:.022794245543570985},{x:.12079533761814537,y:.031235935509274254},{x:.12166,y:.04001500000000002},{x:.12166,y:.041388769861289504},{x:.12338630711141785,y:.04010106584896898},{x:.12512540667363178,y:.03853443023544684},{x:.12691331624345048,y:.03747016444054036},{x:.12858112311649333,y:.036226097502515},{x:.13069431360107225,y:.035219499067818724},{x:.13270563229917137,y:.034022247411931134},{x:.20674863229917137,y:-.0007227525880688923},{x:.20772794171481185,y:-.0010698043626217635},{x:.20864424554357097,y:-.0015595789630078669},{x:.21187816153300185,y:-.0025405766534664824},{x:.21506348921487128,y:-.003669406425619949},{x:.21609168791714548,y:-.0038187359083884913},{x:.21708593550927424,y:-.004120337618145342},{x:.22044909586509742,y:-.004451580001305548},{x:.22379344213248661,y:-.004937293022731791},{x:.22483101702188665,y:-.00488316156543817},{x:.225865,y:-.0049849999999999756},{x:.338045,y:-.0049849999999999756},{x:.33894984805462636,y:-.004895880245274822},{x:.33985755144997865,y:-.004948481373678995},{x:.343332465401001,y:-.004464230112452937},{x:.3468240644907258,y:-.004120337618145342},{x:.3476941397420575,y:-.003856403176165039},{x:.34859466384226984,y:-.0037309094409420443},{x:.351908335561611,y:-.0025780408502315546},{x:.35526575445642905,y:-.0015595789630078807},{x:.35606762040050133,y:-.0011309726863615623},{x:.35692635856942223,y:-.0008322067413783357},{x:.43209235856942224,y:.03391279325862169},{x:.4342218624454842,y:.03516383683568551},{x:.43645162164562873,y:.03622594356254809},{x:.4380158580934015,y:.037392738102356306},{x:.4396984532755396,y:.03838123120587913},{x:.4415429728374372,y:.04002368192832182},{x:.4435226810964235,y:.04150038501262054},{x:.5186856810964235,y:.11000138501262047},{x:.5200684051728882,y:.11153543836568303},{x:.5216038163727121,y:.1129166544997947},{x:.5230144082918019,y:.11480386048953693},{x:.5245918796416693,y:.11655397481445093},{x:.5256487561000858,y:.11832830784782436},{x:.5268852029038621,y:.11998252816661786},{x:.5279005150705119,y:.12210866485417524},{x:.5291062453835067,y:.12413290061668979},{x:.5297966590542814,y:.12607932670695898},{x:.530686625504748,y:.12794298045128052},{x:.567704625504748,y:.2301969804512806},{x:.5685418230641662,y:.23348712941632632},{x:.5695273376181453,y:.23673593550927427},{x:.5696276430094915,y:.2377543532384077},{x:.5698799976366801,y:.23874609563675617},{x:.5700592324586751,y:.24213635445346285},{x:.570392,y:.24551500000000004},{x:.570392,y:.314017},{x:.570065993218988,y:.3173270023951309},{x:.5699006262411136,y:.32064890697528625},{x:.569634437926433,y:.3217086568121163},{x:.5695273376181453,y:.3227960644907258},{x:.5685618455328773,y:.32597886535008125},{x:.5677515846008636,y:.32920467896823863},{x:.5307335846008636,y:.4324506789682387},{x:.5298196963817511,y:.43437967657309706},{x:.5291061063615623,y:.4363913954201699},{x:.5279358002551,y:.43835612690926706},{x:.5269566878799311,y:.4404227969757902},{x:.5256840310027916,y:.4421364386856148},{x:.5245916855370664,y:.44397028841230757},{x:.523060566435399,y:.4456689527415915},{x:.5216970801011935,y:.44750489697372575},{x:.5201145620561008,y:.4489373284986299},{x:.5186854393684929,y:.45052283528838016},{x:.44352243936849295,y:.5190228352883801},{x:.44134657552661755,y:.5206458300432604},{x:.43929971954126384,y:.5224287703137037},{x:.4378191137317927,y:.523276992839783},{x:.43645134158383936,y:.5242972253466508},{x:.43400065578620683,y:.5254645447348341},{x:.43164529517316985,y:.52681390451462},{x:.35647929517316984,y:.56056790451462},{x:.3558506134628383,y:.560778965311121},{x:.35526575445642905,y:.5610915789630079},{x:.351674330744245,y:.5621810254355277},{x:.34811645117964274,y:.5633754754766519},{x:.34745867349333664,y:.563459831081816},{x:.3468240644907258,y:.5636523376181454},{x:.3430891085149791,y:.5640201986736739},{x:.3393665669654169,y:.5644975898222324},{x:.3387049713307353,y:.5644519984974604},{x:.338045,y:.564517},{x:.225865,y:.564517},{x:.22507819619617456,y:.5644395065891945},{x:.22428916125732748,y:.5644893996719887},{x:.22069487882474298,y:.5640077875099223},{x:.21708593550927424,y:.5636523376181454},{x:.21632936813438544,y:.5634228354140474},{x:.21554576062305134,y:.5633178367349442},{x:.2121144991913443,y:.5621442688983362},{x:.20864424554357097,y:.5610915789630079},{x:.20794698905754733,y:.5607188876066144},{x:.20719892257093525,y:.5604630322059678},{x:.13315592257093525,y:.5267090322059678},{x:.13091775246116674,y:.5254099486077729},{x:.12858140317750869,y:.5242970714087468},{x:.1271119341080524,y:.5232009671819817},{x:.12552641140636125,y:.5222806946221156},{x:.12358468574515913,y:.5205699272235509},{x:.12166,y:.5191342684374534},{x:.12166,y:.7597659999999999},{x:.12079533761814537,y:.7685450644907257},{x:.1182345789630079,y:.776986754456429},{x:.11407613255361454,y:.7847666604858821},{x:.10847980515339464,y:.7915858051533946},{x:.10166066048588208,y:.7971821325536145},{x:.09388075445642904,y:.8013405789630078},{x:.08543906449072577,y:.8039013376181453},{x:.07666,y:.804766},{x:.06788093550927421,y:.8039013376181453},{x:.05943924554357094,y:.8013405789630078},{x:.05165933951411792,y:.7971821325536145},{x:.04484019484660537,y:.7915858051533946},{x:.039243867446385465,y:.7847666604858821},{x:.0350854210369921,y:.776986754456429},{x:.03252466238185464,y:.7685450644907257},{x:.03166000000000001,y:.7597659999999999},{x:.03166000000000001,y:.04001500000000002}],[{x:.12166,y:.16313400296117606},{x:.12166,y:.39738980161800674},{x:.17691400696537596,y:.447746357818324},{x:.23563826658076475,y:.474517},{x:.3284048540018634,y:.474517},{x:.3882155063572531,y:.44765846343288423},{x:.44979135555302596,y:.39154114946310603},{x:.480392,y:.30619363915535625},{x:.480392,y:.2534097446111891},{x:.44984564070758065,y:.16903221413717517},{x:.38802932067077023,y:.11269492399652684},{x:.3281476350434013,y:.08501500000000002},{x:.2358983461114888,y:.08501500000000002},{x:.1771018588393058,y:.11260550754658781},{x:.12166,y:.16313400296117606}]],c:[[{x:.0446,y:.25490100000000004},{x:.044822712444716174,y:.2526397626013558},{x:.04482893549381362,y:.2503675925637664},{x:.045254001037800355,y:.24826081602954003},{x:.045464662381854634,y:.24612193550927428},{x:.04612424100165128,y:.2439475961957434},{x:.04657362286091401,y:.24172029932495478},{x:.08145962286091402,y:.1278402993249547},{x:.08196610920465827,y:.1266269431042867},{x:.08230081253195312,y:.125355433994083},{x:.08366176737769918,y:.12256476567779218},{x:.08485778977199918,y:.11969953302126297},{x:.0855912581784792,y:.11860830168404396},{x:.08616758939694805,y:.11742652164475936},{x:.08804682625741464,y:.11495498435675963},{x:.08977884657839008,y:.1123781387363477},{x:.09071111026807865,y:.11145096769089737},{x:.09150692129220603,y:.11040433186669174},{x:.16233292129220603,y:.03411333186669174},{x:.16445877247754231,y:.03223237849112975},{x:.1664474797904295,y:.03020697184383589},{x:.16775479669311927,y:.029316055882572942},{x:.16893962068732413,y:.02826772347496185},{x:.17139158003796548,y:.02683764508339147},{x:.17373721213250964,y:.02523913360696181},{x:.24456521213250962,y:-.013455866393038113},{x:.2467886390083486,y:-.014400746043602006},{x:.24891924554357092,y:-.015539578963007873},{x:.25083834630720225,y:-.016121731815163746},{x:.25268405147305695,y:-.01690609278116076},{x:.2550490927002279,y:-.01739904776899966},{x:.2573609355092742,y:-.018100337618145335},{x:.259356733677244,y:-.018296906580526337},{x:.26131999536931183,y:-.018706117055345653},{x:.26373576373978486,y:-.0187282033967292},{x:.26614,y:-.018964999999999968},{x:.371854,y:-.018964999999999968},{x:.3744001776009888,y:-.018714223394882004},{x:.3769583677219744,y:-.018674567546095353},{x:.3787793796063011,y:-.01828290964379429},{x:.3806330644907258,y:-.018100337618145335},{x:.3830813939144215,y:-.01735764500708899},{x:.3855826926572475,y:-.01681967299983559},{x:.38729230564255435,y:-.01608027889939661},{x:.3890747544564291,y:-.015539578963007873},{x:.391331147776118,y:-.014333511606549179},{x:.393679431632842,y:-.013317897403369645},{x:.463449431632842,y:.02537710259663028},{x:.46566730315778443,y:.026909287408228903},{x:.46799586592077425,y:.028267352155161442},{x:.4692879686356918,y:.029410572352257962},{x:.47070743151062955,y:.03039118797094862},{x:.4725837728278355,y:.03232661755101331},{x:.4746026476214732,y:.03411286752390576},{x:.5454306476214732,y:.11040386752390575},{x:.5507700783887176,y:.11742598212342069},{x:.5546369668925095,y:.12535484002769406},{x:.5568827107762242,y:.13388573967401945},{x:.5574210073618384,y:.14269084337317217},{x:.5562311702134469,y:.15143177592795284},{x:.5533589241053942,y:.15977262820225266},{x:.5489146478448386,y:.16739286592077418},{x:.5430691324760942,y:.17399964762147313},{x:.5360470178765793,y:.17933907838871752},{x:.5281181599723059,y:.18320596689250943},{x:.5195872603259806,y:.1854517107762242},{x:.5107821566268278,y:.1859900073618383},{x:.5020412240720471,y:.18480017021344686},{x:.4937003717977473,y:.18192792410539416},{x:.4860801340792258,y:.17748364784483847},{x:.47947335237852684,y:.17163813247609414},{x:.41352572033101553,y:.10060392571412592},{x:.36021071976053953,y:.07103500000000003},{x:.27763077403847125,y:.07103500000000003},{x:.2233107097601157,y:.10071132697875086},{x:.16448866962379677,y:.16407213041308155},{x:.1346,y:.2616391113440561},{x:.1346,y:.3245158400933278},{x:.1645319520417492,y:.4231721923699009},{x:.2231207776861973,y:.4862793045993598},{x:.27734241586879393,y:.5150589999999999},{x:.3605019191882548,y:.5150589999999999},{x:.41371701660545657,y:.4863852380349392},{x:.47947395272027693,y:.4155592208902026},{x:.48608084903755494,y:.4097138350672089},{x:.4937011738972078,y:.40526970822380387},{x:.5020420824884065,y:.4023976256622846},{x:.5107830383716269,y:.4012079599048077},{x:.5195881315142611,y:.40174642913926084},{x:.5281189871247909,y:.40399234029494097},{x:.5360477692062626,y:.4078593842656568},{x:.5430697791097975,y:.41319895272027696},{x:.5489151649327911,y:.41980584903755497},{x:.5533592917761961,y:.42742617389720783},{x:.5562313743377155,y:.4357670824884066},{x:.5574210400951923,y:.4445080383716269},{x:.5568825708607392,y:.4533131315142611},{x:.5546366597050592,y:.4618439871247909},{x:.5507696157343432,y:.46977276920626265},{x:.5454300472797231,y:.4767947791097975},{x:.4746020472797231,y:.5530827791097974},{x:.47237947035514305,y:.5550491819442839},{x:.4702881116089302,y:.5571546051529963},{x:.469083054274185,y:.5579656532949738},{x:.4679951509624451,y:.5589281649327911},{x:.46543165406806053,y:.5604231806402761},{x:.46296973250196366,y:.5620801448811513},{x:.39319973250196366,y:.5996741448811513},{x:.39109075852725916,y:.6005560023370271},{x:.3890747544564291,y:.6016335789630078},{x:.38703122642603144,y:.6022534764138876},{x:.38506104886577136,y:.6030772968079529},{x:.3828205563795885,y:.6035307692082409},{x:.3806330644907258,y:.6041943376181453},{x:.3785078662851109,y:.6044036513718285},{x:.37641482574826585,y:.6048272797133635},{x:.3741289156203665,y:.604834940368031},{x:.371854,y:.605059},{x:.26614,y:.605059},{x:.26400488750824663,y:.6048487097743618},{x:.26185945318827825,y:.6048549475733314},{x:.2596259398913868,y:.6044174210783497},{x:.2573609355092742,y:.6041943376181453},{x:.2553078741931944,y:.60357154827667},{x:.25320244685788745,y:.6031591127457343},{x:.2510972070775077,y:.6022942563713519},{x:.24891924554357092,y:.6016335789630078},{x:.24702713339817148,y:.6006222239508241},{x:.24504262343928468,y:.5998069647561404},{x:.1742146234392847,y:.5622129647561404},{x:.17162525666515238,y:.5604936738034747},{x:.16894033563687538,y:.5589277936219744},{x:.16795812189104978,y:.5580587651214349},{x:.16686556037036515,y:.5573333247718834},{x:.16466136457832586,y:.5551419091149951},{x:.16233352162359432,y:.5530823147741101},{x:.09150752162359431,y:.47679431477411016},{x:.09067474586023959,y:.4756991081857825},{x:.08970182133886938,y:.4747262717047309},{x:.08801053269383365,y:.4721953272870651},{x:.08616805203977476,y:.4697722296898647},{x:.08556494203519081,y:.46853560069719197},{x:.08480050296804506,y:.467391648838166},{x:.08363547472152838,y:.4645793817614187},{x:.08230111970711389,y:.461843393160995},{x:.08195085264054901,y:.4605128647226562},{x:.08142427599227564,y:.4592417589140625},{x:.046538275992275634,y:.3442567589140625},{x:.04610669192420131,y:.34208755224892967},{x:.045464662381854634,y:.33997106449072584},{x:.04524807462900009,y:.3377720121321243},{x:.04481688692083,y:.3356047976316928},{x:.044816786846426454,y:.33339307378956023},{x:.0446,y:.33119200000000004},{x:.0446,y:.25490100000000004}]],d:[[{x:.03166100000000001,y:.24551500000000004},{x:.03199378652782141,y:.24213616168032864},{x:.032173060891358886,y:.2387457109778176},{x:.032425376075824915,y:.237754159461938},{x:.03252566238185464,y:.23673593550927427},{x:.03351123316568353,y:.23348694405135337},{x:.034348506941927405,y:.23019661460170962},{x:.0713675069419274,y:.12794261460170955},{x:.07225746993456125,y:.1260790095358921},{x:.0729478813145148,y:.12413263082247869},{x:.07415364826248581,y:.12210836405190925},{x:.07516899837159816,y:.11998219518580837},{x:.07640543228727825,y:.1183280219355851},{x:.07746229725612473,y:.11655373492181778},{x:.07903981058640837,y:.11480359733178996},{x:.08045044599662987,y:.11291636718401242},{x:.08198583537337678,y:.11153519469971836},{x:.08336853920306012,y:.1100011842405046},{x:.15853253920306012,y:.04150018424050468},{x:.16051177365736521,y:.04002385498013544},{x:.16235580937568672,y:.038381768082408986},{x:.16403890527939927,y:.03739293492543645},{x:.16560363358955885,y:.03622578962650935},{x:.16783285515961555,y:.03516395710594637},{x:.16996181351033893,y:.03391317596960988},{x:.24512381351033893,y:-.0008318240303901436},{x:.24598297689097734,y:-.0011307574341723537},{x:.24678524554357095,y:-.0015595789630078807},{x:.25014222995258023,y:-.0025779090504023904},{x:.2534554494825366,y:-.0037306956028641883},{x:.25435642329373365,y:-.003856270624521421},{x:.2552269355092742,y:-.004120337618145342},{x:.2587180827488419,y:-.0044641856090968535},{x:.2621925371943035,y:-.004948444626188875},{x:.2631006975177666,y:-.004895835488062085},{x:.264006,y:-.0049849999999999756},{x:.376189,y:-.0049849999999999756},{x:.37722298297811335,y:-.004883161565438171},{x:.3782605578675134,y:-.004937293022731791},{x:.3816049041349026,y:-.004451580001305548},{x:.3849680644907258,y:-.004120337618145342},{x:.3859623120828546,y:-.003818735908388489},{x:.38699051078512875,y:-.003669406425619949},{x:.39017583846699794,y:-.0025405766534665605},{x:.39340975445642906,y:-.0015595789630078807},{x:.39432605828518835,y:-.0010698043626217065},{x:.39530536770082864,y:-.0007227525880688923},{x:.46934836770082866,y:.034022247411931134},{x:.4713599418403825,y:.035219651121148166},{x:.4734733873673339,y:.03622640539423388},{x:.4751409393435705,y:.037470316580519136},{x:.4769285933263682,y:.03853443023544684},{x:.47866791375766776,y:.04010126481479184},{x:.480392,y:.041387347763641016},{x:.480392,y:.04001500000000002},{x:.4812566623818546,y:.031235935509274233},{x:.48381742103699205,y:.022794245543570978},{x:.48797586744638544,y:.015014339514117927},{x:.4935721948466053,y:.008195194846605386},{x:.5003913395141178,y:.002598867446385482},{x:.508171245543571,y:-.0015595789630078807},{x:.5166129355092742,y:-.004120337618145342},{x:.525392,y:-.0049849999999999756},{x:.5341710644907257,y:-.004120337618145342},{x:.542612754456429,y:-.0015595789630078807},{x:.5503926604858821,y:.002598867446385489},{x:.5572118051533946,y:.008195194846605386},{x:.5628081325536145,y:.015014339514117927},{x:.5669665789630078,y:.022794245543570985},{x:.5695273376181453,y:.031235935509274254},{x:.570392,y:.04001500000000002},{x:.570392,y:.7597659999999999},{x:.5695273376181453,y:.7685450644907257},{x:.5669665789630078,y:.776986754456429},{x:.5628081325536145,y:.7847666604858821},{x:.5572118051533946,y:.7915858051533946},{x:.5503926604858821,y:.7971821325536145},{x:.542612754456429,y:.8013405789630078},{x:.5341710644907257,y:.8039013376181453},{x:.525392,y:.804766},{x:.5166129355092742,y:.8039013376181453},{x:.508171245543571,y:.8013405789630078},{x:.5003913395141178,y:.7971821325536145},{x:.4935721948466053,y:.7915858051533946},{x:.48797586744638544,y:.7847666604858821},{x:.48381742103699205,y:.776986754456429},{x:.4812566623818546,y:.7685450644907257},{x:.480392,y:.7597659999999999},{x:.480392,y:.5191356905079497},{x:.47846953719699326,y:.5205697307992189},{x:.47652758859363875,y:.5222806946221157},{x:.47494232329576636,y:.5232008177790934},{x:.47347310730786674,y:.524296763521154},{x:.4711365045177018,y:.5254097994515352},{x:.46889807742906475,y:.5267090322059679},{x:.3948550774290648,y:.5604630322059679},{x:.3941070109424522,y:.5607188876066146},{x:.39340975445642906,y:.5610915789630079},{x:.389939500808656,y:.5621442688983361},{x:.38650823937694867,y:.5633178367349442},{x:.38572463186561456,y:.5634228354140474},{x:.3849680644907258,y:.5636523376181454},{x:.38135912117525683,y:.5640077875099224},{x:.3777648387426725,y:.5644893996719887},{x:.3769758038038255,y:.5644395065891945},{x:.376189,y:.564517},{x:.264006,y:.564517},{x:.26334558239453953,y:.5644519545432365},{x:.2626835384795895,y:.5644975635305632},{x:.2589614482177297,y:.5640201550156564},{x:.2552269355092742,y:.5636523376181454},{x:.25459189738202526,y:.5634597009082802},{x:.2539336765832372,y:.5633752751711479},{x:.2503762430229788,y:.5621808961392286},{x:.24678524554357095,y:.5610915789630079},{x:.24619999105363047,y:.5607787539207695},{x:.24557088842716707,y:.5605675378929096},{x:.17040888842716706,y:.5268135378929095},{x:.16805407047382528,y:.5254644267942322},{x:.16560391365212207,y:.5242973792806265},{x:.16423565717286473,y:.5232767996121171},{x:.1627545512703112,y:.5224282514648534},{x:.16070817900232118,y:.5206456609648356},{x:.15853278093215223,y:.5190230360586235},{x:.08336878093215222,y:.45052303605862365},{x:.08193967718325436,y:.44893757139643337},{x:.08035717944512263,y:.44750518296134467},{x:.07899365114577664,y:.44566921514174185},{x:.07746249136223225,y:.4439705283033309},{x:.07637015625263606,y:.44213672358948825},{x:.0750975108858587,y:.44042312810321155},{x:.07411836195358443,y:.43835642671545355},{x:.07294802033824888,y:.4363916652130956},{x:.07223443169362759,y:.4343799925343442},{x:.07132054574594202,y:.4324510425104215},{x:.034301545745942026,y:.32920504251042143},{x:.033491210284420626,y:.32597904935505284},{x:.03252566238185464,y:.3227960644907258},{x:.03241858101312289,y:.3217088491086539},{x:.03215243067755317,y:.32064928896150824},{x:.031987025628206905,y:.31732719375391183},{x:.03166100000000001,y:.314017},{x:.03166100000000001,y:.24551500000000004}],[{x:.121661,y:.25340994514221},{x:.121661,y:.3061934402169761},{x:.15226243948714763,y:.39154086238640384},{x:.21383969339611897,y:.4476587099299689},{x:.27364661400534074,y:.474517},{x:.3664157334192352,y:.474517},{x:.42513971513426946,y:.4477464845048247},{x:.480392,y:.3973901578243758},{x:.480392,y:.1631336467554691},{x:.4249518651426514,y:.1126053780239199},{x:.3661556538885112,y:.08501500000000002},{x:.2739038430667855,y:.08501500000000002},{x:.21402588591940364,y:.11269467351967463},{x:.15220815290195538,y:.1690325018607451},{x:.121661,y:.25340994514221}]],e:[[{x:.014571,y:.25490100000000004},{x:.014880046743786594,y:.2517631957525991},{x:.01501248842711947,y:.2486129918567585},{x:.015311525398480692,y:.24738231945287367},{x:.015435662381854634,y:.24612193550927428},{x:.016350926120166094,y:.24310471531940006},{x:.01709539726614681,y:.24004087979874045},{x:.05693639726614681,y:.12616087979874036},{x:.057746546207777846,y:.12441615547982068},{x:.05835851556287996,y:.12259245107255745},{x:.05959975008908581,y:.12042512406141898},{x:.06065161969764369,y:.11815983382640528},{x:.06178658068373706,y:.11660668611395116},{x:.06274257829935428,y:.11493741297405176},{x:.06438278737670251,y:.11305388338712186},{x:.06585638180708843,y:.11103732964943176},{x:.06727253892344205,y:.10973544513901749},{x:.06853582634733585,y:.1082847524971091},{x:.14942282634733584,y:.031993752497109104},{x:.15144602889400902,y:.03043003785468449},{x:.15333307828862142,y:.02870446646813117},{x:.1549277151407192,y:.027739074573098352},{x:.15640262843323158,y:.02659912765300345},{x:.15869202130341495,y:.025460166585296706},{x:.1608794538505091,y:.024135896643135493},{x:.2417664538505091,y:-.01455910335686443},{x:.24290092295632487,y:-.014970686687880902},{x:.2439652455435709,y:-.015539578963007873},{x:.24703931387581265,y:-.016472087396775758},{x:.2500591116803148,y:-.017567664555291233},{x:.2512520782049556,y:-.01775001548484057},{x:.2524069355092742,y:-.018100337618145335},{x:.25560385985111694,y:-.01841520718300011},{x:.2587793695882151,y:-.01890059980751419},{x:.2599849884971624,y:-.018846710691637396},{x:.261186,y:-.018964999999999968},{x:.381914,y:-.018964999999999968},{x:.3832466926412995,y:-.01883374123151461},{x:.3845848263549422,y:-.018885671038862982},{x:.3876272824249201,y:-.01840229079619376},{x:.39069306449072577,y:-.018100337618145335},{x:.3919745425012029,y:-.017711605513551366},{x:.39329709535359264,y:-.017501480567117658},{x:.39618678867610163,y:-.016433834605858122},{x:.39913475445642904,y:-.015539578963007873},{x:.4003157713548023,y:-.014908312279081314},{x:.40157191838151796,y:-.014444207562717595},{x:.48125191838151804,y:.02425079243728233},{x:.4833189661071789,y:.02551885102394819},{x:.4854901362659954,y:.026598980192539007},{x:.48706966813422276,y:.027819770278194},{x:.48877129863032925,y:.028863658687316496},{x:.4905512426555404,y:.030510612890229178},{x:.492469971641239,y:.03199356196515255},{x:.573357971641239,y:.10828456196515254},{x:.5791512607417543,y:.11493718669263933},{x:.5835353707163221,y:.12259219773755695},{x:.5863418226772573,y:.13095541731842886},{x:.5874627662495775,y:.13970545159690978},{x:.5868551242004307,y:.1485060416627534},{x:.584542247872996,y:.15701898577515713},{x:.5806130198074609,y:.16491713626599536},{x:.5752184380348474,y:.17189697164123896},{x:.5685658133073607,y:.17769026074175415},{x:.560910802262443,y:.1820743707163221},{x:.5525475826815711,y:.18488082267725728},{x:.5437975484030901,y:.18600176624957743},{x:.5349969583372466,y:.1853941242004306},{x:.5264840142248428,y:.183081247872996},{x:.5185858637340046,y:.17915201980746093},{x:.511606028358761,y:.17375743803484736},{x:.43573388395098006,y:.1021972341849065},{x:.3715652104827451,y:.07103500000000003},{x:.2713955768569904,y:.07103500000000003},{x:.2060606884620834,y:.10229012760321096},{x:.13826613078700495,y:.16623259795801962},{x:.104571,y:.2625454790108076},{x:.104571,y:.28619200000000006},{x:.542482,y:.28619200000000006},{x:.5512610644907258,y:.2870566623818547},{x:.559702754456429,y:.2896174210369921},{x:.5674826604858821,y:.2937758674463855},{x:.5743018051533947,y:.2993721948466054},{x:.5798981325536146,y:.3061913395141179},{x:.5840565789630079,y:.31397124554357103},{x:.5866173376181454,y:.32241293550927425},{x:.5874820000000001,y:.33119200000000004},{x:.5866173376181454,y:.33997106449072584},{x:.5840565789630079,y:.34841275445642905},{x:.5798981325536146,y:.35619266048588216},{x:.5743018051533947,y:.3630118051533947},{x:.5674826604858821,y:.3686081325536146},{x:.5660433240263831,y:.3693774739195968},{x:.5706944449992851,y:.3724210772554575},{x:.5769918122169339,y:.3785986803904119},{x:.5819629867044116,y:.38588613801169297},{x:.5854169290140312,y:.3940033972097681},{x:.5872209060798271,y:.40263851626586683},{x:.5873055920748429,y:.4114596523972937},{x:.5856677325637826,y:.4201278142894682},{x:.5823702695691338,y:.4283098893420352},{x:.5425292695691338,y:.5045998893420351},{x:.54083893518448,y:.5071829952333479},{x:.5393041274419548,y:.5098614335042745},{x:.5384286685906833,y:.5108662746451583},{x:.5376989227445426,y:.5119814449992851},{x:.5355371287009763,y:.5141851493557908},{x:.5335092744740836,y:.5165126960496618},{x:.49246227447408364,y:.5552086960496617},{x:.4903478252727746,y:.5568421196453192},{x:.48836639942178184,y:.5586345815458318},{x:.486865329057947,y:.5595323670561179},{x:.4854811710293013,y:.5606016367187369},{x:.48308868524123094,y:.5617911659624512},{x:.4807956399629947,y:.5631626292028359},{x:.40111563996299465,y:.6007566292028359},{x:.40009264564938235,y:.6011215754533451},{x:.39913475445642904,y:.6016335789630078},{x:.3959457374462889,y:.6026009566970012},{x:.3928069722488333,y:.6037206897930685},{x:.3917324370025758,y:.603879047413643},{x:.39069306449072577,y:.6041943376181453},{x:.38737659751458814,y:.6045209811048129},{x:.38407969371999856,y:.6050068561303112},{x:.38299491132800306,y:.6049525395264004},{x:.381914,y:.605059},{x:.261186,y:.605059},{x:.26023449599616577,y:.6049652850353624},{x:.2592798763752433,y:.6050186117946668},{x:.25585213857488087,y:.6045336605029273},{x:.2524069355092742,y:.6041943376181453},{x:.2514919972706982,y:.6039167941377678},{x:.2505453168634681,y:.6037828591890964},{x:.24727805138745723,y:.6026385076291858},{x:.2439652455435709,y:.6016335789630078},{x:.24312203363365809,y:.6011828728071931},{x:.24221967283726598,y:.6008668231955117},{x:.161332672837266,y:.5632728231955116},{x:.15891596978001063,y:.5618462817840929},{x:.15640337688314435,y:.5605963413854953},{x:.1551260781006526,y:.5596091689500753},{x:.15373589412748892,y:.5587885654418143},{x:.1516439317651508,y:.5569179592459522},{x:.1494234689111216,y:.555201853544281},{x:.06853646891112161,y:.47891385354428107},{x:.06722863655802509,y:.4774120673763562},{x:.06576662511800205,y:.47605991734502884},{x:.06433886916992998,y:.4740937424536807},{x:.06274309028364713,y:.4722613067803989},{x:.06175337150959475,y:.4705332315776763},{x:.06058324359446483,y:.4689218384474283},{x:.05956650326928079,y:.4667149016876259},{x:.05835887729241062,y:.4646063547351938},{x:.05772530643484857,y:.4627183994585984},{x:.05689202940417486,y:.4609096881637455},{x:.017051029404174856,y:.3459246881637455},{x:.016331419439147486,y:.342923979771159},{x:.015435662381854634,y:.33997106449072584},{x:.015304912520774374,y:.33864353887302173},{x:.014993833838408223,y:.33734636893611664},{x:.014873460143664087,y:.33426292937408214},{x:.014571,y:.33119200000000004},{x:.014571,y:.25490100000000004}],[{x:.12278767041868709,y:.376192},{x:.13831799224413532,y:.421014018902617},{x:.20587340146207272,y:.4847284236699839},{x:.27113246747276615,y:.5150589999999999},{x:.37183117966561724,y:.5150589999999999},{x:.4359272756482788,y:.48481767680255794},{x:.4662598881310508,y:.45622238914125884},{x:.5025937304308662,y:.3866481106579649},{x:.5074240772554575,y:.379266555000715},{x:.5104401600015575,y:.376192},{x:.12278767041868709,y:.376192}]],f:[[{x:.044112,y:.5239119999999999},{x:.04497666238185463,y:.5151329355092742},{x:.04753742103699209,y:.5066912455435709},{x:.051695867446385456,y:.4989113395141178},{x:.05729219484660536,y:.49209219484660527},{x:.0641113395141179,y:.4864958674463854},{x:.07189124554357096,y:.482337421036992},{x:.08033293550927423,y:.47977666238185457},{x:.089112,y:.47891199999999995},{x:.20304699999999998,y:.47891199999999995},{x:.20304699999999998,y:.05318299999999998},{x:.20391166238185462,y:.04440393550927419},{x:.2064724210369921,y:.03596224554357094},{x:.21063086744638546,y:.028182339514117884},{x:.21622719484660535,y:.021363194846605343},{x:.2230463395141179,y:.01576686744638544},{x:.23082624554357095,y:.011608421036992077},{x:.23926793550927422,y:.009047662381854615},{x:.248047,y:.008182999999999982},{x:.25682606449072576,y:.009047662381854615},{x:.26526775445642903,y:.011608421036992077},{x:.2730476604858821,y:.015766867446385446},{x:.2798668051533946,y:.021363194846605343},{x:.28546313255361455,y:.028182339514117884},{x:.2896215789630079,y:.03596224554357094},{x:.2921823376181454,y:.04440393550927421},{x:.293047,y:.05318299999999998},{x:.293047,y:.47891199999999995},{x:.459965,y:.47891199999999995},{x:.4687440644907258,y:.47977666238185457},{x:.4771857544564291,y:.482337421036992},{x:.48496566048588213,y:.4864958674463854},{x:.4917848051533946,y:.49209219484660527},{x:.49738113255361455,y:.4989113395141178},{x:.5015395789630079,y:.5066912455435709},{x:.5041003376181454,y:.5151329355092742},{x:.504965,y:.5239119999999999},{x:.5041003376181454,y:.5326910644907257},{x:.5015395789630079,y:.5411327544564289},{x:.49738113255361455,y:.548912660485882},{x:.4917848051533946,y:.5557318051533946},{x:.48496566048588213,y:.5613281325536145},{x:.4771857544564291,y:.5654865789630078},{x:.4687440644907258,y:.5680473376181453},{x:.459965,y:.568912},{x:.293047,y:.568912},{x:.293047,y:.6141229501499061},{x:.3322669208002554,y:.6884371453882767},{x:.4140490730325775,y:.7147659999999999},{x:.512941,y:.7147659999999999},{x:.5217200644907257,y:.7156306623818546},{x:.530161754456429,y:.7181914210369921},{x:.5379416604858821,y:.7223498674463854},{x:.5447608051533946,y:.7279461948466053},{x:.5503571325536145,y:.7347653395141178},{x:.5545155789630078,y:.7425452455435709},{x:.5570763376181453,y:.7509869355092742},{x:.557941,y:.7597659999999999},{x:.5570763376181453,y:.7685450644907257},{x:.5545155789630078,y:.776986754456429},{x:.5503571325536145,y:.7847666604858821},{x:.5447608051533946,y:.7915858051533946},{x:.5379416604858821,y:.7971821325536145},{x:.530161754456429,y:.8013405789630078},{x:.5217200644907257,y:.8039013376181453},{x:.512941,y:.804766},{x:.406984,y:.804766},{x:.40440576588043703,y:.8045120661033809},{x:.40181542834229744,y:.8044681908525655},{x:.400026512750784,y:.8040807473169851},{x:.3982049355092742,y:.8039013376181453},{x:.39572578148103565,y:.8031492944655273},{x:.39319377618916257,y:.8026009124809075},{x:.2872357761891626,y:.7684889124809076},{x:.28342960508890525,y:.7668362808879404},{x:.2796044085190959,y:.7652281761559891},{x:.27938594032962494,y:.7650805300410848},{x:.27914407460343155,y:.764975512444704},{x:.2757334504432472,y:.7626120885587936},{x:.27229547962292316,y:.7602886242777711},{x:.2721100135665551,y:.7601011941121303},{x:.27189328313916555,y:.7599510087370087},{x:.2690092742928275,y:.7569676176126634},{x:.26609064851257996,y:.7540180832118794},{x:.26594531194585036,y:.7537980718316557},{x:.26576204564604555,y:.7536084902175343},{x:.26351548295615396,y:.7501197819025626},{x:.26122836336792754,y:.7466575263349163},{x:.2082493633679275,y:.6462725263349164},{x:.20745880379789322,y:.6443351468057326},{x:.2064724210369921,y:.6424897544564291},{x:.20579637196662365,y:.6402611193438609},{x:.20491647908027386,y:.6381048157198157},{x:.20451907388691828,y:.636050431873947},{x:.20391166238185462,y:.6340480644907258},{x:.20368338854657433,y:.6317303613460921},{x:.20324107652369047,y:.6294438319050109},{x:.20325209776572678,y:.6273513925615422},{x:.20304699999999998,y:.6252690000000001},{x:.20304699999999998,y:.568912},{x:.089112,y:.568912},{x:.0803329355092742,y:.5680473376181453},{x:.07189124554357093,y:.5654865789630078},{x:.0641113395141179,y:.5613281325536145},{x:.05729219484660536,y:.5557318051533946},{x:.051695867446385456,y:.548912660485882},{x:.04753742103699209,y:.5411327544564289},{x:.04497666238185463,y:.5326910644907257},{x:.044112,y:.5239119999999999}]],g:[[{x:.03166100000000001,y:.285331},{x:.03199195389402992,y:.28197076872347165},{x:.03216742697517915,y:.27859884139484714},{x:.032423533978450624,y:.2775888625904497},{x:.03252566238185464,y:.2765519355092742},{x:.03350580569139788,y:.2733208360362635},{x:.034335737494852386,y:.2700479324456657},{x:.07135573749485238,y:.1675239324456658},{x:.07223945098422414,y:.16566943556296815},{x:.07292365731738822,y:.16373243532732273},{x:.07413231799188957,y:.16169720247238553},{x:.07515058411631778,y:.15956034321175439},{x:.07637911169281072,y:.15791388391586245},{x:.07742806119285411,y:.15614758463046624},{x:.07901055202445481,y:.15438725620434748},{x:.0804261330120869,y:.15249010996133996},{x:.08195226304990277,y:.15111496075964967},{x:.08332564517579637,y:.14958724031548856},{x:.1584886451757964,y:.08090524031548854},{x:.16047116284778873,y:.07942238349974136},{x:.16231838489394151,y:.07777404756068641},{x:.16399482319868336,y:.07678680357956279},{x:.16555276842115366,y:.07562151273533077},{x:.16778648358567103,y:.07455391860853194},{x:.1699197861673149,y:.07329763012616651},{x:.2450797861673149,y:.038459630126166475},{x:.2459605302529857,y:.0381521715215269},{x:.24678324554357095,y:.03771242103699209},{x:.2501181687545519,y:.03670078314085588},{x:.253408434365457,y:.03555218561964517},{x:.254332237398671,y:.03542245939316866},{x:.2552249355092742,y:.03515166238185463},{x:.2586931398688001,y:.03481007406735549},{x:.26214426420887293,y:.034325445502994434},{x:.2630756249571383,y:.03437843696081321},{x:.264004,y:.034287},{x:.376189,y:.034287},{x:.37724627227682206,y:.03439113223027483},{x:.37830727432005307,y:.03433688416138392},{x:.3816280756224084,y:.03482270219101675},{x:.3849680644907258,y:.03515166238185463},{x:.38598470638687477,y:.035460057329467706},{x:.38703590484658207,y:.03561384285228289},{x:.39019811948723343,y:.036738182220129235},{x:.39340975445642906,y:.03771242103699209},{x:.39434669699397534,y:.038213227257056566},{x:.39534769490287125,y:.03856913648017993},{x:.4693886949028713,y:.07340713648017996},{x:.47140406041677185,y:.07460963544760885},{x:.47352148667564636,y:.07562166704766733},{x:.4751827197672129,y:.0768642309221422},{x:.47696422705836306,y:.07792719476830276},{x:.47870627197824944,y:.0794997663623443},{x:.480392,y:.08076065187723735},{x:.480392,y:.018480463023952315},{x:.44982106300216956,y:-.06618482166306154},{x:.42509763890365326,y:-.0887666681923909},{x:.3663917896728536,y:-.115601},{x:.27366828971008494,y:-.115601},{x:.21388478385740822,y:-.08868092320279419},{x:.15228882603575622,y:-.032396134475538775},{x:.11903308523020223,y:.0605977685009861},{x:.11526275900748023,y:.06857299605517989},{x:.11000898883421664,y:.07565942769130271},{x:.1034736741518217,y:.08158473581569503},{x:.09590796343849313,y:.08612121416008753},{x:.08760260271404471,y:.08909452840579157},{x:.07887676233341709,y:.09039041575379858},{x:.07006577144893004,y:.08995907598006667},{x:.061508231499013855,y:.08781708523020218},{x:.05353300394482007,y:.08404675900748018},{x:.046446572308697254,y:.07879298883421659},{x:.04052126418430494,y:.07225767415182165},{x:.035984785839912437,y:.06469196343849308},{x:.03301147159420839,y:.05638660271404467},{x:.03171558424620138,y:.04766076233341703},{x:.0321469240199333,y:.038849771448930016},{x:.03428891476979778,y:.030292231499013812},{x:.07130891476979778,y:-.07322776850098624},{x:.07221644299685706,y:-.07514742841768875},{x:.07292365731738822,y:-.07714956467267746},{x:.07409706350042253,y:-.07912543338941479},{x:.07507924099251978,y:-.08120299605518004},{x:.07634383839048098,y:-.08290872027080634},{x:.07742806119285414,y:-.08473441536953392},{x:.07896439356931816,y:-.08644339813281518},{x:.08033301116578337,y:-.08828942769130284},{x:.0819060799658371,y:-.08971566618082738},{x:.08332564517579637,y:-.09129475968451163},{x:.1584886451757964,y:-.15997675968451153},{x:.16066766565506738,y:-.1616065940183929},{x:.16271768036753925,y:-.16339598773796155},{x:.16419165994754753,y:-.1642424237156923},{x:.16555276842115366,y:-.1652604872646693},{x:.16800788453794988,y:-.16643389898185532},{x:.17036760218951646,y:-.1677889719724602},{x:.24552760218951647,y:-.2016329719724602},{x:.24617798725770038,y:-.20185206166908357},{x:.24678324554357095,y:-.2021755789630079},{x:.2503526828238078,y:-.20325835592431216},{x:.25388756161766735,y:-.20444912053505218},{x:.25456819199860076,y:-.20453711665220192},{x:.2552249355092742,y:-.20473633761814536},{x:.25893702635910487,y:-.20510194665533446},{x:.2626362900994872,y:-.20558021041579141},{x:.263321009549333,y:-.20553373131203426},{x:.264004,y:-.20560099999999998},{x:.376189,y:-.20560099999999998},{x:.3769985938815523,y:-.20552126196245651},{x:.37781053527049396,y:-.2055717752142049},{x:.38138177137190815,y:-.20508955666026785},{x:.3849680644907258,y:-.20473633761814536},{x:.3857465461334356,y:-.20450018779358015},{x:.38655274094280934,y:-.2043913285403334},{x:.3899612805709507,y:-.2032216620796743},{x:.39340975445642906,y:-.2021755789630079},{x:.39412720724734457,y:-.20179209245674457},{x:.39489667386274535,y:-.20152804409855607},{x:.4689376738627454,y:-.16768404409855608},{x:.471176129388074,y:-.16638175223486265},{x:.4735129313995788,y:-.16526550692304898},{x:.47497970384913024,y:-.16416890323360386},{x:.4765626813675205,y:-.163247956304222},{x:.47850406105855325,y:-.16153398660426738},{x:.480578193417323,y:-.15998330217620907},{x:.5187211934173229,y:-.125144302176209},{x:.5200982241105119,y:-.12361318710120846},{x:.5216280341275545,y:-.12223470670068204},{x:.5230406381933351,y:-.12034152832018923},{x:.5246201913815024,y:-.1185852292702623},{x:.52567205708302,y:-.11681488878073784},{x:.5269035440443172,y:-.11516444436572898},{x:.5279196645391884,y:-.1130320574948894},{x:.5291262301085498,y:-.11100134969861394},{x:.5298125082093796,y:-.10905981698676002},{x:.5306983467616347,y:-.10720083421055714},{x:.5677173467616347,y:-.0046778342105572215},{x:.5685472301626403,y:-.001405045768812418},{x:.5695273376181453,y:.0018259355092742052},{x:.5696294781899907,y:.002862986138707272},{x:.5698856101392306,y:.003873086692614168},{x:.5700610582123972,y:.007244891642088324},{x:.570392,y:.010604999999999976},{x:.570392,y:.560059},{x:.5695273376181453,y:.5688380644907257},{x:.5669665789630078,y:.577279754456429},{x:.5628081325536145,y:.5850596604858821},{x:.5572118051533946,y:.5918788051533946},{x:.5503926604858821,y:.5974751325536145},{x:.542612754456429,y:.6016335789630078},{x:.5341710644907257,y:.6041943376181453},{x:.525392,y:.605059},{x:.5166129355092742,y:.6041943376181453},{x:.508171245543571,y:.6016335789630078},{x:.5003913395141178,y:.5974751325536145},{x:.4935721948466053,y:.5918788051533946},{x:.48797586744638544,y:.5850596604858821},{x:.48381742103699205,y:.577279754456429},{x:.4812566623818546,y:.5688380644907257},{x:.480392,y:.560059},{x:.480392,y:.5595783858718113},{x:.47850787544975776,y:.5609876460911735},{x:.47656308903374583,y:.5627046621197919},{x:.47498407852937236,y:.5636233247252487},{x:.47352120750708176,y:.5647175018259646},{x:.47118052218859596,y:.5658362200595997},{x:.46893813108831367,y:.5671408350985324},{x:.39489713108831365,y:.6009858350985324},{x:.39412742928685096,y:.6012499737741558},{x:.39340975445642906,y:.6016335789630078},{x:.38996152003118717,y:.6026795894402057},{x:.3865532301567984,y:.60384921275647},{x:.38574678706033977,y:.6039581147092028},{x:.3849680644907258,y:.6041943376181453},{x:.38138202040224084,y:.6045475321329209},{x:.37781103767268465,y:.6050297570960106},{x:.3769988444371686,y:.6049792372848822},{x:.376189,y:.605059},{x:.264004,y:.605059},{x:.2633207613423033,y:.6049917068657756},{x:.2626357925427961,y:.6050381952835313},{x:.25893677979996554,y:.6045599223713788},{x:.2552249355092742,y:.6041943376181453},{x:.25456795333002863,y:.6039950442528821},{x:.2538870765735461,y:.6039070086250592},{x:.2503524457397967,y:.6027162840056636},{x:.24678324554357095,y:.6016335789630078},{x:.24617776729948443,y:.6013099440989677},{x:.24552714829793862,y:.6010907675853725},{x:.17036714829793861,y:.5672457675853725},{x:.16800780172583518,y:.5658908729822889},{x:.16555304759050302,y:.5647176561362495},{x:.1641916021742222,y:.563699355958929},{x:.16271727507130354,y:.5628526987282604},{x:.16066758950642807,y:.5610635523625588},{x:.15848888603577402,y:.5594339797745099},{x:.08332588603577401,y:.49075297977450993},{x:.08190615458499984,y:.48917372437901785},{x:.08033291862515302,y:.48774732555289924},{x:.07896444452212992,y:.48590147772545017},{x:.07742825448734617,y:.4841926782200152},{x:.07634390022195357,y:.48236679190821125},{x:.07507917015624571,y:.48066087782555583},{x:.0740970979464375,y:.4785835213931001},{x:.07292379561819572,y:.47660786018244516},{x:.07221648966449083,y:.47460551074132296},{x:.0713088683600783,y:.4726856387236396},{x:.034288868360078294,y:.36916463872363964},{x:.03348577523186824,y:.3659561323879453},{x:.03252566238185464,y:.3627910644907258},{x:.0324167369020588,y:.3616851255348066},{x:.032146903820267865,y:.36060709221327164},{x:.03198519043554786,y:.35730356073015046},{x:.03166100000000001,y:.354012},{x:.03166100000000001,y:.285331}],[{x:.121661,y:.29320659086815803},{x:.121661,y:.34620780969623244},{x:.15228882172599023,y:.4318540207415116},{x:.21388481974037543,y:.48813802669691503},{x:.2736685500834057,y:.5150589999999999},{x:.3663915263934284,y:.5150589999999999},{x:.4250929420729598,y:.48822590193711934},{x:.480392,y:.4376951204586189},{x:.480392,y:.20264468470162808},{x:.4249051037436742,y:.15194152341431572},{x:.3661311050032371,y:.124287},{x:.2739261218560311,y:.124287},{x:.21407100266628776,y:.15203091487935444},{x:.15223458736534265,y:.208535427414771},{x:.121661,y:.29320659086815803}]],h:[[{x:.047041,y:.05318299999999998},{x:.04790566238185463,y:.04440393550927419},{x:.050466421036992094,y:.03596224554357094},{x:.05462486744638546,y:.028182339514117884},{x:.06022119484660536,y:.021363194846605343},{x:.06704033951411792,y:.01576686744638544},{x:.07482024554357096,y:.011608421036992077},{x:.08326193550927423,y:.009047662381854615},{x:.092041,y:.008182999999999982},{x:.10082006449072577,y:.009047662381854615},{x:.10926175445642904,y:.011608421036992077},{x:.1170416604858821,y:.015766867446385446},{x:.12386080515339463,y:.021363194846605343},{x:.12945713255361452,y:.028182339514117884},{x:.1336155789630079,y:.03596224554357094},{x:.13617633761814535,y:.04440393550927421},{x:.137041,y:.05318299999999998},{x:.137041,y:.3692271498339558},{x:.23047284680205596,y:.45237128863270537},{x:.2915669774325256,y:.478914},{x:.38669764440631527,y:.478914},{x:.43644054132690624,y:.4571557093088599},{x:.465011,y:.38123324165433015},{x:.465011,y:.05318299999999998},{x:.4658756623818546,y:.04440393550927419},{x:.46843642103699207,y:.03596224554357094},{x:.47259486744638546,y:.028182339514117884},{x:.4781911948466053,y:.021363194846605343},{x:.4850103395141179,y:.01576686744638544},{x:.492790245543571,y:.011608421036992077},{x:.5012319355092743,y:.009047662381854615},{x:.510011,y:.008182999999999982},{x:.5187900644907257,y:.009047662381854615},{x:.527231754456429,y:.011608421036992077},{x:.5350116604858821,y:.015766867446385446},{x:.5418308051533947,y:.021363194846605343},{x:.5474271325536145,y:.028182339514117884},{x:.5515855789630079,y:.03596224554357094},{x:.5541463376181454,y:.04440393550927421},{x:.555011,y:.05318299999999998},{x:.555011,y:.38942},{x:.5546506186962206,y:.39307901278178137},{x:.554410350301749,y:.3967478709583736},{x:.5542188683658584,y:.3974626474508545},{x:.5541463376181454,y:.3981990644907258},{x:.5530790429582076,y:.40171746346329923},{x:.5521276325304605,y:.40526895152034226},{x:.5139866325304605,y:.5066239515203422},{x:.5138553396770835,y:.5068902237569821},{x:.5137747554395128,y:.50717595947055},{x:.511905898744729,y:.5108438433478746},{x:.5100853961903059,y:.5145359657635786},{x:.5099046789559015,y:.5147715076888114},{x:.5097698988494882,y:.5150360318659072},{x:.5072213830653152,y:.5182688425286295},{x:.504715563605999,y:.5215348594178236},{x:.5044923668525381,y:.521730619287556},{x:.5043085704011859,y:.5219637664124008},{x:.5011783335599848,y:.5246372687597332},{x:.4980834944323178,y:.5273516689249697},{x:.497826395485866,y:.5275001237971909},{x:.49760064588412606,y:.5276929341565276},{x:.49400898123224624,y:.5297043869925788},{x:.49044405536829966,y:.5317628575577613},{x:.490162934397186,y:.5318583023949868},{x:.48990390707565157,y:.532003366394835},{x:.41414290707565155,y:.5651423663948351},{x:.41372099607879415,y:.5652794559590063},{x:.41332975445642905,y:.5654885789630079},{x:.40952975949805703,y:.5666412948313546},{x:.4057531353317914,y:.5678684156337233},{x:.40531258638921414,y:.5679205603081202},{x:.4048880644907258,y:.5680493376181454},{x:.4009362016599996,y:.5684385621342186},{x:.39699274487562397,y:.5689053213297277},{x:.39655048803612764,y:.5688705172237564},{x:.396109,y:.568914},{x:.282214,y:.568914},{x:.28182836168040026,y:.5688760179407144},{x:.2814421286004882,y:.5689073796745989},{x:.27744221175957573,y:.5684440198796774},{x:.2734349355092742,y:.5680493376181454},{x:.2730641170540284,y:.5679368510695262},{x:.2726791869636831,y:.5678922598605547},{x:.26884652441488044,y:.5666574583296339},{x:.26499324554357095,y:.5654885789630079},{x:.2646514972979566,y:.5653059107200353},{x:.264282662844679,y:.5651870801833616},{x:.18800566284467896,y:.5320480801833616},{x:.1856267698486466,y:.5307235797343987},{x:.1831549202301779,y:.529581917442145},{x:.18178185218619736,y:.5285828381463435},{x:.18029822995654404,y:.527756799180932},{x:.17822344394147954,y:.5259936496360635},{x:.17602181748454487,y:.5243916901265875},{x:.137041,y:.4897030201456747},{x:.137041,y:.7597659999999999},{x:.13617633761814535,y:.7685450644907257},{x:.1336155789630079,y:.776986754456429},{x:.12945713255361452,y:.7847666604858821},{x:.12386080515339463,y:.7915858051533946},{x:.11704166048588208,y:.7971821325536145},{x:.10926175445642904,y:.8013405789630078},{x:.10082006449072577,y:.8039013376181453},{x:.092041,y:.804766},{x:.08326193550927423,y:.8039013376181453},{x:.07482024554357093,y:.8013405789630078},{x:.06704033951411792,y:.7971821325536145},{x:.06022119484660536,y:.7915858051533946},{x:.05462486744638546,y:.7847666604858821},{x:.050466421036992094,y:.776986754456429},{x:.04790566238185463,y:.7685450644907257},{x:.047041,y:.7597659999999999},{x:.047041,y:.05318299999999998}]],i:[[{x:.216026,y:.7597659999999999},{x:.21689066238185462,y:.7509869355092742},{x:.21945142103699208,y:.7425452455435709},{x:.22360986744638545,y:.7347653395141178},{x:.22920619484660534,y:.7279461948466053},{x:.2360253395141179,y:.7223498674463854},{x:.24380524554357094,y:.7181914210369921},{x:.25224693550927424,y:.7156306623818546},{x:.261026,y:.7147659999999999},{x:.341026,y:.7147659999999999},{x:.3498050644907258,y:.7156306623818546},{x:.35824675445642906,y:.7181914210369921},{x:.3660266604858821,y:.7223498674463854},{x:.3728458051533946,y:.7279461948466053},{x:.37844213255361453,y:.7347653395141178},{x:.3826005789630079,y:.7425452455435709},{x:.38516133761814536,y:.7509869355092742},{x:.386026,y:.7597659999999999},{x:.38516133761814536,y:.7685450644907257},{x:.3826005789630079,y:.776986754456429},{x:.37844213255361453,y:.7847666604858821},{x:.3728458051533946,y:.7915858051533946},{x:.3660266604858821,y:.7971821325536145},{x:.35824675445642906,y:.8013405789630078},{x:.3498050644907258,y:.8039013376181453},{x:.341026,y:.804766},{x:.261026,y:.804766},{x:.25224693550927424,y:.8039013376181453},{x:.24380524554357094,y:.8013405789630078},{x:.2360253395141179,y:.7971821325536145},{x:.22920619484660534,y:.7915858051533946},{x:.22360986744638545,y:.7847666604858821},{x:.21945142103699208,y:.776986754456429},{x:.21689066238185462,y:.7685450644907257},{x:.216026,y:.7597659999999999}],[{x:.25597800000000004,y:.05318299999999998},{x:.25684266238185466,y:.04440393550927419},{x:.2594034210369921,y:.03596224554357094},{x:.2635618674463855,y:.028182339514117884},{x:.2691581948466054,y:.021363194846605343},{x:.27597733951411796,y:.01576686744638544},{x:.28375724554357096,y:.011608421036992077},{x:.2921989355092742,y:.009047662381854615},{x:.300978,y:.008182999999999982},{x:.3097570644907258,y:.009047662381854615},{x:.3181987544564291,y:.011608421036992077},{x:.32597866048588214,y:.015766867446385446},{x:.33279780515339463,y:.021363194846605343},{x:.33839413255361456,y:.028182339514117884},{x:.34255257896300795,y:.03596224554357094},{x:.3451133376181454,y:.04440393550927421},{x:.345978,y:.05318299999999998},{x:.345978,y:.523911},{x:.3451133376181454,y:.5326900644907258},{x:.34255257896300795,y:.541131754456429},{x:.33839413255361456,y:.5489116604858821},{x:.33279780515339463,y:.5557308051533947},{x:.32597866048588214,y:.5613271325536145},{x:.3181987544564291,y:.5654855789630079},{x:.3097570644907258,y:.5680463376181454},{x:.300978,y:.5689110000000001},{x:.2921989355092742,y:.5680463376181454},{x:.28375724554357096,y:.5654855789630079},{x:.27597733951411796,y:.5613271325536145},{x:.2691581948466054,y:.5557308051533947},{x:.2635618674463855,y:.5489116604858821},{x:.2594034210369921,y:.541131754456429},{x:.25684266238185466,y:.5326900644907258},{x:.25597800000000004,y:.523911},{x:.25597800000000004,y:.05318299999999998}]],j:[[{x:.11017199870220953,y:-.1121580749666587},{x:.11173080987432929,y:-.12084080046598154},{x:.114953584640513,y:-.12905258085596802},{x:.11971647357384912,y:-.1364778420214504},{x:.12583644152368842,y:-.14283123533997366},{x:.1330783015538362,y:-.147868603469331},{x:.14116375304461573,y:-.15139636317729976},{x:.23896575304461573,y:-.18307436317729964},{x:.2424293887998465,y:-.18383095770413346},{x:.24586120600074532,y:-.1847208108507566},{x:.24673197042105502,y:-.1847708110651418},{x:.2475840766296098,y:-.18495694463669302},{x:.2511287638648936,y:-.18502327959701073},{x:.25466824139749206,y:-.18522652014211538},{x:.25553202888155596,y:-.18510568190524296},{x:.2564040749666586,y:-.1851220012977904},{x:.25989359333942796,y:-.1844955274762681},{x:.2634047110671092,y:-.18400434499968443},{x:.3944597110671092,y:-.15232634499968456},{x:.39510744613291976,y:-.15210060706564532},{x:.39578357398914765,y:-.1519849807175323},{x:.3992672661785621,y:-.15065089524264363},{x:.4027898773796621,y:-.14942325292878383},{x:.40338112711156726,y:-.1490754856432793},{x:.40402170577913904,y:-.1488301750218278},{x:.4071781926350792,y:-.14684208899421944},{x:.4103936167153703,y:-.14495080812962524},{x:.41090565971774945,y:-.14449437599440731},{x:.41148607211771127,y:-.14412880824922783},{x:.41419405162048195,y:-.14156312270000898},{x:.41697872163578864,y:-.1390808841476645},{x:.4173918803832174,y:-.13853332759371953},{x:.41788982159253774,y:-.13806155128824654},{x:.42004522760849955,y:-.13501686407422092},{x:.422292130251795,y:-.13203905886963707},{x:.4225905272853119,y:-.13142142018825975},{x:.42298686170256505,y:-.13086156542133753},{x:.4245068631872901,y:-.12745488216466036},{x:.4261296512500701,y:-.1240959456918764},{x:.4263018193390199,y:-.1234319603912164},{x:.42658131605481786,y:-.12280554206756752},{x:.4588533160548179,y:-.025908542067567514},{x:.4594769463166796,y:-.023162642495487502},{x:.46029433761814537,y:-.02046806449072583},{x:.46045163429328767,y:-.01887100454660151},{x:.46080705178433234,y:-.017306069686551954},{x:.4608830007338393,y:-.01449126757618431},{x:.461159,y:-.01168900000000006},{x:.461159,y:.534292},{x:.46029433761814537,y:.5430710644907257},{x:.4577335789630079,y:.551512754456429},{x:.45357513255361454,y:.5592926604858821},{x:.4479788051533946,y:.5661118051533947},{x:.4411596604858821,y:.5717081325536145},{x:.43337975445642907,y:.5758665789630079},{x:.4249380644907258,y:.5784273376181454},{x:.416159,y:.579292},{x:.4073799355092742,y:.5784273376181454},{x:.39893824554357094,y:.5758665789630079},{x:.39115833951411794,y:.5717081325536145},{x:.3843391948466054,y:.5661118051533947},{x:.37874286744638547,y:.5592926604858821},{x:.3745844210369921,y:.551512754456429},{x:.37202366238185464,y:.5430710644907257},{x:.371159,y:.534292},{x:.371159,y:-.004392296840350002},{x:.3490732119536395,y:-.07070509444595838},{x:.254610065464387,y:-.09353828321774525},{x:.16889624695538427,y:-.06577563682270039},{x:.16027792337039018,y:-.063893055363307},{x:.15145792503334138,y:-.0637279987022096},{x:.14277519953401854,y:-.06528680987432936},{x:.13456341914403205,y:-.06850958464051307},{x:.12713815797854966,y:-.0732724735738492},{x:.12078476466002638,y:-.07939244152368852},{x:.11574739653066908,y:-.08663430155383627},{x:.11221963682270032,y:-.0947197530446158},{x:.11033705536330693,y:-.10333807662960988},{x:.11017199870220953,y:-.1121580749666587}],[{x:.3403,y:.7597659999999999},{x:.3411646623818546,y:.7509869355092742},{x:.34372542103699205,y:.7425452455435709},{x:.34788386744638544,y:.7347653395141178},{x:.3534801948466053,y:.7279461948466053},{x:.3602993395141179,y:.7223498674463854},{x:.36807924554357097,y:.7181914210369921},{x:.37652093550927423,y:.7156306623818546},{x:.3853,y:.7147659999999999},{x:.447023,y:.7147659999999999},{x:.4558020644907258,y:.7156306623818546},{x:.46424375445642907,y:.7181914210369921},{x:.4720236604858821,y:.7223498674463854},{x:.4788428051533946,y:.7279461948466053},{x:.48443913255361454,y:.7347653395141178},{x:.48859757896300793,y:.7425452455435709},{x:.49115833761814537,y:.7509869355092742},{x:.492023,y:.7597659999999999},{x:.49115833761814537,y:.7685450644907257},{x:.48859757896300793,y:.776986754456429},{x:.48443913255361454,y:.7847666604858821},{x:.4788428051533946,y:.7915858051533946},{x:.4720236604858821,y:.7971821325536145},{x:.46424375445642907,y:.8013405789630078},{x:.4558020644907258,y:.8039013376181453},{x:.447023,y:.804766},{x:.3853,y:.804766},{x:.37652093550927423,y:.8039013376181453},{x:.36807924554357097,y:.8013405789630078},{x:.3602993395141179,y:.7971821325536145},{x:.3534801948466053,y:.7915858051533946},{x:.34788386744638544,y:.7847666604858821},{x:.34372542103699205,y:.776986754456429},{x:.3411646623818546,y:.7685450644907257},{x:.3403,y:.7597659999999999}]],k:[[{x:.020185999999999996,y:.05318299999999998},{x:.02105066238185463,y:.04440393550927419},{x:.02361142103699209,y:.03596224554357094},{x:.027769867446385453,y:.028182339514117884},{x:.03336619484660536,y:.021363194846605343},{x:.04018533951411791,y:.01576686744638544},{x:.047965245543570956,y:.011608421036992077},{x:.056406935509274225,y:.009047662381854615},{x:.065186,y:.008182999999999982},{x:.07396506449072576,y:.009047662381854615},{x:.08240675445642903,y:.011608421036992077},{x:.0901866604858821,y:.015766867446385446},{x:.09700580515339463,y:.021363194846605343},{x:.10260213255361453,y:.028182339514117884},{x:.10676057896300789,y:.03596224554357094},{x:.10932133761814536,y:.04440393550927421},{x:.11018599999999999,y:.05318299999999998},{x:.11018599999999999,y:.16578332733911408},{x:.23477705990096162,y:.26351643594805596},{x:.5068321321577423,y:.019673199736523116},{x:.5139466814455551,y:.014457569113271652},{x:.5219420457215526,y:.010730135081525344},{x:.5305109676204599,y:.008634140840755075},{x:.539324148279209,y:.008250134274186548},{x:.5480429021075728,y:.009592872538819623},{x:.5563321722854605,y:.012610754956160736},{x:.5638734068086124,y:.017187805997359452},{x:.5703768002634768,y:.02314813215774228},{x:.5755924308867283,y:.030262681445555134},{x:.5793198649184746,y:.03825804572155257},{x:.5814158591592449,y:.04682696762045996},{x:.5817998657258134,y:.05564014827920904},{x:.5804571274611804,y:.06435890210757275},{x:.5774392450438393,y:.07264817228546054},{x:.5728621940026405,y:.08018940680861247},{x:.5669018678422577,y:.08669280026347684},{x:.3066862956724008,y:.3199242805817128},{x:.5215978711622948,y:.4885076152557163},{x:.5279716470169837,y:.49460635247919954},{x:.533033147947031,y:.5018313661609891},{x:.5365878633102175,y:.5099050030771282},{x:.5384991873886431,y:.5185169978886772},{x:.5386936690698568,y:.5273363964646907},{x:.5371638345319164,y:.5360242742638681},{x:.5339684744581735,y:.5442467610146052},{x:.5292303847442837,y:.5516878711622948},{x:.5231316475208004,y:.5580616470169838},{x:.5159066338390108,y:.5631231479470311},{x:.5078329969228718,y:.5666778633102175},{x:.4992210021113228,y:.5685891873886431},{x:.49040160353530926,y:.5687836690698569},{x:.4817137257361318,y:.5672538345319164},{x:.47349123898539475,y:.5640584744581736},{x:.46605012883770514,y:.5593203847442837},{x:.11018599999999999,y:.28016947631338524},{x:.11018599999999999,y:.7597659999999999},{x:.10932133761814536,y:.7685450644907257},{x:.10676057896300789,y:.776986754456429},{x:.10260213255361453,y:.7847666604858821},{x:.09700580515339463,y:.7915858051533946},{x:.09018666048588207,y:.7971821325536145},{x:.08240675445642903,y:.8013405789630078},{x:.07396506449072576,y:.8039013376181453},{x:.065186,y:.804766},{x:.056406935509274204,y:.8039013376181453},{x:.04796524554357093,y:.8013405789630078},{x:.04018533951411791,y:.7971821325536145},{x:.03336619484660536,y:.7915858051533946},{x:.027769867446385453,y:.7847666604858821},{x:.02361142103699209,y:.776986754456429},{x:.02105066238185463,y:.7685450644907257},{x:.020185999999999996,y:.7597659999999999},{x:.020185999999999996,y:.05318299999999998}]],l:[[{x:.25602600000000003,y:.05355900000000002},{x:.25689066238185465,y:.044779935509274234},{x:.2594514210369921,y:.036338245543570985},{x:.2636098674463855,y:.028558339514117927},{x:.26920619484660535,y:.021739194846605386},{x:.27602533951411795,y:.016142867446385482},{x:.283805245543571,y:.01198442103699212},{x:.2922469355092743,y:.009423662381854658},{x:.301026,y:.008559000000000025},{x:.3098050644907258,y:.009423662381854658},{x:.3182467544564291,y:.01198442103699212},{x:.32602666048588214,y:.01614286744638549},{x:.3328458051533947,y:.021739194846605386},{x:.33844213255361455,y:.028558339514117927},{x:.34260057896300794,y:.036338245543570985},{x:.3451613376181454,y:.044779935509274255},{x:.346026,y:.05355900000000002},{x:.346026,y:.765137},{x:.3451613376181454,y:.7739160644907257},{x:.34260057896300794,y:.782357754456429},{x:.33844213255361455,y:.7901376604858821},{x:.3328458051533947,y:.7969568051533946},{x:.32602666048588214,y:.8025531325536145},{x:.3182467544564291,y:.8067115789630078},{x:.3098050644907258,y:.8092723376181453},{x:.301026,y:.810137},{x:.2922469355092743,y:.8092723376181453},{x:.283805245543571,y:.8067115789630078},{x:.27602533951411795,y:.8025531325536145},{x:.26920619484660535,y:.7969568051533946},{x:.2636098674463855,y:.7901376604858821},{x:.2594514210369921,y:.782357754456429},{x:.25689066238185465,y:.7739160644907257},{x:.25602600000000003,y:.765137},{x:.25602600000000003,y:.05355900000000002}]],m:[[{x:.005538000000000001,y:.03920400000000002},{x:.006402662381854635,y:.030424935509274227},{x:.008963421036992096,y:.02198324554357097},{x:.013121867446385459,y:.01420333951411792},{x:.018718194846605363,y:.00738419484660538},{x:.025537339514117914,y:.0017878674463854757},{x:.03331724554357096,y:-.002370578963007887},{x:.04175893550927423,y:-.004931337618145348},{x:.050538,y:-.005795999999999982},{x:.059317064490725775,y:-.004931337618145348},{x:.06775875445642904,y:-.002370578963007887},{x:.0755386604858821,y:.0017878674463854827},{x:.08235780515339464,y:.00738419484660538},{x:.08795413255361453,y:.01420333951411792},{x:.0921125789630079,y:.02198324554357098},{x:.09467333761814536,y:.030424935509274248},{x:.095538,y:.03920400000000002},{x:.095538,y:.3993271266071161},{x:.14963521853994496,y:.4943223065353007},{x:.1738257653562211,y:.5150589999999999},{x:.22021623464377893,y:.5150589999999999},{x:.2416666625786254,y:.49667119950297894},{x:.27741,y:.4029520066676719},{x:.27741,y:.03920400000000002},{x:.2782746623818546,y:.030424935509274227},{x:.28083542103699205,y:.02198324554357097},{x:.28499386744638544,y:.01420333951411792},{x:.2905901948466053,y:.00738419484660538},{x:.2974093395141179,y:.0017878674463854757},{x:.30518924554357096,y:-.002370578963007887},{x:.31363093550927423,y:-.004931337618145348},{x:.32241,y:-.005795999999999982},{x:.33118906449072577,y:-.004931337618145348},{x:.33963075445642904,y:-.002370578963007887},{x:.3474106604858821,y:.0017878674463854827},{x:.35422980515339464,y:.00738419484660538},{x:.3598261325536145,y:.01420333951411792},{x:.3639845789630079,y:.02198324554357098},{x:.36654533761814534,y:.030424935509274248},{x:.36740999999999996,y:.03920400000000002},{x:.36740999999999996,y:.3993264781598986},{x:.4215891088917321,y:.494459500052724},{x:.445289826307752,y:.5150589999999999},{x:.4920928256254945,y:.5150589999999999},{x:.5065149999999999,y:.5026965582556255},{x:.5065149999999999,y:.03920400000000002},{x:.5073796623818546,y:.030424935509274227},{x:.5099404210369921,y:.02198324554357097},{x:.5140988674463854,y:.01420333951411792},{x:.5196951948466053,y:.00738419484660538},{x:.5265143395141179,y:.0017878674463854757},{x:.534294245543571,y:-.002370578963007887},{x:.5427359355092742,y:-.004931337618145348},{x:.551515,y:-.005795999999999982},{x:.5602940644907257,y:-.004931337618145348},{x:.568735754456429,y:-.002370578963007887},{x:.5765156604858821,y:.0017878674463854827},{x:.5833348051533946,y:.00738419484660538},{x:.5889311325536145,y:.01420333951411792},{x:.5930895789630078,y:.02198324554357098},{x:.5956503376181453,y:.030424935509274248},{x:.596515,y:.03920400000000002},{x:.596515,y:.523393},{x:.5963454778388272,y:.5251141873868636},{x:.5963825315707437,y:.5268433058919912},{x:.5959141404350922,y:.5294936295415332},{x:.5956503376181453,y:.5321720644907257},{x:.5951482857762117,y:.5338271076115645},{x:.59484729324509,y:.5355302304139588},{x:.5938708496195351,y:.5380382502602514},{x:.5930895789630078,y:.540613754456429},{x:.592274291011045,y:.5421390509322689},{x:.5916468191910574,y:.543750727977755},{x:.5901998472565338,y:.5460200622246176},{x:.5889311325536145,y:.5483936604858821},{x:.5878339395503975,y:.5497305940285525},{x:.5869041018316961,y:.5511888894721116},{x:.5850422079081763,y:.5531323288770946},{x:.5833348051533946,y:.5552128051533947},{x:.581997871610724,y:.5563099981566119},{x:.5808014011353795,y:.5575588705221693},{x:.5380264011353795,y:.5942248705221693},{x:.5358211367621821,y:.5957677297988329},{x:.5337406604858821,y:.5974751325536145},{x:.5322153640100423,y:.5982904205055773},{x:.5307982404674333,y:.599281876328501},{x:.5283343527176928,y:.600364864260089},{x:.525960754456429,y:.6016335789630078},{x:.5243057113355902,y:.6021356308049415},{x:.5227223939887274,y:.6028315689939708},{x:.5200945686869033,y:.6034130669616181},{x:.5175190644907257,y:.6041943376181453},{x:.5157978771038628,y:.6043638597793182},{x:.5141092119504517,y:.6047375358201355},{x:.5114184349491921,y:.6047951971830532},{x:.50874,y:.605059},{x:.428467,y:.605059},{x:.42563553135621585,y:.6047801246797119},{x:.42279150043448566,y:.6046996620098968},{x:.4212557149999115,y:.6043487504203328},{x:.4196879355092742,y:.6041943376181453},{x:.41696527861756566,y:.6033684286794448},{x:.4141915924406847,y:.6027346691689239},{x:.4127537761476033,y:.6020908833721776},{x:.4112462455435709,y:.6016335789630078},{x:.40873703058140176,y:.6002923756232341},{x:.4061402803536474,y:.5991296742945802},{x:.40485568767586616,y:.5982177546177817},{x:.4034663395141179,y:.5974751325536145},{x:.4012669942053008,y:.5956701765049598},{x:.3989469715816508,y:.5940232153181825},{x:.3567609715816508,y:.5573572153181825},{x:.3545792701559384,y:.5550484712393128},{x:.3522737143614353,y:.552863400803129},{x:.35155574109793963,y:.5518488790642903},{x:.35070210094674875,y:.5509455305944583},{x:.3490127339279754,y:.5482555195520005},{x:.34717776483660073,y:.5456626430091704},{x:.33048446785976626,y:.5163509060824124},{x:.3216828574856715,y:.5394287684036221},{x:.32062739498214626,y:.5415455848316745},{x:.31976928952310246,y:.5437498007710907},{x:.3186639603788477,y:.5454834136126945},{x:.31774653490223986,y:.5473233854865517},{x:.3162983824161672,y:.5491936173608123},{x:.31502674401548947,y:.5511880718386934},{x:.3136044423732838,y:.5526727347769701},{x:.3123456842645886,y:.5542983712755478},{x:.3105604934838748,y:.5558501466339272},{x:.30892419049215825,y:.5575581938831911},{x:.2661511904921582,y:.594224193883191},{x:.26394553725639397,y:.5957674011217274},{x:.2618646604858821,y:.5974751325536145},{x:.26033982189406285,y:.5982901757614695},{x:.258923146662659,y:.5992813666868191},{x:.25645880963824363,y:.6003646200309664},{x:.25408475445642903,y:.6016335789630078},{x:.25243020816870526,y:.6021354800922637},{x:.25084738219782576,y:.6028312459348294},{x:.24821906447459133,y:.6034129165660671},{x:.24564306449072576,y:.6041943376181453},{x:.24392239379305308,y:.6043638088898747},{x:.2422342441971012,y:.6047374117585159},{x:.2395429505511757,y:.6047951464006902},{x:.236864,y:.605059},{x:.157178,y:.605059},{x:.1544990494488241,y:.6047951464006902},{x:.1518077558028988,y:.6047374117585159},{x:.15011960620694695,y:.6043638088898747},{x:.14839893550927424,y:.6041943376181453},{x:.14582293552540848,y:.6034129165660671},{x:.1431946178021742,y:.6028312459348294},{x:.1416117918312948,y:.6021354800922637},{x:.13995724554357097,y:.6016335789630078},{x:.13758319036175665,y:.6003646200309664},{x:.135118853337341,y:.5992813666868191},{x:.13370217810593676,y:.5982901757614691},{x:.13217733951411792,y:.5974751325536145},{x:.13009646274360603,y:.5957674011217274},{x:.1278908095078418,y:.594224193883191},{x:.09495385911112918,y:.5659898819750746},{x:.09467333761814536,y:.5688380644907257},{x:.0921125789630079,y:.577279754456429},{x:.08795413255361453,y:.5850596604858821},{x:.08235780515339464,y:.5918788051533946},{x:.07553866048588208,y:.5974751325536145},{x:.06775875445642904,y:.6016335789630078},{x:.059317064490725775,y:.6041943376181453},{x:.050538,y:.605059},{x:.04175893550927421,y:.6041943376181453},{x:.033317245543570934,y:.6016335789630078},{x:.025537339514117904,y:.5974751325536145},{x:.018718194846605356,y:.5918788051533946},{x:.013121867446385459,y:.5850596604858821},{x:.008963421036992096,y:.577279754456429},{x:.006402662381854635,y:.5688380644907257},{x:.005538000000000001,y:.560059},{x:.005538000000000001,y:.03920400000000002}]],n:[[{x:.047041,y:.03920400000000002},{x:.04790566238185463,y:.030424935509274227},{x:.050466421036992094,y:.02198324554357097},{x:.05462486744638546,y:.01420333951411792},{x:.06022119484660536,y:.00738419484660538},{x:.06704033951411792,y:.0017878674463854757},{x:.07482024554357096,y:-.002370578963007887},{x:.08326193550927423,y:-.004931337618145348},{x:.092041,y:-.005795999999999982},{x:.10082006449072577,y:-.004931337618145348},{x:.10926175445642904,y:-.002370578963007887},{x:.1170416604858821,y:.0017878674463854827},{x:.12386080515339463,y:.00738419484660538},{x:.12945713255361452,y:.01420333951411792},{x:.1336155789630079,y:.02198324554357098},{x:.13617633761814535,y:.030424935509274248},{x:.137041,y:.03920400000000002},{x:.137041,y:.3923986904044417},{x:.23217657812189968,y:.4860775193429304},{x:.29246969284729285,y:.5150589999999999},{x:.3857956927587408,y:.5150589999999999},{x:.4353266752666751,y:.4910865745843881},{x:.465011,y:.4037995608673687},{x:.465011,y:.03920400000000002},{x:.4658756623818546,y:.030424935509274227},{x:.46843642103699207,y:.02198324554357097},{x:.47259486744638546,y:.01420333951411792},{x:.4781911948466053,y:.00738419484660538},{x:.4850103395141179,y:.0017878674463854757},{x:.492790245543571,y:-.002370578963007887},{x:.5012319355092743,y:-.004931337618145348},{x:.510011,y:-.005795999999999982},{x:.5187900644907257,y:-.004931337618145348},{x:.527231754456429,y:-.002370578963007887},{x:.5350116604858821,y:.0017878674463854827},{x:.5418308051533947,y:.00738419484660538},{x:.5474271325536145,y:.01420333951411792},{x:.5515855789630079,y:.02198324554357098},{x:.5541463376181454,y:.030424935509274248},{x:.555011,y:.03920400000000002},{x:.555011,y:.411242},{x:.5547211401667089,y:.41418499627592825},{x:.5546227314347089,y:.4171405946120584},{x:.5542897326303223,y:.4185651504993601},{x:.5541463376181454,y:.4200210644907258},{x:.5532878972691104,y:.42285096307022063},{x:.5526147708021555,y:.4257305718218671},{x:.5144747708021555,y:.537881571821867},{x:.5144109474804813,y:.5380222238814931},{x:.5143747633675698,y:.5381723808934484},{x:.5125889395552703,y:.5420375142269895},{x:.5108295711501452,y:.5459147613418461},{x:.5107395343200961,y:.546040259499208},{x:.5106747512949527,y:.5461804721160435},{x:.5081691914797779,y:.5496229410537735},{x:.5056872154570532,y:.5530824522038071},{x:.5055744251835149,y:.5531879736350976},{x:.505483532821465,y:.5533128535645805},{x:.5023545242619802,y:.5562003659557777},{x:.4992453215682988,y:.5591091940676126},{x:.49911411231822944,y:.5591906836434047},{x:.49900060356177384,y:.559295431819878},{x:.49536839230215873,y:.5615170221826804},{x:.49175144785337105,y:.5637633826232722},{x:.4916068619246677,y:.563817708744868},{x:.49147509885166074,y:.5638982997546532},{x:.41571709885166075,y:.6005642997546532},{x:.4144883994140345,y:.6010164083750983},{x:.41333375445642906,y:.6016335789630078},{x:.41035728417594536,y:.6025364813514484},{x:.4074382196167836,y:.6036105717354909},{x:.4061449272779714,y:.6038142858466193},{x:.4048920644907258,y:.6041943376181453},{x:.4017966387343604,y:.6044992104448776},{x:.3987241185432898,y:.6049831812385367},{x:.3974159338025849,y:.6049306722213019},{x:.396113,y:.605059},{x:.282216,y:.605059},{x:.28097323419788345,y:.6049365982521052},{x:.2797255990169867,y:.6049900349640848},{x:.2765922846246742,y:.6045051123806029},{x:.2734369355092743,y:.6041943376181453},{x:.2722419284999821,y:.603831836204989},{x:.27100784129389754,y:.6036408445963318},{x:.26802933636200627,y:.6025539603505436},{x:.264995245543571,y:.6016335789630078},{x:.2638939207763026,y:.6010449086106044},{x:.2627208068242762,y:.6006168283817219},{x:.18644080682427616,y:.563950828381722},{x:.18387931815291048,y:.5623935720684188},{x:.18122474955630472,y:.5610008994562176},{x:.18011833133270075,y:.5601070811947741},{x:.17890296169536754,y:.5593681975674947},{x:.17669449694619624,y:.5573411418478543},{x:.17436263208920222,y:.5554573484070612},{x:.137041,y:.5187071981771466},{x:.137041,y:.560059},{x:.13617633761814535,y:.5688380644907257},{x:.1336155789630079,y:.577279754456429},{x:.12945713255361452,y:.5850596604858821},{x:.12386080515339463,y:.5918788051533946},{x:.11704166048588208,y:.5974751325536145},{x:.10926175445642904,y:.6016335789630078},{x:.10082006449072577,y:.6041943376181453},{x:.092041,y:.605059},{x:.08326193550927423,y:.6041943376181453},{x:.07482024554357093,y:.6016335789630078},{x:.06704033951411792,y:.5974751325536145},{x:.06022119484660536,y:.5918788051533946},{x:.05462486744638546,y:.5850596604858821},{x:.050466421036992094,y:.577279754456429},{x:.04790566238185463,y:.5688380644907257},{x:.047041,y:.560059},{x:.047041,y:.03920400000000002}]],o:[[{x:.021894999999999998,y:.25490100000000004},{x:.022142430975592695,y:.2523887911456351},{x:.02217771682540861,y:.24986467341374632},{x:.02257373987793045,y:.24800963837050735},{x:.02275966238185463,y:.24612193550927428},{x:.023492446675001572,y:.24370626943231966},{x:.02401948545822835,y:.2412375358426815},{x:.060310485458228355,y:.12735753584268142},{x:.06080304558444478,y:.12621387418764726},{x:.061129830312657105,y:.12501229639135567},{x:.06254436541764224,y:.12217075210694647},{x:.06379993607002282,y:.11925547753662338},{x:.06450614911208748,y:.11822988473324028},{x:.0650610709625847,y:.11711514745523491},{x:.06700278396163635,y:.114604164756607},{x:.06880297103068717,y:.11198985605258731},{x:.06969569761744246,y:.11112174505713},{x:.07045743125471368,y:.1101366870258529},{x:.14244943125471368,y:.0338456870258529},{x:.144568728324263,y:.03200109409682955},{x:.1465508815997487,y:.0300098604251366},{x:.14788834203377002,y:.029111770054614114},{x:.1491035320893312,y:.02805409342394511},{x:.1515419696884587,y:.026658398178569347},{x:.15387450686277807,y:.025092124424329433},{x:.22587150686277807,y:-.01360287557567049},{x:.22795933917571506,y:-.014473279294209745},{x:.22995424554357097,y:-.015539578963007873},{x:.23202067225559728,y:-.016166422653018674},{x:.2340138134199343,y:-.01699735024728135},{x:.23623133596214702,y:-.01744371352418634},{x:.23839593550927424,y:-.018100337618145335},{x:.2405449475487996,y:-.01831199682974963},{x:.24266189699648397,y:-.01873811583170923},{x:.2449238916202761,y:-.018743285176571887},{x:.247175,y:-.018964999999999968},{x:.354874,y:-.018964999999999968},{x:.35712497901801044,y:-.018743297917588594},{x:.3593868436844028,y:-.018738141970160445},{x:.36150392306047363,y:-.018312009573623896},{x:.3636530644907258,y:-.018100337618145335},{x:.36581753964743763,y:-.017443751257606326},{x:.36803493734305537,y:-.016997426474138877},{x:.370028203326089,y:-.016166460394901543},{x:.3720947544564291,y:-.015539578963007873},{x:.3740895461854217,y:-.014473340569958804},{x:.376177263560353,y:-.01360299896157894},{x:.448175263560353,y:.025092001038420984},{x:.4505076595021602,y:.026658160356610353},{x:.4529459593263057,y:.028053731854915283},{x:.45416130097157975,y:.029111510806286087},{x:.45549891730603415,y:.030009694621828502},{x:.4574809543881169,y:.03200078850323144},{x:.4596001404718476,y:.03384523318438343},{x:.5315941404718476,y:.11013623318438343},{x:.5323560786638525,y:.11112152750713142},{x:.5332490289693128,y:.11198985605258731},{x:.5350490398057314,y:.11460390882403626},{x:.5369905975332091,y:.11711461878219896},{x:.5375456739097991,y:.11822962771804991},{x:.5382520639299772,y:.11925547753662338},{x:.5395075116659538,y:.12217046671076734},{x:.5409219476918898,y:.12501171320336152},{x:.5412488309792026,y:.126213587584214},{x:.5417415145417717,y:.12735753584268142},{x:.5780325145417716,y:.2412375358426815},{x:.5785595533249983,y:.2437062694323195},{x:.5792923376181454,y:.24612193550927428},{x:.5794782601220696,y:.2480096383705079},{x:.5798742831745913,y:.24986467341374632},{x:.5799095690244073,y:.25238879114563434},{x:.580157,y:.25490100000000004},{x:.580157,y:.33119200000000004},{x:.5799156873690254,y:.3336420882589673},{x:.5798881240960263,y:.3361038771468651},{x:.5794843860383102,y:.3380211641581212},{x:.5792923376181454,y:.33997106449072584},{x:.5785776732343003,y:.3423269972319261},{x:.5780703683949873,y:.3447361062088315},{x:.5417793683949873,y:.4597211062088315},{x:.5412650895934552,y:.4609244011905288},{x:.540921633437906,y:.46218711230867804},{x:.5395351283421765,y:.46497211555478546},{x:.5383124760126231,y:.46783284286481475},{x:.5375733277285976,y:.46891268605384906},{x:.5369901282681178,y:.47008412955994733},{x:.5350869372989228,y:.47254512602400234},{x:.5333296776789325,y:.47511235762423976},{x:.5323940649664491,y:.4760272512524403},{x:.5315935342292432,y:.47706240922950055},{x:.45959953422924316,y:.5533504092295005},{x:.4572787448447235,y:.5553702403350376},{x:.45508230823461715,y:.5575246421731296},{x:.45395838697349994,y:.5582600166131206},{x:.4529452394037514,y:.5591417799431011},{x:.45027499383570063,y:.5606700370119551},{x:.44770045819082444,y:.5623545390972755},{x:.3757024581908245,y:.5999485390972755},{x:.37385313535723513,y:.6006937047902838},{x:.3720947544564291,y:.6016335789630078},{x:.36977177563531344,y:.6023382468844833},{x:.3675201821794923,y:.6032455034042244},{x:.36556101895058973,y:.6036155659602718},{x:.3636530644907258,y:.6041943376181453},{x:.36123724716457173,y:.6044322748568528},{x:.35885192047906295,y:.6048828346046191},{x:.35685820639902277,y:.60486357272721},{x:.354874,y:.605059},{x:.247175,y:.605059},{x:.24519066624232813,y:.6048635601834779},{x:.24319682408363533,y:.6048828119349353},{x:.24081162559758007,y:.6044322623250186},{x:.23839593550927424,y:.6041943376181453},{x:.23648785858508298,y:.6036155288111242},{x:.234528571713998,y:.6032454313367869},{x:.23227710201651716,y:.602338209770572},{x:.22995424554357097,y:.6016335789630078},{x:.2281957517789948,y:.6006936444633418},{x:.22634631449119302,y:.5999484204015954},{x:.15434931449119302,y:.5623544204015953},{x:.15177463525955168,y:.5606698034147719},{x:.14910425200363037,y:.5591414183832311},{x:.14809125527340347,y:.55825976164439},{x:.1469674919716301,y:.5575244814106152},{x:.14477093694990967,y:.5553699388664325},{x:.14245003748743465,y:.5533499553954043},{x:.07045803748743465,y:.4770619553954044},{x:.06965771196430402,y:.47602703312304784},{x:.06872232232106745,y:.47511235762423976},{x:.06696488716695402,y:.4725448695811053},{x:.06506154021654398,y:.4700836008922148},{x:.0644784960433022,y:.46891242859710086},{x:.06373952398737684,y:.46783284286481475},{x:.06251674952606694,y:.46497182979435886},{x:.06113014455468816,y:.46218652912371366},{x:.06078678779193787,y:.46092411430034236},{x:.06027263160501272,y:.4597211062088315},{x:.023981631605012717,y:.3447361062088315},{x:.0234743267656997,y:.3423269972319261},{x:.02275966238185463,y:.33997106449072584},{x:.0225676139616898,y:.3380211641581212},{x:.022163875903973694,y:.3361038771468651},{x:.022136312630974576,y:.33364208825896713},{x:.021894999999999998,y:.33119200000000004},{x:.021894999999999998,y:.25490100000000004}],[{x:.111895,y:.2618978965790472},{x:.111895,y:.324259211613835},{x:.14299436878278687,y:.42279496206129447},{x:.20271328316555492,y:.48607750096051383},{x:.25821631520114247,y:.5150589999999999},{x:.3438328207386419,y:.5150589999999999},{x:.3993370917152178,y:.4860772565752743},{x:.4590577300605173,y:.42279464888454726},{x:.490157,y:.324259211613835},{x:.490157,y:.2618978965790472},{x:.4591028039244665,y:.16445082019422033},{x:.39914727445977055,y:.10091681321598435},{x:.3435475642149213,y:.07103500000000003},{x:.2585015743575747,y:.07103500000000003},{x:.20290309936793577,y:.10091656436690524},{x:.14294929572583875,y:.164450507494742},{x:.111895,y:.2618978965790472}]],p:[[{x:.031904,y:-.15424400000000005},{x:.032768662381854635,y:-.16302306449072582},{x:.0353294210369921,y:-.17146475445642909},{x:.03948786744638546,y:-.17924466048588214},{x:.04508419484660536,y:-.18606380515339468},{x:.051903339514117915,y:-.19166013255361458},{x:.05968324554357096,y:-.19581857896300794},{x:.06812493550927423,y:-.1983793376181454},{x:.076904,y:-.19924400000000003},{x:.08568306449072577,y:-.1983793376181454},{x:.09412475445642904,y:-.19581857896300794},{x:.1019046604858821,y:-.19166013255361458},{x:.10872380515339464,y:-.18606380515339468},{x:.11432013255361453,y:-.17924466048588214},{x:.1184785789630079,y:-.17146475445642909},{x:.12103933761814537,y:-.16302306449072582},{x:.121904,y:-.15424400000000005},{x:.121904,y:.08461372659928788},{x:.12362832174470662,y:.08333438131496537},{x:.12536021772829115,y:.08178035235824195},{x:.1271620685101291,y:.08071254912256186},{x:.12884414120453105,y:.07946455014784792},{x:.13094744853162613,y:.07846927732892851},{x:.13294924262910485,y:.07728298474798974},{x:.20690724262910487,y:.04275398474798971},{x:.20784573679964677,y:.04242345923251374},{x:.20872324554357097,y:.041954421036992075},{x:.21199903754957586,y:.040960720395783044},{x:.21522783943974558,y:.03982357810698025},{x:.21621278303720604,y:.03968249467654502},{x:.21716493550927424,y:.0393936623818546},{x:.22057164546850772,y:.03905813073713887},{x:.2239602522910248,y:.038572746319036566},{x:.22495379448531613,y:.03862652673075318},{x:.225944,y:.038528999999999966},{x:.338005,y:.038528999999999966},{x:.33886621477794643,y:.03861382225207184},{x:.3397300481447032,y:.038562076501738984},{x:.34324908380057223,y:.0390454971728409},{x:.3467840644907258,y:.0393936623818546},{x:.3476121832677305,y:.039644869466491955},{x:.3484695134136621,y:.03976264352593092},{x:.35182662109175783,y:.04092330520367998},{x:.35522575445642907,y:.04195442103699206},{x:.3559889530923063,y:.042362359206810904},{x:.35680683330070073,y:.04264512708496585},{x:.4318888333007007,y:.07717412708496588},{x:.43400924312431544,y:.07841428389434572},{x:.43622962614931016,y:.07946501028796468},{x:.4378075563324746,y:.08063579029221077},{x:.43950360927818305,y:.0816277549521855},{x:.44134133343031445,y:.08325775393151234},{x:.4433140658676044,y:.08472146615145025},{x:.5183930658676044,y:.1527974661514503},{x:.519792625068414,y:.15434228537837358},{x:.5213447099268285,y:.1557337827706549},{x:.522746916505161,y:.1576032022519019},{x:.5243158963961404,y:.15933502631539204},{x:.52538718417891,y:.1611232027292085},{x:.5266379784876352,y:.1627907596241023},{x:.5276485364111687,y:.16489781566710873},{x:.5288495066792682,y:.16690245600899573},{x:.5295513540552914,y:.16886527099294393},{x:.530452790490496,y:.17074480411415546},{x:.5674347904904959,y:.2723648041141554},{x:.5682868803844835,y:.2756900562357905},{x:.5692833376181453,y:.27897493550927416},{x:.5693799285821196,y:.2799556400244087},{x:.5696245448495124,y:.2809102467717411},{x:.5698115375679212,y:.2843378395980749},{x:.570148,y:.28775399999999995},{x:.570148,y:.355831},{x:.5698183264321395,y:.3591782319067787},{x:.5696454905753794,y:.362537215959393},{x:.5693867528695432,y:.3635600718226051},{x:.5692833376181453,y:.3646100644907258},{x:.5683069860848939,y:.3678286641524751},{x:.567482165940186,y:.37108938766543825},{x:.530500165940186,y:.47369538766543823},{x:.5295747233109523,y:.4756403735939819},{x:.5288495066792682,y:.4776685439910043},{x:.5276841925618525,y:.47961366765708685},{x:.5267099630491849,y:.4816611880905031},{x:.5254228546094585,y:.48338825675926556},{x:.5243158963961404,y:.48523597368460797},{x:.5227934986603558,y:.48691638083844907},{x:.5214385372739072,y:.48873449599152474},{x:.5198392258792078,y:.49017727712011666},{x:.5183930658676044,y:.4917735338485497},{x:.4433140658676044,y:.5598495338485497},{x:.44114571117720175,y:.5614583923016819},{x:.43910641435493325,y:.5632279843609703},{x:.43761161896162687,y:.5640805897495177},{x:.43622962614931016,y:.5651059897120353},{x:.43378906307257026,y:.5662609093863238},{x:.43144372048223223,y:.5675986521566495},{x:.35636172048223225,y:.6011446521566495},{x:.355773047491519,y:.6013410447411239},{x:.35522575445642907,y:.6016335789630078},{x:.3515938477815883,y:.6027353058079922},{x:.3479935881359665,y:.6039364213810477},{x:.34737791203915763,y:.6040141959337602},{x:.3467840644907258,y:.6041943376181453},{x:.34300700763927916,y:.6045663452480041},{x:.3392415999493003,y:.6050420059085138},{x:.33862258083352115,y:.60499817359702},{x:.338005,y:.605059},{x:.225944,y:.605059},{x:.2251997336627212,y:.6049856961639699},{x:.22445344765540867,y:.6050343071552383},{x:.22081614914993766,y:.6045539507735711},{x:.21716493550927424,y:.6041943376181453},{x:.21644927090994795,y:.6039772431353645},{x:.21570784104506457,y:.6038793269025836},{x:.2122341450916469,y:.6026985986973952},{x:.20872324554357097,y:.6016335789630078},{x:.20806368527139987,y:.6012810366527016},{x:.20735560428285457,y:.6010403560617851},{x:.13339760428285458,y:.5674943560617851},{x:.13116986982932302,y:.566206971138138},{x:.12884414120453105,y:.5651064498521521},{x:.1273598902040749,y:.5640052229355318},{x:.12575970914356202,y:.5630804946901414},{x:.12382593632220404,y:.5613832370749092},{x:.121904,y:.5599572734007121},{x:.121904,y:.560059},{x:.12103933761814537,y:.5688380644907257},{x:.1184785789630079,y:.577279754456429},{x:.11432013255361453,y:.5850596604858821},{x:.10872380515339464,y:.5918788051533946},{x:.10190466048588208,y:.5974751325536145},{x:.09412475445642904,y:.6016335789630078},{x:.08568306449072577,y:.6041943376181453},{x:.076904,y:.605059},{x:.0681249355092742,y:.6041943376181453},{x:.059683245543570934,y:.6016335789630078},{x:.051903339514117915,y:.5974751325536145},{x:.04508419484660536,y:.5918788051533946},{x:.03948786744638546,y:.5850596604858821},{x:.0353294210369921,y:.577279754456429},{x:.032768662381854635,y:.5688380644907257},{x:.031904,y:.560059},{x:.031904,y:-.15424400000000005}],[{x:.121904,y:.20607608160839302},{x:.121904,y:.438494918391607},{x:.17699192809119763,y:.48844251958412144},{x:.23567259519301437,y:.5150589999999999},{x:.3284092961747297,y:.5150589999999999},{x:.38817711429028284,y:.4883552464171925},{x:.4496333594179428,y:.43263133769024387},{x:.48014799999999996,y:.3479689286382035},{x:.48014799999999996,y:.29568777567179994},{x:.44968806913177495,y:.21198926897045803},{x:.3879916447872207,y:.1560475837631447},{x:.32815352882369925,y:.12852899999999995},{x:.2359312215606538,y:.12852899999999995},{x:.17717907548697515,y:.15595879598931894},{x:.121904,y:.20607608160839302}]],q:[[{x:.031905,y:.285813},{x:.03224141038262204,y:.2823973680650777},{x:.0324282929389951,y:.2789703010434802},{x:.03267301908894614,y:.2780151713289937},{x:.032769662381854636,y:.2770339355092742},{x:.03376596546737772,y:.2737495643941025},{x:.03461784473664685,y:.27042480648246636},{x:.07159784473664685,y:.1688028064824664},{x:.0724995244823713,y:.166922651750872},{x:.0732016076706368,y:.1649592141085361},{x:.07440224792307432,y:.1629551516523985},{x:.07541246819615938,y:.16084867156853302},{x:.07666362241043057,y:.15918055247485355},{x:.0777352629490018,y:.15739181137154173},{x:.07930380642556048,y:.15566048970702676},{x:.08070556947724908,y:.15379156924569237},{x:.08225811700526783,y:.15239959067120604},{x:.08365813234923056,y:.15085428642438087},{x:.15873913234923054,y:.08277728642438094},{x:.16071062555900373,y:.0813145118522212},{x:.16254708404197357,y:.07968542770293169},{x:.16424441690754124,y:.07869257021816739},{x:.16582360332185575,y:.07752087268448676},{x:.16804258800473576,y:.07647082416071167},{x:.17016157800418052,y:.07523131768336211},{x:.24523757800418056,y:.0406993176833621},{x:.24605678866737324,y:.04041603175027397},{x:.24682124554357093,y:.04000742103699214},{x:.2502190216384501,y:.03897671692697023},{x:.2535747153580455,y:.03781630621794852},{x:.25443345146196317,y:.037698283616711674},{x:.2552629355092742,y:.03744666238185468},{x:.25879650468596477,y:.037098636194782805},{x:.2623141045905799,y:.03661518582049534},{x:.2631793653883337,y:.03666696209348752},{x:.264042,y:.036582000000000045},{x:.376106,y:.036582000000000045},{x:.3770966034546813,y:.036679565924422064},{x:.37809054588497415,y:.03662578154659327},{x:.38147875036256007,y:.037111169723096304},{x:.3848850644907258,y:.03744666238185468},{x:.3858375996101805,y:.03773561075136079},{x:.38682293652697,y:.03787676837406198},{x:.39005134306992567,y:.03901383585544661},{x:.39332675445642906,y:.04000742103699214},{x:.39420461585020444,y:.04047664772778637},{x:.3951434813083616,y:.04080732274273922},{x:.4691044813083616,y:.07533932274273922},{x:.47110618065167786,y:.07652560719175487},{x:.47320939667814427,y:.07752087268448679},{x:.4748915208069018,y:.0787689461703934},{x:.4766934263594154,y:.07983682509171056},{x:.47842523099597173,y:.08139082758714347},{x:.48014799999999996,y:.08266905805748193},{x:.48014799999999996,y:-.15619500000000008},{x:.4810126623818546,y:-.16497406449072585},{x:.483573421036992,y:-.17341575445642912},{x:.4877318674463854,y:-.18119566048588218},{x:.4933281948466053,y:-.18801480515339472},{x:.5001473395141178,y:-.19361113255361462},{x:.5079272455435709,y:-.19776957896300798},{x:.5163689355092742,y:-.20033033761814545},{x:.525148,y:-.20119500000000007},{x:.5339270644907257,y:-.20033033761814545},{x:.542368754456429,y:-.19776957896300798},{x:.5501486604858821,y:-.19361113255361462},{x:.5569678051533946,y:-.18801480515339472},{x:.5625641325536145,y:-.18119566048588218},{x:.5667225789630078,y:-.17341575445642912},{x:.5692833376181453,y:-.16497406449072585},{x:.570148,y:-.15619500000000008},{x:.570148,y:.5581050000000001},{x:.5692833376181453,y:.5668840644907258},{x:.5667225789630078,y:.5753257544564291},{x:.5625641325536145,y:.5831056604858822},{x:.5569678051533946,y:.5899248051533947},{x:.5501486604858821,y:.5955211325536146},{x:.542368754456429,y:.5996795789630079},{x:.5339270644907257,y:.6022403376181454},{x:.525148,y:.6031050000000001},{x:.5163689355092742,y:.6022403376181454},{x:.5079272455435709,y:.5996795789630079},{x:.5001473395141178,y:.5955211325536146},{x:.4933281948466053,y:.5899248051533947},{x:.4877318674463854,y:.5831056604858822},{x:.483573421036992,y:.5753257544564291},{x:.4810126623818546,y:.5668840644907258},{x:.48014799999999996,y:.5581050000000001},{x:.48014799999999996,y:.558005596763998},{x:.4782247267606458,y:.559432223348863},{x:.47629232280480055,y:.5611281889595863},{x:.4746904859851039,y:.5620538174856352},{x:.4732046002880372,y:.5631560030691136},{x:.4708804506539088,y:.5642554633364756},{x:.4686543108210992,y:.5655418481335316},{x:.3946933108210992,y:.5990868481335316},{x:.3939857884552202,y:.5993273179516839},{x:.39332675445642906,y:.5996795789630079},{x:.3898152875083263,y:.6007447708163117},{x:.38634099890642704,y:.6019255978665906},{x:.3856001580501581,y:.6020234163584227},{x:.3848850644907258,y:.6022403376181454},{x:.38123326077373504,y:.6026000088910167},{x:.3775953617236344,y:.6030803465985108},{x:.3768496724756141,y:.6030317546542387},{x:.376106,y:.6031050000000001},{x:.264042,y:.6031050000000001},{x:.26342400033164626,y:.6030441323453897},{x:.26280456058717394,y:.6030879828235033},{x:.25903957642572706,y:.602612304281983},{x:.2552629355092742,y:.6022403376181454},{x:.254668685221597,y:.6020600737641458},{x:.25405259303422617,y:.6019822349683996},{x:.25045275226756825,y:.6007811844842303},{x:.24682124554357093,y:.5996795789630079},{x:.24627358134186672,y:.5993868463484354},{x:.24568451278884912,y:.5991903095800973},{x:.17060851278884911,y:.5656453095800973},{x:.16826609518471405,y:.5643091772352096},{x:.16582839971196278,y:.5631560030691136},{x:.1644435861855132,y:.5621287897998347},{x:.16294590048199914,y:.5612744987855388},{x:.1609091582647261,y:.559507056844315},{x:.15874327554635076,y:.5579004698017108},{x:.08366227554635075,y:.4898404698017108},{x:.0822135909199537,y:.48824184486316324},{x:.08061175169940471,y:.4867967151276658},{x:.07925889408089541,y:.48498133393711457},{x:.07773859373239328,y:.48330368097737925},{x:.0766296214289207,y:.4814531488185024},{x:.0753404919252871,y:.4797232835162987},{x:.07436779238761855,y:.4776788549378484},{x:.07320399804016177,y:.47573684172476444},{x:.07247735524331753,y:.47370551725863386},{x:.07155047598047157,y:.4717573941431678},{x:.034570475980471575,y:.3691493941431678},{x:.03374586128764337,y:.36588916100716024},{x:.032769662381854636,y:.3626710644907258},{x:.032666195333495754,y:.36162054591923504},{x:.032407352052251925,y:.36059717166956007},{x:.03223462203187315,y:.35723870865311785},{x:.031905,y:.353892},{x:.031905,y:.285813}],[{x:.121905,y:.2937462257558374},{x:.121905,y:.3460304727958324},{x:.1524170009298456,y:.4306917867874386},{x:.21387346155335435,y:.48640130996954867},{x:.2736381428091649,y:.513105},{x:.36637802828147564,y:.513105},{x:.4250638403772601,y:.4864880590885319},{x:.48014799999999996,y:.4365549481293854},{x:.48014799999999996,y:.20413270643748072},{x:.4248733312055972,y:.15401438585682045},{x:.36611835928516706,y:.12658200000000003},{x:.27389496414813935,y:.12658200000000003},{x:.2140623112166411,y:.15410266134357853},{x:.15236330162501277,y:.21004602219345103},{x:.121905,y:.2937462257558374}]],r:[[{x:.062422000000000005,y:.03920400000000002},{x:.06328666238185464,y:.030424935509274227},{x:.0658474210369921,y:.02198324554357097},{x:.07000586744638546,y:.01420333951411792},{x:.07560219484660537,y:.00738419484660538},{x:.08242133951411793,y:.0017878674463854757},{x:.09020124554357097,y:-.002370578963007887},{x:.09864293550927423,y:-.004931337618145348},{x:.107422,y:-.005795999999999982},{x:.11620106449072577,y:-.004931337618145348},{x:.12464275445642904,y:-.002370578963007887},{x:.1324226604858821,y:.0017878674463854827},{x:.13924180515339463,y:.00738419484660538},{x:.14483813255361455,y:.01420333951411792},{x:.14899657896300791,y:.02198324554357098},{x:.15155733761814538,y:.030424935509274248},{x:.152422,y:.03920400000000002},{x:.152422,y:.3275398012121413},{x:.1925108808296549,y:.4204278633799401},{x:.27478075869941443,y:.4836647262821032},{x:.3576648607132649,y:.5150589999999999},{x:.49463,y:.5150589999999999},{x:.5034090644907258,y:.5159236623818546},{x:.511850754456429,y:.5184844210369921},{x:.5196306604858821,y:.5226428674463854},{x:.5264498051533947,y:.5282391948466053},{x:.5320461325536145,y:.5350583395141179},{x:.5362045789630079,y:.542838245543571},{x:.5387653376181454,y:.5512799355092742},{x:.53963,y:.560059},{x:.5387653376181454,y:.5688380644907257},{x:.5362045789630079,y:.577279754456429},{x:.5320461325536145,y:.5850596604858821},{x:.5264498051533947,y:.5918788051533946},{x:.5196306604858821,y:.5974751325536145},{x:.511850754456429,y:.6016335789630078},{x:.5034090644907258,y:.6041943376181453},{x:.49463,y:.605059},{x:.349428,y:.605059},{x:.34572095329292224,y:.6046938877675093},{x:.3420044651532413,y:.6044424555930356},{x:.34133700376168824,y:.6042621064259311},{x:.3406489355092742,y:.6041943376181453},{x:.33708434852821606,y:.6031130319790114},{x:.33348832364990477,y:.6021413801353276},{x:.23668632364990477,y:.5654753801353276},{x:.2347311434313091,y:.5645060813254815},{x:.23268939209293205,y:.5637356779621759},{x:.23078888495220712,y:.562551669954317},{x:.22878273496962892,y:.5615571024090896},{x:.2270542238076375,y:.5602249916656349},{x:.22520200238894322,y:.5590710654608507},{x:.152422,y:.5031286093364514},{x:.152422,y:.560059},{x:.15155733761814538,y:.5688380644907257},{x:.14899657896300791,y:.577279754456429},{x:.14483813255361455,y:.5850596604858821},{x:.13924180515339463,y:.5918788051533946},{x:.1324226604858821,y:.5974751325536145},{x:.12464275445642904,y:.6016335789630078},{x:.11620106449072577,y:.6041943376181453},{x:.107422,y:.605059},{x:.09864293550927423,y:.6041943376181453},{x:.09020124554357094,y:.6016335789630078},{x:.08242133951411793,y:.5974751325536145},{x:.07560219484660537,y:.5918788051533946},{x:.07000586744638546,y:.5850596604858821},{x:.0658474210369921,y:.577279754456429},{x:.06328666238185464,y:.5688380644907257},{x:.062422000000000005,y:.560059},{x:.062422000000000005,y:.03920400000000002}]],s:[[{x:.056563,y:.369888},{x:.056809270227573656,y:.3673875764180495},{x:.05684306423764694,y:.36487528163458033},{x:.05724057756471223,y:.36300843953465567},{x:.057427662381854636,y:.3611089355092742},{x:.05815700903783985,y:.3587046018033244},{x:.05868027810379197,y:.35624717294397146},{x:.05943435615016931,y:.3544937526945111},{x:.0599884210369921,y:.352667245543571},{x:.06117281573842168,y:.3504513989095756},{x:.06216545092350078,y:.34814327358726177},{x:.06324711489275962,y:.3465706581451233},{x:.06414686744638545,y:.3448873395141179},{x:.06574079456909979,y:.3429451336955602},{x:.0671646494598194,y:.3408750118720105},{x:.06853233161222538,y:.3395436359667022},{x:.06974319484660536,y:.33806819484660533},{x:.07168540066516299,y:.33647426772389105},{x:.07348575731657993,y:.3347217030198468},{x:.07508689839402109,y:.33368273068076537},{x:.07656233951411792,y:.33247186744638546},{x:.07877818614811302,y:.331287472744956},{x:.08088585786376518,y:.3299198152391437},{x:.15568385786376518,y:.29122381523914376},{x:.1574569269125657,y:.29051717359061785},{x:.15914024554357095,y:.2896174210369921},{x:.16154457924952065,y:.28888807438100694},{x:.16387856938737105,y:.2879578823843842},{x:.16575542835833412,y:.2876107272686775},{x:.16758193550927422,y:.2870566623818547},{x:.17008235909122482,y:.286810392154281},{x:.17255297371919248,y:.2863534124236203},{x:.17446149597461844,y:.28637908481714247},{x:.176361,y:.28619200000000006},{x:.288347309340128,y:.28619200000000006},{x:.3974525128623667,y:.21942256309828728},{x:.45549,y:.1602321160680505},{x:.45549,y:.13007078589845048},{x:.407404042616179,y:.10590438131127383},{x:.31753214348357883,y:.07103500000000003},{x:.21224543978224936,y:.07103500000000003},{x:.16354378174687056,y:.09622932957230687},{x:.14433666195924297,y:.15500005013212306},{x:.1407876006468136,y:.16307617408904287},{x:.13573115992893667,y:.17030473007440486},{x:.12936165598671553,y:.1764079287355125},{x:.12192386528459082,y:.18115122757053267},{x:.11370361794808405,y:.18435234426530817},{x:.10501681347236942,y:.18588826170046568},{x:.09619728088183255,y:.18569995543032455},{x:.08758394986787689,y:.1837946619592429},{x:.07950782591095708,y:.18024560064681355},{x:.07227926992559508,y:.1751891599289366},{x:.06617607126448745,y:.1688196559867155},{x:.06143277242946728,y:.16138186528459075},{x:.05823165573469179,y:.153161617948084},{x:.05669573829953427,y:.14447481347236937},{x:.0568840445696754,y:.1356552808818325},{x:.05878933804075704,y:.12704194986787684},{x:.08372233804075704,y:.050750949867876836},{x:.08542587043333498,y:.04687444913825993},{x:.08709879890390285,y:.042984643121031924},{x:.08719974017890864,y:.04283789110571456},{x:.0872713993531864,y:.04267482591095703},{x:.0896984666241539,y:.03920515373890898},{x:.0920981137517354,y:.03571646140762123},{x:.09222574536637099,y:.03559222185697407},{x:.09232784007106334,y:.035446269925595034},{x:.09538517138631239,y:.032516763866873036},{x:.0984193200775319,y:.02956325371133576},{x:.09856873722042347,y:.029466301081615798},{x:.09869734401328446,y:.029343071264487396},{x:.10226744784494098,y:.027066310594042624},{x:.10581949746716537,y:.024761484353185106},{x:.18061849746716538,y:-.013933515646814817},{x:.1823912439162618,y:-.014639995851387814},{x:.18407424554357094,y:-.01553957896300786},{x:.18647892276401756,y:-.016269029822976466},{x:.18881326125361947,y:-.017199317363260178},{x:.19068977232738848,y:-.017546377073194466},{x:.1925159355092742,y:-.018100337618145335},{x:.19501671633437545,y:-.018346643031098245},{x:.19748769126025723,y:-.018803648509519946},{x:.19939585369049342,y:-.018777950414796084},{x:.201295,y:-.018964999999999968},{x:.325956,y:-.018964999999999968},{x:.3298421413721484,y:-.018582248482612737},{x:.33373593654739714,y:-.01828737118339306},{x:.334227355251249,y:-.018150342613638803},{x:.3347350644907258,y:-.018100337618145335},{x:.33847186362931597,y:-.016966791992147238},{x:.34223331291484477,y:-.015917938922943478},{x:.44196531291484475,y:.022777061077056446},{x:.44388622686678575,y:.02374867869889352},{x:.4458951331158935,y:.02452214291663178},{x:.5206971331158935,y:.06211514291663188},{x:.5230429253028388,y:.06359852573319036},{x:.5254906604858821,y:.06490686744638552},{x:.526762463529903,y:.06595060923072474},{x:.5281530225051898,y:.06682994172267823},{x:.5301643473216751,y:.06874246310749585},{x:.5323098051533947,y:.07050319484660542},{x:.5333535469377338,y:.07177499789062616},{x:.5345458374532134,y:.07290871885358566},{x:.536145400814505,y:.07517688168239829},{x:.5379061325536145,y:.07732233951411796},{x:.538681702666837,y:.0787733291400739},{x:.5396299056666436,y:.08011787031323085},{x:.5407562372498129,y:.08265451036052812},{x:.5420645789630079,y:.08510224554357101},{x:.5425421726806072,y:.08667666103386074},{x:.5432098492552168,y:.08818035245395842},{x:.5438196647691762,y:.09088798806528645},{x:.5446253376181454,y:.09354393550927428},{x:.5447866012813922,y:.09518127295954937},{x:.5451480929944793,y:.09678632860859225},{x:.545217957571016,y:.09956090686586556},{x:.54549,y:.10232300000000005},{x:.54549,y:.17861300000000002},{x:.5450792542455133,y:.1827833716312913},{x:.5447095428008049,y:.18695758114513777},{x:.5446471218945653,y:.18717088502046353},{x:.5446253376181454,y:.1873920644907258},{x:.5434088850836819,y:.19140217107899518},{x:.5422319296624953,y:.19542404720269643},{x:.5421290946347417,y:.1956210747891699},{x:.5420645789630079,y:.19583375445642906},{x:.5400891672372728,y:.199529489854385},{x:.5381501975764,y:.20324447414399938},{x:.5380109003195782,y:.20341765378196683},{x:.5379061325536145,y:.20361366048588211},{x:.5352476756014034,y:.20685299965477524},{x:.5326212052175259,y:.21011832734743824},{x:.45781920521752584,y:.28640632734743826},{x:.45695946559173245,y:.28712616331644525},{x:.45621413415776596,y:.2879638966272176},{x:.45358375241990234,y:.28995255364350675},{x:.45105542866152953,y:.29206944848930627},{x:.4500717756605794,y:.29260772613156716},{x:.4491773318997613,y:.2932839556822147},{x:.3245133318997613,y:.3695749556822147},{x:.3213472249094816,y:.3711082739568931},{x:.3182447544564291,y:.37276657896300797},{x:.31738368821196916,y:.37302778055263114},{x:.3165738477898179,y:.3734199792757539},{x:.31316944110160955,y:.3743061584374605},{x:.3098030644907258,y:.3753273376181454},{x:.3089075854904768,y:.3754155346015568},{x:.3080367917497669,y:.3756422053074494},{x:.30452491480344407,y:.37584718998797495},{x:.301024,y:.376192},{x:.18731182116617404,y:.376192},{x:.146563,y:.397272996602132},{x:.146563,y:.42779681790574337},{x:.20153437253410483,y:.48386323770148376},{x:.2842918489876165,y:.5150589999999999},{x:.39008456648169626,y:.5150589999999999},{x:.4553477907191711,y:.4822576837794137},{x:.4635801440629335,y:.47908783003036465},{x:.47227272283422006,y:.4775849365970516},{x:.4810914761057044,y:.47780675883128426},{x:.48969750413477736,y:.47974477222900047},{x:.4977600820905977,y:.48332450002217653},{x:.5049693696238691,y:.488408375279255},{x:.5110483178577028,y:.4948010275251766},{x:.5157633162205862,y:.5022567907191711},{x:.5189331699696352,y:.5104891440629334},{x:.5204360634029483,y:.51918172283422},{x:.5202142411687157,y:.5280004761057044},{x:.5182762277709995,y:.5366065041347774},{x:.5146964999778234,y:.5446690820905977},{x:.509612624720745,y:.551878369623869},{x:.5032199724748234,y:.5579573178577029},{x:.49576420928082887,y:.5626723162205862},{x:.42096520928082887,y:.6002663162205862},{x:.41942927464851043,y:.6008577252562829},{x:.41797775445642904,y:.6016335789630078},{x:.4153223812886681,y:.6024390776071881},{x:.41273285593706643,y:.6034361699696352},{x:.41111105567880996,y:.6037165692645292},{x:.40953606449072577,y:.6041943376181453},{x:.40677456858393113,y:.6044663212253706},{x:.4040402771657799,y:.6049390634029483},{x:.4023949361559939,y:.6048976773693867},{x:.400757,y:.605059},{x:.276092,y:.605059},{x:.2724204350331364,y:.6046973824138966},{x:.26873912724910987,y:.6044542166602351},{x:.2680367190736708,y:.6042656240771296},{x:.2673129355092742,y:.6041943376181453},{x:.2637824667250502,y:.6031233816208718},{x:.26021933352302795,y:.6021667007079561},{x:.1604883335230279,y:.5645727007079561},{x:.15963695838633216,y:.5641523105976027},{x:.15873109713512196,y:.563867735718488},{x:.15568848233041307,y:.5622026409240001},{x:.1525785174681621,y:.5606670094317409},{x:.15182551530799093,y:.5600886019499048},{x:.15099257773152036,y:.559632770334096},{x:.14833326979676884,y:.5574060851671644},{x:.1455826488796249,y:.5552932363569977},{x:.14495695714670492,y:.554579039378831},{x:.14422895256892138,y:.5539694683796904},{x:.06943095256892137,y:.47768146837969044},{x:.06680494464711424,y:.4744165369262552},{x:.06414686744638545,y:.4711776604858821},{x:.0640418150384659,y:.470981121254323},{x:.0639021439692389,y:.47080746737336276},{x:.06196355058191934,y:.4670929619312254},{x:.0599884210369921,y:.46339775445642906},{x:.05992373008360734,y:.46318449696300446},{x:.05982062094636722,y:.462986931318802},{x:.05864394115023422,y:.4589655982489849},{x:.057427662381854636,y:.45495606449072584},{x:.05740581892006417,y:.454734284101312},{x:.05734323414113077,y:.4545203990307778},{x:.05697368708086039,y:.4503467759079653},{x:.056563,y:.44617700000000005},{x:.056563,y:.369888}]],t:[[{x:.036055000000000004,y:.484201},{x:.03691966238185464,y:.4754219355092742},{x:.0394804210369921,y:.466980245543571},{x:.04363886744638546,y:.4592003395141179},{x:.049235194846605365,y:.45238119484660533},{x:.05605433951411792,y:.44678486744638546},{x:.06383424554357096,y:.44262642103699207},{x:.07227593550927423,y:.4400656623818546},{x:.081055,y:.439201},{x:.201032,y:.439201},{x:.201032,y:.17345100000000002},{x:.2013458215844704,y:.17026471598156256},{x:.20148726326025637,y:.1670661406603643},{x:.20177732050748418,y:.165883633894134},{x:.20189666238185464,y:.16467193550927425},{x:.20282606714776777,y:.16160809859877695},{x:.20358880215081968,y:.15849857690755997},{x:.20410398165518515,y:.15739537903902878},{x:.2044574210369921,y:.15623024554357098},{x:.20596669248041014,y:.15340659727526443},{x:.20732140933230742,y:.15050562638878262},{x:.2623124093323074,y:.05773162638878261},{x:.2645408071528226,y:.05469603003381387},{x:.2666808493837164,y:.051597510818645845},{x:.2671477670132535,y:.051144744093296994},{x:.26753264280400524,y:.05062045370997057},{x:.2703104380556505,y:.04807792433615628},{x:.27301385108661325,y:.04545644382682572},{x:.2735601274310704,y:.04510346799784869},{x:.2740398919211364,y:.04466433724917905},{x:.27726033549019774,y:.04271258283448707},{x:.28042322867453984,y:.040668883056825214},{x:.28102787064035484,y:.04042926278737637},{x:.28158408674943697,y:.04009216722176761},{x:.28512341879560005,y:.038806192593798694},{x:.288624243922019,y:.03741881178414046},{x:.39861224392201905,y:.005893811784140432},{x:.4004470188387682,y:.005558110934368086},{x:.4022319355092743,y:.0050166623818546086},{x:.4047755505163489,y:.004766138170207483},{x:.4072897364122725,y:.0043061284251197166},{x:.4091547486303562,y:.0043348248023798485},{x:.411011,y:.004151999999999975},{x:.520997,y:.004151999999999975},{x:.5297760644907258,y:.0050166623818546086},{x:.538217754456429,y:.00757742103699207},{x:.5459976604858822,y:.011735867446385433},{x:.5528168051533947,y:.017332194846605337},{x:.5584131325536146,y:.02415133951411788},{x:.5625715789630079,y:.031931245543570935},{x:.5651323376181454,y:.040372935509274205},{x:.5659970000000001,y:.049151999999999973},{x:.5651323376181454,y:.05793106449072574},{x:.5625715789630079,y:.06637275445642901},{x:.5584131325536146,y:.07415266048588207},{x:.5528168051533947,y:.08097180515339461},{x:.5459976604858822,y:.08656813255361451},{x:.538217754456429,y:.09072657896300787},{x:.5297760644907258,y:.09328733761814534},{x:.520997,y:.09415199999999997},{x:.41733272532416527,y:.09415199999999997},{x:.33061421916568134,y:.11900744701827656},{x:.291032,y:.1857856616511605},{x:.291032,y:.439201},{x:.466004,y:.439201},{x:.47478306449072577,y:.4400656623818546},{x:.48322475445642904,y:.44262642103699207},{x:.4910046604858821,y:.44678486744638546},{x:.49782380515339464,y:.45238119484660533},{x:.5034201325536145,y:.4592003395141179},{x:.5075785789630078,y:.466980245543571},{x:.5101393376181453,y:.4754219355092742},{x:.511004,y:.484201},{x:.5101393376181453,y:.4929800644907258},{x:.5075785789630078,y:.501421754456429},{x:.5034201325536145,y:.5092016604858821},{x:.49782380515339464,y:.5160208051533947},{x:.4910046604858821,y:.5216171325536145},{x:.48322475445642904,y:.5257755789630079},{x:.47478306449072577,y:.5283363376181454},{x:.466004,y:.529201},{x:.291032,y:.529201},{x:.291032,y:.702148},{x:.2901673376181454,y:.7109270644907257},{x:.2876065789630079,y:.719368754456429},{x:.28344813255361456,y:.7271486604858821},{x:.27785180515339464,y:.7339678051533947},{x:.2710326604858821,y:.7395641325536145},{x:.26325275445642904,y:.7437225789630079},{x:.25481106449072577,y:.7462833376181454},{x:.246032,y:.747148},{x:.23725293550927423,y:.7462833376181454},{x:.22881124554357096,y:.7437225789630079},{x:.2210313395141179,y:.7395641325536145},{x:.21421219484660536,y:.7339678051533947},{x:.20861586744638547,y:.7271486604858821},{x:.2044574210369921,y:.719368754456429},{x:.20189666238185464,y:.7109270644907257},{x:.201032,y:.702148},{x:.201032,y:.529201},{x:.081055,y:.529201},{x:.07227593550927423,y:.5283363376181454},{x:.06383424554357094,y:.5257755789630079},{x:.05605433951411792,y:.5216171325536145},{x:.049235194846605365,y:.5160208051533947},{x:.04363886744638546,y:.5092016604858821},{x:.0394804210369921,y:.501421754456429},{x:.03691966238185464,y:.4929800644907258},{x:.036055000000000004,y:.484201}]],u:[[{x:.047041,y:.17386599999999997},{x:.04733731084809023,y:.17085750547164297},{x:.04744678100255899,y:.1678364368310572},{x:.0477687404511641,y:.16647712720137547},{x:.04790566238185463,y:.1650869355092742},{x:.048783207866406234,y:.16219405573845885},{x:.04947995583647738,y:.15925239265237093},{x:.08761895583647737,y:.04817539265237096},{x:.08938287590080696,y:.04431825367483454},{x:.09111755940033861,y:.04044787795123246},{x:.0912166047918106,y:.04030846472648272},{x:.0912877277290914,y:.04015294120864865},{x:.09377024504918263,y:.03671403980837168},{x:.09622666993792225,y:.03325645223155292},{x:.09635101037087945,y:.03313904059014135},{x:.09645110783403886,y:.03300038080982997},{x:.09955682066149267,y:.030111872039067004},{x:.10264058790854466,y:.027199945760571206},{x:.10278544504987946,y:.027109047766032002},{x:.10291067034954356,y:.026992580340839414},{x:.10652022788210418,y:.024765467971757132},{x:.11011283004156149,y:.02251110668543916},{x:.1858688300415615,y:-.015231893314560811},{x:.1873332068933575,y:-.0157898639141544},{x:.18871524554357097,y:-.01652857896300789},{x:.19144581156206075,y:-.017356887109087667},{x:.19411224226228255,y:-.018372875537717062},{x:.1956573361874375,y:-.018634439137126358},{x:.19715693550927424,y:-.019089337618145352},{x:.1999966293703256,y:-.019369023051625026},{x:.20281003486202434,y:-.01984529472354478},{x:.2043764687674932,y:-.01980039958033106},{x:.205936,y:-.019953999999999986},{x:.319832,y:-.019953999999999986},{x:.32132997950952447,y:-.01980646189590665},{x:.3228344649392302,y:-.019853723877644197},{x:.3257100002545037,y:-.019375067506000147},{x:.3286110644907258,y:-.019089337618145352},{x:.3300514774877758,y:-.018652393112465325},{x:.33153627500704863,y:-.018405236421526333},{x:.3342631764918695,y:-.017374788187221168},{x:.33705275445642907,y:-.01652857896300789},{x:.3383802466773209,y:-.015819019588053155},{x:.3397882963501792,y:-.015286942317463331},{x:.4160692963501792,y:.02245605768253664},{x:.4183042276197719,y:.02384992521458428},{x:.42064256487504254,y:.025062345668598177},{x:.4220380841989542,y:.02617863282445781},{x:.4235544084161923,y:.027124324140885128},{x:.42547446604244665,y:.028927422360218155},{x:.42753134130624215,y:.03057273346328787},{x:.465011,y:.06712410441560081},{x:.465011,y:.025046000000000013},{x:.4658756623818546,y:.016266935509274223},{x:.46843642103699207,y:.007825245543570968},{x:.47259486744638546,y:45339514117916785e-21},{x:.4781911948466053,y:-.006773805153394624},{x:.4850103395141179,y:-.012370132553614528},{x:.492790245543571,y:-.01652857896300789},{x:.5012319355092743,y:-.019089337618145352},{x:.510011,y:-.019953999999999986},{x:.5187900644907257,y:-.019089337618145352},{x:.527231754456429,y:-.01652857896300789},{x:.5350116604858821,y:-.012370132553614521},{x:.5418308051533947,y:-.006773805153394624},{x:.5474271325536145,y:45339514117916785e-21},{x:.5515855789630079,y:.007825245543570974},{x:.5541463376181454,y:.016266935509274244},{x:.555011,y:.025046000000000013},{x:.555011,y:.545898},{x:.5541463376181454,y:.5546770644907257},{x:.5515855789630079,y:.563118754456429},{x:.5474271325536145,y:.5708986604858821},{x:.5418308051533947,y:.5777178051533947},{x:.5350116604858821,y:.5833141325536145},{x:.527231754456429,y:.5874725789630079},{x:.5187900644907257,y:.5900333376181454},{x:.510011,y:.590898},{x:.5012319355092743,y:.5900333376181454},{x:.492790245543571,y:.5874725789630079},{x:.4850103395141179,y:.5833141325536145},{x:.4781911948466053,y:.5777178051533947},{x:.47259486744638546,y:.5708986604858821},{x:.46843642103699207,y:.563118754456429},{x:.4658756623818546,y:.5546770644907257},{x:.465011,y:.545898},{x:.465011,y:.19283699530520199},{x:.36978450462305706,y:.099969048308901},{x:.30930812362389754,y:.07004600000000001},{x:.2165251763155874,y:.07004600000000001},{x:.16675256431883717,y:.09484360935890679},{x:.137041,y:.18137632992954258},{x:.137041,y:.545898},{x:.13617633761814535,y:.5546770644907257},{x:.1336155789630079,y:.563118754456429},{x:.12945713255361452,y:.5708986604858821},{x:.12386080515339463,y:.5777178051533947},{x:.11704166048588208,y:.5833141325536145},{x:.10926175445642904,y:.5874725789630079},{x:.10082006449072577,y:.5900333376181454},{x:.092041,y:.590898},{x:.08326193550927423,y:.5900333376181454},{x:.07482024554357093,y:.5874725789630079},{x:.06704033951411792,y:.5833141325536145},{x:.06022119484660536,y:.5777178051533947},{x:.05462486744638546,y:.5708986604858821},{x:.050466421036992094,y:.563118754456429},{x:.04790566238185463,y:.5546770644907257},{x:.047041,y:.545898},{x:.047041,y:.17386599999999997}]],v:[[{x:.003930906419490336,y:.5438334563092145},{x:.005386967221411215,y:.5351329102741644},{x:.00851244255100142,y:.5268836061622384},{x:.26071044255100145,y:.018289606162238365},{x:.26144011887972296,y:.017121905714788027},{x:.2620056398700735,y:.01586646241095203},{x:.26377267234206975,y:.013389122267562115},{x:.26538522214413157,y:.010808560104194675},{x:.26632868500311185,y:.009805649483352854},{x:.267128264504625,y:.008684656842684199},{x:.2693446490294707,y:.006599649029470163},{x:.2714296568426842,y:.00438326450462502},{x:.27255064948335267,y:.0035836850031119977},{x:.2735535601041947,y:.0026402221441315446},{x:.27613412226756273,y:.0010276723420693272},{x:.278611462410952,y:-.0007393601299264599},{x:.2798669057147878,y:-.0013048811202769175},{x:.28103460616223835,y:-.0020345574489985807},{x:.28388017640738666,y:-.0031126798553442526},{x:.2866546460885495,y:-.00436245420755494},{x:.28799629407344673,y:-.00467218403223142},{x:.2892839102741644,y:-.005160032778588779},{x:.2922851349323858,y:-.00566229614975999},{x:.29525011283741587,y:-.006346784254711718},{x:.2966264067237199,y:-.006388820170250395},{x:.2979844563092145,y:-.006616093580509658},{x:.301026,y:-.00652319621682493},{x:.30406754369078554,y:-.006616093580509658},{x:.3054255932762801,y:-.006388820170250395},{x:.30680188716258416,y:-.006346784254711718},{x:.30976686506761425,y:-.005662296149759988},{x:.31276808972583564,y:-.005160032778588779},{x:.3140557059265533,y:-.00467218403223142},{x:.3153973539114505,y:-.00436245420755494},{x:.3181718235926135,y:-.0031126798553442175},{x:.3210173938377617,y:-.0020345574489985807},{x:.32218509428521225,y:-.0013048811202769192},{x:.323440537589048,y:-.0007393601299264599},{x:.32591787773243747,y:.0010276723420694187},{x:.32849843989580535,y:.0026402221441315446},{x:.32950135051664736,y:.0035836850031119635},{x:.3306223431573158,y:.00438326450462502},{x:.3327073509705293,y:.006599649029470129},{x:.334923735495375,y:.008684656842684203},{x:.33572331499688823,y:.009805649483352899},{x:.33666677785586846,y:.01080856010419469},{x:.3382793276579303,y:.013389122267562135},{x:.3400463601299265,y:.01586646241095204},{x:.34061188112027707,y:.017121905714788034},{x:.3413415574489986,y:.018289606162238365},{x:.5935395574489987,y:.5268836061622384},{x:.5966650327785888,y:.5351329102741644},{x:.5981210935805097,y:.5438334563092145},{x:.5978517842547117,y:.5526508871625841},{x:.595867454207555,y:.5612463539114505},{x:.5922443601299265,y:.569289537589048},{x:.587121735495375,y:.5764713431573159},{x:.5806964398958053,y:.5825157778558685},{x:.5732153938377617,y:.5871905574489986},{x:.5649660897258356,y:.5903160327785888},{x:.5562655436907855,y:.5917720935805096},{x:.5474481128374159,y:.5915027842547117},{x:.5388526460885495,y:.589518454207555},{x:.5308094624109521,y:.5858953601299265},{x:.5236276568426842,y:.580772735495375},{x:.5175832221441315,y:.5743474398958054},{x:.5129084425510014,y:.5668663938377616},{x:.301026,y:.13957458745236595},{x:.08914355744899859,y:.5668663938377616},{x:.08446877785586845,y:.5743474398958054},{x:.07842434315731579,y:.580772735495375},{x:.07124253758904797,y:.5858953601299265},{x:.06319935391145051,y:.589518454207555},{x:.054603887162584124,y:.5915027842547117},{x:.04578645630921451,y:.5917720935805096},{x:.037085910274164385,y:.5903160327785888},{x:.028836606162238352,y:.5871905574489986},{x:.02135556010419467,y:.5825157778558685},{x:.014930264504625007,y:.5764713431573159},{x:.009807639870073534,y:.569289537589048},{x:.006184545792445054,y:.5612463539114505},{x:.004200215745288276,y:.5526508871625841},{x:.003930906419490336,y:.5438334563092145}]],w:[[{x:-.04481226541001698,y:.5427688011711321},{x:-.0431501306438814,y:.534105261341125},{x:.1073618693561186,y:.025511261341124997},{x:.10747750697825527,y:.02522662926113043},{x:.10753949092041715,y:.02492572151525217},{x:.1091366577408943,y:.021142772088450095},{x:.11068223944402648,y:.01733845540642648},{x:.11085118408582124,y:.017081852232977028},{x:.1109706812129555,y:.01679881881229654},{x:.11327517574267339,y:.0134001494872997},{x:.11553324489331337,y:.009970459715744673},{x:.11574900410692728,y:.009751746564891355},{x:.11592142221145292,y:.009497464285038355},{x:.11884468401801046,y:.006613684018010047},{x:.12172846428503836,y:.0036904222114529234},{x:.12198274656489135,y:.0035180041069272803},{x:.12220145971574467,y:.0033022448933133844},{x:.1256311494872997,y:.001044175742673395},{x:.12902981881229655,y:-.0012603187870445023},{x:.12931285223297703,y:-.0013798159141787526},{x:.12956945540642648,y:-.0015487605559735135},{x:.1333737720884501,y:-.0030943422591057004},{x:.13715672151525218,y:-.004691509079582858},{x:.13745762926113045,y:-.004753493021744735},{x:.137742261341125,y:-.004869130643881392},{x:.14177500717701197,y:-.005642829061426576},{x:.14579686008065018,y:-.006471289947453558},{x:.1461040784358031,y:-.006473378696506754},{x:.14640580117113214,y:-.006531265410016966},{x:.150512,y:-.006503347745684165},{x:.15461819882886788,y:-.006531265410016966},{x:.15491992156419693,y:-.006473378696506754},{x:.15522713991934983,y:-.006471289947453558},{x:.159248992822988,y:-.005642829061426585},{x:.16328173865887502,y:-.004869130643881392},{x:.16356637073886957,y:-.004753493021744732},{x:.16386727848474786,y:-.004691509079582851},{x:.1676502279115502,y:-.0030943422591055763},{x:.17145454459357354,y:-.0015487605559735135},{x:.17171114776702298,y:-.0013798159141787517},{x:.17199418118770346,y:-.0012603187870445023},{x:.17539285051270065,y:.001044175742673613},{x:.17882254028425534,y:.0033022448933133844},{x:.17904125343510863,y:.0035180041069272374},{x:.17929553571496165,y:.0036904222114529095},{x:.18217931598198978,y:.006613684018010279},{x:.1851025777885471,y:.009497464285038375},{x:.18527499589307275,y:.009751746564891386},{x:.18549075510668664,y:.009970459715744683},{x:.1877488242573266,y:.013400149487299715},{x:.1900533187870445,y:.016798818812296553},{x:.19017281591417878,y:.01708185223297707},{x:.19034176055597352,y:.01733845540642648},{x:.19188734225910553,y:.02114277208844964},{x:.19348450907958287,y:.02492572151525217},{x:.19354649302174473,y:.02522662926113043},{x:.1936621306438814,y:.025511261341124997},{x:.30102443002882817,y:.38829842311817664},{x:.4083889386148475,y:.025511027311792445},{x:.40850451632069196,y:.025226547135196155},{x:.40856646677585007,y:.0249257992040805},{x:.410163689741502,y:.021142697708463984},{x:.41170935302882616,y:.01733823938560964},{x:.41187820927072055,y:.017081773507688556},{x:.41199764237598097,y:.016798890297984457},{x:.41430222163921304,y:.013400082779514221},{x:.4165603984391837,y:.009970270005002412},{x:.41677604416644776,y:.009751674265617277},{x:.4169483701745541,y:.009497526820430955},{x:.41987174204670485,y:.006613627545966159},{x:.42275565189129766,y:.0036902661012626486},{x:.42300979995956794,y:.0035179410120882958},{x:.4232283964786704,y:.003302296075210584},{x:.4266582174181369,y:.0010441316765615349},{x:.4300570332693414,y:-.001260435297455717},{x:.43033991691088264,y:-.001379867379883588},{x:.4305963833993421,y:-.0015487226944633017},{x:.43440084731088763,y:-.0030943722258508074},{x:.43818395458161874,y:-.004691581512785238},{x:.43848470273672896,y:-.004753530880516994},{x:.4387691833312223,y:-.0048691075577547704},{x:.44280208680029426,y:-.005642843777199688},{x:.4468241027997286,y:-.0064713155198797695},{x:.44713115788546864,y:-.006473401493455157},{x:.44743272015628793,y:-.006531257986460835},{x:.45153908096424766,y:-.006503346644966049},{x:.45564544187310013,y:-.00653124313893301},{x:.4559470039347234,y:-.006473385555557348},{x:.4562540590129192,y:-.0064712984717510205},{x:.4602760720167908,y:-.005642812186517322},{x:.4643089726882076,y:-.004869061385152536},{x:.46459345286480397,y:-.004753483679308031},{x:.46489420079591953,y:-.0046915332241499325},{x:.46867730229153426,y:-.003094310258498727},{x:.4724817606143904,y:-.0015486469711738574},{x:.4727382264923116,y:-.0013797907292793573},{x:.47302110970201555,y:-.0012603576240190345},{x:.4764199172204845,y:.0010442216392121837},{x:.47984972999499764,y:.0033023984391836667},{x:.4800683257343829,y:.003518044166447842},{x:.48032247317956905,y:.003690370174554085},{x:.483206372454032,y:.0066137420467029156},{x:.48612973389873737,y:.009497651891297622},{x:.4863020589879118,y:.009751799959568049},{x:.48651770392478944,y:.009970396478670394},{x:.4887758683234383,y:.01340021741813658},{x:.49108043529745576,y:.016799033269341422},{x:.49119986737988364,y:.017081916910882677},{x:.4913687226944633,y:.017338383399342037},{x:.4929143722258502,y:.021142847310886045},{x:.4945115815127853,y:.024925954581618698},{x:.4945735308805171,y:.025226702736729056},{x:.4946891075577548,y:.025511183331222268},{x:.6452021075577549,y:.5341051833312223},{x:.6468642579864609,y:.542768720156288},{x:.646804298471751,y:.5515900590129192},{x:.64502453322415,y:.5602302007959196},{x:.641593357624019,y:.5683571097020156},{x:.636642629825446,y:.5756584731795691},{x:.6303626035213297,y:.5818537039247894},{x:.622994616600658,y:.5867047226944633},{x:.6148218166687778,y:.5900251075577548},{x:.6061582798437121,y:.5916872579864608},{x:.5973369409870808,y:.591627298471751},{x:.5886967992040805,y:.58984753322415},{x:.5805698902979844,y:.5864163576240191},{x:.573268526820431,y:.5814656298254459},{x:.5670732960752106,y:.5751856035213296},{x:.5622222773055368,y:.567817616600658},{x:.5589018924422452,y:.5596448166687777},{x:.4515387133151436,y:.1968570925189096},{x:.34417406138515255,y:.5596449726882076},{x:.3440584683142858,y:.559929490683899},{x:.34399650907958285,y:.5602302784847478},{x:.3423992950207163,y:.5640133397974443},{x:.3408536469711739,y:.5678177606143904},{x:.3406847682813525,y:.5680742605871558},{x:.34056531878704455,y:.5683571811877035},{x:.33826075609875456,y:.5717559510329858},{x:.33600260156081635,y:.5751857299949976},{x:.33578692716538155,y:.5754043547947312},{x:.3356145777885471,y:.5756585357149616},{x:.33269122952253233,y:.5785424012737268},{x:.32980734810870244,y:.5814657338987373},{x:.3295531662537196,y:.581638081896991},{x:.3293345402842553,y:.5818537551066867},{x:.3259047490749403,y:.5841118910428063},{x:.32250596673065857,y:.5864164352974557},{x:.322223045482268,y:.5865358832573104},{x:.32196654459357354,y:.5867047605559735},{x:.318162115393689,y:.5882503879717952},{x:.31437904541838135,y:.5898475815127853},{x:.31407825728149374,y:.5899095391161314},{x:.313793738658875,y:.5900251306438814},{x:.30976087354902626,y:.5907988519446131},{x:.3057388972002714,y:.5916273155198798},{x:.3054318012943039,y:.5916294017707667},{x:.3051301988288679,y:.5916872654100169},{x:.30102387855356455,y:.5916593469199811},{x:.29691755812689985,y:.5916872431389331},{x:.2966159559752979,y:.5916293778639092},{x:.2963088600806502,y:.5916272899474536},{x:.29228688822522214,y:.5907988045585649},{x:.28825402731179245,y:.5900250613851525},{x:.2879695093161011,y:.5899094683142858},{x:.2876687215152522,y:.5898475090795828},{x:.2838856602025565,y:.5882502950207166},{x:.28008123938560964,y:.5867046469711739},{x:.27982473941284386,y:.5865357682813523},{x:.27954181881229656,y:.5864163187870445},{x:.276143048967013,y:.5841117560987538},{x:.2727132700050024,y:.5818536015608163},{x:.2724946452052691,y:.5816379271653819},{x:.27224046428503834,y:.5814655777885471},{x:.2693565987262721,y:.5785422295225312},{x:.2664332661012626,y:.5756583481087024},{x:.2662609181030087,y:.5754041662537193},{x:.2660452448933134,y:.5751855402842553},{x:.26378710895719626,y:.5717557490749442},{x:.2614825647025443,y:.5683569667306586},{x:.2613631167426894,y:.5680740454822678},{x:.2611942394440265,y:.5678175445935736},{x:.2596486120282045,y:.5640131153936881},{x:.2580514184872148,y:.5602300454183813},{x:.25798946088386876,y:.5599292572814941},{x:.2578738693561186,y:.559644738658875},{x:.150512,y:.196859029989096},{x:.0431501306438814,y:.559644738658875},{x:.039829760555973516,y:.5678175445935736},{x:.034978755106686646,y:.5751855402842553},{x:.028783535714961644,y:.5814655777885471},{x:.021482181187703456,y:.5864163187870445},{x:.01335527848474783,y:.5898475090795828},{x:.0047151399193498065,y:.5916272899474536},{x:-.004106198828867862,y:.5916872654100169},{x:-.01276973865887501,y:.5900251306438814},{x:-.020942544593573535,y:.5867047605559735},{x:-.028310540284255312,y:.5818537551066867},{x:-.034590577788547086,y:.5756585357149616},{x:-.03954131878704451,y:.5683571811877035},{x:-.04297250907958286,y:.5602302784847478},{x:-.04475228994745356,y:.5515901399193498},{x:-.04481226541001698,y:.5427688011711321}]],x:[[{x:-.007882248997940308,y:.03911618267902263},{x:-.007180671607209664,y:.030322582532795114},{x:-.0047770285451087455,y:.021834819906700376},{x:-.0007636904665355299,y:.013979074758467071},{x:.004705112296856322,y:.007057238968589209},{x:.011419216721809594,y:.001335314804661543},{x:.019120603540586492,y:-.0029668073965882433},{x:.02751331277672888,y:-.0056837994916240225},{x:.036274817320977384,y:-.006711248997940296},{x:.04506841746720488,y:-.006009671607209652},{x:.05355618009329963,y:-.003606028545108733},{x:.061411925241532925,y:.0004073095334644686},{x:.0683337610314108,y:.005876112296856327},{x:.3010265,y:.23008742701759316},{x:.5337192389685892,y:.005876112296856327},{x:.540641074758467,y:.0004073095334644686},{x:.5484968199067003,y:-.003606028545108733},{x:.556984582532795,y:-.006009671607209652},{x:.5657781826790226,y:-.006711248997940296},{x:.5745396872232711,y:-.0056837994916240225},{x:.5829323964594135,y:-.0029668073965882433},{x:.5906337832781904,y:.001335314804661536},{x:.5973478877031436,y:.007057238968589213},{x:.6028166904665355,y:.013979074758467089},{x:.6068300285451087,y:.021834819906700383},{x:.6092336716072096,y:.030322582532795128},{x:.6099352489979403,y:.03911618267902263},{x:.608907799491624,y:.047877687223271126},{x:.6061908073965883,y:.05627039645941352},{x:.6018886851953384,y:.0639717832781904},{x:.5961667610314108,y:.07068588770314368},{x:.36588095484811606,y:.292578},{x:.5961667610314108,y:.5144701122968564},{x:.6018886851953384,y:.5211842167218096},{x:.6061908073965883,y:.5288856035405864},{x:.608907799491624,y:.5372783127767289},{x:.6099352489979403,y:.5460398173209774},{x:.6092336716072096,y:.5548334174672048},{x:.6068300285451087,y:.5633211800932996},{x:.6028166904665355,y:.571176925241533},{x:.5973478877031436,y:.5780987610314108},{x:.5906337832781904,y:.5838206851953385},{x:.5829323964594135,y:.5881228073965883},{x:.5745396872232711,y:.590839799491624},{x:.5657781826790226,y:.5918672489979403},{x:.556984582532795,y:.5911656716072097},{x:.5484968199067003,y:.5887620285451087},{x:.540641074758467,y:.5847486904665355},{x:.5337192389685892,y:.5792798877031436},{x:.3010265,y:.35506857298240685},{x:.0683337610314108,y:.5792798877031436},{x:.06141192524153289,y:.5847486904665355},{x:.05355618009329961,y:.5887620285451087},{x:.0450684174672049,y:.5911656716072097},{x:.03627481732097735,y:.5918672489979403},{x:.02751331277672888,y:.590839799491624},{x:.01912060354058648,y:.5881228073965883},{x:.011419216721809584,y:.5838206851953385},{x:.004705112296856315,y:.5780987610314108},{x:-.0007636904665355368,y:.571176925241533},{x:-.004777028545108752,y:.5633211800932996},{x:-.007180671607209664,y:.5548334174672048},{x:-.007882248997940308,y:.5460398173209774},{x:-.006854799491624035,y:.5372783127767289},{x:-.004137807396588256,y:.5288856035405864},{x:.0001643148046615306,y:.5211842167218096},{x:.005886238968589197,y:.5144701122968564},{x:.23617204515188386,y:.292578},{x:.005886238968589197,y:.07068588770314368},{x:.00016431480466150977,y:.0639717832781904},{x:-.004137807396588256,y:.05627039645941351},{x:-.006854799491624035,y:.047877687223271126},{x:-.007882248997940308,y:.03911618267902263}]],y:[[{x:-7800000000000168e-20,y:-.15516599999999992},{x:.0007866623818546317,y:-.16394506449072568},{x:.003347421036992093,y:-.17238675445642895},{x:.007505867446385456,y:-.180166660485882},{x:.013102194846605353,y:-.18698580515339455},{x:.0199213395141179,y:-.19258213255361445},{x:.02770124554357093,y:-.1967405789630078},{x:.03614293550927421,y:-.19930133761814528},{x:.044922,y:-.2001659999999999},{x:.084618,y:-.2001659999999999},{x:.08470326921416556,y:-.20015760171543356},{x:.08478856964894584,y:-.200165676732115},{x:.08909199801123496,y:-.19972534965725622},{x:.09339706449072577,y:-.19930133761814528},{x:.0934790568568106,y:-.19927646550581232},{x:.09356429362525961,y:-.1992677440740231},{x:.09769912926743524,y:-.1979963205354665},{x:.10183875445642904,y:-.1967405789630078},{x:.1019143190537861,y:-.19670018884423682},{x:.10199621655469396,y:-.19667500612370953},{x:.18074721655469395,y:-.16370500612370958},{x:.18295470197399702,y:-.16251430076809983},{x:.18525522528778574,y:-.16151511930158513},{x:.18682754729843723,y:-.16042530954354395},{x:.18851130436774752,y:-.15951710034658062},{x:.19044407848245243,y:-.15791861501920362},{x:.19250546725178602,y:-.1564898227103016},{x:.27125546725178606,y:-.08958282271030155},{x:.27347158712358693,y:-.0872898341236823},{x:.27580944257935097,y:-.08512109812948883},{x:.27653091968085064,y:-.08412438503144627},{x:.2773860111192193,y:-.08323963374445845},{x:.2791122089873479,y:-.0805583607511536},{x:.2809820438025964,y:-.07797520343727593},{x:.35909504380259644,y:.055837796562724036},{x:.35921507445013207,y:.05609937330868571},{x:.35938084670619436,y:.05633463764830328},{x:.359814044874128,y:.05731131476590327},{x:.3603874218559792,y:.0582128676935936},{x:.5972854218559792,y:.5265638676935935},{x:.6004763520268956,y:.5347880745861305},{x:.6020015061983327,y:.5434767752438966},{x:.6018022735507984,y:.5522960677732933},{x:.5998863104832066,y:.5609070317083322},{x:.5963272463817603,y:.568978752534074},{x:.591261854083932,y:.5762010385458585},{x:.5848847937750224,y:.5822963413425576},{x:.5774411323064065,y:.5870304218559792},{x:.5692169254138695,y:.5902213520268956},{x:.5605282247561034,y:.5917465061983327},{x:.5517089322267067,y:.5915472735507984},{x:.5430979682916678,y:.5896313104832066},{x:.5350262474659261,y:.5860722463817603},{x:.5278039614541415,y:.5810068540839319},{x:.5217086586574424,y:.5746297937750224},{x:.5169745781440208,y:.5671861323064065},{x:.3203411783046204,y:.17843886787959407},{x:.12481771439881506,y:.5670983271806026},{x:.12009991274687032,y:.5745523168465348},{x:.11401856108654926,y:.5809426827476728},{x:.10680736235169674,y:.5860238467061943},{x:.09874343886560628,y:.5896005424407229},{x:.09013668268554793,y:.5915353195400148},{x:.08131784662479694,y:.5917538256051798},{x:.0726258336075076,y:.5902476635706729},{x:.06439467281939737,y:.5870747143988151},{x:.05694068315346515,y:.5823569127468703},{x:.05055031725232718,y:.5762755610865493},{x:.04546915329380567,y:.5690643623516968},{x:.041892457559277035,y:.5610004388656062},{x:.039957680459985136,y:.5523936826855479},{x:.039739174394820276,y:.5435748466247969},{x:.0412453364293271,y:.5348828336075077},{x:.04441828560118493,y:.5266516728193974},{x:.26905653043412125,y:.0801181620528446},{x:.20712852539925722,y:-.025968816269973185},{x:.1395520619925953,y:-.08338263769409424},{x:.07557825049874085,y:-.11016599999999992},{x:.044922,y:-.11016599999999992},{x:.03614293550927422,y:-.11103066238185455},{x:.02770124554357096,y:-.11359142103699202},{x:.01992133951411791,y:-.11774986744638538},{x:.01310219484660536,y:-.12334619484660528},{x:.007505867446385456,y:-.13016533951411782},{x:.003347421036992093,y:-.13794524554357088},{x:.0007866623818546317,y:-.14638693550927412},{x:-7800000000000168e-20,y:-.15516599999999992}]],z:[[{x:.051680000000000004,y:.038348999999999966},{x:.05192127447228559,y:.035899299172703986},{x:.05194879067317478,y:.033437899088824954},{x:.05235257576103353,y:.03152022369965088},{x:.05254466238185464,y:.029569935509274177},{x:.053259213756049764,y:.02721437531096308},{x:.05376639657582897,y:.024805638484003446},{x:.054536542955643516,y:.023003585252525667},{x:.0551054210369921,y:.02112824554357092},{x:.05626578950451143,y:.018957348831652537},{x:.05723314819184797,y:.01669384166703705},{x:.05834005957014514,y:.015076662488338128},{x:.05926386744638546,y:.01334833951411787},{x:.060825460697764414,y:.011445532631778232},{x:.062215820200804926,y:.009414240440453706},{x:.0636169585940798,y:.00804408260344652},{x:.06486019484660537,y:.0065291948466053296},{x:.06676300172894496,y:.004967601595226417},{x:.06852293131171022,y:.0032465857969436324},{x:.07016445175727676,y:.0021761036989109733},{x:.07167933951411792,y:.0009328674463854256},{x:.07385023622603624,y:-.00022750102113387976},{x:.07591210278164046,y:-.0015721027544036703},{x:.07773092256935071,y:-.0023017710867676167},{x:.07945924554357096,y:-.003225578963007937},{x:.08181480574188199,y:-.003940130337203038},{x:.08409937289490133,y:-.004856645714911602},{x:.08602559580031956,y:-.00521745953679684},{x:.08790093550927423,y:-.0057863376181453985},{x:.09035063633657014,y:-.00602761209043098},{x:.09277010945251417,y:-.006480819940600742},{x:.09472971180962335,y:-.006458913379178931},{x:.09668,y:-.006651000000000032},{x:.505373,y:-.006651000000000032},{x:.5141520644907257,y:-.0057863376181453985},{x:.522593754456429,y:-.003225578963007937},{x:.5303736604858821,y:.0009328674463854256},{x:.5371928051533946,y:.0065291948466053296},{x:.5427891325536145,y:.013348339514117874},{x:.5469475789630078,y:.021128245543570928},{x:.5495083376181453,y:.029569935509274198},{x:.550373,y:.038348999999999966},{x:.5495083376181453,y:.047128064490725735},{x:.5469475789630078,y:.055569754456429005},{x:.5427891325536145,y:.06334966048588206},{x:.5371928051533946,y:.0701688051533946},{x:.5303736604858821,y:.0757651325536145},{x:.522593754456429,y:.07992357896300786},{x:.5141520644907257,y:.08248433761814533},{x:.505373,y:.08334899999999996},{x:.190464663126857,y:.08334899999999996},{x:.5404754142030563,y:.5196949313117102},{x:.5415458963010891,y:.5213364517572769},{x:.5427891325536145,y:.5228513395141179},{x:.5439495010211337,y:.525022236226036},{x:.5452941027544036,y:.5270841027816404},{x:.5460237710867677,y:.5289029225693511},{x:.5469475789630078,y:.530631245543571},{x:.5476621303372028,y:.5329868057418816},{x:.5485786457149116,y:.5352713728949013},{x:.5489394595367969,y:.53719759580032},{x:.5495083376181453,y:.5390729355092743},{x:.5497496120904308,y:.5415226363365697},{x:.5502028199406007,y:.5439421094525142},{x:.5501809133791788,y:.5459017118096235},{x:.550373,y:.547852},{x:.5501317255277144,y:.5503017008272966},{x:.5501042093268251,y:.552763100911175},{x:.5497004242389665,y:.5546807763003486},{x:.5495083376181453,y:.5566310644907257},{x:.5487937862439503,y:.5589866246890365},{x:.548286603424171,y:.5613953615159966},{x:.5475164570443563,y:.5631974147474748},{x:.5469475789630078,y:.565072754456429},{x:.5457872104954887,y:.567243651168347},{x:.544819851808152,y:.569507158332963},{x:.5437129404298549,y:.5711243375116617},{x:.5427891325536145,y:.5728526604858821},{x:.5412275393022352,y:.5747554673682221},{x:.539837179799195,y:.5767867595595463},{x:.5384360414059206,y:.578156917396553},{x:.5371928051533946,y:.5796718051533947},{x:.5352899982710546,y:.5812333984047738},{x:.5335300686882897,y:.5829544142030564},{x:.5318885482427235,y:.5840248963010888},{x:.5303736604858821,y:.5852681325536145},{x:.5282027637739638,y:.5864285010211338},{x:.5261408972183595,y:.5877731027544036},{x:.5243220774306487,y:.5885027710867679},{x:.522593754456429,y:.5894265789630079},{x:.5202381942581186,y:.5901411303372028},{x:.5179536271050986,y:.5910576457149116},{x:.5160274041996802,y:.5914184595367968},{x:.5141520644907257,y:.5919873376181454},{x:.5117023636634302,y:.5922286120904309},{x:.5092828905474858,y:.5926818199406008},{x:.5073232881903766,y:.5926599133791789},{x:.505373,y:.592852},{x:.09668,y:.592852},{x:.08790093550927423,y:.5919873376181454},{x:.07945924554357094,y:.5894265789630079},{x:.07167933951411792,y:.5852681325536145},{x:.06486019484660537,y:.5796718051533947},{x:.05926386744638546,y:.5728526604858821},{x:.0551054210369921,y:.565072754456429},{x:.05254466238185464,y:.5566310644907257},{x:.051680000000000004,y:.547852},{x:.05254466238185464,y:.5390729355092743},{x:.0551054210369921,y:.530631245543571},{x:.05926386744638546,y:.5228513395141179},{x:.06486019484660537,y:.5160321948466053},{x:.07167933951411792,y:.5104358674463855},{x:.07945924554357096,y:.5062774210369921},{x:.08790093550927423,y:.5037166623818546},{x:.09668,y:.502852},{x:.41158833687314295,y:.502852},{x:.06157758579694366,y:.06650606868828973},{x:.06050710369891106,y:.06486454824272328},{x:.05926386744638546,y:.06334966048588206},{x:.05810349897886612,y:.06117876377396365},{x:.05675889724559635,y:.059116897218359485},{x:.05602922891323242,y:.05729807743064926},{x:.0551054210369921,y:.055569754456429005},{x:.054390869662797,y:.05321419425811798},{x:.053474354285088434,y:.050929627105098636},{x:.0531135404632032,y:.04900340419968042},{x:.05254466238185464,y:.047128064490725735},{x:.05230338790956906,y:.04467836366342984},{x:.051850180059399294,y:.04225889054748581},{x:.05187208662082111,y:.04029928819037662},{x:.051680000000000004,y:.038348999999999966}]]},vci=Qci;function khe(t){const{ctx:e,points:n,fill:o,stroke:i,strokeWidth:r=1,minStrokePx:s,realToCanvasMat:a,closePath:A=!1}=t;if(n.length<2)return;e.beginPath();const c=n.map(h=>Bn(a,[h.x,h.y])),l=c[0];if(!l)return;const[u,g]=l;e.moveTo(u,g);for(let h=1;h<c.length;h++){const d=c[h];if(!d)continue;const[p,m]=d;e.lineTo(p,m)}if(A&&e.closePath(),o&&(e.fillStyle=o,e.fill()),i){const h=r*Math.abs(a.a),d=s===void 0?h:Math.max(h,s);e.strokeStyle=i,e.lineWidth=d,e.stroke()}}function Bp(t){const{ctx:e,center:n,width:o,height:i,fill:r,realToCanvasMat:s,borderRadius:a=0,ccwRotationDegrees:A=0,stroke:c,strokeWidth:l,isStrokeDashed:u=!1,lineJoin:g}=t,[h,d]=Bn(s,[n.x,n.y]),p=o*Math.abs(s.a),m=i*Math.abs(s.a),_=a*Math.abs(s.a),f=l?l*Math.abs(s.a):void 0;if(e.save(),e.translate(h,d),A!==0&&e.rotate(-A*(Math.PI/180)),e.beginPath(),_>0){const I=-p/2,C=-m/2,y=Math.min(_,p/2,m/2);e.moveTo(I+y,C),e.lineTo(I+p-y,C),e.arcTo(I+p,C,I+p,C+y,y),e.lineTo(I+p,C+m-y),e.arcTo(I+p,C+m,I+p-y,C+m,y),e.lineTo(I+y,C+m),e.arcTo(I,C+m,I,C+m-y,y),e.lineTo(I,C+y),e.arcTo(I,C,I+y,C,y)}else e.rect(-p/2,-m/2,p,m);r&&(e.fillStyle=r,e.fill()),c&&f&&(u?e.setLineDash([f*3,f*2]):e.setLineDash([]),g&&(e.lineJoin=g),e.strokeStyle=c,e.lineWidth=f,e.stroke()),e.restore()}function wci(t){const{ctx:e,board:n,realToCanvasMat:o,colorMap:i,drawBoardMaterial:r,minBoardOutlineStrokePx:s}=t,{width:a,height:A,center:c,outline:l}=n;if(l&&Array.isArray(l)&&l.length>=3){r&&khe({ctx:e,points:l.map(u=>({x:u.x,y:u.y})),fill:i.substrate,realToCanvasMat:o,closePath:!0}),khe({ctx:e,points:l.map(u=>({x:u.x,y:u.y})),stroke:i.boardOutline,strokeWidth:.1,realToCanvasMat:o,closePath:!0,minStrokePx:s});return}if(a!==void 0&&A!==void 0&&c){r&&Bp({ctx:e,center:c,width:a,height:A,fill:i.substrate,realToCanvasMat:o});const u=a/2,g=A/2,h=[{x:c.x-u,y:c.y-g},{x:c.x+u,y:c.y-g},{x:c.x+u,y:c.y+g},{x:c.x-u,y:c.y+g}];khe({ctx:e,points:h,stroke:i.boardOutline,strokeWidth:.1,realToCanvasMat:o,closePath:!0,minStrokePx:s})}}function Pci({startX:t,startY:e,endX:n,endY:o,bulge:i}){if(Math.abs(i)<1e-10)return null;const r=n-t,s=o-e,a=Math.hypot(r,s);if(a<1e-10)return null;const A=Math.abs(i)*(a/2),c=a/2,l=(A*A+c*c)/(2*A),u=l-A,g=(t+n)/2,h=(e+o)/2,d=-s/a,p=r/a,m=i>0?-1:1;return{centerX:g+m*d*u,centerY:h+m*p*u,radius:l}}function $Ke({ctx:t,realStartX:e,realStartY:n,realEndX:o,realEndY:i,bulge:r,realToCanvasMat:s}){if(Math.abs(r)<1e-10){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const a=Pci({startX:e,startY:n,endX:o,endY:i,bulge:r});if(!a){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const[A,c]=Bn(s,[e,n]),[l,u]=Bn(s,[o,i]),[g,h]=Bn(s,[a.centerX,a.centerY]),d=Math.hypot(A-g,c-h),p=Math.atan2(c-h,A-g),m=Math.atan2(u-h,l-g),f=s.a*s.d-s.b*s.c<0,I=r>0?!f:f;t.arc(g,h,d,p,m,I)}function hon({ctx:t,ring:e,realToCanvasMat:n}){if(e.vertices.length<2)return;if(e.vertices.length===2){const[s,a]=e.vertices;if(s&&a&&Math.abs((s.bulge??0)-1)<1e-10&&Math.abs((a.bulge??0)-1)<1e-10){const[A,c]=Bn(n,[s.x,s.y]);t.moveTo(A,c),$Ke({ctx:t,realStartX:s.x,realStartY:s.y,realEndX:a.x,realEndY:a.y,bulge:1,realToCanvasMat:n}),$Ke({ctx:t,realStartX:a.x,realStartY:a.y,realEndX:s.x,realEndY:s.y,bulge:1,realToCanvasMat:n});return}}const o=e.vertices[0];if(!o)return;const[i,r]=Bn(n,[o.x,o.y]);t.moveTo(i,r);for(let s=0;s<e.vertices.length;s++){const a=e.vertices[s],A=e.vertices[(s+1)%e.vertices.length];!a||!A||$Ke({ctx:t,realStartX:a.x,realStartY:a.y,realEndX:A.x,realEndY:A.y,bulge:a.bulge??0,realToCanvasMat:n})}}function pon({ctx:t,shape:e,realToCanvasMat:n}){hon({ctx:t,ring:e.outer_ring,realToCanvasMat:n});for(const o of e.inner_rings??[])hon({ctx:t,ring:o,realToCanvasMat:n})}function Mci(t,e){return e.copper[t]??e.copper.top}function qKe(t){const{ctx:e,pour:n,realToCanvasMat:o}=t;if(n.shape==="rect"){const i=n.width/2,r=n.height/2,s=(n.rotation??0)*Math.PI/180,a=Math.cos(s),A=Math.sin(s),c=[{x:-i,y:-r},{x:i,y:-r},{x:i,y:r},{x:-i,y:r}].map(u=>Bn(o,[n.center.x+u.x*a-u.y*A,n.center.y+u.x*A+u.y*a])),l=c[0];if(!l)return;e.moveTo(l[0],l[1]);for(let u=1;u<c.length;u++){const g=c[u];g&&e.lineTo(g[0],g[1])}e.closePath();return}if(n.shape==="polygon"){const i=n.points[0];if(!i)return;const[r,s]=Bn(o,[i.x,i.y]);e.moveTo(r,s);for(let a=1;a<n.points.length;a++){const A=n.points[a];if(!A)continue;const[c,l]=Bn(o,[A.x,A.y]);e.lineTo(c,l)}e.closePath();return}n.shape==="brep"&&pon({ctx:e,shape:n.brep_shape,realToCanvasMat:o})}function Dci(t){const{ctx:e,pour:n,realToCanvasMat:o,colorMap:i}=t,r=Mci(n.layer,i),s=.5;e.save(),e.globalAlpha=s,e.beginPath(),qKe({ctx:e,pour:n,realToCanvasMat:o}),e.fillStyle=r,e.fill(n.shape==="brep"?"evenodd":"nonzero"),e.restore()}function Nci(t,e){if(e.length<3)return;const n=e[0];if(n){t.moveTo(n.x,n.y);for(let o=1;o<e.length;o++){const i=e[o];i&&t.lineTo(i.x,i.y)}t.closePath()}}var Rci=t=>Qho[t]??(t===" "?Gv.spaceWidthRatio:Gv.glyphWidthRatio);function XKe(t,e,n){const o=Rci(t),i=e?Gv.letterSpacingRatio:0,r=e?vho[t]?.[e]??0:0;return n*(o+i+r)}function Tci(t,e){const n=e*Gv.glyphWidthRatio,o=e*Gv.letterSpacingRatio,i=e*Gv.spaceWidthRatio,r=e*Gv.strokeWidthRatio,s=e*Gv.lineHeightRatio,a=t.replace(/\\n/g,`
`).split(`
`),A=a.map(u=>{const g=Array.from(u);return g.reduce((h,d,p)=>h+XKe(d,g[p+1],e),0)}),c=A.reduce((u,g)=>Math.max(u,g),0),l=a.length>1?e+(a.length-1)*s:e;return{width:c,height:l,glyphWidth:n,letterSpacing:o,spaceWidth:i,strokeWidth:r,lineHeight:s,lines:a,lineWidths:A}}function kci(t){const{line:e,fontSize:n,startX:o,startY:i}=t,r=n,s=n,a=Array.from(e),A=[];let c=o+t.layout.strokeWidth/2;return a.forEach((l,u)=>{const g=vci[l];if(g?.length){const h=[];for(const d of g){const p=d.map(m=>({x:c+m.x*s,y:i+(1-m.y)*r}));p.length>=3&&h.push(p)}h.length>0&&A.push(h)}c+=XKe(l,a[u+1],n)}),A}function Fci(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)for(const s of r)e=Math.min(e,s.x),n=Math.min(n,s.y),o=Math.max(o,s.x),i=Math.max(i,s.y);return e===Number.POSITIVE_INFINITY||n===Number.POSITIVE_INFINITY||o===Number.NEGATIVE_INFINITY||i===Number.NEGATIVE_INFINITY?null:{minX:e,minY:n,maxX:o,maxY:i}}function Lci(t,e,n){const o=Oci(t,e),i=Gci(o,e,n),r=Fci(i.flat()),s=Yci(t,e,r);return{bounds:r?zci(r,s):null,glyphGroups:Vci(i,s),linePlacements:o.map(({line:a,startX:A,startY:c})=>({line:a,startX:A+s.x,startY:c+s.y})),startOffset:s}}function Hci(t,e){const n=e.width+e.strokeWidth,o=e.height+e.strokeWidth;let i=0,r=0;return t==="center"||t==="top_center"||t==="bottom_center"?i=-n/2:t==="top_left"||t==="bottom_left"||t==="center_left"?i=0:t==="top_right"||t==="bottom_right"||t==="center_right"?i=-n:(t==="top_center"||t==="bottom_center")&&(i=-n/2),t==="center"||t==="center_left"||t==="center_right"?r=-o/2:t==="top_left"||t==="top_right"||t==="top_center"?r=0:(t==="bottom_left"||t==="bottom_right"||t==="bottom_center")&&(r=-o),{x:i,y:r}}function Oci(t,e){return e.lines.map((n,o)=>({line:n,startX:Jci({alignment:t,lineWidth:e.lineWidths[o],maxWidth:e.width,strokeWidth:e.strokeWidth}),startY:o*e.lineHeight}))}function Gci(t,e,n){return t.flatMap(({line:o,startX:i,startY:r})=>kci({line:o,fontSize:n,startX:i,startY:r,layout:e}))}function Yci(t,e,n){return n?{x:-Uci(t,n),y:-Kci(t,n)}:Hci(t,e)}function Uci(t,e){return t==="top_left"||t==="bottom_left"||t==="center_left"?e.minX:t==="top_right"||t==="bottom_right"||t==="center_right"?e.maxX:(e.minX+e.maxX)/2}function Kci(t,e){return t==="top_left"||t==="top_right"||t==="top_center"?e.minY:t==="bottom_left"||t==="bottom_right"||t==="bottom_center"?e.maxY:(e.minY+e.maxY)/2}function Vci(t,e){return e.x===0&&e.y===0?t:t.map(n=>n.map(o=>o.map(i=>({x:i.x+e.x,y:i.y+e.y}))))}function zci(t,e){return{minX:t.minX+e.x,minY:t.minY+e.y,maxX:t.maxX+e.x,maxY:t.maxY+e.y}}function Jci(t){const{alignment:e,lineWidth:n,maxWidth:o,strokeWidth:i}=t,r=n+i,s=o+i;return e==="top_left"||e==="bottom_left"||e==="center_left"?0:e==="top_right"||e==="bottom_right"||e==="center_right"?s-r:(s-r)/2}var Wci=t=>Sho[t];function jci(t){const{ctx:e,line:n,fontSize:o,startX:i,startY:r,layout:s}=t,{strokeWidth:a}=s,A=o,c=o,l=r,u=Array.from(n);let g=i+a/2;u.forEach((h,d)=>{const p=Wci(h);if(p?.length){e.beginPath();for(const m of p){const _=g+m.x1*c,f=l+(1-m.y1)*A,I=g+m.x2*c,C=l+(1-m.y2)*A;e.moveTo(_,f),e.lineTo(I,C)}e.stroke()}g+=XKe(h,u[d+1],o)})}var $ci={left:.2,right:.2,top:.2,bottom:.2};function SY(t){const{ctx:e,text:n,x:o,y:i,fontSize:r,color:s,realToCanvasMat:a,anchorAlignment:A,rotation:c=0,mirrorX:l=!1,knockout:u=!1,knockoutPadding:g={}}=t;if(!n)return;const[h,d]=Bn(a,[o,i]),p=Math.abs(a.a),m=r*p,_=Tci(n,m),f=Lci(A,_,m);if(e.save(),e.translate(h,d),c!==0&&e.rotate(-c*(Math.PI/180)),l&&e.scale(-1,1),u){const I={...$ci,...g},C=I.left*p,y=I.right*p,x=I.top*p,E=I.bottom*p,B=f.bounds;if(!B){e.restore();return}const S=B.minX-C,Q=B.minY-x,w=B.maxX-B.minX+C+y,M=B.maxY-B.minY+x+E;e.fillStyle=s,e.beginPath(),e.rect(S,Q,w,M);for(const k of f.glyphGroups)for(const R of k)Nci(e,R);e.fill("evenodd")}else e.strokeStyle=s;e.lineWidth=_.strokeWidth,e.lineCap="round",e.lineJoin="round",u||f.linePlacements.forEach(({line:I,startX:C,startY:y})=>{jci({ctx:e,line:I,fontSize:m,startX:C,startY:y,layout:_})}),e.restore()}function qci(t){return t||"center"}function Xci(t){const{ctx:e,text:n,realToCanvasMat:o,colorMap:i}=t,r=n.text??"";r&&SY({ctx:e,text:r,x:n.anchor_position.x,y:n.anchor_position.y,fontSize:n.font_size??1,color:i.copper[n.layer]??i.copper.top,realToCanvasMat:o,anchorAlignment:qci(n.anchor_alignment),rotation:n.ccw_rotation??0,mirrorX:n.is_mirrored??n.layer==="bottom",knockout:n.is_knockout,knockoutPadding:n.is_knockout?n.knockout_padding:void 0})}function dm(t){const{ctx:e,center:n,radius:o,fill:i,realToCanvasMat:r,stroke:s,strokeWidth:a,isStrokeDashed:A=!1}=t,[c,l]=Bn(r,[n.x,n.y]),u=o*Math.abs(r.a),g=a?a*Math.abs(r.a):void 0;e.beginPath(),e.arc(c,l,u,0,Math.PI*2),i&&(e.fillStyle=i,e.fill()),s&&g&&(A?e.setLineDash([g*3,g*2]):e.setLineDash([]),e.strokeStyle=s,e.lineWidth=g,e.stroke())}function Zci(t,e){return t==="bottom"?e.courtyard.bottom:e.courtyard.top}function eli(t){const{ctx:e,circle:n,realToCanvasMat:o,colorMap:i}=t;dm({ctx:e,center:n.center,radius:n.radius,stroke:Zci(n.layer,i),strokeWidth:.05,realToCanvasMat:o})}function tli(t,e){return t==="bottom"?e.courtyard.bottom:e.courtyard.top}function nli(t){const{ctx:e,outline:n,realToCanvasMat:o,colorMap:i}=t;if(!n.outline||n.outline.length<2)return;e.beginPath();const r=Bn(o,n.outline[0]);e.moveTo(r.x,r.y);for(let s=1;s<n.outline.length;s++){const a=Bn(o,n.outline[s]);e.lineTo(a.x,a.y)}e.closePath(),e.lineWidth=.05*Math.abs(o.a),e.strokeStyle=tli(n.layer,i),e.lineJoin="round",e.stroke()}function oli(t,e){return t==="bottom"?e.courtyard.bottom:e.courtyard.top}function ili(t){const{ctx:e,rect:n,realToCanvasMat:o,colorMap:i}=t;Bp({ctx:e,center:n.center,width:n.width,height:n.height,stroke:oli(n.layer,i),strokeWidth:.05,realToCanvasMat:o,ccwRotationDegrees:n.ccw_rotation??0,lineJoin:"round"})}function sP(t){const{ctx:e,points:n,fill:o,realToCanvasMat:i}=t;if(n.length<3)return;e.beginPath();const r=n.map(c=>Bn(i,[c.x,c.y])),s=r[0];if(!s)return;const[a,A]=s;e.moveTo(a,A);for(let c=1;c<r.length;c++){const l=r[c];if(!l)continue;const[u,g]=l;e.lineTo(u,g)}e.closePath(),e.fillStyle=o,e.fill()}function rli(t){const{ctx:e,cutout:n,realToCanvasMat:o,colorMap:i}=t;if(n.shape==="rect"){Bp({ctx:e,center:n.center,width:n.width,height:n.height,fill:i.drill,realToCanvasMat:o,ccwRotationDegrees:n.rotation??0,borderRadius:n.corner_radius??0});return}if(n.shape==="circle"){dm({ctx:e,center:n.center,radius:n.radius,fill:i.drill,realToCanvasMat:o});return}if(n.shape==="polygon"){n.points&&n.points.length>=3&&sP({ctx:e,points:n.points,fill:i.drill,realToCanvasMat:o});return}}var mon="#ff4d4d",sli={a:1,b:0,c:0,d:1,e:0,f:0};function ali(t){const e=Math.min(t.canvas.width,t.canvas.height),n=Math.max(1,Math.min(2,e*.002)),o=Math.max(10,Math.min(18,e*.02));return{fontSize:o,strokeWidth:n,dashLength:n*4,labelGap:o*.35,pointRadius:n*3}}function ZKe({ctx:t,label:e,x:n,y:o,style:i,align:r="left"}){e&&(t.setLineDash([]),SY({ctx:t,text:e,x:n,y:o,fontSize:i.fontSize,color:mon,realToCanvasMat:sli,anchorAlignment:r==="center"?"bottom_center":"bottom_left"}))}function Ali({ctx:t,debugObject:e,realToCanvasMat:n,labelStackIndex:o=0}){const i=ali(t);if(t.save(),t.strokeStyle=mon,t.lineWidth=i.strokeWidth,t.setLineDash([i.dashLength,i.dashLength]),e.shape==="rect"){const a=Bn(n,[e.center.x-e.size.width/2,e.center.y-e.size.height/2]),A=Bn(n,[e.center.x+e.size.width/2,e.center.y+e.size.height/2]),c=Math.min(a[0],A[0]),l=Math.min(a[1],A[1]),u=Math.abs(A[0]-a[0]),g=Math.abs(A[1]-a[1]);t.beginPath(),t.rect(c,l,u,g),t.stroke(),ZKe({ctx:t,label:e.label,x:c,y:l-i.labelGap-o*(i.fontSize+i.labelGap),style:i}),t.restore();return}if(e.shape==="line"){const[a,A]=Bn(n,[e.start.x,e.start.y]),[c,l]=Bn(n,[e.end.x,e.end.y]);t.beginPath(),t.moveTo(a,A),t.lineTo(c,l),t.stroke(),ZKe({ctx:t,label:e.label,x:(a+c)/2,y:(A+l)/2-i.labelGap,style:i,align:"center"}),t.restore();return}const[r,s]=Bn(n,[e.center.x,e.center.y]);t.beginPath(),t.arc(r,s,i.pointRadius,0,Math.PI*2),t.stroke(),ZKe({ctx:t,label:e.label,x:r+i.pointRadius+i.labelGap,y:s-i.pointRadius,style:i}),t.restore()}var cli=1.5,lli=.6,uli=.3;function eVe(t){const e=Math.hypot(t.x,t.y)||1;return{x:t.x/e,y:t.y/e}}function _on(t){const{ctx:e,from:n,to:o,realToCanvasMat:i,color:r,fontSize:s,arrowSize:a=1,strokeWidth:A,text:c,textRotation:l,offset:u}=t,g=eVe({x:o.x-n.x,y:o.y-n.y}),h={x:-g.y,y:g.x},d=u?.direction&&typeof u.direction.x=="number"&&typeof u.direction.y=="number",p=d?eVe(u.direction):{x:0,y:0},m=u?.distance??0,_={x:p.x*m,y:p.y*m},f={x:n.x+_.x,y:n.y+_.y},I={x:o.x+_.x,y:o.y+_.y},C={x:f.x+g.x*a,y:f.y+g.y*a},y={x:I.x-g.x*a,y:I.y-g.y*a};Math.abs(i.a);const x=A??a/5,E=r||"rgba(255,255,255,0.5)",B=d&&(Math.abs(p.x)>Number.EPSILON||Math.abs(p.y)>Number.EPSILON)?p:h,S=m+.5,Q=[],w=R=>{const F={x:R.x+B.x*S,y:R.y+B.y*S},O=x/2,U={x:-B.y,y:B.x};return[{x:R.x+U.x*O,y:R.y+U.y*O},{x:R.x-U.x*O,y:R.y-U.y*O},{x:F.x-U.x*O,y:F.y-U.y*O},{x:F.x+U.x*O,y:F.y+U.y*O}]};Q.push(f),Q.push({x:C.x+h.x*(a/2),y:C.y+h.y*(a/2)}),Q.push({x:C.x+h.x*(x/2),y:C.y+h.y*(x/2)}),Q.push({x:y.x+h.x*(x/2),y:y.y+h.y*(x/2)}),Q.push({x:y.x+h.x*(a/2),y:y.y+h.y*(a/2)}),Q.push(I),Q.push({x:y.x-h.x*(a/2),y:y.y-h.y*(a/2)}),Q.push({x:y.x-h.x*(x/2),y:y.y-h.y*(x/2)}),Q.push({x:C.x-h.x*(x/2),y:C.y-h.y*(x/2)}),Q.push({x:C.x-h.x*(a/2),y:C.y-h.y*(a/2)}),Q.push(f);const M=Q[0],k=R=>{const F=w(R);Q.push(M),Q.push(F[0]),Q.push(...F),Q.push(F[0]),Q.push(M)};if(k(n),k(o),sP({ctx:e,points:Q,fill:E,realToCanvasMat:i}),c){const R={x:(n.x+o.x)/2+_.x,y:(n.y+o.y)/2+_.y},[F,O]=Bn(i,[f.x,f.y]),[U,Y]=Bn(i,[I.x,I.y]),W=eVe({x:U-F,y:Y-O});let te=Math.atan2(W.y,W.x)*180/Math.PI;(te>90||te<-90)&&(te+=180);const j=typeof l=="number"&&Number.isFinite(l)?te-l:te;let J=0;if(c&&typeof l=="number"&&Number.isFinite(l)){const ne=c.length*s*lli,le=s,ge=l*Math.PI/180,_e=Math.abs(Math.sin(ge)),ue=Math.abs(Math.cos(ge)),fe=ne/2,pe=le/2;J=fe*_e+pe*ue+s*uli}const oe=a*cli+J,ie={x:R.x+h.x*oe,y:R.y+h.y*oe};SY({ctx:e,text:c,x:ie.x,y:ie.y,fontSize:s,color:E,realToCanvasMat:i,anchorAlignment:"center",rotation:-j})}}function gli(t){const{ctx:e,pcbFabricationNoteDimension:n,realToCanvasMat:o,colorMap:i}=t,r=n.color??i.fabricationNote;_on({ctx:e,from:n.from,to:n.to,realToCanvasMat:o,color:r,fontSize:n.font_size??1,arrowSize:n.arrow_size??1,text:n.text,textRotation:n.text_ccw_rotation,offset:n.offset_distance&&n.offset_direction?{distance:n.offset_distance,direction:n.offset_direction}:void 0})}function QY(t){const{ctx:e,start:n,end:o,strokeWidth:i,stroke:r,realToCanvasMat:s,lineCap:a="round"}=t,[A,c]=Bn(s,[n.x,n.y]),[l,u]=Bn(s,[o.x,o.y]),g=i*Math.abs(s.a);e.beginPath(),e.moveTo(A,c),e.lineTo(l,u),e.lineWidth=g,e.strokeStyle=r,e.lineCap=a,e.stroke()}function dli(t){const{ctx:e,path:n,realToCanvasMat:o,colorMap:i}=t,r=i.fabricationNote,s=n.color??r;if(!(!n.route||n.route.length<2))for(let a=0;a<n.route.length-1;a++){const A=n.route[a],c=n.route[a+1];!A||!c||QY({ctx:e,start:{x:A.x,y:A.y},end:{x:c.x,y:c.y},strokeWidth:n.stroke_width??.1,stroke:s,realToCanvasMat:o})}}function hli(t){const{ctx:e,rect:n,realToCanvasMat:o,colorMap:i}=t,r=i.fabricationNote,s=n.color??r,a=n.is_filled??!1,A=n.has_stroke??!0,c=n.is_stroke_dashed??!1;Bp({ctx:e,center:n.center,width:n.width,height:n.height,fill:a?s:void 0,stroke:A?s:void 0,strokeWidth:A?n.stroke_width:void 0,borderRadius:n.corner_radius,realToCanvasMat:o,isStrokeDashed:c})}function pli(t,e){return e.fabricationNote}function mli(t){const{ctx:e,text:n,realToCanvasMat:o,colorMap:i}=t,r=pli(n.layer,i),s=n.color??r,a=n.font_size;SY({ctx:e,text:n.text,x:n.anchor_position.x,y:n.anchor_position.y,fontSize:a,color:s,realToCanvasMat:o,anchorAlignment:n.anchor_alignment})}function JB(t){const{ctx:e,center:n,radius_x:o,radius_y:i,fill:r,stroke:s,strokeWidth:a=.1,realToCanvasMat:A,rotation:c=0}=t,[l,u]=Bn(A,[n.x,n.y]),g=o*Math.abs(A.a),h=i*Math.abs(A.a),d=a*Math.abs(A.a);e.save(),e.translate(l,u),c!==0&&e.rotate(-c*(Math.PI/180)),e.beginPath(),e.ellipse(0,0,g,h,0,0,Math.PI*2),r&&(e.fillStyle=r,e.fill()),s&&(e.strokeStyle=s,e.lineWidth=d,e.stroke()),e.restore()}function A_(t){const{ctx:e,center:n,width:o,height:i,fill:r,realToCanvasMat:s,rotation:a=0,stroke:A,strokeWidth:c}=t,[l,u]=Bn(s,[n.x,n.y]),g=o*Math.abs(s.a),h=i*Math.abs(s.a),d=c?c*Math.abs(s.a):void 0;if(e.save(),e.translate(l,u),a!==0&&e.rotate(-a*(Math.PI/180)),e.beginPath(),g>h){const p=h/2,m=g-h;e.moveTo(-m/2,-p),e.lineTo(m/2,-p),e.arc(m/2,0,p,-Math.PI/2,Math.PI/2),e.lineTo(-m/2,p),e.arc(-m/2,0,p,Math.PI/2,-Math.PI/2)}else if(h>g){const p=g/2,m=h-g;e.moveTo(p,-m/2),e.lineTo(p,m/2),e.arc(0,m/2,p,0,Math.PI),e.lineTo(-p,-m/2),e.arc(0,-m/2,p,Math.PI,0)}else e.arc(0,0,g/2,0,Math.PI*2);e.closePath(),r&&(e.fillStyle=r,e.fill()),A&&d&&(e.strokeStyle=A,e.lineWidth=d,e.stroke()),e.restore()}function Fhe(t){return"ccw_rotation"in t&&typeof t.ccw_rotation=="number"?t.ccw_rotation:0}function fon(t){const{ctx:e,hole:n,realToCanvasMat:o,colorMap:i,soldermaskMargin:r=0,drawSoldermask:s=!1}=t;if(s&&n.is_covered_with_solder_mask===!0)return;const a=r<0?Math.abs(r):0;if(n.hole_shape==="circle"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2-a,fill:i.drill,realToCanvasMat:o});return}if(n.hole_shape==="square"){const A=Fhe(n);Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_diameter-a*2,height:n.hole_diameter-a*2,fill:i.drill,realToCanvasMat:o,ccwRotationDegrees:A});return}if(n.hole_shape==="oval"){const A=Fhe(n);JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2-a,radius_y:n.hole_height/2-a,fill:i.drill,realToCanvasMat:o,rotation:A});return}if(n.hole_shape==="rect"){const A=Fhe(n);Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width-a*2,height:n.hole_height-a*2,fill:i.drill,realToCanvasMat:o,ccwRotationDegrees:A});return}if(n.hole_shape==="pill"||n.hole_shape==="rotated_pill"){const A=Fhe(n);A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width-a*2,height:n.hole_height-a*2,fill:i.drill,realToCanvasMat:o,rotation:A});return}}function _li(t){const{ctx:e,cx:n,cy:o,radius:i}=t;e.beginPath(),e.arc(n,o,i,0,Math.PI*2)}function fli(t){const{ctx:e,cx:n,cy:o,width:i,height:r}=t;e.beginPath(),e.rect(n-i/2,o-r/2,i,r)}function aS(t){const{ctx:e,cx:n,cy:o,width:i,height:r,ccwRotationDegrees:s=0}=t,a=s*Math.PI/180,A=Ad(pA(n,o),vQ(-a));if(i>r){const c=r/2,l=(i-r)/2,u=Bn(A,{x:-l,y:0}),g=Bn(A,{x:l,y:0}),h=Bn(A,{x:l,y:-c});e.moveTo(h.x,h.y),e.arc(g.x,g.y,c,-a-Math.PI/2,-a+Math.PI/2),e.arc(u.x,u.y,c,-a+Math.PI/2,-a-Math.PI/2)}else if(r>i){const c=i/2,l=(r-i)/2,u=Bn(A,{x:0,y:-l}),g=Bn(A,{x:0,y:l}),h=Bn(A,{x:c,y:l});e.moveTo(h.x,h.y),e.arc(g.x,g.y,c,-a,-a+Math.PI),e.arc(u.x,u.y,c,-a+Math.PI,-a)}else{const c=i/2;e.moveTo(n+c,o),e.arc(n,o,c,0,Math.PI*2)}e.closePath()}function aP(t){const{ctx:e,points:n}=t;if(n.length<3)return;const o=n[0];if(o){e.moveTo(o.x,o.y);for(let i=1;i<n.length;i++){const r=n[i];r&&e.lineTo(r.x,r.y)}e.closePath()}}function xE(t){const{ctx:e,cx:n,cy:o,width:i,height:r,radius:s,ccwRotationDegrees:a=0}=t,A=a*Math.PI/180,c=Ad(pA(n,o),vQ(-A)),l=i/2,u=r/2,g=Math.min(s,l,u);if(g>0){const h=Bn(c,{x:-l,y:-u}),d=Bn(c,{x:l,y:-u}),p=Bn(c,{x:l,y:u}),m=Bn(c,{x:-l,y:u}),_=Bn(c,{x:-l,y:0});e.moveTo(_.x,_.y),e.arcTo(h.x,h.y,d.x,d.y,g),e.arcTo(d.x,d.y,p.x,p.y,g),e.arcTo(p.x,p.y,m.x,m.y,g),e.arcTo(m.x,m.y,h.x,h.y,g)}else{const h=Bn(c,{x:-l,y:-u}),d=Bn(c,{x:l,y:-u}),p=Bn(c,{x:l,y:u}),m=Bn(c,{x:-l,y:u});e.moveTo(h.x,h.y),e.lineTo(d.x,d.y),e.lineTo(p.x,p.y),e.lineTo(m.x,m.y)}e.closePath()}function Ili(t){const{ctx:e,pad:n,realToCanvasMat:o,color:i,drillCutouts:r}=t;if(e.save(),e.beginPath(),!Ion(e,n,o)){e.restore();return}e.clip(),e.beginPath(),Ion(e,n,o);for(const s of r)yli(e,s,o);e.fillStyle=i,e.fill("evenodd"),e.restore()}function Cli(t){const{pad:e,holes:n=[],platedHoles:o=[],vias:i=[],cutouts:r=[]}=t,s=Eli(e);if(!s)return[];const a=[],A=c=>{c&&Sli(s,Bli(c))&&a.push(c)};for(const c of r)A(bli(c));for(const c of n)A(Qli(c));for(const c of o)bon(c.layers,e.layer)&&A(vli(c));for(const c of i){if(!bon(c.layers,e.layer))continue;const l=c.hole_diameter/2;if(l<=0)continue;const u={shape:"circle",x:c.x,y:c.y,radius:l};A(u)}return a}function Ion(t,e,n){return e.shape==="rect"||e.shape==="rotated_rect"?(yon(t,{x:e.x,y:e.y,width:e.width,height:e.height,radius:wli(e),rotation:e.shape==="rotated_rect"?e.ccw_rotation??0:0,realToCanvasMat:n}),!0):e.shape==="circle"?(Con(t,{x:e.x,y:e.y,radius:e.radius,realToCanvasMat:n}),!0):e.shape==="pill"||e.shape==="rotated_pill"?(xon(t,{x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.shape==="rotated_pill"?e.ccw_rotation??0:0,realToCanvasMat:n}),!0):e.shape==="polygon"&&e.points&&e.points.length>=3?(Eon(t,e.points,n),!0):!1}function yli(t,e,n){if(e.shape==="circle"){Con(t,{x:e.x,y:e.y,radius:e.radius,realToCanvasMat:n});return}if(e.shape==="oval"){xli(t,{x:e.x,y:e.y,radiusX:e.radiusX,radiusY:e.radiusY,rotation:e.rotation,realToCanvasMat:n});return}if(e.shape==="pill"){xon(t,{x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,realToCanvasMat:n});return}if(e.shape==="polygon"){Eon(t,e.points,n);return}yon(t,{x:e.x,y:e.y,width:e.width,height:e.height,radius:e.radius,rotation:e.rotation,realToCanvasMat:n})}function Con(t,e){const{x:n,y:o,radius:i,realToCanvasMat:r}=e,[s,a]=Bn(r,[n,o]),A=i*Math.abs(r.a);t.moveTo(s+A,a),t.arc(s,a,A,0,Math.PI*2),t.closePath()}function xli(t,e){const{x:n,y:o,radiusX:i,radiusY:r,rotation:s=0,realToCanvasMat:a}=e,[A,c]=Bn(a,[n,o]),l=i*Math.abs(a.a),u=r*Math.abs(a.a);t.save(),t.translate(A,c),s!==0&&t.rotate(-s*(Math.PI/180)),t.moveTo(l,0),t.ellipse(0,0,l,u,0,0,Math.PI*2),t.closePath(),t.restore()}function yon(t,e){const{x:n,y:o,width:i,height:r,radius:s=0,rotation:a=0,realToCanvasMat:A}=e,[c,l]=Bn(A,[n,o]),u=i*Math.abs(A.a),g=r*Math.abs(A.a),h=s*Math.abs(A.a);if(t.save(),t.translate(c,l),a!==0&&t.rotate(-a*(Math.PI/180)),h>0){const d=-u/2,p=-g/2,m=Math.min(h,u/2,g/2);t.moveTo(d+m,p),t.lineTo(d+u-m,p),t.arcTo(d+u,p,d+u,p+m,m),t.lineTo(d+u,p+g-m),t.arcTo(d+u,p+g,d+u-m,p+g,m),t.lineTo(d+m,p+g),t.arcTo(d,p+g,d,p+g-m,m),t.lineTo(d,p+m),t.arcTo(d,p,d+m,p,m),t.closePath()}else t.rect(-u/2,-g/2,u,g);t.restore()}function xon(t,e){const{x:n,y:o,width:i,height:r,rotation:s=0,realToCanvasMat:a}=e,[A,c]=Bn(a,[n,o]),l=i*Math.abs(a.a),u=r*Math.abs(a.a);if(t.save(),t.translate(A,c),s!==0&&t.rotate(-s*(Math.PI/180)),l>u){const g=u/2,h=l-u;t.moveTo(-h/2,-g),t.lineTo(h/2,-g),t.arc(h/2,0,g,-Math.PI/2,Math.PI/2),t.lineTo(-h/2,g),t.arc(-h/2,0,g,Math.PI/2,-Math.PI/2)}else if(u>l){const g=l/2,h=u-l;t.moveTo(g,-h/2),t.lineTo(g,h/2),t.arc(0,h/2,g,0,Math.PI),t.lineTo(-g,-h/2),t.arc(0,-h/2,g,Math.PI,0)}else t.moveTo(l/2,0),t.arc(0,0,l/2,0,Math.PI*2);t.closePath(),t.restore()}function Eon(t,e,n){const o=e[0];if(!o)return;const[i,r]=Bn(n,[o.x,o.y]);t.moveTo(i,r);for(let s=1;s<e.length;s++){const a=e[s];if(!a)continue;const[A,c]=Bn(n,[a.x,a.y]);t.lineTo(A,c)}t.closePath()}function Eli(t){if(t.shape==="circle")return AP(t.x,t.y,t.radius,t.radius);if(t.shape==="rect"||t.shape==="rotated_rect"||t.shape==="pill"||t.shape==="rotated_pill"){const e=Math.hypot(t.width/2,t.height/2);return(t.shape==="rotated_rect"||t.shape==="rotated_pill")&&(t.ccw_rotation??0)!==0?AP(t.x,t.y,e,e):AP(t.x,t.y,t.width/2,t.height/2)}if(t.shape==="polygon"&&t.points&&t.points.length>=3)return Bon(t.points)}function Bli(t){if(t.shape==="polygon")return Bon(t.points);if(t.shape==="circle")return AP(t.x,t.y,t.radius,t.radius);if(t.shape==="oval"){if((t.rotation??0)!==0){const o=Math.hypot(t.radiusX,t.radiusY);return AP(t.x,t.y,o,o)}return AP(t.x,t.y,t.radiusX,t.radiusY)}const e=t.width/2,n=t.height/2;if((t.rotation??0)!==0){const o=Math.hypot(e,n);return AP(t.x,t.y,o,o)}return AP(t.x,t.y,e,n)}function bli(t){if(t.shape==="circle")return t.radius<=0?void 0:{shape:"circle",x:t.center.x,y:t.center.y,radius:t.radius};if(t.shape==="rect")return t.width<=0||t.height<=0?void 0:{shape:"rect",x:t.center.x,y:t.center.y,width:t.width,height:t.height,radius:t.corner_radius,rotation:t.rotation};if(t.shape==="polygon"&&t.points.length>=3)return{shape:"polygon",points:t.points}}function Bon(t){let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t)e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y);return{minX:e,maxX:n,minY:o,maxY:i}}function AP(t,e,n,o){return{minX:t-n,maxX:t+n,minY:e-o,maxY:e+o}}function Sli(t,e){return t.minX<=e.maxX&&t.maxX>=e.minX&&t.minY<=e.maxY&&t.maxY>=e.minY}function Qli(t){if(t.hole_shape==="circle"){const e=t.hole_diameter/2;return e<=0?void 0:{shape:"circle",x:t.x,y:t.y,radius:e}}if(t.hole_shape==="square")return t.hole_diameter<=0?void 0:{shape:"rect",x:t.x,y:t.y,width:t.hole_diameter,height:t.hole_diameter,rotation:Lhe(t)};if(t.hole_shape==="oval")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"oval",x:t.x,y:t.y,radiusX:t.hole_width/2,radiusY:t.hole_height/2,rotation:Lhe(t)};if(t.hole_shape==="rect")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"rect",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:Lhe(t)};if(t.hole_shape==="pill"||t.hole_shape==="rotated_pill")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"pill",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:Lhe(t)}}function vli(t){if(t.shape==="circle"){const i=t.hole_diameter/2;return i<=0?void 0:{shape:"circle",x:t.x,y:t.y,radius:i}}if(t.shape==="oval"){const i=t.hole_width/2,r=t.hole_height/2;return i<=0||r<=0?void 0:{shape:"oval",x:t.x,y:t.y,radiusX:i,radiusY:r,rotation:t.ccw_rotation}}if(t.shape==="pill")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"pill",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:t.ccw_rotation};if(t.shape==="circular_hole_with_rect_pad"){const i=t.hole_diameter/2;return i<=0?void 0:{shape:"circle",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),radius:i}}if(t.shape==="pill_hole_with_rect_pad")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"pill",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height};if(t.shape==="rotated_pill_hole_with_rect_pad")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"pill",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height,rotation:t.hole_ccw_rotation};if(t.shape!=="hole_with_polygon_pad")return;const e=t.x+(t.hole_offset_x??0),n=t.y+(t.hole_offset_y??0),o=t.hole_shape;if(o==="circle"){const i=(t.hole_diameter??0)/2;return i<=0?void 0:{shape:"circle",x:e,y:n,radius:i}}if(o==="oval"){const i=(t.hole_width??0)/2,r=(t.hole_height??0)/2;return i<=0||r<=0?void 0:{shape:"oval",x:e,y:n,radiusX:i,radiusY:r}}if(o==="pill"||o==="rotated_pill"){const i=t.hole_width??0,r=t.hole_height??0;return i<=0||r<=0?void 0:{shape:"pill",x:e,y:n,width:i,height:r,rotation:o==="rotated_pill"?t.ccw_rotation:0}}}function Lhe(t){return"ccw_rotation"in t&&typeof t.ccw_rotation=="number"?t.ccw_rotation:0}function wli(t){return t.shape==="rect"||t.shape==="rotated_rect"?t.corner_radius??t.rect_border_radius??0:0}function bon(t,e){if(!t||t.length===0)return!0;const n=Son(e);return t.some(o=>Son(o)===n)}function Son(t){if(typeof t=="string")return t;if(t&&typeof t=="object"&&"name"in t&&typeof t.name=="string")return t.name}function Pli(t,e){const n=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16);return`rgba(${n}, ${o}, ${i}, ${e})`}function Mli(t,e){return t.layers.includes("bottom")&&!t.layers.includes("top")?e.keepout.bottom:e.keepout.top}function Qon(t){const{ctx:e,strokeColor:n,hatchWidth:o,hatchSpacing:i,diagonal:r,getLineEndpoints:s}=t;e.strokeStyle=n,e.lineWidth=o,e.setLineDash([]);for(let a=-r;a<r*2;a+=i){const{startX:A,startY:c,endX:l,endY:u}=s(a);e.beginPath(),e.moveTo(A,c),e.lineTo(l,u),e.stroke()}}function von(t){const{ctx:e,fillColor:n,drawPath:o,drawHatch:i}=t;o(),e.fillStyle=n,e.fill(),o(),e.clip(),i()}function Dli(t){const{ctx:e,keepout:n,realToCanvasMat:o,colorMap:i}=t,r=Math.abs(o.a),s=Mli(n,i),a=Pli(s,.2),A=1*r,c=.15*r;if(n.shape==="rect"){const[l,u]=Bn(o,[n.center.x,n.center.y]),g=n.width*r,h=n.height*r,d=n.rotation??0,p=Math.sqrt(g*g+h*h),m=g/2,_=h/2;e.save(),e.translate(l,u),d!==0&&e.rotate(-d*(Math.PI/180)),von({ctx:e,fillColor:a,drawPath:()=>fli({ctx:e,cx:0,cy:0,width:g,height:h}),drawHatch:()=>Qon({ctx:e,strokeColor:s,hatchWidth:c,hatchSpacing:A,diagonal:p,getLineEndpoints:f=>({startX:-m+f,startY:-_,endX:-m+f+p,endY:-_+p})})}),e.restore();return}if(n.shape==="circle"){const[l,u]=Bn(o,[n.center.x,n.center.y]),g=n.radius*r,h=g*2;e.save(),e.translate(l,u),von({ctx:e,fillColor:a,drawPath:()=>_li({ctx:e,cx:0,cy:0,radius:g}),drawHatch:()=>Qon({ctx:e,strokeColor:s,hatchWidth:c,hatchSpacing:A,diagonal:h,getLineEndpoints:d=>({startX:d-h,startY:-h,endX:d+h,endY:h})})}),e.restore()}}var Nli="rgba(255,255,255,0.5)";function Rli(t){const{ctx:e,pcbNoteDimension:n,realToCanvasMat:o}=t,i=n.color??Nli;_on({ctx:e,from:n.from,to:n.to,realToCanvasMat:o,color:i,fontSize:n.font_size,arrowSize:n.arrow_size,text:n.text,textRotation:n.text_ccw_rotation,offset:n.offset_distance&&n.offset_direction?{distance:n.offset_distance,direction:n.offset_direction}:void 0})}function Tli(t){const{ctx:e,line:n,realToCanvasMat:o}=t,r=n.color??"rgb(89, 148, 220)",s=n.stroke_width??.1,a=n.is_dashed??!1,[A,c]=Bn(o,[n.x1,n.y1]),[l,u]=Bn(o,[n.x2,n.y2]),g=s*Math.abs(o.a);e.save(),a?e.setLineDash([g*2,g*2]):e.setLineDash([]),e.beginPath(),e.moveTo(A,c),e.lineTo(l,u),e.lineWidth=g,e.strokeStyle=r,e.lineCap="round",e.stroke(),e.restore()}function kli(t){const{ctx:e,path:n,realToCanvasMat:o}=t,r=n.color??"rgb(89, 148, 220)";if(!(!n.route||n.route.length<2))for(let s=0;s<n.route.length-1;s++){const a=n.route[s],A=n.route[s+1];!a||!A||QY({ctx:e,start:{x:a.x,y:a.y},end:{x:A.x,y:A.y},strokeWidth:n.stroke_width??.1,stroke:r,realToCanvasMat:o})}}function Fli(t){const{ctx:e,rect:n,realToCanvasMat:o}=t,r=n.color??"rgb(89, 148, 220)",s=n.is_filled??!1,a=n.has_stroke??!0,A=n.is_stroke_dashed??!1;Bp({ctx:e,center:n.center,width:n.width,height:n.height,fill:s?r:void 0,stroke:a?r:void 0,strokeWidth:a?n.stroke_width:void 0,borderRadius:n.corner_radius,realToCanvasMat:o,isStrokeDashed:A})}var Lli="rgb(89, 148, 220)";function Hli(t){const{ctx:e,text:n,realToCanvasMat:o}=t,i=Lli,r=n.color??i,s=n.font_size??1;SY({ctx:e,text:n.text??"",x:n.anchor_position.x,y:n.anchor_position.y,fontSize:s,color:r,realToCanvasMat:o,anchorAlignment:n.anchor_alignment??"center",mirrorX:n.is_mirrored_from_top_view??n.layer==="bottom"})}function Oli(t){const{ctx:e,panel:n,realToCanvasMat:o,colorMap:i}=t,{width:r,height:s,center:a}=n;if(r!==void 0&&s!==void 0&&a){const A=r/2,c=s/2,l=[{x:a.x-A,y:a.y-c},{x:a.x+A,y:a.y-c},{x:a.x+A,y:a.y+c},{x:a.x-A,y:a.y+c}];khe({ctx:e,points:l,stroke:i.boardOutline,strokeWidth:.5,realToCanvasMat:o,closePath:!0})}}function CX(t,e){if(t.length<3||e===0)return t;let n=0,o=0;for(const r of t)n+=r.x,o+=r.y;n/=t.length,o/=t.length;const i=[];for(const r of t){const s=r.x-n,a=r.y-o,A=Math.sqrt(s*s+a*a);if(A>0){const c=s/A,l=a/A;i.push({x:r.x+c*e,y:r.y+l*e})}else i.push({x:r.x+e,y:r.y})}return i}function won(t){const{ctx:e,hole:n,realToCanvasMat:o,colorMap:i,soldermaskMargin:r=0,drawSoldermask:s}=t;if(n.is_covered_with_solder_mask===!0&&s)return;const a=i.copper[t.layer??"top"],A=r<0?Math.abs(r):0;if(n.shape==="circle"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.outer_diameter/2-A,fill:a,realToCanvasMat:o}),B6(e,()=>{dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:"#000",realToCanvasMat:o})}),dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:i.drill,realToCanvasMat:o});return}if(n.shape==="oval"){JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.outer_width/2-A,radius_y:n.outer_height/2-A,fill:a,realToCanvasMat:o,rotation:n.ccw_rotation}),B6(e,()=>{JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2,radius_y:n.hole_height/2,fill:"#000",realToCanvasMat:o,rotation:n.ccw_rotation})}),JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2,radius_y:n.hole_height/2,fill:i.drill,realToCanvasMat:o,rotation:n.ccw_rotation});return}if(n.shape==="pill"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.outer_width-A*2,height:n.outer_height-A*2,fill:a,realToCanvasMat:o,rotation:n.ccw_rotation}),B6(e,()=>{A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,fill:"#000",realToCanvasMat:o,rotation:n.ccw_rotation})}),A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,fill:i.drill,realToCanvasMat:o,rotation:n.ccw_rotation});return}if(n.shape==="circular_hole_with_rect_pad"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width-A*2,height:n.rect_pad_height-A*2,fill:a,realToCanvasMat:o,borderRadius:n.rect_border_radius?Math.max(0,n.rect_border_radius-A):0,ccwRotationDegrees:n.rect_ccw_rotation});const c=n.x+(n.hole_offset_x??0),l=n.y+(n.hole_offset_y??0);B6(e,()=>{dm({ctx:e,center:{x:c,y:l},radius:n.hole_diameter/2,fill:"#000",realToCanvasMat:o})}),dm({ctx:e,center:{x:c,y:l},radius:n.hole_diameter/2,fill:i.drill,realToCanvasMat:o});return}if(n.shape==="pill_hole_with_rect_pad"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width-A*2,height:n.rect_pad_height-A*2,fill:a,realToCanvasMat:o,borderRadius:n.rect_border_radius?Math.max(0,n.rect_border_radius-A):0});const c=n.x+(n.hole_offset_x??0),l=n.y+(n.hole_offset_y??0);B6(e,()=>{A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:"#000",realToCanvasMat:o})}),A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:i.drill,realToCanvasMat:o});return}if(n.shape==="rotated_pill_hole_with_rect_pad"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width-A*2,height:n.rect_pad_height-A*2,fill:a,realToCanvasMat:o,borderRadius:n.rect_border_radius?Math.max(0,n.rect_border_radius-A):0,ccwRotationDegrees:n.rect_ccw_rotation});const c=n.x+(n.hole_offset_x??0),l=n.y+(n.hole_offset_y??0);B6(e,()=>{A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:"#000",realToCanvasMat:o,rotation:n.hole_ccw_rotation})}),A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:i.drill,realToCanvasMat:o,rotation:n.hole_ccw_rotation});return}if(n.shape==="hole_with_polygon_pad"){const c=n.pad_outline;if(c&&c.length>=3){const h=c.map(p=>({x:n.x+p.x,y:n.y+p.y})),d=A>0?CX(h,-A):h;d.length>=3&&sP({ctx:e,points:d,fill:a,realToCanvasMat:o})}const l=n.x+(n.hole_offset_x??0),u=n.y+(n.hole_offset_y??0),g=n.hole_shape;g==="circle"?(B6(e,()=>{dm({ctx:e,center:{x:l,y:u},radius:(n.hole_diameter??0)/2,fill:"#000",realToCanvasMat:o})}),dm({ctx:e,center:{x:l,y:u},radius:(n.hole_diameter??0)/2,fill:i.drill,realToCanvasMat:o})):g==="oval"?(B6(e,()=>{JB({ctx:e,center:{x:l,y:u},radius_x:(n.hole_width??0)/2,radius_y:(n.hole_height??0)/2,fill:"#000",realToCanvasMat:o})}),JB({ctx:e,center:{x:l,y:u},radius_x:(n.hole_width??0)/2,radius_y:(n.hole_height??0)/2,fill:i.drill,realToCanvasMat:o})):g==="pill"?(B6(e,()=>{A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:"#000",realToCanvasMat:o})}),A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:i.drill,realToCanvasMat:o})):g==="rotated_pill"&&(B6(e,()=>{A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:"#000",realToCanvasMat:o})}),A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:i.drill,realToCanvasMat:o}));return}}function B6(t,e){t.save(),t.globalCompositeOperation="destination-out",e(),t.restore()}function Gli(t,e){return t==="bottom"?e.silkscreen.bottom:e.silkscreen.top}function Yli(t){const{ctx:e,circle:n,realToCanvasMat:o,colorMap:i}=t,r=Gli(n.layer,i);dm({ctx:e,center:n.center,radius:n.radius,stroke:r,strokeWidth:n.stroke_width,realToCanvasMat:o})}function Uli(t){const{ctx:e,graphic:n,realToCanvasMat:o,colorMap:i}=t,r=n.layer==="bottom"?i.silkscreen.bottom:i.silkscreen.top;e.beginPath(),pon({ctx:e,shape:n.brep_shape,realToCanvasMat:o}),e.fillStyle=r,e.fill("evenodd")}function Kli(t,e){return t==="bottom"?e.silkscreen.bottom:e.silkscreen.top}function Vli(t){const{ctx:e,line:n,realToCanvasMat:o,colorMap:i}=t,r=Kli(n.layer,i);QY({ctx:e,start:{x:n.x1,y:n.y1},end:{x:n.x2,y:n.y2},strokeWidth:n.stroke_width??.1,stroke:r,realToCanvasMat:o})}function zli(t,e){return t==="bottom"?e.silkscreen.bottom:e.silkscreen.top}function Jli(t){const{ctx:e,oval:n,realToCanvasMat:o,colorMap:i}=t,r=zli(n.layer,i);JB({ctx:e,center:n.center,radius_x:n.radius_x,radius_y:n.radius_y,stroke:r,strokeWidth:.1,realToCanvasMat:o,rotation:n.ccw_rotation??0})}function Wli(t,e){return t==="bottom"?e.silkscreen.bottom:e.silkscreen.top}function jli(t){const{ctx:e,path:n,realToCanvasMat:o,colorMap:i}=t,r=Wli(n.layer,i);if(!(!n.route||n.route.length<2))for(let s=0;s<n.route.length-1;s++){const a=n.route[s],A=n.route[s+1];!a||!A||QY({ctx:e,start:{x:a.x,y:a.y},end:{x:A.x,y:A.y},strokeWidth:n.stroke_width??.1,stroke:r,realToCanvasMat:o})}}function $li(t,e){return t==="bottom"?e.silkscreen.bottom:e.silkscreen.top}function qli(t){const{ctx:e,pill:n,realToCanvasMat:o,colorMap:i}=t,r=$li(n.layer,i);A_({ctx:e,center:n.center,width:n.width,height:n.height,stroke:r,strokeWidth:.2,realToCanvasMat:o})}function Xli(t,e){return t==="bottom"?e.silkscreen.bottom:e.silkscreen.top}function Zli(t){const{ctx:e,rect:n,realToCanvasMat:o,colorMap:i}=t,r=Xli(n.layer,i);Bp({ctx:e,center:n.center,width:n.width,height:n.height,borderRadius:n.corner_radius,fill:n.is_filled?r:"transparent",stroke:r,strokeWidth:n.stroke_width,realToCanvasMat:o})}function e0i(t,e){return t==="bottom"?e.silkscreen.bottom:e.silkscreen.top}function t0i(t){return t||"center"}function n0i(t){const{ctx:e,text:n,realToCanvasMat:o,colorMap:i}=t,r=n.text??"";if(!r)return;const s=e0i(n.layer,i),a=t0i(n.anchor_alignment),A=n.font_size??1;SY({ctx:e,text:r,x:n.anchor_position.x,y:n.anchor_position.y,fontSize:A,color:s,realToCanvasMat:o,anchorAlignment:a,rotation:n.ccw_rotation??0,mirrorX:n.layer==="bottom",knockout:n.is_knockout,knockoutPadding:n.is_knockout?n.knockout_padding:void 0})}function o0i(t,e){return e.copper[t]??e.copper.top}function Pon(t){return t.shape==="rect"||t.shape==="rotated_rect"?t.corner_radius??t.rect_border_radius??0:0}function i0i(t){const{ctx:e,pad:n,realToCanvasMat:o,colorMap:i}=t,r=o0i(n.layer,i),s=Cli(t);if(s.length>0){Ili({ctx:e,pad:n,realToCanvasMat:o,color:r,drillCutouts:s});return}if(n.shape==="rect"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o,borderRadius:Pon(n)});return}if(n.shape==="rotated_rect"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o,borderRadius:Pon(n),ccwRotationDegrees:n.ccw_rotation??0});return}if(n.shape==="circle"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.radius,fill:r,realToCanvasMat:o});return}if(n.shape==="pill"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o});return}if(n.shape==="rotated_pill"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o,rotation:n.ccw_rotation??0});return}if(n.shape==="polygon"){n.points&&n.points.length>=3&&sP({ctx:e,points:n.points,fill:r,realToCanvasMat:o});return}}var yX="rgb(105, 105, 105)";function Mon(t){const{ctx:e,solderPaste:n,realToCanvasMat:o}=t,i={x:n.x,y:n.y};if(n.shape==="rect"){Bp({ctx:e,center:i,width:n.width,height:n.height,fill:yX,realToCanvasMat:o});return}if(n.shape==="rotated_rect"){Bp({ctx:e,center:i,width:n.width,height:n.height,fill:yX,realToCanvasMat:o,ccwRotationDegrees:n.ccw_rotation});return}if(n.shape==="pill"){A_({ctx:e,center:i,width:n.width,height:n.height,fill:yX,realToCanvasMat:o});return}if(n.shape==="oval"){JB({ctx:e,center:i,radius_x:n.width/2,radius_y:n.height/2,fill:yX,realToCanvasMat:o});return}n.shape==="circle"&&dm({ctx:e,center:i,radius:n.radius,fill:yX,realToCanvasMat:o})}function r0i(t){return typeof t=="function"}function Don(t,e,n){if(e<=0||n<=0)return null;const o=globalThis;let i=null;if("OffscreenCanvas"in o&&typeof o.OffscreenCanvas=="function")i=new o.OffscreenCanvas(e,n);else if("document"in o&&o.document&&typeof o.document.createElement=="function"){const s=o.document.createElement("canvas");s.width=e,s.height=n,i=s}else{const s=t.canvas.constructor;if(r0i(s))try{i=new s(e,n)}catch{return null}}if(!i)return null;const r=i.getContext("2d");return r&&(r.boardOwnerMap=t.boardOwnerMap),r}function s0i(t){return"createPattern"in t&&typeof Reflect.get(t,"createPattern")=="function"}function Non(t,e){if(t===e||e.canvas.width<=0||e.canvas.height<=0||!s0i(t))return!1;let n=null;try{n=t.createPattern(e.canvas,"no-repeat")}catch{return!1}return n?(t.save(),t.globalCompositeOperation="source-over",t.fillStyle=n,t.fillRect(0,0,e.canvas.width,e.canvas.height),t.restore(),!0):!1}function Ron(t){const{ctx:e,board:n,realToCanvasMat:o,soldermaskColor:i}=t,{width:r,height:s,center:a,outline:A}=n;if(A&&Array.isArray(A)&&A.length>=3){const c=A.map(l=>{const[u,g]=Bn(o,[l.x,l.y]);return{x:u,y:g}});e.beginPath(),aP({ctx:e,points:c}),e.fillStyle=i,e.fill()}else if(r!==void 0&&s!==void 0&&a){const[c,l]=Bn(o,[a.x,a.y]),u=r*Math.abs(o.a),g=s*Math.abs(o.a);e.fillStyle=i,e.fillRect(c-u/2,l-g/2,u,g)}}function a0i(t){const{ctx:e,panel:n,realToCanvasMat:o,soldermaskColor:i}=t,{width:r,height:s,center:a}=n;if(r===void 0||s===void 0||!a)return;const[A,c]=Bn(o,[a.x,a.y]),l=r*Math.abs(o.a),u=s*Math.abs(o.a);e.fillStyle=i,e.fillRect(A-l/2,c-u/2,l,u)}function EE(t){t.save(),t.globalCompositeOperation="destination-out",t.fill(),t.restore()}function A0i(t){const{ctx:e,cutout:n,realToCanvasMat:o}=t;if(n.shape==="rect"){const[i,r]=Bn(o,[n.center?.x??0,n.center?.y??0]),s=n.width*Math.abs(o.a),a=n.height*Math.abs(o.a),A=(n.corner_radius??0)*Math.abs(o.a);e.save(),e.translate(i,r),n.rotation&&e.rotate(-n.rotation*Math.PI/180),e.beginPath(),xE({ctx:e,cx:0,cy:0,width:s,height:a,radius:A}),e.restore(),EE(e)}else if(n.shape==="circle"){const[i,r]=Bn(o,[n.center?.x??0,n.center?.y??0]),s=n.radius*Math.abs(o.a);e.beginPath(),e.arc(i,r,s,0,Math.PI*2),e.closePath(),EE(e)}else if(n.shape==="polygon"&&n.points&&n.points.length>=3){const i=n.points.map(r=>{const[s,a]=Bn(o,[r.x,r.y]);return{x:s,y:a}});e.beginPath(),aP({ctx:e,points:i}),EE(e)}}var s1="rgba(255, 255, 255, 1)";function tVe(t){const{ctx:e,elements:n,layer:o,realToCanvasMat:i}=t;e.save(),e.globalCompositeOperation="destination-out";for(const r of n){if(r.type==="pcb_smtpad"){if(r.layer!==o||r.is_covered_with_solder_mask===!0)continue;c0i({ctx:e,pad:r,realToCanvasMat:i});continue}if(r.type==="pcb_plated_hole"){if(r.layers&&!r.layers.includes(o)||r.is_covered_with_solder_mask===!0)continue;l0i({ctx:e,hole:r,realToCanvasMat:i});continue}if(r.type==="pcb_via"){if(r.layers&&!r.layers.includes(o))continue;dm({ctx:e,center:{x:r.x,y:r.y},radius:r.outer_diameter/2,fill:s1,realToCanvasMat:i});continue}if(r.type==="pcb_hole"){if(r.is_covered_with_solder_mask===!0)continue;u0i({ctx:e,hole:r,realToCanvasMat:i})}}e.restore()}function c0i(t){const{ctx:e,pad:n,realToCanvasMat:o}=t;if(n.shape==="rect"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,borderRadius:n.corner_radius??n.rect_border_radius??0,fill:s1,realToCanvasMat:o});return}if(n.shape==="rotated_rect"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,borderRadius:n.corner_radius??n.rect_border_radius??0,ccwRotationDegrees:n.ccw_rotation??0,fill:s1,realToCanvasMat:o});return}if(n.shape==="circle"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.radius,fill:s1,realToCanvasMat:o});return}if(n.shape==="pill"||n.shape==="rotated_pill"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,rotation:n.shape==="rotated_pill"?n.ccw_rotation??0:0,fill:s1,realToCanvasMat:o});return}n.shape==="polygon"&&n.points&&n.points.length>=3&&sP({ctx:e,points:n.points,fill:s1,realToCanvasMat:o})}function l0i(t){const{ctx:e,hole:n,realToCanvasMat:o}=t;if(n.shape==="circle"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.outer_diameter/2,fill:s1,realToCanvasMat:o});return}if(n.shape==="oval"){JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.outer_width/2,radius_y:n.outer_height/2,rotation:n.ccw_rotation,fill:s1,realToCanvasMat:o});return}if(n.shape==="pill"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.outer_width,height:n.outer_height,rotation:n.ccw_rotation,fill:s1,realToCanvasMat:o});return}if(n.shape==="circular_hole_with_rect_pad"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width,height:n.rect_pad_height,borderRadius:n.rect_border_radius??0,ccwRotationDegrees:n.rect_ccw_rotation,fill:s1,realToCanvasMat:o});return}if(n.shape==="pill_hole_with_rect_pad"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width,height:n.rect_pad_height,borderRadius:n.rect_border_radius??0,fill:s1,realToCanvasMat:o});return}if(n.shape==="rotated_pill_hole_with_rect_pad"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width,height:n.rect_pad_height,borderRadius:n.rect_border_radius??0,ccwRotationDegrees:n.rect_ccw_rotation,fill:s1,realToCanvasMat:o});return}n.shape==="hole_with_polygon_pad"&&n.pad_outline&&n.pad_outline.length>=3&&sP({ctx:e,points:n.pad_outline.map(i=>({x:n.x+i.x,y:n.y+i.y})),fill:s1,realToCanvasMat:o})}function u0i(t){const{ctx:e,hole:n,realToCanvasMat:o}=t,i="ccw_rotation"in n&&typeof n.ccw_rotation=="number"?n.ccw_rotation:0;if(n.hole_shape==="circle"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:s1,realToCanvasMat:o});return}if(n.hole_shape==="square"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_diameter,height:n.hole_diameter,ccwRotationDegrees:i,fill:s1,realToCanvasMat:o});return}if(n.hole_shape==="oval"){JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2,radius_y:n.hole_height/2,rotation:i,fill:s1,realToCanvasMat:o});return}if(n.hole_shape==="rect"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,ccwRotationDegrees:i,fill:s1,realToCanvasMat:o});return}(n.hole_shape==="pill"||n.hole_shape==="rotated_pill")&&A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,rotation:i,fill:s1,realToCanvasMat:o})}function g0i(t,e,n,o,i){if(Math.abs(i)<1e-10)return null;const r=n-t,s=o-e,a=Math.hypot(r,s);if(a<1e-10)return null;const A=Math.abs(i)*(a/2),c=a/2,l=(A*A+c*c)/(2*A),u=l-A,g=(t+n)/2,h=(e+o)/2,d=-s/a,p=r/a,m=i>0?-1:1;return{centerX:g+m*d*u,centerY:h+m*p*u,radius:l}}function nVe(t,e,n,o,i,r,s){if(Math.abs(r)<1e-10){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const a=g0i(e,n,o,i,r);if(!a){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const[A,c]=Bn(s,[e,n]),[l,u]=Bn(s,[o,i]),[g,h]=Bn(s,[a.centerX,a.centerY]),d=Math.hypot(A-g,c-h),p=Math.atan2(c-h,A-g),m=Math.atan2(u-h,l-g),f=s.a*s.d-s.b*s.c<0,I=r>0?!f:f;t.arc(g,h,d,p,m,I)}function Ton(t,e,n){if(e.vertices.length<2)return;if(e.vertices.length===2){const s=e.vertices[0],a=e.vertices[1];if(s&&a&&Math.abs((s.bulge??0)-1)<1e-10&&Math.abs((a.bulge??0)-1)<1e-10){const[A,c]=Bn(n,[s.x,s.y]);t.moveTo(A,c),nVe(t,s.x,s.y,a.x,a.y,1,n),nVe(t,a.x,a.y,s.x,s.y,1,n);return}}const o=e.vertices[0];if(!o)return;const[i,r]=Bn(n,[o.x,o.y]);t.moveTo(i,r);for(let s=0;s<e.vertices.length;s++){const a=e.vertices[s],A=e.vertices[(s+1)%e.vertices.length];if(!a||!A)continue;const c=a.bulge??0;if(Math.abs(c)<1e-10){const[l,u]=Bn(n,[A.x,A.y]);t.lineTo(l,u)}else nVe(t,a.x,a.y,A.x,A.y,c,n)}}function d0i(t){const{ctx:e,pour:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r,elements:s}=t;if(n.layer===r&&n.covered_with_solder_mask===!0){if(e.save(),e.fillStyle=i,n.shape==="rect"){const[a,A]=Bn(o,[n.center.x,n.center.y]),c=n.width*Math.abs(o.a),l=n.height*Math.abs(o.a);e.translate(a,A),n.rotation&&e.rotate(-n.rotation*(Math.PI/180)),e.beginPath(),e.rect(-c/2,-l/2,c,l),e.fill(),e.restore(),tVe({ctx:e,elements:s,layer:r,realToCanvasMat:o});return}if(n.shape==="polygon"){if(n.points&&n.points.length>=3){const a=n.points.map(c=>Bn(o,[c.x,c.y])),A=a[0];if(A){e.beginPath();const[c,l]=A;e.moveTo(c,l);for(let u=1;u<a.length;u++){const g=a[u];if(!g)continue;const[h,d]=g;e.lineTo(h,d)}e.closePath(),e.fill(),tVe({ctx:e,elements:s,layer:r,realToCanvasMat:o})}}e.restore();return}if(n.shape==="brep"){if(e.beginPath(),Ton(e,n.brep_shape.outer_ring,o),n.brep_shape.inner_rings)for(const a of n.brep_shape.inner_rings)Ton(e,a,o);e.fill("evenodd"),tVe({ctx:e,elements:s,layer:r,realToCanvasMat:o}),e.restore();return}e.restore()}}function h0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i}=t,r=n.is_covered_with_solder_mask===!0,s=n.soldermask_margin??0;r?(e.fillStyle=i,Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),e.fill()):s<0?(Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:s}),EE(e),p0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:s})):s>0?(Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:s}),EE(e)):(Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),EE(e))}function kon(t){return"ccw_rotation"in t&&typeof t.ccw_rotation=="number"?t.ccw_rotation:0}function Hhe(t){const{ctx:e,hole:n,realToCanvasMat:o,margin:i}=t,r=kon(n);if(n.hole_shape==="circle"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_diameter/2+i)*Math.abs(o.a);e.beginPath(),e.arc(s,a,A,0,Math.PI*2),e.closePath()}else if(n.hole_shape==="square"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_diameter+i*2)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0&&e.rotate(-r*Math.PI/180),e.beginPath(),e.rect(-A/2,-A/2,A,A),e.closePath(),e.restore()}else if(n.hole_shape==="oval"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_width/2+i)*Math.abs(o.a),c=(n.hole_height/2+i)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0&&e.rotate(-r*Math.PI/180),e.beginPath(),e.ellipse(0,0,A,c,0,0,Math.PI*2),e.closePath(),e.restore()}else if(n.hole_shape==="rect"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_width+i*2)*Math.abs(o.a),c=(n.hole_height+i*2)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0&&e.rotate(-r*Math.PI/180),e.beginPath(),e.rect(-A/2,-c/2,A,c),e.closePath(),e.restore()}else if(n.hole_shape==="pill"||n.hole_shape==="rotated_pill"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_width+i*2)*Math.abs(o.a),c=(n.hole_height+i*2)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0&&e.rotate(-r*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:A,height:c}),e.restore()}}function p0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:r}=t,s=Math.abs(r),a=kon(n);if(e.fillStyle=i,n.hole_shape==="circle"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_diameter/2*Math.abs(o.a),u=s*Math.abs(o.a),g=Math.max(0,l-u);e.save(),e.beginPath(),e.arc(A,c,l,0,Math.PI*2),g>0&&e.arc(A,c,g,0,Math.PI*2,!0),e.fill("evenodd"),e.restore()}else if(n.hole_shape==="square"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_diameter*Math.abs(o.a),u=s*Math.abs(o.a),g=Math.max(0,l-u*2);e.save(),e.translate(A,c),a!==0&&e.rotate(-a*Math.PI/180),e.beginPath(),e.rect(-l/2,-l/2,l,l),g>0&&e.rect(-g/2,-g/2,g,g),e.fill("evenodd"),e.restore()}else if(n.hole_shape==="oval"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_width/2*Math.abs(o.a),u=n.hole_height/2*Math.abs(o.a),g=s*Math.abs(o.a),h=Math.max(0,l-g),d=Math.max(0,u-g);e.save(),e.translate(A,c),a!==0&&e.rotate(-a*Math.PI/180),e.beginPath(),e.ellipse(0,0,l,u,0,0,Math.PI*2),h>0&&d>0&&(e.moveTo(h,0),e.ellipse(0,0,h,d,0,0,Math.PI*2)),e.fill("evenodd"),e.restore()}else if(n.hole_shape==="rect"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_width*Math.abs(o.a),u=n.hole_height*Math.abs(o.a),g=s*Math.abs(o.a),h=Math.max(0,l-g*2),d=Math.max(0,u-g*2);e.save(),e.translate(A,c),a!==0&&e.rotate(-a*Math.PI/180),e.beginPath(),e.rect(-l/2,-u/2,l,u),h>0&&d>0&&e.rect(-h/2,-d/2,h,d),e.fill("evenodd"),e.restore()}else if(n.hole_shape==="pill"||n.hole_shape==="rotated_pill"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_width*Math.abs(o.a),u=n.hole_height*Math.abs(o.a),g=s*Math.abs(o.a);e.save(),e.translate(A,c),a!==0&&e.rotate(-a*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:l,height:u});const h=l-g*2,d=u-g*2;h>0&&d>0&&aS({ctx:e,cx:0,cy:0,width:h,height:d}),e.fill("evenodd"),e.restore()}}function m0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(n.layers&&!n.layers.includes(r))return;const s=n.is_covered_with_solder_mask===!0,a=n.soldermask_margin??0;s?(e.fillStyle=i,Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),e.fill()):a<0?(Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:a}),EE(e),_0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:a})):a>0?(Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:a}),EE(e)):(Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),EE(e))}function Ohe(t){const{ctx:e,hole:n,realToCanvasMat:o,margin:i}=t;if(n.shape==="circle"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.outer_diameter/2+i)*Math.abs(o.a);e.beginPath(),e.arc(r,s,a,0,Math.PI*2),e.closePath()}else if(n.shape==="oval"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.outer_width/2+i)*Math.abs(o.a),A=(n.outer_height/2+i)*Math.abs(o.a);e.beginPath(),e.ellipse(r,s,a,A,-((n.ccw_rotation??0)*Math.PI)/180,0,Math.PI*2),e.closePath()}else if(n.shape==="pill"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.outer_width+i*2)*Math.abs(o.a),A=(n.outer_height+i*2)*Math.abs(o.a);e.beginPath(),aS({ctx:e,cx:r,cy:s,width:a,height:A,ccwRotationDegrees:n.ccw_rotation})}else if(n.shape==="circular_hole_with_rect_pad"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.rect_pad_width+i*2)*Math.abs(o.a),A=(n.rect_pad_height+i*2)*Math.abs(o.a),c=(n.rect_border_radius??0)*Math.abs(o.a);e.beginPath(),xE({ctx:e,cx:r,cy:s,width:a,height:A,radius:c,ccwRotationDegrees:n.rect_ccw_rotation})}else if(n.shape==="pill_hole_with_rect_pad"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.rect_pad_width+i*2)*Math.abs(o.a),A=(n.rect_pad_height+i*2)*Math.abs(o.a),c=(n.rect_border_radius??0)*Math.abs(o.a);e.beginPath(),xE({ctx:e,cx:r,cy:s,width:a,height:A,radius:c})}else if(n.shape==="rotated_pill_hole_with_rect_pad"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.rect_pad_width+i*2)*Math.abs(o.a),A=(n.rect_pad_height+i*2)*Math.abs(o.a),c=(n.rect_border_radius??0)*Math.abs(o.a);e.beginPath(),xE({ctx:e,cx:r,cy:s,width:a,height:A,radius:c,ccwRotationDegrees:n.rect_ccw_rotation})}else if(n.shape==="hole_with_polygon_pad"&&n.pad_outline&&n.pad_outline.length>=3){const r=n.pad_outline.map(A=>({x:n.x+A.x,y:n.y+A.y})),a=(i!==0?CX(r,i):r).map(A=>{const[c,l]=Bn(o,[A.x,A.y]);return{x:c,y:l}});e.beginPath(),aP({ctx:e,points:a})}}function _0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:r}=t,s=Math.abs(r);if(e.fillStyle=i,n.shape==="circle"){const[a,A]=Bn(o,[n.x,n.y]),c=n.outer_diameter/2*Math.abs(o.a),l=s*Math.abs(o.a),u=Math.max(0,c-l);e.beginPath(),e.arc(a,A,c,0,Math.PI*2),u>0&&e.arc(a,A,u,0,Math.PI*2,!0),e.fill("evenodd")}else if(n.shape==="oval"){const[a,A]=Bn(o,[n.x,n.y]),c=n.outer_width/2*Math.abs(o.a),l=n.outer_height/2*Math.abs(o.a),u=s*Math.abs(o.a),g=Math.max(0,c-u),h=Math.max(0,l-u),d=-((n.ccw_rotation??0)*Math.PI)/180;if(e.beginPath(),e.ellipse(a,A,c,l,d,0,Math.PI*2),g>0&&h>0){const p=a+g*Math.cos(d),m=A+g*Math.sin(d);e.moveTo(p,m),e.ellipse(a,A,g,h,d,0,Math.PI*2)}e.fill("evenodd")}else if(n.shape==="pill"){const[a,A]=Bn(o,[n.x,n.y]),c=n.outer_width*Math.abs(o.a),l=n.outer_height*Math.abs(o.a),u=s*Math.abs(o.a);e.beginPath(),aS({ctx:e,cx:a,cy:A,width:c,height:l,ccwRotationDegrees:n.ccw_rotation});const g=c-u*2,h=l-u*2;g>0&&h>0&&aS({ctx:e,cx:a,cy:A,width:g,height:h,ccwRotationDegrees:n.ccw_rotation}),e.fill("evenodd")}else if(n.shape==="circular_hole_with_rect_pad"){const[a,A]=Bn(o,[n.x,n.y]),c=n.rect_pad_width*Math.abs(o.a),l=n.rect_pad_height*Math.abs(o.a),u=s*Math.abs(o.a),g=n.rect_border_radius?n.rect_border_radius*Math.abs(o.a):0;e.beginPath(),xE({ctx:e,cx:a,cy:A,width:c,height:l,radius:g,ccwRotationDegrees:n.rect_ccw_rotation});const h=c-u*2,d=l-u*2;if(h>0&&d>0){const p=Math.max(0,g-u);xE({ctx:e,cx:a,cy:A,width:h,height:d,radius:p,ccwRotationDegrees:n.rect_ccw_rotation})}e.fill("evenodd")}else if(n.shape==="pill_hole_with_rect_pad"){const[a,A]=Bn(o,[n.x,n.y]),c=n.rect_pad_width*Math.abs(o.a),l=n.rect_pad_height*Math.abs(o.a),u=s*Math.abs(o.a),g=n.rect_border_radius?n.rect_border_radius*Math.abs(o.a):0;e.beginPath(),xE({ctx:e,cx:a,cy:A,width:c,height:l,radius:g});const h=c-u*2,d=l-u*2;if(h>0&&d>0){const p=Math.max(0,g-u);xE({ctx:e,cx:a,cy:A,width:h,height:d,radius:p})}e.fill("evenodd")}else if(n.shape==="rotated_pill_hole_with_rect_pad"){const[a,A]=Bn(o,[n.x,n.y]),c=n.rect_pad_width*Math.abs(o.a),l=n.rect_pad_height*Math.abs(o.a),u=s*Math.abs(o.a),g=n.rect_border_radius?n.rect_border_radius*Math.abs(o.a):0;e.beginPath(),xE({ctx:e,cx:a,cy:A,width:c,height:l,radius:g,ccwRotationDegrees:n.rect_ccw_rotation});const h=c-u*2,d=l-u*2;if(h>0&&d>0){const p=Math.max(0,g-u);xE({ctx:e,cx:a,cy:A,width:h,height:d,radius:p,ccwRotationDegrees:n.rect_ccw_rotation})}e.fill("evenodd")}else if(n.shape==="hole_with_polygon_pad"&&n.pad_outline&&n.pad_outline.length>=3){const a=n.pad_outline.map(l=>({x:n.x+l.x,y:n.y+l.y}));e.beginPath();const A=a.map(l=>{const[u,g]=Bn(o,[l.x,l.y]);return{x:u,y:g}});aP({ctx:e,points:A});const c=CX(a,-s);if(c.length>=3){const l=c.map(u=>{const[g,h]=Bn(o,[u.x,u.y]);return{x:g,y:h}});aP({ctx:e,points:l})}e.fill("evenodd")}}function f0i(t){const{ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(n.layer!==r)return;const s=n.is_covered_with_solder_mask===!0,a=n.soldermask_margin??0;let A=a,c=a,l=a,u=a;(n.shape==="rect"||n.shape==="rotated_rect")&&(A=n.soldermask_margin_left??a,c=n.soldermask_margin_right??a,l=n.soldermask_margin_top??a,u=n.soldermask_margin_bottom??a),s?(e.fillStyle=i,Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:0,mr:0,mt:0,mb:0}),e.fill()):A<0||c<0||l<0||u<0?(Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:A,mr:c,mt:l,mb:u}),EE(e),I0i({ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,ml:A,mr:c,mt:l,mb:u})):A>0||c>0||l>0||u>0?(Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:A,mr:c,mt:l,mb:u}),EE(e)):(Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:0,mr:0,mt:0,mb:0}),EE(e))}function Ghe(t){const{ctx:e,pad:n,realToCanvasMat:o,ml:i,mr:r,mt:s,mb:a}=t,A=n.shape==="rotated_rect"||n.shape==="rotated_pill"?n.ccw_rotation??0:0;if(n.shape==="rect"||n.shape==="rotated_rect"){const c=n.corner_radius??n.rect_border_radius??0,l=A*Math.PI/180,u=(r-i)/2,g=(s-a)/2,h=u*Math.cos(l)-g*Math.sin(l),d=u*Math.sin(l)+g*Math.cos(l),[p,m]=Bn(o,[n.x+h,n.y+d]),_=(n.width+i+r)*Math.abs(o.a),f=(n.height+s+a)*Math.abs(o.a),I=c*Math.abs(o.a);e.save(),e.translate(p,m),A!==0&&e.rotate(-A*Math.PI/180),e.beginPath(),xE({ctx:e,cx:0,cy:0,width:_,height:f,radius:I}),e.restore()}else if(n.shape==="circle"){const c=(i+r+s+a)/4,[l,u]=Bn(o,[n.x,n.y]),g=(n.radius+c)*Math.abs(o.a);e.beginPath(),e.arc(l,u,g,0,Math.PI*2),e.closePath()}else if(n.shape==="pill"||n.shape==="rotated_pill"){const c=(i+r)/2,[l,u]=Bn(o,[n.x,n.y]),g=(n.width+c*2)*Math.abs(o.a),h=(n.height+c*2)*Math.abs(o.a);e.save(),e.translate(l,u),A!==0&&e.rotate(-A*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:g,height:h}),e.restore()}else if(n.shape==="polygon"&&n.points&&n.points.length>=3){const c=(i+r+s+a)/4,u=(c!==0?CX(n.points,c):n.points).map(g=>{const[h,d]=Bn(o,[g.x,g.y]);return{x:h,y:d}});e.beginPath(),aP({ctx:e,points:u})}}function I0i(t){const{ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,ml:r,mr:s,mt:a,mb:A}=t,c=n.shape==="rotated_rect"||n.shape==="rotated_pill"?n.ccw_rotation??0:0,l=Math.max(0,-r),u=Math.max(0,-s),g=Math.max(0,-a),h=Math.max(0,-A);if(e.fillStyle=i,n.shape==="rect"||n.shape==="rotated_rect"){const d=n.corner_radius??n.rect_border_radius??0,[p,m]=Bn(o,[n.x,n.y]),_=n.width*Math.abs(o.a),f=n.height*Math.abs(o.a),I=d*Math.abs(o.a),C=l*Math.abs(o.a),y=u*Math.abs(o.a),x=g*Math.abs(o.a),E=h*Math.abs(o.a);e.save(),e.translate(p,m),c!==0&&e.rotate(-c*Math.PI/180),e.beginPath(),xE({ctx:e,cx:0,cy:0,width:_,height:f,radius:I});const B=_-C-y,S=f-x-E,Q=(C-y)/2,w=(x-E)/2,M=Math.max(0,I-(C+y+x+E)/4);B>0&&S>0&&xE({ctx:e,cx:Q,cy:w,width:B,height:S,radius:M}),e.fill("evenodd"),e.restore()}else if(n.shape==="circle"){const d=Math.max(l,u,g,h),[p,m]=Bn(o,[n.x,n.y]),_=n.radius*Math.abs(o.a),f=d*Math.abs(o.a),I=Math.max(0,_-f);e.save(),e.beginPath(),e.arc(p,m,_,0,Math.PI*2),I>0&&e.arc(p,m,I,0,Math.PI*2,!0),e.fill("evenodd"),e.restore()}else if(n.shape==="pill"||n.shape==="rotated_pill"){const d=Math.max(l,u,g,h),[p,m]=Bn(o,[n.x,n.y]),_=n.width*Math.abs(o.a),f=n.height*Math.abs(o.a),I=d*Math.abs(o.a);e.save(),e.translate(p,m),c!==0&&e.rotate(-c*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:_,height:f});const C=_-I*2,y=f-I*2;C>0&&y>0&&aS({ctx:e,cx:0,cy:0,width:C,height:y}),e.fill("evenodd"),e.restore()}else if(n.shape==="polygon"&&n.points&&n.points.length>=3){const d=Math.max(l,u,g,h);e.save(),e.beginPath();const p=n.points.map(_=>{const[f,I]=Bn(o,[_.x,_.y]);return{x:f,y:I}});aP({ctx:e,points:p});const m=CX(n.points,-d);if(m.length>=3){const _=m.map(f=>{const[I,C]=Bn(o,[f.x,f.y]);return{x:I,y:C}});aP({ctx:e,points:_})}e.fill("evenodd"),e.restore()}}function vY(t,e){const n=Math.hypot(t,e);return n<=Number.EPSILON?{x:0,y:0}:{x:t/n,y:e/n}}function C0i(t,e){const n=t.length;if(n<2)return{x:1,y:0};if(e<=0){const c=t[1],l=t[0];if(!c||!l)return{x:1,y:0};const u=vY(c.x-l.x,c.y-l.y);return u.x===0&&u.y===0?{x:1,y:0}:u}if(e>=n-1){const c=t[n-2],l=t[n-1];if(!c||!l)return{x:1,y:0};const u=vY(l.x-c.x,l.y-c.y);return u.x===0&&u.y===0?{x:1,y:0}:u}const o=t[e-1],i=t[e],r=t[e+1];if(!o||!i||!r)return{x:1,y:0};const s=vY(i.x-o.x,i.y-o.y),a=vY(r.x-i.x,r.y-i.y),A=vY(s.x+a.x,s.y+a.y);return A.x===0&&A.y===0?s.x!==0||s.y!==0?s:a.x!==0||a.y!==0?a:{x:1,y:0}:A}function Fon(t){const e=[],n=[];for(let o=0;o<t.length;o++){const i=t[o];if(!i)continue;const r=C0i(t,o),s=vY(-r.y,r.x),a=i.width/2;e.push({x:i.x+s.x*a,y:i.y+s.y*a}),n.push({x:i.x-s.x*a,y:i.y-s.y*a})}return e.concat(n.reverse())}function oVe(t){const e=[];let n=[],o=null;for(const i of t??[]){if(!i||i.route_type!=="wire"){n.length>=2&&e.push(n),n=[],o=null;continue}const r=i.layer??o;if(!r)continue;const s=i.x,a=i.y;typeof s!="number"||typeof a!="number"||typeof i.width=="number"&&(i.width,o&&r!==o&&(n.length>=2&&e.push(n),n=[]),o=r,n.push(i))}return n.length>=2&&e.push(n),e}var Lon=1e-6;function Hon(t){const{ctx:e,trace:n,realToCanvasMat:o,vias:i,platedHoles:r,layer:s}=t;if(!n.route||n.route.length<2)return;const a=oVe(n.route);if(a.length===0)return;const A=new Map;for(const c of a){const l=c[0]?.layer,u=c[c.length-1];if(!(!l||!u)&&!(s&&l!==s)){for(const g of i){if(g.layers&&Array.isArray(g.layers)&&!g.layers.includes(l)||!Oon(u.x,u.y,g.x,g.y))continue;const h=g.hole_diameter/2;if(h<=0)continue;const d={shape:"circle",x:g.x,y:g.y,radius:h};A.set(Gon(d),d)}for(const g of r){if(g.layers&&Array.isArray(g.layers)&&!g.layers.includes(l))continue;const h=y0i(g);h&&Oon(u.x,u.y,h.x,h.y)&&A.set(Gon(h),h)}}}if(A.size!==0){e.save(),e.globalCompositeOperation="destination-out";for(const c of A.values()){if(c.shape==="circle"){dm({ctx:e,center:{x:c.x,y:c.y},radius:c.radius,fill:"#000",realToCanvasMat:o});continue}if(c.shape==="oval"){JB({ctx:e,center:{x:c.x,y:c.y},radius_x:c.radiusX,radius_y:c.radiusY,fill:"#000",realToCanvasMat:o,rotation:c.rotation});continue}A_({ctx:e,center:{x:c.x,y:c.y},width:c.width,height:c.height,fill:"#000",realToCanvasMat:o,rotation:c.rotation})}e.restore()}}function y0i(t){if(t.shape==="circle"){const i=t.hole_diameter/2;return i<=0?void 0:{shape:"circle",x:t.x,y:t.y,radius:i}}if(t.shape==="oval"){const i=t.hole_width/2,r=t.hole_height/2;return i<=0||r<=0?void 0:{shape:"oval",x:t.x,y:t.y,radiusX:i,radiusY:r,rotation:t.ccw_rotation}}if(t.shape==="pill")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"pill",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:t.ccw_rotation};if(t.shape==="circular_hole_with_rect_pad"){const i=t.hole_diameter/2;return i<=0?void 0:{shape:"circle",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),radius:i}}if(t.shape==="pill_hole_with_rect_pad")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"pill",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height};if(t.shape==="rotated_pill_hole_with_rect_pad")return t.hole_width<=0||t.hole_height<=0?void 0:{shape:"pill",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height,rotation:t.hole_ccw_rotation};if(t.shape!=="hole_with_polygon_pad")return;const e=t.x+(t.hole_offset_x??0),n=t.y+(t.hole_offset_y??0),o=t.hole_shape;if(o==="circle"){const i=(t.hole_diameter??0)/2;return i<=0?void 0:{shape:"circle",x:e,y:n,radius:i}}if(o==="oval"){const i=(t.hole_width??0)/2,r=(t.hole_height??0)/2;return i<=0||r<=0?void 0:{shape:"oval",x:e,y:n,radiusX:i,radiusY:r}}if(o==="pill"||o==="rotated_pill"){const i=t.hole_width??0,r=t.hole_height??0;return i<=0||r<=0?void 0:{shape:"pill",x:e,y:n,width:i,height:r,rotation:o==="rotated_pill"?t.ccw_rotation:0}}}function Oon(t,e,n,o){return Math.abs(t-n)<=Lon&&Math.abs(e-o)<=Lon}function Gon(t){return t.shape==="circle"?`circle:${t.x}:${t.y}:${t.radius}`:t.shape==="oval"?`oval:${t.x}:${t.y}:${t.radiusX}:${t.radiusY}:${t.rotation??0}`:`pill:${t.x}:${t.y}:${t.width}:${t.height}:${t.rotation??0}`}function x0i(t){const{ctx:e,trace:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(!n.route||!Array.isArray(n.route)||n.route.length<2)return;const s=oVe(n.route);for(const a of s)if(a[0]?.layer===r){if(n.route_thickness_mode==="interpolated"){sP({ctx:e,points:Fon(a),fill:i,realToCanvasMat:o});continue}for(let c=0;c<a.length-1;c++){const l=a[c],u=a[c+1];!l||!u||QY({ctx:e,start:{x:l.x,y:l.y},end:{x:u.x,y:u.y},strokeWidth:l.width,stroke:i,realToCanvasMat:o,lineCap:"round"})}}Hon({ctx:e,trace:n,realToCanvasMat:o,layer:r,vias:t.vias,platedHoles:t.platedHoles})}function Yon(t){const{ctx:e,via:n,realToCanvasMat:o,layer:i,soldermaskOverCopperColor:r}=t;if(!n.layers.includes(i))return;const s=iVe(n,i,e),[a,A]=Bn(o,[n.x,n.y]),c=n.outer_diameter/2*Math.abs(o.a);e.beginPath(),e.arc(a,A,c,0,Math.PI*2),e.closePath(),s?(e.fillStyle=r,e.fill()):EE(e)}function iVe(t,e,n){let o=n.boardOwnerMap?.get(t.pcb_via_id);!n.boardOwnerMap?.has(t.pcb_via_id)&&t.pcb_trace_id&&(o=n.boardOwnerMap?.get(t.pcb_trace_id));const i=t,r=e==="top"?i.tented_on_top:i.tented_on_bottom,s=e==="top"?o?.default_via_tented_on_top:o?.default_via_tented_on_bottom;return r??i.is_tented??s??!1}function Uon(t){const{ctx:e,realToCanvasMat:n,colorMap:o,layer:i,drawSoldermask:r}=t;let{elements:s}=t;if(!r||e.canvas.width<=0||e.canvas.height<=0)return;const a=s.filter(d=>d.type==="pcb_board"),A=s.find(d=>d.type==="pcb_panel");a.length===0&&!A&&(s=s.filter(d=>d.type==="pcb_via"));const c=o.soldermask[i]??o.soldermask.top,l=o.soldermaskOverCopper[i]??o.soldermaskOverCopper.top,u=s.filter(d=>d.type==="pcb_via"),g=s.filter(d=>d.type==="pcb_plated_hole"),h=Don(e,e.canvas.width,e.canvas.height)??e;if(A&&a0i({ctx:h,panel:A,realToCanvasMat:n,soldermaskColor:c}),A&&a.length>0){h.save(),h.globalCompositeOperation="destination-out";for(const d of a)Ron({ctx:h,board:d,realToCanvasMat:n,soldermaskColor:"#000"});h.restore()}for(const d of a)Ron({ctx:h,board:d,realToCanvasMat:n,soldermaskColor:c});for(const d of s)d.type==="pcb_trace"?x0i({ctx:h,trace:d,realToCanvasMat:n,soldermaskOverCopperColor:l,layer:i,vias:u,platedHoles:g}):d.type==="pcb_copper_pour"&&d0i({ctx:h,pour:d,realToCanvasMat:n,soldermaskOverCopperColor:l,layer:i,elements:s});for(const d of u)iVe(d,i,h)&&Yon({ctx:h,via:d,realToCanvasMat:n,layer:i,soldermaskOverCopperColor:l});for(const d of s)E0i({ctx:h,element:d,realToCanvasMat:n,soldermaskOverCopperColor:l,layer:i});Non(e,h)}function E0i(t){const{ctx:e,element:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(n.type==="pcb_smtpad")f0i({ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r});else if(n.type==="pcb_plated_hole")m0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r});else if(n.type==="pcb_hole")h0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i});else if(n.type==="pcb_via"){if(iVe(n,r,e))return;Yon({ctx:e,via:n,realToCanvasMat:o,layer:r,soldermaskOverCopperColor:i})}else if(n.type==="pcb_cutout")A0i({ctx:e,cutout:n,realToCanvasMat:o});else{if(n.type==="pcb_copper_pour")return;if(n.type==="pcb_trace")return}}function B0i(t,e){return e.copper[t]??e.copper.top}function b0i(t){const{ctx:e,trace:n,realToCanvasMat:o,colorMap:i,layer:r}=t;if(!n.route||!Array.isArray(n.route)||n.route.length<2)return;const s=oVe(n.route);for(const a of s){const A=a[0]?.layer;if(!A||r&&A!==r)continue;const c=B0i(A,i);if(n.route_thickness_mode==="interpolated"){sP({ctx:e,points:Fon(a),fill:c,realToCanvasMat:o});continue}for(let l=0;l<a.length-1;l++){const u=a[l],g=a[l+1];!u||!g||u.is_inside_copper_pour&&g.is_inside_copper_pour||QY({ctx:e,start:{x:u.x,y:u.y},end:{x:g.x,y:g.y},strokeWidth:u.width,stroke:c,realToCanvasMat:o,lineCap:"round"})}}Hon({ctx:e,trace:n,realToCanvasMat:o,vias:t.vias??[],platedHoles:t.platedHoles??[],layer:r})}function Kon(t){const{ctx:e,traces:n,copperPours:o,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a,renderLayers:A}=t;for(const c of Q0i(n,A)){const l=o.filter(g=>g.layer===c);if(l.length===0){rVe({ctx:e,traces:n,layer:c,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a});continue}const u=Don(e,e.canvas.width,e.canvas.height);u&&(rVe({ctx:u,traces:n,layer:c,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a}),S0i({ctx:u,copperPours:l,realToCanvasMat:i}),Non(e,u))||(e.save(),v0i({ctx:e,copperPours:l,realToCanvasMat:i}),rVe({ctx:e,traces:n,layer:c,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a}),e.restore())}}function rVe(t){const{ctx:e,traces:n,layer:o,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a}=t;for(const A of n)b0i({ctx:e,trace:A,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a,layer:o})}function S0i(t){const{ctx:e,copperPours:n,realToCanvasMat:o}=t;if(n.length!==0){e.save(),e.globalCompositeOperation="destination-out",e.fillStyle="#000";for(const i of n)e.beginPath(),qKe({ctx:e,pour:i,realToCanvasMat:o}),e.fill(i.shape==="brep"?"evenodd":"nonzero");e.restore()}}function Q0i(t,e){const n=new Set;for(const o of t)for(const i of o.route??[])i.route_type!=="wire"||!i.layer||e?.length&&!e.includes(`${i.layer}_copper`)||n.add(i.layer);return[...n]}function v0i(t){const{ctx:e,copperPours:n,realToCanvasMat:o}=t;if(n.length!==0){e.beginPath(),e.rect(0,0,e.canvas.width,e.canvas.height);for(const i of n)qKe({ctx:e,pour:i,realToCanvasMat:o});e.clip("evenodd")}}function w0i(t,e,n=[]){const o=[...t,...n].filter(a=>a.type==="pcb_via"),i=new Map;for(const a of o){const c=`${e.boardOwnerMap?.get(a.pcb_via_id)?.pcb_board_id??""}:${a.x}:${a.y}`,l=i.get(c)??[];l.push(a),i.set(c,l)}const r=t.filter(a=>a.type==="pcb_trace"),s=[];for(const a of r){const A=e.boardOwnerMap?.get(a.pcb_trace_id);for(const[c,l]of a.route.entries()){if(l.route_type!=="via")continue;const u=`${A?.pcb_board_id??""}:${l.x}:${l.y}`,g=i.get(u)??[];if(g.some(p=>p.layers.includes(l.from_layer)&&p.layers.includes(l.to_layer)))continue;const d={type:"pcb_via",pcb_via_id:`${a.pcb_trace_id}_route_via_${c}`,pcb_trace_id:a.pcb_trace_id,subcircuit_id:a.subcircuit_id,pcb_group_id:a.pcb_group_id,x:l.x,y:l.y,layers:[l.from_layer,l.to_layer],hole_diameter:l.hole_diameter??A?.min_via_hole_diameter??.25,outer_diameter:l.outer_diameter??A?.min_via_pad_diameter??.6,tented_on_top:l.tented_on_top,tented_on_bottom:l.tented_on_bottom};s.push(d),g.push(d),i.set(u,g)}}return s}function Von(t){const{ctx:e,via:n,realToCanvasMat:o,colorMap:i,layer:r}=t;dm({ctx:e,center:{x:n.x,y:n.y},radius:n.outer_diameter/2,fill:i.copper[r??"top"],realToCanvasMat:o}),e.save(),e.globalCompositeOperation="destination-out",dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:"#000",realToCanvasMat:o}),e.restore(),dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:i.drill,realToCanvasMat:o})}function Kx(t,e){if(!e.layers||e.layers.length===0)return!0;if(t.type==="pcb_silkscreen_graphic")return e.layers.some(o=>o===`${t.layer}_silkscreen`);const n=umt(t);return n.length===0?!0:n.some(o=>e.layers.includes(o))}var i2={copper:{top:"rgb(200, 52, 52)",inner1:"rgb(127, 200, 127)",inner2:"rgb(206, 125, 44)",inner3:"rgb(79, 203, 203)",inner4:"rgb(219, 98, 139)",inner5:"rgb(167, 165, 198)",inner6:"rgb(40, 204, 217)",inner7:"rgb(232, 178, 167)",inner8:"rgb(242, 237, 161)",bottom:"rgb(77, 127, 196)"},copperPour:{top:"rgb(230, 95, 95)",bottom:"rgb(122, 162, 222)"},soldermaskWithCopperUnderneath:{top:"rgb(18, 82, 50)",bottom:"rgb(77, 127, 196)"},soldermask:{top:"rgb(12, 55, 33)",bottom:"rgb(12, 55, 33)"},soldermaskOverCopper:{top:"rgb(52, 135, 73)",bottom:"rgb(52, 135, 73)"},substrate:"rgb(201, 162, 110)",drill:"#FF26E2",silkscreen:{top:"#f2eda1",bottom:"#5da9e9"},boardOutline:"rgba(255, 255, 255, 0.5)",courtyard:{top:"#FF00FF",bottom:"rgb(38, 233, 255)"},keepout:{top:"#FF6B6B",bottom:"#5da9e9"},fabricationNote:"rgba(255, 255, 255, 0.5)"};function P0i(t){return!t||t.length===0?"top":(t.find(n=>n.endsWith("_copper"))??t[0]??"top_copper").split("_")[0]}var wY=(t,e)=>t.layers?.includes(e)??!0,xl=class f4n{ctx;colorMap;realToCanvasMat;constructor(e){if("getContext"in e&&typeof e.getContext=="function"){const n=e.getContext("2d");if(!n)throw new Error("Failed to get 2D rendering context from canvas");this.ctx=n}else this.ctx=e;this.colorMap={...i2},this.realToCanvasMat=QQ()}configure(e){e.colorOverrides&&(this.colorMap={...this.colorMap,...e.colorOverrides,copper:{...this.colorMap.copper,...e.colorOverrides.copper},copperPour:{...this.colorMap.copperPour,...e.colorOverrides.copperPour},silkscreen:{...this.colorMap.silkscreen,...e.colorOverrides.silkscreen},soldermask:{...this.colorMap.soldermask,...e.colorOverrides.soldermask},soldermaskWithCopperUnderneath:{...this.colorMap.soldermaskWithCopperUnderneath,...e.colorOverrides.soldermaskWithCopperUnderneath},soldermaskOverCopper:{...this.colorMap.soldermaskOverCopper,...e.colorOverrides.soldermaskOverCopper}})}setCameraBounds(e){const n=this.ctx.canvas,o=n.width,i=n.height,r=e.maxX-e.minX,s=e.maxY-e.minY,a=o/r,A=i/s,c=Math.min(a,A),l=(o-r*c)/2,u=(i-s*c)/2;this.realToCanvasMat=Ad(pA(l,u),dC(c,-c),pA(-e.minX,-e.maxY))}drawElements(e,n={}){this.ctx.boardOwnerMap=omt([...n.clipContextElements??[],...e]),e=[...e,...w0i(e,this.ctx,n.clipContextElements)];const o=P0i(n.layers),i=e.find(x=>x.type==="pcb_board"),r=e.find(x=>x.type==="pcb_panel");r&&Oli({ctx:this.ctx,panel:r,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});const s=n.drawBoardMaterial??!1,a=n.drawSoldermask??!1,A=n.drawSolderPaste??!1,c=n.drawSoldermaskTop!==void 0||n.drawSoldermaskBottom!==void 0,l=n.drawSolderPasteTop!==void 0||n.drawSolderPasteBottom!==void 0,u=a&&(n.drawSoldermaskTop??!c),g=a&&(n.drawSoldermaskBottom??!1),h=A&&(n.drawSolderPasteTop??!l)&&e.some(x=>x.type==="pcb_solder_paste"&&x.layer==="top"),d=A&&(n.drawSolderPasteBottom??!1)&&e.some(x=>x.type==="pcb_solder_paste"&&x.layer==="bottom"),p=u||h,m=e.filter(x=>Kx(x,n)&&x.type==="pcb_via"&&wY(x,o)),_=e.filter(x=>Kx(x,n)&&x.type==="pcb_hole"),f=e.filter(x=>Kx(x,n)&&x.type==="pcb_plated_hole"&&wY(x,o)),I=e.filter(x=>Kx(x,n)&&x.type==="pcb_cutout"),C=(n.clipContextElements??e).filter(x=>Kx(x,n)&&x.type==="pcb_copper_pour"),y=e.filter(x=>Kx(x,n)&&x.type==="pcb_trace");i&&wci({ctx:this.ctx,board:i,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,drawBoardMaterial:s,minBoardOutlineStrokePx:n.minBoardOutlineStrokePx});for(const x of e)Kx(x,n)&&x.type==="pcb_copper_pour"&&Dci({ctx:this.ctx,pour:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});for(const x of e)Kx(x,n)&&(x.type==="pcb_smtpad"&&i0i({ctx:this.ctx,pad:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,holes:_,platedHoles:f,vias:m,cutouts:I}),x.type==="pcb_copper_text"&&Xci({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}));if(p){Kon({ctx:this.ctx,traces:y,copperPours:C,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,vias:m,platedHoles:f,renderLayers:n.layers});for(const x of e)Kx(x,n)&&(x.type==="pcb_hole"&&fon({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u}),x.type==="pcb_plated_hole"&&wY(x,o)&&won({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u,layer:o}),x.type==="pcb_via"&&wY(x,o)&&Von({ctx:this.ctx,via:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:o}))}if(u&&Uon({ctx:this.ctx,elements:e,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:"top",drawSoldermask:!0}),h)for(const x of e)x.type!=="pcb_solder_paste"||x.layer!=="top"||Mon({ctx:this.ctx,solderPaste:x,realToCanvasMat:this.realToCanvasMat});for(const x of e)Kx(x,n)&&(x.type==="pcb_silkscreen_text"&&n0i({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_silkscreen_rect"&&Zli({ctx:this.ctx,rect:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_silkscreen_circle"&&Yli({ctx:this.ctx,circle:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_silkscreen_line"&&Vli({ctx:this.ctx,line:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_silkscreen_path"&&jli({ctx:this.ctx,path:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_silkscreen_pill"&&qli({ctx:this.ctx,pill:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_silkscreen_oval"&&Jli({ctx:this.ctx,oval:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_silkscreen_graphic"&&Uli({ctx:this.ctx,graphic:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}));p||Kon({ctx:this.ctx,traces:y,copperPours:C,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,vias:m,platedHoles:f,renderLayers:n.layers});for(const x of e)Kx(x,n)&&x.type==="pcb_hole"&&!p&&fon({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u});for(const x of e)Kx(x,n)&&(x.type==="pcb_plated_hole"&&!p&&wY(x,o)&&won({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u,layer:o}),x.type==="pcb_via"&&!p&&wY(x,o)&&Von({ctx:this.ctx,via:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:o}));if(g&&Uon({ctx:this.ctx,elements:e,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:"bottom",drawSoldermask:!0}),d)for(const x of e)x.type!=="pcb_solder_paste"||x.layer!=="bottom"||Mon({ctx:this.ctx,solderPaste:x,realToCanvasMat:this.realToCanvasMat});for(const x of e)Kx(x,n)&&x.type==="pcb_cutout"&&rli({ctx:this.ctx,cutout:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});for(const x of e){if(!Kx(x,n))continue;x.type==="pcb_keepout"&&Dli({ctx:this.ctx,keepout:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_fabrication_note_text"&&mli({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_fabrication_note_rect"&&hli({ctx:this.ctx,rect:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});const E=n.showPcbNotes??!0;E&&x.type==="pcb_note_rect"&&Fli({realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,ctx:this.ctx,rect:x}),x.type==="pcb_fabrication_note_path"&&dli({ctx:this.ctx,path:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E&&x.type==="pcb_note_path"&&kli({ctx:this.ctx,path:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E&&x.type==="pcb_note_text"&&Hli({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E&&x.type==="pcb_note_line"&&Tli({ctx:this.ctx,line:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E&&x.type==="pcb_note_dimension"&&Rli({ctx:this.ctx,pcbNoteDimension:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_fabrication_note_dimension"&&gli({ctx:this.ctx,pcbFabricationNoteDimension:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_courtyard_circle"&&eli({ctx:this.ctx,circle:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_courtyard_rect"&&ili({ctx:this.ctx,rect:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type==="pcb_courtyard_outline"&&nli({ctx:this.ctx,outline:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap})}if(n.clearDrillHoles&&this.clearDrillHoles(e,o),n.showDebugObjects){const x=new Map;for(const E of e){if(E.type!=="pcb_debug_object")continue;const B=E.shape==="rect"?`${E.center.x}:${E.center.y}:${E.size.width}:${E.size.height}`:void 0,S=B?x.get(B)??0:0;Ali({ctx:this.ctx,debugObject:E,realToCanvasMat:this.realToCanvasMat,labelStackIndex:S}),B&&x.set(B,S+1)}}}clearDrillHoles(e,n){const o=e.filter(a=>a.type==="pcb_hole"||a.type==="pcb_plated_hole"||a.type==="pcb_via"||a.type==="pcb_cutout");if(o.length===0)return;const i="rgba(0,0,0,0)",r=new f4n(this.ctx);r.realToCanvasMat=this.realToCanvasMat,r.configure({colorOverrides:{copper:{top:i,bottom:i,inner1:i,inner2:i,inner3:i,inner4:i,inner5:i,inner6:i,inner7:i,inner8:i},drill:"#000"}}),this.ctx.save(),this.ctx.globalCompositeOperation="destination-out";const s=this.ctx.boardOwnerMap;r.drawElements(o,{layers:[`${n}_copper`],showPcbNotes:!1}),this.ctx.boardOwnerMap=s,this.ctx.restore()}};let M0i={data:""},D0i=t=>{if(typeof window=="object"){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||M0i},N0i=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,R0i=/\/\*[^]*?\*\/|  +/g,zon=/\n+/g,cP=(t,e)=>{let n="",o="",i="";for(let r in t){let s=t[r];r[0]=="@"?r[1]=="i"?n=r+" "+s+";":o+=r[1]=="f"?cP(s,r):r+"{"+cP(s,r[1]=="k"?"":e)+"}":typeof s=="object"?o+=cP(s,e?e.replace(/([^,])+/g,a=>r.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,A=>/&/.test(A)?A.replace(/&/g,a):a?a+" "+A:A)):r):s!=null&&(r=r[1]=="-"?r:r.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=cP.p?cP.p(r,s):r+":"+s+";")}return n+(e&&i?e+"{"+i+"}":i)+o},lP={},Jon=t=>{if(typeof t=="object"){let e="";for(let n in t)e+=n+Jon(t[n]);return e}return t},T0i=(t,e,n,o,i)=>{let r=Jon(t),s=lP[r]||(lP[r]=(A=>{let c=0,l=11;for(;c<A.length;)l=101*l+A.charCodeAt(c++)>>>0;return"go"+l})(r));if(!lP[s]){let A=r!==t?t:(c=>{let l,u,g=[{}];for(;l=N0i.exec(c.replace(R0i,""));)l[4]?g.shift():l[3]?(u=l[3].replace(zon," ").trim(),g.unshift(g[0][u]=g[0][u]||{})):g[0][l[1]]=l[2].replace(zon," ").trim();return g[0]})(t);lP[s]=cP(i?{["@keyframes "+s]:A}:A,n?"":"."+s)}let a=n&&lP.g;return n&&(lP.g=lP[s]),((A,c,l,u)=>{u?c.data=c.data.replace(u,A):c.data.indexOf(A)===-1&&(c.data=l?A+c.data:c.data+A)})(lP[s],e,o,a),s},k0i=(t,e,n)=>t.reduce((o,i,r)=>{let s=e[r];if(s&&s.call){let a=s(n),A=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=A?"."+A:a&&typeof a=="object"?a.props?"":cP(a,""):a===!1?"":a}return o+i+(s??"")},"");function Yhe(t){let e=this||{},n=t.call?t(e.p):t;return T0i(n.unshift?n.raw?k0i(n,[].slice.call(arguments,1),e.p):n.reduce((o,i)=>Object.assign(o,i&&i.call?i(e.p):i),{}):n,D0i(e.target),e.g,e.o,e.k)}let Won,sVe,aVe;Yhe.bind({g:1});let AS=Yhe.bind({k:1});function F0i(t,e,n,o){cP.p=e,Won=t,sVe=n,aVe=o}function uP(t,e){let n=this||{};return function(){let o=arguments;function i(r,s){let a=Object.assign({},r),A=a.className||i.className;n.p=Object.assign({theme:sVe&&sVe()},a),n.o=/go\d/.test(A),a.className=Yhe.apply(n,o)+(A?" "+A:"");let c=t;return t[0]&&(c=a.as||t,delete a.as),aVe&&c[0]&&aVe(a),Won(c,a)}return i}}var L0i=t=>typeof t=="function",Uhe=(t,e)=>L0i(t)?t(e):t,H0i=(()=>{let t=0;return()=>(++t).toString()})(),jon=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),O0i=20,AVe="default",$on=(t,e)=>{let{toastLimit:n}=t.settings;switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,n)};case 1:return{...t,toasts:t.toasts.map(s=>s.id===e.toast.id?{...s,...e.toast}:s)};case 2:let{toast:o}=e;return $on(t,{type:t.toasts.find(s=>s.id===o.id)?1:0,toast:o});case 3:let{toastId:i}=e;return{...t,toasts:t.toasts.map(s=>s.id===i||i===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=>s.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let r=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+r}))}}},Khe=[],qon={toasts:[],pausedAt:void 0,settings:{toastLimit:O0i}},b6={},Xon=(t,e=AVe)=>{b6[e]=$on(b6[e]||qon,t),Khe.forEach(([n,o])=>{n===e&&o(b6[e])})},Zon=t=>Object.keys(b6).forEach(e=>Xon(t,e)),G0i=t=>Object.keys(b6).find(e=>b6[e].toasts.some(n=>n.id===t)),Vhe=(t=AVe)=>e=>{Xon(e,t)},Y0i={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},U0i=(t={},e=AVe)=>{let[n,o]=ee.useState(b6[e]||qon),i=ee.useRef(b6[e]);ee.useEffect(()=>(i.current!==b6[e]&&o(b6[e]),Khe.push([e,o]),()=>{let s=Khe.findIndex(([a])=>a===e);s>-1&&Khe.splice(s,1)}),[e]);let r=n.toasts.map(s=>{var a,A,c;return{...t,...t[s.type],...s,removeDelay:s.removeDelay||((a=t[s.type])==null?void 0:a.removeDelay)||t?.removeDelay,duration:s.duration||((A=t[s.type])==null?void 0:A.duration)||t?.duration||Y0i[s.type],style:{...t.style,...(c=t[s.type])==null?void 0:c.style,...s.style}}});return{...n,toasts:r}},K0i=(t,e="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:n?.id||H0i()}),xX=t=>(e,n)=>{let o=K0i(e,t,n);return Vhe(o.toasterId||G0i(o.id))({type:2,toast:o}),o.id},ua=(t,e)=>xX("blank")(t,e);ua.error=xX("error"),ua.success=xX("success"),ua.loading=xX("loading"),ua.custom=xX("custom"),ua.dismiss=(t,e)=>{let n={type:3,toastId:t};e?Vhe(e)(n):Zon(n)},ua.dismissAll=t=>ua.dismiss(void 0,t),ua.remove=(t,e)=>{let n={type:4,toastId:t};e?Vhe(e)(n):Zon(n)},ua.removeAll=t=>ua.remove(void 0,t),ua.promise=(t,e,n)=>{let o=ua.loading(e.loading,{...n,...n?.loading});return typeof t=="function"&&(t=t()),t.then(i=>{let r=e.success?Uhe(e.success,i):void 0;return r?ua.success(r,{id:o,...n,...n?.success}):ua.dismiss(o),i}).catch(i=>{let r=e.error?Uhe(e.error,i):void 0;r?ua.error(r,{id:o,...n,...n?.error}):ua.dismiss(o)}),t};var V0i=1e3,z0i=(t,e="default")=>{let{toasts:n,pausedAt:o}=U0i(t,e),i=ee.useRef(new Map).current,r=ee.useCallback((u,g=V0i)=>{if(i.has(u))return;let h=setTimeout(()=>{i.delete(u),s({type:4,toastId:u})},g);i.set(u,h)},[]);ee.useEffect(()=>{if(o)return;let u=Date.now(),g=n.map(h=>{if(h.duration===1/0)return;let d=(h.duration||0)+h.pauseDuration-(u-h.createdAt);if(d<0){h.visible&&ua.dismiss(h.id);return}return setTimeout(()=>ua.dismiss(h.id,e),d)});return()=>{g.forEach(h=>h&&clearTimeout(h))}},[n,o,e]);let s=ee.useCallback(Vhe(e),[e]),a=ee.useCallback(()=>{s({type:5,time:Date.now()})},[s]),A=ee.useCallback((u,g)=>{s({type:1,toast:{id:u,height:g}})},[s]),c=ee.useCallback(()=>{o&&s({type:6,time:Date.now()})},[o,s]),l=ee.useCallback((u,g)=>{let{reverseOrder:h=!1,gutter:d=8,defaultPosition:p}=g||{},m=n.filter(I=>(I.position||p)===(u.position||p)&&I.height),_=m.findIndex(I=>I.id===u.id),f=m.filter((I,C)=>C<_&&I.visible).length;return m.filter(I=>I.visible).slice(...h?[f+1]:[0,f]).reduce((I,C)=>I+(C.height||0)+d,0)},[n]);return ee.useEffect(()=>{n.forEach(u=>{if(u.dismissed)r(u.id,u.removeDelay);else{let g=i.get(u.id);g&&(clearTimeout(g),i.delete(u.id))}})},[n,r]),{toasts:n,handlers:{updateHeight:A,startPause:a,endPause:c,calculateOffset:l}}},J0i=AS` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,W0i=AS` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,j0i=AS` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,$0i=uP("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${t=>t.primary||"#ff4b4b"}; position: relative; transform: rotate(45deg); animation: ${J0i} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${W0i} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${t=>t.secondary||"#fff"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${j0i} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,q0i=AS` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,X0i=uP("div")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${t=>t.secondary||"#e0e0e0"}; border-right-color: ${t=>t.primary||"#616161"}; animation: ${q0i} 1s linear infinite; `,Z0i=AS` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,eui=AS` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,tui=uP("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${t=>t.primary||"#61d345"}; position: relative; transform: rotate(45deg); animation: ${Z0i} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${eui} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${t=>t.secondary||"#fff"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,nui=uP("div")` position: absolute; `,oui=uP("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,iui=AS` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,rui=uP("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${iui} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,sui=({toast:t})=>{let{icon:e,type:n,iconTheme:o}=t;return e!==void 0?typeof e=="string"?ee.createElement(rui,null,e):e:n==="blank"?null:ee.createElement(oui,null,ee.createElement(X0i,{...o}),n!=="loading"&&ee.createElement(nui,null,n==="error"?ee.createElement($0i,{...o}):ee.createElement(tui,{...o})))},aui=t=>` 0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;} 100% {transform: translate3d(0,0,0) scale(1); opacity:1;} `,Aui=t=>` 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;} `,cui="0%{opacity:0;} 100%{opacity:1;}",lui="0%{opacity:1;} 100%{opacity:0;}",uui=uP("div")` :where(&) { display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; } `,gui=uP("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,dui=(t,e)=>{let n=t.includes("top")?1:-1,[o,i]=jon()?[cui,lui]:[aui(n),Aui(n)];return{animation:e?`${AS(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${AS(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},hui=ee.memo(({toast:t,position:e,style:n,children:o})=>{let i=t.height?dui(t.position||e||"top-center",t.visible):{opacity:0},r=ee.createElement(sui,{toast:t}),s=ee.createElement(gui,{...t.ariaProps},Uhe(t.message,t));return ee.createElement(uui,{className:t.className,style:{...i,...n,...t.style}},typeof o=="function"?o({icon:r,message:s}):ee.createElement(ee.Fragment,null,r,s))});F0i(ee.createElement);var pui=({id:t,className:e,style:n,onHeightUpdate:o,children:i})=>{let r=ee.useCallback(s=>{if(s){let a=()=>{let A=s.getBoundingClientRect().height;o(t,A)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[t,o]);return ee.createElement("div",{ref:r,className:e,style:n},i)},mui=(t,e)=>{let n=t.includes("top"),o=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:jon()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...o,...i}},_ui=Yhe` z-index: 9999; > * { pointer-events: auto; } `,zhe=16,ein=({reverseOrder:t,position:e="top-center",toastOptions:n,gutter:o,children:i,toasterId:r,containerStyle:s,containerClassName:a})=>{let{toasts:A,handlers:c}=z0i(n,r);return ee.createElement("div",{"data-rht-toaster":r||"",style:{position:"fixed",zIndex:9999,top:zhe,left:zhe,right:zhe,bottom:zhe,pointerEvents:"none",...s},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},A.map(l=>{let u=l.position||e,g=c.calculateOffset(l,{reverseOrder:t,gutter:o,defaultPosition:e}),h=mui(u,g);return ee.createElement(pui,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?_ui:"",style:h},l.type==="custom"?Uhe(l.message,l):i?i(l):ee.createElement(hui,{toast:l,position:u}))}))},cVe={env:{},version:""},fui=Object.create,tin=Object.defineProperty,Iui=Object.getOwnPropertyDescriptor,nin=Object.getOwnPropertyNames,Cui=Object.getPrototypeOf,yui=Object.prototype.hasOwnProperty,yt=(t,e)=>function(){return e||(0,t[nin(t)[0]])((e={exports:{}}).exports,e),e.exports},xui=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of nin(e))!yui.call(t,i)&&i!==n&&tin(t,i,{get:()=>e[i],enumerable:!(o=Iui(e,i))||o.enumerable});return t},_0=(t,e,n)=>(n=t!=null?fui(Cui(t)):{},xui(tin(n,"default",{value:t,enumerable:!0}),t)),ga=yt({"node_modules/@jscad/modeling/src/utils/flatten.js"(t,e){var n=o=>o.flat(1/0);e.exports=n}}),Eui=yt({"node_modules/@jscad/modeling/src/geometries/geom2/clone.js"(t,e){var n=o=>Object.assign({},o);e.exports=n}}),Bui=yt({"node_modules/@jscad/modeling/src/maths/mat4/add.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]+r[0],o[1]=i[1]+r[1],o[2]=i[2]+r[2],o[3]=i[3]+r[3],o[4]=i[4]+r[4],o[5]=i[5]+r[5],o[6]=i[6]+r[6],o[7]=i[7]+r[7],o[8]=i[8]+r[8],o[9]=i[9]+r[9],o[10]=i[10]+r[10],o[11]=i[11]+r[11],o[12]=i[12]+r[12],o[13]=i[13]+r[13],o[14]=i[14]+r[14],o[15]=i[15]+r[15],o);e.exports=n}}),lVe=yt({"node_modules/@jscad/modeling/src/maths/mat4/create.js"(t,e){var n=()=>[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=n}}),bui=yt({"node_modules/@jscad/modeling/src/maths/mat4/clone.js"(t,e){var n=lVe(),o=i=>{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],r[4]=i[4],r[5]=i[5],r[6]=i[6],r[7]=i[7],r[8]=i[8],r[9]=i[9],r[10]=i[10],r[11]=i[11],r[12]=i[12],r[13]=i[13],r[14]=i[14],r[15]=i[15],r};e.exports=o}}),oin=yt({"node_modules/@jscad/modeling/src/maths/mat4/copy.js"(t,e){var n=(o,i)=>(o[0]=i[0],o[1]=i[1],o[2]=i[2],o[3]=i[3],o[4]=i[4],o[5]=i[5],o[6]=i[6],o[7]=i[7],o[8]=i[8],o[9]=i[9],o[10]=i[10],o[11]=i[11],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15],o);e.exports=n}}),Sui=yt({"node_modules/@jscad/modeling/src/maths/mat4/invert.js"(t,e){var n=(o,i)=>{const r=i[0],s=i[1],a=i[2],A=i[3],c=i[4],l=i[5],u=i[6],g=i[7],h=i[8],d=i[9],p=i[10],m=i[11],_=i[12],f=i[13],I=i[14],C=i[15],y=r*l-s*c,x=r*u-a*c,E=r*g-A*c,B=s*u-a*l,S=s*g-A*l,Q=a*g-A*u,w=h*f-d*_,M=h*I-p*_,k=h*C-m*_,R=d*I-p*f,F=d*C-m*f,O=p*C-m*I;let U=y*O-x*F+E*R+B*k-S*M+Q*w;return U?(U=1/U,o[0]=(l*O-u*F+g*R)*U,o[1]=(a*F-s*O-A*R)*U,o[2]=(f*Q-I*S+C*B)*U,o[3]=(p*S-d*Q-m*B)*U,o[4]=(u*k-c*O-g*M)*U,o[5]=(r*O-a*k+A*M)*U,o[6]=(I*E-_*Q-C*x)*U,o[7]=(h*Q-p*E+m*x)*U,o[8]=(c*F-l*k+g*w)*U,o[9]=(s*k-r*F-A*w)*U,o[10]=(_*S-f*E+C*y)*U,o[11]=(d*E-h*S-m*y)*U,o[12]=(l*M-c*R-u*w)*U,o[13]=(r*R-s*M+a*w)*U,o[14]=(f*x-_*B-I*y)*U,o[15]=(h*B-d*x+p*y)*U,o):null};e.exports=n}}),Qui=yt({"node_modules/@jscad/modeling/src/maths/mat4/equals.js"(t,e){var n=(o,i)=>o[0]===i[0]&&o[1]===i[1]&&o[2]===i[2]&&o[3]===i[3]&&o[4]===i[4]&&o[5]===i[5]&&o[6]===i[6]&&o[7]===i[7]&&o[8]===i[8]&&o[9]===i[9]&&o[10]===i[10]&&o[11]===i[11]&&o[12]===i[12]&&o[13]===i[13]&&o[14]===i[14]&&o[15]===i[15];e.exports=n}}),mc=yt({"node_modules/@jscad/modeling/src/maths/constants.js"(t,e){var n=1e5,o=1e-5,i=1e-13,r=Math.PI*2;e.exports={EPS:o,NEPS:i,TAU:r,spatialResolution:n}}}),hI=yt({"node_modules/@jscad/modeling/src/maths/utils/trigonometry.js"(t,e){var{NEPS:n}=mc(),o=s=>Math.abs(s)<n?0:s,i=s=>o(Math.sin(s)),r=s=>o(Math.cos(s));e.exports={sin:i,cos:r}}}),iin=yt({"node_modules/@jscad/modeling/src/maths/mat4/identity.js"(t,e){var n=o=>(o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o);e.exports=n}}),rin=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromRotation.js"(t,e){var{EPS:n}=mc(),{sin:o,cos:i}=hI(),r=iin(),s=(a,A,c)=>{let[l,u,g]=c;const h=l*l+u*u+g*g;if(Math.abs(h)<n)return r(a);const d=1/Math.sqrt(h);l*=d,u*=d,g*=d;const p=o(A),m=i(A),_=1-m;return a[0]=l*l*_+m,a[1]=u*l*_+g*p,a[2]=g*l*_-u*p,a[3]=0,a[4]=l*u*_-g*p,a[5]=u*u*_+m,a[6]=g*u*_+l*p,a[7]=0,a[8]=l*g*_+u*p,a[9]=u*g*_-l*p,a[10]=g*g*_+m,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a};e.exports=s}}),vui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromScaling.js"(t,e){var n=(o,i)=>(o[0]=i[0],o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=i[1],o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=i[2],o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o);e.exports=n}}),wui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromTaitBryanRotation.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a,A)=>{const c=n(s),l=o(s),u=n(a),g=o(a),h=n(A),d=o(A);return r[0]=g*l,r[1]=g*c,r[2]=-u,r[3]=0,r[4]=h*u*l-d*c,r[5]=d*l+h*u*c,r[6]=h*g,r[7]=0,r[8]=h*c+d*u*l,r[9]=d*u*c-h*l,r[10]=d*g,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),Pui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromTranslation.js"(t,e){var n=(o,i)=>(o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=i[0],o[13]=i[1],o[14]=i[2],o[15]=1,o);e.exports=n}}),Mui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromValues.js"(t,e){var n=lVe(),o=(i,r,s,a,A,c,l,u,g,h,d,p,m,_,f,I)=>{const C=n();return C[0]=i,C[1]=r,C[2]=s,C[3]=a,C[4]=A,C[5]=c,C[6]=l,C[7]=u,C[8]=g,C[9]=h,C[10]=d,C[11]=p,C[12]=m,C[13]=_,C[14]=f,C[15]=I,C};e.exports=o}}),sin=yt({"node_modules/@jscad/modeling/src/maths/vec3/abs.js"(t,e){var n=(o,i)=>(o[0]=Math.abs(i[0]),o[1]=Math.abs(i[1]),o[2]=Math.abs(i[2]),o);e.exports=n}}),ain=yt({"node_modules/@jscad/modeling/src/maths/vec3/add.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]+r[0],o[1]=i[1]+r[1],o[2]=i[2]+r[2],o);e.exports=n}}),Jhe=yt({"node_modules/@jscad/modeling/src/maths/vec3/dot.js"(t,e){var n=(o,i)=>o[0]*i[0]+o[1]*i[1]+o[2]*i[2];e.exports=n}}),Dui=yt({"node_modules/@jscad/modeling/src/maths/vec3/angle.js"(t,e){var n=Jhe(),o=(i,r)=>{const s=i[0],a=i[1],A=i[2],c=r[0],l=r[1],u=r[2],g=Math.sqrt(s*s+a*a+A*A),h=Math.sqrt(c*c+l*l+u*u),d=g*h,p=d&&n(i,r)/d;return Math.acos(Math.min(Math.max(p,-1),1))};e.exports=o}}),Whe=yt({"node_modules/@jscad/modeling/src/maths/vec3/create.js"(t,e){var n=()=>[0,0,0];e.exports=n}}),Nui=yt({"node_modules/@jscad/modeling/src/maths/vec3/clone.js"(t,e){var n=Whe(),o=i=>{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r};e.exports=o}}),Ain=yt({"node_modules/@jscad/modeling/src/maths/vec3/copy.js"(t,e){var n=(o,i)=>(o[0]=i[0],o[1]=i[1],o[2]=i[2],o);e.exports=n}}),EX=yt({"node_modules/@jscad/modeling/src/maths/vec3/cross.js"(t,e){var n=(o,i,r)=>{const s=i[0],a=i[1],A=i[2],c=r[0],l=r[1],u=r[2];return o[0]=a*u-A*l,o[1]=A*c-s*u,o[2]=s*l-a*c,o};e.exports=n}}),cin=yt({"node_modules/@jscad/modeling/src/maths/vec3/distance.js"(t,e){var n=(o,i)=>{const r=i[0]-o[0],s=i[1]-o[1],a=i[2]-o[2];return Math.sqrt(r*r+s*s+a*a)};e.exports=n}}),Rui=yt({"node_modules/@jscad/modeling/src/maths/vec3/divide.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]/r[0],o[1]=i[1]/r[1],o[2]=i[2]/r[2],o);e.exports=n}}),Tui=yt({"node_modules/@jscad/modeling/src/maths/vec3/equals.js"(t,e){var n=(o,i)=>o[0]===i[0]&&o[1]===i[1]&&o[2]===i[2];e.exports=n}}),kui=yt({"node_modules/@jscad/modeling/src/maths/vec3/fromScalar.js"(t,e){var n=(o,i)=>(o[0]=i,o[1]=i,o[2]=i,o);e.exports=n}}),Fui=yt({"node_modules/@jscad/modeling/src/maths/vec3/fromValues.js"(t,e){var n=Whe(),o=(i,r,s)=>{const a=n();return a[0]=i,a[1]=r,a[2]=s,a};e.exports=o}}),Lui=yt({"node_modules/@jscad/modeling/src/maths/vec3/fromVec2.js"(t,e){var n=(o,i,r=0)=>(o[0]=i[0],o[1]=i[1],o[2]=r,o);e.exports=n}}),lin=yt({"node_modules/@jscad/modeling/src/maths/vec3/length.js"(t,e){var n=o=>{const i=o[0],r=o[1],s=o[2];return Math.sqrt(i*i+r*r+s*s)};e.exports=n}}),Hui=yt({"node_modules/@jscad/modeling/src/maths/vec3/lerp.js"(t,e){var n=(o,i,r,s)=>(o[0]=i[0]+s*(r[0]-i[0]),o[1]=i[1]+s*(r[1]-i[1]),o[2]=i[2]+s*(r[2]-i[2]),o);e.exports=n}}),uin=yt({"node_modules/@jscad/modeling/src/maths/vec3/max.js"(t,e){var n=(o,i,r)=>(o[0]=Math.max(i[0],r[0]),o[1]=Math.max(i[1],r[1]),o[2]=Math.max(i[2],r[2]),o);e.exports=n}}),gin=yt({"node_modules/@jscad/modeling/src/maths/vec3/min.js"(t,e){var n=(o,i,r)=>(o[0]=Math.min(i[0],r[0]),o[1]=Math.min(i[1],r[1]),o[2]=Math.min(i[2],r[2]),o);e.exports=n}}),Oui=yt({"node_modules/@jscad/modeling/src/maths/vec3/multiply.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]*r[0],o[1]=i[1]*r[1],o[2]=i[2]*r[2],o);e.exports=n}}),Gui=yt({"node_modules/@jscad/modeling/src/maths/vec3/negate.js"(t,e){var n=(o,i)=>(o[0]=-i[0],o[1]=-i[1],o[2]=-i[2],o);e.exports=n}}),uVe=yt({"node_modules/@jscad/modeling/src/maths/vec3/normalize.js"(t,e){var n=(o,i)=>{const r=i[0],s=i[1],a=i[2];let A=r*r+s*s+a*a;return A>0&&(A=1/Math.sqrt(A)),o[0]=r*A,o[1]=s*A,o[2]=a*A,o};e.exports=n}}),Yui=yt({"node_modules/@jscad/modeling/src/maths/vec3/orthogonal.js"(t,e){var n=sin(),o=Whe(),i=EX(),r=(s,a)=>{const A=n(o(),a),c=0+(A[0]<A[1]&&A[0]<A[2]),l=0+(A[1]<=A[0]&&A[1]<A[2]),u=0+(A[2]<=A[0]&&A[2]<=A[1]);return i(s,a,[c,l,u])};e.exports=r}}),Uui=yt({"node_modules/@jscad/modeling/src/maths/vec3/rotateX.js"(t,e){var n=(o,i,r,s)=>{const a=[],A=[];return a[0]=i[0]-r[0],a[1]=i[1]-r[1],a[2]=i[2]-r[2],A[0]=a[0],A[1]=a[1]*Math.cos(s)-a[2]*Math.sin(s),A[2]=a[1]*Math.sin(s)+a[2]*Math.cos(s),o[0]=A[0]+r[0],o[1]=A[1]+r[1],o[2]=A[2]+r[2],o};e.exports=n}}),Kui=yt({"node_modules/@jscad/modeling/src/maths/vec3/rotateY.js"(t,e){var n=(o,i,r,s)=>{const a=[],A=[];return a[0]=i[0]-r[0],a[1]=i[1]-r[1],a[2]=i[2]-r[2],A[0]=a[2]*Math.sin(s)+a[0]*Math.cos(s),A[1]=a[1],A[2]=a[2]*Math.cos(s)-a[0]*Math.sin(s),o[0]=A[0]+r[0],o[1]=A[1]+r[1],o[2]=A[2]+r[2],o};e.exports=n}}),Vui=yt({"node_modules/@jscad/modeling/src/maths/vec3/rotateZ.js"(t,e){var n=(o,i,r,s)=>{const a=[],A=[];return a[0]=i[0]-r[0],a[1]=i[1]-r[1],A[0]=a[0]*Math.cos(s)-a[1]*Math.sin(s),A[1]=a[0]*Math.sin(s)+a[1]*Math.cos(s),o[0]=A[0]+r[0],o[1]=A[1]+r[1],o[2]=i[2],o};e.exports=n}}),din=yt({"node_modules/@jscad/modeling/src/maths/vec3/scale.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]*r,o[1]=i[1]*r,o[2]=i[2]*r,o);e.exports=n}}),zui=yt({"node_modules/@jscad/modeling/src/maths/vec3/snap.js"(t,e){var n=(o,i,r)=>(o[0]=Math.round(i[0]/r)*r+0,o[1]=Math.round(i[1]/r)*r+0,o[2]=Math.round(i[2]/r)*r+0,o);e.exports=n}}),hin=yt({"node_modules/@jscad/modeling/src/maths/vec3/squaredDistance.js"(t,e){var n=(o,i)=>{const r=i[0]-o[0],s=i[1]-o[1],a=i[2]-o[2];return r*r+s*s+a*a};e.exports=n}}),pin=yt({"node_modules/@jscad/modeling/src/maths/vec3/squaredLength.js"(t,e){var n=o=>{const i=o[0],r=o[1],s=o[2];return i*i+r*r+s*s};e.exports=n}}),jhe=yt({"node_modules/@jscad/modeling/src/maths/vec3/subtract.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]-r[0],o[1]=i[1]-r[1],o[2]=i[2]-r[2],o);e.exports=n}}),Jui=yt({"node_modules/@jscad/modeling/src/maths/vec3/toString.js"(t,e){var n=o=>`[${o[0].toFixed(7)}, ${o[1].toFixed(7)}, ${o[2].toFixed(7)}]`;e.exports=n}}),Wui=yt({"node_modules/@jscad/modeling/src/maths/vec3/transform.js"(t,e){var n=(o,i,r)=>{const s=i[0],a=i[1],A=i[2];let c=r[3]*s+r[7]*a+r[11]*A+r[15];return c=c||1,o[0]=(r[0]*s+r[4]*a+r[8]*A+r[12])/c,o[1]=(r[1]*s+r[5]*a+r[9]*A+r[13])/c,o[2]=(r[2]*s+r[6]*a+r[10]*A+r[14])/c,o};e.exports=n}}),$r=yt({"node_modules/@jscad/modeling/src/maths/vec3/index.js"(t,e){e.exports={abs:sin(),add:ain(),angle:Dui(),clone:Nui(),copy:Ain(),create:Whe(),cross:EX(),distance:cin(),divide:Rui(),dot:Jhe(),equals:Tui(),fromScalar:kui(),fromValues:Fui(),fromVec2:Lui(),length:lin(),lerp:Hui(),max:uin(),min:gin(),multiply:Oui(),negate:Gui(),normalize:uVe(),orthogonal:Yui(),rotateX:Uui(),rotateY:Kui(),rotateZ:Vui(),scale:din(),snap:zui(),squaredDistance:hin(),squaredLength:pin(),subtract:jhe(),toString:Jui(),transform:Wui()}}}),jui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromVectorRotation.js"(t,e){var n=$r(),o=rin(),i=(r,s,a)=>{const A=n.normalize(n.create(),s),c=n.normalize(n.create(),a),l=n.cross(n.create(),c,A),u=n.dot(c,A);if(u===-1)return o(r,Math.PI,n.orthogonal(l,A));const g=1/(1+u);return r[0]=l[0]*l[0]*g+u,r[1]=l[1]*l[0]*g-l[2],r[2]=l[2]*l[0]*g+l[1],r[3]=0,r[4]=l[0]*l[1]*g+l[2],r[5]=l[1]*l[1]*g+u,r[6]=l[2]*l[1]*g-l[0],r[7]=0,r[8]=l[0]*l[2]*g-l[1],r[9]=l[1]*l[2]*g+l[0],r[10]=l[2]*l[2]*g+u,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),$ui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromXRotation.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=>{const a=n(s),A=o(s);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=A,r[6]=a,r[7]=0,r[8]=0,r[9]=-a,r[10]=A,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),qui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromYRotation.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=>{const a=n(s),A=o(s);return r[0]=A,r[1]=0,r[2]=-a,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=a,r[9]=0,r[10]=A,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),Xui=yt({"node_modules/@jscad/modeling/src/maths/mat4/fromZRotation.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=>{const a=n(s),A=o(s);return r[0]=A,r[1]=a,r[2]=0,r[3]=0,r[4]=-a,r[5]=A,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),Zui=yt({"node_modules/@jscad/modeling/src/maths/mat4/isIdentity.js"(t,e){var n=o=>o[0]===1&&o[1]===0&&o[2]===0&&o[3]===0&&o[4]===0&&o[5]===1&&o[6]===0&&o[7]===0&&o[8]===0&&o[9]===0&&o[10]===1&&o[11]===0&&o[12]===0&&o[13]===0&&o[14]===0&&o[15]===1;e.exports=n}}),egi=yt({"node_modules/@jscad/modeling/src/maths/mat4/isOnlyTransformScale.js"(t,e){var n=i=>o(i[1])&&o(i[2])&&o(i[3])&&o(i[4])&&o(i[6])&&o(i[7])&&o(i[8])&&o(i[9])&&o(i[11])&&i[15]===1,o=i=>Math.abs(i)<Number.EPSILON;e.exports=n}}),tgi=yt({"node_modules/@jscad/modeling/src/maths/mat4/isMirroring.js"(t,e){var n=o=>{const i=o[4]*o[9]-o[8]*o[5],r=o[8]*o[1]-o[0]*o[9],s=o[0]*o[5]-o[4]*o[1];return i*o[2]+r*o[6]+s*o[10]<0};e.exports=n}}),ngi=yt({"node_modules/@jscad/modeling/src/maths/mat4/mirrorByPlane.js"(t,e){var n=(o,i)=>{const[r,s,a,A]=i;return o[0]=1-2*r*r,o[1]=-2*s*r,o[2]=-2*a*r,o[3]=0,o[4]=-2*r*s,o[5]=1-2*s*s,o[6]=-2*a*s,o[7]=0,o[8]=-2*r*a,o[9]=-2*s*a,o[10]=1-2*a*a,o[11]=0,o[12]=2*r*A,o[13]=2*s*A,o[14]=2*a*A,o[15]=1,o};e.exports=n}}),ogi=yt({"node_modules/@jscad/modeling/src/maths/mat4/multiply.js"(t,e){var n=(o,i,r)=>{const s=i[0],a=i[1],A=i[2],c=i[3],l=i[4],u=i[5],g=i[6],h=i[7],d=i[8],p=i[9],m=i[10],_=i[11],f=i[12],I=i[13],C=i[14],y=i[15];let x=r[0],E=r[1],B=r[2],S=r[3];return o[0]=x*s+E*l+B*d+S*f,o[1]=x*a+E*u+B*p+S*I,o[2]=x*A+E*g+B*m+S*C,o[3]=x*c+E*h+B*_+S*y,x=r[4],E=r[5],B=r[6],S=r[7],o[4]=x*s+E*l+B*d+S*f,o[5]=x*a+E*u+B*p+S*I,o[6]=x*A+E*g+B*m+S*C,o[7]=x*c+E*h+B*_+S*y,x=r[8],E=r[9],B=r[10],S=r[11],o[8]=x*s+E*l+B*d+S*f,o[9]=x*a+E*u+B*p+S*I,o[10]=x*A+E*g+B*m+S*C,o[11]=x*c+E*h+B*_+S*y,x=r[12],E=r[13],B=r[14],S=r[15],o[12]=x*s+E*l+B*d+S*f,o[13]=x*a+E*u+B*p+S*I,o[14]=x*A+E*g+B*m+S*C,o[15]=x*c+E*h+B*_+S*y,o};e.exports=n}}),igi=yt({"node_modules/@jscad/modeling/src/maths/mat4/rotate.js"(t,e){var{EPS:n}=mc(),{sin:o,cos:i}=hI(),r=oin(),s=(a,A,c,l)=>{let[u,g,h]=l;const d=u*u+g*g+h*h;if(Math.abs(d)<n)return r(a,A);const p=1/Math.sqrt(d);u*=p,g*=p,h*=p;const m=o(c),_=i(c),f=1-_,I=A[0],C=A[1],y=A[2],x=A[3],E=A[4],B=A[5],S=A[6],Q=A[7],w=A[8],M=A[9],k=A[10],R=A[11],F=u*u*f+_,O=g*u*f+h*m,U=h*u*f-g*m,Y=u*g*f-h*m,W=g*g*f+_,te=h*g*f+u*m,j=u*h*f+g*m,J=g*h*f-u*m,oe=h*h*f+_;return a[0]=I*F+E*O+w*U,a[1]=C*F+B*O+M*U,a[2]=y*F+S*O+k*U,a[3]=x*F+Q*O+R*U,a[4]=I*Y+E*W+w*te,a[5]=C*Y+B*W+M*te,a[6]=y*Y+S*W+k*te,a[7]=x*Y+Q*W+R*te,a[8]=I*j+E*J+w*oe,a[9]=C*j+B*J+M*oe,a[10]=y*j+S*J+k*oe,a[11]=x*j+Q*J+R*oe,A!==a&&(a[12]=A[12],a[13]=A[13],a[14]=A[14],a[15]=A[15]),a};e.exports=s}}),rgi=yt({"node_modules/@jscad/modeling/src/maths/mat4/rotateX.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a)=>{const A=n(a),c=o(a),l=s[4],u=s[5],g=s[6],h=s[7],d=s[8],p=s[9],m=s[10],_=s[11];return s!==r&&(r[0]=s[0],r[1]=s[1],r[2]=s[2],r[3]=s[3],r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r[4]=l*c+d*A,r[5]=u*c+p*A,r[6]=g*c+m*A,r[7]=h*c+_*A,r[8]=d*c-l*A,r[9]=p*c-u*A,r[10]=m*c-g*A,r[11]=_*c-h*A,r};e.exports=i}}),sgi=yt({"node_modules/@jscad/modeling/src/maths/mat4/rotateY.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a)=>{const A=n(a),c=o(a),l=s[0],u=s[1],g=s[2],h=s[3],d=s[8],p=s[9],m=s[10],_=s[11];return s!==r&&(r[4]=s[4],r[5]=s[5],r[6]=s[6],r[7]=s[7],r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r[0]=l*c-d*A,r[1]=u*c-p*A,r[2]=g*c-m*A,r[3]=h*c-_*A,r[8]=l*A+d*c,r[9]=u*A+p*c,r[10]=g*A+m*c,r[11]=h*A+_*c,r};e.exports=i}}),agi=yt({"node_modules/@jscad/modeling/src/maths/mat4/rotateZ.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a)=>{const A=n(a),c=o(a),l=s[0],u=s[1],g=s[2],h=s[3],d=s[4],p=s[5],m=s[6],_=s[7];return s!==r&&(r[8]=s[8],r[9]=s[9],r[10]=s[10],r[11]=s[11],r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r[0]=l*c+d*A,r[1]=u*c+p*A,r[2]=g*c+m*A,r[3]=h*c+_*A,r[4]=d*c-l*A,r[5]=p*c-u*A,r[6]=m*c-g*A,r[7]=_*c-h*A,r};e.exports=i}}),Agi=yt({"node_modules/@jscad/modeling/src/maths/mat4/scale.js"(t,e){var n=(o,i,r)=>{const s=r[0],a=r[1],A=r[2];return o[0]=i[0]*s,o[1]=i[1]*s,o[2]=i[2]*s,o[3]=i[3]*s,o[4]=i[4]*a,o[5]=i[5]*a,o[6]=i[6]*a,o[7]=i[7]*a,o[8]=i[8]*A,o[9]=i[9]*A,o[10]=i[10]*A,o[11]=i[11]*A,o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15],o};e.exports=n}}),cgi=yt({"node_modules/@jscad/modeling/src/maths/mat4/subtract.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]-r[0],o[1]=i[1]-r[1],o[2]=i[2]-r[2],o[3]=i[3]-r[3],o[4]=i[4]-r[4],o[5]=i[5]-r[5],o[6]=i[6]-r[6],o[7]=i[7]-r[7],o[8]=i[8]-r[8],o[9]=i[9]-r[9],o[10]=i[10]-r[10],o[11]=i[11]-r[11],o[12]=i[12]-r[12],o[13]=i[13]-r[13],o[14]=i[14]-r[14],o[15]=i[15]-r[15],o);e.exports=n}}),lgi=yt({"node_modules/@jscad/modeling/src/maths/mat4/toString.js"(t,e){var n=o=>o.map(i=>i.toFixed(7)).toString();e.exports=n}}),ugi=yt({"node_modules/@jscad/modeling/src/maths/mat4/translate.js"(t,e){var n=(o,i,r)=>{const s=r[0],a=r[1],A=r[2];let c,l,u,g,h,d,p,m,_,f,I,C;return i===o?(o[12]=i[0]*s+i[4]*a+i[8]*A+i[12],o[13]=i[1]*s+i[5]*a+i[9]*A+i[13],o[14]=i[2]*s+i[6]*a+i[10]*A+i[14],o[15]=i[3]*s+i[7]*a+i[11]*A+i[15]):(c=i[0],l=i[1],u=i[2],g=i[3],h=i[4],d=i[5],p=i[6],m=i[7],_=i[8],f=i[9],I=i[10],C=i[11],o[0]=c,o[1]=l,o[2]=u,o[3]=g,o[4]=h,o[5]=d,o[6]=p,o[7]=m,o[8]=_,o[9]=f,o[10]=I,o[11]=C,o[12]=c*s+h*a+_*A+i[12],o[13]=l*s+d*a+f*A+i[13],o[14]=u*s+p*a+I*A+i[14],o[15]=g*s+m*a+C*A+i[15]),o};e.exports=n}}),Du=yt({"node_modules/@jscad/modeling/src/maths/mat4/index.js"(t,e){e.exports={add:Bui(),clone:bui(),copy:oin(),create:lVe(),invert:Sui(),equals:Qui(),fromRotation:rin(),fromScaling:vui(),fromTaitBryanRotation:wui(),fromTranslation:Pui(),fromValues:Mui(),fromVectorRotation:jui(),fromXRotation:$ui(),fromYRotation:qui(),fromZRotation:Xui(),identity:iin(),isIdentity:Zui(),isOnlyTransformScale:egi(),isMirroring:tgi(),mirrorByPlane:ngi(),multiply:ogi(),rotate:igi(),rotateX:rgi(),rotateY:sgi(),rotateZ:agi(),scale:Agi(),subtract:cgi(),toString:lgi(),translate:ugi()}}}),$he=yt({"node_modules/@jscad/modeling/src/geometries/geom2/create.js"(t,e){var n=Du(),o=i=>(i===void 0&&(i=[]),{sides:i,transforms:n.create()});e.exports=o}}),ggi=yt({"node_modules/@jscad/modeling/src/maths/vec2/abs.js"(t,e){var n=(o,i)=>(o[0]=Math.abs(i[0]),o[1]=Math.abs(i[1]),o);e.exports=n}}),dgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/add.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]+r[0],o[1]=i[1]+r[1],o);e.exports=n}}),gVe=yt({"node_modules/@jscad/modeling/src/maths/vec2/angleRadians.js"(t,e){var n=o=>Math.atan2(o[1],o[0]);e.exports=n}}),hgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/angle.js"(t,e){e.exports=gVe()}}),pgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/angleDegrees.js"(t,e){var n=gVe(),o=i=>n(i)*57.29577951308232;e.exports=o}}),qhe=yt({"node_modules/@jscad/modeling/src/maths/vec2/create.js"(t,e){var n=()=>[0,0];e.exports=n}}),mgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/clone.js"(t,e){var n=qhe(),o=i=>{const r=n();return r[0]=i[0],r[1]=i[1],r};e.exports=o}}),_gi=yt({"node_modules/@jscad/modeling/src/maths/vec2/copy.js"(t,e){var n=(o,i)=>(o[0]=i[0],o[1]=i[1],o);e.exports=n}}),fgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/cross.js"(t,e){var n=(o,i,r)=>(o[0]=0,o[1]=0,o[2]=i[0]*r[1]-i[1]*r[0],o);e.exports=n}}),Igi=yt({"node_modules/@jscad/modeling/src/maths/vec2/distance.js"(t,e){var n=(o,i)=>{const r=i[0]-o[0],s=i[1]-o[1];return Math.sqrt(r*r+s*s)};e.exports=n}}),Cgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/divide.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]/r[0],o[1]=i[1]/r[1],o);e.exports=n}}),ygi=yt({"node_modules/@jscad/modeling/src/maths/vec2/dot.js"(t,e){var n=(o,i)=>o[0]*i[0]+o[1]*i[1];e.exports=n}}),xgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/equals.js"(t,e){var n=(o,i)=>o[0]===i[0]&&o[1]===i[1];e.exports=n}}),min=yt({"node_modules/@jscad/modeling/src/maths/vec2/fromAngleRadians.js"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=>(r[0]=o(s),r[1]=n(s),r);e.exports=i}}),Egi=yt({"node_modules/@jscad/modeling/src/maths/vec2/fromAngleDegrees.js"(t,e){var n=min(),o=(i,r)=>n(i,r*.017453292519943295);e.exports=o}}),Bgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/fromScalar.js"(t,e){var n=(o,i)=>(o[0]=i,o[1]=i,o);e.exports=n}}),bgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/fromValues.js"(t,e){var n=qhe(),o=(i,r)=>{const s=n();return s[0]=i,s[1]=r,s};e.exports=o}}),Sgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/length.js"(t,e){var n=o=>Math.sqrt(o[0]*o[0]+o[1]*o[1]);e.exports=n}}),Qgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/lerp.js"(t,e){var n=(o,i,r,s)=>{const a=i[0],A=i[1];return o[0]=a+s*(r[0]-a),o[1]=A+s*(r[1]-A),o};e.exports=n}}),vgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/max.js"(t,e){var n=(o,i,r)=>(o[0]=Math.max(i[0],r[0]),o[1]=Math.max(i[1],r[1]),o);e.exports=n}}),wgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/min.js"(t,e){var n=(o,i,r)=>(o[0]=Math.min(i[0],r[0]),o[1]=Math.min(i[1],r[1]),o);e.exports=n}}),Pgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/multiply.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]*r[0],o[1]=i[1]*r[1],o);e.exports=n}}),Mgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/negate.js"(t,e){var n=(o,i)=>(o[0]=-i[0],o[1]=-i[1],o);e.exports=n}}),_in=yt({"node_modules/@jscad/modeling/src/maths/vec2/rotate.js"(t,e){var n=(o,i,r,s)=>{const a=i[0]-r[0],A=i[1]-r[1],c=Math.cos(s),l=Math.sin(s);return o[0]=a*c-A*l+r[0],o[1]=a*l+A*c+r[1],o};e.exports=n}}),Dgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/normal.js"(t,e){var{TAU:n}=mc(),o=qhe(),i=_in(),r=(s,a)=>i(s,a,o(),n/4);e.exports=r}}),Ngi=yt({"node_modules/@jscad/modeling/src/maths/vec2/normalize.js"(t,e){var n=(o,i)=>{const r=i[0],s=i[1];let a=r*r+s*s;return a>0&&(a=1/Math.sqrt(a)),o[0]=r*a,o[1]=s*a,o};e.exports=n}}),Rgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/scale.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]*r,o[1]=i[1]*r,o);e.exports=n}}),Tgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/snap.js"(t,e){var n=(o,i,r)=>(o[0]=Math.round(i[0]/r)*r+0,o[1]=Math.round(i[1]/r)*r+0,o);e.exports=n}}),kgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/squaredDistance.js"(t,e){var n=(o,i)=>{const r=i[0]-o[0],s=i[1]-o[1];return r*r+s*s};e.exports=n}}),Fgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/squaredLength.js"(t,e){var n=o=>{const i=o[0],r=o[1];return i*i+r*r};e.exports=n}}),Lgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/subtract.js"(t,e){var n=(o,i,r)=>(o[0]=i[0]-r[0],o[1]=i[1]-r[1],o);e.exports=n}}),Hgi=yt({"node_modules/@jscad/modeling/src/maths/vec2/toString.js"(t,e){var n=o=>`[${o[0].toFixed(7)}, ${o[1].toFixed(7)}]`;e.exports=n}}),Ogi=yt({"node_modules/@jscad/modeling/src/maths/vec2/transform.js"(t,e){var n=(o,i,r)=>{const s=i[0],a=i[1];return o[0]=r[0]*s+r[4]*a+r[12],o[1]=r[1]*s+r[5]*a+r[13],o};e.exports=n}}),_A=yt({"node_modules/@jscad/modeling/src/maths/vec2/index.js"(t,e){e.exports={abs:ggi(),add:dgi(),angle:hgi(),angleDegrees:pgi(),angleRadians:gVe(),clone:mgi(),copy:_gi(),create:qhe(),cross:fgi(),distance:Igi(),divide:Cgi(),dot:ygi(),equals:xgi(),fromAngleDegrees:Egi(),fromAngleRadians:min(),fromScalar:Bgi(),fromValues:bgi(),length:Sgi(),lerp:Qgi(),max:vgi(),min:wgi(),multiply:Pgi(),negate:Mgi(),normal:Dgi(),normalize:Ngi(),rotate:_in(),scale:Rgi(),snap:Tgi(),squaredDistance:kgi(),squaredLength:Fgi(),subtract:Lgi(),toString:Hgi(),transform:Ogi()}}}),Ggi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/fromPoints.js"(t,e){var n=_A(),o=$he(),i=r=>{if(!Array.isArray(r))throw new Error("the given points must be an array");let s=r.length;if(s<3)throw new Error("the given points must define a closed geometry with three or more points");n.equals(r[0],r[s-1])&&--s;const a=[];let A=r[s-1];for(let c=0;c<s;c++){const l=r[c];a.push([n.clone(A),n.clone(l)]),A=l}return o(a)};e.exports=i}}),Ygi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/fromCompactBinary.js"(t,e){var n=Du(),o=_A(),i=$he(),r=s=>{if(s[0]!==0)throw new Error("invalid compact binary data");const a=i();a.transforms=n.clone(s.slice(1,17));for(let A=21;A<s.length;A+=4){const c=o.fromValues(s[A+0],s[A+1]),l=o.fromValues(s[A+2],s[A+3]);a.sides.push([c,l])}return s[17]>=0&&(a.color=[s[17],s[18],s[19],s[20]]),a};e.exports=r}}),fin=yt({"node_modules/@jscad/modeling/src/geometries/geom2/isA.js"(t,e){var n=o=>!!(o&&typeof o=="object"&&"sides"in o&&"transforms"in o&&Array.isArray(o.sides)&&"length"in o.transforms);e.exports=n}}),Ugi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/applyTransforms.js"(t,e){var n=Du(),o=_A(),i=r=>(n.isIdentity(r.transforms)||(r.sides=r.sides.map(s=>{const a=o.transform(o.create(),s[0],r.transforms),A=o.transform(o.create(),s[1],r.transforms);return[a,A]}),r.transforms=n.create()),r);e.exports=i}}),BX=yt({"node_modules/@jscad/modeling/src/geometries/geom2/toSides.js"(t,e){var n=Ugi(),o=i=>n(i).sides;e.exports=o}}),Iin=yt({"node_modules/@jscad/modeling/src/geometries/geom2/reverse.js"(t,e){var n=$he(),o=BX(),i=r=>{const a=o(r).map(A=>[A[1],A[0]]);return a.reverse(),n(a)};e.exports=i}}),Cin=yt({"node_modules/@jscad/modeling/src/geometries/geom2/toOutlines.js"(t,e){var n=_A(),o=BX(),i=A=>{const c=new Map,l=u=>{const g=u.toString();return c.has(g)?c.get(g):(c.set(g,u),u)};return A.map(u=>u.map(l))},r=A=>{const c=new Map;return i(A).forEach(u=>{c.has(u[0])?c.get(u[0]).push(u):c.set(u[0],[u])}),c},s=A=>{const c=r(o(A)),l=[];for(;;){let u;for(const[d,p]of c){if(u=p.shift(),!u){c.delete(d);continue}break}if(u===void 0)break;const g=[],h=u[0];for(;;){g.push(u[0]);const d=u[1];if(d===h)break;const p=c.get(d);if(!p)throw new Error(`geometry is not closed at vertex ${d}`);const m=a(u,p);p.length===0&&c.delete(d),u=m}g.length>0&&g.push(g.shift()),l.push(g)}return c.clear(),l},a=(A,c)=>{if(c.length===1)return c.pop();const l=n.create(),u=n.angleDegrees(n.subtract(l,A[1],A[0]));let g,h;c.forEach((p,m)=>{let f=n.angleDegrees(n.subtract(l,p[1],p[0]))-u;f<-180&&(f+=360),f>=180&&(f-=360),(h===void 0||f>g)&&(h=m,g=f)});const d=c[h];return c.splice(h,1),d};e.exports=s}}),Kgi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/toPoints.js"(t,e){var n=BX(),o=i=>{const s=n(i).map(a=>a[0]);return s.length>0&&s.push(s.shift()),s};e.exports=o}}),Vgi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/toString.js"(t,e){var n=_A(),o=BX(),i=r=>{const s=o(r);let a="geom2 ("+s.length+` sides):
[
`;return s.forEach(A=>{a+="  ["+n.toString(A[0])+", "+n.toString(A[1])+`]
`}),a+=`]
`,a};e.exports=i}}),zgi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/toCompactBinary.js"(t,e){var n=o=>{const i=o.sides,r=o.transforms;let s=[-1,-1,-1,-1];o.color&&(s=o.color);const a=new Float32Array(21+i.length*4);a[0]=0,a[1]=r[0],a[2]=r[1],a[3]=r[2],a[4]=r[3],a[5]=r[4],a[6]=r[5],a[7]=r[6],a[8]=r[7],a[9]=r[8],a[10]=r[9],a[11]=r[10],a[12]=r[11],a[13]=r[12],a[14]=r[13],a[15]=r[14],a[16]=r[15],a[17]=s[0],a[18]=s[1],a[19]=s[2],a[20]=s[3];for(let A=0;A<i.length;A++){const c=A*4+21,l=i[A][0],u=i[A][1];a[c+0]=l[0],a[c+1]=l[1],a[c+2]=u[0],a[c+3]=u[1]}return a};e.exports=n}}),Jgi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/transform.js"(t,e){var n=Du(),o=Iin(),i=(r,s)=>{const a=n.multiply(n.create(),r,s.transforms),A=Object.assign({},s,{transforms:a});return r[0]*r[5]-r[4]*r[1]<0?o(A):A};e.exports=i}}),Wgi=yt({"node_modules/@jscad/modeling/src/geometries/geom2/validate.js"(t,e){var n=_A(),o=fin(),i=Cin(),r=s=>{if(!o(s))throw new Error("invalid geom2 structure");if(i(s),s.sides.forEach(a=>{if(n.equals(a[0],a[1]))throw new Error(`geom2 self-edge ${a[0]}`)}),!s.transforms.every(Number.isFinite))throw new Error(`geom2 invalid transforms ${s.transforms}`)};e.exports=r}}),Ya=yt({"node_modules/@jscad/modeling/src/geometries/geom2/index.js"(t,e){e.exports={clone:Eui(),create:$he(),fromPoints:Ggi(),fromCompactBinary:Ygi(),isA:fin(),reverse:Iin(),toOutlines:Cin(),toPoints:Kgi(),toSides:BX(),toString:Vgi(),toCompactBinary:zgi(),transform:Jgi(),validate:Wgi()}}}),jgi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/clone.js"(t,e){var n=o=>Object.assign({},o);e.exports=n}}),bX=yt({"node_modules/@jscad/modeling/src/geometries/geom3/create.js"(t,e){var n=Du(),o=i=>(i===void 0&&(i=[]),{polygons:i,transforms:n.create()});e.exports=o}}),$gi=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/point-line-distance.js"(t,e){var n=EX(),o=jhe(),i=pin(),r=(a,A,c)=>{const l=[],u=[],g=[];o(l,c,A),o(u,a,A);const h=i(n(g,u,l)),d=i(l);if(d===0)throw Error("a and b are the same point");return h/d},s=(a,A,c)=>Math.sqrt(r(a,A,c));e.exports=s}}),qgi=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/get-plane-normal.js"(t,e){var n=EX(),o=uVe(),i=jhe(),r=(s,a,A,c)=>{const l=[0,0,0];return i(s,a,A),i(l,A,c),n(s,s,l),o(s,s)};e.exports=r}}),Xgi=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/VertexList.js"(t,e){var n=class{constructor(){this.head=null,this.tail=null}clear(){this.head=this.tail=null}insertBefore(o,i){i.prev=o.prev,i.next=o,i.prev?i.prev.next=i:this.head=i,o.prev=i}insertAfter(o,i){i.prev=o,i.next=o.next,i.next?i.next.prev=i:this.tail=i,o.next=i}add(o){this.head?this.tail.next=o:this.head=o,o.prev=this.tail,o.next=null,this.tail=o}addAll(o){for(this.head?this.tail.next=o:this.head=o,o.prev=this.tail;o.next;)o=o.next;this.tail=o}remove(o){o.prev?o.prev.next=o.next:this.head=o.next,o.next?o.next.prev=o.prev:this.tail=o.prev}removeChain(o,i){o.prev?o.prev.next=i.next:this.head=i.next,i.next?i.next.prev=o.prev:this.tail=o.prev}first(){return this.head}isEmpty(){return!this.head}};e.exports=n}}),Zgi=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/Vertex.js"(t,e){var n=class{constructor(o,i){this.point=o,this.index=i,this.next=null,this.prev=null,this.face=null}};e.exports=n}}),edi=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/HalfEdge.js"(t,e){var n=cin(),o=hin(),i=class{constructor(r,s){this.vertex=r,this.face=s,this.next=null,this.prev=null,this.opposite=null}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){return this.tail()?n(this.tail().point,this.head().point):-1}lengthSquared(){return this.tail()?o(this.tail().point,this.head().point):-1}setOpposite(r){this.opposite=r,r.opposite=this}};e.exports=i}}),tdi=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/Face.js"(t,e){var n=ain(),o=Ain(),i=EX(),r=Jhe(),s=lin(),a=uVe(),A=din(),c=jhe(),l=edi(),u=0,g=1,h=2,d=class I4n{constructor(){this.normal=[],this.centroid=[],this.offset=0,this.outside=null,this.mark=u,this.edge=null,this.nVertices=0}getEdge(m){if(typeof m!="number")throw Error("requires a number");let _=this.edge;for(;m>0;)_=_.next,m-=1;for(;m<0;)_=_.prev,m+=1;return _}computeNormal(){const m=this.edge,_=m.next;let f=_.next;const I=c([],_.head().point,m.head().point),C=[],y=[];for(this.nVertices=2,this.normal=[0,0,0];f!==m;)o(y,I),c(I,f.head().point,m.head().point),n(this.normal,this.normal,i(C,y,I)),f=f.next,this.nVertices+=1;this.area=s(this.normal),this.normal=A(this.normal,this.normal,1/this.area)}computeNormalMinArea(m){if(this.computeNormal(),this.area<m){let _,f=0,I=this.edge;do{const S=I.lengthSquared();S>f&&(_=I,f=S),I=I.next}while(I!==this.edge);const C=_.tail().point,y=_.head().point,x=c([],y,C),E=Math.sqrt(f);A(x,x,1/E);const B=r(this.normal,x);A(x,x,-B),n(this.normal,this.normal,x),a(this.normal,this.normal)}}computeCentroid(){this.centroid=[0,0,0];let m=this.edge;do n(this.centroid,this.centroid,m.head().point),m=m.next;while(m!==this.edge);A(this.centroid,this.centroid,1/this.nVertices)}computeNormalAndCentroid(m){typeof m<"u"?this.computeNormalMinArea(m):this.computeNormal(),this.computeCentroid(),this.offset=r(this.normal,this.centroid)}distanceToPlane(m){return r(this.normal,m)-this.offset}connectHalfEdges(m,_){let f;if(m.opposite.face===_.opposite.face){const I=_.opposite.face;let C;m===this.edge&&(this.edge=_),I.nVertices===3?(C=_.opposite.prev.opposite,I.mark=h,f=I):(C=_.opposite.next,I.edge===C.prev&&(I.edge=C),C.prev=C.prev.prev,C.prev.next=C),_.prev=m.prev,_.prev.next=_,_.setOpposite(C),I.computeNormalAndCentroid()}else m.next=_,_.prev=m;return f}mergeAdjacentFaces(m,_){const f=m.opposite,I=f.face;_.push(I),I.mark=h;let C=m.prev,y=m.next,x=f.prev,E=f.next;for(;C.opposite.face===I;)C=C.prev,E=E.next;for(;y.opposite.face===I;)y=y.next,x=x.prev;let B;for(B=E;B!==x.next;B=B.next)B.face=this;this.edge=y;let S;return S=this.connectHalfEdges(x,y),S&&_.push(S),S=this.connectHalfEdges(C,E),S&&_.push(S),this.computeNormalAndCentroid(),_}collectIndices(){const m=[];let _=this.edge;do m.push(_.head().index),_=_.next;while(_!==this.edge);return m}static createTriangle(m,_,f,I=0){const C=new I4n,y=new l(m,C),x=new l(_,C),E=new l(f,C);return y.next=E.prev=x,x.next=y.prev=E,E.next=x.prev=y,C.edge=y,C.computeNormalAndCentroid(I),C}};e.exports={VISIBLE:u,NON_CONVEX:g,DELETED:h,Face:d}}}),ndi=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/QuickHull.js"(t,e){var n=Jhe(),o=$gi(),i=qgi(),r=Xgi(),s=Zgi(),{Face:a,VISIBLE:A,NON_CONVEX:c,DELETED:l}=tdi(),u=1,g=2,h=class{constructor(d){if(!Array.isArray(d))throw TypeError("input is not a valid array");if(d.length<4)throw Error("cannot build a simplex out of <4 points");this.tolerance=-1,this.nFaces=0,this.nPoints=d.length,this.faces=[],this.newFaces=[],this.claimed=new r,this.unclaimed=new r,this.vertices=[];for(let p=0;p<d.length;p+=1)this.vertices.push(new s(d[p],p));this.discardedFaces=[],this.vertexPointIndices=[]}addVertexToFace(d,p){d.face=p,p.outside?this.claimed.insertBefore(p.outside,d):this.claimed.add(d),p.outside=d}removeVertexFromFace(d,p){d===p.outside&&(d.next&&d.next.face===p?p.outside=d.next:p.outside=null),this.claimed.remove(d)}removeAllVerticesFromFace(d){if(d.outside){let p=d.outside;for(;p.next&&p.next.face===d;)p=p.next;return this.claimed.removeChain(d.outside,p),p.next=null,d.outside}}deleteFaceVertices(d,p){const m=this.removeAllVerticesFromFace(d);if(m)if(!p)this.unclaimed.addAll(m);else{let _;for(let f=m;f;f=_)_=f.next,p.distanceToPlane(f.point)>this.tolerance?this.addVertexToFace(f,p):this.unclaimed.add(f)}}resolveUnclaimedPoints(d){let p=this.unclaimed.first();for(let m=p;m;m=p){p=m.next;let _=this.tolerance,f;for(let I=0;I<d.length;I+=1){const C=d[I];if(C.mark===A){const y=C.distanceToPlane(m.point);if(y>_&&(_=y,f=C),_>1e3*this.tolerance)break}}f&&this.addVertexToFace(m,f)}}computeExtremes(){const d=[],p=[],m=[],_=[];let f,I;for(f=0;f<3;f+=1)m[f]=_[f]=this.vertices[0];for(f=0;f<3;f+=1)d[f]=p[f]=this.vertices[0].point[f];for(f=1;f<this.vertices.length;f+=1){const C=this.vertices[f],y=C.point;for(I=0;I<3;I+=1)y[I]<d[I]&&(d[I]=y[I],m[I]=C);for(I=0;I<3;I+=1)y[I]>p[I]&&(p[I]=y[I],_[I]=C)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(d[0]),Math.abs(p[0]))+Math.max(Math.abs(d[1]),Math.abs(p[1]))+Math.max(Math.abs(d[2]),Math.abs(p[2]))),[m,_]}createInitialSimplex(){const d=this.vertices,[p,m]=this.computeExtremes();let _,f,I,C,y=0,x=0;for(I=0;I<3;I+=1){const M=m[I].point[I]-p[I].point[I];M>y&&(y=M,x=I)}const E=p[x],B=m[x];for(y=0,I=0;I<this.vertices.length;I+=1){const M=this.vertices[I];if(M!==E&&M!==B){const k=o(M.point,E.point,B.point);k>y&&(y=k,_=M)}}const S=i([],E.point,B.point,_.point),Q=n(E.point,S);for(y=-1,I=0;I<this.vertices.length;I+=1){const M=this.vertices[I];if(M!==E&&M!==B&&M!==_){const k=Math.abs(n(S,M.point)-Q);k>y&&(y=k,f=M)}}const w=[];if(n(f.point,S)-Q<0)for(w.push(a.createTriangle(E,B,_),a.createTriangle(f,B,E),a.createTriangle(f,_,B),a.createTriangle(f,E,_)),I=0;I<3;I+=1){const M=(I+1)%3;w[I+1].getEdge(2).setOpposite(w[0].getEdge(M)),w[I+1].getEdge(1).setOpposite(w[M+1].getEdge(0))}else for(w.push(a.createTriangle(E,_,B),a.createTriangle(f,E,B),a.createTriangle(f,B,_),a.createTriangle(f,_,E)),I=0;I<3;I+=1){const M=(I+1)%3;w[I+1].getEdge(2).setOpposite(w[0].getEdge((3-I)%3)),w[I+1].getEdge(0).setOpposite(w[M+1].getEdge(1))}for(I=0;I<4;I+=1)this.faces.push(w[I]);for(I=0;I<d.length;I+=1){const M=d[I];if(M!==E&&M!==B&&M!==_&&M!==f){y=this.tolerance;let k;for(C=0;C<4;C+=1){const R=w[C].distanceToPlane(M.point);R>y&&(y=R,k=w[C])}k&&this.addVertexToFace(M,k)}}}reindexFaceAndVertices(){const d=[];for(let p=0;p<this.faces.length;p+=1){const m=this.faces[p];m.mark===A&&d.push(m)}this.faces=d}collectFaces(d){const p=[];for(let m=0;m<this.faces.length;m+=1){if(this.faces[m].mark!==A)throw Error("attempt to include a destroyed face in the hull");const _=this.faces[m].collectIndices();if(d)p.push(_);else for(let f=0;f<_.length-2;f+=1)p.push([_[0],_[f+1],_[f+2]])}return p}nextVertexToAdd(){if(!this.claimed.isEmpty()){let d,p,m=0;const _=this.claimed.first().face;for(p=_.outside;p&&p.face===_;p=p.next){const f=_.distanceToPlane(p.point);f>m&&(m=f,d=p)}return d}}computeHorizon(d,p,m,_){this.deleteFaceVertices(m),m.mark=l;let f;p?f=p.next:f=p=m.getEdge(0);do{const I=f.opposite,C=I.face;C.mark===A&&(C.distanceToPlane(d)>this.tolerance?this.computeHorizon(d,I,C,_):_.push(f)),f=f.next}while(f!==p)}addAdjoiningFace(d,p){const m=a.createTriangle(d,p.tail(),p.head());return this.faces.push(m),m.getEdge(-1).setOpposite(p.opposite),m.getEdge(0)}addNewFaces(d,p){this.newFaces=[];let m,_;for(let f=0;f<p.length;f+=1){const I=p[f],C=this.addAdjoiningFace(d,I);m?C.next.setOpposite(_):m=C,this.newFaces.push(C.face),_=C}m.next.setOpposite(_)}oppositeFaceDistance(d){return d.face.distanceToPlane(d.opposite.face.centroid)}doAdjacentMerge(d,p){let m=d.edge,_=!0,f=0;do{if(f>=d.nVertices)throw Error("merge recursion limit exceeded");const I=m.opposite.face;let C=!1;if(p===g?(this.oppositeFaceDistance(m)>-this.tolerance||this.oppositeFaceDistance(m.opposite)>-this.tolerance)&&(C=!0):d.area>I.area?this.oppositeFaceDistance(m)>-this.tolerance?C=!0:this.oppositeFaceDistance(m.opposite)>-this.tolerance&&(_=!1):this.oppositeFaceDistance(m.opposite)>-this.tolerance?C=!0:this.oppositeFaceDistance(m)>-this.tolerance&&(_=!1),C){const y=d.mergeAdjacentFaces(m,[]);for(let x=0;x<y.length;x+=1)this.deleteFaceVertices(y[x],d);return!0}m=m.next,f+=1}while(m!==d.edge);return _||(d.mark=c),!1}addVertexToHull(d){const p=[];this.unclaimed.clear(),this.removeVertexFromFace(d,d.face),this.computeHorizon(d.point,null,d.face,p),this.addNewFaces(d,p);for(let m=0;m<this.newFaces.length;m+=1){const _=this.newFaces[m];if(_.mark===A)for(;this.doAdjacentMerge(_,u););}for(let m=0;m<this.newFaces.length;m+=1){const _=this.newFaces[m];if(_.mark===c)for(_.mark=A;this.doAdjacentMerge(_,g););}this.resolveUnclaimedPoints(this.newFaces)}build(){let d;for(this.createInitialSimplex();d=this.nextVertexToAdd();)this.addVertexToHull(d);this.reindexFaceAndVertices()}};e.exports=h}}),yin=yt({"node_modules/@jscad/modeling/src/operations/hulls/quickhull/index.js"(t,e){var n=ndi(),o=(i,r={})=>{const s=new n(i);return s.build(),s.collectFaces(r.skipTriangulation)};e.exports=o}}),PY=yt({"node_modules/@jscad/modeling/src/geometries/poly3/create.js"(t,e){var n=o=>((o===void 0||o.length<3)&&(o=[]),{vertices:o});e.exports=n}}),odi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/clone.js"(t,e){var n=PY(),o=$r(),i=(...r)=>{let s,a;return r.length===1?(s=n(),a=r[0]):(s=r[0],a=r[1]),s.vertices=a.vertices.map(A=>o.clone(A)),s};e.exports=i}}),idi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/fromPoints.js"(t,e){var n=$r(),o=PY(),i=r=>{const s=r.map(a=>n.clone(a));return o(s)};e.exports=i}}),rdi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/fromPointsAndPlane.js"(t,e){var n=PY(),o=(i,r)=>{const s=n(i);return s.plane=r,s};e.exports=o}}),Xhe=yt({"node_modules/@jscad/modeling/src/maths/vec4/create.js"(t,e){var n=()=>[0,0,0,0];e.exports=n}}),xin=yt({"node_modules/@jscad/modeling/src/maths/vec4/clone.js"(t,e){var n=Xhe(),o=i=>{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],r};e.exports=o}}),Ein=yt({"node_modules/@jscad/modeling/src/maths/vec4/copy.js"(t,e){var n=(o,i)=>(o[0]=i[0],o[1]=i[1],o[2]=i[2],o[3]=i[3],o);e.exports=n}}),Bin=yt({"node_modules/@jscad/modeling/src/maths/vec4/equals.js"(t,e){var n=(o,i)=>o[0]===i[0]&&o[1]===i[1]&&o[2]===i[2]&&o[3]===i[3];e.exports=n}}),bin=yt({"node_modules/@jscad/modeling/src/maths/plane/flip.js"(t,e){var n=(o,i)=>(o[0]=-i[0],o[1]=-i[1],o[2]=-i[2],o[3]=-i[3],o);e.exports=n}}),Sin=yt({"node_modules/@jscad/modeling/src/maths/plane/fromNormalAndPoint.js"(t,e){var n=$r(),o=(i,r,s)=>{const a=n.normalize(n.create(),r),A=n.dot(s,a);return i[0]=a[0],i[1]=a[1],i[2]=a[2],i[3]=A,i};e.exports=o}}),Qin=yt({"node_modules/@jscad/modeling/src/maths/vec4/fromValues.js"(t,e){var n=Xhe(),o=(i,r,s,a)=>{const A=n();return A[0]=i,A[1]=r,A[2]=s,A[3]=a,A};e.exports=o}}),sdi=yt({"node_modules/@jscad/modeling/src/maths/plane/fromNoisyPoints.js"(t,e){var n=$r(),o=Sin(),i=(r,...s)=>{r[0]=0,r[1]=0,r[2]=0,r[3]=0;const a=s.length;s.forEach(f=>{n.add(r,r,f)}),n.scale(r,r,1/a);let A=0,c=0,l=0,u=0,g=0,h=0;const d=n.create();s.forEach(f=>{n.subtract(d,f,r),A+=d[0]*d[0],c+=d[0]*d[1],l+=d[0]*d[2],u+=d[1]*d[1],g+=d[1]*d[2],h+=d[2]*d[2]}),A/=a,c/=a,l/=a,u/=a,g/=a,h/=a,d[0]=0,d[1]=0,d[2]=0;const p=n.create();let m=u*h-g*g;p[0]=m,p[1]=l*g-c*h,p[2]=c*g-l*u;let _=m*m;return n.add(d,d,n.scale(p,p,_)),m=A*h-l*l,p[0]=l*g-c*h,p[1]=m,p[2]=c*l-g*A,_=m*m,n.dot(d,p)<0&&(_=-_),n.add(d,d,n.scale(p,p,_)),m=A*u-c*c,p[0]=c*g-l*u,p[1]=c*l-g*A,p[2]=m,_=m*m,n.dot(d,p)<0&&(_=-_),n.add(d,d,n.scale(p,p,_)),o(r,d,r)};e.exports=i}}),vin=yt({"node_modules/@jscad/modeling/src/maths/plane/fromPoints.js"(t,e){var n=$r(),o=(i,...r)=>{const s=r.length,a=n.create(),A=n.create(),c=l=>{const u=r[l],g=r[(l+1)%s],h=r[(l+2)%s];return n.subtract(a,g,u),n.subtract(A,h,u),n.cross(a,a,A),n.normalize(a,a),a};return i[0]=0,i[1]=0,i[2]=0,s===3?n.copy(i,c(0)):(r.forEach((l,u)=>{n.add(i,i,c(u))}),n.normalize(i,i)),i[3]=n.dot(i,r[0]),i};e.exports=o}}),adi=yt({"node_modules/@jscad/modeling/src/maths/plane/fromPointsRandom.js"(t,e){var{EPS:n}=mc(),o=$r(),i=(r,s,a,A)=>{let c=o.subtract(o.create(),a,s),l=o.subtract(o.create(),A,s);o.length(c)<n&&(c=o.orthogonal(c,l)),o.length(l)<n&&(l=o.orthogonal(l,c));let u=o.cross(o.create(),c,l);o.length(u)<n&&(l=o.orthogonal(l,c),u=o.cross(u,c,l)),u=o.normalize(u,u);const g=o.dot(u,s);return r[0]=u[0],r[1]=u[1],r[2]=u[2],r[3]=g,r};e.exports=i}}),Adi=yt({"node_modules/@jscad/modeling/src/maths/plane/projectionOfPoint.js"(t,e){var n=$r(),o=(i,r)=>{const s=r[0]*i[0]+r[1]*i[1]+r[2]*i[2]-i[3],a=r[0]-s*i[0],A=r[1]-s*i[1],c=r[2]-s*i[2];return n.fromValues(a,A,c)};e.exports=o}}),win=yt({"node_modules/@jscad/modeling/src/maths/plane/signedDistanceToPoint.js"(t,e){var n=$r(),o=(i,r)=>n.dot(i,r)-i[3];e.exports=o}}),Pin=yt({"node_modules/@jscad/modeling/src/maths/vec4/toString.js"(t,e){var n=o=>`(${o[0].toFixed(9)}, ${o[1].toFixed(9)}, ${o[2].toFixed(9)}, ${o[3].toFixed(9)})`;e.exports=n}}),cdi=yt({"node_modules/@jscad/modeling/src/maths/plane/transform.js"(t,e){var n=Du(),o=$r(),i=vin(),r=bin(),s=(a,A,c)=>{const l=n.isMirroring(c),u=o.orthogonal(o.create(),A),g=o.cross(u,A,u),h=o.cross(o.create(),A,g);let d=o.fromScalar(o.create(),A[3]);o.multiply(d,d,A);let p=o.add(o.create(),d,g),m=o.add(o.create(),d,h);return d=o.transform(d,d,c),p=o.transform(p,p,c),m=o.transform(m,m,c),i(a,d,p,m),l&&r(a,a),a};e.exports=s}}),S6=yt({"node_modules/@jscad/modeling/src/maths/plane/index.js"(t,e){e.exports={clone:xin(),copy:Ein(),create:Xhe(),equals:Bin(),flip:bin(),fromNormalAndPoint:Sin(),fromValues:Qin(),fromNoisyPoints:sdi(),fromPoints:vin(),fromPointsRandom:adi(),projectionOfPoint:Adi(),signedDistanceToPoint:win(),toString:Pin(),transform:cdi()}}}),ldi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/invert.js"(t,e){var n=S6(),o=PY(),i=r=>{const s=r.vertices.slice().reverse(),a=o(s);return r.plane&&(a.plane=n.flip(n.create(),r.plane)),a};e.exports=i}}),Min=yt({"node_modules/@jscad/modeling/src/geometries/poly3/isA.js"(t,e){var n=o=>!!(o&&typeof o=="object"&&"vertices"in o&&Array.isArray(o.vertices));e.exports=n}}),Din=yt({"node_modules/@jscad/modeling/src/geometries/poly3/isConvex.js"(t,e){var n=S6(),o=$r(),i=a=>r(a.vertices),r=a=>{const A=a.length;if(A>2){const c=n.fromPoints(n.create(),...a);let l=a[A-2],u=a[A-1];for(let g=0;g<A;g++){const h=a[g];if(!s(l,u,h,c))return!1;l=u,u=h}}return!0},s=(a,A,c,l)=>{const u=o.cross(o.create(),o.subtract(o.create(),A,a),o.subtract(o.create(),c,A));return o.dot(u,l)>=0};e.exports=i}}),dVe=yt({"node_modules/@jscad/modeling/src/geometries/poly3/plane.js"(t,e){var n=S6(),o=i=>(i.plane||(i.plane=n.fromPoints(n.create(),...i.vertices)),i.plane);e.exports=o}}),Nin=yt({"node_modules/@jscad/modeling/src/geometries/poly3/measureArea.js"(t,e){var n=dVe(),o=i=>{const r=i.vertices.length;if(r<3)return 0;const s=i.vertices,a=n(i),A=Math.abs(a[0]),c=Math.abs(a[1]),l=Math.abs(a[2]);if(A+c+l===0)return 0;let u=3;A>c&&A>l?u=1:c>l&&(u=2);let g=0,h=0,d=1,p=2;switch(u){case 1:for(d=1;d<r;d++)h=d-1,p=(d+1)%r,g+=s[d][1]*(s[p][2]-s[h][2]);g+=s[0][1]*(s[1][2]-s[r-1][2]),g/=2*a[0];break;case 2:for(d=1;d<r;d++)h=d-1,p=(d+1)%r,g+=s[d][2]*(s[p][0]-s[h][0]);g+=s[0][2]*(s[1][0]-s[r-1][0]),g/=2*a[1];break;default:for(d=1;d<r;d++)h=d-1,p=(d+1)%r,g+=s[d][0]*(s[p][1]-s[h][1]);g+=s[0][0]*(s[1][1]-s[r-1][1]),g/=2*a[2];break}return g};e.exports=o}}),udi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/measureBoundingBox.js"(t,e){var n=$r(),o=i=>{const r=i.vertices,s=r.length,a=s===0?n.create():n.clone(r[0]),A=n.clone(a);for(let c=1;c<s;c++)n.min(a,a,r[c]),n.max(A,A,r[c]);return[a,A]};e.exports=o}}),gdi=yt({"node_modules/@jscad/modeling/src/maths/vec4/dot.js"(t,e){var n=(o,i)=>o[0]*i[0]+o[1]*i[1]+o[2]*i[2]+o[3]*i[3];e.exports=n}}),ddi=yt({"node_modules/@jscad/modeling/src/maths/vec4/fromScalar.js"(t,e){var n=(o,i)=>(o[0]=i,o[1]=i,o[2]=i,o[3]=i,o);e.exports=n}}),hdi=yt({"node_modules/@jscad/modeling/src/maths/vec4/transform.js"(t,e){var n=(o,i,r)=>{const[s,a,A,c]=i;return o[0]=r[0]*s+r[4]*a+r[8]*A+r[12]*c,o[1]=r[1]*s+r[5]*a+r[9]*A+r[13]*c,o[2]=r[2]*s+r[6]*a+r[10]*A+r[14]*c,o[3]=r[3]*s+r[7]*a+r[11]*A+r[15]*c,o};e.exports=n}}),Rin=yt({"node_modules/@jscad/modeling/src/maths/vec4/index.js"(t,e){e.exports={clone:xin(),copy:Ein(),create:Xhe(),dot:gdi(),equals:Bin(),fromScalar:ddi(),fromValues:Qin(),toString:Pin(),transform:hdi()}}}),pdi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/measureBoundingSphere.js"(t,e){var n=Rin(),o=new WeakMap,i=r=>{const s=o.get(r);if(s)return s;const a=r.vertices,A=n.create();if(a.length===0)return A[0]=0,A[1]=0,A[2]=0,A[3]=0,A;let c=a[0],l=c,u=c,g=c,h=c,d=c;a.forEach(f=>{c[0]>f[0]&&(c=f),l[1]>f[1]&&(l=f),u[2]>f[2]&&(u=f),g[0]<f[0]&&(g=f),h[1]<f[1]&&(h=f),d[2]<f[2]&&(d=f)}),A[0]=(c[0]+g[0])*.5,A[1]=(l[1]+h[1])*.5,A[2]=(u[2]+d[2])*.5;const p=A[0]-g[0],m=A[1]-h[1],_=A[2]-d[2];return A[3]=Math.sqrt(p*p+m*m+_*_),o.set(r,A),A};e.exports=i}}),mdi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/measureSignedVolume.js"(t,e){var n=$r(),o=i=>{let r=0;const s=i.vertices,a=n.create();for(let A=0;A<s.length-2;A++)n.cross(a,s[A+1],s[A+2]),r+=n.dot(s[0],a);return r/=6,r};e.exports=o}}),_di=yt({"node_modules/@jscad/modeling/src/geometries/poly3/toPoints.js"(t,e){var n=o=>o.vertices;e.exports=n}}),fdi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/toString.js"(t,e){var n=$r(),o=i=>{let r="poly3: vertices: [";return i.vertices.forEach(s=>{r+=`${n.toString(s)}, `}),r+="]",r};e.exports=o}}),Idi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/transform.js"(t,e){var n=Du(),o=$r(),i=PY(),r=(s,a)=>{const A=a.vertices.map(c=>o.transform(o.create(),c,s));return n.isMirroring(s)&&A.reverse(),i(A)};e.exports=r}}),Cdi=yt({"node_modules/@jscad/modeling/src/geometries/poly3/validate.js"(t,e){var n=win(),{NEPS:o}=mc(),i=$r(),r=Min(),s=Din(),a=Nin(),A=dVe(),c=l=>{if(!r(l))throw new Error("invalid poly3 structure");if(l.vertices.length<3)throw new Error(`poly3 not enough vertices ${l.vertices.length}`);if(a(l)<=0)throw new Error("poly3 area must be greater than zero");for(let u=0;u<l.vertices.length;u++)if(i.equals(l.vertices[u],l.vertices[(u+1)%l.vertices.length]))throw new Error(`poly3 duplicate vertex ${l.vertices[u]}`);if(!s(l))throw new Error("poly3 must be convex");if(l.vertices.forEach(u=>{if(!u.every(Number.isFinite))throw new Error(`poly3 invalid vertex ${u}`)}),l.vertices.length>3){const u=A(l);l.vertices.forEach(g=>{const h=Math.abs(n(u,g));if(h>o)throw new Error(`poly3 must be coplanar: vertex ${g} distance ${h}`)})}};e.exports=c}}),XA=yt({"node_modules/@jscad/modeling/src/geometries/poly3/index.js"(t,e){e.exports={clone:odi(),create:PY(),fromPoints:idi(),fromPointsAndPlane:rdi(),invert:ldi(),isA:Min(),isConvex:Din(),measureArea:Nin(),measureBoundingBox:udi(),measureBoundingSphere:pdi(),measureSignedVolume:mdi(),plane:dVe(),toPoints:_di(),toString:fdi(),transform:Idi(),validate:Cdi()}}}),ydi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/fromPointsConvex.js"(t,e){var n=yin(),o=bX(),i=XA(),r=s=>{if(!Array.isArray(s))throw new Error("the given points must be an array");const A=n(s,{skipTriangulation:!0}).map(c=>{const l=c.map(u=>s[u]);return i.create(l)});return o(A)};e.exports=r}}),xdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/fromPoints.js"(t,e){var n=XA(),o=bX(),i=r=>{if(!Array.isArray(r))throw new Error("the given points must be an array");const s=r.map((A,c)=>n.create(A));return o(s)};e.exports=i}}),Edi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/fromCompactBinary.js"(t,e){var n=$r(),o=Du(),i=XA(),r=bX(),s=a=>{if(a[0]!==1)throw new Error("invalid compact binary data");const A=r();A.transforms=o.clone(a.slice(1,17));const c=a[21];let l=22,u=a.length-c*3;for(;u<a.length;){const g=a[l];l++;const h=[];for(let d=0;d<g;d++)h.push(n.fromValues(a[u],a[u+1],a[u+2])),u+=3;A.polygons.push(i.create(h))}return a[17]>=0&&(A.color=[a[17],a[18],a[19],a[20]]),A};e.exports=s}}),Bdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/applyTransforms.js"(t,e){var n=Du(),o=XA(),i=r=>(n.isIdentity(r.transforms)||(r.polygons=r.polygons.map(s=>o.transform(r.transforms,s)),r.transforms=n.create()),r);e.exports=i}}),SX=yt({"node_modules/@jscad/modeling/src/geometries/geom3/toPolygons.js"(t,e){var n=Bdi(),o=i=>n(i).polygons;e.exports=o}}),bdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/invert.js"(t,e){var n=XA(),o=bX(),i=SX(),r=s=>{const A=i(s).map(c=>n.invert(c));return o(A)};e.exports=r}}),hVe=yt({"node_modules/@jscad/modeling/src/geometries/geom3/isA.js"(t,e){var n=o=>!!(o&&typeof o=="object"&&"polygons"in o&&"transforms"in o&&Array.isArray(o.polygons)&&"length"in o.transforms);e.exports=n}}),Sdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/isConvex.js"(t,e){var{EPS:n}=mc(),o=$r(),i=hVe(),r=SX(),s=XA(),a=A=>{if(!i(A))throw new Error("isConvex requires a geom3 geometry");const c=r(A);if(c.length===0)return!0;const l=[],u=new Set;for(let g=0;g<c.length;g++){const h=c[g].vertices;for(let d=0;d<h.length;d++){const p=h[d],m=`${p[0]},${p[1]},${p[2]}`;u.has(m)||(u.add(m),l.push(p))}}for(let g=0;g<c.length;g++){const h=s.plane(c[g]);for(let d=0;d<l.length;d++){const p=l[d];if(o.dot(h,p)-h[3]>n)return!1}}return!0};e.exports=a}}),Qdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/toPoints.js"(t,e){var n=XA(),o=SX(),i=r=>o(r).map(A=>n.toPoints(A));e.exports=i}}),vdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/toString.js"(t,e){var n=XA(),o=SX(),i=r=>{const s=o(r);let a="geom3 ("+s.length+` polygons):
`;return s.forEach(A=>{a+="  "+n.toString(A)+`
`}),a};e.exports=i}}),wdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/toCompactBinary.js"(t,e){var n=XA(),o=i=>{const r=i.polygons,s=i.transforms,a=r.length,A=r.reduce((h,d)=>h+d.vertices.length,0);let c=[-1,-1,-1,-1];i.color&&(c=i.color);const l=new Float32Array(22+a+A*3);l[0]=1,l[1]=s[0],l[2]=s[1],l[3]=s[2],l[4]=s[3],l[5]=s[4],l[6]=s[5],l[7]=s[6],l[8]=s[7],l[9]=s[8],l[10]=s[9],l[11]=s[10],l[12]=s[11],l[13]=s[12],l[14]=s[13],l[15]=s[14],l[16]=s[15],l[17]=c[0],l[18]=c[1],l[19]=c[2],l[20]=c[3],l[21]=A;let u=22,g=u+a;return r.forEach(h=>{const d=n.toPoints(h);l[u]=d.length,u++;for(let p=0;p<d.length;p++){const m=d[p];l[g+0]=m[0],l[g+1]=m[1],l[g+2]=m[2],g+=3}}),l};e.exports=o}}),Pdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/transform.js"(t,e){var n=Du(),o=(i,r)=>{const s=n.multiply(n.create(),i,r.transforms);return Object.assign({},r,{transforms:s})};e.exports=o}}),Mdi=yt({"node_modules/@jscad/modeling/src/geometries/geom3/validate.js"(t,e){var n=XA(),o=hVe(),i=s=>{if(!o(s))throw new Error("invalid geom3 structure");if(s.polygons.forEach(n.validate),r(s),!s.transforms.every(Number.isFinite))throw new Error(`geom3 invalid transforms ${s.transforms}`)},r=s=>{const a=new Map;s.polygons.forEach(({vertices:c})=>{c.forEach((l,u)=>{const g=`${l}`,h=`${c[(u+1)%c.length]}`,d=`${g}/${h}`,p=a.has(d)?a.get(d):0;a.set(d,p+1)})});const A=[];if(a.forEach((c,l)=>{const u=l.split("/").reverse().join("/"),g=a.get(u);c!==g&&A.push(l.replace("/"," -> "))}),A.length>0)throw new Error(`non-manifold edges ${A.length}
${A.join(`
`)}`)};e.exports=i}}),Ta=yt({"node_modules/@jscad/modeling/src/geometries/geom3/index.js"(t,e){e.exports={clone:jgi(),create:bX(),fromPointsConvex:ydi(),fromPoints:xdi(),fromCompactBinary:Edi(),invert:bdi(),isA:hVe(),isConvex:Sdi(),toPoints:Qdi(),toPolygons:SX(),toString:vdi(),toCompactBinary:wdi(),transform:Pdi(),validate:Mdi()}}}),pVe=yt({"node_modules/@jscad/modeling/src/geometries/path2/clone.js"(t,e){var n=o=>Object.assign({},o);e.exports=n}}),Tin=yt({"node_modules/@jscad/modeling/src/geometries/path2/close.js"(t,e){var{EPS:n}=mc(),o=_A(),i=pVe(),r=s=>{if(s.isClosed)return s;const a=i(s);if(a.isClosed=!0,a.points.length>1){const A=a.points,c=A[0];let l=A[A.length-1];for(;o.distance(c,l)<n*n&&(A.pop(),A.length!==1);)l=A[A.length-1]}return a};e.exports=r}}),Zhe=yt({"node_modules/@jscad/modeling/src/geometries/path2/create.js"(t,e){var n=Du(),o=i=>(i===void 0&&(i=[]),{points:i,isClosed:!1,transforms:n.create()});e.exports=o}}),mVe=yt({"node_modules/@jscad/modeling/src/geometries/path2/fromPoints.js"(t,e){var{EPS:n}=mc(),o=_A(),i=Tin(),r=Zhe(),s=(a,A)=>{const c={closed:!1};let{closed:l}=Object.assign({},c,a),u=r();if(u.points=A.map(g=>o.clone(g)),u.points.length>1){const g=u.points[0],h=u.points[u.points.length-1];o.distance(g,h)<n*n&&(l=!0)}return l===!0&&(u=i(u)),u};e.exports=s}}),Ddi=yt({"node_modules/@jscad/modeling/src/geometries/path2/applyTransforms.js"(t,e){var n=Du(),o=_A(),i=r=>(n.isIdentity(r.transforms)||(r.points=r.points.map(s=>o.transform(o.create(),s,r.transforms)),r.transforms=n.create()),r);e.exports=i}}),MY=yt({"node_modules/@jscad/modeling/src/geometries/path2/toPoints.js"(t,e){var n=Ddi(),o=i=>n(i).points;e.exports=o}}),Ndi=yt({"node_modules/@jscad/modeling/src/geometries/path2/appendArc.js"(t,e){var{TAU:n}=mc(),o=_A(),i=mVe(),r=MY(),s=(a,A)=>{const c={radius:[0,0],xaxisrotation:0,clockwise:!1,large:!1,segments:16};let{endpoint:l,radius:u,xaxisrotation:g,clockwise:h,large:d,segments:p}=Object.assign({},c,a);if(!Array.isArray(l))throw new Error("endpoint must be an array of X and Y values");if(l.length<2)throw new Error("endpoint must contain X and Y values");if(l=o.clone(l),!Array.isArray(u))throw new Error("radius must be an array of X and Y values");if(u.length<2)throw new Error("radius must contain X and Y values");if(p<4)throw new Error("segments must be four or more");const m=1e5;if(A.isClosed)throw new Error("the given path cannot be closed");const _=r(A);if(_.length<1)throw new Error("the given path must contain one or more points (as the starting point for the arc)");let f=u[0],I=u[1];const C=_[_.length-1];f=Math.round(f*m)/m,I=Math.round(I*m)/m,l=o.fromValues(Math.round(l[0]*m)/m,Math.round(l[1]*m)/m);const y=!h;let x=[];if(f===0||I===0)x.push(l);else{f=Math.abs(f),I=Math.abs(I);const B=g,S=Math.cos(B),Q=Math.sin(B),w=o.subtract(o.create(),C,l);o.scale(w,w,.5);const M=Math.round((S*w[0]+Q*w[1])*m)/m,k=Math.round((-Q*w[0]+S*w[1])*m)/m,R=o.fromValues(M,k),F=R[0]*R[0]/(f*f)+R[1]*R[1]/(I*I);if(F>1){const ne=Math.sqrt(F);f*=ne,I*=ne,f=Math.round(f*m)/m,I=Math.round(I*m)/m}let O=Math.sqrt((f*f*I*I-f*f*R[1]*R[1]-I*I*R[0]*R[0])/(f*f*R[1]*R[1]+I*I*R[0]*R[0]));y===d&&(O=-O);const U=o.fromValues(f*R[1]/I,-I*R[0]/f);o.scale(U,U,O);let Y=o.fromValues(S*U[0]-Q*U[1],Q*U[0]+S*U[1]);Y=o.add(Y,Y,o.scale(o.create(),o.add(o.create(),C,l),.5));const W=o.fromValues((R[0]-U[0])/f,(R[1]-U[1])/I),te=o.fromValues((-R[0]-U[0])/f,(-R[1]-U[1])/I),j=o.angleRadians(W);let oe=o.angleRadians(te)-j;oe=oe%n,!y&&oe>0?oe-=n:y&&oe<0&&(oe+=n);let ie=Math.floor(p*(Math.abs(oe)/n));ie<1&&(ie=1);for(let ne=1;ne<ie;ne++){const le=j+ne/ie*oe,ge=Math.cos(le),_e=Math.sin(le),ue=o.fromValues(S*f*ge-Q*I*_e,Q*f*ge+S*I*_e);o.add(ue,ue,Y),x.push(ue)}ie&&x.push(a.endpoint)}return x=_.concat(x),i({},x)};e.exports=s}}),kin=yt({"node_modules/@jscad/modeling/src/geometries/path2/concat.js"(t,e){var n=mVe(),o=MY(),{equals:i}=_A(),r=(...s)=>{let a=!1,A=[];return s.forEach((c,l)=>{const u=o(c).slice();if(A.length>0&&u.length>0&&i(u[0],A[A.length-1])&&u.shift(),u.length>0&&a)throw new Error(`Cannot concatenate to a closed path; check the ${l}th path`);a=c.isClosed,A=A.concat(u)}),n({closed:a},A)};e.exports=r}}),Fin=yt({"node_modules/@jscad/modeling/src/geometries/path2/appendPoints.js"(t,e){var n=kin(),o=Zhe(),i=(r,s)=>n(s,o(r));e.exports=i}}),Rdi=yt({"node_modules/@jscad/modeling/src/geometries/path2/appendBezier.js"(t,e){var{TAU:n}=mc(),o=_A(),i=_A(),r=Fin(),s=MY(),a=(A,c)=>{const l={segments:16};let{controlPoints:u,segments:g}=Object.assign({},l,A);if(!Array.isArray(u))throw new Error("controlPoints must be an array of one or more points");if(u.length<1)throw new Error("controlPoints must be an array of one or more points");if(g<4)throw new Error("segments must be four or more");if(c.isClosed)throw new Error("the given geometry cannot be closed");const h=s(c);if(h.length<1)throw new Error("the given path must contain one or more points (as the starting point for the bezier curve)");if(u=u.slice(),u[0]===null){if(u.length<2)throw new Error("a null control point must be passed with one more control points");let R=h[h.length-2];if("lastBezierControlPoint"in c&&(R=c.lastBezierControlPoint),!Array.isArray(R))throw new Error("the given path must contain TWO or more points if given a null control point");const F=o.scale(o.create(),h[h.length-1],2);o.subtract(F,F,R),u[0]=F}u.unshift(h[h.length-1]);const p=u.length-1,m=[];let _=1;for(let R=0;R<=p;++R)R>0&&(_*=R),m.push(_);const f=[];for(let R=0;R<=p;++R){const F=m[p]/(m[R]*m[p-R]);f.push(F)}const I=o.create(),C=o.create(),y=i.create(),x=R=>{let F=1,O=Math.pow(1-R,p);const U=R!==1?1/(1-R):1,Y=o.create();for(let W=0;W<=p;++W){W===p&&(O=1);const te=f[W]*F*O,j=o.scale(I,u[W],te);o.add(Y,Y,j),F*=R,O*=U}return Y},E=[],B=[],S=p+1;for(let R=0;R<S;++R){const F=R/(S-1),O=x(F);E.push(O),B.push(F)}let Q=1;const w=n/g,M=Math.sin(w);for(;Q<E.length-1;){const R=o.subtract(I,E[Q],E[Q-1]);o.normalize(R,R);const F=o.subtract(C,E[Q+1],E[Q]);o.normalize(F,F);const O=o.cross(y,R,F);if(Math.abs(O[2])>M){const U=B[Q-1],Y=B[Q+1],W=U+(Y-U)*1/3,te=U+(Y-U)*2/3,j=x(W),J=x(te);E.splice(Q,1,j,J),B.splice(Q,1,W,te),Q--,Q<1&&(Q=1)}else++Q}E.shift();const k=r(E,c);return k.lastBezierControlPoint=u[u.length-2],k};e.exports=a}}),Tdi=yt({"node_modules/@jscad/modeling/src/geometries/path2/equals.js"(t,e){var n=_A(),o=MY(),i=(r,s)=>{if(r.isClosed!==s.isClosed||r.points.length!==s.points.length)return!1;const a=o(r),A=o(s),c=a.length;let l=0;do{let u=!1;for(let g=0;g<c;g++)if(!n.equals(a[g],A[(g+l)%c])){u=!0;break}if(u===!1)return!0;if(!r.isClosed)return!1}while(++l<c);return!1};e.exports=i}}),kdi=yt({"node_modules/@jscad/modeling/src/geometries/path2/fromCompactBinary.js"(t,e){var n=Du(),o=_A(),i=Zhe(),r=s=>{if(s[0]!==2)throw new Error("invalid compact binary data");const a=i();a.transforms=n.clone(s.slice(1,17)),a.isClosed=!!s[17];for(let A=22;A<s.length;A+=2){const c=o.fromValues(s[A],s[A+1]);a.points.push(c)}return s[18]>=0&&(a.color=[s[18],s[19],s[20],s[21]]),a};e.exports=r}}),Lin=yt({"node_modules/@jscad/modeling/src/geometries/path2/isA.js"(t,e){var n=o=>!!(o&&typeof o=="object"&&"points"in o&&"transforms"in o&&"isClosed"in o&&Array.isArray(o.points)&&"length"in o.transforms);e.exports=n}}),Fdi=yt({"node_modules/@jscad/modeling/src/geometries/path2/reverse.js"(t,e){var n=pVe(),o=i=>{const r=n(i);return r.points=i.points.slice().reverse(),r};e.exports=o}}),Ldi=yt({"node_modules/@jscad/modeling/src/geometries/path2/toString.js"(t,e){var n=_A(),o=MY(),i=r=>{const s=o(r);let a="path ("+s.length+" points, "+r.isClosed+`):
[
`;return s.forEach(A=>{a+="  "+n.toString(A)+`,
`}),a+=`]
`,a};e.exports=i}}),Hdi=yt({"node_modules/@jscad/modeling/src/geometries/path2/toCompactBinary.js"(t,e){var n=o=>{const i=o.points,r=o.transforms;let s=[-1,-1,-1,-1];o.color&&(s=o.color);const a=new Float32Array(22+i.length*2);a[0]=2,a[1]=r[0],a[2]=r[1],a[3]=r[2],a[4]=r[3],a[5]=r[4],a[6]=r[5],a[7]=r[6],a[8]=r[7],a[9]=r[8],a[10]=r[9],a[11]=r[10],a[12]=r[11],a[13]=r[12],a[14]=r[13],a[15]=r[14],a[16]=r[15],a[17]=o.isClosed?1:0,a[18]=s[0],a[19]=s[1],a[20]=s[2],a[21]=s[3];for(let A=0;A<i.length;A++){const c=A*2+22,l=i[A];a[c]=l[0],a[c+1]=l[1]}return a};e.exports=n}}),Odi=yt({"node_modules/@jscad/modeling/src/geometries/path2/transform.js"(t,e){var n=Du(),o=(i,r)=>{const s=n.multiply(n.create(),i,r.transforms);return Object.assign({},r,{transforms:s})};e.exports=o}}),Gdi=yt({"node_modules/@jscad/modeling/src/geometries/path2/validate.js"(t,e){var n=_A(),o=Lin(),i=r=>{if(!o(r))throw new Error("invalid path2 structure");if(r.points.length>1){for(let s=0;s<r.points.length;s++)if(n.equals(r.points[s],r.points[(s+1)%r.points.length]))throw new Error(`path2 duplicate points ${r.points[s]}`)}if(r.points.forEach(s=>{if(!s.every(Number.isFinite))throw new Error(`path2 invalid point ${s}`)}),!r.transforms.every(Number.isFinite))throw new Error(`path2 invalid transforms ${r.transforms}`)};e.exports=i}}),Au=yt({"node_modules/@jscad/modeling/src/geometries/path2/index.js"(t,e){e.exports={appendArc:Ndi(),appendBezier:Rdi(),appendPoints:Fin(),clone:pVe(),close:Tin(),concat:kin(),create:Zhe(),equals:Tdi(),fromPoints:mVe(),fromCompactBinary:kdi(),isA:Lin(),reverse:Fdi(),toPoints:MY(),toString:Ldi(),toCompactBinary:Hdi(),transform:Odi(),validate:Gdi()}}}),Ydi=yt({"node_modules/@jscad/modeling/src/colors/colorize.js"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=XA(),a=(g,h)=>{const d=o.clone(h);return d.color=g,d},A=(g,h)=>{const d=i.clone(h);return d.color=g,d},c=(g,h)=>{const d=r.clone(h);return d.color=g,d},l=(g,h)=>{const d=s.clone(h);return d.color=g,d},u=(g,...h)=>{if(!Array.isArray(g))throw new Error("color must be an array");if(g.length<3)throw new Error("color must contain R, G and B values");if(g.length===3&&(g=[g[0],g[1],g[2],1]),h=n(h),h.length===0)throw new Error("wrong number of arguments");const d=h.map(p=>o.isA(p)?a(g,p):i.isA(p)?A(g,p):r.isA(p)?c(g,p):s.isA(p)?l(g,p):(p.color=g,p));return d.length===1?d[0]:d};e.exports=u}}),Hin=yt({"node_modules/@jscad/modeling/src/colors/cssColors.js"(t,e){var n={black:[0,0,0],silver:[.7529411764705882,.7529411764705882,.7529411764705882],gray:[.5019607843137255,.5019607843137255,.5019607843137255],white:[1,1,1],maroon:[.5019607843137255,0,0],red:[1,0,0],purple:[.5019607843137255,0,.5019607843137255],fuchsia:[1,0,1],green:[0,.5019607843137255,0],lime:[0,1,0],olive:[.5019607843137255,.5019607843137255,0],yellow:[1,1,0],navy:[0,0,.5019607843137255],blue:[0,0,1],teal:[0,.5019607843137255,.5019607843137255],aqua:[0,1,1],aliceblue:[.9411764705882353,.9725490196078431,1],antiquewhite:[.9803921568627451,.9215686274509803,.8431372549019608],aquamarine:[.4980392156862745,1,.8313725490196079],azure:[.9411764705882353,1,1],beige:[.9607843137254902,.9607843137254902,.8627450980392157],bisque:[1,.8941176470588236,.7686274509803922],blanchedalmond:[1,.9215686274509803,.803921568627451],blueviolet:[.5411764705882353,.16862745098039217,.8862745098039215],brown:[.6470588235294118,.16470588235294117,.16470588235294117],burlywood:[.8705882352941177,.7215686274509804,.5294117647058824],cadetblue:[.37254901960784315,.6196078431372549,.6274509803921569],chartreuse:[.4980392156862745,1,0],chocolate:[.8235294117647058,.4117647058823529,.11764705882352941],coral:[1,.4980392156862745,.3137254901960784],cornflowerblue:[.39215686274509803,.5843137254901961,.9294117647058824],cornsilk:[1,.9725490196078431,.8627450980392157],crimson:[.8627450980392157,.0784313725490196,.23529411764705882],cyan:[0,1,1],darkblue:[0,0,.5450980392156862],darkcyan:[0,.5450980392156862,.5450980392156862],darkgoldenrod:[.7215686274509804,.5254901960784314,.043137254901960784],darkgray:[.6627450980392157,.6627450980392157,.6627450980392157],darkgreen:[0,.39215686274509803,0],darkgrey:[.6627450980392157,.6627450980392157,.6627450980392157],darkkhaki:[.7411764705882353,.7176470588235294,.4196078431372549],darkmagenta:[.5450980392156862,0,.5450980392156862],darkolivegreen:[.3333333333333333,.4196078431372549,.1843137254901961],darkorange:[1,.5490196078431373,0],darkorchid:[.6,.19607843137254902,.8],darkred:[.5450980392156862,0,0],darksalmon:[.9137254901960784,.5882352941176471,.47843137254901963],darkseagreen:[.5607843137254902,.7372549019607844,.5607843137254902],darkslateblue:[.2823529411764706,.23921568627450981,.5450980392156862],darkslategray:[.1843137254901961,.30980392156862746,.30980392156862746],darkslategrey:[.1843137254901961,.30980392156862746,.30980392156862746],darkturquoise:[0,.807843137254902,.8196078431372549],darkviolet:[.5803921568627451,0,.8274509803921568],deeppink:[1,.0784313725490196,.5764705882352941],deepskyblue:[0,.7490196078431373,1],dimgray:[.4117647058823529,.4117647058823529,.4117647058823529],dimgrey:[.4117647058823529,.4117647058823529,.4117647058823529],dodgerblue:[.11764705882352941,.5647058823529412,1],firebrick:[.6980392156862745,.13333333333333333,.13333333333333333],floralwhite:[1,.9803921568627451,.9411764705882353],forestgreen:[.13333333333333333,.5450980392156862,.13333333333333333],gainsboro:[.8627450980392157,.8627450980392157,.8627450980392157],ghostwhite:[.9725490196078431,.9725490196078431,1],gold:[1,.8431372549019608,0],goldenrod:[.8549019607843137,.6470588235294118,.12549019607843137],greenyellow:[.6784313725490196,1,.1843137254901961],grey:[.5019607843137255,.5019607843137255,.5019607843137255],honeydew:[.9411764705882353,1,.9411764705882353],hotpink:[1,.4117647058823529,.7058823529411765],indianred:[.803921568627451,.3607843137254902,.3607843137254902],indigo:[.29411764705882354,0,.5098039215686274],ivory:[1,1,.9411764705882353],khaki:[.9411764705882353,.9019607843137255,.5490196078431373],lavender:[.9019607843137255,.9019607843137255,.9803921568627451],lavenderblush:[1,.9411764705882353,.9607843137254902],lawngreen:[.48627450980392156,.9882352941176471,0],lemonchiffon:[1,.9803921568627451,.803921568627451],lightblue:[.6784313725490196,.8470588235294118,.9019607843137255],lightcoral:[.9411764705882353,.5019607843137255,.5019607843137255],lightcyan:[.8784313725490196,1,1],lightgoldenrodyellow:[.9803921568627451,.9803921568627451,.8235294117647058],lightgray:[.8274509803921568,.8274509803921568,.8274509803921568],lightgreen:[.5647058823529412,.9333333333333333,.5647058823529412],lightgrey:[.8274509803921568,.8274509803921568,.8274509803921568],lightpink:[1,.7137254901960784,.7568627450980392],lightsalmon:[1,.6274509803921569,.47843137254901963],lightseagreen:[.12549019607843137,.6980392156862745,.6666666666666666],lightskyblue:[.5294117647058824,.807843137254902,.9803921568627451],lightslategray:[.4666666666666667,.5333333333333333,.6],lightslategrey:[.4666666666666667,.5333333333333333,.6],lightsteelblue:[.6901960784313725,.7686274509803922,.8705882352941177],lightyellow:[1,1,.8784313725490196],limegreen:[.19607843137254902,.803921568627451,.19607843137254902],linen:[.9803921568627451,.9411764705882353,.9019607843137255],magenta:[1,0,1],mediumaquamarine:[.4,.803921568627451,.6666666666666666],mediumblue:[0,0,.803921568627451],mediumorchid:[.7294117647058823,.3333333333333333,.8274509803921568],mediumpurple:[.5764705882352941,.4392156862745098,.8588235294117647],mediumseagreen:[.23529411764705882,.7019607843137254,.44313725490196076],mediumslateblue:[.4823529411764706,.40784313725490196,.9333333333333333],mediumspringgreen:[0,.9803921568627451,.6039215686274509],mediumturquoise:[.2823529411764706,.8196078431372549,.8],mediumvioletred:[.7803921568627451,.08235294117647059,.5215686274509804],midnightblue:[.09803921568627451,.09803921568627451,.4392156862745098],mintcream:[.9607843137254902,1,.9803921568627451],mistyrose:[1,.8941176470588236,.8823529411764706],moccasin:[1,.8941176470588236,.7098039215686275],navajowhite:[1,.8705882352941177,.6784313725490196],oldlace:[.9921568627450981,.9607843137254902,.9019607843137255],olivedrab:[.4196078431372549,.5568627450980392,.13725490196078433],orange:[1,.6470588235294118,0],orangered:[1,.27058823529411763,0],orchid:[.8549019607843137,.4392156862745098,.8392156862745098],palegoldenrod:[.9333333333333333,.9098039215686274,.6666666666666666],palegreen:[.596078431372549,.984313725490196,.596078431372549],paleturquoise:[.6862745098039216,.9333333333333333,.9333333333333333],palevioletred:[.8588235294117647,.4392156862745098,.5764705882352941],papayawhip:[1,.9372549019607843,.8352941176470589],peachpuff:[1,.8549019607843137,.7254901960784313],peru:[.803921568627451,.5215686274509804,.24705882352941178],pink:[1,.7529411764705882,.796078431372549],plum:[.8666666666666667,.6274509803921569,.8666666666666667],powderblue:[.6901960784313725,.8784313725490196,.9019607843137255],rosybrown:[.7372549019607844,.5607843137254902,.5607843137254902],royalblue:[.2549019607843137,.4117647058823529,.8823529411764706],saddlebrown:[.5450980392156862,.27058823529411763,.07450980392156863],salmon:[.9803921568627451,.5019607843137255,.4470588235294118],sandybrown:[.9568627450980393,.6431372549019608,.3764705882352941],seagreen:[.1803921568627451,.5450980392156862,.3411764705882353],seashell:[1,.9607843137254902,.9333333333333333],sienna:[.6274509803921569,.3215686274509804,.17647058823529413],skyblue:[.5294117647058824,.807843137254902,.9215686274509803],slateblue:[.41568627450980394,.35294117647058826,.803921568627451],slategray:[.4392156862745098,.5019607843137255,.5647058823529412],slategrey:[.4392156862745098,.5019607843137255,.5647058823529412],snow:[1,.9803921568627451,.9803921568627451],springgreen:[0,1,.4980392156862745],steelblue:[.27450980392156865,.5098039215686274,.7058823529411765],tan:[.8235294117647058,.7058823529411765,.5490196078431373],thistle:[.8470588235294118,.7490196078431373,.8470588235294118],tomato:[1,.38823529411764707,.2784313725490196],turquoise:[.25098039215686274,.8784313725490196,.8156862745098039],violet:[.9333333333333333,.5098039215686274,.9333333333333333],wheat:[.9607843137254902,.8705882352941177,.7019607843137254],whitesmoke:[.9607843137254902,.9607843137254902,.9607843137254902],yellowgreen:[.6039215686274509,.803921568627451,.19607843137254902]};e.exports=n}}),Udi=yt({"node_modules/@jscad/modeling/src/colors/colorNameToRgb.js"(t,e){var n=Hin(),o=i=>n[i.toLowerCase()];e.exports=o}}),Kdi=yt({"node_modules/@jscad/modeling/src/colors/hexToRgb.js"(t,e){var n=o=>{if(o=o.replace("#",""),o.length<6)throw new Error("the given notation must contain 3 or more hex values");const i=parseInt(o.substring(0,2),16)/255,r=parseInt(o.substring(2,4),16)/255,s=parseInt(o.substring(4,6),16)/255;if(o.length>=8){const a=parseInt(o.substring(6,8),16)/255;return[i,r,s,a]}return[i,r,s]};e.exports=n}}),Oin=yt({"node_modules/@jscad/modeling/src/colors/hueToColorComponent.js"(t,e){var n=(o,i,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?o+(i-o)*6*r:r<.5?i:r<.6666666666666666?o+(i-o)*(.6666666666666666-r)*6:o);e.exports=n}}),Vdi=yt({"node_modules/@jscad/modeling/src/colors/hslToRgb.js"(t,e){var n=ga(),o=Oin(),i=(...r)=>{if(r=n(r),r.length<3)throw new Error("values must contain H, S and L values");const s=r[0],a=r[1],A=r[2];let c=A,l=A,u=A;if(a!==0){const g=A<.5?A*(1+a):A+a-A*a,h=2*A-g;c=o(h,g,s+1/3),l=o(h,g,s),u=o(h,g,s-1/3)}if(r.length>3){const g=r[3];return[c,l,u,g]}return[c,l,u]};e.exports=i}}),zdi=yt({"node_modules/@jscad/modeling/src/colors/hsvToRgb.js"(t,e){var n=ga(),o=(...i)=>{if(i=n(i),i.length<3)throw new Error("values must contain H, S and V values");const r=i[0],s=i[1],a=i[2];let A=0,c=0,l=0;const u=Math.floor(r*6),g=r*6-u,h=a*(1-s),d=a*(1-g*s),p=a*(1-(1-g)*s);switch(u%6){case 0:A=a,c=p,l=h;break;case 1:A=d,c=a,l=h;break;case 2:A=h,c=a,l=p;break;case 3:A=h,c=d,l=a;break;case 4:A=p,c=h,l=a;break;case 5:A=a,c=h,l=d;break}if(i.length>3){const m=i[3];return[A,c,l,m]}return[A,c,l]};e.exports=o}}),Jdi=yt({"node_modules/@jscad/modeling/src/colors/rgbToHex.js"(t,e){var n=ga(),o=(...i)=>{if(i=n(i),i.length<3)throw new Error("values must contain R, G and B values");const r=i[0]*255,s=i[1]*255,a=i[2]*255;let A=`#${Number(16777216+r*65536+s*256+a).toString(16).substring(1,7)}`;return i.length>3&&(A=A+Number(i[3]*255).toString(16)),A};e.exports=o}}),Wdi=yt({"node_modules/@jscad/modeling/src/colors/rgbToHsl.js"(t,e){var n=ga(),o=(...i)=>{if(i=n(i),i.length<3)throw new Error("values must contain R, G and B values");const r=i[0],s=i[1],a=i[2],A=Math.max(r,s,a),c=Math.min(r,s,a);let l,u;const g=(A+c)/2;if(A===c)l=u=0;else{const h=A-c;switch(u=g>.5?h/(2-A-c):h/(A+c),A){case r:l=(s-a)/h+(s<a?6:0);break;case s:l=(a-r)/h+2;break;case a:l=(r-s)/h+4;break}l/=6}if(i.length>3){const h=i[3];return[l,u,g,h]}return[l,u,g]};e.exports=o}}),jdi=yt({"node_modules/@jscad/modeling/src/colors/rgbToHsv.js"(t,e){var n=ga(),o=(...i)=>{if(i=n(i),i.length<3)throw new Error("values must contain R, G and B values");const r=i[0],s=i[1],a=i[2],A=Math.max(r,s,a),c=Math.min(r,s,a);let l;const u=A,g=A-c,h=A===0?0:g/A;if(A===c)l=0;else{switch(A){case r:l=(s-a)/g+(s<a?6:0);break;case s:l=(a-r)/g+2;break;case a:l=(r-s)/g+4;break}l/=6}if(i.length>3){const d=i[3];return[l,h,u,d]}return[l,h,u]};e.exports=o}}),epe=yt({"node_modules/@jscad/modeling/src/colors/index.js"(t,e){e.exports={colorize:Ydi(),colorNameToRgb:Udi(),cssColors:Hin(),hexToRgb:Kdi(),hslToRgb:Vdi(),hsvToRgb:zdi(),hueToColorComponent:Oin(),rgbToHex:Jdi(),rgbToHsl:Wdi(),rgbToHsv:jdi()}}}),$di=yt({"node_modules/@jscad/modeling/src/curves/bezier/create.js"(t,e){var n=s=>{if(!Array.isArray(s))throw new Error("Bezier points must be a valid array/");if(s.length<2)throw new Error("Bezier points must contain at least 2 values.");const a=o(s);return{points:s,pointType:a,dimensions:a==="float_single"?0:s[0].length,permutations:i(s.length-1),tangentPermutations:i(s.length-2)}},o=function(s){let a=null;return s.forEach(A=>{let c="";if(Number.isFinite(A))c="float_single";else if(Array.isArray(A))A.forEach(l=>{if(!Number.isFinite(l))throw new Error("Bezier point values must all be numbers.")}),c="float_"+A.length;else throw new Error("Bezier points must all be numbers or arrays of number.");if(a==null)a=c;else if(a!==c)throw new Error("Bezier points must be either all numbers or all arrays of numbers of the same size.")}),a},i=function(s){const a=[];for(let A=0;A<=s;A++)a.push(r(s)/(r(A)*r(s-A)));return a},r=function(s){let a=1;for(let A=2;A<=s;A++)a*=A;return a};e.exports=n}}),Gin=yt({"node_modules/@jscad/modeling/src/curves/bezier/valueAt.js"(t,e){var n=(i,r)=>{if(i<0||i>1)throw new Error("Bezier valueAt() input must be between 0 and 1");if(r.pointType==="float_single")return o(r,r.points,i);{const s=[];for(let a=0;a<r.dimensions;a++){const A=[];for(let c=0;c<r.points.length;c++)A.push(r.points[c][a]);s.push(o(r,A,i))}return s}},o=function(i,r,s){const a=r.length-1;let A=0;for(let c=0;c<=a;c++)A+=i.permutations[c]*Math.pow(1-s,a-c)*Math.pow(s,c)*r[c];return A};e.exports=n}}),qdi=yt({"node_modules/@jscad/modeling/src/curves/bezier/tangentAt.js"(t,e){var n=(i,r)=>{if(i<0||i>1)throw new Error("Bezier tangentAt() input must be between 0 and 1");if(r.pointType==="float_single")return o(r,r.points,i);{const s=[];for(let a=0;a<r.dimensions;a++){const A=[];for(let c=0;c<r.points.length;c++)A.push(r.points[c][a]);s.push(o(r,A,i))}return s}},o=function(i,r,s){const a=r.length-1;let A=0;for(let c=0;c<a;c++){const l=a*(r[c+1]-r[c]);A+=i.tangentPermutations[c]*Math.pow(1-s,a-1-c)*Math.pow(s,c)*l}return A};e.exports=n}}),_Ve=yt({"node_modules/@jscad/modeling/src/curves/bezier/lengths.js"(t,e){var n=Gin(),o=(r,s)=>{let a=0;const A=[0];let c=n(0,s);for(let l=1;l<=r;l++){const u=n(l/r,s);a+=i(u,c),A.push(a),c=u}return A},i=(r,s)=>{if(Number.isFinite(r)&&Number.isFinite(s))return Math.abs(r-s);if(Array.isArray(r)&&Array.isArray(s)){if(r.length!==s.length)throw new Error("The operands must have the same number of dimensions.");let a=0;for(let A=0;A<r.length;A++)a+=(s[A]-r[A])*(s[A]-r[A]);return Math.sqrt(a)}else throw new Error("The operands must be of the same type, either number or array.")};e.exports=o}}),Xdi=yt({"node_modules/@jscad/modeling/src/curves/bezier/length.js"(t,e){var n=_Ve(),o=(i,r)=>n(i,r)[i];e.exports=o}}),Zdi=yt({"node_modules/@jscad/modeling/src/curves/bezier/arcLengthToT.js"(t,e){var n=_Ve(),o=(i,r)=>{const s={distance:0,segments:100},{distance:a,segments:A}=Object.assign({},s,i),c=n(A,r);let l=0,u=A;for(;l<=u;){const _=Math.floor(l+(u-l)/2),f=c[_]-a;if(f<0)l=_+1;else if(f>0)u=_-1;else{u=_;break}}const g=u;if(c[g]===a)return g/A;const h=c[g],p=c[g+1]-h,m=(a-h)/p;return(g+m)/A};e.exports=o}}),ehi=yt({"node_modules/@jscad/modeling/src/curves/bezier/index.js"(t,e){e.exports={create:$di(),valueAt:Gin(),tangentAt:qdi(),lengths:_Ve(),length:Xdi(),arcLengthToT:Zdi()}}}),thi=yt({"node_modules/@jscad/modeling/src/curves/index.js"(t,e){e.exports={bezier:ehi()}}}),tpe=yt({"node_modules/@jscad/modeling/src/maths/utils/area.js"(t,e){var n=o=>{let i=0;for(let r=0;r<o.length;r++){const s=(r+1)%o.length;i+=o[r][0]*o[s][1],i-=o[s][0]*o[r][1]}return i/2};e.exports=n}}),Yin=yt({"node_modules/@jscad/modeling/src/geometries/poly2/measureArea.js"(t,e){var n=tpe(),o=i=>n(i.vertices);e.exports=o}}),Uin=yt({"node_modules/@jscad/modeling/src/geometries/poly2/create.js"(t,e){var n=o=>((o===void 0||o.length<3)&&(o=[]),{vertices:o});e.exports=n}}),Kin=yt({"node_modules/@jscad/modeling/src/geometries/poly2/flip.js"(t,e){var n=Uin(),o=i=>{const r=i.vertices.slice().reverse();return n(r)};e.exports=o}}),nhi=yt({"node_modules/@jscad/modeling/src/geometries/poly2/arePointsInside.js"(t,e){var n=Yin(),o=Kin(),i=(s,a)=>{if(s.length===0)return 0;const A=a.vertices;return A.length<3?0:(n(a)<0&&(a=o(a)),s.reduce((l,u)=>l+r(u,A),0)===s.length?1:0)},r=(s,a)=>{const A=a.length,c=s[0],l=s[1];let u=a[A-1],g=a[0],h=u[1]>l,d=0,p=0;for(let m=A+1;--m;){const _=g[1]>l;if(h!==_){const f=u[0]>c,I=g[0]>c;(f&&I||g[0]-(g[1]-l)*(u[0]-g[0])/(u[1]-g[1])>=c)&&(d=!d)}h=_,u=g,g=a[++p]}return d};e.exports=i}}),fVe=yt({"node_modules/@jscad/modeling/src/geometries/poly2/index.js"(t,e){e.exports={arePointsInside:nhi(),create:Uin(),flip:Kin(),measureArea:Yin()}}}),IVe=yt({"node_modules/@jscad/modeling/src/geometries/index.js"(t,e){e.exports={geom2:Ya(),geom3:Ta(),path2:Au(),poly2:fVe(),poly3:XA()}}}),CVe=yt({"node_modules/@jscad/modeling/src/maths/line2/create.js"(t,e){var n=()=>[0,1,0];e.exports=n}}),ohi=yt({"node_modules/@jscad/modeling/src/maths/line2/clone.js"(t,e){var n=CVe(),o=i=>{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r};e.exports=o}}),yVe=yt({"node_modules/@jscad/modeling/src/maths/line2/direction.js"(t,e){var n=_A(),o=i=>{const r=n.normal(n.create(),i);return n.negate(r,r),r};e.exports=o}}),npe=yt({"node_modules/@jscad/modeling/src/maths/line2/origin.js"(t,e){var n=_A(),o=i=>n.scale(n.create(),i,i[2]);e.exports=o}}),ihi=yt({"node_modules/@jscad/modeling/src/maths/line2/closestPoint.js"(t,e){var n=_A(),o=yVe(),i=npe(),r=(s,a)=>{const A=i(s),c=o(s),l=n.subtract(n.create(),a,A),u=n.dot(l,c);return n.scale(l,c,u),n.add(l,l,A),l};e.exports=r}}),Vin=yt({"node_modules/@jscad/modeling/src/maths/line2/copy.js"(t,e){var n=(o,i)=>(o[0]=i[0],o[1]=i[1],o[2]=i[2],o);e.exports=n}}),rhi=yt({"node_modules/@jscad/modeling/src/maths/line2/distanceToPoint.js"(t,e){var n=_A(),o=(i,r)=>{let s=n.dot(r,i);return s=Math.abs(s-i[2]),s};e.exports=o}}),shi=yt({"node_modules/@jscad/modeling/src/maths/line2/equals.js"(t,e){var n=(o,i)=>o[0]===i[0]&&o[1]===i[1]&&o[2]===i[2];e.exports=n}}),zin=yt({"node_modules/@jscad/modeling/src/maths/line2/fromPoints.js"(t,e){var n=_A(),o=(i,r,s)=>{const a=n.subtract(n.create(),s,r);n.normal(a,a),n.normalize(a,a);const A=n.dot(r,a);return i[0]=a[0],i[1]=a[1],i[2]=A,i};e.exports=o}}),Jin=yt({"node_modules/@jscad/modeling/src/maths/line2/fromValues.js"(t,e){var n=CVe(),o=(i,r,s)=>{const a=n();return a[0]=i,a[1]=r,a[2]=s,a};e.exports=o}}),xVe=yt({"node_modules/@jscad/modeling/src/maths/utils/aboutEqualNormals.js"(t,e){var{NEPS:n}=mc(),o=(i,r)=>Math.abs(i[0]-r[0])<=n&&Math.abs(i[1]-r[1])<=n&&Math.abs(i[2]-r[2])<=n;e.exports=o}}),Win=yt({"node_modules/@jscad/modeling/src/maths/utils/interpolateBetween2DPointsForY.js"(t,e){var n=(o,i,r)=>{let s=r-o[1],a=i[1]-o[1];a<0&&(s=-s,a=-a);let A;return s<=0?A=0:s>=a?A=1:a<1e-10?A=.5:A=s/a,o[0]+A*(i[0]-o[0])};e.exports=n}}),jin=yt({"node_modules/@jscad/modeling/src/maths/utils/intersect.js"(t,e){var n=(o,i,r,s)=>{if(o[0]===i[0]&&o[1]===i[1]||r[0]===s[0]&&r[1]===s[1])return;const a=(s[1]-r[1])*(i[0]-o[0])-(s[0]-r[0])*(i[1]-o[1]);if(Math.abs(a)<Number.MIN_VALUE)return;const A=((s[0]-r[0])*(o[1]-r[1])-(s[1]-r[1])*(o[0]-r[0]))/a,c=((i[0]-o[0])*(o[1]-r[1])-(i[1]-o[1])*(o[0]-r[0]))/a;if(A<0||A>1||c<0||c>1)return;const l=o[0]+A*(i[0]-o[0]),u=o[1]+A*(i[1]-o[1]);return[l,u]};e.exports=n}}),ahi=yt({"node_modules/@jscad/modeling/src/maths/utils/solve2Linear.js"(t,e){var n=(o,i,r,s,a,A)=>{const l=1/(o*s-i*r);let u=a*s-i*A,g=-a*r+o*A;return u*=l,g*=l,[u,g]};e.exports=n}}),QX=yt({"node_modules/@jscad/modeling/src/maths/utils/index.js"(t,e){e.exports={aboutEqualNormals:xVe(),area:tpe(),cos:hI().cos,interpolateBetween2DPointsForY:Win(),intersect:jin(),sin:hI().sin,solve2Linear:ahi()}}}),Ahi=yt({"node_modules/@jscad/modeling/src/maths/line2/intersectPointOfLines.js"(t,e){var n=_A(),{solve2Linear:o}=QX(),i=(r,s)=>{const a=o(r[0],r[1],s[0],s[1],r[2],s[2]);return n.clone(a)};e.exports=i}}),chi=yt({"node_modules/@jscad/modeling/src/maths/line2/reverse.js"(t,e){var n=_A(),o=Vin(),i=Jin(),r=(s,a)=>{const A=n.negate(n.create(),a),c=-a[2];return o(s,i(A[0],A[1],c))};e.exports=r}}),lhi=yt({"node_modules/@jscad/modeling/src/maths/line2/toString.js"(t,e){var n=o=>`line2: (${o[0].toFixed(7)}, ${o[1].toFixed(7)}, ${o[2].toFixed(7)})`;e.exports=n}}),uhi=yt({"node_modules/@jscad/modeling/src/maths/line2/transform.js"(t,e){var n=_A(),o=zin(),i=npe(),r=yVe(),s=(a,A,c)=>{const l=i(A),u=r(A);return n.transform(l,l,c),n.transform(u,u,c),o(a,l,u)};e.exports=s}}),ghi=yt({"node_modules/@jscad/modeling/src/maths/line2/xAtY.js"(t,e){var n=npe(),o=(i,r)=>{let s=(i[2]-i[1]*r)/i[0];return Number.isNaN(s)&&(s=n(i)[0]),s};e.exports=o}}),EVe=yt({"node_modules/@jscad/modeling/src/maths/line2/index.js"(t,e){e.exports={clone:ohi(),closestPoint:ihi(),copy:Vin(),create:CVe(),direction:yVe(),distanceToPoint:rhi(),equals:shi(),fromPoints:zin(),fromValues:Jin(),intersectPointOfLines:Ahi(),origin:npe(),reverse:chi(),toString:lhi(),transform:uhi(),xAtY:ghi()}}}),$in=yt({"node_modules/@jscad/modeling/src/maths/line3/create.js"(t,e){var n=$r(),o=()=>[n.fromValues(0,0,0),n.fromValues(0,0,1)];e.exports=o}}),dhi=yt({"node_modules/@jscad/modeling/src/maths/line3/clone.js"(t,e){var n=$r(),o=$in(),i=r=>{const s=o();return n.copy(s[0],r[0]),n.copy(s[1],r[1]),s};e.exports=i}}),qin=yt({"node_modules/@jscad/modeling/src/maths/line3/closestPoint.js"(t,e){var n=$r(),o=(i,r)=>{const s=i[0],a=i[1],A=n.dot(n.subtract(n.create(),r,s),a),c=n.dot(a,a),l=A/c,u=n.scale(n.create(),a,l);return n.add(u,u,s),u};e.exports=o}}),hhi=yt({"node_modules/@jscad/modeling/src/maths/line3/copy.js"(t,e){var n=$r(),o=(i,r)=>(n.copy(i[0],r[0]),n.copy(i[1],r[1]),i);e.exports=o}}),phi=yt({"node_modules/@jscad/modeling/src/maths/line3/direction.js"(t,e){var n=o=>o[1];e.exports=n}}),mhi=yt({"node_modules/@jscad/modeling/src/maths/line3/distanceToPoint.js"(t,e){var n=$r(),o=qin(),i=(r,s)=>{const a=o(r,s),A=n.subtract(n.create(),s,a);return n.length(A)};e.exports=i}}),_hi=yt({"node_modules/@jscad/modeling/src/maths/line3/equals.js"(t,e){var n=$r(),o=(i,r)=>!(!n.equals(i[1],r[1])||!n.equals(i[0],r[0]));e.exports=o}}),vX=yt({"node_modules/@jscad/modeling/src/maths/line3/fromPointAndDirection.js"(t,e){var n=$r(),o=(i,r,s)=>{const a=n.normalize(n.create(),s);return n.copy(i[0],r),n.copy(i[1],a),i};e.exports=o}}),fhi=yt({"node_modules/@jscad/modeling/src/maths/line3/fromPlanes.js"(t,e){var n=$r(),{solve2Linear:o}=QX(),{EPS:i}=mc(),r=vX(),s=(a,A,c)=>{let l=n.cross(n.create(),A,c),u=n.length(l);if(u<i)throw new Error("parallel planes do not intersect");u=1/u,l=n.scale(l,l,u);const g=Math.abs(l[0]),h=Math.abs(l[1]),d=Math.abs(l[2]);let p,m;return g>=h&&g>=d?(m=o(A[1],A[2],c[1],c[2],A[3],c[3]),p=n.fromValues(0,m[0],m[1])):h>=g&&h>=d?(m=o(A[0],A[2],c[0],c[2],A[3],c[3]),p=n.fromValues(m[0],0,m[1])):(m=o(A[0],A[1],c[0],c[1],A[3],c[3]),p=n.fromValues(m[0],m[1],0)),r(a,p,l)};e.exports=s}}),Ihi=yt({"node_modules/@jscad/modeling/src/maths/line3/fromPoints.js"(t,e){var n=$r(),o=vX(),i=(r,s,a)=>{const A=n.subtract(n.create(),a,s);return o(r,s,A)};e.exports=i}}),Chi=yt({"node_modules/@jscad/modeling/src/maths/line3/intersectPointOfLineAndPlane.js"(t,e){var n=$r(),o=(i,r)=>{const s=r,a=r[3],A=i[0],c=i[1],l=(a-n.dot(s,A))/n.dot(s,c);return n.add(n.create(),A,n.scale(n.create(),c,l))};e.exports=o}}),yhi=yt({"node_modules/@jscad/modeling/src/maths/line3/origin.js"(t,e){var n=o=>o[0];e.exports=n}}),xhi=yt({"node_modules/@jscad/modeling/src/maths/line3/reverse.js"(t,e){var n=$r(),o=vX(),i=(r,s)=>{const a=n.clone(s[0]),A=n.negate(n.create(),s[1]);return o(r,a,A)};e.exports=i}}),Ehi=yt({"node_modules/@jscad/modeling/src/maths/line3/toString.js"(t,e){var n=o=>{const i=o[0],r=o[1];return`line3: point: (${i[0].toFixed(7)}, ${i[1].toFixed(7)}, ${i[2].toFixed(7)}) direction: (${r[0].toFixed(7)}, ${r[1].toFixed(7)}, ${r[2].toFixed(7)})`};e.exports=n}}),Bhi=yt({"node_modules/@jscad/modeling/src/maths/line3/transform.js"(t,e){var n=$r(),o=vX(),i=(r,s,a)=>{const A=s[0],c=s[1],l=n.add(n.create(),A,c),u=n.transform(n.create(),A,a),g=n.transform(l,l,a),h=n.subtract(g,g,u);return o(r,u,h)};e.exports=i}}),bhi=yt({"node_modules/@jscad/modeling/src/maths/line3/index.js"(t,e){e.exports={clone:dhi(),closestPoint:qin(),copy:hhi(),create:$in(),direction:phi(),distanceToPoint:mhi(),equals:_hi(),fromPlanes:fhi(),fromPointAndDirection:vX(),fromPoints:Ihi(),intersectPointOfLineAndPlane:Chi(),origin:yhi(),reverse:xhi(),toString:Ehi(),transform:Bhi()}}}),Shi=yt({"node_modules/@jscad/modeling/src/maths/index.js"(t,e){e.exports={constants:mc(),line2:EVe(),line3:bhi(),mat4:Du(),plane:S6(),utils:QX(),vec2:_A(),vec3:$r(),vec4:Rin()}}}),Xin=yt({"node_modules/@jscad/modeling/src/measurements/measureArea.js"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=XA(),a=new WeakMap,A=()=>0,c=g=>{let h=a.get(g);return h||(h=o.toSides(g).reduce((p,m)=>p+(m[0][0]*m[1][1]-m[0][1]*m[1][0]),0),h*=.5,a.set(g,h),h)},l=g=>{let h=a.get(g);return h||(h=i.toPolygons(g).reduce((p,m)=>p+s.measureArea(m),0),a.set(g,h),h)},u=(...g)=>{if(g=n(g),g.length===0)throw new Error("wrong number of arguments");const h=g.map(d=>r.isA(d)?A():o.isA(d)?c(d):i.isA(d)?l(d):0);return h.length===1?h[0]:h};e.exports=u}}),Qhi=yt({"node_modules/@jscad/modeling/src/measurements/measureAggregateArea.js"(t,e){var n=ga(),o=Xin(),i=(...r)=>{if(r=n(r),r.length===0)throw new Error("measureAggregateArea: no geometries supplied");const s=o(r);return r.length===1?s:s.reduce((A,c)=>A+c,0)};e.exports=i}}),oT=yt({"node_modules/@jscad/modeling/src/measurements/measureBoundingBox.js"(t,e){var n=ga(),o=_A(),i=$r(),r=Ya(),s=Ta(),a=Au(),A=XA(),c=new WeakMap,l=d=>{let p=c.get(d);if(p)return p;const m=a.toPoints(d);let _;m.length===0?_=o.create():_=o.clone(m[0]);let f=o.clone(_);return m.forEach(I=>{o.min(_,_,I),o.max(f,f,I)}),_=[_[0],_[1],0],f=[f[0],f[1],0],p=[_,f],c.set(d,p),p},u=d=>{let p=c.get(d);if(p)return p;const m=r.toPoints(d);let _;m.length===0?_=o.create():_=o.clone(m[0]);let f=o.clone(_);return m.forEach(I=>{o.min(_,_,I),o.max(f,f,I)}),_=[_[0],_[1],0],f=[f[0],f[1],0],p=[_,f],c.set(d,p),p},g=d=>{let p=c.get(d);if(p)return p;const m=s.toPolygons(d);let _=i.create();if(m.length>0){const I=A.toPoints(m[0]);i.copy(_,I[0])}let f=i.clone(_);return m.forEach(I=>{A.toPoints(I).forEach(C=>{i.min(_,_,C),i.max(f,f,C)})}),_=[_[0],_[1],_[2]],f=[f[0],f[1],f[2]],p=[_,f],c.set(d,p),p},h=(...d)=>{if(d=n(d),d.length===0)throw new Error("wrong number of arguments");const p=d.map(m=>a.isA(m)?l(m):r.isA(m)?u(m):s.isA(m)?g(m):[[0,0,0],[0,0,0]]);return p.length===1?p[0]:p};e.exports=h}}),BVe=yt({"node_modules/@jscad/modeling/src/measurements/measureAggregateBoundingBox.js"(t,e){var n=ga(),o=gin(),i=uin(),r=oT(),s=(...a)=>{if(a=n(a),a.length===0)throw new Error("measureAggregateBoundingBox: no geometries supplied");const A=r(a);if(a.length===1)return A;const c=[[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE],[-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE]];return A.reduce((l,u)=>(l=[o(l[0],l[0],u[0]),i(l[1],l[1],u[1])],l),c)};e.exports=s}}),Zin=yt({"node_modules/@jscad/modeling/src/measurements/calculateEpsilonFromBounds.js"(t,e){var{EPS:n}=mc(),o=(i,r)=>{let s=0;for(let a=0;a<r;a++)s+=i[1][a]-i[0][a];return n*s/r};e.exports=o}}),vhi=yt({"node_modules/@jscad/modeling/src/measurements/measureAggregateEpsilon.js"(t,e){var n=ga(),o=BVe(),i=Zin(),{geom2:r,geom3:s,path2:a}=IVe(),A=(...c)=>{if(c=n(c),c.length===0)throw new Error("measureAggregateEpsilon: no geometries supplied");const l=o(c);let u=0;return u=c.reduce((g,h)=>a.isA(h)||r.isA(h)?Math.max(g,2):s.isA(h)?Math.max(g,3):0,u),i(l,u)};e.exports=A}}),ern=yt({"node_modules/@jscad/modeling/src/measurements/measureVolume.js"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=XA(),a=new WeakMap,A=()=>0,c=()=>0,l=g=>{let h=a.get(g);return h||(h=i.toPolygons(g).reduce((p,m)=>p+s.measureSignedVolume(m),0),a.set(g,h),h)},u=(...g)=>{if(g=n(g),g.length===0)throw new Error("wrong number of arguments");const h=g.map(d=>r.isA(d)?A():o.isA(d)?c():i.isA(d)?l(d):0);return h.length===1?h[0]:h};e.exports=u}}),whi=yt({"node_modules/@jscad/modeling/src/measurements/measureAggregateVolume.js"(t,e){var n=ga(),o=ern(),i=(...r)=>{if(r=n(r),r.length===0)throw new Error("measureAggregateVolume: no geometries supplied");const s=o(r);return r.length===1?s:s.reduce((A,c)=>A+c,0)};e.exports=i}}),Phi=yt({"node_modules/@jscad/modeling/src/measurements/measureBoundingSphere.js"(t,e){var n=ga(),o=_A(),i=$r(),r=Ya(),s=Ta(),a=Au(),A=XA(),c=new WeakMap,l=d=>{let p=c.get(d);if(p!==void 0)return p;const m=i.create();let _=0;const f=a.toPoints(d);if(f.length>0){let I=0;const C=i.create();f.forEach(y=>{i.add(m,m,i.fromVec2(C,y,0)),I++}),i.scale(m,m,1/I),f.forEach(y=>{_=Math.max(_,o.squaredDistance(m,y))}),_=Math.sqrt(_)}return p=[m,_],c.set(d,p),p},u=d=>{let p=c.get(d);if(p!==void 0)return p;const m=i.create();let _=0;const f=r.toSides(d);if(f.length>0){let I=0;const C=i.create();f.forEach(y=>{i.add(m,m,i.fromVec2(C,y[0],0)),I++}),i.scale(m,m,1/I),f.forEach(y=>{_=Math.max(_,o.squaredDistance(m,y[0]))}),_=Math.sqrt(_)}return p=[m,_],c.set(d,p),p},g=d=>{let p=c.get(d);if(p!==void 0)return p;const m=i.create();let _=0;const f=s.toPolygons(d);if(f.length>0){let I=0;f.forEach(C=>{A.toPoints(C).forEach(y=>{i.add(m,m,y),I++})}),i.scale(m,m,1/I),f.forEach(C=>{A.toPoints(C).forEach(y=>{_=Math.max(_,i.squaredDistance(m,y))})}),_=Math.sqrt(_)}return p=[m,_],c.set(d,p),p},h=(...d)=>{d=n(d);const p=d.map(m=>a.isA(m)?l(m):r.isA(m)?u(m):s.isA(m)?g(m):[[0,0,0],0]);return p.length===1?p[0]:p};e.exports=h}}),Mhi=yt({"node_modules/@jscad/modeling/src/measurements/measureCenter.js"(t,e){var n=ga(),o=oT(),i=(...r)=>{r=n(r);const s=r.map(a=>{const A=o(a);return[A[0][0]+(A[1][0]-A[0][0])/2,A[0][1]+(A[1][1]-A[0][1])/2,A[0][2]+(A[1][2]-A[0][2])/2]});return s.length===1?s[0]:s};e.exports=i}}),Dhi=yt({"node_modules/@jscad/modeling/src/measurements/measureCenterOfMass.js"(t,e){var n=ga(),o=$r(),i=Ya(),r=Ta(),s=new WeakMap,a=l=>{let u=s.get(l);if(u!==void 0)return u;const g=i.toSides(l);let h=0,d=0,p=0;if(g.length>0){for(let _=0;_<g.length;_++){const f=g[_][0],I=g[_][1],C=f[0]*I[1]-f[1]*I[0];h+=C,d+=(f[0]+I[0])*C,p+=(f[1]+I[1])*C}h/=2;const m=1/(h*6);d*=m,p*=m}return u=o.fromValues(d,p,0),s.set(l,u),u},A=l=>{let u=s.get(l);if(u!==void 0)return u;u=o.create();const g=r.toPolygons(l);if(g.length===0)return u;let h=0;const d=o.create();return g.forEach(p=>{const m=p.vertices;for(let _=0;_<m.length-2;_++){o.cross(d,m[_+1],m[_+2]);const f=o.dot(m[0],d)/6;h+=f,o.add(d,m[0],m[_+1]),o.add(d,d,m[_+2]);const I=o.scale(d,d,1/4*f);o.add(u,u,I)}}),o.scale(u,u,1/h),s.set(l,u),u},c=(...l)=>{l=n(l);const u=l.map(g=>i.isA(g)?a(g):r.isA(g)?A(g):[0,0,0]);return u.length===1?u[0]:u};e.exports=c}}),Nhi=yt({"node_modules/@jscad/modeling/src/measurements/measureDimensions.js"(t,e){var n=ga(),o=oT(),i=(...r)=>{r=n(r);const s=r.map(a=>{const A=o(a);return[A[1][0]-A[0][0],A[1][1]-A[0][1],A[1][2]-A[0][2]]});return s.length===1?s[0]:s};e.exports=i}}),gP=yt({"node_modules/@jscad/modeling/src/measurements/measureEpsilon.js"(t,e){var n=ga(),{geom2:o,geom3:i,path2:r}=IVe(),s=Zin(),a=oT(),A=g=>s(a(g),2),c=g=>s(a(g),2),l=g=>s(a(g),3),u=(...g)=>{if(g=n(g),g.length===0)throw new Error("wrong number of arguments");const h=g.map(d=>r.isA(d)?A(d):o.isA(d)?c(d):i.isA(d)?l(d):0);return h.length===1?h[0]:h};e.exports=u}}),Rhi=yt({"node_modules/@jscad/modeling/src/measurements/index.js"(t,e){e.exports={measureAggregateArea:Qhi(),measureAggregateBoundingBox:BVe(),measureAggregateEpsilon:vhi(),measureAggregateVolume:whi(),measureArea:Xin(),measureBoundingBox:oT(),measureBoundingSphere:Phi(),measureCenter:Mhi(),measureCenterOfMass:Dhi(),measureDimensions:Nhi(),measureEpsilon:gP(),measureVolume:ern()}}}),lf=yt({"node_modules/@jscad/modeling/src/primitives/commonChecks.js"(t,e){var n=(r,s)=>Array.isArray(r)&&r.length>=s?r.every(a=>Number.isFinite(a)):!1,o=(r,s)=>Number.isFinite(r)&&r>s,i=(r,s)=>Number.isFinite(r)&&r>=s;e.exports={isNumberArray:n,isGT:o,isGTE:i}}}),Thi=yt({"node_modules/@jscad/modeling/src/primitives/arc.js"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=Au(),{isGT:s,isGTE:a,isNumberArray:A}=lf(),c=l=>{const u={center:[0,0],radius:1,startAngle:0,endAngle:o,makeTangent:!1,segments:32};let{center:g,radius:h,startAngle:d,endAngle:p,makeTangent:m,segments:_}=Object.assign({},u,l);if(!A(g,2))throw new Error("center must be an array of X and Y values");if(!s(h,0))throw new Error("radius must be greater than zero");if(!a(d,0))throw new Error("startAngle must be positive");if(!a(p,0))throw new Error("endAngle must be positive");if(!a(_,4))throw new Error("segments must be four or more");d=d%o,p=p%o;let f=o;d<p&&(f=p-d),d>p&&(f=p+(o-d));const I=Math.acos((h*h+h*h-n*n)/(2*h*h)),C=i.clone(g);let y;const x=[];if(f<I)y=i.fromAngleRadians(i.create(),d),i.scale(y,y,h),i.add(y,y,C),x.push(y);else{const E=Math.floor(_*(Math.abs(f)/o));let B=E*.5/f;B>.25&&(B=.25);const S=m?E+2:E;for(let Q=0;Q<=S;Q++){let w=Q;m&&(w=(Q-1)*(E-2*B)/E+B,w<0&&(w=0),w>E&&(w=E));const M=d+w*(f/E);y=i.fromAngleRadians(i.create(),M),i.scale(y,y,h),i.add(y,y,C),x.push(y)}}return r.fromPoints({closed:!1},x)};e.exports=c}}),trn=yt({"node_modules/@jscad/modeling/src/primitives/ellipse.js"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=Ya(),{sin:s,cos:a}=hI(),{isGTE:A,isNumberArray:c}=lf(),l=u=>{const g={center:[0,0],radius:[1,1],startAngle:0,endAngle:o,segments:32};let{center:h,radius:d,startAngle:p,endAngle:m,segments:_}=Object.assign({},g,u);if(!c(h,2))throw new Error("center must be an array of X and Y values");if(!c(d,2))throw new Error("radius must be an array of X and Y values");if(!d.every(B=>B>=0))throw new Error("radius values must be positive");if(!A(p,0))throw new Error("startAngle must be positive");if(!A(m,0))throw new Error("endAngle must be positive");if(!A(_,3))throw new Error("segments must be three or more");if(d[0]===0||d[1]===0)return r.create();p=p%o,m=m%o;let f=o;p<m&&(f=m-p),p>m&&(f=m+(o-p));const I=Math.min(d[0],d[1]),C=Math.acos((I*I+I*I-n*n)/(2*I*I));if(f<C)throw new Error("startAngle and endAngle do not define a significant rotation");_=Math.floor(_*(f/o));const y=i.clone(h),x=f/_,E=[];_=f<o?_+1:_;for(let B=0;B<_;B++){const S=x*B+p,Q=i.fromValues(d[0]*a(S),d[1]*s(S));i.add(Q,y,Q),E.push(Q)}return f<o&&E.push(y),r.fromPoints(E)};e.exports=l}}),nrn=yt({"node_modules/@jscad/modeling/src/primitives/circle.js"(t,e){var{TAU:n}=mc(),o=trn(),{isGTE:i}=lf(),r=s=>{const a={center:[0,0],radius:1,startAngle:0,endAngle:n,segments:32};let{center:A,radius:c,startAngle:l,endAngle:u,segments:g}=Object.assign({},a,s);if(!i(c,0))throw new Error("radius must be positive");return c=[c,c],o({center:A,radius:c,startAngle:l,endAngle:u,segments:g})};e.exports=r}}),bVe=yt({"node_modules/@jscad/modeling/src/primitives/cuboid.js"(t,e){var n=Ta(),o=XA(),{isNumberArray:i}=lf(),r=s=>{const a={center:[0,0,0],size:[2,2,2]},{center:A,size:c}=Object.assign({},a,s);if(!i(A,3))throw new Error("center must be an array of X, Y and Z values");if(!i(c,3))throw new Error("size must be an array of width, depth and height values");if(!c.every(u=>u>=0))throw new Error("size values must be positive");return c[0]===0||c[1]===0||c[2]===0?n.create():n.create([[[0,4,6,2],[-1,0,0]],[[1,3,7,5],[1,0,0]],[[0,1,5,4],[0,-1,0]],[[2,6,7,3],[0,1,0]],[[0,2,3,1],[0,0,-1]],[[4,5,7,6],[0,0,1]]].map(u=>{const g=u[0].map(h=>[A[0]+c[0]/2*(2*!!(h&1)-1),A[1]+c[1]/2*(2*!!(h&2)-1),A[2]+c[2]/2*(2*!!(h&4)-1)]);return o.create(g)}))};e.exports=r}}),khi=yt({"node_modules/@jscad/modeling/src/primitives/cube.js"(t,e){var n=bVe(),{isGTE:o}=lf(),i=r=>{const s={center:[0,0,0],size:2};let{center:a,size:A}=Object.assign({},s,r);if(!o(A,0))throw new Error("size must be positive");return A=[A,A,A],n({center:a,size:A})};e.exports=i}}),orn=yt({"node_modules/@jscad/modeling/src/primitives/cylinderElliptic.js"(t,e){var{EPS:n,TAU:o}=mc(),i=$r(),r=Ta(),s=XA(),{sin:a,cos:A}=hI(),{isGT:c,isGTE:l,isNumberArray:u}=lf(),g=h=>{const d={center:[0,0,0],height:2,startRadius:[1,1],startAngle:0,endRadius:[1,1],endAngle:o,segments:32};let{center:p,height:m,startRadius:_,startAngle:f,endRadius:I,endAngle:C,segments:y}=Object.assign({},d,h);if(!u(p,3))throw new Error("center must be an array of X, Y and Z values");if(!c(m,0))throw new Error("height must be greater then zero");if(!u(_,2))throw new Error("startRadius must be an array of X and Y values");if(!_.every(J=>J>=0))throw new Error("startRadius values must be positive");if(!u(I,2))throw new Error("endRadius must be an array of X and Y values");if(!I.every(J=>J>=0))throw new Error("endRadius values must be positive");if(I.every(J=>J===0)&&_.every(J=>J===0))throw new Error("at least one radius must be positive");if(!l(f,0))throw new Error("startAngle must be positive");if(!l(C,0))throw new Error("endAngle must be positive");if(!l(y,4))throw new Error("segments must be four or more");f=f%o,C=C%o;let x=o;f<C&&(x=C-f),f>C&&(x=C+(o-f));const E=Math.min(_[0],_[1],I[0],I[1]),B=Math.acos((E*E+E*E-n*n)/(2*E*E));if(x<B)throw new Error("startAngle and endAngle do not define a significant rotation");const S=Math.floor(y*(x/o)),Q=i.fromValues(0,0,-(m/2)),w=i.fromValues(0,0,m/2),M=i.subtract(i.create(),w,Q),k=i.fromValues(1,0,0),R=i.fromValues(0,1,0),F=i.create(),O=i.create(),U=i.create(),Y=(J,oe,ie)=>{const ne=oe*x+f;return i.scale(F,k,ie[0]*A(ne)),i.scale(O,R,ie[1]*a(ne)),i.add(F,F,O),i.scale(U,M,J),i.add(U,U,Q),i.add(i.create(),F,U)},W=(...J)=>{const oe=J.map(ie=>i.add(i.create(),ie,p));return s.create(oe)},te=[];for(let J=0;J<S;J++){const oe=J/S;let ie=(J+1)/S;x===o&&J===S-1&&(ie=0),I[0]===_[0]&&I[1]===_[1]?(te.push(W(Q,Y(0,ie,I),Y(0,oe,I))),te.push(W(Y(0,ie,I),Y(1,ie,I),Y(1,oe,I),Y(0,oe,I))),te.push(W(w,Y(1,oe,I),Y(1,ie,I)))):(_[0]>0&&_[1]>0&&te.push(W(Q,Y(0,ie,_),Y(0,oe,_))),(_[0]>0||_[1]>0)&&te.push(W(Y(0,oe,_),Y(0,ie,_),Y(1,oe,I))),I[0]>0&&I[1]>0&&te.push(W(w,Y(1,oe,I),Y(1,ie,I))),(I[0]>0||I[1]>0)&&te.push(W(Y(1,oe,I),Y(0,ie,_),Y(1,ie,I))))}return x<o&&(te.push(W(Q,Y(0,0,_),w)),te.push(W(Y(0,0,_),Y(1,0,I),w)),te.push(W(Q,w,Y(0,1,_))),te.push(W(Y(0,1,_),w,Y(1,1,I)))),r.create(te)};e.exports=g}}),irn=yt({"node_modules/@jscad/modeling/src/primitives/cylinder.js"(t,e){var n=Ta(),o=orn(),{isGTE:i}=lf(),r=s=>{const a={center:[0,0,0],height:2,radius:1,segments:32},{center:A,height:c,radius:l,segments:u}=Object.assign({},a,s);if(!i(l,0))throw new Error("radius must be positive");return c===0||l===0?n.create():o({center:A,height:c,startRadius:[l,l],endRadius:[l,l],segments:u})};e.exports=r}}),rrn=yt({"node_modules/@jscad/modeling/src/primitives/ellipsoid.js"(t,e){var{TAU:n}=mc(),o=$r(),i=Ta(),r=XA(),{sin:s,cos:a}=hI(),{isGTE:A,isNumberArray:c}=lf(),l=u=>{const g={center:[0,0,0],radius:[1,1,1],segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]},{center:h,radius:d,segments:p,axes:m}=Object.assign({},g,u);if(!c(h,3))throw new Error("center must be an array of X, Y and Z values");if(!c(d,3))throw new Error("radius must be an array of X, Y and Z values");if(!d.every(S=>S>=0))throw new Error("radius values must be positive");if(!A(p,4))throw new Error("segments must be four or more");if(d[0]===0||d[1]===0||d[2]===0)return i.create();const _=o.scale(o.create(),o.normalize(o.create(),m[0]),d[0]),f=o.scale(o.create(),o.normalize(o.create(),m[1]),d[1]),I=o.scale(o.create(),o.normalize(o.create(),m[2]),d[2]),C=Math.round(p/4);let y;const x=[],E=o.create(),B=o.create();for(let S=0;S<=p;S++){const Q=n*S/p,w=o.add(o.create(),o.scale(E,_,a(Q)),o.scale(B,f,s(Q)));if(S>0){let M,k;for(let R=0;R<=C;R++){const F=n/4*R/C,O=a(F),U=s(F);if(R>0){let Y=[],W;W=o.subtract(o.create(),o.scale(E,y,M),o.scale(B,I,k)),Y.push(o.add(W,W,h)),W=o.subtract(o.create(),o.scale(E,w,M),o.scale(B,I,k)),Y.push(o.add(W,W,h)),R<C&&(W=o.subtract(o.create(),o.scale(E,w,O),o.scale(B,I,U)),Y.push(o.add(W,W,h))),W=o.subtract(o.create(),o.scale(E,y,O),o.scale(B,I,U)),Y.push(o.add(W,W,h)),x.push(r.create(Y)),Y=[],W=o.add(o.create(),o.scale(E,y,M),o.scale(B,I,k)),Y.push(o.add(o.create(),h,W)),W=o.add(W,o.scale(E,w,M),o.scale(B,I,k)),Y.push(o.add(o.create(),h,W)),R<C&&(W=o.add(W,o.scale(E,w,O),o.scale(B,I,U)),Y.push(o.add(o.create(),h,W))),W=o.add(W,o.scale(E,y,O),o.scale(B,I,U)),Y.push(o.add(o.create(),h,W)),Y.reverse(),x.push(r.create(Y))}M=O,k=U}}y=w}return i.create(x)};e.exports=l}}),srn=yt({"node_modules/@jscad/modeling/src/primitives/polyhedron.js"(t,e){var n=Ta(),o=XA(),{isNumberArray:i}=lf(),r=s=>{const a={points:[],faces:[],colors:void 0,orientation:"outward"},{points:A,faces:c,colors:l,orientation:u}=Object.assign({},a,s);if(!(Array.isArray(A)&&Array.isArray(c)))throw new Error("points and faces must be arrays");if(A.length<3)throw new Error("three or more points are required");if(c.length<1)throw new Error("one or more faces are required");if(l){if(!Array.isArray(l))throw new Error("colors must be an array");if(l.length!==c.length)throw new Error("faces and colors must have the same length")}A.forEach((h,d)=>{if(!i(h,3))throw new Error(`point ${d} must be an array of X, Y, Z values`)}),c.forEach((h,d)=>{if(h.length<3)throw new Error(`face ${d} must contain 3 or more indexes`);if(!i(h,h.length))throw new Error(`face ${d} must be an array of numbers`)}),u!=="outward"&&c.forEach(h=>h.reverse());const g=c.map((h,d)=>{const p=o.create(h.map(m=>A[m]));return l&&l[d]&&(p.color=l[d]),p});return n.create(g)};e.exports=r}}),Fhi=yt({"node_modules/@jscad/modeling/src/primitives/geodesicSphere.js"(t,e){var n=Du(),o=$r(),i=Ta(),r=srn(),{isGTE:s}=lf(),a=A=>{const c={radius:1,frequency:6};let{radius:l,frequency:u}=Object.assign({},c,A);if(!s(l,0))throw new Error("radius must be positive");if(!s(u,6))throw new Error("frequency must be six or more");if(l===0)return i.create();u=Math.floor(u/6);const g=[[.850651,0,-.525731],[.850651,-0,.525731],[-.850651,-0,.525731],[-.850651,0,-.525731],[0,-.525731,.850651],[0,.525731,.850651],[0,.525731,-.850651],[0,-.525731,-.850651],[-.525731,-.850651,-0],[.525731,-.850651,-0],[.525731,.850651,0],[-.525731,.850651,0]],h=[[0,9,1],[1,10,0],[6,7,0],[10,6,0],[7,9,0],[5,1,4],[4,1,9],[5,10,1],[2,8,3],[3,11,2],[2,5,4],[4,8,2],[2,11,5],[3,7,6],[6,11,3],[8,7,3],[9,8,4],[11,10,5],[10,11,6],[8,9,7]],d=(C,y,x)=>{const E=C[0],B=C[1],S=C[2];let Q=x;const w=[],M=[];for(let k=0;k<y;k++)for(let R=0;R<y-k;R++){const F=k/y,O=(k+1)/y,U=R/(y-k),Y=(R+1)/(y-k),W=y-k-1?R/(y-k-1):1,te=[];te[0]=p(p(E,B,U),S,F),te[1]=p(p(E,B,Y),S,F),te[2]=p(p(E,B,W),S,O);for(let j=0;j<3;j++){const J=o.length(te[j]);for(let oe=0;oe<3;oe++)te[j][oe]/=J}if(w.push(te[0],te[1],te[2]),M.push([Q,Q+1,Q+2]),Q+=3,R<y-k-1){const j=y-k-1?(R+1)/(y-k-1):1;te[0]=p(p(E,B,Y),S,F),te[1]=p(p(E,B,j),S,O),te[2]=p(p(E,B,W),S,O);for(let J=0;J<3;J++){const oe=o.length(te[J]);for(let ie=0;ie<3;ie++)te[J][ie]/=oe}w.push(te[0],te[1],te[2]),M.push([Q,Q+1,Q+2]),Q+=3}}return{points:w,triangles:M,offset:Q}},p=(C,y,x)=>{const E=1-x,B=[];for(let S=0;S<3;S++)B[S]=C[S]*E+y[S]*x;return B};let m=[],_=[],f=0;for(let C=0;C<h.length;C++){const y=d([g[h[C][0]],g[h[C][1]],g[h[C][2]]],u,f);m=m.concat(y.points),_=_.concat(y.triangles),f=y.offset}let I=r({points:m,faces:_,orientation:"inward"});return l!==1&&(I=i.transform(n.fromScaling(n.create(),[l,l,l]),I)),I};e.exports=a}}),Lhi=yt({"node_modules/@jscad/modeling/src/primitives/line.js"(t,e){var n=Au(),o=i=>{if(!Array.isArray(i))throw new Error("points must be an array");return n.fromPoints({},i)};e.exports=o}}),Hhi=yt({"node_modules/@jscad/modeling/src/primitives/polygon.js"(t,e){var n=Ya(),o=i=>{const r={points:[],paths:[],orientation:"counterclockwise"},{points:s,paths:a,orientation:A}=Object.assign({},r,i);if(!(Array.isArray(s)&&Array.isArray(a)))throw new Error("points and paths must be arrays");let c=s;Array.isArray(s[0])&&(Array.isArray(s[0][0])||(c=[s])),c.forEach((d,p)=>{if(!Array.isArray(d))throw new Error("list of points "+p+" must be an array");if(d.length<3)throw new Error("list of points "+p+" must contain three or more points");d.forEach((m,_)=>{if(!Array.isArray(m))throw new Error("list of points "+p+", point "+_+" must be an array");if(m.length<2)throw new Error("list of points "+p+", point "+_+" must contain by X and Y values")})});let l=a;if(a.length===0){let d=0;l=c.map(p=>p.map(m=>d++))}const u=[];c.forEach(d=>d.forEach(p=>u.push(p)));let g=[];l.forEach(d=>{const p=d.map(_=>u[_]),m=n.fromPoints(p);g=g.concat(n.toSides(m))});let h=n.create(g);return A==="clockwise"&&(h=n.reverse(h)),h};e.exports=o}}),SVe=yt({"node_modules/@jscad/modeling/src/primitives/rectangle.js"(t,e){var n=_A(),o=Ya(),{isNumberArray:i}=lf(),r=s=>{const a={center:[0,0],size:[2,2]},{center:A,size:c}=Object.assign({},a,s);if(!i(A,2))throw new Error("center must be an array of X and Y values");if(!i(c,2))throw new Error("size must be an array of X and Y values");if(!c.every(h=>h>=0))throw new Error("size values must be positive");if(c[0]===0||c[1]===0)return o.create();const l=[c[0]/2,c[1]/2],u=[l[0],-l[1]],g=[n.subtract(n.create(),A,l),n.add(n.create(),A,u),n.add(n.create(),A,l),n.subtract(n.create(),A,u)];return o.fromPoints(g)};e.exports=r}}),Ohi=yt({"node_modules/@jscad/modeling/src/primitives/roundedCuboid.js"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=$r(),s=Ta(),a=XA(),{sin:A,cos:c}=hI(),{isGTE:l,isNumberArray:u}=lf(),g=bVe(),h=(f,I,C,y,x,E)=>{const B=o/4*x/y,S=c(B),Q=A(B),w=y-x;let M=C*S,k=I[2]-(C-C*Q);E||(k=C-C*Q-I[2]),M=M>n?M:0;const R=r.add(r.create(),f,[I[0]-C,I[1]-C,k]),F=r.add(r.create(),f,[C-I[0],I[1]-C,k]),O=r.add(r.create(),f,[C-I[0],C-I[1],k]),U=r.add(r.create(),f,[I[0]-C,C-I[1],k]),Y=[],W=[],te=[],j=[];for(let J=0;J<=w;J++){const oe=w>0?o/4*J/w:0,ie=i.fromAngleRadians(i.create(),oe);i.scale(ie,ie,M);const ne=r.fromVec2(r.create(),ie);Y.push(r.add(r.create(),R,ne)),r.rotateZ(ne,ne,[0,0,0],o/4),W.push(r.add(r.create(),F,ne)),r.rotateZ(ne,ne,[0,0,0],o/4),te.push(r.add(r.create(),O,ne)),r.rotateZ(ne,ne,[0,0,0],o/4),j.push(r.add(r.create(),U,ne))}return E?[Y,W,te,j]:(Y.reverse(),W.reverse(),te.reverse(),j.reverse(),[j,te,W,Y])},d=(f,I)=>{const C=[];for(let y=0;y<f.length;y++){const x=f[y],E=I[y];for(let B=0;B<x.length-1;B++)C.push(a.create([x[B],x[B+1],E[B]])),B<E.length-1&&C.push(a.create([E[B],x[B+1],E[B+1]]))}return C},p=(f,I)=>{const C=[];for(let y=0;y<f.length;y++){let x=f[y],E=I[y];const B=x[x.length-1],S=E[E.length-1],Q=(y+1)%f.length;x=f[Q],E=I[Q];const w=x[0],M=E[0];C.push(a.create([B,w,M,S]))}return C},m=(f,I)=>{f=[f[3],f[2],f[1],f[0]],f=f.map(E=>E.slice().reverse());const C=[];f.forEach(E=>{E.forEach(B=>C.push(B))});const y=[];I.forEach(E=>{E.forEach(B=>y.push(B))});const x=[];for(let E=0;E<y.length;E++){const B=(E+1)%y.length;x.push(a.create([C[E],C[B],y[B],y[E]]))}return x},_=f=>{const I={center:[0,0,0],size:[2,2,2],roundRadius:.2,segments:32};let{center:C,size:y,roundRadius:x,segments:E}=Object.assign({},I,f);if(!u(C,3))throw new Error("center must be an array of X, Y and Z values");if(!u(y,3))throw new Error("size must be an array of X, Y and Z values");if(!y.every(w=>w>=0))throw new Error("size values must be positive");if(!l(x,0))throw new Error("roundRadius must be positive");if(!l(E,4))throw new Error("segments must be four or more");if(y[0]===0||y[1]===0||y[2]===0)return s.create();if(x===0)return g({center:C,size:y});if(y=y.map(w=>w/2),x>y[0]-n||x>y[1]-n||x>y[2]-n)throw new Error("roundRadius must be smaller than the radius of all dimensions");E=Math.floor(E/4);let B=null,S=null,Q=[];for(let w=0;w<=E;w++){const M=h(C,y,x,E,w,!0),k=h(C,y,x,E,w,!1);if(w===0&&(Q=Q.concat(m(k,M))),B&&(Q=Q.concat(d(B,M),p(B,M))),S&&(Q=Q.concat(d(S,k),p(S,k))),w===E){let R=M.map(F=>F[0]);Q.push(a.create(R)),R=k.map(F=>F[0]),Q.push(a.create(R))}B=M,S=k}return s.create(Q)};e.exports=_}}),Ghi=yt({"node_modules/@jscad/modeling/src/primitives/roundedCylinder.js"(t,e){var{EPS:n,TAU:o}=mc(),i=$r(),r=Ta(),s=XA(),{sin:a,cos:A}=hI(),{isGTE:c,isNumberArray:l}=lf(),u=irn(),g=h=>{const d={center:[0,0,0],height:2,radius:1,roundRadius:.2,segments:32},{center:p,height:m,radius:_,roundRadius:f,segments:I}=Object.assign({},d,h);if(!l(p,3))throw new Error("center must be an array of X, Y and Z values");if(!c(m,0))throw new Error("height must be positive");if(!c(_,0))throw new Error("radius must be positive");if(!c(f,0))throw new Error("roundRadius must be positive");if(f>_)throw new Error("roundRadius must be smaller than the radius");if(!c(I,4))throw new Error("segments must be four or more");if(m===0||_===0)return r.create();if(f===0)return u({center:p,height:m,radius:_});const C=[0,0,-(m/2)],y=[0,0,m/2],x=i.subtract(i.create(),y,C),E=i.length(x);if(2*f>E-n)throw new Error("height must be larger than twice roundRadius");let B;Math.abs(x[0])>Math.abs(x[1])?B=i.fromValues(0,1,0):B=i.fromValues(1,0,0);const S=i.scale(i.create(),i.normalize(i.create(),x),f),Q=i.scale(i.create(),i.normalize(i.create(),i.cross(i.create(),S,B)),_),w=i.scale(i.create(),i.normalize(i.create(),i.cross(i.create(),Q,S)),_);i.add(C,C,S),i.subtract(y,y,S);const M=Math.floor(.25*I),k=W=>{const te=W.map(j=>i.add(j,j,p));return s.create(te)},R=[],F=i.create(),O=i.create();let U;for(let W=0;W<=I;W++){const te=o*W/I,j=i.add(i.create(),i.scale(F,Q,A(te)),i.scale(O,w,a(te)));if(W>0){let J=[];J.push(i.add(i.create(),C,j)),J.push(i.add(i.create(),C,U)),J.push(i.add(i.create(),y,U)),J.push(i.add(i.create(),y,j)),R.push(k(J));let oe,ie;for(let ne=0;ne<=M;ne++){const le=o/4*ne/M,ge=A(le),_e=a(le);if(ne>0){J=[];let ue;ue=i.add(i.create(),C,i.subtract(F,i.scale(F,U,oe),i.scale(O,S,ie))),J.push(ue),ue=i.add(i.create(),C,i.subtract(F,i.scale(F,j,oe),i.scale(O,S,ie))),J.push(ue),ne<M&&(ue=i.add(i.create(),C,i.subtract(F,i.scale(F,j,ge),i.scale(O,S,_e))),J.push(ue)),ue=i.add(i.create(),C,i.subtract(F,i.scale(F,U,ge),i.scale(O,S,_e))),J.push(ue),R.push(k(J)),J=[],ue=i.add(i.create(),i.scale(F,U,oe),i.scale(O,S,ie)),i.add(ue,ue,y),J.push(ue),ue=i.add(i.create(),i.scale(F,j,oe),i.scale(O,S,ie)),i.add(ue,ue,y),J.push(ue),ne<M&&(ue=i.add(i.create(),i.scale(F,j,ge),i.scale(O,S,_e)),i.add(ue,ue,y),J.push(ue)),ue=i.add(i.create(),i.scale(F,U,ge),i.scale(O,S,_e)),i.add(ue,ue,y),J.push(ue),J.reverse(),R.push(k(J))}oe=ge,ie=_e}}U=j}return r.create(R)};e.exports=g}}),Yhi=yt({"node_modules/@jscad/modeling/src/primitives/roundedRectangle.js"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=Ya(),{isGTE:s,isNumberArray:a}=lf(),A=SVe(),c=l=>{const u={center:[0,0],size:[2,2],roundRadius:.2,segments:32};let{center:g,size:h,roundRadius:d,segments:p}=Object.assign({},u,l);if(!a(g,2))throw new Error("center must be an array of X and Y values");if(!a(h,2))throw new Error("size must be an array of X and Y values");if(!h.every(S=>S>=0))throw new Error("size values must be positive");if(!s(d,0))throw new Error("roundRadius must be positive");if(!s(p,4))throw new Error("segments must be four or more");if(h[0]===0||h[1]===0)return r.create();if(d===0)return A({center:g,size:h});if(h=h.map(S=>S/2),d>h[0]-n||d>h[1]-n)throw new Error("roundRadius must be smaller than the radius of all dimensions");const m=Math.floor(p/4),_=i.add(i.create(),g,[h[0]-d,h[1]-d]),f=i.add(i.create(),g,[d-h[0],h[1]-d]),I=i.add(i.create(),g,[d-h[0],d-h[1]]),C=i.add(i.create(),g,[h[0]-d,d-h[1]]),y=[],x=[],E=[],B=[];for(let S=0;S<=m;S++){const Q=o/4*S/m,w=i.fromAngleRadians(i.create(),Q);i.scale(w,w,d),y.push(i.add(i.create(),_,w)),i.rotate(w,w,i.create(),o/4),x.push(i.add(i.create(),f,w)),i.rotate(w,w,i.create(),o/4),E.push(i.add(i.create(),I,w)),i.rotate(w,w,i.create(),o/4),B.push(i.add(i.create(),C,w))}return r.fromPoints(y.concat(x,E,B))};e.exports=c}}),arn=yt({"node_modules/@jscad/modeling/src/primitives/sphere.js"(t,e){var n=rrn(),{isGTE:o}=lf(),i=r=>{const s={center:[0,0,0],radius:1,segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]};let{center:a,radius:A,segments:c,axes:l}=Object.assign({},s,r);if(!o(A,0))throw new Error("radius must be positive");return A=[A,A,A],n({center:a,radius:A,segments:c,axes:l})};e.exports=i}}),Uhi=yt({"node_modules/@jscad/modeling/src/primitives/square.js"(t,e){var n=SVe(),{isGTE:o}=lf(),i=r=>{const s={center:[0,0],size:2};let{center:a,size:A}=Object.assign({},s,r);if(!o(A,0))throw new Error("size must be positive");return A=[A,A],n({center:a,size:A})};e.exports=i}}),Khi=yt({"node_modules/@jscad/modeling/src/primitives/star.js"(t,e){var{TAU:n}=mc(),o=_A(),i=Ya(),{isGT:r,isGTE:s,isNumberArray:a}=lf(),A=(u,g)=>u>0&&g>1&&g<u/2?Math.cos(Math.PI*g/u)/Math.cos(Math.PI*(g-1)/u):0,c=(u,g,h,d)=>{const p=n/u,m=[];for(let _=0;_<u;_++){const f=o.fromAngleRadians(o.create(),p*_+h);o.scale(f,f,g),o.add(f,d,f),m.push(f)}return m},l=u=>{const g={center:[0,0],vertices:5,outerRadius:1,innerRadius:0,density:2,startAngle:0};let{center:h,vertices:d,outerRadius:p,innerRadius:m,density:_,startAngle:f}=Object.assign({},g,u);if(!a(h,2))throw new Error("center must be an array of X and Y values");if(!s(d,2))throw new Error("vertices must be two or more");if(!r(p,0))throw new Error("outerRadius must be greater than zero");if(!s(m,0))throw new Error("innerRadius must be greater than zero");if(!s(f,0))throw new Error("startAngle must be greater than zero");if(d=Math.floor(d),_=Math.floor(_),f=f%n,m===0){if(!s(_,2))throw new Error("density must be two or more");m=p*A(d,_)}const I=o.clone(h),C=c(d,p,f,I),y=c(d,m,f+Math.PI/d,I),x=[];for(let E=0;E<d;E++)x.push(C[E]),x.push(y[E]);return i.fromPoints(x)};e.exports=l}}),wX=yt({"node_modules/@jscad/modeling/src/operations/transforms/mirror.js"(t,e){var n=ga(),o=Du(),i=S6(),r=Ya(),s=Ta(),a=Au(),A=(g,...h)=>{const d={origin:[0,0,0],normal:[0,0,1]},{origin:p,normal:m}=Object.assign({},d,g);if(h=n(h),h.length===0)throw new Error("wrong number of arguments");const _=i.fromNormalAndPoint(i.create(),m,p);if(Number.isNaN(_[0]))throw new Error("the given origin and normal do not define a proper plane");const f=o.mirrorByPlane(o.create(),_),I=h.map(C=>a.isA(C)?a.transform(f,C):r.isA(C)?r.transform(f,C):s.isA(C)?s.transform(f,C):C);return I.length===1?I[0]:I},c=(...g)=>A({normal:[1,0,0]},g),l=(...g)=>A({normal:[0,1,0]},g),u=(...g)=>A({normal:[0,0,1]},g);e.exports={mirror:A,mirrorX:c,mirrorY:l,mirrorZ:u}}}),Arn=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/calculatePlane.js"(t,e){var n=S6(),o=$r(),i=r=>{const s=r.edges;if(s.length<3)throw new Error("slices must have 3 or more edges to calculate a plane");const a=s.reduce((u,g)=>o.add(o.create(),u,g[0]),o.create());o.scale(a,a,1/s.length);let A,c=0;s.forEach(u=>{if(!o.equals(u[0],u[1])){const g=o.squaredDistance(a,u[0]);g>c&&(A=u,c=g)}});const l=s.find(u=>o.equals(u[1],A[0]));return n.fromPoints(n.create(),l[0],A[0],A[1])};e.exports=i}}),iT=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/create.js"(t,e){var n=o=>(o||(o=[]),{edges:o});e.exports=n}}),Vhi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/clone.js"(t,e){var n=iT(),o=$r(),i=(...r)=>{let s,a;return r.length===1?(s=n(),a=r[0]):(s=r[0],a=r[1]),s.edges=a.edges.map(A=>[o.clone(A[0]),o.clone(A[1])]),s};e.exports=i}}),zhi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/equals.js"(t,e){var n=$r(),o=(i,r)=>{const s=i.edges,a=r.edges;return s.length!==a.length?!1:s.reduce((c,l,u)=>{const g=a[u],h=n.squaredDistance(l[0],g[0]);return c&&h<Number.EPSILON},!0)};e.exports=o}}),Jhi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/fromPoints.js"(t,e){var n=$r(),o=iT(),i=r=>{if(!Array.isArray(r))throw new Error("the given points must be an array");if(r.length<3)throw new Error("the given points must contain THREE or more points");const s=[];let a=r[r.length-1];return r.forEach(A=>{A.length===2&&s.push([n.fromVec2(n.create(),a),n.fromVec2(n.create(),A)]),A.length===3&&s.push([a,A]),a=A}),o(s)};e.exports=i}}),Whi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/fromSides.js"(t,e){var n=$r(),o=iT(),i=r=>{if(!Array.isArray(r))throw new Error("the given sides must be an array");const s=[];return r.forEach(a=>{s.push([n.fromVec2(n.create(),a[0]),n.fromVec2(n.create(),a[1])])}),o(s)};e.exports=i}}),jhi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/isA.js"(t,e){var n=o=>!!(o&&typeof o=="object"&&"edges"in o&&Array.isArray(o.edges));e.exports=n}}),$hi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/reverse.js"(t,e){var n=iT(),o=(...i)=>{let r,s;return i.length===1?(r=n(),s=i[0]):(r=i[0],s=i[1]),r.edges=s.edges.map(a=>[a[1],a[0]]),r};e.exports=o}}),qhi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/toEdges.js"(t,e){var n=o=>o.edges;e.exports=n}}),Xhi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/linkedListSort.js"(t,e){var n=(o,i)=>{let r,s,a,A,c,l=1;do{s=o,o=null;let u=null;for(c=0;s;){c++,a=s;let g=0;for(r=0;r<l&&(g++,a=a.nextZ,!!a);r++);let h=l;for(;g>0||h>0&&a;)g!==0&&(h===0||!a||i(s)<=i(a))?(A=s,s=s.nextZ,g--):(A=a,a=a.nextZ,h--),u?u.nextZ=A:o=A,A.prevZ=u,u=A;s=a}u.nextZ=null,l*=2}while(c>1);return o};e.exports=n}}),crn=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/linkedList.js"(t,e){var n=Xhi(),o=class{constructor(s,a,A){this.i=s,this.x=a,this.y=A,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}},i=(s,a,A,c)=>{const l=new o(s,a,A);return c?(l.next=c.next,l.prev=c,c.next.prev=l,c.next=l):(l.prev=l,l.next=l),l},r=s=>{s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)};e.exports={Node:o,insertNode:i,removeNode:r,sortLinked:n}}}),QVe=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/triangle.js"(t,e){var n=(i,r,s,a,A,c,l,u)=>(A-l)*(r-u)-(i-l)*(c-u)>=0&&(i-l)*(a-u)-(s-l)*(r-u)>=0&&(s-l)*(c-u)-(A-l)*(a-u)>=0,o=(i,r,s)=>(r.y-i.y)*(s.x-r.x)-(r.x-i.x)*(s.y-r.y);e.exports={area:o,pointInTriangle:n}}}),lrn=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/linkedPolygon.js"(t,e){var{Node:n,insertNode:o,removeNode:i}=crn(),{area:r}=QVe(),s=(f,I,C,y,x)=>{let E;if(x===m(f,I,C,y)>0)for(let B=I;B<C;B+=y)E=o(B,f[B],f[B+1],E);else for(let B=C-y;B>=I;B-=y)E=o(B,f[B],f[B+1],E);return E&&_(E,E.next)&&(i(E),E=E.next),E},a=(f,I)=>{if(!f)return f;I||(I=f);let C=f,y;do if(y=!1,!C.steiner&&(_(C,C.next)||r(C.prev,C,C.next)===0)){if(i(C),C=I=C.prev,C===C.next)break;y=!0}else C=C.next;while(y||C!==I);return I},A=(f,I,C)=>{let y=f;do{const x=y.prev,E=y.next.next;!_(x,E)&&d(x,y,y.next,E)&&l(x,E)&&l(E,x)&&(I.push(x.i/C),I.push(y.i/C),I.push(E.i/C),i(y),i(y.next),y=f=E),y=y.next}while(y!==f);return a(y)},c=(f,I)=>{let C=f;do{if(C.i!==f.i&&C.next.i!==f.i&&C.i!==I.i&&C.next.i!==I.i&&d(C,C.next,f,I))return!0;C=C.next}while(C!==f);return!1},l=(f,I)=>r(f.prev,f,f.next)<0?r(f,I,f.next)>=0&&r(f,f.prev,I)>=0:r(f,I,f.prev)<0||r(f,f.next,I)<0,u=(f,I)=>{let C=f,y=!1;const x=(f.x+I.x)/2,E=(f.y+I.y)/2;do C.y>E!=C.next.y>E&&C.next.y!==C.y&&x<(C.next.x-C.x)*(E-C.y)/(C.next.y-C.y)+C.x&&(y=!y),C=C.next;while(C!==f);return y},g=(f,I)=>{const C=new n(f.i,f.x,f.y),y=new n(I.i,I.x,I.y),x=f.next,E=I.prev;return f.next=I,I.prev=f,C.next=x,x.prev=C,y.next=C,C.prev=y,E.next=y,y.prev=E,y},h=(f,I)=>f.next.i!==I.i&&f.prev.i!==I.i&&!c(f,I)&&(l(f,I)&&l(I,f)&&u(f,I)&&(r(f.prev,f,I.prev)||r(f,I.prev,I))||_(f,I)&&r(f.prev,f,f.next)>0&&r(I.prev,I,I.next)>0),d=(f,I,C,y)=>{const x=Math.sign(r(f,I,C)),E=Math.sign(r(f,I,y)),B=Math.sign(r(C,y,f)),S=Math.sign(r(C,y,I));return!!(x!==E&&B!==S||x===0&&p(f,C,I)||E===0&&p(f,y,I)||B===0&&p(C,f,y)||S===0&&p(C,I,y))},p=(f,I,C)=>I.x<=Math.max(f.x,C.x)&&I.x>=Math.min(f.x,C.x)&&I.y<=Math.max(f.y,C.y)&&I.y>=Math.min(f.y,C.y),m=(f,I,C,y)=>{let x=0;for(let E=I,B=C-y;E<C;E+=y)x+=(f[B]-f[E])*(f[E+1]+f[B+1]),B=E;return x},_=(f,I)=>f.x===I.x&&f.y===I.y;e.exports={cureLocalIntersections:A,filterPoints:a,isValidDiagonal:h,linkedPolygon:s,locallyInside:l,splitPolygon:g}}}),Zhi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/eliminateHoles.js"(t,e){var{filterPoints:n,linkedPolygon:o,locallyInside:i,splitPolygon:r}=lrn(),{area:s,pointInTriangle:a}=QVe(),A=(h,d,p,m)=>{const _=[];for(let f=0,I=d.length;f<I;f++){const C=d[f]*m,y=f<I-1?d[f+1]*m:h.length,x=o(h,C,y,m,!1);x===x.next&&(x.steiner=!0),_.push(g(x))}_.sort((f,I)=>f.x-I.x);for(let f=0;f<_.length;f++)p=c(_[f],p),p=n(p,p.next);return p},c=(h,d)=>{const p=l(h,d);if(!p)return d;const m=r(p,h),_=n(p,p.next);return n(m,m.next),d===p?_:d},l=(h,d)=>{let p=d;const m=h.x,_=h.y;let f=-1/0,I;do{if(_<=p.y&&_>=p.next.y&&p.next.y!==p.y){const B=p.x+(_-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(B<=m&&B>f){if(f=B,B===m){if(_===p.y)return p;if(_===p.next.y)return p.next}I=p.x<p.next.x?p:p.next}}p=p.next}while(p!==d);if(!I)return null;if(m===f)return I;const C=I,y=I.x,x=I.y;let E=1/0;p=I;do{if(m>=p.x&&p.x>=y&&m!==p.x&&a(_<x?m:f,_,y,x,_<x?f:m,_,p.x,p.y)){const B=Math.abs(_-p.y)/(m-p.x);i(p,h)&&(B<E||B===E&&(p.x>I.x||p.x===I.x&&u(I,p)))&&(I=p,E=B)}p=p.next}while(p!==C);return I},u=(h,d)=>s(h.prev,h,d.prev)<0&&s(d.next,h,h.next)<0,g=h=>{let d=h,p=h;do(d.x<p.x||d.x===p.x&&d.y<p.y)&&(p=d),d=d.next;while(d!==h);return p};e.exports=A}}),epi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/index.js"(t,e){var n=Zhi(),{removeNode:o,sortLinked:i}=crn(),{cureLocalIntersections:r,filterPoints:s,isValidDiagonal:a,linkedPolygon:A,splitPolygon:c}=lrn(),{area:l,pointInTriangle:u}=QVe(),g=(I,C,y=2)=>{const x=C&&C.length,E=x?C[0]*y:I.length;let B=A(I,0,E,y,!0);const S=[];if(!B||B.next===B.prev)return S;let Q,w,M,k,R;if(x&&(B=n(I,C,B,y)),I.length>80*y){Q=M=I[0],w=k=I[1];for(let F=y;F<E;F+=y){const O=I[F],U=I[F+1];O<Q&&(Q=O),U<w&&(w=U),O>M&&(M=O),U>k&&(k=U)}R=Math.max(M-Q,k-w),R=R!==0?1/R:0}return h(B,S,y,Q,w,R),S},h=(I,C,y,x,E,B,S)=>{if(!I)return;!S&&B&&_(I,x,E,B);let Q=I,w,M;for(;I.prev!==I.next;){if(w=I.prev,M=I.next,B?p(I,x,E,B):d(I)){C.push(w.i/y),C.push(I.i/y),C.push(M.i/y),o(I),I=M.next,Q=M.next;continue}if(I=M,I===Q){S?S===1?(I=r(s(I),C,y),h(I,C,y,x,E,B,2)):S===2&&m(I,C,y,x,E,B):h(s(I),C,y,x,E,B,1);break}}},d=I=>{const C=I.prev,y=I,x=I.next;if(l(C,y,x)>=0)return!1;let E=I.next.next;for(;E!==I.prev;){if(u(C.x,C.y,y.x,y.y,x.x,x.y,E.x,E.y)&&l(E.prev,E,E.next)>=0)return!1;E=E.next}return!0},p=(I,C,y,x)=>{const E=I.prev,B=I,S=I.next;if(l(E,B,S)>=0)return!1;const Q=E.x<B.x?E.x<S.x?E.x:S.x:B.x<S.x?B.x:S.x,w=E.y<B.y?E.y<S.y?E.y:S.y:B.y<S.y?B.y:S.y,M=E.x>B.x?E.x>S.x?E.x:S.x:B.x>S.x?B.x:S.x,k=E.y>B.y?E.y>S.y?E.y:S.y:B.y>S.y?B.y:S.y,R=f(Q,w,C,y,x),F=f(M,k,C,y,x);let O=I.prevZ,U=I.nextZ;for(;O&&O.z>=R&&U&&U.z<=F;){if(O!==I.prev&&O!==I.next&&u(E.x,E.y,B.x,B.y,S.x,S.y,O.x,O.y)&&l(O.prev,O,O.next)>=0||(O=O.prevZ,U!==I.prev&&U!==I.next&&u(E.x,E.y,B.x,B.y,S.x,S.y,U.x,U.y)&&l(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;O&&O.z>=R;){if(O!==I.prev&&O!==I.next&&u(E.x,E.y,B.x,B.y,S.x,S.y,O.x,O.y)&&l(O.prev,O,O.next)>=0)return!1;O=O.prevZ}for(;U&&U.z<=F;){if(U!==I.prev&&U!==I.next&&u(E.x,E.y,B.x,B.y,S.x,S.y,U.x,U.y)&&l(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0},m=(I,C,y,x,E,B)=>{let S=I;do{let Q=S.next.next;for(;Q!==S.prev;){if(S.i!==Q.i&&a(S,Q)){let w=c(S,Q);S=s(S,S.next),w=s(w,w.next),h(S,C,y,x,E,B),h(w,C,y,x,E,B);return}Q=Q.next}S=S.next}while(S!==I)},_=(I,C,y,x)=>{let E=I;do E.z===null&&(E.z=f(E.x,E.y,C,y,x)),E.prevZ=E.prev,E.nextZ=E.next,E=E.next;while(E!==I);E.prevZ.nextZ=null,E.prevZ=null,i(E,B=>B.z)},f=(I,C,y,x,E)=>(I=32767*(I-y)*E,C=32767*(C-x)*E,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,I|C<<1);e.exports=g}}),tpi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/assignHoles.js"(t,e){var{area:n}=QX(),{toOutlines:o}=Ya(),{arePointsInside:i}=fVe(),r=a=>{const A=o(a),c=[],l=[];A.forEach((h,d)=>{const p=n(h);p<0?l.push(d):p>0&&c.push(d)});const u=[],g=[];return c.forEach((h,d)=>{const p=A[h];u[d]=[],l.forEach((m,_)=>{const f=A[m];i([f[0]],{vertices:p})&&(u[d].push(m),g[_]||(g[_]=[]),g[_].push(d))})}),l.forEach((h,d)=>{if(g[d]&&g[d].length>1){const p=s(g[d],m=>u[m].length);g[d].forEach((m,_)=>{_!==p&&(u[m]=u[m].filter(f=>f!==h))})}}),u.map((h,d)=>({solid:A[c[d]],holes:h.map(p=>A[p])}))},s=(a,A)=>{let c,l;return a.forEach((u,g)=>{const h=A(u);(l===void 0||h<l)&&(c=g,l=h)}),c};e.exports=r}}),npi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/earcut/polygonHierarchy.js"(t,e){var n=Ya(),o=S6(),i=_A(),r=$r(),s=Arn(),a=tpi(),A=class{constructor(c){this.plane=s(c);const l=r.orthogonal(r.create(),this.plane),u=r.cross(r.create(),this.plane,l);this.v=r.normalize(u,u),this.u=r.cross(r.create(),this.v,this.plane),this.basisMap=new Map;const g=c.edges.map(d=>d.map(p=>this.to2D(p))),h=n.create(g);this.roots=a(h)}to2D(c){const l=i.fromValues(r.dot(c,this.u),r.dot(c,this.v));return this.basisMap.set(l,c),l}to3D(c){const l=this.basisMap.get(c);if(l)return l;{console.log("Warning: point not in original slice");const u=r.scale(r.create(),this.u,c[0]),g=r.scale(r.create(),this.v,c[1]),h=r.scale(r.create(),o,o[3]),d=r.add(u,u,h);return r.add(g,g,d)}}};e.exports=A}}),opi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/toPolygons.js"(t,e){var n=XA(),o=epi(),i=npi(),r=s=>{const a=new i(s),A=[];return a.roots.forEach(({solid:c,holes:l})=>{let u=c.length;const g=[];l.forEach((_,f)=>{g.push(u),u+=_.length});const h=[c,...l].flat(),d=h.flat(),p=_=>a.to3D(h[_]),m=o(d,g);for(let _=0;_<m.length;_+=3){const f=m.slice(_,_+3).map(p);A.push(n.fromPointsAndPlane(f,a.plane))}}),A};e.exports=r}}),ipi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/toString.js"(t,e){var n=$r(),o=r=>r.reduce((s,a)=>s+=`[${n.toString(a[0])}, ${n.toString(a[1])}], `,""),i=r=>`[${o(r.edges)}]`;e.exports=i}}),rpi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/transform.js"(t,e){var n=$r(),o=iT(),i=(r,s)=>{const a=s.edges.map(A=>[n.transform(n.create(),A[0],r),n.transform(n.create(),A[1],r)]);return o(a)};e.exports=i}}),DY=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/index.js"(t,e){e.exports={calculatePlane:Arn(),clone:Vhi(),create:iT(),equals:zhi(),fromPoints:Jhi(),fromSides:Whi(),isA:jhi(),reverse:$hi(),toEdges:qhi(),toPolygons:opi(),toString:ipi(),transform:rpi()}}}),spi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/slice/repair.js"(t,e){var n=$r(),o=iT(),i=r=>{if(!r.edges)return r;let s=r.edges;const a=new Map,A=new Map;s=s.filter(u=>!n.equals(u[0],u[1])),s.forEach(u=>{const g=u[0].toString(),h=u[1].toString();a.set(g,u[0]),a.set(h,u[1]),A.set(g,(A.get(g)||0)+1),A.set(h,(A.get(h)||0)-1)});const c=[],l=[];return A.forEach((u,g)=>{u<0&&c.push(g),u>0&&l.push(g)}),c.forEach(u=>{const g=a.get(u);let h=1/0,d;l.forEach(p=>{const m=a.get(p),_=n.distance(g,m);_<h&&(h=_,d=m)}),console.warn(`slice.repair: repairing vertex gap ${g} to ${d} distance ${h}`),s=s.map(p=>p[0].toString()===u?[d,p[1]]:p[1].toString()===u?[p[0],d]:p)}),o(s)};e.exports=i}}),api=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeWalls.js"(t,e){var{EPS:n}=mc(),o=$r(),i=XA(),r=DY(),s=(u,g)=>u===g?u:u<g?s(g,u):g===1?1:g===0?u:s(g,u%g),a=(u,g)=>u*g/s(u,g),A=(u,g)=>{const h=u/g.length;if(h===1)return g;const d=o.fromValues(h,h,h),p=o.create(),m=[];return g.forEach(_=>{o.subtract(p,_[1],_[0]),o.divide(p,p,d);let f=_[0];for(let I=1;I<=h;++I){const C=o.add(o.create(),f,p);m.push([f,C]),f=C}}),m},c=n*n/2*Math.sin(Math.PI/3),l=(u,g)=>{let h=r.toEdges(u),d=r.toEdges(g);if(h.length!==d.length){const m=a(h.length,d.length);m!==h.length&&(h=A(m,h)),m!==d.length&&(d=A(m,d))}const p=[];return h.forEach((m,_)=>{const f=d[_],I=i.create([m[0],m[1],f[1]]),C=i.measureArea(I);Number.isFinite(C)&&C>c&&p.push(I);const y=i.create([m[0],f[1],f[0]]),x=i.measureArea(y);Number.isFinite(x)&&x>c&&p.push(y)}),p};e.exports=l}}),ope=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeFromSlices.js"(t,e){var n=Du(),o=Ya(),i=Ta(),r=XA(),s=DY(),a=spi(),A=api(),c=(u,g,h)=>{let d=null;return o.isA(h)&&(d=s.fromSides(o.toSides(h))),r.isA(h)&&(d=s.fromPoints(r.toPoints(h))),u===0||u===1?s.transform(n.fromTranslation(n.create(),[0,0,u]),d):null},l=(u,g)=>{const h={numberOfSlices:2,capStart:!0,capEnd:!0,close:!1,repair:!0,callback:c},{numberOfSlices:d,capStart:p,capEnd:m,close:_,repair:f,callback:I}=Object.assign({},h,u);if(d<2)throw new Error("numberOfSlices must be 2 or more");f&&(g=a(g));const C=d-1;let y=null,x=null,E=null,B=[];for(let S=0;S<d;S++){const Q=I(S/C,S,g);if(Q){if(!s.isA(Q))throw new Error("the callback function must return slice objects");if(s.toEdges(Q).length===0)throw new Error("the callback function must return slices with one or more edges");if(E){const M=A(E,Q);for(let k=0;k<M.length;k++)B.push(M[k])}S===0&&(y=Q),S===d-1&&(x=Q),E=Q}}if(m){const S=s.toPolygons(x);for(let Q=0;Q<S.length;Q++)B.push(S[Q])}if(p){const S=s.toPolygons(y).map(r.invert);for(let Q=0;Q<S.length;Q++)B.push(S[Q])}if(!p&&!m&&_&&!s.equals(x,y)){const S=A(x,y);for(let Q=0;Q<S.length;Q++)B.push(S[Q])}return i.create(B)};e.exports=l}}),urn=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRotate.js"(t,e){var{TAU:n}=mc(),o=Du(),{mirrorX:i}=wX(),r=Ya(),s=DY(),a=ope(),A=(c,l)=>{const u={segments:12,startAngle:0,angle:n,overflow:"cap"};let{segments:g,startAngle:h,angle:d,overflow:p}=Object.assign({},u,c);if(g<3)throw new Error("segments must be greater then 3");h=Math.abs(h)>n?h%n:h,d=Math.abs(d)>n?d%n:d;let m=h+d;if(m=Math.abs(m)>n?m%n:m,m<h){const k=h;h=m,m=k}let _=m-h;if(_<=0&&(_=n),Math.abs(_)<n){const k=n/g;g=Math.floor(Math.abs(_)/k),Math.abs(_)>g*k&&g++}let f=r.toSides(l);if(f.length===0)throw new Error("the given geometry cannot be empty");const I=f.filter(k=>k[0][0]<0),C=f.filter(k=>k[0][0]>=0);I.length>0&&C.length>0&&p==="cap"&&(I.length>C.length?(f=f.map(k=>{let R=k[0],F=k[1];return R=[Math.min(R[0],0),R[1]],F=[Math.min(F[0],0),F[1]],[R,F]}),l=r.create(f),l=i(l)):C.length>=I.length&&(f=f.map(k=>{let R=k[0],F=k[1];return R=[Math.max(R[0],0),R[1]],F=[Math.max(F[0],0),F[1]],[R,F]}),l=r.create(f)));const x=_/g,E=Math.abs(_)<n,B=s.fromSides(r.toSides(l));s.reverse(B,B);const S=o.create(),Q=o.fromXRotation(o.create(),n/4),w=o.create(),M=(k,R,F)=>{let O=x*R+h;return _===n&&R===g&&(O=h),o.fromZRotation(w,O),o.multiply(S,w,Q),s.transform(S,F)};return c={numberOfSlices:g+1,capStart:E,capEnd:E,close:!E,callback:M},a(c,B)};e.exports=A}}),PX=yt({"node_modules/@jscad/modeling/src/operations/transforms/rotate.js"(t,e){var n=ga(),o=Du(),i=Ya(),r=Ta(),s=Au(),a=(u,...g)=>{if(!Array.isArray(u))throw new Error("angles must be an array");if(g=n(g),g.length===0)throw new Error("wrong number of arguments");for(u=u.slice();u.length<3;)u.push(0);const h=u[2],d=u[1],p=u[0],m=o.fromTaitBryanRotation(o.create(),h,d,p),_=g.map(f=>s.isA(f)?s.transform(m,f):i.isA(f)?i.transform(m,f):r.isA(f)?r.transform(m,f):f);return _.length===1?_[0]:_},A=(u,...g)=>a([u,0,0],g),c=(u,...g)=>a([0,u,0],g),l=(u,...g)=>a([0,0,u],g);e.exports={rotate:a,rotateX:A,rotateY:c,rotateZ:l}}}),rT=yt({"node_modules/@jscad/modeling/src/operations/transforms/translate.js"(t,e){var n=ga(),o=Du(),i=Ya(),r=Ta(),s=Au(),a=(u,...g)=>{if(!Array.isArray(u))throw new Error("offset must be an array");if(g=n(g),g.length===0)throw new Error("wrong number of arguments");for(u=u.slice();u.length<3;)u.push(0);const h=o.fromTranslation(o.create(),u),d=g.map(p=>s.isA(p)?s.transform(h,p):i.isA(p)?i.transform(h,p):r.isA(p)?r.transform(h,p):p);return d.length===1?d[0]:d},A=(u,...g)=>a([u,0,0],g),c=(u,...g)=>a([0,u,0],g),l=(u,...g)=>a([0,0,u],g);e.exports={translate:a,translateX:A,translateY:c,translateZ:l}}}),Api=yt({"node_modules/@jscad/modeling/src/primitives/torus.js"(t,e){var{TAU:n}=mc(),o=urn(),{rotate:i}=PX(),{translate:r}=rT(),s=nrn(),{isGT:a,isGTE:A}=lf(),c=l=>{const u={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:n},{innerRadius:g,innerSegments:h,outerRadius:d,outerSegments:p,innerRotation:m,startAngle:_,outerRotation:f}=Object.assign({},u,l);if(!a(g,0))throw new Error("innerRadius must be greater than zero");if(!A(h,3))throw new Error("innerSegments must be three or more");if(!a(d,0))throw new Error("outerRadius must be greater than zero");if(!A(p,3))throw new Error("outerSegments must be three or more");if(!A(_,0))throw new Error("startAngle must be positive");if(!a(f,0))throw new Error("outerRotation must be greater than zero");if(g>=d)throw new Error("inner circle is too large to rotate about the outer circle");let I=s({radius:g,segments:h});return m!==0&&(I=i([0,0,m],I)),I=r([d,0],I),o({startAngle:_,angle:f,segments:p},I)};e.exports=c}}),cpi=yt({"node_modules/@jscad/modeling/src/primitives/triangle.js"(t,e){var{NEPS:n}=mc(),o=_A(),i=Ya(),{isNumberArray:r}=lf(),s=(m,_,f)=>Math.acos((m*m+_*_-f*f)/(2*m*_)),a=(m,_,f)=>_>n?Math.sqrt(m*m+f*f-2*m*f*Math.cos(_)):Math.sqrt((m-f)*(m-f)+m*f*_*_*(1-_*_/12)),A=m=>{if(Math.abs(m[0]+m[1]+m[2]-Math.PI)>n)throw new Error("AAA triangles require angles that sum to PI");const f=m[0],I=m[1],C=Math.PI-f-I,y=1,x=y/Math.sin(C)*Math.sin(f),E=y/Math.sin(C)*Math.sin(I);return d(f,I,C,x,E,y)},c=m=>{const _=m[0],f=m[1],I=Math.PI+n-_-f;if(I<n)throw new Error("AAS triangles require angles that sum to PI");const C=m[2],y=C/Math.sin(_)*Math.sin(f),x=C/Math.sin(_)*Math.sin(I);return d(_,f,I,C,y,x)},l=m=>{const _=m[0],f=m[2],I=Math.PI+n-_-f;if(I<n)throw new Error("ASA triangles require angles that sum to PI");const C=m[1],y=C/Math.sin(I)*Math.sin(_),x=C/Math.sin(I)*Math.sin(f);return d(_,f,I,y,x,C)},u=m=>{const _=m[0],f=m[1],I=m[2],C=a(_,f,I),y=s(C,_,I),x=Math.PI-y-f;return d(y,f,x,I,C,_)},g=m=>{const _=m[0],f=m[1],I=m[2],C=Math.asin(f*Math.sin(I)/_),y=Math.PI-C-I,x=_/Math.sin(I)*Math.sin(y);return d(C,y,I,f,x,_)},h=m=>{const _=m[1],f=m[2],I=m[0];if(_+f<=I||f+I<=_||I+_<=f)throw new Error("SSS triangle is incorrect, as the longest side is longer than the sum of the other sides");const C=s(f,I,_),y=s(I,_,f),x=Math.PI-C-y;return d(C,y,x,_,f,I)},d=(m,_,f,I,C,y)=>{const x=o.fromValues(0,0),E=o.fromValues(y,0),B=o.fromValues(I,0);return o.add(B,o.rotate(B,B,[0,0],Math.PI-_),E),i.fromPoints([x,E,B])},p=m=>{const _={type:"SSS",values:[1,1,1]};let{type:f,values:I}=Object.assign({},_,m);if(typeof f!="string")throw new Error("triangle type must be a string");if(f=f.toUpperCase(),!((f[0]==="A"||f[0]==="S")&&(f[1]==="A"||f[1]==="S")&&(f[2]==="A"||f[2]==="S")))throw new Error("triangle type must contain three letters; A or S");if(!r(I,3))throw new Error("triangle values must contain three values");if(!I.every(C=>C>0))throw new Error("triangle values must be greater than zero");switch(f){case"AAA":return A(I);case"AAS":return c(I);case"ASA":return l(I);case"SAS":return u(I);case"SSA":return g(I);case"SSS":return h(I);default:throw new Error("invalid triangle type, try again")}};e.exports=p}}),sT=yt({"node_modules/@jscad/modeling/src/primitives/index.js"(t,e){e.exports={arc:Thi(),circle:nrn(),cube:khi(),cuboid:bVe(),cylinder:irn(),cylinderElliptic:orn(),ellipse:trn(),ellipsoid:rrn(),geodesicSphere:Fhi(),line:Lhi(),polygon:Hhi(),polyhedron:srn(),rectangle:SVe(),roundedCuboid:Ohi(),roundedCylinder:Ghi(),roundedRectangle:Yhi(),sphere:arn(),square:Uhi(),star:Khi(),torus:Api(),triangle:cpi()}}}),lpi=yt({"node_modules/@jscad/modeling/src/text/fonts/single-line/hershey/simplex.js"(t,e){e.exports={height:14,32:[16],33:[10,5,21,5,7,void 0,5,2,4,1,5,0,6,1,5,2],34:[16,4,21,4,14,void 0,12,21,12,14],35:[21,11,25,4,-7,void 0,17,25,10,-7,void 0,4,12,18,12,void 0,3,6,17,6],36:[20,8,25,8,-4,void 0,12,25,12,-4,void 0,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],37:[24,21,21,3,0,void 0,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,void 0,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7],38:[26,23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2],39:[10,5,19,4,20,5,21,6,20,6,18,5,16,4,15],40:[14,11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7],41:[14,3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7],42:[16,8,21,8,9,void 0,3,18,13,12,void 0,13,18,3,12],43:[26,13,18,13,0,void 0,4,9,22,9],44:[10,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],45:[26,4,9,22,9],46:[10,5,2,4,1,5,0,6,1,5,2],47:[22,20,25,2,-7],48:[20,9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21],49:[20,6,17,8,18,11,21,11,0],50:[20,4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0],51:[20,5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],52:[20,13,21,3,7,18,7,void 0,13,21,13,0],53:[20,15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],54:[20,16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7],55:[20,17,21,7,0,void 0,3,21,17,21],56:[20,8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21],57:[20,16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3],58:[10,5,14,4,13,5,12,6,13,5,14,void 0,5,2,4,1,5,0,6,1,5,2],59:[10,5,14,4,13,5,12,6,13,5,14,void 0,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],60:[24,20,18,4,9,20,0],61:[26,4,12,22,12,void 0,4,6,22,6],62:[24,4,18,20,9,4,0],63:[18,3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,void 0,9,2,8,1,9,0,10,1,9,2],64:[27,18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,void 0,12,16,10,14,9,11,9,8,10,6,11,5,void 0,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,void 0,19,16,18,8,18,6,19,5],65:[18,9,21,1,0,void 0,9,21,17,0,void 0,4,7,14,7],66:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,void 0,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0],67:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5],68:[21,4,21,4,0,void 0,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0],69:[19,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11,void 0,4,0,17,0],70:[18,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11],71:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,void 0,13,8,18,8],72:[22,4,21,4,0,void 0,18,21,18,0,void 0,4,11,18,11],73:[8,4,21,4,0],74:[16,12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7],75:[21,4,21,4,0,void 0,18,21,4,7,void 0,9,12,18,0],76:[17,4,21,4,0,void 0,4,0,16,0],77:[24,4,21,4,0,void 0,4,21,12,0,void 0,20,21,12,0,void 0,20,21,20,0],78:[22,4,21,4,0,void 0,4,21,18,0,void 0,18,21,18,0],79:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21],80:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10],81:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,void 0,12,4,18,-2],82:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,void 0,11,11,18,0],83:[20,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],84:[16,8,21,8,0,void 0,1,21,15,21],85:[22,4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21],86:[18,1,21,9,0,void 0,17,21,9,0],87:[24,2,21,7,0,void 0,12,21,7,0,void 0,12,21,17,0,void 0,22,21,17,0],88:[20,3,21,17,0,void 0,17,21,3,0],89:[18,1,21,9,11,9,0,void 0,17,21,9,11],90:[20,17,21,3,0,void 0,3,21,17,21,void 0,3,0,17,0],91:[14,4,25,4,-7,void 0,5,25,5,-7,void 0,4,25,11,25,void 0,4,-7,11,-7],92:[14,0,21,14,-3],93:[14,9,25,9,-7,void 0,10,25,10,-7,void 0,3,25,10,25,void 0,3,-7,10,-7],94:[16,6,15,8,18,10,15,void 0,3,12,8,17,13,12,void 0,8,17,8,0],95:[16,0,-2,16,-2],96:[10,6,21,5,20,4,18,4,16,5,15,6,16,5,17],97:[19,15,14,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],98:[19,4,21,4,0,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],99:[18,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],100:[19,15,21,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],101:[18,3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],102:[12,10,21,8,21,6,20,5,17,5,0,void 0,2,14,9,14],103:[19,15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],104:[19,4,21,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],105:[8,3,21,4,20,5,21,4,22,3,21,void 0,4,14,4,0],106:[10,5,21,6,20,7,21,6,22,5,21,void 0,6,14,6,-3,5,-6,3,-7,1,-7],107:[17,4,21,4,0,void 0,14,14,4,4,void 0,8,8,15,0],108:[8,4,21,4,0],109:[30,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0,void 0,15,10,18,13,20,14,23,14,25,13,26,10,26,0],110:[19,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],111:[19,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14],112:[19,4,14,4,-7,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],113:[19,15,14,15,-7,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],114:[13,4,14,4,0,void 0,4,8,5,11,7,13,9,14,12,14],115:[17,14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3],116:[12,5,21,5,4,6,1,8,0,10,0,void 0,2,14,9,14],117:[19,4,14,4,4,5,1,7,0,10,0,12,1,15,4,void 0,15,14,15,0],118:[16,2,14,8,0,void 0,14,14,8,0],119:[22,3,14,7,0,void 0,11,14,7,0,void 0,11,14,15,0,void 0,19,14,15,0],120:[17,3,14,14,0,void 0,14,14,3,0],121:[16,2,14,8,0,void 0,14,14,8,0,6,-4,4,-6,2,-7,1,-7],122:[17,14,14,3,0,void 0,3,14,14,14,void 0,3,0,14,0],123:[14,9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,void 0,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,void 0,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7],124:[8,4,25,4,-7],125:[14,5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,void 0,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,void 0,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7],126:[24,3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,void 0,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]}}}),grn=yt({"node_modules/@jscad/modeling/src/text/vectorParams.js"(t,e){var n=lpi(),o={xOffset:0,yOffset:0,input:"?",align:"left",font:n,height:14,lineSpacing:2.142857142857143,letterSpacing:1,extrudeOffset:0},i=(r,s)=>{!s&&typeof r=="string"&&(r={input:r}),r=r||{};const a=Object.assign({},o,r);return a.input=s||a.input,a};e.exports=i}}),drn=yt({"node_modules/@jscad/modeling/src/text/vectorChar.js"(t,e){var n=grn(),o=(i,r)=>{const{xOffset:s,yOffset:a,input:A,font:c,height:l,extrudeOffset:u}=n(i,r);let g=A.charCodeAt(0);(!g||!c[g])&&(g=63);const h=[].concat(c[g]),d=(l-u)/c.height,p=u/2,m=h.shift()*d,_=[];let f=[];for(let I=0,C=h.length;I<C;I+=2){const y=d*h[I]+s,x=d*h[I+1]+a+p;if(h[I]!==void 0){f.push([y,x]);continue}_.push(f),f=[],I--}return f.length&&_.push(f),{width:m,height:l,segments:_}};e.exports=o}}),upi=yt({"node_modules/@jscad/modeling/src/text/vectorText.js"(t,e){var n=drn(),o=grn(),i=(s,a)=>{const{x:A,y:c}=Object.assign({x:0,y:0},s||{}),l=a.segments;let u=null,g=null;for(let h=0,d=l.length;h<d;h++){u=l[h];for(let p=0,m=u.length;p<m;p++)g=u[p],u[p]=[g[0]+A,g[1]+c]}return a},r=(s,a)=>{const{xOffset:A,yOffset:c,input:l,font:u,height:g,align:h,extrudeOffset:d,lineSpacing:p,letterSpacing:m}=o(s,a);let[_,f]=[A,c],I,C,y,x,E,B,S={width:0,segments:[]};const Q=[];let w=[],M=0;const k=_,R=()=>{Q.push(S),M=Math.max(M,S.width),S={width:0,segments:[]}};for(I=0,C=l.length;I<C;I++){if(y=l[I],x=n({xOffset:_,yOffset:f,font:u,height:g,extrudeOffset:d},y),y===`
`){_=k,f-=x.height*p,R();continue}E=x.width*m,S.width+=E,_+=E,y!==" "&&(S.segments=S.segments.concat(x.segments))}for(S.segments.length&&R(),I=0,C=Q.length;I<C;I++)S=Q[I],M>S.width&&(B=M-S.width,h==="right"?S=i({x:B},S):h==="center"&&(S=i({x:B/2},S))),w=w.concat(S.segments);return w};e.exports=r}}),gpi=yt({"node_modules/@jscad/modeling/src/text/index.js"(t,e){e.exports={vectorChar:drn(),vectorText:upi()}}}),MX=yt({"node_modules/@jscad/modeling/src/utils/areAllShapesTheSameType.js"(t,e){var n=Ya(),o=Ta(),i=Au(),r=s=>{let a;for(const A of s){let c=0;if(n.isA(A)&&(c=1),o.isA(A)&&(c=2),i.isA(A)&&(c=3),a&&c!==a)return!1;a=c}return!0};e.exports=r}}),dpi=yt({"node_modules/@jscad/modeling/src/utils/degToRad.js"(t,e){var n=o=>o*.017453292519943295;e.exports=n}}),hrn=yt({"node_modules/@jscad/modeling/src/utils/fnNumberSort.js"(t,e){var n=(o,i)=>o-i;e.exports=n}}),hpi=yt({"node_modules/@jscad/modeling/src/utils/insertSorted.js"(t,e){var n=(o,i,r)=>{let s=0,a=o.length;for(;a>s;){const A=Math.floor((s+a)/2),c=o[A];r(i,c)>0?s=A+1:a=A}o.splice(s,0,i)};e.exports=n}}),ppi=yt({"node_modules/@jscad/modeling/src/utils/radiusToSegments.js"(t,e){var{TAU:n}=mc(),o=(i,r,s)=>{const a=r>0?i*n/r:0,A=s>0?n/s:0;return Math.ceil(Math.max(a,A,4))};e.exports=o}}),mpi=yt({"node_modules/@jscad/modeling/src/utils/radToDeg.js"(t,e){var n=o=>o*57.29577951308232;e.exports=n}}),prn=yt({"node_modules/@jscad/modeling/src/utils/index.js"(t,e){e.exports={areAllShapesTheSameType:MX(),degToRad:dpi(),flatten:ga(),fnNumberSort:hrn(),insertSorted:hpi(),radiusToSegments:ppi(),radToDeg:mpi()}}}),vVe=yt({"node_modules/@jscad/modeling/src/operations/booleans/fromFakePolygons.js"(t,e){var n=_A(),o=Ya(),i=(s,a)=>{if(a.vertices.length<4)return null;const A=[],c=a.vertices.filter((g,h)=>g[2]>0?(A.push(h),!0):!1);if(c.length!==2)throw new Error("Assertion failed: fromFakePolygon: not enough points found");const l=c.map(g=>{const h=Math.round(g[0]/s)*s+0,d=Math.round(g[1]/s)*s+0;return n.fromValues(h,d)});if(n.equals(l[0],l[1]))return null;const u=A[1]-A[0];if(u===1||u===3)u===1&&l.reverse();else throw new Error("Assertion failed: fromFakePolygon: unknown index ordering");return l},r=(s,a)=>{const A=a.map(c=>i(s,c)).filter(c=>c!==null);return o.create(A)};e.exports=r}}),wVe=yt({"node_modules/@jscad/modeling/src/operations/booleans/to3DWalls.js"(t,e){var n=$r(),o=Ya(),i=Ta(),r=XA(),s=(A,c,l)=>{const u=[n.fromVec2(n.create(),l[0],A),n.fromVec2(n.create(),l[1],A),n.fromVec2(n.create(),l[1],c),n.fromVec2(n.create(),l[0],c)];return r.create(u)},a=(A,c)=>{const u=o.toSides(c).map(h=>s(A.z0,A.z1,h));return i.create(u)};e.exports=a}}),_pi=yt({"node_modules/@jscad/modeling/src/maths/OrthoNormalBasis.js"(t,e){var n=Du(),o=_A(),i=$r(),r=function(s,a){arguments.length<2&&(a=i.orthogonal(i.create(),s)),this.v=i.normalize(i.create(),i.cross(i.create(),s,a)),this.u=i.cross(i.create(),this.v,s),this.plane=s,this.planeorigin=i.scale(i.create(),s,s[3])};r.prototype={getProjectionMatrix:function(){return n.fromValues(this.u[0],this.v[0],this.plane[0],0,this.u[1],this.v[1],this.plane[1],0,this.u[2],this.v[2],this.plane[2],0,0,0,-this.plane[3],1)},getInverseProjectionMatrix:function(){const s=i.scale(i.create(),this.plane,this.plane[3]);return n.fromValues(this.u[0],this.u[1],this.u[2],0,this.v[0],this.v[1],this.v[2],0,this.plane[0],this.plane[1],this.plane[2],0,s[0],s[1],s[2],1)},to2D:function(s){return o.fromValues(i.dot(s,this.u),i.dot(s,this.v))},to3D:function(s){const a=i.scale(i.create(),this.u,s[0]),A=i.scale(i.create(),this.v,s[1]),c=i.add(a,a,this.planeorigin);return i.add(A,A,c)}},e.exports=r}}),fpi=yt({"node_modules/@jscad/modeling/src/operations/modifiers/reTesselateCoplanarPolygons.js"(t,e){var{EPS:n}=mc(),o=EVe(),i=_A(),r=_pi(),s=Win(),{insertSorted:a,fnNumberSort:A}=prn(),c=XA(),l=u=>{if(u.length<2)return u;const g=[],h=u.length,d=c.plane(u[0]),p=new r(d),m=[],_=[],f=new Map,I=new Map,C=new Map,y=10/n;for(let S=0;S<h;S++){const Q=u[S];let w=[],M=Q.vertices.length,k=-1;if(M>0){let R,F;for(let O=0;O<M;O++){let U=p.to2D(Q.vertices[O]);const Y=Math.floor(U[1]*y);let W;C.has(Y)?W=C.get(Y):C.has(Y+1)?W=C.get(Y+1):C.has(Y-1)?W=C.get(Y-1):(W=U[1],C.set(Y,U[1])),U=i.fromValues(U[0],W),w.push(U);const te=U[1];(O===0||te<R)&&(R=te,k=O),(O===0||te>F)&&(F=te);let j=I.get(te);j||(j={},I.set(te,j)),j[S]=!0}if(R>=F)w=[],M=0,k=-1;else{let O=f.get(R);O||(O=[],f.set(R,O)),O.push(S)}}w.reverse(),k=M-k-1,m.push(w),_.push(k)}const x=[];I.forEach((S,Q)=>x.push(Q)),x.sort(A);let E=[],B=[];for(let S=0;S<x.length;S++){const Q=[],w=x[S],M=I.get(w);let k=0;for(let F=0;F<E.length;++F){const O=E[F],U=O.polygonindex;if(M[U]){const Y=m[U],W=Y.length;let te=O.leftvertexindex,j=O.rightvertexindex;for(;;){let oe=te+1;if(oe>=W&&(oe=0),Y[oe][1]!==w)break;te=oe}let J=j-1;if(J<0&&(J=W-1),Y[J][1]===w&&(j=J),te!==O.leftvertexindex&&te===j)O._remove=!0,k++;else{O.leftvertexindex=te,O.rightvertexindex=j,O.topleft=Y[te],O.topright=Y[j];let oe=te+1;oe>=W&&(oe=0),O.bottomleft=Y[oe];let ie=j-1;ie<0&&(ie=W-1),O.bottomright=Y[ie]}}}k>0&&(E=E.filter(F=>!F._remove));let R;if(S>=x.length-1)E=[],R=null;else{R=Number(x[S+1]);const F=.5*(w+R),O=f.get(w);for(const U in O){const Y=O[U],W=m[Y],te=W.length,j=_[Y];let J=j;for(;;){let ge=J+1;if(ge>=te&&(ge=0),W[ge][1]!==w||ge===j)break;J=ge}let oe=j;for(;;){let ge=oe-1;if(ge<0&&(ge=te-1),W[ge][1]!==w||ge===J)break;oe=ge}let ie=J+1;ie>=te&&(ie=0);let ne=oe-1;ne<0&&(ne=te-1);const le={polygonindex:Y,leftvertexindex:J,rightvertexindex:oe,topleft:W[J],topright:W[oe],bottomleft:W[ie],bottomright:W[ne]};a(E,le,(ge,_e)=>{const ue=s(ge.topleft,ge.bottomleft,F),fe=s(_e.topleft,_e.bottomleft,F);return ue>fe?1:ue<fe?-1:0})}}for(const F in E){const O=E[F];let U=s(O.topleft,O.bottomleft,w);const Y=i.fromValues(U,w);U=s(O.topright,O.bottomright,w);const W=i.fromValues(U,w);U=s(O.topleft,O.bottomleft,R);const te=i.fromValues(U,R);U=s(O.topright,O.bottomright,R);const j=i.fromValues(U,R),J={topleft:Y,topright:W,bottomleft:te,bottomright:j,leftline:o.fromPoints(o.create(),Y,te),rightline:o.fromPoints(o.create(),j,W)};if(Q.length>0){const oe=Q[Q.length-1],ie=i.distance(J.topleft,oe.topright),ne=i.distance(J.bottomleft,oe.bottomright);ie<n&&ne<n&&(J.topleft=oe.topleft,J.leftline=oe.leftline,J.bottomleft=oe.bottomleft,Q.splice(Q.length-1,1))}Q.push(J)}if(S>0){const F=new Set,O=new Set;for(let U=0;U<Q.length;U++){const Y=Q[U];for(let W=0;W<B.length;W++)if(!O.has(W)){const te=B[W];if(i.distance(te.bottomleft,Y.topleft)<n&&i.distance(te.bottomright,Y.topright)<n){O.add(W);const j=o.direction(Y.leftline),J=o.direction(te.leftline),oe=j[0]-J[0],ie=o.direction(Y.rightline),ne=o.direction(te.rightline),le=ie[0]-ne[0],ge=Math.abs(oe)<n,_e=Math.abs(le)<n,ue=ge||oe>=0,fe=_e||le>=0;ue&&fe&&(Y.outpolygon=te.outpolygon,Y.leftlinecontinues=ge,Y.rightlinecontinues=_e,F.add(W));break}}}for(let U=0;U<B.length;U++)if(!F.has(U)){const Y=B[U];Y.outpolygon.rightpoints.push(Y.bottomright),i.distance(Y.bottomright,Y.bottomleft)>n&&Y.outpolygon.leftpoints.push(Y.bottomleft),Y.outpolygon.leftpoints.reverse();const te=Y.outpolygon.rightpoints.concat(Y.outpolygon.leftpoints).map(J=>p.to3D(J)),j=c.fromPointsAndPlane(te,d);j.vertices.length&&g.push(j)}}for(let F=0;F<Q.length;F++){const O=Q[F];O.outpolygon?(O.leftlinecontinues||O.outpolygon.leftpoints.push(O.topleft),O.rightlinecontinues||O.outpolygon.rightpoints.push(O.topright)):(O.outpolygon={leftpoints:[],rightpoints:[]},O.outpolygon.leftpoints.push(O.topleft),i.distance(O.topleft,O.topright)>n&&O.outpolygon.rightpoints.push(O.topright))}B=Q}return g};e.exports=l}}),DX=yt({"node_modules/@jscad/modeling/src/operations/modifiers/retessellate.js"(t,e){var n=Ta(),o=XA(),{NEPS:i}=mc(),r=fpi(),s=c=>{if(c.isRetesselated)return c;const l=n.toPolygons(c).map((d,p)=>({vertices:d.vertices,plane:o.plane(d),index:p})),u=a(l),g=[];u.forEach(d=>{if(Array.isArray(d)){const p=r(d);for(let m=0;m<p.length;m++)g.push(p[m])}else g.push(d)});const h=n.create(g);return h.isRetesselated=!0,h},a=c=>{let l=[c];const u=[];for(let h=3;h>=0;h--){const d=[],p=h===3?15e-9:i;l.forEach(m=>{m.sort(A(h,p));let _=0;for(let f=1;f<m.length;f++)m[f].plane[h]-m[_].plane[h]>p&&(f-_===1?u.push(m[_]):d.push(m.slice(_,f)),_=f);m.length-_===1?u.push(m[_]):d.push(m.slice(_))}),l=d}const g=[];return l.forEach(h=>{h[0]&&(g[h[0].index]=h)}),u.forEach(h=>{g[h.index]=h}),g},A=(c,l)=>(u,g)=>u.plane[c]-g.plane[c]>l?1:g.plane[c]-u.plane[c]>l?-1:0;e.exports=s}}),PVe=yt({"node_modules/@jscad/modeling/src/operations/booleans/mayOverlap.js"(t,e){var{EPS:n}=mc(),o=oT(),i=(r,s)=>{if(r.polygons.length===0||s.polygons.length===0)return!1;const a=o(r),A=a[0],c=a[1],l=o(s),u=l[0],g=l[1];return!(u[0]-c[0]>n||A[0]-g[0]>n||u[1]-c[1]>n||A[1]-g[1]>n||u[2]-c[2]>n||A[2]-g[2]>n)};e.exports=i}}),Ipi=yt({"node_modules/@jscad/modeling/src/operations/booleans/trees/Node.js"(t,e){var n=S6(),o=XA(),i=class bit{constructor(s){this.plane=null,this.front=null,this.back=null,this.polygontreenodes=[],this.parent=s}invert(){const s=[this];let a;for(let A=0;A<s.length;A++){a=s[A],a.plane&&(a.plane=n.flip(n.create(),a.plane)),a.front&&s.push(a.front),a.back&&s.push(a.back);const c=a.front;a.front=a.back,a.back=c}}clipPolygons(s,a){let A={node:this,polygontreenodes:s},c;const l=[];do{if(c=A.node,s=A.polygontreenodes,c.plane){const u=c.plane,g=[],h=[],d=a?g:h,p=s.length;for(let _=0;_<p;_++){const f=s[_];f.isRemoved()||f.splitByPlane(u,d,g,h,g)}c.front&&h.length>0&&l.push({node:c.front,polygontreenodes:h});const m=g.length;if(c.back&&m>0)l.push({node:c.back,polygontreenodes:g});else for(let _=0;_<m;_++)g[_].remove()}A=l.pop()}while(A!==void 0)}clipTo(s,a){let A=this;const c=[];do A.polygontreenodes.length>0&&s.rootnode.clipPolygons(A.polygontreenodes,a),A.front&&c.push(A.front),A.back&&c.push(A.back),A=c.pop();while(A!==void 0)}addPolygonTreeNodes(s){let a={node:this,polygontreenodes:s};const A=[];do{const c=a.node,l=a.polygontreenodes;if(l.length===0){a=A.pop();continue}if(!c.plane){let d=0;d=Math.floor(l.length/2);const p=l[d].getPolygon();c.plane=o.plane(p)}const u=[],g=[],h=l.length;for(let d=0;d<h;++d)l[d].splitByPlane(c.plane,c.polygontreenodes,g,u,g);u.length>0&&(c.front||(c.front=new bit(c)),h===u.length&&g.length===0?c.front.polygontreenodes=u:A.push({node:c.front,polygontreenodes:u})),g.length>0&&(c.back||(c.back=new bit(c)),h===g.length&&u.length===0?c.back.polygontreenodes=g:A.push({node:c.back,polygontreenodes:g})),a=A.pop()}while(a!==void 0)}};e.exports=i}}),Cpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/trees/splitLineSegmentByPlane.js"(t,e){var n=$r(),o=(i,r,s)=>{const a=n.subtract(n.create(),s,r);let A=(i[3]-n.dot(i,r))/n.dot(i,a);return Number.isNaN(A)&&(A=0),A>1&&(A=1),A<0&&(A=0),n.scale(a,a,A),n.add(a,r,a),a};e.exports=o}}),ypi=yt({"node_modules/@jscad/modeling/src/operations/booleans/trees/splitPolygonByPlane.js"(t,e){var{EPS:n}=mc(),o=S6(),i=$r(),r=XA(),s=Cpi(),a=n*n,A=l=>{const u=[];let g=l[l.length-1];for(let h=0;h<l.length;h++){const d=l[h];i.squaredDistance(d,g)>=a&&u.push(d),g=d}return u},c=(l,u)=>{const g={type:null,front:null,back:null},h=u.vertices,d=h.length,p=r.plane(u);if(o.equals(p,l))g.type=0;else{let m=!1,_=!1;const f=[],I=-n;for(let C=0;C<d;C++){const y=i.dot(l,h[C])-l[3],x=y<I;f.push(x),y>n&&(m=!0),y<I&&(_=!0)}if(!m&&!_){const C=i.dot(l,p);g.type=C>=0?0:1}else if(!_)g.type=2;else if(!m)g.type=3;else{g.type=4;const C=[],y=[];let x=f[0];for(let E=0;E<d;E++){const B=h[E];let S=E+1;S>=d&&(S=0);const Q=f[S];if(x===Q)x?y.push(B):C.push(B);else{const w=h[S],M=s(l,B,w);x?(y.push(B),y.push(M),C.push(M)):(C.push(B),C.push(M),y.push(M))}x=Q}if(C.length>=3){const E=A(C);E.length>=3&&(g.front=r.fromPointsAndPlane(E,p))}if(y.length>=3){const E=A(y);E.length>=3&&(g.back=r.fromPointsAndPlane(E,p))}}}return g};e.exports=c}}),xpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/trees/PolygonTreeNode.js"(t,e){var{EPS:n}=mc(),o=$r(),i=XA(),r=ypi(),s=class C4n{constructor(A,c){this.parent=A,this.children=[],this.polygon=c,this.removed=!1}addPolygons(A){if(!this.isRootNode())throw new Error("Assertion failed");const c=this;A.forEach(l=>{c.addChild(l)})}remove(){this.removed||(this.removed=!0,this.polygon=null,this.parent.recursivelyInvalidatePolygon())}isRemoved(){return this.removed}isRootNode(){return!this.parent}invert(){if(!this.isRootNode())throw new Error("Assertion failed");this.invertSub()}getPolygon(){if(!this.polygon)throw new Error("Assertion failed");return this.polygon}getPolygons(A){if(this.isRootNode()&&this.children.length>0){const p=[];for(let m=0;m<this.children.length;m++)this.children[m].removed||p.push(this.children[m]);this.children=p}let c=[this];const l=[c];let u,g,h,d;for(u=0;u<l.length;++u)for(c=l[u],g=0,h=c.length;g<h;g++)d=c[g],d.polygon?A.push(d.polygon):d.children.length>0&&l.push(d.children)}splitByPlane(A,c,l,u,g){if(this.children.length){const h=[this.children];let d,p,m,_,f;for(d=0;d<h.length;d++)for(f=h[d],p=0,m=f.length;p<m;p++)_=f[p],_.children.length>0?h.push(_.children):_._splitByPlane(A,c,l,u,g)}else this._splitByPlane(A,c,l,u,g)}_splitByPlane(A,c,l,u,g){const h=this.polygon;if(h){const d=i.measureBoundingSphere(h),p=d[3]+n,m=d,_=o.dot(A,m)-A[3];if(_>p)u.push(this);else if(_<-p)g.push(this);else{const f=r(A,h);switch(f.type){case 0:c.push(this);break;case 1:l.push(this);break;case 2:u.push(this);break;case 3:g.push(this);break;case 4:if(f.front){const I=this.addChild(f.front);u.push(I)}if(f.back){const I=this.addChild(f.back);g.push(I)}break}}}}addChild(A){const c=new C4n(this,A);return this.children.push(c),c}invertSub(){let A=[this];const c=[A];let l,u,g,h;for(l=0;l<c.length;l++)for(A=c[l],u=0,g=A.length;u<g;u++)h=A[u],h.polygon&&(h.polygon=i.invert(h.polygon)),h.children.length>0&&c.push(h.children)}recursivelyInvalidatePolygon(){this.polygon=null,this.parent&&this.parent.recursivelyInvalidatePolygon()}clear(){let A=[this];const c=[A];for(let l=0;l<c.length;++l){A=c[l];const u=A.length;for(let g=0;g<u;g++){const h=A[g];h.polygon&&(h.polygon=null),h.parent&&(h.parent=null),h.children.length>0&&c.push(h.children),h.children=[]}}}toString(){let A="",c=[this];const l=[c];let u,g,h,d;for(u=0;u<l.length;++u){c=l[u];const p=" ".repeat(u);for(g=0,h=c.length;g<h;g++)d=c[g],A+=`${p}PolygonTreeNode (${d.isRootNode()}): ${d.children.length}`,d.polygon?A+=`
 ${p}polygon: ${d.polygon.vertices}
`:A+=`
`,d.children.length>0&&l.push(d.children)}return A}};e.exports=s}}),Epi=yt({"node_modules/@jscad/modeling/src/operations/booleans/trees/Tree.js"(t,e){var n=Ipi(),o=xpi(),i=class{constructor(r){this.polygonTree=new o,this.rootnode=new n(null),r&&this.addPolygons(r)}invert(){this.polygonTree.invert(),this.rootnode.invert()}clipTo(r,s=!1){this.rootnode.clipTo(r,s)}allPolygons(){const r=[];return this.polygonTree.getPolygons(r),r}addPolygons(r){const s=new Array(r.length);for(let a=0;a<r.length;a++)s[a]=this.polygonTree.addChild(r[a]);this.rootnode.addPolygonTreeNodes(s)}clear(){this.polygonTree.clear()}toString(){return"Tree: "+this.polygonTree.toString("")}};e.exports=i}}),MVe=yt({"node_modules/@jscad/modeling/src/operations/booleans/trees/index.js"(t,e){e.exports={Tree:Epi()}}}),Bpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/intersectGeom3Sub.js"(t,e){var n=Ta(),o=PVe(),{Tree:i}=MVe(),r=(s,a)=>{if(!o(s,a))return n.create();const A=new i(n.toPolygons(s)),c=new i(n.toPolygons(a));A.invert(),c.clipTo(A),c.invert(),A.clipTo(c),c.clipTo(A),A.addPolygons(c.allPolygons()),A.invert();const l=A.allPolygons();return n.create(l)};e.exports=r}}),mrn=yt({"node_modules/@jscad/modeling/src/operations/booleans/intersectGeom3.js"(t,e){var n=ga(),o=DX(),i=Bpi(),r=(...s)=>{s=n(s);let a=s.shift();return s.forEach(A=>{a=i(a,A)}),a=o(a),a};e.exports=r}}),bpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/intersectGeom2.js"(t,e){var n=ga(),o=Ta(),i=gP(),r=vVe(),s=wVe(),a=mrn(),A=(...c)=>{c=n(c);const l=c.map(h=>s({z0:-1,z1:1},h)),u=a(l),g=i(u);return r(g,o.toPolygons(u))};e.exports=A}}),Spi=yt({"node_modules/@jscad/modeling/src/operations/booleans/intersect.js"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=bpi(),a=mrn(),A=(...c)=>{if(c=n(c),c.length===0)throw new Error("wrong number of arguments");if(!o(c))throw new Error("only intersect of the types are supported");const l=c[0];return i.isA(l)?s(c):r.isA(l)?a(c):l};e.exports=A}}),DVe=yt({"node_modules/@jscad/modeling/src/operations/hulls/hullPoints3.js"(t,e){var n=XA(),o=yin(),i=r=>o(r,{skipTriangulation:!0}).map(A=>{const c=A.map(l=>r[l]);return n.create(c)});e.exports=i}}),_rn=yt({"node_modules/@jscad/modeling/src/operations/booleans/unionGeom3Sub.js"(t,e){var n=Ta(),o=PVe(),{Tree:i}=MVe(),r=(a,A)=>{if(!o(a,A))return s(a,A);const c=new i(n.toPolygons(a)),l=new i(n.toPolygons(A));c.clipTo(l,!1),l.clipTo(c),l.invert(),l.clipTo(c),l.invert();const u=c.allPolygons().concat(l.allPolygons());return n.create(u)},s=(a,A)=>{let c=n.toPolygons(a);return c=c.concat(n.toPolygons(A)),n.create(c)};e.exports=r}}),NVe=yt({"node_modules/@jscad/modeling/src/operations/booleans/unionGeom3.js"(t,e){var n=ga(),o=DX(),i=_rn(),r=(...s)=>{s=n(s);let a;for(a=1;a<s.length;a+=2)s.push(i(s[a-1],s[a]));let A=s[a-1];return A=o(A),A};e.exports=r}}),frn=yt({"node_modules/@jscad/modeling/src/operations/minkowski/minkowskiSum.js"(t,e){var n=ga(),o=Ta(),i=XA(),r=DVe(),s=NVe(),a=(...h)=>{if(h=n(h),h.length!==2)throw new Error("minkowskiSum requires exactly two geometries");const[d,p]=h;if(!o.isA(d)||!o.isA(p))throw new Error("minkowskiSum requires geom3 geometries");const m=o.isConvex(d),_=o.isConvex(p);if(m&&_)return u(d,p);if(!m&&_)return A(d,p);if(m&&!_)return A(p,d);throw new Error("minkowskiSum of two non-convex geometries is not yet supported")},A=(h,d)=>{const p=c(h);if(p.length===0)return o.create();const m=p.map(_=>u(_,d));return m.length===1?m[0]:s(m)},c=h=>{const d=o.toPolygons(h);if(d.length===0)return[];const p=[];for(let m=0;m<d.length;m++){const _=d[m],f=_.vertices;let I=0,C=0,y=0;for(let M=0;M<f.length;M++)I+=f[M][0],C+=f[M][1],y+=f[M][2];I/=f.length,C/=f.length,y/=f.length;const x=i.plane(_),E=x[0],B=x[1],S=x[2],Q=.1,w=[I-E*Q,C-B*Q,y-S*Q];for(let M=1;M<f.length-1;M++){const k=f[0],R=f[M],F=f[M+1],O=l(w,k,R,F);p.push(o.create(O))}}return p},l=(h,d,p,m)=>[i.create([h,p,d]),i.create([h,d,m]),i.create([d,p,m]),i.create([p,h,m])],u=(h,d)=>{const p=g(h),m=g(d);if(p.length===0||m.length===0)return o.create();const _=[];for(let I=0;I<p.length;I++){const C=p[I];for(let y=0;y<m.length;y++){const x=m[y];_.push([C[0]+x[0],C[1]+x[1],C[2]+x[2]])}}const f=r(_);return o.create(f)},g=h=>{const d=new Set,p=[],m=o.toPolygons(h);for(let _=0;_<m.length;_++){const f=m[_].vertices;for(let I=0;I<f.length;I++){const C=f[I],y=`${C[0]},${C[1]},${C[2]}`;d.has(y)||(d.add(y),p.push(C))}}return p};e.exports=a}}),Qpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/scissionGeom3.js"(t,e){var n=$r(),o=gP(),i=Ta(),r=c=>c.sort((l,u)=>l-u).filter((l,u,g)=>!u||l!==g[u-1]),s=(c,l,u)=>{const g=`${l}`,h=c.get(g);h===void 0?c.set(g,[u]):h.push(u)},a=(c,l)=>{const u=`${l}`;return c.get(u)},A=c=>{const l=o(c),u=i.toPolygons(c),g=u.length,h=new Map,d=n.create();u.forEach((I,C)=>{I.vertices.forEach(y=>{s(h,n.snap(d,y,l),C)})});const p=u.map(I=>{let C=[];return I.vertices.forEach(y=>{C=C.concat(a(h,n.snap(d,y,l)))}),{e:1,d:r(C)}});h.clear();let m=0;const _=p.length;for(let I=0;I<_;I++){const C=p[I];if(C.e>0){const y=new Array(g);y[I]=!0;do m=0,y.forEach((x,E)=>{const B=p[E];if(B.e>0){B.e=-1;for(let S=0;S<B.d.length;S++)y[B.d[S]]=!0;m++}});while(m>0);C.indexes=y}}const f=[];for(let I=0;I<_;I++)if(p[I].indexes){const C=[];p[I].indexes.forEach((y,x)=>C.push(u[x])),f.push(i.create(C))}return f};e.exports=A}}),vpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/scission.js"(t,e){var n=ga(),o=Ta(),i=Qpi(),r=(...s)=>{if(s=n(s),s.length===0)throw new Error("wrong number of arguments");const a=s.map(A=>o.isA(A)?i(A):A);return a.length===1?a[0]:a};e.exports=r}}),wpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/subtractGeom3Sub.js"(t,e){var n=Ta(),o=PVe(),{Tree:i}=MVe(),r=(s,a)=>{if(!o(s,a))return n.clone(s);const A=new i(n.toPolygons(s)),c=new i(n.toPolygons(a));A.invert(),A.clipTo(c),c.clipTo(A,!0),A.addPolygons(c.allPolygons()),A.invert();const l=A.allPolygons();return n.create(l)};e.exports=r}}),Irn=yt({"node_modules/@jscad/modeling/src/operations/booleans/subtractGeom3.js"(t,e){var n=ga(),o=DX(),i=wpi(),r=(...s)=>{s=n(s);let a=s.shift();return s.forEach(A=>{a=i(a,A)}),a=o(a),a};e.exports=r}}),Ppi=yt({"node_modules/@jscad/modeling/src/operations/booleans/subtractGeom2.js"(t,e){var n=ga(),o=Ta(),i=gP(),r=vVe(),s=wVe(),a=Irn(),A=(...c)=>{c=n(c);const l=c.map(h=>s({z0:-1,z1:1},h)),u=a(l),g=i(u);return r(g,o.toPolygons(u))};e.exports=A}}),Mpi=yt({"node_modules/@jscad/modeling/src/operations/booleans/subtract.js"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=Ppi(),a=Irn(),A=(...c)=>{if(c=n(c),c.length===0)throw new Error("wrong number of arguments");if(!o(c))throw new Error("only subtract of the types are supported");const l=c[0];return i.isA(l)?s(c):r.isA(l)?a(c):l};e.exports=A}}),Crn=yt({"node_modules/@jscad/modeling/src/operations/booleans/unionGeom2.js"(t,e){var n=ga(),o=Ta(),i=gP(),r=vVe(),s=wVe(),a=NVe(),A=(...c)=>{c=n(c);const l=c.map(h=>s({z0:-1,z1:1},h)),u=a(l),g=i(u);return r(g,o.toPolygons(u))};e.exports=A}}),RVe=yt({"node_modules/@jscad/modeling/src/operations/booleans/union.js"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=Crn(),a=NVe(),A=(...c)=>{if(c=n(c),c.length===0)throw new Error("wrong number of arguments");if(!o(c))throw new Error("only unions of the same type are supported");const l=c[0];return i.isA(l)?s(c):r.isA(l)?a(c):l};e.exports=A}}),NX=yt({"node_modules/@jscad/modeling/src/operations/booleans/index.js"(t,e){e.exports={intersect:Spi(),minkowski:frn(),scission:vpi(),subtract:Mpi(),union:RVe()}}}),ipe=yt({"node_modules/@jscad/modeling/src/operations/expansions/offsetFromPoints.js"(t,e){var{EPS:n,TAU:o}=mc(),i=jin(),r=EVe(),s=_A(),a=tpe(),A=(c,l)=>{const u={delta:1,corners:"edge",closed:!1,segments:16};let{delta:g,corners:h,closed:d,segments:p}=Object.assign({},u,c);if(Math.abs(g)<n)return l;let m=c.closed?a(l):1;m===0&&(m=1);const _=m>0&&g>=0||m<0&&g<0;g=Math.abs(g);let f=null,I=[];const C=[],y=s.create(),x=l.length;for(let E=0;E<x;E++){const B=(E+1)%x,S=l[E],Q=l[B];_?s.subtract(y,S,Q):s.subtract(y,Q,S),s.normal(y,y),s.normalize(y,y),s.scale(y,y,g);const w=s.add(s.create(),S,y),M=s.add(s.create(),Q,y),k=[w,M];if(f!=null&&(d||!d&&B!==0)){const R=i(f[0],f[1],k[0],k[1]);R?(I.pop(),k[0]=R):C.push({c:S,s0:f,s1:k})}f=[w,M],!(B===0&&!d)&&(I.push(k[0]),I.push(k[1]))}if(d&&f!=null){const E=I[0],B=I[1],S=i(f[0],f[1],E,B);if(S)I[0]=S,I.pop();else{const Q=l[0],w=[E,B];C.push({c:Q,s0:f,s1:w})}}if(h==="edge"){const E=new Map;I.forEach((Q,w)=>E.set(Q,w));const B=r.create(),S=r.create();C.forEach(Q=>{r.fromPoints(B,Q.s0[0],Q.s0[1]),r.fromPoints(S,Q.s1[0],Q.s1[1]);const w=r.intersectPointOfLines(B,S);if(Number.isFinite(w[0])&&Number.isFinite(w[1])){const M=Q.s0[1],k=E.get(M);I[k]=w,I[(k+1)%I.length]=void 0}else{const M=Q.s1[0],k=E.get(M);I[k]=void 0}}),I=I.filter(Q=>Q!==void 0)}if(h==="round"){let E=Math.floor(p/4);const B=s.create();C.forEach(S=>{let Q=s.angle(s.subtract(B,S.s1[0],S.c));if(Q-=s.angle(s.subtract(B,S.s0[1],S.c)),_&&Q<0&&(Q=Q+Math.PI,Q<0&&(Q=Q+Math.PI)),!_&&Q>0&&(Q=Q-Math.PI,Q>0&&(Q=Q-Math.PI)),Q!==0){E=Math.floor(p*(Math.abs(Q)/o));const w=Q/E,M=s.angle(s.subtract(B,S.s0[1],S.c)),k=[];for(let R=1;R<E;R++){const F=M+w*R,O=s.fromAngleRadians(s.create(),F);s.scale(O,O,g),s.add(O,O,S.c),k.push(O)}if(k.length>0){const R=S.s0[1];let F=I.findIndex(O=>s.equals(R,O));F=(F+1)%I.length,I.splice(F,0,...k)}}else{const w=S.s1[0],M=I.findIndex(k=>s.equals(w,k));I.splice(M,1)}})}return I};e.exports=A}}),Dpi=yt({"node_modules/@jscad/modeling/src/operations/expansions/expandGeom2.js"(t,e){var n=Ya(),o=ipe(),i=(r,s)=>{const a={delta:1,corners:"edge",segments:16},{delta:A,corners:c,segments:l}=Object.assign({},a,r);if(!(c==="edge"||c==="chamfer"||c==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');const h=n.toOutlines(s).map(d=>(r={delta:A,corners:c,closed:!0,segments:l},o(r,d))).reduce((d,p)=>d.concat(n.toSides(n.fromPoints(p))),[]);return n.create(h)};e.exports=i}}),Npi=yt({"node_modules/@jscad/modeling/src/operations/expansions/extrudePolygon.js"(t,e){var n=Du(),o=$r(),i=Ta(),r=XA(),s=(a,A)=>{o.dot(r.plane(A),a)>0&&(A=r.invert(A));const l=[A],u=r.transform(n.fromTranslation(n.create(),a),A),g=A.vertices.length;for(let h=0;h<g;h++){const d=h<g-1?h+1:0,p=r.create([A.vertices[h],u.vertices[h],u.vertices[d],A.vertices[d]]);l.push(p)}return l.push(r.invert(u)),i.create(l)};e.exports=s}}),Rpi=yt({"node_modules/@jscad/modeling/src/operations/expansions/expandShell.js"(t,e){var{EPS:n,TAU:o}=mc(),i=Du(),r=$r(),s=hrn(),a=Ta(),A=XA(),c=arn(),l=DX(),u=_rn(),g=Npi(),h=(_,f,I)=>{const C=f.toString();if(_.has(C))_.get(C)[1].push(I);else{const y=[f,[I]];_.set(C,y)}},d=(_,f,I)=>{const C=f[0].toString(),y=f[1].toString(),x=C<y?`${C},${y}`:`${y},${C}`;if(_.has(x))_.get(x)[1].push(I);else{const E=[f,[I]];_.set(x,E)}},p=(_,f)=>{_.findIndex(C=>C===f)<0&&_.push(f)},m=(_,f)=>{const I={delta:1,segments:12},{delta:C,segments:y}=Object.assign({},I,_);let x=a.create();const E=new Map,B=new Map,S=r.create(),Q=r.create();return a.toPolygons(f).forEach((M,k)=>{const R=r.scale(r.create(),A.plane(M),2*C),F=A.transform(i.fromTranslation(i.create(),r.scale(r.create(),R,-.5)),M),O=g(R,F);x=u(x,O);const U=M.vertices;for(let Y=0;Y<U.length;Y++){h(E,U[Y],A.plane(M));const W=(Y+1)%U.length,te=[U[Y],U[W]];d(B,te,A.plane(M))}}),B.forEach(M=>{const k=M[0],R=M[1],F=k[0],O=k[1],U=r.subtract(r.create(),O,F);r.normalize(U,U);const Y=R[0],W=r.cross(r.create(),Y,U);let te=[];for(let _e=0;_e<y;_e++)p(te,_e*o/y);for(let _e=0,ue=R.length;_e<ue;_e++){const fe=R[_e],pe=r.dot(W,fe),ye=r.dot(Y,fe);let Me=Math.atan2(pe,ye);Me<0&&(Me+=o),p(te,Me),Me=Math.atan2(-pe,-ye),Me<0&&(Me+=o),p(te,Me)}te=te.sort(s);const j=te.length;let J,oe;const ie=[],ne=[],le=[];for(let _e=-1;_e<j;_e++){const ue=te[_e<0?_e+j:_e],fe=Math.sin(ue),pe=Math.cos(ue);r.scale(S,Y,pe*C),r.scale(Q,W,fe*C),r.add(S,S,Q);const ye=r.add(r.create(),F,S),Me=r.add(r.create(),O,S);let ve=!1;if(_e>=0&&r.distance(ye,J)<n&&(ve=!0),!ve){if(_e>=0){ie.push(ye),ne.push(Me);const he=[oe,Me,ye,J],Qe=A.create(he);le.push(Qe)}J=ye,oe=Me}}ne.reverse(),le.push(A.create(ie)),le.push(A.create(ne));const ge=a.create(le);x=u(x,ge)}),E.forEach(M=>{const k=M[0],R=M[1],F=R[0];let O=null,U=0;for(let j=1;j<R.length;j++){const J=R[j],oe=r.cross(S,F,J),ie=r.length(oe);ie>.05&&ie>U&&(U=ie,O=J)}O||(O=r.orthogonal(S,F));const Y=r.cross(S,F,O);r.normalize(Y,Y);const W=r.cross(Q,Y,F),te=c({center:[k[0],k[1],k[2]],radius:C,segments:y,axes:[F,Y,W]});x=u(x,te)}),l(x)};e.exports=m}}),Tpi=yt({"node_modules/@jscad/modeling/src/operations/expansions/expandGeom3.js"(t,e){var n=Ta(),o=RVe(),i=Rpi(),r=(s,a)=>{const A={delta:1,corners:"round",segments:12},{delta:c,corners:l,segments:u}=Object.assign({},A,s);if(l!=="round")throw new Error('corners must be "round" for 3D geometries');if(n.toPolygons(a).length===0)throw new Error("the given geometry cannot be empty");s={delta:c,corners:l,segments:u};const h=i(s,a);return o(a,h)};e.exports=r}}),kpi=yt({"node_modules/@jscad/modeling/src/operations/expansions/expandPath2.js"(t,e){var n=tpe(),o=_A(),i=Ya(),r=Au(),s=ipe(),a=l=>{let{external:u,internal:g}=l;n(u)<0?u=u.reverse():g=g.reverse();const h=r.fromPoints({closed:!0},u),d=r.fromPoints({closed:!0},g),p=i.toSides(i.fromPoints(r.toPoints(h))),m=i.toSides(i.fromPoints(r.toPoints(d)));return p.push(...m),i.create(p)},A=(l,u,g,h)=>{const{points:d,external:p,internal:m}=l,_=Math.floor(u/2),f=[],I=[];if(g==="round"&&_>0){const y=Math.PI/_,x=d[d.length-1],E=o.angle(o.subtract(o.create(),p[p.length-1],x)),B=d[0],S=o.angle(o.subtract(o.create(),m[0],B));for(let Q=1;Q<_;Q++){let w=E+y*Q,M=o.fromAngleRadians(o.create(),w);o.scale(M,M,h),o.add(M,M,x),f.push(M),w=S+y*Q,M=o.fromAngleRadians(o.create(),w),o.scale(M,M,h),o.add(M,M,B),I.push(M)}}const C=[];return C.push(...p,...f,...m.reverse(),...I),i.fromPoints(C)},c=(l,u)=>{l=Object.assign({},{delta:1,corners:"edge",segments:16},l);const{delta:h,corners:d,segments:p}=l;if(h<=0)throw new Error("the given delta must be positive for paths");if(!(d==="edge"||d==="chamfer"||d==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');const m=u.isClosed,_=r.toPoints(u);if(_.length===0)throw new Error("the given geometry cannot be empty");const f={points:_,external:s({delta:h,corners:d,segments:p,closed:m},_),internal:s({delta:-h,corners:d,segments:p,closed:m},_)};return u.isClosed?a(f):A(f,p,d,h)};e.exports=c}}),TVe=yt({"node_modules/@jscad/modeling/src/operations/expansions/expand.js"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=Dpi(),a=Tpi(),A=kpi(),c=(l,...u)=>{if(u=n(u),u.length===0)throw new Error("wrong number of arguments");const g=u.map(h=>r.isA(h)?A(l,h):o.isA(h)?s(l,h):i.isA(h)?a(l,h):h);return g.length===1?g[0]:g};e.exports=c}}),Fpi=yt({"node_modules/@jscad/modeling/src/operations/expansions/offsetGeom2.js"(t,e){var n=Ya(),o=fVe(),i=ipe(),r=(s,a)=>{const A={delta:1,corners:"edge",segments:0},{delta:c,corners:l,segments:u}=Object.assign({},A,s);if(!(l==="edge"||l==="chamfer"||l==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');const g=n.toOutlines(a),d=g.map(p=>(s={delta:g.reduce((f,I)=>f+o.arePointsInside(p,o.create(I)),0)%2===0?c:-c,corners:l,closed:!0,segments:u},i(s,p))).reduce((p,m)=>p.concat(n.toSides(n.fromPoints(m))),[]);return n.create(d)};e.exports=r}}),Lpi=yt({"node_modules/@jscad/modeling/src/operations/expansions/offsetPath2.js"(t,e){var n=Au(),o=ipe(),i=(r,s)=>{const a={delta:1,corners:"edge",closed:s.isClosed,segments:16},{delta:A,corners:c,closed:l,segments:u}=Object.assign({},a,r);if(!(c==="edge"||c==="chamfer"||c==="round"))throw new Error('corners must be "edge", "chamfer", or "round"');r={delta:A,corners:c,closed:l,segments:u};const g=o(r,n.toPoints(s));return n.fromPoints({closed:l},g)};e.exports=i}}),Hpi=yt({"node_modules/@jscad/modeling/src/operations/expansions/offset.js"(t,e){var n=ga(),o=Ya(),i=Au(),r=Fpi(),s=Lpi(),a=(A,...c)=>{if(c=n(c),c.length===0)throw new Error("wrong number of arguments");const l=c.map(u=>i.isA(u)?s(A,u):o.isA(u)?r(A,u):u);return l.length===1?l[0]:l};e.exports=a}}),yrn=yt({"node_modules/@jscad/modeling/src/operations/expansions/index.js"(t,e){e.exports={expand:TVe(),offset:Hpi()}}}),rpe=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeLinearGeom2.js"(t,e){var n=Du(),o=$r(),i=Ya(),r=DY(),s=ope(),a=(A,c)=>{const l={offset:[0,0,1],twistAngle:0,twistSteps:12,repair:!0};let{offset:u,twistAngle:g,twistSteps:h,repair:d}=Object.assign({},l,A);if(h<1)throw new Error("twistSteps must be 1 or more");g===0&&(h=1);const p=o.clone(u),m=i.toSides(c);if(m.length===0)throw new Error("the given geometry cannot be empty");const _=r.fromSides(m);p[2]<0&&r.reverse(_,_);const f=n.create(),I=(C,y,x)=>{const E=y/h*g,B=o.scale(o.create(),p,y/h);return n.multiply(f,n.fromZRotation(f,E),n.fromTranslation(n.create(),B)),r.transform(f,x)};return A={numberOfSlices:h+1,capStart:!0,capEnd:!0,repair:d,callback:I},s(A,_)};e.exports=a}}),Opi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeLinearPath2.js"(t,e){var n=Ya(),o=Au(),i=rpe(),r=(s,a)=>{if(!a.isClosed)throw new Error("extruded path must be closed");const A=o.toPoints(a),c=n.fromPoints(A);return i(s,c)};e.exports=r}}),Gpi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeLinear.js"(t,e){var n=ga(),o=Ya(),i=Au(),r=rpe(),s=Opi(),a=(A,...c)=>{const l={height:1,twistAngle:0,twistSteps:1,repair:!0},{height:u,twistAngle:g,twistSteps:h,repair:d}=Object.assign({},l,A);if(c=n(c),c.length===0)throw new Error("wrong number of arguments");A={offset:[0,0,u],twistAngle:g,twistSteps:h,repair:d};const p=c.map(m=>i.isA(m)?s(A,m):o.isA(m)?r(A,m):m);return p.length===1?p[0]:p};e.exports=a}}),Ypi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRectangularPath2.js"(t,e){var n=Au(),o=TVe(),i=rpe(),r=(s,a)=>{const A={size:1,height:1},{size:c,height:l}=Object.assign({},A,s);if(s.delta=c,s.offset=[0,0,l],n.toPoints(a).length===0)throw new Error("the given geometry cannot be empty");const g=o(s,a);return i(s,g)};e.exports=r}}),Upi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRectangularGeom2.js"(t,e){var{area:n}=QX(),o=Ya(),i=Au(),r=TVe(),s=rpe(),a=(A,c)=>{const l={size:1,height:1},{size:u,height:g}=Object.assign({},l,A);A.delta=u,A.offset=[0,0,g];const h=o.toOutlines(c);if(h.length===0)throw new Error("the given geometry cannot be empty");const p=h.map(_=>(n(_)<0&&_.reverse(),r(A,i.fromPoints({closed:!0},_)))).reduce((_,f)=>_.concat(o.toSides(f)),[]),m=o.create(p);return s(A,m)};e.exports=a}}),Kpi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRectangular.js"(t,e){var n=ga(),o=Ya(),i=Au(),r=Ypi(),s=Upi(),a=(A,...c)=>{const l={size:1,height:1},{size:u,height:g}=Object.assign({},l,A);if(c=n(c),c.length===0)throw new Error("wrong number of arguments");if(u<=0)throw new Error("size must be positive");if(g<=0)throw new Error("height must be positive");const h=c.map(d=>i.isA(d)?r(A,d):o.isA(d)?s(A,d):d);return h.length===1?h[0]:h};e.exports=a}}),Vpi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/extrudeHelical.js"(t,e){var{TAU:n}=mc(),o=Du(),i=Ya(),r=ope(),s=DY(),a=(A,c)=>{const l={angle:n,startAngle:0,pitch:10,height:0,endOffset:0,segmentsPerRotation:32};let{angle:u,startAngle:g,pitch:h,height:d,endOffset:p,segmentsPerRotation:m}=Object.assign({},l,A);if(d!=0&&(h=d/(u/n)),m<3)throw new Error("The number of segments per rotation needs to be at least 3.");const f=i.toSides(c);if(f.length===0)throw new Error("The given geometry cannot be empty");const I=f.filter(Q=>Q[0][0]>=0);let C=s.fromSides(f);I.length===0&&(C=s.reverse(C));const y=Math.round(m/n*Math.abs(u)),x=y>=2?y:2,E=o.create(),B=o.create(),S=(Q,w,M)=>{const k=g+u/x*w,R=p/x*w,F=(k-g)/n*h;return o.multiply(E,o.fromTranslation(o.create(),[R,0,F*Math.sign(u)]),o.fromXRotation(o.create(),-n/4*Math.sign(u))),o.multiply(B,o.fromZRotation(o.create(),k),E),s.transform(B,M)};return r({numberOfSlices:x+1,callback:S},C)};e.exports=a}}),zpi=yt({"node_modules/@jscad/modeling/src/operations/extrusions/project.js"(t,e){var n=ga(),o=xVe(),i=S6(),r=Du(),s=Ya(),a=Ta(),A=XA(),c=gP(),l=Crn(),u=(h,d)=>{const p=i.fromNormalAndPoint(i.create(),h.axis,h.origin);if(Number.isNaN(p[0])||Number.isNaN(p[1])||Number.isNaN(p[2])||Number.isNaN(p[3]))throw new Error("project: invalid axis or origin");const m=c(d),_=m*m*Math.sqrt(3)/4;if(m===0)return s.create();const f=a.toPolygons(d);let I=[];for(let y=0;y<f.length;y++){const x=f[y].vertices.map(S=>i.projectionOfPoint(p,S)),E=A.create(x),B=A.plane(E);o(p,B)&&(A.measureArea(E)<_||I.push(E))}if(!o(p,[0,0,1])){const y=r.fromVectorRotation(r.create(),p,[0,0,1]);I=I.map(x=>A.transform(y,x))}I=I.sort((y,x)=>A.measureArea(x)-A.measureArea(y));const C=I.map(y=>s.fromPoints(y.vertices));return l(C)},g=(h,...d)=>{const p={axis:[0,0,1],origin:[0,0,0]},{axis:m,origin:_}=Object.assign({},p,h);if(d=n(d),d.length===0)throw new Error("wrong number of arguments");h={axis:m,origin:_};const f=d.map(I=>a.isA(I)?u(h,I):I);return f.length===1?f[0]:f};e.exports=g}}),RX=yt({"node_modules/@jscad/modeling/src/operations/extrusions/index.js"(t,e){e.exports={extrudeFromSlices:ope(),extrudeLinear:Gpi(),extrudeRectangular:Kpi(),extrudeRotate:urn(),extrudeHelical:Vpi(),project:zpi(),slice:DY()}}}),kVe=yt({"node_modules/@jscad/modeling/src/operations/hulls/hullPoints2.js"(t,e){var n=_A(),o=s=>{let a=n.fromValues(1/0,1/0);s.forEach(l=>{(l[1]<a[1]||l[1]===a[1]&&l[0]<a[0])&&(a=l)});const A=[];s.forEach(l=>{const u=r(l[1]-a[1],l[0]-a[0]),g=n.squaredDistance(l,a);A.push({point:l,angle:u,distSq:g})}),A.sort((l,u)=>l.angle!==u.angle?l.angle-u.angle:l.distSq-u.distSq);const c=[];return A.forEach(l=>{let u=c.length;for(;u>1&&i(c[u-2],c[u-1],l.point)<=Number.EPSILON;)c.pop(),u=c.length;c.push(l.point)}),c},i=(s,a,A)=>(a[0]-s[0])*(A[1]-s[1])-(a[1]-s[1])*(A[0]-s[0]),r=(s,a)=>s===0&&a===0?-1/0:-a/s;e.exports=o}}),FVe=yt({"node_modules/@jscad/modeling/src/operations/hulls/toUniquePoints.js"(t,e){var n=Ya(),o=Ta(),i=Au(),r=s=>{const a=new Set,A=[],c=l=>{const u=l.toString();a.has(u)||(A.push(l),a.add(u))};return s.forEach(l=>{n.isA(l)?n.toPoints(l).forEach(c):o.isA(l)?o.toPoints(l).forEach(u=>u.forEach(c)):i.isA(l)&&i.toPoints(l).forEach(c)}),A};e.exports=r}}),Jpi=yt({"node_modules/@jscad/modeling/src/operations/hulls/hullPath2.js"(t,e){var n=ga(),o=Au(),i=kVe(),r=FVe(),s=(...a)=>{a=n(a);const A=r(a),c=i(A);return o.fromPoints({closed:!0},c)};e.exports=s}}),Wpi=yt({"node_modules/@jscad/modeling/src/operations/hulls/hullGeom2.js"(t,e){var n=ga(),o=Ya(),i=kVe(),r=FVe(),s=(...a)=>{a=n(a);const A=r(a),c=i(A);return c.length<3?o.create():o.fromPoints(c)};e.exports=s}}),jpi=yt({"node_modules/@jscad/modeling/src/operations/hulls/hullGeom3.js"(t,e){var n=ga(),o=Ta(),i=FVe(),r=DVe(),s=(...a)=>{a=n(a);const A=i(a);return A.length===0?o.create():o.create(r(A))};e.exports=s}}),xrn=yt({"node_modules/@jscad/modeling/src/operations/hulls/hull.js"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=Au(),a=Jpi(),A=Wpi(),c=jpi(),l=(...u)=>{if(u=n(u),u.length===0)throw new Error("wrong number of arguments");if(!o(u))throw new Error("only hulls of the same type are supported");const g=u[0];return s.isA(g)?a(u):i.isA(g)?A(u):r.isA(g)?c(u):g};e.exports=l}}),$pi=yt({"node_modules/@jscad/modeling/src/operations/hulls/hullChain.js"(t,e){var n=ga(),o=RVe(),i=xrn(),r=(...s)=>{if(s=n(s),s.length<2)throw new Error("wrong number of arguments");const a=[];for(let A=1;A<s.length;A++)a.push(i(s[A-1],s[A]));return o(a)};e.exports=r}}),qpi=yt({"node_modules/@jscad/modeling/src/operations/hulls/index.js"(t,e){e.exports={hull:xrn(),hullChain:$pi(),hullPoints2:kVe(),hullPoints3:DVe()}}}),Xpi=yt({"node_modules/@jscad/modeling/src/operations/minkowski/index.js"(t,e){e.exports={minkowskiSum:frn()}}}),Ern=yt({"node_modules/@jscad/modeling/src/operations/modifiers/snapPolygons.js"(t,e){var n=$r(),o=XA(),i=(s,a)=>{const A=Math.abs(o.measureArea(a));return Number.isFinite(A)&&A>s},r=(s,a)=>{let A=a.map(l=>{const u=l.vertices.map(d=>n.snap(n.create(),d,s)),g=[];for(let d=0;d<u.length;d++){const p=(d+1)%u.length;n.equals(u[d],u[p])||g.push(u[d])}const h=o.create(g);return l.color&&(h.color=l.color),h});const c=s*s*Math.sqrt(3)/4;return A=A.filter(l=>i(c,l)),A};e.exports=r}}),Zpi=yt({"node_modules/@jscad/modeling/src/operations/modifiers/mergePolygons.js"(t,e){var n=xVe(),o=$r(),i=XA(),r=_=>{const f=i.toPoints(_),I=[];for(let C=0;C<f.length;C++){const y=(C+1)%f.length,x={v1:f[C],v2:f[y]};I.push(x)}for(let C=0;C<I.length;C++){const y=(C+1)%f.length;I[C].next=I[y],I[y].prev=I[C]}return I},s=(_,f)=>{const I=`${f.v1}:${f.v2}`;_.set(I,f)},a=(_,f)=>{const I=`${f.v1}:${f.v2}`;_.delete(I)},A=(_,f)=>{const I=`${f.v2}:${f.v1}`;return _.get(I)},c=(_,f,I)=>{let C=_.prev.v1,y=_.prev.v2,x=f.next.v2;const E=g(C,y,x,I);C=f.prev.v1,y=f.prev.v2,x=_.next.v2;const B=g(C,y,x,I);return[E,B]},l=o.create(),u=o.create(),g=(_,f,I,C)=>{const y=o.subtract(l,f,_),x=o.subtract(u,I,f);return o.cross(y,y,x),o.dot(y,C)},h=_=>{let f;const I=[];for(;_.next;){const C=_.next;I.push(_.v1),_.v1=null,_.v2=null,_.next=null,_.prev=null,_=C}return I.length>0&&(f=i.create(I)),f},d=_=>{if(_.length<2)return _;const f=_[0].plane,I=_.slice(),C=new Map;for(;I.length>0;){const x=I.shift(),E=r(x);for(let B=0;B<E.length;B++){const S=E[B],Q=A(C,S);if(Q){const w=c(S,Q,f);if(w[0]>=0&&w[1]>=0){const M=Q.next,k=S.next;S.prev.next=Q.next,S.next.prev=Q.prev,Q.prev.next=S.next,Q.next.prev=S.prev,S.v1=null,S.v2=null,S.next=null,S.prev=null,a(C,Q),Q.v1=null,Q.v2=null,Q.next=null,Q.prev=null;const R=(F,O,U)=>{const Y={v1:U.v1,v2:O.v2,next:O.next,prev:U.prev};U.prev.next=Y,O.next.prev=Y,a(F,O),O.v1=null,O.v2=null,O.next=null,O.prev=null,a(F,U),U.v1=null,U.v2=null,U.next=null,U.prev=null};w[0]===0&&R(C,M,M.prev),w[1]===0&&R(C,k,k.prev)}}else S.next&&s(C,S)}}const y=[];return C.forEach(x=>{const E=h(x);E&&y.push(E)}),C.clear(),y},p=(_,f)=>Math.abs(_[3]-f[3])<15e-8?n(_,f):!1,m=(_,f)=>{const I=[];f.forEach(y=>{const x=I.find(E=>p(E[0],i.plane(y)));x?x[1].push(y):I.push([i.plane(y),[y]])});let C=[];return I.forEach(y=>{const x=y[1],E=d(x);C=C.concat(E)}),C};e.exports=m}}),emi=yt({"node_modules/@jscad/modeling/src/operations/modifiers/insertTjunctions.js"(t,e){var n=mc(),o=$r(),i=XA(),r=c=>`${c}`,s=(c,l,u,g,h,d)=>{const p=r(g),m=r(h),_=`${p}/${m}`,f=`${m}/${p}`;if(c.has(f))return a(c,l,u,h,g,null),null;const I={vertex0:g,vertex1:h,polygonindex:d};return c.has(_)?c.get(_).push(I):c.set(_,[I]),l.has(p)?l.get(p).push(_):l.set(p,[_]),u.has(m)?u.get(m).push(_):u.set(m,[_]),_},a=(c,l,u,g,h,d)=>{const p=r(g),m=r(h),_=`${p}/${m}`;let f=-1;const I=c.get(_);for(let C=0;C<I.length;C++){const y=I[C];let x=r(y.vertex0);if(x===p&&(x=r(y.vertex1),x===m&&!(d!==null&&y.polygonindex!==d))){f=C;break}}I.splice(f,1),I.length===0&&c.delete(_),f=l.get(p).indexOf(_),l.get(p).splice(f,1),l.get(p).length===0&&l.delete(p),f=u.get(m).indexOf(_),u.get(m).splice(f,1),u.get(m).length===0&&u.delete(m)},A=c=>{const l=new Map;for(let u=0;u<c.length;u++){const g=c[u],h=g.vertices.length;if(h>=3){let d=g.vertices[0],p=r(d);for(let m=0;m<h;m++){let _=m+1;_===h&&(_=0);const f=g.vertices[_],I=r(f),C=`${p}/${I}`,y=`${I}/${p}`;if(l.has(y)){const x=l.get(y);x.splice(-1,1),x.length===0&&l.delete(y)}else{const x={vertex0:d,vertex1:f,polygonindex:u};l.has(C)?l.get(C).push(x):l.set(C,[x])}d=f,p=I}}else console.warn("warning: invalid polygon found during insertTjunctions")}if(l.size>0){const u=new Map,g=new Map,h=new Map;for(const[p,m]of l)h.set(p,!0),m.forEach(_=>{const f=r(_.vertex0),I=r(_.vertex1);u.has(f)?u.get(f).push(p):u.set(f,[p]),g.has(I)?g.get(I).push(p):g.set(I,[p])});const d=c.slice(0);for(;l.size!==0;){for(const m of l.keys())h.set(m,!0);let p=!1;for(;;){const m=Array.from(h.keys());if(m.length===0)break;const _=m[0];let f=!0;if(l.has(_)){const C=l.get(_)[0];for(let y=0;y<2;y++){const x=y===0?C.vertex0:C.vertex1,E=y===0?C.vertex1:C.vertex0,B=r(x),S=r(E);let Q=[];y===0?g.has(B)&&(Q=g.get(B)):u.has(B)&&(Q=u.get(B));for(let w=0;w<Q.length;w++){const M=Q[w],k=l.get(M)[0],R=y===0?k.vertex0:k.vertex1;if(y===0?k.vertex1:k.vertex0,r(R)===S){a(l,u,g,x,E,null),a(l,u,g,E,x,null),f=!1,y=2,p=!0;break}else{const O=x,U=E,Y=R,W=o.subtract(o.create(),Y,O),te=o.dot(o.subtract(o.create(),U,O),W)/o.dot(W,W);if(te>0&&te<1){const j=o.scale(o.create(),W,te);if(o.add(j,j,O),o.squaredDistance(j,U)<n.EPS*n.EPS){const oe=k.polygonindex,ie=d[oe],ne=r(k.vertex1);let le=-1;for(let pe=0;pe<ie.vertices.length;pe++)if(r(ie.vertices[pe])===ne){le=pe;break}const ge=ie.vertices.slice(0);ge.splice(le,0,E);const _e=i.create(ge);d[oe]=_e,a(l,u,g,k.vertex0,k.vertex1,oe);const ue=s(l,u,g,k.vertex0,E,oe),fe=s(l,u,g,E,k.vertex1,oe);ue!==null&&h.set(ue,!0),fe!==null&&h.set(fe,!0),f=!1,y=2,p=!0;break}}}}}}f&&h.delete(_)}if(!p)break}c=d}return l.clear(),c};e.exports=A}}),tmi=yt({"node_modules/@jscad/modeling/src/operations/modifiers/triangulatePolygons.js"(t,e){var n=$r(),o=XA(),i=(s,a,A)=>{const c=a.vertices.length;if(c>3){if(c>4){const g=[0,0,0];a.vertices.forEach(h=>n.add(g,g,h)),n.snap(g,n.divide(g,g,[c,c,c]),s);for(let h=0;h<c;h++){const d=o.create([g,a.vertices[h],a.vertices[(h+1)%c]]);a.color&&(d.color=a.color),A.push(d)}return}const l=o.create([a.vertices[0],a.vertices[1],a.vertices[2]]),u=o.create([a.vertices[0],a.vertices[2],a.vertices[3]]);a.color&&(l.color=a.color,u.color=a.color),A.push(l,u);return}A.push(a)},r=(s,a)=>{const A=[];return a.forEach(c=>{i(s,c,A)}),A};e.exports=r}}),nmi=yt({"node_modules/@jscad/modeling/src/operations/modifiers/generalize.js"(t,e){var n=ga(),o=gP(),i=Ya(),r=Ta(),s=Au(),a=Ern(),A=Zpi(),c=emi(),l=tmi(),u=(p,m)=>m,g=(p,m)=>m,h=(p,m)=>{const _={snap:!1,simplify:!1,triangulate:!1},{snap:f,simplify:I,triangulate:C}=Object.assign({},_,p),y=o(m);let x=r.toPolygons(m);f&&(x=a(y,x)),I&&(x=A(y,x)),C&&(x=c(x),x=l(y,x));const E=Object.assign({},m);return E.polygons=x,E},d=(p,...m)=>{if(m=n(m),m.length===0)throw new Error("wrong number of arguments");const _=m.map(f=>{if(s.isA(f))return u(p,f);if(i.isA(f))return g(p,f);if(r.isA(f))return h(p,f);throw new Error("invalid geometry")});return _.length===1?_[0]:_};e.exports=d}}),omi=yt({"node_modules/@jscad/modeling/src/operations/modifiers/snap.js"(t,e){var n=ga(),o=_A(),i=Ya(),r=Ta(),s=Au(),a=gP(),A=Ern(),c=h=>{const d=a(h),m=s.toPoints(h).map(_=>o.snap(o.create(),_,d));return s.create(m)},l=h=>{const d=a(h);let m=i.toSides(h).map(_=>[o.snap(o.create(),_[0],d),o.snap(o.create(),_[1],d)]);return m=m.filter(_=>!o.equals(_[0],_[1])),i.create(m)},u=h=>{const d=a(h),p=r.toPolygons(h),m=A(d,p);return r.create(m)},g=(...h)=>{if(h=n(h),h.length===0)throw new Error("wrong number of arguments");const d=h.map(p=>s.isA(p)?c(p):i.isA(p)?l(p):r.isA(p)?u(p):p);return d.length===1?d[0]:d};e.exports=g}}),imi=yt({"node_modules/@jscad/modeling/src/operations/modifiers/index.js"(t,e){e.exports={generalize:nmi(),snap:omi(),retessellate:DX()}}}),rmi=yt({"node_modules/@jscad/modeling/src/utils/padArrayToLength.js"(t,e){var n=(o,i,r)=>{for(o=o.slice();o.length<r;)o.push(i);return o};e.exports=n}}),smi=yt({"node_modules/@jscad/modeling/src/operations/transforms/align.js"(t,e){var n=ga(),o=rmi(),i=BVe(),{translate:r}=rT(),s=l=>{if(!Array.isArray(l.modes)||l.modes.length>3)throw new Error("align(): modes must be an array of length <= 3");if(l.modes=o(l.modes,"none",3),l.modes.filter(u=>["center","max","min","none"].includes(u)).length!==3)throw new Error('align(): all modes must be one of "center", "max" or "min"');if(!Array.isArray(l.relativeTo)||l.relativeTo.length>3)throw new Error("align(): relativeTo must be an array of length <= 3");if(l.relativeTo=o(l.relativeTo,0,3),l.relativeTo.filter(u=>Number.isFinite(u)||u==null).length!==3)throw new Error("align(): all relativeTo values must be a number, or null.");if(typeof l.grouped!="boolean")throw new Error("align(): grouped must be a boolean value.");return l},a=(l,u,g)=>{for(let h=0;h<3;h++)l[h]==null&&(u[h]==="center"?l[h]=(g[0][h]+g[1][h])/2:u[h]==="max"?l[h]=g[1][h]:u[h]==="min"&&(l[h]=g[0][h]));return l},A=(l,u,g)=>{const h=i(l),d=[0,0,0];for(let p=0;p<3;p++)u[p]==="center"?d[p]=g[p]-(h[0][p]+h[1][p])/2:u[p]==="max"?d[p]=g[p]-h[1][p]:u[p]==="min"&&(d[p]=g[p]-h[0][p]);return r(d,l)},c=(l,...u)=>{l=Object.assign({},{modes:["center","center","min"],relativeTo:[0,0,0],grouped:!1},l),l=s(l);let{modes:h,relativeTo:d,grouped:p}=l;if(u=n(u),u.length===0)throw new Error("align(): No geometries were provided to act upon");if(d.filter(m=>m==null).length){const m=i(u);d=a(d,h,m)}return p?u=A(u,h,d):u=u.map(m=>A(m,h,d)),u.length===1?u[0]:u};e.exports=c}}),spe=yt({"node_modules/@jscad/modeling/src/operations/transforms/center.js"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=oT(),{translate:a}=rT(),A=(h,d)=>{const p={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:m,relativeTo:_}=Object.assign({},p,h),f=s(d),I=[0,0,0];return m[0]&&(I[0]=_[0]-(f[0][0]+(f[1][0]-f[0][0])/2)),m[1]&&(I[1]=_[1]-(f[0][1]+(f[1][1]-f[0][1])/2)),m[2]&&(I[2]=_[2]-(f[0][2]+(f[1][2]-f[0][2])/2)),a(I,d)},c=(h,...d)=>{const p={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:m,relativeTo:_}=Object.assign({},p,h);if(d=n(d),d.length===0)throw new Error("wrong number of arguments");if(_.length!==3)throw new Error("relativeTo must be an array of length 3");h={axes:m,relativeTo:_};const f=d.map(I=>r.isA(I)||o.isA(I)||i.isA(I)?A(h,I):I);return f.length===1?f[0]:f},l=(...h)=>c({axes:[!0,!1,!1]},h),u=(...h)=>c({axes:[!1,!0,!1]},h),g=(...h)=>c({axes:[!1,!1,!0]},h);e.exports={center:c,centerX:l,centerY:u,centerZ:g}}}),ape=yt({"node_modules/@jscad/modeling/src/operations/transforms/scale.js"(t,e){var n=ga(),o=Du(),i=Ya(),r=Ta(),s=Au(),a=(u,...g)=>{if(!Array.isArray(u))throw new Error("factors must be an array");if(g=n(g),g.length===0)throw new Error("wrong number of arguments");for(u=u.slice();u.length<3;)u.push(1);if(u[0]<=0||u[1]<=0||u[2]<=0)throw new Error("factors must be positive");const h=o.fromScaling(o.create(),u),d=g.map(p=>s.isA(p)?s.transform(h,p):i.isA(p)?i.transform(h,p):r.isA(p)?r.transform(h,p):p);return d.length===1?d[0]:d},A=(u,...g)=>a([u,1,1],g),c=(u,...g)=>a([1,u,1],g),l=(u,...g)=>a([1,1,u],g);e.exports={scale:a,scaleX:A,scaleY:c,scaleZ:l}}}),ami=yt({"node_modules/@jscad/modeling/src/operations/transforms/transform.js"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=(a,...A)=>{if(A=n(A),A.length===0)throw new Error("wrong number of arguments");const c=A.map(l=>r.isA(l)?r.transform(a,l):o.isA(l)?o.transform(a,l):i.isA(l)?i.transform(a,l):l);return c.length===1?c[0]:c};e.exports=s}}),aT=yt({"node_modules/@jscad/modeling/src/operations/transforms/index.js"(t,e){e.exports={align:smi(),center:spe().center,centerX:spe().centerX,centerY:spe().centerY,centerZ:spe().centerZ,mirror:wX().mirror,mirrorX:wX().mirrorX,mirrorY:wX().mirrorY,mirrorZ:wX().mirrorZ,rotate:PX().rotate,rotateX:PX().rotateX,rotateY:PX().rotateY,rotateZ:PX().rotateZ,scale:ape().scale,scaleX:ape().scaleX,scaleY:ape().scaleY,scaleZ:ape().scaleZ,transform:ami(),translate:rT().translate,translateX:rT().translateX,translateY:rT().translateY,translateZ:rT().translateZ}}}),Ape=yt({"node_modules/@jscad/modeling/src/index.js"(t,e){e.exports={colors:epe(),curves:thi(),geometries:IVe(),maths:Shi(),measurements:Rhi(),primitives:sT(),text:gpi(),utils:prn(),booleans:NX(),expansions:yrn(),extrusions:RX(),hulls:qpi(),minkowski:Xpi(),modifiers:imi(),transforms:aT()}}}),Brn=yt({"node_modules/jscad-planner/dist/index.cjs"(t,e){var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,s=(g,h)=>{for(var d in h)n(g,d,{get:h[d],enumerable:!0})},a=(g,h,d,p)=>{if(h&&typeof h=="object"||typeof h=="function")for(let m of i(h))!r.call(g,m)&&m!==d&&n(g,m,{get:()=>h[m],enumerable:!(p=o(h,m))||p.enumerable});return g},A=g=>a(n({},"__esModule",{value:!0}),g),c={};s(c,{executeJscadOperations:()=>u,jscadPlanner:()=>l}),e.exports=A(c);var l={booleans:{intersect:(...g)=>({type:"intersect",shapes:g}),subtract:(...g)=>({type:"subtract",shapes:g}),union:(...g)=>({type:"union",shapes:g})},hulls:{hull:(...g)=>({type:"hull",shapes:g.flat()}),hullChain:(...g)=>({type:"hullChain",shapes:g.flat()})},colors:{colorize:(g,h)=>({type:"colorize",color:g,shape:h})},primitives:{cube:g=>({type:"cube",...g}),sphere:g=>({type:"sphere",...g}),cylinder:g=>({type:"cylinder",...g}),polygon:g=>({type:"polygon",...g}),cuboid:g=>({type:"cuboid",...g}),roundedCuboid:g=>({type:"roundedCuboid",...g})},transforms:{rotate:(g,h)=>({type:"rotate",angles:g,shape:h}),scale:(g,h)=>({type:"scale",factors:g,shape:h}),translate:(g,h)=>({type:"translate",vector:g,shape:h})},extrusions:{extrudeLinear:(g,h)=>({type:"extrudeLinear",options:g,shape:h}),extrudeRotate:(g,h)=>({type:"extrudeRotate",options:g,shape:h})},maths:{vec2:{create:(g,h)=>[g,h],fromValues:(g,h)=>[g,h]},vec3:{create:(g,h,d)=>[g,h,d],fromValues:(g,h,d)=>[g,h,d]}},geometries:{geom2:{create:g=>({type:"createGeom2",points:g})},geom3:{create:g=>({type:"createGeom3",polygons:g})},path2:{create:g=>({type:"createPath2",points:g})}},measurements:{measureBoundingBox:g=>({type:"measureBoundingBox",shape:g}),measureArea:g=>({type:"measureArea",shape:g}),measureVolume:g=>({type:"measureVolume",shape:g})},utils:{degToRad:g=>g*Math.PI/180,radToDeg:g=>g*180/Math.PI}},u=(g,h)=>{if(Array.isArray(h)&&h.length===1)return u(g,h[0]);if(Array.isArray(h))throw new Error("executeJscadOperations currently doesn't support Array<JscadOperation>, try adding a root union or or executing each element individually");const d=_=>u(g,_),{type:p,...m}=h;switch(p){case"intersect":return g.booleans.intersect(...h.shapes.map(d));case"subtract":return g.booleans.subtract(...h.shapes.map(d));case"union":return g.booleans.union(...h.shapes.map(d));case"hull":return g.hulls.hull(...h.shapes.map(d));case"hullChain":return g.hulls.hullChain(...h.shapes.map(d));case"colorize":return g.colors.colorize(h.color,d(h.shape));case"cube":return g.primitives.cube(m);case"sphere":return g.primitives.sphere(m);case"cylinder":return g.primitives.cylinder(m);case"polygon":return g.primitives.polygon(m);case"cuboid":return g.primitives.cuboid(m);case"roundedCuboid":return g.primitives.roundedCuboid(m);case"rotate":return g.transforms.rotate(h.angles,d(h.shape));case"scale":return g.transforms.scale(h.factors,d(h.shape));case"translate":return g.transforms.translate(h.vector,d(h.shape));case"extrudeLinear":return g.extrusions.extrudeLinear(h.options,d(h.shape));case"extrudeRotate":return g.extrusions.extrudeRotate(h.options,d(h.shape));case"createGeom2":return g.geometries.geom2.create(h.points);case"createGeom3":return g.geometries.geom3.create(h.polygons);case"createPath2":return g.geometries.path2.create(h.points);case"measureBoundingBox":return g.measurements.measureBoundingBox(d(h.shape));case"measureArea":return g.measurements.measureArea(d(h.shape));case"measureVolume":return g.measurements.measureVolume(d(h.shape));case"degToRad":return g.utils.degToRad(h.degrees);case"radToDeg":return g.utils.radToDeg(h.radians);default:throw h.type===void 0?new Error(`Operation type is undefined. This usually means the operation object is malformed or not properly initialized. Operation: ${JSON.stringify(h,null,2).slice(0,200)}...`):new Error(`Unsupported operation type: ${h.type}. Operation: ${JSON.stringify(h,null,2)}`)}}}}),Ami=yt({"node_modules/ms/index.js"(t,e){var n=1e3,o=n*60,i=o*60,r=i*24,s=r*7,a=r*365.25;e.exports=function(g,h){h=h||{};var d=typeof g;if(d==="string"&&g.length>0)return A(g);if(d==="number"&&isFinite(g))return h.long?l(g):c(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))};function A(g){if(g=String(g),!(g.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(g);if(h){var d=parseFloat(h[1]),p=(h[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return d*a;case"weeks":case"week":case"w":return d*s;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*i;case"minutes":case"minute":case"mins":case"min":case"m":return d*o;case"seconds":case"second":case"secs":case"sec":case"s":return d*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function c(g){var h=Math.abs(g);return h>=r?Math.round(g/r)+"d":h>=i?Math.round(g/i)+"h":h>=o?Math.round(g/o)+"m":h>=n?Math.round(g/n)+"s":g+"ms"}function l(g){var h=Math.abs(g);return h>=r?u(g,h,r,"day"):h>=i?u(g,h,i,"hour"):h>=o?u(g,h,o,"minute"):h>=n?u(g,h,n,"second"):g+" ms"}function u(g,h,d,p){var m=h>=d*1.5;return Math.round(g/d)+" "+p+(m?"s":"")}}}),cmi=yt({"node_modules/debug/src/common.js"(t,e){function n(o){r.debug=r,r.default=r,r.coerce=u,r.disable=c,r.enable=a,r.enabled=l,r.humanize=Ami(),r.destroy=g,Object.keys(o).forEach(h=>{r[h]=o[h]}),r.names=[],r.skips=[],r.formatters={};function i(h){let d=0;for(let p=0;p<h.length;p++)d=(d<<5)-d+h.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=i;function r(h){let d,p=null,m,_;function f(...I){if(!f.enabled)return;const C=f,y=Number(new Date),x=y-(d||y);C.diff=x,C.prev=d,C.curr=y,d=y,I[0]=r.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let E=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(S,Q)=>{if(S==="%%")return"%";E++;const w=r.formatters[Q];if(typeof w=="function"){const M=I[E];S=w.call(C,M),I.splice(E,1),E--}return S}),r.formatArgs.call(C,I),(C.log||r.log).apply(C,I)}return f.namespace=h,f.useColors=r.useColors(),f.color=r.selectColor(h),f.extend=s,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(m!==r.namespaces&&(m=r.namespaces,_=r.enabled(h)),_),set:I=>{p=I}}),typeof r.init=="function"&&r.init(f),f}function s(h,d){const p=r(this.namespace+(typeof d>"u"?":":d)+h);return p.log=this.log,p}function a(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];const d=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function A(h,d){let p=0,m=0,_=-1,f=0;for(;p<h.length;)if(m<d.length&&(d[m]===h[p]||d[m]==="*"))d[m]==="*"?(_=m,f=p,m++):(p++,m++);else if(_!==-1)m=_+1,f++,p=f;else return!1;for(;m<d.length&&d[m]==="*";)m++;return m===d.length}function c(){const h=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),h}function l(h){for(const d of r.skips)if(A(h,d))return!1;for(const d of r.names)if(A(h,d))return!0;return!1}function u(h){return h instanceof Error?h.stack||h.message:h}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}e.exports=n}}),lmi=yt({"node_modules/debug/src/browser.js"(t,e){t.formatArgs=o,t.save=i,t.load=r,t.useColors=n,t.storage=s(),t.destroy=(()=>{let A=!1;return()=>{A||(A=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let A;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(A=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(A[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(A){if(A[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+A[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;A.splice(1,0,c,"color: inherit");let l=0,u=0;A[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(l++,g==="%c"&&(u=l))}),A.splice(u,0,c)}t.log=console.debug||console.log||(()=>{});function i(A){try{A?t.storage.setItem("debug",A):t.storage.removeItem("debug")}catch{}}function r(){let A;try{A=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!A&&typeof cVe<"u"&&"env"in cVe&&(A=cVe.env.DEBUG),A}function s(){try{return localStorage}catch{}}e.exports=cmi()(t);var{formatters:a}=e.exports;a.j=function(A){try{return JSON.stringify(A)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}}),LVe=ee.createContext(null),uf=()=>{const t=ee.useContext(LVe);if(!t)throw new Error("useThree must be used within a ThreeProvider");return t},TX=(t,e=[])=>{const{addFrameListener:n,removeFrameListener:o}=uf();Fs.useEffect(()=>(n(t),()=>o(t)),[n,o,...e])},HVe=ee.createContext(null),umi=()=>{const t=ee.useContext(HVe),e=uf();return ee.useEffect(()=>{if(t)return t.current=e,()=>{t.current=null}},[t,e]),null},gmi=({cadComponent:t,children:e})=>{const n=uf(),o=ee.useMemo(()=>new lh,[]);o.userData.cad_component_id=t.cad_component_id,o.userData.pcb_component_id=t.pcb_component_id,ee.useEffect(()=>(n.rootObject.add(o),()=>{n.rootObject.remove(o)}),[n.rootObject,o]);const i=ee.useMemo(()=>({...n,rootObject:o}),[n,o]);return K.jsx(LVe.Provider,{value:i,children:e})},brn=(t,e)=>{if(!t)return;const{camera:n,rootObject:o,renderer:i}=t,r=i.domElement.getBoundingClientRect();if(!r.width||!r.height||e.x<r.left||e.x>r.right||e.y<r.top||e.y>r.bottom)return;const s=new uJt;n.updateWorldMatrix(!0,!1),o.updateWorldMatrix(!0,!0),s.setFromCamera(new ni((e.x-r.left)/r.width*2-1,-((e.y-r.top)/r.height)*2+1),n);for(const a of s.intersectObject(o,!0)){if(!(a.object instanceof Er))continue;let A=a.object,c=!0;for(;A;)A.visible||(c=!1),A=A.parent;if(c)return a.object}},dmi=(t,e,n)=>{let o=brn(t,e)??null,i;for(;o;)i??=o.userData.pcb_component_id,o=o.parent;if(!i)return;const r=n.find(a=>a.type==="pcb_component"&&a.pcb_component_id===i);if(r?.type!=="pcb_component")return;const s=n.find(a=>a.type==="source_component"&&a.source_component_id===r.source_component_id);if(s?.type==="source_component")return{source_component_id:s.source_component_id,pcb_component_id:r.pcb_component_id,refdes:s.name}};function Srn(t,e){return e??t.some(n=>n.type==="cad_component"&&n.is_on_folded_board===!0)}var hmi=(t,e,n)=>{let o=brn(t,e)??null;for(;o;){const i=o.userData.cad_component_id;if(i){const r=n.find(a=>a.type==="cad_component"&&a.cad_component_id===i);if(r?.type!=="cad_component")return;const s=n.find(a=>a.type==="source_component"&&a.source_component_id===r.source_component_id);return{cad_component_id:r.cad_component_id,componentName:s?.type==="source_component"?s.name:r.cad_component_id}}o=o.parent}},cpe=new Set,pmi=t=>{const[e,n]=ee.useState({circuitKey:t,ids:cpe}),o=e.circuitKey===t?e.ids:cpe;return e.circuitKey!==t&&n({circuitKey:t,ids:cpe}),{hiddenCadComponentIds:o,hideComponent:i=>{n(r=>({circuitKey:t,ids:new Set([...r.circuitKey===t?r.ids:[],i])}))},unhideAllComponents:()=>{n({circuitKey:t,ids:cpe})}}},OVe=t=>ee.useMemo(()=>{if(!t)return[];const e=new SFo;return e.add(t),e.render(),e.getCircuitJson()},[t]),mmi=(t,e)=>{const n=t.pcb_component_id?e.find(o=>o.type==="pcb_component"&&o.pcb_component_id===t.pcb_component_id):void 0;return{pcbComponent:n,layer:t.layer??n?.layer??"top",isThroughHole:!!(n&&e.some(o=>o.type==="pcb_plated_hole"&&o.pcb_component_id===n.pcb_component_id))}},GVe=["translucent","opaque","hidden"],_mi=t=>GVe[(GVe.indexOf(t)+1)%GVe.length],Qrn={boardBody:!0,topCopper:!0,bottomCopper:!0,keepout:!0,adhesive:!1,solderPaste:!1,topSilkscreen:!0,bottomSilkscreen:!0,topMask:!0,bottomMask:!0,throughHoleModels:!0,smtModels:!0,translucentModels:!0,modelsNotInPosFile:!1,modelsMarkedDNP:!1,modelBoundingBoxes:!1,threedAxis:!1,pcbNotes:!1,backgroundStart:!0,backgroundEnd:!0,enclosure:"translucent"},vrn=ee.createContext(void 0),fmi=({children:t})=>{const[e,n]=ee.useState(Qrn),o=ee.useCallback((s,a)=>{n(A=>({...A,[s]:a}))},[]),i=ee.useCallback(()=>{n(Qrn)},[]),r=ee.useMemo(()=>({visibility:e,setLayerVisibility:o,resetToDefaults:i}),[e,o,i]);return K.jsx(vrn.Provider,{value:r,children:t})},AT=()=>{const t=ee.useContext(vrn);if(!t)throw new Error("useLayerVisibility must be used within a LayerVisibilityProvider");return t},YVe=1.2;function wrn(t){return ee.useMemo(()=>{if(!t)return YVe;try{return Mr(t).pcb_board.list()[0]?.thickness??YVe}catch{return YVe}},[t])}var kX={clickToInteractOverlay:100,htmlElements:95,orientationCube:95,contextMenu:110,appearanceMenu:111},Prn=({children:t,position:e,style:n})=>{const{camera:o,renderer:i}=uf(),r=ee.useRef(document.createElement("div")),[s,a]=ee.useState(null);return ee.useEffect(()=>{const A=i?.domElement.parentNode;if(A)return A.style.position!=="relative"&&A.style.position!=="absolute"&&(A.style.position="relative"),A.appendChild(r.current),a(NFt.createPortal(t,r.current)),()=>{A.contains(r.current)&&A.removeChild(r.current)}},[i,t]),TX(()=>{if(!o||!r.current||!i)return;const A=new jt(...e);A.project(o);const c=i.domElement.getBoundingClientRect(),l=Math.round((A.x+1)/2*c.width),u=Math.round((-A.y+1)/2*c.height);r.current.style.position="absolute",r.current.style.left=`${l}px`,r.current.style.top=`${u}px`,r.current.style.pointerEvents="none",r.current.style.zIndex=kX.htmlElements.toString(),n&&Object.assign(r.current.style,n)},[o,i,e,n]),s},Mrn={in:25.4,inch:25.4,mil:.0254,mm:1,m:1e3,cm:10,ft:304.8,feet:304.8},Ua=t=>{let e=typeof t=="number"?"mm":t.replace(/^[^a-zA-Z]+/g,"").toLowerCase();e||(e="mm");const n=typeof t=="number"?t:Number.parseFloat(t.split(e)[0]);if(e in Mrn)return n*Mrn[e];throw new Error(`Unsupported unit: ${e}`)},Bd=Ua,Imi=Object.defineProperty,Cmi=(t,e)=>{for(var n in e)Imi(t,n,{get:e[n],enumerable:!0})},cS={};Cmi(cS,{axial:()=>dfi,bga:()=>h_i,breakoutheaders:()=>Pfi,cap:()=>Lmi,crystal:()=>Omi,d2pak:()=>krn,dfn:()=>W_i,diode:()=>Fmi,dip:()=>Qmi,dpak:()=>Trn,electrolytic:()=>vCi,fpc:()=>MCi,hc49:()=>Nfi,headermodule:()=>$_i,jst:()=>UIi,lcc:()=>yyi,led:()=>Gmi,led2835:()=>Umi,led5050:()=>Vmi,lga:()=>vfi,lqfp:()=>Sfi,m2host:()=>gyi,melf:()=>q1i,micromelf:()=>tIi,minimelf:()=>U1i,mlp:()=>b_i,mountedpcbmodule:()=>hyi,ms012:()=>tfi,ms013:()=>ofi,msop:()=>ZIi,pad:()=>Rfi,pinrow:()=>Zrn,platedhole:()=>eyi,potentiometer:()=>bCi,pushbutton:()=>Cfi,qfn:()=>x_i,qfp:()=>B_i,quad:()=>uT,radial:()=>mfi,res:()=>g_i,rj45:()=>ffi,sma:()=>rIi,smb:()=>dIi,smbf:()=>NCi,smc:()=>_Ii,smdpads:()=>KCi,smdpinheader:()=>XCi,smdpushbutton:()=>zCi,smdslideswitch:()=>$Ci,smf:()=>cIi,smtpad:()=>YCi,sod110:()=>VIi,sod123:()=>cfi,sod123f:()=>m1i,sod123fl:()=>C1i,sod123w:()=>$fi,sod128:()=>v1i,sod323:()=>e1i,sod323f:()=>g1i,sod323fl:()=>rCi,sod323w:()=>tCi,sod523:()=>Ofi,sod723:()=>B1i,sod80:()=>zfi,sod882:()=>A1i,sod882d:()=>J1i,sod923:()=>i1i,soic:()=>m_i,solderjumper:()=>mCi,son:()=>cCi,sop8:()=>Kfi,sot:()=>nyi,sot143:()=>ryi,sot223:()=>yIi,sot23:()=>G_i,sot23w:()=>PIi,sot25:()=>V_i,sot323:()=>LCi,sot343:()=>Ayi,sot363:()=>R_i,sot457:()=>ICi,sot563:()=>Z_i,sot723:()=>rfi,sot886:()=>F_i,sot89:()=>L1i,sot963:()=>xCi,ssop:()=>v_i,stampboard:()=>xfi,stampreceiver:()=>bfi,to220:()=>rsn,to220f:()=>G1i,to252:()=>Mmi,to263:()=>Dmi,to92:()=>Lfi,to92l:()=>fyi,to92s:()=>kIi,tqfp:()=>E_i,tssop:()=>M_i,usbcmidmount:()=>Cyi,vson:()=>uCi,vssop:()=>$Ii,wson:()=>pCi});var xi=(t,e,n)=>({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:"silkscreen_text_1",font:"tscircuit2024",font_size:n,pcb_component_id:"pcb_component_1",text:"{REF}",layer:"top",anchor_position:{x:t,y:e},anchor_alignment:"center"}),FX=Z().or(dn(rd())).transform(t=>Array.isArray(t)?t:(t.startsWith("(")&&t.endsWith(")")&&(t=t.slice(1,-1)),t.split(",").map(e=>{const n=Number(e);return isNaN(n)?e:n}))).pipe(dn(Z().or(_t()))),ymi=Kn(["leftside","rightside"]),xmi=Kn(["topside","bottomside"]),Emi=Kn(["left","right"]),Bmi=Kn(["top","bottom"]),Drn=FX.pipe(xo([fQ([ymi,Bmi]),fQ([xmi,Emi])])),Ci=Pt({norefdes:je().optional().describe("disable reference designator label"),invert:je().optional().describe("install the part backwards: for a pin header, the LONG pins pass through the board instead of the short ones. It does not change which side of the board the part is on — that is the component's `layer`"),faceup:je().optional().describe("DEPRECATED, and a no-op for through-hole parts. It meant 'the male pin header should face upwards, out of the top layer', which is what a correctly mounted header does by default; its other effect was to delete the pins below the board, leaving a through-hole part that cannot be soldered into its own plated holes. Use `layer` for which side of the board a part is on, and `invert` to install it backwards"),nosilkscreen:je().optional().describe("omit all silkscreen elements from the footprint"),rounded:ce.refine(t=>t>=0,{message:"rounded radius must be non-negative"}).optional().describe("corner radius applied to all rectangular copper pads"),pin1location:Drn.optional().describe("rotate the footprint to place pin 1 on a requested side"),cathodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe("identify which diode pad is the cathode"),anodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe("identify which diode pad is the anode")}),Os=(t,e,n,o,i)=>({pcb_plated_hole_id:"",type:"pcb_plated_hole",shape:"circle",x:e,y:n,hole_diameter:Ua(o),outer_diameter:Ua(i),pcb_port_id:"",layers:["top","bottom"],port_hints:[t.toString()]}),r2=t=>{const{pn:e,x:n,y:o,holeDiameter:i,rectPadWidth:r,rectPadHeight:s,holeOffsetX:a=0,holeOffsetY:A=0,rectBorderRadius:c}=t;return{pcb_plated_hole_id:"",type:"pcb_plated_hole",shape:"circular_hole_with_rect_pad",x:n,y:o,hole_diameter:Ua(i),hole_shape:"circle",pad_shape:"rect",rect_pad_width:Ua(r),rect_pad_height:Ua(s),...c!==void 0&&{rect_border_radius:c},pcb_port_id:"",layers:["top","bottom"],port_hints:[e.toString()],hole_offset_x:a,hole_offset_y:A}},lpe=Array.from({length:9},(t,e)=>Math.cos(e/8*Math.PI-Math.PI)).map(t=>({x:t,y:-Math.sqrt(1-t**2)})),s2=t=>{if(t.length<2)throw new Error("Rect union outline requires at least two bounds");for(const c of t)if(c.minX>=c.maxX||c.minY>=c.maxY)throw new Error("Each rectangle bound must have min < max on both axes");for(let c=1;c<t.length;c++){const l=t[c-1],u=t[c];if(u.minX<l.minX||u.maxX>l.maxX||u.minY>l.minY||u.maxY<l.maxY)throw new Error("Bounds must be ordered outer-to-inner with tighter X and larger Y span")}const e=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].maxY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.maxY}),c.push({x:g.minX,y:g.maxY}),l-=1}return c},n=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].maxY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.maxY}),c.push({x:g.maxX,y:g.maxY}),l-=1}return c},o=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].minY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.minY}),c.push({x:g.maxX,y:g.minY}),l-=1}return c},i=()=>{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].minY});l>0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.minY}),c.push({x:g.minX,y:g.minY}),l-=1}return c},r=e(),s=n(),a=o(),A=i();return[...r.reverse(),...s,...a.reverse(),...A]};function dP(t){return typeof t=="string"?t.trim().toLowerCase().endsWith("mil")?parseFloat(t)*.0254:parseFloat(t):Number(t)}var upe=xo([Z(),_t()]).transform(t=>dP(t)),bmi=t=>Ci.extend({fn:Z(),num_pins:_t().optional().default(6),wide:je().optional(),narrow:je().optional(),w:upe.optional(),p:upe.default(t.p??"2.54mm"),id:upe.optional(),od:upe.optional(),nosquareplating:je().optional().default(!1).describe("do not use rectangular pad for pin 1")}).transform(e=>(!e.id&&!e.od?Math.abs(e.p-1.27)<.01?(e.id=dP("0.55mm"),e.od=dP("0.95mm")):(e.id=dP("0.8mm"),e.od=dP("1.6mm")):e.id?e.od||(e.od=e.id*(1.5/1)):e.id=e.od*(1/1.5),e.w||(e.wide?e.w=dP("600mil"):e.narrow?e.w=dP("300mil"):e.w=dP(t.w??"300mil")),e)),Smi=bmi({}),Nrn=(t,e,n,o,i)=>{const r=t/2,s=e<=r,a=r-1,A=o,c=A*a;return s?{x:-n/2,y:c/2-(e-1)*A}:{x:n/2,y:-c/2+(e-r-1)*A}},Qmi=t=>{const e=Smi.parse(t),n=[];for(let _=0;_<e.num_pins;_++){const{x:f,y:I}=Nrn(e.num_pins,_+1,e.w,e.p??2.54,e.nosquareplating);if(_===0&&!e.nosquareplating){n.push(r2({pn:_+1,x:f,y:I,holeDiameter:e.id??"0.8mm",rectPadWidth:e.od??"1mm",rectPadHeight:e.od??"1mm"}));continue}n.push(Os(_+1,f,I,e.id??"0.8mm",e.od??"1mm"))}const o=(e.num_pins/2-1)*e.p+e.od,r=e.w-e.od-1,s=(e.num_pins/2-1)*e.p+e.od+.4,a={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...lpe.map(({x:_,y:f})=>({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}],type:"pcb_silkscreen_path",stroke_width:.1},A=[];for(let _=0;_<e.num_pins;_++){const f=_+1,I=f<=e.num_pins/2,C=Nrn(e.num_pins,f,e.w,e.p??2.54,e.nosquareplating),y=.6,x=I?C.x-e.od/2-y:C.x+e.od/2+y,E=.3;A.push({type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:`pin_${f}`,layer:"top",pcb_component_id:`pin_${f}`,text:`{pin${f}}`,anchor_position:{x,y:C.y+E/2},font_size:E,font:"tscircuit2024",anchor_alignment:I?"top_right":"top_left"})}const c=xi(0,s/2+.5,.4),l=e.w+e.od,u=o,g=l/2+.25,h=g,d=u/2+.72,p=d,m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:s2([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:"top"};return{circuitJson:[...n,a,c,...A,m],parameters:e}},Wo=(t,e,n,o,i,r)=>({type:"pcb_smtpad",x:e,y:n,width:o,height:i,layer:"top",shape:"rect",...r!==void 0&&{corner_radius:r},pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(s=>s.toString()):[t.toString()]}),sA=(t,e={})=>({type:"pcb_silkscreen_path",layer:e.layer||"top",pcb_component_id:e.pcb_component_id||"",pcb_silkscreen_path_id:e.pcb_silkscreen_path_id||"",route:t,stroke_width:e.stroke_width||.1}),vmi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(6)]).default(3),p:ce.default("2.29mm").describe("pitch between adjacent lead positions"),pw:ce.default("1.6mm").describe("lead pad width along the pin column"),pl:ce.default("3mm").describe("lead pad length toward the package"),tabw:ce.default("6.2mm").describe("large tab pad width"),tabh:ce.default("5.8mm").describe("large tab pad height"),span:ce.default("6.85mm").describe("center-to-center distance from the leads to the tab"),w:ce.default("6.6mm").describe("package body width"),h:ce.default("6.5mm").describe("package body height"),string:Z().optional()}),wmi={p:"2.54mm",pw:"1.5mm",pl:"3.5mm",tabw:"8.38mm",tabh:"10.7mm",span:"10.21mm",w:"10.1mm",h:"10.1mm"},Pmi=t=>{if(t.num_pins===3||t.num_pins===6)return t.num_pins;const e=t.string?.match(/^(?:d2pak|to252|to263)_(\d+)/i),n=Number.parseInt(e?.[1]??"3",10);return n===5||n===6?6:3},Rrn=(t,e)=>{const n=vmi.parse({...e,...t,num_pins:Pmi(t)}),{num_pins:o,p:i,pw:r,pl:s,tabw:a,tabh:A,span:c,w:l,h:u}=n,g=o===3?2:5,h=-c/2,d=c/2,p=[];for(let M=0;M<g;M++){const k=o===3?M*2+1:M+1,R=o===3?(1-M*2)*i:((g-1)/2-M)*i;p.push(Wo(k,h,R,s,r))}p.push(Wo(o===3?2:6,d,0,a,A));const m=-l/2,_=l/2,f=Math.min(h-s/2,d-a/2),I=Math.max(h+s/2,d+a/2),C=(o===3?i:(g-1)/2*i)+r/2,y=Math.max(C,A/2),x=Math.max(y,u/2)+.2,E=[sA([{x:m,y:x},{x:_,y:x}]),sA([{x:m,y:-x},{x:_,y:-x}]),sA([{x:h-.3,y:x+.15},{x:h,y:x+.45},{x:h+.3,y:x+.15}])],B=Math.min(f,m)-.25,S=Math.max(I,_)+.25,Q=Math.max(y,u/2)+.25,w={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(B+S)/2,y:0},width:S-B,height:Q*2,layer:"top"};return{circuitJson:[...p,...E,xi(0,Q+.55,.5),w],parameters:n}},Trn=t=>Rrn(t),krn=t=>Rrn(t,wmi),Mmi=Trn,Dmi=krn,Frn=[{imperial:"01005",metric:"0402",p_mm_min:.5,pw_mm_min:.4,ph_mm_min:.3,w_mm_min:.58,h_mm_min:.21,courtyard_width_mm:1.2,courtyard_height_mm:.6},{imperial:"0504",metric:"1310",p_mm_min:1.1,pw_mm_min:.65,ph_mm_min:1.3,w_mm_min:.58,h_mm_min:.21},{imperial:"1812",metric:"4532",p_mm_min:4.275,pw_mm_min:1.125,ph_mm_min:3.4,w_mm_min:5.4,h_mm_min:3.4,courtyard_width_mm:5.9,courtyard_height_mm:3.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.386252,line_y_mm:1.71,stroke_width_mm:.12}},{imperial:"0201",metric:"0603",p_mm_min:.66,pw_mm_min:.46,ph_mm_min:.4,w_mm_min:.9,h_mm_min:.3,courtyard_width_mm:1.4,courtyard_height_mm:.7,rounded_pads:!0},{imperial:"0402",metric:"1005",p_mm_min:1.02,pw_mm_min:.54,ph_mm_min:.64,w_mm_min:1.56,h_mm_min:.64,courtyard_width_mm:1.86,courtyard_height_mm:.94,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.153641,line_y_mm:.38,stroke_width_mm:.12}},{imperial:"0603",metric:"1608",p_mm_min:1.65,pw_mm_min:.8,ph_mm_min:.95,w_mm_min:2.45,h_mm_min:.95,courtyard_width_mm:2.96,courtyard_height_mm:1.46,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.237258,line_y_mm:.5225,stroke_width_mm:.12}},{imperial:"0805",metric:"2012",p_mm_min:1.825,pw_mm_min:1.025,ph_mm_min:1.4,w_mm_min:2.8499999999999996,h_mm_min:1.4,courtyard_width_mm:3.36,courtyard_height_mm:1.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.227064,line_y_mm:.735,stroke_width_mm:.12}},{imperial:"1206",metric:"3216",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:1.75,w_mm_min:4.05,h_mm_min:1.75,courtyard_width_mm:4.56,courtyard_height_mm:2.26,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.727064,line_y_mm:.91,stroke_width_mm:.12}},{imperial:"1210",metric:"3225",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:2.65,w_mm_min:4.05,h_mm_min:2.65,courtyard_width_mm:4.56,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.723737,line_y_mm:1.355,stroke_width_mm:.12}},{imperial:"2010",metric:"5025",p_mm_min:4.625,pw_mm_min:1.225,ph_mm_min:2.65,w_mm_min:5.85,h_mm_min:2.65,courtyard_width_mm:6.36,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.527064,line_y_mm:1.36,stroke_width_mm:.12}},{imperial:"2512",metric:"6332",p_mm_min:5.925,pw_mm_min:1.225,ph_mm_min:3.35,w_mm_min:7.15,h_mm_min:3.35,courtyard_width_mm:7.66,courtyard_height_mm:3.86,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:2.177064,line_y_mm:1.71,stroke_width_mm:.12}}],Nmi=Object.fromEntries(Frn.map(t=>[t.metric,t])),Rmi=Object.fromEntries(Frn.map(t=>[t.imperial,t])),Lrn=(t,e)=>({type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:t,height:e,layer:"top"});Ci.extend({fn:Z().optional(),string:Z().optional(),tht:je(),p:ce.optional(),pw:ce.optional(),ph:ce.optional(),metric:lt.optional(),imperial:lt.optional(),w:ce.optional(),h:ce.optional(),cyw:ce.optional().describe("courtyard width"),cyh:ce.optional().describe("courtyard height"),nonpolarized:je().optional(),textbottom:je().optional(),roundedPads:je().optional()});var gpe=t=>{let{fn:e,tht:n,p:o,pw:i,ph:r,metric:s,imperial:a,w:A,h:c,cyw:l,cyh:u,nonpolarized:g,textbottom:h,roundedPads:d,string:p}=t;if(typeof A=="string"&&(A=Bd(A)),typeof c=="string"&&(c=Bd(c)),typeof l=="string"&&(l=Bd(l)),typeof u=="string"&&(u=Bd(u)),typeof o=="string"&&(o=Bd(o)),typeof i=="string"&&(i=Bd(i)),typeof r=="string"&&(r=Bd(r)),c!==void 0&&A!==void 0&&c>A)throw new Error("height cannot be greater than width (rotated footprint not yet implemented)");let m;if(s&&(m=Nmi[s]),a&&(m=Rmi[a]),m&&(A=m.w_mm_min,c=m.h_mm_min,o=m.p_mm_min,i=m.pw_mm_min,r=m.ph_mm_min),o===void 0||i===void 0||r===void 0)throw new Error("Could not determine required pad dimensions (p, pw, ph)");let _=[];const f=e==="res"&&(g===!0||typeof p!="string"||/^res(?:\d{4}|\d{5})(?:_|$)/i.test(p))?m?.nonpolarizedSilkscreen:void 0;if(f?.stroke_width_mm){const{line_half_length_mm:B=0,line_y_mm:S=0,stroke_width_mm:Q}=f;_=[{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-B,y:S},{x:B,y:S}],stroke_width:Q,pcb_silkscreen_path_id:""},{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-B,y:-S},{x:B,y:-S}],stroke_width:Q,pcb_silkscreen_path_id:""}]}else _=[{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:o/2,y:r/2+.4},{x:-o/2-i/2-.2,y:r/2+.4},{x:-o/2-i/2-.2,y:-r/2-.4},{x:o/2,y:-r/2-.4}],stroke_width:.1,pcb_silkscreen_path_id:""}];const I=h?-r/2-.9:r/2+.9,C=xi(0,I,.2),y=m?.courtyard_width_mm&&m.courtyard_height_mm?Lrn(m.courtyard_width_mm,m.courtyard_height_mm):l!==void 0&&u!==void 0?Lrn(l,u):null,E=d??m?.rounded_pads??!1?Math.min(.125,Math.min(i,r)/8):void 0;return n?[Os(1,-o/2,0,i,i*1/.8),Os(2,o/2,0,i,i*1/.8),..._,C,...y?[y]:[]]:[Wo(["1","left"],-o/2,0,i,r,E),Wo(["2","right"],o/2,0,i,r,E),..._,C,...y?[y]:[]]},Tmi=t=>{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)r.type==="pcb_smtpad"&&(e=Math.min(e,r.x-r.width/2),n=Math.max(n,r.x+r.width/2),o=Math.min(o,r.y-r.height/2),i=Math.max(i,r.y+r.height/2)),r.type==="pcb_plated_hole"&&(e=Math.min(e,r.x-r.outer_diameter/2),n=Math.max(n,r.x+r.outer_diameter/2),o=Math.min(o,r.y-r.outer_diameter/2),i=Math.max(i,r.y+r.outer_diameter/2));if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(i))throw new Error("Could not determine diode copper bounds");return{minX:e,maxX:n,minY:o,maxY:i}},Hrn=(t,e={})=>dpe(Tmi(t),e),kmi=({anodePin:t,cathodePin:e})=>{if(t!==void 0&&t!==1&&t!==2)throw new Error("Diode anode pin must be 1 or 2");if(e!==void 0&&e!==1&&e!==2)throw new Error("Diode cathode pin must be 1 or 2");if(t!==void 0&&e!==void 0){if(t===e)throw new Error("Diode anode and cathode cannot use the same pin");return e}if(e!==void 0)return e;if(t===1)return 2;if(t===2)return 1},uh=t=>{const e=t.p??t.pad_spacing;if(e===void 0||t.pl===void 0||t.pw===void 0)throw new Error("Diode fabrication note requires p or pad_spacing, pl, and pw");const n=ce.parse(e),o=ce.parse(t.pl),i=ce.parse(t.pw);return dpe({minX:-n/2-o/2,maxX:n/2+o/2,minY:-i/2,maxY:i/2},{anodePin:t.anodepin,cathodePin:t.cathodepin})},dpe=(t,e={})=>{const n=[],o=t.maxX-t.minX,i=t.maxY-t.minY,r=(t.minX+t.maxX)/2,s=(t.minY+t.maxY)/2,A=kmi(e)===1?x=>2*r-x:x=>x,c=i*.28,l=c*2,u=o*.2,h=Math.min(u,l*1.25),d=r-h/2,p=r+h/2,m=h*.18,_=d+m,f=p-m,I=Math.max(Math.min(o,i)*.035,.01),C=Math.max(Math.min(o,i)*.25,.1),y=x=>e.idSuffix?`${x}_${e.idSuffix}`:x;return n.push({type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_anode_leg"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(d),y:s},{x:A(_),y:s}]},{type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_triangle"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(_),y:s+c},{x:A(f),y:s},{x:A(_),y:s-c},{x:A(_),y:s+c}]},{type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_cathode"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(f),y:s+c},{x:A(f),y:s-c}]},{type:"pcb_fabrication_note_path",pcb_fabrication_note_path_id:y("diode_fabrication_note_cathode_leg"),pcb_component_id:"",layer:"top",stroke_width:I,route:[{x:A(f),y:s},{x:A(p),y:s}]},{type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:y("diode_fabrication_note_positive"),pcb_component_id:"",layer:"top",font:"tscircuit2024",font_size:C,text:"+",anchor_position:{x:A(t.minX+o*.125),y:s},anchor_alignment:"center"},{type:"pcb_fabrication_note_text",pcb_fabrication_note_text_id:y("diode_fabrication_note_negative"),pcb_component_id:"",layer:"top",font:"tscircuit2024",font_size:C,text:"-",anchor_position:{x:A(t.maxX-o*.125),y:s},anchor_alignment:"center"}),n},Fmi=t=>{const e=gpe({...t,roundedPads:!0});return{circuitJson:e.concat(Hrn(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})),parameters:t}},Lmi=t=>({circuitJson:gpe(t),parameters:t}),Hmi=Ci.extend({fn:$e("crystal"),num_pins:$e(4).default(4),px:ce.default("2.2mm").describe("horizontal pad center pitch"),py:ce.default("1.7mm").describe("vertical pad center pitch"),pw:ce.default("1.4mm").describe("pad width"),ph:ce.default("1.2mm").describe("pad height")}),Omi=t=>{const e=Hmi.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Wo(1,-n/2,-o/2,i,r),Wo(2,n/2,-o/2,i,r),Wo(3,n/2,o/2,i,r),Wo(4,-n/2,o/2,i,r)],a=(n+i)/2+.2,A=(o+r)/2+.2,c=sA([{x:-a,y:-A},{x:a,y:-A},{x:a,y:A},{x:-a,y:A},{x:-a,y:-A}]),l=xi(0,A+.6,.5),u={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:"top"};return{circuitJson:[...s,c,l,u],parameters:e}},Gmi=t=>{const e=gpe(t);return{circuitJson:e.concat(Hrn(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})).map(o=>o.type!=="pcb_silkscreen_path"?o:{...o,route:o.route.map(i=>({...i,x:-i.x}))}),parameters:t}},Ymi=Ci.extend({fn:$e("led2835"),num_pins:$e(2).default(2),p1w:ce.default("2.2mm").describe("pin 1 (anode) pad width"),p2w:ce.default("1.25mm").describe("pin 2 (cathode) pad width"),ph:ce.default("2.2mm").describe("pad height"),p1x:ce.default("-0.9mm").describe("pin 1 pad center x"),p2x:ce.default("1.375mm").describe("pin 2 pad center x"),w:ce.default("3.5mm").describe("package body width"),h:ce.default("2.8mm").describe("package body height")}),Umi=t=>{const e=Ymi.parse(t),{p1w:n,p2w:o,ph:i,p1x:r,p2x:s,w:a,h:A}=e,c=[Wo(1,r,0,n,i),Wo(2,s,0,o,i)],l=a/2+.45,u=A/2+.2,g=[sA([{x:s-o/2,y:-u},{x:-l,y:-u},{x:-l,y:u},{x:s-o/2,y:u}])],h=xi(0,u+.8,.5),d={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(r-n/2+s+o/2)/2,y:0},width:s+o/2-(r-n/2)+.5,height:Math.max(A,i)+.5,layer:"top"},p=dpe({minX:Math.min(r-n/2,s-o/2),maxX:Math.max(r+n/2,s+o/2),minY:-i/2,maxY:i/2},{anodePin:e.anodepin,cathodePin:e.cathodepin});return{circuitJson:[...c,...g,h,d,...p],parameters:e}},Kmi=Ci.extend({fn:$e("led5050"),num_pins:$e(6).default(6),p:ce.default("1.7mm").describe("pin pitch along each column"),rowspan:ce.default("4.8mm").describe("distance between pad columns"),pl:ce.default("2mm").describe("pad length across the package edge"),pw:ce.default("1.1mm").describe("pad width along the pin column"),w:ce.default("5mm").describe("package body width"),h:ce.default("5mm").describe("package body height")}),Vmi=t=>{const e=Kmi.parse(t),{p:n,rowspan:o,pl:i,pw:r,w:s,h:a}=e,A=[];for(let m=0;m<3;m++)A.push(Wo(m+1,-o/2,n-m*n,i,r)),A.push(Wo(6-m,o/2,n-m*n,i,r));const c=s/2,l=a/2+.2,u=[sA([{x:-c,y:l},{x:c,y:l}]),sA([{x:-c,y:-l},{x:c,y:-l}]),sA([{x:-o/2-i/2-.4,y:n+r/2},{x:-o/2-i/2-.4,y:n-r/2}])],g=xi(0,l+.8,.5),h={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:o+i+.5,height:Math.max(a,2*n+r)+.5,layer:"top"},p=[{color:"green",y:n},{color:"red",y:0},{color:"blue",y:-n}].flatMap(({color:m,y:_})=>dpe({minX:-o/2-i/2,maxX:o/2+i/2,minY:_-r/2,maxY:_+r/2},{idSuffix:m}));return{circuitJson:[...A,...u,g,h,...p],parameters:e}},NY=t=>{const{padSpacing:e,padWidth:n,padHeight:o,padPitch:i,numRows:r,textbottom:s,courtyardOutline:a}=t,A=[],c=(r-1)*(i/2);for(let Q=0;Q<r;Q++)A.push(c-Q*i);const l=[];A.forEach((Q,w)=>{l.push(Wo(w+1,-e/2,Q,n,o))}),A.slice().reverse().forEach((Q,w)=>{l.push(Wo(w+r+1,e/2,Q,n,o))});const u=Math.max(...A)+o/2+.4,g=Math.min(...A)-o/2-.4,h=-e/2-n/2-.4,d=e/2+n/2+.4,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d*.5,y:u},{x:h*.5,y:u}],stroke_width:.12,pcb_silkscreen_path_id:"silkscreen_top"},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d*.5,y:g},{x:h*.5,y:g}],stroke_width:.12,pcb_silkscreen_path_id:"silkscreen_bottom"},_=-e/2,f=Math.max(...A),I=.2,C=_-n/2-.1,y=f+o/2+.1,x={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_marker",route:[{x:C,y},{x:C-I,y},{x:C,y:y+I},{x:C,y}],stroke_width:.1},E=s?g-.9:u+.9,B=xi(0,E,.2),S=a?{type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:a}:null;return[...l,p,m,x,B,...S?[S]:[]]},zmi=Ci.extend({pw:ce.default("0.5mm"),ph:ce.default("0.4mm"),p:ce.default("0.7mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Jmi=1,Wmi=t=>{const e=zmi.parse(t);if(e.concave===!0)return[];const n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:Jmi,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:.95},{x:-1,y:-.95},{x:1,y:-.95},{x:1,y:.95}]})},jmi=Ci.extend({pw:ce.default("0.5mm"),ph:ce.default("0.32mm"),p:ce.default("0.5mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),$mi=1,qmi=t=>{const e=jmi.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:$mi,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:1.25},{x:-1,y:-1.25},{x:1,y:-1.25},{x:1,y:1.25}]})},Xmi=Ci.extend({pw:ce.default("0.9mm"),ph:ce.default("0.4mm"),p:ce.default("0.8mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Zmi=1.7,e_i=t=>{const e=Xmi.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:Zmi,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.05},{x:-1.55,y:-1.05},{x:1.55,y:-1.05},{x:1.55,y:1.05}]})},t_i=Ci.extend({pw:ce.default("0.9mm"),ph:ce.default("0.4mm"),p:ce.default("0.8mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),n_i=1.7,o_i=t=>{const e=t_i.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:n_i,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.88},{x:-1.55,y:-1.87},{x:1.55,y:-1.87},{x:1.55,y:1.88}]})},i_i=Ci.extend({pw:ce.default("0.7mm"),ph:ce.default("0.64mm"),p:ce.default("0.94mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),r_i=1.4,s_i=t=>{const e=i_i.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:r_i,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.3,y:1.05},{x:-1.3,y:-1.05},{x:1.3,y:-1.05},{x:1.3,y:1.05}]})},a_i=Ci.extend({pw:ce.default("0.9mm"),ph:ce.default("0.9mm"),p:ce.default("1.34mm"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),A_i=3,c_i=t=>{const e=a_i.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:A_i,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-2.21,y:2.85},{x:-2.21,y:-2.85},{x:2.2,y:-2.85},{x:2.2,y:2.85}]})},l_i=t=>{const e=t.array??t.x;if(typeof e=="number")return Number.isNaN(e)?void 0:e;if(typeof e=="string"){const n=Number.parseInt(e,10);return Number.isNaN(n)?void 0:n}if(typeof t.imperial=="string"){const o=t.imperial.match(/x(2|4)$/)?.[1];if(o)return Number.parseInt(o,10)}},u_i=t=>t?(typeof t=="number"?`${t}`:t).split(/[_x]/)[0]:void 0,g_i=t=>{const e=l_i(t),n=u_i(t.imperial);return e===2&&n==="0402"?{circuitJson:Wmi(t),parameters:t}:e===4&&n==="0402"?{circuitJson:qmi(t),parameters:t}:e===2&&n==="0603"?{circuitJson:e_i(t),parameters:t}:e===4&&n==="0603"?{circuitJson:o_i(t),parameters:t}:e===2&&n==="0606"?{circuitJson:s_i(t),parameters:t}:e===4&&n==="1206"?{circuitJson:c_i(t),parameters:t}:{circuitJson:gpe(t),parameters:t}},Orn=(t,{x:e,y:n,radius:o})=>({type:"pcb_smtpad",x:e,y:n,radius:o,layer:"top",shape:"circle",pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(i=>i.toString()):[t.toString()]}),Grn="ABCDEFGHIJKLMNOPQRSTUVWXYZ",WB=Z().transform(t=>{const[e,n]=t.split(/[x ]/);return{x:parseFloat(e??""),y:parseFloat(n??"")}}).pipe(Pt({x:_t(),y:_t()})),d_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(64),grid:WB.optional(),p:lt.default("0.8mm"),w:ce.optional(),h:ce.optional(),ball:ce.optional().describe("ball diameter"),pad:ce.optional().describe("pad width/height"),circularpads:je().optional().default(!0).describe("use circular pads"),tlorigin:je().optional(),blorigin:je().optional(),trorigin:je().optional(),brorigin:je().optional(),missing:FX.default([])}).transform(t=>{let e="tl";if(t.blorigin&&(e="bl"),t.trorigin&&(e="tr"),t.brorigin&&(e="br"),!t.grid){const o=Math.ceil(Math.sqrt(t.num_pins));t.grid={x:o,y:o}}return t.missing&&(t.missing=t.missing.map(o=>{if(typeof o=="number")return o;if(o==="center")return"center";if(o==="topleft")return"topleft";const i=o.match(/([A-Z]+)(\d+)/);if(!i)return o;const r=Grn.indexOf(i[1]),s=Number.parseInt(i[2])-1;return r*t.grid.x+s+1})),{...t,origin:e}}),h_i=t=>{const e=d_i.parse(t);let{num_pins:n,grid:o,p:i,w:r,h:s,ball:a,pad:A,missing:c}=e;a??=.75/1.27*i,A??=e.ball===void 0?i*.5:a*.8;const l=[],u=(c??[]).filter(Y=>typeof Y=="number"),g=o.x*o.y-n;if(c.length===0&&g>0&&(Math.sqrt(g)%1===0?c.push("center"):g===1&&c.push("topleft")),c?.includes("center")){const Y=Math.floor(Math.sqrt(g)),W=Math.floor((o.x-Y)/2),te=Math.floor((o.y-Y)/2);for(let j=te;j<te+Y;j++)for(let J=W;J<W+Y;J++)u.push(j*o.x+J+1)}c?.includes("topleft")&&u.push(1);const h=new Set(u);let d=0;for(let Y=0;Y<o.y;Y++)for(let W=0;W<o.x;W++){const te=(W-(o.x-1)/2)*i,j=(Y-(o.y-1)/2)*i;let J=W,oe=Y;switch(e.origin){case"bl":J=W,oe=o.y-1-Y;break;case"br":J=o.x-1-W,oe=o.y-1-Y;break;case"tr":J=o.x-1-W,oe=Y;break}let ie=oe*o.x+J+1;if(h.has(ie)){d++;continue}ie-=d;const ne=[ie,`${Grn[oe]}${J+1}`];l.push(e.circularpads?Orn(ne,{x:te,y:j,radius:A/2}):Wo(ne,te,j,A,A))}const p=xi(0,o.y*i/2,.2),m=i/6;let _;const f=o.x*i/2,I=o.y*i/2;switch(e.origin){case"bl":_=[{x:-f,y:-I},{x:-f,y:-I-m},{x:-f-m,y:-I},{x:-f,y:-I}];break;case"br":_=[{x:f,y:-I},{x:f,y:-I-m},{x:f+m,y:-I},{x:f,y:-I}];break;case"tr":_=[{x:f,y:I},{x:f,y:I+m},{x:f+m,y:I},{x:f,y:I}];break;default:_=[{x:-f,y:I},{x:-f,y:I+m},{x:-f-m,y:I},{x:-f,y:I}];break}const C={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_marker",route:_,stroke_width:.05},y=(o.x-1)*i+A,x=(o.y-1)*i+A,E=r??y,B=s??x,S=Math.max(y/2,E/2),Q=Math.max(x/2,B/2),w=1.715,M=1.765,k=S+w,R=k,F=Q+M,O=F,U={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:s2([{minX:-k,maxX:k,minY:-O,maxY:O},{minX:-R,maxX:R,minY:-F,maxY:F}]),layer:"top"};return{circuitJson:[...l,p,C,U],parameters:e}},cT=(t,e,n,o,i)=>({type:"pcb_smtpad",x:e,y:n,width:o,height:i,radius:Math.min(o,i)/2,layer:"top",shape:"pill",pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(r=>r.toString()):[t.toString()]}),RY={thermalpadcenteroffsetx:ce.optional().default(0),thermalpadcenteroffsety:ce.optional().default(0)},hP=(t,e)=>Wo(["thermalpad"],e.x,e.y,t.x,t.y),lT=t=>Ci.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(t.w??"5.3mm")),p:ce.default(ce.parse(t.p??"1.27mm")),pw:ce.default(ce.parse(t.pw??"0.6mm")),pl:ce.default(ce.parse(t.pl??"1.0mm")),legsoutside:je().optional().default(t.legsoutside??!1),pillpads:je().optional().default(t.pillpads??!1),thermalpad:WB.optional(),...RY,silkscreen_stroke_width:_t().optional().default(.1)}).transform(e=>(!e.pw&&!e.pl?(e.pw=ce.parse("0.6mm"),e.pl=ce.parse("1.0mm")):e.pw?e.pl||(e.pl=e.pw*(1/.6)):e.pw=e.pl*(.6/1),e)),p_i=lT({}),UVe=t=>{t.widthincludeslegs!==void 0&&(t.legsoutside=!t.widthincludeslegs);const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n<=a,c=a-1,l=i,u=l*c,g=s?r/2:-r/2;return A?{x:-o/2-g,y:u/2-(n-1)*l}:{x:o/2+g,y:-u/2+(n-a-1)*l}},m_i=t=>{const e=p_i.parse(t);return{circuitJson:LX(e),parameters:e}},LX=t=>{const e=[],n=Math.min(t.pl,t.pw)/8;let o=0,i=0;for(let _=0;_<t.num_pins;_++){const{x:f,y:I}=UVe({num_pins:t.num_pins,pn:_+1,w:t.w,p:t.p,pl:t.pl,legsoutside:t.legsoutside});o=Math.max(o,Math.abs(f)+t.pl/2),i=Math.max(i,Math.abs(I)+t.pw/2),t.pillpads?e.push(cT(_+1,f,I,t.pl,t.pw)):e.push(Wo(_+1,f,I,t.pl,t.pw,n))}t.thermalpad&&e.push(hP(t.thermalpad,{x:t.thermalpadcenteroffsetx,y:t.thermalpadcenteroffsety}));const r=Math.min(1,t.p/2),s=t.w-(t.legsoutside?0:t.pl*2)-.2,a=(t.num_pins/2-1)*t.p+t.pw+r,A=xi(0,a/2+.4,a/12),c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",stroke_width:t.silkscreen_stroke_width??.1,route:[{x:-s/2,y:-a/2},{x:-s/2,y:a/2},...lpe.map(({x:_,y:f})=>({x:_*s/6,y:f*s/6+a/2})),{x:s/2,y:a/2},{x:s/2,y:-a/2},{x:-s/2,y:-a/2}]},l=t.w/2,u=a/2,g=Math.max(o,l)+.25,h=Math.min(i,u)+.25,d=Math.min(o,l)+.25,p=Math.max(i,u)+.25,m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-g,maxX:g,minY:-h,maxY:h},{minX:-d,maxX:d,minY:-p,maxY:p}])};return[...e,c,A,m]},__i=({num_pins:t,sidePinCounts:e,cw:n,ccw:o,startingpin:i})=>{const r=[],s=e.left,a=s+1,A=e.left+e.bottom,c=A+1,l=e.left+e.bottom+e.right,u=l+1;let g=1;const h={};for(const d of i??[])h[d]=!0;!h.leftside&&!h.topside&&!h.rightside&&!h.bottomside&&(h.leftside=!0),!h.bottompin&&!h.leftpin&&!h.rightpin&&!h.toppin&&(h.leftside?h.toppin=!0:h.topside?h.rightpin=!0:h.rightside?h.bottompin=!0:h.bottomside&&(h.leftpin=!0)),h.leftside&&h.toppin?g=1:h.leftside&&h.bottompin?g=s:h.bottomside&&h.leftpin?g=a:h.bottomside&&h.rightpin?g=A:h.rightside&&h.bottompin?g=c:h.rightside&&h.toppin?g=l:h.topside&&h.rightpin?g=u:h.topside&&h.leftpin&&(g=t),r.push(-1);for(let d=0;d<t;d++)r[g]=d+1,o||!n?(g++,g>t&&(g=1)):(g--,g<1&&(g=t));return r},Yrn=(t,e,n,o)=>{if(e!==void 0&&o!==void 0&&e!==o)throw new Error(`Conflicting ${t} (${e}) and ${n} (${o})`);return o??e},Urn=t=>{const e=Yrn("lrpins",t.lrpins,"leftrightpins",t.leftrightpins),n=Yrn("tbpins",t.tbpins,"topbottompins",t.topbottompins),o=t.num_pins/4,i={left:t.leftpins??e??o,top:t.toppins??n??o,right:t.rightpins??e??o,bottom:t.bottompins??n??o};if([t.leftpins,t.toppins,t.rightpins,t.bottompins,t.lrpins,t.leftrightpins,t.tbpins,t.topbottompins].some(s=>s!==void 0)){const s=Object.entries(i),a=s.find(([,c])=>!Number.isInteger(c)||c<1);if(a)throw new Error(`Quad ${a[0]} pin count must be a positive integer, got ${a[1]}`);const A=s.reduce((c,[,l])=>c+l,0);if(A!==t.num_pins)throw new Error(`Quad side pin counts left=${i.left}, top=${i.top}, right=${i.right}, bottom=${i.bottom} require ${A} pins, got ${t.num_pins}`)}return i},Krn=Kn(["leftside","topside","rightside","bottomside","toppin","bottompin","leftpin","rightpin"]),pP=S5.number().int().positive().optional(),hpe=Ci.extend({fn:Z(),cc:je().default(!0).optional(),ccw:je().default(!0).optional(),startingpin:Z().or(dn(Krn)).transform(t=>typeof t=="string"?t.slice(1,-1).split(","):t).pipe(dn(Krn)).optional(),num_pins:_t().optional().default(64),leftpins:pP,toppins:pP,rightpins:pP,bottompins:pP,lrpins:pP,leftrightpins:pP,tbpins:pP,topbottompins:pP,w:ce.optional(),h:ce.optional(),p:ce.default(ce.parse("0.5mm")),px:ce.optional().describe("top and bottom side pad pitch"),py:ce.optional().describe("left and right side pad pitch"),pw:ce.optional(),pl:ce.optional(),lrpw:ce.optional().describe("alias for leftrightpadwidth"),lrpl:ce.optional().describe("alias for leftrightpadlength"),leftrightpadwidth:ce.optional().describe("left and right side pad width"),leftrightpadlength:ce.optional().describe("left and right side pad length"),thermalpad:xo([$e(!0),WB]).optional(),...RY,pillpads:je().optional().default(!1),legsoutside:je().default(!1)}),ppe=t=>{if(t.lrpw!==void 0&&t.leftrightpadwidth!==void 0&&t.lrpw!==t.leftrightpadwidth)throw new Error(`Conflicting lrpw (${t.lrpw}) and leftrightpadwidth (${t.leftrightpadwidth})`);if(t.lrpl!==void 0&&t.leftrightpadlength!==void 0&&t.lrpl!==t.leftrightpadlength)throw new Error(`Conflicting lrpl (${t.lrpl}) and leftrightpadlength (${t.leftrightpadlength})`);t.leftrightpadwidth=t.leftrightpadwidth??t.lrpw,t.leftrightpadlength=t.leftrightpadlength??t.lrpl,t.w&&!t.h?t.h=t.w:!t.w&&t.h&&(t.w=t.h);const e=Urn(t),n=Math.max(e.top,e.bottom),o=Math.max(e.left,e.right),i=t.px??t.p,r=t.py??t.p;if(!t.p&&!t.pw&&!t.pl&&t.w){const s=n+4;t.p=t.w/s}if(!t.p&&t.w&&t.h&&t.pw&&t.pl){const s=(t.w-t.pl*2)/Math.max(n-1,1),a=(t.h-t.pl*2)/Math.max(o-1,1);t.p=(s+a)/2}return!t.w&&!t.h&&t.p&&(t.w=i*(n+4),t.h=r*(o+4)),t.p&&!t.pw&&!t.pl?(t.pw=t.p/2,t.pl=t.p/2):t.pw?t.pl||(t.pl=t.pw*(1/.6)):t.pw=t.pl*(.6/1),t},Vrn=hpe.transform(ppe),f_i=["left","bottom","right","top"],I_i=t=>{const{sidePinCounts:e,pn:n,w:o,h:i,p:r,px:s,py:a,pl:A,leftRightPadLength:c,legsoutside:l}=t,u=[e.left,e.bottom,e.right,e.top];let g=0,h=n-1;for(;g<u.length-1&&h>=u[g];)h-=u[g],g+=1;const d=u[g],p=f_i[g],m=p==="left"||p==="right"?a??r:s??r,_=p==="left"||p==="right"?c??A:A,f=m*(d-1),I=m*(d-1),C=l?_/2:-_/2;switch(p){case"left":return{x:-o/2-C+.1,y:I/2-h*m,o:"vert"};case"bottom":return{x:-f/2+h*m,y:-i/2-C+.1,o:"horz"};case"right":return{x:o/2+C-.1,y:-I/2+h*m,o:"vert"};case"top":return{x:f/2-h*m,y:i/2+C-.1,o:"horz"};default:throw new Error("Invalid pin number")}},uT=t=>{const e=Vrn.parse(t),n=e.leftrightpadwidth??e.lrpw??e.pw,o=e.leftrightpadlength??e.lrpl??e.pl,i=Urn(e),r=[];let s=0,a=0;const A=__i({...e,sidePinCounts:i}),c=Math.max(i.left,i.right),l=Math.max(i.top,i.bottom),u=i.left,g=u+1,h=i.left+i.bottom,d=h+1,p=i.left+i.bottom+i.right,m=p+1,_=e.num_pins;for(let R=0;R<e.num_pins;R++){const{x:F,y:O,o:U}=I_i({sidePinCounts:i,pin_count:e.num_pins,pn:R+1,w:e.w,h:e.h,p:e.p??.5,px:e.px,py:e.py,pl:e.pl,leftRightPadLength:o,legsoutside:e.legsoutside}),Y=U==="vert";let W=Y?n:e.pw,te=Y?o:e.pl;U==="vert"&&([W,te]=[te,W]);const j=Math.min(W,te)/8,J=A[R+1];s=Math.max(s,Math.abs(F)+W/2),a=Math.max(a,Math.abs(O)+te/2),r.push(e.pillpads?cT(J,F,O,W,te):Wo(J,F,O,W,te,j))}if(e.thermalpad){const R={x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety};if(typeof e.thermalpad=="boolean"){const F=(e.px??e.p)*(l-1)+e.pw,O=(e.py??e.p)*(c-1)+n;s=Math.max(s,Math.abs(R.x)+F/2),a=Math.max(a,Math.abs(R.y)+O/2),r.push(hP({x:F,y:O},R))}else s=Math.max(s,Math.abs(R.x)+e.thermalpad.x/2),a=Math.max(a,Math.abs(R.y)+e.thermalpad.y/2),r.push(hP(e.thermalpad,R))}const f=[];for(const[R,F,O]of[["top-left",-1,1],["bottom-left",-1,-1],["bottom-right",1,-1],["top-right",1,1]]){const U=e.w/2*F,Y=e.h/2*O;let W="none",te=U,j=Y;const J=e.pw*2;A[1]===1&&R==="top-left"?W="in1":A[_]===1&&R==="top-left"||A[m]===1&&R==="top-right"?W="in2":A[p]===1&&R==="top-right"||A[u]===1&&R==="bottom-left"?W="in1":A[g]===1&&R==="bottom-left"?W="in2":A[h]===1&&R==="bottom-right"?W="in1":A[d]===1&&R==="bottom-right"&&(W="in2");const oe=W==="in1"?1:-1;if(e.legsoutside){const ie=W==="in1"?e.pl/2:e.pw/2,ne=W==="in1"?e.pw/2:e.pl/2;te+=ie*F*oe,j-=ne*O*oe}(W==="none"||e.legsoutside)&&f.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}`,route:[{x:U-J*F,y:Y},{x:U,y:Y},{x:U,y:Y-J*O}],type:"pcb_silkscreen_path",stroke_width:.1}),(W==="in1"||W==="in2")&&!e.legsoutside&&f.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_1`,route:[{x:U-J*F,y:Y},{x:U-J*F/2,y:Y}],type:"pcb_silkscreen_path",stroke_width:0},{layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_2`,route:[{x:U,y:Y-J*O/2},{x:U,y:Y-J*O}],type:"pcb_silkscreen_path",stroke_width:.1}),(W==="in1"||W==="in2")&&f.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_3`,route:[{x:te-.2*-F,y:j+.2*oe},{x:te,y:j},{x:te+.2*oe*-F,y:j+.2},{x:te-.2*-F,y:j+.2*oe}],type:"pcb_silkscreen_path",stroke_width:.1})}const I=xi(0,e.h/2+(e.legsoutside?e.pl*1.2:.5),.3),C=R=>Math.ceil(R/.05)*.05,y=(l-1)*(e.px??e.p)+e.pw,x=(c-1)*(e.py??e.p)+n,E=y/2+.25,B=x/2+.25,S=e.w/2+.25,Q=e.h/2+.25,w=Math.max(S,C(s+.25)),M=Math.max(Q,C(a+.25)),k={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-w,maxX:w,minY:-B,maxY:B},{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-E,maxX:E,minY:-M,maxY:M}])};return{circuitJson:[...r,...f,I,k],parameters:e}},C_i=WB.refine(({x:t,y:e})=>Number.isInteger(t)&&Number.isInteger(e)&&t>0&&e>0,"thermal via grid dimensions must be positive integers"),KVe=ce.refine(t=>t>0,{message:"thermal via dimensions must be positive"}),VVe=Pt({thermalvias:xo([$e(!0),C_i]).optional(),thermalviapitch:KVe.optional(),thermalviaid:KVe.optional().describe("thermal via inner (hole) diameter"),thermalviaod:KVe.optional().describe("thermal via outer diameter")}),mpe={grid:{x:4,y:4},pitch:ce.parse("1mm"),holeDiameter:ce.parse("0.3048mm"),outerDiameter:ce.parse("0.6096mm")},y_i=(t,e)=>{if(!t.thermalvias)return[];const n=t.thermalvias===!0?mpe.grid:t.thermalvias,o=t.thermalviapitch??mpe.pitch,i=t.thermalviaid??mpe.holeDiameter,r=t.thermalviaod??mpe.outerDiameter;if(r<i)throw new Error("thermalviaod must be greater than or equal to thermalviaid");const s=(n.x-1)*o+r,a=(n.y-1)*o+r;if(s>e.width||a>e.height)throw new Error("thermal via grid must fit inside thermalpad");return Array.from({length:n.x*n.y},(A,c)=>{const l=c%n.x,u=Math.floor(c/n.x);return{pcb_via_id:"",type:"pcb_via",x:e.x+(l-(n.x-1)/2)*o,y:e.y+(u-(n.y-1)/2)*o,hole_diameter:i,outer_diameter:r,layers:["top","bottom"]}})},zrn=(t,e)=>{if(!e.thermalvias)return t;const n=t.find(o=>o.type==="pcb_smtpad"&&o.port_hints.includes("thermalpad"));if(!n)throw new Error("thermalvias requires a thermalpad");return[...t,...y_i(e,n)]};hpe.extend(VVe.shape).transform(ppe);var x_i=t=>{const e={...t,legsoutside:!1,pl:t.pl??.875,pw:t.pw??.25},n=uT(e),o=VVe.parse(t);return{circuitJson:zrn(n.circuitJson,o),parameters:{...n.parameters,...o}}},E_i=t=>{if(t.legsoutside=!0,!t.p)switch(t.num_pins){case 32:t.p=.8;break;case 44:case 48:t.p=.5;break;case 64:case 80:case 100:t.p=.5;break;case 144:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 32:case 44:case 48:case 64:case 80:case 100:t.pl=1.475;break;case 144:t.pl=1.6;break}if(!t.pw)switch(t.num_pins){case 32:t.pw=.55;break;case 44:case 48:case 64:case 80:case 100:t.pw=.3;break;case 144:t.pw=.25;break}return uT(t)},B_i=t=>{t.legsoutside=!0;const e=Vrn.parse(t);if(!t.p)switch(t.num_pins){case 44:case 64:t.p=.8;break;case 52:t.w===14?t.p=1:t.p=.65;break;case 208:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 44:case 52:case 64:t.pl=2.25;break;case 208:t.pl=1.65;break;default:t.pl=e.pl*4;break}if(!t.pw)switch(t.num_pins){case 44:case 64:t.pw=.5;break;case 52:t.w===14?t.pw=.45:t.pw=.55;break;case 208:t.pw=.3;break;default:t.pw=e.pw;break}return uT(t)};hpe.extend({}).transform(ppe);var b_i=t=>(t.legsoutside=!1,t.thermalpad===void 0&&(t.thermalpad=!0),uT(t)),S_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse("3.9mm")),p:ce.default(ce.parse("1.27mm")),pw:ce.optional(),pl:ce.optional(),legsoutside:je().optional().default(!1),thermalpad:WB.optional(),...RY,silkscreen_stroke_width:_t().optional().default(.1)}).transform(t=>(t.pw==null&&t.pl==null?(t.pw=ce.parse("0.51mm"),t.pl=ce.parse("1.1mm")):t.pw==null?t.pw=t.pl*(.51/1.1):t.pl==null&&(t.pl=t.pw*(1.1/.51)),t)),Q_i=t=>{const{num_pins:e,pn:n,w:o,p:i}=t,r=e/2,s=n<=r,a=r-1,A=i,c=A*a,l=o+ce.parse("0.2mm"),u=(s?-1:1)*(l/2);return s?{x:u,y:c/2-(n-1)*A}:{x:u,y:-c/2+(n-r-1)*A}},v_i=t=>{const e=S_i.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let _=0;_<e.num_pins;_++){const{x:f,y:I}=Q_i({num_pins:e.num_pins,pn:_+1,w:e.w,p:e.p,pl:e.pl,legsoutside:e.legsoutside});n.push(Wo(_+1,f,I,e.pl,e.pw,o))}e.thermalpad&&n.push(hP(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const i=Math.min(1,e.p/2),r=e.w-(e.legsoutside?0:e.pl)-.2,s=(e.num_pins/2-1)*e.p+e.pw+i,a=xi(0,s/2+.4,s/12),A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",stroke_width:e.silkscreen_stroke_width??.1,route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...lpe.map(({x:_,y:f})=>({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}]},c=(e.num_pins/2-1)*e.p+e.pw,l=e.legsoutside?e.w/2+e.pl:(e.w+.2)/2+e.pl/2,u=c/2,g=l+.25,h=g,d=u+.445,p=d,m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:s2([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:"top"};return{circuitJson:[...n,A,a,m],parameters:e}},w_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse("3.0mm")),p:ce.default(ce.parse("0.5mm")),pw:ce.default(ce.parse("0.30mm")),pl:ce.default(ce.parse("1.45mm")),legsoutside:je().optional().default(!0),thermalpad:WB.optional(),...RY,silkscreen_stroke_width:_t().optional().default(.1)}),P_i=t=>{const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n<=a,c=a-1,l=i*c,u=s?r/2:-r/2;return A?{x:-o/2-u,y:l/2-(n-1)*i}:{x:o/2+u,y:-l/2+(n-a-1)*i}},M_i=t=>{const e={...t},n=e.p,o=typeof n=="string"||typeof n=="number"?ce.parse(n):void 0,i=o!=null&&o<=ce.parse("0.5mm"),r=w_i.parse(e),s=[],a=r.rounded??Math.min(r.pl,r.pw)/8,A=i?r.w-ce.parse("0.15mm"):r.w;for(let y=0;y<r.num_pins;y++){const{x,y:E}=P_i({num_pins:r.num_pins,pn:y+1,w:A,p:r.p,pl:r.pl,legsoutside:r.legsoutside});s.push(Wo(y+1,x,E,r.pl,r.pw,a))}r.thermalpad&&s.push(hP(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const c=Math.min(1,r.p/2),l=r.w-(r.legsoutside?0:r.pl*2)-.2,u=(r.num_pins/2-1)*r.p+r.pw+c,g=xi(0,u/2+.4,u/12),h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",stroke_width:r.silkscreen_stroke_width??.1,route:[{x:-l/2,y:-u/2},{x:-l/2,y:u/2},...lpe.map(({x:y,y:x})=>({x:y*l/6,y:x*l/6+u/2})),{x:l/2,y:u/2},{x:l/2,y:-u/2},{x:-l/2,y:-u/2}]},d=(r.num_pins/2-1)*r.p+r.pw,p=r.w/2+(r.legsoutside?r.pl:0),m=r.w/2+.25,_=p+.18,f=d/2+.25,I=f+.35,C={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-_,maxX:_,minY:-f,maxY:f},{minX:-m,maxX:m,minY:-I,maxY:I}])};return{circuitJson:[...s,h,g,C],parameters:r}},D_i=[{x:-1.45,y:.93},{x:-.73,y:.93},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.93},{x:1.45,y:.93},{x:1.45,y:-.93},{x:.73,y:-.93},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.93},{x:-1.45,y:-.93}],N_i=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("3.1mm"),h:Z().default("2.0mm"),p:Z().default("0.65mm"),pl:Z().default("1.03mm"),pw:Z().default("0.35mm"),string:Z().optional()}),R_i=t=>{const e=N_i.parse({...t,fn:"sot363"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=Jrn(p+1,n,i);A.push(Wo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/4,y:o/2+.1},{x:n/4,y:o/2+.1}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/4,y:-o/2-.1},{x:n/4,y:-o/2-.1}],stroke_width:.05,pcb_silkscreen_path_id:""},u=Jrn(1,n,i),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=xi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:D_i,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},Jrn=(t,e,n,o)=>t<=3?{x:-.84,y:n-(t-1)*n}:{x:.84,y:-n+(t-4)*n},T_i=[{x:-.75,y:1},{x:-.75,y:-1},{x:.75,y:-1},{x:.75,y:1}],k_i=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("1.01mm"),h:Z().default("1.45mm"),p:Z().default("0.5mm"),pl:Z().default("0.33mm"),pw:Z().default("0.27mm"),string:Z().optional()}),F_i=t=>{const e=k_i.parse({...t,fn:"sot886"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=Wrn(p+1,n,i,r);A.push(Wo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},u=Wrn(1,n,i,r),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=xi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:T_i,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},Wrn=(t,e,n,o)=>{const i=e/2-o/2;return t<=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},L_i=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:.55},{x:2.05,y:.55},{x:2.05,y:-.55},{x:1.05,y:-.55},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5},{x:-2.05,y:-.39},{x:-1.05,y:-.39},{x:-1.05,y:.39},{x:-2.05,y:.39}],H_i=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:1.5},{x:2.05,y:1.5},{x:2.05,y:.39},{x:1.05,y:.39},{x:1.05,y:-.39},{x:2.05,y:-.39},{x:2.05,y:-1.5},{x:1.05,y:-1.5},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5}],jrn=Ci.extend({fn:Z(),num_pins:_t().default(3),w:Z().default("2.275mm"),h:Z().default("2.74mm"),pl:Z().default("1.325mm"),pw:Z().default("0.6mm"),p:Z().default("0.95mm"),string:Z().optional()}),O_i=lT({p:"0.95mm",w:"1.6mm",legsoutside:!0}),G_i=t=>{const e=t.string?.match(/^sot23_(\d+)/),n=e?Number.parseInt(e[1],10):3;if(n===6||n===8){const i=O_i.parse({...t,num_pins:n});return{circuitJson:LX(i),parameters:i}}const o=jrn.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:U_i(o),parameters:o};if(o.num_pins===5)return{circuitJson:qrn(o),parameters:o};throw new Error("Invalid number of pins")},Y_i=t=>{const{pn:e,w:n,p:o}=t;return e===1?{x:-n/2,y:o}:e===2?{x:-n/2,y:-o}:{x:n/2,y:0}},U_i=t=>{const e=[],n=Number.parseFloat(t.w);Number.parseFloat(t.h);const o=Number.parseFloat(t.pl),i=Number.parseFloat(t.pw),r=Number.parseFloat(t.p),s=t.rounded??Math.min(o,i)/8;for(let c=0;c<t.num_pins;c++){const{x:l,y:u}=Y_i({num_pins:t.num_pins,pn:c+1,w:n,p:r});e.push(Wo(c+1,l,u,o,i,s))}const a=xi(0,Number.parseInt(t.h),.3),A={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:L_i,layer:"top"};return[...e,a,A]},$rn=t=>{const{w:e,p:n,h:o,pn:i}=t;if(i===1)return{x:-e/2,y:n};if(i===2)return{x:-e/2,y:0};if(i===3)return{x:-e/2,y:-n};if(i===4)return{x:e/2,y:-n};if(i===5)return{x:e/2,y:n};throw new Error("Invalid pin number")},qrn=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.p),r=Number.parseFloat(t.pl),s=Number.parseFloat(t.pw),a=t.rounded??Math.min(r,s)/8;for(let f=1;f<=t.num_pins;f++){const{x:I,y:C}=$rn({w:n,h:o,p:i,pn:f});e.push(Wo(f,I,C,r,s,a))}const A=(t.num_pins+1)/2*i,c=o,l={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-A/3,y:c/2+i/1.3},{x:A/3,y:c/2+i/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-A/3,y:-c/2-i/1.3},{x:A/3,y:-c/2-i/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},g=xi(0,c+.3,.3),h=$rn({w:n,h:o,p:i,pn:1});h.x=h.x-s*1.5;const d=.3,p=.4,m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_indicator",route:[{x:h.x+d/2,y:h.y},{x:h.x-d/2,y:h.y+p/2},{x:h.x-d/2,y:h.y-p/2},{x:h.x+d/2,y:h.y}],stroke_width:.05},_={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:H_i,layer:"top"};return[...e,g,l,u,m,_]},K_i=jrn.extend({}),V_i=t=>{const e=K_i.parse({...t,num_pins:5});return{circuitJson:qrn(e),parameters:e}},z_i=[{name:"top-left",dx:-1,dy:1},{name:"top-right",dx:1,dy:1},{name:"bottom-left",dx:-1,dy:-1},{name:"bottom-right",dx:1,dy:-1}],zVe=(t,e)=>({type:"pcb_smtpad",points:e,layer:"top",shape:"polygon",pcb_smtpad_id:"",port_hints:Array.isArray(t)?t.map(n=>n.toString()):[t.toString()]}),J_i=lT({}).and(VVe),W_i=t=>{const e=je().optional().parse(t.cornerpads),n=t.cornerpadcutlength===void 0?void 0:ce.parse(t.cornerpadcutlength),o=FX.parse(t.missing??[]);if(o.some(S=>typeof S!="number"))throw new Error("DFN missing positions must be pad numbers");const i=[...new Set(o)];if(i.length!==o.length)throw new Error("DFN missing positions must not contain duplicates");const r={...J_i.parse(t),cornerpads:e,cornerpadcutlength:n,missing:i},s=r.num_pins;if(i.some(S=>S<1||S>s))throw new Error("DFN missing position is outside the nominal pad range");if(e){if(s!==4||i.length>0||r.pillpads)throw new Error("DFN corner pads require four nominal pads with none missing");if(n===void 0||n<=0||n>Math.min(r.pl,r.pw))throw new Error("DFN corner pads require a valid cornerpadcutlength")}const a=new Set(i),A=[],c=Math.min(r.pl,r.pw)/8;let l=0,u=1;for(let S=1;S<=s;S+=1){if(a.has(S))continue;const{x:Q,y:w}=UVe({num_pins:s,pn:S,w:r.w,p:r.p??1.27,pl:r.pl,widthincludeslegs:!0});if(l=Math.max(l,Math.abs(w)+r.pw/2),e){const M=Math.sign(Q),k=Math.sign(w),R=Q-M*r.pl/2,F=w-k*r.pw/2,O=Q+M*r.pl/2,U=w+k*r.pw/2;A.push(zVe(u,[{x:R,y:F+k*n},{x:R,y:U},{x:O,y:U},{x:O,y:F},{x:R+M*n,y:F}]))}else A.push((r.pillpads?cT:Wo)(u,Q,w,r.pl??"1mm",r.pw??"0.6mm",c));u+=1}r.thermalpad&&A.push(hP(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const g=Math.min(1,r.p/2),h=r.w+g,d=l*2+g,p=[];for(const S of z_i){const{dx:Q,dy:w}=S;p.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",route:[{x:Q*h/2-Q*r.p,y:w*d/2},{x:Q*h/2,y:w*d/2},{x:Q*h/2,y:w*d/2-w*r.p}],type:"pcb_silkscreen_path",stroke_width:.1})}const m=r.p/4,_=-h/2-m/2,f=d/2-r.p/2;p.push({layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:_,y:f},{x:_-m,y:f+m},{x:_-m,y:f-m},{x:_,y:f}],stroke_width:.1});const I=xi(0,d/2+.4,d/12),C=S=>Math.ceil(S/.05)*.05,y=C(r.w/2+.25),x=C(l+.45),E={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:y*2,height:x*2,layer:"top"},B=[...A,I,...p,E];return{circuitJson:zrn(B,r),parameters:r}};function Xrn({pinlabeltextalignleft:t,pinlabeltextalignright:e,pinlabelorthogonal:n}){let o="top";return n?o="left":o="top",t&&(n?o="bottom":o="right"),e&&(n?o="top":o="left"),o}var gT=({fs:t,pn:e,anchor_x:n,anchor_y:o,textalign:i="center",anchorplacement:r,orthogonal:s=!1,verticallyinverted:a=!1,layer:A="top"})=>{let c=0;s&&a?c=270:a?c=180:s?c=90:c=0;let l="center";if(i!=="center"&&(l=i==="left"?a?"center_right":"center_left":a?"center_left":"center_right",r)){const g={top:{x:0,y:1},bottom:{x:0,y:-1},left:{x:-1,y:0},right:{x:1,y:0}}[r],h=c*Math.PI/180,d={x:Math.cos(h),y:Math.sin(h)},p=g.x*d.x+g.y*d.y;Math.abs(p)>.5&&(l=p>0?"center_left":"center_right")}return A==="bottom"&&(l==="center_left"?l="center_right":l==="center_right"&&(l="center_left")),{type:"pcb_silkscreen_text",pcb_silkscreen_text_id:"silkscreen_text_1",font:"tscircuit2024",font_size:t,pcb_component_id:"pcb_component_1",text:`{PIN${e}}`,layer:A,anchor_position:{x:n,y:o},anchor_alignment:l,ccw_rotation:c}},j_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(6),rows:xo([Z(),_t()]).transform(t=>Number(t)).optional().default(1).describe("number of rows"),cols:xo([Z(),_t()]).transform(t=>Number(t)).optional().describe("number of nominal columns in a sparse grid"),p:ce.default("0.1in").describe("pitch"),py:ce.optional().describe("vertical row pitch"),id:ce.default("1.0mm").describe("inner diameter"),od:ce.default("1.5mm").describe("outer diameter"),missing:FX.default([]).describe("row-major nominal grid positions to omit"),male:je().optional().describe("for male pin headers"),female:je().optional().describe("for female pin headers"),smd:je().optional().describe("surface mount device"),surfacemount:je().optional().describe("surface mount device (verbose)"),rightangle:je().optional().describe("right angle"),pw:ce.optional().default("1.0mm").describe("pad width for SMD"),pl:ce.optional().default("2.0mm").describe("pad length for SMD"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nosquareplating:je().optional().default(!1).describe("do not use rectangular pad for pin 1"),nopinlabels:je().optional().default(!1).describe("omit silkscreen pin labels"),doublesidedpinlabel:je().optional().default(!1).describe("add silkscreen pins in top and bottom layers"),bottomsidepinlabel:je().optional().default(!1).describe("place the silkscreen reference text on the bottom layer instead of top"),silkscreenborder:je().optional().default(!1).describe("add a rectangular silkscreen border around the pin row"),silkscreenlabel:Z().transform(t=>t.startsWith("(")&&t.endsWith(")")?t.slice(1,-1):t).optional().describe("replace the reference designator with a custom silkscreen label")}).transform(t=>{const e=Xrn(t);return{...t,pinlabelAnchorSide:e,male:t.male??!t.female,female:t.female??!1,smd:t.smd??t.surfacemount??!1,rightangle:t.rightangle??!1}}).superRefine((t,e)=>{t.male&&t.female&&e.addIssue({code:lo.custom,message:"'male' and 'female' cannot both be true; it should be male or female.",path:["male","female"]}),t.cols!==void 0&&(!Number.isInteger(t.cols)||t.cols<1)&&e.addIssue({code:lo.custom,message:"'cols' must be a positive integer",path:["cols"]}),t.missing.some(n=>typeof n!="number")&&e.addIssue({code:lo.custom,message:"'missing' positions must be pad numbers",path:["missing"]})}),Zrn=t=>{const e=j_i.parse(t),{p:n,py:o,id:i,od:r,rows:s,cols:a,num_pins:A,missing:c,pinlabelAnchorSide:l,pinlabelverticallyinverted:u,pinlabelorthogonal:g,pinlabeltextalignleft:h,pinlabeltextalignright:d,nopinlabels:p,doublesidedpinlabel:m,bottomsidepinlabel:_,silkscreenborder:f,silkscreenlabel:I}=e;let C="center";h?C="left":d&&(C="right");const y=[];let x=null;const E=c,B=new Set(E);if(B.size!==E.length)throw new Error("Pinrow missing positions must not contain duplicates");const S=A+E.length,Q=a??Math.ceil(S/s),w=Q*s,M=a!==void 0||E.length>0;if(M&&w!==S)throw new Error(`Pinrow grid has ${w} positions, but ${S} are required for ${A} pins and ${E.length} missing positions`);if(E.some(he=>!Number.isInteger(he)||he<1||he>w))throw new Error("Pinrow missing position is outside the nominal grid");const k=o??n,R=(s-1)*k,F=R/2,O=-k,U=({xoff:he,yoff:Qe,od:Pe,anchorSide:we,smd:Te,pw:Re,pl:Ee})=>{let ke=0,Ce=0;if(Te){const Le=Pe/5;switch(we){case"right":ke=Re/2+Le;break;case"top":Ce=Ee/2+Le;break;case"bottom":Ce=-(Ee/2+Le);break;case"left":ke=-(Re/2+Le);break}}else{const Le=Pe/2+.6;switch(we){case"right":ke=Le;break;case"top":Ce=Le;break;case"bottom":Ce=-Le;break;case"left":ke=-Le;break}}return{anchor_x:he+ke,anchor_y:Qe+Ce}},Y=(he,Qe,Pe)=>{he===1&&(x={x:Qe,y:Pe}),e.smd?y.push(Wo(he,Qe,Pe,e.pw,e.pl)):he===1&&!e.nosquareplating?y.push(r2({pn:he,x:Qe,y:Pe,holeDiameter:i,rectPadWidth:r,rectPadHeight:r})):y.push(Os(he,Qe,Pe,i,r));const{anchor_x:we,anchor_y:Te}=U({xoff:Qe,yoff:Pe,od:r,anchorSide:l,smd:e.smd,pw:e.pw,pl:e.pl});p||(_?y.push(gT({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:"bottom"})):y.push(gT({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:"top"})),m&&y.push(gT({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:"bottom"})))},W=new Set;if(M){const he=-((Q-1)/2)*n;let Qe=1;for(let Pe=0;Pe<s;Pe++)for(let we=0;we<Q;we++){const Te=Pe*Q+we+1;if(B.has(Te))continue;const Re=he+we*n,Ee=F+Pe*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Qe++,Re,Ee)}}else if(s===1){const he=-((A-1)/2)*n;for(let Qe=0;Qe<A;Qe++){const Pe=Qe+1,we=he+Qe*n,Te=`${we},0`;if(W.has(Te))throw new Error(`Overlap at ${Te}`);W.add(Te),Y(Pe,we,0)}}else if(s>2&&Q>2){const Qe=-((Q-1)/2)*n;let Pe=1;for(let we=0;we<s&&Pe<=A;we++)for(let Te=0;Te<Q&&Pe<=A;Te++){const Re=Qe+Te*n,Ee=F+we*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Pe++,Re,Ee)}}else{const Qe=-((Q-1)/2)*n;let Pe=1,we=0,Te=s-1,Re=0,Ee=Q-1;for(;Pe<=A&&we<=Te&&Re<=Ee;){for(let ke=we;ke<=Te&&Pe<=A;ke++){const Ce=Qe+Re*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Re++;for(let ke=Re;ke<=Ee&&Pe<=A;ke++){const Ce=Qe+ke*n,Le=F+Te*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}if(Te--,Re<=Ee){for(let ke=Te;ke>=we&&Pe<=A;ke--){const Ce=Qe+Ee*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Ee--}if(we<=Te){for(let ke=Ee;ke>=Re&&Pe<=A;ke--){const Ce=Qe+ke*n,Le=F+we*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}we++}}if(Pe-1<A)throw new Error(`Missing pins: assigned ${Pe-1}, expected ${A}`)}const te=e.smd?e.pw/2:r/2,j=e.smd?e.pl/2:r/2,J=(Q-1)*n,oe=J/2+n/2+1,ie=Math.max(R/2+j+1,n/2+1),ne=f?sA([{x:-oe,y:-ie},{x:oe,y:-ie},{x:oe,y:ie},{x:-oe,y:ie},{x:-oe,y:-ie}]):null,le=(()=>{if(e.fn!=="headermodule"||!x)return null;const he=Math.max(.3,Math.min(.6,n/4)),Qe=.15;if(l==="top"||l==="bottom"){const Ee=Math.sign(x.x)||(l==="top"?-1:1),ke=x.x+Ee*(te+Qe),Ce=ke+Ee*he;return sA([{x:ke,y:x.y},{x:Ce,y:x.y-he},{x:Ce,y:x.y+he},{x:ke,y:x.y}],{pcb_component_id:"pin_marker_1",pcb_silkscreen_path_id:"pin_marker_1"})}const we=Math.sign(x.y)||1,Te=x.y+we*(j+Qe),Re=Te+we*he;return sA([{x:x.x,y:Te},{x:x.x-he,y:Re},{x:x.x+he,y:Re},{x:x.x,y:Te}],{pcb_component_id:"pin_marker_1",pcb_silkscreen_path_id:"pin_marker_1"})})(),ge=I?{type:"pcb_silkscreen_text",pcb_silkscreen_text_id:"silkscreen_text_1",font:"tscircuit2024",font_size:.8,pcb_component_id:"pcb_component_1",text:I,layer:"top",anchor_position:{x:0,y:0},anchor_alignment:"center"}:xi(0,R/2+n,.5),_e=J/2+te,ue=R/2+j,fe=J/2+n/2,pe=R/2+n/2,ye=Math.max(_e+.25,fe+.5),Me=Math.max(ue+.25,pe+.5),ve={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*ye,height:2*Me,layer:"top"};return{circuitJson:[...y,...ne?[ne]:[],...le?[le]:[],ge,ve],parameters:e}},$_i=t=>Zrn({...t,fn:"headermodule"}),q_i=[{x:-1.2,y:.83},{x:-.75,y:.83},{x:-.75,y:.95},{x:.75,y:.95},{x:.75,y:.83},{x:1.2,y:.83},{x:1.2,y:-.83},{x:.75,y:-.83},{x:.75,y:-.95},{x:-.75,y:-.95},{x:-.75,y:-.83},{x:-1.2,y:-.83}],X_i=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("2.1mm"),h:Z().default("2.45mm"),p:Z().default("0.5mm"),pl:Z().default("0.675mm"),pw:Z().default("0.35mm"),string:Z().optional()}),Z_i=t=>{const e=X_i.parse({...t,fn:"sot563"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=esn(p+1,n,i,r);A.push(Wo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},u=esn(1,n,i,r),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=xi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:q_i,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},esn=(t,e,n,o)=>{const i=e/2-o/2;return t<=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},efi=lT({p:"1.27mm",w:"3.9mm",legsoutside:!0}),tfi=t=>{const e=efi.parse({...t,num_pins:8});return{circuitJson:LX(e),parameters:e}},nfi=lT({p:"1.27mm",w:"7.5mm",legsoutside:!0}),ofi=t=>{const e=nfi.parse({...t,num_pins:16});return{circuitJson:LX(e),parameters:e}},ifi=Ci.extend({fn:Z(),num_pins:$e(3).default(3),w:Z().default("1.2mm"),h:Z().default("1.2mm"),pw:Z().default("0.40mm"),pl:Z().default("0.45mm"),p:Z().default("0.575mm")}),rfi=t=>{const e=ifi.parse(t),n=afi(e),o=xi(0,ce.parse(e.h),.2),i=1.8,r=1.8,s={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:[{x:-i/2,y:r/2},{x:i/2,y:r/2},{x:i/2,y:-r/2},{x:-i/2,y:-r/2}],layer:"top"};return{circuitJson:[...n,o,s],parameters:e}},sfi=t=>{const{pn:e,p:n}=t;return e===1?{x:n,y:0}:e===2?{x:-n,y:-.4}:{x:-n,y:.4}},afi=t=>{const e=[];Number.parseFloat(t.w),Number.parseFloat(t.h);const n=Number.parseFloat(t.pl),o=Number.parseFloat(t.pw),i=Number.parseFloat(t.p),r=Math.min(n,o)/8;for(let s=0;s<3;s++){const{x:a,y:A}=sfi({num_pins:t.num_pins,pn:s+1,p:i});e.push(Wo(s+1,a,A,n,o,r))}return e},Afi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("2.36mm"),h:Z().default("1.22mm"),pl:Z().default("0.9mm"),pw:Z().default("1.2mm"),p:Z().default("3.30mm")}),cfi=t=>{const e=Afi.parse(t),n=ce.parse(e.h),o=xi(0,n/4+.4,.3),s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.7,height:2.3,layer:"top"};return{circuitJson:ufi(e).concat(...uh(e),o,s),parameters:e}},lfi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},ufi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=lfi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1125))}return e},gfi=Ci.extend({fn:Z(),p:ce.optional().default("2.54mm"),id:ce.optional().default("0.7mm"),od:ce.optional().default("1.4mm")}),dfi=t=>{const e=gfi.parse(t),{p:n,id:o,od:i}=e,r=[Os(1,-n/2,0,o,i),Os(2,n/2,0,o,i)],s={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2+i+o/2,y:0},{x:n/2-i-o/2,y:0}],stroke_width:.1,pcb_silkscreen_path_id:""},a=xi(0,1.5,.5),A=-n/2,c=n/2,l=i/2,u=i/2,g=A-l-.35,h=c+l+.26,d=u+.35,p=g,m=h,_=d,f={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:s2([{minX:g,maxX:h,minY:-_,maxY:_},{minX:p,maxX:m,minY:-d,maxY:d}]),layer:"top"};return{circuitJson:[...r,s,a,f],parameters:e}},hfi=(t,e,n,o,i,r=.1)=>{const s=[],a=[],A=Math.max(1,Math.ceil(Math.PI*n/r)),c=Math.PI/A;for(let l=0;l<=A;l++){const u=l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g<t-o&&h>=e-i/2&&h<=e+i/2||s.push({x:g,y:h})}for(let l=0;l<=A;l++){const u=Math.PI+l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g<t-o&&h>=e-i/2&&h<=e+i/2||a.push({x:g,y:h})}return{topArc:s,bottomArc:a}},pfi=Ci.extend({fn:Z(),p:ce.optional().default("5mm"),id:ce.optional().default("0.8mm"),od:ce.optional().default("1.6mm"),ceramic:je().optional(),electrolytic:je().optional(),polarized:je().optional()}),mfi=t=>{const e=pfi.parse(t),{p:n,id:o,od:i}=e;o===.8&&i===1.6&&(e.id=n===5?.8:n*.25,e.od=n===5?1.6:n*.5);const r=[Os(1,-n/2,0,e.id,e.od),Os(2,n/2,0,e.id,e.od)],s=n+.1,{topArc:a,bottomArc:A}=hfi(0,0,s,e.od/2,e.od),c=.02*n,l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:a,stroke_width:c,pcb_silkscreen_path_id:""},u={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:A,stroke_width:c,pcb_silkscreen_path_id:""},g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:0,y:s},{x:0,y:-s}],stroke_width:c,pcb_silkscreen_path_id:""},h=.1*n,d=-(n+h+.04*n),p=s-h-.08*n,m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d-h,y:p},{x:d+h,y:p}],stroke_width:c,pcb_silkscreen_path_id:""},_={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:d,y:p-h},{x:d,y:p+h}],stroke_width:c,pcb_silkscreen_path_id:""},f=xi(0,s+.12*n,.1*n),I=[...r,l,u,g,f];(e.electrolytic===!0||e.polarized===!0)&&I.push(m,_);const y=n+.25,x={type:"pcb_courtyard_circle",pcb_courtyard_circle_id:"",pcb_component_id:"",center:{x:0,y:0},radius:y,layer:"top"};return I.push(x),{circuitJson:I,parameters:e}},_fi=Ci.extend({fn:$e("rj45"),num_pins:xo([$e(10),$e(14)]).default(10),ledpins:je().default(!1).describe("add the four through-hole LED connections as pins 9 through 12"),firstpinleft:je().default(!1).describe("mirror the eight signal pins so pin 1 is on the left"),firstpintop:je().default(!1).describe("mirror the eight signal pins so pin 1 is in the top row"),p:ce.default("1.02mm").describe("horizontal signal-pin pitch"),py:ce.default("1.78mm").describe("signal-row pitch"),id:ce.default("0.9144mm").describe("signal and LED hole diameter"),od:ce.default("1.524mm").describe("signal and LED outer diameter"),shieldx:ce.default("8.13mm").describe("shield-pin x offset from the footprint center"),shieldy:ce.default("0.13mm").describe("signed shield-pin y offset from the signal-row center"),shieldid:ce.default("1.8mm").describe("shield-pin hole diameter"),shieldod:ce.default("2.5mm").describe("shield-pin outer diameter"),holex:ce.default("6.35mm").describe("locator-hole x offset from the footprint center"),holey:ce.default("-3.43mm").describe("signed locator-hole y offset from the signal-row center"),holed:ce.default("3.25mm").describe("locator-hole diameter"),ledx:ce.default("4.57mm").describe("inner LED-pin x offset from the footprint center"),ledp:ce.default("2.29mm").describe("pitch within each LED-pin pair"),ledy:ce.default("5.7mm").describe("signed LED-pin y offset from the signal-row center"),w:ce.default("16.26mm").describe("connector body width"),h:ce.default("15.88mm").describe("connector body height"),bodyy:ce.default("-0.96mm").describe("signed connector body center y offset")}),ffi=t=>{const e=t.ledpins===!0||t.num_pins===14,n=_fi.parse({...t,ledpins:e,num_pins:e?14:10}),{ledpins:o,firstpinleft:i,firstpintop:r,p:s,py:a,id:A,od:c,shieldx:l,shieldy:u,shieldid:g,shieldod:h,holex:d,holey:p,holed:m,ledx:_,ledp:f,ledy:I,w:C,h:y,bodyy:x}=n,E=Me=>Number(Me.toFixed(12)),B=Array.from({length:8},(Me,ve)=>{const he=ve+1,Qe=(3.5-ve)*s,Pe=ve%2===0?-a/2:a/2,we=E(i?-Qe:Qe),Te=E(r?-Pe:Pe);return Os(he,we,Te,A,c)}),S=o?[Os(9,E(-_-f),I,A,c),Os(10,-_,I,A,c),Os(11,_,I,A,c),Os(12,E(_+f),I,A,c)]:[],Q=o?14:9,w=o?13:10,M=i!==r,k=M?w:Q,R=M?Q:w,F=[Os(k,-l,u,g,h),Os(R,l,u,g,h)],O=[-d,d].map(Me=>({type:"pcb_hole",pcb_hole_id:"",pcb_component_id:"",hole_shape:"circle",hole_diameter:m,x:Me,y:p})),U=-C/2,Y=C/2,W=x-y/2,te=x+y/2,j=h/2+.2,J=[[W,Math.min(te,u-j)],[Math.max(W,u+j),te]].filter(([Me,ve])=>ve-Me>.01),oe=[sA([{x:U,y:W},{x:Y,y:W}]),sA([{x:U,y:te},{x:Y,y:te}]),...J.flatMap(([Me,ve])=>[sA([{x:U,y:Me},{x:U,y:ve}]),sA([{x:Y,y:Me},{x:Y,y:ve}])])],ie=Math.min(-l-h/2,-d-m/2,o?-_-f-c/2:0),ne=-ie,le=Math.min(u-h/2,p-m/2,-a/2-c/2,o?I-c/2:Number.POSITIVE_INFINITY),ge=Math.max(u+h/2,p+m/2,a/2+c/2,o?I+c/2:Number.NEGATIVE_INFINITY),_e=Math.min(U,ie)-.25,ue=Math.max(Y,ne)+.25,fe=Math.min(W,le)-.25,pe=Math.max(te,ge)+.25,ye={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(_e+ue)/2,y:(fe+pe)/2},width:ue-_e,height:pe-fe,layer:"top"};return{circuitJson:[...O,...B,...S,...F,...oe,xi(0,pe+.55,.5),ye],parameters:n}},Ifi=Ci.extend({fn:$e("pushbutton"),w:ce.default(4.5),h:ce.default(6.5),id:ce.default(1),od:ce.default(1.2)}),Cfi=t=>{const e=Ifi.parse(t),n=e.w,o=e.h,i=e.id,r=[Os(1,-n/2,o/2,i,i*1.5),Os(2,-n/2,-o/2,i,i*1.5),Os(3,n/2,-o/2,i,i*1.5),Os(4,n/2,o/2,i,i*1.5)],s=[sA([{x:-n/2,y:-o/2},{x:-n/2,y:o/2}]),sA([{x:n/2,y:-o/2},{x:n/2,y:o/2}]),sA([{x:-n/2,y:0},{x:-n/5,y:0},{x:n/5*1/Math.sqrt(2),y:o/8}]),sA([{x:n/2,y:0},{x:n/5,y:0}])],a=xi(0,o/2+.4,.5),A=i*1.5/2,c=n,l=o,u=c/2+A,g=l/2+A,h=u+.5,d=g+.5,p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*h,height:2*d,layer:"top"};return{circuitJson:[...r,...s,a,p],parameters:e}},tsn=Ci.extend({fn:Z(),w:ce.default("22.58mm"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse("2.54mm")),pw:ce.default(ce.parse("1.6mm")),pl:ce.default(ce.parse("2.4mm")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse("1.61mm")),silkscreenlabels:je().default(!1),silkscreenlabelmargin:ce.default(ce.parse("0.1mm"))}),yfi=t=>{const e=tsn.parse(t);return e.left&&e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},_pe=(t,e,n)=>{let o=[];return n==="right"&&(o=[{x:t+1/2,y:e},{x:t-1/2,y:e+.6/2},{x:t-1/2,y:e-.6/2},{x:t+1/2,y:e}]),n==="left"&&(o=[{x:t-1/2,y:e},{x:t+1/2,y:e+.6/2},{x:t+1/2,y:e-.6/2},{x:t-1/2,y:e}]),n==="top"&&(o=[{x:t,y:e+1/2},{x:t-.6/2,y:e-1/2},{x:t+.6/2,y:e-1/2},{x:t,y:e+1/2}]),n==="bottom"&&(o=[{x:t,y:e-1/2},{x:t-.6/2,y:e+1/2},{x:t+.6/2,y:e+1/2},{x:t,y:e-1/2}]),o},xfi=t=>{const e=tsn.parse(t),n=e.h??yfi(e),o=[],i=[],r=[];let s=[];const a=1,A=a,c=e.left+e.right+(e.bottom??0)+(e.top??0),u=`pin${c}`.length*.7/2;if(e.right){const p=-((e.right-1)/2)*e.p;for(let m=0;m<e.right;m++){if(m===0&&!e.left&&!e.bottom&&!e.silkscreenlabels&&(s=_pe(e.w/2-e.pl*1.4,p+m*e.p,"right")),o.push(Wo(m+1+e.left+(e.bottom??0),e.w/2-e.pl/2,p+m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1+e.left+(e.bottom??0),f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:e.w/2-e.pl-(u+e.silkscreenlabelmargin),y:p+m*e.p},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"})}e.innerhole&&(i.push(Os(m+1+e.left+(e.bottom??0)+c,e.w/2,p+m*e.p,a,A)),i.push(Os(m+1+e.left+(e.bottom??0)+c*2,e.w/2-e.innerholeedgedistance,p+m*e.p,a,A)))}}if(e.left){const p=(e.left-1)/2*e.p;for(let m=0;m<e.left;m++){if(m===0&&!e.silkscreenlabels&&(s=_pe(-e.w/2+e.pl*1.4,p-m*e.p,"left")),o.push(Wo(m+1,-e.w/2+e.pl/2,p-m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1,f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:-e.w/2+e.pl+(u+e.silkscreenlabelmargin),y:p-m*e.p},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"})}e.innerhole&&(i.push(Os(m+1+c,-e.w/2,p-m*e.p,a,A)),i.push(Os(m+1+c*2,-e.w/2+e.innerholeedgedistance,p-m*e.p,a,A)))}}if(e.top){const p=(e.top-1)/2*e.p;for(let m=0;m<e.top;m++){if(m===0&&!e.left&&!e.bottom&&!e.right&&!e.silkscreenlabels&&(s=_pe(p-m*e.p,n/2-e.pl*1.4,"top")),o.push(Wo(m+1+e.left+e.right+(e.bottom??0),p-m*e.p,n/2-e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left+e.right+(e.bottom??0),f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:p-m*e.p,y:n/2-e.pl-(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center",ccw_rotation:270})}e.innerhole&&(i.push(Os(m+1+e.left+e.right+(e.bottom??0)+c,p-m*e.p,n/2,a,A)),i.push(Os(m+1+e.left+e.right+(e.bottom??0)+c*2,p-m*e.p,n/2-e.innerholeedgedistance,a,A)))}}if(e.bottom){const p=-((e.bottom-1)/2)*e.p;for(let m=0;m<e.bottom;m++){if(m===0&&!e.left&&!e.silkscreenlabels&&(s=_pe(p+m*e.p,-n/2+e.pl*1.4,"bottom")),o.push(Wo(m+1+e.left,p+m*e.p,-n/2+e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left,f=`pin${_}`;r.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:"1",layer:"top",anchor_position:{x:p+m*e.p,y:-n/2+e.pl+(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:"tscircuit2024",anchor_alignment:"center",ccw_rotation:90})}e.innerhole&&(i.push(Os(m+1+e.left+c,p+m*e.p,-n/2,a,A)),i.push(Os(m+1+e.left+c*2,p+m*e.p,-n/2+e.innerholeedgedistance,a,A)))}}const g={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_triangle_1",pcb_component_id:"2",route:s,stroke_width:.1,layer:"top"},h={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_path_1",pcb_component_id:"1",route:[{x:-e.w/2,y:n/2},{x:e.w/2,y:n/2},{x:e.w/2,y:-n/2},{x:-e.w/2,y:-n/2},{x:-e.w/2,y:n/2}],stroke_width:.1,layer:"top"},d=xi(0,n/1.8,n/25);return{circuitJson:[...o,...i,...r,h,...e.silkscreenlabels?[]:[g],d],parameters:e}},nsn=Ci.extend({fn:Z(),w:ce.default("22.58mm"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse("2.54mm")),pw:ce.default(ce.parse("1.6mm")),pl:ce.default(ce.parse("3.2mm")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse("1.61mm"))}),Efi=t=>{const e=nsn.parse(t);return e.left&&e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},Bfi=(t,e,n,o=1,i=.6)=>{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},bfi=t=>{const e=nsn.parse(t),n=e.h??Efi(e),o=[],i=[],r=[],s=1,a=1.2,A=e.left+e.right+(e.bottom??0)+(e.top??0);let c=[],l=1;if(e.left){const d=(e.left-1)/2*e.p;for(let p=0;p<e.left;p++)p===0&&(c=Bfi(-e.w/2-e.pl/2,d-p*e.p,"left")),o.push(Wo(l,-e.w/2+e.pl/2,d-p*e.p,e.pl,e.pw)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:-e.w/2+e.pl/2-4.5,y:d-p*e.p},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(Os(l+A,-e.w/2+e.innerholeedgedistance,d-p*e.p,s,a))}if(e.bottom){const d=(e.bottom-1)/2*e.p;for(let p=e.bottom-1;p>=0;p--)o.push(Wo(l,d-p*e.p,-n/2+e.pl/2,e.pw,e.pl)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:d-p*e.p,y:-n/2+e.pl/2-3.2},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(Os(l+A,d-p*e.p,-n/2+e.innerholeedgedistance,s,a))}if(e.right){const d=-((e.right-1)/2)*e.p;for(let p=0;p<e.right;p++)o.push(Wo(l,e.w/2-e.pl/2,d+p*e.p,e.pl,e.pw)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:e.w/2-e.pl/2+3.7,y:d+p*e.p},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(Os(l+A,e.w/2-e.innerholeedgedistance,d+p*e.p,s,a))}if(e.top){const d=-((e.top-1)/2)*e.p;for(let p=e.top-1;p>=0;p--)o.push(Wo(l,d+p*e.p,n/2-e.pl/2,e.pw,e.pl)),i.push({type:"pcb_silkscreen_text",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:"1",layer:"top",anchor_position:{x:d+p*e.p,y:n/2-e.pl/2+3.2},text:`pin${l}`,font_size:.7,font:"tscircuit2024",anchor_alignment:"center"}),l++,e.innerhole&&r.push(Os(l+A,d+p*e.p,n/2-e.innerholeedgedistance,s,a))}const u={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"1",pcb_component_id:"1",layer:"top",route:c,stroke_width:.1},g={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_path_1",pcb_component_id:"1",route:[{x:-e.w/2-e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:n/2+e.pl/3}],stroke_width:.1,layer:"top"},h=xi(0,n/1.8,n/25);return{circuitJson:[...r,...o,...i,g,u,h],parameters:e}},Sfi=t=>(t.legsoutside=!0,t.pl||(t.pl=1.5),t.pw||(t.pw=.3),uT(t)),Qfi=Ci.extend({fn:Z(),num_pins:_t().int().positive().optional().default(14),grid:WB.optional(),p:ce.default(ce.parse("0.5mm")),w:ce.optional(),h:ce.optional(),pw:ce.default(ce.parse("0.28mm")),pl:ce.default(ce.parse("0.7mm")),pillpads:je().optional().default(!1)}),vfi=t=>{const e=Qfi.parse(t),n=e.num_pins/2;if(!Number.isInteger(n))throw new Error("LGA footprints require an even number of perimeter pads");const o=e.grid??{x:Math.ceil(n/2),y:Math.floor(n/2)};if(!Number.isInteger(o.x)||!Number.isInteger(o.y)||o.x<0||o.y<0||o.x+o.y<=0||2*(o.x+o.y)!==e.num_pins)throw new Error(`LGA grid ${o.x}x${o.y} requires ${2*(o.x+o.y)} pads, got ${e.num_pins}`);const i=e.w??(o.y-1)*e.p+2*e.pl,r=e.h??(o.x-1)*e.p+2*e.pl,s=(i-e.pl)/2,a=(r-e.pl)/2,A=[],c=(p,m,_,f,I)=>{A.push(e.pillpads?cT(p,m,_,f,I):Wo(p,m,_,f,I))};let l=1;for(let p=0;p<o.x;p+=1)c(l++,-s,((o.x-1)/2-p)*e.p,e.pl,e.pw);for(let p=0;p<o.y;p+=1)c(l++,(p-(o.y-1)/2)*e.p,-a,e.pw,e.pl);for(let p=0;p<o.x;p+=1)c(l++,s,(p-(o.x-1)/2)*e.p,e.pl,e.pw);for(let p=0;p<o.y;p+=1)c(l++,((o.y-1)/2-p)*e.p,a,e.pw,e.pl);const u=Math.max(e.pw,.15),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_marker",stroke_width:.1,route:[{x:-i/2,y:r/2-u},{x:-i/2,y:r/2},{x:-i/2+u,y:r/2}]},h=.25,d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:[{x:-i/2-h,y:-r/2-h},{x:i/2+h,y:-r/2-h},{x:i/2+h,y:r/2+h},{x:-i/2-h,y:r/2+h},{x:-i/2-h,y:-r/2-h}]};return{circuitJson:[...A,g,xi(0,r/2+.5,.3),d],parameters:{...e,grid:o,w:i,h:r}}},osn=Ci.extend({fn:Z(),w:ce.default("10mm"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(0),bottom:ce.optional().default(0),p:ce.default(ce.parse("2.54mm")),id:ce.optional().default(ce.parse("1mm")),od:ce.optional().default(ce.parse("1.5mm"))}),wfi=t=>{const e=osn.parse(t);return e.left&&e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},fpe=(t,e,n,o=1,i=.6)=>{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},Pfi=t=>{const e=osn.parse(t),n=e.h??wfi(e),o=[],i=e.id,r=e.od;let s=[];if(e.right){const l=-((e.right-1)/2)*e.p;for(let u=0;u<e.right;u++)u===0&&!e.left&&!e.bottom&&(s=fpe(e.w/2+r*1.4,l+u*e.p,"right")),o.push(Os(u+1+e.left+(e.bottom??0),e.w/2,l+u*e.p,i,r))}if(e.left){const l=-((e.left-1)/2)*e.p;for(let u=0;u<e.left;u++)u===e.left-1&&(s=fpe(-e.w/2-r*1.4,l+u*e.p,"left")),o.push(Os(u+1,-e.w/2,l+u*e.p,i,r))}if(e.top){const l=-((e.top-1)/2)*e.p;for(let u=0;u<e.top;u++)u===e.top-1&&!e.left&&!e.bottom&&!e.right&&(s=fpe(l+u*e.p,n/2+r*1.4,"top")),o.push(Os(u+1+e.right+(e.bottom??0)+e.left,l+u*e.p,n/2,i,r))}if(e.bottom){const l=-((e.bottom-1)/2)*e.p;for(let u=0;u<e.bottom;u++)u===0&&!e.left&&(s=fpe(l+u*e.p,-n/2-r*1.4,"bottom")),o.push(Os(u+1+e.left,l+u*e.p,-n/2,i,r))}const a={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"1",pcb_component_id:"1",layer:"top",route:s,stroke_width:.1},A={type:"pcb_silkscreen_path",pcb_silkscreen_path_id:"pcb_silkscreen_path_1",pcb_component_id:"1",route:[{x:-e.w/2-r,y:n/2+r},{x:e.w/2+r,y:n/2+r},{x:e.w/2+r,y:-n/2-r},{x:-e.w/2-r,y:-n/2-r},{x:-e.w/2-r,y:n/2+r}],stroke_width:.1,layer:"top"},c=xi(0,n/1.7,n/25);return{circuitJson:[...o,A,c,a],parameters:e}},Mfi=t=>{const{centerX:e,centerY:n,straightHalfLength:o,radius:i,arcSegmentCount:r=9,orientation:s="horizontal"}=t;if(o<0)throw new Error("Capsule straightHalfLength must be non-negative");if(i<=0)throw new Error("Capsule radius must be positive");if(r<2)throw new Error("Capsule arcSegmentCount must be at least 2");if(s==="horizontal"){const u=e-o,g=e+o,h=Array.from({length:r+1},(p,m)=>{const _=Math.PI/2-m*Math.PI/r;return{x:g+Math.cos(_)*i,y:n+Math.sin(_)*i}}),d=Array.from({length:r+1},(p,m)=>{const _=-Math.PI/2+m*Math.PI/r;return{x:u-Math.cos(_)*i,y:n+Math.sin(_)*i}});return[{x:u,y:n+i},{x:g,y:n+i},...h.slice(1,-1),{x:g,y:n-i},{x:u,y:n-i},...d.slice(1,-1)]}const a=n-o,A=n+o,c=Array.from({length:r+1},(u,g)=>{const h=Math.PI-g*Math.PI/r;return{x:e+Math.cos(h)*i,y:A+Math.sin(h)*i}}),l=Array.from({length:r+1},(u,g)=>{const h=g*Math.PI/r;return{x:e+Math.cos(h)*i,y:a-Math.sin(h)*i}});return[{x:e-i,y:a},{x:e-i,y:A},...c.slice(1,-1),{x:e+i,y:A},{x:e+i,y:a},...l.slice(1,-1)]},isn=(t,e,n,o)=>Array.from({length:25},(i,r)=>{const s=r/24*Math.PI-Math.PI/2;return{x:t+(o==="right"?1:-1)*Math.cos(s)*n,y:e+Math.sin(s)*n}}),Dfi=Ci.extend({fn:Z(),p:ce.optional().default("4.88mm"),id:ce.optional().default("0.8mm"),od:ce.optional().default("1.5mm"),w:ce.optional().default("5.6mm"),h:ce.optional().default("3.5mm")}),Nfi=t=>{const e=Dfi.parse(t),{p:n,id:o,od:i,w:r,h:s}=e,a=s/2,A=[Os(1,-n/2,0,o,i),Os(2,n/2,0,o,i)],c=isn(-r/2,0,a,"left"),l=isn(r/2,0,a,"right"),u={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[...c,...c.slice(1).reverse(),{x:-r/2,y:-s/2},{x:r/2,y:-s/2},...l,{x:r/2,y:s/2},{x:-r/2,y:s/2}],stroke_width:.1,pcb_silkscreen_path_id:""},g=xi(0,n/4,.5),d=n/2+i/2,p=Math.max(s/2+.25,r/2+.03),m={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:Mfi({centerX:0,centerY:0,straightHalfLength:d,radius:p,arcSegmentCount:9}),layer:"top"};return{circuitJson:[...A,u,g,m],parameters:e}};Ci.extend({w:ce,h:ce});var Rfi=t=>{const{w:e,h:n}=t,o=Ua(e),i=Ua(n);return{circuitJson:[Wo(1,0,0,o,i),xi(0,i/2+.5,.2)],parameters:t}},Q6=(t,e,n,o,i,r)=>({pcb_plated_hole_id:"",type:"pcb_plated_hole",shape:"pill",x:e,y:n,outer_width:Ua(i),outer_height:Ua(r),hole_width:Ua(o),hole_height:Ua(o),pcb_port_id:"",layers:["top","bottom"],port_hints:[t.toString()],ccw_rotation:0}),Tfi=[{x:-2.5,y:4.75},{x:-2.5,y:-.25},{x:2.5,y:-.25},{x:2.5,y:4.75}],kfi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default("1.27mm"),id:Z().default("0.72mm"),od:Z().default("0.95mm"),w:Z().default("4.5mm"),h:Z().default("4.5mm"),inline:je().default(!1),string:Z().optional()}),Ffi=(t,e,n)=>Array.from({length:25},(o,i)=>{const r=i/24*Math.PI;return{x:t+Math.cos(r)*n,y:e+Math.sin(r)*n}}),Lfi=t=>{const e=t.string?.match(/^to92_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=kfi.parse({...t,num_pins:n}),{p:i,id:r,od:s,w:a,h:A,inline:c}=o,l=Number.parseFloat(A)/2,u=Number.parseFloat(i),g=Number.parseFloat(r),h=Number.parseFloat(s),d=h,p=h*(1.5/1.05);let m=[];if(o.num_pins===3)c?m=[r2({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:p}),Q6(2,0,l-u,g,d,p),Q6(3,u,l-u,g,d,p)]:m=[r2({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:h}),Os(2,0,l,g,h),Os(3,u,l-u,g,h)];else if(o.num_pins===2)m=[r2({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:d,rectPadHeight:p}),Q6(2,u,l-u,g,d,p)];else throw new Error("Invalid number of pins for TO-92");const _=Number.parseFloat(a)/2,f=Ffi(0,l,_),I={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[...f,{x:-_,y:0},{x:_,y:0},f[0]],stroke_width:.1,pcb_silkscreen_path_id:""},C=xi(0,l+1,.5),y={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:Tfi,layer:"top"};return{circuitJson:[...m,I,C,y],parameters:o}},Hfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("2.15mm"),h:Z().default("0.7mm"),pl:Z().default("0.6mm"),pw:Z().default("0.7mm"),p:Z().default("1.4mm")}),Ofi=t=>{const e=Hfi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2.5,height:1.4,layer:"top"};return{circuitJson:Yfi(e).concat(...uh(e),o,n,s),parameters:e}},Gfi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Yfi=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.075;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=Gfi({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},Ufi=lT({w:"7.05mm",p:"1.27mm",pw:"0.65mm",pl:"1.975mm"}),Kfi=t=>{const e=Ufi.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let h=0;h<e.num_pins;h++){const{x:d,y:p}=UVe({num_pins:e.num_pins,pn:h+1,w:e.w,p:e.p??1.27,pl:e.pl,widthincludeslegs:!0});n.push(Wo(h+1,d,p,e.pl,e.pw,o))}const i=(e.num_pins/2-1)*e.p+e.pw,r=xi(0,i/2+1,i/12),s={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:-e.w/3,y:i/2+.4},{x:e.w/3,y:i/2+.4}],stroke_width:.1},a=(e.num_pins/2-1)*e.p+e.pw,A=e.w/2-1.395,c=e.w/2+.255,l=a/2+.25,u=a/2+.5,g={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-c,maxX:c,minY:-l,maxY:l},{minX:-A,maxX:A,minY:-u,maxY:u}])};return{circuitJson:[...n,r,s,g],parameters:e}},Vfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("5.0mm"),h:Z().default("2.30mm"),pl:Z().default("1.25mm"),pw:Z().default("2mm"),p:Z().default("3.75mm")}),zfi=t=>{const e=Vfi.parse(t),n=xi(0,ce.parse(e.h)/2+1,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2+.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2-.5},{x:ce.parse(e.p)/2+.5,y:-ce.parse(e.h)/2-.5}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:5.1,height:2.8,layer:"top"};return{circuitJson:Wfi(e).concat(...uh(e),o,n,s),parameters:e}},Jfi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Wfi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=Jfi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},jfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.4mm"),h:Z().default("1.7mm"),pl:Z().default("1.2mm"),pw:Z().default("1.2mm"),p:Z().default("2.8mm")}),$fi=t=>{const e=jfi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.5,height:2.2,layer:"top"};return{circuitJson:Xfi(e).concat(...uh(e),o,n,s),parameters:e}},qfi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Xfi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=qfi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Zfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.30mm"),h:Z().default("1.80mm"),pl:Z().default("0.60mm"),pw:Z().default("0.45mm"),p:Z().default("2.1mm")}),e1i=t=>{const e=Zfi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.2,height:1.9,layer:"top"};return{circuitJson:n1i(e).concat(...uh(e),o,n,s),parameters:e}},t1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},n1i=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.05625;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=t1i({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},o1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.4mm"),h:Z().default("0.9mm"),pl:Z().default("0.36mm"),pw:Z().default("0.25mm"),p:Z().default("0.85mm")}),i1i=t=>{const e=o1i.parse(t),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.pl),r=ce.parse(e.pw),s=ce.parse(e.p),a=xi(0,o,.3),A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:s/2+.15,y:o/2},{x:-n/2-.15,y:o/2},{x:-n/2-.15,y:-o/2},{x:s/2+.15,y:-o/2}],stroke_width:.1,pcb_silkscreen_path_id:""},c=s+i,l=r,u=n/2,g=o/2,h=c/2,d=l/2,p=Math.max(u,h),m=Math.max(g,d),_=Math.min(u,h),f=Math.min(g,d),I=p+.05,C=_-.055,y=m,x=f+.155,E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:s2([{minX:-I,maxX:I,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-y,maxY:y}]),layer:"top"};return{circuitJson:s1i(e).concat(...uh(e),A,a,E),parameters:e}},r1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},s1i=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.03125;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=r1i({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},a1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.3mm"),h:Z().default("0.9mm"),pl:Z().default("0.4mm"),pw:Z().default("0.7mm"),p:Z().default("0.7mm")}),A1i=t=>{const e=a1i.parse(t),n=xi(0,ce.parse(e.h)+.1,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2+.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2+.2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:1.6,height:1.2,layer:"top"};return{circuitJson:l1i(e).concat(...uh(e),o,n,s),parameters:e}},c1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},l1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=c1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.025))}return e},u1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.05mm"),h:Z().default("1.4mm"),pl:Z().default("0.5mm"),pw:Z().default("0.5mm"),pad_spacing:Z().default("2.2mm")}),g1i=t=>{const e=u1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.2,height:1.9,layer:"top"};return{circuitJson:h1i(e).concat(...uh(e),o,n,s),parameters:e}},d1i=t=>{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},h1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=d1i({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},p1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.4mm"),h:Z().default("2.1mm"),pl:Z().default("1.10mm"),pw:Z().default("1.10mm"),p:Z().default("2.8mm")}),m1i=t=>{const e=p1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.4,height:2.3,layer:"top"};return{circuitJson:f1i(e).concat(...uh(e),o,n,s),parameters:e}},_1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},f1i=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=_1i({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},I1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.4mm"),h:Z().default("2.1mm"),pl:Z().default("0.91mm"),pw:Z().default("1.22mm"),p:Z().default("3.146mm")}),C1i=t=>{const e=I1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.9,height:2.7,layer:"top"};return{circuitJson:x1i(e).concat(...uh(e),o,n,s),parameters:e}},y1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},x1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=y1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},E1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.80mm"),h:Z().default("1.00mm"),pl:Z().default("0.66mm"),pw:Z().default("0.5mm"),p:Z().default("0.8mm")}),B1i=t=>{const e=E1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2.3,height:1.5,layer:"top"};return{circuitJson:S1i(e).concat(...uh(e),o,n,s),parameters:e}},b1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},S1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=b1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Q1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("6.2mm"),h:Z().default("3.4mm"),pl:Z().default("1.4mm"),pw:Z().default("2.1mm"),p:Z().default("4.4mm")}),v1i=t=>{const e=Q1i.parse(t),n=xi(0,ce.parse(e.h)/2+.4,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:6.3,height:3,layer:"top"};return{circuitJson:P1i(e).concat(...uh(e),o,n,s),parameters:e}},w1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},P1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=w1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},M1i=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.25,y:2.5},{x:2.25,y:-2.5}],D1i=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.85,y:2.5},{x:2.85,y:-2.5}],N1i=[{x:.9,y:.5},{x:2.6,y:.5},{x:2.6,y:-.5},{x:.9,y:-.5},{x:.4,y:-1},{x:-.4,y:-1},{x:-.9,y:-.5},{x:-2.6,y:-.5},{x:-2.6,y:.5},{x:-.9,y:.5},{x:-.4,y:1},{x:.4,y:1}],R1i=[{x:2,y:-.8665},{x:-1.125,y:-.8665},{x:-1.125,y:-.45},{x:-2.6,y:-.45},{x:-2.6,y:.45},{x:-1.125,y:.45},{x:-1.125,y:.8665},{x:2,y:.8665}],T1i=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(5)]).default(3),w:Z().default("4.20mm"),h:Z().default("4.80mm"),pl:Z().default("1.3mm"),pw:Z().default("0.9mm"),p:Z().default("1.5mm"),string:Z().optional()}),k1i=t=>{const e=Number.parseFloat(t.p),n=Number.parseFloat(t.pw),o=Number.parseFloat(t.w),i=Number.parseFloat(t.pl),r=Math.min(i,n)/8,s=-o/2+.15,a=o/2-1,A=Number.parseFloat(t.h)/2,c=[Wo(1,s,e,i,n,r),zVe(2,R1i),Wo(3,s,-e,i,n,r)],l=xi(0,A+.5,.3),u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-a,y:A},{x:a,y:A},{x:a,y:A/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},g={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-a,y:-A},{x:a,y:-A},{x:a,y:-A/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},h={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:M1i,layer:"top"};return[...c,u,g,l,h]},F1i=t=>{const e=Math.min(1.5,.7)/8,n=[Wo(1,-1.85,-1.5,1.5,.7,e),Wo(2,-1.85,1.5,1.5,.7,e),zVe(3,N1i),Wo(4,1.85,-1.5,1.5,.7,e),Wo(5,1.85,1.5,1.5,.7,e)],o=Number.parseFloat(t.w)/2-1,i=Number.parseFloat(t.h)/2,r=xi(0,i+.5,.3),s={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-o,y:i},{x:o,y:i}],type:"pcb_silkscreen_path",stroke_width:.1},a={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-o,y:-i},{x:o,y:-i}],type:"pcb_silkscreen_path",stroke_width:.1},A={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:D1i,layer:"top"};return[...n,s,a,r,A]},L1i=t=>{const e=t.string?.match(/^sot89_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=T1i.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:k1i(o),parameters:o};if(o.num_pins===5)return{circuitJson:F1i(o),parameters:o};throw new Error("Invalid number of pins for SOT89")},H1i=Ci.extend({fn:Z(),p:ce.optional().default("5.0mm"),id:ce.optional().default("1.0mm"),od:ce.optional().default("1.9mm"),w:ce.optional().default("13mm"),h:ce.optional().default("7mm"),num_pins:_t().optional(),string:Z().optional()}),rsn=t=>{const e=H1i.parse(t),{id:n,od:o,w:i,h:r,string:s}=e,a=e.num_pins??Number.parseInt(s?.match(/^to220(?:_|-)(\d+)/i)?.[1]??"3"),A=-1,c=i/2,l=r/2,u=2.5,g=i*.4,h=Math.max(u,g/(a-1)),d=Array.from({length:a},(F,O)=>{const U=a%2===0?(O-a/2+.5)*h:(O-Math.floor(a/2))*h;return Os(O+1,U,A,n,o)}),p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-c,y:-l},{x:c,y:-l},{x:c,y:l},{x:-c,y:l},{x:-c,y:-l}],stroke_width:.1,pcb_silkscreen_path_id:""},m=-l+2*r/3,_={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-c,y:m},{x:c,y:m}],stroke_width:.1,pcb_silkscreen_path_id:""},f=[{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-i/6,y:m},{x:-i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:""},{type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:i/6,y:m},{x:i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:""}],I=xi(0,r/2+.6,.5),C=Math.max(...d.map(F=>Math.abs(F.x)))+o/2,y=A+o/2,x=A-o/2,E=Math.max(C+.25,c-o*.59),B=l-o*.63,S=x-(o/2+.01),Q=-E,w=E,M=Math.min(S,x-.25),k=Math.max(B,y+.25),R={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(Q+w)/2,y:(M+k)/2},width:w-Q,height:k-M,layer:"top"};return{circuitJson:[...d,p,_,...f,I,R],parameters:{...e,p:h}}},JVe=2.54,O1i=Ci.extend({fn:Z(),id:ce.optional().default("1.2mm"),od:ce.optional().default("1.905mm"),ph:ce.optional().default("2mm"),w:ce.optional().default("13mm"),h:ce.optional().default("7mm"),num_pins:_t().optional(),string:Z().optional()}),G1i=t=>{const e=O1i.parse(t),n=e.num_pins??Number.parseInt(e.string?.match(/^to220f(?:_|-)(\d+)/i)?.[1]??"3"),o=rsn({...e,fn:"to220",string:e.string?.replace(/^to220f/i,"to220"),num_pins:n}),i=-1,r=Array.from({length:n},(a,A)=>{const c=n%2===0?(A-n/2+.5)*JVe:(A-Math.floor(n/2))*JVe;return A===0?r2({pn:1,x:c,y:i,holeDiameter:e.id,rectPadWidth:e.od,rectPadHeight:e.ph}):Q6(A+1,c,i,Ua(e.id),Ua(e.od),Ua(e.ph))}),s=o.circuitJson.filter(a=>a.type!=="pcb_plated_hole");return{circuitJson:[...r,...s],parameters:{...e,p:JVe,num_pins:n}}},Y1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("5.40mm"),h:Z().default("2.30mm"),pl:Z().default("1.30mm"),pw:Z().default("1.70mm"),p:Z().default("3.5mm")}),U1i=t=>{const e=Y1i.parse(t),n=xi(0,ce.parse(e.h)/2+.4,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:5.3,height:2.2,layer:"top"};return{circuitJson:V1i(e).concat(...uh(e),o,n,s),parameters:e}},K1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},V1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=K1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},z1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("1.90mm"),h:Z().default("1.33mm"),pl:Z().default("0.5mm"),pw:Z().default("0.7mm"),p:Z().default("0.8mm")}),J1i=t=>{const e=z1i.parse(t),n=xi(0,ce.parse(e.h)+.1,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2+.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2+.1,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:1.8,height:1.2,layer:"top"};return{circuitJson:j1i(e).concat(...uh(e),o,n,s),parameters:e}},W1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},j1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=W1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},$1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("7.0mm"),h:Z().default("3.35mm"),pl:Z().default("1.50mm"),pw:Z().default("2.70mm"),p:Z().default("4.8mm")}),q1i=t=>{const e=$1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:6.8,height:3.2,layer:"top"};return{circuitJson:Z1i(e).concat(...uh(e),o,n,s),parameters:e}},X1i=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Z1i=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=X1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},eIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.0mm"),h:Z().default("1.80mm"),pl:Z().default("0.80mm"),pw:Z().default("1.20mm"),p:Z().default("1.6mm")}),tIi=t=>{const e=eIi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2.9,height:1.7,layer:"top"};return{circuitJson:oIi(e).concat(...uh(e),o,n,s),parameters:e}},nIi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},oIi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=nIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},iIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("7.10mm"),h:Z().default("3.40mm"),pl:Z().default("2.50mm"),pw:Z().default("1.80mm"),p:Z().default("4.00mm")}),rIi=t=>{const e=iIi.parse(t),n=xi(0,ce.parse(e.h)/2+.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:7,height:3.5,layer:"top"};return{circuitJson:aIi(e).concat(...uh(e),o,n,s),parameters:e}},sIi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},aIi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=sIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},AIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("4.80mm"),h:Z().default("2.10mm"),pl:Z().default("1.30mm"),pw:Z().default("1.40mm"),p:Z().default("2.9mm")}),cIi=t=>{const e=AIi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.7,height:2.3,layer:"top"};return{circuitJson:uIi(e).concat(...uh(e),o,n,s),parameters:e}},lIi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},uIi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=lIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},gIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("7.30mm"),h:Z().default("4.40mm"),pl:Z().default("2.50mm"),pw:Z().default("2.30mm"),p:Z().default("4.30mm")}),dIi=t=>{const e=gIi.parse(t),n=xi(0,ce.parse(e.h)/2+.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:7.3,height:4.5,layer:"top"};return{circuitJson:pIi(e).concat(...uh(e),o,n,s),parameters:e}},hIi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},pIi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=hIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},mIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("10.70mm"),h:Z().default("6.60mm"),pl:Z().default("2.50mm"),pw:Z().default("3.30mm"),p:Z().default("6.80mm")}),_Ii=t=>{const e=mIi.parse(t),n=xi(0,3,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:-ce.parse(e.h)/2+.8},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2+.8}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:9.8,height:6.7,layer:"top"};return{circuitJson:IIi(e).concat(...uh(e),o,n,s),parameters:e}},fIi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},IIi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=fIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},CIi=Ci.extend({fn:Z(),num_pins:_t().default(4),w:Z().default("8.50mm"),h:Z().default("6.90mm"),pl:Z().default("2mm"),pw:Z().default("1.5mm"),p:Z().default("2.30mm"),tabpl:Z().optional(),tabpw:Z().default("3.8mm"),taboffset:Z().default("0mm"),string:Z().optional()}),yIi=t=>{const e=t.string?.match(/^sot223_(\d+)/),n=e?Number.parseInt(e[1],10):4;if(n===8){const i=BIi.parse({...t,num_pins:n});return{circuitJson:LX(i),parameters:i}}const o=CIi.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:EIi(o),parameters:o};if(o.num_pins===5)return{circuitJson:SIi(o),parameters:o};if(o.num_pins===6)return{circuitJson:vIi(o),parameters:o};throw new Error("Invalid number of pins")},xIi=t=>{const{pn:e,w:n,p:o,taboffset:i}=t;return e===1?{x:-n/2+1.1,y:o}:e===2?{x:-n/2+1.1,y:0}:e===3?{x:-n/2+1.1,y:-o}:{x:n/2-1.1+i,y:0}},EIi=t=>{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h),s=Number.parseFloat(t.pl),a=Number.parseFloat(t.p),A=Number.parseFloat(t.pw),c=Number.parseFloat(t.tabpl??t.pl),l=Number.parseFloat(t.tabpw),u=Number.parseFloat(t.taboffset);for(let x=0;x<t.num_pins;x++){const{x:E,y:B}=xIi({num_pins:t.num_pins,pn:x+1,w:i,p:a,taboffset:u}),S=x===3?l:A,Q=x===3?c:s,w=Math.min(Q,S)/8;n=Math.max(n,Math.abs(E)+Q/2),o=Math.max(o,Math.abs(B)+S/2),e.push(Wo(x+1,E,B,Q,S,w))}const g=xi(0,0,.3),h=i/2-2.4,d=r/2,p={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-h,y:d},{x:h,y:d},{x:h,y:d/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},m={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-h,y:-d},{x:h,y:-d},{x:h,y:-d/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},_=i/2,f=r/2,I=Math.max(n+.25,_+.15),C=Math.max(o+.25,f+.15),y={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*I,height:2*C,layer:"top"};return[...e,p,m,g,y]},BIi=lT({p:"0.90mm",w:"2.8mm",legsoutside:!0}),bIi=t=>{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:e/2+e};if(n===2)return{x:-o/2+1.2,y:e/2};if(n===3)return{x:-o/2+1.2,y:-e/2};if(n===4)return{x:-o/2+1.2,y:-e/2-e};if(n===5)return{x:o/2-1,y:0};throw new Error("Invalid pin number")},SIi=t=>{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h);for(let m=1;m<=t.num_pins;m++){const{x:_,y:f}=bIi({p:1.5,pn:m,w:i});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===5?(I=3.4,C=1.8):(I=1,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Wo(m,_,f,C,I,y))}const s=i/2-2.4,a=r/2,A={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},c={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},l=xi(0,0,.3),u=i/2,g=r/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*h,height:2*d,layer:"top"};return[...e,A,c,l,p]},QIi=t=>{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:2*e};if(n===2)return{x:-o/2+1.2,y:e};if(n===3)return{x:-o/2+1.2,y:0};if(n===4)return{x:-o/2+1.2,y:-e};if(n===5)return{x:-o/2+1.2,y:-2*e};if(n===6)return{x:o/2-1.175,y:0};throw new Error("Invalid pin number")},vIi=t=>{const e=[];let n=0,o=0;const i=Number.parseFloat(t.h),r=8.7;for(let m=1;m<=t.num_pins;m++){const{x:_,y:f}=QIi({p:1.3,pn:m,w:r});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===6?(I=3.4,C=2.15):(I=.6,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Wo(m,_,f,C,I,y))}const s=Number.parseFloat(t.w)/2-2.4,a=i/2,A={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:"pcb_silkscreen_path",stroke_width:.1},c={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:"pcb_silkscreen_path",stroke_width:.1},l=xi(0,0,.3),u=Number.parseFloat(t.w)/2,g=i/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*h,height:2*d,layer:"top"};return[...e,A,c,l,p]},wIi=Ci.extend({fn:Z(),num_pins:_t().default(3),w:Z().default("3.40mm"),h:Z().default("3.30mm"),pl:Z().default("1mm"),pw:Z().default("0.7mm"),p:Z().default("1.2mm"),string:Z().optional()}),PIi=t=>{const e=t.string?.match(/^sot23w_(\d+)/),n=e?Number.parseInt(e[1],3):3,o=wIi.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:DIi(o),parameters:o};throw new Error("Invalid number of pins")},MIi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n,y:.95}:e===2?{x:-n,y:-.95}:{x:n,y:0}},DIi=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let I=0;I<t.num_pins;I++){const{x:C,y}=MIi({num_pins:t.num_pins,pn:I+1,p:s});e.push(Wo(I+1,C,y,i,r,a))}const A=xi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-1,l=o/2,u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-c,y:l},{x:c+.3,y:l},{x:c+.3,y:l/2}],type:"pcb_silkscreen_path",stroke_width:.1},g={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-c,y:-l},{x:c+.3,y:-l},{x:c+.3,y:-l/2}],type:"pcb_silkscreen_path",stroke_width:.1},h=s+i/2,d=.95+r/2,p=o/2,m=h+.25,_=Math.max(d+.25,p+.09),f={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*m,height:2*_,layer:"top"};return[...e,u,g,A,f]},NIi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default("1.27mm"),id:Z().default("0.72mm"),od:Z().default("0.95mm"),w:Z().default("2.5mm"),h:Z().default("4.2mm"),string:Z().optional()}),RIi=t=>{const{p:e,id:n,od:o,w:i,h:r}=t,s=Number.parseFloat(r)/2,a=Number.parseFloat(e);return[Os(1,-a,s-a,n,o),Os(2,0,s-a,n,o),Os(3,a,s-a,n,o)]},TIi=t=>{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i)/2,s=Number.parseFloat(e),a=Number.parseFloat(n),A=Number.parseFloat(o),c=A*(1.5/1.05);return[r2({pn:1,x:-s,y:r-s,holeDiameter:a,rectPadWidth:A,rectPadHeight:c}),Q6(2,s,r-s,a,A,c)]},kIi=t=>{const e=t.string?.match(/^to92s_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=NIi.parse({...t,num_pins:n});let i=[];if(o.num_pins===3)i=RIi(o);else if(o.num_pins===2)i=TIi(o);else throw new Error("Invalid number of pins for TO-92");const r=Number.parseFloat(o.h)/2,s=Number.parseFloat(o.p),a={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-r,y:r-s},{x:-1.9,y:0},{x:1.9,y:0},{x:r,y:r-s},{x:1.5,y:Number.parseFloat(o.h)/2+.5},{x:-1.5,y:Number.parseFloat(o.h)/2+.5},{x:-r,y:r-s}],stroke_width:.1,pcb_silkscreen_path_id:""},A=xi(0,r+1,.5),c=Number.parseFloat(o.od),l=r-s,u=-s-c/2,g=s+c/2,h=l-c/2,d=l+c/2,p=-r,m=r,_=0,f=r+.5,I=Math.min(u,p)-.25,C=Math.max(g,m)+.25,y=Math.min(h,_)-.25,x=Math.max(d,f)+.25,E={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(I+C)/2,y:(y+x)/2},width:C-I,height:x-y,layer:"top"};return{circuitJson:[...i,a,A,E],parameters:o}},FIi=Ci.extend({fn:Z(),p:ce.optional(),id:ce.optional(),pw:ce.optional(),pl:ce.optional(),w:ce.optional(),h:ce.optional(),mpx:ce.optional().describe("center-to-center distance between the SMD mounting pads"),mpy:ce.optional().describe("mounting-pad row distance from the signal-pad row"),mpw:ce.optional().describe("SMD mounting pad width"),mpl:ce.optional().describe("SMD mounting pad length"),mounttop:je().optional().describe("place SMD mounting pads above the signal-pad row"),smd:je().optional().describe("Generic surface-mount JST-style connector with one signal row and two mounting pads."),sh:je().optional().describe('JST SH (Surface-mount) connector family. SH stands for "Super High-density".'),ph:je().optional().describe('JST PH (Through-hole) connector family. PH stands for "Pin Header".'),zh:je().optional().describe("JST ZH (Through-hole) connector family. 1.5mm pitch wire-to-board."),xh:je().optional().describe("JST XH (Through-hole) connector family. 2.5mm pitch wire-to-board."),string:Z().optional()}),LIi=()=>({minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),mP=({bounds:t,centerX:e,centerY:n,width:o,height:i})=>{const r=o/2,s=i/2;t.minX=Math.min(t.minX,e-r),t.maxX=Math.max(t.maxX,e+r),t.minY=Math.min(t.minY,n-s),t.maxY=Math.max(t.maxY,n+s)},HIi={ph:{p:ce.parse("2mm"),id:ce.parse("0.75mm"),pw:ce.parse("1.20mm"),pl:ce.parse("1.75mm"),h:ce.parse("5mm")},sh:{p:ce.parse("1mm"),pw:ce.parse("0.6mm"),pl:ce.parse("1.55mm"),w:ce.parse("5.8mm"),h:ce.parse("7.8mm")},smd:{p:ce.parse("2mm"),id:0,pw:ce.parse("1mm"),pl:ce.parse("3mm"),mpw:ce.parse("1.8mm"),mpl:ce.parse("3mm"),mpy:ce.parse("2.5mm"),w:ce.parse("8mm"),h:ce.parse("5mm")},zh:{p:ce.parse("1.5mm"),id:ce.parse("0.73mm"),pw:ce.parse("1.03mm"),pl:ce.parse("1.73mm"),w:ce.parse("3mm"),h:ce.parse("3.5mm")},xh:{p:ce.parse("2.5mm"),pw:ce.parse("1.7mm")}};function OIi(t){return t.smd?"smd":t.sh?"sh":t.ph?"ph":t.zh?"zh":t.xh?"xh":"ph"}function GIi({variant:t,numPins:e,p:n,id:o,pw:i,pl:r,mpx:s,mpy:a,mpw:A,mpl:c,mounttop:l}){const u=[],g=LIi();let h=0;if(t==="smd"){const d=-((e-1)/2)*n;for(let m=0;m<e;m++){const _=d+m*n;u.push(Wo(m+1,_,0,i,r)),mP({bounds:g,centerX:_,centerY:0,width:i,height:r})}const p=a===0?0:(l?1:-1)*a;for(const[m,_]of[-s/2,s/2].entries())u.push(Wo(e+m+1,_,p,A,c)),mP({bounds:g,centerX:_,centerY:p,width:A,height:c});h=Math.max(r/2,c/2)}else if(t==="ph"){const d=-((e-1)/2)*n;for(let p=0;p<e;p++){const m=d+p*n;p===0?u.push(r2({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.1249998})):u.push(Q6(p+1,m,0,o,i,r)),mP({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t==="zh"){const d=-((e-1)/2)*n;for(let p=0;p<e;p++){const m=d+p*n;p===0?u.push(r2({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12499977})):u.push(Q6(p+1,m,0,o,i,r)),mP({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t==="xh"){const d=-((e-1)/2)*n;for(let p=0;p<e;p++){const m=d+p*n;p===0?u.push(r2({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12500015})):u.push(Q6(p+1,m,0,o,i,r)),mP({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else{const d=-((e-1)/2)*n;for(let m=0;m<e;m++){const _=d+m*n;u.push(Wo(m+1,_,-1.325,i,r)),mP({bounds:g,centerX:_,centerY:-1.325,width:i,height:r}),h=Math.max(h,r/2)}const p=(e-1)/2*n+1.3;u.push(Wo(e+1,-p,1.22,1.2,1.8)),u.push(Wo(e+2,p,1.22,1.2,1.8)),mP({bounds:g,centerX:-p,centerY:1.22,width:1.2,height:1.8}),mP({bounds:g,centerX:p,centerY:1.22,width:1.2,height:1.8}),h=Math.max(h,.9)}return{pads:u,padBounds:g,maxPadHalfY:h}}function YIi({variant:t,w:e,h:n,numPins:o,p:i}){const r=s=>({type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:s,stroke_width:.1,pcb_silkscreen_path_id:""});if(t==="smd")return[r([{x:-e/2,y:-n/2},{x:e/2,y:-n/2},{x:e/2,y:n/2},{x:-e/2,y:n/2},{x:-e/2,y:-n/2}])];if(t==="ph"){const s=n/2+.5,a=s-n;return[r([{x:-e/2,y:s},{x:e/2,y:s},{x:e/2,y:a},{x:-e/2,y:a},{x:-e/2,y:s}])]}else if(t==="zh"&&o&&i){const s=(o-1)*i,a=-s/2-1.5,A=s/2+1.5,c=-n/2,l=n/2;return[r([{x:a,y:c},{x:A,y:c},{x:A,y:l},{x:a,y:l},{x:a,y:c}])]}else if(t==="xh"&&o&&i){const s=-((o-1)/2)*i,a=Array.from({length:o},(I,C)=>s+C*i),A=a[0],c=a[o-1],l=(A+c)/2,u=-2.75,g=-3.51,h=2.46,d=2.75,p=1.5,m=.2,_=(I,C,y,x)=>r([{x:I,y:C},{x:y,y:C},{x:y,y:x},{x:I,y:x},{x:I,y:C}]),f=[];return f.push(_(A-2.56,h,c+2.56,g)),f.push(r([{x:A-1.6,y:d},{x:A-2.85,y:d},{x:A-2.85,y:p}])),f.push(r([{x:A-2.55,y:m},{x:A-1.8,y:m},{x:A-1.8,y:u},{x:l,y:u}])),f.push(r([{x:c+2.55,y:m},{x:c+1.8,y:m},{x:c+1.8,y:u},{x:l,y:u}])),f.push(_(A-2.55,2.45,A-.75,1.7)),c-.75>A+.75&&f.push(_(A+.75,2.45,c-.75,1.7)),f.push(_(c+.75,2.45,c+2.55,1.7)),f}else return[]}var UIi=t=>{const e=FIi.parse(t),n=OIi(e),o=HIi[n];let i;const r=t.num_pins;typeof r=="number"&&(i=r);const s=typeof t.string=="string"?t.string:"",a=s.match(/(?:^|_)jst(\d+)(?:_|$)/),A=s.match(/(?:^|_)zh(\d+)(?:_|$)/);if(a&&a[1]){const fe=Number.parseInt(a[1],10);Number.isNaN(fe)||(i=fe)}if(A&&A[1]){const fe=Number.parseInt(A[1],10);Number.isNaN(fe)||(i=fe)}if(typeof i!="number")throw new Error(`JST requires an explicit pin count (e.g. jst6_sh or .jst(6))${e.string?`, from string "${e.string}"`:""}`);const c=e.p??o.p,l=e.id??(n==="xh"?i===2?1:.95:o.id),u=e.pw??o.pw,g=e.pl??(n==="xh"?i===2?2:1.95:o.pl),h=(i-1)*c+4,d=n==="xh"?(i-1)*c+5.12:n==="ph"?h:o.w,p=e.w??d,m=e.h??(n==="xh"?5.97:o.h),_=e.mpx??(i-1)*c+3.4,f=e.mpy??o.mpy??0,I=e.mpw??o.mpw??0,C=e.mpl??o.mpl??0,y=e.mounttop??!1,x=GIi({variant:n,numPins:i,p:c,id:l,pw:u,pl:g,mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}),{pads:E,padBounds:B,maxPadHalfY:S}=x,Q=n==="smd"?Math.max(p,2*Math.max(Math.abs(B.minX),Math.abs(B.maxX))+.4):p,w=n==="smd"?Math.max(m,2*Math.max(Math.abs(B.minY),Math.abs(B.maxY))+.4):m,M=YIi({variant:n,w:Q,h:w,numPins:i,p:c}),k=xi(0,w/2+1,.5),R=M.flatMap(fe=>fe.route),F=R.map(fe=>fe.x),O=R.map(fe=>fe.y),U=F.length>0&&O.length>0,Y=U?Math.min(B.minX,Math.min(...F)):B.minX,W=U?Math.max(B.maxX,Math.max(...F)):B.maxX,te=U?Math.min(B.minY,Math.min(...O)):B.minY,j=U?Math.max(B.maxY,Math.max(...O)):B.maxY,J=.5,oe=.05,ie=S+.085,ne=Y-J,le=W+J,ge=te-ie,_e=j+oe,ue=n==="ph"?{type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:-.55},width:(i-1)*c+4.9,height:5.5,layer:"top"}:n==="xh"?{type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:-.525},width:(i-1)*c+5.9,height:6.75,layer:"top"}:{type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(ne+le)/2,y:(ge+_e)/2},width:le-ne,height:_e-ge,layer:"top"};return{circuitJson:[...E,...M,k,ue],parameters:{...e,p:c,id:l,pw:u,pl:g,w:p,h:m,num_pins:i,sh:n==="sh",ph:n==="ph",smd:n==="smd",zh:n==="zh",xh:n==="xh",...n==="smd"?{mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}:{}}}},KIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.30mm"),h:Z().default("1.70mm"),pl:Z().default("0.80mm"),pw:Z().default("1mm"),p:Z().default("1.90mm")}),VIi=t=>{const e=KIi.parse(t),n=xi(0,ce.parse(e.h)/2+.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.2,height:2,layer:"top"};return{circuitJson:JIi(e).concat(...uh(e),o,n,s),parameters:e}},zIi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},JIi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=zIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},WIi=t=>{switch(t){case 8:return{w:"3.06mm",h:"3.14mm",p:"0.65mm",pl:"1.6mm",pw:"0.5mm"};case 10:return{w:"3.10mm",h:"3.33mm",p:"0.5mm",pl:"1.45mm",pw:"0.3mm"};default:return{w:"3.06mm",h:"3.14mm",p:"0.65mm",pl:"1.6mm",pw:"0.5mm"}}},jIi=Ci.extend({fn:Z(),num_pins:xo([$e(8),$e(10)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:WB.optional(),...RY,string:Z().optional()}),$Ii=t=>{const e=jIi.parse(t),n=WIi(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[],l=e.num_pins/2;for(let S=0;S<e.num_pins;S++){const{x:Q,y:w}=ssn(e.num_pins,S+1,o,r),M=S<l?S+1:e.num_pins-(S-l);c.push(Wo(M,Q,w,s,a,A))}e.thermalpad&&c.push(hP(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const u=o,g=i,h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-u/2,y:g/2},{x:u/2,y:g/2}],stroke_width:.05,pcb_silkscreen_path_id:""},d={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-u/2,y:-g/2},{x:u/2,y:-g/2}],stroke_width:.05,pcb_silkscreen_path_id:""},p=ssn(e.num_pins,1,u,r),m={x:p.x-.8,y:p.y},_={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:m.x-.4,y:m.y},{x:m.x-.7,y:m.y+.3},{x:m.x-.7,y:m.y-.3},{x:m.x-.4,y:m.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},f=xi(0,g/2+.5,.3),I=(e.num_pins/2-1)*r+a,C=o/2+.25,y=C+1.43,x=I/2+.255,E=i/2+.25,B={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-y,maxX:y,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-E,maxY:E}])};return{circuitJson:[...c,h,d,f,_,B],parameters:e}},ssn=(t,e,n,o)=>{const i=t/2,r=(e-1)%i,s=e<=i?-1:1,a=(i-1)/2-r;return{x:s*2.11,y:a*o}},qIi=t=>{switch(t){case 10:return{w:"3.10mm",h:"3.32mm",p:"0.5mm",pl:"1.63mm",pw:"0.33mm"};case 12:return{w:"3mm",h:"4mm",p:"0.65mm",pl:"0.88mm",pw:"0.4mm"};case 16:return{w:"3.10mm",h:"4mm",p:"0.5mm",pl:"0.88mm",pw:"0.3mm"};default:return{w:"3.10mm",h:"3.32mm",p:"0.65mm",pl:"1.63mm",pw:"0.4mm"}}},XIi=Ci.extend({fn:Z(),num_pins:xo([$e(8),$e(10),$e(12),$e(16)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:WB.optional(),...RY,string:Z().optional()}),asn=(t,e,n,o,i)=>{const r=t/2,s=(e-1)%r,a=e<=r?-1:1,A=(r-1)/2-s,c=ce.parse("0.2mm");return{x:a*(n/2+i/2-c),y:A*o}},ZIi=t=>{const e=XIi.parse(t),n=qIi(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[];for(let B=0;B<e.num_pins;B++){const{x:S,y:Q}=asn(e.num_pins,B+1,o,r,s);c.push(Wo(B+1,S,Q,s,a,A))}e.thermalpad&&c.push(hP(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const l=o,u=i,g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-l/2,y:u/2},{x:l/2,y:u/2}],stroke_width:.05,pcb_silkscreen_path_id:""},h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-l/2,y:-u/2},{x:l/2,y:-u/2}],stroke_width:.05,pcb_silkscreen_path_id:""},d=asn(e.num_pins,1,l,r,s),p={x:d.x-.8,y:d.y},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:p.x-.4,y:p.y},{x:p.x-.7,y:p.y+.3},{x:p.x-.7,y:p.y-.3},{x:p.x-.4,y:p.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},_=xi(0,u/2+.5,.3),f=(e.num_pins/2-1)*r+a,I=o/2+.25,C=I+1.43,y=f/2+.255,x=i/2+.25,E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return{circuitJson:[...c,g,h,_,m,E],parameters:e}},eCi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.8mm"),h:Z().default("1.65mm"),pl:Z().default("1.2mm"),pw:Z().default("1.2mm"),pad_spacing:Z().default("2.6mm")}),tCi=t=>{const e=eCi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:4.3,height:2.15,layer:"top"};return{circuitJson:oCi(e).concat(...uh(e),o,n,s),parameters:e}},nCi=t=>{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},oCi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=nCi({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},iCi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("3.20mm"),h:Z().default("1.65mm"),pl:Z().default("0.8mm"),pw:Z().default("0.9mm"),pad_spacing:Z().default("2.1mm")}),rCi=t=>{const e=iCi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:3.7,height:2.15,layer:"top"};return{circuitJson:aCi(e).concat(...uh(e),o,n,s),parameters:e}},sCi=t=>{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},aCi=t=>{const e=[];for(let n=1;n<=t.num_pins;n++){const{x:o,y:i}=sCi({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},ACi=Ci.extend({fn:Z(),num_pins:xo([$e(6),$e(8)]).default(8),w:Z().default("3mm"),h:Z().default("3mm"),p:Z().default("0.5mm"),pl:Z().default("0.52mm"),pw:Z().default("0.35mm"),epw:Z().default("1.40mm"),eph:Z().default("1.60mm"),string:Z().optional(),ep:je().default(!1)}),cCi=t=>{t.string&&t.string.includes("_ep")&&(t.ep=!0);const e=t.string?.match(/^son_(\d+)/),n=e?Number.parseInt(e[1],10):t.num_pins||8,o=ACi.parse({...t,num_pins:n}),i=ce.parse(o.w),r=ce.parse(o.h),s=ce.parse(o.p),a=ce.parse(o.pl),A=ce.parse(o.pw),c=ce.parse(o.epw),l=ce.parse(o.eph),u=Math.min(a,A)/8,g=[];for(let k=0;k<o.num_pins;k++){const{x:R,y:F}=WVe(o.num_pins,k+1,i,s);g.push(Wo(k+1,R,F,a,A,u))}o.ep&&g.push(Wo(o.num_pins+1,0,0,c,l));const h=i,d=r,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-h/2,y:d/2},{x:h/2,y:d/2}],stroke_width:.05,pcb_silkscreen_path_id:""},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-h/2,y:-d/2},{x:h/2,y:-d/2}],stroke_width:.05,pcb_silkscreen_path_id:""},_=WVe(o.num_pins,1,h,s),f={x:_.x-.4,y:_.y},I={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:f.x-.4,y:f.y},{x:f.x-.7,y:f.y+.3},{x:f.x-.7,y:f.y-.3},{x:f.x-.4,y:f.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},C=xi(0,d/2+.5,.3),y=Math.abs(WVe(o.num_pins,1,i,s).x),x=(o.num_pins/2-1)*s+A,E=y*2+a,B=i/2+.25,S=E/2+.25,Q=x/2+.25,w=r/2+.25,M={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-B,maxX:B,minY:-w,maxY:w}])};return{circuitJson:[...g,p,m,C,I,M],parameters:o}},WVe=(t,e,n,o)=>{const i=t/2,r=(e-1)%i,s=e<=i?-1:1,a=(i-1)/2-r;return{x:s*ce.parse("1.4mm"),y:a*o}},lCi=Ci.extend({fn:Z(),num_pins:_t().optional().default(8),p:lt.describe("pitch (distance between center of each pin)"),w:ce.describe("width between vertical rows of pins"),grid:WB.describe("width and height of the border of the footprint"),ep:WB.default("0x0mm").describe("width and height of the central exposed thermal pad"),epx:ce.default("0mm").describe("x offset of the center of the central exposed thermal pad"),pinw:ce.describe("width of the pin pads"),pinh:ce.describe("height of the pin pads")}),uCi=t=>{const e=lCi.parse(t),{num_pins:n,p:o,w:i,grid:r,ep:s,epx:a,pinw:A,pinh:c}=e;if(n%2!==0)throw new Error("invalid number of pins");const l=[],u=Math.min(A,c)/8;for(let B=0;B<n;B++){const{pinX:S,pinY:Q}=gCi({pinCount:n,pinIndex:B,width:i,pitch:o});l.push(Wo(B+1,S,Q,A,c,u))}s.x>0&&s.y>0&&l.push(Wo(e.num_pins+1,a,0,s.x,s.y));const g=dCi(r),h=xi(0,r.y/2+o,r.y/6),d=(n/2-1)*o+c,p=i+A,m=r.x/2+.25,_=p/2+.25,f=d/2+.25,I=d/2+.45+Math.max(0,.8-o),C=Math.min(r.y/2+.25,I),y=Math.max(0,.37-Math.max(0,_-m-.38)*1.4),x=Math.max(f,C-y),E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-_,maxX:_,minY:-x,maxY:x},{minX:-m,maxX:m,minY:-C,maxY:C}])};return{circuitJson:[...l,...g,h,E],parameters:e}},gCi=t=>{let e=0,n=0;const o=(t.pinCount/2-1)*t.pitch/2,i=t.pinCount/2;return t.pinIndex+1<=i?(e=t.pitch*t.pinIndex-o,n=0-t.width/2):(e=t.pitch*(t.pinCount-t.pinIndex-1)-o,n=t.width/2),{pinX:n,pinY:e}},dCi=t=>{const n=t.y/30;return[{layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:-t.x/2-.1,y:t.y/2+.1-n},{x:-t.x/2-.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1-n}],stroke_width:t.y/30},{layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",type:"pcb_silkscreen_path",route:[{x:-t.x/2-.1,y:-t.y/2-.1+n},{x:-t.x/2-.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1+n}],stroke_width:t.y/30}]},hCi=Ci.extend({fn:$e("wson"),num_pins:$e(8).default(8),p:ce.default("0.5mm").describe("pin pitch"),rowspan:ce.default("3.015mm").describe("distance between pad rows"),pl:ce.default("0.6mm").describe("pad length across the package edge"),pw:ce.default("0.28mm").describe("pad width along the pin row"),ep:je().default(!0).describe("include the exposed pad"),epw:ce.default("1.7mm").describe("exposed pad width"),eph:ce.default("0.3mm").describe("exposed pad height"),w:ce.default("2mm").describe("package body width"),h:ce.default("3mm").describe("package body height")}),pCi=t=>{const e=hCi.parse(t),{p:n,rowspan:o,pl:i,pw:r,ep:s,epw:a,eph:A,w:c,h:l}=e,u=[],g=-3*n/2;for(let f=0;f<4;f+=1){const I=g+f*n;u.push(Wo(f+1,I,-o/2,r,i)),u.push(Wo(8-f,I,o/2,r,i))}s&&u.push(Wo(9,0,0,a,A));const h=[sA([{x:-c/2,y:-l/2},{x:-c/2,y:l/2}]),sA([{x:c/2,y:-l/2},{x:c/2,y:l/2}])],d=xi(0,Math.max(l/2,(o+i)/2)+.6,.5),p=Math.max(3*n+r,s?a:0),m=Math.max(o+i,s?A:0),_={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:Math.max(c,p)+.5,height:Math.max(l,m)+.5,layer:"top"};return{circuitJson:[...u,...h,d,_],parameters:e}},mCi=t=>{const{num_pins:e,bridged:n,p:o=2.54,pw:i=1.5,ph:r=1.5}=t,s=ce.parse(o),a=ce.parse(i),A=ce.parse(r),c=Math.min(A/4,.5),l=[];for(let Q=0;Q<e;Q++)l.push(Wo(Q+1,Q*s,0,a,A));let u=[];if(n){const Q=n.split("").map(Number);if(Q.length>1)for(let w=0;w<Q.length-1;w++){const M=Q[w],k=Q[w+1];if(typeof M=="number"&&typeof k=="number"&&!isNaN(M)&&!isNaN(k)){const R=(M-1)*s,F=(k-1)*s,O=Math.sign(F-R),U=R+O*(a/2),Y=F-O*(a/2);u.push({type:"pcb_trace",pcb_trace_id:"",route:[{start_pcb_port_id:`{PIN${M}}`,x:U,y:0,width:c,layer:"top",route_type:"wire"},{end_pcb_port_id:`{PIN${k}}`,x:Y,y:0,width:c,layer:"top",route_type:"wire"}]})}}}const g=(e-1)*s+a+.7,h=A+1,d=(e-1)*s/2,p=0,m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"outline",route:[{x:d-g/2,y:p-h/2},{x:d+g/2,y:p-h/2},{x:d+g/2,y:p+h/2},{x:d-g/2,y:p+h/2},{x:d-g/2,y:p-h/2}],stroke_width:.15},f=p+h/2+.6,I=xi(d,f,.4),C=(e-1)*s,y=C/2+a/2,x=A/2,E=y+.5,B=x+.5,S={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:C/2,y:0},width:2*E,height:2*B,layer:"top"};return{circuitJson:[...l,...u,m,I,S],parameters:t}},Asn={fn:$e("sot457"),num_pins:$e(6).default(6),pillh:Z().default("0.45mm"),pillw:Z().default("1.45mm"),pl:Z(),pw:Z(),p:Z(),wave:je().optional(),reflow:je().optional()},_Ci=Ci.extend({...Asn,h:Z().default("2.5mm"),w:Z().default("2.7mm"),pl:Z().default("0.8mm"),pw:Z().default("0.55mm"),p:Z().default("0.95mm")}),fCi=Ci.extend({...Asn,h:Z().default("3mm"),w:Z().default("4mm"),pillr:Z().default("0.225mm"),pl:Z().default("1.45mm"),pw:Z().default("1.5mm"),p:Z().default("1.475mm")}).transform(t=>({...t,wave:t.wave??(t.reflow===void 0?!0:!t.reflow),reflow:t.reflow??(t.wave===void 0?!1:!t.wave)})),lS=t=>Number.parseFloat(t.replace("mm","")),csn=({pitch:t,width:e,pinNumber:n})=>{const r={1:{x:-e/2-.1,y:t},2:{x:-e/2-.1,y:0},3:{x:-e/2-.1,y:-t},4:{x:e/2+.1,y:-t},5:{x:e/2+.1,y:0},6:{x:e/2+.1,y:t}}[n];if(!r)throw new Error(`Invalid pin number: ${n}`);return r},lsn=t=>{const e=[],n=lS(t.p),o=lS(t.pl),i=lS(t.pw),r=lS(t.w),s=lS(t.h),a=Math.min(o,i)/8;if(t.wave){const m={1:({padWidth:_,padHeight:f})=>Wo(1,-n,n,f,_,a),2:({padWidth:_,padHeight:f})=>Wo(2,-n,-n,f,_,a),3:({padWidth:_,padHeight:f})=>cT(3,-n,0,lS(t.pillw),lS(t.pillh)),4:({padWidth:_,padHeight:f})=>cT(4,n,0,lS(t.pillw),lS(t.pillh)),5:({padWidth:_,padHeight:f})=>Wo(5,n,n,f,_,a),6:({padWidth:_,padHeight:f})=>Wo(6,n,-n,f,_,a)};for(let _=1;_<=t.num_pins;_++){const f=m[_];f&&e.push(f({padWidth:o,padHeight:i}))}}else for(let m=1;m<=t.num_pins;m++){const{x:_,y:f}=csn({pitch:n,width:r,pinNumber:m});e.push(Wo(m,_,f,o,i,a))}const A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-r/3,y:s/2+n/1.3},{x:r/3,y:s/2+n/1.3}],stroke_width:.05},c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-r/3,y:-s/2-n/1.3},{x:r/3,y:-s/2-n/1.3}],stroke_width:.05},l=xi(0,s+.5,.3),u=csn({pitch:n,width:r,pinNumber:1}),g=t.wave?1:.5,h=t.wave?.7:.3;u.x-=t.wave?i:i*1.7;const d={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_indicator",route:[{x:u.x+g/2,y:u.y},{x:u.x-g/2,y:u.y+h/2},{x:u.x-g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y}],stroke_width:.05};let p;if(t.wave){const m=2*n,_=2*n,f=m/2+i/2,I=_/2+o/2,C=f+.25,y=I+.25;p={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*C,height:2*y,layer:"top"}}else{const _=r/2+.1+o/2,f=n+i/2,I=r/2,C=s/2,y=_+.25,x=I+.08,E=f+.25,B=Math.max(C+.45,E);p={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:s2([{minX:-y,maxX:y,minY:-E,maxY:E},{minX:-x,maxX:x,minY:-B,maxY:B}]),layer:"top"}}return[l,A,c,d,...e,p]},ICi=t=>{if(t.wave){const n=fCi.parse({...t,fn:"sot457"});return{circuitJson:lsn(n),parameters:n}}const e=_Ci.parse(t);return{circuitJson:lsn(e),parameters:e}},CCi=[{x:-.8,y:.75},{x:.8,y:.75},{x:.8,y:-.75},{x:-.8,y:-.75}],yCi=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default("1.1mm"),h:Z().default("1.45mm"),p:Z().default("0.35mm"),pl:Z().default("0.2mm"),pw:Z().default("0.2mm"),string:Z().optional()}),xCi=t=>{const e=yCi.parse({...t,fn:"sot963"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p<6;p++){const{x:m,y:_}=usn(p+1,n,i,r);A.push(Wo(p+1,m,_,r,s,a))}const c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:""},u=usn(1,n,i,r),g={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"},h=xi(0,o/2+.4,.25),d={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:CCi,layer:"top"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},usn=(t,e,n,o)=>{const i=e/2-o/2;return t<=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},ECi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default("5mm"),id:Z().default("1.25mm"),od:Z().default("2.35mm"),ca:Z().default("14mm").describe("Caliper axis (width or diameter of the potentiometer body or adjustment knob)"),w:Z().default("5.35mm"),h:Z().default("4mm"),string:Z().optional()}),BCi=t=>{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i),s=Number.parseFloat(e);return[Os(1,0,s,n,o),Os(2,r,0,n,o),Os(3,0,-s,n,o)]},bCi=t=>{const e=t.string?.match(/^potentiometer_(\d+)/),n=e?Number.parseInt(e[1],10):3,o=ECi.parse({...t,num_pins:n});let i=[];o.num_pins===3&&(i=BCi(o));const r=Number.parseFloat(o.ca)/2+.15,s=Number.parseFloat(o.w),a=Number.parseFloat(o.od)/2+.35,A={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:0,y:r-1.75},{x:0,y:r},{x:s,y:r},{x:s,y:a}],stroke_width:.1,pcb_silkscreen_path_id:""},c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:s,y:-a},{x:s,y:-r},{x:0,y:-r},{x:0,y:-r+1.75}],stroke_width:.1,pcb_silkscreen_path_id:""},l=Number.parseFloat(o.w)/2,u=xi(l,r+1,.5),g=Number.parseFloat(o.od)/2,h=Number.parseFloat(o.h),d=Number.parseFloat(o.ca)/2,p=-(g+.25),m=h+g+.25,_=d+.25,f={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(p+m)/2,y:0},width:m-p,height:2*_,layer:"top"};return{circuitJson:[...i,A,c,u,f],parameters:o}},SCi=Ci.extend({fn:Z(),p:ce.optional().default("7.5mm"),id:ce.optional().default("1mm"),od:ce.optional().default("2mm"),d:ce.optional().default("10.5mm")}),QCi=(t,e,n,o,i)=>{const r=[],s=[];for(let a=0;a<=50;a++){const A=a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c<t-o&&l>=e-i/2&&l<=e+i/2||r.push({x:c,y:l})}for(let a=0;a<=50;a++){const A=Math.PI+a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c<t-o&&l>=e-i/2&&l<=e+i/2||s.push({x:c,y:l})}return{topArc:r,bottomArc:s}},vCi=t=>{const e=SCi.parse(t),{p:n,id:o,od:i,d:r}=e,s=[r2({pn:1,x:-n/2,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:i}),Os(2,n/2,0,o,i)],{topArc:a,bottomArc:A}=QCi(0,0,r/2+.1,i/2,i),c={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:a,stroke_width:.1,pcb_silkscreen_path_id:""},l={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:A,stroke_width:.1,pcb_silkscreen_path_id:""},u={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:0,y:r/2+.1},{x:0,y:-(r/2+.1)}],stroke_width:.1,pcb_silkscreen_path_id:""},g=-(r/2+.5),h=i/2+1.5,d=.5,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:g-d,y:h},{x:g+d,y:h}],stroke_width:.1,pcb_silkscreen_path_id:""},m={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:g,y:h-d},{x:g,y:h+d}],stroke_width:.1,pcb_silkscreen_path_id:""},_=xi(0,r/2+1,.5),f=r/2,I=n/2+i/2,y=Math.max(f,I)+.25,x={type:"pcb_courtyard_circle",pcb_courtyard_circle_id:"",pcb_component_id:"",center:{x:0,y:0},radius:y,layer:"top"};return{circuitJson:[...s,c,l,u,p,m,_,x],parameters:e}},wCi=Ci.extend({fn:$e("fpc"),num_pins:S5.number().int().min(2),p:ce.default("0.5mm").describe("contact pad pitch"),pw:ce.default("0.3mm").describe("contact pad width"),pl:ce.default("1.25mm").describe("contact pad length"),staggered:je().default(!1).describe("alternate contacts between two rows"),reverse:je().default(!1).describe("place pin 1 on the upper row when staggered"),py:ce.default("2.4mm").describe("staggered row center pitch"),toppl:ce.optional().describe("upper-row contact pad length"),bottompl:ce.optional().describe("lower-row contact pad length"),mpx:ce.optional().describe("mounting pad center pitch"),mpy:ce.optional().describe("mounting pad row distance from the contact-row center"),mounttop:je().default(!1).describe("place the mounting pads above the contact-row center"),mpw:ce.default("2mm").describe("mounting pad width"),mpl:ce.default("2.5mm").describe("mounting pad length")}),jVe=(...t)=>Wo(...t),PCi=t=>({maxX:Math.max(...t.map(e=>e.x+e.width/2)),maxY:Math.max(...t.map(e=>e.y+e.height/2)),minX:Math.min(...t.map(e=>e.x-e.width/2)),minY:Math.min(...t.map(e=>e.y-e.height/2))}),MCi=t=>{const e=wCi.parse(t),{num_pins:n,p:o,pw:i,pl:r,staggered:s,reverse:a,py:A,toppl:c,bottompl:l,mounttop:u,mpw:g,mpl:h}=e,d=(n-1)*o,p=e.mpx??d+(s?3.5:3.38),m=e.mpy??(s?0:2.575),_=m===0?0:(u?1:-1)*m,f=-d/2,I=Array.from({length:n},(O,U)=>{const Y=s&&U%2===1!==a,W=s?Y?A/2:-A/2:0,te=Y?c??r:l??r;return jVe(U+1,f+U*o,W,i,te)}),C=[jVe(n+1,p/2,_,g,h),jVe(n+2,-p/2,_,g,h)],y=[...I,...C],x=PCi(y),E=Math.min(d/2+i/2,p/2-g/2),B=x.maxY+.2,S=x.minY-.2,Q=I[0],w=Q.x-Q.width/2-.2,M=Q.y,k=[sA([{x:-E,y:B},{x:E,y:B}]),sA([{x:-E,y:S},{x:E,y:S}]),sA([{x:w-.25,y:M-.25},{x:w,y:M},{x:w-.25,y:M+.25}])],R=xi(0,B+.7,.5),F={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:(x.minX+x.maxX)/2,y:(x.minY+x.maxY)/2},width:x.maxX-x.minX+.5,height:x.maxY-x.minY+.5,layer:"top"};return{circuitJson:[...y,...k,R,F],parameters:{...e,mpx:p,mpy:m,toppl:c??r,bottompl:l??r}}},DCi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default("6.5mm"),h:Z().default("3mm"),pl:Z().default("1.75mm"),pw:Z().default("2.40mm"),p:Z().default("4.75mm")}),NCi=t=>{const e=DCi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:""},s={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:7,height:3.5,layer:"top"};return{circuitJson:TCi(e).concat(...uh(e),o,n,s),parameters:e}},RCi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},TCi=t=>{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s<=t.num_pins;s++){const{x:a,y:A}=RCi({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},kCi=[{x:-1.45,y:.98},{x:-.73,y:.98},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.33},{x:1.45,y:.33},{x:1.45,y:-.33},{x:.73,y:-.33},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.98},{x:-1.45,y:-.98},{x:-1.45,y:-.32},{x:-.73,y:-.32},{x:-.73,y:.32},{x:-1.45,y:.32}],FCi=Ci.extend({fn:Z(),num_pins:_t().default(3),w:Z().default("2.45mm"),h:Z().default("2.40mm"),pl:Z().default("0.92mm"),pw:Z().default("0.45mm"),p:Z().default("0.891mm"),string:Z().optional()}),LCi=t=>{const e=t.string?.match(/^sot323_(\d+)/),n=e?Number.parseInt(e[1],3):3,o=FCi.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:OCi(o),parameters:o};throw new Error("Invalid number of pins")},HCi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n,y:.65}:e===2?{x:-n,y:-.65}:{x:n,y:0}},OCi=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let d=0;d<t.num_pins;d++){const{x:p,y:m}=HCi({num_pins:t.num_pins,pn:d+1,p:s});e.push(Wo(d+1,p,m,i,r,a))}const A=xi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-i,l=o/2,u={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-c,y:l+.3},{x:c,y:l+.3},{x:c,y:l/2}],type:"pcb_silkscreen_path",stroke_width:.1},g={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-c,y:-l-.3},{x:c,y:-l-.3},{x:c,y:-l/2}],type:"pcb_silkscreen_path",stroke_width:.1},h={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:kCi,layer:"top"};return[...e,u,g,A,h]},GCi=Ci.extend({fn:Z(),circle:je().optional(),rect:je().optional(),square:je().optional(),pill:je().optional(),d:ce.optional(),pd:ce.optional(),diameter:ce.optional(),r:ce.optional(),pr:ce.optional(),radius:ce.optional(),w:ce.optional(),pw:ce.optional(),width:ce.optional(),h:ce.optional(),ph:ce.optional(),height:ce.optional(),s:ce.optional(),size:ce.optional(),string:Z().optional()}).transform(t=>{let e="rect";t.circle&&(e="circle"),t.square&&(e="square"),t.rect&&(e="rect"),t.pill&&(e="pill");let n,o,i;return e==="circle"?t.r!==void 0?n=Ua(t.r):t.pr!==void 0?n=Ua(t.pr):t.radius!==void 0?n=Ua(t.radius):t.d!==void 0?n=Ua(t.d)/2:t.pd!==void 0?n=Ua(t.pd)/2:t.diameter!==void 0?n=Ua(t.diameter)/2:n=Ua("1mm")/2:(t.w!==void 0?o=Ua(t.w):t.pw!==void 0?o=Ua(t.pw):t.width!==void 0?o=Ua(t.width):t.s!==void 0?o=Ua(t.s):t.size!==void 0?o=Ua(t.size):o=Ua("1mm"),t.h!==void 0?i=Ua(t.h):t.ph!==void 0?i=Ua(t.ph):t.height!==void 0?i=Ua(t.height):e==="square"||e==="rect"?i=o:i=Ua("1mm")),{fn:t.fn,shape:e,radius:n,width:o,height:i}}),YCi=t=>{const e=GCi.parse(t),{shape:n,radius:o,width:i,height:r}=e;let s,a;return n==="circle"?(s=Orn(1,{x:0,y:0,radius:o}),a=o+.5):n==="pill"?(s=cT(1,0,0,i,r),a=Math.max(i,r)/2+.5):(s=Wo(1,0,0,i,r),a=r/2+.5),{circuitJson:[s,xi(0,a,.2)],parameters:e}},UCi=Ci.extend({fn:$e("smdpads"),num_pins:_t().int().positive().default(3),p:ce.default("1mm").describe("pad center pitch"),pw:ce.default("1mm").describe("outer pad width"),ph:ce.default("1mm").describe("pad height"),cyw:ce.optional().describe("courtyard width"),cyh:ce.optional().describe("courtyard height"),centerpadwidth:ce.optional().describe("center pad width")}).superRefine((t,e)=>{t.centerpadwidth!==void 0&&t.num_pins%2===0&&e.addIssue({code:lo.custom,message:"'centerpadwidth' requires an odd number of SMD pads",path:["centerpadwidth"]})}),KCi=t=>{const e=UCi.parse(t),{num_pins:n,p:o,pw:i,ph:r,cyw:s,cyh:a,centerpadwidth:A}=e,c=Math.ceil(n/2),l=-((n-1)*o)/2,u=Array.from({length:n},(_,f)=>{const I=f+1,C=A!==void 0&&I===c?A:i;return Wo(I,l+f*o,0,C,r)}),g=(n-1)*o/2+i/2,h=A?A/2:0,d=Math.max(g,h),p=s!==void 0&&a!==void 0?{width:s,height:a}:{width:d*2+.5,height:r+.5},m={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:p.width,height:p.height,layer:"top"};return{circuitJson:[...u,xi(0,r/2+.8,.4),m],parameters:e}},VCi=Ci.extend({fn:$e("smdpushbutton"),num_pins:$e(4).default(4),px:ce.default("4.2mm").describe("horizontal pad center pitch"),py:ce.default("2.15mm").describe("vertical pad center pitch"),pw:ce.default("1.05mm").describe("pad width"),ph:ce.default("0.7mm").describe("pad height")}),zCi=t=>{const e=VCi.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Wo(1,-n/2,o/2,i,r),Wo(2,n/2,o/2,i,r),Wo(3,-n/2,-o/2,i,r),Wo(4,n/2,-o/2,i,r)],a=Math.max(n/2-i/2-.15,.2),A=o/2+r/2+.1,c=Math.max(o/2-r/2-.15,.2),l=[sA([{x:-a,y:A},{x:a,y:A}]),sA([{x:-a,y:-A},{x:a,y:-A}]),sA([{x:-n/2,y:-c},{x:-n/2,y:c}]),sA([{x:n/2,y:-c},{x:n/2,y:c}])],u=xi(0,A+.6,.5),g={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:"top"};return{circuitJson:[...s,...l,u,g],parameters:e}},JCi=t=>({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),WCi=t=>{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r<t.length;r++){const s=t[r];s.x<e&&(e=s.x),s.y<n&&(n=s.y),s.x>o&&(o=s.x),s.y>i&&(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}},jCi=Ci.extend({fn:$e("smdslideswitch"),num_pins:$e(7).default(7),signalcols:S5.number().int().min(3).default(3),missing:FX.default([]),p:ce.default("1mm").describe("signal-pad column pitch"),pw:ce.default("0.7mm").describe("signal-pad width"),pl:ce.default("1.5mm").describe("signal-pad length"),mounty:ce.default("-1.8mm").describe("Y position of the mounting-pad row center"),mpx:ce.default("5.5mm").describe("horizontal center-to-center mounting-pad distance"),mpy:ce.default("2.2mm").describe("vertical center-to-center mounting-pad distance"),mpw:ce.default("1mm").describe("mounting-pad width"),mpl:ce.default("0.8mm").describe("mounting-pad length"),holex:ce.default("1.5mm").describe("alignment-hole X distance from the footprint center"),holey:ce.optional().describe("alignment-hole Y position; defaults to mounty"),holed:ce.default("0.9mm").describe("alignment-hole diameter"),noholes:je().optional().default(!1)}),$Ci=t=>{const e=jCi.parse(t),{num_pins:n,signalcols:o,missing:i,p:r,pw:s,pl:a,mounty:A,mpx:c,mpy:l,mpw:u,mpl:g,holex:h,holed:d,noholes:p}=e,m=e.holey??A,_=i.find(J=>typeof J!="number"||!Number.isInteger(J)||J<1||J>o);if(_!==void 0)throw new Error(`Invalid missing signal column "${_}" for signalcols${o}`);const f=new Set(i.filter(J=>typeof J=="number")),I=o-f.size;if(I+4!==n)throw new Error(`smdslideswitch${n} needs ${n-4} signal pads, but signalcols${o}_missing(${[...f].join(",")}) creates ${I}`);const C=J=>Number(J.toFixed(12)),y=[],x=-((o-1)*r)/2;let E=1;for(let J=1;J<=o;J++)f.has(J)||(y.push(Wo(E,C(x+(J-1)*r),0,s,a)),E++);const B=A+l/2,S=A-l/2,Q=[{x:C(-c/2),y:C(B)},{x:C(c/2),y:C(B)},{x:C(-c/2),y:C(S)},{x:C(c/2),y:C(S)}];for(const J of Q)y.push(Wo(E,J.x,J.y,u,g)),E++;const w=p?[]:[-h,h].map(J=>({type:"pcb_hole",pcb_hole_id:"",pcb_component_id:"",hole_shape:"circle",hole_diameter:d,x:J,y:m})),M=Math.max(c/2-u/2-.2,r),k=-a/2-.2,R=S+g/2+.2,F=[sA([{x:-M,y:k},{x:M,y:k}]),sA([{x:-M,y:R},{x:M,y:R}]),sA([{x:-M,y:R},{x:-M,y:k}]),sA([{x:M,y:R},{x:M,y:k}])],O=x+(o-1)*r,U=WCi([{x:x-s/2,y:-a/2},{x:O+s/2,y:a/2},{x:-c/2-u/2,y:S-g/2},{x:c/2+u/2,y:B+g/2},...p?[]:[{x:-h-d/2,y:m-d/2},{x:h+d/2,y:m+d/2}]]);if(!U)throw new Error("Could not determine SMD slide-switch bounds");const Y=.25,W=JCi(U),te={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:W,width:U.maxX-U.minX+Y*2,height:U.maxY-U.minY+Y*2,layer:"top"},j=xi(W.x,U.maxY+.6,.5);return{circuitJson:[...y,...w,...F,j,te],parameters:e}},qCi=Ci.extend({fn:$e("smdpinheader"),num_pins:_t().int().positive().default(6),p:ce.default("2.54mm").describe("contact pitch"),py:ce.default("3.31mm").describe("center-to-center distance between alternating pad rows"),pw:ce.default("1mm").describe("pad width"),ph:ce.default("2.51mm").describe("pad height"),bh:ce.default("2.5mm").describe("plastic body height"),male:$e(!0).default(!0),female:$e(!1).default(!1),smd:$e(!0).default(!0)}),XCi=t=>{const e=qCi.parse(t),{num_pins:n,p:o,py:i,pw:r,ph:s,bh:a}=e,A=-((n-1)*o)/2,c=Array.from({length:n},(y,x)=>Wo(x+1,A+x*o,x%2===0?i/2:-i/2,r,s)),l=n*o/2,u=a/2,g=Math.min(.5,a/4),h=(y,x,E=-l)=>{const B=r/2+.2,S=[];let Q=E;for(let w=x;w<n;w+=2){const M=A+w*o,k=M-B;k>Q&&S.push(sA([{x:Q,y},{x:k,y}])),Q=M+B}return Q<l&&S.push(sA([{x:Q,y},{x:l,y}])),S},d=[...h(u,0,-l+g),...h(-u,1),sA([{x:l,y:-u},{x:l,y:u}]),sA([{x:-l,y:-u},{x:-l,y:u-g},{x:-l+g,y:u}])],p=(n-1)*o/2+r/2,m=i/2+s/2,_=Math.max(l,p)+.25,f=Math.max(u,m)+.25,I={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:2*_,height:2*f,layer:"top"},C=xi(0,f+.6,.5);return{circuitJson:[...c,...d,C,I],parameters:e}},ZCi=Ci.extend({fn:Z(),d:ce.optional(),hd:ce.optional(),r:ce.optional(),hr:ce.optional(),pd:ce.optional(),pr:ce.optional(),squarepad:je().optional().default(!1)}).transform(t=>{let e;t.d!==void 0?e=Ua(t.d):t.hd!==void 0?e=Ua(t.hd):t.r!==void 0?e=Ua(t.r)*2:t.hr!==void 0?e=Ua(t.hr)*2:e=Ua("1mm");let n;return t.pd!==void 0?n=Ua(t.pd):t.pr!==void 0?n=Ua(t.pr)*2:n=e*(1.5/1),{fn:t.fn,d:e,pd:n,squarepad:t.squarepad??!1}}),eyi=t=>{const e=ZCi.parse(t),{d:n,pd:o,squarepad:i}=e;return{circuitJson:[i?r2({pn:1,x:0,y:0,holeDiameter:n,rectPadWidth:o,rectPadHeight:o}):Os(1,0,0,n,o),xi(0,o/2+.5,.2)],parameters:e}},tyi=Ci.extend({fn:Z(),num_pins:$e(6).default(6),h:Z().default("1.3mm"),pl:Z().default("1.325mm"),pw:Z().default("0.6mm"),p:Z().default("0.95mm")}),nyi=t=>{const e=tyi.parse(t);return{circuitJson:oyi(e),parameters:e}},gsn=t=>{const{p:e,h:n,pn:o}=t;if(o===1)return{x:-n/2-.4875,y:e};if(o===2)return{x:-n/2-.4875,y:0};if(o===3)return{x:-n/2-.4875,y:-e};if(o===4)return{x:n/2+.4875,y:-e};if(o===5)return{x:n/2+.4875,y:0};if(o===6)return{x:n/2+.4875,y:e};throw new Error("Invalid pin number")},oyi=t=>{const e=[],n=Number.parseFloat(t.h),o=Number.parseFloat(t.p),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Math.min(i,r)/8;for(let B=1;B<=t.num_pins;B++){const{x:S,y:Q}=gsn({h:n,p:o,pn:B});e.push(Wo(B,S,Q,i,r,s))}const a=t.num_pins/2*o,A=n,c={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_1",route:[{x:-a/3,y:A/2+Number.parseFloat(t.p)/1.3},{x:a/3,y:A/2+o/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},l={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_2",route:[{x:-a/3,y:-A/2-o/1.3},{x:a/3,y:-A/2-o/1.3}],type:"pcb_silkscreen_path",stroke_width:.05},u=xi(0,A+.3,.3),g=gsn({h:n,p:o,pn:1});g.x=g.x-r*1.5;const h=.7,d=.3,p={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"pin1_indicator",route:[{x:g.x+h/2-.2,y:g.y},{x:g.x-h/2,y:g.y+d/2},{x:g.x-h/2,y:g.y-d/2},{x:g.x+h/2-.2,y:g.y}],stroke_width:.05},m=n/2+.4875,_=o*2+r,f=m+i/2,I=n/2+.4,C=f+.25,y=_/2+.25,x=y+.2,E={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",layer:"top",outline:s2([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return[...e,u,c,l,p,E]},iyi=Ci.extend({fn:$e("sot143"),num_pins:$e(4).default(4),p:ce.default("2.382774mm"),px:ce.default("1.89992mm"),pw:ce.default("0.8382mm"),ph:ce.default("0.8382mm"),pin1padwidth:ce.default("1.1938mm"),pin1centeroffsetx:ce.default("0.199898mm"),w:ce.default("3mm"),h:ce.default("2.9mm")}),ryi=t=>{const e=iyi.parse(t),{p:n,px:o,pw:i,ph:r,pin1padwidth:s,pin1centeroffsetx:a,w:A,h:c}=e,l=o/2,u=n/2,g=[Wo(1,-l+a,-u,s,r),Wo(2,l,-u,i,r),Wo(3,l,u,i,r),Wo(4,-l,u,i,r)],h=A/2,d=c/2,p=[sA([{x:-h,y:-d/2},{x:-h,y:d/2}]),sA([{x:h,y:d/2},{x:h,y:-d/2}])],m=o+Math.max(s,i),_=n+r,f={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:0},width:Math.max(A,m)+.5,height:Math.max(c,_)+.5,layer:"top"};return{circuitJson:[...g,...p,xi(0,Math.max(d,_/2)+.8,.4),f],parameters:e}},syi=[{x:-1.703,y:.98},{x:-.983,y:.98},{x:-.983,y:1.1},{x:.477,y:1.1},{x:.477,y:.98},{x:1.197,y:.98},{x:1.197,y:-.98},{x:.477,y:-.98},{x:.477,y:-1.1},{x:-.983,y:-1.1},{x:-.983,y:-.98},{x:-1.703,y:-.98}],ayi=Ci.extend({fn:Z(),num_pins:_t().default(4),w:Z().default("3.2mm"),h:Z().default("2.6mm"),pl:Z().default("1.05mm"),pw:Z().default("0.45mm"),p:Z().default("0.55mm"),string:Z().optional()}),Ayi=t=>{const e=t.string?.match(/^sot343_(\d+)/),n=e?Number.parseInt(e[1],4):4,o=ayi.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:lyi(o),parameters:o};throw new Error("Invalid number of pins")},cyi=t=>{const{pn:e,p:n}=t;return e===1?{x:-n*1.92,y:-.65}:e===2?{x:-n*1.92,y:.65}:e===3?{x:n,y:.65}:e===4?{x:n,y:-.65}:{x:0,y:0}},lyi=t=>{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;let A=1/0,c=-1/0,l=1/0,u=-1/0;for(let y=0;y<t.num_pins;y++){const{x,y:E}=cyi({num_pins:t.num_pins,pn:y+1,p:s});e.push(Wo(y+1,x,E,i,r,a)),x<A&&(A=x),x>c&&(c=x),E<l&&(l=E),E>u&&(u=E)}const g=(A+c)/2,h=u-l,d=o*.3,p=h/2+d;let m=n*.8;o<=2.6&&(m/=2);const _=xi(g,p+.5,.3),f={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_top",route:[{x:g-m/2,y:p},{x:g+m/2,y:p}],type:"pcb_silkscreen_path",stroke_width:.1},I={layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"silkscreen_path_bottom",route:[{x:g-m/2,y:-p},{x:g+m/2,y:-p}],type:"pcb_silkscreen_path",stroke_width:.1},C={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:syi,layer:"top"};return[...e,f,I,_,C]},uyi=Ci.extend({fn:Z()}),gyi=t=>{const e=uyi.parse(t),n=[],o=.5-.15,i=1.5,s=.5/2,a=75,A=-37/2;for(let E=0;E<a;E++){const B=E+1;if(B>=24&&B<=31)continue;const S=A-E*s,Q=B%2===0,w=i+(Q?.25:0),k=.5-w/2,R=Wo(B,k,S,w,o);R.layer=Q?"bottom":"top",n.push(R)}const c=46*.0254,l=137*.0254,u=261*.0254,g={type:"pcb_cutout",pcb_cutout_id:"",shape:"rect",center:{x:-l/2+i/2,y:A-u},width:l,height:c},h={x:-.5,y:A},d={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"pin_marker_1",route:[{x:h.x-.4,y:h.y},{x:h.x-.7,y:h.y+.3},{x:h.x-.7,y:h.y-.3},{x:h.x-.4,y:h.y}],stroke_width:.05,pcb_silkscreen_path_id:"pin_marker_1"};let p=1/0,m=-1/0,_=1/0,f=-1/0;const I=(E,B,S=0,Q=0)=>{p=Math.min(p,E-S/2),m=Math.max(m,E+S/2),_=Math.min(_,B-Q/2),f=Math.max(f,B+Q/2)};for(const E of n){const B=E;I(B.x,B.y,B.width,B.height)}I(g.center.x,g.center.y,g.width,g.height);for(const E of d.route)I(E.x,E.y);const C=(p+m)/2,y=(_+f)/2,x=E=>{typeof E.x=="number"&&(E.x-=C),typeof E.y=="number"&&(E.y-=y),E.center&&(E.center.x-=C,E.center.y-=y),Array.isArray(E.route)&&(E.route=E.route.map(B=>({x:B.x-C,y:B.y-y})))};for(const E of n)x(E);return x(g),x(d),{circuitJson:[...n,g,d],parameters:e}},dyi=Ci.extend({fn:Z(),numPins:_t().optional().default(0),rows:xo([Z(),_t()]).transform(t=>Number(t)).optional().default(1).describe("number of rows"),p:ce.default("2.54mm").describe("pitch"),id:ce.default("1.0mm").describe("inner diameter"),od:ce.default("1.5mm").describe("outer diameter"),male:je().optional().describe("the module uses male headers"),nopin:je().optional().default(!1).describe("omit pins rendering"),female:je().optional().describe("the module uses female headers"),smd:je().optional().describe("surface mount device"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nopinlabels:je().optional().default(!1).describe("omit silkscreen pin labels"),doublesidedpinlabel:je().optional().default(!1).describe("add silkscreen pins in top and bottom layers"),bottomsidepinlabel:je().optional().default(!1).describe("place the silkscreen reference text on the bottom layer instead of top"),pinRowSide:Kn(["left","right","top","bottom"]).optional().default("left"),pinrowleft:je().optional().default(!1),pinrowright:je().optional().default(!1),pinrowtop:je().optional().default(!1),pinrowbottom:je().optional().default(!1),pinrowleftpins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),pinrowrightpins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),pinrowtoppins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),pinrowbottompins:xo([Z(),_t()]).transform(t=>Number(t)).optional(),width:ce.optional(),height:ce.optional(),pinRowHoleEdgeToEdgeDist:ce.default("2mm"),holes:xo([Z(),dn(Z())]).optional().transform(t=>!t||Array.isArray(t)?t:t.startsWith("(")&&t.endsWith(")")?t.slice(1,-1).split(",").map(e=>e.trim()):[t]),holeXDist:ce.optional(),holeYDist:ce.optional(),holeInset:ce.default("1mm"),pinrow:xo([Z(),_t()]).optional(),usbposition:Kn(["left","right","top","bottom"]).optional().default("left"),usbleft:je().optional().default(!1),usbtop:je().optional().default(!1),usbright:je().optional().default(!1),usbbottom:je().optional().default(!1),usbtype:Kn(["micro","c"]).optional(),usbmicro:je().optional().default(!1),usbc:je().optional().default(!1),screen:je().optional().default(!1).describe("add silkscreen outline for screen/display area"),screenwidth:ce.optional(),screenheight:ce.optional(),screencenteroffsetx:ce.optional(),screencenteroffsety:ce.optional()}).transform(t=>{const e=Xrn(t);let n=t.pinRowSide;t.pinrowleft&&(n="left"),t.pinrowright&&(n="right"),t.pinrowtop&&(n="top"),t.pinrowbottom&&(n="bottom");let o=t.usbposition;t.usbleft&&(o="left"),t.usbtop&&(o="top"),t.usbright&&(o="right"),t.usbbottom&&(o="bottom");let i=t.usbtype;t.usbmicro&&(i="micro"),t.usbc&&(i="c"),t.pinrow!==void 0&&(t.numPins=Number(t.pinrow));const r={left:t.pinrowleftpins,right:t.pinrowrightpins,top:t.pinrowtoppins,bottom:t.pinrowbottompins},s=Object.values(r).some(C=>C!==void 0&&C>0),a=(r.left??0)>0&&(r.right??0)>0,A=(r.top??0)>0&&(r.bottom??0)>0;s&&((r.left??0)>0?n="left":(r.right??0)>0?n="right":(r.top??0)>0?n="top":(r.bottom??0)>0&&(n="bottom"),t.numPins=(r.left??0)+(r.right??0)+(r.top??0)+(r.bottom??0));const c=Math.ceil(t.numPins/t.rows),l=Math.max(r.left??0,r.right??0),u=Math.max(r.top??0,r.bottom??0);let g,h;if(s){const C=a?t.p:0,y=A?t.p:0;g=(u>0?(u-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+C,h=(l>0?(l-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+y}else n==="left"||n==="right"?(g=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,h=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist):(h=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,g=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist);t.numPins===0&&(g=10,h=10);const d=t.width??g,p=t.height??h,m=t.screenwidth??d*.95,_=t.screenheight??p*.95,f=t.screencenteroffsetx??0,I=t.screencenteroffsety??0;return{...t,pinlabelAnchorSide:e,pinRowSide:n,usbposition:o,usbtype:i,male:t.male??!t.female,female:t.female??!1,width:d,height:p,screenwidth:m,screenheight:_,screencenteroffsetx:f,screencenteroffsety:I,pinrowleftpins:r.left,pinrowrightpins:r.right,pinrowtoppins:r.top,pinrowbottompins:r.bottom}}).superRefine((t,e)=>{t.male&&t.female&&e.addIssue({code:lo.custom,message:"'male' and 'female' cannot both be true; it should be male or female.",path:["male","female"]})}),hyi=t=>{const e=dyi.parse(t),{p:n,id:o,od:i,rows:r,numPins:s,pinlabelAnchorSide:a,pinlabelverticallyinverted:A,pinlabelorthogonal:c,pinlabeltextalignleft:l,pinlabeltextalignright:u,nopinlabels:g,doublesidedpinlabel:h,bottomsidepinlabel:d,pinRowSide:p,width:m,height:_,pinRowHoleEdgeToEdgeDist:f,holes:I,holeXDist:C,holeYDist:y,holeInset:x,pinrowleftpins:E,pinrowrightpins:B,pinrowtoppins:S,pinrowbottompins:Q,usbposition:w,usbtype:M,screen:k,screenwidth:R,screenheight:F,screencenteroffsetx:O,screencenteroffsety:U}=e;let Y="center";l?Y="left":u&&(Y="right");const W=[],te={left:E,right:B,top:S,bottom:Q},j=Object.values(te).some(ie=>ie!==void 0&&ie>0),J=(ie,ne,le,ge)=>{if(e.smd?W.push(Wo(ie,ne,le,e.od,e.od)):ie===1?W.push(r2({pn:ie,x:ne,y:le,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(Os(ie,ne,le,o,i)),!g){const _e=ne+(ge==="left"?-i:ge==="right"?i:0),ue=le+(ge==="top"?i:ge==="bottom"?-i:0);d||W.push(gT({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"top"})),(h||d)&&W.push(gT({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"bottom"}))}};if(j){const ie=n;let ne=1;const le=te.left??0,ge=te.right??0,_e=te.top??0,ue=te.bottom??0,fe=(pe,ye)=>{if(!(ye<=0))if(pe==="left"||pe==="right"){const Me=pe==="left"?-m/2+f:m/2-f,ve=(ye-1)/2*ie;for(let he=0;he<ye;he++)J(ne,Me,ve-he*ie,pe),ne++}else{const Me=pe==="top"?_/2-f:-_/2+f,ve=-((ye-1)/2)*ie;for(let he=0;he<ye;he++)J(ne,ve+he*ie,Me,pe),ne++}};fe("left",le),fe("right",ge),fe("top",_e),fe("bottom",ue)}else{const ie=n;let ne=0,le=0,ge=0,_e=0,ue=0,fe=0;const pe=Math.ceil(s/r);p==="left"||p==="right"?(ne=p==="left"?-m/2+f:m/2-f,le=(pe-1)/2*ie,ge=0,_e=-ie,ue=p==="left"?ie:-ie,fe=0):(ne=-(pe-1)/2*ie,le=p==="top"?_/2-f:-_/2+f,ge=ie,_e=0,ue=0,fe=p==="top"?-ie:ie);let ye=1;for(let Me=0;Me<r&&ye<=s;Me++)for(let ve=0;ve<pe&&ye<=s;ve++){const he=ne+ve*ge+Me*ue,Qe=le+ve*_e+Me*fe;if(e.smd?W.push(Wo(ye,he,Qe,e.od,e.od)):ye===1?W.push(r2({pn:ye,x:he,y:Qe,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(Os(ye,he,Qe,o,i)),!g){const Pe=he+(p==="left"?-i:p==="right"?i:0),we=Qe+(p==="top"?i:p==="bottom"?-i:0);d||W.push(gT({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"top"})),(h||d)&&W.push(gT({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:"bottom"}))}ye++}}if(I)for(const ie of I){let ne=0,le=0;ie==="topleft"?(ne=-m/2+x,le=_/2-x):ie==="topright"?(ne=m/2-x,le=_/2-x):ie==="bottomleft"?(ne=-m/2+x,le=-_/2+x):ie==="bottomright"?(ne=m/2-x,le=-_/2+x):ie==="center"&&(ne=0,le=0),C!==void 0&&(ne+=C),y!==void 0&&(le+=y),W.push(Os(s+I.indexOf(ie)+1,ne,le,o,i))}if(!e.nosilkscreen){const ie=[{x:-m/2,y:-_/2},{x:m/2,y:-_/2},{x:m/2,y:_/2},{x:-m/2,y:_/2},{x:-m/2,y:-_/2}];W.push(sA(ie,{stroke_width:.1,layer:"top"}))}const oe=xi(0,_/2+1,.5);if(W.push(oe),w&&M){let ie,ne;if(M==="c")ie=8,ne=3;else if(M==="micro")ie=6,ne=2;else return{circuitJson:W,parameters:e};let le;if(w==="left")le=[{x:-m/2,y:-ie/2},{x:-m/2+ne,y:-ie/2},{x:-m/2+ne,y:ie/2},{x:-m/2,y:ie/2},{x:-m/2,y:-ie/2}];else if(w==="right")le=[{x:m/2-ne,y:-ie/2},{x:m/2,y:-ie/2},{x:m/2,y:ie/2},{x:m/2-ne,y:ie/2},{x:m/2-ne,y:-ie/2}];else if(w==="top")le=[{x:-ie/2,y:_/2-ne},{x:ie/2,y:_/2-ne},{x:ie/2,y:_/2},{x:-ie/2,y:_/2},{x:-ie/2,y:_/2-ne}];else if(w==="bottom")le=[{x:-ie/2,y:-_/2},{x:ie/2,y:-_/2},{x:ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2}];else return{circuitJson:W,parameters:e};W.push(sA(le,{stroke_width:.1,layer:"top"}))}if(k){const ie=R/2,ne=F/2,le=O,ge=U,_e=[{x:-ie+le,y:-ne+ge},{x:ie+le,y:-ne+ge},{x:ie+le,y:ne+ge},{x:-ie+le,y:ne+ge},{x:-ie+le,y:-ne+ge}];W.push(sA(_e,{stroke_width:.05,layer:"top"}))}return{circuitJson:W,parameters:e}},pyi=[{x:-1.45,y:2.75},{x:-1.45,y:-1.85},{x:4.05,y:-1.85},{x:4.05,y:2.75}],myi=[{x:-1.55,y:2.75},{x:-1.55,y:-1.85},{x:3.95,y:-1.85},{x:3.95,y:2.75}],_yi=Ci.extend({fn:Z(),num_pins:_t().default(3),inline:je().default(!1),p:Z().default("1.27mm"),id:Z().default("0.75mm"),od:Z().default("1.3mm"),w:Z().default("4.8mm"),h:Z().default("4.0mm")}),fyi=t=>{const e=_yi.parse(t),n=Number.parseFloat(e.p),o=Number.parseFloat(e.w),i=Number.parseFloat(e.h),r=e.inline?1.05:Number.parseFloat(e.od),s=e.inline?1.5:r,a=[r2({pn:1,x:0,y:0,holeDiameter:e.id,rectPadWidth:r,rectPadHeight:s}),e.inline?Q6(2,n,0,Number.parseFloat(e.id),r,s):Os(2,n,n,e.id,r),e.inline?Q6(3,n*2,0,Number.parseFloat(e.id),r,s):Os(3,n*2,0,e.id,r)],A=o/2,c=e.inline?n-.09:n,l=.2,u=l+A-i,g=Array.from({length:32},(m,_)=>{const f=Math.PI*_/31;return{x:c+A*Math.cos(f),y:l+A*Math.sin(f)}}),h={type:"pcb_silkscreen_path",layer:"top",pcb_component_id:"",pcb_silkscreen_path_id:"",stroke_width:.12,route:[...g,{x:c-A,y:u},{x:c+A,y:u},g[0]]},d=xi(c,l+A+1,.5),p={type:"pcb_courtyard_outline",pcb_courtyard_outline_id:"",pcb_component_id:"",outline:e.inline?myi:pyi,layer:"top"};return{circuitJson:[...a,h,d,p],parameters:e}},Iyi=Ci.extend({fn:$e("usbcmidmount"),num_pins:$e(16).default(16),pinstart:S5.number().int().positive().default(1),split:je().default(!1).describe("emit all 16 contact lands"),reverse:je().default(!1).describe("number contact lands right-to-left"),noholes:je().default(!1).describe("omit the two locator holes"),rowy:ce.default("2.125mm").describe("contact pad row y position"),ph:ce.default("1.1mm").describe("contact pad height"),pw:ce.default("0.3mm").describe("signal contact pad width"),powerpw:ce.default("0.55mm").describe("merged power pad width"),powerx:ce.default("3.2mm").describe("outer merged power pad x"),shellx:ce.default("4.325mm").describe("shell tab x position"),topy:ce.default("1.575mm").describe("upper shell tab y position"),bottomy:ce.default("2.625mm").describe("lower shell tab negative y magnitude"),tophw:ce.default("0.6mm").describe("upper shell slot width"),tophh:ce.default("1.5mm").describe("upper shell slot height"),topring:ce.default("0.25mm").describe("upper shell annular ring"),bottomhw:ce.default("0.6mm").describe("lower shell slot width"),bottomhh:ce.default("1.2mm").describe("lower shell slot height"),bottomring:ce.default("0.3mm").describe("lower shell annular ring"),holex:ce.default("2.89mm").describe("locator hole x position"),holey:ce.default("1.055mm").describe("locator hole y position"),holed:ce.default("0.7mm").describe("locator hole diameter"),bodybottom:ce.default("5.225mm").describe("connector body negative y extent")}),Ipe=({pin:t,x:e,y:n,holeWidth:o,holeHeight:i,outerWidth:r,outerHeight:s})=>({type:"pcb_plated_hole",shape:"pill",pcb_plated_hole_id:"",pcb_component_id:"",pcb_port_id:"",x:e,y:n,hole_width:o,hole_height:i,outer_width:r,outer_height:s,ccw_rotation:0,layers:["top","bottom"],port_hints:[t.toString()]}),Cyi=t=>{const e=Iyi.parse(t),{pinstart:n,split:o,reverse:i,noholes:r,rowy:s,ph:a,pw:A,powerpw:c,powerx:l,shellx:u,topy:g,bottomy:h,tophw:d,tophh:p,topring:m,bottomhw:_,bottomhh:f,bottomring:I,holex:C,holey:y,holed:x,bodybottom:E}=e,B=r?[]:[-C,C].map(ge=>({type:"pcb_hole",pcb_hole_id:"",pcb_component_id:"",hole_shape:"circle",hole_diameter:x,x:ge,y})),S=[Ipe({pin:n,x:-u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Ipe({pin:n+1,x:u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Ipe({pin:n+2,x:-u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I}),Ipe({pin:n+3,x:u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I})],Q=Number((l-.8).toFixed(12)),w=[-l,-Q,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,Q,l],k=o?[-3.35,-3.05,-2.55,-2.25,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,2.25,2.55,3.05,3.35]:w,R=i?k.slice().reverse():k,F=o?R.map(()=>A):R.map((ge,_e)=>_e<2||_e>=R.length-2?c:A),O=R.map((ge,_e)=>Wo(n+4+_e,ge,s,F[_e],a)),U=Math.min(u-Math.max(d,_)/2-.2,4.5),Y=[sA([{x:-U,y:-h+f/2+I+.2},{x:-U,y:g-p/2-m-.2}]),sA([{x:U,y:-h+f/2+I+.2},{x:U,y:g-p/2-m-.2}]),sA([{x:-U,y:-E},{x:U,y:-E}])],W=Math.max(s+a/2,g+p/2+m),te=Math.min(-E,-h-f/2-I),j=-u-Math.max(d+2*m,_+2*I)/2-.25,J=-j,oe=W+.25,ie=te-.25,ne=xi(0,oe+.75,.5),le={type:"pcb_courtyard_rect",pcb_courtyard_rect_id:"",pcb_component_id:"",center:{x:0,y:(oe+ie)/2},width:J-j,height:oe-ie,layer:"top"};return{circuitJson:[...B,...S,...O,...Y,ne,le],parameters:e}};hpe.extend({}).transform(ppe);var yyi=t=>(t.legsoutside=!1,t.pl||(t.pl=1),t.pw||(t.pw=.6),uT(t)),xyi=(t,e)=>{const n=t.filter(o=>o.type==="pcb_silkscreen_text");if(n.length===0)return t;for(const o of n)e.norefdes&&(o.text="");return t},Eyi=(t,e)=>e.nosilkscreen?t.filter(n=>n.type!=="pcb_silkscreen_path"&&n.type!=="pcb_silkscreen_text"):t,Byi=(t,e)=>{if(!e)return t;const n=t.filter(l=>l.type==="pcb_smtpad"||l.type==="pcb_plated_hole");if(n.length===0)return t;let o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const a=(l,u,g=0,h=0)=>{const d=l-g/2,p=l+g/2,m=u-h/2,_=u+h/2;o=Math.min(o,d),i=Math.max(i,p),r=Math.min(r,m),s=Math.max(s,_)};for(const l of n)if(l.type==="pcb_smtpad"){const u=l.shape==="circle"?l.radius*2:l.width,g=l.shape==="circle"?l.radius*2:l.height;a(l.x,l.y,u,g)}else if(l.type==="pcb_plated_hole"){const u=l.outer_diameter??l.hole_diameter;a(l.x,l.y,u,u)}let A=0,c=0;switch(e){case"center":A=(o+i)/2,c=(r+s)/2;break;case"bottomleft":A=o,c=r;break;case"bottomcenter":case"centerbottom":A=(o+i)/2,c=r;break;case"topcenter":case"centertop":A=(o+i)/2,c=s;break;case"leftcenter":case"centerleft":A=o,c=(r+s)/2;break;case"rightcenter":case"centerright":A=i,c=(r+s)/2;break;case"pin1":{const l=n.find(u=>u.port_hints?.[0]==="1")||n[0];A=l.x,c=l.y;break}}if(A===0&&c===0)return t;for(const l of t){if(typeof l.x=="number"&&(l.x-=A),typeof l.y=="number"&&(l.y-=c),l.center&&typeof l.center.x=="number"&&(l.center.x-=A,l.center.y-=c),l.type==="pcb_silkscreen_path")for(const u of l.route)u.x-=A,u.y-=c;l.type==="pcb_silkscreen_text"&&l.anchor_position&&(l.anchor_position.x-=A,l.anchor_position.y-=c)}return t},byi=[0,90,180,270],Cpe=(t,e)=>{switch(e){case 90:return{x:-t.y,y:t.x};case 180:return{x:-t.x,y:-t.y};case 270:return{x:t.y,y:-t.x};default:return{...t}}},dsn=t=>{if(typeof t.x=="number"&&typeof t.y=="number")return{x:t.x,y:t.y};if(Array.isArray(t.points)&&t.points.length>0){const e=t.points.map(o=>o.x),n=t.points.map(o=>o.y);return{x:(Math.min(...e)+Math.max(...e))/2,y:(Math.min(...n)+Math.max(...n))/2}}return null},Syi=t=>t.port_hints?.some(e=>/^(?:pin)?1$/i.test(String(e))),Qyi=(t,e,[n,o])=>{const i=t.map(_=>_.x),r=t.map(_=>_.y),s=Math.min(...i),a=Math.max(...i),A=Math.min(...r),c=Math.max(...r),l=(s+a)/2,u=(A+c)/2,g=a-s,h=c-A,d=Math.max(g,h,1)*1e-6,p=n==="leftside"&&Math.abs(e.x-s)<=d||n==="rightside"&&Math.abs(e.x-a)<=d||n==="topside"&&Math.abs(e.y-c)<=d||n==="bottomside"&&Math.abs(e.y-A)<=d,m=o==="left"&&(g<=d||e.x<l-d)||o==="right"&&(g<=d||e.x>l+d)||o==="top"&&(h<=d||e.y>u+d)||o==="bottom"&&(h<=d||e.y<u-d);return p&&m},$Ve=(t,e)=>{if(!t||typeof t!="object"||typeof t.x!="number"||typeof t.y!="number")return;const n=Cpe(t,e);t.x=n.x,t.y=n.y},ype=t=>(t%360+360)%360,vyi=(t,e)=>{switch(t.shape){case"rect":return{...t,shape:"rotated_rect",ccw_rotation:ype(e)};case"pill":return{...t,shape:"rotated_pill",ccw_rotation:ype(e)};case"rotated_rect":case"rotated_pill":return{...t,ccw_rotation:ype(t.ccw_rotation+e)};default:return t}},wyi=(t,e)=>e===0?t:t.map(n=>{const o=structuredClone(n);if(typeof o.x=="number"&&typeof o.y=="number"){const i=Cpe(o,e);o.x=i.x,o.y=i.y}$Ve(o.center,e),$Ve(o.anchor_position,e);for(const i of["route","outline","points"])if(Array.isArray(o[i]))for(const r of o[i])$Ve(r,e);return o.type==="pcb_smtpad"?vyi(o,e):((o.type==="pcb_plated_hole"||o.type==="pcb_silkscreen_text"||o.type==="pcb_fabrication_note_text")&&(o.ccw_rotation=ype(Number(o.ccw_rotation??0)+e)),(e===90||e===270)&&(o.type==="pcb_courtyard_rect"||o.type==="pcb_silkscreen_rect"||o.type==="pcb_fabrication_note_rect"||o.type==="pcb_cutout"&&o.shape==="rect")&&([o.width,o.height]=[o.height,o.width]),o)}),Pyi=(t,e)=>{if(!e)return t;const n=t.filter(a=>a.type==="pcb_smtpad"||a.type==="pcb_plated_hole"),o=n.find(Syi),i=n.map(dsn).filter(a=>a!==null),r=o?dsn(o):null;if(!o||!r||i.length===0)throw new Error(`pin1location(${e.join(",")}) requires a footprint with a pad whose port_hints contain "1" or "pin1"`);const s=byi.find(a=>{const A=i.map(l=>Cpe(l,a)),c=Cpe(r,a);return Qyi(A,c,e)});if(s===void 0)throw new Error(`pin1location(${e.join(",")}) cannot be reached with a rotation; the requested location may be the mirrored orientation of this footprint`);return wyi(t,s)},hsn=(t,e,n)=>Math.min(t,e/2,n/2),Myi=(t,e)=>{if(e===void 0)return t;const n=Ua(e);if(!Number.isFinite(n)||n<0)throw new Error(`rounded radius must be a non-negative length, got "${e}"`);for(const o of t)o.type==="pcb_smtpad"&&(o.shape==="rect"||o.shape==="rotated_rect")&&(o.corner_radius=hsn(n,o.width,o.height)),o.type==="pcb_plated_hole"&&"rect_pad_width"in o&&"rect_pad_height"in o&&(o.rect_border_radius=hsn(n,o.rect_pad_width,o.rect_pad_height));return t};function Dyi(t){return t!=null}var Nyi=t=>t.trim().replace(/^pinheader(?=[\d_]|$)/i,"pinrow").replace(/^d2pak(\d+)(?=_|$)/i,"d2pak_$1").replace(/^to-252(?:-(\d+))?(?=_|$)/i,(e,n)=>n?`to252_${n}`:"to252").replace(/^to-263(?:-(\d+))?(?=_|$)/i,(e,n)=>n?`to263_${n}`:"to263").replace(/^sot-23(?:-(\d+))?(?=_|$)/i,(e,n)=>n?`sot23_${n}`:"sot23").replace(/^sot23-(\d+)(?=_|$)/i,"sot23_$1").replace(/^sot-223-(\d+)(?=_|$)/i,"sot223_$1").replace(/^to-220f-(\d+)(?=_|$)/i,"to220f_$1").replace(/^jst_(ph|sh|zh|xh)_(\d+)(?=_|$)/i,"jst$2_$1"),Ryi=t=>t.replace(/([+-]?(?:\d+(?:\.\d*)?|\.\d+))\s*(?:um|µm)(?=$|[x,() ])/gi,e=>`${Number(ce.parse(e).toPrecision(12))}mm`),Tyi=t=>{let e=xpe();const n=Nyi(t),i=n.replace(/^((?:\d{4}|\d{5}))(?=$|_|x)/,"res$1").replace(/^zh(\d+)(?:$|_)/,"jst$1_zh").split(/_(?!metric)/).map(r=>{const s=r.match(/^(pin1location)(\(.*\))$/i);if(s)return{fn:s[1].toLowerCase(),v:s[2]};const a=r.match(/((?:p\d+[a-zA-Z]+(?=[\(\d\.\+\-\?]))|[a-zA-Z]+)([\(\d\.\+\-\?].*)?/);if(!a)return null;const[,A,c]=a;if(!A)return null;const l=A.toLowerCase();return c?.includes("?")?null:{fn:l,v:c}}).filter(Dyi);for(const{fn:r,v:s}of i)e=e[r](s);return e.setString(n),e},kyi=()=>Object.keys(cS),xpe=()=>{const t=new Proxy({},{get:(e,n)=>{if(n==="soup"||n==="circuitJson"){if("fn"in e&&cS[e.fn])return()=>{const{circuitJson:o}=cS[e.fn](e),i=Eyi(o,e),r=xyi(i,e),s=Pyi(r,e.pin1location?Drn.parse(e.pin1location):void 0),a=Myi(s,e.rounded);return Byi(a,e.origin)};if(!cS[e.fn])throw new Error(`Invalid footprint function, got "${e.fn}"${e.string?`, from string "${e.string}"`:""}`);return()=>{throw new Error(`No function found for footprinter, make sure to specify .dip, .lr, .p, etc. Got "${n}"`)}}if(n==="json"){if(!cS[e.fn])throw new Error(`Invalid footprint function, got "${e.fn}"${e.string?`, from string "${e.string}"`:""}`);return()=>cS[e.fn](e).parameters}return n==="getFootprintNames"?()=>Object.keys(cS):n==="params"?()=>e:n==="setString"?o=>(e.string=o,t):(...o)=>{const i=o[0],r=typeof i=="string"?Ryi(i):i;return Object.keys(e).length===0?`${n}${i}`in cS?(e[`${n}${i}`]=!0,e.fn=`${n}${i}`):(e[n]=!0,e.fn=n,n==="res"||n==="cap"||n==="led"||n==="diode"?i&&(typeof i=="string"&&i.includes("_metric")?e.metric=i.split("_metric")[0]:e.imperial=i):e.num_pins=Number.isNaN(Number.parseFloat(i))?void 0:Number.parseFloat(i)):!i&&["w","h","p"].includes(n)||(e[n]=n==="pin1location"&&o.length>1?o:r??!0),t}}});return t};xpe.string=Tyi,xpe.getFootprintNames=kyi;var pI=xpe,psn={in:25.4,inch:25.4,mil:.0254,mm:1,m:1e3,cm:10,ft:304.8,feet:304.8},Fyi=t=>{let e=typeof t=="number"?"mm":t.replace(/^[^a-zA-Z]+/g,"").toLowerCase();e||(e="mm");const n=typeof t=="number"?t:Number.parseFloat(t.split(e)[0]);if(e in psn)return n*psn[e];throw new Error(`Unsupported unit: ${e}`)},v6=xo([_t(),Z()]).transform((t,e)=>{try{const n=Fyi(t);if(!Number.isFinite(n))throw new Error("Length is not finite");return n}catch{return e.addIssue({code:"custom",message:`Invalid model length: ${String(t)}`}),gBn}}),a1=v6.refine(t=>t>0,"Length must be greater than zero"),w6=v6.refine(t=>t>=0,"Length cannot be negative"),Lyi=Kn(["sitsFlat","sitsFlatBelowBoard","foldedToFaceAboveBoard","foldedToFaceBelowBoard","foldedToRightAngleAboveBoard","foldedToRightAngleBelowBoard"]),qVe=_t().finite().positive(),Hyi=Z().refine(t=>{const e=t.split(":");if(e.length!==2)return!1;const n=Number(e[0]),o=Number(e[1]);return Number.isFinite(n)&&Number.isFinite(o)&&n>0&&o>0},'Aspect ratio must look like "16:9"').transform(t=>t),msn=xo([qVe,Hyi,fQ([qVe,qVe])]),_sn=Pt({x:v6.optional(),y:v6.optional(),z:v6.optional()}).strict(),XVe=xo([_t().finite(),Z().min(1)]),fsn=fQ([XVe,XVe,XVe]),Oyi=["sitsFlat","sitsFlatBelowBoard","foldedToFaceAboveBoard","foldedToFaceBelowBoard","foldsAboveBoard","foldsBelowBoard","foldedToRightAngleAboveBoard","foldedToRightAngleBelowBoard"],Isn={width:a1.optional(),height:a1.optional(),diagonal:a1.optional(),aspectRatio:msn.optional(),ratio:msn.optional(),defaultDiagonal:a1.optional(),orientation:Lyi.optional(),sitsFlat:je().optional(),sitsFlatBelowBoard:je().optional(),foldedToFaceAboveBoard:je().optional(),foldedToFaceBelowBoard:je().optional(),foldsAboveBoard:je().optional(),foldsBelowBoard:je().optional(),foldedToRightAngleAboveBoard:je().optional(),foldedToRightAngleBelowBoard:je().optional(),screenThickness:a1.optional(),bezelInset:w6.optional(),bezelDepth:a1.optional(),activeAreaWidth:a1.optional(),activeAreaHeight:a1.optional(),screenColor:Z().min(1).optional(),bezelColor:Z().min(1).optional(),showScreen:je().optional(),flexCableLength:a1.optional(),flexCableWidth:a1.optional(),flexCableThickness:a1.optional(),flexCableColor:Z().min(1).optional(),conductorCount:_t().int().positive().optional(),conductorPitch:a1.optional(),conductorWidth:a1.optional(),conductorThickness:a1.optional(),conductorColor:Z().min(1).optional(),cableEdgeMargin:w6.optional(),exposedContactLength:w6.optional(),showConductors:je().optional(),showFlexCable:je().optional(),showStiffeners:je().optional(),stiffenerLength:w6.optional(),stiffenerThickness:a1.optional(),stiffenerColor:Z().min(1).optional(),bendRadius:a1.optional(),bendSegments:_t().int().min(2).optional(),rightAngleVerticalLead:w6.optional(),distanceAboveBoard:w6.optional(),distanceBelowBoard:w6.optional(),foldDistanceFromConnector:w6.optional(),foldOutset:a1.optional(),foldSegments:_t().int().min(4).optional(),screenGap:w6.optional(),boardTopZ:v6.optional(),boardThickness:a1.optional(),boardClearance:w6.optional(),cableStartX:v6.optional(),cableStartY:v6.optional(),cableStartZ:v6.optional(),cableLateralOffset:v6.optional(),screenOffset:_sn.optional(),screenRotation:fsn.optional(),rotation:fsn.optional(),offset:_sn.optional()},Csn=(t,e)=>{const n=Oyi.filter(o=>t[o]===!0);n.length>1&&e(n[1])};Pt(Isn).strict().superRefine((t,e)=>{Csn(t,n=>{e.addIssue({code:"custom",message:"Only one FlexScreen orientation shortcut can be true",path:[n]})})});var Gyi=Pt({fn:$e("flexscreen"),...Isn}).strict().superRefine((t,e)=>{Csn(t,n=>{e.addIssue({code:"custom",message:"Only one FlexScreen orientation shortcut can be true",path:[n]})})}),ysn=t=>{const e=t.match(/^([a-zA-Z]+)([\(\d\.\+\-].*)?$/);if(e?.[1])return{fn:e[1].toLowerCase(),value:e[2]}},Yyi=t=>{const e=t.trim();if(!e)throw new Error("Model string cannot be empty");const n=e.split("_"),o=n[0],i=ysn(o),r={},s=i?.fn??o.toLowerCase();if(r[s]=!0,r.fn=s,i?.value){const a=Number.parseFloat(i.value);Number.isFinite(a)&&(r.num_pins=a)}for(const a of n.slice(1)){if(!a)throw new Error("Model strings cannot contain empty tokens");const A=ysn(a);if(!A)throw new Error(`Invalid model string token "${a}"`);r[A.fn]=A.value??!0}return r.string=e,r},Uyi={sitsflat:"sitsFlat",sitsflatbelow:"sitsFlatBelowBoard",sitsflatbelowboard:"sitsFlatBelowBoard",foldsabove:"foldedToFaceAboveBoard",foldsaboveboard:"foldedToFaceAboveBoard",foldedtofaceaboveboard:"foldedToFaceAboveBoard",foldsbelow:"foldedToFaceBelowBoard",foldsbelowboard:"foldedToFaceBelowBoard",foldedtofacebelowboard:"foldedToFaceBelowBoard",rightangleabove:"foldedToRightAngleAboveBoard",rightangleaboveboard:"foldedToRightAngleAboveBoard",foldedtorightangleaboveboard:"foldedToRightAngleAboveBoard",rightanglebelow:"foldedToRightAngleBelowBoard",rightanglebelowboard:"foldedToRightAngleBelowBoard",foldedtorightanglebelowboard:"foldedToRightAngleBelowBoard"},Kyi={width:["width","w"],height:["height","h"],diagonal:["diagonal","diag","d"],defaultDiagonal:["defaultdiagonal","defaultdiag"],screenThickness:["screenthickness"],bezelInset:["bezelinset"],bezelDepth:["bezeldepth"],activeAreaWidth:["activeareawidth","activew"],activeAreaHeight:["activeareaheight","activeh"],flexCableLength:["flexcablelength","flexlength","flex"],flexCableWidth:["flexcablewidth","flexwidth"],flexCableThickness:["flexcablethickness","flexthickness"],conductorPitch:["conductorpitch"],conductorWidth:["conductorwidth"],conductorThickness:["conductorthickness"],cableEdgeMargin:["cableedgemargin","edgemargin"],exposedContactLength:["exposedcontactlength","contactlength"],stiffenerLength:["stiffenerlength"],stiffenerThickness:["stiffenerthickness"],bendRadius:["bendradius"],rightAngleVerticalLead:["rightangleverticallead","verticallead"],distanceAboveBoard:["distanceaboveboard","distanceabove"],distanceBelowBoard:["distancebelowboard","distancebelow"],foldDistanceFromConnector:["folddistancefromconnector","folddistance","foldstart"],foldOutset:["foldoutset","outset"],screenGap:["screengap"],boardTopZ:["boardtopz"],boardThickness:["boardthickness"],boardClearance:["boardclearance"],cableStartX:["cablestartx"],cableStartY:["cablestarty"],cableStartZ:["cablestartz"],cableLateralOffset:["cablelateraloffset","lateraloffset"]},Vyi=Object.fromEntries(Object.entries(Kyi).flatMap(([t,e])=>e.map(n=>[n,t]))),zyi={conductorcount:"conductorCount",conductors:"conductorCount",bendsegments:"bendSegments",foldsegments:"foldSegments"},xsn={showscreen:["showScreen",!0],hidescreen:["showScreen",!1],showflex:["showFlexCable",!0],hideflex:["showFlexCable",!1],showconductors:["showConductors",!0],hideconductors:["showConductors",!1],showstiffeners:["showStiffeners",!0],hidestiffeners:["showStiffeners",!1]},Jyi={screencolor:"screenColor",bezelcolor:"bezelColor",flexcolor:"flexCableColor",conductorcolor:"conductorColor",stiffenercolor:"stiffenerColor"},Wyi=t=>{const e=String(t).toLowerCase().replace("x",":");if(e.includes(":")){const[o,i,r]=e.split(":"),s=Number(o),a=Number(i);if(r!==void 0||!Number.isFinite(s)||!Number.isFinite(a)||s<=0||a<=0)throw new Error(`Invalid FlexScreen aspect ratio "${String(t)}"`);return`${s}:${a}`}const n=Number(e);if(!Number.isFinite(n)||n<=0)throw new Error(`Invalid FlexScreen aspect ratio "${String(t)}"`);return n},jyi=(t,e)=>{if(typeof t!="string"||!/^\(.+\)$/.test(t))throw new Error(`FlexScreen token "${e}" requires a value in (...)`);return t.slice(1,-1)},Esn=(t,e)=>{if(t!==!0)throw new Error(`FlexScreen token "${e}" does not accept a value`)},$yi=t=>{if(t.fn!=="flexscreen")throw new Error(`Expected FlexScreen params, got "${t.fn}"`);const e={};let n,o;for(const[i,r]of Object.entries(t)){if(i==="fn"||i==="string"||i==="flexscreen")continue;const s=Uyi[i];if(s){if(Esn(r,i),n&&n!==s)throw new Error("A FlexScreen model string can only set one orientation");n=s,e.orientation=s;continue}if(i in xsn){Esn(r,i);const[l,u]=xsn[i];e[l]=u;continue}const a=Jyi[i];if(a){e[a]=jyi(r,i);continue}if(i==="ratio"){e.aspectRatio=Wyi(r);continue}const A=Vyi[i];if(A){e[A]=r;continue}if(i==="distance"){o=r;continue}const c=zyi[i];if(c){const l=Number(r);if(!Number.isInteger(l)||l<1)throw new Error(`Invalid positive integer in FlexScreen token "${i}${String(r)}"`);e[c]=l;continue}throw new Error(`Unknown FlexScreen model token "${i}${String(r)}"`)}if(o!==void 0)if(n==="foldedToFaceAboveBoard")e.distanceAboveBoard=o;else if(n==="foldedToFaceBelowBoard")e.distanceBelowBoard=o;else throw new Error('The "distance" token requires foldsabove or foldsbelow; use distanceabove or distancebelow for an explicit side');return Gyi.parse({fn:"flexscreen",...e})},Bsn={flexscreen:$yi},qyi=t=>{const e=Bsn[t.fn];if(e)return e(t);throw new Error(`Unsupported modelprinter function "${t.fn}"`)},Xyi=t=>{const e=Yyi(t);return{params:()=>e,json:()=>qyi(e)}},Zyi={string:Xyi,getModelNames:()=>Object.keys(Bsn)},ZVe=Zyi,bsn=Symbol("Fragment");function eze(t,e,...n){const o=n.length?n:e?.children!==void 0?[e.children]:[],i=[],r=(Array.isArray(o)?o:[o]).flat(1/0);for(const s of r)s==null||s===!1||(Array.isArray(s)?i.push(...s):i.push(s));return{type:t,props:(e&&e.children!==void 0?{...e,children:void 0}:e)||{},children:i}}var $t=Symbol("Cuboid"),Ssn=Symbol("Cube"),Ns=Symbol("Cylinder"),TY=Symbol("Sphere"),A1=Symbol("RoundedCuboid"),Uo=Symbol("Translate"),Ac=Symbol("Rotate"),gh=Symbol("Union"),e0=Symbol("Subtract"),ZA=Symbol("Hull"),qo=Symbol("Colorize"),kY=Symbol("Polygon"),FY=Symbol("ExtrudeLinear"),a2=Symbol("RoundedCylinder"),Ei=bsn,De=(t,e,n)=>eze(t,e),Sn=(t,e,n)=>eze(t,e),tze=({hole:t,isPin1:e})=>{const n=e?"#00ff00":"#b87333";if(t.shape==="circle")return De(qo,{color:n,children:De(Uo,{offset:[t.x,t.y,-.005],children:Sn(e0,{children:[De(Ns,{radius:t.outer_diameter/2,height:.01}),De(Ns,{radius:t.hole_diameter/2,height:.01})]})})});if(t.shape==="circular_hole_with_rect_pad")return De(qo,{color:n,children:De(Uo,{offset:[t.x,t.y,0],children:Sn(e0,{children:[De($t,{size:[t.rect_pad_width,t.rect_pad_height,.01],center:[0,0,0]}),De(Ns,{radius:t.hole_diameter/2,height:.01})]})})});if(t.shape==="pill"){const o=t.outer_width,i=t.outer_height,r=Math.min(o,i)/2,s=o>i,a=t.hole_width??.8,A=t.hole_height??.8;return De(qo,{color:n,children:De(Uo,{offset:[t.x,t.y,0],children:Sn(e0,{children:[Sn(ZA,{children:[De(Ns,{radius:r,height:.01,center:[s?-(o/2-r):0,s?0:-(i/2-r),0]}),De(Ns,{radius:r,height:.01,center:[s?o/2-r:0,s?0:i/2-r,0]})]}),a===A?De(Ns,{radius:a/2,height:.01}):Sn(ZA,{children:[De(Ns,{radius:Math.min(a,A)/2,height:.01,center:[a>A?-(a/2-A/2):0,a>A?0:-(A/2-a/2),0]}),De(Ns,{radius:Math.min(a,A)/2,height:.01,center:[a>A?a/2-A/2:0,a>A?0:A/2-a/2,0]})]})]})})})}throw new Error("Shape not supported: "+t.shape)};function e2i(t){for(const o of["bodyWidth","bodyLength","bodyHeight","pitch","landWidth","landLength","landThickness"])if(!Number.isFinite(t[o])||t[o]<=0)throw new Error(`${o} must be finite and positive`);for(const o of["landsPerSideX","landsPerSideY"])if(!Number.isInteger(t[o])||t[o]<0)throw new Error(`${o} must be a nonnegative integer`);if(!Number.isFinite(t.edgeInset)||t.edgeInset<0||t.landThickness>=t.bodyHeight||t.landWidth>=t.pitch||t.landsPerSideX+t.landsPerSideY<1)throw new Error("Invalid land layout or thickness");const e=[{count:t.landsPerSideX,across:t.bodyWidth,along:t.bodyLength,horizontal:!0},{count:t.landsPerSideY,across:t.bodyLength,along:t.bodyWidth,horizontal:!1}];for(const o of e){if(o.count===0)continue;const i=(o.count-1)*t.pitch+t.landWidth;if(i>=o.along-2*t.edgeInset||2*(t.edgeInset+t.landLength)>=o.across)throw new Error("Lands must fit below the body without opposite-row overlap");const r=o.horizontal?t.landsPerSideY:t.landsPerSideX;if(r>0&&i>=o.along-2*(t.edgeInset+t.landLength)&&(r-1)*t.pitch+t.landWidth>=o.across-2*(t.edgeInset+t.landLength))throw new Error("Adjacent land rows overlap at corners")}const n=Math.min(t.bodyWidth,t.bodyLength)*.035;return Sn(Ei,{children:[De(qo,{color:"#353535",children:Sn(e0,{children:[De(Uo,{z:(t.bodyHeight+t.landThickness/2)/2,children:De($t,{size:[t.bodyWidth,t.bodyLength,t.bodyHeight-t.landThickness/2]})}),De(Uo,{offset:[-t.bodyWidth/2+2*n,t.bodyLength/2-2*n,t.bodyHeight],children:De(Ns,{radius:n,height:Math.min(.04,t.bodyHeight/10)})})]})}),De(qo,{color:"#c5b987",children:e.flatMap(o=>[-1,1].flatMap(i=>Array.from({length:o.count},(r,s)=>{const a=i*(o.across/2-t.edgeInset-t.landLength/2),A=((o.count-1)/2-s)*t.pitch;return De(Uo,{offset:[o.horizontal?a:A,o.horizontal?A:a,t.landThickness/2],children:De($t,{size:o.horizontal?[t.landLength,t.landWidth,t.landThickness]:[t.landWidth,t.landLength,t.landThickness]})},`${o.horizontal}-${i}-${s}`)})))})]})}function Epe(t){const{pinCount:e,pitch:n,bodyWidth:o,bodyLength:i,bodyHeight:r,standoff:s,leadSpan:a,leadWidth:A,leadThickness:c,contactLength:l,taperInset:u,exposedPadWidth:g=0,exposedPadLength:h=0}=t;for(const E of["pitch","bodyWidth","bodyLength","bodyHeight","leadSpan","leadWidth","leadThickness","contactLength"])if(!Number.isFinite(t[E])||t[E]<=0)throw new Error(`${E} must be finite and positive`);for(const[E,B]of Object.entries({standoff:s,taperInset:u,exposedPadWidth:g,exposedPadLength:h}))if(!Number.isFinite(B)||B<0)throw new Error(`${E} must be finite and nonnegative`);if(!Number.isInteger(e)||e<4||e%2)throw new Error("pinCount must be even and at least 4");const d=r-s,p=(a-o)/2,m=(e/2-1)*n+A;if(d<=c*2||A>=n||m>=i-2*u||u*2>=Math.min(o,i)||l>=p)throw new Error("Invalid mold, lead spacing, or terminal reach");if(g===0!=(h===0)||g>=o-2*u||h>=i-2*u)throw new Error("Exposed pad must fit inside the bottom mold face");const _=s+d/2,f=Math.min(.002,d/100),I=Sn(ZA,{children:[De(Uo,{z:s+f/2,children:De($t,{size:[o-2*u,i-2*u,f]})}),De(Uo,{z:_,children:De($t,{size:[o,i,f]})}),De(Uo,{z:r-f/2,children:De($t,{size:[o-2*u,i-2*u,f]})})]}),C=Math.min(o,i)*.045,y=Math.min(.04,d/10),x=(E,B)=>{const S=a/2,Q=o/2-Math.min(o/8,.15),w=S-l,M=o/2+Math.min(.08,(p-l)/4),k=[[S-f/2,c/2],[w,c/2]];for(let F=1;F<=12;F++){const O=F/12;k.push([w+(M-w)*O,c/2+(_-c/2)*O*O*(3-2*O)])}k.push([Q,_]);const R=([F,O])=>De(Uo,{offset:{x:E*F,y:B,z:O},children:De($t,{size:[f,A,c]})});return De(gh,{children:k.slice(1).map((F,O)=>Sn(ZA,{children:[R(k[O]),R(F)]}))})};return Sn(Ei,{children:[De(qo,{color:"#353535",children:Sn(e0,{children:[I,De(Uo,{offset:{x:-o/2+u+C*2,y:i/2-u-C*2,z:r},children:De(Ns,{radius:C,height:y*2})})]})}),De(qo,{color:"#bfc1c4",children:Array.from({length:e},(E,B)=>x(B<e/2?-1:1,((e/2-1)/2-B%(e/2))*n))}),g>0&&De(qo,{color:"#bfc1c4",children:De(Uo,{z:(s+c)/2,children:De($t,{size:[g,h,s+c]})})})]})}var t2i=t=>Epe(t);function n2i(t){if(t.bodywidth===void 0&&t.bodyheight===void 0&&t.bodythickness===void 0)return null;if(t.fn==="ssop"){const e=t.bodywidth??t.w*.55,n=t.bodyheight??(t.num_pins/2-1)*t.p+t.pw+.4,o=t.bodythickness??1,i=Math.min(t.pw,t.p*.5),r=(t.num_pins/2-1)*t.p+i;if(n<=r)throw new Error("SSOP bodyheight must contain the lead row");const s=Math.max(t.w+.2+t.pl/2,e+t.p),a=Math.min(.1,o/10);return De(t2i,{pinCount:t.num_pins,pitch:t.p,bodyWidth:e,bodyLength:n,bodyHeight:o+a,standoff:a,leadSpan:s,leadWidth:i,leadThickness:Math.min(.15,o/4),contactLength:Math.min(t.pl/2,(s-e)/4),taperInset:Math.min(.12,(n-r)/4,e/8)})}if(t.fn==="lga"){const e=t.bodywidth??t.w,n=t.bodyheight??t.h,o=t.bodythickness??1,i=t.grid,r=Math.min(t.pw,t.p/2),s=e-((i.y-1)*t.p+r),a=n-((i.x-1)*t.p+r),A=Math.min(t.pl/2,e/8,n/8,s/4,a/4);return De(e2i,{bodyWidth:e,bodyLength:n,bodyHeight:o,landsPerSideX:i.x,landsPerSideY:i.y,pitch:t.p,landWidth:r,landLength:A,edgeInset:0,landThickness:Math.min(.015,o/10)})}return null}var ng=({center:t,width:e,length:n,height:o,heightAboveSurface:i=.15,color:r="#555",taperRatio:s=.12,faceRatio:a=.75,straightHeightRatio:A=.5,includeNotch:c=!0,notchRadius:l,notchPosition:u,notchRotation:g=[0,0,0],notchLength:h=.5,notchWidth:d=.25,chamferSize:p=0})=>{const m=o*A,_=o-m,f=Math.min(e,n)*s,I=Math.max(e-f,e*a),C=Math.max(n-f,n*a),y=Math.min(e,n)*.12,x=l??y,E={x:0,y:n/2-x*.25,z:o},B=u??E,S=Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.005,children:De($t,{size:[I,C,.01]})}),De(Uo,{z:m,children:De($t,{size:[e,n,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:m,children:De($t,{size:[e,n,.01]})}),De(Uo,{z:m+_,children:De($t,{size:[I,C,.01]})})]})]}),Q=(M,k)=>De(Uo,{offset:{x:M,y:k,z:0},children:De(Ac,{rotation:[0,0,Math.PI/4],children:De($t,{size:[p*Math.SQRT2,p*Math.SQRT2,o*3]})})});let w=S;if(p>0){const M=e/2,k=n/2;w=Sn(e0,{children:[S,Q(M,k),Q(-M,k),Q(M,-k),Q(-M,-k)]})}return De(qo,{color:r,children:De(Uo,{offset:t,children:De(Uo,{offset:{x:0,y:0,z:i},children:c?Sn(e0,{children:[w,De(Uo,{offset:B,children:De(Ac,{rotation:g,children:De(Ns,{radius:x,height:d})})})]}):w})})})},o2i=t=>Array.from({length:t},(e,n)=>n);function nze(t,e){if(t.length<2)throw new Error("Stroke must have at least two points");const n=Array.isArray(t[0])?t.map(([l,u])=>({x:l,y:u})):t,o=e/2,i=[],r=[];function s(l,u){const g=u.x-l.x,h=u.y-l.y,d=Math.sqrt(g*g+h*h);return{x:-h/d,y:g/d}}function a(l,u,g){const h={x:l.x+u.x*o*g,y:l.y+u.y*o*g};g>0?i.push(h):r.unshift(h)}const A=s(n[0],n[1]);a(n[0],A,1),a(n[0],A,-1);for(let l=1;l<n.length-1;l++){const u=n[l-1],g=n[l],h=n[l+1],d=s(u,g),p=s(g,h),m=d.x+p.x,_=d.y+p.y,f=Math.sqrt(m*m+_*_);if(f/2>2*o)a(g,d,1),a(g,p,1),a(g,d,-1),a(g,p,-1);else{const C=1/f;a(g,{x:m*C,y:_*C},1),a(g,{x:m*C,y:_*C},-1)}}const c=s(n[n.length-2],n[n.length-1]);return a(n[n.length-1],c,1),a(n[n.length-1],c,-1),[...i,...r]}var i2i=t=>{const e=Math.min(...t.map(a=>a.x)),n=Math.max(...t.map(a=>a.x)),o=Math.min(...t.map(a=>a.y)),s=5.47/(Math.max(...t.map(a=>a.y))-o);return t.map(a=>({x:(a.x-e-(n-e)/2)*s,y:(a.y-o)*s}))},r2i=i2i([{x:20,y:105},{x:20,y:109},{x:20,y:102},{x:26,y:102},{x:26,y:109},{x:24,y:111},{x:24,y:118},{x:22,y:118},{x:22,y:111},{x:20,y:109}]),Qsn=5.47,Bpe=.5,s2i=({x:t,y:e,z:n})=>{const o=t>0;return Sn(Ei,{children:[De(Uo,{offset:{x:t+.25/2,y:e,z:n},children:De(Ac,{rotation:["-90deg",0,"90deg"],children:De(FY,{height:.25,children:De(kY,{points:r2i.slice().reverse().map(i=>[i.x,i.y])})})})}),De(Uo,{offset:{x:t,y:e+(o?1:-1),z:n},children:De(Ac,{rotation:["-90deg","90deg",o?"180deg":"0deg"],children:De(FY,{height:2,children:De(kY,{points:nze([[0,0],[-1,0],[-1,-1]],.25).map(i=>[i.x,i.y])})})})})]})},a2i=({numPins:t=8,pitch:e=2.54,bodyWidth:n=6.4,rowSpacing:o})=>{const i=Math.floor(t/2),r=o??(n>=7?n:n+1.22),s=n>=7?r-1.22:n;return Sn(Ei,{children:[o2i(t).map(a=>{const A=a%i,c=(Math.floor(a/i)-.5)*2;return De(s2i,{x:c*r/2,y:A*e-(i-1)/2*e,z:Qsn/2+Bpe})}),De(ng,{width:s,length:i*e+.5,height:Qsn-Bpe,heightAboveSurface:Bpe,center:{x:0,y:0,z:Bpe}})]})};function A2i(t,{height:e,padContactLength:n,curveLength:o,bodyDistance:i,steepness:r=10}){o||(o=i*.3);let s=i-n-o;s<0&&(o+=s,s=0);const a=n*.75,A=n+o+(i-n-o)*.25;if(t<=a)return 0;if(t>=A)return e;const c=(t-a)/(A-a);return e/(1+Math.exp(-r*(c-.5)))}var ns=t=>{const{thickness:e,width:n,padContactLength:o,bodyDistance:i,height:r,rotation:s}=t,a=15,A=Array.from({length:a}).map((l,u)=>u/(a-1)*i).map(l=>[l,A2i(l,t)]),c=nze(A,e);return De(qo,{color:"#fff",children:De(Uo,{offset:{z:0,y:0,x:0,...t.position},children:De(Ac,{rotation:["90deg",0,s??0],children:De(Uo,{offset:{x:0,y:0,z:-n/2},children:De(FY,{height:n,children:De(kY,{points:c.map(l=>[l.x,l.y])})})})})})})},c2i=({pinCount:t,leadLength:e,leadWidth:n,pitch:o,bodyWidth:i})=>{const r=Math.ceil(t/2),s=r<=4,a=(r-1)*o/2,A=o*Math.max(r-1,0)+(s?1.5:1.15),c=i-(s?.66:.58),l=.15,u=.8,g=1.22,h=e*.5,d=h+Math.max(.22,Math.min(.4,e*.65)),p=i/2+e/2,m=d*.1,_=Math.min(Math.min(c,A)*.18,1),f=Math.min(Math.min(c,A)*.12,.45);return Sn(Ei,{children:[Array.from({length:r}).map((I,C)=>De(ns,{position:{x:-p,y:C*o-a,z:l/2},width:n,thickness:l,padContactLength:h,bodyDistance:d,curveLength:m,height:u})),Array.from({length:r}).map((I,C)=>De(ns,{rotation:Math.PI,position:{x:p,y:C*o-a,z:l/2},width:n,thickness:l,padContactLength:h,bodyDistance:d,curveLength:m,height:u})),De(ng,{center:{x:0,y:0,z:0},width:c,length:A,height:g,notchPosition:{x:-(c/2-_-.2),y:A/2-_-.2,z:g},notchRadius:f})]})},l2i=t=>"leadSpan"in t?Epe(t):c2i(t),u2i=({pinCount:t,padContactLength:e=.4,leadWidth:n=.2,pitch:o=.65,bodyWidth:i=3})=>{const r=Math.ceil(t/2),s=(r-1)*o/2,a=.2;return Sn(Ei,{children:[Array.from({length:r}).map((A,c)=>De(ns,{position:{x:-i/2-e-.3,y:c*o-s,z:a/2},width:n,thickness:a,padContactLength:e,bodyDistance:e+.4,height:.6})),Array.from({length:r}).map((A,c)=>De(ns,{rotation:Math.PI,position:{x:i/2+e+.3,y:c*o-s,z:a/2},width:n,thickness:a,padContactLength:e,bodyDistance:e+.4,height:.6})),De(ng,{center:{x:0,y:0,z:a/2},width:i,length:i,height:1.1,notchRadius:.35,heightAboveSurface:.1,taperRatio:.09})]})},g2i=t=>"leadSpan"in t?Epe(t):u2i(t),oze=1,ize=.5,LY=.5,HX=.2,d2i=oze-HX*2,vsn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[d2i,ize,LY],offset:[0,0,LY/2],color:t}),De($t,{size:[HX,LY,ize],offset:[oze/2-HX/2,0,LY/2],color:"#ccc"}),De($t,{size:[HX,LY,ize],offset:[-oze/2+HX/2,0,LY/2],color:"#ccc"})]}),rze=1.6,h2i=rze-.3*2,bpe=.3,sze=.85,HY=.6,wsn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[h2i,sze,HY],offset:[0,0,HY/2],color:t}),De($t,{size:[bpe,sze,HY],offset:[rze/2-bpe/2,0,HY/2],color:"#ccc"}),De($t,{size:[bpe,sze,HY],offset:[-rze/2+bpe/2,0,HY/2],color:"#ccc"})]}),aze=2,Aze=1.25,OY=.55,OX=.5,p2i=aze-OX*2,Psn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[p2i,Aze,OY],offset:[0,0,OY/2],color:t}),De($t,{size:[OX,Aze,OY],offset:[aze/2-OX/2,0,OY/2],color:"#ccc"}),De($t,{size:[OX,Aze,OY],offset:[-aze/2+OX/2,0,OY/2],color:"#ccc"})]}),Msn=({pinCount:t,pitch:e,leadWidth:n,padContactLength:o,bodyWidth:i})=>{const r=t/4;e||(e=m2i(t,i)),o||(o=_2i(t)),n||(n=f2i(t,i)),i||(i=e*(r+4));const s=o,a=i,A=(r-1)*e/2,c=s*.5,l=a+2*c,u=l,g=.8,h=.15,d=c,p=c*.5,m=c*.18;return Sn(Ei,{children:[Array.from({length:r}).map((_,f)=>De(ns,{position:{x:-u/2,y:f*e-A,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),Array.from({length:r}).map((_,f)=>De(ns,{rotation:Math.PI,position:{x:u/2,y:f*e-A,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),Array.from({length:r}).map((_,f)=>De(ns,{rotation:Math.PI/2,position:{x:f*e-A,y:-l/2,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),Array.from({length:r}).map((_,f)=>De(ns,{rotation:-Math.PI/2,position:{x:f*e-A,y:l/2,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),De(ng,{center:{x:0,y:0,z:0},width:i,length:a,height:1.5,taperRatio:.03,chamferSize:.7,notchPosition:{x:-(a/2-1.5),y:i/2-1.5,z:1.5},notchRadius:1.5/2})]})},m2i=(t,e)=>{switch(t){case 44:case 64:return .8;case 52:return e===14?1:.65;case 208:return .5;default:return .5}},_2i=t=>{switch(t){case 32:return .6;case 40:return .6;case 52:case 64:return .65;case 208:return 1.65;default:return .6}},f2i=(t,e)=>{switch(t){case 44:case 64:return .5;case 52:return e===14?.45:.55;case 208:return .3;default:return .25}},GY="#c0c0c0",Dsn=({x:t,y:e,pinThickness:n,shortSidePinLength:o,longSidePinLength:i,bodyHeight:r,bodyLength:s=2.54,bodyWidth:a=2.54,flipZ:A,smd:c,rightangle:l})=>Sn(Ei,{children:[De(Uo,{y:l?-3:0,children:De($t,{color:"#222",size:[s,a,r],center:[t,e,A(r/2)]})}),De(qo,{color:GY,children:c?De(ns,{rotation:-Math.PI/2,position:{x:t,y:e+1,z:n/2},thickness:n,width:n,height:n,padContactLength:2,bodyDistance:3}):Sn(ZA,{children:[De($t,{color:GY,size:[n,n,o*.9],center:[t,e,A(r*.9+r/2)]}),De($t,{color:GY,size:[n/1.8,n/1.8,o],center:[t,e,A(r+r/2)]})]})}),De(qo,{color:GY,children:De(Uo,{y:l?-3.9:0,z:l?1:0,children:De(Ac,{rotation:l?[-Math.PI/2,0,0]:[0,0,0],children:Sn(ZA,{children:[De($t,{color:GY,size:[n,n,i*.9],center:[t,e,A(-i/2*.9)]}),De($t,{color:GY,size:[n/1.8,n/1.8,i],center:[t,e,A(-i/2)]})]})})})})]}),Nsn=({numberOfPins:t,pitch:e=2.54,longSidePinLength:n=6,invert:o,rows:i=1,smd:r,rightangle:s})=>{const c=Math.ceil(t/i),l=2.54,u=3,g=-((c-1)/2)*e,d=!r&&!s?!o:!!o,p=m=>d?-m+2:m;return De(Ei,{children:Array.from({length:t},(m,_)=>{const f=Math.floor(_/c),I=_%c,C=g+I*e,y=((i-1)/2-f)*l;return De(Dsn,{x:C,y,pinThickness:.63,shortSidePinLength:u,longSidePinLength:n,bodyHeight:2,flipZ:p,smd:r,rightangle:s},_)})})};function I2i(t){const{num_pins:e,bodyWidth:n,bodyLength:o,bodyHeight:i,standoff:r,terminalSpanX:s,terminalSpanY:a,terminalThickness:A,padWidth:c,padLength:l,pitch:u,exposedPadWidth:g,exposedPadLength:h}=t;for(const _ of["bodyWidth","bodyLength","bodyHeight","terminalSpanX","terminalSpanY","terminalThickness","padWidth","padLength","pitch","exposedPadWidth","exposedPadLength"])if(!Number.isFinite(t[_])||t[_]<=0)throw new Error(`${_} must be finite and positive`);if(!Number.isInteger(e)||e<8||e%4)throw new Error("num_pins must be divisible by four and at least eight");if(!Number.isFinite(r)||r<0)throw new Error("standoff must be finite and nonnegative");const d=(e/4-1)*u+c;if(A<=r||A>=i||c>=u||d>=Math.min(n,o))throw new Error("Invalid mold, terminal thickness or spacing");if(s<n||a<o||s/2-l>=n/2||a/2-l>=o/2||g>=Math.min(n,s-2*l)||h>=Math.min(o,a-2*l)||d>=Math.min(s,a)-2*l)throw new Error("Terminals must enter the mold and clear the exposed pad and corners");const p=De(Uo,{z:(i+r)/2,children:De($t,{size:[n,o,i-r]})}),m=Math.min(n,o)*.035;return Sn(Ei,{children:[De(qo,{color:"#353535",children:Sn(e0,{children:[p,De(Uo,{offset:{x:-n/2+m*2,y:o/2-m*2,z:i},children:De(Ns,{radius:m,height:Math.min(.06,(i-r)/5)})})]})}),De(qo,{color:"#bfc1c4",children:Array.from({length:e},(_,f)=>{const I=Math.floor(f/(e/4)),C=((e/4-1)/2-f%(e/4))*u,y=I%2===0,x=I<2?-1:1,E=((y?s:a)-l)/2*x;return De(Uo,{offset:{x:y?E:C,y:y?C:E,z:A/2},children:De($t,{size:y?[l,c,A]:[c,l,A]})},f)})}),De(qo,{color:"#bfc1c4",children:De(Uo,{z:A/2,children:De($t,{size:[g,h,A]})})})]})}var C2i=t=>{const e=["left","bottom","right","top"],{pin_count:n,pn:o,w:i,h:r,p:s,pl:a}=t,A=n/4,c=e[Math.floor((o-1)/A)],l=(o-1)%A,u=s*(A-1),g=s*(A-1),h=-a/2;switch(c){case"left":return{x:-i/2-h,y:g/2-l*s,o:"vert"};case"bottom":return{x:-u/2+l*s,y:-r/2-h,o:"horz"};case"right":return{x:i/2+h,y:-g/2+l*s,o:"vert"};case"top":return{x:u/2-l*s,y:r/2+h,o:"horz"};default:throw new Error("Invalid pin number")}},y2i=({num_pins:t,cw:e,ccw:n,startingpin:o})=>{const i=[],r=t/4;let s=1;const a={};for(const A of o??[])a[A]=!0;!a.leftside&&!a.topside&&!a.rightside&&!a.bottomside&&(a.leftside=!0),!a.bottompin&&!a.leftpin&&!a.rightpin&&!a.toppin&&(a.leftside?a.toppin=!0:a.topside?a.rightpin=!0:a.rightside?a.bottompin=!0:a.bottomside&&(a.leftpin=!0)),a.leftside&&a.toppin?s=1:a.leftside&&a.bottompin?s=r:a.bottomside&&a.leftpin?s=r+1:a.bottomside&&a.rightpin?s=r*2:a.rightside&&a.bottompin?s=r*2+1:a.rightside&&a.toppin?s=r*3:a.topside&&a.rightpin?s=r*3+1:a.topside&&a.leftpin&&(s=r*4),i.push(-1);for(let A=0;A<t;A++)i[s]=A+1,s++,s>t&&(s=1);return i},x2i=({num_pins:t=16,bodyWidth:e=9,bodyLength:n=9,bodyThickness:o=.8,thermalPadSize:i,padWidth:r=.25,padLength:s=.25,pitch:a=.5,thermalPadThickness:A=.05})=>{const c=y2i({num_pins:t,cw:!0,ccw:!0}),l=[];for(let u=0;u<t;u++){const{x:g,y:h,o:d}=C2i({pin_count:t,pn:u+1,w:e,h:n,p:a,pl:s});let p=r,m=s;d==="vert"&&([p,m]=[m,p]);const _=c[u+1];l.push({pn:_,x:g,y:h,pw:p,pl:m})}return Sn(Ei,{children:[De(qo,{color:"grey",children:De($t,{center:[0,0,o/2],size:[e,n,o]})}),l.map((u,g)=>De($t,{center:[u.x,u.y,A/2],size:[u.pw,u.pl,A]})),i?.length!==void 0&&i?.width!==void 0&&De($t,{center:[0,0,A/2],size:[i.width,i.length,A]})]})},E2i=t=>"bodyHeight"in t?I2i(t):x2i(t),Rsn=E2i,B2i=()=>{const A=1.1999999999999997;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2.8/2+A/4,y:-1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{rotation:Math.PI,position:{x:2.8/2+A/4,y:1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{position:{x:-2.8/2-A/4,y:0,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{position:{x:-2.8/2-A/4,y:-1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{position:{x:-2.8/2-A/4,y:1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ng,{center:{x:0,y:0,z:0},width:1.6,length:2.9,height:1.2})]})},Tsn=B2i,b2i=({fullWidth:t=2.9,fullLength:e=2.8,color:n}={})=>{const u=(t-1.3)/2+.3;return Sn(Ei,{children:[De(ns,{position:{x:-t/2,y:.95,z:.075},width:.4,thickness:.15,padContactLength:.4,bodyDistance:u,height:.95}),De(ns,{position:{x:-t/2,y:-.95,z:.075},width:.4,thickness:.15,padContactLength:.4,bodyDistance:u,height:.95}),De(ns,{rotation:Math.PI,position:{x:t/2,y:0,z:.075},width:.4,thickness:.15,padContactLength:.4,bodyDistance:u,height:.95}),De(ng,{center:{x:0,y:0,z:0},width:1.3,length:2.9,height:1.1,color:n})]})},S2i=({fullWidth:t=2.9,fullLength:e=2.8})=>{const l=(t-1.92)/2+.3;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:t/2,y:0,z:.075},width:.4,thickness:.15,padContactLength:.25,bodyDistance:l,height:.45}),De(ns,{position:{x:-t/2,y:-.95,z:.075},width:.4,thickness:.15,padContactLength:.25,bodyDistance:l,height:.45}),De(ns,{position:{x:-t/2,y:.95,z:.075},width:.4,thickness:.15,padContactLength:.25,bodyDistance:l,height:.45}),De(ng,{center:{x:0,y:0,z:0},width:1.92,length:2.9,height:1.1,straightHeightRatio:.45,heightAboveSurface:.05})]})},cze=.6,lze=.3,YY=.33,GX=.1,Q2i=cze-GX*2,ksn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[Q2i,lze,YY],offset:[0,0,YY/2],color:t}),De($t,{size:[GX,lze,YY],offset:[cze/2-GX/2,0,YY/2],color:"#ccc"}),De($t,{size:[GX,lze,YY],offset:[-cze/2+GX/2,0,YY/2],color:"#ccc"})]}),uze=.4,gze=.2,UY=.13,YX=.07,v2i=uze-YX*2,Fsn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[v2i,gze,UY],offset:[0,0,UY/2],color:t}),De($t,{size:[YX,gze,UY],offset:[uze/2-YX/2,0,UY/2],color:"#ccc"}),De($t,{size:[YX,gze,UY],offset:[-uze/2+YX/2,0,UY/2],color:"#ccc"})]}),dze=3.2,hze=1.6,KY=.9,UX=.5,w2i=dze-UX*2,Lsn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[w2i,hze,KY],offset:[0,0,KY/2],color:t}),De($t,{size:[UX,hze,KY],offset:[dze/2-UX/2,0,KY/2],color:"#ccc"}),De($t,{size:[UX,hze,KY],offset:[-dze/2+UX/2,0,KY/2],color:"#ccc"})]}),pze=3.2,mze=2.5,VY=1,KX=.6,P2i=pze-KX*2,Hsn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[P2i,mze,VY],offset:[0,0,VY/2],color:t}),De($t,{size:[KX,mze,VY],offset:[pze/2-KX/2,0,VY/2],color:"#ccc"}),De($t,{size:[KX,mze,VY],offset:[-pze/2+KX/2,0,VY/2],color:"#ccc"})]}),_ze=5,fze=2.5,zY=1.4,VX=.6,M2i=_ze-VX*2,Osn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[M2i,fze,zY],offset:[0,0,zY/2],color:t}),De($t,{size:[VX,fze,zY],offset:[_ze/2-VX/2,0,zY/2],color:"#ccc"}),De($t,{size:[VX,fze,zY],offset:[-_ze/2+VX/2,0,zY/2],color:"#ccc"})]}),Ize=6.3,Cze=3.2,JY=1.8,zX=.8,D2i=Ize-zX*2,Gsn=({color:t="#333"})=>Sn(Ei,{children:[De($t,{size:[D2i,Cze,JY],offset:[0,0,JY/2],color:t}),De($t,{size:[zX,Cze,JY],offset:[Ize/2-zX/2,0,JY/2],color:"#ccc"}),De($t,{size:[zX,Cze,JY],offset:[-Ize/2+zX/2,0,JY/2],color:"#ccc"})]}),Ysn=({x:t,y:e,z:n=0,pitch:o=2.54,legsLength:i=3,innerDiameter:r=.945,bodyHeight:s=5,bodyLength:a=o,bodyWidth:A=o,flipZ:c})=>{const l=r||.945,u=l/1.5,g=l,h=g*1.8,d=Math.min(s*.18,o*.24),p=s+.1,m=c(n+p/2),_=n+s-d,f=u*1.6;return Sn(Ei,{children:[De(qo,{color:"#1a1a1a",children:Sn(e0,{children:[De($t,{color:"#000",size:[a,A,s],center:[t,e,c(n+s/2)]}),De($t,{size:[g,g,p],center:[t,e,m]}),Sn(ZA,{children:[De($t,{size:[g,g,.01],center:[t,e,c(_)]}),De($t,{size:[h,h,.01],center:[t,e,c(n+s)]})]})]})}),Sn(qo,{color:"silver",children:[Sn(ZA,{children:[De($t,{color:"silver",size:[u,u,i*.9],center:[t,e,c(n+-i/2*.9)]}),De($t,{color:"silver",size:[u/1.8,u/1.8,i],center:[t,e,c(n+-i/2)]})]}),De($t,{color:"silver",size:[f,f,f*.5],center:[t,e,c(n+f/2*.5)]})]})]})},N2i=({numberOfPins:t,pitch:e=2.54,legsLength:n=3,innerDiameter:o=.945,rows:i=1,invert:r})=>{const a=Math.ceil(t/i),A=2.54,c=-((a-1)/2)*e,l=u=>r?-u+5:u;return De(Ei,{children:Array.from({length:t},(u,g)=>{const h=Math.floor(g/a),d=g%a,p=c+d*e,m=((i-1)/2-h)*A;return De(Ysn,{x:p,y:m,pitch:e,legsLength:n,innerDiameter:o,flipZ:l},g)})})},R2i=({width:t,length:e,innerDiameter:n=1})=>{const o=t,i=e,r=t*.7,s=n/2.5;return Sn(Ei,{children:[De(A1,{color:"#1a1a1f",center:[0,0,r/2],size:[i,i,r],roundRadius:.3}),De(A1,{color:"#f2f2f2",center:[0,0,r+r*.1/2.5],size:[i,i,r*.1],roundRadius:.14}),De(Ns,{color:"#1a1a1f",height:r*.8,radius:o/3,center:[0,0,r+r*.8/2]}),De(Ns,{color:"#1a1a1f",height:r*.2,radius:n/2,center:[i/3,i/3,r+r*.1/2]}),De(Ns,{color:"#1a1a1f",height:r*.2,radius:n/2,center:[-i/3,-i/3,r+r*.1/2]}),De(Ns,{color:"#1a1a1f",height:r*.2,radius:n/2,center:[-i/3,i/3,r+r*.1/2]}),De(Ns,{color:"#1a1a1f",height:r*.2,radius:n/2,center:[i/3,-i/3,r+r*.1/2]}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:-o/2,y:-i/2,z:-r*1.2}}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:-o/2,y:i/2,z:-r*1.2},rotation:Math.PI}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:o/2,y:i/2,z:-r*1.2},rotation:Math.PI}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:o/2+n/3.6,y:-i/2,z:-r*1.2}})]})},Spe=t=>{const{thickness:e,width:n,horizontalLength:o,verticalLength:i,rotation:r=0,position:s}=t,a=[[0,o],[-i/3,o/3],[-i/5,o/4],[0,0]],A=nze(a,e);return De(qo,{color:"#f2f2f2",children:De(Uo,{offset:{x:s?.x||0,y:s?.y||0,z:s?.z||0},children:De(Ac,{rotation:[0,55,r],children:De(FY,{height:n,children:De(kY,{points:A.map(c=>[c.y,c.x])})})})})})},T2i=({pinCount:t,leadLength:e,leadWidth:n,pitch:o,bodyWidth:i})=>{const r=Math.ceil(t/2),s=(r-1)*o/2,a=.25,A=1,c=.8,l=e*0,u=o*(r-1)+n+.2,g=i*.55;return Sn(Ei,{children:[Array.from({length:r}).map((h,d)=>De(ns,{position:{x:-i/2-l,y:d*o-s,z:a/2},width:n,thickness:a,padContactLength:e/2,bodyDistance:e+.3,height:c})),Array.from({length:r}).map((h,d)=>De(ns,{rotation:Math.PI,position:{x:i/2+l,y:d*o-s,z:a/2},width:n,thickness:a,padContactLength:e/2,bodyDistance:e+.3,height:c})),De(ng,{center:{x:0,y:0,z:a/2},width:g,length:u,height:A})]})},k2i=t=>"leadSpan"in t?Epe(t):T2i(t),F2i=({pinCount:t,pitch:e,leadWidth:n,leadLength:o,bodyWidth:i,bodyLength:r})=>{const s=t===8?{pitch:.65,leadWidth:.3}:{pitch:.5,leadWidth:.225},a=isNaN(parseFloat(e))?s.pitch:parseFloat(e),A=isNaN(parseFloat(n))?s.leadWidth:parseFloat(n)*.8,c=isNaN(parseFloat(i))?2.6:parseFloat(i)*.8,l=isNaN(parseFloat(r))?2+Number(a)*1.4:parseFloat(r),u=t/2,g=(u-1)*a/2,h=.15,d=.8,p=4.5,m=(p-c)/2,_=m*.5;return Sn(Ei,{children:[Array.from({length:u}).map((f,I)=>De(ns,{position:{x:-p/2,y:g-I*a,z:h/2},width:A,thickness:h,padContactLength:_+.05,bodyDistance:m+.1,height:d})),Array.from({length:u}).map((f,I)=>De(ns,{rotation:Math.PI,position:{x:p/2,y:g-I*a,z:h/2},width:A,thickness:h,padContactLength:_+.05,bodyDistance:m+.1,height:d})),De(ng,{center:{x:0,y:0,z:h/2},width:c,length:l,height:1})]})},L2i=()=>Sn(Ei,{children:[De($t,{color:"#ccc",size:[.5,.6,.12],center:[-.725,0,.12/2]}),De($t,{color:"#ccc",size:[.5,.6,.12],center:[.725,0,.12/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[De(Uo,{z:.3/2,children:De($t,{size:[1.65,.8,.3]})}),Sn(ZA,{children:[De(Uo,{z:.3,children:De($t,{size:[1.65,.8,.01]})}),De(Uo,{z:.6,children:De($t,{size:[1.65-.2,.8-.2,.01]})})]})]})})]}),Usn=()=>Sn(Ei,{children:[De($t,{color:"#ccc",size:[.26,.51,.12],center:[-.325,0,.12/2]}),De($t,{color:"#ccc",size:[.26,.51,.12],center:[.325,0,.12/2]}),De(qo,{color:"#222",children:De(Uo,{z:.47/2+.02,children:De($t,{size:[.98,.58,.47]})})}),De($t,{color:"#ccc",size:[.98+.001,.26/2,.26/4],center:[0,.26/2,.47/4]}),De($t,{color:"#ccc",size:[.98+.001,.26/2,.26/4],center:[0,-.26/2,.47/4]}),De($t,{color:"#ccc",size:[.26/1.5,.58+.001,.26/4],center:[.65/2,0,.47/4]}),De($t,{color:"#ccc",size:[.26/1.5,.58+.001,.26/4],center:[-.65/2,0,.47/4]})]}),H2i=()=>{const c=De(qo,{color:"#1a1a1a",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.13,children:De($t,{size:[4,3,.03]})}),De(Uo,{z:1.15,children:De($t,{size:[4.4,3.4,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:1.15,children:De($t,{size:[4.4,3.4,.01]})}),De(Uo,{z:2.3,children:De($t,{size:[4,3,.01]})})]})]})}),l=({xDir:u})=>{const d=u*1.78,p=u*(3.4/2-.2/2+1),m=u*(3.4/2-.2/2),_=Math.abs(m-p),f=(p+m)/2;return De(qo,{color:"#c0c0c0",children:Sn(gh,{children:[De($t,{size:[2.3*.8,1.45,.2],center:[d,0,.2/2]}),De($t,{size:[.2,1.45,1.14],center:[p,0,1.14/2+.2]}),De($t,{size:[_,1.45,.2],center:[f,0,.2/2+1.14]})]})})};return Sn(Ei,{children:[De(l,{xDir:1}),De(l,{xDir:-1}),c]})},Ksn=()=>{const c=De(qo,{color:"#1a1a1a",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.13,children:De($t,{size:[4.199999999999999,3.6,.03]})}),De(Uo,{z:1.15,children:De($t,{size:[4.6,4,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:1.15,children:De($t,{size:[4.6,4,.01]})}),De(Uo,{z:2.3,children:De($t,{size:[4.199999999999999,3.6,.01]})})]})]})}),l=({xDir:u})=>{const d=u*2.08,p=u*(4/2-.2/2+1),m=u*(4/2-.2/2),_=Math.abs(m-p),f=(p+m)/2;return De(qo,{color:"#c0c0c0",children:Sn(gh,{children:[De($t,{size:[2.3*.8,1.45,.2],center:[d,0,.2/2]}),De($t,{size:[.2,1.45,1.14],center:[p,0,1.14/2+.2]}),De($t,{size:[_,1.45,.2],center:[f,0,.2/2+1.14]})]})})};return Sn(Ei,{children:[De(l,{xDir:1}),De(l,{xDir:-1}),c]})},O2i=()=>{const c=De(qo,{color:"#1a1a1a",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.21000000000000002,children:De($t,{size:[6.3999999999999995,5.6,.03]})}),De(Uo,{z:1.15,children:De($t,{size:[6.8,6,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:1.15,children:De($t,{size:[6.8,6,.01]})}),De(Uo,{z:2.3,children:De($t,{size:[6.3999999999999995,5.6,.01]})})]})]})}),l=({xDir:u})=>{const d=u*3.08,p=u*(6/2-.2/2+1),m=u*(6/2-.2/2),_=Math.abs(m-p),f=(p+m)/2;return De(qo,{color:"#c0c0c0",children:Sn(gh,{children:[De($t,{size:[2.3*.8,2.95,.2],center:[d,0,.2/2]}),De($t,{size:[.2,2.95,1.14],center:[p,0,1.14/2+.2]}),De($t,{size:[_,2.95,.2],center:[f,0,.2/2+1.14]})]})})};return Sn(Ei,{children:[De(l,{xDir:1}),De(l,{xDir:-1}),c]})},G2i=()=>{const u=De(qo,{color:"#222",children:Sn(gh,{children:[De(Uo,{z:.27,children:De($t,{size:[2.9,1.9,.54]})}),Sn(ZA,{children:[De(Uo,{z:.54,children:De($t,{size:[2.9,1.9,.01]})}),De(Uo,{z:1.08,children:De($t,{size:[2.6999999999999997,1.7,.01]})})]})]})});return Sn(Ei,{children:[De($t,{color:"#ccc",size:[1,1.2,.25],center:[-1.3,0,.25/2]}),De($t,{color:"#ccc",size:[1,1.2,.25],center:[1.3,0,.25/2]}),u]})},Y2i=()=>Sn(Ei,{children:[De($t,{color:"#ccc",size:[1,.6,.12],center:[-1.3,0,.12/2]}),De($t,{color:"#ccc",size:[1,.6,.12],center:[1.3,0,.12/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[De(Uo,{z:.55/2,children:De($t,{size:[2.7,1.6,.55]})}),Sn(ZA,{children:[De(Uo,{z:.55,children:De($t,{size:[2.7,1.6,.01]})}),De(Uo,{z:1.1,children:De($t,{size:[2.7-.2,1.6-.2,.01]})})]})]})})]}),U2i=()=>Sn(Ei,{children:[De($t,{color:"#ccc",size:[1,.9,.2],center:[-1.3,0,.2/2]}),De($t,{color:"#ccc",size:[1,.9,.2],center:[1.3,0,.2/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[De(Uo,{z:.2/2,children:De($t,{size:[2.75,1.8,.2]})}),Sn(ZA,{children:[De(Uo,{z:.2,children:De($t,{size:[2.75,1.8,.01]})}),De(Uo,{z:1,children:De($t,{size:[2.75-.4,1.8-.4,.01]})})]})]})}),De($t,{color:"#777",size:[.2,1.8-.4,.01],center:[-1.3+.4,0,1]})]}),Vsn=({bodyWidth:t=2.6,bodyLength:e=1.7,bodyHeight:n=1}={})=>{const o=t,i=e*.53,r=t*.35,s=.2,a=-(o/2-.075),A=o/2-.075,c=.4,l=.1,u=n*.2;return Sn(Ei,{children:[De($t,{color:"#ccc",size:[r,i,s],center:[a,0,s/2]}),De($t,{color:"#ccc",size:[r,i,s],center:[A,0,s/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:u,children:De($t,{size:[o-l/2,e-l/2,.01]})}),De(Uo,{z:.01,children:De($t,{size:[o-l,e-l,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:u,children:De($t,{size:[o,e,.01]})}),De(Uo,{z:n,children:De($t,{size:[o-c,e-c,.01]})})]})]})}),De($t,{color:"#777",size:[s*2.7,e-c,.02],center:[a+c,0,n]})]})},K2i=({fullWidth:t=3.7,fullLength:e=1.55}={})=>{const n=t-1,o=e,i=1.175,r=.1,s=i-r,a=.55,A=.12,c=.35,l=(t-n)/2,u=.25,g=.2;return Sn(Ei,{children:[De(ns,{position:{x:-t/2,y:0,z:A/2},width:a,thickness:A,padContactLength:u,bodyDistance:l,curveLength:g,height:c}),De(ns,{rotation:Math.PI,position:{x:t/2,y:0,z:A/2},width:a,thickness:A,padContactLength:u,bodyDistance:l,curveLength:g,height:c}),De(ng,{center:{x:0,y:0,z:0},width:n,length:o,height:s,heightAboveSurface:r,includeNotch:!1,color:"#222",taperRatio:.06,straightHeightRatio:.6}),De($t,{color:"#777",size:[.45,o-.15,.02],center:[-n/4,0,i]})]})},V2i=()=>Sn(Ei,{children:[De($t,{color:"#ccc",size:[.9,1.75,.2],center:[-1.825,0,.2/2]}),De($t,{color:"#ccc",size:[.9,1.75,.2],center:[1.825,0,.2/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.2,children:De($t,{size:[3.8-.05/2,2.5-.05/2,.01]})}),De(Uo,{z:.01,children:De($t,{size:[3.8-.05,2.5-.05,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:.2,children:De($t,{size:[3.8,2.5,.01]})}),De(Uo,{z:1,children:De($t,{size:[3.8-.4,2.5-.4,.01]})})]})]})}),De($t,{color:"#777",size:[.2*2.7,2.5-.4,.02],center:[-1.825+.4,0,1]})]}),z2i=()=>Sn(Ei,{children:[De($t,{color:"#ccc",size:[.4,.25,.14],center:[-.4,0,.14/2]}),De($t,{color:"#ccc",size:[.4,.25,.14],center:[.4,0,.14/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[De(Uo,{z:.14/2,children:De($t,{size:[.8,.6,.14]})}),Sn(ZA,{children:[De(Uo,{z:.14,children:De($t,{size:[.8,.6,.01]})}),De(Uo,{z:.37,children:De($t,{size:[.8-.1,.6-.1,.01]})})]})]})})]}),zsn=({fullWidth:t=6.6,bodyWidth:e=3.5,bodyLength:n=6.5,bodyHeight:o=1.7,leadWidth:i=.7,tabLeadWidth:r=3,padPitch:s=2.3,leadHeight:a=.75}={})=>{const A=r,c=.25,l=.5,u=t-e;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:t/2+u/4,y:0,z:c/2},width:A,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ns,{position:{x:-t/2-u/4,y:0,z:c/2},width:i,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ns,{position:{x:-t/2-u/4,y:-s,z:c/2},width:i,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ns,{position:{x:-t/2-u/4,y:s,z:c/2},width:i,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ng,{center:{x:0,y:0,z:0},width:e,length:n,height:o,includeNotch:!1,taperRatio:.06,straightHeightRatio:.45})]})},J2i=()=>Sn(Ei,{children:[Array.from({length:16}).map((h,d)=>De(ns,{position:{x:-10.5/2,y:d*.5-3.75,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),Array.from({length:16}).map((h,d)=>De(ns,{rotation:Math.PI,position:{x:10.5/2,y:d*.5-3.75,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),Array.from({length:16}).map((h,d)=>De(ns,{rotation:Math.PI/2,position:{x:d*.5-3.75,y:-10.5/2,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),Array.from({length:16}).map((h,d)=>De(ns,{rotation:-Math.PI/2,position:{x:d*.5-3.75,y:10.5/2,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),De(ng,{center:{x:0,y:0,z:0},width:9,length:9,height:1.2,chamferSize:.7,taperRatio:.05,notchPosition:{x:-3.5,y:3.5,z:1.2},notchRadius:1.2/2})]}),W2i=J2i,j2i=()=>{const c=.7999999999999998;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2.05/2+c/4,y:0,z:.18/2},width:.3,thickness:.18,padContactLength:.2,bodyDistance:c,height:.65}),De(ns,{position:{x:-2.05/2-c/4,y:-.65,z:.18/2},width:.3,thickness:.18,padContactLength:.2,bodyDistance:c,height:.65}),De(ns,{position:{x:-2.05/2-c/4,y:.65,z:.18/2},width:.3,thickness:.18,padContactLength:.2,bodyDistance:c,height:.65}),De(ng,{center:{x:0,y:0,z:0},width:1.25,length:2,height:.9,includeNotch:!1,taperRatio:.06,straightHeightRatio:.7,heightAboveSurface:.05})]})};function $2i(t){const{pinCount:e,pitch:n,bodyWidth:o,bodyLength:i,bodyHeight:r,standoff:s,leadSpanX:a,leadSpanY:A,leadWidth:c,leadThickness:l,contactLength:u,taperInset:g}=t;for(const x of["pitch","bodyWidth","bodyLength","bodyHeight","leadSpanX","leadSpanY","leadWidth","leadThickness","contactLength"])if(!Number.isFinite(t[x])||t[x]<=0)throw new Error(`${x} must be finite and positive`);for(const[x,E]of Object.entries({standoff:s,taperInset:g}))if(!Number.isFinite(E)||E<0)throw new Error(`${x} must be finite and nonnegative`);if(!Number.isInteger(e)||e<8||e%4)throw new Error("pinCount must be divisible by four and at least eight");const h=r-s,d=Math.min(a-o,A-i)/2,p=(e/4-1)*n+c;if(h<=l*2||c>=n||p>=Math.min(o,i)-2*g||g*2>=Math.min(o,i)||u>=d)throw new Error("Invalid mold, lead spacing, or terminal reach");const m=s+h/2,_=Math.min(.002,h/100),f=Sn(ZA,{children:[De(Uo,{z:s+_/2,children:De($t,{size:[o-2*g,i-2*g,_]})}),De(Uo,{z:m,children:De($t,{size:[o,i,_]})}),De(Uo,{z:r-_/2,children:De($t,{size:[o-2*g,i-2*g,_]})})]}),I=Math.min(o,i)*.045,C=Math.min(.04,h/10),y=(x,E)=>{const B=x%2===0,S=x<2?-1:1,Q=B?o:i,w=(B?a:A)/2,M=Q/2-Math.min(Q/8,.15),k=w-u,R=Q/2+Math.min(.08,(d-u)/4),F=[[w-_/2,l/2],[k,l/2]];for(let U=1;U<=12;U++){const Y=U/12;F.push([k+(R-k)*Y,l/2+(m-l/2)*Y*Y*(3-2*Y)])}F.push([M,m]);const O=([U,Y])=>De(Uo,{offset:{x:B?S*U:E,y:B?E:S*U,z:Y},children:De($t,{size:B?[_,c,l]:[c,_,l]})});return De(gh,{children:F.slice(1).map((U,Y)=>Sn(ZA,{children:[O(F[Y]),O(U)]}))})};return Sn(Ei,{children:[De(qo,{color:"#353535",children:Sn(e0,{children:[f,De(Uo,{offset:{x:-o/2+g+I*2,y:i/2-g-I*2,z:r},children:De(Ns,{radius:I,height:C*2})})]})}),De(qo,{color:"#bfc1c4",children:Array.from({length:e},(x,E)=>y(Math.floor(E/(e/4)),((e/4-1)/2-E%(e/4))*n))})]})}var q2i=({pinCount:t,pitch:e,leadWidth:n,padContactLength:o,bodyWidth:i})=>{const r=t/4;if(r!==Math.floor(r))throw new Error(`LQFP pinCount must be divisible by 4, got ${t}`);e||(e=.5),o||(o=.6),n||(n=.22),i||(i=e*(r+4));const s=i,a=(r-1)*e/2,A=s+3.3*o,c=A,l=.8,u=.2,g=(c-i)/2+.4;return Sn(Ei,{children:[Array.from({length:r}).map((h,d)=>De(ns,{position:{x:-c/2-.36,y:d*e-a,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),Array.from({length:r}).map((h,d)=>De(ns,{rotation:Math.PI,position:{x:c/2+.36,y:d*e-a,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),Array.from({length:r}).map((h,d)=>De(ns,{rotation:Math.PI/2,position:{x:d*e-a,y:-A/2-.36,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),Array.from({length:r}).map((h,d)=>De(ns,{rotation:-Math.PI/2,position:{x:d*e-a,y:A/2+.36,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),De(ng,{center:{x:0,y:0,z:0},width:i,length:s,height:1.5,heightAboveSurface:.1,taperRatio:.04,chamferSize:.7,notchPosition:{x:-(s/2-1.5),y:s/2-1.5,z:1.5},notchRadius:1.5/2})]})},X2i=t=>"leadSpanX"in t?$2i(t):q2i(t),Z2i=()=>{const o=.20900000000000002,i=.1,r=.3,s=.1,a=.2;return Sn(Ei,{children:[De(qo,{color:"#222",children:Sn(gh,{children:[De($t,{size:[.85,1.2,o],center:[0,0,o/2]}),Sn(ZA,{children:[De(Uo,{z:o,children:De($t,{size:[.85,1.2,.01]})}),De(Uo,{z:.38,children:De($t,{size:[.85-i,1.2-i,.01]})})]})]})}),De($t,{color:"#ccc",size:[r,.25,s],center:[.55,0,s/2]}),De($t,{color:"#ccc",size:[r,a,s],center:[-.55,.4,s/2]}),De($t,{color:"#ccc",size:[r,a,s],center:[-.55,-.4,s/2]})]})},Jsn=({num_pins:t,bodyWidth:e=5.3,bodyLength:n=5.3,bodyThickness:o=1,thermalPadSize:i,padWidth:r=n/5.3*.6,padLength:s=n/5.3*1,pitch:a=.5,thermalPadThickness:A=.2,bodyStyle:c="chamfered",standoff:l=0,terminalInset:u=0,terminalThickness:g=A,pin1TerminalChamfer:h=0,pin1MarkWidth:d=0})=>{if(c==="rectangular"){if(!Number.isInteger(t)||t<2||t%2!==0)throw new Error("DFN requires an even pin count of at least two");for(const f of[e,n,o,r,s,a,g])if(!Number.isFinite(f)||f<=0)throw new Error("DFN dimensions must be finite and positive");for(const f of[l,u,h,d])if(!Number.isFinite(f)||f<0)throw new Error("DFN offsets must be finite and nonnegative");if(g<=l||g>l+o||u+s>=e/2||(t/2-1)*a+r>n||t>2&&r>=a||h>=Math.min(s,r/2)||d>=e/4)throw new Error("DFN dimensions leave disconnected or overlapping terminals")}const p=[],m=Math.floor(t/2),_=a*(m-1);for(let f=0;f<t;f++){const I=f<m?"left":"right",C=f%m,y=_/2-C*a,x=s,E=r,B=I==="left"?-e/2+x/2+u:e/2-x/2-u,S=f+1;p.push({pinNumber:S,x:B,y,padSizeX:x,padSizeY:E})}if(c==="rectangular"){const f=l+o,I=Math.min(o,n)/100,C=De($t,{size:[d,n*.8,I],center:[-e/2+d*1.5,0,f-I/2]}),y=De($t,{size:[e,n,o],center:[0,0,l+o/2]});return Sn(Ei,{children:[De(qo,{color:"#25272a",children:d>0?Sn(e0,{children:[y,C]}):y}),De(qo,{color:"#c7c9cd",children:p.map(x=>x.pinNumber===1&&h>0?Sn(ZA,{children:[De($t,{size:[s-h,r,g],center:[x.x+h/2,x.y,g/2]}),De($t,{size:[s,r-2*h,g],center:[x.x,x.y,g/2]})]},x.pinNumber):De($t,{size:[x.padSizeX,x.padSizeY,g],center:[x.x,x.y,g/2]},x.pinNumber))}),i&&De($t,{color:"#c7c9cd",size:[i.width,i.length,A],center:[0,0,A/2]}),d>0&&De(qo,{color:"#969997",children:C})]})}return Sn(Ei,{children:[De(ng,{center:{x:0,y:0,z:0},width:e,length:n,height:o,heightAboveSurface:0,color:"grey",chamferSize:.2,taperRatio:0,notchPosition:{x:-(e/2-s),y:n/2-s,z:o}}),p.map((f,I)=>De($t,{center:[f.x,f.y,A/2],size:[f.padSizeX,f.padSizeY,A]})),i?.length!==void 0&&i?.width!==void 0&&De($t,{center:[0,0,A/2],size:[i.width,i.length,A]})]})},exi=({bodyLength:t=10.2,bodyWidth:e=4.65,bodyHeight:n=13.46,leadSpacing:o=5,leadDiameter:i=.8,leadLength:r=12.7,color:s="#ddd",leadColor:a="#b87333"})=>{const A=t/2,c=e/2,l=A-c,u=o/2,g=.85;return Sn(Ei,{children:[Sn(qo,{color:s,children:[Sn(ZA,{children:[De(a2,{height:n,roundRadius:.5,radius:c,center:[-l,0,n]}),De(a2,{height:n,roundRadius:.5,radius:c,center:[l,0,n]})]}),Sn(ZA,{children:[De(a2,{height:g,roundRadius:.1,radius:c+.85,center:[-l,0,n/2+g/2]}),De(a2,{height:g,roundRadius:.1,radius:c+.85,center:[l,0,n/2+g/2]})]})]}),Sn(qo,{color:a,children:[De(Ns,{height:r+n/2,radius:i/2,center:[-u+.06,0,-(r/2)+n/2]}),De(Ns,{height:r+n/2,radius:i/2,center:[u-.06,0,-(r/2)+n/2]})]})]})},txi=({bodyLength:t=1.4,bodyDiameter:e=1.1,color:n="#3a3a3aff",contactColor:o="#c6c6c6",cathodeIdentification:i="#111"})=>Sn(Ei,{children:[De(qo,{color:n,children:Sn(Ac,{rotation:[0,"90deg",0],children:[De(A1,{size:[e,e,t-.2],roundRadius:.2,center:[-e/2,0,.05]}),De(Ns,{height:.2/2,radius:e/2-.2,center:[-e/2,0,-t/2+.2/2]})]})}),De(qo,{color:i,children:De(Ac,{rotation:[0,"90deg",0],children:De(A1,{size:[e*1.01,e*1.01,t/3],roundRadius:.2,center:[-e/2,0,-t/4+.1]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:.2,radius:e/2,roundRadius:.2/3,center:[-e/2,0,-t/2]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:.2,radius:e/2,roundRadius:.2/3,center:[-e/2,0,t/2]})})})]}),Wsn=({bodyLength:t=3.5,bodyDiameter:e=1.5,color:n="#202020",contactColor:o="#c6c6c6",bandColor:i="#f2f2f2"})=>{const s=t-.8+.04,a=(t-.4)/2,A=e/2+.02,c=.14,l=-t/2+.4+.35;return Sn(Ei,{children:[De(qo,{color:n,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:s,radius:e/2,roundRadius:.05,center:[-e/2,0,0]})})}),De(qo,{color:i,children:De(Ac,{rotation:[0,"90deg",0],children:De(Ns,{height:c,radius:e/2+.002,center:[-e/2,0,l]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:.4,radius:A,roundRadius:.04,center:[-e/2,0,-a]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:.4,radius:A,roundRadius:.04,center:[-e/2,0,a]})})})]})},nxi=({bodyLength:t=3.9,bodyDiameter:e=2.5,color:n="#3a3a3aff",contactColor:o="#c6c6c6"})=>Sn(Ei,{children:[De(qo,{color:n,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:t,radius:e/2,roundRadius:.3,center:[-e/2,0,0]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:.55,radius:e/2,roundRadius:.2,center:[-e/2,0,-t/2]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,"90deg",0],children:De(a2,{height:.55,radius:e/2,roundRadius:.2,center:[-e/2,0,t/2]})})})]}),oxi=({pinCount:t,padContactLength:e=.6,leadWidth:n=.41,pitch:o=1.27})=>{if(t%2!==0)throw new Error("MS012 pinCount must be even");const i=t/2,r=4.9,s=3.9,a=(i-1)*o/2,A=.2;return Sn(Ei,{children:[Array.from({length:i}).map((c,l)=>De(ns,{position:{x:-s/2-e-.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),Array.from({length:i}).map((c,l)=>De(ns,{rotation:Math.PI,position:{x:s/2+e+.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),De(ng,{center:{x:0,y:0,z:A/2},width:s,length:r,height:1.55,notchPosition:{x:-.95,y:r/2-1,z:1.55},heightAboveSurface:.17,taperRatio:.09})]})},ixi=({pinCount:t=16,padContactLength:e=.6,leadWidth:n=.41,pitch:o=1.27})=>{if(t!==16)throw new Error("MS013 only supports 16 pins");const i=t/2,r=7.5,s=10.3,a=(i-1)*o/2,A=.2;return Sn(Ei,{children:[Array.from({length:i}).map((c,l)=>De(ns,{position:{x:-r/2-e-.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),Array.from({length:i}).map((c,l)=>De(ns,{rotation:Math.PI,position:{x:r/2+e+.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),De(ng,{center:{x:0,y:0,z:A/2},width:r,length:s,height:1.1,notchPosition:{x:-2.25,y:s/2-1.5,z:1.1},heightAboveSurface:.17,taperRatio:.05})]})},rxi=[{x:-2.54,y:-1},{x:0,y:-1},{x:2.54,y:-1}],jsn=({mouldedTab:t=!1,leads:e=rxi,bodyWidth:n=10,bodyThickness:o=4.5,bodyHeight:i=9.2,tabHeight:r=6.4,tabThickness:s=1.4,mountingHoleDiameter:a=3.6,standoff:A=3,leadLength:c=3,bodyColor:l="#222",tabColor:u="#ccc",leadColor:g="#d4b106"}={})=>{const h=e.reduce((x,E)=>x+E.x,0)/e.length,d=e.reduce((x,E)=>x+E.y,0)/e.length,p=A,m=p+i,_=m+r,f=d+(o-s)/2,I=_-Math.max(a*.8,2.6),C=.8,y=.5;return Sn(Ei,{children:[De(qo,{color:l,children:De($t,{size:[n,o,i],center:[h,d,p+i/2]})}),De(qo,{color:t?l:u,children:Sn(e0,{children:[De($t,{size:[n,s,r],center:[h,f,m+r/2]}),De(Ac,{rotation:["90deg",0,0],children:De(Uo,{center:[h,I,-f],children:De(Ns,{radius:a/2,height:s*3})})})]})}),e.map(x=>De(qo,{color:g,children:De($t,{size:[C,y,A+c],center:[x.x,x.y,(A-c)/2]})},`lead-${x.x}-${x.y}`))]})},sxi=()=>{const c=1.1999999999999997;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2.8/2+c/4,y:-.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{rotation:Math.PI,position:{x:2.8/2+c/4,y:0,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{rotation:Math.PI,position:{x:2.8/2+c/4,y:.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{position:{x:-2.8/2-c/4,y:0,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{position:{x:-2.8/2-c/4,y:-.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{position:{x:-2.8/2-c/4,y:.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ng,{center:{x:0,y:0,z:0},width:1.6,length:2.9,height:1.2,straightHeightRatio:.6,notchPosition:{x:-.4,y:1.2/2+.4,z:1.2+.05},notchRadius:.1})]})},axi=()=>Sn(Ei,{children:[De(ng,{center:{x:0,y:0,z:0},width:.8,length:1,height:.37,heightAboveSurface:0,color:"#1a1a1a",taperRatio:.15,straightHeightRatio:0,notchPosition:{x:-.8/4,y:.7/2.2,z:.37+.1}}),[0,1,2].map(c=>{const l=-.35+c*.35;return De($t,{center:[-.8/2+.19/2-.1,l,.12/2],size:[.19,.15,.12]})}),[0,1,2].map(c=>{const l=-.35+c*.35;return De($t,{center:[.8/2-.19/2+.1,l,.12/2],size:[.19,.15,.12]})})]}),Axi=[{x:-1.27,y:.98},{x:0,y:2.25},{x:1.27,y:.98}],cxi=t=>{let e=[t[0],t[t.length-1]],n=-1;for(let o=0;o<t.length;o++)for(let i=o+1;i<t.length;i++){const r=Math.hypot(t[o].x-t[i].x,t[o].y-t[i].y);r>n&&(n=r,e=[t[o],t[i]])}return{outer:e,separation:n}},$sn=({bodyDiameter:t=4.8,bodyHeight:e=4.5,flatCut:n=1.1,leads:o=Axi,standoff:i=1.5,leadLength:r=3,bodyColor:s="#222"}={})=>{const a=t/2,A=.4,c=.25,{outer:l,separation:u}=cxi(o),[g,h]=l,d={x:(g.x+h.x)/2,y:(g.y+h.y)/2},p=Math.max(u,.001),m={x:(h.x-g.x)/p,y:(h.y-g.y)/p},_=u/2,f=C=>{const y=(C-(o.length-1)/2)*_;return{x:d.x+m.x*y,y:d.y+m.y*y}},I=[c,A,c];return Sn(Ei,{children:[De(qo,{color:s,children:Sn(e0,{children:[De(Uo,{center:[d.x,d.y,i+e/2],children:De(Ns,{radius:a,height:e})}),De(Uo,{center:[d.x,d.y-(a-n/2),i+e/2],children:De($t,{size:[a*2,n,e+.2]})})]})}),o.map((C,y)=>{const x=f(y);return Sn(Uo,{center:[0,0,0],children:[Sn(ZA,{children:[De(Uo,{center:[C.x,C.y,0],children:De($t,{size:I})}),De(Uo,{center:[x.x,x.y,i],children:De($t,{size:I})})]}),De(Uo,{center:[C.x,C.y,-r/2],children:De($t,{size:[c,A,r]})})]},`lead-${C.x}-${C.y}`)})]})},lxi=()=>Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2/2+.75/4,y:-.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{rotation:Math.PI,position:{x:2/2+.75/4,y:0,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{rotation:Math.PI,position:{x:2/2+.75/4,y:.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{position:{x:-2/2-.75/4,y:0,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{position:{x:-2/2-.75/4,y:-.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{position:{x:-2/2-.75/4,y:.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ng,{center:{x:0,y:0,z:0},width:1.25,length:2,height:1.1,straightHeightRatio:.6,notchPosition:{x:-.375,y:1.1/2+.2,z:1.1},heightAboveSurface:.1})]}),uxi=lxi,gxi=()=>Sn(Ei,{children:[De(ng,{center:{x:0,y:0,z:.05},width:1,length:1.45,height:.5,heightAboveSurface:0,color:"#1a1a1a",taperRatio:0,includeNotch:!1}),[0,1,2].map(a=>{const A=-.5+a*.5;return De($t,{center:[-1/2+.3/2,A,.05/2],size:[.3,.2,.05]})}),[0,1,2].map(a=>{const A=-.5+a*.5;return De($t,{center:[1/2-.3/2,A,.05/2],size:[.3,.2,.05]})})]}),qsn=()=>Sn(Ei,{children:[De(ns,{position:{x:-2.5/2,y:0,z:.175/2},width:.3,thickness:.175,padContactLength:.3,bodyDistance:.45,height:.7}),De(ns,{rotation:Math.PI,position:{x:2.5/2,y:0,z:.175/2},width:.3,thickness:.175,padContactLength:.3,bodyDistance:.45,height:.7}),De(qo,{color:"#222",children:De(ng,{center:{x:0,y:0,z:0},width:1.8,length:1.4,height:.95,includeNotch:!1,taperRatio:.06,straightHeightRatio:.7,heightAboveSurface:.05})}),De($t,{color:"#777",size:[1.8/3,1.4-.075,.02],center:[-.9*2/3+.035,0,.95+.05]})]}),dxi=()=>Sn(Ei,{children:[De($t,{color:"#ccc",size:[.4,.325,.175],center:[-1.05,0,.175/2]}),De($t,{color:"#ccc",size:[.4,.325,.175],center:[1.05,0,.175/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[De(Uo,{z:.175/2,children:De($t,{size:[1.7,1.25,.175]})}),Sn(ZA,{children:[De(Uo,{z:.175,children:De($t,{size:[1.7,1.25,.01]})}),De(Uo,{z:.725,children:De($t,{size:[1.7-.2,1.25-.2,.01]})})]})]})}),De($t,{color:"#777",size:[1.7/3,1.25-.2,.02],center:[-1.05+1.7/4.4+.2,0,.725]})]}),hxi=()=>{const s=-1.0474999999999999,a=1.775/2+.4/2-.04;return Sn(Ei,{children:[De($t,{color:"#ccc",size:[.4,.325,.13],center:[s,0,.13/2]}),De($t,{color:"#ccc",size:[.4,.325,.13],center:[a,0,.13/2]}),De(qo,{color:"#222",children:De(ng,{width:1.775,length:1.25,height:.725,center:{x:0,y:0,z:0},heightAboveSurface:0,straightHeightRatio:.7,taperRatio:.06,includeNotch:!1})}),De($t,{color:"#777",size:[1.775/3,1.25-.05,.02],center:[s+1.775/4.4+.2,0,.725]})]})},pxi=({pitch:t=10})=>Sn(Ei,{children:[De(Ns,{height:4,radius:.5,center:[-t/2,0,.5]}),De(TY,{radius:.5,center:[-t/2,0,2.5]}),De(Uo,{x:-2.5,y:0,z:2.5,children:Sn(Ac,{rotation:[0,Math.PI/2,0],children:[De(Ns,{height:t,radius:.5,center:[0,0,2.5]}),De(qo,{color:"#d2b48c",children:De(Ns,{height:5,radius:1.3,center:[0,0,2.5]})})]})}),De(Ns,{height:4,radius:.5,center:[t/2,0,.5]}),De(TY,{radius:.5,center:[t/2,0,2.5]})]}),mxi=({bodyWidth:t=21,boardThickness:e=.5,leadWidth:n=1.6,leadLength:o=2.4,leadsPitch:i=2.54,leadsLeft:r,leadsRight:s,leadsTop:a,leadsBottom:A,innerHoles:c=!0,innerHoleEdgeDistance:l=1.61,innerHoleDiameter:u=1})=>{const g=t/2,h=e/2,d=e*1.05,p=u/2,m=Math.max(r||0,s||0,a||0,A||0)*i||51,_=[],f=[];if(s){const x=-((s-1)/2)*i;for(let E=0;E<s;E++){const B=x+E*i;_.push({x:g-o/2,y:-B,pl:o,pw:n}),c&&f.push({x:g,y:-B},{x:g-l,y:-B})}}if(r){const x=-((r-1)/2)*i;for(let E=0;E<r;E++){const B=x+E*i;_.push({x:-g+o/2,y:-B,pl:o,pw:n}),c&&f.push({x:-g,y:-B},{x:-g+l,y:-B})}}if(a){const x=-((a-1)/2)*i;for(let E=0;E<a;E++){const B=x+E*i;_.push({x:-B,y:m/2-o/2,pl:n,pw:o}),c&&f.push({x:-B,y:m/2},{x:-B,y:m/2-l})}}if(A){const x=-((A-1)/2)*i;for(let E=0;E<A;E++){const B=x+E*i;_.push({x:-B,y:-m/2+o/2,pl:n,pw:o}),c&&f.push({x:-B,y:-m/2},{x:-B,y:-m/2+l})}}const I=De(qo,{color:"#051a0a",children:Sn(e0,{children:[De($t,{center:[0,0,h],size:[t,m,e]}),_.map((x,E)=>De($t,{center:[x.x,x.y,h],size:[x.pl+.01,x.pw+.01,d]},E))]})}),C=c&&f.map((x,E)=>De(Ns,{color:"black",center:[x.x,x.y,h],radius:p,height:e*1.07})),y=_.map((x,E)=>De($t,{center:[x.x,x.y,h],size:[x.pl+.01,x.pw+.01,d]}));return Sn(Ei,{children:[I,De(qo,{color:"#FFD700",children:c?Sn(e0,{children:[De(gh,{children:_.map((x,E)=>De($t,{center:[x.x,x.y,h],size:[x.pl+.01,x.pw+.01,d]},E))}),C]}):y})]})},Xsn=({width:t=30,height:e=22,thickness:n=1,bezelInset:o=2,bezelDepth:i=1,screenColor:r="#001414",bezelColor:s="#0f1116",screenWidth:a,screenHeight:A,offset:c})=>{const l=t,u=e,g=Math.max(n,.4),h=Math.max(Math.min(i,g),.2),d=Math.max(g-h,0),p=Math.max(o,0),m=Math.max(a??l-p*2,2),_=Math.max(A??u-p*2,2),f=Math.min(Math.max(h*.6,.2),h),I=c?.x??0,C=c?.y??0,y=c?.z??0;return Sn(Uo,{offset:{x:I,y:C,z:y},children:[d>0&&De(qo,{color:s,children:De($t,{size:[l,u,d],offset:[0,0,d/2]})}),De(qo,{color:s,children:Sn(e0,{children:[De($t,{size:[l,u,h],offset:[0,0,d+h/2]}),De($t,{size:[m,_,h+.02],offset:[0,0,d+h/2]})]})}),De(qo,{color:r,children:De($t,{size:[m,_,f],offset:[0,0,d+f/2]})})]})},_xi=({numPins:t=5,rows:e=1,p:n=2.54,id:o=1,od:i=1.5,boardThickness:r=1.6,width:s,height:a,pinRowSide:A="left",holes:c=[],holeInset:l=1,pinRowHoleEdgeToEdgeDist:u=2,female:g,nopin:h,screen:d,screenWidth:p,screenHeight:m,screenCenterOffsetX:_,screenCenterOffsetY:f})=>{const I=d??!1,C=r/2,y=Math.ceil(t/e);let x,E;A==="left"||A==="right"?(x=(e-1)*n+2*u,E=(y-1)*n+2*u):(E=(e-1)*n+2*u,x=(y-1)*n+2*u),t===0&&(x=10,E=10);const B=Number(s??x),S=Number(a??E),Q=[];let w=0,M=0,k=0,R=0,F=0,O=0;A==="left"||A==="right"?(w=A==="left"?-B/2+u:B/2-u,M=-((y-1)/2)*n,k=0,R=n,F=A==="left"?n:-n,O=0):(w=-((y-1)/2)*n,M=A==="top"?S/2-u:-S/2+u,k=n,R=0,F=0,O=A==="top"?-n:n);let U=0;for(let ue=0;ue<e&&U<t;ue++)for(let fe=0;fe<y&&U<t;fe++){const pe=w+fe*k+ue*F,ye=M+fe*R+ue*O;Q.push({x:pe,y:ye}),U++}const Y=[];if(c)for(const ue of c){let fe=0,pe=0;ue==="topleft"?(fe=-B/2+l,pe=S/2-l):ue==="topright"?(fe=B/2-l,pe=S/2-l):ue==="bottomleft"?(fe=-B/2+l,pe=-S/2+l):ue==="bottomright"?(fe=B/2-l,pe=-S/2+l):ue==="center"&&(fe=0,pe=0),Y.push({x:fe,y:pe})}const W=.63,te=2,j=6,J=3,oe=h||g?0:te,ie=oe+r,ne=De(qo,{color:"#008080",children:Sn(e0,{children:[De($t,{center:[0,0,C+oe],size:[B,S,r]}),Y.map((ue,fe)=>De(Ns,{center:[ue.x,ue.y,C+oe],radius:i/2,height:r},`hole-${fe}`)),Q.map((ue,fe)=>De(Ns,{center:[ue.x,ue.y,C+oe],radius:i/2,height:r},`pin-hole-${fe}`))]})}),le=Q.map((ue,fe)=>De(qo,{color:"#FFD700",children:Sn(e0,{children:[De(Ns,{center:[ue.x,ue.y,r/2+oe],radius:i/2,height:r}),De(Ns,{center:[ue.x,ue.y,r/2+oe],radius:o/2,height:r})]})})),ge=Q.map((ue,fe)=>De(Dsn,{x:ue.x,y:ue.y,pinThickness:W,shortSidePinLength:J,longSidePinLength:j,bodyHeight:te,flipZ:pe=>pe})),_e=Q.map((ue,fe)=>De(Ysn,{x:ue.x,y:ue.y,flipZ:pe=>-pe}));return Sn(Ei,{children:[ne,le,!g&&!h&&ge,g&&_e,I&&De(Xsn,{width:p??B*.8,height:m??S*.6,offset:{x:_??0,y:f??0,z:ie}})]})},fxi=()=>{const s=.8999999999999999,a=-s/2+.5/2-.15,A=s/2-.5/2+.15,c=.2,l=.5*.24;return Sn(Ei,{children:[De($t,{color:"#ccc",size:[.5,.28,.12],center:[a,0,.12/2]}),De($t,{color:"#ccc",size:[.5,.28,.12],center:[A,0,.12/2]}),De(qo,{color:"#222",children:Sn(gh,{children:[De(Uo,{z:l/2,children:De($t,{size:[s,.6,l]})}),Sn(ZA,{children:[De(Uo,{z:l,children:De($t,{size:[s,.6,.01]})}),De(Uo,{z:.5,children:De($t,{size:[s-c,.6-c,.01]})})]})]})}),De($t,{color:"#777",size:[1.4/6,.6-c,.02],center:[-s/4,0,.5]})]})},Ixi=fxi,Cxi=({numPins:t=7,showPins:e=!0,showFootprint:n=!0,bodyColor:o="#f5f5f5",pinColor:i="#635959"})=>{const c=3.5999999999999996,l=6,u=(t-1)*1.5+4,g=-((t-1)*1.5)/2;return Sn(Ei,{children:[De(Uo,{offset:[0,0,6],children:De(Ac,{angles:[Math.PI,0,0],children:De(qo,{color:o,children:Sn(e0,{children:[De($t,{size:[u,3.5,6],center:[0,0,6/2]}),De($t,{size:[u-.5*2,3.5-.5*2,c],center:[0,0,c/2]}),De($t,{size:[u,3.5/3,c],center:[0,0,c/6]}),De($t,{size:[u-.5*2,.5/2,c],center:[0,3.5/2-.5/4,c/2]}),De($t,{size:[u-.5*2,.5/2,c],center:[0,-3.5/2+.5/4,c/2]}),De($t,{size:[1,.5+2,1],center:[-u/4,3.5/2,6/2]}),De($t,{size:[1,.5+3,1],center:[u/4,3.5/2,6/2]}),De($t,{size:[1,.5+2,1],center:[-u/4,-3.5/2,6/2]}),De($t,{size:[1,.5+3,1],center:[u/4,-3.5/2,6/2]})]})})})}),e&&Array.from({length:t}).map((h,d)=>De(qo,{color:i,children:De(Ns,{height:l,radius:.35,center:[g+d*1.5,0,2.5]})})),n&&Array.from({length:t}).map((h,d)=>{const p=d===0,m=p?{type:"pcb_plated_hole",pcb_plated_hole_id:`jstzh_${d}`,shape:"circular_hole_with_rect_pad",x:g+d*1.5,y:0,hole_diameter:.73,rect_pad_width:1.03,rect_pad_height:1.73,hole_shape:"circle",pad_shape:"rect",layers:["top","bottom"],port_hints:[`${d+1}`]}:{type:"pcb_plated_hole",pcb_plated_hole_id:`jstzh_${d}`,shape:"pill",x:g+d*1.5,y:0,hole_height:.73,hole_width:.73,outer_height:1.73,outer_width:1.03,layers:["top","bottom"],port_hints:[`${d+1}`]};return De(tze,{hole:m,isPin1:p})})]})},yxi=({numPins:t=2,showPins:e=!0,showFootprint:n=!0,bodyColor:o="#f5f5f5",pinColor:i="#635959"})=>{const c=3.5999999999999996,l=3.4,u=5.5,g=.5,h=l+u,d=(t-1)*2+3.9,p=-((t-1)*2)/2,m=1,_=1.8,f=.7,I=.8,C=.65;return Sn(Ei,{children:[De(Uo,{offset:[0,0,6],children:De(Ac,{angles:[Math.PI,0,0],children:De(qo,{color:o,children:Sn(e0,{children:[De($t,{size:[d,4.5,6],center:[0,0,6/2]}),De($t,{size:[d-.5*2,4.5-.5*2,c],center:[0,0,c/2]}),De($t,{size:[d,4.5/3,c],center:[0,0,c/6]}),De($t,{size:[d-.5*2,.5/2,c],center:[0,4.5/2-.5/4,c/2]}),De($t,{size:[d-.5*2,.5/2,c],center:[0,-4.5/2+.5/4,c/2]}),De($t,{size:[m,4.5+.5,_],center:[-d/2+f,0,6/2]}),De($t,{size:[m,4.5+.5,_],center:[d/2-f,0,6/2]}),De($t,{size:[.5*3,I,C],center:[-d/2,0,C/2]}),De(Uo,{offset:[-d/2,0,C],children:De(Ac,{angles:[0,Math.PI/2,0],children:De(Ns,{height:.5*3,radius:I/2})})}),De($t,{size:[.5*3,I,C],center:[d/2,0,C/2]}),De(Uo,{offset:[d/2,0,C],children:De(Ac,{angles:[0,Math.PI/2,0],children:De(Ns,{height:.5*3,radius:I/2})})})]})})})}),e&&Array.from({length:t}).map((y,x)=>De(qo,{color:i,children:De($t,{size:[g,g,h],center:[p+x*2,0,(u-l)/2]})})),n&&Array.from({length:t}).map((y,x)=>{const E=x===0,B=E?{type:"pcb_plated_hole",pcb_plated_hole_id:`jstph_${x}`,shape:"circular_hole_with_rect_pad",x:p+x*2,y:0,hole_diameter:.73,rect_pad_width:1.2,rect_pad_height:1.2,hole_shape:"circle",pad_shape:"rect",layers:["top","bottom"],port_hints:[`${x+1}`]}:{type:"pcb_plated_hole",pcb_plated_hole_id:`jstph_${x}`,shape:"pill",x:p+x*2,y:0,hole_height:.73,hole_width:.73,outer_height:1.2,outer_width:1.2,layers:["top","bottom"],port_hints:[`${x+1}`]};return De(tze,{hole:B,isPin1:E})})]})},xxi=({numPins:t=4,showPins:e=!0,showFootprint:n=!0,bodyColor:o="#f8fafc",pinColor:i="#635959"})=>{const g=(t-1)*2.5+4.9,h=-((t-1)*2.5)/2,d=.8,p=.85+.2,m=3.5,_=g/2-1.3,f=Math.min(g-3.4,Math.max(3,(t-1)*2.5*.4+2.2)),I=2.4;return Sn(Ei,{children:[De(Uo,{offset:[0,0,7/2],children:De(qo,{color:o,children:Sn(e0,{children:[De($t,{size:[g,5.75,7]}),De(Uo,{offset:[0,0,(7-5.35)/2+.1],children:De($t,{size:[g-.85*2,5.75-.85*2,5.35+.2]})}),De(Uo,{offset:[0,-5.75/2+.85/2,7/2-I/2+.1],children:De($t,{size:[f,.85+.2,I+.2]})}),De(Uo,{offset:[-_,-5.75/2+.85/2,7/2-m/2+.1],children:De($t,{size:[d,p,m+.2]})}),De(Uo,{offset:[_,-5.75/2+.85/2,7/2-m/2+.1],children:De($t,{size:[d,p,m+.2]})}),Array.from({length:t}).map((C,y)=>De(Uo,{offset:[h+y*2.5,-5.75/2+.3,-7/2+.25],children:De($t,{size:[1,.8,.5]})},`vent_${y}`))]})})}),e&&Array.from({length:t}).map((C,y)=>De(qo,{color:i,children:De(Uo,{offset:[h+y*2.5,0,8.75/2-3.4],children:De($t,{size:[.64,.64,8.75]})})})),n&&(()=>{try{return pI.string(`jst${t}_xh`).circuitJson().filter(x=>x.type==="pcb_plated_hole").map((x,E)=>De(tze,{hole:x,isPin1:E===0},`footprint_${E}`))}catch{return null}})()]})};function Zsn(t){const e=pI.string(t).json();return e.fn!=="jst"?!1:!!(e.sh||e.smd&&Math.abs(Ua(e.p)-1)<.01&&Math.abs(Ua(e.mpx??0)-(e.num_pins-1+2.6))<.15&&Math.abs(Ua(e.mpy??0)-2.525)<.15)}var Exi=({footprint:t="jst6_sh"})=>{if(!Zsn(t))throw new Error("JstSh requires a named SH or matching 1mm SH top-entry footprint");const e=t.replace(/_pin1location\([^)]*\)/g,""),n=pI.string(e).json(),o=pI.string(e).circuitJson().filter(_=>_.type==="pcb_smtpad"&&_.shape==="rect"),i=pI.string(t).circuitJson().filter(_=>_.type==="pcb_smtpad"&&(_.shape==="rect"||_.shape==="rotated_rect")),r=n.num_pins;if(!Number.isInteger(r)||r<2||r>20||o.length!==r+2)throw new Error("JstSh requires 2–20 contacts and two hold-down pads");const s=o.slice(0,r),a=o.slice(r),A=Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)-Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x),c=s.reduce((_,f)=>_+f.x,0)/r,l=s[0].y,u=a[0].y>l?1:-1,g=l+u*1.8,h=r+2,d=2.9,p=4.2,m=g-u*.25;return Sn(Ac,{rotation:[0,0,A],children:[De(qo,{color:"#e4e1d6",children:Sn(e0,{children:[De($t,{size:[h,d,p],center:[c,g,p/2+.05]}),De($t,{size:[h-1.3,1.8,p],center:[c,g,p/2+.8]}),a.map((_,f)=>De($t,{size:[.7,_.height*.8,1.5],center:[_.x,_.y,.75]},`recess-${f}`)),[-1,1].map(_=>De($t,{size:[.55,.6,1],center:[c+_*(h/2-.9),g+u*d/2,4]},_))]})}),Sn(qo,{color:"#c6c7c9",children:[s.map((_,f)=>{const I=_.y-u*_.height*.4;return Sn(gh,{children:[De($t,{size:[.2,Math.abs(m-I)+.1,.2],center:[_.x,(m+I)/2,.1]}),De($t,{size:[.2,.2,3.45],center:[_.x,m,1.725]})]},f)}),a.map((_,f)=>Sn(gh,{children:[De($t,{size:[.7,_.height*.75,.2],center:[_.x,_.y,.1]}),De($t,{size:[.2,_.height*.6,1.35],center:[_.x,_.y,.675]})]},`mount-${f}`))]})]})},Bxi=([t,e],n,o,i,r)=>{const s=Math.sign(t),a=Math.sign(e),A=n/2,c=o/2,l=r?Math.min(.32,o*.36):0,u=Math.min(i,A,c),g=[[-A,-c],[A,-c],[A,c-u],[A-u,c],[-A,c]];l&&(g[0]=[-A+l,-c],g.push([-A,-c+l]));const h=g.map(([d,p])=>[t+d*s,e+p*a]);return s*a<0?h.reverse():h},yze=({width:t,length:e,radius:n,height:o,z:i})=>{const r=t/2-n,s=e/2-n;return[[-r,-s],[r,-s],[r,s],[-r,s]].map(([a,A],c)=>De(Ns,{center:[a,A,i+o/2],height:o,radius:n}))},bxi=({horizontalPadPitch:t=2.2,verticalPadPitch:e=1.7,padWidth:n=1.4,padHeight:o=1.2,bodyHeight:i=.7})=>{const r=t+n*.7142857142857143,s=e+o*(2/3),a=Math.min(.01,i*.02),A=n*(5/7),c=o*.75,l=i*(5/7),u=l-a,g=i*(2/35),h=r*.95,d=s*.94,p=r*.905,m=s*.9,_=r*.83,f=s*.82,I=l+g,C=Math.min(.01,i*.015),y=Math.min(.12,s*.05),x=(r-A)/2,E=(s-c)/2,B=[[-x,-E],[x,-E],[x,E],[-x,E]],S=yze({width:h,length:d,radius:Math.min(.13,d*.08),height:g,z:l}),Q=[...yze({width:p,length:m,radius:Math.min(.14,m*.08),height:C,z:I}),...yze({width:_,length:f,radius:Math.min(.15,f*.09),height:C,z:i-C})];return Sn(Ei,{children:[B.map((w,M)=>De(qo,{color:"#d6a258",children:De(FY,{height:a,children:De(kY,{points:Bxi(w,A,c,y,M===0)})})})),De(ng,{center:{x:0,y:0,z:a},width:r,length:s,height:u-.005,heightAboveSurface:0,color:"#34343d",taperRatio:0,straightHeightRatio:1,includeNotch:!1,chamferSize:y}),De(qo,{color:"#d2a057",children:De(ZA,{children:S})}),De(qo,{color:"#b9bec2",children:De(ZA,{children:Q})})]})},Sxi="#303339",Qpe="#1f2227",ean="#eee8d8",tan="#f8f3e7",xze="#b7bdc2",Qxi="#d2d6d9",vxi="#767d82",wxi="#9ba1a5",Pxi=({pinCount:t=12,pitch:e=.5,padWidth:n=.3,padLength:o=1.25,staggered:i=!1,reverse:r=!1,rowPitch:s=2.4,topPadLength:a=o,bottomPadLength:A=o,mountPadPitchX:c,mountPadOffsetY:l=2.575,mountTop:u=!1,mountPadWidth:g=2,mountPadLength:h=2.5})=>{const d=Math.max((t-1)*e,e),p=-d/2,m=c??d+(i?3.5:3.38),_=l===0?0:(u?1:-1)*l,f=Array.from({length:t},(Ce,Le)=>{const Ye=i&&Le%2===1!==r,tt=i?Ye?s/2:-s/2:0,At=Ye?a:A;return{index:Le,x:p+Le*e,y:tt,length:At}}),I=Math.max(...f.map(Ce=>Ce.y+Ce.length/2)),C=Math.min(...f.map(Ce=>Ce.y-Ce.length/2)),y=_-h/2,x=_+h/2,E=u?C:I,B=u?Math.max(x,I)+.67:Math.min(y,C)-.67,S=u?-1:1,Q=E-S*Math.max(o*.86,1.05),w=B+S*.22,M=Math.abs(Q-w),k=(Q+w)/2,R=w-S*.01,F=Math.max(d+4.9,m+g*.76),O=Math.min(F-2.3,d+1.1),U=.3,Y=1.42,W=2,te=Math.min(.92,M*.28),j=R+S*(te/2-.04),J=1.6,oe=1.1,ie=Math.max(M-.78,1.5),ne=R+S*(ie/2+.68),le=F-.72,ge=.34,_e=W-ge/2,ue=R+S*Math.min(.68,M*.22),fe=1.48,pe=Math.max(n*.82,.15),ye=E,Me=Math.abs(ye-Q),ve=(ye+Q)/2,he=Math.max(te*.8,.5),Qe=R+S*(he/2+.08),Pe=m/2,we=.75,Te=F/2-.04,Re=F/2-.23,Ee=F/2-.32,ke=.68;return Sn(Ei,{children:[[-1,1].map(Ce=>De($t,{color:xze,center:[Ce*Pe,_,.07],size:[g,h,.14]})),f.map(Ce=>De($t,{color:xze,center:[Ce.x,ve,.065],size:[pe,Me,.13]},`terminal:${Ce.index}`)),De(A1,{color:Qpe,center:[0,k,U/2],size:[F,M,U],roundRadius:.1}),De(qo,{color:Sxi,children:Sn(e0,{children:[De(A1,{center:[0,k,U+Y/2],size:[F-.2,M-.12,Y],roundRadius:.14}),De($t,{center:[0,j,oe],size:[O,te,J]}),De($t,{center:[0,ne,W-ge*.72],size:[le-.32,ie-.16,ge]})]})}),f.map(Ce=>De(A1,{color:Qxi,center:[Ce.x,Qe,U+.82],size:[pe*.82,he,.14],roundRadius:.035},`spring:${Ce.index}`)),f.map(Ce=>De($t,{color:xze,center:[Ce.x,Q-S*.03,U+.32],size:[pe,.13,.62]},`terminal-rise:${Ce.index}`)),De($t,{color:Qpe,center:[0,R+S*.1,U+.71],size:[O+.18,.16,.8]}),De(A1,{color:ean,center:[0,ne,_e],size:[le,ie,ge],roundRadius:.11}),De($t,{color:tan,center:[0,ne-S*(ie/2-.12),W-.035],size:[le-.36,.24,.07]}),[-1,1].map(Ce=>De(A1,{color:ean,center:[Ce*Ee,ue,fe],size:[ke,.92,.72],roundRadius:.1})),[-1,1].map(Ce=>De(Uo,{x:Ce*Ee,y:ue,z:fe,children:De(Ac,{rotation:[0,Math.PI/2,0],children:De(Ns,{color:tan,height:ke+.12,radius:.24})})})),[-1,1].map(Ce=>De(A1,{color:vxi,center:[Ce*Te,_,we/2],size:[.17,Math.min(h*.3,.7),we],roundRadius:.04})),[-1,1].map(Ce=>De(A1,{color:wxi,center:[Ce*Re,_,we-.05],size:[.42,Math.min(h*.3,.7),.1],roundRadius:.035})),De($t,{color:Qpe,center:[0,k,.025],size:[O+.7,M*.58,.05]}),De($t,{color:Qpe,center:[0,Q-S*.06,U+.82],size:[O+.4,.15,.92]})]})},Mxi=({numberOfPins:t,pitch:e=2.54,pinThickness:n=.64,bodyWidth:o=2.5,bodyHeight:i=2.54,standoffHeight:r=1.27,matingPinLength:s=5.8,tailSpan:a=5.08})=>{const A=-((t-1)*e)/2,c=r+i,l=a/2,u=n*.35;return De(Ei,{children:Array.from({length:t},(g,h)=>{const d=A+h*e,p=h%2===0?1:-1,m=s-u,_=r-n/2;return Sn(Uo,{x:d,children:[De($t,{color:"#222",size:[e,o,i],center:[0,0,r+i/2]}),Sn(qo,{color:"#d4af37",children:[De($t,{size:[n,l,n],center:[0,p*(l/2),n/2]}),De($t,{size:[n,n,_],center:[0,0,n/2+_/2]}),De($t,{size:[n,n,m],center:[0,0,c+m/2]}),Sn(ZA,{children:[De($t,{size:[n,n,.01],center:[0,0,c+m]}),De($t,{size:[n*.65,n*.65,.01],center:[0,0,c+s]})]})]})]})})})},JX=t=>pI.string(t).circuitJson().filter(n=>n.type==="pcb_plated_hole"&&Number.isFinite(n.x)&&Number.isFinite(n.y)).map(n=>({x:n.x,y:n.y,pin:n.port_hints?.[0]})),nan=t=>pI.string(t).circuitJson().filter(n=>n.type==="pcb_smtpad"&&n.shape==="rect"&&Number.isFinite(n.x)&&Number.isFinite(n.y)).map(n=>({x:n.x,y:n.y,width:n.width??.4,height:n.height??.4,pin:n.port_hints?.[0]})),Dxi=({bodyWidth:t,bodyLength:e,bodyHeight:n=1,pads:o,leadThickness:i=.15,leadHeightRatio:r=.75})=>{const s=o.reduce((c,l)=>c+l.x,0)/(o.length||1),a=o.reduce((c,l)=>c+l.y,0)/(o.length||1),A=n*r;return Sn(Ei,{children:[De(ng,{center:{x:s,y:a,z:0},width:t,length:e,height:n}),o.map(c=>{const l=c.width??.4,u=c.height??.4,g=c.x>=s?1:-1,h=c.x+g*l/2,d=Math.max(Math.abs(h-s)-t/2,.1),p=Math.min(.15,t*.15);return De(ns,{rotation:g>0?Math.PI:0,position:{x:h,y:c.y,z:i/2},width:u,thickness:i,padContactLength:l*.6,bodyDistance:d+p,height:A},`lead-${c.x}-${c.y}`)})]})},Nxi=({padPitch:t,padHeight:e,color:n="#333"})=>{const o=t,i=e*.85,r=i,s=o*.2,a=o-s*2;return Sn(Ei,{children:[De($t,{size:[a,i,r],offset:[0,0,r/2],color:n}),De($t,{size:[s,r,i],offset:[o/2-s/2,0,r/2],color:"#ccc"}),De($t,{size:[s,r,i],offset:[-o/2+s/2,0,r/2],color:"#ccc"})]})},Rxi=({color:t="#ffff00",bodyColor:e="#ffffff",leadColor:n="#dedede"})=>{const m=[-1.7,0,1.7],_=[-1,1];return Sn(Ei,{children:[m.flatMap(f=>_.map(I=>De($t,{color:n,size:[1.4,1,.2],center:[I*2,f,.2/2]}))),De(qo,{color:e,children:Sn(e0,{children:[De(ng,{width:5,length:5,height:1.3,heightAboveSurface:.2,center:{x:0,y:0,z:0},color:e,taperRatio:.036,straightHeightRatio:.01,includeNotch:!1}),De(Ns,{radius:2,height:.25,center:[0,0,1.5-.25/2]}),De(Uo,{offset:[-5/2,5/2,1.5-.3/2+.005],children:De(Ac,{rotation:[0,0,Math.PI/4],children:De($t,{size:[.9,.9,.3+.01]})})})]})}),De(Ns,{color:t,radius:2,height:.25,center:[0,0,1.55-.25/2]})]})},Txi=({bodyWidth:t=3.5,bodyLength:e=2.8,bodyHeight:n=.8,color:o="#ffe08a",bodyColor:i="#f2f2f2",padColor:r="#cccccc",pad1X:s=-.9,pad1Width:a=2.2,pad2X:A=1.375,pad2Width:c=1.25,padLength:l=2.2}={})=>{const h=(s+A)/2,d=t*.55,p=e*.55;return Sn(Ei,{children:[[{x:s,w:a,key:"pad-1"},{x:A,w:c,key:"pad-2"}].map(({x:m,w:_,key:f})=>De(qo,{color:r,children:De($t,{size:[_,l,.1],center:[m,0,.1/2]})})),De(qo,{color:i,children:De($t,{size:[t,e,n],center:[h,0,.1+n/2]})}),De(qo,{color:o,children:De($t,{size:[d,p,.15],center:[h,0,.1+n+.15/2-.05]})})]})},oan=t=>Array.from({length:t},(e,n)=>n),kxi=({bodyWidth:t=16.26,bodyDepth:e=15.88,bodyHeight:n=13.5,bodyCenterY:o=-.96,ledPins:i=!1,firstPinLeft:r=!1,firstPinTop:s=!1,signalPitch:a=1.02,signalRowPitch:A=1.78,signalHoleDiameter:c=.9144,shieldPinX:l=8.13,shieldPinY:u=.13,shieldHoleDiameter:g=1.8,locatorHoleX:h=6.35,locatorHoleY:d=-3.43,locatorHoleDiameter:p=3.25,ledPinX:m=4.57,ledPinPitch:_=2.29,ledPinY:f=5.7,openingDirection:I,shellColor:C="#b7bdc2",housingColor:y="#20242a",contactColor:x="#d6a928"})=>{const E=I??(o>0?1:-1),B=o+E*e/2,S=Math.min(.38,t*.024),Q=Math.max(t-2.5,t*.72),w=Math.min(n-2.4,9.6),M=1.3+w/2,k=Math.min(4.4,e*.34),R=B-E*k/2,F=B-E*(k+S*.7),O=Math.max(.22,Math.min(c*.36,.38)),U=oan(8).map(oe=>{const ie=(3.5-oe)*a,ne=oe%2===0?-A/2:A/2;return{x:r?-ie:ie,y:s?-ne:ne}}),Y=[-m-_,-m,m,m+_],W=Q/10,te=B-E*Math.max(k*.48,1.2),j=M+w*.18,J=B+E*S*.2;return Sn(Ei,{children:[Sn(qo,{color:C,children:[Sn(e0,{children:[De($t,{center:[0,o,n/2],size:[t,e,n]}),De($t,{center:[0,R,M],size:[Q,k+S*2,w]})]}),De($t,{center:[0,J,.72],size:[Q+.5,S*1.25,1.05]}),[-1,1].map(oe=>De($t,{center:[oe*l,u,.25],size:[Math.max(g*.46,.65),Math.max(g*.72,1.1),3.4]})),[-1,1].map(oe=>De($t,{center:[oe*t*.24,o-E*e*.08,n+.04],size:[t*.22,e*.42,.1]}))]}),Sn(qo,{color:y,children:[Sn(e0,{children:[De(A1,{center:[0,R,M],size:[Q-.2,k+S*.5,w-.2],roundRadius:.22}),De($t,{center:[0,R-E*S*.2,M-.05],size:[Q-1.25,k+S,w-1.35]})]}),De($t,{center:[0,F,M],size:[Q-1.15,S,w-1.25]}),De(A1,{center:[0,B-E*k*.28,1.55],size:[Q-2.6,k*.5,1.15],roundRadius:.16}),[-1,1].map(oe=>De(Ns,{center:[oe*h,d,-.25],radius:Math.max(p*.41,.65),height:2.7}))]}),Sn(qo,{color:x,children:[U.map(({x:oe,y:ie},ne)=>De(Ns,{center:[oe,ie,.15],radius:O,height:3.1})),oan(8).map(oe=>De(Uo,{offset:[(oe-3.5)*W,te,j+(oe%2===0?.03:-.03)],children:De(Ac,{rotation:[E*.2,0,0],children:De(A1,{size:[Math.max(W*.28,.28),3.25,.16],roundRadius:.05})})})),i&&Y.map((oe,ie)=>De(Ns,{center:[oe,f,.15],radius:O,height:3.1}))]}),i&&Sn(Ei,{children:[De(A1,{color:"#73b744",center:[-t/2+2.05,B+E*S*.35,n-2.05],size:[2.15,S*1.55,1.45],roundRadius:.18}),De(A1,{color:"#e0aa35",center:[t/2-2.05,B+E*S*.35,n-2.05],size:[2.15,S*1.55,1.45],roundRadius:.18})]})]})},Fxi=({bodyWidth:t=6.1,bodyLength:e=6.5,bodyHeight:n=2.3,tabWidth:o=6.2,tabLength:i=5.8,span:r=6.85,pitch:s=2.29,leadWidth:a=.9,leadContactLength:A=1.5,color:c="#222",tabColor:l="#cccccc",leadColor:u="#cccccc"})=>{const h=r/2,d=-r/2,p=h+(o-t)/2,m=p-t/2,_=.5/2,f=.4;return Sn(Ei,{children:[De(qo,{color:l,children:De($t,{size:[o,i,.5],center:[h,0,.5/2]})}),De(qo,{color:c,children:De($t,{size:[t,e,n],center:[p,0,.5+n/2]})}),[-1,1].map(I=>Sn(qo,{color:u,children:[De($t,{size:[A,a,f],center:[d+A/2,I*s,f/2]}),Sn(ZA,{children:[De($t,{size:[.1,a,f],center:[d+A,I*s,f/2]}),De($t,{size:[.1,a,f],center:[m,I*s,_+.5/2]})]})]},`lead-${I}`))]})},Lxi=({diameter:t=6.3,heightToDiameterRatio:e=1.4,height:n=t*e,leadPitch:o=2.5,leadDiameter:i=.6,leadLength:r=3,sleeveColor:s="#1b2a6b",baseColor:a="#1a1a1a"})=>{const A=t/2,c=Math.min(1,t*.12),l=Math.max(n-c,.1),u=c,g=u+l,h=Math.max(t*.06,.2),d=.3;return Sn(Ei,{children:[De(qo,{color:a,children:De(Ns,{radius:A-.05,height:c,center:[0,0,c/2]})}),De(qo,{color:s,children:Sn(e0,{children:[De(a2,{radius:A,height:l,roundRadius:Math.min(.3,A*.15),center:[0,0,u+l/2]}),De($t,{size:[t,h,d*2],center:[0,0,g]}),De($t,{size:[h,t,d*2],center:[0,0,g]})]})}),[-1,1].map(p=>De(qo,{color:"#c0c0c0",children:De(Ns,{radius:i/2,height:r+c,center:[p*o/2,0,(c-r)/2]})}))]})},Hxi=({bodyWidth:t=5.35,bodyLength:e=14,bodyHeight:n=4,bodyCenterX:o=t/2,adjusterDiameter:i=Math.min(t,e)*.55,shaftDiameter:r=0,shaftHeight:s=0,leads:a=[],leadDiameter:A=.6,leadLength:c=3,bodyColor:l="#1f4fa3",adjusterColor:u="#d8d8d8"})=>{const h=n+.4,d=Math.max(i*.16,.3);return Sn(Ei,{children:[De(qo,{color:l,children:De($t,{size:[t,e,n],center:[o,0,n/2]})}),De(qo,{color:u,children:Sn(e0,{children:[De(Ns,{radius:i/2,height:.8,center:[o,0,h]}),De($t,{size:[i,d,.8*.6],center:[o,0,h+.8/2]})]})}),s>0&&r>0?De(qo,{color:u,children:De(Ns,{radius:r/2,height:s,center:[o,0,n+s/2]})}):null,a.map(p=>De(qo,{color:"#c0c0c0",children:De(Ns,{radius:A/2,height:n/2+c,center:[p.x,p.y,(n/2-c)/2]})},`lead-${p.x}-${p.y}`))]})},Oxi=({bodyWidth:t=2.9,bodyLength:e=3,bodyHeight:n=1.4,actuatorDiameter:o=1.5,actuatorHeight:i=.5,padSpanX:r=4.2,padSpanY:s=2.15,padWidth:a=1.05,padLength:A=.7,bodyColor:c="#2b2b2b",actuatorColor:l="#d9d9d9",leadColor:u="#cccccc"})=>Sn(Ei,{children:[De(qo,{color:c,children:De($t,{size:[t,e,n],center:[0,0,n/2]})}),De(qo,{color:l,children:De(Ns,{radius:o/2,height:i,center:[0,0,n+i/2]})}),[-1,1].flatMap(h=>[-1,1].map(d=>De(qo,{color:u,children:De($t,{size:[a,A,.15],center:[h*r/2,d*s/2,.15/2]})})))]}),Gxi=({footprint:t="smdslideswitch7",position:e=0})=>{const n=t.replace(/_pin1location\([^)]*\)/g,""),o=pI.string(n).json(),i=pI.string(n).circuitJson(),r=i.filter(g=>g.type==="pcb_smtpad"&&g.shape==="rect"),s=pI.string(t).circuitJson().filter(g=>g.type==="pcb_smtpad"&&(g.shape==="rect"||g.shape==="rotated_rect"));if(r.length<7||!Number.isFinite(o.mpx)||o.mpx<3)throw new Error("SmdSlideSwitch needs signal pads and four mounting pads");const a=Math.atan2(s[1].y-s[0].y,s[1].x-s[0].x)-Math.atan2(r[1].y-r[0].y,r[1].x-r[0].x),A=o.mpx-.5,c=2.7,l=o.mpx>6?1.5:1.4,u=o.mounty;return Sn(Ac,{rotation:[0,0,a],children:[De(qo,{color:"#aeb4ba",children:Sn(e0,{children:[De($t,{size:[A,c,l],center:[0,u,l/2]}),De($t,{size:[A-.3,c-.3,l],center:[0,u,l/2-.15]}),De($t,{size:[2.7,.5,.9],center:[0,u-c/2,.65]})]})}),Sn(qo,{color:"#28292c",children:[De($t,{size:[A-.32,c-.32,.35],center:[0,u,.175]}),De($t,{size:[1,2.25,.65],center:[e===0?-.5:.5,u-1.5,.65]}),i.filter(g=>g.type==="pcb_hole").map((g,h)=>"hole_diameter"in g&&"x"in g?De(Ns,{radius:g.hole_diameter*.42,height:.6,center:[g.x,g.y,-.2]}):null)]}),De(qo,{color:"#c6c7c9",children:r.map((g,h)=>{const d=h<r.length-4,p=g.y+g.height*.4,m=Math.min(g.y-g.height*.4,u+c/2-.2);return De($t,{size:[g.width*.8,d?p-m:g.height*.8,.18],center:[g.x,d?(p+m)/2:g.y,.09]},h)})})]})},Yxi=({fullWidth:t=1.94,fullLength:e=1.6})=>Sn(Ei,{children:[De(Ac,{rotation:[45*Math.PI,0,0],children:De(Uo,{center:[0,0,-.4],children:De(qo,{color:"grey",children:De($t,{size:[1.2,1.6,.55]})})})}),[-1,0,1].flatMap((l,u)=>[De(Uo,{center:[-1.2/2-.03,l*.5,.13/2],children:De($t,{size:[.67,.3,.13]})}),De(Uo,{center:[1.2/2+.03,l*.5,.13/2],children:De($t,{size:[.67,.3,.13]})})])]}),Uxi=({packageWidth:t=10,packageLength:e=10,packageHeight:n=1.2,standoffHeight:o=.2,ballPitch:i=.8,ballDiameter:r=.5,ballRows:s=8,ballColumns:a=8,missingBalls:A=[],footprintString:c})=>{const l=n-o,u=o+l/2,g=Math.max(o/2,r/2),h=c?pI.string(c).circuitJson():null;return Sn(Ei,{children:[De(Uo,{z:u,children:De(qo,{color:"#555",children:De($t,{size:[t,e,l]})})}),!c&&Array.from({length:s*a}).map((d,p)=>{if(A.includes(p+1))return null;const m=Math.floor(p/a),f=(p%a-(a-1)/2)*i,I=(m-(s-1)/2)*i;return De(Uo,{x:f,y:I,z:g,children:De(TY,{radius:r/2})})}),h&&h.map((d,p)=>d.type==="pcb_smtpad"?De(Uo,{x:d.x,y:d.y,z:g,children:De(TY,{radius:r/2})}):null)]})},ian=({width:t,height:e,depth:n})=>De(ZA,{children:[-1,1].map(o=>De(Uo,{offset:[o*(t-e)/2,0,0],children:De(Ac,{rotation:[Math.PI/2,0,0],children:De(Ns,{radius:e/2,height:n})})},o))}),Kxi=({footprint:t="usbcmidmount16"})=>{const e=t.replace(/_pin1location\([^)]*\)/g,""),n=pI.string(e).json(),o=pI.string(e).circuitJson(),i=o.filter(C=>C.type==="pcb_smtpad"&&C.shape==="rect"),r=o.filter(C=>C.type==="pcb_plated_hole"),s=o.filter(C=>C.type==="pcb_hole"),a=pI.string(t).circuitJson().find(C=>C.type==="pcb_plated_hole"),A=r[0],c=A&&a&&"x"in a?Math.atan2(a.y,a.x)-Math.atan2(A.y,A.x):0,l=8.94,u=3.2,g=.22,h=n.rowy+.23,d=-n.bodybottom,p=h-d,m=(h+d)/2,_=1.65;if(!Number.isFinite(p)||p<3||r.length!==4)throw new Error("UsbCMidmount requires four mounting slots and a positive body depth");const f=-.9,I=_+.1;return Sn(Ac,{rotation:[0,0,c],children:[De(qo,{color:"#b8bdc4",children:De(Uo,{offset:[0,m,_],children:Sn(e0,{children:[De(ian,{width:l,height:u,depth:p}),De(ian,{width:l-g*2,height:u-g*2,depth:p+.2})]})})}),Sn(qo,{color:"#242529",children:[De($t,{size:[6.65,p-1.1,.7],center:[0,m+.3,_]}),De($t,{size:[7.6,1,2.45],center:[0,h-.65,_]}),s.map((C,y)=>"x"in C&&"hole_diameter"in C?De(Ns,{radius:C.hole_diameter*.42,height:.8,center:[C.x,C.y,-.3]}):null)]}),Sn(qo,{color:"#d3ad57",children:[[-1,1].flatMap(C=>[-2.75,-2.25,-1.25,-.25,.25,1.25,2.25,2.75].map(y=>De($t,{size:[.24,p-2,.04],center:[y,m+.1,_+C*.365]}))),i.map((C,y)=>De($t,{size:[Math.min(C.width*.7,.35),C.height*.8+.35,.15],center:[C.x,C.y-.175,.075]}))]}),De(qo,{color:"#b8bdc4",children:r.map((C,y)=>De($t,{size:[.4,"hole_height"in C?Math.max(.3,C.hole_height-.2):1,I-f],center:[C.x,C.y,(I+f)/2]},y))})]})},ran=t=>pI.string(t).circuitJson().filter(e=>e.type==="pcb_smtpad"&&(e.shape==="rect"||e.shape==="rotated_rect")).map(e=>({x:e.x,y:e.y,pin:e.port_hints?.[0]})),Vxi=({footprint:t="sot143"})=>{const e=ran(t);if(e.length!==4)throw new Error("SOT143 requires four signal pads");const n=ran("sot143"),o=pI.string(t).json(),i=n[1],r=e.find(A=>A.pin==="2"),s=o.pin1location?Math.round((Math.atan2(r.y,r.x)-Math.atan2(i.y,i.x))/(Math.PI/2))*(Math.PI/2):0,a=e.map(A=>({...A,x:A.x*Math.cos(s)+A.y*Math.sin(s),y:-A.x*Math.sin(s)+A.y*Math.cos(s)}));return Sn(Ac,{rotation:[0,0,s],children:[De(ng,{width:2.9,length:1.3,height:.95,heightAboveSurface:.05,center:{x:0,y:0,z:0},includeNotch:!1,taperRatio:.06}),a.map(A=>{const c=A.y<0?-1:1,l=A.pin==="1"?.83:.43;return De(ns,{width:l,thickness:.12,height:.45,padContactLength:.3,bodyDistance:.6,rotation:c<0?Math.PI/2:-Math.PI/2,position:{x:A.x,y:c*1.15,z:.06}},A.pin)})]})},zxi=16/9,Jxi=40,uS=1e-6,gf=(t,e)=>{if(!Number.isFinite(e)||e<=0)throw new Error(`${t} must be a finite number greater than zero`)},Wxi=t=>{if(t===void 0)return zxi;if(typeof t=="number")return gf("aspectRatio",t),t;if(typeof t!="string"){const[i,r]=t;return gf("aspectRatio width",i),gf("aspectRatio height",r),i/r}const e=t.split(":");if(e.length!==2)throw new Error('aspectRatio must look like "16:9"');const n=Number(e[0]),o=Number(e[1]);return gf("aspectRatio width",n),gf("aspectRatio height",o),n/o},jxi=({width:t,height:e,diagonal:n,aspectRatio:o,ratio:i,defaultDiagonal:r=Jxi})=>{const s=Wxi(o??i);t!==void 0&&gf("width",t),e!==void 0&&gf("height",e),n!==void 0&&gf("diagonal",n),gf("defaultDiagonal",r);let a,A;if(t!==void 0&&e!==void 0)a=t,A=e;else if(n!==void 0&&t!==void 0){if(t>=n)throw new Error("width must be smaller than diagonal");a=t,A=Math.sqrt(n**2-t**2)}else if(n!==void 0&&e!==void 0){if(e>=n)throw new Error("height must be smaller than diagonal");a=Math.sqrt(n**2-e**2),A=e}else t!==void 0?(a=t,A=t/s):e!==void 0?(a=e*s,A=e):(A=(n??r)/Math.sqrt(s**2+1),a=A*s);return{width:a,height:A,diagonal:Math.hypot(a,A),aspectRatio:a/A}},$xi=t=>{const e=[["sitsFlat",t.sitsFlat],["sitsFlatBelowBoard",t.sitsFlatBelowBoard],["foldedToFaceAboveBoard",t.foldedToFaceAboveBoard],["foldedToFaceBelowBoard",t.foldedToFaceBelowBoard],["foldedToFaceAboveBoard",t.foldsAboveBoard],["foldedToFaceBelowBoard",t.foldsBelowBoard],["foldedToRightAngleAboveBoard",t.foldedToRightAngleAboveBoard],["foldedToRightAngleBelowBoard",t.foldedToRightAngleBelowBoard]].filter(n=>n[1]);if(e.length>1)throw new Error("Only one FlexScreen boolean orientation shortcut can be true");return e[0]?.[0]??t.orientation??"sitsFlat"},qxi=(t,e)=>Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2]),Xxi=(t,e,n)=>[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n,t[2]+(e[2]-t[2])*n],Eze=t=>{const e=[0];for(let n=1;n<t.length;n+=1)e.push(e[n-1]+qxi(t[n-1],t[n]));return e},san=(t,e,n)=>{if(n<=0)return t[0];const o=e.at(-1);if(n>=o)return t.at(-1);for(let i=1;i<t.length;i+=1)if(e[i]>=n){const r=e[i-1],s=e[i]-r;return Xxi(t[i-1],t[i],(n-r)/s)}return t.at(-1)},vpe=(t,e,n)=>{const o=Eze(t),i=o.at(-1),r=Math.max(0,Math.min(e,i)),s=Math.max(r,Math.min(n,i)),a=[san(t,o,r)];for(let A=1;A<t.length-1;A+=1)o[A]>r&&o[A]<s&&a.push(t[A]);return a.push(san(t,o,s)),a},Zxi=(t,e)=>[t,[t[0],t[1]+e,t[2]]],e3i=({start:t,endZ:e,flexCableLength:n,foldDistanceFromConnector:o,foldOutset:i,foldSegments:r})=>{const s=[t],a=[t[0],t[1]+o,t[2]];o>uS&&s.push(a);for(let l=1;l<=r;l+=1){const u=Math.PI*l/r;s.push([t[0],a[1]+i*Math.sin(u),t[2]+(e-t[2])*(1-Math.cos(u))/2])}const A=Eze(s).at(-1);if(A>n+uS)throw new Error(`flexCableLength must be at least ${A.toFixed(2)} for this 180-degree fold`);const c=Math.max(0,n-A);if(c>uS){const l=s.at(-1);s.push([l[0],l[1]-c,l[2]])}return s},t3i=({start:t,flexCableLength:e,bendRadius:n,bendSegments:o,verticalLead:i,direction:r})=>{const s=2*o*Math.sin(Math.PI/(4*o)),a=Math.min(n,e/s),A=a*s,c=Math.max(0,e-A),l=Math.min(i,c*.45),u=c-l,g=[t];u>uS&&g.push([t[0],t[1]+u,t[2]]);for(let h=1;h<=o;h+=1){const d=Math.PI/2*h/o;g.push([t[0],t[1]+u+a*Math.sin(d),t[2]+r*a*(1-Math.cos(d))])}if(l>uS){const h=g.at(-1);g.push([h[0],h[1],h[2]+r*l])}return g},WX=({points:t,width:e,thickness:n,color:o,acrossOffset:i=0,normalOffset:r=0,overlap:s=.03})=>De(qo,{color:o,children:t.slice(1).map((a,A)=>{const c=t[A],l=a[0]-c[0],u=a[1]-c[1],g=a[2]-c[2],h=Math.hypot(l,u,g);if(h<uS)return null;const d=Math.asin(g/h),p=Math.atan2(-l,u),m=[(c[0]+a[0])/2,(c[1]+a[1])/2,(c[2]+a[2])/2],_=Math.max(.001,Math.min(e,n,h)/2-.001);return De(Uo,{offset:m,children:De(Ac,{rotation:[d,0,p],children:De(A1,{size:[e,h+s,n],center:[i,0,r],roundRadius:_})})},`${A}:${m.join(":")}`)})}),n3i=t=>{const{width:e,height:n,diagonal:o,aspectRatio:i,ratio:r,defaultDiagonal:s,screenThickness:a=1.2,bezelInset:A=2,bezelDepth:c=.65,activeAreaWidth:l,activeAreaHeight:u,screenColor:g="#071b24",bezelColor:h="#15181d",showScreen:d=!0,flexCableLength:p=28,flexCableThickness:m=.18,flexCableColor:_="#d79528",conductorCount:f=8,conductorPitch:I,conductorWidth:C,conductorThickness:y=.035,conductorColor:x="#8c4a18",cableEdgeMargin:E=.6,exposedContactLength:B=2.4,showConductors:S=!0,showFlexCable:Q=!0,showStiffeners:w=!0,stiffenerLength:M=3,stiffenerThickness:k=.16,stiffenerColor:R="#416bb3",bendRadius:F=3,bendSegments:O=10,rightAngleVerticalLead:U=3,distanceAboveBoard:Y=7,distanceBelowBoard:W=7,foldDistanceFromConnector:te=7,foldOutset:j=4,foldSegments:J=18,screenGap:oe=.08,boardTopZ:ie=0,boardThickness:ne=1.6,boardClearance:le=.15,cableStartX:ge=0,cableStartY:_e=0,cableStartZ:ue,cableLateralOffset:fe=0,screenOffset:pe,screenRotation:ye,rotation:Me=[0,0,0],offset:ve}=t,he=jxi({width:e,height:n,diagonal:o,aspectRatio:i,ratio:r,defaultDiagonal:s}),Qe=$xi(t),Pe=Qe==="sitsFlatBelowBoard"||Qe==="foldedToFaceBelowBoard"||Qe==="foldedToRightAngleBelowBoard",we=Qe==="foldedToFaceAboveBoard"||Qe==="foldedToFaceBelowBoard",Te=Qe==="foldedToRightAngleAboveBoard"||Qe==="foldedToRightAngleBelowBoard";if(gf("screenThickness",a),gf("flexCableLength",p),gf("flexCableThickness",m),gf("conductorThickness",y),gf("bendRadius",F),gf("foldOutset",j),gf("boardThickness",ne),w&&gf("stiffenerThickness",k),!Number.isInteger(f)||f<1)throw new Error("conductorCount must be a positive integer");if(!Number.isInteger(O)||O<2)throw new Error("bendSegments must be an integer of at least 2");if(!Number.isInteger(J)||J<4)throw new Error("foldSegments must be an integer of at least 4");if(le<0||oe<0||E<0||B<0||M<0||U<0||Y<0||W<0||te<0)throw new Error("clearances, margins, contact lengths, and lead lengths cannot be negative");const Re=t.flexCableWidth??Math.min(12,Math.max(5,he.width*.3));gf("flexCableWidth",Re);const Ee=Re-E*2;if(Ee<=0)throw new Error("cableEdgeMargin leaves no usable flex cable width");const ke=I??(f===1?0:Ee/f);if(f>1&&(!Number.isFinite(ke)||ke<=0))throw new Error("conductorPitch must be greater than zero");const Ce=C??(f===1?Math.min(Ee,Re*.45):ke*.48);if(gf("conductorWidth",Ce),(f-1)*ke+Ce>Ee+uS)throw new Error("conductorPitch and conductorWidth do not fit inside the flex cable margins");const tt=Pe&&!we?ie-ne-le-m/2:ie+le+m/2,At=[ge+fe,_e,ue??tt],at=Pe?-1:1,nt=Qe==="foldedToFaceAboveBoard"?ie+Y:ie-ne-W,gt=Qe==="foldedToFaceAboveBoard"?nt-oe-m/2:nt+oe+m/2,bt=we?e3i({start:At,endZ:gt,flexCableLength:p,foldDistanceFromConnector:te,foldOutset:j,foldSegments:J}):Te?t3i({start:At,flexCableLength:p,bendRadius:F,bendSegments:O,verticalLead:U,direction:at}):Zxi(At,p),Ct=Eze(bt).at(-1),Dt=Math.min(Math.max(0,B),Ct/2),kt=Math.min(Math.max(0,M),Ct/2),it=vpe(bt,0,Dt),Yt=vpe(bt,Ct-Dt,Ct),pn=vpe(bt,0,kt),be=vpe(bt,Ct-kt,Ct),et=bt.at(-1);let It,Bt;Qe==="sitsFlat"?(It=[0,0,0],Bt=[et[0],et[1]+he.height/2,et[2]+m/2+oe]):Qe==="sitsFlatBelowBoard"?(It=[0,Math.PI,0],Bt=[et[0],et[1]+he.height/2,et[2]-m/2-oe]):Qe==="foldedToFaceAboveBoard"?(It=[0,0,0],Bt=[et[0],et[1]-he.height/2,nt]):Qe==="foldedToFaceBelowBoard"?(It=[0,Math.PI,0],Bt=[et[0],et[1]-he.height/2,nt]):Qe==="foldedToRightAngleAboveBoard"?(It=[Math.PI/2,0,0],Bt=[et[0],et[1]-m/2-oe,et[2]+he.height/2]):(It=[-Math.PI/2,0,0],Bt=[et[0],et[1]+m/2+oe,et[2]-he.height/2]),Bt=[Bt[0]+(pe?.x??0),Bt[1]+(pe?.y??0),Bt[2]+(pe?.z??0)];const mt=Array.from({length:f},(Ze,dt)=>f===1?0:(dt-(f-1)/2)*ke),st=(m+y)/2,xt=-(m+k)/2,Xe=Sn(Ei,{children:[Q&&De(WX,{points:bt,width:Re,thickness:m,color:_}),Q&&w&&kt>uS&&Sn(Ei,{children:[De(WX,{points:pn,width:Re,thickness:k,color:R,normalOffset:xt}),De(WX,{points:be,width:Re,thickness:k,color:R,normalOffset:xt})]}),Q&&S&&Dt>uS&&mt.map((Ze,dt)=>Sn(Ei,{children:[De(WX,{points:it,width:Ce,thickness:y,color:x,acrossOffset:Ze,normalOffset:st}),De(WX,{points:Yt,width:Ce,thickness:y,color:x,acrossOffset:Ze,normalOffset:st})]},`conductor:${dt}`)),d&&De(Uo,{offset:Bt,children:De(Ac,{rotation:ye??It,children:De(Xsn,{width:he.width,height:he.height,thickness:a,bezelInset:A,bezelDepth:c,screenWidth:l,screenHeight:u,screenColor:g,bezelColor:h})})})]});return De(Uo,{offset:{x:ve?.x??0,y:ve?.y??0,z:ve?.z??0},children:De(Uo,{offset:At,children:De(Ac,{rotation:Me,children:De(Uo,{offset:[-At[0],-At[1],-At[2]],children:Xe})})})})},o3i=({footprint:t})=>{const e=ZVe.string(t.split("_",1)[0]).params().fn;if(ZVe.getModelNames().includes(e)){const A=ZVe.string(t).json();if(A.fn==="flexscreen"){const{fn:c,...l}=A;return De(n3i,{...l})}}let n=t;if(t.startsWith("jstzh1_5mm")){const A=t.match(/jstzh1_5mm(\d+)?/);n=`zh${A&&A[1]?A[1]:"7"}`}else if(t.startsWith("jstph2_0mm")){const A=t.match(/jstph2_0mm(\d+)?/);n=`jst${A&&A[1]?A[1]:"2"}_ph`}else if(t.startsWith("jstxh2_5mm")){const A=t.match(/jstxh2_5mm(\d+)?/);n=`jst${A&&A[1]?A[1]:"2"}_xh`}const o=pI.string(n).json(),i=t.match(/_color\(([^)]+)\)/),r=i?i[1]:void 0,s=(A,c)=>{if(A==null)return c;const l=Ua(A);return Number.isFinite(l)?l:c},a=n2i(o);if(a)return a;switch(o.fn){case"crystal":return De(bxi,{horizontalPadPitch:o.px,verticalPadPitch:o.py,padWidth:o.pw,padHeight:o.ph});case"dip":return De(a2i,{numPins:o.num_pins,pitch:o.p,bodyWidth:o.w});case"axial":return De(pxi,{pitch:o.p});case"tssop":return De(l2i,{pinCount:o.num_pins,leadLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w});case"msop":return De(g2i,{pinCount:o.num_pins,padContactLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w});case"vssop":return De(F2i,{pinCount:o.num_pins,leadLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w,bodyLength:o.h});case"qfp":return De(Msn,{pinCount:o.num_pins,pitch:o.p,leadWidth:o.pw,padContactLength:o.pl,bodyWidth:o.w});case"tqfp":return De(W2i,{});case"lqfp":return De(X2i,{pinCount:o.num_pins});case"qfn":{const A=typeof o.thermalpad?.x=="number"&&typeof o.thermalpad?.y=="number";return De(Rsn,{num_pins:o.num_pins,bodyWidth:o.w,bodyLength:o.h,pitch:o.p,padLength:o.pl,padWidth:o.pw,thermalPadSize:A?{width:o.thermalpad.x,length:o.thermalpad.y}:void 0})}case"dfn":{const A=typeof o.thermalpad?.x=="number"&&typeof o.thermalpad?.y=="number";return De(Jsn,{num_pins:o.num_pins,bodyWidth:o.w,bodyLength:o.h,pitch:o.p,padLength:o.pl,padWidth:o.pw,thermalPadSize:A?{width:o.thermalpad.x,length:o.thermalpad.y}:void 0})}case"pinrow":{const A=t.match(/_rows(\d+)/),c=A&&A[1]?parseInt(A[1],10):1;if(o.male)return De(Nsn,{numberOfPins:o.num_pins,pitch:o.p,invert:o.invert,rows:c,smd:o.smd||o.surface_mount,rightangle:o.rightangle});if(o.female)return De(N2i,{numberOfPins:o.num_pins,pitch:o.p,rows:c})}case"smdpinheader":return De(Mxi,{numberOfPins:o.num_pins,pitch:o.p,bodyWidth:o.bh});case"led5050":return De(Rxi,{color:r});case"cap":{switch(o.imperial){case"0402":return De(vsn,{color:"#856c4d"});case"0603":return De(wsn,{color:"#856c4d"});case"0805":return De(Psn,{color:"#856c4d"});case"0201":return De(ksn,{color:"#856c4d"});case"01005":return De(Fsn,{color:"#856c4d"});case"1206":return De(Lsn,{color:"#856c4d"});case"1210":return De(Hsn,{color:"#856c4d"});case"2010":return De(Osn,{color:"#856c4d"});case"2512":return De(Gsn,{color:"#856c4d"})}break}case"sot23":switch(o.num_pins){case 3:return De(b2i,{color:r});case 5:return De(Tsn,{})}break;case"sot25":return De(Tsn,{});case"sot":case"sot343":{const A=o.fn==="sot343";return De(Dxi,{pads:nan(n),bodyWidth:A?1.25:1.6,bodyLength:A?2:2.9,bodyHeight:A?1.1:1.3})}case"sot563":return De(Yxi,{});case"sot89":{const A=s(o.w,4.2);return De(zsn,{fullWidth:A,bodyWidth:A*.6,bodyLength:s(o.h,4.8)*.94,bodyHeight:1.5,leadWidth:s(o.pw,.48),tabLeadWidth:s(o.pw,.48)*2,padPitch:s(o.p,1.5),leadHeight:.66})}case"sot457":return De(sxi,{});case"smdslideswitch":return De(Gxi,{footprint:n});case"usbcmidmount":return De(Kxi,{footprint:n});case"sot143":return De(Vxi,{footprint:n});case"sot223":return De(zsn,{});case"sot23w":return De(S2i,{});case"sot323":return De(j2i,{});case"sod323f":return De(dxi,{});case"sod323fl":return De(hxi,{});case"sot363":return De(uxi,{});case"sot886":return De(gxi,{});case"sot963":return De(axi,{});case"pushbutton":return De(R2i,{width:o.w,length:o.h,innerDiameter:o.id});case"jst":if(Zsn(n))return De(Exi,{footprint:n});if(o.zh)return De(Cxi,{numPins:o.num_pins});if(o.ph)return De(yxi,{numPins:o.num_pins});if(o.xh)return De(xxi,{numPins:o.num_pins});break;case"fpc":return De(Pxi,{pinCount:o.num_pins,pitch:o.p,padWidth:o.pw,padLength:o.pl,staggered:o.staggered,reverse:o.reverse,rowPitch:o.py,topPadLength:o.toppl,bottomPadLength:o.bottompl,mountPadPitchX:o.mpx,mountPadOffsetY:o.mpy,mountTop:o.mounttop,mountPadWidth:o.mpw,mountPadLength:o.mpl});case"rj45":return De(kxi,{bodyWidth:o.w,bodyDepth:o.h,bodyCenterY:o.bodyy,ledPins:o.ledpins||o.num_pins===14,firstPinLeft:o.firstpinleft,firstPinTop:o.firstpintop,signalPitch:o.p,signalRowPitch:o.py,signalHoleDiameter:o.id,shieldPinX:o.shieldx,shieldPinY:o.shieldy,shieldHoleDiameter:o.shieldid,locatorHoleX:o.holex,locatorHoleY:o.holey,locatorHoleDiameter:o.holed,ledPinX:o.ledx,ledPinPitch:o.ledp,ledPinY:o.ledy});case"soic":case"sop8":case"ssop":return De(k2i,{pinCount:o.num_pins,leadLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w});case"son":case"wson":case"vson":{const A=o.fn==="vson"?s(o.grid?.x,3):s(o.w,3),c=o.fn==="vson"?s(o.grid?.y,3):s(o.h,3),l=s(o.epw,0),u=s(o.eph,0),g=o.pl!==void 0?s(o.pl,0):void 0,h=o.pw!==void 0?s(o.pw,0):void 0,d=nan(n).filter(f=>Number(f.pin??0)<=o.num_pins),p=f=>new Set(f.map(I=>I.toFixed(3))).size,m=d.length>2&&p(d.map(f=>f.y))===2&&p(d.map(f=>f.x))>2,_=De(Jsn,{num_pins:o.num_pins,bodyWidth:m?c:A,bodyLength:m?A:c,pitch:s(o.p,.5),padLength:g,padWidth:h,thermalPadSize:o.ep&&l>0&&u>0?{width:m?u:l,length:m?l:u}:void 0});return m?De(Ac,{rotation:[0,0,"90deg"],children:_}):_}case"mlp":case"lga":case"quad":return o.legsoutside?De(Msn,{pinCount:o.num_pins,pitch:s(o.p,.5),leadWidth:s(o.pw,.25),padContactLength:s(o.pl,.25),bodyWidth:s(o.w,6)}):De(Rsn,{num_pins:o.num_pins,bodyWidth:s(o.w,6),bodyLength:s(o.h,6),pitch:s(o.p,.5),padLength:s(o.pl,.25),padWidth:s(o.pw,.25)});case"bga":{const A=s(o.p,.8),c=o.grid?.x??8,l=o.grid?.y??8;return De(Uxi,{ballPitch:A,ballColumns:c,ballRows:l,ballDiameter:A*.625,packageWidth:c*A,packageLength:l*A})}case"sod523":return De(L2i,{});case"sod723":return De(Ixi,{});case"sod882":return De(Usn,{});case"sma":return De(H2i,{});case"smb":return De(Ksn,{});case"smc":return De(O2i,{});case"smf":return De(G2i,{});case"sod123":return De(K2i,{});case"sod123f":return De(Y2i,{});case"sod123fl":return De(U2i,{});case"sod123w":return De(Vsn,{});case"sod110":return De(Vsn,{bodyWidth:2.1,bodyLength:1.4});case"sod128":return De(V2i,{});case"sod323":return De(qsn,{});case"sod323w":return De(qsn,{});case"sod80":return De(Wsn,{});case"sod882d":return De(Usn,{});case"smbf":return De(Ksn,{});case"led2835":return De(Txi,{color:r,bodyWidth:s(o.w,3.5),bodyLength:s(o.h,2.8),pad1X:s(o.p1x,-.9),pad1Width:s(o.p1w,2.2),pad2X:s(o.p2x,1.375),pad2Width:s(o.p2w,1.25),padLength:s(o.ph,2.2)});case"electrolytic":case"radial":{const A=s(o.p,2.5),c=t.match(/_d([\d.]+)/),l=o.d!==void 0?s(o.d,A*2):c?Number(c[1]):A*2;return De(Lxi,{diameter:l,leadPitch:A})}case"potentiometer":return De(Hxi,{bodyWidth:s(o.w,5.35),bodyLength:s(o.ca,14),bodyHeight:s(o.h,4),leads:JX(n)});case"smdpushbutton":return De(Oxi,{padSpanX:s(o.px,4.2),padSpanY:s(o.py,2.15),padWidth:s(o.pw,1.05),padLength:s(o.ph,.7)});case"breakoutheaders":{const A=s(o.p,2.54),c=s(o.w,10)/2,l=[{x:-c,pins:o.left??0,key:"left"},{x:c,pins:o.right??0,key:"right"}];return De(Ei,{children:l.filter(({pins:u})=>u>0).map(({x:u,pins:g,key:h})=>De(Uo,{center:[u,0,0],children:De(Ac,{rotation:[0,0,"90deg"],children:De(Nsn,{numberOfPins:g,pitch:A})})},h))})}case"sod923":return De(z2i,{});case"hc49":return De(exi,{});case"micromelf":return De(txi,{});case"minimelf":return De(Wsn,{});case"melf":return De(nxi,{});case"ms012":return De(oxi,{pinCount:o.num_pins,padContactLength:o.pl,leadWidth:o.pw,pitch:o.p});case"ms013":return De(ixi,{pinCount:o.num_pins,padContactLength:o.pl,leadWidth:o.pw,pitch:o.p});case"sot723":return De(Z2i,{});case"to220":return De(jsn,{leads:JX(n)});case"to220f":return De(jsn,{mouldedTab:!0,leads:JX(n)});case"to92":return De($sn,{leads:JX(n)});case"to92l":case"to92s":{const A=s(o.w,4.8),c=s(o.h,4),l=Math.max(A,c);return De($sn,{bodyDiameter:l,flatCut:Math.max(l-Math.min(A,c),.4),leads:JX(n)})}case"to252":case"dpak":case"to263":case"d2pak":{const A=o.fn==="to263"||o.fn==="d2pak",c=s(o.tabw,A?8.38:6.2),l=Math.min(s(o.tabh,A?10:5.8),A?10:6.5);return De(Fxi,{bodyWidth:c,bodyLength:s(o.w,A?10.1:6.6),bodyHeight:A?4.4:2.3,tabWidth:c,tabLength:l,span:s(o.span,A?10.21:6.85),pitch:s(o.p,A?2.54:2.29),leadWidth:s(o.pw,1.5),leadContactLength:s(o.pl,3)})}case"stampboard":case"stampreceiver":return De(mxi,{bodyWidth:o.w,leadsLeft:o.left,leadsRight:o.right,leadsTop:o.top,leadsBottom:o.bottom,leadsPitch:o.p,leadWidth:o.pw,leadLength:o.pl,innerHoles:o.innerhole,innerHoleEdgeDistance:o.innerholeedgedistance});case"mountedpcbmodule":{const A=o.rows??1,c=o.pinRowSide??"left",l=o.holeInset,u=o.width,g=o.height,h=o.pinrow,d=o.pinRowHoleEdgeToEdgeDist,p=Array.isArray(o.holes)?o.holes:[];return De(_xi,{numPins:h,rows:A,p:o.p,id:o.id,od:o.od,width:u,height:g,pinRowSide:c,holes:p,holeInset:l,pinRowHoleEdgeToEdgeDist:d,nopin:o.nopin,female:o.female,screen:o.screen,screenWidth:o.screenwidth,screenHeight:o.screenheight,screenCenterOffsetX:o.screencenteroffsetx,screenCenterOffsetY:o.screencenteroffsety})}}switch(o.imperial){case"0402":return De(vsn,{color:r});case"0603":return De(wsn,{color:r});case"0805":return De(Psn,{color:r});case"0201":return De(ksn,{color:r});case"01005":return De(Fsn,{color:r});case"1206":return De(Lsn,{color:r});case"1210":return De(Hsn,{color:r});case"2010":return De(Osn,{color:r});case"2512":return De(Gsn,{color:r})}if((o.fn==="res"||o.fn==="cap")&&o.p!==void 0&&o.ph!==void 0){const A=Ua(o.p),c=Ua(o.ph);if(Number.isFinite(A)&&Number.isFinite(c))return De(Nxi,{padPitch:A,padHeight:c,color:r??(o.fn==="cap"?"#856c4d":void 0)})}return null},i3i=t=>t&&typeof t=="object"&&"type"in t,WY=t=>{if(typeof t=="number")return t;if(typeof t=="string"){const e=/^(-?\d+(?:\.\d+)?)\s*deg$/i.exec(t);if(e)return parseFloat(e[1])*Math.PI/180;const n=Number(t);if(!Number.isNaN(n))return n}return 0},r3i=t=>Array.isArray(t)?[Number(t[0])||0,Number(t[1])||0,Number(t[2])||0]:typeof t=="object"&&t?[Number(t.x)||0,Number(t.y)||0,Number(t.z)||0]:[0,0,0];function P6(t,e,n){const{jscad:{primitives:o,booleans:i,hulls:r,geometries:s,extrusions:a,transforms:A}}=n;if(t==null||t===!1)return[];if(Array.isArray(t))return t.flatMap(g=>P6(g,e,n));if(!i3i(t))return[];const{type:c,props:l,children:u}=t;if(c===bsn)return(u??[]).flatMap(g=>P6(g,e,n));if(c===qo){const g=l?.color;return(u??[]).flatMap(h=>P6(h,g??e,n))}if(c===Uo){const g=r3i(l?.offset??l?.center??{x:l?.x,y:l?.y,z:l?.z});return(u??[]).flatMap(d=>P6(d,e,n)).map(({geom:d,color:p})=>({geom:A.translate(g,d),color:p??e}))}if(c===Ac){const g=l?.angles??l?.rotation,h=Array.isArray(g)?[WY(g[0]),WY(g[1]),WY(g[2])]:[WY(l?.x??0),WY(l?.y??0),WY(l?.z??0)];return(u??[]).flatMap(p=>P6(p,e,n)).map(({geom:p,color:m})=>({geom:A.rotateZ(h[2],A.rotateY(h[1],A.rotateX(h[0],p))),color:m}))}if(c===gh||c===e0||c===ZA){const g=(u??[]).flatMap(d=>P6(d,e,n)).map(d=>d.geom);if(g.length===0)return[];let h;return c===gh?h=i.union(g):c===e0?h=i.subtract(g[0],g.slice(1)):h=r.hull(g),[{geom:h,color:e}]}if(c===kY){const g=l?.points??[];return[{geom:s.geom2.fromPoints(g),color:e??l?.color}]}if(c===FY){const g=(u??[]).flatMap(m=>P6(m,e,n)).map(m=>m.geom);if(g.length===0)return[];const h=g.length>1?i.union(g):g[0],d=l?.height??l?.h??1;let p=a.extrudeLinear({height:d},h);if(p.polygons)for(const m of p.polygons)!m.plane||!m.vertices||m.vertices.length<3||m.vertices.reverse();return[{geom:p,color:e??l?.color}]}if(c===$t||c===Ssn||c===Ns||c===TY||c===A1||c===a2){let g;if(c===$t){const h=l?.size??[1,1,1],d=l?.offset,p=l?.center??(d?[d[0],d[1],d[2]]:[0,0,0]);g=o.cuboid({size:h,center:p})}else if(c===Ssn){const h=l?.size??1,d=l?.offset,p=l?.center??(d?[d[0],d[1],d[2]]:[0,0,0]);g=o.cube({size:h,center:p})}else if(c===Ns){const h=l?.height??1,d=l?.radius??1,p=l?.center??[0,0,0];g=o.cylinder({height:h,radius:d,center:p})}else if(c===TY){const h=l?.radius??1,d=l?.center??[0,0,0];g=o.sphere({radius:h,center:d})}else if(c===a2){const h=l?.height??1,d=l?.radius??1,p=l?.roundRadius??.1,m=l?.center??[0,0,0];g=o.roundedCylinder({height:h,radius:d,roundRadius:p,center:m})}else{const h=l?.size??[1,1,1],d=l?.roundRadius??.1,p=l?.center??[0,0,0];g=o.roundedCuboid({size:h,roundRadius:d,center:p})}return[{geom:g,color:e??l?.color}]}if(typeof c=="function"){const g=c(l??{});return P6(g,e,n)}return(u??[]).flatMap(g=>P6(g,e,n))}function s3i(t,e){return{geometries:P6(t,void 0,{jscad:e})}}function aan(t){if(t.polygons){const e=[],n=[],o=[];let i=0;for(const s of t.polygons){for(const A of s.vertices)A.index=i,e.push(A[0],A[1],A[2]),t.color&&t.color.length>=3?o.push(t.color[0],t.color[1],t.color[2]):o.push(1,1,1),i++;const a=s.vertices[0].index;for(let A=2;A<s.vertices.length;A++){const c=s.vertices[A-1].index,l=s.vertices[A].index;n.push(a,c,l)}}const r=new Zl;if(r.setAttribute("position",new tg(new Float32Array(e),3)),r.setIndex(n),o.length>0&&r.setAttribute("color",new tg(new Float32Array(o),3)),t.transforms){const s=new va;s.fromArray(t.transforms),r.applyMatrix4(s)}return r.computeVertexNormals(),r}if(t.sides){const e=[],n=[];for(const i of t.sides)e.push(i[0][0],i[0][1],0),t.color&&t.color.length>=3?n.push(t.color[0],t.color[1],t.color[2]):n.push(1,1,1);const o=new Zl;if(o.setAttribute("position",new tg(new Float32Array(e),3)),n.length>0&&o.setAttribute("color",new tg(new Float32Array(n),3)),t.transforms){const i=new va;i.fromArray(t.transforms),o.applyMatrix4(i)}return o}return console.error("Invalid CSG object: neither polygons nor sides found"),new Zl}function a3i(t,e){const n=eze(o3i,{footprint:t});return s3i(n,e)}var A3i=_0(Ape()),Aan=ee.createContext(null),c3i=()=>{const t=ee.useContext(Aan);if(!t)throw new Error("useHover must be used within a HoverProvider");return t},l3i=({children:t})=>{const{camera:e,renderer:n}=uf(),[o,i]=ee.useState([]),r=ee.useMemo(()=>new uJt,[]),s=ee.useMemo(()=>new ni,[]),a=ee.useRef(o);a.current=o;const A=ee.useRef(null),c=ee.useCallback(d=>{i(p=>[...p,d])},[]),l=ee.useCallback(d=>{if(A.current){let p=!1,m=A.current.object;for(;m;){if(m===d){p=!0;break}m=m.parent}p&&(A.current.onUnhover(),A.current=null)}i(p=>p.filter(m=>m.object!==d))},[]),u=ee.useCallback(d=>{let p=d;for(;p;){const m=a.current.find(_=>_.object===p);if(m)return m;p=p.parent}},[]),g=ee.useCallback(d=>{if(!n.domElement)return;const p=n.domElement.getBoundingClientRect();s.x=(d.clientX-p.left)/p.width*2-1,s.y=-((d.clientY-p.top)/p.height)*2+1,r.setFromCamera(s,e);const m=a.current.map(f=>f.object);if(m.length===0){A.current&&(A.current.onUnhover(),A.current=null);return}const _=r.intersectObjects(m,!0);if(_.length>0){const f=_[0],I=u(f.object);if(I){const C={mousePosition:[f.point.x,f.point.y,f.point.z]};A.current!==I?(A.current?.onUnhover(),I.onHover(C),A.current=I):I.onHover(C)}else A.current&&(A.current.onUnhover(),A.current=null)}else A.current&&(A.current.onUnhover(),A.current=null)},[e,n,r,s,u]);ee.useEffect(()=>{const d=n.domElement;return d.addEventListener("mousemove",g),()=>{d.removeEventListener("mousemove",g)}},[n,g]);const h=ee.useMemo(()=>({addHoverable:c,removeHoverable:l}),[c,l]);return K.jsx(Aan.Provider,{value:h,children:t})},u3i=({children:t,object:e,onHover:n,onUnhover:o,isHovered:i})=>{const{addHoverable:r,removeHoverable:s}=c3i();return ee.useEffect(()=>e?(r({object:e,onHover:n,onUnhover:o}),()=>{s(e)}):void 0,[e,n,o,r,s]),K.jsx(K.Fragment,{children:t})},jX=u3i,p4=(t,{castShadow:e=!0,receiveShadow:n=!0}={})=>{t.traverse(o=>{o instanceof Er&&(o.castShadow=e,o.receiveShadow=n)})},g3i=({positionOffset:t,footprint:e,rotationOffset:n,onHover:o,onUnhover:i,isHovered:r,scale:s,isTranslucent:a=!1})=>{const{rootObject:A}=uf(),c=ee.useMemo(()=>{if(!e)return null;const{geometries:l}=a3i(e,A3i),u=new lh;for(const g of l.flat(1/0)){const h=g.geom;if(!h||!h.polygons&&!h.sides)continue;const d=new Vi(g.color);d.convertLinearToSRGB();const p={...h,color:[d.r,d.g,d.b]},m=aan(p),_=new su({vertexColors:!0,side:r_,transparent:a,opacity:a?.5:1,depthWrite:!a}),f=new Er(m,_);f.renderOrder=a?2:1,p4(f,{castShadow:!a,receiveShadow:!0}),u.add(f)}return u},[e,a]);return ee.useEffect(()=>{if(!(!c||!A))return A.add(c),()=>{A.remove(c)}},[A,c]),ee.useEffect(()=>{c&&(t&&c.position.fromArray(t),n&&c.rotation.fromArray(n),s!==void 0&&c.scale.setScalar(s))},[c,t?.[0],t?.[1],t?.[2],n?.[0],n?.[1],n?.[2],s]),ee.useEffect(()=>{c&&c.traverse(l=>{l instanceof Er&&l.material instanceof su&&(r?(l.material.emissive.setHex(255),l.material.emissiveIntensity=.2):l.material.emissiveIntensity=0)})},[r,c]),c?K.jsx(jX,{isHovered:r,onHover:o,onUnhover:i,object:c}):null},can=new WeakMap,d3i=()=>{const t=new Hg;return t.name="fallback-environment-map",t.mapping=fde,t},h3i=t=>{if(!t)return null;const e=t,n=can.get(e);if(n)return n;let o;if(t instanceof $de){const i=new DTe(t);o=i.fromScene(Pni(),.04).texture,i.dispose()}else o=d3i();return can.set(e,o),o};function p3i(t){const e=new e2;let n=!1;t.updateWorldMatrix(!0,!1);const o=t.parent?t.parent.matrixWorld.clone().invert():new va;return t.traverse(i=>{if(i.updateWorldMatrix(!0,!1),i instanceof Er&&i.geometry&&(i.geometry.boundingBox||i.geometry.computeBoundingBox(),i.geometry.boundingBox)){const r=o.clone().multiply(i.matrixWorld),s=i.geometry.boundingBox.clone();s.applyMatrix4(r),n?e.union(s):(e.copy(s),n=!0)}}),n?e:null}function m3i(t){const e=p3i(t);return e?e.getSize(new jt):new jt}function _3i(t,e,n="contain_within_bounds"){if(!e)return[1,1,1];const o=m3i(t),i=[o.x>0?e[0]/o.x:1,o.y>0?e[1]/o.y:1,o.z>0?e[2]/o.z:1];if(n==="fill_bounds")return i;const r=Math.min(...i);return[r,r,r]}var Bze=({model:t,position:e,rotation:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a="contain_within_bounds",scale:A})=>{const{rootObject:c}=uf(),l=ee.useMemo(()=>new lh,[]),u=ee.useMemo(()=>new lh,[]),g=ee.useMemo(()=>new lh,[]),h=ee.useMemo(()=>new lh,[]);return ee.useEffect(()=>(l.add(u),()=>{l.remove(u)}),[l,u]),ee.useEffect(()=>(u.add(g),()=>{u.remove(g)}),[u,g]),ee.useEffect(()=>(g.add(h),()=>{g.remove(h)}),[g,h]),ee.useEffect(()=>{for(;h.children.length>0;){const d=h.children[0];if(!d)break;h.remove(d)}t&&h.add(t)},[h,t]),ee.useEffect(()=>{if(!r){h.matrixAutoUpdate=!0,h.position.set(0,0,0),h.rotation.set(0,0,0),h.scale.set(1,1,1),h.updateMatrix();return}h.matrixAutoUpdate=!1,h.matrix.copy(r),h.matrixWorldNeedsUpdate=!0},[h,r]),ee.useEffect(()=>{if(c)return c.add(l),()=>{c.remove(l)}},[c,l]),ee.useEffect(()=>{if(e?l.position.fromArray(e):l.position.set(0,0,0),n?l.rotation.fromArray(n):l.rotation.set(0,0,0),g.position.fromArray(o),g.rotation.fromArray(i),g.scale.setScalar(A??1),!t){u.scale.set(1,1,1);return}u.scale.set(1,1,1),u.updateWorldMatrix(!0,!0);const d=_3i(g,s,a);u.scale.set(d[0],d[1],d[2])},[l,u,t,a,o,h,g,i,s,e,n,A]),{boardTransformGroup:l}},lan=1.25;function uan({gltfUrl:t,position:e,rotation:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a="contain_within_bounds",onHover:A,onUnhover:c,isHovered:l,scale:u,isTranslucent:g=!1}){const{renderer:h}=uf(),[d,p]=ee.useState(null),[m,_]=ee.useState(null),{boardTransformGroup:f}=Bze({model:d,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:u});if(ee.useEffect(()=>{if(!t)return;const I=new Dni;let C=!0;return I.load(t,y=>{if(!C)return;const x=y.scene;x.traverse(E=>{if(E instanceof Er&&E.material){const B=S=>{S.transparent=g,S.opacity=g?.5:1,S.depthWrite=!g,S.needsUpdate=!0};Array.isArray(E.material)?E.material.forEach(B):B(E.material),E.renderOrder=g?2:1}}),p4(x,{castShadow:!g,receiveShadow:!0}),p(x)},void 0,y=>{if(!C)return;console.error(`An error happened loading ${t}`,y);const x=y instanceof Error?y:new Error(`Failed to load glTF model from ${t}`);_(x)}),()=>{C=!1}},[t,g]),ee.useEffect(()=>{if(!d||!h)return;const I=h3i(h);if(!I)return;const C=[],y=x=>{x instanceof su&&(C.push({material:x,envMap:x.envMap??null,envMapIntensity:x.envMapIntensity??1}),x.envMap=I,(typeof x.envMapIntensity!="number"||x.envMapIntensity<lan)&&(x.envMapIntensity=lan),x.needsUpdate=!0)};return d.traverse(x=>{if(!(x instanceof Er))return;const E=x.material;Array.isArray(E)?E.forEach(y):E&&y(E)}),()=>{C.forEach(({material:x,envMap:E,envMapIntensity:B})=>{x.envMap=E,x.envMapIntensity=B,x.needsUpdate=!0})}},[d,h]),ee.useEffect(()=>{d&&d.traverse(I=>{if(!(I instanceof Er))return;const C=Array.isArray(I.material)?I.material:[I.material];for(const y of C)y instanceof su&&(l?(y.emissive.setHex(255),y.emissiveIntensity=.2):y.emissiveIntensity=0)})},[l,d]),m)throw m;return d?K.jsx(jX,{isHovered:l,onHover:A,onUnhover:c,object:f}):null}var f3i=_0(Brn()),I3i=_0(Ape()),C3i=({jscadPlan:t,positionOffset:e,rotationOffset:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a="contain_within_bounds",onHover:A,onUnhover:c,isHovered:l,scale:u,isTranslucent:g=!1})=>{const{threeGeom:h,material:d}=ee.useMemo(()=>{const _=(0,f3i.executeJscadOperations)(I3i.default,t);if(!_||!_.polygons&&!_.sides)return{threeGeom:null,material:null};const f=aan(_),I=new su({vertexColors:!0,side:r_,transparent:g,opacity:g?.5:1,depthWrite:!g});return{threeGeom:f,material:I}},[t,g]),p=ee.useMemo(()=>{if(!h)return null;const _=new Er(h,d);return _.renderOrder=g?2:1,p4(_,{castShadow:!g,receiveShadow:!0}),_},[h,d,g]),{boardTransformGroup:m}=Bze({model:p,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:u});return ee.useEffect(()=>{if(d)if(l){const _=new Vi(d.color.getHex());d.emissive.copy(_),d.emissive.setRGB(0,0,1),d.emissiveIntensity=.2}else d.emissiveIntensity=0},[l,d]),h?K.jsx(jX,{isHovered:l,onHover:A,onUnhover:c,object:m}):null};function y3i(t){return t.replace(/(DEF|USE)\s+([^\s]+)/g,(e,n,o)=>`${n} ${o.replace(/-/g,"_")}`)}async function x3i(t){const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch "${t}": ${e.status} ${e.statusText}`);const n=await e.text();return new _oi().parse(y3i(n),t)}typeof window<"u"&&!window.TSCIRCUIT_OBJ_LOADER_CACHE&&(window.TSCIRCUIT_OBJ_LOADER_CACHE=new Map);function E3i(t){const[e,n]=ee.useState(null);return ee.useEffect(()=>{if(!t)return;const o=t.replace(/&cachebust_origin=$/,""),i=window.TSCIRCUIT_OBJ_LOADER_CACHE;let r=!1;async function s(){try{if(o.endsWith(".wrl"))return await x3i(o);const A=await fetch(o);if(!A.ok)throw new Error(`Failed to fetch "${o}": ${A.status} ${A.statusText}`);const c=await A.text(),l=c.match(/newmtl[\s\S]*?endmtl/g),u=new Soi;if(l?.length){const g=l.join(`
`).replace(/^d\s+0\./gm,"d 1."),h=c.replace(/newmtl[\s\S]*?endmtl/g,"").replace(/^mtllib.*/gm,""),d=new hoi;d.setMaterialOptions({invertTrProperty:!0});const p=d.parse(g,"embedded.mtl");return u.setMaterials(p),u.parse(h)}return u.parse(c.replace(/^mtllib.*/gm,""))}catch(A){return A}}function a(){if(i.has(o)){const c=i.get(o);return c.result?Promise.resolve(c.result.clone()):c.promise.then(l=>l instanceof Error?l:l.clone())}const A=s().then(c=>(c instanceof Error||i.set(o,{...i.get(o),result:c}),c));return i.set(o,{promise:A,result:null}),A}return a().then(A=>{r||n(A)}).catch(A=>{console.error(A)}),()=>{r=!0}},[t]),e}function B3i({url:t,position:e,rotation:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a="contain_within_bounds",onHover:A,onUnhover:c,isHovered:l,scale:u,isTranslucent:g=!1}){const h=E3i(t),d=ee.useMemo(()=>{if(h&&!(h instanceof Error))return h.traverse(_=>{if(_ instanceof Er&&_.material){const f=I=>{I.transparent=g,I.opacity=g?.5:1,I.depthWrite=!g,I.needsUpdate=!0};Array.isArray(_.material)?_.material.forEach(f):f(_.material),_.renderOrder=g?2:1}}),p4(h,{castShadow:!g,receiveShadow:!0}),h;const m=new Er(new Yx(.5,.5,.5),new su({transparent:!0,color:"red",opacity:.25}));return p4(m,{castShadow:!1,receiveShadow:!0}),m},[h,g]),{boardTransformGroup:p}=Bze({model:d,position:Array.isArray(e)?e:e?[e.x,e.y,e.z]:void 0,rotation:Array.isArray(n)?n:n?[n.x,n.y,n.z]:void 0,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:u});if(h instanceof Error)throw h;return K.jsx(jX,{isHovered:l,onHover:A,onUnhover:c,object:p})}var b3i=new Vi(.82,.82,.82),gan=t=>new su({color:t?new Vi(t[0],t[1],t[2]):b3i});function S3i(t,e){const n=gan(e.color),o=e.brep_faces??[];if(o.length===0)return[n];const i=o.length>1?[...o].sort((u,g)=>u.first-g.first):o,r=[n],s=new Map,a=e.index.array.length/3;let A=0,c=0;const l=u=>{if(!u)return 0;const g=u.join(","),h=s.get(g);if(h!==void 0)return h;const d=r.length;return r.push(gan(u)),s.set(g,d),d};for(;A<a;){const u=i[c];let g=a,h=0;u&&(A<u.first?g=u.first:(g=u.last+1,h=l(u.color),c+=1)),g>A&&t.addGroup(A*3,(g-A)*3,h),A=g}return r}function Q3i(t){const e=new lh;for(const n of t){const o=n.attributes.position?.array??[],i=n.index?.array??[];if(!o.length||!i.length)continue;const r=new Zl;r.setAttribute("position",new Bs(o,3));const s=n.attributes.normal?.array??[];s.length?r.setAttribute("normal",new Bs(s,3)):r.computeVertexNormals(),r.setIndex(i),r.clearGroups();const a=S3i(r,n),A=new Er(r,a.length>1?a:a[0]);A.name=n.name,e.add(A)}return e}var bze,v3i="https://cdn.jsdelivr.net/npm/occt-import-js@0.0.23/dist";function w3i(t){if(typeof t=="function")return t;if(t&&typeof t=="object"&&"default"in t&&typeof t.default=="function")return t.default;throw new Error("Unable to resolve occt-import-js factory export")}async function P3i(){if(!bze){const t=await import("https://cdn.jsdelivr.net/npm/occt-import-js@0.0.23/+esm");bze=w3i(t)({locateFile:n=>`${v3i}/${n}`})}return bze}async function M3i(t){const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch STEP file: ${e.statusText}`);const n=await e.arrayBuffer(),i=(await P3i()).ReadStepFile(new Uint8Array(n),null);if(!i.success||!i.meshes.length)throw new Error("occt-import-js failed to convert STEP file");const r=Q3i(i.meshes),s=new pke;return await new Promise((A,c)=>{s.parse(r,l=>{l instanceof ArrayBuffer?A(l):c(new Error("GLTFExporter did not return binary output"))},l=>{c(l)},{binary:!0})})}var dan="step-glb-cache:v2:";function D3i(t){const e=new Uint8Array(t),n=32768;let o="";for(let i=0;i<e.length;i+=n){const r=e.subarray(i,i+n);o+=String.fromCharCode(...r)}return btoa(o)}function N3i(t){const e=atob(t),n=new Uint8Array(e.length);for(let o=0;o<e.length;o+=1)n[o]=e.charCodeAt(o);return n.buffer}function R3i(t){try{const e=localStorage.getItem(`${dan}${t}`);return e?N3i(e):null}catch(e){return console.warn("Failed to read STEP GLB cache",e),null}}function han(t,e){try{const n=D3i(e);localStorage.setItem(`${dan}${t}`,n)}catch(n){console.warn("Failed to write STEP GLB cache",n)}}function T3i(){const t=globalThis;return t.stepUrlToGltfModelConversions||(t.stepUrlToGltfModelConversions={inProgress:new Map,completed:new Map}),t.stepUrlToGltfModelConversions}var k3i=({stepUrl:t,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:A,onHover:c,onUnhover:l,isHovered:u,isTranslucent:g})=>{const[h,d]=ee.useState(null);return ee.useEffect(()=>{let p=!0,m=null,_=!0;const f=T3i(),I=R3i(t);if(I){const x={arrayBuffer:I,blobUrl:URL.createObjectURL(new Blob([I],{type:"model/gltf-binary"}))};return f.completed.set(t,x),m=x.blobUrl,_=!1,d(x.blobUrl),()=>{p=!1,m&&_&&URL.revokeObjectURL(m)}}const C=f.completed.get(t);if(C)return m=C.blobUrl,_=!1,d(C.blobUrl),han(t,C.arrayBuffer),()=>{p=!1,m&&_&&URL.revokeObjectURL(m)};let y=f.inProgress.get(t);return y||(y=M3i(t).then(x=>{const E={arrayBuffer:x,blobUrl:URL.createObjectURL(new Blob([x],{type:"model/gltf-binary"}))};return f.completed.set(t,E),f.inProgress.delete(t),E}).catch(x=>{throw f.inProgress.delete(t),x}),f.inProgress.set(t,y)),y.then(x=>{p&&(m=x.blobUrl,_=!1,d(x.blobUrl),han(t,x.arrayBuffer))}).catch(x=>{console.error("Failed to convert STEP file to GLB",x),p&&d(null)}),()=>{p=!1,m&&_&&URL.revokeObjectURL(m)}},[t]),h?K.jsx(uan,{gltfUrl:h,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:A,onHover:c,onUnhover:l,isHovered:u,isTranslucent:g}):null};function wpe(t,e){let{x:n,y:o,z:i}=t;if(e.axisMapping){const r={x:n,y:o,z:i};e.axisMapping.x&&(n=Sze(r,e.axisMapping.x)),e.axisMapping.y&&(o=Sze(r,e.axisMapping.y)),e.axisMapping.z&&(i=Sze(r,e.axisMapping.z))}if(n*=e.flipX??1,o*=e.flipY??1,i*=e.flipZ??1,e.rotation){if(e.rotation.x){const r=e.rotation.x*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=o*s-i*a,c=o*a+i*s;o=A,i=c}if(e.rotation.y){const r=e.rotation.y*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=n*s+i*a,c=-n*a+i*s;n=A,i=c}if(e.rotation.z){const r=e.rotation.z*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=n*s-o*a,c=n*a+o*s;n=A,o=c}}return{x:n,y:o,z:i}}function Sze(t,e){switch(e){case"x":return t.x;case"y":return t.y;case"z":return t.z;case"-x":return-t.x;case"-y":return-t.y;case"-z":return-t.z;default:return 0}}var Qze={STEP_INVERTED:{axisMapping:{x:"-x",y:"z",z:"-y"}},Z_UP_TO_Y_UP_USB_FIX:{axisMapping:{x:"x",y:"-z",z:"y"},flipZ:-1},FOOTPRINTER_MODEL_TRANSFORM:{axisMapping:{x:"x",y:"-z",z:"y"},flipX:-1,rotation:{x:180,y:180}}};function F3i(t,e){if(e.coordinateTransform)return e.coordinateTransform;if(!e.usingGlbCoordinates){if(e.hasFootprinterModel)return Qze.FOOTPRINTER_MODEL_TRANSFORM;if(!e.usingObjFormat)return e.usingStepFormat?Qze.STEP_INVERTED:Qze.Z_UP_TO_Y_UP_USB_FIX}}function $X(t,e){return F3i(t,{usingGlbCoordinates:e==="gltf"||e==="glb"||e==="jscad",usingObjFormat:e==="obj"||e==="wrl",usingStepFormat:e==="step",hasFootprinterModel:e==="footprinter"})}function Ppe(t){if(!t)return;const e=wpe({x:1,y:0,z:0},t),n=wpe({x:0,y:1,z:0},t),o=wpe({x:0,y:0,z:1},t);return new va().makeBasis(new jt(e.x,e.y,e.z),new jt(n.x,n.y,n.z),new jt(o.x,o.y,o.z))}function _P(t){return t*Math.PI/180}function L3i(t){if(t==="z+")return[0,0,0];switch(t){case"x+":return[0,_P(-90),0];case"x-":return[0,_P(90),0];case"y+":return[_P(90),0,0];case"y-":return[_P(-90),0,0];case"z-":return[_P(180),0,0];default:return[0,0,0]}}function H3i(t,e,n){if(!t.position)return;let o=t.position.z;return!t.is_on_folded_board&&t.pcb_component_id&&e==="bottom"&&t.position.z>=0&&(o=-(t.position.z+n)),[t.position.x,t.position.y,o]}function O3i(t,e){return t.rotation?[_P(t.rotation.x),_P(t.rotation.y),_P(t.rotation.z)]:e==="bottom"?[Math.PI,0,0]:[0,0,0]}function G3i(t,e){const n=new jt(t.x,t.y,t.z),o=new t2(e[0],e[1],e[2],"XYZ");return n.applyEuler(o),[n.x,n.y,n.z]}function Y3i(t,e,n){if(!t.model_origin_position)return[0,0,0];const o=e?wpe(t.model_origin_position,e):t.model_origin_position;return G3i(o,n)}function U3i(t,e){const n=H3i(t,e.layer,e.pcbThickness),o=O3i(t,e.layer),i=$X(t,e.modelType),r=L3i(t.model_board_normal_direction??"z+"),s=Y3i(t,i,r);return{position:n,rotation:o,modelPosition:[-s[0],-s[1],-s[2]],modelRotation:r,scale:t.model_unit_to_mm_scale_factor??void 0,fitMode:t.model_object_fit??"contain_within_bounds",size:t.size?[t.size.x,t.size.y,t.size.z]:void 0}}var K3i=t=>t.model_glb_url||t.model_gltf_url?t.model_glb_url?"glb":"gltf":t.model_obj_url||t.model_wrl_url||t.model_stl_url?t.model_wrl_url?"wrl":t.model_stl_url?"stl":"obj":t.model_jscad?"jscad":t.footprinter_string?"footprinter":t.model_step_url?"step":"unknown",V3i=t=>t==="step"?"glb":t,z3i=(t,e)=>{if(!t.pcb_component_id||!t.model_jscad||t.model_origin_alignment!=="bottom_center_of_component")return!1;const n=e.find(o=>o.type==="pcb_component"&&o.pcb_component_id===t.pcb_component_id);return!!(n&&n.do_not_place&&n.is_allowed_to_be_off_board&&n.obstructs_within_bounds===!1)},J3i=(t,e)=>{if(t)return e?e(t):t},W3i=(...t)=>t,vze=class extends Fs.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}render(){return this.state.hasError&&this.state.error?this.props.fallback({error:this.state.error}):this.props.children}},j3i=({error:t,onError:e})=>(ee.useEffect(()=>{e(t)},[t,e]),null),pan=({cad_component:t,circuitJson:e,resolveStaticAsset:n})=>{const o=wrn(e),[i,r]=ee.useState(!1),{visibility:s}=AT(),[a,A]=ee.useState(null),c=ee.useCallback(Y=>{Y?.mousePosition?(r(!0),A(Y.mousePosition)):(r(!1),A(null))},[]),l=ee.useCallback(()=>{r(!1),A(null)},[]),u=ee.useMemo(()=>Mr(e).source_component.getUsing({source_component_id:t.source_component_id})?.name,[e,t.source_component_id]),{pcbComponent:g,layer:h,isThroughHole:d}=ee.useMemo(()=>mmi(t,e),[t,e]),p=ee.useCallback(Y=>J3i(Y,n),[n]),m=p(t.model_wrl_url??t.model_stl_url??t.model_obj_url),_=p(t.model_glb_url??t.model_gltf_url),f=p(t.model_step_url),[I,C]=ee.useState(0),[y,x]=ee.useState(null);ee.useEffect(()=>{C(0),x(null)},[t.cad_component_id,m,_,f]);const E=ee.useMemo(()=>z3i(t,e),[t,e]),B=E?s.enclosure==="translucent":!!t.show_as_translucent_model,S=K3i(t),Q=V3i(S),w=t.model_glb_url?"glb":"gltf",M=t.model_wrl_url?"wrl":t.model_stl_url?"stl":"obj",k=ee.useMemo(()=>U3i(t,{layer:h,pcbThickness:o,modelType:Q}),[t,h,o,Q]),R=W3i(...k.rotation),F=k.position,O=ee.useMemo(()=>{const Y=[];return _&&Y.push(K.jsx(uan,{gltfUrl:_,position:F,rotation:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,w)),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},`${t.cad_component_id}-gltf-${_}`)),m&&Y.push(K.jsx(B3i,{url:m,position:F,rotation:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,M)),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},`${t.cad_component_id}-mixed-${m}`)),f&&!t.model_jscad&&!t.footprinter_string&&Y.push(K.jsx(k3i,{stepUrl:f,position:F,rotation:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,Q)),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},`${t.cad_component_id}-step-${f}`)),Y},[F,t.cad_component_id,t.footprinter_string,t.model_jscad,B,_,w,c,l,i,M,k.modelPosition,k.modelRotation,k.scale,k.fitMode,k.size,Q,R,f,m]);let U=null;if(O.length>0){if(I>=O.length){if(y)throw y;return null}U=K.jsx(vze,{fallback:({error:Y})=>K.jsx(j3i,{error:Y,onError:W=>{x(W),C(te=>Math.max(te,I+1))}}),children:O[I]},`${t.cad_component_id}-fallback-${I}`)}else t.model_jscad?U=K.jsx(C3i,{jscadPlan:t.model_jscad,positionOffset:F,rotationOffset:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,"jscad")),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},t.cad_component_id):t.footprinter_string&&(U=K.jsx(g3i,{positionOffset:F,rotationOffset:R,footprint:t.footprinter_string,scale:k.scale,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B}));if(E){if(s.enclosure==="hidden")return null}else if(t.show_as_translucent_model){if(!s.translucentModels)return null}else if(g&&(d&&!s.throughHoleModels||!d&&!s.smtModels))return null;return K.jsxs(K.Fragment,{children:[K.jsx(gmi,{cadComponent:t,children:U}),i&&a?K.jsx(Prn,{position:a,style:{fontFamily:"sans-serif",transform:"translate3d(1rem, 1rem, 0)",backgroundColor:"white",padding:"5px",borderRadius:"3px",pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:u??"<unknown>"}):null]})},man={version:"0.0.609"},_an="cadViewerLightingEnabled",$3i=()=>typeof window>"u"?!0:window.localStorage.getItem(_an)!=="false",fan=ee.createContext(void 0),q3i=({children:t})=>{const[e,n]=ee.useState(!1),[o,i]=ee.useState(!1),[r,s]=ee.useState($3i);ee.useEffect(()=>{window.localStorage.setItem(_an,r?"true":"false")},[r]);const a=ee.useMemo(()=>({darkBackgroundEnabled:e,setDarkBackgroundEnabled:n,gridEnabled:o,setGridEnabled:i,lightingEnabled:r,setLightingEnabled:s}),[e,o,r]);return K.jsx(fan.Provider,{value:a,children:t})},wze=()=>{const t=ee.useContext(fan);if(!t)throw new Error("useAppearance must be used within an AppearanceProvider");return t},Ian="cadViewerCameraStateSession",Can=(t,e)=>{try{const n={position:t.position.toArray(),quaternion:t.quaternion.toArray(),up:t.up.toArray(),fov:t.fov??50,target:e.target.toArray()};sessionStorage.setItem(Ian,JSON.stringify(n))}catch(n){console.warn("Failed to save camera:",n)}},Pze=(t,e)=>{try{const n=sessionStorage.getItem(Ian);if(!n)return!1;const o=JSON.parse(n);if(t.position.fromArray(o.position),t.quaternion.fromArray(o.quaternion),t.up.fromArray(o.up),"fov"in t){const i=t;i.fov=o.fov,i.updateProjectionMatrix?.()}return e.target.fromArray(o.target),e.update(),t.updateMatrixWorld(),!0}catch(n){return console.warn("Failed to restore camera:",n),!1}},yan=ee.createContext(void 0),X3i=({children:t,defaultTarget:e,initialCameraPosition:n,initialCameraType:o})=>{const i=ee.useRef(null),r=ee.useRef(null),[s,a]=ee.useState(null),[A,c]=ee.useState(o??"perspective"),[l,u]=ee.useState(n??null),[g,h]=ee.useState(new t2(0,0,0)),d=ee.useMemo(()=>{const[f,I,C]=n??[5,-5,5],y=Math.hypot(f-e.x,I-e.y,C-e.z);return y>0?y:5},[n,e]),p=ee.useCallback(f=>{const I=[e.x,e.y,e.z],C=r.current,y=i.current;let x=d;switch(C&&y&&(x=C.position.distanceTo(y.target)),f){case"Top Center Angled":{const E=x/Math.sqrt(2);return{position:[e.x,e.y-E,e.z+E],target:I,up:[0,0,1]}}case"Top Down":return{position:[e.x,e.y,e.z+x],target:I,up:[0,0,1]};case"Top Left Corner":return{position:[e.x-x*.6,e.y-x*.6,e.z+x*.6],target:I,up:[0,0,1]};case"Top Right Corner":return{position:[e.x+x*.6,e.y-x*.6,e.z+x*.6],target:I,up:[0,0,1]};case"Left Sideview":return{position:[e.x-x,e.y,e.z],target:I,up:[0,0,1]};case"Right Sideview":return{position:[e.x+x,e.y,e.z],target:I,up:[0,0,1]};case"Front":return{position:[e.x,e.y-x,e.z],target:I,up:[0,0,1]};default:return null}},[d,e,r,i]),m=ee.useCallback(f=>{i.current=f},[]),_=ee.useMemo(()=>({controlsRef:i,mainCameraRef:r,defaultTarget:e,baseDistance:d,controller:s,setController:a,getPresetConfig:p,handleControlsChange:m,cameraType:A,setCameraType:c,cameraPosition:l,setCameraPosition:u,cameraRotation:g,setCameraRotation:h,saveCameraToSession:Can,loadCameraFromSession:Pze}),[e,d,s,p,m,A,l,g]);return K.jsx(yan.Provider,{value:_,children:t})},gS=()=>{const t=ee.useContext(yan);if(!t)throw new Error("useCameraController must be used within a CameraControllerProvider");return t},Z3i=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,eEi=()=>{const{controlsRef:t,mainCameraRef:e,defaultTarget:n,setController:o,getPresetConfig:i}=gS(),r=ee.useRef(null),s=ee.useRef(new Zy),a=ee.useRef(new jt),A=ee.useRef(new jt),c=ee.useRef(new Zy),l=ee.useRef(new Zy),u=ee.useRef(new T0),g=ee.useRef(new T0),h=ee.useCallback(({position:p,target:m,up:_,durationMs:f=600})=>{if(!e.current)return;const I=t.current?.target??n,C=new jt(p[0],p[1],p[2]),y=m?new jt(m[0],m[1],m[2]):n.clone(),x=new jt(..._??[0,0,1]).normalize(),E=g.current;E.position.copy(C),E.up.copy(x),E.lookAt(y);const B=E.quaternion.clone(),S=e.current.quaternion.clone(),Q=e.current.position.clone(),w=I.clone(),M=u.current;M.up.set(0,0,1),M.position.copy(Q),M.lookAt(w);const k=M.quaternion.clone();M.up.set(0,0,1),M.position.copy(C),M.lookAt(y);const R=M.quaternion.clone(),F=k.clone().invert().multiply(S).normalize(),O=R.clone().invert().multiply(B).normalize();r.current={fromPosition:Q,toPosition:C,fromTarget:w,toTarget:y,toQuaternion:B,rollFrom:F,rollTo:O,startTime:performance.now(),duration:f}},[e,t,n]),d=ee.useCallback(p=>{if(p==="Custom")return;const m=i(p);m&&h(m)},[h,i]);return ee.useEffect(()=>e.current?(o({animateTo:h,animateToPreset:d}),()=>{o(null)}):void 0,[h,d,e,o]),TX(()=>{if(!e.current||!r.current)return;const{fromPosition:p,toPosition:m,fromTarget:_,toTarget:f,toQuaternion:I,rollFrom:C,rollTo:y,startTime:x,duration:E}=r.current,B=performance.now()-x,S=E<=0?1:Math.min(B/E,1),Q=Z3i(S);e.current.position.lerpVectors(p,m,Q);const w=a.current;w.copy(_).lerp(f,Q);const M=u.current;M.up.set(0,0,1),M.position.copy(e.current.position),M.lookAt(w);const k=s.current;k.copy(M.quaternion);const R=c.current;R.copy(C);const F=l.current;F.copy(y),C.dot(y)<0&&(F.x*=-1,F.y*=-1,F.z*=-1,F.w*=-1),F.normalize(),R.slerp(F,Q),e.current.quaternion.copy(k).multiply(R).normalize();const O=A.current;O.set(0,1,0).applyQuaternion(e.current.quaternion).normalize(),e.current.up.copy(O),t.current?.target.copy(w),e.current.updateMatrixWorld(),t.current?.update(),S>=1&&(e.current.position.copy(m),e.current.quaternion.copy(I),e.current.up.set(0,0,1),e.current.updateMatrixWorld(),t.current?.target.copy(f),t.current?.update(),r.current=null)}),null},tEi=()=>{const{controlsRef:t}=gS(),e=ee.useRef(null),n=ee.useRef(!1),o=ee.useRef(null),i=ee.useCallback(s=>{e.current=s,!n.current&&t.current&&Pze(s,t.current)&&(n.current=!0)},[t]),r=ee.useCallback(()=>{if(!(!e.current||!t.current)){if(!n.current&&Pze(e.current,t.current)){n.current=!0;return}clearTimeout(o.current),o.current=setTimeout(()=>{e.current&&t.current&&Can(e.current,t.current)},150)}},[t]);return{handleCameraCreated:i,handleControlsChange:r}};function nEi(t){t.querySelectorAll("canvas").forEach(e=>e.remove())}var oEi=t=>{t.outputColorSpace=Ox,t.toneMapping=PKt,t.toneMappingExposure=1,t.shadowMap.enabled=!0,t.shadowMap.type=SKt},iEi=ee.forwardRef(({children:t,scene:e,camera:n,style:o,onCreated:i},r)=>{const{cameraType:s}=gS(),a=ee.useRef(null),[A,c]=ee.useState(null),l=ee.useRef([]),u=ee.useRef(void 0);u.current=i;const g=ee.useRef(null),h=ee.useCallback(_=>{l.current.push(_)},[]),d=ee.useCallback(_=>{l.current=l.current.filter(f=>f!==_)},[]),p=ee.useMemo(()=>new KR,[]);e?.up&&p.up.set(e.up.x,e.up.y,e.up.z);const m=ee.useRef(new T0);return ee.useImperativeHandle(r,()=>m.current),ee.useEffect(()=>{if(!a.current)return;nEi(a.current);const _=new $de({antialias:!0,alpha:!0});oEi(_),_.setSize(a.current.clientWidth,a.current.clientHeight),_.setPixelRatio(window.devicePixelRatio),a.current.appendChild(_.domElement);const f=a.current.clientWidth/a.current.clientHeight,I=s==="perspective"?new sf(75,f,.1,1e3):new rY(-10*f,10*f,10,-10,-1e3,1e3);g.current?(I.position.copy(g.current.position),I.quaternion.copy(g.current.quaternion),I.up.copy(g.current.up)):(n?.up&&I.up.set(n.up[0],n.up[1],n.up[2]),n?.position&&I.position.set(n.position[0],n.position[1],n.position[2]),I.lookAt(0,0,0)),p.add(m.current),window.__TSCIRCUIT_THREE_OBJECT=m.current,c({scene:p,camera:I,renderer:_,rootObject:m.current,addFrameListener:h,removeFrameListener:d}),u.current?.({camera:I,renderer:_});let C;const y=new qti;let x=!0;const E=new IntersectionObserver(([Q])=>{x=Q?.isIntersecting??!1,x&&S()});E.observe(a.current);const B=()=>{if(C=requestAnimationFrame(B),!x)return;const Q=y.getElapsedTime(),w=y.getDelta();l.current.forEach(M=>M(Q,w)),_.render(p,I)};B();const S=()=>{if(a.current?.clientWidth&&a.current.clientHeight){const Q=a.current.clientWidth/a.current.clientHeight;I instanceof sf?I.aspect=Q:I instanceof rY&&(I.left=-10*Q,I.right=10*Q,I.top=10,I.bottom=-10),I.updateProjectionMatrix(),_.setSize(a.current.clientWidth,a.current.clientHeight)}};return window.addEventListener("resize",S),()=>{g.current={position:I.position.clone(),quaternion:I.quaternion.clone(),up:I.up.clone()},window.removeEventListener("resize",S),cancelAnimationFrame(C),E.disconnect(),a.current&&_.domElement&&a.current.removeChild(_.domElement),_.dispose(),p.remove(m.current),window.__TSCIRCUIT_THREE_OBJECT===m.current&&(window.__TSCIRCUIT_THREE_OBJECT=void 0)}},[p,h,d,s]),K.jsx("div",{ref:a,style:{width:"100%",height:"100%",...o},children:A&&K.jsx(LVe.Provider,{value:A,children:K.jsx(l3i,{children:t})})})}),rEi=`
  varying vec3 worldPosition;
  void main() {
    worldPosition = (modelMatrix * vec4(position, 1.0)).xyz;
    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
  }
`,sEi=`
  varying vec3 worldPosition;
  uniform float cellSize;
  uniform float sectionSize;
  uniform vec3 gridColor;
  uniform vec3 sectionColor;
  uniform float fadeDistance;
  uniform float fadeStrength;

  float getGrid(float size) {
    vec2 r = worldPosition.xy / size;
    vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r);
    float line = min(grid.x, grid.y);
    return 1.0 - min(line * 1.5, 1.0);
  }

  void main() {
    float g1 = getGrid(cellSize);
    float g2 = getGrid(sectionSize);

    float d = distance(worldPosition.xy, cameraPosition.xy);
    float a = 1.0 - smoothstep(fadeDistance, fadeDistance * fadeStrength, d);

    vec3 color = mix(gridColor, sectionColor, g2);

    gl_FragColor = vec4(color, max(g1, g2) * a);
    if (gl_FragColor.a <= 0.0) discard;
  }
`,aEi=({rotation:t,infiniteGrid:e,cellSize:n=1,sectionSize:o=10})=>{const{scene:i,camera:r}=uf(),s=1e3,a=ee.useMemo(()=>{const A=new VB(s,s);A.rotateX(-Math.PI/2);const c=new f6({vertexShader:rEi,fragmentShader:sEi,uniforms:{cellSize:{value:n},sectionSize:{value:o},gridColor:{value:new Vi(15658734)},sectionColor:{value:new Vi(13421823)},fadeDistance:{value:100},fadeStrength:{value:1.5}},transparent:!0,side:r_}),l=new Er(A,c);return t&&l.rotation.fromArray(t),l},[s,n,o,t]);return TX(()=>{e&&a.position.set(r.position.x,r.position.y,0)}),ee.useEffect(()=>{if(!(!i||!a))return i.add(a),()=>{i.remove(a),a.geometry.dispose(),Array.isArray(a.material)?a.material.forEach(A=>A.dispose()):a.material.dispose()}},[i,a]),null},Mze=.75,AEi=({boardDimensions:t,boardCenter:e,darkBackgroundEnabled:n=!1,shadowsEnabled:o=!1})=>{const{scene:i}=uf(),r=ee.useMemo(()=>{const s=new lh;s.name="cad-viewer-light-rig";const a=e?.x??0,A=e?.y??0,c=Math.max(t?.width??0,t?.height??0,20),l=c*.8,u=c,g=c*1.7,h=new AJt(16186360,.22);h.name="cad-viewer-soft-ambient",s.add(h);const d=new Kti(15004141,1581597,.2);d.name="cad-viewer-hemisphere",s.add(d);const p=(m,_,f,I,C=!1)=>{const y=new aJt(_,f);if(y.name=m,y.position.set(a+I[0],A+I[1],I[2]),y.target.position.set(a,A,0),y.castShadow=C,C){y.shadow.mapSize.set(2048,2048),y.shadow.bias=-2e-4,y.shadow.normalBias=.03,y.shadow.radius=5;const x=y.shadow.camera;x.left=-l,x.right=l,x.top=l,x.bottom=-l,x.near=.5,x.far=Math.max(c*4,Math.hypot(...I)+c*2),x.updateProjectionMatrix()}s.add(y),s.add(y.target)};return p("cad-viewer-key-light",16775406,1.35,[g*.68,-g*.8,g*1.08],o),p("cad-viewer-fill-light",14477554,.25,[-u*.85,u*.55,u*.75]),p("cad-viewer-rim-light",12184275,.5,[-u*.35,u*.85,u*.95]),p("cad-viewer-underside-key-light",16775406,1.35*Mze,[g*.68,-g*.8,-g*1.08]),p("cad-viewer-underside-fill-light",14477554,.25*Mze,[-u*.85,u*.55,-u*.75]),p("cad-viewer-underside-rim-light",12184275,.5*Mze,[-u*.35,u*.85,-u*.95]),s},[e,t,o]);return ee.useEffect(()=>{const s=i.background,a=i.environment;return i.background=n?new Vi(1053456):null,i.environment=null,()=>{i.background=s,i.environment=a}},[n,i]),ee.useEffect(()=>{if(i)return i.add(r),()=>{i.remove(r)}},[i,r]),null},cEi=({autoRotate:t,autoRotateSpeed:e,onStart:n,panSpeed:o,rotateSpeed:i,zoomSpeed:r,enableDamping:s,dampingFactor:a,target:A,onControlsChange:c})=>{const{camera:l,renderer:u}=uf(),g=ee.useMemo(()=>!l||!u?null:new voi(l,u.domElement),[l,u]);return ee.useEffect(()=>(c?.(g??null),()=>c?.(null)),[g,c]),ee.useEffect(()=>{if(!g)return;const h=()=>{c?.(g)};return g.addEventListener("change",h),()=>{g.removeEventListener("change",h)}},[g,c]),ee.useEffect(()=>{g&&(g.autoRotate=t||!1,g.autoRotateSpeed=e||1,o!==void 0&&(g.panSpeed=o),i!==void 0&&(g.rotateSpeed=i),r!==void 0&&(g.zoomSpeed=r),s!==void 0&&(g.enableDamping=s),a!==void 0&&(g.dampingFactor=a),g.zoomToCursor=!0,g.mouseButtons={LEFT:Vw.ROTATE,MIDDLE:Vw.PAN,RIGHT:null},A&&(g.target.set(A[0],A[1],A[2]),g.update()))},[g,t,e,o,i,r,s,a,A]),ee.useEffect(()=>{if(!(!g||!n))return g.addEventListener("start",n),()=>{g.removeEventListener("start",n)}},[g,n]),ee.useEffect(()=>{if(g)return()=>{g.dispose()}},[g]),TX(()=>{g?.update()},[g]),null},lEi=10,jY={banana:{type:"banana",label:"Show Banana",width:190,height:60,depth:34,zCenter:17},"credit-card":{type:"credit-card",label:"Show Credit Card",width:85.6,height:53.98,depth:.76,zCenter:0},"14in-macbook":{type:"14in-macbook",label:"Show 14in Macbook",width:312.6,height:221.2,depth:15.5,zCenter:0}},uEi=Object.values(jY),gEi=[{type:null,label:"None"},...uEi],dEi=(t,e)=>t===e?null:e,Dze=t=>Number.isFinite(t)?Math.max(t??0,0):0,Mpe=t=>Number.isFinite(t)?t??0:0,xan=(t,e,n)=>{const o=jY[t],i=Dze(e?.width),r=Mpe(n?.x),s=Mpe(n?.y);return{x:r+i/2+lEi+o.width/2,y:s,z:0}},hEi=(t,e,n)=>{const o=jY[t],i=Dze(e?.width),r=Dze(e?.height),s=Mpe(n?.x),a=Mpe(n?.y),A=xan(t,e,n);return{minX:Math.min(s-i/2,A.x-o.width/2),maxX:Math.max(s+i/2,A.x+o.width/2),minY:Math.min(a-r/2,A.y-o.height/2),maxY:Math.max(a+r/2,A.y+o.height/2),minZ:Math.min(0,A.z+o.zCenter-o.depth/2),maxZ:Math.max(0,A.z+o.zCenter+o.depth/2)}};function pEi(t,e){const n=new Zy().setFromEuler(new t2(t.x,t.y,t.z)),o=new jt(0,0,1);return o.applyQuaternion(n),o.multiplyScalar(e)}var mEi=()=>{const{mainCameraRef:t}=gS(),e=ee.useRef(null);return ee.useEffect(()=>{if(!e.current)return;const n=e.current,o=document.createElement("canvas");n.appendChild(o);const i=new $de({canvas:o,antialias:!0,alpha:!0});i.setSize(120,120),i.setPixelRatio(window.devicePixelRatio);const r=new KR,s=new sf(75,1,.1,1e3);s.up.set(0,0,1);const a=new AJt(16777215,Math.PI/2);r.add(a);const A=new lh;A.rotation.fromArray([Math.PI/2,0,0]);const c=1,l=new Er(new Yx(c,c,c),new su({color:"white"}));A.add(l);const u=new Jq(new gti(new Yx(c,c,c)),new VR({color:0,linewidth:2}));A.add(u),r.add(A);const g=.51,h=(B,S,Q)=>{const w=new Rke;return w.text=B,w.position.fromArray(S),Q&&w.rotation.fromArray(Q),w.color="black",w.fontSize=.25,w.anchorX="center",w.anchorY="middle",w.depthOffset=0,w.font=null,w.sync(),w},d=h("Front",[0,0,g]),p=h("Back",[0,0,-g],[0,Math.PI,0]),m=h("Right",[g,0,0],[0,Math.PI/2,0]),_=h("Left",[-g,0,0],[0,-Math.PI/2,0]),f=h("Top",[0,g,0],[-Math.PI/2,0,0]),I=h("Bottom",[0,-g,0],[Math.PI/2,0,0]);A.add(d),A.add(p),A.add(m),A.add(_),A.add(f),A.add(I);let C=null,y=!0;const x=new IntersectionObserver(([B])=>{y=B?.isIntersecting??!1});x.observe(o);const E=()=>{if(C=requestAnimationFrame(E),!!y){if(t.current){const B=pEi(t.current.rotation??new t2(0,0,0),2);B.equals(s.position)||(s.position.copy(B),s.lookAt(0,0,0))}i.render(r,s)}};return E(),()=>{x.disconnect(),o.remove(),C!==null&&cancelAnimationFrame(C),d.dispose(),p.dispose(),m.dispose(),_.dispose(),f.dispose(),I.dispose(),l.geometry.dispose(),l.material.dispose(),u.geometry.dispose(),u.material.dispose(),r.clear(),i.dispose(),i.forceContextLoss()}},[t]),K.jsx("div",{ref:e,style:{position:"absolute",top:0,left:0,width:120,height:120,zIndex:kX.orientationCube}})},Ean=(t,e,n)=>{const o=t/2,i=e/2,r=Math.min(n,o,i),s=new zzt;return s.moveTo(-o+r,-i),s.lineTo(o-r,-i),s.quadraticCurveTo(o,-i,o,-i+r),s.lineTo(o,i-r),s.quadraticCurveTo(o,i,o-r,i),s.lineTo(-o+r,i),s.quadraticCurveTo(-o,i,-o,i-r),s.lineTo(-o,-i+r),s.quadraticCurveTo(-o,-i,-o+r,-i),s},Nze=(t,e,n,o)=>Ban(Ean(t,e,o),n),Ban=(t,e)=>{const n=new oke(t,{depth:e,bevelEnabled:!1,curveSegments:24});return n.translate(0,0,-e/2),n.computeVertexNormals(),n},_Ei=(t,e)=>{const n=jY[e];t.updateMatrixWorld(!0);const i=new e2().setFromObject(t).getSize(new jt);t.scale.set(n.width/i.x,n.height/i.y,n.depth/i.z),t.updateMatrixWorld(!0);const s=new e2().setFromObject(t).getCenter(new jt);t.position.set(-s.x,-s.y,n.zCenter-s.z),t.updateMatrixWorld(!0)},fEi=()=>{const t=new Ozt([new jt(-82,18,16),new jt(-67,7,15),new jt(-43,-9,14),new jt(-15,-18,14),new jt(16,-18,14),new jt(47,-8,14.5),new jt(72,8,16),new jt(84,19,17)]),e=84,n=30,o=t.computeFrenetFrames(e,!1),i=[],r=[],s=[],a=[],A=[],c=new Vi(16766023),l=new Vi(12038965);for(let g=0;g<=e;g++){const h=g/e,d=t.getPointAt(h),p=o.normals[g],m=o.binormals[g],f=3.4+12.4*Math.sin(Math.PI*h)**.48,I=Math.max(0,(h-.82)/.18)*.38,C=c.clone().lerp(l,I);for(let y=0;y<=n;y++){const x=y/n*Math.PI*2,E=Math.sin(x),B=Math.cos(x),S=1+Math.cos(x*5+.35)*.035,Q=new jt().addScaledVector(p,B).addScaledVector(m,E*.9).normalize(),w=d.clone().addScaledVector(p,B*f*S).addScaledVector(m,E*f*.9*S);i.push(w.x,w.y,w.z),r.push(Q.x,Q.y,Q.z),s.push(C.r,C.g,C.b),a.push(h,y/n)}}for(let g=1;g<=e;g++)for(let h=1;h<=n;h++){const d=n+1,p=d*(g-1)+(h-1),m=d*g+(h-1),_=d*g+h,f=d*(g-1)+h;A.push(p,f,m,m,f,_)}const u=new Zl;return u.setIndex(A),u.setAttribute("position",new Bs(i,3)),u.setAttribute("normal",new Bs(r,3)),u.setAttribute("color",new Bs(s,3)),u.setAttribute("uv",new Bs(a,2)),u.computeBoundingBox(),u.computeBoundingSphere(),{geometry:u,curve:t}},IEi=()=>{const t=new lh,e=new lh,{geometry:n,curve:o}=fEi(),i=new Er(n,new su({color:16777215,roughness:.72,metalness:0,vertexColors:!0}));i.name="banana-peel",e.add(i);const r=new Er(new WR(3.4,20,12),new su({color:6242844,roughness:.92}));r.position.copy(o.getPointAt(0)),r.scale.set(1.15,.78,.78),r.name="banana-blossom-tip",e.add(r);const s=11,a=o.getTangentAt(1).normalize(),A=new Er(new lY(2.5,4.1,s,18),new su({color:8483625,roughness:.82}));A.quaternion.setFromUnitVectors(new jt(0,1,0),a),A.position.copy(o.getPointAt(1)).addScaledVector(a,s/2),A.name="banana-stem",e.add(A);const c=new Er(new WR(2.55,18,10),new su({color:5981470,roughness:.9}));return c.position.copy(o.getPointAt(1)).addScaledVector(a,s),c.name="banana-stem-tip",e.add(c),_Ei(e,"banana"),t.add(e),t},CEi=(t,e,n,o,i)=>{const r=Ean(t,e,o),s=new XTe;return s.absarc(0,0,i,0,Math.PI*2,!0),r.holes.push(s),Ban(r,n)},yEi=(t,e)=>{const i=new Er(new lY(e-.15,e-.15,.25,48),new su({color:10199202,roughness:.48,metalness:.28}));return i.rotation.x=Math.PI/2,i.position.z=t-.35-.25/2,i.name="macbook-lid-indent",i},xEi=()=>{const t=jY["credit-card"],e=new lh,n=new Er(Nze(t.width,t.height,t.depth,3.18),new su({color:2383272,roughness:.38,metalness:.08}));n.name="credit-card-body",e.add(n);const o=t.depth/2+.08,i=new Er(Nze(12,9,.14,1.2),new su({color:14003525,roughness:.3,metalness:.62}));i.position.set(-21,3,o),i.name="credit-card-chip",e.add(i);const r=new su({color:15331061,roughness:.45,metalness:.05});for(let s=0;s<4;s++){const a=new Er(new Yx(s===3?8:12,.8,.1),r);a.position.set(-20+s*14,-14,o+.08),a.name="credit-card-detail",e.add(a)}return e},EEi=()=>{const t=jY["14in-macbook"],e=new lh,n=new su({color:12896201,roughness:.3,metalness:.38}),o=new Er(Nze(t.width,t.height,13.5,9),n);o.position.z=-1,o.name="macbook-body",e.add(o);const i=2,r=6.75,s=r+i/2,a=12,A=new Er(CEi(t.width-1.8,t.height-1.8,i,8.2,a),n.clone());A.position.z=r,A.name="macbook-lid",e.add(A);const c=new Er(new Yx(t.width-42,3.2,1.2),new su({color:3158838,roughness:.55,metalness:.45}));c.position.set(0,t.height/2-2.4,6.15),c.name="macbook-hinge",e.add(c),e.add(yEi(s,a));const l=new Er(new Yx(54,1.2,.8),new su({color:6712174,roughness:.45,metalness:.5}));return l.position.set(0,-221.2/2+.5,2.5),l.name="macbook-front-notch",e.add(l),e},BEi=t=>{const e=t==="banana"?IEi():t==="credit-card"?xEi():EEi();return e.name=`reference-object-${t}`,e.userData.isReferenceObject=!0,e.userData.referenceObjectType=t,p4(e),e},bEi=t=>{const e=new Set,n=new Set;t.traverse(o=>{if(!(o instanceof Er))return;e.add(o.geometry);const i=Array.isArray(o.material)?o.material:[o.material];for(const r of i)n.add(r)});for(const o of e)o.dispose();for(const o of n)o.dispose()},SEi=(t,e,n,o=1.18)=>{const i=Math.max(n.maxX-n.minX,0),r=Math.max(n.maxY-n.minY,0),s=Math.max(n.maxZ-n.minZ,0),a=new jt((n.minX+n.maxX)/2,(n.minY+n.maxY)/2,(n.minZ+n.maxZ)/2),A=Math.max(Math.hypot(i,r,s)/2,1),c=e?.target??new jt,l=new jt(0,-.75,.9).normalize();let u=Math.max(t.position.distanceTo(c),5);if(t instanceof sf){const g=OG.degToRad(t.fov),h=2*Math.atan(Math.tan(g/2)*t.aspect),d=Math.min(g,h);u=A*o/Math.sin(d/2),t.far=Math.max(t.far,u+A*o*3),t.updateProjectionMatrix()}else if(t instanceof rY){const g=Math.abs(t.right-t.left)/2,h=Math.abs(t.top-t.bottom)/2;t.zoom=Math.min(g/(A*o),h/(A*o)),u=Math.max(u,A*o*2),t.updateProjectionMatrix()}return t.position.copy(a).addScaledVector(l,u),t.lookAt(a),t.updateMatrixWorld(),e&&(e.target.copy(a),e.update()),{center:a,radius:A,distance:u}},QEi=({type:t,boardDimensions:e,boardCenter:n})=>{const{scene:o}=uf(),i=ee.useMemo(()=>{const r=BEi(t),s=xan(t,e,n);return r.position.set(s.x,s.y,s.z),r},[t,e,n]);return ee.useEffect(()=>(o.add(i),()=>{o.remove(i),bEi(i)}),[o,i]),null},ban=({bounds:t})=>{const{camera:e}=uf(),{controlsRef:n}=gS();return ee.useEffect(()=>{SEi(e,n.current,t)},[t,e,n]),null},vEi=()=>{const{camera:t}=uf(),{setCameraRotation:e}=gS();return TX(()=>{t&&e(t.rotation)}),null},San=ee.forwardRef(({children:t,initialCameraPosition:e=[5,-5,5],autoRotateDisabled:n,clickToInteractEnabled:o=!1,boardDimensions:i,boardCenter:r,referenceObject:s,onUserInteraction:a,onCameraControllerReady:A},c)=>{const[l,u]=ee.useState(!o),{mainCameraRef:g,handleControlsChange:h,controller:d}=gS(),{darkBackgroundEnabled:p,gridEnabled:m,lightingEnabled:_}=wze(),{handleCameraCreated:f,handleControlsChange:I}=tEi();ee.useEffect(()=>{A&&A(d)},[d,A]);const C=ee.useMemo(()=>{if(s)return hEi(s,i,r)},[s,i,r]),y=ee.useMemo(()=>{if(!i)return 10;const E=i.width??0,B=i.height??0;return Math.max(Math.max(E,B)*1.5,10)},[i]),x=ee.useMemo(()=>{if(C)return[(C.minX+C.maxX)/2,(C.minY+C.maxY)/2,(C.minZ+C.maxZ)/2];if(r)return[r.x,r.y,0]},[r,C]);return K.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[K.jsx(mEi,{}),K.jsxs(iEi,{ref:c,scene:{up:new jt(0,0,1)},camera:{up:[0,0,1],position:e},onCreated:({camera:E})=>{g.current=E,f(E)},children:[K.jsx(umi,{}),K.jsx(eEi,{}),K.jsx(vEi,{}),l&&K.jsx(cEi,{autoRotate:!n,autoRotateSpeed:1,onStart:a,rotateSpeed:.5,panSpeed:.75,zoomSpeed:.5,enableDamping:!0,dampingFactor:.1,target:x,onControlsChange:E=>{h(E),I()}}),K.jsx(AEi,{boardDimensions:i,boardCenter:r,darkBackgroundEnabled:p,shadowsEnabled:_}),s&&K.jsx(QEi,{type:s,boardDimensions:i,boardCenter:r}),C&&K.jsx(ban,{bounds:C}),m&&K.jsx(aEi,{rotation:[Math.PI/2,0,0],infiniteGrid:!0,cellSize:3,sectionSize:y}),t]}),K.jsxs("div",{style:{position:"absolute",right:24,bottom:24,fontFamily:"sans-serif",color:"white",WebkitTextStroke:"0.5px rgba(0, 0, 0, 0.5)",fontSize:11},children:["@",man.version]}),o&&!l&&K.jsx("button",{type:"button",onClick:()=>u(!0),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&u(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:kX.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center"},children:K.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:"Click to Interact"})})]})}),wEi=t=>{const[e,n]=ee.useState([]),[o,i]=ee.useState(!0);return ee.useEffect(()=>{if(!t)return;(async()=>{i(!0);const a=(Array.isArray(t)?t:[t]).map(async(A,c)=>{const l=Sci.serialize({binary:!0},[A]),g=await new Blob(l).arrayBuffer(),d=A.layerType||(c===0?"board":void 0);return{stlData:g,color:A.color,layerType:d}});try{const A=await Promise.all(a);n(A)}catch(A){console.error("Error generating STLs:",A),n([])}finally{i(!1)}})()},[t]),{stls:e,loading:o}},PEi=_0(epe()),MEi=_0(sT()),DEi=_0(RX()),NEi=_0(sT()),REi=_0(aT()),TEi=_0(yrn()),Qan=t=>{let e=0;for(let o=0;o<t.length;o++){const i=(o+1)%t.length;e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1]}return e/2<=0},Rze=(t,e=1.2,n={})=>{const{xyOutset:o=0}=n,{outline:i}=t;let r=i.map(A=>[A.x,A.y]);Qan(r)&&(r=r.reverse());let s=(0,NEi.polygon)({points:r});o!==0&&(s=(0,TEi.expand)({delta:o,corners:"edge"},s));let a=(0,DEi.extrudeLinear)({height:e},s);return a=(0,REi.translate)([0,0,-e/2],a),a},Cs=.01,Tc={copper:[.78,.63,.39],fr4Tan:[.6,.43,.28],fr4SolderMaskGreen:[.06,.31,.19],fr4TracesWithMaskGreen:[.09,.38,.23],fr4TracesWithoutMaskTan:[.6,.43,.28],flexAmber:[.8,.61,.2],fr1Tan:[.8,.4,.2],fr1TracesWithMaskCopper:[.9,.6,.2],fr1SolderMaskGreen:[.02,.1,.04]},jB=.001,df=32,m4=150,Dpe=.6,kEi={fr1:Tc.fr1Tan,fr4:Tc.fr4Tan,flex:Tc.flexAmber},FEi={fr1:Tc.fr1SolderMaskGreen,fr4:Tc.fr4SolderMaskGreen,flex:Tc.flexAmber},LEi={red:"#650202",blue:"#003f7d",purple:"#4c1d69",black:"#071014",white:"#dddddd",yellow:"#dcc84a"},HEi=.875,OEi=/^#(?:[\da-f]{3}|[\da-f]{6})$/i,GEi=/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/i,YEi=/^rgb\(\s*\d+%\s*,\s*\d+%\s*,\s*\d+%\s*\)$/i,UEi=/^hsl\(\s*\d*\.?\d+\s*,\s*\d*\.?\d+%\s*,\s*\d*\.?\d+%\s*\)$/i,KEi={blue:.96,purple:.96,black:.99,yellow:.92},van=t=>{const e=t?.trim();if(!e)return null;const n=e.toLowerCase();if(n==="green"||n==="not_specified")return null;const i=LEi[n];return i?new Vi(i):Object.hasOwn(Vi.NAMES,n)||OEi.test(e)||GEi.test(e)||YEi.test(e)||UEi.test(e)?new Vi(n):null},VEi=t=>{const e=t?.trim().toLowerCase();return KEi[e]??HEi},zEi=({red:t,green:e,blue:n})=>Math.hypot(t-220,e-200,n-74)<4||Math.hypot(t-218,e-197,n-76)<4,JEi=({soldermaskColor:t,copperColor:e,soldermaskOpacity:n})=>t.clone().multiplyScalar(n).add(e.clone().multiplyScalar(1-n)),wan=t=>{const e=t.clone().convertLinearToSRGB();return`rgb(${[Math.round(e.r*255),Math.round(e.g*255),Math.round(e.b*255)].join(",")})`},WEi=new Vi(1063462),Tze=({material:t,solder_mask_color:e})=>{const n=van(e);if(n)return n;if(t==="fr4")return WEi.clone();const o=kEi[t]??Tc.fr4Tan;return new Vi(o[0],o[1],o[2])},jEi=t=>{const e=t.filter(A=>A.type==="pcb_panel"),n=Mr(t).pcb_board.list();let o,i,r=1.2;if(e.length>0)o=e[0],i=n.find(A=>A.pcb_panel_id===o.pcb_panel_id),r=i?.thickness??1.2;else{if(o=n.filter(c=>!c.pcb_panel_id)[0],!o)return console.warn("No pcb_board or pcb_panel found for simplified geometry"),[];i=o,r=o.thickness??1.2}let s;"outline"in o&&o.outline&&o.outline.length>0?s=Rze({outline:o.outline},r):s=(0,MEi.cuboid)({size:[o.width??10,o.height??10,r],center:[o.center.x,o.center.y,0]});const a=Tze({material:i?.material??"fr4",solder_mask_color:i?.solder_mask_color});return[(0,PEi.colorize)([a.r,a.g,a.b],s)]},qX=_0(epe()),c1=_0(NX()),kze=_0(RX()),Vx=_0(aT()),og=_0(sT()),fP=_0(sT()),$Ei=_0(RX()),Npe=_0(aT()),qEi=_0(NX()),XEi=64,ZEi=(t,e,n)=>{const o=(0,fP.ellipse)({center:[0,0],radius:[Math.max(t/2,Cs/2),Math.max(e/2,Cs/2)],segments:XEi}),i=(0,$Ei.extrudeLinear)({height:n},o);return(0,Npe.translate)([0,0,-n/2],i)},e5i=(t,e,n)=>{const o=Math.max(t,Cs),i=Math.max(e,Cs);if(Math.abs(o-i)<1e-6)return(0,fP.cylinder)({center:[0,0,0],radius:o/2,height:n});const r=o>=i,s=r?o:i,a=r?i:o,A=Math.max(s-a,0),c=(0,fP.cuboid)({center:[0,0,0],size:r?[A,a,n]:[a,A,n]});if(A<=1e-6)return(0,fP.cylinder)({center:[0,0,0],radius:a/2,height:n});const l=A/2,u=(0,fP.cylinder)({center:r?[-l,0,0]:[0,-l,0],radius:a/2,height:n}),g=(0,fP.cylinder)({center:r?[l,0,0]:[0,l,0],radius:a/2,height:n});return(0,qEi.union)(c,u,g)},Rpe=(t,e,n={})=>{const o=t.hole_shape||"circle",i=n.sizeDelta??0,r=t.hole_offset_x||0,s=t.hole_offset_y||0,a=[t.x+r,t.y+s,0];if(o==="circle"){const h=Math.max((t.hole_diameter??0)+i,Cs),d=Math.max(h/2,Cs/2);return(0,fP.cylinder)({center:a,radius:d,height:e})}const A=t.hole_width??t.hole_diameter,c=t.hole_height??t.hole_diameter;if(!A||!c)return null;const l=Math.max(A+i,Cs),u=Math.max(c+i,Cs);if(o==="oval"){const h=ZEi(l,u,e);return(0,Npe.translate)([a[0],a[1],0],h)}if(o==="pill"||o==="rotated_pill"){let h=e5i(l,u,e);if(!h)return null;const d=t.ccw_rotation||0;return d&&(h=(0,Npe.rotateZ)(d*Math.PI/180,h)),(0,Npe.translate)(a,h)}const g=Math.max((t.hole_diameter??A??c??Cs)+i,Cs);return(0,fP.cylinder)({center:a,radius:g/2,height:e})},tl=_0(sT()),M6=_0(epe()),Og=_0(NX()),Pan=_0(aT()),Tpe=_0(RX()),zx=_0(aT()),t5i=1e-5;function Man(t,e,n){if(typeof n!="number"||!Number.isFinite(n)||n<=0)return 0;const o=t/2,i=e/2,r=Math.min(o,i)-2*t5i;return Math.max(0,Math.min(n,r))}function IP(t){if(!(!t||typeof t!="object"))return t.corner_radius??t.cornerRadius??t.rect_pad_border_radius??t.rectPadBorderRadius??t.rect_border_radius??t.rectBorderRadius??void 0}var n5i=.05,Fze=64,dT=(t,e)=>e?(0,Og.intersect)(e,t):t,XX=(t,e,n={})=>{const{clipGeom:o}=n;t.shape||(t.shape="circle");const i=Math.max(e.pcbThickness*.002,Cs/5),r=Math.max(e.pcbThickness*3e-4,Cs/20),s=Math.max(e.pcbThickness*.0025,Cs/4),a=e.pcbThickness+2*n5i+4*Cs,A=Math.max(e.pcbThickness-2*(i+r+s),Cs),c=Math.max(A,Cs);if(t.shape==="circle"){const l=t.outer_diameter??Math.max(t.hole_diameter,0),u=A,g=(0,tl.cylinder)({center:[t.x,t.y,0],radius:l/2,height:u}),h=dT(g,o),d=(0,tl.cylinder)({center:[t.x,t.y,0],radius:Math.max(t.hole_diameter/2,.01),height:a});return(0,M6.colorize)(Tc.copper,(0,Og.subtract)(h,d))}if(t.shape==="oval"){const l=t.outer_width||t.hole_width||0,u=t.outer_height||t.hole_height||0,g=t.hole_width||0,h=t.hole_height||0,d=(()=>{const _=(0,tl.cylinder)({center:[0,0,0],radius:1,height:A,segments:64}),f=(0,Pan.scale)([l/2,u/2,1],_);return(0,zx.translate)([t.x,t.y,0],f)})(),p=dT(d,o),m=(()=>{const _=(0,tl.cylinder)({center:[0,0,0],radius:1,height:a,segments:64}),f=(0,Pan.scale)([Math.max(g/2,.01),Math.max(h/2,.01),1],_);return(0,zx.translate)([t.x,t.y,0],f)})();return(0,M6.colorize)(Tc.copper,(0,Og.subtract)(p,m))}if(t.shape==="circular_hole_with_rect_pad"){const l=t.hole_offset_x||0,u=t.hole_offset_y||0,g=t.rect_pad_width||t.hole_diameter,h=t.rect_pad_height||t.hole_diameter,d=IP(t),p=dT((0,Og.union)((()=>{const f=(0,tl.roundedRectangle)({size:[g,h],roundRadius:d||0,segments:Fze}),I=(0,Tpe.extrudeLinear)({height:A},f);return(0,zx.translate)([t.x,t.y,-A/2],I)})(),(0,tl.cylinder)({center:[t.x+(l||0),t.y+(u||0),0],radius:t.hole_diameter/2,height:c})),o),m=(0,tl.cylinder)({center:[t.x+(l||0),t.y+(u||0),0],radius:Math.max(t.hole_diameter/2-Cs,.01),height:a}),_=(0,Og.subtract)(p,m);return n.clipGeom?(0,M6.colorize)(Tc.copper,(0,Og.intersect)(_,n.clipGeom)):(0,M6.colorize)(Tc.copper,_)}if(t.shape==="pill"){const l=(t.ccw_rotation||0)*Math.PI/180,u=M=>{if(!l)return M;const k=(0,zx.translate)([-t.x,-t.y,0],M),R=(0,zx.rotate)([0,0,l],k);return(0,zx.translate)([t.x,t.y,0],R)},g=t.hole_height>t.hole_width,h=g?t.hole_height:t.hole_width,d=g?t.hole_width:t.hole_height,p=g?t.outer_height||d+.2:t.outer_width||h+.2,m=g?t.outer_width||h+.2:t.outer_height||d+.2,_=d/2,f=Math.abs(h-d),y=((M,k,R)=>{const F=k/2,O=Math.abs(M-k);if(O<=1e-6)return(0,tl.cylinder)({center:[t.x,t.y,0],radius:F,height:R});const U=(0,tl.cuboid)({center:[t.x,t.y,0],size:g?[k,O,R]:[O,k,R]}),Y=(0,tl.cylinder)({center:g?[t.x,t.y-O/2,0]:[t.x-O/2,t.y,0],radius:F,height:R}),W=(0,tl.cylinder)({center:g?[t.x,t.y+O/2,0]:[t.x+O/2,t.y,0],radius:F,height:R});return(0,Og.union)(U,Y,W)})(p,m,A),x=(0,tl.cuboid)({center:[t.x,t.y,0],size:g?[d-2*Cs,f,a]:[f,d-2*Cs,a]}),E=(0,tl.cylinder)({center:g?[t.x,t.y-f/2,0]:[t.x-f/2,t.y,0],radius:_-Cs,height:a}),B=(0,tl.cylinder)({center:g?[t.x,t.y+f/2,0]:[t.x+f/2,t.y,0],radius:_-Cs,height:a}),S=(0,Og.union)(x,E,B),Q=dT(u(y),o),w=u(S);return(0,M6.colorize)(Tc.copper,(0,Og.subtract)(Q,w))}if(t.shape==="pill_hole_with_rect_pad"){if(t.hole_shape&&t.hole_shape!=="pill"||t.pad_shape&&t.pad_shape!=="rect")throw new Error("Invalid hole_shape or pad_shape for pill_hole_with_rect_pad");const l=t.hole_offset_x||0,u=t.hole_offset_y||0,g=t.hole_height>t.hole_width,h=g?t.hole_height:t.hole_width,d=g?t.hole_width:t.hole_height,p=d/2,m=Math.abs(h-d),_=t.rect_pad_width||h+.2,f=t.rect_pad_height||d+.2,I=IP(t),C=.03,y=(0,Og.union)((0,tl.cuboid)({center:[t.x+l,t.y+u,0],size:g?[d+2*C,m+2*C,c]:[m+2*C,d+2*C,c]}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u-m/2,0]:[t.x+l-m/2,t.y+u,0],radius:p+C,height:c}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u+m/2,0]:[t.x+l+m/2,t.y+u,0],radius:p+C,height:c})),x=(0,Og.union)((0,tl.cuboid)({center:[t.x+l,t.y+u,0],size:g?[d,m,a]:[m,d,a]}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u-m/2,0]:[t.x+l-m/2,t.y+u,0],radius:p,height:a}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u+m/2,0]:[t.x+l+m/2,t.y+u,0],radius:p,height:a})),E=(()=>{const M=(0,tl.roundedRectangle)({size:[_,f],roundRadius:I||0,segments:Fze}),k=(0,Tpe.extrudeLinear)({height:A},M);return(0,zx.translate)([t.x,t.y,-A/2],k)})(),B=(0,Og.subtract)(E,x),S=(0,Og.union)((0,tl.cuboid)({center:[t.x+l,t.y+u,0],size:g?[d-2*Cs,m-2*Cs,a]:[m-2*Cs,d-2*Cs,a]}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u-m/2,0]:[t.x+l-m/2,t.y+u,0],radius:p-Cs,height:a}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u+m/2,0]:[t.x+l+m/2,t.y+u,0],radius:p-Cs,height:a})),Q=(0,Og.subtract)(y,S),w=dT((0,Og.union)(B,Q),o);return(0,M6.colorize)(Tc.copper,w)}else if(t.shape==="rotated_pill_hole_with_rect_pad"){if(t.hole_shape&&t.hole_shape!=="rotated_pill"||t.pad_shape&&t.pad_shape!=="rect")throw new Error("Invalid hole_shape or pad_shape for rotated_pill_hole_with_rect_pad");const l=t.hole_offset_x||0,u=t.hole_offset_y||0,g=t.hole_width,h=t.hole_height,d=g>=h,p=d?g:h,m=d?h:g,_=m/2,f=Math.abs(p-m),I=t.rect_pad_width||g+.2,C=t.rect_pad_height||h+.2,y=IP(t),x=.03,E=(t.hole_ccw_rotation||0)*Math.PI/180,B=(t.rect_ccw_rotation||0)*Math.PI/180,S=Y=>{const W=l*Math.cos(E)-u*Math.sin(E),te=l*Math.sin(E)+u*Math.cos(E),j=(0,zx.rotate)([0,0,E],Y);return(0,zx.translate)([t.x+W,t.y+te,0],j)},Q=Y=>{if(!B)return Y;const W=(0,zx.translate)([-t.x,-t.y,0],Y),te=(0,zx.rotate)([0,0,B],W);return(0,zx.translate)([t.x,t.y,0],te)},w=S((0,Og.union)((0,tl.cuboid)({center:[0,0,0],size:d?[f+2*x,m+2*x,c]:[m+2*x,f+2*x,c]}),(0,tl.cylinder)({center:d?[-f/2,0,0]:[0,-f/2,0],radius:_+x,height:c}),(0,tl.cylinder)({center:d?[f/2,0,0]:[0,f/2,0],radius:_+x,height:c}))),M=S((0,Og.union)((0,tl.cuboid)({center:[0,0,0],size:d?[f,m,a]:[m,f,a]}),(0,tl.cylinder)({center:d?[-f/2,0,0]:[0,-f/2,0],radius:_,height:a}),(0,tl.cylinder)({center:d?[f/2,0,0]:[0,f/2,0],radius:_,height:a}))),k=Q((()=>{const Y=(0,tl.roundedRectangle)({size:[I,C],roundRadius:y||0,segments:Fze}),W=(0,Tpe.extrudeLinear)({height:A},Y);return(0,zx.translate)([t.x,t.y,-A/2],W)})()),R=(0,Og.subtract)(k,M),F=S((0,Og.union)((0,tl.cuboid)({center:[0,0,0],size:d?[f-2*Cs,m-2*Cs,a]:[m-2*Cs,f-2*Cs,a]}),(0,tl.cylinder)({center:d?[-f/2,0,0]:[0,-f/2,0],radius:_-Cs,height:a}),(0,tl.cylinder)({center:d?[f/2,0,0]:[0,f/2,0],radius:_-Cs,height:a}))),O=(0,Og.subtract)(w,F),U=dT((0,Og.union)(R,O),o);return(0,M6.colorize)(Tc.copper,U)}else if(t.shape==="hole_with_polygon_pad"){const l=t.pad_outline;if(!Array.isArray(l)||l.length<3)throw new Error(`Invalid pad_outline for plated hole at (${t.x}, ${t.y})`);const u=l.map(C=>[C.x,C.y]),g=(0,tl.polygon)({points:u}),p=((C,y)=>{const x=Math.max(C,Cs),E=(0,Tpe.extrudeLinear)({height:x},g);return(0,zx.translate)([t.x,t.y,y-x/2],E)})(A,0),m=dT(p,o),_=Rpe(t,c);if(!_)return(0,M6.colorize)(Tc.copper,m);const f=Rpe(t,a,{sizeDelta:-2*Cs})||_;let I=(0,Og.union)((0,Og.subtract)(m,_),_);return n.clipGeom?(I=(0,Og.subtract)(I,f),I=(0,Og.intersect)(I,n.clipGeom),(0,M6.colorize)(Tc.copper,I)):(0,M6.colorize)(Tc.copper,(0,Og.subtract)(I,f))}else throw new Error(`Unsupported plated hole shape: ${t.shape}`)},o5i=_0(NX()),i5i=_0(aT()),Lze=_0(sT());function r5i({x:t,y:e,outerDiameter:n,holeDiameter:o,thickness:i}){if(n<=o)throw new Error(`Invalid via geometry: outerDiameter (${n}) must be > holeDiameter (${o})`);const r=Cs,s=Math.min(n/2,o/2+r),A=(0,Lze.cylinder)({center:[0,0,0],radius:s,height:i,segments:df}),c=i+2*Cs,l=(0,Lze.cylinder)({center:[0,0,0],radius:o/2,height:c,segments:df}),u=(0,o5i.subtract)(A,l);return(0,i5i.translate)([t,e,0],u)}function s5i({x:t,y:e,holeDiameter:n,thickness:o}){const i=o*1.5,r=n/2+Cs;return(0,Lze.cylinder)({center:[t,e,0],radius:r,height:i,segments:df})}function Dan(t){const e=omt(t),n=[...Mr(t).pcb_via.list()],o=new Map;for(const i of n){const s=`${e.get(i.pcb_via_id)?.pcb_board_id??""}:${i.x}:${i.y}`,a=o.get(s)??[];a.push(i),o.set(s,a)}for(const i of Mr(t).pcb_trace.list()){const r=e.get(i.pcb_trace_id);for(const[s,a]of i.route.entries()){if(a.route_type!=="via")continue;const A=`${r?.pcb_board_id??""}:${a.x}:${a.y}`,c=o.get(A)??[];if(c.some(g=>g.layers.includes(a.from_layer)&&g.layers.includes(a.to_layer)))continue;const u={type:"pcb_via",pcb_via_id:`${i.pcb_trace_id}_route_via_${s}`,pcb_trace_id:i.pcb_trace_id,subcircuit_id:i.subcircuit_id,pcb_group_id:i.pcb_group_id,x:a.x,y:a.y,layers:[a.from_layer,a.to_layer],hole_diameter:a.hole_diameter??r?.min_via_hole_diameter??.25,outer_diameter:a.outer_diameter??r?.min_via_pad_diameter??.6,tented_on_top:a.tented_on_top,tented_on_bottom:a.tented_on_bottom};n.push(u),c.push(u),o.set(A,c)}}return n}var a5i=64,A5i=1,Hze=.05,Nan=["initializing","processing_plated_holes","processing_holes","processing_cutouts","processing_vias","finalizing","done"],c5i=class{board;plated_holes;holes;pcb_vias;pcb_cutouts;boardGeom=null;platedHoleGeoms=[];viaGeoms=[];boardClipGeom=null;state="initializing";currentIndex=0;ctx;onCompleteCallback;finalGeoms=[];constructor(t,e){this.onCompleteCallback=e;const n=t.filter(i=>i.type==="pcb_panel"),o=Mr(t).pcb_board.list();if(n.length>0){const i=n[0],r=o.find(s=>s.pcb_panel_id===i.pcb_panel_id);this.board={type:"pcb_board",pcb_board_id:i.pcb_panel_id,center:i.center,width:i.width,height:i.height,thickness:r?.thickness??1.4,material:r?.material??"fr4",num_layers:r?.num_layers??2,solder_mask_color:r?.solder_mask_color}}else{const i=o.filter(r=>!r.pcb_panel_id);this.board=i[0]}this.plated_holes=Mr(t).pcb_plated_hole.list(),this.holes=Mr(t).pcb_hole.list(),this.pcb_vias=Dan(t),this.pcb_cutouts=Mr(t).pcb_cutout.list(),this.ctx={pcbThickness:this.board.thickness??1.2},this.initializeBoard()}initializeBoard(){const t=this.ctx.pcbThickness+2*A5i;this.board.outline&&this.board.outline.length>0?(this.boardGeom=Rze({outline:this.board.outline},this.ctx.pcbThickness),this.boardClipGeom=Rze({outline:this.board.outline},t,{xyOutset:Hze})):(this.boardGeom=(0,og.cuboid)({size:[this.board.width,this.board.height,this.ctx.pcbThickness],center:[this.board.center.x,this.board.center.y,0]}),this.boardClipGeom=(0,og.cuboid)({size:[this.board.width+2*Hze,this.board.height+2*Hze,t],center:[this.board.center.x,this.board.center.y,0]})),this.state="processing_plated_holes",this.currentIndex=0}goToNextState(){const t=Nan.indexOf(this.state);t!==-1&&(this.state=Nan[t+1],this.currentIndex=0)}step(t=1){if(this.state==="done"||!this.boardGeom)return!0;for(let e=0;e<t&&this.state!=="done";e++)switch(this.state){case"processing_plated_holes":this.currentIndex<this.plated_holes.length?(this.processPlatedHole(this.plated_holes[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case"processing_holes":this.currentIndex<this.holes.length?(this.processHole(this.holes[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case"processing_vias":this.currentIndex<this.pcb_vias.length?(this.processVia(this.pcb_vias[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case"processing_cutouts":this.currentIndex<this.pcb_cutouts.length?(this.processCutout(this.pcb_cutouts[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case"finalizing":this.finalize(),this.state="done";break}return this.state==="done"}processCutout(t){if(!this.boardGeom)return;let e=null;const n=this.ctx.pcbThickness*1.5;switch(t.shape){case"rect":{const o=Man(t.width,t.height,IP(t));if(o>0){const i=(0,og.roundedRectangle)({size:[t.width,t.height],roundRadius:o,segments:a5i});e=(0,kze.extrudeLinear)({height:n},i),e=(0,Vx.translate)([0,0,-n/2],e)}else e=(0,og.cuboid)({center:[0,0,0],size:[t.width,t.height,n]});if(t.rotation){const i=t.rotation*Math.PI/180;e=(0,Vx.rotateZ)(i,e)}e=(0,Vx.translate)([t.center.x,t.center.y,0],e);break}case"circle":e=(0,og.cylinder)({center:[t.center.x,t.center.y,0],radius:t.radius,height:n});break;case"polygon":{let o=t.points.map(r=>[r.x,r.y]);if(o.length<3){console.warn(`PCB Cutout [${t.pcb_cutout_id}] polygon has fewer than 3 points, skipping.`);break}Qan(o)&&(o=o.reverse());const i=(0,og.polygon)({points:o});e=(0,kze.extrudeLinear)({height:n},i),e=(0,Vx.translate)([0,0,-n/2],e);break}}e&&(this.boardGeom=(0,c1.subtract)(this.boardGeom,e))}processPlatedHole(t,e={}){if(this.boardGeom){if(t.shape==="circle"||t.shape==="circular_hole_with_rect_pad"){let n=null;if(t.shape==="circular_hole_with_rect_pad"){if(t.hole_shape&&t.hole_shape!=="circle"||t.pad_shape&&t.pad_shape!=="rect")return;n=(0,og.cylinder)({center:[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0),0],radius:t.hole_diameter/2+Cs,height:this.ctx.pcbThickness*1.5})}else n=(0,og.cylinder)({center:[t.x,t.y,0],radius:t.hole_diameter/2+Cs,height:this.ctx.pcbThickness*1.5});e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,n));const o=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(o)}else if(t.shape==="pill"||t.shape==="oval"){const n=t.hole_height>t.hole_width,o=n?t.hole_height:t.hole_width,i=n?t.hole_width:t.hole_height,r=i/2,s=Math.abs(o-i);let a;if(a=(0,c1.union)((0,og.cuboid)({center:[t.x,t.y,0],size:n?[i,s,this.ctx.pcbThickness*1.5]:[s,i,this.ctx.pcbThickness*1.5]}),(0,og.cylinder)({center:n?[t.x,t.y-s/2,0]:[t.x-s/2,t.y,0],radius:r,height:this.ctx.pcbThickness*1.5}),(0,og.cylinder)({center:n?[t.x,t.y+s/2,0]:[t.x+s/2,t.y,0],radius:r,height:this.ctx.pcbThickness*1.5})),t.ccw_rotation){const c=t.ccw_rotation*Math.PI/180;a=(0,Vx.translate)([t.x,t.y,0],(0,Vx.rotateZ)(c,(0,Vx.translate)([-t.x,-t.y,0],a)))}e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,a));const A=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(A)}else if(t.shape==="pill_hole_with_rect_pad"){if(t.hole_shape&&t.hole_shape!=="pill"||t.pad_shape&&t.pad_shape!=="rect")return;const n=t.hole_height>t.hole_width,o=n?t.hole_height:t.hole_width,i=n?t.hole_width:t.hole_height,r=i/2,s=Math.abs(o-i);let a;a=(0,c1.union)((0,og.cuboid)({center:[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0),0],size:n?[i,s,this.ctx.pcbThickness*1.5]:[s,i,this.ctx.pcbThickness*1.5]}),(0,og.cylinder)({center:n?[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0)-s/2,0]:[t.x+(t.hole_offset_x||0)-s/2,t.y+(t.hole_offset_y||0),0],radius:r,height:this.ctx.pcbThickness*1.5}),(0,og.cylinder)({center:n?[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0)+s/2,0]:[t.x+(t.hole_offset_x||0)+s/2,t.y+(t.hole_offset_y||0),0],radius:r,height:this.ctx.pcbThickness*1.5})),e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,a));const A=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(A)}else if(t.shape==="rotated_pill_hole_with_rect_pad"){if(t.hole_shape&&t.hole_shape!=="rotated_pill"||t.pad_shape&&t.pad_shape!=="rect")return;const n=t.hole_width,o=t.hole_height,i=n>=o,r=i?n:o,s=i?o:n,a=s/2,A=Math.abs(r-s),c=t.hole_offset_x||0,l=t.hole_offset_y||0;let u=(0,c1.union)((0,og.cuboid)({center:[0,0,0],size:i?[A,s,this.ctx.pcbThickness*1.5]:[s,A,this.ctx.pcbThickness*1.5]}),(0,og.cylinder)({center:i?[-A/2,0,0]:[0,-A/2,0],radius:a,height:this.ctx.pcbThickness*1.5}),(0,og.cylinder)({center:i?[A/2,0,0]:[0,A/2,0],radius:a,height:this.ctx.pcbThickness*1.5}));const g=(t.hole_ccw_rotation||0)*Math.PI/180,h=c*Math.cos(g)-l*Math.sin(g),d=c*Math.sin(g)+l*Math.cos(g);u=(0,Vx.rotateZ)(g,u);const p=(0,Vx.translate)([t.x+h,t.y+d,0],u);e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,p));const m=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(m)}else if(t.shape==="hole_with_polygon_pad"){const n=t.pad_outline;if(!Array.isArray(n)||n.length<3)return;const o=this.ctx.pcbThickness*1.5,i=Rpe(t,o,{sizeDelta:2*Cs}),r=Rpe(t,o,{sizeDelta:-2*Cs});if(!i||!r)return;e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,i)),this.platedHoleGeoms=this.platedHoleGeoms.map(a=>(0,qX.colorize)(Tc.copper,(0,c1.subtract)(a,r)));const s=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(s)}}}processHole(t){if(!this.boardGeom)return;const e=this.ctx.pcbThickness*1.5;if(t.hole_shape==="circle"){const n=(0,og.cylinder)({center:[t.x,t.y,0],radius:t.hole_diameter/2+Cs,height:e});this.boardGeom=(0,c1.subtract)(this.boardGeom,n);const o=(0,og.cylinder)({center:[t.x,t.y,0],radius:t.hole_diameter/2+Cs/2,height:e});this.platedHoleGeoms=this.platedHoleGeoms.map(i=>(0,qX.colorize)(Tc.copper,(0,c1.subtract)(i,o)))}else if(t.hole_shape==="pill"||t.hole_shape==="rotated_pill"||t.hole_shape==="rect"||t.hole_shape==="oval"){const n=t.hole_width??t.hole_diameter,o=t.hole_height??t.hole_diameter,i=t.ccw_rotation??t.rotation??0,r=.02,s=(c,l,u,g)=>{if(c<=0||l<=0)return null;if(t.hole_shape==="rect")return(0,og.cuboid)({center:[0,0,0],size:[c,l,u]});if(g)return(0,Vx.translate)([0,0,-u/2],(0,kze.extrudeLinear)({height:u},(0,og.ellipse)({radius:[c/2,l/2]})));const h=Math.min(c,l)/2,d=Math.abs(c-l);return c>l?(0,c1.union)((0,og.cuboid)({center:[0,0,0],size:[d,l,u]}),(0,og.cylinder)({center:[-d/2,0,0],radius:h,height:u}),(0,og.cylinder)({center:[d/2,0,0],radius:h,height:u})):(0,c1.union)((0,og.cuboid)({center:[0,0,0],size:[c,d,u]}),(0,og.cylinder)({center:[0,-d/2,0],radius:h,height:u}),(0,og.cylinder)({center:[0,d/2,0],radius:h,height:u}))};let a=s(n,o,e,t.hole_shape==="oval"),A=s(n-2*r,o-2*r,e,t.hole_shape==="oval");if(a&&i!==0&&(a=(0,Vx.rotateZ)(i*Math.PI/180,a)),A&&i!==0&&(A=(0,Vx.rotateZ)(i*Math.PI/180,A)),a){const c=(0,Vx.translate)([t.x,t.y,0],a);this.boardGeom=(0,c1.subtract)(this.boardGeom,c)}if(A){const c=(0,Vx.translate)([t.x,t.y,0],A);this.platedHoleGeoms=this.platedHoleGeoms.map(l=>(0,qX.colorize)(Tc.copper,(0,c1.subtract)(l,c)))}}}processVia(t){if(this.boardGeom){if(typeof t.outer_diameter=="number"&&typeof t.hole_diameter=="number"){const e=r5i({x:t.x,y:t.y,outerDiameter:t.outer_diameter,holeDiameter:t.hole_diameter,thickness:this.ctx.pcbThickness});let n=e;this.boardClipGeom&&(n=(0,c1.intersect)(this.boardClipGeom,e),n=(0,qX.colorize)(Tc.copper,n)),this.viaGeoms.push(n)}if(typeof t.hole_diameter=="number"){const e=s5i({x:t.x,y:t.y,holeDiameter:t.hole_diameter,thickness:this.ctx.pcbThickness});this.boardGeom=(0,c1.subtract)(this.boardGeom,e)}}}finalize(){if(!this.boardGeom)return;const t=Tze(this.board);this.boardGeom=(0,qX.colorize)([t.r,t.g,t.b],this.boardGeom),this.finalGeoms=[this.boardGeom,...this.platedHoleGeoms,...this.viaGeoms],this.onCompleteCallback&&this.onCompleteCallback(this.finalGeoms)}getGeoms(){return this.finalGeoms}},l5i=t=>{const[e,n]=ee.useState(null),o=ee.useRef(!1);return ee.useEffect(()=>{let i=!1;if(!t){n(null);return}if(!t.some(c=>c.type==="pcb_board"||c.type==="pcb_panel")){n(null);return}const s=jEi(t);n(s);const a=new c5i(t,c=>{});return(async()=>{if(!o.current){o.current=!0;try{let c=!1;for(;!c&&!i;)c=a.step(1),c||await new Promise(l=>setTimeout(l,0));i||n(a.getGeoms())}catch(c){console.error("Error during board geometry building:",c)}finally{o.current=!1}}})(),()=>{i=!0}},[t]),e},u5i=({children:t,parent:e,position:n,rotation:o,scale:i,color:r,fontSize:s,anchorX:a,anchorY:A,depthOffset:c})=>{const{rootObject:l}=uf(),u=ee.useMemo(()=>{const g=new Rke;return g.text=t,n&&g.position.fromArray(n),o&&g.rotation.fromArray(o),i&&g.scale.fromArray(i),g.color=r||"white",g.fontSize=s||1,g.anchorX=a||"center",g.anchorY=A||"middle",g.depthOffset=c||0,g.font=null,g.sync(),g},[t,n,o,i,r,s,a,A,c]);return ee.useEffect(()=>{const g=e||l;if(!(!g||!u))return g.add(u),()=>{g.remove(u),u.dispose()}},[l,e,u]),null},Ran=({error:t,cad_component:e})=>{const{rootObject:n}=uf(),[o,i]=ee.useState(!1),[r,s]=ee.useState(null),a=ee.useCallback(u=>{u?.mousePosition?(i(!0),s(u.mousePosition)):(i(!1),s(null))},[]),A=ee.useCallback(()=>{i(!1),s(null)},[]),c=ee.useMemo(()=>e?.position?[e.position.x,e.position.y,e.position.z].map(g=>Number.isNaN(g)?0:g):[0,0,0],[e]),l=ee.useMemo(()=>{const u=new lh;return u.position.fromArray(c),u},[c]);return l.userData.cad_component_id=e?.cad_component_id,l.userData.pcb_component_id=e?.pcb_component_id,ee.useEffect(()=>{if(n)return n.add(l),()=>{n.remove(l)}},[n,l]),K.jsxs(K.Fragment,{children:[K.jsxs(jX,{isHovered:o,onHover:a,onUnhover:A,object:l,children:[K.jsx(g5i,{parent:l}),K.jsx(u5i,{parent:l,scale:[.1,.1,.1],color:"red",anchorX:"center",anchorY:"middle",depthOffset:-99999,children:`${t.toString().slice(0,50)}...`})]}),o&&r?K.jsx(Prn,{position:r,style:{fontFamily:"sans-serif",transform:"translate3d(-1rem, 0rem, 0)",backgroundColor:"white",padding:"6px",borderRadius:"4px",color:"red",pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},children:t.toString()}):null]})},g5i=({parent:t})=>{const e=ee.useMemo(()=>{const n=new Er(new Yx(.5,.5,.5),new su({depthTest:!1,transparent:!0,color:"red",opacity:.5}));return n.renderOrder=999999,n.rotation.fromArray([Math.PI/4,Math.PI/4,0]),n},[]);return ee.useEffect(()=>(t.add(e),()=>{t.remove(e)}),[t,e]),null},d5i=t=>{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r<t.length;r++){const s=t[r];s.x<e&&(e=s.x),s.y<n&&(n=s.y),s.x>o&&(o=s.x),s.y>i&&(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}};function DC(t){if(t.outline&&t.outline.length>=3){const s=d5i(t.outline);return{...s,width:s.maxX-s.minX,height:s.maxY-s.minY,centerX:(s.minX+s.maxX)/2,centerY:(s.minY+s.maxY)/2}}const e=t.width??0,n=t.height??0,o=t.center?.x??0,i=t.center?.y??0;return{...{minX:o-e/2,maxX:o+e/2,minY:i-n/2,maxY:i+n/2},width:e,height:n,centerX:o,centerY:i}}function h5i({layer:t,circuitJson:e,boardData:n,copperColor:o,traceTextureResolution:i}){const s=Mr(e).pcb_smtpad.list().filter(y=>y.layer===t);if(s.length===0)return null;const a=Mr(e).pcb_hole.list(),A=Mr(e).pcb_plated_hole.list().filter(y=>!Array.isArray(y.layers)||y.layers.includes(t)),c=Mr(e).pcb_via.list().filter(y=>!Array.isArray(y.layers)||y.layers.includes(t)),l=Mr(e).pcb_cutout.list(),u=[...a,...A,...c],g=t==="top"?"top_copper":"bottom_copper",h=DC(n),d=document.createElement("canvas"),p=Math.floor(h.width*i),m=Math.floor(h.height*i);d.width=p,d.height=m;const _=d.getContext("2d");if(!_)return null;t==="bottom"&&(_.translate(0,m),_.scale(1,-1));const f="rgba(0,0,0,0)",I=new xl(_);I.configure({colorOverrides:{copper:{top:o,bottom:o,inner1:o,inner2:o,inner3:o,inner4:o,inner5:o,inner6:o,inner7:o,inner8:o},copperPour:{top:f,bottom:f},drill:f,boardOutline:f,substrate:f,keepout:{top:f,bottom:f},fabricationNote:f,courtyard:{top:f,bottom:f},silkscreen:{top:f,bottom:f},soldermask:{top:f,bottom:f},soldermaskWithCopperUnderneath:{top:f,bottom:f},soldermaskOverCopper:{top:f,bottom:f}}}),I.setCameraBounds({minX:h.minX,maxX:h.maxX,minY:h.minY,maxY:h.maxY}),I.drawElements([...s,...u,...l],{layers:[g],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1});const C=new Ux(d);return C.generateMipmaps=!0,C.minFilter=gm,C.magFilter=Fl,C.anisotropy=16,C.needsUpdate=!0,C}var p5i=t=>{const e=t.filter(n=>n.type==="pcb_panel");return e.length===0?null:e.length===1?e[0].pcb_panel_id:null};function m5i({layer:t,circuitJson:e,panelData:n,outlineColor:o="black",traceTextureResolution:i}){const r=p5i(e);if(!r)return null;const a=Mr(e).pcb_board.list().filter(p=>p.pcb_panel_id===r||p.position_mode==="relative_to_panel_anchor"&&!p.pcb_panel_id);if(a.length===0)return null;const A=document.createElement("canvas"),c=Math.floor(n.width*i),l=Math.floor(n.height*i);A.width=c,A.height=l;const u=A.getContext("2d");if(!u)return null;t==="bottom"&&(u.translate(0,l),u.scale(1,-1)),u.strokeStyle=o,u.lineWidth=.05*i;const g=p=>(p-n.center.x+n.width/2)*i,h=p=>(-(p-n.center.y)+n.height/2)*i;a.forEach(p=>{if(p.outline&&p.outline.length>=2)u.beginPath(),p.outline.forEach((m,_)=>{const f=g(m.x),I=h(m.y);_===0?u.moveTo(f,I):u.lineTo(f,I)}),u.closePath(),u.stroke();else{const m=p.width,_=p.height,{x:f,y:I}=p.center,C=g(f-m/2),y=h(I+_/2);u.strokeRect(C,y,m*i,_*i)}});const d=new Ux(A);return d.generateMipmaps=!0,d.minFilter=gm,d.magFilter=Fl,d.anisotropy=16,d.needsUpdate=!0,d}function _5i({layer:t,circuitJson:e,boardData:n,traceColor:o,traceTextureResolution:i}){const r=Mr(e).pcb_trace.list(),s=Mr(e).pcb_via.list(),a=Mr(e).pcb_plated_hole.list(),A=t==="top"?"top_copper":"bottom_copper",c=r.filter(C=>umt(C).includes(A));if(c.length===0)return null;const l=a.filter(C=>C.layers.includes(t)),u=[...c,...s,...l],g=DC(n),h=document.createElement("canvas"),d=Math.floor(g.width*i),p=Math.floor(g.height*i);h.width=d,h.height=p;const m=h.getContext("2d");if(!m)return null;t==="bottom"&&(m.translate(0,p),m.scale(1,-1));const _="rgba(0,0,0,0)",f=new xl(m);f.configure({colorOverrides:{copper:{top:o,bottom:o,inner1:o,inner2:o,inner3:o,inner4:o,inner5:o,inner6:o,inner7:o,inner8:o},copperPour:{top:_,bottom:_},drill:_,boardOutline:_,substrate:_,keepout:{top:_,bottom:_},fabricationNote:_,courtyard:{top:_,bottom:_},silkscreen:{top:_,bottom:_},soldermask:{top:_,bottom:_},soldermaskWithCopperUnderneath:{top:_,bottom:_},soldermaskOverCopper:{top:_,bottom:_}}}),f.setCameraBounds({minX:g.minX,maxX:g.maxX,minY:g.minY,maxY:g.maxY}),f.drawElements(u,{layers:[A],clipContextElements:e,drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1});const I=new Ux(h);return I.generateMipmaps=!0,I.minFilter=gm,I.magFilter=Fl,I.anisotropy=16,I.needsUpdate=!0,I}var f5i=t=>{const[e=0,n=0,o=0]=t;return`rgb(${Math.round(e*255)}, ${Math.round(n*255)}, ${Math.round(o*255)})`},I5i=8;function Tan({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4,copperColor:i=f5i(Tc.copper),onlyCoveredBySoldermask:r=!1}){const s=e.filter(S=>S.type==="pcb_copper_pour"),a=t==="top"?"top_copper":"bottom_copper",A=s.filter(S=>S.layer===t&&(!r||S.covered_with_solder_mask!==!1));if(A.length===0)return null;const c=e.filter(S=>S.type==="pcb_hole"),l=e.filter(S=>S.type!=="pcb_plated_hole"?!1:!Array.isArray(S.layers)||S.layers.includes(t)),u=e.filter(S=>S.type!=="pcb_via"?!1:!Array.isArray(S.layers)||S.layers.includes(t)),g=[...c,...l,...u],h=DC(n),d=document.createElement("canvas"),p=Math.floor(h.width*o),m=Math.floor(h.height*o);d.width=p,d.height=m;const _=d.getContext("2d");if(!_)return null;t==="bottom"&&(_.translate(0,m),_.scale(1,-1));const f="rgba(0,0,0,0)",I=i,C=i,y=(S,Q)=>{if(S.length===0)return;const w=[...S,...g],M=new xl(_);M.configure({colorOverrides:{copper:{top:Q,bottom:Q,inner1:Q,inner2:Q,inner3:Q,inner4:Q,inner5:Q,inner6:Q,inner7:Q,inner8:Q},copperPour:{top:f,bottom:f},drill:f,boardOutline:f,substrate:f,keepout:{top:f,bottom:f},fabricationNote:f,courtyard:{top:f,bottom:f},silkscreen:{top:f,bottom:f},soldermask:{top:f,bottom:f},soldermaskWithCopperUnderneath:{top:f,bottom:f},soldermaskOverCopper:{top:f,bottom:f}}}),M.setCameraBounds({minX:h.minX,maxX:h.maxX,minY:h.minY,maxY:h.maxY}),M.drawElements(w,{layers:[a],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1});for(let k=1;k<I5i;k+=1)M.drawElements(w,{layers:[a],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1})},x=A.filter(S=>S.covered_with_solder_mask!==!1),E=A.filter(S=>S.covered_with_solder_mask===!1);y(x,I),r||y(E,C);const B=new Ux(d);return B.generateMipmaps=!0,B.minFilter=gm,B.magFilter=Fl,B.anisotropy=16,B.needsUpdate=!0,B}var kan=(t,e)=>{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},C5i=({ctx:t,layer:e,bounds:n,elements:o,copperColor:i})=>{const r=e==="top"?"top_copper":"bottom_copper",s=new xl(t);s.configure({colorOverrides:{copper:{top:i,bottom:i,inner1:i,inner2:i,inner3:i,inner4:i,inner5:i,inner6:i,inner7:i,inner8:i}}}),kan(s,n),s.drawElements(o,{layers:[r]});const a=o.filter(u=>u.type==="pcb_copper_text"&&u.is_knockout===!0);if(a.length===0)return;const A=document.createElement("canvas");A.width=t.canvas.width,A.height=t.canvas.height;const c=A.getContext("2d");if(!c)return;const l=new xl(c);l.configure({colorOverrides:{copper:{top:"rgb(255,255,255)",bottom:"rgb(255,255,255)",inner1:"rgb(255,255,255)",inner2:"rgb(255,255,255)",inner3:"rgb(255,255,255)",inner4:"rgb(255,255,255)",inner5:"rgb(255,255,255)",inner6:"rgb(255,255,255)",inner7:"rgb(255,255,255)",inner8:"rgb(255,255,255)"}}}),kan(l,n),l.drawElements(a.map(u=>({...u,is_knockout:!1})),{layers:[r]}),t.save(),t.globalCompositeOperation="destination-out",t.drawImage(A,0,0),t.restore()};function y5i({layer:t,circuitJson:e,boardData:n,copperColor:o="rgb(230, 153, 51)",traceTextureResolution:i=m4}){const r=e.filter(g=>g.type==="pcb_copper_text"&&"layer"in g&&g.layer===t);if(r.length===0)return null;const s=DC(n),a=Math.floor(s.width*i),A=Math.floor(s.height*i);if(a<=0||A<=0)return null;const c=document.createElement("canvas");c.width=a,c.height=A;const l=c.getContext("2d");if(!l)return null;t==="bottom"&&(l.translate(0,A),l.scale(1,-1)),C5i({ctx:l,layer:t,bounds:s,elements:r,copperColor:o});const u=new Ux(c);return u.generateMipmaps=!0,u.minFilter=gm,u.magFilter=Fl,u.anisotropy=16,u.needsUpdate=!0,u}var Fan=25.4,x5i=Fan/1e3,E5i=/^\s*(-?\d*(?:\.\d+)?)(?:\s*(mm|mil|inch|in|"))?\s*$/i;function B5i(t){if(!t)return;const e=t.trim().toLowerCase();return e==='"'||e==="inch"?"in":e}function kpe(t){if(t==null)return;if(typeof t=="number")return Number.isFinite(t)?t:void 0;if(typeof t!="string")return;const e=t.trim();if(e.length===0)return;const n=e.match(E5i);if(!n){const a=Number.parseFloat(e);return Number.isFinite(a)?a:void 0}const[,o,i]=n,r=Number.parseFloat(o||"0");if(!Number.isFinite(r))return;switch(B5i(i)){case"mil":return r*x5i;case"in":return r*Fan;case"mm":case void 0:return r;default:return r}}function k0(t,e){const n=kpe(t);return n===void 0?e:n}var b5i="rgb(255,243,204)",ig="rgba(0,0,0,0)",S5i=(t,e)=>{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},Q5i=t=>t.type==="pcb_fabrication_note_rect"?{...t,width:kpe(t.width)??0,height:kpe(t.height)??0,stroke_width:k0(t.stroke_width,.1),corner_radius:kpe(t.corner_radius)}:t.type==="pcb_fabrication_note_path"?{...t,stroke_width:k0(t.stroke_width,.1)}:t.type==="pcb_fabrication_note_text"?{...t,font_size:k0(t.font_size,1)}:t.type==="pcb_fabrication_note_dimension"?{...t,font_size:k0(t.font_size,1),arrow_size:k0(t.arrow_size,1),offset_distance:k0(t.offset_distance,0)}:t,v5i=({ctx:t,layer:e,bounds:n,elements:o})=>{const i=`${e}_fabrication_note`,r=o.map(Q5i),s=new xl(t);s.configure({colorOverrides:{copper:{top:ig,bottom:ig,inner1:ig,inner2:ig,inner3:ig,inner4:ig,inner5:ig,inner6:ig,inner7:ig,inner8:ig},copperPour:{top:ig,bottom:ig},drill:ig,boardOutline:ig,substrate:ig,keepout:{top:ig,bottom:ig},courtyard:{top:ig,bottom:ig},soldermask:{top:ig,bottom:ig},soldermaskWithCopperUnderneath:{top:ig,bottom:ig},soldermaskOverCopper:{top:ig,bottom:ig},silkscreen:{top:ig,bottom:ig},fabricationNote:b5i}}),S5i(s,n),s.drawElements(r,{layers:[i]})},w5i=t=>({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2,width:t.width,height:t.height,centerX:t.center.x,centerY:t.center.y}),P5i=(t,e)=>{const n=Math.min(t.minX,e.minX),o=Math.max(t.maxX,e.maxX),i=Math.min(t.minY,e.minY),r=Math.max(t.maxY,e.maxY);return{minX:n,maxX:o,minY:i,maxY:r,width:o-n,height:r-i,centerX:(n+o)/2,centerY:(i+r)/2}},Fpe=(t,e)=>{const n=t.filter(s=>s.type==="pcb_panel"),o=t.filter(s=>s.type==="pcb_board"),i=n.find(s=>s.pcb_panel_id===e.pcb_board_id)??n[0];return i&&i.width>0&&i.height>0?w5i(i):(o.length>1?o:[e]).map(s=>DC(s)).reduce((s,a)=>P5i(s,a))},M5i=(t,e)=>{if(!("layer"in t)||t.layer!==e)return!1;const n=t.type;return n.startsWith("pcb_fabrication_note_")&&n!=="pcb_fabrication_note_text"};function D5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4}){const i=e.filter(u=>M5i(u,t));if(i.length===0)return null;const r=Fpe(e,n),s=Math.floor(r.width*o),a=Math.floor(r.height*o);if(s<=0||a<=0)return null;const A=document.createElement("canvas");A.width=s,A.height=a;const c=A.getContext("2d");if(!c)return null;t==="bottom"&&(c.translate(0,a),c.scale(1,-1)),v5i({ctx:c,layer:t,bounds:r,elements:i});const l=new Ux(A);return l.generateMipmaps=!0,l.minFilter=gm,l.magFilter=Fl,l.anisotropy=16,l.needsUpdate=!0,l}var N5i=(t,e)=>{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},R5i=({ctx:t,layer:e,bounds:n,elements:o,keepoutColor:i})=>{const r=e==="top"?"top_copper":"bottom_copper",s=new xl(t);s.configure({colorOverrides:{keepout:{top:i,bottom:i}}}),N5i(s,n),s.drawElements(o,{layers:[r],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1})},T5i=(t,e)=>t.type!=="pcb_keepout"?!1:!("layers"in t)||!Array.isArray(t.layers)?!0:t.layers.includes(e);function k5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4,keepoutColor:i=t==="bottom"?"#4b72d2":"#d24b4b"}){const r=e.filter(g=>T5i(g,t));if(r.length===0)return null;const s=DC(n),a=Math.floor(s.width*o),A=Math.floor(s.height*o);if(a<=0||A<=0)return null;const c=document.createElement("canvas");c.width=a,c.height=A;const l=c.getContext("2d");if(!l)return null;t==="bottom"&&(l.translate(0,A),l.scale(1,-1)),R5i({ctx:l,layer:t,bounds:s,elements:r,keepoutColor:i});const u=new Ux(c);return u.generateMipmaps=!0,u.minFilter=gm,u.magFilter=Fl,u.anisotropy=16,u.needsUpdate=!0,u}var Nu="rgba(0,0,0,0)",F5i=(t,e)=>{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},L5i=t=>t.type==="pcb_note_line"?{...t,x1:k0(t.x1,0),y1:k0(t.y1,0),x2:k0(t.x2,0),y2:k0(t.y2,0),stroke_width:k0(t.stroke_width,.1)}:t.type==="pcb_note_rect"?{...t,center:{x:k0(t.center.x,0),y:k0(t.center.y,0)},width:k0(t.width,0),height:k0(t.height,0),stroke_width:k0(t.stroke_width,.1),corner_radius:k0(t.corner_radius,0)}:t.type==="pcb_note_text"?{...t,anchor_position:{x:k0(t.anchor_position.x,0),y:k0(t.anchor_position.y,0)},font_size:k0(t.font_size,1)}:t.type==="pcb_note_path"?{...t,route:t.route.map(e=>({...e,x:k0(e.x,0),y:k0(e.y,0)})),stroke_width:k0(t.stroke_width,.1)}:t.type==="pcb_note_dimension"?{...t,from:{x:k0(t.from.x,0),y:k0(t.from.y,0)},to:{x:k0(t.to.x,0),y:k0(t.to.y,0)},font_size:k0(t.font_size,1),arrow_size:k0(t.arrow_size,1),offset_distance:k0(t.offset_distance,0)}:t,H5i=({ctx:t,bounds:e,elements:n})=>{const o=n.map(L5i),i=new xl(t);i.configure({colorOverrides:{copper:{top:Nu,bottom:Nu,inner1:Nu,inner2:Nu,inner3:Nu,inner4:Nu,inner5:Nu,inner6:Nu,inner7:Nu,inner8:Nu},copperPour:{top:Nu,bottom:Nu},drill:Nu,boardOutline:Nu,substrate:Nu,keepout:{top:Nu,bottom:Nu},courtyard:{top:Nu,bottom:Nu},soldermask:{top:Nu,bottom:Nu},soldermaskWithCopperUnderneath:{top:Nu,bottom:Nu},soldermaskOverCopper:{top:Nu,bottom:Nu},silkscreen:{top:Nu,bottom:Nu},fabricationNote:Nu}}),F5i(i,e),i.drawElements(o)},O5i=(t,e)=>!("layer"in t)||t.layer!==e?!1:t.type.startsWith("pcb_note_");function G5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4}){const i=e.filter(u=>O5i(u,t));if(i.length===0)return null;const r=Fpe(e,n),s=Math.floor(r.width*o),a=Math.floor(r.height*o);if(s<=0||a<=0)return null;const A=document.createElement("canvas");A.width=s,A.height=a;const c=A.getContext("2d");if(!c)return null;t==="bottom"&&(c.translate(0,a),c.scale(1,-1)),H5i({ctx:c,bounds:r,elements:i});const l=new Ux(A);return l.generateMipmaps=!0,l.minFilter=gm,l.magFilter=Fl,l.anisotropy=16,l.needsUpdate=!0,l}var Y5i="rgb(255,243,204)",bd="rgba(0,0,0,0)",Lan=(t,e,n)=>{const o=e==="top"?t.tented_on_top:t.tented_on_bottom,i="is_tented"in t?t.is_tented:void 0,r=e==="top"?n?.default_via_tented_on_top:n?.default_via_tented_on_bottom;return o??i??r??!1},U5i=(t,e,n,o)=>t.type==="pcb_cutout"?!0:t.type==="pcb_via"?!o||!Lan(t,e,n):t.type==="pcb_hole"||t.type==="pcb_plated_hole"?!o||t.is_covered_with_solder_mask!==!0:!1,K5i=(t,e)=>{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},V5i=({ctx:t,layer:e,bounds:n,elements:o,circuitJson:i,silkscreenColor:r,soldermaskVisible:s})=>{const a=e==="top"?"top_silkscreen":"bottom_silkscreen",A=new xl(t);A.configure({colorOverrides:{copper:{top:bd,bottom:bd,inner1:bd,inner2:bd,inner3:bd,inner4:bd,inner5:bd,inner6:bd,inner7:bd,inner8:bd},copperPour:{top:bd,bottom:bd},drill:bd,boardOutline:bd,substrate:bd,keepout:{top:bd,bottom:bd},courtyard:{top:bd,bottom:bd},soldermask:{top:bd,bottom:bd},soldermaskWithCopperUnderneath:{top:bd,bottom:bd},soldermaskOverCopper:{top:bd,bottom:bd},silkscreen:{top:r,bottom:r},fabricationNote:Y5i}}),K5i(A,n),A.drawElements(o,{layers:[a],clipContextElements:i});const c=i.flatMap(l=>{if(l.type==="pcb_trace"){const g=t.boardOwnerMap?.get(l.pcb_trace_id),h=l.route.filter(d=>d.route_type==="via"&&(!s||!Lan(d,e,g)));return h.length?[{...l,route:h}]:[]}const u=l.type==="pcb_via"?t.boardOwnerMap?.get(l.pcb_via_id):void 0;return U5i(l,e,u,s)?[l]:[]});A.drawElements(c,{layers:[a],clipContextElements:i,clearDrillHoles:!0})},z5i=(t,e)=>!("layer"in t)||t.layer!==e?!1:t.type.startsWith("pcb_silkscreen_");function J5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4,silkscreenColor:i="rgb(255,255,255)",soldermaskVisible:r=!0}){const s=e.filter(h=>z5i(h,t));if(s.length===0)return null;const a=Fpe(e,n),A=Math.floor(a.width*o),c=Math.floor(a.height*o);if(A<=0||c<=0)return null;const l=document.createElement("canvas");l.width=A,l.height=c;const u=l.getContext("2d");if(!u)return null;t==="bottom"&&(u.translate(0,c),u.scale(1,-1)),V5i({ctx:u,layer:t,bounds:a,elements:s,circuitJson:e,silkscreenColor:i,soldermaskVisible:r});const g=new Ux(l);return g.generateMipmaps=!0,g.minFilter=gm,g.magFilter=Fl,g.anisotropy=16,g.needsUpdate=!0,g}var ZX=t=>{const[e=0,n=0,o=0]=t;return`rgb(${Math.round(e*255)}, ${Math.round(n*255)}, ${Math.round(o*255)})`},W5i=t=>{const e=ZX(FEi[t.material]??Tc.fr4SolderMaskGreen),n=t.material==="fr1"?ZX(Tc.fr1TracesWithMaskCopper):ZX(Tc.fr4TracesWithMaskGreen),o=van(t.solder_mask_color);if(!o)return{soldermask:e,soldermaskOverCopper:n,copper:ZX(Tc.copper),transparent:"rgba(0,0,0,0)"};const i=new Vi().setRGB(Tc.copper[0],Tc.copper[1],Tc.copper[2],Ox);return{soldermask:wan(o),soldermaskOverCopper:wan(JEi({soldermaskColor:o,copperColor:i,soldermaskOpacity:VEi(t.solder_mask_color)})),copper:ZX(Tc.copper),transparent:"rgba(0,0,0,0)"}},Han=(t,e)=>{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},j5i=({ctx:t,layer:e,bounds:n,elements:o,boardData:i})=>{const r=W5i(i),s=e==="top"?"top_copper":"bottom_copper",a=new xl(t);a.configure({colorOverrides:{copper:{top:r.transparent,bottom:r.transparent,inner1:r.transparent,inner2:r.transparent,inner3:r.transparent,inner4:r.transparent,inner5:r.transparent,inner6:r.transparent,inner7:r.transparent,inner8:r.transparent},drill:r.transparent,boardOutline:r.transparent,substrate:r.transparent,keepout:{top:r.transparent,bottom:r.transparent},fabricationNote:r.transparent,silkscreen:{top:r.transparent,bottom:r.transparent},courtyard:{top:r.transparent,bottom:r.transparent},soldermask:{top:r.soldermask,bottom:r.soldermask},soldermaskWithCopperUnderneath:{top:r.soldermaskOverCopper,bottom:r.soldermaskOverCopper},soldermaskOverCopper:{top:r.soldermaskOverCopper,bottom:r.soldermaskOverCopper}}}),Han(a,n);const A=o.filter(l=>l.type!=="pcb_keepout");a.drawElements(A,{layers:[s],drawSoldermask:!0,drawSoldermaskTop:e==="top",drawSoldermaskBottom:e==="bottom"});const c=A.filter(l=>l.type==="pcb_copper_pour"&&l.layer===e&&l.covered_with_solder_mask===!1);if(c.length>0){t.save(),t.globalCompositeOperation="destination-out";const l=new xl(t);l.configure({colorOverrides:{copper:{top:r.copper,bottom:r.copper,inner1:r.copper,inner2:r.copper,inner3:r.copper,inner4:r.copper,inner5:r.copper,inner6:r.copper,inner7:r.copper,inner8:r.copper}}}),Han(l,n),l.drawElements(c,{layers:[s]}),t.restore()}};function $5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4}){const i=Fpe(e,n),r=Math.floor(i.width*o),s=Math.floor(i.height*o);if(r<=0||s<=0)return null;const a=document.createElement("canvas");a.width=r,a.height=s;const A=a.getContext("2d");if(!A)return null;t==="bottom"&&(A.translate(0,s),A.scale(1,-1));const c=e.some(u=>u.type==="pcb_board")?e:[n,...e];j5i({ctx:A,layer:t,bounds:i,elements:c,boardData:n});const l=new Ux(a);return l.generateMipmaps=!0,l.minFilter=gm,l.magFilter=Fl,l.anisotropy=16,l.needsUpdate=!0,l}var q5i=(t,e)=>{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},X5i=({ctx:t,layer:e,bounds:n,elements:o,copperColor:i})=>{const r=e==="top"?"top_copper":"bottom_copper",s="rgba(0,0,0,0)",a=new xl(t);a.configure({colorOverrides:{copper:{top:i,bottom:i,inner1:i,inner2:i,inner3:i,inner4:i,inner5:i,inner6:i,inner7:i,inner8:i},drill:s,boardOutline:s,substrate:s,keepout:{top:s,bottom:s},fabricationNote:s,silkscreen:{top:s,bottom:s},courtyard:{top:s,bottom:s},soldermask:{top:s,bottom:s},soldermaskWithCopperUnderneath:{top:s,bottom:s},soldermaskOverCopper:{top:s,bottom:s}}}),q5i(a,n),a.drawElements(o,{layers:[r]})};function Z5i({layer:t,circuitJson:e,boardData:n,copperColor:o="rgb(230, 153, 51)",traceTextureResolution:i=m4}){const r=e.filter(g=>{if(g.type==="pcb_via")return!0;if(g.type!=="pcb_plated_hole")return!1;const h=g;return!Array.isArray(h.layers)||h.layers.includes(t)});if(r.length===0)return null;const s=DC(n),a=Math.floor(s.width*i),A=Math.floor(s.height*i);if(a<=0||A<=0)return null;const c=document.createElement("canvas");c.width=a,c.height=A;const l=c.getContext("2d");if(!l)return null;t==="bottom"&&(l.translate(0,A),l.scale(1,-1)),X5i({ctx:l,layer:t,bounds:s,elements:r,copperColor:o});const u=new Ux(c);return u.generateMipmaps=!0,u.minFilter=gm,u.magFilter=Fl,u.anisotropy=16,u.needsUpdate=!0,u}var Oan=t=>{const[e=0,n=0,o=0]=t;return`rgb(${Math.round(e*255)}, ${Math.round(n*255)}, ${Math.round(o*255)})`},Oze=t=>Math.max(0,Math.min(255,t)),e4i=(t,e,n,o={})=>{const i=t.getImageData(0,0,e,n),r=i.data,s=Math.max(e-1,1),a=Math.max(n-1,1);for(let A=0;A<r.length;A+=4){if((r[A+3]??0)<16)continue;const l=r[A]??0,u=r[A+1]??0,g=r[A+2]??0,h=.2126*l+.7152*u+.0722*g;if(!(u>l*1.35&&u>g*1.15&&h<90&&l<80&&g<80))continue;const p=A/4,m=p%e,_=Math.floor(p/e),f=m/s,I=_/a,C=f*.62+(1-I)*.38,y=Math.sin((f*1.15+I*.35)*Math.PI)*.04,x=.74+C*.18+y,E=o.includeReflection?(()=>{const k=f-.36,R=I-.22,F=Math.max(0,1-Math.hypot(k,R)/.38);return F*F*.07})():0,B=(l*.9+3)*x,S=(u*1.08+15)*x,Q=(g*1.28+13)*x;r[A]=Oze(B*(1-E)+255*E),r[A+1]=Oze(S*(1-E)+255*E),r[A+2]=Oze(Q*(1-E)+255*E)}t.putImageData(i,0,0)},t4i=({textures:t,boardData:e,traceTextureResolution:n,layer:o})=>{if(!t.some(u=>u?.image))return null;const r=DC(e),s=Math.floor(r.width*n),a=Math.floor(r.height*n);if(s<=0||a<=0)return null;const A=document.createElement("canvas");A.width=s,A.height=a+1;const c=A.getContext("2d");if(!c)return null;for(const u of t){if(!u?.image)continue;const g=u.image;c.drawImage(g,0,0,s,a)}e4i(c,s,a,{includeReflection:o==="top"});const l=new Ux(A);return l.generateMipmaps=!1,l.minFilter=Fl,l.magFilter=Fl,l.premultiplyAlpha=!0,l.anisotropy=16,l.needsUpdate=!0,l},n4i=({textures:t,soldermaskTexture:e,boardData:n,traceTextureResolution:o})=>{if(!e?.image||!t.some(l=>l?.image))return null;const i=DC(n),r=Math.floor(i.width*o),s=Math.floor(i.height*o);if(r<=0||s<=0)return null;const a=document.createElement("canvas");a.width=r,a.height=s+1;const A=a.getContext("2d");if(!A)return null;for(const l of t)l?.image&&A.drawImage(l.image,0,0,r,s);A.globalCompositeOperation="destination-in",A.drawImage(e.image,0,0,r,s),A.globalCompositeOperation="source-over";const c=new Ux(a);return c.colorSpace=_6,c.generateMipmaps=!1,c.minFilter=Fl,c.magFilter=Fl,c.premultiplyAlpha=!1,c.needsUpdate=!0,c};function Gan({circuitJson:t,boardData:e,traceTextureResolution:n,visibility:o}){const i=Oan(Tc.copper),r="rgb(255,255,255)",s=Oan(Tc.copper),a=o?.boardBody??!0,A=g=>{const h=(g==="top"?o?.topMask:o?.bottomMask)??!0,d=(g==="top"?o?.topCopper:o?.bottomCopper)??!0,p=(g==="top"?o?.topSilkscreen:o?.bottomSilkscreen)??!0,m=o?.keepout??!0,_=h?$5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,f=d?_5i({layer:g,circuitJson:t,boardData:e,traceColor:i,traceTextureResolution:n}):null,I=d?Tan({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n,copperColor:s}):null,C=h&&d?Tan({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n,copperColor:s,onlyCoveredBySoldermask:!0}):null,y=d?y5i({layer:g,circuitJson:t,boardData:e,copperColor:s,traceTextureResolution:n}):null,x=d?h5i({layer:g,circuitJson:t,boardData:e,copperColor:s,traceTextureResolution:n}):null,E=d?Z5i({layer:g,circuitJson:t,boardData:e,copperColor:s,traceTextureResolution:n}):null,B=p?J5i({layer:g,circuitJson:t,boardData:e,silkscreenColor:r,traceTextureResolution:n,soldermaskVisible:h}):null,S=p?D5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,w=o?.pcbNotes??!1?G5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,M=a?m5i({layer:g,circuitJson:t,panelData:e,traceTextureResolution:n}):null,k=m?k5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,R=t4i({textures:[I,f,x,E,_,y,B,S,w,M,k],boardData:e,traceTextureResolution:n,layer:g}),F=h&&d?n4i({textures:[f,C],soldermaskTexture:_,boardData:e,traceTextureResolution:n}):null;return{boardTexture:R,maskedCopperTexture:F}},c=e.num_layers??2,l=A("top"),u=c<2?null:A("bottom");return{topBoard:l.boardTexture,bottomBoard:u?.boardTexture??null,topMaskedCopper:l.maskedCopperTexture,bottomMaskedCopper:u?.maskedCopperTexture??null}}var $B={bumpScale:.12,normalScale:.08,roughnessBias:.015,clearcoat:.08,clearcoatRoughness:.55},Lpe={roughness:.42,metalness:.5,roughnessVariance:.035,detailStrength:.028},Hpe=.22,o4i=.7,i4i=.86,Yan={height:Hpe,microSurfaceWeight:1,roughness:.7,metalness:.015,isExposedCopper:!1,isMaskedCopper:!1},r4i={height:o4i,microSurfaceWeight:.9,roughness:.54,metalness:.025,isExposedCopper:!1,isMaskedCopper:!0},Gze=t=>Math.max(0,Math.min(1,t)),Uan=t=>1-t,eZ=(t,e,n)=>{let o=Math.imul(t,374761393)^Math.imul(e,668265263)^n;return o=Math.imul(o^o>>>13,1274126177),((o^o>>>16)>>>0)/4294967295},Kan=t=>t*t*(3-2*t),Yze=(t,e,n)=>t+(e-t)*n,Uze=(t,e,n,o)=>{const i=t/n,r=e/n,s=Math.floor(i),a=Math.floor(r),A=Kan(i-s),c=Kan(r-a),l=Yze(eZ(s,a,o),eZ(s+1,a,o),A),u=Yze(eZ(s,a+1,o),eZ(s+1,a+1,o),A);return Yze(l,u,c)},s4i=(t,e,n)=>{const o=(Uze(t,e,7,n+31)-.5)*.55,i=Math.sin(t*.12+Uze(t,e,44,n+37)*2)*.22;return(o+i)*Lpe.detailStrength},a4i=(t,e,n)=>{const o=(eZ(t,e,n+53)-.5)*.42,i=Math.sin(t*.26+e*.06)*.2+Math.sin(e*.31-t*.04)*.12;return(o+i)*.045},A4i=(t,e,n,o)=>o?r4i:zEi({red:t,green:e,blue:n})?Yan:t>120&&e>70&&n<150&&t>e*1.05&&e>n*1.15?{height:i4i,microSurfaceWeight:.9,roughness:Lpe.roughness,metalness:Lpe.metalness,isExposedCopper:!0,isMaskedCopper:!1}:t>170&&e>170&&n>160?{height:Hpe,microSurfaceWeight:.4,roughness:.76,metalness:0,isExposedCopper:!1,isMaskedCopper:!1}:e>t*1.25&&e>n*1.05&&t<110&&e<180&&n<130?Yan:{height:Hpe,microSurfaceWeight:.7,roughness:.58,metalness:.015,isExposedCopper:!1,isMaskedCopper:!1},Ope=t=>{const e=new Ux(t);return e.colorSpace=_6,e.generateMipmaps=!1,e.minFilter=Fl,e.magFilter=Fl,e.wrapS=Xy,e.wrapT=Xy,e.needsUpdate=!0,e},Van=(t,e)=>{const n=t.image;if(!n?.width||!n.height)return null;const{width:o,height:i}=n,r=n.getContext("2d");if(!r)return null;const s=e?.image,a=s?.getContext("2d"),A=s?.width??0,c=s?.height??0,l=a&&A&&c?a.getImageData(0,0,A,c):null,u=r.getImageData(0,0,o,i),g=u.data,h=new Float32Array(o*i),d=document.createElement("canvas"),p=document.createElement("canvas");d.width=p.width=o,d.height=p.height=i;const m=d.getContext("2d"),_=p.getContext("2d");if(!m||!_)return null;const f=m.createImageData(o,i),I=_.createImageData(o,i),C=f.data,y=I.data;for(let k=0;k<g.length;k+=4){const R=k/4,F=R%o,O=Math.floor(R/o);if((g[k+3]??0)<16){h[R]=Uan(Hpe);continue}const Y=l?Math.min(A-1,Math.floor(F/o*A)):0,W=l?Math.min(c-1,Math.floor(O/i*c)):0,te=l?l.data[(W*A+Y)*4+3]??0:0,j=A4i(g[k]??0,g[k+1]??0,g[k+2]??0,te>=16),J=o+i,oe=j.isExposedCopper?s4i(F,O,J):j.isMaskedCopper?a4i(F,O,J):0,ie=Gze(Uan(j.height)+oe*j.microSurfaceWeight);h[R]=ie;const ne=ie*255;g[k]=g[k+1]=g[k+2]=ne,g[k+3]=255;const ge=(j.isExposedCopper?Gze(j.roughness+oe*.7+(Uze(F,O,36,J+17)-.5)*Lpe.roughnessVariance):j.isMaskedCopper?Gze(j.roughness+oe+$B.roughnessBias):j.roughness)*255;C[k]=C[k+1]=C[k+2]=ge,C[k+3]=255;const _e=j.metalness*255;y[k]=y[k+1]=y[k+2]=_e,y[k+3]=255}m.putImageData(f,0,0),_.putImageData(I,0,0);const x=document.createElement("canvas");x.width=o,x.height=i;const E=x.getContext("2d");if(!E)return null;E.putImageData(u,0,0);const B=document.createElement("canvas");B.width=o,B.height=i;const S=B.getContext("2d");if(!S)return null;const Q=S.createImageData(o,i),w=Q.data,M=(k,R)=>h[Math.max(0,Math.min(i-1,R))*o+Math.max(0,Math.min(o-1,k))]??0;for(let k=0;k<i;k++)for(let R=0;R<o;R++){const F=(M(R+1,k)-M(R-1,k))*4,O=(M(R,k+1)-M(R,k-1))*4,U=1/Math.sqrt(F*F+O*O+1),Y=(k*o+R)*4;w[Y]=(-F*U*.5+.5)*255,w[Y+1]=(-O*U*.5+.5)*255,w[Y+2]=(U*.5+.5)*255,w[Y+3]=255}return S.putImageData(Q,0,0),{bumpMap:Ope(x),normalMap:Ope(B),roughnessMap:Ope(d),metalnessMap:Ope(p)}};function zan(t,e){const{texture:n,maskedCopperMask:o,yOffset:i,isBottomLayer:r,usePolygonOffset:s=!1,renderOrder:a=0,isFaux:A=!1}=t;if(!n)return null;const c=DC(e),l=new VB(c.width,c.height);n.colorSpace=Ox;const u={map:n,transparent:!0,alphaTest:.08,side:mE,depthWrite:!0,polygonOffset:s,polygonOffsetFactor:s?-4:0,polygonOffsetUnits:s?-4:0,opacity:A?Dpe:1},g=Van(n,o),h=new CE({...u,bumpMap:g?.bumpMap??null,bumpScale:$B.bumpScale,normalMap:g?.normalMap??null,normalScale:new ni($B.normalScale,$B.normalScale),roughnessMap:g?.roughnessMap??null,roughness:1,metalnessMap:g?.metalnessMap??null,metalness:1,clearcoat:$B.clearcoat,clearcoatRoughness:$B.clearcoatRoughness,envMapIntensity:.18}),d=new Er(l,h);return d.position.set(c.centerX,c.centerY,i),r&&d.rotation.set(Math.PI,0,0),d.name=`${r?"bottom":"top"}-board-texture-plane`,d.renderOrder=a,p4(d,{castShadow:!1,receiveShadow:!0}),d}function c4i(t,e,n,o=!1){const i=[];if(!t||!e||n===null)return i;const r=.005,s=zan({texture:t.topBoard,maskedCopperMask:t.topMaskedCopper,yOffset:n/2+r,isBottomLayer:!1,usePolygonOffset:!0,renderOrder:1,isFaux:o},e);s&&i.push(s);const a=zan({texture:t.bottomBoard,maskedCopperMask:t.bottomMaskedCopper,yOffset:-n/2-r,isBottomLayer:!0,usePolygonOffset:!0,renderOrder:1,isFaux:o},e);return a&&i.push(a),i}var l4i=4e6,u4i=4096,g4i=1;function Jan(t,e,n={}){const{maxTexturePixels:o=l4i,maxTextureDimension:i=u4i,minTextureResolution:r=g4i}=n,s=DC(t);if(!Number.isFinite(s.width)||!Number.isFinite(s.height)||s.width<=0||s.height<=0)return e;const a=Math.max(s.width,s.height),A=i/a,c=Math.sqrt(o/(s.width*s.height)),l=Math.min(e,A,c);return Math.max(r,l)}function d4i({circuitJson:t,pcbThickness:e,isFaux:n=!1}){const{rootObject:o}=uf(),{visibility:i}=AT(),r=ee.useMemo(()=>{const A=t.filter(u=>u.type==="pcb_panel"),c=Mr(t).pcb_board.list();if(A.length>0){const u=A[0],g=c.find(h=>h.pcb_panel_id===u.pcb_panel_id);return{type:"pcb_board",pcb_board_id:u.pcb_panel_id,center:u.center,width:u.width,height:u.height,thickness:g?.thickness??1.4,material:g?.material??"fr4",num_layers:g?.num_layers??2,solder_mask_color:g?.solder_mask_color}}const l=c.filter(u=>!u.pcb_panel_id);return l.length>0?l[0]:null},[t]),s=ee.useMemo(()=>r?Jan(r,m4):m4,[r]),a=ee.useMemo(()=>!r?.width||!r.height?null:Gan({circuitJson:t,boardData:r,traceTextureResolution:s,visibility:i}),[t,r,s,i]);return ee.useEffect(()=>{if(!o||!r||!a)return;const A=[],c=d=>{const p=["map","alphaMap","aoMap","bumpMap","displacementMap","emissiveMap","lightMap","metalnessMap","normalMap","roughnessMap","specularMap"],m=d;for(const _ of p){const f=m[_];f&&f instanceof Hg&&(f.dispose(),m[_]=null)}d.dispose()},l=({texture:d,maskedCopperMask:p,zOffset:m,isBottomLayer:_,name:f,usePolygonOffset:I=!1,depthWrite:C=!0,renderOrder:y=1})=>{if(!d)return null;const x=DC(r),E=new VB(x.width,x.height);d.colorSpace=Ox;const B={map:d,transparent:!0,alphaTest:.08,side:mE,depthWrite:C,polygonOffset:I,polygonOffsetFactor:I?-4:0,polygonOffsetUnits:I?-4:0,opacity:n?Dpe:1},S=Van(d,p),Q=new CE({...B,bumpMap:S?.bumpMap??null,bumpScale:$B.bumpScale,normalMap:S?.normalMap??null,normalScale:new ni($B.normalScale,$B.normalScale),roughnessMap:S?.roughnessMap??null,roughness:1,metalnessMap:S?.metalnessMap??null,metalness:1,clearcoat:$B.clearcoat,clearcoatRoughness:$B.clearcoatRoughness,envMapIntensity:.18}),w=new Er(E,Q);return w.position.set(x.centerX,x.centerY,m),_&&w.rotation.set(Math.PI,0,0),w.name=f,w.renderOrder=y,w.frustumCulled=!1,p4(w,{castShadow:!1,receiveShadow:!0}),w},u=.005,g=l({texture:a.topBoard,maskedCopperMask:a.topMaskedCopper,zOffset:e/2+u,isBottomLayer:!1,name:"jscad-top-board-texture",usePolygonOffset:!0});g&&(A.push(g),o.add(g));const h=l({texture:a.bottomBoard,maskedCopperMask:a.bottomMaskedCopper,zOffset:-e/2-u,isBottomLayer:!0,name:"jscad-bottom-board-texture",usePolygonOffset:!0});return h&&(A.push(h),o.add(h)),()=>{for(const d of A)if(d.parent===o&&o.remove(d),d.geometry.dispose(),Array.isArray(d.material))for(const p of d.material)c(p);else d.material instanceof Gx&&c(d.material);a.topBoard?.dispose(),a.bottomBoard?.dispose()}},[o,r,a,e]),null}function h4i({stlUrl:t,stlData:e,mtlUrl:n,color:o,opacity:i=1,layerType:r}){const{rootObject:s}=uf(),[a,A]=ee.useState(null);ee.useEffect(()=>{const l=new doi;if(e){try{const u=l.parse(e);A(u)}catch(u){console.error("Failed to parse STL data",u),A(null)}return}t&&l.load(t,u=>{A(u)})},[t,e]);const c=ee.useMemo(()=>{if(!a)return null;const l=r==="board",u=new su({color:Array.isArray(o)?new Vi(o[0],o[1],o[2]):o,transparent:i!==1,opacity:i,polygonOffset:l,polygonOffsetFactor:l?6:0,polygonOffsetUnits:l?6:0}),g=new Er(a,u);return g.renderOrder=l?-1:1,p4(g,{castShadow:!l&&i===1,receiveShadow:!0}),g},[a,o,i,r]);return ee.useEffect(()=>{if(!(!s||!c))return s.add(c),()=>{s.remove(c),c.geometry.dispose(),Array.isArray(c.material)?c.material.forEach(l=>l.dispose()):c.material.dispose()}},[s,c]),null}function p4i({stlData:t,color:e,opacity:n=1,layerType:o}){const{visibility:i}=AT();let r=!0;return o==="board"?r=i.boardBody:o==="top-copper"?r=i.topCopper:o==="bottom-copper"?r=i.bottomCopper:o==="top-silkscreen"?r=i.topSilkscreen:o==="bottom-silkscreen"&&(r=i.bottomSilkscreen),r?K.jsx(h4i,{stlData:t,color:e,opacity:n,layerType:o}):null}function m4i(t){const e=Mr(t).cad_component.list().filter(f=>f.pcb_component_id),n=Mr(t).pcb_smtpad.list(),o=Mr(t).pcb_hole.list(),i=Mr(t).pcb_plated_hole.list(),r=Mr(t).pcb_via.list();if(e.length===0&&n.length===0&&o.length===0&&i.length===0&&r.length===0)return null;const s=[...o,...i,...r,...n],a=H8(s);let A=a.minX,c=a.maxX,l=a.minY,u=a.maxY;for(const f of e)if(f.position){const I=f.position.x,C=f.position.y;A=Math.min(A,I),c=Math.max(c,I),l=Math.min(l,C),u=Math.max(u,C)}A===1/0&&(A=-10,c=10,l=-10,u=10);const g=2,h=Math.max(Math.abs(A),Math.abs(c))+g,d=Math.max(Math.abs(l),Math.abs(u))+g,p=Math.max(2*h,10),m=Math.max(2*d,10);return{type:"pcb_board",pcb_board_id:"faux-board",center:{x:0,y:0},width:p,height:m,thickness:1.4,material:"fr4",num_layers:2}}function Wan(t){if(Mr(t).pcb_board.list().length>0)return t;const n=m4i(t);if(!n)return t;const i=n.thickness/2;return[...t.map(s=>{if(s.type==="cad_component"&&s.pcb_component_id){const a=s;if(a.position){const A=a.position.z??0;return{...a,position:{...a.position,z:A+i}}}}return s}),n]}var _4i=ee.forwardRef(({circuitJson:t,children:e,autoRotateDisabled:n,clickToInteractEnabled:o,onUserInteraction:i,onCameraControllerReady:r,resolveStaticAsset:s,referenceObject:a,hiddenCadComponentIds:A},c)=>{const l=OVe(e),u=ee.useMemo(()=>Wan(t??l),[t,l]),g=l5i(u),h=ee.useMemo(()=>{if(!u)return[5,-5,5];try{const C=Mr(u).pcb_board.list()[0];if(!C)return[5,-5,5];const{width:y,height:x}=C;if(!y&&!x)return[5,-5,5];const E=5,B=Math.max(y,E),S=Math.max(x,E),Q=Math.max(B,S);return[Q*.4,-Q*.7,Q*.9]}catch(C){return console.error(C),[5,-5,5]}},[u]),d=ee.useMemo(()=>{if(!u)return!1;try{const C=Mr(u).pcb_board.list()[0];return!!C&&C.pcb_board_id==="faux-board"}catch{return!1}},[u]),p=ee.useMemo(()=>{if(u)try{const C=Mr(u).pcb_board.list()[0];if(!C)return;const y=DC(C);return{width:y.width,height:y.height}}catch(C){console.error(C);return}},[u]),m=ee.useMemo(()=>{if(u)try{const C=Mr(u).pcb_board.list()[0];if(!C)return;const y=DC(C);return{x:y.centerX,y:y.centerY}}catch(C){console.error(C);return}},[u]),_=wrn(u),{stls:f}=wEi(g),I=Mr(u).cad_component.list().filter(C=>!A?.has(C.cad_component_id));return K.jsxs(San,{ref:c,autoRotateDisabled:n,initialCameraPosition:h,clickToInteractEnabled:o,boardDimensions:p,boardCenter:m,referenceObject:a,onUserInteraction:i,onCameraControllerReady:r,children:[f.map(({stlData:C,color:y,layerType:x},E)=>K.jsx(p4i,{stlData:C,color:y,opacity:E===0?d?.8:.95:1,layerType:x},`board-${E}`)),K.jsx(d4i,{circuitJson:u,pcbThickness:_,isFaux:d}),I.map(C=>K.jsx(vze,{fallback:({error:y})=>K.jsx(Ran,{cad_component:C,error:y}),children:K.jsx(pan,{cad_component:C,circuitJson:u,resolveStaticAsset:s},C.cad_component_id)},C.cad_component_id))]})}),Gpe=new Set,Kze=!1;function f4i(t,e,n=2){const o=t.length;Gpe.size&&Gpe.clear();let i=I4i(t,0,o,n,!0);const r=[];if(!i||i.next===i.prev)return r;let s=0,a=0,A=0;if(t.length>80*n){s=t[0],a=t[1];let c=s,l=a;for(let u=n;u<o;u+=n){const g=t[u],h=t[u+1];g<s&&(s=g),h<a&&(a=h),g>c&&(c=g),h>l&&(l=h)}A=Math.max(c-s,l-a),A=A!==0?32767/A:0}return Vze(i,r,s,a,A),r}function I4i(t,e,n,o,i){let r=null;if(i===P4i(t,e,n,o)>0)for(let s=e;s<n;s+=o)r=$an(s/o|0,t[s],t[s+1],r);else for(let s=n-o;s>=e;s-=o)r=$an(s/o|0,t[s],t[s+1],r);return r&&Wze(r,r.next)&&(oZ(r),r=r.next),r}function Ype(t,e=t){const n=e===t;let o=t,i;do i=!1,o!==o.next&&(Gpe.size===0||!Gpe.has(o))&&(Wze(o,o.next)||l1(o.prev,o,o.next)===0)?((n||o===e)&&(e=o.prev),Kze=!0,oZ(o),o=o.prev,i=!0):(n||o!==e)&&(o=o.next,i=!n);while(i||o!==e);return e}function Vze(t,e,n,o,i){i&&B4i(t,n,o,i);let r=t,s=!1;for(;t.prev!==t.next;){const a=t.prev,A=t.next;if(l1(a,t,A)<0&&(i?y4i(t,n,o,i):C4i(t))){e.push(a.i,t.i,A.i),oZ(t),t=A,r=A;continue}if(t=A,t===r){if(Kze=!1,t=Ype(t),Kze){r=t;continue}if(!s){t=x4i(t,e),r=t,s=!0;continue}E4i(t,e,n,o,i);break}}}function C4i(t){const e=t.prev,n=t,o=t.next,i=e.x,r=n.x,s=o.x,a=e.y,A=n.y,c=o.y,l=Math.min(i,r,s),u=Math.min(a,A,c),g=Math.max(i,r,s),h=Math.max(a,A,c);let d=o.next;for(;d!==e;){if(d.x>=l&&d.x<=g&&d.y>=u&&d.y<=h&&!(i===d.x&&a===d.y)&&Jze(i,a,r,A,s,c,d.x,d.y)&&l1(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function y4i(t,e,n,o){const i=t.prev,r=t,s=t.next,a=i.x,A=r.x,c=s.x,l=i.y,u=r.y,g=s.y,h=Math.min(a,A,c),d=Math.min(l,u,g),p=Math.max(a,A,c),m=Math.max(l,u,g),_=zze(h,d,e,n,o),f=zze(p,m,e,n,o);let I=t.prevZ;for(;I&&I.z>=_;){if(I.x>=h&&I.x<=p&&I.y>=d&&I.y<=m&&I!==s&&!(a===I.x&&l===I.y)&&Jze(a,l,A,u,c,g,I.x,I.y)&&l1(I.prev,I,I.next)>=0)return!1;I=I.prevZ}let C=t.nextZ;for(;C&&C.z<=f;){if(C.x>=h&&C.x<=p&&C.y>=d&&C.y<=m&&C!==s&&!(a===C.x&&l===C.y)&&Jze(a,l,A,u,c,g,C.x,C.y)&&l1(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function x4i(t,e){let n=t,o=!1;do{const i=n.prev,r=n.next.next;jan(i,n,n.next,r,!1)&&Vpe(i,r)&&Vpe(r,i)&&(e.push(i.i,n.i,r.i),oZ(n),oZ(n.next),n=t=r,o=!0),n=n.next}while(n!==t);return o?Ype(n):n}function E4i(t,e,n,o,i){let r=t;do{let s=r.next.next;for(;s!==r.prev;){if(r.i!==s.i&&S4i(r,s)){let a=w4i(r,s);r=Ype(r,r.next),a=Ype(a,a.next),Vze(r,e,n,o,i),Vze(a,e,n,o,i);return}s=s.next}r=r.next}while(r!==t)}var BE=[],$Y=[],hT=new Uint32Array(0),tZ=new Uint32Array(0),nZ=new Uint32Array(256);function B4i(t,e,n,o){let i=t,r=0;do i.z=zze(i.x,i.y,e,n,o),BE[r++]=i,i=i.next;while(i!==t);b4i(r);let s=null;for(let a=0;a<r;a++){const A=BE[a];A.prevZ=s,s&&(s.nextZ=A),s=A}s.nextZ=null,BE.fill(null,0,r),$Y.fill(null,0,r)}function b4i(t){if(t<=32){for(let e=1;e<t;e++){const n=BE[e],o=n.z;let i=e-1;for(;i>=0&&BE[i].z>o;)BE[i+1]=BE[i],i--;BE[i+1]=n}return}hT.length<t&&(hT=new Uint32Array(t),tZ=new Uint32Array(t),$Y=new Array(t));for(let e=0;e<t;e++)hT[e]=BE[e].z;Upe(t,BE,hT,$Y,tZ,0),Upe(t,$Y,tZ,BE,hT,8),Upe(t,BE,hT,$Y,tZ,16),Upe(t,$Y,tZ,BE,hT,24)}function Upe(t,e,n,o,i,r){nZ.fill(0);for(let a=0;a<t;a++)nZ[n[a]>>>r&255]++;let s=0;for(let a=0;a<256;a++){const A=nZ[a];nZ[a]=s,s+=A}for(let a=0;a<t;a++){const A=n[a],c=nZ[A>>>r&255]++;o[c]=e[a],i[c]=A}}function zze(t,e,n,o,i){return t=(t-n)*i|0,e=(e-o)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Jze(t,e,n,o,i,r,s,a){return(i-s)*(e-a)>=(t-s)*(r-a)&&(t-s)*(o-a)>=(n-s)*(e-a)&&(n-s)*(r-a)>=(i-s)*(o-a)}function S4i(t,e){const n=Wze(t,e)&&l1(t.prev,t,t.next)>0&&l1(e.prev,e,e.next)>0;return t.next.i!==e.i&&(n||Vpe(t,e)&&Vpe(e,t)&&(l1(t.prev,t,e.prev)!==0||l1(t,e.prev,e)!==0))&&!Q4i(t,e)&&(n||v4i(t,e))}function l1(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Wze(t,e){return t.x===e.x&&t.y===e.y}function jan(t,e,n,o,i=!0){const r=l1(t,e,n),s=l1(t,e,o),a=l1(n,o,t),A=l1(n,o,e);return(r>0&&s<0||r<0&&s>0)&&(a>0&&A<0||a<0&&A>0)?!0:i?!!(r===0&&Kpe(t,n,e)||s===0&&Kpe(t,o,e)||a===0&&Kpe(n,t,o)||A===0&&Kpe(n,e,o)):!1}function Kpe(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Q4i(t,e){const n=Math.min(t.x,e.x),o=Math.max(t.x,e.x),i=Math.min(t.y,e.y),r=Math.max(t.y,e.y);let s=t;do{const a=s.next;if(s.x>o&&a.x>o||s.x<n&&a.x<n||s.y>r&&a.y>r||s.y<i&&a.y<i){s=a;continue}if(s.i!==t.i&&a.i!==t.i&&s.i!==e.i&&a.i!==e.i&&jan(s,a,t,e))return!0;s=a}while(s!==t);return!1}function Vpe(t,e){return l1(t.prev,t,t.next)<0?l1(t,e,t.next)>=0&&l1(t,t.prev,e)>=0:l1(t,e,t.prev)<0||l1(t,t.next,e)<0}function v4i(t,e){let n=t,o=!1;const i=(t.x+e.x)/2,r=(t.y+e.y)/2;do{const s=n.next;n.y>r!=s.y>r&&i<(s.x-n.x)*(r-n.y)/(s.y-n.y)+n.x&&(o=!o),n=s}while(n!==t);return o}function w4i(t,e){const n=jze(t.i,t.x,t.y),o=jze(e.i,e.x,e.y),i=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,o.next=n,n.prev=o,r.next=o,o.prev=r,o}function $an(t,e,n,o){const i=jze(t,e,n);return o?(i.next=o.next,i.prev=o,o.next.prev=i,o.next=i):(i.prev=i,i.next=i),i}function oZ(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function jze(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function P4i(t,e,n,o){let i=0;for(let r=e,s=n-o;r<n;r+=o)i+=(t[s]-t[r])*(t[r+1]+t[s+1]),s=r;return i}var pT=1e-7;function qan(t,e){if(!Number.isFinite(e)||e<0)throw new Error("Board thickness must be finite and nonnegative");const n=t.map(a=>{const{start:A,end:c,bend_angle:l,bend_radius:u}=a;if([A?.x,A?.y,c?.x,c?.y,l,u].some(C=>!Number.isFinite(C))||u<=e/2||!["left","right"].includes(a.bend_side))throw new Error(`Invalid PCB bend ${a.pcb_bend_id}: finite geometry and radius greater than half the board thickness are required`);const h=Math.hypot(c.x-A.x,c.y-A.y);if(h<pT||Math.abs(l)>180)throw new Error(`Unsupported PCB bend ${a.pcb_bend_id}: distinct endpoints and angles within ±180 degrees are required`);const d=a.bend_side==="right"?1:-1,p=d*(c.y-A.y)/h,m=-d*(c.x-A.x)/h,_=l*Math.PI/180,f=u*Math.abs(_),I=A.x*p+A.y*m;return{id:a.pcb_bend_id,nx:p,ny:m,start:I-f/2,end:I+f/2,angle:_,radius:u,axisMin:Math.min(-m*A.x+p*A.y,-m*c.x+p*c.y),axisMax:Math.max(-m*A.x+p*A.y,-m*c.x+p*c.y)}}).filter(a=>Math.abs(a.angle)>pT),o=n[0];if(o&&n.some(a=>Math.abs(a.nx-o.nx)>pT||Math.abs(a.ny-o.ny)>pT))throw new Error("Folded PCB rendering currently requires parallel bends with the same moving direction");n.sort((a,A)=>a.start-A.start);for(let a=1;a<n.length;a++)if(n[a].start<n[a-1].end-pT)throw new Error("Overlapping PCB bend zones are not supported");const i=[...n].reverse(),r=({p:a,anchor:A,direction:c})=>{let l={...a};for(const u of i){const g=u.end-u.start,h=A.x*u.nx+A.y*u.ny-u.start,d=Math.max(0,Math.min(g,h)),p=u.angle*d/g,m=Math.cos(p),_=Math.sin(p),f=l.x*u.nx+l.y*u.ny-(c?0:u.start),I=l.x-(f+(c?0:u.start))*u.nx,C=l.y-(f+(c?0:u.start))*u.ny,y=Math.sign(u.angle)*u.radius,x=c?0:y*_-d*m,E=c?0:y*(1-m)-d*_,B=f*m-l.z*_+x;l={x:I+(B+(c?0:u.start))*u.nx,y:C+(B+(c?0:u.start))*u.ny,z:f*_+l.z*m+E}}return l},s=({p:a,anchor:A,direction:c})=>{const l=c?{x:0,y:0,z:0}:r({p:{x:0,y:0,z:0},anchor:A,direction:!1}),u={x:a.x-l.x,y:a.y-l.y,z:a.z-l.z},g=[{x:1,y:0,z:0},{x:0,y:1,z:0},{x:0,y:0,z:1}].map(d=>r({p:d,anchor:A,direction:!0})),h=d=>d.x*u.x+d.y*u.y+d.z*u.z;return{x:h(g[0]),y:h(g[1]),z:h(g[2])}};return{bends:n,inversePoint:(a,A)=>s({p:a,anchor:A,direction:!1}),inverseDirection:(a,A)=>s({p:a,anchor:A,direction:!0}),point:(a,A=a)=>r({p:a,anchor:A,direction:!1}),direction:(a,A)=>r({p:a,anchor:A,direction:!0}),assertRigid(a,A){for(const c of n){const l=a.map(u=>u.x*c.nx+u.y*c.ny);if(Math.max(...l)>c.start+pT&&Math.min(...l)<c.end-pT)throw new Error(`${A} intersects PCB bend zone ${c.id}`)}}}}var qB=1e-7;function iZ(t){const e=t.flatMap(i=>i.vertices);if(!e.length)return{min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}};const n={x:1/0,y:1/0,z:1/0},o={x:-1/0,y:-1/0,z:-1/0};for(const i of e)for(const r of["x","y","z"])n[r]=Math.min(n[r],i[r]),o[r]=Math.max(o[r],i[r]);return{min:n,max:o}}function Xan(t,e){const n=e.bends.flatMap(a=>{const A=Math.ceil(Math.abs(a.angle)/(Math.PI/36));return Array.from({length:A+1},(c,l)=>({b:a,d:a.start+(a.end-a.start)*l/A}))}),{min:o,max:i}=t.boundingBox,r=({polygon:a,nx:A,ny:c,d:l})=>{const u=a.map(({p:h})=>A*h.x+c*h.y-l);if(Math.min(...u)>=-qB||Math.max(...u)<=qB)return[a];const g=[[],[]];for(let h=0;h<2;h++){const d=h===0?1:-1;for(let p=0;p<a.length;p++){const m=a[p],_=(p+1)%a.length,f=a[_],I=u[p]*d,C=u[_]*d;if(I>=-qB&&g[h].push(m),I>qB&&C<-qB||I<-qB&&C>qB){const y=I/(I-C);g[h].push({p:{x:m.p.x+(f.p.x-m.p.x)*y,y:m.p.y+(f.p.y-m.p.y)*y,z:m.p.z+(f.p.z-m.p.z)*y},uv:{u:m.uv.u+(f.uv.u-m.uv.u)*y,v:m.uv.v+(f.uv.v-m.uv.v)*y}})}}}return g.filter(h=>h.length>=3)},s=[];for(const a of t.triangles){const A=a.pcbFace??(a.normal.z>.8?"top":a.normal.z<-.8?"bottom":"side");let c=[a.vertices.map((l,u)=>({p:l,uv:a.uvs?.[u]??{u:(l.x-o.x)/(i.x-o.x),v:1-(l.y-o.y)/(i.y-o.y)}}))];for(const{b:l,d:u}of n)c=c.flatMap(g=>r({polygon:g,nx:l.nx,ny:l.ny,d:u}));for(const l of c){for(const u of e.bends){const g=l.reduce((h,{p:d})=>h+d.x*u.nx+d.y*u.ny,0)/l.length;if(g>u.start+qB&&g<u.end-qB&&l.some(({p:h})=>{const d=-u.ny*h.x+u.nx*h.y;return d<u.axisMin-qB||d>u.axisMax+qB}))throw new Error(`PCB bend ${u.id} must span the full board cross-section through its bend zone`)}for(let u=1;u+1<l.length;u++){const g=[l[0],l[u],l[u+1]],h=g.map(({p:y})=>e.point(y)),[d,p,m]=h,_={x:p.x-d.x,y:p.y-d.y,z:p.z-d.z},f={x:m.x-d.x,y:m.y-d.y,z:m.z-d.z},I={x:_.y*f.z-_.z*f.y,y:_.z*f.x-_.x*f.z,z:_.x*f.y-_.y*f.x},C=Math.hypot(I.x,I.y,I.z);C<1e-12||s.push({...a,vertices:h,normal:{x:I.x/C,y:I.y/C,z:I.z/C},pcbFace:A,uvs:g.map(({uv:y})=>y)})}}}return{...t,triangles:s,boundingBox:iZ(s)}}var M4i=[{x:1,y:0,z:0},{x:0,y:1,z:0},{x:0,y:0,z:1}];function D4i(t,e){const[n,o,i]=[e.x,e.y,e.z].map(a=>a*Math.PI/180),r={x:Math.cos(i)*t.x-Math.sin(i)*t.y,y:Math.sin(i)*t.x+Math.cos(i)*t.y,z:t.z},s={x:Math.cos(o)*r.x+Math.sin(o)*r.z,y:r.y,z:-Math.sin(o)*r.x+Math.cos(o)*r.z};return{x:s.x,y:Math.cos(n)*s.y-Math.sin(n)*s.z,z:Math.sin(n)*s.y+Math.cos(n)*s.z}}function N4i([t,e,n]){const o=Math.asin(Math.max(-1,Math.min(1,n.x))),i=Math.abs(n.x)<1-1e-12;return{x:(i?Math.atan2(-n.y,n.z):Math.atan2(e.z,e.y))*180/Math.PI,y:o*180/Math.PI,z:(i?Math.atan2(-e.x,t.x):0)*180/Math.PI}}function R4i({cadComponent:t,foldPcbs:e},n){return T4i({cadComponentPlacement:t,foldPcbs:e},n)}function T4i({cadComponentPlacement:t,foldPcbs:e},n){if(t.is_on_folded_board===!0===e)return t;const{fold:o,boardCenter:i,flatMount:r}=n,s={x:r.x-i.x,y:r.y-i.y,z:0};o.assertRigid([s],"CAD mount");const a={x:t.position.x-i.x,y:t.position.y-i.y,z:t.position.z},A=e?o.direction:o.inverseDirection,c=e?o.point(a,s):o.inversePoint(a,s),l=t.rotation??n.defaultRotation??{x:0,y:0,z:0},u=M4i.map(g=>A(D4i(g,l),s));return{...t,position:{x:c.x+i.x,y:c.y+i.y,z:c.z},rotation:N4i(u),is_on_folded_board:e}}function k4i(t,e){const n=e.find(A=>A.type==="pcb_component"&&A.pcb_component_id===t.pcb_component_id);if(n?.type!=="pcb_component"){if(t.is_on_folded_board)throw new Error(`Folded CAD ${t.cad_component_id} requires its flat pcb_component reference`);return}const o=e.filter(A=>A.type==="pcb_board"),i=n.positioned_relative_to_pcb_board_id,r=i?o.filter(A=>A.pcb_board_id===i):o.filter(A=>A.subcircuit_id&&A.subcircuit_id===n.subcircuit_id),s=r.length===1?r[0]:!i&&!r.length&&o.length===1?o[0]:void 0;if(!s)throw new Error(`Cannot unambiguously resolve board for CAD ${t.cad_component_id}`);const a=e.filter(A=>A.type==="pcb_bend"&&A.pcb_board_id===s.pcb_board_id);return{fold:qan(a,s.thickness??1.6),boardCenter:s.center,flatMount:n.center,defaultRotation:{x:(t.layer??n.layer)==="bottom"?180:0,y:0,z:0}}}function F4i(t,e){const n=t.some(o=>o.type==="pcb_bend");return t.map(o=>{if(o.type!=="cad_component")return o;const i=o;if(!n&&!i.is_on_folded_board||i.is_on_folded_board===!0===e.foldPcbs)return o;const r=k4i(i,t);return!r||!r.fold.bends.length&&!i.is_on_folded_board?o:R4i({cadComponent:i,foldPcbs:e.foldPcbs},r)})}function L4i({outline:t,bottom:e,top:n}){if(t.length<3||!Number.isFinite(e)||!Number.isFinite(n)||n<=e||t.some(A=>!Number.isFinite(A.x)||!Number.isFinite(A.y)))throw new Error("A finite polygon and positive extrusion thickness are required");let o=0;for(const[A,c]of t.entries()){const l=t[(A+1)%t.length];o+=c.x*l.y-l.x*c.y}if(Math.abs(o)<1e-12)throw new Error("Degenerate polygon");const i=o>0?t:[...t].reverse(),r=[],s=({a:A,b:c,c:l,pcbFace:u})=>{const g={x:c.x-A.x,y:c.y-A.y,z:c.z-A.z},h={x:l.x-A.x,y:l.y-A.y,z:l.z-A.z},d={x:g.y*h.z-g.z*h.y,y:g.z*h.x-g.x*h.z,z:g.x*h.y-g.y*h.x},p=Math.hypot(d.x,d.y,d.z);p>1e-12&&r.push({vertices:[A,c,l],normal:{x:d.x/p,y:d.y/p,z:d.z/p},pcbFace:u})},a=f4i(i.flatMap(A=>[A.x,A.y]));for(let A=0;A<a.length;A+=3){const[c,l,u]=a.slice(A,A+3).map(g=>i[g]);s({a:{...c,z:n},b:{...l,z:n},c:{...u,z:n},pcbFace:"top"}),s({a:{...u,z:e},b:{...l,z:e},c:{...c,z:e},pcbFace:"bottom"})}for(let A=0;A<i.length;A++){const c=i[A],l=i[(A+1)%i.length];s({a:{...c,z:e},b:{...l,z:e},c:{...l,z:n},pcbFace:"side"}),s({a:{...c,z:e},b:{...l,z:n},c:{...c,z:n},pcbFace:"side"})}return{triangles:r,boundingBox:iZ(r)}}function H4i({stiffener:t,boardThickness:e,fold:n}){const o=t.adhesive_thickness??0;if(!Number.isFinite(o)||o<0||!Number.isFinite(t.thickness)||t.thickness<=0||!["top","bottom"].includes(t.layer))throw new Error(`Invalid PCB stiffener ${t.pcb_stiffener_id}`);const i=t.shape==="polygon"?t.outline:(()=>{if(!(t.width>0&&t.height>0))throw new Error("Invalid stiffener dimensions");const l=(t.rotation??0)*Math.PI/180;return[[-1,-1],[1,-1],[1,1],[-1,1]].map(([u,g])=>({x:t.center.x+u*t.width/2*Math.cos(l)-g*t.height/2*Math.sin(l),y:t.center.y+u*t.width/2*Math.sin(l)+g*t.height/2*Math.cos(l)}))})(),r=e/2+o,s=r+t.thickness,a=L4i({outline:i,bottom:t.layer==="top"?r:-s,top:t.layer==="top"?s:-r});if(!n)return a;n.assertRigid(a.triangles.flatMap(l=>l.vertices),t.pcb_stiffener_id);const A={x:i.reduce((l,u)=>l+u.x,0)/i.length,y:i.reduce((l,u)=>l+u.y,0)/i.length,z:0},c=a.triangles.map(l=>({...l,vertices:l.vertices.map(u=>n.point(u,A)),normal:n.direction(l.normal,A)}));return{...a,triangles:c,boundingBox:iZ(c)}}function Zan(t,e){t.updateMatrix();const n=t.geometry.index?t.geometry.toNonIndexed():t.geometry,o=n.getAttribute("position"),i=n.getAttribute("uv"),r=[];for(let s=0;s<o.count;s+=3){const a=[0,1,2].map(g=>{const h=new jt().fromBufferAttribute(o,s+g).applyMatrix4(t.matrix);return{x:h.x-e.x,y:h.y-e.y,z:h.z}}),[A,c,l]=a,u=new jt(c.x-A.x,c.y-A.y,c.z-A.z).cross(new jt(l.x-A.x,l.y-A.y,l.z-A.z)).normalize();r.push({vertices:a,normal:{x:u.x,y:u.y,z:u.z},...i?{uvs:[0,1,2].map(g=>({u:i.getX(s+g),v:i.getY(s+g)}))}:{}})}return n!==t.geometry&&n.dispose(),{triangles:r,boundingBox:iZ(r)}}function eAn(t,e){const n=[],o=[],i=[];for(const s of t.triangles)s.vertices.forEach((a,A)=>{n.push(a.x+e.x,a.y+e.y,a.z),o.push(s.normal.x,s.normal.y,s.normal.z),i.push(s.uvs?.[A]?.u??0,s.uvs?.[A]?.v??0)});const r=new Zl;return r.setAttribute("position",new Bs(n,3)),r.setAttribute("normal",new Bs(o,3)),r.setAttribute("uv",new Bs(i,2)),r.computeBoundingBox(),r.computeBoundingSphere(),r}function tAn(t,e,n){const o=t.clone();return o.geometry=eAn(e,n.center),o.position.set(0,0,0),o.rotation.set(0,0,0),o.scale.set(1,1,1),o.updateMatrix(),o}function O4i(t,e,n,o){const i=n.filter(d=>d.type==="pcb_board"),r=n.filter(d=>d.type==="pcb_bend"),s=n.filter(d=>d.type==="pcb_stiffener");if(!r.length&&!s.length)return{geometryMeshes:t,textureMeshes:e};const a=i[0];if(!a||i.length!==1||n.some(d=>d.type==="pcb_panel")||[...r,...s].some(d=>d.pcb_board_id!==a.pcb_board_id))throw new Error("Flex rendering requires one board, matching board references, and no panel");const A=o?qan(r,a.thickness??1.6):void 0,c=t.find(d=>d.name==="board-geom"),l=c?Zan(c,a.center):void 0,u=A?t.map(d=>tAn(d,Xan(Zan(d,a.center),A),a)):[...t],g=A&&l?e.map(d=>{d.updateMatrix();const p=d.matrix.clone().invert(),m=d.name.startsWith("bottom"),_=d.geometry.parameters,f=l.triangles.filter(C=>m?C.normal.z<-.9:C.normal.z>.9).map(C=>{const y=C.vertices.map(E=>({...E,z:d.position.z})),x=y.map(E=>{const B=new jt(E.x+a.center.x,E.y+a.center.y,E.z).applyMatrix4(p);return{u:B.x/_.width+.5,v:B.y/_.height+.5}});return{...C,vertices:y,uvs:x}}),I=tAn(d,Xan({triangles:f,boundingBox:iZ(f)},A),a);return d.geometry.dispose(),I}):e;for(const d of s){const p=new Er(eAn(H4i({stiffener:d,boardThickness:a.thickness??1.6,fold:A}),a.center),new su({color:d.material==="fr4"?"#879568":d.material==="polyimide"?"#bd7f27":"#b8bdc4",side:r_}));p.name="board-stiffener",p4(p),u.push(p)}const h=new e2;for(const d of[...u,...g])h.expandByObject(d);return{geometryMeshes:u,textureMeshes:g,bounds:{minX:h.min.x,maxX:h.max.x,minY:h.min.y,maxY:h.max.y,minZ:h.min.z,maxZ:h.max.z}}}var G4i=t=>{let e=0;for(let o=0;o<t.length;o++){const i=(o+1)%t.length;t[o]&&t[i]&&(e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1])}return e/2<=0};function Y4i(t,e,n,o,i){let r,s=null;if(n.outline&&n.outline.length>=3){let a=n.outline.map(c=>[c.x,c.y]);G4i(a)&&(a=a.reverse());const A=e.ofPolygons([a]);i.push(A),s=A,r=t.extrude(A,o,void 0,void 0,void 0,!0),i.push(r)}else n.outline&&n.outline.length>0&&console.warn("Board outline has fewer than 3 points, falling back to rectangular board."),r=t.cube([n.width,n.height,o],!0),i.push(r),r=r.translate([n.center.x,n.center.y,0]),i.push(r);return{boardOp:r,outlineCrossSection:s}}var U4i=64;function mT({Manifold:t,width:e,height:n,thickness:o,borderRadius:i}){const r=Man(e,n,i);if(r<=0)return t.cube([e,n,o],!0);const s=[],a=e-2*r,A=n-2*r;return a>0&&s.push(t.cube([a,n,o],!0)),A>0&&s.push(t.cube([e,A,o],!0)),[[e/2-r,n/2-r],[-e/2+r,n/2-r],[-e/2+r,-n/2+r],[e/2-r,-n/2+r]].forEach(([l,u])=>{s.push(t.cylinder(o,r,r,U4i,!0).translate([l,u,0]))}),t.union(s)}var K4i=t=>{let e=0;for(let o=0;o<t.length;o++){const i=(o+1)%t.length;t[o]&&t[i]&&(e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1])}return e/2<=0};function V4i(t,e,n,o,i){const r=[],s=Mr(n).pcb_cutout.list();for(const a of s){let A;const c=o*1.5;switch(a.shape){case"rect":{const g=IP(a);if(typeof g=="number"&&g>0?A=mT({Manifold:t,width:a.width,height:a.height,thickness:c,borderRadius:g}):A=t.cube([a.width,a.height,c],!0),i.push(A),a.rotation){const h=A.rotate([0,0,a.rotation]);i.push(h),A=h}A=A.translate([a.center.x,a.center.y,0]),i.push(A);break}case"circle":A=t.cylinder(c,a.radius,-1,df,!0),i.push(A),A=A.translate([a.center.x,a.center.y,0]),i.push(A);break;case"polygon":if(a.points.length<3){console.warn(`PCB Cutout [${a.pcb_cutout_id}] polygon has fewer than 3 points, skipping.`);continue}let l=a.points.map(g=>[g.x,g.y]);K4i(l)&&(l=l.reverse());const u=e.ofPolygons([l]);i.push(u),A=t.extrude(u,c,0,0,[1,1],!0),i.push(A);break;default:console.warn(`Unsupported cutout shape: ${a.shape} for cutout ${a.pcb_cutout_id}`);continue}A&&r.push(A)}return{cutoutOps:r}}function nAn({Manifold:t,x:e,y:n,diameter:o,thickness:i,segments:r=32}){return t.cylinder(i*1.2,o/2,o/2,r,!0).translate([e,n,0])}function oAn({Manifold:t,x:e,y:n,holeDiameter:o,thickness:i,zOffset:r=.001,segments:s=32}){const a=o/2+r;return t.cylinder(i*1.2,a,a,s,!0).translate([e,n,0])}function z4i(t,e,n,o,i){const r=[],s=Mr(n).pcb_hole.list(),a=(l,u,g)=>{const h=mT({Manifold:t,width:l,height:u,thickness:g,borderRadius:Math.min(l,u)/2});return i.push(h),h},A=(l,u,g)=>{const h=t.cube([l,u,g],!0);return i.push(h),h},c=(l,u,g)=>{const h=[];for(let d=0;d<g;d++){const p=2*Math.PI*d/g;h.push([l/2*Math.cos(p),u/2*Math.sin(p)])}return h};for(const l of s){const u=l.hole_shape,g=l.x,h=l.y,d=o*1.2,p=l.ccw_rotation??l.rotation??0,m=l.hole_width??l.hole_diameter,_=l.hole_height??l.hole_diameter;let f=null;if(u==="circle"){f=nAn({Manifold:t,x:g,y:h,diameter:l.hole_diameter,thickness:o,segments:df}),r.push(f),i.push(f);continue}if(u==="pill"||u==="rotated_pill")f=a(m,_,d);else if(u==="rect")f=A(m,_,d);else if(u==="oval"){let I=c(m,_,df),C=0;for(let x=0;x<I.length;x++){const E=(x+1)%I.length;C+=I[x][0]*I[E][1],C-=I[E][0]*I[x][1]}C<=0&&(I=I.reverse());const y=e.ofPolygons([I]);i.push(y),f=t.extrude(y,d,0,0,[1,1],!0),i.push(f)}if(f){if(p!==0){const C=f.rotate([0,0,p]);i.push(C),f=C}const I=f.translate([g,h,0]);i.push(I),r.push(I)}}return{nonPlatedHoleBoardDrills:r}}function D6(t){const e=new Zl;if(e.setAttribute("position",new Bs(t.vertProperties,3)),e.setIndex(new xTe(t.triVerts,1)),t.runIndex&&t.runIndex.length>1&&t.runOriginalID)for(let n=0;n<t.runIndex.length-1;n++){const o=t.runIndex[n],i=t.runIndex[n+1]-o;e.addGroup(o,i,0)}else e.addGroup(0,t.triVerts.length,0);return e}var rZ=t=>{let e=0;for(let o=0;o<t.length;o++){const i=(o+1)%t.length;t[o]&&t[i]&&(e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1])}return e/2<=0},zpe=(t,e,n)=>{const o=[];for(let i=0;i<n;i++){const r=2*Math.PI*i/n;o.push([t/2*Math.cos(r),e/2*Math.sin(r)])}return o},_T=new Vi(...Tc.copper),Jpe=.05,sZ=.003,aZ=5e-4,AZ=.004;function J4i(t,e,n,o,i,r){const s=[],a=Mr(n).pcb_plated_hole.list(),A=[],c=[],l=(d,p,m)=>{const _=mT({Manifold:t,width:d,height:p,thickness:m,borderRadius:Math.min(d,p)/2});return i.push(_),_},u=({padOutline:d,thickness:p})=>{if(!Array.isArray(d)||d.length<3)return null;let m=d.map(I=>[I.x,I.y]);rZ(m)&&(m=m.reverse());const _=e.ofPolygons([m]);i.push(_);const f=t.extrude(_,p,0,0,[1,1],!0);return i.push(f),f},g=({ph:d,depth:p,sizeDelta:m=0})=>{if(d.shape!=="hole_with_polygon_pad")return null;const f=d.pad_outline;if(!Array.isArray(f)||f.length<3)return null;const I=d.hole_shape||"circle",C=d.hole_offset_x||0,y=d.hole_offset_y||0;let x=null;if(I==="circle"){const E=Math.max((d.hole_diameter??0)+m,Cs),B=Math.max(E/2,Cs/2);x=t.cylinder(p,B,B,df,!0),i.push(x)}else{const E=d.hole_width??d.hole_diameter,B=d.hole_height??d.hole_diameter;if(!E||!B)return null;const S=Math.max(E+m,Cs),Q=Math.max(B+m,Cs);if(I==="oval"){let w=zpe(S,Q,df);rZ(w)&&(w=w.reverse());const M=e.ofPolygons([w]);i.push(M),x=t.extrude(M,p,0,0,[1,1],!0),i.push(x)}else(I==="pill"||I==="rotated_pill")&&(x=mT({Manifold:t,width:S,height:Q,thickness:p,borderRadius:Math.min(S,Q)/2}),i.push(x))}if(!x)return null;if(C||y){const E=x.translate([C,y,0]);i.push(E),x=E}return x};a.forEach((d,p)=>{const m=Math.max(o-2*(sZ+aZ+AZ),Cs);if(d.shape==="circle"){const _=oAn({Manifold:t,x:d.x,y:d.y,holeDiameter:d.hole_diameter*1.02,thickness:o,zOffset:jB,segments:df});i.push(_),s.push(_);const f=m,I=t.cylinder(f,d.outer_diameter/2,d.outer_diameter/2,df,!0);i.push(I);const C=t.cylinder(f*1.05,d.hole_diameter/2,d.hole_diameter/2,df,!0);i.push(C);const y=I.subtract(C);i.push(y);const x=y.translate([d.x,d.y,0]);i.push(x);let E=x;if(r){const S=t.intersection([x,r]);i.push(S),E=S}c.push(E);const B=D6(E.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:B,color:_T})}else if(d.shape==="pill"){const _=d.hole_width,f=d.hole_height,I=.4,C=d.outer_width??_+I,y=d.outer_height??f+I,x=_+2*jB,E=f+2*jB,B=o*1.2;let S=l(x,E,B);if(d.ccw_rotation){const Y=S.rotate([0,0,d.ccw_rotation]);i.push(Y),S=Y}const Q=S.translate([d.x,d.y,0]);i.push(Q),s.push(Q);const w=m,M=l(C,y,w),k=l(_,f,w*1.05);let R=M.subtract(k);if(i.push(R),d.ccw_rotation){const Y=R.rotate([0,0,d.ccw_rotation]);i.push(Y),R=Y}const F=R.translate([d.x,d.y,0]);i.push(F);let O=F;if(r){const Y=t.intersection([F,r]);i.push(Y),O=Y}c.push(O);const U=D6(O.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:U,color:_T})}else if(d.shape==="pill_hole_with_rect_pad"){if(d.hole_shape&&d.hole_shape!=="pill"||d.pad_shape&&d.pad_shape!=="rect")return;const _=d.hole_width,f=d.hole_height,I=d.hole_offset_x||0,C=d.hole_offset_y||0,y=d.rect_pad_width,x=d.rect_pad_height,E=IP(d),B=sZ,S=_+2*jB,Q=f+2*jB,w=o*1.2,k=l(S,Q,w).translate([I,C,0]).translate([d.x,d.y,0]);i.push(k),s.push(k);const R=mT({Manifold:t,width:y,height:x,thickness:Math.max(o-2*(B+aZ+AZ),Cs),borderRadius:E});i.push(R);const F=l(_,f,o*.8).translate([I,C,0]);i.push(F);const O=t.union([R,F]);i.push(O);const U=l(Math.max(_-2*Jpe,.01),Math.max(f-2*Jpe,.01),o*1.2).translate([I,C,0]);i.push(U);const Y=O.subtract(U);i.push(Y);const W=Y.translate([d.x,d.y,0]);i.push(W);let te=W;if(r){const J=t.intersection([W,r]);i.push(J),te=J}c.push(te);const j=D6(te.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:j,color:_T})}else if(d.shape==="rotated_pill_hole_with_rect_pad"){if(d.hole_shape&&d.hole_shape!=="rotated_pill"||d.pad_shape&&d.pad_shape!=="rect")return;const _=d.hole_width,f=d.hole_height,I=d.hole_offset_x||0,C=d.hole_offset_y||0,y=d.rect_pad_width,x=d.rect_pad_height,E=IP(d),B=sZ,S=_+2*jB,Q=f+2*jB,w=o*1.2;let M=l(S,Q,w).translate([I,C,0]);if(d.hole_ccw_rotation){const J=M.rotate([0,0,d.hole_ccw_rotation]);i.push(J),M=J}const k=M.translate([d.x,d.y,0]);i.push(k),s.push(k);let R=mT({Manifold:t,width:y,height:x,thickness:Math.max(o-2*(B+aZ+AZ),Cs),borderRadius:E});if(i.push(R),d.rect_ccw_rotation){const J=R.rotate([0,0,d.rect_ccw_rotation]);i.push(J),R=J}let F=l(_,f,o*.8).translate([I,C,0]);if(d.hole_ccw_rotation){const J=F.rotate([0,0,d.hole_ccw_rotation]);i.push(J),F=J}i.push(F);const O=t.union([R,F]);i.push(O);let U=l(Math.max(_-2*Jpe,.01),Math.max(f-2*Jpe,.01),o*1.2).translate([I,C,0]);if(d.hole_ccw_rotation){const J=U.rotate([0,0,d.hole_ccw_rotation]);i.push(J),U=J}i.push(U);const Y=O.subtract(U);i.push(Y);const W=Y.translate([d.x,d.y,0]);i.push(W);let te=W;if(r){const J=t.intersection([W,r]);i.push(J),te=J}c.push(te);const j=D6(te.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:j,color:_T})}else if(d.shape==="hole_with_polygon_pad"){const _=d.pad_outline;if(!Array.isArray(_)||_.length<3)return;const f=g({ph:d,depth:o*1.2,sizeDelta:2*Cs});if(!f)return;const I=f.translate([d.x,d.y,0]);i.push(I),s.push(I);const y=Math.max(o-2*(sZ+aZ+AZ),Cs),x=u({padOutline:_,thickness:y});if(!x)return;const E=g({ph:d,depth:o*1.02});if(!E)return;const B=g({ph:d,depth:o*.8,sizeDelta:-2*Cs})||E,S=t.union([x,E]);i.push(S);const Q=S.subtract(B);i.push(Q);const w=Q.translate([d.x,d.y,0]);i.push(w);let M=w;if(r){const R=t.intersection([w,r]);i.push(R),M=R}c.push(M);const k=D6(M.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:k,color:_T})}else if(d.shape==="oval"){const _=d.hole_width,f=d.hole_height,I=d.outer_width??_+.4,C=d.outer_height??f+.4,y=_+2*jB,x=f+2*jB,E=o*1.2;let B=zpe(y,x,df);rZ(B)&&(B=B.reverse());const S=e.ofPolygons([B]);i.push(S);let Q=t.extrude(S,E,0,0,[1,1],!0);if(i.push(Q),d.ccw_rotation){const oe=Q.rotate([0,0,d.ccw_rotation]);i.push(oe),Q=oe}const w=Q.translate([d.x,d.y,0]);i.push(w),s.push(w);const M=m;let k=zpe(I,C,df);rZ(k)&&(k=k.reverse());const R=e.ofPolygons([k]);i.push(R);const F=t.extrude(R,M,0,0,[1,1],!0);i.push(F);let O=zpe(_,f,df);rZ(O)&&(O=O.reverse());const U=e.ofPolygons([O]);i.push(U);const Y=t.extrude(U,M*1.05,0,0,[1,1],!0);i.push(Y);let W=F.subtract(Y);if(i.push(W),d.ccw_rotation){const oe=W.rotate([0,0,d.ccw_rotation]);i.push(oe),W=oe}const te=W.translate([d.x,d.y,0]);i.push(te);let j=te;if(r){const oe=t.intersection([te,r]);i.push(oe),j=oe}c.push(j);const J=D6(j.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:J,color:_T})}else if(d.shape==="circular_hole_with_rect_pad"){if(d.hole_shape&&d.hole_shape!=="circle"||d.pad_shape&&d.pad_shape!=="rect")return;const _=d.hole_offset_x||0,f=d.hole_offset_y||0,I=nAn({Manifold:t,x:d.x+_,y:d.y+f,diameter:d.hole_diameter,thickness:o,segments:df});i.push(I),s.push(I);const C=d.rect_pad_width??d.hole_diameter,y=d.rect_pad_height??d.hole_diameter,x=IP(d),E=sZ,B=d.hole_diameter/2,S=mT({Manifold:t,width:C,height:y,thickness:Math.max(o-2*(E+aZ+AZ),Cs),borderRadius:x});i.push(S);const Q=t.cylinder(o*.8,B,B,df,!0).translate([_,f,0]);i.push(Q);const w=t.union([S,Q]);i.push(w);const M=t.cylinder(o*1.2,Math.max(B-Cs,.01),Math.max(B-Cs,.01),df,!0).translate([_,f,0]);i.push(M);const k=w.subtract(M);i.push(k);const R=k.translate([d.x,d.y,0]);i.push(R);let F=R;if(r){const U=t.intersection([R,r]);i.push(U),F=U}c.push(F);const O=D6(F.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:O,color:_T})}});let h;return c.length>0&&(h=t.union(c),i.push(h)),{platedHoleBoardDrills:s,platedHoleCopperGeoms:A,platedHoleSubtractOp:h}}function W4i({Manifold:t,x:e,y:n,outerDiameter:o,holeDiameter:i,thickness:r,zOffset:s=.001,segments:a=32}){const A=s;if(o<i)throw new Error(`Invalid via geometry: outerDiameter (${o}) must be >= holeDiameter (${i})`);const c=Math.min(o/2,i/2+A),u=t.cylinder(r,c,-1,a,!0),g=r+2*s,h=t.cylinder(g,i/2,-1,a,!0);return u.subtract(h).translate([e,n,0])}var j4i=new Vi(...Tc.copper);function $4i(t,e,n,o,i){const r=[],s=Dan(e),a=[];return s.forEach((A,c)=>{if(typeof A.hole_diameter=="number"){const l=oAn({Manifold:t,x:A.x,y:A.y,holeDiameter:A.hole_diameter,thickness:n,zOffset:jB,segments:df});o.push(l),r.push(l)}if(typeof A.outer_diameter=="number"&&typeof A.hole_diameter=="number"){const l=W4i({Manifold:t,x:A.x,y:A.y,outerDiameter:A.outer_diameter,holeDiameter:A.hole_diameter,thickness:n,zOffset:jB,segments:df});o.push(l);let u=l;if(i){const h=t.intersection([l,i]);o.push(h),u=h}const g=D6(u.getMesh());a.push({key:`via-${A.pcb_via_id||c}`,geometry:g,color:j4i})}}),{viaBoardDrills:r,viaCopperGeoms:a}}var q4i=(t,e,n)=>{const[o,i]=ee.useState(null),[r,s]=ee.useState(null),[a,A]=ee.useState(null),[c,l]=ee.useState(!0),u=ee.useRef([]),g=ee.useMemo(()=>{const m=e.filter(I=>I.type==="pcb_panel"),_=Mr(e).pcb_board.list();if(m.length>0){const I=m[0],C=_.find(y=>y.pcb_panel_id===I.pcb_panel_id);return{type:"pcb_board",pcb_board_id:I.pcb_panel_id,center:I.center,width:I.width,height:I.height,thickness:C?.thickness??1.4,material:C?.material??"fr4",num_layers:C?.num_layers??2,solder_mask_color:C?.solder_mask_color}}const f=_.filter(I=>!I.pcb_panel_id);return f.length>0?f[0]:null},[e]),h=ee.useMemo(()=>{const m=Mr(e).pcb_board.list();return m.length>0&&m[0].pcb_board_id==="faux-board"},[e]),d=ee.useMemo(()=>g?Jan(g,m4):m4,[g]);ee.useEffect(()=>{if(!t||!g){i(null),s(null),l(!1);return}if((g.width===0||!g.width)&&(g.height===0||!g.height)&&(!g.outline||g.outline.length<3)){i({platedHoles:[],vias:[]}),s(g.thickness??0),l(!1);return}l(!0),A(null);const m=t.Manifold,_=t.CrossSection,f=y=>{if(!(!y||typeof y.delete!="function"))try{y.delete()}catch(x){(!(x instanceof Error)||!x.message?.includes("Manifold instance already deleted"))&&console.warn("Failed to delete Manifold instance",x)}};u.current.forEach(f),u.current=[];let I=null;const C={};try{const y=g.thickness||1.4;s(y);const{boardOp:x,outlineCrossSection:E}=Y4i(m,_,g,y,u.current);let B=x;const Q=y+2*1;let w=null;const M=.01;if(E){let J=E;if(M>0){const ie=E.offset(M);u.current.push(ie),J=ie}const oe=m.extrude(J,Q,void 0,void 0,void 0,!0);u.current.push(oe),w=oe}else{const J=(g.width||0)+2*M,oe=(g.height||0)+2*M,ie=m.cube([J,oe,Q],!0);u.current.push(ie);const ne=ie.translate([g.center.x,g.center.y,0]);u.current.push(ne),w=ne}const k=[];let R=null;const{nonPlatedHoleBoardDrills:F}=z4i(m,_,e,y,u.current);k.push(...F);const{platedHoleBoardDrills:O,platedHoleCopperGeoms:U,platedHoleSubtractOp:Y}=J4i(m,_,e,y,u.current,w);k.push(...O),C.platedHoles=U;const{viaBoardDrills:W,viaCopperGeoms:te}=$4i(m,e,y,u.current,w);if(k.push(...W),C.vias=te,k.length>0){R=m.union(k),u.current.push(R);const J=Y?m.union([R,Y]):R;u.current.push(J);const oe=B.subtract(J);if(u.current.push(oe),B=oe,Y){const ie=Y.subtract(R);u.current.push(ie);const ne=ie.getMesh(),le=D6(ne);C.platedHoles=[{key:"plated-holes-union",geometry:le,color:new Vi(Tc.copper[0],Tc.copper[1],Tc.copper[2])}]}}const{cutoutOps:j}=V4i(m,_,e,y,u.current);if(j.length>0){const J=m.union(j);u.current.push(J);const oe=B.subtract(J);u.current.push(oe),B=oe}if(I=B,I){const J=I.getMesh(),oe=D6(J);C.board={geometry:oe,color:Tze(g),material:g.material,isFaux:h}}i(C)}catch(y){console.error("Error processing geometry with Manifold in hook:",y),A(y.message||"An unknown error occurred while processing geometry in hook."),i(null)}finally{l(!1)}return()=>{u.current.forEach(f),u.current=[]}},[t,e,g]);const p=ee.useMemo(()=>!g||!d?null:Gan({circuitJson:e,boardData:g,traceTextureResolution:d,visibility:n}),[e,g,d,n]);return{geoms:o,textures:p,pcbThickness:r,error:a,isLoading:c,boardData:g,isFauxBoard:h}},X4i=r_,Z4i=({material:t,color:e,side:n=X4i,isFaux:o=!1})=>t==="fr4"?new CE({color:e,side:n,metalness:0,roughness:.48,specularIntensity:.3,ior:1.45,sheen:0,clearcoat:.16,clearcoatRoughness:.3,transparent:o,opacity:o?Dpe:1,flatShading:!0,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1}):new su({color:e,side:n,flatShading:!0,metalness:.1,roughness:.8,transparent:!0,opacity:o?Dpe:.9,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1});function eBi(t){const e=[];if(!t)return e;if(t.board?.geometry){const o=new Er(t.board.geometry,Z4i({material:t.board.material,color:t.board.color,side:r_,isFaux:t.board.isFaux}));o.name="board-geom",p4(o,{castShadow:!1,receiveShadow:!0}),e.push(o)}const n=o=>{if(o)for(const i of o){const r=new Er(i.geometry,new su({color:i.color,side:r_,flatShading:!0}));r.name=i.key,p4(r),e.push(r)}};return n(t.platedHoles),n(t.vias),e}var tBi=({geometryMeshes:t,textureMeshes:e})=>{const{rootObject:n}=uf(),{visibility:o}=AT(),i=r=>{r.geometry.dispose();const s=Array.isArray(r.material)?r.material:[r.material];for(const a of s){if(!a)continue;const A=["map","alphaMap","aoMap","bumpMap","displacementMap","emissiveMap","lightMap","metalnessMap","normalMap","roughnessMap","specularMap"],c=a;for(const l of A){const u=c[l];u&&u instanceof Hg&&u.dispose()}a.dispose()}};return ee.useEffect(()=>{if(n){for(const r of t){let s=!0;r.name==="board-geom"||r.name==="board-stiffener"?s=o.boardBody:(r.name.includes("plated_hole")||r.name.includes("via"))&&(s=o.topCopper||o.bottomCopper),s&&n.add(r)}return()=>{for(const r of t)r.parent===n&&n.remove(r),i(r)}}},[n,t,o]),ee.useEffect(()=>{if(n){for(const r of e)n.add(r);return()=>{for(const r of e)r.parent===n&&n.remove(r),i(r)}}},[n,e]),null},nBi="https://cdn.jsdelivr.net/npm/manifold-3d@3.2.1",oBi=({circuitJson:t,foldPcbs:e,autoRotateDisabled:n,clickToInteractEnabled:o,onUserInteraction:i,children:r,onCameraControllerReady:s,resolveStaticAsset:a,referenceObject:A,hiddenCadComponentIds:c})=>{const l=OVe(r),u=ee.useMemo(()=>Wan(t??l),[t,l]),[g,h]=ee.useState(null),[d,p]=ee.useState(null),{visibility:m}=AT();ee.useEffect(()=>{if(window.ManifoldModule&&typeof window.ManifoldModule=="object"&&window.ManifoldModule.setup){h(window.ManifoldModule);return}const k=async W=>{try{const te=await W();te.setup(),window.ManifoldModule=te,h(te)}catch(te){console.error("Failed to initialize Manifold:",te),p(`Failed to initialize Manifold: ${te instanceof Error?te.message:"Unknown error"}`)}},R=window.ManifoldModule??window.MANIFOLD??window.MANIFOLD_MODULE;if(R){window.ManifoldModule=R,k(window.ManifoldModule);return}const F="manifoldLoaded",O=()=>{const W=window.ManifoldModule??window.MANIFOLD??window.MANIFOLD_MODULE;if(W)window.ManifoldModule=W,k(window.ManifoldModule);else{const te="ManifoldModule not found on window after script load.";console.error(te),p(te)}};window.addEventListener(F,O,{once:!0});const U=document.createElement("script");U.type="module",U.innerHTML=`
try {
  const { default: ManifoldModule } = await import('${nBi}/manifold.js');
  window.ManifoldModule = ManifoldModule;
} catch (e) {
  console.error('Error importing manifold in dynamic script:', e);
} finally {
  window.dispatchEvent(new CustomEvent('${F}'));
}
    `.trim();const Y=W=>{const te="Failed to load Manifold loader script.";console.error(te,W),p(te),window.removeEventListener(F,O)};return U.addEventListener("error",Y),document.body.appendChild(U),()=>{window.removeEventListener(F,O),U.removeEventListener("error",Y)}},[]);const{geoms:_,textures:f,pcbThickness:I,error:C,isLoading:y,boardData:x,isFauxBoard:E}=q4i(g,u,m),B=ee.useMemo(()=>{try{const k=Srn(u,e),R=F4i(u,{foldPcbs:k});return{...O4i(eBi(_),c4i(f,x,I,E),u,k),posedJson:R,error:void 0}}catch(k){return{error:k instanceof Error?k.message:String(k),geometryMeshes:[],textureMeshes:[],posedJson:u,bounds:void 0}}},[_,f,x,I,E,u,e]),S=ee.useMemo(()=>Mr(B.posedJson).cad_component.list().filter(k=>!c?.has(k.cad_component_id)),[B.posedJson,c]),Q=ee.useMemo(()=>{if(!x)return;const k=DC(x);return{width:k.width,height:k.height}},[x]),w=ee.useMemo(()=>{if(!x)return;const k=DC(x);return{x:k.centerX,y:k.centerY}},[x]),M=ee.useMemo(()=>{if(!x)return[5,-5,5];const{width:k=0,height:R=0}=x,F=Math.max(k,1),O=Math.max(R,1),U=Math.max(F,O,5);return[U*.4,-U*.7,U*.9]},[x]);return d?K.jsxs("div",{style:{color:"red",padding:"1em",border:"1px solid red",margin:"1em"},children:["Error: ",d]}):g?C||B.error?K.jsxs("div",{role:"alert",style:{color:"red",padding:"1em",border:"1px solid red",margin:"1em"},children:["Error: ",C??B.error]}):y?K.jsx("div",{style:{padding:"1em"},children:"Processing board geometry..."}):K.jsxs(San,{initialCameraPosition:M,autoRotateDisabled:n,clickToInteractEnabled:o,boardDimensions:Q,boardCenter:w,referenceObject:A,onUserInteraction:i,onCameraControllerReady:s,children:[K.jsx(tBi,{geometryMeshes:B.geometryMeshes,textureMeshes:B.textureMeshes}),B.bounds&&K.jsx(ban,{bounds:B.bounds}),S.map(k=>K.jsx(vze,{fallback:({error:R})=>K.jsx(Ran,{cad_component:k,error:R}),children:K.jsx(pan,{cad_component:k,circuitJson:B.posedJson,resolveStaticAsset:a})},k.cad_component_id))]}):K.jsx("div",{style:{padding:"1em"},children:"Loading Manifold module..."})},iAn=oBi,iBi=Object.defineProperty,qY=(t,e)=>iBi(t,"name",{value:e,configurable:!0}),rAn=!!(typeof window<"u"&&window.document&&window.document.createElement);function El(t,e,{checkForDefaultPrevented:n=!0}={}){return qY(function(i){if(t?.(i),n===!1||!i||!i.defaultPrevented)return e?.(i)},"handleEvent")}qY(El,"composeEventHandlers");function rBi(t){if(!rAn)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}qY(rBi,"getOwnerWindow");function $ze(t){if(!rAn)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}qY($ze,"getOwnerDocument");function sAn(t,e=!1){const{activeElement:n}=$ze(t);if(!n?.nodeName)return null;if(aAn(n)&&n.contentDocument)return sAn(n.contentDocument.body,e);if(e){const o=n.getAttribute("aria-activedescendant");if(o){const i=$ze(n).getElementById(o);if(i)return i}}return n}qY(sAn,"getActiveElement");function aAn(t){return t.tagName==="IFRAME"}qY(aAn,"isFrame");var sBi=Object.defineProperty,qze=(t,e)=>sBi(t,"name",{value:e,configurable:!0});function Xze(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}qze(Xze,"setRef");function AAn(...t){return e=>{let n=!1;const o=t.map(i=>{const r=Xze(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<o.length;i++){const r=o[i];typeof r=="function"?r():Xze(t[i],null)}}}}qze(AAn,"composeRefs");function hf(...t){return ee.useCallback(AAn(...t),t)}qze(hf,"useComposedRefs");var aBi=Object.defineProperty,_4=(t,e)=>aBi(t,"name",{value:e,configurable:!0});function ABi(t,e){const n=ee.createContext(e);n.displayName=t+"Context";const o=_4(r=>{const{children:s,...a}=r,A=ee.useMemo(()=>a,Object.values(a));return K.jsx(n.Provider,{value:A,children:s})},"Provider");o.displayName=t+"Provider";function i(r,s={}){const{optional:a=!1}=s,A=ee.useContext(n);if(A)return A;if(e!==void 0)return e;if(!a)throw new Error(`\`${r}\` must be used within \`${t}\``)}return _4(i,"useContext"),[o,i]}_4(ABi,"createContext");function fT(t,e=[]){let n=[];function o(r,s){const a=ee.createContext(s);a.displayName=r+"Context";const A=n.length;n=[...n,s];const c=_4(u=>{const{scope:g,children:h,...d}=u,p=g?.[t]?.[A]||a,m=ee.useMemo(()=>d,Object.values(d));return K.jsx(p.Provider,{value:m,children:h})},"Provider");c.displayName=r+"Provider";function l(u,g,h={}){const{optional:d=!1}=h,p=g?.[t]?.[A]||a,m=ee.useContext(p);if(m)return m;if(s!==void 0)return s;if(!d)throw new Error(`\`${u}\` must be used within \`${r}\``)}return _4(l,"useContext"),[c,l]}_4(o,"createContext");const i=_4(()=>{const r=n.map(s=>ee.createContext(s));return _4(function(a){const A=a?.[t]||r;return ee.useMemo(()=>({[`__scope${t}`]:{...a,[t]:A}}),[a,A])},"useScope")},"createScope");return i.scopeName=t,[o,cAn(i,...e)]}_4(fT,"createContextScope");function cAn(...t){const e=t[0];if(t.length===1)return e;const n=_4(()=>{const o=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return _4(function(r){const s=o.reduce((a,{useScope:A,scopeName:c})=>{const u=A(r)[`__scope${c}`];return{...a,...u}},{});return ee.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}_4(cAn,"composeContextScopes");var XB=globalThis?.document?ee.useLayoutEffect:()=>{},cBi=Object.defineProperty,lBi=(t,e)=>cBi(t,"name",{value:e,configurable:!0}),lAn=Q5[" useEffectEvent ".trim().toString()],uAn=Q5[" useInsertionEffect ".trim().toString()];function gAn(t){if(typeof lAn=="function")return lAn(t);const e=ee.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof uAn=="function"?uAn(()=>{e.current=t}):XB(()=>{e.current=t}),ee.useMemo(()=>((...n)=>e.current?.(...n)),[])}lBi(gAn,"useEffectEvent");var uBi=Object.defineProperty,cZ=(t,e)=>uBi(t,"name",{value:e,configurable:!0}),gBi=Q5[" useInsertionEffect ".trim().toString()]||XB;function Wpe({prop:t,defaultProp:e,onChange:n=cZ(()=>{},"onChange"),caller:o}){const[i,r,s]=dAn({defaultProp:e,onChange:n}),a=t!==void 0,A=a?t:i,c=ee.useCallback(l=>{if(a){const u=hAn(l)?l(t):l;u!==t&&s.current?.(u)}else r(l)},[a,t,r,s]);return[A,c]}cZ(Wpe,"useControllableState");function dAn({defaultProp:t,onChange:e}){const[n,o]=ee.useState(t),i=ee.useRef(n),r=ee.useRef(e);return gBi(()=>{r.current=e},[e]),ee.useEffect(()=>{i.current!==n&&(r.current?.(n),i.current=n)},[n,i]),[n,o,r]}cZ(dAn,"useUncontrolledState");function hAn(t){return typeof t=="function"}cZ(hAn,"isFunction");var pAn=Symbol("RADIX:SYNC_STATE");function dBi(t,e,n,o){const{prop:i,defaultProp:r,onChange:s,caller:a}=e,A=i!==void 0,c=gAn(s),l=[{...n,state:r}];o&&l.push(o);const[u,g]=ee.useReducer((m,_)=>{if(_.type===pAn)return{...m,state:_.state};const f=t(m,_);return A&&!Object.is(f.state,m.state)&&c(f.state),f},...l),h=u.state,d=ee.useRef(h);ee.useEffect(()=>{d.current!==h&&(d.current=h,A||c(h))},[h,d,A]);const p=ee.useMemo(()=>i!==void 0?{...u,state:i}:u,[u,i]);return ee.useEffect(()=>{A&&!Object.is(i,u.state)&&g({type:pAn,state:i})},[i,u.state,A]),[p,g]}cZ(dBi,"useControllableStateReducer");var hBi=Object.defineProperty,ZB=(t,e)=>hBi(t,"name",{value:e,configurable:!0});function IT(t){const e=ee.forwardRef((n,o)=>{let{children:i,...r}=n,s=null,a=!1;const A=[];Zze(i)&&typeof jpe=="function"&&(i=jpe(i._payload)),ee.Children.forEach(i,g=>{if(IAn(g)){a=!0;const h=g;let d="child"in h.props?h.props.child:h.props.children;Zze(d)&&typeof jpe=="function"&&(d=jpe(d._payload)),s=mBi(h,d),A.push(s?.props?.children)}else A.push(g)}),s?s=ee.cloneElement(s,void 0,A):!a&&ee.Children.count(i)===1&&ee.isValidElement(i)&&(s=i);const c=s?fAn(s):void 0,l=hf(o,c);if(!s){if(i||i===0)throw new Error(a?IBi(t):fBi(t));return i}const u=_An(r,s.props??{});return s.type!==ee.Fragment&&(u.ref=o?l:c),ee.cloneElement(s,u)});return e.displayName=`${t}.Slot`,e}ZB(IT,"createSlot");var mAn=Symbol.for("radix.slottable");function pBi(t){const e=ZB(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=mAn,e}ZB(pBi,"createSlottable");var mBi=ZB((t,e)=>{if("child"in t.props){const n=t.props.child;return ee.isValidElement(n)?ee.cloneElement(n,void 0,t.props.children(n.props.children)):null}return ee.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function _An(t,e){const n={...e};for(const o in e){const i=t[o],r=e[o];/^on[A-Z]/.test(o)?i&&r?n[o]=(...a)=>{const A=r(...a);return i(...a),A}:i&&(n[o]=i):o==="style"?n[o]={...i,...r}:o==="className"&&(n[o]=[i,r].filter(Boolean).join(" "))}return{...t,...n}}ZB(_An,"mergeProps");function fAn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}ZB(fAn,"getElementRef");function IAn(t){return ee.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mAn}ZB(IAn,"isSlottable");var _Bi=Symbol.for("react.lazy");function Zze(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===_Bi&&"_payload"in t&&CAn(t._payload)}ZB(Zze,"isLazyComponent");function CAn(t){return typeof t=="object"&&t!==null&&"then"in t}ZB(CAn,"isPromiseLike");var fBi=ZB(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),IBi=ZB(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),jpe=Q5[" use ".trim().toString()],CBi=Object.defineProperty,yBi=(t,e)=>CBi(t,"name",{value:e,configurable:!0}),xBi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],N6=xBi.reduce((t,e)=>{const n=IT(`Primitive.${e}`),o=ee.forwardRef((i,r)=>{const{asChild:s,...a}=i,A=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),K.jsx(A,{...a,ref:r})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function eJe(t,e){t&&c6.flushSync(()=>t.dispatchEvent(e))}yBi(eJe,"dispatchDiscreteCustomEvent");var EBi=Object.defineProperty,u1=(t,e)=>EBi(t,"name",{value:e,configurable:!0});function tJe(t){const e=t+"CollectionProvider",[n,o]=fT(e),[i,r]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=u1(p=>{const{scope:m,children:_}=p,f=ee.useRef(null),I=ee.useRef(new Map).current;return K.jsx(i,{scope:m,itemMap:I,collectionRef:f,children:_})},"CollectionProvider");s.displayName=e;const a=t+"CollectionSlot",A=IT(a),c=ee.forwardRef((p,m)=>{const{scope:_,children:f}=p,I=r(a,_),C=hf(m,I.collectionRef);return K.jsx(A,{ref:C,children:f})});c.displayName=a;const l=t+"CollectionItemSlot",u="data-radix-collection-item",g=IT(l),h=ee.forwardRef((p,m)=>{const{scope:_,children:f,...I}=p,C=ee.useRef(null),y=hf(m,C),x=r(l,_);return ee.useEffect(()=>(x.itemMap.set(C,{ref:C,...I}),()=>{x.itemMap.delete(C)})),K.jsx(g,{[u]:"",ref:y,children:f})});h.displayName=l;function d(p){const m=r(t+"CollectionConsumer",p);return ee.useCallback(()=>{const f=m.collectionRef.current;if(!f)return[];const I=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((x,E)=>I.indexOf(x.ref.current)-I.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return u1(d,"useCollection"),[{Provider:s,Slot:c,ItemSlot:h},d,o]}u1(tJe,"createCollection");var yAn=new WeakMap,nJe=(UE=class extends Map{constructor(n){super(n);uit(this,p_);Yte(this,p_,[...super.keys()]),yAn.set(this,!0)}set(n,o){return yAn.get(this)&&(this.has(n)?w0(this,p_)[w0(this,p_).indexOf(n)]=n:w0(this,p_).push(n)),super.set(n,o),this}insert(n,o,i){const r=this.has(o),s=w0(this,p_).length,a=oJe(n);let A=a>=0?a:s+a;const c=A<0||A>=s?-1:A;if(c===this.size||r&&c===this.size-1||c===-1)return this.set(o,i),this;const l=this.size+(r?0:1);a<0&&A++;const u=[...w0(this,p_)];let g,h=!1;for(let d=A;d<l;d++)if(A===d){let p=u[d];u[d]===o&&(p=u[d+1]),r&&this.delete(o),g=this.get(p),this.set(o,i)}else{!h&&u[d-1]===o&&(h=!0);const p=u[h?d:d-1],m=g;g=this.get(p),this.delete(p),this.set(p,m)}return this}with(n,o,i){const r=new UE(this);return r.insert(n,o,i),r}before(n){const o=w0(this,p_).indexOf(n)-1;if(!(o<0))return this.entryAt(o)}setBefore(n,o,i){const r=w0(this,p_).indexOf(n);return r===-1?this:this.insert(r,o,i)}after(n){let o=w0(this,p_).indexOf(n);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(n,o,i){const r=w0(this,p_).indexOf(n);return r===-1?this:this.insert(r+1,o,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Yte(this,p_,[]),super.clear()}delete(n){const o=super.delete(n);return o&&w0(this,p_).splice(w0(this,p_).indexOf(n),1),o}deleteAt(n){const o=this.keyAt(n);return o!==void 0?this.delete(o):!1}at(n){const o=$pe(w0(this,p_),n);if(o!==void 0)return this.get(o)}entryAt(n){const o=$pe(w0(this,p_),n);if(o!==void 0)return[o,this.get(o)]}indexOf(n){return w0(this,p_).indexOf(n)}keyAt(n){return $pe(w0(this,p_),n)}from(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return r;i++}}findIndex(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return i;i++}return-1}filter(n,o){const i=[];let r=0;for(const s of this)Reflect.apply(n,o,[s,r,this])&&i.push(s),r++;return new UE(i)}map(n,o){const i=[];let r=0;for(const s of this)i.push([s[0],Reflect.apply(n,o,[s,r,this])]),r++;return new UE(i)}reduce(...n){const[o,i]=n;let r=0,s=i??this.at(0);for(const a of this)r===0&&n.length===1?s=a:s=Reflect.apply(o,this,[s,a,r,this]),r++;return s}reduceRight(...n){const[o,i]=n;let r=i??this.at(-1);for(let s=this.size-1;s>=0;s--){const a=this.at(s);s===this.size-1&&n.length===1?r=a:r=Reflect.apply(o,this,[r,a,s,this])}return r}toSorted(n){const o=[...this.entries()].sort(n);return new UE(o)}toReversed(){const n=new UE;for(let o=this.size-1;o>=0;o--){const i=this.keyAt(o),r=this.get(i);n.set(i,r)}return n}toSpliced(...n){const o=[...this.entries()];return o.splice(...n),new UE(o)}slice(n,o){const i=new UE;let r=this.size-1;if(n===void 0)return i;n<0&&(n=n+this.size),o!==void 0&&o>0&&(r=o-1);for(let s=n;s<=r;s++){const a=this.keyAt(s),A=this.get(a);i.set(a,A)}return i}every(n,o){let i=0;for(const r of this){if(!Reflect.apply(n,o,[r,i,this]))return!1;i++}return!0}some(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return!0;i++}return!1}},p_=new WeakMap,u1(UE,"OrderedDict"),UE);function $pe(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=xAn(t,e);return n===-1?void 0:t[n]}u1($pe,"at");function xAn(t,e){const n=t.length,o=oJe(e),i=o>=0?o:n+o;return i<0||i>=n?-1:i}u1(xAn,"toSafeIndex");function oJe(t){return t!==t||t===0?0:Math.trunc(t)}u1(oJe,"toSafeInteger");function BBi(t){const e=t+"CollectionProvider",[n,o]=fT(e),[i,r]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new nJe,setItemMap:u1(()=>{},"setItemMap")}),s=u1(({state:I,...C})=>I?K.jsx(A,{...C,state:I}):K.jsx(a,{...C}),"CollectionProvider");s.displayName=e;const a=u1(I=>{const C=m();return K.jsx(A,{...I,state:C})},"CollectionInit");a.displayName=e+"Init";const A=u1(I=>{const{scope:C,children:y,state:x}=I,E=ee.useRef(null),[B,S]=ee.useState(null),Q=hf(E,S),[w,M]=x;return ee.useEffect(()=>{if(!B)return;const k=bAn(()=>{});return k.observe(B,{childList:!0,subtree:!0}),()=>{k.disconnect()}},[B]),K.jsx(i,{scope:C,itemMap:w,setItemMap:M,collectionRef:Q,collectionRefObject:E,collectionElement:B,children:y})},"CollectionProviderImpl");A.displayName=e+"Impl";const c=t+"CollectionSlot",l=IT(c),u=ee.forwardRef((I,C)=>{const{scope:y,children:x}=I,E=r(c,y),B=hf(C,E.collectionRef);return K.jsx(l,{ref:B,children:x})});u.displayName=c;const g=t+"CollectionItemSlot",h="data-radix-collection-item",d=IT(g),p=ee.forwardRef((I,C)=>{const{scope:y,children:x,...E}=I,B=ee.useRef(null),[S,Q]=ee.useState(null),w=hf(C,B,Q),M=r(g,y),{setItemMap:k}=M,R=ee.useRef(E);EAn(R.current,E)||(R.current=E);const F=R.current;return ee.useEffect(()=>{const O=F;return k(U=>S?U.has(S)?U.set(S,{...O,element:S}).toSorted(iJe):(U.set(S,{...O,element:S}),U.toSorted(iJe)):U),()=>{k(U=>!S||!U.has(S)?U:(U.delete(S),new nJe(U)))}},[S,F,k]),K.jsx(d,{[h]:"",ref:w,children:x})});p.displayName=g;function m(){return ee.useState(new nJe)}u1(m,"useInitCollection");function _(I){const{itemMap:C}=r(t+"CollectionConsumer",I);return C}return u1(_,"useCollection"),[{Provider:s,Slot:u,ItemSlot:p},{createCollectionScope:o,useCollection:_,useInitCollection:m}]}u1(BBi,"createCollection");function EAn(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(e,i)||t[i]!==e[i])return!1;return!0}u1(EAn,"shallowEqual");function BAn(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}u1(BAn,"isElementPreceding");function iJe(t,e){return!t[1].element||!e[1].element?0:BAn(t[1].element,e[1].element)?-1:1}u1(iJe,"sortByDocumentPosition");function bAn(t){return new MutationObserver(n=>{for(const o of n)if(o.type==="childList"){t();return}})}u1(bAn,"getChildListObserver");var bBi=Object.defineProperty,SBi=(t,e)=>bBi(t,"name",{value:e,configurable:!0}),QBi=ee.createContext(void 0);function rJe(t){const e=ee.useContext(QBi);return t||e||"ltr"}SBi(rJe,"useDirection");var vBi=Object.defineProperty,wBi=(t,e)=>vBi(t,"name",{value:e,configurable:!0});function R6(t){const e=ee.useRef(t);return ee.useEffect(()=>{e.current=t}),ee.useMemo(()=>((...n)=>e.current?.(...n)),[])}wBi(R6,"useCallbackRef");var PBi=Object.defineProperty,g1=(t,e)=>PBi(t,"name",{value:e,configurable:!0}),sJe="dismissableLayer.update",MBi="dismissableLayer.pointerDownOutside",DBi="dismissableLayer.focusOutside",SAn,QAn=ee.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),NBi=ee.forwardRef(g1(function(e,n){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:A,onDismiss:c,...l}=e,u=ee.useContext(QAn),[g,h]=ee.useState(null),d=g?.ownerDocument??globalThis?.document,[,p]=ee.useState({}),m=hf(n,h),_=Array.from(u.layers),[f]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),I=f?_.indexOf(f):-1,C=g?_.indexOf(g):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,x=C>=I,E=ee.useRef(!1),B=vAn(M=>{s?.(M),A?.(M),M.defaultPrevented||c?.()},{ownerDocument:d,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:ee.useCallback(M=>{if(!(M instanceof Node))return!1;const k=[...u.branches].some(R=>R.contains(M));return x&&!k},[u.branches,x])}),S=wAn(M=>{if(i&&E.current)return;const k=M.target;[...u.branches].some(F=>F.contains(k))||(a?.(M),A?.(M),M.defaultPrevented||c?.())},d),Q=g?C===_.length-1:!1,w=R6(M=>{M.key==="Escape"&&(r?.(M),!M.defaultPrevented&&c&&(M.preventDefault(),c()))});return ee.useEffect(()=>{if(Q)return d.addEventListener("keydown",w,{capture:!0}),()=>d.removeEventListener("keydown",w,{capture:!0})},[d,Q,w]),ee.useEffect(()=>{if(g)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(SAn=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(g)),u.layers.add(g),aJe(),()=>{o&&(u.layersWithOutsidePointerEventsDisabled.delete(g),u.layersWithOutsidePointerEventsDisabled.size===0&&(d.body.style.pointerEvents=SAn))}},[g,d,o,u]),ee.useEffect(()=>()=>{g&&(u.layers.delete(g),u.layersWithOutsidePointerEventsDisabled.delete(g),aJe())},[g,u]),ee.useEffect(()=>{const M=g1(()=>p({}),"handleUpdate");return document.addEventListener(sJe,M),()=>document.removeEventListener(sJe,M)},[]),K.jsx(N6.div,{...l,ref:m,style:{pointerEvents:y?x?"auto":"none":void 0,...e.style},onFocusCapture:El(e.onFocusCapture,S.onFocusCapture),onBlurCapture:El(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:El(e.onPointerDownCapture,B.onPointerDownCapture)})},"DismissableLayer"));function RBi(){const t=ee.useContext(QAn),[e,n]=ee.useState(null);return ee.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}g1(RBi,"useDismissableLayerSurface");var TBi=g1(()=>!0,"IS_TRUE");function vAn(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:r,shouldHandlePointerDownOutside:s=TBi}=e,a=R6(t),A=ee.useRef(!1),c=ee.useRef(!1),l=ee.useRef(new Map),u=ee.useRef(()=>{});return ee.useEffect(()=>{function g(){c.current=!1,i.current=!1,l.current.clear()}g1(g,"resetOutsideInteraction");function h(){return Array.from(l.current.values()).some(Boolean)}g1(h,"isOutsideInteractionIntercepted");function d(I){if(!c.current)return;const C=I.target;C instanceof Node&&[...r].some(x=>x.contains(C))||l.current.set(I.type,!0),I.type==="click"&&window.setTimeout(()=>{c.current&&u.current()},0)}g1(d,"handleInteractionCapture");function p(I){c.current&&l.current.set(I.type,!1)}g1(p,"handleInteractionBubble");const m=g1(I=>{if(I.target&&!A.current){let C=function(){n.removeEventListener("click",u.current);const x=h();g(),x||AJe(MBi,a,y,{discrete:!0})};if(g1(C,"handleAndDispatchPointerDownOutsideEvent"),!s(I.target)){n.removeEventListener("click",u.current),g(),A.current=!1;return}const y={originalEvent:I};c.current=!0,i.current=o&&I.button===0,l.current.clear(),!o||I.button!==0?C():(n.removeEventListener("click",u.current),u.current=C,n.addEventListener("click",u.current,{once:!0}))}else n.removeEventListener("click",u.current),g();A.current=!1},"handlePointerDown"),_=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const I of _)n.addEventListener(I,d,!0),n.addEventListener(I,p);const f=window.setTimeout(()=>{n.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(f),n.removeEventListener("pointerdown",m),n.removeEventListener("click",u.current);for(const I of _)n.removeEventListener(I,d,!0),n.removeEventListener(I,p)}},[n,a,o,i,r,s]),{onPointerDownCapture:g1(()=>A.current=!0,"onPointerDownCapture")}}g1(vAn,"usePointerDownOutside");function wAn(t,e=globalThis?.document){const n=R6(t),o=ee.useRef(!1);return ee.useEffect(()=>{const i=g1(r=>{r.target&&!o.current&&AJe(DBi,n,{originalEvent:r},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:g1(()=>o.current=!0,"onFocusCapture"),onBlurCapture:g1(()=>o.current=!1,"onBlurCapture")}}g1(wAn,"useFocusOutside");function aJe(){const t=new CustomEvent(sJe);document.dispatchEvent(t)}g1(aJe,"dispatchUpdate");function AJe(t,e,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),o?eJe(i,r):i.dispatchEvent(r)}g1(AJe,"handleAndDispatchCustomEvent");var kBi=Object.defineProperty,cJe=(t,e)=>kBi(t,"name",{value:e,configurable:!0}),qpe=0,XY=null;function FBi(t){return lJe(),t.children}cJe(FBi,"FocusGuards");function lJe(){ee.useEffect(()=>{XY||(XY={start:uJe(),end:uJe()});const{start:t,end:e}=XY;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),qpe++,()=>{qpe===1&&(XY?.start.remove(),XY?.end.remove(),XY=null),qpe=Math.max(0,qpe-1)}},[])}cJe(lJe,"useFocusGuards");function uJe(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}cJe(uJe,"createFocusGuard");var LBi=Object.defineProperty,A2=(t,e)=>LBi(t,"name",{value:e,configurable:!0}),gJe="focusScope.autoFocusOnMount",dJe="focusScope.autoFocusOnUnmount",PAn={bubbles:!1,cancelable:!0},HBi=ee.forwardRef(A2(function(e,n){const{loop:o=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[A,c]=ee.useState(null),l=R6(r),u=R6(s),g=ee.useRef(null),h=hf(n,c),d=ee.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ee.useEffect(()=>{if(i){let m=function(C){if(d.paused||!A)return;const y=C.target;A.contains(y)?g.current=y:dS(g.current,{select:!0})},_=function(C){if(d.paused||!A)return;const y=C.relatedTarget;y!==null&&(A.contains(y)||dS(g.current,{select:!0}))},f=function(C){if(document.activeElement===document.body)for(const x of C)x.removedNodes.length>0&&dS(A)};A2(m,"handleFocusIn"),A2(_,"handleFocusOut"),A2(f,"handleMutations"),document.addEventListener("focusin",m),document.addEventListener("focusout",_);const I=new MutationObserver(f);return A&&I.observe(A,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",_),I.disconnect()}}},[i,A,d.paused]),ee.useEffect(()=>{if(A){TAn.add(d);const m=document.activeElement;if(!A.contains(m)){const f=new CustomEvent(gJe,PAn);A.addEventListener(gJe,l),A.dispatchEvent(f),f.defaultPrevented||(MAn(FAn(hJe(A)),{select:!0}),document.activeElement===m&&dS(A))}return()=>{A.removeEventListener(gJe,l),setTimeout(()=>{const f=new CustomEvent(dJe,PAn);A.addEventListener(dJe,u),A.dispatchEvent(f),f.defaultPrevented||dS(m??document.body,{select:!0}),A.removeEventListener(dJe,u),TAn.remove(d)},0)}}},[A,l,u,d]);const p=ee.useCallback(m=>{if(!o&&!i||d.paused)return;const _=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,f=document.activeElement;if(_&&f){const I=m.currentTarget,[C,y]=DAn(I);C&&y?!m.shiftKey&&f===y?(m.preventDefault(),o&&dS(C,{select:!0})):m.shiftKey&&f===C&&(m.preventDefault(),o&&dS(y,{select:!0})):f===I&&m.preventDefault()}},[o,i,d.paused]);return K.jsx(N6.div,{tabIndex:-1,...a,ref:h,onKeyDown:p})},"FocusScope"));function MAn(t,{select:e=!1}={}){const n=document.activeElement;for(const o of t)if(dS(o,{select:e}),document.activeElement!==n)return}A2(MAn,"focusFirst");function DAn(t){const e=hJe(t),n=pJe(e,t),o=pJe(e.reverse(),t);return[n,o]}A2(DAn,"getTabbableEdges");function hJe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:A2(o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}A2(hJe,"getTabbableCandidates");function pJe(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):NAn(o,{upTo:e})))return o}A2(pJe,"findVisible");function NAn(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}A2(NAn,"isHidden");function RAn(t){return t instanceof HTMLInputElement&&"select"in t}A2(RAn,"isSelectableInput");function dS(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&RAn(t)&&e&&t.select()}}A2(dS,"focus");var TAn=kAn();function kAn(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=mJe(t,e),t.unshift(e)},remove(e){t=mJe(t,e),t[0]?.resume()}}}A2(kAn,"createFocusScopesStack");function mJe(t,e){const n=[...t],o=n.indexOf(e);return o!==-1&&n.splice(o,1),n}A2(mJe,"arrayRemove");function FAn(t){return t.filter(e=>e.tagName!=="A")}A2(FAn,"removeLinks");var OBi=Object.defineProperty,GBi=(t,e)=>OBi(t,"name",{value:e,configurable:!0}),YBi=Q5[" useId ".trim().toString()]||(()=>{}),UBi=0;function ZY(t){const[e,n]=ee.useState(YBi());return XB(()=>{t||n(o=>o??String(UBi++))},[t]),t||(e?`radix-${e}`:"")}GBi(ZY,"useId");var KBi=["top","right","bottom","left"],CP=Math.min,hS=Math.max,Xpe=Math.round,Zpe=Math.floor,pS=t=>({x:t,y:t}),VBi={left:"right",right:"left",bottom:"top",top:"bottom"};function LAn(t,e,n){return hS(t,CP(e,n))}function mS(t,e){return typeof t=="function"?t(e):t}function yP(t){return t.split("-")[0]}function eU(t){return t.split("-")[1]}function _Je(t){return t==="x"?"y":"x"}function fJe(t){return t==="y"?"height":"width"}function T6(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function IJe(t){return _Je(T6(t))}function zBi(t,e,n){n===void 0&&(n=!1);const o=eU(t),i=IJe(t),r=fJe(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=eme(s)),[s,eme(s)]}function JBi(t){const e=eme(t);return[CJe(t),e,CJe(e)]}function CJe(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var HAn=["left","right"],OAn=["right","left"],WBi=["top","bottom"],jBi=["bottom","top"];function $Bi(t,e,n){switch(t){case"top":case"bottom":return n?e?OAn:HAn:e?HAn:OAn;case"left":case"right":return e?WBi:jBi;default:return[]}}function qBi(t,e,n,o){const i=eU(t);let r=$Bi(yP(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(CJe)))),r}function eme(t){const e=yP(t);return VBi[e]+t.slice(e.length)}function XBi(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function GAn(t){return typeof t!="number"?XBi(t):{top:t,right:t,bottom:t,left:t}}function tme(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function YAn(t,e,n){let{reference:o,floating:i}=t;const r=T6(e),s=IJe(e),a=fJe(s),A=yP(e),c=r==="y",l=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,g=o[a]/2-i[a]/2;let h;switch(A){case"top":h={x:l,y:o.y-i.height};break;case"bottom":h={x:l,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}const d=eU(e);return d&&(h[s]+=g*(d==="end"?1:-1)*(n&&c?-1:1)),h}async function ZBi(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:A}=t,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:u="floating",altBoundary:g=!1,padding:h=0}=mS(e,t),d=GAn(h),m=a[g?u==="floating"?"reference":"floating":u],_=tme(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:A})),f=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,I=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),C=await(r.isElement==null?void 0:r.isElement(I))&&await(r.getScale==null?void 0:r.getScale(I))||{x:1,y:1},y=tme(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:I,strategy:A}):f);return{top:(_.top-y.top+d.top)/C.y,bottom:(y.bottom-_.bottom+d.bottom)/C.y,left:(_.left-y.left+d.left)/C.x,right:(y.right-_.right+d.right)/C.x}}var e9i=50,t9i=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:ZBi},A=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:l,y:u}=YAn(c,o,A),g=o,h=0;const d={};for(let p=0;p<r.length;p++){const m=r[p];if(!m)continue;const{name:_,fn:f}=m,{x:I,y:C,data:y,reset:x}=await f({x:l,y:u,initialPlacement:o,placement:g,strategy:i,middlewareData:d,rects:c,platform:a,elements:{reference:t,floating:e}});l=I??l,u=C??u,d[_]={...d[_],...y},x&&h<e9i&&(h++,typeof x=="object"&&(x.placement&&(g=x.placement),x.rects&&(c=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:l,y:u}=YAn(c,g,A)),p=-1)}return{x:l,y:u,placement:g,strategy:i,middlewareData:d}},n9i=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:A}=e,{element:c,padding:l=0}=mS(t,e)||{};if(c==null)return{};const u=GAn(l),g={x:n,y:o},h=IJe(i),d=fJe(h),p=await s.getDimensions(c),m=h==="y",_=m?"top":"left",f=m?"bottom":"right",I=m?"clientHeight":"clientWidth",C=r.reference[d]+r.reference[h]-g[h]-r.floating[d],y=g[h]-r.reference[h],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=x?x[I]:0;(!E||!await(s.isElement==null?void 0:s.isElement(x)))&&(E=a.floating[I]||r.floating[d]);const B=C/2-y/2,S=E/2-p[d]/2-1,Q=CP(u[_],S),w=CP(u[f],S),M=E-p[d]-w,k=E/2-p[d]/2+B,R=LAn(Q,k,M),F=!A.arrow&&eU(i)!=null&&k!==R&&r.reference[d]/2-(k<Q?Q:w)-p[d]/2<0,O=F?k<Q?k-Q:k-M:0;return{[h]:g[h]+O,data:{[h]:R,centerOffset:k-R-O,...F&&{alignmentOffset:O}},reset:F}}}),o9i=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:A,elements:c}=e,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0,...m}=mS(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const _=yP(i),f=T6(a),I=yP(a)===a,C=await(A.isRTL==null?void 0:A.isRTL(c.floating)),y=g||(I||!p?[eme(a)]:JBi(a)),x=d!=="none";!g&&x&&y.push(...qBi(a,p,d,C));const E=[a,...y],B=await A.detectOverflow(e,m),S=[];let Q=((o=r.flip)==null?void 0:o.overflows)||[];if(l&&S.push(B[_]),u){const R=zBi(i,s,C);S.push(B[R[0]],B[R[1]])}if(Q=[...Q,{placement:i,overflows:S}],!S.every(R=>R<=0)){var w,M;const R=(((w=r.flip)==null?void 0:w.index)||0)+1,F=E[R];if(F&&(!(u==="alignment"?f!==T6(F):!1)||Q.every(Y=>T6(Y.placement)===f?Y.overflows[0]>0:!0)))return{data:{index:R,overflows:Q},reset:{placement:F}};let O=(M=Q.filter(U=>U.overflows[0]<=0).sort((U,Y)=>U.overflows[1]-Y.overflows[1])[0])==null?void 0:M.placement;if(!O)switch(h){case"bestFit":{var k;const U=(k=Q.filter(Y=>{if(x){const W=T6(Y.placement);return W===f||W==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(W=>W>0).reduce((W,te)=>W+te,0)]).sort((Y,W)=>Y[1]-W[1])[0])==null?void 0:k[0];U&&(O=U);break}case"initialPlacement":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function UAn(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function KAn(t){return KBi.some(e=>t[e]>=0)}var i9i=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i="referenceHidden",...r}=mS(t,e);switch(i){case"referenceHidden":{const s=await o.detectOverflow(e,{...r,elementContext:"reference"}),a=UAn(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:KAn(a)}}}case"escaped":{const s=await o.detectOverflow(e,{...r,altBoundary:!0}),a=UAn(s,n.floating);return{data:{escapedOffsets:a,escaped:KAn(a)}}}default:return{}}}}},VAn=new Set(["left","top"]);async function r9i(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=yP(n),a=eU(n),A=T6(n)==="y",c=VAn.has(s)?-1:1,l=r&&A?-1:1,u=mS(e,t);let{mainAxis:g,crossAxis:h,alignmentAxis:d}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof d=="number"&&(h=a==="end"?d*-1:d),A?{x:h*l,y:g*c}:{x:g*c,y:h*l}}var s9i=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=e,A=await r9i(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+A.x,y:r+A.y,data:{...A,placement:s}}}}},a9i=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:A={fn:f=>{let{x:I,y:C}=f;return{x:I,y:C}}},...c}=mS(t,e),l={x:n,y:o},u=await r.detectOverflow(e,c),g=T6(i),h=_Je(g);let d=l[h],p=l[g];const m=(f,I)=>LAn(I+u[f==="y"?"top":"left"],I,I-u[f==="y"?"bottom":"right"]);s&&(d=m(h,d)),a&&(p=m(g,p));const _=A.fn({...e,[h]:d,[g]:p});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[h]:s,[g]:a}}}}}},A9i=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:i,y:r,placement:s,rects:a,middlewareData:A}=e,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=mS(t,e),g={x:i,y:r},h=T6(s),d=_Je(h);let p=g[d],m=g[h];const _=mS(c,e),f=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(o=_.crossAxis)!=null?o:0};if(l){const y=d==="y"?"height":"width",x=a.reference[d]-a.floating[y]+f.mainAxis,E=a.reference[d]+a.reference[y]-f.mainAxis;p<x?p=x:p>E&&(p=E)}if(u){var I,C;const y=d==="y"?"width":"height",x=VAn.has(yP(s)),E=a.reference[h]-a.floating[y]+(x&&((I=A.offset)==null?void 0:I[h])||0)+(x?0:f.crossAxis),B=a.reference[h]+a.reference[y]+(x?0:((C=A.offset)==null?void 0:C[h])||0)-(x?f.crossAxis:0);m<E?m=E:m>B&&(m=B)}return{[d]:p,[h]:m}}}},c9i=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:r}=e,{apply:s=()=>{},...a}=mS(t,e),A=await i.detectOverflow(e,a),c=yP(n),l=eU(n),u=T6(n)==="y",{width:g,height:h}=o.floating;let d,p;c==="top"||c==="bottom"?(d=c,p=l===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(p=c,d=l==="end"?"top":"bottom");const m=h-A.top-A.bottom,_=g-A.left-A.right,f=CP(h-A[d],m),I=CP(g-A[p],_),C=e.middlewareData.shift,y=!C;let x=f,E=I;C!=null&&C.enabled.x&&(E=_),C!=null&&C.enabled.y&&(x=m),y&&!l&&(u?E=g-2*hS(A.left,A.right):x=h-2*hS(A.top,A.bottom)),await s({...e,availableWidth:E,availableHeight:x});const B=await i.getDimensions(r.floating);return g!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function nme(){return typeof window<"u"}function tU(t){return zAn(t)?(t.nodeName||"").toLowerCase():"#document"}function Jx(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _S(t){var e;return(e=(zAn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zAn(t){return nme()?t instanceof Node||t instanceof Jx(t).Node:!1}function k6(t){return nme()?t instanceof Element||t instanceof Jx(t).Element:!1}function xP(t){return nme()?t instanceof HTMLElement||t instanceof Jx(t).HTMLElement:!1}function JAn(t){return!nme()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Jx(t).ShadowRoot}function ome(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=F6(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function l9i(t){return/^(table|td|th)$/.test(tU(t))}function ime(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var u9i=/transform|translate|scale|rotate|perspective|filter/,g9i=/paint|layout|strict|content/,CT=t=>!!t&&t!=="none",yJe;function xJe(t){const e=k6(t)?F6(t):t;return CT(e.transform)||CT(e.translate)||CT(e.scale)||CT(e.rotate)||CT(e.perspective)||!EJe()&&(CT(e.backdropFilter)||CT(e.filter))||u9i.test(e.willChange||"")||g9i.test(e.contain||"")}function d9i(t){let e=yT(t);for(;xP(e)&&!lZ(e);){if(xJe(e))return e;if(ime(e))return null;e=yT(e)}return null}function EJe(){return yJe==null&&(yJe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yJe}function lZ(t){return/^(html|body|#document)$/.test(tU(t))}function F6(t){return Jx(t).getComputedStyle(t)}function rme(t){return k6(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function yT(t){if(tU(t)==="html")return t;const e=t.assignedSlot||t.parentNode||JAn(t)&&t.host||_S(t);return JAn(e)?e.host:e}function WAn(t){const e=yT(t);return lZ(e)?(t.ownerDocument||t).body:xP(e)&&ome(e)?e:WAn(e)}function uZ(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=WAn(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=Jx(i);if(r){const a=BJe(s);return e.concat(s,s.visualViewport||[],ome(i)?i:[],a&&n?uZ(a):[])}else return e.concat(i,uZ(i,[],n))}function BJe(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jAn(t){const e=F6(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=xP(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,a=Xpe(n)!==r||Xpe(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function bJe(t){return k6(t)?t:t.contextElement}function nU(t){const e=bJe(t);if(!xP(e))return pS(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=jAn(e);let s=(r?Xpe(n.width):n.width)/o,a=(r?Xpe(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var h9i=pS(0);function $An(t){const e=Jx(t);return!EJe()||!e.visualViewport?h9i:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function p9i(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Jx(t)}function xT(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=bJe(t);let s=pS(1);e&&(o?k6(o)&&(s=nU(o)):s=nU(t));const a=p9i(r,n,o)?$An(r):pS(0);let A=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,l=i.width/s.x,u=i.height/s.y;if(r&&o){const g=Jx(r),h=k6(o)?Jx(o):o;let d=g,p=BJe(d);for(;p&&h!==d;){const m=nU(p),_=p.getBoundingClientRect(),f=F6(p),I=_.left+(p.clientLeft+parseFloat(f.paddingLeft))*m.x,C=_.top+(p.clientTop+parseFloat(f.paddingTop))*m.y;A*=m.x,c*=m.y,l*=m.x,u*=m.y,A+=I,c+=C,d=Jx(p),p=BJe(d)}}return tme({width:l,height:u,x:A,y:c})}function sme(t,e){const n=rme(t).scrollLeft;return e?e.left+n:xT(_S(t)).left+n}function qAn(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-sme(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function m9i(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=_S(o),a=e?ime(e.floating):!1;if(o===s||a&&r)return n;let A={scrollLeft:0,scrollTop:0},c=pS(1);const l=pS(0),u=xP(o);if((u||!r)&&((tU(o)!=="body"||ome(s))&&(A=rme(o)),u)){const h=xT(o);c=nU(o),l.x=h.x+o.clientLeft,l.y=h.y+o.clientTop}const g=s&&!u&&!r?qAn(s,A):pS(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-A.scrollLeft*c.x+l.x+g.x,y:n.y*c.y-A.scrollTop*c.y+l.y+g.y}}function _9i(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function f9i(t){const e=rme(t),n=t.ownerDocument.body,o=hS(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=hS(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+sme(t);const s=-e.scrollTop;return F6(n).direction==="rtl"&&(r+=hS(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:r,y:s}}var I9i=25;function C9i(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=Jx(t),r=_S(t),s=i.visualViewport;let a=r.clientWidth,A=r.clientHeight,c=0,l=0;if(s){const g=!EJe()||e==="fixed";o?g||(c=-s.offsetLeft,l=-s.offsetTop):(a=s.width,A=s.height,g&&(c=s.offsetLeft,l=s.offsetTop))}if(sme(r)<=0){const g=r.ownerDocument,h=g.body,d=getComputedStyle(h),p=g.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-h.clientWidth-p),_=getComputedStyle(r).scrollbarGutter==="stable both-edges"?m/2:m;_<=I9i&&(a-=_)}return{width:a,height:A,x:c,y:l}}function y9i(t,e){const n=xT(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=nU(t),s=t.clientWidth*r.x,a=t.clientHeight*r.y,A=i*r.x,c=o*r.y;return{width:s,height:a,x:A,y:c}}function XAn(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=C9i(t,n,e);else if(e==="document")o=f9i(_S(t));else if(k6(e))o=y9i(e,n);else{const i=$An(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return tme(o)}function x9i(t,e){const n=e.get(t);if(n)return n;let o=uZ(t,[],!1).filter(a=>k6(a)&&tU(a)!=="body"),i=null;const r=F6(t).position==="fixed";let s=r?yT(t):t;for(;k6(s)&&!lZ(s);){const a=F6(s),A=xJe(s),c=i?i.position:r?"fixed":"";!A&&(c==="fixed"||c==="absolute"&&a.position==="static")?o=o.filter(u=>u!==s):i=a,s=yT(s)}return e.set(t,o),o}function E9i(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?ime(e)?[]:x9i(e,this._c):[].concat(n),o],a=XAn(e,s[0],i);let A=a.top,c=a.right,l=a.bottom,u=a.left;for(let g=1;g<s.length;g++){const h=XAn(e,s[g],i);A=hS(h.top,A),c=CP(h.right,c),l=CP(h.bottom,l),u=hS(h.left,u)}return{width:c-u,height:l-A,x:u,y:A}}function B9i(t){const{width:e,height:n}=jAn(t);return{width:e,height:n}}function b9i(t,e,n){const o=xP(e),i=_S(e),r=n==="fixed",s=xT(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const A=pS(0);if((o||!r)&&((tU(e)!=="body"||ome(i))&&(a=rme(e)),o)){const g=xT(e,!0,r,e);A.x=g.x+e.clientLeft,A.y=g.y+e.clientTop}!o&&i&&(A.x=sme(i));const c=i&&!o&&!r?qAn(i,a):pS(0),l=s.left+a.scrollLeft-A.x-c.x,u=s.top+a.scrollTop-A.y-c.y;return{x:l,y:u,width:s.width,height:s.height}}function SJe(t){return F6(t).position==="static"}function ZAn(t,e){if(!xP(t)||F6(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return _S(t)===n&&(n=n.ownerDocument.body),n}function ecn(t,e){const n=Jx(t);if(ime(t))return n;if(!xP(t)){let i=yT(t);for(;i&&!lZ(i);){if(k6(i)&&!SJe(i))return i;i=yT(i)}return n}let o=ZAn(t,e);for(;o&&l9i(o)&&SJe(o);)o=ZAn(o,e);return o&&lZ(o)&&SJe(o)&&!xJe(o)?n:o||d9i(t)||n}var S9i=async function(t){const e=this.getOffsetParent||ecn,n=this.getDimensions,o=await n(t.floating);return{reference:b9i(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Q9i(t){return F6(t).direction==="rtl"}var v9i={convertOffsetParentRelativeRectToViewportRelativeRect:m9i,getDocumentElement:_S,getClippingRect:E9i,getOffsetParent:ecn,getElementRects:S9i,getClientRects:_9i,getDimensions:B9i,getScale:nU,isElement:k6,isRTL:Q9i};function tcn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function w9i(t,e,n){let o=null,i;const r=_S(t);function s(){var l;clearTimeout(i),(l=o)==null||l.disconnect(),o=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const g=t.getBoundingClientRect(),{left:h,top:d,width:p,height:m}=g;if(l||e(),!p||!m)return;const _=Zpe(d),f=Zpe(r.clientWidth-(h+p)),I=Zpe(r.clientHeight-(d+m)),C=Zpe(h),x={rootMargin:-_+"px "+-f+"px "+-I+"px "+-C+"px",threshold:hS(0,CP(1,u))||1};let E=!0;function B(S){const Q=S[0].intersectionRatio;if(!tcn(g,t.getBoundingClientRect()))return a();if(Q!==u){if(!E)return a();Q?a(!1,Q):i=setTimeout(()=>{a(!1,1e-7)},1e3)}E=!1}try{o=new IntersectionObserver(B,{...x,root:r.ownerDocument})}catch{o=new IntersectionObserver(B,x)}o.observe(t)}const A=Jx(t),c=()=>a(n);return A.addEventListener("resize",c),a(!0),()=>{A.removeEventListener("resize",c),s()}}function P9i(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:A=!1}=o,c=bJe(t),l=i||r?[...c?uZ(c):[],...e?uZ(e):[]]:[];l.forEach(_=>{i&&_.addEventListener("scroll",n),r&&_.addEventListener("resize",n)});const u=c&&a?w9i(c,n,r):null;let g=-1,h=null;s&&(h=new ResizeObserver(_=>{let[f]=_;f&&f.target===c&&h&&e&&(h.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var I;(I=h)==null||I.observe(e)})),n()}),c&&!A&&h.observe(c),e&&h.observe(e));let d,p=A?xT(t):null;A&&m();function m(){const _=xT(t);p&&!tcn(p,_)&&n(),p=_,d=requestAnimationFrame(m)}return n(),()=>{var _;l.forEach(f=>{i&&f.removeEventListener("scroll",n),r&&f.removeEventListener("resize",n)}),u?.(),(_=h)==null||_.disconnect(),h=null,A&&cancelAnimationFrame(d)}}var M9i=s9i,D9i=a9i,N9i=o9i,R9i=c9i,T9i=i9i,ncn=n9i,k9i=A9i,F9i=(t,e,n)=>{const o=new Map,i=n??{},r={...v9i,...i.platform,_c:o};return t9i(t,e,{...i,platform:r})},L9i=typeof document<"u",H9i=function(){},ame=L9i?ee.useLayoutEffect:H9i;function Ame(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Ame(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!Ame(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function ocn(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function icn(t,e){const n=ocn(t);return Math.round(e*n)/n}function QJe(t){const e=ee.useRef(t);return ame(()=>{e.current=t}),e}function O9i(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:A,open:c}=t,[l,u]=ee.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,h]=ee.useState(o);Ame(g,o)||h(o);const[d,p]=ee.useState(null),[m,_]=ee.useState(null),f=ee.useCallback(Y=>{Y!==x.current&&(x.current=Y,p(Y))},[]),I=ee.useCallback(Y=>{Y!==E.current&&(E.current=Y,_(Y))},[]),C=r||d,y=s||m,x=ee.useRef(null),E=ee.useRef(null),B=ee.useRef(l),S=A!=null,Q=QJe(A),w=QJe(i),M=QJe(c),k=ee.useCallback(()=>{if(!x.current||!E.current)return;const Y={placement:e,strategy:n,middleware:g};w.current&&(Y.platform=w.current),F9i(x.current,E.current,Y).then(W=>{const te={...W,isPositioned:M.current!==!1};R.current&&!Ame(B.current,te)&&(B.current=te,c6.flushSync(()=>{u(te)}))})},[g,e,n,w,M]);ame(()=>{c===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,u(Y=>({...Y,isPositioned:!1})))},[c]);const R=ee.useRef(!1);ame(()=>(R.current=!0,()=>{R.current=!1}),[]),ame(()=>{if(C&&(x.current=C),y&&(E.current=y),C&&y){if(Q.current)return Q.current(C,y,k);k()}},[C,y,k,Q,S]);const F=ee.useMemo(()=>({reference:x,floating:E,setReference:f,setFloating:I}),[f,I]),O=ee.useMemo(()=>({reference:C,floating:y}),[C,y]),U=ee.useMemo(()=>{const Y={position:n,left:0,top:0};if(!O.floating)return Y;const W=icn(O.floating,l.x),te=icn(O.floating,l.y);return a?{...Y,transform:"translate("+W+"px, "+te+"px)",...ocn(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:te}},[n,a,O.floating,l.x,l.y]);return ee.useMemo(()=>({...l,update:k,refs:F,elements:O,floatingStyles:U}),[l,k,F,O,U])}var G9i=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?ncn({element:o.current,padding:i}).fn(n):{}:o?ncn({element:o,padding:i}).fn(n):{}}}},Y9i=(t,e)=>{const n=M9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},U9i=(t,e)=>{const n=D9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},K9i=(t,e)=>({fn:k9i(t).fn,options:[t,e]}),V9i=(t,e)=>{const n=N9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},z9i=(t,e)=>{const n=R9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},J9i=(t,e)=>{const n=T9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},W9i=(t,e)=>{const n=G9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},j9i=Object.defineProperty,$9i=(t,e)=>j9i(t,"name",{value:e,configurable:!0});function rcn(t){const[e,n]=ee.useState(void 0);return XB(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if("borderBoxSize"in r){const A=r.borderBoxSize,c=Array.isArray(A)?A[0]:A;s=c.inlineSize,a=c.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}$9i(rcn,"useSize");var q9i=Object.defineProperty,EP=(t,e)=>q9i(t,"name",{value:e,configurable:!0}),scn="Popper",[acn,Acn]=fT(scn),[X9i,ccn]=acn(scn),Z9i=EP(t=>{const{__scopePopper:e,children:n}=t,[o,i]=ee.useState(null),[r,s]=ee.useState(void 0);return K.jsx(X9i,{scope:e,anchor:o,onAnchorChange:i,placementState:r,setPlacementState:s,children:n})},"Popper"),e7i="PopperAnchor",t7i=ee.forwardRef(EP(function(e,n){const{__scopePopper:o,virtualRef:i,...r}=e,s=ccn(e7i,o),a=ee.useRef(null),A=s.onAnchorChange,c=ee.useCallback(p=>{a.current=p,p&&A(p)},[A]),l=hf(n,c),u=ee.useRef(null);ee.useEffect(()=>{if(!i)return;const p=u.current;u.current=i.current,p!==u.current&&A(u.current)});const g=s.placementState&&cme(s.placementState),h=g?.[0],d=g?.[1];return i?null:K.jsx(N6.div,{"data-radix-popper-side":h,"data-radix-popper-align":d,...r,ref:l})},"PopperAnchor")),lcn="PopperContent",[n7i,Npr]=acn(lcn),o7i=ee.forwardRef(EP(function(e,n){const{__scopePopper:o,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:A=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:g="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...m}=e,_=ccn(lcn,o),[f,I]=ee.useState(null),C=hf(n,I),[y,x]=ee.useState(null),E=rcn(y),B=E?.width??0,S=E?.height??0,Q=i+(s!=="center"?"-"+s:""),w=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(l)?l:[l],k=M.length>0,R={padding:w,boundary:M.filter(ucn),altBoundary:k},{refs:F,floatingStyles:O,placement:U,isPositioned:Y,middlewareData:W}=O9i({strategy:"fixed",placement:Q,whileElementsMounted:EP((...ue)=>P9i(...ue,{animationFrame:d==="always"}),"whileElementsMounted"),elements:{reference:_.anchor},middleware:[Y9i({mainAxis:r+S,alignmentAxis:a}),c&&U9i({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?K9i():void 0,...R}),c&&V9i({...R}),z9i({...R,apply:EP(({elements:ue,rects:fe,availableWidth:pe,availableHeight:ye})=>{const{width:Me,height:ve}=fe.reference,he=ue.floating.style;he.setProperty("--radix-popper-available-width",`${pe}px`),he.setProperty("--radix-popper-available-height",`${ye}px`),he.setProperty("--radix-popper-anchor-width",`${Me}px`),he.setProperty("--radix-popper-anchor-height",`${ve}px`)},"apply")}),y&&W9i({element:y,padding:A}),i7i({arrowWidth:B,arrowHeight:S}),h&&J9i({strategy:"referenceHidden",...R,boundary:k?R.boundary:void 0})]}),te=_.setPlacementState;XB(()=>(te(U),()=>{te(void 0)}),[U,te]);const[j,J]=cme(U),oe=R6(p);XB(()=>{Y&&oe?.()},[Y,oe]);const ie=W.arrow?.x,ne=W.arrow?.y,le=W.arrow?.centerOffset!==0,[ge,_e]=ee.useState();return XB(()=>{f&&_e(window.getComputedStyle(f).zIndex)},[f]),K.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:Y?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:K.jsx(n7i,{scope:o,placedSide:j,placedAlign:J,onArrowChange:x,arrowX:ie,arrowY:ne,shouldHideArrow:le,children:K.jsx(N6.div,{"data-side":j,"data-align":J,...m,ref:C,style:{...m.style,animation:Y?m.style?.animation:"none"}})})})},"PopperContent"));function ucn(t){return t!==null}EP(ucn,"isNotNull");var i7i=EP(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,a=s?0:t.arrowWidth,A=s?0:t.arrowHeight,[c,l]=cme(n),u={start:"0%",center:"50%",end:"100%"}[l],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+A/2;let d="",p="";return c==="bottom"?(d=s?u:`${g}px`,p=`${-A}px`):c==="top"?(d=s?u:`${g}px`,p=`${o.floating.height+A}px`):c==="right"?(d=`${-A}px`,p=s?u:`${h}px`):c==="left"&&(d=`${o.floating.width+A}px`,p=s?u:`${h}px`),{data:{x:d,y:p}}}}),"transformOrigin");function cme(t){const[e,n="center"]=t.split("-");return[e,n]}EP(cme,"getSideAndAlignFromPlacement");var gcn=Z9i,r7i=t7i,s7i=o7i,a7i=Object.defineProperty,A7i=(t,e)=>a7i(t,"name",{value:e,configurable:!0}),c7i=ee.forwardRef(A7i(function(e,n){const{container:o,...i}=e,[r,s]=ee.useState(!1);XB(()=>s(!0),[]);const a=o||r&&globalThis?.document?.body;return a?c6.createPortal(K.jsx(N6.div,{...i,ref:n}),a):null},"Portal")),l7i=Object.defineProperty,fS=(t,e)=>l7i(t,"name",{value:e,configurable:!0});function dcn(t,e){return ee.useReducer((n,o)=>e[n][o]??n,t)}fS(dcn,"useStateMachine");var vJe=fS(t=>{const{present:e,children:n}=t,o=hcn(e),i=typeof n=="function"?n({present:o.isPresent}):ee.Children.only(n),r=pcn(o.ref,mcn(i));return typeof n=="function"||o.isPresent?ee.cloneElement(i,{ref:r}):null},"Presence");function hcn(t){const[e,n]=ee.useState(),o=ee.useRef(null),i=ee.useRef(t),r=ee.useRef("none"),s=ee.useRef(void 0),a=t?"mounted":"unmounted",[A,c]=dcn(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ee.useEffect(()=>{A==="mounted"?(r.current=s.current??oU(o.current),s.current=void 0):r.current="none"},[A]),XB(()=>{const l=o.current,u=i.current;if(u!==t){const h=r.current,d=oU(l);t?(s.current=d,c("MOUNT")):d==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&h!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),XB(()=>{if(e){let l;const u=e.ownerDocument.defaultView??window,g=fS(d=>{const m=oU(o.current).includes(CSS.escape(d.animationName));if(d.target===e&&m&&(c("ANIMATION_END"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=_)})}},"handleAnimationEnd"),h=fS(d=>{d.target===e&&(r.current=oU(o.current))},"handleAnimationStart");return e.addEventListener("animationstart",h),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",h),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(A),ref:ee.useCallback(l=>{if(l){const u=getComputedStyle(l);o.current=u,s.current=oU(u)}else o.current=null;n(l)},[])}}fS(hcn,"usePresence");function wJe(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}fS(wJe,"setRef");function pcn(...t){const e=ee.useRef(t);return e.current=t,ee.useCallback(n=>{const o=e.current;let i=!1;const r=o.map(s=>{const a=wJe(s,n);return!i&&typeof a=="function"&&(i=!0),a});if(i)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():wJe(o[s],null)}}},[])}fS(pcn,"useStableComposedRefs");function oU(t){return t?.animationName||"none"}fS(oU,"getAnimationName");function mcn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}fS(mcn,"getElementRef");var u7i=Object.defineProperty,PJe=(t,e)=>u7i(t,"name",{value:e,configurable:!0}),MJe=!1;function _cn(){const[t,e]=ee.useState(MJe);return ee.useEffect(()=>{MJe||(MJe=!0,e(!0))},[]),t}PJe(_cn,"useIsHydrated");var fcn=Q5[" useSyncExternalStore ".trim().toString()];function Icn(){return()=>{}}PJe(Icn,"subscribe");function Ccn(){return fcn(Icn,()=>!0,()=>!1)}PJe(Ccn,"useIsHydratedModern");var g7i=typeof fcn=="function"?Ccn:_cn,d7i=Object.defineProperty,ET=(t,e)=>d7i(t,"name",{value:e,configurable:!0}),DJe="rovingFocusGroup.onEntryFocus",h7i={bubbles:!1,cancelable:!0},lme="RovingFocusGroup",[NJe,ycn,p7i]=tJe(lme),[m7i,xcn]=fT(lme,[p7i]),[_7i,f7i]=m7i(lme),I7i=ee.forwardRef(ET(function(e,n){return K.jsx(NJe.Provider,{scope:e.__scopeRovingFocusGroup,children:K.jsx(NJe.Slot,{scope:e.__scopeRovingFocusGroup,children:K.jsx(C7i,{...e,ref:n})})})},"RovingFocusGroup")),C7i=ee.forwardRef(ET(function(e,n){const{__scopeRovingFocusGroup:o,orientation:i,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:A,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...g}=e,h=ee.useRef(null),d=hf(n,h),p=rJe(s),[m,_]=Wpe({prop:a,defaultProp:A??null,onChange:c,caller:lme}),[f,I]=ee.useState(!1),C=R6(l),y=ycn(o),x=ee.useRef(!1),[E,B]=ee.useState(0);return ee.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(DJe,C),()=>S.removeEventListener(DJe,C)},[C]),K.jsx(_7i,{scope:o,orientation:i,dir:p,loop:r,currentTabStopId:m,onItemFocus:ee.useCallback(S=>_(S),[_]),onItemShiftTab:ee.useCallback(()=>I(!0),[]),onFocusableItemAdd:ee.useCallback(()=>B(S=>S+1),[]),onFocusableItemRemove:ee.useCallback(()=>B(S=>S-1),[]),children:K.jsx(N6.div,{tabIndex:f||E===0?-1:0,"data-orientation":i,...g,ref:d,style:{outline:"none",...e.style},onMouseDown:El(e.onMouseDown,()=>{x.current=!0}),onFocus:El(e.onFocus,S=>{const Q=!x.current;if(S.target===S.currentTarget&&Q&&!f){const w=new CustomEvent(DJe,h7i);if(S.currentTarget.dispatchEvent(w),!w.defaultPrevented){const M=y().filter(U=>U.focusable),k=M.find(U=>U.active),R=M.find(U=>U.id===m),O=[k,R,...M].filter(Boolean).map(U=>U.ref.current);RJe(O,u)}}x.current=!1}),onBlur:El(e.onBlur,()=>I(!1))})})},"RovingFocusGroupImpl")),y7i="RovingFocusGroupItem",x7i=ee.forwardRef(ET(function(e,n){const{__scopeRovingFocusGroup:o,focusable:i=!0,active:r=!1,tabStopId:s,children:a,...A}=e,c=ZY(),l=s||c,u=f7i(y7i,o),g=u.currentTabStopId===l,h=ycn(o),{onFocusableItemAdd:d,onFocusableItemRemove:p,currentTabStopId:m}=u,_=g7i();return XB(()=>{if(!(!_||!i))return d(),()=>p()},[_,i,d,p]),ee.useEffect(()=>{if(!(_||!i))return d(),()=>p()},[_,i,d,p]),K.jsx(NJe.ItemSlot,{scope:o,id:l,focusable:i,active:r,children:K.jsx(N6.span,{tabIndex:g?0:-1,"data-orientation":u.orientation,...A,ref:n,onMouseDown:El(e.onMouseDown,f=>{i?u.onItemFocus(l):f.preventDefault()}),onFocus:El(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:El(e.onKeyDown,f=>{if(f.key==="Tab"&&f.shiftKey){u.onItemShiftTab();return}if(f.target!==f.currentTarget)return;const I=Bcn(f,u.orientation,u.dir);if(I!==void 0){if(f.metaKey||f.ctrlKey||f.altKey||f.shiftKey)return;f.preventDefault();let y=h().filter(x=>x.focusable).map(x=>x.ref.current);if(I==="last")y.reverse();else if(I==="prev"||I==="next"){I==="prev"&&y.reverse();const x=y.indexOf(f.currentTarget);y=u.loop?bcn(y,x+1):y.slice(x+1)}setTimeout(()=>RJe(y))}}),children:typeof a=="function"?a({isCurrentTabStop:g,hasTabStop:m!=null}):a})})},"RovingFocusGroupItem")),E7i={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ecn(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}ET(Ecn,"getDirectionAwareKey");function Bcn(t,e,n){const o=Ecn(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return E7i[o]}ET(Bcn,"getFocusIntent");function RJe(t,e=!1){const n=document.activeElement;for(const o of t)if(o===n||(o.focus({preventScroll:e}),document.activeElement!==n))return}ET(RJe,"focusFirst");function bcn(t,e){return t.map((n,o)=>t[(e+o)%t.length])}ET(bcn,"wrapArray");var B7i=I7i,b7i=x7i,S7i=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},iU=new WeakMap,ume=new WeakMap,gme={},TJe=0,Scn=function(t){return t&&(t.host||Scn(t.parentNode))},Q7i=function(t,e){return e.map(function(n){if(t.contains(n))return n;var o=Scn(n);return o&&t.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},v7i=function(t,e,n,o){var i=Q7i(e,Array.isArray(t)?t:[t]);gme[n]||(gme[n]=new WeakMap);var r=gme[n],s=[],a=new Set,A=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var l=function(u){!u||A.has(u)||Array.prototype.forEach.call(u.children,function(g){if(a.has(g))l(g);else try{var h=g.getAttribute(o),d=h!==null&&h!=="false",p=(iU.get(g)||0)+1,m=(r.get(g)||0)+1;iU.set(g,p),r.set(g,m),s.push(g),p===1&&d&&ume.set(g,!0),m===1&&g.setAttribute(n,"true"),d||g.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return l(e),a.clear(),TJe++,function(){s.forEach(function(u){var g=iU.get(u)-1,h=r.get(u)-1;iU.set(u,g),r.set(u,h),g||(ume.has(u)||u.removeAttribute(o),ume.delete(u)),h||u.removeAttribute(n)}),TJe--,TJe||(iU=new WeakMap,iU=new WeakMap,ume=new WeakMap,gme={})}},w7i=function(t,e,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),i=S7i(t);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),v7i(o,i,n,"aria-hidden")):function(){return null}},L6=function(){return L6=Object.assign||function(e){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L6.apply(this,arguments)};function Qcn(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]]);return n}function P7i(t,e,n){for(var o=0,i=e.length,r;o<i;o++)(r||!(o in e))&&(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var dme="right-scroll-bar-position",hme="width-before-scroll-bar",M7i="with-scroll-bars-hidden",D7i="--removed-body-scroll-bar-size";function kJe(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function N7i(t,e){var n=ee.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=e,n.facade}var R7i=typeof window<"u"?ee.useLayoutEffect:ee.useEffect,vcn=new WeakMap;function T7i(t,e){var n=N7i(null,function(o){return t.forEach(function(i){return kJe(i,o)})});return R7i(function(){var o=vcn.get(n);if(o){var i=new Set(o),r=new Set(t),s=n.current;i.forEach(function(a){r.has(a)||kJe(a,null)}),r.forEach(function(a){i.has(a)||kJe(a,s)})}vcn.set(n,t)},[t]),n}function k7i(t){return t}function F7i(t,e){e===void 0&&(e=k7i);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(r){var s=e(r,o);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(r){for(o=!0;n.length;){var s=n;n=[],s.forEach(r)}n={push:function(a){return r(a)},filter:function(){return n}}},assignMedium:function(r){o=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(r),s=n}var A=function(){var l=s;s=[],l.forEach(r)},c=function(){return Promise.resolve().then(A)};c(),n={push:function(l){s.push(l),c()},filter:function(l){return s=s.filter(l),n}}}};return i}function L7i(t){t===void 0&&(t={});var e=F7i(null);return e.options=L6({async:!0,ssr:!1},t),e}var wcn=function(t){var e=t.sideCar,n=Qcn(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=e.read();if(!o)throw new Error("Sidecar medium not found");return ee.createElement(o,L6({},n))};wcn.isSideCarExport=!0;function H7i(t,e){return t.useMedium(e),wcn}var Pcn=L7i(),FJe=function(){},pme=ee.forwardRef(function(t,e){var n=ee.useRef(null),o=ee.useState({onScrollCapture:FJe,onWheelCapture:FJe,onTouchMoveCapture:FJe}),i=o[0],r=o[1],s=t.forwardProps,a=t.children,A=t.className,c=t.removeScrollBar,l=t.enabled,u=t.shards,g=t.sideCar,h=t.noRelative,d=t.noIsolation,p=t.inert,m=t.allowPinchZoom,_=t.as,f=_===void 0?"div":_,I=t.gapMode,C=Qcn(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),y=g,x=T7i([n,e]),E=L6(L6({},C),i);return ee.createElement(ee.Fragment,null,l&&ee.createElement(y,{sideCar:Pcn,removeScrollBar:c,shards:u,noRelative:h,noIsolation:d,inert:p,setCallbacks:r,allowPinchZoom:!!m,lockRef:n,gapMode:I}),s?ee.cloneElement(ee.Children.only(a),L6(L6({},E),{ref:x})):ee.createElement(f,L6({},E,{className:A,ref:x}),a))});pme.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pme.classNames={fullWidth:hme,zeroRight:dme};var O7i=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G7i(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=O7i();return e&&t.setAttribute("nonce",e),t}function Y7i(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function U7i(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var K7i=function(){var t=0,e=null;return{add:function(n){t==0&&(e=G7i())&&(Y7i(e,n),U7i(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},V7i=function(){var t=K7i();return function(e,n){ee.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Mcn=function(){var t=V7i(),e=function(n){var o=n.styles,i=n.dynamic;return t(o,i),null};return e},z7i={left:0,top:0,right:0,gap:0},LJe=function(t){return parseInt(t||"",10)||0},J7i=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],o=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[LJe(n),LJe(o),LJe(i)]},W7i=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return z7i;var e=J7i(t),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-n+e[2]-e[0])}},j7i=Mcn(),rU="data-scroll-locked",$7i=function(t,e,n,o){var i=t.left,r=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(M7i,` {
   overflow: hidden `).concat(o,`;
   padding-right: `).concat(a,"px ").concat(o,`;
  }
  body[`).concat(rU,`] {
    overflow: hidden `).concat(o,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(o,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(r,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(o,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(dme,` {
    right: `).concat(a,"px ").concat(o,`;
  }
  
  .`).concat(hme,` {
    margin-right: `).concat(a,"px ").concat(o,`;
  }
  
  .`).concat(dme," .").concat(dme,` {
    right: 0 `).concat(o,`;
  }
  
  .`).concat(hme," .").concat(hme,` {
    margin-right: 0 `).concat(o,`;
  }
  
  body[`).concat(rU,`] {
    `).concat(D7i,": ").concat(a,`px;
  }
`)},Dcn=function(){var t=parseInt(document.body.getAttribute(rU)||"0",10);return isFinite(t)?t:0},q7i=function(){ee.useEffect(function(){return document.body.setAttribute(rU,(Dcn()+1).toString()),function(){var t=Dcn()-1;t<=0?document.body.removeAttribute(rU):document.body.setAttribute(rU,t.toString())}},[])},X7i=function(t){var e=t.noRelative,n=t.noImportant,o=t.gapMode,i=o===void 0?"margin":o;q7i();var r=ee.useMemo(function(){return W7i(i)},[i]);return ee.createElement(j7i,{styles:$7i(r,!e,i,n?"":"!important")})},HJe=!1;if(typeof window<"u")try{gZ=Object.defineProperty({},"passive",{get:function(){return HJe=!0,!0}}),window.addEventListener("test",gZ,gZ),window.removeEventListener("test",gZ,gZ)}catch{HJe=!1}var gZ,sU=HJe?{passive:!1}:!1,Z7i=function(t){return t.tagName==="TEXTAREA"},Ncn=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Z7i(t)&&n[e]==="visible")},e6i=function(t){return Ncn(t,"overflowY")},t6i=function(t){return Ncn(t,"overflowX")},Rcn=function(t,e){var n=e.ownerDocument,o=e;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=Tcn(t,o);if(i){var r=kcn(t,o),s=r[1],a=r[2];if(s>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},n6i=function(t){var e=t.scrollTop,n=t.scrollHeight,o=t.clientHeight;return[e,n,o]},o6i=function(t){var e=t.scrollLeft,n=t.scrollWidth,o=t.clientWidth;return[e,n,o]},Tcn=function(t,e){return t==="v"?e6i(e):t6i(e)},kcn=function(t,e){return t==="v"?n6i(e):o6i(e)},i6i=function(t,e){return t==="h"&&e==="rtl"?-1:1},r6i=function(t,e,n,o,i){var r=i6i(t,window.getComputedStyle(e).direction),s=r*o,a=n.target,A=e.contains(a),c=!1,l=s>0,u=0,g=0;do{if(!a)break;var h=kcn(t,a),d=h[0],p=h[1],m=h[2],_=p-m-r*d;(d||_)&&Tcn(t,a)&&(u+=_,g+=d);var f=a.parentNode;a=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!A&&a!==document.body||A&&(e.contains(a)||e===a));return(l&&Math.abs(u)<1||!l&&Math.abs(g)<1)&&(c=!0),c},mme=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Fcn=function(t){return[t.deltaX,t.deltaY]},Lcn=function(t){return t&&"current"in t?t.current:t},s6i=function(t,e){return t[0]===e[0]&&t[1]===e[1]},a6i=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},A6i=0,aU=[];function c6i(t){var e=ee.useRef([]),n=ee.useRef([0,0]),o=ee.useRef(),i=ee.useState(A6i++)[0],r=ee.useState(Mcn)[0],s=ee.useRef(t);ee.useEffect(function(){s.current=t},[t]),ee.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=P7i([t.lockRef.current],(t.shards||[]).map(Lcn)).filter(Boolean);return p.forEach(function(m){return m.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=ee.useCallback(function(p,m){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var _=mme(p),f=n.current,I="deltaX"in p?p.deltaX:f[0]-_[0],C="deltaY"in p?p.deltaY:f[1]-_[1],y,x=p.target,E=Math.abs(I)>Math.abs(C)?"h":"v";if("touches"in p&&E==="h"&&x.type==="range")return!1;var B=window.getSelection(),S=B&&B.anchorNode,Q=S?S===x||S.contains(x):!1;if(Q)return!1;var w=Rcn(E,x);if(!w)return!0;if(w?y=E:(y=E==="v"?"h":"v",w=Rcn(E,x)),!w)return!1;if(!o.current&&"changedTouches"in p&&(I||C)&&(o.current=y),!y)return!0;var M=o.current||y;return r6i(M,m,p,M==="h"?I:C)},[]),A=ee.useCallback(function(p){var m=p;if(!(!aU.length||aU[aU.length-1]!==r)){var _="deltaY"in m?Fcn(m):mme(m),f=e.current.filter(function(y){return y.name===m.type&&(y.target===m.target||m.target===y.shadowParent)&&s6i(y.delta,_)})[0];if(f&&f.should){m.cancelable&&m.preventDefault();return}if(!f){var I=(s.current.shards||[]).map(Lcn).filter(Boolean).filter(function(y){return y.contains(m.target)}),C=I.length>0?a(m,I[0]):!s.current.noIsolation;C&&m.cancelable&&m.preventDefault()}}},[]),c=ee.useCallback(function(p,m,_,f){var I={name:p,delta:m,target:_,should:f,shadowParent:l6i(_)};e.current.push(I),setTimeout(function(){e.current=e.current.filter(function(C){return C!==I})},1)},[]),l=ee.useCallback(function(p){n.current=mme(p),o.current=void 0},[]),u=ee.useCallback(function(p){c(p.type,Fcn(p),p.target,a(p,t.lockRef.current))},[]),g=ee.useCallback(function(p){c(p.type,mme(p),p.target,a(p,t.lockRef.current))},[]);ee.useEffect(function(){return aU.push(r),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:g}),document.addEventListener("wheel",A,sU),document.addEventListener("touchmove",A,sU),document.addEventListener("touchstart",l,sU),function(){aU=aU.filter(function(p){return p!==r}),document.removeEventListener("wheel",A,sU),document.removeEventListener("touchmove",A,sU),document.removeEventListener("touchstart",l,sU)}},[]);var h=t.removeScrollBar,d=t.inert;return ee.createElement(ee.Fragment,null,d?ee.createElement(r,{styles:a6i(i)}):null,h?ee.createElement(X7i,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function l6i(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var u6i=H7i(Pcn,c6i),Hcn=ee.forwardRef(function(t,e){return ee.createElement(pme,L6({},t,{ref:e,sideCar:u6i}))});Hcn.classNames=pme.classNames;var g6i=Hcn,d6i=Object.defineProperty,F0=(t,e)=>d6i(t,"name",{value:e,configurable:!0}),OJe=["Enter"," "],h6i=["ArrowDown","PageUp","Home"],Ocn=["ArrowUp","PageDown","End"],p6i=[...h6i,...Ocn],m6i={ltr:[...OJe,"ArrowRight"],rtl:[...OJe,"ArrowLeft"]},_6i={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_me="Menu",[dZ,f6i,I6i]=tJe(_me),[BT,Gcn]=fT(_me,[I6i,Acn,xcn]),fme=Acn(),Ycn=xcn(),[Ucn,BP]=BT(_me),[C6i,hZ]=BT(_me),y6i=F0(t=>{const{__scopeMenu:e,open:n=!1,children:o,dir:i,onOpenChange:r,modal:s=!0}=t,a=fme(e),[A,c]=ee.useState(null),l=ee.useRef(!1),u=R6(r),g=rJe(i);return ee.useEffect(()=>{const h=F0(()=>{l.current=!0,document.addEventListener("pointerdown",d,{capture:!0,once:!0}),document.addEventListener("pointermove",d,{capture:!0,once:!0})},"handleKeyDown"),d=F0(()=>l.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",d,{capture:!0}),document.removeEventListener("pointermove",d,{capture:!0})}},[]),ee.useEffect(()=>{if(!n)return;const h=F0(()=>u(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[n,u]),K.jsx(gcn,{...a,children:K.jsx(Ucn,{scope:e,open:n,onOpenChange:u,content:A,onContentChange:c,children:K.jsx(C6i,{scope:e,onClose:ee.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:l,dir:g,modal:s,children:o})})})},"Menu"),Kcn=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,...i}=e,r=fme(o);return K.jsx(r7i,{...r,...i,ref:n})},"MenuAnchor")),Vcn="MenuPortal",[x6i,zcn]=BT(Vcn,{forceMount:void 0}),E6i=F0(t=>{const{__scopeMenu:e,forceMount:n,children:o,container:i}=t,r=BP(Vcn,e);return K.jsx(x6i,{scope:e,forceMount:n,children:K.jsx(vJe,{present:n||r.open,children:K.jsx(c7i,{asChild:!0,container:i,children:o})})})},"MenuPortal"),e9="MenuContent",[B6i,GJe]=BT(e9),b6i=ee.forwardRef(F0(function(e,n){const o=zcn(e9,e.__scopeMenu),{forceMount:i=o.forceMount,...r}=e,s=BP(e9,e.__scopeMenu),a=hZ(e9,e.__scopeMenu);return K.jsx(dZ.Provider,{scope:e.__scopeMenu,children:K.jsx(vJe,{present:i||s.open,children:K.jsx(dZ.Slot,{scope:e.__scopeMenu,children:a.modal?K.jsx(S6i,{...r,ref:n}):K.jsx(Q6i,{...r,ref:n})})})})},"MenuContent")),S6i=ee.forwardRef(F0(function(e,n){const o=BP(e9,e.__scopeMenu),i=ee.useRef(null),r=hf(n,i);return ee.useEffect(()=>{const s=i.current;if(s)return w7i(s)},[]),K.jsx(YJe,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:El(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentModal")),Q6i=ee.forwardRef(F0(function(e,n){const o=BP(e9,e.__scopeMenu);return K.jsx(YJe,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentNonModal")),v6i=IT("MenuContent.ScrollLock"),YJe=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,loop:i=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:A,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,disableOutsideScroll:p,...m}=e,_=BP(e9,o),f=hZ(e9,o),I=fme(o),C=Ycn(o),y=f6i(o),[x,E]=ee.useState(null),B=ee.useRef(null),S=hf(n,B,_.onContentChange),Q=ee.useRef(0),w=ee.useRef(""),M=ee.useRef(0),k=ee.useRef(null),R=ee.useRef("right"),F=ee.useRef(0),O=p?g6i:ee.Fragment,U=p?{as:v6i,allowPinchZoom:!0}:void 0,Y=F0(te=>{const j=w.current+te,J=y().filter(_e=>!_e.disabled),oe=document.activeElement,ie=J.find(_e=>_e.ref.current===oe)?.textValue,ne=J.map(_e=>_e.textValue),le=tln(ne,j,ie),ge=J.find(_e=>_e.textValue===le)?.ref.current;F0((function _e(ue){w.current=ue,window.clearTimeout(Q.current),ue!==""&&(Q.current=window.setTimeout(()=>_e(""),1e3))}),"updateSearch")(j),ge&&setTimeout(()=>ge.focus())},"handleTypeaheadSearch");ee.useEffect(()=>()=>window.clearTimeout(Q.current),[]),lJe();const W=ee.useCallback(te=>R.current===k.current?.side&&oln(te,k.current?.area),[]);return K.jsx(B6i,{scope:o,searchRef:w,onItemEnter:ee.useCallback(te=>{W(te)&&te.preventDefault()},[W]),onItemLeave:ee.useCallback(te=>{W(te)||(B.current?.focus(),E(null))},[W]),onTriggerLeave:ee.useCallback(te=>{W(te)&&te.preventDefault()},[W]),pointerGraceTimerRef:M,onPointerGraceIntentChange:ee.useCallback(te=>{k.current=te},[]),children:K.jsx(O,{...U,children:K.jsx(HBi,{asChild:!0,trapped:r,onMountAutoFocus:El(s,te=>{te.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:K.jsx(NBi,{asChild:!0,disableOutsidePointerEvents:A,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,children:K.jsx(B7i,{asChild:!0,...C,dir:f.dir,orientation:"vertical",loop:i,currentTabStopId:x,onCurrentTabStopIdChange:E,onEntryFocus:El(c,te=>{f.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:K.jsx(s7i,{role:"menu","aria-orientation":"vertical","data-state":KJe(_.open),"data-radix-menu-content":"",dir:f.dir,...I,...m,ref:S,style:{outline:"none",...m.style},onKeyDown:El(m.onKeyDown,te=>{const J=te.target.closest("[data-radix-menu-content]")===te.currentTarget,oe=te.ctrlKey||te.altKey||te.metaKey,ie=te.key.length===1;J&&(te.key==="Tab"&&te.preventDefault(),!oe&&ie&&Y(te.key));const ne=B.current;if(te.target!==ne||!p6i.includes(te.key))return;te.preventDefault();const ge=y().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);Ocn.includes(te.key)&&ge.reverse(),Zcn(ge)}),onBlur:El(e.onBlur,te=>{te.currentTarget.contains(te.target)||(window.clearTimeout(Q.current),w.current="")}),onPointerMove:El(e.onPointerMove,AU(te=>{const j=te.target,J=F.current!==te.clientX;if(te.currentTarget.contains(j)&&J){const oe=te.clientX>F.current?"right":"left";R.current=oe,F.current=te.clientX}}))})})})})})})},"MenuContentImpl")),UJe="MenuItem",Jcn="menu.itemSelect",Wcn=ee.forwardRef(F0(function(e,n){const{disabled:o=!1,onSelect:i,...r}=e,s=ee.useRef(null),a=hZ(UJe,e.__scopeMenu),A=GJe(UJe,e.__scopeMenu),c=hf(n,s),l=ee.useRef(!1),u=F0(()=>{const g=s.current;if(!o&&g){const h=new CustomEvent(Jcn,{bubbles:!0,cancelable:!0});g.addEventListener(Jcn,d=>i?.(d),{once:!0}),eJe(g,h),h.defaultPrevented?l.current=!1:a.onClose()}},"handleSelect");return K.jsx(jcn,{...r,ref:c,disabled:o,onClick:El(e.onClick,u),onPointerDown:g=>{e.onPointerDown?.(g),l.current=!0},onPointerUp:El(e.onPointerUp,g=>{l.current||g.currentTarget?.click()}),onKeyDown:El(e.onKeyDown,g=>{o||g.target!==g.currentTarget||A.searchRef.current!==""&&g.key===" "||OJe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})},"MenuItem")),jcn=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,disabled:i=!1,textValue:r,...s}=e,a=GJe(UJe,o),A=Ycn(o),c=ee.useRef(null),l=hf(n,c),[u,g]=ee.useState(!1),[h,d]=ee.useState("");return ee.useEffect(()=>{const p=c.current;p&&d((p.textContent??"").trim())},[s.children]),K.jsx(dZ.ItemSlot,{scope:o,disabled:i,textValue:r??h,children:K.jsx(b7i,{asChild:!0,...A,focusable:!i,children:K.jsx(N6.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:l,onPointerMove:El(e.onPointerMove,AU(p=>{i?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:El(e.onPointerLeave,AU(p=>a.onItemLeave(p))),onFocus:El(e.onFocus,()=>g(!0)),onBlur:El(e.onBlur,()=>g(!1))})})})},"MenuItemImpl")),w6i=ee.forwardRef(F0(function(e,n){const{checked:o=!1,onCheckedChange:i,...r}=e;return K.jsx(D6i,{scope:e.__scopeMenu,checked:o,children:K.jsx(Wcn,{role:"menuitemcheckbox","aria-checked":Cme(o)?"mixed":o,...r,ref:n,"data-state":Xcn(o),onSelect:El(r.onSelect,()=>i?.(Cme(o)?!0:!o),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),P6i="MenuRadioGroup",[Rpr,Tpr]=BT(P6i,{value:void 0,onValueChange:F0(()=>{},"onValueChange")}),M6i="MenuItemIndicator",[D6i,kpr]=BT(M6i,{checked:!1}),N6i=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,...i}=e;return K.jsx(N6.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})},"MenuSeparator")),$cn="MenuSub",[R6i,qcn]=BT($cn),T6i=F0(t=>{const{__scopeMenu:e,children:n,open:o=!1,onOpenChange:i}=t,r=BP($cn,e),s=fme(e),[a,A]=ee.useState(null),[c,l]=ee.useState(null),u=R6(i);return ee.useEffect(()=>(r.open===!1&&u(!1),()=>u(!1)),[r.open,u]),K.jsx(gcn,{...s,children:K.jsx(Ucn,{scope:e,open:o,onOpenChange:u,content:c,onContentChange:l,children:K.jsx(R6i,{scope:e,contentId:ZY(),triggerId:ZY(),trigger:a,onTriggerChange:A,children:n})})})},"MenuSub"),Ime="MenuSubTrigger",k6i=ee.forwardRef(F0(function(e,n){const o=BP(Ime,e.__scopeMenu),i=hZ(Ime,e.__scopeMenu),r=qcn(Ime,e.__scopeMenu),s=GJe(Ime,e.__scopeMenu),a=ee.useRef(null),{pointerGraceTimerRef:A,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},u=ee.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);ee.useEffect(()=>u,[u]),ee.useEffect(()=>{const h=A.current;return()=>{window.clearTimeout(h),c(null)}},[A,c]);const g=hf(n,r.onTriggerChange);return K.jsx(Kcn,{asChild:!0,...l,children:K.jsx(jcn,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?r.contentId:void 0,"data-state":KJe(o.open),...e,ref:g,onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:El(e.onPointerMove,AU(h=>{s.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!o.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{o.onOpenChange(!0),u()},100))})),onPointerLeave:El(e.onPointerLeave,AU(h=>{u();const d=o.content?.getBoundingClientRect();if(d){const p=o.content?.dataset.side,m=p==="right",_=m?-5:5,f=d[m?"left":"right"],I=d[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+_,y:h.clientY},{x:f,y:d.top},{x:I,y:d.top},{x:I,y:d.bottom},{x:f,y:d.bottom}],side:p}),window.clearTimeout(A.current),A.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:El(e.onKeyDown,h=>{e.disabled||h.target!==h.currentTarget||s.searchRef.current!==""&&h.key===" "||m6i[i.dir].includes(h.key)&&(o.onOpenChange(!0),o.content?.focus(),h.preventDefault())})})})},"MenuSubTrigger")),F6i="MenuSubContent",L6i=ee.forwardRef(F0(function(e,n){const o=zcn(e9,e.__scopeMenu),{forceMount:i=o.forceMount,align:r="start",...s}=e,a=BP(e9,e.__scopeMenu),A=hZ(e9,e.__scopeMenu),c=qcn(F6i,e.__scopeMenu),l=ee.useRef(null),u=hf(n,l);return K.jsx(dZ.Provider,{scope:e.__scopeMenu,children:K.jsx(vJe,{present:i||a.open,children:K.jsx(dZ.Slot,{scope:e.__scopeMenu,children:K.jsx(YJe,{id:c.contentId,"aria-labelledby":c.triggerId,...s,ref:u,align:r,side:A.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{A.isUsingKeyboardRef.current&&l.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:El(e.onFocusOutside,g=>{g.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:El(e.onEscapeKeyDown,g=>{A.onClose(),g.preventDefault()}),onKeyDown:El(e.onKeyDown,g=>{const h=g.currentTarget.contains(g.target),d=_6i[A.dir].includes(g.key);h&&d&&(a.onOpenChange(!1),c.trigger?.focus(),g.preventDefault())})})})})})},"MenuSubContent"));function KJe(t){return t?"open":"closed"}F0(KJe,"getOpenState");function Cme(t){return t==="indeterminate"}F0(Cme,"isIndeterminate");function Xcn(t){return Cme(t)?"indeterminate":t?"checked":"unchecked"}F0(Xcn,"getCheckedState");function Zcn(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}F0(Zcn,"focusFirst");function eln(t,e){return t.map((n,o)=>t[(e+o)%t.length])}F0(eln,"wrapArray");function tln(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let s=eln(t,Math.max(r,0));i.length===1&&(s=s.filter(c=>c!==n));const A=s.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return A!==n?A:void 0}F0(tln,"getNextMatch");function nln(t,e){const{x:n,y:o}=t;let i=!1;for(let r=0,s=e.length-1;r<e.length;s=r++){const a=e[r],A=e[s],c=a.x,l=a.y,u=A.x,g=A.y;l>o!=g>o&&n<(u-c)*(o-l)/(g-l)+c&&(i=!i)}return i}F0(nln,"isPointInPolygon");function oln(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return nln(n,e)}F0(oln,"isPointerInGraceArea");function AU(t){return e=>e.pointerType==="mouse"?t(e):void 0}F0(AU,"whenMouse");var H6i=y6i,O6i=Kcn,G6i=E6i,Y6i=b6i,U6i=Wcn,K6i=w6i,V6i=N6i,z6i=T6i,J6i=k6i,W6i=L6i,j6i=Object.defineProperty,H6=(t,e)=>j6i(t,"name",{value:e,configurable:!0}),VJe="DropdownMenu",[$6i,Fpr]=fT(VJe,[Gcn]),O6=Gcn(),[q6i,iln]=$6i(VJe),X6i=H6(t=>{const{__scopeDropdownMenu:e,children:n,dir:o,open:i,defaultOpen:r,onOpenChange:s,modal:a=!0}=t,A=O6(e),c=ee.useRef(null),[l,u]=Wpe({prop:i,defaultProp:r??!1,onChange:s,caller:VJe});return K.jsx(q6i,{scope:e,triggerId:ZY(),triggerRef:c,contentId:ZY(),open:l,onOpenChange:u,onOpenToggle:ee.useCallback(()=>u(g=>!g),[u]),modal:a,children:K.jsx(H6i,{...A,open:l,onOpenChange:u,dir:o,modal:a,children:n})})},"DropdownMenu"),Z6i="DropdownMenuTrigger",e8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,disabled:i=!1,...r}=e,s=iln(Z6i,o),a=O6(o),A=hf(n,s.triggerRef);return K.jsx(O6i,{asChild:!0,...a,children:K.jsx(N6.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:A,onPointerDown:El(e.onPointerDown,c=>{!i&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:El(e.onKeyDown,c=>{i||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})},"DropdownMenuTrigger")),t8i=H6(t=>{const{__scopeDropdownMenu:e,...n}=t,o=O6(e);return K.jsx(G6i,{...o,...n})},"DropdownMenuPortal"),n8i="DropdownMenuContent",o8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=iln(n8i,o),s=O6(o),a=ee.useRef(!1);return K.jsx(Y6i,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...i,ref:n,onCloseAutoFocus:El(e.onCloseAutoFocus,A=>{a.current||r.triggerRef.current?.focus(),a.current=!1,A.preventDefault()}),onInteractOutside:El(e.onInteractOutside,A=>{const c=A.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!r.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),i8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(U6i,{...r,...i,ref:n})},"DropdownMenuItem")),r8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(K6i,{...r,...i,ref:n})},"DropdownMenuCheckboxItem")),s8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(V6i,{...r,...i,ref:n})},"DropdownMenuSeparator")),a8i=H6(t=>{const{__scopeDropdownMenu:e,children:n,open:o,onOpenChange:i,defaultOpen:r}=t,s=O6(e),[a,A]=Wpe({prop:o,defaultProp:r??!1,onChange:i,caller:"DropdownMenuSub"});return K.jsx(z6i,{...s,open:a,onOpenChange:A,children:n})},"DropdownMenuSub"),A8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(J6i,{...r,...i,ref:n})},"DropdownMenuSubTrigger")),c8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(W6i,{...r,...i,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),l8i=X6i,u8i=e8i,yme=t8i,g8i=o8i,Sd=i8i,d8i=r8i,IS=s8i,zJe=a8i,JJe=A8i,h8i=c8i,WJe=t=>{const[e,n]=ee.useState(null),[o,i]=ee.useState();return ee.useLayoutEffect(()=>{if(!e)return;const r=document.getElementById(e.getAttribute("aria-labelledby")??"");if(!r)return;let s=0;const a=()=>{if(s=Math.max(s,e.offsetWidth),!s)return;const c=r.getBoundingClientRect(),l=Math.max(c.left-10,document.documentElement.clientWidth-c.right-10);i(l<s?c.width:void 0)},A=new ResizeObserver(a);return A.observe(e),A.observe(r),a(),window.addEventListener("resize",a),()=>{A.disconnect(),window.removeEventListener("resize",a)}},[e]),K.jsx(h8i,{...t,ref:n,sideOffset:o===void 0?t.sideOffset:-o,style:{...t.style,...o===void 0?{}:{minWidth:Math.min(160,o),maxWidth:o}}})},rln={boxSizing:"border-box",minWidth:"min(160px, calc(100vw - 20px))",maxWidth:"calc(100vw - 20px)",maxHeight:"var(--radix-dropdown-menu-content-available-height, calc(100dvh - 20px))",overflowY:"auto",overflowX:"hidden",overscrollBehavior:"contain",overflowWrap:"anywhere"},d1=()=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:K.jsx("path",{d:"M20 6 9 17l-5-5"})}),jJe=({isOpen:t})=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:t?"rotate(90deg)":"rotate(0deg)",opacity:.6},children:K.jsx("path",{d:"m9 18 6-6-6-6"})}),p8i=()=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:K.jsx("path",{d:"M5 12h14"})}),sln=()=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-dot-icon lucide-dot",children:K.jsx("circle",{cx:"12.1",cy:"12.1",r:"4.5",fill:"white"})}),c2={padding:"6px 8px",borderRadius:6,cursor:"default",outline:"none",userSelect:"none",display:"flex",alignItems:"center",gap:8,color:"#fafafa",fontWeight:400,fontSize:14,transition:"background-color 0.15s ease, color 0.15s ease",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},m8i={paddingLeft:32,paddingTop:6,paddingBottom:6,paddingRight:8},$Je={height:1,backgroundColor:"#ffffff1a",margin:"4px 0"},_8i={...rln,backgroundColor:"#262626",color:"#fafafa",borderRadius:8,boxShadow:"0px 12px 48px -12px rgba(0, 0, 0, 0.5), 0px 8px 24px -8px rgba(0, 0, 0, 0.3)",border:"1px solid #333333",padding:"4px",zIndex:kX.appearanceMenu,fontSize:14,fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},Wx={width:16,height:16,display:"flex",alignItems:"flex-end",justifyContent:"center",flexShrink:0},f8i=()=>{const{visibility:t,setLayerVisibility:e}=AT(),{darkBackgroundEnabled:n,setDarkBackgroundEnabled:o,lightingEnabled:i,setLightingEnabled:r}=wze(),[s,a]=ee.useState(!1),[A,c]=ee.useState(null);return K.jsxs(K.Fragment,{children:[K.jsx(IS,{style:$Je}),K.jsxs(zJe,{onOpenChange:a,children:[K.jsxs(JJe,{style:{...c2,...m8i,backgroundColor:s||A==="appearance"?"#404040":"transparent"},onMouseEnter:()=>c("appearance"),onMouseLeave:()=>c(null),onTouchStart:()=>c("appearance"),children:[K.jsx("span",{style:{flex:1,display:"flex",alignItems:"center"},children:"Appearance"}),K.jsx("div",{style:{marginLeft:"auto",display:"flex",alignItems:"flex-end",marginBottom:"-5px"},children:K.jsx(jJe,{isOpen:s})})]}),K.jsx(yme,{children:K.jsxs(WJe,{style:{..._8i,marginLeft:-2},collisionPadding:10,avoidCollisions:!0,children:[K.jsxs(Sd,{style:{...c2,backgroundColor:A==="darkBackground"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),o(!n)},onMouseEnter:()=>c("darkBackground"),onMouseLeave:()=>c(null),onTouchStart:()=>c("darkBackground"),children:[K.jsx("span",{style:Wx,children:n&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Dark Background"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="lighting"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),r(!i)},onMouseEnter:()=>c("lighting"),onMouseLeave:()=>c(null),onTouchStart:()=>c("lighting"),children:[K.jsx("span",{style:Wx,children:i&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Lighting"})]}),K.jsx(IS,{style:$Je}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="boardBody"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("boardBody",!t.boardBody)},onMouseEnter:()=>c("boardBody"),onMouseLeave:()=>c(null),onTouchStart:()=>c("boardBody"),children:[K.jsx("span",{style:Wx,children:t.boardBody&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Board Body"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="topCopper"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("topCopper",!t.topCopper)},onMouseEnter:()=>c("topCopper"),onMouseLeave:()=>c(null),onTouchStart:()=>c("topCopper"),children:[K.jsx("span",{style:Wx,children:t.topCopper&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Top Copper"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="bottomCopper"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("bottomCopper",!t.bottomCopper)},onMouseEnter:()=>c("bottomCopper"),onMouseLeave:()=>c(null),onTouchStart:()=>c("bottomCopper"),children:[K.jsx("span",{style:Wx,children:t.bottomCopper&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Bottom Copper"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="keepout"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("keepout",!t.keepout)},onMouseEnter:()=>c("keepout"),onMouseLeave:()=>c(null),onTouchStart:()=>c("keepout"),children:[K.jsx("span",{style:Wx,children:t.keepout&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Keepout"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="topSilkscreen"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("topSilkscreen",!t.topSilkscreen)},onMouseEnter:()=>c("topSilkscreen"),onMouseLeave:()=>c(null),onTouchStart:()=>c("topSilkscreen"),children:[K.jsx("span",{style:Wx,children:t.topSilkscreen&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Top Silkscreen"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="bottomSilkscreen"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("bottomSilkscreen",!t.bottomSilkscreen)},onMouseEnter:()=>c("bottomSilkscreen"),onMouseLeave:()=>c(null),onTouchStart:()=>c("bottomSilkscreen"),children:[K.jsx("span",{style:Wx,children:t.bottomSilkscreen&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Bottom Silkscreen"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="topMask"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("topMask",!t.topMask)},onMouseEnter:()=>c("topMask"),onMouseLeave:()=>c(null),onTouchStart:()=>c("topMask"),children:[K.jsx("span",{style:Wx,children:t.topMask&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Top Soldermask"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="bottomMask"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("bottomMask",!t.bottomMask)},onMouseEnter:()=>c("bottomMask"),onMouseLeave:()=>c(null),onTouchStart:()=>c("bottomMask"),children:[K.jsx("span",{style:Wx,children:t.bottomMask&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Bottom Soldermask"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="pcbNotes"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("pcbNotes",!t.pcbNotes)},onMouseEnter:()=>c("pcbNotes"),onMouseLeave:()=>c(null),onTouchStart:()=>c("pcbNotes"),children:[K.jsx("span",{style:Wx,children:t.pcbNotes&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"PCB Notes"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="smtModels"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("smtModels",!t.smtModels)},onMouseEnter:()=>c("smtModels"),onMouseLeave:()=>c(null),onTouchStart:()=>c("smtModels"),children:[K.jsx("span",{style:Wx,children:t.smtModels&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Surface Mount Components"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="throughHoleModels"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("throughHoleModels",!t.throughHoleModels)},onMouseEnter:()=>c("throughHoleModels"),onMouseLeave:()=>c(null),onTouchStart:()=>c("throughHoleModels"),children:[K.jsx("span",{style:Wx,children:t.throughHoleModels&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Through-Hole Components"})]}),K.jsx(IS,{style:$Je}),K.jsxs(Sd,{style:{...c2,backgroundColor:A==="enclosure"?"#404040":"transparent"},onSelect:l=>l.preventDefault(),onPointerDown:l=>{l.preventDefault(),e("enclosure",_mi(t.enclosure))},onMouseEnter:()=>c("enclosure"),onMouseLeave:()=>c(null),onTouchStart:()=>c("enclosure"),title:`Enclosure: ${t.enclosure}`,children:[K.jsxs("span",{style:Wx,children:[t.enclosure==="opaque"&&K.jsx(d1,{}),t.enclosure==="translucent"&&K.jsx(p8i,{})]}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Enclosure"})]})]})})]})]})},I8i=["Custom","Top Center Angled","Top Down","Top Left Corner","Top Right Corner","Left Sideview","Right Sideview","Front"],qJe={...rln,backgroundColor:"#262626",color:"#fafafa",borderRadius:6,boxShadow:"0px 12px 48px -12px rgba(0, 0, 0, 0.5), 0px 8px 24px -8px rgba(0, 0, 0, 0.3)",border:"1px solid #333333",padding:"4px",zIndex:kX.contextMenu,fontSize:14,fontWeight:400,fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},jx={padding:"6px 8px",borderRadius:6,cursor:"default",outline:"none",userSelect:"none",display:"flex",alignItems:"center",gap:8,color:"#fafafa",fontWeight:400,fontSize:14,transition:"background-color 0.15s ease, color 0.15s ease",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},bP={paddingLeft:32,paddingTop:6,paddingBottom:6,paddingRight:8},cU={width:16,height:16,display:"flex",alignItems:"flex-end",justifyContent:"center",flexShrink:0},lU={height:1,backgroundColor:"#ffffff1a",margin:"4px 0"},aln={fontSize:11,opacity:.65,fontWeight:500,color:"#b5b5bcff",backgroundColor:"rgba(161, 161, 170, 0.1)",padding:"2px 6px",borderRadius:4,border:"1px solid rgba(161, 161, 170, 0.2)",letterSpacing:"0.3px"},C8i=({menuRef:t,menuPos:e,engine:n,cameraPreset:o,autoRotate:i,foldPcbs:r=!1,onFoldPcbsToggle:s,flexScene:a=!1,referenceObject:A=null,onEngineSwitch:c,onCameraPresetSelect:l,onAutoRotateToggle:u,onReferenceObjectSelect:g=()=>{},onViewSchematicComponent:h,componentName:d,onHideComponent:p,onUnhideAllComponents:m,onDownloadGltf:_,onOpenKeyboardShortcuts:f})=>{const{cameraType:I,setCameraType:C}=gS(),{gridEnabled:y,setGridEnabled:x}=wze(),[E,B]=ee.useState(!1),[S,Q]=ee.useState(!1),[w,M]=ee.useState(null);return K.jsx("div",{ref:t,style:{position:"fixed",left:e.x,top:e.y,width:0,height:0},children:K.jsxs(l8i,{open:!0,modal:!1,children:[K.jsx(u8i,{asChild:!0,children:K.jsx("div",{style:{position:"absolute",width:1,height:1}})}),K.jsx(yme,{children:K.jsxs(g8i,{style:qJe,collisionPadding:10,avoidCollisions:!0,sideOffset:0,align:"start",children:[h&&K.jsx(K.Fragment,{children:K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w==="schematic"?"#404040":"transparent"},onSelect:h,onMouseEnter:()=>M("schematic"),onMouseLeave:()=>M(null),children:"Show on schematic"})}),p&&K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w==="hide"?"#404040":"transparent"},onSelect:p,onMouseEnter:()=>M("hide"),onMouseLeave:()=>M(null),children:`Hide "${d}"`}),m&&K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w==="unhide"?"#404040":"transparent"},onSelect:m,onMouseEnter:()=>M("unhide"),onMouseLeave:()=>M(null),children:"Unhide All Components"}),(h||p||m)&&K.jsx(IS,{style:lU}),K.jsxs(zJe,{onOpenChange:B,children:[K.jsxs(JJe,{style:{...jx,...bP,backgroundColor:E||w==="camera"?"#404040":"transparent"},onMouseEnter:()=>M("camera"),onMouseLeave:()=>M(null),onTouchStart:()=>M("camera"),children:[K.jsx("span",{style:{flex:1,display:"flex",alignItems:"center"},children:"Camera"}),K.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:6,marginLeft:"auto"},children:[K.jsx("span",{style:{opacity:.55,fontSize:13},children:o}),K.jsx(jJe,{isOpen:E})]})]}),K.jsx(yme,{children:K.jsxs(WJe,{style:{...qJe,marginLeft:-2},collisionPadding:10,avoidCollisions:!0,children:[I8i.map(k=>K.jsxs(Sd,{style:{...jx,backgroundColor:w===k?"#404040":"transparent"},onSelect:()=>l(k),onMouseEnter:()=>M(k),onMouseLeave:()=>M(null),onTouchStart:()=>M(k),children:[K.jsx("span",{style:cU,children:o===k&&K.jsx(sln,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:k})]},k)),K.jsx(IS,{style:lU}),K.jsxs(Sd,{style:{...jx,backgroundColor:w==="autorotate"?"#404040":"transparent"},onSelect:u,onMouseEnter:()=>M("autorotate"),onMouseLeave:()=>M(null),onTouchStart:()=>M("autorotate"),children:[K.jsx("span",{style:cU,children:i&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Auto rotate"})]}),K.jsxs(Sd,{style:{...jx,backgroundColor:w==="cameratype"?"#404040":"transparent"},onSelect:k=>{k.preventDefault(),C(I==="perspective"?"orthographic":"perspective")},onMouseEnter:()=>M("cameratype"),onMouseLeave:()=>M(null),onTouchStart:()=>M("cameratype"),children:[K.jsx("span",{style:cU,children:I==="orthographic"&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Orthographic Camera"})]})]})})]}),K.jsxs(zJe,{onOpenChange:Q,children:[K.jsxs(JJe,{style:{...jx,...bP,backgroundColor:S||w==="reference-object"?"#404040":"transparent"},onMouseEnter:()=>M("reference-object"),onMouseLeave:()=>M(null),onTouchStart:()=>M("reference-object"),children:[K.jsx("span",{style:{flex:1,display:"flex",alignItems:"center"},children:"Show Reference Object"}),K.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:6,marginLeft:"auto"},children:K.jsx(jJe,{isOpen:S})})]}),K.jsx(yme,{children:K.jsx(WJe,{style:{...qJe,marginLeft:-2},collisionPadding:10,avoidCollisions:!0,children:gEi.map(k=>{const R=k.type??"none";return K.jsxs(Sd,{style:{...jx,backgroundColor:w===R?"#404040":"transparent"},onSelect:F=>F.preventDefault(),onPointerDown:F=>{F.preventDefault(),g(k.type)},onMouseEnter:()=>M(R),onMouseLeave:()=>M(null),onTouchStart:()=>M(R),children:[K.jsx("span",{style:cU,children:A===k.type&&K.jsx(sln,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:k.label})]},R)})})})]}),s&&K.jsxs(d8i,{checked:r,onCheckedChange:s,style:{...jx,backgroundColor:w==="fold"?"#404040":"transparent"},onMouseEnter:()=>M("fold"),onMouseLeave:()=>M(null),children:[K.jsx("span",{style:cU,children:r&&K.jsx(d1,{})}),K.jsx("span",{children:"Fold PCBs"})]}),K.jsxs(Sd,{style:{...jx,backgroundColor:w==="grid"?"#404040":"transparent"},onSelect:k=>k.preventDefault(),onPointerDown:k=>{k.preventDefault(),x(!y)},onMouseEnter:()=>M("grid"),onMouseLeave:()=>M(null),onTouchStart:()=>M("grid"),children:[K.jsx("span",{style:cU,children:y&&K.jsx(d1,{})}),K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Show Grid"})]}),K.jsx(f8i,{}),K.jsx(IS,{style:lU}),K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w==="download"?"#404040":"transparent"},onSelect:_,onMouseEnter:()=>M("download"),onMouseLeave:()=>M(null),onTouchStart:()=>M("download"),children:K.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Download GLTF"})}),K.jsx(IS,{style:lU}),!a&&K.jsxs(Sd,{style:{...jx,...bP,backgroundColor:w==="engine"?"#404040":"transparent"},onSelect:k=>k.preventDefault(),onPointerDown:k=>{k.preventDefault(),c(n==="jscad"?"manifold":"jscad")},onMouseEnter:()=>M("engine"),onMouseLeave:()=>M(null),onTouchStart:()=>M("engine"),children:[K.jsxs("span",{style:{flex:1,display:"flex",alignItems:"center"},children:["Switch to ",n==="jscad"?"Manifold":"JSCAD"," Engine"]}),K.jsx("div",{style:{...aln,display:"flex",alignItems:"center"},children:n==="jscad"?"experimental":"default"})]}),K.jsx(IS,{style:lU}),K.jsxs(Sd,{style:{...jx,...bP,backgroundColor:w==="shortcuts"?"#404040":"transparent"},onSelect:f,onMouseEnter:()=>M("shortcuts"),onMouseLeave:()=>M(null),onTouchStart:()=>M("shortcuts"),children:[K.jsx("span",{style:{flex:1,display:"flex",alignItems:"center"},children:"Keyboard Shortcuts"}),K.jsx("div",{style:{...aln,display:"flex",alignItems:"center"},children:"Shift+?"})]}),K.jsx(IS,{style:lU}),K.jsx("div",{style:{display:"flex",alignItems:"center",marginTop:0,paddingLeft:32,paddingTop:4,paddingBottom:4},children:K.jsxs("span",{style:{fontSize:11,opacity:.35,fontWeight:400,color:"#a1a1aa",letterSpacing:"0.2px"},children:["@tscircuit/3d-viewer@",man.version]})})]})})]})})},uU=new Map,XJe=new Set,Aln=!1,ZJe=0,eWe=0,xme=null,cln=!1,y8i=20,x8i=t=>{const e=t.toLowerCase().split("+"),n=e[e.length-1],o=e.slice(0,-1);return{key:n,ctrl:o.includes("ctrl"),cmd:o.includes("cmd"),shift:o.includes("shift"),alt:o.includes("alt")}},E8i=(t,e)=>{const n=x8i(e),o=t.key.toLowerCase()===n.key,i=n.ctrl===t.ctrlKey,r=n.cmd===t.metaKey,s=n.shift===t.shiftKey,a=n.alt===t.altKey;return o&&i&&r&&s&&a},B8i=t=>{if(!t||typeof t!="object")return!1;const e=t,n=e.tagName,o=["INPUT","TEXTAREA","SELECT"];if(o.includes(n))return!0;const i=e.getAttribute?.("contenteditable");if(i==="true"||i==="")return!0;let r=e.parentElement;for(let s=0;s<y8i&&r;s++){const a=r.tagName;if(o.includes(a))return!0;const A=r.getAttribute?.("contenteditable");if(A==="true"||A==="")return!0;r=r.parentElement}return!1},b8i=()=>{if(typeof document>"u")return!1;const t=document.activeElement;if(!t)return!1;const e=t.tagName;if(e==="INPUT"||e==="TEXTAREA"||e==="SELECT")return!0;const n=t.getAttribute("contenteditable");return n==="true"||n===""},S8i=()=>{if(!xme)return!0;const t=xme.getBoundingClientRect();return ZJe>=t.left&&ZJe<=t.right&&eWe>=t.top&&eWe<=t.bottom},Q8i=()=>{cln||typeof window>"u"||(window.addEventListener("mousemove",t=>{ZJe=t.clientX,eWe=t.clientY}),cln=!0)},v8i=t=>{B8i(t.target)||b8i()||xme&&!S8i()||uU.forEach(e=>{E8i(t,e.shortcut)&&(t.preventDefault(),e.invoke())})},lln=()=>{const t=Array.from(uU.values());XJe.forEach(e=>e(t))},w8i=()=>{Aln||typeof window>"u"||(window.addEventListener("keydown",v8i),Aln=!0)},P8i=t=>{uU.set(t.id,t),lln(),w8i()},M8i=t=>{uU.delete(t)&&lln()},D8i=t=>(XJe.add(t),t(Array.from(uU.values())),()=>{XJe.delete(t)}),Eme=(t,e,n)=>{const o=ee.useRef(e);o.current=e;const i=ee.useMemo(()=>({shortcut:n.shortcut,description:n.description}),[n.shortcut,n.description]);ee.useEffect(()=>{const r={id:t,...i,invoke:()=>o.current()};return P8i(r),()=>{M8i(t)}},[t,i])},N8i=()=>{const[t,e]=ee.useState(()=>Array.from(uU.values()));return ee.useEffect(()=>D8i(e),[]),t},R8i=t=>{xme=t,Q8i()},T8i=({open:t,onClose:e})=>{const[n,o]=ee.useState(""),i=ee.useRef(null),r=N8i();ee.useEffect(()=>{if(!t)return;const a=A=>{A.key==="Escape"&&(A.preventDefault(),e())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t,e]),ee.useEffect(()=>{t&&setTimeout(()=>{i.current?.focus()},0)},[t]);const s=ee.useMemo(()=>{const a=n.trim().toLowerCase();return a?r.filter(A=>`${A.shortcut} ${A.description}`.toLowerCase().includes(a)):r},[r,n]);return t?K.jsx("div",{role:"dialog","aria-modal":"true",style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:e,children:K.jsxs("div",{style:{backgroundColor:"#1f1f23",color:"#f8f8ff",borderRadius:12,width:"min(640px, 90vw)",maxHeight:"80vh",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.35)",display:"flex",flexDirection:"column",overflow:"hidden"},onClick:a=>a.stopPropagation(),children:[K.jsxs("header",{style:{padding:"20px 24px 12px",borderBottom:"1px solid rgba(255, 255, 255, 0.08)"},children:[K.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[K.jsx("h2",{style:{margin:0,fontSize:"1.1rem",fontWeight:600,letterSpacing:"0.02em"},children:"Keyboard Shortcuts"}),K.jsx("button",{type:"button",onClick:e,style:{background:"transparent",border:"none",color:"rgba(255, 255, 255, 0.8)",fontSize:"1rem",cursor:"pointer"},children:"✕"})]}),K.jsx("input",{ref:i,type:"text",placeholder:"Search shortcuts...",value:n,onChange:a=>o(a.target.value),style:{marginTop:12,width:"calc(100% - 24px)",padding:"10px 12px",borderRadius:8,border:"1px solid rgba(255, 255, 255, 0.1)",backgroundColor:"rgba(255, 255, 255, 0.05)",color:"white",fontSize:"0.95rem"}})]}),K.jsx("div",{style:{overflowY:"auto"},children:K.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"0.95rem"},children:[K.jsx("thead",{children:K.jsxs("tr",{style:{textAlign:"left",color:"#a1a1b5"},children:[K.jsx("th",{style:{padding:"12px 24px",width:"25%"},children:"Key"}),K.jsx("th",{style:{padding:"12px 24px"},children:"Description"})]})}),K.jsx("tbody",{children:s.length===0?K.jsx("tr",{children:K.jsx("td",{colSpan:2,style:{padding:"24px",textAlign:"center"},children:"No shortcuts found"})}):s.map(a=>K.jsxs("tr",{style:{borderTop:"1px solid rgba(255, 255, 255, 0.05)"},children:[K.jsx("td",{style:{padding:"12px 24px"},children:K.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid rgba(255, 255, 255, 0.3)",borderRadius:6,minWidth:36,padding:"4px 8px",fontFamily:"monospace",fontSize:"0.95rem",textTransform:"capitalize"},children:a.shortcut})}),K.jsx("td",{style:{padding:"12px 24px"},children:a.description})]},a.id))})]})})]})}):null},k8i=()=>({showToast:(t,e=2e3)=>{ua(t,{duration:e})}}),F8i=({children:t})=>K.jsxs(K.Fragment,{children:[t,K.jsx(ein,{position:"bottom-right"})]});function L8i({setAutoRotate:t,setAutoRotateUserToggled:e,setCameraPreset:n,closeMenu:o,cameraControllerRef:i,isAnimatingRef:r,lastPresetSelectTime:s}){return{handleCameraPresetSelect:ee.useCallback(A=>{t(!1),e(!0),n(A),o(),s.current=Date.now(),A!=="Custom"&&(r.current=!0,i.current?.animateToPreset(A),setTimeout(()=>{r.current=!1},600))},[t,e,n,o,i,r,s])}}var H8i=({containerRef:t,onOpen:e})=>{const[n,o]=ee.useState(!1),[i,r]=ee.useState({x:0,y:0}),s=ee.useRef(null),a=ee.useRef(null),A=ee.useRef(null),c=ee.useRef(!1),l=()=>{A.current!==null&&(clearTimeout(A.current),A.current=null)},u=ee.useCallback(_=>{_.preventDefault();const f=typeof _.clientX=="number"?_.clientX:0,I=typeof _.clientY=="number"?_.clientY:0;if(c.current){c.current=!1;return}if(!a.current)return;const{x:C,y}=a.current,x=Math.abs(f-C),E=Math.abs(I-y),B=10;if(x>B||E>B){a.current=null;return}e?.({x:f,y:I}),r({x:f,y:I}),o(!0),a.current=null},[r,o,e]),g=ee.useCallback(_=>{if(_.touches.length===1){const f=_.touches[0];f?(a.current={x:f.clientX,y:f.clientY},l(),A.current=window.setTimeout(()=>{if(a.current){if(t.current){e?.(a.current);const I=t.current.getBoundingClientRect();r({x:I.left+I.width/2,y:I.top+I.height/2}),o(!0),c.current=!0}a.current=null}},600)):a.current=null}else a.current=null,l()},[t,e]),h=ee.useCallback(_=>{if(!a.current||_.touches.length!==1)return;const f=_.touches[0];if(f){const I=Math.abs(f.clientX-a.current.x),C=Math.abs(f.clientY-a.current.y),y=10;(I>y||C>y)&&(a.current=null,l())}else a.current=null,l()},[]),d=ee.useCallback(()=>{l(),setTimeout(()=>{a.current&&(a.current=null)},0)},[]),p=ee.useCallback(_=>{const f=_.target;s.current&&s.current.contains(f)||f.closest?.("[data-radix-popper-content-wrapper], [data-radix-dropdown-menu-content], [data-radix-dropdown-menu-sub-content]")||o(!1)},[]);return ee.useEffect(()=>{if(n)return document.addEventListener("mousedown",p),document.addEventListener("touchstart",p),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("touchstart",p)}},[n,p]),{menuVisible:n,menuPos:i,menuRef:s,contextMenuEventHandlers:{onMouseDown:_=>{_.button===2?a.current={x:_.clientX,y:_.clientY}:a.current=null},onContextMenu:u,onTouchStart:g,onTouchMove:h,onTouchEnd:d},setMenuVisible:o}},O8i=()=>ee.useCallback(()=>{const t=window.__TSCIRCUIT_THREE_OBJECT;if(!t)return;new pke().parse(t,n=>{const o=new Blob([n instanceof ArrayBuffer?n:JSON.stringify(n)],{type:"model/gltf+json"}),i=URL.createObjectURL(o),r=document.createElement("a");r.href=i,r.download="scene.gltf",r.click(),URL.revokeObjectURL(i)},n=>{console.error("Failed to export GLTF",n)})},[]),G8i=new jt(0,0,0),Y8i=[5,-5,5],U8i=()=>{if(typeof window>"u")return;const t=window.localStorage.getItem("cadViewerCameraType");return t==="orthographic"||t==="perspective"?t:void 0},K8i=t=>{const e=OVe(t.circuitJson?void 0:t.children),n=t.circuitJson??e,o=n.some(Te=>Te.type==="pcb_bend"),i=o||n.some(Te=>Te.type==="pcb_stiffener"),[r,s]=ee.useState(void 0),a=r??t.foldPcbs,A=Srn(n,a),c=JSON.stringify(n),{hiddenCadComponentIds:l,hideComponent:u,unhideAllComponents:g}=pmi(c),h={...t,circuitJson:n,children:void 0,hiddenCadComponentIds:l},[d,p]=ee.useState(()=>{const Te=window.localStorage.getItem("cadViewerEngine");return Te==="jscad"||Te==="manifold"?Te:"manifold"}),m=ee.useRef(null),[_,f]=ee.useState(!1),[I,C]=ee.useState(()=>window.localStorage.getItem("cadViewerAutoRotate")!=="false"),[y,x]=ee.useState(()=>window.localStorage.getItem("cadViewerAutoRotateUserToggled")==="true"),[E,B]=ee.useState("Custom"),[S,Q]=ee.useState(null),{cameraType:w}=gS(),{visibility:M,setLayerVisibility:k}=AT(),{showToast:R}=k8i(),F=ee.useRef(null),O=t.onCameraControllerReady,U=ee.useContext(HVe),[Y,W]=ee.useState(),[te,j]=ee.useState(),J=ee.useCallback(Te=>{j(hmi(U.current,Te,n)),W(t.onViewSchematicComponent?dmi(U.current,Te,n):void 0)},[U,n,t.onViewSchematicComponent]),{menuVisible:oe,menuPos:ie,menuRef:ne,contextMenuEventHandlers:le,setMenuVisible:ge}=H8i({containerRef:m,onOpen:J}),_e=ee.useRef(y);_e.current=y;const ue=ee.useRef(!1),fe=ee.useRef(0),pe=1e3,ye=ee.useCallback(()=>{ue.current||Date.now()-fe.current<pe||(_e.current||C(!1),oe||B("Custom"))},[oe]),Me=ee.useCallback(()=>{C(Te=>!Te),x(!0)},[]),ve=O8i(),he=ee.useCallback(()=>{ge(!1)},[ge]),Qe=ee.useCallback(Te=>{F.current=Te,O?.(Te),Te&&E!=="Custom"&&Te.animateToPreset(E)},[E,O]),{handleCameraPresetSelect:Pe}=L8i({setAutoRotate:C,setAutoRotateUserToggled:x,setCameraPreset:B,closeMenu:he,cameraControllerRef:F,isAnimatingRef:ue,lastPresetSelectTime:fe});Eme("open_keyboard_shortcuts_dialog",()=>{f(!0)},{shortcut:"shift+?",description:"Open keyboard shortcuts"}),Eme("toggle_smt_models",()=>{const Te=!M.smtModels;k("smtModels",Te),R(Te?"SMT components visible":"SMT components hidden",1500)},{shortcut:"shift+s",description:"Toggle surface mount components"}),Eme("toggle_through_hole_models",()=>{const Te=!M.throughHoleModels;k("throughHoleModels",Te),R(Te?"Through-hole components visible":"Through-hole components hidden",1500)},{shortcut:"shift+t",description:"Toggle through-hole components"}),Eme("toggle_translucent_models",()=>{const Te=!M.translucentModels;k("translucentModels",Te),R(Te?"Translucent components visible":"Translucent components hidden",1500)},{shortcut:"shift+v",description:"Toggle translucent components"}),ee.useEffect(()=>{m.current&&R8i(m.current)},[]),ee.useEffect(()=>{window.localStorage.setItem("cadViewerEngine",d)},[d]),ee.useEffect(()=>{window.localStorage.setItem("cadViewerAutoRotate",String(I))},[I]),ee.useEffect(()=>{window.localStorage.setItem("cadViewerAutoRotateUserToggled",String(y))},[y]),ee.useEffect(()=>{window.localStorage.setItem("cadViewerCameraType",w)},[w]);const we=t.circuitJson?c:void 0;return K.jsxs("div",{ref:m,style:{width:"100%",height:"100%",position:"relative",userSelect:"none",MozUserSelect:"none",msUserSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none"},...le,children:[i?K.jsx(iAn,{...h,foldPcbs:a,autoRotateDisabled:t.autoRotateDisabled||!I,onUserInteraction:ye,onCameraControllerReady:Qe,referenceObject:S}):d==="jscad"?K.jsx(_4i,{...h,autoRotateDisabled:t.autoRotateDisabled||!I,cameraType:w,onUserInteraction:ye,onCameraControllerReady:Qe,referenceObject:S}):K.jsx(iAn,{...h,autoRotateDisabled:t.autoRotateDisabled||!I,cameraType:w,onUserInteraction:ye,onCameraControllerReady:Qe,referenceObject:S}),oe&&K.jsx(C8i,{componentName:te?.componentName,onHideComponent:te?()=>{u(te.cad_component_id),he()}:void 0,onUnhideAllComponents:l.size>0?()=>{g(),he()}:void 0,onViewSchematicComponent:Y&&t.onViewSchematicComponent?()=>{t.onViewSchematicComponent?.(Y),he()}:void 0,menuRef:ne,menuPos:ie,engine:d,flexScene:i,foldPcbs:A,onFoldPcbsToggle:o?()=>{s(!A),B("Custom"),he()}:void 0,cameraPreset:E,autoRotate:I,referenceObject:S,onEngineSwitch:Te=>{p(Te),he()},onCameraPresetSelect:Pe,onAutoRotateToggle:()=>{Me(),he()},onReferenceObjectSelect:Te=>{Q(Re=>dEi(Re,Te)),C(!1),x(!0),B("Custom"),he()},onDownloadGltf:()=>{ve(),he()},onOpenKeyboardShortcuts:()=>{f(!0),he()}}),K.jsx(T8i,{open:_,onClose:()=>f(!1)})]},we)},V8i=t=>{const e=ee.useRef(null);return K.jsx(HVe.Provider,{value:e,children:K.jsx(X3i,{defaultTarget:G8i,initialCameraPosition:Y8i,initialCameraType:U8i(),children:K.jsx(fmi,{children:K.jsx(q3i,{children:K.jsx(F8i,{children:K.jsx(K8i,{...t})})})})})})},z8i=_0(lmi());_0(Ape()),_0(Brn()),_0(Ape()),(0,z8i.default)("tscircuit:3d-viewer:convert-circuit-json-to-3d-svg");const uln=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,gln=NB,gU=((t,e)=>n=>{var o;if(e?.variants==null)return gln(t,n?.class,n?.className);const{variants:i,defaultVariants:r}=e,s=Object.keys(i).map(c=>{const l=n?.[c],u=r?.[c];if(l===null)return null;const g=uln(l)||uln(u);return i[c][g]}),a=n&&Object.entries(n).reduce((c,l)=>{let[u,g]=l;return g===void 0||(c[u]=g),c},{}),A=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((c,l)=>{let{class:u,className:g,...h}=l;return Object.entries(h).every(d=>{let[p,m]=d;return Array.isArray(m)?m.includes({...r,...a}[p]):{...r,...a}[p]===m})?[...c,u,g]:c},[]);return gln(t,s,A,n?.class,n?.className)})("rf-inline-flex rf-items-center rf-justify-center rf-gap-2 rf-whitespace-nowrap rf-rounded-md rf-text-sm rf-font-medium rf-transition-colors focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-pointer-events-none disabled:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:focus-visible:rf-ring-zinc-300",{variants:{variant:{default:"rf-bg-zinc-900 rf-text-zinc-50 rf-shadow hover:rf-bg-zinc-900/90 dark:rf-bg-zinc-50 dark:rf-text-zinc-900 dark:hover:rf-bg-zinc-50/90",destructive:"rf-bg-red-500 rf-text-zinc-50 rf-shadow-sm hover:rf-bg-red-500/90 dark:rf-bg-red-900 dark:rf-text-zinc-50 dark:hover:rf-bg-red-900/90",outline:"rf-border rf-border-zinc-200 rf-bg-white rf-shadow-sm hover:rf-bg-zinc-100 hover:rf-text-zinc-900 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:hover:rf-bg-zinc-800 dark:hover:rf-text-zinc-50",secondary:"rf-bg-zinc-100 rf-text-zinc-900 rf-shadow-sm hover:rf-bg-zinc-100/80 dark:rf-bg-zinc-800 dark:rf-text-zinc-50 dark:hover:rf-bg-zinc-800/80",ghost:"hover:rf-bg-zinc-100 hover:rf-text-zinc-900 dark:hover:rf-bg-zinc-800 dark:hover:rf-text-zinc-50",link:"rf-text-zinc-900 rf-underline-offset-4 hover:rf-underline dark:rf-text-zinc-50"},size:{default:"rf-h-9 rf-px-4 rf-py-2",sm:"rf-h-8 rf-rounded-md rf-px-3 rf-text-xs",lg:"rf-h-10 rf-rounded-md rf-px-8",icon:"rf-h-9 rf-w-9"}},defaultVariants:{variant:"default",size:"default"}}),fA=ee.forwardRef(({className:t,variant:e,size:n,asChild:o=!1,...i},r)=>{const s=o?ZFo:"button";return K.jsx(s,{className:Oi(gU({variant:e,size:n,className:t})),ref:r,...i})});fA.displayName="Button";const J8i=({error:t,resetErrorBoundary:e})=>{const n=t instanceof Error?t:new Error(String(t));return K.jsx("div",{"data-testid":"error-container",className:"rf-error-container rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error Loading 3D Viewer"}),K.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-700",children:n.message}),K.jsx("details",{style:{whiteSpace:"pre-wrap"},className:"rf-text-xs rf-font-mono rf-text-red-600 rf-mt-2",children:n.stack}),e&&K.jsx("div",{className:"rf-mt-4",children:K.jsx(fA,{variant:"outline",size:"sm",onClick:e,className:"rf-text-red-700 rf-border-red-300 hover:rf-bg-red-100",children:"Retry"})})]})})},W8i=ee.createContext(null);function j8i({children:t,didCatch:e,error:n,resetErrorBoundary:o}){const i=ee.useMemo(()=>({didCatch:e,error:n,resetErrorBoundary:o}),[e,n,o]);return ee.createElement(W8i.Provider,{value:i},t)}const tWe={didCatch:!1,error:null};let bE=class extends ee.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=tWe}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{didCatch:n}=this.state;n&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(tWe))}componentDidCatch(e,n){this.props.onError?.(e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:i}=this.props;o&&n.didCatch&&$8i(e.resetKeys,i)&&(this.props.onReset?.({next:i,prev:e.resetKeys,reason:"keys"}),this.setState(tWe))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:i}=this.props,{didCatch:r,error:s}=this.state;let a=e;if(r){const A={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(A);else if(o)a=ee.createElement(o,A);else if("fallback"in this.props)a=i;else throw s}return ee.createElement(j8i,{didCatch:r,error:s,resetErrorBoundary:this.resetErrorBoundary},a)}};function $8i(t=[],e=[]){return t.length!==e.length||t.some((n,o)=>!Object.is(n,e[o]))}function q8i(t,e){if(t==null)return{};var n={},o=Object.keys(t),i,r;for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var X8i=["color"],nWe=ee.forwardRef(function(t,e){var n=t.color,o=n===void 0?"currentColor":n,i=q8i(t,X8i);return ee.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),ee.createElement("path",{d:"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});const Z8i=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ebi=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,o)=>o?o.toUpperCase():n.toLowerCase()),dln=t=>{const e=ebi(t);return e.charAt(0).toUpperCase()+e.slice(1)},hln=(...t)=>t.filter((e,n,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===n).join(" ").trim();var tbi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const nbi=ee.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:r,iconNode:s,...a},A)=>ee.createElement("svg",{ref:A,...tbi,width:e,height:e,stroke:t,strokeWidth:o?Number(n)*24/Number(e):n,className:hln("lucide",i),...a},[...s.map(([c,l])=>ee.createElement(c,l)),...Array.isArray(r)?r:[r]]));const ec=(t,e)=>{const n=ee.forwardRef(({className:o,...i},r)=>ee.createElement(nbi,{ref:r,iconNode:e,className:hln(`lucide-${Z8i(dln(t))}`,`lucide-${t}`,o),...i}));return n.displayName=dln(t),n};const obi=ec("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const ibi=ec("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const rbi=ec("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const Bme=ec("bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);const CS=ec("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const pZ=ec("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const bT=ec("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const sbi=ec("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const abi=ec("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);const oWe=ec("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Abi=ec("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const pln=ec("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const cbi=ec("circuit-board",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M11 9h4a2 2 0 0 0 2-2V3",key:"1ve2rv"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"M7 21v-4a2 2 0 0 1 2-2h4",key:"1fwkro"}],["circle",{cx:"15",cy:"15",r:"2",key:"3i40o0"}]]);const lbi=ec("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);const ubi=ec("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const gbi=ec("code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const mZ=ec("download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);const dbi=ec("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const hbi=ec("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const pbi=ec("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const mbi=ec("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const _bi=ec("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const fbi=ec("fullscreen",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]]);const Ibi=ec("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const mln=ec("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);const Cbi=ec("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);const SE=ec("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const ybi=ec("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const xbi=ec("message-circle-question",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Ebi=ec("minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);const Bbi=ec("package-open",[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]);const bbi=ec("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);const _ln=ec("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const fln=ec("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);const Sbi=ec("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const iWe=ec("search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Qbi=ec("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const vbi=ec("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const wbi=ec("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);const Pbi=ec("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);function Mbi(t){const e=String.fromCodePoint(...t);return btoa(e)}function Dbi(t){const e=RQe(TQe(t.trim()),{mtime:1739063707691});return Mbi(e)}function Nbi(t){return`#data:application/gzip;base64,${Dbi(t.trim())}`}function Rbi(t,e){return`https://tscircuit.com/editor?${Nbi(t)}`}var Tbi=Object.defineProperty,h1=(t,e)=>Tbi(t,"name",{value:e,configurable:!0}),rWe="dismissableLayer.update",kbi="dismissableLayer.pointerDownOutside",Fbi="dismissableLayer.focusOutside",Iln,Cln=ee.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),_Z=ee.forwardRef(h1(function(e,n){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:A,onDismiss:c,...l}=e,u=ee.useContext(Cln),[g,h]=ee.useState(null),d=g?.ownerDocument??globalThis?.document,[,p]=ee.useState({}),m=$A(n,h),_=Array.from(u.layers),[f]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),I=f?_.indexOf(f):-1,C=g?_.indexOf(g):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,x=C>=I,E=ee.useRef(!1),B=xln(M=>{s?.(M),A?.(M),M.defaultPrevented||c?.()},{ownerDocument:d,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:ee.useCallback(M=>{if(!(M instanceof Node))return!1;const k=[...u.branches].some(R=>R.contains(M));return x&&!k},[u.branches,x])}),S=Eln(M=>{if(i&&E.current)return;const k=M.target;[...u.branches].some(F=>F.contains(k))||(a?.(M),A?.(M),M.defaultPrevented||c?.())},d),Q=g?C===_.length-1:!1,w=lE(M=>{M.key==="Escape"&&(r?.(M),!M.defaultPrevented&&c&&(M.preventDefault(),c()))});return ee.useEffect(()=>{if(Q)return d.addEventListener("keydown",w,{capture:!0}),()=>d.removeEventListener("keydown",w,{capture:!0})},[d,Q,w]),ee.useEffect(()=>{if(g)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Iln=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(g)),u.layers.add(g),sWe(),()=>{o&&(u.layersWithOutsidePointerEventsDisabled.delete(g),u.layersWithOutsidePointerEventsDisabled.size===0&&(d.body.style.pointerEvents=Iln))}},[g,d,o,u]),ee.useEffect(()=>()=>{g&&(u.layers.delete(g),u.layersWithOutsidePointerEventsDisabled.delete(g),sWe())},[g,u]),ee.useEffect(()=>{const M=h1(()=>p({}),"handleUpdate");return document.addEventListener(rWe,M),()=>document.removeEventListener(rWe,M)},[]),K.jsx(Na.div,{...l,ref:m,style:{pointerEvents:y?x?"auto":"none":void 0,...e.style},onFocusCapture:ar(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ar(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ar(e.onPointerDownCapture,B.onPointerDownCapture)})},"DismissableLayer"));function yln(){const t=ee.useContext(Cln),[e,n]=ee.useState(null);return ee.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}h1(yln,"useDismissableLayerSurface");var Lbi=h1(()=>!0,"IS_TRUE");function xln(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:r,shouldHandlePointerDownOutside:s=Lbi}=e,a=lE(t),A=ee.useRef(!1),c=ee.useRef(!1),l=ee.useRef(new Map),u=ee.useRef(()=>{});return ee.useEffect(()=>{function g(){c.current=!1,i.current=!1,l.current.clear()}h1(g,"resetOutsideInteraction");function h(){return Array.from(l.current.values()).some(Boolean)}h1(h,"isOutsideInteractionIntercepted");function d(I){if(!c.current)return;const C=I.target;C instanceof Node&&[...r].some(x=>x.contains(C))||l.current.set(I.type,!0),I.type==="click"&&window.setTimeout(()=>{c.current&&u.current()},0)}h1(d,"handleInteractionCapture");function p(I){c.current&&l.current.set(I.type,!1)}h1(p,"handleInteractionBubble");const m=h1(I=>{if(I.target&&!A.current){let C=function(){n.removeEventListener("click",u.current);const x=h();g(),x||aWe(kbi,a,y,{discrete:!0})};if(h1(C,"handleAndDispatchPointerDownOutsideEvent"),!s(I.target)){n.removeEventListener("click",u.current),g(),A.current=!1;return}const y={originalEvent:I};c.current=!0,i.current=o&&I.button===0,l.current.clear(),!o||I.button!==0?C():(n.removeEventListener("click",u.current),u.current=C,n.addEventListener("click",u.current,{once:!0}))}else n.removeEventListener("click",u.current),g();A.current=!1},"handlePointerDown"),_=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const I of _)n.addEventListener(I,d,!0),n.addEventListener(I,p);const f=window.setTimeout(()=>{n.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(f),n.removeEventListener("pointerdown",m),n.removeEventListener("click",u.current);for(const I of _)n.removeEventListener(I,d,!0),n.removeEventListener(I,p)}},[n,a,o,i,r,s]),{onPointerDownCapture:h1(()=>A.current=!0,"onPointerDownCapture")}}h1(xln,"usePointerDownOutside");function Eln(t,e=globalThis?.document){const n=lE(t),o=ee.useRef(!1);return ee.useEffect(()=>{const i=h1(r=>{r.target&&!o.current&&aWe(Fbi,n,{originalEvent:r},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:h1(()=>o.current=!0,"onFocusCapture"),onBlurCapture:h1(()=>o.current=!1,"onBlurCapture")}}h1(Eln,"useFocusOutside");function sWe(){const t=new CustomEvent(rWe);document.dispatchEvent(t)}h1(sWe,"dispatchUpdate");function aWe(t,e,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),o?hDe(i,r):i.dispatchEvent(r)}h1(aWe,"handleAndDispatchCustomEvent");var Hbi=Object.defineProperty,AWe=(t,e)=>Hbi(t,"name",{value:e,configurable:!0}),bme=0,dU=null;function Obi(t){return hU(),t.children}AWe(Obi,"FocusGuards");function hU(){ee.useEffect(()=>{dU||(dU={start:cWe(),end:cWe()});const{start:t,end:e}=dU;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),bme++,()=>{bme===1&&(dU?.start.remove(),dU?.end.remove(),dU=null),bme=Math.max(0,bme-1)}},[])}AWe(hU,"useFocusGuards");function cWe(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}AWe(cWe,"createFocusGuard");var Gbi=Object.defineProperty,l2=(t,e)=>Gbi(t,"name",{value:e,configurable:!0}),lWe="focusScope.autoFocusOnMount",uWe="focusScope.autoFocusOnUnmount",Bln={bubbles:!1,cancelable:!0},Sme=ee.forwardRef(l2(function(e,n){const{loop:o=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[A,c]=ee.useState(null),l=lE(r),u=lE(s),g=ee.useRef(null),h=$A(n,c),d=ee.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ee.useEffect(()=>{if(i){let m=function(C){if(d.paused||!A)return;const y=C.target;A.contains(y)?g.current=y:yS(g.current,{select:!0})},_=function(C){if(d.paused||!A)return;const y=C.relatedTarget;y!==null&&(A.contains(y)||yS(g.current,{select:!0}))},f=function(C){if(document.activeElement===document.body)for(const x of C)x.removedNodes.length>0&&yS(A)};l2(m,"handleFocusIn"),l2(_,"handleFocusOut"),l2(f,"handleMutations"),document.addEventListener("focusin",m),document.addEventListener("focusout",_);const I=new MutationObserver(f);return A&&I.observe(A,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",_),I.disconnect()}}},[i,A,d.paused]),ee.useEffect(()=>{if(A){wln.add(d);const m=document.activeElement;if(!A.contains(m)){const f=new CustomEvent(lWe,Bln);A.addEventListener(lWe,l),A.dispatchEvent(f),f.defaultPrevented||(bln(Mln(gWe(A)),{select:!0}),document.activeElement===m&&yS(A))}return()=>{A.removeEventListener(lWe,l),setTimeout(()=>{const f=new CustomEvent(uWe,Bln);A.addEventListener(uWe,u),A.dispatchEvent(f),f.defaultPrevented||yS(m??document.body,{select:!0}),A.removeEventListener(uWe,u),wln.remove(d)},0)}}},[A,l,u,d]);const p=ee.useCallback(m=>{if(!o&&!i||d.paused)return;const _=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,f=document.activeElement;if(_&&f){const I=m.currentTarget,[C,y]=Sln(I);C&&y?!m.shiftKey&&f===y?(m.preventDefault(),o&&yS(C,{select:!0})):m.shiftKey&&f===C&&(m.preventDefault(),o&&yS(y,{select:!0})):f===I&&m.preventDefault()}},[o,i,d.paused]);return K.jsx(Na.div,{tabIndex:-1,...a,ref:h,onKeyDown:p})},"FocusScope"));function bln(t,{select:e=!1}={}){const n=document.activeElement;for(const o of t)if(yS(o,{select:e}),document.activeElement!==n)return}l2(bln,"focusFirst");function Sln(t){const e=gWe(t),n=dWe(e,t),o=dWe(e.reverse(),t);return[n,o]}l2(Sln,"getTabbableEdges");function gWe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:l2(o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}l2(gWe,"getTabbableCandidates");function dWe(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):Qln(o,{upTo:e})))return o}l2(dWe,"findVisible");function Qln(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}l2(Qln,"isHidden");function vln(t){return t instanceof HTMLInputElement&&"select"in t}l2(vln,"isSelectableInput");function yS(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&vln(t)&&e&&t.select()}}l2(yS,"focus");var wln=Pln();function Pln(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=hWe(t,e),t.unshift(e)},remove(e){t=hWe(t,e),t[0]?.resume()}}}l2(Pln,"createFocusScopesStack");function hWe(t,e){const n=[...t],o=n.indexOf(e);return o!==-1&&n.splice(o,1),n}l2(hWe,"arrayRemove");function Mln(t){return t.filter(e=>e.tagName!=="A")}l2(Mln,"removeLinks");const Ybi=["top","right","bottom","left"],SP=Math.min,xS=Math.max,Qme=Math.round,vme=Math.floor,ES=t=>({x:t,y:t}),Ubi={left:"right",right:"left",bottom:"top",top:"bottom"};function Dln(t,e,n){return xS(t,SP(e,n))}function BS(t,e){return typeof t=="function"?t(e):t}function QP(t){return t.split("-")[0]}function pU(t){return t.split("-")[1]}function pWe(t){return t==="x"?"y":"x"}function mWe(t){return t==="y"?"height":"width"}function G6(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function _We(t){return pWe(G6(t))}function Kbi(t,e,n){n===void 0&&(n=!1);const o=pU(t),i=_We(t),r=mWe(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=wme(s)),[s,wme(s)]}function Vbi(t){const e=wme(t);return[fWe(t),e,fWe(e)]}function fWe(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Nln=["left","right"],Rln=["right","left"],zbi=["top","bottom"],Jbi=["bottom","top"];function Wbi(t,e,n){switch(t){case"top":case"bottom":return n?e?Rln:Nln:e?Nln:Rln;case"left":case"right":return e?zbi:Jbi;default:return[]}}function jbi(t,e,n,o){const i=pU(t);let r=Wbi(QP(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(fWe)))),r}function wme(t){const e=QP(t);return Ubi[e]+t.slice(e.length)}function $bi(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Tln(t){return typeof t!="number"?$bi(t):{top:t,right:t,bottom:t,left:t}}function Pme(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function kln(t,e,n){let{reference:o,floating:i}=t;const r=G6(e),s=_We(e),a=mWe(s),A=QP(e),c=r==="y",l=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,g=o[a]/2-i[a]/2;let h;switch(A){case"top":h={x:l,y:o.y-i.height};break;case"bottom":h={x:l,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}const d=pU(e);return d&&(h[s]+=g*(d==="end"?1:-1)*(n&&c?-1:1)),h}async function qbi(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:A}=t,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:u="floating",altBoundary:g=!1,padding:h=0}=BS(e,t),d=Tln(h),m=a[g?u==="floating"?"reference":"floating":u],_=Pme(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:A})),f=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,I=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),C=await(r.isElement==null?void 0:r.isElement(I))&&await(r.getScale==null?void 0:r.getScale(I))||{x:1,y:1},y=Pme(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:I,strategy:A}):f);return{top:(_.top-y.top+d.top)/C.y,bottom:(y.bottom-_.bottom+d.bottom)/C.y,left:(_.left-y.left+d.left)/C.x,right:(y.right-_.right+d.right)/C.x}}const Xbi=50,Zbi=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:qbi},A=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:l,y:u}=kln(c,o,A),g=o,h=0;const d={};for(let p=0;p<r.length;p++){const m=r[p];if(!m)continue;const{name:_,fn:f}=m,{x:I,y:C,data:y,reset:x}=await f({x:l,y:u,initialPlacement:o,placement:g,strategy:i,middlewareData:d,rects:c,platform:a,elements:{reference:t,floating:e}});l=I??l,u=C??u,d[_]={...d[_],...y},x&&h<Xbi&&(h++,typeof x=="object"&&(x.placement&&(g=x.placement),x.rects&&(c=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:l,y:u}=kln(c,g,A)),p=-1)}return{x:l,y:u,placement:g,strategy:i,middlewareData:d}},eSi=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:A}=e,{element:c,padding:l=0}=BS(t,e)||{};if(c==null)return{};const u=Tln(l),g={x:n,y:o},h=_We(i),d=mWe(h),p=await s.getDimensions(c),m=h==="y",_=m?"top":"left",f=m?"bottom":"right",I=m?"clientHeight":"clientWidth",C=r.reference[d]+r.reference[h]-g[h]-r.floating[d],y=g[h]-r.reference[h],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=x?x[I]:0;(!E||!await(s.isElement==null?void 0:s.isElement(x)))&&(E=a.floating[I]||r.floating[d]);const B=C/2-y/2,S=E/2-p[d]/2-1,Q=SP(u[_],S),w=SP(u[f],S),M=E-p[d]-w,k=E/2-p[d]/2+B,R=Dln(Q,k,M),F=!A.arrow&&pU(i)!=null&&k!==R&&r.reference[d]/2-(k<Q?Q:w)-p[d]/2<0,O=F?k<Q?k-Q:k-M:0;return{[h]:g[h]+O,data:{[h]:R,centerOffset:k-R-O,...F&&{alignmentOffset:O}},reset:F}}}),tSi=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:A,elements:c}=e,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0,...m}=BS(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const _=QP(i),f=G6(a),I=QP(a)===a,C=await(A.isRTL==null?void 0:A.isRTL(c.floating)),y=g||(I||!p?[wme(a)]:Vbi(a)),x=d!=="none";!g&&x&&y.push(...jbi(a,p,d,C));const E=[a,...y],B=await A.detectOverflow(e,m),S=[];let Q=((o=r.flip)==null?void 0:o.overflows)||[];if(l&&S.push(B[_]),u){const R=Kbi(i,s,C);S.push(B[R[0]],B[R[1]])}if(Q=[...Q,{placement:i,overflows:S}],!S.every(R=>R<=0)){var w,M;const R=(((w=r.flip)==null?void 0:w.index)||0)+1,F=E[R];if(F&&(!(u==="alignment"?f!==G6(F):!1)||Q.every(Y=>G6(Y.placement)===f?Y.overflows[0]>0:!0)))return{data:{index:R,overflows:Q},reset:{placement:F}};let O=(M=Q.filter(U=>U.overflows[0]<=0).sort((U,Y)=>U.overflows[1]-Y.overflows[1])[0])==null?void 0:M.placement;if(!O)switch(h){case"bestFit":{var k;const U=(k=Q.filter(Y=>{if(x){const W=G6(Y.placement);return W===f||W==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(W=>W>0).reduce((W,te)=>W+te,0)]).sort((Y,W)=>Y[1]-W[1])[0])==null?void 0:k[0];U&&(O=U);break}case"initialPlacement":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function Fln(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lln(t){return Ybi.some(e=>t[e]>=0)}const nSi=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i="referenceHidden",...r}=BS(t,e);switch(i){case"referenceHidden":{const s=await o.detectOverflow(e,{...r,elementContext:"reference"}),a=Fln(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Lln(a)}}}case"escaped":{const s=await o.detectOverflow(e,{...r,altBoundary:!0}),a=Fln(s,n.floating);return{data:{escapedOffsets:a,escaped:Lln(a)}}}default:return{}}}}},Hln=new Set(["left","top"]);async function oSi(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=QP(n),a=pU(n),A=G6(n)==="y",c=Hln.has(s)?-1:1,l=r&&A?-1:1,u=BS(e,t);let{mainAxis:g,crossAxis:h,alignmentAxis:d}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof d=="number"&&(h=a==="end"?d*-1:d),A?{x:h*l,y:g*c}:{x:g*c,y:h*l}}const iSi=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=e,A=await oSi(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+A.x,y:r+A.y,data:{...A,placement:s}}}}},rSi=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:A={fn:f=>{let{x:I,y:C}=f;return{x:I,y:C}}},...c}=BS(t,e),l={x:n,y:o},u=await r.detectOverflow(e,c),g=G6(i),h=pWe(g);let d=l[h],p=l[g];const m=(f,I)=>Dln(I+u[f==="y"?"top":"left"],I,I-u[f==="y"?"bottom":"right"]);s&&(d=m(h,d)),a&&(p=m(g,p));const _=A.fn({...e,[h]:d,[g]:p});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[h]:s,[g]:a}}}}}},sSi=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:i,y:r,placement:s,rects:a,middlewareData:A}=e,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=BS(t,e),g={x:i,y:r},h=G6(s),d=pWe(h);let p=g[d],m=g[h];const _=BS(c,e),f=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(o=_.crossAxis)!=null?o:0};if(l){const y=d==="y"?"height":"width",x=a.reference[d]-a.floating[y]+f.mainAxis,E=a.reference[d]+a.reference[y]-f.mainAxis;p<x?p=x:p>E&&(p=E)}if(u){var I,C;const y=d==="y"?"width":"height",x=Hln.has(QP(s)),E=a.reference[h]-a.floating[y]+(x&&((I=A.offset)==null?void 0:I[h])||0)+(x?0:f.crossAxis),B=a.reference[h]+a.reference[y]+(x?0:((C=A.offset)==null?void 0:C[h])||0)-(x?f.crossAxis:0);m<E?m=E:m>B&&(m=B)}return{[d]:p,[h]:m}}}},aSi=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:r}=e,{apply:s=()=>{},...a}=BS(t,e),A=await i.detectOverflow(e,a),c=QP(n),l=pU(n),u=G6(n)==="y",{width:g,height:h}=o.floating;let d,p;c==="top"||c==="bottom"?(d=c,p=l===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(p=c,d=l==="end"?"top":"bottom");const m=h-A.top-A.bottom,_=g-A.left-A.right,f=SP(h-A[d],m),I=SP(g-A[p],_),C=e.middlewareData.shift,y=!C;let x=f,E=I;C!=null&&C.enabled.x&&(E=_),C!=null&&C.enabled.y&&(x=m),y&&!l&&(u?E=g-2*xS(A.left,A.right):x=h-2*xS(A.top,A.bottom)),await s({...e,availableWidth:E,availableHeight:x});const B=await i.getDimensions(r.floating);return g!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function Mme(){return typeof window<"u"}function mU(t){return Oln(t)?(t.nodeName||"").toLowerCase():"#document"}function $x(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function bS(t){var e;return(e=(Oln(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Oln(t){return Mme()?t instanceof Node||t instanceof $x(t).Node:!1}function Y6(t){return Mme()?t instanceof Element||t instanceof $x(t).Element:!1}function vP(t){return Mme()?t instanceof HTMLElement||t instanceof $x(t).HTMLElement:!1}function Gln(t){return!Mme()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof $x(t).ShadowRoot}function Dme(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U6(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function ASi(t){return/^(table|td|th)$/.test(mU(t))}function Nme(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const cSi=/transform|translate|scale|rotate|perspective|filter/,lSi=/paint|layout|strict|content/,ST=t=>!!t&&t!=="none";let IWe;function CWe(t){const e=Y6(t)?U6(t):t;return ST(e.transform)||ST(e.translate)||ST(e.scale)||ST(e.rotate)||ST(e.perspective)||!yWe()&&(ST(e.backdropFilter)||ST(e.filter))||cSi.test(e.willChange||"")||lSi.test(e.contain||"")}function uSi(t){let e=QT(t);for(;vP(e)&&!fZ(e);){if(CWe(e))return e;if(Nme(e))return null;e=QT(e)}return null}function yWe(){return IWe==null&&(IWe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),IWe}function fZ(t){return/^(html|body|#document)$/.test(mU(t))}function U6(t){return $x(t).getComputedStyle(t)}function Rme(t){return Y6(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function QT(t){if(mU(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Gln(t)&&t.host||bS(t);return Gln(e)?e.host:e}function Yln(t){const e=QT(t);return fZ(e)?(t.ownerDocument||t).body:vP(e)&&Dme(e)?e:Yln(e)}function IZ(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Yln(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=$x(i);if(r){const a=xWe(s);return e.concat(s,s.visualViewport||[],Dme(i)?i:[],a&&n?IZ(a):[])}else return e.concat(i,IZ(i,[],n))}function xWe(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Uln(t){const e=U6(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=vP(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,a=Qme(n)!==r||Qme(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function EWe(t){return Y6(t)?t:t.contextElement}function _U(t){const e=EWe(t);if(!vP(e))return ES(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Uln(e);let s=(r?Qme(n.width):n.width)/o,a=(r?Qme(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const gSi=ES(0);function Kln(t){const e=$x(t);return!yWe()||!e.visualViewport?gSi:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function dSi(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===$x(t)}function vT(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=EWe(t);let s=ES(1);e&&(o?Y6(o)&&(s=_U(o)):s=_U(t));const a=dSi(r,n,o)?Kln(r):ES(0);let A=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,l=i.width/s.x,u=i.height/s.y;if(r&&o){const g=$x(r),h=Y6(o)?$x(o):o;let d=g,p=xWe(d);for(;p&&h!==d;){const m=_U(p),_=p.getBoundingClientRect(),f=U6(p),I=_.left+(p.clientLeft+parseFloat(f.paddingLeft))*m.x,C=_.top+(p.clientTop+parseFloat(f.paddingTop))*m.y;A*=m.x,c*=m.y,l*=m.x,u*=m.y,A+=I,c+=C,d=$x(p),p=xWe(d)}}return Pme({width:l,height:u,x:A,y:c})}function Tme(t,e){const n=Rme(t).scrollLeft;return e?e.left+n:vT(bS(t)).left+n}function Vln(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Tme(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function hSi(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=bS(o),a=e?Nme(e.floating):!1;if(o===s||a&&r)return n;let A={scrollLeft:0,scrollTop:0},c=ES(1);const l=ES(0),u=vP(o);if((u||!r)&&((mU(o)!=="body"||Dme(s))&&(A=Rme(o)),u)){const h=vT(o);c=_U(o),l.x=h.x+o.clientLeft,l.y=h.y+o.clientTop}const g=s&&!u&&!r?Vln(s,A):ES(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-A.scrollLeft*c.x+l.x+g.x,y:n.y*c.y-A.scrollTop*c.y+l.y+g.y}}function pSi(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function mSi(t){const e=Rme(t),n=t.ownerDocument.body,o=xS(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=xS(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+Tme(t);const s=-e.scrollTop;return U6(n).direction==="rtl"&&(r+=xS(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:r,y:s}}const _Si=25;function fSi(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=$x(t),r=bS(t),s=i.visualViewport;let a=r.clientWidth,A=r.clientHeight,c=0,l=0;if(s){const g=!yWe()||e==="fixed";o?g||(c=-s.offsetLeft,l=-s.offsetTop):(a=s.width,A=s.height,g&&(c=s.offsetLeft,l=s.offsetTop))}if(Tme(r)<=0){const g=r.ownerDocument,h=g.body,d=getComputedStyle(h),p=g.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-h.clientWidth-p),_=getComputedStyle(r).scrollbarGutter==="stable both-edges"?m/2:m;_<=_Si&&(a-=_)}return{width:a,height:A,x:c,y:l}}function ISi(t,e){const n=vT(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=_U(t),s=t.clientWidth*r.x,a=t.clientHeight*r.y,A=i*r.x,c=o*r.y;return{width:s,height:a,x:A,y:c}}function zln(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=fSi(t,n,e);else if(e==="document")o=mSi(bS(t));else if(Y6(e))o=ISi(e,n);else{const i=Kln(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Pme(o)}function CSi(t,e){const n=e.get(t);if(n)return n;let o=IZ(t,[],!1).filter(a=>Y6(a)&&mU(a)!=="body"),i=null;const r=U6(t).position==="fixed";let s=r?QT(t):t;for(;Y6(s)&&!fZ(s);){const a=U6(s),A=CWe(s),c=i?i.position:r?"fixed":"";!A&&(c==="fixed"||c==="absolute"&&a.position==="static")?o=o.filter(u=>u!==s):i=a,s=QT(s)}return e.set(t,o),o}function ySi(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?Nme(e)?[]:CSi(e,this._c):[].concat(n),o],a=zln(e,s[0],i);let A=a.top,c=a.right,l=a.bottom,u=a.left;for(let g=1;g<s.length;g++){const h=zln(e,s[g],i);A=xS(h.top,A),c=SP(h.right,c),l=SP(h.bottom,l),u=xS(h.left,u)}return{width:c-u,height:l-A,x:u,y:A}}function xSi(t){const{width:e,height:n}=Uln(t);return{width:e,height:n}}function ESi(t,e,n){const o=vP(e),i=bS(e),r=n==="fixed",s=vT(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const A=ES(0);if((o||!r)&&((mU(e)!=="body"||Dme(i))&&(a=Rme(e)),o)){const g=vT(e,!0,r,e);A.x=g.x+e.clientLeft,A.y=g.y+e.clientTop}!o&&i&&(A.x=Tme(i));const c=i&&!o&&!r?Vln(i,a):ES(0),l=s.left+a.scrollLeft-A.x-c.x,u=s.top+a.scrollTop-A.y-c.y;return{x:l,y:u,width:s.width,height:s.height}}function BWe(t){return U6(t).position==="static"}function Jln(t,e){if(!vP(t)||U6(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return bS(t)===n&&(n=n.ownerDocument.body),n}function Wln(t,e){const n=$x(t);if(Nme(t))return n;if(!vP(t)){let i=QT(t);for(;i&&!fZ(i);){if(Y6(i)&&!BWe(i))return i;i=QT(i)}return n}let o=Jln(t,e);for(;o&&ASi(o)&&BWe(o);)o=Jln(o,e);return o&&fZ(o)&&BWe(o)&&!CWe(o)?n:o||uSi(t)||n}const BSi=async function(t){const e=this.getOffsetParent||Wln,n=this.getDimensions,o=await n(t.floating);return{reference:ESi(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bSi(t){return U6(t).direction==="rtl"}const SSi={convertOffsetParentRelativeRectToViewportRelativeRect:hSi,getDocumentElement:bS,getClippingRect:ySi,getOffsetParent:Wln,getElementRects:BSi,getClientRects:pSi,getDimensions:xSi,getScale:_U,isElement:Y6,isRTL:bSi};function jln(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function QSi(t,e,n){let o=null,i;const r=bS(t);function s(){var l;clearTimeout(i),(l=o)==null||l.disconnect(),o=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const g=t.getBoundingClientRect(),{left:h,top:d,width:p,height:m}=g;if(l||e(),!p||!m)return;const _=vme(d),f=vme(r.clientWidth-(h+p)),I=vme(r.clientHeight-(d+m)),C=vme(h),x={rootMargin:-_+"px "+-f+"px "+-I+"px "+-C+"px",threshold:xS(0,SP(1,u))||1};let E=!0;function B(S){const Q=S[0].intersectionRatio;if(!jln(g,t.getBoundingClientRect()))return a();if(Q!==u){if(!E)return a();Q?a(!1,Q):i=setTimeout(()=>{a(!1,1e-7)},1e3)}E=!1}try{o=new IntersectionObserver(B,{...x,root:r.ownerDocument})}catch{o=new IntersectionObserver(B,x)}o.observe(t)}const A=$x(t),c=()=>a(n);return A.addEventListener("resize",c),a(!0),()=>{A.removeEventListener("resize",c),s()}}function vSi(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:A=!1}=o,c=EWe(t),l=i||r?[...c?IZ(c):[],...e?IZ(e):[]]:[];l.forEach(_=>{i&&_.addEventListener("scroll",n),r&&_.addEventListener("resize",n)});const u=c&&a?QSi(c,n,r):null;let g=-1,h=null;s&&(h=new ResizeObserver(_=>{let[f]=_;f&&f.target===c&&h&&e&&(h.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var I;(I=h)==null||I.observe(e)})),n()}),c&&!A&&h.observe(c),e&&h.observe(e));let d,p=A?vT(t):null;A&&m();function m(){const _=vT(t);p&&!jln(p,_)&&n(),p=_,d=requestAnimationFrame(m)}return n(),()=>{var _;l.forEach(f=>{i&&f.removeEventListener("scroll",n),r&&f.removeEventListener("resize",n)}),u?.(),(_=h)==null||_.disconnect(),h=null,A&&cancelAnimationFrame(d)}}const wSi=iSi,PSi=rSi,MSi=tSi,DSi=aSi,NSi=nSi,$ln=eSi,RSi=sSi,TSi=(t,e,n)=>{const o=new Map,i=n??{},r={...SSi,...i.platform,_c:o};return Zbi(t,e,{...i,platform:r})};var kSi=typeof document<"u",FSi=function(){},kme=kSi?ee.useLayoutEffect:FSi;function Fme(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Fme(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!Fme(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function qln(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xln(t,e){const n=qln(t);return Math.round(e*n)/n}function bWe(t){const e=ee.useRef(t);return kme(()=>{e.current=t}),e}function LSi(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:A,open:c}=t,[l,u]=ee.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,h]=ee.useState(o);Fme(g,o)||h(o);const[d,p]=ee.useState(null),[m,_]=ee.useState(null),f=ee.useCallback(Y=>{Y!==x.current&&(x.current=Y,p(Y))},[]),I=ee.useCallback(Y=>{Y!==E.current&&(E.current=Y,_(Y))},[]),C=r||d,y=s||m,x=ee.useRef(null),E=ee.useRef(null),B=ee.useRef(l),S=A!=null,Q=bWe(A),w=bWe(i),M=bWe(c),k=ee.useCallback(()=>{if(!x.current||!E.current)return;const Y={placement:e,strategy:n,middleware:g};w.current&&(Y.platform=w.current),TSi(x.current,E.current,Y).then(W=>{const te={...W,isPositioned:M.current!==!1};R.current&&!Fme(B.current,te)&&(B.current=te,c6.flushSync(()=>{u(te)}))})},[g,e,n,w,M]);kme(()=>{c===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,u(Y=>({...Y,isPositioned:!1})))},[c]);const R=ee.useRef(!1);kme(()=>(R.current=!0,()=>{R.current=!1}),[]),kme(()=>{if(C&&(x.current=C),y&&(E.current=y),C&&y){if(Q.current)return Q.current(C,y,k);k()}},[C,y,k,Q,S]);const F=ee.useMemo(()=>({reference:x,floating:E,setReference:f,setFloating:I}),[f,I]),O=ee.useMemo(()=>({reference:C,floating:y}),[C,y]),U=ee.useMemo(()=>{const Y={position:n,left:0,top:0};if(!O.floating)return Y;const W=Xln(O.floating,l.x),te=Xln(O.floating,l.y);return a?{...Y,transform:"translate("+W+"px, "+te+"px)",...qln(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:te}},[n,a,O.floating,l.x,l.y]);return ee.useMemo(()=>({...l,update:k,refs:F,elements:O,floatingStyles:U}),[l,k,F,O,U])}const HSi=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?$ln({element:o.current,padding:i}).fn(n):{}:o?$ln({element:o,padding:i}).fn(n):{}}}},OSi=(t,e)=>{const n=wSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},GSi=(t,e)=>{const n=PSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},YSi=(t,e)=>({fn:RSi(t).fn,options:[t,e]}),USi=(t,e)=>{const n=MSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},KSi=(t,e)=>{const n=DSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},VSi=(t,e)=>{const n=NSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},zSi=(t,e)=>{const n=HSi(t);return{name:n.name,fn:n.fn,options:[t,e]}};var JSi=Object.defineProperty,WSi=(t,e)=>JSi(t,"name",{value:e,configurable:!0});function SWe(t){const[e,n]=ee.useState(void 0);return Ep(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if("borderBoxSize"in r){const A=r.borderBoxSize,c=Array.isArray(A)?A[0]:A;s=c.inlineSize,a=c.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}WSi(SWe,"useSize");var jSi=Object.defineProperty,wP=(t,e)=>jSi(t,"name",{value:e,configurable:!0}),Zln="Popper",[e0n,PP]=Nx(Zln),[$Si,t0n]=e0n(Zln),qSi=wP(t=>{const{__scopePopper:e,children:n}=t,[o,i]=ee.useState(null),[r,s]=ee.useState(void 0);return K.jsx($Si,{scope:e,anchor:o,onAnchorChange:i,placementState:r,setPlacementState:s,children:n})},"Popper"),XSi="PopperAnchor",ZSi=ee.forwardRef(wP(function(e,n){const{__scopePopper:o,virtualRef:i,...r}=e,s=t0n(XSi,o),a=ee.useRef(null),A=s.onAnchorChange,c=ee.useCallback(p=>{a.current=p,p&&A(p)},[A]),l=$A(n,c),u=ee.useRef(null);ee.useEffect(()=>{if(!i)return;const p=u.current;u.current=i.current,p!==u.current&&A(u.current)});const g=s.placementState&&Lme(s.placementState),h=g?.[0],d=g?.[1];return i?null:K.jsx(Na.div,{"data-radix-popper-side":h,"data-radix-popper-align":d,...r,ref:l})},"PopperAnchor")),n0n="PopperContent",[eQi,bmr]=e0n(n0n),tQi=ee.forwardRef(wP(function(e,n){const{__scopePopper:o,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:A=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:g="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...m}=e,_=t0n(n0n,o),[f,I]=ee.useState(null),C=$A(n,I),[y,x]=ee.useState(null),E=SWe(y),B=E?.width??0,S=E?.height??0,Q=i+(s!=="center"?"-"+s:""),w=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(l)?l:[l],k=M.length>0,R={padding:w,boundary:M.filter(o0n),altBoundary:k},{refs:F,floatingStyles:O,placement:U,isPositioned:Y,middlewareData:W}=LSi({strategy:"fixed",placement:Q,whileElementsMounted:wP((...ue)=>vSi(...ue,{animationFrame:d==="always"}),"whileElementsMounted"),elements:{reference:_.anchor},middleware:[OSi({mainAxis:r+S,alignmentAxis:a}),c&&GSi({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?YSi():void 0,...R}),c&&USi({...R}),KSi({...R,apply:wP(({elements:ue,rects:fe,availableWidth:pe,availableHeight:ye})=>{const{width:Me,height:ve}=fe.reference,he=ue.floating.style;he.setProperty("--radix-popper-available-width",`${pe}px`),he.setProperty("--radix-popper-available-height",`${ye}px`),he.setProperty("--radix-popper-anchor-width",`${Me}px`),he.setProperty("--radix-popper-anchor-height",`${ve}px`)},"apply")}),y&&zSi({element:y,padding:A}),nQi({arrowWidth:B,arrowHeight:S}),h&&VSi({strategy:"referenceHidden",...R,boundary:k?R.boundary:void 0})]}),te=_.setPlacementState;Ep(()=>(te(U),()=>{te(void 0)}),[U,te]);const[j,J]=Lme(U),oe=lE(p);Ep(()=>{Y&&oe?.()},[Y,oe]);const ie=W.arrow?.x,ne=W.arrow?.y,le=W.arrow?.centerOffset!==0,[ge,_e]=ee.useState();return Ep(()=>{f&&_e(window.getComputedStyle(f).zIndex)},[f]),K.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:Y?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:K.jsx(eQi,{scope:o,placedSide:j,placedAlign:J,onArrowChange:x,arrowX:ie,arrowY:ne,shouldHideArrow:le,children:K.jsx(Na.div,{"data-side":j,"data-align":J,...m,ref:C,style:{...m.style,animation:Y?m.style?.animation:"none"}})})})},"PopperContent"));function o0n(t){return t!==null}wP(o0n,"isNotNull");var nQi=wP(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,a=s?0:t.arrowWidth,A=s?0:t.arrowHeight,[c,l]=Lme(n),u={start:"0%",center:"50%",end:"100%"}[l],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+A/2;let d="",p="";return c==="bottom"?(d=s?u:`${g}px`,p=`${-A}px`):c==="top"?(d=s?u:`${g}px`,p=`${o.floating.height+A}px`):c==="right"?(d=`${-A}px`,p=s?u:`${h}px`):c==="left"&&(d=`${o.floating.width+A}px`,p=s?u:`${h}px`),{data:{x:d,y:p}}}}),"transformOrigin");function Lme(t){const[e,n="center"]=t.split("-");return[e,n]}wP(Lme,"getSideAndAlignFromPlacement");var CZ=qSi,Hme=ZSi,Ome=tQi,oQi=Object.defineProperty,iQi=(t,e)=>oQi(t,"name",{value:e,configurable:!0}),Gme=ee.forwardRef(iQi(function(e,n){const{container:o,...i}=e,[r,s]=ee.useState(!1);Ep(()=>s(!0),[]);const a=o||r&&globalThis?.document?.body;return a?c6.createPortal(K.jsx(Na.div,{...i,ref:n}),a):null},"Portal")),rQi=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},fU=new WeakMap,Yme=new WeakMap,Ume={},QWe=0,i0n=function(t){return t&&(t.host||i0n(t.parentNode))},sQi=function(t,e){return e.map(function(n){if(t.contains(n))return n;var o=i0n(n);return o&&t.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},aQi=function(t,e,n,o){var i=sQi(e,Array.isArray(t)?t:[t]);Ume[n]||(Ume[n]=new WeakMap);var r=Ume[n],s=[],a=new Set,A=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var l=function(u){!u||A.has(u)||Array.prototype.forEach.call(u.children,function(g){if(a.has(g))l(g);else try{var h=g.getAttribute(o),d=h!==null&&h!=="false",p=(fU.get(g)||0)+1,m=(r.get(g)||0)+1;fU.set(g,p),r.set(g,m),s.push(g),p===1&&d&&Yme.set(g,!0),m===1&&g.setAttribute(n,"true"),d||g.setAttribute(o,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return l(e),a.clear(),QWe++,function(){s.forEach(function(u){var g=fU.get(u)-1,h=r.get(u)-1;fU.set(u,g),r.set(u,h),g||(Yme.has(u)||u.removeAttribute(o),Yme.delete(u)),h||u.removeAttribute(n)}),QWe--,QWe||(fU=new WeakMap,fU=new WeakMap,Yme=new WeakMap,Ume={})}},Kme=function(t,e,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),i=rQi(t);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),aQi(o,i,n,"aria-hidden")):function(){return null}},K6=function(){return K6=Object.assign||function(e){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K6.apply(this,arguments)};function r0n(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]]);return n}function AQi(t,e,n){if(n||arguments.length===2)for(var o=0,i=e.length,r;o<i;o++)(r||!(o in e))&&(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Vme="right-scroll-bar-position",zme="width-before-scroll-bar",cQi="with-scroll-bars-hidden",lQi="--removed-body-scroll-bar-size";function vWe(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function uQi(t,e){var n=ee.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=e,n.facade}var gQi=typeof window<"u"?ee.useLayoutEffect:ee.useEffect,s0n=new WeakMap;function dQi(t,e){var n=uQi(null,function(o){return t.forEach(function(i){return vWe(i,o)})});return gQi(function(){var o=s0n.get(n);if(o){var i=new Set(o),r=new Set(t),s=n.current;i.forEach(function(a){r.has(a)||vWe(a,null)}),r.forEach(function(a){i.has(a)||vWe(a,s)})}s0n.set(n,t)},[t]),n}function hQi(t){return t}function pQi(t,e){e===void 0&&(e=hQi);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(r){var s=e(r,o);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(r){for(o=!0;n.length;){var s=n;n=[],s.forEach(r)}n={push:function(a){return r(a)},filter:function(){return n}}},assignMedium:function(r){o=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(r),s=n}var A=function(){var l=s;s=[],l.forEach(r)},c=function(){return Promise.resolve().then(A)};c(),n={push:function(l){s.push(l),c()},filter:function(l){return s=s.filter(l),n}}}};return i}function mQi(t){t===void 0&&(t={});var e=pQi(null);return e.options=K6({async:!0,ssr:!1},t),e}var a0n=function(t){var e=t.sideCar,n=r0n(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=e.read();if(!o)throw new Error("Sidecar medium not found");return ee.createElement(o,K6({},n))};a0n.isSideCarExport=!0;function _Qi(t,e){return t.useMedium(e),a0n}var A0n=mQi(),wWe=function(){},Jme=ee.forwardRef(function(t,e){var n=ee.useRef(null),o=ee.useState({onScrollCapture:wWe,onWheelCapture:wWe,onTouchMoveCapture:wWe}),i=o[0],r=o[1],s=t.forwardProps,a=t.children,A=t.className,c=t.removeScrollBar,l=t.enabled,u=t.shards,g=t.sideCar,h=t.noRelative,d=t.noIsolation,p=t.inert,m=t.allowPinchZoom,_=t.as,f=_===void 0?"div":_,I=t.gapMode,C=r0n(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),y=g,x=dQi([n,e]),E=K6(K6({},C),i);return ee.createElement(ee.Fragment,null,l&&ee.createElement(y,{sideCar:A0n,removeScrollBar:c,shards:u,noRelative:h,noIsolation:d,inert:p,setCallbacks:r,allowPinchZoom:!!m,lockRef:n,gapMode:I}),s?ee.cloneElement(ee.Children.only(a),K6(K6({},E),{ref:x})):ee.createElement(f,K6({},E,{className:A,ref:x}),a))});Jme.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jme.classNames={fullWidth:zme,zeroRight:Vme};var fQi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IQi(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=fQi();return e&&t.setAttribute("nonce",e),t}function CQi(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function yQi(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var xQi=function(){var t=0,e=null;return{add:function(n){t==0&&(e=IQi())&&(CQi(e,n),yQi(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},EQi=function(){var t=xQi();return function(e,n){ee.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},c0n=function(){var t=EQi(),e=function(n){var o=n.styles,i=n.dynamic;return t(o,i),null};return e},BQi={left:0,top:0,right:0,gap:0},PWe=function(t){return parseInt(t||"",10)||0},bQi=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],o=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[PWe(n),PWe(o),PWe(i)]},SQi=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return BQi;var e=bQi(t),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-n+e[2]-e[0])}},QQi=c0n(),IU="data-scroll-locked",vQi=function(t,e,n,o){var i=t.left,r=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(cQi,` {
   overflow: hidden `).concat(o,`;
   padding-right: `).concat(a,"px ").concat(o,`;
  }
  body[`).concat(IU,`] {
    overflow: hidden `).concat(o,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(o,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(r,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(o,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Vme,` {
    right: `).concat(a,"px ").concat(o,`;
  }
  
  .`).concat(zme,` {
    margin-right: `).concat(a,"px ").concat(o,`;
  }
  
  .`).concat(Vme," .").concat(Vme,` {
    right: 0 `).concat(o,`;
  }
  
  .`).concat(zme," .").concat(zme,` {
    margin-right: 0 `).concat(o,`;
  }
  
  body[`).concat(IU,`] {
    `).concat(lQi,": ").concat(a,`px;
  }
`)},l0n=function(){var t=parseInt(document.body.getAttribute(IU)||"0",10);return isFinite(t)?t:0},wQi=function(){ee.useEffect(function(){return document.body.setAttribute(IU,(l0n()+1).toString()),function(){var t=l0n()-1;t<=0?document.body.removeAttribute(IU):document.body.setAttribute(IU,t.toString())}},[])},PQi=function(t){var e=t.noRelative,n=t.noImportant,o=t.gapMode,i=o===void 0?"margin":o;wQi();var r=ee.useMemo(function(){return SQi(i)},[i]);return ee.createElement(QQi,{styles:vQi(r,!e,i,n?"":"!important")})},MWe=!1;if(typeof window<"u")try{var Wme=Object.defineProperty({},"passive",{get:function(){return MWe=!0,!0}});window.addEventListener("test",Wme,Wme),window.removeEventListener("test",Wme,Wme)}catch{MWe=!1}var CU=MWe?{passive:!1}:!1,MQi=function(t){return t.tagName==="TEXTAREA"},u0n=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!MQi(t)&&n[e]==="visible")},DQi=function(t){return u0n(t,"overflowY")},NQi=function(t){return u0n(t,"overflowX")},g0n=function(t,e){var n=e.ownerDocument,o=e;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=d0n(t,o);if(i){var r=h0n(t,o),s=r[1],a=r[2];if(s>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},RQi=function(t){var e=t.scrollTop,n=t.scrollHeight,o=t.clientHeight;return[e,n,o]},TQi=function(t){var e=t.scrollLeft,n=t.scrollWidth,o=t.clientWidth;return[e,n,o]},d0n=function(t,e){return t==="v"?DQi(e):NQi(e)},h0n=function(t,e){return t==="v"?RQi(e):TQi(e)},kQi=function(t,e){return t==="h"&&e==="rtl"?-1:1},FQi=function(t,e,n,o,i){var r=kQi(t,window.getComputedStyle(e).direction),s=r*o,a=n.target,A=e.contains(a),c=!1,l=s>0,u=0,g=0;do{if(!a)break;var h=h0n(t,a),d=h[0],p=h[1],m=h[2],_=p-m-r*d;(d||_)&&d0n(t,a)&&(u+=_,g+=d);var f=a.parentNode;a=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!A&&a!==document.body||A&&(e.contains(a)||e===a));return(l&&Math.abs(u)<1||!l&&Math.abs(g)<1)&&(c=!0),c},jme=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},p0n=function(t){return[t.deltaX,t.deltaY]},m0n=function(t){return t&&"current"in t?t.current:t},LQi=function(t,e){return t[0]===e[0]&&t[1]===e[1]},HQi=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},OQi=0,yU=[];function GQi(t){var e=ee.useRef([]),n=ee.useRef([0,0]),o=ee.useRef(),i=ee.useState(OQi++)[0],r=ee.useState(c0n)[0],s=ee.useRef(t);ee.useEffect(function(){s.current=t},[t]),ee.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=AQi([t.lockRef.current],(t.shards||[]).map(m0n),!0).filter(Boolean);return p.forEach(function(m){return m.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=ee.useCallback(function(p,m){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!s.current.allowPinchZoom;var _=jme(p),f=n.current,I="deltaX"in p?p.deltaX:f[0]-_[0],C="deltaY"in p?p.deltaY:f[1]-_[1],y,x=p.target,E=Math.abs(I)>Math.abs(C)?"h":"v";if("touches"in p&&E==="h"&&x.type==="range")return!1;var B=window.getSelection(),S=B&&B.anchorNode,Q=S?S===x||S.contains(x):!1;if(Q)return!1;var w=g0n(E,x);if(!w)return!0;if(w?y=E:(y=E==="v"?"h":"v",w=g0n(E,x)),!w)return!1;if(!o.current&&"changedTouches"in p&&(I||C)&&(o.current=y),!y)return!0;var M=o.current||y;return FQi(M,m,p,M==="h"?I:C)},[]),A=ee.useCallback(function(p){var m=p;if(!(!yU.length||yU[yU.length-1]!==r)){var _="deltaY"in m?p0n(m):jme(m),f=e.current.filter(function(y){return y.name===m.type&&(y.target===m.target||m.target===y.shadowParent)&&LQi(y.delta,_)})[0];if(f&&f.should){m.cancelable&&m.preventDefault();return}if(!f){var I=(s.current.shards||[]).map(m0n).filter(Boolean).filter(function(y){return y.contains(m.target)}),C=I.length>0?a(m,I[0]):!s.current.noIsolation;C&&m.cancelable&&m.preventDefault()}}},[]),c=ee.useCallback(function(p,m,_,f){var I={name:p,delta:m,target:_,should:f,shadowParent:YQi(_)};e.current.push(I),setTimeout(function(){e.current=e.current.filter(function(C){return C!==I})},1)},[]),l=ee.useCallback(function(p){n.current=jme(p),o.current=void 0},[]),u=ee.useCallback(function(p){c(p.type,p0n(p),p.target,a(p,t.lockRef.current))},[]),g=ee.useCallback(function(p){c(p.type,jme(p),p.target,a(p,t.lockRef.current))},[]);ee.useEffect(function(){return yU.push(r),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:g}),document.addEventListener("wheel",A,CU),document.addEventListener("touchmove",A,CU),document.addEventListener("touchstart",l,CU),function(){yU=yU.filter(function(p){return p!==r}),document.removeEventListener("wheel",A,CU),document.removeEventListener("touchmove",A,CU),document.removeEventListener("touchstart",l,CU)}},[]);var h=t.removeScrollBar,d=t.inert;return ee.createElement(ee.Fragment,null,d?ee.createElement(r,{styles:HQi(i)}):null,h?ee.createElement(PQi,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function YQi(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const UQi=_Qi(A0n,GQi);var yZ=ee.forwardRef(function(t,e){return ee.createElement(Jme,K6({},t,{ref:e,sideCar:UQi}))});yZ.classNames=Jme.classNames;var KQi=Object.defineProperty,Hl=(t,e)=>KQi(t,"name",{value:e,configurable:!0}),DWe=["Enter"," "],VQi=["ArrowDown","PageUp","Home"],_0n=["ArrowUp","PageDown","End"],zQi=[...VQi,..._0n],JQi={ltr:[...DWe,"ArrowRight"],rtl:[...DWe,"ArrowLeft"]},WQi={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$me="Menu",[xZ,jQi,$Qi]=tge($me),[wT,f0n]=Nx($me,[$Qi,PP,ige]),qme=PP(),I0n=ige(),[C0n,MP]=wT($me),[qQi,EZ]=wT($me),XQi=Hl(t=>{const{__scopeMenu:e,open:n=!1,children:o,dir:i,onOpenChange:r,modal:s=!0}=t,a=qme(e),[A,c]=ee.useState(null),l=ee.useRef(!1),u=lE(r),g=Q$(i);return ee.useEffect(()=>{const h=Hl(()=>{l.current=!0,document.addEventListener("pointerdown",d,{capture:!0,once:!0}),document.addEventListener("pointermove",d,{capture:!0,once:!0})},"handleKeyDown"),d=Hl(()=>l.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",d,{capture:!0}),document.removeEventListener("pointermove",d,{capture:!0})}},[]),ee.useEffect(()=>{if(!n)return;const h=Hl(()=>u(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[n,u]),K.jsx(CZ,{...a,children:K.jsx(C0n,{scope:e,open:n,onOpenChange:u,content:A,onContentChange:c,children:K.jsx(qQi,{scope:e,onClose:ee.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:l,dir:g,modal:s,children:o})})})},"Menu"),y0n=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,...i}=e,r=qme(o);return K.jsx(Hme,{...r,...i,ref:n})},"MenuAnchor")),x0n="MenuPortal",[ZQi,E0n]=wT(x0n,{forceMount:void 0}),evi=Hl(t=>{const{__scopeMenu:e,forceMount:n,children:o,container:i}=t,r=MP(x0n,e);return K.jsx(ZQi,{scope:e,forceMount:n,children:K.jsx(uE,{present:n||r.open,children:K.jsx(Gme,{asChild:!0,container:i,children:o})})})},"MenuPortal"),t9="MenuContent",[tvi,NWe]=wT(t9),nvi=ee.forwardRef(Hl(function(e,n){const o=E0n(t9,e.__scopeMenu),{forceMount:i=o.forceMount,...r}=e,s=MP(t9,e.__scopeMenu),a=EZ(t9,e.__scopeMenu);return K.jsx(xZ.Provider,{scope:e.__scopeMenu,children:K.jsx(uE,{present:i||s.open,children:K.jsx(xZ.Slot,{scope:e.__scopeMenu,children:a.modal?K.jsx(ovi,{...r,ref:n}):K.jsx(ivi,{...r,ref:n})})})})},"MenuContent")),ovi=ee.forwardRef(Hl(function(e,n){const o=MP(t9,e.__scopeMenu),i=ee.useRef(null),r=$A(n,i);return ee.useEffect(()=>{const s=i.current;if(s)return Kme(s)},[]),K.jsx(RWe,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:ar(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentModal")),ivi=ee.forwardRef(Hl(function(e,n){const o=MP(t9,e.__scopeMenu);return K.jsx(RWe,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})},"MenuRootContentNonModal")),rvi=MB("MenuContent.ScrollLock"),RWe=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,loop:i=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:A,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,disableOutsideScroll:p,...m}=e,_=MP(t9,o),f=EZ(t9,o),I=qme(o),C=I0n(o),y=jQi(o),[x,E]=ee.useState(null),B=ee.useRef(null),S=$A(n,B,_.onContentChange),Q=ee.useRef(0),w=ee.useRef(""),M=ee.useRef(0),k=ee.useRef(null),R=ee.useRef("right"),F=ee.useRef(0),O=p?yZ:ee.Fragment,U=p?{as:rvi,allowPinchZoom:!0}:void 0,Y=Hl(te=>{const j=w.current+te,J=y().filter(_e=>!_e.disabled),oe=document.activeElement,ie=J.find(_e=>_e.ref.current===oe)?.textValue,ne=J.map(_e=>_e.textValue),le=D0n(ne,j,ie),ge=J.find(_e=>_e.textValue===le)?.ref.current;Hl((function _e(ue){w.current=ue,window.clearTimeout(Q.current),ue!==""&&(Q.current=window.setTimeout(()=>_e(""),1e3))}),"updateSearch")(j),ge&&setTimeout(()=>ge.focus())},"handleTypeaheadSearch");ee.useEffect(()=>()=>window.clearTimeout(Q.current),[]),hU();const W=ee.useCallback(te=>R.current===k.current?.side&&R0n(te,k.current?.area),[]);return K.jsx(tvi,{scope:o,searchRef:w,onItemEnter:ee.useCallback(te=>{W(te)&&te.preventDefault()},[W]),onItemLeave:ee.useCallback(te=>{W(te)||(B.current?.focus(),E(null))},[W]),onTriggerLeave:ee.useCallback(te=>{W(te)&&te.preventDefault()},[W]),pointerGraceTimerRef:M,onPointerGraceIntentChange:ee.useCallback(te=>{k.current=te},[]),children:K.jsx(O,{...U,children:K.jsx(Sme,{asChild:!0,trapped:r,onMountAutoFocus:ar(s,te=>{te.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:A,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,children:K.jsx(WFt,{asChild:!0,...C,dir:f.dir,orientation:"vertical",loop:i,currentTabStopId:x,onCurrentTabStopIdChange:E,onEntryFocus:ar(c,te=>{f.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:K.jsx(Ome,{role:"menu","aria-orientation":"vertical","data-state":FWe(_.open),"data-radix-menu-content":"",dir:f.dir,...I,...m,ref:S,style:{outline:"none",...m.style},onKeyDown:ar(m.onKeyDown,te=>{const J=te.target.closest("[data-radix-menu-content]")===te.currentTarget,oe=te.ctrlKey||te.altKey||te.metaKey,ie=te.key.length===1;J&&(te.key==="Tab"&&te.preventDefault(),!oe&&ie&&Y(te.key));const ne=B.current;if(te.target!==ne||!zQi.includes(te.key))return;te.preventDefault();const ge=y().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);_0n.includes(te.key)&&ge.reverse(),P0n(ge)}),onBlur:ar(e.onBlur,te=>{te.currentTarget.contains(te.target)||(window.clearTimeout(Q.current),w.current="")}),onPointerMove:ar(e.onPointerMove,xU(te=>{const j=te.target,J=F.current!==te.clientX;if(te.currentTarget.contains(j)&&J){const oe=te.clientX>F.current?"right":"left";R.current=oe,F.current=te.clientX}}))})})})})})})},"MenuContentImpl")),svi=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,...i}=e;return K.jsx(Na.div,{...i,ref:n})},"MenuLabel")),TWe="MenuItem",B0n="menu.itemSelect",kWe=ee.forwardRef(Hl(function(e,n){const{disabled:o=!1,onSelect:i,...r}=e,s=ee.useRef(null),a=EZ(TWe,e.__scopeMenu),A=NWe(TWe,e.__scopeMenu),c=$A(n,s),l=ee.useRef(!1),u=Hl(()=>{const g=s.current;if(!o&&g){const h=new CustomEvent(B0n,{bubbles:!0,cancelable:!0});g.addEventListener(B0n,d=>i?.(d),{once:!0}),hDe(g,h),h.defaultPrevented?l.current=!1:a.onClose()}},"handleSelect");return K.jsx(b0n,{...r,ref:c,disabled:o,onClick:ar(e.onClick,u),onPointerDown:g=>{e.onPointerDown?.(g),l.current=!0},onPointerUp:ar(e.onPointerUp,g=>{l.current||g.currentTarget?.click()}),onKeyDown:ar(e.onKeyDown,g=>{o||g.target!==g.currentTarget||A.searchRef.current!==""&&g.key===" "||DWe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})},"MenuItem")),b0n=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,disabled:i=!1,textValue:r,...s}=e,a=NWe(TWe,o),A=I0n(o),c=ee.useRef(null),l=$A(n,c),[u,g]=ee.useState(!1),[h,d]=ee.useState("");return ee.useEffect(()=>{const p=c.current;p&&d((p.textContent??"").trim())},[s.children]),K.jsx(xZ.ItemSlot,{scope:o,disabled:i,textValue:r??h,children:K.jsx(jFt,{asChild:!0,...A,focusable:!i,children:K.jsx(Na.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:l,onPointerMove:ar(e.onPointerMove,xU(p=>{i?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ar(e.onPointerLeave,xU(p=>a.onItemLeave(p))),onFocus:ar(e.onFocus,()=>g(!0)),onBlur:ar(e.onBlur,()=>g(!1))})})})},"MenuItemImpl")),avi=ee.forwardRef(Hl(function(e,n){const{checked:o=!1,onCheckedChange:i,...r}=e;return K.jsx(Q0n,{scope:e.__scopeMenu,checked:o,children:K.jsx(kWe,{role:"menuitemcheckbox","aria-checked":BZ(o)?"mixed":o,...r,ref:n,"data-state":Zme(o),onSelect:ar(r.onSelect,()=>i?.(BZ(o)?!0:!o),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),Avi="MenuRadioGroup",[Smr,cvi]=wT(Avi,{value:void 0,onValueChange:Hl(()=>{},"onValueChange")}),lvi="MenuRadioItem",uvi=ee.forwardRef(Hl(function(e,n){const{value:o,...i}=e,r=cvi(lvi,e.__scopeMenu),s=o===r.value;return K.jsx(Q0n,{scope:e.__scopeMenu,checked:s,children:K.jsx(kWe,{role:"menuitemradio","aria-checked":s,...i,ref:n,"data-state":Zme(s),onSelect:ar(i.onSelect,()=>r.onValueChange?.(o),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),S0n="MenuItemIndicator",[Q0n,gvi]=wT(S0n,{checked:!1}),dvi=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,forceMount:i,...r}=e,s=gvi(S0n,o);return K.jsx(uE,{present:i||BZ(s.checked)||s.checked===!0,children:K.jsx(Na.span,{...r,ref:n,"data-state":Zme(s.checked)})})},"MenuItemIndicator")),hvi=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,...i}=e;return K.jsx(Na.div,{role:"separator","aria-orientation":"horizontal",...i,ref:n})},"MenuSeparator")),v0n="MenuSub",[pvi,w0n]=wT(v0n),mvi=Hl(t=>{const{__scopeMenu:e,children:n,open:o=!1,onOpenChange:i}=t,r=MP(v0n,e),s=qme(e),[a,A]=ee.useState(null),[c,l]=ee.useState(null),u=lE(i);return ee.useEffect(()=>(r.open===!1&&u(!1),()=>u(!1)),[r.open,u]),K.jsx(CZ,{...s,children:K.jsx(C0n,{scope:e,open:o,onOpenChange:u,content:c,onContentChange:l,children:K.jsx(pvi,{scope:e,contentId:t_(),triggerId:t_(),trigger:a,onTriggerChange:A,children:n})})})},"MenuSub"),Xme="MenuSubTrigger",_vi=ee.forwardRef(Hl(function(e,n){const o=MP(Xme,e.__scopeMenu),i=EZ(Xme,e.__scopeMenu),r=w0n(Xme,e.__scopeMenu),s=NWe(Xme,e.__scopeMenu),a=ee.useRef(null),{pointerGraceTimerRef:A,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},u=ee.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);ee.useEffect(()=>u,[u]),ee.useEffect(()=>{const h=A.current;return()=>{window.clearTimeout(h),c(null)}},[A,c]);const g=$A(n,r.onTriggerChange);return K.jsx(y0n,{asChild:!0,...l,children:K.jsx(b0n,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?r.contentId:void 0,"data-state":FWe(o.open),...e,ref:g,onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:ar(e.onPointerMove,xU(h=>{s.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!o.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{o.onOpenChange(!0),u()},100))})),onPointerLeave:ar(e.onPointerLeave,xU(h=>{u();const d=o.content?.getBoundingClientRect();if(d){const p=o.content?.dataset.side,m=p==="right",_=m?-5:5,f=d[m?"left":"right"],I=d[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:h.clientX+_,y:h.clientY},{x:f,y:d.top},{x:I,y:d.top},{x:I,y:d.bottom},{x:f,y:d.bottom}],side:p}),window.clearTimeout(A.current),A.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ar(e.onKeyDown,h=>{e.disabled||h.target!==h.currentTarget||s.searchRef.current!==""&&h.key===" "||JQi[i.dir].includes(h.key)&&(o.onOpenChange(!0),o.content?.focus(),h.preventDefault())})})})},"MenuSubTrigger")),fvi="MenuSubContent",Ivi=ee.forwardRef(Hl(function(e,n){const o=E0n(t9,e.__scopeMenu),{forceMount:i=o.forceMount,align:r="start",...s}=e,a=MP(t9,e.__scopeMenu),A=EZ(t9,e.__scopeMenu),c=w0n(fvi,e.__scopeMenu),l=ee.useRef(null),u=$A(n,l);return K.jsx(xZ.Provider,{scope:e.__scopeMenu,children:K.jsx(uE,{present:i||a.open,children:K.jsx(xZ.Slot,{scope:e.__scopeMenu,children:K.jsx(RWe,{id:c.contentId,"aria-labelledby":c.triggerId,...s,ref:u,align:r,side:A.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{A.isUsingKeyboardRef.current&&l.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:ar(e.onFocusOutside,g=>{g.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:ar(e.onEscapeKeyDown,g=>{A.onClose(),g.preventDefault()}),onKeyDown:ar(e.onKeyDown,g=>{const h=g.currentTarget.contains(g.target),d=WQi[A.dir].includes(g.key);h&&d&&(a.onOpenChange(!1),c.trigger?.focus(),g.preventDefault())})})})})})},"MenuSubContent"));function FWe(t){return t?"open":"closed"}Hl(FWe,"getOpenState");function BZ(t){return t==="indeterminate"}Hl(BZ,"isIndeterminate");function Zme(t){return BZ(t)?"indeterminate":t?"checked":"unchecked"}Hl(Zme,"getCheckedState");function P0n(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}Hl(P0n,"focusFirst");function M0n(t,e){return t.map((n,o)=>t[(e+o)%t.length])}Hl(M0n,"wrapArray");function D0n(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let s=M0n(t,Math.max(r,0));i.length===1&&(s=s.filter(c=>c!==n));const A=s.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return A!==n?A:void 0}Hl(D0n,"getNextMatch");function N0n(t,e){const{x:n,y:o}=t;let i=!1;for(let r=0,s=e.length-1;r<e.length;s=r++){const a=e[r],A=e[s],c=a.x,l=a.y,u=A.x,g=A.y;l>o!=g>o&&n<(u-c)*(o-l)/(g-l)+c&&(i=!i)}return i}Hl(N0n,"isPointInPolygon");function R0n(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return N0n(n,e)}Hl(R0n,"isPointerInGraceArea");function xU(t){return e=>e.pointerType==="mouse"?t(e):void 0}Hl(xU,"whenMouse");var Cvi=XQi,yvi=y0n,xvi=evi,Evi=nvi,Bvi=svi,bvi=kWe,Svi=avi,Qvi=uvi,vvi=dvi,wvi=hvi,Pvi=mvi,Mvi=_vi,Dvi=Ivi,Nvi=Object.defineProperty,QE=(t,e)=>Nvi(t,"name",{value:e,configurable:!0}),LWe="DropdownMenu",[Rvi,Qmr]=Nx(LWe,[f0n]),vE=f0n(),[Tvi,T0n]=Rvi(LWe),kvi=QE(t=>{const{__scopeDropdownMenu:e,children:n,dir:o,open:i,defaultOpen:r,onOpenChange:s,modal:a=!0}=t,A=vE(e),c=ee.useRef(null),[l,u]=DB({prop:i,defaultProp:r??!1,onChange:s,caller:LWe});return K.jsx(Tvi,{scope:e,triggerId:t_(),triggerRef:c,contentId:t_(),open:l,onOpenChange:u,onOpenToggle:ee.useCallback(()=>u(g=>!g),[u]),modal:a,children:K.jsx(Cvi,{...A,open:l,onOpenChange:u,dir:o,modal:a,children:n})})},"DropdownMenu"),Fvi="DropdownMenuTrigger",Lvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,disabled:i=!1,...r}=e,s=T0n(Fvi,o),a=vE(o),A=$A(n,s.triggerRef);return K.jsx(yvi,{asChild:!0,...a,children:K.jsx(Na.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:A,onPointerDown:ar(e.onPointerDown,c=>{!i&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:ar(e.onKeyDown,c=>{i||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})},"DropdownMenuTrigger")),Hvi=QE(t=>{const{__scopeDropdownMenu:e,...n}=t,o=vE(e);return K.jsx(xvi,{...o,...n})},"DropdownMenuPortal"),Ovi="DropdownMenuContent",Gvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=T0n(Ovi,o),s=vE(o),a=ee.useRef(!1);return K.jsx(Evi,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...i,ref:n,onCloseAutoFocus:ar(e.onCloseAutoFocus,A=>{a.current||r.triggerRef.current?.focus(),a.current=!1,A.preventDefault()}),onInteractOutside:ar(e.onInteractOutside,A=>{const c=A.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!r.modal||u)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),Yvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Bvi,{...r,...i,ref:n})},"DropdownMenuLabel")),Uvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(bvi,{...r,...i,ref:n})},"DropdownMenuItem")),Kvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Svi,{...r,...i,ref:n})},"DropdownMenuCheckboxItem")),Vvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Qvi,{...r,...i,ref:n})},"DropdownMenuRadioItem")),zvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(vvi,{...r,...i,ref:n})},"DropdownMenuItemIndicator")),Jvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(wvi,{...r,...i,ref:n})},"DropdownMenuSeparator")),Wvi=QE(t=>{const{__scopeDropdownMenu:e,children:n,open:o,onOpenChange:i,defaultOpen:r}=t,s=vE(e),[a,A]=DB({prop:o,defaultProp:r??!1,onChange:i,caller:"DropdownMenuSub"});return K.jsx(Pvi,{...s,open:a,onOpenChange:A,children:n})},"DropdownMenuSub"),jvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Mvi,{...r,...i,ref:n})},"DropdownMenuSubTrigger")),$vi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Dvi,{...r,...i,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),e_e=kvi,t_e=Lvi,EU=Hvi,bZ=Gvi,k0n=Yvi,SS=Uvi,HWe=Kvi,F0n=Vvi,OWe=zvi,n_e=Jvi,L0n=Wvi,GWe=jvi,YWe=$vi;const o_e=e_e,i_e=t_e,SZ=EU,QZ=L0n,BU=ee.forwardRef(({className:t,inset:e,children:n,...o},i)=>K.jsxs(GWe,{ref:i,className:Oi("rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none focus:rf-bg-zinc-100 data-[state=open]:rf-bg-zinc-100 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:data-[state=open]:rf-bg-zinc-800",e&&"rf-pl-8",t),...o,children:[n,K.jsx(bT,{className:"rf-ml-auto"})]}));BU.displayName=GWe.displayName;const bU=ee.forwardRef(({className:t,...e},n)=>K.jsx(YWe,{ref:n,className:Oi("rf-z-[102] rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-lg data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",t),...e}));bU.displayName=YWe.displayName;const vZ=ee.forwardRef(({className:t,sideOffset:e=4,...n},o)=>K.jsx(EU,{children:K.jsx(bZ,{ref:o,sideOffset:e,className:Oi("rf-z-50 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-md dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50","data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2",t),...n})}));vZ.displayName=bZ.displayName;const bp=ee.forwardRef(({className:t,inset:e,...n},o)=>K.jsx(SS,{ref:o,className:Oi("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-gap-2 rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 [&>svg]:rf-size-4 [&>svg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",e&&"rf-pl-8",t),...n}));bp.displayName=SS.displayName;const qvi=ee.forwardRef(({className:t,children:e,checked:n,...o},i)=>K.jsxs(HWe,{ref:i,className:Oi("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",t),checked:n,...o,children:[K.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:K.jsx(OWe,{children:K.jsx(CS,{className:"rf-h-4 rf-w-4"})})}),e]}));qvi.displayName=HWe.displayName;const Xvi=ee.forwardRef(({className:t,children:e,...n},o)=>K.jsxs(F0n,{ref:o,className:Oi("rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50",t),...n,children:[K.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:K.jsx(OWe,{children:K.jsx(pln,{className:"rf-h-2 rf-w-2 rf-fill-current"})})}),e]}));Xvi.displayName=F0n.displayName;const Zvi=ee.forwardRef(({className:t,inset:e,...n},o)=>K.jsx(k0n,{ref:o,className:Oi("rf-px-2 rf-py-1.5 rf-text-sm rf-font-semibold",e&&"rf-pl-8",t),...n}));Zvi.displayName=k0n.displayName;const H0n=ee.forwardRef(({className:t,...e},n)=>K.jsx(n_e,{ref:n,className:Oi("rf--mx-1 rf-my-1 rf-h-px rf-bg-zinc-100 dark:rf-bg-zinc-800",t),...e}));H0n.displayName=n_e.displayName;const O0n=({autoroutingLog:t,onReportAutoroutingLog:e})=>K.jsx(K.Fragment,{children:Object.keys(t??{}).length>0&&K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsxs(fA,{variant:"outline",children:[K.jsx(cbi,{className:"rf-w-4 rf-h-4 rf-mr-2"}),"Open Autorouting Log"]})}),K.jsx(vZ,{className:"rf-w-96",children:Object.entries(t??{}).map(([n,{simpleRouteJson:o}])=>K.jsxs(bp,{className:"rf-flex rf-justify-between rf-items-center",children:[K.jsx("span",{className:"rf-truncate rf-text-xs rf-mr-2",children:n}),K.jsxs("div",{className:"rf-flex rf-gap-2",children:[K.jsxs(fA,{variant:"outline",size:"sm",onClick:i=>{i.stopPropagation();const r=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=`${n}-autorouting.json`,a.click(),URL.revokeObjectURL(s)},children:[K.jsx(mZ,{className:"rf-w-3 rf-h-3"}),"Download"]}),e&&K.jsxs(fA,{variant:"outline",size:"sm",onClick:i=>{i.stopPropagation(),e&&e(n,{simpleRouteJson:o})},children:[K.jsx(Pbi,{className:"rf-w-3 rf-h-3"}),"Report Bug"]})]})]},n))})]})}),ewi=({code:t,fsMap:e,autoroutingLog:n,circuitJsonErrors:o,circuitJsonWarnings:i,onReportAutoroutingLog:r,errorMessage:s,errorStack:a,circuitJson:A,evalVersion:c})=>{const l=ee.useMemo(()=>{const S=[];if(s&&S.push({type:"Execution Error",message:s,stack:a||void 0,source:"execution"}),o&&o.length>0)for(const Q of o)S.push({type:Q.type||"Circuit JSON Error",message:Q.message||"No error message available",stack:Q.stack||"",source:"circuitJson"});return S},[s,a,o]),u=ee.useMemo(()=>!A||!Array.isArray(A)?void 0:A.find(Q=>Q.type==="source_project_metadata")?.software_used_string,[A]),g=ee.useMemo(()=>{const S=[];if(i&&i.length>0)for(const Q of i)S.push({type:Q.type||"Circuit JSON Warning",message:Q.message||"No warning message available",stack:Q.stack||"",source:"circuitJson"});return S},[i]),h=()=>{if(e)try{return QUo(e instanceof Map?Object.fromEntries(e.entries()):e)}catch{}return Rbi(t??"")},d=(S,Q)=>{const w=`https://github.com/tscircuit/tscircuit.com/issues/new?title=${encodeURIComponent(S)}&body=${encodeURIComponent(Q)}`;window.open(w,"_blank")};ee.useEffect(()=>{if(s){let S=s;a&&(S+=`

${a}`),typeof window<"u"&&(window.__TSCIRCUIT_LAST_EXECUTION_ERROR=S)}},[s,a]);const[p,m]=ee.useState(()=>{const S=new Set;return l.forEach((Q,w)=>S.add(w)),S}),[_,f]=ee.useState(()=>{const S=new Set;return g.forEach((Q,w)=>S.add(w)),S}),[I,C]=ee.useState(!1),[y,x]=ee.useState(!1);if(l.length===0&&g.length===0)return K.jsxs("div",{className:"px-2",children:[K.jsx("div",{className:"rf-mt-4 rf-bg-green-50 rf-rounded-md rf-border rf-border-green-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-green-800 rf-mb-3",children:"No errors or warnings!"}),K.jsx("p",{className:"rf-text-sm rf-text-green-700",children:"Your code is running without any errors or warnings."})]})}),K.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[K.jsx(O0n,{autoroutingLog:n,onReportAutoroutingLog:r}),K.jsxs(fA,{variant:"outline",className:"rf-p-1",onClick:()=>{const S=h();d("Issue Report",`[Package code to reproduce](${S})`)},children:[K.jsx(nWe,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]});const E=S=>{m(Q=>{const w=new Set(Q);return w.has(S)?w.delete(S):w.add(S),w})},B=S=>{f(Q=>{const w=new Set(Q);return w.has(S)?w.delete(S):w.add(S),w})};return K.jsx(K.Fragment,{children:K.jsxs("div",{className:"rf-w-full rf-flex rf-flex-col rf-h-full",children:[K.jsxs("div",{className:"rf-overflow-y-auto rf-min-h-0",children:[l.length>0&&K.jsxs("div",{className:"rf-mt-2",children:[K.jsxs("div",{className:"rf-text-xs rf-text-red-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-red-50 rf-border-b rf-border-red-200 rf-flex rf-items-center rf-gap-2 rf-cursor-pointer hover:rf-bg-red-100",onClick:()=>C(!I),children:[I?K.jsx(bT,{className:"rf-h-3 rf-w-3 rf-text-red-700"}):K.jsx(pZ,{className:"rf-h-3 rf-w-3 rf-text-red-700"}),K.jsxs("span",{children:[l.length," ",l.length===1?"error":"errors"]})]}),!I&&l.map((S,Q)=>{const w=p.has(Q);S.message;const M=S.stack||c||u;return K.jsxs("div",{className:"rf-bg-white hover:rf-bg-red-100",children:[K.jsxs("div",{className:"rf-flex rf-items-start rf-gap-1 rf-px-2 rf-pt-1 rf-pb-1 rf-cursor-pointer rf-bg-red-50/50",onClick:()=>M&&E(Q),children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",style:{marginTop:"2px"},children:[K.jsx(Abi,{className:"rf-h-4 rf-w-4 rf-text-red-500 rf-flex-shrink-0"}),M&&K.jsx(bT,{className:`rf-h-3 rf-w-3 rf-text-red-500 rf-flex-shrink-0 rf-transition-transform ${w?"rf-rotate-90":""}`})]}),K.jsxs("div",{className:"rf-flex-1 rf-min-w-0 rf-leading-[1rem]",children:[K.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-red-700 rf-leading-[0.95rem]",children:[S.type,":"]}),K.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-red-600 rf-ml-1 rf-leading-[0.95rem]",children:S.message})]})]}),w&&M&&K.jsxs("div",{className:"rf-bg-red-50/50 rf-pl-12",children:[S.stack?.split(`
`).filter(k=>k.trim()).slice(1).map((k,R)=>K.jsx("div",{className:"rf-px-2 rf-leading-tight",children:K.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-red-500",children:k})},R)),(c||u)&&K.jsx("div",{className:"rf-px-2",children:K.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-red-400",children:[c&&`@tscircuit/eval@${c}`,c&&u&&" • ",u]})})]})]},Q)})]}),g.length>0&&K.jsxs("div",{className:"rf-mt-2",children:[K.jsxs("div",{className:"rf-text-xs rf-text-orange-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-orange-50 rf-border-b rf-border-orange-200 rf-flex rf-items-center rf-gap-2 rf-cursor-pointer hover:rf-bg-orange-100",onClick:()=>x(!y),children:[y?K.jsx(bT,{className:"rf-h-3 rf-w-3 rf-text-orange-700"}):K.jsx(pZ,{className:"rf-h-3 rf-w-3 rf-text-orange-700"}),K.jsxs("span",{children:[g.length," ",g.length===1?"warning":"warnings"]})]}),!y&&g.map((S,Q)=>{const w=_.has(Q);S.message;const M=!!S.stack;return K.jsxs("div",{className:"rf-bg-white hover:rf-bg-orange-100",children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-px-2 rf-py-1 rf-cursor-pointer rf-bg-orange-50/50",onClick:()=>M&&B(Q),children:[K.jsx(oWe,{className:"rf-h-4 rf-w-4 rf-text-orange-500 rf-flex-shrink-0"}),M&&K.jsx(bT,{className:`rf-h-3 rf-w-3 rf-text-orange-500 rf-flex-shrink-0 rf-transition-transform ${w?"rf-rotate-90":""}`}),K.jsxs("div",{className:"rf-flex-1 rf-min-w-0 rf-flex rf-items-center rf-flex-wrap",children:[K.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-orange-700 rf-break-words",children:[S.type,":"]}),K.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-orange-600 rf-ml-1 rf-break-words",children:S.message})]})]}),w&&M&&K.jsx("div",{className:"rf-bg-orange-50/50 rf-pl-12",children:S.stack?.split(`
`).filter(k=>k.trim()).slice(1).map((k,R)=>K.jsx("div",{className:"rf-px-2 rf-leading-tight",children:K.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-orange-500",children:k})},R))})]},Q)})]})]}),K.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end rf-flex-shrink-0",children:[K.jsx(O0n,{autoroutingLog:n,onReportAutoroutingLog:r}),K.jsxs(fA,{variant:"outline",className:"rf-p-1",onClick:()=>{const S=l[0]??g[0]??{type:"General Issue",message:"No error or warning details provided."};let Q=`${S.type}: ${S.message}`;c&&(Q+=`
@tscircuit/eval@${c}`),u&&(Q+=`
${u}`),S.stack&&(Q+=`
${S.stack}`),navigator.clipboard.writeText(Q),ua.success("Error copied to clipboard!")},children:[K.jsx(lbi,{className:"rf-w-4 rf-h-4"}),"Copy Error"]}),K.jsxs(fA,{variant:"outline",className:"rf-p-1",onClick:()=>{const S=l[0]??g[0]??{type:"General Issue",message:"No error or warning details provided."},Q=`Error ${S.type}`.replace(/[^a-zA-Z0-9 ]/g," ").replace(/\s+/g," ").slice(0,100);let w=`${S.type}: ${S.message}`;c&&(w+=`
@tscircuit/eval@${c}`),u&&(w+=`
${u}`),S.stack&&(w+=`
${S.stack}`);let M=`[Package code to reproduce](${h()})

### Error
\`\`\`
${w}
\`\`\`
`;if(M.length>35e3){const k=S.message.length>500?`${S.message.slice(0,500)}...`:S.message;M=`[Package code to reproduce](${h()})

### Error
\`\`\`
${S.type}: ${k}
\`\`\``}d(Q,M)},children:[K.jsx(nWe,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]})})};var twi=Object.defineProperty,wE=(t,e)=>twi(t,"name",{value:e,configurable:!0}),UWe="Dialog",[G0n,Y0n]=Nx(UWe),[nwi,n9]=G0n(UWe),r_e=wE(t=>{const{__scopeDialog:e,children:n,open:o,defaultOpen:i,onOpenChange:r,modal:s=!0}=t,a=ee.useRef(null),A=ee.useRef(null),[c,l]=DB({prop:o,defaultProp:i??!1,onChange:r,caller:UWe}),[u,g]=ee.useState(0),[h,d]=ee.useState(0);return K.jsx(nwi,{scope:e,triggerRef:a,contentRef:A,contentId:t_(),titleId:t_(),descriptionId:t_(),titlePresent:u>0,descriptionPresent:h>0,setTitleCount:g,setDescriptionCount:d,open:c,onOpenChange:l,onOpenToggle:ee.useCallback(()=>l(p=>!p),[l]),modal:s,children:n})},"Dialog"),owi="DialogTrigger",iwi=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(owi,o),s=$A(n,r.triggerRef);return K.jsx(Na.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":c_e(r.open),...i,ref:s,onClick:ar(e.onClick,r.onOpenToggle)})},"DialogTrigger")),U0n="DialogPortal",[rwi,K0n]=G0n(U0n,{forceMount:void 0}),s_e=wE(t=>{const{__scopeDialog:e,forceMount:n,children:o,container:i}=t,r=n9(U0n,e);return K.jsx(rwi,{scope:e,forceMount:n,children:ee.Children.map(o,s=>K.jsx(uE,{present:n||r.open,children:K.jsx(Gme,{asChild:!0,container:i,children:s})}))})},"DialogPortal"),KWe="DialogOverlay",wZ=ee.forwardRef(wE(function(e,n){const o=K0n(KWe,e.__scopeDialog),{forceMount:i=o.forceMount,...r}=e,s=n9(KWe,e.__scopeDialog);return s.modal?K.jsx(uE,{present:i||s.open,children:K.jsx(awi,{...r,ref:n})}):null},"DialogOverlay")),swi=MB("DialogOverlay.RemoveScroll"),awi=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(KWe,o),s=yln(),a=$A(n,s);return K.jsx(yZ,{as:swi,allowPinchZoom:!0,shards:[r.contentRef],children:K.jsx(Na.div,{"data-state":c_e(r.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),PZ="DialogContent",MZ=ee.forwardRef(wE(function(e,n){const o=K0n(PZ,e.__scopeDialog),{forceMount:i=o.forceMount,...r}=e,s=n9(PZ,e.__scopeDialog);return K.jsx(uE,{present:i||s.open,children:s.modal?K.jsx(Awi,{...r,ref:n}):K.jsx(cwi,{...r,ref:n})})},"DialogContent")),Awi=ee.forwardRef(wE(function(e,n){const o=n9(PZ,e.__scopeDialog),i=ee.useRef(null),r=$A(n,o.contentRef,i);return ee.useEffect(()=>{const s=i.current;if(s)return Kme(s)},[]),K.jsx(V0n,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:ar(e.onCloseAutoFocus,s=>{s.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:ar(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,A=a.button===0&&a.ctrlKey===!0;(a.button===2||A)&&s.preventDefault()}),onFocusOutside:ar(e.onFocusOutside,s=>s.preventDefault())})},"DialogContentModal")),cwi=ee.forwardRef(wE(function(e,n){const o=n9(PZ,e.__scopeDialog),i=ee.useRef(!1),r=ee.useRef(!1);return K.jsx(V0n,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||o.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})},"DialogContentNonModal")),V0n=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,A=n9(PZ,o);return hU(),K.jsx(K.Fragment,{children:K.jsx(Sme,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:K.jsx(_Z,{role:"dialog",id:A.contentId,"aria-describedby":A.descriptionPresent?A.descriptionId:void 0,"aria-labelledby":A.titlePresent?A.titleId:void 0,"data-state":c_e(A.open),...a,ref:n,deferPointerDownOutside:!0,onDismiss:()=>A.onOpenChange(!1)})})})},"DialogContentImpl")),lwi="DialogTitle",a_e=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(lwi,o),{setTitleCount:s}=r;return Ep(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),K.jsx(Na.h2,{id:r.titleId,...i,ref:n})},"DialogTitle")),uwi="DialogDescription",A_e=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(uwi,o),{setDescriptionCount:s}=r;return Ep(()=>(s(a=>a+1),()=>s(a=>a-1)),[s]),K.jsx(Na.p,{id:r.descriptionId,...i,ref:n})},"DialogDescription")),gwi="DialogClose",VWe=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(gwi,o);return K.jsx(Na.button,{type:"button",...i,ref:n,onClick:ar(e.onClick,()=>r.onOpenChange(!1))})},"DialogClose"));function c_e(t){return t?"open":"closed"}wE(c_e,"getState");function er(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function dwi(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function DZ(t){return typeof t>"u"}function PT(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function NZ(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return NZ(r,...i)}}}function pf(...t){return NZ(...t)}const{cos:hwi,sin:pwi}=Math;function z0n(t,e,n){const o=hwi(t),i=pwi(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return DZ(e)||DZ(n)?r:NZ([PT(e,n),r,PT(-e,-n)])}function zWe(t,e=void 0,n=void 0,o=void 0){DZ(e)&&(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return DZ(n)||DZ(o)?i:NZ([PT(n,o),i,PT(-n,-o)])}function mwi(t){return _wi(t)}function _wi(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function fwi(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function Iwi(t,e){const n=t[0].x!=null?t[0].x:t[0][0],o=t[0].y!=null?t[0].y:t[0][1],i=e[0].x!=null?e[0].x:e[0][0],r=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],A=e[1].x!=null?e[1].x:e[1][0],c=e[1].y!=null?e[1].y:e[1][1],l=t[2].x!=null?t[2].x:t[2][0],u=t[2].y!=null?t[2].y:t[2][1],g=e[2].x!=null?e[2].x:e[2][0],h=e[2].y!=null?e[2].y:e[2][1],d={a:n-l,b:o-u,c:s-l,d:a-u,e:l,f:u},p={a:i-g,b:r-h,c:A-g,d:c-h,e:g,f:h},m=dwi(d),_=NZ([p,m]);return fwi(_)}function Cwi(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function l_e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,l_e.prototype),i.expected=e,i.found=n,i.location=o,i.name="SyntaxError",i}Cwi(l_e,Error);function JWe(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}l_e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,r=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+r.line+":"+r.column;if(n){var a=this.location.end,A=JWe("",r.line.toString().length," "),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`
 --> `+s+`
`+A+` |
`+r.line+" | "+c+`
`+A+" | "+JWe("",i.column-1," ")+JWe("",u,"^")}else e+=`
 at `+s}return e},l_e.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+"-"+r(u[1]):r(u)});return"["+(c.inverted?"^":"")+l.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function r(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length>0){for(u=1,g=1;u<l.length;u++)l[u-1]!==l[u]&&(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function A(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(t)+" but "+A(e)+" found."};function J0n(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}function ywi(t,e){if(!e.subcircuit_id&&!e.source_group_id)return[...t];let n=e;if(e.subcircuit_id){const a=new Set([e.subcircuit_id]),A=new Map,c=new Map;for(const u of t)if(u.type==="source_group"){const g=u.source_group_id,h=u.subcircuit_id;h&&c.set(g,h);const d=u.parent_source_group_id;d&&(A.has(d)||A.set(d,[]),A.get(d).push(g))}let l;for(const[u,g]of c)if(g===e.subcircuit_id){l=u;break}if(l){const u=g=>{const h=A.get(g)||[];for(const d of h){const p=c.get(d);p&&a.add(p),u(d)}};u(l),n={...e,subcircuit_ids:Array.from(a)}}}const o=new Map;for(const a of t){const A=`${a.type}_id`,c=a[A];typeof c=="string"&&o.set(c,a)}const i=new Map;for(const a of t){const A=Object.entries(a);for(const[c,l]of A)if(c!=="parent_source_group_id"){if(c.endsWith("_id")&&typeof l=="string"){const u=o.get(l);J0n(i,a,u)}else if(c.endsWith("_ids")&&Array.isArray(l)){for(const u of l)if(typeof u=="string"){const g=o.get(u);J0n(i,a,g)}}}}const r=[],s=new Set;for(const a of t){let A=!1;(n.subcircuit_id&&"subcircuit_id"in a&&a.subcircuit_id===n.subcircuit_id||n.subcircuit_ids&&"subcircuit_id"in a&&a.subcircuit_id&&n.subcircuit_ids.includes(a.subcircuit_id)||n.source_group_id&&"source_group_id"in a&&a.source_group_id===n.source_group_id||n.source_group_id&&"member_source_group_ids"in a&&Array.isArray(a.member_source_group_ids)&&a.member_source_group_ids.includes(n.source_group_id))&&(A=!0),A&&(r.push(a),s.add(a))}for(;r.length>0;){const a=r.shift(),A=i.get(a);if(A)for(const c of A)s.has(c)||(s.add(c),r.push(c))}return t.filter(a=>s.has(a))}var u_e=((t,e={})=>{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split("_").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=>{if(s==="toArray")return()=>(n.editCount=o.editCount,n);if(s==="editCount")return o.editCount;if(s==="subtree")return A=>u_e(ywi(n,A),e);if(s==="insert")return A=>{const c=A.type;if(!c)throw new Error("insert requires an element with a type");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts&&(R9[c]??U4).parse(u),n.push(u),o.editCount++,u};if(s==="insertAll")return A=>A.map(c=>i.insert(c));const a=s;return{get:A=>n.find(c=>c.type===a&&c[`${a}_id`]===A),getUsing:A=>{const c=Object.keys(A);if(c.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const l=c[0],u=l.replace("_id",""),g=n.find(h=>h.type===u&&h[l]===A[l]);return g?n.find(h=>h.type===a&&h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=>{const c=Object.keys(A);return n.find(l=>l.type===a&&c.every(u=>l[u]===A[u]))},list:A=>{const c=A?Object.keys(A):[];return n.filter(l=>l.type===a&&c.every(u=>l[u]===A[u]))},insert:A=>{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts&&(R9[a]??U4).parse(l),n.push(l),o.editCount++,l},delete:A=>{const c=n.find(l=>l[`${a}_id`]===A);c&&(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=>{const l=n.find(u=>u.type===a&&u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=>{if(a==="source_component")return n.find(c=>c.type==="source_component"&&c.name===A.replace(/\./g,""));if(a==="pcb_port"||a==="source_port"||a==="schematic_port"){const[c,l]=A.replace(/\./g,"").split(/[\s\>]+/),u=n.find(h=>h.type==="source_component"&&h.name===c);if(!u)return null;const g=n.find(h=>h.type==="source_port"&&h.source_component_id===u.source_component_id&&(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a==="source_port")return g;if(a==="pcb_port")return n.find(h=>h.type==="pcb_port"&&h.source_port_id===g.source_port_id);if(a==="schematic_port")return n.find(h=>h.type==="schematic_port"&&h.source_port_id===g.source_port_id)}}}}});return i});u_e.unparsed=u_e;var MT=u_e;function WWe(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var W0n=((t,e={})=>{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const s of t){const a=s.type,A=s[`${a}_id`];if(!A)continue;const c=Number.parseInt(A.split("_").pop()||"");Number.isNaN(c)||(n.counts[a]=Math.max(n.counts[a]??0,c))}const i=e.indexConfig||{},r=n.indexes;if(i.byId&&(r.byId=new Map),i.byType&&(r.byType=new Map),i.byRelation&&(r.byRelation=new Map),i.bySubcircuit&&(r.bySubcircuit=new Map),i.byCustomField&&i.byCustomField.length>0){r.byCustomField=new Map;for(const s of i.byCustomField)r.byCustomField.set(s,new Map)}for(const s of t){if(i.byId){const a=WWe(s);r.byId.set(a,s)}if(i.byType){const a=r.byType.get(s.type)||[];a.push(s),r.byType.set(s.type,a)}if(i.byRelation){const a=Object.entries(s);for(const[A,c]of a)if(A.endsWith("_id")&&A!==`${s.type}_id`&&typeof c=="string"){const l=r.byRelation.get(A)||new Map,u=l.get(c)||[];u.push(s),l.set(c,u),r.byRelation.set(A,l)}}if(i.bySubcircuit&&"subcircuit_id"in s){const a=s.subcircuit_id;if(a&&typeof a=="string"){const A=r.bySubcircuit.get(a)||[];A.push(s),r.bySubcircuit.set(a,A)}}if(i.byCustomField&&r.byCustomField){for(const a of i.byCustomField)if(a in s){const A=s[a];if(A!==void 0&&(typeof A=="string"||typeof A=="number")){const c=String(A),l=r.byCustomField.get(a),u=l.get(c)||[];u.push(s),l.set(c,u)}}}}t._internal_store_indexed=n}return new Proxy({},{get:(i,r)=>{if(r==="toArray")return()=>(t.editCount=n.editCount,t);if(r==="editCount")return n.editCount;const s=r;return{get:a=>{const A=e.indexConfig||{};return A.byId&&n.indexes.byId?n.indexes.byId.get(`${s}:${a}`)||null:A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(l=>l[`${s}_id`]===a)||null:t.find(c=>c.type===s&&c[`${s}_id`]===a)||null},getUsing:a=>{const A=e.indexConfig||{},c=Object.keys(a);if(c.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const l=c[0],u=l.replace("_id","");if(A.byRelation&&n.indexes.byRelation){const h=n.indexes.byRelation.get(l);if(h){const p=(h.get(a[l])||[]).find(_=>_.type===u);if(!p)return null;const m=p[`${s}_id`];return A.byId&&n.indexes.byId?n.indexes.byId.get(`${s}:${m}`)||null:A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(f=>f[`${s}_id`]===m)||null:t.find(_=>_.type===s&&_[`${s}_id`]===m)||null}}const g=t.find(h=>h.type===u&&h[l]===a[l]);return g&&t.find(h=>h.type===s&&h[`${s}_id`]===g[`${s}_id`])||null},getWhere:a=>{const A=e.indexConfig||{},c=Object.keys(a);if(c.length===1&&A.byCustomField&&n.indexes.byCustomField){const l=c[0],u=n.indexes.byCustomField.get(l);if(u){const g=String(a[l]);return(u.get(g)||[]).find(d=>d.type===s)||null}}if("subcircuit_id"in a&&A.bySubcircuit&&n.indexes.bySubcircuit){const l=a.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).find(g=>g.type===s&&c.every(h=>g[h]===a[h]))||null}return A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(u=>c.every(g=>u[g]===a[g]))||null:t.find(l=>l.type===s&&c.every(u=>l[u]===a[u]))||null},list:a=>{const A=e.indexConfig||{},c=a?Object.keys(a):[];if(c.length===0&&A.byType&&n.indexes.byType)return n.indexes.byType.get(s)||[];if(c.length===1&&c[0]==="subcircuit_id"&&A.bySubcircuit&&n.indexes.bySubcircuit){const u=a.subcircuit_id;return(n.indexes.bySubcircuit.get(u)||[]).filter(h=>h.type===s)}let l;return A.byType&&n.indexes.byType?l=n.indexes.byType.get(s)||[]:l=t.filter(u=>u.type===s),c.length>0?l.filter(u=>c.every(g=>u[g]===a[g])):l},insert:a=>{n.counts[s]??=-1,n.counts[s]++;const A=n.counts[s],c={type:s,[`${s}_id`]:`${s}_${A}`,...a};e.validateInserts&&(R9[s]??U4).parse(c),t.push(c),n.editCount++;const l=e.indexConfig||{};if(l.byId&&n.indexes.byId){const u=WWe(c);n.indexes.byId.set(u,c)}if(l.byType&&n.indexes.byType){const u=n.indexes.byType.get(s)||[];u.push(c),n.indexes.byType.set(s,u)}if(l.byRelation&&n.indexes.byRelation){const u=Object.entries(c);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${c.type}_id`&&typeof h=="string"){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.push(c),d.set(h,p),n.indexes.byRelation.set(g,d)}}if(l.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c){const u=c.subcircuit_id;if(u&&typeof u=="string"){const g=n.indexes.bySubcircuit.get(u)||[];g.push(c),n.indexes.bySubcircuit.set(u,g)}}if(l.byCustomField&&n.indexes.byCustomField){for(const u of l.byCustomField)if(u in c){const g=c[u];if(g!==void 0&&(typeof g=="string"||typeof g=="number")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.push(c),d.set(h,p)}}}return c},delete:a=>{const A=e.indexConfig||{};let c;if(A.byId&&n.indexes.byId?c=n.indexes.byId.get(`${s}:${a}`):A.byType&&n.indexes.byType?c=(n.indexes.byType.get(s)||[]).find(g=>g[`${s}_id`]===a):c=t.find(u=>u[`${s}_id`]===a),!c)return;const l=t.indexOf(c);if(l>=0&&(t.splice(l,1),n.editCount++),A.byId&&n.indexes.byId){const u=WWe(c);n.indexes.byId.delete(u)}if(A.byType&&n.indexes.byType){const g=(n.indexes.byType.get(s)||[]).filter(h=>h[`${s}_id`]!==a);n.indexes.byType.set(s,g)}if(A.byRelation&&n.indexes.byRelation)for(const[u,g]of n.indexes.byRelation.entries())for(const[h,d]of g.entries()){const p=d.filter(m=>m!==c);p.length===0?g.delete(h):g.set(h,p)}if(A.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c){const u=c.subcircuit_id;if(u){const h=(n.indexes.bySubcircuit.get(u)||[]).filter(d=>d!==c);h.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,h)}}if(A.byCustomField&&n.indexes.byCustomField)for(const u of n.indexes.byCustomField.values())for(const[g,h]of u.entries()){const d=h.filter(p=>p!==c);d.length===0?u.delete(g):u.set(g,d)}},update:(a,A)=>{const c=e.indexConfig||{};let l;if(c.byId&&n.indexes.byId?l=n.indexes.byId.get(`${s}:${a}`):c.byType&&n.indexes.byType?l=(n.indexes.byType.get(s)||[]).find(g=>g[`${s}_id`]===a):l=t.find(u=>u.type===s&&u[`${s}_id`]===a),!l)return null;if(c.byRelation&&n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${l.type}_id`&&typeof h=="string"&&g in A&&A[g]!==h){const d=n.indexes.byRelation.get(g);if(d){const m=(d.get(h)||[]).filter(_=>_!==l);m.length===0?d.delete(h):d.set(h,m)}}}if(c.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in l&&"subcircuit_id"in A){const u=l.subcircuit_id,g=A.subcircuit_id;if(u!==g){const d=(n.indexes.bySubcircuit.get(u)||[]).filter(p=>p!==l);d.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,d)}}if(c.byCustomField&&n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l&&u in A&&l[u]!==A[u]){const g=n.indexes.byCustomField.get(u);if(g){const h=String(l[u]),p=(g.get(h)||[]).filter(m=>m!==l);p.length===0?g.delete(h):g.set(h,p)}}}if(Object.assign(l,A),n.editCount++,c.byRelation&&n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${l.type}_id`&&typeof h=="string"&&g in A){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p),n.indexes.byRelation.set(g,d))}}if(c.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in l&&"subcircuit_id"in A){const u=l.subcircuit_id;if(u&&typeof u=="string"){const g=n.indexes.bySubcircuit.get(u)||[];g.includes(l)||(g.push(l),n.indexes.bySubcircuit.set(u,g))}}if(c.byCustomField&&n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l&&u in A){const g=l[u];if(g!==void 0&&(typeof g=="string"||typeof g=="number")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p))}}}return l},select:a=>{if(s==="source_component")return t.find(A=>A.type==="source_component"&&A.name===a.replace(/\./g,""))||null;if(s==="pcb_port"||s==="source_port"||s==="schematic_port"){const[A,c]=a.replace(/\./g,"").split(/[\s\>]+/),l=t.find(g=>g.type==="source_component"&&g.name===A);if(!l)return null;const u=t.find(g=>g.type==="source_port"&&g.source_component_id===l.source_component_id&&(g.name===c||(g.port_hints??[]).includes(c)));if(!u)return null;if(s==="source_port")return u;if(s==="pcb_port")return t.find(g=>g.type==="pcb_port"&&g.source_port_id===u.source_port_id)||null;if(s==="schematic_port")return t.find(g=>g.type==="schematic_port"&&g.source_port_id===u.source_port_id)||null}return null}}}})});W0n.unparsed=W0n;var j0n=(t,e)=>({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),RZ=(t,e,n)=>{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},$0n=(t,e,n,o,i)=>{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=>({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=>u.x)),minY:Math.min(...l.map(u=>u.y)),maxX:Math.max(...l.map(u=>u.x)),maxY:Math.max(...l.map(u=>u.y))}},xwi=(t,e,n,o,i)=>{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=Math.hypot(r*A,s*c),u=Math.hypot(r*c,s*A);return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},Ewi=(t,e,n,o,i)=>{const r=Math.min(n,o)/2,s=Math.max(n,o)/2-r,a=i*Math.PI/180,A=n>=o?{x:s,y:0}:{x:0,y:s},c={x:A.x*Math.cos(a)-A.y*Math.sin(a),y:A.x*Math.sin(a)+A.y*Math.cos(a)},l=Math.abs(c.x)+r,u=Math.abs(c.y)+r;return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},g_e=t=>t.length===0?null:{minX:Math.min(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxX:Math.max(...t.map(e=>e.x)),maxY:Math.max(...t.map(e=>e.y))},jWe=t=>Array.isArray(t)?t.flatMap(e=>!e||typeof e!="object"?[]:"x"in e&&"y"in e&&typeof e.x=="number"&&typeof e.y=="number"?[{x:e.x,y:e.y}]:"start"in e&&"end"in e?[e.start,e.end].filter(o=>!!(o&&typeof o=="object"&&"x"in o&&"y"in o&&typeof o.x=="number"&&typeof o.y=="number")):[]):[],q0n=t=>{if(!t.type.startsWith("pcb_"))return null;if(t.type==="pcb_smtpad"&&t.shape==="polygon"&&Array.isArray(t.points))return g_e(t.points);if(t.type==="pcb_hole"&&t.hole_shape==="circle")return RZ(t.x,t.y,t.hole_diameter);if(t.type==="pcb_plated_hole"){let u;if("outer_diameter"in t&&typeof t.outer_diameter=="number"?u=RZ(t.x,t.y,t.outer_diameter):"hole_diameter"in t&&typeof t.hole_diameter=="number"&&(u=RZ(t.x,t.y,t.hole_diameter)),(t.shape==="oval"||t.shape==="pill")&&typeof t.outer_width=="number"&&typeof t.outer_height=="number"&&(u=(t.shape==="pill"?Ewi:xwi)(t.x,t.y,t.outer_width,t.outer_height,t.ccw_rotation??0)),"rect_pad_width"in t&&typeof t.rect_pad_width=="number"&&"rect_pad_height"in t&&typeof t.rect_pad_height=="number"){const g=$0n(t.x,t.y,t.rect_pad_width,t.rect_pad_height,"rect_ccw_rotation"in t?t.rect_ccw_rotation??0:0);u=u?j0n(u,g):g}if("hole_diameter"in t&&typeof t.hole_diameter=="number"){const g=RZ(t.x+("hole_offset_x"in t?t.hole_offset_x??0:0),t.y+("hole_offset_y"in t?t.hole_offset_y??0:0),t.hole_diameter);u=u?j0n(u,g):g}if(u)return u}const e=t,n=g_e(jWe(e.route));if(n)return n;const o=g_e(jWe(e.outline));if(o)return o;const i=g_e(jWe(e.points));if(i)return i;let r,s,a,A;"x"in t&&"y"in t&&(r=Number(t.x),s=Number(t.y)),"outer_diameter"in t&&(a=Number(t.outer_diameter),A=Number(t.outer_diameter)),"width"in t&&(a=Number(t.width)),"height"in t&&(A=Number(t.height)),"center"in t&&t.center&&typeof t.center=="object"&&"x"in t.center&&"y"in t.center&&(r=Number(t.center.x),s=Number(t.center.y));let c=0;if("rotation"in t&&typeof t.rotation=="number"&&(c=t.rotation),"ccw_rotation"in t&&typeof t.ccw_rotation=="number"&&(c=t.ccw_rotation),r!==void 0&&s!==void 0)return a!==void 0&&A!==void 0?c?$0n(r,s,a,A,c):{minX:r-a/2,minY:s-A/2,maxX:r+a/2,maxY:s+A/2}:"radius"in t&&typeof t.radius=="number"?RZ(r,s,t.radius*2):{minX:r,minY:s,maxX:r,maxY:s};const l=[e.anchor_position,e.position].filter(u=>!!(u&&typeof u=="object"&&"x"in u&&"y"in u&&typeof u.x=="number"&&typeof u.y=="number")).at(0);return l?{minX:l.x,minY:l.y,maxX:l.x,maxY:l.y}:null},Bwi=(t,e)=>t.filter(n=>{const o=q0n(n);return o?o.minX<=e.maxX&&o.maxX>=e.minX&&o.minY<=e.maxY&&o.maxY>=e.minY:!1}),bwi="TscircuitAlphabet",X0n="data-tscircuit-alphabet-font";function $We(t){const e=o=>({...o,children:(o.children??[]).filter(i=>!(X0n in(i.attributes??{}))).map(e)}),n=e(t);return n.children.push({name:"style",type:"element",value:"",attributes:{[X0n]:"",type:"text/css"},children:[{name:"",type:"text",value:`@font-face { font-family: '${bwi}'; src: url('data:font/ttf;base64,${EYt}') format('truetype'); font-weight: normal; font-style: normal; }`,attributes:{},children:[]}]}),Cbt(n)}var Z0n=vc("circuit-to-svg");Z0n.extend("pcb"),Z0n.extend("sch");var $h={"3d_viewer":{background_bottom:"rgb(102, 102, 128)",background_top:"rgb(204, 204, 230)",board:"rgb(51, 43, 23)",copper:"rgb(179, 156, 0)",silkscreen_bottom:"rgb(230, 230, 230)",silkscreen_top:"rgb(230, 230, 230)",soldermask:"rgb(20, 51, 36)",solderpaste:"rgb(128, 128, 128)"},board:{anchor:"rgb(255, 38, 226)",aux_items:"rgb(255, 255, 255)",b_adhes:"rgb(0, 0, 132)",b_crtyd:"rgb(255, 38, 226)",b_fab:"rgb(88, 93, 132)",b_mask:"rgba(2, 255, 238, 0.400)",b_paste:"rgb(0, 194, 194)",b_silks:"rgb(232, 178, 167)",background:"rgb(0, 16, 35)",cmts_user:"rgb(89, 148, 220)",copper:{b:"rgb(77, 127, 196)",f:"rgb(200, 52, 52)",in1:"rgb(127, 200, 127)",in10:"rgb(237, 124, 51)",in11:"rgb(91, 195, 235)",in12:"rgb(247, 111, 142)",in13:"rgb(167, 165, 198)",in14:"rgb(40, 204, 217)",in15:"rgb(232, 178, 167)",in16:"rgb(242, 237, 161)",in17:"rgb(237, 124, 51)",in18:"rgb(91, 195, 235)",in19:"rgb(247, 111, 142)",in2:"rgb(206, 125, 44)",in20:"rgb(167, 165, 198)",in21:"rgb(40, 204, 217)",in22:"rgb(232, 178, 167)",in23:"rgb(242, 237, 161)",in24:"rgb(237, 124, 51)",in25:"rgb(91, 195, 235)",in26:"rgb(247, 111, 142)",in27:"rgb(167, 165, 198)",in28:"rgb(40, 204, 217)",in29:"rgb(232, 178, 167)",in3:"rgb(79, 203, 203)",in30:"rgb(242, 237, 161)",in4:"rgb(219, 98, 139)",in5:"rgb(167, 165, 198)",in6:"rgb(40, 204, 217)",in7:"rgb(232, 178, 167)",in8:"rgb(242, 237, 161)",in9:"rgb(141, 203, 129)"},cursor:"rgb(255, 255, 255)",drc:"rgb(194, 194, 194)",drc_error:"rgba(215, 91, 107, 0.800)",drc_exclusion:"rgb(255, 255, 255)",drc_warning:"rgba(255, 208, 66, 0.902)",dwgs_user:"rgb(194, 194, 194)",eco1_user:"rgb(180, 219, 210)",eco2_user:"rgb(216, 200, 82)",edge_cuts:"rgb(208, 210, 205)",f_adhes:"rgb(132, 0, 132)",f_crtyd:"rgb(255, 0, 245)",f_fab:"rgb(175, 175, 175)",f_mask:"rgba(216, 100, 255, 0.400)",f_paste:"rgba(180, 160, 154, 0.902)",f_silks:"rgb(242, 237, 161)",footprint_text_back:"rgb(0, 0, 132)",footprint_text_front:"rgb(194, 194, 194)",footprint_text_invisible:"rgb(132, 132, 132)",grid:"rgb(132, 132, 132)",grid_axes:"rgb(194, 194, 194)",margin:"rgb(255, 38, 226)",microvia:"rgb(0, 132, 132)",no_connect:"rgb(0, 0, 132)",pad_back:"rgb(77, 127, 196)",pad_front:"rgb(200, 52, 52)",pad_plated_hole:"rgb(194, 194, 0)",pad_through_hole:"rgb(227, 183, 46)",plated_hole:"rgb(26, 196, 210)",ratsnest:"rgba(245, 255, 213, 0.702)",select_overlay:"rgb(4, 255, 67)",through_via:"rgb(236, 236, 236)",user_1:"rgb(194, 194, 194)",user_2:"rgb(89, 148, 220)",user_3:"rgb(180, 219, 210)",user_4:"rgb(216, 200, 82)",user_5:"rgb(194, 194, 194)",user_6:"rgb(89, 148, 220)",user_7:"rgb(180, 219, 210)",user_8:"rgb(216, 200, 82)",user_9:"rgb(232, 178, 167)",via_blind_buried:"rgb(187, 151, 38)",via_hole:"rgb(227, 183, 46)",via_micro:"rgb(0, 132, 132)",via_through:"rgb(236, 236, 236)",worksheet:"rgb(200, 114, 171)"},gerbview:{axes:"rgb(0, 0, 132)",background:"rgb(0, 0, 0)",dcodes:"rgb(255, 255, 255)",grid:"rgb(132, 132, 132)",layers:["rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)","rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)"],negative_objects:"rgb(132, 132, 132)",worksheet:"rgb(0, 0, 132)"},meta:{filename:"kicad_2020",name:"KiCad 2020",version:2},simulation_palette:["#1f77b4","#d62728","#2ca02c","#ff7f0e","#9467bd","#17becf","#8c564b","#e377c2","#7f7f7f","#bcbd22"],palette:["rgb(132, 0, 0)","rgb(194, 194, 0)","rgb(194, 0, 194)","rgb(194, 0, 0)","rgb(0, 132, 132)","rgb(0, 132, 0)","rgb(0, 0, 132)","rgb(132, 132, 132)","rgb(132, 0, 132)","rgb(194, 194, 194)","rgb(132, 0, 132)","rgb(132, 0, 0)","rgb(132, 132, 0)","rgb(194, 194, 194)","rgb(0, 0, 132)","rgb(0, 132, 0)"],schematic:{aux_items:"rgb(46, 46, 46)",background:"rgb(245, 241, 237)",brightened:"rgb(255, 0, 255)",bus:"rgb(0, 0, 132)",bus_junction:"rgb(0, 0, 132)",component_body:"rgb(255, 255, 194)",component_outline:"rgb(132, 0, 0)",cursor:"rgb(15, 15, 15)",erc_error:"rgba(230, 9, 13, 0.800)",erc_warning:"rgba(209, 146, 0, 0.800)",fields:"rgb(132, 0, 132)",grid:"rgb(181, 181, 181)",grid_axes:"rgb(0, 0, 132)",hidden:"rgb(194, 194, 194)",junction:"rgb(0, 150, 0)",label_global:"rgb(132, 0, 0)",label_background:"rgba(255, 255, 255, 0.6)",label_hier:"rgb(114, 86, 0)",label_local:"rgb(15, 15, 15)",net_name:"rgb(132, 132, 132)",no_connect:"rgb(132, 0, 0)",note:"rgb(0, 0, 194)",override_item_colors:!1,pin:"rgb(132, 0, 0)",pin_name:"rgb(0, 100, 100)",pin_number:"rgb(169, 0, 0)",reference:"rgb(0, 100, 100)",shadow:"rgba(102, 179, 255, 0.800)",sheet:"rgb(132, 0, 0)",sheet_background:"rgba(253, 255, 231, 0.000)",sheet_fields:"rgb(132, 0, 132)",sheet_filename:"rgb(114, 86, 0)",sheet_label:"rgb(0, 100, 100)",sheet_name:"rgb(0, 100, 100)",table:"rgb(102, 102, 102)",value:"rgb(0, 100, 100)",wire:"rgb(0, 150, 0)",wire_crossing:"rgb(30, 180, 30)",worksheet:"rgb(132, 0, 0)"}};$h.board.user_2,$h.board.user_2,$h.board.user_2,$h.board.user_2,$h.board.user_2;var eun=.94,d_e=.09/2,Swi=Object.fromEntries(Object.entries(Ov).map(([t,e])=>{const n=e.flatMap(i=>[i.x1,i.x2]),o=e.flatMap(i=>[i.y1,i.y2]);return[t,e.length?{minX:Math.min(...n)-d_e,maxX:Math.max(...n)+d_e,minY:-(Math.max(...o)+d_e)*eun,maxY:-(Math.min(...o)-d_e)*eun}:null]}));Math.round(Math.max(...Object.values(Swi).map(t=>t?t.maxX-t.minX:0))*1e3)/1e3;function qWe(t){return t.find(n=>n.type==="project_software_metadata"||n.type==="source_project_metadata")?.software_used_string}var Qwi={version:"0.0.431"},XWe=Qwi.version;function vwi(t,e="error_text_overlay"){const n=t.filter(r=>r.type.endsWith("_error"));if(n.length===0)return null;const o=n.map(r=>r.message).filter(r=>!!r);return o.length===0?null:{name:"text",type:"element",value:"",attributes:{x:"10",y:"20",fill:"red","font-family":"monospace","font-size":"12px","data-type":e,"data-layer":"global"},children:o.map((r,s)=>({name:"tspan",type:"element",value:"",attributes:{x:"10",dy:s===0?"0":"1.2em"},children:[{type:"text",value:r,name:"",attributes:{},children:[]}]}))}}var wwi={pin_number:.15,negated_pin_number:.15*.8,reference_designator:.18,manufacturer_number:.18,net_label:.18,error:.05},DP=(t,e)=>e??wwi[t],PE=(t,e,n)=>Math.abs(t.a)*DP(e,n);function Pwi(t){const{minX:e,minY:n,maxX:o,maxY:i}=t.bounds,r=t.cellSize??1,s=t.labelCells??!1,a=[],A=(c,l)=>{const[u,g]=er(t.transform,[c,l]);return{x:u,y:g}};for(let c=Math.floor(e);c<=Math.ceil(o);c+=r){const l=A(c,n),u=A(c,i);a.push({name:"line",type:"element",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:$h.schematic.grid,"stroke-width":(.01*Math.abs(t.transform.a)).toString(),"stroke-opacity":"0.5"}})}for(let c=Math.floor(n);c<=Math.ceil(i);c+=r){const l=A(e,c),u=A(o,c);a.push({name:"line",type:"element",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:$h.schematic.grid,"stroke-width":(.01*Math.abs(t.transform.a)).toString(),"stroke-opacity":"0.5"}})}if(s){const c=(l,u)=>r<=.1?`${l.toFixed(1)},${u.toFixed(1)}`:`${l},${u}`;for(let l=Math.floor(e);l<=Math.ceil(o);l+=r)for(let u=Math.floor(n);u<=Math.ceil(i);u+=r){const g=A(l,u);a.push({name:"text",type:"element",attributes:{x:(g.x-2.5).toString(),y:(g.y-5).toString(),fill:$h.schematic.grid,"font-size":(r/5*Math.abs(t.transform.a)).toString(),"fill-opacity":"0.5","text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif"},children:[{type:"text",value:c(l,u),name:"",attributes:{},children:[]}]})}}return{name:"g",value:"",type:"element",attributes:{class:"grid sch-grid"},children:a}}function Mwi(t){const{points:e,transform:n}=t,o=[];for(const i of e){const[r,s]=er(n,[i.x-.1,i.y-.1]),[a,A]=er(n,[i.x+.1,i.y+.1]),[c,l]=er(n,[i.x-.1,i.y+.1]),[u,g]=er(n,[i.x+.1,i.y-.1]);o.push({name:"path",type:"element",attributes:{d:`M${r},${s} L${a},${A} M${c},${l} L${u},${g}`,stroke:$h.schematic.grid,"stroke-width":(.02*Math.abs(n.a)).toString(),"stroke-opacity":"0.7"}});const[h,d]=er(n,[i.x+.15,i.y-.15]);o.push({name:"text",type:"element",attributes:{x:h.toString(),y:d.toString(),fill:$h.schematic.grid,"font-size":(.1*Math.abs(n.a)).toString(),"fill-opacity":"0.7","text-anchor":"start","font-family":"sans-serif","dominant-baseline":"middle"},children:[{type:"text",value:i.label||`(${i.x},${i.y})`,name:"",attributes:{},children:[]}]})}return{name:"g",value:"",type:"element",attributes:{class:"labeled-points sch-labeled-points"},children:o}}function Dwi(t){return t.reduce((e,n)=>e?n.sheet_index===void 0?e:e.sheet_index===void 0||n.sheet_index<e.sheet_index?n:e:n,void 0)}var tun={0:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},1:{width:13,height:27,ascent:22,descent:5,left:-3,right:9},2:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},3:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},4:{width:13,height:27,ascent:22,descent:5,left:0,right:12},5:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},6:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},7:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},8:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},9:{width:13,height:27,ascent:22,descent:5,left:-1,right:12}," ":{width:7,height:27,ascent:22,descent:5,left:0,right:0},"!":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},'"':{width:9,height:27,ascent:22,descent:5,left:-1,right:7},"#":{width:13,height:27,ascent:22,descent:5,left:0,right:13},$:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"%":{width:21,height:27,ascent:22,descent:5,left:-1,right:20},"&":{width:16,height:27,ascent:22,descent:5,left:-1,right:15},"'":{width:5,height:27,ascent:22,descent:5,left:-1,right:3},"(":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},")":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"*":{width:9,height:27,ascent:22,descent:5,left:-1,right:8},"+":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},",":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"-":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},".":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"/":{width:7,height:27,ascent:22,descent:5,left:0,right:7},":":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},";":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},"<":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},"=":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},">":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},"?":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},"@":{width:24,height:27,ascent:22,descent:5,left:-1,right:23},A:{width:16,height:27,ascent:22,descent:5,left:0,right:16},B:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},C:{width:17,height:27,ascent:22,descent:5,left:-1,right:16},D:{width:17,height:27,ascent:22,descent:5,left:-2,right:16},E:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},F:{width:15,height:27,ascent:22,descent:5,left:-2,right:14},G:{width:19,height:27,ascent:22,descent:5,left:-1,right:17},H:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},I:{width:7,height:27,ascent:22,descent:5,left:-2,right:5},J:{width:12,height:27,ascent:22,descent:5,left:-1,right:10},K:{width:16,height:27,ascent:22,descent:5,left:-2,right:16},L:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},M:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},N:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},O:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},P:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},Q:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},R:{width:17,height:27,ascent:22,descent:5,left:-2,right:17},S:{width:16,height:27,ascent:22,descent:5,left:-1,right:15},T:{width:15,height:27,ascent:22,descent:5,left:-1,right:14},U:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},V:{width:16,height:27,ascent:22,descent:5,left:0,right:16},W:{width:23,height:27,ascent:22,descent:5,left:0,right:22},X:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Y:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Z:{width:15,height:27,ascent:22,descent:5,left:0,right:14},"[":{width:7,height:27,ascent:22,descent:5,left:-2,right:6},"\\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},"]":{width:7,height:27,ascent:22,descent:5,left:0,right:5},"^":{width:11,height:27,ascent:22,descent:5,left:-1,right:11},_:{width:13,height:27,ascent:22,descent:5,left:0,right:14},"`":{width:8,height:27,ascent:22,descent:5,left:-1,right:5},a:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},b:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},c:{width:12,height:27,ascent:22,descent:5,left:-1,right:12},d:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},e:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},f:{width:7,height:27,ascent:22,descent:5,left:0,right:8},g:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},h:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},i:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},j:{width:5,height:27,ascent:22,descent:5,left:1,right:4},k:{width:12,height:27,ascent:22,descent:5,left:-2,right:12},l:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},m:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},n:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},o:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},p:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},q:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},r:{width:8,height:27,ascent:22,descent:5,left:-2,right:8},s:{width:12,height:27,ascent:22,descent:5,left:-1,right:11},t:{width:7,height:27,ascent:22,descent:5,left:0,right:6},u:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},v:{width:12,height:27,ascent:22,descent:5,left:0,right:12},w:{width:17,height:27,ascent:22,descent:5,left:0,right:17},x:{width:12,height:27,ascent:22,descent:5,left:0,right:12},y:{width:12,height:27,ascent:22,descent:5,left:0,right:12},z:{width:12,height:27,ascent:22,descent:5,left:0,right:11},"{":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"|":{width:6,height:27,ascent:22,descent:5,left:-2,right:4},"}":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},"~":{width:14,height:27,ascent:22,descent:5,left:-1,right:13}},TZ=t=>{if(!t)return 0;let e=0;for(const n of t){const o=tun[n];o?e+=o.width:e+=tun["?"].width}return e/27},nun=.65,oun=.08;function h_e(t){return TZ(t.text||"")+(t.display_superscript?oun+TZ(t.display_superscript)*nun:0)}function ZWe(t,e,n,o="central"){const i=[{type:"text",value:t,name:"",attributes:{},children:[]}];return e&&i.push({type:"element",name:"tspan",value:"",attributes:{class:"sch-net-label-superscript","font-size":`${n*nun}px`,dx:`${n*oun}`,dy:`${-n*(o==="ideographic"?.5:.25)}`},children:[{type:"text",value:e,name:"",attributes:{},children:[]}]}),i}var SU=t=>{switch(t){case"top":return{x:0,y:-1};case"bottom":return{x:0,y:1};case"left":return{x:1,y:0};case"right":return{x:-1,y:0}}throw new Error(`Invalid side: ${t}`)},NP=.3,QU=.3,vU=.06,iun=.2,run=t=>({"data-circuit-json-type":"schematic_net_label","data-schematic-net-label-id":t.schematic_net_label_id}),Nwi={top_left:"start",top_right:"end",middle_left:"start",middle_right:"end",bottom_left:"start",bottom_right:"end",center:"middle",middle_top:"middle",middle_bottom:"middle"},sun={top_left:"hanging",top_right:"hanging",bottom_left:"ideographic",bottom_right:"ideographic",center:"middle",middle_left:"middle",middle_right:"middle",middle_top:"hanging",middle_bottom:"ideographic"};function Rwi(t){return{left:180,top:90,bottom:-90,right:0}[t]??0}function Twi(t,e,n){const o=n+NP*2+vU*t.text.length+QU,i=SU(t.anchor_side);return t.anchor_position??{x:t.center.x-i.x*o*e/2,y:t.center.y-i.y*o*e/2}}var kwi=(t,e)=>{const n=t<0?t+2*Math.PI:t,o=e<0?e+2*Math.PI:e;let i=Math.abs(n-o);return i>Math.PI&&(i=2*Math.PI-i),i},aun=({schPorts:t,symbol:e,schComponent:n})=>{const o=t.map(a=>{const A=a.center.x-n.center.x,c=a.center.y-n.center.y;return{port:a,angle:Math.atan2(c,A)}}),i=e.ports.map(a=>{const A=a.x-e.center.x,c=a.y-e.center.y;return{port:a,angle:Math.atan2(c,A)}});o.sort((a,A)=>a.angle-A.angle),i.sort((a,A)=>a.angle-A.angle);const r=[],s=new Set;for(const a of o){let A=null;for(const c of i){if(s.has(c.port))continue;const l=kwi(a.angle,c.angle);(A===null||l<A.angleDiff)&&(A={symbolPort:c.port,angleDiff:l})}A&&A.angleDiff<Math.PI/4&&(r.push({schPort:a.port,symbolPort:A.symbolPort}),s.add(A.symbolPort))}return r};function Aun(t,e,n,o){const i=Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2),s=Math.sqrt((o.x-e.x)**2+(o.y-e.y)**2)/i,a=e.x-s*t.x,A=e.y-s*t.y,c=PT(a,A),l=zWe(s,s);return pf(c,l)}function Fwi(t){const e=[],n=new Map,o=new Map;let i=null;for(const r of t)if(r.type==="schematic_component")e.push(r);else if(r.type==="schematic_port"&&r.schematic_component_id){const s=n.get(r.schematic_component_id)??[];s.push(r),n.set(r.schematic_component_id,s)}else r.type==="source_component"&&o.set(r.source_component_id,r);for(const r of e){const s=Lwi({component:r,schematicPorts:n.get(r.schematic_component_id)??[],sourceComponent:r.source_component_id?o.get(r.source_component_id):void 0});s&&(i=i?cun(i,s):s)}return i}function Lwi({component:t,schematicPorts:e,sourceComponent:n}){if(!t.symbol_name)return null;const o=Su[t.symbol_name];if(!o)return null;const i=aun({schPorts:e,symbol:o,schComponent:t});if(!i[0])return null;const r=Aun(i[1]?.symbolPort??o.center,i[1]?.schPort.center??t.center,i[0].symbolPort,i[0].schPort.center);let s=null;for(const a of o.primitives){if(a.type!=="text")continue;const A=Hwi({primitive:a,component:t,sourceComponent:n});if(!A)continue;const c=er(r,a),l=DP("reference_designator"),u=Owi({x:c.x,y:c.y,width:TZ(A)*l,height:l,anchor:a.anchor});s=s?cun(s,u):u}return s}function Hwi({primitive:t,component:e,sourceComponent:n}){return t.text==="{REF}"?n?.display_name??n?.name??"":t.text==="{VAL}"?e.symbol_display_value??"":""}function Owi({x:t,y:e,width:n,height:o,anchor:i}){let r=t,s=t,a=e-o/2,A=e+o/2;return i.includes("left")?s=t+n:i.includes("right")?r=t-n:(r=t-n/2,s=t+n/2),i.includes("top")?(a=e-o,A=e):i.includes("bottom")&&(a=e,A=e+o),{minX:r,minY:a,maxX:s,maxY:A}}function cun(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}var lun=(t,e)=>{if(t.column_widths&&t.column_widths.length>0&&t.row_heights&&t.row_heights.length>0){const l=u=>typeof u=="number"?u:u.endsWith("mm")?parseFloat(u):u.endsWith("in")?parseFloat(u)*25.4:parseFloat(u);return{column_widths:t.column_widths.map(l),row_heights:t.row_heights.map(l)}}const n=e.filter(l=>l.type==="schematic_table_cell"&&l.schematic_table_id===t.schematic_table_id);if(n.length===0)return{column_widths:[],row_heights:[]};const o=n.reduce((l,u)=>Math.max(l,u.end_column_index),-1)+1,i=n.reduce((l,u)=>Math.max(l,u.end_row_index),-1)+1,{cell_padding:r=.2}=t,s=new Array(o).fill(0),a=new Array(i).fill(0),A={},c={};for(const l of n){const u=DP("reference_designator",l.font_size),h=TZ(l.text??"")*u+2*r,d=u*1.2+2*r,p=`${l.start_row_index}-${l.start_column_index}`;A[p]=h,c[p]=d}for(let l=0;l<i;l++)for(let u=0;u<o;u++){const g=`${l}-${u}`;A[g]&&A[g]>s[u]&&(s[u]=A[g]),c[g]&&c[g]>a[l]&&(a[l]=c[g])}for(const l of n){if(l.start_column_index===l.end_column_index&&l.start_row_index===l.end_row_index)continue;const u=`${l.start_row_index}-${l.start_column_index}`,g=A[u],h=c[u];if(g===void 0||h===void 0)continue;let d=0;for(let m=l.start_column_index;m<=l.end_column_index;m++)d+=s[m];if(g>d){const _=(g-d)/(l.end_column_index-l.start_column_index+1);for(let f=l.start_column_index;f<=l.end_column_index;f++)s[f]+=_}let p=0;for(let m=l.start_row_index;m<=l.end_row_index;m++)p+=a[m];if(h>p){const _=(h-p)/(l.end_row_index-l.start_row_index+1);for(let f=l.start_row_index;f<=l.end_row_index;f++)a[f]+=_}}return{column_widths:s,row_heights:a}},Gwi=10.16,Ywi=1.1,DT=Gwi/Ywi,Uwi=297/DT,Kwi=210/DT,p_e=5/DT;function eje(t={}){const e=t.center??{x:0,y:0},n=t.sheet_width===void 0?Uwi:t.sheet_width/DT,o=t.sheet_height===void 0?Kwi:t.sheet_height/DT,i=e.x-n/2,r=e.x+n/2,s=e.y-o/2,a=e.y+o/2;return{center:e,width:n,height:o,minX:i,maxX:r,minY:s,maxY:a,innerMinX:i+p_e,innerMaxX:r-p_e,innerMinY:s+p_e,innerMaxY:a-p_e}}function Vwi(t,e=.5){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=.2;for(const c of t)if(c.type==="schematic_sheet"){const l=eje(c);A(l.center,{width:l.width,height:l.height},0)}else if(c.type==="schematic_component")A(c.center,c.size,0);else if(c.type==="schematic_port")A(c.center,{width:s,height:s},0);else if(c.type==="schematic_debug_object")c.shape==="rect"?A(c.center,c.size,0):c.shape==="line"&&(A(c.start,{width:.1,height:.1},0),A(c.end,{width:.1,height:.1},0));else if(c.type==="schematic_net_label"){const l=DP("net_label"),u=h_e(c),h=(u+NP*2+vU*(c.text?.length||0)+QU)*l,d=iun,p=Rwi(c.anchor_side)/180*Math.PI,m=Twi(c,l,u),_=SU(c.anchor_side),f={x:m.x+_.x*h/2,y:m.y+_.y*h/2};A(f,{width:h,height:d},p)}else if(c.type==="schematic_trace")for(const l of c.edges)A(l.from,{width:.1,height:.1},0),A(l.to,{width:.1,height:.1},0);else if(c.type==="schematic_text"){const u=DP("reference_designator",c.font_size)??.18,g=c.text??"",h=c.display_superscript;if(h){const d=g.split(`
`),p=Math.max(...d.map((x,E)=>h_e({text:x,display_superscript:E===d.length-1?h:void 0})))*u,m=c.anchor,_=m==="left"||m.endsWith("_left")?p/2:m==="right"||m.endsWith("_right")?-p/2:0,f=m==="top"||m.startsWith("top_")?0:m==="bottom"||m.startsWith("bottom_")?-u:-u/2,I=(d.length+.3)*u,C=-(f-.3*u+I/2),y=-(c.rotation??0)*Math.PI/180;A({x:c.position.x+_*Math.cos(y)-C*Math.sin(y),y:c.position.y+_*Math.sin(y)+C*Math.cos(y)},{width:p,height:I},y)}else{const d=g.length*u,p=u;A(c.position,{width:d,height:p},c.rotation??0)}}else if(c.type==="schematic_voltage_probe"){if(A(c.position,{width:.2,height:.4},0),c.name){const l=DP("net_label"),u=TZ(c.name)*l,g=l,h=.3,d=c.label_alignment??"top_right";let p=c.position.x,m=c.position.y;d.includes("top")?m+=h+g/2:d.includes("bottom")&&(m-=h+g/2),d.includes("right")?p+=h+u/2:d.includes("left")&&(p-=h+u/2),A({x:p,y:m},{width:u,height:g},0)}}else if(c.type==="schematic_box")A({x:c.x+c.width/2,y:c.y+c.height/2},{width:c.width,height:c.height},0);else if(c.type==="schematic_table"){const{column_widths:l,row_heights:u}=lun(c,t),g=l.reduce((I,C)=>I+C,0),h=u.reduce((I,C)=>I+C,0),d=c.anchor??"center";let p=c.anchor_position.x,m=c.anchor_position.y;d.includes("center")?p-=g/2:d.includes("right")&&(p-=g),d.includes("center")?m+=h/2:d.includes("bottom")&&(m+=h);const _=p+g/2,f=m-h/2;A({x:_,y:f},{width:g,height:h},0)}else if(c.type==="schematic_line")A({x:c.x1,y:c.y1},{width:.02,height:.02},0),A({x:c.x2,y:c.y2},{width:.02,height:.02},0);else if(c.type==="schematic_circle")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type==="schematic_rect")A(c.center,{width:c.width,height:c.height},c.rotation);else if(c.type==="schematic_arc")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type==="schematic_path"&&c.points&&c.points.length>0)for(const l of c.points)A(l,{width:.02,height:.02},0);Number.isFinite(n)||(n=-1,o=-1,i=1,r=1),n-=e,o-=e,i+=e,r+=e;const a=Fwi(t);return a&&(a.minX<n&&(n=a.minX-e),a.minY<o&&(o=a.minY-e),a.maxX>i&&(i=a.maxX+e),a.maxY>r&&(r=a.maxY+e)),{minX:n,minY:o,maxX:i,maxY:r};function A(c,l,u){const g=[{x:-l.width/2,y:-l.height/2},{x:l.width/2,y:-l.height/2},{x:l.width/2,y:l.height/2},{x:-l.width/2,y:l.height/2}];for(const h of g){const d=h.x*Math.cos(u)-h.y*Math.sin(u)+c.x,p=h.x*Math.sin(u)+h.y*Math.cos(u)+c.y;n=Math.min(n,d),o=Math.min(o,p),i=Math.max(i,d),r=Math.max(r,p)}}}function uun(t){if(t.type!=="element")throw new Error("Expected SVG root element to be of type 'element'");return t}function gun(t){return{...t,attributes:{...t.attributes??{}},children:t.children?.map(gun)??[]}}function m_e(t,e,n,o,i){const r=gun(t);return r.attributes={...r.attributes,x:f4(e),y:f4(n),width:f4(o),height:f4(i)},delete r.attributes.xmlns,r}function f4(t){return Number.isFinite(t)?Number.parseFloat(t.toFixed(6)).toString():"0"}var kZ="image/svg+xml";function zwi({schematicGraphic:t,viewport:e}){const n=Jwi(t);return{name:"g",type:"element",value:"",attributes:{class:"schematic-graphic","pointer-events":"none","data-circuit-json-type":"schematic_graphic","data-schematic-graphic-id":t.schematic_graphic_id,...t.schematic_sheet_id?{"data-schematic-sheet-id":t.schematic_sheet_id}:{}},children:[{name:"image",type:"element",value:"",attributes:{href:n,x:f4(e.x),y:f4(e.y),width:f4(e.width),height:f4(e.height),preserveAspectRatio:"xMidYMid meet",overflow:"hidden","pointer-events":"none"},children:[]}]}}function Jwi(t){const e=`Unable to render schematic graphic "${t.schematic_graphic_id}"`,{asset:n,svg_content:o}=t;if(!n){if(o!==void 0)return dun(o);throw new Error(`${e}: asset or svg_content is required`)}if(hun(n.mimetype)!==kZ)throw new Error(`${e}: asset.mimetype must be "${kZ}" (received ${JSON.stringify(n.mimetype)})`);const i=n.url.trim();if(i.toLowerCase().startsWith("data:"))return Wwi(i,e),i;if(o!==void 0)return dun(o);throw new Error(`${e}: asset.url must be an inline SVG data URL because circuit-to-svg cannot synchronously load ${JSON.stringify(n.url)}`)}function Wwi(t,e){const n=t.match(/^data:([^,]*),(.*)$/is);if(!n)throw new Error(`${e}: asset.url is not a valid SVG data URL`);const o=n[1].split(";").map(A=>A.trim());if(hun(o.shift()??"")!==kZ)throw new Error(`${e}: asset.url must use the "${kZ}" media type`);const r=n[2],s=o.findIndex(A=>A.toLowerCase()==="base64"),a=s!==-1;if(a&&s!==o.length-1)throw new Error(`${e}: asset.url must place "base64" as its final metadata token`);if(a){const A=r.replace(/\s+/g,"");if(!/^(?:[a-z\d+/]{4})*(?:[a-z\d+/]{2}==|[a-z\d+/]{3}=)?$/i.test(A))throw new Error(`${e}: asset.url is not a valid SVG data URL`);return}if(r.includes("#"))throw new Error(`${e}: asset.url must percent-encode "#" in a non-base64 SVG data URL`);try{decodeURIComponent(r)}catch(A){throw new Error(`${e}: asset.url is not a valid SVG data URL`,{cause:A})}}function dun(t){const e=new TextEncoder().encode(t);let n="";const o=32768;for(let i=0;i<e.length;i+=o)n+=String.fromCharCode(...e.subarray(i,i+o));return`data:${kZ};base64,${btoa(n)}`}function hun(t){return(t.split(";",1)[0]??"").trim().toLowerCase()}var c_=t=>Math.abs(t.a)*.02,tje=({text:t,realCenter:e,realToScreenTransform:n})=>{const o=er(n,e);return{type:"element",name:"text",value:"",attributes:{x:o.x.toString(),y:o.y.toString(),fill:"red","text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif","font-size":`${PE(n,"error")}px`},children:[{type:"text",value:t,name:"",attributes:{},children:[]}]}},jwi=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=>{if(!t.text)return[];const o=t.text.startsWith("N_"),i=o?t.text.slice(2):t.text,r=run(t),s=[],a=Su[t.symbol_name];if(!a){const O=tje({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e});return O.attributes={...O.attributes,...r},s.push(O),s}const A=a.primitives.filter(O=>O.type==="path"),c=a.primitives.filter(O=>O.type==="text"),l=a.primitives.filter(O=>O.type==="circle"),u=a.primitives.filter(O=>O.type==="box"),g={minX:Math.min(...A.flatMap(O=>O.points.map(U=>U.x))),maxX:Math.max(...A.flatMap(O=>O.points.map(U=>U.x))),minY:Math.min(...A.flatMap(O=>O.points.map(U=>U.y))),maxY:Math.max(...A.flatMap(O=>O.points.map(U=>U.y)))},h=DP("net_label"),p=h_e({...t,text:i})+NP*2+vU*i.length+QU,m=SU(t.anchor_side),_=t.anchor_position??{x:t.center.x-m.x*p*h/2,y:t.center.y-m.y*p*h/2},I=z0n(0/180*Math.PI),C={minX:Math.min(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.x):[])),maxX:Math.max(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.x):[])),minY:Math.min(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.y):[])),maxY:Math.max(...a.primitives.flatMap(O=>O.type==="path"?O.points.map(U=>U.y):[]))},y=a.ports?.[0]?{x:a.ports[0].x,y:a.ports[0].y}:{x:C.minX,y:(C.minY+C.maxY)/2},x=er(I,y),E=pf(PT(_.x-x.x,_.y-x.y),I,zWe(1)),[B,S]=er(pf(e,E),[g.minX,g.minY]),[Q,w]=er(pf(e,E),[g.maxX,g.maxY]),M=Math.abs(w-S),k=Math.min(S,w),R=Math.abs(Q-B),F=Math.min(B,Q);s.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay sch-net-label-overlay",...r,x:F.toString(),y:k.toString(),width:R.toString(),height:M.toString(),fill:"transparent"},children:[]});for(const O of A){const U=O.points.map((Y,W)=>{const[te,j]=er(pf(e,E),[Y.x,Y.y]);return`${W===0?"M":"L"} ${te} ${j}`}).join(" ");s.push({name:"path",type:"element",attributes:{class:"sch-net-label-symbol-path",...r,d:U+(O.closed?" Z":""),stroke:n.schematic.component_outline,fill:"none","stroke-width":`${c_(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}for(const O of c){const U=er(pf(e,E),O);let Y=O.text;Y==="{REF}"?Y=i||"":Y==="{VAL}"&&(Y=""),Math.abs(e.a);const W={x:U.x,y:U.y};s.push({name:"text",type:"element",attributes:{class:"sch-net-label-symbol-text",...r,x:W.x.toString(),y:W.y.toString(),fill:n.schematic.label_local,"font-family":"sans-serif","text-anchor":Nwi[O.anchor],"dominant-baseline":sun[O.anchor],"font-size":`${PE(e,"reference_designator")}px`,...o&&Y===i?{style:"text-decoration: overline;"}:{}},children:ZWe(Y,O.text==="{REF}"?t.display_superscript:void 0,PE(e,"reference_designator"),sun[O.anchor]),value:""})}for(const O of u){const U=er(pf(e,E),O),Y=pf(e,E).a;s.push({name:"rect",type:"element",attributes:{class:"sch-net-label-symbol-box",...r,x:U.x.toString(),y:U.y.toString(),width:(O.width*Y).toString(),height:(O.height*Y).toString(),fill:"red"},value:"",children:[]})}for(const O of l){const U=er(pf(e,E),O),Y=pf(e,E).a;s.push({name:"circle",type:"element",attributes:{class:"sch-net-label-symbol-circle",...r,cx:U.x.toString(),cy:U.y.toString(),r:(O.radius*Y).toString(),fill:"none",stroke:n.schematic.component_outline,"stroke-width":`${c_(e)}px`},value:"",children:[]})}return s},$wi=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=>{if(!t.text)return[];const o=t.text;if(t.symbol_name)return jwi({schNetLabel:t,realToScreenTransform:e,colorMap:n});const i=run(t),r=[],s=PE(e,"net_label"),a=DP("net_label"),A=iun/a/2,c=h_e({...t,text:o}),l=er(e,t.center),u=SU(t.anchor_side),g={...u};g.y*=-1;const h=c+NP*2+vU*o.length+QU,d=t.anchor_position?er(e,t.anchor_position):{x:l.x-g.x*h*s/2,y:l.y-g.y*h*s/2},p=t.anchor_position??{x:t.center.x-u.x*h*a/2,y:t.center.y-u.y*h*a/2},m={left:0,top:-90,bottom:90,right:180}[t.anchor_side],_=[{x:0,y:0},{x:NP,y:A},{x:NP*2+QU+vU*o.length+c,y:A},{x:NP*2+QU+vU*o.length+c,y:-A},{x:NP,y:-A}].map(x=>er(pf(e,PT(p.x,p.y),zWe(a),z0n(m/180*Math.PI)),x)),f=`
    M ${_[0].x},${_[0].y}
    L ${_[1].x},${_[1].y}
    L ${_[2].x},${_[2].y}
    L ${_[3].x},${_[3].y}
    L ${_[4].x},${_[4].y}
    Z
  `;r.push({name:"path",type:"element",attributes:{class:"net-label sch-net-label",...i,d:f,fill:n.schematic.label_background,stroke:n.schematic.label_global,"stroke-width":`${c_(e)}px`},value:"",children:[]});const I={x:d.x+g.x*s*.5,y:d.y+g.y*s*.5},C={left:"start",top:"start",bottom:"start",right:"end"}[t.anchor_side],y={left:"",right:"",top:`rotate(90 ${I.x} ${I.y})`,bottom:`rotate(-90 ${I.x} ${I.y})`}[t.anchor_side];return r.push({name:"text",type:"element",attributes:{class:"net-label-text sch-net-label-text",...i,x:I.x.toString(),y:I.y.toString(),fill:n.schematic.label_global,"text-anchor":C,"dominant-baseline":"central","font-family":"sans-serif","font-variant-numeric":"tabular-nums","font-size":`${s}px`,transform:y},children:ZWe(o,t.display_superscript,s),value:""}),r},qwi=.02,Xwi=({schPort:t,transform:e})=>{const n=er(e,t.center),o=Math.abs(e.a)*qwi*2;return[{name:"g",type:"element",value:"",attributes:{class:"schematic-port-hover sch-port-hover","data-schematic-port-id":t.source_port_id,...t.schematic_sheet_id?{"data-schematic-sheet-id":t.schematic_sheet_id}:{}},children:[{name:"circle",type:"element",value:"",attributes:{cx:n.x.toString(),cy:n.y.toString(),r:o.toString(),fill:"red",opacity:"0"},children:[]}]}]},Zwi=({component:t,transform:e,circuitJson:n})=>{const o=MT(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),i=[];for(const r of o)i.push(...Xwi({schPort:r,transform:e}));return i},ePi=({schPort:t,transform:e,colorMap:n})=>{const{x:i,y:r}=t.center,s=[-1,1].map(a=>{const A=er(e,{x:i-.05,y:r-a*.05}),c=er(e,{x:i+.05,y:r+a*.05});return`M ${A.x} ${A.y} L ${c.x} ${c.y}`}).join(" ");return{name:"path",type:"element",value:"",attributes:{class:"sch-port-no-connect","data-schematic-port-id":t.schematic_port_id,"data-source-port-id":t.source_port_id,d:s,fill:"none",stroke:n.schematic.no_connect,"stroke-width":`${c_(e)}px`,"stroke-linecap":"round"},children:[]}},pun=.02,tPi=({schPort:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=Math.abs(e.a)*pun,s=Math.abs(e.a)*pun,a=er(e,t.center),A=n.find(l=>l.type==="source_port"&&l.source_port_id===t.source_port_id);A?.do_not_connect||i.push({name:"circle",type:"element",value:"",attributes:{class:"component-pin sch-component-pin sch-port-indicator",cx:a.x.toString(),cy:a.y.toString(),r:r.toString(),fill:"none",stroke:o.schematic.component_outline,"stroke-width":s.toString(),"data-schematic-port-id":t.schematic_port_id},children:[]});const c=t.display_pin_label??A?.name;if(c){const l={...t.center},u=t.distance_from_component_edge??0,g=.05;let h="middle",d="";switch(t.facing_direction){case"left":l.x+=u/2,l.y+=g,h="start";break;case"right":l.x-=u/2,l.y+=g,h="end";break;case"up":l.y-=u/2,l.x-=g,h="middle";break;case"down":l.y+=u/2,l.x-=g,h="middle";break}const p=er(e,l),m=PE(e,"pin_number");(t.facing_direction==="up"||t.facing_direction==="down")&&(d=`rotate(-90 ${p.x} ${p.y})`),i.push({name:"text",type:"element",value:"",attributes:{class:"port-indicator-label sch-port-label",x:p.x.toString(),y:p.y.toString(),fill:o.schematic.component_outline,"font-family":"sans-serif","font-size":`${m*.7}px`,"text-anchor":h,"dominant-baseline":"middle",...d&&{transform:d}},children:[{type:"text",value:c,name:"",attributes:{},children:[]}]})}return i},mun=t=>({type:"element",name:"tspan",value:"",attributes:t.is_overlined?{"text-decoration":"overline"}:{},children:[{type:"text",name:"",value:t.text,attributes:{},children:[]}]}),nPi=t=>t.filter(e=>e.text).map(mun),oPi=t=>{const e=[[]];for(const n of t)n.text.split(`
`).forEach((o,i)=>{i>0&&e.push([]),o&&e.at(-1).push(mun({...n,text:o}))});return e},nje=({elm:t,transform:e,colorMap:n})=>{const o=er(e,t.position),i={center:"middle",center_right:"end",bottom_left:"start",bottom_center:"middle",bottom_right:"end",left:"start",right:"end",top:"middle",bottom:"middle",top_left:"start",top_center:"middle",top_right:"end",center_left:"start"},r={center:"middle",center_right:"middle",bottom_left:"ideographic",bottom_center:"ideographic",bottom_right:"ideographic",left:"middle",right:"middle",top:"hanging",bottom:"ideographic",top_left:"hanging",top_center:"hanging",top_right:"hanging",center_left:"middle"},s=t.text.split(`
`),a=oPi(t.text_parts??[]),A=s.length===1?t.text_parts?.length?a[0]:[{type:"text",value:t.text,name:t.schematic_text_id,attributes:{},children:[]}]:s.map((c,l)=>({type:"element",name:"tspan",value:"",attributes:{x:o.x.toString(),...l>0?{dy:"1em"}:{}},children:t.text_parts?.length?a[l]??[]:[{type:"text",value:c,name:l===0?t.schematic_text_id:"",attributes:{},children:[]}]}));return t.display_superscript&&(s.length===1?A:A[A.length-1].children).push(...ZWe("",t.display_superscript,PE(e,"reference_designator",t.font_size),r[t.anchor]).slice(1)),{type:"element",name:"text",value:"",attributes:{class:"sch-text","data-schematic-text-id":t.schematic_text_id,x:o.x.toString(),y:o.y.toString(),fill:t.color??n.schematic.sheet_label,"text-anchor":i[t.anchor],"dominant-baseline":r[t.anchor],"font-family":"sans-serif","font-size":`${PE(e,"reference_designator",t.font_size)}px`,transform:`rotate(${t.rotation}, ${o.x}, ${o.y})`},children:A}};function _un({schArc:t,transform:e,colorMap:n}){const o=er(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=t.start_angle_degrees*Math.PI/180,A=t.end_angle_degrees*Math.PI/180,c=o.x+i*Math.cos(a),l=o.y+i*Math.sin(a),u=o.x+i*Math.cos(A),g=o.y+i*Math.sin(A);let h=t.end_angle_degrees-t.start_angle_degrees;t.direction==="clockwise"&&(h=-h),h<0&&(h+=360);const d=h>180?1:0,p=t.direction==="clockwise"?1:0;return[{name:"path",type:"element",attributes:{class:"sch-arc",d:`M ${c} ${l} A ${i} ${i} 0 ${d} ${p} ${u} ${g}`,fill:"none",stroke:t.color,"stroke-width":s.toString(),...t.is_dashed&&{"stroke-dasharray":(s*3).toString()},"data-schematic-arc-id":t.schematic_arc_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var iPi=({schematicBox:t,transform:e,colorMap:n})=>{const o=er(e,{x:t.x,y:t.y}),i=er(e,{x:t.x+t.width,y:t.y+t.height}),r=Math.min(o.y,i.y),s=Math.max(o.y,i.y),a=Math.min(o.x,i.x),A=Math.max(o.x,i.x),c=c_(e),l={class:"schematic-box sch-box",x:a.toString(),y:r.toString(),width:(A-a).toString(),height:(s-r).toString(),"stroke-width":`${c}px`,stroke:n.schematic.component_outline||"black",fill:"transparent"};if(t.is_dashed){const u=8*c,g=4*c;l["stroke-dasharray"]=`${u} ${g}`}return[{name:"rect",type:"element",value:"",attributes:l,children:[]}]};function fun({schCircle:t,transform:e,colorMap:n}){const o=er(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r;return[{name:"circle",type:"element",attributes:{class:"sch-circle",cx:o.x.toString(),cy:o.y.toString(),r:i.toString(),fill:t.is_filled?t.fill_color??t.color:"none",stroke:t.color,"stroke-width":s.toString(),...t.is_dashed&&{"stroke-dasharray":(s*3).toString()},"data-schematic-circle-id":t.schematic_circle_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var Iun=(t,e)=>{for(const n of t){if(n.type!=="source_trace")continue;const o=n;if(Array.isArray(o.connected_source_port_ids)&&o.connected_source_port_ids.includes(e))return!0}return!1},rPi={top_left:"start",top_right:"end",middle_left:"start",middle_right:"end",bottom_left:"start",bottom_right:"end",center:"middle",middle_top:"middle",middle_bottom:"middle"},sPi={top_left:"hanging",top_right:"hanging",bottom_left:"ideographic",bottom_right:"ideographic",center:"middle",middle_left:"middle",middle_right:"middle",middle_top:"hanging",middle_bottom:"ideographic"},aPi=({component:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=Su[t.symbol_name];if(!r)return[tje({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const s=MT(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),a=MT(n).source_component.get(t.source_component_id),A=aun({schPorts:s,symbol:r,schComponent:t});if(!A[0])return[tje({text:`Could not match ports for symbol ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const c=Aun(A[1]?.symbolPort??r.center,A[1]?.schPort.center??t.center,A[0].symbolPort,A[0].schPort.center),l=r.primitives.filter(B=>B.type==="path"),u=r.primitives.filter(B=>B.type==="text"),g=r.primitives.filter(B=>B.type==="circle"),h=r.primitives.filter(B=>B.type==="box"),d=new Set;for(const B of A)(Iun(n,B.schPort.source_port_id)||MT(n).source_port.get(B.schPort.source_port_id)?.do_not_connect)&&d.add(B.symbolPort);const p={minX:Math.min(...l.flatMap(B=>B.points.map(S=>S.x))),maxX:Math.max(...l.flatMap(B=>B.points.map(S=>S.x))),minY:Math.min(...l.flatMap(B=>B.points.map(S=>S.y))),maxY:Math.max(...l.flatMap(B=>B.points.map(S=>S.y)))},[m,_]=er(pf(e,c),[p.minX,p.minY]),[f,I]=er(pf(e,c),[p.maxX,p.maxY]),C=Math.abs(I-_),y=Math.min(_,I),x=Math.abs(f-m),E=Math.min(m,f);i.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay",x:E.toString(),y:y.toString(),width:x.toString(),height:C.toString(),fill:"transparent"},children:[]});for(const B of l){const{points:S,color:Q,closed:w,fill:M}=B;i.push({type:"element",name:"path",attributes:{class:"sch-component-symbol-path",d:S.map((k,R)=>{const[F,O]=er(pf(e,c),[k.x,k.y]);return`${R===0?"M":"L"} ${F} ${O}`}).join(" ")+(w?" Z":""),stroke:o.schematic.component_outline,fill:"none","stroke-width":`${c_(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}for(const B of u){const S=er(pf(e,c),B);let Q="";const w=B.text==="{REF}";w?Q=a?.display_name??a?.name??"":B.text==="{VAL}"&&(Q=t.symbol_display_value??"");const M=sPi[B.anchor];i.push({name:"text",type:"element",attributes:{class:w?"sch-component-name sch-component-text":"sch-component-text",x:S.x.toString(),y:S.y.toString(),...w?{stroke:o.schematic.background,"stroke-width":`${c_(e)}px`,"paint-order":"stroke"}:{},fill:o.schematic.label_local,"font-family":"sans-serif","text-anchor":rPi[B.anchor],"dominant-baseline":M,"font-size":`${PE(e,"reference_designator")}px`},value:"",children:[{type:"text",value:Q,name:"",attributes:{},children:[]}]})}for(const B of h){const S=er(pf(e,c),B),Q=pf(e,c).a;i.push({name:"rect",type:"element",attributes:{class:"sch-component-symbol-box",x:S.x.toString(),y:S.y.toString(),width:(B.width*Q).toString(),height:(B.height*Q).toString(),fill:"red"},value:"",children:[]})}for(const B of r.ports){if(d.has(B))continue;const S=er(pf(e,c),B);i.push({type:"element",name:"circle",attributes:{class:"component-pin sch-component-pin",cx:S.x.toString(),cy:S.y.toString(),r:`${Math.abs(e.a)*.02}px`,"stroke-width":`${c_(e)}px`,fill:"none",stroke:o.schematic.component_outline},value:"",children:[]})}for(const B of g){const S=er(pf(e,c),B),Q=Math.abs(B.radius*e.a);i.push({type:"element",name:"circle",attributes:{class:"sch-component-symbol-circle",cx:S.x.toString(),cy:S.y.toString(),r:`${Q}px`,"stroke-width":`${c_(e)}px`,fill:"none",stroke:o.schematic.component_outline},value:"",children:[]})}return i},FZ=.02,Cun=(t,e,n,o,i)=>{const r=Math.PI/6,s={x:t.x-n*Math.cos(e-r),y:t.y-n*Math.sin(e-r)},a={x:t.x-n*Math.cos(e+r),y:t.y-n*Math.sin(e+r)};return{name:"polygon",type:"element",attributes:{points:`${t.x},${t.y} ${s.x},${s.y} ${a.x},${a.y}`,fill:"white",stroke:o,"stroke-width":`${i}px`},value:"",children:[]}},APi=({schPort:t,schComponent:e,transform:n,circuitJson:o})=>{const i=[],r=MT(o).source_port.get(t.source_port_id),s={x:t.center.x,y:t.center.y},a=t.distance_from_component_edge??.4;switch(t.side_of_component){case"left":s.x+=a;break;case"right":s.x-=a;break;case"top":s.y-=a;break;case"bottom":s.y+=a;break}const A=er(n,t.center),c=er(n,s),l=r!=null&&r.source_component_id==null&&typeof t.is_connected=="boolean"?t.is_connected:Iun(o,t.source_port_id),u=t.is_drawn_with_inversion_circle??!1,g=.06,h={...t.center};if(!l&&!r?.do_not_connect)switch(t.side_of_component){case"left":h.x+=FZ;break;case"right":h.x-=FZ;break;case"top":h.y-=FZ;break;case"bottom":h.y+=FZ;break}const d=er(n,h);if(u){const I=Math.abs(n.a)*g,C={...c};switch(t.side_of_component){case"left":C.x-=I,c.x-=I*2;break;case"right":C.x+=I,c.x+=I*2;break;case"top":C.y-=I,c.y-=I*2;break;case"bottom":C.y+=I,c.y+=I*2;break}i.push({name:"circle",type:"element",attributes:{class:"component-pin sch-component-pin sch-inversion-bubble",cx:C.x.toString(),cy:C.y.toString(),r:I.toString(),fill:"white",stroke:$h.schematic.component_outline,"stroke-width":`${c_(n)}px`},value:"",children:[]})}i.push({name:"line",type:"element",attributes:{class:"component-pin sch-component-pin sch-port-line",x1:c.x.toString(),y1:c.y.toString(),x2:d.x.toString(),y2:d.y.toString(),"stroke-width":`${c_(n)}px`},value:"",children:[]});const p=Math.abs(n.a)*FZ,m=[];!l&&!r?.do_not_connect&&m.push({name:"circle",type:"element",attributes:{class:"component-pin sch-component-pin sch-port-terminal",cx:A.x.toString(),cy:A.y.toString(),r:p.toString(),"stroke-width":`${c_(n)}px`},value:"",children:[]}),m.push({name:"rect",type:"element",attributes:{x:(A.x-p).toString(),y:(A.y-p).toString(),width:(p*2).toString(),height:(p*2).toString(),opacity:"0"},value:"",children:[]}),i.push({name:"g",type:"element",value:"",attributes:{class:"sch-port","data-schematic-port-id":t.source_port_id},children:m});const{has_input_arrow:_,has_output_arrow:f}=t;if((_||f)&&t.side_of_component){const I=Math.abs(n.a)*.1,C=$h.schematic.component_outline,y=I*Math.cos(Math.PI/6),x=c_(n)/3;let E=0,B=0;t.side_of_component==="left"?(E=0,B=Math.PI):t.side_of_component==="right"?(E=Math.PI,B=0):t.side_of_component==="top"?(E=Math.PI/2,B=-Math.PI/2):t.side_of_component==="bottom"&&(E=-Math.PI/2,B=Math.PI/2);const S=_&&f;let Q={...c},w={...c};if(S){const M=y;t.side_of_component==="left"?w.x-=M:t.side_of_component==="right"?w.x+=M:t.side_of_component==="top"?w.y-=M:t.side_of_component==="bottom"&&(w.y+=M)}if(_&&i.push(Cun(Q,E,I,C,x)),f){const M={x:w.x+I*Math.cos(B),y:w.y+I*Math.sin(B)};i.push(Cun(M,B,I,C,x))}}return i},cPi=t=>{const e=[],{schPort:n,transform:o}=t,i={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const r=SU(n.side_of_component),s=n.distance_from_component_edge??.4;i.x+=r.x*s/2,i.y+=r.y*s/2,n.side_of_component==="top"||n.side_of_component==="bottom"?i.x-=.02:i.y+=.02;const a=er(o,i);return e.push({name:"text",type:"element",attributes:{class:"pin-number sch-pin-number",x:a.x.toString(),y:a.y.toString(),style:"font-family: sans-serif;",fill:$h.schematic.pin_number,"text-anchor":"middle","dominant-baseline":"auto","font-size":`${PE(o,"pin_number")}px`,transform:n.side_of_component==="top"||n.side_of_component==="bottom"?`rotate(-90 ${a.x} ${a.y})`:""},children:[{type:"text",value:n.pin_number?.toString()||"",name:"",attributes:{},children:[]}],value:""}),e},yun=.1,xun=t=>{const e=[],{schPort:n,schComponent:o,transform:i,labelColor:r=$h.schematic.pin_number,labelClassName:s="pin-number sch-pin-label"}=t,a={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const A=SU(n.side_of_component),c=n.distance_from_component_edge??.4;a.x+=A.x*(c+yun),a.y+=A.y*(c+yun);const l=er(i,a),u=n.display_pin_label??o.port_labels?.[`${n.pin_number}`];if(!u)return[];const g=u.startsWith("N_"),h=g?u.slice(2):u,d=n.display_pin_label_text_parts,p=n.is_drawn_with_inversion_circle??!1,m=PE(i,g||p?"negated_pin_number":"pin_number",n.display_pin_label_font_size);return e.push({name:"text",type:"element",attributes:{class:s,x:l.x.toString(),y:l.y.toString(),style:`font-family: sans-serif;${g&&!d?.length?" text-decoration: overline;":""}`,fill:r,"text-anchor":n.side_of_component==="left"||n.side_of_component==="bottom"?"start":"end","dominant-baseline":"middle","font-size":`${m}px`,transform:n.side_of_component==="top"||n.side_of_component==="bottom"?`rotate(-90 ${l.x} ${l.y})`:""},children:d?.length?nPi(d):[{type:"text",value:h||"",name:"",attributes:{},children:[]}],value:""}),e},lPi=t=>{const e=[];return e.push(...APi(t)),e.push(...cPi(t)),e.push(...xun(t)),e},uPi=({component:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=er(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),s=er(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2}),a=s.x-r.x,A=s.y-r.y;i.push({name:"rect",type:"element",value:"",attributes:{class:"component chip sch-component-body",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),"stroke-width":`${c_(e)}px`,fill:o.schematic.component_body,stroke:o.schematic.component_outline},children:[]}),i.push({name:"rect",type:"element",value:"",attributes:{class:"component-overlay sch-component-overlay",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),fill:"transparent"},children:[]});const c=MT(n).schematic_text.list();for(const u of c)u.schematic_component_id===t.schematic_component_id&&i.push(nje({elm:u,transform:e,colorMap:o}));const l=MT(n).schematic_port.list({schematic_component_id:t.schematic_component_id});for(const u of l)i.push(...lPi({schPort:u,schComponent:t,transform:e,circuitJson:n}));return i};function Eun({isDashed:t,dashLength:e,dashGap:n,strokeWidth:o,transform:i}){if(!t)return;const r=Math.abs(i.a),s=o*r*3,a=e!==void 0?e*r:s,A=n!==void 0?n*r:s;return`${a} ${A}`}function Bun({schLine:t,transform:e,colorMap:n}){const o=er(e,{x:t.x1,y:t.y1}),i=er(e,{x:t.x2,y:t.y2}),r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=Eun({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return[{name:"line",type:"element",attributes:{class:"sch-line",x1:o.x.toString(),y1:o.y.toString(),x2:i.x.toString(),y2:i.y.toString(),stroke:t.color,"stroke-width":s.toString(),...a&&{"stroke-dasharray":a},"data-schematic-line-id":t.schematic_line_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}function bun({schRect:t,transform:e,colorMap:n}){const o=er(e,t.center),i=Math.abs(e.a)*t.width,r=Math.abs(e.d)*t.height,s=t.stroke_width??.02,a=Math.abs(e.a)*s,A=o.x-i/2,c=o.y-r/2;return[{name:"rect",type:"element",attributes:{class:"sch-rect",x:A.toString(),y:c.toString(),width:i.toString(),height:r.toString(),fill:t.is_filled?t.fill_color??t.color:"none",stroke:t.color,"stroke-width":a.toString(),...t.is_dashed&&{"stroke-dasharray":(a*3).toString()},...t.rotation!==0&&{transform:`rotate(${t.rotation} ${o.x} ${o.y})`},"data-schematic-rect-id":t.schematic_rect_id,...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}function Sun({schPath:t,transform:e,colorMap:n}){const o=t.stroke_color??n.schematic.component_outline,i=t.fill_color??"none",r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=Eun({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return!t.points||t.points.length<2?[]:[{name:"path",type:"element",attributes:{class:"sch-path",d:t.points.map(l=>er(e,{x:l.x,y:l.y})).map((l,u)=>`${u===0?"M":"L"} ${l.x} ${l.y}`).join(" "),stroke:o,"stroke-width":s.toString(),fill:t.is_filled?i:"none","stroke-linecap":"round","stroke-linejoin":"round",...a&&{"stroke-dasharray":a},...t.schematic_component_id&&{"data-schematic-component-id":t.schematic_component_id}},children:[],value:""}]}var gPi=({component:t,transform:e,circuitJson:n,colorMap:o})=>{const i=[],r=t.schematic_component_id;for(const s of n)!("schematic_component_id"in s)||s.schematic_component_id!==r||(s.type==="schematic_text"&&t.is_box_with_pins===!1?i.push(nje({elm:s,transform:e,colorMap:o})):s.type==="schematic_line"?i.push(...Bun({schLine:s,transform:e,colorMap:o})):s.type==="schematic_circle"?i.push(...fun({schCircle:s,transform:e,colorMap:o})):s.type==="schematic_rect"?i.push(...bun({schRect:s,transform:e,colorMap:o})):s.type==="schematic_arc"?i.push(..._un({schArc:s,transform:e,colorMap:o})):s.type==="schematic_path"&&i.push(...Sun({schPath:s,transform:e,colorMap:o})));if(t.is_box_with_pins===!1){const s=n.filter(A=>A.type==="schematic_line"&&A.schematic_component_id===r),a=n.filter(A=>A.type==="schematic_port"&&A.schematic_component_id===r);for(const A of a){const c=s.find(p=>p.x1===A.center.x&&p.y1===A.center.y||p.x2===A.center.x&&p.y2===A.center.y);if(!c)continue;const l=c.x1===A.center.x&&c.y1===A.center.y?{x:c.x2,y:c.y2}:{x:c.x1,y:c.y1},u=l.x-A.center.x,g=l.y-A.center.y,h=Math.abs(u)>Math.abs(g)?u>0?"left":"right":g>0?"bottom":"top",d=Math.max(Math.abs(u),Math.abs(g));i.push(...xun({schPort:{...A,side_of_component:h,distance_from_component_edge:d},schComponent:t,transform:e,labelClassName:"port-label sch-pin-label",labelColor:o.schematic.pin_name}))}}return i};function dPi(t){const{component:e}=t;let n=[];e.is_box_with_pins!==!1&&(e.symbol_name?n=aPi(t):n=uPi(t));const o=gPi(t),i=[...n,...o];return[{type:"element",name:"g",attributes:{class:"sch-component","data-circuit-json-type":"schematic_component","data-schematic-component-id":e.schematic_component_id,...e.schematic_sheet_id?{"data-schematic-sheet-id":e.schematic_sheet_id}:{}},children:i,value:""}]}function hPi({debugObject:t,transform:e}){if(t.shape==="rect"){let[n,o]=er(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),[i,r]=er(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]);[o,r]=[Math.min(o,r),Math.max(o,r)];const s=Math.abs(i-n),a=Math.abs(r-o),[A,c]=er(e,[t.center.x,t.center.y]);return[{name:"rect",type:"element",value:"",attributes:{x:n.toString(),y:o.toString(),width:s.toString(),height:a.toString(),fill:"none",stroke:"red","stroke-width":(.02*Math.abs(e.a)).toString(),"stroke-dasharray":"5,5"},children:t.label?[{name:"text",type:"element",value:"",attributes:{x:A.toString(),y:(c-10).toString(),"text-anchor":"middle","font-size":(.2*Math.abs(e.a)).toString(),fill:"red"},children:[{type:"text",value:t.label,name:"",attributes:{},children:[]}]}]:[]}]}if(t.shape==="line"){const[n,o]=er(e,[t.start.x,t.start.y]),[i,r]=er(e,[t.end.x,t.end.y]),s=(n+i)/2,a=(o+r)/2;return[{name:"line",type:"element",value:"",attributes:{x1:n.toString(),y1:o.toString(),x2:i.toString(),y2:r.toString(),stroke:"red","stroke-width":(.02*Math.abs(e.a)).toString(),"stroke-dasharray":"5,5"},children:t.label?[{name:"text",type:"element",value:"",attributes:{x:s.toString(),y:(a-10).toString(),"text-anchor":"middle","font-size":(.2*Math.abs(e.a)).toString(),fill:"red"},children:[{type:"text",value:t.label,name:"",attributes:{},children:[]}]}]:[]}]}return[]}var Qun=.2/DT,pPi=3/DT,__e=["1","2","3","4","5","6"],LZ=["A","B","C","D"];function mPi({schematicSheet:t,transform:e,colorMap:n}){const o=eje(t),i=n.schematic.sheet,r=n.schematic.net_name,s=[vun({id:`${t.schematic_sheet_id}_outer`,center:o.center,width:o.width,height:o.height,transform:e,color:i}),vun({id:`${t.schematic_sheet_id}_inner`,center:o.center,width:o.innerMaxX-o.innerMinX,height:o.innerMaxY-o.innerMinY,transform:e,color:i})];for(let a=1;a<__e.length;a++){const A=o.innerMinX+(o.innerMaxX-o.innerMinX)*a/__e.length;s.push(f_e({id:`${t.schematic_sheet_id}_top_column_${a}`,x1:A,y1:o.maxY,x2:A,y2:o.innerMaxY,transform:e,color:i}),f_e({id:`${t.schematic_sheet_id}_bottom_column_${a}`,x1:A,y1:o.minY,x2:A,y2:o.innerMinY,transform:e,color:i}))}for(let a=1;a<LZ.length;a++){const A=o.innerMinY+(o.innerMaxY-o.innerMinY)*a/LZ.length;s.push(f_e({id:`${t.schematic_sheet_id}_left_row_${a}`,x1:o.minX,y1:A,x2:o.innerMinX,y2:A,transform:e,color:i}),f_e({id:`${t.schematic_sheet_id}_right_row_${a}`,x1:o.maxX,y1:A,x2:o.innerMaxX,y2:A,transform:e,color:i}))}return __e.forEach((a,A)=>{const c=o.innerMinX+(o.innerMaxX-o.innerMinX)*(A+.5)/__e.length;s.push(I_e({text:a,x:c,y:(o.maxY+o.innerMaxY)/2,transform:e,color:r}),I_e({text:a,x:c,y:(o.minY+o.innerMinY)/2,transform:e,color:r}))}),LZ.forEach((a,A)=>{const c=o.innerMinY+(o.innerMaxY-o.innerMinY)*(LZ.length-A-.5)/LZ.length;s.push(I_e({text:a,x:(o.minX+o.innerMinX)/2,y:c,transform:e,color:r}),I_e({text:a,x:(o.maxX+o.innerMaxX)/2,y:c,transform:e,color:r}))}),[{name:"g",type:"element",value:"",attributes:{class:"schematic-sheet","data-circuit-json-type":"schematic_sheet","data-schematic-sheet-id":t.schematic_sheet_id},children:s}]}function vun({id:t,center:e,width:n,height:o,transform:i,color:r}){const s=er(i,e),a=Math.abs(i.a)*n,A=Math.abs(i.d)*o;return{name:"rect",type:"element",value:"",attributes:{class:"sch-rect",x:(s.x-a/2).toString(),y:(s.y-A/2).toString(),width:a.toString(),height:A.toString(),fill:"none",stroke:r,"stroke-width":(Math.abs(i.a)*Qun).toString(),"data-schematic-rect-id":t},children:[]}}function f_e({id:t,x1:e,y1:n,x2:o,y2:i,transform:r,color:s}){const a=er(r,{x:e,y:n}),A=er(r,{x:o,y:i});return{name:"line",type:"element",value:"",attributes:{class:"sch-line",x1:a.x.toString(),y1:a.y.toString(),x2:A.x.toString(),y2:A.y.toString(),stroke:s,"stroke-width":(Math.abs(r.a)*Qun).toString(),"data-schematic-line-id":t},children:[]}}function I_e({text:t,x:e,y:n,transform:o,color:i}){const r=er(o,{x:e,y:n});return{type:"element",name:"text",value:"",attributes:{class:"sch-text",x:r.x.toString(),y:r.y.toString(),fill:i,"text-anchor":"middle","dominant-baseline":"middle","font-family":"sans-serif","font-size":`${PE(o,"reference_designator",pPi)}px`,transform:`rotate(0, ${r.x}, ${r.y})`},children:[{type:"text",value:t,name:"",attributes:{},children:[]}]}}var _Pi=({schematicTable:t,transform:e,colorMap:n,circuitJson:o})=>{const{anchor_position:i,border_width:r=.05,anchor:s="center"}=t,{column_widths:a,row_heights:A}=lun(t,o),c=a.reduce((E,B)=>E+B,0),l=A.reduce((E,B)=>E+B,0);let u=i.x,g=i.y;s.includes("center")?u-=c/2:s.includes("right")&&(u-=c),s.includes("center")?g+=l/2:s.includes("bottom")&&(g+=l);const h=[],d=r*Math.abs(e.a),p=c_(e),[m,_]=er(e,[u,g]),[f,I]=er(e,[u+c,g-l]);h.push({name:"rect",type:"element",attributes:{class:"sch-table-border",x:m.toString(),y:_.toString(),width:(f-m).toString(),height:(I-_).toString(),fill:"none",stroke:n.schematic.table,"stroke-width":d.toString()},children:[],value:""});const C=o.filter(E=>E.type==="schematic_table_cell"&&E.schematic_table_id===t.schematic_table_id);let y=u;for(let E=0;E<a.length-1;E++){y+=a[E];let B=g;for(let S=0;S<A.length;S++){const Q=B-A[S];if(!C.some(M=>M.start_column_index<=E&&M.end_column_index>E&&M.start_row_index<=S&&M.end_row_index>=S)){const M=er(e,{x:y,y:B}),k=er(e,{x:y,y:Q});h.push({name:"line",type:"element",attributes:{class:"sch-table-grid-line",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,"stroke-width":p.toString()},children:[],value:""})}B=Q}}let x=g;for(let E=0;E<A.length-1;E++){x-=A[E];let B=u;for(let S=0;S<a.length;S++){const Q=B+a[S];if(!C.some(M=>M.start_row_index<=E&&M.end_row_index>E&&M.start_column_index<=S&&M.end_column_index>=S)){const M=er(e,{x:B,y:x}),k=er(e,{x:Q,y:x});h.push({name:"line",type:"element",attributes:{class:"sch-table-grid-line",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,"stroke-width":p.toString()},children:[],value:""})}B=Q}}for(const E of C)if(E.text){const B=a.slice(E.start_column_index,E.end_column_index+1).reduce((te,j)=>te+j,0),S=A.slice(E.start_row_index,E.end_row_index+1).reduce((te,j)=>te+j,0),Q=u+a.slice(0,E.start_column_index).reduce((te,j)=>te+j,0),w=g-A.slice(0,E.start_row_index).reduce((te,j)=>te+j,0),{cell_padding:M=.2}=t,k=E.horizontal_align??"center",R=E.vertical_align??"middle";let F={x:Q+B/2,y:w-S/2};k==="left"?F.x=Q+M:k==="right"&&(F.x=Q+B-M),R==="top"?F.y=w-M:R==="bottom"&&(F.y=w-S+M);const O=er(e,F),U=PE(e,"reference_designator",E.font_size),Y={left:"start",center:"middle",right:"end"},W={top:"hanging",middle:"middle",bottom:"ideographic"};h.push({name:"text",type:"element",attributes:{class:"sch-table-text",x:O.x.toString(),y:O.y.toString(),"font-size":`${U}px`,"text-anchor":Y[k],"dominant-baseline":W[R],fill:n.schematic.table,"font-family":"sans-serif"},children:[{type:"text",value:E.text,name:"",attributes:{},children:[]}],value:""})}return[{name:"g",type:"element",attributes:{class:"sch-table","data-schematic-table-id":t.schematic_table_id},children:h,value:""}]};function fPi({trace:t,transform:e,colorMap:n}){const o=t.edges;if(o.length===0)return[];const i=[],r=[];let s="";for(let a=0;a<o.length;a++){const A=o[a];if(A.is_crossing)continue;const[c,l]=er(e,[A.from.x,A.from.y]),[u,g]=er(e,[A.to.x,A.to.y]);a===0||o[a-1]?.is_crossing?s+=`M ${c} ${l} L ${u} ${g}`:s+=` L ${u} ${g}`}s&&(i.push({name:"path",type:"element",attributes:{d:s,class:"trace-invisible-hover-outline sch-trace-hitbox",stroke:n.schematic.wire,fill:"none","stroke-width":`${c_(e)*8}px`,"stroke-linecap":"round",opacity:"0","stroke-linejoin":"round"},value:"",children:[]}),i.push({name:"path",type:"element",attributes:{class:"sch-trace-path",d:s,stroke:n.schematic.wire,fill:"none","stroke-width":`${c_(e)}px`,"stroke-linecap":"round","stroke-linejoin":"round"},value:"",children:[]}));for(const a of o){if(!a.is_crossing)continue;const[A,c]=er(e,[a.from.x,a.from.y]),[l,u]=er(e,[a.to.x,a.to.y]),g=(A+l)/2,h=(c+u)/2,d=l-A,p=u-c,m=Math.sqrt(d*d+p*p),_=m*.7,f=-p/m*_,I=d/m*_,C=g+f,y=h-Math.abs(I);r.push({name:"path",type:"element",attributes:{class:"trace-crossing-outline sch-trace-crossing-outline",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.background,fill:"none","stroke-width":`${c_(e)*1.5}px`,"stroke-linecap":"butt"},value:"",children:[]}),r.push({name:"path",type:"element",attributes:{class:"sch-trace-crossing-path",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.wire,fill:"none","stroke-width":`${c_(e)}px`,"stroke-linecap":"round"},value:"",children:[]})}if(t.junctions)for(const a of t.junctions){const[A,c]=er(e,[a.x,a.y]);r.push({name:"circle",type:"element",attributes:{cx:A.toString(),cy:c.toString(),r:(Math.abs(e.a)*.03).toString(),class:"trace-junction sch-trace-junction",fill:n.schematic.junction},value:"",children:[]})}return[{name:"g",type:"element",value:"",attributes:{class:"trace sch-trace","data-layer":"base","data-circuit-json-type":"schematic_trace","data-schematic-trace-id":t.schematic_trace_id,...t.subcircuit_connectivity_map_key&&{"data-subcircuit-connectivity-map-key":t.subcircuit_connectivity_map_key}},children:i},{name:"g",type:"element",value:"",attributes:{class:"trace-overlays sch-trace-overlays","data-layer":"overlay","data-circuit-json-type":"schematic_trace","data-schematic-trace-id":t.schematic_trace_id,...t.subcircuit_connectivity_map_key&&{"data-subcircuit-connectivity-map-key":t.subcircuit_connectivity_map_key}},children:r}]}function IPi({probe:t,transform:e,colorMap:n,fallbackColor:o}){const[i,r]=er(e,[t.position.x,t.position.y]),s=t.color??o??n.schematic.reference,a=Math.abs(e.a)*.6,A=Math.abs(e.a)*.28,c=t.label_alignment??"top_right";let l,u,g,h;switch(c){case"top_left":l=-135*Math.PI/180,u="end",g=-8,h=-8;break;case"top_center":l=-90*Math.PI/180,u="middle",g=0,h=-8;break;case"top_right":l=-45*Math.PI/180,u="start",g=8,h=-8;break;case"center_left":l=180*Math.PI/180,u="end",g=-8,h=0;break;case"center":l=-90*Math.PI/180,u="middle",g=0,h=-8;break;case"center_right":l=0*Math.PI/180,u="start",g=8,h=0;break;case"bottom_left":l=135*Math.PI/180,u="end",g=-8,h=8;break;case"bottom_center":l=90*Math.PI/180,u="middle",g=0,h=8;break;case"bottom_right":l=45*Math.PI/180,u="start",g=8,h=8;break;default:l=-50*Math.PI/180,u="start",g=8,h=0}const d=i+a*Math.cos(l),p=r+a*Math.sin(l),m=i,_=r,f=[`M ${d},${p}`,`L ${m},${_}`,`M ${m},${_}`,`L ${m-A*Math.cos((l*180/Math.PI+150)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+150)*Math.PI/180)}`,`L ${m-A*Math.cos((l*180/Math.PI+210)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+210)*Math.PI/180)}`,"Z"].join(" "),I=(d+g).toString(),C=(p+h).toString(),y=[];if(t.name&&t.voltage!==void 0)y.push({type:"element",name:"tspan",value:"",attributes:{x:I},children:[{type:"text",value:t.name,name:"",attributes:{},children:[]}]}),y.push({type:"element",name:"tspan",value:"",attributes:{x:I,dy:"1.2em"},children:[{type:"text",value:`${t.voltage}V`,name:"",attributes:{},children:[]}]});else{const x=[];t.name&&x.push(t.name),t.voltage!==void 0&&x.push(`${t.voltage}V`),y.push({type:"text",value:x.join(" "),name:"",attributes:{},children:[]})}return[{name:"path",type:"element",attributes:{class:"sch-voltage-probe",d:f,stroke:s,fill:s,"stroke-width":`${c_(e)}px`},value:"",children:[]},{type:"element",name:"text",value:"",attributes:{class:"sch-voltage-probe-label",x:I,y:C,fill:s,"text-anchor":u,"dominant-baseline":"middle","font-family":"sans-serif","font-size":`${PE(e,"reference_designator")}px`,"font-weight":"bold","data-schematic-voltage-probe-id":t.schematic_voltage_probe_id},children:y}]}var HZ=6,C_e=12,mI=12,wU=6,wun=14,y_e=11,Pun=280,CPi=140,Mun=t=>t.type==="schematic_component_overlap_warning"||t.type==="schematic_component_styling_warning"||t.type==="schematic_element_outside_sheet_warning"||t.type==="schematic_manual_edit_conflict_warning";function yPi({circuitJson:t,transform:e,svgWidth:n,svgHeight:o,colorMap:i}){const r=i.schematic.erc_warning,s=[];return t.filter(Mun).flatMap(a=>{const A=xPi(a,t,e);if(!A)return[];const c=Math.max(1,n-mI*2),l=wPi(a.message,Math.max(12,Math.floor((Math.min(Pun,c)-wU*2)/(y_e*.56)))),u=Math.max(...l.map(I=>I.length)),g=Math.min(Pun,c,Math.max(Math.min(CPi,c),u*y_e*.56+wU*2)),h=wU*2+l.length*wun,d=SPi({targetBounds:A,calloutWidth:g,calloutHeight:h,svgWidth:n,svgHeight:o,occupiedCalloutBounds:s});s.push(d);const p=vPi(a),m=x_e(A,HZ),_=QPi(d,m);return[{name:"g",type:"element",value:"",attributes:{class:"schematic-warning","data-type":a.type,"data-warning-id":p,role:"note","aria-label":a.message},children:[{name:"rect",type:"element",value:"",attributes:{x:m.minX.toString(),y:m.minY.toString(),width:(m.maxX-m.minX).toString(),height:(m.maxY-m.minY).toString(),rx:"6",fill:"none",stroke:r,"stroke-width":"1","stroke-dasharray":"4,3","data-warning-reference":"target"},children:[]},{name:"line",type:"element",value:"",attributes:{x1:_.from.x.toString(),y1:_.from.y.toString(),x2:_.to.x.toString(),y2:_.to.y.toString(),stroke:r,"stroke-width":"1","data-warning-reference":"leader"},children:[]},{name:"rect",type:"element",value:"",attributes:{x:d.minX.toString(),y:d.minY.toString(),width:g.toString(),height:h.toString(),fill:"rgba(255, 250, 235, 0.97)",stroke:r,"stroke-width":"1","data-warning-reference":"callout"},children:[]},{name:"text",type:"element",value:"",attributes:{x:(d.minX+wU).toString(),y:(d.minY+wU+y_e).toString(),fill:"#5c4300","font-family":"sans-serif","font-size":y_e.toString()},children:l.map((I,C)=>({name:"tspan",type:"element",value:"",attributes:{x:(d.minX+wU).toString(),dy:C===0?"0":wun.toString()},children:[DPi(I)]}))}]}]})}function xPi(t,e,n){const i=EPi(t).map(r=>BPi(e,r)).filter(r=>!!r).map(r=>bPi(r,n)).filter(r=>!!r);return i.length===0?null:i.reduce(PPi)}function EPi(t){switch(t.type){case"schematic_component_overlap_warning":return t.schematic_component_ids;case"schematic_component_styling_warning":return[t.schematic_component_id,...t.schematic_port_ids??[]];case"schematic_manual_edit_conflict_warning":return[t.schematic_component_id];case"schematic_element_outside_sheet_warning":return[t.schematic_element_id]}}function BPi(t,e){return t.find(n=>{if(!n.type.startsWith("schematic_"))return!1;const o=`${n.type}_id`;return n[o]===e})}function bPi(t,e){if(t.type==="schematic_component"){const n=er(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),o=er(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2});return oje([n,o])}if(t.type==="schematic_port"){const n=er(e,t.center);return x_e(oje([n]),4)}if(t.type==="schematic_net_label"){const n=er(e,t.anchor_position??t.center),o=Math.max(28,t.text.length*8);return{minX:n.x-o/2,minY:n.y-10,maxX:n.x+o/2,maxY:n.y+10}}if(t.type==="schematic_trace"){const n=t.edges.flatMap(o=>[er(e,o.from),er(e,o.to)]);return n.length===0?null:x_e(oje(n),4)}return null}function SPi({targetBounds:t,calloutWidth:e,calloutHeight:n,svgWidth:o,svgHeight:i,occupiedCalloutBounds:r}){const s=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2,A=t.minY-HZ-C_e-n,c=t.maxY+HZ+C_e,l=t.minX-HZ-C_e-e,u=t.maxX+HZ+C_e,g=[];A>=mI&&g.push(OZ({x:PU(s-e/2,mI,o-mI-e),y:A,width:e,height:n,side:"top"})),c+n<=i-mI&&g.push(OZ({x:PU(s-e/2,mI,o-mI-e),y:c,width:e,height:n,side:"bottom"})),u+e<=o-mI&&g.push(OZ({x:u,y:PU(a-n/2,mI,i-mI-n),width:e,height:n,side:"right"})),l>=mI&&g.push(OZ({x:l,y:PU(a-n/2,mI,i-mI-n),width:e,height:n,side:"left"}));const h=g.find(d=>r.every(p=>!MPi(x_e(d,4),p)));return h||(g[0]?g[0]:OZ({x:PU(s-e/2,mI,o-mI-e),y:PU(A,mI,i-mI-n),width:e,height:n,side:"top"}))}function QPi(t,e){const n=(e.minX+e.maxX)/2,o=(e.minY+e.maxY)/2,i=(t.minX+t.maxX)/2,r=(t.minY+t.maxY)/2;switch(t.side){case"top":return{from:{x:i,y:t.maxY},to:{x:n,y:e.minY}};case"bottom":return{from:{x:i,y:t.minY},to:{x:n,y:e.maxY}};case"left":return{from:{x:t.maxX,y:r},to:{x:e.minX,y:o}};case"right":return{from:{x:t.minX,y:r},to:{x:e.maxX,y:o}}}}function vPi(t){switch(t.type){case"schematic_component_overlap_warning":return t.schematic_component_overlap_warning_id;case"schematic_component_styling_warning":return t.schematic_component_styling_warning_id;case"schematic_element_outside_sheet_warning":return t.schematic_element_outside_sheet_warning_id;case"schematic_manual_edit_conflict_warning":return t.schematic_manual_edit_conflict_warning_id}}function wPi(t,e){const n=t.trim().split(/\s+/),o=[];let i="";for(const r of n){const s=i?`${i} ${r}`:r;if(s.length<=e||i.length===0){i=s;continue}o.push(i),i=r}return i&&o.push(i),o.length>0?o:["Warning"]}function oje(t){return{minX:Math.min(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxX:Math.max(...t.map(e=>e.x)),maxY:Math.max(...t.map(e=>e.y))}}function PPi(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}function x_e(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function MPi(t,e){return!(t.maxX<=e.minX||t.minX>=e.maxX||t.maxY<=e.minY||t.minY>=e.maxY)}function OZ({x:t,y:e,width:n,height:o,side:i}){return{minX:t,minY:e,maxX:t+n,maxY:e+o,side:i}}function PU(t,e,n){return n<e?(e+n)/2:Math.min(Math.max(t,e),n)}function DPi(t){return{name:"",type:"text",value:t,attributes:{},children:[]}}function Dun(t,e){const n=t.filter(ge=>ge.type==="schematic_sheet"),o=Dwi(n);let i=o;e?.schematicSheetId!==void 0?i=n.find(ge=>ge.schematic_sheet_id===e.schematicSheetId)??o:e?.schematicSheetIndex!==void 0&&(i=n.find(ge=>ge.sheet_index===e.schematicSheetIndex)??o);const r=i?t.filter(ge=>!ge.type.startsWith("schematic_")||Mun(ge)||"schematic_sheet_id"in ge&&ge.schematic_sheet_id===i.schematic_sheet_id):t,s=Vwi(r),a=s.maxX-s.minX,A=s.maxY-s.minY,c=e?.width??1200,l=e?.height??600,u=e?.colorOverrides,g={...$h,schematic:{...$h.schematic,...u?.schematic??{}}},h=a/A,d=c/l;let p;if(h>d){const ge=c/h;p={x:0,y:(l-ge)/2}}else{const ge=l*h;p={x:(c-ge)/2,y:0}}const m=Iwi([{x:s.minX,y:s.maxY},{x:s.maxX,y:s.maxY},{x:s.maxX,y:s.minY}],[{x:p.x,y:p.y},{x:c-p.x,y:p.y},{x:c-p.x,y:l-p.y}]),_=[];if(_.push({name:"rect",type:"element",attributes:{class:"boundary",x:"0",y:"0",width:c.toString(),height:l.toString()},children:[],value:""}),e?.grid){const ge=typeof e.grid=="object"?e.grid:{};_.push(Pwi({bounds:s,transform:m,...ge}))}const f=[],I=[],C=[],y=[],x=[],E=[],B=[],S=[],Q=[],w=[],M=[],k=[],R=[],F=[],O=[],U=[],Y=[],W=NPi({transform:m,svgWidth:c,svgHeight:l,schematicSheet:i}),te=Array.isArray(g.simulation_palette)?g.simulation_palette:Array.isArray(g.palette)?g.palette:[];let j=0;for(const ge of r)if(ge.type==="schematic_sheet")U.push(...mPi({schematicSheet:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_graphic")Y.push(zwi({schematicGraphic:ge,viewport:RPi({availableViewport:W,schematicGraphic:ge,transform:m})}));else if(ge.type==="schematic_debug_object")f.push(...hPi({debugObject:ge,transform:m}));else if(ge.type==="schematic_component")I.push(...dPi({component:ge,transform:m,circuitJson:r,colorMap:g})),Q.push(...Zwi({component:ge,transform:m,circuitJson:r}));else if(ge.type==="schematic_box")B.push(...iPi({schematicBox:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_trace")C.push(...fPi({trace:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_net_label")y.push(...$wi({schNetLabel:ge,realToScreenTransform:m,colorMap:g}));else if(ge.type==="schematic_text"&&!ge.schematic_component_id)x.push(nje({elm:ge,transform:m,colorMap:g}));else if(ge.type==="schematic_voltage_probe"){const _e=te.length>0?te[j%te.length]:void 0;j+=1,E.push(...IPi({probe:ge,transform:m,colorMap:g,fallbackColor:_e}))}else if(ge.type==="schematic_table")S.push(..._Pi({schematicTable:ge,transform:m,colorMap:g,circuitJson:r}));else if(ge.type==="schematic_line"){if(ge.schematic_component_id)continue;M.push(...Bun({schLine:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_circle"){if(ge.schematic_component_id)continue;k.push(...fun({schCircle:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_rect"){if(ge.schematic_component_id)continue;R.push(...bun({schRect:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_arc"){if(ge.schematic_component_id)continue;F.push(..._un({schArc:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_path"){if(ge.schematic_component_id)continue;O.push(...Sun({schPath:ge,transform:m,colorMap:g}))}else if(ge.type==="schematic_port"){const _e=r.find(ue=>ue.type==="source_port"&&ue.source_port_id===ge.source_port_id);_e?.type==="source_port"&&_e.do_not_connect===!0&&w.push(ePi({schPort:ge,transform:m,colorMap:g})),e?.drawPorts&&w.push(...tPi({schPort:ge,transform:m,circuitJson:r,colorMap:g}))}const J=C.filter(ge=>ge.attributes?.["data-layer"]!=="overlay"),oe=C.filter(ge=>ge.attributes?.["data-layer"]==="overlay");_.push(...Y,...f,...U,...J,...oe,...M,...k,...R,...F,...O,...I,...Q,...w,...y,...x,...B,...E,...S),e?.labeledPoints&&_.push(Mwi({points:e.labeledPoints,transform:m})),e?.shouldDrawWarnings&&_.push(...yPi({circuitJson:r,transform:m,svgWidth:c,svgHeight:l,colorMap:g}));const ie=qWe(t),ne=XWe;if(e?.showErrorsInTextOverlay){const ge=vwi(t);ge&&_.push(ge)}const le={name:"svg",type:"element",attributes:{xmlns:"http://www.w3.org/2000/svg",class:["tscircuit-schematic",e?.className].filter(Boolean).join(" "),width:c.toString(),height:l.toString(),style:`background-color: ${g.schematic.background}`,"data-real-to-screen-transform":mwi(m),...ie&&{"data-software-used-string":ie},...e?.includeVersion&&{"data-circuit-to-svg-version":ne}},children:[{name:"style",type:"element",children:[{type:"text",value:`
              .boundary { fill: ${g.schematic.background}; }
              .schematic-boundary { fill: none; stroke: #fff; }
              .component { fill: none; stroke: ${g.schematic.component_outline}; }
              .chip { fill: ${g.schematic.component_body}; stroke: ${g.schematic.component_outline}; }
              .component-pin { fill: none; stroke: ${g.schematic.component_outline}; }
              .text { font-family: sans-serif; fill: ${g.schematic.wire}; }
              .pin-number { fill: ${g.schematic.pin_number}; }
              .port-label { fill: ${g.schematic.reference}; }
              .component-name { fill: ${g.schematic.reference}; }
              ${e?.css??""}
            `,name:"",attributes:{},children:[]}],value:"",attributes:{}},..._],value:""};return $We(le)}function NPi({transform:t,svgWidth:e,svgHeight:n,schematicSheet:o}){if(!o)return{x:0,y:0,width:e,height:n};const i=eje(o),r=er(t,{x:i.innerMinX,y:i.innerMaxY}),s=er(t,{x:i.innerMaxX,y:i.innerMinY});return{x:Math.min(r.x,s.x),y:Math.min(r.y,s.y),width:Math.abs(s.x-r.x),height:Math.abs(s.y-r.y)}}function RPi({availableViewport:t,schematicGraphic:e,transform:n}){if(e.width===void 0&&e.height===void 0)return t;const o=e.width===void 0?t.width:Nun(e.width*Math.hypot(n.a,n.b),t.width),i=e.height===void 0?t.height:Nun(e.height*Math.hypot(n.c,n.d),t.height);return{x:t.x+(t.width-o)/2,y:t.y+(t.height-i)/2,width:o,height:i}}function Nun(t,e){return Number.isFinite(t)?Math.max(0,Math.min(t,e)):e}var Run=({simulationResult:t,fallbackName:e})=>{const n=t.name??e,o=t.simulation_parameter_sweep_coordinate;return o?`${n} (${o.parameter_value}${o.parameter_unit})`:n},TPi=t=>{const e=t[0]??0,n=t[1];return{timestamps_ms:t,start_time_ms:e,end_time_ms:t.at(-1)??0,time_per_step:n===void 0?1:Math.abs(n-e)}},kPi=t=>t.type==="simulation_transient_voltage_graph"?t.simulation_transient_voltage_graph_id:t.simulation_transient_current_graph_id,Tun=t=>{switch(t.type){case"simulation_transient_voltage_graph":return t.simulation_transient_voltage_graph_id;case"simulation_transient_current_graph":return t.simulation_transient_current_graph_id;case"simulation_dc_operating_point_voltage":return t.simulation_dc_operating_point_voltage_id;case"simulation_dc_operating_point_current":return t.simulation_dc_operating_point_current_id;case"simulation_dc_sweep_voltage_graph":return t.simulation_dc_sweep_voltage_graph_id;case"simulation_dc_sweep_current_graph":return t.simulation_dc_sweep_current_graph_id;case"simulation_ac_sweep_voltage_graph":return t.simulation_ac_sweep_voltage_graph_id;case"simulation_ac_sweep_current_graph":return t.simulation_ac_sweep_current_graph_id}},FPi=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=>{switch(t.type){case"simulation_dc_operating_point_voltage":return{horizontalCoordinates:[0],measuredLevels:[t.voltage],isCurrent:!1};case"simulation_dc_operating_point_current":return{horizontalCoordinates:[0],measuredLevels:[t.current],isCurrent:!0};case"simulation_dc_sweep_voltage_graph":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.voltage_levels,isCurrent:!1};case"simulation_dc_sweep_current_graph":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.current_levels,isCurrent:!0};case"simulation_ac_sweep_voltage_graph":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_voltages.map(o=>e==="phase"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!1};case"simulation_ac_sweep_current_graph":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_currents.map(o=>e==="phase"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!0}}},LPi=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=>{if(t.type==="simulation_transient_voltage_graph"||t.type==="simulation_transient_current_graph")return t.simulation_parameter_sweep_coordinate?{...t,name:Run({simulationResult:t,fallbackName:t.name??kPi(t)})}:t;const o=Tun(t),{horizontalCoordinates:i,measuredLevels:r,isCurrent:s}=FPi({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n}),a={simulation_experiment_id:t.simulation_experiment_id,simulation_parameter_sweep_coordinate:t.simulation_parameter_sweep_coordinate,name:Run({simulationResult:t,fallbackName:o}),color:t.color,...TPi(i)};return s?{type:"simulation_transient_current_graph",simulation_transient_current_graph_id:o,current_levels:r,...a}:{type:"simulation_transient_voltage_graph",simulation_transient_voltage_graph_id:o,voltage_levels:r,...a}},HPi=({simulationResultType:t,experiment:e})=>t?.startsWith("simulation_ac_sweep_")?"Frequency (Hz)":t?.startsWith("simulation_dc_sweep_")?e?.dc_sweep_unit?`DC Sweep (${e.dc_sweep_unit})`:"DC Sweep":t?.startsWith("simulation_dc_operating_point_")?"Operating Point":"Time (ms)",OPi=({results:t,acSweepView:e,experiment:n})=>{const o=t[0]?.type,i=o?.startsWith("simulation_ac_sweep_")??!1,r=i&&n?.ac_sweep_type!=="linear";return{graphs:t.map(a=>LPi({simulationResult:a,acSweepView:e,usesLogarithmicXValues:r})),xAxisTitle:HPi({simulationResultType:o,experiment:n}),yAxisTitle:i&&e==="phase"?"Phase (deg)":void 0,usesLogarithmicXValues:r}};function GZ(t){return t?.valuePerDiv!==void 0&&Number.isFinite(t.valuePerDiv)&&Math.abs(t.valuePerDiv)>Number.EPSILON}var GPi=1200,YPi=600,hm={top:64,right:100,bottom:80,left:100},ije=24,rje=56,UPi=56,KPi=8,kun="#1f77b4";function qx(t){return t.type==="simulation_transient_current_graph"}function sje(t){return qx(t)?t.simulation_transient_current_graph_id:t.simulation_transient_voltage_graph_id}function Fun(t){return qx(t)?"data-simulation-transient-current-graph-id":"data-simulation-transient-voltage-graph-id"}function Lun(t){return qx(t)?t.current_levels:t.voltage_levels}function VPi(t){const e=t.some(o=>qx(o.graph)),n=t.some(o=>!qx(o.graph));return e&&!n?"Current (A)":n&&!e?"Voltage (V)":"Value"}function zPi(t){return`simulation-graph-${t.replace(/[^a-zA-Z0-9_-]+/g,"-")}`}function $i(t){if(!Number.isFinite(t))return"0";const e=Number.parseFloat(t.toFixed(6));return Number.isInteger(e),e.toString()}function cc(t,e,n=[]){return{name:t,type:"element",value:"",attributes:e,children:n}}function o9(t){return{name:"",type:"text",value:t,attributes:{},children:[]}}function aje(t,e){if(!Number.isFinite(t))return`0 ${e}`;if(t===0)return`0 ${e}`;const n=Math.abs(t),o=[{threshold:1e6,factor:1e6,prefix:"M"},{threshold:1e3,factor:1e3,prefix:"k"},{threshold:1,factor:1,prefix:""},{threshold:.001,factor:.001,prefix:"m"},{threshold:1e-6,factor:1e-6,prefix:"µ"},{threshold:1e-9,factor:1e-9,prefix:"n"}],i=o.find(s=>n>=s.threshold)??o[o.length-1],r=t/i.factor;return`${Hun(r)} ${i.prefix}${e}`}function JPi(t){return`${Hun(t)} div`}function Hun(t){if(!Number.isFinite(t))return"0";const e=Math.abs(t),n=e>=100?0:e>=10?1:e>=1?2:3;return Number.parseFloat(t.toFixed(n)).toString()}function Oun(t,e){const n=e.tickLabelOverrides?.get(t);if(n!==void 0)return n;const{ticks:o}=e;if(o.length<=1)return $i(t);const i=o[o.length-1]-o[0];if(!Number.isFinite(i)||i===0)return $i(t);const r=WPi(i),s=10**r;return(Math.round(t*s)/s).toFixed(r).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function WPi(t){return t>=100?0:t>=10?1:t>=1?2:3}function jPi({graphs:t,valueAxis:e,scaleY:n,plotLeft:o,plotWidth:i,plotHeight:r}){const s=hm.top,a=hm.top+r,A=o,c=o+i,l=[],u=t.filter(g=>GZ(g.scopeTraceDisplay));for(const[g,h]of u.entries()){const d=g%2===0?"left":"right",p=Math.floor(g/2),m=d==="left"?A-10-p*rje:c+10+p*rje,_=d==="left"?m-6:m+6,f=d==="left"?"end":"start",I=d==="left"?m+6:m-6,C=h.scopeTraceDisplay;if(GZ(C)){l.push(cc("line",{class:"axis axis-y axis-y-scope",x1:$i(m),y1:$i(s),x2:$i(m),y2:$i(a),style:`stroke: ${h.color};`}),cc("text",{class:"axis-title axis-title-y axis-title-y-scope",x:$i(m),y:$i(s-12),"text-anchor":"middle",style:`fill: ${h.color}; font-size: 10px;`},[o9(h.label)]));for(const y of e.ticks){const x=n(y),E=(C.center??0)+(y-(C.offsetDivs??0))*C.valuePerDiv;l.push(cc("line",{class:"axis-tick axis-tick-y axis-tick-y-scope",x1:$i(m),y1:$i(x),x2:$i(I),y2:$i(x),style:`stroke: ${h.color};`}),cc("text",{class:"axis-label axis-label-y axis-label-y-scope",x:$i(_),y:$i(x),"text-anchor":f,"dominant-baseline":"middle",style:`fill: ${h.color}; font-size: 10px;`},[o9(aje(E,qx(h.graph)?"A":"V"))]))}}}return l}function $Pi({timeAxis:t,valueAxis:e,graphs:n,scaleX:o,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a,yAxisTitle:A,xAxisTitle:c,usesScopeTraceDisplay:l}){const u=hm.top+a,g=r,h=r+s,d=[cc("line",{class:"axis axis-x",x1:$i(g),y1:$i(u),x2:$i(h),y2:$i(u)}),...l?[]:[cc("line",{class:"axis axis-y",x1:$i(g),y1:$i(hm.top),x2:$i(g),y2:$i(u)})]];for(const p of t.ticks){const m=$i(o(p));d.push(cc("line",{class:"axis-tick axis-tick-x",x1:m,y1:$i(u),x2:m,y2:$i(u+6)}),cc("text",{class:"axis-label axis-label-x",x:m,y:$i(u+22),"text-anchor":"middle"},[o9(Oun(p,t))]))}if(l)d.push(...jPi({graphs:n,valueAxis:e,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a}));else{for(const p of e.ticks){const m=$i(i(p));d.push(cc("line",{class:"axis-tick axis-tick-y",x1:$i(g-6),y1:m,x2:$i(g),y2:m}),cc("text",{class:"axis-label axis-label-y",x:$i(g-10),y:m,"text-anchor":"end","dominant-baseline":"middle"},[o9(Oun(p,e))]))}d.push(cc("text",{class:"axis-title axis-title-y",x:$i(g-64),y:$i(hm.top+a/2),transform:`rotate(-90 ${$i(g-64)} ${$i(hm.top+a/2)})`,"text-anchor":"middle"},[o9(A)]))}return d.push(cc("text",{class:"axis-title axis-title-x",x:$i(g+s/2),y:$i(u+48),"text-anchor":"middle"},[o9(c)])),cc("g",{class:"axes"},d)}function E_e(t,e=!1){if(t.length===0)return{domainMin:0,domainMax:1,ticks:[0,1]};const n=Math.min(...t),o=Math.max(...t);if(n===o){const A=n===0?1:Math.abs(n)*.1||1;return{domainMin:n-A,domainMax:n+A,ticks:[n-A,n,n+A]}}const i=Gun(n,o),r=i.length>0?[...i]:[n,o];let s=r[0],a=r[r.length-1];if(e&&r.length>1){const A=Math.abs(r[1]-r[0]),c=.1;n<s+A*c&&(s-=A,r.unshift(s)),o>a-A*c&&(a+=A,r.push(a))}return{domainMin:s,domainMax:a,ticks:r}}function qPi({values:t,graphs:e,experiment:n}){const o=B_e(n?.start_time_ms),i=B_e(n?.end_time_ms),r=e.map(p=>B_e(p.start_time_ms)).filter(p=>p!==void 0),s=e.map(p=>B_e(p.end_time_ms)).filter(p=>p!==void 0),a=o??(r.length>0?Math.min(...r):void 0),A=i??(s.length>0?Math.max(...s):void 0);if(a===void 0||A===void 0||a===A)return E_e(t);const c=Math.min(a,A),l=Math.max(a,A),g=(l-c)*.12,h=Gun(c,l).filter(p=>p>c+g&&p<l-g),d=XPi([c,...h,l]);return{domainMin:c,domainMax:l,ticks:d,tickLabelOverrides:new Map([[c,$i(c)],[l,$i(l)]])}}function B_e(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}function XPi(t){const e=[...t].sort((o,i)=>o-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)>1e-12)&&n.push(o)}return n}function Gun(t,e,n=6){const o=e-t;if(!Number.isFinite(o)||o<=Number.EPSILON)return[t,e];const i=ZPi(o/Math.max(1,n-1)),r=Math.floor(t/i)*i,s=Math.ceil(e/i)*i,a=[];for(let A=r;A<=s+i/2;A+=i)a.push(Number.parseFloat(A.toPrecision(12)));return a}function ZPi(t){if(!Number.isFinite(t)||t<=0)return 1;const e=Math.floor(Math.log10(t)),n=t/10**e;let o;return n<=1?o=1:n<=2?o=2:n<=5?o=5:o=10,o*10**e}function eMi(t,e){return cc("rect",{class:"background",x:"0",y:"0",width:$i(t),height:$i(e)})}function tMi(t,e,n,o){return cc("defs",{},[cc("clipPath",{id:t},[cc("rect",{x:$i(e),y:$i(hm.top),width:$i(n),height:$i(o)})])])}function nMi({timeAxis:t,valueAxis:e,scaleX:n,scaleY:o,plotLeft:i,plotWidth:r,plotHeight:s}){const a=hm.top,A=hm.top+s,c=i,l=i+r,u=[];for(const g of t.ticks){const h=$i(n(g));u.push(cc("line",{class:"grid-line grid-line-x",x1:h,y1:$i(a),x2:h,y2:$i(A)}))}for(const g of e.ticks){const h=$i(o(g));u.push(cc("line",{class:"grid-line grid-line-y",x1:$i(c),y1:h,x2:$i(l),y2:h}))}return cc("g",{class:"grid"},u)}function Yun(t,e,n,o){if(!Number.isFinite(t)||!Number.isFinite(e)){const r=(n+o)/2;return()=>r}const i=e-t;if(Math.abs(i)<Number.EPSILON){const r=(n+o)/2;return()=>r}return r=>n+(r-t)/i*(o-n)}function oMi(t,e,n){return cc("rect",{class:"plot-background",x:$i(t),y:$i(hm.top),width:$i(e),height:$i(n)})}function iMi(){const t=`
:root { color-scheme: light; }
svg { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; }
.background { fill: ${$h.schematic.background}; }
.plot-background { fill: #ffffff; }
.grid-line { stroke: rgba(0, 0, 0, 0.08); stroke-width: 1; }
.axis { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1.5; }
.axis-tick { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1; }
.axis-label { fill: rgba(0, 0, 0, 0.75); font-size: 12px; }
.axis-title { fill: rgba(0, 0, 0, 0.9); font-size: 14px; font-weight: 600; }
.legend-label { fill: rgba(0, 0, 0, 0.75); font-size: 11px; }
.legend-line { stroke-width: 3; }
.scope-channel-card { fill: #ffffff; stroke: rgba(0, 0, 0, 0.22); stroke-width: 1; }
.scope-channel-header-text { fill: #ffffff; font-size: 14px; font-weight: 700; }
.scope-channel-detail { fill: rgba(0, 0, 0, 0.42); font-size: 14px; }
.simulation-line { fill: none; stroke-width: 2.5; }
.simulation-point { stroke-width: 0; }
.chart-title { fill: rgba(0, 0, 0, 0.85); font-size: 18px; font-weight: 600; }
`;return cc("style",{},[o9(t)])}function Uun(t,e){const n=t[e];if(typeof n=="string")return n}function rMi(t,e,n,o){const r=[4,8],s=r.map(g=>$i(g)).join(" "),A=r.reduce((g,h)=>g+h,0)/3,c=[];t.forEach((g,h)=>{if(g.points.length===0)return;const d=[];g.points.forEach((I,C)=>{const y=$i(n(I.timeMs)),x=$i(o(I.displayValue));d.push(`${C===0?"M":"L"} ${y} ${x}`)});const p={class:"simulation-line",d:d.join(" "),stroke:g.color,"clip-path":`url(#${e})`,[Fun(g.graph)]:sje(g.graph)};g.graph.source_component_id&&(p["data-source-component-id"]=g.graph.source_component_id);const m=Uun(g.graph,"source_probe_id");m&&(p["data-source-probe-id"]=m);const _=Uun(g.graph,"source_probe_name");_&&(p["data-source-probe-name"]=_),g.graph.subcircuit_connectivity_map_key&&(p["data-subcircuit-connectivity-map-key"]=g.graph.subcircuit_connectivity_map_key);const f=g.points.map(I=>{const C=$i(n(I.timeMs)),y=$i(o(I.displayValue));return cc("circle",{class:"simulation-point",cx:C,cy:y,r:"2.5",fill:g.color,"clip-path":`url(#${e})`})});c.push({entry:g,graphIndex:h,pathAttributes:p,pointElements:f})});const l=[];for(let g=0;g<3;g++)for(const h of c){const d=(h.graphIndex+g)%3,p=$i(d*A);l.push(cc("path",{...h.pathAttributes,"stroke-dasharray":s,"stroke-dashoffset":p}))}const u=c.flatMap(g=>g.pointElements);return cc("g",{class:"data-series"},[...l,...u])}function sMi(t,e){return t?.name?cc("text",{class:"chart-title",x:$i(e/2),y:$i(hm.top-40),"text-anchor":"middle"},[o9(t.name)]):null}var Kun=16;function aMi(t,e,n,o){const i=o.map((r,s)=>cc("tspan",{x:"20",dy:s===0?"0":String(Kun)},[o9(r)]));return cc("g",{class:"legend-item",transform:`translate(${$i(e)} ${$i(n)})`},[cc("line",{class:"legend-line",x1:"0",y1:"0",x2:"16",y2:"0",stroke:t.color}),cc("text",{class:"legend-label",x:"20",y:"0","dominant-baseline":"middle"},i)])}var AMi=15;function cMi(t){const e=t.split("_");if(e.length<=1)return[t];const n=[];let o=e[0]??"";for(let i=1;i<e.length;i++){const r=e[i]??"",s=`${o}_${r}`;s.length>AMi?(n.push(o),o=r):o=s}return o&&n.push(o),n}var lMi=24;function uMi(t,e){let n=hm.top;const o=t.map(i=>{const r=e-hm.right+10,s=cMi(i.label),a=aMi(i,r,n,s),A=s.length*Kun;return n+=Math.max(A,lMi),a});return cc("g",{class:"legend"},o)}var NT=118,b_e=94,MU=18;function Vun(t,e){const n=Math.floor((e+MU)/(NT+MU)),o=Math.max(1,Math.min(n,t)),i=Math.max(1,Math.ceil(t/o)),r=o*NT+(o-1)*MU,s=i*b_e+(i-1)*MU;return{columns:o,rows:i,x:Math.max(0,(e-r)/2),height:s}}var S_e=20,Aje=8,gMi=14;function dMi(t,e,n){const o=Vun(t.length,e),i=[];for(const[r,s]of t.entries()){const a=r%o.columns,A=Math.floor(r/o.columns);i.push(hMi(s,r,o.x+a*(NT+MU),n+ije+A*(b_e+MU)))}return cc("g",{class:"scope-legend"},i)}function hMi(t,e,n,o){const i=t.scopeTraceDisplay,r=qx(t.graph)?"A":"V",s=i&&GZ(i)?aje(i.valuePerDiv,r):`1 ${r}`,a=aje(i?.center??0,r),A=JPi(i?.offsetDivs??0),c=`Ch${e+1}`,u=[t.label===c?void 0:t.label,`${s}/div`,A,a].filter(h=>!!h),g=u.length>1?(b_e-S_e-Aje*2-gMi)/(u.length-1):0;return cc("g",{class:"scope-channel",transform:`translate(${$i(n)} ${$i(o)})`,[Fun(t.graph)]:sje(t.graph)},[cc("rect",{class:"scope-channel-card",x:"0",y:"0",width:$i(NT),height:$i(b_e),rx:"6",ry:"6"}),cc("rect",{x:"0",y:"0",width:$i(NT),height:$i(S_e),rx:"6",ry:"6",fill:t.color}),cc("rect",{x:"0",y:$i(S_e-6),width:$i(NT),height:"6",fill:t.color}),cc("text",{class:"scope-channel-header-text",x:$i(NT/2),y:"14","text-anchor":"middle"},[o9(c)]),...u.map((h,d)=>cc("text",{class:"scope-channel-detail",x:$i(Aje),y:$i(S_e+Aje+d*g),"dominant-baseline":"hanging"},[o9(h)]))])}function pMi(t){const e=Math.ceil(t/2),n=Math.floor(t/2);return{left:zun(e),right:zun(n)}}function zun(t){if(t<=1)return 0;const e=10+(t-1)*rje+6+UPi+KPi;return Math.max(0,e-hm.left)}function Jun(t){return t.type==="simulation_transient_voltage_graph"||t.type==="simulation_transient_current_graph"||t.type==="simulation_dc_operating_point_voltage"||t.type==="simulation_dc_operating_point_current"||t.type==="simulation_dc_sweep_voltage_graph"||t.type==="simulation_dc_sweep_current_graph"||t.type==="simulation_ac_sweep_voltage_graph"||t.type==="simulation_ac_sweep_current_graph"}function Wun(t){return t?.type==="simulation_experiment"}function mMi(t){return t?.type==="simulation_voltage_probe"}function _Mi(t){return t?.type==="simulation_current_probe"}function fMi(t){return t?.type==="simulation_oscilloscope_trace"}function IMi(t,e){const n=yMi(t),o=Lun(t),i=Math.min(n.length,o.length),r=[],s=CMi(e);for(let a=0;a<i;a++){const A=Number(n[a]??Number.NaN),c=Number(o[a]??Number.NaN);!Number.isFinite(A)||!Number.isFinite(c)||r.push({timeMs:A,rawValue:c,displayValue:s(c)})}return r}function CMi(t){if(!GZ(t))return i=>i;const e=t.center??0,n=t.offsetDivs??0,o=t.valuePerDiv;return i=>n+(i-e)/o}function yMi(t){const e=Lun(t);if(Array.isArray(t.timestamps_ms)&&t.timestamps_ms.length===e.length)return t.timestamps_ms.map(r=>Number(r));const n=e.length;if(n===0)return[];const o=[];for(let r=0;r<n;r++)o.push(t.start_time_ms+t.time_per_step*r);const i=o.length>0?o[o.length-1]:void 0;return i!==void 0&&Number.isFinite(t.end_time_ms)&&Number.isFinite(i)&&Math.abs(i-t.end_time_ms)>t.time_per_step/2&&o.push(t.end_time_ms),o}function Q_e(t,e){const n=t[e];if(typeof n=="string")return n}function xMi(t,e,n,o){const i=qx(t)?"I":"V";if(n?.displayName)return n.displayName;if(t.simulation_parameter_sweep_coordinate&&t.name)return t.name;if(e?.name)return`${i}(${e.name})`;const r=Q_e(t,"source_probe_name");if(r)return`${i}(${r})`;if(t.source_component_id){const s=o.get(t.source_component_id);if(s)return`${i}(${s})`}return t.name?t.name:t.source_component_id?`Probe ${t.source_component_id}`:sje(t)}function EMi(t,e,n,o,i,r){if(qx(t)){const A=o.get(t.simulation_transient_current_graph_id);if(A)return A;const c=Q_e(t,"source_probe_id")??(e?.type==="simulation_current_probe"?e.simulation_current_probe_id:void 0);return c?r.get(c):void 0}const s=n.get(t.simulation_transient_voltage_graph_id);if(s)return s;const a=Q_e(t,"source_probe_id")??(e?.type==="simulation_voltage_probe"?e.simulation_voltage_probe_id:void 0);return a?i.get(a):void 0}function BMi(t,e,n,o,i){const r=Q_e(t,"source_probe_id");if(r){const s=qx(t)?n.get(r):e.get(r);if(s)return s}if(t.source_component_id)return qx(t)?i.get(t.source_component_id):o.get(t.source_component_id)}function bMi(t,e){if(e)return{displayName:e.display_name,color:e.color,center:e.display_center_value,offsetDivs:e.display_center_offset_divs,valuePerDiv:qx(t)?e.amps_per_div:e.volts_per_div}}function SMi(t,e){const n=Array.isArray($h.simulation_palette)?$h.simulation_palette:Array.isArray($h.palette)?$h.palette:[],o=e.filter(mMi),i=e.filter(_Mi),r=e.filter(fMi),s=new Map,a=new Map,A=new Map,c=new Map,l=new Map,u=new Map,g=new Map,h=new Map,d=new Map,p=new Map,m=new Map,_=new Map;for(const f of r)f.simulation_transient_voltage_graph_id&&d.set(f.simulation_transient_voltage_graph_id,f),f.simulation_transient_current_graph_id&&p.set(f.simulation_transient_current_graph_id,f),f.simulation_voltage_probe_id&&m.set(f.simulation_voltage_probe_id,f),f.simulation_current_probe_id&&_.set(f.simulation_current_probe_id,f);for(const f of o)l.set(f.simulation_voltage_probe_id,f),f.name&&f.source_component_id&&s.set(f.source_component_id,f.name),f.color&&f.source_component_id&&a.set(f.source_component_id,f.color),f.source_component_id&&g.set(f.source_component_id,f);for(const f of i)u.set(f.simulation_current_probe_id,f),f.name&&f.source_component_id&&A.set(f.source_component_id,f.name),f.color&&f.source_component_id&&c.set(f.source_component_id,f.color),f.source_component_id&&h.set(f.source_component_id,f);return t.map((f,I)=>{const C=BMi(f,l,u,g,h),y=EMi(f,C,d,p,m,_),x=bMi(f,y),E=IMi(f,x),B=QMi(n,I),S=vMi(f,C,qx(f)?c:a),Q=f.color??x?.color??S??B,w=xMi(f,C,x,qx(f)?A:s);return{graph:f,points:E,color:Q,label:w,scopeTraceDisplay:x,usesScopeTraceDisplay:GZ(x)}}).filter(f=>f.points.length>0)}function QMi(t,e){return t.length===0?kun:t[e%t.length]??kun}function vMi(t,e,n){if(e?.color)return e.color;if(t.source_component_id)return n.get(t.source_component_id)}function jun({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r="magnitude",width:s=GPi,height:a=YPi,includeVersion:A}){const c=o?new Set(o):null,l=n?new Set(n):null,u=!!(c||l),g=i?new Set(i):null,h=t.find(J=>Wun(J)&&J.simulation_experiment_id===e),d=t.filter(J=>Jun(J)&&J.simulation_experiment_id===e&&(!g||g.has(Tun(J)))&&(!u||J.type==="simulation_transient_voltage_graph"&&(c?.has(J.simulation_transient_voltage_graph_id)??!1)||J.type==="simulation_transient_current_graph"&&(l?.has(J.simulation_transient_current_graph_id)??!1))),p=OPi({results:d,acSweepView:r,experiment:h}),m=p.graphs;if(m.length===0)throw new Error(`No simulation analysis results found for simulation_experiment_id "${e}"`);const _=SMi(m,t),f=_.flatMap(J=>J.points);if(f.length===0)throw new Error(`Simulation results for simulation_experiment_id "${e}" do not contain any datapoints`);const I=f.map(J=>J.timeMs);let C;p.usesLogarithmicXValues?C=wMi(I):p.xAxisTitle==="Time (ms)"?C=qPi({values:I,graphs:m,experiment:h}):C=E_e(I);const y=E_e(f.map(J=>J.displayValue),!0),x=_.some(J=>J.usesScopeTraceDisplay),E=x?pMi(_.length):{left:0,right:0},B=s+E.left+E.right,S=x?Vun(_.length,B):null,Q=S?a+ije+S.height+ije:a,w=Math.max(1,s-hm.left-hm.right),M=Math.max(1,a-hm.top-hm.bottom),k=hm.left+E.left,R=Yun(C.domainMin,C.domainMax,k,k+w),F=Yun(y.domainMin,y.domainMax,hm.top+M,hm.top),O=zPi(e),U=qWe(t),Y=XWe,W=sMi(h,B),te=[iMi(),eMi(B,Q),tMi(O,k,w,M),oMi(k,w,M),nMi({timeAxis:C,valueAxis:y,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M}),rMi(_,O,R,F),$Pi({timeAxis:C,valueAxis:y,graphs:_,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M,yAxisTitle:p.yAxisTitle??VPi(_),xAxisTitle:p.xAxisTitle,usesScopeTraceDisplay:x}),x?dMi(_,B,a):uMi(_,B),...W?[W]:[]],j=cc("svg",{xmlns:"http://www.w3.org/2000/svg",width:B.toString(),height:Q.toString(),style:`background-color: ${$h.schematic.background}`,viewBox:`0 0 ${$i(B)} ${$i(Q)}`,"data-simulation-experiment-id":e,...h?.name&&{"data-simulation-experiment-name":h.name},...U&&{"data-software-used-string":U},...A&&{"data-circuit-to-svg-version":Y}},te);return $We(j)}var wMi=t=>{const e=E_e(t);return{...e,tickLabelOverrides:new Map(e.ticks.map(n=>[n,$i(10**n)]))}},PMi=1200,MMi=1200,$un=.55;function DMi({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s=PMi,height:a=MMi,schematicHeightRatio:A=$un,schematicOptions:c,includeVersion:l,graphAboveSchematic:u=!1,showErrorsInTextOverlay:g}){const h=t.filter(F=>!Wun(F)&&!Jun(F)),d=RMi(A),p=Math.max(1,a*d),m=Math.max(1,a-p),_=p+m,f=_===0?1:a/_,I=p*f,C=m*f,y=Dun(h,{...c,width:s,height:I,includeVersion:!1,showErrorsInTextOverlay:g}),x=jun({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s,height:C,includeVersion:!1}),E=uun($W(y)),B=uun($W(x)),S=NMi(B)??{width:s,height:C},Q=S.width>0?s*(S.height/S.width):C,w=I+Q,M=[];u?(M.push(m_e(B,0,0,s,Q)),M.push(m_e(E,0,Q,s,I))):(M.push(m_e(E,0,0,s,I)),M.push(m_e(B,0,I,s,Q)));const k=qWe(h),R={name:"svg",type:"element",value:"",attributes:{xmlns:"http://www.w3.org/2000/svg",width:f4(s),height:f4(w),viewBox:`0 0 ${f4(s)} ${f4(w)}`,"data-simulation-experiment-id":e,...k&&{"data-software-used-string":k},...l&&{"data-circuit-to-svg-version":XWe}},children:M};return $We(R)}function NMi(t){const e=t.attributes?.viewBox;if(typeof e!="string")return null;const n=e.trim().split(/[\s,]+/).map(r=>Number.parseFloat(r));if(n.length!==4)return null;const o=n.at(2),i=n.at(3);return!Number.isFinite(o)||!Number.isFinite(i)||o===void 0||i===void 0||o<=0||i<=0?null:{width:o,height:i}}function RMi(t){return Number.isFinite(t)?t<=0?0:t>=1?1:t:$un}var qun=({initialTransform:t,initialTouch1:e,initialTouch2:n,finalTouch1:o,finalTouch2:i})=>{if(!o||!i)return t;const r={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s={x:(o.x+i.x)/2,y:(o.y+i.y)/2},a=Math.hypot(n.x-e.x,n.y-e.y),A=Math.hypot(i.x-o.x,i.y-o.y),c=a===0?1:A/a,l=s.x-r.x,u=s.y-r.y;return Ad(pA(l,u),pA(r.x,r.y),dC(c,c),pA(-r.x,-r.y),t)},YZ=(t={})=>{const e=ee.useRef(null),[n,o]=ee.useState(0),i=t.canvasElm??e.current,[r,s]=ee.useState(t.initialTransform??QQ()),[a,A]=ee.useState(0),[c,l]=ee.useReducer(I=>I+1,0),u=ee.useCallback(I=>{t.onSetTransform&&t.onSetTransform(I),t.transform||s(I)},[t.onSetTransform,s]),g=ee.useCallback(I=>{u(I),l()},[u]),h=t.transform??r,d=ee.useCallback(()=>{o(Date.now())},[]),p=ee.useRef("none"),m=ee.useRef(null),_=ee.useRef(null);ee.useEffect(()=>{const I=t.canvasElm??e.current;if(I&&!i){A(a+1);return}if(!I){const U=setTimeout(()=>{A(a+1)},100);return()=>clearTimeout(U)}let C=t.transform??r,y={x:0,y:0},x={x:0,y:0},E=!1;const B=U=>({x:U.pageX-I.getBoundingClientRect().left-window.scrollX,y:U.pageY-I.getBoundingClientRect().top-window.scrollY});function S(U){t.enabled!==!1&&(t.shouldDrag&&!t.shouldDrag(U)||(y=B(U),!(Date.now()-n<100)&&(E=!0,U.preventDefault())))}function Q(U){if(!E||t.enabled===!1||t.shouldDrag&&!t.shouldDrag(U))return;x=B(U);const Y=Ad(pA(x.x-y.x,x.y-y.y),C);u(Y),C=Y,E=!1}function w(U){if(B(U),!E||t.enabled===!1||t.shouldDrag&&!t.shouldDrag(U))return;x=B(U);const Y=Ad(pA(x.x-y.x,x.y-y.y),C);u(Y)}function M(U){if(t.enabled===!1||t.shouldDrag&&!t.shouldDrag(U))return;const Y=B(U),W=Ad(pA(Y.x,Y.y),dC(1-U.deltaY/1e3,1-U.deltaY/1e3),pA(-Y.x,-Y.y),C);u(W),C=W,U.preventDefault()}function k(U){if(!E||t.shouldDrag&&!t.shouldDrag(U))return;if(I){const W=I.getBoundingClientRect();if(U.clientX>=W.left+10&&U.clientX<=W.right-10&&U.clientY>=W.top+10&&U.clientY<=W.bottom-10)return}E=!1,x=B(U);const Y=Ad(pA(x.x-y.x,x.y-y.y),C);u(Y),C=Y}function R(U){if(U.preventDefault(),t.enabled!==!1){if(U.touches.length===1){p.current="drag";const Y=U.touches[0];m.current={initialTransform:C,initialTouch:{x:Y.clientX,y:Y.clientY}}}else if(U.touches.length===2){p.current="pinch";const Y=U.touches[0],W=U.touches[1];_.current={initialTransform:C,initialTouch1:{x:Y.clientX,y:Y.clientY},initialTouch2:{x:W.clientX,y:W.clientY},finalTouch1:null,finalTouch2:null}}}}function F(U){if(U.preventDefault(),t.enabled!==!1){if(p.current==="drag"&&U.touches.length===1&&m.current){const Y=U.touches[0],W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=Ad(pA(te,j),m.current.initialTransform);u(J)}else if(p.current==="pinch"&&U.touches.length===2&&_.current){const Y=U.touches[0],W=U.touches[1];_.current.finalTouch1={x:Y.clientX,y:Y.clientY},_.current.finalTouch2={x:W.clientX,y:W.clientY};const te=qun(_.current);u(te)}}}function O(U){U.preventDefault();const Y=U.changedTouches[0];if(p.current==="drag"&&m.current&&Y){const W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=Ad(pA(te,j),m.current.initialTransform);u(J),C=J}else if(p.current==="pinch"&&_.current){const W=qun(_.current);u(W),C=W}p.current="none",m.current=null,_.current=null}return I.addEventListener("mousedown",S),I.addEventListener("mouseup",Q),window.addEventListener("mousemove",w),I.addEventListener("mouseout",k),I.addEventListener("wheel",M),I.addEventListener("touchstart",R,{passive:!1}),I.addEventListener("touchmove",F,{passive:!1}),I.addEventListener("touchend",O,{passive:!1}),I.addEventListener("touchcancel",O,{passive:!1}),()=>{I.removeEventListener("mousedown",S),I.removeEventListener("mouseup",Q),window.removeEventListener("mousemove",w),I.removeEventListener("mouseout",k),I.removeEventListener("wheel",M),I.removeEventListener("touchstart",R),I.removeEventListener("touchmove",F),I.removeEventListener("touchend",O),I.removeEventListener("touchcancel",O)}},[i,a,c,n,t.enabled,t.shouldDrag]);const f=ee.useCallback(I=>Bn(h,I),[h]);return{ref:e,transform:h,applyTransformToPoint:f,setTransform:g,cancelDrag:d}},Xun=YZ;function cje(t){const e=O3(t),n=new Map;for(const s of e.schematic_component.list())s.source_component_id&&n.set(s.source_component_id,s.schematic_component_id);const o=new Map;for(const s of e.source_trace.list()){const a=s.subcircuit_connectivity_map_key;if(a)for(const A of s.connected_source_port_ids??[]){const c=n.get(e.source_port.get(A)?.source_component_id??"");c&&(o.has(c)||o.set(c,new Set),o.get(c).add(a))}}const i=new Map;for(const s of e.schematic_net_label.list()){if(!s.source_net_id)continue;const a=e.source_net.get(s.source_net_id)?.subcircuit_connectivity_map_key??s.source_net_id;i.set(s.schematic_net_label_id,a)}const r=new Map;for(const s of e.schematic_text.list()){if(!s.source_trace_id)continue;const a=e.source_trace.get(s.source_trace_id)?.subcircuit_connectivity_map_key;a&&r.set(s.schematic_text_id,a)}return{componentIdToKeys:o,netLabelIdToKey:i,textIdToKey:r}}var v_e=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),Zun=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i,s=r?Math.max(0,Math.min(1,((t.x-e.x)*o+(t.y-e.y)*i)/r)):0;return v_e(t,{x:e.x+s*o,y:e.y+s*i})},RT=(t,e,n)=>Math.abs(v_e(e,t)+v_e(t,n)-v_e(e,n))<1e-5;function TMi(t,e){const n=cje(e),o=t?.closest("[data-subcircuit-connectivity-map-key], [data-schematic-net-label-id], [data-schematic-text-id], [data-schematic-trace-id]");if(!o)return;const i=e.find(r=>r.type==="schematic_trace"&&r.schematic_trace_id===o.getAttribute("data-schematic-trace-id"));return o.getAttribute("data-subcircuit-connectivity-map-key")||n.netLabelIdToKey.get(o.getAttribute("data-schematic-net-label-id"))||n.textIdToKey.get(o.getAttribute("data-schematic-text-id"))||(i?.type==="schematic_trace"?i.subcircuit_connectivity_map_key||e.filter(r=>r.type==="source_trace").find(r=>r.source_trace_id===i.source_trace_id)?.subcircuit_connectivity_map_key:void 0)}function kMi(t,e){const n=cje(t),o=t.filter(u=>u.type==="source_trace"),i=t.filter(u=>u.type==="schematic_trace"),r=t.filter(u=>u.type==="schematic_sheet"),s=r[0]?.schematic_sheet_id,a=[];for(const u of i)if((u.subcircuit_connectivity_map_key??o.find(h=>h.source_trace_id===u.source_trace_id)?.subcircuit_connectivity_map_key)===e)for(const h of u.edges)a.push({a:h.from,b:h.to,sheet:u.schematic_sheet_id??s,target:{type:"schematic_trace",id:u.schematic_trace_id},sourceTraceId:u.source_trace_id,portIds:[h.from_schematic_port_id,h.to_schematic_port_id].filter(d=>!!d),junctions:u.junctions});for(const u of t)if(u.type==="schematic_net_label"&&n.netLabelIdToKey.get(u.schematic_net_label_id)===e){const g=u.anchor_position??u.center;a.push({a:g,b:g,sheet:u.schematic_sheet_id??s,target:{type:"schematic_net_label",id:u.schematic_net_label_id},name:u.text})}for(const u of t){if(u.type!=="schematic_text"||n.textIdToKey.get(u.schematic_text_id)!==e)continue;const g=u.schematic_sheet_id??s,d=a.filter(p=>p.sheet===g&&p.sourceTraceId===u.source_trace_id).sort((p,m)=>Zun(u.position,p.a,p.b)-Zun(u.position,m.a,m.b))[0]?.a??u.position;a.push({a:d,b:d,sheet:g,target:{type:"schematic_text",id:u.schematic_text_id},name:u.text})}const A=a.map((u,g)=>g),c=u=>A[u]===u?u:A[u]=c(A[u]);for(let u=0;u<a.length;u++)for(let g=0;g<u;g++){const h=a[u],d=a[g];h.sheet===d.sheet&&(RT(h.a,d.a,d.b)||RT(h.b,d.a,d.b)||RT(d.a,h.a,h.b)||RT(d.b,h.a,h.b)||[...h.junctions??[],...d.junctions??[]].some(p=>RT(p,h.a,h.b)&&RT(p,d.a,d.b)))&&(A[c(u)]=c(g))}const l=new Map;return a.forEach((u,g)=>l.set(c(g),[...l.get(c(g))??[],u])),[...l.values()].map((u,g)=>{const h=u.find(f=>f.target.type!=="schematic_trace")??u[0],p=t.filter(f=>f.type==="schematic_port").filter(f=>(f.schematic_sheet_id??s)===h.sheet&&u.some(I=>I.portIds?.includes(f.schematic_port_id)||RT(f.center,I.a,I.b))).map(f=>{const I=t.find(y=>y.type==="source_port"&&y.source_port_id===f.source_port_id);if(I?.type!=="source_port")return;const C=t.find(y=>y.type==="source_component"&&y.source_component_id===I.source_component_id);return C?.type==="source_component"?`${C.name}.${I.name??`pin${I.pin_number}`}`:void 0}).filter(f=>!!f).sort(),m=r.findIndex(f=>f.schematic_sheet_id===h.sheet);return{kind:"net",label:`${r[m]?.name??`Sheet ${Math.max(0,m)+1}`}: ${p[0]??h.name??`Location ${g+1}`}`,schematicSheetId:h.sheet,target:h.target,focusPoint:{x:(h.a.x+h.b.x)/2,y:(h.a.y+h.b.y)/2}}})}var FMi="https://jscdn.tscircuit.com/@tscircuit/circuit-json-schematic-placement-analysis/latest/dist/browser.js",LMi={async load(){const t=await import(FMi);if(typeof t.createSchematicPlacementIssueArtifacts!="function")throw new Error("The style analyzer module does not export its analysis function.");return t}},ME={contextMenu:110,styleAnalysis:120,viewMenu:55,viewMenuIcon:48,clickToInteractOverlay:100,schematicComponentDetailsTooltip:105,schematicComponentHoverOutline:47,schematicPortHoverOutline:48,schematicSearch:101},HMi=({circuitJson:t,onClose:e})=>{const[n,o]=ee.useState({status:"loading"});return ee.useEffect(()=>{let i=!1;const r=window.setTimeout(async()=>{try{const{createSchematicPlacementIssueArtifacts:s}=await LMi.load();if(i)return;const a=s(t);i||o({status:"complete",artifacts:a})}catch(s){i||o({status:"error",message:s instanceof Error?s.message:String(s)})}},0);return()=>{i=!0,window.clearTimeout(r)}},[t]),K.jsx(r_e,{open:!0,onOpenChange:i=>!i&&e(),children:K.jsxs(s_e,{children:[K.jsx(wZ,{style:{position:"fixed",inset:0,background:"#0008",zIndex:ME.styleAnalysis}}),K.jsxs(MZ,{style:{position:"fixed",top:"5vh",left:"50%",transform:"translateX(-50%)",width:"min(1000px, 94vw)",maxHeight:"90vh",overflowY:"auto",boxSizing:"border-box",padding:24,borderRadius:12,background:"#fafafa",color:"#171717",fontFamily:"system-ui, sans-serif",boxShadow:"0 20px 60px #0005",zIndex:ME.styleAnalysis},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:16},children:[K.jsx(a_e,{style:{margin:0,fontSize:22},children:"Style Analysis"}),K.jsx(VWe,{style:{cursor:"pointer",padding:"6px 12px"},children:"Close"})]}),K.jsx(A_e,{style:{color:"#525252"},children:"Placement and style issues across all schematic sheets. Each image highlights one issue with its description below."}),n.status==="loading"&&K.jsx("p",{role:"status",children:"Running style analysis…"}),n.status==="error"&&K.jsxs("p",{role:"alert",children:["Style analysis failed: ",n.message]}),n.status==="complete"&&K.jsxs(K.Fragment,{children:[K.jsx("p",{role:"status",children:n.artifacts.length===0?"No style issues found.":`${n.artifacts.length} style ${n.artifacts.length===1?"issue":"issues"} found.`}),n.artifacts.map(i=>K.jsxs("section",{style:{marginTop:24,border:"1px solid #ddd",borderRadius:8,overflow:"hidden",background:"white"},children:[K.jsxs("h3",{style:{margin:16,fontSize:16},children:[i.issueIndex+1,"."," ",i.issue.lineItemType.replace(/([a-z])([A-Z])/g,"$1 $2"),i.schematicSheetId&&K.jsxs("small",{style:{display:"block",marginTop:4,color:"#525252"},children:["Sheet: ",i.schematicSheetId]})]}),K.jsx("img",{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(i.content)}`,alt:i.descriptionXml,loading:"lazy",style:{display:"block",width:"100%",height:"auto"}})]},i.issueIndex))]})]})]})})},DU={IS_SHOWING_SCHEMATIC_GROUPS:"schematic_viewer_show_groups",IS_SHOWING_SCHEMATIC_PORTS:"schematic_viewer_show_ports",SELECTED_SCHEMATIC_SHEET:"schematic_viewer_selected_sheet"},egn=(t,e)=>{if(typeof window>"u")return e;try{const n=localStorage.getItem(t);return n!==null?JSON.parse(n):e}catch{return e}},tgn=(t,e)=>{if(!(typeof window>"u"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},OMi=t=>{if(typeof window>"u")return null;try{return localStorage.getItem(t)}catch{return null}},GMi=(t,e)=>{if(!(typeof window>"u"))try{localStorage.setItem(t,e)}catch{}},ngn=["#8B0000","#2F4F4F","#191970","#006400","#FF4500","#800080","#2E8B57","#B8860B","#C71585","#008B8B"],YMi=t=>{const{svgDivRef:e,circuitJson:n,circuitJsonKey:o,showGroups:i}=t;ee.useEffect(()=>{if(e.current&&e.current.querySelectorAll(".schematic-group-overlay").forEach(a=>a.remove()),!e.current||!i||!n||n.length===0)return;const r=setTimeout(()=>{if(!e.current)return;const s=e.current.querySelector("svg");if(!s)return;s.querySelectorAll(".schematic-group-overlay").forEach(A=>A.remove());try{const A=O3(n).source_group?.list().filter(f=>!f.is_subcircuit)||[],c=O3(n).schematic_component?.list()||[],l=new Map;A.forEach(f=>{const I=f;if(I.parent_source_group_id){const C=l.get(I.parent_source_group_id)||[];C.push(f.source_group_id),l.set(I.parent_source_group_id,C)}});const u=f=>{const I=[],C=l.get(f)||[];for(const y of C)I.push(y),I.push(...u(y));return I},g=f=>{const I=A.find(C=>C.source_group_id===f);return I?.parent_source_group_id?1+g(I.parent_source_group_id):0},h=A.length>0&&A.some(f=>f.name&&f.name.trim()!=="");let d=[];if(h){const f=new Map;for(const I of c){const C=O3(n).source_component.get(I.source_component_id);C?.source_group_id&&(f.has(C.source_group_id)||f.set(C.source_group_id,[]),f.get(C.source_group_id).push(I))}A.forEach((I,C)=>{let y=f.get(I.source_group_id)||[];const x=u(I.source_group_id);for(const E of x){const B=f.get(E)||[];y=[...y,...B]}if(y.length>0){const E=g(I.source_group_id),B=u(I.source_group_id).length>0;if(I.name?.startsWith("unnamed_board"))return;d.push({id:I.source_group_id,name:I.name||`Group ${C+1}`,components:y,color:ngn[C%ngn.length],depthLevel:E,hasChildren:B,sourceGroupId:I.source_group_id})}})}const p=s.viewBox.baseVal,m=s.getBoundingClientRect(),_=Math.min(m.width/p.width,m.height/p.height)||1;d.sort((f,I)=>f.depthLevel-I.depthLevel),d.forEach(f=>{if(f.components.length===0)return;const I=UMi(f.components,s);if(!I)return;const C=Math.max(8,Math.min(25,15/Math.max(_,.3))),y=f.hasChildren?C*.6:0,x=C+y,E=Math.max(1,2/Math.max(_,.5)),B=f.depthLevel===0?E:E*.7,S=Math.max(4,8/Math.max(_,.5)),Q=f.hasChildren?1.3:1,w=S*Q,M=w*.5,k=document.createElementNS("http://www.w3.org/2000/svg","rect");k.setAttribute("class","schematic-group-overlay"),k.setAttribute("x",(I.minX-x).toString()),k.setAttribute("y",(I.minY-x).toString()),k.setAttribute("width",(I.maxX-I.minX+x*2).toString()),k.setAttribute("height",(I.maxY-I.minY+x*2).toString()),k.setAttribute("fill","none"),k.setAttribute("stroke",f.color),k.setAttribute("stroke-width",B.toString()),k.setAttribute("stroke-dasharray",`${w},${M}`),k.setAttribute("opacity","0.8"),k.setAttribute("rx","0"),k.setAttribute("ry","0");const R=Math.max(6,Math.min(20,14/Math.max(_,.2))),F=f.depthLevel===0||f.depthLevel===1?0:f.depthLevel*.2,O=R*(1-F),U=Math.max(1,O*.2),Y=f.name,W=document.createElementNS("http://www.w3.org/2000/svg","text");W.setAttribute("font-size",O.toString()),W.setAttribute("font-family","Arial, sans-serif"),W.textContent=Y,s.appendChild(W);const te=W.getBBox();s.removeChild(W);const j=te.width+U*2,J=O+U*2,oe=I.minX-x,ie=I.minY-x-J,ne=document.createElementNS("http://www.w3.org/2000/svg","rect");ne.setAttribute("class","schematic-group-overlay"),ne.setAttribute("x",oe.toString()),ne.setAttribute("y",(ie-J).toString()),ne.setAttribute("width",j.toString()),ne.setAttribute("height",J.toString()),ne.setAttribute("fill","transparent"),ne.setAttribute("rx","0"),ne.setAttribute("ry","0");const le=document.createElementNS("http://www.w3.org/2000/svg","text");le.setAttribute("class","schematic-group-overlay"),le.setAttribute("x",(oe+U).toString()),le.setAttribute("y",(ie+J-U).toString()),le.setAttribute("fill",f.color),le.setAttribute("font-size",O.toString()),le.setAttribute("font-family","Arial, sans-serif"),le.setAttribute("font-weight",f.depthLevel===0?"600":"500"),le.setAttribute("stroke",f.color),le.setAttribute("stroke-width",Math.max(.2,O*.02).toString()),le.textContent=Y,s.appendChild(k),s.appendChild(ne),s.appendChild(le)})}catch(A){console.error("Error creating group overlays:",A)}},10);return()=>clearTimeout(r)},[e,o,i])};function UMi(t,e){let n=1/0,o=1/0,i=-1/0,r=-1/0;for(const a of t){let A=e.querySelector(`g[data-schematic-component-id="${a.schematic_component_id}"]`);if(A||(A=e.querySelector(`[data-schematic-component-id="${a.schematic_component_id}"]`)),A){const c=A.getBBox();n=Math.min(n,c.x),o=Math.min(o,c.y),i=Math.max(i,c.x+c.width),r=Math.max(r,c.y+c.height)}}return n===1/0?null:{minX:n,minY:o,maxX:i,maxY:r}}var lje="sch-net-faded",ogn="g.trace[data-subcircuit-connectivity-map-key], g.trace-overlays[data-subcircuit-connectivity-map-key]",uje="[data-schematic-net-label-id], [data-schematic-text-id]",KMi=({svgDivRef:t,circuitJson:e,circuitJsonKey:n,enabled:o})=>{ee.useEffect(()=>{const i=t.current;if(!o||!i)return;const{componentIdToKeys:r,netLabelIdToKey:s,textIdToKey:a}=cje(e);let A=[];const c=new Map;let l=null;const u=()=>{for(const{el:_}of A)_.classList.remove(lje);A=[],c.clear(),l=null;const m=i.querySelector("svg");if(m){for(const _ of Array.from(m.querySelectorAll(ogn))){const f=_.getAttribute("data-subcircuit-connectivity-map-key"),I=new Set;f&&(I.add(f),c.set(_,f)),A.push({el:_,keys:I})}for(const _ of Array.from(m.querySelectorAll("g[data-schematic-component-id]"))){const f=_.getAttribute("data-schematic-component-id");A.push({el:_,keys:r.get(f)??new Set})}for(const _ of Array.from(m.querySelectorAll(uje))){const f=s.get(_.getAttribute("data-schematic-net-label-id"))??a.get(_.getAttribute("data-schematic-text-id")),I=new Set;f&&(I.add(f),c.set(_,f)),A.push({el:_,keys:I})}}},g=m=>{if(m!==l){l=m;for(const{el:_,keys:f}of A)_.classList.toggle(lje,m!==null&&!f.has(m))}},h=m=>{const _=m.target;if(!(_ instanceof Element)){g(null);return}const f=_.closest(`${ogn}, ${uje}`);if(f&&c.has(f)){g(c.get(f));return}for(const[I,C]of c){if(!I.matches(uje))continue;const y=I.getBoundingClientRect();if(m.clientX>=y.left-6&&m.clientX<=y.right+6&&m.clientY>=y.top-6&&m.clientY<=y.bottom+6){g(C);return}}g(null)},d=()=>g(null);u(),i.addEventListener("mousemove",h),i.addEventListener("mouseleave",d);const p=new MutationObserver(u);return p.observe(i,{childList:!0}),()=>{p.disconnect(),i.removeEventListener("mousemove",h),i.removeEventListener("mouseleave",d);for(const{el:m}of A)m.classList.remove(lje)}},[t,n,o])},gje="http://www.w3.org/2000/svg",VMi=({svgDivRef:t,svgContent:e,circuitJsonKey:n})=>{const o=ee.useRef(new Set);ee.useLayoutEffect(()=>{o.current.clear()},[n]),ee.useLayoutEffect(()=>{const i=[];for(const r of t.current?.querySelectorAll(".schematic-warning")??[]){const s=r.getAttribute("data-warning-id"),a=r.querySelector('[data-warning-reference="callout"]');if(!s||!a)continue;const A=Array.from(r.children),c=A.map(I=>I.style.display),l=r.getAttribute("role"),u=r.getAttribute("aria-label")??"Warning",g=document.createElementNS(gje,"g");g.setAttribute("data-warning-icon",""),g.setAttribute("aria-hidden","true"),g.setAttribute("transform",`translate(${a.getAttribute("x")} ${a.getAttribute("y")})`);const h=document.createElementNS(gje,"rect");h.setAttribute("width","24"),h.setAttribute("height","24"),h.setAttribute("fill",a.getAttribute("fill")??"#fffaeb"),h.setAttribute("stroke",a.getAttribute("stroke")??"#d99a00"),h.setAttribute("stroke-width","1");const d=document.createElementNS(gje,"text");d.setAttribute("x","12"),d.setAttribute("y","12"),d.setAttribute("dominant-baseline","central"),d.setAttribute("text-anchor","middle"),d.setAttribute("font-size","16"),d.setAttribute("font-family","sans-serif"),d.setAttribute("font-weight","bold"),d.setAttribute("fill","#5c4300"),d.textContent="!",g.append(h,d),r.append(g),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.style.cursor="pointer",r.style.outline="none";const p=()=>{const I=o.current.has(s);A.forEach((C,y)=>{C.style.display=I?"none":c[y]}),g.style.display=I?"":"none",r.setAttribute("aria-expanded",String(!I)),r.setAttribute("aria-label",`${I?"Expand":"Minimize"} warning: ${u}`)},m=I=>{I.preventDefault(),I.stopPropagation(),o.current.has(s)?o.current.delete(s):o.current.add(s),p()},_=I=>{(I.key==="Enter"||I.key===" ")&&(I.repeat?I.preventDefault():m(I))},f=I=>I.stopPropagation();r.addEventListener("click",m),r.addEventListener("keydown",_),r.addEventListener("mousedown",f),r.addEventListener("touchstart",f),p(),i.push(()=>{r.removeEventListener("click",m),r.removeEventListener("keydown",_),r.removeEventListener("mousedown",f),r.removeEventListener("touchstart",f),g.remove(),A.forEach((I,C)=>{I.style.display=c[C]}),l?r.setAttribute("role",l):r.removeAttribute("role"),r.setAttribute("aria-label",u),r.removeAttribute("aria-expanded"),r.removeAttribute("tabindex"),r.style.removeProperty("cursor"),r.style.removeProperty("outline")})}return()=>i.forEach(r=>r())},[t,e,n])},dje=t=>String(t??"").toLocaleLowerCase(),UZ=(t,e)=>{const n=dje(t);return n===e?0:n.startsWith(e)?1:n.includes(e)?2:Number.POSITIVE_INFINITY},zMi=t=>{if(t)return String(t).replace(/^simple_/,"").replaceAll("_"," ").replace(/\b\w/g,e=>e.toLocaleUpperCase())},JMi=(t,e,n)=>{let i=zMi(t?.ftype);t?.ftype==="simple_chip"&&t.manufacturer_part_number&&(i=t.manufacturer_part_number);const r=[];t?.display_name===n&&t.name!==n&&r.push(t.name);let s=t?.display_value;if(!s&&t){for(const a of["display_resistance","display_capacitance","display_inductance","display_frequency","symbol_display_value"])if(a in t){const A=t[a];if(typeof A=="string"){s=A;break}}}if(s??(s=e.symbol_display_value),i&&r.push(i),s&&r.push(s),!i&&!s&&t?.manufacturer_part_number&&r.push(t.manufacturer_part_number),r.length!==0)return r.join(" · ")},WMi=t=>t.type==="source_component"&&"source_component_id"in t,jMi=t=>t.type==="source_port",$Mi=t=>t.type==="source_trace",qMi=t=>t.type==="schematic_component",XMi=t=>t.type==="schematic_port",ZMi=t=>t.type==="schematic_net_label",eDi=t=>t.type==="schematic_sheet",hje=({schematicSheets:t,schematicSheetId:e})=>{if(!(t.length<=1||!e))return t.find(n=>n.schematic_sheet_id===e)?.name},tDi=(t,e)=>{const n=dje(e).trim();if(!n)return[];const o=new Map(t.filter(WMi).map(l=>[l.source_component_id,l])),i=new Map(t.filter(jMi).map(l=>[l.source_port_id,l])),r=t.filter(XMi),s=t.filter($Mi),a=t.filter(eDi),A=[],c=new Map;for(const l of t.filter(qMi)){const u=l.source_component_id?o.get(l.source_component_id):void 0,g=u?.display_name??u?.name??"Component",h=Math.min(UZ(u?.name,n),UZ(u?.display_name,n),UZ(u?.manufacturer_part_number,n));if(Number.isFinite(h)){const d={label:g,detail:JMi(u,l,g),kind:"component",schematicSheetId:l.schematic_sheet_id,schematicSheetName:hje({schematicSheets:a,schematicSheetId:l.schematic_sheet_id}),target:{type:"schematic_component",id:l.schematic_component_id}};A.push(d),c.set(d,h)}}for(const l of t.filter(ZMi)){if(!dje(l.text).includes(n))continue;const u=new Set;for(const I of s.filter(C=>C.connected_source_net_ids.includes(l.source_net_id)))for(const C of I.connected_source_port_ids)u.add(C);const g=l.anchor_position??l.center,h=r.filter(I=>u.has(I.source_port_id)&&(!l.schematic_sheet_id||!I.schematic_sheet_id||I.schematic_sheet_id===l.schematic_sheet_id)).map(I=>({port:I,distance:Math.hypot(I.center.x-g.x,I.center.y-g.y)})).filter(({distance:I})=>I<=1).sort((I,C)=>I.distance-C.distance)[0]?.port,d=h?i.get(h.source_port_id):void 0,p=d?.source_component_id?o.get(d.source_component_id):void 0,m=d?.name??(d?.pin_number!==void 0?`pin${d.pin_number}`:h?.display_pin_label),_=p?.name&&m?`Connected to ${p.name}.${m}`:void 0,f={label:l.text,detail:_,kind:"net",schematicSheetId:l.schematic_sheet_id,schematicSheetName:hje({schematicSheets:a,schematicSheetId:l.schematic_sheet_id}),target:{type:"schematic_net_label",id:l.schematic_net_label_id}};A.push(f),c.set(f,UZ(l.text,n))}for(const l of t){if(l.type!=="schematic_text"||!l.source_trace_id)continue;const u=UZ(l.text,n);if(!Number.isFinite(u))continue;const g={label:l.text,kind:"net",schematicSheetId:l.schematic_sheet_id,schematicSheetName:hje({schematicSheets:a,schematicSheetId:l.schematic_sheet_id}),target:{type:"schematic_text",id:l.schematic_text_id}};A.push(g),c.set(g,u)}return A.sort((l,u)=>(c.get(l)??Number.POSITIVE_INFINITY)-(c.get(u)??Number.POSITIVE_INFINITY)||l.label.localeCompare(u.label))},nDi=({containerRect:t,targetRect:e,visibleProjection:n,minimumScale:o})=>{const i=n.a||1,r={x:e.left+e.width/2-t.left,y:e.top+e.height/2-t.top},s={x:(r.x-n.e)/i,y:(r.y-n.f)/i},a=Math.max(i,o);return{a,b:0,c:0,d:a,e:t.width/2-s.x*a,f:t.height/2-s.y*a}},oDi=1.8,ign=350,iDi=({controller:t,circuitJson:e,circuitJsonKey:n,svgDivRef:o,containerRef:i,activeSheetId:r,hasMultipleSheets:s,handleSelectSheet:a,svgString:A,svgToScreenProjection:c,setSvgToScreenProjection:l,setIsInteractionEnabled:u})=>{const[g,h]=ee.useState(""),[d,p]=ee.useState(null),m=ee.useRef(null),_=ee.useMemo(()=>tDi(e,g),[e,n,g]),f=ee.useCallback(E=>{const B=o.current,S=i.current;if(!B||!S)return!1;const Q=`data-${E.target.type.replaceAll("_","-")}-id`,w=Array.from(B.querySelectorAll(`[${Q}]`)).find(O=>O.getAttribute(Q)===E.target.id);if(!w)return!1;let M=w.getBoundingClientRect();if(E.focusPoint){const O=w.closest("svg"),U=O?.getAttribute("data-real-to-screen-transform"),Y=O?.getScreenCTM?.();if(U&&Y){const W=Bn(Y,Bn(BV(U),E.focusPoint));M={left:W.x-1,top:W.y-1,width:2,height:2}}}const k=S.getBoundingClientRect();if(!k.width||!k.height||!M.width&&!M.height)return!1;m.current&&clearTimeout(m.current);let R=c;const F=getComputedStyle(B).transform;if(F&&F!=="none")try{R=BV(F),B.style.transition="none",B.style.transform=F,B.offsetWidth}catch{}return B.style.transition=`transform ${ign}ms ease-in-out`,B.offsetWidth,l(nDi({containerRect:k,targetRect:M,visibleProjection:R,minimumScale:oDi})),m.current=setTimeout(()=>{B.style.transition=""},ign),B.querySelectorAll(".schematic-search-match").forEach(O=>O.classList.remove("schematic-search-match")),B.querySelectorAll(`[${Q}]`).forEach(O=>{O.getAttribute(Q)===E.target.id&&O.classList.add("schematic-search-match")}),!0},[i,l,o,c]),I=ee.useCallback(E=>{if(u(!0),E.schematicSheetId&&E.schematicSheetId!==r&&s){a(E.schematicSheetId),p(E);return}f(E)},[r,f,a,s,u]),C=ee.useCallback(()=>{h(""),p(null),m.current&&(clearTimeout(m.current),m.current=null),o.current&&(o.current.style.transition="",o.current.querySelectorAll(".schematic-search-match").forEach(E=>E.classList.remove("schematic-search-match")))},[o]),y=t?.focusRequest,x=t?.onFocusRequestHandled;return ee.useEffect(()=>{if(!y)return;const E=e.find(B=>B.type==="schematic_component"&&B.schematic_component_id===y.schematicComponentId);if(E?.type!=="schematic_component"){p(null),x?.(y);return}u(!0),E.schematic_sheet_id&&s&&a(E.schematic_sheet_id),p({kind:"component",label:E.schematic_component_id,schematicSheetId:E.schematic_sheet_id,target:{type:"schematic_component",id:E.schematic_component_id}})},[y,x,e,n,s,a,u]),ee.useEffect(()=>{if(!d||!A||s&&d.schematicSheetId&&d.schematicSheetId!==r)return;const E=requestAnimationFrame(()=>{f(d)&&(p(null),y?.schematicComponentId===d.target.id&&x?.(y))});return()=>cancelAnimationFrame(E)},[f,y,x,d,A,s,r]),ee.useEffect(()=>{g||o.current?.querySelectorAll(".schematic-search-match").forEach(E=>E.classList.remove("schematic-search-match"))},[g,o]),ee.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),{searchQuery:g,setSearchQuery:h,searchResults:_,handleSearchResultSelect:I,handleCancelSearch:C}};vc("schematic-viewer");var rDi=()=>{vc.enable("schematic-viewer*")},rgn=t=>{const[e,n]=ee.useState(0),[o,i]=ee.useState(0);return ee.useEffect(()=>{if(!t.current)return;const r=()=>{const a=t.current?.getBoundingClientRect();n(a?.width||0),i(a?.height||0)};r();const s=new ResizeObserver(r);return s.observe(t.current),window.addEventListener("resize",r),()=>{s.disconnect(),window.removeEventListener("resize",r)}},[]),{containerWidth:e,containerHeight:o}},sDi=600,w_e=10,aDi=({containerRef:t})=>{const[e,n]=ee.useState(null),[o,i]=ee.useState(!1),[r,s]=ee.useState({x:0,y:0}),a=ee.useRef(null),A=ee.useRef(null),c=ee.useRef(null),l=ee.useRef(0),u=ee.useCallback(()=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null)},[]),g=ee.useCallback(_=>{if(_.preventDefault(),Date.now()<l.current)return;const f=A.current;if(!f)return;const I=Math.abs(_.clientX-f.x)>w_e||Math.abs(_.clientY-f.y)>w_e;A.current=null,!I&&(n(_.target instanceof Element?_.target:null),s({x:_.clientX,y:_.clientY}),i(!0))},[]),h=ee.useCallback(_=>{if(u(),_.touches.length!==1){A.current=null;return}const f=_.touches[0];if(!f)return;const I=_.target instanceof Element?_.target:null;A.current={x:f.clientX,y:f.clientY},c.current=window.setTimeout(()=>{const C=t.current;if(!C||!A.current)return;n(I);const y=C.getBoundingClientRect();s({x:y.left+y.width/2,y:y.top+y.height/2}),i(!0),l.current=Date.now()+1e3,A.current=null},sDi)},[u,t]),d=ee.useCallback(_=>{const f=A.current;if(!f||_.touches.length!==1)return;const I=_.touches[0];(!I||Math.abs(I.clientX-f.x)>w_e||Math.abs(I.clientY-f.y)>w_e)&&(A.current=null,u())},[u]),p=ee.useCallback(()=>{u(),A.current=null},[u]),m=ee.useCallback(_=>{const f=_.target;a.current?.contains(f)||f.closest?.("[data-radix-popper-content-wrapper], [data-radix-dropdown-menu-content]")||i(!1)},[]);return ee.useEffect(()=>{if(o)return document.addEventListener("mousedown",m),document.addEventListener("touchstart",m),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("touchstart",m)}},[m,o]),ee.useEffect(()=>u,[u]),{menuVisible:o,menuTarget:e,menuPos:r,menuRef:a,setMenuVisible:i,contextMenuEventHandlers:{onMouseDown:_=>{A.current=_.button===2||_.button===0&&_.ctrlKey?{x:_.clientX,y:_.clientY}:null},onContextMenu:g,onTouchStart:h,onTouchMove:d,onTouchEnd:p,onTouchCancel:p}}},ADi=(t,e,n)=>t.filter(o=>{if(!o.type.endsWith("_warning"))return!1;const i=o;return[["source_component",e.source_component_id],["schematic_component",e.schematic_component_id],["pcb_component",n?.pcb_component_id]].some(([s,a])=>{if(!a)return!1;const A=i[`${s}_ids`];return i[`${s}_id`]===a||Array.isArray(A)&&A.includes(a)||i.schematic_element_type===s&&i.schematic_element_id===a})}),cDi=new Set(["type","source_component_id","source_group_id","subcircuit_id","display_name","ftype","are_pins_interchangeable","supplier_part_numbers"]),sgn=["name","resistance","capacitance","inductance","frequency","voltage","current","max_voltage_rating","max_current_rating","power_rating","manufacturer_part_number"],lDi={jlcpcb:t=>`https://jlcpcb.com/partdetail/${encodeURIComponent(t)}`,lcsc:t=>`https://www.lcsc.com/product-detail/${encodeURIComponent(t)}.html`},uDi=t=>{const e=t.trim(),n=/^c?(\d+)$/i.exec(e);return n?`C${n[1]}`:e},agn=t=>{const e=sgn.indexOf(t);return e===-1?sgn.length:e},gDi=(t,e,n)=>{if(e==="name")return String(n);const o=t[`display_${e}`];if(typeof o=="string"&&o.trim()){const i=e==="resistance"?o.replace(/Ω$/,""):o;return JSON.stringify(i)}return JSON.stringify(n)??String(n)},dDi=t=>Object.entries(t).filter(([e,n])=>cDi.has(e)||e.startsWith("display_")&&e.slice(8)in t?!1:n!=null&&n!=="").sort(([e],[n])=>agn(e)-agn(n)||e.localeCompare(n)).map(([e,n])=>({key:e,label:e,value:gDi(t,e,n)})),hDi=t=>{const e=t.supplier_part_numbers;return e?["jlcpcb","lcsc"].flatMap(n=>{const o=e[n];if(!Array.isArray(o))return[];const i=[...new Set(o.filter(r=>!!(typeof r=="string"&&r.trim())).map(uDi))];return i.length?[{key:`supplier_part_numbers.${n}`,label:n,links:i.map(r=>({partNumber:r,href:lDi[n](r)}))}]:[]}):[]},pDi=(t,e)=>{const n=t.find(A=>A.type==="schematic_component"&&A.schematic_component_id===e);if(!n)return null;const o=t.find(A=>A.type==="source_component"&&A.source_component_id===n.source_component_id);if(!o)return null;const i=t.find(A=>A.type==="pcb_component"&&A.source_component_id===o.source_component_id),r=t.find(A=>A.type==="cad_component"&&A.source_component_id===o.source_component_id&&(!i||A.pcb_component_id===i.pcb_component_id)),s=i?.footprinter_string??r?.footprinter_string,a=i?mDi(t,i.pcb_component_id):null;return{schematicComponent:n,sourceComponent:o,pcbComponent:i,footprinterString:s,footprintPreviewCircuitJson:a?.circuitJson,footprintPreviewViewBox:a?.viewBox,warnings:ADi(t,n,i)}},P_e=2,mDi=(t,e)=>{const n=t.find(r=>r.type==="pcb_component"&&r.pcb_component_id===e);if(!n)return null;const o=q0n(n);if(!o)return null;const i={minX:o.minX-P_e,minY:o.minY-P_e,maxX:o.maxX+P_e,maxY:o.maxY+P_e};return{circuitJson:Bwi(t,i),viewBox:i}},_Di=t=>{let e="";for(let o=0;o<t.length;o+=8192)e+=String.fromCharCode(...t.subarray(o,o+8192));return btoa(e)},fDi=(t,e)=>{const n=_Di(RQe(TQe(JSON.stringify(t)))),o=new URL("https://svg.tscircuit.com/");return o.searchParams.set("svg_type","pcb"),o.searchParams.set("circuit_json",n),o.searchParams.set("viewbox",[e.minX,e.minY,e.maxX,e.maxY].join(",")),o.searchParams.set("background_color","#f8fafc"),o.toString()},pje=ee.createContext(null),IDi=5,CDi=(t,e)=>!t&&!e?!0:!t||!e?!1:t.minX===e.minX&&t.maxX===e.maxX&&t.minY===e.minY&&t.maxY===e.maxY,yDi=({children:t})=>ee.useContext(pje)?K.jsx(K.Fragment,{children:t}):K.jsx(xDi,{children:t}),xDi=({children:t})=>{const e=ee.useRef({pointer:null,boundingBoxes:new Map,hoveringIds:new Set,subscribers:new Set,mouseDownPosition:null}),n=ee.useCallback(()=>{for(const l of e.current.subscribers)l()},[]),o=ee.useCallback(()=>{const l=e.current.pointer,u=new Set;if(l)for(const[h,d]of e.current.boundingBoxes){const p=d.bounds;p&&l.x>=p.minX&&l.x<=p.maxX&&l.y>=p.minY&&l.y<=p.maxY&&u.add(h)}const g=e.current.hoveringIds;u.size===g.size&&[...u].every(h=>g.has(h))||(e.current.hoveringIds=u,n())},[n]),i=ee.useCallback((l,u)=>{e.current.boundingBoxes.set(l,u),o()},[o]),r=ee.useCallback((l,u)=>{const g=e.current.boundingBoxes.get(l);g&&CDi(g.bounds,u.bounds)&&g.onClick===u.onClick||(e.current.boundingBoxes.set(l,u),o())},[o]),s=ee.useCallback(l=>{e.current.boundingBoxes.delete(l)&&o()},[o]),a=ee.useCallback(l=>(e.current.subscribers.add(l),()=>{e.current.subscribers.delete(l)}),[]),A=ee.useCallback(l=>e.current.hoveringIds.has(l),[]);ee.useEffect(()=>{const l=d=>{const{clientX:p,clientY:m}=d,_=e.current.pointer;_&&_.x===p&&_.y===m||(e.current.pointer={x:p,y:m},o())},u=()=>{e.current.pointer!==null&&(e.current.pointer=null,e.current.mouseDownPosition=null,o())},g=d=>{e.current.mouseDownPosition={x:d.clientX,y:d.clientY}},h=d=>{const{clientX:p,clientY:m}=d,_=e.current.mouseDownPosition;if(_&&Math.sqrt(Math.pow(p-_.x,2)+Math.pow(m-_.y,2))>IDi){e.current.mouseDownPosition=null;return}e.current.mouseDownPosition=null;for(const f of e.current.boundingBoxes.values()){const I=f.bounds;I&&p>=I.minX&&p<=I.maxX&&m>=I.minY&&m<=I.maxY&&f.onClick?.(d)}};return window.addEventListener("pointermove",l,{passive:!0}),window.addEventListener("pointerdown",l,{passive:!0}),window.addEventListener("pointerup",l,{passive:!0}),window.addEventListener("pointerleave",u),window.addEventListener("pointercancel",u),window.addEventListener("blur",u),window.addEventListener("mousedown",g,{passive:!0}),window.addEventListener("click",h,{passive:!0}),()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerdown",l),window.removeEventListener("pointerup",l),window.removeEventListener("pointerleave",u),window.removeEventListener("pointercancel",u),window.removeEventListener("blur",u),window.removeEventListener("mousedown",g),window.removeEventListener("click",h)}},[o]);const c=ee.useMemo(()=>({registerBoundingBox:i,updateBoundingBox:r,unregisterBoundingBox:s,subscribe:a,isHovering:A}),[i,r,s,a,A]);return K.jsx(pje.Provider,{value:c,children:t})},mje={color:"#64748b",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace',fontSize:"12px",lineHeight:1.45},EDi=({sourceComponent:t,warnings:e=[],footprinterString:n,footprintPreviewCircuitJson:o,footprintPreviewViewBox:i,left:r,top:s,width:a,maxHeight:A})=>{const c=ee.useMemo(()=>dDi(t),[t]),l=ee.useMemo(()=>hDi(t),[t]),u=ee.useMemo(()=>o?.length&&i?fDi(o,i):void 0,[o,i]);return K.jsxs("dialog",{open:!0,"aria-label":`${t.name} component details`,"data-schematic-component-details-tooltip":!0,style:{position:"absolute",left:r,right:"auto",top:s,bottom:"auto",width:a,maxHeight:A,margin:0,padding:0,overflowY:"auto",boxSizing:"border-box",border:"1px solid #cbd5e1",borderRadius:"4px",backgroundColor:"rgba(255, 255, 255, 0.98)",boxShadow:"0 20px 25px -5px rgba(15, 23, 42, 0.18), 0 8px 10px -6px rgba(15, 23, 42, 0.12)",color:"#0f172a",fontFamily:'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',pointerEvents:"auto",userSelect:"text",WebkitUserSelect:"text",zIndex:ME.schematicComponentDetailsTooltip},onMouseDown:g=>g.stopPropagation(),onClick:g=>g.stopPropagation(),children:[K.jsxs("dl",{style:{display:"grid",gridTemplateColumns:"minmax(110px, 0.8fr) minmax(0, 1.2fr)",gap:"6px 12px",margin:0,padding:"8px"},children:[c.map(g=>K.jsxs("div",{style:{display:"contents"},children:[K.jsx("dt",{style:mje,children:g.label}),K.jsx("dd",{style:{minWidth:0,margin:0,color:"#1e293b",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace',fontSize:"12px",lineHeight:1.45,overflowWrap:"anywhere"},children:g.value})]},g.key)),l.map(g=>K.jsxs("div",{style:{display:"contents"},children:[K.jsx("dt",{style:mje,children:g.label}),K.jsx("dd",{style:{minWidth:0,margin:0,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace',fontSize:"12px",lineHeight:1.45,overflowWrap:"anywhere"},children:g.links.map((h,d)=>K.jsxs("span",{children:[d>0&&", ",K.jsx("a",{href:h.href,target:"_blank",rel:"noreferrer noopener",style:{color:"#2563eb",textDecoration:"underline"},children:h.partNumber})]},h.href))})]},g.key)),n&&K.jsxs("div",{style:{display:"contents"},children:[K.jsx("dt",{style:mje,children:"footprint"}),K.jsx("dd",{style:{minWidth:0,margin:0,color:"#1e293b",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace',fontSize:"12px",lineHeight:1.45,overflowWrap:"anywhere"},children:JSON.stringify(n)})]})]}),e.length>0&&K.jsxs("section",{"aria-label":"Component warnings",style:{margin:"0 8px 8px",padding:"8px",border:"1px solid #fcd34d",borderRadius:"4px",backgroundColor:"#fffbeb",color:"#92400e",fontSize:"12px",lineHeight:1.45,overflowWrap:"anywhere"},children:[K.jsxs("strong",{children:["Warnings (",e.length,")"]}),K.jsx("ul",{style:{margin:"4px 0 0",paddingLeft:"18px"},children:e.map((g,h)=>K.jsx("li",{children:g.message},`${g.type}-${h}`))})]}),u&&K.jsx("div",{style:{padding:"0 4px 4px"},children:K.jsx("div",{style:{height:"210px",overflow:"hidden",border:"1px solid #e2e8f0",borderRadius:"2px",background:"#f8fafc"},children:K.jsx("img",{src:u,alt:`${t.name}${n?` ${n}`:""} PCB footprint`,loading:"lazy",referrerPolicy:"no-referrer",style:{display:"block",width:"100%",height:"100%",objectFit:"contain"}})})})]})},Agn=t=>{const e=ee.useContext(pje);if(!e)throw new Error("useMouseEventsOverBoundingBox must be used within a MouseTracker");const n=ee.useId(),o=ee.useRef(t);o.current=t;const i=ee.useMemo(()=>s=>{o.current.onClick?.(s)},[]);return ee.useEffect(()=>(e.registerBoundingBox(n,{bounds:o.current.bounds,onClick:o.current.onClick?i:void 0}),()=>{e.unregisterBoundingBox(n)}),[e,i,n]),ee.useEffect(()=>{e.updateBoundingBox(n,{bounds:o.current.bounds,onClick:o.current.onClick?i:void 0})},[e,i,n,t.bounds?.minX,t.bounds?.maxX,t.bounds?.minY,t.bounds?.maxY,t.onClick]),{hovering:ee.useSyncExternalStore(e.subscribe,()=>e.isHovering(n),()=>!1)}},BDi=(t,e)=>!t&&!e?!0:!t||!e?!1:Math.abs(t.bounds.minX-e.bounds.minX)<.5&&Math.abs(t.bounds.maxX-e.bounds.maxX)<.5&&Math.abs(t.bounds.minY-e.bounds.minY)<.5&&Math.abs(t.bounds.maxY-e.bounds.maxY)<.5&&Math.abs(t.rect.left-e.rect.left)<.5&&Math.abs(t.rect.top-e.rect.top)<.5&&Math.abs(t.rect.width-e.rect.width)<.5&&Math.abs(t.rect.height-e.rect.height)<.5,bDi=({componentId:t,svgDivRef:e,containerRef:n,onComponentClick:o,onHoverChange:i,showOutline:r,circuitJsonKey:s})=>{const[a,A]=ee.useState(null),c=ee.useRef(null),l=ee.useCallback(()=>{c.current=null;const m=e.current,_=n.current;if(!m||!_){A(x=>x&&null);return}const f=m.querySelector(`[data-schematic-component-id="${t}"]`);if(!f){A(x=>x&&null);return}const I=f.getBoundingClientRect(),C=_.getBoundingClientRect(),y={bounds:{minX:I.left,maxX:I.right,minY:I.top,maxY:I.bottom},rect:{left:I.left-C.left,top:I.top-C.top,width:I.width,height:I.height}};A(x=>BDi(x,y)?x:y)},[t,n,e]),u=ee.useCallback(()=>{c.current===null&&(c.current=window.requestAnimationFrame(l))},[l]);ee.useEffect(()=>{u()},[u,s]),ee.useEffect(()=>{u();const m=e.current,_=n.current;if(!m||!_)return;const f=typeof ResizeObserver<"u"?new ResizeObserver(()=>{u()}):null;f?.observe(_),f?.observe(m);const I=typeof MutationObserver<"u"?new MutationObserver(()=>{u()}):null;return I?.observe(m,{attributes:!0,attributeFilter:["style","transform"],subtree:!0,childList:!0}),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),()=>{f?.disconnect(),I?.disconnect(),window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)}},[u,e,n]);const g=ee.useCallback(m=>{o&&o(t,m)},[t,o]),h=a?.bounds??null,{hovering:d}=Agn({bounds:h,onClick:o?g:void 0});if(ee.useEffect(()=>{i&&i(t,d)},[d,t,i]),!a||!d||!r)return null;const p=a.rect;return K.jsx("div",{style:{position:"absolute",left:p.left,top:p.top,width:p.width,height:p.height,border:"1.5px solid rgba(51, 153, 255, 0.9)",pointerEvents:"none",zIndex:ME.schematicComponentHoverOutline}})},SDi=(t,e)=>!t&&!e?!0:!t||!e?!1:Math.abs(t.bounds.minX-e.bounds.minX)<.5&&Math.abs(t.bounds.maxX-e.bounds.maxX)<.5&&Math.abs(t.bounds.minY-e.bounds.minY)<.5&&Math.abs(t.bounds.maxY-e.bounds.maxY)<.5&&Math.abs(t.rect.left-e.rect.left)<.5&&Math.abs(t.rect.top-e.rect.top)<.5&&Math.abs(t.rect.width-e.rect.width)<.5&&Math.abs(t.rect.height-e.rect.height)<.5,QDi=({portId:t,portLabel:e,svgDivRef:n,containerRef:o,onPortClick:i,onHoverChange:r,showOutline:s,circuitJsonKey:a})=>{const[A,c]=ee.useState(null),l=ee.useRef(null),u=ee.useCallback(()=>{l.current=null;const _=n.current,f=o.current;if(!_||!f){c(B=>B&&null);return}const I=_.querySelector(`[data-schematic-port-id="${t}"]`);if(!I){c(B=>B&&null);return}const C=I.getBoundingClientRect(),y=f.getBoundingClientRect(),x=4,E={bounds:{minX:C.left-x,maxX:C.right+x,minY:C.top-x,maxY:C.bottom+x},rect:{left:C.left-y.left-x,top:C.top-y.top-x,width:C.width+x*2,height:C.height+x*2}};c(B=>SDi(B,E)?B:E)},[t,o,n]),g=ee.useCallback(()=>{l.current===null&&(l.current=window.requestAnimationFrame(u))},[u]);ee.useEffect(()=>{g()},[g,a]),ee.useEffect(()=>{g();const _=n.current,f=o.current;if(!_||!f)return;const I=typeof ResizeObserver<"u"?new ResizeObserver(()=>{g()}):null;I?.observe(f),I?.observe(_);const C=typeof MutationObserver<"u"?new MutationObserver(()=>{g()}):null;return C?.observe(_,{attributes:!0,attributeFilter:["style","transform"],subtree:!0,childList:!0}),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{I?.disconnect(),C?.disconnect(),window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g),l.current!==null&&(cancelAnimationFrame(l.current),l.current=null)}},[g,n,o]);const h=ee.useCallback(_=>{i&&i(t,_)},[t,i]),d=A?.bounds??null,{hovering:p}=Agn({bounds:d,onClick:i?h:void 0});if(ee.useEffect(()=>{r&&r(t,p)},[p,t,r]),!A||!s)return null;const m=A.rect;return K.jsxs(K.Fragment,{children:[K.jsx("div",{style:{position:"absolute",left:m.left,top:m.top,width:m.width,height:m.height,border:p?"1.5px solid rgba(255, 153, 51, 0.9)":"1.5px solid rgba(255, 153, 51, 0.3)",backgroundColor:p?"rgba(255, 153, 51, 0.15)":"rgba(255, 153, 51, 0.05)",borderRadius:"50%",pointerEvents:"none",zIndex:ME.schematicPortHoverOutline,transition:"border-color 0.15s, background-color 0.15s"}}),p&&e&&K.jsx("div",{style:{position:"absolute",left:m.left+m.width/2,top:m.top-24,transform:"translateX(-50%)",backgroundColor:"rgba(0, 0, 0, 0.85)",color:"white",padding:"4px 8px",borderRadius:"4px",fontSize:"12px",fontFamily:"monospace",whiteSpace:"nowrap",pointerEvents:"none",zIndex:ME.schematicPortHoverOutline+1},children:e})]})},KZ=({children:t,size:e,strokeWidth:n})=>K.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),cgn=t=>K.jsxs(KZ,{...t,children:[K.jsx("circle",{cx:"11",cy:"11",r:"8"}),K.jsx("path",{d:"m21 21-4.34-4.34"})]}),vDi=t=>K.jsxs(KZ,{...t,children:[K.jsx("path",{d:"M18 6 6 18"}),K.jsx("path",{d:"m6 6 12 12"})]}),wDi=t=>K.jsxs(KZ,{...t,children:[K.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),K.jsx("rect",{x:"8",y:"8",width:"8",height:"8",rx:"1"}),K.jsx("path",{d:"M7 2v2M12 2v2M17 2v2M7 20v2M12 20v2M17 20v2M2 7h2M2 12h2M2 17h2M20 7h2M20 12h2M20 17h2"})]}),PDi=t=>K.jsxs(KZ,{...t,children:[K.jsx("path",{d:"M15 6a9 9 0 0 0-9 9V3"}),K.jsx("circle",{cx:"18",cy:"6",r:"3"}),K.jsx("circle",{cx:"6",cy:"18",r:"3"})]}),MDi=t=>K.jsxs(KZ,{...t,children:[K.jsx("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}),K.jsx("path",{d:"m9 10-5 5 5 5"})]}),DDi=({text:t,query:e})=>{const n=e.trim().toLocaleLowerCase();if(!n)return t;const o=t.toLocaleLowerCase(),i=[];let r=0,s=o.indexOf(n);for(;s!==-1;)s>r&&i.push(t.slice(r,s)),i.push(K.jsx("strong",{style:{fontWeight:700},children:t.slice(s,s+n.length)},`${s}-${r}`)),r=s+n.length,s=o.indexOf(n,r);return r<t.length&&i.push(t.slice(r)),i.length>0?i:t},NDi=()=>typeof navigator>"u"?"Ctrl F":/mac/i.test(navigator.platform)?"⌘ F":"Ctrl F",RDi=({query:t,onQueryChange:e,onCancel:n,results:o,onSelect:i,viewerContainerRef:r})=>{const[s,a]=ee.useState(!1),[A,c]=ee.useState(null),[l,u]=ee.useState(null),g=ee.useRef(null),h=ee.useRef(null),d=NDi();ee.useEffect(()=>{c(S=>o.some(Q=>Q.target.id===S)?S:o.find(Q=>Q.kind==="component")?.target.id??o[0]?.target.id??null)},[o]),ee.useEffect(()=>{A&&h.current?.querySelector(`[data-search-result-id="${A}"]`)?.scrollIntoView({behavior:"smooth",block:"nearest"})},[A]),ee.useEffect(()=>{const S=w=>{if(w.key==="Escape"&&s){w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation(),n(),a(!1),g.current?.blur();return}w.code!=="KeyF"&&w.key.toLocaleLowerCase()!=="f"||!w.metaKey&&!w.ctrlKey||r.current?.matches(":hover")&&(w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation(),a(!0),requestAnimationFrame(()=>{g.current?.focus(),g.current?.select()}))},Q=[window];try{window.parent!==window&&window.parent.document&&Q.push(window.parent)}catch{}return Q.forEach(w=>w.addEventListener("keydown",S,{capture:!0})),()=>{Q.forEach(w=>w.removeEventListener("keydown",S,{capture:!0}))}},[s,n,r]);const p=()=>{n(),a(!1),g.current?.blur()},m=S=>{a(!0),S&&requestAnimationFrame(()=>g.current?.focus())},_=o.filter(S=>S.kind==="component"),f=o.filter(S=>S.kind==="net"),I=[..._,...f],C=I.find(S=>S.target.id===A)??I[0],y=o.length===1?"1 result":`${o.length} results`;let x="none";t&&(x="1px solid #e8e8e8");const E=S=>{if(!(S.key==="Enter"&&S.target instanceof Element&&S.target.closest('[aria-label="Clear search"]'))){if(S.key==="Escape"){S.preventDefault(),p();return}if(I.length>0&&(S.key==="ArrowDown"||S.key==="ArrowUp")){S.preventDefault();let Q=-1;S.key==="ArrowDown"&&(Q=1),c(w=>{const M=I.findIndex(F=>F.target.id===w);let k=M;M===-1&&(k=0,Q===1&&(k=-1));const R=(k+Q+I.length)%I.length;return I[R]?.target.id??null});return}S.key==="Enter"&&C&&(S.preventDefault(),i(C))}},B=(S,Q)=>Q.length===0?null:K.jsxs("section",{children:[K.jsx("div",{style:{padding:"6px 12px 3px",backgroundColor:"#f7f7f8",color:"#777777",fontSize:"11px",fontWeight:600,letterSpacing:"0.02em",textTransform:"lowercase"},children:S}),Q.map(w=>{const M=w.target.id===C?.target.id,k=w.target.id===l;let R="#ffffff";(k||M)&&(R="#f1f3f5");let F=K.jsx(PDi,{size:15,strokeWidth:1.8});w.kind==="component"&&(F=K.jsx(wDi,{size:15,strokeWidth:1.8}));const O=()=>{g.current?.blur(),c(w.target.id),i(w)};return K.jsxs("button",{type:"button","data-search-result-id":w.target.id,onPointerUp:U=>{U.button===0&&O()},onClick:U=>{U.detail===0&&O()},onMouseEnter:()=>u(w.target.id),onMouseLeave:()=>u(null),style:{width:"100%",display:"flex",alignItems:"center",gap:"9px",padding:"7px 12px",border:"none",background:R,color:"#222222",cursor:"pointer",textAlign:"left"},children:[K.jsx("span",{style:{width:"26px",height:"26px",flexShrink:0,display:"grid",placeItems:"center",border:"1px solid #e5e5e5",borderRadius:"6px",backgroundColor:"#f7f7f7",color:"#666666"},children:F}),K.jsxs("span",{style:{minWidth:0,flex:1},children:[K.jsx("span",{style:{display:"block",overflow:"hidden",fontSize:"13px",fontWeight:400,lineHeight:1.25,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:K.jsx(DDi,{text:w.label,query:t})}),w.detail&&K.jsx("span",{style:{display:"block",overflow:"hidden",marginTop:"2px",color:"#777777",fontSize:"11px",lineHeight:1.2,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.detail}),w.schematicSheetName&&K.jsxs("span",{style:{display:"block",overflow:"hidden",marginTop:"2px",color:"#777777",fontSize:"11px",lineHeight:1.2,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["Sheet: ",w.schematicSheetName]})]}),M&&K.jsx("span",{title:"Press Enter to open",style:{flexShrink:0,color:"#666666",fontSize:"17px",lineHeight:1},children:K.jsx(MDi,{size:14,strokeWidth:1.8})})]},w.target.id)})]});return K.jsx("div",{"data-schematic-search":!0,onPointerDown:S=>S.stopPropagation(),onMouseDown:S=>S.stopPropagation(),onTouchStart:S=>S.stopPropagation(),onTouchEnd:S=>S.stopPropagation(),style:{position:"relative",zIndex:ME.schematicSearch,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},children:s?K.jsxs("div",{onKeyDown:E,style:{width:"min(280px, calc(100vw - 32px))",overflow:"hidden",border:"none",borderRadius:"4px",backgroundColor:"#ffffff",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",height:"32px",boxSizing:"border-box",padding:"0 12px",borderBottom:x},children:[K.jsx(cgn,{size:15,strokeWidth:2}),K.jsx("input",{ref:g,value:t,"aria-label":"Search components and nets",placeholder:"Search...",onPointerUp:S=>S.currentTarget.focus(),onChange:S=>e(S.target.value),style:{minWidth:0,flex:1,border:"none",outline:"none",fontSize:"13px",color:"#222222",background:"transparent"}}),t&&o.length>0?K.jsx("span",{style:{flexShrink:0,color:"#888888",fontSize:"12px",whiteSpace:"nowrap"},children:y}):K.jsx("kbd",{style:{flexShrink:0,padding:"2px 5px",border:"1px solid #dddddd",borderRadius:"4px",backgroundColor:"#f7f7f7",color:"#777777",fontFamily:"inherit",fontSize:"10px",lineHeight:1.2},children:d}),s&&K.jsx("button",{type:"button","aria-label":"Clear search",onPointerUp:S=>{S.button===0&&p()},onClick:S=>{S.detail===0&&p()},style:{border:"none",background:"transparent",color:"#777777",cursor:"pointer",width:"20px",height:"20px",display:"grid",placeItems:"center",padding:0,lineHeight:1},children:K.jsx(vDi,{size:16,strokeWidth:2})})]}),t&&K.jsx("div",{ref:h,style:{maxHeight:"240px",overflowX:"hidden",overflowY:"auto",overscrollBehavior:"contain",scrollBehavior:"smooth",touchAction:"pan-y",WebkitOverflowScrolling:"touch"},onWheel:S=>S.stopPropagation(),onTouchMove:S=>S.stopPropagation(),children:o.length===0?K.jsx("div",{style:{padding:"12px",color:"#777777",fontSize:"13px"},children:"No matching components or nets"}):K.jsxs(K.Fragment,{children:[B("components",_),B("nets",f)]})})]}):K.jsx("button",{type:"button",title:"Search schematic","aria-label":"Search schematic",onPointerDown:S=>{S.stopPropagation(),S.pointerType!=="mouse"&&m(!1)},onPointerUp:S=>{S.pointerType==="mouse"&&S.button===0&&m(!0)},onClick:S=>{S.detail===0&&m(!0)},style:{width:"32px",height:"32px",display:"grid",placeItems:"center",padding:0,border:"none",borderRadius:"4px",backgroundColor:"#ffffff",color:"#000000",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},children:K.jsx(cgn,{size:16,strokeWidth:2})})})},_je='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',TDi={backgroundColor:"#ffffff",color:"#111111",borderRadius:8,boxShadow:"0 6px 24px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08)",border:"1px solid #e5e7eb",padding:4,minWidth:200,maxWidth:320,maxHeight:320,overflowY:"auto",fontSize:13,fontFamily:_je,outline:"none",zIndex:ME.viewMenu},kDi={display:"flex",alignItems:"center",gap:8,padding:"7px 10px 7px 8px",borderRadius:6,cursor:"pointer",outline:"none",userSelect:"none",color:"#111111",fontSize:13,fontFamily:_je},FDi={width:16,height:16,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#111111"},lgn={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},LDi=`
.sv-sheet-item[data-highlighted], .sv-sheet-item:hover { background-color: #f1f3f5; }
.sv-sheet-chevron { transition: transform 0.2s ease; }
[data-state="open"] > .sv-sheet-chevron { transform: rotate(180deg); }
`,HDi=()=>K.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:K.jsx("path",{d:"M20 6 9 17l-5-5"})}),ODi=({className:t})=>K.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.6,flexShrink:0},"aria-hidden":"true",children:K.jsx("path",{d:"m6 9 6 6 6-6"})}),GDi=({sheets:t,selectedSheetId:e,onSelectSheet:n})=>{const[o,i]=ee.useState(!1);if(t.length<=1)return null;const s=t.find(a=>a.schematic_sheet_id===e)?.name??"Select sheet";return K.jsxs(K.Fragment,{children:[K.jsx("style",{children:LDi}),K.jsxs(e_e,{open:o,onOpenChange:i,modal:!1,children:[K.jsx(t_e,{asChild:!0,children:K.jsxs("button",{type:"button",title:s,onPointerDown:a=>a.stopPropagation(),style:{display:"flex",alignItems:"center",gap:"6px",maxWidth:"220px",height:"32px",boxSizing:"border-box",padding:"0 12px",backgroundColor:"#ffffff",color:"#000000",border:"none",outline:"none",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"13px",fontFamily:_je},children:[K.jsx("span",{style:{color:"#888888",flexShrink:0},children:"Sheet:"}),K.jsx("span",{style:{...lgn,minWidth:0},children:s}),K.jsx(ODi,{className:"sv-sheet-chevron"})]})}),K.jsx(EU,{children:K.jsx(bZ,{style:TDi,side:"bottom",align:"start",sideOffset:8,collisionPadding:10,children:t.map(a=>{const A=a.schematic_sheet_id===e;return K.jsxs(SS,{className:"sv-sheet-item",style:kDi,title:a.name,onSelect:c=>c.preventDefault(),onPointerUp:()=>{n(a.schematic_sheet_id),i(!1)},children:[K.jsx("span",{style:FDi,children:A&&K.jsx(HDi,{})}),K.jsx("span",{style:{...lgn,minWidth:0},children:a.name})]},a.schematic_sheet_id)})})})]})]})},YDi=({count:t,showWarnings:e,onToggle:n})=>{const o=`${e?"Hide":"Show"} ${t} ${t===1?"warning":"warnings"}`;return K.jsxs("button",{type:"button","data-schematic-warnings":!0,title:o,"aria-label":o,"aria-pressed":e,onClick:n,onPointerDown:i=>i.stopPropagation(),onMouseDown:i=>i.stopPropagation(),onTouchStart:i=>i.stopPropagation(),onTouchEnd:i=>i.stopPropagation(),style:{height:"32px",display:"flex",alignItems:"center",gap:"4px",padding:"0 8px",border:"none",borderRadius:"4px",backgroundColor:e?"#fff3cd":"#ffffff",color:"#946200",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontSize:"12px",fontWeight:600},children:[K.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[K.jsx("path",{d:"M10.3 3.9 1.8 18.1A2 2 0 0 0 3.5 21h17a2 2 0 0 0 1.7-2.9L13.7 3.9a2 2 0 0 0-3.4 0Z"}),K.jsx("path",{d:"M12 9v4m0 4h.01"})]}),K.jsx("span",{children:t})]})},UDi={version:"2.0.98"},fje='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',ugn={backgroundColor:"#262626",color:"#fafafa",borderRadius:6,boxShadow:"0px 12px 48px -12px rgba(0, 0, 0, 0.5), 0px 8px 24px -8px rgba(0, 0, 0, 0.3)",border:"1px solid #333333",padding:4,minWidth:208,fontSize:14,fontWeight:400,fontFamily:fje,outline:"none",zIndex:ME.contextMenu},TT={display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderRadius:6,cursor:"default",outline:"none",userSelect:"none",color:"#fafafa",fontSize:14,fontWeight:400,fontFamily:fje},VZ={width:16,height:16,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#fafafa"},ggn={height:1,backgroundColor:"#ffffff1a",margin:"4px 0"},KDi=`
.sv-vm-item[data-highlighted]:not([data-disabled]),
.sv-vm-item:hover:not([data-disabled]) { background-color: #404040; }
.sv-vm-item[data-disabled] { opacity: 0.45; cursor: not-allowed; }
`,M_e=()=>K.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:K.jsx("path",{d:"M20 6 9 17l-5-5"})}),VDi=({netLocations:t=[],onSelectNetLocation:e,circuitJson:n,circuitJsonKey:o,menuRef:i,menuPos:r,onOpenChange:s,onRunStyleAnalysis:a,showGroups:A,onToggleGroups:c,showGrid:l,onToggleGrid:u,showPorts:g,onTogglePorts:h,showWarnings:d,onToggleWarnings:p})=>{const m=ee.useMemo(()=>{if(!n||n.length===0)return!1;try{if((O3(n).source_group?.list()||[]).length>0)return!0;const I=O3(n).schematic_component?.list()||[];if(I.length>1){const C=new Set;for(const y of I){const x=O3(n).source_component.get(y.source_component_id);x?.ftype&&C.add(x.ftype)}return C.size>1}return!1}catch(f){return console.error("Error checking for groups:",f),!1}},[o]),_=ee.useMemo(()=>{if(!n||n.length===0)return!1;try{return(O3(n).schematic_port?.list()||[]).length>0}catch(f){return console.error("Error checking for schematic ports:",f),!1}},[o]);return K.jsx("div",{ref:i,style:{position:"fixed",left:r.x,top:r.y,width:0,height:0},children:K.jsxs(e_e,{open:!0,onOpenChange:s,modal:!1,children:[K.jsx(t_e,{asChild:!0,children:K.jsx("div",{style:{position:"absolute",width:1,height:1}})}),K.jsx(EU,{children:K.jsxs(bZ,{style:ugn,align:"start",sideOffset:0,collisionPadding:10,avoidCollisions:!0,children:[K.jsx("style",{children:KDi}),t.length>0&&K.jsxs(L0n,{children:[K.jsxs(GWe,{className:"sv-vm-item",style:TT,children:["Net Locations ",K.jsx("span",{style:{marginLeft:"auto"},children:"›"})]}),K.jsx(EU,{children:K.jsx(YWe,{style:{...ugn,maxHeight:"min(400px, var(--radix-dropdown-menu-content-available-height))",overflowY:"auto"},collisionPadding:10,children:t.map((f,I)=>K.jsx(SS,{className:"sv-vm-item",style:TT,onSelect:()=>e?.(f),children:f.label},I))})})]}),K.jsxs(SS,{className:"sv-vm-item",style:TT,disabled:!_,title:_?void 0:"No ports found in this schematic",onSelect:f=>f.preventDefault(),onPointerDown:f=>{f.preventDefault(),_&&h(!g)},children:[K.jsx("span",{style:VZ,children:g&&K.jsx(M_e,{})}),K.jsx("span",{children:"Show Schematic Ports"})]}),K.jsxs(SS,{className:"sv-vm-item",style:TT,disabled:!m,title:m?void 0:"No groups found in this schematic",onSelect:f=>f.preventDefault(),onPointerDown:f=>{f.preventDefault(),m&&c(!A)},children:[K.jsx("span",{style:VZ,children:A&&K.jsx(M_e,{})}),K.jsx("span",{children:"View Schematic Groups"})]}),K.jsxs(SS,{className:"sv-vm-item",style:TT,onSelect:f=>f.preventDefault(),onPointerDown:f=>{f.preventDefault(),u(!l)},children:[K.jsx("span",{style:VZ,children:l&&K.jsx(M_e,{})}),K.jsx("span",{children:"Show Grid"})]}),K.jsxs(HWe,{className:"sv-vm-item",style:TT,checked:d,onCheckedChange:p,onSelect:f=>f.preventDefault(),children:[K.jsx("span",{style:VZ,children:K.jsx(OWe,{children:K.jsx(M_e,{})})}),K.jsx("span",{children:"Show Warnings"})]}),K.jsx(n_e,{style:ggn}),K.jsxs(SS,{className:"sv-vm-item",style:TT,onSelect:a,children:[K.jsx("span",{style:VZ}),K.jsx("span",{children:"Run Style Analysis"})]}),K.jsx(n_e,{style:ggn}),K.jsxs("div",{style:{padding:"4px 8px 4px 32px",fontSize:11,opacity:.35,color:"#a1a1aa",letterSpacing:"0.2px",fontFamily:fje},children:["@tscircuit/schematic-viewer@",String(UDi?.version)]})]})})]})})},zDi=({circuitJson:t,containerStyle:e,debugGrid:n=!1,debug:o=!1,clickToInteractEnabled:i=!1,colorOverrides:r,disableGroups:s=!1,netHoverHighlightEnabled:a=!0,onSchematicComponentClicked:A,showSchematicPorts:c,onSchematicPortClicked:l,onSchematicSheetChange:u,searchEnabled:g=!0,controller:h,css:d,className:p})=>{o&&rDi();const m=st=>`${st?.length||0}_${st?.editCount||0}`,_=ee.useMemo(()=>m(t),[t]),f=ee.useMemo(()=>{try{return t.filter(st=>st?.type==="schematic_sheet").slice().sort((st,xt)=>(st.sheet_index??0)-(xt.sheet_index??0))}catch(st){return console.error("Failed to derive schematic sheets",st),[]}},[_]),I=f.length>1,C=f[0]?.schematic_sheet_id,[y,x]=ee.useState(()=>{const st=OMi(DU.SELECTED_SCHEMATIC_SHEET);return st&&f.some(xt=>xt.schematic_sheet_id===st)?st:C});ee.useEffect(()=>{y!==void 0&&f.some(xt=>xt.schematic_sheet_id===y)||x(C)},[_]);const E=I?y??C:void 0,B=ee.useCallback(st=>{x(st),GMi(DU.SELECTED_SCHEMATIC_SHEET,st),u?.(st)},[u]),[S,Q]=ee.useState(!1),[w,M]=ee.useState(null),[k,R]=ee.useState(!1),F=t.filter(st=>st.type.startsWith("schematic_")&&st.type.endsWith("_warning")).length,O=n||S,[U,Y]=ee.useState(!i),[W,te]=ee.useState(()=>s?!1:egn(DU.IS_SHOWING_SCHEMATIC_GROUPS,!1)),[j,J]=ee.useState(()=>c??egn(DU.IS_SHOWING_SCHEMATIC_PORTS,!1));ee.useEffect(()=>{c!==void 0&&J(c)},[c]);const[oe,ie]=ee.useState(!1),ne=ee.useRef(new Set),[le,ge]=ee.useState(null),_e=ee.useCallback((st,xt)=>{xt?ne.current.add(st):ne.current.delete(st),ie(ne.current.size>0)},[]),[ue,fe]=ee.useState(!1),pe=ee.useRef(new Set),ye=ee.useCallback((st,xt)=>{xt?pe.current.add(st):pe.current.delete(st),fe(pe.current.size>0)},[]),Me=ee.useRef(null),ve=ee.useRef(null),he=ee.useRef({x:1,y:1}),Qe=ee.useMemo(()=>{try{return(O3(t).schematic_component?.list()??[]).filter(xt=>!E||xt.schematic_sheet_id===E).map(xt=>xt.schematic_component_id)}catch(st){return console.error("Failed to derive schematic component ids",st),[]}},[_,t,E]),Pe=ee.useMemo(()=>{if(!j)return[];try{return(O3(t).schematic_port?.list()??[]).filter(xt=>!E||xt.schematic_sheet_id===E).map(xt=>{const Xe=O3(t).source_port.get(xt.source_port_id),dt=(Xe?.source_component_id?O3(t).source_component.get(Xe.source_component_id):null)?.name??"?",Ut=xt.display_pin_label??Xe?.pin_number??Xe?.name??"?";return{portId:xt.source_port_id,label:`${dt}.${Ut}`}})}catch(st){return console.error("Failed to derive schematic port info",st),[]}},[_,t,j,E]),we=st=>{const xt=st.touches[0];ve.current={x:xt.clientX,y:xt.clientY}},Te=st=>{const xt=st.changedTouches[0],Xe=ve.current;if(!Xe)return;const Ze=Math.abs(xt.clientX-Xe.x),dt=Math.abs(xt.clientY-Xe.y);Ze<10&&dt<10&&(st.preventDefault(),Y(!0)),ve.current=null},Re=ee.useCallback(st=>st.target instanceof Element&&st.target.closest("[data-schematic-search], [data-schematic-warnings], .schematic-warning")?!1:st.type!=="mousedown"||!("button"in st)?!0:st.button!==2&&!(st.button===0&&st.ctrlKey),[]),{ref:Ee,transform:ke,setTransform:Ce}=YZ({onSetTransform(st){const xt=st.a!==he.current.x||st.d!==he.current.y;he.current={x:st.a,y:st.d},xt&&ge(null),Me.current&&(Me.current.style.transform=iD(st))},enabled:U,shouldDrag:Re}),{menuVisible:Le,menuPos:Ye,menuRef:tt,setMenuVisible:At,contextMenuEventHandlers:at,menuTarget:nt}=aDi({containerRef:Ee}),{containerWidth:gt,containerHeight:bt}=rgn(Ee),Ct=ee.useMemo(()=>le?pDi(t,le.schematicComponentId):null,[_,t,le]),Dt=ee.useMemo(()=>{if(!le||!gt||!bt)return null;const st=12,xt=14,Xe=Math.min(420,gt-st*2),Ze=Math.min(520,bt-st*2),{anchorX:dt,anchorY:Ut}=le,Wt=dt+xt,Xt=dt-Xe-xt,Jt=Wt+Xe<=gt-st?Wt:Xt>=st?Xt:Math.max(st,Math.min(dt-Xe/2,gt-Xe-st)),yn=Math.max(st,Math.min(Ut-24,bt-Ze-st));return{left:Jt,top:yn,width:Xe,maxHeight:Ze}},[le,gt,bt]),kt=ee.useCallback((st,xt)=>{if(xt.target instanceof Element&&xt.target.closest("[data-schematic-component-details-tooltip]"))return;const Xe=Ee.current?.getBoundingClientRect();Xe&&(ge({schematicComponentId:st,anchorX:xt.clientX-Xe.left,anchorY:xt.clientY-Xe.top}),A?.({schematicComponentId:st,event:xt}))},[Ee,A]);ee.useEffect(()=>{ge(null)},[_,E]),ee.useEffect(()=>{if(!le)return;const st=Xe=>{Xe.key==="Escape"&&ge(null)},xt=Xe=>{Xe.target instanceof Element&&Xe.target.closest("[data-schematic-component-details-tooltip]")||ge(null)};return window.addEventListener("keydown",st),document.addEventListener("mousedown",xt),()=>{window.removeEventListener("keydown",st),document.removeEventListener("mousedown",xt)}},[le]);const it=ee.useMemo(()=>!gt||!bt?"":Dun(t,{width:gt,height:bt||720,drawPorts:j,shouldDrawWarnings:k,schematicSheetId:E,grid:O?{cellSize:1,labelCells:!0}:void 0,colorOverrides:r,css:d,className:p}),[_,gt,bt,O,k,j,E]),Yt=ee.useMemo(()=>it.match(/<svg[^>]*style="[^"]*background-color:\s*([^;\"]+)/i)?.[1]??"transparent",[it]),{searchQuery:pn,setSearchQuery:be,searchResults:et,handleSearchResultSelect:It,handleCancelSearch:Bt}=iDi({controller:h,circuitJson:t,circuitJsonKey:_,svgDivRef:Me,containerRef:Ee,activeSheetId:E,hasMultipleSheets:I,handleSelectSheet:B,svgString:it,svgToScreenProjection:ke,setSvgToScreenProjection:Ce,setIsInteractionEnabled:Y});YMi({svgDivRef:Me,circuitJson:t,circuitJsonKey:`${_}_${E??""}`,showGroups:W&&!s}),KMi({svgDivRef:Me,circuitJson:t,circuitJsonKey:`${_}_${E??""}`,enabled:a});const mt=ee.useMemo(()=>K.jsx("div",{ref:Me,style:{pointerEvents:i?U?"auto":"none":"auto",transformOrigin:"0 0"},className:"schematic-component-clickable",dangerouslySetInnerHTML:{__html:it}}),[it,U,i]);return VMi({svgDivRef:Me,svgContent:mt,circuitJsonKey:_}),K.jsxs(yDi,{children:[a&&K.jsx("style",{children:`.sch-net-faded { opacity: 0.35; }
            svg :is(g.trace, g.trace-overlays, g[data-schematic-component-id], [data-schematic-net-label-id]) { transition: opacity 0.12s ease-in-out; }`}),g&&K.jsx("style",{children:`.schematic-search-match text,
            text.schematic-search-match {
              fill: #ff00d4 !important;
            }
            .schematic-search-match [stroke]:not(text):not([stroke="none"]),
            [stroke]:not(text):not([stroke="none"]).schematic-search-match {
              stroke: #ff00d4 !important;
            }
            .schematic-viewer-toolbar {
              flex-direction: row;
            }
            @media (max-width: 640px) {
              .schematic-viewer-toolbar {
                flex-direction: column;
              }
            }`}),K.jsx("style",{children:".schematic-component-clickable [data-schematic-component-id]:hover { cursor: pointer !important; }"}),l&&K.jsx("style",{children:"[data-schematic-port-id]:hover { cursor: pointer !important; }"}),K.jsxs("div",{ref:Ee,style:{position:"relative",backgroundColor:Yt,overflow:"hidden",cursor:i&&!U||oe||ue&&l?"pointer":"grab",minHeight:"300px",userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",...e},onMouseDownCapture:st=>{if(at.onMouseDown(st),i&&!U){st.preventDefault(),st.stopPropagation();return}},onContextMenu:at.onContextMenu,onTouchStart:st=>{we(st),at.onTouchStart(st)},onTouchMove:at.onTouchMove,onTouchEnd:st=>{Te(st),at.onTouchEnd()},onTouchCancel:at.onTouchCancel,children:[!U&&i&&K.jsx("div",{onClick:st=>{st.preventDefault(),st.stopPropagation(),Y(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:ME.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all",touchAction:"pan-x pan-y pinch-zoom"},children:K.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})}),w&&K.jsx(HMi,{circuitJson:w,onClose:()=>M(null)}),Le&&K.jsx(VDi,{circuitJson:t,circuitJsonKey:_,netLocations:(()=>{const st=TMi(nt,t);return st?kMi(t,st):[]})(),onSelectNetLocation:st=>{At(!1),It(st)},menuRef:tt,menuPos:Ye,onOpenChange:At,onRunStyleAnalysis:()=>{At(!1),M(structuredClone(t))},showPorts:j,onTogglePorts:st=>{J(st),tgn(DU.IS_SHOWING_SCHEMATIC_PORTS,st)},showGroups:W,onToggleGroups:st=>{s||(te(st),tgn(DU.IS_SHOWING_SCHEMATIC_GROUPS,st))},showWarnings:k,onToggleWarnings:R,showGrid:O,onToggleGrid:Q}),K.jsxs("div",{className:"schematic-viewer-toolbar",style:{position:"absolute",top:"16px",left:"16px",display:"flex",alignItems:"flex-start",gap:"8px",zIndex:ME.schematicSearch},children:[K.jsx(GDi,{sheets:f,selectedSheetId:E,onSelectSheet:B}),g&&K.jsx(RDi,{query:pn,onQueryChange:be,onCancel:Bt,results:et,onSelect:It,viewerContainerRef:Ee}),F>0&&K.jsx(YDi,{count:F,showWarnings:k,onToggle:()=>R(st=>!st)})]}),Qe.map(st=>K.jsx(bDi,{componentId:st,svgDivRef:Me,containerRef:Ee,showOutline:!0,circuitJsonKey:_,onHoverChange:_e,onComponentClick:kt},st)),mt,Ct&&Dt&&K.jsx(EDi,{sourceComponent:Ct.sourceComponent,warnings:Ct.warnings,footprinterString:Ct.footprinterString,footprintPreviewCircuitJson:Ct.footprintPreviewCircuitJson,footprintPreviewViewBox:Ct.footprintPreviewViewBox,...Dt}),j&&Pe.map(({portId:st,label:xt})=>K.jsx(QDi,{portId:st,portLabel:xt,svgDivRef:Me,containerRef:Ee,showOutline:!0,circuitJsonKey:_,onHoverChange:ye,onPortClick:l?(Xe,Ze)=>{l?.({schematicPortId:Xe,event:Ze})}:void 0},st))]})]})},JDi=t=>{const e=t.match(/<svg\b[^>]*\bstyle=(?:"([^"]*)"|'([^']*)')/i);return(e?.[1]??e?.[2])?.match(/(?:^|;)\s*background-color\s*:\s*([^;]+)/i)?.[1]?.trim()},WDi=t=>t.match(/\.background\s*\{[^}]*\bfill\s*:\s*([^;}]+)/i)?.[1]?.trim(),jDi=(t,e)=>JDi(t)??WDi(t)??e?.schematic?.background??$h.schematic.background,Ije='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',$Di={backgroundColor:"#ffffff",color:"#111111",borderRadius:8,boxShadow:"0 6px 24px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08)",border:"1px solid #e5e7eb",padding:4,minWidth:220,maxWidth:360,maxHeight:320,overflowY:"auto",fontSize:13,fontFamily:Ije,outline:"none",zIndex:ME.viewMenu},qDi={display:"flex",alignItems:"center",gap:8,padding:"7px 10px 7px 8px",borderRadius:6,cursor:"pointer",outline:"none",userSelect:"none",color:"#111111",fontSize:13,fontFamily:Ije},XDi={width:16,height:16,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#111111"},dgn={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},ZDi=`
.sv-simulation-item[data-highlighted], .sv-simulation-item:hover { background-color: #f1f3f5; }
.sv-simulation-chevron { transition: transform 0.2s ease; }
[data-state="open"] > .sv-simulation-chevron { transform: rotate(180deg); }
`,eNi=()=>K.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:K.jsx("path",{d:"M20 6 9 17l-5-5"})}),tNi=({className:t})=>K.jsx("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.6,flexShrink:0},"aria-hidden":"true",children:K.jsx("path",{d:"m6 9 6 6 6-6"})}),nNi=t=>{const e=new Map;return t.map(n=>{const o=(e.get(n.name)??0)+1;return e.set(n.name,o),{simulation:n,label:o===1?n.name:`${n.name} (${o})`}})},oNi=({simulations:t,selectedSimulationExperimentId:e,onSelectSimulation:n})=>{const[o,i]=ee.useState(!1);if(t.length<=1)return null;const r=nNi(t),a=r.find(({simulation:A})=>A.simulation_experiment_id===e)?.label??"Select simulation";return K.jsxs(K.Fragment,{children:[K.jsx("style",{children:ZDi}),K.jsxs(e_e,{open:o,onOpenChange:i,modal:!1,children:[K.jsx(t_e,{asChild:!0,children:K.jsxs("button",{type:"button",title:a,onPointerDown:A=>A.stopPropagation(),style:{position:"absolute",top:"16px",left:"16px",display:"flex",alignItems:"center",gap:"6px",maxWidth:"280px",padding:"8px 12px",backgroundColor:"#ffffff",color:"#000000",border:"none",outline:"none",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"13px",fontFamily:Ije,zIndex:ME.viewMenuIcon},children:[K.jsx("span",{style:{color:"#888888",flexShrink:0},children:"Simulation:"}),K.jsx("span",{style:{...dgn,minWidth:0},children:a}),K.jsx(tNi,{className:"sv-simulation-chevron"})]})}),K.jsx(EU,{children:K.jsx(bZ,{style:$Di,side:"bottom",align:"start",sideOffset:8,collisionPadding:10,children:r.map(({simulation:A,label:c})=>{const l=A.simulation_experiment_id===e;return K.jsxs(SS,{className:"sv-simulation-item",style:qDi,title:c,onSelect:u=>u.preventDefault(),onPointerUp:()=>{n(A.simulation_experiment_id),i(!1)},children:[K.jsx("span",{style:XDi,children:l&&K.jsx(eNi,{})}),K.jsx("span",{style:{...dgn,minWidth:0},children:c})]},A.simulation_experiment_id)})})})]})]})},iNi=1200,rNi=1,sNi=2,aNi=({circuitJson:t,containerStyle:e,colorOverrides:n,width:o,height:i,className:r,hideSchematic:s=!1,onSimulationChange:a,acSweepView:A="magnitude"})=>{const[c,l]=ee.useState(null),[u,g]=ee.useState(!0),[h,d]=ee.useState(null),[p,m]=ee.useState(null),_=ee.useRef(null),f=ee.useRef(null),{containerWidth:I}=rgn(_),[C,y]=ee.useState(!1),{ref:x}=YZ({onSetTransform(te){f.current&&(f.current.style.transform=iD(te))}}),B=o&&i?o/i:s?sNi:rNi,S=o||(i?i*B:I)||iNi,Q=i||S/B;ee.useEffect(()=>{g(!0),d(null),l(t),g(!1)},[t]);const w=ee.useMemo(()=>c?c.filter(te=>te.type==="simulation_experiment"):[],[c]),[M,k]=ee.useState(null),R=(M&&w.some(te=>te.simulation_experiment_id===M)?M:w[0]?.simulation_experiment_id)??null;ee.useEffect(()=>{R!==M&&k(R)},[R,M]);const F=te=>{k(te),a?.(te)},O=ee.useMemo(()=>{if(!c||!S||!Q||!R)return"";try{const te={circuitJson:c,simulation_experiment_id:R,ac_sweep_view:A,width:S,height:Q};return s?jun(te):DMi({...te,schematicOptions:{colorOverrides:n}})}catch(te){return console.error("Failed to generate simulation SVG:",te),""}},[c,S,Q,n,s,R,A]);ee.useEffect(()=>{if(!O){m(null);return}try{const te=new Blob([O],{type:"image/svg+xml"}),j=URL.createObjectURL(te);return m(j),()=>{URL.revokeObjectURL(j)}}catch(te){console.error("Failed to create SVG object URL:",te),m(null)}},[O]);const U=ee.useMemo(()=>jDi(O,n),[O,n]),Y=te=>{y(!0)},W=te=>{y(!0)};return ee.useEffect(()=>{const te=()=>{y(!1)},j=()=>{y(!1)};return window.addEventListener("mouseup",te),window.addEventListener("touchend",j),()=>{window.removeEventListener("mouseup",te),window.removeEventListener("touchend",j)}},[]),u?K.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f5f5f5",minHeight:"300px",fontFamily:"sans-serif",fontSize:"16px",color:"#666",...e},className:r,children:"Loading circuit..."}):h?K.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#fef2f2",minHeight:"300px",fontFamily:"sans-serif",fontSize:"16px",color:"#dc2626",...e},className:r,children:K.jsxs("div",{style:{textAlign:"center",padding:"20px"},children:[K.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"Circuit Conversion Error"}),K.jsx("div",{style:{fontSize:"14px"},children:h})]})}):O?K.jsxs("div",{ref:te=>{_.current=te,x.current=te},style:{position:"relative",backgroundColor:U,overflow:"hidden",minHeight:"300px",cursor:C?"grabbing":"grab",...e},className:r,onMouseDown:Y,onTouchStart:W,children:[K.jsx(oNi,{simulations:w,selectedSimulationExperimentId:R,onSelectSimulation:F}),p?K.jsx("img",{ref:f,src:p,alt:"Circuit Simulation",style:{transformOrigin:"0 0",width:"100%",height:"100%",display:"block",objectFit:"contain"}}):K.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",minHeight:"300px",color:"#666",fontFamily:"sans-serif"},children:"Failed to render SVG"})]}):K.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#f8fafc",minHeight:"300px",fontFamily:"sans-serif",gap:"12px",...e},className:r,children:[K.jsx("div",{style:{fontSize:"16px",color:"#475569",fontWeight:500},children:"No Simulation Found"}),K.jsxs("div",{style:{fontSize:"14px",color:"#64748b"},children:["Use"," ",K.jsx("code",{style:{backgroundColor:"#e2e8f0",padding:"2px 6px",borderRadius:"4px",fontFamily:"monospace",fontSize:"13px"},children:"<analogsimulation />"})," ","to create simulations"]})]})},ANi=()=>{const[t,e]=ee.useState(null),n=ee.useCallback(r=>{e({schematicComponentId:r})},[]),o=ee.useCallback(r=>{e(s=>s===r?null:s)},[]);return{controller:ee.useMemo(()=>({focusRequest:t,onFocusRequestHandled:o}),[t,o]),focusSchematicComponent:n}},hgn=t=>{const[e,n]=ee.useState(0),[o,i]=ee.useState(0);return ee.useEffect(()=>{if(!t.current)return;const r=()=>{const a=t.current?.getBoundingClientRect();n(a?.width||0),i(a?.height||0)};r();const s=new ResizeObserver(r);return s.observe(t.current),window.addEventListener("resize",r),()=>{s.disconnect(),window.removeEventListener("resize",r)}},[]),{containerWidth:e,containerHeight:o}};vc("assembly-viewer");var pgn=()=>{vc.enable("assembly-viewer*")},cNi=({circuitJson:t,containerStyle:e,debugGrid:n=!1,debug:o=!1})=>{o&&pgn();const i=ee.useRef(null),{ref:r}=YZ({onSetTransform(l){i.current&&(i.current.style.transform=iD(l))}}),{containerWidth:s,containerHeight:a}=hgn(r),A=ee.useMemo(()=>!s||!a?"":_Ut(t,{width:s,height:a||720}),[t,s,a]);ee.useMemo(()=>{if(!A)return QQ();const l=A.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return BV(l)}catch(u){return console.error(u),QQ()}},[A]);const c=ee.useMemo(()=>K.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:A}}),[A]);return K.jsx("div",{ref:r,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...e},children:c})},lNi=({circuitJson:t,containerStyle:e,debugGrid:n=!1,debug:o=!1})=>{o&&pgn();const i=ee.useRef(null),{ref:r}=YZ({onSetTransform(l){i.current&&(i.current.style.transform=iD(l))}}),{containerWidth:s,containerHeight:a}=hgn(r),A=ee.useMemo(()=>!s||!a?"":SUt(t,{width:s,height:a||720}),[t,s,a]);ee.useMemo(()=>{if(!A)return QQ();const l=A.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return BV(l)}catch(u){return console.error(u),QQ()}},[A]);const c=ee.useMemo(()=>K.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:A}}),[A]);return K.jsx("div",{ref:r,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...e},children:c})};const mgn=["Initialize a tscircuit project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export",'Use units like mm or mils consistently across your designs (e.g. pcbX="10mm")',"Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/guides/running-tscircuit/displaying-circuit-json-on-a-webpage#react-display-all-available-previews-with-circuitjsonpreview-) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Check out the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to upvote features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","When working on component placement and circuit design, autorouting can slow down your iteration cycle. Use [routingDisabled](https://docs.tscircuit.com/elements/board#disabling-routing-with-routingdisabled) on the <board /> element to disable autorouting temporarily.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],uNi=(()=>{let t=mgn[Math.floor(Math.random()*mgn.length)];return t=t.replace(/</g,"&lt;"),t=t.replace(/>/g,"&gt;"),t=t.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(e,n)=>`<a class="rf-text-blue-500 rf-underline"  href="${e}" target="_blank">${e}</a>`),t=t.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),t})(),QS=({onRunClicked:t})=>K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[K.jsx(Cbi,{className:"rf-size-14 rf-mb-4"}),K.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",K.jsx("span",{dangerouslySetInnerHTML:{__html:uNi}})]}),t&&K.jsxs(fA,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:t,children:["Run Code",K.jsx(_ln,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),D_e=({text:t,onClick:e})=>K.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:t}),N_e=t=>K.jsxs("div",{className:"rf-leading-5",children:[K.jsx("div",{className:"rf-py-2 rf-font-bold",children:t.column.name}),K.jsx("div",{children:t.field?.()??K.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:e=>{t.onTextChange?.(e.target.value)}})})]}),gNi=({open:t,children:e,title:n,onClose:o})=>t?K.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:o,children:K.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[K.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:n}),K.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:o,children:"×"}),e]})}):null,dNi=({elements:t})=>{const[e,n]=ee.useState({open:!1}),[o,i]=ee.useReducer((l,u)=>({...l,...u}),{}),r=[...new Set(t.map(l=>l.type))],s=t.map(l=>{const u=l[`${l.type}_id`],g=Object.fromEntries(Object.entries(l).filter(([d])=>!(d===`${l.type}_id`||!d.endsWith("_id")))),h=Object.fromEntries(Object.entries(l).filter(([d])=>!d.endsWith("_id")));return{primary_id:u,other_ids:g,...h,_og_elm:l}}),a=s.map(l=>{let u="";const g=h=>{const d=Object.keys(h.other_ids).find(_=>_.startsWith("source_"));if(!d)return`.${h.name}`;const p=d.slice(0,-3),m=s.find(_=>_.type===p&&_.primary_id===h.other_ids[d]);return m?"name"in m?`${g(m)} > .${h.name}`:`#${m.primary_id} > .${h.name}`:`??? > .${h.name}`};return"name"in l&&(u=g(l)),{...l,selector_path:u}}),A=[{key:"primary_id",name:"primary_id",renderCell:l=>K.jsxs("div",{className:"rf-flex rf-items-center",children:[K.jsx(D_e,{text:l.primary_id,onClick:()=>i({focused_id:l.primary_id,id_search:void 0,selector_search:void 0})}),K.jsx("span",{className:"rf-flex-grow"}),K.jsx(D_e,{text:"(JSON)",onClick:()=>n({open:!0,element:l._og_elm,title:l.primary_id})})]}),renderHeaderCell:l=>K.jsx(N_e,{column:l,onTextChange:u=>i({id_search:u}),field:o.focused_id?()=>K.jsxs("div",{children:["Focus:"," ",K.jsx("span",{className:"rf-underline",children:o.focused_id}),K.jsx(D_e,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:l=>K.jsx(N_e,{column:l,field:()=>K.jsxs("select",{onChange:u=>i({component_type_filter:u.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[K.jsx("option",{value:"any",children:"any"},"any"),K.jsx("option",{value:"source",children:"source"},"source"),K.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),K.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),r.map(u=>K.jsx("option",{value:u,children:u},u))]})})},{key:"name",name:"name",renderHeaderCell:l=>K.jsx(N_e,{column:l,onTextChange:u=>i({name_search:u})})},{key:"selector_path",name:"selector_path",renderHeaderCell:l=>K.jsx(N_e,{column:l,onTextChange:u=>i({selector_search:u})})},{key:"other_ids",name:"other_ids",renderCell:l=>K.jsx("div",{className:"rf-space-x-2",children:Object.entries(l.other_ids).map(([u,g])=>K.jsx(D_e,{text:g,onClick:()=>i({focused_id:g})},g))})}],c=a.filter(l=>o.name_search?l.name?.toLowerCase()?.includes(o.name_search.toLowerCase()):!0).filter(l=>!o.component_type_filter||o.component_type_filter==="any"?!0:o.component_type_filter==="source"?l.type.startsWith("source_"):o.component_type_filter==="source/pcb"?l.type.startsWith("source_")||l.type.startsWith("pcb_"):o.component_type_filter==="source/schematic"?l.type.startsWith("source_")||l.type.startsWith("schematic_"):l.type?.includes(o.component_type_filter)).filter(l=>o.selector_search?o.selector_search.split(" ").filter(g=>g.length>0).every(g=>l.selector_path?.includes(g)):!0).filter(l=>o.id_search?l.primary_id?.includes(o.id_search):!0).filter(l=>!!(!o.focused_id||l.primary_id===o.focused_id||Object.values(l.other_ids).includes(o.focused_id)));return K.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[K.jsx("div",{className:"rf-overflow-x-auto",children:K.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[K.jsx("thead",{children:K.jsx("tr",{children:A.map(l=>K.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:l.renderHeaderCell?l.renderHeaderCell(l):l.name},l.key))})}),K.jsx("tbody",{children:c.map((l,u)=>K.jsx("tr",{className:"rf-hover:bg-gray-100",children:A.map(g=>K.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:g.renderCell?g.renderCell(l):l[g.key]},g.key))},u))})]})}),K.jsx(gNi,{open:e.open,onClose:()=>n({open:!1}),title:e.open?e.title:"",children:K.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:K.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})};var hNi=()=>{if(globalThis.tscircuitDynamicModules)return globalThis.tscircuitDynamicModules;const t={};return globalThis.tscircuitDynamicModules=t,t};function pNi(t,e){return hNi()[t]=e,e}var mNi=["circuit-json-to-3d-png","circuit-json-to-bom-csv","circuit-json-to-bpc","circuit-json-to-connectivity-map","circuit-json-to-fdm-component-box","circuit-json-to-gerber","circuit-json-to-gltf","circuit-json-to-kicad","circuit-json-to-lbrn","circuit-json-to-pnp-csv","circuit-json-to-readable-netlist","circuit-json-to-simple-3d","circuit-json-to-spice","circuit-json-to-step","circuit-json-to-tscircuit","circuit-to-canvas","circuit-to-svg","kicad-to-circuit-json"],Cje=t=>{const e=t.indexOf("@");return e===-1?t:t.slice(0,e)},_Ni=new Set(mNi),fNi=t=>(CNi(t),[INi(t),`https://esm.run/${t}`]);function INi(t){const e=Cje(t),n=t.length===e.length?"latest":t.slice(e.length+1);return`https://jscdn.tscircuit.com/${e}/${n}/+esm`}function CNi(t){const e=Cje(t);if(!_Ni.has(e))throw new Error(`Unsupported module: ${t}`)}async function yNi(t){let e;for(const n of fNi(t))try{const o=await import(n);return pNi(Cje(t),o)}catch(o){e=o}throw e}var DE=yNi;const xNi=(t,e)=>K.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}),ENi=t=>t?.map(({manufacturer:e,mpn:n})=>`${e}: ${n}`).join(", "),BNi=t=>{const e=new Set;let n=!1,o=!1;for(const i of t){i.supplier_part_number_columns?.["JLCPCB Part #"]!==void 0&&(n=!0);for(const r of Object.keys(i.extra_columns??{}))e.add(r);(i.manufacturer_mpn_pairs?.length??0)>0&&(o=!0)}return{extraColumnNames:[...e],hasSupplierColumn:n,hasManufacturerColumn:o}},bNi=t=>{const e=[{key:"designator",label:"Designator",getCell:n=>n.designator},{key:"comment",label:"Comment",getCell:n=>n.comment},{key:"value",label:"Component Value",getCell:n=>n.value},{key:"footprint",label:"Footprint",getCell:n=>n.footprint}];t.hasSupplierColumn&&e.push({key:"supplier:JLCPCB Part #",label:"JLCPCB Part #",getCell:n=>{const o=n.supplier_part_number_columns?.["JLCPCB Part #"];return o?xNi("jlcpcb",o):""}}),t.hasManufacturerColumn&&e.push({key:"manufacturer_mpn_pairs",label:"Manufacturer / MPN",getCell:n=>ENi(n.manufacturer_mpn_pairs)});for(const n of t.extraColumnNames)e.push({key:`extra:${n}`,label:n,getCell:o=>o.extra_columns?.[n]||""});return e},SNi=({circuitJson:t})=>{const[e,n]=ee.useState(null),[o,i]=ee.useState(null);if(ee.useEffect(()=>{let a=!1;return(async()=>{try{i(null),n(null);const{convertCircuitJsonToBomRows:c}=await DE("circuit-json-to-bom-csv"),l=await c({circuitJson:t});a||n(l)}catch(c){a||i(c instanceof Error?c.message:"Unknown BOM error")}})(),()=>{a=!0}},[t]),o)throw new Error(o);const r=BNi(e??[]),s=bNi(r);return e?K.jsx("div",{className:"rf-overflow-x-auto",children:K.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[K.jsx("thead",{children:K.jsx("tr",{className:"rf-border-b",children:s.map(a=>K.jsx("th",{className:"rf-p-2",children:a.label},a.key))})}),K.jsx("tbody",{children:e.map((a,A)=>K.jsx("tr",{className:"rf-border-b",children:s.map(c=>K.jsx("td",{className:"rf-p-2",children:c.getCell(a)},c.key))},a.designator||`${A}`))})]})}):K.jsx("div",{className:"rf-p-4 rf-text-sm rf-text-muted-foreground",children:"Loading BOM..."})},yje=ee.forwardRef(({className:t,type:e,...n},o)=>K.jsx("input",{type:e,className:Oi("rf-flex rf-h-9 rf-w-full rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-px-3 rf-py-1 rf-text-sm rf-shadow-sm rf-transition-colors file:rf-border-0 file:rf-bg-transparent file:rf-text-sm file:rf-font-medium placeholder:rf-text-zinc-500 focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-placeholder-zinc-400 dark:focus-visible:rf-ring-zinc-300",t),ref:o,...n}));yje.displayName="Input";function _i(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function RP(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function V6(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function zZ(t){return typeof t>"u"}function Qd(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function R_e(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return R_e(r,...i)}}}function NC(...t){return R_e(...t)}const{cos:QNi,sin:vNi}=Math;function wNi(t,e,n){const o=QNi(t),i=vNi(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return zZ(e)||zZ(n)?r:R_e([Qd(e,n),r,Qd(-e,-n)])}function vS(t,e=void 0,n=void 0,o=void 0){zZ(e)&&(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return zZ(n)||zZ(o)?i:R_e([Qd(n,o),i,Qd(-n,-o)])}function PNi(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function T_e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,T_e.prototype),i.expected=e,i.found=n,i.location=o,i.name="SyntaxError",i}PNi(T_e,Error);function xje(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}T_e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,r=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+r.line+":"+r.column;if(n){var a=this.location.end,A=xje("",r.line.toString().length," "),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`
 --> `+s+`
`+A+` |
`+r.line+" | "+c+`
`+A+" | "+xje("",i.column-1," ")+xje("",u,"^")}else e+=`
 at `+s}return e},T_e.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+"-"+r(u[1]):r(u)});return"["+(c.inverted?"^":"")+l.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function r(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length>0){for(u=1,g=1;u<l.length;u++)l[u-1]!==l[u]&&(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function A(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(t)+" but "+A(e)+" found."};function MNi(t,e=!1,n=!1){e?n?t=NC(t,vS(-1,-1)):t=NC(t,vS(1,-1)):n&&(t=NC(t,vS(-1,1)));const o=t.a,i=t.b,r=t.c,s=t.d;let a,A,c;if(o!==0||r!==0){const l=Math.hypot(o,r);a=l,A=(o*s-i*r)/l;const u=Math.acos(o/l);c=r>0?-u:u}else if(i!==0||s!==0){const l=Math.hypot(i,s);a=(o*s-i*r)/l,A=l;const u=Math.acos(i/l);c=Math.PI/2+(s>0?-u:u)}else a=0,A=0,c=0;return n&&(a=-a),e&&(A=-A),{translate:{tx:t.e,ty:t.f},scale:{sx:a,sy:A},rotation:{angle:c}}}const JZ=t=>typeof t=="number"&&!isNaN(t),kT=t=>typeof t=="string",NE=t=>typeof t=="function",k_e=t=>kT(t)||NE(t)?t:null,Eje=t=>ee.isValidElement(t)||kT(t)||NE(t)||JZ(t);function DNi(t,e,n){n===void 0&&(n=300);const{scrollHeight:o,style:i}=t;requestAnimationFrame(()=>{i.minHeight="initial",i.height=o+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,n)})})}function F_e(t){let{enter:e,exit:n,appendPosition:o=!1,collapse:i=!0,collapseDuration:r=300}=t;return function(s){let{children:a,position:A,preventExitTransition:c,done:l,nodeRef:u,isIn:g,playToast:h}=s;const d=o?`${e}--${A}`:e,p=o?`${n}--${A}`:n,m=ee.useRef(0);return ee.useLayoutEffect(()=>{const _=u.current,f=d.split(" "),I=C=>{C.target===u.current&&(h(),_.removeEventListener("animationend",I),_.removeEventListener("animationcancel",I),m.current===0&&C.type!=="animationcancel"&&_.classList.remove(...f))};_.classList.add(...f),_.addEventListener("animationend",I),_.addEventListener("animationcancel",I)},[]),ee.useEffect(()=>{const _=u.current,f=()=>{_.removeEventListener("animationend",f),i?DNi(_,l,r):l()};g||(c?f():(m.current=1,_.className+=` ${p}`,_.addEventListener("animationend",f)))},[g]),Fs.createElement(Fs.Fragment,null,a)}}function _gn(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const u2=new Map;let WZ=[];const Bje=new Set,NNi=t=>Bje.forEach(e=>e(t)),fgn=()=>u2.size>0;function Ign(t,e){var n;if(e)return!((n=u2.get(e))==null||!n.isToastActive(t));let o=!1;return u2.forEach(i=>{i.isToastActive(t)&&(o=!0)}),o}function Cgn(t,e){Eje(t)&&(fgn()||WZ.push({content:t,options:e}),u2.forEach(n=>{n.buildToast(t,e)}))}function ygn(t,e){u2.forEach(n=>{e!=null&&e!=null&&e.containerId?e?.containerId===n.id&&n.toggle(t,e?.id):n.toggle(t,e?.id)})}function RNi(t){const{subscribe:e,getSnapshot:n,setProps:o}=ee.useRef((function(r){const s=r.containerId||1;return{subscribe(a){const A=(function(l,u,g){let h=1,d=0,p=[],m=[],_=[],f=u;const I=new Map,C=new Set,y=()=>{_=Array.from(I.values()),C.forEach(B=>B())},x=B=>{m=B==null?[]:m.filter(S=>S!==B),y()},E=B=>{const{toastId:S,onOpen:Q,updateId:w,children:M}=B.props,k=w==null;B.staleId&&I.delete(B.staleId),I.set(S,B),m=[...m,B.props.toastId].filter(R=>R!==B.staleId),y(),g(_gn(B,k?"added":"updated")),k&&NE(Q)&&Q(ee.isValidElement(M)&&M.props)};return{id:l,props:f,observe:B=>(C.add(B),()=>C.delete(B)),toggle:(B,S)=>{I.forEach(Q=>{S!=null&&S!==Q.props.toastId||NE(Q.toggle)&&Q.toggle(B)})},removeToast:x,toasts:I,clearQueue:()=>{d-=p.length,p=[]},buildToast:(B,S)=>{if((J=>{let{containerId:oe,toastId:ie,updateId:ne}=J;const le=oe?oe!==l:l!==1,ge=I.has(ie)&&ne==null;return le||ge})(S))return;const{toastId:Q,updateId:w,data:M,staleId:k,delay:R}=S,F=()=>{x(Q)},O=w==null;O&&d++;const U={...f,style:f.toastStyle,key:h++,...Object.fromEntries(Object.entries(S).filter(J=>{let[oe,ie]=J;return ie!=null})),toastId:Q,updateId:w,data:M,closeToast:F,isIn:!1,className:k_e(S.className||f.toastClassName),bodyClassName:k_e(S.bodyClassName||f.bodyClassName),progressClassName:k_e(S.progressClassName||f.progressClassName),autoClose:!S.isLoading&&(Y=S.autoClose,W=f.autoClose,Y===!1||JZ(Y)&&Y>0?Y:W),deleteToast(){const J=I.get(Q),{onClose:oe,children:ie}=J.props;NE(oe)&&oe(ee.isValidElement(ie)&&ie.props),g(_gn(J,"removed")),I.delete(Q),d--,d<0&&(d=0),p.length>0?E(p.shift()):y()}};var Y,W;U.closeButton=f.closeButton,S.closeButton===!1||Eje(S.closeButton)?U.closeButton=S.closeButton:S.closeButton===!0&&(U.closeButton=!Eje(f.closeButton)||f.closeButton);let te=B;ee.isValidElement(B)&&!kT(B.type)?te=ee.cloneElement(B,{closeToast:F,toastProps:U,data:M}):NE(B)&&(te=B({closeToast:F,toastProps:U,data:M}));const j={content:te,props:U,staleId:k};f.limit&&f.limit>0&&d>f.limit&&O?p.push(j):JZ(R)?setTimeout(()=>{E(j)},R):E(j)},setProps(B){f=B},setToggle:(B,S)=>{I.get(B).toggle=S},isToastActive:B=>m.some(S=>S===B),getSnapshot:()=>_}})(s,r,NNi);u2.set(s,A);const c=A.observe(a);return WZ.forEach(l=>Cgn(l.content,l.options)),WZ=[],()=>{c(),u2.delete(s)}},setProps(a){var A;(A=u2.get(s))==null||A.setProps(a)},getSnapshot(){var a;return(a=u2.get(s))==null?void 0:a.getSnapshot()}}})(t)).current;o(t);const i=ee.useSyncExternalStore(e,n,n);return{getToastToRender:function(r){if(!i)return[];const s=new Map;return t.newestOnTop&&i.reverse(),i.forEach(a=>{const{position:A}=a.props;s.has(A)||s.set(A,[]),s.get(A).push(a)}),Array.from(s,a=>r(a[0],a[1]))},isToastActive:Ign,count:i?.length}}function TNi(t){const[e,n]=ee.useState(!1),[o,i]=ee.useState(!1),r=ee.useRef(null),s=ee.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:A,closeToast:c,onClick:l,closeOnClick:u}=t;var g,h;function d(){n(!0)}function p(){n(!1)}function m(I){const C=r.current;s.canDrag&&C&&(s.didMove=!0,e&&p(),s.delta=t.draggableDirection==="x"?I.clientX-s.start:I.clientY-s.start,s.start!==I.clientX&&(s.canCloseOnClick=!1),C.style.transform=`translate3d(${t.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,C.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function _(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",_);const I=r.current;if(s.canDrag&&s.didMove&&I){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return i(!0),t.closeToast(),void t.collapseAll();I.style.transition="transform 0.2s, opacity 0.2s",I.style.removeProperty("transform"),I.style.removeProperty("opacity")}}(h=u2.get((g={id:t.toastId,containerId:t.containerId,fn:n}).containerId||1))==null||h.setToggle(g.id,g.fn),ee.useEffect(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",d),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",p)}},[t.pauseOnFocusLoss]);const f={onPointerDown:function(I){if(t.draggable===!0||t.draggable===I.pointerType){s.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",_);const C=r.current;s.canCloseOnClick=!0,s.canDrag=!0,C.style.transition="none",t.draggableDirection==="x"?(s.start=I.clientX,s.removalDistance=C.offsetWidth*(t.draggablePercent/100)):(s.start=I.clientY,s.removalDistance=C.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(I){const{top:C,bottom:y,left:x,right:E}=r.current.getBoundingClientRect();I.nativeEvent.type!=="touchend"&&t.pauseOnHover&&I.clientX>=x&&I.clientX<=E&&I.clientY>=C&&I.clientY<=y?p():d()}};return a&&A&&(f.onMouseEnter=p,t.stacked||(f.onMouseLeave=d)),u&&(f.onClick=I=>{l&&l(I),s.canCloseOnClick&&c()}),{playToast:d,pauseToast:p,isRunning:e,preventExitTransition:o,toastRef:r,eventHandlers:f}}function kNi(t){let{delay:e,isRunning:n,closeToast:o,type:i="default",hide:r,className:s,style:a,controlledProgress:A,progress:c,rtl:l,isIn:u,theme:g}=t;const h=r||A&&c===0,d={...a,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};A&&(d.transform=`scaleX(${c})`);const p=NB("Toastify__progress-bar",A?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":l}),m=NE(s)?s({rtl:l,type:i,defaultClassName:p}):NB(p,s),_={[A&&c>=1?"onTransitionEnd":"onAnimationEnd"]:A&&c<1?null:()=>{u&&o()}};return Fs.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":h},Fs.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${i}`}),Fs.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:m,style:d,..._}))}let FNi=1;const xgn=()=>""+FNi++;function LNi(t){return t&&(kT(t.toastId)||JZ(t.toastId))?t.toastId:xgn()}function jZ(t,e){return Cgn(t,e),e.toastId}function L_e(t,e){return{...e,type:e&&e.type||t,toastId:LNi(e)}}function H_e(t){return(e,n)=>jZ(e,L_e(t,n))}function vd(t,e){return jZ(t,L_e("default",e))}vd.loading=(t,e)=>jZ(t,L_e("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),vd.promise=function(t,e,n){let o,{pending:i,error:r,success:s}=e;i&&(o=kT(i)?vd.loading(i,n):vd.loading(i.render,{...n,...i}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},A=(l,u,g)=>{if(u==null)return void vd.dismiss(o);const h={type:l,...a,...n,data:g},d=kT(u)?{render:u}:u;return o?vd.update(o,{...h,...d}):vd(d.render,{...h,...d}),g},c=NE(t)?t():t;return c.then(l=>A("success",s,l)).catch(l=>A("error",r,l)),c},vd.success=H_e("success"),vd.info=H_e("info"),vd.error=H_e("error"),vd.warning=H_e("warning"),vd.warn=vd.warning,vd.dark=(t,e)=>jZ(t,L_e("default",{theme:"dark",...e})),vd.dismiss=function(t){(function(e){var n;if(fgn()){if(e==null||kT(n=e)||JZ(n))u2.forEach(o=>{o.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const o=u2.get(e.containerId);o?o.removeToast(e.id):u2.forEach(i=>{i.removeToast(e.id)})}}else WZ=WZ.filter(o=>e!=null&&o.options.toastId!==e)})(t)},vd.clearWaitingQueue=function(t){t===void 0&&(t={}),u2.forEach(e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()})},vd.isActive=Ign,vd.update=function(t,e){e===void 0&&(e={});const n=((o,i)=>{var r;let{containerId:s}=i;return(r=u2.get(s||1))==null?void 0:r.toasts.get(o)})(t,e);if(n){const{props:o,content:i}=n,r={delay:100,...o,...e,toastId:e.toastId||t,updateId:xgn()};r.toastId!==t&&(r.staleId=t);const s=r.render||i;delete r.render,jZ(s,r)}},vd.done=t=>{vd.update(t,{progress:1})},vd.onChange=function(t){return Bje.add(t),()=>{Bje.delete(t)}},vd.play=t=>ygn(!0,t),vd.pause=t=>ygn(!1,t);const HNi=typeof window<"u"?ee.useLayoutEffect:ee.useEffect,O_e=t=>{let{theme:e,type:n,isLoading:o,...i}=t;return Fs.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},bje={info:function(t){return Fs.createElement(O_e,{...t},Fs.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(t){return Fs.createElement(O_e,{...t},Fs.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(t){return Fs.createElement(O_e,{...t},Fs.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(t){return Fs.createElement(O_e,{...t},Fs.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Fs.createElement("div",{className:"Toastify__spinner"})}},ONi=t=>{const{isRunning:e,preventExitTransition:n,toastRef:o,eventHandlers:i,playToast:r}=TNi(t),{closeButton:s,children:a,autoClose:A,onClick:c,type:l,hideProgressBar:u,closeToast:g,transition:h,position:d,className:p,style:m,bodyClassName:_,bodyStyle:f,progressClassName:I,progressStyle:C,updateId:y,role:x,progress:E,rtl:B,toastId:S,deleteToast:Q,isIn:w,isLoading:M,closeOnClick:k,theme:R}=t,F=NB("Toastify__toast",`Toastify__toast-theme--${R}`,`Toastify__toast--${l}`,{"Toastify__toast--rtl":B},{"Toastify__toast--close-on-click":k}),O=NE(p)?p({rtl:B,position:d,type:l,defaultClassName:F}):NB(F,p),U=(function(j){let{theme:J,type:oe,isLoading:ie,icon:ne}=j,le=null;const ge={theme:J,type:oe};return ne===!1||(NE(ne)?le=ne({...ge,isLoading:ie}):ee.isValidElement(ne)?le=ee.cloneElement(ne,ge):ie?le=bje.spinner():(_e=>_e in bje)(oe)&&(le=bje[oe](ge))),le})(t),Y=!!E||!A,W={closeToast:g,type:l,theme:R};let te=null;return s===!1||(te=NE(s)?s(W):ee.isValidElement(s)?ee.cloneElement(s,W):(function(j){let{closeToast:J,theme:oe,ariaLabel:ie="close"}=j;return Fs.createElement("button",{className:`Toastify__close-button Toastify__close-button--${oe}`,type:"button",onClick:ne=>{ne.stopPropagation(),J(ne)},"aria-label":ie},Fs.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Fs.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))})(W)),Fs.createElement(h,{isIn:w,done:Q,position:d,preventExitTransition:n,nodeRef:o,playToast:r},Fs.createElement("div",{id:S,onClick:c,"data-in":w,className:O,...i,style:m,ref:o},Fs.createElement("div",{...w&&{role:x},className:NE(_)?_({type:l}):NB("Toastify__toast-body",_),style:f},U!=null&&Fs.createElement("div",{className:NB("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!M})},U),Fs.createElement("div",null,a)),te,Fs.createElement(kNi,{...y&&!Y?{key:`pb-${y}`}:{},rtl:B,theme:R,delay:A,isRunning:e,isIn:w,closeToast:g,hide:u,type:l,style:C,className:I,controlledProgress:Y,progress:E||0})))},G_e=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},GNi=F_e(G_e("bounce",!0));F_e(G_e("slide",!0)),F_e(G_e("zoom")),F_e(G_e("flip"));const YNi={position:"top-right",transition:GNi,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function UNi(t){let e={...YNi,...t};const n=t.stacked,[o,i]=ee.useState(!0),r=ee.useRef(null),{getToastToRender:s,isToastActive:a,count:A}=RNi(e),{className:c,style:l,rtl:u,containerId:g}=e;function h(p){const m=NB("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":u});return NE(c)?c({position:p,rtl:u,defaultClassName:m}):NB(m,k_e(c))}function d(){n&&(i(!0),vd.play())}return HNi(()=>{if(n){var p;const m=r.current.querySelectorAll('[data-in="true"]'),_=12,f=(p=e.position)==null?void 0:p.includes("top");let I=0,C=0;Array.from(m).reverse().forEach((y,x)=>{const E=y;E.classList.add("Toastify__toast--stacked"),x>0&&(E.dataset.collapsed=`${o}`),E.dataset.pos||(E.dataset.pos=f?"top":"bot");const B=I*(o?.2:1)+(o?0:_*x);E.style.setProperty("--y",`${f?B:-1*B}px`),E.style.setProperty("--g",`${_}`),E.style.setProperty("--s",""+(1-(o?C:0))),I+=E.offsetHeight,C+=.025})}},[o,A,n]),Fs.createElement("div",{ref:r,className:"Toastify",id:g,onMouseEnter:()=>{n&&(i(!1),vd.pause())},onMouseLeave:d},s((p,m)=>{const _=m.length?{...l}:{...l,pointerEvents:"none"};return Fs.createElement("div",{className:h(p),style:_,key:`container-${p}`},m.map(f=>{let{content:I,props:C}=f;return Fs.createElement(ONi,{...C,stacked:n,collapseAll:d,isIn:a(C.toastId,C.containerId),style:C.style,key:`toast-${C.key}`},I)}))}))}function KNi(){var t=':root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}',e=document.createElement("style");e.innerText=t,document.head.appendChild(e)}const VNi=wit(WQn);var Sje,Egn;function zNi(){if(Egn)return Sje;Egn=1;var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(m,_)=>{for(var f in _)t(m,f,{get:_[f],enumerable:!0})},r=(m,_,f,I)=>{if(_&&typeof _=="object"||typeof _=="function")for(let C of n(_))!o.call(m,C)&&C!==f&&t(m,C,{get:()=>_[C],enumerable:!(I=e(_,C))||I.enumerable});return m},s=m=>r(t({},"__esModule",{value:!0}),m),a={};i(a,{SuperGrid:()=>p,toMMSI:()=>d,toMeterSI:()=>h}),Sje=s(a);var A=L3(),c=VNi,l=kit(),u=(m,_,f)=>{const I=[];if(_<m)for(let C=m;C>=_;C-=Math.abs(f))I.push(C);else for(let C=m;C<=_;C+=Math.abs(f))I.push(C);return I};function g(m,_){return{x:Math.round(_.x/m)*m,y:Math.round(_.y/m)*m}}function h(m,_=1){return m<0?"-"+h(-m):m<1e-6?"0m":m>1e3?Math.floor(m/1e3)+"km":m>1&&_>1?Math.round(m)+"m":m>1&&_<=1?m.toFixed(Math.ceil(-Math.log10(_)))+"m":m<1&&_>=1/1e3?Math.round(m*1e3)+"mm":m<1&&_<1/1e3?(m*1e3).toFixed(Math.ceil(-Math.log10(_*1e3)))+"mm":""}function d(m,_=1){return h(m/1e3,_/1e3)}var p=m=>{var _;const f=(0,A.useRef)(null),[I,C]=(0,A.useState)({x:0,y:0}),{majorColor:y="rgba(0,0,0,0.2)",minorColor:x="rgba(0,0,0,0.1)",textColor:E=(_=m.majorColor)!=null?_:"rgba(0,0,0,0.5)",width:B,height:S,screenSpaceCellSize:Q=200,stringifyCoord:w=(F,O,U)=>`${h(F,U)}, ${h(O,U)}`}=m,M=Math.ceil(B/Q)+2,k=Math.ceil(S/Q)+2;(0,A.useEffect)(()=>{if(!f.current)return;const F=f.current.getContext("2d");if(!F)return;const O=Q/10**Math.floor(Math.log10(m.transform.a)),U=m.transform.d<0?-1:1,W=Q/10**Math.log10(m.transform.a)/O;function te(fe,pe,ye){const Me=fe;let ve,he,Qe;for(ve=pe.x;ve<=ye.x;ve+=Me)he=(0,c.applyToPoint)(m.transform,{x:ve,y:pe.y}),Qe=(0,c.applyToPoint)(m.transform,{x:ve,y:ye.y}),F.beginPath(),F.moveTo(he.x,he.y),F.lineTo(Qe.x,Qe.y),F.stroke();const Pe=u(pe.y,ye.y,Me*U);for(const we of Pe)he=(0,c.applyToPoint)(m.transform,{x:pe.x,y:we}),Qe=(0,c.applyToPoint)(m.transform,{x:ye.x,y:we}),F.beginPath(),F.moveTo(he.x,he.y),F.lineTo(Qe.x,Qe.y),F.stroke()}function j(fe,pe,ye){const Me=fe;let ve;for(ve=pe.x;ve<=ye.x;ve+=Me)for(const he of u(pe.y,ye.y,Me*U)){const Qe=(0,c.applyToPoint)(m.transform,{x:ve,y:he});F.fillStyle=E,F.font="12px sans-serif",F.fillText(w(ve,he,fe),Qe.x+2,Qe.y-2)}}F.clearRect(0,0,B,S);const J=(0,c.applyToPoint)((0,c.inverse)(m.transform),{x:0,y:0}),oe={x:Math.floor((J.x-O)/O)*O,y:Math.floor((J.y-O)/O+(U==-1?2:0))*O},ie={x:oe.x+O*M,y:oe.y+O*k*U},le=O*5,ge={x:Math.floor((J.x-le)/le)*le,y:Math.floor((J.y-le)/le+(U==-1?2:0))*le},_e={x:ge.x+le*M,y:ge.y+le*k*U};F.globalAlpha=1,F.strokeStyle=y,te(O,oe,ie),j(le,ge,_e),F.globalAlpha=1-W,te(le/10,ge,_e),F.globalAlpha=1-W,F.strokeStyle=x,te(O/10,oe,ie),F.globalAlpha=Math.max(((1-W)*10-5)/5,0),j(le/10,ge,_e),F.globalAlpha=1;const ue=(0,c.applyToPoint)(m.transform,I);F.font="12px sans-serif",F.fillStyle=E,F.fillText(w(I.x,I.y,O),ue.x+2,ue.y-2),F.strokeStyle=y,F.strokeRect(ue.x-5,ue.y-5,10,10)},[f,m.transform,I,B,S]);const R=F=>{if(!f.current)return;const O=Q/10/10**Math.floor(Math.log10(m.transform.a)),U=f.current.getBoundingClientRect(),Y=(0,c.applyToPoint)((0,c.inverse)(m.transform),{x:F.clientX-U.left,y:F.clientY-U.top}),W=g(O,Y);C(W)};return(0,l.jsx)("canvas",{onMouseUp:F=>{F.button===1&&R(F)},onDoubleClick:R,ref:f,width:m.width,height:m.height})};return Sje}var FT=zNi(),Qje={exports:{}},vje,Bgn;function JNi(){return Bgn||(Bgn=1,vje={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),vje}var wje={exports:{}},Pje,bgn;function WNi(){return bgn||(bgn=1,Pje=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}),Pje}var Sgn;function jNi(){if(Sgn)return wje.exports;Sgn=1;var t=WNi(),e=Array.prototype.concat,n=Array.prototype.slice,o=wje.exports=function(r){for(var s=[],a=0,A=r.length;a<A;a++){var c=r[a];t(c)?s=e.call(s,n.call(c)):s.push(c)}return s};return o.wrap=function(i){return function(){return i(o(arguments))}},wje.exports}var Qgn;function $Ni(){if(Qgn)return Qje.exports;Qgn=1;var t=JNi(),e=jNi(),n=Object.hasOwnProperty,o=Object.create(null);for(var i in t)n.call(t,i)&&(o[t[i]]=i);var r=Qje.exports={to:{},get:{}};r.get=function(A){var c=A.substring(0,3).toLowerCase(),l,u;switch(c){case"hsl":l=r.get.hsl(A),u="hsl";break;case"hwb":l=r.get.hwb(A),u="hwb";break;default:l=r.get.rgb(A),u="rgb";break}return l?{model:u,value:l}:null},r.get.rgb=function(A){if(!A)return null;var c=/^#([a-f0-9]{3,4})$/i,l=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,u=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,g=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,h=/^(\w+)$/,d=[0,0,0,1],p,m,_;if(p=A.match(l)){for(_=p[2],p=p[1],m=0;m<3;m++){var f=m*2;d[m]=parseInt(p.slice(f,f+2),16)}_&&(d[3]=parseInt(_,16)/255)}else if(p=A.match(c)){for(p=p[1],_=p[3],m=0;m<3;m++)d[m]=parseInt(p[m]+p[m],16);_&&(d[3]=parseInt(_+_,16)/255)}else if(p=A.match(u)){for(m=0;m<3;m++)d[m]=parseInt(p[m+1],0);p[4]&&(p[5]?d[3]=parseFloat(p[4])*.01:d[3]=parseFloat(p[4]))}else if(p=A.match(g)){for(m=0;m<3;m++)d[m]=Math.round(parseFloat(p[m+1])*2.55);p[4]&&(p[5]?d[3]=parseFloat(p[4])*.01:d[3]=parseFloat(p[4]))}else return(p=A.match(h))?p[1]==="transparent"?[0,0,0,0]:n.call(t,p[1])?(d=t[p[1]],d[3]=1,d):null:null;for(m=0;m<3;m++)d[m]=s(d[m],0,255);return d[3]=s(d[3],0,1),d},r.get.hsl=function(A){if(!A)return null;var c=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,l=A.match(c);if(l){var u=parseFloat(l[4]),g=(parseFloat(l[1])%360+360)%360,h=s(parseFloat(l[2]),0,100),d=s(parseFloat(l[3]),0,100),p=s(isNaN(u)?1:u,0,1);return[g,h,d,p]}return null},r.get.hwb=function(A){if(!A)return null;var c=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,l=A.match(c);if(l){var u=parseFloat(l[4]),g=(parseFloat(l[1])%360+360)%360,h=s(parseFloat(l[2]),0,100),d=s(parseFloat(l[3]),0,100),p=s(isNaN(u)?1:u,0,1);return[g,h,d,p]}return null},r.to.hex=function(){var A=e(arguments);return"#"+a(A[0])+a(A[1])+a(A[2])+(A[3]<1?a(Math.round(A[3]*255)):"")},r.to.rgb=function(){var A=e(arguments);return A.length<4||A[3]===1?"rgb("+Math.round(A[0])+", "+Math.round(A[1])+", "+Math.round(A[2])+")":"rgba("+Math.round(A[0])+", "+Math.round(A[1])+", "+Math.round(A[2])+", "+A[3]+")"},r.to.rgb.percent=function(){var A=e(arguments),c=Math.round(A[0]/255*100),l=Math.round(A[1]/255*100),u=Math.round(A[2]/255*100);return A.length<4||A[3]===1?"rgb("+c+"%, "+l+"%, "+u+"%)":"rgba("+c+"%, "+l+"%, "+u+"%, "+A[3]+")"},r.to.hsl=function(){var A=e(arguments);return A.length<4||A[3]===1?"hsl("+A[0]+", "+A[1]+"%, "+A[2]+"%)":"hsla("+A[0]+", "+A[1]+"%, "+A[2]+"%, "+A[3]+")"},r.to.hwb=function(){var A=e(arguments),c="";return A.length>=4&&A[3]!==1&&(c=", "+A[3]),"hwb("+A[0]+", "+A[1]+"%, "+A[2]+"%"+c+")"},r.to.keyword=function(A){return o[A.slice(0,3)]};function s(A,c,l){return Math.min(Math.max(c,A),l)}function a(A){var c=Math.round(A).toString(16).toUpperCase();return c.length<2?"0"+c:c}return Qje.exports}var Mje,vgn;function qNi(){return vgn||(vgn=1,Mje={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Mje}var Dje,wgn;function Pgn(){if(wgn)return Dje;wgn=1;const t=qNi(),e={};for(const i of Object.keys(t))e[t[i]]=i;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Dje=n;for(const i of Object.keys(n)){if(!("channels"in n[i]))throw new Error("missing channels property: "+i);if(!("labels"in n[i]))throw new Error("missing channel labels property: "+i);if(n[i].labels.length!==n[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:r,labels:s}=n[i];delete n[i].channels,delete n[i].labels,Object.defineProperty(n[i],"channels",{value:r}),Object.defineProperty(n[i],"labels",{value:s})}n.rgb.hsl=function(i){const r=i[0]/255,s=i[1]/255,a=i[2]/255,A=Math.min(r,s,a),c=Math.max(r,s,a),l=c-A;let u,g;c===A?u=0:r===c?u=(s-a)/l:s===c?u=2+(a-r)/l:a===c&&(u=4+(r-s)/l),u=Math.min(u*60,360),u<0&&(u+=360);const h=(A+c)/2;return c===A?g=0:h<=.5?g=l/(c+A):g=l/(2-c-A),[u,g*100,h*100]},n.rgb.hsv=function(i){let r,s,a,A,c;const l=i[0]/255,u=i[1]/255,g=i[2]/255,h=Math.max(l,u,g),d=h-Math.min(l,u,g),p=function(m){return(h-m)/6/d+1/2};return d===0?(A=0,c=0):(c=d/h,r=p(l),s=p(u),a=p(g),l===h?A=a-s:u===h?A=1/3+r-a:g===h&&(A=2/3+s-r),A<0?A+=1:A>1&&(A-=1)),[A*360,c*100,h*100]},n.rgb.hwb=function(i){const r=i[0],s=i[1];let a=i[2];const A=n.rgb.hsl(i)[0],c=1/255*Math.min(r,Math.min(s,a));return a=1-1/255*Math.max(r,Math.max(s,a)),[A,c*100,a*100]},n.rgb.cmyk=function(i){const r=i[0]/255,s=i[1]/255,a=i[2]/255,A=Math.min(1-r,1-s,1-a),c=(1-r-A)/(1-A)||0,l=(1-s-A)/(1-A)||0,u=(1-a-A)/(1-A)||0;return[c*100,l*100,u*100,A*100]};function o(i,r){return(i[0]-r[0])**2+(i[1]-r[1])**2+(i[2]-r[2])**2}return n.rgb.keyword=function(i){const r=e[i];if(r)return r;let s=1/0,a;for(const A of Object.keys(t)){const c=t[A],l=o(i,c);l<s&&(s=l,a=A)}return a},n.keyword.rgb=function(i){return t[i]},n.rgb.xyz=function(i){let r=i[0]/255,s=i[1]/255,a=i[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const A=r*.4124+s*.3576+a*.1805,c=r*.2126+s*.7152+a*.0722,l=r*.0193+s*.1192+a*.9505;return[A*100,c*100,l*100]},n.rgb.lab=function(i){const r=n.rgb.xyz(i);let s=r[0],a=r[1],A=r[2];s/=95.047,a/=100,A/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,A=A>.008856?A**(1/3):7.787*A+16/116;const c=116*a-16,l=500*(s-a),u=200*(a-A);return[c,l,u]},n.hsl.rgb=function(i){const r=i[0]/360,s=i[1]/100,a=i[2]/100;let A,c,l;if(s===0)return l=a*255,[l,l,l];a<.5?A=a*(1+s):A=a+s-a*s;const u=2*a-A,g=[0,0,0];for(let h=0;h<3;h++)c=r+1/3*-(h-1),c<0&&c++,c>1&&c--,6*c<1?l=u+(A-u)*6*c:2*c<1?l=A:3*c<2?l=u+(A-u)*(2/3-c)*6:l=u,g[h]=l*255;return g},n.hsl.hsv=function(i){const r=i[0];let s=i[1]/100,a=i[2]/100,A=s;const c=Math.max(a,.01);a*=2,s*=a<=1?a:2-a,A*=c<=1?c:2-c;const l=(a+s)/2,u=a===0?2*A/(c+A):2*s/(a+s);return[r,u*100,l*100]},n.hsv.rgb=function(i){const r=i[0]/60,s=i[1]/100;let a=i[2]/100;const A=Math.floor(r)%6,c=r-Math.floor(r),l=255*a*(1-s),u=255*a*(1-s*c),g=255*a*(1-s*(1-c));switch(a*=255,A){case 0:return[a,g,l];case 1:return[u,a,l];case 2:return[l,a,g];case 3:return[l,u,a];case 4:return[g,l,a];case 5:return[a,l,u]}},n.hsv.hsl=function(i){const r=i[0],s=i[1]/100,a=i[2]/100,A=Math.max(a,.01);let c,l;l=(2-s)*a;const u=(2-s)*A;return c=s*A,c/=u<=1?u:2-u,c=c||0,l/=2,[r,c*100,l*100]},n.hwb.rgb=function(i){const r=i[0]/360;let s=i[1]/100,a=i[2]/100;const A=s+a;let c;A>1&&(s/=A,a/=A);const l=Math.floor(6*r),u=1-a;c=6*r-l,(l&1)!==0&&(c=1-c);const g=s+c*(u-s);let h,d,p;switch(l){default:case 6:case 0:h=u,d=g,p=s;break;case 1:h=g,d=u,p=s;break;case 2:h=s,d=u,p=g;break;case 3:h=s,d=g,p=u;break;case 4:h=g,d=s,p=u;break;case 5:h=u,d=s,p=g;break}return[h*255,d*255,p*255]},n.cmyk.rgb=function(i){const r=i[0]/100,s=i[1]/100,a=i[2]/100,A=i[3]/100,c=1-Math.min(1,r*(1-A)+A),l=1-Math.min(1,s*(1-A)+A),u=1-Math.min(1,a*(1-A)+A);return[c*255,l*255,u*255]},n.xyz.rgb=function(i){const r=i[0]/100,s=i[1]/100,a=i[2]/100;let A,c,l;return A=r*3.2406+s*-1.5372+a*-.4986,c=r*-.9689+s*1.8758+a*.0415,l=r*.0557+s*-.204+a*1.057,A=A>.0031308?1.055*A**(1/2.4)-.055:A*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,A=Math.min(Math.max(0,A),1),c=Math.min(Math.max(0,c),1),l=Math.min(Math.max(0,l),1),[A*255,c*255,l*255]},n.xyz.lab=function(i){let r=i[0],s=i[1],a=i[2];r/=95.047,s/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const A=116*s-16,c=500*(r-s),l=200*(s-a);return[A,c,l]},n.lab.xyz=function(i){const r=i[0],s=i[1],a=i[2];let A,c,l;c=(r+16)/116,A=s/500+c,l=c-a/200;const u=c**3,g=A**3,h=l**3;return c=u>.008856?u:(c-16/116)/7.787,A=g>.008856?g:(A-16/116)/7.787,l=h>.008856?h:(l-16/116)/7.787,A*=95.047,c*=100,l*=108.883,[A,c,l]},n.lab.lch=function(i){const r=i[0],s=i[1],a=i[2];let A;A=Math.atan2(a,s)*360/2/Math.PI,A<0&&(A+=360);const l=Math.sqrt(s*s+a*a);return[r,l,A]},n.lch.lab=function(i){const r=i[0],s=i[1],A=i[2]/360*2*Math.PI,c=s*Math.cos(A),l=s*Math.sin(A);return[r,c,l]},n.rgb.ansi16=function(i,r=null){const[s,a,A]=i;let c=r===null?n.rgb.hsv(i)[2]:r;if(c=Math.round(c/50),c===0)return 30;let l=30+(Math.round(A/255)<<2|Math.round(a/255)<<1|Math.round(s/255));return c===2&&(l+=60),l},n.hsv.ansi16=function(i){return n.rgb.ansi16(n.hsv.rgb(i),i[2])},n.rgb.ansi256=function(i){const r=i[0],s=i[1],a=i[2];return r===s&&s===a?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(s/255*5)+Math.round(a/255*5)},n.ansi16.rgb=function(i){let r=i%10;if(r===0||r===7)return i>50&&(r+=3.5),r=r/10.5*255,[r,r,r];const s=(~~(i>50)+1)*.5,a=(r&1)*s*255,A=(r>>1&1)*s*255,c=(r>>2&1)*s*255;return[a,A,c]},n.ansi256.rgb=function(i){if(i>=232){const c=(i-232)*10+8;return[c,c,c]}i-=16;let r;const s=Math.floor(i/36)/5*255,a=Math.floor((r=i%36)/6)/5*255,A=r%6/5*255;return[s,a,A]},n.rgb.hex=function(i){const s=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(s.length)+s},n.hex.rgb=function(i){const r=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let s=r[0];r[0].length===3&&(s=s.split("").map(u=>u+u).join(""));const a=parseInt(s,16),A=a>>16&255,c=a>>8&255,l=a&255;return[A,c,l]},n.rgb.hcg=function(i){const r=i[0]/255,s=i[1]/255,a=i[2]/255,A=Math.max(Math.max(r,s),a),c=Math.min(Math.min(r,s),a),l=A-c;let u,g;return l<1?u=c/(1-l):u=0,l<=0?g=0:A===r?g=(s-a)/l%6:A===s?g=2+(a-r)/l:g=4+(r-s)/l,g/=6,g%=1,[g*360,l*100,u*100]},n.hsl.hcg=function(i){const r=i[1]/100,s=i[2]/100,a=s<.5?2*r*s:2*r*(1-s);let A=0;return a<1&&(A=(s-.5*a)/(1-a)),[i[0],a*100,A*100]},n.hsv.hcg=function(i){const r=i[1]/100,s=i[2]/100,a=r*s;let A=0;return a<1&&(A=(s-a)/(1-a)),[i[0],a*100,A*100]},n.hcg.rgb=function(i){const r=i[0]/360,s=i[1]/100,a=i[2]/100;if(s===0)return[a*255,a*255,a*255];const A=[0,0,0],c=r%1*6,l=c%1,u=1-l;let g=0;switch(Math.floor(c)){case 0:A[0]=1,A[1]=l,A[2]=0;break;case 1:A[0]=u,A[1]=1,A[2]=0;break;case 2:A[0]=0,A[1]=1,A[2]=l;break;case 3:A[0]=0,A[1]=u,A[2]=1;break;case 4:A[0]=l,A[1]=0,A[2]=1;break;default:A[0]=1,A[1]=0,A[2]=u}return g=(1-s)*a,[(s*A[0]+g)*255,(s*A[1]+g)*255,(s*A[2]+g)*255]},n.hcg.hsv=function(i){const r=i[1]/100,s=i[2]/100,a=r+s*(1-r);let A=0;return a>0&&(A=r/a),[i[0],A*100,a*100]},n.hcg.hsl=function(i){const r=i[1]/100,a=i[2]/100*(1-r)+.5*r;let A=0;return a>0&&a<.5?A=r/(2*a):a>=.5&&a<1&&(A=r/(2*(1-a))),[i[0],A*100,a*100]},n.hcg.hwb=function(i){const r=i[1]/100,s=i[2]/100,a=r+s*(1-r);return[i[0],(a-r)*100,(1-a)*100]},n.hwb.hcg=function(i){const r=i[1]/100,a=1-i[2]/100,A=a-r;let c=0;return A<1&&(c=(a-A)/(1-A)),[i[0],A*100,c*100]},n.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},n.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},n.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},n.gray.hsl=function(i){return[0,0,i[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(i){return[0,100,i[0]]},n.gray.cmyk=function(i){return[0,0,0,i[0]]},n.gray.lab=function(i){return[i[0],0,0]},n.gray.hex=function(i){const r=Math.round(i[0]/100*255)&255,a=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(a.length)+a},n.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},Dje}var Nje,Mgn;function XNi(){if(Mgn)return Nje;Mgn=1;const t=Pgn();function e(){const r={},s=Object.keys(t);for(let a=s.length,A=0;A<a;A++)r[s[A]]={distance:-1,parent:null};return r}function n(r){const s=e(),a=[r];for(s[r].distance=0;a.length;){const A=a.pop(),c=Object.keys(t[A]);for(let l=c.length,u=0;u<l;u++){const g=c[u],h=s[g];h.distance===-1&&(h.distance=s[A].distance+1,h.parent=A,a.unshift(g))}}return s}function o(r,s){return function(a){return s(r(a))}}function i(r,s){const a=[s[r].parent,r];let A=t[s[r].parent][r],c=s[r].parent;for(;s[c].parent;)a.unshift(s[c].parent),A=o(t[s[c].parent][c],A),c=s[c].parent;return A.conversion=a,A}return Nje=function(r){const s=n(r),a={},A=Object.keys(s);for(let c=A.length,l=0;l<c;l++){const u=A[l];s[u].parent!==null&&(a[u]=i(u,s))}return a},Nje}var Rje,Dgn;function ZNi(){if(Dgn)return Rje;Dgn=1;const t=Pgn(),e=XNi(),n={},o=Object.keys(t);function i(s){const a=function(...A){const c=A[0];return c==null?c:(c.length>1&&(A=c),s(A))};return"conversion"in s&&(a.conversion=s.conversion),a}function r(s){const a=function(...A){const c=A[0];if(c==null)return c;c.length>1&&(A=c);const l=s(A);if(typeof l=="object")for(let u=l.length,g=0;g<u;g++)l[g]=Math.round(l[g]);return l};return"conversion"in s&&(a.conversion=s.conversion),a}return o.forEach(s=>{n[s]={},Object.defineProperty(n[s],"channels",{value:t[s].channels}),Object.defineProperty(n[s],"labels",{value:t[s].labels});const a=e(s);Object.keys(a).forEach(c=>{const l=a[c];n[s][c]=r(l),n[s][c].raw=i(l)})}),Rje=n,Rje}var Tje,Ngn;function eRi(){if(Ngn)return Tje;Ngn=1;const t=$Ni(),e=ZNi(),n=["keyword","gray","hex"],o={};for(const g of Object.keys(e))o[[...e[g].labels].sort().join("")]=g;const i={};function r(g,h){if(!(this instanceof r))return new r(g,h);if(h&&h in n&&(h=null),h&&!(h in e))throw new Error("Unknown model: "+h);let d,p;if(g==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(g instanceof r)this.model=g.model,this.color=[...g.color],this.valpha=g.valpha;else if(typeof g=="string"){const m=t.get(g);if(m===null)throw new Error("Unable to parse color from string: "+g);this.model=m.model,p=e[this.model].channels,this.color=m.value.slice(0,p),this.valpha=typeof m.value[p]=="number"?m.value[p]:1}else if(g.length>0){this.model=h||"rgb",p=e[this.model].channels;const m=Array.prototype.slice.call(g,0,p);this.color=u(m,p),this.valpha=typeof g[p]=="number"?g[p]:1}else if(typeof g=="number")this.model="rgb",this.color=[g>>16&255,g>>8&255,g&255],this.valpha=1;else{this.valpha=1;const m=Object.keys(g);"alpha"in g&&(m.splice(m.indexOf("alpha"),1),this.valpha=typeof g.alpha=="number"?g.alpha:0);const _=m.sort().join("");if(!(_ in o))throw new Error("Unable to parse color from object: "+JSON.stringify(g));this.model=o[_];const{labels:f}=e[this.model],I=[];for(d=0;d<f.length;d++)I.push(g[f[d]]);this.color=u(I)}if(i[this.model])for(p=e[this.model].channels,d=0;d<p;d++){const m=i[this.model][d];m&&(this.color[d]=m(this.color[d]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}r.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(g){let h=this.model in t.to?this:this.rgb();h=h.round(typeof g=="number"?g:1);const d=h.valpha===1?h.color:[...h.color,this.valpha];return t.to[h.model](d)},percentString(g){const h=this.rgb().round(typeof g=="number"?g:1),d=h.valpha===1?h.color:[...h.color,this.valpha];return t.to.rgb.percent(d)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const g={},{channels:h}=e[this.model],{labels:d}=e[this.model];for(let p=0;p<h;p++)g[d[p]]=this.color[p];return this.valpha!==1&&(g.alpha=this.valpha),g},unitArray(){const g=this.rgb().color;return g[0]/=255,g[1]/=255,g[2]/=255,this.valpha!==1&&g.push(this.valpha),g},unitObject(){const g=this.rgb().object();return g.r/=255,g.g/=255,g.b/=255,this.valpha!==1&&(g.alpha=this.valpha),g},round(g){return g=Math.max(g||0,0),new r([...this.color.map(a(g)),this.valpha],this.model)},alpha(g){return g!==void 0?new r([...this.color,Math.max(0,Math.min(1,g))],this.model):this.valpha},red:A("rgb",0,c(255)),green:A("rgb",1,c(255)),blue:A("rgb",2,c(255)),hue:A(["hsl","hsv","hsl","hwb","hcg"],0,g=>(g%360+360)%360),saturationl:A("hsl",1,c(100)),lightness:A("hsl",2,c(100)),saturationv:A("hsv",1,c(100)),value:A("hsv",2,c(100)),chroma:A("hcg",1,c(100)),gray:A("hcg",2,c(100)),white:A("hwb",1,c(100)),wblack:A("hwb",2,c(100)),cyan:A("cmyk",0,c(100)),magenta:A("cmyk",1,c(100)),yellow:A("cmyk",2,c(100)),black:A("cmyk",3,c(100)),x:A("xyz",0,c(95.047)),y:A("xyz",1,c(100)),z:A("xyz",2,c(108.833)),l:A("lab",0,c(100)),a:A("lab",1),b:A("lab",2),keyword(g){return g!==void 0?new r(g):e[this.model].keyword(this.color)},hex(g){return g!==void 0?new r(g):t.to.hex(this.rgb().round().color)},hexa(g){if(g!==void 0)return new r(g);const h=this.rgb().round().color;let d=Math.round(this.valpha*255).toString(16).toUpperCase();return d.length===1&&(d="0"+d),t.to.hex(h)+d},rgbNumber(){const g=this.rgb().color;return(g[0]&255)<<16|(g[1]&255)<<8|g[2]&255},luminosity(){const g=this.rgb().color,h=[];for(const[d,p]of g.entries()){const m=p/255;h[d]=m<=.04045?m/12.92:((m+.055)/1.055)**2.4}return .2126*h[0]+.7152*h[1]+.0722*h[2]},contrast(g){const h=this.luminosity(),d=g.luminosity();return h>d?(h+.05)/(d+.05):(d+.05)/(h+.05)},level(g){const h=this.contrast(g);return h>=7?"AAA":h>=4.5?"AA":""},isDark(){const g=this.rgb().color;return(g[0]*2126+g[1]*7152+g[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const g=this.rgb();for(let h=0;h<3;h++)g.color[h]=255-g.color[h];return g},lighten(g){const h=this.hsl();return h.color[2]+=h.color[2]*g,h},darken(g){const h=this.hsl();return h.color[2]-=h.color[2]*g,h},saturate(g){const h=this.hsl();return h.color[1]+=h.color[1]*g,h},desaturate(g){const h=this.hsl();return h.color[1]-=h.color[1]*g,h},whiten(g){const h=this.hwb();return h.color[1]+=h.color[1]*g,h},blacken(g){const h=this.hwb();return h.color[2]+=h.color[2]*g,h},grayscale(){const g=this.rgb().color,h=g[0]*.3+g[1]*.59+g[2]*.11;return r.rgb(h,h,h)},fade(g){return this.alpha(this.valpha-this.valpha*g)},opaquer(g){return this.alpha(this.valpha+this.valpha*g)},rotate(g){const h=this.hsl();let d=h.color[0];return d=(d+g)%360,d=d<0?360+d:d,h.color[0]=d,h},mix(g,h){if(!g||!g.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof g);const d=g.rgb(),p=this.rgb(),m=h===void 0?.5:h,_=2*m-1,f=d.alpha()-p.alpha(),I=((_*f===-1?_:(_+f)/(1+_*f))+1)/2,C=1-I;return r.rgb(I*d.red()+C*p.red(),I*d.green()+C*p.green(),I*d.blue()+C*p.blue(),d.alpha()*m+p.alpha()*(1-m))}};for(const g of Object.keys(e)){if(n.includes(g))continue;const{channels:h}=e[g];r.prototype[g]=function(...d){return this.model===g?new r(this):d.length>0?new r(d,g):new r([...l(e[this.model][g].raw(this.color)),this.valpha],g)},r[g]=function(...d){let p=d[0];return typeof p=="number"&&(p=u(d,h)),new r(p,g)}}function s(g,h){return Number(g.toFixed(h))}function a(g){return function(h){return s(h,g)}}function A(g,h,d){g=Array.isArray(g)?g:[g];for(const p of g)(i[p]||(i[p]=[]))[h]=d;return g=g[0],function(p){let m;return p!==void 0?(d&&(p=d(p)),m=this[g](),m.color[h]=p,m):(m=this[g]().color[h],d&&(m=d(m)),m)}}function c(g){return function(h){return Math.max(0,Math.min(g,h))}}function l(g){return Array.isArray(g)?g:[g]}function u(g,h){for(let d=0;d<h;d++)typeof g[d]!="number"&&(g[d]=0);return g}return Tje=r,Tje}var tRi=eRi();const Ka=_y(tRi);function nRi(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function oRi(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var iRi=(function(){function t(n){var o=this;this._insertTag=function(i){var r;o.tags.length===0?o.insertionPoint?r=o.insertionPoint.nextSibling:o.prepend?r=o.container.firstChild:r=o.before:r=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(i,r),o.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(o){o.forEach(this._insertTag)},e.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(oRi(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var r=nRi(i);try{r.insertRule(o,r.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(o));this.ctr++},e.flush=function(){this.tags.forEach(function(o){var i;return(i=o.parentNode)==null?void 0:i.removeChild(o)}),this.tags=[],this.ctr=0},t})(),RC="-ms-",Y_e="-moz-",f0="-webkit-",Rgn="comm",kje="rule",Fje="decl",rRi="@import",Tgn="@keyframes",sRi="@layer",aRi=Math.abs,U_e=String.fromCharCode,ARi=Object.assign;function cRi(t,e){return _I(t,0)^45?(((e<<2^_I(t,0))<<2^_I(t,1))<<2^_I(t,2))<<2^_I(t,3):0}function kgn(t){return t.trim()}function lRi(t,e){return(t=e.exec(t))?t[0]:t}function I0(t,e,n){return t.replace(e,n)}function Lje(t,e){return t.indexOf(e)}function _I(t,e){return t.charCodeAt(e)|0}function $Z(t,e,n){return t.slice(e,n)}function z6(t){return t.length}function Hje(t){return t.length}function K_e(t,e){return e.push(t),t}function uRi(t,e){return t.map(e).join("")}var V_e=1,NU=1,Fgn=0,Xx=0,l_=0,RU="";function z_e(t,e,n,o,i,r,s){return{value:t,root:e,parent:n,type:o,props:i,children:r,line:V_e,column:NU,length:s,return:""}}function qZ(t,e){return ARi(z_e("",null,null,"",null,null,0),t,{length:-t.length},e)}function gRi(){return l_}function dRi(){return l_=Xx>0?_I(RU,--Xx):0,NU--,l_===10&&(NU=1,V_e--),l_}function RE(){return l_=Xx<Fgn?_I(RU,Xx++):0,NU++,l_===10&&(NU=1,V_e++),l_}function J6(){return _I(RU,Xx)}function J_e(){return Xx}function XZ(t,e){return $Z(RU,t,e)}function ZZ(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Lgn(t){return V_e=NU=1,Fgn=z6(RU=t),Xx=0,[]}function Hgn(t){return RU="",t}function W_e(t){return kgn(XZ(Xx-1,Oje(t===91?t+2:t===40?t+1:t)))}function hRi(t){for(;(l_=J6())&&l_<33;)RE();return ZZ(t)>2||ZZ(l_)>3?"":" "}function pRi(t,e){for(;--e&&RE()&&!(l_<48||l_>102||l_>57&&l_<65||l_>70&&l_<97););return XZ(t,J_e()+(e<6&&J6()==32&&RE()==32))}function Oje(t){for(;RE();)switch(l_){case t:return Xx;case 34:case 39:t!==34&&t!==39&&Oje(l_);break;case 40:t===41&&Oje(t);break;case 92:RE();break}return Xx}function mRi(t,e){for(;RE()&&t+l_!==57;)if(t+l_===84&&J6()===47)break;return"/*"+XZ(e,Xx-1)+"*"+U_e(t===47?t:RE())}function _Ri(t){for(;!ZZ(J6());)RE();return XZ(t,Xx)}function fRi(t){return Hgn(j_e("",null,null,null,[""],t=Lgn(t),0,[0],t))}function j_e(t,e,n,o,i,r,s,a,A){for(var c=0,l=0,u=s,g=0,h=0,d=0,p=1,m=1,_=1,f=0,I="",C=i,y=r,x=o,E=I;m;)switch(d=f,f=RE()){case 40:if(d!=108&&_I(E,u-1)==58){Lje(E+=I0(W_e(f),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:E+=W_e(f);break;case 9:case 10:case 13:case 32:E+=hRi(d);break;case 92:E+=pRi(J_e()-1,7);continue;case 47:switch(J6()){case 42:case 47:K_e(IRi(mRi(RE(),J_e()),e,n),A);break;default:E+="/"}break;case 123*p:a[c++]=z6(E)*_;case 125*p:case 59:case 0:switch(f){case 0:case 125:m=0;case 59+l:_==-1&&(E=I0(E,/\f/g,"")),h>0&&z6(E)-u&&K_e(h>32?Ggn(E+";",o,n,u-1):Ggn(I0(E," ","")+";",o,n,u-2),A);break;case 59:E+=";";default:if(K_e(x=Ogn(E,e,n,c,l,i,a,I,C=[],y=[],u),r),f===123)if(l===0)j_e(E,e,x,x,C,r,u,a,y);else switch(g===99&&_I(E,3)===110?100:g){case 100:case 108:case 109:case 115:j_e(t,x,x,o&&K_e(Ogn(t,x,x,0,0,i,a,I,i,C=[],u),y),i,y,u,a,o?C:y);break;default:j_e(E,x,x,x,[""],y,0,a,y)}}c=l=h=0,p=_=1,I=E="",u=s;break;case 58:u=1+z6(E),h=d;default:if(p<1){if(f==123)--p;else if(f==125&&p++==0&&dRi()==125)continue}switch(E+=U_e(f),f*p){case 38:_=l>0?1:(E+="\f",-1);break;case 44:a[c++]=(z6(E)-1)*_,_=1;break;case 64:J6()===45&&(E+=W_e(RE())),g=J6(),l=u=z6(I=E+=_Ri(J_e())),f++;break;case 45:d===45&&z6(E)==2&&(p=0)}}return r}function Ogn(t,e,n,o,i,r,s,a,A,c,l){for(var u=i-1,g=i===0?r:[""],h=Hje(g),d=0,p=0,m=0;d<o;++d)for(var _=0,f=$Z(t,u+1,u=aRi(p=s[d])),I=t;_<h;++_)(I=kgn(p>0?g[_]+" "+f:I0(f,/&\f/g,g[_])))&&(A[m++]=I);return z_e(t,e,n,i===0?kje:a,A,c,l)}function IRi(t,e,n){return z_e(t,e,n,Rgn,U_e(gRi()),$Z(t,2,-2),0)}function Ggn(t,e,n,o){return z_e(t,e,n,Fje,$Z(t,0,o),$Z(t,o+1,-1),o)}function TU(t,e){for(var n="",o=Hje(t),i=0;i<o;i++)n+=e(t[i],i,t,e)||"";return n}function CRi(t,e,n,o){switch(t.type){case sRi:if(t.children.length)break;case rRi:case Fje:return t.return=t.return||t.value;case Rgn:return"";case Tgn:return t.return=t.value+"{"+TU(t.children,o)+"}";case kje:t.value=t.props.join(",")}return z6(n=TU(t.children,o))?t.return=t.value+"{"+n+"}":""}function yRi(t){var e=Hje(t);return function(n,o,i,r){for(var s="",a=0;a<e;a++)s+=t[a](n,o,i,r)||"";return s}}function xRi(t){return function(e){e.root||(e=e.return)&&t(e)}}function ERi(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var BRi=function(e,n,o){for(var i=0,r=0;i=r,r=J6(),i===38&&r===12&&(n[o]=1),!ZZ(r);)RE();return XZ(e,Xx)},bRi=function(e,n){var o=-1,i=44;do switch(ZZ(i)){case 0:i===38&&J6()===12&&(n[o]=1),e[o]+=BRi(Xx-1,n,o);break;case 2:e[o]+=W_e(i);break;case 4:if(i===44){e[++o]=J6()===58?"&\f":"",n[o]=e[o].length;break}default:e[o]+=U_e(i)}while(i=RE());return e},SRi=function(e,n){return Hgn(bRi(Lgn(e),n))},Ygn=new WeakMap,QRi=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,o=e.parent,i=e.column===o.column&&e.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Ygn.get(o))&&!i){Ygn.set(e,!0);for(var r=[],s=SRi(n,r),a=o.props,A=0,c=0;A<s.length;A++)for(var l=0;l<a.length;l++,c++)e.props[c]=r[A]?s[A].replace(/&\f/g,a[l]):a[l]+" "+s[A]}}},vRi=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function Ugn(t,e){switch(cRi(t,e)){case 5103:return f0+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return f0+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return f0+t+Y_e+t+RC+t+t;case 6828:case 4268:return f0+t+RC+t+t;case 6165:return f0+t+RC+"flex-"+t+t;case 5187:return f0+t+I0(t,/(\w+).+(:[^]+)/,f0+"box-$1$2"+RC+"flex-$1$2")+t;case 5443:return f0+t+RC+"flex-item-"+I0(t,/flex-|-self/,"")+t;case 4675:return f0+t+RC+"flex-line-pack"+I0(t,/align-content|flex-|-self/,"")+t;case 5548:return f0+t+RC+I0(t,"shrink","negative")+t;case 5292:return f0+t+RC+I0(t,"basis","preferred-size")+t;case 6060:return f0+"box-"+I0(t,"-grow","")+f0+t+RC+I0(t,"grow","positive")+t;case 4554:return f0+I0(t,/([^-])(transform)/g,"$1"+f0+"$2")+t;case 6187:return I0(I0(I0(t,/(zoom-|grab)/,f0+"$1"),/(image-set)/,f0+"$1"),t,"")+t;case 5495:case 3959:return I0(t,/(image-set\([^]*)/,f0+"$1$`$1");case 4968:return I0(I0(t,/(.+:)(flex-)?(.*)/,f0+"box-pack:$3"+RC+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+f0+t+t;case 4095:case 3583:case 4068:case 2532:return I0(t,/(.+)-inline(.+)/,f0+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(z6(t)-1-e>6)switch(_I(t,e+1)){case 109:if(_I(t,e+4)!==45)break;case 102:return I0(t,/(.+:)(.+)-([^]+)/,"$1"+f0+"$2-$3$1"+Y_e+(_I(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Lje(t,"stretch")?Ugn(I0(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(_I(t,e+1)!==115)break;case 6444:switch(_I(t,z6(t)-3-(~Lje(t,"!important")&&10))){case 107:return I0(t,":",":"+f0)+t;case 101:return I0(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+f0+(_I(t,14)===45?"inline-":"")+"box$3$1"+f0+"$2$3$1"+RC+"$2box$3")+t}break;case 5936:switch(_I(t,e+11)){case 114:return f0+t+RC+I0(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return f0+t+RC+I0(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return f0+t+RC+I0(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return f0+t+RC+t+t}return t}var wRi=function(e,n,o,i){if(e.length>-1&&!e.return)switch(e.type){case Fje:e.return=Ugn(e.value,e.length);break;case Tgn:return TU([qZ(e,{value:I0(e.value,"@","@"+f0)})],i);case kje:if(e.length)return uRi(e.props,function(r){switch(lRi(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return TU([qZ(e,{props:[I0(r,/:(read-\w+)/,":"+Y_e+"$1")]})],i);case"::placeholder":return TU([qZ(e,{props:[I0(r,/:(plac\w+)/,":"+f0+"input-$1")]}),qZ(e,{props:[I0(r,/:(plac\w+)/,":"+Y_e+"$1")]}),qZ(e,{props:[I0(r,/:(plac\w+)/,RC+"input-$1")]})],i)}return""})}},PRi=[wRi],MRi=function(e){var n=e.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(p){var m=p.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var i=e.stylisPlugins||PRi,r={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var m=p.getAttribute("data-emotion").split(" "),_=1;_<m.length;_++)r[m[_]]=!0;a.push(p)});var A,c=[QRi,vRi];{var l,u=[CRi,xRi(function(p){l.insert(p)})],g=yRi(c.concat(i,u)),h=function(m){return TU(fRi(m),g)};A=function(m,_,f,I){l=f,h(m?m+"{"+_.styles+"}":_.styles),I&&(d.inserted[_.name]=!0)}}var d={key:n,sheet:new iRi({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:r,registered:{},insert:A};return d.sheet.hydrate(a),d};function DRi(t){for(var e=0,n,o=0,i=t.length;i>=4;++o,i-=4)n=t.charCodeAt(o)&255|(t.charCodeAt(++o)&255)<<8|(t.charCodeAt(++o)&255)<<16|(t.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(o+2)&255)<<16;case 2:e^=(t.charCodeAt(o+1)&255)<<8;case 1:e^=t.charCodeAt(o)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var NRi={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},RRi=/[A-Z]|^ms/g,TRi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Kgn=function(e){return e.charCodeAt(1)===45},Vgn=function(e){return e!=null&&typeof e!="boolean"},Gje=ERi(function(t){return Kgn(t)?t:t.replace(RRi,"-$&").toLowerCase()}),zgn=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(TRi,function(o,i,r){return TP={name:i,styles:r,next:TP},i})}return NRi[e]!==1&&!Kgn(e)&&typeof n=="number"&&n!==0?n+"px":n};function $_e(t,e,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return TP={name:i.name,styles:i.styles,next:TP},i.name;var r=n;if(r.styles!==void 0){var s=r.next;if(s!==void 0)for(;s!==void 0;)TP={name:s.name,styles:s.styles,next:TP},s=s.next;var a=r.styles+";";return a}return kRi(t,e,n)}}var A=n;if(e==null)return A;var c=e[A];return c!==void 0?c:A}function kRi(t,e,n){var o="";if(Array.isArray(n))for(var i=0;i<n.length;i++)o+=$_e(t,e,n[i])+";";else for(var r in n){var s=n[r];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?o+=r+"{"+e[a]+"}":Vgn(a)&&(o+=Gje(r)+":"+zgn(r,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var A=0;A<s.length;A++)Vgn(s[A])&&(o+=Gje(r)+":"+zgn(r,s[A])+";");else{var c=$_e(t,e,s);switch(r){case"animation":case"animationName":{o+=Gje(r)+":"+c+";";break}default:o+=r+"{"+c+"}"}}}return o}var Jgn=/label:\s*([^\s;{]+)\s*(;|$)/g,TP;function Yje(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,i="";TP=void 0;var r=t[0];if(r==null||r.raw===void 0)o=!1,i+=$_e(n,e,r);else{var s=r;i+=s[0]}for(var a=1;a<t.length;a++)if(i+=$_e(n,e,t[a]),o){var A=r;i+=A[a]}Jgn.lastIndex=0;for(var c="",l;(l=Jgn.exec(i))!==null;)c+="-"+l[1];var u=DRi(i)+c;return{name:u,styles:i,next:TP}}function Wgn(t,e,n){var o="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(o+=i+" ")}),o}var FRi=function(e,n,o){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},LRi=function(e,n,o){FRi(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var r=n;do e.insert(n===r?"."+i:"",r,e.sheet,!0),r=r.next;while(r!==void 0)}};function jgn(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function $gn(t,e,n){var o=[],i=Wgn(t,o,n);return o.length<2?n:i+e(o)}var HRi=function(e){var n=MRi(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var o=function(){for(var A=arguments.length,c=new Array(A),l=0;l<A;l++)c[l]=arguments[l];var u=Yje(c,n.registered,void 0);return LRi(n,u),n.key+"-"+u.name},i=function(){for(var A=arguments.length,c=new Array(A),l=0;l<A;l++)c[l]=arguments[l];var u=Yje(c,n.registered),g="animation-"+u.name;return jgn(n,{name:u.name,styles:"@keyframes "+g+"{"+u.styles+"}"}),g},r=function(){for(var A=arguments.length,c=new Array(A),l=0;l<A;l++)c[l]=arguments[l];var u=Yje(c,n.registered);jgn(n,u)},s=function(){for(var A=arguments.length,c=new Array(A),l=0;l<A;l++)c[l]=arguments[l];return $gn(n.registered,o,ORi(c))};return{css:o,cx:s,injectGlobal:r,keyframes:i,hydrate:function(A){A.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Wgn.bind(null,n.registered),merge:$gn.bind(null,n.registered,o)}},ORi=function t(e){for(var n="",o=0;o<e.length;o++){var i=e[o];if(i!=null){var r=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))r=t(i);else{r="";for(var s in i)i[s]&&s&&(r&&(r+=" "),r+=s)}break}default:r=i}r&&(n&&(n+=" "),n+=r)}}return n},GRi=HRi({key:"css"}),kU=GRi.css,YRi=Object.create,Uje=Object.defineProperty,URi=Object.getOwnPropertyDescriptor,Kje=Object.getOwnPropertyNames,KRi=Object.getPrototypeOf,VRi=Object.prototype.hasOwnProperty,zRi=(t,e)=>function(){return t&&(e=(0,t[Kje(t)[0]])(t=0)),e},Vje=(t,e)=>function(){return e||(0,t[Kje(t)[0]])((e={exports:{}}).exports,e),e.exports},JRi=(t,e)=>{for(var n in e)Uje(t,n,{get:e[n],enumerable:!0})},WRi=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Kje(e))!VRi.call(t,i)&&i!==n&&Uje(t,i,{get:()=>e[i],enumerable:!(o=URi(e,i))||o.enumerable});return t},qgn=(t,e,n)=>(n=t!=null?YRi(KRi(t)):{},WRi(e||!t||!t.__esModule?Uje(n,"default",{value:t,enumerable:!0}):n,t)),jRi=Vje({"node_modules/toggle-selection/index.js"(t,e){e.exports=function(){var n=document.getSelection();if(!n.rangeCount)return function(){};for(var o=document.activeElement,i=[],r=0;r<n.rangeCount;r++)i.push(n.getRangeAt(r));switch(o.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":o.blur();break;default:o=null;break}return n.removeAllRanges(),function(){n.type==="Caret"&&n.removeAllRanges(),n.rangeCount||i.forEach(function(s){n.addRange(s)}),o&&o.focus()}}}}),$Ri=Vje({"node_modules/copy-to-clipboard/index.js"(t,e){var n=jRi(),o={"text/plain":"Text","text/html":"Url",default:"Text"},i="Copy to clipboard: #{key}, Enter";function r(a){var A=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,A)}function s(a,A){var c,l,u,g,h,d,p=!1;A||(A={}),c=A.debug||!1;try{u=n(),g=document.createRange(),h=document.getSelection(),d=document.createElement("span"),d.textContent=a,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(_){if(_.stopPropagation(),A.format)if(_.preventDefault(),typeof _.clipboardData>"u"){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=o[A.format]||o.default;window.clipboardData.setData(f,a)}else _.clipboardData.clearData(),_.clipboardData.setData(A.format,a);A.onCopy&&(_.preventDefault(),A.onCopy(_.clipboardData))}),document.body.appendChild(d),g.selectNodeContents(d),h.addRange(g);var m=document.execCommand("copy");if(!m)throw new Error("copy command was unsuccessful");p=!0}catch(_){c&&console.error("unable to copy using execCommand: ",_),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(A.format||"text",a),A.onCopy&&A.onCopy(window.clipboardData),p=!0}catch(f){c&&console.error("unable to copy using clipboardData: ",f),c&&console.error("falling back to prompt"),l=r("message"in A?A.message:i),window.prompt(l,a)}}finally{h&&(typeof h.removeRange=="function"?h.removeRange(g):h.removeAllRanges()),d&&document.body.removeChild(d),u()}return p}e.exports=s}}),Xgn={};JRi(Xgn,{default:()=>qRi});function qRi(){const t=URL.createObjectURL(new Blob(["\"use strict\";(()=>{var _0=Object.defineProperty;var M0=(y,x,e)=>x in y?_0(y,x,{enumerable:!0,configurable:!0,writable:!0,value:e}):y[x]=e;var M=(y,x,e)=>M0(y,typeof x!=\"symbol\"?x+\"\":x,e);function V(y,x,e=2){let t=x&&x.length,r=t?x[0]*e:y.length,n=e0(y,0,r,e,!0),o=[];if(!n||n.next===n.prev)return o;let i,a,c;if(t&&(n=R0(y,x,n,e)),y.length>80*e){i=y[0],a=y[1];let d=i,f=a;for(let l=e;l<r;l+=e){let p=y[l],s=y[l+1];p<i&&(i=p),s<a&&(a=s),p>d&&(d=p),s>f&&(f=s)}c=Math.max(d-i,f-a),c=c!==0?32767/c:0}return N(n,o,e,i,a,c,0),o}function e0(y,x,e,t,r){let n;if(r===A0(y,x,e,t)>0)for(let o=x;o<e;o+=t)n=x0(o/t|0,y[o],y[o+1],n);else for(let o=e-t;o>=x;o-=t)n=x0(o/t|0,y[o],y[o+1],n);return n&&U(n,n.next)&&(A(n),n=n.next),n}function I(y,x){if(!y)return y;x||(x=y);let e=y,t;do if(t=!1,!e.steiner&&(U(e,e.next)||v(e.prev,e,e.next)===0)){if(A(e),e=x=e.prev,e===e.next)break;t=!0}else e=e.next;while(t||e!==x);return x}function N(y,x,e,t,r,n,o){if(!y)return;!o&&n&&E0(y,t,r,n);let i=y;for(;y.prev!==y.next;){let a=y.prev,c=y.next;if(n?b0(y,t,r,n):v0(y)){x.push(a.i,y.i,c.i),A(y),y=c.next,i=c.next;continue}if(y=c,y===i){o?o===1?(y=w0(I(y),x),N(y,x,e,t,r,n,2)):o===2&&P0(y,x,e,t,r,n):N(I(y),x,e,t,r,n,1);break}}}function v0(y){let x=y.prev,e=y,t=y.next;if(v(x,e,t)>=0)return!1;let r=x.x,n=e.x,o=t.x,i=x.y,a=e.y,c=t.y,d=Math.min(r,n,o),f=Math.min(i,a,c),l=Math.max(r,n,o),p=Math.max(i,a,c),s=t.next;for(;s!==x;){if(s.x>=d&&s.x<=l&&s.y>=f&&s.y<=p&&F(r,i,n,a,o,c,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function b0(y,x,e,t){let r=y.prev,n=y,o=y.next;if(v(r,n,o)>=0)return!1;let i=r.x,a=n.x,c=o.x,d=r.y,f=n.y,l=o.y,p=Math.min(i,a,c),s=Math.min(d,f,l),L=Math.max(i,a,c),m=Math.max(d,f,l),u=X(p,s,x,e,t),_=X(L,m,x,e,t),h=y.prevZ,g=y.nextZ;for(;h&&h.z>=u&&g&&g.z<=_;){if(h.x>=p&&h.x<=L&&h.y>=s&&h.y<=m&&h!==r&&h!==o&&F(i,d,a,f,c,l,h.x,h.y)&&v(h.prev,h,h.next)>=0||(h=h.prevZ,g.x>=p&&g.x<=L&&g.y>=s&&g.y<=m&&g!==r&&g!==o&&F(i,d,a,f,c,l,g.x,g.y)&&v(g.prev,g,g.next)>=0))return!1;g=g.nextZ}for(;h&&h.z>=u;){if(h.x>=p&&h.x<=L&&h.y>=s&&h.y<=m&&h!==r&&h!==o&&F(i,d,a,f,c,l,h.x,h.y)&&v(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;g&&g.z<=_;){if(g.x>=p&&g.x<=L&&g.y>=s&&g.y<=m&&g!==r&&g!==o&&F(i,d,a,f,c,l,g.x,g.y)&&v(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function w0(y,x){let e=y;do{let t=e.prev,r=e.next.next;!U(t,r)&&r0(t,e,e.next,r)&&B(t,r)&&B(r,t)&&(x.push(t.i,e.i,r.i),A(e),A(e.next),e=y=r),e=e.next}while(e!==y);return I(e)}function P0(y,x,e,t,r,n){let o=y;do{let i=o.next.next;for(;i!==o.prev;){if(o.i!==i.i&&F0(o,i)){let a=n0(o,i);o=I(o,o.next),a=I(a,a.next),N(o,x,e,t,r,n,0),N(a,x,e,t,r,n,0);return}i=i.next}o=o.next}while(o!==y)}function R0(y,x,e,t){let r=[];for(let n=0,o=x.length;n<o;n++){let i=x[n]*t,a=n<o-1?x[n+1]*t:y.length,c=e0(y,i,a,t,!1);c===c.next&&(c.steiner=!0),r.push(W0(c))}r.sort(I0);for(let n=0;n<r.length;n++)e=G0(r[n],e);return e}function I0(y,x){let e=y.x-x.x;if(e===0&&(e=y.y-x.y,e===0)){let t=(y.next.y-y.y)/(y.next.x-y.x),r=(x.next.y-x.y)/(x.next.x-x.x);e=t-r}return e}function G0(y,x){let e=T0(y,x);if(!e)return x;let t=n0(e,y);return I(t,t.next),I(e,e.next)}function T0(y,x){let e=x,t=y.x,r=y.y,n=-1/0,o;if(U(y,e))return e;do{if(U(y,e.next))return e.next;if(r<=e.y&&r>=e.next.y&&e.next.y!==e.y){let f=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(f<=t&&f>n&&(n=f,o=e.x<e.next.x?e:e.next,f===t))return o}e=e.next}while(e!==x);if(!o)return null;let i=o,a=o.x,c=o.y,d=1/0;e=o;do{if(t>=e.x&&e.x>=a&&t!==e.x&&t0(r<c?t:n,r,a,c,r<c?n:t,r,e.x,e.y)){let f=Math.abs(r-e.y)/(t-e.x);B(e,y)&&(f<d||f===d&&(e.x>o.x||e.x===o.x&&U0(o,e)))&&(o=e,d=f)}e=e.next}while(e!==i);return o}function U0(y,x){return v(y.prev,y,x.prev)<0&&v(x.next,y,y.next)<0}function E0(y,x,e,t){let r=y;do r.z===0&&(r.z=X(r.x,r.y,x,e,t)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==y);r.prevZ.nextZ=null,r.prevZ=null,k0(r)}function k0(y){let x,e=1;do{let t=y,r;y=null;let n=null;for(x=0;t;){x++;let o=t,i=0;for(let c=0;c<e&&(i++,o=o.nextZ,!!o);c++);let a=e;for(;i>0||a>0&&o;)i!==0&&(a===0||!o||t.z<=o.z)?(r=t,t=t.nextZ,i--):(r=o,o=o.nextZ,a--),n?n.nextZ=r:y=r,r.prevZ=n,n=r;t=o}n.nextZ=null,e*=2}while(x>1);return y}function X(y,x,e,t,r){return y=(y-e)*r|0,x=(x-t)*r|0,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,x=(x|x<<8)&16711935,x=(x|x<<4)&252645135,x=(x|x<<2)&858993459,x=(x|x<<1)&1431655765,y|x<<1}function W0(y){let x=y,e=y;do(x.x<e.x||x.x===e.x&&x.y<e.y)&&(e=x),x=x.next;while(x!==y);return e}function t0(y,x,e,t,r,n,o,i){return(r-o)*(x-i)>=(y-o)*(n-i)&&(y-o)*(t-i)>=(e-o)*(x-i)&&(e-o)*(n-i)>=(r-o)*(t-i)}function F(y,x,e,t,r,n,o,i){return!(y===o&&x===i)&&t0(y,x,e,t,r,n,o,i)}function F0(y,x){return y.next.i!==x.i&&y.prev.i!==x.i&&!N0(y,x)&&(B(y,x)&&B(x,y)&&B0(y,x)&&(v(y.prev,y,x.prev)||v(y,x.prev,x))||U(y,x)&&v(y.prev,y,y.next)>0&&v(x.prev,x,x.next)>0)}function v(y,x,e){return(x.y-y.y)*(e.x-x.x)-(x.x-y.x)*(e.y-x.y)}function U(y,x){return y.x===x.x&&y.y===x.y}function r0(y,x,e,t){let r=S(v(y,x,e)),n=S(v(y,x,t)),o=S(v(e,t,y)),i=S(v(e,t,x));return!!(r!==n&&o!==i||r===0&&O(y,e,x)||n===0&&O(y,t,x)||o===0&&O(e,y,t)||i===0&&O(e,x,t))}function O(y,x,e){return x.x<=Math.max(y.x,e.x)&&x.x>=Math.min(y.x,e.x)&&x.y<=Math.max(y.y,e.y)&&x.y>=Math.min(y.y,e.y)}function S(y){return y>0?1:y<0?-1:0}function N0(y,x){let e=y;do{if(e.i!==y.i&&e.next.i!==y.i&&e.i!==x.i&&e.next.i!==x.i&&r0(e,e.next,y,x))return!0;e=e.next}while(e!==y);return!1}function B(y,x){return v(y.prev,y,y.next)<0?v(y,x,y.next)>=0&&v(y,y.prev,x)>=0:v(y,x,y.prev)<0||v(y,y.next,x)<0}function B0(y,x){let e=y,t=!1,r=(y.x+x.x)/2,n=(y.y+x.y)/2;do e.y>n!=e.next.y>n&&e.next.y!==e.y&&r<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(t=!t),e=e.next;while(e!==y);return t}function n0(y,x){let e=$(y.i,y.x,y.y),t=$(x.i,x.x,x.y),r=y.next,n=x.prev;return y.next=x,x.prev=y,e.next=r,r.prev=e,t.next=e,e.prev=t,n.next=t,t.prev=n,t}function x0(y,x,e,t){let r=$(y,x,e);return t?(r.next=t.next,r.prev=t,t.next.prev=r,t.next=r):(r.prev=r,r.next=r),r}function A(y){y.next.prev=y.prev,y.prev.next=y.next,y.prevZ&&(y.prevZ.nextZ=y.nextZ),y.nextZ&&(y.nextZ.prevZ=y.prevZ)}function $(y,x,e){return{i:y,x,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function A0(y,x,e,t){let r=0;for(let n=x,o=e-t;n<e;n+=t)r+=(y[o]-y[n])*(y[n+1]+y[o+1]),o=n;return r}var o0={0:\"M0.301025 0.257813 L0.206593 0.283385 L0.122042 0.361307 L0.075923 0.474441 L0.064942 0.642221 L0.091296 0.78289 L0.159376 0.899463 L0.257104 0.961214 L0.344948 0.961214 L0.442678 0.899463 L0.510757 0.78289 L0.537111 0.642221 L0.526131 0.474441 L0.480012 0.361307 L0.39546 0.283385 L0.301025 0.257813\",1:\"M0.220426 0.40845 L0.381626 0.270996 L0.381626 0.948966\",2:\"M0.110409 0.39212 L0.125621 0.342293 L0.170571 0.295823 L0.244237 0.26431 L0.291518 0.257813 L0.373319 0.263799 L0.434683 0.290705 L0.468239 0.331966 L0.480292 0.379913 L0.479492 0.411806 L0.465088 0.465192 L0.402571 0.568988 L0.245134 0.766438 L0.07959 0.948045 L0.522462 0.948045\",3:\"M0.081606 0.345073 L0.119154 0.315633 L0.178996 0.284091 L0.255265 0.257813 L0.349133 0.263062 L0.43127 0.289348 L0.48994 0.336662 L0.525141 0.394491 L0.513407 0.457577 L0.466472 0.504892 L0.384334 0.541692 L0.290464 0.56272 L0.20833 0.573235 L0.290464 0.583749 L0.384334 0.610035 L0.466472 0.652092 L0.519274 0.709922 L0.531007 0.773007 L0.50754 0.841351 L0.454738 0.899179 L0.3726 0.946494 L0.310412 0.961214 L0.209503 0.959111 L0.127367 0.946494 L0.071046 0.929671\",4:\"M0.418494 0.270996 L0.048828 0.724199 L0.553224 0.724199 M0.414181 0.578167 L0.414181 0.94897\",5:\"M0.074951 0.270996 L0.074951 0.614701 L0.267655 0.5695 L0.405247 0.586502 L0.460002 0.617189 L0.498028 0.660731 L0.527101 0.779401 L0.513352 0.841049 L0.477274 0.889568 L0.406378 0.93463 L0.324445 0.958337 L0.247399 0.962139 L0.182516 0.949767 L0.130068 0.925508 L0.074951 0.875607 M0.074951 0.270996 L0.527101 0.270996\",6:\"M0.428549 0.257813 L0.341433 0.285053 L0.26073 0.312099 L0.192188 0.360182 L0.138902 0.410969 L0.098219 0.500422 L0.070249 0.584267 L0.067264 0.670716 L0.065164 0.756863 L0.087163 0.820973 L0.108168 0.861042 L0.157916 0.913131 L0.210981 0.948192 L0.29279 0.961214 L0.384548 0.956206 L0.456409 0.924151 L0.507262 0.881077 L0.5349 0.821975 L0.537111 0.771889 L0.521634 0.718798 L0.498418 0.67372 L0.463042 0.636657 L0.414398 0.613617 L0.34696 0.598591 L0.28284 0.595587 L0.215403 0.605604 L0.145756 0.641665 L0.109274 0.678729 L0.064942 0.724006\",7:\"M0.071534 0.270996 L0.530519 0.270996 L0.495935 0.291702 L0.477752 0.305407 L0.435186 0.346112 L0.412067 0.374136 L0.388565 0.40796 L0.365315 0.448098 L0.342943 0.495062 L0.322081 0.549366 L0.303364 0.611524 L0.287416 0.68205 L0.270077 0.80465 L0.26253 0.94897\",8:\"M0.286761 0.257813 L0.210684 0.27162 L0.1414 0.305622 L0.092494 0.382125 L0.111513 0.450128 L0.16857 0.502193 L0.228345 0.539382 L0.377781 0.594635 L0.470161 0.645637 L0.52586 0.706203 L0.538087 0.792269 L0.506841 0.87621 L0.438915 0.927212 L0.339743 0.961214 L0.263666 0.959089 L0.174004 0.929337 L0.102003 0.881523 L0.063965 0.811395 L0.066682 0.741266 L0.102003 0.671139 L0.180797 0.608448 L0.259591 0.580822 L0.358762 0.548945 L0.456576 0.49688 L0.486463 0.446941 L0.487822 0.362999 L0.453859 0.302434 L0.384574 0.265245 L0.286761 0.257813\",9:\"M0.511026 0.437812 L0.491026 0.347812 L0.451026 0.297812 L0.391026 0.267812 L0.311026 0.257813 L0.231026 0.267812 L0.161026 0.297812 L0.111026 0.347812 L0.091026 0.417812 L0.111026 0.487812 L0.161026 0.537812 L0.231026 0.567812 L0.311026 0.577812 L0.391026 0.557812 L0.451026 0.517812 L0.491026 0.477812 L0.511026 0.437812 M0.510026 0.438812 L0.434026 0.636812 L0.381026 0.777812 L0.337026 0.879812 L0.301026 0.957812\",\"!\":\"M0.301026 0.270996 L0.301026 0.749566 M0.251466 0.94897 L0.350587 0.94897\",'\"':\"M0.16504 0.270996 L0.16504 0.523022 M0.437013 0.270996 L0.437013 0.523022\",\"#\":\"M0.20958 0.282227 L0.146515 0.949754 M0.461844 0.282227 L0.398779 0.949754 M0.032999 0.526969 L0.600587 0.452796 M0.001465 0.82366 L0.569055 0.749486\",$:\"M0.307121 0.240234 L0.307121 1.083502 M0.490031 0.415915 L0.404676 0.328075 L0.23396 0.310507 L0.136407 0.398347 L0.099828 0.521324 L0.124213 0.591596 L0.197379 0.644299 L0.429061 0.697003 L0.502224 0.749708 L0.526613 0.837547 L0.477836 0.960526 L0.355897 1.013228 L0.197379 0.99566 L0.112021 0.942957 L0.07544 0.837547\",\"'\":\"M0.301026 0.270996 L0.301026 0.523022\",\"(\":\"M0.413087 0.241211 L0.372337 0.28347 L0.331589 0.334184 L0.290838 0.393349 L0.25009 0.460965 L0.219528 0.528584 L0.199153 0.5962 L0.188966 0.655364 L0.199153 0.714529 L0.219528 0.782146 L0.25009 0.849764 L0.290838 0.91738 L0.331589 0.976544 L0.372337 1.027258 L0.413087 1.069491\",\")\":\"M0.188966 0.241211 L0.229716 0.28347 L0.270466 0.334184 L0.311213 0.393349 L0.351964 0.460965 L0.382526 0.528584 L0.4029 0.5962 L0.413087 0.655364 L0.4029 0.714529 L0.382526 0.782146 L0.351964 0.849764 L0.311213 0.91738 L0.270466 0.976544 L0.229716 1.027258 L0.188966 1.069491\",\"*\":\"M0.301026 0.458702 L0.301026 0.681942 M0.301026 0.458702 L0.520997 0.536834 M0.301026 0.458702 L0.439954 0.257813 M0.301026 0.458702 L0.162098 0.257813 M0.301026 0.458702 L0.081055 0.536834\",\"+\":\"M0.042969 0.66845 L0.559083 0.66845 M0.301023 0.428223 L0.301023 0.908661\",\",\":\"M0.38672 0.852051 L0.215333 1.030661 L0.301025 1.119971\",\"-\":\"M0.173829 0.686035 L0.428224 0.686035\",\".\":\"M0.362549 0.851074 L0.239503 0.851074\",\"/\":\"M0.062501 1.035249 L0.539551 0.270996\",\"<\":\"M0.559083 0.441895 L0.042969 0.66939 L0.042969 0.66939 L0.559083 0.896902\",\"=\":\"M0.042969 0.545898 L0.559083 0.545898 M0.042969 0.80837 L0.559083 0.80837\",\">\":\"M0.042969 0.441895 L0.559083 0.66939 L0.559083 0.66939 L0.042969 0.896902\",A:\"M0.018067 0.94897 L0.290179 0.270996 L0.583986 0.94897 M0.155303 0.684521 L0.433548 0.684521\",B:\"M0.063965 0.94897 L0.063965 0.278953 L0.209356 0.270996 L0.342486 0.294394 L0.432179 0.37292 L0.418224 0.48773 L0.312686 0.549166 L0.084728 0.575531 L0.306377 0.589434 L0.468877 0.647456 L0.538087 0.736658 L0.5324 0.85202 L0.501247 0.902983 L0.42355 0.944398 L0.063965 0.94897\",C:\"M0.529054 0.419847 L0.498425 0.345196 L0.442238 0.292341 L0.33583 0.257813 L0.257199 0.268357 L0.187906 0.303748 L0.120243 0.385432 L0.072998 0.599844 L0.110073 0.815385 L0.165381 0.902183 L0.222883 0.942801 L0.334904 0.961214 L0.43253 0.937679 L0.504816 0.868999 L0.529054 0.772065\",D:\"M0.064454 0.94897 L0.071838 0.285078 L0.171217 0.270996 L0.247348 0.272633 L0.37101 0.306078 L0.462461 0.378304 L0.514748 0.475555 L0.535591 0.576392 L0.537599 0.652313 L0.528065 0.717381 L0.508562 0.772419 L0.445948 0.855695 L0.362356 0.90871 L0.225203 0.945862 L0.064454 0.94897\",E:\"M0.080078 0.270996 L0.080078 0.94897 M0.080078 0.270996 L0.521974 0.270996 M0.080078 0.609981 L0.389405 0.609981 M0.080078 0.94897 L0.521974 0.94897\",F:\"M0.086426 0.270996 L0.086426 0.94897 M0.091304 0.275607 L0.515626 0.275607 M0.091304 0.607677 L0.447344 0.607677\",G:\"M0.498034 0.284943 L0.374621 0.257813 L0.244219 0.268648 L0.160577 0.311997 L0.094556 0.398116 L0.056397 0.58404 L0.076752 0.785532 L0.120865 0.858197 L0.188947 0.916734 L0.271008 0.953591 L0.357069 0.961214 L0.43715 0.932047 L0.501262 0.858539 L0.545656 0.648611 L0.329595 0.648131\",H:\"M0.066895 0.270996 L0.066895 0.94897 M0.066895 0.595658 L0.530009 0.595658 M0.535157 0.270996 L0.535157 0.94897\",I:\"M0.301026 0.270996 L0.301026 0.94897\",J:\"M0.506839 0.270996 L0.507814 0.782193 L0.498468 0.846168 L0.480733 0.880789 L0.455864 0.90832 L0.426095 0.929408 L0.360746 0.954812 L0.302508 0.962139 L0.223573 0.953638 L0.16538 0.930312 L0.137072 0.907715 L0.116428 0.880312 L0.102822 0.848819 L0.095633 0.813947 L0.094239 0.776413\",K:\"M0.035401 0.270996 L0.035401 0.94897 M0.502258 0.316194 L0.035401 0.687823 M0.212484 0.582361 L0.566652 0.933903\",L:\"M0.07544 0.270996 L0.07544 0.94897 L0.526613 0.94897\",M:\"M0.042481 0.94897 L0.042481 0.270996 L0.301027 0.712492 L0.559571 0.270996 L0.559571 0.94897\",N:\"M0.067871 0.94897 L0.067871 0.270996 L0.534181 0.94897 L0.525031 0.270996\",O:\"M0.287293 0.961214 L0.19843 0.933567 L0.1172 0.849451 L0.057129 0.563945 L0.114348 0.350255 L0.18455 0.289392 L0.306101 0.257813 L0.42054 0.29572 L0.487543 0.365003 L0.544923 0.625294 L0.516366 0.789624 L0.465476 0.884596 L0.375084 0.949287 L0.287293 0.961214\",P:\"M0.070557 0.94897 L0.070557 0.28379 L0.20704 0.270996 L0.329134 0.278993 L0.408525 0.300514 L0.444022 0.317908 L0.500637 0.368929 L0.525796 0.423728 L0.531496 0.50384 L0.508934 0.554205 L0.473724 0.582043 L0.417577 0.604365 L0.336375 0.620372 L0.226014 0.629268 L0.082368 0.630258\",Q:\"M0.282435 1.050813 L0.195447 1.019646 L0.115933 0.924817 L0.057129 0.602943 L0.113139 0.362034 L0.18186 0.293418 L0.300844 0.257813 L0.412868 0.300553 L0.478457 0.37866 L0.534625 0.672103 L0.506671 0.857367 L0.456855 0.964437 L0.368371 1.037368 L0.282435 1.050813 M0.341225 0.815559 L0.544923 1.070653\",R:\"M0.034912 0.944112 L0.034912 0.288556 L0.227127 0.270996 L0.362038 0.276867 L0.443423 0.294907 L0.477644 0.309614 L0.505809 0.328757 L0.526616 0.352817 L0.544963 0.418061 L0.543241 0.475921 L0.524463 0.517817 L0.49076 0.546518 L0.444265 0.564799 L0.355195 0.578739 L0.047653 0.589627 M0.303054 0.617306 L0.56714 0.94897\",S:\"M0.483037 0.364333 L0.407613 0.267477 L0.22883 0.257813 L0.128623 0.327565 L0.087712 0.455539 L0.104656 0.518727 L0.168054 0.573307 L0.41928 0.617318 L0.503796 0.669342 L0.535157 0.759324 L0.493846 0.900055 L0.367668 0.961214 L0.205436 0.956661 L0.116711 0.907038 L0.066895 0.790334\",T:\"M0.022949 0.270996 L0.579103 0.270996 M0.309284 0.270996 L0.309284 0.94897\",U:\"M0.072022 0.270996 L0.07308 0.648875 L0.080372 0.75167 L0.099024 0.827813 L0.134786 0.885729 L0.181571 0.924023 L0.251464 0.95168 L0.339655 0.962139 L0.401553 0.951668 L0.45232 0.924086 L0.482701 0.891771 L0.495745 0.870529 L0.515699 0.81637 L0.525014 0.744626 L0.530031 0.272017\",V:\"M0.027832 0.270996 L0.320083 0.94897 L0.57422 0.270996\",W:\"M0 0.270996 L0.079799 0.940377 L0.285198 0.472884 L0.505255 0.94897 L0.602052 0.270996\",X:\"M0.009034 0.270996 L0.586805 0.94897 M0.593019 0.270996 L0.015246 0.94897\",Y:\"M0.018067 0.270996 L0.293132 0.574135 M0.583986 0.271959 L0.294954 0.57606 L0.305277 0.94897\",Z:\"M0.053711 0.270996 L0.548341 0.270996 L0.053711 0.94897 L0.548341 0.94897\",\"[\":\"M0.404542 0.240234 L0.197511 0.240234 L0.197511 1.069424 L0.404542 1.069424\",\"\\\\\":\"M0.062501 0.270996 L0.539551 1.035249\",\"]\":\"M0.19751 0.240234 L0.404542 0.240234 L0.404542 1.069424 L0.19751 1.069424\",\"^\":\"M0.035156 0.523931 L0.301024 0.270996 L0.566896 0.523931\",_:\"M0 1.160601 L0.602052 1.160601\",a:\"M0.527101 0.439941 L0.527101 0.973965 M0.527101 0.553824 L0.451366 0.477535 L0.376759 0.439941 L0.263722 0.439941 L0.187989 0.477535 L0.112255 0.553824 L0.074951 0.66881 L0.074951 0.745099 L0.112255 0.85898 L0.187989 0.93527 L0.263722 0.973965 L0.376759 0.973965 L0.451366 0.93527 L0.527101 0.85898\",b:\"M0.07666 0.240234 L0.07666 0.959985 M0.07666 0.582737 L0.151822 0.514237 L0.225865 0.480483 L0.338045 0.480483 L0.413211 0.514237 L0.488374 0.582737 L0.525392 0.685983 L0.525392 0.754485 L0.488374 0.856739 L0.413211 0.92524 L0.338045 0.959985 L0.225865 0.959985 L0.151822 0.92524 L0.07666 0.856739\",c:\"M0.512452 0.553823 L0.441624 0.477535 L0.371854 0.439941 L0.26614 0.439941 L0.195312 0.477535 L0.124486 0.553823 L0.0896 0.668808 L0.0896 0.745099 L0.124486 0.858979 L0.195312 0.93527 L0.26614 0.973965 L0.371854 0.973965 L0.441624 0.93527 L0.512452 0.858979\",d:\"M0.525392 0.240234 L0.525392 0.959985 M0.525392 0.582737 L0.450232 0.514237 L0.376189 0.480483 L0.264006 0.480483 L0.188844 0.514237 L0.11368 0.582737 L0.076661 0.685983 L0.076661 0.754485 L0.11368 0.856739 L0.188844 0.92524 L0.264006 0.959985 L0.376189 0.959985 L0.450232 0.92524 L0.525392 0.856739\",e:\"M0.059571 0.668808 L0.542482 0.668808 M0.542482 0.592521 L0.502641 0.516231 L0.461594 0.477535 L0.381914 0.439941 L0.261186 0.439941 L0.180299 0.477535 L0.099412 0.553823 L0.059571 0.668808 L0.059571 0.745099 L0.099412 0.858979 L0.180299 0.93527 L0.261186 0.973965 L0.381914 0.973965 L0.461594 0.93527 L0.542482 0.858979\",f:\"M0.512941 0.240234 L0.406984 0.240234 L0.301026 0.274346 L0.248047 0.374731 L0.248047 0.946817 M0.089112 0.476088 L0.459965 0.476088\",g:\"M0.525392 0.439941 L0.525392 0.989395 L0.488373 1.091918 L0.45023 1.126757 L0.376189 1.160601 L0.264004 1.160601 L0.188844 1.126757 L0.113681 1.058075 L0.076661 0.954555 M0.525392 0.542467 L0.45023 0.473786 L0.376189 0.439941 L0.264004 0.439941 L0.188844 0.473786 L0.113681 0.542467 L0.076661 0.645988 L0.076661 0.714669 L0.113681 0.817193 L0.188844 0.885875 L0.264004 0.920713 L0.376189 0.920713 L0.45023 0.885875 L0.525392 0.817193\",h:\"M0.092041 0.240234 L0.092041 0.946817 M0.092041 0.61058 L0.205937 0.509225 L0.282214 0.476086 L0.396109 0.476086 L0.47187 0.509225 L0.510011 0.61058 L0.510011 0.946817\",i:\"M0.261026 0.240234 L0.341026 0.240234 M0.300978 0.476089 L0.300978 0.946817\",j:\"M0.3853 0.240234 L0.447023 0.240234 M0.416159 0.465708 L0.416159 1.011689 L0.383887 1.108586 L0.252832 1.140264 L0.15503 1.108586\",k:\"M0.065186 0.240234 L0.065186 0.946817 M0.493824 0.476086 L0.065186 0.812323 M0.236758 0.677829 L0.536867 0.946817\",l:\"M0.301026 0.234863 L0.301026 0.946441\",m:\"M0.050538 0.439941 L0.050538 0.960796 M0.050538 0.588758 L0.114405 0.476607 L0.157178 0.439941 L0.236864 0.439941 L0.279637 0.476607 L0.32241 0.588758 L0.32241 0.960796 M0.32241 0.588758 L0.386281 0.476607 L0.428467 0.439941 L0.50874 0.439941 L0.551515 0.476607 L0.551515 0.960796\",n:\"M0.092041 0.439941 L0.092041 0.960796 M0.092041 0.588758 L0.205936 0.476607 L0.282216 0.439941 L0.396113 0.439941 L0.471871 0.476607 L0.510011 0.588758 L0.510011 0.960796\",o:\"M0.247175 0.439941 L0.175178 0.477535 L0.103186 0.553823 L0.066895 0.668808 L0.066895 0.745099 L0.103186 0.858979 L0.175178 0.93527 L0.247175 0.973965 L0.354874 0.973965 L0.426872 0.93527 L0.498866 0.858979 L0.535157 0.745099 L0.535157 0.668808 L0.498866 0.553823 L0.426872 0.477535 L0.354874 0.439941 L0.247175 0.439941\",p:\"M0.076904 0.439941 L0.076904 1.154244 M0.076904 0.541563 L0.151986 0.473487 L0.225944 0.439941 L0.338005 0.439941 L0.413087 0.473487 L0.488166 0.541563 L0.525148 0.644169 L0.525148 0.712246 L0.488166 0.813866 L0.413087 0.881942 L0.338005 0.916471 L0.225944 0.916471 L0.151986 0.881942 L0.076904 0.813866\",q:\"M0.525148 0.441895 L0.525148 1.156195 M0.525148 0.5435 L0.450067 0.47544 L0.376106 0.441895 L0.264042 0.441895 L0.188966 0.47544 L0.113885 0.5435 L0.076905 0.646108 L0.076905 0.714187 L0.113885 0.815809 L0.188966 0.883886 L0.264042 0.918418 L0.376106 0.918418 L0.450067 0.883886 L0.525148 0.815809\",r:\"M0.107422 0.439941 L0.107422 0.960796 M0.107422 0.663164 L0.155824 0.551014 L0.252626 0.476607 L0.349428 0.439941 L0.49463 0.439941\",s:\"M0.475556 0.477535 L0.400757 0.439941 L0.276092 0.439941 L0.176361 0.477535 L0.101563 0.553823 L0.101563 0.630112 L0.176361 0.668808 L0.301024 0.668808 L0.425688 0.745099 L0.50049 0.821387 L0.50049 0.897677 L0.425688 0.93527 L0.325956 0.973965 L0.201295 0.973965 L0.126496 0.93527 L0.101563 0.858979\",t:\"M0.246032 0.297852 L0.246032 0.826549 L0.301023 0.919323 L0.411011 0.950848 L0.520997 0.950848 M0.081055 0.515799 L0.466004 0.515799\",u:\"M0.092041 0.454102 L0.092041 0.826134 L0.13018 0.937211 L0.205936 0.974954 L0.319832 0.974954 L0.396113 0.937211 L0.510011 0.826134 M0.510011 0.454102 L0.510011 0.974954\",v:\"M0.048828 0.453125 L0.301026 0.961719 M0.553224 0.453125 L0.301026 0.961719\",w:\"M0 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.451539 0.961719 M0.602052 0.453125 L0.451539 0.961719\",x:\"M0.03711 0.453125 L0.564943 0.961719 M0.564943 0.453125 L0.03711 0.961719\",y:\"M0.084618 0.453125 L0.320232 0.921476 M0.55713 0.453125 L0.320232 0.921476 L0.242119 1.055289 L0.163369 1.122196 L0.084618 1.155166 L0.044922 1.155166\",z:\"M0.505373 0.452148 L0.09668 0.961651 M0.09668 0.452148 L0.505373 0.452148 M0.09668 0.961651 L0.505373 0.961651\"},i0={};for(let y in o0){i0[y]=[];let x=o0[y].split(\"M\").slice(1).map(e=>e.split(\"L\").map(t=>t.trim().split(\" \").map(parseFloat)));for(let e of x)for(let t=0;t<e.length-1;t++)i0[y].push({x1:e[t][0],y1:1-e[t][1],x2:e[t+1][0],y2:1-e[t+1][1]})}var C0=.09,O0=.692052,S0=.692052,Y0=1.152,Z0=0;var s0={0:.692052,1:.692052,2:.692052,3:.692052,4:.692052,5:.692052,6:.692052,7:.692052,8:.692052,9:.692052,\"!\":.692052,'\"':.692052,\"#\":.692052,$:.692052,\"'\":.692052,\"(\":.692052,\")\":.692052,\"*\":.692052,\"+\":.692052,\",\":.692052,\"-\":.692052,\".\":.692052,\"/\":.692052,\"<\":.692052,\"=\":.692052,\">\":.692052,A:.692052,B:.692052,C:.692052,D:.692052,E:.692052,F:.692052,G:.692052,H:.692052,I:.692052,J:.692052,K:.692052,L:.692052,M:.692052,N:.692052,O:.692052,P:.692052,Q:.692052,R:.692052,S:.692052,T:.692052,U:.692052,V:.692052,W:.692052,X:.692052,Y:.692052,Z:.692052,\"[\":.692052,\"\\\\\":.692052,\"]\":.692052,\"^\":.692052,_:.692052,a:.692052,b:.692052,c:.692052,d:.692052,e:.692052,f:.692052,g:.692052,h:.692052,i:.692052,j:.692052,k:.692052,l:.692052,m:.692052,n:.692052,o:.692052,p:.692052,q:.692052,r:.692052,s:.692052,t:.692052,u:.692052,v:.692052,w:.692052,x:.692052,y:.692052,z:.692052,\" \":.692052},a0={},R={glyphWidthRatio:O0,spaceWidthRatio:S0,lineHeightRatio:Y0,strokeWidthRatio:C0,letterSpacingRatio:Z0};var D0={0:[[{x:.019944796633211075,y:.35828068632415006},{x:.020222641007547733,y:.3550960892473839},{x:.020327535068617307,y:.3519011161217302},{x:.02060526835904108,y:.3507104904820116},{x:.02071153113201321,y:.34949252766745387},{x:.047065531132013214,y:.20882352766745393},{x:.047989939967683706,y:.20564918300405605},{x:.04875673163473768,y:.20243312543665407},{x:.04922094308839032,y:.20142201853303832},{x:.04953201774467938,y:.20035381349539033},{x:.05105794824635218,y:.1974208061920286},{x:.05243742793298141,y:.1944161379022362},{x:.1205174279329814,y:.07784313790223615},{x:.1216536619223176,y:.07627409360623287},{x:.12261018498510404,y:.07458945972562232},{x:.1242345189777056,y:.07271014544101197},{x:.12569143736362237,y:.07069826276137084},{x:.12711194429242206,y:.06938103546641537},{x:.12837874379901673,y:.06791537974577894},{x:.130338502698373,y:.06638906779986004},{x:.132159925645859,y:.06470007355882942},{x:.13381011622947792,y:.06368528357115737},{x:.13533850978527173,y:.062494930337889824},{x:.2330665097852717,y:.000743930337889824},{x:.2364974226485404,y:-.000978818921256936},{x:.23988324554357096,y:-.0027885789630079164},{x:.24043487144166406,y:-.0029559128497863825},{x:.24095002304009888,y:-.0032145836671228292},{x:.2446511035824589,y:-.0042348928870151745},{x:.24832493550927423,y:-.005349337618145378},{x:.24889860729226898,y:-.005405839357118937},{x:.2494543245702404,y:-.005559038796006631},{x:.2532833423420387,y:-.0058376980655201055},{x:.257104,y:-.006214000000000011},{x:.344948,y:-.006214000000000011},{x:.34876845169289644,y:-.005837718351308385},{x:.352597265623821,y:-.005559109487024962},{x:.35315318526669126,y:-.00540585978827806},{x:.3537270644907258,y:-.005349337618145378},{x:.3574006983675983,y:-.004234952964808514},{x:.36110158881940224,y:-.0032147329490055873},{x:.36161692908913895,y:-.0029559733581057666},{x:.36216875445642904,y:-.0027885789630079164},{x:.36555439482758706,y:-.000978916482299381},{x:.3689851386556908,y:.0007437082019616584},{x:.4667151386556908,y:.06249470820196166},{x:.46824382031514195,y:.0636852631221029},{x:.4698943035897058,y:.06470024765114774},{x:.4717154585013725,y:.06638901501054441},{x:.47367495473362387,y:.0679150932923645},{x:.4749419974608878,y:.0693810030307532},{x:.47636275350351887,y:.0706984782301942},{x:.4778194532662604,y:.07271008609647399},{x:.47944357522443626,y:.07458911996296573},{x:.4804002872780698,y:.07627405043044727},{x:.48153671723081914,y:.07784338646721853},{x:.5496157172308191,y:.19441638646721857},{x:.5509951179002539,y:.19742093333312605},{x:.5525209822553206,y:.20035381349539033},{x:.5528320971760705,y:.20142215679791795},{x:.5532963622471587,y:.2024333975455826},{x:.5540631001039363,y:.20564932060673602},{x:.5549874688679868,y:.20882352766745393},{x:.5813414688679868,y:.34949252766745387},{x:.5814477200321959,y:.3507103574246747},{x:.581725430046729,y:.351900851345405},{x:.5818303474337426,y:.35509595676374855},{x:.5821082033667889,y:.35828068632415006},{x:.5819748261451739,y:.3594958443979094},{x:.5820149461972951,y:.36071764184793353},{x:.5710349461972951,y:.5284976418479336},{x:.5705756858728281,y:.5312810757499365},{x:.5703149436633981,y:.5340900680661724},{x:.5698592272920282,y:.5356233082419208},{x:.5695988288779222,y:.5372015019922555},{x:.5686053720955593,y:.5398418557477263},{x:.5678016327590553,y:.5425460057826548},{x:.5216826327590552,y:.6556800057826547},{x:.5211943471023096,y:.656605995281004},{x:.5208498728309648,y:.6575945381025444},{x:.5191405880551111,y:.6605007631972294},{x:.5175679428069421,y:.6634831423933323},{x:.5169083878327574,y:.664296079457111},{x:.5163776774005638,y:.665198424109003},{x:.5141342596628157,y:.6677153419860701},{x:.5120099990343735,y:.6703336077343061},{x:.511204521070525,y:.6710022516480534},{x:.510507969381766,y:.6717837215313657},{x:.425955969381766,y:.7497057215313657},{x:.4243831978740034,y:.750892537075826},{x:.42294870744900304,y:.7522432326643229},{x:.4208707687817478,y:.7535430209032156},{x:.4189143183619635,y:.7550193610827685},{x:.4171402309909699,y:.7558765397994217},{x:.4154697962599445,y:.7569214269519826},{x:.41317820849544135,y:.7577908544006052},{x:.41097133104084405,y:.7588571425751742},{x:.40906410498936707,y:.7593517435666508},{x:.4072219198222394,y:.7600506678559823},{x:.3127869198222394,y:.7856226678559822},{x:.3097655669518694,y:.7861297177594856},{x:.3067801557646532,y:.7868174624905968},{x:.3054245519856559,y:.7868582361795984},{x:.30408703940192616,y:.7870827004032797},{x:.3010248204508113,y:.7869905707806608},{x:.2979626007613803,y:.7870826758597451},{x:.29662508997676323,y:.7868582009159747},{x:.29526948652460844,y:.786817416361878},{x:.2922840808497275,y:.7861296477028675},{x:.28926273204343433,y:.7856225735833884},{x:.19483073204343437,y:.7600505735833885},{x:.19298859701529922,y:.7593516514268194},{x:.1910814199885863,y:.7588570511522524},{x:.1888745059729717,y:.757790729268721},{x:.18658288068670334,y:.7569212665731724},{x:.18491249471518256,y:.7558763912940257},{x:.18313845528709377,y:.7550192228447639},{x:.18118197558509466,y:.7535428424712565},{x:.17910400699337814,y:.7522430123425641},{x:.17766956207459372,y:.7508923379118444},{x:.17609683558545802,y:.7497055417906873},{x:.09154583558545802,y:.6717835417906872},{x:.09084937681091164,y:.6710021668773223},{x:.09004400096562647,y:.6703336077343061},{x:.087919657143162,y:.6677152394449524},{x:.08567616637982708,y:.6651982097729843},{x:.0851455285488078,y:.6642959763928821},{x:.08448605719305789,y:.6634831423933323},{x:.08291335035419628,y:.6605006463960624},{x:.08120401576602496,y:.6575942974079984},{x:.08085959099279398,y:.6566058778839782},{x:.08037136724094471,y:.6556800057826547},{x:.03425236724094472,y:.5425460057826548},{x:.03344866581310472,y:.5398419832899659},{x:.03245524021837327,y:.537201759963462},{x:.0321948107181119,y:.5356234361255728},{x:.03173905633660196,y:.5340900680661724},{x:.03147832642517492,y:.5312812082371015},{x:.031019071243648687,y:.5284979083423142},{x:.020038071243648682,y:.36071790834231426},{x:.020078188427320915,y:.3594959771633442},{x:.019944796633211075,y:.35828068632415006}],[{x:.11021604810185967,y:.3604951889884744},{x:.12035004420691338,y:.5153337161267963},{x:.1599220965290545,y:.612407472440097},{x:.22898846858521874,y:.6760588762479813},{x:.301025186831377,y:.6955662779655215},{x:.373064807645506,y:.6760587099720985},{x:.44213195602343713,y:.6124073435241713},{x:.48170390405887986,y:.5153338430353971},{x:.49183697687726113,y:.3604953223188204},{x:.4679633532090146,y:.23306575687188358},{x:.4093572783633461,y:.13271343144136735},{x:.3319224534250481,y:.08378599999999999},{x:.27012977192577264,y:.08378599999999999},{x:.19269670382412518,y:.13271332265415062},{x:.13408961949133952,y:.23306590258843124},{x:.11021604810185967,y:.3604951889884744}]],1:[[{x:.17556757075794932,y:.5951166967821685},{x:.17573368487361973,y:.586296718297643},{x:.17761729959585784,y:.5776786204828649},{x:.18114602866723137,y:.5695935920037709},{x:.1861842650084615,y:.5623523359706766},{x:.19253839202243023,y:.5562331297919906},{x:.19996422417142623,y:.5514711311294693},{x:.20817639089041826,y:.548249340921154},{x:.21685930321783156,y:.5466915707579493},{x:.225679281702357,y:.5468576848736197},{x:.2342973795171352,y:.5487412995958578},{x:.24238240799622912,y:.5522700286672314},{x:.24962366402932343,y:.5573082650084615},{x:.33662600000000004,y:.6314944876419193},{x:.33662600000000004,y:.051034000000000024},{x:.33749066238185466,y:.042254935509274234},{x:.3400514210369921,y:.033813245543570986},{x:.3442098674463855,y:.026033339514117928},{x:.34980619484660536,y:.019214194846605387},{x:.35662533951411796,y:.013617867446385483},{x:.364405245543571,y:.00945942103699212},{x:.3728469355092743,y:.006898662381854659},{x:.381626,y:.0060340000000000255},{x:.3904050644907258,y:.006898662381854659},{x:.3988467544564291,y:.00945942103699212},{x:.40662666048588214,y:.01361786744638549},{x:.4134458051533947,y:.019214194846605387},{x:.41904213255361455,y:.026033339514117928},{x:.42320057896300795,y:.033813245543570986},{x:.4257613376181454,y:.042254935509274255},{x:.426626,y:.051034000000000024},{x:.426626,y:.729004},{x:.42636789988195944,y:.7316245344755278},{x:.4263183151263803,y:.7342572817023569},{x:.42593657376816557,y:.7360038620015019},{x:.4257613376181454,y:.7377830644907257},{x:.42499695590681574,y:.7403028932959718},{x:.4244347004041422,y:.7428753795171351},{x:.42371955318609683,y:.744513925721078},{x:.42320057896300795,y:.746224754456429},{x:.4219592904188853,y:.7485470419835442},{x:.42090597133276864,y:.7509604079962291},{x:.419884900961423,y:.7524279516932593},{x:.41904213255361455,y:.7540046604858821},{x:.41737163919932724,y:.7560401625275525},{x:.41586773499153856,y:.7582016640293234},{x:.4145799806286405,y:.7594418083381722},{x:.4134458051533947,y:.7608238051533946},{x:.41141030311172405,y:.7624942985076821},{x:.4095136079775698,y:.7643208702080094},{x:.40800865730110464,y:.7652859570783687},{x:.40662666048588214,y:.7664201325536145},{x:.40430437295876726,y:.767661421097737},{x:.4020877758285738,y:.7690828688705307},{x:.4004234632490515,y:.7697358105551997},{x:.3988467544564291,y:.7705785789630079},{x:.39632692565118355,y:.7713429606743374},{x:.3938756091095818,y:.772304659078846},{x:.39211589322607654,y:.7726203633950566},{x:.3904050644907258,y:.7731393376181454},{x:.3877845300151986,y:.7733974377361859},{x:.3851926967821685,y:.7738624292420507},{x:.38340520248922366,y:.7738287638499798},{x:.381626,y:.774004},{x:.37900546552447173,y:.7737458998819594},{x:.376372718297643,y:.7736963151263803},{x:.37462613799849803,y:.7733145737681656},{x:.3728469355092743,y:.7731393376181454},{x:.3703271067040287,y:.7723749559068158},{x:.36775462048286484,y:.7718127004041422},{x:.3661160742789217,y:.7710975531860966},{x:.364405245543571,y:.7705785789630079},{x:.3620829580164563,y:.7693372904188854},{x:.3596695920037709,y:.7682839713327686},{x:.35820204830674063,y:.7672629009614229},{x:.35662533951411796,y:.7664201325536145},{x:.3545898374724472,y:.7647496391993269},{x:.35242833597067663,y:.7632457349915385},{x:.1912283359706766,y:.6257917349915385},{x:.18510912979199054,y:.6194376079775697},{x:.18034713112946932,y:.6120117758285738},{x:.17712534092115398,y:.6037996091095817},{x:.17556757075794932,y:.5951166967821685}]],2:[[{x:.034589999999999996,y:.05195499999999997},{x:.034692251306008066,y:.05091682506774448},{x:.03463809526377374,y:.04987503351343359},{x:.03512383076438082,y:.04653492529109402},{x:.03545466238185463,y:.043175935509274184},{x:.03575748683953214,y:.042177657057450094},{x:.03590761484026801,y:.04114531791601493},{x:.0370356398580977,y:.03796415123181852},{x:.03801542103699209,y:.034734245543570935},{x:.03850718127225641,y:.0338142268532408},{x:.03885582398108696,y:.03283101233894428},{x:.040582789147307716,y:.02993103764454602},{x:.04217386744638545,y:.02695433951411788},{x:.04283566538917773,y:.026147936387598623},{x:.04336942466232366,y:.025251630882832152},{x:.04562896367409083,y:.022744292579413156},{x:.04777019484660536,y:.020135194846605337},{x:.04857659797312457,y:.019473396903813094},{x:.04927496174105457,y:.01869844492647086},{x:.0519802417813102,y:.01668009861889986},{x:.05458933951411791,y:.014538867446385433},{x:.055509358204447995,y:.01404710721112114},{x:.05634548873920743,y:.013423289731094336},{x:.05939254741314285,y:.011971499336069797},{x:.062369245543570956,y:.01038042103699207},{x:.0633675239953951,y:.010077596579314544},{x:.06430928926944049,y:.00962888655251979},{x:.06758102982102647,y:.008799443560749052},{x:.07081093550927423,y:.007819662381854608},{x:.0718491104415297,y:.007717411075846537},{x:.07286031894352762,y:.007461052176974015},{x:.07623101021818018,y:.0072858316174737835},{x:.07959,y:.006954999999999975},{x:.522462,y:.006954999999999975},{x:.5312410644907257,y:.007819662381854608},{x:.539682754456429,y:.01038042103699207},{x:.5474626604858821,y:.014538867446385433},{x:.5542818051533946,y:.020135194846605337},{x:.5598781325536145,y:.02695433951411788},{x:.5640365789630079,y:.034734245543570935},{x:.5665973376181453,y:.043175935509274205},{x:.567462,y:.05195499999999997},{x:.5665973376181453,y:.06073406449072574},{x:.5640365789630079,y:.06917575445642901},{x:.5598781325536145,y:.07695566048588207},{x:.5542818051533946,y:.08377480515339461},{x:.5474626604858821,y:.08937113255361451},{x:.539682754456429,y:.09352957896300787},{x:.5312410644907257,y:.09609033761814534},{x:.522462,y:.09695499999999997},{x:.1815000359059797,y:.09695499999999997},{x:.2783905550735291,y:.2032469617410546},{x:.2792807818102756,y:.20444017254595384},{x:.28031851181367967,y:.20550758629318672},{x:.43775551181367967,y:.4029575862931866},{x:.4393581707982963,y:.4054309283363016},{x:.4411189018513206,y:.4077943501865292},{x:.5036359018513206,y:.5115903501865292},{x:.5044316302389797,y:.5132634494776924},{x:.5054127007337849,y:.5148350555317778},{x:.5063216043693862,y:.5172373109446714},{x:.5074247535047713,y:.5195567934026113},{x:.5078787867151084,y:.5213529834674229},{x:.5085344010842773,y:.5230857889106145},{x:.5229384010842772,y:.5764717889106146},{x:.5230947969602031,y:.5774089507908463},{x:.5233933154704733,y:.5783109589719573},{x:.5238196553887738,y:.5817524776504878},{x:.5243904806061233,y:.5851730002877248},{x:.5243610401661515,y:.586122666187007},{x:.5244778496604383,y:.5870655806061408},{x:.5252778496604383,y:.6189585806061408},{x:.525154398698275,y:.6206444560860672},{x:.5252359209411441,y:.6223328785443973},{x:.5248330095087286,y:.6250334227224941},{x:.5246336028763079,y:.6277565667648055},{x:.5241836259995084,y:.6293859645321488},{x:.5239341869342451,y:.6310578486269935},{x:.5118811869342451,y:.6790048486269935},{x:.5115474759395316,y:.6799350391147754},{x:.5113589931552627,y:.6809051378786065},{x:.5100605296725933,y:.6840797730170447},{x:.5089023081582834,y:.6873082151493771},{x:.5083935381649621,y:.6881554285023456},{x:.5080194201443183,y:.6890701159233712},{x:.5061265656819337,y:.6919304336788418},{x:.5043607612540449,y:.6948708843926746},{x:.5036964840076373,y:.6956025626767983},{x:.5031511078963445,y:.6964266878303904},{x:.4695951078963445,y:.7376876878303904},{x:.46829294792790443,y:.7390014838193654},{x:.46714904955699066,y:.7404551608815331},{x:.46519525859727806,y:.7421268539092958},{x:.4633851429208498,y:.7439531446668906},{x:.4618516947085211,y:.7449876576267703},{x:.4604461776978856,y:.7461902391902692},{x:.4582037971525157,y:.7474486453977692},{x:.45607217068925404,y:.7488867084403534},{x:.4543663637878686,y:.7496021826182516},{x:.45275324136800726,y:.7505074541480116},{x:.3913892413680073,y:.7774134541480116},{x:.3883140702117422,y:.7784156528007931},{x:.3852957573995619,y:.7795779210778271},{x:.3841283231887951,y:.779779788263216},{x:.3830018757962646,y:.7801468976050565},{x:.3797902739335826,y:.7805299031606142},{x:.3766032098633093,y:.781080995160135},{x:.2948022098633093,y:.7870669951601349},{x:.29450281220893076,y:.7870594704966325},{x:.2942070489499988,y:.7871065838776864},{x:.29009611613079095,y:.7869487184427649},{x:.2859834519838158,y:.7868453561974301},{x:.28569127516043946,y:.7867795665334233},{x:.28539200354491423,y:.7867680740946454},{x:.2381110035449142,y:.7802710740946455},{x:.2365476307297285,y:.7798972084805876},{x:.2349498387179436,y:.7797212234138579},{x:.23226739693423346,y:.7788736316211718},{x:.2295313767481002,y:.7782193386355017},{x:.22807098126622102,y:.7775476578384392},{x:.22653822336325463,y:.7770633405173258},{x:.15287222336325462,y:.7455503405173259},{x:.15277120515837472,y:.7454948388638573},{x:.15266147866932564,y:.7454595513468599},{x:.14890641990559073,y:.7433714396994592},{x:.14514076206912752,y:.7413025033471496},{x:.1450525127361761,y:.7412283604682699},{x:.14495177886390068,y:.7411723444149347},{x:.14167624287507044,y:.7383917796239132},{x:.1383865705572421,y:.7356279539035645},{x:.138314481468594,y:.7355380190685297},{x:.13822661135931125,y:.7354634271443719},{x:.09327661135931127,y:.6889934271443718},{x:.09215967204365061,y:.6875853345117547},{x:.09088652507606766,y:.6863167230283468},{x:.0894249598835053,y:.6841377631074377},{x:.0877944205712414,y:.6820821900242812},{x:.08697364817646357,y:.6804832494460014},{x:.08597245819367963,y:.6789906353246448},{x:.0849640705590952,y:.6765684062835642},{x:.08376588401722862,y:.6742342280213215},{x:.08327282036617045,y:.6725058858871059},{x:.08258206253775009,y:.6708466294514168},{x:.06737006253775008,y:.6210196294514168},{x:.06563362911198059,y:.61237067498716},{x:.06561788807912042,y:.6035491464015462},{x:.0673234443582347,y:.5948940500909503},{x:.07068475437800403,y:.5867379965527546},{x:.07557264487941309,y:.5793944183504645},{x:.08179927697165325,y:.5731455250760676},{x:.08912536467535526,y:.5682314581936796},{x:.09726937054858317,y:.56484106253775},{x:.10591832501283995,y:.5631046291119806},{x:.11473985359845373,y:.5630888880791204},{x:.12339494990904962,y:.5647944443582347},{x:.13155100344724535,y:.568155754378004},{x:.13889458164953555,y:.5730436448794131},{x:.14514347492393234,y:.5792702769716532},{x:.15005754180632036,y:.5865963646753553},{x:.1534479374622499,y:.5947403705485832},{x:.16549687462406137,y:.6342067386764809},{x:.19660916323298405,y:.666371100226128},{x:.2563653288901179,y:.6919337213587163},{x:.29295461470925055,y:.696961546277117},{x:.3623268316838737,y:.6918850546595318},{x:.40664087103378327,y:.672454875030618},{x:.4270299373286165,y:.6473841495451277},{x:.4351521014718352,y:.6150740687208592},{x:.4346413299816387,y:.5947115247998124},{x:.4232850296720603,y:.5526213103922067},{x:.3655461500158852,y:.45675834907300783},{x:.21087613207581168,y:.2627785664153893},{x:.04633344492647088,y:.0822700382589454},{x:.04431509861889995,y:.07956475821868986},{x:.04217386744638545,y:.07695566048588207},{x:.04168210721112112,y:.0760356417955519},{x:.04105828973109435,y:.07519951126079251},{x:.03960649933606985,y:.07215245258685718},{x:.03801542103699209,y:.06917575445642901},{x:.037712596579314576,y:.0681774760046049},{x:.037263886552519804,y:.06723571073055948},{x:.036434443560749034,y:.06396397017897336},{x:.03545466238185463,y:.06073406449072574},{x:.03535241107584656,y:.059695889558470286},{x:.035096052176974035,y:.05868468105647236},{x:.03492083161747381,y:.05531398978181981},{x:.034589999999999996,y:.05195499999999997}]],3:[[{x:.02624429558875499,y:.07454886751538828},{x:.02628189246403191,y:.06572740500388341},{x:.028039748887915363,y:.057082779207475086},{x:.03145031142385274,y:.04894719824755728},{x:.036382514066253493,y:.04163330793793327},{x:.042646815033581253,y:.035422176981524986},{x:.05000248075272204,y:.030552495657744837},{x:.05816683711519421,y:.027211403088916904},{x:.11448783711519421,y:.010388403088916982},{x:.11753114712885143,y:.009796523380387901},{x:.12053464064709668,y:.009027703431080128},{x:.20267064064709667,y:-.0035892965689199724},{x:.20562630159751,y:-.003749783589053152},{x:.20856537842676282,y:-.004101230781641964},{x:.30947437842676284,y:-.00620423078164193},{x:.31075400531193675,y:-.006105070212514369},{x:.31203499449415534,y:-.0061847225744922005},{x:.3151428517207607,y:-.005764970678224511},{x:.3182695531731509,y:-.005522677007230838},{x:.31950524711917533,y:-.005175778959545043},{x:.3207771618583987,y:-.005003992231664048},{x:.3829651618583987,y:.009716007768336019},{x:.3849642059743718,y:.010402067561162992},{x:.38702295869345676,y:.010879972006216251},{x:.389126076828856,y:.011830396347599064},{x:.3913090018652735,y:.012579562954916447},{x:.3931357912831918,y:.013642434461507345},{x:.39506175111398195,y:.014512798837572657},{x:.47719975111398194,y:.06182779883757265},{x:.47924722409526294,y:.06329195880211928},{x:.48141099047099317,y:.06457804786673271},{x:.4828265323572166,y:.06585154318044145},{x:.484375351035892,y:.06695911252196202},{x:.4860978389589892,y:.06879458122658251},{x:.48796912564078,y:.07047808832945178},{x:.54077112564078,y:.12830608832945176},{x:.5409949120745448,y:.12860551518367325},{x:.5412686389329152,y:.1288600940829806},{x:.5436334835107667,y:.13213593090859313},{x:.5460522072884215,y:.13537218987116906},{x:.5462132784472015,y:.1357095218897727},{x:.546432079841298,y:.13601261058785885},{x:.5481124005325159,y:.13968686141763526},{x:.5498532864078638,y:.14333280617235186},{x:.5499454524173568,y:.14369507987504085},{x:.5501009199323095,y:.14403503084321223},{x:.5735679199323094,y:.2123790308432122},{x:.5742003382158373,y:.21504899342087444},{x:.5750294951185407,y:.21766455299430504},{x:.5752146521018063,y:.21933125436759},{x:.575601167738761,y:.22096305773765262},{x:.575700550423256,y:.22370509641963415},{x:.5760035049491392,y:.22643215923642232},{x:.5758599468852712,y:.22810295774565637},{x:.5759206866877095,y:.2297788119316045},{x:.5754832145523405,y:.2324875517091097},{x:.575248324328873,y:.23522131827456078},{x:.563515324328873,y:.2983063182745607},{x:.5624930457986839,y:.30183400865706583},{x:.561587550163308,y:.3053934651440046},{x:.5612670272694029,y:.3060647673464004},{x:.5610599744254687,y:.30677926765590185},{x:.5593691204378909,y:.31003973780923805},{x:.5577866081350055,y:.3133541469027738},{x:.5573412794357957,y:.31395001930700017},{x:.5569988129587381,y:.31461039668740554},{x:.5547043620842722,y:.317478348572073},{x:.5525056481741942,y:.32042033938948294},{x:.4997036481741942,y:.378250339389483},{x:.4970091109540712,y:.38067456957783247},{x:.49440132723244246,y:.38319188697894757},{x:.4937347452782226,y:.3836204617554604},{x:.49314561461057166,y:.3841504927896343},{x:.49002990831948917,y:.38600246394071897},{x:.48698112816844114,y:.387962658427834},{x:.4171684643874312,y:.4237087345514058},{x:.48487098803351525,y:.4540412587201935},{x:.4882241875669253,y:.4559584413246188},{x:.4916233115558361,y:.4577929691542233},{x:.4920492459188098,y:.45814540790983926},{x:.4925291804180174,y:.45841980913886743},{x:.49544392539098053,y:.4609543303938907},{x:.49841983754054403,y:.46341674447922576},{x:.545354837540544,y:.5107317444792258},{x:.5454749496657809,y:.5108793107625336},{x:.5456205162109946,y:.5110018387655073},{x:.548258239278959,y:.5142987798858712},{x:.5509236260451226,y:.5175733969812307},{x:.5510126414958236,y:.5177415605329735},{x:.5511315069931322,y:.5178901328189077},{x:.5530753456471339,y:.5216383183828395},{x:.5550506716503533,y:.525370005791429},{x:.5551051696126684,y:.5255523041806199},{x:.555192766127671,y:.525721211199887},{x:.5563680197383496,y:.5297766005381628},{x:.5575773743081012,y:.5338219516056334},{x:.5575952604559016,y:.5340113792074108},{x:.557648221703651,y:.5341941299579837},{x:.569382221703651,y:.5972801299579837},{x:.5696549699390315,y:.6004540423597167},{x:.5701008412017201,y:.6036082951002054},{x:.5700318821169291,y:.6048400880993865},{x:.5701375119403227,y:.6060692795769916},{x:.5697858198023349,y:.6092354166829699},{x:.5696077595908724,y:.6124160465097288},{x:.5692998146426919,y:.6136107177017713},{x:.5691636114574624,y:.614836897966064},{x:.5682009942777376,y:.6178735869028962},{x:.5674058453461934,y:.6209583639953996},{x:.5668707486862845,y:.622070002836373},{x:.5664979467044567,y:.623246050467446},{x:.5649613973213707,y:.6260365929822823},{x:.5635797167972587,y:.6289069710868302},{x:.5283787167972587,y:.6867359710868302},{x:.526364685994031,y:.6894131274243959},{x:.524479650893362,y:.6921826271628648},{x:.5237177195860089,y:.6929316152663909},{x:.5230754099184859,y:.6937854072711274},{x:.5205777908604191,y:.6960182048823972},{x:.5181886735848373,y:.6983667373551676},{x:.4595186735848373,y:.7456807373551677},{x:.45627545779875317,y:.7478078267647688},{x:.4530837115337172,y:.7500113951823929},{x:.4525909707504246,y:.7502243275150239},{x:.4521421155924859,y:.7505187128152536},{x:.44854624273044896,y:.7519722107862162},{x:.4449859301027389,y:.7535107594479447},{x:.362848930102739,y:.7797967594479446},{x:.36158078031831586,y:.7800691142952486},{x:.3603625229719573,y:.7805143446587972},{x:.35727696699365546,y:.7809934249999153},{x:.35422405316989464,y:.781649085623381},{x:.352927136733123,y:.7816688034988555},{x:.3516454277250751,y:.7818678086678129},{x:.2577774277250751,y:.7871168086678129},{x:.2534831925795917,y:.7869349938938289},{x:.24918809681378723,y:.7867747925856998},{x:.2490774333618657,y:.786748457272228},{x:.24896378128970398,y:.7867436453266514},{x:.24478752897123962,y:.7857275603552258},{x:.2406062159909945,y:.7847325056542677},{x:.16433721599099446,y:.7584545056542678},{x:.1612047546311144,y:.7570179671101032},{x:.15801334200327716,y:.7557176430739929},{x:.09817134200327716,y:.7241756430739928},{x:.09479788711775466,y:.721949723610623},{x:.09138819905405325,y:.7197797137879894},{x:.05384019905405325,y:.6903397137879895},{x:.04746503339724546,y:.6842424293748122},{x:.0424018859405069,y:.677018569451043},{x:.0388453306011542,y:.6689457429023652},{x:.036932043806339465,y:.6603341839257509},{x:.036735552094603836,y:.6515148299032538},{x:.03826340653223549,y:.6428266036640077},{x:.041456892530026886,y:.6346033888699733},{x:.046193286212010486,y:.6271611990540533},{x:.05229057062518783,y:.6207860333972455},{x:.05951443054895701,y:.615722885940507},{x:.06758725709763488,y:.6121663306011542},{x:.07619881607424907,y:.6102530438063395},{x:.08501817009674617,y:.6100565520946039},{x:.09370639633599236,y:.6115844065322356},{x:.1019296111300268,y:.6147778925300269},{x:.10937180094594674,y:.6195142862120105},{x:.14372643260130716,y:.6464504840370294},{x:.1969218011618275,y:.6744891243755197},{x:.2615721948597163,y:.6967640072977177},{x:.3408866683163358,y:.6923288252210377},{x:.40955721054777616,y:.6703524458415177},{x:.4555820596629536,y:.6332360369266462},{x:.477752059875079,y:.596814658492312},{x:.4716998550115053,y:.5642759337587675},{x:.44042564505409965,y:.532748518309004},{x:.3700728058889163,y:.5012285825754976},{x:.28267158635688694,y:.4816496665818946},{x:.2026156257994338,y:.47140070238604853},{x:.19958923290487823,y:.4707064281346213},{x:.19652752938874105,y:.4701896668089735},{x:.19529880233776667,y:.46972217540403877},{x:.1940174323454584,y:.4694282207777866},{x:.19118463692903986,y:.4681568668470777},{x:.18828257832087977,y:.4670527262205195},{x:.18716866396437967,y:.46635450477580015},{x:.18596926283986664,y:.4658162155208443},{x:.1834389276407875,y:.4640166393294268},{x:.18080803842542348,y:.46236755090702814},{x:.17985174386742717,y:.4614654316810775},{x:.17878040392329292,y:.4607034939516098},{x:.17664976830422657,y:.45844485220330683},{x:.1743911520787843,y:.45631418952832026},{x:.17362922718285934,y:.45524284045707714},{x:.17272711941234267,y:.45428653509274164},{x:.17107806250525512,y:.45165562612327925},{x:.16927851662463225,y:.44912526936741537},{x:.1687402417372368,y:.44792586179486843},{x:.1680420336360506,y:.4468119390745141},{x:.1669379277730794,y:.44390986724015796},{x:.1656666077762714,y:.4410770565945043},{x:.16537266849946,y:.43979568308103084},{x:.16490519181337332,y:.438566950430106},{x:.16438846716364272,y:.4355052407239498},{x:.16369422916516244,y:.43247883951296023},{x:.16365592142049992,y:.43116474252408066},{x:.16343714101639506,y:.42986841944927895},{x:.1635276550184117,y:.4267647316583033},{x:.16343717819520762,y:.42366104278329114},{x:.1636559741278381,y:.4223647223293339},{x:.1636942976139514,y:.42105062579943375},{x:.1643885718653787,y:.41802423290487795},{x:.16490533319102646,y:.414962529388741},{x:.1653728245959611,y:.41373380233776696},{x:.1656667792222133,y:.41245243234545836},{x:.1669381331529224,y:.40961963692903947},{x:.16804227377948042,y:.40671757832087974},{x:.16874049522419982,y:.4056036639643795},{x:.16927878447915568,y:.4044042628398666},{x:.17107836067057278,y:.40187392764078794},{x:.1727274490929718,y:.3992430384254234},{x:.17362956831892262,y:.3982867438674269},{x:.17439150604839013,y:.3972154039232929},{x:.1766501477966929,y:.39508476830422673},{x:.1787808104716797,y:.39282615207878424},{x:.17985215954292283,y:.39206422718285927},{x:.18080846490725827,y:.39116211941234263},{x:.18343937387672077,y:.38951306250525497},{x:.18596973063258454,y:.3877135166246322},{x:.18716913820513145,y:.3871752417372368},{x:.1882830609254858,y:.38647703363605057},{x:.19118513275984234,y:.3853729277730792},{x:.19401794340549564,y:.3841016077762714},{x:.19529931691896882,y:.38380766849946},{x:.19652804956989395,y:.38334019181337325},{x:.19958975927605035,y:.38282346716364263},{x:.20261616048703973,y:.3821292291651624},{x:.28149235433605535,y:.37203226198800626},{x:.3678476199052635,y:.34785057975990136},{x:.4387239808422848,y:.31155986033736477},{x:.4773813812672204,y:.26922136053481893},{x:.48460036747312013,y:.2304069273293995},{x:.4680118822440525,y:.1820955353962423},{x:.4262197745588727,y:.1363254129914362},{x:.35583608100487274,y:.09578139608686695},{x:.3056218275014876,y:.083895601213743},{x:.2134048551529998,y:.08581745449589688},{x:.13726972612583144,y:.09751265420048184},{x:.0839251628848058,y:.11344659691108305},{x:.0752658675153883,y:.11513070441124498},{x:.06644440500388343,y:.11509310753596806},{x:.05779977920747511,y:.11333525111208462},{x:.0496641982475573,y:.10992468857614723},{x:.04235030793793329,y:.10499248593374648},{x:.036139176981525016,y:.09872818496641873},{x:.03126949565774486,y:.09137251924727793},{x:.027928403088916927,y:.08320816288480577},{x:.02624429558875499,y:.07454886751538828}]],4:[[{x:.003828000000000005,y:.27580099999999996},{x:.0040512821902059844,y:.2735339778783202},{x:.004058111165048277,y:.2712559968420181},{x:.004482570943879651,y:.26915502967601196},{x:.004692662381854638,y:.26702193550927417},{x:.005353928343121064,y:.26484203377636983},{x:.005805038155045426,y:.26260915577382815},{x:.0066312204192078995,y:.26063136609773396},{x:.0072534210369921,y:.25858024554357095},{x:.008327258689269697,y:.2565712366005347},{x:.009205313441189196,y:.2544692698811785},{x:.010401468469599332,y:.25269066304309135},{x:.011411867446385462,y:.25080033951411784},{x:.01285700981091242,y:.2490394284479652},{x:.014128266351129452,y:.24714915041402313},{x:.01564842657685691,y:.24563807727727646},{x:.017008194846605366,y:.24398119484660533},{x:.018769105912757822,y:.24253605248207852},{x:.020384710565360974,y:.24093010545831445},{x:.022170457083446928,y:.23974463571613375},{x:.023827339514117918,y:.23838486744638543},{x:.025836348457154004,y:.2373110297941079},{x:.027734214441385185,y:.2360511294240198},{x:.029716922014597604,y:.23523682001377813},{x:.031607245543570965,y:.23422642103699207},{x:.03378714727647517,y:.23356515507572567},{x:.03589434066689576,y:.23269971862397582},{x:.03799781495511128,y:.23228786299963877},{x:.040048935509274235,y:.2316656623818546},{x:.04231595763095386,y:.23144238019164864},{x:.0445515001672978,y:.23100466589573537},{x:.046694905833262405,y:.23101109143797494},{x:.048828,y:.23080099999999998},{x:.36918100000000004,y:.23080099999999998},{x:.36918100000000004,y:.05103000000000002},{x:.37004566238185466,y:.04225093550927423},{x:.3726064210369921,y:.03380924554357098},{x:.3767648674463855,y:.026029339514117924},{x:.38236119484660536,y:.019210194846605383},{x:.38918033951411796,y:.013613867446385479},{x:.396960245543571,y:.009455421036992116},{x:.4054019355092743,y:.006894662381854655},{x:.414181,y:.0060300000000000215},{x:.4229600644907258,y:.006894662381854655},{x:.4314017544564291,y:.009455421036992116},{x:.43918166048588214,y:.013613867446385486},{x:.4460008051533947,y:.019210194846605383},{x:.45159713255361456,y:.026029339514117924},{x:.45575557896300795,y:.03380924554357098},{x:.4583163376181454,y:.04225093550927425},{x:.459181,y:.05103000000000002},{x:.459181,y:.23080099999999998},{x:.553224,y:.23080099999999998},{x:.5620030644907258,y:.2316656623818546},{x:.5704447544564291,y:.23422642103699207},{x:.5782246604858822,y:.23838486744638543},{x:.5850438051533947,y:.24398119484660533},{x:.5906401325536146,y:.25080033951411784},{x:.5947985789630079,y:.25858024554357095},{x:.5973593376181454,y:.26702193550927417},{x:.5982240000000001,y:.27580099999999996},{x:.5973593376181454,y:.28458006449072576},{x:.5947985789630079,y:.293021754456429},{x:.5906401325536146,y:.3008016604858821},{x:.5850438051533947,y:.3076208051533946},{x:.5782246604858822,y:.3132171325536145},{x:.5704447544564291,y:.3173755789630079},{x:.5620030644907258,y:.31993633761814533},{x:.553224,y:.32080099999999995},{x:.459181,y:.32080099999999995},{x:.459181,y:.421833},{x:.4583163376181454,y:.4306120644907258},{x:.45575557896300795,y:.439053754456429},{x:.45159713255361456,y:.4468336604858821},{x:.4460008051533947,y:.4536528051533947},{x:.43918166048588214,y:.45924913255361455},{x:.4314017544564291,y:.4634075789630079},{x:.4229600644907258,y:.4659683376181454},{x:.414181,y:.466833},{x:.4054019355092743,y:.4659683376181454},{x:.396960245543571,y:.4634075789630079},{x:.38918033951411796,y:.45924913255361455},{x:.38236119484660536,y:.4536528051533947},{x:.3767648674463855,y:.4468336604858821},{x:.3726064210369921,y:.439053754456429},{x:.37004566238185466,y:.4306120644907258},{x:.36918100000000004,y:.421833},{x:.36918100000000004,y:.32080099999999995},{x:.1436046917940101,y:.32080099999999995},{x:.4533648945416855,y:.700560710565361},{x:.45824387057598015,y:.7079102144413851},{x:.4615952813760241,y:.7160703406668958},{x:.46329033410426457,y:.7247275001672978},{x:.46326388883495173,y:.7335490031579818},{x:.46151696184495455,y:.7421958442261718},{x:.45811668655881077,y:.7503357301188214},{x:.4531937336488705,y:.7576558495859769},{x:.446937289434639,y:.7638748945416856},{x:.4395877855586148,y:.7687538705759801},{x:.43142765933310423,y:.7721052813760241},{x:.42277049983270215,y:.7738003341042645},{x:.41394899684201814,y:.7737738888349517},{x:.40530215577382817,y:.7720269618449546},{x:.39716226988117853,y:.7686266865588108},{x:.38984215041402315,y:.7637037336488706},{x:.38362310545831446,y:.757447289434639},{x:.013957105458314502,y:.304244289434639},{x:.012771635716133971,y:.30245854291655333},{x:.011411867446385462,y:.3008016604858821},{x:.010338029794107799,y:.29879265154284573},{x:.009078129424019837,y:.29689478555861476},{x:.008263820013778204,y:.2949120779854024},{x:.0072534210369921,y:.293021754456429},{x:.006592155075725704,y:.29084185272352475},{x:.005726718623975863,y:.2887346593331042},{x:.0053148629996388475,y:.28663118504488877},{x:.004692662381854638,y:.28458006449072576},{x:.00446938019164866,y:.282313042369046},{x:.00403166589573542,y:.2800774998327022},{x:.00403809143797499,y:.27793409416673776},{x:.003828000000000005,y:.27580099999999996}]],5:[[{x:.029951000000000005,y:.38529899999999995},{x:.030026331329377584,y:.3845341481773043},{x:.029977079633894697,y:.38376717530271315},{x:.030458063889865227,y:.38015069392879464},{x:.03081566238185464,y:.37651993550927415},{x:.03103876142924568,y:.3757844765131909},{x:.03114008507636279,y:.3750226322781917},{x:.0323173678705276,y:.3715694759531816},{x:.0333764210369921,y:.36807824554357094},{x:.033738714231120716,y:.3674004426508694},{x:.033986719409902104,y:.366673004302166},{x:.03581505842470893,y:.3635158758870829},{x:.03753486744638546,y:.3602983395141178},{x:.03802243206297786,y:.35970424030984804},{x:.03840758807348568,y:.3590391628952293},{x:.04081672126593952,y:.35629938906452685},{x:.04313119484660537,y:.3534791948466053},{x:.04372529405087513,y:.3529916302300129},{x:.04423279956362368,y:.3524144723015426},{x:.04713014529619686,y:.3501973410270508},{x:.04995033951411792,y:.3478828674463854},{x:.05062814240681941,y:.3475205742522568},{x:.05123849426956635,y:.347053515665452},{x:.054512709170605814,y:.34544423005866864},{x:.057730245543570965,y:.343724421036992},{x:.05846570453965444,y:.3435013219896009},{x:.05915544727260316,y:.34316231154402344},{x:.06268070509966306,y:.34222271554831923},{x:.06617193550927424,y:.3411636623818546},{x:.0669367873319697,y:.34108833105247705},{x:.06767941450870582,y:.34089039672943083},{x:.07132024158048059,y:.34065659849198926},{x:.074951,y:.34029899999999996},{x:.0757158518226955,y:.3403743313293775},{x:.07648282469728679,y:.34032507963389463},{x:.08009930607120508,y:.3408060638898651},{x:.08373006449072577,y:.3411636623818546},{x:.0844655234868091,y:.3413867614292456},{x:.08522736772180821,y:.34148808507636275},{x:.2701097088502776,y:.3848544225750548},{x:.39095673206080095,y:.3699215697302287},{x:.4312208460684155,y:.34735587040502247},{x:.4569274445394237,y:.3179203076157562},{x:.4808881134259603,y:.2201177906149206},{x:.47151862074291284,y:.1781066999956386},{x:.4461217481742335,y:.14395206669668215},{x:.3876788357927069,y:.10680533743499816},{x:.3169820044514503,y:.08634947983662909},{x:.2505487358362677,y:.08307118781270932},{x:.19638270317906092,y:.09339965838335124},{x:.15518503458472022,y:.11245499400015477},{x:.1051531598037562,y:.15775209985578706},{x:.09806479623887651,y:.16300326318775482},{x:.09008818244690309,y:.16677065575830224},{x:.0815298552225249,y:.16890949878372125},{x:.07271870628140957,y:.16933759772602197},{x:.06399334313601493,y:.16803850098293246},{x:.05568907659877849,y:.16506213211374782},{x:.04812503497563989,y:.16052287130494386},{x:.041591900144212934,y:.15459515980375618},{x:.03634073681224515,y:.1475067962388765},{x:.03257334424169774,y:.13953018244690307},{x:.03043450121627874,y:.13097185522252489},{x:.03000640227397801,y:.12216070628140954},{x:.031305499017067515,y:.1134353431360149},{x:.034281867886252176,y:.10513107659877846},{x:.03882112869505611,y:.09756703497563987},{x:.044748840196243804,y:.09103390014421289},{x:.09986584019624378,y:.041132900144212926},{x:.10178680031290575,y:.03970982481314967},{x:.10357183338498165,y:.03811957700249835},{x:.10532248536915285,y:.037090537646117014},{x:.10695420376112348,y:.035881736812245144},{x:.10911588139237749,y:.0348607662023731},{x:.11117685751196796,y:.03364931723433351},{x:.16362485751196798,y:.009390317234333478},{x:.1646572774363771,y:.009030847933342759},{x:.16562545909873666,y:.008523173483185618},{x:.16881529925253239,y:.0075831025339957205},{x:.1719558576504946,y:.006489618860012841},{x:.17303856889723523,y:.006338471796353147},{x:.17408718959239433,y:.0060294350406820685},{x:.23897018959239436,y:-.00634256495931787},{x:.2399001168767359,y:-.006426714843400178},{x:.24080591100583193,y:-.006653392925378379},{x:.24428588214420577,y:-.0068235863462415185},{x:.247755834543085,y:-.007137585190079683},{x:.24868431036339586,y:-.007038698344381461},{x:.24961692261229596,y:-.007084309202250054},{x:.32666292261229596,y:-.003282309202250082},{x:.32746661284147915,y:-.0031629125067284265},{x:.32827905619988357,y:-.00317336931171093},{x:.3318231917274382,y:-.002515696572186591},{x:.33538870069659477,y:-.001986002452099067},{x:.33615365510360457,y:-.0017121077449900682},{x:.3369525276121403,y:-.0015638637889859724},{x:.4188855276121403,y:.02214313621101406},{x:.4207304127428032,y:.02287964098341223},{x:.42264402370761556,y:.023412682727046455},{x:.4248170355152836,y:.024511079778651145},{x:.4270783417525648,y:.02541382586724525},{x:.42874409297954025,y:.02649609814118395},{x:.43051694316083267,y:.027392224616519634},{x:.5014129431608326,y:.07245422461651957},{x:.5044011686844615,y:.0747943741105689},{x:.5074525565132345,y:.07705154573740032},{x:.5078697672823866,y:.07751071502587484},{x:.5083582165656543,y:.07789323111579813},{x:.5108324836553944,y:.0807713891731658},{x:.5133848875831327,y:.08358048611421783},{x:.5494628875831328,y:.1320994861142178},{x:.5497798823390716,y:.1326268676033582},{x:.5501811109693575,y:.13309337858567127},{x:.5520495631508493,y:.13640291633591076},{x:.5540074974944301,y:.13966031511116345},{x:.5542155142604781,y:.14023940572188273},{x:.5545180216173755,y:.1407752286491667},{x:.5557049132287019,y:.14438569149730107},{x:.5569897394368822,y:.14796247431004633},{x:.5570807842453774,y:.1485710199149322},{x:.5572729451408087,y:.14915556341258465},{x:.5710219451408087,y:.2108035634125847},{x:.5712046210163666,y:.21230267395853206},{x:.5715791512667351,y:.2137656948046034},{x:.571736996194895,y:.21667155541097086},{x:.5720890113736304,y:.2195603313107129},{x:.5719757152243157,y:.2210662751632623},{x:.5720576277729665,y:.2225742517011615},{x:.5716455344736617,y:.2254550710286549},{x:.5714272135589309,y:.2283570146640783},{x:.5710222992922247,y:.22981191924551903},{x:.5708084462858501,y:.23130690078257787},{x:.5417354462858501,y:.3499769007825779},{x:.5411002871662289,y:.3517814599872898},{x:.540669734049328,y:.3536454570484658},{x:.5396393400617131,y:.355932176655931},{x:.5388066121493867,y:.3582980512419798},{x:.5378316053978042,y:.3599440229503987},{x:.537045677451414,y:.361688207084494},{x:.5355889653307644,y:.36372996812105773},{x:.5343106788169316,y:.36588792593376723},{x:.5330332933960605,y:.36731205637621067},{x:.5319221933904076,y:.36886939956510134},{x:.49389619339040763,y:.4124113995651013},{x:.49150876583293945,y:.41465677330496736},{x:.4892379705562563,y:.41702003426923534},{x:.48830169237996507,y:.41767302336482964},{x:.48747017448549057,y:.4184550652905171},{x:.4846905699931398,y:.420191530792605},{x:.4820023580684325,y:.4220663721783498},{x:.4272473580684325,y:.4527533721783498},{x:.42330567688981036,y:.45447898255061825},{x:.4193723578126433,y:.45622356923745777},{x:.4192660752068488,y:.4562474610875831},{x:.4191662841579818,y:.4562911481493166},{x:.41496369139475175,y:.45721461755172516},{x:.4107655979622113,y:.4581583300092093},{x:.27317359796221125,y:.47516033000920926},{x:.26964530070808584,y:.4752477446385603},{x:.2661231753027132,y:.4754739203661053},{x:.26524270860794985,y:.4753568201865933},{x:.26435476148695686,y:.47537881934450843},{x:.2608772057270339,y:.4747762176787918},{x:.2573786322781918,y:.4743109149236372},{x:.119951,y:.44207564006371447},{x:.119951,y:.684004},{x:.527101,y:.684004},{x:.5358800644907258,y:.6848686623818546},{x:.544321754456429,y:.6874294210369921},{x:.5521016604858822,y:.6915878674463855},{x:.5589208051533947,y:.6971841948466053},{x:.5645171325536146,y:.7040033395141179},{x:.5686755789630079,y:.711783245543571},{x:.5712363376181454,y:.7202249355092742},{x:.5721010000000001,y:.729004},{x:.5712363376181454,y:.7377830644907257},{x:.5686755789630079,y:.746224754456429},{x:.5645171325536146,y:.7540046604858821},{x:.5589208051533947,y:.7608238051533946},{x:.5521016604858822,y:.7664201325536145},{x:.544321754456429,y:.7705785789630079},{x:.5358800644907258,y:.7731393376181454},{x:.527101,y:.774004},{x:.074951,y:.774004},{x:.06617193550927424,y:.7731393376181454},{x:.05773024554357094,y:.7705785789630079},{x:.04995033951411792,y:.7664201325536145},{x:.04313119484660537,y:.7608238051533946},{x:.03753486744638546,y:.7540046604858821},{x:.0333764210369921,y:.746224754456429},{x:.03081566238185464,y:.7377830644907257},{x:.029951000000000005,y:.729004},{x:.029951000000000005,y:.38529899999999995}]],6:[[{x:.01994450211145162,y:.2755194646798348},{x:.020758274672659796,y:.26806396163938684},{x:.0201773643330274,y:.24423363638780976},{x:.020440223451033163,y:.2406784570189078},{x:.020568639264984916,y:.237115887070161},{x:.02076496657089406,y:.23628629421823594},{x:.02082782677693791,y:.23543610758842642},{x:.021779216218601925,y:.23200052126419074},{x:.022600187477202785,y:.22853145778054884},{x:.04459918747720279,y:.16442145778054884},{x:.04602253566469808,y:.16130748249724527},{x:.047307319174730654,y:.15813382633120915},{x:.06831231917473066,y:.11806482633120913},{x:.06934150993632018,y:.11649740482650416},{x:.07018719324152095,y:.11482382676006757},{x:.07175673818837072,y:.11281909673987861},{x:.07315419088510985,y:.11069082519836773},{x:.0744693948008918,y:.10935430641546007},{x:.07562532742241568,y:.1078778703106287},{x:.1253733274224157,y:.055788870310628645},{x:.12585541612958862,y:.055374327647901005},{x:.12626130847256478,y:.0548849335871293},{x:.1291958120945167,y:.0525019586891126},{x:.1320620582603259,y:.05003730581521479},{x:.13261575702973094,y:.04972477931463493},{x:.1331093263100589,y:.049323974491408525},{x:.1861743263100589,y:.014262974491408516},{x:.18683955107784095,y:.013911818906951787},{x:.187438960697758,y:.013457349607970202},{x:.1907349034619545,y:.011855559414887177},{x:.19397565070571454,y:.010144849670490022},{x:.19469660042216425,y:.009930220356283175},{x:.19537315511619574,y:.009601422573216056},{x:.19891826102894206,y:.008673416864759805},{x:.2024304811380398,y:.007627816351770726},{x:.20317945010986724,y:.007557961391993223},{x:.20390715026053782,y:.0073674706392518954},{x:.2857161502605378,y:-.005654529360748083},{x:.2860775594607644,y:-.005676122674759226},{x:.28642923596273784,y:-.0057621838110407525},{x:.2904772893795591,y:-.005938995755027237},{x:.2945219894833068,y:-.006180656673914681},{x:.2948806669536751,y:-.006131327641200151},{x:.2952423757850646,y:-.006147126454864343},{x:.38700037578506463,y:-.001139126454864331},{x:.39074801870473747,y:-.000562375362895672},{x:.3945101708776463,y:-8942684208443352e-20},{x:.395102371884912,y:.00010774663253235539},{x:.3957192721812796,y:.00020268575218489876},{x:.39928238663684656,y:.0014994835976446027},{x:.4028799824314506,y:.002697304024131271},{x:.47474098243145063,y:.03475230402413133},{x:.4764407459001163,y:.03572046389197228},{x:.4782361407270164,y:.03649705052245801},{x:.48026428101539703,y:.03789829234877595},{x:.4824063061811086,y:.03911835786940705},{x:.4838845305509628,y:.04039952221931584},{x:.48549392283388365,y:.041511451110380196},{x:.5363469228338836,y:.08458545111038014},{x:.5369424578291695,y:.08519979361043255},{x:.5376274627831791,y:.08571247952886965},{x:.5400078699953618,y:.08836201411598918},{x:.5424869876672573,y:.09091942444541115},{x:.5429512273484354,y:.09163814564059086},{x:.5435230500634102,y:.09227461827992436},{x:.5453408198626901,y:.09533763721244376},{x:.5472733759789791,y:.0983295594844189},{x:.5475884798754501,y:.09912503932225875},{x:.5480251455251356,y:.09986083939589693},{x:.5756631455251356,y:.15896283939589692},{x:.5756676990332947,y:.1589757429605767},{x:.575674675284325,y:.15898751446598428},{x:.5771354507402345,y:.1631350040011944},{x:.5785987361645655,y:.16728160865370237},{x:.5786006848177536,y:.16729515262537814},{x:.5786052305152959,y:.16730805894366996},{x:.5792288025114348,y:.17166083878445604},{x:.5798550088797246,y:.1760132404159827},{x:.5798542777922926,y:.17602690430741857},{x:.5798562182477396,y:.17604044945602063},{x:.5820672182477395,y:.2261264494560206},{x:.5819074721227447,y:.22907858468741052},{x:.5819395990078049,y:.232034864293962},{x:.5816696541741431,y:.23347350033714379},{x:.5815905637246603,y:.23493510513282764},{x:.580857954063737,y:.2377993509905685},{x:.5803127220992973,y:.2407050941577823},{x:.5648357220992973,y:.2937960941577823},{x:.5632290277642941,y:.2977974374258546},{x:.5616400226499054,y:.30180583827676916},{x:.5384240226499054,y:.3468838382767692},{x:.5373215489467563,y:.3485896803397862},{x:.5364060617863755,y:.35040275195151915},{x:.5349331318310961,y:.3522852445680167},{x:.5336357086983223,y:.35429272914301846},{x:.5322216254408594,y:.35575071197935654},{x:.5309700163849885,y:.3573503432435408},{x:.49559401638498846,y:.39441334324354077},{x:.4926979475395651,y:.39690515537305066},{x:.48986855873600776,y:.3994724304741097},{x:.48935820160472765,y:.3997787125549045},{x:.48890701524930746,y:.4001669186691625},{x:.48558046512393155,y:.4020458563236817},{x:.4823045917066957,y:.404011815580751},{x:.4336605917066957,y:.42705181558075106},{x:.43309173356321873,y:.4272557130907893},{x:.4325654489917744,y:.42755269513041455},{x:.42894434743018467,y:.4287422729922158},{x:.4253563740806812,y:.43002832091195864},{x:.42475866795602985,y:.4301173218701226},{x:.42418455747331046,y:.430305924456616},{x:.35674655747331047,y:.44533192445661596},{x:.3529000911149492,y:.4457998510145922},{x:.3490659246900917,y:.4463596961147396},{x:.28494592469009167,y:.4493636961147396},{x:.2805873413475358,y:.449139645094856},{x:.27622830276644406,y:.44892463285807194},{x:.20879130276644411,y:.4389076328580719},{x:.2058686377582091,y:.4381749274884603},{x:.2029059705898912,y:.4376259000221244},{x:.2015992206546876,y:.4371045944779896},{x:.20023455588710068,y:.4367624761715421},{x:.19751099279397463,y:.4354736658725529},{x:.19471236238975773,y:.4343572001231398},{x:.1250653623897577,y:.39829620012313977},{x:.12281565387932818,y:.3968352958512946},{x:.12046004217050754,y:.3955521266688945},{x:.11912493361112,y:.39443863469229795},{x:.1176668837895426,y:.39349181371392206},{x:.11574541108214431,y:.3916200839502759},{x:.11440461043594556,y:.3905018447245139},{x:.11499744675527566,y:.4076710597897629},{x:.14015918883207887,y:.48309781218266834},{x:.17625691985197756,y:.5624688107059582},{x:.22079283681825793,y:.6049160879451294},{x:.2812243215554422,y:.6473094683632384},{x:.35529887985725983,y:.6721340784004237},{x:.44197867319461825,y:.699237682451455},{x:.450099621980826,y:.7026829408131323},{x:.45739239245003865,y:.7076463180152294},{x:.4635767275229571,y:.7139370742553635},{x:.4684149666709443,y:.7213134592991232},{x:.47172117907685873,y:.729492002806001},{x:.4733683088520865,y:.7381584079356077},{x:.4732930577230865,y:.7469796295989887},{x:.471498317548545,y:.7556166731946181},{x:.4680530591868676,y:.7637376219808258},{x:.4630896819847706,y:.7710303924500386},{x:.4567989257446365,y:.7772147275229571},{x:.4494225407008768,y:.7820529666709441},{x:.4412439971939989,y:.7853591790768587},{x:.43257759206439217,y:.7870063088520864},{x:.4237563704010112,y:.7869310577230865},{x:.41511932680538177,y:.7851363175485448},{x:.32800332680538175,y:.7578963175485449},{x:.32758097645219697,y:.7577171382279785},{x:.32713377373466446,y:.7576146941984534},{x:.2464307737346645,y:.7305686941984535},{x:.24453959681011464,y:.7297206474805041},{x:.2425703892464572,y:.7290741531131611},{x:.24052462272791658,y:.727920241844807},{x:.2383814751569417,y:.7269592057619036},{x:.2366920823739949,y:.725758503708645},{x:.23488683737580707,y:.7247402582115807},{x:.16634483737580705,y:.6766572582115807},{x:.16379281785599412,y:.6744641039532857},{x:.16114120086592887,y:.6723924725748345},{x:.10785520086592887,y:.6216054725748346},{x:.10512406158167997,y:.61843588774195},{x:.10236095541706475,y:.6152941312068447},{x:.10224621895073822,y:.6150960484276141},{x:.1020967920615373,y:.6149226331776604},{x:.10003648617852028,y:.6112811321861437},{x:.09793939861820375,y:.6076606883504815},{x:.057256398618203745,y:.5182076883504814},{x:.05649445644348035,y:.515973451082899},{x:.055531562043165734,y:.5138181769891187},{x:.02756156204316574,y:.4299731769891187},{x:.02710606704062858,y:.4279720709807987},{x:.026442901166776424,y:.42602987841114226},{x:.0261294707087366,y:.42368163359604843},{x:.025603668479436986,y:.4213716499642221},{x:.02554732210120287,y:.4193201319800137},{x:.025275801747494525,y:.4172858808521062},{x:.022290801747494524,y:.3308368808521062},{x:.022305383523873214,y:.330608131273329},{x:.022277364333027405,y:.33038063638780973},{x:.021194122115214913,y:.2859434614650037},{x:.02071653916751727,y:.2843071590959475},{x:.01994450211145162,y:.2755194646798348}],[{x:.11034731747482908,y:.25010871966048204},{x:.11054573733688708,y:.2582483748303443},{x:.14138614929871246,y:.28974619429248377},{x:.17280436841728808,y:.32166563054627706},{x:.2294333737827033,y:.3509863272379111},{x:.2851142784460479,y:.35925709287120927},{x:.3409693478959939,y:.3566403020317264},{x:.39969116147327427,y:.34355637352239615},{x:.43624565447916347,y:.3262425111990739},{x:.46138408324665353,y:.29990528863548604},{x:.47964461062187336,y:.2644492215688011},{x:.49182659739178797,y:.22266115801633354},{x:.4903391577658353,y:.18896604218391924},{x:.47066764412974615,y:.14689983627465894},{x:.4322187986209955,y:.11433252320671945},{x:.3738017517723872,y:.08827446060346957},{x:.29512698962943984,y:.08398052210424463},{x:.22766698305582697,y:.09471851188045},{x:.18695506157646963,y:.1216176107024183},{x:.1450838647757246,y:.1654591474507099},{x:.12861258258928074,y:.1968796571354811},{x:.11034731747482908,y:.25010871966048204}]],7:[[{x:.026534000000000002,y:.729004},{x:.027398662381854635,y:.7202249355092742},{x:.029959421036992097,y:.711783245543571},{x:.03411786744638546,y:.7040033395141179},{x:.039714194846605363,y:.6971841948466053},{x:.046533339514117915,y:.6915878674463855},{x:.05431324554357096,y:.6874294210369921},{x:.06275493550927423,y:.6848686623818546},{x:.071534,y:.684004},{x:.4019606654607806,y:.684004},{x:.4004737160341744,y:.6825246433416329},{x:.3773547160341744,y:.6545006433416328},{x:.37631768094411194,y:.6529571778549935},{x:.37511206403824765,y:.6515414747212956},{x:.3516100640382476,y:.6177174747212957},{x:.35070717908442606,y:.6160998190359583},{x:.34962595461558005,y:.6145955036421288},{x:.32637595461558006,y:.5744575036421288},{x:.32562538351875275,y:.5728072168885044},{x:.3246890272988689,y:.5712547864166106},{x:.3023170272988689,y:.5242907864166106},{x:.3017220252289498,y:.5226423026482856},{x:.3009361907094137,y:.5210757809262708},{x:.2800741907094137,y:.4667717809262708},{x:.2796297795277362,y:.4651572895546526},{x:.27899211910181604,y:.46360891205912846},{x:.26027511910181605,y:.40145091205912853},{x:.2599700482242006,y:.399900691568321},{x:.2594722021762355,y:.3984012246220316},{x:.2435242021762355,y:.3278752246220315},{x:.24329560198997774,y:.32604433113097486},{x:.24285939794168837,y:.32425152465814894},{x:.22552039794168838,y:.201651524658149},{x:.22543629437721757,y:.19966542745190077},{x:.2251384028560513,y:.1976999971774209},{x:.21759140285605127,y:.0533799971774209},{x:.2179964236931644,y:.04456775725283754},{x:.22011284489303193,y:.03600385769296016},{x:.22385933357584556,y:.028017404355184638},{x:.22909191428257988,y:.020915312162427036},{x:.23560950187114016,y:.014970510534755857},{x:.24316162910560324,y:.010411454864839347},{x:.25145807197163045,y:.007413347105324521},{x:.2601800028225791,y:.006091402856051323},{x:.26899224274716244,y:.0064964236931644576},{x:.27755614230703984,y:.008612844893031955},{x:.2855425956448154,y:.0123593335758456},{x:.29264468783757297,y:.017591914282579925},{x:.29858948946524416,y:.02410950187114019},{x:.30314854513516065,y:.03166162910560326},{x:.30614665289467546,y:.03995807197163046},{x:.3074685971439487,y:.04868000282257914},{x:.3149118365119932,y:.19101580586964154},{x:.33171443080019297,y:.3098230069615897},{x:.3469078029209317,y:.3770118558572018},{x:.3646876244488305,y:.43605754408347375},{x:.3843219343355222,y:.48716585412502805},{x:.40516196826036527,y:.5309139031705462},{x:.42657620329737017,y:.5678827017045378},{x:.4479617026009278,y:.5986606409626235},{x:.4682073320853445,y:.6232016470905397},{x:.5069453480603512,y:.6602460238293135},{x:.5211069187127709,y:.670919967941474},{x:.553634852004927,y:.6903949675582732},{x:.5545334052571363,y:.6910607030437311},{x:.5555196604858821,y:.6915878674463855},{x:.5580709875097788,y:.6936816874233654},{x:.5607229359621996,y:.6956465083018619},{x:.5614743452153894,y:.6964747509099635},{x:.5623388051533946,y:.6971841948466053},{x:.5644326251303754,y:.699735521870503},{x:.5666502995990071,y:.7021799587443133},{x:.5672256886169725,y:.7031388795761127},{x:.5679351325536145,y:.7040033395141179},{x:.5694909811561905,y:.7069141275182039},{x:.5711891576548912,y:.709744242049125},{x:.5715664145603537,y:.7107969903148255},{x:.5720935789630078,y:.711783245543571},{x:.5730516658019124,y:.7149416345772374},{x:.5741650843601849,y:.7180486670509921},{x:.5743297113818354,y:.7191547862251302},{x:.5746543376181453,y:.7202249355092742},{x:.574977843953461,y:.7235095504532041},{x:.5754637165205229,y:.7267740993542682},{x:.5754093871342436,y:.7278910818973009},{x:.575519,y:.729004},{x:.5751954936646845,y:.7322886149439295},{x:.5750351484302645,y:.735585225488817},{x:.5747639504839017,y:.7366701463880269},{x:.5746543376181453,y:.7377830644907257},{x:.5736962507792408,y:.7409414535243923},{x:.5728958497207748,y:.7441434388186243},{x:.5724182051993175,y:.7451546051722857},{x:.5720935789630078,y:.746224754456429},{x:.570537730360432,y:.749135542460515},{x:.5691280324417267,y:.752119852004927},{x:.5684622969562688,y:.7530184052571364},{x:.5679351325536145,y:.7540046604858821},{x:.5658413125766343,y:.756555987509779},{x:.563876491698138,y:.7592079359621996},{x:.5630482490900365,y:.7599593452153895},{x:.5623388051533946,y:.7608238051533946},{x:.5597874781294971,y:.7629176251303754},{x:.5573430412556867,y:.7651352995990072},{x:.5563841204238874,y:.7657106886169726},{x:.5555196604858821,y:.7664201325536145},{x:.5526088724817957,y:.7679759811561907},{x:.5497787579508749,y:.7696741576548912},{x:.5487260096851745,y:.7700514145603538},{x:.547739754456429,y:.7705785789630079},{x:.5445813654227618,y:.7715366658019126},{x:.5414743329490078,y:.7726500843601849},{x:.5403682137748697,y:.7728147113818356},{x:.5392980644907257,y:.7731393376181454},{x:.5360134495467959,y:.773462843953461},{x:.5327489006457318,y:.7739487165205229},{x:.531631918102699,y:.7738943871342436},{x:.530519,y:.774004},{x:.071534,y:.774004},{x:.06275493550927423,y:.7731393376181454},{x:.054313245543570934,y:.7705785789630079},{x:.046533339514117915,y:.7664201325536145},{x:.039714194846605363,y:.7608238051533946},{x:.03411786744638546,y:.7540046604858821},{x:.029959421036992097,y:.746224754456429},{x:.027398662381854635,y:.7377830644907257},{x:.026534000000000002,y:.729004}]],8:[[{x:.018998734783549534,y:.19034712298183487},{x:.01918983868826437,y:.187136446932327},{x:.01920952916989005,y:.18392014879903562},{x:.019451409422642358,y:.18274188004279768},{x:.019522877627479743,y:.18154116541629586},{x:.0203366813486396,y:.1784294641291047},{x:.020983462121705806,y:.17527880768498513},{x:.021450563544301488,y:.17417036752890672},{x:.021754906310756543,y:.17300666705236456},{x:.02316013582774355,y:.17011352146289485},{x:.024409151469860245,y:.16714958466818597},{x:.06244715146986025,y:.097021584668186},{x:.06364531823888224,y:.0952519506947441},{x:.06465809579443724,y:.09337006609963419},{x:.0661122558858275,y:.09160840391706095},{x:.06739294989385258,y:.08971688123025286},{x:.06891333268610705,y:.08821500101819715},{x:.07027378747657535,y:.08656685940733966},{x:.07204368953204261,y:.0851227396301211},{x:.07366879313388441,y:.08351741302778071},{x:.0754529644913056,y:.08234100299139627},{x:.07710881500204132,y:.08098994152260804},{x:.14910981500204132,y:.03317594152260801},{x:.1504928100364302,y:.03244176283843531},{x:.15177178054792087,y:.031538475488709236},{x:.15438005907773164,y:.030378172358910993},{x:.15690151209615905,y:.029039630272177964},{x:.1584011644246711,y:.028589367572161194},{x:.15983178249634203,y:.027952951404511282},{x:.24949378249634205,y:-.0017990485954887184},{x:.251605077566582,y:-.002276091838878668},{x:.25365804064979064,y:-.002962007073194259},{x:.2558970148670134,y:-.0032458471890824472},{x:.2580984148155577,y:-.003743249464233246},{x:.2602622084630055,y:-.003799233220341744},{x:.26240953986016613,y:-.0040714555567724145},{x:.33848653986016614,y:-.006196455556772458},{x:.34211630259529946,y:-.0059410451417675775},{x:.3457527120689106,y:-.005810898556388326},{x:.34651004211407876,y:-.005631877045722989},{x:.3472863241290845,y:-.005577253499755554},{x:.35079651389094996,y:-.004618619143417753},{x:.3543376604369356,y:-.0037815449929937683},{x:.4535096604369356,y:.03022045500700621},{x:.45591274590665615,y:.03131812424947078},{x:.4583949217344816,y:.03222283453480715},{x:.45991547545056405,y:.03314647083206772},{x:.461533744189149,y:.033885655452327273},{x:.46367651039942226,y:.035431052006208004},{x:.4659344916938285,y:.03680262701864639},{x:.5338604916938285,y:.08780462701864639},{x:.5368034713408607,y:.09050382186837246},{x:.5397962541268131,y:.09314768896709699},{x:.5400513850489728,y:.09348269124727963},{x:.5403617177400871,y:.09376731720532937},{x:.5427215620660051,y:.09698879462990716},{x:.5451410464862535,y:.10016572352111452},{x:.5453259194365666,y:.1005440624001799},{x:.5455747614022292,y:.10088376225489704},{x:.547260782913003,y:.10450372268352329},{x:.5490139895381407,y:.10809162577156875},{x:.5802599895381407,y:.1920326257715688},{x:.5808621946470703,y:.19431314395649216},{x:.5816704362178704,y:.19652903198349428},{x:.5819856183913868,y:.19856748893015458},{x:.5825122482529622,y:.20056180773987195},{x:.5826579751325236,y:.20291599079595712},{x:.5830183882594349,y:.20524698126417715},{x:.5829298310737253,y:.20730775882392333},{x:.5830572695913885,y:.20936649774620245},{x:.5827409180393249,y:.21170387573884492},{x:.582639652248002,y:.21406038999182395},{x:.570412652248002,y:.30012638999182395},{x:.5703409363500996,y:.30042034316527866},{x:.5703238989157716,y:.30072243812390526},{x:.5692961437829783,y:.3047027979582916},{x:.5683217827960937,y:.30869656381164773},{x:.5681940974797931,y:.30897087767968473},{x:.5681184516122305,y:.3092638441298401},{x:.5663339148242972,y:.3129672173863048},{x:.5645991308441736,y:.31669415574996157},{x:.5644203829845738,y:.31693828858446854},{x:.5642890357120441,y:.31721086798977133},{x:.5618162960169492,y:.32049493611094637},{x:.5593877558190667,y:.3238118228336772},{x:.5591648145961691,y:.32401639274673566},{x:.5589828135206953,y:.3242581100335041},{x:.5032838135206953,y:.3848241100335041},{x:.5011622073766187,y:.38671918495638496},{x:.4991781602202921,y:.38875783119234486},{x:.4978799327840818,y:.3896509997457094},{x:.496704700181234,y:.39070074870143656},{x:.4942541493273608,y:.39214550546522026},{x:.4919105049301597,y:.39375791128677606},{x:.42072451102124153,y:.4330589294870645},{x:.4777200661568854,y:.4633968522602595},{x:.4805213378044988,y:.46526159042857346},{x:.48340658539474834,y:.46699355971902134},{x:.4841865730327025,y:.4677014480666941},{x:.48506339053858555,y:.46828512408085676},{x:.487447044167244,y:.4706605328159332},{x:.4899389620874836,y:.4729221066835925},{x:.4905658603159866,y:.4737685611946159},{x:.49131196047780046,y:.47451208064740324},{x:.493186393615322,y:.4773068743236967},{x:.4951892188573616,y:.48001114175313947},{x:.5250762188573616,y:.5299501417531395},{x:.5263287500632193,y:.5326029758232522},{x:.5277533683388757,y:.5351675080991},{x:.5282078804872482,y:.5365829335183069},{x:.5288425912810938,y:.5379272372855163},{x:.5295535131980511,y:.5407734546091212},{x:.5304504424054924,y:.5435666393545394},{x:.5306200854295579,y:.5450435386925929},{x:.5309803397786421,y:.5464858379730204},{x:.5311223320761199,y:.5494160600145488},{x:.5314571037289079,y:.5523305567062068},{x:.5328161037289079,y:.6362725567062067},{x:.5325682225912138,y:.6392892202473488},{x:.5325070847315841,y:.6423154334158161},{x:.5322077563487247,y:.6436760218476847},{x:.5320936668790056,y:.6450644677251389},{x:.5312620268462096,y:.647974807711247},{x:.530611678831884,y:.6509309456375182},{x:.530052664324664,y:.6522069946735811},{x:.5296698946987799,y:.6535465042014387},{x:.5282864552309536,y:.656238677898982},{x:.5270718895714029,y:.659011137860374},{x:.493108889571403,y:.7195761378603741},{x:.49086599866607616,y:.7227903647520136},{x:.4886941713149356,y:.7260530293196586},{x:.4883443495413535,y:.7264040725827037},{x:.48806074906628455,y:.7268104928286833},{x:.4852338901214668,y:.7295253929429124},{x:.4824672795427586,y:.7323016638284542},{x:.4820556943532359,y:.7325777150511769},{x:.48169825452511067,y:.7329209983380867},{x:.4783960621447291,y:.7350322395860499},{x:.4751409876314614,y:.737215426256307},{x:.4058559876314614,y:.774404426256307},{x:.40535390944732597,y:.7746134197603937},{x:.4048950878292554,y:.7749053846735706},{x:.40128606998249994,y:.7763066859700772},{x:.39771184087056327,y:.7777944834687843},{x:.3971786373679402,y:.7779015106266721},{x:.3966716723496766,y:.778098353858693},{x:.39285862044769176,y:.7787686450898307},{x:.3890628142527955,y:.7795305574683767},{x:.38851897614326597,y:.7795315052864096},{x:.3879833501061526,y:.7796256622622586},{x:.29017035010615255,y:.7870576622622585},{x:.28883979914978264,y:.7870279344512828},{x:.28751770557027906,y:.7871806372910648},{x:.2844390802539456,y:.7869296114679608},{x:.28135100845003463,y:.7868606162788429},{x:.2800518232654171,y:.7865718820648824},{x:.2787253424971381,y:.7864637231002555},{x:.20264834249713812,y:.7726567231002556},{x:.20090732012312768,y:.7721604024311715},{x:.19912055356042774,y:.7718689262507037},{x:.1966754417776232,y:.7709540028332816},{x:.19416478523538352,y:.7702382792713757},{x:.19255404347725652,y:.7694118386491953},{x:.19085847331495095,y:.7687773822377194},{x:.12157447331495094,y:.7347753822377193},{x:.11864840230662128,y:.7329636093328938},{x:.1156466869822177,y:.7312801255296781},{x:.11490452792065226,y:.7306454666247165},{x:.11407427694169714,y:.7301313894804525},{x:.11155788892673538,y:.7277835811487093},{x:.10894228211787771,y:.7255468394054793},{x:.1083381992447159,y:.7247795872431081},{x:.10762419278113186,y:.7241134140161837},{x:.10561419113974596,y:.7213197952150451},{x:.1034852091492498,y:.7186157522626143},{x:.05457920914924981,y:.6421127522626143},{x:.05400544809690788,y:.6409849569633866},{x:.05327967340990527,y:.639948436299892},{x:.05200937551205521,y:.6370614399018406},{x:.05057918033015655,y:.6342502218929852},{x:.050236465883645505,y:.633032161635733},{x:.04972685190376166,y:.6318739658087451},{x:.04904418748077848,y:.6287946194110116},{x:.04818991452487371,y:.6257584009293389},{x:.04809141700817653,y:.6244968850866522},{x:.047817547914863534,y:.6232615229122788},{x:.04774875137767971,y:.6201081640700103},{x:.04750322987838258,y:.6169636252890404},{x:.04765273449582791,y:.6157071332072875},{x:.04762513492475421,y:.6144420789610904},{x:.04817285008571219,y:.6113358894861711},{x:.048545515296550656,y:.608203873267779},{x:.04893727666953319,y:.607000691233013},{x:.04915700725673716,y:.6057545602402229},{x:.06817600725673716,y:.537751560240223},{x:.0695259178796919,y:.5342803033966695},{x:.07076883034011841,y:.5307693133112962},{x:.07112252784165454,y:.530174666206544},{x:.07137329591617819,y:.5295298232221028},{x:.07337447700044117,y:.5263886201035727},{x:.07527846743280868,y:.5231875729003385},{x:.0757413786311829,y:.522673354732434},{x:.07611313089295507,y:.5220898246495332},{x:.07868867817173447,y:.5193993899302627},{x:.08118057729149615,y:.5166313000580217},{x:.13823757729149616,y:.46456630005802163},{x:.1415344063491032,y:.46210392848613274},{x:.14479841194755694,y:.45959821041612353},{x:.17870395742216458,y:.4385038845164132},{x:.16590813892329467,y:.43401753680148847},{x:.1630836262780146,y:.43270367241359486},{x:.16018787852971583,y:.4315553012665589},{x:.15909238677042803,y:.43084708753997614},{x:.15790960896480868,y:.43029690071741367},{x:.15539569076452509,y:.4284572467838155},{x:.15277962009410193,y:.4267660089056696},{x:.07398562009410191,y:.3640750089056696},{x:.07334669706368892,y:.36345515994886657},{x:.07261876409580822,y:.3629427646304707},{x:.07018582297292754,y:.3603886489381779},{x:.067654053855944,y:.3579324619307791},{x:.06714833408498834,y:.3571998754981266},{x:.06653435151263618,y:.35655531303498644},{x:.06464644192410274,y:.3535756306924294},{x:.06264249835499126,y:.3506727149773525},{x:.06228941637067996,y:.3498555439546183},{x:.061812979199786275,y:.3491035845207174},{x:.026491979199786284,y:.27897658452071744},{x:.026206182636496978,y:.2782362375154344},{x:.02580526951533789,y:.27755135647970497},{x:.024619992088609113,y:.2741272608068926},{x:.023315086847465263,y:.27074694483548933},{x:.02317921632066564,y:.26996506724675395},{x:.022919620294515476,y:.2692151317381758},{x:.022425125568608657,y:.2656255929487299},{x:.02180476064715109,y:.2620556544171705},{x:.02182403758498896,y:.26126229336223583},{x:.021715734783549545,y:.26047612298183487},{x:.018998734783549534,y:.19034712298183487}],[{x:.10940940002433477,y:.19920410482166873},{x:.1112697837122767,y:.2472228194523932},{x:.137749803196691,y:.2997967648781603},{x:.20286290613296581,y:.3516028102138205},{x:.27392321813344717,y:.3765172983642545},{x:.30180455045059645,y:.38547932587505673},{x:.3589974388819276,y:.364332623176267},{x:.44199758150171664,y:.31850914110336725},{x:.48327372240847105,y:.27362627516037924},{x:.4919267227459848,y:.21271770175329152},{x:.46927072007314496,y:.15185335046477932},{x:.41758736799183827,y:.11304708595854013},{x:.33285528741119674,y:.08399594043457195},{x:.2715476841223936,y:.0857083982994813},{x:.19388634557978268,y:.1114782912788902},{x:.13622191473335832,y:.14977174687660325},{x:.10940940002433477,y:.19920410482166873}],[{x:.1412545940070051,y:.610603192179028},{x:.17253143522148345,y:.6595291354872365},{x:.22488466829434647,y:.6852221473073319},{x:.28911227954018853,y:.6968786351876549},{x:.37167628924266627,y:.6906052797020977},{x:.4210229734590171,y:.664118250196117},{x:.4426312796779887,y:.6255849325813003},{x:.4416638895166663,y:.5658316839266069},{x:.4243877259953326,y:.5369644730960824},{x:.3411654121752423,y:.49266641996418925},{x:.3038587353431559,y:.48067475972705925},{x:.2482367446999157,y:.5012406330709052},{x:.1958501022844071,y:.5338329684082593},{x:.1513751879049268,y:.5744167077770947},{x:.1412545940070051,y:.610603192179028}]],9:[[{x:.04617702144416433,y:.5785043710151274},{x:.046308257010348054,y:.5777836867379841},{x:.04632014162646953,y:.5770512474182771},{x:.047097404355444614,y:.5734500590446777},{x:.04775742235616295,y:.5698255492446179},{x:.06775742235616294,y:.499825549244618},{x:.06870401207934061,y:.497431122678351},{x:.06945142103699212,y:.4949672455435709},{x:.07032179921115676,y:.4933388825112154},{x:.07100061044171635,y:.4916218095236955},{x:.07239614115864691,y:.4894580616864063},{x:.07360986744638548,y:.48718733951411786},{x:.07478119941633177,y:.4857600673791044},{x:.07578195180149752,y:.48420841696912487},{x:.07757279404935197,y:.4823584994767568},{x:.07920619484660538,y:.4803681948466053},{x:.1292061948466054,y:.43036819484660543},{x:.1324047212320044,y:.4277432320802026},{x:.1355710052680468,y:.42507946670648067},{x:.13581237417673697,y:.4249466435819557},{x:.13602533951411794,y:.4247718674463855},{x:.13967451194327588,y:.422821344145996},{x:.14329963156393744,y:.42082647364918746},{x:.21329963156393744,y:.39082647364918743},{x:.21510775104315333,y:.39025382151681987},{x:.2168404136401385,y:.3894823898342746},{x:.21930272871556003,y:.3889252240779052},{x:.22170947225776405,y:.3881629808537447},{x:.22359456811709633,y:.38795407868297094},{x:.22544443694348562,y:.38753549554788497},{x:.30544443694348566,y:.37753549554788496},{x:.30933066171136914,y:.37743373006124875},{x:.3132134481214367,y:.3772411973248817},{x:.31373545479679327,y:.3773183852372503},{x:.314262956584918,y:.37730457196617717},{x:.3180943620951528,y:.37796292671622445},{x:.321940103126635,y:.37853158749346005},{x:.39912055139763536,y:.39782669956121014},{x:.3920145202755848,y:.3793136184800785},{x:.3919728818872528,y:.3791621799808353},{x:.39190347676812315,y:.3790212888743934},{x:.33928123709710245,y:.23902627390054626},{x:.29593066247424293,y:.13853176000209894},{x:.2601678276974797,y:.06104561798577861},{x:.25727396725620644,y:.05271224015242973},{x:.25606147289685455,y:.04397442167208486},{x:.2565769400976792,y:.035167952008718584},{x:.2588005597432301,y:.02663125885276897},{x:.2626468793775489,y:.018692402534786497},{x:.2679680870941297,y:.011656468850909336},{x:.274559691864592,y:.005793844786811796},{x:.2821683820142214,y:.0013298276974796769},{x:.29050175984757026,y:-.0015640327437935753},{x:.29923957832791515,y:-.002776527103145486},{x:.30804604799128144,y:-.002261059902320825},{x:.31658274114723106,y:-3744025676995222e-20},{x:.32452159746521353,y:.003808879377548882},{x:.3315575311490907,y:.009130087094129706},{x:.33742015521318824,y:.015721691864591977},{x:.34188417230252033,y:.023330382014221395},{x:.3778841723025203,y:.10133038201422136},{x:.3780704961344211,y:.10186693411204945},{x:.37834550457920557,y:.10236389998544072},{x:.42234550457920556,y:.2043638999854408},{x:.4226728981736059,y:.20538920106595157},{x:.42314852323187685,y:.20635471112560658},{x:.47609350933819694,y:.3472083534084579},{x:.5496013805841499,y:.5387157021808093},{x:.5512752235949963,y:.542063388202502},{x:.5520259437659378,y:.5440252139743784},{x:.5529745491659372,y:.5458993775022888},{x:.553598518494472,y:.5481347580495968},{x:.5544279630456541,y:.5503023109672317},{x:.5547815251174404,y:.5523728990468965},{x:.5553462721645,y:.554396114781092},{x:.555522150986547,y:.5567102734952235},{x:.5559127893965689,y:.5589979940959194},{x:.5558556061770612,y:.5610977729446709},{x:.5560147919588762,y:.5631922898391183},{x:.5557358213499382,y:.5654962948984841},{x:.5556726416037749,y:.5678162673625252},{x:.5552069106120301,y:.5698645436567753},{x:.5549544177082778,y:.5719498706018395},{x:.5349544177082779,y:.6619498706018395},{x:.5345092452033302,y:.663307558548854},{x:.5342480120020212,y:.6647122835522489},{x:.5331378863550271,y:.6674899313564284},{x:.5322058990004909,y:.6703323081518522},{x:.5315044085816177,y:.6715770596583215},{x:.5309741466497647,y:.6729038291953012},{x:.5293434595512297,y:.6754115305058349},{x:.5278748598680685,y:.6780174701150343},{x:.5269440094186665,y:.6791014500786302},{x:.5261650964249364,y:.6802992771399491},{x:.4861650964249363,y:.7302992771399491},{x:.4855393928217795,y:.7309407996522789},{x:.48502142797480674,y:.7316720783612058},{x:.48246447922773295,y:.7340934525762789},{x:.48000567043073006,y:.7366144244690945},{x:.4792668347133476,y:.7371215515888083},{x:.4786161570168623,y:.7377377290536072},{x:.47563595264764597,y:.7396137412876539},{x:.4727325719538572,y:.7416065836124539},{x:.4719089971645242,y:.7419598267287414},{x:.4711506117974981,y:.7424372235949962},{x:.4111506117974981,y:.7724372235949962},{x:.40814803697660645,y:.7735862009991664},{x:.4052110607504687,y:.7748937847545917},{x:.4040364518244048,y:.77515955677446},{x:.40291168903276836,y:.7755899630456542},{x:.39974265347336024,y:.7761310898824948},{x:.39660701348596056,y:.7768405731449995},{x:.3166070134859606,y:.7868395731449994},{x:.31542693671630134,y:.7868704603456931},{x:.31426350899694466,y:.7870703881908964},{x:.3110259999999998,y:.7869856499834279},{x:.3077884910030554,y:.7870703881908964},{x:.3066250632836987,y:.7868704603456931},{x:.30544498651403945,y:.7868395731449994},{x:.22544498651403946,y:.7768405731449995},{x:.22359484289355938,y:.7764219517671516},{x:.22170947225776405,y:.7762130191462554},{x:.21930299190993624,y:.775450859278766},{x:.2168409392495313,y:.7748937847545917},{x:.21510801459933976,y:.7741222619544408},{x:.21329963156393744,y:.7735495263508126},{x:.14329963156393744,y:.7435495263508126},{x:.1396745119432796,y:.741554655854006},{x:.13602533951411788,y:.7396041325536146},{x:.13581237417673678,y:.7394293564180442},{x:.1355710052680468,y:.7392965332935194},{x:.13240472123200803,y:.7366327679198006},{x:.12920619484660534,y:.7340078051533947},{x:.07920619484660535,y:.6840078051533947},{x:.07757279404935197,y:.6820175005232432},{x:.0757819518014975,y:.6801675830308751},{x:.07478119941633177,y:.6786159326208956},{x:.07360986744638545,y:.6771886604858821},{x:.07239614115864686,y:.6749179383135936},{x:.07100061044171635,y:.6727541904763045},{x:.07032179921115676,y:.6710371174887846},{x:.06945142103699209,y:.669408754456429},{x:.06870401207934061,y:.666944877321649},{x:.06775742235616294,y:.664550450755382},{x:.04775742235616295,y:.5945504507553819},{x:.0470974043554446,y:.590925940955322},{x:.04632014162646953,y:.5873247525817227},{x:.046308257010348054,y:.5865923132620157},{x:.04617702144416433,y:.5858716289848723},{x:.0462367922883029,y:.5821879999999999},{x:.04617702144416433,y:.5785043710151274}],[{x:.13782670643108905,y:.5821879999999999},{x:.15109114488080894,y:.6286135345740196},{x:.18671787059591238,y:.6642402602891231},{x:.24291204200407931,y:.688323476606909},{x:.311026,y:.696836869931924},{x:.377796042530131,y:.6884914492411893},{x:.4220611757635009,y:.6663588826245044},{x:.4493630453483168,y:.6322315456434845},{x:.46363172164975686,y:.5680225022870041},{x:.4540425513192988,y:.5488441616260881},{x:.42235697647551157,y:.5171585867823008},{x:.37255000597497323,y:.48395393978194207},{x:.30826669745594837,y:.4678831126521858},{x:.24291230161158606,y:.4760524121327311},{x:.1867178705959123,y:.500135739710877},{x:.15109114488080894,y:.5357624654259804},{x:.13782670643108905,y:.5821879999999999}]],\"!\":[[{x:.20646600000000004,y:.05103000000000002},{x:.20733066238185466,y:.04225093550927423},{x:.20989142103699213,y:.03380924554357098},{x:.2140498674463855,y:.026029339514117927},{x:.21964619484660539,y:.019210194846605383},{x:.22646533951411793,y:.013613867446385479},{x:.23424524554357098,y:.009455421036992116},{x:.24268693550927425,y:.006894662381854655},{x:.251466,y:.0060300000000000215},{x:.350587,y:.0060300000000000215},{x:.3593660644907258,y:.006894662381854655},{x:.36780775445642905,y:.009455421036992116},{x:.3755876604858821,y:.013613867446385479},{x:.38240680515339465,y:.019210194846605383},{x:.3880031325536145,y:.026029339514117927},{x:.3921615789630079,y:.03380924554357098},{x:.39472233761814535,y:.04225093550927425},{x:.39558699999999997,y:.05103000000000002},{x:.39472233761814535,y:.05980906449072579},{x:.3921615789630079,y:.06825075445642906},{x:.3880031325536145,y:.07603066048588211},{x:.38240680515339465,y:.08284980515339466},{x:.3755876604858821,y:.08844613255361455},{x:.36780775445642905,y:.09260457896300792},{x:.3593660644907258,y:.09516533761814538},{x:.350587,y:.09603000000000002},{x:.251466,y:.09603000000000002},{x:.24268693550927425,y:.09516533761814538},{x:.23424524554357098,y:.09260457896300792},{x:.22646533951411793,y:.08844613255361455},{x:.21964619484660539,y:.08284980515339466},{x:.2140498674463855,y:.07603066048588211},{x:.20989142103699213,y:.06825075445642906},{x:.20733066238185466,y:.05980906449072579},{x:.20646600000000004,y:.05103000000000002}],[{x:.25602600000000003,y:.25043400000000005},{x:.25689066238185465,y:.24165493550927428},{x:.2594514210369921,y:.233213245543571},{x:.2636098674463855,y:.22543333951411795},{x:.26920619484660535,y:.2186141948466054},{x:.27602533951411795,y:.2130178674463855},{x:.283805245543571,y:.20885942103699215},{x:.2922469355092743,y:.20629866238185468},{x:.301026,y:.20543400000000006},{x:.3098050644907258,y:.20629866238185468},{x:.3182467544564291,y:.20885942103699215},{x:.32602666048588214,y:.2130178674463855},{x:.3328458051533947,y:.2186141948466054},{x:.33844213255361455,y:.22543333951411795},{x:.34260057896300794,y:.233213245543571},{x:.3451613376181454,y:.24165493550927428},{x:.346026,y:.25043400000000005},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.25043400000000005}]],'\"':[[{x:.12004,y:.476978},{x:.12090466238185463,y:.4681989355092742},{x:.1234654210369921,y:.459757245543571},{x:.12762386744638546,y:.4519773395141179},{x:.13322019484660536,y:.44515819484660535},{x:.1400393395141179,y:.4395618674463855},{x:.14781924554357095,y:.4354034210369921},{x:.15626093550927422,y:.43284266238185465},{x:.16504,y:.43197800000000003},{x:.17381906449072576,y:.43284266238185465},{x:.18226075445642903,y:.4354034210369921},{x:.19004066048588208,y:.4395618674463855},{x:.19685980515339463,y:.44515819484660535},{x:.20245613255361453,y:.4519773395141179},{x:.2066145789630079,y:.459757245543571},{x:.20917533761814536,y:.4681989355092742},{x:.21004,y:.476978},{x:.21004,y:.729004},{x:.20917533761814536,y:.7377830644907257},{x:.2066145789630079,y:.746224754456429},{x:.20245613255361453,y:.7540046604858821},{x:.19685980515339463,y:.7608238051533946},{x:.19004066048588208,y:.7664201325536145},{x:.18226075445642903,y:.7705785789630079},{x:.17381906449072576,y:.7731393376181454},{x:.16504,y:.774004},{x:.15626093550927422,y:.7731393376181454},{x:.14781924554357095,y:.7705785789630079},{x:.1400393395141179,y:.7664201325536145},{x:.13322019484660536,y:.7608238051533946},{x:.12762386744638546,y:.7540046604858821},{x:.1234654210369921,y:.746224754456429},{x:.12090466238185463,y:.7377830644907257},{x:.12004,y:.729004},{x:.12004,y:.476978}],[{x:.392013,y:.476978},{x:.3928776623818546,y:.4681989355092742},{x:.39543842103699206,y:.459757245543571},{x:.39959686744638545,y:.4519773395141179},{x:.4051931948466053,y:.44515819484660535},{x:.4120123395141179,y:.4395618674463855},{x:.419792245543571,y:.4354034210369921},{x:.42823393550927424,y:.43284266238185465},{x:.437013,y:.43197800000000003},{x:.4457920644907258,y:.43284266238185465},{x:.45423375445642905,y:.4354034210369921},{x:.4620136604858821,y:.4395618674463855},{x:.46883280515339465,y:.44515819484660535},{x:.4744291325536145,y:.4519773395141179},{x:.4785875789630079,y:.459757245543571},{x:.48114833761814535,y:.4681989355092742},{x:.48201299999999997,y:.476978},{x:.48201299999999997,y:.729004},{x:.48114833761814535,y:.7377830644907257},{x:.4785875789630079,y:.746224754456429},{x:.4744291325536145,y:.7540046604858821},{x:.46883280515339465,y:.7608238051533946},{x:.4620136604858821,y:.7664201325536145},{x:.45423375445642905,y:.7705785789630079},{x:.4457920644907258,y:.7731393376181454},{x:.437013,y:.774004},{x:.42823393550927424,y:.7731393376181454},{x:.419792245543571,y:.7705785789630079},{x:.4120123395141179,y:.7664201325536145},{x:.4051931948466053,y:.7608238051533946},{x:.39959686744638545,y:.7540046604858821},{x:.39543842103699206,y:.746224754456429},{x:.3928776623818546,y:.7377830644907257},{x:.392013,y:.729004},{x:.392013,y:.476978}]],\"#\":[[{x:-.04343582416242281,y:.17932596542766122},{x:-.043155600373289436,y:.1705088746946064},{x:-.04116063193533153,y:.16191587083690517},{x:-.037527584366828626,y:.15387717817379684},{x:-.03239607364840174,y:.1467017191561739},{x:-.025963300859175642,y:.14066524265003977},{x:-.01847647384989975,y:.13599972706223024},{x:-.010223307183879607,y:.1328844655403335},{x:-.0015209654276611437,y:.13143917583757725},{x:.007296125305393629,y:.13171939962671061},{x:.11028337660265361,y:.14517801654688708},{x:.10171449233133083,y:.05447855391336175},{x:.10174959121806887,y:.04565708110917159},{x:.10350499965956604,y:.03701195788446062},{x:.10691325829386003,y:.02887541147651351},{x:.11184338965300836,y:.02156012480075985},{x:.11810593155372849,y:.015347220221688843},{x:.1254602180228497,y:.01047545617803717},{x:.13362362795569505,y:.007132051829885598},{x:.14228244608663826,y:.005445492331330834},{x:.15110391889082841,y:.0054805912180688685},{x:.1597490421155394,y:.0072359996595660475},{x:.1678855885234865,y:.010644258293860037},{x:.17520087519924016,y:.015574389653008364},{x:.18141377977831116,y:.02183693155372849},{x:.18628554382196283,y:.029191218022849703},{x:.18962894817011441,y:.03735462795569504},{x:.19131550766866917,y:.04601344608663827},{x:.2018142041879224,y:.1571394809935999},{x:.36570083500909,y:.17855657247605955},{x:.35397849233133083,y:.05447855391336175},{x:.35401359121806886,y:.04565708110917159},{x:.35576899965956604,y:.03701195788446062},{x:.35917725829386,y:.02887541147651351},{x:.3641073896530084,y:.02156012480075985},{x:.3703699315537285,y:.015347220221688843},{x:.37772421802284967,y:.01047545617803717},{x:.38588762795569503,y:.007132051829885598},{x:.39454644608663825,y:.005445492331330834},{x:.4033679188908284,y:.0054805912180688685},{x:.4120130421155394,y:.0072359996595660475},{x:.4201495885234865,y:.010644258293860037},{x:.42746487519924015,y:.015574389653008364},{x:.4336777797783111,y:.02183693155372849},{x:.4385495438219628,y:.029191218022849703},{x:.44189294817011443,y:.03735462795569504},{x:.44357950766866916,y:.04601344608663827},{x:.45723166259435877,y:.19051803692277236},{x:.5748861253053936,y:.20589339962671058},{x:.5834791291630949,y:.20788836806466848},{x:.5915178218262032,y:.2115214156331714},{x:.5986932808438261,y:.21665292635159827},{x:.6047297573499603,y:.22308569914082438},{x:.6093952729377698,y:.23057252615010027},{x:.6125105344596665,y:.2388256928161204},{x:.6139558241624228,y:.24752803457233888},{x:.6136756003732894,y:.25634512530539366},{x:.6116806319353315,y:.2649381291630949},{x:.6080475843668286,y:.2729768218262032},{x:.6029160736484017,y:.2801522808438262},{x:.5964833008591757,y:.2861887573499603},{x:.5889964738498997,y:.29085427293776983},{x:.5807433071838796,y:.29396953445966656},{x:.5720409654276611,y:.2954148241624228},{x:.5632238746946063,y:.2951346003732895},{x:.4659139564059225,y:.28241791072205386},{x:.48521785958998953,y:.48674482074743597},{x:.6064180682130128,y:.5025833921657807},{x:.6150110746232834,y:.5045783496089273},{x:.6230497719348954,y:.5082113868918628},{x:.6302252375183169,y:.5133428884292346},{x:.6362617222552247,y:.5197756534947408},{x:.640927247422479,y:.5272624745344501},{x:.6440425195043586,y:.5355156372144642},{x:.645487820341822,y:.544217977121417},{x:.6452076078342193,y:.5530350682130128},{x:.6432126503910727,y:.5616280746232835},{x:.6395796131081373,y:.5696667719348955},{x:.6344481115707654,y:.576842237518317},{x:.6280153465052593,y:.5828787222552247},{x:.6205285254655499,y:.587544247422479},{x:.6122753627855358,y:.5906595195043587},{x:.603573022878583,y:.592104820341822},{x:.5947559317869872,y:.5918246078342193},{x:.493900150869001,y:.5786446677402959},{x:.5066445076686692,y:.7135404460866382},{x:.5066094087819312,y:.7223619188908285},{x:.5048540003404339,y:.7310070421155394},{x:.50144574170614,y:.7391435885234865},{x:.4965156103469916,y:.7464588751992401},{x:.4902530684462715,y:.7526717797783111},{x:.4828987819771503,y:.7575435438219629},{x:.47473537204430494,y:.7608869481701144},{x:.4660765539133617,y:.7625735076686692},{x:.45725508110917157,y:.7625384087819311},{x:.44860995788446056,y:.760783000340434},{x:.4404734114765135,y:.7573747417061399},{x:.43315812480075977,y:.7524446103469916},{x:.4269452202216888,y:.7461820684462716},{x:.42207345617803715,y:.7388277819771503},{x:.41873005182988554,y:.730664372044305},{x:.4170434923313308,y:.7220055539133617},{x:.40236933467780645,y:.5666833238969633},{x:.23848272425781383,y:.5452664483557571},{x:.25438050766866915,y:.7135404460866382},{x:.2543454087819311,y:.7223619188908285},{x:.25259000034043394,y:.7310070421155394},{x:.24918174170614,y:.7391435885234865},{x:.2442516103469916,y:.7464588751992401},{x:.23798906844627152,y:.7526717797783111},{x:.2306347819771503,y:.7575435438219629},{x:.22247137204430495,y:.7608869481701144},{x:.21381255391336174,y:.7625735076686692},{x:.20499108110917158,y:.7625384087819311},{x:.1963459578844606,y:.760783000340434},{x:.18820941147651346,y:.7573747417061399},{x:.1808941248007598,y:.7524446103469916},{x:.17468122022168883,y:.7461820684462716},{x:.16980945617803714,y:.7388277819771503},{x:.16646605182988555,y:.730664372044305},{x:.16477949233133082,y:.7220055539133617},{x:.14695190806661926,y:.5333051045124245},{x:.02716793178698713,y:.5176516078342193},{x:.01857492537671658,y:.5156566503910727},{x:.01053622806510461,y:.5120236131081373},{x:.0033607624816830023,y:.5068921115707654},{x:-.0026757222552247634,y:.5004593465052593},{x:-.0073412474224789775,y:.4929725254655499},{x:-.010456519504358698,y:.48471936278553585},{x:-.011901820341822023,y:.476017022878583},{x:-.011621607834219276,y:.4671999317869871},{x:-.00962665039107264,y:.45860692537671655},{x:-.005993613108137223,y:.45056822806510455},{x:-.0008621115707654614,y:.44339276248168297},{x:.005570653494740684,y:.4373562777447752},{x:.013057474534450029,y:.432690752577521},{x:.02131063721446411,y:.42957548049564126},{x:.03001297712141698,y:.42813017965817796},{x:.03883006821301287,y:.4284103921657807},{x:.13826961678760774,y:.4414052575195645},{x:.1189656704142173,y:.23707789034616855},{x:-.004366125305393629,y:.2209606003732895},{x:-.012959129163094893,y:.21896563193533158},{x:-.0209978218262032,y:.2153325843668287},{x:-.028173280843826164,y:.2102010736484018},{x:-.034209757349960276,y:.2037683008591757},{x:-.03887527293776982,y:.1962814738498998},{x:-.041990534459666565,y:.18802830718387967},{x:-.04343582416242281,y:.17932596542766122}],[{x:.2104964979994861,y:.24903935479288136},{x:.22980043297880234,y:.4533666013628972},{x:.39368704339879496,y:.4747834769041034},{x:.3743831288206537,y:.27045644627534104},{x:.2104964979994861,y:.24903935479288136}]],$:[[{x:.030517420733400163,y:.165091535964518},{x:.03086584266660257,y:.1562768767808978},{x:.032927224468652025,y:.14769956254897784},{x:.06950822446865203,y:.04228956254897785},{x:.0704003940010533,y:.04035550336969822},{x:.07109145007989037,y:.03834080913001754},{x:.07224350295250744,y:.03635998272422403},{x:.073203348392932,y:.034279214644477654},{x:.0744556913660193,y:.03255637151138059},{x:.07552651634405921,y:.03071520740954014},{x:.07704287290513265,y:.02899719639360223},{x:.07839021289928177,y:.02714366624511229},{x:.07995460247492134,y:.0256982470536212},{x:.08136404514878363,y:.02410136799351792},{x:.08318643266605391,y:.022712194567306505},{x:.08486948969354943,y:.02115713247420773},{x:.0866858072576693,y:.0200446838732511},{x:.08837970353582197,y:.01875345702162473},{x:.17373770353582196,y:-.03394954297837521},{x:.17475219432147746,y:-.03444582628601368},{x:.17568351020275566,y:-.03508468417701866},{x:.17870701554383397,y:-.03638050305696308},{x:.18166188368778688,y:-.037826008286632525},{x:.18275370138776084,y:-.03811483831561822},{x:.18379175728720304,y:-.038559730016208084},{x:.18700996854351615,y:-.03924079346911771},{x:.19019006380536974,y:-.04008205754340442},{x:.19131725047775072,y:-.0401523347177012},{x:.19242215448928965,y:-.04038616328932037},{x:.262121,y:-.048110644533924524},{x:.262121,y:-.08350199999999997},{x:.2629856623818546,y:-.09228106449072573},{x:.26554642103699205,y:-.100722754456429},{x:.26970486744638544,y:-.10850266048588206},{x:.2753011948466053,y:-.1153218051533946},{x:.2821203395141179,y:-.1209181325536145},{x:.28990024554357097,y:-.12507657896300786},{x:.29834193550927424,y:-.12763733761814533},{x:.307121,y:-.12850199999999995},{x:.3159000644907258,y:-.12763733761814533},{x:.32434175445642904,y:-.12507657896300786},{x:.3321216604858821,y:-.1209181325536145},{x:.33894080515339464,y:-.1153218051533946},{x:.3445371325536145,y:-.10850266048588206},{x:.3486955789630079,y:-.100722754456429},{x:.35125633761814534,y:-.09228106449072573},{x:.35212099999999996,y:-.08350199999999997},{x:.35212099999999996,y:-.05796857189257534},{x:.3537665284657676,y:-.05798865052825875},{x:.3565834008023822,y:-.05822276473922817},{x:.35816715833059226,y:-.05804234673933715},{x:.35976104048452195,y:-.05806179518994546},{x:.3625398346041163,y:-.05754422155704884},{x:.36534825494544937,y:-.05722429279787242},{x:.3668663832111493,y:-.05673836571308556},{x:.3684334335709129,y:-.056446489484502926},{x:.37105786033397337,y:-.05539674504422484},{x:.37374990266128777,y:-.05453506799769968},{x:.49568890266128773,y:-.0018330679976996528},{x:.4995437197067623,y:.0003036028478311586},{x:.5033988605511543,y:.0024396894158641644},{x:.5034014762743246,y:.0024419030290919073},{x:.503404473339876,y:.00244356426035406},{x:.5067683773534712,y:.005291217073469004},{x:.510132712931077,y:.008138360005776092},{x:.5101348465393426,y:.008141041387321917},{x:.510137461926978,y:.00814325539697476},{x:.5128811799638975,y:.011592456477016289},{x:.5156254207452635,y:.015041241667436683},{x:.5156269902452553,y:.015044287773311453},{x:.5156291234470946,y:.015046969478205698},{x:.5176472159618929,y:.018965167962033513},{x:.519665902312761,y:.02288306052976895},{x:.5684429023127611,y:.1458620605297689},{x:.5688122064775901,y:.14714915498994666},{x:.5693537919217377,y:.14837377040805427},{x:.5700262192706007,y:.15138021786244946},{x:.5708758841928585,y:.15434145989163614},{x:.5709869926090132,y:.15567587086110493},{x:.5712792610244494,y:.1569826137160382},{x:.5713522390683521,y:.16006247719363653},{x:.5716078682563359,y:.16313258119086366},{x:.5714565110896938,y:.16446302800441426},{x:.5714882307651191,y:.1658016809010868},{x:.5709589549987614,y:.16883660297565092},{x:.5706107247661352,y:.1718975865660398},{x:.570202718587728,y:.17317294089875004},{x:.5699726705538047,y:.1744920601570685},{x:.5455836705538047,y:.26233106015706853},{x:.5448796820390573,y:.26415145628779163},{x:.5443792359109676,y:.2660379863232085},{x:.5432925447356423,y:.2682555269445408},{x:.5424018225194911,y:.2705587850827968},{x:.5413562192793141,y:.27220686146627543},{x:.5404973453311464,y:.27395951015977},{x:.5389989139081434,y:.2759224384285429},{x:.5376759632977357,y:.2780076688235372},{x:.5363289272782685,y:.2794200908086057},{x:.5351446315541886,y:.28097150485378414},{x:.5332920437627642,y:.28260438653745124},{x:.5315877050081386,y:.28439145495451523},{x:.529991002048182,y:.2855139439563835},{x:.528526796368706,y:.2868045033815319},{x:.4553637963687061,y:.3395095033815319},{x:.4552094954443409,y:.33959910378534747},{x:.4550747122553104,y:.3397160246969866},{x:.45139660000367776,y:.341813199213456},{x:.44773515946955245,y:.3439393468807752},{x:.44756634322254935,y:.3439971230209339},{x:.4474113397164003,y:.34408550243429054},{x:.4433947629085852,y:.34542481622689836},{x:.43938888509457313,y:.34679579895012297},{x:.43921204103863115,y:.34681953052195974},{x:.439042773913178,y:.34687597206574233},{x:.35212099999999996,y:.3666493043587998},{x:.35212099999999996,y:.6320956693586206},{x:.3838005126074005,y:.6288356018928482},{x:.4577579663937751,y:.5527249728659002},{x:.46449612147708186,y:.5470313904751531},{x:.47221556762189953,y:.5427617575185425},{x:.48061965084199804,y:.5400801535961528},{x:.48938540693229315,y:.5390896312428609},{x:.49817597280212744,y:.5398282556772123},{x:.5066535319349293,y:.5422676419764202},{x:.5144922964874953,y:.5463140458930298},{x:.5213910271340998,y:.551811966393775},{x:.5270846095248467,y:.5585501214770818},{x:.5313542424814575,y:.5662695676218995},{x:.534035846403847,y:.5746736508419981},{x:.535026368757139,y:.5834394069322931},{x:.5342877443227877,y:.5922299728021274},{x:.5318483580235798,y:.6007075319349293},{x:.5278019541069703,y:.6085462964874953},{x:.5223040336062249,y:.6154450271340998},{x:.4369490336062249,y:.7032850271340998},{x:.435089451582588,y:.7048563301588934},{x:.43337550685970433,y:.706585327551969},{x:.43172842132509603,y:.7076963215886295},{x:.4302108785229181,y:.7089786095248467},{x:.4280804818333404,y:.7101569339468108},{x:.4260621594195314,y:.7115183351118896},{x:.4242299779872524,y:.7122866512623272},{x:.42249143237810044,y:.7132482424814575},{x:.4201720909726226,y:.7139883059538676},{x:.4179269538663623,y:.7149297930076584},{x:.4159800862413552,y:.7153259053130885},{x:.41408734915800194,y:.715929846403847},{x:.4116681940261354,y:.716203208702491},{x:.4092825215873294,y:.7166886008255086},{x:.35212099999999996,y:.7225709645831306},{x:.35212099999999996,y:.7597659999999999},{x:.35125633761814534,y:.7685450644907257},{x:.3486955789630079,y:.776986754456429},{x:.3445371325536145,y:.7847666604858821},{x:.33894080515339464,y:.7915858051533946},{x:.3321216604858821,y:.7971821325536145},{x:.32434175445642904,y:.8013405789630078},{x:.3159000644907258,y:.8039013376181453},{x:.307121,y:.804766},{x:.29834193550927424,y:.8039013376181453},{x:.28990024554357097,y:.8013405789630078},{x:.2821203395141179,y:.7971821325536145},{x:.2753011948466053,y:.7915858051533946},{x:.26970486744638544,y:.7847666604858821},{x:.26554642103699205,y:.776986754456429},{x:.2629856623818546,y:.7685450644907257},{x:.262121,y:.7597659999999999},{x:.262121,y:.7318326623736131},{x:.23856652158732947,y:.7342566008255086},{x:.23743405616423266,y:.7342615520061975},{x:.23631438427367413,y:.7344313675125375},{x:.2330314335362298,y:.7342808004350606},{x:.22974506326706257,y:.734295168567351},{x:.22863339192208898,y:.7340790915684273},{x:.22750210485113245,y:.7340272069677483},{x:.2243116092711877,y:.7332390610779145},{x:.22108558260167874,y:.7326120140964958},{x:.22003742624118275,y:.7321832126358507},{x:.21893799871753236,y:.7319116218242595},{x:.21596256725097532,y:.7305161851266182},{x:.21292085857685591,y:.729271820095334},{x:.21197649726195836,y:.7286467727726252},{x:.21095117966878213,y:.7281659128327016},{x:.2083051564782311,y:.7262168111769735},{x:.20556465695803808,y:.7244029483461277},{x:.204760381964467,y:.7236056753794367},{x:.20384857668186554,y:.7229340254890024},{x:.10629557668186554,y:.6350940254890024},{x:.10393291169686979,y:.6325042238563513},{x:.10146752815288923,y:.6300120075116347},{x:.10096488682836192,y:.6292508655939548},{x:.10035013880638408,y:.6285770182897039},{x:.09853811700104832,y:.6255760458964971},{x:.09660631239978806,y:.6226507443205297},{x:.09626182060918942,y:.6218061670735107},{x:.09579034588565258,y:.6210253361666956},{x:.09459860224176168,y:.6177285186990383},{x:.0932746147506803,y:.6144825495908574},{x:.056695614750680294,y:.49150554959085735},{x:.05654965816703397,y:.490750439567249},{x:.05628361804350595,y:.49002883224693095},{x:.05571374572525952,y:.48642582571377374},{x:.055021470477783566,y:.4828443224653027},{x:.055025633066628665,y:.4820752469521588},{x:.05490548343396577,y:.4813156032607913},{x:.055049472757300266,y:.47767065091379934},{x:.05506921600663437,y:.4740229090450286},{x:.05522333780201598,y:.4732694231830167},{x:.05525369594322076,y:.472500935801646},{x:.05610601347919053,y:.46895411111540136},{x:.056837016503334954,y:.46538031130067065},{x:.05713517469108906,y:.46467137112890816},{x:.05731487395982006,y:.46392357259662753},{x:.08169987395982006,y:.39365157259662753},{x:.08192222202041206,y:.3931695328553223},{x:.08205835369770847,y:.3926564352635495},{x:.08376780756696771,y:.3891683934837906},{x:.08539480756850773,y:.3856411369034641},{x:.08570692456181836,y:.38521173737536313},{x:.08594054088151196,y:.3847350567827023},{x:.08829763126802886,y:.38164753465350854},{x:.09058150254284453,y:.37850546527353984},{x:.0909713939878581,y:.378145207541698},{x:.09129351720579659,y:.37772326251599964},{x:.09420766244788897,y:.3751549117812935},{x:.09706063710369874,y:.372518777565862},{x:.09751331969083687,y:.37224150613287915},{x:.09791157079240381,y:.3718905117848512},{x:.17107757079240382,y:.3191875117848513},{x:.17123114354048857,y:.3190983419119289},{x:.17136528774468962,y:.3189819753030134},{x:.17504412834709762,y:.3168843854977816},{x:.17870637355344754,y:.314757953928811},{x:.1788743916234626,y:.3147004579868701},{x:.17902866028359976,y:.31461249756570947},{x:.183046032465951,y:.31327291855818423},{x:.1870527548771027,y:.3119018143721617},{x:.18722876142884332,y:.31187820189800686},{x:.18739722608682208,y:.3118220279342577},{x:.262121,y:.2948235482063542},{x:.262121,y:.04244038202745839},{x:.212402420161311,y:.04795051974434915},{x:.14928483997433578,y:.08692151049617265},{x:.11795277553134796,y:.17720643745102208},{x:.114257651607068,y:.18521678535552225},{x:.10907078710071823,y:.1923523337548876},{x:.10259151030645056,y:.1983388675257922},{x:.09506881619784838,y:.20294632753270694},{x:.08679179769072982,y:.20599765167145945},{x:.07807853596451803,y:.20737557926659977},{x:.06926387678089782,y:.20702715733339738},{x:.0606865625489779,y:.20496577553134793},{x:.052676214644477706,y:.20127065160706795},{x:.04554066624511235,y:.1960837871007182},{x:.039554132474207776,y:.18960451030645054},{x:.034946672467293015,y:.18208181619784836},{x:.03189534832854049,y:.1738047976907298},{x:.030517420733400163,y:.165091535964518}],[{x:.14709211773983194,y:.4797371545422716},{x:.17592903295677773,y:.5766856037244347},{x:.24922570721126042,y:.6426843927572041},{x:.262121,y:.6413573671491031},{x:.262121,y:.3871228845247169},{x:.21626819752335621,y:.3975536737173561},{x:.16206100150816494,y:.4366002507010456},{x:.14709211773983194,y:.4797371545422716}],[{x:.35212099999999996,y:.034163101195078524},{x:.35212099999999996,y:.2743499680404371},{x:.4101709471377665,y:.26114452085874473},{x:.4630938273127818,y:.2230200535785049},{x:.47920731446793274,y:.1649859973145621},{x:.44287681685863156,y:.07338773859643172},{x:.35212099999999996,y:.034163101195078524}]],\"'\":[[{x:.25602600000000003,y:.476978},{x:.25689066238185465,y:.4681989355092742},{x:.2594514210369921,y:.459757245543571},{x:.2636098674463855,y:.4519773395141179},{x:.26920619484660535,y:.44515819484660535},{x:.27602533951411795,y:.4395618674463855},{x:.283805245543571,y:.4354034210369921},{x:.2922469355092743,y:.43284266238185465},{x:.301026,y:.43197800000000003},{x:.3098050644907258,y:.43284266238185465},{x:.3182467544564291,y:.4354034210369921},{x:.32602666048588214,y:.4395618674463855},{x:.3328458051533947,y:.44515819484660535},{x:.33844213255361455,y:.4519773395141179},{x:.34260057896300794,y:.459757245543571},{x:.3451613376181454,y:.4681989355092742},{x:.346026,y:.476978},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.476978}]],\"(\":[[{x:.14398102142772873,y:.343473372436119},{x:.14438344127795402,y:.34024506484177663},{x:.14461855620935057,y:.33700027938992067},{x:.15480555620935058,y:.27783527938992064},{x:.15553530200183258,y:.27518493680242373},{x:.1560666158259812,y:.2724877993619115},{x:.1764416158259812,y:.20487079936191147},{x:.17757136816824137,y:.2021290142392397},{x:.17852197521392682,y:.19932008699588913},{x:.2090839752139268,y:.13170208699588917},{x:.21040800505224358,y:.12940389577393302},{x:.21154775445201235,y:.12700896170152925},{x:.25229575445201236,y:.05939296170152925},{x:.2531150427152032,y:.05829379345186112},{x:.2537782786760274,y:.05709399256856861},{x:.29452927867602746,y:-.0020700074314313824},{x:.29560111146026063,y:-.0033391000809501682},{x:.29650963843516415,y:-.004729783512322571},{x:.3372576384351641,y:-.05544378351232261},{x:.3386866074193021,y:-.05690267270426387},{x:.3399537097957662,y:-.05850416001284604},{x:.38070370979576623,y:-.10073716001284601},{x:.38742176905533504,y:-.10645444032360908},{x:.3951261287468799,y:-.11075123635207199},{x:.40352071464810957,y:-.11346242463653189},{x:.41228292753057777,y:-.11448381573166892},{x:.42107604046711683,y:-.11377615815049966},{x:.4295621390588101,y:-.11136664677700951},{x:.4374151072958377,y:-.10734787778201216},{x:.444333160012846,y:-.10187429020423372},{x:.4500504403236091,y:-.09515623094466494},{x:.45434723635207197,y:-.08745187125312004},{x:.4570584246365319,y:-.07905728535189037},{x:.45807981573166895,y:-.07029507246942218},{x:.4573721581504997,y:-.06150195953288313},{x:.45496264677700954,y:-.053015860941189874},{x:.45094387778201217,y:-.04516289270416226},{x:.44547029020423373,y:-.03824483998715393},{x:.4061377413616867,y:.0025191240684850026},{x:.3677075745656829,y:.050348403515145926},{x:.3286739379437331,y:.10701906379590062},{x:.2900025757951927,y:.1711891536907596},{x:.2617573982317254,y:.23368121626802973},{x:.24303344075060918,y:.2958190240226623},{x:.23462816944303005,y:.34463593546989096},{x:.24303340667749923,y:.39345182392970596},{x:.26175739639474455,y:.45558881969516635},{x:.2900026404789191,y:.5180819536434618},{x:.328674029726828,y:.5822520885061939},{x:.36770768599197223,y:.6389237351633864},{x:.4061420841180472,y:.6867582808236831},{x:.4454798975405431,y:.7275528000242046},{x:.45095135740921277,y:.7344725356602282},{x:.45496771125722263,y:.7423267393839987},{x:.45737461285859093,y:.7508135785511003},{x:.458079566334583,y:.759606908691815},{x:.4570554807184589,y:.768368807060192},{x:.4543417110461325,y:.7767625588156633},{x:.4500425459642118,y:.7844655967855365},{x:.4443231999757953,y:.791181897540543},{x:.4374034643397718,y:.7966533574092127},{x:.4295492606160011,y:.8006697112572226},{x:.42106242144889966,y:.8030766128585909},{x:.41226909130818484,y:.803781566334583},{x:.403507192939808,y:.8027574807184589},{x:.39511344118433667,y:.8000437110461325},{x:.3874104032144634,y:.7957445459642117},{x:.38069410245945684,y:.7900251999757952},{x:.33994410245945683,y:.7477661999757953},{x:.338681775527778,y:.7461697396410558},{x:.3372576384351641,y:.7447157835123226},{x:.29650963843516415,y:.6940017835123226},{x:.2956010143988682,y:.6926109515089496},{x:.29452907712829884,y:.6913417148135671},{x:.2537780771282988,y:.6321767148135672},{x:.25311493656839296,y:.6309770641401381},{x:.25229575445201236,y:.6298780382984708},{x:.21154775445201235,y:.5622620382984707},{x:.21040795156345282,y:.5598669918310725},{x:.2090838723444427,y:.5575686854051248},{x:.17852187234444272,y:.48994968540512485},{x:.17757135012625538,y:.48714095747585867},{x:.17644166886939822,y:.4843993766680373},{x:.1560666688693982,y:.4167833766680374},{x:.15553533856931018,y:.4140862136984408},{x:.15480557779123924,y:.4114358459543075},{x:.14461857779123924,y:.3522718459543075},{x:.14438345368873493,y:.3490270611669966},{x:.14398102471397584,y:.3457987547100726},{x:.14406527252602844,y:.3446360634540339},{x:.14398102142772873,y:.343473372436119}]],\")\":[[{x:.14397318426833106,y:-.07029507246942218},{x:.14499457536346808,y:-.07905728535189037},{x:.14770576364792798,y:-.08745187125312004},{x:.1520025596763909,y:-.09515623094466495},{x:.15771983998715397,y:-.10187429020423372},{x:.16463789270416226,y:-.10734787778201214},{x:.1724908609411899,y:-.11136664677700951},{x:.18097695953288315,y:-.11377615815049966},{x:.1897700724694222,y:-.11448381573166892},{x:.19853228535189038,y:-.11346242463653189},{x:.20692687125312006,y:-.11075123635207199},{x:.21463123094466496,y:-.10645444032360907},{x:.22134929020423375,y:-.10073716001284601},{x:.2620992902042337,y:-.05850416001284604},{x:.2633660586938147,y:-.05690309470300352},{x:.26479468609075496,y:-.05544462417080616},{x:.30554468609075497,y:-.004730624170806122},{x:.3064541047100432,y:-.003338648753719708},{x:.307526891803669,y:-.002068307996824087},{x:.348273891803669,y:.05709569200317591},{x:.3489362195699084,y:.058293979727073175},{x:.3497544895549002,y:.059391707275619196},{x:.39050548955490016,y:.12700770727561922},{x:.39164563057902163,y:.12940326331913213},{x:.3929700247860732,y:.13170208699588917},{x:.42353202478607316,y:.19932008699588913},{x:.4244827292530259,y:.20212930210713742},{x:.4256125601984483,y:.2048713835354543},{x:.4459865601984483,y:.27248838353545435},{x:.4465177787005257,y:.27518522990297933},{x:.4472474437906494,y:.27783527938992064},{x:.4574344437906494,y:.33700027938992067},{x:.45766955872204595,y:.3402450648417768},{x:.4580719785722712,y:.34347337243611903},{x:.45798772747397154,y:.3446360634540339},{x:.4580719752860241,y:.3457987547100726},{x:.45766954631126505,y:.34902706116699656},{x:.45743442220876074,y:.3522718459543075},{x:.44724742220876074,y:.4114358459543075},{x:.4465177421348676,y:.414085920594514},{x:.44598650715958776,y:.4167827924880124},{x:.42561250715958776,y:.4843987924880123},{x:.42448274729464536,y:.48714066960378194},{x:.42353212765555726,y:.48994968540512485},{x:.3929701276555573,y:.5575686854051248},{x:.39164568407140216,y:.5598676242877579},{x:.39050548955490016,y:.5622632927243807},{x:.3497544895549002,y:.6298792927243808},{x:.3489363257182038,y:.6309768778726063},{x:.34827409333092635,y:.6321750153799588},{x:.3075270933309263,y:.6913400153799587},{x:.3064542017711834,y:.692610500189881},{x:.30554468609075497,y:.6940026241708062},{x:.26479468609075496,y:.7447166241708062},{x:.26337089070969094,y:.7461701617493295},{x:.2621088975405431,y:.7477661999757953},{x:.2213588975405431,y:.7900251999757952},{x:.21464259678553657,y:.7957445459642117},{x:.20693955881566328,y:.8000437110461325},{x:.19854580706019195,y:.8027574807184589},{x:.1897839086918151,y:.803781566334583},{x:.1809905785511003,y:.8030766128585909},{x:.17250373938399882,y:.8006697112572226},{x:.16464953566022822,y:.7966533574092127},{x:.15772980002420467,y:.791181897540543},{x:.15201045403578817,y:.7844655967855365},{x:.14771128895386743,y:.7767625588156633},{x:.14499751928154103,y:.7683688070601918},{x:.14397343366541698,y:.759606908691815},{x:.14467838714140904,y:.7508135785511002},{x:.14708528874277732,y:.7423267393839987},{x:.1511016425907872,y:.7344725356602282},{x:.15657310245945688,y:.7275528000242046},{x:.19591129092993145,y:.6867578918874246},{x:.23434697314436972,y:.6389240958672278},{x:.27337685298529213,y:.5822523693404118},{x:.3120516621801016,y:.518081284004684},{x:.34029647741491703,y:.4555890988936643},{x:.35901954136421654,y:.39345212569273014},{x:.36742483055696995,y:.344635935469891},{x:.359019507292604,y:.29581872226323463},{x:.3402964755778617,y:.23368093707349602},{x:.3120517268674457,y:.17118982332763816},{x:.27337694476991303,y:.10701878295300266},{x:.23434708457036935,y:.05034804280413771},{x:.1959156338111051,y:.0025195128948044543},{x:.15658270979576625,y:-.03824483998715393},{x:.1511091222179878,y:-.045162892704162266},{x:.14709035322299047,y:-.053015860941189874},{x:.1446808418495003,y:-.06150195953288312},{x:.14397318426833106,y:-.07029507246942218}]],\"*\":[[{x:.03611444520266741,y:.4654782574484574},{x:.03652686631141767,y:.45666636076295464},{x:.038650478626155074,y:.4481042415682919},{x:.04240367291655979,y:.4401209373034283},{x:.04764221603086716,y:.4330232418741738},{x:.05416479369500318,y:.42708391573544136},{x:.06172074690723879,y:.42253120385992987},{x:.07001970462305517,y:.4195400644118251},{x:.0787427425515426,y:.41822544520266736},{x:.08755463923704532,y:.41863786631141764},{x:.09611675843170807,y:.42076147862615504},{x:.25602600000000003,y:.47756000598755177},{x:.25602600000000003,y:.31805799999999995},{x:.25689066238185465,y:.30927893550927416},{x:.2594514210369921,y:.30083724554357094},{x:.2636098674463855,y:.29305733951411783},{x:.26920619484660535,y:.2862381948466053},{x:.27602533951411795,y:.2806418674463854},{x:.283805245543571,y:.276483421036992},{x:.2922469355092743,y:.2739226623818546},{x:.301026,y:.27305799999999997},{x:.3098050644907258,y:.2739226623818546},{x:.3182467544564291,y:.276483421036992},{x:.32602666048588214,y:.2806418674463854},{x:.3328458051533947,y:.2862381948466053},{x:.33844213255361455,y:.29305733951411783},{x:.34260057896300794,y:.30083724554357094},{x:.3451613376181454,y:.30927893550927416},{x:.346026,y:.31805799999999995},{x:.346026,y:.47756000598755177},{x:.505935241568292,y:.42076147862615504},{x:.5144973607629547,y:.41863786631141764},{x:.5233092574484575,y:.41822544520266736},{x:.5320322953769449,y:.4195400644118251},{x:.5403312530927612,y:.42253120385992987},{x:.5478872063049969,y:.42708391573544136},{x:.5544097839691329,y:.4330232418741738},{x:.5596483270834403,y:.4401209373034283},{x:.5634015213738449,y:.4481042415682919},{x:.5655251336885824,y:.45666636076295464},{x:.5659375547973327,y:.4654782574484574},{x:.5646229355881749,y:.4742012953769448},{x:.5616317961400701,y:.4825002530927612},{x:.5570790842645587,y:.4900562063049968},{x:.5511397581258262,y:.4965787839691328},{x:.5440420626965717,y:.5018173270834402},{x:.5360587584317081,y:.5055705213738448},{x:.37146215609131306,y:.5640339630732496},{x:.47696549129035026,y:.7165911114148321},{x:.48124783600971727,y:.7243035129909579},{x:.48394328176908086,y:.732703166943666},{x:.4849482440995321,y:.7414672792821342},{x:.48422410286230105,y:.7502590500841659},{x:.48179868639903156,y:.758740616528321},{x:.47776520210421775,y:.7665860367726678},{x:.4722786545173053,y:.7734938157169785},{x:.4655498885851679,y:.7791984912903502},{x:.45783748700904214,y:.7834808360097172},{x:.449437833056334,y:.7861762817690807},{x:.4406737207178658,y:.7871812440995319},{x:.431881949915834,y:.786457102862301},{x:.4234003834716789,y:.7840316863990314},{x:.4155549632273321,y:.7799982021042177},{x:.40864718428302144,y:.7745116545173052},{x:.40294250870964976,y:.7677828885851677},{x:.301026,y:.6204122684209616},{x:.19910949129035027,y:.7677828885851677},{x:.19340481571697854,y:.7745116545173052},{x:.18649703677266788,y:.7799982021042177},{x:.17865161652832107,y:.7840316863990314},{x:.17017005008416597,y:.786457102862301},{x:.1613782792821342,y:.7871812440995319},{x:.15261416694366597,y:.7861762817690807},{x:.14421451299095783,y:.7834808360097172},{x:.13650211141483212,y:.7791984912903502},{x:.12977334548269473,y:.7734938157169785},{x:.12428679789578226,y:.7665860367726678},{x:.12025331360096844,y:.758740616528321},{x:.11782789713769894,y:.7502590500841659},{x:.11710375590046794,y:.7414672792821342},{x:.11810871823091917,y:.732703166943666},{x:.12080416399028275,y:.7243035129909579},{x:.1250865087096497,y:.7165911114148321},{x:.23058984390868703,y:.5640339630732496},{x:.06599324156829194,y:.5055705213738448},{x:.058009937303428294,y:.5018173270834402},{x:.05091224187417384,y:.4965787839691328},{x:.04497291573544139,y:.4900562063049968},{x:.04042020385992993,y:.4825002530927612},{x:.03742906441182516,y:.4742012953769448},{x:.03611444520266741,y:.4654782574484574}]],\"+\":[[{x:-.002030999999999998,y:.33155},{x:-.0011663376181453647,y:.3227709355092742},{x:.0013944210369920967,y:.314329245543571},{x:.005552867446385459,y:.3065493395141179},{x:.011149194846605363,y:.29973019484660535},{x:.017968339514117915,y:.2941338674463855},{x:.025748245543570962,y:.2899754210369921},{x:.03418993550927423,y:.28741466238185465},{x:.042969,y:.28655},{x:.256023,y:.28655},{x:.256023,y:.09133899999999995},{x:.2568876623818546,y:.08255993550927418},{x:.25944842103699206,y:.07411824554357091},{x:.26360686744638545,y:.06633833951411786},{x:.2692031948466054,y:.05951919484660531},{x:.2760223395141179,y:.053922867446385414},{x:.2838022455435709,y:.049764421036992045},{x:.2922439355092742,y:.04720366238185458},{x:.301023,y:.04633899999999995},{x:.3098020644907258,y:.04720366238185458},{x:.31824375445642905,y:.049764421036992045},{x:.3260236604858821,y:.053922867446385414},{x:.3328428051533946,y:.05951919484660531},{x:.3384391325536145,y:.06633833951411786},{x:.3425975789630079,y:.07411824554357091},{x:.34515833761814535,y:.08255993550927418},{x:.34602299999999997,y:.09133899999999995},{x:.34602299999999997,y:.28655},{x:.559083,y:.28655},{x:.5678620644907257,y:.28741466238185465},{x:.576303754456429,y:.2899754210369921},{x:.5840836604858821,y:.2941338674463855},{x:.5909028051533947,y:.29973019484660535},{x:.5964991325536145,y:.3065493395141179},{x:.6006575789630079,y:.314329245543571},{x:.6032183376181454,y:.3227709355092742},{x:.604083,y:.33155},{x:.6032183376181454,y:.3403290644907258},{x:.6006575789630079,y:.348770754456429},{x:.5964991325536145,y:.35655066048588213},{x:.5909028051533947,y:.3633698051533947},{x:.5840836604858821,y:.36896613255361455},{x:.576303754456429,y:.37312457896300794},{x:.5678620644907257,y:.3756853376181454},{x:.559083,y:.37655},{x:.34602299999999997,y:.37655},{x:.34602299999999997,y:.571777},{x:.34515833761814535,y:.5805560644907257},{x:.3425975789630079,y:.588997754456429},{x:.3384391325536145,y:.5967776604858821},{x:.3328428051533946,y:.6035968051533946},{x:.3260236604858821,y:.6091931325536145},{x:.31824375445642905,y:.6133515789630078},{x:.3098020644907258,y:.6159123376181453},{x:.301023,y:.616777},{x:.2922439355092742,y:.6159123376181453},{x:.2838022455435709,y:.6133515789630078},{x:.2760223395141179,y:.6091931325536145},{x:.2692031948466054,y:.6035968051533946},{x:.26360686744638545,y:.5967776604858821},{x:.25944842103699206,y:.588997754456429},{x:.2568876623818546,y:.5805560644907257},{x:.256023,y:.571777},{x:.256023,y:.37655},{x:.042969,y:.37655},{x:.03418993550927421,y:.3756853376181454},{x:.025748245543570934,y:.37312457896300794},{x:.017968339514117904,y:.36896613255361455},{x:.011149194846605356,y:.3633698051533947},{x:.005552867446385459,y:.35655066048588213},{x:.0013944210369920967,y:.348770754456429},{x:-.0011663376181453647,y:.3403290644907258},{x:-.002030999999999998,y:.33155}]],\",\":[[{x:.1703425796668749,y:-.03158948169003215},{x:.1707557440557006,y:-.035050650253961146},{x:.17102563140319493,y:-.03852592771911176},{x:.17127771326913271,y:-.039423300660751795},{x:.17138819577001116,y:-.0403488367651378},{x:.1724686618106471,y:-.0436628955719719},{x:.1734113563482083,y:-.04701874414557815},{x:.1738336633079298,y:-.04784969558537063},{x:.17412258605517572,y:-.048735893706360625},{x:.1758288320436127,y:-.05177548533469908},{x:.17740810654883146,y:-.054882941638058576},{x:.177984409582707,y:-.05561553857817519},{x:.17844066943717352,y:-.05642834261896521},{x:.18070712529694977,y:-.05907665726715373},{x:.18286228913625774,y:-.06181630349720979},{x:.26855428913625773,y:-.1511263034972098},{x:.27525630293239317,y:-.15686238451505874},{x:.2829485933055849,y:-.16118075031492074},{x:.2913355498506774,y:-.16391544852087458},{x:.3000948665311021,y:-.16496138621450188},{x:.3088899277191117,y:-.1642783685968051},{x:.3173827441455781,y:-.16189264365179173},{x:.3252469416380585,y:-.15789589345116858},{x:.33218030349720973,y:-.1524417108637423},{x:.3379163845150587,y:-.14573969706760687},{x:.3422347503149207,y:-.13804740669441512},{x:.3449694485208745,y:-.12966045014932262},{x:.3460153862145018,y:-.12090113346889794},{x:.34533236859680505,y:-.11210607228088836},{x:.34294664365179167,y:-.10361325585442197},{x:.33894989345116855,y:-.09574905836194152},{x:.33349571086374225,y:-.08881569650279031},{x:.277697993368333,y:-.03066214483501502},{x:.41918956700521515,y:.11679250439324337},{x:.42464400414059766,y:.12372566600271688},{x:.42864104306488354,y:.1315897167531037},{x:.43102707981377775,y:.14008244558427704},{x:.4317104203331251,y:.14887748169003212},{x:.4306648042299889,y:.15763683676513773},{x:.4279304139448243,y:.1660238937063606},{x:.4236123305628265,y:.17371634261896518},{x:.41787649560675666,y:.1804185670052151},{x:.41094333399728317,y:.18587300414059763},{x:.4030792832468963,y:.18987004306488353},{x:.39458655441572293,y:.19225607981377774},{x:.3857915183099679,y:.19293942033312508},{x:.37703216323486227,y:.19189380422998883},{x:.36864510629363945,y:.18915941394482427},{x:.3609526573810348,y:.18484133056282648},{x:.35425043299478487,y:.17910549560675662},{x:.18286343299478489,y:.000495495606756581},{x:.18070816857348473,y:-.0022440714967103576},{x:.1784416154849413,y:-.004892302932393237},{x:.17798532578947307,y:-.005705090221499034},{x:.17740899585940237,y:-.006437666002716908},{x:.1758296072680145,y:-.009545064322455634},{x:.1741232496850793,y:-.012584593305585},{x:.17383429440212667,y:-.013470780818460306},{x:.1734119569351165,y:-.014301716753103766},{x:.1724691391914766,y:-.01765753071433596},{x:.17138855147912546,y:-.02097154985067746},{x:.17127803499816427,y:-.02189708189818214},{x:.17102592018622226,y:-.022794445584277102},{x:.17075590524748027,y:-.02626971313843455},{x:.17034261378549817,y:-.029730866531102167},{x:.17041478319291342,y:-.03066017543569507},{x:.1703425796668749,y:-.03158948169003215}]],\"-\":[[{x:.12882900000000003,y:.31396500000000005},{x:.12969366238185465,y:.30518593550927425},{x:.13225442103699211,y:.29674424554357104},{x:.13641286744638548,y:.28896433951411793},{x:.14200919484660537,y:.2821451948466054},{x:.14882833951411792,y:.2765488674463855},{x:.15660824554357097,y:.2723904210369921},{x:.16504993550927424,y:.2698296623818547},{x:.173829,y:.26896500000000007},{x:.428224,y:.26896500000000007},{x:.4370030644907258,y:.2698296623818547},{x:.44544475445642906,y:.2723904210369921},{x:.4532246604858821,y:.2765488674463855},{x:.4600438051533946,y:.2821451948466054},{x:.4656401325536145,y:.28896433951411793},{x:.4697985789630079,y:.29674424554357104},{x:.47235933761814536,y:.30518593550927425},{x:.473224,y:.31396500000000005},{x:.47235933761814536,y:.32274406449072585},{x:.4697985789630079,y:.33118575445642906},{x:.4656401325536145,y:.33896566048588217},{x:.4600438051533946,y:.3457848051533947},{x:.4532246604858821,y:.3513811325536146},{x:.44544475445642906,y:.355539578963008},{x:.4370030644907258,y:.3581003376181454},{x:.428224,y:.35896500000000003},{x:.173829,y:.35896500000000003},{x:.16504993550927424,y:.3581003376181454},{x:.15660824554357097,y:.355539578963008},{x:.14882833951411792,y:.3513811325536146},{x:.14200919484660537,y:.3457848051533947},{x:.13641286744638548,y:.33896566048588217},{x:.13225442103699211,y:.33118575445642906},{x:.12969366238185465,y:.32274406449072585},{x:.12882900000000003,y:.31396500000000005}]],\".\":[[{x:.19450299999999998,y:.148926},{x:.19536766238185463,y:.14014693550927423},{x:.1979284210369921,y:.13170524554357096},{x:.20208686744638546,y:.12392533951411791},{x:.20768319484660536,y:.11710619484660537},{x:.2145023395141179,y:.11150986744638547},{x:.22228224554357093,y:.1073514210369921},{x:.2307239355092742,y:.10479066238185464},{x:.239503,y:.103926},{x:.362549,y:.103926},{x:.3713280644907258,y:.10479066238185464},{x:.3797697544564291,y:.1073514210369921},{x:.38754966048588213,y:.11150986744638547},{x:.3943688051533947,y:.11710619484660537},{x:.39996513255361454,y:.12392533951411791},{x:.40412357896300793,y:.13170524554357096},{x:.4066843376181454,y:.14014693550927423},{x:.407549,y:.148926},{x:.4066843376181454,y:.1577050644907258},{x:.40412357896300793,y:.16614675445642904},{x:.39996513255361454,y:.1739266604858821},{x:.3943688051533947,y:.18074580515339464},{x:.38754966048588213,y:.18634213255361454},{x:.3797697544564291,y:.1905005789630079},{x:.3713280644907258,y:.19306133761814537},{x:.362549,y:.193926},{x:.239503,y:.193926},{x:.2307239355092742,y:.19306133761814537},{x:.22228224554357093,y:.1905005789630079},{x:.2145023395141179,y:.18634213255361454},{x:.20768319484660536,y:.18074580515339464},{x:.20208686744638546,y:.1739266604858821},{x:.1979284210369921,y:.16614675445642904},{x:.19536766238185463,y:.1577050644907258},{x:.19450299999999998,y:.148926}]],\"/\":[[{x:.017522651058219416,y:-.036644753012328966},{x:.01865919532569161,y:-.04539277458837648},{x:.02148055556003016,y:-.053750976595687026},{x:.02587830846966649,y:-.06139815801845333},{x:.031683450876571484,y:-.06804044196318723},{x:.038672894413609195,y:-.07342256918292836},{x:.04657803868537635,y:-.0773377075469538},{x:.0550950934307649,y:-.07963540048356893},{x:.0638967530123289,y:-.08022734894178067},{x:.07264477458837641,y:-.07909080467430848},{x:.08100297659568695,y:-.07626944443996993},{x:.08865015801845323,y:-.0718716915303336},{x:.09529244196318715,y:-.0660665491234286},{x:.10067456918292828,y:-.059077105586390885},{x:.5777245691829282,y:.7051758944136092},{x:.5816397075469537,y:.7130810386853763},{x:.5839374004835688,y:.7215980934307649},{x:.5845293489417805,y:.7303997530123288},{x:.5833928046743084,y:.7391477745883763},{x:.5805714444399699,y:.747505976595687},{x:.5761736915303335,y:.7551531580184532},{x:.5703685491234285,y:.7617954419631872},{x:.5633791055863908,y:.7671775691829282},{x:.5554739613146237,y:.7710927075469537},{x:.5469569065692351,y:.7733904004835688},{x:.5381552469876711,y:.7739823489417805},{x:.5294072254116237,y:.7728458046743084},{x:.521049023404313,y:.7700244444399699},{x:.5134018419815468,y:.7656266915303335},{x:.5067595580368128,y:.7598215491234285},{x:.5013774308170718,y:.7528321055863908},{x:.024327430817071727,y:-.011420894413609283},{x:.020412292453046287,y:-.019326038685376436},{x:.018114599516431164,y:-.027843093430764996},{x:.017522651058219416,y:-.036644753012328966}]],\"<\":[[{x:-.002019645490236678,y:.32959917016575135},{x:-.0016099914284145765,y:.3262199732716625},{x:-.0013526191024594778,y:.3228257800560043},{x:-.001080072865731869,y:.3218487260950263},{x:-.0009579981642362373,y:.3208417436418168},{x:.00010303311987996846,y:.3176073966113462},{x:.0010176343561875828,y:.3143286327165328},{x:.0014755574652736251,y:.31342352370653337},{x:.001791739066671412,y:.3124597057316259},{x:.003463372735866293,y:.309494502707312},{x:.00500005526992945,y:.3064571691910689},{x:.005625757523098081,y:.30565878796371126},{x:.0061238953427729045,y:.3047751734513664},{x:.008341891452602095,y:.3021930655225286},{x:.010441601436418424,y:.2995138854085287},{x:.011211037446978121,y:.298852913306643},{x:.011871988327878901,y:.29808345906703315},{x:.014551110531708777,y:.29598367519331337},{x:.017133157288130564,y:.2937656078708368},{x:.01801675806170013,y:.2932674456816211},{x:.018815122032139454,y:.29264172140965955},{x:.021852413166145952,y:.29110495510775264},{x:.024817570086352318,y:.28943323966009543},{x:.5409315700863523,y:.06192123966009548},{x:.5493135321567164,y:.059171271257023414},{x:.5580709293975171,y:.05810938240515066},{x:.5668672199439956,y:.058776380897540545},{x:.5753643672834672,y:.061146634356187606},{x:.583235830808931,y:.06512905526992949},{x:.5901791145914712,y:.07057060143641844},{x:.5959273921291632,y:.07726215728813057},{x:.6002597603399046,y:.08494657008635234},{x:.6030097287429766,y:.09332853215671641},{x:.6040716175948494,y:.10208592939751719},{x:.6034046191024595,y:.11088221994399564},{x:.6010343656438124,y:.11937936728346718},{x:.5970519447300705,y:.12725083080893104},{x:.5916103985635816,y:.13419411459147126},{x:.5849188427118694,y:.1399423921291632},{x:.5772344299136477,y:.14427476033990455},{x:.15453394878652635,y:.33060846154195217},{x:.577233294268374,y:.5169277390666714},{x:.5849178265486336,y:.521259895342773},{x:.5916095409329668,y:.527007988327879},{x:.5970512785903404,y:.5339511220321395},{x:.6010339165943431,y:.5418224757210541},{x:.6034044043999703,y:.5503195576866639},{x:.6040716454902366,y:.5591158298342486},{x:.6030099981642363,y:.5678732563581832},{x:.6002602609333286,y:.5762552942683741},{x:.5959281046572271,y:.5839398265486336},{x:.5901800116721211,y:.5906315409329669},{x:.5832368779678606,y:.5960732785903404},{x:.5753655242789459,y:.6000559165943432},{x:.5668684423133362,y:.6024264043999704},{x:.5580721701657515,y:.6030936454902367},{x:.5493147436418169,y:.6020319981642364},{x:.540932705731626,y:.5992822609333287},{x:.024818705731625975,y:.37178726093332853},{x:.02185350270731245,y:.3701156272641339},{x:.018816169191068974,y:.3685789447300705},{x:.01801778796371134,y:.36795324247690187},{x:.01713417345136639,y:.367455104657227},{x:.01455206552252819,y:.3652371085473975},{x:.011872885408528756,y:.3631373985635815},{x:.011211913306643135,y:.3623679625530219},{x:.010442459067033207,y:.36170701167212105},{x:.008342675193313383,y:.3590278894682912},{x:.006124607870836803,y:.3564458427118694},{x:.005626445681621026,y:.3555622419382997},{x:.005000721409659611,y:.3547638779678605},{x:.0034639551077528313,y:.3517265868338544},{x:.0017922396600954515,y:.3487614299136476},{x:.0014760314771086122,y:.3477976206592673},{x:.0010180834056568513,y:.3468925242789459},{x:.00010339174271701993,y:.34361378560971106},{x:-.0009577287429766018,y:.3403794678432836},{x:-.0010798312165939596,y:.33937248875722786},{x:-.0013524043999703778,y:.33839544231333624},{x:-.001609870336301571,y:.33500125619719334},{x:-.0020196175948493655,y:.3316220706024828},{x:-.001942922029511974,y:.3306106193263084},{x:-.002019645490236678,y:.32959917016575135}]],\"=\":[[{x:-.002030999999999998,y:.19162999999999997},{x:-.0011663376181453647,y:.1828509355092742},{x:.0013944210369920967,y:.17440924554357093},{x:.005552867446385459,y:.16662933951411787},{x:.011149194846605363,y:.15981019484660533},{x:.017968339514117915,y:.15421386744638543},{x:.025748245543570962,y:.15005542103699207},{x:.03418993550927423,y:.1474946623818546},{x:.042969,y:.14662999999999998},{x:.559083,y:.14662999999999998},{x:.5678620644907257,y:.1474946623818546},{x:.576303754456429,y:.15005542103699207},{x:.5840836604858821,y:.15421386744638543},{x:.5909028051533947,y:.15981019484660533},{x:.5964991325536145,y:.16662933951411787},{x:.6006575789630079,y:.17440924554357093},{x:.6032183376181454,y:.1828509355092742},{x:.604083,y:.19162999999999997},{x:.6032183376181454,y:.20040906449072574},{x:.6006575789630079,y:.208850754456429},{x:.5964991325536145,y:.21663066048588206},{x:.5909028051533947,y:.2234498051533946},{x:.5840836604858821,y:.2290461325536145},{x:.576303754456429,y:.23320457896300786},{x:.5678620644907257,y:.23576533761814533},{x:.559083,y:.23662999999999995},{x:.042969,y:.23662999999999995},{x:.03418993550927421,y:.23576533761814533},{x:.025748245543570934,y:.23320457896300786},{x:.017968339514117904,y:.2290461325536145},{x:.011149194846605356,y:.2234498051533946},{x:.005552867446385459,y:.21663066048588206},{x:.0013944210369920967,y:.208850754456429},{x:-.0011663376181453647,y:.20040906449072574},{x:-.002030999999999998,y:.19162999999999997}],[{x:-.002030999999999998,y:.454102},{x:-.0011663376181453647,y:.4453229355092742},{x:.0013944210369920967,y:.436881245543571},{x:.005552867446385459,y:.4291013395141179},{x:.011149194846605363,y:.42228219484660534},{x:.017968339514117915,y:.41668586744638547},{x:.025748245543570962,y:.4125274210369921},{x:.03418993550927423,y:.40996666238185464},{x:.042969,y:.409102},{x:.559083,y:.409102},{x:.5678620644907257,y:.40996666238185464},{x:.576303754456429,y:.4125274210369921},{x:.5840836604858821,y:.41668586744638547},{x:.5909028051533947,y:.42228219484660534},{x:.5964991325536145,y:.4291013395141179},{x:.6006575789630079,y:.436881245543571},{x:.6032183376181454,y:.4453229355092742},{x:.604083,y:.454102},{x:.6032183376181454,y:.4628810644907258},{x:.6006575789630079,y:.471322754456429},{x:.5964991325536145,y:.4791026604858821},{x:.5909028051533947,y:.48592180515339467},{x:.5840836604858821,y:.49151813255361454},{x:.576303754456429,y:.49567657896300793},{x:.5678620644907257,y:.49823733761814537},{x:.559083,y:.499102},{x:.042969,y:.499102},{x:.03418993550927421,y:.49823733761814537},{x:.025748245543570934,y:.49567657896300793},{x:.017968339514117904,y:.49151813255361454},{x:.011149194846605356,y:.48592180515339467},{x:.005552867446385459,y:.4791026604858821},{x:.0013944210369920967,y:.471322754456429},{x:-.0011663376181453647,y:.4628810644907258},{x:-.002030999999999998,y:.454102}]],\">\":[[{x:-.002019645490236678,y:.5591158298342487},{x:-.0013524043999703708,y:.5503195576866637},{x:.0010180834056568513,y:.5418224757210541},{x:.005000721409659611,y:.5339511220321396},{x:.01044245906703322,y:.527007988327879},{x:.01713417345136643,y:.521259895342773},{x:.024818705731625975,y:.5169277390666714},{x:.44751805121347366,y:.33060846154195217},{x:.024817570086352318,y:.14427476033990455},{x:.017133157288130554,y:.1399423921291632},{x:.01044160143641841,y:.13419411459147126},{x:.00500005526992945,y:.12725083080893107},{x:.0010176343561875828,y:.11937936728346718},{x:-.0013526191024594778,y:.11088221994399562},{x:-.0020196175948493655,y:.10208592939751718},{x:-.0009577287429766018,y:.0933285321567164},{x:.0017922396600954585,y:.08494657008635234},{x:.00612460787083681,y:.07726215728813059},{x:.011872885408528759,y:.07057060143641844},{x:.018816169191068984,y:.06512905526992947},{x:.02668763271653284,y:.061146634356187606},{x:.03518478005600438,y:.058776380897540545},{x:.04398107060248284,y:.05810938240515066},{x:.052738467843283614,y:.05917127125702342},{x:.06112042991364768,y:.06192123966009548},{x:.5772344299136477,y:.28943323966009543},{x:.5801995868338548,y:.29110495510775297},{x:.5832368779678606,y:.2926417214096596},{x:.5840352419382998,y:.29326744568162105},{x:.5849188427118694,y:.2937656078708368},{x:.5875008894682915,y:.29598367519331353},{x:.5901800116721211,y:.29808345906703315},{x:.5908409625530218,y:.2988529133066429},{x:.5916103985635817,y:.29951388540852875},{x:.5937101085473976,y:.3021930655225282},{x:.5959281046572271,y:.3047751734513664},{x:.5964262424769022,y:.30565878796371176},{x:.5970519447300705,y:.30645716919106897},{x:.5985886272641329,y:.3094945027073105},{x:.6002602609333286,y:.31245970573162596},{x:.6005764425347265,y:.31342352370653376},{x:.6010343656438124,y:.31432863271653283},{x:.6019489668801197,y:.31760739661134507},{x:.6030099981642363,y:.32084174364181683},{x:.6031320728657319,y:.3218487260950267},{x:.6034046191024595,y:.3228257800560044},{x:.6036619914284146,y:.3262199732716634},{x:.6040716454902366,y:.32959917016575135},{x:.603994922029512,y:.330610619326308},{x:.6040716175948494,y:.33162207060248283},{x:.6036618703363014,y:.3350012561971954},{x:.6034044043999703,y:.33839544231333624},{x:.6031318312165941,y:.33937248875722736},{x:.6030097287429766,y:.3403794678432836},{x:.6019486082572825,y:.3436137856097129},{x:.6010339165943431,y:.3468925242789459},{x:.6005759685228916,y:.3477976206592668},{x:.6002597603399046,y:.34876142991364767},{x:.5985880448922466,y:.3517265868338553},{x:.5970512785903404,y:.3547638779678605},{x:.596425554318379,y:.35556224193829966},{x:.5959273921291631,y:.35644584271186947},{x:.5937093248066866,y:.3590278894682911},{x:.5916095409329668,y:.36170701167212105},{x:.5908400866933569,y:.3623679625530219},{x:.5901791145914712,y:.36313739856358157},{x:.5874999344774714,y:.3652371085473978},{x:.5849178265486336,y:.367455104657227},{x:.5840342120362888,y:.36795324247690175},{x:.583235830808931,y:.3685789447300705},{x:.5801984972926872,y:.37011562726413405},{x:.577233294268374,y:.37178726093332853},{x:.06111929426837402,y:.5992822609333287},{x:.05273725635818315,y:.6020319981642364},{x:.04397982983424857,y:.6030936454902367},{x:.035183557686663716,y:.6024264043999704},{x:.02668647572105406,y:.6000559165943432},{x:.018815122032139416,y:.5960732785903404},{x:.011871988327878898,y:.5906315409329669},{x:.006123895342772898,y:.5839398265486336},{x:.001791739066671405,y:.5762552942683741},{x:-.0009579981642362442,y:.5678732563581832},{x:-.002019645490236678,y:.5591158298342487}]],A:[[{x:-.026930267425517032,y:.05053409251215203},{x:-.025968910797820398,y:.041765089843587025},{x:-.02331527881378681,y:.03335213247651147},{x:-.019071349062388714,y:.025618525644501258},{x:-.013400213383949137,y:.018861467521053887},{x:-.006519810342180955,y:.013340628060451547},{x:.0013054500325951415,y:.009268170027042777},{x:.009774847372633092,y:.006800595699190677},{x:.018562907487847988,y:.006032732574482988},{x:.02733191015641301,y:.006994089202179622},{x:.035744867523488544,y:.00964772118621321},{x:.043478474355498745,y:.013891650937611293},{x:.05023553247894613,y:.019562786616050876},{x:.055756371939548466,y:.02644318965781906},{x:.05982882997295724,y:.03426845003259516},{x:.15465984441872488,y:.2705423452957767},{x:.155303,y:.27047899999999997},{x:.433548,y:.27047899999999997},{x:.439584057854266,y:.2710734998088117},{x:.5426964027293978,y:.03313672871631684},{x:.5469805748198717,y:.025425342079263714},{x:.5526868446471364,y:.018697928086846893},{x:.559595923461843,y:.013213017486017727},{x:.5674422992397985,y:.009181392315192764},{x:.5759244401601543,y:.006757985668725375},{x:.5847163823041805,y:.006035927704977205},{x:.5934802562658602,y:.007042966706560308},{x:.6018792712836831,y:.009740402729397836},{x:.6095906579207363,y:.01402457481987169},{x:.6163180719131531,y:.019730844647136342},{x:.6218029825139822,y:.026639923461843008},{x:.6258346076848073,y:.03448629923979854},{x:.6282580143312746,y:.042968440160154345},{x:.6289800722950228,y:.05176038230418057},{x:.6279730332934397,y:.060524256265860256},{x:.6252755972706022,y:.0689232712836832},{x:.3314685972706022,y:.7468972712836831},{x:.3293831787279993,y:.7506509647260751},{x:.32731734906238874,y:.7544154743554987},{x:.32724162770964893,y:.7545056950115825},{x:.32718442518012836,y:.7546086579207363},{x:.324406768107635,y:.7578833802211685},{x:.32164621338394916,y:.7611725324789461},{x:.3215543458189217,y:.761246247067332},{x:.32147815535286367,y:.7613360719131531},{x:.3181150035540548,y:.764005977330098},{x:.314765810342181,y:.7666933719395485},{x:.31466132698386995,y:.7667477476499444},{x:.314569076538157,y:.7668209825139822},{x:.31074967405057474,y:.7687834680795742},{x:.3069405499674049,y:.7707658299729572},{x:.30682746605267575,y:.7707987771773066},{x:.30672270076020147,y:.7708526076848072},{x:.3025938250794972,y:.7720322561793334},{x:.29847115262736695,y:.7732334043008093},{x:.2983538139076442,y:.7732436568565263},{x:.29824055983984565,y:.7732760143312747},{x:.29396088134293,y:.7736274925246428},{x:.289683092512152,y:.774001267425517},{x:.28956600824863027,y:.7739884313326351},{x:.2894486176958195,y:.7739980722950228},{x:.2851826020272766,y:.773507873077374},{x:.280914089843587,y:.7730399107978204},{x:.2808017595188513,y:.7730044793401902},{x:.28068474373413976,y:.7729910332934397},{x:.2765963314836881,y:.7716779947458032},{x:.2725011324765115,y:.7703862788137869},{x:.27239787288194656,y:.7703296136024552},{x:.27228572871631684,y:.7702935972706022},{x:.26853203527393116,y:.7682081787280027},{x:.2647675256445013,y:.7661423490623888},{x:.26467730498841713,y:.7660666277096486},{x:.2645743420792637,y:.7660094251801283},{x:.2612996197788366,y:.7632317681076393},{x:.2580104675210539,y:.7604712133839491},{x:.2579367529326681,y:.7603793458189217},{x:.2578469280868469,y:.7603031553528636},{x:.25517702266989234,y:.7569400035540427},{x:.25248962806045155,y:.7535908103421809},{x:.2524352523500559,y:.7534863269838704},{x:.2523620174860177,y:.753394076538157},{x:.2503995319204231,y:.7495746740505695},{x:.24841717002704278,y:.7457655499674049},{x:-.023694829972957243,y:.06779154996740488},{x:-.026162404300809343,y:.05932215262736691},{x:-.026930267425517032,y:.05053409251215203}],[{x:.19075686729109992,y:.36047899999999994},{x:.2917712201653896,y:.6121588409316518},{x:.4008392655839541,y:.36047899999999994},{x:.19075686729109992,y:.36047899999999994}]],B:[[{x:.018964999999999996,y:.05103000000000002},{x:.018993157630992935,y:.05074411077481729},{x:.01896863696544404,y:.050457886669927884},{x:.019425235762019696,y:.046357147889743},{x:.01982966238185463,y:.04225093550927423},{x:.019913053192865363,y:.04197603284668677},{x:.019944843237820968,y:.04169052471317667},{x:.02119268306568244,y:.037757658485048945},{x:.02239042103699209,y:.03380924554357098},{x:.0225258403659196,y:.03355589379873479},{x:.022612719447780122,y:.03328207355405998},{x:.02460384652213923,y:.029668217721559587},{x:.026548867446385453,y:.026029339514117924},{x:.02673111120436309,y:.02580727485250577},{x:.026869740608734982,y:.025555665255108946},{x:.029527637032761178,y:.022399698271204867},{x:.03214519484660536,y:.019210194846605383},{x:.03236725950821749,y:.019027951088627763},{x:.03255231178483501,y:.01880822135423258},{x:.03577483608951879,y:.016231425260229353},{x:.03896433951411791,y:.013613867446385479},{x:.03921769125895406,y:.013478448117457993},{x:.03944205495260531,y:.013299042336531411},{x:.04310536733612953,y:.011400441961238211},{x:.046744245543570956,y:.009455421036992116},{x:.04701914820615845,y:.009372030225981372},{x:.047274201145921,y:.009239842862072495},{x:.051237522567796415,y:.008092400353164256},{x:.055185935509274225,y:.006894662381854655},{x:.05547182473445692,y:.006866504750861718},{x:.05574776537889109,y:.006786615690234012},{x:.05985878761953148,y:.006434426619834929},{x:.063965,y:.0060300000000000215},{x:.06425088922518268,y:.006058157630992957},{x:.06453711333007213,y:.00603363696544406},{x:.4241221133300721,y:.01060563696544408},{x:.4260098351414485,y:.010815826288282449},{x:.4279092214657345,y:.010813640036582327},{x:.43038314701987823,y:.011302774871886453},{x:.43288947528682337,y:.011581843237821021},{x:.43469991915024053,y:.012156270087817089},{x:.43656323581544765,y:.012524677733968342},{x:.4388942001112364,y:.013487052913568918},{x:.44129792644594007,y:.014249719447780182},{x:.4429615180190356,y:.01516630892323094},{x:.4447171588106798,y:.015891152767997317},{x:.5224141588106799,y:.0573061527679973},{x:.525028554951968,y:.05904868699814221},{x:.5277374225537912,y:.06064039332865708},{x:.5286915199232336,y:.06149010807639827},{x:.529754639763497,y:.06219869339105244},{x:.5319788494519322,y:.06441778869965879},{x:.5343251404217865,y:.06650738469209135},{x:.5350951339540482,y:.06752690757225652},{x:.5359995881074716,y:.06842928201075814},{x:.5377481362120787,y:.07103965980959966},{x:.5396416839038074,y:.07354684346181917},{x:.5707946839038074,y:.12450984346181915},{x:.5718407730360667,y:.12667263757185424},{x:.573076251912317,y:.12873311634664666},{x:.5737567016649755,y:.13063382885667474},{x:.5746357412153917,y:.13245124718509382},{x:.57523978983892,y:.1347765656784282},{x:.576049549867314,y:.13703848290314058},{x:.576346114353134,y:.13903542291661675},{x:.5768537026781452,y:.1409894121704204},{x:.5769924975430949,y:.14338789436140983},{x:.5773454200998597,y:.14576432582559334},{x:.5830324200998597,y:.2611263258255933},{x:.5829003037879823,y:.26382496142481277},{x:.5829742287592172,y:.2665258175697889},{x:.5826851199428378,y:.2682203519457296},{x:.5826010630436497,y:.26993731586400416},{x:.5819450076216034,y:.2725583233230625},{x:.5814906012502021,y:.27522170532098544},{x:.5808764603215925,y:.2768272773619606},{x:.5804590555084463,y:.278494851612457},{x:.5793042728181804,y:.28093750708458076},{x:.5783389976861617,y:.283461062658912},{x:.5774234257367941,y:.284915971131802},{x:.5766887136425759,y:.2864700717712602},{x:.575079581335268,y:.2886405053765124},{x:.5736405324246225,y:.2909272557017569},{x:.5044305324246225,y:.38012925570175693},{x:.5017223718437749,y:.38298983800955333},{x:.499075053174031,y:.3859068173944946},{x:.49869279401231464,y:.38618992769627897},{x:.4983657648506557,y:.38653536283797296},{x:.49515156889241035,y:.38881264393905274},{x:.49198604326106643,y:.39115710813128307},{x:.4915558970220145,y:.39136020348505085},{x:.4911677605809681,y:.39163520096290155},{x:.48757104899345777,y:.3932416662216644},{x:.4840089657752798,y:.3949235187770668},{x:.3737297002329455,y:.43429966367120415},{x:.4408630401939032,y:.4733794631163462},{x:.44336631106573315,y:.475186847643908},{x:.4459719275146733,y:.476843279595192},{x:.4469351296354233,y:.4777635673817196},{x:.4480152047486495,y:.4785433915190981},{x:.45011777274311354,y:.48080441158023823},{x:.45235016915983667,y:.4829373462081214},{x:.4531153243813002,y:.4840278623347861},{x:.4540225100120052,y:.48500341457167107},{x:.4556435746202097,y:.4876311804334344},{x:.4574169612623637,y:.4901586502563309},{x:.45795466509848404,y:.4913774867999537},{x:.45865409861163536,y:.4925112772109775},{x:.4597313632297904,y:.4954048053049642},{x:.460977589843244,y:.49822968107500176},{x:.46126717863714684,y:.4995299988307428},{x:.46173198119508085,y:.5007784564862466},{x:.46222404714804793,y:.5038265501505143},{x:.4628952219429378,y:.5068402734760588},{x:.4768502219429378,y:.6216502734760588},{x:.47694604753136066,y:.6258560133977795},{x:.4770801736029929,y:.6300607061367898},{x:.47704647561686464,y:.6302637547476413},{x:.47705116403527437,y:.6304695272224051},{x:.47632464920624185,y:.6346131496757303},{x:.47563590322258376,y:.6387632171212809},{x:.475563239914934,y:.6389557900590453},{x:.4755276940283349,y:.6391585233384632},{x:.47400675833929046,y:.6430807912362932},{x:.4725216084222428,y:.647016748623825},{x:.4724127722032346,y:.6471914454185},{x:.4723383580201142,y:.6473833485763381},{x:.4700814501766401,y:.6509335313629835},{x:.46785696980463054,y:.6545041220574128},{x:.46771614318912413,y:.6546542292091504},{x:.46760572040480797,y:.6548279275146733},{x:.4646995721096373,y:.6578695936566139},{x:.4618212468158623,y:.6609376018599591},{x:.3721282468158623,y:.739463601859959},{x:.3693406873548985,y:.7414576112446344},{x:.36664335021940475,y:.7435720694617842},{x:.36575927454484214,y:.7440194833243711},{x:.36495338890552403,y:.7445959530105889},{x:.3618303796850022,y:.746007822191186},{x:.35877236079175173,y:.7475554273162446},{x:.35781798626885214,y:.7478217696388809},{x:.3569151218394033,y:.7482299421328396},{x:.35357667835226414,y:.7490054137685334},{x:.3502754956523681,y:.7499266922044516},{x:.21714549565236804,y:.7733246922044517},{x:.2164184100494338,y:.7733799121498203},{x:.21571010443589486,y:.773553134187072},{x:.21202614434596675,y:.7737134914026773},{x:.20834928456346336,y:.7739927377465721},{x:.20762539682958886,y:.7739050492917646},{x:.20689690716677497,y:.7739367593459113},{x:.061505907166774995,y:.7659797593459113},{x:.05835682356136361,y:.7654946428322841},{x:.055185935509274225,y:.7651823376181454},{x:.05400593378019863,y:.7648243880069794},{x:.05278721145616079,y:.7646366437616691},{x:.0497932781460736,y:.7635464928911877},{x:.046744245543570956,y:.7626215789630079},{x:.045656749721751114,y:.7620403003359452},{x:.0444980718907103,y:.7616184026130197},{x:.04177434405403643,y:.7599651112722733},{x:.03896433951411791,y:.7584631325536145},{x:.03801114145411163,y:.7576808631223083},{x:.03695703545532078,y:.7570410252146568},{x:.03460818442533898,y:.7548881284626934},{x:.03214519484660536,y:.7528668051533947},{x:.03136292541529926,y:.7519136070933885},{x:.03045389995114224,y:.7510804176129765},{x:.02857019075568381,y:.7485106500646154},{x:.026548867446385453,y:.7460476604858821},{x:.025967588819322866,y:.7449601646640625},{x:.025238577228599887,y:.7439656426153641},{x:.023892399755650346,y:.7410777589963466},{x:.02239042103699209,y:.738267754456429},{x:.022032471425826126,y:.7370877527273536},{x:.021511489215134356,y:.7359701170349662},{x:.02075457631003429,y:.7328750970932278},{x:.01982966238185463,y:.7298260644907257},{x:.019708797589401895,y:.7285989036590902},{x:.01941586581292807,y:.7274011044358949},{x:.019277305214138767,y:.7242178880520896},{x:.018964999999999996,y:.721047},{x:.018964999999999996,y:.05103000000000002}],[{x:.10896499999999999,y:.09660579683225357},{x:.10896499999999999,y:.37786028838708235},{x:.29722384626437015,y:.36605169579422814},{x:.44137514989764515,y:.3145812530901673},{x:.49232133133007555,y:.24891875813083103},{x:.48801965008125897,y:.1616582425292873},{x:.46925190911582665,y:.130956211173677},{x:.41203782454012283,y:.1004592638951106},{x:.10896499999999999,y:.09660579683225357}],[{x:.10896499999999999,y:.47257215902605326},{x:.10896499999999999,y:.6784424315209651},{x:.20665565807681563,y:.6837888736412973},{x:.32230778354311135,y:.6634626629325134},{x:.3846372425734713,y:.608893375476212},{x:.3762519660226853,y:.5399063743443061},{x:.2981741908903496,y:.4944555775409729},{x:.10896499999999999,y:.47257215902605326}]],C:[[{x:.028007484408327545,y:.4010798543150725},{x:.028340096336253087,y:.39680461654123217},{x:.028649292669517497,y:.39252762152779447},{x:.06572429266951751,y:.1769866215277945},{x:.0657499934516808,y:.17689321918606288},{x:.06575739253020782,y:.1767966283931179},{x:.06691993730130205,y:.17264138379230456},{x:.0680646634579554,y:.1684811950870131},{x:.0681080922997215,y:.16839460141895576},{x:.06813419313592875,y:.16830131007962543},{x:.07008504794245551,y:.16445270857242494},{x:.07201939106115751,y:.16059578172109576},{x:.07207887901649253,y:.16051932447281397},{x:.0721226785698821,y:.1604329177209502},{x:.1274306785698821,y:.07363491772095027},{x:.13009575906138268,y:.07023973030268985},{x:.13274648275581225,y:.06683332229320074},{x:.13281865262016482,y:.06677089175108791},{x:.13287757357360944,y:.06669582922279092},{x:.1361538134974972,y:.06388581079003605},{x:.13941816151489866,y:.0610619864944041},{x:.19692016151489866,y:.020443986494404057},{x:.19808425112310213,y:.019782383965415776},{x:.19914710087537263,y:.01896802966513257},{x:.20191114759162085,y:.01760739299916557},{x:.20458957759683996,y:.01608512525217841},{x:.2058603718000633,y:.015663337846789194},{x:.20706167183504787,y:.015071982836463577},{x:.21003805521400143,y:.014276729186446702},{x:.2129619996426652,y:.013306247159584957},{x:.21429066253234816,y:.013140483931242813},{x:.21558424756339917,y:.01279485365228588},{x:.32760524756339915,y:-.005618146347714133},{x:.32775803960473765,y:-.005628051859015257},{x:.32790622767465843,y:-.005666572281957827},{x:.3321581535063009,y:-.005913311337168391},{x:.3364083102547015,y:-.006188849089881349},{x:.3365600989091985,y:-.006168756021014132},{x:.33671295454862427,y:-.006177626226551311},{x:.34093131721939995,y:-.005590114680318674},{x:.3451535631465426,y:-.005031193603710363},{x:.34529851526132993,y:-.004981874120043047},{x:.3454501643137599,y:-.004960753231150514},{x:.44307616431375996,y:.01857424676884946},{x:.4458503498549469,y:.019539172468847843},{x:.4486819664572553,y:.020319643122350156},{x:.45000735163266253,y:.02098507354168687},{x:.45140809089867484,y:.021472282957461515},{x:.45394072357704407,y:.022959884631265325},{x:.4565656691892177,y:.024277779754777677},{x:.4577357684253341,y:.0251889939358613},{x:.459014543037309,y:.025940112433793877},{x:.4612082951993476,y:.027893222383335445},{x:.4635256946335971,y:.029697896006345384},{x:.5358116946335971,y:.09837789600634546},{x:.5383578959705028,y:.10132350300922108},{x:.5409714489909738,y:.10420951799057969},{x:.5412394420583803,y:.10465705806338507},{x:.5415805729157932,y:.10505169984914184},{x:.5435031902892489,y:.10843744707814906},{x:.545503491029224,y:.11177788699125937},{x:.5456790239480676,y:.11226911056087577},{x:.5459366092786453,y:.11272272074420048},{x:.5471617575812067,y:.11641849583208026},{x:.548471935605029,y:.12008498944441898},{x:.572709935605029,y:.21701898944441894},{x:.5740007070580636,y:.2257455880614603},{x:.5735642017652605,y:.23455632455146336},{x:.571417194380227,y:.24311260725223527},{x:.5676421931927146,y:.25108562301800397},{x:.5623842693813143,y:.2581689733242098},{x:.5558454820094204,y:.2640904489909738},{x:.5482771130087407,y:.26862249102922403},{x:.539970010555581,y:.27159093560502906},{x:.5312434119385397,y:.2728817070580635},{x:.5224326754485367,y:.2724452017652604},{x:.5138763927477648,y:.270298194380227},{x:.5059033769819961,y:.26652319319271456},{x:.49882002667579023,y:.2612652693813142},{x:.49289855100902624,y:.25472648200942033},{x:.488366508970776,y:.24715811300874066},{x:.48539806439497096,y:.23885101055558106},{x:.46433420621000654,y:.15461122058523102},{x:.4102697826671089,y:.10324381045150927},{x:.3332137540403124,y:.08466767669890593},{x:.24039332695070226,y:.09992465997883551},{x:.1985742470214596,y:.12946463056361485},{x:.15288732813236672,y:.2011637190451272},{x:.11884238546013813,y:.39908903228895243},{x:.16184523767713488,y:.5942488915238071},{x:.2166399992296726,y:.6603981208316636},{x:.2708106585112101,y:.6880654725502051},{x:.33167151101531583,y:.6962265900331734},{x:.41875307675349,y:.6679697644015699},{x:.4604926982936834,y:.628705384802963},{x:.487421989657252,y:.5630715564186946},{x:.49155436139101494,y:.5552777692634718},{x:.49712782320648147,y:.5484399232752638},{x:.5039281900917167,y:.5428207930406891},{x:.5116941277610109,y:.5386363185834178},{x:.5201271955849208,y:.5360473069101626},{x:.5289033154962927,y:.5351532522875923},{x:.5376852261286371,y:.5359885127334604},{x:.5461354435813054,y:.5385209896572519},{x:.5539292307365281,y:.5426533613910148},{x:.5607670767247361,y:.5482268232064814},{x:.5663862069593109,y:.5550271900917166},{x:.5705706814165822,y:.5627931277610108},{x:.5731596930898373,y:.5712261955849207},{x:.5740537477124077,y:.5800023154962926},{x:.5732184872665396,y:.588784226128637},{x:.570686010342748,y:.5972344435813053},{x:.540057010342748,y:.6718854435813053},{x:.5396985836895672,y:.6725614478775368},{x:.539454213118803,y:.6732865233897278},{x:.5376352487491008,y:.6764529645154376},{x:.5359246386089851,y:.679679230736528},{x:.5354412171276051,y:.6802723202285732},{x:.5350600868536766,y:.680935789284769},{x:.5326583313554347,y:.6836865257875079},{x:.5303511767935185,y:.686517076724736},{x:.5297613381003629,y:.6870044593160238},{x:.5292580947459566,y:.687580825172473},{x:.47307109474595666,y:.7404358251724731},{x:.4722065860115991,y:.7411021817697292},{x:.4714497622811152,y:.7418887085063782},{x:.4687194058651613,y:.7437900730587934},{x:.46608420409854834,y:.7458212660502541},{x:.46510630693397415,y:.746306161504971},{x:.46421058160492856,y:.7469299263656303},{x:.4611617503991064,y:.748262090618912},{x:.45818091720073817,y:.7497401524453693},{x:.45712721164557074,y:.7500249524971546},{x:.4561270069400303,y:.7504619845480405},{x:.3497190069400303,y:.7849899845480404},{x:.34852117258500637,y:.7852523061157466},{x:.34737251112679673,y:.7856814874310271},{x:.34422084285321763,y:.7861940634064482},{x:.3411016855274714,y:.7868771480384597},{x:.33987569082458696,y:.7869007432807547},{x:.3386653714532072,y:.7870975852636362},{x:.3354742629896646,y:.786985452257037},{x:.33228177619648713,y:.7870468942022847},{x:.3310747354346284,y:.7868308563672394},{x:.32984927004476555,y:.7867877944907101},{x:.25121827004476555,y:.7762437944907102},{x:.24809780050166644,y:.7755083028870222},{x:.24494229970605153,y:.7749416523797719},{x:.24381291428322105,y:.7744983594176508},{x:.24263200473447152,y:.7742200201979198},{x:.2397149814324578,y:.772889887451158},{x:.2367306607297473,y:.771718517308175},{x:.16743766072974728,y:.7363275173081749},{x:.16716950847174827,y:.7361554960544541},{x:.16687461978467572,y:.7360349240533984},{x:.16345937419922074,y:.733775423054901},{x:.16001260855282193,y:.7315643025810339},{x:.15978316844705134,y:.7313432727571054},{x:.15951746839392553,y:.7311674875843215},{x:.15660865257214304,y:.7282851209029094},{x:.15365948376641753,y:.7254440558690711},{x:.15347757306746915,y:.725182511527114},{x:.15325127235232486,y:.7249582685082102},{x:.08558827235232488,y:.6432742685082102},{x:.0845522070982367,y:.6417389136031936},{x:.0833480194008015,y:.6403315480201149},{x:.08209078724421986,y:.6380913122274521},{x:.0806538380596292,y:.6359618836319892},{x:.07993721339171088,y:.6342539038369039},{x:.07903072722802115,y:.632638655023214},{x:.07823470075697891,y:.6301961909068614},{x:.07724079305844417,y:.627827343805619},{x:.07687114846079628,y:.6260123758261444},{x:.07629719958575912,y:.6242513168879111},{x:.02905219958575911,y:.40983931688791114},{x:.028544362954760993,y:.4055813372409792},{x:.028013217832748447,y:.4013262022752188},{x:.028022142274708197,y:.401202753871557},{x:.028007484408327545,y:.4010798543150725}]],D:[[{x:.019456783112310236,y:.0515304721392918},{x:.019516560837245702,y:.0508455251733057},{x:.019462408649259272,y:.05016011050819538},{x:.01989956114396584,y:.04645701928180655},{x:.020223754746627687,y:.042742334175020345},{x:.02041601038349858,y:.04208221032853139},{x:.020496616482350807,y:.04139940114622653},{x:.021647806474261868,y:.03785274800035644},{x:.022690469901424933,y:.03427268656062632},{x:.023007815173924504,y:.033662754022853354},{x:.023220081912440925,y:.03300879029730612},{x:.025041069815762075,y:.029754871123364675},{x:.026762134096652887,y:.026447013104097812},{x:.027192373603928278,y:.025910711240413317},{x:.027528143690388265,y:.025310724430849408},{x:.029948949961216734,y:.02247458551787214},{x:.03228227556070457,y:.019566050047680916},{x:.03280887543977226,y:.01912398863794477},{x:.03325524541805519,y:.01860103590097925},{x:.03618283982900684,y:.01629166847686688},{x:.03903875835284746,y:.013894228942745224},{x:.03964148166567549,y:.013563396159022682},{x:.0401812977878431,y:.013137574275061882},{x:.04350317452751879,y:.011443726034814963},{x:.04677193462845869,y:.0096495146935595},{x:.04742761905614622,y:.009442624254195854},{x:.048040136491355995,y:.009130297319436702},{x:.05162863769958001,y:.008117061901006828},{x:.05518462276008175,y:.0069950292882567724},{x:.05586807071778482,y:.006920031876811272},{x:.05652975076450537,y:.006733202440201605},{x:.060246972352300414,y:.0064395179124900545},{x:.06395352786070822,y:.006032783112310258},{x:.06463847482669428,y:.006092560837245719},{x:.06532388949180462,y:.006038408649259287},{x:.22607288949180462,y:.009146408649259287},{x:.22716730592225892,y:.009275605270020776},{x:.2282688262216939,y:.009242558031150067},{x:.23153975417198444,y:.00979177582685766},{x:.23483359885377353,y:.010180616482350843},{x:.23588178136904675,y:.010520840680108605},{x:.23696858346127098,y:.010703324384590318},{x:.374121583461271,y:.04785532438459028},{x:.3763172878682137,y:.048688585594252994},{x:.37858028056243914,y:.049316523610364836},{x:.3804311803743379,y:.05024979166335608},{x:.3823691959266467,y:.050985260963484026},{x:.38436014929137596,y:.0522308719724549},{x:.38645715458576285,y:.05328823230909956},{x:.47004915458576285,y:.1063032323090996},{x:.47296331256678825,y:.10858070495130694},{x:.47594842000778254,y:.11076435600861785},{x:.476434095048061,y:.11129319075325024},{x:.4769998347544389,y:.11173532762855881},{x:.47941368513584726,y:.11453756329148114},{x:.48191542538645477,y:.11726162167794474},{x:.5445294253864548,y:.20053762167794476},{x:.5457907389554543,y:.20261097926106453},{x:.5472304508598836,y:.2045646816997861},{x:.5480776582474705,y:.2063702359380903},{x:.54911422277829,y:.20807414921008693},{x:.5499468085621922,y:.21035373787896267},{x:.5509777083681839,y:.21255077433219424},{x:.570480708368184,y:.26758877433219413},{x:.5715324066676154,y:.27184261440989077},{x:.5725895850614416,y:.2760950958693092},{x:.5821235850614417,y:.3411630958693092},{x:.5823063349967632,y:.3450227385412275},{x:.5825832689280143,y:.34887676846995497},{x:.5805752689280143,y:.424797768469955},{x:.5800798101377765,y:.42875301375722},{x:.5796594372976747,y:.43271694253692033},{x:.5588164372976746,y:.5335539425369203},{x:.5581925601051908,y:.535556542700639},{x:.5577783377379867,y:.5376127649642906},{x:.5568838034059929,y:.5397575559956548},{x:.5561926080991778,y:.5419762423834013},{x:.555190030621201,y:.5438186507441294},{x:.5543826183570809,y:.5457545524985521},{x:.5020956183570809,y:.6430055524985521},{x:.5018901867095668,y:.6433113858234256},{x:.5017428412228655,y:.6436490624319612},{x:.4994325691935421,y:.6469701275279692},{x:.4971767628200625,y:.6503284258808291},{x:.4969156133622187,y:.650588304977856},{x:.4967052216394318,y:.6508907475465959},{x:.49379143318032753,y:.6536972875938759},{x:.49092379998669317,y:.6565509711937552},{x:.49061696854573045,y:.6567549090549786},{x:.49035161582277553,y:.657010494885618},{x:.39890061582277553,y:.7292364948856179},{x:.3986791836579038,y:.7293785203585265},{x:.39848760231040037,y:.7295587979940886},{x:.39496847203231433,y:.7317585520660096},{x:.39147518928128755,y:.7339991259907827},{x:.39123030407812903,y:.7340952232117042},{x:.391007233490524,y:.7342346611962726},{x:.3871265715837099,y:.7357055993513507},{x:.38326329699273004,y:.7372216156196327},{x:.3830043695523095,y:.737268091626259},{x:.38275838220218455,y:.7373613314362847},{x:.25909638220218456,y:.7708063314362847},{x:.2580664240588666,y:.7709788511982676},{x:.2570738325025125,y:.7713034106651087},{x:.2537238261308602,y:.7717062438265866},{x:.2503960471743838,y:.7722636525302581},{x:.2493522224520667,y:.7722319225075465},{x:.24831538485324267,y:.7723566006488801},{x:.17218438485324267,y:.7739936006488801},{x:.16854768223369815,y:.7737142062783378},{x:.16490357022768087,y:.7735589167265521},{x:.06552457022768086,y:.7594769167265522},{x:.06454980411013514,y:.759239472501363},{x:.06355033417502035,y:.7591522452533723},{x:.06027159361314519,y:.7581973390517399},{x:.056953647958865025,y:.7573891174476861},{x:.056043934769293216,y:.7569660682109414},{x:.05508068656062633,y:.7566855300985751},{x:.05205123903764884,y:.7551093215998242},{x:.04895472299174925,y:.7536693306611393},{x:.04814502249785432,y:.7530769339577588},{x:.0472550131040978,y:.7526138659033472},{x:.04459127858939255,y:.7504769279161366},{x:.04183518952697092,y:.7484605056870383},{x:.041156618064647085,y:.7477215269901124},{x:.040374050047680896,y:.7470937244392954},{x:.03817839436480973,y:.744478178292066},{x:.035868647242901154,y:.7419628147479951},{x:.03534728193289863,y:.7411056525944231},{x:.03470222894274521,y:.7403372416471526},{x:.03305902990826266,y:.7373436013115269},{x:.03128438701344127,y:.73442596046285},{x:.030940263632238257,y:.7334835551134912},{x:.030457514693559486,y:.7326040653715413},{x:.029429919524844063,y:.7293473747667649},{x:.028258579388326675,y:.7261395799150647},{x:.028104922404476318,y:.7251481474789881},{x:.02780302928825676,y:.7241913772399183},{x:.02743052789135989,y:.7207967891595589},{x:.026907504457698045,y:.7174221140620348},{x:.02695021882291786,y:.7164197547317572},{x:.026840783112310238,y:.7154224721392919},{x:.019456783112310236,y:.0515304721392918}],[{x:.1099671672449683,y:.09691838411671685},{x:.1164055200593884,y:.675787686211921},{x:.17390769441284104,y:.6839357418297609},{x:.2408956143230629,y:.6824953400894312},{x:.35035782392371695,y:.652890743688808},{x:.42724604872976657,y:.5921661050862587},{x:.4720072878873445,y:.5089126143655517},{x:.4907125333997566,y:.41841792349882906},{x:.4925121994894803,y:.35037387509349616},{x:.4841787199640398,y:.2934992321564965},{x:.4684498534661817,y:.24911194023683725},{x:.41491413338319044,y:.1779099626338861},{x:.34401115658372555,y:.1329424859013802},{x:.21878934362335548,y:.0990224054430332},{x:.1099671672449683,y:.09691838411671685}]],E:[[{x:.035078,y:.05103000000000002},{x:.03594266238185463,y:.04225093550927423},{x:.03850342103699209,y:.03380924554357098},{x:.042661867446385456,y:.026029339514117924},{x:.04825819484660536,y:.019210194846605383},{x:.05507733951411791,y:.013613867446385479},{x:.06285724554357096,y:.009455421036992116},{x:.07129893550927423,y:.006894662381854655},{x:.080078,y:.0060300000000000215},{x:.521974,y:.0060300000000000215},{x:.5307530644907258,y:.006894662381854655},{x:.5391947544564291,y:.009455421036992116},{x:.5469746604858822,y:.013613867446385479},{x:.5537938051533947,y:.019210194846605383},{x:.5593901325536146,y:.026029339514117924},{x:.5635485789630079,y:.03380924554357098},{x:.5661093376181454,y:.04225093550927425},{x:.5669740000000001,y:.05103000000000002},{x:.5661093376181454,y:.05980906449072579},{x:.5635485789630079,y:.06825075445642906},{x:.5593901325536146,y:.07603066048588211},{x:.5537938051533947,y:.08284980515339466},{x:.5469746604858822,y:.08844613255361455},{x:.5391947544564291,y:.09260457896300792},{x:.5307530644907258,y:.09516533761814538},{x:.521974,y:.09603000000000002},{x:.125078,y:.09603000000000002},{x:.125078,y:.345019},{x:.389405,y:.345019},{x:.3981840644907258,y:.34588366238185464},{x:.40662575445642907,y:.3484444210369921},{x:.4144056604858821,y:.35260286744638547},{x:.42122480515339467,y:.35819919484660534},{x:.42682113255361454,y:.3650183395141179},{x:.4309795789630079,y:.372798245543571},{x:.43354033761814537,y:.3812399355092742},{x:.434405,y:.390019},{x:.43354033761814537,y:.3987980644907258},{x:.4309795789630079,y:.407239754456429},{x:.42682113255361454,y:.4150196604858821},{x:.42122480515339467,y:.42183880515339467},{x:.4144056604858821,y:.42743513255361454},{x:.40662575445642907,y:.43159357896300793},{x:.3981840644907258,y:.43415433761814537},{x:.389405,y:.435019},{x:.125078,y:.435019},{x:.125078,y:.684004},{x:.521974,y:.684004},{x:.5307530644907258,y:.6848686623818546},{x:.5391947544564291,y:.6874294210369921},{x:.5469746604858822,y:.6915878674463855},{x:.5537938051533947,y:.6971841948466053},{x:.5593901325536146,y:.7040033395141179},{x:.5635485789630079,y:.711783245543571},{x:.5661093376181454,y:.7202249355092742},{x:.5669740000000001,y:.729004},{x:.5661093376181454,y:.7377830644907257},{x:.5635485789630079,y:.746224754456429},{x:.5593901325536146,y:.7540046604858821},{x:.5537938051533947,y:.7608238051533946},{x:.5469746604858822,y:.7664201325536145},{x:.5391947544564291,y:.7705785789630079},{x:.5307530644907258,y:.7731393376181454},{x:.521974,y:.774004},{x:.080078,y:.774004},{x:.07129893550927423,y:.7731393376181454},{x:.06285724554357093,y:.7705785789630079},{x:.05507733951411791,y:.7664201325536145},{x:.04825819484660536,y:.7608238051533946},{x:.042661867446385456,y:.7540046604858821},{x:.03850342103699209,y:.746224754456429},{x:.03594266238185463,y:.7377830644907257},{x:.035078,y:.729004},{x:.035078,y:.05103000000000002}]],F:[[{x:.041426000000000004,y:.05103000000000002},{x:.04229066238185464,y:.04225093550927423},{x:.0448514210369921,y:.03380924554357098},{x:.04900986744638546,y:.026029339514117924},{x:.054606194846605366,y:.019210194846605383},{x:.06142533951411792,y:.013613867446385479},{x:.06920524554357096,y:.009455421036992116},{x:.07764693550927423,y:.006894662381854655},{x:.086426,y:.0060300000000000215},{x:.09520506449072577,y:.006894662381854655},{x:.10364675445642904,y:.009455421036992116},{x:.11142666048588211,y:.013613867446385486},{x:.11824580515339464,y:.019210194846605383},{x:.12384213255361454,y:.026029339514117924},{x:.1280005789630079,y:.03380924554357098},{x:.13056133761814537,y:.04225093550927425},{x:.131426,y:.05103000000000002},{x:.131426,y:.347323},{x:.447344,y:.347323},{x:.4561230644907258,y:.3481876623818546},{x:.4645647544564291,y:.35074842103699205},{x:.47234466048588214,y:.35490686744638544},{x:.47916380515339463,y:.3605031948466053},{x:.48476013255361455,y:.36732233951411786},{x:.48891857896300794,y:.37510224554357097},{x:.4914793376181454,y:.3835439355092742},{x:.492344,y:.392323},{x:.4914793376181454,y:.4011020644907258},{x:.48891857896300794,y:.409543754456429},{x:.48476013255361455,y:.4173236604858821},{x:.47916380515339463,y:.42414280515339464},{x:.47234466048588214,y:.4297391325536145},{x:.4645647544564291,y:.4338975789630079},{x:.4561230644907258,y:.43645833761814534},{x:.447344,y:.43732299999999996},{x:.131426,y:.43732299999999996},{x:.131426,y:.679393},{x:.515626,y:.679393},{x:.5244050644907258,y:.6802576623818547},{x:.532846754456429,y:.6828184210369922},{x:.5406266604858821,y:.6869768674463855},{x:.5474458051533947,y:.6925731948466054},{x:.5530421325536146,y:.6993923395141179},{x:.5572005789630079,y:.707172245543571},{x:.5597613376181454,y:.7156139355092743},{x:.5606260000000001,y:.7243930000000001},{x:.5597613376181454,y:.7331720644907258},{x:.5572005789630079,y:.7416137544564291},{x:.5530421325536146,y:.7493936604858822},{x:.5474458051533947,y:.7562128051533947},{x:.5406266604858821,y:.7618091325536146},{x:.532846754456429,y:.7659675789630079},{x:.5244050644907258,y:.7685283376181454},{x:.515626,y:.7693930000000001},{x:.10586481668800227,y:.7693930000000001},{x:.10364675445642904,y:.7705785789630079},{x:.09520506449072577,y:.7731393376181454},{x:.086426,y:.774004},{x:.0776469355092742,y:.7731393376181454},{x:.06920524554357094,y:.7705785789630079},{x:.06142533951411792,y:.7664201325536145},{x:.054606194846605366,y:.7608238051533946},{x:.04900986744638546,y:.7540046604858821},{x:.0448514210369921,y:.746224754456429},{x:.04229066238185464,y:.7377830644907257},{x:.041426000000000004,y:.729004},{x:.041426000000000004,y:.05103000000000002}]],G:[[{x:.011397831509003739,y:.41623356008285023},{x:.011618856500496228,y:.4138403978921803},{x:.011624876992355357,y:.4114370583257866},{x:.031979876992355355,y:.20994505832578658},{x:.0322125865037964,y:.20879027461506633},{x:.03227702681480045,y:.2076140405475535},{x:.033082276634523504,y:.2044745765152392},{x:.033722542929381774,y:.20129735748690203},{x:.034176068118796386,y:.2002101619949014},{x:.03446874211029117,y:.19906910061620064},{x:.03587099832954512,y:.19614705695158466},{x:.03711880677043453,y:.1931557970536144},{x:.03777571891913337,y:.19217797009338475},{x:.03828537929375919,y:.19111593175236494},{x:.08239837929375919,y:.11845093175236496},{x:.08400149586436068,y:.11631468084865614},{x:.08543403702225794,y:.1140604899753128},{x:.08664282877724949,y:.11279494315419919},{x:.08769326713863865,y:.11139516977529508},{x:.08968234215056696,y:.10961271886167734},{x:.09152712825517066,y:.10768131654967852},{x:.15960912825517065,y:.049144316549678456},{x:.16129904644183068,y:.0479582081853546},{x:.16285577619764602,y:.04660201166682107},{x:.1649006360722032,y:.045430348778213794},{x:.16682965744636918,y:.04407642028337947},{x:.16871850259167306,y:.043242789341903884},{x:.17050990103726027,y:.04221635466854622},{x:.25257090103726026,y:.005359354668546305},{x:.2555014876285109,y:.004375276469579791},{x:.2583690572759664,y:.003220377345201267},{x:.25967433471463813,y:.0029740526131209386},{x:.2609335532503684,y:.0025512125194529015},{x:.2639998135747395,y:.0021577721889240492},{x:.26703759331756605,y:.0015844992133087973},{x:.35309859331756605,y:-.006038500786691249},{x:.3541123404679588,y:-.006028536718703998},{x:.3551159915981175,y:-.006171599559831674},{x:.3585153812714738,y:-.005985259459774228},{x:.361919709861342,y:-.005951798491220829},{x:.36291203425126567,y:-.00574425362199294},{x:.3639243106821295,y:-.005688764928569123},{x:.3672220288859873,y:-.004842817275250554},{x:.37055441634545594,y:-.004145847688979236},{x:.3714871835051078,y:-.003748697851442632},{x:.37246918402112983,y:-.003496790022837183},{x:.4525501840211298,y:.02567020997716287},{x:.4548144879103283,y:.026756908839544704},{x:.45716266717941917,y:.02764799841997529},{x:.45878159595452606,y:.02866082810547922},{x:.4605032369247208,y:.02948708879101062},{x:.4625120284186098,y:.03099465081435172},{x:.46464124512829075,y:.032326725408117304},{x:.4660314733714444,y:.03363593119127184},{x:.46755883802994086,y:.034782191000688294},{x:.46923492039795345,y:.03665268142188218},{x:.47106334994415,y:.038374550149380404},{x:.53517534994415,y:.11188255014938031},{x:.5366918789074028,y:.11401106513419482},{x:.5383741006891446,y:.11601120663268963},{x:.5392453250303639,y:.11759493887966013},{x:.5402941837404813,y:.11906705813061697},{x:.5413663203511413,y:.12145053442062861},{x:.5426260104640281,y:.12374042895017842},{x:.5431715236397763,y:.1254636976633839},{x:.5439130326051668,y:.12711215273922669},{x:.5444995752545472,y:.12965899467727895},{x:.5452883245139833,y:.13215064287530112},{x:.5896823245139834,y:.3420786428753011},{x:.5897067631627176,y:.34229945557802055},{x:.5897717252277992,y:.3425119065778641},{x:.5901917436343531,y:.346681442891342},{x:.5906527316031134,y:.3508466486034176},{x:.590633622248786,y:.3510679861958218},{x:.5906558889520306,y:.35128902847947113},{x:.590254400640623,y:.3554603898480228},{x:.5898939395311937,y:.3596354965915505},{x:.5898320165355749,y:.3598488531940917},{x:.589810732180064,y:.3600699922305474},{x:.5886031661213459,y:.3640828755761044},{x:.5874351082520124,y:.3681074363403587},{x:.5873327512810971,y:.3683046127784522},{x:.5872687338126765,y:.3685173503185603},{x:.5853014960930706,y:.3722175427846122},{x:.5833707292727002,y:.37593689595641405},{x:.5832318718474782,y:.3761103148501221},{x:.583127581421558,y:.3763064755095204},{x:.5804762718833937,y:.37955178077467916},{x:.577856994398102,y:.38282299369748307},{x:.5776869727315521,y:.38296599065597503},{x:.5775464171707139,y:.38313803609053093},{x:.5743129241526703,y:.3858037388934479},{x:.5711057933673104,y:.38850110068914456},{x:.5709111412967293,y:.38860818041949885},{x:.5707397220723512,y:.3887494990196469},{x:.5670483068977423,y:.3907331578965531},{x:.5633765710498215,y:.39275301046402805},{x:.5631647689451196,y:.3928200579522583},{x:.5629690736018615,y:.39292521892344706},{x:.5589615952856832,y:.39415060297614785},{x:.5549663571246989,y:.39541532451398326},{x:.5547455444219794,y:.39543976316271745},{x:.5545330934221359,y:.39550472522779906},{x:.5503635571086607,y:.3959247436343527},{x:.5461983513965825,y:.39638573160311336},{x:.5459770138041778,y:.396366622248786},{x:.5457559715205288,y:.3963888889520305},{x:.32969497152052885,y:.39686888895203054},{x:.32091400776945256,y:.3960237321800639},{x:.31246664968143967,y:.39348173381267654},{x:.3046775244904796,y:.389340581421558},{x:.29784596390946905,y:.3837594171707138},{x:.2922345009803531,y:.3769527220723512},{x:.2880587810765529,y:.3691820736018615},{x:.2854792747722009,y:.3607460934221358},{x:.2845951110479695,y:.3519689715205288},{x:.2854402678199361,y:.3431880077694525},{x:.2879822661873235,y:.33474064968143963},{x:.29212341857844204,y:.32695152449047954},{x:.29770458282928614,y:.320119963909469},{x:.3045112779276488,y:.31450850098035305},{x:.31228192639813845,y:.3103327810765529},{x:.3207179065778642,y:.3077532747722009},{x:.3294950284794712,y:.30686911104796943},{x:.49017057214072013,y:.30651215509128404},{x:.45965681956734333,y:.16222033524572274},{x:.4108567628008364,y:.10626833604444391},{x:.35107150330533127,y:.0844934248457151},{x:.2825297162303303,y:.09056463065174497},{x:.21333680545064249,y:.12164203785622632},{x:.15562253329738823,y:.17126485077351794},{x:.1205010051965362,y:.2291186770707186},{x:.10185989085514695,y:.41364510354456796},{x:.13655871914038514,y:.5827099362211221},{x:.190187982415082,y:.6526649281775241},{x:.2569251189377254,y:.6872526727450867},{x:.3715857772516941,y:.6967797369989467},{x:.4883723057362636,y:.6711064406866752},{x:.49713228125159653,y:.6700660353148682},{x:.5059269093127409,y:.6707546074846872},{x:.5144182172953911,y:.6731456957538017},{x:.5222798889957544,y:.6771474119409674},{x:.529209804779262,y:.6826059723372997},{x:.5349416518686954,y:.6893116075279637},{x:.5392551585948644,y:.6970066237131456},{x:.5419845593133248,y:.7053953057362636},{x:.5430249646851317,y:.7141552812515966},{x:.5423363925153128,y:.722949909312741},{x:.5399453042461984,y:.7314412172953911},{x:.5359435880590326,y:.7393028889957545},{x:.5304850276627003,y:.7462328047792621},{x:.5237793924720363,y:.7519646518686954},{x:.5160843762868544,y:.7562781585948645},{x:.5076956942637364,y:.7590075593133249},{x:.38428269426373635,y:.7861375593133247},{x:.3819812519937546,y:.7864108971664274},{x:.3797153389243004,y:.7868977113667894},{x:.37761181025895013,y:.7869298473215656},{x:.37552271874840343,y:.7871779646851318},{x:.3732121724765259,y:.7869970613144796},{x:.370894825552222,y:.7870324638061055},{x:.24049282555222196,y:.7761974638061055},{x:.24043595887820252,y:.7761870527203061},{x:.24037815170992255,y:.776187787986971},{x:.2360978388350013,y:.7753928346522221},{x:.2318155069745089,y:.7746088302209789},{x:.231761764079766,y:.7745875250435272},{x:.2317049242166051,y:.7745769685631748},{x:.227661944055434,y:.7729622424167508},{x:.22361484767780643,y:.7713578609091699},{x:.22356629387164592,y:.7713264803860874},{x:.22351260563766895,y:.7713050378383375},{x:.13987060563766895,y:.7279560378383374},{x:.13900257424615298,y:.727391873258006},{x:.13805978359276902,y:.7269641982011581},{x:.13531067905832161,y:.7249923788161832},{x:.13247402218179744,y:.7231487342752945},{x:.13173273281971745,y:.7224260654354895},{x:.1308914928889356,y:.7218226787027751},{x:.128579894506033,y:.7193524235854973},{x:.12615742040314795,y:.7169907998540069},{x:.12557136040496888,y:.7161373985129647},{x:.12486399957555622,y:.7153814879181388},{x:.05884299957555622,y:.6292624879181389},{x:.05814177883495547,y:.6281337214080167},{x:.057292540659828396,y:.62711165542026},{x:.05581896837632758,y:.6243946553718145},{x:.05418793684040681,y:.6217691571968414},{x:.05372040128165289,y:.6205252782386133},{x:.05308687616260495,y:.6193571728131668},{x:.052171678571706244,y:.6164048994674943},{x:.051084196133809955,y:.613511651036194},{x:.05086831288622884,y:.6122004612006492},{x:.05047484683830003,y:.6109312059739318},{x:.012315846838300032,y:.4250072059739319},{x:.012065742114142504,y:.42261690788694145},{x:.011602778634016861,y:.4202585732767163},{x:.011607833784388823,y:.41824059149262255},{x:.011397831509003739,y:.41623356008285023}]],H:[[{x:.021894999999999998,y:.05103000000000002},{x:.02275966238185463,y:.04225093550927423},{x:.025320421036992093,y:.03380924554357098},{x:.029478867446385455,y:.026029339514117924},{x:.03507519484660536,y:.019210194846605383},{x:.04189433951411791,y:.013613867446385479},{x:.04967424554357096,y:.009455421036992116},{x:.05811593550927423,y:.006894662381854655},{x:.066895,y:.0060300000000000215},{x:.07567406449072576,y:.006894662381854655},{x:.08411575445642903,y:.009455421036992116},{x:.0918956604858821,y:.013613867446385486},{x:.09871480515339463,y:.019210194846605383},{x:.10431113255361453,y:.026029339514117924},{x:.1084695789630079,y:.03380924554357098},{x:.11103033761814536,y:.04225093550927425},{x:.111895,y:.05103000000000002},{x:.111895,y:.359342},{x:.490157,y:.359342},{x:.490157,y:.05103000000000002},{x:.49102166238185463,y:.04225093550927423},{x:.49358242103699207,y:.03380924554357098},{x:.49774086744638546,y:.026029339514117924},{x:.5033371948466053,y:.019210194846605383},{x:.5101563395141179,y:.013613867446385479},{x:.517936245543571,y:.009455421036992116},{x:.5263779355092743,y:.006894662381854655},{x:.535157,y:.0060300000000000215},{x:.5439360644907257,y:.006894662381854655},{x:.552377754456429,y:.009455421036992116},{x:.5601576604858821,y:.013613867446385486},{x:.5669768051533947,y:.019210194846605383},{x:.5725731325536145,y:.026029339514117924},{x:.5767315789630079,y:.03380924554357098},{x:.5792923376181454,y:.04225093550927425},{x:.580157,y:.05103000000000002},{x:.580157,y:.729004},{x:.5792923376181454,y:.7377830644907257},{x:.5767315789630079,y:.746224754456429},{x:.5725731325536145,y:.7540046604858821},{x:.5669768051533947,y:.7608238051533946},{x:.5601576604858821,y:.7664201325536145},{x:.552377754456429,y:.7705785789630079},{x:.5439360644907257,y:.7731393376181454},{x:.535157,y:.774004},{x:.5263779355092743,y:.7731393376181454},{x:.517936245543571,y:.7705785789630079},{x:.5101563395141179,y:.7664201325536145},{x:.5033371948466053,y:.7608238051533946},{x:.49774086744638546,y:.7540046604858821},{x:.49358242103699207,y:.746224754456429},{x:.49102166238185463,y:.7377830644907257},{x:.490157,y:.729004},{x:.490157,y:.44934199999999996},{x:.111895,y:.44934199999999996},{x:.111895,y:.729004},{x:.11103033761814536,y:.7377830644907257},{x:.10846957896300788,y:.746224754456429},{x:.10431113255361453,y:.7540046604858821},{x:.09871480515339463,y:.7608238051533946},{x:.09189566048588207,y:.7664201325536145},{x:.08411575445642903,y:.7705785789630079},{x:.07567406449072576,y:.7731393376181454},{x:.066895,y:.774004},{x:.05811593550927421,y:.7731393376181454},{x:.04967424554357093,y:.7705785789630079},{x:.04189433951411791,y:.7664201325536145},{x:.03507519484660536,y:.7608238051533946},{x:.029478867446385455,y:.7540046604858821},{x:.025320421036992093,y:.746224754456429},{x:.02275966238185463,y:.7377830644907257},{x:.021894999999999998,y:.729004},{x:.021894999999999998,y:.05103000000000002}]],I:[[{x:.25602600000000003,y:.05103000000000002},{x:.25689066238185465,y:.04225093550927423},{x:.2594514210369921,y:.03380924554357098},{x:.2636098674463855,y:.026029339514117924},{x:.26920619484660535,y:.019210194846605383},{x:.27602533951411795,y:.013613867446385479},{x:.283805245543571,y:.009455421036992116},{x:.2922469355092743,y:.006894662381854655},{x:.301026,y:.0060300000000000215},{x:.3098050644907258,y:.006894662381854655},{x:.3182467544564291,y:.009455421036992116},{x:.32602666048588214,y:.013613867446385486},{x:.3328458051533947,y:.019210194846605383},{x:.33844213255361455,y:.026029339514117924},{x:.34260057896300794,y:.03380924554357098},{x:.3451613376181454,y:.04225093550927425},{x:.346026,y:.05103000000000002},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.05103000000000002}]],J:[[{x:.0492700034030052,y:.22191686675397743},{x:.05066400340300519,y:.18438286675397747},{x:.05116783173382979,y:.18068175768771486},{x:.05155979864248331,y:.17696713613904605},{x:.05874879864248331,y:.14209513613904604},{x:.05880353678004782,y:.1419191061579158},{x:.05882437610196882,y:.14173594355086241},{x:.060112741823836933,y:.13770889095133898},{x:.06136821695472819,y:.13367146342030908},{x:.0614562450600313,y:.133509494686791},{x:.06151241721221637,y:.13333391704789688},{x:.07511841721221638,y:.10184091704789687},{x:.07557207470549994,y:.10102219111224012},{x:.07589401217340325,y:.10014328637013822},{x:.07770640675364808,y:.09717031380613761},{x:.07939396242231754,y:.09412474393402119},{x:.07999862852050488,y:.09341025377409445},{x:.08048584585939292,y:.09261104382444658},{x:.10112984585939291,y:.06520804382444652},{x:.10197173470408774,y:.06429305686105671},{x:.10267645797068833,y:.06326868237508665},{x:.10495244591663212,y:.06105354143298789},{x:.10710291637241387,y:.058716353519649434},{x:.10810713366035453,y:.05798319214000915},{x:.10899816141532707,y:.05711598541156246},{x:.1373061614153271,y:.03451898541156248},{x:.13912164740426522,y:.03334117545586675},{x:.1408101373903697,y:.03198757757075004},{x:.14281300361792376,y:.03094638082514127},{x:.14470672673278473,y:.029717813955661344},{x:.1467171079910441,y:.028916819034200267},{x:.14863722796281134,y:.027918638208003034},{x:.20683022796281134,y:.004592638208003076},{x:.20850921914024034,y:.004104279923540699},{x:.2101185278310492,y:.0034204446176558795},{x:.21273469892125257,y:.0028752394826936905},{x:.21530073387518742,y:.0021288719943945503},{x:.21704273768291169,y:.0019774523068977427},{x:.21875453360851305,y:.0016207172553791283},{x:.2976895336085131,y:-.0068802827446208525},{x:.29850402526559744,y:-.006887701289741747},{x:.2993068957135494,y:-.007024999279811796},{x:.30290822222422875,y:-.006927815554356645},{x:.3065107103471747,y:-.0069606277022222565},{x:.30731099906181086,y:-.006809004262418785},{x:.30812522808832776,y:-.0067870318558802545},{x:.3663632280883278,y:.0005399681441197179},{x:.367446910459264,y:.0007860908462292888},{x:.3685549625674647,y:.000870733572342984},{x:.37174033606180384,y:.0017612008405818037},{x:.37496569353784953,y:.0024937343933679954},{x:.37598053709868623,y:.002946543859479297},{x:.3770507853196353,y:.0032457304419443098},{x:.4423997853196353,y:.028649730441944292},{x:.44339023767510893,y:.0291515261148112},{x:.4444435524779453,y:.029502699422305954},{x:.4473177196266577,y:.03114131738307233},{x:.45026902431580135,y:.03263654520916596},{x:.4511425499275847,y:.03332192668785485},{x:.4521071150681948,y:.03387184382278591},{x:.4818761150681948,y:.0549598438227859},{x:.482276572000261,y:.05530719927286456},{x:.48273081061614365,y:.05558049186877649},{x:.48560514894853896,y:.05819439949693127},{x:.48854004666413575,y:.060740123232255375},{x:.48886504324193186,y:.061158929616590856},{x:.48925723704963914,y:.06151558852974905},{x:.5141262370496392,y:.08904658852974903},{x:.5149956342421861,y:.09022293690705172},{x:.5160117353213701,y:.09127516577002369},{x:.5176116053111659,y:.0937625081737249},{x:.5193693801104602,y:.0961408866071265},{x:.519992577896003,y:.09746424275846524},{x:.5207838752101566,y:.09869448482562238},{x:.5385188752101566,y:.1333154848256224},{x:.5396070973995049,y:.13607819549886616},{x:.5408707323766272,y:.1387652058155645},{x:.5412201620380835,y:.14017334347255597},{x:.5417518824254063,y:.14152324205357814},{x:.5422802166156467,y:.1444451696332536},{x:.5429953614930656,y:.1473270727547606},{x:.5523413614930656,y:.2113020727547606},{x:.5524962602601196,y:.21460328519222147},{x:.5528139181508881,y:.2178928278123641},{x:.5518389181508881,y:.7290898278123641},{x:.5509575131661891,y:.7378672271777721},{x:.5483806584624608,y:.7463040176932935},{x:.5442073811208505,y:.7540759782308231},{x:.5385980578491955,y:.7608844367054697},{x:.5317682517950807,y:.7664677478762799},{x:.5239804285749665,y:.7706113482261165},{x:.5155338698677402,y:.7731560015172932},{x:.5067531721876358,y:.7740039181508881},{x:.4979757728222279,y:.7731225131661891},{x:.4895389823067066,y:.7705456584624607},{x:.48176702176917696,y:.7663723811208505},{x:.4749585632945304,y:.7607630578491954},{x:.46937525212372017,y:.7539332517950806},{x:.4652316517738835,y:.7461454285749665},{x:.46268699848270683,y:.7376988698677401},{x:.461839081849112,y:.7289181721876359},{x:.462807763438783,y:.22103394388498027},{x:.45501827222953295,y:.16771351802238937},{x:.44337725180090903,y:.14498874958374325},{x:.42579959063650114,y:.12552955984883984},{x:.4046143325842134,y:.11052217895574154},{x:.34961801160788414,y:.08914271579513207},{x:.3021031758959219,y:.08316481131246532},{x:.2345584384824393,y:.09043912324952764},{x:.18827433696976265,y:.10899157718530504},{x:.16959144206995366,y:.1239052897771866},{x:.155605251275173,y:.14247066404328695},{x:.14596289111822178,y:.16478926233983734},{x:.14046290234137151,y:.19146830095804884},{x:.13920799659699482,y:.22525713324602253},{x:.1380181031040591,y:.23399805813086086},{x:.13514580323043823,y:.24233889189031887},{x:.13070147784947123,y:.24995910096061402},{x:.12485591989314217,y:.25656584498063745},{x:.11783377087548613,y:.26190523048280423},{x:.10990488804518514,y:.26577206787662816},{x:.10137397392283892,y:.2680177567696118},{x:.09256886675397746,y:.2685559965969948},{x:.08382794186913914,y:.26736610310405906},{x:.07548710810968112,y:.26449380323043825},{x:.06786689903938595,y:.2600494778494712},{x:.06126015501936256,y:.2542039198931421},{x:.055920769517195726,y:.24718177087548612},{x:.052053932123371845,y:.23925288804518513},{x:.04980824323038816,y:.2307219739228389},{x:.0492700034030052,y:.22191686675397743}]],K:[[{x:-.009598999999999996,y:.05103000000000002},{x:-.008734337618145363,y:.04225093550927423},{x:-.006173578963007902,y:.03380924554357098},{x:-.002015132553614539,y:.026029339514117924},{x:.003581194846605365,y:.019210194846605383},{x:.010400339514117916,y:.013613867446385479},{x:.018180245543570964,y:.009455421036992116},{x:.026621935509274233,y:.006894662381854655},{x:.035401,y:.0060300000000000215},{x:.04418006449072578,y:.006894662381854655},{x:.05262175445642904,y:.009455421036992116},{x:.06040166048588211,y:.013613867446385486},{x:.06722080515339464,y:.019210194846605383},{x:.07281713255361454,y:.026029339514117924},{x:.07697557896300791,y:.03380924554357098},{x:.07953633761814537,y:.04225093550927425},{x:.080401,y:.05103000000000002},{x:.080401,y:.29048154892126793},{x:.18934433769134518,y:.3772029724897202},{x:.5349508182082354,y:.03415901207017739},{x:.5417907398770268,y:.02858809778868676},{x:.5495860658299886,y:.024458629583942203},{x:.5580372260624178,y:.02192930060321959},{x:.5668194472260474,y:.021097311540784057},{x:.5755952334866855,y:.021994635269720175},{x:.5840273362998535,y:.024586788142349852},{x:.5917917146832189,y:.028774155177474024},{x:.5985899879298227,y:.03439581820823536},{x:.6041609022113132,y:.04123573987702663},{x:.6082903704160578,y:.04903106582998847},{x:.6108196993967804,y:.05748222606241771},{x:.6116516884592159,y:.06626444722604735},{x:.6107543647302798,y:.07504023348668547},{x:.6081622118576502,y:.08347233629985339},{x:.603974844822526,y:.0912367146832188},{x:.5983531817917647,y:.09803498792982254},{x:.26024203797571366,y:.43363918627462555},{x:.5302838206406747,y:.648598708462355},{x:.5366139141989896,y:.654742773070568},{x:.5416237292416561,y:.6620037211908337},{x:.545120741386121,y:.6701025186588768},{x:.5469705624168195,y:.6787279332298585},{x:.5471021047489336,y:.6875484950590041},{x:.5455103132844098,y:.6962252349018474},{x:.542256359676543,y:.7044247105121999},{x:.537465291537645,y:.7118318206406747},{x:.531321226929432,y:.7181619141989897},{x:.5240602788091663,y:.7231717292416562},{x:.5159614813411232,y:.726668741386121},{x:.5073360667701415,y:.7285185624168196},{x:.498515504940996,y:.7286501047489337},{x:.48983876509815266,y:.7270583132844098},{x:.48163928948780005,y:.723804359676543},{x:.47423217935932527,y:.719013291537645},{x:.080401,y:.4055145384845117},{x:.080401,y:.729004},{x:.07953633761814537,y:.7377830644907257},{x:.07697557896300788,y:.746224754456429},{x:.07281713255361454,y:.7540046604858821},{x:.06722080515339464,y:.7608238051533946},{x:.06040166048588208,y:.7664201325536145},{x:.052621754456429054,y:.7705785789630079},{x:.04418006449072578,y:.7731393376181454},{x:.035401,y:.774004},{x:.026621935509274212,y:.7731393376181454},{x:.018180245543570936,y:.7705785789630079},{x:.010400339514117906,y:.7664201325536145},{x:.003581194846605358,y:.7608238051533946},{x:-.002015132553614539,y:.7540046604858821},{x:-.006173578963007902,y:.746224754456429},{x:-.008734337618145363,y:.7377830644907257},{x:-.009598999999999996,y:.729004},{x:-.009598999999999996,y:.05103000000000002}]],L:[[{x:.030439999999999995,y:.05103000000000002},{x:.03130466238185463,y:.04225093550927423},{x:.03386542103699209,y:.03380924554357098},{x:.03802386744638545,y:.026029339514117924},{x:.043620194846605356,y:.019210194846605383},{x:.05043933951411791,y:.013613867446385479},{x:.058219245543570955,y:.009455421036992116},{x:.06666093550927422,y:.006894662381854655},{x:.07544,y:.0060300000000000215},{x:.526613,y:.0060300000000000215},{x:.5353920644907257,y:.006894662381854655},{x:.543833754456429,y:.009455421036992116},{x:.5516136604858821,y:.013613867446385479},{x:.5584328051533947,y:.019210194846605383},{x:.5640291325536145,y:.026029339514117924},{x:.5681875789630079,y:.03380924554357098},{x:.5707483376181454,y:.04225093550927425},{x:.571613,y:.05103000000000002},{x:.5707483376181454,y:.05980906449072579},{x:.5681875789630079,y:.06825075445642906},{x:.5640291325536145,y:.07603066048588211},{x:.5584328051533947,y:.08284980515339466},{x:.5516136604858821,y:.08844613255361455},{x:.543833754456429,y:.09260457896300792},{x:.5353920644907257,y:.09516533761814538},{x:.526613,y:.09603000000000002},{x:.12043999999999999,y:.09603000000000002},{x:.12043999999999999,y:.729004},{x:.11957533761814536,y:.7377830644907257},{x:.11701457896300788,y:.746224754456429},{x:.11285613255361453,y:.7540046604858821},{x:.10725980515339463,y:.7608238051533946},{x:.10044066048588207,y:.7664201325536145},{x:.09266075445642903,y:.7705785789630079},{x:.08421906449072576,y:.7731393376181454},{x:.07544,y:.774004},{x:.06666093550927422,y:.7731393376181454},{x:.05821924554357093,y:.7705785789630079},{x:.05043933951411791,y:.7664201325536145},{x:.043620194846605356,y:.7608238051533946},{x:.03802386744638545,y:.7540046604858821},{x:.03386542103699209,y:.746224754456429},{x:.03130466238185463,y:.7377830644907257},{x:.030439999999999995,y:.729004},{x:.030439999999999995,y:.05103000000000002}]],M:[[{x:-.0025190000000000004,y:.05103000000000002},{x:-.001654337618145367,y:.04225093550927423},{x:.0009064210369920944,y:.03380924554357098},{x:.005064867446385457,y:.026029339514117924},{x:.010661194846605361,y:.019210194846605383},{x:.017480339514117912,y:.013613867446385479},{x:.02526024554357096,y:.009455421036992116},{x:.03370193550927423,y:.006894662381854655},{x:.042481,y:.0060300000000000215},{x:.051260064490725774,y:.006894662381854655},{x:.05970175445642904,y:.009455421036992116},{x:.06748166048588208,y:.013613867446385486},{x:.07430080515339463,y:.019210194846605383},{x:.07989713255361454,y:.026029339514117924},{x:.0840555789630079,y:.03380924554357098},{x:.08661633761814536,y:.04225093550927425},{x:.087481,y:.05103000000000002},{x:.087481,y:.5631122522964573},{x:.26219554141599577,y:.26476777519375044},{x:.26376288989624813,y:.2626088267569117},{x:.2651577075441738,y:.2603345964826191},{x:.26634817172230724,y:.2590477232579252},{x:.26737807478439135,y:.2576290804774607},{x:.2693364970488442,y:.25581739014918375},{x:.271148193983327,y:.2538589739959976},{x:.27256684023788735,y:.25282907571933333},{x:.27385371747828813,y:.25163861588213104},{x:.27612795245761435,y:.25024380590572387},{x:.27828690618147356,y:.24867646470811877},{x:.2798792167324836,y:.24794311979268302},{x:.28137361418054185,y:.2470265916026687},{x:.2838762642998919,y:.24610226374330602},{x:.28629950743227456,y:.24498622954453103},{x:.28800429067823724,y:.24457762002415934},{x:.28964877947809164,y:.24397024514568044},{x:.29228366929688115,y:.24355192080462856},{x:.2948780779631802,y:.2429300821730634},{x:.29662982004000654,y:.24286191068247276},{x:.29836120340931876,y:.24258703019148947},{x:.3010270755894747,y:.24269078533857608},{x:.3036929481196057,y:.24258703918410057},{x:.30542433056167173,y:.24286192551544342},{x:.30717607240852984,y:.24293010291506947},{x:.3097704789772072,y:.24355195029817853},{x:.3124053673848756,y:.24397028352732772},{x:.31404985413590314,y:.24457766395304856},{x:.3157546360035206,y:.24498627922405064},{x:.3181778753712451,y:.24610232159698525},{x:.32068052237260675,y:.24702665789836697},{x:.32217491672899246,y:.24794319112932822},{x:.32376722480624953,y:.2486765414159958},{x:.3259261732430879,y:.2502438898962479},{x:.3282004035173809,y:.2516387075441738},{x:.329487276742075,y:.2528291717223074},{x:.3309059195225393,y:.2538590747843914},{x:.3327176098508159,y:.2558174970488439},{x:.33467602600400237,y:.257629193983327},{x:.3357059242806667,y:.2590478402378874},{x:.33689638411786893,y:.2603347174782881},{x:.3382911940942761,y:.2626089524576143},{x:.3398585352918812,y:.26476790618147356},{x:.514571,y:.5631111449291359},{x:.514571,y:.05103000000000002},{x:.5154356623818547,y:.04225093550927423},{x:.5179964210369922,y:.03380924554357098},{x:.5221548674463855,y:.026029339514117924},{x:.5277511948466054,y:.019210194846605383},{x:.5345703395141179,y:.013613867446385479},{x:.542350245543571,y:.009455421036992116},{x:.5507919355092743,y:.006894662381854655},{x:.559571,y:.0060300000000000215},{x:.5683500644907258,y:.006894662381854655},{x:.576791754456429,y:.009455421036992116},{x:.5845716604858822,y:.013613867446385486},{x:.5913908051533947,y:.019210194846605383},{x:.5969871325536146,y:.026029339514117924},{x:.6011455789630079,y:.03380924554357098},{x:.6037063376181454,y:.04225093550927425},{x:.6045710000000001,y:.05103000000000002},{x:.6045710000000001,y:.729004},{x:.6044399806971988,y:.7303342613054065},{x:.6044919608158994,y:.7316699481196056},{x:.6040085293496043,y:.7347148603514975},{x:.6037063376181454,y:.7377830644907257},{x:.6033183147080721,y:.7390622046001841},{x:.6031087164726723,y:.7403823673848756},{x:.6020405410986152,y:.7432744596816038},{x:.6011455789630079,y:.746224754456429},{x:.6005154639484909,y:.7474036167328832},{x:.600052342101633,y:.7486575223726067},{x:.5984404722003996,y:.7512856532491108},{x:.5969871325536146,y:.7540046604858821},{x:.596139140401289,y:.7550379419131618},{x:.5954402924558263,y:.7561774035173808},{x:.5933466712837743,y:.758440575377949},{x:.5913908051533947,y:.7608238051533946},{x:.5903575237261146,y:.7616717973057207},{x:.589449806016673,y:.7626530260040023},{x:.5869548902613284,y:.7644642664232344},{x:.5845716604858822,y:.7664201325536145},{x:.5833927982094276,y:.7670502475681318},{x:.5823110938185264,y:.7678355352918812},{x:.579510761693201,y:.7691252393162225},{x:.576791754456429,y:.7705785789630079},{x:.5755126143469705,y:.7709666018730812},{x:.5742984925677255,y:.7715257704554689},{x:.5713003592655512,y:.772244375482538},{x:.5683500644907258,y:.7731393376181454},{x:.5670198031853202,y:.7732703569209465},{x:.5657199220368199,y:.7735819178269366},{x:.5626392041392276,y:.7737018082685412},{x:.559571,y:.774004},{x:.5582407386945936,y:.7738729806971988},{x:.5569050518803944,y:.7739249608158993},{x:.5538601396485026,y:.7734415293496042},{x:.5507919355092743,y:.7731393376181454},{x:.5495127953998159,y:.772751314708072},{x:.5481926326151244,y:.7725417164726722},{x:.5453005403183963,y:.7714735410986151},{x:.542350245543571,y:.7705785789630079},{x:.5411713832671168,y:.7699484639484908},{x:.5399174776273933,y:.769485342101633},{x:.5372893467508892,y:.7678734722003996},{x:.5345703395141179,y:.7664201325536145},{x:.5335370580868383,y:.765572140401289},{x:.5323975964826192,y:.7648732924558262},{x:.5301344246220511,y:.7627796712837742},{x:.5277511948466054,y:.7608238051533946},{x:.5269032026942794,y:.7597905237261146},{x:.5259219739959977,y:.7588828060166729},{x:.5241107335767656,y:.7563878902613284},{x:.5221548674463855,y:.7540046604858821},{x:.5215247524318682,y:.7528257982094275},{x:.5207394647081188,y:.7517440938185264},{x:.30102684980758887,y:.3765575080608823},{x:.08131245858400418,y:.7517442248062496},{x:.0805272117946797,y:.752825865136849},{x:.07989713255361454,y:.7540046604858821},{x:.07794121846393844,y:.7563879486998997},{x:.0761299252156086,y:.7588829195225393},{x:.07514874916275306,y:.7597905823884902},{x:.07430080515339463,y:.7608238051533946},{x:.0719175169393771,y:.7627797192430708},{x:.06965428252171184,y:.764873384117869},{x:.06851488325078628,y:.7655721885442563},{x:.06748166048588208,y:.7664201325536145},{x:.06476258657702469,y:.7678735078373721},{x:.06213438581945812,y:.7694854083973313},{x:.06088054980546198,y:.7699484997219428},{x:.05970175445642904,y:.7705785789630079},{x:.056751387338174995,y:.7714735630437544},{x:.05385922052190834,y:.7725417548543195},{x:.05253913197970031,y:.7727513367372549},{x:.051260064490725774,y:.7731393376181454},{x:.04819178511684276,y:.773441536759571},{x:.0451467965906812,y:.7739249698085104},{x:.04381118578262464,y:.7738729881355436},{x:.042481,y:.774004},{x:.039412720626117295,y:.7737018008585744},{x:.03633192759147018,y:.7735818970849305},{x:.035032121291898165,y:.7732703494826018},{x:.03370193550927423,y:.7731393376181454},{x:.030751568391020223,y:.7722443535373988},{x:.02775336399647938,y:.7715257207759494},{x:.026539313032545114,y:.7709665798438982},{x:.02526024554357096,y:.7705785789630079},{x:.02254117163471342,y:.7691252036792503},{x:.01974077519375046,y:.7678354585840041},{x:.01865913486315115,y:.7670502117946798},{x:.017480339514117912,y:.7664201325536145},{x:.015097051300099952,y:.7644642184639381},{x:.012602080477460715,y:.7626529252156086},{x:.011694417611510011,y:.7616717491627533},{x:.010661194846605361,y:.7608238051533946},{x:.008705280756928618,y:.7584405169393763},{x:.006611615882131057,y:.7561772825217118},{x:.005912811455744052,y:.7550378832507868},{x:.005064867446385457,y:.7540046604858821},{x:.0036114921626275165,y:.7512855865770239},{x:.0019995916026687363,y:.7486573858194581},{x:.0015365002780573323,y:.7474035498054622},{x:.0009064210369920944,y:.746224754456429},{x:11436956245516774e-21,y:.7432743873381747},{x:-.0010567548543195318,y:.7403822205219084},{x:-.0012663367372549837,y:.7390621319797002},{x:-.001654337618145367,y:.7377830644907257},{x:-.0019565367595708303,y:.7347147851168438},{x:-.0024399698085105087,y:.7316697965906812},{x:-.0023879881355436095,y:.730334185782624},{x:-.0025190000000000004,y:.729004},{x:-.0025190000000000004,y:.05103000000000002}]],N:[[{x:.022871000000000002,y:.05103000000000002},{x:.023735662381854636,y:.04225093550927423},{x:.026296421036992097,y:.03380924554357098},{x:.03045486744638546,y:.026029339514117924},{x:.036051194846605364,y:.019210194846605383},{x:.042870339514117915,y:.013613867446385479},{x:.05065024554357096,y:.009455421036992116},{x:.05909193550927423,y:.006894662381854655},{x:.067871,y:.0060300000000000215},{x:.07665006449072577,y:.006894662381854655},{x:.08509175445642904,y:.009455421036992116},{x:.0928716604858821,y:.013613867446385486},{x:.09969080515339464,y:.019210194846605383},{x:.10528713255361455,y:.026029339514117924},{x:.10944557896300791,y:.03380924554357098},{x:.11200633761814537,y:.04225093550927425},{x:.112871,y:.05103000000000002},{x:.112871,y:.5841703094604355},{x:.49710429367778214,y:.025528669675955993},{x:.4971050718109503,y:.02552774709009411},{x:.49710565506134197,y:.025526690456344234},{x:.49994880496714983,y:.022156103119426583},{x:.5027917749380927,y:.01878536401177818},{x:.5027927181072235,y:.018784610959395015},{x:.5027934962896407,y:.018783688415073364},{x:.5062395848358414,y:.016032536999645196},{x:.5096855265142521,y:.01328120162562755},{x:.5096865984738844,y:.013280647046104224},{x:.5096875416832135,y:.013279894044071351},{x:.5136041376200112,y:.011253903755746949},{x:.5175206253992491,y:.009227704391234041},{x:.5175217849545753,y:.009227369596750634},{x:.5175228569438108,y:.00922681507445236},{x:.5217594476858983,y:.008003843583871996},{x:.5259959731369073,y:.006780645934087934},{x:.5259971757268666,y:.006780543790608634},{x:.5259983353000632,y:.006780209058025982},{x:.5303921110410749,y:.006407254473822295},{x:.5347858668666982,y:.00603406533837119},{x:.5347870662764328,y:.00603419977121261},{x:.5347882688718429,y:.006034097691931008},{x:.5391703792739257,y:.006525492449663053},{x:.5435525159020149,y:.007016653277689966},{x:.5435536660388816,y:.007017019120673398},{x:.543554865441438,y:.007017153617542397},{x:.547756908459233,y:.008354013692199154},{x:.5519590228368241,y:.009690649448577907},{x:.5519600795017079,y:.0096912326425627},{x:.551961229619043,y:.009691598546943021},{x:.555821723096155,y:.01182254915564361},{x:.559682330324044,y:.013953293677782128},{x:.5596832529099061,y:.01395407181095043},{x:.5596843095436558,y:.013954655061341997},{x:.5630548968806759,y:.016797804967236304},{x:.5664256359882218,y:.01964077493809272},{x:.5664263890406048,y:.019641718107223288},{x:.5664273115849267,y:.019642496289640633},{x:.5691784630004857,y:.02308858483600535},{x:.5719297983743725,y:.026534526514252196},{x:.5719303529538958,y:.0265355984738845},{x:.5719311059559287,y:.0265365416832135},{x:.5739570962443242,y:.03045313762014873},{x:.575983295608766,y:.03436962539924916},{x:.5759836304032494,y:.03437078495457533},{x:.5759841849255477,y:.0343718569438108},{x:.5772071564160691,y:.03860844768569421},{x:.5784303540659121,y:.04284497313690728},{x:.5784304562093915,y:.04284617572686688},{x:.578430790941974,y:.042847335300063204},{x:.5788037455260991,y:.04724111104014873},{x:.5791769346616289,y:.05163486686669809},{x:.5791768002287875,y:.05163606627643281},{x:.5791769023080691,y:.05163726887184294},{x:.5700269023080691,y:.7296112688718429},{x:.5690438463824576,y:.738377865441438},{x:.566369401453057,y:.746784229619043},{x:.5621063449386581,y:.7545073095436557},{x:.5564185037103594,y:.7612503115849266},{x:.5495244583167865,y:.7667541059559286},{x:.5416891430561892,y:.7708071849255477},{x:.5332136646999368,y:.773253790941974},{x:.5244237311281571,y:.773999902308069},{x:.515657134558562,y:.7730168463824576},{x:.507250770380957,y:.770342401453057},{x:.49952769045634426,y:.766079344938658},{x:.4927846884150734,y:.7603915037103594},{x:.4872808940440714,y:.7534974583167865},{x:.4832278150744524,y:.7456621430561892},{x:.480781209058026,y:.7371866646999369},{x:.48003509769193103,y:.7283967311281571},{x:.48718300813543913,y:.19876859615253395},{x:.10494770632221789,y:.754505330324044},{x:.1022980223560627,y:.75764690179997},{x:.09969080515339464,y:.7608238051533946},{x:.09945603456444842,y:.7610164763964532},{x:.09926022506190729,y:.7612486359882218},{x:.09604856383930557,y:.7638129153509474},{x:.0928716604858821,y:.7664201325536145},{x:.09260381265312083,y:.7665633002029657},{x:.09236647348574781,y:.7667527983743725},{x:.08871625734636118,y:.7686412418060533},{x:.08509175445642904,y:.7705785789630079},{x:.08480112262185491,y:.7706667411661766},{x:.08453137460075086,y:.770806295608766},{x:.08058287930375276,y:.7719463312873718},{x:.07665006449072577,y:.7731393376181454},{x:.07634781747275289,y:.773169106351106},{x:.07605602686309273,y:.7732533540659121},{x:.07196099086840901,y:.7736011710596524},{x:.067871,y:.774004},{x:.06756875298202693,y:.7739742312670393},{x:.06726613313330192,y:.7739999346616289},{x:.06318192637768459,y:.7735421665584931},{x:.05909193550927423,y:.7731393376181454},{x:.05880130367469977,y:.7730511754149765},{x:.05849948409798508,y:.77301734672231},{x:.054583060356599135,y:.7717715852937818},{x:.05065024554357096,y:.7705785789630079},{x:.0503823977108098,y:.7704354113136568},{x:.050092977163175983,y:.7703433505514221},{x:.04649484240404986,y:.768357469710569},{x:.042870339514117915,y:.7664201325536145},{x:.04263556892517204,y:.7662274613105563},{x:.04236966967595597,y:.7660807063222179},{x:.03922809820002561,y:.7634310223560591},{x:.036051194846605364,y:.7608238051533946},{x:.03585852360354703,y:.7605890345644487},{x:.035626364011778155,y:.7603932250619073},{x:.033062084649052234,y:.7571815638393052},{x:.03045486744638546,y:.7540046604858821},{x:.030311699797034096,y:.7537368126531205},{x:.03012220162562753,y:.7534994734857478},{x:.028233758193948882,y:.7498492573463653},{x:.026296421036992097,y:.746224754456429},{x:.026208258833823234,y:.7459341226218545},{x:.026068704391234022,y:.7456643746007509},{x:.02492866871262922,y:.741715879303756},{x:.023735662381854636,y:.7377830644907257},{x:.023705893648893955,y:.7374808174727527},{x:.023621645934087915,y:.7371890268630927},{x:.023273828940347806,y:.7330939908684111},{x:.022871000000000002,y:.729004},{x:.022871000000000002,y:.05103000000000002}]],O:[[{x:.012131736117046842,y:.4355587711738732},{x:.012426138979982786,y:.43287355609157196},{x:.012514983726773468,y:.43017371170811375},{x:.012905745911416293,y:.42849911573111366},{x:.01309315536666239,y:.42678977537085305},{x:.07316415536666239,y:.1412837753708531},{x:.07429915106219231,y:.13768552483470178},{x:.07533122192175289,y:.13405641311271962},{x:.07562440736087628,y:.1334840955199844},{x:.07581784742995093,y:.1328708369543332},{x:.07763301835724021,y:.12956315246900071},{x:.0793532628391043,y:.12620512014747703},{x:.07975246842568721,y:.12570099711853563},{x:.0800618324091279,y:.12513726042963025},{x:.08248742256740031,y:.1222472544549173},{x:.0848297326408542,y:.1192893488327618},{x:.1660597326408542,y:.03517334883276172},{x:.16792084009780786,y:.033590824390739155},{x:.16963596886504836,y:.031851158363102774},{x:.17127304088861567,y:.03074040344046043},{x:.172780173663761,y:.0294588683817891},{x:.1749142556657825,y:.0282698357562587},{x:.17693582072022015,y:.026898201947035502},{x:.17875813439943417,y:.026128166777013812},{x:.18048632312818114,y:.025165283073572443},{x:.1828113681007397,y:.02441543612151622},{x:.18506168183103927,y:.023464545648773483},{x:.2739246818310393,y:-.0041824543512264944},{x:.2748960678404206,y:-.004382857312604547},{x:.27582577451608603,y:-.004728396924478621},{x:.2792086173377598,y:-.005272563034129881},{x:.28256427991205235,y:-.0059648570457577},{x:.28355609768991147,y:-.005971901311054349},{x:.2845353517466465,y:-.006129424701440567},{x:.287959355733624,y:-.0060031749164705245},{x:.2913856000541485,y:-.006027509400590186},{x:.29235973459950004,y:-.005840924262640544},{x:.29335090385307644,y:-.005804377895986514},{x:.3811419038530764,y:.006122622104013507},{x:.38318930529213563,y:.00660893405691686},{x:.3852758334501729,y:.006882342567970358},{x:.387470347489584,y:.0076257947232155985},{x:.38972465411174423,y:.008161252125438313},{x:.3916378405507577,y:.009037647936572414},{x:.39363093730084414,y:.009712864429997858},{x:.3956382440479665,y:.010870159811164118},{x:.3977447722434711,y:.011835121954387393},{x:.39945022100051475,y:.01306792222421872},{x:.4012732927522862,y:.01411899850883961},{x:.4916652927522862,y:.07880999850883955},{x:.49276799959381884,y:.07977586317754862},{x:.49398769122063274,y:.08058901093294302},{x:.4960788615418114,y:.08267585840574071},{x:.4983012083703825,y:.08462241954283417},{x:.4991942961599152,y:.08578485282556958},{x:.5002319144966787,y:.08682032620708877},{x:.5018757798210403,y:.08927504258220473},{x:.5036756696393939,y:.09161775945128844},{x:.5043248175140242,y:.09293208968889465},{x:.5051404874699588,y:.09415009603518716},{x:.5560304874699588,y:.18912209603518723},{x:.5570965448702581,y:.19168827319789875},{x:.5583465570022521,y:.1941700494329812},{x:.5587848767756364,y:.19575236841213633},{x:.559414776433869,y:.19726864147332673},{x:.5599597135111237,y:.1999934877429328},{x:.5607015364856348,y:.20267144261291137},{x:.5892585364856349,y:.36700144261291134},{x:.5895780755292599,y:.371318367211785},{x:.589913428370686,y:.37563409214099147},{x:.5899036127276142,y:.3757163259822715},{x:.58990972616553,y:.3757989176124618},{x:.5893809351459178,y:.38009523269056544},{x:.5888678881103582,y:.38439345626922305},{x:.5314878881103581,y:.6446844562692231},{x:.5303800126922803,y:.6480826863142071},{x:.5293998170293023,y:.651519919480997},{x:.5290148883003433,y:.6522699863013032},{x:.5287535704445262,y:.6530715368858165},{x:.5270040207481954,y:.6561883351212919},{x:.5253720883446767,y:.6593682961290664},{x:.5248482251358019,y:.6600288547560561},{x:.5244355536676654,y:.6607640231862051},{x:.522111563906752,y:.6634796128039058},{x:.5198906090097624,y:.6662800975344761},{x:.4528876090097624,y:.7355630975344761},{x:.4513498405668143,y:.7368687638478525},{x:.44995999895015265,y:.7383308981052339},{x:.44799560298794544,y:.7397167316507253},{x:.4461630292013509,y:.741272707045399},{x:.44440008568631667,y:.7422532816059559},{x:.4427517012434998,y:.743416176715023},{x:.4405546878862334,y:.7443921472166956},{x:.43845377075029196,y:.7455607075703166},{x:.43653340109378364,y:.7461785074476045},{x:.43468982031452474,y:.7469974740014746},{x:.32025082031452473,y:.7849044740014746},{x:.3162756641960007,y:.785800462676764},{x:.3123143949565378,y:.7867559771378485},{x:.3119757732525013,y:.7867696456410259},{x:.3116451697261732,y:.786844162718285},{x:.30757159639863574,y:.7869474207351895},{x:.30350003021295163,y:.7871117699623142},{x:.30316524843732107,y:.7870591140117537},{x:.302826459804451,y:.7870677017158569},{x:.29881101440639224,y:.7863742609266953},{x:.29478561927964103,y:.7857411290712295},{x:.173234619279641,y:.7541621290712296},{x:.17180894449846637,y:.7536379076298808},{x:.17032768986057922,y:.753301394035824},{x:.16767817066393412,y:.7521190197025511},{x:.16495505208167519,y:.7511177274253745},{x:.16365904177145735,y:.7503254433998781},{x:.16227189957151614,y:.7497064173758784},{x:.15990395993272244,y:.7480298664806163},{x:.1574285077432372,y:.7465165596726792},{x:.15631196685338702,y:.745486660093817},{x:.15507224418821702,y:.7446089104628228},{x:.08487024418821705,y:.6837459104628228},{x:.08477922863788438,y:.6836498346778195},{x:.08467166808724909,y:.6835727301071804},{x:.08174665618590948,y:.6804486588585436},{x:.07880340242944883,y:.6773417676286113},{x:.07873287917322891,y:.6772297816598538},{x:.07864242772392874,y:.6771331746094597},{x:.07638309517198695,y:.6734984900001298},{x:.07410251962167697,y:.6698770964908778},{x:.07405519882875666,y:.6697535038963435},{x:.0739853324792622,y:.6696411069209627},{x:.07247850415964274,y:.6656354878421232},{x:.07094824805491862,y:.6616387601752097},{x:.07092594823683183,y:.6615083105489945},{x:.0708793519117729,y:.6613844430013583},{x:.013660351911772894,y:.4476944430013583},{x:.013380528959940628,y:.4459977798389246},{x:.012899536483696877,y:.44434683677239306},{x:.012664423003084308,y:.4416557821956227},{x:.012224847112815455,y:.43899048181468664},{x:.012281403443251489,y:.4372718288093888},{x:.012131736117046842,y:.4355587711738732}],[{x:.10337829031332789,y:.4348001396911351},{x:.15424861715004387,y:.6247803934833692},{x:.2060651876410252,y:.6697037849792326},{x:.3045603004668897,y:.6952928559694175},{x:.3958853477721772,y:.6650421672339206},{x:.4463402797077116,y:.6128703383711886},{x:.499069598507425,y:.373676069990286},{x:.47327322171072966,y:.22523195474705573},{x:.4307624349909165,y:.1458974207255564},{x:.35796896612556683,y:.09380119213930618},{x:.2911281310221294,y:.08472041346861442},{x:.22279798440939425,y:.10597924519162948},{x:.15856873728877424,y:.17249047688925445},{x:.10337829031332789,y:.4348001396911351}]],P:[[{x:.025556999999999996,y:.05103000000000002},{x:.02642166238185463,y:.04225093550927423},{x:.02898242103699209,y:.03380924554357098},{x:.033140867446385454,y:.026029339514117924},{x:.03873719484660536,y:.019210194846605383},{x:.04555633951411791,y:.013613867446385479},{x:.053336245543570956,y:.009455421036992116},{x:.061777935509274226,y:.006894662381854655},{x:.070557,y:.0060300000000000215},{x:.07933606449072576,y:.006894662381854655},{x:.08777775445642903,y:.009455421036992116},{x:.09555766048588209,y:.013613867446385486},{x:.10237680515339463,y:.019210194846605383},{x:.10797313255361454,y:.026029339514117924},{x:.1121315789630079,y:.03380924554357098},{x:.11469233761814536,y:.04225093550927425},{x:.11555699999999999,y:.05103000000000002},{x:.11555699999999999,y:.3249696679740436},{x:.22632413005583354,y:.32573306868659574},{x:.22797244585475993,y:.3259068917113995},{x:.2296296407459454,y:.32587748916779646},{x:.3399906407459454,y:.3347734891677965},{x:.3425199358315593,y:.3352301100895628},{x:.3450781711944775,y:.33547763407671893},{x:.4262801711944775,y:.3514846340767189},{x:.43023360415359113,y:.35267647626036297},{x:.4342017122431381,y:.35381850872164355},{x:.49034871224313803,y:.3761405087216436},{x:.49223471805815816,y:.37711419756221787},{x:.49421014578428074,y:.3778905822551455},{x:.4961445509948513,y:.379132728294546},{x:.49818726580808836,y:.3801873213410173},{x:.49984707528076383,y:.38151024250532195},{x:.5016330805772936,y:.3826570960152846},{x:.5368430805772937,y:.4104950960152846},{x:.538268982488492,y:.41186995272090265},{x:.539835277869678,y:.41308244849417974},{x:.5414366048100854,y:.41492417879038607},{x:.5431934850553138,y:.4166181652891421},{x:.5443237674236908,y:.41824478417169497},{x:.5456234206874699,y:.41973955124896434},{x:.546834674823181,y:.4218582966024136},{x:.5482273167355989,y:.4238624839583804},{x:.5490185434436073,y:.4256783549664296},{x:.5500016096439067,y:.4273979502871872},{x:.5725636096439066,y:.4777629502871872},{x:.5732747072201834,y:.47988746499756846},{x:.5741879174558705,y:.48193325814034926},{x:.5746713208988057,y:.4840600657825243},{x:.5753635933927087,y:.4861283376286891},{x:.5756465551694752,y:.4883507586397718},{x:.5761431038835471,y:.49053540091990977},{x:.5762022992770958,y:.49271564988294925},{x:.5764777701286589,y:.49487923612929946},{x:.5763217220435205,y:.4971141570479765},{x:.5763825271473633,y:.4993536938878067},{x:.5706825271473633,y:.5794656938878067},{x:.5700654182420953,y:.5830779192715516},{x:.5695689975224034,y:.5867086990904052},{x:.5693236589408173,y:.5874197813867033},{x:.5691969863455608,y:.5881612549906394},{x:.5678870248015591,y:.5915836805014664},{x:.5666918126627678,y:.5950478490261242},{x:.5415328126627678,y:.6498468490261241},{x:.5413708296623262,y:.6501242105110185},{x:.5412617638147841,y:.650426323944409},{x:.5391478795722351,y:.653930540410781},{x:.5370840246571379,y:.6574644536133865},{x:.536871043573226,y:.6577048843594048},{x:.5367051339883567,y:.6579799150765678},{x:.5339482287199508,y:.661004400648547},{x:.5312345979336611,y:.6640677725799057},{x:.5309788035098929,y:.664262032968313},{x:.5307624259999995,y:.6644994116930277},{x:.47414742599999943,y:.7155204116930277},{x:.47266946719886654,y:.7166100541651699},{x:.4713261182021025,y:.7178618913781634},{x:.46912758296129603,y:.7192213498885075},{x:.46704701478499566,y:.7207552731949938},{x:.4653848758470294,y:.7215356430341334},{x:.4638231175995642,y:.7225013521577397},{x:.4283261175995643,y:.7398953521577398},{x:.4243082080780145,y:.7413960258251278},{x:.4202985181688539,y:.7429185254841078},{x:.34090751816885384,y:.7644395254841077},{x:.3408415384597873,y:.7644506164558663},{x:.3407789202555512,y:.7644741810938074},{x:.33649241770984384,y:.7651816893280429},{x:.33220802793590354,y:.7659018811363755},{x:.33214115226719376,y:.7658998869955335},{x:.33207514002138977,y:.7659107826399355},{x:.2099811400213898,y:.7739077826399355},{x:.20641155146718015,y:.773790767187745},{x:.20284008504333162,y:.7738075792583221},{x:.0663570850433316,y:.7610135792583221},{x:.06408313636872824,y:.7605723800858132},{x:.061777935509274226,y:.7603453376181454},{x:.05976354040438703,y:.759734277543603},{x:.05769704052657306,y:.7593333282846051},{x:.05555285882676713,y:.7584569812513055},{x:.053336245543570956,y:.7577845789630079},{x:.05147976838249502,y:.7567922712467745},{x:.04953119704042999,y:.7559958719887517},{x:.04759918201567506,y:.7547180546196904},{x:.04555633951411791,y:.7536261325536145},{x:.043929123673028744,y:.7522907110247322},{x:.04217336337061703,y:.7511294669445447},{x:.04052776127482757,y:.7494992850446065},{x:.03873719484660536,y:.7480298051533947},{x:.037401773317722896,y:.7464025893123053},{x:.03590629693874444,y:.7449211263687215},{x:.034610347337597366,y:.7430012269141045},{x:.033140867446385454,y:.7412106604858821},{x:.032148559730151835,y:.7393541833248057},{x:.030970837593177758,y:.7376094333079335},{x:.030074343103068113,y:.7354735969579864},{x:.02898242103699209,y:.733430754456429},{x:.028371360962449563,y:.7314163593515414},{x:.027556652268729623,y:.729475372026062},{x:.027094064670152376,y:.7272056777739226},{x:.02642166238185463,y:.7249890644907258},{x:.02621533264498147,y:.722894163516222},{x:.025794946192721373,y:.7208315299365354},{x:.02578404246766777,y:.7185152008594541},{x:.025556999999999996,y:.71621},{x:.025556999999999996,y:.05103000000000002}],[{x:.11555699999999999,y:.414971805397996},{x:.11555699999999999,y:.6752310456989574},{x:.20767337575712835,y:.6838660911730216},{x:.3217031184787672,y:.6763972896549704},{x:.3925929523867085,y:.6571807523203506},{x:.4185706758911827,y:.6444513238436673},{x:.46361487793542,y:.6038578374443203},{x:.4814895996448674,y:.5649247767123354},{x:.48580725170954087,y:.5042413131675768},{x:.4723746184159119,y:.474255736718963},{x:.45098032059796866,y:.45734081304228297},{x:.40480552914494095,y:.4389833995595593},{x:.3301954695220376,y:.42427584033215343},{x:.22404845814303564,y:.41571952231013837},{x:.11555699999999999,y:.414971805397996}]],Q:[[{x:.012134510452571898,y:.39776120903599943},{x:.012467756958298536,y:.3937322544040442},{x:.012734737801221134,y:.38969836671479857},{x:.012831073490929856,y:.38933975275179394},{x:.012861682585025715,y:.38896968840207613},{x:.0716656825850257,y:.06709568840207614},{x:.07243605319674906,y:.06440524795975149},{x:.07301096718930201,y:.06166637692330789},{x:.07364750148994079,y:.06017438890024393},{x:.07409402290033937,y:.05861495861744442},{x:.07537446994903126,y:.05612650608452361},{x:.07647266436288541,y:.053552421842995857},{x:.07738804025928744,y:.05221328363312273},{x:.0781302116420243,y:.05077092937167972},{x:.07987152826568633,y:.04858009458346291},{x:.08145080010539194,y:.04626971775068952},{x:.16096480010539196,y:-.04855928224931053},{x:.16315500529851779,y:-.05070373085173594},{x:.16521251383898505,y:-.052975804178533654},{x:.1663001767861927,y:-.05378319510572523},{x:.1672680674520078,y:-.05473086511953138},{x:.1698345496348827,y:-.056406820906963286},{x:.172295783242646,y:-.058233836978172464},{x:.17352006120728586,y:-.058813521600477286},{x:.17465423537351554,y:-.059554156299027654},{x:.17749836607515132,y:-.06069721323044178},{x:.18026874092294012,y:-.06200896084304842},{x:.2672567409229401,y:-.09317596084304836},{x:.2695830047845554,y:-.09375972267138269},{x:.2718475349769373,y:-.09454977610873284},{x:.2738508793967248,y:-.09483071995927067},{x:.27581299058749986,y:-.09532309988014809},{x:.2782084422243766,y:-.09544181332278269},{x:.28058359188359605,y:-.09577489818042065},{x:.2826032520283714,y:-.0956596106656824},{x:.28462372036011635,y:-.09575974074040533},{x:.28699630390923414,y:-.09540884370631499},{x:.2893907973658866,y:-.09527215971995788},{x:.3753267973658866,y:-.08182715971995795},{x:.37840631600914065,y:-.08102976437129623},{x:.38152495221950905,y:-.08040256216817918},{x:.38266795913198753,y:-.07992627554804835},{x:.3838666954562622,y:-.07961588068444121},{x:.38673147789694834,y:-.07823302278004476},{x:.38966782930723504,y:-.07700945634885908},{x:.3906959547522998,y:-.07631933185595965},{x:.3918111026603398,y:-.07578103928710583},{x:.3943510569158511,y:-.07386586128072498},{x:.3969922811880835,y:-.07209295159323717},{x:.45217017177581864,y:-.026613783173476364},{x:.5097585536672307,y:-.09873256043298734},{x:.5159122791302333,y:-.10505326271144577},{x:.5231808703268614,y:-.11005198218579294},{x:.5312849993737013,y:-.11353662086994384},{x:.5399132291363312,y:-.11537326605347448},{x:.5487339815837399,y:-.1154913364919842},{x:.5574082801461085,y:-.11388629480473579},{x:.5656027763942881,y:-.11061982184365243},{x:.5730025604329874,y:-.10581744633276943},{x:.5793232627114457,y:-.0996637208697668},{x:.5843219821857929,y:-.09239512967313873},{x:.5878066208699438,y:-.08429100062629874},{x:.5896432660534744,y:-.07566277086366895},{x:.5897613364919841,y:-.06684201841626024},{x:.5881562948047357,y:-.058167719853891554},{x:.5848898218436525,y:-.04997322360571205},{x:.5800874463327694,y:-.042573439567012816},{x:.5106129498444961,y:.04443049374200151},{x:.5474711182959175,y:.12365010382899572},{x:.5481373073434039,y:.1255496832776173},{x:.5490025186311253,y:.12736726941208848},{x:.5495935209593992,y:.1297019482663393},{x:.5503905347901464,y:.13197456307270286},{x:.5506733336355601,y:.13396760967066554},{x:.5511673266667299,y:.13591906574595297},{x:.5791213266667299,y:.32118306574595296},{x:.5792865967797204,y:.3243841932678159},{x:.5796238248970751,y:.32757179562983435},{x:.579513579388425,y:.3287806341158348},{x:.5795761658223595,y:.3299928748079828},{x:.5791137513174164,y:.3331647361616822},{x:.5788226293197903,y:.33635687958013644},{x:.5226546293197903,y:.6297998795801365},{x:.5219105438778229,y:.6323181740447382},{x:.521369234544533,y:.6348876981954499},{x:.5206636104444891,y:.6365383151545928},{x:.5201549436340621,y:.6382598551025291},{x:.5189338607071872,y:.6405845973766512},{x:.5179016631869613,y:.6429991446291672},{x:.5168875780620563,y:.6444803850133782},{x:.5160528293589531,y:.6460696100820955},{x:.5144016744792594,y:.6481114616238732},{x:.5129182555439367,y:.6502782422813739},{x:.4473292555439367,y:.7283852422813738},{x:.4454767413796947,y:.7301964293264013},{x:.4437773055972873,y:.732151966404103},{x:.44233025961343425,y:.7332727172827731},{x:.4410215211764534,y:.7345522595114605},{x:.4388512574885805,y:.735967237520439},{x:.4368029695300015,y:.737553656027496},{x:.4351650804791521,y:.7383705673253327},{x:.43363186277883553,y:.7393702013057781},{x:.431227251583759,y:.7403345934673514},{x:.4289088260065632,y:.7414909282302113},{x:.3168848260065632,y:.7842309282302113},{x:.31544522398579106,y:.7846236280557255},{x:.31406876767085296,y:.7851998529634103},{x:.3111991137964475,y:.7857818972901452},{x:.30837424253549156,y:.7865524758495462},{x:.30688569012846406,y:.7866567776362199},{x:.305423266132861,y:.7869533972381565},{x:.30249520063786056,y:.7869644160479279},{x:.2995742760667897,y:.7871690831124285},{x:.29809397750772,y:.7869809786010931},{x:.2966017859654652,y:.7869865939723252},{x:.2937278327647654,y:.7864261638184524},{x:.2908231043767717,y:.786057054147543},{x:.2894079467091229,y:.7855837720890787},{x:.28794333170435554,y:.785298167434039},{x:.16895933170435556,y:.7496931674340391},{x:.16685145995859063,y:.7488293371508981},{x:.16467103610787698,y:.748169732810473},{x:.1627799564873854,y:.7471607878174731},{x:.16079664289106937,y:.7463480029082842},{x:.1588977982379503,y:.7450895455041626},{x:.15688795304330724,y:.7440172356850165},{x:.15523004539103946,y:.7426587459550258},{x:.15344340707901263,y:.7414746531917952},{x:.15182656105367498,y:.739869930478983},{x:.1500645317387979,y:.7384261234461069},{x:.08134353173879794,y:.6698101234461069},{x:.07898814712174665,y:.6669445493412297},{x:.07654417665723892,y:.6641541443502993},{x:.0761910053095167,y:.6635415309608049},{x:.07574199244846258,y:.6629952594015535},{x:.07399091166125166,y:.6597252337561722},{x:.07213828241215867,y:.6565116506297859},{x:.07191141209628055,y:.6558419081228384},{x:.07157759918584938,y:.6552185349547689},{x:.07049811528111428,y:.6516697230205841},{x:.06930802275051184,y:.6481564579560907},{x:.013298022750511833,y:.4072474579560906},{x:.013249789700227431,y:.40687927578320093},{x:.013136451320225305,y:.40652566731159423},{x:.012677284531251238,y:.4025091147450468},{x:.012152162963867598,y:.3985006516980174},{x:.01217668547678935,y:.39813013424102855},{x:.012134510452571898,y:.39776120903599943}],[{x:.1030741934540208,y:.3959601630333355},{x:.15405220468618464,y:.6152256818322884},{x:.20562817178182732,y:.6667228451191239},{x:.2990925609035841,y:.6946913078929434},{x:.38591644511804135,y:.6615657918309754},{x:.4364618489221904,y:.6013735361946543},{x:.4889800495366121,y:.3269984766785998},{x:.4631403994395801,y:.1557472448128009},{x:.4478929247459949,y:.12297570323093639},{x:.3763894463327694,y:.21252056043298723},{x:.3702357208697667,y:.2188412627114457},{x:.36296712967313866,y:.22383998218579282},{x:.35486300062629866,y:.22732462086994373},{x:.34623477086366883,y:.22916126605347437},{x:.3374140184162602,y:.2292793364919841},{x:.3287397198538915,y:.22767429480473567},{x:.32054522360571197,y:.22440782184365232},{x:.31314543956701274,y:.21960544633276935},{x:.3068247372885543,y:.2134517208697667},{x:.30182601781420715,y:.20618312967313862},{x:.2983413791300562,y:.19807900062629863},{x:.2965047339465256,y:.18945077086366885},{x:.29638666350801585,y:.18063001841626014},{x:.2979917051952643,y:.17195571985389144},{x:.30125817815634764,y:.16376122360571194},{x:.3060605536672306,y:.1563614395670127},{x:.3960043024488616,y:.04372356068896105},{x:.3492507773512258,y:.005187991106938553},{x:.28681342879982186,y:-.004580559340762309},{x:.22209853619564562,y:.018606191220169738},{x:.15806156000107346,y:.09497717514193305},{x:.1030741934540208,y:.3959601630333355}]],R:[[{x:-.010088,y:.05588800000000005},{x:-.009223337618145366,y:.04710893550927426},{x:-.006662578963007905,y:.03866724554357101},{x:-.0025041325536145423,y:.030887339514117953},{x:.0030921948466053617,y:.024068194846605412},{x:.009911339514117913,y:.018471867446385508},{x:.01769124554357096,y:.014313421036992145},{x:.02613293550927423,y:.011752662381854684},{x:.034912,y:.01088800000000005},{x:.043691064490725774,y:.011752662381854684},{x:.05213275445642904,y:.014313421036992145},{x:.059912660485882105,y:.018471867446385515},{x:.06673180515339464,y:.024068194846605412},{x:.07232813255361453,y:.030887339514117953},{x:.0764865789630079,y:.03866724554357101},{x:.07904733761814536,y:.04710893550927428},{x:.079912,y:.05588800000000005},{x:.079912,y:.36648688236049143},{x:.25933152798675563,y:.3728389247505383},{x:.2598033776805002,y:.3702688775066002},{x:.2630584474090824,y:.36206984491555727},{x:.26785052379396923,y:.35466338703825},{x:.5319365237939692,y:.022999387038250052},{x:.5380814500271169,y:.016670129897313986},{x:.5453430800394999,y:.011661303295187019},{x:.5534423534621115,y:.008165393629206541},{x:.5620680197594453,y:.00631674674730745},{x:.5708885994130244,y:.006186405112428031},{x:.5795651224933998,y:.00777937768050025},{x:.5877641550844427,y:.011034447409082423},{x:.59517061296175,y:.015826523793969254},{x:.601499870102686,y:.021971450027116944},{x:.606508696704813,y:.02923308003949996},{x:.6100046063707935,y:.03733235346211146},{x:.6118532532526926,y:.04595801975944533},{x:.6119835948875719,y:.05477859941302443},{x:.6103906223194997,y:.06345512249339977},{x:.6071355525909176,y:.07165415508444274},{x:.6023434762060308,y:.07906061296174999},{x:.36492288462028066,y:.3772356888373974},{x:.45122307475864126,y:.3907421966461853},{x:.4517263325772421,y:.3908725352482557},{x:.4522445282141884,y:.3909141268943158},{x:.4559919550269364,y:.3919772876167318},{x:.459762859565968,y:.3929539131315124},{x:.46023101962685037,y:.3931799280437793},{x:.4607311441523136,y:.39332181547170203},{x:.5072261441523136,y:.41160281547170213},{x:.5099186672764574,y:.4129799887569096},{x:.5126912264123276,y:.4141879634543456},{x:.5138373975854011,y:.41498434320238026},{x:.5150799754049854,y:.4156198976243936},{x:.5174520892726079,y:.41749589411441484},{x:.5199357102894067,y:.4192215573713852},{x:.5536387102894067,y:.4479225573713852},{x:.5544422891842978,y:.4487559165260936},{x:.5553578681885658,y:.44946439490120116},{x:.5574982196806069,y:.4519250983842071},{x:.5597619879819907,y:.4542727608851649},{x:.5603875460278954,y:.4552468777427617},{x:.5611473151639865,y:.4561203635073251},{x:.5627664809673836,y:.45895134712470415},{x:.5645287453623273,y:.46169553923588524},{x:.5649522427143585,y:.46277297903182424},{x:.5655270044804562,y:.4637779046177677},{x:.5843050044804562,y:.5056739046177676},{x:.5856980535944053,y:.5098331481877504},{x:.5870956418010017,y:.5139908687307394},{x:.5870987900445207,y:.5140153439302019},{x:.587106627133701,y:.514038743222053},{x:.5876614810321307,y:.5183898384933372},{x:.5882210839336397,y:.522740325535193},{x:.5899430839336397,y:.580600325535193},{x:.589777587866933,y:.5830153029012521},{x:.5898269599494498,y:.5854354407122341},{x:.5894767504310368,y:.5874052295805413},{x:.5893399666658296,y:.589401226848592},{x:.5887065118476329,y:.5917375144207835},{x:.5882827897945603,y:.5941207819778186},{x:.5699357897945603,y:.6593647819778187},{x:.5695566600666073,y:.6603356321127045},{x:.5693270257483343,y:.6613522723710545},{x:.5679549854437747,y:.6644370937206254},{x:.5667268644118839,y:.6675819841936177},{x:.5661656160899001,y:.668460215174679},{x:.5657420574552864,y:.6694125215424361},{x:.5637945617300048,y:.6721703971299327},{x:.5619765010042908,y:.6750152648867381},{x:.5612547025465381,y:.6757671267898905},{x:.5606534967163777,y:.6766185026674012},{x:.5398464967163776,y:.7006785026674012},{x:.5387925287989109,y:.70167944573824},{x:.5378793324857355,y:.7028102896247742},{x:.535601038014175,y:.7047103734673366},{x:.5334498940671065,y:.7067532939324781},{x:.5322209035416287,y:.707529385222465},{x:.5311046373415733,y:.7084603444980107},{x:.5029396373415734,y:.7276033444980106},{x:.49917038563569516,y:.7296565217962586},{x:.49541206095977475,y:.7317296332429761},{x:.4611910609597748,y:.7464366332429762},{x:.457170688924302,y:.7477143925092122},{x:.45316143447737084,y:.7490266191763204},{x:.37177643447737085,y:.7670666191763205},{x:.36787988134157384,y:.7675363076101905},{x:.36399443936523473,y:.7680904503837813},{x:.2290834393652347,y:.7739614503837813},{x:.2260604581328276,y:.7737959747883908},{x:.2230330269857825,y:.7738173839936113},{x:.030818026985782503,y:.7562573839936113},{x:.028490934977474184,y:.7558115802948838},{x:.02613293550927423,y:.7555793376181453},{x:.024169339379190496,y:.7549836872441402},{x:.022154034015341384,y:.7545976128723226},{x:.01995862841458906,y:.7537063820373993},{x:.01769124554357096,y:.7530185789630078},{x:.01588158498580211,y:.7520512952425895},{x:.013980322522940947,y:.7512794726091756},{x:.012000971535783972,y:.7499770641392344},{x:.009911339514117913,y:.7488601325536145},{x:.008325158769029223,y:.7475583876576994},{x:.006611003657363959,y:.7464304774736483},{x:.004923772632206568,y:.7447669421957904},{x:.0030921948466053617,y:.7432638051533946},{x:.0017904499506900475,y:.7416776244083056},{x:.0003292762098528329,y:.7402369716294513},{x:-.001000995511218774,y:.7382762382714833},{x:-.0025041325536145423,y:.7364446604858821},{x:-.0034714162740331275,y:.7346349999281129},{x:-.004623456556617868,y:.732936968032819},{x:-.005545647377387794,y:.7307543864780955},{x:-.006662578963007905,y:.728664754456429},{x:-.007258229337013042,y:.7267011583263452},{x:-.008056863899357211,y:.7248110017280808},{x:-.008535534543753812,y:.7224904473617442},{x:-.009223337618145366,y:.7202230644907257},{x:-.009424464135908606,y:.7181809926864091},{x:-.009839001899660749,y:.7161713490432334},{x:-.009855757323261527,y:.7138019994682},{x:-.010088,y:.711444},{x:-.010088,y:.05588800000000005}],[{x:.079912,y:.45654326739466394},{x:.079912,y:.6703676283824797},{x:.22820062174801237,y:.6839146886946046},{x:.3561457472749752,y:.6783468266821017},{x:.42954781695254723,y:.662076342723345},{x:.4559144639404158,y:.6507448714849071},{x:.47563211893454127,y:.6373433067928232},{x:.48601322722124407,y:.6253391992627579},{x:.4997779385388953,y:.5763903343143285},{x:.4985264355495565,y:.5343392524542002},{x:.48755361344964526,y:.5098575528750181},{x:.467303195590932,y:.4926125823096997},{x:.43241084881177044,y:.4788935374345549},{x:.3509044963348569,y:.4661372945522357},{x:.079912,y:.45654326739466394}]],S:[[{x:.021897597226735628,y:.20918252956592975},{x:.022856530106274857,y:.20041326151782815},{x:.025507836686771486,y:.19199957102060095},{x:.07532383668677148,y:.0752955710206009},{x:.07606476437254353,y:.07394451179196875},{x:.07662717764446286,y:.07250992955787258},{x:.07818101321859919,y:.07008559601860773},{x:.07956562874320691,y:.06756079148160443},{x:.08055589829123208,y:.06638024029801701},{x:.0813873780598424,y:.06508294454561242},{x:.08338432112997196,y:.06300833217803187},{x:.0852348965856767,y:.0608021661408081},{x:.08643645249257384,y:.05983749092219001},{x:.08750504545666679,y:.05872733599970995},{x:.08986835462050304,y:.05708217099364391},{x:.09211377343035676,y:.05527942517977789},{x:.09348044057646428,y:.05456769785378441},{x:.09474508130770348,y:.05368734639231786},{x:.18347008130770348,y:.00406434639231789},{x:.18531117162778632,y:.0032602675504258996},{x:.18705570252460849,y:.0022638899609980986},{x:.18934358471290644,y:.0014991491478438968},{x:.19155425509545604,y:.0005336596975895336},{x:.19351683738147718,y:.0001042099085839361},{x:.19542223123106015,y:-.0005326814704223887},{x:.1978153459361366,y:-.0008363843304376121},{x:.20017189655491793,y:-.0013520417748285815},{x:.2021805498702545,y:-.0013903589963945293},{x:.20417358345551592,y:-.0016432887864569548},{x:.36640558345551594,y:-.006196288786456984},{x:.3683537351453612,y:-.006059465175549666},{x:.37030515940756886,y:-.006136660097762148},{x:.3727431942064551,y:-.005751182385354602},{x:.3752054496398049,y:-.005578251970786187},{x:.37708947517888647,y:-.005063991846688501},{x:.37901846335331396,y:-.004758999502412188},{x:.3813344490261288,y:-.00390529164215812},{x:.3837156558614866,y:-.003255321831637216},{x:.38546315320491126,y:-.002383387922517842},{x:.38729557535780434,y:-.001707928996501587},{x:.5134735753578044,y:.059451071003498376},{x:.5144073364238021,y:.06002293670994077},{x:.5154151369003129,y:.060451046875811966},{x:.5181619939873726,y:.06232241135953579},{x:.5209964106485654,y:.06405830049148753},{x:.5218006642926897,y:.06480134570578519},{x:.5227055800155168,y:.06541784197435321},{x:.5250345719141375,y:.06778913394790613},{x:.5274758708842278,y:.07004463571609586},{x:.5281197100899656,y:.07093030562736781},{x:.5288869656553633,y:.07171149639276676},{x:.5307085905129939,y:.07449158843544039},{x:.5326629540416582,y:.07718002517181716},{x:.5331216364294024,y:.07817428398206286},{x:.5337217466362741,y:.07909014852127505},{x:.5349660004312154,y:.08217220325496363},{x:.5363583234240663,y:.08519025984344057},{x:.5366142220868877,y:.08625489874416871},{x:.5370241250365293,y:.08727024089657527},{x:.5783351250365293,y:.22800124089657534},{x:.5784689928995229,y:.22870739358153944},{x:.5787167010683089,y:.22938208824013706},{x:.5792894483007394,y:.23303529403132756},{x:.5799781923062021,y:.23666841715613338},{x:.579971724381043,y:.23738711763976203},{x:.5800830465086156,y:.23809717369609615},{x:.5799320834693805,y:.24179192160438975},{x:.5798988062915618,y:.2454896025769029},{x:.5797522511369868,y:.24619323160266243},{x:.5797229091764134,y:.2469113620006918},{x:.5788540372904492,y:.2505056649360105},{x:.5781000177526308,y:.2541258039501414},{x:.5778190074010411,y:.2547873214491718},{x:.5776501289474114,y:.2554859288404322},{x:.5462891289474114,y:.3454679288404322},{x:.5453940585085517,y:.34740151578805634},{x:.5446999978282894,y:.3494160105998292},{x:.5435456407901493,y:.3513945829466735},{x:.5425833616033817,y:.3534733584203385},{x:.5413282655917657,y:.35519517245680393},{x:.5402545326513293,y:.3570355547940282},{x:.5387363559437135,y:.3587509055417339},{x:.537387017705137,y:.36060200657115166},{x:.5358201287566253,y:.36204587934864135},{x:.5344079865107593,y:.36364142435019586},{x:.5325843328131388,y:.3650276335315076},{x:.5308997898345437,y:.36657992334222783},{x:.5290813226127058,y:.36769036763963614},{x:.5273850388959807,y:.368979759405903},{x:.44286903889598056,y:.42100375940590296},{x:.4391930936098881,y:.42279580082266366},{x:.4355432374645799,y:.42464039733796655},{x:.4352309585303121,y:.42472736117212373},{x:.4349395777453148,y:.4248694107387315},{x:.430984654780085,y:.42590987723258605},{x:.42704506666901776,y:.42700697873237736},{x:.18802361397643091,y:.46887992641475673},{x:.1445277950559712,y:.506325930968192},{x:.1345999941059918,y:.5433489412625321},{x:.1668438673565076,y:.6442112383308392},{x:.2418447705661005,y:.6964178007533797},{x:.3847076342900009,y:.6886954406015322},{x:.4475324208368403,y:.608018765726417},{x:.4536085342974724,y:.6016234190133417},{x:.4608155671913789,y:.5965363480257236},{x:.46887655728619765,y:.5929530460487544},{x:.47748172525324006,y:.5910112173678703},{x:.48630037931336645,y:.5907854853702875},{x:.49499362353660437,y:.5922845248100812},{x:.5032273814226823,y:.5954507284422511},{x:.5106852342735829,y:.6001624208368403},{x:.5170805809866582,y:.6062385342974724},{x:.5221676519742764,y:.6134455671913789},{x:.5257509539512455,y:.6215065572861976},{x:.5276927826321296,y:.63011172525324},{x:.5279185146297124,y:.6389303793133664},{x:.5264194751899187,y:.6476236235366044},{x:.5232532715577489,y:.6558573814226824},{x:.5185415791631597,y:.663315234273583},{x:.4431175791631597,y:.760171234273583},{x:.4420344490669973,y:.7613112710002186},{x:.44110391182703096,y:.7625789282836855},{x:.4390031114098716,y:.7645018722698176},{x:.4370414657025276,y:.7665665809866583},{x:.43575673751534005,y:.767473404028016},{x:.4345967726198766,y:.768535164822443},{x:.4321611907321885,y:.7700113141492059},{x:.4298344328086211,y:.7716536519742764},{x:.42839747791415833,y:.7722924126294288},{x:.42705266216361437,y:.7731074740629288},{x:.4243758968514515,y:.7740801011395291},{x:.42177344271380235,y:.7752369539512456},{x:.4202394824828045,y:.7755831050064366},{x:.4187614963922926,y:.7761201447252115},{x:.4159464142454535,y:.7765518720385514},{x:.41316827474676,y:.7771787826321297},{x:.4115962584106506,y:.7772190216964318},{x:.4100419001567639,y:.7774574015652649},{x:.23125890015676387,y:.7871214015652648},{x:.22961427991333744,y:.7870487065186679},{x:.22797320559841586,y:.7871788426312305},{x:.22521775007366066,y:.7868543723294609},{x:.22244596265035355,y:.7867318545526676},{x:.22084712542379714,y:.7863397068281228},{x:.21921219559556868,y:.7861471846952227},{x:.21657298639174055,y:.7852913862936938},{x:.21387836011908076,y:.7846304737606538},{x:.21238674832737245,y:.7839339433752962},{x:.2108207924222569,y:.7834261615145331},{x:.2083992528689725,y:.782071922865878},{x:.2058853407234555,y:.7808980140745921},{x:.20455827617124617,y:.7799238683005129},{x:.20312147299647784,y:.7791203404840283},{x:.10291447299647782,y:.7093683404840284},{x:.10181255131472464,y:.7084283417469311},{x:.10059641238964509,y:.7076416809983432},{x:.09846400643554813,y:.7055718520256913},{x:.09620311784593605,y:.7036431918911783},{x:.09530575393663021,y:.7025062807105057},{x:.09426645267874648,y:.7014974784931097},{x:.09257882390791694,y:.6990514089395268},{x:.09073764058529563,y:.6967187299857058},{x:.09007931964022471,y:.6954285972205445},{x:.08925679581402991,y:.6942364212378118},{x:.08807879885369768,y:.6915081121844703},{x:.08672807644060793,y:.6888610579553555},{x:.08633409736450004,y:.6874672826843552},{x:.08575996009935855,y:.6861375475907227},{x:.04484896009935855,y:.5581635475907226},{x:.04400698871411546,y:.5542371548008082},{x:.04309586967447821,y:.5503262293029391},{x:.04308290316808571,y:.5499278363503387},{x:.04299932697019912,y:.5495380927241992},{x:.04293953506277818,y:.5455228840020936},{x:.042808906634767226,y:.5415093553341928},{x:.04287391188557095,y:.5411160877505585},{x:.04286797679041901,y:.5407175280315513},{x:.04359266213029085,y:.5367678055966908},{x:.04424754429113727,y:.532805911414652},{x:.06119154429113727,y:.4696179114146519},{x:.06126294463056804,y:.4694283141856516},{x:.06129777501412092,y:.46922873472253734},{x:.06281676603792068,y:.46530228011432895},{x:.0643004966052513,y:.46136236601319713},{x:.0644075135916399,y:.46119034135699993},{x:.06448061074086608,y:.46100139182805006},{x:.06673642807197144,y:.45744672339211917},{x:.06896028828319853,y:.453871975109843},{x:.06909880931377366,y:.45372413383751425},{x:.06920736414622189,y:.4535530754671619},{x:.07211331798967527,y:.4505067971180214},{x:.07499184614403663,y:.4474345902263458},{x:.07515654793327702,y:.4473166137950705},{x:.07529638874761438,y:.44717002026055797},{x:.1386943887476144,y:.392590020260558},{x:.14135607757337018,y:.39071931904916735},{x:.1439175788350931,y:.3887136217356019},{x:.14495796828078528,y:.38818782053421796},{x:.14591168674437638,y:.38751752344016943},{x:.1488871876674173,y:.38620203695812855},{x:.15179076253542007,y:.38473460266203335},{x:.15291373991533655,y:.3844218744952798},{x:.15397990142199966,y:.3839505182141148},{x:.15715486761053352,y:.383240799869195},{x:.1602889333309822,y:.3823680212676226},{x:.4030282434963717,y:.3398437611206276},{x:.46657219784598525,y:.30072914754350266},{x:.487912612564808,y:.23949853636308405},{x:.45628203537627,y:.13174508671722343},{x:.35793695341674575,y:.08407681754539842},{x:.21775140382412592,y:.0880110894972649},{x:.15207256592030022,y:.12474460286217379},{x:.10828216331322851,y:.2273324289793991},{x:.10404037125679308,y:.23506720851839558},{x:.09837110341432329,y:.2418258338591919},{x:.09149222656964323,y:.24734857482022213},{x:.08366809210217534,y:.25142319556354265},{x:.07519937711167927,y:.2538931106990613},{x:.06641152956592972,y:.2546634027732644},{x:.05764226151782814,y:.2537044698937252},{x:.04922857102060091,y:.2510531633132285},{x:.04149379148160447,y:.24681137125679312},{x:.034735166140808106,y:.24114210341432332},{x:.029212425179777887,y:.23426322656964324},{x:.025137804436457384,y:.22643909210217536},{x:.022667889300938757,y:.21797037711167933},{x:.021897597226735628,y:.20918252956592975}]],T:[[{x:-.022050999999999998,y:.729004},{x:-.021186337618145364,y:.7202249355092742},{x:-.018625578963007903,y:.711783245543571},{x:-.01446713255361454,y:.7040033395141179},{x:-.008870805153394636,y:.6971841948466053},{x:-.002051660485882085,y:.6915878674463855},{x:.005728245543570962,y:.6874294210369921},{x:.014169935509274232,y:.6848686623818546},{x:.022949,y:.684004},{x:.264284,y:.684004},{x:.264284,y:.05103000000000002},{x:.26514866238185464,y:.04225093550927423},{x:.2677094210369921,y:.03380924554357098},{x:.27186786744638547,y:.026029339514117924},{x:.27746419484660534,y:.019210194846605383},{x:.28428333951411794,y:.013613867446385479},{x:.292063245543571,y:.009455421036992116},{x:.30050493550927426,y:.006894662381854655},{x:.309284,y:.0060300000000000215},{x:.3180630644907258,y:.006894662381854655},{x:.32650475445642907,y:.009455421036992116},{x:.3342846604858821,y:.013613867446385486},{x:.34110380515339467,y:.019210194846605383},{x:.34670013255361454,y:.026029339514117924},{x:.3508585789630079,y:.03380924554357098},{x:.35341933761814537,y:.04225093550927425},{x:.354284,y:.05103000000000002},{x:.354284,y:.684004},{x:.579103,y:.684004},{x:.5878820644907258,y:.6848686623818546},{x:.596323754456429,y:.6874294210369921},{x:.6041036604858822,y:.6915878674463855},{x:.6109228051533947,y:.6971841948466053},{x:.6165191325536146,y:.7040033395141179},{x:.6206775789630079,y:.711783245543571},{x:.6232383376181454,y:.7202249355092742},{x:.6241030000000001,y:.729004},{x:.6232383376181454,y:.7377830644907257},{x:.6206775789630079,y:.746224754456429},{x:.6165191325536146,y:.7540046604858821},{x:.6109228051533947,y:.7608238051533946},{x:.6041036604858822,y:.7664201325536145},{x:.596323754456429,y:.7705785789630079},{x:.5878820644907258,y:.7731393376181454},{x:.579103,y:.774004},{x:.022949,y:.774004},{x:.014169935509274211,y:.7731393376181454},{x:.005728245543570935,y:.7705785789630079},{x:-.0020516604858820953,y:.7664201325536145},{x:-.008870805153394643,y:.7608238051533946},{x:-.01446713255361454,y:.7540046604858821},{x:-.018625578963007903,y:.746224754456429},{x:-.021186337618145364,y:.7377830644907257},{x:-.022050999999999998,y:.729004}]],U:[[{x:.027022176378557076,y:.7288780077818786},{x:.02808017637855708,y:.35099900778187865},{x:.02823473618726791,y:.3494735334648019},{x:.028192796744230073,y:.34794082288884604},{x:.035484796744230065,y:.24514582288884607},{x:.03612518708694976,y:.24139252668431194},{x:.03666424897987138,y:.2376233431565944},{x:.055316248979871384,y:.16148034315659432},{x:.05618736340037885,y:.15900518320818077},{x:.05685851158014249,y:.15646848905542057},{x:.057648252259250334,y:.15485425480263812},{x:.058244846291224776,y:.15315910934454152},{x:.0595821022437829,y:.15090145489330362},{x:.06073523897858293,y:.14854443712190207},{x:.09649723897858292,y:.0906284371219021},{x:.09834293286415725,y:.08820732921922435},{x:.10003759110096133,y:.08567820232322114},{x:.10101147458130413,y:.08470684222595504},{x:.10184538199049184,y:.08361295562088691},{x:.10412794610596264,y:.08159844564215248},{x:.10628345014049506,y:.07944852663140606},{x:.15306845014049508,y:.041154526631406},{x:.15518086878702558,y:.03974701384514513},{x:.15716842451696925,y:.03816808161035298},{x:.15884280372557036,y:.03730705230772802},{x:.16040964618671547,y:.03626305906247794},{x:.1627560674239954,y:.03529470367371844},{x:.16501346722603244,y:.034133863066459845},{x:.23490646722603245,y:.006476863066459913},{x:.23625924682734178,y:.006089880823813601},{x:.23754823013535448,y:.005525708919597472},{x:.24049103862888763,y:.004879315347967098},{x:.24338780663402787,y:.004050652809021178},{x:.24479008944495417,y:.003935020529692536},{x:.24616436977860445,y:.0036331571990539033},{x:.3343553697786044,y:-.006825842800946093},{x:.3363658265006992,y:-.006865793301669296},{x:.3383604992721398,y:-.007120376900508131},{x:.34076517153289726,y:-.0069532142518240045},{x:.3431751712391958,y:-.00700110421331946},{x:.3451547915551648,y:-.0066480664270605625},{x:.3471608040448924,y:-.0065086169201366215},{x:.4090588040448924,y:.003962383079863387},{x:.4119620232343868,y:.004752615784895447},{x:.4149089852784979,y:.005359710588792872},{x:.4162090298953196,y:.005908616535408058},{x:.4175706649775032,y:.0062792425557079215},{x:.42026393287145114,y:.0076206811274584655},{x:.4230358315454356,y:.008791034549085273},{x:.4738028315454356,y:.03637303454908527},{x:.4760785863358737,y:.0379161826666043},{x:.4784624107710392,y:.03928649177082543},{x:.47972093897980134,y:.04038599604431689},{x:.48110410464379305,y:.04132389563682743},{x:.48303507818089647,y:.043281370330868374},{x:.4851057640535682,y:.045090410406577325},{x:.5154867640535682,y:.07740541040657731},{x:.5155903820373309,y:.07753992155387555},{x:.5157174079857786,y:.07765259073212467},{x:.5182811318880063,y:.08103290449336144},{x:.5208701788099869,y:.08439386230433626},{x:.5209455639802052,y:.08454600372347547},{x:.521048168494406,y:.08468128952824439},{x:.5340921684944061,y:.10592328952824437},{x:.5341054861393935,y:.10595068243490303},{x:.5341238592672674,y:.10597497562685786},{x:.5360339092314592,y:.10991723311331511},{x:.5379492688231333,y:.11385691363208547},{x:.5379569864823256,y:.11388637833537296},{x:.5379702672090579,y:.11391378915988949},{x:.557924267209058,y:.16807278915988946},{x:.5580810067186996,y:.16867450001810444},{x:.5583366124011981,y:.1692413235937006},{x:.5591915686944892,y:.17293786157308777},{x:.5601479818122073,y:.1766094575809222},{x:.5601843216510317,y:.17723018509512725},{x:.5603244341481242,y:.17783598350956487},{x:.5696394341481241,y:.2495799835095649},{x:.569721927352796,y:.25224539988339456},{x:.5700114646960025,y:.2548963275892337},{x:.5750284646960026,y:.7275053275892338},{x:.5742570402937379,y:.7362930758081182},{x:.5717860339652341,y:.7447614724740409},{x:.5677104050979391,y:.752585081852262},{x:.5621867778235843,y:.7594632470219072},{x:.5554274220406369,y:.7651316439528263},{x:.5476920960011455,y:.7693724393298378},{x:.5392780639467868,y:.7720226617648687},{x:.5305086724107663,y:.7729804646960026},{x:.5217209241918819,y:.7722090402937379},{x:.5132525275259592,y:.7697380339652341},{x:.505428918147738,y:.7656624050979391},{x:.4985507529780929,y:.7601387778235843},{x:.49288235604717384,y:.753379422040637},{x:.48864156067016223,y:.7456440960011456},{x:.48599133823513135,y:.7372300639467868},{x:.4850335353039975,y:.7284606724107663},{x:.48004487037154997,y:.258520878697574},{x:.4717248917269394,y:.19444051929027983},{x:.4550625667192203,y:.14921575933773623},{x:.4467624246683876,y:.135699076001046},{x:.42448554918380393,y:.11200409455592171},{x:.3866565267646711,y:.09145137140181527},{x:.33852910612300163,y:.08330987698295},{x:.2625775703514966,y:.09231733933890664},{x:.20464797458906397,y:.11524036210229632},{x:.16911733402594603,y:.14432255403825953},{x:.14104265103985364,y:.1897890642955865},{x:.12498883901236212,y:.25532548983758135},{x:.11807553704626646,y:.35278200048003916},{x:.11702182362144292,y:.7291299922181214},{x:.11613258476624799,y:.737906601393955},{x:.11354820087598706,y:.7463410885908555},{x:.10936798837422372,y:.7541093211959605},{x:.10375259048311052,y:.7609127703867312},{x:.09691780379445152,y:.7664899834261845},{x:.0891262853276994,y:.770626631144951},{x:.08067745876799748,y:.7731637444910576},{x:.07189600778187862,y:.7740038236214429},{x:.06311939860604492,y:.773114584766248},{x:.05468491140914452,y:.770530200875987},{x:.04691667880403945,y:.7663499883742237},{x:.04011322961326877,y:.7607345904831105},{x:.03453601657381558,y:.7538998037944515},{x:.030399368855048972,y:.7461082853276993},{x:.027862255508942363,y:.7376594587679974},{x:.027022176378557076,y:.7288780077818786}]],V:[[{x:-.017163400590915968,y:.72836062945125},{x:-.016173311217885875,y:.7195948244454146},{x:-.01349212241321528,y:.7111906087794154},{x:.27875887758678475,y:.033216608779415485},{x:.2789749302503264,y:.03282594254600198},{x:.27911899522766415,y:.032403397706182537},{x:.2811076886540147,y:.028969490703698003},{x:.2830281292409603,y:.025496951748158487},{x:.28331624571443165,y:.0251559418405784},{x:.28353997693249255,y:.024769621764193565},{x:.2861603801951793,y:.021789671162821947},{x:.2887213787977949,y:.018758515442121357},{x:.2890704869266977,y:.018480266679882864},{x:.2893652865202418,y:.018145017430816868},{x:.2925166989914198,y:.015733541060992128},{x:.2956198378696305,y:.013260254189586457},{x:.29601652162435305,y:.013055459516578674},{x:.296371060610326,y:.012784164535463174},{x:.29993237527606087,y:.011033834081706148},{x:.30345840254303674,y:.009213463087028258},{x:.303887417589348,y:.00908999264768462},{x:.3042880712333465,y:.00889307764850001},{x:.3081224287682413,y:.00787115732855266},{x:.3119358411735324,y:.006773658047051503},{x:.31238070070379703,y:.0067362567411129665},{x:.3128120721109714,y:.0066212890568466964},{x:.3167721203052928,y:.006367050695504971},{x:.32072637054875,y:.006034599409084053},{x:.3211699788607,y:.006084704547762943},{x:.3216154906697884,y:.006056102322046737},{x:.325549047092249,y:.006579316156958459},{x:.3294921755545854,y:.0070246887821141385},{x:.32991748502957097,y:.007160374853030322},{x:.330360016471596,y:.007219237253358143},{x:.3341159167548444,y:.008499796470269213},{x:.33789639122058457,y:.00970587758678474},{x:.33828705745399834,y:.009921930250326543},{x:.33870960229381747,y:.01006599522766418},{x:.3421435092963017,y:.012054688654014527},{x:.34561604825184156,y:.013975129240960359},{x:.3459570581594215,y:.014263245714431577},{x:.34634337823580646,y:.014486976932492547},{x:.34932332883717915,y:.01710738019518028},{x:.35235448455787866,y:.01966837879779494},{x:.3526327333201171,y:.020017486926697612},{x:.35296798256918316,y:.020312286520241793},{x:.3553794589390082,y:.023463698991420194},{x:.3578527458104136,y:.026566837869630475},{x:.3580575404834214,y:.026963521624353053},{x:.35832883546453687,y:.02731806061032596},{x:.3600791659182934,y:.03087937527605991},{x:.3618995369129718,y:.03440540254303673},{x:.3620230073523154,y:.034834417589348},{x:.3622199223515,y:.0352350712333465},{x:.6163569223515,y:.7132090712333464},{x:.6186287109431533,y:.7217330721109714},{x:.6191938976779532,y:.7305364906697883},{x:.6180307627466418,y:.7392810164715959},{x:.6151840047723358,y:.7476306022938175},{x:.6107630230675074,y:.7552643782358064},{x:.6049377134797582,y:.7618889825691831},{x:.597931939389674,y:.7672498354645368},{x:.5900149287666535,y:.7711409223515},{x:.5814909278890286,y:.7734127109431533},{x:.5726875093302116,y:.7739778976779532},{x:.5639429835284039,y:.7728147627466418},{x:.5555933977061824,y:.7699680047723358},{x:.5479596217641935,y:.7655470230675074},{x:.5413350174308168,y:.7597217134797583},{x:.5359741645354631,y:.7527159393896741},{x:.5320830776484999,y:.7447989287666535},{x:.3171703309688009,y:.17146543337864517},{x:.06915612241321528,y:.7468173912205845},{x:.06488687075903964,y:.7545370482518415},{x:.059193621202205074,y:.7612754845578786},{x:.05229516213036956,y:.7667737458104136},{x:.04445659745696326,y:.7708205369129717},{x:.0359791588264676,y:.7732603419529485},{x:.027188629451250054,y:.773999400590916},{x:.01842282444541461,y:.7730093112178859},{x:.010018608779415478,y:.7703281224132152},{x:.0022989517481584835,y:.7660588707590397},{x:-.004439484557878664,y:.7603656212022051},{x:-.009937745810413578,y:.7534671621303695},{x:-.013984536912971763,y:.7456285974569633},{x:-.016424341952948517,y:.7371511588264675},{x:-.017163400590915968,y:.72836062945125}]],W:[[{x:-.04486424190193638,y:.7324968210037928},{x:-.04468360364824366,y:.7236771280279449},{x:.03511539635175633,y:.05429612802794491},{x:.03538914303981033,y:.053053468981350556},{x:.035486899606724354,y:.05178477579191172},{x:.03633616861564037,y:.04875449496443272},{x:.037013200434797444,y:.04568114375463893},{x:.03752411791055629,y:.04451576738270255},{x:.03786750587531561,y:.043290523137271594},{x:.039291634880795206,y:.040484152470619886},{x:.040555238800576446,y:.03760193719815913},{x:.041283692791972554,y:.036558628261303676},{x:.041859515947665654,y:.035423918409107566},{x:.04380377647068911,y:.032949305154171604},{x:.045605392901094464,y:.030368987735599786},{x:.046523389329760155,y:.02948784001117424},{x:.047309519115439125,y:.028487270815480248},{x:.049699194314460494,y:.02643951297186818},{x:.05196958814642765,y:.024260253558522238},{x:.05304184892442764,y:.02357512905942291},{x:.054008074813295476,y:.022747151833295932},{x:.056751330810561565,y:.021204943586542027},{x:.059403252082379655,y:.019510489895534},{x:.060588570829346225,y:.019047717572039012},{x:.06169776130235942,y:.01842415101594414},{x:.06468917630833097,y:.01744675856409077},{x:.06762071317273859,y:.01630222750050557},{x:.06887353875396018,y:.016079591433481148},{x:.07008306824328207,y:.01568439886046892},{x:.07320768385688461,y:.015309382847312772},{x:.07630617899620724,y:.014758758098063603},{x:.07757836602719018,y:.014784814066709744},{x:.07884175299285809,y:.014633182505734484},{x:.08197949198836539,y:.014874954586349768},{x:.08512587197205507,y:.014939396351756326},{x:.08636853101864941,y:.015213143039810315},{x:.08763722420808827,y:.015310899606724347},{x:.09066750503556728,y:.016160168615640357},{x:.09374085624536103,y:.01683720043479743},{x:.09490623261729739,y:.017348117910556266},{x:.09613147686272838,y:.017691505875315594},{x:.09893784752938008,y:.01911563488079519},{x:.10182006280184085,y:.020379238800576432},{x:.10286337173869634,y:.02110769279197256},{x:.1039980815908924,y:.02168351594766564},{x:.10647269484582828,y:.023627776470689026},{x:.1090530122644002,y:.025429392901094458},{x:.10993415998882576,y:.026347389329760156},{x:.11093472918451973,y:.02713351911543911},{x:.11298248702813177,y:.02952319431446044},{x:.11516174644147774,y:.03179358814642764},{x:.11584687094057705,y:.032865848924427614},{x:.11667484816670405,y:.03383207481329547},{x:.118217056413458,y:.03657533081056164},{x:.11991151010446596,y:.039227252082379635},{x:.12037428242796094,y:.040412570829346184},{x:.12099784898405583,y:.041521761302359406},{x:.2862381791186236,y:.4176126753554925},{x:.4644074439049092,y:.03214939722735514},{x:.46457066699968924,y:.031871550040082325},{x:.46468087848244366,y:.03156873942729889},{x:.4668033610072479,y:.028070937443703255},{x:.4688757411162635,y:.024543219843286366},{x:.46909003322228215,y:.024302554657928657},{x:.4692572024422568,y:.02402706365982141},{x:.47202128937582516,y:.021010546759784428},{x:.47474207284479647,y:.017954914566682648},{x:.47499919883659564,y:.017760680011347015},{x:.4752169015744166,y:.01752309559247584},{x:.47851637060601154,y:.015103786828781735},{x:.4817809992520572,y:.012637666274559728},{x:.4820710779219699,y:.012497326674279732},{x:.48233094798351184,y:.012306779070622963},{x:.4860390023686124,y:.010577651122297159},{x:.4897220183436901,y:.008795813836836655},{x:.4900339021311097,y:.008714762363747632},{x:.4903259528556443,y:.008578574212853553},{x:.49430009414373083,y:.007606076497244536},{x:.4982599612093785,y:.006576997488159493},{x:.4985816645952609,y:.006558348904918078},{x:.4988946726372282,y:.006481753841050326},{x:.5029821768073245,y:.006303258899985619},{x:.5070667194929276,y:.00606648509648134},{x:.5073858795965667,y:.006110956057683261},{x:.5077078162324508,y:.006096897586191266},{x:.5117516027915979,y:.006719264880154805},{x:.5158038544123874,y:.0072838953667157535},{x:.5161082060899873,y:.007389776878261636},{x:.5164266994754154,y:.007438795258320738},{x:.5202713679739276,y:.008838107561233023},{x:.5241356027726449,y:.01018244390490916},{x:.524413449959918,y:.010345666999689355},{x:.5247162605727012,y:.010455878482443691},{x:.5282140625562944,y:.012578361007246536},{x:.5317417801567137,y:.014650741116263542},{x:.5319824453420714,y:.01486503322228222},{x:.5322579363401786,y:.01503220244225683},{x:.535274453240215,y:.01779628937582467},{x:.5383300854333174,y:.020517072844796484},{x:.5385243199886531,y:.020774198836595797},{x:.5387619044075241,y:.0209919015744166},{x:.5411812131712181,y:.024291370606011366},{x:.5436473337254403,y:.027555999252057217},{x:.5437876733257202,y:.027846077921969747},{x:.5439782209293771,y:.028105947983511865},{x:.5457073488777034,y:.03181400236861376},{x:.5474891861631633,y:.0354970183436901},{x:.5475702376362523,y:.03580890213110964},{x:.5477064257871465,y:.03610095285564429},{x:.548678923502756,y:.040075094143733274},{x:.5497080025118405,y:.04403496120937851},{x:.5497266510950819,y:.04435666459526063},{x:.5498032461589497,y:.04466967263722821},{x:.6466002461589497,y:.7226436726372282},{x:.6469851024138088,y:.7314568162324507},{x:.6456432047416794,y:.7401756994754154},{x:.6426261215175564,y:.7484652605727011},{x:.6380497975577433,y:.7560069363401786},{x:.6320900984255835,y:.7625109044075241},{x:.6249760520164882,y:.7677272209293771},{x:.6169810471443558,y:.7714554257871464},{x:.6084123273627718,y:.7735522461589497},{x:.5995991837675493,y:.7739371024138088},{x:.5908803005245846,y:.7725952047416793},{x:.5825907394272989,y:.7695781215175563},{x:.5750490636598214,y:.7650017975577432},{x:.5685450955924759,y:.7590420984255835},{x:.563328779070623,y:.7519280520164882},{x:.5596005742128536,y:.7439330471443557},{x:.5575037538410503,y:.7353643273627718},{x:.4822251865940539,y:.2081071670095049},{x:.3260455560950909,y:.5459966027726448},{x:.3245096626856286,y:.5486110836728201},{x:.32313748405233433,y:.5513150815908924},{x:.32228015650766817,y:.5524062697730983},{x:.32157725888373645,y:.5536027801567136},{x:.3195608173147473,y:.5558673865996665},{x:.3176874808845609,y:.5582517291845196},{x:.31663374639442166,y:.5591546941850146},{x:.31571092715520355,y:.5601910854333173},{x:.3132914281453504,y:.5620187898634509},{x:.3109889251867045,y:.563991848166704},{x:.30977927817660644,y:.5646718895469083},{x:.3086720007479428,y:.5655083337254402},{x:.3059424242873038,y:.566828898486493},{x:.3032992386976406,y:.5683148489840557},{x:.30198016522380455,y:.5687458331350992},{x:.3007309816563099,y:.5693501861631632},{x:.29779622383750376,y:.570112862691949},{x:.29491393175671793,y:.571054601139531},{x:.29353612307299787,y:.5712199655821879},{x:.29219303879062153,y:.5715690025118404},{x:.28916588071079274,y:.5717444815770724},{x:.2861552470071419,y:.5721058174942654},{x:.2847716515285703,y:.5719992073657418},{x:.2833862805070725,y:.5720795149035186},{x:.28038305415357795,y:.5716610529431293},{x:.27735977579191173,y:.5714281003932755},{x:.27602356431680025,y:.5710536126610233},{x:.27464914558761266,y:.5708621046332842},{x:.27178526326499086,y:.5698657829057354},{x:.26886552313727163,y:.5690474941246844},{x:.26762804552325165,y:.5684195201422382},{x:.26631739722735515,y:.5679635560950907},{x:.26370291632718046,y:.5664276626856288},{x:.2609989184091076,y:.5650554840523343},{x:.25990773022690183,y:.5641981565076682},{x:.2587112198432863,y:.5634952588837364},{x:.25644661340033337,y:.5614788173147471},{x:.2540622708154803,y:.5596054808845607},{x:.2531593058149851,y:.5585517463944213},{x:.2521229145666826,y:.5576289271552034},{x:.2502952101365493,y:.5552094281453507},{x:.24832215183329598,y:.5529069251867045},{x:.2476421104530918,y:.5516972781766065},{x:.24680566627455972,y:.5505900007479427},{x:.245485101513507,y:.5478604242873037},{x:.24399915101594416,y:.5452172386976405},{x:.10495542809967917,y:.22875042455884986},{x:.04468360364824366,y:.734330871972055},{x:.04278579956520255,y:.742945856245361},{x:.03924376119942353,y:.7510250628018409},{x:.034193607098905524,y:.7582580122644001},{x:.02782941185357234,y:.7643667464414777},{x:.020395747917620333,y:.7691165101044659},{x:.012178286827261426,y:.7723247724994944},{x:.003492821003792758,y:.7738682419019364},{x:-.00532687197205508,y:.7736876036482436},{x:-.013941856245361059,y:.7717897995652026},{x:-.022021062801840872,y:.7682477611994235},{x:-.029254012264400202,y:.7631976070989055},{x:-.035362746441477744,y:.7568334118535723},{x:-.04011251010446598,y:.7493997479176203},{x:-.04332077249949441,y:.7411822868272614},{x:-.04486424190193638,y:.7324968210037928}]],X:[[{x:-.03582341524240513,y:.7325834270170574},{x:-.035659804156077404,y:.7237634017461555},{x:-.03377863524060577,y:.7151447697271875},{x:-.030252200762440104,y:.7070587401552579},{x:-.02521601962092907,y:.6998160546121182},{x:.24190189785100796,y:.3863717955888736},{x:-.0190039697420246,y:.08021800391719859},{x:-.024040163260448045,y:.07297532698032597},{x:-.027566611556706647,y:.06488930343468059},{x:-.029447795200430175,y:.056270674630427356},{x:-.029611421359170286,y:.047450649639130975},{x:-.028051201971409197,y:.03876817707487998},{x:-.024827095393237467,y:.030556919489131844},{x:-.02006300223235442,y:.02313243090598055},{x:-.013942003917198569,y:.016780030257975413},{x:-.006699326980325947,y:.011743836739551976},{x:.0013866965653194212,y:.00821738844329338},{x:.010005325369572668,y:.006336204799569846},{x:.018825350360869044,y:.0061725786408297345},{x:.02750782292512003,y:.007732798028590823},{x:.03571908051086817,y:.010956904606762553},{x:.04314356909401947,y:.0157209977676456},{x:.049495969742024595,y:.021841996082801452},{x:.3010259353438819,y:.31699385831754345},{x:.5525549803790709,y:.021842054612118165},{x:.558907370566982,y:.01572104544144637},{x:.5663318510088331,y:.010956939592969957},{x:.5745431030849405,y:.007732818982704524},{x:.5832255729829426,y:.006172584757594898},{x:.5920455982538445,y:.006336195843922615},{x:.6006642302728125,y:.008217364759394247},{x:.6087502598447422,y:.011743799237559922},{x:.6159929453878819,y:.016779980379070948},{x:.6221139545585537,y:.023132370566981995},{x:.6268780604070301,y:.03055685100883309},{x:.6301021810172955,y:.0387681030849405},{x:.6316624152424052,y:.04745057298294264},{x:.6314988041560774,y:.05627059825384449},{x:.6296176352406058,y:.06488923027281246},{x:.6260912007624402,y:.07297525984474214},{x:.6210550196209291,y:.08021794538788188},{x:.36015009139561527,y:.3863716945525663},{x:.6272689697420246,y:.6998159960828014},{x:.632305163260448,y:.7070586730196741},{x:.6358316115567066,y:.7151446965653194},{x:.6377127952004301,y:.7237633253695727},{x:.6378764213591702,y:.7325833503608691},{x:.6363162019714091,y:.74126582292512},{x:.6330920953932374,y:.7494770805108681},{x:.6283280022323544,y:.7569015690940195},{x:.6222070039171985,y:.7632539697420246},{x:.6149643269803259,y:.7682901632604481},{x:.6068783034346805,y:.7718166115567067},{x:.5982596746304273,y:.7736977952004301},{x:.5894396496391309,y:.7738614213591702},{x:.58075717707488,y:.7723012019714092},{x:.5725459194891318,y:.7690770953932374},{x:.5651214309059804,y:.7643130022323544},{x:.5587690302579753,y:.7581920039171985},{x:.30102605390274134,y:.4557496318238965},{x:.04328401962092907,y:.7581919453878818},{x:.03693162943301802,y:.7643129545585536},{x:.029507148991166913,y:.76907706040703},{x:.021295896915059523,y:.7723011810172955},{x:.012613427017057378,y:.7738614152424051},{x:.003793401746155514,y:.7736978041560774},{x:-.004825230272812429,y:.7718166352406057},{x:-.012911259844742107,y:.7682902007624401},{x:-.02015394538788185,y:.7632540196209291},{x:-.02627495455855365,y:.756901629433018},{x:-.031039060407030063,y:.7494771489911669},{x:-.034263181017295495,y:.7412658969150595},{x:-.03582341524240513,y:.7325834270170574}]],Y:[[{x:-.02688005049839745,y:.731186349993587},{x:-.02644216088936969,y:.7223756821949907},{x:-.024293809188388457,y:.7138197369324374},{x:-.020517555346512936,y:.7058473143841377},{x:-.015258518681138845,y:.6987647902776368},{x:.25043465103960333,y:.4059541390643743},{x:.26029423204414154,y:.04978477430584237},{x:.26140149479875585,y:.04103299828270508},{x:.26419486861258723,y:.03266540142918031},{x:.26856700569651215,y:.025003545799746604},{x:.27434988727431814,y:.01834187220942495},{x:.28132128045004745,y:.012936385038381841},{x:.28921327849355916,y:.008994814127168342},{x:.2977225963459245,y:.006668631835443931},{x:.30652222569415766,y:.00604723204414153},{x:.3152740017172949,y:.007154494798755871},{x:.32364159857081976,y:.009947868612587236},{x:.3313034542002534,y:.014320005696512164},{x:.3379651277905751,y:.020102887274318144},{x:.3433706149616182,y:.027074280450047443},{x:.3473121858728317,y:.03496627849355913},{x:.3496383681645561,y:.04347559634592452},{x:.3502597679558585,y:.05227522569415767},{x:.34045421751128274,y:.4064927803087797},{x:.6166036868780955,y:.6970396048261934},{x:.6220250193382449,y:.7039986829780357},{x:.6259845336177533,y:.7118816938899454},{x:.6283300678033804,y:.7203856978734211},{x:.6289714843317633,y:.7291838908244783},{x:.6278841339254269,y:.7379381631220915},{x:.6251098028506934,y:.7463120929913156},{x:.620755107094902,y:.7539838750034306},{x:.6149873951738065,y:.7606586868780956},{x:.6080283170219642,y:.7660800193382449},{x:.6001453061100546,y:.7700395336177532},{x:.5916413021265788,y:.7723850678033803},{x:.5828431091755216,y:.7730264843317632},{x:.5740888368779085,y:.7719391339254268},{x:.5657149070086843,y:.7691648028506933},{x:.5580431249965694,y:.7648101070949019},{x:.5513683131219045,y:.7590423951738065},{x:.29567976193894085,y:.4900232412279098},{x:.051392518681138845,y:.7592432097223631},{x:.04485280102201476,y:.765163657957578},{x:.03728372005126494,y:.7696945108160528},{x:.028976151305805796,y:.7726616501633681},{x:.02024934999358704,y:.7739510504983974},{x:.011438682194990706,y:.7735131608893697},{x:.002882736932437466,y:.7713648091883885},{x:-.0050896856158622154,y:.7675885553465129},{x:-.012172209722363214,y:.7623295186811389},{x:-.01809265795757798,y:.7557898010220148},{x:-.022623510816052815,y:.7482207200512649},{x:-.025590650163368103,y:.7399131513058058},{x:-.02688005049839745,y:.731186349993587}]],Z:[[{x:.008711000000000003,y:.05103000000000002},{x:.00905278632815029,y:.04755978517413498},{x:.009251179439517476,y:.04407842782316871},{x:.009484424544736794,y:.043177288815328604},{x:.009575662381854637,y:.04225093550927423},{x:.01058788670939069,y:.038914079093048184},{x:.01146164687940622,y:.0355383196233794},{x:.011866213744552238,y:.0346999996115786},{x:.012136421036992098,y:.03380924554357098},{x:.013780184150668652,y:.030733981057728944},{x:.015295733266009179,y:.0275935480126292},{x:.015856074613338045,y:.026850263164785913},{x:.01629486744638546,y:.026029339514117927},{x:.01850700045157689,y:.023333847648222647},{x:.020606096809669634,y:.02054942610843994},{x:.02130067903544657,y:.01992974044441782},{x:.021891194846605365,y:.019210194846605383},{x:.024586686712500538,y:.016998061841414044},{x:.027188663217490867,y:.014676655565200585},{x:.02799079391630549,y:.014204383257544266},{x:.028710339514117916,y:.013613867446385479},{x:.03178560399995988,y:.01197010433270896},{x:.03479046815396611,y:.010200923661400137},{x:.035669321892902964,y:.00989421387003954},{x:.036490245543570964,y:.009455421036992116},{x:.03982710195979704,y:.008443196709456058},{x:.04311937851852794,y:.007294230264082269},{x:.04404118144126662,y:.007164869674294513},{x:.04493193550927423,y:.006894662381854655},{x:.048402150335139275,y:.006552876053704368},{x:.05185531895677298,y:.006068277970413476},{x:.052784646693945655,y:.006121237837117864},{x:.053711,y:.0060300000000000215},{x:.548341,y:.0060300000000000215},{x:.5571200644907257,y:.006894662381854655},{x:.565561754456429,y:.009455421036992116},{x:.5733416604858821,y:.013613867446385479},{x:.5801608051533946,y:.019210194846605383},{x:.5857571325536145,y:.026029339514117927},{x:.5899155789630078,y:.03380924554357098},{x:.5924763376181453,y:.04225093550927425},{x:.593341,y:.05103000000000002},{x:.5924763376181453,y:.05980906449072579},{x:.5899155789630078,y:.06825075445642906},{x:.5857571325536145,y:.07603066048588211},{x:.5801608051533946,y:.08284980515339466},{x:.5733416604858821,y:.08844613255361455},{x:.565561754456429,y:.09260457896300792},{x:.5571200644907257,y:.09516533761814538},{x:.548341,y:.09603000000000002},{x:.14224494935878249,y:.09603000000000002},{x:.5846943444347994,y:.7024816632174908},{x:.5851666167424556,y:.7032837939163054},{x:.5857571325536145,y:.7040033395141179},{x:.5874008956672913,y:.7070786039999603},{x:.5891700763385999,y:.7100834681539662},{x:.5894767861299605,y:.7109623218929031},{x:.5899155789630078,y:.711783245543571},{x:.5909278032905438,y:.7151201019597967},{x:.5920767697359177,y:.7184123785185279},{x:.5922061303257055,y:.7193341814412667},{x:.5924763376181453,y:.7202249355092742},{x:.5928181239462956,y:.7236951503351391},{x:.5933027220295866,y:.7271483189567729},{x:.5932497621628822,y:.7280776466939456},{x:.593341,y:.729004},{x:.5929992136718496,y:.7324742148258655},{x:.5928008205604824,y:.7359555721768313},{x:.5925675754552632,y:.7368567111846711},{x:.5924763376181453,y:.7377830644907257},{x:.5914641132906093,y:.7411199209069517},{x:.5905903531205937,y:.7444956803766206},{x:.5901857862554476,y:.7453340003884216},{x:.5899155789630078,y:.746224754456429},{x:.5882718158493319,y:.74930001894227},{x:.5867562667339908,y:.7524404519873709},{x:.5861959253866618,y:.7531837368352144},{x:.5857571325536145,y:.7540046604858821},{x:.5835449995484229,y:.7567001523517777},{x:.5814459031903303,y:.7594845738915601},{x:.5807513209645536,y:.760104259555582},{x:.5801608051533946,y:.7608238051533946},{x:.5774653132874991,y:.7630359381585863},{x:.5748633367825091,y:.7653573444347994},{x:.5740612060836946,y:.7658296167424556},{x:.5733416604858821,y:.7664201325536145},{x:.5702663960000408,y:.7680638956672906},{x:.5672615318460339,y:.7698330763385999},{x:.5663826781070966,y:.7701397861299606},{x:.565561754456429,y:.7705785789630079},{x:.5622248980402041,y:.7715908032905435},{x:.558932621481472,y:.7727397697359177},{x:.5580108185587332,y:.7728691303257055},{x:.5571200644907257,y:.7731393376181454},{x:.553649849664861,y:.7734811239462956},{x:.5501966810432269,y:.7739657220295866},{x:.5492673533060543,y:.7739127621628822},{x:.548341,y:.774004},{x:.053711,y:.774004},{x:.04493193550927421,y:.7731393376181454},{x:.036490245543570936,y:.7705785789630079},{x:.028710339514117906,y:.7664201325536145},{x:.021891194846605358,y:.7608238051533946},{x:.01629486744638546,y:.7540046604858821},{x:.012136421036992098,y:.746224754456429},{x:.009575662381854637,y:.7377830644907257},{x:.008711000000000003,y:.729004},{x:.009575662381854637,y:.7202249355092742},{x:.012136421036992098,y:.711783245543571},{x:.01629486744638546,y:.7040033395141179},{x:.021891194846605365,y:.6971841948466053},{x:.028710339514117916,y:.6915878674463855},{x:.036490245543570964,y:.6874294210369921},{x:.04493193550927423,y:.6848686623818546},{x:.053711,y:.684004},{x:.4598070506412174,y:.684004},{x:.017357655565200567,y:.07755233678250915},{x:.016885383257544267,y:.07675020608369457},{x:.01629486744638546,y:.07603066048588211},{x:.014651104332708876,y:.07295539600004002},{x:.012881923661400112,y:.06995053184603389},{x:.012575213870039523,y:.06907167810709706},{x:.012136421036992098,y:.06825075445642906},{x:.011124196709456038,y:.06491389804020298},{x:.00997523026408225,y:.06162162148147208},{x:.009845869674294495,y:.0606998185587334},{x:.009575662381854637,y:.05980906449072579},{x:.009233876053704348,y:.056338849664860746},{x:.008749277970413458,y:.05288568104322705},{x:.008802237837117845,y:.05195635330605437},{x:.008711000000000003,y:.05103000000000002}]],\"[\":[[{x:.152511,y:-.06942399999999993},{x:.15337566238185463,y:-.0782030644907257},{x:.1559364210369921,y:-.08664475445642897},{x:.16009486744638546,y:-.09442466048588202},{x:.16569119484660536,y:-.10124380515339457},{x:.1725103395141179,y:-.10684013255361446},{x:.18029024554357093,y:-.11099857896300783},{x:.1887319355092742,y:-.1135593376181453},{x:.197511,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.4486773376181454,y:-.06064493550927416},{x:.44611657896300794,y:-.05220324554357089},{x:.44195813255361455,y:-.04442333951411784},{x:.4363618051533946,y:-.03760419484660529},{x:.42954266048588213,y:-.032007867446385396},{x:.4217627544564291,y:-.027849421036992027},{x:.4133210644907258,y:-.025288662381854565},{x:.404542,y:-.024423999999999932},{x:.24251099999999998,y:-.024423999999999932},{x:.24251099999999998,y:.7147659999999999},{x:.404542,y:.7147659999999999},{x:.4133210644907258,y:.7156306623818546},{x:.4217627544564291,y:.7181914210369921},{x:.42954266048588213,y:.7223498674463854},{x:.4363618051533946,y:.7279461948466053},{x:.44195813255361455,y:.7347653395141178},{x:.44611657896300794,y:.7425452455435709},{x:.4486773376181454,y:.7509869355092742},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.197511,y:.804766},{x:.1887319355092742,y:.8039013376181453},{x:.18029024554357093,y:.8013405789630078},{x:.1725103395141179,y:.7971821325536145},{x:.16569119484660536,y:.7915858051533946},{x:.16009486744638546,y:.7847666604858821},{x:.1559364210369921,y:.776986754456429},{x:.15337566238185463,y:.7685450644907257},{x:.152511,y:.7597659999999999},{x:.152511,y:-.06942399999999993}]],\"\\\\\":[[{x:.017522651058219416,y:.7303997530123288},{x:.018114599516431164,y:.7215980934307649},{x:.020412292453046287,y:.7130810386853763},{x:.024327430817071727,y:.7051758944136092},{x:.5013774308170718,y:-.059077105586390885},{x:.5067595580368128,y:-.06606654912342862},{x:.5134018419815468,y:-.0718716915303336},{x:.521049023404313,y:-.07626944443996993},{x:.5294072254116235,y:-.07909080467430848},{x:.5381552469876711,y:-.08022734894178067},{x:.5469569065692351,y:-.07963540048356893},{x:.5554739613146237,y:-.0773377075469538},{x:.5633791055863908,y:-.07342256918292836},{x:.5703685491234285,y:-.06804044196318723},{x:.5761736915303335,y:-.06139815801845332},{x:.5805714444399699,y:-.05375097659568702},{x:.5833928046743084,y:-.04539277458837649},{x:.5845293489417805,y:-.03664475301232898},{x:.5839374004835688,y:-.02784309343076498},{x:.5816397075469537,y:-.01932603868537643},{x:.5777245691829282,y:-.011420894413609283},{x:.10067456918292828,y:.7528321055863908},{x:.09529244196318712,y:.7598215491234285},{x:.0886501580184532,y:.7656266915303336},{x:.08100297659568693,y:.7700244444399699},{x:.07264477458837638,y:.7728458046743084},{x:.06389675301232887,y:.7739823489417805},{x:.055095093430764894,y:.7733904004835688},{x:.04657803868537634,y:.7710927075469537},{x:.03867289441360919,y:.7671775691829282},{x:.03168345087657147,y:.7617954419631872},{x:.025878308469666468,y:.7551531580184532},{x:.021480555560030153,y:.747505976595687},{x:.01865919532569161,y:.7391477745883763},{x:.017522651058219416,y:.7303997530123288}]],\"]\":[[{x:.15250999999999998,y:-.06942399999999993},{x:.15337466238185463,y:-.0782030644907257},{x:.1559354210369921,y:-.08664475445642897},{x:.16009386744638546,y:-.09442466048588202},{x:.16569019484660535,y:-.10124380515339457},{x:.1725093395141179,y:-.10684013255361446},{x:.18028924554357095,y:-.11099857896300783},{x:.18873093550927422,y:-.1135593376181453},{x:.19751,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.19751,y:.804766},{x:.18873093550927422,y:.8039013376181453},{x:.18028924554357095,y:.8013405789630078},{x:.1725093395141179,y:.7971821325536145},{x:.16569019484660535,y:.7915858051533946},{x:.16009386744638546,y:.7847666604858821},{x:.1559354210369921,y:.776986754456429},{x:.15337466238185463,y:.7685450644907257},{x:.15250999999999998,y:.7597659999999999},{x:.15337466238185463,y:.7509869355092742},{x:.1559354210369921,y:.7425452455435709},{x:.16009386744638546,y:.7347653395141178},{x:.16569019484660535,y:.7279461948466053},{x:.1725093395141179,y:.7223498674463854},{x:.18028924554357095,y:.7181914210369921},{x:.18873093550927422,y:.7156306623818546},{x:.19751,y:.7147659999999999},{x:.35954200000000003,y:.7147659999999999},{x:.35954200000000003,y:-.024423999999999932},{x:.19751,y:-.024423999999999932},{x:.18873093550927422,y:-.025288662381854565},{x:.18028924554357095,y:-.027849421036992027},{x:.1725093395141179,y:-.03200786744638539},{x:.16569019484660535,y:-.03760419484660529},{x:.16009386744638546,y:-.04442333951411784},{x:.1559354210369921,y:-.052203245543570885},{x:.15337466238185463,y:-.06064493550927414},{x:.15250999999999998,y:-.06942399999999993}]],\"^\":[[{x:-.009830024293871129,y:.4771904357900641},{x:-.009184411720694952,y:.46839254975009553},{x:-.006834821991481832,y:.4598896653882279},{x:-.002871548521860348,y:.4520085437820153},{x:.002553102311361327,y:.44505205201500053},{x:.009230664218841726,y:.43928752416454453},{x:.016904522241296224,y:.4349364878031557},{x:.02527977431847106,y:.43216615081811305},{x:.034034564209935884,y:.43108297570612886},{x:.04283245024990444,y:.431728588279305},{x:.05133533461177206,y:.4340781780085181},{x:.05921645621798466,y:.4380414514781396},{x:.06617294798499941,y:.4434661023113613},{x:.30102423332324457,y:.6668931783680099},{x:.5358792969655858,y:.44346586927801307},{x:.5428358294884947,y:.4380412707099504},{x:.5507169808710617,y:.43407805645230807},{x:.5592198828854552,y:.4317285306064111},{x:.5680177737757447,y:.431082984132888},{x:.5767725555289304,y:.4321662250206897},{x:.5851477867919753,y:.43493662492998636},{x:.5928216121243246,y:.439287718945922},{x:.5994991307219868,y:.44505229696558585},{x:.6049237292900496,y:.45200882948849475},{x:.6088869435476919,y:.4598899808710617},{x:.6112364693935889,y:.4683928828854553},{x:.6118820158671119,y:.47719077377574476},{x:.6107987749793102,y:.4859455555289303},{x:.6080283750700135,y:.4943207867919753},{x:.6036772810540779,y:.5019946121243246},{x:.5979127030344141,y:.5086721307219868},{x:.33204070303441413,y:.7616071307219868},{x:.3294429315385385,y:.7636328335402047},{x:.3269493357811583,y:.7657854758354554},{x:.3259710287822201,y:.7663401706594313},{x:.32508417051150523,y:.7670317292900496},{x:.3221411194513825,y:.7685117087189752},{x:.3192754777587038,y:.7701365121968442},{x:.31820775306259985,y:.7704896904878621},{x:.3172030191289383,y:.7709949435476919},{x:.31402778830632944,y:.7718723248078522},{x:.310900225681529,y:.7729068491818869},{x:.30978411534954325,y:.7730449384962876},{x:.3087001171145447,y:.7733444693935889},{x:.30541472886927135,y:.7735855352151975},{x:.30214543579006414,y:.7739900242938711},{x:.3010238313163334,y:.7739077179367437},{x:.2999022262242552,y:.773990015867112},{x:.29663293618411596,y:.7735855022258356},{x:.2933475497500956,y:.7733444117206949},{x:.29226355376554153,y:.7730448726791859},{x:.29114744447106966,y:.7729067749793103},{x:.2880198896188706,y:.7718722271075298},{x:.28484466538822795,y:.7709948219914818},{x:.28383993525062523,y:.7704895613829726},{x:.2827722132080247,y:.7701363750700135},{x:.27990658372278143,y:.7685115500622604},{x:.2769635437820154,y:.7670315485218604},{x:.2760766907070934,y:.7663399832281829},{x:.2750983878756754,y:.765785281054078},{x:.27260480829144085,y:.7636326200241867},{x:.2700070520150006,y:.7616068976886387},{x:.004139052015000585,y:.5086718976886386},{x:-.001625475835455463,y:.5019943357811583},{x:-.0059765121968442594,y:.49432047775870375},{x:-.00874684918188691,y:.4859452256815289},{x:-.009830024293871129,y:.4771904357900641}]],_:[[{x:-.045,y:-.160601},{x:-.044135337618145365,y:-.16938006449072576},{x:-.041574578963007904,y:-.17782175445642903},{x:-.03741613255361454,y:-.1856016604858821},{x:-.03181980515339464,y:-.19242080515339463},{x:-.025000660485882086,y:-.19801713255361453},{x:-.017220754456429038,y:-.2021755789630079},{x:-.008779064490725769,y:-.20473633761814536},{x:0,y:-.20560099999999998},{x:.602052,y:-.20560099999999998},{x:.6108310644907258,y:-.20473633761814536},{x:.619272754456429,y:-.2021755789630079},{x:.6270526604858822,y:-.19801713255361453},{x:.6338718051533947,y:-.19242080515339463},{x:.6394681325536146,y:-.1856016604858821},{x:.6436265789630079,y:-.17782175445642903},{x:.6461873376181454,y:-.16938006449072576},{x:.6470520000000001,y:-.160601},{x:.6461873376181454,y:-.15182193550927423},{x:.6436265789630079,y:-.14338024554357096},{x:.6394681325536146,y:-.1356003395141179},{x:.6338718051533947,y:-.12878119484660536},{x:.6270526604858822,y:-.12318486744638546},{x:.619272754456429,y:-.1190264210369921},{x:.6108310644907258,y:-.11646566238185463},{x:.602052,y:-.115601},{x:0,y:-.115601},{x:-.00877906449072579,y:-.11646566238185463},{x:-.017220754456429066,y:-.1190264210369921},{x:-.025000660485882096,y:-.12318486744638546},{x:-.03181980515339464,y:-.12878119484660536},{x:-.03741613255361454,y:-.1356003395141179},{x:-.041574578963007904,y:-.14338024554357096},{x:-.044135337618145365,y:-.15182193550927423},{x:-.045,y:-.160601}]],a:[[{x:.029951000000000005,y:.25490100000000004},{x:.030216131121475042,y:.2522090785486062},{x:.03027571711850824,y:.2495047884160563},{x:.03064747136410999,y:.24782960757010103},{x:.03081566238185464,y:.24612193550927428},{x:.0316008669059687,y:.24353346308961055},{x:.0321868888075612,y:.2408927597850148},{x:.06949088880756119,y:.12701175978501478},{x:.07014919013856018,y:.12551652306247207},{x:.07061771774296957,y:.1239514111231075},{x:.07192248021942128,y:.12148874987750752},{x:.07304546130734973,y:.1189380599695235},{x:.0739828197765546,y:.11759998201998349},{x:.07474768294666384,y:.11615634846888903},{x:.07650781615341086,y:.11399555310027064},{x:.07810683439013419,y:.11171295672570881},{x:.07928722783725009,y:.11058345913436952},{x:.08031903331037206,y:.10931678199931477},{x:.15605303331037207,y:.033026781999314685},{x:.1581401110567553,y:.03130114899494214},{x:.16009013354595797,y:.02942202284781055},{x:.16153164054777758,y:.028496972085311937},{x:.16285166496406625,y:.027405552418137233},{x:.16523529439528092,y:.026120245637685162},{x:.16751444707429886,y:.024657656887915},{x:.24324744707429888,y:-.014037343112084925},{x:.24491821916217926,y:-.014693433733650136},{x:.24650124554357095,y:-.015539578963007873},{x:.24901423193062222,y:-.016301885049470277},{x:.2514585861893129,y:-.017261751399011975},{x:.25322525179064753,y:-.017579283958613606},{x:.2549429355092742,y:-.018100337618145335},{x:.2575563541074305,y:-.01835773688343746},{x:.2601410014196699,y:-.018822289810772906},{x:.26193566856615697,y:-.018789061710219754},{x:.263722,y:-.018964999999999968},{x:.376759,y:-.018964999999999968},{x:.3786816094876915,y:-.018775639493449434},{x:.3806133727303473,y:-.01879962736385296},{x:.3830607170270406,y:-.018344335046447002},{x:.3855380644907258,y:-.018100337618145335},{x:.3873867891740171,y:-.01753953311656589},{x:.3892861139289994,y:-.017186191753697247},{x:.3915976100664607,y:-.016262194563578608},{x:.3939797544564291,y:-.015539578963007873},{x:.3956835488825182,y:-.014628881868892333},{x:.3974774451646465,y:-.013911789983170525},{x:.4720844451646465,y:.0247832100168294},{x:.4742399118062311,y:.026185049737888398},{x:.4765030886255536,y:.02740538646642049},{x:.47792879308654873,y:.028584168427667152},{x:.47947957817165415,y:.02959274452399146},{x:.48132014276352414,y:.0313881589690925},{x:.48210100000000006,y:.032033776942416534},{x:.48210100000000006,y:.02603500000000003},{x:.4829656623818547,y:.01725593550927424},{x:.4855264210369921,y:.008814245543570985},{x:.4896848674463855,y:.0010343395141179344},{x:.4952811948466054,y:-.0057848051533946065},{x:.5021003395141179,y:-.01138113255361451},{x:.509880245543571,y:-.015539578963007873},{x:.5183219355092743,y:-.018100337618145335},{x:.527101,y:-.018964999999999968},{x:.5358800644907258,y:-.018100337618145335},{x:.544321754456429,y:-.015539578963007873},{x:.5521016604858822,y:-.011381132553614504},{x:.5589208051533947,y:-.0057848051533946065},{x:.5645171325536146,y:.0010343395141179344},{x:.5686755789630079,y:.008814245543570992},{x:.5712363376181454,y:.01725593550927426},{x:.5721010000000001,y:.02603500000000003},{x:.5721010000000001,y:.560059},{x:.5712363376181454,y:.5688380644907257},{x:.5686755789630079,y:.577279754456429},{x:.5645171325536146,y:.5850596604858821},{x:.5589208051533947,y:.5918788051533946},{x:.5521016604858822,y:.5974751325536145},{x:.544321754456429,y:.6016335789630078},{x:.5358800644907258,y:.6041943376181453},{x:.527101,y:.605059},{x:.5183219355092743,y:.6041943376181453},{x:.509880245543571,y:.6016335789630078},{x:.5021003395141179,y:.5974751325536145},{x:.4952811948466054,y:.5918788051533946},{x:.4896848674463855,y:.5850596604858821},{x:.4855264210369921,y:.577279754456429},{x:.4829656623818547,y:.5688380644907257},{x:.48210100000000006,y:.560059},{x:.48210100000000006,y:.5551612473179106},{x:.48111784979070266,y:.5559741116228759},{x:.47906658786156825,y:.5579287481398052},{x:.4777260461549398,y:.558778440075324},{x:.476502844006682,y:.5597897782764175},{x:.474008872962507,y:.5611345413953497},{x:.47161569478864906,y:.5626514387693977},{x:.3970086947886491,y:.6002454387693977},{x:.39545173243232984,y:.6008467903430146},{x:.3939797544564291,y:.6016335789630078},{x:.39134652561635536,y:.6024323601988234},{x:.3887796173011618,y:.6034237870938969},{x:.38713525366780027,y:.6037098355781862},{x:.3855380644907258,y:.6041943376181453},{x:.3827995979159321,y:.6044640530341434},{x:.3800885942320307,y:.6049356509696303},{x:.37842002129388747,y:.6048954036817589},{x:.376759,y:.605059},{x:.263722,y:.605059},{x:.26219504701733515,y:.604908608257877},{x:.26066140118579323,y:.6049547986330399},{x:.25781511370268967,y:.6044772224791067},{x:.2549429355092742,y:.6041943376181453},{x:.2534746624734083,y:.6037489418620853},{x:.2519614739213154,y:.6034950452430072},{x:.24926304753974865,y:.6024713624393285},{x:.24650124554357095,y:.6016335789630078},{x:.24514807736385555,y:.6009102955021357},{x:.24371349707866236,y:.6003660689935006},{x:.16798049707866233,y:.5627720689935006},{x:.1654642487594581,y:.5611982224645521},{x:.16285190958182658,y:.5597896123262998},{x:.16173267757498783,y:.5588642237445607},{x:.16050143578237863,y:.5580941146870384},{x:.15834057869520102,y:.5560596134829665},{x:.15605324108782545,y:.5541684273021619},{x:.08031924108782545,y:.47787942730216193},{x:.07924694249287094,y:.47656305714472025},{x:.07802357952480113,y:.4753857561141845},{x:.07646760484406812,y:.47315109973327435},{x:.07474784589903924,y:.4710398973462887},{x:.07395296229881854,y:.46953962579412084},{x:.07298278594430238,y:.4681462799973844},{x:.07189266871370663,y:.46565100631071576},{x:.07061782960809859,y:.46324486175923196},{x:.0701309079335922,y:.4616183434067253},{x:.06945120152585271,y:.46006249834135976},{x:.032147201525852716,y:.3450764983413597},{x:.031582343425880205,y:.34249647318004567},{x:.03081566238185464,y:.3399690644907258},{x:.030641204072877935,y:.33819775955415116},{x:.03026054307811779,y:.33645906634171463},{x:.03020987650767869,y:.3338184172918108},{x:.029951000000000005,y:.33119},{x:.029951000000000005,y:.25490100000000004}],[{x:.119951,y:.2620835578942187},{x:.119951,y:.3240730820964405},{x:.15174843963453788,y:.42208563822492473},{x:.21467365091165175,y:.4854719831046318},{x:.2742766075147511,y:.5150589999999999},{x:.3660620360389177,y:.5150589999999999},{x:.4245839309326211,y:.4855701837142105},{x:.48210100000000006,y:.4276323784447675},{x:.48210100000000006,y:.15956344905445352},{x:.4243936225653894,y:.10143318135145685},{x:.36578354074375496,y:.07103500000000003},{x:.2745522516182332,y:.07103500000000003},{x:.21486246778999646,y:.10153288315838035},{x:.15170083487400915,y:.1651582162341545},{x:.119951,y:.2620835578942187}]],b:[[{x:.03166000000000001,y:.04001500000000002},{x:.03252466238185464,y:.031235935509274233},{x:.0350854210369921,y:.022794245543570978},{x:.039243867446385465,y:.015014339514117927},{x:.04484019484660537,y:.008195194846605386},{x:.05165933951411792,y:.002598867446385482},{x:.05943924554357097,y:-.0015595789630078807},{x:.06788093550927424,y:-.004120337618145342},{x:.07666,y:-.0049849999999999756},{x:.08543906449072577,y:-.004120337618145342},{x:.09388075445642904,y:-.0015595789630078807},{x:.10166066048588211,y:.002598867446385489},{x:.10847980515339464,y:.008195194846605386},{x:.11407613255361454,y:.015014339514117927},{x:.1182345789630079,y:.022794245543570985},{x:.12079533761814537,y:.031235935509274254},{x:.12166,y:.04001500000000002},{x:.12166,y:.041388769861289504},{x:.12338630711141785,y:.04010106584896898},{x:.12512540667363178,y:.03853443023544684},{x:.12691331624345048,y:.03747016444054036},{x:.12858112311649333,y:.036226097502515},{x:.13069431360107225,y:.035219499067818724},{x:.13270563229917137,y:.034022247411931134},{x:.20674863229917137,y:-.0007227525880688923},{x:.20772794171481185,y:-.0010698043626217635},{x:.20864424554357097,y:-.0015595789630078669},{x:.21187816153300185,y:-.0025405766534664824},{x:.21506348921487128,y:-.003669406425619949},{x:.21609168791714548,y:-.0038187359083884913},{x:.21708593550927424,y:-.004120337618145342},{x:.22044909586509742,y:-.004451580001305548},{x:.22379344213248661,y:-.004937293022731791},{x:.22483101702188665,y:-.00488316156543817},{x:.225865,y:-.0049849999999999756},{x:.338045,y:-.0049849999999999756},{x:.33894984805462636,y:-.004895880245274822},{x:.33985755144997865,y:-.004948481373678995},{x:.343332465401001,y:-.004464230112452937},{x:.3468240644907258,y:-.004120337618145342},{x:.3476941397420575,y:-.003856403176165039},{x:.34859466384226984,y:-.0037309094409420443},{x:.351908335561611,y:-.0025780408502315546},{x:.35526575445642905,y:-.0015595789630078807},{x:.35606762040050133,y:-.0011309726863615623},{x:.35692635856942223,y:-.0008322067413783357},{x:.43209235856942224,y:.03391279325862169},{x:.4342218624454842,y:.03516383683568551},{x:.43645162164562873,y:.03622594356254809},{x:.4380158580934015,y:.037392738102356306},{x:.4396984532755396,y:.03838123120587913},{x:.4415429728374372,y:.04002368192832182},{x:.4435226810964235,y:.04150038501262054},{x:.5186856810964235,y:.11000138501262047},{x:.5200684051728882,y:.11153543836568303},{x:.5216038163727121,y:.1129166544997947},{x:.5230144082918019,y:.11480386048953693},{x:.5245918796416693,y:.11655397481445093},{x:.5256487561000858,y:.11832830784782436},{x:.5268852029038621,y:.11998252816661786},{x:.5279005150705119,y:.12210866485417524},{x:.5291062453835067,y:.12413290061668979},{x:.5297966590542814,y:.12607932670695898},{x:.530686625504748,y:.12794298045128052},{x:.567704625504748,y:.2301969804512806},{x:.5685418230641662,y:.23348712941632632},{x:.5695273376181453,y:.23673593550927427},{x:.5696276430094915,y:.2377543532384077},{x:.5698799976366801,y:.23874609563675617},{x:.5700592324586751,y:.24213635445346285},{x:.570392,y:.24551500000000004},{x:.570392,y:.314017},{x:.570065993218988,y:.3173270023951309},{x:.5699006262411136,y:.32064890697528625},{x:.569634437926433,y:.3217086568121163},{x:.5695273376181453,y:.3227960644907258},{x:.5685618455328773,y:.32597886535008125},{x:.5677515846008636,y:.32920467896823863},{x:.5307335846008636,y:.4324506789682387},{x:.5298196963817511,y:.43437967657309706},{x:.5291061063615623,y:.4363913954201699},{x:.5279358002551,y:.43835612690926706},{x:.5269566878799311,y:.4404227969757902},{x:.5256840310027916,y:.4421364386856148},{x:.5245916855370664,y:.44397028841230757},{x:.523060566435399,y:.4456689527415915},{x:.5216970801011935,y:.44750489697372575},{x:.5201145620561008,y:.4489373284986299},{x:.5186854393684929,y:.45052283528838016},{x:.44352243936849295,y:.5190228352883801},{x:.44134657552661755,y:.5206458300432604},{x:.43929971954126384,y:.5224287703137037},{x:.4378191137317927,y:.523276992839783},{x:.43645134158383936,y:.5242972253466508},{x:.43400065578620683,y:.5254645447348341},{x:.43164529517316985,y:.52681390451462},{x:.35647929517316984,y:.56056790451462},{x:.3558506134628383,y:.560778965311121},{x:.35526575445642905,y:.5610915789630079},{x:.351674330744245,y:.5621810254355277},{x:.34811645117964274,y:.5633754754766519},{x:.34745867349333664,y:.563459831081816},{x:.3468240644907258,y:.5636523376181454},{x:.3430891085149791,y:.5640201986736739},{x:.3393665669654169,y:.5644975898222324},{x:.3387049713307353,y:.5644519984974604},{x:.338045,y:.564517},{x:.225865,y:.564517},{x:.22507819619617456,y:.5644395065891945},{x:.22428916125732748,y:.5644893996719887},{x:.22069487882474298,y:.5640077875099223},{x:.21708593550927424,y:.5636523376181454},{x:.21632936813438544,y:.5634228354140474},{x:.21554576062305134,y:.5633178367349442},{x:.2121144991913443,y:.5621442688983362},{x:.20864424554357097,y:.5610915789630079},{x:.20794698905754733,y:.5607188876066144},{x:.20719892257093525,y:.5604630322059678},{x:.13315592257093525,y:.5267090322059678},{x:.13091775246116674,y:.5254099486077729},{x:.12858140317750869,y:.5242970714087468},{x:.1271119341080524,y:.5232009671819817},{x:.12552641140636125,y:.5222806946221156},{x:.12358468574515913,y:.5205699272235509},{x:.12166,y:.5191342684374534},{x:.12166,y:.7597659999999999},{x:.12079533761814537,y:.7685450644907257},{x:.1182345789630079,y:.776986754456429},{x:.11407613255361454,y:.7847666604858821},{x:.10847980515339464,y:.7915858051533946},{x:.10166066048588208,y:.7971821325536145},{x:.09388075445642904,y:.8013405789630078},{x:.08543906449072577,y:.8039013376181453},{x:.07666,y:.804766},{x:.06788093550927421,y:.8039013376181453},{x:.05943924554357094,y:.8013405789630078},{x:.05165933951411792,y:.7971821325536145},{x:.04484019484660537,y:.7915858051533946},{x:.039243867446385465,y:.7847666604858821},{x:.0350854210369921,y:.776986754456429},{x:.03252466238185464,y:.7685450644907257},{x:.03166000000000001,y:.7597659999999999},{x:.03166000000000001,y:.04001500000000002}],[{x:.12166,y:.16313400296117606},{x:.12166,y:.39738980161800674},{x:.17691400696537596,y:.447746357818324},{x:.23563826658076475,y:.474517},{x:.3284048540018634,y:.474517},{x:.3882155063572531,y:.44765846343288423},{x:.44979135555302596,y:.39154114946310603},{x:.480392,y:.30619363915535625},{x:.480392,y:.2534097446111891},{x:.44984564070758065,y:.16903221413717517},{x:.38802932067077023,y:.11269492399652684},{x:.3281476350434013,y:.08501500000000002},{x:.2358983461114888,y:.08501500000000002},{x:.1771018588393058,y:.11260550754658781},{x:.12166,y:.16313400296117606}]],c:[[{x:.0446,y:.25490100000000004},{x:.044822712444716174,y:.2526397626013558},{x:.04482893549381362,y:.2503675925637664},{x:.045254001037800355,y:.24826081602954003},{x:.045464662381854634,y:.24612193550927428},{x:.04612424100165128,y:.2439475961957434},{x:.04657362286091401,y:.24172029932495478},{x:.08145962286091402,y:.1278402993249547},{x:.08196610920465827,y:.1266269431042867},{x:.08230081253195312,y:.125355433994083},{x:.08366176737769918,y:.12256476567779218},{x:.08485778977199918,y:.11969953302126297},{x:.0855912581784792,y:.11860830168404396},{x:.08616758939694805,y:.11742652164475936},{x:.08804682625741464,y:.11495498435675963},{x:.08977884657839008,y:.1123781387363477},{x:.09071111026807865,y:.11145096769089737},{x:.09150692129220603,y:.11040433186669174},{x:.16233292129220603,y:.03411333186669174},{x:.16445877247754231,y:.03223237849112975},{x:.1664474797904295,y:.03020697184383589},{x:.16775479669311927,y:.029316055882572942},{x:.16893962068732413,y:.02826772347496185},{x:.17139158003796548,y:.02683764508339147},{x:.17373721213250964,y:.02523913360696181},{x:.24456521213250962,y:-.013455866393038113},{x:.2467886390083486,y:-.014400746043602006},{x:.24891924554357092,y:-.015539578963007873},{x:.25083834630720225,y:-.016121731815163746},{x:.25268405147305695,y:-.01690609278116076},{x:.2550490927002279,y:-.01739904776899966},{x:.2573609355092742,y:-.018100337618145335},{x:.259356733677244,y:-.018296906580526337},{x:.26131999536931183,y:-.018706117055345653},{x:.26373576373978486,y:-.0187282033967292},{x:.26614,y:-.018964999999999968},{x:.371854,y:-.018964999999999968},{x:.3744001776009888,y:-.018714223394882004},{x:.3769583677219744,y:-.018674567546095353},{x:.3787793796063011,y:-.01828290964379429},{x:.3806330644907258,y:-.018100337618145335},{x:.3830813939144215,y:-.01735764500708899},{x:.3855826926572475,y:-.01681967299983559},{x:.38729230564255435,y:-.01608027889939661},{x:.3890747544564291,y:-.015539578963007873},{x:.391331147776118,y:-.014333511606549179},{x:.393679431632842,y:-.013317897403369645},{x:.463449431632842,y:.02537710259663028},{x:.46566730315778443,y:.026909287408228903},{x:.46799586592077425,y:.028267352155161442},{x:.4692879686356918,y:.029410572352257962},{x:.47070743151062955,y:.03039118797094862},{x:.4725837728278355,y:.03232661755101331},{x:.4746026476214732,y:.03411286752390576},{x:.5454306476214732,y:.11040386752390575},{x:.5507700783887176,y:.11742598212342069},{x:.5546369668925095,y:.12535484002769406},{x:.5568827107762242,y:.13388573967401945},{x:.5574210073618384,y:.14269084337317217},{x:.5562311702134469,y:.15143177592795284},{x:.5533589241053942,y:.15977262820225266},{x:.5489146478448386,y:.16739286592077418},{x:.5430691324760942,y:.17399964762147313},{x:.5360470178765793,y:.17933907838871752},{x:.5281181599723059,y:.18320596689250943},{x:.5195872603259806,y:.1854517107762242},{x:.5107821566268278,y:.1859900073618383},{x:.5020412240720471,y:.18480017021344686},{x:.4937003717977473,y:.18192792410539416},{x:.4860801340792258,y:.17748364784483847},{x:.47947335237852684,y:.17163813247609414},{x:.41352572033101553,y:.10060392571412592},{x:.36021071976053953,y:.07103500000000003},{x:.27763077403847125,y:.07103500000000003},{x:.2233107097601157,y:.10071132697875086},{x:.16448866962379677,y:.16407213041308155},{x:.1346,y:.2616391113440561},{x:.1346,y:.3245158400933278},{x:.1645319520417492,y:.4231721923699009},{x:.2231207776861973,y:.4862793045993598},{x:.27734241586879393,y:.5150589999999999},{x:.3605019191882548,y:.5150589999999999},{x:.41371701660545657,y:.4863852380349392},{x:.47947395272027693,y:.4155592208902026},{x:.48608084903755494,y:.4097138350672089},{x:.4937011738972078,y:.40526970822380387},{x:.5020420824884065,y:.4023976256622846},{x:.5107830383716269,y:.4012079599048077},{x:.5195881315142611,y:.40174642913926084},{x:.5281189871247909,y:.40399234029494097},{x:.5360477692062626,y:.4078593842656568},{x:.5430697791097975,y:.41319895272027696},{x:.5489151649327911,y:.41980584903755497},{x:.5533592917761961,y:.42742617389720783},{x:.5562313743377155,y:.4357670824884066},{x:.5574210400951923,y:.4445080383716269},{x:.5568825708607392,y:.4533131315142611},{x:.5546366597050592,y:.4618439871247909},{x:.5507696157343432,y:.46977276920626265},{x:.5454300472797231,y:.4767947791097975},{x:.4746020472797231,y:.5530827791097974},{x:.47237947035514305,y:.5550491819442839},{x:.4702881116089302,y:.5571546051529963},{x:.469083054274185,y:.5579656532949738},{x:.4679951509624451,y:.5589281649327911},{x:.46543165406806053,y:.5604231806402761},{x:.46296973250196366,y:.5620801448811513},{x:.39319973250196366,y:.5996741448811513},{x:.39109075852725916,y:.6005560023370271},{x:.3890747544564291,y:.6016335789630078},{x:.38703122642603144,y:.6022534764138876},{x:.38506104886577136,y:.6030772968079529},{x:.3828205563795885,y:.6035307692082409},{x:.3806330644907258,y:.6041943376181453},{x:.3785078662851109,y:.6044036513718285},{x:.37641482574826585,y:.6048272797133635},{x:.3741289156203665,y:.604834940368031},{x:.371854,y:.605059},{x:.26614,y:.605059},{x:.26400488750824663,y:.6048487097743618},{x:.26185945318827825,y:.6048549475733314},{x:.2596259398913868,y:.6044174210783497},{x:.2573609355092742,y:.6041943376181453},{x:.2553078741931944,y:.60357154827667},{x:.25320244685788745,y:.6031591127457343},{x:.2510972070775077,y:.6022942563713519},{x:.24891924554357092,y:.6016335789630078},{x:.24702713339817148,y:.6006222239508241},{x:.24504262343928468,y:.5998069647561404},{x:.1742146234392847,y:.5622129647561404},{x:.17162525666515238,y:.5604936738034747},{x:.16894033563687538,y:.5589277936219744},{x:.16795812189104978,y:.5580587651214349},{x:.16686556037036515,y:.5573333247718834},{x:.16466136457832586,y:.5551419091149951},{x:.16233352162359432,y:.5530823147741101},{x:.09150752162359431,y:.47679431477411016},{x:.09067474586023959,y:.4756991081857825},{x:.08970182133886938,y:.4747262717047309},{x:.08801053269383365,y:.4721953272870651},{x:.08616805203977476,y:.4697722296898647},{x:.08556494203519081,y:.46853560069719197},{x:.08480050296804506,y:.467391648838166},{x:.08363547472152838,y:.4645793817614187},{x:.08230111970711389,y:.461843393160995},{x:.08195085264054901,y:.4605128647226562},{x:.08142427599227564,y:.4592417589140625},{x:.046538275992275634,y:.3442567589140625},{x:.04610669192420131,y:.34208755224892967},{x:.045464662381854634,y:.33997106449072584},{x:.04524807462900009,y:.3377720121321243},{x:.04481688692083,y:.3356047976316928},{x:.044816786846426454,y:.33339307378956023},{x:.0446,y:.33119200000000004},{x:.0446,y:.25490100000000004}]],d:[[{x:.03166100000000001,y:.24551500000000004},{x:.03199378652782141,y:.24213616168032864},{x:.032173060891358886,y:.2387457109778176},{x:.032425376075824915,y:.237754159461938},{x:.03252566238185464,y:.23673593550927427},{x:.03351123316568353,y:.23348694405135337},{x:.034348506941927405,y:.23019661460170962},{x:.0713675069419274,y:.12794261460170955},{x:.07225746993456125,y:.1260790095358921},{x:.0729478813145148,y:.12413263082247869},{x:.07415364826248581,y:.12210836405190925},{x:.07516899837159816,y:.11998219518580837},{x:.07640543228727825,y:.1183280219355851},{x:.07746229725612473,y:.11655373492181778},{x:.07903981058640837,y:.11480359733178996},{x:.08045044599662987,y:.11291636718401242},{x:.08198583537337678,y:.11153519469971836},{x:.08336853920306012,y:.1100011842405046},{x:.15853253920306012,y:.04150018424050468},{x:.16051177365736521,y:.04002385498013544},{x:.16235580937568672,y:.038381768082408986},{x:.16403890527939927,y:.03739293492543645},{x:.16560363358955885,y:.03622578962650935},{x:.16783285515961555,y:.03516395710594637},{x:.16996181351033893,y:.03391317596960988},{x:.24512381351033893,y:-.0008318240303901436},{x:.24598297689097734,y:-.0011307574341723537},{x:.24678524554357095,y:-.0015595789630078807},{x:.25014222995258023,y:-.0025779090504023904},{x:.2534554494825366,y:-.0037306956028641883},{x:.25435642329373365,y:-.003856270624521421},{x:.2552269355092742,y:-.004120337618145342},{x:.2587180827488419,y:-.0044641856090968535},{x:.2621925371943035,y:-.004948444626188875},{x:.2631006975177666,y:-.004895835488062085},{x:.264006,y:-.0049849999999999756},{x:.376189,y:-.0049849999999999756},{x:.37722298297811335,y:-.004883161565438171},{x:.3782605578675134,y:-.004937293022731791},{x:.3816049041349026,y:-.004451580001305548},{x:.3849680644907258,y:-.004120337618145342},{x:.3859623120828546,y:-.003818735908388489},{x:.38699051078512875,y:-.003669406425619949},{x:.39017583846699794,y:-.0025405766534665605},{x:.39340975445642906,y:-.0015595789630078807},{x:.39432605828518835,y:-.0010698043626217065},{x:.39530536770082864,y:-.0007227525880688923},{x:.46934836770082866,y:.034022247411931134},{x:.4713599418403825,y:.035219651121148166},{x:.4734733873673339,y:.03622640539423388},{x:.4751409393435705,y:.037470316580519136},{x:.4769285933263682,y:.03853443023544684},{x:.47866791375766776,y:.04010126481479184},{x:.480392,y:.041387347763641016},{x:.480392,y:.04001500000000002},{x:.4812566623818546,y:.031235935509274233},{x:.48381742103699205,y:.022794245543570978},{x:.48797586744638544,y:.015014339514117927},{x:.4935721948466053,y:.008195194846605386},{x:.5003913395141178,y:.002598867446385482},{x:.508171245543571,y:-.0015595789630078807},{x:.5166129355092742,y:-.004120337618145342},{x:.525392,y:-.0049849999999999756},{x:.5341710644907257,y:-.004120337618145342},{x:.542612754456429,y:-.0015595789630078807},{x:.5503926604858821,y:.002598867446385489},{x:.5572118051533946,y:.008195194846605386},{x:.5628081325536145,y:.015014339514117927},{x:.5669665789630078,y:.022794245543570985},{x:.5695273376181453,y:.031235935509274254},{x:.570392,y:.04001500000000002},{x:.570392,y:.7597659999999999},{x:.5695273376181453,y:.7685450644907257},{x:.5669665789630078,y:.776986754456429},{x:.5628081325536145,y:.7847666604858821},{x:.5572118051533946,y:.7915858051533946},{x:.5503926604858821,y:.7971821325536145},{x:.542612754456429,y:.8013405789630078},{x:.5341710644907257,y:.8039013376181453},{x:.525392,y:.804766},{x:.5166129355092742,y:.8039013376181453},{x:.508171245543571,y:.8013405789630078},{x:.5003913395141178,y:.7971821325536145},{x:.4935721948466053,y:.7915858051533946},{x:.48797586744638544,y:.7847666604858821},{x:.48381742103699205,y:.776986754456429},{x:.4812566623818546,y:.7685450644907257},{x:.480392,y:.7597659999999999},{x:.480392,y:.5191356905079497},{x:.47846953719699326,y:.5205697307992189},{x:.47652758859363875,y:.5222806946221157},{x:.47494232329576636,y:.5232008177790934},{x:.47347310730786674,y:.524296763521154},{x:.4711365045177018,y:.5254097994515352},{x:.46889807742906475,y:.5267090322059679},{x:.3948550774290648,y:.5604630322059679},{x:.3941070109424522,y:.5607188876066146},{x:.39340975445642906,y:.5610915789630079},{x:.389939500808656,y:.5621442688983361},{x:.38650823937694867,y:.5633178367349442},{x:.38572463186561456,y:.5634228354140474},{x:.3849680644907258,y:.5636523376181454},{x:.38135912117525683,y:.5640077875099224},{x:.3777648387426725,y:.5644893996719887},{x:.3769758038038255,y:.5644395065891945},{x:.376189,y:.564517},{x:.264006,y:.564517},{x:.26334558239453953,y:.5644519545432365},{x:.2626835384795895,y:.5644975635305632},{x:.2589614482177297,y:.5640201550156564},{x:.2552269355092742,y:.5636523376181454},{x:.25459189738202526,y:.5634597009082802},{x:.2539336765832372,y:.5633752751711479},{x:.2503762430229788,y:.5621808961392286},{x:.24678524554357095,y:.5610915789630079},{x:.24619999105363047,y:.5607787539207695},{x:.24557088842716707,y:.5605675378929096},{x:.17040888842716706,y:.5268135378929095},{x:.16805407047382528,y:.5254644267942322},{x:.16560391365212207,y:.5242973792806265},{x:.16423565717286473,y:.5232767996121171},{x:.1627545512703112,y:.5224282514648534},{x:.16070817900232118,y:.5206456609648356},{x:.15853278093215223,y:.5190230360586235},{x:.08336878093215222,y:.45052303605862365},{x:.08193967718325436,y:.44893757139643337},{x:.08035717944512263,y:.44750518296134467},{x:.07899365114577664,y:.44566921514174185},{x:.07746249136223225,y:.4439705283033309},{x:.07637015625263606,y:.44213672358948825},{x:.0750975108858587,y:.44042312810321155},{x:.07411836195358443,y:.43835642671545355},{x:.07294802033824888,y:.4363916652130956},{x:.07223443169362759,y:.4343799925343442},{x:.07132054574594202,y:.4324510425104215},{x:.034301545745942026,y:.32920504251042143},{x:.033491210284420626,y:.32597904935505284},{x:.03252566238185464,y:.3227960644907258},{x:.03241858101312289,y:.3217088491086539},{x:.03215243067755317,y:.32064928896150824},{x:.031987025628206905,y:.31732719375391183},{x:.03166100000000001,y:.314017},{x:.03166100000000001,y:.24551500000000004}],[{x:.121661,y:.25340994514221},{x:.121661,y:.3061934402169761},{x:.15226243948714763,y:.39154086238640384},{x:.21383969339611897,y:.4476587099299689},{x:.27364661400534074,y:.474517},{x:.3664157334192352,y:.474517},{x:.42513971513426946,y:.4477464845048247},{x:.480392,y:.3973901578243758},{x:.480392,y:.1631336467554691},{x:.4249518651426514,y:.1126053780239199},{x:.3661556538885112,y:.08501500000000002},{x:.2739038430667855,y:.08501500000000002},{x:.21402588591940364,y:.11269467351967463},{x:.15220815290195538,y:.1690325018607451},{x:.121661,y:.25340994514221}]],e:[[{x:.014571,y:.25490100000000004},{x:.014880046743786594,y:.2517631957525991},{x:.01501248842711947,y:.2486129918567585},{x:.015311525398480692,y:.24738231945287367},{x:.015435662381854634,y:.24612193550927428},{x:.016350926120166094,y:.24310471531940006},{x:.01709539726614681,y:.24004087979874045},{x:.05693639726614681,y:.12616087979874036},{x:.057746546207777846,y:.12441615547982068},{x:.05835851556287996,y:.12259245107255745},{x:.05959975008908581,y:.12042512406141898},{x:.06065161969764369,y:.11815983382640528},{x:.06178658068373706,y:.11660668611395116},{x:.06274257829935428,y:.11493741297405176},{x:.06438278737670251,y:.11305388338712186},{x:.06585638180708843,y:.11103732964943176},{x:.06727253892344205,y:.10973544513901749},{x:.06853582634733585,y:.1082847524971091},{x:.14942282634733584,y:.031993752497109104},{x:.15144602889400902,y:.03043003785468449},{x:.15333307828862142,y:.02870446646813117},{x:.1549277151407192,y:.027739074573098352},{x:.15640262843323158,y:.02659912765300345},{x:.15869202130341495,y:.025460166585296706},{x:.1608794538505091,y:.024135896643135493},{x:.2417664538505091,y:-.01455910335686443},{x:.24290092295632487,y:-.014970686687880902},{x:.2439652455435709,y:-.015539578963007873},{x:.24703931387581265,y:-.016472087396775758},{x:.2500591116803148,y:-.017567664555291233},{x:.2512520782049556,y:-.01775001548484057},{x:.2524069355092742,y:-.018100337618145335},{x:.25560385985111694,y:-.01841520718300011},{x:.2587793695882151,y:-.01890059980751419},{x:.2599849884971624,y:-.018846710691637396},{x:.261186,y:-.018964999999999968},{x:.381914,y:-.018964999999999968},{x:.3832466926412995,y:-.01883374123151461},{x:.3845848263549422,y:-.018885671038862982},{x:.3876272824249201,y:-.01840229079619376},{x:.39069306449072577,y:-.018100337618145335},{x:.3919745425012029,y:-.017711605513551366},{x:.39329709535359264,y:-.017501480567117658},{x:.39618678867610163,y:-.016433834605858122},{x:.39913475445642904,y:-.015539578963007873},{x:.4003157713548023,y:-.014908312279081314},{x:.40157191838151796,y:-.014444207562717595},{x:.48125191838151804,y:.02425079243728233},{x:.4833189661071789,y:.02551885102394819},{x:.4854901362659954,y:.026598980192539007},{x:.48706966813422276,y:.027819770278194},{x:.48877129863032925,y:.028863658687316496},{x:.4905512426555404,y:.030510612890229178},{x:.492469971641239,y:.03199356196515255},{x:.573357971641239,y:.10828456196515254},{x:.5791512607417543,y:.11493718669263933},{x:.5835353707163221,y:.12259219773755695},{x:.5863418226772573,y:.13095541731842886},{x:.5874627662495775,y:.13970545159690978},{x:.5868551242004307,y:.1485060416627534},{x:.584542247872996,y:.15701898577515713},{x:.5806130198074609,y:.16491713626599536},{x:.5752184380348474,y:.17189697164123896},{x:.5685658133073607,y:.17769026074175415},{x:.560910802262443,y:.1820743707163221},{x:.5525475826815711,y:.18488082267725728},{x:.5437975484030901,y:.18600176624957743},{x:.5349969583372466,y:.1853941242004306},{x:.5264840142248428,y:.183081247872996},{x:.5185858637340046,y:.17915201980746093},{x:.511606028358761,y:.17375743803484736},{x:.43573388395098006,y:.1021972341849065},{x:.3715652104827451,y:.07103500000000003},{x:.2713955768569904,y:.07103500000000003},{x:.2060606884620834,y:.10229012760321096},{x:.13826613078700495,y:.16623259795801962},{x:.104571,y:.2625454790108076},{x:.104571,y:.28619200000000006},{x:.542482,y:.28619200000000006},{x:.5512610644907258,y:.2870566623818547},{x:.559702754456429,y:.2896174210369921},{x:.5674826604858821,y:.2937758674463855},{x:.5743018051533947,y:.2993721948466054},{x:.5798981325536146,y:.3061913395141179},{x:.5840565789630079,y:.31397124554357103},{x:.5866173376181454,y:.32241293550927425},{x:.5874820000000001,y:.33119200000000004},{x:.5866173376181454,y:.33997106449072584},{x:.5840565789630079,y:.34841275445642905},{x:.5798981325536146,y:.35619266048588216},{x:.5743018051533947,y:.3630118051533947},{x:.5674826604858821,y:.3686081325536146},{x:.5660433240263831,y:.3693774739195968},{x:.5706944449992851,y:.3724210772554575},{x:.5769918122169339,y:.3785986803904119},{x:.5819629867044116,y:.38588613801169297},{x:.5854169290140312,y:.3940033972097681},{x:.5872209060798271,y:.40263851626586683},{x:.5873055920748429,y:.4114596523972937},{x:.5856677325637826,y:.4201278142894682},{x:.5823702695691338,y:.4283098893420352},{x:.5425292695691338,y:.5045998893420351},{x:.54083893518448,y:.5071829952333479},{x:.5393041274419548,y:.5098614335042745},{x:.5384286685906833,y:.5108662746451583},{x:.5376989227445426,y:.5119814449992851},{x:.5355371287009763,y:.5141851493557908},{x:.5335092744740836,y:.5165126960496618},{x:.49246227447408364,y:.5552086960496617},{x:.4903478252727746,y:.5568421196453192},{x:.48836639942178184,y:.5586345815458318},{x:.486865329057947,y:.5595323670561179},{x:.4854811710293013,y:.5606016367187369},{x:.48308868524123094,y:.5617911659624512},{x:.4807956399629947,y:.5631626292028359},{x:.40111563996299465,y:.6007566292028359},{x:.40009264564938235,y:.6011215754533451},{x:.39913475445642904,y:.6016335789630078},{x:.3959457374462889,y:.6026009566970012},{x:.3928069722488333,y:.6037206897930685},{x:.3917324370025758,y:.603879047413643},{x:.39069306449072577,y:.6041943376181453},{x:.38737659751458814,y:.6045209811048129},{x:.38407969371999856,y:.6050068561303112},{x:.38299491132800306,y:.6049525395264004},{x:.381914,y:.605059},{x:.261186,y:.605059},{x:.26023449599616577,y:.6049652850353624},{x:.2592798763752433,y:.6050186117946668},{x:.25585213857488087,y:.6045336605029273},{x:.2524069355092742,y:.6041943376181453},{x:.2514919972706982,y:.6039167941377678},{x:.2505453168634681,y:.6037828591890964},{x:.24727805138745723,y:.6026385076291858},{x:.2439652455435709,y:.6016335789630078},{x:.24312203363365809,y:.6011828728071931},{x:.24221967283726598,y:.6008668231955117},{x:.161332672837266,y:.5632728231955116},{x:.15891596978001063,y:.5618462817840929},{x:.15640337688314435,y:.5605963413854953},{x:.1551260781006526,y:.5596091689500753},{x:.15373589412748892,y:.5587885654418143},{x:.1516439317651508,y:.5569179592459522},{x:.1494234689111216,y:.555201853544281},{x:.06853646891112161,y:.47891385354428107},{x:.06722863655802509,y:.4774120673763562},{x:.06576662511800205,y:.47605991734502884},{x:.06433886916992998,y:.4740937424536807},{x:.06274309028364713,y:.4722613067803989},{x:.06175337150959475,y:.4705332315776763},{x:.06058324359446483,y:.4689218384474283},{x:.05956650326928079,y:.4667149016876259},{x:.05835887729241062,y:.4646063547351938},{x:.05772530643484857,y:.4627183994585984},{x:.05689202940417486,y:.4609096881637455},{x:.017051029404174856,y:.3459246881637455},{x:.016331419439147486,y:.342923979771159},{x:.015435662381854634,y:.33997106449072584},{x:.015304912520774374,y:.33864353887302173},{x:.014993833838408223,y:.33734636893611664},{x:.014873460143664087,y:.33426292937408214},{x:.014571,y:.33119200000000004},{x:.014571,y:.25490100000000004}],[{x:.12278767041868709,y:.376192},{x:.13831799224413532,y:.421014018902617},{x:.20587340146207272,y:.4847284236699839},{x:.27113246747276615,y:.5150589999999999},{x:.37183117966561724,y:.5150589999999999},{x:.4359272756482788,y:.48481767680255794},{x:.4662598881310508,y:.45622238914125884},{x:.5025937304308662,y:.3866481106579649},{x:.5074240772554575,y:.379266555000715},{x:.5104401600015575,y:.376192},{x:.12278767041868709,y:.376192}]],f:[[{x:.044112,y:.5239119999999999},{x:.04497666238185463,y:.5151329355092742},{x:.04753742103699209,y:.5066912455435709},{x:.051695867446385456,y:.4989113395141178},{x:.05729219484660536,y:.49209219484660527},{x:.0641113395141179,y:.4864958674463854},{x:.07189124554357096,y:.482337421036992},{x:.08033293550927423,y:.47977666238185457},{x:.089112,y:.47891199999999995},{x:.20304699999999998,y:.47891199999999995},{x:.20304699999999998,y:.05318299999999998},{x:.20391166238185462,y:.04440393550927419},{x:.2064724210369921,y:.03596224554357094},{x:.21063086744638546,y:.028182339514117884},{x:.21622719484660535,y:.021363194846605343},{x:.2230463395141179,y:.01576686744638544},{x:.23082624554357095,y:.011608421036992077},{x:.23926793550927422,y:.009047662381854615},{x:.248047,y:.008182999999999982},{x:.25682606449072576,y:.009047662381854615},{x:.26526775445642903,y:.011608421036992077},{x:.2730476604858821,y:.015766867446385446},{x:.2798668051533946,y:.021363194846605343},{x:.28546313255361455,y:.028182339514117884},{x:.2896215789630079,y:.03596224554357094},{x:.2921823376181454,y:.04440393550927421},{x:.293047,y:.05318299999999998},{x:.293047,y:.47891199999999995},{x:.459965,y:.47891199999999995},{x:.4687440644907258,y:.47977666238185457},{x:.4771857544564291,y:.482337421036992},{x:.48496566048588213,y:.4864958674463854},{x:.4917848051533946,y:.49209219484660527},{x:.49738113255361455,y:.4989113395141178},{x:.5015395789630079,y:.5066912455435709},{x:.5041003376181454,y:.5151329355092742},{x:.504965,y:.5239119999999999},{x:.5041003376181454,y:.5326910644907257},{x:.5015395789630079,y:.5411327544564289},{x:.49738113255361455,y:.548912660485882},{x:.4917848051533946,y:.5557318051533946},{x:.48496566048588213,y:.5613281325536145},{x:.4771857544564291,y:.5654865789630078},{x:.4687440644907258,y:.5680473376181453},{x:.459965,y:.568912},{x:.293047,y:.568912},{x:.293047,y:.6141229501499061},{x:.3322669208002554,y:.6884371453882767},{x:.4140490730325775,y:.7147659999999999},{x:.512941,y:.7147659999999999},{x:.5217200644907257,y:.7156306623818546},{x:.530161754456429,y:.7181914210369921},{x:.5379416604858821,y:.7223498674463854},{x:.5447608051533946,y:.7279461948466053},{x:.5503571325536145,y:.7347653395141178},{x:.5545155789630078,y:.7425452455435709},{x:.5570763376181453,y:.7509869355092742},{x:.557941,y:.7597659999999999},{x:.5570763376181453,y:.7685450644907257},{x:.5545155789630078,y:.776986754456429},{x:.5503571325536145,y:.7847666604858821},{x:.5447608051533946,y:.7915858051533946},{x:.5379416604858821,y:.7971821325536145},{x:.530161754456429,y:.8013405789630078},{x:.5217200644907257,y:.8039013376181453},{x:.512941,y:.804766},{x:.406984,y:.804766},{x:.40440576588043703,y:.8045120661033809},{x:.40181542834229744,y:.8044681908525655},{x:.400026512750784,y:.8040807473169851},{x:.3982049355092742,y:.8039013376181453},{x:.39572578148103565,y:.8031492944655273},{x:.39319377618916257,y:.8026009124809075},{x:.2872357761891626,y:.7684889124809076},{x:.28342960508890525,y:.7668362808879404},{x:.2796044085190959,y:.7652281761559891},{x:.27938594032962494,y:.7650805300410848},{x:.27914407460343155,y:.764975512444704},{x:.2757334504432472,y:.7626120885587936},{x:.27229547962292316,y:.7602886242777711},{x:.2721100135665551,y:.7601011941121303},{x:.27189328313916555,y:.7599510087370087},{x:.2690092742928275,y:.7569676176126634},{x:.26609064851257996,y:.7540180832118794},{x:.26594531194585036,y:.7537980718316557},{x:.26576204564604555,y:.7536084902175343},{x:.26351548295615396,y:.7501197819025626},{x:.26122836336792754,y:.7466575263349163},{x:.2082493633679275,y:.6462725263349164},{x:.20745880379789322,y:.6443351468057326},{x:.2064724210369921,y:.6424897544564291},{x:.20579637196662365,y:.6402611193438609},{x:.20491647908027386,y:.6381048157198157},{x:.20451907388691828,y:.636050431873947},{x:.20391166238185462,y:.6340480644907258},{x:.20368338854657433,y:.6317303613460921},{x:.20324107652369047,y:.6294438319050109},{x:.20325209776572678,y:.6273513925615422},{x:.20304699999999998,y:.6252690000000001},{x:.20304699999999998,y:.568912},{x:.089112,y:.568912},{x:.0803329355092742,y:.5680473376181453},{x:.07189124554357093,y:.5654865789630078},{x:.0641113395141179,y:.5613281325536145},{x:.05729219484660536,y:.5557318051533946},{x:.051695867446385456,y:.548912660485882},{x:.04753742103699209,y:.5411327544564289},{x:.04497666238185463,y:.5326910644907257},{x:.044112,y:.5239119999999999}]],g:[[{x:.03166100000000001,y:.285331},{x:.03199195389402992,y:.28197076872347165},{x:.03216742697517915,y:.27859884139484714},{x:.032423533978450624,y:.2775888625904497},{x:.03252566238185464,y:.2765519355092742},{x:.03350580569139788,y:.2733208360362635},{x:.034335737494852386,y:.2700479324456657},{x:.07135573749485238,y:.1675239324456658},{x:.07223945098422414,y:.16566943556296815},{x:.07292365731738822,y:.16373243532732273},{x:.07413231799188957,y:.16169720247238553},{x:.07515058411631778,y:.15956034321175439},{x:.07637911169281072,y:.15791388391586245},{x:.07742806119285411,y:.15614758463046624},{x:.07901055202445481,y:.15438725620434748},{x:.0804261330120869,y:.15249010996133996},{x:.08195226304990277,y:.15111496075964967},{x:.08332564517579637,y:.14958724031548856},{x:.1584886451757964,y:.08090524031548854},{x:.16047116284778873,y:.07942238349974136},{x:.16231838489394151,y:.07777404756068641},{x:.16399482319868336,y:.07678680357956279},{x:.16555276842115366,y:.07562151273533077},{x:.16778648358567103,y:.07455391860853194},{x:.1699197861673149,y:.07329763012616651},{x:.2450797861673149,y:.038459630126166475},{x:.2459605302529857,y:.0381521715215269},{x:.24678324554357095,y:.03771242103699209},{x:.2501181687545519,y:.03670078314085588},{x:.253408434365457,y:.03555218561964517},{x:.254332237398671,y:.03542245939316866},{x:.2552249355092742,y:.03515166238185463},{x:.2586931398688001,y:.03481007406735549},{x:.26214426420887293,y:.034325445502994434},{x:.2630756249571383,y:.03437843696081321},{x:.264004,y:.034287},{x:.376189,y:.034287},{x:.37724627227682206,y:.03439113223027483},{x:.37830727432005307,y:.03433688416138392},{x:.3816280756224084,y:.03482270219101675},{x:.3849680644907258,y:.03515166238185463},{x:.38598470638687477,y:.035460057329467706},{x:.38703590484658207,y:.03561384285228289},{x:.39019811948723343,y:.036738182220129235},{x:.39340975445642906,y:.03771242103699209},{x:.39434669699397534,y:.038213227257056566},{x:.39534769490287125,y:.03856913648017993},{x:.4693886949028713,y:.07340713648017996},{x:.47140406041677185,y:.07460963544760885},{x:.47352148667564636,y:.07562166704766733},{x:.4751827197672129,y:.0768642309221422},{x:.47696422705836306,y:.07792719476830276},{x:.47870627197824944,y:.0794997663623443},{x:.480392,y:.08076065187723735},{x:.480392,y:.018480463023952315},{x:.44982106300216956,y:-.06618482166306154},{x:.42509763890365326,y:-.0887666681923909},{x:.3663917896728536,y:-.115601},{x:.27366828971008494,y:-.115601},{x:.21388478385740822,y:-.08868092320279419},{x:.15228882603575622,y:-.032396134475538775},{x:.11903308523020223,y:.0605977685009861},{x:.11526275900748023,y:.06857299605517989},{x:.11000898883421664,y:.07565942769130271},{x:.1034736741518217,y:.08158473581569503},{x:.09590796343849313,y:.08612121416008753},{x:.08760260271404471,y:.08909452840579157},{x:.07887676233341709,y:.09039041575379858},{x:.07006577144893004,y:.08995907598006667},{x:.061508231499013855,y:.08781708523020218},{x:.05353300394482007,y:.08404675900748018},{x:.046446572308697254,y:.07879298883421659},{x:.04052126418430494,y:.07225767415182165},{x:.035984785839912437,y:.06469196343849308},{x:.03301147159420839,y:.05638660271404467},{x:.03171558424620138,y:.04766076233341703},{x:.0321469240199333,y:.038849771448930016},{x:.03428891476979778,y:.030292231499013812},{x:.07130891476979778,y:-.07322776850098624},{x:.07221644299685706,y:-.07514742841768875},{x:.07292365731738822,y:-.07714956467267746},{x:.07409706350042253,y:-.07912543338941479},{x:.07507924099251978,y:-.08120299605518004},{x:.07634383839048098,y:-.08290872027080634},{x:.07742806119285414,y:-.08473441536953392},{x:.07896439356931816,y:-.08644339813281518},{x:.08033301116578337,y:-.08828942769130284},{x:.0819060799658371,y:-.08971566618082738},{x:.08332564517579637,y:-.09129475968451163},{x:.1584886451757964,y:-.15997675968451153},{x:.16066766565506738,y:-.1616065940183929},{x:.16271768036753925,y:-.16339598773796155},{x:.16419165994754753,y:-.1642424237156923},{x:.16555276842115366,y:-.1652604872646693},{x:.16800788453794988,y:-.16643389898185532},{x:.17036760218951646,y:-.1677889719724602},{x:.24552760218951647,y:-.2016329719724602},{x:.24617798725770038,y:-.20185206166908357},{x:.24678324554357095,y:-.2021755789630079},{x:.2503526828238078,y:-.20325835592431216},{x:.25388756161766735,y:-.20444912053505218},{x:.25456819199860076,y:-.20453711665220192},{x:.2552249355092742,y:-.20473633761814536},{x:.25893702635910487,y:-.20510194665533446},{x:.2626362900994872,y:-.20558021041579141},{x:.263321009549333,y:-.20553373131203426},{x:.264004,y:-.20560099999999998},{x:.376189,y:-.20560099999999998},{x:.3769985938815523,y:-.20552126196245651},{x:.37781053527049396,y:-.2055717752142049},{x:.38138177137190815,y:-.20508955666026785},{x:.3849680644907258,y:-.20473633761814536},{x:.3857465461334356,y:-.20450018779358015},{x:.38655274094280934,y:-.2043913285403334},{x:.3899612805709507,y:-.2032216620796743},{x:.39340975445642906,y:-.2021755789630079},{x:.39412720724734457,y:-.20179209245674457},{x:.39489667386274535,y:-.20152804409855607},{x:.4689376738627454,y:-.16768404409855608},{x:.471176129388074,y:-.16638175223486265},{x:.4735129313995788,y:-.16526550692304898},{x:.47497970384913024,y:-.16416890323360386},{x:.4765626813675205,y:-.163247956304222},{x:.47850406105855325,y:-.16153398660426738},{x:.480578193417323,y:-.15998330217620907},{x:.5187211934173229,y:-.125144302176209},{x:.5200982241105119,y:-.12361318710120846},{x:.5216280341275545,y:-.12223470670068204},{x:.5230406381933351,y:-.12034152832018923},{x:.5246201913815024,y:-.1185852292702623},{x:.52567205708302,y:-.11681488878073784},{x:.5269035440443172,y:-.11516444436572898},{x:.5279196645391884,y:-.1130320574948894},{x:.5291262301085498,y:-.11100134969861394},{x:.5298125082093796,y:-.10905981698676002},{x:.5306983467616347,y:-.10720083421055714},{x:.5677173467616347,y:-.0046778342105572215},{x:.5685472301626403,y:-.001405045768812418},{x:.5695273376181453,y:.0018259355092742052},{x:.5696294781899907,y:.002862986138707272},{x:.5698856101392306,y:.003873086692614168},{x:.5700610582123972,y:.007244891642088324},{x:.570392,y:.010604999999999976},{x:.570392,y:.560059},{x:.5695273376181453,y:.5688380644907257},{x:.5669665789630078,y:.577279754456429},{x:.5628081325536145,y:.5850596604858821},{x:.5572118051533946,y:.5918788051533946},{x:.5503926604858821,y:.5974751325536145},{x:.542612754456429,y:.6016335789630078},{x:.5341710644907257,y:.6041943376181453},{x:.525392,y:.605059},{x:.5166129355092742,y:.6041943376181453},{x:.508171245543571,y:.6016335789630078},{x:.5003913395141178,y:.5974751325536145},{x:.4935721948466053,y:.5918788051533946},{x:.48797586744638544,y:.5850596604858821},{x:.48381742103699205,y:.577279754456429},{x:.4812566623818546,y:.5688380644907257},{x:.480392,y:.560059},{x:.480392,y:.5595783858718113},{x:.47850787544975776,y:.5609876460911735},{x:.47656308903374583,y:.5627046621197919},{x:.47498407852937236,y:.5636233247252487},{x:.47352120750708176,y:.5647175018259646},{x:.47118052218859596,y:.5658362200595997},{x:.46893813108831367,y:.5671408350985324},{x:.39489713108831365,y:.6009858350985324},{x:.39412742928685096,y:.6012499737741558},{x:.39340975445642906,y:.6016335789630078},{x:.38996152003118717,y:.6026795894402057},{x:.3865532301567984,y:.60384921275647},{x:.38574678706033977,y:.6039581147092028},{x:.3849680644907258,y:.6041943376181453},{x:.38138202040224084,y:.6045475321329209},{x:.37781103767268465,y:.6050297570960106},{x:.3769988444371686,y:.6049792372848822},{x:.376189,y:.605059},{x:.264004,y:.605059},{x:.2633207613423033,y:.6049917068657756},{x:.2626357925427961,y:.6050381952835313},{x:.25893677979996554,y:.6045599223713788},{x:.2552249355092742,y:.6041943376181453},{x:.25456795333002863,y:.6039950442528821},{x:.2538870765735461,y:.6039070086250592},{x:.2503524457397967,y:.6027162840056636},{x:.24678324554357095,y:.6016335789630078},{x:.24617776729948443,y:.6013099440989677},{x:.24552714829793862,y:.6010907675853725},{x:.17036714829793861,y:.5672457675853725},{x:.16800780172583518,y:.5658908729822889},{x:.16555304759050302,y:.5647176561362495},{x:.1641916021742222,y:.563699355958929},{x:.16271727507130354,y:.5628526987282604},{x:.16066758950642807,y:.5610635523625588},{x:.15848888603577402,y:.5594339797745099},{x:.08332588603577401,y:.49075297977450993},{x:.08190615458499984,y:.48917372437901785},{x:.08033291862515302,y:.48774732555289924},{x:.07896444452212992,y:.48590147772545017},{x:.07742825448734617,y:.4841926782200152},{x:.07634390022195357,y:.48236679190821125},{x:.07507917015624571,y:.48066087782555583},{x:.0740970979464375,y:.4785835213931001},{x:.07292379561819572,y:.47660786018244516},{x:.07221648966449083,y:.47460551074132296},{x:.0713088683600783,y:.4726856387236396},{x:.034288868360078294,y:.36916463872363964},{x:.03348577523186824,y:.3659561323879453},{x:.03252566238185464,y:.3627910644907258},{x:.0324167369020588,y:.3616851255348066},{x:.032146903820267865,y:.36060709221327164},{x:.03198519043554786,y:.35730356073015046},{x:.03166100000000001,y:.354012},{x:.03166100000000001,y:.285331}],[{x:.121661,y:.29320659086815803},{x:.121661,y:.34620780969623244},{x:.15228882172599023,y:.4318540207415116},{x:.21388481974037543,y:.48813802669691503},{x:.2736685500834057,y:.5150589999999999},{x:.3663915263934284,y:.5150589999999999},{x:.4250929420729598,y:.48822590193711934},{x:.480392,y:.4376951204586189},{x:.480392,y:.20264468470162808},{x:.4249051037436742,y:.15194152341431572},{x:.3661311050032371,y:.124287},{x:.2739261218560311,y:.124287},{x:.21407100266628776,y:.15203091487935444},{x:.15223458736534265,y:.208535427414771},{x:.121661,y:.29320659086815803}]],h:[[{x:.047041,y:.05318299999999998},{x:.04790566238185463,y:.04440393550927419},{x:.050466421036992094,y:.03596224554357094},{x:.05462486744638546,y:.028182339514117884},{x:.06022119484660536,y:.021363194846605343},{x:.06704033951411792,y:.01576686744638544},{x:.07482024554357096,y:.011608421036992077},{x:.08326193550927423,y:.009047662381854615},{x:.092041,y:.008182999999999982},{x:.10082006449072577,y:.009047662381854615},{x:.10926175445642904,y:.011608421036992077},{x:.1170416604858821,y:.015766867446385446},{x:.12386080515339463,y:.021363194846605343},{x:.12945713255361452,y:.028182339514117884},{x:.1336155789630079,y:.03596224554357094},{x:.13617633761814535,y:.04440393550927421},{x:.137041,y:.05318299999999998},{x:.137041,y:.3692271498339558},{x:.23047284680205596,y:.45237128863270537},{x:.2915669774325256,y:.478914},{x:.38669764440631527,y:.478914},{x:.43644054132690624,y:.4571557093088599},{x:.465011,y:.38123324165433015},{x:.465011,y:.05318299999999998},{x:.4658756623818546,y:.04440393550927419},{x:.46843642103699207,y:.03596224554357094},{x:.47259486744638546,y:.028182339514117884},{x:.4781911948466053,y:.021363194846605343},{x:.4850103395141179,y:.01576686744638544},{x:.492790245543571,y:.011608421036992077},{x:.5012319355092743,y:.009047662381854615},{x:.510011,y:.008182999999999982},{x:.5187900644907257,y:.009047662381854615},{x:.527231754456429,y:.011608421036992077},{x:.5350116604858821,y:.015766867446385446},{x:.5418308051533947,y:.021363194846605343},{x:.5474271325536145,y:.028182339514117884},{x:.5515855789630079,y:.03596224554357094},{x:.5541463376181454,y:.04440393550927421},{x:.555011,y:.05318299999999998},{x:.555011,y:.38942},{x:.5546506186962206,y:.39307901278178137},{x:.554410350301749,y:.3967478709583736},{x:.5542188683658584,y:.3974626474508545},{x:.5541463376181454,y:.3981990644907258},{x:.5530790429582076,y:.40171746346329923},{x:.5521276325304605,y:.40526895152034226},{x:.5139866325304605,y:.5066239515203422},{x:.5138553396770835,y:.5068902237569821},{x:.5137747554395128,y:.50717595947055},{x:.511905898744729,y:.5108438433478746},{x:.5100853961903059,y:.5145359657635786},{x:.5099046789559015,y:.5147715076888114},{x:.5097698988494882,y:.5150360318659072},{x:.5072213830653152,y:.5182688425286295},{x:.504715563605999,y:.5215348594178236},{x:.5044923668525381,y:.521730619287556},{x:.5043085704011859,y:.5219637664124008},{x:.5011783335599848,y:.5246372687597332},{x:.4980834944323178,y:.5273516689249697},{x:.497826395485866,y:.5275001237971909},{x:.49760064588412606,y:.5276929341565276},{x:.49400898123224624,y:.5297043869925788},{x:.49044405536829966,y:.5317628575577613},{x:.490162934397186,y:.5318583023949868},{x:.48990390707565157,y:.532003366394835},{x:.41414290707565155,y:.5651423663948351},{x:.41372099607879415,y:.5652794559590063},{x:.41332975445642905,y:.5654885789630079},{x:.40952975949805703,y:.5666412948313546},{x:.4057531353317914,y:.5678684156337233},{x:.40531258638921414,y:.5679205603081202},{x:.4048880644907258,y:.5680493376181454},{x:.4009362016599996,y:.5684385621342186},{x:.39699274487562397,y:.5689053213297277},{x:.39655048803612764,y:.5688705172237564},{x:.396109,y:.568914},{x:.282214,y:.568914},{x:.28182836168040026,y:.5688760179407144},{x:.2814421286004882,y:.5689073796745989},{x:.27744221175957573,y:.5684440198796774},{x:.2734349355092742,y:.5680493376181454},{x:.2730641170540284,y:.5679368510695262},{x:.2726791869636831,y:.5678922598605547},{x:.26884652441488044,y:.5666574583296339},{x:.26499324554357095,y:.5654885789630079},{x:.2646514972979566,y:.5653059107200353},{x:.264282662844679,y:.5651870801833616},{x:.18800566284467896,y:.5320480801833616},{x:.1856267698486466,y:.5307235797343987},{x:.1831549202301779,y:.529581917442145},{x:.18178185218619736,y:.5285828381463435},{x:.18029822995654404,y:.527756799180932},{x:.17822344394147954,y:.5259936496360635},{x:.17602181748454487,y:.5243916901265875},{x:.137041,y:.4897030201456747},{x:.137041,y:.7597659999999999},{x:.13617633761814535,y:.7685450644907257},{x:.1336155789630079,y:.776986754456429},{x:.12945713255361452,y:.7847666604858821},{x:.12386080515339463,y:.7915858051533946},{x:.11704166048588208,y:.7971821325536145},{x:.10926175445642904,y:.8013405789630078},{x:.10082006449072577,y:.8039013376181453},{x:.092041,y:.804766},{x:.08326193550927423,y:.8039013376181453},{x:.07482024554357093,y:.8013405789630078},{x:.06704033951411792,y:.7971821325536145},{x:.06022119484660536,y:.7915858051533946},{x:.05462486744638546,y:.7847666604858821},{x:.050466421036992094,y:.776986754456429},{x:.04790566238185463,y:.7685450644907257},{x:.047041,y:.7597659999999999},{x:.047041,y:.05318299999999998}]],i:[[{x:.216026,y:.7597659999999999},{x:.21689066238185462,y:.7509869355092742},{x:.21945142103699208,y:.7425452455435709},{x:.22360986744638545,y:.7347653395141178},{x:.22920619484660534,y:.7279461948466053},{x:.2360253395141179,y:.7223498674463854},{x:.24380524554357094,y:.7181914210369921},{x:.25224693550927424,y:.7156306623818546},{x:.261026,y:.7147659999999999},{x:.341026,y:.7147659999999999},{x:.3498050644907258,y:.7156306623818546},{x:.35824675445642906,y:.7181914210369921},{x:.3660266604858821,y:.7223498674463854},{x:.3728458051533946,y:.7279461948466053},{x:.37844213255361453,y:.7347653395141178},{x:.3826005789630079,y:.7425452455435709},{x:.38516133761814536,y:.7509869355092742},{x:.386026,y:.7597659999999999},{x:.38516133761814536,y:.7685450644907257},{x:.3826005789630079,y:.776986754456429},{x:.37844213255361453,y:.7847666604858821},{x:.3728458051533946,y:.7915858051533946},{x:.3660266604858821,y:.7971821325536145},{x:.35824675445642906,y:.8013405789630078},{x:.3498050644907258,y:.8039013376181453},{x:.341026,y:.804766},{x:.261026,y:.804766},{x:.25224693550927424,y:.8039013376181453},{x:.24380524554357094,y:.8013405789630078},{x:.2360253395141179,y:.7971821325536145},{x:.22920619484660534,y:.7915858051533946},{x:.22360986744638545,y:.7847666604858821},{x:.21945142103699208,y:.776986754456429},{x:.21689066238185462,y:.7685450644907257},{x:.216026,y:.7597659999999999}],[{x:.25597800000000004,y:.05318299999999998},{x:.25684266238185466,y:.04440393550927419},{x:.2594034210369921,y:.03596224554357094},{x:.2635618674463855,y:.028182339514117884},{x:.2691581948466054,y:.021363194846605343},{x:.27597733951411796,y:.01576686744638544},{x:.28375724554357096,y:.011608421036992077},{x:.2921989355092742,y:.009047662381854615},{x:.300978,y:.008182999999999982},{x:.3097570644907258,y:.009047662381854615},{x:.3181987544564291,y:.011608421036992077},{x:.32597866048588214,y:.015766867446385446},{x:.33279780515339463,y:.021363194846605343},{x:.33839413255361456,y:.028182339514117884},{x:.34255257896300795,y:.03596224554357094},{x:.3451133376181454,y:.04440393550927421},{x:.345978,y:.05318299999999998},{x:.345978,y:.523911},{x:.3451133376181454,y:.5326900644907258},{x:.34255257896300795,y:.541131754456429},{x:.33839413255361456,y:.5489116604858821},{x:.33279780515339463,y:.5557308051533947},{x:.32597866048588214,y:.5613271325536145},{x:.3181987544564291,y:.5654855789630079},{x:.3097570644907258,y:.5680463376181454},{x:.300978,y:.5689110000000001},{x:.2921989355092742,y:.5680463376181454},{x:.28375724554357096,y:.5654855789630079},{x:.27597733951411796,y:.5613271325536145},{x:.2691581948466054,y:.5557308051533947},{x:.2635618674463855,y:.5489116604858821},{x:.2594034210369921,y:.541131754456429},{x:.25684266238185466,y:.5326900644907258},{x:.25597800000000004,y:.523911},{x:.25597800000000004,y:.05318299999999998}]],j:[[{x:.11017199870220953,y:-.1121580749666587},{x:.11173080987432929,y:-.12084080046598154},{x:.114953584640513,y:-.12905258085596802},{x:.11971647357384912,y:-.1364778420214504},{x:.12583644152368842,y:-.14283123533997366},{x:.1330783015538362,y:-.147868603469331},{x:.14116375304461573,y:-.15139636317729976},{x:.23896575304461573,y:-.18307436317729964},{x:.2424293887998465,y:-.18383095770413346},{x:.24586120600074532,y:-.1847208108507566},{x:.24673197042105502,y:-.1847708110651418},{x:.2475840766296098,y:-.18495694463669302},{x:.2511287638648936,y:-.18502327959701073},{x:.25466824139749206,y:-.18522652014211538},{x:.25553202888155596,y:-.18510568190524296},{x:.2564040749666586,y:-.1851220012977904},{x:.25989359333942796,y:-.1844955274762681},{x:.2634047110671092,y:-.18400434499968443},{x:.3944597110671092,y:-.15232634499968456},{x:.39510744613291976,y:-.15210060706564532},{x:.39578357398914765,y:-.1519849807175323},{x:.3992672661785621,y:-.15065089524264363},{x:.4027898773796621,y:-.14942325292878383},{x:.40338112711156726,y:-.1490754856432793},{x:.40402170577913904,y:-.1488301750218278},{x:.4071781926350792,y:-.14684208899421944},{x:.4103936167153703,y:-.14495080812962524},{x:.41090565971774945,y:-.14449437599440731},{x:.41148607211771127,y:-.14412880824922783},{x:.41419405162048195,y:-.14156312270000898},{x:.41697872163578864,y:-.1390808841476645},{x:.4173918803832174,y:-.13853332759371953},{x:.41788982159253774,y:-.13806155128824654},{x:.42004522760849955,y:-.13501686407422092},{x:.422292130251795,y:-.13203905886963707},{x:.4225905272853119,y:-.13142142018825975},{x:.42298686170256505,y:-.13086156542133753},{x:.4245068631872901,y:-.12745488216466036},{x:.4261296512500701,y:-.1240959456918764},{x:.4263018193390199,y:-.1234319603912164},{x:.42658131605481786,y:-.12280554206756752},{x:.4588533160548179,y:-.025908542067567514},{x:.4594769463166796,y:-.023162642495487502},{x:.46029433761814537,y:-.02046806449072583},{x:.46045163429328767,y:-.01887100454660151},{x:.46080705178433234,y:-.017306069686551954},{x:.4608830007338393,y:-.01449126757618431},{x:.461159,y:-.01168900000000006},{x:.461159,y:.534292},{x:.46029433761814537,y:.5430710644907257},{x:.4577335789630079,y:.551512754456429},{x:.45357513255361454,y:.5592926604858821},{x:.4479788051533946,y:.5661118051533947},{x:.4411596604858821,y:.5717081325536145},{x:.43337975445642907,y:.5758665789630079},{x:.4249380644907258,y:.5784273376181454},{x:.416159,y:.579292},{x:.4073799355092742,y:.5784273376181454},{x:.39893824554357094,y:.5758665789630079},{x:.39115833951411794,y:.5717081325536145},{x:.3843391948466054,y:.5661118051533947},{x:.37874286744638547,y:.5592926604858821},{x:.3745844210369921,y:.551512754456429},{x:.37202366238185464,y:.5430710644907257},{x:.371159,y:.534292},{x:.371159,y:-.004392296840350002},{x:.3490732119536395,y:-.07070509444595838},{x:.254610065464387,y:-.09353828321774525},{x:.16889624695538427,y:-.06577563682270039},{x:.16027792337039018,y:-.063893055363307},{x:.15145792503334138,y:-.0637279987022096},{x:.14277519953401854,y:-.06528680987432936},{x:.13456341914403205,y:-.06850958464051307},{x:.12713815797854966,y:-.0732724735738492},{x:.12078476466002638,y:-.07939244152368852},{x:.11574739653066908,y:-.08663430155383627},{x:.11221963682270032,y:-.0947197530446158},{x:.11033705536330693,y:-.10333807662960988},{x:.11017199870220953,y:-.1121580749666587}],[{x:.3403,y:.7597659999999999},{x:.3411646623818546,y:.7509869355092742},{x:.34372542103699205,y:.7425452455435709},{x:.34788386744638544,y:.7347653395141178},{x:.3534801948466053,y:.7279461948466053},{x:.3602993395141179,y:.7223498674463854},{x:.36807924554357097,y:.7181914210369921},{x:.37652093550927423,y:.7156306623818546},{x:.3853,y:.7147659999999999},{x:.447023,y:.7147659999999999},{x:.4558020644907258,y:.7156306623818546},{x:.46424375445642907,y:.7181914210369921},{x:.4720236604858821,y:.7223498674463854},{x:.4788428051533946,y:.7279461948466053},{x:.48443913255361454,y:.7347653395141178},{x:.48859757896300793,y:.7425452455435709},{x:.49115833761814537,y:.7509869355092742},{x:.492023,y:.7597659999999999},{x:.49115833761814537,y:.7685450644907257},{x:.48859757896300793,y:.776986754456429},{x:.48443913255361454,y:.7847666604858821},{x:.4788428051533946,y:.7915858051533946},{x:.4720236604858821,y:.7971821325536145},{x:.46424375445642907,y:.8013405789630078},{x:.4558020644907258,y:.8039013376181453},{x:.447023,y:.804766},{x:.3853,y:.804766},{x:.37652093550927423,y:.8039013376181453},{x:.36807924554357097,y:.8013405789630078},{x:.3602993395141179,y:.7971821325536145},{x:.3534801948466053,y:.7915858051533946},{x:.34788386744638544,y:.7847666604858821},{x:.34372542103699205,y:.776986754456429},{x:.3411646623818546,y:.7685450644907257},{x:.3403,y:.7597659999999999}]],k:[[{x:.020185999999999996,y:.05318299999999998},{x:.02105066238185463,y:.04440393550927419},{x:.02361142103699209,y:.03596224554357094},{x:.027769867446385453,y:.028182339514117884},{x:.03336619484660536,y:.021363194846605343},{x:.04018533951411791,y:.01576686744638544},{x:.047965245543570956,y:.011608421036992077},{x:.056406935509274225,y:.009047662381854615},{x:.065186,y:.008182999999999982},{x:.07396506449072576,y:.009047662381854615},{x:.08240675445642903,y:.011608421036992077},{x:.0901866604858821,y:.015766867446385446},{x:.09700580515339463,y:.021363194846605343},{x:.10260213255361453,y:.028182339514117884},{x:.10676057896300789,y:.03596224554357094},{x:.10932133761814536,y:.04440393550927421},{x:.11018599999999999,y:.05318299999999998},{x:.11018599999999999,y:.16578332733911408},{x:.23477705990096162,y:.26351643594805596},{x:.5068321321577423,y:.019673199736523116},{x:.5139466814455551,y:.014457569113271652},{x:.5219420457215526,y:.010730135081525344},{x:.5305109676204599,y:.008634140840755075},{x:.539324148279209,y:.008250134274186548},{x:.5480429021075728,y:.009592872538819623},{x:.5563321722854605,y:.012610754956160736},{x:.5638734068086124,y:.017187805997359452},{x:.5703768002634768,y:.02314813215774228},{x:.5755924308867283,y:.030262681445555134},{x:.5793198649184746,y:.03825804572155257},{x:.5814158591592449,y:.04682696762045996},{x:.5817998657258134,y:.05564014827920904},{x:.5804571274611804,y:.06435890210757275},{x:.5774392450438393,y:.07264817228546054},{x:.5728621940026405,y:.08018940680861247},{x:.5669018678422577,y:.08669280026347684},{x:.3066862956724008,y:.3199242805817128},{x:.5215978711622948,y:.4885076152557163},{x:.5279716470169837,y:.49460635247919954},{x:.533033147947031,y:.5018313661609891},{x:.5365878633102175,y:.5099050030771282},{x:.5384991873886431,y:.5185169978886772},{x:.5386936690698568,y:.5273363964646907},{x:.5371638345319164,y:.5360242742638681},{x:.5339684744581735,y:.5442467610146052},{x:.5292303847442837,y:.5516878711622948},{x:.5231316475208004,y:.5580616470169838},{x:.5159066338390108,y:.5631231479470311},{x:.5078329969228718,y:.5666778633102175},{x:.4992210021113228,y:.5685891873886431},{x:.49040160353530926,y:.5687836690698569},{x:.4817137257361318,y:.5672538345319164},{x:.47349123898539475,y:.5640584744581736},{x:.46605012883770514,y:.5593203847442837},{x:.11018599999999999,y:.28016947631338524},{x:.11018599999999999,y:.7597659999999999},{x:.10932133761814536,y:.7685450644907257},{x:.10676057896300789,y:.776986754456429},{x:.10260213255361453,y:.7847666604858821},{x:.09700580515339463,y:.7915858051533946},{x:.09018666048588207,y:.7971821325536145},{x:.08240675445642903,y:.8013405789630078},{x:.07396506449072576,y:.8039013376181453},{x:.065186,y:.804766},{x:.056406935509274204,y:.8039013376181453},{x:.04796524554357093,y:.8013405789630078},{x:.04018533951411791,y:.7971821325536145},{x:.03336619484660536,y:.7915858051533946},{x:.027769867446385453,y:.7847666604858821},{x:.02361142103699209,y:.776986754456429},{x:.02105066238185463,y:.7685450644907257},{x:.020185999999999996,y:.7597659999999999},{x:.020185999999999996,y:.05318299999999998}]],l:[[{x:.25602600000000003,y:.05355900000000002},{x:.25689066238185465,y:.044779935509274234},{x:.2594514210369921,y:.036338245543570985},{x:.2636098674463855,y:.028558339514117927},{x:.26920619484660535,y:.021739194846605386},{x:.27602533951411795,y:.016142867446385482},{x:.283805245543571,y:.01198442103699212},{x:.2922469355092743,y:.009423662381854658},{x:.301026,y:.008559000000000025},{x:.3098050644907258,y:.009423662381854658},{x:.3182467544564291,y:.01198442103699212},{x:.32602666048588214,y:.01614286744638549},{x:.3328458051533947,y:.021739194846605386},{x:.33844213255361455,y:.028558339514117927},{x:.34260057896300794,y:.036338245543570985},{x:.3451613376181454,y:.044779935509274255},{x:.346026,y:.05355900000000002},{x:.346026,y:.765137},{x:.3451613376181454,y:.7739160644907257},{x:.34260057896300794,y:.782357754456429},{x:.33844213255361455,y:.7901376604858821},{x:.3328458051533947,y:.7969568051533946},{x:.32602666048588214,y:.8025531325536145},{x:.3182467544564291,y:.8067115789630078},{x:.3098050644907258,y:.8092723376181453},{x:.301026,y:.810137},{x:.2922469355092743,y:.8092723376181453},{x:.283805245543571,y:.8067115789630078},{x:.27602533951411795,y:.8025531325536145},{x:.26920619484660535,y:.7969568051533946},{x:.2636098674463855,y:.7901376604858821},{x:.2594514210369921,y:.782357754456429},{x:.25689066238185465,y:.7739160644907257},{x:.25602600000000003,y:.765137},{x:.25602600000000003,y:.05355900000000002}]],m:[[{x:.005538000000000001,y:.03920400000000002},{x:.006402662381854635,y:.030424935509274227},{x:.008963421036992096,y:.02198324554357097},{x:.013121867446385459,y:.01420333951411792},{x:.018718194846605363,y:.00738419484660538},{x:.025537339514117914,y:.0017878674463854757},{x:.03331724554357096,y:-.002370578963007887},{x:.04175893550927423,y:-.004931337618145348},{x:.050538,y:-.005795999999999982},{x:.059317064490725775,y:-.004931337618145348},{x:.06775875445642904,y:-.002370578963007887},{x:.0755386604858821,y:.0017878674463854827},{x:.08235780515339464,y:.00738419484660538},{x:.08795413255361453,y:.01420333951411792},{x:.0921125789630079,y:.02198324554357098},{x:.09467333761814536,y:.030424935509274248},{x:.095538,y:.03920400000000002},{x:.095538,y:.3993271266071161},{x:.14963521853994496,y:.4943223065353007},{x:.1738257653562211,y:.5150589999999999},{x:.22021623464377893,y:.5150589999999999},{x:.2416666625786254,y:.49667119950297894},{x:.27741,y:.4029520066676719},{x:.27741,y:.03920400000000002},{x:.2782746623818546,y:.030424935509274227},{x:.28083542103699205,y:.02198324554357097},{x:.28499386744638544,y:.01420333951411792},{x:.2905901948466053,y:.00738419484660538},{x:.2974093395141179,y:.0017878674463854757},{x:.30518924554357096,y:-.002370578963007887},{x:.31363093550927423,y:-.004931337618145348},{x:.32241,y:-.005795999999999982},{x:.33118906449072577,y:-.004931337618145348},{x:.33963075445642904,y:-.002370578963007887},{x:.3474106604858821,y:.0017878674463854827},{x:.35422980515339464,y:.00738419484660538},{x:.3598261325536145,y:.01420333951411792},{x:.3639845789630079,y:.02198324554357098},{x:.36654533761814534,y:.030424935509274248},{x:.36740999999999996,y:.03920400000000002},{x:.36740999999999996,y:.3993264781598986},{x:.4215891088917321,y:.494459500052724},{x:.445289826307752,y:.5150589999999999},{x:.4920928256254945,y:.5150589999999999},{x:.5065149999999999,y:.5026965582556255},{x:.5065149999999999,y:.03920400000000002},{x:.5073796623818546,y:.030424935509274227},{x:.5099404210369921,y:.02198324554357097},{x:.5140988674463854,y:.01420333951411792},{x:.5196951948466053,y:.00738419484660538},{x:.5265143395141179,y:.0017878674463854757},{x:.534294245543571,y:-.002370578963007887},{x:.5427359355092742,y:-.004931337618145348},{x:.551515,y:-.005795999999999982},{x:.5602940644907257,y:-.004931337618145348},{x:.568735754456429,y:-.002370578963007887},{x:.5765156604858821,y:.0017878674463854827},{x:.5833348051533946,y:.00738419484660538},{x:.5889311325536145,y:.01420333951411792},{x:.5930895789630078,y:.02198324554357098},{x:.5956503376181453,y:.030424935509274248},{x:.596515,y:.03920400000000002},{x:.596515,y:.523393},{x:.5963454778388272,y:.5251141873868636},{x:.5963825315707437,y:.5268433058919912},{x:.5959141404350922,y:.5294936295415332},{x:.5956503376181453,y:.5321720644907257},{x:.5951482857762117,y:.5338271076115645},{x:.59484729324509,y:.5355302304139588},{x:.5938708496195351,y:.5380382502602514},{x:.5930895789630078,y:.540613754456429},{x:.592274291011045,y:.5421390509322689},{x:.5916468191910574,y:.543750727977755},{x:.5901998472565338,y:.5460200622246176},{x:.5889311325536145,y:.5483936604858821},{x:.5878339395503975,y:.5497305940285525},{x:.5869041018316961,y:.5511888894721116},{x:.5850422079081763,y:.5531323288770946},{x:.5833348051533946,y:.5552128051533947},{x:.581997871610724,y:.5563099981566119},{x:.5808014011353795,y:.5575588705221693},{x:.5380264011353795,y:.5942248705221693},{x:.5358211367621821,y:.5957677297988329},{x:.5337406604858821,y:.5974751325536145},{x:.5322153640100423,y:.5982904205055773},{x:.5307982404674333,y:.599281876328501},{x:.5283343527176928,y:.600364864260089},{x:.525960754456429,y:.6016335789630078},{x:.5243057113355902,y:.6021356308049415},{x:.5227223939887274,y:.6028315689939708},{x:.5200945686869033,y:.6034130669616181},{x:.5175190644907257,y:.6041943376181453},{x:.5157978771038628,y:.6043638597793182},{x:.5141092119504517,y:.6047375358201355},{x:.5114184349491921,y:.6047951971830532},{x:.50874,y:.605059},{x:.428467,y:.605059},{x:.42563553135621585,y:.6047801246797119},{x:.42279150043448566,y:.6046996620098968},{x:.4212557149999115,y:.6043487504203328},{x:.4196879355092742,y:.6041943376181453},{x:.41696527861756566,y:.6033684286794448},{x:.4141915924406847,y:.6027346691689239},{x:.4127537761476033,y:.6020908833721776},{x:.4112462455435709,y:.6016335789630078},{x:.40873703058140176,y:.6002923756232341},{x:.4061402803536474,y:.5991296742945802},{x:.40485568767586616,y:.5982177546177817},{x:.4034663395141179,y:.5974751325536145},{x:.4012669942053008,y:.5956701765049598},{x:.3989469715816508,y:.5940232153181825},{x:.3567609715816508,y:.5573572153181825},{x:.3545792701559384,y:.5550484712393128},{x:.3522737143614353,y:.552863400803129},{x:.35155574109793963,y:.5518488790642903},{x:.35070210094674875,y:.5509455305944583},{x:.3490127339279754,y:.5482555195520005},{x:.34717776483660073,y:.5456626430091704},{x:.33048446785976626,y:.5163509060824124},{x:.3216828574856715,y:.5394287684036221},{x:.32062739498214626,y:.5415455848316745},{x:.31976928952310246,y:.5437498007710907},{x:.3186639603788477,y:.5454834136126945},{x:.31774653490223986,y:.5473233854865517},{x:.3162983824161672,y:.5491936173608123},{x:.31502674401548947,y:.5511880718386934},{x:.3136044423732838,y:.5526727347769701},{x:.3123456842645886,y:.5542983712755478},{x:.3105604934838748,y:.5558501466339272},{x:.30892419049215825,y:.5575581938831911},{x:.2661511904921582,y:.594224193883191},{x:.26394553725639397,y:.5957674011217274},{x:.2618646604858821,y:.5974751325536145},{x:.26033982189406285,y:.5982901757614695},{x:.258923146662659,y:.5992813666868191},{x:.25645880963824363,y:.6003646200309664},{x:.25408475445642903,y:.6016335789630078},{x:.25243020816870526,y:.6021354800922637},{x:.25084738219782576,y:.6028312459348294},{x:.24821906447459133,y:.6034129165660671},{x:.24564306449072576,y:.6041943376181453},{x:.24392239379305308,y:.6043638088898747},{x:.2422342441971012,y:.6047374117585159},{x:.2395429505511757,y:.6047951464006902},{x:.236864,y:.605059},{x:.157178,y:.605059},{x:.1544990494488241,y:.6047951464006902},{x:.1518077558028988,y:.6047374117585159},{x:.15011960620694695,y:.6043638088898747},{x:.14839893550927424,y:.6041943376181453},{x:.14582293552540848,y:.6034129165660671},{x:.1431946178021742,y:.6028312459348294},{x:.1416117918312948,y:.6021354800922637},{x:.13995724554357097,y:.6016335789630078},{x:.13758319036175665,y:.6003646200309664},{x:.135118853337341,y:.5992813666868191},{x:.13370217810593676,y:.5982901757614691},{x:.13217733951411792,y:.5974751325536145},{x:.13009646274360603,y:.5957674011217274},{x:.1278908095078418,y:.594224193883191},{x:.09495385911112918,y:.5659898819750746},{x:.09467333761814536,y:.5688380644907257},{x:.0921125789630079,y:.577279754456429},{x:.08795413255361453,y:.5850596604858821},{x:.08235780515339464,y:.5918788051533946},{x:.07553866048588208,y:.5974751325536145},{x:.06775875445642904,y:.6016335789630078},{x:.059317064490725775,y:.6041943376181453},{x:.050538,y:.605059},{x:.04175893550927421,y:.6041943376181453},{x:.033317245543570934,y:.6016335789630078},{x:.025537339514117904,y:.5974751325536145},{x:.018718194846605356,y:.5918788051533946},{x:.013121867446385459,y:.5850596604858821},{x:.008963421036992096,y:.577279754456429},{x:.006402662381854635,y:.5688380644907257},{x:.005538000000000001,y:.560059},{x:.005538000000000001,y:.03920400000000002}]],n:[[{x:.047041,y:.03920400000000002},{x:.04790566238185463,y:.030424935509274227},{x:.050466421036992094,y:.02198324554357097},{x:.05462486744638546,y:.01420333951411792},{x:.06022119484660536,y:.00738419484660538},{x:.06704033951411792,y:.0017878674463854757},{x:.07482024554357096,y:-.002370578963007887},{x:.08326193550927423,y:-.004931337618145348},{x:.092041,y:-.005795999999999982},{x:.10082006449072577,y:-.004931337618145348},{x:.10926175445642904,y:-.002370578963007887},{x:.1170416604858821,y:.0017878674463854827},{x:.12386080515339463,y:.00738419484660538},{x:.12945713255361452,y:.01420333951411792},{x:.1336155789630079,y:.02198324554357098},{x:.13617633761814535,y:.030424935509274248},{x:.137041,y:.03920400000000002},{x:.137041,y:.3923986904044417},{x:.23217657812189968,y:.4860775193429304},{x:.29246969284729285,y:.5150589999999999},{x:.3857956927587408,y:.5150589999999999},{x:.4353266752666751,y:.4910865745843881},{x:.465011,y:.4037995608673687},{x:.465011,y:.03920400000000002},{x:.4658756623818546,y:.030424935509274227},{x:.46843642103699207,y:.02198324554357097},{x:.47259486744638546,y:.01420333951411792},{x:.4781911948466053,y:.00738419484660538},{x:.4850103395141179,y:.0017878674463854757},{x:.492790245543571,y:-.002370578963007887},{x:.5012319355092743,y:-.004931337618145348},{x:.510011,y:-.005795999999999982},{x:.5187900644907257,y:-.004931337618145348},{x:.527231754456429,y:-.002370578963007887},{x:.5350116604858821,y:.0017878674463854827},{x:.5418308051533947,y:.00738419484660538},{x:.5474271325536145,y:.01420333951411792},{x:.5515855789630079,y:.02198324554357098},{x:.5541463376181454,y:.030424935509274248},{x:.555011,y:.03920400000000002},{x:.555011,y:.411242},{x:.5547211401667089,y:.41418499627592825},{x:.5546227314347089,y:.4171405946120584},{x:.5542897326303223,y:.4185651504993601},{x:.5541463376181454,y:.4200210644907258},{x:.5532878972691104,y:.42285096307022063},{x:.5526147708021555,y:.4257305718218671},{x:.5144747708021555,y:.537881571821867},{x:.5144109474804813,y:.5380222238814931},{x:.5143747633675698,y:.5381723808934484},{x:.5125889395552703,y:.5420375142269895},{x:.5108295711501452,y:.5459147613418461},{x:.5107395343200961,y:.546040259499208},{x:.5106747512949527,y:.5461804721160435},{x:.5081691914797779,y:.5496229410537735},{x:.5056872154570532,y:.5530824522038071},{x:.5055744251835149,y:.5531879736350976},{x:.505483532821465,y:.5533128535645805},{x:.5023545242619802,y:.5562003659557777},{x:.4992453215682988,y:.5591091940676126},{x:.49911411231822944,y:.5591906836434047},{x:.49900060356177384,y:.559295431819878},{x:.49536839230215873,y:.5615170221826804},{x:.49175144785337105,y:.5637633826232722},{x:.4916068619246677,y:.563817708744868},{x:.49147509885166074,y:.5638982997546532},{x:.41571709885166075,y:.6005642997546532},{x:.4144883994140345,y:.6010164083750983},{x:.41333375445642906,y:.6016335789630078},{x:.41035728417594536,y:.6025364813514484},{x:.4074382196167836,y:.6036105717354909},{x:.4061449272779714,y:.6038142858466193},{x:.4048920644907258,y:.6041943376181453},{x:.4017966387343604,y:.6044992104448776},{x:.3987241185432898,y:.6049831812385367},{x:.3974159338025849,y:.6049306722213019},{x:.396113,y:.605059},{x:.282216,y:.605059},{x:.28097323419788345,y:.6049365982521052},{x:.2797255990169867,y:.6049900349640848},{x:.2765922846246742,y:.6045051123806029},{x:.2734369355092743,y:.6041943376181453},{x:.2722419284999821,y:.603831836204989},{x:.27100784129389754,y:.6036408445963318},{x:.26802933636200627,y:.6025539603505436},{x:.264995245543571,y:.6016335789630078},{x:.2638939207763026,y:.6010449086106044},{x:.2627208068242762,y:.6006168283817219},{x:.18644080682427616,y:.563950828381722},{x:.18387931815291048,y:.5623935720684188},{x:.18122474955630472,y:.5610008994562176},{x:.18011833133270075,y:.5601070811947741},{x:.17890296169536754,y:.5593681975674947},{x:.17669449694619624,y:.5573411418478543},{x:.17436263208920222,y:.5554573484070612},{x:.137041,y:.5187071981771466},{x:.137041,y:.560059},{x:.13617633761814535,y:.5688380644907257},{x:.1336155789630079,y:.577279754456429},{x:.12945713255361452,y:.5850596604858821},{x:.12386080515339463,y:.5918788051533946},{x:.11704166048588208,y:.5974751325536145},{x:.10926175445642904,y:.6016335789630078},{x:.10082006449072577,y:.6041943376181453},{x:.092041,y:.605059},{x:.08326193550927423,y:.6041943376181453},{x:.07482024554357093,y:.6016335789630078},{x:.06704033951411792,y:.5974751325536145},{x:.06022119484660536,y:.5918788051533946},{x:.05462486744638546,y:.5850596604858821},{x:.050466421036992094,y:.577279754456429},{x:.04790566238185463,y:.5688380644907257},{x:.047041,y:.560059},{x:.047041,y:.03920400000000002}]],o:[[{x:.021894999999999998,y:.25490100000000004},{x:.022142430975592695,y:.2523887911456351},{x:.02217771682540861,y:.24986467341374632},{x:.02257373987793045,y:.24800963837050735},{x:.02275966238185463,y:.24612193550927428},{x:.023492446675001572,y:.24370626943231966},{x:.02401948545822835,y:.2412375358426815},{x:.060310485458228355,y:.12735753584268142},{x:.06080304558444478,y:.12621387418764726},{x:.061129830312657105,y:.12501229639135567},{x:.06254436541764224,y:.12217075210694647},{x:.06379993607002282,y:.11925547753662338},{x:.06450614911208748,y:.11822988473324028},{x:.0650610709625847,y:.11711514745523491},{x:.06700278396163635,y:.114604164756607},{x:.06880297103068717,y:.11198985605258731},{x:.06969569761744246,y:.11112174505713},{x:.07045743125471368,y:.1101366870258529},{x:.14244943125471368,y:.0338456870258529},{x:.144568728324263,y:.03200109409682955},{x:.1465508815997487,y:.0300098604251366},{x:.14788834203377002,y:.029111770054614114},{x:.1491035320893312,y:.02805409342394511},{x:.1515419696884587,y:.026658398178569347},{x:.15387450686277807,y:.025092124424329433},{x:.22587150686277807,y:-.01360287557567049},{x:.22795933917571506,y:-.014473279294209745},{x:.22995424554357097,y:-.015539578963007873},{x:.23202067225559728,y:-.016166422653018674},{x:.2340138134199343,y:-.01699735024728135},{x:.23623133596214702,y:-.01744371352418634},{x:.23839593550927424,y:-.018100337618145335},{x:.2405449475487996,y:-.01831199682974963},{x:.24266189699648397,y:-.01873811583170923},{x:.2449238916202761,y:-.018743285176571887},{x:.247175,y:-.018964999999999968},{x:.354874,y:-.018964999999999968},{x:.35712497901801044,y:-.018743297917588594},{x:.3593868436844028,y:-.018738141970160445},{x:.36150392306047363,y:-.018312009573623896},{x:.3636530644907258,y:-.018100337618145335},{x:.36581753964743763,y:-.017443751257606326},{x:.36803493734305537,y:-.016997426474138877},{x:.370028203326089,y:-.016166460394901543},{x:.3720947544564291,y:-.015539578963007873},{x:.3740895461854217,y:-.014473340569958804},{x:.376177263560353,y:-.01360299896157894},{x:.448175263560353,y:.025092001038420984},{x:.4505076595021602,y:.026658160356610353},{x:.4529459593263057,y:.028053731854915283},{x:.45416130097157975,y:.029111510806286087},{x:.45549891730603415,y:.030009694621828502},{x:.4574809543881169,y:.03200078850323144},{x:.4596001404718476,y:.03384523318438343},{x:.5315941404718476,y:.11013623318438343},{x:.5323560786638525,y:.11112152750713142},{x:.5332490289693128,y:.11198985605258731},{x:.5350490398057314,y:.11460390882403626},{x:.5369905975332091,y:.11711461878219896},{x:.5375456739097991,y:.11822962771804991},{x:.5382520639299772,y:.11925547753662338},{x:.5395075116659538,y:.12217046671076734},{x:.5409219476918898,y:.12501171320336152},{x:.5412488309792026,y:.126213587584214},{x:.5417415145417717,y:.12735753584268142},{x:.5780325145417716,y:.2412375358426815},{x:.5785595533249983,y:.2437062694323195},{x:.5792923376181454,y:.24612193550927428},{x:.5794782601220696,y:.2480096383705079},{x:.5798742831745913,y:.24986467341374632},{x:.5799095690244073,y:.25238879114563434},{x:.580157,y:.25490100000000004},{x:.580157,y:.33119200000000004},{x:.5799156873690254,y:.3336420882589673},{x:.5798881240960263,y:.3361038771468651},{x:.5794843860383102,y:.3380211641581212},{x:.5792923376181454,y:.33997106449072584},{x:.5785776732343003,y:.3423269972319261},{x:.5780703683949873,y:.3447361062088315},{x:.5417793683949873,y:.4597211062088315},{x:.5412650895934552,y:.4609244011905288},{x:.540921633437906,y:.46218711230867804},{x:.5395351283421765,y:.46497211555478546},{x:.5383124760126231,y:.46783284286481475},{x:.5375733277285976,y:.46891268605384906},{x:.5369901282681178,y:.47008412955994733},{x:.5350869372989228,y:.47254512602400234},{x:.5333296776789325,y:.47511235762423976},{x:.5323940649664491,y:.4760272512524403},{x:.5315935342292432,y:.47706240922950055},{x:.45959953422924316,y:.5533504092295005},{x:.4572787448447235,y:.5553702403350376},{x:.45508230823461715,y:.5575246421731296},{x:.45395838697349994,y:.5582600166131206},{x:.4529452394037514,y:.5591417799431011},{x:.45027499383570063,y:.5606700370119551},{x:.44770045819082444,y:.5623545390972755},{x:.3757024581908245,y:.5999485390972755},{x:.37385313535723513,y:.6006937047902838},{x:.3720947544564291,y:.6016335789630078},{x:.36977177563531344,y:.6023382468844833},{x:.3675201821794923,y:.6032455034042244},{x:.36556101895058973,y:.6036155659602718},{x:.3636530644907258,y:.6041943376181453},{x:.36123724716457173,y:.6044322748568528},{x:.35885192047906295,y:.6048828346046191},{x:.35685820639902277,y:.60486357272721},{x:.354874,y:.605059},{x:.247175,y:.605059},{x:.24519066624232813,y:.6048635601834779},{x:.24319682408363533,y:.6048828119349353},{x:.24081162559758007,y:.6044322623250186},{x:.23839593550927424,y:.6041943376181453},{x:.23648785858508298,y:.6036155288111242},{x:.234528571713998,y:.6032454313367869},{x:.23227710201651716,y:.602338209770572},{x:.22995424554357097,y:.6016335789630078},{x:.2281957517789948,y:.6006936444633418},{x:.22634631449119302,y:.5999484204015954},{x:.15434931449119302,y:.5623544204015953},{x:.15177463525955168,y:.5606698034147719},{x:.14910425200363037,y:.5591414183832311},{x:.14809125527340347,y:.55825976164439},{x:.1469674919716301,y:.5575244814106152},{x:.14477093694990967,y:.5553699388664325},{x:.14245003748743465,y:.5533499553954043},{x:.07045803748743465,y:.4770619553954044},{x:.06965771196430402,y:.47602703312304784},{x:.06872232232106745,y:.47511235762423976},{x:.06696488716695402,y:.4725448695811053},{x:.06506154021654398,y:.4700836008922148},{x:.0644784960433022,y:.46891242859710086},{x:.06373952398737684,y:.46783284286481475},{x:.06251674952606694,y:.46497182979435886},{x:.06113014455468816,y:.46218652912371366},{x:.06078678779193787,y:.46092411430034236},{x:.06027263160501272,y:.4597211062088315},{x:.023981631605012717,y:.3447361062088315},{x:.0234743267656997,y:.3423269972319261},{x:.02275966238185463,y:.33997106449072584},{x:.0225676139616898,y:.3380211641581212},{x:.022163875903973694,y:.3361038771468651},{x:.022136312630974576,y:.33364208825896713},{x:.021894999999999998,y:.33119200000000004},{x:.021894999999999998,y:.25490100000000004}],[{x:.111895,y:.2618978965790472},{x:.111895,y:.324259211613835},{x:.14299436878278687,y:.42279496206129447},{x:.20271328316555492,y:.48607750096051383},{x:.25821631520114247,y:.5150589999999999},{x:.3438328207386419,y:.5150589999999999},{x:.3993370917152178,y:.4860772565752743},{x:.4590577300605173,y:.42279464888454726},{x:.490157,y:.324259211613835},{x:.490157,y:.2618978965790472},{x:.4591028039244665,y:.16445082019422033},{x:.39914727445977055,y:.10091681321598435},{x:.3435475642149213,y:.07103500000000003},{x:.2585015743575747,y:.07103500000000003},{x:.20290309936793577,y:.10091656436690524},{x:.14294929572583875,y:.164450507494742},{x:.111895,y:.2618978965790472}]],p:[[{x:.031904,y:-.15424400000000005},{x:.032768662381854635,y:-.16302306449072582},{x:.0353294210369921,y:-.17146475445642909},{x:.03948786744638546,y:-.17924466048588214},{x:.04508419484660536,y:-.18606380515339468},{x:.051903339514117915,y:-.19166013255361458},{x:.05968324554357096,y:-.19581857896300794},{x:.06812493550927423,y:-.1983793376181454},{x:.076904,y:-.19924400000000003},{x:.08568306449072577,y:-.1983793376181454},{x:.09412475445642904,y:-.19581857896300794},{x:.1019046604858821,y:-.19166013255361458},{x:.10872380515339464,y:-.18606380515339468},{x:.11432013255361453,y:-.17924466048588214},{x:.1184785789630079,y:-.17146475445642909},{x:.12103933761814537,y:-.16302306449072582},{x:.121904,y:-.15424400000000005},{x:.121904,y:.08461372659928788},{x:.12362832174470662,y:.08333438131496537},{x:.12536021772829115,y:.08178035235824195},{x:.1271620685101291,y:.08071254912256186},{x:.12884414120453105,y:.07946455014784792},{x:.13094744853162613,y:.07846927732892851},{x:.13294924262910485,y:.07728298474798974},{x:.20690724262910487,y:.04275398474798971},{x:.20784573679964677,y:.04242345923251374},{x:.20872324554357097,y:.041954421036992075},{x:.21199903754957586,y:.040960720395783044},{x:.21522783943974558,y:.03982357810698025},{x:.21621278303720604,y:.03968249467654502},{x:.21716493550927424,y:.0393936623818546},{x:.22057164546850772,y:.03905813073713887},{x:.2239602522910248,y:.038572746319036566},{x:.22495379448531613,y:.03862652673075318},{x:.225944,y:.038528999999999966},{x:.338005,y:.038528999999999966},{x:.33886621477794643,y:.03861382225207184},{x:.3397300481447032,y:.038562076501738984},{x:.34324908380057223,y:.0390454971728409},{x:.3467840644907258,y:.0393936623818546},{x:.3476121832677305,y:.039644869466491955},{x:.3484695134136621,y:.03976264352593092},{x:.35182662109175783,y:.04092330520367998},{x:.35522575445642907,y:.04195442103699206},{x:.3559889530923063,y:.042362359206810904},{x:.35680683330070073,y:.04264512708496585},{x:.4318888333007007,y:.07717412708496588},{x:.43400924312431544,y:.07841428389434572},{x:.43622962614931016,y:.07946501028796468},{x:.4378075563324746,y:.08063579029221077},{x:.43950360927818305,y:.0816277549521855},{x:.44134133343031445,y:.08325775393151234},{x:.4433140658676044,y:.08472146615145025},{x:.5183930658676044,y:.1527974661514503},{x:.519792625068414,y:.15434228537837358},{x:.5213447099268285,y:.1557337827706549},{x:.522746916505161,y:.1576032022519019},{x:.5243158963961404,y:.15933502631539204},{x:.52538718417891,y:.1611232027292085},{x:.5266379784876352,y:.1627907596241023},{x:.5276485364111687,y:.16489781566710873},{x:.5288495066792682,y:.16690245600899573},{x:.5295513540552914,y:.16886527099294393},{x:.530452790490496,y:.17074480411415546},{x:.5674347904904959,y:.2723648041141554},{x:.5682868803844835,y:.2756900562357905},{x:.5692833376181453,y:.27897493550927416},{x:.5693799285821196,y:.2799556400244087},{x:.5696245448495124,y:.2809102467717411},{x:.5698115375679212,y:.2843378395980749},{x:.570148,y:.28775399999999995},{x:.570148,y:.355831},{x:.5698183264321395,y:.3591782319067787},{x:.5696454905753794,y:.362537215959393},{x:.5693867528695432,y:.3635600718226051},{x:.5692833376181453,y:.3646100644907258},{x:.5683069860848939,y:.3678286641524751},{x:.567482165940186,y:.37108938766543825},{x:.530500165940186,y:.47369538766543823},{x:.5295747233109523,y:.4756403735939819},{x:.5288495066792682,y:.4776685439910043},{x:.5276841925618525,y:.47961366765708685},{x:.5267099630491849,y:.4816611880905031},{x:.5254228546094585,y:.48338825675926556},{x:.5243158963961404,y:.48523597368460797},{x:.5227934986603558,y:.48691638083844907},{x:.5214385372739072,y:.48873449599152474},{x:.5198392258792078,y:.49017727712011666},{x:.5183930658676044,y:.4917735338485497},{x:.4433140658676044,y:.5598495338485497},{x:.44114571117720175,y:.5614583923016819},{x:.43910641435493325,y:.5632279843609703},{x:.43761161896162687,y:.5640805897495177},{x:.43622962614931016,y:.5651059897120353},{x:.43378906307257026,y:.5662609093863238},{x:.43144372048223223,y:.5675986521566495},{x:.35636172048223225,y:.6011446521566495},{x:.355773047491519,y:.6013410447411239},{x:.35522575445642907,y:.6016335789630078},{x:.3515938477815883,y:.6027353058079922},{x:.3479935881359665,y:.6039364213810477},{x:.34737791203915763,y:.6040141959337602},{x:.3467840644907258,y:.6041943376181453},{x:.34300700763927916,y:.6045663452480041},{x:.3392415999493003,y:.6050420059085138},{x:.33862258083352115,y:.60499817359702},{x:.338005,y:.605059},{x:.225944,y:.605059},{x:.2251997336627212,y:.6049856961639699},{x:.22445344765540867,y:.6050343071552383},{x:.22081614914993766,y:.6045539507735711},{x:.21716493550927424,y:.6041943376181453},{x:.21644927090994795,y:.6039772431353645},{x:.21570784104506457,y:.6038793269025836},{x:.2122341450916469,y:.6026985986973952},{x:.20872324554357097,y:.6016335789630078},{x:.20806368527139987,y:.6012810366527016},{x:.20735560428285457,y:.6010403560617851},{x:.13339760428285458,y:.5674943560617851},{x:.13116986982932302,y:.566206971138138},{x:.12884414120453105,y:.5651064498521521},{x:.1273598902040749,y:.5640052229355318},{x:.12575970914356202,y:.5630804946901414},{x:.12382593632220404,y:.5613832370749092},{x:.121904,y:.5599572734007121},{x:.121904,y:.560059},{x:.12103933761814537,y:.5688380644907257},{x:.1184785789630079,y:.577279754456429},{x:.11432013255361453,y:.5850596604858821},{x:.10872380515339464,y:.5918788051533946},{x:.10190466048588208,y:.5974751325536145},{x:.09412475445642904,y:.6016335789630078},{x:.08568306449072577,y:.6041943376181453},{x:.076904,y:.605059},{x:.0681249355092742,y:.6041943376181453},{x:.059683245543570934,y:.6016335789630078},{x:.051903339514117915,y:.5974751325536145},{x:.04508419484660536,y:.5918788051533946},{x:.03948786744638546,y:.5850596604858821},{x:.0353294210369921,y:.577279754456429},{x:.032768662381854635,y:.5688380644907257},{x:.031904,y:.560059},{x:.031904,y:-.15424400000000005}],[{x:.121904,y:.20607608160839302},{x:.121904,y:.438494918391607},{x:.17699192809119763,y:.48844251958412144},{x:.23567259519301437,y:.5150589999999999},{x:.3284092961747297,y:.5150589999999999},{x:.38817711429028284,y:.4883552464171925},{x:.4496333594179428,y:.43263133769024387},{x:.48014799999999996,y:.3479689286382035},{x:.48014799999999996,y:.29568777567179994},{x:.44968806913177495,y:.21198926897045803},{x:.3879916447872207,y:.1560475837631447},{x:.32815352882369925,y:.12852899999999995},{x:.2359312215606538,y:.12852899999999995},{x:.17717907548697515,y:.15595879598931894},{x:.121904,y:.20607608160839302}]],q:[[{x:.031905,y:.285813},{x:.03224141038262204,y:.2823973680650777},{x:.0324282929389951,y:.2789703010434802},{x:.03267301908894614,y:.2780151713289937},{x:.032769662381854636,y:.2770339355092742},{x:.03376596546737772,y:.2737495643941025},{x:.03461784473664685,y:.27042480648246636},{x:.07159784473664685,y:.1688028064824664},{x:.0724995244823713,y:.166922651750872},{x:.0732016076706368,y:.1649592141085361},{x:.07440224792307432,y:.1629551516523985},{x:.07541246819615938,y:.16084867156853302},{x:.07666362241043057,y:.15918055247485355},{x:.0777352629490018,y:.15739181137154173},{x:.07930380642556048,y:.15566048970702676},{x:.08070556947724908,y:.15379156924569237},{x:.08225811700526783,y:.15239959067120604},{x:.08365813234923056,y:.15085428642438087},{x:.15873913234923054,y:.08277728642438094},{x:.16071062555900373,y:.0813145118522212},{x:.16254708404197357,y:.07968542770293169},{x:.16424441690754124,y:.07869257021816739},{x:.16582360332185575,y:.07752087268448676},{x:.16804258800473576,y:.07647082416071167},{x:.17016157800418052,y:.07523131768336211},{x:.24523757800418056,y:.0406993176833621},{x:.24605678866737324,y:.04041603175027397},{x:.24682124554357093,y:.04000742103699214},{x:.2502190216384501,y:.03897671692697023},{x:.2535747153580455,y:.03781630621794852},{x:.25443345146196317,y:.037698283616711674},{x:.2552629355092742,y:.03744666238185468},{x:.25879650468596477,y:.037098636194782805},{x:.2623141045905799,y:.03661518582049534},{x:.2631793653883337,y:.03666696209348752},{x:.264042,y:.036582000000000045},{x:.376106,y:.036582000000000045},{x:.3770966034546813,y:.036679565924422064},{x:.37809054588497415,y:.03662578154659327},{x:.38147875036256007,y:.037111169723096304},{x:.3848850644907258,y:.03744666238185468},{x:.3858375996101805,y:.03773561075136079},{x:.38682293652697,y:.03787676837406198},{x:.39005134306992567,y:.03901383585544661},{x:.39332675445642906,y:.04000742103699214},{x:.39420461585020444,y:.04047664772778637},{x:.3951434813083616,y:.04080732274273922},{x:.4691044813083616,y:.07533932274273922},{x:.47110618065167786,y:.07652560719175487},{x:.47320939667814427,y:.07752087268448679},{x:.4748915208069018,y:.0787689461703934},{x:.4766934263594154,y:.07983682509171056},{x:.47842523099597173,y:.08139082758714347},{x:.48014799999999996,y:.08266905805748193},{x:.48014799999999996,y:-.15619500000000008},{x:.4810126623818546,y:-.16497406449072585},{x:.483573421036992,y:-.17341575445642912},{x:.4877318674463854,y:-.18119566048588218},{x:.4933281948466053,y:-.18801480515339472},{x:.5001473395141178,y:-.19361113255361462},{x:.5079272455435709,y:-.19776957896300798},{x:.5163689355092742,y:-.20033033761814545},{x:.525148,y:-.20119500000000007},{x:.5339270644907257,y:-.20033033761814545},{x:.542368754456429,y:-.19776957896300798},{x:.5501486604858821,y:-.19361113255361462},{x:.5569678051533946,y:-.18801480515339472},{x:.5625641325536145,y:-.18119566048588218},{x:.5667225789630078,y:-.17341575445642912},{x:.5692833376181453,y:-.16497406449072585},{x:.570148,y:-.15619500000000008},{x:.570148,y:.5581050000000001},{x:.5692833376181453,y:.5668840644907258},{x:.5667225789630078,y:.5753257544564291},{x:.5625641325536145,y:.5831056604858822},{x:.5569678051533946,y:.5899248051533947},{x:.5501486604858821,y:.5955211325536146},{x:.542368754456429,y:.5996795789630079},{x:.5339270644907257,y:.6022403376181454},{x:.525148,y:.6031050000000001},{x:.5163689355092742,y:.6022403376181454},{x:.5079272455435709,y:.5996795789630079},{x:.5001473395141178,y:.5955211325536146},{x:.4933281948466053,y:.5899248051533947},{x:.4877318674463854,y:.5831056604858822},{x:.483573421036992,y:.5753257544564291},{x:.4810126623818546,y:.5668840644907258},{x:.48014799999999996,y:.5581050000000001},{x:.48014799999999996,y:.558005596763998},{x:.4782247267606458,y:.559432223348863},{x:.47629232280480055,y:.5611281889595863},{x:.4746904859851039,y:.5620538174856352},{x:.4732046002880372,y:.5631560030691136},{x:.4708804506539088,y:.5642554633364756},{x:.4686543108210992,y:.5655418481335316},{x:.3946933108210992,y:.5990868481335316},{x:.3939857884552202,y:.5993273179516839},{x:.39332675445642906,y:.5996795789630079},{x:.3898152875083263,y:.6007447708163117},{x:.38634099890642704,y:.6019255978665906},{x:.3856001580501581,y:.6020234163584227},{x:.3848850644907258,y:.6022403376181454},{x:.38123326077373504,y:.6026000088910167},{x:.3775953617236344,y:.6030803465985108},{x:.3768496724756141,y:.6030317546542387},{x:.376106,y:.6031050000000001},{x:.264042,y:.6031050000000001},{x:.26342400033164626,y:.6030441323453897},{x:.26280456058717394,y:.6030879828235033},{x:.25903957642572706,y:.602612304281983},{x:.2552629355092742,y:.6022403376181454},{x:.254668685221597,y:.6020600737641458},{x:.25405259303422617,y:.6019822349683996},{x:.25045275226756825,y:.6007811844842303},{x:.24682124554357093,y:.5996795789630079},{x:.24627358134186672,y:.5993868463484354},{x:.24568451278884912,y:.5991903095800973},{x:.17060851278884911,y:.5656453095800973},{x:.16826609518471405,y:.5643091772352096},{x:.16582839971196278,y:.5631560030691136},{x:.1644435861855132,y:.5621287897998347},{x:.16294590048199914,y:.5612744987855388},{x:.1609091582647261,y:.559507056844315},{x:.15874327554635076,y:.5579004698017108},{x:.08366227554635075,y:.4898404698017108},{x:.0822135909199537,y:.48824184486316324},{x:.08061175169940471,y:.4867967151276658},{x:.07925889408089541,y:.48498133393711457},{x:.07773859373239328,y:.48330368097737925},{x:.0766296214289207,y:.4814531488185024},{x:.0753404919252871,y:.4797232835162987},{x:.07436779238761855,y:.4776788549378484},{x:.07320399804016177,y:.47573684172476444},{x:.07247735524331753,y:.47370551725863386},{x:.07155047598047157,y:.4717573941431678},{x:.034570475980471575,y:.3691493941431678},{x:.03374586128764337,y:.36588916100716024},{x:.032769662381854636,y:.3626710644907258},{x:.032666195333495754,y:.36162054591923504},{x:.032407352052251925,y:.36059717166956007},{x:.03223462203187315,y:.35723870865311785},{x:.031905,y:.353892},{x:.031905,y:.285813}],[{x:.121905,y:.2937462257558374},{x:.121905,y:.3460304727958324},{x:.1524170009298456,y:.4306917867874386},{x:.21387346155335435,y:.48640130996954867},{x:.2736381428091649,y:.513105},{x:.36637802828147564,y:.513105},{x:.4250638403772601,y:.4864880590885319},{x:.48014799999999996,y:.4365549481293854},{x:.48014799999999996,y:.20413270643748072},{x:.4248733312055972,y:.15401438585682045},{x:.36611835928516706,y:.12658200000000003},{x:.27389496414813935,y:.12658200000000003},{x:.2140623112166411,y:.15410266134357853},{x:.15236330162501277,y:.21004602219345103},{x:.121905,y:.2937462257558374}]],r:[[{x:.062422000000000005,y:.03920400000000002},{x:.06328666238185464,y:.030424935509274227},{x:.0658474210369921,y:.02198324554357097},{x:.07000586744638546,y:.01420333951411792},{x:.07560219484660537,y:.00738419484660538},{x:.08242133951411793,y:.0017878674463854757},{x:.09020124554357097,y:-.002370578963007887},{x:.09864293550927423,y:-.004931337618145348},{x:.107422,y:-.005795999999999982},{x:.11620106449072577,y:-.004931337618145348},{x:.12464275445642904,y:-.002370578963007887},{x:.1324226604858821,y:.0017878674463854827},{x:.13924180515339463,y:.00738419484660538},{x:.14483813255361455,y:.01420333951411792},{x:.14899657896300791,y:.02198324554357098},{x:.15155733761814538,y:.030424935509274248},{x:.152422,y:.03920400000000002},{x:.152422,y:.3275398012121413},{x:.1925108808296549,y:.4204278633799401},{x:.27478075869941443,y:.4836647262821032},{x:.3576648607132649,y:.5150589999999999},{x:.49463,y:.5150589999999999},{x:.5034090644907258,y:.5159236623818546},{x:.511850754456429,y:.5184844210369921},{x:.5196306604858821,y:.5226428674463854},{x:.5264498051533947,y:.5282391948466053},{x:.5320461325536145,y:.5350583395141179},{x:.5362045789630079,y:.542838245543571},{x:.5387653376181454,y:.5512799355092742},{x:.53963,y:.560059},{x:.5387653376181454,y:.5688380644907257},{x:.5362045789630079,y:.577279754456429},{x:.5320461325536145,y:.5850596604858821},{x:.5264498051533947,y:.5918788051533946},{x:.5196306604858821,y:.5974751325536145},{x:.511850754456429,y:.6016335789630078},{x:.5034090644907258,y:.6041943376181453},{x:.49463,y:.605059},{x:.349428,y:.605059},{x:.34572095329292224,y:.6046938877675093},{x:.3420044651532413,y:.6044424555930356},{x:.34133700376168824,y:.6042621064259311},{x:.3406489355092742,y:.6041943376181453},{x:.33708434852821606,y:.6031130319790114},{x:.33348832364990477,y:.6021413801353276},{x:.23668632364990477,y:.5654753801353276},{x:.2347311434313091,y:.5645060813254815},{x:.23268939209293205,y:.5637356779621759},{x:.23078888495220712,y:.562551669954317},{x:.22878273496962892,y:.5615571024090896},{x:.2270542238076375,y:.5602249916656349},{x:.22520200238894322,y:.5590710654608507},{x:.152422,y:.5031286093364514},{x:.152422,y:.560059},{x:.15155733761814538,y:.5688380644907257},{x:.14899657896300791,y:.577279754456429},{x:.14483813255361455,y:.5850596604858821},{x:.13924180515339463,y:.5918788051533946},{x:.1324226604858821,y:.5974751325536145},{x:.12464275445642904,y:.6016335789630078},{x:.11620106449072577,y:.6041943376181453},{x:.107422,y:.605059},{x:.09864293550927423,y:.6041943376181453},{x:.09020124554357094,y:.6016335789630078},{x:.08242133951411793,y:.5974751325536145},{x:.07560219484660537,y:.5918788051533946},{x:.07000586744638546,y:.5850596604858821},{x:.0658474210369921,y:.577279754456429},{x:.06328666238185464,y:.5688380644907257},{x:.062422000000000005,y:.560059},{x:.062422000000000005,y:.03920400000000002}]],s:[[{x:.056563,y:.369888},{x:.056809270227573656,y:.3673875764180495},{x:.05684306423764694,y:.36487528163458033},{x:.05724057756471223,y:.36300843953465567},{x:.057427662381854636,y:.3611089355092742},{x:.05815700903783985,y:.3587046018033244},{x:.05868027810379197,y:.35624717294397146},{x:.05943435615016931,y:.3544937526945111},{x:.0599884210369921,y:.352667245543571},{x:.06117281573842168,y:.3504513989095756},{x:.06216545092350078,y:.34814327358726177},{x:.06324711489275962,y:.3465706581451233},{x:.06414686744638545,y:.3448873395141179},{x:.06574079456909979,y:.3429451336955602},{x:.0671646494598194,y:.3408750118720105},{x:.06853233161222538,y:.3395436359667022},{x:.06974319484660536,y:.33806819484660533},{x:.07168540066516299,y:.33647426772389105},{x:.07348575731657993,y:.3347217030198468},{x:.07508689839402109,y:.33368273068076537},{x:.07656233951411792,y:.33247186744638546},{x:.07877818614811302,y:.331287472744956},{x:.08088585786376518,y:.3299198152391437},{x:.15568385786376518,y:.29122381523914376},{x:.1574569269125657,y:.29051717359061785},{x:.15914024554357095,y:.2896174210369921},{x:.16154457924952065,y:.28888807438100694},{x:.16387856938737105,y:.2879578823843842},{x:.16575542835833412,y:.2876107272686775},{x:.16758193550927422,y:.2870566623818547},{x:.17008235909122482,y:.286810392154281},{x:.17255297371919248,y:.2863534124236203},{x:.17446149597461844,y:.28637908481714247},{x:.176361,y:.28619200000000006},{x:.288347309340128,y:.28619200000000006},{x:.3974525128623667,y:.21942256309828728},{x:.45549,y:.1602321160680505},{x:.45549,y:.13007078589845048},{x:.407404042616179,y:.10590438131127383},{x:.31753214348357883,y:.07103500000000003},{x:.21224543978224936,y:.07103500000000003},{x:.16354378174687056,y:.09622932957230687},{x:.14433666195924297,y:.15500005013212306},{x:.1407876006468136,y:.16307617408904287},{x:.13573115992893667,y:.17030473007440486},{x:.12936165598671553,y:.1764079287355125},{x:.12192386528459082,y:.18115122757053267},{x:.11370361794808405,y:.18435234426530817},{x:.10501681347236942,y:.18588826170046568},{x:.09619728088183255,y:.18569995543032455},{x:.08758394986787689,y:.1837946619592429},{x:.07950782591095708,y:.18024560064681355},{x:.07227926992559508,y:.1751891599289366},{x:.06617607126448745,y:.1688196559867155},{x:.06143277242946728,y:.16138186528459075},{x:.05823165573469179,y:.153161617948084},{x:.05669573829953427,y:.14447481347236937},{x:.0568840445696754,y:.1356552808818325},{x:.05878933804075704,y:.12704194986787684},{x:.08372233804075704,y:.050750949867876836},{x:.08542587043333498,y:.04687444913825993},{x:.08709879890390285,y:.042984643121031924},{x:.08719974017890864,y:.04283789110571456},{x:.0872713993531864,y:.04267482591095703},{x:.0896984666241539,y:.03920515373890898},{x:.0920981137517354,y:.03571646140762123},{x:.09222574536637099,y:.03559222185697407},{x:.09232784007106334,y:.035446269925595034},{x:.09538517138631239,y:.032516763866873036},{x:.0984193200775319,y:.02956325371133576},{x:.09856873722042347,y:.029466301081615798},{x:.09869734401328446,y:.029343071264487396},{x:.10226744784494098,y:.027066310594042624},{x:.10581949746716537,y:.024761484353185106},{x:.18061849746716538,y:-.013933515646814817},{x:.1823912439162618,y:-.014639995851387814},{x:.18407424554357094,y:-.01553957896300786},{x:.18647892276401756,y:-.016269029822976466},{x:.18881326125361947,y:-.017199317363260178},{x:.19068977232738848,y:-.017546377073194466},{x:.1925159355092742,y:-.018100337618145335},{x:.19501671633437545,y:-.018346643031098245},{x:.19748769126025723,y:-.018803648509519946},{x:.19939585369049342,y:-.018777950414796084},{x:.201295,y:-.018964999999999968},{x:.325956,y:-.018964999999999968},{x:.3298421413721484,y:-.018582248482612737},{x:.33373593654739714,y:-.01828737118339306},{x:.334227355251249,y:-.018150342613638803},{x:.3347350644907258,y:-.018100337618145335},{x:.33847186362931597,y:-.016966791992147238},{x:.34223331291484477,y:-.015917938922943478},{x:.44196531291484475,y:.022777061077056446},{x:.44388622686678575,y:.02374867869889352},{x:.4458951331158935,y:.02452214291663178},{x:.5206971331158935,y:.06211514291663188},{x:.5230429253028388,y:.06359852573319036},{x:.5254906604858821,y:.06490686744638552},{x:.526762463529903,y:.06595060923072474},{x:.5281530225051898,y:.06682994172267823},{x:.5301643473216751,y:.06874246310749585},{x:.5323098051533947,y:.07050319484660542},{x:.5333535469377338,y:.07177499789062616},{x:.5345458374532134,y:.07290871885358566},{x:.536145400814505,y:.07517688168239829},{x:.5379061325536145,y:.07732233951411796},{x:.538681702666837,y:.0787733291400739},{x:.5396299056666436,y:.08011787031323085},{x:.5407562372498129,y:.08265451036052812},{x:.5420645789630079,y:.08510224554357101},{x:.5425421726806072,y:.08667666103386074},{x:.5432098492552168,y:.08818035245395842},{x:.5438196647691762,y:.09088798806528645},{x:.5446253376181454,y:.09354393550927428},{x:.5447866012813922,y:.09518127295954937},{x:.5451480929944793,y:.09678632860859225},{x:.545217957571016,y:.09956090686586556},{x:.54549,y:.10232300000000005},{x:.54549,y:.17861300000000002},{x:.5450792542455133,y:.1827833716312913},{x:.5447095428008049,y:.18695758114513777},{x:.5446471218945653,y:.18717088502046353},{x:.5446253376181454,y:.1873920644907258},{x:.5434088850836819,y:.19140217107899518},{x:.5422319296624953,y:.19542404720269643},{x:.5421290946347417,y:.1956210747891699},{x:.5420645789630079,y:.19583375445642906},{x:.5400891672372728,y:.199529489854385},{x:.5381501975764,y:.20324447414399938},{x:.5380109003195782,y:.20341765378196683},{x:.5379061325536145,y:.20361366048588211},{x:.5352476756014034,y:.20685299965477524},{x:.5326212052175259,y:.21011832734743824},{x:.45781920521752584,y:.28640632734743826},{x:.45695946559173245,y:.28712616331644525},{x:.45621413415776596,y:.2879638966272176},{x:.45358375241990234,y:.28995255364350675},{x:.45105542866152953,y:.29206944848930627},{x:.4500717756605794,y:.29260772613156716},{x:.4491773318997613,y:.2932839556822147},{x:.3245133318997613,y:.3695749556822147},{x:.3213472249094816,y:.3711082739568931},{x:.3182447544564291,y:.37276657896300797},{x:.31738368821196916,y:.37302778055263114},{x:.3165738477898179,y:.3734199792757539},{x:.31316944110160955,y:.3743061584374605},{x:.3098030644907258,y:.3753273376181454},{x:.3089075854904768,y:.3754155346015568},{x:.3080367917497669,y:.3756422053074494},{x:.30452491480344407,y:.37584718998797495},{x:.301024,y:.376192},{x:.18731182116617404,y:.376192},{x:.146563,y:.397272996602132},{x:.146563,y:.42779681790574337},{x:.20153437253410483,y:.48386323770148376},{x:.2842918489876165,y:.5150589999999999},{x:.39008456648169626,y:.5150589999999999},{x:.4553477907191711,y:.4822576837794137},{x:.4635801440629335,y:.47908783003036465},{x:.47227272283422006,y:.4775849365970516},{x:.4810914761057044,y:.47780675883128426},{x:.48969750413477736,y:.47974477222900047},{x:.4977600820905977,y:.48332450002217653},{x:.5049693696238691,y:.488408375279255},{x:.5110483178577028,y:.4948010275251766},{x:.5157633162205862,y:.5022567907191711},{x:.5189331699696352,y:.5104891440629334},{x:.5204360634029483,y:.51918172283422},{x:.5202142411687157,y:.5280004761057044},{x:.5182762277709995,y:.5366065041347774},{x:.5146964999778234,y:.5446690820905977},{x:.509612624720745,y:.551878369623869},{x:.5032199724748234,y:.5579573178577029},{x:.49576420928082887,y:.5626723162205862},{x:.42096520928082887,y:.6002663162205862},{x:.41942927464851043,y:.6008577252562829},{x:.41797775445642904,y:.6016335789630078},{x:.4153223812886681,y:.6024390776071881},{x:.41273285593706643,y:.6034361699696352},{x:.41111105567880996,y:.6037165692645292},{x:.40953606449072577,y:.6041943376181453},{x:.40677456858393113,y:.6044663212253706},{x:.4040402771657799,y:.6049390634029483},{x:.4023949361559939,y:.6048976773693867},{x:.400757,y:.605059},{x:.276092,y:.605059},{x:.2724204350331364,y:.6046973824138966},{x:.26873912724910987,y:.6044542166602351},{x:.2680367190736708,y:.6042656240771296},{x:.2673129355092742,y:.6041943376181453},{x:.2637824667250502,y:.6031233816208718},{x:.26021933352302795,y:.6021667007079561},{x:.1604883335230279,y:.5645727007079561},{x:.15963695838633216,y:.5641523105976027},{x:.15873109713512196,y:.563867735718488},{x:.15568848233041307,y:.5622026409240001},{x:.1525785174681621,y:.5606670094317409},{x:.15182551530799093,y:.5600886019499048},{x:.15099257773152036,y:.559632770334096},{x:.14833326979676884,y:.5574060851671644},{x:.1455826488796249,y:.5552932363569977},{x:.14495695714670492,y:.554579039378831},{x:.14422895256892138,y:.5539694683796904},{x:.06943095256892137,y:.47768146837969044},{x:.06680494464711424,y:.4744165369262552},{x:.06414686744638545,y:.4711776604858821},{x:.0640418150384659,y:.470981121254323},{x:.0639021439692389,y:.47080746737336276},{x:.06196355058191934,y:.4670929619312254},{x:.0599884210369921,y:.46339775445642906},{x:.05992373008360734,y:.46318449696300446},{x:.05982062094636722,y:.462986931318802},{x:.05864394115023422,y:.4589655982489849},{x:.057427662381854636,y:.45495606449072584},{x:.05740581892006417,y:.454734284101312},{x:.05734323414113077,y:.4545203990307778},{x:.05697368708086039,y:.4503467759079653},{x:.056563,y:.44617700000000005},{x:.056563,y:.369888}]],t:[[{x:.036055000000000004,y:.484201},{x:.03691966238185464,y:.4754219355092742},{x:.0394804210369921,y:.466980245543571},{x:.04363886744638546,y:.4592003395141179},{x:.049235194846605365,y:.45238119484660533},{x:.05605433951411792,y:.44678486744638546},{x:.06383424554357096,y:.44262642103699207},{x:.07227593550927423,y:.4400656623818546},{x:.081055,y:.439201},{x:.201032,y:.439201},{x:.201032,y:.17345100000000002},{x:.2013458215844704,y:.17026471598156256},{x:.20148726326025637,y:.1670661406603643},{x:.20177732050748418,y:.165883633894134},{x:.20189666238185464,y:.16467193550927425},{x:.20282606714776777,y:.16160809859877695},{x:.20358880215081968,y:.15849857690755997},{x:.20410398165518515,y:.15739537903902878},{x:.2044574210369921,y:.15623024554357098},{x:.20596669248041014,y:.15340659727526443},{x:.20732140933230742,y:.15050562638878262},{x:.2623124093323074,y:.05773162638878261},{x:.2645408071528226,y:.05469603003381387},{x:.2666808493837164,y:.051597510818645845},{x:.2671477670132535,y:.051144744093296994},{x:.26753264280400524,y:.05062045370997057},{x:.2703104380556505,y:.04807792433615628},{x:.27301385108661325,y:.04545644382682572},{x:.2735601274310704,y:.04510346799784869},{x:.2740398919211364,y:.04466433724917905},{x:.27726033549019774,y:.04271258283448707},{x:.28042322867453984,y:.040668883056825214},{x:.28102787064035484,y:.04042926278737637},{x:.28158408674943697,y:.04009216722176761},{x:.28512341879560005,y:.038806192593798694},{x:.288624243922019,y:.03741881178414046},{x:.39861224392201905,y:.005893811784140432},{x:.4004470188387682,y:.005558110934368086},{x:.4022319355092743,y:.0050166623818546086},{x:.4047755505163489,y:.004766138170207483},{x:.4072897364122725,y:.0043061284251197166},{x:.4091547486303562,y:.0043348248023798485},{x:.411011,y:.004151999999999975},{x:.520997,y:.004151999999999975},{x:.5297760644907258,y:.0050166623818546086},{x:.538217754456429,y:.00757742103699207},{x:.5459976604858822,y:.011735867446385433},{x:.5528168051533947,y:.017332194846605337},{x:.5584131325536146,y:.02415133951411788},{x:.5625715789630079,y:.031931245543570935},{x:.5651323376181454,y:.040372935509274205},{x:.5659970000000001,y:.049151999999999973},{x:.5651323376181454,y:.05793106449072574},{x:.5625715789630079,y:.06637275445642901},{x:.5584131325536146,y:.07415266048588207},{x:.5528168051533947,y:.08097180515339461},{x:.5459976604858822,y:.08656813255361451},{x:.538217754456429,y:.09072657896300787},{x:.5297760644907258,y:.09328733761814534},{x:.520997,y:.09415199999999997},{x:.41733272532416527,y:.09415199999999997},{x:.33061421916568134,y:.11900744701827656},{x:.291032,y:.1857856616511605},{x:.291032,y:.439201},{x:.466004,y:.439201},{x:.47478306449072577,y:.4400656623818546},{x:.48322475445642904,y:.44262642103699207},{x:.4910046604858821,y:.44678486744638546},{x:.49782380515339464,y:.45238119484660533},{x:.5034201325536145,y:.4592003395141179},{x:.5075785789630078,y:.466980245543571},{x:.5101393376181453,y:.4754219355092742},{x:.511004,y:.484201},{x:.5101393376181453,y:.4929800644907258},{x:.5075785789630078,y:.501421754456429},{x:.5034201325536145,y:.5092016604858821},{x:.49782380515339464,y:.5160208051533947},{x:.4910046604858821,y:.5216171325536145},{x:.48322475445642904,y:.5257755789630079},{x:.47478306449072577,y:.5283363376181454},{x:.466004,y:.529201},{x:.291032,y:.529201},{x:.291032,y:.702148},{x:.2901673376181454,y:.7109270644907257},{x:.2876065789630079,y:.719368754456429},{x:.28344813255361456,y:.7271486604858821},{x:.27785180515339464,y:.7339678051533947},{x:.2710326604858821,y:.7395641325536145},{x:.26325275445642904,y:.7437225789630079},{x:.25481106449072577,y:.7462833376181454},{x:.246032,y:.747148},{x:.23725293550927423,y:.7462833376181454},{x:.22881124554357096,y:.7437225789630079},{x:.2210313395141179,y:.7395641325536145},{x:.21421219484660536,y:.7339678051533947},{x:.20861586744638547,y:.7271486604858821},{x:.2044574210369921,y:.719368754456429},{x:.20189666238185464,y:.7109270644907257},{x:.201032,y:.702148},{x:.201032,y:.529201},{x:.081055,y:.529201},{x:.07227593550927423,y:.5283363376181454},{x:.06383424554357094,y:.5257755789630079},{x:.05605433951411792,y:.5216171325536145},{x:.049235194846605365,y:.5160208051533947},{x:.04363886744638546,y:.5092016604858821},{x:.0394804210369921,y:.501421754456429},{x:.03691966238185464,y:.4929800644907258},{x:.036055000000000004,y:.484201}]],u:[[{x:.047041,y:.17386599999999997},{x:.04733731084809023,y:.17085750547164297},{x:.04744678100255899,y:.1678364368310572},{x:.0477687404511641,y:.16647712720137547},{x:.04790566238185463,y:.1650869355092742},{x:.048783207866406234,y:.16219405573845885},{x:.04947995583647738,y:.15925239265237093},{x:.08761895583647737,y:.04817539265237096},{x:.08938287590080696,y:.04431825367483454},{x:.09111755940033861,y:.04044787795123246},{x:.0912166047918106,y:.04030846472648272},{x:.0912877277290914,y:.04015294120864865},{x:.09377024504918263,y:.03671403980837168},{x:.09622666993792225,y:.03325645223155292},{x:.09635101037087945,y:.03313904059014135},{x:.09645110783403886,y:.03300038080982997},{x:.09955682066149267,y:.030111872039067004},{x:.10264058790854466,y:.027199945760571206},{x:.10278544504987946,y:.027109047766032002},{x:.10291067034954356,y:.026992580340839414},{x:.10652022788210418,y:.024765467971757132},{x:.11011283004156149,y:.02251110668543916},{x:.1858688300415615,y:-.015231893314560811},{x:.1873332068933575,y:-.0157898639141544},{x:.18871524554357097,y:-.01652857896300789},{x:.19144581156206075,y:-.017356887109087667},{x:.19411224226228255,y:-.018372875537717062},{x:.1956573361874375,y:-.018634439137126358},{x:.19715693550927424,y:-.019089337618145352},{x:.1999966293703256,y:-.019369023051625026},{x:.20281003486202434,y:-.01984529472354478},{x:.2043764687674932,y:-.01980039958033106},{x:.205936,y:-.019953999999999986},{x:.319832,y:-.019953999999999986},{x:.32132997950952447,y:-.01980646189590665},{x:.3228344649392302,y:-.019853723877644197},{x:.3257100002545037,y:-.019375067506000147},{x:.3286110644907258,y:-.019089337618145352},{x:.3300514774877758,y:-.018652393112465325},{x:.33153627500704863,y:-.018405236421526333},{x:.3342631764918695,y:-.017374788187221168},{x:.33705275445642907,y:-.01652857896300789},{x:.3383802466773209,y:-.015819019588053155},{x:.3397882963501792,y:-.015286942317463331},{x:.4160692963501792,y:.02245605768253664},{x:.4183042276197719,y:.02384992521458428},{x:.42064256487504254,y:.025062345668598177},{x:.4220380841989542,y:.02617863282445781},{x:.4235544084161923,y:.027124324140885128},{x:.42547446604244665,y:.028927422360218155},{x:.42753134130624215,y:.03057273346328787},{x:.465011,y:.06712410441560081},{x:.465011,y:.025046000000000013},{x:.4658756623818546,y:.016266935509274223},{x:.46843642103699207,y:.007825245543570968},{x:.47259486744638546,y:45339514117916785e-21},{x:.4781911948466053,y:-.006773805153394624},{x:.4850103395141179,y:-.012370132553614528},{x:.492790245543571,y:-.01652857896300789},{x:.5012319355092743,y:-.019089337618145352},{x:.510011,y:-.019953999999999986},{x:.5187900644907257,y:-.019089337618145352},{x:.527231754456429,y:-.01652857896300789},{x:.5350116604858821,y:-.012370132553614521},{x:.5418308051533947,y:-.006773805153394624},{x:.5474271325536145,y:45339514117916785e-21},{x:.5515855789630079,y:.007825245543570974},{x:.5541463376181454,y:.016266935509274244},{x:.555011,y:.025046000000000013},{x:.555011,y:.545898},{x:.5541463376181454,y:.5546770644907257},{x:.5515855789630079,y:.563118754456429},{x:.5474271325536145,y:.5708986604858821},{x:.5418308051533947,y:.5777178051533947},{x:.5350116604858821,y:.5833141325536145},{x:.527231754456429,y:.5874725789630079},{x:.5187900644907257,y:.5900333376181454},{x:.510011,y:.590898},{x:.5012319355092743,y:.5900333376181454},{x:.492790245543571,y:.5874725789630079},{x:.4850103395141179,y:.5833141325536145},{x:.4781911948466053,y:.5777178051533947},{x:.47259486744638546,y:.5708986604858821},{x:.46843642103699207,y:.563118754456429},{x:.4658756623818546,y:.5546770644907257},{x:.465011,y:.545898},{x:.465011,y:.19283699530520199},{x:.36978450462305706,y:.099969048308901},{x:.30930812362389754,y:.07004600000000001},{x:.2165251763155874,y:.07004600000000001},{x:.16675256431883717,y:.09484360935890679},{x:.137041,y:.18137632992954258},{x:.137041,y:.545898},{x:.13617633761814535,y:.5546770644907257},{x:.1336155789630079,y:.563118754456429},{x:.12945713255361452,y:.5708986604858821},{x:.12386080515339463,y:.5777178051533947},{x:.11704166048588208,y:.5833141325536145},{x:.10926175445642904,y:.5874725789630079},{x:.10082006449072577,y:.5900333376181454},{x:.092041,y:.590898},{x:.08326193550927423,y:.5900333376181454},{x:.07482024554357093,y:.5874725789630079},{x:.06704033951411792,y:.5833141325536145},{x:.06022119484660536,y:.5777178051533947},{x:.05462486744638546,y:.5708986604858821},{x:.050466421036992094,y:.563118754456429},{x:.04790566238185463,y:.5546770644907257},{x:.047041,y:.545898},{x:.047041,y:.17386599999999997}]],v:[[{x:.003930906419490336,y:.5438334563092145},{x:.005386967221411215,y:.5351329102741644},{x:.00851244255100142,y:.5268836061622384},{x:.26071044255100145,y:.018289606162238365},{x:.26144011887972296,y:.017121905714788027},{x:.2620056398700735,y:.01586646241095203},{x:.26377267234206975,y:.013389122267562115},{x:.26538522214413157,y:.010808560104194675},{x:.26632868500311185,y:.009805649483352854},{x:.267128264504625,y:.008684656842684199},{x:.2693446490294707,y:.006599649029470163},{x:.2714296568426842,y:.00438326450462502},{x:.27255064948335267,y:.0035836850031119977},{x:.2735535601041947,y:.0026402221441315446},{x:.27613412226756273,y:.0010276723420693272},{x:.278611462410952,y:-.0007393601299264599},{x:.2798669057147878,y:-.0013048811202769175},{x:.28103460616223835,y:-.0020345574489985807},{x:.28388017640738666,y:-.0031126798553442526},{x:.2866546460885495,y:-.00436245420755494},{x:.28799629407344673,y:-.00467218403223142},{x:.2892839102741644,y:-.005160032778588779},{x:.2922851349323858,y:-.00566229614975999},{x:.29525011283741587,y:-.006346784254711718},{x:.2966264067237199,y:-.006388820170250395},{x:.2979844563092145,y:-.006616093580509658},{x:.301026,y:-.00652319621682493},{x:.30406754369078554,y:-.006616093580509658},{x:.3054255932762801,y:-.006388820170250395},{x:.30680188716258416,y:-.006346784254711718},{x:.30976686506761425,y:-.005662296149759988},{x:.31276808972583564,y:-.005160032778588779},{x:.3140557059265533,y:-.00467218403223142},{x:.3153973539114505,y:-.00436245420755494},{x:.3181718235926135,y:-.0031126798553442175},{x:.3210173938377617,y:-.0020345574489985807},{x:.32218509428521225,y:-.0013048811202769192},{x:.323440537589048,y:-.0007393601299264599},{x:.32591787773243747,y:.0010276723420694187},{x:.32849843989580535,y:.0026402221441315446},{x:.32950135051664736,y:.0035836850031119635},{x:.3306223431573158,y:.00438326450462502},{x:.3327073509705293,y:.006599649029470129},{x:.334923735495375,y:.008684656842684203},{x:.33572331499688823,y:.009805649483352899},{x:.33666677785586846,y:.01080856010419469},{x:.3382793276579303,y:.013389122267562135},{x:.3400463601299265,y:.01586646241095204},{x:.34061188112027707,y:.017121905714788034},{x:.3413415574489986,y:.018289606162238365},{x:.5935395574489987,y:.5268836061622384},{x:.5966650327785888,y:.5351329102741644},{x:.5981210935805097,y:.5438334563092145},{x:.5978517842547117,y:.5526508871625841},{x:.595867454207555,y:.5612463539114505},{x:.5922443601299265,y:.569289537589048},{x:.587121735495375,y:.5764713431573159},{x:.5806964398958053,y:.5825157778558685},{x:.5732153938377617,y:.5871905574489986},{x:.5649660897258356,y:.5903160327785888},{x:.5562655436907855,y:.5917720935805096},{x:.5474481128374159,y:.5915027842547117},{x:.5388526460885495,y:.589518454207555},{x:.5308094624109521,y:.5858953601299265},{x:.5236276568426842,y:.580772735495375},{x:.5175832221441315,y:.5743474398958054},{x:.5129084425510014,y:.5668663938377616},{x:.301026,y:.13957458745236595},{x:.08914355744899859,y:.5668663938377616},{x:.08446877785586845,y:.5743474398958054},{x:.07842434315731579,y:.580772735495375},{x:.07124253758904797,y:.5858953601299265},{x:.06319935391145051,y:.589518454207555},{x:.054603887162584124,y:.5915027842547117},{x:.04578645630921451,y:.5917720935805096},{x:.037085910274164385,y:.5903160327785888},{x:.028836606162238352,y:.5871905574489986},{x:.02135556010419467,y:.5825157778558685},{x:.014930264504625007,y:.5764713431573159},{x:.009807639870073534,y:.569289537589048},{x:.006184545792445054,y:.5612463539114505},{x:.004200215745288276,y:.5526508871625841},{x:.003930906419490336,y:.5438334563092145}]],w:[[{x:-.04481226541001698,y:.5427688011711321},{x:-.0431501306438814,y:.534105261341125},{x:.1073618693561186,y:.025511261341124997},{x:.10747750697825527,y:.02522662926113043},{x:.10753949092041715,y:.02492572151525217},{x:.1091366577408943,y:.021142772088450095},{x:.11068223944402648,y:.01733845540642648},{x:.11085118408582124,y:.017081852232977028},{x:.1109706812129555,y:.01679881881229654},{x:.11327517574267339,y:.0134001494872997},{x:.11553324489331337,y:.009970459715744673},{x:.11574900410692728,y:.009751746564891355},{x:.11592142221145292,y:.009497464285038355},{x:.11884468401801046,y:.006613684018010047},{x:.12172846428503836,y:.0036904222114529234},{x:.12198274656489135,y:.0035180041069272803},{x:.12220145971574467,y:.0033022448933133844},{x:.1256311494872997,y:.001044175742673395},{x:.12902981881229655,y:-.0012603187870445023},{x:.12931285223297703,y:-.0013798159141787526},{x:.12956945540642648,y:-.0015487605559735135},{x:.1333737720884501,y:-.0030943422591057004},{x:.13715672151525218,y:-.004691509079582858},{x:.13745762926113045,y:-.004753493021744735},{x:.137742261341125,y:-.004869130643881392},{x:.14177500717701197,y:-.005642829061426576},{x:.14579686008065018,y:-.006471289947453558},{x:.1461040784358031,y:-.006473378696506754},{x:.14640580117113214,y:-.006531265410016966},{x:.150512,y:-.006503347745684165},{x:.15461819882886788,y:-.006531265410016966},{x:.15491992156419693,y:-.006473378696506754},{x:.15522713991934983,y:-.006471289947453558},{x:.159248992822988,y:-.005642829061426585},{x:.16328173865887502,y:-.004869130643881392},{x:.16356637073886957,y:-.004753493021744732},{x:.16386727848474786,y:-.004691509079582851},{x:.1676502279115502,y:-.0030943422591055763},{x:.17145454459357354,y:-.0015487605559735135},{x:.17171114776702298,y:-.0013798159141787517},{x:.17199418118770346,y:-.0012603187870445023},{x:.17539285051270065,y:.001044175742673613},{x:.17882254028425534,y:.0033022448933133844},{x:.17904125343510863,y:.0035180041069272374},{x:.17929553571496165,y:.0036904222114529095},{x:.18217931598198978,y:.006613684018010279},{x:.1851025777885471,y:.009497464285038375},{x:.18527499589307275,y:.009751746564891386},{x:.18549075510668664,y:.009970459715744683},{x:.1877488242573266,y:.013400149487299715},{x:.1900533187870445,y:.016798818812296553},{x:.19017281591417878,y:.01708185223297707},{x:.19034176055597352,y:.01733845540642648},{x:.19188734225910553,y:.02114277208844964},{x:.19348450907958287,y:.02492572151525217},{x:.19354649302174473,y:.02522662926113043},{x:.1936621306438814,y:.025511261341124997},{x:.30102443002882817,y:.38829842311817664},{x:.4083889386148475,y:.025511027311792445},{x:.40850451632069196,y:.025226547135196155},{x:.40856646677585007,y:.0249257992040805},{x:.410163689741502,y:.021142697708463984},{x:.41170935302882616,y:.01733823938560964},{x:.41187820927072055,y:.017081773507688556},{x:.41199764237598097,y:.016798890297984457},{x:.41430222163921304,y:.013400082779514221},{x:.4165603984391837,y:.009970270005002412},{x:.41677604416644776,y:.009751674265617277},{x:.4169483701745541,y:.009497526820430955},{x:.41987174204670485,y:.006613627545966159},{x:.42275565189129766,y:.0036902661012626486},{x:.42300979995956794,y:.0035179410120882958},{x:.4232283964786704,y:.003302296075210584},{x:.4266582174181369,y:.0010441316765615349},{x:.4300570332693414,y:-.001260435297455717},{x:.43033991691088264,y:-.001379867379883588},{x:.4305963833993421,y:-.0015487226944633017},{x:.43440084731088763,y:-.0030943722258508074},{x:.43818395458161874,y:-.004691581512785238},{x:.43848470273672896,y:-.004753530880516994},{x:.4387691833312223,y:-.0048691075577547704},{x:.44280208680029426,y:-.005642843777199688},{x:.4468241027997286,y:-.0064713155198797695},{x:.44713115788546864,y:-.006473401493455157},{x:.44743272015628793,y:-.006531257986460835},{x:.45153908096424766,y:-.006503346644966049},{x:.45564544187310013,y:-.00653124313893301},{x:.4559470039347234,y:-.006473385555557348},{x:.4562540590129192,y:-.0064712984717510205},{x:.4602760720167908,y:-.005642812186517322},{x:.4643089726882076,y:-.004869061385152536},{x:.46459345286480397,y:-.004753483679308031},{x:.46489420079591953,y:-.0046915332241499325},{x:.46867730229153426,y:-.003094310258498727},{x:.4724817606143904,y:-.0015486469711738574},{x:.4727382264923116,y:-.0013797907292793573},{x:.47302110970201555,y:-.0012603576240190345},{x:.4764199172204845,y:.0010442216392121837},{x:.47984972999499764,y:.0033023984391836667},{x:.4800683257343829,y:.003518044166447842},{x:.48032247317956905,y:.003690370174554085},{x:.483206372454032,y:.0066137420467029156},{x:.48612973389873737,y:.009497651891297622},{x:.4863020589879118,y:.009751799959568049},{x:.48651770392478944,y:.009970396478670394},{x:.4887758683234383,y:.01340021741813658},{x:.49108043529745576,y:.016799033269341422},{x:.49119986737988364,y:.017081916910882677},{x:.4913687226944633,y:.017338383399342037},{x:.4929143722258502,y:.021142847310886045},{x:.4945115815127853,y:.024925954581618698},{x:.4945735308805171,y:.025226702736729056},{x:.4946891075577548,y:.025511183331222268},{x:.6452021075577549,y:.5341051833312223},{x:.6468642579864609,y:.542768720156288},{x:.646804298471751,y:.5515900590129192},{x:.64502453322415,y:.5602302007959196},{x:.641593357624019,y:.5683571097020156},{x:.636642629825446,y:.5756584731795691},{x:.6303626035213297,y:.5818537039247894},{x:.622994616600658,y:.5867047226944633},{x:.6148218166687778,y:.5900251075577548},{x:.6061582798437121,y:.5916872579864608},{x:.5973369409870808,y:.591627298471751},{x:.5886967992040805,y:.58984753322415},{x:.5805698902979844,y:.5864163576240191},{x:.573268526820431,y:.5814656298254459},{x:.5670732960752106,y:.5751856035213296},{x:.5622222773055368,y:.567817616600658},{x:.5589018924422452,y:.5596448166687777},{x:.4515387133151436,y:.1968570925189096},{x:.34417406138515255,y:.5596449726882076},{x:.3440584683142858,y:.559929490683899},{x:.34399650907958285,y:.5602302784847478},{x:.3423992950207163,y:.5640133397974443},{x:.3408536469711739,y:.5678177606143904},{x:.3406847682813525,y:.5680742605871558},{x:.34056531878704455,y:.5683571811877035},{x:.33826075609875456,y:.5717559510329858},{x:.33600260156081635,y:.5751857299949976},{x:.33578692716538155,y:.5754043547947312},{x:.3356145777885471,y:.5756585357149616},{x:.33269122952253233,y:.5785424012737268},{x:.32980734810870244,y:.5814657338987373},{x:.3295531662537196,y:.581638081896991},{x:.3293345402842553,y:.5818537551066867},{x:.3259047490749403,y:.5841118910428063},{x:.32250596673065857,y:.5864164352974557},{x:.322223045482268,y:.5865358832573104},{x:.32196654459357354,y:.5867047605559735},{x:.318162115393689,y:.5882503879717952},{x:.31437904541838135,y:.5898475815127853},{x:.31407825728149374,y:.5899095391161314},{x:.313793738658875,y:.5900251306438814},{x:.30976087354902626,y:.5907988519446131},{x:.3057388972002714,y:.5916273155198798},{x:.3054318012943039,y:.5916294017707667},{x:.3051301988288679,y:.5916872654100169},{x:.30102387855356455,y:.5916593469199811},{x:.29691755812689985,y:.5916872431389331},{x:.2966159559752979,y:.5916293778639092},{x:.2963088600806502,y:.5916272899474536},{x:.29228688822522214,y:.5907988045585649},{x:.28825402731179245,y:.5900250613851525},{x:.2879695093161011,y:.5899094683142858},{x:.2876687215152522,y:.5898475090795828},{x:.2838856602025565,y:.5882502950207166},{x:.28008123938560964,y:.5867046469711739},{x:.27982473941284386,y:.5865357682813523},{x:.27954181881229656,y:.5864163187870445},{x:.276143048967013,y:.5841117560987538},{x:.2727132700050024,y:.5818536015608163},{x:.2724946452052691,y:.5816379271653819},{x:.27224046428503834,y:.5814655777885471},{x:.2693565987262721,y:.5785422295225312},{x:.2664332661012626,y:.5756583481087024},{x:.2662609181030087,y:.5754041662537193},{x:.2660452448933134,y:.5751855402842553},{x:.26378710895719626,y:.5717557490749442},{x:.2614825647025443,y:.5683569667306586},{x:.2613631167426894,y:.5680740454822678},{x:.2611942394440265,y:.5678175445935736},{x:.2596486120282045,y:.5640131153936881},{x:.2580514184872148,y:.5602300454183813},{x:.25798946088386876,y:.5599292572814941},{x:.2578738693561186,y:.559644738658875},{x:.150512,y:.196859029989096},{x:.0431501306438814,y:.559644738658875},{x:.039829760555973516,y:.5678175445935736},{x:.034978755106686646,y:.5751855402842553},{x:.028783535714961644,y:.5814655777885471},{x:.021482181187703456,y:.5864163187870445},{x:.01335527848474783,y:.5898475090795828},{x:.0047151399193498065,y:.5916272899474536},{x:-.004106198828867862,y:.5916872654100169},{x:-.01276973865887501,y:.5900251306438814},{x:-.020942544593573535,y:.5867047605559735},{x:-.028310540284255312,y:.5818537551066867},{x:-.034590577788547086,y:.5756585357149616},{x:-.03954131878704451,y:.5683571811877035},{x:-.04297250907958286,y:.5602302784847478},{x:-.04475228994745356,y:.5515901399193498},{x:-.04481226541001698,y:.5427688011711321}]],x:[[{x:-.007882248997940308,y:.03911618267902263},{x:-.007180671607209664,y:.030322582532795114},{x:-.0047770285451087455,y:.021834819906700376},{x:-.0007636904665355299,y:.013979074758467071},{x:.004705112296856322,y:.007057238968589209},{x:.011419216721809594,y:.001335314804661543},{x:.019120603540586492,y:-.0029668073965882433},{x:.02751331277672888,y:-.0056837994916240225},{x:.036274817320977384,y:-.006711248997940296},{x:.04506841746720488,y:-.006009671607209652},{x:.05355618009329963,y:-.003606028545108733},{x:.061411925241532925,y:.0004073095334644686},{x:.0683337610314108,y:.005876112296856327},{x:.3010265,y:.23008742701759316},{x:.5337192389685892,y:.005876112296856327},{x:.540641074758467,y:.0004073095334644686},{x:.5484968199067003,y:-.003606028545108733},{x:.556984582532795,y:-.006009671607209652},{x:.5657781826790226,y:-.006711248997940296},{x:.5745396872232711,y:-.0056837994916240225},{x:.5829323964594135,y:-.0029668073965882433},{x:.5906337832781904,y:.001335314804661536},{x:.5973478877031436,y:.007057238968589213},{x:.6028166904665355,y:.013979074758467089},{x:.6068300285451087,y:.021834819906700383},{x:.6092336716072096,y:.030322582532795128},{x:.6099352489979403,y:.03911618267902263},{x:.608907799491624,y:.047877687223271126},{x:.6061908073965883,y:.05627039645941352},{x:.6018886851953384,y:.0639717832781904},{x:.5961667610314108,y:.07068588770314368},{x:.36588095484811606,y:.292578},{x:.5961667610314108,y:.5144701122968564},{x:.6018886851953384,y:.5211842167218096},{x:.6061908073965883,y:.5288856035405864},{x:.608907799491624,y:.5372783127767289},{x:.6099352489979403,y:.5460398173209774},{x:.6092336716072096,y:.5548334174672048},{x:.6068300285451087,y:.5633211800932996},{x:.6028166904665355,y:.571176925241533},{x:.5973478877031436,y:.5780987610314108},{x:.5906337832781904,y:.5838206851953385},{x:.5829323964594135,y:.5881228073965883},{x:.5745396872232711,y:.590839799491624},{x:.5657781826790226,y:.5918672489979403},{x:.556984582532795,y:.5911656716072097},{x:.5484968199067003,y:.5887620285451087},{x:.540641074758467,y:.5847486904665355},{x:.5337192389685892,y:.5792798877031436},{x:.3010265,y:.35506857298240685},{x:.0683337610314108,y:.5792798877031436},{x:.06141192524153289,y:.5847486904665355},{x:.05355618009329961,y:.5887620285451087},{x:.0450684174672049,y:.5911656716072097},{x:.03627481732097735,y:.5918672489979403},{x:.02751331277672888,y:.590839799491624},{x:.01912060354058648,y:.5881228073965883},{x:.011419216721809584,y:.5838206851953385},{x:.004705112296856315,y:.5780987610314108},{x:-.0007636904665355368,y:.571176925241533},{x:-.004777028545108752,y:.5633211800932996},{x:-.007180671607209664,y:.5548334174672048},{x:-.007882248997940308,y:.5460398173209774},{x:-.006854799491624035,y:.5372783127767289},{x:-.004137807396588256,y:.5288856035405864},{x:.0001643148046615306,y:.5211842167218096},{x:.005886238968589197,y:.5144701122968564},{x:.23617204515188386,y:.292578},{x:.005886238968589197,y:.07068588770314368},{x:.00016431480466150977,y:.0639717832781904},{x:-.004137807396588256,y:.05627039645941351},{x:-.006854799491624035,y:.047877687223271126},{x:-.007882248997940308,y:.03911618267902263}]],y:[[{x:-7800000000000168e-20,y:-.15516599999999992},{x:.0007866623818546317,y:-.16394506449072568},{x:.003347421036992093,y:-.17238675445642895},{x:.007505867446385456,y:-.180166660485882},{x:.013102194846605353,y:-.18698580515339455},{x:.0199213395141179,y:-.19258213255361445},{x:.02770124554357093,y:-.1967405789630078},{x:.03614293550927421,y:-.19930133761814528},{x:.044922,y:-.2001659999999999},{x:.084618,y:-.2001659999999999},{x:.08470326921416556,y:-.20015760171543356},{x:.08478856964894584,y:-.200165676732115},{x:.08909199801123496,y:-.19972534965725622},{x:.09339706449072577,y:-.19930133761814528},{x:.0934790568568106,y:-.19927646550581232},{x:.09356429362525961,y:-.1992677440740231},{x:.09769912926743524,y:-.1979963205354665},{x:.10183875445642904,y:-.1967405789630078},{x:.1019143190537861,y:-.19670018884423682},{x:.10199621655469396,y:-.19667500612370953},{x:.18074721655469395,y:-.16370500612370958},{x:.18295470197399702,y:-.16251430076809983},{x:.18525522528778574,y:-.16151511930158513},{x:.18682754729843723,y:-.16042530954354395},{x:.18851130436774752,y:-.15951710034658062},{x:.19044407848245243,y:-.15791861501920362},{x:.19250546725178602,y:-.1564898227103016},{x:.27125546725178606,y:-.08958282271030155},{x:.27347158712358693,y:-.0872898341236823},{x:.27580944257935097,y:-.08512109812948883},{x:.27653091968085064,y:-.08412438503144627},{x:.2773860111192193,y:-.08323963374445845},{x:.2791122089873479,y:-.0805583607511536},{x:.2809820438025964,y:-.07797520343727593},{x:.35909504380259644,y:.055837796562724036},{x:.35921507445013207,y:.05609937330868571},{x:.35938084670619436,y:.05633463764830328},{x:.359814044874128,y:.05731131476590327},{x:.3603874218559792,y:.0582128676935936},{x:.5972854218559792,y:.5265638676935935},{x:.6004763520268956,y:.5347880745861305},{x:.6020015061983327,y:.5434767752438966},{x:.6018022735507984,y:.5522960677732933},{x:.5998863104832066,y:.5609070317083322},{x:.5963272463817603,y:.568978752534074},{x:.591261854083932,y:.5762010385458585},{x:.5848847937750224,y:.5822963413425576},{x:.5774411323064065,y:.5870304218559792},{x:.5692169254138695,y:.5902213520268956},{x:.5605282247561034,y:.5917465061983327},{x:.5517089322267067,y:.5915472735507984},{x:.5430979682916678,y:.5896313104832066},{x:.5350262474659261,y:.5860722463817603},{x:.5278039614541415,y:.5810068540839319},{x:.5217086586574424,y:.5746297937750224},{x:.5169745781440208,y:.5671861323064065},{x:.3203411783046204,y:.17843886787959407},{x:.12481771439881506,y:.5670983271806026},{x:.12009991274687032,y:.5745523168465348},{x:.11401856108654926,y:.5809426827476728},{x:.10680736235169674,y:.5860238467061943},{x:.09874343886560628,y:.5896005424407229},{x:.09013668268554793,y:.5915353195400148},{x:.08131784662479694,y:.5917538256051798},{x:.0726258336075076,y:.5902476635706729},{x:.06439467281939737,y:.5870747143988151},{x:.05694068315346515,y:.5823569127468703},{x:.05055031725232718,y:.5762755610865493},{x:.04546915329380567,y:.5690643623516968},{x:.041892457559277035,y:.5610004388656062},{x:.039957680459985136,y:.5523936826855479},{x:.039739174394820276,y:.5435748466247969},{x:.0412453364293271,y:.5348828336075077},{x:.04441828560118493,y:.5266516728193974},{x:.26905653043412125,y:.0801181620528446},{x:.20712852539925722,y:-.025968816269973185},{x:.1395520619925953,y:-.08338263769409424},{x:.07557825049874085,y:-.11016599999999992},{x:.044922,y:-.11016599999999992},{x:.03614293550927422,y:-.11103066238185455},{x:.02770124554357096,y:-.11359142103699202},{x:.01992133951411791,y:-.11774986744638538},{x:.01310219484660536,y:-.12334619484660528},{x:.007505867446385456,y:-.13016533951411782},{x:.003347421036992093,y:-.13794524554357088},{x:.0007866623818546317,y:-.14638693550927412},{x:-7800000000000168e-20,y:-.15516599999999992}]],z:[[{x:.051680000000000004,y:.038348999999999966},{x:.05192127447228559,y:.035899299172703986},{x:.05194879067317478,y:.033437899088824954},{x:.05235257576103353,y:.03152022369965088},{x:.05254466238185464,y:.029569935509274177},{x:.053259213756049764,y:.02721437531096308},{x:.05376639657582897,y:.024805638484003446},{x:.054536542955643516,y:.023003585252525667},{x:.0551054210369921,y:.02112824554357092},{x:.05626578950451143,y:.018957348831652537},{x:.05723314819184797,y:.01669384166703705},{x:.05834005957014514,y:.015076662488338128},{x:.05926386744638546,y:.01334833951411787},{x:.060825460697764414,y:.011445532631778232},{x:.062215820200804926,y:.009414240440453706},{x:.0636169585940798,y:.00804408260344652},{x:.06486019484660537,y:.0065291948466053296},{x:.06676300172894496,y:.004967601595226417},{x:.06852293131171022,y:.0032465857969436324},{x:.07016445175727676,y:.0021761036989109733},{x:.07167933951411792,y:.0009328674463854256},{x:.07385023622603624,y:-.00022750102113387976},{x:.07591210278164046,y:-.0015721027544036703},{x:.07773092256935071,y:-.0023017710867676167},{x:.07945924554357096,y:-.003225578963007937},{x:.08181480574188199,y:-.003940130337203038},{x:.08409937289490133,y:-.004856645714911602},{x:.08602559580031956,y:-.00521745953679684},{x:.08790093550927423,y:-.0057863376181453985},{x:.09035063633657014,y:-.00602761209043098},{x:.09277010945251417,y:-.006480819940600742},{x:.09472971180962335,y:-.006458913379178931},{x:.09668,y:-.006651000000000032},{x:.505373,y:-.006651000000000032},{x:.5141520644907257,y:-.0057863376181453985},{x:.522593754456429,y:-.003225578963007937},{x:.5303736604858821,y:.0009328674463854256},{x:.5371928051533946,y:.0065291948466053296},{x:.5427891325536145,y:.013348339514117874},{x:.5469475789630078,y:.021128245543570928},{x:.5495083376181453,y:.029569935509274198},{x:.550373,y:.038348999999999966},{x:.5495083376181453,y:.047128064490725735},{x:.5469475789630078,y:.055569754456429005},{x:.5427891325536145,y:.06334966048588206},{x:.5371928051533946,y:.0701688051533946},{x:.5303736604858821,y:.0757651325536145},{x:.522593754456429,y:.07992357896300786},{x:.5141520644907257,y:.08248433761814533},{x:.505373,y:.08334899999999996},{x:.190464663126857,y:.08334899999999996},{x:.5404754142030563,y:.5196949313117102},{x:.5415458963010891,y:.5213364517572769},{x:.5427891325536145,y:.5228513395141179},{x:.5439495010211337,y:.525022236226036},{x:.5452941027544036,y:.5270841027816404},{x:.5460237710867677,y:.5289029225693511},{x:.5469475789630078,y:.530631245543571},{x:.5476621303372028,y:.5329868057418816},{x:.5485786457149116,y:.5352713728949013},{x:.5489394595367969,y:.53719759580032},{x:.5495083376181453,y:.5390729355092743},{x:.5497496120904308,y:.5415226363365697},{x:.5502028199406007,y:.5439421094525142},{x:.5501809133791788,y:.5459017118096235},{x:.550373,y:.547852},{x:.5501317255277144,y:.5503017008272966},{x:.5501042093268251,y:.552763100911175},{x:.5497004242389665,y:.5546807763003486},{x:.5495083376181453,y:.5566310644907257},{x:.5487937862439503,y:.5589866246890365},{x:.548286603424171,y:.5613953615159966},{x:.5475164570443563,y:.5631974147474748},{x:.5469475789630078,y:.565072754456429},{x:.5457872104954887,y:.567243651168347},{x:.544819851808152,y:.569507158332963},{x:.5437129404298549,y:.5711243375116617},{x:.5427891325536145,y:.5728526604858821},{x:.5412275393022352,y:.5747554673682221},{x:.539837179799195,y:.5767867595595463},{x:.5384360414059206,y:.578156917396553},{x:.5371928051533946,y:.5796718051533947},{x:.5352899982710546,y:.5812333984047738},{x:.5335300686882897,y:.5829544142030564},{x:.5318885482427235,y:.5840248963010888},{x:.5303736604858821,y:.5852681325536145},{x:.5282027637739638,y:.5864285010211338},{x:.5261408972183595,y:.5877731027544036},{x:.5243220774306487,y:.5885027710867679},{x:.522593754456429,y:.5894265789630079},{x:.5202381942581186,y:.5901411303372028},{x:.5179536271050986,y:.5910576457149116},{x:.5160274041996802,y:.5914184595367968},{x:.5141520644907257,y:.5919873376181454},{x:.5117023636634302,y:.5922286120904309},{x:.5092828905474858,y:.5926818199406008},{x:.5073232881903766,y:.5926599133791789},{x:.505373,y:.592852},{x:.09668,y:.592852},{x:.08790093550927423,y:.5919873376181454},{x:.07945924554357094,y:.5894265789630079},{x:.07167933951411792,y:.5852681325536145},{x:.06486019484660537,y:.5796718051533947},{x:.05926386744638546,y:.5728526604858821},{x:.0551054210369921,y:.565072754456429},{x:.05254466238185464,y:.5566310644907257},{x:.051680000000000004,y:.547852},{x:.05254466238185464,y:.5390729355092743},{x:.0551054210369921,y:.530631245543571},{x:.05926386744638546,y:.5228513395141179},{x:.06486019484660537,y:.5160321948466053},{x:.07167933951411792,y:.5104358674463855},{x:.07945924554357096,y:.5062774210369921},{x:.08790093550927423,y:.5037166623818546},{x:.09668,y:.502852},{x:.41158833687314295,y:.502852},{x:.06157758579694366,y:.06650606868828973},{x:.06050710369891106,y:.06486454824272328},{x:.05926386744638546,y:.06334966048588206},{x:.05810349897886612,y:.06117876377396365},{x:.05675889724559635,y:.059116897218359485},{x:.05602922891323242,y:.05729807743064926},{x:.0551054210369921,y:.055569754456429005},{x:.054390869662797,y:.05321419425811798},{x:.053474354285088434,y:.050929627105098636},{x:.0531135404632032,y:.04900340419968042},{x:.05254466238185464,y:.047128064490725735},{x:.05230338790956906,y:.04467836366342984},{x:.051850180059399294,y:.04225889054748581},{x:.05187208662082111,y:.04029928819037662},{x:.051680000000000004,y:.038348999999999966}]]},c0=D0;function z(y){return!y||typeof y!=\"object\"?!1:\"route_type\"in y&&y.route_type===\"wire\"&&(\"start_width\"in y||\"end_width\"in y||\"width_interpolation_mode\"in y)}function X0(y){let x=[];for(let e=0;e<y.length-1;e++){let t=y[e];if(!z(t))continue;let r=y[e+1];if(!r)continue;let n=r.route_type===\"through_pad\"?r.start:{x:r.x,y:r.y},o=r.route_type===\"via\"?r.from_layer:r.route_type===\"through_pad\"?r.start_layer:r.layer;if(!n||o!==t.layer||t.width!==t.start_width)continue;let i={start:{x:t.x,y:t.y},end:n,start_width:t.start_width,end_width:t.end_width,width_interpolation_mode:t.width_interpolation_mode,layer:t.layer,is_inside_copper_pour:!!(t.is_inside_copper_pour&&r.is_inside_copper_pour)};f0(i)&&x.push(i)}return x}function $0(y){let{start:x,end:e,start_width:t,end_width:r}=y,n=e.x-x.x,o=e.y-x.y,i=Math.hypot(n,o);if(!f0(y))return[];let a=Math.abs(r-t),c=y.width_interpolation_mode===\"linear\"?1:Math.max(1,Math.ceil(Math.sqrt(a/(.001+a*1e-6)*(3/8)))),d=-o/i,f=n/i,l=[],p=[];for(let s=0;s<=c;s++){let L=s/c,m=t<=r?L:1-L,_=(y.width_interpolation_mode===\"quadratic\"?Math.min(t,r)+a*m*m:t+(r-t)*L)/2,h=x.x+n*L,g=x.y+o*L;l.push({x:h+d*_,y:g+f*_}),p.push({x:h-d*_,y:g-f*_})}return[...l,...p.reverse()]}function f0(y){let{start:x,end:e,start_width:t,end_width:r}=y,n=Math.hypot(e.x-x.x,e.y-x.y);return!(![x.x,x.y,e.x,e.y,n,t,r].every(Number.isFinite)||n<=0||t<=0||r<=0||y.width_interpolation_mode!==\"linear\"&&y.width_interpolation_mode!==\"quadratic\")}var H=class{constructor(y=[1,1,1,1],x=0,e=0){M(this,\"color\");M(this,\"element\");M(this,\"category\");M(this,\"vertices\",[]);M(this,\"indices\",[]);this.color=y,this.element=x,this.category=e}polygon(y){if(!y[0]||y[0].length<3)return;let x=[],e=[];for(let[n,o]of y.entries()){n&&e.push(x.length/2);for(let i of o){if(!Number.isFinite(i.x)||!Number.isFinite(i.y))throw new Error(\"Non-finite polygon vertex\");x.push(i.x,i.y)}}let t=V(x,e,2),r=this.vertices.length/8;for(let n=0;n<x.length;n+=2)this.vertices.push(x[n],x[n+1],...this.color,this.element,this.category);for(let n of t)this.indices.push(r+n)}line(y,x,e){if(!(e>0))return;let t=Math.atan2(x.y-y.y,x.x-y.x),r=e/2,n=[];for(let o=0;o<=12;o++){let i=t+Math.PI/2+o*Math.PI/12;n.push({x:y.x+r*Math.cos(i),y:y.y+r*Math.sin(i)})}for(let o=0;o<=12;o++){let i=t-Math.PI/2+o*Math.PI/12;n.push({x:x.x+r*Math.cos(i),y:x.y+r*Math.sin(i)})}this.polygon([n])}path(y,x,e=!1){for(let t=1;t<y.length;t++)this.line(y[t-1],y[t],x);e&&y.length>2&&this.line(y.at(-1),y[0],x)}build(){return{vertices:new Float32Array(this.vertices),indices:new Uint32Array(this.indices)}}};function Y(y,x,e=0){let t=e*Math.PI/180,r=y.x-x.x,n=y.y-x.y;return{x:x.x+r*Math.cos(t)-n*Math.sin(t),y:x.y+r*Math.sin(t)+n*Math.cos(t)}}function q(y,x,e=x,t=0){return x>0&&e>0?Array.from({length:96},(r,n)=>{let o=n*2*Math.PI/96;return Y({x:y.x+Math.cos(o)*x/2,y:y.y+Math.sin(o)*e/2},y,t)}):[]}function p0(y,x,e,t=0,r=0){if(!(x>0&&e>0))return[];t=Math.max(0,Math.min(t,x/2,e/2));let n=[];for(let o=0;o<4;o++){let i=o===0||o===3?1:-1,a=o<2?1:-1,c=t?24:1;for(let d=0;d<c;d++){let f=(o+d/(c-1||1))*Math.PI/2;n.push(Y({x:y.x+i*(x/2-t)+t*Math.cos(f),y:y.y+a*(e/2-t)+t*Math.sin(f)},y,r))}}return n}function V0(y){let x=[];for(let e=0;e<y.length;e++){let t=y[e],r=y[(e+1)%y.length];x.push({x:t.x,y:t.y});let n=t.bulge??0,o=r.x-t.x,i=r.y-t.y;if(!n||!o&&!i)continue;let a=4*Math.atan(n),c={x:(t.x+r.x)/2-i*(1-n*n)/(4*n),y:(t.y+r.y)/2+o*(1-n*n)/(4*n)},d=Math.atan2(t.y-c.y,t.x-c.x),f=Math.hypot(t.x-c.x,t.y-c.y),l=Math.max(2,Math.ceil(Math.abs(a)/(Math.PI/48)));for(let p=1;p<l;p++)x.push({x:c.x+f*Math.cos(d+a*p/l),y:c.y+f*Math.sin(d+a*p/l)})}return x}function l0(y,x,e){let t=[];for(let r=0;r<y.length;r++){let n=y[r],o=y[(r+1)%y.length],i=n.x+n.y-x,a=o.x+o.y-x,c=e?i>=0:i<=0,d=e?a>=0:a<=0;if(c&&t.push(n),c!==d){let f=i/(i-a);t.push({x:n.x+f*(o.x-n.x),y:n.y+f*(o.y-n.y)})}}return t}function z0(y,x){let e=y.color,t=[e[0]+(1-e[0])*.4,e[1]+(1-e[1])*.4,e[2]+(1-e[2])*.4,e[3]];y.color=[t[0],t[1],t[2],t[3]*.2],y.polygon(x),y.color=t;let r=new H;r.polygon(x);let n=.15*Math.SQRT2/2;for(let o=0;o<r.indices.length;o+=3){let i=r.indices.slice(o,o+3).map(f=>({x:r.vertices[f*8],y:r.vertices[f*8+1]})),a=i.map(f=>f.x+f.y),c=Math.ceil(Math.min(...a)-n),d=Math.floor(Math.max(...a)+n);for(let f=c;f<=d;f++)y.polygon([l0(l0(i,f-n,!0),f+n,!1)])}y.color=e}function H0(y,x){let e=!1;for(let t=0,r=y.length-1;t<y.length;r=t++){let n=y[t],o=y[r];n.y>x.y!=o.y>x.y&&x.x<(o.x-n.x)*(x.y-n.y)/(o.y-n.y)+n.x&&(e=!e)}return e}function u0(y,x){let e=x.filter(t=>t.length>=3).map(t=>({ring:t,parents:[]}));for(let[t,r]of e.entries())r.parents=e.flatMap((n,o)=>t!==o&&H0(n.ring,r.ring[0])?[o]:[]);for(let[t,r]of e.entries())if(r.parents.length%2===0){let n=e.filter(o=>o.parents.length===r.parents.length+1&&o.parents.includes(t));y.polygon([r.ring,...n.map(o=>o.ring)])}}var q0=y=>s0[y]??(y===\" \"?R.spaceWidthRatio:R.glyphWidthRatio);function d0(y,x,e){let t=q0(y),r=x?R.letterSpacingRatio:0,n=x?a0[y]?.[x]??0:0;return e*(t+r+n)}function j0(y,x){let e=x*R.glyphWidthRatio,t=x*R.letterSpacingRatio,r=x*R.spaceWidthRatio,n=x*R.strokeWidthRatio,o=x*R.lineHeightRatio,i=y.replace(/\\\\n/g,`\n`).split(`\n`),a=i.map(f=>{let l=Array.from(f);return l.reduce((p,s,L)=>p+d0(s,l[L+1],x),0)}),c=a.reduce((f,l)=>Math.max(f,l),0),d=i.length>1?x+(i.length-1)*o:x;return{width:c,height:d,glyphWidth:e,letterSpacing:t,spaceWidth:r,strokeWidth:n,lineHeight:o,lines:i,lineWidths:a}}function K0(y){let{line:x,fontSize:e,startX:t,startY:r}=y,n=e,o=e,i=Array.from(x),a=[],c=t+y.layout.strokeWidth/2;return i.forEach((d,f)=>{let l=c0[d];if(l?.length){let p=[];for(let s of l){let L=s.map(m=>({x:c+m.x*o,y:r+(1-m.y)*n}));L.length>=3&&p.push(L)}p.length>0&&a.push(p)}c+=d0(d,i[f+1],e)}),a}function J0(y){let x=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let n of y)for(let o of n)x=Math.min(x,o.x),e=Math.min(e,o.y),t=Math.max(t,o.x),r=Math.max(r,o.y);return x===Number.POSITIVE_INFINITY||e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||r===Number.NEGATIVE_INFINITY?null:{minX:x,minY:e,maxX:t,maxY:r}}function Q0(y,x,e){let t=x5(y,x),r=e5(t,x,e),n=J0(r.flat()),o=t5(y,x,n);return{bounds:n?i5(n,o):null,glyphGroups:o5(r,o),linePlacements:t.map(({line:i,startX:a,startY:c})=>({line:i,startX:a+o.x,startY:c+o.y})),startOffset:o}}function y5(y,x){let e=x.width+x.strokeWidth,t=x.height+x.strokeWidth,r=0,n=0;return y===\"center\"||y===\"top_center\"||y===\"bottom_center\"?r=-e/2:y===\"top_left\"||y===\"bottom_left\"||y===\"center_left\"?r=0:y===\"top_right\"||y===\"bottom_right\"||y===\"center_right\"?r=-e:(y===\"top_center\"||y===\"bottom_center\")&&(r=-e/2),y===\"center\"||y===\"center_left\"||y===\"center_right\"?n=-t/2:y===\"top_left\"||y===\"top_right\"||y===\"top_center\"?n=0:(y===\"bottom_left\"||y===\"bottom_right\"||y===\"bottom_center\")&&(n=-t),{x:r,y:n}}function x5(y,x){return x.lines.map((e,t)=>({line:e,startX:s5({alignment:y,lineWidth:x.lineWidths[t],maxWidth:x.width,strokeWidth:x.strokeWidth}),startY:t*x.lineHeight}))}function e5(y,x,e){return y.flatMap(({line:t,startX:r,startY:n})=>K0({line:t,fontSize:e,startX:r,startY:n,layout:x}))}function t5(y,x,e){return e?{x:-r5(y,e),y:-n5(y,e)}:y5(y,x)}function r5(y,x){return y===\"top_left\"||y===\"bottom_left\"||y===\"center_left\"?x.minX:y===\"top_right\"||y===\"bottom_right\"||y===\"center_right\"?x.maxX:(x.minX+x.maxX)/2}function n5(y,x){return y===\"top_left\"||y===\"top_right\"||y===\"top_center\"?x.minY:y===\"bottom_left\"||y===\"bottom_right\"||y===\"bottom_center\"?x.maxY:(x.minY+x.maxY)/2}function o5(y,x){return x.x===0&&x.y===0?y:y.map(e=>e.map(t=>t.map(r=>({x:r.x+x.x,y:r.y+x.y}))))}function i5(y,x){return{minX:y.minX+x.x,minY:y.minY+x.y,maxX:y.maxX+x.x,maxY:y.maxY+x.y}}function s5(y){let{alignment:x,lineWidth:e,maxWidth:t,strokeWidth:r}=y,n=e+r,o=t+r;return x===\"top_left\"||x===\"bottom_left\"||x===\"center_left\"?0:x===\"top_right\"||x===\"bottom_right\"||x===\"center_right\"?o-n:(o-n)/2}function L0(y,x,e=\"up\"){let t=String(x.text??\"\");if(!t)return;let r=x.anchor_position??x.center??{x:x.x??0,y:x.y??0},n=x.font_size??1,o=j0(t,n),i=Q0(x.anchor_alignment??\"center\",o,n),a=x.type===\"pcb_note_text\",c=x.type===\"pcb_fabrication_note_text\",d=c?!1:a?x.is_mirrored_from_top_view??x.layer===\"bottom\":x.type===\"pcb_silkscreen_text\"?x.layer===\"bottom\":x.is_mirrored??x.layer===\"bottom\",f=a||c?0:x.ccw_rotation??0,l=e===\"up\"?-1:1,p=s=>Y({x:r.x+(d?-s.x:s.x),y:r.y+l*s.y},r,-l*f);if(x.is_knockout&&!a&&!c){let s=i.bounds;if(!s)return;let L={left:.2,right:.2,top:.2,bottom:.2,...x.knockout_padding},m=[{x:s.minX-L.left,y:s.minY-L.top},{x:s.maxX+L.right,y:s.minY-L.top},{x:s.maxX+L.right,y:s.maxY+L.bottom},{x:s.minX-L.left,y:s.maxY+L.bottom}];u0(y,[m.map(p),...i.glyphGroups.flatMap(u=>u.map(_=>_.map(p)))]);return}for(let s of i.glyphGroups)u0(y,s.map(L=>L.map(p)))}var b=(y,x,e)=>[y/255,x/255,e/255,1],a5={board:b(70,72,72),top:b(200,52,52),bottom:b(77,127,196),inner1:b(127,200,127),inner2:b(206,125,44),inner3:b(79,203,203),inner4:b(219,98,139),inner5:b(167,165,198),inner6:b(40,204,217),inner7:b(232,178,167),inner8:b(242,237,161),drill:b(255,38,226),top_silkscreen:b(242,237,161),bottom_silkscreen:b(242,237,161),soldermask_top:b(12,55,33),soldermask_bottom:b(12,55,33),top_fabrication:[1,1,1,.5],bottom_fabrication:[1,1,1,.5],top_notes:b(89,148,220),bottom_notes:b(89,148,220),top_courtyard:b(255,0,245),bottom_courtyard:b(38,233,255),edge_cuts:b(208,210,205)},j=y=>y.replace(/_copper$/,\"\");function c5(y){let x=y.match(/^#([0-9a-f]{3,8})$/i)?.[1];if(x){let t=x.length<=4?[...x].map(r=>r+r).join(\"\"):x;if(t.length!==6&&t.length!==8)throw new Error(`Unsupported color: ${y}`);return[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255,t.length===8?parseInt(t.slice(6),16)/255:1]}let e=y.match(/^rgba?\\(([^)]+)\\)$/);if(e){let t=e[1].split(\",\").map(r=>Number(r.trim()));if((t.length===3||t.length===4)&&t.every(Number.isFinite))return[t[0]/255,t[1]/255,t[2]/255,t[3]??1]}throw new Error(`Unsupported color: ${y}`)}function l5(y,x=0){return y[`${y.type}_id`]??`${y.type}:${x}`}function K(y){return y.center??y.anchor_position??{x:y.x??0,y:y.y??0}}function P(y,x=!1){if(y.shape===\"rotated_pill_hole_with_rect_pad\"){const museBase=K(y),museCenter=x?{x:museBase.x+(y.hole_offset_x??0),y:museBase.y+(y.hole_offset_y??0)}:museBase,museWidth=x?y.hole_width:y.rect_pad_width,museHeight=x?y.hole_height:y.rect_pad_height;return[p0(museCenter,museWidth,museHeight,x?Math.min(museWidth,museHeight)/2:y.rect_border_radius??0,(x?y.hole_ccw_rotation:y.rect_ccw_rotation)??0)]}if(y.brep_shape)return[y.brep_shape.outer_ring,...y.brep_shape.inner_rings??[]].map(a=>V0(a.vertices));if(y.outline?.length)return[y.outline];let e=x?y.hole_shape??y.shape:y.shape;if(e===\"polygon\")return[y.points??y.vertices??[]];let t=K(y),r=y.rect_ccw_rotation??y.ccw_rotation??y.rotation??0,n=x?Y({x:t.x+(y.hole_offset_x??0),y:t.y+(y.hole_offset_y??0)},t,r):t;if(e===\"circle\"||e===\"circular_hole_with_rect_pad\"&&x||y.type===\"pcb_via\"){let a=x?y.hole_diameter:y.outer_diameter??(y.radius!=null?y.radius*2:y.diameter);return[q(n,a||y.diameter||y.hole_diameter||y.radius*2)]}let o=x?y.hole_width??y.hole_diameter:y.rect_pad_width??y.outer_width??y.width??y.hole_diameter,i=x?y.hole_height??y.hole_diameter:y.rect_pad_height??y.outer_height??y.height??y.hole_diameter;if(e===\"oval\")return[q(n,o,i,r)];if([\"rect\",\"square\",\"rotated_rect\",\"roundrect\",\"rounded_rect\",\"pill\",\"rotated_pill\",\"circular_hole_with_rect_pad\",\"pill_hole_with_rect_pad\",void 0].includes(e)){let c=e?.includes(\"pill\")&&!(e===\"pill_hole_with_rect_pad\"&&!x)?Math.min(o,i)/2:y.corner_radius??y.rect_border_radius??0;return[p0(n,o,i,c,r)]}throw new Error(`Unsupported shape: ${e}`)}function u5(y,x={}){let e=new Map,t=[],r=y.map(l5),n=y.find(l=>l.type===\"pcb_board\"),o=[\"top\",...Array.from({length:Math.max(0,Math.min(8,(n?.num_layers??2)-2))},(l,p)=>`inner${p+1}`),\"bottom\"],i=(l,p,s=!1,L=0)=>{l=j(l),e.has(l)||e.set(l,{paint:new H,erase:new H});let m=e.get(l)[s?\"erase\":\"paint\"];return m.color=x.layerColors?.[l]??a5[l]??[.75,.75,.75,1],m.element=p,m.category=L,m},a=[],c=[],d=[];for(let[l,p]of y.entries()){let s=p,L=s.type;try{if(L===\"pcb_board\"||L===\"pcb_panel\"){let m=P(s);i(\"board\",l).polygon(m);for(let u of m)i(\"edge_cuts\",l).path(u,.1,!0);for(let u of[\"top\",\"bottom\"])i(`soldermask_${u}`,l).polygon(m)}else if(L===\"pcb_cutout\")d.push({rings:P(s),index:l}),i(\"edge_cuts\",l).path(P(s)[0],.05,!0);else if(L===\"pcb_smtpad\")i(s.layer,l).polygon(P(s)),s.is_covered_with_solder_mask||i(`soldermask_${s.layer}`,l,!0).polygon(P(s));else if(L===\"pcb_via\"||L===\"pcb_plated_hole\"){let m=s.layers??o;if(L===\"pcb_via\"&&!s.layers&&s.from_layer&&s.to_layer){let u=o.indexOf(s.from_layer),_=o.indexOf(s.to_layer);m=o.slice(Math.min(u,_),Math.max(u,_)+1)}for(let u of m)i(u,l).polygon(P(s));a.push({element:s,index:l,layers:m});for(let u of[\"top\",\"bottom\"])m.includes(u)&&!s.is_covered_with_solder_mask&&i(`soldermask_${u}`,l,!0).polygon(P(s))}else if(L===\"pcb_hole\")a.push({element:{...s,shape:s.hole_shape},index:l,layers:o});else if(L===\"pcb_trace\"){let m=s.route??[];if(s.route_thickness_mode===\"interpolated\"&&m.some((u,_)=>u.route_type===\"wire\"&&!z(u)&&m[_+1]?.route_type===\"wire\")||m.some(u=>u.route_type===\"through_pad\"))throw new Error(\"Interpolated/through-pad traces are not supported yet\");for(let u of X0(m)){let _=$0(u);if(!_.length)throw new Error(\"Invalid teardrop geometry or interpolation mode\");i(u.layer,l).polygon([_])}for(let u=1;u<m.length;u++){let _=m[u-1],h=m[u];if(z(_))continue;let g=_.route_type===\"wire\"&&h.route_type===\"wire\"&&_.layer===h.layer||_.route_type===\"wire\"&&h.route_type===\"via\"&&[h.from_layer,h.to_layer].includes(_.layer)?_.layer:_.route_type===\"via\"&&h.route_type===\"wire\"&&[_.from_layer,_.to_layer].includes(h.layer)?h.layer:void 0;g&&i(g,l).line(_,h,_.width??h.width??.15)}}else if(L===\"pcb_copper_pour\")i(s.layer,l,!1,1).polygon(P(s));else if(L===\"pcb_copper_text\")L0(i(s.layer,l),s,x.textYAxis);else if(/^pcb_(silkscreen|fabrication_note|courtyard|note|user_note)_/.test(L)){let m=L.match(/^pcb_(silkscreen|fabrication_note|courtyard|note|user_note)_/)[1],u={silkscreen:\"silkscreen\",fabrication_note:\"fabrication\",courtyard:\"courtyard\",note:\"notes\",user_note:\"notes\"}[m],_=`${s.layer??\"top\"}_${u}`,h=i(_,l);if(L.endsWith(\"_text\"))s.color&&(m===\"note\"||m===\"fabrication_note\")&&(h.color=c5(s.color)),L0(h,s,x.textYAxis);else if(L.endsWith(\"_path\")||L.endsWith(\"_line\")||L.endsWith(\"_outline\")){let g=s.route??s.points??s.outline??[s.start,s.end].filter(Boolean);h.path(g,s.stroke_width??s.width??.05,L.endsWith(\"_outline\"))}else if(L===\"pcb_silkscreen_graphic\"&&s.shape===\"brep\")h.polygon(P(s));else if(L.endsWith(\"_rect\")){let g=p0(K(s),s.width,s.height,s.corner_radius??0,s.ccw_rotation??0);s.is_filled?h.polygon([g]):h.path(g,s.stroke_width??.05,!0)}else if(L.endsWith(\"_circle\")){let g=q(K(s),(s.radius??0)*2);s.is_filled?h.polygon([g]):h.path(g,s.stroke_width??.05,!0)}else throw new Error(\"Unsupported annotation geometry\")}else if(L===\"pcb_keepout\")c.push({rings:P(s),index:l,layers:s.layers??[s.layer??\"top\"]});else if(L.startsWith(\"pcb_\")&&![\"pcb_component\",\"pcb_port\",\"pcb_group\",\"pcb_solder_paste\",\"pcb_debug_object\",\"pcb_trace_hint\",\"pcb_anchor\",\"pcb_breakout_point\"].includes(L)&&!/_(error|warning)$/.test(L))throw new Error(\"Unsupported PCB element\")}catch(m){t.push({elementId:r[l],type:L,message:String(m)})}}for(let{rings:l,index:p,layers:s}of c)try{for(let L of s)z0(i(L,p),l)}catch(L){t.push({elementId:r[p],type:\"pcb_keepout\",message:String(L)})}for(let{element:l,index:p,layers:s}of a){let L=P(l,!0);for(let u of s)i(u,p,!0).polygon(L);s.includes(\"top\")&&s.includes(\"bottom\")&&(i(\"board\",p,!0).polygon(L),i(\"drill\",p).polygon(L));for(let u of[\"top\",\"bottom\"])s.includes(u)&&i(`soldermask_${u}`,p,!0).polygon(L)}for(let{rings:l,index:p}of d)for(let s of e.keys())s!==\"edge_cuts\"&&i(s,p,!0).polygon(l);let f=[...e].map(([l,p])=>({name:l,paint:p.paint.build(),erase:p.erase.build()}));return{layers:f,elementIds:r,diagnostics:t,triangleCount:f.reduce((l,p)=>l+(p.paint.indices.length+p.erase.indices.length)/3,0)}}var L5=`\nstruct Camera { rowX: vec4f, rowY: vec4f, viewport: vec4f }\n@group(0) @binding(0) var<uniform> camera: Camera;\n@group(0) @binding(1) var<storage, read> highlights: array<u32>;\nstruct VertexOut {\n  @builtin(position) position: vec4f,\n  @location(0) color: vec4f,\n  @location(1) @interpolate(flat) category: u32,\n  @location(2) @interpolate(flat) selected: u32,\n}\n@vertex fn vertexMain(@location(0) p: vec2f, @location(1) color: vec4f,\n  @location(2) element: f32, @location(3) category: f32) -> VertexOut {\n  let pixel = vec2f(dot(camera.rowX.xyz, vec3f(p, 1)), dot(camera.rowY.xyz, vec3f(p, 1)));\n  var out: VertexOut;\n  out.position = vec4f(pixel.x / camera.viewport.x * 2 - 1, 1 - pixel.y / camera.viewport.y * 2, 0, 1);\n  let highlight = select(0.0, 1.0, (highlights[u32(element)] & 1u) != 0u);\n  out.color = vec4f(mix(color.rgb, min(vec3f(1), color.rgb * 1.5), highlight), color.a);\n  out.category = u32(category);\n  out.selected = highlights[u32(element)] & 2u;\n  return out;\n}\n@fragment fn fragmentMain(in: VertexOut) -> @location(0) vec4f {\n  if (in.category == 1u && camera.viewport.z == 0) { discard; }\n  if (camera.viewport.w == 1) {\n    if (in.selected == 0u) { discard; }\n    return vec4f(in.color.rgb, 1);\n  }\n  return vec4f(in.color.rgb * in.color.a, in.color.a);\n}\n`,h5=`\n@group(0) @binding(0) var image: texture_2d<f32>;\n@group(0) @binding(1) var imageSampler: sampler;\n@group(0) @binding(2) var<uniform> fade: vec4f;\nstruct Out { @builtin(position) position: vec4f, @location(0) uv: vec2f }\n@vertex fn vertexMain(@builtin(vertex_index) index: u32) -> Out {\n  let points = array<vec2f, 6>(vec2f(0,0),vec2f(1,0),vec2f(0,1),vec2f(0,1),vec2f(1,0),vec2f(1,1));\n  var out: Out;\n  out.uv = points[index];\n  out.position = vec4f(out.uv.x * 2 - 1, 1 - out.uv.y * 2, 0, 1);\n  return out;\n}\n@fragment fn fragmentMain(in: Out) -> @location(0) vec4f {\n  return textureSample(image, imageSampler, in.uv) * fade.x;\n}\n`,h0={color:{srcFactor:\"one\",dstFactor:\"one-minus-src-alpha\"},alpha:{srcFactor:\"one\",dstFactor:\"one-minus-src-alpha\"}},G,Z=(G=class{constructor(x,e,t,r,n){M(this,\"canvas\");M(this,\"device\");M(this,\"context\");M(this,\"config\");M(this,\"realToCanvasMat\",{a:1,b:0,c:0,d:-1,e:0,f:0});M(this,\"stats\",{geometryUploads:0,frames:0,triangleCount:0,compileMs:0,vertexBytes:0});M(this,\"circuit\");M(this,\"scene\");M(this,\"layers\",[]);M(this,\"xRayLayers\",[]);M(this,\"xRayUniform\");M(this,\"xRayCameraGroup\");M(this,\"uniform\");M(this,\"highlights\");M(this,\"cameraGroup\");M(this,\"highlightKey\",\"\");M(this,\"highlightIndices\",new Map);M(this,\"sample\");M(this,\"size\",\"\");M(this,\"disposed\",!1);M(this,\"adapterInfo\");M(this,\"lost\",!1);M(this,\"paintPipeline\");M(this,\"erasePipeline\");M(this,\"compositePipeline\");M(this,\"sampler\");M(this,\"options\",{});this.canvas=x,this.device=e,this.context=t,this.config=n,this.uniform=e.createBuffer({size:48,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.xRayUniform=e.createBuffer({size:48,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.highlights=e.createBuffer({size:4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});let o=e.createShaderModule({code:L5}),i=e.createPipelineLayout({bindGroupLayouts:[e.createBindGroupLayout({entries:[{binding:0,visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,buffer:{type:\"uniform\"}},{binding:1,visibility:GPUShaderStage.VERTEX,buffer:{type:\"read-only-storage\"}}]})]}),a=d=>({layout:i,vertex:{module:o,entryPoint:\"vertexMain\",buffers:[{arrayStride:32,attributes:[{shaderLocation:0,offset:0,format:\"float32x2\"},{shaderLocation:1,offset:8,format:\"float32x4\"},{shaderLocation:2,offset:24,format:\"float32\"},{shaderLocation:3,offset:28,format:\"float32\"}]}]},fragment:{module:o,entryPoint:\"fragmentMain\",targets:[{format:\"rgba8unorm\",blend:d}]},primitive:{topology:\"triangle-list\"},multisample:{count:n.sampleCount??4}});this.paintPipeline=e.createRenderPipeline(a(h0)),this.erasePipeline=e.createRenderPipeline(a({color:{srcFactor:\"zero\",dstFactor:\"one-minus-src-alpha\"},alpha:{srcFactor:\"zero\",dstFactor:\"one-minus-src-alpha\"}}));let c=e.createShaderModule({code:h5});this.compositePipeline=e.createRenderPipeline({layout:\"auto\",vertex:{module:c,entryPoint:\"vertexMain\"},fragment:{module:c,entryPoint:\"fragmentMain\",targets:[{format:r,blend:h0}]},primitive:{topology:\"triangle-list\"}}),this.sampler=e.createSampler({minFilter:\"linear\",magFilter:\"linear\"}),e.lost.then(d=>{this.lost=!0,this.disposed||n.onDeviceLost?.(d.message||d.reason)})}static async create(x,e={}){if(!globalThis.navigator?.gpu)throw new Error(\"WebGPU is unavailable\");let t=await navigator.gpu.requestAdapter({powerPreference:\"high-performance\"});if(!t)throw new Error(\"No WebGPU adapter available\");let r=await t.requestDevice(),n=x.getContext(\"webgpu\");if(!n)throw r.destroy(),new Error(\"WebGPU canvas context is unavailable\");let o=navigator.gpu.getPreferredCanvasFormat();n.configure({device:r,format:o,alphaMode:\"premultiplied\"}),r.pushErrorScope(\"validation\");try{let i=new G(x,r,n,o,e),a=await r.popErrorScope();if(a)throw i.dispose(),new Error(a.message);return r.addEventListener(\"uncapturederror\",c=>e.onDeviceLost?.(c.error.message)),i.adapterInfo=t.info,i}catch(i){throw n.unconfigure(),r.destroy(),i}}get diagnostics(){return this.scene?.diagnostics??[]}setCircuitJson(x){if(this.assertLive(),this.circuit===x)return;let e=performance.now(),t=u5(x,this.config);this.releaseLayers(),this.highlights.destroy(),this.highlights=this.device.createBuffer({size:Math.max(4,t.elementIds.length*4),usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.highlightIndices=new Map(t.elementIds.map((n,o)=>[n,o])),this.highlightKey=\"!\",this.cameraGroup=this.device.createBindGroup({layout:this.paintPipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.uniform}},{binding:1,resource:{buffer:this.highlights}}]}),this.xRayCameraGroup=this.device.createBindGroup({layout:this.paintPipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.xRayUniform}},{binding:1,resource:{buffer:this.highlights}}]}),this.stats.vertexBytes=0;let r=n=>{let o=(i,a)=>{let c=this.device.createBuffer({size:Math.max(4,i.byteLength),usage:a|GPUBufferUsage.COPY_DST});return i.byteLength&&this.device.queue.writeBuffer(c,0,i.buffer,i.byteOffset,i.byteLength),this.stats.vertexBytes+=i.byteLength,c};return{vertices:o(n.vertices,GPUBufferUsage.VERTEX),indices:o(n.indices,GPUBufferUsage.INDEX),count:n.indices.length}};this.layers=t.layers.map(n=>({name:n.name,paint:r(n.paint),erase:r(n.erase),opacity:this.device.createBuffer({size:16,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})})),this.xRayLayers=this.layers.filter(n=>this.isCopper(n.name)||n.name===\"drill\").map(n=>({...n,opacity:this.device.createBuffer({size:16,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})})),this.scene=t,this.circuit=x,this.size=\"\",this.stats.geometryUploads++,this.stats.triangleCount=t.triangleCount,this.stats.compileMs=performance.now()-e}drawElements(x,e={}){this.setCircuitJson(x),this.options={},this.render(e)}render(x={}){this.assertLive(),this.options={...this.options,...x};let e=this.options;e.transform&&(this.realToCanvasMat=e.transform);let t=this.realToCanvasMat,r=this.canvas.width,n=this.canvas.height;if(!r||!n)return;if(![...Object.values(t),r,n].every(Number.isFinite))throw new Error(\"Invalid camera or canvas dimensions\");if(r>this.device.limits.maxTextureDimension2D||n>this.device.limits.maxTextureDimension2D)throw new Error(\"Canvas exceeds GPU texture limits\");this.resize(r,n),this.device.queue.writeBuffer(this.uniform,0,new Float32Array([t.a,t.c,t.e,0,t.b,t.d,t.f,0,r,n,e.showCopperPours===!1?0:1,0]));let o=e.xRayElementIds??[],i=o.length>0;i&&this.device.queue.writeBuffer(this.xRayUniform,0,new Float32Array([t.a,t.c,t.e,0,t.b,t.d,t.f,0,r,n,e.showCopperPours===!1?0:1,1]));let a=i?[]:e.highlightedElementIds??[],c=JSON.stringify([a,o]);if(c!==this.highlightKey){let u=new Uint32Array(Math.max(1,this.scene?.elementIds.length??0));for(let _ of a){let h=this.highlightIndices.get(_);h!==void 0&&(u[h]=1)}for(let _ of o){let h=this.highlightIndices.get(_);h!==void 0&&(u[h]|=2)}this.device.queue.writeBuffer(this.highlights,0,u),this.highlightKey=c}let d=j(e.selectedLayer??\"top\"),f=e.layers?new Set(e.layers.map(j)):void 0,l=this.layers.filter(u=>f&&!f.has(u.name)||i&&!this.isCopper(u.name)||u.name===\"board\"&&!e.showBoardMaterial||u.name.startsWith(\"soldermask_\")&&(!e.showSolderMask||u.name!==`soldermask_${d}`)||u.name.includes(\"silkscreen\")&&e.showSilkscreen===!1||u.name.includes(\"fabrication\")&&!e.showFabricationNotes||u.name.includes(\"notes\")&&e.showPcbNotes===!1||u.name.includes(\"courtyard\")&&!e.showCourtyards?!1:i&&this.isCopper(u.name)||this.opacity(u.name,d,e.hiddenLayerOpacity??.4)>0).sort((u,_)=>this.order(u.name,d)-this.order(_.name,d)),p=i?this.xRayLayers.filter(u=>!f||f.has(u.name)).sort((u,_)=>this.xRayOrder(u.name,d)-this.xRayOrder(_.name,d)):[],s=[...l.map(u=>({layer:u,xRay:!1})),...p.map(u=>({layer:u,xRay:!0}))],L=this.device.createCommandEncoder();for(let{layer:u,xRay:_}of s){this.ensureTexture(u,r,n);let h=u.texture.createView(),g=(this.config.sampleCount??4)>1,T=L.beginRenderPass({colorAttachments:[{view:g?this.sample.createView():h,...g?{resolveTarget:h}:{},clearValue:[0,0,0,0],loadOp:\"clear\",storeOp:g?\"discard\":\"store\"}]});for(let[C,y0]of[[u.paint,this.paintPipeline],[u.erase,this.erasePipeline]])C.count&&(T.setBindGroup(0,_&&y0===this.paintPipeline?this.xRayCameraGroup:this.cameraGroup),T.setPipeline(y0),T.setVertexBuffer(0,C.vertices),T.setIndexBuffer(C.indices,\"uint32\"),T.drawIndexed(C.count));T.end(),this.device.queue.writeBuffer(u.opacity,0,new Float32Array([_?1:i&&this.isCopper(u.name)?Math.max(0,Math.min(1,e.hiddenLayerOpacity??.4)):this.opacity(u.name,d,e.hiddenLayerOpacity??.4),0,0,0]))}let m=L.beginRenderPass({colorAttachments:[{view:this.context.getCurrentTexture().createView(),clearValue:e.background??[0,0,0,0],loadOp:\"clear\",storeOp:\"store\"}]});m.setPipeline(this.compositePipeline);for(let{layer:u}of s)m.setBindGroup(0,u.composite),m.draw(6);m.end(),this.device.queue.submit([L.finish()]),this.stats.frames++}async flush(){this.assertLive(),await this.device.queue.onSubmittedWorkDone()}isCopper(x){return/^(top|bottom|inner\\d+)$/.test(x)}opacity(x,e,t){return[\"board\",\"drill\",\"edge_cuts\"].includes(x)||x===e||x.startsWith(`${e}_`)||x.endsWith(`_${e}`)?1:Math.max(0,Math.min(1,t))}xRayOrder(x,e){return x===\"drill\"?200:x===e?100:x===\"bottom\"?0:x.startsWith(\"inner\")?20-Number(x.slice(5)):40}order(x,e){if(x===\"board\")return-100;if(x===\"drill\")return 200;if(x===\"edge_cuts\")return 150;let t=x===e?100:x.startsWith(\"inner\")?20-Number(x.slice(5)):x===\"bottom\"?30:40;return x.includes(\"soldermask\")?110:x.startsWith(`${e}_`)?120:t}resize(x,e){let t=`${x}:${e}`;if(t!==this.size){this.sample?.destroy(),this.sample=(this.config.sampleCount??4)>1?this.device.createTexture({size:[x,e],format:\"rgba8unorm\",sampleCount:this.config.sampleCount??4,usage:GPUTextureUsage.RENDER_ATTACHMENT}):void 0;for(let r of[...this.layers,...this.xRayLayers])r.texture?.destroy(),r.texture=void 0,r.composite=void 0;this.size=t}}ensureTexture(x,e,t){x.texture||(x.texture=this.device.createTexture({size:[e,t],format:\"rgba8unorm\",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING}),x.composite=this.device.createBindGroup({layout:this.compositePipeline.getBindGroupLayout(0),entries:[{binding:0,resource:x.texture.createView()},{binding:1,resource:this.sampler},{binding:2,resource:{buffer:x.opacity}}]}))}assertLive(){if(this.disposed||this.lost)throw new Error(this.lost?\"WebGPU device lost\":\"Renderer disposed\")}releaseLayers(){for(let x of this.xRayLayers)x.opacity.destroy(),x.texture?.destroy();this.xRayLayers=[];for(let x of this.layers){for(let e of[x.paint,x.erase])e.vertices.destroy(),e.indices.destroy();x.opacity.destroy(),x.texture?.destroy()}this.layers=[]}dispose(){if(this.disposed)return;this.disposed=!0,this.releaseLayers(),this.sample?.destroy(),this.uniform.destroy(),this.xRayUniform.destroy(),this.highlights.destroy(),this.context.unconfigure();let x=()=>this.device.destroy();this.device.queue.onSubmittedWorkDone().then(x,x),this.circuit=void 0,this.scene=void 0}},M(G,\"supportsXRayNet\",!0),G);var k=self,m0=\"supportsXRayNet\"in Z&&Z.supportsXRayNet===!0,w,E,D,J=!1,W=!1,Q=y=>{W||(W=!0,w?.dispose(),k.postMessage({type:\"error\",message:y instanceof Error?y.message:String(y)}))};function g0(){if(J||W||!w||!D)return;J=!0;let y=()=>{if(J=!1,!(W||!w||!D))try{let x=D;E.width!==x.width&&(E.width=x.width),E.height!==x.height&&(E.height=x.height),w.render({...x.options,transform:x.transform}),k.postMessage({type:\"rendered\",xRayActive:m0&&!!x.options.xRayElementIds?.length,geometryUploads:w.stats.geometryUploads,frames:w.stats.frames,compileMs:w.stats.compileMs})}catch(x){Q(x)}};k.requestAnimationFrame?k.requestAnimationFrame(y):setTimeout(y,16)}k.onmessage=async({data:y})=>{try{if(y.type===\"init\"){if(E=y.canvas,w=await Z.create(E,{onDeviceLost:Q}),W){w.dispose();return}k.postMessage({type:\"ready\",supportsXRayNet:m0})}else if(y.type===\"scene\"){if(w.setCircuitJson(y.elements),w.diagnostics.length)throw new Error(`Unsupported WebGPU geometry: ${w.diagnostics.map(x=>`${x.type}: ${x.message}`).join(\"; \")}`);g0()}else y.type===\"view\"?(D=y,g0()):(W=!0,w?.dispose())}catch(x){Q(x)}};})();\n"],{type:"text/javascript"}));try{return new Worker(t)}finally{URL.revokeObjectURL(t)}}var XRi=zRi({"inline-worker:/home/runner/work/pcb-viewer/pcb-viewer/src/lib/webgpu/pcb-webgpu.worker.ts"(){}}),ZRi=Vje({"node_modules/svgson/dist/svgson.umd.js"(t,e){(function(n,o){typeof t=="object"&&typeof e<"u"?e.exports=o():typeof define=="function"&&define.amd?define(o):(n=typeof globalThis<"u"?globalThis:n||self,n.svgson=o())})(t,function(){var n=function(j){return j!=null&&(o(j)||i(j)||!!j._isBuffer)};function o(j){return!!j.constructor&&typeof j.constructor.isBuffer=="function"&&j.constructor.isBuffer(j)}function i(j){return typeof j.readFloatLE=="function"&&typeof j.slice=="function"&&o(j.slice(0,0))}var r=Object.prototype.toString,s=function(J){if(typeof J>"u")return"undefined";if(J===null)return"null";if(J===!0||J===!1||J instanceof Boolean)return"boolean";if(typeof J=="string"||J instanceof String)return"string";if(typeof J=="number"||J instanceof Number)return"number";if(typeof J=="function"||J instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(J))return"array";if(J instanceof RegExp)return"regexp";if(J instanceof Date)return"date";var oe=r.call(J);return oe==="[object RegExp]"?"regexp":oe==="[object Date]"?"date":oe==="[object Arguments]"?"arguments":oe==="[object Error]"?"error":n(J)?"buffer":oe==="[object Set]"?"set":oe==="[object WeakSet]"?"weakset":oe==="[object Map]"?"map":oe==="[object WeakMap]"?"weakmap":oe==="[object Symbol]"?"symbol":oe==="[object Int8Array]"?"int8array":oe==="[object Uint8Array]"?"uint8array":oe==="[object Uint8ClampedArray]"?"uint8clampedarray":oe==="[object Int16Array]"?"int16array":oe==="[object Uint16Array]"?"uint16array":oe==="[object Int32Array]"?"int32array":oe==="[object Uint32Array]"?"uint32array":oe==="[object Float32Array]"?"float32array":oe==="[object Float64Array]"?"float64array":"object"};function a(j,J){return J={exports:{}},j(J,J.exports),J.exports}var A=a(function(j){(function(){function J(oe,ie){if(typeof ie!="function")return oe;var ne={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)&&(ne[ie(le,oe[le])||le]=oe[le]);return ne}j.exports?j.exports=J:window.rename=J})()}),c=function j(J,oe){var ie=s(J);if(ie!=="object"&&ie!=="array")throw new Error("expected an object");var ne=[];ie==="object"&&(J=A(J,oe),ne={});for(var le in J)if(J.hasOwnProperty(le)){var ge=J[le];s(ge)==="object"||s(ge)==="array"?ne[le]=j(ge,oe):ne[le]=ge}return ne},l=a(function(j){var J=Object.prototype.hasOwnProperty,oe="~";function ie(){}Object.create&&(ie.prototype=Object.create(null),new ie().__proto__||(oe=!1));function ne(ge,_e,ue){this.fn=ge,this.context=_e,this.once=ue||!1}function le(){this._events=new ie,this._eventsCount=0}le.prototype.eventNames=function(){var _e=[],ue,fe;if(this._eventsCount===0)return _e;for(fe in ue=this._events)J.call(ue,fe)&&_e.push(oe?fe.slice(1):fe);return Object.getOwnPropertySymbols?_e.concat(Object.getOwnPropertySymbols(ue)):_e},le.prototype.listeners=function(_e,ue){var fe=oe?oe+_e:_e,pe=this._events[fe];if(ue)return!!pe;if(!pe)return[];if(pe.fn)return[pe.fn];for(var ye=0,Me=pe.length,ve=new Array(Me);ye<Me;ye++)ve[ye]=pe[ye].fn;return ve},le.prototype.emit=function(_e,ue,fe,pe,ye,Me){var ve=oe?oe+_e:_e;if(!this._events[ve])return!1;var he=this._events[ve],Qe=arguments.length,Pe,we;if(he.fn){switch(he.once&&this.removeListener(_e,he.fn,void 0,!0),Qe){case 1:return he.fn.call(he.context),!0;case 2:return he.fn.call(he.context,ue),!0;case 3:return he.fn.call(he.context,ue,fe),!0;case 4:return he.fn.call(he.context,ue,fe,pe),!0;case 5:return he.fn.call(he.context,ue,fe,pe,ye),!0;case 6:return he.fn.call(he.context,ue,fe,pe,ye,Me),!0}for(we=1,Pe=new Array(Qe-1);we<Qe;we++)Pe[we-1]=arguments[we];he.fn.apply(he.context,Pe)}else{var Te=he.length,Re;for(we=0;we<Te;we++)switch(he[we].once&&this.removeListener(_e,he[we].fn,void 0,!0),Qe){case 1:he[we].fn.call(he[we].context);break;case 2:he[we].fn.call(he[we].context,ue);break;case 3:he[we].fn.call(he[we].context,ue,fe);break;case 4:he[we].fn.call(he[we].context,ue,fe,pe);break;default:if(!Pe)for(Re=1,Pe=new Array(Qe-1);Re<Qe;Re++)Pe[Re-1]=arguments[Re];he[we].fn.apply(he[we].context,Pe)}}return!0},le.prototype.on=function(_e,ue,fe){var pe=new ne(ue,fe||this),ye=oe?oe+_e:_e;return this._events[ye]?this._events[ye].fn?this._events[ye]=[this._events[ye],pe]:this._events[ye].push(pe):(this._events[ye]=pe,this._eventsCount++),this},le.prototype.once=function(_e,ue,fe){var pe=new ne(ue,fe||this,!0),ye=oe?oe+_e:_e;return this._events[ye]?this._events[ye].fn?this._events[ye]=[this._events[ye],pe]:this._events[ye].push(pe):(this._events[ye]=pe,this._eventsCount++),this},le.prototype.removeListener=function(_e,ue,fe,pe){var ye=oe?oe+_e:_e;if(!this._events[ye])return this;if(!ue)return--this._eventsCount===0?this._events=new ie:delete this._events[ye],this;var Me=this._events[ye];if(Me.fn)Me.fn===ue&&(!pe||Me.once)&&(!fe||Me.context===fe)&&(--this._eventsCount===0?this._events=new ie:delete this._events[ye]);else{for(var ve=0,he=[],Qe=Me.length;ve<Qe;ve++)(Me[ve].fn!==ue||pe&&!Me[ve].once||fe&&Me[ve].context!==fe)&&he.push(Me[ve]);he.length?this._events[ye]=he.length===1?he[0]:he:--this._eventsCount===0?this._events=new ie:delete this._events[ye]}return this},le.prototype.removeAllListeners=function(_e){var ue;return _e?(ue=oe?oe+_e:_e,this._events[ue]&&(--this._eventsCount===0?this._events=new ie:delete this._events[ue])):(this._events=new ie,this._eventsCount=0),this},le.prototype.off=le.prototype.removeListener,le.prototype.addListener=le.prototype.on,le.prototype.setMaxListeners=function(){return this},le.prefixed=oe,le.EventEmitter=le,j.exports=le});function u(j,J,oe){return J in j?Object.defineProperty(j,J,{value:oe,enumerable:!0,configurable:!0,writable:!0}):j[J]=oe,j}var g=function(){},h={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},d={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},p={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},m={" ":d.space,"	":d.space,"\n":d.space,"\r":d.space,"<":d.lt,">":d.gt,'"':d.quote,"'":d.quote,"=":d.equal,"/":d.slash},_=function(J){return m[J]||d.char},f=function(J){var oe,ie,ne,le,ge,_e,ue,fe,pe,ye;J=Object.assign({debug:!1},J);var Me=new l,ve=h.data,he="",Qe="",Pe="",we="",Te="",Re="",Ee=function(Le,Ye){if(!(Qe[0]==="?"||Qe[0]==="!")){var tt={type:Le,value:Ye};J.debug&&console.log("emit:",tt),Me.emit("data",tt)}};Me.stateMachine=(ye={},u(ye,h.data,(oe={},u(oe,d.lt,function(){he.trim()&&Ee(p.text,he),Qe="",Te=!1,ve=h.tagBegin}),u(oe,d.char,function(Ce){he+=Ce}),oe)),u(ye,h.cdata,u({},d.char,function(Ce){he+=Ce,he.substr(-3)==="]]>"&&(Ee(p.text,he.slice(0,-3)),he="",ve=h.data)})),u(ye,h.tagBegin,(ie={},u(ie,d.space,g),u(ie,d.char,function(Ce){Qe=Ce,ve=h.tagName}),u(ie,d.slash,function(){Qe="",Te=!0}),ie)),u(ye,h.tagName,(ne={},u(ne,d.space,function(){Te?ve=h.tagEnd:(ve=h.attributeNameStart,Ee(p.openTag,Qe))}),u(ne,d.gt,function(){Ee(Te?p.closeTag:p.openTag,Qe),he="",ve=h.data}),u(ne,d.slash,function(){ve=h.tagEnd,Ee(p.openTag,Qe)}),u(ne,d.char,function(Ce){Qe+=Ce,Qe==="![CDATA["&&(ve=h.cdata,he="",Qe="")}),ne)),u(ye,h.tagEnd,(le={},u(le,d.gt,function(){Ee(p.closeTag,Qe),he="",ve=h.data}),u(le,d.char,g),le)),u(ye,h.attributeNameStart,(ge={},u(ge,d.char,function(Ce){Pe=Ce,ve=h.attributeName}),u(ge,d.gt,function(){he="",ve=h.data}),u(ge,d.space,g),u(ge,d.slash,function(){Te=!0,ve=h.tagEnd}),ge)),u(ye,h.attributeName,(_e={},u(_e,d.space,function(){ve=h.attributeNameEnd}),u(_e,d.equal,function(){Ee(p.attributeName,Pe),ve=h.attributeValueBegin}),u(_e,d.gt,function(){we="",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),he="",ve=h.data}),u(_e,d.slash,function(){Te=!0,we="",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),ve=h.tagEnd}),u(_e,d.char,function(Ce){Pe+=Ce}),_e)),u(ye,h.attributeNameEnd,(ue={},u(ue,d.space,g),u(ue,d.equal,function(){Ee(p.attributeName,Pe),ve=h.attributeValueBegin}),u(ue,d.gt,function(){we="",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),he="",ve=h.data}),u(ue,d.char,function(Ce){we="",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),Pe=Ce,ve=h.attributeName}),ue)),u(ye,h.attributeValueBegin,(fe={},u(fe,d.space,g),u(fe,d.quote,function(Ce){Re=Ce,we="",ve=h.attributeValue}),u(fe,d.gt,function(){we="",Ee(p.attributeValue,we),he="",ve=h.data}),u(fe,d.char,function(Ce){Re="",we=Ce,ve=h.attributeValue}),fe)),u(ye,h.attributeValue,(pe={},u(pe,d.space,function(Ce){Re?we+=Ce:(Ee(p.attributeValue,we),ve=h.attributeNameStart)}),u(pe,d.quote,function(Ce){Re===Ce?(Ee(p.attributeValue,we),ve=h.attributeNameStart):we+=Ce}),u(pe,d.gt,function(Ce){Re?we+=Ce:(Ee(p.attributeValue,we),he="",ve=h.data)}),u(pe,d.slash,function(Ce){Re?we+=Ce:(Ee(p.attributeValue,we),Te=!0,ve=h.tagEnd)}),u(pe,d.char,function(Ce){we+=Ce}),pe)),ye);var ke=function(Le){J.debug&&console.log(ve,Le);var Ye=Me.stateMachine[ve],tt=Ye[_(Le)]||Ye[d.error]||Ye[d.char];tt(Le)};return Me.write=function(Ce){for(var Le=Ce.length,Ye=0;Ye<Le;Ye++)ke(Ce[Ye])},Me},I={State:h,Action:d,Type:p,create:f},C=I.Type,y={element:"element",text:"text"},x=function(J){return Object.assign({name:"",type:y.element,value:"",parent:null,attributes:{},children:[]},J)},E=function(J){J=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},J);var oe=void 0,ie=void 0,ne=void 0,le=void 0,ge=new l,_e=function(fe){switch(fe.type){case C.openTag:if(ne===null)ne=ie,ne.name=fe.value;else{var pe=x({name:fe.value,parent:ne});ne.children.push(pe),ne=pe}break;case C.closeTag:var ye=ne.parent;if(J.parentNodes||(ne.parent=null),ne.name!==fe.value)break;J.stream&&ye===ie&&(ie.children=[],ne.parent=null),(!J.emitTopLevelOnly||ye===ie)&&(ge.emit(J.tagPrefix+ne.name,ne),ge.emit("tag",ne.name,ne)),ne===ie&&(oe.removeAllListeners("data"),ge.emit(J.doneEvent,ne),ie=null),ne=ye;break;case C.text:ne&&ne.children.push(x({type:y.text,value:fe.value,parent:J.parentNodes?ne:null}));break;case C.attributeName:le=fe.value,ne.attributes[le]="";break;case C.attributeValue:ne.attributes[le]=fe.value;break}};return ge.reset=function(){oe=I.create({debug:J.debug}),oe.on("data",_e),ie=x(),ne=null,le="",ge.parse=oe.write},ge.reset(),ge},B=function(J,oe){oe=Object.assign({},oe,{stream:!1,tagPrefix:":"});var ie=E(oe),ne=void 0;return ie.on("done",function(le){ne=le}),ie.parse(J),ne},S={parseSync:B},Q=S.parseSync,w=function(J){var oe=Q("<root>".concat(J,"</root>"),{parentNodes:!1}),ie=oe.children&&oe.children.length>0&&oe.children.every(function(ne){return ne.name==="svg"});if(ie)return oe.children.length===1?oe.children[0]:oe.children;throw Error("nothing to parse")},M=function(J){return c(J,function(oe){return R(oe)?oe:k(oe)})},k=function(J){return J.replace(/[-|:]([a-z])/gi,function(oe,ie){return ie.toUpperCase()})},R=function(J){return/^(data|aria)(-\w+)/.test(J)},F=function(J){if(J){var oe=String(J);return/[&<>]/.test(oe)?"<![CDATA[".concat(oe.replace(/]]>/,"]]]]><![CDATA[>"),"]]>"):oe}return""},O=function(J){return String(J).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},U=function(J){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=oe.transformNode,ne=ie===void 0?function(ue){return ue}:ie,le=oe.camelcase,ge=le===void 0?!1:le,_e=function(fe){var pe;return pe=ne(fe),ge&&(pe=M(pe)),pe};return _e(w(J))};function Y(){for(var j=arguments.length,J=new Array(j),oe=0;oe<j;oe++)J[oe]=arguments[oe];return new Promise(function(ie,ne){try{var le=U.apply(void 0,J);ie(le)}catch(ge){ne(ge)}})}var W=function j(J){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=oe.transformAttr,ne=ie===void 0?function(ve,he,Qe){return"".concat(ve,'="').concat(Qe(he),'"')}:ie,le=oe.transformNode,ge=le===void 0?function(ve){return ve}:le,_e=oe.selfClose,ue=_e===void 0?!0:_e;if(Array.isArray(J))return J.map(function(ve){return j(ve,{transformAttr:ne,selfClose:ue,transformNode:ge})}).join("");var fe=ge(J);if(fe.type==="text")return F(fe.value);var pe="";for(var ye in fe.attributes){var Me=ne(ye,fe.attributes[ye],O,fe.name);pe+=Me?" ".concat(Me):""}return fe.children&&fe.children.length>0||!ue?"<".concat(fe.name).concat(pe,">").concat(j(fe.children,{transformAttr:ne,transformNode:ge,selfClose:ue}),"</").concat(fe.name,">"):"<".concat(fe.name).concat(pe,"/>")},te=Object.assign({},{parse:Y,parseSync:U,stringify:W});return te})}}),Zgn=ee.createContext(null),eTi=()=>ee.useContext(Zgn),edn=!0,tTi=!1,eee={CCW:-1,CW:1,NOT_ORIENTABLE:0},nTi=2*Math.PI,q_e=1,tdn=0,W6=2,oTi=3,iTi=4,rTi=1,sTi=2,zje=0,tee=1,FU=2,X_e=Object.freeze({__proto__:null,BOUNDARY:W6,CCW:edn,CONTAINS:oTi,CW:tTi,END_VERTEX:FU,INSIDE:q_e,INTERLACE:iTi,NOT_VERTEX:zje,ORIENTATION:eee,OUTSIDE:tdn,OVERLAP_OPPOSITE:sTi,OVERLAP_SAME:rTi,PIx2:nTi,START_VERTEX:tee}),j6=1e-6;function ndn(t){j6=t}function odn(){return j6}var aTi=3;function Jje(t){return t<j6&&t>-j6}function LT(t,e){return t-e<j6&&t-e>-j6}function idn(t,e){return t-e>j6}function ATi(t,e){return t-e>-j6}function rdn(t,e){return t-e<-j6}function cTi(t,e){return t-e<j6}var lTi=Object.freeze({__proto__:null,DECIMALS:aTi,EQ:LT,EQ_0:Jje,GE:ATi,GT:idn,LE:cTi,LT:rdn,getTolerance:odn,setTolerance:ndn}),Ue={Utils:lTi,Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in X_e)Ue[t]=X_e[t];Object.defineProperty(Ue,"DP_TOL",{get:function(){return odn()},set:function(t){ndn(t)}});var wd=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}static get ZERO_DIVISION(){return new Error("Zero division")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error("Unresolved boundary conflict in boolean operation")}static get INFINITE_LOOP(){return new Error("Infinite loop")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error("Cannot complete boolean operation")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error("Abstract method cannot be invoked")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error("Operation is not supported")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error("Unsupported shape type")}};Ue.Errors=wd;var Wje=class{constructor(t,e){this.first=t,this.last=e||this.first}[Symbol.iterator](){let t;return{next:()=>(t=t?t.next:this.first,{value:t,done:t===void 0})}}get size(){let t=0;for(let e of this)t++;return t}toArray(t=void 0,e=void 0){let n=[],o=t||this.first,i=e||this.last,r=o;if(r===void 0)return n;do n.push(r),r=r.next;while(r!==i.next);return n}append(t){return this.isEmpty()?this.first=t:(t.prev=this.last,this.last.next=t),this.last=t,this.last.next=void 0,this.first.prev=void 0,this}insert(t,e){if(this.isEmpty())this.first=t,this.last=t;else if(e==null)t.next=this.first,this.first.prev=t,this.first=t;else{let n=e.next;e.next=t,n&&(n.prev=t),t.prev=e,t.next=n,this.last===e&&(this.last=t)}return this.last.next=void 0,this.first.prev=void 0,this}remove(t){return t===this.first&&t===this.last?(this.first=void 0,this.last=void 0):(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this.first&&(this.first=t.next),t===this.last&&(this.last=t.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(t){let e=t,n=t;do{if(e!=t&&e===n)throw wd.INFINITE_LOOP;e=e.next,n=n.next.next}while(e!=t)}},sdn={stroke:"black"},uTi=class{constructor(t=sdn){for(const e in t)this[e]=t[e];this.stroke=t.stroke??sdn.stroke}toAttributesString(){return Object.keys(this).reduce((t,e)=>t+(this[e]!==void 0?this.toAttrString(e,this[e]):""),"")}toAttrString(t,e){const n=t==="className"?"class":this.convertCamelToKebabCase(t);return e===null?`${n} `:`${n}="${e.toString()}" `}convertCamelToKebabCase(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join("-").toLowerCase()}};function HT(t){return new uTi(t).toAttributesString()}function LU(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ue.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ue.Point(g,h))}return n}function OT(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ue.Utils.EQ(i,e.r))n.push(o);else if(Ue.Utils.LT(i,e.r)){let r=Math.sqrt(e.r*e.r-i*i),s,a;s=t.norm.rotate90CCW().multiply(r),a=o.translate(s),n.push(a),s=t.norm.rotate90CW().multiply(r),a=o.translate(s),n.push(a)}return n}function HU(t,e){let n=[];for(let o of e.toSegments()){let i=nee(o,t);for(let r of i)_dn(r,n)||n.push(r)}return n}function Z_e(t,e){let n=[];if(HU(t,e.box).length===0)return n;let o=new Ue.Circle(e.pc,e.r),i=OT(t,o);for(let r of i)r.on(e)&&n.push(r);return n}function nee(t,e){let n=[];if(t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&!t.isZeroLength()&&n.push(t.pe),n.length>0||t.isZeroLength()||t.ps.leftTo(e)&&t.pe.leftTo(e)||!t.ps.leftTo(e)&&!t.pe.leftTo(e))return n;let o=new Ue.Line(t.ps,t.pe);return LU(o,e)}function efe(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)&&n.push(e.ps),n;let o=new Ue.Line(t.ps,t.pe),i=new Ue.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)&&n.push(t.ps),t.pe.on(e)&&n.push(t.pe),e.ps.on(t)&&!e.ps.equalTo(t.ps)&&!e.ps.equalTo(t.pe)&&n.push(e.ps),e.pe.on(t)&&!e.pe.equalTo(t.ps)&&!e.pe.equalTo(t.pe)&&n.push(e.pe);else if(o.parallelTo(i)){const r=new Ue.Vector(t.ps,t.pe),s=new Ue.Vector(e.ps,e.pe),a=new Ue.Vector(t.ps,e.ps),A=r.cross(s);if(!Ue.Utils.EQ_0(A)){const c=a.cross(s)/A,l=a.cross(r)/A;Ue.Utils.GE(c,0)&&Ue.Utils.LE(c,1)&&Ue.Utils.GE(l,0)&&Ue.Utils.LE(l,1)&&n.push(adn(t.ps.translate(r.multiply(c)),t,e))}}else{let r=LU(o,i);r.length>0&&Adn(r[0],t)&&Adn(r[0],e)&&n.push(adn(r[0],t,e))}return n}function adn(t,e,n){for(const o of[e.ps,e.pe,n.ps,n.pe])if(t.equalTo(o))return o;return t}function Adn(t,e){const n=e.box;return Ue.Utils.LE(t.x,n.xmax)&&Ue.Utils.GE(t.x,n.xmin)&&Ue.Utils.LE(t.y,n.ymax)&&Ue.Utils.GE(t.y,n.ymin)}function tfe(t,e){let n=[];if(t.isZeroLength()){let[r,s]=t.ps.distanceTo(e.pc);return Ue.Utils.EQ(r,e.r)&&n.push(t.ps),n}let o=new Ue.Line(t.ps,t.pe),i=OT(o,e);for(let r of i)r.on(t)&&n.push(r);return n}function OU(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)&&n.push(t.ps),n;let o=new Ue.Line(t.ps,t.pe),i=new Ue.Circle(e.pc,e.r),r=OT(o,i);for(let s of r)s.on(t)&&s.on(e)&&n.push(s);return n}function gTi(t,e){let n=[];for(let o of e.toSegments()){let i=efe(o,t);for(let r of i)n.push(r)}return n}function cdn(t,e){let n=[],o=new Ue.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ue.Utils.EQ_0(i)||Ue.Utils.EQ_0(r))return n;if(Ue.Utils.EQ_0(o.x)&&Ue.Utils.EQ_0(o.y)&&Ue.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s=t.pc.distanceTo(e.pc)[0];if(Ue.Utils.GT(s,i+r)||Ue.Utils.LT(s,Math.abs(i-r)))return n;o.x/=s,o.y/=s;let a;if(Ue.Utils.EQ(s,i+r)||Ue.Utils.EQ(s,Math.abs(i-r)))return a=t.pc.translate(i*o.x,i*o.y),n.push(a),n;let A=i*i/(2*s)-r*r/(2*s)+s/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return a=c.translate(o.rotate90CCW().multiply(l)),n.push(a),a=c.translate(o.rotate90CW().multiply(l)),n.push(a),n}function dTi(t,e){let n=[];for(let o of e.toSegments()){let i=tfe(o,t);for(let r of i)n.push(r)}return n}function ldn(t,e){let n=[];if(t.pc.equalTo(e.pc)&&Ue.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)&&n.push(s),s=t.end,s.on(e)&&n.push(s),s=e.start,s.on(t)&&n.push(s),s=e.end,s.on(t)&&n.push(s),n}let o=new Ue.Circle(t.pc,t.r),i=new Ue.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)&&s.on(e)&&n.push(s);return n}function jje(t,e){let n=[];if(e.pc.equalTo(t.pc)&&Ue.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=e,i=new Ue.Circle(t.pc,t.r),r=cdn(o,i);for(let s of r)s.on(t)&&n.push(s);return n}function hTi(t,e){let n=[];for(let o of e.toSegments()){let i=OU(o,t);for(let r of i)n.push(r)}return n}function udn(t,e){return t.isSegment?efe(t.shape,e):OU(e,t.shape)}function gdn(t,e){return t.isSegment?OU(t.shape,e):ldn(t.shape,e)}function ddn(t,e){return t.isSegment?nee(t.shape,e):Z_e(e,t.shape)}function pTi(t,e){return t.isSegment?Xje(e,t.shape):Zje(e,t.shape)}function mTi(t,e){return t.isSegment?tfe(t.shape,e):jje(t.shape,e)}function $je(t,e){let n=[];for(let o of e.edges)for(let i of udn(o,t))n.push(i);return n}function qje(t,e){let n=[];for(let o of e.edges)for(let i of gdn(o,t))n.push(i);return n}function oee(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of ddn(o,t))_dn(i,n)||n.push(i);return t.sortPoints(n)}function hdn(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of mTi(o,t))n.push(i);return n}function pdn(t,e){return t.isSegment?udn(e,t.shape):t.isArc?gdn(e,t.shape):t.isLine?ddn(e,t.shape):t.isRay?pTi(e,t.shape):[]}function mdn(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...pdn(t,i)];return n}function _Ti(t,e){let n=[];if(e.isEmpty()||t.size===0)return n;for(let o of t)n=[...n,...mdn(o,e)];return n}function fTi(t,e){let n=[];if(t.isEmpty()||e.isEmpty()||t.box.not_intersect(e.box))return n;for(let o of t.edges)n=[...n,...mdn(o,e)];return n}function ITi(t,e){return t instanceof Ue.Line?oee(t,e):t instanceof Ue.Segment?$je(t,e):t instanceof Ue.Arc?qje(t,e):[]}function _dn(t,e){return e.some(n=>n.equalTo(t))}function kP(t){return new Ue.Line(t.start,t.norm)}function Xje(t,e){return nee(e,kP(t)).filter(n=>t.contains(n))}function Zje(t,e){return Z_e(kP(t),e).filter(n=>t.contains(n))}function fdn(t,e){return OT(kP(t),e).filter(n=>t.contains(n))}function CTi(t,e){return HU(kP(t),e).filter(n=>t.contains(n))}function Idn(t,e){return LU(kP(t),e).filter(n=>t.contains(n))}function yTi(t,e){return LU(kP(t),kP(e)).filter(n=>t.contains(n)).filter(n=>e.contains(n))}function Cdn(t,e){return oee(kP(t),e).filter(n=>t.contains(n))}function ydn(t,e){if(t.intersect&&t.intersect instanceof Function)return t.intersect(e);throw wd.UNSUPPORTED_SHAPE_TYPE}function GU(t,e){let n=[];for(let o of e)n=[...n,...ydn(t,o.shape)];return n}function xTi(t,e){let n=[];for(let o of t)for(let i of e)n=[...n,...ydn(o.shape,i.shape)];return n}var GT=class ene extends Wje{constructor(...e){if(super(),this.isInfinite=!1,e.length===1&&e[0]instanceof Array&&e[0].length>0){const n=e[0],o=n.length,i=A=>A instanceof Ue.Segment||A instanceof Ue.Arc||A instanceof Ue.Ray||A instanceof Ue.Line,r=A=>A instanceof Ue.Segment||A instanceof Ue.Arc||A instanceof Ue.Ray,s=A=>A instanceof Ue.Segment||A instanceof Ue.Arc;if(o===1&&i(n[0])||o>1&&r(n[0])&&r(n[o-1])&&n.slice(1,o-1).every(s)){this.isInfinite=n.some(A=>A instanceof Ue.Ray||A instanceof Ue.Line);for(let A of n){let c=new Ue.Edge(A);this.append(c)}this.setArcLength()}else throw Ue.Errors.ILLEGAL_PARAMETERS}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=>e.merge(n.box),new Ue.Box)}get vertices(){let e=this.edges.map(n=>n.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new ene(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e>this.length||e<0||this.isInfinite)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ue.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Ue.Point){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Line){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Circle){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Segment){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Arc){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Box){const[n,o]=Ue.Distance.shape2multiline(new Ue.Polygon(e),this);return[n,o.reverse()]}if(e instanceof Ue.Multiline)return Ue.Distance.multiline2multiline(this,e);throw Ue.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ue.Multiline?xTi(this,e):GU(e,this)}contains(e){if(e instanceof Ue.Point)return this.edges.some(n=>n.shape.contains(e));throw Ue.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new ene(this.edges.map(n=>n.shape.translate(e)))}rotate(e=0,n=new Ue.Point){return new ene(this.edges.map(o=>o.shape.rotate(e,n)))}transform(e=new Ue.Matrix){return new ene(this.edges.map(n=>n.shape.transform(e)))}toShapes(){return this.edges.map(e=>e.shape.clone())}toJSON(){return this.edges.map(e=>e.toJSON())}svgPoints(){return this.vertices.map(e=>`${e.x},${e.y}`).join(" ")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`
<path ${HT({fill:"none",...e})} d="`;n+=`
M${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`" >
</path>`,n}};Ue.Multiline=GT;var ETi=(...t)=>new Ue.Multiline(...t);Ue.multiline=ETi;function YU(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;i[0]===null?r=0:i[1]===null?r=t.shape.length:r=i[0].length;let s=zje;LT(r,0)&&(s|=tee),LT(r,t.shape.length)&&(s|=FU);let a;r===1/0?a=i[0].coord(e):a=s&FU&&t.next&&t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:a,edge_before:t,edge_after:void 0,face:t.face,is_vertex:s})}function iee(t){t.int_points1_sorted=FP(t.int_points1),t.int_points2_sorted=FP(t.int_points2)}function FP(t){let e=new Map,n=0;for(let i of t)e.has(i.face)||(e.set(i.face,n),n++);for(let i of t)i.faceId=e.get(i.face);return t.slice().sort(BTi)}function BTi(t,e){return t.faceId<e.faceId?-1:t.faceId>e.faceId?1:t.arc_length<e.arc_length?-1:t.arc_length>e.arc_length?1:0}function e$e(t){if(t.int_points1.length<2)return;let e=!1,n,o,i,r;for(let s=0;s<t.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){n=t.int_points1_sorted[s],o=t.int_points2[n.id];for(let a=s+1;a<t.int_points1_sorted.length&&(i=t.int_points1_sorted[a],!!LT(i.arc_length,n.arc_length));a++)i.id!==-1&&(r=t.int_points2[i.id],r.id!==-1&&i.edge_before===n.edge_before&&i.edge_after===n.edge_after&&r.edge_before===o.edge_before&&r.edge_after===o.edge_after&&(i.id=-1,r.id=-1,e=!0))}o=t.int_points2_sorted[0],n=t.int_points1[o.id];for(let s=1;s<t.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(o.id===-1||!LT(a.arc_length,o.arc_length)){o=a,n=t.int_points1[o.id];continue}let A=t.int_points1[a.id];A.edge_before===n.edge_before&&A.edge_after===n.edge_after&&a.edge_before===o.edge_before&&a.edge_after===o.edge_after&&(A.id=-1,a.id=-1,e=!0)}e&&(t.int_points1=t.int_points1.filter(s=>s.id>=0),t.int_points2=t.int_points2.filter(s=>s.id>=0),t.int_points1.forEach((s,a)=>s.id=a),t.int_points2.forEach((s,a)=>s.id=a))}function t$e(t){for(let e of t)e.edge_before&&(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after&&(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before&&(e.edge_before.bvEnd=W6),e.edge_after&&(e.edge_after.bvStart=W6)}function n$e(t,e){for(let n of t)n.edge_before&&n.edge_before.setInclusion(e),n.edge_after&&n.edge_after.setInclusion(e)}function bTi(t){let e,n,o,i=t.int_points1.length;for(let r=0;r<i;r++){let s=t.int_points1_sorted[r];s.face!==e&&(n=r,e=s.face);let a=r,A=UU(t.int_points1_sorted,r,e),c;a+A<i&&t.int_points1_sorted[a+A].face===e?c=a+A:c=n;let l=UU(t.int_points1_sorted,c,e);o=null;for(let _=c;_<c+l;_++){let f=t.int_points1_sorted[_];if(f.face===e&&t.int_points2[f.id].face===t.int_points2[s.id].face){o=f;break}}if(o===null)continue;let u=s.edge_after,g=o.edge_before;if(!(u.bv===W6&&g.bv===W6)||u!==g)continue;let h=t.int_points2[s.id],d=t.int_points2[o.id],p=h.edge_after,m=d.edge_before;p.bv===W6&&m.bv===W6&&p===m||(h=t.int_points2[o.id],d=t.int_points2[s.id],p=h.edge_after,m=d.edge_before),p.bv===W6&&m.bv===W6&&p===m&&u.setOverlap(p)}}function UU(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s<t.length&&!(o.face!==n||(i=t[s],!(i.pt.equalTo(o.pt)&&i.edge_before===o.edge_before&&i.edge_after===o.edge_after)));s++)r++;return r}function KU(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=zje,o.shape.start&&o.shape.start.equalTo(n.pt)&&(n.is_vertex|=tee),o.shape.end&&o.shape.end.equalTo(n.pt)&&(n.is_vertex|=FU),n.is_vertex&tee){n.edge_before=o.prev,o.prev&&(n.is_vertex=FU);continue}if(n.is_vertex&FU)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof GT&&n.is_vertex&tee&&(n.edge_after=t.first)}}function xdn(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}var{INSIDE:$6,OUTSIDE:q6,BOUNDARY:p1,OVERLAP_SAME:STi,OVERLAP_OPPOSITE:QTi}=X_e,{NOT_VERTEX:wmr,START_VERTEX:Edn,END_VERTEX:Bdn}=X_e,nfe=1,ree=2,YT=3;function vTi(t,e){let[n]=see(t,e,nfe,!0);return n}function o$e(t,e){let o=e.clone().reverse(),[i]=see(t,o,YT,!0);return i}function bdn(t,e){let[n]=see(t,e,ree,!0);return n}function Sdn(t,e){let[n,o]=see(t,e,ree,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=>a.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=>a.shape)];return[i,r]}function i$e(t,e){let[n]=see(t,e,YT,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=>r.shape)];return o}function Qdn(t,e){let n=t.clone(),o=e.clone(),i=vdn(n,o);iee(i),KU(n,i.int_points1_sorted),KU(o,i.int_points2_sorted),e$e(i),iee(i);let r=i.int_points1_sorted.map(a=>a.pt),s=i.int_points2_sorted.map(a=>a.pt);return[r,s]}function wTi(t,e,n,o){let i=wdn(t,n.int_points1),r=wdn(e,n.int_points2);for(Pdn(i,e),Pdn(r,t),t$e(n.int_points1),t$e(n.int_points2),n$e(n.int_points1,e),n$e(n.int_points2,t);MTi(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););bTi(n),r$e(t,o,n.int_points1_sorted,!0),r$e(e,o,n.int_points2_sorted,!1),Mdn(t,i,o,!0),Mdn(e,r,o,!1)}function PTi(t,e,n,o){DTi(t,e,o,n.int_points2),NTi(t,e,n),s$e(t,n.int_points1),s$e(e,n.int_points2),a$e(t,n.int_points1,n.int_points2),a$e(t,n.int_points2,n.int_points1),Ddn(t),Ddn(e)}function see(t,e,n,o){let i=t.clone(),r=e.clone(),s=vdn(i,r);return iee(s),KU(i,s.int_points1_sorted),KU(r,s.int_points2_sorted),e$e(s),iee(s),wTi(i,r,s,n),o&&PTi(i,r,s,n),[i,r]}function vdn(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)YU(o,a,n.int_points1),YU(r,a,n.int_points2)}}return n}function wdn(t,e){let n=[];for(let o of t.faces)e.find(i=>i.face===o)||n.push(o);return n}function Pdn(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function MTi(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u<c;u++){let g=o[u];g.face!==s&&(a=u,s=g.face);let h=u,d=UU(o,u,s),p;h+d<c&&o[h+d].face===s?p=h+d:p=a;let m=UU(o,p,s);A=null;for(let I=p;I<p+m;I++){let C=o[I];if(C.face===s&&i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv===p1&&f.bv!=p1){_.bv=f.bv;continue}if(_.bv!=p1&&f.bv===p1){f.bv=_.bv;continue}if(_.bv===p1&&f.bv===p1&&_!=f||_.bv===$6&&f.bv===q6||_.bv===q6&&f.bv===$6){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===p1&&f.bv===p1&&_!=f){let I=_.next,C;for(;I!=f;){if(I.bv!=p1){if(C===void 0)C=I.bv;else if(I.bv!=C)throw wd.UNRESOLVED_BOUNDARY_CONFLICT}I=I.next}C!=null&&(_.bv=C,f.bv=C);continue}if(_.bv===$6&&f.bv===q6||_.bv===q6&&f.bv===$6){let I=_;for(;I!=f;){if(I.bvStart===_.bv&&I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C<10*Ue.DP_TOL){YU(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex&Edn)x.edge_after=I,x.edge_before=I.prev,I.bvStart=p1,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex&Bdn)x.edge_after=I.next,I.bvEnd=p1,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=p1,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);YU(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex&Edn)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex&Bdn)B.edge_after=E.next;else{let S=i.find(w=>w.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S&&(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=p1,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=p1,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}iee(r),l=!0;break}}I=I.next}if(l)break;throw wd.UNRESOLVED_BOUNDARY_CONFLICT}}return l}function r$e(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A<n.length;A++){if(s=n[A],s.face!==i&&(r=A,i=s.face),i.isEmpty())continue;let c=A,l=UU(n,A,i),u;c+l<n.length&&n[c+l].face===s.face?u=c+l:u=r,a=n[u];let g=u,h=UU(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===$6&&p.bv===$6&&e===nfe||d.bv===q6&&p.bv===q6&&e===ree||(d.bv===q6||p.bv===q6)&&e===YT&&!o||(d.bv===$6||p.bv===$6)&&e===YT&&o||d.bv===p1&&p.bv===p1&&d.overlap&STi&&o||d.bv===p1&&p.bv===p1&&d.overlap&QTi){t.removeChain(i,d,p);for(let m=c;m<c+l;m++)n[m].edge_after=void 0;for(let m=g;m<g+h;m++)n[m].edge_before=void 0}A+=l-1}}function DTi(t,e,n,o){for(let i of e.faces){for(let r of i)t.edges.add(r);o.find(r=>r.face===i)===void 0&&t.addFace(i.first,i.last)}}function NTi(t,e,n){if(n.int_points1.length!==0)for(let o=0;o<n.int_points1.length;o++){let i=n.int_points1[o],r=n.int_points2[o];if(i.edge_before!==void 0&&i.edge_after===void 0&&r.edge_before===void 0&&r.edge_after!==void 0&&(i.edge_before.next=r.edge_after,r.edge_after.prev=i.edge_before,i.edge_after=r.edge_after,r.edge_before=i.edge_before),r.edge_before!==void 0&&r.edge_after===void 0&&i.edge_before===void 0&&i.edge_after!==void 0&&(r.edge_before.next=i.edge_after,i.edge_after.prev=r.edge_before,r.edge_after=i.edge_after,i.edge_before=r.edge_before),i.edge_before!==void 0&&i.edge_after===void 0)for(let s of n.int_points1_sorted)s!==i&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(i.pt)&&(i.edge_before.next=s.edge_after,s.edge_after.prev=i.edge_before,i.edge_after=s.edge_after,s.edge_before=i.edge_before);if(r.edge_before!==void 0&&r.edge_after===void 0)for(let s of n.int_points2_sorted)s!==r&&s.edge_before===void 0&&s.edge_after!==void 0&&s.pt.equalTo(r.pt)&&(r.edge_before.next=s.edge_after,s.edge_after.prev=r.edge_before,r.edge_after=s.edge_after,s.edge_before=r.edge_before)}}function s$e(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before&&(n.edge_before.face=void 0),n.edge_after&&(n.edge_after.face=void 0)}function a$e(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{Wje.testInfiniteLoop(i)}catch{throw wd.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s);for(let a of n)a.edge_before&&a.edge_after&&a.edge_before.face===s&&a.edge_after.face===s&&(a.face=s)}}function Mdn(t,e,n,o){for(let i of e){let r=i.first.bv;(n===nfe&&r===$6||n===YT&&r===$6&&o||n===YT&&r===q6&&!o||n===ree&&r===q6)&&t.deleteFace(i)}}function Ddn(t){const e=[];for(const n of t.edges)(!n.face||!t.faces.has(n.face))&&e.push(n);for(const n of e)t.edges.delete(n)}var RTi=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:ree,BOOLEAN_SUBTRACT:YT,BOOLEAN_UNION:nfe,calculateIntersections:Qdn,innerClip:Sdn,intersect:bdn,outerClip:i$e,removeNotRelevantChains:r$e,removeOldFaces:s$e,restoreFaces:a$e,subtract:o$e,unify:vTi}),TTi=RegExp("T.F..FFF.|T.F...F.."),kTi=RegExp("T........|.T.......|...T.....|....T...."),FTi=RegExp("FT.......|F..T.....|F...T...."),LTi=RegExp("T.F..F..."),HTi=RegExp("T.F..F...|.TF..F...|..FT.F...|..F.TF..."),VU=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=>t instanceof Array&&t.length>0?"T":t instanceof Array&&t.length===0?"F":"*").join("")}equal(){return TTi.test(this.toString())}intersect(){return kTi.test(this.toString())}touch(){return FTi.test(this.toString())}inside(){return LTi.test(this.toString())}covered(){return HTi.test(this.toString())}};function aee(t,e){let n,o=new Ue.Ray(e),i=new Ue.Line(o.pt,o.norm);const r=new Ue.Box(o.box.xmin-Ue.DP_TOL,o.box.ymin-Ue.DP_TOL,o.box.xmax+Ue.DP_TOL,o.box.ymax+Ue.DP_TOL);if(t.box.not_intersect(r))return Ue.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ue.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ue.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ue.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=>rdn(l.pt.x,u.pt.x)?-1:idn(l.pt.x,u.pt.x)?1:l.face_index<u.face_index?-1:l.face_index>u.face_index?1:l.edge.arc_length<u.edge.arc_length?-1:l.edge.arc_length>u.edge.arc_length?1:0);let c=0;for(let l=0;l<A.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;Jje(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l>0&&u.pt.equalTo(A[l-1].pt)&&u.face_index===A[l-1].face_index&&u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;Jje(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_&&!f||!_&&f)&&c++}else if(u.edge.shape instanceof Ue.Segment)c++;else{let g=u.edge.shape.box;LT(u.pt.y,g.ymin)||LT(u.pt.y,g.ymax)||c++}}return n=c%2===1?q_e:tdn,n}function OTi(t,e){return zU(t,e).equal()}function Ndn(t,e){return zU(t,e).intersect()}function GTi(t,e){return zU(t,e).touch()}function YTi(t,e){return!Ndn(t,e)}function Rdn(t,e){return zU(t,e).inside()}function Tdn(t,e){return zU(t,e).covered()}function UTi(t,e){return Rdn(e,t)}function kdn(t,e){return Tdn(e,t)}function zU(t,e){if(t instanceof Ue.Line&&e instanceof Ue.Line)return KTi(t,e);if(t instanceof Ue.Line&&e instanceof Ue.Circle)return VTi(t,e);if(t instanceof Ue.Line&&e instanceof Ue.Box)return zTi(t,e);if(t instanceof Ue.Line&&e instanceof Ue.Polygon)return JTi(t,e);if((t instanceof Ue.Segment||t instanceof Ue.Arc)&&e instanceof Ue.Polygon)return Fdn(t,e);if((t instanceof Ue.Segment||t instanceof Ue.Arc)&&(e instanceof Ue.Circle||e instanceof Ue.Box))return Fdn(t,new Ue.Polygon(e));if(t instanceof Ue.Polygon&&e instanceof Ue.Polygon)return ofe(t,e);if((t instanceof Ue.Circle||t instanceof Ue.Box)&&(e instanceof Ue.Circle||e instanceof Ue.Box))return ofe(new Ue.Polygon(t),new Ue.Polygon(e));if((t instanceof Ue.Circle||t instanceof Ue.Box)&&e instanceof Ue.Polygon)return ofe(new Ue.Polygon(t),e);if(t instanceof Ue.Polygon&&(e instanceof Ue.Circle||e instanceof Ue.Box))return ofe(t,new Ue.Polygon(e))}function KTi(t,e){let n=new VU,o=LU(t,e);return o.length===0?t.contains(e.pt)&&e.contains(t.pt)?(n.I2I=[t],n.I2E=[],n.E2I=[]):(n.I2I=[],n.I2E=[t],n.E2I=[e]):(n.I2I=o,n.I2E=t.split(o),n.E2I=e.split(o)),n}function VTi(t,e){let n=new VU,o=OT(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new GT([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ue.Polygon([e.toArc()]).cutWithLine(t)}return n}function zTi(t,e){let n=new VU,o=HU(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new GT([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();e.toSegments().some(a=>a.contains(o[0])&&a.contains(o[1]))?(n.I2I=[],n.I2B=[s[1]],n.I2E=[s[0],s[2]],n.E2I=[e]):(n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ue.Polygon(e.toSegments()).cutWithLine(t))}return n}function JTi(t,e){let n=new VU,o=oee(t,e),i=new GT([t]),r=o.length>0?o.slice():t.sortPoints(o);return i.split(r),[...i].forEach(s=>s.setInclusion(e)),n.I2I=[...i].filter(s=>s.bv===Ue.INSIDE).map(s=>s.shape),n.I2B=[...i].slice(1).map(s=>s.bv===Ue.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=>s.bv===Ue.OUTSIDE).map(s=>s.shape),n.E2I=e.cutWithLine(t),n}function Fdn(t,e){let n=new VU,o=ITi(t,e),i=o.length>0?o.slice():t.sortPoints(o),r=new GT([t]);r.split(i),[...r].forEach(s=>s.setInclusion(e)),n.I2I=[...r].filter(s=>s.bv===Ue.INSIDE).map(s=>s.shape),n.I2B=[...r].slice(1).map(s=>s.bv===Ue.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=>s.bv===Ue.OUTSIDE).map(s=>s.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(aee(e,s)){case Ue.INSIDE:n.B2I.push(s);break;case Ue.BOUNDARY:n.B2B.push(s);break;case Ue.OUTSIDE:n.B2E.push(s);break}return n}function ofe(t,e){let n=new VU,[o,i]=Qdn(t,e),r=bdn(t,e),s=o$e(t,e),a=o$e(e,t),[A,c]=Sdn(t,e),l=i$e(t,e),u=i$e(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var WTi=Object.freeze({__proto__:null,contain:UTi,cover:kdn,covered:Tdn,disjoint:YTi,equal:OTi,inside:Rdn,intersect:Ndn,relate:zU,touch:GTi}),Aee=class Fk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new Fk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new Fk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new Fk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length==1&&!isNaN(e[0].x)&&!isNaN(e[0].y))n=e[0].x,o=e[0].y;else if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")n=e[0],o=e[1];else throw wd.ILLEGAL_PARAMETERS;return this.multiply(new Fk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new Fk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new Fk(e,0,0,n,0,0))}equalTo(e){return!(!Ue.Utils.EQ(this.tx,e.tx)||!Ue.Utils.EQ(this.ty,e.ty)||!Ue.Utils.EQ(this.a,e.a)||!Ue.Utils.EQ(this.b,e.b)||!Ue.Utils.EQ(this.c,e.c)||!Ue.Utils.EQ(this.d,e.d))}};Ue.Matrix=Aee;var jTi=(...t)=>new Ue.Matrix(...t);Ue.matrix=jTi;var $Ti=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low<t.low||this.low===t.low&&this.high<t.high}equal_to(t){return this.low===t.low&&this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high<t.low||t.high<this.low}merge(t){const e=this.low===void 0?t.low:this.low<t.low?this.low:t.low,n=this.high===void 0?t.high:this.high>t.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t<e}},qTi=class y4n extends $Ti{clone(){return new y4n(this.low,this.high)}},fI=1,cu=0,LP=class{constructor(e,n,o=null,i=null,r=null,s=cu){if(this.left=o,this.right=i,this.parent=r,this.color=s,this.item={key:void 0,values:[]},n!==void 0&&this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,A]=e;if(!Number.isNaN(a)&&!Number.isNaN(A)){let c=a,l=A;c>l&&([c,l]=[l,c]),this.item.key=new qTi(c,l)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0&&this.item.values.length===0&&this.left===null&&this.right===null&&this.color===cu}requireKey(){if(!this.item.key)throw new Error("Node key is undefined (nil/sentinel). Operation is not applicable.");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n&&o&&n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right&&this.right.max&&(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left&&this.left.max&&(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(n,i.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(i.high,n)}},A$e=class x4n{constructor(){this.root=null,this.nil_node=new LP}get size(){let e=0;return this.tree_walk(this.root,n=>e+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=>e.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=>{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=>{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new LP(e));if(o)return o.item.values.push(n),o;const i=new LP(e,n,this.nil_node,this.nil_node,null,fI);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new LP(e));return o?arguments.length<2||n===e?!0:o.item.values.some(i=>i&&i.equal_to?i.equal_to(n):i===n):!1}remove(e,n=e){const o=this.tree_search(this.root,new LP(e));if(!o)return;if(arguments.length<2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=>r&&r.equal_to?r.equal_to(n):r===n);if(i>=0)return o.item.values.splice(i,1),o.item.values.length===0&&this.tree_delete(o),o}search(e,n=(o,i)=>o===i?i.output():o){const o=new LP(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new LP(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=>{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new x4n;return this.tree_walk(this.root,o=>{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=>o===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new LP(e)):this.root&&(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,e.less_than(n)?n=n.left:n=n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root&&n.parent.color===fI;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===fI?(n.parent.color=cu,o.color=cu,n.parent.parent.color=fI,n=n.parent.parent):(n===n.parent.right&&(n=n.parent,this.rotate_left(n)),n.parent.color=cu,n.parent.parent.color=fI,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===fI?(n.parent.color=cu,o.color=cu,n.parent.parent.color=fI,n=n.parent.parent):(n===n.parent.left&&(n=n.parent,this.rotate_right(n)),n.parent.color=cu,n.parent.parent.color=fI,this.rotate_left(n.parent.parent)));this.root.color=cu}tree_delete(e){let n,o;e.left===this.nil_node||e.right===this.nil_node?n=e:n=this.tree_successor(e),n.left!==this.nil_node?o=n.left:o=n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e&&(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===cu&&this.delete_fixup(o)}delete_fixup(e){let n=e,o;for(;n!==this.root&&n.parent!=null&&n.color===cu;)n===n.parent.left?(o=n.parent.right,o.color===fI&&(o.color=cu,n.parent.color=fI,this.rotate_left(n.parent),o=n.parent.right),o.left.color===cu&&o.right.color===cu?(o.color=fI,n=n.parent):(o.right.color===cu&&(o.color=fI,o.left.color=cu,this.rotate_right(o),o=n.parent.right),o.color=n.parent.color,n.parent.color=cu,o.right.color=cu,this.rotate_left(n.parent),n=this.root)):(o=n.parent.left,o.color===fI&&(o.color=cu,n.parent.color=fI,this.rotate_right(n.parent),o=n.parent.left),o.left.color===cu&&o.right.color===cu?(o.color=fI,n=n.parent):(o.left.color===cu&&(o.color=fI,o.right.color=cu,this.rotate_left(o),o=n.parent.left),o.color=n.parent.color,n.parent.color=cu,o.left.color=cu,this.rotate_right(n.parent),n=this.root));n.color=cu}tree_search(e,n){if(!(e==null||e===this.nil_node))return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i&&i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:((!o||i.less_than(o))&&(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&this.tree_search_interval(e.left,n,o),e.intersect(n)&&o.push(e),e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null&&e!==this.nil_node&&(e.left!==this.nil_node&&!e.not_intersect_left_subtree(n)&&(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),!o&&e.right!==this.nil_node&&!e.not_intersect_right_subtree(n)&&(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null&&n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null&&n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null&&i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node&&(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node&&(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null&&e!==this.nil_node&&e.update_max(),n!=null&&n!==this.nil_node&&n.update_max()}tree_walk(e,n){e!=null&&e!==this.nil_node&&(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===fI&&(n.left.color===cu&&n.right.color===cu||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===cu&&n++,e.left!==this.nil_node?o=this.testBlackHeightProperty(e.left):o=1,e.right!==this.nil_node?i=this.testBlackHeightProperty(e.right):i=1,o!==i)throw new Error("Red-black height property violated");return n+=o,n}},XTi=class extends Set{constructor(t){super(t),this.index=new A$e,this.forEach(e=>this.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,i=n||t.box,r=o||t;return super.add(r),this.size>e&&this.index.insert(i,r),this}delete(t){const{key:e,value:n}=t,o=e||t.box,i=n||t;let r=super.delete(i);return r&&this.index.remove(o,i),r}clear(){super.clear(),this.index=new A$e}search(t){return this.index.search(t)}hit(t){let e=new Ue.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(o=>t.on(o))}svg(){return[...this].reduce((e,n)=>e+n.svg(),"")}};Ue.PlanarSet=XTi;var HP=class{get name(){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new Aee().translate(...t))}rotate(t,e=new Ue.Point){return this.transform(new Aee().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new Aee().scale(t,e))}transform(...t){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}},ZTi=class E4n extends HP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number"){this.x=n[0],this.y=n[1];return}}if(e.length===1&&e[0]instanceof Object&&e[0].name==="point"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"){this.x=e[0],this.y=e[1];return}throw wd.ILLEGAL_PARAMETERS}}get box(){return new Ue.Box(this.x,this.y,this.x,this.y)}clone(){return new Ue.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ue.Utils.EQ(this.x,e.x)&&Ue.Utils.EQ(this.y,e.y)}lessThan(e){return!!(Ue.Utils.LT(this.y,e.y)||Ue.Utils.EQ(this.y,e.y)&&Ue.Utils.LT(this.x,e.x))}transform(e){return new Ue.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ue.Vector(this,e.pt);if(Ue.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ue.Vector(e.pt,this);return Ue.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof E4n){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ue.Segment(this,e)]}if(e instanceof Ue.Line)return Ue.Distance.point2line(this,e);if(e instanceof Ue.Circle)return Ue.Distance.point2circle(this,e);if(e instanceof Ue.Segment)return Ue.Distance.point2segment(this,e);if(e instanceof Ue.Arc)return Ue.Distance.point2arc(this,e);if(e instanceof Ue.Box)return Ue.Distance.point2polygon(this,new Ue.Polygon(e));if(e instanceof Ue.Polygon)return Ue.Distance.point2polygon(this,e);if(e instanceof Ue.PlanarSet)return Ue.Distance.shape2planarSet(this,e);if(e instanceof Ue.Multiline)return Ue.Distance.shape2multiline(this,e)}on(e){if(e instanceof Ue.Point)return this.equalTo(e);if(e.contains&&e.contains instanceof Function)return e.contains(this);throw Ue.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return"point"}svg(e={}){const n=e.r??3;return`
<circle cx="${this.x}" cy="${this.y}" r="${n}"
            ${HT({fill:"red",...e})} />`}};Ue.Point=ZTi;var eki=(...t)=>new Ue.Point(...t);Ue.point=eki;var tki=class extends HP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===2){let n=e[0];if(typeof n[0]=="number"&&typeof n[1]=="number"){this.x=n[0],this.y=n[1];return}}if(e.length===1&&e[0]instanceof Object&&e[0].name==="vector"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{start:n,end:o}=e[0];this.x=o.x-n.x,this.y=o.y-n.y;return}if(e.length===2){let n=e[0],o=e[1];if(typeof n=="number"&&typeof o=="number"){this.x=n,this.y=o;return}if(n instanceof Ue.Point&&o instanceof Ue.Point){this.x=o.x-n.x,this.y=o.y-n.y;return}}throw wd.ILLEGAL_PARAMETERS}}clone(){return new Ue.Vector(this.x,this.y)}get slope(){let e=Math.atan2(this.y,this.x);return e<0&&(e=2*Math.PI+e),e}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ue.Utils.EQ_0(this.length)}equalTo(e){return Ue.Utils.EQ(this.x,e.x)&&Ue.Utils.EQ(this.y,e.y)}multiply(e){return new Ue.Vector(e*this.x,e*this.y)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}normalize(){if(this.isZeroLength())throw wd.ZERO_DIVISION;return new Ue.Vector(this.x/this.length,this.y/this.length)}rotate(e,n=new Ue.Point){if(n.x===0&&n.y===0)return this.transform(new Aee().rotate(e));throw wd.OPERATION_IS_NOT_SUPPORTED}transform(e){return new Ue.Vector(e.transform([this.x,this.y]))}rotate90CCW(){return new Ue.Vector(-this.y,this.x)}rotate90CW(){return new Ue.Vector(this.y,-this.x)}invert(){return new Ue.Vector(-this.x,-this.y)}add(e){return new Ue.Vector(this.x+e.x,this.y+e.y)}subtract(e){return new Ue.Vector(this.x-e.x,this.y-e.y)}angleTo(e){let n=this.normalize(),o=e.normalize(),i=Math.atan2(n.cross(o),n.dot(o));return i<0&&(i+=2*Math.PI),i}projectionOn(e){let n=e.normalize(),o=this.dot(n);return n.multiply(o)}get name(){return"vector"}};Ue.Vector=tki;var Ldn=(...t)=>new Ue.Vector(...t);Ue.vector=Ldn;var nki=class Sit extends HP{constructor(...e){if(super(),this.ps=new Ue.Point,this.pe=new Ue.Point,e.length!==0){if(e.length===1&&e[0]instanceof Array&&e[0].length===4){let n=e[0];this.ps=new Ue.Point(n[0],n[1]),this.pe=new Ue.Point(n[2],n[3]);return}if(e.length===1&&e[0]instanceof Object&&e[0].name==="segment"){let{ps:n,pe:o}=e[0];this.ps=new Ue.Point(n.x,n.y),this.pe=new Ue.Point(o.x,o.y);return}if(e.length===1&&e[0]instanceof Ue.Point){this.ps=e[0].clone();return}if(e.length===2&&e[0]instanceof Ue.Point&&e[1]instanceof Ue.Point){this.ps=e[0].clone(),this.pe=e[1].clone();return}if(e.length===4){this.ps=new Ue.Point(e[0],e[1]),this.pe=new Ue.Point(e[2],e[3]);return}throw wd.ILLEGAL_PARAMETERS}}clone(){return new Ue.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ue.Vector(this.start,this.end).slope}get box(){return new Ue.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)&&this.pe.equalTo(e.pe)}contains(e){return Ue.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return nee(this,e);if(e instanceof Ue.Ray)return Xje(e,this);if(e instanceof Ue.Segment)return efe(this,e);if(e instanceof Ue.Circle)return tfe(this,e);if(e instanceof Ue.Box)return gTi(this,e);if(e instanceof Ue.Arc)return OU(this,e);if(e instanceof Ue.Polygon)return $je(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle){let[n,o]=Ue.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ue.Line){let[n,o]=Ue.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ue.Segment){let[n,o]=Ue.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ue.Arc){let[n,o]=Ue.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ue.Box){let[n,o]=Ue.Distance.shape2polygon(this,new Ue.Polygon(e));return[n,o]}if(e instanceof Ue.Polygon){let[n,o]=Ue.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ue.PlanarSet){let[n,o]=Ue.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ue.Multiline)return Ue.Distance.shape2multiline(this,e)}tangentInStart(){return new Ue.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ue.Vector(this.end,this.start).normalize()}reverse(){return new Sit(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ue.Segment(this.start,e),new Ue.Segment(e,this.end)]}middle(){return new Ue.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e>this.length||e<0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ue.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ue.Distance.point2segment(e,this);return n}definiteIntegral(e=0){let n=this.end.x-this.start.x,o=this.start.y-e,i=this.end.y-e;return n*(o+i)/2}transform(e=new Ue.Matrix){return new Sit(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ue.Line(this.start,this.end).sortPoints(e)}get name(){return"segment"}svg(e={}){return`
<line x1="${this.start.x}" y1="${this.start.y}" x2="${this.end.x}" y2="${this.end.y}" ${HT(e)} />`}};Ue.Segment=nki;var oki=(...t)=>new Ue.Segment(...t);Ue.segment=oki;var{vector:cee}=Ue,iki=class B4n extends HP{constructor(...e){if(super(),this.pt=new Ue.Point,this.norm=new Ue.Vector(0,1),e.length!==0){if(e.length===1&&e[0]instanceof Object&&e[0].name==="line"){let{pt:n,norm:o}=e[0];this.pt=new Ue.Point(n),this.norm=new Ue.Vector(o);return}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ue.Point&&o instanceof Ue.Point){this.pt=n,this.norm=B4n.points2norm(n,o),this.norm.dot(cee(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}if(n instanceof Ue.Point&&o instanceof Ue.Vector){if(Ue.Utils.EQ_0(o.x)&&Ue.Utils.EQ_0(o.y))throw wd.ILLEGAL_PARAMETERS;this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),this.norm.dot(cee(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}if(n instanceof Ue.Vector&&o instanceof Ue.Point){if(Ue.Utils.EQ_0(n.x)&&Ue.Utils.EQ_0(n.y))throw wd.ILLEGAL_PARAMETERS;this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),this.norm.dot(cee(this.pt.x,this.pt.y))>=0&&this.norm.invert();return}}throw wd.ILLEGAL_PARAMETERS}}clone(){return new Ue.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ue.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ue.Vector(this.norm.y,-this.norm.x).slope}get standard(){let e=this.norm.x,n=this.norm.y,o=this.norm.dot(cee(this.pt.x,this.pt.y));return[e,n,o]}parallelTo(e){return Ue.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)&&this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ue.Vector(this.pt,e);return Ue.Utils.EQ_0(this.norm.dot(n))}coord(e){return cee(e.x,e.y).cross(this.norm)}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return LU(this,e);if(e instanceof Ue.Ray)return Idn(e,this);if(e instanceof Ue.Circle)return OT(this,e);if(e instanceof Ue.Box)return HU(this,e);if(e instanceof Ue.Segment)return nee(e,this);if(e instanceof Ue.Arc)return Z_e(this,e);if(e instanceof Ue.Polygon)return oee(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle){let[n,o]=Ue.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Segment){let[n,o]=Ue.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ue.Arc){let[n,o]=Ue.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ue.Box){let[n,o]=Ue.Distance.shape2polygon(this,new Ue.Polygon(e));return[n,o]}if(e instanceof Ue.Polygon){let[n,o]=Ue.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ue.Point)return[new Ue.Ray(e,this.norm),new Ue.Ray(e,this.norm)];{let n=new Ue.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ue.Point){return new Ue.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ue.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=>this.coord(n)<this.coord(o)?-1:this.coord(n)>this.coord(o)?1:0)}get name(){return"line"}svg(e,n={}){let o=HU(this,e);if(o.length===0)return"";let i=o[0],r=o.length===2?o[1]:o.find(a=>!a.equalTo(i));return r===void 0&&(r=i),new Ue.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw wd.ILLEGAL_PARAMETERS;return new Ue.Vector(e,n).normalize().rotate90CCW()}};Ue.Line=iki;var rki=(...t)=>new Ue.Line(...t);Ue.line=rki;var ski=class extends HP{constructor(...e){if(super(),this.pc=new Ue.Point,this.r=1,e.length===1&&e[0]instanceof Object&&e[0].name==="circle"){let{pc:n,r:o}=e[0];this.pc=new Ue.Point(n),this.r=o}else{let[n,o]=[...e];n&&n instanceof Ue.Point&&(this.pc=n.clone()),o!==void 0&&(this.r=o)}}clone(){return new Ue.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ue.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(e){if(e instanceof Ue.Point)return Ue.Utils.LE(e.distanceTo(this.center)[0],this.r);if(e instanceof Ue.Segment)return Ue.Utils.LE(e.start.distanceTo(this.center)[0],this.r)&&Ue.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ue.Arc)return this.intersect(e).length===0&&Ue.Utils.LE(e.start.distanceTo(this.center)[0],this.r)&&Ue.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ue.Circle)return this.intersect(e).length===0&&Ue.Utils.LE(e.r,this.r)&&Ue.Utils.LE(e.center.distanceTo(this.center)[0],this.r)}toArc(e=!0){return new Ue.Arc(this.center,this.r,Math.PI,-Math.PI,e)}scale(e,n){if(e!==n||!(this.pc.x===0&&this.pc.y===0))throw wd.OPERATION_IS_NOT_SUPPORTED;return new Ue.Circle(this.pc,this.r*e)}transform(e=new Ue.Matrix){return new Ue.Circle(this.pc.transform(e),this.r)}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return OT(e,this);if(e instanceof Ue.Ray)return fdn(e,this);if(e instanceof Ue.Segment)return tfe(e,this);if(e instanceof Ue.Circle)return cdn(e,this);if(e instanceof Ue.Box)return dTi(this,e);if(e instanceof Ue.Arc)return jje(e,this);if(e instanceof Ue.Polygon)return hdn(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle){let[n,o]=Ue.Distance.circle2circle(this,e);return[n,o]}if(e instanceof Ue.Line){let[n,o]=Ue.Distance.circle2line(this,e);return[n,o]}if(e instanceof Ue.Segment){let[n,o]=Ue.Distance.segment2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Arc){let[n,o]=Ue.Distance.arc2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Box){let[n,o]=Ue.Distance.shape2polygon(this,new Ue.Polygon(e));return[n,o]}if(e instanceof Ue.Polygon){let[n,o]=Ue.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ue.PlanarSet){let[n,o]=Ue.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ue.Multiline){let[n,o]=Ue.Distance.shape2multiline(this,e);return[n,o]}}get name(){return"circle"}svg(e={}){return`
<circle cx="${this.pc.x}" cy="${this.pc.y}" r="${this.r}"
                ${HT({fill:"none",...e})} />`}};Ue.Circle=ski;var aki=(...t)=>new Ue.Circle(...t);Ue.circle=aki;var Aki=class extends HP{constructor(...t){if(super(),this.pc=new Ue.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,t.length!==0)if(t.length===1&&t[0]instanceof Object&&t[0].name==="arc"){let{pc:e,r:n,startAngle:o,endAngle:i,counterClockwise:r}=t[0];this.pc=new Ue.Point(e.x,e.y),this.r=n,this.startAngle=o,this.endAngle=i,this.counterClockwise=r}else{let[e,n,o,i,r]=[...t];e&&e instanceof Ue.Point&&(this.pc=e.clone()),n!==void 0&&(this.r=n),o!==void 0&&(this.startAngle=o),i!==void 0&&(this.endAngle=i),r!==void 0&&(this.counterClockwise=r)}}clone(){return new Ue.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let t=this.startAngle,e=this.endAngle;if(Ue.Utils.EQ(Math.abs(t-e),Ue.PIx2))return Ue.PIx2;Math.abs(t)>Ue.PIx2&&(t-=Math.trunc(t/Ue.PIx2)*Ue.PIx2),t<0&&(t+=Ue.PIx2),Math.abs(e)>Ue.PIx2&&(e-=Math.trunc(e/Ue.PIx2)*Ue.PIx2),e<0&&(e+=Ue.PIx2);let n=this.counterClockwise?e-t:t-e;return n<0&&(n+=Ue.PIx2),n}get start(){return new Ue.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ue.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let e=this.breakToFunctional().reduce((n,o)=>n.merge(o.start.box),new Ue.Box);return e=e.merge(this.end.box),e}contains(t){if(!Ue.Utils.EQ(this.pc.distanceTo(t)[0],this.r))return!1;if(t.equalTo(this.start))return!0;let e=new Ue.Vector(this.pc,t).slope,n=new Ue.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise);return Ue.Utils.LE(n.length,this.length)}split(t){if(this.start.equalTo(t))return[null,this.clone()];if(this.end.equalTo(t))return[this.clone(),null];let e=new Ue.Vector(this.pc,t).slope;return[new Ue.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise),new Ue.Arc(this.pc,this.r,e,this.endAngle,this.counterClockwise)]}middle(){let t=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ue.Arc(this.pc,this.r,this.startAngle,t,this.counterClockwise).end}pointAtLength(t){if(t>this.length||t<0)return null;if(t===0)return this.start;if(t===this.length)return this.end;let e=t/this.length,n=this.counterClockwise?this.startAngle+this.sweep*e:this.startAngle-this.sweep*e;return new Ue.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(t){if(t instanceof Ue.Point)return this.contains(t)?[t]:[];if(t instanceof Ue.Line)return Z_e(t,this);if(t instanceof Ue.Ray)return Zje(t,this);if(t instanceof Ue.Circle)return jje(this,t);if(t instanceof Ue.Segment)return OU(t,this);if(t instanceof Ue.Box)return hTi(this,t);if(t instanceof Ue.Arc)return ldn(this,t);if(t instanceof Ue.Polygon)return qje(this,t);if(t instanceof Ue.Multiline)return GU(this,t)}distanceTo(t){if(t instanceof Ue.Point){let[e,n]=Ue.Distance.point2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ue.Circle){let[e,n]=Ue.Distance.arc2circle(this,t);return[e,n]}if(t instanceof Ue.Line){let[e,n]=Ue.Distance.arc2line(this,t);return[e,n]}if(t instanceof Ue.Segment){let[e,n]=Ue.Distance.segment2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ue.Arc){let[e,n]=Ue.Distance.arc2arc(this,t);return[e,n]}if(t instanceof Ue.Box){let[e,n]=Ue.Distance.shape2polygon(this,new Ue.Polygon(t));return[e,n]}if(t instanceof Ue.Polygon){let[e,n]=Ue.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ue.PlanarSet){let[e,n]=Ue.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ue.Multiline)return Ue.Distance.shape2multiline(this,t)}breakToFunctional(){let t=[],e=[0,Math.PI/2,Math.PI,3*Math.PI/2],n=this.startAngle,o=this.endAngle;Ue.Utils.EQ(Math.abs(n-o),Ue.PIx2)&&(o=n),Math.abs(n)>Ue.PIx2&&(n-=Math.trunc(n/Ue.PIx2)*Ue.PIx2),n<0&&(n+=Ue.PIx2),Math.abs(o)>Ue.PIx2&&(o-=Math.trunc(o/Ue.PIx2)*Ue.PIx2),o<0&&(o+=Ue.PIx2);let i=n,r,s,a;this.counterClockwise?(s=Math.ceil(n/(Math.PI/2))%4,a=1):(s=Math.floor(n/(Math.PI/2))%4,a=-1);for(let A=0,c=s;A<4;A++,c=(c+a+4)%4){if(r=e[c],r===i)continue;let l=this.counterClockwise?r-n:n-r;if(l<0&&(l+=Ue.PIx2),l>this.sweep)break;t.push(new Ue.Arc(this.pc,this.r,i,r,this.counterClockwise)),i=r}return t.length===0?(t.push(this),t):(r=o,i!==r&&t.push(new Ue.Arc(this.pc,this.r,i,r,this.counterClockwise)),t)}tangentInStart(){let t=new Ue.Vector(this.pc,this.start),e=this.counterClockwise?Math.PI/2:-Math.PI/2;return t.rotate(e).normalize()}tangentInEnd(){let t=new Ue.Vector(this.pc,this.end),e=this.counterClockwise?-Math.PI/2:Math.PI/2;return t.rotate(e).normalize()}reverse(){return new Ue.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(t=new Ue.Matrix){let e=this.start.transform(t),n=this.end.transform(t),o=this.pc.transform(t),i=this.counterClockwise;return t.a*t.d<0&&(i=!i),Ue.Arc.arcSE(o,e,n,i)}static arcSE(t,e,n,o){let{vector:i}=Ue,r=i(t,e).slope,s=i(t,n).slope;Ue.Utils.EQ(r,s)&&(s+=2*Math.PI,o=!0);let a=i(t,e).length;return new Ue.Arc(t,a,r,s,o)}definiteIntegral(t=0){return this.breakToFunctional().reduce((o,i)=>o+i.circularSegmentDefiniteIntegral(t),0)}circularSegmentDefiniteIntegral(t){let n=new Ue.Segment(this.start,this.end).definiteIntegral(t),o=Ue.Utils.EQ(this.sweep,Ue.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?n-o:n+o}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(t){let{vector:e}=Ue;return t.slice().sort((n,o)=>{let i=e(this.pc,n).slope,r=e(this.pc,o).slope;return i<r?-1:i>r?1:0})}get name(){return"arc"}svg(t={}){let e=this.sweep<=Math.PI?"0":"1",n=this.counterClockwise?"1":"0";return Ue.Utils.EQ(this.sweep,2*Math.PI)?new Ue.Circle(this.pc,this.r).svg(t):`
<path d="M${this.start.x},${this.start.y}
                             A${this.r},${this.r} 0 ${e},${n} ${this.end.x},${this.end.y}"
                    ${HT({fill:"none",...t})} />`}};Ue.Arc=Aki;var cki=(...t)=>new Ue.Arc(...t);Ue.arc=cki;var lki=class tne extends HP{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new tne(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ue.Point(this.xmin,this.ymin)}get high(){return new Ue.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ue.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax<e.xmin||this.xmin>e.xmax||this.ymax<e.ymin||this.ymin>e.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new tne(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!(this.low.lessThan(e.low)||this.low.equalTo(e.low)&&this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)&&this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e<=0?this.clone():new tne(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ue.Point(this.xmin,this.ymin),new Ue.Point(this.xmax,this.ymin),new Ue.Point(this.xmax,this.ymax),new Ue.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ue.Segment(e[0],e[1]),new Ue.Segment(e[1],e[2]),new Ue.Segment(e[2],e[3]),new Ue.Segment(e[3],e[0])]}rotate(e,n=new Ue.Point){throw wd.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ue.Matrix){return this.toPoints().map(o=>o.transform(e)).reduce((o,i)=>o.merge(i.box),new tne)}contains(e){if(e instanceof Ue.Point)return e.x>=this.xmin&&e.x<=this.xmax&&e.y>=this.ymin&&e.y<=this.ymax;if(e instanceof Ue.Segment)return e.vertices.every(n=>this.contains(n));if(e instanceof Ue.Box)return e.toSegments().every(n=>this.contains(n));if(e instanceof Ue.Circle)return this.contains(e.box);if(e instanceof Ue.Arc)return e.vertices.every(n=>this.contains(n))&&this.toSegments().every(n=>OU(n,e).length===0);if(e instanceof Ue.Line||e instanceof Ue.Ray)return!1;if(e instanceof Ue.Multiline)return e.toShapes().every(n=>this.contains(n));if(e instanceof Ue.Polygon)return this.contains(e.box)}distanceTo(e){const n=this.toSegments().map(i=>i.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=>{i[0]<o[0]&&(o=i)}),o}get name(){return"box"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`
<rect x="${this.xmin}" y="${this.ymin}" width="${n}" height="${o}"
                ${HT({fill:"none",...e})} />`}};Ue.Box=lki;var uki=(...t)=>new Ue.Box(...t);Ue.box=uki;var gki=class{constructor(t){this.shape=t,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ue.Segment}get isArc(){return this.shape instanceof Ue.Arc}get isLine(){return this.shape instanceof Ue.Line}get isRay(){return this.shape instanceof Ue.Ray}middle(){return this.shape.middle()}pointAtLength(t){return this.shape.pointAtLength(t)}contains(t){return this.shape.contains(t)}setInclusion(t){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ue.Line||this.shape instanceof Ue.Ray)return this.bv=Ue.OUTSIDE,this.bv;if(this.bvStart===void 0&&(this.bvStart=aee(t,this.start)),this.bvEnd===void 0&&(this.bvEnd=aee(t,this.end)),this.bvStart===Ue.OUTSIDE||this.bvEnd==Ue.OUTSIDE)this.bv=Ue.OUTSIDE;else if(this.bvStart===Ue.INSIDE||this.bvEnd==Ue.INSIDE)this.bv=Ue.INSIDE;else{let e=aee(t,this.middle());this.bv=e}return this.bv}setOverlap(t){let e,n=this.shape,o=t.shape;n instanceof Ue.Segment&&o instanceof Ue.Segment?n.start.equalTo(o.start)&&n.end.equalTo(o.end)?e=Ue.OVERLAP_SAME:n.start.equalTo(o.end)&&n.end.equalTo(o.start)&&(e=Ue.OVERLAP_OPPOSITE):(n instanceof Ue.Arc&&o instanceof Ue.Arc||n instanceof Ue.Segment&&o instanceof Ue.Arc||n instanceof Ue.Arc&&o instanceof Ue.Segment)&&(n.start.equalTo(o.start)&&n.end.equalTo(o.end)&&n.middle().equalTo(o.middle())?e=Ue.OVERLAP_SAME:n.start.equalTo(o.end)&&n.end.equalTo(o.start)&&n.middle().equalTo(o.middle())&&(e=Ue.OVERLAP_OPPOSITE)),this.overlap===void 0&&(this.overlap=e),t.overlap===void 0&&(t.overlap=e)}svg(){if(this.shape instanceof Ue.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ue.Arc){let t=this.shape,e,n=t.counterClockwise?"1":"0";if(Ue.Utils.EQ(t.sweep,2*Math.PI)){let o=t.counterClockwise?1:-1,i=new Ue.Arc(t.pc,t.r,t.startAngle,t.startAngle+o*Math.PI,t.counterClockwise),r=new Ue.Arc(t.pc,t.r,t.startAngle+o*Math.PI,t.endAngle,t.counterClockwise);return e="0",` A${i.r},${i.r} 0 ${e},${n} ${i.end.x},${i.end.y}
                    A${r.r},${r.r} 0 ${e},${n} ${r.end.x},${r.end.y}`}else return e=t.sweep<=Math.PI?"0":"1",` A${t.r},${t.r} 0 ${e},${n} ${t.end.x},${t.end.y}`}}toJSON(){return this.shape.toJSON()}};Ue.Edge=gki;var dki=class extends Wje{constructor(t,e){super(t,e),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let t;return{next:()=>{let e=t||this.first,n=this.first?t?t===this.first:!1:!0;return t=e?e.next:void 0,{value:e,done:n}}}}append(t){return super.append(t),this.setCircularLinks(),this}insert(t,e){return super.insert(t,e),this.setCircularLinks(),this}remove(t){return super.remove(t),this}},hki=class nne extends dki{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=>i instanceof Ue.Point)){let i=nne.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=>i instanceof Array&&i.length===2)){let i=o.map(s=>new Ue.Point(s[0],s[1])),r=nne.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=>i instanceof Ue.Segment||i instanceof Ue.Arc))this.shapes2face(e.edges,o);else if(o.every(i=>i.name==="segment"||i.name==="arc")){let i=[];for(let r of o){let s;r.name==="segment"?s=new Ue.Segment(r):s=new Ue.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof nne){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ue.Circle)this.shapes2face(e.edges,[n[0].toArc(edn)]);else if(n[0]instanceof Ue.Box){let o=n[0];this.shapes2face(e.edges,[new Ue.Segment(new Ue.Point(o.xmin,o.ymin),new Ue.Point(o.xmax,o.ymin)),new Ue.Segment(new Ue.Point(o.xmax,o.ymin),new Ue.Point(o.xmax,o.ymax)),new Ue.Segment(new Ue.Point(o.xmax,o.ymax),new Ue.Point(o.xmin,o.ymax)),new Ue.Segment(new Ue.Point(o.xmin,o.ymax),new Ue.Point(o.xmin,o.ymin))])}}n.length===2&&n[0]instanceof Ue.Edge&&n[1]instanceof Ue.Edge&&(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=>e.shape.start.clone())}get shapes(){return this.edges.map(e=>e.shape.clone())}get box(){if(this._box===void 0){let e=new Ue.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e>this.perimeter||e<0)return null;let n=null;for(let o of this)if(e>=o.arc_length&&(o===this.last||e<o.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o<e.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ue.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ue.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0&&(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ue.Utils.EQ_0(e)?this._orientation=eee.NOT_ORIENTABLE:Ue.Utils.LT(e,0)?this._orientation=eee.CCW:this._orientation=eee.CW}return this._orientation}isSimple(e){return nne.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ue.Segment&&a.shape instanceof Ue.Segment&&(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if(!(c.equalTo(r.start)&&c.equalTo(a.end)&&a===r.prev)&&!(c.equalTo(r.end)&&c.equalTo(a.start)&&a===r.next)&&(i.push(c),o))break;if(i.length>0&&o)break}if(i.length>0&&o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)&&(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ue.Polygon(this.shapes)}toJSON(){return this.edges.map(e=>e.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=" z",e}};Ue.Face=hki;var pki=class b4n extends HP{constructor(...e){if(super(),this.pt=new Ue.Point,this.norm=new Ue.Vector(0,1),e.length!==0&&(e.length>=1&&e[0]instanceof Ue.Point&&(this.pt=e[0].clone()),e.length!==1)){if(e.length===2&&e[1]instanceof Ue.Vector){this.norm=e[1].clone();return}throw wd.ILLEGAL_PARAMETERS}}clone(){return new b4n(this.pt,this.norm)}get slope(){return new Ue.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ue.Box(e>Math.PI/2&&e<3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e>=0&&e<=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e>=Math.PI/2&&e<=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e>=Math.PI&&e<=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ue.Vector(this.pt,e);return Ue.Utils.EQ_0(this.norm.dot(n))&&Ue.Utils.GE(n.cross(this.norm),0)}coord(e){return Ldn(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ue.Segment(this.pt,e),new Ue.Ray(e,this.norm)]:[]}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Segment)return Xje(this,e);if(e instanceof Ue.Arc)return Zje(this,e);if(e instanceof Ue.Line)return Idn(this,e);if(e instanceof Ue.Ray)return yTi(this,e);if(e instanceof Ue.Circle)return fdn(this,e);if(e instanceof Ue.Box)return CTi(this,e);if(e instanceof Ue.Polygon)return Cdn(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}rotate(e,n=new Ue.Point){return new Ue.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ue.Ray(this.pt.transform(e),this.norm.clone())}get name(){return"ray"}svg(e,n={}){let o=new Ue.Line(this.pt,this.norm),i=HU(o,e);return i=i.filter(s=>this.contains(s)),i.length===0||i.length===2?"":new Ue.Segment(this.pt,i[0]).svg(n)}};Ue.Ray=pki;var mki=(...t)=>new Ue.Ray(...t);Ue.ray=mki;var _ki=class VM{constructor(){this.faces=new Ue.PlanarSet,this.edges=new Ue.PlanarSet;let e=[...arguments];if(e.length===1&&(e[0]instanceof Array&&e[0].length>0||e[0]instanceof Ue.Circle||e[0]instanceof Ue.Box)){let n=e[0];if(e[0]instanceof Array&&e[0].every(o=>o instanceof Array))if(n.every(o=>o instanceof Array&&o.length===2&&typeof o[0]=="number"&&typeof o[1]=="number"))this.faces.add(new Ue.Face(this,n));else for(let o of n)if(o instanceof Array&&o[0]instanceof Array&&o[0].every(i=>i instanceof Array&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"))for(let i of o)this.faces.add(new Ue.Face(this,i));else this.faces.add(new Ue.Face(this,o));else this.faces.add(new Ue.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=>e.merge(n.box),new Ue.Box)}get vertices(){return[...this.faces].flatMap(e=>e.vertices)}clone(){let e=new VM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new VM;return e.forEach(o=>[...o.faces].forEach(i=>n.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=>n+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ue.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next===n){this.deleteFace(e);return}for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ue.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e&&(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const o=this.splitToIslands().flatMap(i=>i._cutSingleIsland(e)).filter(i=>i.isValid()&&i.isEmpty()===!1);return this.createFromArray(o)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=pdn(a,A);for(let l of c)YU(a,l,i.int_points1),YU(A,l,i.int_points2)}if(i.int_points1.length===0)return n;i.int_points1_sorted=FP(i.int_points1),i.int_points2_sorted=FP(i.int_points2),KU(o,i.int_points1_sorted),KU(n,i.int_points2_sorted),e$e(i),i.int_points1_sorted=FP(i.int_points1),i.int_points2_sorted=FP(i.int_points2),t$e(i.int_points1),n$e(i.int_points1,n);for(let a of i.int_points1_sorted)a.edge_before&&a.edge_after&&a.edge_before.bv===a.edge_after.bv&&(i.int_points2[a.id]=-1,a.id=-1);if(i.int_points1=i.int_points1.filter(a=>a.id>=0),i.int_points2=i.int_points2.filter(a=>a.id>=0),i.int_points1.forEach((a,A)=>{a.id=A}),i.int_points2.forEach((a,A)=>{a.id=A}),i.int_points1.length===0)return n;i.int_points1_sorted=FP(i.int_points1),i.int_points2_sorted=FP(i.int_points2);let r,s;for(let a=1;a<i.int_points1_sorted.length;a++)if(s=i.int_points1_sorted[a],r=i.int_points1_sorted[a-1],s.edge_before&&s.edge_before.bv===q_e){let A=r.edge_after,c=s.edge_before,l=o.getChain(A,c);xdn(i.int_points2[r.id],i.int_points2[s.id],l),l.forEach(u=>n.edges.add(u)),l=l.reverse().map(u=>new Ue.Edge(u.shape.reverse()));for(let u=0;u<l.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];xdn(i.int_points2[s.id],i.int_points2[r.id],l),l.forEach(u=>n.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new GT([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=>r.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=>[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=>s.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size<=1)return this.clone();const e=this.splitToIslands(),n=new VM;return e.forEach(o=>{o.faces.forEach(i=>n.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?eee.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=>{this.isOuter(n)&&e++}),e>1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ue.Point){let n=aee(this,e);return n===q_e||n===W6}else return kdn(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle||e instanceof Ue.Line||e instanceof Ue.Segment||e instanceof Ue.Arc){let[n,o]=Ue.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Box)return this.distanceTo(new Ue.Polygon(e));if(e instanceof Ue.Polygon){let n=[Number.POSITIVE_INFINITY,new Ue.Segment],o,i;for(let r of this.edges){let s=n[0];[o,i]=Ue.Distance.shape2planarSet(r.shape,e.edges,s),Ue.Utils.LT(o,s)&&(n=[o,i])}return n}}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return oee(e,this);if(e instanceof Ue.Ray)return Cdn(e,this);if(e instanceof Ue.Circle)return hdn(e,this);if(e instanceof Ue.Segment)return $je(e,this);if(e instanceof Ue.Arc)return qje(e,this);if(e instanceof Ue.Polygon)return fTi(e,this);if(e instanceof Ue.Multiline)return _Ti(e,this)}translate(e){let n=new VM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.translate(e)));return n}rotate(e=0,n=new Ue.Point){let o=new VM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.rotate(e,n)));return o}scale(e,n){let o=new VM;for(let i of this.faces)o.addFace(i.shapes.map(r=>r.scale(e,n)));return o}transform(e=new Ue.Matrix){let n=new VM;for(let o of this.faces)n.addFace(o.shapes.map(i=>i.transform(e)));return n}toJSON(){return[...this.faces].map(e=>e.toJSON())}toArray(){return[...this.faces].map(e=>e.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=>e+n.svg(),"")}svg(e={}){let n=`
<path ${HT({fillRule:"evenodd",fill:"lightcyan",...e})} d="`;for(let o of this.faces)n+=`
${o.svg()}`;return n+=`" >
</path>`,n}};Ue.Polygon=_ki;var fki=(...t)=>new Ue.Polygon(...t);Ue.polygon=fki;var{Circle:c$e,Line:Hdn,Point:Odn,Vector:ife,Utils:l$e}=Ue,Iki=class jye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new ife(e.pc,n),i=e.r*e.r,r=o.dot(o);return l$e.EQ_0(r)?new Odn(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(l$e.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new ife(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new Hdn(s,r)}else{let i=new ife(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new c$e(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(l$e.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new ife(e.pc,i.end);return s=s.multiply(r/o),new c$e(e.pc.translate(s),r)}}inverse(e){if(e instanceof Odn)return jye.inversePoint(this.circle,e);if(e instanceof c$e)return jye.inverseCircle(this.circle,e);if(e instanceof Hdn)return jye.inverseLine(this.circle,e)}};Ue.Inversion=Iki;var Cki=t=>new Ue.Inversion(t);Ue.inversion=Cki;var yki=class Fr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ue.Vector(e,o).length,new Ue.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ue.Utils.EQ_0(o))return[n.r,new Ue.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ue.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ue.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return Fr.point2point(e,n.start);let o=new Ue.Vector(n.start,n.end),i=new Ue.Vector(n.start,e),r=new Ue.Vector(n.end,e),s=o.dot(i),a=-o.dot(r),A,c;if(Ue.Utils.GE(s,0)&&Ue.Utils.GE(a,0)){let l=n.tangentInStart();return A=Math.abs(l.cross(i)),c=n.start.translate(l.multiply(l.dot(i))),[A,new Ue.Segment(e,c)]}else return s<0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o=new Ue.Circle(n.pc,n.r),i=[],r,s;return[r,s]=Fr.point2circle(e,o),s.end.on(n)&&i.push(Fr.point2circle(e,o)),i.push(Fr.point2point(e,n.start)),i.push(Fr.point2point(e,n.end)),Fr.sort(i),i[0]}static point2edge(e,n){return n.shape instanceof Ue.Segment?Fr.point2segment(e,n.shape):Fr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let i=[];return i.push(Fr.point2line(e.start,n)),i.push(Fr.point2line(e.end,n)),Fr.sort(i),i[0]}static segment2segment(e,n){let o=efe(e,n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let i=[],r,s;return[r,s]=Fr.point2segment(n.start,e),i.push([r,s.reverse()]),[r,s]=Fr.point2segment(n.end,e),i.push([r,s.reverse()]),i.push(Fr.point2segment(e.start,n)),i.push(Fr.point2segment(e.end,n)),Fr.sort(i),i[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Line(e.ps,e.pe),[r,s]=Fr.point2line(n.center,i);if(Ue.Utils.GE(r,n.r)&&s.end.on(e))return Fr.point2circle(s.end,n);{let[a,A]=Fr.point2circle(e.start,n),[c,l]=Fr.point2circle(e.end,n);return Ue.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Line(e.ps,e.pe),r=new Ue.Circle(n.pc,n.r),[s,a]=Fr.point2line(r.center,i);if(Ue.Utils.GE(s,r.r)&&a.end.on(e)){let[u,g]=Fr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A=[];A.push(Fr.point2arc(e.start,n)),A.push(Fr.point2arc(e.end,n));let c,l;return[c,l]=Fr.point2segment(n.start,e),A.push([c,l.reverse()]),[c,l]=Fr.point2segment(n.end,e),A.push([c,l.reverse()]),Fr.sort(A),A[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return Fr.point2point(i.start,r.start)}else{let i=new Ue.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(Fr.point2point(r[0],s[0])),a.push(Fr.point2point(r[0],s[1])),a.push(Fr.point2point(r[1],s[0])),a.push(Fr.point2point(r[1],s[1])),Fr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let[i,r]=Fr.point2line(e.center,n),[s,a]=Fr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Circle(e.center,e.r),[r,s]=Fr.point2line(i.center,n);if(Ue.Utils.GE(r,i.r)){let[a,A]=Fr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}else{let a=[];return a.push(Fr.point2line(e.start,n)),a.push(Fr.point2line(e.end,n)),Fr.sort(a),a[0]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Circle(e.center,e.r),[r,s]=Fr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(Fr.point2circle(e.start,n)),a.push(Fr.point2circle(e.end,n)),Fr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length>0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Circle(e.center,e.r),r=new Ue.Circle(n.center,n.r),[s,a]=Fr.circle2circle(i,r);if(a.start.on(e)&&a.end.on(n))return[s,a];{let A=[],c,l;return[c,l]=Fr.point2arc(e.start,n),l.end.on(n)&&A.push([c,l]),[c,l]=Fr.point2arc(e.end,n),l.end.on(n)&&A.push([c,l]),[c,l]=Fr.point2arc(n.start,e),l.end.on(e)&&A.push([c,l.reverse()]),[c,l]=Fr.point2arc(n.end,e),l.end.on(e)&&A.push([c,l.reverse()]),[c,l]=Fr.point2point(e.start,n.start),A.push([c,l]),[c,l]=Fr.point2point(e.start,n.end),A.push([c,l]),[c,l]=Fr.point2point(e.end,n.start),A.push([c,l]),[c,l]=Fr.point2point(e.end,n.end),A.push([c,l]),Fr.sort(A),A[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n.edges){let[r,s]=Fr.point2edge(e,i);Ue.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ue.Utils.LT(r,o[0])&&(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ue.Utils.LT(s,o[0])&&(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin,c=a*a+A*A;return[r,c]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let l of n){[r,s]=Fr.box2box_minmax(e.box,l.item.key);for(let u of l.item.values)u instanceof Ue.Edge?i.insert([r,s],u.shape):i.insert([r,s],u);Ue.Utils.LT(s,o)&&(o=s)}if(n.length===0)return o;let a=n.map(l=>l.left.isNil()?void 0:l.left).filter(l=>l!==void 0),A=n.map(l=>l.right.isNil()?void 0:l.right).filter(l=>l!==void 0),c=[...a,...A].filter(l=>{let[u,g]=Fr.box2box_minmax(e.box,l.max);return Ue.Utils.LE(u,o)});return o=Fr.minmax_tree_process_level(e,c,o,i),o}static minmax_tree(e,n,o){let i=new A$e,r=[n.index.root],s=o<Number.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=Fr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null&&!n.isNil()){if([i,r]=Fr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ue.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=Fr.distanceToArray(e,n.item.values);return Ue.Utils.LT(s,i[0])&&(i=[s,a]),[i,r]=Fr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ue.Segment],r=!1;if(n instanceof Ue.PlanarSet){let s=Fr.minmax_tree(e,n,o);[i,r]=Fr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=>Ue.Utils.LT(n[0],o[0])?-1:Ue.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ue.Utils.LT(r,o[0])&&(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n){let[r,s]=Fr.distance(e,i.shape);Ue.Utils.LT(r,o[0])&&(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of e)for(let r of n){let[s,a]=Fr.distance(i.shape,r.shape);Ue.Utils.LT(s,o[0])&&(o=[s,a])}return o}};Ue.Distance=yki;var{Multiline:xki,Point:Gdn,Segment:Eki,Polygon:Ydn}=Ue;function u$e(t){return new Gdn(t.split(" ").map(Number))}function Udn(t){return t.split(", ").map(u$e)}function g$e(t){const e=Udn(t);let n=[];for(let o=0;o<e.length-1;o++)n.push(new Eki(e[o],e[o+1]));return new xki(n)}function Bki(t){return t.replace(/\(\(/,"").replace(/\)\)$/,"").split("), (").map(g$e)}function Kdn(t){const e=t.replace(/\(\(/,"").replace(/\)\)$/,"").split("), ("),n=new Ydn;let o;return e.forEach((i,r)=>{let s=i.split(", ").map(A=>new Gdn(A.split(" ").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o&&a.reverse()}),n}function bki(t){const n=t.split(/\)\), \(\(/).map(r=>"(("+r+"))").map(Kdn),o=new Ydn;return n.reduce((r,s)=>[...r,...s?.faces],[]).forEach(r=>o.addFace([...r?.shapes])),o}function Ski(t){if(t.startsWith("POLYGON")){const e=t.replace(/^POLYGON /,"");return Kdn(e)}else{const e=t.replace(/^MULTIPOLYGON \(\(\((.*)\)\)\)$/,"$1");return bki(e)}}function Qki(t){return t.split(`
`).map(n=>n.match(/\(([^)]+)\)/)[1]).map(u$e)}function vki(t){return t.split(`
`).map(n=>n.match(/\(([^)]+)\)/)[1]).map(g$e).reduce((n,o)=>[...n,...o],[])}function Vdn(t){if(t.startsWith("POINT")){const e=t.replace(/^POINT \(/,"").replace(/\)$/,"");return u$e(e)}else if(t.startsWith("MULTIPOINT")){const e=t.replace(/^MULTIPOINT \(/,"").replace(/\)$/,"");return Udn(e)}else if(t.startsWith("LINESTRING")){const e=t.replace(/^LINESTRING \(/,"").replace(/\)$/,"");return g$e(e)}else if(t.startsWith("MULTILINESTRING")){const e=t.replace(/^MULTILINESTRING /,"");return Bki(e)}else{if(t.startsWith("POLYGON")||t.startsWith("MULTIPOLYGON"))return Ski(t);if(t.startsWith("GEOMETRYCOLLECTION")){const e=/(?<type>POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \((?:[^\(\)]|\([^\)]*\))*\)/g,n=t.match(e);return n[0].startsWith("GEOMETRYCOLLECTION")&&(n[0]=n[0].replace("GEOMETRYCOLLECTION (","")),n.map(Vdn).map(i=>i instanceof Array?i:[i]).reduce((i,r)=>[...i,...r],[])}else{if(zdn(t))return Qki(t);if(Jdn(t))return vki(t)}}return[]}function zdn(t){return t.split(`
`)?.every(e=>e.includes("POINT"))}function Jdn(t){return t.split(`
`)?.every(e=>e.includes("LINESTRING"))}function wki(t){return t.startsWith("POINT")||zdn(t)||t.startsWith("LINESTRING")||Jdn(t)||t.startsWith("MULTILINESTRING")||t.startsWith("POLYGON")||t.startsWith("MULTIPOINT")||t.startsWith("MULTIPOLYGON")||t.startsWith("GEOMETRYCOLLECTION")}Ue.isWktString=wki,Ue.parseWKT=Vdn,Ue.BooleanOperations=RTi,Ue.Relations=WTi;function Wdn(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}function jdn(t,e){if(!e.subcircuit_id&&!e.source_group_id)return[...t];let n=e;if(e.subcircuit_id){const a=new Set([e.subcircuit_id]),A=new Map,c=new Map;for(const u of t)if(u.type==="source_group"){const g=u.source_group_id,h=u.subcircuit_id;h&&c.set(g,h);const d=u.parent_source_group_id;d&&(A.has(d)||A.set(d,[]),A.get(d).push(g))}let l;for(const[u,g]of c)if(g===e.subcircuit_id){l=u;break}if(l){const u=g=>{const h=A.get(g)||[];for(const d of h){const p=c.get(d);p&&a.add(p),u(d)}};u(l),n={...e,subcircuit_ids:Array.from(a)}}}const o=new Map;for(const a of t){const A=`${a.type}_id`,c=a[A];typeof c=="string"&&o.set(c,a)}const i=new Map;for(const a of t){const A=Object.entries(a);for(const[c,l]of A)if(c!=="parent_source_group_id"){if(c.endsWith("_id")&&typeof l=="string"){const u=o.get(l);Wdn(i,a,u)}else if(c.endsWith("_ids")&&Array.isArray(l)){for(const u of l)if(typeof u=="string"){const g=o.get(u);Wdn(i,a,g)}}}}const r=[],s=new Set;for(const a of t){let A=!1;(n.subcircuit_id&&"subcircuit_id"in a&&a.subcircuit_id===n.subcircuit_id||n.subcircuit_ids&&"subcircuit_id"in a&&a.subcircuit_id&&n.subcircuit_ids.includes(a.subcircuit_id)||n.source_group_id&&"source_group_id"in a&&a.source_group_id===n.source_group_id||n.source_group_id&&"member_source_group_ids"in a&&Array.isArray(a.member_source_group_ids)&&a.member_source_group_ids.includes(n.source_group_id))&&(A=!0),A&&(r.push(a),s.add(a))}for(;r.length>0;){const a=r.shift(),A=i.get(a);if(A)for(const c of A)s.has(c)||(s.add(c),r.push(c))}return t.filter(a=>s.has(a))}var rfe=(t,e={})=>{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split("_").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=>{if(s==="toArray")return()=>(n.editCount=o.editCount,n);if(s==="editCount")return o.editCount;if(s==="subtree")return A=>rfe(jdn(n,A),e);if(s==="insert")return A=>{const c=A.type;if(!c)throw new Error("insert requires an element with a type");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts&&(R9[c]??U4).parse(u),n.push(u),o.editCount++,u};if(s==="insertAll")return A=>A.map(c=>i.insert(c));const a=s;return{get:A=>n.find(c=>c.type===a&&c[`${a}_id`]===A),getUsing:A=>{const c=Object.keys(A);if(c.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const l=c[0],u=l.replace("_id",""),g=n.find(h=>h.type===u&&h[l]===A[l]);return g?n.find(h=>h.type===a&&h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=>{const c=Object.keys(A);return n.find(l=>l.type===a&&c.every(u=>l[u]===A[u]))},list:A=>{const c=A?Object.keys(A):[];return n.filter(l=>l.type===a&&c.every(u=>l[u]===A[u]))},insert:A=>{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts&&(R9[a]??U4).parse(l),n.push(l),o.editCount++,l},delete:A=>{const c=n.find(l=>l[`${a}_id`]===A);c&&(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=>{const l=n.find(u=>u.type===a&&u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=>{if(a==="source_component")return n.find(c=>c.type==="source_component"&&c.name===A.replace(/\./g,""));if(a==="pcb_port"||a==="source_port"||a==="schematic_port"){const[c,l]=A.replace(/\./g,"").split(/[\s\>]+/),u=n.find(h=>h.type==="source_component"&&h.name===c);if(!u)return null;const g=n.find(h=>h.type==="source_port"&&h.source_component_id===u.source_component_id&&(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a==="source_port")return g;if(a==="pcb_port")return n.find(h=>h.type==="pcb_port"&&h.source_port_id===g.source_port_id);if(a==="schematic_port")return n.find(h=>h.type==="schematic_port"&&h.source_port_id===g.source_port_id)}}}}});return i};rfe.unparsed=rfe;var wS=rfe;function d$e(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var h$e=(t,e={})=>{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const s of t){const a=s.type,A=s[`${a}_id`];if(!A)continue;const c=Number.parseInt(A.split("_").pop()||"");Number.isNaN(c)||(n.counts[a]=Math.max(n.counts[a]??0,c))}const i=e.indexConfig||{},r=n.indexes;if(i.byId&&(r.byId=new Map),i.byType&&(r.byType=new Map),i.byRelation&&(r.byRelation=new Map),i.bySubcircuit&&(r.bySubcircuit=new Map),i.byCustomField&&i.byCustomField.length>0){r.byCustomField=new Map;for(const s of i.byCustomField)r.byCustomField.set(s,new Map)}for(const s of t){if(i.byId){const a=d$e(s);r.byId.set(a,s)}if(i.byType){const a=r.byType.get(s.type)||[];a.push(s),r.byType.set(s.type,a)}if(i.byRelation){const a=Object.entries(s);for(const[A,c]of a)if(A.endsWith("_id")&&A!==`${s.type}_id`&&typeof c=="string"){const l=r.byRelation.get(A)||new Map,u=l.get(c)||[];u.push(s),l.set(c,u),r.byRelation.set(A,l)}}if(i.bySubcircuit&&"subcircuit_id"in s){const a=s.subcircuit_id;if(a&&typeof a=="string"){const A=r.bySubcircuit.get(a)||[];A.push(s),r.bySubcircuit.set(a,A)}}if(i.byCustomField&&r.byCustomField){for(const a of i.byCustomField)if(a in s){const A=s[a];if(A!==void 0&&(typeof A=="string"||typeof A=="number")){const c=String(A),l=r.byCustomField.get(a),u=l.get(c)||[];u.push(s),l.set(c,u)}}}}t._internal_store_indexed=n}const o=new Proxy({},{get:(i,r)=>{if(r==="toArray")return()=>(t.editCount=n.editCount,t);if(r==="editCount")return n.editCount;if(r==="insert")return a=>{const{type:A,...c}=a;if(!A)throw new Error("insert requires an element with a type");return delete c[`${A}_id`],o[A].insert(c)};if(r==="insertAll")return a=>a.map(A=>o.insert(A));if(r==="subtree")return a=>h$e(jdn(t,a),e);const s=r;return{get:a=>{const A=e.indexConfig||{};return A.byId&&n.indexes.byId?n.indexes.byId.get(`${s}:${a}`)||null:A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(l=>l[`${s}_id`]===a)||null:t.find(c=>c.type===s&&c[`${s}_id`]===a)||null},getUsing:a=>{const A=e.indexConfig||{},c=Object.keys(a);if(c.length!==1)throw new Error("getUsing requires exactly one key, e.g. { pcb_component_id }");const l=c[0],u=l.replace("_id","");if(A.byRelation&&n.indexes.byRelation){const h=n.indexes.byRelation.get(l);if(h){const p=(h.get(a[l])||[]).find(_=>_.type===u);if(!p)return null;const m=p[`${s}_id`];return A.byId&&n.indexes.byId?n.indexes.byId.get(`${s}:${m}`)||null:A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(f=>f[`${s}_id`]===m)||null:t.find(_=>_.type===s&&_[`${s}_id`]===m)||null}}const g=t.find(h=>h.type===u&&h[l]===a[l]);return g&&t.find(h=>h.type===s&&h[`${s}_id`]===g[`${s}_id`])||null},getWhere:a=>{const A=e.indexConfig||{},c=Object.keys(a);if(c.length===1&&A.byCustomField&&n.indexes.byCustomField){const l=c[0],u=n.indexes.byCustomField.get(l);if(u){const g=String(a[l]);return(u.get(g)||[]).find(d=>d.type===s)||null}}if("subcircuit_id"in a&&A.bySubcircuit&&n.indexes.bySubcircuit){const l=a.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).find(g=>g.type===s&&c.every(h=>g[h]===a[h]))||null}return A.byType&&n.indexes.byType?(n.indexes.byType.get(s)||[]).find(u=>c.every(g=>u[g]===a[g]))||null:t.find(l=>l.type===s&&c.every(u=>l[u]===a[u]))||null},list:a=>{const A=e.indexConfig||{},c=a?Object.keys(a):[];if(c.length===0&&A.byType&&n.indexes.byType)return(n.indexes.byType.get(s)||[]).slice();if(c.length===1&&c[0]==="subcircuit_id"&&A.bySubcircuit&&n.indexes.bySubcircuit){const u=a.subcircuit_id;return(n.indexes.bySubcircuit.get(u)||[]).filter(h=>h.type===s)}let l;return A.byType&&n.indexes.byType?l=n.indexes.byType.get(s)||[]:l=t.filter(u=>u.type===s),c.length>0?l.filter(u=>c.every(g=>u[g]===a[g])):l.slice()},insert:a=>{n.counts[s]??=-1,n.counts[s]++;const A=n.counts[s],c={type:s,[`${s}_id`]:`${s}_${A}`,...a};e.validateInserts&&(R9[s]??U4).parse(c),t.push(c),n.editCount++;const l=e.indexConfig||{};if(l.byId&&n.indexes.byId){const u=d$e(c);n.indexes.byId.set(u,c)}if(l.byType&&n.indexes.byType){const u=n.indexes.byType.get(s)||[];u.push(c),n.indexes.byType.set(s,u)}if(l.byRelation&&n.indexes.byRelation){const u=Object.entries(c);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${c.type}_id`&&typeof h=="string"){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.push(c),d.set(h,p),n.indexes.byRelation.set(g,d)}}if(l.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c){const u=c.subcircuit_id;if(u&&typeof u=="string"){const g=n.indexes.bySubcircuit.get(u)||[];g.push(c),n.indexes.bySubcircuit.set(u,g)}}if(l.byCustomField&&n.indexes.byCustomField){for(const u of l.byCustomField)if(u in c){const g=c[u];if(g!==void 0&&(typeof g=="string"||typeof g=="number")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.push(c),d.set(h,p)}}}return c},delete:a=>{const A=e.indexConfig||{};let c;if(A.byId&&n.indexes.byId?c=n.indexes.byId.get(`${s}:${a}`):A.byType&&n.indexes.byType?c=(n.indexes.byType.get(s)||[]).find(g=>g[`${s}_id`]===a):c=t.find(u=>u[`${s}_id`]===a),!c)return;const l=t.indexOf(c);if(l>=0&&(t.splice(l,1),n.editCount++),A.byId&&n.indexes.byId){const u=d$e(c);n.indexes.byId.delete(u)}if(A.byType&&n.indexes.byType){const g=(n.indexes.byType.get(s)||[]).filter(h=>h[`${s}_id`]!==a);n.indexes.byType.set(s,g)}if(A.byRelation&&n.indexes.byRelation)for(const[u,g]of n.indexes.byRelation.entries())for(const[h,d]of g.entries()){const p=d.filter(m=>m!==c);p.length===0?g.delete(h):g.set(h,p)}if(A.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in c){const u=c.subcircuit_id;if(u){const h=(n.indexes.bySubcircuit.get(u)||[]).filter(d=>d!==c);h.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,h)}}if(A.byCustomField&&n.indexes.byCustomField)for(const u of n.indexes.byCustomField.values())for(const[g,h]of u.entries()){const d=h.filter(p=>p!==c);d.length===0?u.delete(g):u.set(g,d)}},update:(a,A)=>{const c=e.indexConfig||{};let l;if(c.byId&&n.indexes.byId?l=n.indexes.byId.get(`${s}:${a}`):c.byType&&n.indexes.byType?l=(n.indexes.byType.get(s)||[]).find(g=>g[`${s}_id`]===a):l=t.find(u=>u.type===s&&u[`${s}_id`]===a),!l)return null;if(c.byRelation&&n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${l.type}_id`&&typeof h=="string"&&g in A&&A[g]!==h){const d=n.indexes.byRelation.get(g);if(d){const m=(d.get(h)||[]).filter(_=>_!==l);m.length===0?d.delete(h):d.set(h,m)}}}if(c.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in l&&"subcircuit_id"in A){const u=l.subcircuit_id,g=A.subcircuit_id;if(u!==g){const d=(n.indexes.bySubcircuit.get(u)||[]).filter(p=>p!==l);d.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,d)}}if(c.byCustomField&&n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l&&u in A&&l[u]!==A[u]){const g=n.indexes.byCustomField.get(u);if(g){const h=String(l[u]),p=(g.get(h)||[]).filter(m=>m!==l);p.length===0?g.delete(h):g.set(h,p)}}}if(Object.assign(l,A),n.editCount++,c.byRelation&&n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith("_id")&&g!==`${l.type}_id`&&typeof h=="string"&&g in A){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p),n.indexes.byRelation.set(g,d))}}if(c.bySubcircuit&&n.indexes.bySubcircuit&&"subcircuit_id"in l&&"subcircuit_id"in A){const u=l.subcircuit_id;if(u&&typeof u=="string"){const g=n.indexes.bySubcircuit.get(u)||[];g.includes(l)||(g.push(l),n.indexes.bySubcircuit.set(u,g))}}if(c.byCustomField&&n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l&&u in A){const g=l[u];if(g!==void 0&&(typeof g=="string"||typeof g=="number")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p))}}}return l},select:a=>{if(s==="source_component")return t.find(A=>A.type==="source_component"&&A.name===a.replace(/\./g,""))||null;if(s==="pcb_port"||s==="source_port"||s==="schematic_port"){const[A,c]=a.replace(/\./g,"").split(/[\s\>]+/),l=t.find(g=>g.type==="source_component"&&g.name===A);if(!l)return null;const u=t.find(g=>g.type==="source_port"&&g.source_component_id===l.source_component_id&&(g.name===c||(g.port_hints??[]).includes(c)));if(!u)return null;if(s==="source_port")return u;if(s==="pcb_port")return t.find(g=>g.type==="pcb_port"&&g.source_port_id===u.source_port_id)||null;if(s==="schematic_port")return t.find(g=>g.type==="schematic_port"&&g.source_port_id===u.source_port_id)||null}return null}}}});return o};h$e.unparsed=h$e;var Pki=t=>Math.round(t/(Math.PI/2)),Mki=t=>{switch(t){case"from_left":return{x:-1,y:0};case"from_right":return{x:1,y:0};case"from_top":return{x:0,y:1};case"from_bottom":return{x:0,y:-1}}},Dki=({x:t,y:e})=>t>0?"from_right":t<0?"from_left":e>0?"from_top":"from_bottom",Nki=(t,e)=>{if(!t)return t;if(t==="from_above"||t==="from_below")return e.isFlipped?t==="from_above"?"from_below":"from_above":t;let{x:n,y:o}=Mki(t),i=Math.round(e.rotationDegrees/90);for(;i>0;)[n,o]=[-o,n],i--;for(;i<0;)[n,o]=[o,-n],i++;return e.isFlipped&&(o=-o),Dki({x:n,y:o})},Rki=(t,e)=>{const n=MNi(e),o=Math.abs(Pki(n.rotation.angle))%2===1,i=n.rotation.angle/Math.PI*180,r=n.scale.sy<0;if(t.type==="pcb_plated_hole"||t.type==="pcb_hole"||t.type==="pcb_via"||t.type==="pcb_smtpad"||t.type==="pcb_solder_paste"||t.type==="pcb_port"){const{x:s,y:a}=_i(e,{x:Number(t.x),y:Number(t.y)});t.x=s,t.y=a,t.type==="pcb_smtpad"&&t.shape==="polygon"&&Array.isArray(t.points)&&(t.points=t.points.map(A=>{const c=_i(e,{x:A.x,y:A.y});return{x:c.x,y:c.y}}))}else if(t.type==="pcb_keepout"||t.type==="pcb_board")t.center=_i(e,t.center);else if(t.type==="pcb_silkscreen_text"||t.type==="pcb_fabrication_note_text"||t.type==="pcb_note_text")t.anchor_position=_i(e,t.anchor_position);else if(t.type==="pcb_copper_text")t.anchor_position&&(t.anchor_position=_i(e,t.anchor_position));else if(t.type==="pcb_courtyard_rect")t.center=_i(e,t.center),t.ccw_rotation=((t.ccw_rotation??0)+i)%360;else if(t.type==="pcb_silkscreen_circle"||t.type==="pcb_silkscreen_rect"||t.type==="pcb_silkscreen_pill"||t.type==="pcb_silkscreen_oval"||t.type==="pcb_note_rect"||t.type==="pcb_courtyard_circle")t.center=_i(e,t.center);else if(t.type==="pcb_component")t.center=_i(e,t.center),t.rotation=t.rotation+i,t.rotation=t.rotation%360,t.cable_insertion_center&&(t.cable_insertion_center=_i(e,t.cable_insertion_center)),t.insertion_direction=Nki(t.insertion_direction,{rotationDegrees:i,isFlipped:r}),o&&([t.width,t.height]=[t.height,t.width]);else if(t.type==="pcb_courtyard_outline")t.outline=t.outline.map(s=>{const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_courtyard_polygon")t.points=t.points.map(s=>{const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_trace")t.route=t.route.map(s=>{if(!("x"in s))return s.start=_i(e,s.start),s.end=_i(e,s.end),s;const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_silkscreen_path"||t.type==="pcb_trace_hint"||t.type==="pcb_fabrication_note_path"||t.type==="pcb_note_path")t.route=t.route.map(s=>{const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type==="pcb_silkscreen_line"||t.type==="pcb_note_line"){const s={x:t.x1,y:t.y1},a={x:t.x2,y:t.y2},A=_i(e,s),c=_i(e,a);t.x1=A.x,t.y1=A.y,t.x2=c.x,t.y2=c.y}else if(t.type==="cad_component"){const s=_i(e,{x:t.position.x,y:t.position.y});t.position.x=s.x,t.position.y=s.y}return t},Tki=t=>{const e=t.type;return t[`${e}_id`]},p$e=(t,e)=>({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),lee=(t,e,n)=>{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},$dn=(t,e,n,o,i)=>{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=>({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=>u.x)),minY:Math.min(...l.map(u=>u.y)),maxX:Math.max(...l.map(u=>u.x)),maxY:Math.max(...l.map(u=>u.y))}},kki=(t,e,n,o,i)=>{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=Math.hypot(r*A,s*c),u=Math.hypot(r*c,s*A);return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},Fki=(t,e,n,o,i)=>{const r=Math.min(n,o)/2,s=Math.max(n,o)/2-r,a=i*Math.PI/180,A=n>=o?{x:s,y:0}:{x:0,y:s},c={x:A.x*Math.cos(a)-A.y*Math.sin(a),y:A.x*Math.sin(a)+A.y*Math.cos(a)},l=Math.abs(c.x)+r,u=Math.abs(c.y)+r;return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},sfe=t=>t.length===0?null:{minX:Math.min(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxX:Math.max(...t.map(e=>e.x)),maxY:Math.max(...t.map(e=>e.y))},m$e=t=>Array.isArray(t)?t.flatMap(e=>!e||typeof e!="object"?[]:"x"in e&&"y"in e&&typeof e.x=="number"&&typeof e.y=="number"?[{x:e.x,y:e.y}]:"start"in e&&"end"in e?[e.start,e.end].filter(o=>!!(o&&typeof o=="object"&&"x"in o&&"y"in o&&typeof o.x=="number"&&typeof o.y=="number")):[]):[],Lki=t=>{if(!t.type.startsWith("pcb_"))return null;if(t.type==="pcb_smtpad"&&t.shape==="polygon"&&Array.isArray(t.points))return sfe(t.points);if(t.type==="pcb_hole"&&t.hole_shape==="circle")return lee(t.x,t.y,t.hole_diameter);if(t.type==="pcb_plated_hole"){let u;if("outer_diameter"in t&&typeof t.outer_diameter=="number"?u=lee(t.x,t.y,t.outer_diameter):"hole_diameter"in t&&typeof t.hole_diameter=="number"&&(u=lee(t.x,t.y,t.hole_diameter)),(t.shape==="oval"||t.shape==="pill")&&typeof t.outer_width=="number"&&typeof t.outer_height=="number"&&(u=(t.shape==="pill"?Fki:kki)(t.x,t.y,t.outer_width,t.outer_height,t.ccw_rotation??0)),"rect_pad_width"in t&&typeof t.rect_pad_width=="number"&&"rect_pad_height"in t&&typeof t.rect_pad_height=="number"){const g=$dn(t.x,t.y,t.rect_pad_width,t.rect_pad_height,"rect_ccw_rotation"in t?t.rect_ccw_rotation??0:0);u=u?p$e(u,g):g}if("hole_diameter"in t&&typeof t.hole_diameter=="number"){const g=lee(t.x+("hole_offset_x"in t?t.hole_offset_x??0:0),t.y+("hole_offset_y"in t?t.hole_offset_y??0:0),t.hole_diameter);u=u?p$e(u,g):g}if(u)return u}const e=t,n=sfe(m$e(e.route));if(n)return n;const o=sfe(m$e(e.outline));if(o)return o;const i=sfe(m$e(e.points));if(i)return i;let r,s,a,A;"x"in t&&"y"in t&&(r=Number(t.x),s=Number(t.y)),"outer_diameter"in t&&(a=Number(t.outer_diameter),A=Number(t.outer_diameter)),"width"in t&&(a=Number(t.width)),"height"in t&&(A=Number(t.height)),"center"in t&&t.center&&typeof t.center=="object"&&"x"in t.center&&"y"in t.center&&(r=Number(t.center.x),s=Number(t.center.y));let c=0;if("rotation"in t&&typeof t.rotation=="number"&&(c=t.rotation),"ccw_rotation"in t&&typeof t.ccw_rotation=="number"&&(c=t.ccw_rotation),r!==void 0&&s!==void 0)return a!==void 0&&A!==void 0?c?$dn(r,s,a,A,c):{minX:r-a/2,minY:s-A/2,maxX:r+a/2,maxY:s+A/2}:"radius"in t&&typeof t.radius=="number"?lee(r,s,t.radius*2):{minX:r,minY:s,maxX:r,maxY:s};const l=[e.anchor_position,e.position].filter(u=>!!(u&&typeof u=="object"&&"x"in u&&"y"in u&&typeof u.x=="number"&&typeof u.y=="number")).at(0);return l?{minX:l.x,minY:l.y,maxX:l.x,maxY:l.y}:null},_$e=t=>{let e={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};for(const n of t){const o=Lki(n);o&&(e=p$e(e,o))}return e};function Hki(t){let e=0;if(t.length==0)return e;for(var n=0;n<t.length;n++){var o=t.charCodeAt(n);e=(e<<5)-e+o,e=e&e}return Math.abs(e)}var qdn=[["#69d2e7","#a7dbd8","#e0e4cc","#f38630","#fa6900"],["#fe4365","#fc9d9a","#f9cdad","#c8c8a9","#83af9b"],["#ecd078","#d95b43","#c02942","#542437","#53777a"],["#556270","#4ecdc4","#c7f464","#ff6b6b","#c44d58"],["#774f38","#e08e79","#f1d4af","#ece5ce","#c5e0dc"],["#e8ddcb","#cdb380","#036564","#033649","#031634"],["#490a3d","#bd1550","#e97f02","#f8ca00","#8a9b0f"],["#594f4f","#547980","#45ada8","#9de0ad","#e5fcc2"],["#00a0b0","#6a4a3c","#cc333f","#eb6841","#edc951"],["#e94e77","#d68189","#c6a49a","#c6e5d9","#f4ead5"],["#3fb8af","#7fc7af","#dad8a7","#ff9e9d","#ff3d7f"],["#d9ceb2","#948c75","#d5ded9","#7a6a53","#99b2b7"],["#ffffff","#cbe86b","#f2e9e1","#1c140d","#cbe86b"],["#efffcd","#dce9be","#555152","#2e2633","#99173c"],["#343838","#005f6b","#008c9e","#00b4cc","#00dffc"],["#413e4a","#73626e","#b38184","#f0b49e","#f7e4be"],["#ff4e50","#fc913a","#f9d423","#ede574","#e1f5c4"],["#99b898","#fecea8","#ff847c","#e84a5f","#2a363b"],["#655643","#80bca3","#f6f7bd","#e6ac27","#bf4d28"],["#00a8c6","#40c0cb","#f9f2e7","#aee239","#8fbe00"],["#351330","#424254","#64908a","#e8caa4","#cc2a41"],["#554236","#f77825","#d3ce3d","#f1efa5","#60b99a"],["#5d4157","#838689","#a8caba","#cad7b2","#ebe3aa"],["#8c2318","#5e8c6a","#88a65e","#bfb35a","#f2c45a"],["#fad089","#ff9c5b","#f5634a","#ed303c","#3b8183"],["#ff4242","#f4fad2","#d4ee5e","#e1edb9","#f0f2eb"],["#f8b195","#f67280","#c06c84","#6c5b7b","#355c7d"],["#d1e751","#ffffff","#000000","#4dbce9","#26ade4"],["#1b676b","#519548","#88c425","#bef202","#eafde6"],["#5e412f","#fcebb6","#78c0a8","#f07818","#f0a830"],["#bcbdac","#cfbe27","#f27435","#f02475","#3b2d38"],["#452632","#91204d","#e4844a","#e8bf56","#e2f7ce"],["#eee6ab","#c5bc8e","#696758","#45484b","#36393b"],["#f0d8a8","#3d1c00","#86b8b1","#f2d694","#fa2a00"],["#2a044a","#0b2e59","#0d6759","#7ab317","#a0c55f"],["#f04155","#ff823a","#f2f26f","#fff7bd","#95cfb7"],["#b9d7d9","#668284","#2a2829","#493736","#7b3b3b"],["#bbbb88","#ccc68d","#eedd99","#eec290","#eeaa88"],["#b3cc57","#ecf081","#ffbe40","#ef746f","#ab3e5b"],["#a3a948","#edb92e","#f85931","#ce1836","#009989"],["#300030","#480048","#601848","#c04848","#f07241"],["#67917a","#170409","#b8af03","#ccbf82","#e33258"],["#aab3ab","#c4cbb7","#ebefc9","#eee0b7","#e8caaf"],["#e8d5b7","#0e2430","#fc3a51","#f5b349","#e8d5b9"],["#ab526b","#bca297","#c5ceae","#f0e2a4","#f4ebc3"],["#607848","#789048","#c0d860","#f0f0d8","#604848"],["#b6d8c0","#c8d9bf","#dadabd","#ecdbbc","#fedcba"],["#a8e6ce","#dcedc2","#ffd3b5","#ffaaa6","#ff8c94"],["#3e4147","#fffedf","#dfba69","#5a2e2e","#2a2c31"],["#fc354c","#29221f","#13747d","#0abfbc","#fcf7c5"],["#cc0c39","#e6781e","#c8cf02","#f8fcc1","#1693a7"],["#1c2130","#028f76","#b3e099","#ffeaad","#d14334"],["#a7c5bd","#e5ddcb","#eb7b59","#cf4647","#524656"],["#dad6ca","#1bb0ce","#4f8699","#6a5e72","#563444"],["#5c323e","#a82743","#e15e32","#c0d23e","#e5f04c"],["#edebe6","#d6e1c7","#94c7b6","#403b33","#d3643b"],["#fdf1cc","#c6d6b8","#987f69","#e3ad40","#fcd036"],["#230f2b","#f21d41","#ebebbc","#bce3c5","#82b3ae"],["#b9d3b0","#81bda4","#b28774","#f88f79","#f6aa93"],["#3a111c","#574951","#83988e","#bcdea5","#e6f9bc"],["#5e3929","#cd8c52","#b7d1a3","#dee8be","#fcf7d3"],["#1c0113","#6b0103","#a30006","#c21a01","#f03c02"],["#000000","#9f111b","#b11623","#292c37","#cccccc"],["#382f32","#ffeaf2","#fcd9e5","#fbc5d8","#f1396d"],["#e3dfba","#c8d6bf","#93ccc6","#6cbdb5","#1a1f1e"],["#f6f6f6","#e8e8e8","#333333","#990100","#b90504"],["#1b325f","#9cc4e4","#e9f2f9","#3a89c9","#f26c4f"],["#a1dbb2","#fee5ad","#faca66","#f7a541","#f45d4c"],["#c1b398","#605951","#fbeec2","#61a6ab","#accec0"],["#5e9fa3","#dcd1b4","#fab87f","#f87e7b","#b05574"],["#951f2b","#f5f4d7","#e0dfb1","#a5a36c","#535233"],["#8dccad","#988864","#fea6a2","#f9d6ac","#ffe9af"],["#2d2d29","#215a6d","#3ca2a2","#92c7a3","#dfece6"],["#413d3d","#040004","#c8ff00","#fa023c","#4b000f"],["#eff3cd","#b2d5ba","#61ada0","#248f8d","#605063"],["#ffefd3","#fffee4","#d0ecea","#9fd6d2","#8b7a5e"],["#cfffdd","#b4dec1","#5c5863","#a85163","#ff1f4c"],["#9dc9ac","#fffec7","#f56218","#ff9d2e","#919167"],["#4e395d","#827085","#8ebe94","#ccfc8e","#dc5b3e"],["#a8a7a7","#cc527a","#e8175d","#474747","#363636"],["#f8edd1","#d88a8a","#474843","#9d9d93","#c5cfc6"],["#046d8b","#309292","#2fb8ac","#93a42a","#ecbe13"],["#f38a8a","#55443d","#a0cab5","#cde9ca","#f1edd0"],["#a70267","#f10c49","#fb6b41","#f6d86b","#339194"],["#ff003c","#ff8a00","#fabe28","#88c100","#00c176"],["#ffedbf","#f7803c","#f54828","#2e0d23","#f8e4c1"],["#4e4d4a","#353432","#94ba65","#2790b0","#2b4e72"],["#0ca5b0","#4e3f30","#fefeeb","#f8f4e4","#a5b3aa"],["#4d3b3b","#de6262","#ffb88c","#ffd0b3","#f5e0d3"],["#fffbb7","#a6f6af","#66b6ab","#5b7c8d","#4f2958"],["#edf6ee","#d1c089","#b3204d","#412e28","#151101"],["#9d7e79","#ccac95","#9a947c","#748b83","#5b756c"],["#fcfef5","#e9ffe1","#cdcfb7","#d6e6c3","#fafbe3"],["#9cddc8","#bfd8ad","#ddd9ab","#f7af63","#633d2e"],["#30261c","#403831","#36544f","#1f5f61","#0b8185"],["#aaff00","#ffaa00","#ff00aa","#aa00ff","#00aaff"],["#d1313d","#e5625c","#f9bf76","#8eb2c5","#615375"],["#ffe181","#eee9e5","#fad3b2","#ffba7f","#ff9c97"],["#73c8a9","#dee1b6","#e1b866","#bd5532","#373b44"],["#805841","#dcf7f3","#fffcdd","#ffd8d8","#f5a2a2"]],Oki=t=>{let{x:e,y:n,width:o,height:i}={...t,...t.size,...t.center,...t.position};if(t.x1!==void 0&&t.x2!==void 0&&t.y1!==void 0&&t.y2!==void 0&&(e=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2,o=Math.abs(t.x1-t.x2),i=Math.abs(t.y1-t.y2)),t.points&&Array.isArray(t.points)&&t.points.length>0){const a=t.points.map(h=>h.x),A=t.points.map(h=>h.y),c=Math.min(...a),l=Math.max(...a),u=Math.min(...A),g=Math.max(...A);e=(c+l)/2,n=(u+g)/2,o=l-c,i=g-u}const r=t.text||t.name||t.source?.text||t.source?.name||"?",s=t;return e===void 0||n===void 0?null:(o===void 0&&("radius"in t?(o=t.radius*2,i=t.radius*2):"outer_diameter"in t?(o=t.outer_diameter,i=t.outer_diameter):"rect_pad_width"in t&&"rect_pad_height"in t?(o=t.rect_pad_width,i=t.rect_pad_height,"hole_diameter"in t&&(o=Math.max(o,t.hole_diameter),i=Math.max(i,t.hole_diameter))):"hole_diameter"in t&&(o=t.hole_diameter,i=t.hole_diameter)),(o===void 0||i===void 0)&&(o=.1,i=.1),{x:e,y:n,width:o,height:i,title:r,content:s,bg_color:qdn[Hki(t.type||r)%qdn.length]?.[4]??"#f00"})},Gki=t=>!!t,Yki=t=>{const e=t.filter(c=>c.type.startsWith("pcb_")||c.type.startsWith("schematic_")).concat(t.filter(c=>c.type==="pcb_trace"||c.type==="schematic_trace").flatMap(c=>c.route)).map(c=>Oki(c)).filter(Gki);if(e.length===0)return{center:{x:0,y:0},width:0,height:0};let n=e[0].x-e[0].width/2,o=e[0].x+e[0].width/2,i=e[0].y-e[0].height/2,r=e[0].y+e[0].height/2;for(const c of e.slice(1))n=Math.min(n,c.x-c.width/2),o=Math.max(o,c.x+c.width/2),i=Math.min(i,c.y-c.height/2),r=Math.max(r,c.y+c.height/2);const s=o-n,a=r-i;return{center:{x:n+s/2,y:i+a/2},width:s,height:a}},u_={HIDDEN_LAYER_OPACITY:"pcb_viewer_hidden_layer_opacity",IS_SHOWING_PCB_GROUPS:"pcb_viewer_is_showing_pcb_groups",PCB_GROUP_VIEW_MODE:"pcb_viewer_group_view_mode",IS_SHOWING_COPPER_POURS:"pcb_viewer_is_showing_copper_pours",IS_SHOWING_COURTYARDS:"pcb_viewer_is_showing_courtyards",IS_SHOWING_GROUP_ANCHOR_OFFSETS:"pcb_viewer_is_showing_group_anchor_offsets",IS_SHOWING_SOLDER_MASK:"pcb_viewer_is_showing_solder_mask",IS_SHOWING_FABRICATION_NOTES:"pcb_viewer_is_showing_fabrication_notes",IS_SHOWING_PCB_NOTES:"pcb_viewer_is_showing_pcb_notes",IS_SHOWING_SILKSCREEN:"pcb_viewer_is_showing_silkscreen"},OP=(t,e)=>{if(typeof window>"u")return e;try{const n=localStorage.getItem(t);return n!==null?JSON.parse(n):e}catch{return e}},GP=(t,e)=>{if(!(typeof window>"u"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Uki=(t,e)=>{if(typeof window>"u")return e;try{const n=localStorage.getItem(t);return n!==null?JSON.parse(n):e}catch{return e}},Kki=(t,e)=>{if(!(typeof window>"u"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Vki=(t,e)=>{if(typeof window>"u")return e;try{const n=localStorage.getItem(t),o=n!==null?JSON.parse(n):null;return typeof o=="number"&&Number.isFinite(o)?o:e}catch{return e}},zki=(t,e)=>{if(!(typeof window>"u"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Jki="named_only",Wki=(t={},e=!1)=>iFt(n=>({hidden_layer_opacity:Math.max(0,Math.min(1,Vki(u_.HIDDEN_LAYER_OPACITY,.2))),setHiddenLayerOpacity:o=>{if(!Number.isFinite(o))return;const i=Math.max(0,Math.min(1,o));zki(u_.HIDDEN_LAYER_OPACITY,i),n({hidden_layer_opacity:i})},selected_layer:"top",pcb_viewer_id:`pcb_viewer_${Math.random().toString().slice(2,10)}`,in_edit_mode:!1,in_move_footprint_mode:!1,is_moving_component:!1,is_mouse_over_container:!1,is_showing_multiple_traces_length:!1,is_showing_rats_nest:!1,is_showing_autorouting:!0,is_showing_drc_errors:!0,is_showing_drc_warnings:!0,is_showing_copper_pours:OP(u_.IS_SHOWING_COPPER_POURS,!0),is_showing_courtyards:OP(u_.IS_SHOWING_COURTYARDS,!0),is_showing_pcb_groups:e?!1:OP(u_.IS_SHOWING_PCB_GROUPS,!0),is_showing_group_anchor_offsets:OP(u_.IS_SHOWING_GROUP_ANCHOR_OFFSETS,!1),is_showing_solder_mask:OP(u_.IS_SHOWING_SOLDER_MASK,!1),is_showing_silkscreen:OP(u_.IS_SHOWING_SILKSCREEN,!0),is_showing_fabrication_notes:OP(u_.IS_SHOWING_FABRICATION_NOTES,!1),is_showing_pcb_notes:OP(u_.IS_SHOWING_PCB_NOTES,!0),pcb_group_view_mode:e?"all":Uki(u_.PCB_GROUP_VIEW_MODE,Jki),hovered_error_id:null,focused_error_id:null,...t,selectLayer:o=>n({selected_layer:o}),setEditMode:o=>n({in_edit_mode:o!=="off",in_move_footprint_mode:o==="move_footprint",is_moving_component:!1}),setIsShowingRatsNest:o=>n({is_showing_rats_nest:o}),setIsMovingComponent:o=>n({is_moving_component:o}),setIsMouseOverContainer:o=>n({is_mouse_over_container:o}),setIsShowingMultipleTracesLength:o=>n({is_showing_multiple_traces_length:o}),setIsShowingAutorouting:o=>n({is_showing_autorouting:o}),setIsShowingDrcErrors:o=>n({is_showing_drc_errors:o}),setIsShowingDrcWarnings:o=>n({is_showing_drc_warnings:o}),setIsShowingCopperPours:o=>{GP(u_.IS_SHOWING_COPPER_POURS,o),n({is_showing_copper_pours:o})},setIsShowingCourtyards:o=>{GP(u_.IS_SHOWING_COURTYARDS,o),n({is_showing_courtyards:o})},setIsShowingPcbGroups:o=>{e||(GP(u_.IS_SHOWING_PCB_GROUPS,o),n({is_showing_pcb_groups:o}))},setIsShowingGroupAnchorOffsets:o=>{GP(u_.IS_SHOWING_GROUP_ANCHOR_OFFSETS,o),n({is_showing_group_anchor_offsets:o})},setIsShowingSolderMask:o=>{GP(u_.IS_SHOWING_SOLDER_MASK,o),n({is_showing_solder_mask:o})},setIsShowingSilkscreen:o=>{GP(u_.IS_SHOWING_SILKSCREEN,o),n({is_showing_silkscreen:o})},setIsShowingFabricationNotes:o=>{GP(u_.IS_SHOWING_FABRICATION_NOTES,o),n({is_showing_fabrication_notes:o})},setIsShowingPcbNotes:o=>{GP(u_.IS_SHOWING_PCB_NOTES,o),n({is_showing_pcb_notes:o})},setPcbGroupViewMode:o=>{e||(Kki(u_.PCB_GROUP_VIEW_MODE,o),n({pcb_group_view_mode:o}))},setHoveredErrorId:o=>n({hovered_error_id:o}),setFocusedErrorId:o=>n({focused_error_id:o})})),Kc=t=>{const e=ee.useContext(Xdn);return hFt(e,t)},Xdn=ee.createContext(null),jki=({children:t,initialState:e,disablePcbGroups:n})=>{const o=ee.useMemo(()=>Wki(e,n),[n]);return K.jsx(Xdn.Provider,{value:o,children:t})},$ki=()=>{ee.useEffect(()=>{KNi()},[]);const t=Kc(e=>e.pcb_viewer_id);return K.jsx(UNi,{position:"top-center",containerId:t})};function qki(){var t=ee.useRef(!1),e=ee.useCallback(function(){return t.current},[]);return ee.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e}var Xki=function(t){t===void 0&&(t={});var e=ee.useState(t),n=e[0],o=e[1],i=ee.useCallback(function(r){o(function(s){return Object.assign({},s,r instanceof Function?r(s):r)})},[]);return[n,i]},Zki=Xki,eFi=function(){},Zdn=typeof window<"u",tFi=qgn($Ri()),nFi=function(){var t=qki(),e=Zki({value:void 0,error:void 0,noUserInteraction:!0}),n=e[0],o=e[1],i=ee.useCallback(function(r){if(t()){var s,a;try{if(typeof r!="string"&&typeof r!="number"){var A=new Error("Cannot copy typeof "+typeof r+" to clipboard, must be a string");console.error(A),o({value:r,error:A,noUserInteraction:!0});return}else if(r===""){var A=new Error("Cannot copy empty string to clipboard.");console.error(A),o({value:r,error:A,noUserInteraction:!0});return}a=r.toString(),s=(0,tFi.default)(a),o({value:a,error:void 0,noUserInteraction:s})}catch(c){o({value:a,error:c,noUserInteraction:s})}}},[]);return[n,i]},oFi=nFi,iFi=Zdn?ee.useLayoutEffect:ee.useEffect,rFi=iFi,ehn={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function sFi(){var t=ee.useState(null),e=t[0],n=t[1],o=ee.useState(ehn),i=o[0],r=o[1],s=ee.useMemo(function(){return new window.ResizeObserver(function(a){if(a[0]){var A=a[0].contentRect,c=A.x,l=A.y,u=A.width,g=A.height,h=A.top,d=A.left,p=A.bottom,m=A.right;r({x:c,y:l,width:u,height:g,top:h,left:d,bottom:p,right:m})}})},[]);return rFi(function(){if(e)return s.observe(e),function(){s.disconnect()}},[e]),[n,i]}var uee=Zdn&&typeof window.ResizeObserver<"u"?sFi:function(){return[eFi,ehn]},thn=({initialTransform:t,initialTouch1:e,initialTouch2:n,finalTouch1:o,finalTouch2:i})=>{if(!o||!i)return t;const r={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s={x:(o.x+i.x)/2,y:(o.y+i.y)/2},a=Math.hypot(n.x-e.x,n.y-e.y),A=Math.hypot(i.x-o.x,i.y-o.y),c=a===0?1:A/a,l=s.x-r.x,u=s.y-r.y;return NC(Qd(l,u),Qd(r.x,r.y),vS(c,c),Qd(-r.x,-r.y),t)},aFi=(t={})=>{const e=ee.useRef(null),[n,o]=ee.useState(0),i=t.canvasElm??e.current,[r,s]=ee.useState(t.initialTransform??RP()),[a,A]=ee.useState(0),[c,l]=ee.useReducer(I=>I+1,0),u=ee.useCallback(I=>{t.onSetTransform&&t.onSetTransform(I),t.transform||s(I)},[t.onSetTransform,s]),g=ee.useCallback(I=>{u(I),l()},[u]),h=t.transform??r,d=ee.useCallback(()=>{o(Date.now())},[]),p=ee.useRef("none"),m=ee.useRef(null),_=ee.useRef(null);ee.useEffect(()=>{const I=t.canvasElm??e.current;if(I&&!i){A(a+1);return}if(!I){const U=setTimeout(()=>{A(a+1)},100);return()=>clearTimeout(U)}let C=t.transform??r,y={x:0,y:0},x={x:0,y:0},E=!1;const B=U=>({x:U.pageX-I.getBoundingClientRect().left-window.scrollX,y:U.pageY-I.getBoundingClientRect().top-window.scrollY});function S(U){t.enabled!==!1&&(t.shouldDrag&&!t.shouldDrag(U)||(y=B(U),!(Date.now()-n<100)&&(E=!0,U.preventDefault())))}function Q(U){if(!E||t.enabled===!1||t.shouldDrag&&!t.shouldDrag(U))return;x=B(U);const Y=NC(Qd(x.x-y.x,x.y-y.y),C);u(Y),C=Y,E=!1}function w(U){if(B(U),!E||t.enabled===!1||t.shouldDrag&&!t.shouldDrag(U))return;x=B(U);const Y=NC(Qd(x.x-y.x,x.y-y.y),C);u(Y)}function M(U){if(t.enabled===!1||t.shouldDrag&&!t.shouldDrag(U))return;const Y=B(U),W=NC(Qd(Y.x,Y.y),vS(1-U.deltaY/1e3,1-U.deltaY/1e3),Qd(-Y.x,-Y.y),C);u(W),C=W,U.preventDefault()}function k(U){if(!E||t.shouldDrag&&!t.shouldDrag(U))return;if(I){const W=I.getBoundingClientRect();if(U.clientX>=W.left+10&&U.clientX<=W.right-10&&U.clientY>=W.top+10&&U.clientY<=W.bottom-10)return}E=!1,x=B(U);const Y=NC(Qd(x.x-y.x,x.y-y.y),C);u(Y),C=Y}function R(U){if(U.preventDefault(),t.enabled!==!1){if(U.touches.length===1){p.current="drag";const Y=U.touches[0];m.current={initialTransform:C,initialTouch:{x:Y.clientX,y:Y.clientY}}}else if(U.touches.length===2){p.current="pinch";const Y=U.touches[0],W=U.touches[1];_.current={initialTransform:C,initialTouch1:{x:Y.clientX,y:Y.clientY},initialTouch2:{x:W.clientX,y:W.clientY},finalTouch1:null,finalTouch2:null}}}}function F(U){if(U.preventDefault(),t.enabled!==!1){if(p.current==="drag"&&U.touches.length===1&&m.current){const Y=U.touches[0],W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=NC(Qd(te,j),m.current.initialTransform);u(J)}else if(p.current==="pinch"&&U.touches.length===2&&_.current){const Y=U.touches[0],W=U.touches[1];_.current.finalTouch1={x:Y.clientX,y:Y.clientY},_.current.finalTouch2={x:W.clientX,y:W.clientY};const te=thn(_.current);u(te)}}}function O(U){U.preventDefault();const Y=U.changedTouches[0];if(p.current==="drag"&&m.current&&Y){const W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=NC(Qd(te,j),m.current.initialTransform);u(J),C=J}else if(p.current==="pinch"&&_.current){const W=thn(_.current);u(W),C=W}p.current="none",m.current=null,_.current=null}return I.addEventListener("mousedown",S),I.addEventListener("mouseup",Q),window.addEventListener("mousemove",w),I.addEventListener("mouseout",k),I.addEventListener("wheel",M),I.addEventListener("touchstart",R,{passive:!1}),I.addEventListener("touchmove",F,{passive:!1}),I.addEventListener("touchend",O,{passive:!1}),I.addEventListener("touchcancel",O,{passive:!1}),()=>{I.removeEventListener("mousedown",S),I.removeEventListener("mouseup",Q),window.removeEventListener("mousemove",w),I.removeEventListener("mouseout",k),I.removeEventListener("wheel",M),I.removeEventListener("touchstart",R),I.removeEventListener("touchmove",F),I.removeEventListener("touchend",O),I.removeEventListener("touchcancel",O)}},[i,a,c,n,t.enabled,t.shouldDrag]);const f=ee.useCallback(I=>_i(h,I),[h]);return{ref:e,transform:h,applyTransformToPoint:f,setTransform:g,cancelDrag:d}},AFi=aFi,cFi=(t,e)=>{if(t?.type!=="pcb_smtpad"&&t?.type!=="pcb_plated_hole")return;const n=e.find(i=>i.type==="pcb_component"&&i.pcb_component_id===t.pcb_component_id);if(n?.type!=="pcb_component")return;const o=e.find(i=>i.type==="source_component"&&i.source_component_id===n.source_component_id);if(o?.type==="source_component")return{source_component_id:o.source_component_id,pcb_component_id:n.pcb_component_id,refdes:o.name,manufacturer_part_number:o.manufacturer_part_number}};function lFi(t){const e=new Map;let n=0;function o(i){for(const[,s]of e)if(s.has(i))return s;const r=new Set;return e.set(`connectivity_net${n++}`,r),r}for(const i of t){let r=null;for(const s of i){if(!r)r=o(s);else if(!r.has(s)){const a=o(s);if(a!==r){for(const A of a)r.add(A);e.delete(Array.from(e.entries()).find(([,A])=>A===a)[0])}}r.add(s)}}return Object.fromEntries(Array.from(e.entries()).map(([i,r])=>[i,Array.from(r)]))}var uFi=class{netMap;idToNetMap;constructor(t){this.netMap=t,this.idToNetMap={};for(const[e,n]of Object.entries(t))for(const o of n)this.idToNetMap[o]=e}addConnections(t){for(const e of t){const n=new Set;for(const i of e){const r=this.idToNetMap[i];r&&n.add(r)}let o;if(n.size===0)o=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[o]=[];else if(n.size===1)o=n.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{o=n.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const i of n)if(i!==o){this.netMap[o].push(...this.netMap[i]),this.netMap[i]=this.netMap[o];for(const r of this.netMap[o])this.idToNetMap[r]=o}}for(const i of e)this.netMap[o].includes(i)||this.netMap[o].push(i),this.idToNetMap[i]=o}}getIdsConnectedToNet(t){return this.netMap[t]||[]}getNetConnectedToId(t){return this.idToNetMap[t]}areIdsConnected(t,e){if(t===e)return!0;const n=this.getNetConnectedToId(t);if(!n)return!1;const o=this.getNetConnectedToId(e);return o?n===o||o===t||o===t:!1}areAllIdsConnected(t){const e=this.getNetConnectedToId(t[0]);for(const n of t){const o=this.getNetConnectedToId(n);if(o===void 0||o!==e)return!1}return!0}},nhn=t=>{const e=[];for(const o of t)if(o.type==="source_trace")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type==="pcb_port"){const{pcb_port_id:i,source_port_id:r}=o;r&&i&&e.push([r,i])}else if(o.type==="pcb_smtpad"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_plated_hole"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r&&i&&e.push([i,r])}else if(o.type==="pcb_trace"){const{pcb_trace_id:i,source_trace_id:r}=o,s=Array.isArray(o.route)?o.route.filter(a=>a&&a.route_type==="wire"):[];if(r&&i&&e.push([i,r]),Array.isArray(s)){const a=s.find(c=>c?.start_pcb_port_id)?.start_pcb_port_id,A=s.find(c=>c?.end_pcb_port_id)?.end_pcb_port_id;a&&i&&A&&e.push([a,i,A])}}else if(o.type==="pcb_via"){const{pcb_via_id:i,pcb_trace_id:r,source_trace_id:s,source_net_id:a}=o,A=[r,s,a].filter(c=>!!c);i&&A.length>0&&e.push([i,...A])}else if(o.type==="source_component"&&o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=lFi(e);return new uFi(n)};function gFi(t,e){if(t.length<2)throw new Error("Stroke must have at least two points");const n=t.map(u=>Array.isArray(u)?{x:u[0],y:u[1]}:u),o=[],i=[];function r(u,g){const h=g.x-u.x,d=g.y-u.y,p=Math.sqrt(h*h+d*d);return{x:-d/p,y:h/p}}function s(u,g,h,d){const p=d/2,m={x:u.x+g.x*p*h,y:u.y+g.y*p*h};h>0?o.push(m):i.unshift(m)}const a=r(n[0],n[1]),A=n[0].trace_width??e;s(n[0],a,1,A),s(n[0],a,-1,A);for(let u=1;u<n.length-1;u++){const g=n[u-1],h=n[u],d=n[u+1],p=r(g,h),m=r(h,d),_=p.x+m.x,f=p.y+m.y,I=Math.sqrt(_*_+f*f),C=h.trace_width??e;if(I/2>2*(C/2))s(h,p,1,C),s(h,m,1,C),s(h,p,-1,C),s(h,m,-1,C);else{const x=1/I;s(h,{x:_*x,y:f*x},1,C),s(h,{x:_*x,y:f*x},-1,C)}}const c=r(n[n.length-2],n[n.length-1]),l=n[n.length-1].trace_width??e;return s(n[n.length-1],c,1,l),s(n[n.length-1],c,-1,l),[...o,...i]}var dFi=(t,e)=>{const{x:n,y:o,width:i,height:r,layer:s,rect_border_radius:a}=t,A=t.corner_radius??a??0,c=[{_pcb_drawing_object_id:i9("rect"),pcb_drawing_type:"rect",x:n,y:o,w:i,h:r,layer:s||"top",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,roundness:A,...t.shape==="rotated_rect"&&t.ccw_rotation!==void 0?{ccw_rotation:t.ccw_rotation}:{}}];if(t.is_covered_with_solder_mask){const l=s==="bottom"?"soldermask_with_copper_bottom":"soldermask_with_copper_top",g={...{_pcb_drawing_object_id:i9("rect"),pcb_drawing_type:"rect",x:n,y:o,w:i,h:r,layer:l,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,roundness:A,...t.shape==="rotated_rect"&&t.ccw_rotation!==void 0?{ccw_rotation:t.ccw_rotation}:{}},..."solder_mask_color"in t&&t.solder_mask_color?{color:t.solder_mask_color}:{}};c.push(g)}return c},hFi=(t,e)=>{const{x:n,y:o,radius:i,layer:r}=t,s=[{_pcb_drawing_object_id:i9("circle"),pcb_drawing_type:"circle",x:n,y:o,r:i,layer:r||"top",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port}];if(t.is_covered_with_solder_mask){const a=r==="bottom"?"soldermask_with_copper_bottom":"soldermask_with_copper_top",A={_pcb_drawing_object_id:i9("circle"),pcb_drawing_type:"circle",x:n,y:o,r:i,layer:a,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,..."solder_mask_color"in t&&t.solder_mask_color?{color:t.solder_mask_color}:{}};s.push(A)}return s},pFi=(t,e)=>{const{layer:n,points:o}=t,i=[{_pcb_drawing_object_id:i9("polygon"),pcb_drawing_type:"polygon",points:f$e(o),layer:n||"top",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port}];if(t.is_covered_with_solder_mask){const r=n==="bottom"?"soldermask_with_copper_bottom":"soldermask_with_copper_top",s={_pcb_drawing_object_id:i9("polygon"),pcb_drawing_type:"polygon",points:f$e(o),layer:r,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,..."solder_mask_color"in t&&t.solder_mask_color?{color:t.solder_mask_color}:{}};i.push(s)}return i},mFi=(t,e)=>{const{x:n,y:o,width:i,height:r,layer:s}=t,a=[{_pcb_drawing_object_id:i9("pill"),pcb_drawing_type:"pill",x:n,y:o,w:i,h:r,layer:s||"top",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port}];if(t.is_covered_with_solder_mask){const A=s==="bottom"?"soldermask_with_copper_bottom":"soldermask_with_copper_top",c={_pcb_drawing_object_id:i9("pill"),pcb_drawing_type:"pill",x:n,y:o,w:i,h:r,layer:A,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,..."solder_mask_color"in t&&t.solder_mask_color?{color:t.solder_mask_color}:{}};a.push(c)}return a},_Fi=(t,e)=>{const{x:n,y:o,width:i,height:r,layer:s,ccw_rotation:a}=t,A=[{_pcb_drawing_object_id:i9("pill"),pcb_drawing_type:"pill",x:n,y:o,w:i,h:r,layer:s||"top",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,ccw_rotation:a}];if(t.is_covered_with_solder_mask){const c=s==="bottom"?"soldermask_with_copper_bottom":"soldermask_with_copper_top",l={_pcb_drawing_object_id:i9("pill"),pcb_drawing_type:"pill",x:n,y:o,w:i,h:r,layer:c,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,ccw_rotation:a,..."solder_mask_color"in t&&t.solder_mask_color?{color:t.solder_mask_color}:{}};A.push(l)}return A},Pd=0,i9=t=>`${t}_${Pd++}`,f$e=t=>(t??[]).map(e=>({x:lt.parse(e.x),y:lt.parse(e.y)}));function fFi(t){const e=new Map;for(const n of t){const o=n[`${n.type}_id`];o!==void 0&&!e.has(`${n.type}:${o}`)&&e.set(`${n.type}:${o}`,n)}return e}var IFi=(t,e,n)=>{const o=(A,c)=>{if(c!==void 0)return n?n.get(`${A}:${c}`):e.find(l=>l.type===A&&l[`${A}_id`]===c)},i=o("pcb_component","pcb_component_id"in t?t.pcb_component_id:void 0),r=o("source_component",i?.source_component_id),s="source_port_id"in t?t.source_port_id:"pcb_port_id"in t?o("pcb_port",t.pcb_port_id)?.source_port_id:void 0,a=o("source_port",s);switch(t.type){case"pcb_smtpad":{const A={_parent_pcb_component:i,_parent_source_component:r,_source_port:a};return t.shape==="rect"||t.shape==="rotated_rect"?dFi(t,A):t.shape==="circle"?hFi(t,A):t.shape==="polygon"?pFi(t,A):t.shape==="pill"?mFi(t,A):t.shape==="rotated_pill"?_Fi(t,A):[]}case"pcb_trace":{const A=[];if(t.route_thickness_mode==="interpolated"){const u=t.route.flatMap(d=>d.route_type==="through_pad"?[{...d.start,trace_width:d.width},{...d.end,trace_width:d.width}]:[{x:d.x,y:d.y,trace_width:d.route_type==="wire"?d.width:.5}]),g=gFi(u,.5),h=t.route[0].layer;return A.push({_pcb_drawing_object_id:`polygon_${Pd++}`,_element:t,pcb_drawing_type:"polygon",points:g,layer:h}),t.route.forEach(d=>{d.route_type==="via"&&A.push({_pcb_drawing_object_id:`circle_${Pd++}`,_element:t,pcb_drawing_type:"circle",x:d.x,y:d.y,r:d.outer_diameter/2,layer:d.from_layer})}),A}let c=null,l=null;for(const u of t.route)u.route_type==="wire"&&(c!==null&&l!==null&&A.push({_pcb_drawing_object_id:`line_${Pd++}`,_element:t,pcb_drawing_type:"line",x1:c,y1:l,x2:u.x,y2:u.y,width:u.width,squareCap:!1,layer:u.layer}),c=u.x,l=u.y);return A}case"pcb_via":{const{x:A,y:c,outer_diameter:l,hole_diameter:u}=t,g=t.from_layer,h=t.to_layer,d=t.layers,p=[];g&&h?p.push(g,h):d&&Array.isArray(d)?p.push(...d):p.push("top","bottom");const m=[];for(const _ of p)m.push({_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:"circle",x:A,y:c,r:l/2,layer:_,_element:t,_parent_pcb_component:i,_parent_source_component:r});return m.push({_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:"circle",x:A,y:c,r:u/2,layer:"drill",_element:t}),m}case"pcb_plated_hole":if(t.shape==="circle"){const{x:A,y:c,hole_diameter:l,outer_diameter:u}=t;return[{_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:"circle",x:A,y:c,r:u/2,layer:"top",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a},{_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:"circle",x:A,y:c,r:l/2,layer:"drill",_element:t}]}else if(t.shape==="oval"){const{x:A,y:c,outer_height:l,outer_width:u,hole_height:g,hole_width:h}=t;return[{_pcb_drawing_object_id:`oval_${Pd++}`,pcb_drawing_type:"oval",x:A,y:c,rX:u/2,rY:l/2,layer:"top",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a},{_pcb_drawing_object_id:`oval_${Pd++}`,_element:t,pcb_drawing_type:"oval",x:A,y:c,rX:h/2,rY:g/2,layer:"drill"}]}else if(t.shape==="pill"){const{x:A,y:c,outer_height:l,outer_width:u,hole_height:g,hole_width:h}=t;return[{_pcb_drawing_object_id:`pill_${Pd++}`,pcb_drawing_type:"pill",x:A,y:c,w:u,h:l,layer:"top",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,ccw_rotation:t.ccw_rotation},{_pcb_drawing_object_id:`pill_${Pd++}`,_element:t,pcb_drawing_type:"pill",x:A,y:c,w:h,h:g,layer:"drill",ccw_rotation:t.ccw_rotation}]}else if(t.shape==="circular_hole_with_rect_pad"){const{x:A,y:c,hole_diameter:l,rect_pad_width:u,rect_pad_height:g,rect_border_radius:h,hole_offset_x:d,hole_offset_y:p}=t,m=lt.parse(d??0),_=lt.parse(p??0);return[{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:"rect",x:A,y:c,w:u,h:g,layer:"top",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:h},{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:"rect",x:A,y:c,w:u,h:g,layer:"bottom",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:h,is_hoverable:!1},{_pcb_drawing_object_id:`circle_${Pd++}`,_element:t,pcb_drawing_type:"circle",x:A+m,y:c+_,r:l/2,layer:"drill",is_hoverable:!1}]}else if(t.shape==="pill_hole_with_rect_pad"){const{x:A,y:c,hole_width:l,hole_height:u,rect_pad_width:g,rect_pad_height:h,rect_border_radius:d}=t;return[{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:"rect",x:A,y:c,w:g,h,layer:"top",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:d},{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:"rect",x:A,y:c,w:g,h,layer:"bottom",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:d,is_hoverable:!1},{_pcb_drawing_object_id:`pill_${Pd++}`,_element:t,pcb_drawing_type:"pill",x:A,y:c,w:l,h:u,layer:"drill",is_hoverable:!1}]}else if(t.shape==="rotated_pill_hole_with_rect_pad"){const{x:A,y:c,hole_width:l,hole_height:u,hole_ccw_rotation:g,rect_pad_width:h,rect_pad_height:d,rect_ccw_rotation:p,rect_border_radius:m}=t;return[{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:"rect",x:A,y:c,w:h,h:d,layer:"top",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,ccw_rotation:p,roundness:m},{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:"rect",x:A,y:c,w:h,h:d,layer:"bottom",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,ccw_rotation:p,roundness:m,is_hoverable:!1},{_pcb_drawing_object_id:`pill_${Pd++}`,_element:t,pcb_drawing_type:"pill",x:A,y:c,w:l,h:u,layer:"drill",ccw_rotation:g,is_hoverable:!1}]}else if(t.shape==="hole_with_polygon_pad"){const{x:A,y:c,pad_outline:l,hole_shape:u,hole_diameter:g,hole_width:h,hole_height:d,layers:p,hole_offset_x:m,hole_offset_y:_}=t,f=lt.parse(m??0),I=lt.parse(_??0),C=l,y=[];if(C&&Array.isArray(C)){const B=f$e(C).map(S=>({x:S.x+A,y:S.y+c}));for(const S of p||["top","bottom"])y.push({_pcb_drawing_object_id:`polygon_${Pd++}`,pcb_drawing_type:"polygon",points:B,layer:S,_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a})}const x={x:A+f,y:c+I},E=[];return u==="circle"?E.push({_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:"circle",x:x.x,y:x.y,r:(g??0)/2,layer:"drill",_element:t,_parent_pcb_component:i,_parent_source_component:r}):u==="oval"?E.push({_pcb_drawing_object_id:`oval_${Pd++}`,pcb_drawing_type:"oval",x:x.x,y:x.y,rX:(h??0)/2,rY:(d??0)/2,layer:"drill",_element:t,_parent_pcb_component:i,_parent_source_component:r}):(u==="pill"||u==="rotated_pill")&&E.push({_pcb_drawing_object_id:`pill_${Pd++}`,pcb_drawing_type:"pill",x:x.x,y:x.y,w:h??0,h:d??0,layer:"drill",_element:t,_parent_pcb_component:i,_parent_source_component:r,ccw_rotation:t.ccw_rotation}),[...y,...E]}else return[]}return[]};function CFi({primitivesWithoutInteractionMetadata:t,drawingObjectIdsWithMouseOver:e,primitiveIdsInMousedOverNet:n}){const o=[];for(const i of t){const r={...i},s=i._element,a=i._parent_pcb_component;i?.layer==="drill"?(r.is_in_highlighted_net=!1,r.is_mouse_over=!1):e.has(i._pcb_drawing_object_id)?r.is_mouse_over=!0:s&&("pcb_trace_id"in s&&n.includes(s.pcb_trace_id)||"pcb_port_id"in s&&n.includes(s.pcb_port_id)||"pcb_via_id"in s&&n.includes(s.pcb_via_id)||"pcb_component_id"in s&&n.includes(s.pcb_component_id)||a&&"pcb_component_id"in a&&n.includes(a.pcb_component_id))?r.is_in_highlighted_net=!0:(r.is_in_highlighted_net=!1,r.is_mouse_over=!1),o.push(r)}return o}var ohn=t=>{const e=new Map,n=new Map,o=new Map,i=new Map,r=new Map;for(const s of t)s.type==="pcb_trace"&&s.pcb_trace_id?e.set(s.pcb_trace_id,s):s.type==="pcb_port"&&s.pcb_port_id?n.set(s.pcb_port_id,s):s.type==="pcb_via"&&s.pcb_via_id?o.set(s.pcb_via_id,s):s.type==="pcb_component"&&s.pcb_component_id?i.set(s.pcb_component_id,s):s.type==="pcb_board"&&s.pcb_board_id&&r.set(s.pcb_board_id,s);return{tracesById:e,portsById:n,viasById:o,componentsById:i,boardsById:r}},I4=(t,e)=>e?t?{minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}:e:t,UT=(t,e=.45)=>({minX:t.x-e,maxX:t.x+e,minY:t.y-e,maxY:t.y+e}),yFi=t=>{if(t.length===0)return null;let e=null;for(const n of t){const o=Math.max((n.width??.2)/2,.3);e=I4(e,UT(n,o))}return e},ihn=t=>{if(!t?.center)return null;const e=Math.max(t.width??0,1.2),n=Math.max(t.height??0,1.2);return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},xFi=t=>!t?.center||typeof t.width!="number"||typeof t.height!="number"?null:{minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2},EFi=(t,e)=>({minX:t.minX-e,maxX:t.maxX+e,minY:t.minY-e,maxY:t.maxY+e}),BFi=(t,e=.35)=>{const n=Oh(t);return n?EFi(n,e):null},rhn=({error:t,tracesById:e,portsById:n,viasById:o,componentsById:i})=>{if(t.center)return t.center;if(t.pcb_center)return t.pcb_center;if(t.component_center)return t.component_center;if(t.pcb_via_ids?.length){const r=t.pcb_via_ids.map(s=>o.get(s)).filter(Boolean);if(r.length>0)return{x:r.reduce((s,a)=>s+a.x,0)/r.length,y:r.reduce((s,a)=>s+a.y,0)/r.length}}if(t.pcb_port_ids?.length){const r=t.pcb_port_ids.map(s=>n.get(s)).filter(Boolean);if(r.length>0)return{x:r.reduce((s,a)=>s+a.x,0)/r.length,y:r.reduce((s,a)=>s+a.y,0)/r.length}}if(t.pcb_trace_id){const r=e.get(t.pcb_trace_id);if(r?.route?.length){const s=Math.floor(r.route.length/2);return{x:r.route[s].x,y:r.route[s].y}}}return t.pcb_component_id?i.get(t.pcb_component_id)?.center??null:null},bFi=({error:t,indexes:e})=>rhn({error:t,...e}),SFi=({error:t,boardsById:e})=>{if(!t.component_bounds||!t.pcb_board_id)return null;const n=xFi(e.get(t.pcb_board_id));if(!n)return null;const o=t.component_bounds,i=[];return o.min_x<n.minX&&(i.push({x:n.minX,y:Math.max(o.min_y,n.minY)}),i.push({x:n.minX,y:Math.min(o.max_y,n.maxY)})),o.max_x>n.maxX&&(i.push({x:n.maxX,y:Math.max(o.min_y,n.minY)}),i.push({x:n.maxX,y:Math.min(o.max_y,n.maxY)})),o.min_y<n.minY&&(i.push({x:Math.max(o.min_x,n.minX),y:n.minY}),i.push({x:Math.min(o.max_x,n.maxX),y:n.minY})),o.max_y>n.maxY&&(i.push({x:Math.max(o.min_x,n.minX),y:n.maxY}),i.push({x:Math.min(o.max_x,n.maxX),y:n.maxY})),BFi(i,.3)},shn=new Set(["source_failed_to_create_component_error"]),QFi=({error:t,indexes:e})=>{if(shn.has(t.error_type)||shn.has(t.type))return null;let n=null;const o=rhn({error:t,...e});if(o&&(n=I4(n,UT(o,.35))),t.error_type==="pcb_component_outside_board_error"?n=I4(n,SFi({error:t,boardsById:e.boardsById})):t.component_bounds&&!o&&(n=I4(n,{minX:t.component_bounds.min_x,maxX:t.component_bounds.max_x,minY:t.component_bounds.min_y,maxY:t.component_bounds.max_y})),t.center&&!o&&(n=I4(n,UT(t.center))),t.pcb_center&&!o&&(n=I4(n,UT(t.pcb_center))),t.component_center&&!o&&(n=I4(n,UT(t.component_center))),t.pcb_port_ids&&!o)for(const i of t.pcb_port_ids){const r=e.portsById.get(i);r&&(n=I4(n,UT({x:r.x,y:r.y},.4)))}if(t.pcb_trace_id&&!o){const i=e.tracesById.get(t.pcb_trace_id);i?.route&&(n=I4(n,yFi(i.route)))}if(t.pcb_via_ids)for(const i of t.pcb_via_ids){const r=e.viasById.get(i);r&&(n=I4(n,UT({x:r.x,y:r.y},Math.max((r.outer_diameter??.5)/2,.28))))}if(t.pcb_component_id&&!o&&(n=I4(n,ihn(e.componentsById.get(t.pcb_component_id)))),t.pcb_component_ids&&!o)for(const i of t.pcb_component_ids)n=I4(n,ihn(e.componentsById.get(i)));return n},vFi=({bounds:t,width:e,height:n})=>{const o={x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2},i=Math.max(t.maxX-t.minX,.8)+1.4,r=Math.max(t.maxY-t.minY,.8)+1.4,s=Math.min(e/i,n/r,240)*.92;return NC(Qd(e/2,n/2),vS(s,-s,0,0),Qd(-o.x,-o.y))},wFi=t=>{const e=new Set;t.pcb_trace_id&&e.add(t.pcb_trace_id);for(const n of t.pcb_port_ids??[])e.add(n);for(const n of t.pcb_via_ids??[])e.add(n);t.pcb_component_id&&e.add(t.pcb_component_id);for(const n of t.pcb_component_ids??[])e.add(n);return[...e]},JU=(t,e)=>{const n=["pcb_trace_error_id","pcb_via_clearance_error_id","pcb_component_outside_board_error_id","source_failed_to_create_component_error_id","pcb_error_id"];for(const o of n)if(typeof t?.[o]=="string"&&t[o].length>0)return t[o];for(const[o,i]of Object.entries(t??{}))if(o.endsWith("_error_id")&&typeof i=="string"&&i.length>0)return i;return`error_${e}_${t?.error_type}_${t?.message?.slice(0,20)}`},ahn=(t,e)=>e?t.find((n,o)=>n.type?.includes("error")?JU(n,o)===e:!1)??null:null,PFi=t=>1-(1-t)**3,MFi=(t,e,n)=>({a:t.a+(e.a-t.a)*n,b:t.b+(e.b-t.b)*n,c:t.c+(e.c-t.c)*n,d:t.d+(e.d-t.d)*n,e:t.e+(e.e-t.e)*n,f:t.f+(e.f-t.f)*n}),Ahn=t=>{t!==null&&window.cancelAnimationFrame(t)},DFi=({startTransform:t,endTransform:e,durationMs:n,onUpdate:o,setAnimationFrameId:i,onComplete:r})=>{const s=performance.now(),a=c=>{const l=c-s,u=Math.min(1,l/n),g=PFi(u);if(o(MFi(t,e,g)),u<1){i(window.requestAnimationFrame(a));return}i(null),r?.()},A=window.requestAnimationFrame(a);return i(A),A},afe=t=>t?.trim()||null;function I$e({primitiveElement:t,elements:e}){const n=t.source_trace_id;if(!n)return null;const o=wS(e),i=o.source_trace.get(n),r=afe(i?.name);if(r)return r;const s=o.source_net.get(n),a=afe(s?.name);if(a)return a;for(const A of i?.connected_source_net_ids??[]){const c=afe(o.source_net.get(A)?.name);if(c)return c}return null}function chn({primitiveElement:t,elements:e}){const n=wS(e).source_trace.get(t?.source_trace_id),o=t.trace_length,i=typeof o=="number",r=n?.max_length,s=i?`${o.toFixed(3)}${typeof r=="number"?` / ${r}`:""} mm`:"",a=I$e({primitiveElement:t,elements:e})??afe(n?.display_name);if(!s&&!a)return null;const A=!!(i&&typeof r=="number"&&o>r);return{text:s,name:a,isOverLength:A}}function gee(t,e){if(!t)return;const n=[];for(const o of[`${t.type}_id`,"pcb_port_id","pcb_trace_id","source_trace_id","source_net_id"]){const i=t[o];typeof i=="string"&&n.push(i)}for(const o of n){const i=e.getNetConnectedToId(o);if(i)return i}}function lhn(t){return t&&["pcb_trace","pcb_smtpad","pcb_plated_hole","pcb_via"].includes(t.type)}function NFi(t,e,n){const o=t.type==="pcb_trace"?I$e({primitiveElement:t,elements:e}):null;if(o)return o;const i=gee(t,n),r=i?e.filter(s=>gee(s,n)===i):[];for(const s of["source_net","source_trace"])for(const a of r)if(a.type===s&&"name"in a&&typeof a.name=="string"&&a.name.trim())return a.name.trim();if(t.type==="pcb_trace"){const s=chn({primitiveElement:t,elements:e})?.name;if(s)return s}for(const s of r)if(s.type==="source_trace"&&s.display_name?.trim())return s.display_name.trim();return"Net"}function RFi(t,e,n){return e.flatMap(o=>{if(o.type!=="source_bus")return[];const i=[...new Set(o.source_trace_ids.flatMap(r=>{const s=n.getNetConnectedToId(r);return s?[s]:[]}))];return i.includes(t)?[{id:o.source_bus_id,name:o.name?.trim()||"Bus",netIds:i}]:[]})}var TFi=async()=>{const{default:t}=await Promise.resolve().then(()=>(XRi(),Xgn));return new t};function kFi(t){const{elements:e,primitives:n,transform:o,width:i=500,height:r=500}=t,s=ee.useRef(null),a=ee.useRef(void 0),A=ee.useRef(!1),[c,l]=ee.useState(null),[u,g]=ee.useState(),h=Kc(w=>w.selected_layer),d=Kc(w=>w.hidden_layer_opacity),p=Kc(w=>w.is_showing_copper_pours),m=Kc(w=>w.is_showing_solder_mask),_=Kc(w=>w.is_showing_silkscreen),f=Kc(w=>w.is_showing_fabrication_notes),I=Kc(w=>w.is_showing_pcb_notes),C=Kc(w=>w.is_showing_courtyards),y=ee.useMemo(()=>[...new Set(n.flatMap(w=>{if(!w.is_mouse_over&&!w.is_in_highlighted_net)return[];const M=w._element,k=M?.[`${M.type}_id`];return k?[k]:[]}))],[n]),x=ee.useMemo(()=>(t.xRayElements??[]).map(w=>w[`${w.type}_id`]),[t.xRayElements]),E=ee.useMemo(()=>({selectedLayer:h,hiddenLayerOpacity:d,showCopperPours:p,showSolderMask:m,showSilkscreen:_,showFabricationNotes:f,showPcbNotes:I,showCourtyards:C,highlightedElementIds:y,xRayElementIds:x}),[h,d,p,m,_,f,I,C,y,x]),B=ee.useRef(e),S=ee.useRef(void 0);if(B.current=e,o){const w=typeof window>"u"?1:window.devicePixelRatio||1;S.current={type:"view",width:Math.max(1,Math.round(i*w)),height:Math.max(1,Math.round(r*w)),transform:{a:o.a*w,b:o.b*w,c:o.c*w,d:o.d*w,e:o.e*w,f:o.f*w},options:E}}ee.useEffect(()=>{let w=!1,M=!1,k;const R=document.createElement("canvas");R.className="pcb-webgpu-canvas",R.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none",s.current?.append(R);const F=U=>{w||M||(M=!0,clearTimeout(O),R.remove(),A.current=!1,k?.terminate(),k=void 0,a.current=void 0,s.current&&(s.current.dataset.xRayNetActive="false"),g(U))},O=setTimeout(()=>F("WebGPU worker startup timed out"),15e3);return(async()=>{try{if(!navigator.gpu||typeof Worker>"u"||!R.transferControlToOffscreen)throw new Error("WebGPU workers are unavailable");if(k=await TFi(),w||M){k.terminate();return}a.current=k,k.onmessage=({data:Y})=>{w||M||(Y.type==="rendered"?s.current&&(s.current.dataset.xRayNetActive=String(Y.xRayActive)):Y.type==="error"?F(Y.message):Y.type==="ready"&&(clearTimeout(O),l(Y.supportsXRayNet),A.current=!0,k.postMessage({type:"scene",elements:B.current}),S.current&&k.postMessage(S.current)))},k.onerror=Y=>{Y.preventDefault(),F(Y.message||"WebGPU worker failed")},k.addEventListener("messageerror",()=>{F("WebGPU worker communication failed")});const U=R.transferControlToOffscreen();k.postMessage({type:"init",canvas:U},[U])}catch(U){F(String(U))}})(),()=>{w=!0,clearTimeout(O),A.current=!1,a.current=void 0,k?.terminate(),R.remove()}},[]),ee.useEffect(()=>{A.current&&a.current?.postMessage({type:"scene",elements:e})},[e]),ee.useEffect(()=>{A.current&&S.current&&a.current?.postMessage(S.current)},[o,i,r,E]);const Q=!!(t.xRayElements&&c===!1);return K.jsx("div",{ref:s,"data-pcb-renderer":"webgpu","data-webgpu-error":u,style:{width:i,height:r,background:"black",position:"relative",overflow:"hidden"},children:u?K.jsxs("div",{role:"alert",style:{padding:16,color:"white",position:"relative"},children:[K.jsx("strong",{children:"WebGPU rendering failed"}),K.jsx("div",{children:u})]}):K.jsxs(K.Fragment,{children:[K.jsx(FT.SuperGrid,{textColor:"rgba(0,255,0,0.8)",majorColor:"rgba(0,255,0,0.4)",minorColor:"rgba(0,255,0,0.2)",screenSpaceCellSize:200,width:i,height:r,transform:o,stringifyCoord:(w,M,k)=>`${FT.toMMSI(w,k)}, ${FT.toMMSI(M,k)}`}),Q&&K.jsx("div",{role:"status",style:{padding:16,color:"white",position:"relative"},children:"X-Ray is unavailable in this WebGPU renderer."})]})})}var qi={board:{anchor:"rgb(255, 38, 226)",aux_items:"rgb(255, 255, 255)",b_adhes:"rgb(0, 0, 132)",b_crtyd:"rgb(38, 233, 255)",b_fab:"rgb(88, 93, 132)",b_mask:"rgba(2, 255, 238, 0.400)",b_paste:"rgb(0, 194, 194)",b_silks:"rgb(242, 237, 161)",background:"rgb(0, 16, 35)",cmts_user:"rgb(89, 148, 220)",copper:{b:"rgb(77, 127, 196)",f:"rgb(200, 52, 52)",in1:"rgb(127, 200, 127)",in10:"rgb(237, 124, 51)",in11:"rgb(91, 195, 235)",in12:"rgb(247, 111, 142)",in13:"rgb(167, 165, 198)",in14:"rgb(40, 204, 217)",in15:"rgb(232, 178, 167)",in16:"rgb(242, 237, 161)",in17:"rgb(237, 124, 51)",in18:"rgb(91, 195, 235)",in19:"rgb(247, 111, 142)",in2:"rgb(206, 125, 44)",in20:"rgb(167, 165, 198)",in21:"rgb(40, 204, 217)",in22:"rgb(232, 178, 167)",in23:"rgb(242, 237, 161)",in24:"rgb(237, 124, 51)",in25:"rgb(91, 195, 235)",in26:"rgb(247, 111, 142)",in27:"rgb(167, 165, 198)",in28:"rgb(40, 204, 217)",in29:"rgb(232, 178, 167)",in3:"rgb(79, 203, 203)",in30:"rgb(242, 237, 161)",in4:"rgb(219, 98, 139)",in5:"rgb(167, 165, 198)",in6:"rgb(40, 204, 217)",in7:"rgb(232, 178, 167)",in8:"rgb(242, 237, 161)",in9:"rgb(141, 203, 129)"},cursor:"rgb(255, 255, 255)",drc:"rgb(194, 194, 194)",drc_error:"rgba(215, 91, 107, 0.800)",drc_exclusion:"rgb(255, 255, 255)",drc_warning:"rgba(255, 208, 66, 0.902)",dwgs_user:"rgb(194, 194, 194)",eco1_user:"rgb(180, 219, 210)",eco2_user:"rgb(216, 200, 82)",edge_cuts:"rgb(208, 210, 205)",f_adhes:"rgb(132, 0, 132)",f_crtyd:"rgb(255, 0, 245)",f_fab:"rgb(175, 175, 175)",f_mask:"rgba(216, 100, 255, 0.400)",f_paste:"rgba(180, 160, 154, 0.902)",f_silks:"rgb(242, 237, 161)",footprint_text_back:"rgb(0, 0, 132)",footprint_text_front:"rgb(194, 194, 194)",footprint_text_invisible:"rgb(132, 132, 132)",grid:"rgb(132, 132, 132)",grid_axes:"rgb(194, 194, 194)",margin:"rgb(255, 38, 226)",microvia:"rgb(0, 132, 132)",no_connect:"rgb(0, 0, 132)",pad_back:"rgb(77, 127, 196)",pad_front:"rgb(200, 52, 52)",pad_plated_hole:"rgb(194, 194, 0)",pad_through_hole:"rgb(227, 183, 46)",plated_hole:"rgb(26, 196, 210)",ratsnest:"rgba(245, 255, 213, 0.702)",select_overlay:"rgb(4, 255, 67)",soldermaskWithCopper:{top:"rgb(18, 82, 50)",bottom:"rgb(77, 127, 196)"},soldermask:{top:"rgb(12, 55, 33)",bottom:"rgb(12, 55, 33)"},through_via:"rgb(236, 236, 236)",user_1:"rgb(194, 194, 194)",user_2:"rgb(89, 148, 220)",user_3:"rgb(180, 219, 210)",user_4:"rgb(216, 200, 82)",user_5:"rgb(194, 194, 194)",user_6:"rgb(89, 148, 220)",user_7:"rgb(180, 219, 210)",user_8:"rgb(216, 200, 82)",user_9:"rgb(232, 178, 167)",via_blind_buried:"rgb(187, 151, 38)",via_hole:"rgb(227, 183, 46)",via_micro:"rgb(0, 132, 132)",via_through:"rgb(236, 236, 236)",worksheet:"rgb(200, 114, 171)"}},Zx=(t,e=1)=>{if(Math.abs(t.a)!==Math.abs(t.d))throw new Error("Cannot scale non-uniformly");return e*Math.abs(t.a)},Ru={elementOverlay:40,dimensionOverlay:40,errorOverlay:40,pcbGroupOverlay:35,ratsNestOverlay:30,toolbarOverlay:70,warnings:30,topLayer:30,clickToInteractOverlay:100},dee={red:"red",black:"black",green:"green",board:"rgb(255, 255, 255)",other:"#eee",top:qi.board.copper.f,inner1:qi.board.copper.in1,inner2:qi.board.copper.in2,inner3:qi.board.copper.in3,inner4:qi.board.copper.in4,inner5:qi.board.copper.in5,inner6:qi.board.copper.in6,inner7:qi.board.copper.in7,inner8:qi.board.copper.in8,bottom:qi.board.copper.b,drill:qi.board.anchor,keepout:qi.board.background,tkeepout:qi.board.b_crtyd,tplace:qi.board.b_silks,top_courtyard:qi.board.f_crtyd,bottom_courtyard:qi.board.b_crtyd,top_silkscreen:qi.board.f_silks,bottom_silkscreen:qi.board.b_silks,top_fabrication:qi.board.f_fab,bottom_fabrication:qi.board.b_fab,soldermask_top:qi.board.soldermask.top,soldermask_bottom:qi.board.soldermask.bottom,soldermask_with_copper_top:qi.board.soldermaskWithCopper.top,soldermask_with_copper_bottom:qi.board.soldermaskWithCopper.bottom,bottom_notes:qi.board.user_2,top_notes:qi.board.user_2,...qi.board},FFi=["board","bottom","soldermask_bottom","bottom_silkscreen","top","soldermask_top","bottom_courtyard","bottom_fabrication","top_courtyard","top_fabrication","edge_cuts","top_silkscreen"],LFi=class{canvasLayerMap;ctxLayerMap;aperture;transform;foregroundLayer="top";hiddenLayerOpacity=.2;xRayNetActive=!1;lastPoint;constructor(t){this.canvasLayerMap=t,this.ctxLayerMap=Object.fromEntries(Object.entries(t).map(([e,n])=>[e,n.getContext("2d")])),this.transform=RP(),this.transform.d*=-1,this.transform=NC(this.transform,Qd(0,-500)),this.lastPoint={x:0,y:0},this.equip({})}clear(){for(const t of Object.values(this.ctxLayerMap))t.clearRect(0,0,t.canvas.width,t.canvas.height)}equip(t){this.aperture={fontSize:0,shape:"circle",mode:"add",size:0,color:"red",layer:"top",opacity:this.foregroundLayer===t.color?1:.5,...t}}drawMeshPattern(t,e,n,o,i,r=45){const s=this.getLayerCtx(),[a,A]=_i(this.transform,[t,e]),[c,l]=_i(this.transform,[t+n,e+o]),u=Zx(this.transform,i);s.lineWidth=1,s.strokeStyle=this.aperture.color;const g=h=>{const d=Math.sin(h),p=Math.cos(h),m=Math.sqrt((c-a)**2+(l-A)**2);for(let _=-m;_<=m;_+=u)s.beginPath(),s.moveTo(a+_*p-m*d,A+_*d+m*p),s.lineTo(a+_*p+m*d,A+_*d-m*p),s.stroke()};g(r*Math.PI/180),g((r+90)*Math.PI/180)}rect({x:t,y:e,w:n,h:o,mesh_fill:i,is_filled:r=!0,has_stroke:s,is_stroke_dashed:a,stroke_width:A,roundness:c}){const[l,u]=_i(this.transform,[t-n/2,e-o/2]),[g,h]=_i(this.transform,[t+n/2,e+o/2]);this.applyAperture();const d=this.getLayerCtx(),p=c?Zx(this.transform,c):0,m=s===void 0?r===!1:s;if(i)d.save(),d.beginPath(),p>0&&d.roundRect?d.roundRect(l,u,g-l,h-u,p):d.rect(l,u,g-l,h-u),d.clip(),this.drawMeshPattern(t-n/2,e-o/2,n,o,.15),d.restore(),p>0&&d.roundRect?(d.beginPath(),d.roundRect(l,u,g-l,h-u,p),d.stroke()):d.strokeRect(l,u,g-l,h-u);else if(r!==!1&&(p>0&&d.roundRect?(d.beginPath(),d.roundRect(l,u,g-l,h-u,p),d.fill()):d.fillRect(l,u,g-l,h-u)),m){const _=d.lineWidth;if(A!==void 0&&(d.lineWidth=Zx(this.transform,A)),a){let f=[];const I=Math.abs(this.transform.a);if(I>0){const y=.1*I,x=y*1.3;y>.5&&(f=[y,x])}d.setLineDash(f)}p>0&&d.roundRect?(d.beginPath(),d.roundRect(l,u,g-l,h-u,p),d.stroke()):d.strokeRect(l,u,g-l,h-u),a&&d.setLineDash([]),A!==void 0&&(d.lineWidth=_)}}rotatedRect(t,e,n,o,i,r,s){const a=this.getLayerCtx();this.applyAperture();const[A,c]=_i(this.transform,[t-n/2,e-o/2]),[l,u]=_i(this.transform,[t+n/2,e+o/2]),g=r?Zx(this.transform,r):0;a.save();const[h,d]=_i(this.transform,[t,e]);a.translate(h,d);const p=360-i;i&&a.rotate(p*Math.PI/180),a.translate(-h,-d),s?(a.beginPath(),g>0&&a.roundRect?a.roundRect(A,c,l-A,u-c,g):a.rect(A,c,l-A,u-c),a.clip(),this.drawMeshPattern(t-n/2,e-o/2,n,o,.15),g>0&&a.roundRect?(a.beginPath(),a.roundRect(A,c,l-A,u-c,g),a.stroke()):a.strokeRect(A,c,l-A,u-c)):g>0&&a.roundRect?(a.beginPath(),a.roundRect(A,c,l-A,u-c,g),a.fill()):a.fillRect(A,c,l-A,u-c),a.restore()}rotatedPill(t,e,n,o,i){const r=this.getLayerCtx();this.applyAperture(),r.save();const[s,a]=_i(this.transform,[t,e]);r.translate(s,a);const A=360-i;i&&r.rotate(A*Math.PI/180),r.translate(-s,-a),this.pill(t,e,n,o),r.restore()}circle(t,e,n,o,i=!0){const r=Zx(this.transform,n),[s,a]=_i(this.transform,[t,e]);this.applyAperture();const A=this.getLayerCtx();o?(A.save(),A.beginPath(),A.arc(s,a,r,0,2*Math.PI),A.clip(),this.drawMeshPattern(t-n,e-n,n*2,n*2,.15),A.restore(),A.beginPath(),A.arc(s,a,r,0,2*Math.PI),A.stroke()):(A.beginPath(),A.arc(s,a,r,0,2*Math.PI),A.fill())}oval(t,e,n,o){const i=Zx(this.transform,n),r=Zx(this.transform,o),[s,a]=_i(this.transform,[t,e]);this.applyAperture();const A=this.getLayerCtx();A.beginPath(),A.ellipse(s,a,i,r,0,0,2*Math.PI),A.fill(),A.closePath()}pill(t,e,n,o){const[i,r]=_i(this.transform,[t-n/2,e+o/2]),s=Zx(this.transform,n),a=Zx(this.transform,o),A=Math.min(s,a)/2;this.applyAperture();const c=this.getLayerCtx();c.beginPath(),c.arc(i+A,r+A,A,Math.PI,Math.PI*1.5),c.arc(i+s-A,r+A,A,Math.PI*1.5,0),c.arc(i+s-A,r+a-A,A,0,Math.PI*.5),c.arc(i+A,r+a-A,A,Math.PI*.5,Math.PI),c.fill(),c.closePath()}polygon(t){if(t.length<3)return;this.applyAperture();const e=this.getLayerCtx(),n=t.map(i=>_i(this.transform,[i.x,i.y]));e.beginPath(),e.moveTo(n[0][0],n[0][1]);for(let i=1;i<n.length;i++)e.lineTo(n[i][0],n[i][1]);e.closePath(),e.fill("evenodd");const o=Zx(this.transform,this.aperture.size);o>0&&(e.lineWidth=o,e.stroke())}debugText(t,e,n){const[o,i]=_i(this.transform,[e,n]);this.applyAperture();const r=this.getLayerCtx();r.font="10px sans-serif",r.fillText(t,o,i)}getLayerCtx(){const t=this.ctxLayerMap[this.aperture.layer];if(!t)throw new Error(`No context for layer "${this.aperture.layer}"`);return t}getLayerOpacity(t){if(this.xRayNetActive)return/^(top|bottom|inner\d+)$/.test(t)?this.hiddenLayerOpacity:0;const e=this.foregroundLayer,n=(e==="top"||e==="bottom")&&(t.startsWith(`${e}_`)||t.endsWith(`_${e}`)),o=["board","drill","edge_cuts","other"].includes(t);return t===e||n||o?1:this.hiddenLayerOpacity}orderAndFadeLayers(){const{canvasLayerMap:t,foregroundLayer:e}=this,o=["board",...Object.keys(t).filter(u=>/^inner\d+$/.test(u)).sort((u,g)=>Number(g.slice(5))-Number(u.slice(5))),...FFi.filter(u=>u!=="board")],i=e==="top"?"soldermask_top":e==="bottom"?"soldermask_bottom":void 0,r=e==="top"?"top_silkscreen":e==="bottom"?"bottom_silkscreen":void 0,s=e==="top"?"top_notes":e==="bottom"?"bottom_notes":void 0,a=e==="top"?"top_fabrication":e==="bottom"?"bottom_fabrication":void 0,A=e==="top"?"top_courtyard":e==="bottom"?"bottom_courtyard":void 0,c=[e,"edge_cuts",...i?[i]:[],...r?[r]:[],...s?[s]:[],...a?[a]:[],...A?[A]:[]],l=[...o.filter(u=>!c.includes(u)),...e==="drill"?[]:[e],...i?[i]:[],"edge_cuts",...r?[r]:[],...s?[s]:[],...a?[a]:[],...A?[A]:[],"drill"];l.forEach((u,g)=>{const h=t[u];h&&(h.style.zIndex=`${Ru.topLayer-(l.length-g)}`)});for(const[u,g]of Object.entries(t)){const h=this.getLayerOpacity(u);g.style.opacity=String(h),g.style.display=h===0?"none":""}}applyAperture(){const{transform:t,aperture:e}=this;let{size:n,mode:o,color:i,fontSize:r,layer:s}=e;s in this.ctxLayerMap||(this.aperture.layer="other");const a=this.getLayerCtx();if(!a)throw new Error(`No context for layer "${this.foregroundLayer}"`);if(i||(i="undefined"),a.lineWidth=Zx(t,n),a.lineCap="round",o==="add"){a.globalCompositeOperation="source-over";let A=dee[i.toLowerCase()];if(!A)try{A=Ka(i).rgb().toString()}catch{console.warn(`Invalid color format: '${i}'`),A="white"}a.fillStyle=A,a.strokeStyle=A}else a.globalCompositeOperation="destination-out",a.fillStyle="rgba(0,0,0,1)",a.strokeStyle="rgba(0,0,0,1)";a.font=`${Zx(V6(t),r)}px sans-serif`}moveTo(t,e){this.lastPoint={x:t,y:e}}lineTo(t,e){const[n,o]=_i(this.transform,[t,e]),{size:i,shape:r,mode:s}=this.aperture,a=Zx(this.transform,i),{lastPoint:A}=this,c=_i(this.transform,A);this.applyAperture();const l=this.getLayerCtx();r==="square"&&l.fillRect(c.x-a/2,c.y-a/2,a,a),l.beginPath(),l.moveTo(c.x,c.y),l.lineTo(n,o),l.stroke(),l.closePath(),r==="square"&&l.fillRect(n-a/2,o-a/2,a,a),this.lastPoint={x:t,y:e}}polygonWithArcs(t){const e=this.getLayerCtx(),n=o=>{if(o.vertices.length===0)return;const i=o.vertices[0],r=_i(this.transform,[i.x,i.y]);e.moveTo(r[0],r[1]);for(let s=0;s<o.vertices.length;s++){const a=o.vertices[s],A=o.vertices[(s+1)%o.vertices.length];if(a.bulge&&a.bulge!==0){const c=a.bulge,l=A.x-a.x,u=A.y-a.y,g=Math.sqrt(l*l+u*u);if(g<1e-9){const M=_i(this.transform,[A.x,A.y]);e.lineTo(M[0],M[1]);continue}const h=4*Math.atan(c),d=Math.abs(g/(2*Math.sin(h/2))),p=(a.x+A.x)/2,m=(a.y+A.y)/2,_=l/g,I=-(u/g),C=_,y=Math.sqrt(Math.max(0,d*d-(g/2)**2)),x=p+y*I*Math.sign(c),E=m+y*C*Math.sign(c),B=Math.atan2(a.y-E,a.x-x);let S=Math.atan2(A.y-E,A.x-x);c>0&&S<B?S+=2*Math.PI:c<0&&S>B&&(S-=2*Math.PI);const Q=_i(this.transform,[x,E]),w=Zx(this.transform,d);e.arc(Q[0],Q[1],w,-B,-S,c>0)}else{const c=_i(this.transform,[A.x,A.y]);e.lineTo(c[0],c[1])}}e.closePath()};if(e.beginPath(),n(t.outer_ring),t.inner_rings)for(const o of t.inner_rings)n(o);e.fill("evenodd")}},HFi=(t=2)=>{const e=Math.max(2,Math.min(10,Math.floor(t)));return["top",...Array.from({length:e-2},(n,o)=>`inner${o+1}`),"bottom"]},Afe=t=>{const e=t.find(n=>n.type==="pcb_board");return HFi(e?.num_layers??2)},C$e=t=>`${t}_copper`,uhn=t=>t.map(e=>e.endsWith("_copper")?e.slice(0,-7):e),OFi=t=>["board","bottom","soldermask_bottom","bottom_silkscreen","top","soldermask_top","soldermask_with_copper_bottom","soldermask_with_copper_top","top_fabrication","bottom_fabrication",...Afe(t).filter(n=>n.startsWith("inner")),"drill","edge_cuts","bottom_notes","top_notes","top_silkscreen","top_courtyard","bottom_courtyard","other"],GFi=(t,e)=>{const n=Afe(t).reverse();return[...n.filter(o=>o!==e),...n.filter(o=>o===e)]};function YFi(t){return t.type==="pcb_copper_pour"}function UFi({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=e.filter(YFi);if(i.length===0)return;const r=new xl(t);r.realToCanvasMat=o,r.drawElements(i,{layers:n})}var KFi={...i2,courtyard:{top:qi.board.f_crtyd,bottom:qi.board.b_crtyd}};function VFi(t){return t.type==="pcb_courtyard_circle"||t.type==="pcb_courtyard_rect"||t.type==="pcb_courtyard_outline"}function ghn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.configure({colorOverrides:KFi}),i.realToCanvasMat=o;const r=e.filter(VFi);i.drawElements(r,{layers:n})}var zFi={...i2,silkscreen:{top:qi.board.f_fab,bottom:qi.board.b_fab}};function JFi(t){return t.type.includes("pcb_fabrication_note")}function dhn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.configure({colorOverrides:zFi}),i.realToCanvasMat=o;const r=e.filter(JFi);i.drawElements(r,{layers:n})}function WFi(t){return t.type==="pcb_hole"}function jFi({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermask:i}){const r=new xl(t);r.realToCanvasMat=o;const s=e.filter(WFi);r.drawElements(s,{layers:n,drawSoldermask:i})}function $Fi(t){return t.type==="pcb_board"}function hhn({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermask:i}){const r=new xl(t);r.realToCanvasMat=o;const s=e.filter($Fi);for(const a of s)r.drawElements([a],{layers:n,drawSoldermask:!1,drawBoardMaterial:i??!1,minBoardOutlineStrokePx:2})}function qFi(t){return t.type==="pcb_copper_text"}function XFi({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=e.filter(qFi);if(i.length===0)return;const r=new xl(t);r.realToCanvasMat=o,r.drawElements(i,{layers:n})}function ZFi(t){return t.type==="pcb_cutout"}function eLi({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.realToCanvasMat=o;const r=e.filter(ZFi);i.drawElements(r,{layers:n})}function tLi(t){return t.type==="pcb_keepout"}function nLi({elements:t,layer:e}){return t.filter(tLi).filter(n=>n.layers.includes(e))}function oLi(t){return Ka(dee[t]).lighten(.4).hex()}function iLi({canvas:t,elements:e,layer:n,realToCanvasMat:o}){const i=nLi({elements:e,layer:n});if(i.length===0)return;const r=new xl(t),s=oLi(n);r.configure({colorOverrides:{keepout:{top:s,bottom:s}}}),r.realToCanvasMat=o,r.drawElements(i,{layers:[C$e(n)]})}function rLi(t){return t.type.startsWith("pcb_note_")}function phn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.realToCanvasMat=o;const r=e.filter(rLi);i.drawElements(r,{layers:n})}function sLi(t){return t.type==="pcb_panel"}function aLi({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermask:i}){const r=new xl(t);r.realToCanvasMat=o;const s=e.filter(sLi);for(const a of s)r.drawElements([a],{layers:n})}var ALi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()}};function cLi(t){return t.type==="pcb_smtpad"}function mhn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,drawSoldermask:r}){const s=new Set(uhn(n)),a=e.filter(cLi).filter(u=>s.has(u.layer));if(a.length===0)return;const A=new Set;if(i)for(const u of i)(u.is_mouse_over||u.is_in_highlighted_net)&&u._element?.type==="pcb_smtpad"&&A.add(u._element.pcb_smtpad_id);const c=a.filter(u=>A.has(u.pcb_smtpad_id)),l=a.filter(u=>!A.has(u.pcb_smtpad_id));if(l.length>0){const u=new xl(t);u.realToCanvasMat=o,u.drawElements(l,{layers:n,drawSoldermask:r})}if(c.length>0){const u=new xl(t);u.configure({colorOverrides:ALi}),u.realToCanvasMat=o,u.drawElements(c,{layers:n,drawSoldermask:r})}}var lLi={...i2,copper:Object.fromEntries(Object.entries(i2.copper).map(([t,e])=>[t,Ka(e).lighten(.5).toString()]))};function uLi(t){return t.type==="pcb_trace"}var gLi=(t,e)=>{const n=t.route.filter(r=>r.route_type==="wire"&&"layer"in r&&e.has(r.layer)?!0:r.route_type==="via"?e.has(r.from_layer)||e.has(r.to_layer):!1),o=n.filter(r=>r.route_type==="wire").length,i=n.some(r=>r.route_type==="via");return o<2&&!i?null:{...t,route:n}},dLi=t=>({...t,route:t.route.map(e=>!("is_inside_copper_pour"in e)||e.is_inside_copper_pour!==!0?e:{...e,is_inside_copper_pour:!1})}),hLi=(t,e)=>e?t:t.filter(n=>n.type!=="pcb_copper_pour"),pLi=({primitives:t})=>{const e=new Set;for(const n of t)(n.is_mouse_over||n.is_in_highlighted_net)&&n._element?.type==="pcb_trace"&&e.add(n._element.pcb_trace_id);return e};function _hn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,showCopperPours:r}){const s=new Set(uhn(n)),a=e.filter(uLi).map(g=>gLi(g,s)).filter(g=>g!==null).map(g=>r?g:dLi(g));if(a.length===0)return;const A=pLi({primitives:i??[]}),c=[],l=[];for(const g of a)A.has(g.pcb_trace_id)?c.push(g):l.push(g);const u=hLi(e,r);if(l.length>0){const g=new xl(t);g.realToCanvasMat=o,g.drawElements(l,{layers:n,clipContextElements:u})}if(c.length>0){const g=new xl(t);g.configure({colorOverrides:lLi}),g.realToCanvasMat=o,g.drawElements(c,{layers:n,clipContextElements:u})}}var mLi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()}};function _Li(t){return t.type==="pcb_plated_hole"}function fhn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,drawSoldermask:r}){const s=e.filter(_Li);if(s.length===0)return;const a=new Set;if(i)for(const l of i)(l.is_mouse_over||l.is_in_highlighted_net)&&l._element?.type==="pcb_plated_hole"&&a.add(l._element.pcb_plated_hole_id);const A=s.filter(l=>a.has(l.pcb_plated_hole_id)),c=s.filter(l=>!a.has(l.pcb_plated_hole_id));if(c.length>0){const l=new xl(t);l.realToCanvasMat=o,l.drawElements(c,{layers:n,drawSoldermask:r})}if(A.length>0){const l=new xl(t);l.configure({colorOverrides:mLi}),l.realToCanvasMat=o,l.drawElements(A,{layers:n,drawSoldermask:r})}}function Ihn(t){const{lines:e,anchorPoint:n,ccwRotation:o}=t;if(!o)return e;const i=o*Math.PI/180,r=wNi(i),s=NC(Qd(n.x,n.y),r,Qd(-n.x,-n.y));return _i(s,n),e.map(a=>({...a,x1:_i(s,{x:a.x1,y:a.y1}).x,y1:_i(s,{x:a.x1,y:a.y1}).y,x2:_i(s,{x:a.x2,y:a.y2}).x,y2:_i(s,{x:a.x2,y:a.y2}).y}))}var fLi=.6,Chn=.2,yhn=t=>{const e=t.size*.7,n=e*fLi,o=e*Chn,i=e*Chn,r=t.text.split(/\r?\n/),s=t.text.length>0&&e>0,a=s?r.length:0,A=s?r.map(u=>u.length===0?0:u.length*n+(u.length-1)*o):[],c=A.length>0?Math.max(...A):0,l=a>0?a*e+(a-1)*i:0;return{text_lines:r,line_count:a,line_widths:A,target_height:e,target_width_char:n,space_between_chars:o,space_between_lines:i,width:c,height:l}},xhn=t=>{const e=yhn(t);return{width:e.width,height:e.height,lineHeight:e.target_height,lineSpacing:e.space_between_lines,lineCount:e.line_count}},Ehn=t=>{const{text_lines:e,line_count:n,line_widths:o,target_height:i,target_width_char:r,space_between_chars:s,space_between_lines:a,width:A}=yhn(t);if(i<=0||n===0)return[];const c=i/12,l=[];for(let u=0;u<n;u++){const g=-u*(i+a),h=o[u],d=(A-h)/2;let p=t.x+d;for(let m=0;m<e[u].length;m++){const _=e[u][m],f=Ov[_]??Ov[_.toUpperCase()];if(!f){p+=r+s;continue}for(const{x1:I,y1:C,x2:y,y2:x}of f)l.push({_pcb_drawing_object_id:i9("line"),pcb_drawing_type:"line",x1:p+r*I,y1:t.y+g+i*C,x2:p+r*y,y2:t.y+g+i*x,width:c,layer:t.layer,unit:t.unit,color:t.color});p+=r+s}}return l};function X6(t){const n=t.color??dee[t.layer];let o=Ka(n);return t._element?.type==="pcb_copper_pour"&&(o=o.alpha(.7)),t.is_mouse_over||t.is_in_highlighted_net?o.lighten(.5).rgb().toString():o.rgb().toString()}var Bhn=(t,e)=>{t.equip({size:e.zoomIndependent?e.width/t.transform.a:e.width,shape:e.squareCap?"square":"circle",color:X6(e),layer:e.layer}),t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2)},ILi=(t,e,n)=>{switch(n){case"top_left":return{x:0,y:-e};case"top_center":return{x:-t/2,y:-e};case"top_right":return{x:-t,y:-e};case"center_left":return{x:0,y:-e/2};case"center":return{x:-t/2,y:-e/2};case"center_right":return{x:-t,y:-e/2};case"bottom_left":return{x:0,y:0};case"bottom_center":return{x:-t/2,y:0};case"bottom_right":return{x:-t,y:0};default:return{x:0,y:0}}},bhn=t=>t.layer==="bottom_silkscreen"||t.layer==="bottom"?t.is_mirrored!==!1:t.is_mirrored===!0,CLi=(t,e)=>{t.equip({fontSize:e.size,color:X6(e),layer:e.layer});const{width:n,height:o}=xhn(e),i=ILi(n,o,e.align);e.x??=0,e.y??=0;const r={x:e.x,y:e.y};let s=Ehn({...e,x:e.x+i.x,y:e.y+i.y});if(bhn(e)&&(s=s.map(a=>({...a,x1:2*e.x-a.x1,x2:2*e.x-a.x2}))),e.ccw_rotation){const a={lines:s,anchorPoint:r,ccwRotation:e.ccw_rotation};s=Ihn(a)}for(const a of s)Bhn(t,a)},yLi=(t,e)=>{const{width:n,height:o,lineHeight:i}=xhn(e);e.x??=0,e.y??=0;const r=e.knockout_padding??{left:e.size*.5,right:e.size*.5,top:e.size*.3,bottom:e.size*.3},s=n+r.left+r.right,a=o+r.top+r.bottom,A=n/2,c=i-o/2,l=e.x-A,u=e.y-c,g={x:e.x,y:e.y},h={_pcb_drawing_object_id:`knockout_rect_${e._pcb_drawing_object_id}`,x:e.x,y:e.y,w:s,h:a,layer:e.layer,ccw_rotation:e.ccw_rotation};e.ccw_rotation?Qhn(t,h):Shn(t,h);let d=Ehn({...e,x:l,y:u});if(bhn(e)&&(d=d.map(p=>({...p,x1:2*e.x-p.x1,x2:2*e.x-p.x2}))),e.ccw_rotation){const p={lines:d,anchorPoint:g,ccwRotation:e.ccw_rotation};d=Ihn(p)}for(const p of d)t.equip({size:p.width,shape:"circle",color:"black",layer:e.layer,mode:"subtract"}),t.moveTo(p.x1,p.y1),t.lineTo(p.x2,p.y2);t.equip({mode:"add"})},Shn=(t,e)=>{t.equip({color:X6(e),layer:e.layer,size:e.stroke_width}),t.rect({x:e.x,y:e.y,w:e.w,h:e.h,mesh_fill:e.mesh_fill,is_filled:e.is_filled,has_stroke:e.has_stroke,is_stroke_dashed:e.is_stroke_dashed,stroke_width:e.stroke_width,roundness:e.roundness})},Qhn=(t,e)=>{t.equip({color:X6(e),layer:e.layer}),t.rotatedRect(e.x,e.y,e.w,e.h,e.ccw_rotation,e.roundness,e.mesh_fill)},xLi=(t,e)=>{t.equip({color:X6(e),layer:e.layer}),t.rotatedPill(e.x,e.y,e.w,e.h,e.ccw_rotation)},ELi=(t,e)=>{t.equip({color:X6(e),layer:e.layer}),t.circle(e.x,e.y,e.r,e.mesh_fill)},BLi=(t,e)=>{t.equip({color:X6(e),layer:e.layer}),t.oval(e.x,e.y,e.rX,e.rY)},bLi=(t,e)=>{t.equip({color:X6(e),layer:e.layer}),t.pill(e.x,e.y,e.w,e.h)},SLi=(t,e)=>{t.equip({color:X6(e),layer:e.layer}),t.polygon(e.points)},QLi=(t,e)=>{t.equip({color:X6(e),layer:e.layer}),t.polygonWithArcs(e.brep_shape)},vLi=(t,e)=>{switch(e.pcb_drawing_type){case"line":return Bhn(t,e);case"text":return e.is_knockout?yLi(t,e):CLi(t,e);case"rect":return e.ccw_rotation?Qhn(t,e):Shn(t,e);case"circle":return ELi(t,e);case"oval":return BLi(t,e);case"pill":return e.ccw_rotation?xLi(t,e):bLi(t,e);case"polygon":return SLi(t,e);case"polygon_with_arcs":return QLi(t,e)}},wLi=(t,e)=>{for(const n of e)vLi(t,n)},PLi={...i2,silkscreen:{top:qi.board.f_silks,bottom:qi.board.b_silks}};function MLi(t){return t.type.includes("pcb_silkscreen")}function vhn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.configure({colorOverrides:PLi}),i.realToCanvasMat=o;const r=e.filter(MLi);i.drawElements(r,{layers:n})}var DLi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()},soldermask:{...i2.soldermask,top:Ka(qi.board.soldermask.top).lighten(.35).toString(),bottom:Ka(qi.board.soldermask.bottom).lighten(.35).toString()}};function whn({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermaskTop:i,drawSoldermaskBottom:r,primitives:s}){const a=new xl(t);a.realToCanvasMat=o;const A=e.filter(g=>g.type==="pcb_board");if(a.drawElements(e,{layers:n,drawSoldermask:!0,drawSoldermaskTop:i,drawSoldermaskBottom:r,drawBoardMaterial:!1}),A.length>1&&hhn({canvas:t,elements:A,layers:[],realToCanvasMat:o,drawSoldermask:!1}),!s)return;const c=new Set;for(const g of s){if(!(g.is_mouse_over||g.is_in_highlighted_net))continue;const h=g._element;h?.type==="pcb_smtpad"?c.add(h.pcb_smtpad_id):h?.type==="pcb_plated_hole"?c.add(h.pcb_plated_hole_id):h?.type==="pcb_via"&&c.add(h.pcb_via_id)}if(c.size===0)return;const l=e.filter(g=>g.type==="pcb_smtpad"?c.has(g.pcb_smtpad_id):g.type==="pcb_plated_hole"?c.has(g.pcb_plated_hole_id):g.type==="pcb_via"?c.has(g.pcb_via_id):!1);if(l.length===0)return;const u=new xl(t);u.configure({colorOverrides:DLi}),u.realToCanvasMat=o,u.drawElements(l,{layers:n,clipContextElements:e,drawSoldermask:!0,drawSoldermaskTop:i,drawSoldermaskBottom:r,drawBoardMaterial:!1})}var NLi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()}};function RLi(t){return t.type==="pcb_via"}function Phn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,drawSoldermask:r}){const s=e.filter(RLi).filter(l=>n.some(u=>u.includes("copper")));if(s.length===0)return;const a=new Set;if(i)for(const l of i)(l.is_mouse_over||l.is_in_highlighted_net)&&l._element?.type==="pcb_via"&&a.add(l._element.pcb_via_id);const A=s.filter(l=>a.has(l.pcb_via_id)),c=s.filter(l=>!a.has(l.pcb_via_id));if(c.length>0){const l=new xl(t);l.realToCanvasMat=o,l.drawElements(c,{layers:n,drawSoldermask:r,drawSoldermaskTop:n.includes("top_copper"),drawSoldermaskBottom:n.includes("bottom_copper"),clipContextElements:e})}if(A.length>0){const l=new xl(t);l.configure({colorOverrides:NLi}),l.realToCanvasMat=o,l.drawElements(A,{layers:n,drawSoldermask:r,drawSoldermaskTop:n.includes("top_copper"),drawSoldermaskBottom:n.includes("bottom_copper"),clipContextElements:e})}}var TLi=({primitives:t,isShowingSolderMask:e,isShowingSilkscreen:n,isShowingFabricationNotes:o})=>t.filter(i=>e||!i.layer?.includes("soldermask")).filter(i=>n||!i.layer?.includes("silkscreen")).filter(i=>o||!i.layer?.includes("fabrication")).filter(i=>i.layer!=="board").filter(i=>i._element?.type!=="pcb_smtpad").filter(i=>i._element?.type!=="pcb_plated_hole"||i.layer==="drill").filter(i=>i._element?.type!=="pcb_via").filter(i=>i._element?.type!=="pcb_trace").filter(i=>i._element?.type!=="pcb_copper_text"),kLi=({primitives:t,elements:e,xRayElements:n,transform:o,grid:i,width:r=500,height:s=500})=>{const a=ee.useRef(null),A=ee.useRef({}),c=Kc(_=>_.hidden_layer_opacity),l=Kc(_=>_.selected_layer),u=Kc(_=>_.is_showing_copper_pours),g=Kc(_=>_.is_showing_solder_mask),h=Kc(_=>_.is_showing_fabrication_notes),d=Kc(_=>_.is_showing_pcb_notes),p=Kc(_=>_.is_showing_courtyards),m=Kc(_=>_.is_showing_silkscreen);return ee.useEffect(()=>{if(!A.current||Object.keys(A.current).length===0)return;const _=Object.fromEntries(Object.entries(A.current).filter(([x,E])=>!!E));if(Object.keys(_).length===0)return;const f=new LFi(_);o&&(f.transform=o),f.clear(),f.foregroundLayer=l,f.hiddenLayerOpacity=c,f.xRayNetActive=!!n;const I=Object.fromEntries(Object.entries(_).filter(([x])=>f.getLayerOpacity(x)>0)),C=TLi({primitives:t,isShowingSolderMask:g,isShowingSilkscreen:m,isShowingFabricationNotes:h});if(wLi(f,C.filter(x=>f.getLayerOpacity(x.layer??"other")>0)),o){const x=Afe(e).map(Q=>({canvas:I[Q],layer:Q,copperLayer:C$e(Q)}));for(const{canvas:Q,copperLayer:w}of x)Q&&_hn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,showCopperPours:u});for(const{canvas:Q,copperLayer:w}of x)Q&&XFi({canvas:Q,elements:e,layers:[w],realToCanvasMat:o});for(const{canvas:Q,copperLayer:w,layer:M}of x)Q&&fhn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,drawSoldermask:g&&(M==="top"||M==="bottom")});for(const{canvas:Q,copperLayer:w}of x)Q&&UFi({canvas:Q,elements:e,layers:[w],realToCanvasMat:o});for(const{canvas:Q,copperLayer:w}of x)Q&&mhn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,drawSoldermask:g});for(const{canvas:Q,copperLayer:w,layer:M}of x)Q&&Phn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,drawSoldermask:g&&(M==="top"||M==="bottom")});if(g){const Q=l==="bottom"?"bottom":"top",w=Q==="top",M=Q==="bottom",k=I.soldermask_top;k&&Q==="top"&&whn({canvas:k,elements:e,layers:["top_soldermask"],realToCanvasMat:o,drawSoldermaskTop:w,drawSoldermaskBottom:M,primitives:t});const R=I.soldermask_bottom;R&&Q==="bottom"&&whn({canvas:R,elements:e,layers:["bottom_soldermask"],realToCanvasMat:o,drawSoldermaskTop:w,drawSoldermaskBottom:M,primitives:t})}const E=I.drill;if(E&&jFi({canvas:E,elements:e,layers:["drill"],realToCanvasMat:o}),m){const Q=I.top_silkscreen;Q&&vhn({canvas:Q,elements:e,layers:["top_silkscreen"],realToCanvasMat:o});const w=I.bottom_silkscreen;w&&vhn({canvas:w,elements:e,layers:["bottom_silkscreen"],realToCanvasMat:o})}if(h){const Q=I.top_fabrication;Q&&dhn({canvas:Q,elements:e,layers:["top_fabrication_note"],realToCanvasMat:o});const w=I.bottom_fabrication;w&&dhn({canvas:w,elements:e,layers:["bottom_fabrication_note"],realToCanvasMat:o})}if(d){const Q=I.bottom_notes;Q&&phn({canvas:Q,elements:e,layers:["bottom_user_note"],realToCanvasMat:o});const w=I.top_notes;w&&phn({canvas:w,elements:e,layers:["top_user_note"],realToCanvasMat:o})}if(p){const Q=I.top_courtyard;Q&&ghn({canvas:Q,elements:e,layers:["top_courtyard"],realToCanvasMat:o});const w=I.bottom_courtyard;w&&ghn({canvas:w,elements:e,layers:["bottom_courtyard"],realToCanvasMat:o})}const B=I.board;B&&(aLi({canvas:B,elements:e,layers:[],realToCanvasMat:o,drawSoldermask:g}),hhn({canvas:B,elements:e,layers:[],realToCanvasMat:o,drawSoldermask:g}));const S=I.edge_cuts;S&&eLi({canvas:S,elements:e,layers:["edge_cuts"],realToCanvasMat:o});for(const{canvas:Q,layer:w}of x)Q&&iLi({canvas:Q,elements:e,layer:w,realToCanvasMat:o})}f.orderAndFadeLayers();const y=a.current;if(y&&o&&n){y.getContext("2d").clearRect(0,0,r,s);for(const E of GFi(e,l)){const B={canvas:y,elements:n,layers:[C$e(E)],realToCanvasMat:o,drawSoldermask:!1};_hn({...B,showCopperPours:!1}),mhn(B),fhn(B),Phn(B)}const x=new xl(y);x.realToCanvasMat=o,x.drawElements(n.filter(E=>E.type==="pcb_via"||E.type==="pcb_plated_hole"),{layers:["drill"],drawSoldermask:!1})}},[t,e,n,r,s,o,l,c,u,g,h,d,p,m]),K.jsxs("div",{style:{backgroundColor:"black",width:r,height:s,position:"relative"},children:[K.jsx(FT.SuperGrid,{textColor:"rgba(0,255,0,0.8)",majorColor:"rgba(0,255,0,0.4)",minorColor:"rgba(0,255,0,0.2)",screenSpaceCellSize:200,width:r,height:s,transform:o,stringifyCoord:(_,f,I)=>`${FT.toMMSI(_,I)}, ${FT.toMMSI(f,I)}`}),n&&K.jsx("canvas",{ref:a,className:"pcb-x-ray-net",width:r,height:s,style:{position:"absolute",left:0,top:0,zIndex:Ru.topLayer,pointerEvents:"none"}}),OFi(e).filter(_=>!(!g&&_.includes("soldermask")||!m&&_.includes("silkscreen"))).map(_=>_.replace(/-/g,"")).map((_,f)=>K.jsx("canvas",{className:`pcb-layer-${_}`,ref:I=>{A.current??={},I?A.current[_]=I:delete A.current[_]},style:{position:"absolute",zIndex:f,left:0,top:0,pointerEvents:"none"},width:r,height:s},_))]})};new TextEncoder,(()=>{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)&t[0])})();var FLi=new Uint16Array([255]),LLi=new Uint8Array(FLi.buffer);LLi[0];var HLi=new Uint16Array([255]),OLi=new Uint8Array(HLi.buffer);OLi[0],new TextDecoder("latin1");var YP=1e-9,cfe=(t,e,n)=>t>=e-YP&&t<=n+YP,GLi=t=>{const e=[];for(const n of t)e.some(o=>Math.abs(o.x-n.x)<YP&&Math.abs(o.y-n.y)<YP)||e.push(n);return e};function YLi(t,e){const{origin:n,directionVector:o}=t;if(Math.abs(o.x)<YP&&Math.abs(o.y)<YP)return null;const i=[];if(Math.abs(o.x)>=YP){const c=(e.minX-n.x)/o.x,l=n.y+c*o.y;cfe(l,e.minY,e.maxY)&&i.push({x:e.minX,y:l});const u=(e.maxX-n.x)/o.x,g=n.y+u*o.y;cfe(g,e.minY,e.maxY)&&i.push({x:e.maxX,y:g})}if(Math.abs(o.y)>=YP){const c=(e.minY-n.y)/o.y,l=n.x+c*o.x;cfe(l,e.minX,e.maxX)&&i.push({x:l,y:e.minY});const u=(e.maxY-n.y)/o.y,g=n.x+u*o.x;cfe(g,e.minX,e.maxX)&&i.push({x:g,y:e.maxY})}const r=GLi(i);if(r.length<2)return null;let s=r[0],a=r[1],A=(s.x-a.x)**2+(s.y-a.y)**2;for(let c=0;c<r.length;c++)for(let l=c+1;l<r.length;l++){const u=r[c],g=r[l],h=(u.x-g.x)**2+(u.y-g.y)**2;h>A&&(s=u,a=g,A=h)}return[s,a]}function ULi(t,e,n){const o=V6(t),i=[_i(o,{x:0,y:0}),_i(o,{x:e,y:0}),_i(o,{x:0,y:n}),_i(o,{x:e,y:n})];return{minX:Math.min(...i.map(r=>r.x)),maxX:Math.max(...i.map(r=>r.x)),minY:Math.min(...i.map(r=>r.y)),maxY:Math.max(...i.map(r=>r.y))}}var KLi=.6,VLi=1,Mhn=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),Dhn=t=>(t.ccwRotationDegrees??0)*Math.PI/180,zLi=t=>t.a*t.d-t.b*t.c<0?1:-1,JLi=(t,e)=>Dhn(t)*zLi(e),WLi=(t,e)=>{const n=Math.cos(e),o=Math.sin(e);return{x:t.x*n-t.y*o,y:t.x*o+t.y*n}},jLi=t=>Nhn(t,Dhn(t)),$Li=(t,e)=>Nhn(t,JLi(t,e)),Nhn=(t,e)=>{const n=t.width/2,o=t.height/2;return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(i=>{const r=WLi(i,e);return{x:t.center.x+r.x,y:t.center.y+r.y}})},qLi=(t,e)=>{const n=$Li(t,e).map(c=>_i(e,c)),o=_i(e,t.center),i=Mhn(n[0],n[1]),r=Mhn(n[1],n[2]),s=n.length>=2?Math.atan2(n[1].y-n[0].y,n[1].x-n[0].x):0,a=s*180/Math.PI,A=n.reduce((c,l)=>({minX:Math.min(c.minX,l.x),maxX:Math.max(c.maxX,l.x),minY:Math.min(c.minY,l.y),maxY:Math.max(c.maxY,l.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0});return{center:o,corners:n,width:i,height:r,angleRadians:s,angleDegrees:a,bounds:A}},XLi=2,ZLi=12,eHi=12,lfe=t=>({tip:{...t},base:{...t},leftWing:{...t},rightWing:{...t}}),Rhn=(t,e,n)=>{const o=t.x-e.x,i=t.y-e.y,r=Math.hypot(o,i);if(r===0)return lfe(t);const s=o/r,A=-(i/r)*(n/2),c=s*(n/2);return{tip:{...t},base:{...e},leftWing:{x:e.x+A,y:e.y+c},rightWing:{x:e.x-A,y:e.y-c}}};function Thn(t){const{start:e,end:n}=t,o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i),s=XLi,a=ZLi;if(r===0){const f=t.doubleSided?[lfe(e),lfe(e)]:[lfe(e)];return{shaftStart:{...e},shaftEnd:{...e},heads:f,shaftWidth:s,headLength:0,headWidth:a,length:r}}const A=o/r,c=i/r,l=Math.min(eHi,r*.5),u=Math.max(l,s*2),g=t.doubleSided?r/2:r,h=Math.min(u,g),d={x:n.x-A*h,y:n.y-c*h},p=[Rhn(n,d,a)];let m={...e};const _={...d};if(t.doubleSided){const f={x:e.x+A*h,y:e.y+c*h};p.unshift(Rhn(e,f,a)),m=f}return{shaftStart:m,shaftEnd:_,heads:p,shaftWidth:s,headLength:h,headWidth:a,length:r}}function tHi(t){const e=Thn(t);return[e.shaftStart,e.shaftEnd,...e.heads.flatMap(o=>[o.tip,o.base,o.leftWing,o.rightWing])].reduce((o,i)=>({minX:Math.min(o.minX,i.x),maxX:Math.max(o.maxX,i.x),minY:Math.min(o.minY,i.y),maxY:Math.max(o.maxY,i.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function khn(t,e,{fontSize:n=12,strokeWidth:o=2,normalPadding:i=6,alongOffset:r=0}={}){const s={x:(t.x+e.x)/2,y:(t.y+e.y)/2},a=e.x-t.x,A=e.y-t.y,c=Math.hypot(a,A);if(c===0)return{x:s.x+r,y:s.y-(o/2+n*.65+i),angleRadians:0,angleDegrees:0,direction:{x:1,y:0},normal:{x:0,y:-1}};let l=a/c,u=A/c,g=-u,h=l;(l<0||l===0&&u<0)&&(l=-l,u=-u,g=-g,h=-h);const p=Math.atan2(u,l),m=o/2+n*.65+i;return{x:s.x+g*m+l*r,y:s.y+h*m+u*r,angleRadians:p,angleDegrees:p*180/Math.PI,direction:{x:l,y:u},normal:{x:g,y:h}}}var UP=["rgba(239, 68, 68, 0.8)","rgba(249, 115, 22, 0.8)","rgba(245, 158, 11, 0.8)","rgba(234, 179, 8, 0.8)","rgba(132, 204, 22, 0.8)","rgba(34, 197, 94, 0.8)","rgba(16, 185, 129, 0.8)","rgba(20, 184, 166, 0.8)","rgba(6, 182, 212, 0.8)","rgba(14, 165, 233, 0.8)","rgba(59, 130, 246, 0.8)","rgba(99, 102, 241, 0.8)","rgba(139, 92, 246, 0.8)","rgba(168, 85, 247, 0.8)","rgba(217, 70, 239, 0.8)","rgba(236, 72, 153, 0.8)","rgba(249, 168, 212, 0.8)","rgba(161, 161, 170, 0.8)"];function Fhn(t,e,n,o={}){const i=o.padding??40,r=o.yFlip??!1;let s;if("center"in t){const l=t.width/2,u=t.height/2;s={minX:t.center.x-l,maxX:t.center.x+l,minY:t.center.y-u,maxY:t.center.y+u}}else s=t;const a=s.maxX-s.minX||1,A=s.maxY-s.minY||1,c=Math.min((e-2*i)/a,(n-2*i)/A);return NC(Qd(e/2,n/2),vS(c,r?-c:c),Qd(-(s.minX+a/2),-(s.minY+A/2)))}function nHi(t){const e=[...t.points||[],...(t.lines||[]).flatMap(n=>n.points),...(t.polygons||[]).flatMap(n=>n.points),...(t.rects||[]).flatMap(n=>jLi(n)),...(t.circles||[]).flatMap(n=>[{x:n.center.x-n.radius,y:n.center.y},{x:n.center.x+n.radius,y:n.center.y},{x:n.center.x,y:n.center.y-n.radius},{x:n.center.x,y:n.center.y+n.radius}]),...(t.arrows||[]).flatMap(n=>{const o=tHi(n);return[{x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY}]}),...(t.texts||[]).flatMap(n=>{const o=n.fontSize??12,i=n.text.length*o*KLi,r=o*VLi,s=n.anchorSide??"center",a={top_left:{dx:0,dy:0},top_center:{dx:-i/2,dy:0},top_right:{dx:-i,dy:0},center_left:{dx:0,dy:-r/2},center:{dx:-i/2,dy:-r/2},center_right:{dx:-i,dy:-r/2},bottom_left:{dx:0,dy:-r},bottom_center:{dx:-i/2,dy:-r},bottom_right:{dx:-i,dy:-r}},{dx:A,dy:c}=a[s],l=n.x+A,u=n.y+c;return[{x:l,y:u},{x:l+i,y:u+r}]})];return e.length===0?{minX:-1,maxX:1,minY:-1,maxY:1}:e.reduce((n,o)=>({minX:Math.min(n.minX,o.x),maxX:Math.max(n.maxX,o.x),minY:Math.min(n.minY,o.y),maxY:Math.max(n.maxY,o.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function oHi(t,e,n={}){const o=n.disableLabels!==!1,i=n.hideInlineLabels??o,r=e instanceof HTMLCanvasElement?e.getContext("2d"):e;if(!r)throw new Error("Could not get 2D context from canvas");const s=e instanceof HTMLCanvasElement?e.width:e.canvas.width,a=e instanceof HTMLCanvasElement?e.height:e.canvas.height;let A;if(n.transform)A=n.transform;else if(n.viewbox)A=Fhn(n.viewbox,s,a,{padding:n.padding,yFlip:n.yFlip});else{const c=nHi(t),l=t.coordinateSystem==="cartesian";A=Fhn(c,s,a,{padding:n.padding??40,yFlip:l})}if(r.clearRect(0,0,s,a),r.save(),t.rects&&t.rects.length>0&&t.rects.forEach(c=>{const l=qLi(c,A);r.save(),r.translate(l.center.x,l.center.y),Math.abs(l.angleRadians)>1e-6&&r.rotate(l.angleRadians),r.beginPath(),r.rect(-l.width/2,-l.height/2,l.width,l.height),c.fill&&(r.fillStyle=c.fill,r.fill()),c.stroke&&(r.strokeStyle=c.stroke,r.stroke()),r.restore()}),t.circles&&t.circles.length>0&&t.circles.forEach(c=>{const l=_i(A,c.center),u=c.radius*Math.abs(A.a);r.beginPath(),r.arc(l.x,l.y,u,0,2*Math.PI),c.fill&&(r.fillStyle=c.fill,r.fill()),c.stroke&&(r.strokeStyle=c.stroke??"transparent",r.stroke())}),t.polygons&&t.polygons.length>0&&t.polygons.forEach(c=>{if(c.points.length===0)return;const l=c.points.map(u=>_i(A,u));r.beginPath(),r.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++)r.lineTo(l[u].x,l[u].y);r.closePath(),c.fill&&(r.fillStyle=c.fill,r.fill()),c.stroke&&(r.strokeStyle=c.stroke,c.strokeWidth!==void 0&&(r.lineWidth=c.strokeWidth*Math.abs(A.a)),r.stroke())}),t.arrows&&t.arrows.length>0&&t.arrows.forEach((c,l)=>{const u=Thn(c),g=_i(A,u.shaftStart),h=_i(A,u.shaftEnd),d=c.color||UP[l%UP.length],p=Math.hypot(A.a,A.b);r.strokeStyle=d,r.fillStyle=d,r.lineWidth=u.shaftWidth*(p||1),r.lineCap="round",r.setLineDash([]),r.beginPath(),r.moveTo(g.x,g.y),r.lineTo(h.x,h.y),r.stroke(),u.heads.forEach(y=>{const x=_i(A,y.tip),E=_i(A,y.leftWing),B=_i(A,y.rightWing);r.beginPath(),r.moveTo(x.x,x.y),r.lineTo(E.x,E.y),r.lineTo(B.x,B.y),r.closePath(),r.fill()});const m=12,_=u.shaftWidth*(p||1),f=m*.6,I=khn(g,h,{fontSize:m,strokeWidth:_,normalPadding:6,alongOffset:c.label?f:0}),C=khn(g,h,{fontSize:m,strokeWidth:_,normalPadding:12,alongOffset:c.inlineLabel?-f:0});if(r.fillStyle=d,r.font=`${m}px sans-serif`,!o&&c.label){const y=C.x,x=C.y;r.save(),r.textAlign="center",r.textBaseline="middle",r.fillText(c.label,y,x),r.restore()}!i&&c.inlineLabel&&(r.save(),r.translate(I.x,I.y),r.rotate(I.angleRadians),r.textAlign="center",r.textBaseline="middle",r.fillText(c.inlineLabel,0,0),r.restore())}),t.lines&&t.lines.length>0&&t.lines.map((c,l)=>({line:c,originalIndex:l})).sort((c,l)=>(c.line.zIndex??0)-(l.line.zIndex??0)||c.originalIndex-l.originalIndex).forEach(({line:c,originalIndex:l})=>{if(c.points.length===0)return;r.beginPath();const u=_i(A,c.points[0]);r.moveTo(u.x,u.y);for(let g=1;g<c.points.length;g++){const h=_i(A,c.points[g]);r.lineTo(h.x,h.y)}if(r.strokeStyle=c.strokeColor||UP[l%UP.length],c.strokeWidth?r.lineWidth=c.strokeWidth*A.a:r.lineWidth=2,r.lineCap="round",c.strokeDash)if(typeof c.strokeDash=="string"){let g;if(c.strokeDash.includes(","))g=c.strokeDash.split(",").map(h=>parseFloat(h.trim())).filter(h=>!Number.isNaN(h));else{const h=parseFloat(c.strokeDash.trim());g=Number.isNaN(h)?[]:[h]}r.setLineDash(g)}else r.setLineDash(c.strokeDash.map(g=>g*Math.abs(A.a)));else r.setLineDash([]);r.stroke()}),t.infiniteLines&&t.infiniteLines.length>0){const c=ULi(A,s,a);t.infiniteLines.forEach((l,u)=>{const g=YLi(l,c);if(!g)return;const[h,d]=g,p=_i(A,h),m=_i(A,d);if(r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(m.x,m.y),r.strokeStyle=l.strokeColor||UP[u%UP.length],r.lineWidth=l.strokeWidth?l.strokeWidth*Math.abs(A.a):2,r.lineCap="round",l.strokeDash)if(typeof l.strokeDash=="string"){let _;if(l.strokeDash.includes(","))_=l.strokeDash.split(",").map(f=>parseFloat(f.trim())).filter(f=>!Number.isNaN(f));else{const f=parseFloat(l.strokeDash.trim());_=Number.isNaN(f)?[]:[f]}r.setLineDash(_)}else r.setLineDash(l.strokeDash.map(_=>_*Math.abs(A.a)));else r.setLineDash([]);r.stroke()})}t.texts&&t.texts.length>0&&t.texts.forEach(c=>{const l=_i(A,{x:c.x,y:c.y});r.fillStyle=c.color||"black",r.font=`${(c.fontSize??12)*Math.abs(A.a)}px sans-serif`;const u=c.anchorSide??"center",g={top_left:"left",center_left:"left",bottom_left:"left",top_center:"center",center:"center",bottom_center:"center",top_right:"right",center_right:"right",bottom_right:"right"},h={top_left:"top",top_center:"top",top_right:"top",center_left:"middle",center:"middle",center_right:"middle",bottom_left:"bottom",bottom_center:"bottom",bottom_right:"bottom"};r.textAlign=g[u],r.textBaseline=h[u],r.fillText(c.text,l.x,l.y)}),t.points&&t.points.length>0&&t.points.forEach((c,l)=>{const u=_i(A,c);r.beginPath(),r.arc(u.x,u.y,3,0,2*Math.PI),r.fillStyle=c.color||UP[l%UP.length],r.fill(),c.label&&!o&&(r.fillStyle=c.color||"black",r.font="12px sans-serif",r.fillText(c.label,u.x+5,u.y-5))}),r.restore()}qgn(ZRi(),1);var iHi=({children:t,transform:e,debugGraphics:n})=>{const o=ee.useRef(null),[i,{width:r,height:s}]=uee(),a=Kc(A=>A.is_showing_autorouting);return ee.useEffect(()=>{a&&o.current&&n&&r&&s&&(o.current.width=r,o.current.height=s,oHi(n,o.current,{transform:e,disableLabels:!0}))},[n,e,r,s,a]),a?K.jsxs("div",{ref:i,style:{position:"relative",width:"100%",height:"100%"},children:[t,K.jsx("canvas",{ref:o,style:{position:"absolute",top:0,left:0,opacity:.5,zIndex:100,width:"100%",height:"100%",pointerEvents:"none"}})]}):t},ufe=(t,e,n)=>n(t,e),Lhn=(t,e,n,o,i)=>{const r=i*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=t-n,c=e-o,l=A*s-c*a,u=A*a+c*s;return{x:l+n,y:u+o}},hee=t=>{if(t.length===0)return null;let e=t[0].x,n=t[0].x,o=t[0].y,i=t[0].y;for(const r of t)e=ufe(e,r.x,Math.min),n=ufe(n,r.x,Math.max),o=ufe(o,r.y,Math.min),i=ufe(i,r.y,Math.max);return{minX:e,maxX:n,minY:o,maxY:i}},rHi=(t,e)=>({minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}),sHi=(t,e)=>t?rHi(t,e):e,aHi=t=>{switch(t.pcb_drawing_type){case"line":{const e=(t.width??0)/2,n=[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}],o=hee(n);return o?{minX:o.minX-e,maxX:o.maxX+e,minY:o.minY-e,maxY:o.maxY+e}:null}case"rect":{const e=t.w/2,n=t.h/2,o=[{x:t.x-e,y:t.y-n},{x:t.x+e,y:t.y-n},{x:t.x+e,y:t.y+n},{x:t.x-e,y:t.y+n}],i=t.ccw_rotation??0,r=i===0?o:o.map(s=>Lhn(s.x,s.y,t.x,t.y,i));return hee(r)}case"circle":return{minX:t.x-t.r,maxX:t.x+t.r,minY:t.y-t.r,maxY:t.y+t.r};case"oval":return{minX:t.x-t.rX,maxX:t.x+t.rX,minY:t.y-t.rY,maxY:t.y+t.rY};case"pill":{const e=t.w/2,n=t.h/2,o=[{x:t.x-e,y:t.y-n},{x:t.x+e,y:t.y-n},{x:t.x+e,y:t.y+n},{x:t.x-e,y:t.y+n}],i=t.ccw_rotation??0,r=i===0?o:o.map(s=>Lhn(s.x,s.y,t.x,t.y,i));return hee(r)}case"polygon":return hee(t.points);case"polygon_with_arcs":{const e=t.brep_shape.outer_ring.vertices.map(n=>({x:n.x,y:n.y}));return hee(e)}case"text":{const e=t.size??0,n=t.text?t.text.length*e*.6:0,o=e;if(n===0&&o===0)return{minX:t.x,maxX:t.x,minY:t.y,maxY:t.y};const i=n/2,r=o/2;return{minX:t.x-i,maxX:t.x+i,minY:t.y-r,maxY:t.y+r}}default:return null}};function AHi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t,a=n.x-e.x,A=n.y-e.y,c=Math.sqrt(a*a+A*A),l=i.x-o.x,u=i.y-o.y,g=Math.sqrt(l*l+u*u),h=Math.atan2(u,l)*(180/Math.PI),d=Math.abs(h)%90,m=Math.min(d,90-d)>15,_=(o.x+i.x)/2,f=(o.y+i.y)/2,I=15,C=h+90;let y=Math.cos(C*Math.PI/180)*I,x=Math.sin(C*Math.PI/180)*I;const E=l>0&&u<0,B=l>0&&u>0,S=l<0&&u>0;r!==s&&!E&&(y=-y,x=-x),E&&(y+=Math.cos(C*Math.PI/180)*-45,x+=Math.sin(C*Math.PI/180)*-45),B&&(y+=Math.cos(C*Math.PI/180)+-20,x+=Math.sin(C*Math.PI/180)+-10),S&&(y+=Math.cos(C*Math.PI/180)*10,x+=Math.sin(C*Math.PI/180)*10);const Q=_+y,w=f+x;return{distance:c,screenDistance:g,x:Q,y:w,show:c>.01&&g>30&&m}}function cHi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t;return ee.useMemo(()=>AHi({dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}),[e,n,o,i,r,s])}var lHi=(t,e,n)=>{const o=n*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=t.x-e.x,a=t.y-e.y,A=s*i-a*r,c=s*r+a*i;return{x:A+e.x,y:c+e.y}},Hhn=(t,e,n,o)=>{const i={top_left:{x:t.x-e,y:t.y-n},top_center:{x:t.x,y:t.y-n},top_right:{x:t.x+e,y:t.y-n},center_left:{x:t.x-e,y:t.y},center:{x:t.x,y:t.y},center_right:{x:t.x+e,y:t.y},bottom_left:{x:t.x-e,y:t.y+n},bottom_center:{x:t.x,y:t.y+n},bottom_right:{x:t.x+e,y:t.y+n}};return o===0?Object.entries(i).map(([r,s])=>({anchor:r,point:s})):Object.entries(i).map(([r,s])=>({anchor:r,point:lHi(s,t,o)}))},uHi=t=>{switch(t.pcb_drawing_type){case"rect":{const e=t.ccw_rotation??0;return Hhn({x:t.x,y:t.y},t.w/2,t.h/2,e)}case"pill":{const e=t.ccw_rotation??0;return Hhn({x:t.x,y:t.y},t.w/2,t.h/2,e)}case"circle":return[{anchor:"circle_center",point:{x:t.x,y:t.y}},{anchor:"circle_right",point:{x:t.x+t.r,y:t.y}},{anchor:"circle_left",point:{x:t.x-t.r,y:t.y}},{anchor:"circle_top",point:{x:t.x,y:t.y-t.r}},{anchor:"circle_bottom",point:{x:t.x,y:t.y+t.r}}];case"oval":return[{anchor:"oval_center",point:{x:t.x,y:t.y}},{anchor:"oval_right",point:{x:t.x+t.rX,y:t.y}},{anchor:"oval_left",point:{x:t.x-t.rX,y:t.y}},{anchor:"oval_top",point:{x:t.x,y:t.y-t.rY}},{anchor:"oval_bottom",point:{x:t.x,y:t.y+t.rY}}];case"line":{const e={x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2};return[{anchor:"line_start",point:{x:t.x1,y:t.y1}},{anchor:"line_mid",point:e},{anchor:"line_end",point:{x:t.x2,y:t.y2}}]}case"polygon":return t.points.map((e,n)=>({anchor:`polygon_vertex_${n}`,point:e}));case"polygon_with_arcs":return t.brep_shape.outer_ring.vertices.map((e,n)=>({anchor:`polygon_with_arcs_vertex_${n}`,point:{x:e.x,y:e.y}}));default:return[]}},Ohn=({screenPoint:{x:t,y:e}})=>`M${t-2.5},${e-2.5}l5,5m0,-5l-5,5`,gHi=ee.memo(function({points:e,startId:n,endId:o}){const{path:i,pointsById:r}=ee.useMemo(()=>({path:e.map(Ohn).join(""),pointsById:new Map(e.map(a=>[a.id,a]))}),[e]),s=[...new Set([n,o])].flatMap(a=>{const A=a===null?void 0:r.get(a);return A?[Ohn(A)]:[]}).join("");return K.jsxs("svg",{"aria-hidden":"true",width:"100%",height:"100%",style:{position:"absolute",left:0,top:0,overflow:"visible",pointerEvents:"none",zIndex:Ru.dimensionOverlay},fill:"none",strokeWidth:1,children:[K.jsx("path",{d:i,stroke:"white"}),K.jsx("path",{d:s,stroke:"#66ccff"})]})}),dHi=16,hHi=[],pHi=RP(),Ghn=t=>{if(t.pcb_drawing_type==="text")return!0;const e=t._element;if(!e||typeof e!="object")return!1;const n=typeof e.type=="string"?e.type:void 0;return n?!!(n.startsWith("pcb_silkscreen_")||n.startsWith("pcb_note_")||n==="pcb_text"||n.startsWith("pcb_fabrication_note_")&&n!=="pcb_fabrication_note_rect"):!1},mHi=({children:t,transform:e,focusOnHover:n=!1,primitives:o=hHi,onBoundsSelected:i,cancelPanDrag:r})=>{e||(e=pHi);const[s,a]=ee.useState(!1),[A,c]=ee.useState(!1),[l,u]=ee.useState(!1),[g,h]=ee.useState(!1),[d,p]=ee.useState(!1),[m,_]=ee.useState(!1),[f,I]=ee.useState({start:null,end:null}),C=Kc(ve=>ve.is_mouse_over_container),y=ee.useCallback(()=>{l&&(u(!1),window.dispatchEvent(new Event("disarm-dimension-tool")))},[l]),x=ee.useCallback(()=>{g&&(h(!1),window.dispatchEvent(new Event("disarm-bounds-tool")))},[g]),[E,B]=ee.useState({x:0,y:0}),[S,Q]=ee.useState({x:0,y:0}),[w,M]=ee.useState({x:0,y:0}),[k,R]=ee.useState({x:0,y:0}),F=ee.useRef({x:0,y:0}),O=ee.useRef(!1),U=ee.useRef(null),W=U.current?.getBoundingClientRect(),te=ee.useMemo(()=>{const ve=new Map;for(const he of o){if(!he._element||Ghn(he)||he.pcb_drawing_type==="pill"||he.pcb_drawing_type==="rect"&&he.ccw_rotation&&he.ccw_rotation!==0)continue;const Qe=aHi(he);if(!Qe)continue;const Pe=ve.get(he._element);ve.set(he._element,sHi(Pe??void 0,Qe))}return ve},[o]),j=ee.useMemo(()=>{const ve=[];for(const he of o){if(!he._element||Ghn(he))continue;const Qe=uHi(he);if(Qe.length!==0)for(const Pe of Qe)ve.push({anchor:Pe.anchor,point:Pe.point,element:he._element})}return ve},[o]),J=ee.useMemo(()=>{const ve=[];te.forEach((he,Qe)=>{if(!he)return;const Pe=(he.minX+he.maxX)/2,we=(he.minY+he.maxY)/2,Te={top_left:{x:he.minX,y:he.minY},top_center:{x:Pe,y:he.minY},top_right:{x:he.maxX,y:he.minY},center_left:{x:he.minX,y:we},center:{x:Pe,y:we},center_right:{x:he.maxX,y:we},bottom_left:{x:he.minX,y:he.maxY},bottom_center:{x:Pe,y:he.maxY},bottom_right:{x:he.maxX,y:he.maxY}};for(const[Re,Ee]of Object.entries(Te))ve.push({anchor:Re,point:Ee,element:Qe})});for(const he of j)ve.push(he);return ve.push({anchor:"origin",point:{x:0,y:0},element:null}),ve},[te,j]),oe=ee.useMemo(()=>J.map((ve,he)=>({...ve,id:`${he}-${ve.anchor}`,screenPoint:_i(e,ve.point)})),[J,e]),ie=ee.useCallback(ve=>{if(oe.length===0)return{point:ve,id:null};const he=_i(e,ve);let Qe=null;for(const Pe of oe){const we=Pe.screenPoint.x-he.x,Te=Pe.screenPoint.y-he.y,Re=Math.hypot(we,Te);Re>dHi||(!Qe||Re<Qe.distance)&&(Qe={distance:Re,id:Pe.id,point:Pe.point})}return Qe?{point:Qe.point,id:Qe.id}:{point:ve,id:null}},[oe,e]);ee.useEffect(()=>{const ve=Pe=>{const we=Pe.target;if(we.tagName==="INPUT"||we.tagName==="TEXTAREA"||we.isContentEditable)return;const Te=U.current?.contains(document.activeElement)||document.activeElement===U.current;if(!(!C&&!Te)){if(Pe.key==="d"){const Re=ie({x:F.current.x,y:F.current.y});B({x:Re.point.x,y:Re.point.y}),Q({x:Re.point.x,y:Re.point.y}),I({start:Re.id,end:Re.id}),s?(a(!1),c(!1),I({start:null,end:null})):(a(!0),c(!0)),y()}Pe.key==="Escape"&&(a(!1),c(!1),I({start:null,end:null}),p(!1),_(!1),y(),x())}},he=()=>{u(!0),h(!1),window.dispatchEvent(new Event("disarm-bounds-tool"))},Qe=()=>{h(!0),u(!1),a(!1),c(!1),window.dispatchEvent(new Event("disarm-dimension-tool"))};return window.addEventListener("keydown",ve),window.addEventListener("arm-dimension-tool",he),window.addEventListener("arm-bounds-tool",Qe),()=>{window.removeEventListener("keydown",ve),window.removeEventListener("arm-dimension-tool",he),window.removeEventListener("arm-bounds-tool",Qe),y(),x()}},[C,s,y,x,ie]);const ne=_i(e,E),le=_i(e,S),ge=_i(e,w),_e=_i(e,k),ue={minX:Math.min(w.x,k.x),minY:Math.min(w.y,k.y),maxX:Math.max(w.x,k.x),maxY:Math.max(w.y,k.y)},fe={left:Math.min(ge.x,_e.x),top:Math.min(ge.y,_e.y),width:Math.abs(ge.x-_e.x),height:Math.abs(ge.y-_e.y)},pe=ee.useCallback((ve,he)=>{const Qe={minX:Math.min(ve.x,he.x),minY:Math.min(ve.y,he.y),maxX:Math.max(ve.x,he.x),maxY:Math.max(ve.y,he.y)};i?.(Qe),window.dispatchEvent(new CustomEvent("pcb-viewer:bounds-selected",{detail:Qe}))},[i]),ye={left:Math.min(ne.x,le.x),right:Math.max(ne.x,le.x),top:Math.min(ne.y,le.y),bottom:Math.max(ne.y,le.y),flipX:ne.x>le.x,flipY:ne.y>le.y,width:0,height:0};ye.width=ye.right-ye.left,ye.height=ye.bottom-ye.top;const Me=cHi({dimensionStart:E,dimensionEnd:S,screenDimensionStart:ne,screenDimensionEnd:le,flipX:ye.flipX,flipY:ye.flipY});return K.jsxs("div",{ref:U,"data-pcb-viewer":!0,tabIndex:0,style:{position:"relative",outline:"none"},onMouseDownCapture:()=>{O.current=!1},onClickCapture:ve=>{O.current&&(O.current=!1,ve.stopPropagation(),U.current?.focus())},onContextMenuCapture:ve=>{!l&&!s&&!O.current||(ve.preventDefault(),ve.stopPropagation())},onMouseEnter:()=>{n&&U.current&&U.current.focus()},onMouseLeave:()=>{U.current&&U.current.blur()},onClick:()=>{U.current&&U.current.focus()},onMouseMove:ve=>{const he=ve.currentTarget.getBoundingClientRect(),Qe=ve.clientX-he.left,Pe=ve.clientY-he.top,we=_i(V6(e),{x:Qe,y:Pe});if(F.current.x=we.x,F.current.y=we.y,A){const Te=ie(we);Q({x:Te.point.x,y:Te.point.y}),I(Re=>({...Re,end:Te.id}))}m&&(r?.(),R({x:we.x,y:we.y}))},onMouseDown:ve=>{O.current=l||s;const he=ve.currentTarget.getBoundingClientRect(),Qe=ve.clientX-he.left,Pe=ve.clientY-he.top,we=_i(V6(e),{x:Qe,y:Pe});if(g)ve.preventDefault(),ve.stopPropagation(),r?.(),M({x:we.x,y:we.y}),R({x:we.x,y:we.y}),p(!0),_(!0),x();else if(l&&!s){const Te=ie(we);B({x:Te.point.x,y:Te.point.y}),Q({x:Te.point.x,y:Te.point.y}),I({start:Te.id,end:Te.id}),a(!0),c(!0),y()}else A?(c(!1),I(Te=>({...Te,end:null}))):s&&(a(!1),I({start:null,end:null}))},onMouseUp:ve=>{if(!m)return;const he=ve.currentTarget.getBoundingClientRect(),Qe=ve.clientX-he.left,Pe=ve.clientY-he.top,we=_i(V6(e),{x:Qe,y:Pe}),Te={x:we.x,y:we.y};ve.preventDefault(),ve.stopPropagation(),r?.(),R(Te),_(!1),pe(w,Te)},children:[t,d&&K.jsxs(K.Fragment,{children:[K.jsx("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:Ru.dimensionOverlay},width:W.width,height:W.height,children:K.jsx("rect",{x:fe.left,y:fe.top,width:fe.width,height:fe.height,stroke:"red",strokeWidth:1.5,strokeDasharray:"4,3",fill:"rgba(255, 0, 0, 0.12)"})}),K.jsxs("div",{style:{left:0,bottom:s?58:0,position:"absolute",color:"red",fontFamily:"sans-serif",fontSize:12,margin:4,pointerEvents:"none",mixBlendMode:"difference",zIndex:Ru.dimensionOverlay},children:["minX: ",ue.minX.toFixed(2),", minY:"," ",ue.minY.toFixed(2),K.jsx("br",{}),"maxX: ",ue.maxX.toFixed(2),", maxY:"," ",ue.maxY.toFixed(2)]})]}),s&&K.jsxs(K.Fragment,{children:[Me.show&&K.jsx("div",{style:{position:"absolute",left:Me.x,top:Me.y,color:"red",mixBlendMode:"difference",pointerEvents:"none",fontSize:12,fontFamily:"sans-serif",whiteSpace:"nowrap",zIndex:Ru.dimensionOverlay},children:Me.distance.toFixed(2)}),K.jsx("div",{style:{position:"absolute",left:ye.left,width:ye.width,textAlign:"center",top:ne.y+2,color:"red",mixBlendMode:"difference",pointerEvents:"none",marginTop:ye.flipY?0:-20,fontSize:12,fontFamily:"sans-serif",zIndex:Ru.dimensionOverlay},children:Math.abs(E.x-S.x).toFixed(2)}),K.jsx("div",{style:{position:"absolute",left:le.x,height:ye.height,display:"flex",flexDirection:"column",justifyContent:"center",top:ye.top,color:"red",pointerEvents:"none",mixBlendMode:"difference",fontSize:12,fontFamily:"sans-serif",zIndex:Ru.dimensionOverlay},children:K.jsx("div",{style:{marginLeft:ye.flipX?"-100%":4,paddingRight:4},children:Math.abs(E.y-S.y).toFixed(2)})}),K.jsxs("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:Ru.dimensionOverlay},width:W.width,height:W.height,children:[K.jsx("defs",{children:K.jsx("marker",{id:"head",orient:"auto",markerWidth:"3",markerHeight:"4",refX:"2",refY:"2",children:K.jsx("path",{d:"M0,0 V4 L2,2 Z",fill:"red"})})}),K.jsx("line",{x1:ne.x,y1:ne.y,x2:le.x,y2:le.y,markerEnd:"url(#head)",strokeWidth:1.5,fill:"none",stroke:"red"}),K.jsx("line",{x1:ne.x,y1:ne.y,x2:le.x,y2:ne.y,strokeWidth:1.5,fill:"none",strokeDasharray:"2,2",stroke:"red"}),K.jsx("line",{x1:le.x,y1:ne.y,x2:le.x,y2:le.y,strokeWidth:1.5,fill:"none",strokeDasharray:"2,2",stroke:"red"})]}),A&&K.jsx(gHi,{points:oe,startId:f.start,endId:f.end}),K.jsxs("div",{style:{right:0,bottom:0,position:"absolute",color:"red",fontFamily:"sans-serif",fontSize:12,margin:4},children:["(",E.x.toFixed(2),",",E.y.toFixed(2),")",K.jsx("br",{}),"(",S.x.toFixed(2),",",S.y.toFixed(2),")",K.jsx("br",{}),"dist:"," ",Math.sqrt((S.x-E.x)**2+(S.y-E.y)**2).toFixed(2)]})]})]})},_Hi=(t,e,n=0)=>{const o=t.width/2,i=t.height/2,r=t.center.x-o-n,s=t.center.x+o+n,a=t.center.y-i-n,A=t.center.y+i+n;return e.x>r&&e.x<s&&e.y>a&&e.y<A},fHi=({children:t,disabled:e,transform:n,soup:o,cancelPanDrag:i,onCreateEditEvent:r,onModifyEditEvent:s})=>{n||(n=RP());const a=ee.useRef(null),[A,c]=ee.useState(null),[l,u]=ee.useState(null),g=A!==null;Kc(m=>m.in_edit_mode);const h=Kc(m=>m.in_move_footprint_mode),d=Kc(m=>m.setIsMovingComponent),p=e||!h;return K.jsxs("div",{ref:a,style:{position:"relative",overflow:"hidden"},onMouseDown:m=>{if(p)return;const _=m.currentTarget.getBoundingClientRect(),f=m.clientX-_.left,I=m.clientY-_.top;if(Number.isNaN(f)||Number.isNaN(I))return;const C=_i(V6(n),{x:f,y:I});let y=!1;for(const x of o)if(x.type==="pcb_component"&&_Hi(x,C,10/n.a)){i(),c(x.pcb_component_id),y=!0;const E=Math.random().toString();u({dragStart:C,originalCenter:x.center,dragEnd:C,edit_event_id:E}),r({edit_event_id:E,edit_event_type:"edit_pcb_component_location",pcb_edit_event_type:"edit_component_location",pcb_component_id:x.pcb_component_id,original_center:x.center,new_center:x.center,in_progress:!0,created_at:Date.now()}),d(!0);break}if(y||c(null),y)return m.preventDefault(),!1},onMouseMove:m=>{if(!A||!l)return;const _=m.currentTarget.getBoundingClientRect(),f=m.clientX-_.left,I=m.clientY-_.top;if(Number.isNaN(f)||Number.isNaN(I))return;const C=_i(V6(n),{x:f,y:I});u({...l,dragEnd:C}),s({edit_event_id:l.edit_event_id,new_center:{x:l.originalCenter.x+C.x-l.dragStart.x,y:l.originalCenter.y+C.y-l.dragStart.y}})},onMouseUp:m=>{A&&(c(null),d(!1),l&&(s({edit_event_id:l.edit_event_id,in_progress:!1}),u(null)))},children:[t,!p&&o.filter(m=>m.type==="pcb_component").map(m=>{if(!m?.center)return null;const _=_i(n,m.center);return K.jsx("div",{style:{position:"absolute",pointerEvents:"none",left:_.x,top:_.y,width:m.width*n.a+20,height:m.height*n.a+20,transform:"translate(-50%, -50%)",background:g&&A===m.pcb_component_id?"rgba(255, 0, 0, 0.2)":""}},m.pcb_component_id)})]})},y$e=(t,e)=>{const n=e.current;if(!n)return{transform:"translate(-50%, -100%)",left:t.x,top:t.y};const o=n.getBoundingClientRect(),i=200,r=10,s=60;let a="-50%",A="-100%",c=t.x,l=t.y;return t.x+s+i<o.width-r?(c=t.x+s,a="0%"):t.x-s-i>r?(c=t.x-s,a="-100%"):(c=t.x,a="-50%"),{transform:`translate(${a}, ${A})`,left:c,top:l}},IHi=({center:t})=>K.jsxs("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:Ru.errorOverlay+30},width:"100%",height:"100%",children:[K.jsx("circle",{cx:t.x,cy:t.y,r:11,fill:"none",stroke:"#ff6b6b",strokeWidth:2.5,opacity:.95}),K.jsx("circle",{cx:t.x,cy:t.y,r:4.5,fill:"#ff6b6b",opacity:.95}),K.jsx("line",{x1:t.x-18,y1:t.y,x2:t.x-8,y2:t.y,stroke:"#ff6b6b",strokeWidth:2}),K.jsx("line",{x1:t.x+8,y1:t.y,x2:t.x+18,y2:t.y,stroke:"#ff6b6b",strokeWidth:2}),K.jsx("line",{x1:t.x,y1:t.y-18,x2:t.x,y2:t.y-8,stroke:"#ff6b6b",strokeWidth:2}),K.jsx("line",{x1:t.x,y1:t.y+8,x2:t.x,y2:t.y+18,stroke:"#ff6b6b",strokeWidth:2})]}),Yhn=({errorCenter:t,isHighlighted:e=!1})=>K.jsx("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:Ru.errorOverlay},width:"100%",height:"100%",children:K.jsx("rect",{x:t.x-7,y:t.y-7,width:14,height:14,transform:`rotate(45 ${t.x} ${t.y})`,fill:e?"#ff4444":"transparent",stroke:e?"#ff4444":"red",strokeWidth:e?2.5:1.5})}),x$e=kU`
  opacity: 0;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 8px 12px;
  border-radius: 4px;
  width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  word-wrap: break-word;
  line-height: 1.4;
  transition: opacity 0.2s;
  margin-bottom: 10px;
  color: red;
`,CHi=({children:t,transform:e=RP(),elements:n})=>{const o=ee.useRef(null),{isShowingDRCErrors:i,hoveredErrorId:r,focusedErrorId:s}=Kc(p=>({isShowingDRCErrors:p.is_showing_drc_errors,hoveredErrorId:p.hovered_error_id,focusedErrorId:p.focused_error_id})),a=s??r;if(!n)return K.jsx("div",{style:{position:"relative"},ref:o,children:t});const A=n.filter(p=>p.type==="pcb_trace_error"&&!p.message?.includes("Multiple components found with name")),c=n.filter(p=>p.type==="pcb_via_clearance_error"),l=n.filter(p=>p.type==="pcb_trace_error"&&p.message?.includes("Multiple components found with name")),u=ohn(n),g=ahn(n,a),h=p=>{const m=bFi({error:p,indexes:u});if(!m||typeof m.x!="number"||typeof m.y!="number")return null;const _=_i(e,m);return Number.isNaN(_.x)||Number.isNaN(_.y)?null:_};let d=null;return g&&(d=h(g)),K.jsxs("div",{style:{position:"relative"},ref:o,children:[t,A.map((p,m)=>{const _=JU(p,m),f=a===_;if(!f&&!i)return null;const I=h(p);if(!I)return null;const C=y$e(I,o);return K.jsxs(ee.Fragment,{children:[K.jsx(Yhn,{errorCenter:I,isHighlighted:f}),K.jsx("div",{style:{position:"absolute",left:I.x-15,top:I.y-15,width:30,height:30,zIndex:Ru.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:y=>{const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(".error-message");E&&(E.style.opacity="1")}},onMouseLeave:y=>{if(!f){const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(".error-message");E&&(E.style.opacity="0")}}}}),K.jsx("div",{style:{position:"absolute",zIndex:f?200:100,left:C.left,top:C.top,color:f?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:i||f?"flex":"none",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:C.transform},children:K.jsx("div",{className:`error-message ${x$e}`,style:{opacity:f?1:0,border:`1px solid ${f?"#ff4444":"red"}`},children:p.message})})]},_)}),c.map((p,m)=>{const _=JU(p,m),f=a===_;if(!f&&!i)return null;const I=h(p);if(!I)return null;const C=y$e({x:I.x,y:I.y},o);return K.jsxs(ee.Fragment,{children:[K.jsx(Yhn,{errorCenter:I,isHighlighted:f}),K.jsx("div",{style:{position:"absolute",left:I.x-15,top:I.y-15,width:30,height:30,zIndex:Ru.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:y=>{const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(".error-message");E&&(E.style.opacity="1")}},onMouseLeave:y=>{if(!f){const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(".error-message");E&&(E.style.opacity="0")}}}}),K.jsx("div",{style:{position:"absolute",zIndex:f?Ru.errorOverlay+10:Ru.errorOverlay+1,left:C.left,top:C.top,color:f?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:"flex",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:C.transform},children:K.jsx("div",{className:`error-message ${x$e}`,style:{opacity:f?1:0,border:`1px solid ${f?"#ff4444":"red"}`},children:p.message})})]},_)}),l.map((p,m)=>{const _=p.component_name||p.message?.match(/name "([^"]+)"/)?.[1];if(!_)return null;const f=n?.filter(y=>y.type==="source_component"&&y.name===_||y.type==="pcb_component"&&n?.find(x=>x.type==="source_component"&&x.source_component_id===y.source_component_id&&x.name===_))||[],I=JU(p,m),C=a===I;return!C&&!i?null:f.map((y,x)=>{let E={x:0,y:0};if(y.type==="pcb_component")E=y.center||{x:0,y:0};else if(y.type==="source_component"){const F=n?.find(O=>O.type==="pcb_component"&&O.source_component_id===y.source_component_id);F&&F.type==="pcb_component"&&(E=F.center||{x:0,y:0})}const B=_i(e,E);if(Number.isNaN(B.x)||Number.isNaN(B.y))return null;const S=Math.abs(e.a),k=Math.max(8,Math.min(30,.5*S)),R=y$e(B,o);return K.jsxs(ee.Fragment,{children:[K.jsx("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:Ru.errorOverlay},width:"100%",height:"100%",children:C?K.jsx("polygon",{points:`${B.x},${B.y-k*1.25} ${B.x+k},${B.y} ${B.x},${B.y+k*1.25} ${B.x-k},${B.y}`,fill:"#ff4444"}):K.jsx("circle",{cx:B.x,cy:B.y,r:k,fill:"none",stroke:C?"#ff4444":"red",strokeWidth:C?Math.max(2,k*.15):Math.max(1,k*.1),opacity:1})}),K.jsx("div",{style:{position:"absolute",left:B.x-(k+10),top:B.y-(k+10),width:(k+10)*2,height:(k+10)*2,zIndex:Ru.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:F=>{const O=F.currentTarget.nextElementSibling;if(O){const U=O.querySelector(".error-message");U&&(U.style.opacity="1")}},onMouseLeave:F=>{if(!C){const O=F.currentTarget.nextElementSibling;if(O){const U=O.querySelector(".error-message");U&&(U.style.opacity="0")}}}}),K.jsx("div",{style:{position:"absolute",zIndex:C?Ru.errorOverlay+20:Ru.errorOverlay+10,left:R.left,top:R.top,color:C?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:i||C?"flex":"none",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:R.transform},children:K.jsx("div",{className:`error-message ${x$e}`,style:{opacity:C?1:0,border:`1px solid ${C?"#ff4444":"red"}`},children:p.message})})]},`${I}_${x}`)})}),d&&K.jsx(IHi,{center:d})]})};function yHi(t,e){return t.size!==e.size?!1:Array.from(t).every(n=>e.has(n))}var KP=t=>t?.type==="pcb_component",Uhn=t=>t?.type==="pcb_group",xHi=t=>t?.type==="pcb_panel",E$e=t=>t?.type==="pcb_board",Gg={MIN_LINE_LENGTH_FOR_LABEL:40,LABEL_OFFSET_ABOVE:2,LABEL_OFFSET_BELOW:-18,LABEL_OFFSET_RIGHT:8,LABEL_OFFSET_LEFT:-120,Y_LABEL_MIN_WIDTH:110,LINE_STROKE_WIDTH:1.5,LINE_DASH_PATTERN:"4,4",COMPONENT_MARKER_RADIUS:3,LABEL_FONT_SIZE:11,ANCHOR_MARKER_SIZE:6,ANCHOR_MARKER_STROKE_WIDTH:1.5},TE={OFFSET_LINE:"white",COMPONENT_MARKER_FILL:"#66ccff",COMPONENT_MARKER_STROKE:"white",LABEL_TEXT:"white"},B$e=({targets:t,transform:e,containerWidth:n,containerHeight:o})=>{if(t.length===0)return null;const i={color:TE.LABEL_TEXT,mixBlendMode:"difference",pointerEvents:"none",fontSize:Gg.LABEL_FONT_SIZE,fontFamily:"monospace",fontWeight:"bold"},r=new Map;return t.forEach(s=>{if(!r.has(s.anchor_id)){const a=_i(e,s.anchor);r.set(s.anchor_id,a)}}),K.jsx("div",{style:{position:"absolute",left:0,top:0,width:n,height:o,overflow:"hidden",pointerEvents:"none",zIndex:Ru.dimensionOverlay},children:K.jsxs("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none"},width:n,height:o,children:[t.map(s=>{const a=s.anchor,A=s.anchor_id,c=s.target,l=r.get(A),u=_i(e,c),g=c.x-a.x,h=c.y-a.y,d=Math.abs(u.x-l.x),p=Math.abs(u.y-l.y),m=u.y<l.y,_=u.x>l.x,f=m?Gg.LABEL_OFFSET_ABOVE:Gg.LABEL_OFFSET_BELOW,I=_?Gg.LABEL_OFFSET_RIGHT:Gg.LABEL_OFFSET_LEFT,C=d>Gg.MIN_LINE_LENGTH_FOR_LABEL,y=p>Gg.MIN_LINE_LENGTH_FOR_LABEL,x=`${s.display_offset_x??g.toFixed(2)}mm`,E=`${s.display_offset_y??h.toFixed(2)}mm`;return K.jsxs("g",{children:[K.jsx("line",{x1:l.x,y1:l.y,x2:u.x,y2:l.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.LINE_STROKE_WIDTH,strokeDasharray:Gg.LINE_DASH_PATTERN}),K.jsx("line",{x1:u.x,y1:l.y,x2:u.x,y2:u.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.LINE_STROKE_WIDTH,strokeDasharray:Gg.LINE_DASH_PATTERN}),s.type==="component"||s.type==="board"?K.jsx("circle",{cx:u.x,cy:u.y,r:Gg.COMPONENT_MARKER_RADIUS,fill:TE.COMPONENT_MARKER_FILL,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1}):K.jsxs(K.Fragment,{children:[K.jsx("line",{x1:u.x-Gg.ANCHOR_MARKER_SIZE,y1:u.y,x2:u.x+Gg.ANCHOR_MARKER_SIZE,y2:u.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH}),K.jsx("line",{x1:u.x,y1:u.y-Gg.ANCHOR_MARKER_SIZE,x2:u.x,y2:u.y+Gg.ANCHOR_MARKER_SIZE,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH})]}),C&&K.jsx("foreignObject",{x:Math.min(l.x,u.x),y:l.y+f,width:Math.abs(u.x-l.x),height:20,style:{overflow:"visible"},children:K.jsx("div",{style:{...i,textAlign:"center"},children:x})}),y&&K.jsx("foreignObject",{x:u.x+I,y:Math.min(l.y,u.y),width:Gg.Y_LABEL_MIN_WIDTH,height:Math.abs(u.y-l.y),style:{overflow:"visible"},children:K.jsx("div",{style:{...i,display:"flex",alignItems:"center",justifyContent:_?"flex-start":"flex-end",whiteSpace:"nowrap",padding:"0 4px",height:"100%"},children:E})})]},s.id)}),Array.from(r.entries()).map(([s,a])=>K.jsxs("g",{children:[K.jsx("line",{x1:a.x-Gg.ANCHOR_MARKER_SIZE,y1:a.y,x2:a.x+Gg.ANCHOR_MARKER_SIZE,y2:a.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH}),K.jsx("line",{x1:a.x,y1:a.y-Gg.ANCHOR_MARKER_SIZE,x2:a.x,y2:a.y+Gg.ANCHOR_MARKER_SIZE,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH})]},`anchor-${s}`))]})})},EHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=>{const r=t.filter(_=>E$e(_)),s=t.filter(_=>KP(_)),a=t.filter(_=>Uhn(_)),A=e.map(_=>KP(_._parent_pcb_component)?_._parent_pcb_component.pcb_component_id:KP(_._element)?_._element.pcb_component_id:null).filter(_=>!!_),c=new Set;if(A.forEach(_=>{const f=s.find(I=>I.pcb_component_id===_);f?.pcb_group_id&&c.add(f.pcb_group_id)}),!Kc(_=>_.is_showing_group_anchor_offsets)&&A.length===0)return null;const u=s.map(_=>{const f=_.positioned_relative_to_pcb_board_id;if(!f)return null;const I=r.find(C=>C.pcb_board_id===f);return I?{component:_,board:I,type:"component"}:null}).filter(_=>!!_),g=a.map(_=>{const f=_.positioned_relative_to_pcb_board_id;if(!f||!_.center)return null;const I=r.find(C=>C.pcb_board_id===f);return I?{group:_,board:I,type:"group"}:null}).filter(_=>!!_),h=[...u,...g];if(h.length===0)return null;const d=A.length===0,p=h.filter(_=>_.type==="component"?d||A.includes(_.component.pcb_component_id):d||c.has(_.group.pcb_group_id));if(p.length===0)return null;const m=p.map(_=>_.type==="component"?{id:`${_.board.pcb_board_id}-${_.component.pcb_component_id}-${_.type}`,anchor:_.board.center,anchor_id:_.board.pcb_board_id,target:_.component.center,type:"component",display_offset_x:_.component.display_offset_x,display_offset_y:_.component.display_offset_y}:{id:`${_.board.pcb_board_id}-${_.group.pcb_group_id}-${_.type}`,anchor:_.board.center,anchor_id:_.board.pcb_board_id,target:{x:_.group.anchor_position?.x??_.group.center.x,y:_.group.anchor_position?.y??_.group.center.y},type:"group",display_offset_x:_.group.display_offset_x,display_offset_y:_.group.display_offset_y}).filter(_=>!!_);return K.jsx(B$e,{targets:m,transform:n,containerWidth:o,containerHeight:i})},BHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=>{const r=t.filter(_=>Uhn(_)),s=t.filter(_=>KP(_)),a=e.map(_=>KP(_._parent_pcb_component)?_._parent_pcb_component.pcb_component_id:KP(_._element)?_._element.pcb_component_id:null).filter(_=>!!_),A=(_,f)=>{if(f.has(_))return;f.add(_);const I=r.find(C=>C.pcb_group_id===_);I?.position_mode==="relative_to_group_anchor"&&I.positioned_relative_to_pcb_group_id&&A(I.positioned_relative_to_pcb_group_id,f)},c=new Set;if(a.forEach(_=>{const f=s.find(I=>I.pcb_component_id===_);f&&(f.position_mode==="relative_to_group_anchor"&&f.positioned_relative_to_pcb_group_id&&A(f.positioned_relative_to_pcb_group_id,c),f.pcb_group_id&&A(f.pcb_group_id,c))}),!Kc(_=>_.is_showing_group_anchor_offsets)&&a.length===0)return null;const u=s.map(_=>{if(_.position_mode==="relative_to_group_anchor"&&_.positioned_relative_to_pcb_group_id){const f=r.find(I=>I.pcb_group_id===_.positioned_relative_to_pcb_group_id);return f&&f.anchor_position?{component:_,parentGroup:f,type:"component"}:null}if(_.pcb_group_id){const f=r.find(I=>I.pcb_group_id===_.pcb_group_id);return f&&f.anchor_position?{component:_,parentGroup:f,type:"component"}:null}return null}).filter(_=>!!_),g=r.map(_=>{if(_.position_mode==="relative_to_group_anchor"&&_.positioned_relative_to_pcb_group_id){const f=r.find(I=>I.pcb_group_id===_.positioned_relative_to_pcb_group_id);if(f&&f.anchor_position&&_.anchor_position)return{group:_,parentGroup:f,type:"group"}}return null}).filter(_=>!!_),h=[...u,...g];if(h.length===0)return null;const d=a.length===0,p=h.filter(_=>_.type==="component"?d||a.includes(_.component.pcb_component_id):d||c.has(_.group.pcb_group_id)||c.has(_.parentGroup.pcb_group_id));if(p.length===0)return null;const m=p.map(_=>{const f=_.parentGroup.anchor_position;return f?_.type==="component"?_.component.center?{id:`${_.parentGroup.pcb_group_id}-${_.component.pcb_component_id}-${_.type}`,anchor:f,anchor_id:_.parentGroup.pcb_group_id,target:_.component.center,type:"component",display_offset_x:_.component.display_offset_x,display_offset_y:_.component.display_offset_y}:null:_.group.anchor_position?{id:`${_.parentGroup.pcb_group_id}-${_.group.pcb_group_id}-${_.type}`,anchor:f,anchor_id:_.parentGroup.pcb_group_id,target:_.group.anchor_position,type:"group",display_offset_x:_.group.display_offset_x,display_offset_y:_.group.display_offset_y}:null:null}).filter(_=>!!_);return K.jsx(B$e,{targets:m,transform:n,containerWidth:o,containerHeight:i})},bHi=(t,e)=>{const n=t.pcb_component_id,o=e.filter(i=>(i.type==="pcb_smtpad"||i.type==="pcb_plated_hole")&&i.pcb_component_id===n||i.type==="pcb_hole"&&i.pcb_component_id===n);return o.length===0?_$e([t]):_$e(o)},SHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=>{const r=new Map;for(const a of e)KP(a._parent_pcb_component)&&r.set(a._parent_pcb_component.pcb_component_id,a._parent_pcb_component),KP(a._element)&&r.set(a._element.pcb_component_id,a._element);if(r.size===0)return null;const s=[];for(const a of r.values()){const A=bHi(a,t);if(!A)continue;const c=a.positioned_relative_to_pcb_group_id??a.pcb_group_id,l=c?wS(t).pcb_group.get(c):null;s.push({component:a,bbox:A,group:l})}return s.length===0?null:K.jsx("div",{style:{position:"absolute",left:0,top:0,width:o,height:i,overflow:"hidden",pointerEvents:"none",zIndex:Ru.dimensionOverlay},children:K.jsx("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none"},width:o,height:i,children:s.map(({component:a,bbox:A,group:c})=>{const l=_i(n,{x:A.minX,y:A.maxY}),u=_i(n,{x:A.maxX,y:A.minY}),g={x:Math.min(l.x,u.x),y:Math.min(l.y,u.y),width:Math.abs(u.x-l.x),height:Math.abs(u.y-l.y)},h=a.center??{x:(A.minX+A.maxX)/2,y:(A.minY+A.maxY)/2},d=_i(n,h);return K.jsxs("g",{children:[K.jsx("rect",{x:g.x,y:g.y,width:g.width,height:g.height,fill:"none",stroke:"white",strokeWidth:1.5,strokeDasharray:"4,4"}),K.jsx("line",{x1:d.x-6,y1:d.y,x2:d.x+6,y2:d.y,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1.5}),K.jsx("line",{x1:d.x,y1:d.y-6,x2:d.x,y2:d.y+6,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1.5}),K.jsx("circle",{cx:d.x,cy:d.y,r:Gg.COMPONENT_MARKER_RADIUS,fill:TE.COMPONENT_MARKER_FILL,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1})]},a.pcb_component_id)})})})},QHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=>{const r=t.filter(h=>xHi(h)),s=t.filter(h=>E$e(h)),a=e.map(h=>E$e(h._element)?h._element.pcb_board_id:null).filter(h=>!!h);if(!Kc(h=>h.is_showing_group_anchor_offsets)&&a.length===0)return null;const c=s.map(h=>{const d=h.pcb_panel_id,p=h.position_mode;if(!d||p!=="relative_to_panel_anchor")return null;const m=r.find(_=>_.pcb_panel_id===d);return m?{board:h,panel:m,type:"board"}:null}).filter(h=>!!h);if(c.length===0)return null;const l=a.length===0,u=c.filter(h=>l||a.includes(h.board.pcb_board_id));if(u.length===0)return null;const g=u.map(h=>h.board.center?{id:`${h.panel.pcb_panel_id}-${h.board.pcb_board_id}-${h.type}`,anchor:h.panel.center,anchor_id:h.panel.pcb_panel_id,target:h.board.center,type:"board",display_offset_x:h.board.display_offset_x,display_offset_y:h.board.display_offset_y}:null).filter(h=>!!h);return K.jsx(B$e,{targets:g,transform:n,containerWidth:o,containerHeight:i})};function vHi(t){const{primitives:e,is_showing_multiple_traces_length:n,elements:o}=t,i=e.filter(A=>A._element.type==="pcb_trace"),r=o.filter(A=>A.type==="source_trace"),s=e.filter(A=>A._element.type!=="pcb_trace"),a=i.filter(A=>r.some(l=>A._element.source_trace_id===l.source_trace_id&&l.max_length!==void 0)||I$e({primitiveElement:A._element,elements:o})!==null);if(!n)return[...s,...a];if(i.length>1){const A=i.reduce((c,l)=>{const u=c._element.trace_length;return l._element.trace_length<u?l:c},i[0]);return[...s,A]}return e}var wHi={position:"absolute",left:0,top:0,pointerEvents:"none",color:"red",fontFamily:"sans-serif",fontSize:12,textShadow:"0 0 2px black"},PHi=t=>{const{_element:e,_parent_pcb_component:n,_parent_source_component:o,_source_port:i}=t;switch(e.type){case"pcb_trace":return e.trace_length?`${e.trace_length.toFixed(3)}`:"";case"pcb_smtpad":case"pcb_plated_hole":{const r=[],s=Array.from(new Set((e.port_hints??[]).concat(i?.port_hints??[]))).filter(A=>!/^[0-9]+$/.test(A)).filter(A=>!A.includes("unnamed_")).sort((A,c)=>c.localeCompare(A)),a=o&&"name"in o&&o.name&&!o.name.includes("unnamed_")?o.name:null;return s.length>0?a?r.push(...s.map(A=>`${a}.${A}`)):r.push(...s):a&&r.push(a),r.join(", ")}default:return""}},MHi={top:"red",bottom:"aqua"},DHi=({primitive:t,mousePos:e,elements:n})=>{const[o,i]=ee.useState(!1),r=t._element;ee.useEffect(()=>{setTimeout(()=>{i(!0)},100)},[]);const[s,a,A,c]=[t.screen_x,t.screen_y,t.screen_w,t.screen_h],l=t.same_space_index??0,u=26,g=MHi[t?._element?.layer]??"red";let h=0;if(r.type==="pcb_smtpad"&&r?.shape==="rotated_rect"?h=r?.ccw_rotation??0:(r.type==="pcb_smtpad"&&(r?.shape==="pill"||r?.shape==="rotated_pill")&&"ccw_rotation"in t||r.type==="pcb_plated_hole"&&(r?.shape==="pill"||r?.shape==="oval")&&"ccw_rotation"in t)&&(h=r.ccw_rotation??0),r.type==="pcb_trace"){const m=chn({primitiveElement:r,elements:n});return m?K.jsx("div",{style:{zIndex:Ru.elementOverlay,position:"absolute",left:e.x+12,top:e.y+12,color:g,pointerEvents:"none"},children:K.jsxs("div",{style:{backgroundColor:"#f2efcc",color:m.isOverLength?"red":"black",textShadow:"none",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",padding:"4px 6px",borderRadius:"4px",fontSize:"11px",lineHeight:1.2,textAlign:"left",whiteSpace:"nowrap"},children:[m.text&&K.jsx("div",{children:m.text}),m.name&&K.jsx("div",{style:{marginTop:m.text?"2px":0},children:m.name})]})}):null}const d=PHi(t);return d.trim().length===0?null:K.jsx("div",{style:{zIndex:Ru.elementOverlay,position:"absolute",left:s-A/2-8,top:a-c/2-8,width:A+16,height:c+16,color:g,transform:`rotate(${-h}deg)`,transformOrigin:"center center"},children:K.jsx("div",{style:{width:o?`calc(100% + ${u*2*l}px)`:"100%",height:o?`calc(100% + ${u*2*l}px)`:"100%",marginLeft:o?`${-u*l}px`:0,marginTop:o?`${-u*l}px`:0,border:`1px solid ${g}`,opacity:o||l===0?1:0,transition:"width 0.2s, height 0.2s, margin-left 0.2s, margin-top 0.2s, opacity 0.2s"},children:K.jsx("div",{style:{position:"absolute",bottom:c+20+u*l,marginRight:o?`${-u*l}px`:0,marginBottom:o?0:-u*l,transition:"margin-right 0.2s, margin-bottom 0.2s",backgroundColor:"#f2efcc",color:"black",textShadow:"none",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",padding:"6px 6px",borderRadius:"6px",fontSize:"14px",transform:`rotate(${h}deg)`,minWidth:"45px",textAlign:"center"},children:d})})})},NHi=({highlightedPrimitives:t,mousePos:e,elements:n})=>{const[o,i]=Kc(a=>[a.is_moving_component,a.is_showing_multiple_traces_length]),r=t.some(a=>a._element.type==="pcb_smtpad")&&t.some(a=>a._element.type==="pcb_trace");let s=t;return r&&(s=s.filter(a=>a._element.type==="pcb_smtpad")),s=vHi({primitives:s,is_showing_multiple_traces_length:i,elements:n}),K.jsx("div",{style:wHi,children:!o&&s.map(a=>K.jsx(DHi,{primitive:a,mousePos:e,elements:n},a._pcb_drawing_object_id))})},gfe=t=>{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(const r of t)r.x<e&&(e=r.x),r.y<n&&(n=r.y),r.x>o&&(o=r.x),r.y>i&&(i=r.y);return{center:{x:(e+o)/2,y:(n+i)/2},width:o-e,height:i-n}},Khn=(t,e)=>{if(e.length<3)return!1;let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o].x,s=e[o].y,a=e[i].x,A=e[i].y;s>t.y!=A>t.y&&t.x<(a-r)*(t.y-s)/(A-s||Number.EPSILON)+r&&(n=!n)}return n},b$e=(t,e,n,o,i=!1)=>{const r=[];for(const s of t){if(!s._element||!i&&s._element.type==="pcb_trace"&&s.layer!==o)continue;if("x1"in s&&s._element?.type==="pcb_trace"){const c=Zd({x:e.x,y:e.y},{x:s.x1,y:s.y1},{x:s.x2,y:s.y2}),l=s.width||.5,u=Math.max(l*25,2)/n.a;c<u&&r.push(s);continue}if(s.pcb_drawing_type==="polygon"){const c=s.points.map(u=>({x:lt.parse(u.x),y:lt.parse(u.y)})),l=gfe(c);if(!l||e.x<l.center.x-l.width/2||e.x>l.center.x+l.width/2||e.y<l.center.y-l.height/2||e.y>l.center.y+l.height/2)continue;Khn(e,c)&&r.push(s);continue}if(s.pcb_drawing_type==="polygon_with_arcs"){const c=s.brep_shape.outer_ring.vertices.map(u=>({x:lt.parse(u.x),y:lt.parse(u.y)})),l=gfe(c);if(!l||e.x<l.center.x-l.width/2||e.x>l.center.x+l.width/2||e.y<l.center.y-l.height/2||e.y>l.center.y+l.height/2)continue;Khn(e,c)&&r.push(s);continue}if(!("x"in s&&"y"in s))continue;let a=0,A=0;if("w"in s&&"h"in s)a=s.w,A=s.h;else if("r"in s)a=s.r*2,A=s.r*2;else if("rX"in s&&"rY"in s)a=s.rX*2,A=s.rY*2;else continue;Math.abs(s.x-e.x)<a/2&&Math.abs(s.y-e.y)<A/2&&r.push(s)}return r},RHi=({elements:t,children:e,transform:n,primitives:o,selectedLayer:i,onMouseHoverOverPrimitives:r})=>{const[s,a]=ee.useState([]),[A,c]=ee.useState({x:0,y:0}),[l,{width:u,height:g}]=uee();ee.useEffect(()=>{a([]),r([])},[i,o,r]);const h=ee.useMemo(()=>{const p=[];for(const m of s){if(m._element?.type==="pcb_via"||m._element?.type==="pcb_component"||m?.layer==="drill"||m?.is_hoverable===!1)continue;let _=null,f=0,I=0;if(m.pcb_drawing_type==="polygon"){const E=gfe(m.points);if(!E)continue;_=E.center,f=E.width,I=E.height}else if(m.pcb_drawing_type==="polygon_with_arcs"){const E=m.brep_shape.outer_ring.vertices.map(S=>({x:S.x,y:S.y})),B=gfe(E);if(!B)continue;_=B.center,f=B.width,I=B.height}else m.pcb_drawing_type==="line"?(_={x:(m.x1+m.x2)/2,y:(m.y1+m.y2)/2},f=Math.abs(m.x2-m.x1),I=Math.abs(m.y2-m.y1)):"x"in m&&"y"in m&&(_={x:m.x,y:m.y},f="w"in m?m.w:"r"in m?m.r*2:"rX"in m&&"rY"in m?m.rX*2:0,I="h"in m?m.h:"r"in m?m.r*2:"rX"in m&&"rY"in m?m.rY*2:0);if(!_)continue;const C=_i(n,_),y={w:f*n.a,h:I*n.a},x=p.filter(E=>C.x===E.screen_x&&C.y===E.screen_y&&y.w===E.screen_w&&y.h===E.screen_h).length;p.push({...m,x:_.x,y:_.y,w:f,h:I,screen_x:C.x,screen_y:C.y,screen_w:y.w,screen_h:y.h,same_space_index:x})}return p},[s,n]),d=(p,m,_,f)=>{c({x:p,y:m});const I=_i(V6(_),{x:p,y:m}),C=b$e(f,I,_,i);yHi(new Set(C.map(y=>y._pcb_drawing_object_id)),new Set(s.map(y=>y._pcb_drawing_object_id)))||(a(C),r(C))};return K.jsxs("div",{ref:l,style:{position:"relative",width:"100%",height:"100%"},onMouseMove:p=>{if(n){const m=p.currentTarget.getBoundingClientRect(),_=p.clientX-m.left,f=p.clientY-m.top;d(_,f,n,o)}},onTouchStart:p=>{if(n){const m=p.touches[0],_=p.currentTarget.getBoundingClientRect(),f=m.clientX-_.left,I=m.clientY-_.top;d(f,I,n,o)}},children:[e,K.jsx(NHi,{elements:t,mousePos:A,highlightedPrimitives:h}),n&&K.jsxs(K.Fragment,{children:[K.jsx(EHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g}),K.jsx(BHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g}),K.jsx(SHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g}),K.jsx(QHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g})]})]})},Vhn=["rgb(255, 100, 100)","rgb(100, 255, 100)","rgb(100, 100, 255)","rgb(255, 255, 100)","rgb(255, 100, 255)","rgb(100, 255, 255)","rgb(255, 150, 100)","rgb(150, 100, 255)","rgb(100, 255, 150)","rgb(255, 100, 150)"],THi=({children:t,transform:e=RP(),elements:n=[],hoveredComponentIds:o=[]})=>{const[i,{width:r,height:s}]=uee(),a=ee.useRef(null),{is_showing_pcb_groups:A,pcb_group_view_mode:c,is_showing_group_anchor_offsets:l}=Kc(u=>({is_showing_pcb_groups:u.is_showing_pcb_groups,pcb_group_view_mode:u.pcb_group_view_mode,is_showing_group_anchor_offsets:u.is_showing_group_anchor_offsets}));return ee.useEffect(()=>{const u=a.current;if(!u||!r||!s)return;u.width=r,u.height=s;const g=u.getContext("2d");if(!g||(g.clearRect(0,0,r,s),!A))return;const h=n.filter(x=>x.type==="pcb_group"),d=n.filter(x=>x.type==="pcb_component"),p=n.filter(x=>x.type==="source_group"),m=new Map(p.map(x=>[x.source_group_id,x])),_=h.filter(x=>{if(x.name?.toLowerCase().includes("subpanel"))return!1;if(c==="all")return!0;if(!x.source_group_id)return!1;const E=m.get(x.source_group_id);return E?E.was_automatically_named!==!0:!1}),f=new Map;p.forEach(x=>{const E=x;if(E.parent_source_group_id){const B=f.get(E.parent_source_group_id)||[];B.push(x.source_group_id),f.set(E.parent_source_group_id,B)}});const I=x=>{const E=[],B=f.get(x)||[];for(const S of B)E.push(S),E.push(...I(S));return E},C=x=>{const E=p.find(B=>B.source_group_id===x);return E?.parent_source_group_id?1+C(E.parent_source_group_id):0},y=new Set;if(o.length>0)for(const x of d){if(!o.includes(x.pcb_component_id))continue;const E=x.positioned_relative_to_pcb_group_id??x.pcb_group_id;E&&y.add(E)}_.forEach((x,E)=>{let B=d.filter(we=>we.pcb_group_id===x.pcb_group_id);if(x.source_group_id){const we=I(x.source_group_id),Te=h.filter(Re=>Re.source_group_id&&we.includes(Re.source_group_id));for(const Re of Te){const Ee=d.filter(ke=>ke.pcb_group_id===Re.pcb_group_id);B=[...B,...Ee]}}let S,Q,w,M,k=!1;if(x.center&&x.width&&x.height){k=!0;const we=x.width/2,Te=x.height/2;S=x.center.x-we,w=x.center.x+we,Q=x.center.y-Te,M=x.center.y+Te}else if(B.length===0||(S=1/0,Q=1/0,w=-1/0,M=-1/0,B.forEach(we=>{if(we.center&&typeof we.width=="number"&&typeof we.height=="number"){const Te=we.center.x-we.width/2,Re=we.center.x+we.width/2,Ee=we.center.y+we.height/2,ke=we.center.y-we.height/2;S=Math.min(S,Te),w=Math.max(w,Re),Q=Math.min(Q,ke),M=Math.max(M,Ee)}}),S===1/0||w===-1/0))return;const R=x.source_group_id?C(x.source_group_id):0,F=x.source_group_id?I(x.source_group_id).length>0:!1;if(!k){const Re=1+(F?.5:0);S-=Re,w+=Re,Q-=Re,M+=Re}const O=_i(e,{x:S,y:M}),U=_i(e,{x:w,y:M}),Y=_i(e,{x:S,y:Q}),W=_i(e,{x:w,y:Q}),te=Vhn[E%Vhn.length];g.strokeStyle=te,g.lineWidth=2;const j=Math.max(4,Math.min(12,8*Math.abs(e.a))),J=Math.max(2,Math.min(6,4*Math.abs(e.a))),ie=j*(F?1.3:1),ne=J;g.setLineDash([ie,ne]),g.beginPath(),g.moveTo(O.x,O.y),g.lineTo(U.x,U.y),g.lineTo(W.x,W.y),g.lineTo(Y.x,Y.y),g.closePath(),g.stroke();const le=Math.max(8,Math.min(12,10*Math.abs(e.a))),ge=R==0||R==1?0:R*.11,_e=le*(1-ge),ue=4,fe=x.name||`Group ${E+1}`;g.font=`${_e}px sans-serif`,g.setLineDash([]);const ye=g.measureText(fe).width+ue*2,Me=_e+ue*2,ve=O.x-5,he=O.y-5,Qe=3;if(g.fillStyle="rgba(0, 0, 0, 0.8)",g.beginPath(),g.roundRect(ve,he-Me,ye,Me,Qe),g.fill(),g.fillStyle=te,g.textAlign="left",g.textBaseline="middle",g.fillText(fe,ve+ue,he-Me/2),l&&y.has(x.pcb_group_id)&&!!x.anchor_position&&x.anchor_position){const we=Array.isArray(x.anchor_position)?{x:x.anchor_position[0]??0,y:x.anchor_position[1]??0}:{x:x.anchor_position.x,y:x.anchor_position.y},Te=_i(e,we);g.strokeStyle="white",g.lineWidth=1.5,g.setLineDash([]);const Re=Math.max(4,Math.min(8,6*Math.abs(e.a)));g.beginPath(),g.moveTo(Te.x-Re,Te.y),g.lineTo(Te.x+Re,Te.y),g.stroke(),g.beginPath(),g.moveTo(Te.x,Te.y-Re),g.lineTo(Te.x,Te.y+Re),g.stroke()}})},[n,e,r,s,A,c,l,o]),K.jsxs("div",{ref:i,style:{position:"relative",width:"100%",height:"100%"},children:[t,K.jsx("canvas",{ref:a,style:{position:"absolute",top:0,left:0,pointerEvents:"none",zIndex:Ru.pcbGroupOverlay,display:A?"block":"none"}})]})},kHi=({transform:t,soup:e,children:n})=>{const o=Kc(a=>a.is_showing_rats_nest),{netMap:i,idToNetMap:r}=ee.useMemo(()=>nhn(e||[]),[e]),s=ee.useMemo(()=>{if(!e||!o)return[];const a=g=>{const h=wS(e)[g.replace(/_\d+$/,"")].get(g);return h&&"x"in h&&"y"in h?{x:h.x,y:h.y}:null},A=(g,h)=>{const d=i[h]||[];let p=null,m=1/0;return d.forEach(_=>{const f=a(_);if(f){const I=Math.sqrt((g.x-f.x)**2+(g.y-f.y)**2);I<m&&I>0&&(m=I,p=f)}}),p},c=wS(e).pcb_port.list(),l=wS(e).source_trace.list(),u=[];return c.forEach((g,h)=>{const d=r[g.pcb_port_id];let p=!1;for(const f of l)f.connected_source_port_ids.includes(g.source_port_id)&&f.connected_source_net_ids.length>0&&(p=!0);if(!d)return;const m={x:g.x,y:g.y},_=A(m,d);_&&u.push({key:`${g.pcb_port_id}-${h}`,startPoint:m,endPoint:_,isInNet:p})}),u},[e,i,r,o]);return!e||!o?n:(t||(t=RP()),K.jsxs("div",{style:{position:"relative"},children:[n,K.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",opacity:.5,zIndex:Ru.ratsNestOverlay},children:s.map(({key:a,startPoint:A,endPoint:c,isInNet:l})=>{const u=_i(t,A),g=_i(t,c);return K.jsx("line",{x1:u.x,y1:u.y,x2:g.x,y2:g.y,stroke:"white",strokeWidth:"1",strokeDasharray:l?"6,6":void 0},a)})})]}))},FHi={version:"1.11.414"},Z6=(t,e,n)=>{const o=Kc(s=>s.is_mouse_over_container),i=ee.useRef(o),r=ee.useRef(e);ee.useEffect(()=>{i.current=o},[o]),ee.useEffect(()=>{r.current=e},[e]),ee.useEffect(()=>{if(!t)return;const s=a=>{const A=a.target;if(A.tagName==="INPUT"||A.tagName==="TEXTAREA"||A.isContentEditable)return;const c=t.split("+"),l=c.includes("ctrl"),u=c.includes("shift"),g=c.includes("alt"),h=c.includes("meta"),d=c[c.length-1],p=n?.current?n.current.contains(document.activeElement)||document.activeElement===n.current:!1;(i.current||p)&&(!l||a.ctrlKey)&&(!u||a.shiftKey)&&(!g||a.altKey)&&(!h||a.metaKey)&&a.key.toLowerCase()===d.toLowerCase()&&(a.preventDefault(),r.current())};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[t])},LHi=()=>{const[t,e]=ee.useState(!1);return ee.useEffect(()=>{const n=()=>{e(window.innerWidth<=768)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t},pee=(t,e={stopPropagation:!0})=>{const n=ee.useRef(0),o=ee.useCallback(s=>{e.stopPropagation&&s.stopPropagation();const a=Date.now();a-n.current<300||(n.current=a,t?.(s))},[t,e.stopPropagation]),i=ee.useCallback(s=>{s.preventDefault(),o(s)},[o]);return{onClick:o,onTouchEnd:i,style:{touchAction:"manipulation"}}},dfe=kU`
  background: #222;
  color: #eee;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 4px;
  font: 12px sans-serif;
  box-shadow: 0 4px 16px #0008;
`,e8=kU`
  display: block;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  &:hover, &:focus-visible { background: #444; }
`,HHi=({component:t,onViewSchematicComponent:e,position:n,onClose:o,onXRayNet:i,xRayGroups:r=[],onXRayGroup:s,xRayDisplayName:a="Net",onExitXRayNet:A})=>{const c=eTi(),[l,u]=ee.useState(!1),g=Kc(x=>x.hidden_layer_opacity),h=Kc(x=>x.setHiddenLayerOpacity),[d,p]=ee.useState(!1),[m,_]=ee.useState(!1),f=ee.useRef(null),I=window.innerWidth<480,C=!I&&n.x+460>window.innerWidth,y=I?{position:"relative"}:{position:"absolute",top:0,...C?{right:"100%"}:{left:"100%"}};return ee.useEffect(()=>{const x=B=>{f.current?.contains(B.target)||(B.preventDefault(),o())},E=B=>{B.key==="Escape"&&(B.preventDefault(),o())};return f.current?.querySelector("button")?.focus(),window.addEventListener("pointerdown",x,!0),window.addEventListener("keydown",E),window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{window.removeEventListener("pointerdown",x,!0),window.removeEventListener("keydown",E),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[o]),c6.createPortal(K.jsxs("div",{ref:f,role:"menu","aria-label":"PCB context menu",className:dfe,onContextMenu:x=>{x.preventDefault(),x.stopPropagation()},onPointerDown:x=>x.stopPropagation(),onMouseDown:x=>x.stopPropagation(),onClick:x=>x.stopPropagation(),onKeyDown:x=>{x.stopPropagation();const E=x.target.closest("button");if(!E)return;const B=E.closest('[role="menu"]'),S=Array.from(B.querySelectorAll("button:not(:disabled)")).filter(Q=>Q.closest('[role="menu"]')===B);if(x.key==="ArrowDown"||x.key==="ArrowUp"){x.preventDefault();const Q=x.key==="ArrowDown"?1:-1;S[(S.indexOf(E)+Q+S.length)%S.length]?.focus()}else x.key==="ArrowRight"&&E.hasAttribute("aria-haspopup")?(x.preventDefault(),E.click(),requestAnimationFrame(()=>E.parentElement?.querySelector('[role="menu"] button')?.focus())):x.key==="ArrowLeft"?(x.preventDefault(),B.parentElement?.querySelector(":scope > button")?.focus(),B.getAttribute("aria-label")==="Hidden Layer Visibility"?_(!1):B.getAttribute("aria-label")==="Visibility"?p(!1):B.getAttribute("aria-label")==="Rendering Engine"&&u(!1)):x.key==="Escape"&&(x.preventDefault(),o())},style:{position:"fixed",zIndex:1e4,left:Math.max(C?310:4,Math.min(n.x,window.innerWidth-(I?248:168))),top:Math.max(4,Math.min(n.y,window.innerHeight-(I?340:260))),width:I?230:150,maxHeight:window.innerHeight-8,...I?{overflowY:"auto"}:{}},children:[i&&K.jsxs("button",{type:"button",role:"menuitem",className:e8,style:{whiteSpace:"normal",overflowWrap:"anywhere"},onClick:()=>{i(),o()},children:["X-Ray ",a]}),s&&r.map(x=>K.jsxs("button",{type:"button",role:"menuitem",className:e8,style:{whiteSpace:"normal",overflowWrap:"anywhere"},onClick:()=>{s(x),o()},children:["X-Ray ",x.name]},x.id)),A&&K.jsx("button",{type:"button",role:"menuitem",className:e8,onClick:()=>{A(),o()},children:"Exit X-Ray Net"}),K.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{p(!0),u(!1)},children:[K.jsx("button",{type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,className:e8,onClick:()=>{p(!0),u(!1)},children:"Visibility ▸"}),d&&K.jsx("div",{role:"menu","aria-label":"Visibility",className:dfe,style:y,children:K.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>_(!0),children:[K.jsx("button",{type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":m,className:e8,onClick:()=>_(!0),children:"Hidden Layer Visibility ▸"}),m&&K.jsx("div",{role:"menu","aria-label":"Hidden Layer Visibility",className:dfe,style:{minWidth:80,...y},children:[0,.05,.1,.2,.4,.6,.8,1].map(x=>K.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":g===x,className:e8,onClick:()=>{h(x),o()},children:[K.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:16},children:g===x?"✓":""}),x===0?"Hide":`${x*100}%`]},x))})]})})]}),c&&K.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{u(!0),p(!1)},children:[K.jsx("button",{type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":l,className:e8,onClick:()=>{u(!0),p(!1)},children:"Rendering Engine ▸"}),l&&K.jsx("div",{role:"menu","aria-label":"Rendering Engine",className:dfe,style:y,children:["canvas","webgpu"].map(x=>K.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":c.renderer===x,className:e8,onClick:()=>{c.setRenderer(x),o()},children:[K.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:16},children:c.renderer===x?"✓":""}),x==="canvas"?"Canvas":"WebGPU (experimental)"]},x))})]}),t&&e&&K.jsxs("button",{type:"button",role:"menuitem",className:e8,style:{whiteSpace:"normal",overflowWrap:"anywhere"},onClick:()=>{o(),e({source_component_id:t.source_component_id,pcb_component_id:t.pcb_component_id,refdes:t.refdes})},children:[K.jsx("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{verticalAlign:"-1px",marginRight:5},children:K.jsx("path",{d:"M5 11 11 5M5 5h6v6"})}),t.refdes," on Schematic"]}),t?.manufacturer_part_number&&K.jsxs("button",{type:"button",role:"menuitem",disabled:!0,"aria-label":`Manufacturer part number: ${t.manufacturer_part_number}`,className:e8,style:{marginTop:4,background:"#292929",color:"#aaa",cursor:"default",whiteSpace:"normal",overflowWrap:"anywhere"},children:["MPN: ",t.manufacturer_part_number]})]}),document.body)},WU=({children:t,isSmallScreen:e,onClick:n,...o})=>{const{style:i,...r}=pee(n);return K.jsx("div",{...o,...r,style:{backgroundColor:"#1F1F1F",border:"1px solid #666",margin:0,padding:4,paddingLeft:e?8:6,paddingRight:e?8:6,borderRadius:2,color:"#eee",cursor:"pointer",fontSize:12,height:"fit-content",userSelect:"none",whiteSpace:"nowrap",...i,...o.style},children:t})},OHi=t=>{const e=new Map;return t.forEach((n,o)=>{const i=n.error_type||"unknown_error",r=e.get(i)||[];r.push({error:n,index:o,errorId:JU(n,o)}),e.set(i,r)}),Array.from(e.entries()).map(([n,o])=>({errorType:n,errors:o}))},GHi=({onClose:t,setHoveredErrorId:e,setFocusedErrorId:n,highlightDurationMs:o=3e3})=>{const i=ee.useRef(null),r=ee.useRef(null),s=ee.useRef(null),a=ee.useCallback(()=>{i.current!==null&&(window.clearTimeout(i.current),i.current=null),r.current!==null&&(window.cancelAnimationFrame(r.current),r.current=null)},[]);ee.useEffect(()=>a,[a]);const A=ee.useCallback(l=>{a(),s.current=l,e(l),n(null),r.current=window.requestAnimationFrame(()=>{n(l),r.current=null}),t(),i.current=window.setTimeout(()=>{s.current=null,e(null),n(null),i.current=null},o)},[a,o,t,n,e]),c=ee.useCallback(l=>s.current===l,[]);return{handleErrorSelect:A,isSelectedError:c}},YHi=({errorId:t,errorMessage:e,copiedErrorId:n,onCopy:o})=>{const{style:i,...r}=pee(()=>o(e,t));return K.jsx("button",{type:"button","aria-label":n===t?"Error message copied":"Copy error message",style:{position:"absolute",top:12,right:16,cursor:"pointer",color:"#888",fontSize:16,background:"none",border:"none",padding:0,display:"flex",alignItems:"center",...i},...r,children:n===t?K.jsx("span",{style:{color:"#4caf50",fontSize:12},children:"Copied!"}):K.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:K.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})})})},UHi=({elements:t,isOpen:e,isSmallScreen:n,onToggle:o,onClose:i,setHoveredErrorId:r,setFocusedErrorId:s})=>{const[a,A]=ee.useState(null),[c,l]=ee.useState(new Set),[u,g]=ee.useState(new Set),[,h]=oFi(),{handleErrorSelect:d,isSelectedError:p}=GHi({onClose:i,setHoveredErrorId:r,setFocusedErrorId:s}),m=ee.useMemo(()=>t?.filter(y=>y.type.includes("error"))??[],[t]),_=m.length,f=ee.useMemo(()=>OHi(m),[m]),I=ee.useCallback(y=>{l(x=>{const E=new Set(x);return E.has(y)?E.delete(y):E.add(y),E})},[]),C=ee.useCallback(y=>{g(x=>{const E=new Set(x);return E.has(y)?E.delete(y):E.add(y),E})},[]);return K.jsxs("div",{style:{position:"relative"},children:[K.jsx(WU,{isSmallScreen:n,style:_>0?{color:"red"}:void 0,onClick:o,children:K.jsxs("div",{children:[_," errors"]})}),e&&_>0&&K.jsx("div",{style:{position:"absolute",top:"100%",left:0,backgroundColor:"#2a2a2a",border:"1px solid #666",borderRadius:4,marginTop:4,zIndex:1e3,minWidth:n?"280px":"400px",maxWidth:n?"90vw":"600px",maxHeight:"400px",overflow:"auto",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)"},children:f.map(({errorType:y,errors:x},E)=>{const B=c.has(y);return K.jsxs("div",{style:{borderBottom:E<f.length-1?"1px solid #444":"none"},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",backgroundColor:"#232323",transition:"background-color 0.2s ease",touchAction:"manipulation",position:"sticky",top:0,zIndex:1},onMouseEnter:S=>{S.currentTarget.style.backgroundColor="#303030"},onMouseLeave:S=>{S.currentTarget.style.backgroundColor="#232323"},onTouchStart:S=>{S.stopPropagation(),S.currentTarget.style.backgroundColor="#303030"},onTouchEnd:S=>{S.stopPropagation(),S.preventDefault(),S.currentTarget.style.backgroundColor="#232323",I(y)},onClick:S=>{S.stopPropagation(),I(y)},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"#ff6b6b"},children:[K.jsx("div",{style:{color:"#888",fontSize:"16px",transform:B?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s ease",flexShrink:0},children:"›"}),K.jsx("div",{style:{fontWeight:"bold",fontSize:n?"12px":"13px"},children:y})]}),K.jsx("div",{style:{fontSize:n?"12px":"13px",color:"#aaa",whiteSpace:"nowrap",marginLeft:12},children:x.length})]}),!B&&x.map(({error:S,index:Q,errorId:w})=>{const M=u.has(w),k=S.message??"No error message";return K.jsxs("div",{style:{borderTop:"1px solid #3a3a3a"},children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"12px 16px 12px 24px",cursor:"pointer",backgroundColor:"#2a2a2a",transition:"background-color 0.2s ease",touchAction:"manipulation"},onMouseEnter:R=>{R.currentTarget.style.backgroundColor="#333",r(w)},onMouseLeave:R=>{R.currentTarget.style.backgroundColor="#2a2a2a",p(w)||r(null)},onTouchStart:R=>{R.stopPropagation(),R.currentTarget.style.backgroundColor="#333",r(w)},onTouchEnd:R=>{R.stopPropagation(),R.preventDefault(),R.currentTarget.style.backgroundColor="#2a2a2a",d(w)},onClick:R=>{R.stopPropagation(),d(w)},children:[K.jsx("div",{style:{flex:1,fontSize:n?"12px":"13px",color:"#ddd",lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",userSelect:"text"},children:k}),K.jsx("button",{type:"button","aria-label":M?"Collapse error details":"Expand error details",style:{color:"#888",fontSize:"16px",transform:M?"rotate(0deg)":"rotate(90deg)",transition:"transform 0.2s ease",flexShrink:0,background:"none",border:"none",padding:0,cursor:"pointer"},onMouseDown:R=>R.stopPropagation(),onClick:R=>{R.stopPropagation(),C(w)},onTouchEnd:R=>{R.stopPropagation(),R.preventDefault(),C(w)},children:"›"})]}),M&&K.jsxs("div",{"data-error-id":Q,style:{display:"block",padding:"12px 16px 12px 24px",backgroundColor:"#1a1a1a",borderTop:"1px solid #444",position:"relative"},children:[K.jsx("div",{style:{fontSize:n?"11px":"12px",color:"#ccc",lineHeight:1.5,wordWrap:"break-word",overflowWrap:"break-word",hyphens:"auto",userSelect:"text",paddingRight:30},onMouseDown:R=>R.stopPropagation(),onClick:R=>R.stopPropagation(),children:k}),K.jsx(YHi,{errorId:w,errorMessage:k,copiedErrorId:a,onCopy:(R,F)=>{h(R),A(F),setTimeout(()=>A(null),2e3)}})]})]},w)})]},y)})})]})},KHi=({name:t,selected:e,onClick:n})=>{const{style:o,...i}=pee(n);return K.jsxs("div",{className:kU`
        margin-top: 2px;
        padding: 4px;
        padding-left: 8px;
        padding-right: 18px;
        cursor: pointer;

        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }
      `,...i,style:o,children:[K.jsx("span",{style:{marginRight:2,opacity:e?1:0},children:"•"}),K.jsx("span",{style:{marginLeft:2,fontWeight:500,color:dee[t.replace(/-/,"")]},children:t})]})},C4=({label:t,checked:e,onClick:n})=>{const{style:o,...i}=pee(n);return K.jsxs("div",{className:kU`
        margin-top: 2px;
        padding: 4px;
        padding-left: 8px;
        padding-right: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;

        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }
      `,...i,style:o,children:[K.jsx("input",{type:"checkbox",checked:e,onChange:()=>{},readOnly:!0}),K.jsx("span",{style:{color:"#eee"},children:t})]})},zhn=({label:t,checked:e,onClick:n})=>{const{style:o,...i}=pee(n);return K.jsxs("div",{className:kU`
        margin-top: 2px;
        padding: 4px;
        padding-left: 8px;
        padding-right: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;

        &:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }
      `,...i,style:o,children:[K.jsx("input",{type:"radio",checked:e,onChange:()=>{},readOnly:!0}),K.jsx("span",{style:{color:"#eee"},children:t})]})},VHi=({children:t,elements:e,onContextMenuOpenChange:n,getNetAtPoint:o,getComponentAtPoint:i,onViewSchematicComponent:r,xRayNetIds:s=[],onXRayNetsChange:a})=>{const A=LHi(),{isMouseOverContainer:c,setIsMouseOverContainer:l,selectedLayer:u,selectLayer:g,viewSettings:h,setIsShowingRatsNest:d,setIsShowingMultipleTracesLength:p,setIsShowingAutorouting:m,setIsShowingDrcErrors:_,setIsShowingDrcWarnings:f,setIsShowingCopperPours:I,setIsShowingCourtyards:C,setIsShowingPcbGroups:y,setIsShowingGroupAnchorOffsets:x,setIsShowingSolderMask:E,setIsShowingSilkscreen:B,setIsShowingFabricationNotes:S,setIsShowingPcbNotes:Q,setPcbGroupViewMode:w,setHoveredErrorId:M,setFocusedErrorId:k}=Kc(it=>({isMouseOverContainer:it.is_mouse_over_container,setIsMouseOverContainer:it.setIsMouseOverContainer,selectedLayer:it.selected_layer,selectLayer:it.selectLayer,viewSettings:{is_showing_rats_nest:it.is_showing_rats_nest,is_showing_multiple_traces_length:it.is_showing_multiple_traces_length,is_showing_autorouting:it.is_showing_autorouting,is_showing_drc_errors:it.is_showing_drc_errors,is_showing_drc_warnings:it.is_showing_drc_warnings,is_showing_copper_pours:it.is_showing_copper_pours,is_showing_courtyards:it.is_showing_courtyards,is_showing_pcb_groups:it.is_showing_pcb_groups,is_showing_group_anchor_offsets:it.is_showing_group_anchor_offsets,is_showing_solder_mask:it.is_showing_solder_mask,is_showing_silkscreen:it.is_showing_silkscreen,is_showing_fabrication_notes:it.is_showing_fabrication_notes,is_showing_pcb_notes:it.is_showing_pcb_notes,pcb_group_view_mode:it.pcb_group_view_mode},setIsShowingRatsNest:it.setIsShowingRatsNest,setIsShowingMultipleTracesLength:it.setIsShowingMultipleTracesLength,setIsShowingAutorouting:it.setIsShowingAutorouting,setIsShowingDrcErrors:it.setIsShowingDrcErrors,setIsShowingDrcWarnings:it.setIsShowingDrcWarnings,setIsShowingCopperPours:it.setIsShowingCopperPours,setIsShowingCourtyards:it.setIsShowingCourtyards,setIsShowingPcbGroups:it.setIsShowingPcbGroups,setIsShowingGroupAnchorOffsets:it.setIsShowingGroupAnchorOffsets,setIsShowingSolderMask:it.setIsShowingSolderMask,setIsShowingSilkscreen:it.setIsShowingSilkscreen,setIsShowingFabricationNotes:it.setIsShowingFabricationNotes,setIsShowingPcbNotes:it.setIsShowingPcbNotes,setPcbGroupViewMode:it.setPcbGroupViewMode,setHoveredErrorId:it.setHoveredErrorId,setFocusedErrorId:it.setFocusedErrorId})),[R,F]=ee.useState(null),[O,U]=ee.useState([]),[Y,W]=ee.useState(),[te,j]=ee.useState("Net"),[J,oe]=ee.useState(),ie=it=>{const Yt=it.currentTarget.getBoundingClientRect();return i?.({x:it.clientX-Yt.left,y:it.clientY-Yt.top})},ne=ee.useRef(null),le=Kc(it=>it.in_edit_mode),ge=it=>{const Yt=it.currentTarget.getBoundingClientRect();return o?.({x:it.clientX-Yt.left,y:it.clientY-Yt.top})},_e=ee.useCallback(()=>{F(null),n?.(!1)},[n]),[ue,fe]=ee.useState(!1),[pe,ye]=ee.useState(!1),[Me,ve]=ee.useState(!1),[he,Qe]=ee.useState(!1),[Pe,we]=ee.useState(!1);ee.useEffect(()=>{const it=()=>Qe(!0),Yt=()=>Qe(!1),pn=()=>we(!0),be=()=>we(!1);return window.addEventListener("arm-dimension-tool",it),window.addEventListener("disarm-dimension-tool",Yt),window.addEventListener("arm-bounds-tool",pn),window.addEventListener("disarm-bounds-tool",be),()=>{window.removeEventListener("arm-dimension-tool",it),window.removeEventListener("disarm-dimension-tool",Yt),window.removeEventListener("arm-bounds-tool",pn),window.removeEventListener("disarm-bounds-tool",be)}},[]);const Te=Afe(e??[]),Re=Te,Ee=ee.useRef(!1),ke=ee.useRef(null),Ce={1:Te[0]?()=>g(Te[0]):()=>{},2:Te[1]?()=>g(Te[1]):()=>{},3:Te[2]?()=>g(Te[2]):()=>{},4:Te[3]?()=>g(Te[3]):()=>{},5:Te[4]?()=>g(Te[4]):()=>{},6:Te[5]?()=>g(Te[5]):()=>{},7:Te[6]?()=>g(Te[6]):()=>{},8:Te[7]?()=>g(Te[7]):()=>{},9:Te[8]?()=>g(Te[8]):()=>{},0:Te[9]?()=>g(Te[9]):()=>{}};Z6("1",Ce[1],ke),Z6("2",Ce[2],ke),Z6("3",Ce[3],ke),Z6("4",Ce[4],ke),Z6("5",Ce[5],ke),Z6("6",Ce[6],ke),Z6("7",Ce[7],ke),Z6("8",Ce[8],ke),Z6("9",Ce[9],ke),Z6("0",Ce[0],ke),ee.useLayoutEffect(()=>{if(Ee.current)return;Ee.current=!0;const it=Yt=>{if(ke.current){const pn=ke.current.getBoundingClientRect();Yt.clientX>=pn.left&&Yt.clientX<=pn.right&&Yt.clientY>=pn.top&&Yt.clientY<=pn.bottom&&l(!0)}document.removeEventListener("mousemove",it)};return document.addEventListener("mousemove",it),()=>{document.removeEventListener("mousemove",it)}},[l]);const Le=ee.useCallback(()=>{l(!0)},[l]),Ye=ee.useCallback(()=>{c||l(!0)},[c,l]),tt=ee.useCallback(()=>{l(!1),ye(!1),fe(!1),ve(!1)},[l]),At=ee.useCallback(()=>{ye(!pe)},[pe]),at=ee.useCallback(()=>{const it=!Me;ve(it),it&&fe(!1),it||M(null)},[Me,M]),nt=ee.useCallback(()=>{ve(!1)},[]),gt=ee.useCallback(()=>{d(!h.is_showing_rats_nest)},[h.is_showing_rats_nest,d]),bt=ee.useCallback(()=>{Qe(!0),we(!1),window.dispatchEvent(new Event("arm-dimension-tool"))},[]),Ct=ee.useCallback(()=>{we(!0),Qe(!1),window.dispatchEvent(new Event("arm-bounds-tool"))},[]),Dt=ee.useCallback(()=>{const it=!ue;fe(it),it&&ve(!1)},[ue]),kt=ee.useCallback(it=>{it.stopPropagation()},[]);return K.jsxs("div",{ref:ke,onPointerDown:it=>{ne.current={x:it.clientX,y:it.clientY}},onClick:it=>{if(it.detail>1||le||he||Pe||it.target.closest("button, input, select, [role=menu]"))return;const Yt=ne.current;if(!Yt||Math.hypot(it.clientX-Yt.x,it.clientY-Yt.y)>4)return;const pn=ge(it),be=ie(it);if(!pn&&!be)return;const et=pn?.netId;et&&s.includes(et)?(a?.(s.filter(It=>It!==et)),_e()):(W(et),j(pn?.displayName??"Net"),U(pn?.groups??[]),oe(be),n?.(!0),F({x:it.clientX,y:it.clientY}))},onDoubleClick:()=>{a?.([]),_e()},onContextMenu:it=>{it.preventDefault(),it.stopPropagation();const Yt=ge(it);oe(ie(it)),W(Yt?.netId),j(Yt?.displayName??"Net"),U(Yt?.groups??[]),n?.(!0),F({x:it.clientX,y:it.clientY})},style:{position:"relative",zIndex:"999 !important"},onMouseEnter:Le,onMouseLeave:tt,onMouseMove:Ye,children:[t,R&&K.jsx(HHi,{position:R,component:J,onViewSchematicComponent:r,onClose:_e,xRayDisplayName:te,xRayGroups:O.filter(it=>it.netIds.some(Yt=>!s.includes(Yt))),onXRayGroup:it=>a?.([...new Set([...s,...it.netIds])]),onXRayNet:Y&&!s.includes(Y)?()=>a?.([...s,Y]):void 0,onExitXRayNet:s.length>0?()=>a?.([]):void 0}),K.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:c?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",FHi.version]}),K.jsxs("div",{"data-toolbar-overlay":!0,onTouchStart:it=>it.stopPropagation(),onTouchEnd:it=>it.stopPropagation(),onTouchMove:it=>it.stopPropagation(),onMouseDown:kt,onMouseMove:kt,onMouseUp:kt,onPointerDown:kt,onPointerMove:kt,onPointerUp:kt,onWheel:kt,style:{position:"absolute",opacity:A||c?1:0,top:16,left:16,right:A?16:"auto",transition:c?"opacity 100ms linear":"opacity 300ms linear",zIndex:Ru.toolbarOverlay,color:"red",display:"flex",flexWrap:"wrap",maxWidth:"550px",gap:4,fontSize:12,fontFamily:"sans-serif"},children:[K.jsxs(WU,{isSmallScreen:A,onClick:At,onMouseLeave:()=>{pe&&ye(!1)},children:[K.jsxs("div",{children:["layer:"," ",K.jsx("span",{style:{marginLeft:2,fontWeight:500,color:dee[u]},children:u})]}),pe&&K.jsx("div",{style:{marginTop:4,minWidth:120},children:Re.map(it=>K.jsx(KHi,{name:it,selected:it===u,onClick:()=>{g(it)}},it))})]}),K.jsx(UHi,{elements:e,isOpen:Me,isSmallScreen:A,onToggle:at,onClose:nt,setHoveredErrorId:M,setFocusedErrorId:k}),K.jsx(WU,{isSmallScreen:A,style:{},onClick:gt,children:K.jsxs("div",{children:[h.is_showing_rats_nest?"✖ ":"","Rats Nest"]})}),K.jsx(WU,{isSmallScreen:A,style:he?{backgroundColor:"#444"}:{},onClick:bt,children:K.jsx("div",{children:"📏"})}),K.jsx(WU,{isSmallScreen:A,style:Pe?{backgroundColor:"#444"}:{},onClick:Ct,children:K.jsx("div",{children:"Bounds"})}),K.jsx(WU,{isSmallScreen:A,onClick:Dt,children:K.jsxs("div",{children:[K.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View",K.jsx("span",{style:{fontSize:"8px",transform:ue?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),ue&&K.jsxs("div",{style:{marginTop:4,minWidth:120},children:[K.jsx(C4,{label:"Show All Trace Lengths",checked:h.is_showing_multiple_traces_length,onClick:()=>{p(!h.is_showing_multiple_traces_length)}}),K.jsx(C4,{label:"Show Autorouting Animation",checked:h.is_showing_autorouting,onClick:()=>{m(!h.is_showing_autorouting)}}),K.jsx(C4,{label:"Show DRC Errors",checked:h.is_showing_drc_errors,onClick:()=>{_(!h.is_showing_drc_errors)}}),K.jsx(C4,{label:"Show DRC Warnings",checked:h.is_showing_drc_warnings,onClick:()=>{f(!h.is_showing_drc_warnings)}}),K.jsx(C4,{label:"Show Copper Pours",checked:h.is_showing_copper_pours,onClick:()=>{I(!h.is_showing_copper_pours)}}),K.jsx(C4,{label:"Show Courtyards",checked:h.is_showing_courtyards,onClick:()=>{C(!h.is_showing_courtyards)}}),K.jsx(C4,{label:"Show Solder Mask",checked:h.is_showing_solder_mask,onClick:()=>{E(!h.is_showing_solder_mask)}}),K.jsx(C4,{label:"Show Silkscreen",checked:h.is_showing_silkscreen,onClick:()=>{B(!h.is_showing_silkscreen)}}),K.jsx(C4,{label:"Show Fabrication Notes",checked:h.is_showing_fabrication_notes,onClick:()=>{S(!h.is_showing_fabrication_notes)}}),K.jsx(C4,{label:"Show PCB Notes",checked:h.is_showing_pcb_notes,onClick:()=>{Q(!h.is_showing_pcb_notes)}}),K.jsx(C4,{label:"Show Group Anchor Offsets",checked:h.is_showing_group_anchor_offsets,onClick:()=>{x(!h.is_showing_group_anchor_offsets)}}),K.jsx(C4,{label:"Show PCB Groups",checked:h.is_showing_pcb_groups,onClick:()=>{y(!h.is_showing_pcb_groups)}}),h.is_showing_pcb_groups&&K.jsxs("div",{style:{marginLeft:16},children:[K.jsx(zhn,{label:"Show All Groups",checked:h.pcb_group_view_mode==="all",onClick:()=>{w("all")}}),K.jsx(zhn,{label:"Show Named Groups",checked:h.pcb_group_view_mode==="named_only",onClick:()=>{w("named_only")}})]})]})]})})]})]})},zHi=t=>t.type==="pcb_manual_edit_conflict_warning"||t.type==="pcb_connector_not_in_accessible_orientation_warning",JHi=t=>t.type==="pcb_connector_not_in_accessible_orientation_warning"?`Connector faces ${t.facing_direction}; expected ${t.recommended_facing_direction}`:"Manual Edit Conflict",WHi=({children:t,transform:e=RP(),elements:n=[]})=>{const[o,{width:i,height:r}]=uee(),s=ee.useRef(null),a=Kc(A=>A.is_showing_drc_warnings);return ee.useEffect(()=>{const A=s.current;if(!A||!i||!r)return;A.width=i,A.height=r;const c=A.getContext("2d");if(!c)return;c.clearRect(0,0,i,r);const l=n.filter(g=>g.type==="pcb_component"),u=n.filter(zHi);c.strokeStyle=qi.board.drc_warning,c.lineWidth=2,u.forEach(g=>{const h=l.find(U=>U.pcb_component_id===g.pcb_component_id);if(!h)return;const{width:d,height:p,center:m}=h,_=_i(e,m),f=d*Math.abs(e.a),I=p*Math.abs(e.d),C=.1*Math.abs(e.a),y=f+C*2,x=I+C*2,E=_.x-y/2,B=_.y-x/2;c.beginPath(),c.rect(E,B,y,x),c.stroke();const S=JHi(g),Q=4,w=Math.max(8,Math.min(12,10*Math.abs(e.a)));c.font=`${w}px sans-serif`;const k=c.measureText(S).width+Q*2,R=w+Q*2,F=E+(y-k)/2,O=B+x+5;c.fillStyle="rgba(0, 0, 0, 0.7)",c.beginPath(),c.roundRect(F,O,k,R,3),c.fill(),c.fillStyle=qi.board.drc_warning,c.textAlign="center",c.textBaseline="middle",c.fillText(S,F+k/2,O+R/2)})},[n,e,i,r,a]),a?K.jsxs("div",{ref:o,style:{position:"relative",width:"100%",height:"100%"},children:[t,K.jsx("canvas",{ref:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none",zIndex:Ru.warnings}})]}):K.jsx("div",{ref:o,style:{position:"relative",width:"100%",height:"100%"},children:t})},jHi=t=>{const{transform:e,elements:n}=t,{hoveredErrorId:o,focusedErrorId:i,isShowingCopperPours:r,selectedLayer:s}=Kc(w=>({hoveredErrorId:w.hovered_error_id,focusedErrorId:w.focused_error_id,isShowingCopperPours:w.is_showing_copper_pours,selectedLayer:w.selected_layer})),a=i??o,A=ee.useMemo(()=>r?n:n.filter(w=>w.type!=="pcb_copper_pour"),[n,r]),c=ee.useMemo(()=>{const w=fFi(n);return A.flatMap(M=>IFi(M,n,w))},[A,n]),l=ee.useMemo(()=>nhn(n),[n]),[u,g]=ee.useState([]);ee.useEffect(()=>g([]),[l]),ee.useEffect(()=>{if(u.length===0)return;const w=M=>{M.key==="Escape"&&g([])};return window.addEventListener("keydown",w,!0),()=>window.removeEventListener("keydown",w,!0)},[u.length]);const h=ee.useMemo(()=>u.length>0?A.filter(w=>lhn(w)&&u.includes(gee(w,l)??"")):void 0,[A,l,u]),d=ee.useMemo(()=>{if(!h)return c;const w=new Set(h);return c.filter(M=>(M._element?.type==="pcb_smtpad"||M._element?.type==="pcb_plated_hole")&&w.has(M._element))},[c,h]),p=w=>{if(!e)return;const M=b$e(c,_i(V6(e),w),e,s).filter(k=>k._element?.type==="pcb_smtpad"||k._element?.type==="pcb_plated_hole");return M.sort((k,R)=>+(R.layer===s)-+(k.layer===s)),cFi(M[0]?._element,n)},m=w=>{if(!e)return;const M=(F,O)=>({netId:F,displayName:NFi(O,n,l),groups:RFi(F,n,l)}),R=b$e(c,_i(V6(e),w),e,s,u.length>0).filter(F=>lhn(F._element)&&F.layer!=="drill");R.sort((F,O)=>+(O.layer===s)-+(F.layer===s));for(const F of R){const O=gee(F._element,l);if(O&&u.includes(O))return M(O,F._element)}for(const F of R){const O=gee(F._element,l);if(O)return M(O,F._element)}},[_,f]=ee.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),[I,C]=ee.useState([]),y=ee.useRef(e??null),x=ee.useRef(null),E=ee.useMemo(()=>ohn(n),[n]),B=ee.useMemo(()=>{if(!a)return[];const M=n.filter(k=>k.type.includes("error")).find((k,R)=>JU(k,R)===a);return M?wFi(M):[]},[a,n]);ee.useEffect(()=>{e&&(y.current=e)},[e]),ee.useEffect(()=>()=>{Ahn(x.current)},[]),ee.useEffect(()=>{if(!t.width||!t.height||!t.setTransform||!i)return;const w=ahn(n,i);if(!w)return;const M=QFi({error:w,indexes:E});if(!M)return;const k=y.current??e;if(!k)return;const R=vFi({bounds:M,width:t.width,height:t.height});Ahn(x.current),DFi({startTransform:k,endTransform:R,durationMs:420,setAnimationFrameId:F=>{x.current=F},onUpdate:F=>{y.current=F,t.setTransform?.(F)}})},[i,n,E,t.height,t.setTransform,t.width]);const S=ee.useMemo(()=>{if(u.length>0)return c;const w=[..._.primitiveIdsInMousedOverNet,...B];return CFi({primitivesWithoutInteractionMetadata:c,drawingObjectIdsWithMouseOver:_.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:w})},[c,_,B,u]),Q=ee.useCallback(w=>{const M=[];for(const F of w)if(F._element){const O=l.getNetConnectedToId("pcb_port_id"in F._element?F._element?.pcb_port_id:"pcb_trace_id"in F._element?F._element?.pcb_trace_id:"");M.push(...l.getIdsConnectedToNet(O))}const k=new Set(w.map(F=>F._pcb_drawing_object_id));f({drawingObjectIdsWithMouseOver:k,primitiveIdsInMousedOverNet:M});const R=w.map(F=>F._parent_pcb_component?.type==="pcb_component"&&F._parent_pcb_component.pcb_component_id?F._parent_pcb_component.pcb_component_id:F._element?.type==="pcb_component"&&F._element.pcb_component_id?F._element.pcb_component_id:null).filter(F=>!!F);C(Array.from(new Set(R)))},[l]);return K.jsx(RHi,{elements:A,transform:e,primitives:d,selectedLayer:s,onMouseHoverOverPrimitives:Q,children:K.jsx(fHi,{disabled:!t.allowEditing,transform:e,soup:n,cancelPanDrag:t.cancelPanDrag,onCreateEditEvent:t.onCreateEditEvent,onModifyEditEvent:t.onModifyEditEvent,children:K.jsx(mHi,{transform:e,focusOnHover:t.focusOnHover,primitives:c,onBoundsSelected:t.onBoundsSelected,cancelPanDrag:t.cancelPanDrag,children:K.jsx(VHi,{elements:n,getNetAtPoint:m,xRayNetIds:u,onXRayNetsChange:g,onContextMenuOpenChange:t.onContextMenuOpenChange,getComponentAtPoint:p,onViewSchematicComponent:t.onViewSchematicComponent,children:K.jsx(CHi,{transform:e,elements:n,children:K.jsx(kHi,{transform:e,soup:n,children:K.jsx(THi,{transform:e,elements:n,hoveredComponentIds:I,children:K.jsx(iHi,{transform:e,debugGraphics:t.debugGraphics,children:K.jsx(WHi,{transform:e,elements:n,children:t.renderer==="canvas"?K.jsx(kLi,{transform:e,primitives:S,elements:A,xRayElements:h,width:t.width,height:t.height,grid:t.grid}):K.jsx(kFi,{transform:e,primitives:S,elements:n,xRayElements:h,width:t.width,height:t.height,grid:t.grid})})})})})})})})})})},hfe=t=>Number.isFinite(t)?t.toFixed(4):"NaN",$Hi=t=>{let e=5381;for(let n=0;n<t.length;n++)e=(e<<5)+e+t.charCodeAt(n);return Math.abs(e)},qHi=t=>{if(!t?.length)return"0";const e=[];for(const i of t){if(!i?.type?.startsWith("pcb_"))continue;const r=Tki(i),s=_$e([i]),a=[hfe(s.minX),hfe(s.minY),hfe(s.maxX),hfe(s.maxY)].join(",");let A=`${r}:${a}`;if(i.type==="pcb_trace"){const c=(i.route??[]).length;A+=`:${c}`;for(const l of i.route??[])l.route_type==="via"&&(A+=`:${l.tented_on_top}:${l.tented_on_bottom}`)}i.type==="pcb_board"&&(A+=`:${i.default_via_tented_on_top}:${i.default_via_tented_on_bottom}`),i.type==="pcb_via"&&(A+=`:${i.tented_on_top}:${i.tented_on_bottom}`),e.push(A)}if(e.length===0)return"0";e.sort();const n=e.join(","),o=$Hi(n);return`${e.length}_${o.toString(36)}`},XHi=t=>{if(!t)return"empty";const e=t.find(o=>o.type==="pcb_board");if(!e)return"no-board";const n=o=>Math.round(o*1e3)/1e3;return e.outline?e.outline.map(o=>`${n(o.x)}_${n(o.y)}`).join(","):`${n(e.width)}_${n(e.height)}`};function ZHi({circuitJson:t,editEvents:e}){let n=structuredClone(t);for(const o of e){if(o.edit_event_type==="edit_pcb_component_location"){const a=wS(n).pcb_component.get(o.pcb_component_id);if(a?.center.x===o.new_center.x&&a.center.y===o.new_center.y)continue;const c=Qd(o.new_center.x-o.original_center.x,o.new_center.y-o.original_center.y);n=n.map(l=>"pcb_component_id"in l&&l.pcb_component_id===o.pcb_component_id?Rki(l,c):l);continue}if(o.edit_event_type==="edit_schematic_component_location"){n=n.map(a=>a.type==="schematic_component"&&a.schematic_component_id===o.schematic_component_id?{...a,center:o.new_center}:a);continue}if(o.edit_event_type!=="edit_pcb_trace_hint"||!o.pcb_trace_hint_id)continue;if(wS(n).pcb_trace_hint.get(o.pcb_trace_hint_id)){n=n.map(a=>a.type==="pcb_trace_hint"&&a.pcb_trace_hint_id===o.pcb_trace_hint_id?{...a,route:o.route}:a);continue}const r=wS(n).pcb_port.get(o.pcb_port_id);if(!r?.pcb_component_id)continue;const s={type:"pcb_trace_hint",pcb_trace_hint_id:o.pcb_trace_hint_id,route:o.route,pcb_port_id:o.pcb_port_id,pcb_component_id:r.pcb_component_id};n=n.filter(a=>a.type!=="pcb_trace_hint"||a.pcb_port_id!==o.pcb_port_id).concat(s)}return n}var eOi=NC(Qd(400,300),vS(40,-40)),S$e=({circuitJson:t,debugGraphics:e,height:n=600,renderer:o="webgpu",initialState:i,allowEditing:r=!0,editEvents:s,onEditEventsChanged:a,onBoundsSelected:A,onViewSchematicComponent:c,focusOnHover:l=!1,clickToInteractEnabled:u=!1,disablePcbGroups:g=!1})=>{const[h,d]=ee.useState(o);ee.useEffect(()=>d(o),[o]);const p=ee.useMemo(()=>({renderer:h,setRenderer:d}),[h]),[m,_]=ee.useState(!u),[f,I]=ee.useState(!1),C=ee.useRef(!1),[y,x]=uee(),[E,B]=ee.useState(eOi),S=ee.useCallback(le=>{if(C.current||le instanceof MouseEvent&&(le.button===2||(le.buttons&2)!==0))return!1;const ge=le.target;return ge instanceof Element?!ge.closest("[data-toolbar-overlay]"):!0},[]),{ref:Q,setTransform:w,cancelDrag:M}=AFi({transform:E,onSetTransform:B,enabled:m&&!f,shouldDrag:S}),k=ee.useCallback(le=>{C.current=le,le&&M(),I(le)},[M]);let[R,F]=ee.useState([]);R=s??R;const O=ee.useRef(!1),U=ee.useRef(null),Y=ee.useMemo(()=>qHi(t),[t]),W=XHi(t),te=()=>{const le=x?.width>0?x:{width:500,height:500},{center:ge,width:_e,height:ue}=J.some(ye=>ye.type.startsWith("pcb_"))?Yki(J.filter(ye=>ye.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},fe=Math.min((le.width??0)/_e,(le.height??0)/ue,100)*.75,pe=NC(Qd((le.width??0)/2,(le.height??0)/2),vS(fe,-fe,0,0),Qd(-ge.x,-ge.y));w(pe)};ee.useEffect(()=>{x?.width&&t&&t.length!==0&&(O.current||(te(),O.current=!0))},[t,x]),ee.useEffect(()=>{O.current===!0&&te()},[W]);const j=ee.useMemo(()=>t?.filter(le=>le.type.startsWith("pcb_")||le.type.startsWith("source_"))??[],[Y]),J=ee.useMemo(()=>ZHi({circuitJson:j,editEvents:R}),[j,R]),oe=le=>{F([...R,le]),a?.([...R,le])},ie=le=>{const ge=R.map(_e=>_e.edit_event_id===le.edit_event_id?{..._e,...le}:_e);F(ge),a?.(ge)},ne=ee.useMemo(()=>({...i,...g&&{is_showing_pcb_groups:!1}}),[i,g]);return K.jsx(Zgn.Provider,{value:p,children:K.jsxs("div",{ref:Q,style:{position:"relative"},onContextMenu:le=>le.preventDefault(),children:[K.jsx("div",{ref:y,children:K.jsxs(jki,{initialState:ne,disablePcbGroups:g,children:[K.jsx(jHi,{renderer:h,transform:E,setTransform:w,height:n,width:x.width,allowEditing:r,focusOnHover:l,onBoundsSelected:A,onViewSchematicComponent:c,cancelPanDrag:M,onContextMenuOpenChange:k,onCreateEditEvent:oe,onModifyEditEvent:ie,grid:{spacing:1,view_window:{left:0,right:x.width||500,top:n,bottom:0}},elements:J,debugGraphics:e}),K.jsx($ki,{})]})}),u&&!m&&K.jsx("div",{onClick:()=>{_(!0),te()},onTouchStart:le=>{const ge=le.touches[0];U.current={x:ge.clientX,y:ge.clientY}},onTouchEnd:le=>{const ge=le.changedTouches[0],_e=U.current;if(!_e)return;const ue=Math.abs(ge.clientX-_e.x),fe=Math.abs(ge.clientY-_e.y);ue<10&&fe<10&&(le.preventDefault(),_(!0),te()),U.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:Ru.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:K.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})})};const tOi=({circuitJson:t,containerClassName:e,...n})=>{const o=ee.useRef(null),[i,r]=ee.useState(620);return ee.useLayoutEffect(()=>{const s=()=>{if(o.current){const A=o.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(A,620),c))}};s();const a=new ResizeObserver(s);return o.current&&a.observe(o.current),window.addEventListener("resize",s),()=>{a.disconnect(),window.removeEventListener("resize",s)}},[]),K.jsx("div",{ref:o,className:e||"rf-w-full rf-h-full",children:K.jsx(S$e,{...n,circuitJson:t,height:i})})},nOi='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-z-\\[102\\]{z-index:102}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-0{margin:0}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-0{margin-bottom:0}.rf-mb-0\\.5{margin-bottom:.125rem}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-7{margin-bottom:1.75rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mr-auto{margin-right:auto}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-\\[4\\/3\\]{aspect-ratio:4/3}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-2{height:.5rem;width:.5rem}.rf-size-3{height:.75rem;width:.75rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.rf-h-0{height:0}.rf-h-0\\.5{height:.125rem}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-60px\\)\\]{height:calc(100vh - 60px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[80vh\\]{max-height:80vh!important}.rf-max-h-16{max-height:4rem}.rf-max-h-20{max-height:5rem}.rf-max-h-24{max-height:6rem}.rf-max-h-28{max-height:7rem}.rf-max-h-32{max-height:8rem}.rf-max-h-64{max-height:16rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[120px\\]{max-height:120px}.rf-max-h-\\[150px\\]{max-height:150px}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-max-h-none{max-height:none}.rf-min-h-0{min-height:0}.rf-min-h-56{min-height:14rem}.rf-min-h-72{min-height:18rem}.rf-min-h-\\[100px\\]{min-height:100px}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[360px\\]{min-height:360px}.rf-min-h-\\[400px\\]{min-height:400px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.rf-min-h-full{min-height:100%}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.\\!rf-w-\\[95vw\\]{width:95vw!important}.rf-w-1{width:.25rem}.rf-w-10{width:2.5rem}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-7{width:1.75rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[12px\\]{min-width:12px}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[192px\\]{min-width:192px}.rf-min-w-\\[600px\\]{min-width:600px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[95vw\\]{max-width:95vw!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-7xl{max-width:80rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[320px\\]{max-width:320px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-0{--tw-translate-y:-0px}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf--translate-y-1,.rf-translate-x-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.-rf-rotate-90,.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-rotate-90{--tw-rotate:-90deg}.rf-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-content-center{place-content:center}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-baseline{align-items:baseline}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-1\\.5{gap:.375rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.rf-gap-y-1{row-gap:.25rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-text-nowrap{text-wrap:nowrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-none{border-radius:0}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-0{border-width:0}.rf-border-2{border-width:2px}.rf-border-y{border-top-width:1px}.rf-border-b,.rf-border-y{border-bottom-width:1px}.rf-border-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-r{border-right-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-border{border-color:hsl(var(--border))}.rf-border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.rf-border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.rf-border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.rf-border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.rf-border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.rf-border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.rf-border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.rf-border-slate-800\\/60{border-color:rgba(30,41,59,.6)}.rf-border-transparent{border-color:transparent}.rf-border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.rf-border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-border-l-blue-500{--tw-border-opacity:1;border-left-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-t-blue-600{--tw-border-opacity:1;border-top-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-orange-50\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-50\\/50{background-color:rgba(254,242,242,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.rf-bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.rf-from-blue-500{--tw-gradient-from:#3b82f6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(59,130,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-from-emerald-500{--tw-gradient-from:#10b981 var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-from-green-500{--tw-gradient-from:#22c55e var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,197,94,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-from-red-500{--tw-gradient-from:#ef4444 var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-to-blue-600{--tw-gradient-to:#2563eb var(--tw-gradient-to-position)}.rf-to-emerald-600{--tw-gradient-to:#059669 var(--tw-gradient-to-position)}.rf-to-green-600{--tw-gradient-to:#16a34a var(--tw-gradient-to-position)}.rf-to-red-600{--tw-gradient-to:#dc2626 var(--tw-gradient-to-position)}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-stroke-1{stroke-width:1}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-2\\.5{padding-left:.625rem;padding-right:.625rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-5{padding-left:1.25rem;padding-right:1.25rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-1\\.5{padding-bottom:.375rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-1{padding-top:.25rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-align-bottom{vertical-align:bottom}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[10px\\]{font-size:10px}.rf-text-\\[11px\\]{font-size:11px}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-normal{font-weight:400}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-4{line-height:1rem}.rf-leading-5{line-height:1.25rem}.rf-leading-\\[0\\.95rem\\]{line-height:.95rem}.rf-leading-\\[1rem\\]{line-height:1rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-tight{letter-spacing:-.025em}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-wider{letter-spacing:.05em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.rf-text-foreground{color:hsl(var(--foreground))}.rf-text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted{color:hsl(var(--muted))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-accent-blue-600{accent-color:#2563eb}.rf-opacity-0{opacity:0}.rf-opacity-10{opacity:.1}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-shadow-sm,.rf-shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-150{transition-duration:.15s}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.rf-fade-in-0{--tw-enter-opacity:0}.rf-zoom-in-95{--tw-enter-scale:.95}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-150{animation-duration:.15s}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf--translate-y-0\\.5:hover{--tw-translate-y:-0.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:rf-border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\\:rf-bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\:rf-bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.hover\\:rf-shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-900:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(24 24 27/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-text-gray-500:disabled{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.disabled\\:rf-opacity-40:disabled{opacity:.4}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\:rf-scale-\\[1\\.03\\]{--tw-scale-x:1.03;--tw-scale-y:1.03;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-group:hover .group-hover\\:rf-opacity-100,.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.rf-peer:disabled~.peer-disabled\\:rf-cursor-not-allowed{cursor:not-allowed}.rf-peer:disabled~.peer-disabled\\:rf-opacity-70{opacity:.7}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-300:is(.rf-dark *){--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-mt-4{margin-top:1rem}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-h-5{height:1.25rem}.sm\\:rf-w-1\\/2{width:50%}.sm\\:rf-w-5{width:1.25rem}.sm\\:rf-w-\\[90vw\\]{width:90vw}.sm\\:rf-w-auto{width:auto}.sm\\:rf-max-w-\\[500px\\]{max-width:500px}.sm\\:rf-max-w-md{max-width:28rem}.sm\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-grid-cols-\\[minmax\\(0\\2c 1fr\\)_auto\\]{grid-template-columns:minmax(0,1fr) auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-gap-4{gap:1rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-p-3{padding:.75rem}.sm\\:rf-p-6{padding:1.5rem}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:rf-px-8{padding-left:2rem;padding-right:2rem}.sm\\:rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.sm\\:rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\\:rf-text-base{font-size:1rem;line-height:1.5rem}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-w-52{width:13rem}.md\\:rf-w-auto{width:auto}.md\\:rf-min-w-0{min-width:0}.md\\:rf-max-w-\\[660px\\]{max-width:660px}.md\\:rf-max-w-lg{max-width:32rem}.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:rf-grid-cols-\\[220px_1fr\\]{grid-template-columns:220px 1fr}.md\\:rf-flex-row{flex-direction:row}.md\\:rf-flex-col{flex-direction:column}.md\\:rf-overflow-y-auto{overflow-y:auto}.md\\:rf-overflow-x-hidden{overflow-x:hidden}.md\\:rf-border-b-0{border-bottom-width:0}.md\\:rf-border-r{border-right-width:1px}.md\\:rf-p-8{padding:2rem}.md\\:rf-py-8{padding-bottom:2rem;padding-top:2rem}.md\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\\:rf-max-w-\\[720px\\]{max-width:720px}.lg\\:rf-max-w-xl{max-width:36rem}.lg\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\\:rf-max-w-\\[800px\\]{max-width:800px}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',mee=()=>{ee.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=nOi,document.head.appendChild(e)},[])},oOi=t=>{ee.useEffect(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t])},Jhn=t=>`hsl(${rE.indexOf(t)*137.5%360}, 70%, 50%)`,iOi=({phaseTimings:t})=>{if(!t)return null;const e=Object.values(t).reduce((n,o)=>n+o,0);return K.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[K.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:rE.map(n=>{const o=t[n]||0,i=o/e*100;return K.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:Jhn(n)},children:K.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[n,": ",o.toFixed(1),"ms"]})},n)})}),K.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},rOi=t=>{if(t instanceof Blob)return t;if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="object")try{return JSON.stringify(t,null,2)}catch{return String(t)}return String(t)},sOi=({renderLog:t,onRerunWithDebug:e})=>{const[n,o]=ee.useState("chronological"),[i,r]=ee.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!t)return K.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[K.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&K.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[K.jsx("select",{value:i,onChange:c=>r(c.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(c=>K.jsx("option",{value:c.value,children:c.label},c.value))}),K.jsx(fA,{onClick:()=>e(i),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(t?.phaseTimings??{});n==="chronological"?a.sort((c,l)=>rE.indexOf(c[0])-rE.indexOf(l[0])):a.sort((c,l)=>l[1]-c[1]);const A=a.reduce((c,[l,u])=>c+u,0);return K.jsxs("div",{className:"rf-bg-white",children:[K.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[K.jsx("div",{children:"Render Logs"}),K.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&K.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[K.jsx("select",{value:i,onChange:c=>r(c.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(c=>K.jsx("option",{value:c.value,children:c.label},c.value))}),K.jsx(fA,{onClick:()=>e(i),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),K.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:K.jsxs("select",{onChange:c=>{if(c.target.value){const l=t?.debugOutputs?.find(u=>u.name===c.target.value);if(l){const u=rOi(l.content),g=u instanceof Blob?u:new Blob([u],{type:"text/plain"}),h=URL.createObjectURL(g),d=document.createElement("a");d.href=h,d.download=`debug-${l.name}.txt`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(h)}c.target.value=""}},disabled:!t?.debugOutputs||t.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[K.jsx("option",{value:"",children:"Download Debug Output"}),t?.debugOutputs?.map(c=>K.jsx("option",{value:c.name,children:c.name},c.name))]})}),K.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[K.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),K.jsxs("select",{value:n,onChange:c=>o(c.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[K.jsx("option",{value:"chronological",children:"Phase Order"}),K.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),K.jsx(iOi,{phaseTimings:t.phaseTimings}),K.jsxs("table",{className:"rf-w-full rf-text-xs",children:[K.jsx("thead",{children:K.jsxs("tr",{children:[K.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),K.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),K.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),K.jsx("tbody",{children:a.map(([c,l])=>K.jsxs("tr",{children:[K.jsx("td",{className:"rf-p-2",children:rE.indexOf(c)}),K.jsx("td",{className:"rf-p-2",children:c}),K.jsx("td",{className:"rf-p-2",children:K.jsx("div",{className:"rf-w-8",children:K.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Jhn(c),width:`${l/A*100}%`}})})}),K.jsx("td",{className:"rf-p-2",children:K.jsxs("div",{className:"rf-flex w-full",children:[K.jsxs("span",{className:"rf-flex-grow",children:[l,"ms"]}),K.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(l/A*100).toFixed(1),"%"]})]})})]},c))})]})]})};var aOi=8,Q$e=t=>Math.hypot(t.a,t.b)||1,AOi=t=>[t.label,t.inlineLabel].filter(Boolean).join(`
`),_ee=(t,e)=>Math.hypot(t.x-e.x,t.y-e.y),Whn=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r===0)return _ee(t,e);const s=((t.x-e.x)*o+(t.y-e.y)*i)/r,a=Math.max(0,Math.min(1,s));return _ee(t,{x:e.x+o*a,y:e.y+i*a})},cOi=(t,e,n)=>{const o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i);return r===0?_ee(t,e):Math.abs(i*t.x-o*t.y+n.x*e.y-n.y*e.x)/r},v$e=(t,e)=>{let n=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const r=e[o],s=e[i];r.y>t.y!=s.y>t.y&&t.x<(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x&&(n=!n)}return n},w$e=(t,e,n,o=!1)=>{if(e.length===0)return!1;const i=o?e.length:e.length-1;for(let r=0;r<i;r+=1){const s=e[r],a=e[(r+1)%e.length];if(Whn(t,s,a)<=n)return!0}return!1},jhn=(t,e,n)=>Math.max(n,(t??2)*Q$e(e)/2+4),PS=(t,e)=>Bn(t,e),P$e=(t,e,n,o)=>_ee(t,PS(n,e))<=o,lOi=(t,e,n,o)=>{if(e.points.length===0)return!1;if(e.points.length===1)return P$e(t,e.points[0],n,o);const i=e.points.map(r=>PS(n,r));return w$e(t,i,jhn(e.strokeWidth,n,o))},uOi=(t,e,n,o)=>{const{origin:i,directionVector:r}=e;if(r.x===0&&r.y===0)return!1;const s=PS(n,i),a=PS(n,{x:i.x+r.x,y:i.y+r.y});return cOi(t,s,a)<=jhn(e.strokeWidth,n,o)},gOi=(t,e,n,o)=>{const i=VQe(e,n).corners;return v$e(t,i)||w$e(t,i,o,!0)},dOi=(t,e,n,o)=>{const i=PS(n,e.center),r=e.radius*Q$e(n);return _ee(t,i)<=r+o},hOi=(t,e,n,o)=>{if(e.points.length===0)return!1;if(e.points.length===1)return P$e(t,e.points[0],n,o);const i=e.points.map(r=>PS(n,r));return v$e(t,i)||w$e(t,i,o,!0)},pOi=(t,e,n,o)=>{const i=jW(e),r=PS(n,i.shaftStart),s=PS(n,i.shaftEnd),a=Math.max(o,i.shaftWidth*Q$e(n)/2+4);return Whn(t,r,s)<=a?!0:i.heads.some(A=>{const c=[A.tip,A.leftWing,A.rightWing].map(l=>PS(n,l));return v$e(t,c)})};function mOi(t,e,n,o={}){const i=o.hitSlop??aOi;for(let s=(t.points?.length??0)-1;s>=0;s-=1){const a=t.points?.[s];if(a?.label&&P$e(n,a,e,i))return a.label}for(let s=(t.infiniteLines?.length??0)-1;s>=0;s-=1){const a=t.infiniteLines?.[s];if(a?.label&&uOi(n,a,e,i))return a.label}const r=t.lines?.map((s,a)=>({line:s,originalIndex:a})).sort((s,a)=>(s.line.zIndex??0)-(a.line.zIndex??0)||s.originalIndex-a.originalIndex)??[];for(let s=r.length-1;s>=0;s-=1){const a=r[s]?.line;if(a?.label&&lOi(n,a,e,i))return a.label}for(let s=(t.arrows?.length??0)-1;s>=0;s-=1){const a=t.arrows?.[s],A=a?AOi(a):"";if(!(!a||!A)&&pOi(n,a,e,i))return A}for(let s=(t.polygons?.length??0)-1;s>=0;s-=1){const a=t.polygons?.[s];if(a?.label&&hOi(n,a,e,i))return a.label}for(let s=(t.circles?.length??0)-1;s>=0;s-=1){const a=t.circles?.[s];if(a?.label&&dOi(n,a,e,i))return a.label}for(let s=(t.rects?.length??0)-1;s>=0;s-=1){const a=t.rects?.[s];if(a?.label&&gOi(n,a,e,i))return a.label}return null}const _Oi=Fs[typeof document<"u"&&document.createElement!==void 0?"useLayoutEffect":"useEffect"],fOi=t=>{const e=ee.useRef(t);return ee.useEffect(()=>{e.current=t}),e};function IOi(){}function $hn(t,e,n={}){const o=yOi(n.polyfill),i=fOi(e);return _Oi(()=>{let r=!1;const s=t&&"current"in t?t.current:t;if(!s)return IOi;function a(A,c){r||i.current(A,c)}return o.subscribe(s,a),()=>{r=!0,o.unsubscribe(s,a)}},[t,o,i]),o.observer}function COi(t){let e=!1,n=[];const o=new Map,i=new(t||window.ResizeObserver)((r,s)=>{n=n.concat(r);function a(){const A=new Set;for(let c=0;c<n.length;c++){if(A.has(n[c].target))continue;A.add(n[c].target);const l=o.get(n[c].target);l?.forEach(u=>u(n[c],s))}n=[],e=!1}e||window.requestAnimationFrame(a),e=!0});return{observer:i,subscribe(r,s){var a;i.observe(r);const A=(a=o.get(r))!==null&&a!==void 0?a:[];A.push(s),o.set(r,A)},unsubscribe(r,s){var a;const A=(a=o.get(r))!==null&&a!==void 0?a:[];if(A.length===1){i.unobserve(r),o.delete(r);return}const c=A.indexOf(s);c!==-1&&A.splice(c,1),o.set(r,A)}}}let M$e;const yOi=t=>M$e||(M$e=COi(t));var xOi=t=>{const e={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(const n of t.lines??[])for(const o of n.points??[])e.minX=Math.min(e.minX,o.x),e.minY=Math.min(e.minY,o.y),e.maxX=Math.max(e.maxX,o.x),e.maxY=Math.max(e.maxY,o.y);for(const n of t.rects??[]){const o=hmo(n);e.minX=Math.min(e.minX,o.minX),e.minY=Math.min(e.minY,o.minY),e.maxX=Math.max(e.maxX,o.maxX),e.maxY=Math.max(e.maxY,o.maxY)}for(const n of t.polygons??[])for(const o of n.points??[])e.minX=Math.min(e.minX,o.x),e.minY=Math.min(e.minY,o.y),e.maxX=Math.max(e.maxX,o.x),e.maxY=Math.max(e.maxY,o.y);for(const n of t.points??[])e.minX=Math.min(e.minX,n.x),e.minY=Math.min(e.minY,n.y),e.maxX=Math.max(e.maxX,n.x),e.maxY=Math.max(e.maxY,n.y);for(const n of t.circles??[])e.minX=Math.min(e.minX,n.center.x-n.radius),e.minY=Math.min(e.minY,n.center.y-n.radius),e.maxX=Math.max(e.maxX,n.center.x+n.radius),e.maxY=Math.max(e.maxY,n.center.y+n.radius);for(const n of t.arrows??[]){const o=lbt(n);e.minX=Math.min(e.minX,o.minX),e.minY=Math.min(e.minY,o.minY),e.maxX=Math.max(e.maxX,o.maxX),e.maxY=Math.max(e.maxY,o.maxY)}for(const n of t.texts??[])e.minX=Math.min(e.minX,n.x),e.minY=Math.min(e.minY,n.y),e.maxX=Math.max(e.maxX,n.x),e.maxY=Math.max(e.maxY,n.y);return e};function qhn(t){const e=l=>!l||l.length===0?0:l.reduce((u,g)=>{const h=Number.isNaN(g.step)?0:g.step||0;return Math.max(u,h)},0),n=e(t.points),o=e(t.lines),i=e(t.infiniteLines),r=e(t.rects),s=e(t.polygons),a=e(t.circles),A=e(t.texts),c=e(t.arrows);return Math.max(n,o,i,r,s,a,A,c)}var EOi=t=>t.slice().sort((e,n)=>n.width*n.height-e.width*e.height);function BOi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t,a=n.x-e.x,A=n.y-e.y,c=Math.sqrt(a*a+A*A),l=i.x-o.x,u=i.y-o.y,g=Math.sqrt(l*l+u*u),h=Math.atan2(u,l)*(180/Math.PI),d=Math.abs(h)%90,m=Math.min(d,90-d)>15,_=(o.x+i.x)/2,f=(o.y+i.y)/2,I=15,C=h+90;let y=Math.cos(C*Math.PI/180)*I,x=Math.sin(C*Math.PI/180)*I;const E=l>0&&u<0,B=l>0&&u>0,S=l<0&&u>0;r!==s&&!E&&(y=-y,x=-x),E&&(y+=Math.cos(C*Math.PI/180)*-45,x+=Math.sin(C*Math.PI/180)*-45),B&&(y+=Math.cos(C*Math.PI/180)+-20,x+=Math.sin(C*Math.PI/180)+-10),S&&(y+=Math.cos(C*Math.PI/180)*10,x+=Math.sin(C*Math.PI/180)*10);const Q=_+y,w=f+x;return{distance:c,screenDistance:g,x:Q,y:w,show:c>.01&&g>30&&m}}function bOi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t;return ee.useMemo(()=>BOi({dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}),[e,n,o,i,r,s])}var SOi=({children:t,transform:e})=>{e||(e=QQ());const[n,o]=ee.useState(!1),[i,r]=ee.useState(!1),[s,a]=ee.useState({x:0,y:0}),[A,c]=ee.useState({x:0,y:0}),l=ee.useRef({x:0,y:0}),u=ee.useRef(null),g=ee.useRef(!1),d=u.current?.getBoundingClientRect(),p=ee.useCallback(()=>{g.current=!0,u.current?.focus()},[]),m=ee.useCallback(()=>{g.current=!1},[]);ee.useEffect(()=>{const y=x=>{const E=u.current?.contains(document.activeElement)||document.activeElement===u.current;!g.current&&!E||(x.key==="d"&&(a({x:l.current.x,y:l.current.y}),c({x:l.current.x,y:l.current.y}),o(B=>!B),r(!0)),x.key==="Escape"&&(o(!1),r(!1)))};return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y)}},[]);const _=Bn(e,s),f=Bn(e,A),I={left:Math.min(_.x,f.x),right:Math.max(_.x,f.x),top:Math.min(_.y,f.y),bottom:Math.max(_.y,f.y),flipX:_.x>f.x,flipY:_.y>f.y,width:0,height:0};I.width=I.right-I.left,I.height=I.bottom-I.top;const C=bOi({dimensionStart:s,dimensionEnd:A,screenDimensionStart:_,screenDimensionEnd:f,flipX:I.flipX,flipY:I.flipY});return K.jsxs("div",{ref:u,tabIndex:0,style:{position:"relative"},onMouseMove:y=>{const x=y.currentTarget.getBoundingClientRect(),E=y.clientX-x.left,B=y.clientY-x.top,S=Bn(bV(e),{x:E,y:B});l.current.x=S.x,l.current.y=S.y,i&&c({x:S.x,y:S.y})},onMouseDown:()=>{i?r(!1):n&&o(!1)},onMouseEnter:p,onMouseLeave:m,children:[t,n&&K.jsxs(K.Fragment,{children:[C.show&&K.jsx("div",{style:{position:"absolute",left:C.x,top:C.y,color:"red",mixBlendMode:"difference",pointerEvents:"none",fontSize:12,fontFamily:"sans-serif",whiteSpace:"nowrap",zIndex:30},children:C.distance.toFixed(2)}),K.jsx("div",{style:{position:"absolute",left:I.left,width:I.width,textAlign:"center",top:_.y+2,color:"red",mixBlendMode:"difference",pointerEvents:"none",marginTop:I.flipY?0:-20,fontSize:12,fontFamily:"sans-serif",zIndex:30},children:Math.abs(s.x-A.x).toFixed(2)}),K.jsx("div",{style:{position:"absolute",left:f.x,height:I.height,display:"flex",flexDirection:"column",justifyContent:"center",top:I.top,color:"red",pointerEvents:"none",mixBlendMode:"difference",fontSize:12,fontFamily:"sans-serif",zIndex:30},children:K.jsx("div",{style:{marginLeft:I.flipX?"-100%":4,paddingRight:4},children:Math.abs(s.y-A.y).toFixed(2)})}),K.jsxs("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:30},width:d?.width||"100%",height:d?.height||"100%",children:[K.jsx("defs",{children:K.jsx("marker",{id:"head",orient:"auto",markerWidth:"3",markerHeight:"4",refX:"2",refY:"2",children:K.jsx("path",{d:"M0,0 V4 L2,2 Z",fill:"red"})})}),K.jsx("line",{x1:_.x,y1:_.y,x2:f.x,y2:f.y,markerEnd:"url(#head)",strokeWidth:1.5,fill:"none",stroke:"red"}),K.jsx("line",{x1:_.x,y1:_.y,x2:f.x,y2:_.y,strokeWidth:1.5,fill:"none",strokeDasharray:"2,2",stroke:"red"}),K.jsx("line",{x1:f.x,y1:_.y,x2:f.x,y2:f.y,strokeWidth:1.5,fill:"none",strokeDasharray:"2,2",stroke:"red"})]}),K.jsxs("div",{style:{right:0,bottom:0,position:"absolute",color:"red",fontFamily:"sans-serif",fontSize:12,margin:4},children:["(",s.x.toFixed(2),",",s.y.toFixed(2),")",K.jsx("br",{}),"(",A.x.toFixed(2),",",A.y.toFixed(2),")",K.jsx("br",{}),"dist:"," ",Math.sqrt((A.x-s.x)**2+(A.y-s.y)**2).toFixed(2)]})]})]})},Xhn=({label:t,onClose:e})=>K.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Object label",onClick:e,style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",padding:16,background:"rgba(0, 0, 0, 0.28)"},children:K.jsxs("div",{onClick:n=>{n.stopPropagation()},style:{width:"min(420px, 100%)",background:"#fff",borderRadius:10,boxShadow:"0 12px 32px rgba(0, 0, 0, 0.2)",padding:16},children:[K.jsx("div",{style:{fontWeight:600,marginBottom:8},children:"Object label"}),K.jsx("div",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:16},children:t}),K.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:K.jsx("button",{type:"button",onClick:e,children:"Close"})})]})}),Zhn=(t,e,n,o,i,r)=>{const s=t-n,a=e-o,A=i-n,c=r-o,l=s*A+a*c,u=A*A+c*c;let g=-1;u!==0&&(g=l/u);let h=0,d=0;g<0?(h=n,d=o):g>1?(h=i,d=r):(h=n+g*A,d=o+g*c);const p=t-h,m=e-d;return Math.sqrt(p*p+m*m)},r9=(t,e)=>{try{return qpo(t,e)}catch{return e}},QOi=({arrow:t,index:e,interactiveState:n})=>{const{realToScreen:o,onObjectClicked:i,setHoverTooltip:r}=n,[s,a]=ee.useState(!1),A=ee.useMemo(()=>jW(t),[t]),c=ee.useMemo(()=>({shaftStart:Bn(o,A.shaftStart),shaftEnd:Bn(o,A.shaftEnd),heads:A.heads.map(y=>({tip:Bn(o,y.tip),base:Bn(o,y.base),leftWing:Bn(o,y.leftWing),rightWing:Bn(o,y.rightWing)}))}),[A,o]),l=Math.abs(o.a),u=12,g=A.shaftWidth*(l||1),h=u*.6,d=ee.useMemo(()=>Vce(c.shaftStart,c.shaftEnd,{fontSize:u,strokeWidth:g,normalPadding:6,alongOffset:t.label?h:0}),[c,u,g,t.label,h]),p=ee.useMemo(()=>Vce(c.shaftStart,c.shaftEnd,{fontSize:u,strokeWidth:g,normalPadding:12,alongOffset:t.inlineLabel?-h:0}),[c,u,g,t.inlineLabel,h]),m=t.color||rh[e%rh.length]||"black",_=s?r9(.2,m):m,f=[t.label,t.inlineLabel].filter(Boolean).join(`
`),I=t.label?p:d;ee.useEffect(()=>{if(!(!s||!f))return r?.({text:f,x:I.x,y:I.y}),()=>{r?.(null)}},[s,r,I.x,I.y,f]);const C=y=>{const x=y.currentTarget.getBoundingClientRect(),E=y.clientX-x.left,B=y.clientY-x.top,S=10,w=[{from:c.shaftStart,to:c.shaftEnd},...c.heads.flatMap(M=>[{from:M.base,to:M.leftWing},{from:M.leftWing,to:M.tip},{from:M.tip,to:M.rightWing},{from:M.rightWing,to:M.base}])].some(({from:M,to:k})=>Zhn(E,B,M.x,M.y,k.x,k.y)<S);a(w)};return K.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none"},children:K.jsxs("svg",{style:{width:"100%",height:"100%",pointerEvents:"auto"},onMouseMove:C,onMouseLeave:()=>{a(!1),r?.(null)},onClick:s?y=>{y.stopPropagation(),i?.({type:"arrow",index:e,object:t})}:void 0,children:[K.jsx("line",{x1:c.shaftStart.x,y1:c.shaftStart.y,x2:c.shaftEnd.x,y2:c.shaftEnd.y,stroke:_,strokeWidth:g,strokeLinecap:"round",pointerEvents:"stroke"}),c.heads.map((y,x)=>K.jsx("polygon",{points:`${y.tip.x},${y.tip.y} ${y.leftWing.x},${y.leftWing.y} ${y.rightWing.x},${y.rightWing.y}`,fill:_},x))]})})},vOi=({circle:t,interactiveState:e,index:n})=>{const o=rh[n%rh.length];let{center:i,radius:r,fill:s,stroke:a,layer:A,step:c,label:l}=t;const{activeLayers:u,activeStep:g,realToScreen:h,onObjectClicked:d,setHoverTooltip:p}=e,[m,_]=ee.useState(!1),f=Bn(h,i),I=r*h.a;let C=s||o;return m&&(C=r9(.2,C),a=a&&r9(.2,a)),ee.useEffect(()=>{if(!(!m||!l))return p?.({text:l,x:f.x,y:f.y-I}),()=>{p?.(null)}},[m,l,f.x,f.y,I,p]),K.jsx("div",{style:{position:"absolute",left:f.x-I,top:f.y-I,width:I*2,height:I*2,borderRadius:"50%",backgroundColor:C,border:a?`2px solid ${a}`:"none",cursor:"pointer",transition:"border-color 0.2s"},onMouseEnter:()=>_(!0),onMouseLeave:()=>{_(!1),p?.(null)},onClick:()=>d?.({type:"circle",index:n,object:t})})},wOi=({x:t,y:e,onSaveCamera:n,onLoadCamera:o,onClearCamera:i,onAddMark:r,onClearMarks:s,onClose:a})=>{const A=ee.useRef(null);ee.useEffect(()=>{const h=d=>{A.current&&!A.current.contains(d.target)&&a()};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[a]);const c={position:"absolute",left:t,top:e,backgroundColor:"white",border:"1px solid #ccc",borderRadius:3,boxShadow:"0 2px 6px rgba(0,0,0,0.1)",padding:0,zIndex:1e3,minWidth:160,fontSize:"12px"},l={padding:"4px 8px",cursor:"pointer",userSelect:"none",lineHeight:"1.5"},u=h=>{h.currentTarget.style.backgroundColor="#f5f5f5"},g=h=>{h.currentTarget.style.backgroundColor=""};return K.jsxs("div",{ref:A,style:c,children:[K.jsx("div",{style:l,onClick:()=>{n(),a()},onMouseEnter:u,onMouseLeave:g,children:"Save Camera Position"}),K.jsx("div",{style:l,onClick:()=>{o(),a()},onMouseEnter:u,onMouseLeave:g,children:"Load Camera Position"}),K.jsx("div",{style:l,onClick:()=>{i(),a()},onMouseEnter:u,onMouseLeave:g,children:"Clear Saved Camera Position"}),K.jsx("div",{style:l,onClick:()=>{r(),a()},onMouseEnter:u,onMouseLeave:g,children:"Add Mark"}),K.jsx("div",{style:l,onClick:()=>{s(),a()},onMouseEnter:u,onMouseLeave:g,children:"Clear Marks"})]})},POi=({infiniteLine:t,index:e,interactiveState:n,size:o})=>{const{realToScreen:i,onObjectClicked:r,setHoverTooltip:s}=n,[a,A]=ee.useState(!1),c=obt(i,o.width,o.height),l=nbt(t,c);if(!l)return null;const[u,g]=l,h=Bn(i,u),d=Bn(i,g),p=t.strokeColor??rh[e%rh.length],m=(t.strokeWidth??1/Math.abs(i.a))*Math.abs(i.a),_=(h.x+d.x)/2,f=(h.y+d.y)/2;return K.jsx("div",{style:{position:"absolute",top:0,left:0,width:o.width,height:o.height,pointerEvents:"none"},children:K.jsxs("svg",{style:{width:o.width,height:o.height,pointerEvents:"none"},children:[K.jsx("line",{x1:h.x,y1:h.y,x2:d.x,y2:d.y,stroke:"transparent",strokeWidth:m+10,pointerEvents:"stroke",onMouseEnter:()=>{A(!0),t.label&&s?.({text:t.label,x:_,y:f})},onMouseLeave:()=>{A(!1),s?.(null)},onClick:()=>r?.({type:"infinite-line",index:e,object:t})}),K.jsx("line",{x1:h.x,y1:h.y,x2:d.x,y2:d.y,stroke:a?r9(.2,p):p,strokeWidth:m,strokeDasharray:t.strokeDash?typeof t.strokeDash=="string"?t.strokeDash:t.strokeDash.map(I=>I*Math.abs(i.a)).join(","):void 0,pointerEvents:"none"})]})})},MOi=({line:t,index:e,interactiveState:n,size:o,mousePosition:i})=>{const{activeLayers:r,activeStep:s,realToScreen:a,onObjectClicked:A,setHoverTooltip:c}=n,{points:l,layer:u,step:g,strokeColor:h,strokeWidth:d=1/a.a,strokeDash:p}=t,m=l.map(B=>Bn(a,B)),_=d*Math.abs(a.a),C=Math.max(_/2+3,6),y=C*2,x=ee.useMemo(()=>{if(!i)return!1;for(let B=0;B<m.length-1;B++)if(Zhn(i.x,i.y,m[B].x,m[B].y,m[B+1].x,m[B+1].y)<=C)return!0;return!1},[C,i,m]),E=h??rh[e%rh.length];return ee.useEffect(()=>{if(!(!x||!t.label||!i))return c?.({text:t.label,x:i.x,y:i.y}),()=>{c?.(null)}},[x,t.label,i?.x,i?.y,c]),K.jsx("div",{style:{position:"absolute",top:0,left:0,width:o.width,height:o.height,pointerEvents:"none"},children:K.jsxs("svg",{style:{width:o.width,height:o.height,overflow:"visible",pointerEvents:"none"},children:[K.jsx("polyline",{points:m.map(B=>`${B.x},${B.y}`).join(" "),stroke:"transparent",fill:"none",strokeWidth:y,strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"stroke",onClick:x?()=>A?.({type:"line",index:e,object:t}):void 0}),K.jsx("polyline",{points:m.map(B=>`${B.x},${B.y}`).join(" "),stroke:x?r9(.2,E):E,fill:"none",strokeWidth:_,strokeDasharray:p?typeof p=="string"?p:`${p[0]*Math.abs(a.a)}, ${p[1]*Math.abs(a.a)}`:void 0,strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"none"})]})})},DOi=({marker:t,transform:e})=>{const[n,o]=Bn(e,[t.x,t.y]);return K.jsx("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",zIndex:900},children:K.jsxs("g",{transform:`translate(${n}, ${o})`,children:[K.jsx("circle",{r:7,fill:"rgba(255, 0, 0, 0.5)",stroke:"rgba(255, 0, 0, 0.8)",strokeWidth:2}),K.jsx("circle",{r:2,fill:"rgba(255, 0, 0, 0.9)"})]})})},NOi=({point:t,interactiveState:e,index:n})=>{const{color:o,label:i,layer:r,step:s}=t,{activeLayers:a,activeStep:A,realToScreen:c,onObjectClicked:l,setHoverTooltip:u}=e,[g,h]=ee.useState(!1),d=Bn(c,t),p=10,m=`${i?`${i}
`:""}x: ${t.x.toFixed(2)}, y: ${t.y.toFixed(2)}`;return ee.useEffect(()=>{if(g)return u?.({text:m,x:d.x,y:d.y-p/2}),()=>{u?.(null)}},[g,d.x,d.y,u,m]),K.jsx("div",{style:{position:"absolute",left:d.x-p/2,top:d.y-p/2,width:p,height:p,borderRadius:"50%",border:`2px solid ${g?r9(.2,o??rh[n%rh.length]):o??rh[n%rh.length]}`,cursor:"pointer",transition:"border-color 0.2s"},onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),u?.(null)},onClick:()=>l?.({type:"point",index:n,object:t})})},ROi=({polygon:t,interactiveState:e,index:n})=>{const{points:o,fill:i,stroke:r,strokeWidth:s}=t,{realToScreen:a,onObjectClicked:A,setHoverTooltip:c}=e,[l,u]=ee.useState(!1),g=!!(o&&o.length>0),h=g?o.map(U=>Bn(a,U)):[],d=h.map(U=>U.x),p=h.map(U=>U.y),m=g?Math.min(...d):0,_=g?Math.max(...d):0,f=g?Math.min(...p):0,I=g?Math.max(...p):0,C=4,y=m-C,x=f-C,E=Math.max(_-m,0)+C*2,B=Math.max(I-f,0)+C*2,S=h.map(U=>({x:U.x-y,y:U.y-x})),Q=rh[n%rh.length],M=i!==void 0||r!==void 0?i||"transparent":Q,k=r,R=l?r9(.2,M):M,F=k?l?r9(.2,k):k:void 0,O=s===void 0?void 0:s*a.a;return ee.useEffect(()=>{if(!(!g||!l||!t.label))return c?.({text:t.label,x:(m+_)/2,y:x}),()=>{c?.(null)}},[g,l,_,m,t.label,c,x]),g?K.jsx("div",{style:{position:"absolute",top:x,left:y,width:E,height:B,pointerEvents:"none"},children:K.jsx("svg",{width:E,height:B,style:{display:"block"},children:K.jsx("polygon",{points:S.map(U=>`${U.x},${U.y}`).join(" "),fill:R,stroke:F??"none",strokeWidth:O,pointerEvents:"all",onMouseEnter:()=>u(!0),onMouseLeave:()=>{u(!1),c?.(null)},onClick:()=>A?.({type:"polygon",index:n,object:t})})})}):null},TOi=({rect:t,interactiveState:e,index:n})=>{const o=rh[n%rh.length];let{fill:i,stroke:r}=t;const{activeLayers:s,activeStep:a,realToScreen:A,onObjectClicked:c,setHoverTooltip:l}=e,[u,g]=ee.useState(!1),h=VQe(t,A);let p=i!==void 0||r!==void 0?i||"transparent":o;return u&&(p=r9(.2,p),r=r9(.2,r)),ee.useEffect(()=>{if(!(!u||!t.label))return l?.({text:t.label,x:h.center.x,y:h.center.y-h.height/2}),()=>{l?.(null)}},[u,h.center.x,h.center.y,h.height,t.label,l]),K.jsx("div",{style:{position:"absolute",left:h.center.x,top:h.center.y,width:h.width,height:h.height,transform:"translate(-50%, -50%)",pointerEvents:"none"},children:K.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:p,border:r?`2px solid ${u?r9(.2,r):r}`:"none",boxSizing:"border-box",cursor:"pointer",transition:"border-color 0.2s",transformOrigin:"center",transform:`rotate(${h.angleDegrees}deg)`,pointerEvents:"auto"},onMouseEnter:()=>g(!0),onMouseLeave:()=>{g(!1),l?.(null)},onClick:()=>c?.({type:"rect",index:n,object:t})})})},kOi=({textObj:t,interactiveState:e,index:n})=>{const{realToScreen:o,onObjectClicked:i}=e,{x:r,y:s,text:a,color:A,fontSize:c,anchorSide:l}=t,u=Bn(o,{x:r,y:s}),h={top_left:"translate(0%, 0%)",top_center:"translate(-50%, 0%)",top_right:"translate(-100%, 0%)",center_left:"translate(0%, -50%)",center:"translate(-50%, -50%)",center_right:"translate(-100%, -50%)",bottom_left:"translate(0%, -100%)",bottom_center:"translate(-50%, -100%)",bottom_right:"translate(-100%, -100%)"}[l??"center"];return K.jsx("div",{style:{position:"absolute",left:u.x,top:u.y,transform:h,color:A||"black",fontSize:c??12,whiteSpace:"pre",cursor:"default"},onClick:()=>i?.({type:"text",index:n,object:t}),children:a})},epn=({text:t})=>K.jsx("div",{style:{background:"white",border:"1px solid #ccc",boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",borderRadius:"4px",padding:"4px 8px",fontSize:"12px",minWidth:"120px",maxWidth:"300px",whiteSpace:"pre-wrap",overflowWrap:"anywhere",zIndex:100},children:t}),y4=5,FOi=(t,e)=>ee.useMemo(()=>(n,o)=>{const i=Bn(t,n),r=Bn(t,o),s=-y4,a=e.width+y4,A=-y4,c=e.height+y4;if(i.x>=s&&i.x<=a&&i.y>=A&&i.y<=c||r.x>=s&&r.x<=a&&r.y>=A&&r.y<=c)return!0;const l=(u,g,h,d)=>{const p=(g.x-u.x)*(d.y-h.y)-(g.y-u.y)*(d.x-h.x);if(p===0)return!1;const m=((d.y-h.y)*(d.x-u.x)+(h.x-d.x)*(d.y-u.y))/p,_=((u.y-g.y)*(d.x-u.x)+(g.x-u.x)*(d.y-u.y))/p;return m>=0&&m<=1&&_>=0&&_<=1};return l(i,r,{x:s,y:A},{x:a,y:A})||l(i,r,{x:a,y:A},{x:a,y:c})||l(i,r,{x:s,y:c},{x:a,y:c})||l(i,r,{x:s,y:A},{x:s,y:c})},[t,e]),LOi=(t,e)=>ee.useMemo(()=>n=>{const o=Bn(t,n);return o.x>=-y4&&o.x<=e.width+y4&&o.y>=-y4&&o.y<=e.height+y4},[t,e]),HOi=({isPointOnScreen:t,doesLineIntersectViewport:e,filterLayerAndStep:n})=>ee.useMemo(()=>o=>{if(!n(o))return!1;if(o.points.some(i=>t(i)))return!0;for(let i=0;i<o.points.length-1;i++)if(e(o.points[i],o.points[i+1]))return!0;return!!(o.points.length>2&&o.closed&&e(o.points[o.points.length-1],o.points[0]))},[t,e,n]),OOi=({isPointOnScreen:t,filterLayerAndStep:e})=>ee.useMemo(()=>n=>e(n)?t(n):!1,[t,e]),GOi=({realToScreen:t,isPointOnScreen:e,doesLineIntersectViewport:n,filterLayerAndStep:o})=>ee.useMemo(()=>i=>{if(!o(i))return!1;const{center:r}=i,[s,a,A,c]=abt(i,t);return e(r)||e(s)||e(a)||e(A)||e(c)?!0:n(s,a)||n(a,A)||n(A,c)||n(c,s)},[t,e,n,o]),YOi=({isPointOnScreen:t,filterLayerAndStep:e,realToScreen:n,size:o})=>ee.useMemo(()=>i=>{if(!e(i))return!1;const{center:r,radius:s}=i;if(t(r)||t({x:r.x+s,y:r.y})||t({x:r.x-s,y:r.y})||t({x:r.x,y:r.y+s})||t({x:r.x,y:r.y-s}))return!0;const a=Bn(n,r),A=Math.abs(n.a),c=s*A,l=-y4,u=o.width+y4,g=-y4,h=o.height+y4;if(a.x>=l&&a.x<=u&&(Math.abs(a.y-g)<=c||Math.abs(a.y-h)<=c)||a.y>=g&&a.y<=h&&(Math.abs(a.x-l)<=c||Math.abs(a.x-u)<=c))return!0;const d=(m,_)=>{const f=a.x-m,I=a.y-_;return f*f+I*I},p=c*c;return d(l,g)<=p||d(u,g)<=p||d(l,h)<=p||d(u,h)<=p},[t,e,n,o]),UOi=({isPointOnScreen:t,filterLayerAndStep:e})=>ee.useMemo(()=>n=>e(n)?t({x:n.x,y:n.y}):!1,[t,e]),KOi=({isPointOnScreen:t,doesLineIntersectViewport:e})=>ee.useMemo(()=>n=>{const o=jW(n),{shaftStart:i,shaftEnd:r,heads:s}=o;return t(i)||t(r)||s.some(A=>t(A.tip)||t(A.leftWing)||t(A.rightWing)||t(A.base))?!0:[[i,r],...s.flatMap(A=>[[A.base,A.leftWing],[A.leftWing,A.tip],[A.tip,A.rightWing],[A.rightWing,A.base]])].some(([A,c])=>e(A,c))},[t,e]),VOi=({isPointOnScreen:t,doesLineIntersectViewport:e,filterLayerAndStep:n})=>ee.useMemo(()=>o=>{if(!n(o)||!o.points||o.points.length===0)return!1;if(o.points.some(i=>t(i)))return!0;for(let i=0;i<o.points.length;i++){const r=o.points[i],s=o.points[(i+1)%o.points.length];if(e(r,s))return!0}return!1},[t,e,n]),zOi=1e3,JOi=({graphics:t,onObjectClicked:e,objectLimit:n,height:o=600,stepMetadata:i,alwaysShowToolbar:r=!1})=>{const[s,a]=ee.useState(null),[A,c]=ee.useState(null),[l,u]=ee.useState(!0),[g,h]=ee.useState({width:600,height:o}),[d,p]=ee.useState(null),[m,_]=ee.useState(!1),[f,I]=ee.useState(null),[C,y]=ee.useState([]),[x,E]=ee.useState(null),[B,S]=ee.useState(null),Q=Array.from(new Set([...t.lines?.map(Ct=>Ct.layer).filter(Boolean)??[],...t.infiniteLines?.map(Ct=>Ct.layer).filter(Boolean)??[],...t.rects?.map(Ct=>Ct.layer).filter(Boolean)??[],...t.polygons?.map(Ct=>Ct.layer).filter(Boolean)??[],...t.points?.map(Ct=>Ct.layer).filter(Boolean)??[],...t.texts?.map(Ct=>Ct.layer).filter(Boolean)??[],...t.circles?.map(Ct=>Ct.layer).filter(Boolean)??[]])),w=qhn(t),M=ee.useMemo(()=>{const Ct=xOi(t),Dt=Ct.maxX-Ct.minX,kt=Ct.maxY-Ct.minY;return{minX:Ct.minX-Dt/10,minY:Ct.minY-kt/10,maxX:Ct.maxX+Dt/10,maxY:Ct.maxY+kt/10}},[t]),k=ee.useCallback(()=>{const Ct=window.location.pathname,Dt=window.location.search;return`saved-camera-position-${Ct}${Dt}`},[]),R=ee.useCallback(()=>{const Ct=Math.max(M.maxX-M.minX,1),Dt=Math.max(M.maxY-M.minY,1),kt=Math.min(g.width/Ct,g.height/Dt);return Ad(pA(g.width/2,g.height/2),dC(kt,-kt),pA(-(M.maxX+M.minX)/2,-(M.maxY+M.minY)/2))},[g,M]),F=ee.useCallback(()=>{try{const Ct=localStorage.getItem(k());if(Ct)return JSON.parse(Ct)}catch(Ct){console.error("Error loading saved data:",Ct)}return null},[k]),O=ee.useCallback(()=>F()?.transform||null,[F]),{transform:U,ref:Y,setTransform:W}=Xun({initialTransform:R()});$hn(Y,Ct=>{h({width:Ct.contentRect.width,height:Ct.contentRect.height})}),ee.useEffect(()=>{const Ct=F();Ct?.markers&&y(Ct.markers)},[F]);const te=ee.useCallback(Ct=>{Ct.preventDefault();const Dt=Ct.clientX,kt=Ct.clientY,it=Ct.currentTarget.getBoundingClientRect(),Yt=it.left,pn=it.top,be=window.innerWidth,et=window.innerHeight,It=160,Bt=100;let mt=Dt-Yt,st=kt-pn;Dt>be/2&&(mt=mt-It),kt>et/2&&(st=st-Bt),p({x:mt,y:st,clientX:Dt,clientY:kt})},[]),j=ee.useCallback((Ct,Dt)=>{try{const kt={transform:Ct,markers:Dt};localStorage.setItem(k(),JSON.stringify(kt))}catch(kt){console.error("Error saving data:",kt)}},[k]),J=ee.useCallback(()=>{j(U,C)},[j,U,C]),oe=ee.useCallback(()=>{try{const Ct=O();Ct&&W(Ct)}catch(Ct){console.error("Error loading camera position:",Ct)}},[O,W]),ie=ee.useCallback(()=>{try{const Ct=R();j(Ct,C),W(Ct)}catch(Ct){console.error("Error clearing camera position:",Ct)}},[j,R,W,C]),ne=ee.useCallback(()=>{if(d)try{const Ct={x:d.clientX,y:d.clientY},Dt=Y.current?.getBoundingClientRect();if(Dt){const kt=Ct.x-Dt.left,it=Ct.y-Dt.top,Yt=bV(U),[pn,be]=Bn(Yt,[kt,it]),et={x:pn,y:be},It=[...C,et];y(It);const Bt=F();Bt?.transform&&j(Bt.transform,It)}}catch(Ct){console.error("Error adding marker:",Ct)}},[d,Y,U,C,j]),le=ee.useCallback(()=>{y([]);const Ct=F();Ct?.transform&&j(Ct.transform,[])},[F,j]),ge=ee.useCallback(Ct=>{switch(Ct.type){case"arrow":return[Ct.object.label,Ct.object.inlineLabel].filter(Boolean).join(`
`);case"text":return Ct.object.text??"";default:return Ct.object.label??""}},[]),_e=ee.useCallback(Ct=>{if(e?.(Ct),!m)return;const Dt=ge(Ct);I(Dt||null)},[m,ge,e]);ee.useEffect(()=>{if(!f)return;const Ct=Dt=>{Dt.key==="Escape"&&I(null)};return window.addEventListener("keydown",Ct),()=>{window.removeEventListener("keydown",Ct)}},[f]);const ue={activeLayers:s,activeStep:l?w:A,realToScreen:U,onObjectClicked:_e,setHoverTooltip:S},fe=w>0?i?.[l?w:A??-1]?.title:void 0,pe=LOi(U,g),ye=FOi(U,g),Me=Ct=>{if(s&&Ct.layer&&!s.includes(Ct.layer))return!1;const Dt=l?w:A;return!(Dt!==null&&Ct.step!==void 0&&Ct.step!==Dt)},ve=HOi({isPointOnScreen:pe,doesLineIntersectViewport:ye,filterLayerAndStep:Me}),he=OOi({isPointOnScreen:pe,filterLayerAndStep:Me}),Qe=GOi({realToScreen:U,isPointOnScreen:pe,doesLineIntersectViewport:ye,filterLayerAndStep:Me}),Pe=YOi({isPointOnScreen:pe,filterLayerAndStep:Me,realToScreen:U,size:g}),we=UOi({isPointOnScreen:pe,filterLayerAndStep:Me}),Te=KOi({isPointOnScreen:pe,doesLineIntersectViewport:ye}),Re=VOi({isPointOnScreen:pe,doesLineIntersectViewport:ye,filterLayerAndStep:Me}),Ee=(Ct,Dt)=>{if(!Ct)return[];const kt=Ct.map((it,Yt)=>({...it,originalIndex:Yt})).filter(Dt);return n?kt.slice(-n):kt},ke=ee.useMemo(()=>Ee(t.lines,ve).sort((Ct,Dt)=>(Ct.zIndex??0)-(Dt.zIndex??0)||Ct.originalIndex-Dt.originalIndex),[t.lines,ve,n]),Ce=ee.useMemo(()=>Ee(t.infiniteLines,Me),[t.infiniteLines,Me,n]),Le=ee.useMemo(()=>EOi(Ee(t.rects,Qe)),[t.rects,Qe,n]),Ye=ee.useMemo(()=>Ee(t.polygons,Re),[t.polygons,Re,n]),tt=ee.useMemo(()=>Ee(t.points,he),[t.points,he,n]),At=ee.useMemo(()=>Ee(t.circles,Pe),[t.circles,Pe,n]),at=ee.useMemo(()=>Ee(t.texts,we),[t.texts,we,n]),nt=ee.useMemo(()=>Ee(t.arrows,Te),[t.arrows,Te,n]),gt=Ce.length+ke.length+Le.length+Ye.length+tt.length+At.length+at.length+nt.length,bt=n&&gt>n;return K.jsxs("div",{children:[K.jsxs("div",{style:{margin:8,display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[Q.length>1&&K.jsxs("select",{value:s?s[0]:"",onChange:Ct=>{const Dt=Ct.target.value;a(Dt===""?null:[Dt])},style:{marginRight:8},children:[K.jsx("option",{value:"",children:"All Layers"}),Q.map(Ct=>K.jsx("option",{value:Ct,children:Ct},Ct))]}),w>0&&K.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8},children:["Step:",K.jsx("input",{type:"number",min:0,max:w,value:A??0,onChange:Ct=>{const Dt=parseInt(Ct.target.value);u(!1),c(Number.isNaN(Dt)?null:Dt)},disabled:A===null}),K.jsxs("label",{children:[K.jsx("input",{type:"checkbox",style:{marginRight:4},checked:A!==null,onChange:Ct=>{u(!1),c(Ct.target.checked?0:null)}}),"Filter by step"]}),K.jsxs("label",{children:[K.jsx("input",{type:"checkbox",style:{marginRight:4},checked:l,onChange:Ct=>{u(Ct.target.checked),c(null)}}),"Show last step"]}),bt&&K.jsxs("span",{style:{color:"red",fontSize:"12px"},children:["Display limited to ",n," objects. Received:"," ",gt,"."]})]}),K.jsxs("label",{children:[K.jsx("input",{type:"checkbox",style:{marginRight:4},checked:m,onChange:Ct=>{const Dt=Ct.target.checked;_(Dt),Dt||I(null)}}),"Enable Object Interation"]}),w>0&&fe&&K.jsx("div",{style:{marginLeft:"auto",textAlign:"right"},children:fe})]}),K.jsxs("div",{ref:Y,style:{position:"relative",height:o,overflow:"hidden"},onMouseMove:Ct=>{const Dt=Y.current?.getBoundingClientRect();Dt&&E({x:Ct.clientX-Dt.left,y:Ct.clientY-Dt.top})},onMouseLeave:()=>E(null),onContextMenu:te,children:[K.jsxs(SOi,{transform:U,children:[nt.map(Ct=>K.jsx(QOi,{arrow:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),Ce.map(Ct=>K.jsx(POi,{infiniteLine:Ct,index:Ct.originalIndex,interactiveState:ue,size:g},Ct.originalIndex)),ke.map(Ct=>K.jsx(MOi,{line:Ct,index:Ct.originalIndex,interactiveState:ue,size:g,mousePosition:x},Ct.originalIndex)),Le.map(Ct=>K.jsx(TOi,{rect:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),Ye.map(Ct=>K.jsx(ROi,{polygon:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),At.map(Ct=>K.jsx(vOi,{circle:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),at.map(Ct=>K.jsx(kOi,{textObj:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),tt.map(Ct=>K.jsx(NOi,{point:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),K.jsx(FT.SuperGrid,{stringifyCoord:(Ct,Dt)=>`${Ct.toFixed(2)}, ${Dt.toFixed(2)}`,width:g.width,height:g.height,transform:U})]}),C.map((Ct,Dt)=>K.jsx(DOi,{marker:Ct,index:Dt,transform:U},Dt)),B&&K.jsx("div",{style:{position:"absolute",left:B.x,top:B.y-8,transform:"translate(-50%, -100%)",pointerEvents:"none",zIndex:zOi},children:K.jsx(epn,{text:B.text})}),d&&K.jsx(wOi,{x:d.x,y:d.y,onSaveCamera:J,onLoadCamera:oe,onClearCamera:ie,onAddMark:ne,onClearMarks:le,onClose:()=>p(null)}),f&&K.jsx(Xhn,{label:f,onClose:()=>{I(null)}})]})]})};function WOi(t,{showLastStep:e,activeStep:n,maxStep:o}){const i=e?o:n;return i===null?t:{...t,points:t.points?.filter(s=>s.step===void 0||s.step===i),lines:t.lines?.filter(s=>s.step===void 0||s.step===i),infiniteLines:t.infiniteLines?.filter(s=>s.step===void 0||s.step===i),rects:t.rects?.filter(s=>s.step===void 0||s.step===i),polygons:t.polygons?.filter(s=>s.step===void 0||s.step===i),circles:t.circles?.filter(s=>s.step===void 0||s.step===i),texts:t.texts?.filter(s=>s.step===void 0||s.step===i)}}function jOi(t){const e=V5(t),n=e.maxX-e.minX,o=e.maxY-e.minY;return{minX:e.minX-n/10,minY:e.minY-o/10,maxX:e.maxX+n/10,maxY:e.maxY+o/10}}function $Oi({graphics:t,showLabelsByDefault:e=!0,showGrid:n=!0,height:o=500,width:i="100%",stepMetadata:r,alwaysShowToolbar:s=!1}){const a=ee.useRef(null),A=ee.useRef(null),[c,l]=ee.useState({width:600,height:600}),[u,g]=ee.useState(null),[h,d]=ee.useState(!0),[p,m]=ee.useState(!1),[_,f]=ee.useState(null),[I,C]=ee.useState(null),[y,x]=ee.useState(null),E=qhn(t),B=s||E>0||e,S=E>0?r?.[h?E:u??-1]?.title:void 0,Q=WOi(t,{activeStep:u,showLastStep:h,maxStep:E}),w=jOi(t),{transform:M,ref:k}=Xun({initialTransform:Ad(pA(c.width/2,c.height/2),dC(Math.min(c.width/(w.maxX-w.minX),c.height/(w.maxY-w.minY)),-Math.min(c.width/(w.maxX-w.minX),c.height/(w.maxY-w.minY))),pA(-(w.maxX+w.minX)/2,-(w.maxY+w.minY)/2))});$hn(A,j=>{l({width:j.contentRect.width,height:j.contentRect.height})});const R=()=>{a.current&&(a.current.width=c.width,a.current.height=c.height,fmo(Q,a.current,{transform:M,disableLabels:!0,hideInlineLabels:!0}),n&&F(a.current,M))},F=(j,J)=>{const oe=j.getContext("2d");if(!oe)return;oe.save(),oe.beginPath();const ie={x:-1e3,y:0},ne={x:1e3,y:0},le=O(ie,J),ge=O(ne,J);oe.moveTo(le.x,le.y),oe.lineTo(ge.x,ge.y);const _e={x:0,y:-1e3},ue={x:0,y:1e3},fe=O(_e,J),pe=O(ue,J);oe.moveTo(fe.x,fe.y),oe.lineTo(pe.x,pe.y),oe.strokeStyle="#aaa",oe.lineWidth=1,oe.stroke(),oe.beginPath(),oe.setLineDash([2,2]);const ye=10;for(let Me=-100;Me<=100;Me+=ye){if(Me===0)continue;const ve=O({x:Me,y:-100},J),he=O({x:Me,y:100},J);oe.moveTo(ve.x,ve.y),oe.lineTo(he.x,he.y)}for(let Me=-100;Me<=100;Me+=ye){if(Me===0)continue;const ve=O({x:-100,y:Me},J),he=O({x:100,y:Me},J);oe.moveTo(ve.x,ve.y),oe.lineTo(he.x,he.y)}oe.strokeStyle="#ddd",oe.stroke(),oe.restore()},O=(j,J)=>({x:J.a*j.x+J.c*j.y+J.e,y:J.b*j.x+J.d*j.y+J.f}),U=j=>{if(!a.current)return{label:null,overlayPoint:null};const J=a.current,oe=J.getBoundingClientRect(),ie=oe.width===0?1:J.width/oe.width,ne=oe.height===0?1:J.height/oe.height,le={x:j.clientX-oe.left,y:j.clientY-oe.top};return{label:mOi(Q,M,{x:le.x*ie,y:le.y*ne},{hitSlop:8}),overlayPoint:le}},Y=j=>{const{label:J,overlayPoint:oe}=U(j);f(J),C(J?oe:null)},W=()=>{f(null),C(null)},te=j=>{if(!p)return;const{label:J}=U(j);x(J)};return ee.useEffect(()=>{R()},[M,c,Q,n]),ee.useEffect(()=>{if(!y)return;const j=J=>{J.key==="Escape"&&x(null)};return window.addEventListener("keydown",j),()=>{window.removeEventListener("keydown",j)}},[y]),K.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[B&&K.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[K.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:E>0&&K.jsxs(K.Fragment,{children:[K.jsxs("label",{children:[K.jsx("input",{type:"checkbox",style:{marginRight:4},checked:u!==null,onChange:j=>{g(j.target.checked?0:null)}}),"Filter by step"]}),K.jsx("input",{type:"number",min:0,max:E,value:u??0,onChange:j=>{const J=parseInt(j.target.value);d(!1),g(Number.isNaN(J)?0:Math.min(J,E))},disabled:u===null,style:{width:"60px"}}),K.jsxs("label",{children:[K.jsx("input",{type:"checkbox",style:{marginRight:4},checked:h,onChange:j=>{d(j.target.checked),g(null)}}),"Show last step"]})]})}),K.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:K.jsxs("label",{children:[K.jsx("input",{type:"checkbox",style:{marginRight:4},checked:p,onChange:j=>{const J=j.target.checked;m(J),J||x(null)}}),"Enable Object Interation"]})}),E>0&&S&&K.jsx("div",{style:{marginLeft:"auto",textAlign:"right"},children:S})]}),K.jsxs("div",{ref:j=>{A.current=j,k&&j&&(k.current=j)},style:{position:"relative",width:i,height:o,border:"1px solid #ccc",overflow:"hidden"},children:[K.jsx("canvas",{ref:a,onMouseMove:Y,onMouseLeave:W,onClick:te,style:{position:"absolute",top:0,left:0,width:i,height:o}}),_&&I&&K.jsx("div",{style:{position:"absolute",left:I.x,top:I.y-12,transform:"translate(-50%, -100%)",pointerEvents:"none"},children:K.jsx(epn,{text:_})}),y&&K.jsx(Xhn,{label:y,onClose:()=>{x(null)}})]})]})}var fee=t=>{if(t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(fee);const e={};for(const[n,o]of Object.entries(t))n.startsWith("_")||(e[n]=fee(o));return e},qOi=({solver:t,className:e=""})=>{const[n,o]=ee.useState(!1),i=ee.useRef(null);ee.useEffect(()=>{const A=c=>{i.current&&!i.current.contains(c.target)&&o(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]);const r=()=>{try{if(typeof t.getConstructorParams!="function"){alert(`getConstructorParams() is not implemented for ${t.getSolverName()}`);return}const A=fee(t.getConstructorParams()),c=new Blob([JSON.stringify(A,null,2)],{type:"application/json"}),l=URL.createObjectURL(c),u=document.createElement("a");u.href=l,u.download=`${t.getSolverName()}_params.json`,u.click(),URL.revokeObjectURL(l)}catch(A){alert(`Error downloading params for ${t.getSolverName()}: ${A instanceof Error?A.message:String(A)}`)}o(!1)},s=()=>{try{const A=fee(t.getConstructorParams()),c=t.getSolverName(),l=c==="SchematicTracePipelineSolver";let u;l?u=`import { PipelineDebugger } from "site/components/PipelineDebugger"
import type { InputProblem } from "lib/types/InputProblem"

const inputProblem: InputProblem = ${JSON.stringify(A,null,2)}

export default () => <PipelineDebugger inputProblem={inputProblem} />
`:u=`import { useMemo } from "react"
import { GenericSolverDebugger } from "../components/GenericSolverDebugger"
import { ${c} } from "lib/solvers/${c}/${c}"

export const inputProblem = ${JSON.stringify(A,null,2)}

export default () => {
  const solver = useMemo(() => {
    return new ${c}(inputProblem as any)
  }, [])
  return <GenericSolverDebugger solver={solver} />
}
`;const g=new Blob([u],{type:"text/plain"}),h=URL.createObjectURL(g),d=document.createElement("a");d.href=h,d.download=`${c}.page.tsx`,d.click(),URL.revokeObjectURL(h)}catch(A){alert(`Error generating page.tsx for ${t.getSolverName()}: ${A instanceof Error?A.message:String(A)}`)}o(!1)},a=()=>{try{const A=fee(t.getConstructorParams()),c=t.getSolverName(),l=`import { ${c} } from "lib/solvers/${c}/${c}"
import { test, expect } from "bun:test"

test("${c} should solve problem correctly", () => {
  const input = ${JSON.stringify(A,null,2)}
  
  const solver = new ${c}(input as any)
  solver.solve()

  expect(solver).toMatchSolverSnapshot(import.meta.path)
  
  // Add more specific assertions based on expected output
  // expect(solver.netLabelPlacementSolver!.netLabelPlacements).toMatchInlineSnapshot()
})
`,u=new Blob([l],{type:"text/plain"}),g=URL.createObjectURL(u),h=document.createElement("a");h.href=g,h.download=`${c}.test.ts`,h.click(),URL.revokeObjectURL(g)}catch(A){alert(`Error generating test.ts for ${t.getSolverName()}: ${A instanceof Error?A.message:String(A)}`)}o(!1)};return K.jsxs("div",{className:`relative ${e}`,ref:i,children:[K.jsx("button",{className:"px-2 py-1 rounded text-xs cursor-pointer",onClick:()=>o(!n),title:`Download options for ${t.getSolverName()}`,children:t.getSolverName()}),n&&K.jsxs("div",{className:"absolute top-full left-0 mt-1 bg-white border border-gray-300 rounded shadow-lg z-10 min-w-[150px]",children:[K.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:r,children:"Download JSON"}),K.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:s,children:"Download page.tsx"}),K.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs",onClick:a,children:"Download test.ts"})]})]})},tpn=t=>t.activeSubSolver?[t,...tpn(t.activeSubSolver)]:[t],XOi=({solver:t})=>{const e=tpn(t);return K.jsx("div",{className:"flex gap-1 items-center text-sm pt-1",children:e.map((n,o)=>K.jsxs("div",{className:"flex items-center",children:[o>0&&K.jsx("span",{className:"text-gray-400 mx-1",children:"→"}),K.jsx(qOi,{solver:n})]},n.getSolverName()))})},ZOi=({solver:t,triggerRender:e,animationSpeed:n=25,renderer:o,onRendererChange:i,onAnimationSpeedChange:r,onDownloadVisualization:s,onSolverStarted:a,onSolverCompleted:A})=>{const[c,l]=ee.useReducer(B=>!B,!1),u=ee.useRef(void 0),g=ee.useRef(null),h="solver-debugger-last-iteration",[d,p]=ee.useState(null),m=ee.useRef(null),_=ee.useMemo(()=>[{label:"Slow",value:250,description:"250ms"},{label:"Normal",value:100,description:"100ms"},{label:"Fast",value:10,description:"10ms"},{label:"Fast (2x)",value:5,description:"5ms"},{label:"Fast (10x)",value:1,description:"1ms"},{label:"Fast 20x",value:.5,description:"2 steps / 1ms"},{label:"Fast 100x",value:.1,description:"10 steps / 1ms"}],[]),f=()=>{const B=Math.max(1,n),S=n<1?Math.round(1/n):1;u.current=setInterval(()=>{if(t.solved||t.failed){u.current&&(clearInterval(u.current),u.current=void 0),l(),e(),A&&t.solved&&A(t);return}for(let Q=0;Q<S&&!(t.solved||t.failed);Q++)t.step();e()},B)},I=()=>{u.current&&(clearInterval(u.current),u.current=void 0)},C=()=>{!t.solved&&!t.failed&&(t.step(),e())},y=()=>{!t.solved&&!t.failed&&(a&&a(t),t.solve(),e(),A&&A(t))},x=()=>{c?(I(),l()):(l(),f())},E=()=>{if(t.solved||t.failed||c)return;g.current===null&&typeof window<"u"&&(g.current=window.localStorage.getItem(h));const B=window.prompt("Step until which iteration?",g.current??`${t.iterations}`);if(B===null)return;g.current=B,typeof window<"u"&&window.localStorage.setItem(h,B);const S=Number(B);if(!Number.isFinite(S)){window.alert("Please enter a valid number for the iteration");return}for(;t.iterations<S&&!t.solved&&!t.failed;)t.step();e(),t.solved&&A&&A(t)};return ee.useEffect(()=>()=>{I()},[]),ee.useEffect(()=>{(t.solved||t.failed)&&c&&(I(),l())},[t.solved,t.failed,c]),ee.useEffect(()=>{c&&(I(),f())},[n,c]),ee.useEffect(()=>{if(typeof document>"u")return;const B=S=>{m.current&&!m.current.contains(S.target)&&p(null)};return document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[]),K.jsxs("div",{className:"space-y-2 p-2 border-b",children:[K.jsx("div",{className:"flex items-center",children:K.jsxs("div",{className:"flex items-center gap-2",ref:m,children:[K.jsxs("div",{className:"flex h-9 items-center space-x-1 rounded-md border border-slate-200 bg-white p-1 shadow-sm",children:[K.jsxs("div",{className:"relative",children:[K.jsx("button",{type:"button",onClick:()=>p(d==="renderer"?null:"renderer"),className:"flex select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100","data-state":d==="renderer"?"open":"closed",children:"Renderer"}),d==="renderer"&&K.jsx("div",{className:"absolute left-0 z-50 mt-1 min-w-[10rem] rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md",children:["vector","canvas"].map(B=>K.jsxs("button",{type:"button",onClick:()=>{i(B),p(null)},className:"flex w-full items-center rounded-sm px-2 py-1.5 text-sm hover:bg-slate-100",children:[B==="vector"?"Vector":"Canvas",o===B&&K.jsx("span",{className:"ml-auto text-xs text-slate-500",children:"✓"})]},B))})]}),K.jsxs("div",{className:"relative",children:[K.jsx("button",{type:"button",onClick:()=>p(d==="debug"?null:"debug"),className:"flex select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100","data-state":d==="debug"?"open":"closed",children:"Debug"}),d==="debug"&&K.jsx("div",{className:"absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md",children:K.jsx("button",{type:"button",onClick:()=>{s(),p(null)},className:"flex w-full items-center rounded-sm px-2 py-1.5 text-sm hover:bg-slate-100",children:"Download Visualization"})})]}),K.jsxs("div",{className:"relative",children:[K.jsx("button",{type:"button",onClick:()=>p(d==="animation"?null:"animation"),className:"flex select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100","data-state":d==="animation"?"open":"closed",children:"Animation"}),d==="animation"&&K.jsx("div",{className:"absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md",children:_.map(B=>K.jsxs("button",{type:"button",onClick:()=>{r(B.value),p(null)},className:"flex w-full items-center rounded-sm px-2 py-1.5 text-sm hover:bg-slate-100",children:[B.label,K.jsx("span",{className:"ml-auto text-xs text-slate-500",children:B.description}),n===B.value&&K.jsx("span",{className:"ml-2 text-xs text-slate-500",children:"✓"})]},B.value))})]})]}),K.jsx(XOi,{solver:t})]})}),K.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[K.jsx("button",{onClick:C,disabled:t.solved||t.failed||c,className:"bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Step"}),K.jsx("button",{onClick:y,disabled:t.solved||t.failed||c,className:"bg-green-500 hover:bg-green-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Solve"}),K.jsx("button",{onClick:x,disabled:t.solved||t.failed,className:`px-3 py-1 rounded text-white text-sm ${c?"bg-red-500 hover:bg-red-600":"bg-yellow-500 hover:bg-yellow-600"} disabled:bg-gray-300`,children:c?"Stop":"Animate"}),K.jsx("button",{onClick:E,disabled:t.solved||t.failed||c,className:"bg-orange-500 hover:bg-orange-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm",children:"Step Until Iteration"}),K.jsxs("div",{className:"text-sm text-gray-600",children:["Iterations: ",t.iterations]}),t.timeToSolve!==void 0&&K.jsxs("div",{className:"text-sm text-gray-600",children:["Time: ",(t.timeToSolve/1e3).toFixed(3),"s"]}),t.solved&&K.jsx("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded text-sm",children:"Solved"}),t.failed&&K.jsx("div",{className:"px-2 py-1 bg-red-100 text-red-800 rounded text-sm",children:"Failed"})]}),t.error&&K.jsxs("div",{className:"text-red-600 text-sm",children:["Error: ",t.error]})]})},eGi=t=>t!==null&&"pipelineDef"in t&&Array.isArray(t.pipelineDef),tGi=(t,e,n)=>{const o=t.currentPipelineStageIndex;return e<o?"Completed":e===o&&t.activeSubSolver?t.activeSubSolver.failed?"Failed":"In Progress":"Not Started"},nGi=(t,e)=>{const o=t.pipelineDef[e].solverName,i=tGi(t,e),r=t[o],s=t.firstIterationOfStage?.[o]??(e===t.currentPipelineStageIndex?t.iterations:null),a=t.iterations;let A=0;if(i==="Completed"){const g=t.pipelineDef[e+1],h=g?t.firstIterationOfStage?.[g.solverName]:void 0;h!==void 0&&s!==null?A=h-s:s!==null&&(A=a-s)}else i==="In Progress"&&s!==null&&(A=a-s);const c=t.timeSpentOnStage?.[o]??0;let l=0;i==="Completed"?l=1:i==="In Progress"&&r&&(l=r.progress??0);const u=r?.stats??null;return{index:e,name:o,status:i,firstIteration:s,iterations:A,progress:l,timeSpent:c,stats:u&&Object.keys(u).length>0?u:null,solverInstance:r??null}},oGi=({status:t})=>{const e={"Not Started":"text-blue-600","In Progress":"text-yellow-600",Completed:"text-green-600",Failed:"text-red-600"};return K.jsx("span",{className:`font-medium ${e[t]}`,children:t})},iGi=({progress:t})=>{if(t===0)return null;const e=Math.round(t*100);return K.jsxs("div",{className:"flex items-center gap-2",children:[K.jsx("div",{className:"w-20 h-2 bg-gray-200 rounded overflow-hidden",children:K.jsx("div",{className:"h-full bg-blue-500 transition-all duration-200",style:{width:`${e}%`}})}),K.jsxs("span",{className:"text-xs text-gray-500",children:[e,"%"]})]})},npn=t=>{if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||t==null)return String(t);if(typeof t=="object")try{return JSON.stringify(t)}catch{return String(t)}return String(t)},rGi=t=>Object.entries(t).map(([e,n])=>`${e}: ${npn(n)}`).join(", "),sGi=({stats:t})=>{if(!t||Object.keys(t).length===0)return K.jsx("span",{children:"-"});const e=Object.entries(t),n=rGi(t);return K.jsxs("details",{className:"cursor-pointer",children:[K.jsx("summary",{className:"whitespace-nowrap overflow-hidden text-ellipsis max-w-[200px]",children:n}),K.jsx("div",{className:"mt-1 text-xs",children:e.map(([o,i])=>K.jsxs("div",{children:[o,": ",npn(i)]},o))})]})},D$e=t=>{if(t===null||typeof t!="object")return t;if(Array.isArray(t))return t.map(D$e);const e={};for(const[n,o]of Object.entries(t))n.startsWith("_")||(e[n]=D$e(o));return e},aGi=(t,e)=>{try{if(typeof t.getConstructorParams!="function"){alert(`getConstructorParams() is not implemented for ${e}`);return}const n=D$e(t.getConstructorParams()),o=new Blob([JSON.stringify(n,null,2)],{type:"application/json"}),i=URL.createObjectURL(o),r=document.createElement("a");r.href=i,r.download=`${e}_input.json`,r.click(),URL.revokeObjectURL(i)}catch(n){alert(`Error downloading input for ${e}: ${n instanceof Error?n.message:String(n)}`)}},AGi=({expanded:t})=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:`w-4 h-4 transition-transform duration-200 ${t?"rotate-90":""}`,children:K.jsx("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z",clipRule:"evenodd"})}),opn=t=>{let e=t;for(;e.activeSubSolver;)e=e.activeSubSolver;return e},ipn=({solver:t,onStepUntilPhase:e,onDownloadInput:n,isNested:o=!1,indentLevel:i=0,triggerRender:r})=>{const[s,a]=ee.useState(new Set),A=t.pipelineDef.map((m,_)=>nGi(t,_)),c=m=>{a(_=>{const f=new Set(_);return f.has(m)?f.delete(m):f.add(m),f})},l=m=>{e?.(m)},u=m=>{m.solverInstance&&(n?n(m.solverInstance,m.name):aGi(m.solverInstance,m.name))},g=m=>`${(m/1e3).toFixed(2)}s`,h=()=>{if(!t.solved&&!t.failed){const m=t.activeSubSolver;for(;!t.solved&&!t.failed&&(t.step(),!(t.activeSubSolver&&t.activeSubSolver!==m)););r?.()}},d=()=>{if(!t.solved&&!t.failed){const m=opn(t);for(;!t.solved&&!t.failed&&(t.step(),opn(t)===m););r?.()}},p=i*24;return K.jsxs("div",{className:o?"":"border-t border-gray-200",children:[!o&&K.jsxs("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200 flex items-center justify-between",children:[K.jsx("h3",{className:"text-sm font-semibold text-gray-700",children:"Pipeline Stages"}),K.jsxs("div",{className:"flex gap-2",children:[K.jsx("button",{onClick:d,disabled:t.solved||t.failed,className:"bg-indigo-500 hover:bg-indigo-600 disabled:bg-gray-300 disabled:cursor-not-allowed cursor-pointer text-white px-3 py-1 rounded text-sm",children:"Next Solver"}),K.jsx("button",{onClick:h,disabled:t.solved||t.failed,className:"bg-purple-500 hover:bg-purple-600 disabled:bg-gray-300 disabled:cursor-not-allowed cursor-pointer text-white px-3 py-1 rounded text-sm",children:"Next Stage"})]})]}),K.jsx("div",{className:"overflow-x-auto",children:K.jsxs("table",{className:"w-full text-sm",children:[!o&&K.jsx("thead",{children:K.jsxs("tr",{className:"bg-gray-50 border-b border-gray-200",children:[K.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Stage"}),K.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Status"}),K.jsxs("th",{className:"px-4 py-2 text-center font-semibold text-gray-700",children:["i",K.jsx("sub",{children:"0"})]}),K.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Iterations"}),K.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Progress"}),K.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Time"}),K.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Stats"}),K.jsx("th",{className:"px-4 py-2 text-left font-semibold text-gray-700",children:"Input"})]})}),K.jsx("tbody",{children:A.map(m=>{const _=eGi(m.solverInstance),f=s.has(m.name);return K.jsxs(Fs.Fragment,{children:[K.jsxs("tr",{className:`border-b border-gray-100 ${m.status==="In Progress"?"bg-yellow-50":""}`,children:[K.jsx("td",{className:"px-4 py-2",children:K.jsxs("div",{className:"flex items-center gap-2",style:{paddingLeft:p},children:[_?K.jsx("button",{onClick:()=>c(m.name),className:"text-gray-500 hover:text-gray-700",title:f?"Collapse":"Expand",children:K.jsx(AGi,{expanded:f})}):K.jsx("span",{className:"w-4"}),K.jsx("span",{className:"text-gray-400 w-6",children:String(m.index+1).padStart(2,"0")}),K.jsx("button",{onClick:()=>l(m.name),disabled:m.status==="Completed"||t.solved||t.failed,className:"text-blue-500 hover:text-blue-700 disabled:text-gray-300 disabled:cursor-not-allowed",title:`Step until ${m.name} completes`,children:K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-4 h-4",children:K.jsx("path",{fillRule:"evenodd",d:"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z",clipRule:"evenodd"})})}),K.jsx("span",{className:"font-medium text-gray-900",children:m.name})]})}),K.jsx("td",{className:"px-4 py-2",children:K.jsx(oGi,{status:m.status})}),K.jsx("td",{className:"px-4 py-2 text-center text-gray-600",children:m.firstIteration!==null?m.firstIteration:""}),K.jsx("td",{className:"px-4 py-2 text-gray-600",children:m.iterations}),K.jsx("td",{className:"px-4 py-2",children:K.jsx(iGi,{progress:m.progress})}),K.jsx("td",{className:"px-4 py-2 text-gray-600",children:g(m.timeSpent)}),K.jsx("td",{className:"px-4 py-2 text-gray-500",children:K.jsx(sGi,{stats:m.stats})}),K.jsx("td",{className:"px-4 py-2",children:m.solverInstance?K.jsxs("button",{onClick:()=>u(m),className:"flex items-center gap-1 text-blue-500 hover:text-blue-700",title:`Download input for ${m.name}`,children:[K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-4 h-4",children:K.jsx("path",{fillRule:"evenodd",d:"M12 2.25a.75.75 0 01.75.75v11.69l3.22-3.22a.75.75 0 111.06 1.06l-4.5 4.5a.75.75 0 01-1.06 0l-4.5-4.5a.75.75 0 111.06-1.06l3.22 3.22V3a.75.75 0 01.75-.75zm-9 13.5a.75.75 0 01.75.75v2.25a1.5 1.5 0 001.5 1.5h13.5a1.5 1.5 0 001.5-1.5V16.5a.75.75 0 011.5 0v2.25a3 3 0 01-3 3H5.25a3 3 0 01-3-3V16.5a.75.75 0 01.75-.75z",clipRule:"evenodd"})}),K.jsx("span",{children:"Input"})]}):null})]}),_&&f&&K.jsx("tr",{children:K.jsx("td",{colSpan:8,className:"p-0",children:K.jsx(ipn,{solver:m.solverInstance,onStepUntilPhase:e,onDownloadInput:n,isNested:!0,indentLevel:i+1,triggerRender:r})})})]},m.name)})})]})})]})};function cGi({graphics:t}){const e=t.points??[],n=t.lines??[],o=t.rects??[],i=t.circles??[],r=t.texts??[];let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;const l=(m,_)=>{typeof m=="number"&&(m<s&&(s=m),m>A&&(A=m)),typeof _=="number"&&(_<a&&(a=_),_>c&&(c=_))};for(const m of e)l(m.x,m.y);for(const m of n){const _=m.points??[];for(const f of _)l(f.x,f.y)}for(const m of o){const _=m.x??0,f=m.y??0,I=m.width??0,C=m.height??0;l(_,f),l(_+I,f+C)}for(const m of i){const _=m.x??0,f=m.y??0,I=m.radius??1;l(_-I,f-I),l(_+I,f+I)}for(const m of r)l(m.x,m.y);(!isFinite(s)||!isFinite(a)||!isFinite(A)||!isFinite(c))&&(s=-20,a=-20,A=20,c=20);const u=10,g=s-u,h=a-u,d=Math.max(1,A-s+2*u),p=Math.max(1,c-a+2*u);return K.jsxs("svg",{className:"w-full h-[400px] bg-white",viewBox:`${g} ${h} ${d} ${p}`,role:"img","aria-label":"Graphics fallback",children:[o.map((m,_)=>K.jsx("rect",{x:m.x??0,y:m.y??0,width:m.width??0,height:m.height??0,fill:"none",stroke:m.strokeColor??"black",strokeWidth:m.strokeWidth??1},`rect-${_}`)),n.map((m,_)=>K.jsx("polyline",{fill:"none",stroke:m.strokeColor??"black",strokeWidth:m.strokeWidth??1,points:(m.points??[]).map(f=>`${f.x??0},${f.y??0}`).join(" ")},`line-${_}`)),i.map((m,_)=>K.jsx("circle",{cx:m.x??0,cy:m.y??0,r:m.radius??1.5,fill:m.fillColor??"none",stroke:m.strokeColor??"black",strokeWidth:m.strokeWidth??1},`circle-${_}`)),e.map((m,_)=>K.jsx("circle",{cx:m.x??0,cy:m.y??0,r:m.radius??1.5,fill:m.color??"black"},`point-${_}`)),r.map((m,_)=>K.jsx("text",{x:m.x??0,y:m.y??0,fontSize:m.fontSize??10,fill:m.color??"black",children:m.text??""},`text-${_}`))]})}var lGi=class extends Fs.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){console.error("InteractiveGraphics render error:",t)}render(){return this.state.hasError?this.props.fallback:this.props.children}},uGi=({solver:t,createSolver:e,animationSpeed:n=25,onSolverStarted:o,onSolverCompleted:i})=>{const[r,s]=ee.useReducer(f=>f+1,0),[a]=ee.useState(()=>{if(e)return e();if(!t)throw new Error("GenericSolverDebugger requires solver or createSolver");return t}),[A,c]=ee.useState(()=>typeof window>"u"?"vector":window.localStorage.getItem("solver-utils-renderer")==="canvas"?"canvas":"vector"),[l,u]=ee.useState(n),g=ee.useMemo(()=>{try{return a.visualize()||{points:[],lines:[],rects:[],circles:[]}}catch(f){return console.error("Visualization error:",f),{points:[],lines:[],rects:[],circles:[]}}},[a,r]),h=ee.useMemo(()=>(g.rects?.length||0)===0&&(g.lines?.length||0)===0&&(g.points?.length||0)===0&&(g.circles?.length||0)===0,[g]);ee.useEffect(()=>{if(!(typeof document>"u")&&!document.querySelector('script[src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"]')){const f=document.createElement("script");f.src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4",document.head.appendChild(f)}},[]),ee.useEffect(()=>{u(n)},[n]);const d=a.pipelineDef!==void 0,p=f=>{const I=a;if(!a.solved&&!a.failed){for(;!a.solved&&!a.failed&&I.currentPipelineStageIndex<=I.pipelineDef.findIndex(C=>C.solverName===f);)a.step();s()}},m=()=>{const f=JSON.stringify(g,null,2),I=new Blob([f],{type:"application/json"}),C=URL.createObjectURL(I),y=document.createElement("a");y.download="visualization.json",y.href=C,document.body.appendChild(y),y.click(),document.body.removeChild(y),URL.revokeObjectURL(C)},_=f=>{c(f),typeof window<"u"&&window.localStorage.setItem("solver-utils-renderer",f)};return K.jsxs("div",{children:[K.jsx(ZOi,{solver:a,triggerRender:s,animationSpeed:l,renderer:A,onRendererChange:_,onAnimationSpeedChange:u,onDownloadVisualization:m,onSolverStarted:o,onSolverCompleted:i}),h?K.jsx("div",{className:"p-4 text-gray-500",children:"No Graphics Yet"}):K.jsx(lGi,{fallback:K.jsx(cGi,{graphics:g}),children:A==="canvas"?K.jsx($Oi,{graphics:g}):K.jsx(JOi,{graphics:g})}),d&&K.jsx(ipn,{solver:a,onStepUntilPhase:p,triggerRender:s})]})};const gGi=()=>{ee.useEffect(()=>{const t="tailwind-cdn-script";if(document.getElementById(t)||window.tailwind)return;const e=document.createElement("div");e.className="hidden",document.body.appendChild(e);const n=window.getComputedStyle(e).display==="none";if(document.body.removeChild(e),n)return;const o=document.createElement("script");o.id=t,o.src="https://cdn.tailwindcss.com",document.head.appendChild(o)},[])},dGi=1e3,kE=(t,e)=>{const{fileName:n,mimeType:o="text/plain"}=e,i=t instanceof Blob?t:new Blob([t],{type:o}),r=URL.createObjectURL(i),s=document.createElement("a");s.href=r,s.download=n,s.target="_blank",s.rel="noopener noreferrer",s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>{URL.revokeObjectURL(r)},dGi)},N$e=t=>{let e=t.trim().replace(/[\\/:*?"<>|]/g,"_").replace(/[\x00-\x1f]/g,"").replace(/^\.+/,"").replace(/\.+$/,"").replace(/\s+/g," ").replace(/_+/g,"_");return/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i.test(e)&&(e=`_${e}`),e=e.slice(0,200),e||"untitled"},hGi=t=>{const e=t.solverConstructorArgs??[t.solverParams];if(t.solverName!=="AutoroutingPipelineSolver7_MultiGraph"||e.length!==1)return e;const[{input:n,options:o}]=e;return[n,o]},t8="https://github.com/tscircuit/tscircuit-autorouter/issues/new",rpn="https://github.com/tscircuit/copper-pour-solver/issues/new",spn="https://github.com/tscircuit/calculate-packing/issues/new",pGi="https://github.com/tscircuit/matchpack/issues/new",apn="https://github.com/tscircuit/schematic-trace-solver/issues/new?template=json-bug-report.yml",mGi={PackSolver2:spn,LayoutPipelineSolver:pGi,AutoroutingPipelineSolver:t8,AssignableAutoroutingPipeline2:t8,AssignableAutoroutingPipeline3:t8,AutoroutingPipeline1_OriginalUnravel:t8,AutoroutingPipelineSolver3_HgPortPointPathing:t8,AutoroutingPipelineSolver4:t8,AutoroutingPipelineSolver5:t8,AutoroutingPipelineSolver7_MultiGraph:t8,AutoroutingPipelineSolver8:t8,CopperPourPipelineSolver:rpn,SchematicTracePipelineSolver:apn},_Gi=t=>t.toLowerCase().includes("pack")?mln:t.toLowerCase().includes("rout")?fln:rbi,Apn=t=>{const e=mGi[t];if(e)return e;const n=t.toLowerCase();return n.includes("autorout")?t8:n.includes("schematic")&&n.includes("trace")?apn:n.includes("copperpour")?rpn:n.includes("pack")?spn:null},fGi=t=>`${N$e(`${t.componentName}-${t.solverName}`)}-solver-input.json`,cpn=t=>{kE(JSON.stringify(t.solverParams,null,2),{fileName:fGi(t),mimeType:"application/json"})},IGi=({solverEvent:t})=>{const e=Apn(t.solverName);return K.jsxs("div",{className:"rf-flex rf-items-center rf-justify-end rf-gap-2 rf-border-b rf-border-gray-200 rf-bg-gray-50 rf-px-4 rf-py-2",children:[K.jsxs(fA,{type:"button",variant:"outline",size:"sm",onClick:()=>cpn(t),children:[K.jsx(mZ,{className:"rf-w-4 rf-h-4"}),"Download"]}),e?K.jsx(fA,{asChild:!0,variant:"outline",size:"sm",children:K.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[K.jsx(Bme,{className:"rf-w-4 rf-h-4"}),"Report"]})}):K.jsxs(fA,{type:"button",variant:"outline",size:"sm",disabled:!0,title:"No report link configured for this solver",children:[K.jsx(Bme,{className:"rf-w-4 rf-h-4"}),"Report"]})]})},CGi=({solverEvent:t})=>{const e=Apn(t.solverName);return e?K.jsx(fA,{asChild:!0,variant:"ghost",size:"icon",className:"rf-h-8 rf-w-8",children:K.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",title:"Report solver bug","aria-label":"Report solver bug",children:K.jsx(Bme,{className:"rf-w-4 rf-h-4"})})}):K.jsx(fA,{type:"button",variant:"ghost",size:"icon",className:"rf-h-8 rf-w-8",disabled:!0,title:"No report link configured for this solver","aria-label":"Report solver bug",children:K.jsx(Bme,{className:"rf-w-4 rf-h-4"})})},yGi=({solverEvents:t=[]})=>{const[e,n]=ee.useState(null);gGi();const o=ee.useMemo(()=>{const a=new Map;for(const A of t){const c=`${A.componentName}-${A.solverName}`;a.set(c,A)}return a},[t]),i=ee.useMemo(()=>Array.from(o.keys()),[o]),r=e?o.get(e):null,s=ee.useMemo(()=>{if(!r)return{instance:null,error:null,classFound:!1};const a=mMe[r.solverName];if(!a)return{instance:null,error:`Solver class "${r.solverName}" not found in SOLVERS registry. Available: ${Object.keys(mMe).join(", ")}`,classFound:!1};try{return{instance:new a(...hGi(r)),error:null,classFound:!0}}catch(A){const c=A instanceof Error?A.message:String(A);return console.error("Failed to reconstruct solver:",A),{instance:null,error:`Failed to instantiate solver: ${c}`,classFound:!0}}},[r]);return t.length===0?K.jsx("div",{className:"rf-p-4",children:K.jsx("div",{className:"rf-bg-gray-50 rf-rounded-md rf-border rf-border-gray-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-3",children:"No Solvers Detected"}),K.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Solvers will appear here when the circuit runs. Solvers are used for tasks like component packing and autorouting."})]})})}):K.jsxs("div",{className:"rf-flex rf-h-full rf-overflow-hidden",children:[K.jsxs("div",{className:"rf-w-64 rf-border-r rf-border-gray-200 rf-overflow-y-auto rf-flex-shrink-0",children:[K.jsxs("div",{className:"rf-text-xs rf-font-semibold rf-text-gray-500 rf-px-3 rf-py-2 rf-bg-gray-50 rf-border-b rf-border-gray-200",children:[i.length," ",i.length===1?"Solver":"Solvers"]}),i.map(a=>{const A=o.get(a),c=e===a;return K.jsx("div",{className:`rf-px-3 rf-py-2 rf-cursor-pointer rf-border-b rf-border-gray-100 ${c?"rf-bg-blue-50 rf-border-l-2 rf-border-l-blue-500":"hover:rf-bg-gray-50"}`,onClick:()=>n(a),children:(()=>{const l=_Gi(A.solverName);return K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[K.jsx(l,{className:"rf-w-4 rf-h-4 rf-text-blue-500 rf-flex-shrink-0"}),K.jsxs("div",{className:"rf-flex-1 rf-min-w-0",children:[K.jsx("div",{className:"rf-text-sm rf-font-medium rf-text-gray-800 rf-truncate",children:A.componentName}),K.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate",children:A.solverName})]})]})})()},a)})]}),K.jsx("div",{className:"rf-flex-1 rf-overflow-hidden",children:r?s.instance?K.jsxs("div",{className:"rf-flex rf-h-full rf-flex-col rf-overflow-y-auto",children:[K.jsx(IGi,{solverEvent:r}),K.jsx("div",{className:"rf-min-h-0 rf-flex-1",children:K.jsx(bE,{fallback:K.jsx("div",{className:"rf-p-4",children:K.jsxs("div",{className:"rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200 rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-2",children:"Error Loading Solver Debugger"}),K.jsxs("p",{className:"rf-text-sm rf-text-red-600",children:["Failed to render the solver debugger for"," ",r.solverName]})]})}),children:K.jsx(uGi,{solver:s.instance})})})]}):K.jsxs("div",{className:"rf-p-4",children:[K.jsxs("div",{className:"rf-mb-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800",children:r.solverName}),K.jsxs("p",{className:"rf-text-sm rf-text-gray-500",children:["Component: ",r.componentName]})]}),s.error&&K.jsx("div",{className:`rf-rounded-md rf-border rf-p-4 rf-mb-4 ${s.classFound?"rf-bg-red-50 rf-border-red-200":"rf-bg-yellow-50 rf-border-yellow-200"}`,children:K.jsx("p",{className:`rf-text-sm ${s.classFound?"rf-text-red-700":"rf-text-yellow-700"}`,children:s.error})}),K.jsxs("div",{className:"rf-border rf-border-gray-200 rf-rounded-md rf-overflow-hidden",children:[K.jsxs("div",{className:"rf-px-3 rf-py-2 rf-bg-gray-50 rf-flex rf-items-center rf-justify-between rf-gap-2",children:[K.jsx("span",{className:"rf-text-sm rf-font-medium rf-text-gray-700",children:"Solver Parameters"}),K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-1",children:[K.jsx(CGi,{solverEvent:r}),K.jsx(fA,{type:"button",variant:"ghost",size:"icon",className:"rf-h-8 rf-w-8","aria-label":"Download solver input JSON",title:"Download solver input JSON",onClick:()=>cpn(r),children:K.jsx(mZ,{className:"rf-w-4 rf-h-4"})})]})]}),K.jsx("div",{className:"rf-p-3 rf-bg-white rf-border-t rf-border-gray-200",children:K.jsx("pre",{className:"rf-text-xs rf-font-mono rf-text-gray-600 rf-whitespace-pre-wrap rf-overflow-x-auto",children:JSON.stringify(r.solverParams,null,2)})})]})]}):K.jsx("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:K.jsx("p",{className:"rf-text-sm rf-text-gray-500",children:"Select a solver from the list to view details"})})})]})},xGi=["subcircuit_id","componentDisplayName","phaseName","routingPhaseIndex","phaseOrdinal","phaseCount","phaseStageIndex","phaseStageCount","connectionCount","obstacleCount","previousTraceCount","isReroutePhase","autorouterName","autorouterVersion","solverName","effort","cacheStatus"],EGi=["phaseOrdinal","routingPhaseIndex","phaseName","phaseStageIndex"];function BGi(t,e){let n=-1,o=-1;for(let i=t.length-1;i>=0;i--){const r=t[i];if(r.status!=="running"||r.subcircuit_id!==e.subcircuit_id||r.componentDisplayName!==e.componentDisplayName)continue;let s=0,a=!1;for(const A of EGi)if(!(r[A]===void 0||e[A]===void 0)){if(r[A]!==e[A]){a=!0;break}s++}!a&&s>o&&(n=i,o=s)}return n}function bGi(t,e){const n=Object.fromEntries(xGi.filter(s=>e[s]!==void 0).map(s=>[s,e[s]])),o=e.simpleRouteJson?structuredClone(e.simpleRouteJson):void 0,i=e.type==="autorouting:start"?-1:BGi(t,e),r={...i===-1?{id:`autorouting_phase_${t.length+1}`}:t[i],...n,status:e.type==="autorouting:start"?"running":e.type==="autorouting:end"?"complete":"error",...e.type==="autorouting:start"?{startSimpleRouteJson:o}:e.type==="autorouting:end"?{endSimpleRouteJson:o}:{errorSimpleRouteJson:o,error:e.error?{...e.error}:void 0}};return i===-1?[...t,r]:t.map((s,a)=>a===i?r:s)}const SGi=new Map([["custom","Custom"],["fanout","Fanout"],["single_layer_fanout","Single layer fanout"],["tscircuit_simplify","Simplify"]]),QGi=new Set(["tscircuit","default","auto","auto_local"]);function vGi(t){if(t==="FanoutSolver")return"Fanout";if(t==="AutoroutingPipelineSolver11_Simplification")return"Simplify";const e=t.match(/^AutoroutingPipeline(?:Solver)?(\d+)(?:_|$)/);if(e)return`Pipeline${e[1]}`;const n=t.match(/^AssignableAutoroutingPipeline(\d+)$/);return n?`Assignable${n[1]}`:t}function wGi(t){const e=t.autorouterName?.trim(),n=e?.replace(/-/g,"_"),o=n&&SGi.get(n);if(o)return o;if(n&&!QGi.has(n))return e;const i=t.solverName?.trim();if(i)return vGi(i);const r=t.autorouterVersion?.trim();if(r){const s=r.match(/^beta[_-]pipeline(\d+)$/);return s?`Pipeline${s[1]}`:r==="latest"?"default":r}return e?"default":"Unknown"}const R$e="#fbbf24";function PGi(t){const e=t.endSimpleRouteJson?.traces??[],n=new Set(e.flatMap(i=>[i.pcb_trace_id,i.__replaces_pcb_trace_id].filter(r=>r!==void 0)));return[...(t.startSimpleRouteJson?.traces??[]).filter(i=>!n.has(i.pcb_trace_id)),...e]}function lpn(t){const e=new Map((t.startSimpleRouteJson?.traces??[]).map(n=>[n.pcb_trace_id,n]));return(t.endSimpleRouteJson?.traces??[]).filter(n=>{const o=e.get(n.pcb_trace_id);return!o||!!n.__replaces_pcb_trace_id&&n.__replaces_pcb_trace_id!==o.__replaces_pcb_trace_id||JSON.stringify(o.route)!==JSON.stringify(n.route)}).map(n=>n.pcb_trace_id)}function MGi(t,e){return{outer_diameter:t.via_diameter??e.minViaPadDiameter??e.min_via_pad_diameter??e.minViaDiameter??.6,hole_diameter:t.via_hole_diameter??e.minViaHoleDiameter??e.min_via_hole_diameter??.3}}function upn(t,e){const n=[];for(const a of t.route)a.route_type==="wire"?n.push({...a,layer:a.layer}):a.route_type==="via"?n.push({route_type:"via",x:a.x,y:a.y,from_layer:a.from_layer,to_layer:a.to_layer,...MGi(a,e)}):a.route_type==="through_obstacle"&&n.push({route_type:"through_pad",start:{...a.start},end:{...a.end},width:a.width,start_layer:a.from_layer,end_layer:a.to_layer,pcb_smtpad_id:a.circuitJsonMetadata?.pcb_smtpad_id,pcb_plated_hole_id:a.circuitJsonMetadata?.pcb_plated_hole_id});const o=a=>{let A=-1,c=Number.POSITIVE_INFINITY;return n.forEach((l,u)=>{if(l.route_type!=="wire")return;const g=Math.hypot(l.x-a.x,l.y-a.y);g<c&&(c=g,A=u)}),A},i=t.route.filter(a=>a.route_type==="jumper").map(a=>[o(a.start),o(a.end)].sort((A,c)=>A-c)).filter(([a,A])=>a>=0&&A>a).sort(([a],[A])=>a-A),r=[];let s=0;for(const[a,A]of i)a>=s&&r.push(n.slice(s,a+1)),s=Math.max(s,A);return s<n.length&&r.push(n.slice(s)),r}function DGi(t){const e=[],n=[],o=t.endSimpleRouteJson;if(!o)return{lines:e,circles:n};const i=new Set(lpn(t));for(const r of o.traces??[])if(i.has(r.pcb_trace_id))for(const s of upn(r,o)){let a;for(const A of s){if(A.route_type==="through_pad"){a={...A.end,layer:A.end_layer,width:A.width};continue}const c=A.route_type==="wire"?A.layer:A.from_layer;a&&a.layer===c&&(a.x!==A.x||a.y!==A.y)&&e.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeWidth:A.route_type==="wire"?A.width:a.width,strokeColor:R$e,layer:c}),A.route_type==="via"&&n.push({center:{x:A.x,y:A.y},radius:A.outer_diameter/2,stroke:R$e,fill:"transparent"}),a={x:A.x,y:A.y,layer:A.route_type==="wire"?A.layer:A.to_layer,width:A.route_type==="wire"?A.width:a?.width??o.minTraceWidth}}}return{coordinateSystem:"cartesian",lines:e,circles:n}}function NGi(t){const e=JSON.stringify(t);let n=2166136261;for(let o=0;o<e.length;o++)n=Math.imul(n^e.charCodeAt(o),16777619);return(n>>>0).toString(36)}const RGi=new Set(["pcb_trace","pcb_via","pcb_copper_pour","pcb_ground_plane","pcb_ground_plane_region","pcb_thermal_spoke","pcb_breakout_point"]);function TGi(t,e,n){const o=n==="input"?e.startSimpleRouteJson??e.errorSimpleRouteJson:e.endSimpleRouteJson,i=t.filter(c=>!RGi.has(c.type)&&!c.type.endsWith("_error")&&!c.type.endsWith("_warning"));if(!o)return i;const r=n==="input"?o.traces??[]:PGi(e),s=new Set(t.filter(c=>c.type==="source_trace").map(c=>c.source_trace_id)),a=["top",...Array.from({length:Math.max(0,o.layerCount-2)},(c,l)=>`inner${l+1}`),...o.layerCount>1?["bottom"]:[]],A=[];for(const c of r){const u=o.connections.find(h=>h.name===c.connection_name||h.source_trace_id===c.connection_name)?.source_trace_id??c.connection_name??"",g=upn(c,o);for(const[h,d]of g.entries()){const p={type:"pcb_trace",pcb_trace_id:`${e.id}_${n}_${c.pcb_trace_id}_${h}_${NGi(d)}`,subcircuit_id:e.subcircuit_id??void 0,source_trace_id:s.has(u)?u:void 0,route:d};A.push(p);for(const[m,_]of d.entries()){if(_.route_type!=="via")continue;const f=a.indexOf(_.from_layer),I=a.indexOf(_.to_layer),C={type:"pcb_via",pcb_via_id:`${p.pcb_trace_id}_via_${m}`,pcb_trace_id:p.pcb_trace_id,subcircuit_id:e.subcircuit_id??void 0,x:_.x,y:_.y,outer_diameter:_.outer_diameter,hole_diameter:_.hole_diameter,layers:f>=0&&I>=0?a.slice(Math.min(f,I),Math.max(f,I)+1):[_.from_layer,_.to_layer]};A.push(C)}}}return[...i,...A]}const T$e=(t,e)=>t.phaseName||`Phase ${t.phaseOrdinal??e+1}`,gpn=t=>t.componentDisplayName?.match(/name="([^"]+)"/)?.[1]?.replace(/^\./,"")||t.componentDisplayName||t.subcircuit_id||"Board",dpn=t=>t.startSimpleRouteJson??t.endSimpleRouteJson??t.errorSimpleRouteJson,kGi={is_showing_autorouting:!0,is_showing_rats_nest:!1,is_showing_drc_errors:!1,is_showing_drc_warnings:!1,is_showing_pcb_groups:!1},FGi=({circuitJson:t,phases:e=[],isRunning:n=!1})=>{const[o,i]=ee.useState(null),[r,s]=ee.useState("output"),[a,A]=ee.useState(!0),[c,l]=ee.useState(!1),u=ee.useRef(null),[g,h]=ee.useState(480),d=o?e.findIndex(R=>R.id===o.id&&dpn(R)===dpn(o)):-1,p=d<0?e.length-1:d,m=e[p],_=d<0,f=!!m?.endSimpleRouteJson,I=m?.startSimpleRouteJson??m?.errorSimpleRouteJson,C=!!I,y=r==="output"&&!f?"input":r==="input"&&!C?"output":r,x=y==="input"?I:m?.endSimpleRouteJson,E=ee.useMemo(()=>!m||!x?null:TGi(t??[],m,y),[t,m,x,y]),B=ee.useMemo(()=>m&&y==="output"&&a?DGi(m):{lines:[],circles:[]},[m,y,a]);if(ee.useLayoutEffect(()=>{const R=u.current;if(!R)return;const F=()=>h(Math.max(360,R.clientHeight));F();const O=new ResizeObserver(F);return O.observe(R),()=>O.disconnect()},[!!m]),!m)return K.jsxs("div",{className:"rf-flex rf-min-h-[400px] rf-flex-col rf-items-center rf-justify-center rf-gap-3 rf-p-8 rf-text-center",children:[K.jsx(fln,{className:"rf-h-7 rf-w-7 rf-text-blue-500"}),K.jsx("h3",{className:"rf-text-base rf-font-medium",children:n?"Waiting for autorouting":"No autorouting captures"}),K.jsx("p",{className:"rf-max-w-md rf-text-sm rf-text-gray-500",children:n?"Phases appear as the circuit routes. Each capture includes its input and output on the PCB.":"Run a circuit with autorouting enabled to inspect its phases. A circuit JSON file alone does not include routing history."})]});const S=T$e(m,p),Q=m.status==="running"&&n,w=!f,M=I?.connections.length,k=E?.filter(R=>R.type==="pcb_trace").length??0;return K.jsxs("div",{className:"rf-flex rf-h-full rf-min-h-[620px] rf-flex-col rf-bg-white md:rf-flex-row","data-testid":"autorouting-explorer",children:[K.jsxs("aside",{className:"rf-flex rf-shrink-0 rf-flex-col rf-border-b rf-border-gray-200 md:rf-w-52 md:rf-border-b-0 md:rf-border-r","aria-label":"Routing phases",children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-3 rf-py-2 rf-text-xs rf-text-gray-500",children:[K.jsx("span",{children:"Routing phases"}),K.jsx("span",{children:e.length})]}),K.jsx("div",{className:"rf-flex rf-gap-1 rf-overflow-x-auto rf-px-1.5 rf-pb-1.5 md:rf-flex-col md:rf-overflow-x-hidden md:rf-overflow-y-auto",children:e.map((R,F)=>{const O=lpn(R).length,U=R.endSimpleRouteJson?`${O} ${O===1?"trace":"traces"} routed`:R.status==="error"?"Failed":R.status==="running"&&n?"Routing…":"No output";return K.jsxs("button",{type:"button","aria-pressed":F===p,title:`${gpn(R)} · ${U}`,onClick:()=>i(R),className:Oi("rf-flex rf-min-w-[192px] rf-items-start rf-gap-2 rf-rounded-md rf-border rf-px-2 rf-py-2 rf-text-left md:rf-min-w-0",F===p?"rf-border-blue-200 rf-bg-blue-50":"rf-border-transparent hover:rf-bg-gray-50"),children:[K.jsx("span",{className:Oi("rf-flex rf-h-5 rf-w-5 rf-shrink-0 rf-items-center rf-justify-center rf-rounded-full rf-text-[11px]",F===p?"rf-bg-blue-600 rf-text-white":"rf-bg-gray-100 rf-text-gray-500"),children:F+1}),K.jsxs("span",{className:"rf-min-w-0 rf-flex-1",children:[K.jsxs("span",{className:"rf-flex rf-items-center rf-gap-1",children:[K.jsx("span",{className:"rf-min-w-0 rf-flex-1 rf-truncate rf-text-xs rf-font-medium rf-leading-5 rf-text-gray-800",title:T$e(R,F),children:T$e(R,F)}),R.status==="complete"?K.jsx(CS,{"aria-label":"Captured",className:"rf-h-3 rf-w-3 rf-shrink-0 rf-text-green-600"}):R.status==="error"?K.jsx(oWe,{"aria-label":"Failed",className:"rf-h-3 rf-w-3 rf-shrink-0 rf-text-red-500"}):n?K.jsx(SE,{"aria-label":"Routing",className:"rf-h-3 rf-w-3 rf-shrink-0 rf-animate-spin rf-text-blue-500"}):null]}),K.jsxs("span",{className:"rf-block rf-text-[11px] rf-leading-4 rf-text-gray-500",children:[wGi(R)," · ",U]})]})]},R.id)})})]}),K.jsxs("div",{className:"rf-flex rf-min-w-0 rf-flex-1 rf-flex-col",children:[K.jsxs("div",{className:"rf-flex rf-flex-wrap rf-items-center rf-gap-3 rf-border-b rf-border-gray-200 rf-px-4 rf-py-3",children:[K.jsxs("h3",{className:"rf-mr-auto rf-flex rf-items-center rf-gap-2 rf-text-sm rf-font-medium",children:[S,K.jsxs("span",{className:"rf-text-xs rf-font-normal rf-text-gray-500",children:[p+1," of ",e.length]})]}),n&&K.jsx("button",{type:"button",onClick:()=>i(null),disabled:_,className:"rf-text-xs rf-text-blue-600 disabled:rf-text-gray-500",children:_?"Following latest":"Follow latest"}),K.jsx("div",{className:"rf-flex rf-rounded-md rf-bg-gray-100 rf-p-1","aria-label":"Phase snapshot",children:["input","output"].map(R=>K.jsx("button",{type:"button","aria-pressed":y===R,disabled:R==="input"?!C:!f,onClick:()=>s(R),className:Oi("rf-rounded rf-px-3 rf-py-1 rf-text-xs disabled:rf-opacity-40",y===R?"rf-bg-white rf-text-gray-900 rf-shadow-sm":"rf-text-gray-500"),children:R==="input"?"Input":"Output"},R))})]}),K.jsxs("div",{className:"rf-flex rf-flex-wrap rf-items-center rf-justify-between rf-gap-2 rf-px-4 rf-py-2 rf-text-xs rf-text-gray-600",children:[K.jsxs("label",{className:"rf-flex rf-items-center rf-gap-2",children:[K.jsx("input",{type:"checkbox",checked:a,disabled:y!=="output",onChange:R=>A(R.target.checked),className:"rf-accent-blue-600"}),K.jsx("span",{"aria-hidden":"true",className:"rf-inline-block rf-h-0.5 rf-w-3",style:{backgroundColor:R$e}}),"Highlight changes (all layers)"]}),K.jsxs("span",{children:[y==="input"?"Before this phase":"After this phase"," ","· ",k," traces"]})]}),w&&K.jsx("div",{className:Oi("rf-border-y rf-px-4 rf-py-2 rf-text-xs",m.status==="error"?"rf-border-red-100 rf-bg-red-50 rf-text-red-700":"rf-border-blue-100 rf-bg-blue-50 rf-text-blue-700"),role:"status",children:m.status==="error"?`Routing failed: ${m.error?.message||"No output was captured."}`:Q?"Routing in progress. Showing captured input until output is available.":"No output was captured for this phase. Showing the available input."}),K.jsx("div",{ref:u,className:"rf-relative rf-min-h-[360px] rf-flex-1","data-testid":"autorouting-pcb",children:E?K.jsx(S$e,{circuitJson:E,height:g,allowEditing:!1,clickToInteractEnabled:!1,initialState:kGi,debugGraphics:B}):K.jsx("div",{className:"rf-p-6 rf-text-sm rf-text-gray-500",children:"No PCB snapshot available for this capture."})}),K.jsxs("div",{className:"rf-flex rf-flex-wrap rf-items-center rf-justify-between rf-gap-2 rf-border-t rf-border-gray-200 rf-px-4 rf-py-3 rf-text-xs rf-text-gray-500",children:[K.jsxs("span",{children:[M===void 0?"Input unavailable":`${M} input connections`,` · ${gpn(m)}`]}),K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4",children:[K.jsxs("button",{type:"button",disabled:!x,onClick:()=>kE(JSON.stringify(x,null,2),{fileName:`${m.id}-${y}.srj.json`,mimeType:"application/json"}),className:"rf-flex rf-items-center rf-gap-1 disabled:rf-opacity-40",children:[K.jsx(mZ,{className:"rf-h-3 rf-w-3"}),"Download SRJ"]}),K.jsxs("button",{type:"button","aria-expanded":c,onClick:()=>l(!c),className:"rf-flex rf-items-center rf-gap-1",children:[K.jsx(bT,{className:Oi("rf-h-3 rf-w-3",c&&"rf-rotate-90")}),"Inspect SRJ"]})]})]}),c&&K.jsx("pre",{className:"rf-m-0 rf-max-h-64 rf-overflow-auto rf-border-t rf-border-gray-200 rf-bg-gray-50 rf-p-4 rf-text-xs","aria-label":`${S} ${y} SRJ`,children:x?JSON.stringify(x,null,2):"No snapshot captured."})]})]})},hpn=({errorMessage:t,errorStack:e,circuitJsonErrors:n})=>{ee.useEffect(()=>{if(t){const o=new Error(t);e&&(o.stack=e);try{dG.captureException(o)}catch{}}},[t,e]),ee.useEffect(()=>{if(n&&n.length>0)for(const o of n){const i=new Error(o.message||"Circuit JSON Error");o.stack&&(i.stack=o.stack);try{dG.captureException(i,{error_type:o.type})}catch{}}},[n])},ppn=t=>{ee.useEffect(()=>{try{bUo(t)}catch{}},[t.source,t.component,t.isWebEmbedded,t.activeTab])},mpn="0.0.2885",LGi={version:mpn},pfe=pFt()(mFt(t=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{t({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),HGi=t=>{const[e,n]=ee.useState([]),[o,i]=ee.useState(null),[r,s]=ee.useState(""),[a,A]=OO("eval-version-selection",null),c=pfe(h=>h.setLastRunEvalVersion),l=pfe(h=>h.lastRunEvalVersion);return ee.useEffect(()=>{t&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(h=>h.json()).then(h=>{if(Array.isArray(h?.versions)){let d=[...h.versions];h.tags?.latest&&(i(h.tags.latest),d=d.filter(p=>p!==h.tags.latest)),n(d)}}).catch(()=>{})},[t]),ee.useEffect(()=>{t&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,c(a)):o&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=o,c(o)))},[t,a,o]),{versions:ee.useMemo(()=>e.filter(h=>h.includes(r)).slice(0,50),[e,r]),latestVersion:o,lastRunEvalVersion:l,search:r,setSearch:s,selectVersion:h=>{A(h),s("")}}},OGi=({snippetNames:t,onSelect:e,onCancel:n,isOpen:o})=>{const[i,r]=ee.useState(""),[s,a]=ee.useState("");if(!o)return null;const A=t.filter(u=>u.toLowerCase().includes(s.toLowerCase())),c=s&&!t.includes(s),l=u=>{u.key==="Enter"&&(A.length===1?r(A[0]):c&&r(s))};return K.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:K.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[K.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),K.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:u=>a(u.target.value),onKeyDown:l}),K.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[A.map(u=>K.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===u?"bg-blue-50":""}`,onClick:()=>r(u),children:u},u)),c&&K.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===s?"bg-blue-50":""}`,onClick:()=>r(s),children:['Create new "',s,'"']})]}),K.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[K.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:n,children:"Cancel"}),K.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>i&&e(i),disabled:!i,children:i===s?`Create "${i}"`:`Save to ${i}`})]})]})})},GGi=t=>{const e=ee.useRef(null),n=md(o=>o.recentEvents);ee.useEffect(()=>{if(n.length===0)return;const o=n[0];o.event_id!==e.current&&(t(o),e.current=o.event_id)},[n,t])};var YGi=Object.defineProperty,MS=(t,e)=>YGi(t,"name",{value:e,configurable:!0}),UGi="AlertDialog",[KGi,Pmr]=Nx(UGi,[Y0n]),DS=Y0n(),VGi=MS(t=>{const{__scopeAlertDialog:e,...n}=t,o=DS(e);return K.jsx(r_e,{...o,...n,modal:!0})},"AlertDialog");ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(iwi,{...r,...i,ref:n})},"AlertDialogTrigger"));var zGi=MS(t=>{const{__scopeAlertDialog:e,...n}=t,o=DS(e);return K.jsx(s_e,{...o,...n})},"AlertDialogPortal"),JGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(wZ,{...r,...i,ref:n})},"AlertDialogOverlay")),WGi="AlertDialogContent",[jGi,$Gi]=KGi(WGi),qGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,children:i,...r}=e,s=DS(o),a=ee.useRef(null),A=$A(n,a),c=ee.useRef(null);return K.jsx(jGi,{scope:o,cancelRef:c,children:K.jsx(MZ,{role:"alertdialog",...s,...r,ref:A,onOpenAutoFocus:ar(r.onOpenAutoFocus,l=>{l.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:i})})},"AlertDialogContent")),XGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(a_e,{...r,...i,ref:n})},"AlertDialogTitle")),ZGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(A_e,{...r,...i,ref:n})},"AlertDialogDescription")),eYi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(VWe,{...r,...i,ref:n})},"AlertDialogAction")),tYi="AlertDialogCancel",nYi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,{cancelRef:r}=$Gi(tYi,o),s=DS(o),a=$A(n,r);return K.jsx(VWe,{...s,...i,ref:a})},"AlertDialogCancel")),oYi=VGi,iYi=zGi,_pn=JGi,fpn=qGi,Ipn=eYi,Cpn=nYi,ypn=XGi,xpn=ZGi;const Epn=oYi,rYi=iYi,Bpn=ee.forwardRef(({className:t,...e},n)=>K.jsx(_pn,{className:Oi("rf-fixed rf-inset-0 rf-z-50 rf-bg-black/80 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0",t),...e,ref:n}));Bpn.displayName=_pn.displayName;const k$e=ee.forwardRef(({className:t,...e},n)=>K.jsxs(rYi,{children:[K.jsx(Bpn,{}),K.jsx(fpn,{ref:n,className:Oi("rf-fixed rf-left-[50%] rf-top-[50%] rf-z-50 rf-grid rf-w-full rf-max-w-lg rf-translate-x-[-50%] rf-translate-y-[-50%] rf-gap-4 rf-border rf-border-zinc-200 rf-bg-white rf-p-6 rf-shadow-lg rf-duration-200 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[state=closed]:rf-slide-out-to-left-1/2 data-[state=closed]:rf-slide-out-to-top-[48%] data-[state=open]:rf-slide-in-from-left-1/2 data-[state=open]:rf-slide-in-from-top-[48%] sm:rf-rounded-lg dark:rf-border-zinc-800 dark:rf-bg-zinc-950",t),...e})]}));k$e.displayName=fpn.displayName;const F$e=({className:t,...e})=>K.jsx("div",{className:Oi("rf-flex rf-flex-col rf-space-y-2 rf-text-center sm:rf-text-left",t),...e});F$e.displayName="AlertDialogHeader";const L$e=({className:t,...e})=>K.jsx("div",{className:Oi("rf-flex rf-flex-col-reverse sm:rf-flex-row sm:rf-justify-end sm:rf-space-x-2",t),...e});L$e.displayName="AlertDialogFooter";const H$e=ee.forwardRef(({className:t,...e},n)=>K.jsx(ypn,{ref:n,className:Oi("rf-text-lg rf-font-semibold",t),...e}));H$e.displayName=ypn.displayName;const O$e=ee.forwardRef(({className:t,...e},n)=>K.jsx(xpn,{ref:n,className:Oi("rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400",t),...e}));O$e.displayName=xpn.displayName;const sYi=ee.forwardRef(({className:t,...e},n)=>K.jsx(Ipn,{ref:n,className:Oi(gU(),t),...e}));sYi.displayName=Ipn.displayName;const G$e=ee.forwardRef(({className:t,...e},n)=>K.jsx(Cpn,{ref:n,className:Oi(gU({variant:"outline"}),"rf-mt-2 sm:rf-mt-0",t),...e}));G$e.displayName=Cpn.displayName;var aYi=Object.defineProperty,NS=(t,e)=>aYi(t,"name",{value:e,configurable:!0}),Y$e="Checkbox",[AYi,Mmr]=Nx(Y$e),[cYi,U$e]=AYi(Y$e);function bpn(t){const{__scopeCheckbox:e,checked:n,children:o,defaultChecked:i,disabled:r,form:s,name:a,onCheckedChange:A,required:c,value:l="on",internal_do_not_use_render:u}=t,[g,h]=DB({prop:n,defaultProp:i??!1,onChange:A,caller:Y$e}),[d,p]=ee.useState(null),[m,_]=ee.useState(null),f=ee.useRef(!1),[I,C]=ee.useReducer(E=>E+1,0),y=d?!!s||!!d.closest("form"):!0,x={checked:g,disabled:r,setChecked:h,control:d,setControl:p,name:a,form:s,value:l,hasConsumerStoppedPropagationRef:f,userInteractionCount:I,onUserInteraction:C,required:c,defaultChecked:RS(i)?!1:i,isFormControl:y,bubbleInput:m,setBubbleInput:_};return K.jsx(cYi,{scope:e,...x,children:Qpn(u)?u(x):o})}NS(bpn,"CheckboxProvider");var lYi="CheckboxTrigger",uYi=ee.forwardRef(NS(function({__scopeCheckbox:e,onKeyDown:n,onClick:o,...i},r){const{control:s,value:a,disabled:A,checked:c,required:l,setControl:u,setChecked:g,hasConsumerStoppedPropagationRef:h,onUserInteraction:d,isFormControl:p,bubbleInput:m}=U$e(lYi,e),_=$A(r,u),f=ee.useRef(c);return ee.useEffect(()=>{const I=s?.form;if(I){const C=NS(()=>g(f.current),"reset");return I.addEventListener("reset",C),()=>I.removeEventListener("reset",C)}},[s,g]),K.jsx(Na.button,{type:"button",role:"checkbox","aria-checked":RS(c)?"mixed":c,"aria-required":l,"data-state":K$e(c),"data-disabled":A?"":void 0,disabled:A,value:a,...i,ref:_,onKeyDown:ar(n,I=>{I.key==="Enter"&&I.preventDefault()}),onClick:ar(o,I=>{d(),g(C=>RS(C)?!0:!C),m&&p&&(h.current=I.isPropagationStopped(),h.current||I.stopPropagation())})})},"CheckboxTrigger")),Spn=ee.forwardRef(NS(function(e,n){const{__scopeCheckbox:o,name:i,checked:r,defaultChecked:s,required:a,disabled:A,value:c,onCheckedChange:l,form:u,...g}=e;return K.jsx(bpn,{__scopeCheckbox:o,checked:r,defaultChecked:s,disabled:A,required:a,onCheckedChange:l,name:i,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=>K.jsxs(K.Fragment,{children:[K.jsx(uYi,{...g,ref:n,__scopeCheckbox:o}),h&&K.jsx(pYi,{__scopeCheckbox:o})]})})},"Checkbox")),gYi="CheckboxIndicator",dYi=ee.forwardRef(NS(function(e,n){const{__scopeCheckbox:o,forceMount:i,...r}=e,s=U$e(gYi,o);return K.jsx(uE,{present:i||RS(s.checked)||s.checked===!0,children:K.jsx(Na.span,{"data-state":K$e(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:n,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),hYi="CheckboxBubbleInput",pYi=ee.forwardRef(NS(function({__scopeCheckbox:e,onClick:n,...o},i){const{control:r,hasConsumerStoppedPropagationRef:s,userInteractionCount:a,checked:A,defaultChecked:c,required:l,disabled:u,name:g,value:h,form:d,bubbleInput:p,setBubbleInput:m}=U$e(hYi,e),_=$A(i,m),f=SWe(r),I=ee.useRef(!1),C=ee.useRef(A),y=ee.useRef(a);ee.useEffect(()=>{const E=p;if(!E)return;const B=window.HTMLInputElement.prototype,Q=Object.getOwnPropertyDescriptor(B,"checked").set,w=a!==y.current;y.current=a;const M=C.current!==A;C.current=A;const k=!(w&&s.current);if(M&&Q){I.current=!w;const R=new Event("click",{bubbles:k});E.indeterminate=RS(A),Q.call(E,RS(A)?!1:A),E.dispatchEvent(R),I.current=!1}},[p,A,s,a]);const x=ee.useRef(RS(A)?!1:A);return K.jsx(Na.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:l,disabled:u,name:g,value:h,form:d,...o,tabIndex:-1,ref:_,onClick:ar(n,E=>{I.current&&E.stopPropagation()}),style:{...o.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function Qpn(t){return typeof t=="function"}NS(Qpn,"isFunction");function RS(t){return t==="indeterminate"}NS(RS,"isIndeterminate");function K$e(t){return RS(t)?"indeterminate":t?"checked":"unchecked"}NS(K$e,"getState");const Iee=ee.forwardRef(({className:t,...e},n)=>K.jsx(Spn,{ref:n,className:Oi("rf-peer rf-h-4 rf-w-4 rf-shrink-0 rf-rounded-sm rf-border rf-border-zinc-200 rf-border-zinc-900 rf-shadow focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 data-[state=checked]:rf-bg-zinc-900 data-[state=checked]:rf-text-zinc-50 dark:rf-border-zinc-800 dark:rf-border-zinc-50 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=checked]:rf-bg-zinc-50 dark:data-[state=checked]:rf-text-zinc-900",t),...e,children:K.jsx(dYi,{className:Oi("rf-flex rf-items-center rf-justify-center rf-text-current"),children:K.jsx(CS,{className:"rf-h-4 rf-w-4"})})}));Iee.displayName=Spn.displayName;const KT=r_e,mYi=s_e,vpn=ee.forwardRef(({className:t,...e},n)=>K.jsx(wZ,{className:Oi("rf-fixed rf-inset-0 rf-z-50 rf-bg-black/80 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0",t),...e,ref:n}));vpn.displayName=wZ.displayName;const VP=ee.forwardRef(({className:t,children:e,showOverlay:n=!0,...o},i)=>K.jsxs(mYi,{children:[K.jsx(vpn,{className:Oi(n?"":"rf-hidden")}),K.jsx(MZ,{ref:i,className:Oi("rf-fixed rf-left-[50%] rf-top-[50%] rf-z-50 rf-grid rf-w-full rf-max-w-lg rf-translate-x-[-50%] rf-translate-y-[-50%] rf-gap-4 rf-border rf-border-zinc-200 rf-bg-white rf-p-6 rf-shadow-lg rf-duration-200 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[state=closed]:rf-slide-out-to-left-1/2 data-[state=closed]:rf-slide-out-to-top-[48%] data-[state=open]:rf-slide-in-from-left-1/2 data-[state=open]:rf-slide-in-from-top-[48%] sm:rf-rounded-lg dark:rf-border-zinc-800 dark:rf-bg-zinc-950",t),...o,children:e})]}));VP.displayName=MZ.displayName;const zP=({className:t,...e})=>K.jsx("div",{className:Oi("rf-flex rf-flex-col rf-space-y-2 rf-text-center sm:rf-text-left",t),...e});zP.displayName="DialogHeader";const jU=({className:t,...e})=>K.jsx("div",{className:Oi("rf-flex rf-flex-col-reverse sm:rf-flex-row sm:rf-justify-end sm:rf-space-x-2",t),...e});jU.displayName="DialogFooter";const JP=ee.forwardRef(({className:t,...e},n)=>K.jsx(a_e,{ref:n,className:Oi("rf-text-lg rf-font-semibold",t),...e}));JP.displayName=a_e.displayName;const VT=ee.forwardRef(({className:t,...e},n)=>K.jsx(A_e,{ref:n,className:Oi("rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400",t),...e}));VT.displayName=A_e.displayName;const mfe={"tscircuit.com":{label:"tscircuit.com",placeholder:"Search tscircuit packages...",emptyMessage:"No packages found"},jlcpcb:{label:"JLCPCB Parts",placeholder:"Search JLCPCB parts (e.g. C14663)...",emptyMessage:"No parts found"},kicad:{label:"KiCad Footprints",placeholder:"Search KiCad footprints...",emptyMessage:"No footprints found"}},_Yi="https://cdn.jsdelivr.net/npm/easyeda@latest/dist/browser/index.js";let V$e=null;const z$e=async()=>(V$e||(V$e=import(_Yi)),V$e),fYi=t=>(e,n)=>{const o=new Headers(n?.headers),i={};return o.forEach((r,s)=>{i[s]=r}),fetch(`${t?.apiBase??QC}/proxy`,{...n,headers:{...i,"X-Target-Url":e.toString(),"X-Sender-Origin":i.origin??"","X-Sender-Host":i.host??"https://easyeda.com","X-Sender-Referer":i.referer??"","X-Sender-User-Agent":i["user-agent"]??"","X-Sender-Cookie":i.cookie??"",authority:i.authority??"","content-type":i["content-type"]??"",...t?.headers}})},IYi=async(t,e=10)=>{const n=encodeURIComponent(t),o=await fetch(`https://jlcsearch.tscircuit.com/api/search?limit=${e}&q=${n}`);if(!o.ok)throw new Error(`JLCPCB API error: ${o.status}`);return(await o.json()).components??[]},CYi=t=>({lcscId:t.lcsc,manufacturer:t.mfr,description:t.description,partNumber:`C${t.lcsc}`,package:t.package,price:t.price,stock:t.stock,isBasic:t.is_basic}),wpn=async(t,e)=>{const{fetchEasyEDAComponent:n}=await z$e();return n(t,{fetch:fYi(e),includeModelMetadata:e?.includeModelMetadata})},yYi=async(t,e)=>{const{convertRawEasyToTsx:n}=await z$e(),o=await wpn(t,e);return n({rawEasy:o})},xYi=async(t,e)=>{const{EasyEdaJsonSchema:n,convertEasyEdaJsonToCircuitJson:o}=await z$e(),i=await wpn(t,{...e,includeModelMetadata:!1}),r=n.parse(i);return o(r,{shouldRecenter:!0,showDesignator:!0,useModelCdn:!1})};function WP(t){return Array.isArray?Array.isArray(t):Mpn(t)==="[object Array]"}function EYi(t){if(typeof t=="string")return t;if(typeof t=="bigint")return t.toString();const e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function J$e(t){return t==null?"":EYi(t)}function TC(t){return typeof t=="string"}function _fe(t){return typeof t=="number"}function BYi(t){return t===!0||t===!1||bYi(t)&&Mpn(t)=="[object Boolean]"}function Ppn(t){return typeof t=="object"}function bYi(t){return Ppn(t)&&t!==null}function FE(t){return t!=null}function ffe(t){return!t.trim().length}function Mpn(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const SYi="Incorrect 'index' type",W$e="Invalid doc index: must be a non-negative integer within the bounds of the docs array",QYi=t=>`Invalid value for key ${t}`,vYi=t=>`Pattern length exceeds max of ${t}.`,wYi=t=>`Missing ${t} property in key`,PYi=t=>`Property 'weight' in key '${t}' must be a positive integer`,MYi="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",Dpn=Object.prototype.hasOwnProperty;var DYi=class{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(n=>{const o=Npn(n);this._keys.push(o),this._keyMap[o.id]=o,e+=o.weight}),this._keys.forEach(n=>{n.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Npn(t){let e=null,n=null,o=null,i=1,r=null;if(TC(t)||WP(t))o=t,e=Rpn(t),n=Ife(t);else{if(!Dpn.call(t,"name"))throw new Error(wYi("name"));const s=t.name;if(o=s,Dpn.call(t,"weight")&&t.weight!==void 0&&(i=t.weight,i<=0))throw new Error(PYi(Ife(s)));e=Rpn(s),n=Ife(s),r=t.getFn??null}return{path:e,id:n,weight:i,src:o,getFn:r}}function Rpn(t){return WP(t)?t:t.split(".")}function Ife(t){return WP(t)?t.join("."):t}function NYi(t,e){const n=[];let o=!1;const i=(r,s,a,A)=>{if(FE(r))if(!s[a])n.push(A!==void 0?{v:r,i:A}:r);else{const c=r[s[a]];if(!FE(c))return;if(a===s.length-1&&(TC(c)||_fe(c)||BYi(c)||typeof c=="bigint"))n.push(A!==void 0?{v:J$e(c),i:A}:J$e(c));else if(WP(c)){o=!0;for(let l=0,u=c.length;l<u;l+=1)i(c[l],s,a+1,l)}else s.length&&i(c,s,a+1,A)}};return i(t,TC(e)?e.split("."):e,0),o?n:n[0]}const wa=Object.freeze({...{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:NYi,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}});function RYi(t){return t>=9&&t<=13||t===32||t===160}function TYi(t=1,e=3){const n=new Map,o=Math.pow(10,e);return{get(i){let r=0,s=!1;for(let A=0;A<i.length;A++)RYi(i.charCodeAt(A))?s=!1:s||(r++,s=!0);if(r===0&&(r=1),n.has(r))return n.get(r);const a=Math.round(o/Math.pow(r,.5*t))/o;return n.set(r,a),a},clear(){n.clear()}}}var j$e=class{constructor({getFn:t=wa.getFn,fieldNormWeight:e=wa.fieldNormWeight}={}){this.norm=TYi(e,3),this.getFn=t,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((e,n)=>{this._keysMap[e.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const t=this.docs.length;this.records=new Array(t);let e=0;if(TC(this.docs[0]))for(let n=0;n<t;n++){const o=this._createStringRecord(this.docs[n],n);o&&(this.records[e++]=o)}else for(let n=0;n<t;n++)this.records[e++]=this._createObjectRecord(this.docs[n],n);this.records.length=e,this.norm.clear()}add(t,e){if(!Number.isInteger(e)||e<0)throw new Error(W$e);if(TC(t)){const o=this._createStringRecord(t,e);return o&&this.records.push(o),o}const n=this._createObjectRecord(t,e);return this.records.push(n),n}removeAt(t){if(!Number.isInteger(t)||t<0)throw new Error(W$e);for(let e=0,n=this.records.length;e<n;e+=1)if(this.records[e].i===t){this.records.splice(e,1);break}for(let e=0,n=this.records.length;e<n;e+=1)this.records[e].i>t&&(this.records[e].i-=1)}removeAll(t){const e=new Set;for(const o of t)Number.isInteger(o)&&o>=0&&e.add(o);if(e.size===0)return;this.records=this.records.filter(o=>!e.has(o.i));const n=Array.from(e).sort((o,i)=>o-i);for(const o of this.records){let i=0,r=n.length;for(;i<r;){const s=i+r>>>1;n[s]<o.i?i=s+1:r=s}o.i-=i}}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_createStringRecord(t,e){return!FE(t)||ffe(t)?null:{v:t,i:e,n:this.norm.get(t)}}_createObjectRecord(t,e){const n={i:e,$:{}};for(let o=0,i=this.keys.length;o<i;o++){const r=this.keys[o],s=r.getFn?r.getFn(t):this.getFn(t,r.path);if(FE(s)){if(WP(s)){const a=[];for(let A=0,c=s.length;A<c;A+=1){const l=s[A];if(FE(l)){if(TC(l)){if(!ffe(l)){const u={v:l,i:A,n:this.norm.get(l)};a.push(u)}}else if(FE(l.v)){const u=TC(l.v)?l.v:J$e(l.v);if(!ffe(u)){const g={v:u,i:l.i,n:this.norm.get(u)};a.push(g)}}}}n.$[o]=a}else if(TC(s)&&!ffe(s)){const a={v:s,n:this.norm.get(s)};n.$[o]=a}}}return n}toJSON(){return{keys:this.keys.map(({getFn:t,...e})=>e),records:this.records}}};function Tpn(t,e,{getFn:n=wa.getFn,fieldNormWeight:o=wa.fieldNormWeight}={}){const i=new j$e({getFn:n,fieldNormWeight:o});return i.setKeys(t.map(Npn)),i.setSources(e),i.create(),i}function kYi(t,{getFn:e=wa.getFn,fieldNormWeight:n=wa.fieldNormWeight}={}){const{keys:o,records:i}=t,r=new j$e({getFn:e,fieldNormWeight:n});return r.setKeys(o),r.setIndexRecords(i),r}function FYi(t=[],e=wa.minMatchCharLength){const n=[];let o=-1,i=-1,r=0;for(let s=t.length;r<s;r+=1){const a=t[r];a&&o===-1?o=r:!a&&o!==-1&&(i=r-1,i-o+1>=e&&n.push([o,i]),o=-1)}return t[r-1]&&r-o>=e&&n.push([o,r-1]),n}function LYi(t,e,n,{location:o=wa.location,distance:i=wa.distance,threshold:r=wa.threshold,findAllMatches:s=wa.findAllMatches,minMatchCharLength:a=wa.minMatchCharLength,includeMatches:A=wa.includeMatches,ignoreLocation:c=wa.ignoreLocation}={}){if(e.length>32)throw new Error(vYi(32));const l=e.length,u=t.length,g=Math.max(0,Math.min(o,u));let h=r,d=g;const p=(S,Q)=>{const w=S/l;if(c)return w;const M=Math.abs(g-Q);return i?w+M/i:M?1:w},m=a>1||A,_=m?Array(u):[];let f;for(;(f=t.indexOf(e,d))>-1;){const S=p(0,f);if(h=Math.min(S,h),d=f+l,m){let Q=0;for(;Q<l;)_[f+Q]=1,Q+=1}}d=-1;let I=[],C=1,y=0,x=l+u;const E=1<<l-1;for(let S=0;S<l;S+=1){let Q=0,w=x;for(;Q<w;)p(S,g+w)<=h?Q=w:x=w,w=Math.floor((x-Q)/2+Q);x=w;let M=Math.max(1,g-w+1);const k=s?u:Math.min(g+w,u)+l,R=Array(k+2);R[k+1]=(1<<S)-1;for(let F=k;F>=M;F-=1){const O=F-1,U=n[t[O]];if(R[F]=(R[F+1]<<1|1)&U,S&&(R[F]|=(I[F+1]|I[F])<<1|1|I[F+1]),R[F]&E&&(C=p(S,O),C<=h)){if(h=C,d=O,y=S,d<=g)break;M=Math.max(1,2*g-d)}}if(p(S+1,g)>h)break;I=R}if(m&&d>=0){const S=Math.min(u-1,d+l-1+y);for(let Q=d;Q<=S;Q+=1)n[t[Q]]&&(_[Q]=1)}const B={isMatch:d>=0,score:Math.max(.001,C)};if(m){const S=FYi(_,a);S.length?A&&(B.indices=S):B.isMatch=!1}return B}function HYi(t){const e={};for(let n=0,o=t.length;n<o;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<o-n-1}return e}function $$e(t){if(t.length<=1)return t;t.sort((n,o)=>n[0]-o[0]||n[1]-o[1]);const e=[t[0]];for(let n=1,o=t.length;n<o;n+=1){const i=e[e.length-1],r=t[n];r[0]<=i[1]+1?i[1]=Math.max(i[1],r[1]):e.push(r)}return e}const kpn={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},OYi=new RegExp("["+Object.keys(kpn).join("")+"]","g"),Cee=typeof String.prototype.normalize=="function"?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(OYi,e=>kpn[e]):t=>t;var q$e=class{constructor(t,{location:e=wa.location,threshold:n=wa.threshold,distance:o=wa.distance,includeMatches:i=wa.includeMatches,findAllMatches:r=wa.findAllMatches,minMatchCharLength:s=wa.minMatchCharLength,isCaseSensitive:a=wa.isCaseSensitive,ignoreDiacritics:A=wa.ignoreDiacritics,ignoreLocation:c=wa.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:o,includeMatches:i,findAllMatches:r,minMatchCharLength:s,isCaseSensitive:a,ignoreDiacritics:A,ignoreLocation:c},t=a?t:t.toLowerCase(),t=A?Cee(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const l=(g,h)=>{this.chunks.push({pattern:g,alphabet:HYi(g),startIndex:h})},u=this.pattern.length;if(u>32){let g=0;const h=u%32,d=u-h;for(;g<d;)l(this.pattern.substr(g,32),g),g+=32;if(h){const p=u-32;l(this.pattern.substr(p),p)}}else l(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:n,includeMatches:o}=this.options;if(t=e?t:t.toLowerCase(),t=n?Cee(t):t,this.pattern===t){if(t.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const d={isMatch:!0,score:0};return o&&(d.indices=[[0,t.length-1]]),d}const{location:i,distance:r,threshold:s,findAllMatches:a,minMatchCharLength:A,ignoreLocation:c}=this.options,l=[];let u=0,g=!1;this.chunks.forEach(({pattern:d,alphabet:p,startIndex:m})=>{const{isMatch:_,score:f,indices:I}=LYi(t,d,p,{location:i+m,distance:r,threshold:s,findAllMatches:a,minMatchCharLength:A,includeMatches:o,ignoreLocation:c});_&&(g=!0),u+=f,_&&I&&l.push(...I)});const h={isMatch:g,score:g?u/this.chunks.length:1};return g&&o&&(h.indices=$$e(l)),h}};const GYi=new Set(["fuzzy","include"]);function YYi(t){return t.startsWith("inverse")}const X$e=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:t=>({type:"exact",search(e){const n=e===t;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:t=>({type:"include",search(e){let n=0,o;const i=[],r=t.length;for(;(o=e.indexOf(t,n))>-1;)n=o+r,i.push([o,n-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:t=>({type:"prefix-exact",search(e){const n=e.startsWith(t);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:t=>({type:"inverse-prefix-exact",search(e){const n=!e.startsWith(t);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:t=>({type:"inverse-suffix-exact",search(e){const n=!e.endsWith(t);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:t=>({type:"suffix-exact",search(e){const n=e.endsWith(t);return{isMatch:n,score:n?0:1,indices:[e.length-t.length,e.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:t=>({type:"inverse-exact",search(e){const n=e.indexOf(t)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(t,e={})=>{const n=new q$e(t,{location:e.location??wa.location,threshold:e.threshold??wa.threshold,distance:e.distance??wa.distance,includeMatches:e.includeMatches??wa.includeMatches,findAllMatches:e.findAllMatches??wa.findAllMatches,minMatchCharLength:e.minMatchCharLength??wa.minMatchCharLength,isCaseSensitive:e.isCaseSensitive??wa.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics??wa.ignoreDiacritics,ignoreLocation:e.ignoreLocation??wa.ignoreLocation});return{type:"fuzzy",search(o){return n.searchIn(o)}}}}],Fpn=X$e.length,UYi="\0",KYi="|";function VYi(t){const e=[],n=t.length;let o=0;for(;o<n;){for(;o<n&&t[o]===" ";)o++;if(o>=n)break;let i=o;for(;i<n&&t[i]!==" "&&t[i]!=='"';)i++;if(i<n&&t[i]==='"'){for(i++;i<n;){if(t[i]==='"'){const r=i+1;if(r>=n||t[r]===" "){i++;break}if(t[r]==="$"&&(r+1>=n||t[r+1]===" ")){i+=2;break}}i++}e.push(t.substring(o,i)),o=i}else{for(;i<n&&t[i]!==" ";)i++;e.push(t.substring(o,i)),o=i}}return e}function Lpn(t,e){const n=t.match(e);return n?n[1]:null}function zYi(t,e={}){return t.replace(/\\\|/g,UYi).split(KYi).map(n=>{const o=VYi(n.replace(/\u0000/g,"|").trim()).filter(r=>r&&!!r.trim()),i=[];for(let r=0,s=o.length;r<s;r+=1){const a=o[r];let A=!1,c=-1;for(;!A&&++c<Fpn;){const l=X$e[c],u=Lpn(a,l.multiRegex);u&&(i.push(l.create(u,e)),A=!0)}if(!A)for(c=-1;++c<Fpn;){const l=X$e[c],u=Lpn(a,l.singleRegex);if(u){i.push(l.create(u,e));break}}}return i})}var JYi=class{constructor(t,{isCaseSensitive:e=wa.isCaseSensitive,ignoreDiacritics:n=wa.ignoreDiacritics,includeMatches:o=wa.includeMatches,minMatchCharLength:i=wa.minMatchCharLength,ignoreLocation:r=wa.ignoreLocation,findAllMatches:s=wa.findAllMatches,location:a=wa.location,threshold:A=wa.threshold,distance:c=wa.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:n,includeMatches:o,minMatchCharLength:i,findAllMatches:s,ignoreLocation:r,location:a,threshold:A,distance:c},t=e?t:t.toLowerCase(),t=n?Cee(t):t,this.pattern=t,this.query=zYi(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:o,ignoreDiacritics:i}=this.options;t=o?t:t.toLowerCase(),t=i?Cee(t):t;let r=0;const s=[];let a=0,A=!1;for(let c=0,l=e.length;c<l;c+=1){const u=e[c];s.length=0,r=0,A=!1;for(let g=0,h=u.length;g<h;g+=1){const d=u[g],{isMatch:p,indices:m,score:_}=d.search(t);if(p)r+=1,a+=_,YYi(d.type)&&(A=!0),n&&(GYi.has(d.type)?s.push(...m):s.push(m));else{a=0,r=0,s.length=0,A=!1;break}}if(r){const g={isMatch:!0,score:a/r};return A&&(g.hasInverse=!0),n&&(g.indices=$$e(s)),g}}return{isMatch:!1,score:1}}};const Z$e=[];function eqe(...t){Z$e.push(...t)}function Cfe(t,e){for(let n=0,o=Z$e.length;n<o;n+=1){const i=Z$e[n];if(i.condition(t,e))return new i(t,e)}return new q$e(t,e)}const yfe={AND:"$and",OR:"$or"},tqe={PATH:"$path",PATTERN:"$val"},nqe=t=>!!(t[yfe.AND]||t[yfe.OR]),WYi=t=>!!t[tqe.PATH],jYi=t=>!WP(t)&&Ppn(t)&&!nqe(t),Hpn=t=>({[yfe.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Opn(t,e,{auto:n=!0}={}){const o=i=>{if(TC(i)){const A={keyId:null,pattern:i};return n&&(A.searcher=Cfe(i,e)),A}const r=Object.keys(i),s=WYi(i);if(!s&&r.length>1&&!nqe(i))return o(Hpn(i));if(jYi(i)){const A=s?i[tqe.PATH]:r[0],c=s?i[tqe.PATTERN]:i[A];if(!TC(c))throw new Error(QYi(A));const l={keyId:Ife(A),pattern:c};return n&&(l.searcher=Cfe(c,e)),l}const a={children:[],operator:r[0]};return r.forEach(A=>{const c=i[A];WP(c)&&c.forEach(l=>{a.children.push(o(l))})}),a};return nqe(t)||(t=Hpn(t)),o(t)}function oqe(t,{ignoreFieldNorm:e=wa.ignoreFieldNorm}){let n=1;return t.forEach(({key:o,norm:i,score:r})=>{const s=o?o.weight:null;n*=Math.pow(r===0&&s?Number.EPSILON:r,(s||1)*(e?1:i))}),n}function $Yi(t,{ignoreFieldNorm:e=wa.ignoreFieldNorm}){t.forEach(n=>{n.score=oqe(n.matches,{ignoreFieldNorm:e})})}var qYi=class{constructor(t,e){this.limit=t,this.heap=[],this.comparator=e}get size(){return this.heap.length}insert(t){this.size<this.limit?(this.heap.push(t),this._bubbleUp(this.size-1)):this.comparator(t,this.heap[0])<0&&(this.heap[0]=t,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(t){const e=this.heap;for(;t>0;){const n=t-1>>1;if(this.comparator(e[t],e[n])<=0)break;const o=e[t];e[t]=e[n],e[n]=o,t=n}}_sinkDown(t){const e=this.heap,n=e.length;let o=t;do{t=o;const i=2*t+1,r=2*t+2;if(i<n&&this.comparator(e[i],e[o])>0&&(o=i),r<n&&this.comparator(e[r],e[o])>0&&(o=r),o!==t){const s=e[t];e[t]=e[o],e[o]=s}}while(o!==t)}};function XYi(t){const e=[];return t.matches.forEach(n=>{if(!FE(n.indices)||!n.indices.length)return;const o={indices:n.indices,value:n.value};n.key&&(o.key=n.key.id),n.idx>-1&&(o.refIndex=n.idx),e.push(o)}),e}function ZYi(t,e,{includeMatches:n=wa.includeMatches,includeScore:o=wa.includeScore}={}){return t.map(i=>{const{idx:r}=i,s={item:e[r],refIndex:r};return n&&(s.matches=XYi(i)),o&&(s.score=i.score),s})}const eUi=/[\p{L}\p{M}\p{N}_]+/gu,Gpn=new WeakSet;function tUi(t){Gpn.has(t)||(Gpn.add(t),console.warn(`[Fuse] tokenize regex ${t} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function nUi(t){if(typeof t=="function"){let e=!1;return n=>{const o=t(n);if(!e&&(e=!0,!Array.isArray(o)||o.some(i=>typeof i!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(o)?"array containing non-strings":typeof o}.`);return o}}return t instanceof RegExp?(t.global||tUi(t),e=>e.match(t)||[]):e=>e.match(eUi)||[]}function iqe({isCaseSensitive:t=!1,ignoreDiacritics:e=!1,tokenize:n}={}){const o=nUi(n);return{tokenize(i){return t||(i=i.toLowerCase()),e&&(i=Cee(i)),o(i)}}}var oUi=class{static condition(t,e){return e.useTokenSearch}constructor(t,e){this.options=e,this.analyzer=iqe({isCaseSensitive:e.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics,tokenize:e.tokenize});const n=this.analyzer.tokenize(t),{df:o,fieldCount:i}=e._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of n){this.termSearchers.push(new q$e(r,{location:e.location,threshold:e.threshold,distance:e.distance,includeMatches:e.includeMatches,findAllMatches:e.findAllMatches,minMatchCharLength:e.minMatchCharLength,isCaseSensitive:e.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics,ignoreLocation:!0}));const s=o.get(r)||0,a=Math.log(1+(i-s+.5)/(s+.5));this.idfWeights.push(a)}this.combineAll=e.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(t){if(!this.termSearchers.length)return{isMatch:!1,score:1};const e=[];let n=0,o=0,i=0,r=0;const s=this.combineAll&&!this.useMask?new Set:null;for(let c=0;c<this.termSearchers.length;c++){const l=this.termSearchers[c].searchIn(t),u=this.idfWeights[c];o+=u,l.isMatch&&(i++,n+=u*(1-l.score),l.indices&&e.push(...l.indices),this.combineAll&&(this.useMask?r|=1<<c:s.add(c)))}if(i===0)return{isMatch:!1,score:1};const a=o>0?1-n/o:0,A={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&e.length&&(A.indices=$$e(e)),this.combineAll&&(this.useMask?A.matchedMask=r:A.matchedTerms=s,A.termCount=this.numTerms),A}};function rqe(t,e,n,o){const i=o.tokenize(e);if(!i.length)return;t.fieldCount++,t.docFieldCount.set(n,(t.docFieldCount.get(n)||0)+1);const r=new Set(i);let s=t.docTermFieldHits.get(n);s||(s=new Map,t.docTermFieldHits.set(n,s));for(const a of r)s.set(a,(s.get(a)||0)+1),t.df.set(a,(t.df.get(a)||0)+1)}function Ypn(t,e,n,o){const{i,v:r,$:s}=e;if(r!==void 0){rqe(t,r,i,o);return}if(s)for(let a=0;a<n;a++){const A=s[a];if(A)if(Array.isArray(A))for(const c of A)rqe(t,c.v,i,o);else rqe(t,A.v,i,o)}}function iUi(t,e,n){const o={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of t)Ypn(o,i,e,n);return o}function rUi(t,e,n,o){Ypn(t,e,n,o)}function sUi(t,e){const n=t.docFieldCount.get(e);if(n===void 0)return;t.fieldCount-=n,t.docFieldCount.delete(e);const o=t.docTermFieldHits.get(e);if(o){for(const[i,r]of o){const s=(t.df.get(i)||0)-r;s<=0?t.df.delete(i):t.df.set(i,s)}t.docTermFieldHits.delete(e)}}function Upn(t,e){if(e.length===0)return;const n=Array.from(new Set(e)).sort((a,A)=>a-A);for(const a of n)sUi(t,a);const o=a=>{let A=0,c=n.length;for(;A<c;){const l=A+c>>>1;n[l]<a?A=l+1:c=l}return a-A},i=n[0],r=new Map;for(const[a,A]of t.docFieldCount)r.set(a>i?o(a):a,A);t.docFieldCount=r;const s=new Map;for(const[a,A]of t.docTermFieldHits)s.set(a>i?o(a):a,A);t.docTermFieldHits=s}var jP=class{constructor(t,e,n){this.options={...wa,...e},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new DYi(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const e=Cfe(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=e,e}setCollection(t,e){if(this._docs=t,e&&!(e instanceof j$e))throw new Error(SYi);if(this._myIndex=e||Tpn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=iqe({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=iUi(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(t){if(!FE(t))return;this._docs.push(t);const e=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex&&e){const n=iqe({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});rUi(this._invertedIndex,e,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(t=()=>!1){const e=[],n=[];for(let o=0,i=this._docs.length;o<i;o+=1)t(this._docs[o],o)&&(e.push(this._docs[o]),n.push(o));if(n.length){this._invertedIndex&&Upn(this._invertedIndex,n);const o=new Set(n);this._docs=this._docs.filter((i,r)=>!o.has(r)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return e}removeAt(t){if(!Number.isInteger(t)||t<0||t>=this._docs.length)throw new Error(W$e);this._invertedIndex&&Upn(this._invertedIndex,[t]);const e=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),e}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(t=>this._keyStore.get(t.id)||t)}search(t,e){const{limit:n=-1}=e||{},{includeMatches:o,includeScore:i,shouldSort:r,sortFn:s,ignoreFieldNorm:a}=this.options;if(TC(t)&&!t.trim()){let g=this._docs.map((h,d)=>({item:h,refIndex:d}));return _fe(n)&&n>-1&&(g=g.slice(0,n)),g}const A=r&&_fe(n)&&n>0&&TC(t),c=s,l=(g,h)=>c(g,h)||g.idx-h.idx;let u;if(A){const g=new qYi(n,l);TC(this._docs[0])?this._searchStringList(t,{heap:g,ignoreFieldNorm:a}):this._searchObjectList(t,{heap:g,ignoreFieldNorm:a}),u=g.extractSorted()}else u=TC(t)?TC(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),$Yi(u,{ignoreFieldNorm:a}),r&&u.sort(TC(t)?l:c),_fe(n)&&n>-1&&(u=u.slice(0,n));return ZYi(u,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(t,{heap:e,ignoreFieldNorm:n}={}){const o=this._getSearcher(t),i=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:r}=this._myIndex,s=e?null:[];return r.forEach(({v:a,i:A,n:c})=>{if(!FE(a))return;const l=o.searchIn(a);if(l.isMatch){const u={score:l.score,value:a,norm:c,indices:l.indices};i&&(u.matchedMask=l.matchedMask,u.matchedTerms=l.matchedTerms,u.termCount=l.termCount);const g=[u];if(!i||this._coversAllTokens(g)){const h={item:a,idx:A,matches:g};e?(h.score=oqe(h.matches,{ignoreFieldNorm:n}),e.insert(h)):s.push(h)}}}),s}_searchLogical(t){const e=Opn(t,this.options),n=this._normalizedKeys(),o=(a,A,c)=>{if(!("children"in a)){const{keyId:h,searcher:d}=a;let p;return h===null?(p=[],n.forEach((m,_)=>{p.push(...this._findMatches({key:m,value:A[_],searcher:d}))})):p=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(A,h),searcher:d}),p&&p.length?[{idx:c,item:A,matches:p}]:[]}const{children:l,operator:u}=a,g=[];for(let h=0,d=l.length;h<d;h+=1){const p=l[h],m=o(p,A,c);if(m.length)g.push(...m);else if(u===yfe.AND)return[]}return g},i=this._myIndex.records,r=new Map,s=[];return i.forEach(({$:a,i:A})=>{if(FE(a)){const c=o(e,a,A);c.length&&(r.has(A)||(r.set(A,{idx:A,item:a,matches:[]}),s.push(r.get(A))),c.forEach(({matches:l})=>{r.get(A).matches.push(...l)}))}}),s}_searchObjectList(t,{heap:e,ignoreFieldNorm:n}={}){const o=this._getSearcher(t),i=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:r}=this._myIndex,s=this._normalizedKeys(),a=e?null:[];return r.forEach(({$:A,i:c})=>{if(!FE(A))return;const l=[];let u=!1,g=!1;if(s.forEach((h,d)=>{const p=this._findMatches({key:h,value:A[d],searcher:o});p.length?(l.push(...p),p[0].hasInverse&&(g=!0)):u=!0}),!(g&&u)&&l.length&&(!i||this._coversAllTokens(l))){const h={idx:c,item:A,matches:l};e?(h.score=oqe(h.matches,{ignoreFieldNorm:n}),e.insert(h)):a.push(h)}}),a}_findMatches({key:t,value:e,searcher:n}){if(!FE(e))return[];const o=[];if(WP(e))e.forEach(({v:i,i:r,n:s})=>{if(!FE(i))return;const a=n.searchIn(i);if(a.isMatch){const A={score:a.score,key:t,value:i,idx:r,norm:s,indices:a.indices,hasInverse:a.hasInverse};a.termCount!==void 0&&(A.matchedMask=a.matchedMask,A.matchedTerms=a.matchedTerms,A.termCount=a.termCount),o.push(A)}});else{const{v:i,n:r}=e,s=n.searchIn(i);if(s.isMatch){const a={score:s.score,key:t,value:i,norm:r,indices:s.indices,hasInverse:s.hasInverse};s.termCount!==void 0&&(a.matchedMask=s.matchedMask,a.matchedTerms=s.matchedTerms,a.termCount=s.termCount),o.push(a)}}return o}_coversAllTokens(t){const e=t.length?t[0].termCount:void 0;if(e===void 0)return!0;if(e<=31){let o=0;for(let i=0;i<t.length;i++)o|=t[i].matchedMask||0;return o===2**e-1}const n=new Set;for(let o=0;o<t.length;o++){const i=t[o].matchedTerms;if(i)for(const r of i)n.add(r)}return n.size===e}};jP.version="7.5.0",jP.createIndex=Tpn,jP.parseIndex=kYi,jP.config=wa,jP.match=function(t,e,n){if(n&&n.useTokenSearch)throw new Error(MYi);return Cfe(t,{...wa,...n}).searchIn(e)},jP.parseQuery=Opn,eqe(JYi),eqe(oUi),jP.use=function(...t){t.forEach(e=>eqe(e))};var aUi=jP;const AUi="https://kicad-mod-cache.tscircuit.com";let sqe=null,yee=null,aqe=null;const cUi=async()=>sqe||yee||(yee=fetch("https://kicad-mod-cache.tscircuit.com/kicad_files.json").then(t=>t.json()).then(t=>(sqe=t,yee=null,t)),yee),lUi=async(t,e=20)=>{const n=await cUi();return aqe||(aqe=new aUi(n)),aqe.search(t).slice(0,e).map(o=>o.item)},uUi=t=>{const e=t.replace(".pretty/","/").replace(".kicad_mod",""),n=`kicad:${e}`;return{path:t,qualifiedName:n,description:e}},gUi=t=>t.replace(/^\/+/,"").split("/").map(e=>encodeURIComponent(e)).join("/"),dUi=async t=>{const e=await fetch(`${AUi}/${gUi(t)}`);if(!e.ok)throw new Error(`KiCad footprint fetch failed: ${e.status}`);const n=await e.text(),{KicadFootprintToCircuitJsonConverter:o}=await DE("kicad-to-circuit-json"),i=new o;return i.addFile(t.split("/").pop()??"selected-footprint.kicad_mod",n),i.runUntilFinished(),i.getOutput()},Kpn=t=>t?.source==="jlcpcb"||t?.source==="kicad",hUi=async(t,e)=>{if(t.source==="jlcpcb")return xYi(t.component.partNumber,e?.jlcpcb);if(t.source==="kicad")return dUi(t.footprint.path);throw new Error("Footprint preview is not available for this source")},pUi=({query:t,placeholder:e,isSearching:n,onQueryChange:o,onSubmit:i})=>{const r=ee.useCallback(s=>{s.key==="Enter"&&(s.preventDefault(),i())},[i]);return K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-mt-4",children:[K.jsxs("div",{className:"rf-relative rf-flex-grow",children:[K.jsx(iWe,{className:"rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground"}),K.jsx(yje,{placeholder:e,className:"rf-pl-8",spellCheck:!1,autoComplete:"off",value:t,onChange:s=>o(s.target.value),onKeyDown:r})]}),K.jsx(fA,{onClick:i,disabled:n||t.trim().length<1,className:"sm:rf-px-4 rf-px-3",children:n?K.jsx(SE,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):K.jsxs(K.Fragment,{children:[K.jsx(iWe,{className:"rf-h-4 rf-w-4 sm:rf-hidden"}),K.jsx("span",{className:"rf-hidden sm:rf-inline",children:"Search"})]})})]})},mUi=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),_Ui=t=>mUi.format(t),Vpn=t=>{switch(t.source){case"tscircuit.com":{const e=t.package;return`tscircuit-${e.package_id??`${e.org_owner_tscircuit_handle??"unknown"}-${e.unscoped_name??e.name??"package"}`}`}case"jlcpcb":return`jlc-${t.component.lcscId}`;case"kicad":return`kicad-${t.footprint.path}`;default:return"unknown"}},fUi=t=>{switch(t.source){case"tscircuit.com":return t.package.unscoped_name;case"jlcpcb":return t.component.isDirectLookup?t.component.partNumber:t.component.manufacturer;case"kicad":return t.footprint.qualifiedName}},IUi=t=>{switch(t.source){case"tscircuit.com":return t.package.description||(t.package.org_owner_tscircuit_handle?`Component by ${t.package.org_owner_tscircuit_handle}`:void 0);case"jlcpcb":return t.component.description;case"kicad":return t.footprint.description}},CUi=t=>{switch(t.source){case"tscircuit.com":return t.package.name;case"jlcpcb":return t.component.isDirectLookup?void 0:t.component.partNumber;case"kicad":return}},yUi=({results:t,selected:e,onSelect:n,onShowDetails:o})=>{const i=e?Vpn(e):null;return K.jsx("div",{className:"rf-divide-y rf-w-full rf-overflow-hidden",children:t.map(r=>{const s=Vpn(r),a=i===s,A=fUi(r),c=IUi(r),l=CUi(r),u=r.source==="jlcpcb"?r.component.stock:null,g=r.source==="jlcpcb"?r.component.price:null,h=r.source==="jlcpcb"?r.component.isBasic:null,d=r.source==="jlcpcb"?r.component.isDirectLookup:!1;return K.jsxs("div",{className:`rf-p-3 rf-flex rf-flex-col sm:rf-grid sm:rf-grid-cols-[minmax(0,1fr)_auto] rf-items-start sm:rf-items-center rf-cursor-pointer hover:rf-bg-zinc-100 rf-gap-2 rf-overflow-hidden ${a?"rf-bg-zinc-100":""}`,onClick:()=>n(r),children:[K.jsxs("div",{className:"rf-min-w-0 rf-overflow-hidden rf-w-full",children:[K.jsxs("div",{className:"rf-flex rf-items-start rf-gap-2 rf-min-w-0",children:[K.jsxs("div",{className:"rf-font-medium rf-text-sm rf-truncate rf-flex-1 rf-min-w-0 rf-flex rf-items-center rf-gap-1.5",children:[A,r.source==="jlcpcb"&&h!=null&&K.jsx("span",{className:`rf-text-xs rf-px-1.5 rf-py-0.5 rf-rounded rf-font-medium rf-flex-shrink-0 ${h?"rf-bg-green-100 rf-text-green-700":"rf-bg-orange-100 rf-text-orange-700"}`,children:h?"Basic":"Extended"}),d&&K.jsx("span",{className:"rf-text-xs rf-px-1.5 rf-py-0.5 rf-rounded rf-font-medium rf-flex-shrink-0 rf-bg-blue-100 rf-text-blue-700",children:"Direct lookup"}),r.source==="tscircuit.com"&&r.package.is_private&&K.jsx(ybi,{className:"rf-ml-1 rf-h-3 rf-w-3 rf-text-zinc-400 rf-flex-shrink-0"})]}),r.source==="jlcpcb"&&u!=null?K.jsxs("div",{className:"rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0 sm:rf-hidden",children:[u.toLocaleString()," in stock"]}):null]}),K.jsxs("div",{className:"rf-text-xs rf-text-zinc-500 rf-truncate rf-w-full",children:[l?K.jsx("span",{className:"rf-mr-2",children:l}):null,c]})]}),K.jsxs("div",{children:[r.source==="tscircuit.com"&&o?K.jsx("div",{className:"rf-flex-shrink-0 rf-w-full sm:rf-w-auto",children:K.jsx(fA,{variant:"outline",size:"sm",className:"rf-text-xs rf-w-full sm:rf-w-auto",onClick:p=>{p.stopPropagation(),o(r)},children:"See Details"})}):r.source==="jlcpcb"&&u!=null?K.jsxs("div",{className:"rf-hidden sm:rf-block rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0",children:[u.toLocaleString()," in stock"]}):null,g!=null&&K.jsx("div",{className:"rf-hidden sm:rf-block rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0 rf-text-right",children:_Ui(g)})]})]},s)})})},xUi=({circuitJson:t,error:e,isLoading:n,height:o})=>K.jsx("section",{className:"rf-flex rf-min-w-0 rf-items-center rf-justify-center",style:{height:o},children:n?K.jsxs("div",{className:"rf-flex rf-w-full rf-items-center rf-justify-center rf-gap-2 rf-bg-zinc-950 rf-text-sm rf-text-zinc-300",style:{height:o},children:[K.jsx(SE,{className:"rf-h-4 rf-w-4 rf-animate-spin"}),"Loading preview..."]}):e?K.jsx("div",{className:"rf-flex rf-w-full rf-items-center rf-justify-center rf-bg-zinc-950 rf-p-4",style:{height:o},children:K.jsxs("div",{className:"rf-flex rf-max-w-[320px] rf-items-start rf-gap-2 rf-text-sm rf-text-zinc-300",children:[K.jsx(oWe,{className:"rf-mt-0.5 rf-h-4 rf-w-4 rf-flex-shrink-0"}),K.jsx("span",{children:e})]})}):t?K.jsx("div",{className:"rf-w-full rf-min-w-0 rf-overflow-hidden",children:K.jsx(S$e,{circuitJson:t,height:o,allowEditing:!1,clickToInteractEnabled:!1,focusOnHover:!1,disablePcbGroups:!0})}):K.jsx("div",{className:"rf-flex rf-w-full rf-items-center rf-justify-center rf-bg-zinc-950 rf-text-sm rf-text-zinc-300",style:{height:o},children:"No preview"})}),zpn={importComponentDialog:101,importComponentDetailsDialog:102},EUi=({packageResult:t,isOpen:e,onOpenChange:n,isLoading:o,details:i,previewTab:r,onPreviewTabChange:s,isSubmitting:a,onImport:A})=>{const c=t?.package??null,l=c?.latest_pcb_preview_image_url,u=c?.latest_sch_preview_image_url,g=c?.latest_cad_preview_image_url,h=c?.unscoped_name?.split("/").pop()??c?.unscoped_name,d=c?.org_owner_tscircuit_handle??void 0,p=d?`https://tscircuit.com/${d}`:void 0,m=d&&h?`https://tscircuit.com/${d}/${h}`:void 0;return K.jsx(KT,{open:e,onOpenChange:n,children:K.jsxs(VP,{showOverlay:!1,style:{width:"calc(100vw - 2rem)",zIndex:zpn.importComponentDetailsDialog},className:"rf-max-w-5xl no-scrollbar !rf-overflow-y-auto rf-max-h-[90vh] rf-overflow-hidden rf-flex rf-flex-col rf-rounded-sm",children:[K.jsx(zP,{className:"rf-pb-4 rf-border-b",children:K.jsx("div",{className:"rf-flex rf-items-start rf-justify-between rf-gap-4",children:K.jsxs("div",{className:"rf-flex-1 rf-min-w-0",children:[K.jsx(JP,{className:"rf-text-xl rf-font-semibold rf-truncate",children:h}),K.jsx(VT,{children:c?.description})]})})}),K.jsxs("div",{className:"rf-flex-1 rf-overflow-y-auto rf-py-4 rf-space-y-6",children:[d?K.jsxs("div",{children:[K.jsx("span",{className:"rf-text-xs rf-font-medium rf-text-gray-500 rf-uppercase rf-tracking-wide",children:"Created by"}),K.jsx("div",{className:"rf-mt-1 rf-text-sm rf-font-medium",children:p?K.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"rf-text-black hover:rf-underline",children:d}):d})]}):null,(g||l||u)&&K.jsx(K.Fragment,{children:K.jsxs("div",{children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Preview"}),K.jsxs(dRe,{value:r,onValueChange:_=>s(_),children:[K.jsxs(Jge,{className:"rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",children:[l&&K.jsx(p6,{value:"pcb",children:"PCB"}),u&&K.jsx(p6,{value:"schematic",children:"Schematic"}),g&&K.jsx(p6,{value:"3d",children:"3D"})]}),K.jsxs("div",{className:"rf-mt-4",children:[K.jsx(cI,{value:"pcb",className:"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",children:l?K.jsx("img",{src:l,alt:`${h??"package"} PCB preview`,className:"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4"}):null}),K.jsx(cI,{value:"schematic",className:"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",children:u?K.jsx("img",{src:u,alt:`${h??"package"} schematic preview`,className:"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4"}):null}),K.jsx(cI,{value:"3d",className:"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",children:g?K.jsx("img",{src:g,alt:`${h??"package"} 3D preview`,className:"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4"}):null})]})]})]})}),i?.ai_description?K.jsxs("section",{children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-3",children:"AI Description"}),K.jsx("div",{className:"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4",children:K.jsx("p",{className:"rf-text-sm rf-text-gray-700 rf-leading-relaxed",children:i.ai_description})})]}):null,i?.ai_usage_instructions?K.jsxs("section",{children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-3",children:"Usage Instructions"}),K.jsx("div",{className:"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4",children:K.jsx("p",{className:"rf-text-sm rf-text-gray-700 rf-leading-relaxed rf-whitespace-pre-wrap",children:i.ai_usage_instructions})})]}):null,o?K.jsxs("div",{className:"rf-flex rf-justify-center rf-items-center rf-gap-2 rf-text-gray-500",children:[K.jsx(SE,{className:"rf-h-4 rf-w-4 rf-animate-spin"}),K.jsx("span",{className:"rf-text-sm",children:"Loading package details..."})]}):null]}),K.jsxs(jU,{className:"rf-pt-4 rf-border-t rf-flex rf-flex-col sm:rf-flex-row rf-justify-between rf-gap-2",children:[K.jsx("div",{className:"rf-flex-1",children:m?K.jsxs(fA,{variant:"outline",size:"sm",className:"rf-gap-2 rf-w-full sm:rf-w-auto",onClick:()=>window.open(m,"_blank"),children:[K.jsx(hbi,{className:"rf-h-4 rf-w-4"}),"View on tscircuit.com"]}):null}),K.jsxs("div",{className:"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2",children:[K.jsx(fA,{variant:"outline",onClick:()=>n(!1),className:"rf-order-2 sm:rf-order-1",children:"Close"}),K.jsx(fA,{onClick:A,disabled:a,className:"rf-bg-blue-600 hover:rf-bg-blue-700",children:a?K.jsx(SE,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):"Import Component"})]})]})]})})},BUi=()=>{const[t,e]=ee.useState(null),[n,o]=ee.useState(!1),i=ee.useCallback(async(s,a)=>{o(!0);try{const A=await fetch(`https://api.tscircuit.com/packages/get?name=${encodeURIComponent(`${s}/${a}`)}`);if(!A.ok)throw new Error(`Failed to load package details: ${A.status}`);const c=await A.json();e(c.package??null)}catch(A){console.error("Failed to fetch package details",A),e(null)}finally{o(!1)}},[]),r=ee.useCallback(()=>{e(null),o(!1)},[]);return{details:t,isLoading:n,fetchDetails:i,reset:r}},bUi=(t,e)=>{const[n,o]=ee.useState({circuitJson:null,error:null,isLoading:!1});return ee.useEffect(()=>{if(!t||!Kpn(t)){o({circuitJson:null,error:null,isLoading:!1});return}let i=!1;return o({circuitJson:null,error:null,isLoading:!0}),hUi(t,e).then(r=>{i||o({circuitJson:r,error:null,isLoading:!1})}).catch(r=>{i||o({circuitJson:null,error:r instanceof Error?r.message:"Failed to load footprint preview",isLoading:!1})}),()=>{i=!0}},[t,e]),n},SUi=async(t,e)=>{const n={"Content-Type":"application/json"};e&&(n.Authorization=`Bearer ${e}`);const o=await fetch("https://registry-api.tscircuit.com/packages/search",{method:"POST",headers:n,body:JSON.stringify({query:t})});if(!o.ok)throw new Error(`tscircuit registry error: ${o.status}`);return(await o.json()).packages??[]},QUi=({sessionToken:t})=>{const[e,n]=ee.useState([]),[o,i]=ee.useState(!1),[r,s]=ee.useState(null),[a,A]=ee.useState(!1),c=ee.useCallback(async u=>{const g=u.trim();if(!g)return[];i(!0),s(null);try{const d=(await SUi(g,t)).map(p=>({source:"tscircuit.com",package:p}));return n(d),d}catch(h){return console.error("Error searching tscircuit packages",h),n([]),s(h instanceof Error?h.message:"Failed to search tscircuit packages"),[]}finally{i(!1),A(!0)}},[t]),l=ee.useCallback(()=>{n([]),i(!1),s(null),A(!1)},[]);return{results:e,isSearching:o,error:r,hasSearched:a,search:c,reset:l}},vUi=t=>{const e=/^C(\d+)$/i.exec(t.trim());if(!e)return null;const n=Number(e[1]);if(!Number.isSafeInteger(n))return null;const o=`C${e[1]}`;return{source:"jlcpcb",component:{lcscId:n,manufacturer:o,partNumber:o,description:"Import directly from EasyEDA; stock and availability are unknown",package:"",isDirectLookup:!0}}},Jpn=(t,e)=>{const n=vUi(t);return n?e.some(i=>i.component.partNumber.toUpperCase()===n.component.partNumber)?e:[n,...e]:e},wUi=t=>{const e=t.trim();return/^C\d+/i.test(e)?e.replace(/^C/i,""):e},PUi=()=>{const[t,e]=ee.useState([]),[n,o]=ee.useState(!1),[i,r]=ee.useState(null),[s,a]=ee.useState(!1),A=ee.useCallback(async l=>{const u=wUi(l);if(!u)return[];o(!0),r(null);try{const g=await IYi(u,10),h=Jpn(l,g.map(d=>({source:"jlcpcb",component:CYi(d)})));return e(h),h}catch(g){console.error("Error searching JLCPCB components",g);const h=Jpn(l,[]);return e(h),r(h.length>0?null:g instanceof Error?g.message:"Failed to search JLCPCB components"),h}finally{o(!1),a(!0)}},[]),c=ee.useCallback(()=>{e([]),o(!1),r(null),a(!1)},[]);return{results:t,isSearching:n,error:i,hasSearched:s,search:A,reset:c}},MUi=()=>{const[t,e]=ee.useState([]),[n,o]=ee.useState(!1),[i,r]=ee.useState(null),[s,a]=ee.useState(!1),A=ee.useCallback(async l=>{const u=l.trim();if(!u)return[];o(!0),r(null);try{const h=(await lUi(u,20)).map(d=>({source:"kicad",footprint:uUi(d)}));return e(h),h}catch(g){return console.error("Error searching KiCad footprints",g),e([]),r(g instanceof Error?g.message:"Failed to search KiCad footprints"),[]}finally{o(!1),a(!0)}},[]),c=ee.useCallback(()=>{e([]),o(!1),r(null),a(!1)},[]);return{results:t,isSearching:n,error:i,hasSearched:s,search:A,reset:c}},DUi=({onTscircuitPackageSelected:t,onJlcpcbComponentTsxLoaded:e,onKicadStringSelected:n})=>{const o=[];return t&&o.push("tscircuit.com"),e&&o.push("jlcpcb"),n&&o.push("kicad"),o},NUi=({isOpen:t,onClose:e,jlcpcbProxyRequestHeaders:n,onKicadStringSelected:o,onTscircuitPackageSelected:i,onJlcpcbComponentTsxLoaded:r,jlcpcbProxyApiBase:s,tscircuitSessionToken:a})=>{mee();const A=ee.useMemo(()=>DUi({onKicadStringSelected:o,onTscircuitPackageSelected:i,onJlcpcbComponentTsxLoaded:r}),[o,i,r]),c=A.length>0,l=A.length===1,[u,g]=ee.useState(A[0]??"tscircuit.com"),[h,d]=ee.useState(""),[p,m]=ee.useState(null),{results:_,isSearching:f,error:I,hasSearched:C,search:y,reset:x}=QUi({sessionToken:a}),{results:E,isSearching:B,error:S,hasSearched:Q,search:w,reset:M}=PUi(),{results:k,isSearching:R,error:F,hasSearched:O,search:U,reset:Y}=MUi(),{details:W,isLoading:te,fetchDetails:j,reset:J}=BUi(),[oe,ie]=ee.useState(null),[ne,le]=ee.useState(!1),[ge,_e]=ee.useState("pcb"),[ue,fe]=ee.useState(null),[pe,ye]=ee.useState(!1),Me=ee.useMemo(()=>({jlcpcb:{headers:n,apiBase:s}}),[s,n]),{circuitJson:ve,error:he,isLoading:Qe}=bUi(p,Me),Pe=Kpn(p);ee.useEffect(()=>{fe(null)},[p]);const we=ee.useCallback(()=>{x(),M(),Y(),m(null)},[M,Y,x]);ee.useEffect(()=>{t||(we(),d(""),le(!1),ie(null),fe(null))},[t,we]),ee.useEffect(()=>{d(""),m(null),u==="tscircuit.com"?x():u==="jlcpcb"?M():u==="kicad"&&Y()},[u,M,Y,x]);const Te=nt=>{m(nt),ie(nt),_e("pcb"),le(!0),J();const gt=nt.package.org_owner_tscircuit_handle,bt=nt.package.unscoped_name;if(gt&&bt){const Ct=bt.split("/").pop()??bt;j(gt,Ct)}},Re=async()=>{h.trim()&&(m(null),u==="tscircuit.com"?await y(h):u==="jlcpcb"?await w(h):u==="kicad"&&await U(h))},Ee=async nt=>{try{if(fe(null),ye(!0),nt.source==="kicad"){if(!o)throw new Error("KiCad handler not provided");await o({result:nt,footprint:nt.footprint.qualifiedName})}else if(nt.source==="jlcpcb"){if(!r)throw new Error("JLCPCB handler not provided");const gt=await yYi(nt.component.partNumber,{headers:n,apiBase:s});await r({result:nt,tsx:gt})}else if(nt.source==="tscircuit.com"){if(!i)throw new Error("tscircuit package handler not provided");const gt=nt.package.org_owner_tscircuit_handle,bt=nt.package.unscoped_name;if(!gt||!bt)throw new Error("Missing package metadata");const Ct=bt.split("/").pop()??bt,Dt=`@tsci/${gt}.${Ct}`;await i({result:nt,fullPackageName:Dt})}return!0}catch(gt){return console.error("Failed to import component",gt),fe(gt instanceof Error?gt.message:"Failed to import component"),!1}finally{ye(!1)}};let ke=[],Ce=!1,Le=null,Ye=!1;u==="tscircuit.com"?(ke=_,Ce=f,Le=I,Ye=C):u==="jlcpcb"?(ke=E,Ce=B,Le=S,Ye=Q):u==="kicad"&&(ke=k,Ce=R,Le=F,Ye=O);const tt=async()=>{if(!p)return;await Ee(p)&&(e(),we(),d(""))},At=nt=>{nt||e()},at=nt=>{le(nt),nt||ie(null)};return K.jsxs(KT,{open:t,onOpenChange:At,children:[K.jsxs(VP,{style:{width:"calc(100vw - 2rem)",maxWidth:Pe?"min(1120px, calc(100vw - 2rem))":"min(672px, calc(100vw - 2rem))",zIndex:zpn.importComponentDialog},className:"rf-rounded-sm rf-max-h-[90vh] rf-overflow-y-auto rf-overflow-x-hidden rf-flex rf-flex-col",children:[K.jsxs(zP,{children:[K.jsxs(JP,{className:"rf-text-lg sm:rf-text-xl",children:["Import ",l?mfe[u].label:""," ","Component"]}),K.jsx(VT,{className:"rf-text-sm",children:c?"Search for components from available sources.":"Import options are disabled because no handlers were provided."})]}),c?K.jsxs(dRe,{value:u,onValueChange:nt=>g(nt),className:"rf-min-w-0 rf-w-full",children:[!l&&K.jsx(Jge,{className:"rf-flex rf-w-full rf-gap-2",children:A.map(nt=>K.jsx(p6,{value:nt,className:"rf-flex-1 rf-text-xs sm:rf-text-sm",children:mfe[nt].label},nt))}),K.jsxs("div",{className:"rf-min-w-0",style:Pe?{display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(360px, 0.95fr)",gap:"1.5rem",alignItems:"start"}:void 0,children:[K.jsxs("div",{className:"rf-min-w-0",children:[K.jsx(pUi,{query:h,placeholder:mfe[u].placeholder,isSearching:Ce,onQueryChange:d,onSubmit:Re}),K.jsx("div",{className:"no-scrollbar rf-mt-4 rf-flex-1 rf-min-h-[200px] !rf-max-h-[40vh] !rf-overflow-y-auto rf-overflow-x-hidden rf-border rf-rounded-md rf-min-w-0",children:Ce?K.jsxs("div",{className:"rf-p-8 rf-text-center rf-text-zinc-500",children:[K.jsx(SE,{className:"rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2"}),K.jsx("p",{children:"Searching..."})]}):ke.length>0?K.jsx(yUi,{results:ke,selected:p,onSelect:m,onShowDetails:u==="tscircuit.com"?Te:void 0}):K.jsx("div",{className:"rf-p-8 rf-text-center rf-text-zinc-500",children:Le?`Error: ${Le}`:Ye?mfe[u].emptyMessage:"Enter a search term to find components"})})]}),Pe?K.jsx("div",{className:"rf-mt-4",children:K.jsx(xUi,{circuitJson:ve,error:he,isLoading:Qe,height:325})}):null]})]}):null,ue?K.jsx("div",{className:"rf-text-sm rf-text-red-600 rf-mt-2",children:ue}):null,K.jsxs(jU,{className:"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2",children:[K.jsx(fA,{variant:"outline",onClick:e,className:"rf-order-2 sm:rf-order-1",children:"Cancel"}),K.jsx(fA,{onClick:tt,disabled:!p||pe,className:"rf-order-1 sm:rf-order-2",children:pe?K.jsx(SE,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):"Import"})]})]}),K.jsx(EUi,{packageResult:oe,isOpen:ne,onOpenChange:at,isLoading:te,details:W,previewTab:ge,onPreviewTabChange:nt=>_e(nt),isSubmitting:pe,onImport:()=>{oe&&Ee(oe).then(nt=>{nt&&(le(!1),e(),we(),d(""))})}})]})},RUi=t=>{const e=t.match(/export const (\w+) =/);if(!e)throw new Error("Could not determine component name from TSX contents");return e[1]},Wpn=t=>{const e=md(s=>s.pushEvent),n=md(s=>s.upsertFile),o=async({result:s,fullPackageName:a})=>{const c=s.package.unscoped_name??s.package.name;await ua.promise(e({event_type:"INSTALL_PACKAGE",full_package_name:a}),{loading:`Requesting install for "${c}"`,success:`Install requested for "${c}"`,error:l=>`Failed to request install: ${l instanceof Error?l.message:String(l)}`})},i=async({footprint:s})=>{await ua.promise(navigator.clipboard.writeText(s),{loading:`Copying "${s}"`,success:`Copied "${s}" to clipboard`,error:a=>`Failed to copy footprint: ${a instanceof Error?a.message:String(a)}`})},r=async({result:s,tsx:a})=>{const c=`imports/${RUi(a)}.tsx`;await ua.promise(n(c,a),{loading:`Importing ${s.component.partNumber}`,success:`Imported to "${c}"`,error:l=>`Failed to import component: ${l instanceof Error?l.message:String(l)}`})};return K.jsx(NUi,{...t,onTscircuitPackageSelected:o,onKicadStringSelected:i,onJlcpcbComponentTsxLoaded:r})};Wpn.displayName="ImportComponentDialogForCli";const TUi=async({circuitJson:t,projectName:e})=>{const{convertCircuitJsonToAltiumZip:n}=await Promise.resolve().then(()=>Adr),o=await n(t,e);return new Blob([new Uint8Array(o)],{type:"application/zip"})},kUi=async({circuitJson:t,projectName:e})=>{await ua.promise((async()=>{const n=await TUi({circuitJson:t,projectName:e});kE(n,{fileName:`${e}_altium_project.zip`})})(),{loading:"Generating Altium project...",success:"Altium project ZIP ready",error:n=>`Failed to generate Altium project: ${n instanceof Error?n.message:String(n)}`})};var Aqe={exports:{}},jpn;function FUi(){return jpn||(jpn=1,(function(t,e){var n={env:{},version:""};(function(o){t.exports=o()})(function(){return(function o(i,r,s){function a(l,u){if(!r[l]){if(!i[l]){var g=typeof U8=="function"&&U8;if(!u&&g)return g(l,!0);if(A)return A(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var d=r[l]={exports:{}};i[l][0].call(d.exports,function(p){var m=i[l][1][p];return a(m||p)},d,d.exports,o,i,r,s)}return r[l].exports}for(var A=typeof U8=="function"&&U8,c=0;c<s.length;c++)a(s[c]);return a})({1:[function(o,i,r){var s=o("./utils"),a=o("./support"),A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(c){for(var l,u,g,h,d,p,m,_=[],f=0,I=c.length,C=I,y=s.getTypeOf(c)!=="string";f<c.length;)C=I-f,g=y?(l=c[f++],u=f<I?c[f++]:0,f<I?c[f++]:0):(l=c.charCodeAt(f++),u=f<I?c.charCodeAt(f++):0,f<I?c.charCodeAt(f++):0),h=l>>2,d=(3&l)<<4|u>>4,p=1<C?(15&u)<<2|g>>6:64,m=2<C?63&g:64,_.push(A.charAt(h)+A.charAt(d)+A.charAt(p)+A.charAt(m));return _.join("")},r.decode=function(c){var l,u,g,h,d,p,m=0,_=0,f="data:";if(c.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var I,C=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===A.charAt(64)&&C--,c.charAt(c.length-2)===A.charAt(64)&&C--,C%1!=0)throw new Error("Invalid base64 input, bad content length.");for(I=a.uint8array?new Uint8Array(0|C):new Array(0|C);m<c.length;)l=A.indexOf(c.charAt(m++))<<2|(h=A.indexOf(c.charAt(m++)))>>4,u=(15&h)<<4|(d=A.indexOf(c.charAt(m++)))>>2,g=(3&d)<<6|(p=A.indexOf(c.charAt(m++))),I[_++]=l,d!==64&&(I[_++]=u),p!==64&&(I[_++]=g);return I}},{"./support":30,"./utils":32}],2:[function(o,i,r){var s=o("./external"),a=o("./stream/DataWorker"),A=o("./stream/Crc32Probe"),c=o("./stream/DataLengthProbe");function l(u,g,h,d,p){this.compressedSize=u,this.uncompressedSize=g,this.crc32=h,this.compression=d,this.compressedContent=p}l.prototype={getContentWorker:function(){var u=new a(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),g=this;return u.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new a(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(u,g,h){return u.pipe(new A).pipe(new c("uncompressedSize")).pipe(g.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",g)},i.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,i,r){var s=o("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},r.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,i,r){var s=o("./utils"),a=(function(){for(var A,c=[],l=0;l<256;l++){A=l;for(var u=0;u<8;u++)A=1&A?3988292384^A>>>1:A>>>1;c[l]=A}return c})();i.exports=function(A,c){return A!==void 0&&A.length?s.getTypeOf(A)!=="string"?(function(l,u,g,h){var d=a,p=h+g;l^=-1;for(var m=h;m<p;m++)l=l>>>8^d[255&(l^u[m])];return-1^l})(0|c,A,A.length,0):(function(l,u,g,h){var d=a,p=h+g;l^=-1;for(var m=h;m<p;m++)l=l>>>8^d[255&(l^u.charCodeAt(m))];return-1^l})(0|c,A,A.length,0):0}},{"./utils":32}],5:[function(o,i,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(o,i,r){var s=null;s=typeof Promise<"u"?Promise:o("lie"),i.exports={Promise:s}},{lie:37}],7:[function(o,i,r){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=o("pako"),A=o("./utils"),c=o("./stream/GenericWorker"),l=s?"uint8array":"array";function u(g,h){c.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=h,this.meta={}}r.magic="\b\0",A.inherits(u,c),u.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(A.transformTo(l,g.data),!1)},u.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(h){g.push({data:h,meta:g.meta})}},r.compressWorker=function(g){return new u("Deflate",g)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,i,r){function s(d,p){var m,_="";for(m=0;m<p;m++)_+=String.fromCharCode(255&d),d>>>=8;return _}function a(d,p,m,_,f,I){var C,y,x=d.file,E=d.compression,B=I!==l.utf8encode,S=A.transformTo("string",I(x.name)),Q=A.transformTo("string",l.utf8encode(x.name)),w=x.comment,M=A.transformTo("string",I(w)),k=A.transformTo("string",l.utf8encode(w)),R=Q.length!==x.name.length,F=k.length!==w.length,O="",U="",Y="",W=x.dir,te=x.date,j={crc32:0,compressedSize:0,uncompressedSize:0};p&&!m||(j.crc32=d.crc32,j.compressedSize=d.compressedSize,j.uncompressedSize=d.uncompressedSize);var J=0;p&&(J|=8),B||!R&&!F||(J|=2048);var oe=0,ie=0;W&&(oe|=16),f==="UNIX"?(ie=798,oe|=(function(le,ge){var _e=le;return le||(_e=ge?16893:33204),(65535&_e)<<16})(x.unixPermissions,W)):(ie=20,oe|=(function(le){return 63&(le||0)})(x.dosPermissions)),C=te.getUTCHours(),C<<=6,C|=te.getUTCMinutes(),C<<=5,C|=te.getUTCSeconds()/2,y=te.getUTCFullYear()-1980,y<<=4,y|=te.getUTCMonth()+1,y<<=5,y|=te.getUTCDate(),R&&(U=s(1,1)+s(u(S),4)+Q,O+="up"+s(U.length,2)+U),F&&(Y=s(1,1)+s(u(M),4)+k,O+="uc"+s(Y.length,2)+Y);var ne="";return ne+=`
\0`,ne+=s(J,2),ne+=E.magic,ne+=s(C,2),ne+=s(y,2),ne+=s(j.crc32,4),ne+=s(j.compressedSize,4),ne+=s(j.uncompressedSize,4),ne+=s(S.length,2),ne+=s(O.length,2),{fileRecord:g.LOCAL_FILE_HEADER+ne+S+O,dirRecord:g.CENTRAL_FILE_HEADER+s(ie,2)+ne+s(M.length,2)+"\0\0\0\0"+s(oe,4)+s(_,4)+S+O+M}}var A=o("../utils"),c=o("../stream/GenericWorker"),l=o("../utf8"),u=o("../crc32"),g=o("../signature");function h(d,p,m,_){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=m,this.encodeFileName=_,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}A.inherits(h,c),h.prototype.push=function(d){var p=d.meta.percent||0,m=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,c.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:m?(p+100*(m-_-1))/m:100}}))},h.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var p=this.streamFiles&&!d.file.dir;if(p){var m=a(d,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(d){this.accumulate=!1;var p=this.streamFiles&&!d.file.dir,m=a(d,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),p)this.push({data:(function(_){return g.DATA_DESCRIPTOR+s(_.crc32,4)+s(_.compressedSize,4)+s(_.uncompressedSize,4)})(d),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var d=this.bytesWritten,p=0;p<this.dirRecords.length;p++)this.push({data:this.dirRecords[p],meta:{percent:100}});var m=this.bytesWritten-d,_=(function(f,I,C,y,x){var E=A.transformTo("string",x(y));return g.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(f,2)+s(f,2)+s(I,4)+s(C,4)+s(E.length,2)+E})(this.dirRecords.length,m,d,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(d){this._sources.push(d);var p=this;return d.on("data",function(m){p.processChunk(m)}),d.on("end",function(){p.closedSource(p.previous.streamInfo),p._sources.length?p.prepareNextSource():p.end()}),d.on("error",function(m){p.error(m)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(d){var p=this._sources;if(!c.prototype.error.call(this,d))return!1;for(var m=0;m<p.length;m++)try{p[m].error(d)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var d=this._sources,p=0;p<d.length;p++)d[p].lock()},i.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,i,r){var s=o("../compressions"),a=o("./ZipFileWorker");r.generateWorker=function(A,c,l){var u=new a(c.streamFiles,l,c.platform,c.encodeFileName),g=0;try{A.forEach(function(h,d){g++;var p=(function(I,C){var y=I||C,x=s[y];if(!x)throw new Error(y+" is not a valid compression method !");return x})(d.options.compression,c.compression),m=d.options.compressionOptions||c.compressionOptions||{},_=d.dir,f=d.date;d._compressWorker(p,m).withStreamInfo("file",{name:h,dir:_,date:f,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(u)}),u.entriesCount=g}catch(h){u.error(h)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,i,r){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var a=new s;for(var A in this)typeof this[A]!="function"&&(a[A]=this[A]);return a}}(s.prototype=o("./object")).loadAsync=o("./load"),s.support=o("./support"),s.defaults=o("./defaults"),s.version="3.10.2",s.loadAsync=function(a,A){return new s().loadAsync(a,A)},s.external=o("./external"),i.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,i,r){var s=o("./utils"),a=o("./external"),A=o("./utf8"),c=o("./zipEntries"),l=o("./stream/Crc32Probe"),u=o("./nodejsUtils");function g(h){return new a.Promise(function(d,p){var m=h.decompressed.getContentWorker().pipe(new l);m.on("error",function(_){p(_)}).on("end",function(){m.streamInfo.crc32!==h.decompressed.crc32?p(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}i.exports=function(h,d){var p=this;return d=s.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:A.utf8decode}),u.isNode&&u.isStream(h)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",h,!0,d.optimizedBinaryString,d.base64).then(function(m){var _=new c(d);return _.load(m),_}).then(function(m){var _=[a.Promise.resolve(m)],f=m.files;if(d.checkCRC32)for(var I=0;I<f.length;I++)_.push(g(f[I]));return a.Promise.all(_)}).then(function(m){for(var _=m.shift(),f=_.files,I=0;I<f.length;I++){var C=f[I],y=C.fileNameStr,x=s.resolve(C.fileNameStr);p.file(x,C.decompressed,{binary:!0,optimizedBinaryString:!0,date:C.date,dir:C.dir,comment:C.fileCommentStr.length?C.fileCommentStr:null,unixPermissions:C.unixPermissions,dosPermissions:C.dosPermissions,createFolders:d.createFolders}),C.dir||(p.file(x).unsafeOriginalName=y)}return _.zipComment.length&&(p.comment=_.zipComment),p})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,i,r){var s=o("../utils"),a=o("../stream/GenericWorker");function A(c,l){a.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(l)}s.inherits(A,a),A.prototype._bindStream=function(c){var l=this;(this._stream=c).pause(),c.on("data",function(u){l.push({data:u,meta:{percent:0}})}).on("error",function(u){l.isPaused?this.generatedError=u:l.error(u)}).on("end",function(){l.isPaused?l._upstreamEnded=!0:l.end()})},A.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},A.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},i.exports=A},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,i,r){var s=o("readable-stream").Readable;function a(A,c,l){s.call(this,c),this._helper=A;var u=this;A.on("data",function(g,h){u.push(g)||u._helper.pause(),l&&l(h)}).on("error",function(g){u.emit("error",g)}).on("end",function(){u.push(null)})}o("../utils").inherits(a,s),a.prototype._read=function(){this._helper.resume()},i.exports=a},{"../utils":32,"readable-stream":16}],14:[function(o,i,r){i.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,a);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,a)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var a=new Buffer(s);return a.fill(0),a},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(o,i,r){function s(x,E,B){var S,Q=A.getTypeOf(E),w=A.extend(B||{},u);w.date=w.date||new Date,w.compression!==null&&(w.compression=w.compression.toUpperCase()),typeof w.unixPermissions=="string"&&(w.unixPermissions=parseInt(w.unixPermissions,8)),w.unixPermissions&&16384&w.unixPermissions&&(w.dir=!0),w.dosPermissions&&16&w.dosPermissions&&(w.dir=!0),w.dir&&(x=f(x)),w.createFolders&&(S=_(x))&&I.call(this,S,!0);var M=Q==="string"&&w.binary===!1&&w.base64===!1;B&&B.binary!==void 0||(w.binary=!M),(E instanceof g&&E.uncompressedSize===0||w.dir||!E||E.length===0)&&(w.base64=!1,w.binary=!0,E="",w.compression="STORE",Q="string");var k=null;k=E instanceof g||E instanceof c?E:p.isNode&&p.isStream(E)?new m(x,E):A.prepareContent(x,E,w.binary,w.optimizedBinaryString,w.base64);var R=new h(x,k,w);this.files[x]=R}var a=o("./utf8"),A=o("./utils"),c=o("./stream/GenericWorker"),l=o("./stream/StreamHelper"),u=o("./defaults"),g=o("./compressedObject"),h=o("./zipObject"),d=o("./generate"),p=o("./nodejsUtils"),m=o("./nodejs/NodejsStreamInputAdapter"),_=function(x){x.slice(-1)==="/"&&(x=x.substring(0,x.length-1));var E=x.lastIndexOf("/");return 0<E?x.substring(0,E):""},f=function(x){return x.slice(-1)!=="/"&&(x+="/"),x},I=function(x,E){return E=E!==void 0?E:u.createFolders,x=f(x),this.files[x]||s.call(this,x,null,{dir:!0,createFolders:E}),this.files[x]};function C(x){return Object.prototype.toString.call(x)==="[object RegExp]"}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(x){var E,B,S;for(E in this.files)S=this.files[E],(B=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&x(B,S)},filter:function(x){var E=[];return this.forEach(function(B,S){x(B,S)&&E.push(S)}),E},file:function(x,E,B){if(arguments.length!==1)return x=this.root+x,s.call(this,x,E,B),this;if(C(x)){var S=x;return this.filter(function(w,M){return!M.dir&&S.test(w)})}var Q=this.files[this.root+x];return Q&&!Q.dir?Q:null},folder:function(x){if(!x)return this;if(C(x))return this.filter(function(Q,w){return w.dir&&x.test(Q)});var E=this.root+x,B=I.call(this,E),S=this.clone();return S.root=B.name,S},remove:function(x){x=this.root+x;var E=this.files[x];if(E||(x.slice(-1)!=="/"&&(x+="/"),E=this.files[x]),E&&!E.dir)delete this.files[x];else for(var B=this.filter(function(Q,w){return w.name.slice(0,x.length)===x}),S=0;S<B.length;S++)delete this.files[B[S].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(x){var E,B={};try{if((B=A.extend(x||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=B.type.toLowerCase(),B.compression=B.compression.toUpperCase(),B.type==="binarystring"&&(B.type="string"),!B.type)throw new Error("No output type specified.");A.checkSupport(B.type),B.platform!=="darwin"&&B.platform!=="freebsd"&&B.platform!=="linux"&&B.platform!=="sunos"||(B.platform="UNIX"),B.platform==="win32"&&(B.platform="DOS");var S=B.comment||this.comment||"";E=d.generateWorker(this,B,S)}catch(Q){(E=new c("error")).error(Q)}return new l(E,B.type||"string",B.mimeType)},generateAsync:function(x,E){return this.generateInternalStream(x).accumulate(E)},generateNodeStream:function(x,E){return(x=x||{}).type||(x.type="nodebuffer"),this.generateInternalStream(x).toNodejsStream(E)}};i.exports=y},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(o,i,r){i.exports=o("stream")},{stream:void 0}],17:[function(o,i,r){var s=o("./DataReader");function a(A){s.call(this,A);for(var c=0;c<this.data.length;c++)A[c]=255&A[c]}o("../utils").inherits(a,s),a.prototype.byteAt=function(A){return this.data[this.zero+A]},a.prototype.lastIndexOfSignature=function(A){for(var c=A.charCodeAt(0),l=A.charCodeAt(1),u=A.charCodeAt(2),g=A.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===c&&this.data[h+1]===l&&this.data[h+2]===u&&this.data[h+3]===g)return h-this.zero;return-1},a.prototype.readAndCheckSignature=function(A){var c=A.charCodeAt(0),l=A.charCodeAt(1),u=A.charCodeAt(2),g=A.charCodeAt(3),h=this.readData(4);return c===h[0]&&l===h[1]&&u===h[2]&&g===h[3]},a.prototype.readData=function(A){if(this.checkOffset(A),A===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{"../utils":32,"./DataReader":18}],18:[function(o,i,r){var s=o("../utils");function a(A){this.data=A,this.length=A.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(A){this.checkIndex(this.index+A)},checkIndex:function(A){if(this.length<this.zero+A||A<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+A+"). Corrupted zip ?")},setIndex:function(A){this.checkIndex(A),this.index=A},skip:function(A){this.setIndex(this.index+A)},byteAt:function(){},readInt:function(A){var c,l=0;for(this.checkOffset(A),c=this.index+A-1;c>=this.index;c--)l=(l<<8)+this.byteAt(c);return this.index+=A,l},readString:function(A){return s.transformTo("string",this.readData(A))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var A=this.readInt(4);return new Date(Date.UTC(1980+(A>>25&127),(A>>21&15)-1,A>>16&31,A>>11&31,A>>5&63,(31&A)<<1))}},i.exports=a},{"../utils":32}],19:[function(o,i,r){var s=o("./Uint8ArrayReader");function a(A){s.call(this,A)}o("../utils").inherits(a,s),a.prototype.readData=function(A){this.checkOffset(A);var c=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,i,r){var s=o("./DataReader");function a(A){s.call(this,A)}o("../utils").inherits(a,s),a.prototype.byteAt=function(A){return this.data.charCodeAt(this.zero+A)},a.prototype.lastIndexOfSignature=function(A){return this.data.lastIndexOf(A)-this.zero},a.prototype.readAndCheckSignature=function(A){return A===this.readData(4)},a.prototype.readData=function(A){this.checkOffset(A);var c=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(o,i,r){var s=o("./ArrayReader");function a(A){s.call(this,A)}o("../utils").inherits(a,s),a.prototype.readData=function(A){if(this.checkOffset(A),A===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(o,i,r){var s=o("../utils"),a=o("../support"),A=o("./ArrayReader"),c=o("./StringReader"),l=o("./NodeBufferReader"),u=o("./Uint8ArrayReader");i.exports=function(g){var h=s.getTypeOf(g);return s.checkSupport(h),h!=="string"||a.uint8array?h==="nodebuffer"?new l(g):a.uint8array?new u(s.transformTo("uint8array",g)):new A(s.transformTo("array",g)):new c(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,i,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,i,r){var s=o("./GenericWorker"),a=o("../utils");function A(c){s.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(A,s),A.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},i.exports=A},{"../utils":32,"./GenericWorker":28}],25:[function(o,i,r){var s=o("./GenericWorker"),a=o("../crc32");function A(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(A,s),A.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},i.exports=A},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,i,r){var s=o("../utils"),a=o("./GenericWorker");function A(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}s.inherits(A,a),A.prototype.processChunk=function(c){if(c){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+c.data.length}a.prototype.processChunk.call(this,c)},i.exports=A},{"../utils":32,"./GenericWorker":28}],27:[function(o,i,r){var s=o("../utils"),a=o("./GenericWorker");function A(c){a.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(u){l.dataIsReady=!0,l.data=u,l.max=u&&u.length||0,l.type=s.getTypeOf(u),l.isPaused||l._tickAndRepeat()},function(u){l.error(u)})}s.inherits(A,a),A.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},A.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},A.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},A.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,l);break;case"uint8array":c=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":c=this.data.slice(this.index,l)}return this.index=l,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=A},{"../utils":32,"./GenericWorker":28}],28:[function(o,i,r){function s(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,A){return this._listeners[a].push(A),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,A){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,A)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var A=this;return a.on("data",function(c){A.processChunk(c)}),a.on("end",function(){A.end()}),a.on("error",function(c){A.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,A){return this.extraStreamInfo[a]=A,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},i.exports=s},{}],29:[function(o,i,r){var s=o("../utils"),a=o("./ConvertWorker"),A=o("./GenericWorker"),c=o("../base64"),l=o("../support"),u=o("../external"),g=null;if(l.nodestream)try{g=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(p,m){return new u.Promise(function(_,f){var I=[],C=p._internalType,y=p._outputType,x=p._mimeType;p.on("data",function(E,B){I.push(E),m&&m(B)}).on("error",function(E){I=[],f(E)}).on("end",function(){try{var E=(function(B,S,Q){switch(B){case"blob":return s.newBlob(s.transformTo("arraybuffer",S),Q);case"base64":return c.encode(S);default:return s.transformTo(B,S)}})(y,(function(B,S){var Q,w=0,M=null,k=0;for(Q=0;Q<S.length;Q++)k+=S[Q].length;switch(B){case"string":return S.join("");case"array":return Array.prototype.concat.apply([],S);case"uint8array":for(M=new Uint8Array(k),Q=0;Q<S.length;Q++)M.set(S[Q],w),w+=S[Q].length;return M;case"nodebuffer":return Buffer.concat(S);default:throw new Error("concat : unsupported type '"+B+"'")}})(C,I),x);_(E)}catch(B){f(B)}I=[]}).resume()})}function d(p,m,_){var f=m;switch(m){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=m,this._mimeType=_,s.checkSupport(f),this._worker=p.pipe(new a(f)),p.lock()}catch(I){this._worker=new A("error"),this._worker.error(I)}}d.prototype={accumulate:function(p){return h(this,p)},on:function(p,m){var _=this;return p==="data"?this._worker.on(p,function(f){m.call(_,f.data,f.meta)}):this._worker.on(p,function(){s.delay(m,arguments,_)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(p){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new g(this,{objectMode:this._outputType!=="nodebuffer"},p)}},i.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,i,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var s=new ArrayBuffer(0);try{r.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(s),r.blob=a.getBlob("application/zip").size===0}catch{r.blob=!1}}}try{r.nodestream=!!o("readable-stream").Readable}catch{r.nodestream=!1}},{"readable-stream":16}],31:[function(o,i,r){for(var s=o("./utils"),a=o("./support"),A=o("./nodejsUtils"),c=o("./stream/GenericWorker"),l=new Array(256),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;l[254]=l[254]=1;function g(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}r.utf8encode=function(d){return a.nodebuffer?A.newBufferFrom(d,"utf-8"):(function(p){var m,_,f,I,C,y=p.length,x=0;for(I=0;I<y;I++)(64512&(_=p.charCodeAt(I)))==55296&&I+1<y&&(64512&(f=p.charCodeAt(I+1)))==56320&&(_=65536+(_-55296<<10)+(f-56320),I++),x+=_<128?1:_<2048?2:_<65536?3:4;for(m=a.uint8array?new Uint8Array(x):new Array(x),I=C=0;C<x;I++)(64512&(_=p.charCodeAt(I)))==55296&&I+1<y&&(64512&(f=p.charCodeAt(I+1)))==56320&&(_=65536+(_-55296<<10)+(f-56320),I++),_<128?m[C++]=_:(_<2048?m[C++]=192|_>>>6:(_<65536?m[C++]=224|_>>>12:(m[C++]=240|_>>>18,m[C++]=128|_>>>12&63),m[C++]=128|_>>>6&63),m[C++]=128|63&_);return m})(d)},r.utf8decode=function(d){return a.nodebuffer?s.transformTo("nodebuffer",d).toString("utf-8"):(function(p){var m,_,f,I,C=p.length,y=new Array(2*C);for(m=_=0;m<C;)if((f=p[m++])<128)y[_++]=f;else if(4<(I=l[f]))y[_++]=65533,m+=I-1;else{for(f&=I===2?31:I===3?15:7;1<I&&m<C;)f=f<<6|63&p[m++],I--;1<I?y[_++]=65533:f<65536?y[_++]=f:(f-=65536,y[_++]=55296|f>>10&1023,y[_++]=56320|1023&f)}return y.length!==_&&(y.subarray?y=y.subarray(0,_):y.length=_),s.applyFromCharCode(y)})(d=s.transformTo(a.uint8array?"uint8array":"array",d))},s.inherits(g,c),g.prototype.processChunk=function(d){var p=s.transformTo(a.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var m=p;(p=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),p.set(m,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var _=(function(I,C){var y;for((C=C||I.length)>I.length&&(C=I.length),y=C-1;0<=y&&(192&I[y])==128;)y--;return y<0||y===0?C:y+l[I[y]]>C?y:C})(p),f=p;_!==p.length&&(a.uint8array?(f=p.subarray(0,_),this.leftOver=p.subarray(_,p.length)):(f=p.slice(0,_),this.leftOver=p.slice(_,p.length))),this.push({data:r.utf8decode(f),meta:d.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=g,s.inherits(h,c),h.prototype.processChunk=function(d){this.push({data:r.utf8encode(d.data),meta:d.meta})},r.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,i,r){var s=o("./support"),a=o("./base64"),A=o("./nodejsUtils"),c=o("./external");function l(m){return m}function u(m,_){for(var f=0;f<m.length;++f)_[f]=255&m.charCodeAt(f);return _}o("setimmediate"),r.newBlob=function(m,_){r.checkSupport("blob");try{return new Blob([m],{type:_})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(m),f.getBlob(_)}catch{throw new Error("Bug : can't construct the Blob.")}}};var g={stringifyByChunk:function(m,_,f){var I=[],C=0,y=m.length;if(y<=f)return String.fromCharCode.apply(null,m);for(;C<y;)_==="array"||_==="nodebuffer"?I.push(String.fromCharCode.apply(null,m.slice(C,Math.min(C+f,y)))):I.push(String.fromCharCode.apply(null,m.subarray(C,Math.min(C+f,y)))),C+=f;return I.join("")},stringifyByChar:function(m){for(var _="",f=0;f<m.length;f++)_+=String.fromCharCode(m[f]);return _},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,A.allocBuffer(1)).length===1}catch{return!1}})()}};function h(m){var _=65536,f=r.getTypeOf(m),I=!0;if(f==="uint8array"?I=g.applyCanBeUsed.uint8array:f==="nodebuffer"&&(I=g.applyCanBeUsed.nodebuffer),I)for(;1<_;)try{return g.stringifyByChunk(m,f,_)}catch{_=Math.floor(_/2)}return g.stringifyByChar(m)}function d(m,_){for(var f=0;f<m.length;f++)_[f]=m[f];return _}r.applyFromCharCode=h;var p={};p.string={string:l,array:function(m){return u(m,new Array(m.length))},arraybuffer:function(m){return p.string.uint8array(m).buffer},uint8array:function(m){return u(m,new Uint8Array(m.length))},nodebuffer:function(m){return u(m,A.allocBuffer(m.length))}},p.array={string:h,array:l,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return A.newBufferFrom(m)}},p.arraybuffer={string:function(m){return h(new Uint8Array(m))},array:function(m){return d(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:l,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return A.newBufferFrom(new Uint8Array(m))}},p.uint8array={string:h,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:l,nodebuffer:function(m){return A.newBufferFrom(m)}},p.nodebuffer={string:h,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return p.nodebuffer.uint8array(m).buffer},uint8array:function(m){return d(m,new Uint8Array(m.length))},nodebuffer:l},r.transformTo=function(m,_){if(_=_||"",!m)return _;r.checkSupport(m);var f=r.getTypeOf(_);return p[f][m](_)},r.resolve=function(m){for(var _=m.split("/"),f=[],I=0;I<_.length;I++){var C=_[I];C==="."||C===""&&I!==0&&I!==_.length-1||(C===".."?f.pop():f.push(C))}return f.join("/")},r.getTypeOf=function(m){if(typeof m=="string")return"string";var _=Object.prototype.toString.call(m);return _==="[object Array]"?"array":s.nodebuffer&&A.isBuffer(m)?"nodebuffer":s.uint8array&&_==="[object Uint8Array]"?"uint8array":s.arraybuffer&&_==="[object ArrayBuffer]"?"arraybuffer":void 0},r.checkSupport=function(m){if(!s[m.toLowerCase()])throw new Error(m+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(m){var _,f,I="";for(f=0;f<(m||"").length;f++)I+="\\x"+((_=m.charCodeAt(f))<16?"0":"")+_.toString(16).toUpperCase();return I},r.delay=function(m,_,f){setImmediate(function(){m.apply(f||null,_||[])})},r.inherits=function(m,_){function f(){}f.prototype=_.prototype,m.prototype=new f},r.extend=function(){var m,_,f={};for(m=0;m<arguments.length;m++)for(_ in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],_)&&f[_]===void 0&&(f[_]=arguments[m][_]);return f},r.prepareContent=function(m,_,f,I,C){return c.Promise.resolve(_).then(function(y){return s.blob&&(y instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(y))!==-1)?Blob.prototype.arrayBuffer!==void 0?y.arrayBuffer():typeof FileReader<"u"?new c.Promise(function(x,E){var B=new FileReader;B.onload=function(S){x(S.target.result)},B.onerror=function(S){E(S.target.error)},B.readAsArrayBuffer(y)}):c.Promise.reject(new Error(m+" is a Blob, but we have no way of reading it.")):y}).then(function(y){var x=r.getTypeOf(y);return x?(x==="arraybuffer"?y=r.transformTo("uint8array",y):x==="string"&&(C?y=a.decode(y):f&&I!==!0&&(y=(function(E){return u(E,s.uint8array?new Uint8Array(E.length):new Array(E.length))})(y))),y):c.Promise.reject(new Error("Can't read the data of '"+m+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,i,r){var s=o("./reader/readerFor"),a=o("./utils"),A=o("./signature"),c=o("./zipEntry"),l=o("./support");function u(g){this.files=[],this.loadOptions=g}u.prototype={checkSignature:function(g){if(!this.reader.readAndCheckSignature(g)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(h)+", expected "+a.pretty(g)+")")}},isSignature:function(g,h){var d=this.reader.index;this.reader.setIndex(g);var p=this.reader.readString(4)===h;return this.reader.setIndex(d),p},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var g=this.reader.readData(this.zipCommentLength),h=l.uint8array?"uint8array":"array",d=a.transformTo(h,g);this.zipComment=this.loadOptions.decodeFileName(d)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var g,h,d,p=this.zip64EndOfCentralSize-44;0<p;)g=this.reader.readInt(2),h=this.reader.readInt(4),d=this.reader.readData(h),this.zip64ExtensibleData[g]={id:g,length:h,value:d}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var g,h;for(g=0;g<this.files.length;g++)h=this.files[g],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(A.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var g;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(A.CENTRAL_FILE_HEADER);)(g=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(g);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var g=this.reader.lastIndexOfSignature(A.CENTRAL_DIRECTORY_END);if(g<0)throw this.isSignature(0,A.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(g);var h=g;if(this.checkSignature(A.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(g=this.reader.lastIndexOfSignature(A.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(g),this.checkSignature(A.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,A.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(A.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(A.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var p=h-d;if(0<p)this.isSignature(h,A.CENTRAL_FILE_HEADER)||(this.reader.zero=p);else if(p<0)throw new Error("Corrupted zip: missing "+Math.abs(p)+" bytes.")},prepareReader:function(g){this.reader=s(g)},load:function(g){this.prepareReader(g),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},i.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,i,r){var s=o("./reader/readerFor"),a=o("./utils"),A=o("./compressedObject"),c=o("./crc32"),l=o("./utf8"),u=o("./compressions"),g=o("./support");function h(d,p){this.options=d,this.loadOptions=p}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var p,m;if(d.skip(22),this.fileNameLength=d.readInt(2),m=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((p=(function(_){for(var f in u)if(Object.prototype.hasOwnProperty.call(u,f)&&u[f].magic===_)return u[f];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new A(this.compressedSize,this.uncompressedSize,this.crc32,p,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var p=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");d.skip(p),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var p,m,_,f=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<f;)p=d.readInt(2),m=d.readInt(2),_=d.readData(m),this.extraFields[p]={id:p,length:m,value:_};d.setIndex(f)},handleUTF8:function(){var d=g.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var p=this.findExtraFieldUnicodePath();if(p!==null)this.fileNameStr=p;else{var m=a.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var f=a.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var p=s(d.value);return p.readInt(1)!==1||c(this.fileName)!==p.readInt(4)?null:l.utf8decode(p.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var p=s(d.value);return p.readInt(1)!==1||c(this.fileComment)!==p.readInt(4)?null:l.utf8decode(p.readData(d.length-5))}return null}},i.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,i,r){function s(p,m,_){this.name=p,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=m,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var a=o("./stream/StreamHelper"),A=o("./stream/DataWorker"),c=o("./utf8"),l=o("./compressedObject"),u=o("./stream/GenericWorker");s.prototype={internalStream:function(p){var m=null,_="string";try{if(!p)throw new Error("No output type specified.");var f=(_=p.toLowerCase())==="string"||_==="text";_!=="binarystring"&&_!=="text"||(_="string"),m=this._decompressWorker();var I=!this._dataBinary;I&&!f&&(m=m.pipe(new c.Utf8EncodeWorker)),!I&&f&&(m=m.pipe(new c.Utf8DecodeWorker))}catch(C){(m=new u("error")).error(C)}return new a(m,_,"")},async:function(p,m){return this.internalStream(p).accumulate(m)},nodeStream:function(p,m){return this.internalStream(p||"nodebuffer").toNodejsStream(m)},_compressWorker:function(p,m){if(this._data instanceof l&&this._data.compression.magic===p.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new c.Utf8EncodeWorker)),l.createWorkerFrom(_,p,m)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof u?this._data:new A(this._data)}};for(var g=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<g.length;d++)s.prototype[g[d]]=h;i.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,i,r){(function(s){var a,A,c=s.MutationObserver||s.WebKitMutationObserver;if(c){var l=0,u=new c(p),g=s.document.createTextNode("");u.observe(g,{characterData:!0}),a=function(){g.data=l=++l%2}}else if(s.setImmediate||s.MessageChannel===void 0)a="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var m=s.document.createElement("script");m.onreadystatechange=function(){p(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},s.document.documentElement.appendChild(m)}:function(){setTimeout(p,0)};else{var h=new s.MessageChannel;h.port1.onmessage=p,a=function(){h.port2.postMessage(0)}}var d=[];function p(){var m,_;A=!0;for(var f=d.length;f;){for(_=d,d=[],m=-1;++m<f;)_[m]();f=d.length}A=!1}i.exports=function(m){d.push(m)!==1||A||a()}}).call(this,typeof my<"u"?my:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,i,r){var s=o("immediate");function a(){}var A={},c=["REJECTED"],l=["FULFILLED"],u=["PENDING"];function g(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,f!==a&&m(this,f)}function h(f,I,C){this.promise=f,typeof I=="function"&&(this.onFulfilled=I,this.callFulfilled=this.otherCallFulfilled),typeof C=="function"&&(this.onRejected=C,this.callRejected=this.otherCallRejected)}function d(f,I,C){s(function(){var y;try{y=I(C)}catch(x){return A.reject(f,x)}y===f?A.reject(f,new TypeError("Cannot resolve promise with itself")):A.resolve(f,y)})}function p(f){var I=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof I=="function")return function(){I.apply(f,arguments)}}function m(f,I){var C=!1;function y(B){C||(C=!0,A.reject(f,B))}function x(B){C||(C=!0,A.resolve(f,B))}var E=_(function(){I(x,y)});E.status==="error"&&y(E.value)}function _(f,I){var C={};try{C.value=f(I),C.status="success"}catch(y){C.status="error",C.value=y}return C}(i.exports=g).prototype.finally=function(f){if(typeof f!="function")return this;var I=this.constructor;return this.then(function(C){return I.resolve(f()).then(function(){return C})},function(C){return I.resolve(f()).then(function(){throw C})})},g.prototype.catch=function(f){return this.then(null,f)},g.prototype.then=function(f,I){if(typeof f!="function"&&this.state===l||typeof I!="function"&&this.state===c)return this;var C=new this.constructor(a);return this.state!==u?d(C,this.state===l?f:I,this.outcome):this.queue.push(new h(C,f,I)),C},h.prototype.callFulfilled=function(f){A.resolve(this.promise,f)},h.prototype.otherCallFulfilled=function(f){d(this.promise,this.onFulfilled,f)},h.prototype.callRejected=function(f){A.reject(this.promise,f)},h.prototype.otherCallRejected=function(f){d(this.promise,this.onRejected,f)},A.resolve=function(f,I){var C=_(p,I);if(C.status==="error")return A.reject(f,C.value);var y=C.value;if(y)m(f,y);else{f.state=l,f.outcome=I;for(var x=-1,E=f.queue.length;++x<E;)f.queue[x].callFulfilled(I)}return f},A.reject=function(f,I){f.state=c,f.outcome=I;for(var C=-1,y=f.queue.length;++C<y;)f.queue[C].callRejected(I);return f},g.resolve=function(f){return f instanceof this?f:A.resolve(new this(a),f)},g.reject=function(f){var I=new this(a);return A.reject(I,f)},g.all=function(f){var I=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var C=f.length,y=!1;if(!C)return this.resolve([]);for(var x=new Array(C),E=0,B=-1,S=new this(a);++B<C;)Q(f[B],B);return S;function Q(w,M){I.resolve(w).then(function(k){x[M]=k,++E!==C||y||(y=!0,A.resolve(S,x))},function(k){y||(y=!0,A.reject(S,k))})}},g.race=function(f){var I=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var C=f.length,y=!1;if(!C)return this.resolve([]);for(var x=-1,E=new this(a);++x<C;)B=f[x],I.resolve(B).then(function(S){y||(y=!0,A.resolve(E,S))},function(S){y||(y=!0,A.reject(E,S))});var B;return E}},{immediate:36}],38:[function(o,i,r){var s={};(0,o("./lib/utils/common").assign)(s,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),i.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,i,r){var s=o("./zlib/deflate"),a=o("./utils/common"),A=o("./utils/strings"),c=o("./zlib/messages"),l=o("./zlib/zstream"),u=Object.prototype.toString,g=0,h=-1,d=0,p=8;function m(f){if(!(this instanceof m))return new m(f);this.options=a.assign({level:h,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},f||{});var I=this.options;I.raw&&0<I.windowBits?I.windowBits=-I.windowBits:I.gzip&&0<I.windowBits&&I.windowBits<16&&(I.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var C=s.deflateInit2(this.strm,I.level,I.method,I.windowBits,I.memLevel,I.strategy);if(C!==g)throw new Error(c[C]);if(I.header&&s.deflateSetHeader(this.strm,I.header),I.dictionary){var y;if(y=typeof I.dictionary=="string"?A.string2buf(I.dictionary):u.call(I.dictionary)==="[object ArrayBuffer]"?new Uint8Array(I.dictionary):I.dictionary,(C=s.deflateSetDictionary(this.strm,y))!==g)throw new Error(c[C]);this._dict_set=!0}}function _(f,I){var C=new m(I);if(C.push(f,!0),C.err)throw C.msg||c[C.err];return C.result}m.prototype.push=function(f,I){var C,y,x=this.strm,E=this.options.chunkSize;if(this.ended)return!1;y=I===~~I?I:I===!0?4:0,typeof f=="string"?x.input=A.string2buf(f):u.call(f)==="[object ArrayBuffer]"?x.input=new Uint8Array(f):x.input=f,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new a.Buf8(E),x.next_out=0,x.avail_out=E),(C=s.deflate(x,y))!==1&&C!==g)return this.onEnd(C),!(this.ended=!0);x.avail_out!==0&&(x.avail_in!==0||y!==4&&y!==2)||(this.options.to==="string"?this.onData(A.buf2binstring(a.shrinkBuf(x.output,x.next_out))):this.onData(a.shrinkBuf(x.output,x.next_out)))}while((0<x.avail_in||x.avail_out===0)&&C!==1);return y===4?(C=s.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===g):y!==2||(this.onEnd(g),!(x.avail_out=0))},m.prototype.onData=function(f){this.chunks.push(f)},m.prototype.onEnd=function(f){f===g&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},r.Deflate=m,r.deflate=_,r.deflateRaw=function(f,I){return(I=I||{}).raw=!0,_(f,I)},r.gzip=function(f,I){return(I=I||{}).gzip=!0,_(f,I)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,i,r){var s=o("./zlib/inflate"),a=o("./utils/common"),A=o("./utils/strings"),c=o("./zlib/constants"),l=o("./zlib/messages"),u=o("./zlib/zstream"),g=o("./zlib/gzheader"),h=Object.prototype.toString;function d(m){if(!(this instanceof d))return new d(m);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},m||{});var _=this.options;_.raw&&0<=_.windowBits&&_.windowBits<16&&(_.windowBits=-_.windowBits,_.windowBits===0&&(_.windowBits=-15)),!(0<=_.windowBits&&_.windowBits<16)||m&&m.windowBits||(_.windowBits+=32),15<_.windowBits&&_.windowBits<48&&(15&_.windowBits)==0&&(_.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var f=s.inflateInit2(this.strm,_.windowBits);if(f!==c.Z_OK)throw new Error(l[f]);this.header=new g,s.inflateGetHeader(this.strm,this.header)}function p(m,_){var f=new d(_);if(f.push(m,!0),f.err)throw f.msg||l[f.err];return f.result}d.prototype.push=function(m,_){var f,I,C,y,x,E,B=this.strm,S=this.options.chunkSize,Q=this.options.dictionary,w=!1;if(this.ended)return!1;I=_===~~_?_:_===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m=="string"?B.input=A.binstring2buf(m):h.call(m)==="[object ArrayBuffer]"?B.input=new Uint8Array(m):B.input=m,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0&&(B.output=new a.Buf8(S),B.next_out=0,B.avail_out=S),(f=s.inflate(B,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&Q&&(E=typeof Q=="string"?A.string2buf(Q):h.call(Q)==="[object ArrayBuffer]"?new Uint8Array(Q):Q,f=s.inflateSetDictionary(this.strm,E)),f===c.Z_BUF_ERROR&&w===!0&&(f=c.Z_OK,w=!1),f!==c.Z_STREAM_END&&f!==c.Z_OK)return this.onEnd(f),!(this.ended=!0);B.next_out&&(B.avail_out!==0&&f!==c.Z_STREAM_END&&(B.avail_in!==0||I!==c.Z_FINISH&&I!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(C=A.utf8border(B.output,B.next_out),y=B.next_out-C,x=A.buf2string(B.output,C),B.next_out=y,B.avail_out=S-y,y&&a.arraySet(B.output,B.output,C,y,0),this.onData(x)):this.onData(a.shrinkBuf(B.output,B.next_out)))),B.avail_in===0&&B.avail_out===0&&(w=!0)}while((0<B.avail_in||B.avail_out===0)&&f!==c.Z_STREAM_END);return f===c.Z_STREAM_END&&(I=c.Z_FINISH),I===c.Z_FINISH?(f=s.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===c.Z_OK):I!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(B.avail_out=0))},d.prototype.onData=function(m){this.chunks.push(m)},d.prototype.onEnd=function(m){m===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},r.Inflate=d,r.inflate=p,r.inflateRaw=function(m,_){return(_=_||{}).raw=!0,p(m,_)},r.ungzip=p},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(o,i,r){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(c){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var u=l.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var g in u)u.hasOwnProperty(g)&&(c[g]=u[g])}}return c},r.shrinkBuf=function(c,l){return c.length===l?c:c.subarray?c.subarray(0,l):(c.length=l,c)};var a={arraySet:function(c,l,u,g,h){if(l.subarray&&c.subarray)c.set(l.subarray(u,u+g),h);else for(var d=0;d<g;d++)c[h+d]=l[u+d]},flattenChunks:function(c){var l,u,g,h,d,p;for(l=g=0,u=c.length;l<u;l++)g+=c[l].length;for(p=new Uint8Array(g),l=h=0,u=c.length;l<u;l++)d=c[l],p.set(d,h),h+=d.length;return p}},A={arraySet:function(c,l,u,g,h){for(var d=0;d<g;d++)c[h+d]=l[u+d]},flattenChunks:function(c){return[].concat.apply([],c)}};r.setTyped=function(c){c?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,a)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,A))},r.setTyped(s)},{}],42:[function(o,i,r){var s=o("./common"),a=!0,A=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{A=!1}for(var c=new s.Buf8(256),l=0;l<256;l++)c[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function u(g,h){if(h<65537&&(g.subarray&&A||!g.subarray&&a))return String.fromCharCode.apply(null,s.shrinkBuf(g,h));for(var d="",p=0;p<h;p++)d+=String.fromCharCode(g[p]);return d}c[254]=c[254]=1,r.string2buf=function(g){var h,d,p,m,_,f=g.length,I=0;for(m=0;m<f;m++)(64512&(d=g.charCodeAt(m)))==55296&&m+1<f&&(64512&(p=g.charCodeAt(m+1)))==56320&&(d=65536+(d-55296<<10)+(p-56320),m++),I+=d<128?1:d<2048?2:d<65536?3:4;for(h=new s.Buf8(I),m=_=0;_<I;m++)(64512&(d=g.charCodeAt(m)))==55296&&m+1<f&&(64512&(p=g.charCodeAt(m+1)))==56320&&(d=65536+(d-55296<<10)+(p-56320),m++),d<128?h[_++]=d:(d<2048?h[_++]=192|d>>>6:(d<65536?h[_++]=224|d>>>12:(h[_++]=240|d>>>18,h[_++]=128|d>>>12&63),h[_++]=128|d>>>6&63),h[_++]=128|63&d);return h},r.buf2binstring=function(g){return u(g,g.length)},r.binstring2buf=function(g){for(var h=new s.Buf8(g.length),d=0,p=h.length;d<p;d++)h[d]=g.charCodeAt(d);return h},r.buf2string=function(g,h){var d,p,m,_,f=h||g.length,I=new Array(2*f);for(d=p=0;d<f;)if((m=g[d++])<128)I[p++]=m;else if(4<(_=c[m]))I[p++]=65533,d+=_-1;else{for(m&=_===2?31:_===3?15:7;1<_&&d<f;)m=m<<6|63&g[d++],_--;1<_?I[p++]=65533:m<65536?I[p++]=m:(m-=65536,I[p++]=55296|m>>10&1023,I[p++]=56320|1023&m)}return u(I,p)},r.utf8border=function(g,h){var d;for((h=h||g.length)>g.length&&(h=g.length),d=h-1;0<=d&&(192&g[d])==128;)d--;return d<0||d===0?h:d+c[g[d]]>h?d:h}},{"./common":41}],43:[function(o,i,r){i.exports=function(s,a,A,c){for(var l=65535&s|0,u=s>>>16&65535|0,g=0;A!==0;){for(A-=g=2e3<A?2e3:A;u=u+(l=l+a[c++]|0)|0,--g;);l%=65521,u%=65521}return l|u<<16|0}},{}],44:[function(o,i,r){i.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(o,i,r){var s=(function(){for(var a,A=[],c=0;c<256;c++){a=c;for(var l=0;l<8;l++)a=1&a?3988292384^a>>>1:a>>>1;A[c]=a}return A})();i.exports=function(a,A,c,l){var u=s,g=l+c;a^=-1;for(var h=l;h<g;h++)a=a>>>8^u[255&(a^A[h])];return-1^a}},{}],46:[function(o,i,r){var s,a=o("../utils/common"),A=o("./trees"),c=o("./adler32"),l=o("./crc32"),u=o("./messages"),g=0,h=4,d=0,p=-2,m=-1,_=4,f=2,I=8,C=9,y=286,x=30,E=19,B=2*y+1,S=15,Q=3,w=258,M=w+Q+1,k=42,R=113,F=1,O=2,U=3,Y=4;function W(he,Qe){return he.msg=u[Qe],Qe}function te(he){return(he<<1)-(4<he?9:0)}function j(he){for(var Qe=he.length;0<=--Qe;)he[Qe]=0}function J(he){var Qe=he.state,Pe=Qe.pending;Pe>he.avail_out&&(Pe=he.avail_out),Pe!==0&&(a.arraySet(he.output,Qe.pending_buf,Qe.pending_out,Pe,he.next_out),he.next_out+=Pe,Qe.pending_out+=Pe,he.total_out+=Pe,he.avail_out-=Pe,Qe.pending-=Pe,Qe.pending===0&&(Qe.pending_out=0))}function oe(he,Qe){A._tr_flush_block(he,0<=he.block_start?he.block_start:-1,he.strstart-he.block_start,Qe),he.block_start=he.strstart,J(he.strm)}function ie(he,Qe){he.pending_buf[he.pending++]=Qe}function ne(he,Qe){he.pending_buf[he.pending++]=Qe>>>8&255,he.pending_buf[he.pending++]=255&Qe}function le(he,Qe){var Pe,we,Te=he.max_chain_length,Re=he.strstart,Ee=he.prev_length,ke=he.nice_match,Ce=he.strstart>he.w_size-M?he.strstart-(he.w_size-M):0,Le=he.window,Ye=he.w_mask,tt=he.prev,At=he.strstart+w,at=Le[Re+Ee-1],nt=Le[Re+Ee];he.prev_length>=he.good_match&&(Te>>=2),ke>he.lookahead&&(ke=he.lookahead);do if(Le[(Pe=Qe)+Ee]===nt&&Le[Pe+Ee-1]===at&&Le[Pe]===Le[Re]&&Le[++Pe]===Le[Re+1]){Re+=2,Pe++;do;while(Le[++Re]===Le[++Pe]&&Le[++Re]===Le[++Pe]&&Le[++Re]===Le[++Pe]&&Le[++Re]===Le[++Pe]&&Le[++Re]===Le[++Pe]&&Le[++Re]===Le[++Pe]&&Le[++Re]===Le[++Pe]&&Le[++Re]===Le[++Pe]&&Re<At);if(we=w-(At-Re),Re=At-w,Ee<we){if(he.match_start=Qe,ke<=(Ee=we))break;at=Le[Re+Ee-1],nt=Le[Re+Ee]}}while((Qe=tt[Qe&Ye])>Ce&&--Te!=0);return Ee<=he.lookahead?Ee:he.lookahead}function ge(he){var Qe,Pe,we,Te,Re,Ee,ke,Ce,Le,Ye,tt=he.w_size;do{if(Te=he.window_size-he.lookahead-he.strstart,he.strstart>=tt+(tt-M)){for(a.arraySet(he.window,he.window,tt,tt,0),he.match_start-=tt,he.strstart-=tt,he.block_start-=tt,Qe=Pe=he.hash_size;we=he.head[--Qe],he.head[Qe]=tt<=we?we-tt:0,--Pe;);for(Qe=Pe=tt;we=he.prev[--Qe],he.prev[Qe]=tt<=we?we-tt:0,--Pe;);Te+=tt}if(he.strm.avail_in===0)break;if(Ee=he.strm,ke=he.window,Ce=he.strstart+he.lookahead,Le=Te,Ye=void 0,Ye=Ee.avail_in,Le<Ye&&(Ye=Le),Pe=Ye===0?0:(Ee.avail_in-=Ye,a.arraySet(ke,Ee.input,Ee.next_in,Ye,Ce),Ee.state.wrap===1?Ee.adler=c(Ee.adler,ke,Ye,Ce):Ee.state.wrap===2&&(Ee.adler=l(Ee.adler,ke,Ye,Ce)),Ee.next_in+=Ye,Ee.total_in+=Ye,Ye),he.lookahead+=Pe,he.lookahead+he.insert>=Q)for(Re=he.strstart-he.insert,he.ins_h=he.window[Re],he.ins_h=(he.ins_h<<he.hash_shift^he.window[Re+1])&he.hash_mask;he.insert&&(he.ins_h=(he.ins_h<<he.hash_shift^he.window[Re+Q-1])&he.hash_mask,he.prev[Re&he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=Re,Re++,he.insert--,!(he.lookahead+he.insert<Q)););}while(he.lookahead<M&&he.strm.avail_in!==0)}function _e(he,Qe){for(var Pe,we;;){if(he.lookahead<M){if(ge(he),he.lookahead<M&&Qe===g)return F;if(he.lookahead===0)break}if(Pe=0,he.lookahead>=Q&&(he.ins_h=(he.ins_h<<he.hash_shift^he.window[he.strstart+Q-1])&he.hash_mask,Pe=he.prev[he.strstart&he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart),Pe!==0&&he.strstart-Pe<=he.w_size-M&&(he.match_length=le(he,Pe)),he.match_length>=Q)if(we=A._tr_tally(he,he.strstart-he.match_start,he.match_length-Q),he.lookahead-=he.match_length,he.match_length<=he.max_lazy_match&&he.lookahead>=Q){for(he.match_length--;he.strstart++,he.ins_h=(he.ins_h<<he.hash_shift^he.window[he.strstart+Q-1])&he.hash_mask,Pe=he.prev[he.strstart&he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart,--he.match_length!=0;);he.strstart++}else he.strstart+=he.match_length,he.match_length=0,he.ins_h=he.window[he.strstart],he.ins_h=(he.ins_h<<he.hash_shift^he.window[he.strstart+1])&he.hash_mask;else we=A._tr_tally(he,0,he.window[he.strstart]),he.lookahead--,he.strstart++;if(we&&(oe(he,!1),he.strm.avail_out===0))return F}return he.insert=he.strstart<Q-1?he.strstart:Q-1,Qe===h?(oe(he,!0),he.strm.avail_out===0?U:Y):he.last_lit&&(oe(he,!1),he.strm.avail_out===0)?F:O}function ue(he,Qe){for(var Pe,we,Te;;){if(he.lookahead<M){if(ge(he),he.lookahead<M&&Qe===g)return F;if(he.lookahead===0)break}if(Pe=0,he.lookahead>=Q&&(he.ins_h=(he.ins_h<<he.hash_shift^he.window[he.strstart+Q-1])&he.hash_mask,Pe=he.prev[he.strstart&he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart),he.prev_length=he.match_length,he.prev_match=he.match_start,he.match_length=Q-1,Pe!==0&&he.prev_length<he.max_lazy_match&&he.strstart-Pe<=he.w_size-M&&(he.match_length=le(he,Pe),he.match_length<=5&&(he.strategy===1||he.match_length===Q&&4096<he.strstart-he.match_start)&&(he.match_length=Q-1)),he.prev_length>=Q&&he.match_length<=he.prev_length){for(Te=he.strstart+he.lookahead-Q,we=A._tr_tally(he,he.strstart-1-he.prev_match,he.prev_length-Q),he.lookahead-=he.prev_length-1,he.prev_length-=2;++he.strstart<=Te&&(he.ins_h=(he.ins_h<<he.hash_shift^he.window[he.strstart+Q-1])&he.hash_mask,Pe=he.prev[he.strstart&he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart),--he.prev_length!=0;);if(he.match_available=0,he.match_length=Q-1,he.strstart++,we&&(oe(he,!1),he.strm.avail_out===0))return F}else if(he.match_available){if((we=A._tr_tally(he,0,he.window[he.strstart-1]))&&oe(he,!1),he.strstart++,he.lookahead--,he.strm.avail_out===0)return F}else he.match_available=1,he.strstart++,he.lookahead--}return he.match_available&&(we=A._tr_tally(he,0,he.window[he.strstart-1]),he.match_available=0),he.insert=he.strstart<Q-1?he.strstart:Q-1,Qe===h?(oe(he,!0),he.strm.avail_out===0?U:Y):he.last_lit&&(oe(he,!1),he.strm.avail_out===0)?F:O}function fe(he,Qe,Pe,we,Te){this.good_length=he,this.max_lazy=Qe,this.nice_length=Pe,this.max_chain=we,this.func=Te}function pe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=I,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*B),this.dyn_dtree=new a.Buf16(2*(2*x+1)),this.bl_tree=new a.Buf16(2*(2*E+1)),j(this.dyn_ltree),j(this.dyn_dtree),j(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(S+1),this.heap=new a.Buf16(2*y+1),j(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*y+1),j(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(he){var Qe;return he&&he.state?(he.total_in=he.total_out=0,he.data_type=f,(Qe=he.state).pending=0,Qe.pending_out=0,Qe.wrap<0&&(Qe.wrap=-Qe.wrap),Qe.status=Qe.wrap?k:R,he.adler=Qe.wrap===2?0:1,Qe.last_flush=g,A._tr_init(Qe),d):W(he,p)}function Me(he){var Qe=ye(he);return Qe===d&&(function(Pe){Pe.window_size=2*Pe.w_size,j(Pe.head),Pe.max_lazy_match=s[Pe.level].max_lazy,Pe.good_match=s[Pe.level].good_length,Pe.nice_match=s[Pe.level].nice_length,Pe.max_chain_length=s[Pe.level].max_chain,Pe.strstart=0,Pe.block_start=0,Pe.lookahead=0,Pe.insert=0,Pe.match_length=Pe.prev_length=Q-1,Pe.match_available=0,Pe.ins_h=0})(he.state),Qe}function ve(he,Qe,Pe,we,Te,Re){if(!he)return p;var Ee=1;if(Qe===m&&(Qe=6),we<0?(Ee=0,we=-we):15<we&&(Ee=2,we-=16),Te<1||C<Te||Pe!==I||we<8||15<we||Qe<0||9<Qe||Re<0||_<Re)return W(he,p);we===8&&(we=9);var ke=new pe;return(he.state=ke).strm=he,ke.wrap=Ee,ke.gzhead=null,ke.w_bits=we,ke.w_size=1<<ke.w_bits,ke.w_mask=ke.w_size-1,ke.hash_bits=Te+7,ke.hash_size=1<<ke.hash_bits,ke.hash_mask=ke.hash_size-1,ke.hash_shift=~~((ke.hash_bits+Q-1)/Q),ke.window=new a.Buf8(2*ke.w_size),ke.head=new a.Buf16(ke.hash_size),ke.prev=new a.Buf16(ke.w_size),ke.lit_bufsize=1<<Te+6,ke.pending_buf_size=4*ke.lit_bufsize,ke.pending_buf=new a.Buf8(ke.pending_buf_size),ke.d_buf=1*ke.lit_bufsize,ke.l_buf=3*ke.lit_bufsize,ke.level=Qe,ke.strategy=Re,ke.method=Pe,Me(he)}s=[new fe(0,0,0,0,function(he,Qe){var Pe=65535;for(Pe>he.pending_buf_size-5&&(Pe=he.pending_buf_size-5);;){if(he.lookahead<=1){if(ge(he),he.lookahead===0&&Qe===g)return F;if(he.lookahead===0)break}he.strstart+=he.lookahead,he.lookahead=0;var we=he.block_start+Pe;if((he.strstart===0||he.strstart>=we)&&(he.lookahead=he.strstart-we,he.strstart=we,oe(he,!1),he.strm.avail_out===0)||he.strstart-he.block_start>=he.w_size-M&&(oe(he,!1),he.strm.avail_out===0))return F}return he.insert=0,Qe===h?(oe(he,!0),he.strm.avail_out===0?U:Y):(he.strstart>he.block_start&&(oe(he,!1),he.strm.avail_out),F)}),new fe(4,4,8,4,_e),new fe(4,5,16,8,_e),new fe(4,6,32,32,_e),new fe(4,4,16,16,ue),new fe(8,16,32,32,ue),new fe(8,16,128,128,ue),new fe(8,32,128,256,ue),new fe(32,128,258,1024,ue),new fe(32,258,258,4096,ue)],r.deflateInit=function(he,Qe){return ve(he,Qe,I,15,8,0)},r.deflateInit2=ve,r.deflateReset=Me,r.deflateResetKeep=ye,r.deflateSetHeader=function(he,Qe){return he&&he.state?he.state.wrap!==2?p:(he.state.gzhead=Qe,d):p},r.deflate=function(he,Qe){var Pe,we,Te,Re;if(!he||!he.state||5<Qe||Qe<0)return he?W(he,p):p;if(we=he.state,!he.output||!he.input&&he.avail_in!==0||we.status===666&&Qe!==h)return W(he,he.avail_out===0?-5:p);if(we.strm=he,Pe=we.last_flush,we.last_flush=Qe,we.status===k)if(we.wrap===2)he.adler=0,ie(we,31),ie(we,139),ie(we,8),we.gzhead?(ie(we,(we.gzhead.text?1:0)+(we.gzhead.hcrc?2:0)+(we.gzhead.extra?4:0)+(we.gzhead.name?8:0)+(we.gzhead.comment?16:0)),ie(we,255&we.gzhead.time),ie(we,we.gzhead.time>>8&255),ie(we,we.gzhead.time>>16&255),ie(we,we.gzhead.time>>24&255),ie(we,we.level===9?2:2<=we.strategy||we.level<2?4:0),ie(we,255&we.gzhead.os),we.gzhead.extra&&we.gzhead.extra.length&&(ie(we,255&we.gzhead.extra.length),ie(we,we.gzhead.extra.length>>8&255)),we.gzhead.hcrc&&(he.adler=l(he.adler,we.pending_buf,we.pending,0)),we.gzindex=0,we.status=69):(ie(we,0),ie(we,0),ie(we,0),ie(we,0),ie(we,0),ie(we,we.level===9?2:2<=we.strategy||we.level<2?4:0),ie(we,3),we.status=R);else{var Ee=I+(we.w_bits-8<<4)<<8;Ee|=(2<=we.strategy||we.level<2?0:we.level<6?1:we.level===6?2:3)<<6,we.strstart!==0&&(Ee|=32),Ee+=31-Ee%31,we.status=R,ne(we,Ee),we.strstart!==0&&(ne(we,he.adler>>>16),ne(we,65535&he.adler)),he.adler=1}if(we.status===69)if(we.gzhead.extra){for(Te=we.pending;we.gzindex<(65535&we.gzhead.extra.length)&&(we.pending!==we.pending_buf_size||(we.gzhead.hcrc&&we.pending>Te&&(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),J(he),Te=we.pending,we.pending!==we.pending_buf_size));)ie(we,255&we.gzhead.extra[we.gzindex]),we.gzindex++;we.gzhead.hcrc&&we.pending>Te&&(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),we.gzindex===we.gzhead.extra.length&&(we.gzindex=0,we.status=73)}else we.status=73;if(we.status===73)if(we.gzhead.name){Te=we.pending;do{if(we.pending===we.pending_buf_size&&(we.gzhead.hcrc&&we.pending>Te&&(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),J(he),Te=we.pending,we.pending===we.pending_buf_size)){Re=1;break}Re=we.gzindex<we.gzhead.name.length?255&we.gzhead.name.charCodeAt(we.gzindex++):0,ie(we,Re)}while(Re!==0);we.gzhead.hcrc&&we.pending>Te&&(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),Re===0&&(we.gzindex=0,we.status=91)}else we.status=91;if(we.status===91)if(we.gzhead.comment){Te=we.pending;do{if(we.pending===we.pending_buf_size&&(we.gzhead.hcrc&&we.pending>Te&&(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),J(he),Te=we.pending,we.pending===we.pending_buf_size)){Re=1;break}Re=we.gzindex<we.gzhead.comment.length?255&we.gzhead.comment.charCodeAt(we.gzindex++):0,ie(we,Re)}while(Re!==0);we.gzhead.hcrc&&we.pending>Te&&(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),Re===0&&(we.status=103)}else we.status=103;if(we.status===103&&(we.gzhead.hcrc?(we.pending+2>we.pending_buf_size&&J(he),we.pending+2<=we.pending_buf_size&&(ie(we,255&he.adler),ie(we,he.adler>>8&255),he.adler=0,we.status=R)):we.status=R),we.pending!==0){if(J(he),he.avail_out===0)return we.last_flush=-1,d}else if(he.avail_in===0&&te(Qe)<=te(Pe)&&Qe!==h)return W(he,-5);if(we.status===666&&he.avail_in!==0)return W(he,-5);if(he.avail_in!==0||we.lookahead!==0||Qe!==g&&we.status!==666){var ke=we.strategy===2?(function(Ce,Le){for(var Ye;;){if(Ce.lookahead===0&&(ge(Ce),Ce.lookahead===0)){if(Le===g)return F;break}if(Ce.match_length=0,Ye=A._tr_tally(Ce,0,Ce.window[Ce.strstart]),Ce.lookahead--,Ce.strstart++,Ye&&(oe(Ce,!1),Ce.strm.avail_out===0))return F}return Ce.insert=0,Le===h?(oe(Ce,!0),Ce.strm.avail_out===0?U:Y):Ce.last_lit&&(oe(Ce,!1),Ce.strm.avail_out===0)?F:O})(we,Qe):we.strategy===3?(function(Ce,Le){for(var Ye,tt,At,at,nt=Ce.window;;){if(Ce.lookahead<=w){if(ge(Ce),Ce.lookahead<=w&&Le===g)return F;if(Ce.lookahead===0)break}if(Ce.match_length=0,Ce.lookahead>=Q&&0<Ce.strstart&&(tt=nt[At=Ce.strstart-1])===nt[++At]&&tt===nt[++At]&&tt===nt[++At]){at=Ce.strstart+w;do;while(tt===nt[++At]&&tt===nt[++At]&&tt===nt[++At]&&tt===nt[++At]&&tt===nt[++At]&&tt===nt[++At]&&tt===nt[++At]&&tt===nt[++At]&&At<at);Ce.match_length=w-(at-At),Ce.match_length>Ce.lookahead&&(Ce.match_length=Ce.lookahead)}if(Ce.match_length>=Q?(Ye=A._tr_tally(Ce,1,Ce.match_length-Q),Ce.lookahead-=Ce.match_length,Ce.strstart+=Ce.match_length,Ce.match_length=0):(Ye=A._tr_tally(Ce,0,Ce.window[Ce.strstart]),Ce.lookahead--,Ce.strstart++),Ye&&(oe(Ce,!1),Ce.strm.avail_out===0))return F}return Ce.insert=0,Le===h?(oe(Ce,!0),Ce.strm.avail_out===0?U:Y):Ce.last_lit&&(oe(Ce,!1),Ce.strm.avail_out===0)?F:O})(we,Qe):s[we.level].func(we,Qe);if(ke!==U&&ke!==Y||(we.status=666),ke===F||ke===U)return he.avail_out===0&&(we.last_flush=-1),d;if(ke===O&&(Qe===1?A._tr_align(we):Qe!==5&&(A._tr_stored_block(we,0,0,!1),Qe===3&&(j(we.head),we.lookahead===0&&(we.strstart=0,we.block_start=0,we.insert=0))),J(he),he.avail_out===0))return we.last_flush=-1,d}return Qe!==h?d:we.wrap<=0?1:(we.wrap===2?(ie(we,255&he.adler),ie(we,he.adler>>8&255),ie(we,he.adler>>16&255),ie(we,he.adler>>24&255),ie(we,255&he.total_in),ie(we,he.total_in>>8&255),ie(we,he.total_in>>16&255),ie(we,he.total_in>>24&255)):(ne(we,he.adler>>>16),ne(we,65535&he.adler)),J(he),0<we.wrap&&(we.wrap=-we.wrap),we.pending!==0?d:1)},r.deflateEnd=function(he){var Qe;return he&&he.state?(Qe=he.state.status)!==k&&Qe!==69&&Qe!==73&&Qe!==91&&Qe!==103&&Qe!==R&&Qe!==666?W(he,p):(he.state=null,Qe===R?W(he,-3):d):p},r.deflateSetDictionary=function(he,Qe){var Pe,we,Te,Re,Ee,ke,Ce,Le,Ye=Qe.length;if(!he||!he.state||(Re=(Pe=he.state).wrap)===2||Re===1&&Pe.status!==k||Pe.lookahead)return p;for(Re===1&&(he.adler=c(he.adler,Qe,Ye,0)),Pe.wrap=0,Ye>=Pe.w_size&&(Re===0&&(j(Pe.head),Pe.strstart=0,Pe.block_start=0,Pe.insert=0),Le=new a.Buf8(Pe.w_size),a.arraySet(Le,Qe,Ye-Pe.w_size,Pe.w_size,0),Qe=Le,Ye=Pe.w_size),Ee=he.avail_in,ke=he.next_in,Ce=he.input,he.avail_in=Ye,he.next_in=0,he.input=Qe,ge(Pe);Pe.lookahead>=Q;){for(we=Pe.strstart,Te=Pe.lookahead-(Q-1);Pe.ins_h=(Pe.ins_h<<Pe.hash_shift^Pe.window[we+Q-1])&Pe.hash_mask,Pe.prev[we&Pe.w_mask]=Pe.head[Pe.ins_h],Pe.head[Pe.ins_h]=we,we++,--Te;);Pe.strstart=we,Pe.lookahead=Q-1,ge(Pe)}return Pe.strstart+=Pe.lookahead,Pe.block_start=Pe.strstart,Pe.insert=Pe.lookahead,Pe.lookahead=0,Pe.match_length=Pe.prev_length=Q-1,Pe.match_available=0,he.next_in=ke,he.input=Ce,he.avail_in=Ee,Pe.wrap=Re,d},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,i,r){i.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(o,i,r){i.exports=function(s,a){var A,c,l,u,g,h,d,p,m,_,f,I,C,y,x,E,B,S,Q,w,M,k,R,F,O;A=s.state,c=s.next_in,F=s.input,l=c+(s.avail_in-5),u=s.next_out,O=s.output,g=u-(a-s.avail_out),h=u+(s.avail_out-257),d=A.dmax,p=A.wsize,m=A.whave,_=A.wnext,f=A.window,I=A.hold,C=A.bits,y=A.lencode,x=A.distcode,E=(1<<A.lenbits)-1,B=(1<<A.distbits)-1;e:do{C<15&&(I+=F[c++]<<C,C+=8,I+=F[c++]<<C,C+=8),S=y[I&E];t:for(;;){if(I>>>=Q=S>>>24,C-=Q,(Q=S>>>16&255)===0)O[u++]=65535&S;else{if(!(16&Q)){if((64&Q)==0){S=y[(65535&S)+(I&(1<<Q)-1)];continue t}if(32&Q){A.mode=12;break e}s.msg="invalid literal/length code",A.mode=30;break e}w=65535&S,(Q&=15)&&(C<Q&&(I+=F[c++]<<C,C+=8),w+=I&(1<<Q)-1,I>>>=Q,C-=Q),C<15&&(I+=F[c++]<<C,C+=8,I+=F[c++]<<C,C+=8),S=x[I&B];n:for(;;){if(I>>>=Q=S>>>24,C-=Q,!(16&(Q=S>>>16&255))){if((64&Q)==0){S=x[(65535&S)+(I&(1<<Q)-1)];continue n}s.msg="invalid distance code",A.mode=30;break e}if(M=65535&S,C<(Q&=15)&&(I+=F[c++]<<C,(C+=8)<Q&&(I+=F[c++]<<C,C+=8)),d<(M+=I&(1<<Q)-1)){s.msg="invalid distance too far back",A.mode=30;break e}if(I>>>=Q,C-=Q,(Q=u-g)<M){if(m<(Q=M-Q)&&A.sane){s.msg="invalid distance too far back",A.mode=30;break e}if(R=f,(k=0)===_){if(k+=p-Q,Q<w){for(w-=Q;O[u++]=f[k++],--Q;);k=u-M,R=O}}else if(_<Q){if(k+=p+_-Q,(Q-=_)<w){for(w-=Q;O[u++]=f[k++],--Q;);if(k=0,_<w){for(w-=Q=_;O[u++]=f[k++],--Q;);k=u-M,R=O}}}else if(k+=_-Q,Q<w){for(w-=Q;O[u++]=f[k++],--Q;);k=u-M,R=O}for(;2<w;)O[u++]=R[k++],O[u++]=R[k++],O[u++]=R[k++],w-=3;w&&(O[u++]=R[k++],1<w&&(O[u++]=R[k++]))}else{for(k=u-M;O[u++]=O[k++],O[u++]=O[k++],O[u++]=O[k++],2<(w-=3););w&&(O[u++]=O[k++],1<w&&(O[u++]=O[k++]))}break}}break}}while(c<l&&u<h);c-=w=C>>3,I&=(1<<(C-=w<<3))-1,s.next_in=c,s.next_out=u,s.avail_in=c<l?l-c+5:5-(c-l),s.avail_out=u<h?h-u+257:257-(u-h),A.hold=I,A.bits=C}},{}],49:[function(o,i,r){var s=o("../utils/common"),a=o("./adler32"),A=o("./crc32"),c=o("./inffast"),l=o("./inftrees"),u=1,g=2,h=0,d=-2,p=1,m=852,_=592;function f(k){return(k>>>24&255)+(k>>>8&65280)+((65280&k)<<8)+((255&k)<<24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function C(k){var R;return k&&k.state?(R=k.state,k.total_in=k.total_out=R.total=0,k.msg="",R.wrap&&(k.adler=1&R.wrap),R.mode=p,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new s.Buf32(m),R.distcode=R.distdyn=new s.Buf32(_),R.sane=1,R.back=-1,h):d}function y(k){var R;return k&&k.state?((R=k.state).wsize=0,R.whave=0,R.wnext=0,C(k)):d}function x(k,R){var F,O;return k&&k.state?(O=k.state,R<0?(F=0,R=-R):(F=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?d:(O.window!==null&&O.wbits!==R&&(O.window=null),O.wrap=F,O.wbits=R,y(k))):d}function E(k,R){var F,O;return k?(O=new I,(k.state=O).window=null,(F=x(k,R))!==h&&(k.state=null),F):d}var B,S,Q=!0;function w(k){if(Q){var R;for(B=new s.Buf32(512),S=new s.Buf32(32),R=0;R<144;)k.lens[R++]=8;for(;R<256;)k.lens[R++]=9;for(;R<280;)k.lens[R++]=7;for(;R<288;)k.lens[R++]=8;for(l(u,k.lens,0,288,B,0,k.work,{bits:9}),R=0;R<32;)k.lens[R++]=5;l(g,k.lens,0,32,S,0,k.work,{bits:5}),Q=!1}k.lencode=B,k.lenbits=9,k.distcode=S,k.distbits=5}function M(k,R,F,O){var U,Y=k.state;return Y.window===null&&(Y.wsize=1<<Y.wbits,Y.wnext=0,Y.whave=0,Y.window=new s.Buf8(Y.wsize)),O>=Y.wsize?(s.arraySet(Y.window,R,F-Y.wsize,Y.wsize,0),Y.wnext=0,Y.whave=Y.wsize):(O<(U=Y.wsize-Y.wnext)&&(U=O),s.arraySet(Y.window,R,F-O,U,Y.wnext),(O-=U)?(s.arraySet(Y.window,R,F-O,O,0),Y.wnext=O,Y.whave=Y.wsize):(Y.wnext+=U,Y.wnext===Y.wsize&&(Y.wnext=0),Y.whave<Y.wsize&&(Y.whave+=U))),0}r.inflateReset=y,r.inflateReset2=x,r.inflateResetKeep=C,r.inflateInit=function(k){return E(k,15)},r.inflateInit2=E,r.inflate=function(k,R){var F,O,U,Y,W,te,j,J,oe,ie,ne,le,ge,_e,ue,fe,pe,ye,Me,ve,he,Qe,Pe,we,Te=0,Re=new s.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!k||!k.state||!k.output||!k.input&&k.avail_in!==0)return d;(F=k.state).mode===12&&(F.mode=13),W=k.next_out,U=k.output,j=k.avail_out,Y=k.next_in,O=k.input,te=k.avail_in,J=F.hold,oe=F.bits,ie=te,ne=j,Qe=h;e:for(;;)switch(F.mode){case p:if(F.wrap===0){F.mode=13;break}for(;oe<16;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(2&F.wrap&&J===35615){Re[F.check=0]=255&J,Re[1]=J>>>8&255,F.check=A(F.check,Re,2,0),oe=J=0,F.mode=2;break}if(F.flags=0,F.head&&(F.head.done=!1),!(1&F.wrap)||(((255&J)<<8)+(J>>8))%31){k.msg="incorrect header check",F.mode=30;break}if((15&J)!=8){k.msg="unknown compression method",F.mode=30;break}if(oe-=4,he=8+(15&(J>>>=4)),F.wbits===0)F.wbits=he;else if(he>F.wbits){k.msg="invalid window size",F.mode=30;break}F.dmax=1<<he,k.adler=F.check=1,F.mode=512&J?10:12,oe=J=0;break;case 2:for(;oe<16;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(F.flags=J,(255&F.flags)!=8){k.msg="unknown compression method",F.mode=30;break}if(57344&F.flags){k.msg="unknown header flags set",F.mode=30;break}F.head&&(F.head.text=J>>8&1),512&F.flags&&(Re[0]=255&J,Re[1]=J>>>8&255,F.check=A(F.check,Re,2,0)),oe=J=0,F.mode=3;case 3:for(;oe<32;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}F.head&&(F.head.time=J),512&F.flags&&(Re[0]=255&J,Re[1]=J>>>8&255,Re[2]=J>>>16&255,Re[3]=J>>>24&255,F.check=A(F.check,Re,4,0)),oe=J=0,F.mode=4;case 4:for(;oe<16;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}F.head&&(F.head.xflags=255&J,F.head.os=J>>8),512&F.flags&&(Re[0]=255&J,Re[1]=J>>>8&255,F.check=A(F.check,Re,2,0)),oe=J=0,F.mode=5;case 5:if(1024&F.flags){for(;oe<16;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}F.length=J,F.head&&(F.head.extra_len=J),512&F.flags&&(Re[0]=255&J,Re[1]=J>>>8&255,F.check=A(F.check,Re,2,0)),oe=J=0}else F.head&&(F.head.extra=null);F.mode=6;case 6:if(1024&F.flags&&(te<(le=F.length)&&(le=te),le&&(F.head&&(he=F.head.extra_len-F.length,F.head.extra||(F.head.extra=new Array(F.head.extra_len)),s.arraySet(F.head.extra,O,Y,le,he)),512&F.flags&&(F.check=A(F.check,O,le,Y)),te-=le,Y+=le,F.length-=le),F.length))break e;F.length=0,F.mode=7;case 7:if(2048&F.flags){if(te===0)break e;for(le=0;he=O[Y+le++],F.head&&he&&F.length<65536&&(F.head.name+=String.fromCharCode(he)),he&&le<te;);if(512&F.flags&&(F.check=A(F.check,O,le,Y)),te-=le,Y+=le,he)break e}else F.head&&(F.head.name=null);F.length=0,F.mode=8;case 8:if(4096&F.flags){if(te===0)break e;for(le=0;he=O[Y+le++],F.head&&he&&F.length<65536&&(F.head.comment+=String.fromCharCode(he)),he&&le<te;);if(512&F.flags&&(F.check=A(F.check,O,le,Y)),te-=le,Y+=le,he)break e}else F.head&&(F.head.comment=null);F.mode=9;case 9:if(512&F.flags){for(;oe<16;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(J!==(65535&F.check)){k.msg="header crc mismatch",F.mode=30;break}oe=J=0}F.head&&(F.head.hcrc=F.flags>>9&1,F.head.done=!0),k.adler=F.check=0,F.mode=12;break;case 10:for(;oe<32;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}k.adler=F.check=f(J),oe=J=0,F.mode=11;case 11:if(F.havedict===0)return k.next_out=W,k.avail_out=j,k.next_in=Y,k.avail_in=te,F.hold=J,F.bits=oe,2;k.adler=F.check=1,F.mode=12;case 12:if(R===5||R===6)break e;case 13:if(F.last){J>>>=7&oe,oe-=7&oe,F.mode=27;break}for(;oe<3;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}switch(F.last=1&J,oe-=1,3&(J>>>=1)){case 0:F.mode=14;break;case 1:if(w(F),F.mode=20,R!==6)break;J>>>=2,oe-=2;break e;case 2:F.mode=17;break;case 3:k.msg="invalid block type",F.mode=30}J>>>=2,oe-=2;break;case 14:for(J>>>=7&oe,oe-=7&oe;oe<32;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if((65535&J)!=(J>>>16^65535)){k.msg="invalid stored block lengths",F.mode=30;break}if(F.length=65535&J,oe=J=0,F.mode=15,R===6)break e;case 15:F.mode=16;case 16:if(le=F.length){if(te<le&&(le=te),j<le&&(le=j),le===0)break e;s.arraySet(U,O,Y,le,W),te-=le,Y+=le,j-=le,W+=le,F.length-=le;break}F.mode=12;break;case 17:for(;oe<14;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(F.nlen=257+(31&J),J>>>=5,oe-=5,F.ndist=1+(31&J),J>>>=5,oe-=5,F.ncode=4+(15&J),J>>>=4,oe-=4,286<F.nlen||30<F.ndist){k.msg="too many length or distance symbols",F.mode=30;break}F.have=0,F.mode=18;case 18:for(;F.have<F.ncode;){for(;oe<3;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}F.lens[Ee[F.have++]]=7&J,J>>>=3,oe-=3}for(;F.have<19;)F.lens[Ee[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,Pe={bits:F.lenbits},Qe=l(0,F.lens,0,19,F.lencode,0,F.work,Pe),F.lenbits=Pe.bits,Qe){k.msg="invalid code lengths set",F.mode=30;break}F.have=0,F.mode=19;case 19:for(;F.have<F.nlen+F.ndist;){for(;fe=(Te=F.lencode[J&(1<<F.lenbits)-1])>>>16&255,pe=65535&Te,!((ue=Te>>>24)<=oe);){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(pe<16)J>>>=ue,oe-=ue,F.lens[F.have++]=pe;else{if(pe===16){for(we=ue+2;oe<we;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(J>>>=ue,oe-=ue,F.have===0){k.msg="invalid bit length repeat",F.mode=30;break}he=F.lens[F.have-1],le=3+(3&J),J>>>=2,oe-=2}else if(pe===17){for(we=ue+3;oe<we;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}oe-=ue,he=0,le=3+(7&(J>>>=ue)),J>>>=3,oe-=3}else{for(we=ue+7;oe<we;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}oe-=ue,he=0,le=11+(127&(J>>>=ue)),J>>>=7,oe-=7}if(F.have+le>F.nlen+F.ndist){k.msg="invalid bit length repeat",F.mode=30;break}for(;le--;)F.lens[F.have++]=he}}if(F.mode===30)break;if(F.lens[256]===0){k.msg="invalid code -- missing end-of-block",F.mode=30;break}if(F.lenbits=9,Pe={bits:F.lenbits},Qe=l(u,F.lens,0,F.nlen,F.lencode,0,F.work,Pe),F.lenbits=Pe.bits,Qe){k.msg="invalid literal/lengths set",F.mode=30;break}if(F.distbits=6,F.distcode=F.distdyn,Pe={bits:F.distbits},Qe=l(g,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,Pe),F.distbits=Pe.bits,Qe){k.msg="invalid distances set",F.mode=30;break}if(F.mode=20,R===6)break e;case 20:F.mode=21;case 21:if(6<=te&&258<=j){k.next_out=W,k.avail_out=j,k.next_in=Y,k.avail_in=te,F.hold=J,F.bits=oe,c(k,ne),W=k.next_out,U=k.output,j=k.avail_out,Y=k.next_in,O=k.input,te=k.avail_in,J=F.hold,oe=F.bits,F.mode===12&&(F.back=-1);break}for(F.back=0;fe=(Te=F.lencode[J&(1<<F.lenbits)-1])>>>16&255,pe=65535&Te,!((ue=Te>>>24)<=oe);){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(fe&&(240&fe)==0){for(ye=ue,Me=fe,ve=pe;fe=(Te=F.lencode[ve+((J&(1<<ye+Me)-1)>>ye)])>>>16&255,pe=65535&Te,!(ye+(ue=Te>>>24)<=oe);){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}J>>>=ye,oe-=ye,F.back+=ye}if(J>>>=ue,oe-=ue,F.back+=ue,F.length=pe,fe===0){F.mode=26;break}if(32&fe){F.back=-1,F.mode=12;break}if(64&fe){k.msg="invalid literal/length code",F.mode=30;break}F.extra=15&fe,F.mode=22;case 22:if(F.extra){for(we=F.extra;oe<we;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}F.length+=J&(1<<F.extra)-1,J>>>=F.extra,oe-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=23;case 23:for(;fe=(Te=F.distcode[J&(1<<F.distbits)-1])>>>16&255,pe=65535&Te,!((ue=Te>>>24)<=oe);){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if((240&fe)==0){for(ye=ue,Me=fe,ve=pe;fe=(Te=F.distcode[ve+((J&(1<<ye+Me)-1)>>ye)])>>>16&255,pe=65535&Te,!(ye+(ue=Te>>>24)<=oe);){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}J>>>=ye,oe-=ye,F.back+=ye}if(J>>>=ue,oe-=ue,F.back+=ue,64&fe){k.msg="invalid distance code",F.mode=30;break}F.offset=pe,F.extra=15&fe,F.mode=24;case 24:if(F.extra){for(we=F.extra;oe<we;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}F.offset+=J&(1<<F.extra)-1,J>>>=F.extra,oe-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){k.msg="invalid distance too far back",F.mode=30;break}F.mode=25;case 25:if(j===0)break e;if(le=ne-j,F.offset>le){if((le=F.offset-le)>F.whave&&F.sane){k.msg="invalid distance too far back",F.mode=30;break}ge=le>F.wnext?(le-=F.wnext,F.wsize-le):F.wnext-le,le>F.length&&(le=F.length),_e=F.window}else _e=U,ge=W-F.offset,le=F.length;for(j<le&&(le=j),j-=le,F.length-=le;U[W++]=_e[ge++],--le;);F.length===0&&(F.mode=21);break;case 26:if(j===0)break e;U[W++]=F.length,j--,F.mode=21;break;case 27:if(F.wrap){for(;oe<32;){if(te===0)break e;te--,J|=O[Y++]<<oe,oe+=8}if(ne-=j,k.total_out+=ne,F.total+=ne,ne&&(k.adler=F.check=F.flags?A(F.check,U,ne,W-ne):a(F.check,U,ne,W-ne)),ne=j,(F.flags?J:f(J))!==F.check){k.msg="incorrect data check",F.mode=30;break}oe=J=0}F.mode=28;case 28:if(F.wrap&&F.flags){for(;oe<32;){if(te===0)break e;te--,J+=O[Y++]<<oe,oe+=8}if(J!==(4294967295&F.total)){k.msg="incorrect length check",F.mode=30;break}oe=J=0}F.mode=29;case 29:Qe=1;break e;case 30:Qe=-3;break e;case 31:return-4;default:return d}return k.next_out=W,k.avail_out=j,k.next_in=Y,k.avail_in=te,F.hold=J,F.bits=oe,(F.wsize||ne!==k.avail_out&&F.mode<30&&(F.mode<27||R!==4))&&M(k,k.output,k.next_out,ne-k.avail_out)?(F.mode=31,-4):(ie-=k.avail_in,ne-=k.avail_out,k.total_in+=ie,k.total_out+=ne,F.total+=ne,F.wrap&&ne&&(k.adler=F.check=F.flags?A(F.check,U,ne,k.next_out-ne):a(F.check,U,ne,k.next_out-ne)),k.data_type=F.bits+(F.last?64:0)+(F.mode===12?128:0)+(F.mode===20||F.mode===15?256:0),(ie==0&&ne===0||R===4)&&Qe===h&&(Qe=-5),Qe)},r.inflateEnd=function(k){if(!k||!k.state)return d;var R=k.state;return R.window&&(R.window=null),k.state=null,h},r.inflateGetHeader=function(k,R){var F;return k&&k.state?(2&(F=k.state).wrap)==0?d:((F.head=R).done=!1,h):d},r.inflateSetDictionary=function(k,R){var F,O=R.length;return k&&k.state?(F=k.state).wrap!==0&&F.mode!==11?d:F.mode===11&&a(1,R,O,0)!==F.check?-3:M(k,R,O,O)?(F.mode=31,-4):(F.havedict=1,h):d},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,i,r){var s=o("../utils/common"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],A=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];i.exports=function(u,g,h,d,p,m,_,f){var I,C,y,x,E,B,S,Q,w,M=f.bits,k=0,R=0,F=0,O=0,U=0,Y=0,W=0,te=0,j=0,J=0,oe=null,ie=0,ne=new s.Buf16(16),le=new s.Buf16(16),ge=null,_e=0;for(k=0;k<=15;k++)ne[k]=0;for(R=0;R<d;R++)ne[g[h+R]]++;for(U=M,O=15;1<=O&&ne[O]===0;O--);if(O<U&&(U=O),O===0)return p[m++]=20971520,p[m++]=20971520,f.bits=1,0;for(F=1;F<O&&ne[F]===0;F++);for(U<F&&(U=F),k=te=1;k<=15;k++)if(te<<=1,(te-=ne[k])<0)return-1;if(0<te&&(u===0||O!==1))return-1;for(le[1]=0,k=1;k<15;k++)le[k+1]=le[k]+ne[k];for(R=0;R<d;R++)g[h+R]!==0&&(_[le[g[h+R]]++]=R);if(B=u===0?(oe=ge=_,19):u===1?(oe=a,ie-=257,ge=A,_e-=257,256):(oe=c,ge=l,-1),k=F,E=m,W=R=J=0,y=-1,x=(j=1<<(Y=U))-1,u===1&&852<j||u===2&&592<j)return 1;for(;;){for(S=k-W,w=_[R]<B?(Q=0,_[R]):_[R]>B?(Q=ge[_e+_[R]],oe[ie+_[R]]):(Q=96,0),I=1<<k-W,F=C=1<<Y;p[E+(J>>W)+(C-=I)]=S<<24|Q<<16|w|0,C!==0;);for(I=1<<k-1;J&I;)I>>=1;if(I!==0?(J&=I-1,J+=I):J=0,R++,--ne[k]==0){if(k===O)break;k=g[h+_[R]]}if(U<k&&(J&x)!==y){for(W===0&&(W=U),E+=F,te=1<<(Y=k-W);Y+W<O&&!((te-=ne[Y+W])<=0);)Y++,te<<=1;if(j+=1<<Y,u===1&&852<j||u===2&&592<j)return 1;p[y=J&x]=U<<24|Y<<16|E-m|0}}return J!==0&&(p[E+J]=k-W<<24|64<<16|0),f.bits=U,0}},{"../utils/common":41}],51:[function(o,i,r){i.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(o,i,r){var s=o("../utils/common"),a=0,A=1;function c(Te){for(var Re=Te.length;0<=--Re;)Te[Re]=0}var l=0,u=29,g=256,h=g+1+u,d=30,p=19,m=2*h+1,_=15,f=16,I=7,C=256,y=16,x=17,E=18,B=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=new Array(2*(h+2));c(M);var k=new Array(2*d);c(k);var R=new Array(512);c(R);var F=new Array(256);c(F);var O=new Array(u);c(O);var U,Y,W,te=new Array(d);function j(Te,Re,Ee,ke,Ce){this.static_tree=Te,this.extra_bits=Re,this.extra_base=Ee,this.elems=ke,this.max_length=Ce,this.has_stree=Te&&Te.length}function J(Te,Re){this.dyn_tree=Te,this.max_code=0,this.stat_desc=Re}function oe(Te){return Te<256?R[Te]:R[256+(Te>>>7)]}function ie(Te,Re){Te.pending_buf[Te.pending++]=255&Re,Te.pending_buf[Te.pending++]=Re>>>8&255}function ne(Te,Re,Ee){Te.bi_valid>f-Ee?(Te.bi_buf|=Re<<Te.bi_valid&65535,ie(Te,Te.bi_buf),Te.bi_buf=Re>>f-Te.bi_valid,Te.bi_valid+=Ee-f):(Te.bi_buf|=Re<<Te.bi_valid&65535,Te.bi_valid+=Ee)}function le(Te,Re,Ee){ne(Te,Ee[2*Re],Ee[2*Re+1])}function ge(Te,Re){for(var Ee=0;Ee|=1&Te,Te>>>=1,Ee<<=1,0<--Re;);return Ee>>>1}function _e(Te,Re,Ee){var ke,Ce,Le=new Array(_+1),Ye=0;for(ke=1;ke<=_;ke++)Le[ke]=Ye=Ye+Ee[ke-1]<<1;for(Ce=0;Ce<=Re;Ce++){var tt=Te[2*Ce+1];tt!==0&&(Te[2*Ce]=ge(Le[tt]++,tt))}}function ue(Te){var Re;for(Re=0;Re<h;Re++)Te.dyn_ltree[2*Re]=0;for(Re=0;Re<d;Re++)Te.dyn_dtree[2*Re]=0;for(Re=0;Re<p;Re++)Te.bl_tree[2*Re]=0;Te.dyn_ltree[2*C]=1,Te.opt_len=Te.static_len=0,Te.last_lit=Te.matches=0}function fe(Te){8<Te.bi_valid?ie(Te,Te.bi_buf):0<Te.bi_valid&&(Te.pending_buf[Te.pending++]=Te.bi_buf),Te.bi_buf=0,Te.bi_valid=0}function pe(Te,Re,Ee,ke){var Ce=2*Re,Le=2*Ee;return Te[Ce]<Te[Le]||Te[Ce]===Te[Le]&&ke[Re]<=ke[Ee]}function ye(Te,Re,Ee){for(var ke=Te.heap[Ee],Ce=Ee<<1;Ce<=Te.heap_len&&(Ce<Te.heap_len&&pe(Re,Te.heap[Ce+1],Te.heap[Ce],Te.depth)&&Ce++,!pe(Re,ke,Te.heap[Ce],Te.depth));)Te.heap[Ee]=Te.heap[Ce],Ee=Ce,Ce<<=1;Te.heap[Ee]=ke}function Me(Te,Re,Ee){var ke,Ce,Le,Ye,tt=0;if(Te.last_lit!==0)for(;ke=Te.pending_buf[Te.d_buf+2*tt]<<8|Te.pending_buf[Te.d_buf+2*tt+1],Ce=Te.pending_buf[Te.l_buf+tt],tt++,ke===0?le(Te,Ce,Re):(le(Te,(Le=F[Ce])+g+1,Re),(Ye=B[Le])!==0&&ne(Te,Ce-=O[Le],Ye),le(Te,Le=oe(--ke),Ee),(Ye=S[Le])!==0&&ne(Te,ke-=te[Le],Ye)),tt<Te.last_lit;);le(Te,C,Re)}function ve(Te,Re){var Ee,ke,Ce,Le=Re.dyn_tree,Ye=Re.stat_desc.static_tree,tt=Re.stat_desc.has_stree,At=Re.stat_desc.elems,at=-1;for(Te.heap_len=0,Te.heap_max=m,Ee=0;Ee<At;Ee++)Le[2*Ee]!==0?(Te.heap[++Te.heap_len]=at=Ee,Te.depth[Ee]=0):Le[2*Ee+1]=0;for(;Te.heap_len<2;)Le[2*(Ce=Te.heap[++Te.heap_len]=at<2?++at:0)]=1,Te.depth[Ce]=0,Te.opt_len--,tt&&(Te.static_len-=Ye[2*Ce+1]);for(Re.max_code=at,Ee=Te.heap_len>>1;1<=Ee;Ee--)ye(Te,Le,Ee);for(Ce=At;Ee=Te.heap[1],Te.heap[1]=Te.heap[Te.heap_len--],ye(Te,Le,1),ke=Te.heap[1],Te.heap[--Te.heap_max]=Ee,Te.heap[--Te.heap_max]=ke,Le[2*Ce]=Le[2*Ee]+Le[2*ke],Te.depth[Ce]=(Te.depth[Ee]>=Te.depth[ke]?Te.depth[Ee]:Te.depth[ke])+1,Le[2*Ee+1]=Le[2*ke+1]=Ce,Te.heap[1]=Ce++,ye(Te,Le,1),2<=Te.heap_len;);Te.heap[--Te.heap_max]=Te.heap[1],(function(nt,gt){var bt,Ct,Dt,kt,it,Yt,pn=gt.dyn_tree,be=gt.max_code,et=gt.stat_desc.static_tree,It=gt.stat_desc.has_stree,Bt=gt.stat_desc.extra_bits,mt=gt.stat_desc.extra_base,st=gt.stat_desc.max_length,xt=0;for(kt=0;kt<=_;kt++)nt.bl_count[kt]=0;for(pn[2*nt.heap[nt.heap_max]+1]=0,bt=nt.heap_max+1;bt<m;bt++)st<(kt=pn[2*pn[2*(Ct=nt.heap[bt])+1]+1]+1)&&(kt=st,xt++),pn[2*Ct+1]=kt,be<Ct||(nt.bl_count[kt]++,it=0,mt<=Ct&&(it=Bt[Ct-mt]),Yt=pn[2*Ct],nt.opt_len+=Yt*(kt+it),It&&(nt.static_len+=Yt*(et[2*Ct+1]+it)));if(xt!==0){do{for(kt=st-1;nt.bl_count[kt]===0;)kt--;nt.bl_count[kt]--,nt.bl_count[kt+1]+=2,nt.bl_count[st]--,xt-=2}while(0<xt);for(kt=st;kt!==0;kt--)for(Ct=nt.bl_count[kt];Ct!==0;)be<(Dt=nt.heap[--bt])||(pn[2*Dt+1]!==kt&&(nt.opt_len+=(kt-pn[2*Dt+1])*pn[2*Dt],pn[2*Dt+1]=kt),Ct--)}})(Te,Re),_e(Le,at,Te.bl_count)}function he(Te,Re,Ee){var ke,Ce,Le=-1,Ye=Re[1],tt=0,At=7,at=4;for(Ye===0&&(At=138,at=3),Re[2*(Ee+1)+1]=65535,ke=0;ke<=Ee;ke++)Ce=Ye,Ye=Re[2*(ke+1)+1],++tt<At&&Ce===Ye||(tt<at?Te.bl_tree[2*Ce]+=tt:Ce!==0?(Ce!==Le&&Te.bl_tree[2*Ce]++,Te.bl_tree[2*y]++):tt<=10?Te.bl_tree[2*x]++:Te.bl_tree[2*E]++,Le=Ce,at=(tt=0)===Ye?(At=138,3):Ce===Ye?(At=6,3):(At=7,4))}function Qe(Te,Re,Ee){var ke,Ce,Le=-1,Ye=Re[1],tt=0,At=7,at=4;for(Ye===0&&(At=138,at=3),ke=0;ke<=Ee;ke++)if(Ce=Ye,Ye=Re[2*(ke+1)+1],!(++tt<At&&Ce===Ye)){if(tt<at)for(;le(Te,Ce,Te.bl_tree),--tt!=0;);else Ce!==0?(Ce!==Le&&(le(Te,Ce,Te.bl_tree),tt--),le(Te,y,Te.bl_tree),ne(Te,tt-3,2)):tt<=10?(le(Te,x,Te.bl_tree),ne(Te,tt-3,3)):(le(Te,E,Te.bl_tree),ne(Te,tt-11,7));Le=Ce,at=(tt=0)===Ye?(At=138,3):Ce===Ye?(At=6,3):(At=7,4)}}c(te);var Pe=!1;function we(Te,Re,Ee,ke){ne(Te,(l<<1)+(ke?1:0),3),(function(Ce,Le,Ye,tt){fe(Ce),ie(Ce,Ye),ie(Ce,~Ye),s.arraySet(Ce.pending_buf,Ce.window,Le,Ye,Ce.pending),Ce.pending+=Ye})(Te,Re,Ee)}r._tr_init=function(Te){Pe||((function(){var Re,Ee,ke,Ce,Le,Ye=new Array(_+1);for(Ce=ke=0;Ce<u-1;Ce++)for(O[Ce]=ke,Re=0;Re<1<<B[Ce];Re++)F[ke++]=Ce;for(F[ke-1]=Ce,Ce=Le=0;Ce<16;Ce++)for(te[Ce]=Le,Re=0;Re<1<<S[Ce];Re++)R[Le++]=Ce;for(Le>>=7;Ce<d;Ce++)for(te[Ce]=Le<<7,Re=0;Re<1<<S[Ce]-7;Re++)R[256+Le++]=Ce;for(Ee=0;Ee<=_;Ee++)Ye[Ee]=0;for(Re=0;Re<=143;)M[2*Re+1]=8,Re++,Ye[8]++;for(;Re<=255;)M[2*Re+1]=9,Re++,Ye[9]++;for(;Re<=279;)M[2*Re+1]=7,Re++,Ye[7]++;for(;Re<=287;)M[2*Re+1]=8,Re++,Ye[8]++;for(_e(M,h+1,Ye),Re=0;Re<d;Re++)k[2*Re+1]=5,k[2*Re]=ge(Re,5);U=new j(M,B,g+1,h,_),Y=new j(k,S,0,d,_),W=new j(new Array(0),Q,0,p,I)})(),Pe=!0),Te.l_desc=new J(Te.dyn_ltree,U),Te.d_desc=new J(Te.dyn_dtree,Y),Te.bl_desc=new J(Te.bl_tree,W),Te.bi_buf=0,Te.bi_valid=0,ue(Te)},r._tr_stored_block=we,r._tr_flush_block=function(Te,Re,Ee,ke){var Ce,Le,Ye=0;0<Te.level?(Te.strm.data_type===2&&(Te.strm.data_type=(function(tt){var At,at=4093624447;for(At=0;At<=31;At++,at>>>=1)if(1&at&&tt.dyn_ltree[2*At]!==0)return a;if(tt.dyn_ltree[18]!==0||tt.dyn_ltree[20]!==0||tt.dyn_ltree[26]!==0)return A;for(At=32;At<g;At++)if(tt.dyn_ltree[2*At]!==0)return A;return a})(Te)),ve(Te,Te.l_desc),ve(Te,Te.d_desc),Ye=(function(tt){var At;for(he(tt,tt.dyn_ltree,tt.l_desc.max_code),he(tt,tt.dyn_dtree,tt.d_desc.max_code),ve(tt,tt.bl_desc),At=p-1;3<=At&&tt.bl_tree[2*w[At]+1]===0;At--);return tt.opt_len+=3*(At+1)+5+5+4,At})(Te),Ce=Te.opt_len+3+7>>>3,(Le=Te.static_len+3+7>>>3)<=Ce&&(Ce=Le)):Ce=Le=Ee+5,Ee+4<=Ce&&Re!==-1?we(Te,Re,Ee,ke):Te.strategy===4||Le===Ce?(ne(Te,2+(ke?1:0),3),Me(Te,M,k)):(ne(Te,4+(ke?1:0),3),(function(tt,At,at,nt){var gt;for(ne(tt,At-257,5),ne(tt,at-1,5),ne(tt,nt-4,4),gt=0;gt<nt;gt++)ne(tt,tt.bl_tree[2*w[gt]+1],3);Qe(tt,tt.dyn_ltree,At-1),Qe(tt,tt.dyn_dtree,at-1)})(Te,Te.l_desc.max_code+1,Te.d_desc.max_code+1,Ye+1),Me(Te,Te.dyn_ltree,Te.dyn_dtree)),ue(Te),ke&&fe(Te)},r._tr_tally=function(Te,Re,Ee){return Te.pending_buf[Te.d_buf+2*Te.last_lit]=Re>>>8&255,Te.pending_buf[Te.d_buf+2*Te.last_lit+1]=255&Re,Te.pending_buf[Te.l_buf+Te.last_lit]=255&Ee,Te.last_lit++,Re===0?Te.dyn_ltree[2*Ee]++:(Te.matches++,Re--,Te.dyn_ltree[2*(F[Ee]+g+1)]++,Te.dyn_dtree[2*oe(Re)]++),Te.last_lit===Te.lit_bufsize-1},r._tr_align=function(Te){ne(Te,2,3),le(Te,C,M),(function(Re){Re.bi_valid===16?(ie(Re,Re.bi_buf),Re.bi_buf=0,Re.bi_valid=0):8<=Re.bi_valid&&(Re.pending_buf[Re.pending++]=255&Re.bi_buf,Re.bi_buf>>=8,Re.bi_valid-=8)})(Te)}},{"../utils/common":41}],53:[function(o,i,r){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(o,i,r){(function(s){(function(a,A){if(!a.setImmediate){var c,l,u,g,h=1,d={},p=!1,m=a.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(a);_=_&&_.setTimeout?_:a,c={}.toString.call(a.process)==="[object process]"?function(y){n.nextTick(function(){I(y)})}:(function(){if(a.postMessage&&!a.importScripts){var y=!0,x=a.onmessage;return a.onmessage=function(){y=!1},a.postMessage("","*"),a.onmessage=x,y}})()?(g="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",C,!1):a.attachEvent("onmessage",C),function(y){a.postMessage(g+y,"*")}):a.MessageChannel?((u=new MessageChannel).port1.onmessage=function(y){I(y.data)},function(y){u.port2.postMessage(y)}):m&&"onreadystatechange"in m.createElement("script")?(l=m.documentElement,function(y){var x=m.createElement("script");x.onreadystatechange=function(){I(y),x.onreadystatechange=null,l.removeChild(x),x=null},l.appendChild(x)}):function(y){setTimeout(I,0,y)},_.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=new Array(arguments.length-1),E=0;E<x.length;E++)x[E]=arguments[E+1];var B={callback:y,args:x};return d[h]=B,c(h),h++},_.clearImmediate=f}function f(y){delete d[y]}function I(y){if(p)setTimeout(I,0,y);else{var x=d[y];if(x){p=!0;try{(function(E){var B=E.callback,S=E.args;switch(S.length){case 0:B();break;case 1:B(S[0]);break;case 2:B(S[0],S[1]);break;case 3:B(S[0],S[1],S[2]);break;default:B.apply(A,S)}})(x)}finally{f(y),p=!1}}}}function C(y){y.source===a&&typeof y.data=="string"&&y.data.indexOf(g)===0&&I(+y.data.slice(g.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof my<"u"?my:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Aqe)),Aqe.exports}var LUi=FUi();const xfe=_y(LUi),HUi=async({circuitJson:t,projectName:e})=>{await ua.promise((async()=>{const n=new xfe,[o,{convertCircuitJsonToBomRows:i,convertBomRowsToCsv:r},{convertCircuitJsonToPickAndPlaceCsv:s}]=await Promise.all([DE("circuit-json-to-gerber"),DE("circuit-json-to-bom-csv"),DE("circuit-json-to-pnp-csv")]),a=t.filter(h=>!("error_type"in h)&&!("warning_type"in h)),A=o.convertCircuitJsonToGerberFiles(a,{flip_y_axis:!1});for(const[h,d]of Object.entries(A))n.file(`gerber/${h}`,d);const c=await i({circuitJson:t}),l=await r(c);n.file("bom.csv",l);const u=await s(t,{supplier:"jlcpcb"});n.file("pick_and_place.csv",u);const g=await n.generateAsync({type:"blob"});kE(g,{fileName:`${e}_fabrication_files.zip`})})(),{loading:"Generating fabrication files...",success:"Fabrication ZIP ready",error:n=>`Failed to generate fabrication files: ${n instanceof Error?n.message:String(n)}`})},OUi=async t=>{const{createFdmComponentBox:e,renderFdmComponentBoxPng:n}=await DE("circuit-json-to-fdm-component-box"),[o,i]=await Promise.all([e(t),n(t,{},{width:960,height:640})]);return{...o,previewPng:i}},GUi=async t=>{const{createFdmComponentBox:e}=await DE("circuit-json-to-fdm-component-box");return e(t)},$pn=({generatedBox:t,projectName:e})=>{const n=Uint8Array.from(t.threeMf);kE(new Blob([n.buffer],{type:"model/3mf"}),{fileName:`${N$e(e)}-component-box.3mf`})},YUi=async({circuitJson:t,projectName:e})=>{await ua.promise((async()=>{const n=await GUi(t);$pn({generatedBox:n,projectName:e})})(),{loading:"Generating component box...",success:"Component box 3MF ready",error:n=>`Failed to generate component box: ${n instanceof Error?n.message:String(n)}`})},UUi=async({circuitJson:t,projectName:e})=>{let n;try{const{convertCircuitJsonToGltf:o}=await DE("circuit-json-to-gltf");console.log("convertCircuitJsonToGltf",o);const i=await o(t,{format:"glb",boardTextureResolution:1024});if(!i||!(i instanceof ArrayBuffer))throw new Error("Invalid GLB data returned from converter");n=new Blob([i],{type:"model/gltf-binary"})}catch(o){console.error("GLB Export Error:",o);return}kE(n,{fileName:`${e}.glb`})},KUi=async({circuitJson:t,libraryName:e})=>{const{CircuitJsonToKicadLibraryConverter:n}=await DE("circuit-json-to-kicad"),o=new n(t,{libraryName:e,footprintLibraryName:e});o.runUntilFinished();const i=o.getOutput(),r=new xfe;r.file(`${e}.kicad_sym`,i.kicadSymString);for(const s of i.footprints){const a=r.folder(`${e}.pretty`);a&&a.file(`${s.footprintName}.kicad_mod`,`${s.kicadModString}
`)}if(i.model3dSourcePaths.length>0){const s=r.folder(`${e}.3dshapes`);if(s)for(const a of i.model3dSourcePaths)try{const A=a.split("/").pop()||a,c=await fetch(a);if(c.ok){const l=await c.arrayBuffer();s.file(A,l)}}catch{}}return r.file("fp-lib-table",i.fpLibTableString),r.file("sym-lib-table",i.symLibTableString),r},VUi=async({circuitJson:t,projectName:e})=>{await ua.promise((async()=>{const o=await(await KUi({circuitJson:t,libraryName:e})).generateAsync({type:"blob"});kE(o,{fileName:`${e}_kicad_library.zip`})})(),{loading:"Generating KiCad library...",success:"KiCad library ZIP ready",error:n=>`Failed to generate KiCad library: ${n instanceof Error?n.message:String(n)}`})},zUi=async({circuitJson:t,projectName:e})=>{const{CircuitJsonToKicadPcbConverter:n,CircuitJsonToKicadSchConverter:o,CircuitJsonToKicadProConverter:i,resolveAndLoadKicad3dModelFiles:r}=await DE("circuit-json-to-kicad"),s=new o(t);s.runUntilFinished();const a=s.getOutputString(),A=new n(t,{includeBuiltin3dModels:!0,projectName:e});A.runUntilFinished();const c=A.getOutputString(),l=new i(t,{projectName:e,schematicFilename:`${e}.kicad_sch`,pcbFilename:`${e}.kicad_pcb`});l.runUntilFinished();const u=l.getOutputString(),g=new xfe;return g.file(`${e}.kicad_sch`,a),g.file(`${e}.kicad_pcb`,c),g.file(`${e}.kicad_pro`,u),await r({projectName:e,model3dSourcePaths:A.getModel3dSourcePaths(),fetch,onModelFile:({outputPath:h,content:d})=>{g.file(h,d)},onError:({sourcePath:h})=>{console.warn(`Failed to load 3D model from ${h}`)}}),g},JUi=async({circuitJson:t,projectName:e})=>{await ua.promise((async()=>{const o=await(await zUi({circuitJson:t,projectName:e})).generateAsync({type:"blob"});kE(o,{fileName:`${e}_kicad_project.zip`})})(),{loading:"Generating KiCad project...",success:"KiCad project ZIP ready",error:n=>`Failed to generate KiCad project: ${n instanceof Error?n.message:String(n)}`})},qpn=async({circuitJson:t,projectName:e,options:n={}})=>{try{const{convertCircuitJsonToLbrn:o}=await DE("circuit-json-to-lbrn"),r=(await o(t,{includeSilkscreen:n.includeSilkscreen??!1,includeOxidationCleaningLayer:n.includeOxidationCleaningLayer??!0})).toXml(),s=new Blob([r],{type:"application/lbrn"});kE(s,{fileName:`${e}.lbrn2`})}catch(o){const i=o instanceof Error?o.message:"Unknown error";ua.error(`Failed to export to LBRN format: ${i}`)}},WUi=async({circuitJson:t,projectName:e})=>{const{convertCircuitJsonToPinoutSvg:n}=await DE("circuit-to-svg"),o=n(t);kE(o,{fileName:`${e}-pinout.svg`,mimeType:"image/svg+xml"})},jUi=async({circuitJson:t,projectName:e})=>{const{circuitJsonToStep:n}=await DE("circuit-json-to-step"),o=t.find(c=>c.type==="pcb_board"),i=o&&"width"in o?o.width:void 0,r=o&&"height"in o?o.height:void 0,s=o&&"thickness"in o?o.thickness:void 0;if(i===void 0||r===void 0||s===void 0){ua.error("Board dimensions not found. Please add a pcb_board with width, height, and thickness to your circuit.");return}let a;try{a=await n(t,{boardWidth:i,boardHeight:r,boardThickness:s,productName:e,includeComponents:!0,includeExternalMeshes:!0})}catch(c){const l=c instanceof Error?c.message:"Unknown error";ua.error(`Failed to convert circuit to STEP format: ${l}`);return}const A=new Blob([a],{type:"application/step"});try{kE(A,{fileName:`${e}.step`})}catch(c){const l=c instanceof Error?c.message:"Unknown error";ua.error(`Failed to download STEP file: ${l}`)}},$Ui=[{extension:"json",name:"Circuit JSON"},{extension:"json",name:"Simple Route JSON"},{extension:"zip",name:"Fabrication Files"},{extension:"zip",name:"KiCad Project"},{extension:"zip",name:"Altium Project"},{extension:"zip",name:"KiCad Library"},{extension:"glb",name:"GLB (Binary GLTF)"},{extension:"svg",name:"Pinout SVG"},{extension:"step",name:"STEP"},{extension:"lbrn2",name:"LightBurn"}],qUi=async({exportName:t,circuitJson:e,simpleRouteJson:n,projectName:o})=>{const i=N$e(o);if(t==="Fabrication Files"){await HUi({circuitJson:e,projectName:i});return}if(t==="KiCad Project"){await JUi({circuitJson:e,projectName:i});return}if(t==="Altium Project"){await kUi({circuitJson:e,projectName:i});return}if(t==="KiCad Library"){await VUi({circuitJson:e,projectName:i});return}if(t==="Circuit JSON"){kE(JSON.stringify(e,null,2),{fileName:`${i}.circuit.json`,mimeType:"application/json"});return}if(t==="Simple Route JSON"){if(!n)throw new Error("No Simple Route JSON available to export");kE(JSON.stringify(n,null,2),{fileName:`${i}.simple-route.json`,mimeType:"application/json"});return}if(t==="GLB (Binary GLTF)"){await UUi({circuitJson:e,projectName:i});return}if(t==="Pinout SVG"){WUi({circuitJson:e,projectName:i});return}if(t==="STEP"){await jUi({circuitJson:e,projectName:i});return}if(t==="Component Box (3MF)"){await YUi({circuitJson:e,projectName:i});return}if(t==="LightBurn"){await qpn({circuitJson:e,projectName:i});return}throw new Error(`Unsupported export type: "${t}"`)},XUi=({packageName:t,onSelectReview:e})=>{const n=md(u=>u.fsMap),o=md(u=>u.circuitJson),[i,r]=ee.useState([]),[s,a]=ee.useState(!1),[A,c]=ee.useState(!1);ee.useEffect(()=>{!t||!zge()||(a(!0),gq.get("ai_reviews/list",{searchParams:{package_name:t}}).json().then(u=>r(u.ai_reviews)).catch(u=>{console.error("Failed to load AI reviews",u),ua.error("Failed to load AI reviews")}).finally(()=>a(!1)))},[t]);const l=async()=>{if(!o){ua.error("Need Circuit JSON to Request AI Review");return}if(!zge()){ua.error("Missing registry token");return}c(!0);try{const{ai_review:u}=await gq.post("ai_reviews/create",{json:{package_name:t??"unknown",fs_map:Object.fromEntries(n),circuit_json:o}}).json();r(g=>[u,...g]),e(u),ua.success("AI review requested")}catch(u){console.error("Failed to create AI review",u),ua.error("Failed to request AI review")}finally{c(!1)}};return K.jsxs(K.Fragment,{children:[K.jsxs(zP,{children:[K.jsx(JP,{children:"AI Review"}),K.jsx(VT,{children:"Select an AI review or request a new one."})]}),K.jsx("div",{className:"rf-flex rf-gap-4 rf-mt-4",children:K.jsx("div",{className:"rf-w-48 rf-h-64 rf-overflow-y-auto rf-border rf-rounded rf-p-2 rf-flex-shrink-0",children:s?K.jsx("div",{className:"rf-text-sm",children:"Loading..."}):i.length>0?i.map(u=>K.jsx("div",{className:"rf-text-sm rf-p-2 rf-cursor-pointer rf-rounded hover:rf-bg-zinc-100",onClick:()=>e(u),children:new Date(u.created_at||"").toLocaleString()},u.ai_review_id)):K.jsx("div",{className:"rf-text-sm rf-text-muted-foreground",children:"No AI reviews found."})})}),K.jsx(jU,{className:"rf-mt-4",children:K.jsx(fA,{onClick:l,disabled:A,children:A?"Requesting...":"Review my Board"})})]})};function cqe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zT=cqe();function Xpn(t){zT=t}var xee={exec:()=>null};function L0(t,e=""){let n=typeof t=="string"?t:t.source;const o={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(g2.caret,"$1"),n=n.replace(i,s),o},getRegex:()=>new RegExp(n,e)};return o}var g2={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},ZUi=/^(?:[ \t]*(?:\n|$))+/,eKi=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tKi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Eee=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nKi=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,lqe=/(?:[*+-]|\d{1,9}[.)])/,Zpn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,emn=L0(Zpn).replace(/bull/g,lqe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),oKi=L0(Zpn).replace(/bull/g,lqe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),uqe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,iKi=/^[^\n]+/,gqe=/(?!\s*\])(?:\\.|[^\[\]\\])+/,rKi=L0(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",gqe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sKi=L0(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,lqe).getRegex(),Efe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",dqe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,aKi=L0("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",dqe).replace("tag",Efe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tmn=L0(uqe).replace("hr",Eee).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Efe).getRegex(),AKi=L0(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tmn).getRegex(),hqe={blockquote:AKi,code:eKi,def:rKi,fences:tKi,heading:nKi,hr:Eee,html:aKi,lheading:emn,list:sKi,newline:ZUi,paragraph:tmn,table:xee,text:iKi},nmn=L0("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Eee).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Efe).getRegex(),cKi={...hqe,lheading:oKi,table:nmn,paragraph:L0(uqe).replace("hr",Eee).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",nmn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Efe).getRegex()},lKi={...hqe,html:L0(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",dqe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:L0(uqe).replace("hr",Eee).replace("heading",` *#{1,6} *[^
]`).replace("lheading",emn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},uKi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,gKi=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,omn=/^( {2,}|\\)\n(?!\s*$)/,dKi=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Bfe=/[\p{P}\p{S}]/u,pqe=/[\s\p{P}\p{S}]/u,imn=/[^\s\p{P}\p{S}]/u,hKi=L0(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,pqe).getRegex(),rmn=/(?!~)[\p{P}\p{S}]/u,pKi=/(?!~)[\s\p{P}\p{S}]/u,mKi=/(?:[^\s\p{P}\p{S}]|~)/u,_Ki=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,smn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fKi=L0(smn,"u").replace(/punct/g,Bfe).getRegex(),IKi=L0(smn,"u").replace(/punct/g,rmn).getRegex(),amn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",CKi=L0(amn,"gu").replace(/notPunctSpace/g,imn).replace(/punctSpace/g,pqe).replace(/punct/g,Bfe).getRegex(),yKi=L0(amn,"gu").replace(/notPunctSpace/g,mKi).replace(/punctSpace/g,pKi).replace(/punct/g,rmn).getRegex(),xKi=L0("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,imn).replace(/punctSpace/g,pqe).replace(/punct/g,Bfe).getRegex(),EKi=L0(/\\(punct)/,"gu").replace(/punct/g,Bfe).getRegex(),BKi=L0(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bKi=L0(dqe).replace("(?:-->|$)","-->").getRegex(),SKi=L0("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bKi).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bfe=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,QKi=L0(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",bfe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Amn=L0(/^!?\[(label)\]\[(ref)\]/).replace("label",bfe).replace("ref",gqe).getRegex(),cmn=L0(/^!?\[(ref)\](?:\[\])?/).replace("ref",gqe).getRegex(),vKi=L0("reflink|nolink(?!\\()","g").replace("reflink",Amn).replace("nolink",cmn).getRegex(),mqe={_backpedal:xee,anyPunctuation:EKi,autolink:BKi,blockSkip:_Ki,br:omn,code:gKi,del:xee,emStrongLDelim:fKi,emStrongRDelimAst:CKi,emStrongRDelimUnd:xKi,escape:uKi,link:QKi,nolink:cmn,punctuation:hKi,reflink:Amn,reflinkSearch:vKi,tag:SKi,text:dKi,url:xee},wKi={...mqe,link:L0(/^!?\[(label)\]\((.*?)\)/).replace("label",bfe).getRegex(),reflink:L0(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bfe).getRegex()},_qe={...mqe,emStrongRDelimAst:yKi,emStrongLDelim:IKi,url:L0(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},PKi={..._qe,br:L0(omn).replace("{2,}","*").getRegex(),text:L0(_qe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Sfe={normal:hqe,gfm:cKi,pedantic:lKi},Bee={normal:mqe,gfm:_qe,breaks:PKi,pedantic:wKi},MKi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},lmn=t=>MKi[t];function n8(t,e){if(e){if(g2.escapeTest.test(t))return t.replace(g2.escapeReplace,lmn)}else if(g2.escapeTestNoEncode.test(t))return t.replace(g2.escapeReplaceNoEncode,lmn);return t}function umn(t){try{t=encodeURI(t).replace(g2.percentDecode,"%")}catch{return null}return t}function gmn(t,e){const n=t.replace(g2.findPipe,(r,s,a)=>{let A=!1,c=s;for(;--c>=0&&a[c]==="\\";)A=!A;return A?"|":" |"}),o=n.split(g2.splitPipe);let i=0;if(o[0].trim()||o.shift(),o.length>0&&!o.at(-1)?.trim()&&o.pop(),e)if(o.length>e)o.splice(e);else for(;o.length<e;)o.push("");for(;i<o.length;i++)o[i]=o[i].trim().replace(g2.slashPipe,"|");return o}function bee(t,e,n){const o=t.length;if(o===0)return"";let i=0;for(;i<o&&t.charAt(o-i-1)===e;)i++;return t.slice(0,o-i)}function DKi(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let o=0;o<t.length;o++)if(t[o]==="\\")o++;else if(t[o]===e[0])n++;else if(t[o]===e[1]&&(n--,n<0))return o;return n>0?-2:-1}function dmn(t,e,n,o,i){const r=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");o.state.inLink=!0;const A={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:r,title:s,text:a,tokens:o.inlineTokens(a)};return o.state.inLink=!1,A}function NKi(t,e,n){const o=t.match(n.other.indentCodeCompensation);if(o===null)return e;const i=o[1];return e.split(`
`).map(r=>{const s=r.match(n.other.beginningSpace);if(s===null)return r;const[a]=s;return a.length>=i.length?r.slice(i.length):r}).join(`
`)}var Qfe=class{options;rules;lexer;constructor(t){this.options=t||zT}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:bee(n,`
`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],o=NKi(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:o}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){const o=bee(n,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(n=o.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:bee(e[0],`
`)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=bee(e[0],`
`).split(`
`),o="",i="";const r=[];for(;n.length>0;){let s=!1;const a=[];let A;for(A=0;A<n.length;A++)if(this.rules.other.blockquoteStart.test(n[A]))a.push(n[A]),s=!0;else if(!s)a.push(n[A]);else break;n=n.slice(A);const c=a.join(`
`),l=c.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
${c}`:c,i=i?`${i}
${l}`:l;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,r,!0),this.lexer.state.top=u,n.length===0)break;const g=r.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){const h=g,d=h.raw+`
`+n.join(`
`),p=this.blockquote(d);r[r.length-1]=p,o=o.substring(0,o.length-h.raw.length)+p.raw,i=i.substring(0,i.length-h.text.length)+p.text;break}else if(g?.type==="list"){const h=g,d=h.raw+`
`+n.join(`
`),p=this.list(d);r[r.length-1]=p,o=o.substring(0,o.length-g.raw.length)+p.raw,i=i.substring(0,i.length-h.raw.length)+p.raw,n=d.substring(r.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:o,tokens:r,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const o=n.length>1,i={type:"list",raw:"",ordered:o,start:o?+n.slice(0,-1):"",loose:!1,items:[]};n=o?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=o?n:"[*+-]");const r=this.rules.other.listItemRegex(n);let s=!1;for(;t;){let A=!1,c="",l="";if(!(e=r.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let u=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),g=t.split(`
`,1)[0],h=!u.trim(),d=0;if(this.options.pedantic?(d=2,l=u.trimStart()):h?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,l=u.slice(d),d+=e[1].length),h&&this.rules.other.blankLine.test(g)&&(c+=g+`
`,t=t.substring(g.length+1),A=!0),!A){const _=this.rules.other.nextBulletRegex(d),f=this.rules.other.hrRegex(d),I=this.rules.other.fencesBeginRegex(d),C=this.rules.other.headingBeginRegex(d),y=this.rules.other.htmlBeginRegex(d);for(;t;){const x=t.split(`
`,1)[0];let E;if(g=x,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting,"  "),E=g):E=g.replace(this.rules.other.tabCharGlobal,"    "),I.test(g)||C.test(g)||y.test(g)||_.test(g)||f.test(g))break;if(E.search(this.rules.other.nonSpaceChar)>=d||!g.trim())l+=`
`+E.slice(d);else{if(h||u.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||I.test(u)||C.test(u)||f.test(u))break;l+=`
`+g}!h&&!g.trim()&&(h=!0),c+=x+`
`,t=t.substring(x.length+1),u=E.slice(d)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0));let p=null,m;this.options.gfm&&(p=this.rules.other.listIsTask.exec(l),p&&(m=p[0]!=="[ ] ",l=l.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!p,checked:m,loose:!1,text:l,tokens:[]}),i.raw+=c}const a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let A=0;A<i.items.length;A++)if(this.lexer.state.top=!1,i.items[A].tokens=this.lexer.blockTokens(i.items[A].text,[]),!i.loose){const c=i.items[A].tokens.filter(u=>u.type==="space"),l=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));i.loose=l}if(i.loose)for(let A=0;A<i.items.length;A++)i.items[A].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:o,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const n=gmn(e[1]),o=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],r={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const s of o)this.rules.other.tableAlignRight.test(s)?r.align.push("right"):this.rules.other.tableAlignCenter.test(s)?r.align.push("center"):this.rules.other.tableAlignLeft.test(s)?r.align.push("left"):r.align.push(null);for(let s=0;s<n.length;s++)r.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:r.align[s]});for(const s of i)r.rows.push(gmn(s,r.header.length).map((a,A)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:r.align[A]})));return r}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const r=bee(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=DKi(e[2],"()");if(r===-2)return;if(r>-1){const a=(e[0].indexOf("!")===0?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let o=e[2],i="";if(this.options.pedantic){const r=this.rules.other.pedanticHrefTitle.exec(o);r&&(o=r[1],i=r[3])}else i=e[3]?e[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),dmn(e,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[o.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return dmn(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...o[0]].length-1;let s,a,A=r,c=0;const l=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);(o=l.exec(e))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(a=[...s].length,o[3]||o[4]){A+=a;continue}else if((o[5]||o[6])&&r%3&&!((r+a)%3)){c+=a;continue}if(A-=a,A>0)continue;a=Math.min(a,a+A+c);const u=[...o[0]][0].length,g=t.slice(0,r+o.index+u+a);if(Math.min(r,a)%2){const d=g.slice(1,-1);return{type:"em",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}const h=g.slice(2,-2);return{type:"strong",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," ");const o=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,o;return e[2]==="@"?(n=e[1],o="mailto:"+n):(n=e[1],o=n),{type:"link",raw:e[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,o;if(e[2]==="@")n=e[0],o="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=e[0],e[1]==="www."?o="http://"+e[0]:o=e[0]}return{type:"link",raw:e[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},TS=class Qit{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||zT,this.options.tokenizer=this.options.tokenizer||new Qfe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:g2,block:Sfe.normal,inline:Bee.normal};this.options.pedantic?(n.block=Sfe.pedantic,n.inline=Bee.pedantic):this.options.gfm&&(n.block=Sfe.gfm,this.options.breaks?n.inline=Bee.breaks:n.inline=Bee.gfm),this.tokenizer.rules=n}static get rules(){return{block:Sfe,inline:Bee}}static lex(e,n){return new Qit(n).lex(e)}static lexInline(e,n){return new Qit(n).inlineTokens(e)}lex(e){e=e.replace(g2.carriageReturn,`
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const o=this.inlineQueue[n];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],o=!1){for(this.options.pedantic&&(e=e.replace(g2.tabCharGlobal,"    ").replace(g2.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);const s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
`+i.raw,s.text+=`
`+i.text,this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
`+i.raw,s.text+=`
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let r=e;if(this.options.extensions?.startBlock){let s=1/0;const a=e.slice(1);let A;this.options.extensions.startBlock.forEach(c=>{A=c.call({lexer:this},a),typeof A=="number"&&A>=0&&(s=Math.min(s,A))}),s<1/0&&s>=0&&(r=e.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(r))){const s=n.at(-1);o&&s?.type==="paragraph"?(s.raw+=`
`+i.raw,s.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i),o=r.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type==="text"?(s.raw+=`
`+i.raw,s.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(e){const s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let o=e,i=null;if(this.tokens.links){const a=Object.keys(this.tokens.links);if(a.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)a.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,i.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let r=!1,s="";for(;e;){r||(s=""),r=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);const c=n.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,o,s)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let A=e;if(this.options.extensions?.startInline){let c=1/0;const l=e.slice(1);let u;this.options.extensions.startInline.forEach(g=>{u=g.call({lexer:this},l),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(A=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(A)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),r=!0;const c=n.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},vfe=class{options;parser;constructor(t){this.options=t||zT}space(t){return""}code({text:t,lang:e,escaped:n}){const o=(e||"").match(g2.notSpaceStart)?.[0],i=t.replace(g2.endingNewline,"")+`
`;return o?'<pre><code class="language-'+n8(o)+'">'+(n?i:n8(i,!0))+`</code></pre>
`:"<pre><code>"+(n?i:n8(i,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){const e=t.ordered,n=t.start;let o="";for(let s=0;s<t.items.length;s++){const a=t.items[s];o+=this.listitem(a)}const i=e?"ol":"ul",r=e&&n!==1?' start="'+n+'"':"";return"<"+i+r+`>
`+o+"</"+i+`>
`}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+n8(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let o="";for(let i=0;i<t.rows.length;i++){const r=t.rows[i];n="";for(let s=0;s<r.length;s++)n+=this.tablecell(r[s]);o+=this.tablerow({text:n})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+o+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${n8(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const o=this.parser.parseInline(n),i=umn(t);if(i===null)return o;t=i;let r='<a href="'+t+'"';return e&&(r+=' title="'+n8(e)+'"'),r+=">"+o+"</a>",r}image({href:t,title:e,text:n,tokens:o}){o&&(n=this.parser.parseInline(o,this.parser.textRenderer));const i=umn(t);if(i===null)return n8(n);t=i;let r=`<img src="${t}" alt="${n}"`;return e&&(r+=` title="${n8(e)}"`),r+=">",r}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:n8(t.text)}},fqe=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},kS=class vit{options;renderer;textRenderer;constructor(e){this.options=e||zT,this.options.renderer=this.options.renderer||new vfe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fqe}static parse(e,n){return new vit(n).parse(e)}static parseInline(e,n){return new vit(n).parseInline(e)}parse(e,n=!0){let o="";for(let i=0;i<e.length;i++){const r=e[i];if(this.options.extensions?.renderers?.[r.type]){const a=r,A=this.options.extensions.renderers[a.type].call({parser:this},a);if(A!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){o+=A||"";continue}}const s=r;switch(s.type){case"space":{o+=this.renderer.space(s);continue}case"hr":{o+=this.renderer.hr(s);continue}case"heading":{o+=this.renderer.heading(s);continue}case"code":{o+=this.renderer.code(s);continue}case"table":{o+=this.renderer.table(s);continue}case"blockquote":{o+=this.renderer.blockquote(s);continue}case"list":{o+=this.renderer.list(s);continue}case"html":{o+=this.renderer.html(s);continue}case"paragraph":{o+=this.renderer.paragraph(s);continue}case"text":{let a=s,A=this.renderer.text(a);for(;i+1<e.length&&e[i+1].type==="text";)a=e[++i],A+=`
`+this.renderer.text(a);n?o+=this.renderer.paragraph({type:"paragraph",raw:A,text:A,tokens:[{type:"text",raw:A,text:A,escaped:!0}]}):o+=A;continue}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return o}parseInline(e,n=this.renderer){let o="";for(let i=0;i<e.length;i++){const r=e[i];if(this.options.extensions?.renderers?.[r.type]){const a=this.options.extensions.renderers[r.type].call({parser:this},r);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){o+=a||"";continue}}const s=r;switch(s.type){case"escape":{o+=n.text(s);break}case"html":{o+=n.html(s);break}case"link":{o+=n.link(s);break}case"image":{o+=n.image(s);break}case"strong":{o+=n.strong(s);break}case"em":{o+=n.em(s);break}case"codespan":{o+=n.codespan(s);break}case"br":{o+=n.br(s);break}case"del":{o+=n.del(s);break}case"text":{o+=n.text(s);break}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return o}},wfe=class{options;block;constructor(t){this.options=t||zT}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?TS.lex:TS.lexInline}provideParser(){return this.block?kS.parse:kS.parseInline}},RKi=class{defaults=cqe();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=kS;Renderer=vfe;TextRenderer=fqe;Lexer=TS;Tokenizer=Qfe;Hooks=wfe;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const o of t)switch(n=n.concat(e.call(this,o)),o.type){case"table":{const i=o;for(const r of i.header)n=n.concat(this.walkTokens(r.tokens,e));for(const r of i.rows)for(const s of r)n=n.concat(this.walkTokens(s.tokens,e));break}case"list":{const i=o;n=n.concat(this.walkTokens(i.items,e));break}default:{const i=o;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(r=>{const s=i[r].flat(1/0);n=n.concat(this.walkTokens(s,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const r=e.renderers[i.name];r?e.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=r.apply(this,s)),a}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=e[i.level];r?r.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),o.extensions=e),n.renderer){const i=this.defaults.renderer||new vfe(this.defaults);for(const r in n.renderer){if(!(r in i))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const s=r,a=n.renderer[s],A=i[s];i[s]=(...c)=>{let l=a.apply(i,c);return l===!1&&(l=A.apply(i,c)),l||""}}o.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Qfe(this.defaults);for(const r in n.tokenizer){if(!(r in i))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const s=r,a=n.tokenizer[s],A=i[s];i[s]=(...c)=>{let l=a.apply(i,c);return l===!1&&(l=A.apply(i,c)),l}}o.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new wfe;for(const r in n.hooks){if(!(r in i))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const s=r,a=n.hooks[s],A=i[s];wfe.passThroughHooks.has(r)?i[s]=c=>{if(this.defaults.async)return Promise.resolve(a.call(i,c)).then(u=>A.call(i,u));const l=a.call(i,c);return A.call(i,l)}:i[s]=(...c)=>{let l=a.apply(i,c);return l===!1&&(l=A.apply(i,c)),l}}o.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,r=n.walkTokens;o.walkTokens=function(s){let a=[];return a.push(r.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return TS.lex(t,e??this.defaults)}parser(t,e){return kS.parse(t,e??this.defaults)}parseMarkdown(t){return(n,o)=>{const i={...o},r={...this.defaults,...i},s=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=t);const a=r.hooks?r.hooks.provideLexer():t?TS.lex:TS.lexInline,A=r.hooks?r.hooks.provideParser():t?kS.parse:kS.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(c=>a(c,r)).then(c=>r.hooks?r.hooks.processAllTokens(c):c).then(c=>r.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=>c):c).then(c=>A(c,r)).then(c=>r.hooks?r.hooks.postprocess(c):c).catch(s);try{r.hooks&&(n=r.hooks.preprocess(n));let c=a(n,r);r.hooks&&(c=r.hooks.processAllTokens(c)),r.walkTokens&&this.walkTokens(c,r.walkTokens);let l=A(c,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(c){return s(c)}}}onError(t,e){return n=>{if(n.message+=`
Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+n8(n.message+"",!0)+"</pre>";return e?Promise.resolve(o):o}if(e)return Promise.reject(n);throw n}}},JT=new RKi;function lu(t,e){return JT.parse(t,e)}lu.options=lu.setOptions=function(t){return JT.setOptions(t),lu.defaults=JT.defaults,Xpn(lu.defaults),lu},lu.getDefaults=cqe,lu.defaults=zT,lu.use=function(...t){return JT.use(...t),lu.defaults=JT.defaults,Xpn(lu.defaults),lu},lu.walkTokens=function(t,e){return JT.walkTokens(t,e)},lu.parseInline=JT.parseInline,lu.Parser=kS,lu.parser=kS.parse,lu.Renderer=vfe,lu.TextRenderer=fqe,lu.Lexer=TS,lu.lexer=TS.lex,lu.Tokenizer=Qfe,lu.Hooks=wfe,lu.parse=lu,lu.options,lu.setOptions,lu.use,lu.walkTokens,lu.parseInline,kS.parse,TS.lex;const TKi=({review:t,onBack:e})=>{const[n,o]=ee.useState(t.ai_review_text??null),i=Hw(),r=t.ai_review_id;ee.useEffect(()=>{if(!r)return;let a;async function A(){try{const c=await i.get("ai_reviews/get",{searchParams:{ai_review_id:r}}),{ai_review:l}=await c.json();if(l.ai_review_text){o(l.ai_review_text);return}}catch(c){console.error("Failed to load AI review text",c)}a=setTimeout(A,1e3)}return a=setTimeout(A,1e3),()=>clearTimeout(a)},[r]);const s=ee.useMemo(()=>lu.parse(t.ai_review_text||""),[t.ai_review_text]);return K.jsxs(K.Fragment,{children:[K.jsxs(zP,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[K.jsx(fA,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),K.jsx(JP,{children:"AI Review"})]}),n?K.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):K.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:K.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[K.jsxs("svg",{className:"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[K.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),K.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),K.jsx("span",{children:"Loading..."})]})})]})},kKi=({isOpen:t,onClose:e,packageName:n})=>{const[o,i]=ee.useState("list_reviews"),[r,s]=ee.useState(null),a=A=>{s(A),i("view_review")};return K.jsx(KT,{open:t,onOpenChange:A=>{A||(i("list_reviews"),s(null),e())},children:K.jsxs(VP,{className:"rf-max-w-2xl",children:[o==="list_reviews"&&K.jsx(XUi,{packageName:n,onSelectReview:a}),o==="view_review"&&r&&K.jsx(TKi,{review:r,onBack:()=>i("list_reviews")})]})})};var $U=(function(){function t(){this.listeners=[]}var e=t.prototype;return e.subscribe=function(o){var i=this,r=o||function(){};return this.listeners.push(r),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(s){return s!==r}),i.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},t})(),Pfe=typeof window>"u";function II(){}function FKi(t,e){return typeof t=="function"?t(e):t}function Iqe(t){return typeof t=="number"&&t>=0&&t!==1/0}function Mfe(t){return Array.isArray(t)?t:[t]}function hmn(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Dfe(t,e,n){return See(t)?typeof e=="function"?ca({},n,{queryKey:t,queryFn:e}):ca({},e,{queryKey:t}):t}function LKi(t,e,n){return See(t)?ca({},e,{mutationKey:t}):typeof t=="function"?ca({},e,{mutationFn:t}):ca({},t)}function $P(t,e,n){return See(t)?[ca({},e,{queryKey:t}),n]:[t||{},e]}function HKi(t,e){if(t===!0&&e===!0||t==null&&e==null)return"all";if(t===!1&&e===!1)return"none";var n=t??!e;return n?"active":"inactive"}function pmn(t,e){var n=t.active,o=t.exact,i=t.fetching,r=t.inactive,s=t.predicate,a=t.queryKey,A=t.stale;if(See(a)){if(o){if(e.queryHash!==Cqe(a,e.options))return!1}else if(!Nfe(e.queryKey,a))return!1}var c=HKi(n,r);if(c==="none")return!1;if(c!=="all"){var l=e.isActive();if(c==="active"&&!l||c==="inactive"&&l)return!1}return!(typeof A=="boolean"&&e.isStale()!==A||typeof i=="boolean"&&e.isFetching()!==i||s&&!s(e))}function mmn(t,e){var n=t.exact,o=t.fetching,i=t.predicate,r=t.mutationKey;if(See(r)){if(!e.options.mutationKey)return!1;if(n){if(WT(e.options.mutationKey)!==WT(r))return!1}else if(!Nfe(e.options.mutationKey,r))return!1}return!(typeof o=="boolean"&&e.state.status==="loading"!==o||i&&!i(e))}function Cqe(t,e){var n=e?.queryKeyHashFn||WT;return n(t)}function WT(t){var e=Mfe(t);return OKi(e)}function OKi(t){return JSON.stringify(t,function(e,n){return yqe(n)?Object.keys(n).sort().reduce(function(o,i){return o[i]=n[i],o},{}):n})}function Nfe(t,e){return _mn(Mfe(t),Mfe(e))}function _mn(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(function(n){return!_mn(t[n],e[n])}):!1}function Rfe(t,e){if(t===e)return t;var n=Array.isArray(t)&&Array.isArray(e);if(n||yqe(t)&&yqe(e)){for(var o=n?t.length:Object.keys(t).length,i=n?e:Object.keys(e),r=i.length,s=n?[]:{},a=0,A=0;A<r;A++){var c=n?A:i[A];s[c]=Rfe(t[c],e[c]),s[c]===t[c]&&a++}return o===r&&a===o?t:s}return e}function GKi(t,e){if(t&&!e||e&&!t)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}function yqe(t){if(!fmn(t))return!1;var e=t.constructor;if(typeof e>"u")return!0;var n=e.prototype;return!(!fmn(n)||!n.hasOwnProperty("isPrototypeOf"))}function fmn(t){return Object.prototype.toString.call(t)==="[object Object]"}function See(t){return typeof t=="string"||Array.isArray(t)}function YKi(t){return new Promise(function(e){setTimeout(e,t)})}function Imn(t){Promise.resolve().then(t).catch(function(e){return setTimeout(function(){throw e})})}function Cmn(){if(typeof AbortController=="function")return new AbortController}var UKi=(function(t){NN(e,t);function e(){var o;return o=t.call(this)||this,o.setup=function(i){var r;if(!Pfe&&((r=window)!=null&&r.addEventListener)){var s=function(){return i()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},o}var n=e.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var r,s=this;this.setup=i,(r=this.cleanup)==null||r.call(this),this.cleanup=i(function(a){typeof a=="boolean"?s.setFocused(a):s.onFocus()})},n.setFocused=function(i){this.focused=i,i&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(i){i()})},n.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e})($U),Qee=new UKi,KKi=(function(t){NN(e,t);function e(){var o;return o=t.call(this)||this,o.setup=function(i){var r;if(!Pfe&&((r=window)!=null&&r.addEventListener)){var s=function(){return i()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},o}var n=e.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var r,s=this;this.setup=i,(r=this.cleanup)==null||r.call(this),this.cleanup=i(function(a){typeof a=="boolean"?s.setOnline(a):s.onOnline()})},n.setOnline=function(i){this.online=i,i&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(i){i()})},n.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e})($U),Tfe=new KKi;function VKi(t){return Math.min(1e3*Math.pow(2,t),3e4)}function kfe(t){return typeof t?.cancel=="function"}var ymn=function(e){this.revert=e?.revert,this.silent=e?.silent};function Ffe(t){return t instanceof ymn}var xmn=function(e){var n=this,o=!1,i,r,s,a;this.abort=e.abort,this.cancel=function(g){return i?.(g)},this.cancelRetry=function(){o=!0},this.continueRetry=function(){o=!1},this.continue=function(){return r?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(g,h){s=g,a=h});var A=function(h){n.isResolved||(n.isResolved=!0,e.onSuccess==null||e.onSuccess(h),r?.(),s(h))},c=function(h){n.isResolved||(n.isResolved=!0,e.onError==null||e.onError(h),r?.(),a(h))},l=function(){return new Promise(function(h){r=h,n.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){r=void 0,n.isPaused=!1,e.onContinue==null||e.onContinue()})},u=function g(){if(!n.isResolved){var h;try{h=e.fn()}catch(d){h=Promise.reject(d)}i=function(p){if(!n.isResolved&&(c(new ymn(p)),n.abort==null||n.abort(),kfe(h)))try{h.cancel()}catch{}},n.isTransportCancelable=kfe(h),Promise.resolve(h).then(A).catch(function(d){var p,m;if(!n.isResolved){var _=(p=e.retry)!=null?p:3,f=(m=e.retryDelay)!=null?m:VKi,I=typeof f=="function"?f(n.failureCount,d):f,C=_===!0||typeof _=="number"&&n.failureCount<_||typeof _=="function"&&_(n.failureCount,d);if(o||!C){c(d);return}n.failureCount++,e.onFail==null||e.onFail(n.failureCount,d),YKi(I).then(function(){if(!Qee.isFocused()||!Tfe.isOnline())return l()}).then(function(){o?c(d):g()})}})}};u()},zKi=(function(){function t(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var e=t.prototype;return e.batch=function(o){var i;this.transactions++;try{i=o()}finally{this.transactions--,this.transactions||this.flush()}return i},e.schedule=function(o){var i=this;this.transactions?this.queue.push(o):Imn(function(){i.notifyFn(o)})},e.batchCalls=function(o){var i=this;return function(){for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];i.schedule(function(){o.apply(void 0,s)})}},e.flush=function(){var o=this,i=this.queue;this.queue=[],i.length&&Imn(function(){o.batchNotifyFn(function(){i.forEach(function(r){o.notifyFn(r)})})})},e.setNotifyFunction=function(o){this.notifyFn=o},e.setBatchNotifyFunction=function(o){this.batchNotifyFn=o},t})(),dh=new zKi,Emn=console;function Lfe(){return Emn}function JKi(t){Emn=t}var WKi=(function(){function t(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var e=t.prototype;return e.setOptions=function(o){var i;this.options=ca({},this.defaultOptions,o),this.meta=o?.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:300*1e3)},e.setDefaultOptions=function(o){this.defaultOptions=o},e.scheduleGc=function(){var o=this;this.clearGcTimeout(),Iqe(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){o.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(o,i){var r,s,a=this.state.data,A=FKi(o,a);return(r=(s=this.options).isDataEqual)!=null&&r.call(s,a,A)?A=a:this.options.structuralSharing!==!1&&(A=Rfe(a,A)),this.dispatch({data:A,type:"success",dataUpdatedAt:i?.updatedAt}),A},e.setState=function(o,i){this.dispatch({type:"setState",state:o,setStateOptions:i})},e.cancel=function(o){var i,r=this.promise;return(i=this.retryer)==null||i.cancel(o),r?r.then(II).catch(II):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(o){return o.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(o){return o.getCurrentResult().isStale})},e.isStaleByTime=function(o){return o===void 0&&(o=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!hmn(this.state.dataUpdatedAt,o)},e.onFocus=function(){var o,i=this.observers.find(function(r){return r.shouldFetchOnWindowFocus()});i&&i.refetch(),(o=this.retryer)==null||o.continue()},e.onOnline=function(){var o,i=this.observers.find(function(r){return r.shouldFetchOnReconnect()});i&&i.refetch(),(o=this.retryer)==null||o.continue()},e.addObserver=function(o){this.observers.indexOf(o)===-1&&(this.observers.push(o),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:o}))},e.removeObserver=function(o){this.observers.indexOf(o)!==-1&&(this.observers=this.observers.filter(function(i){return i!==o}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:o}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(o,i){var r=this,s,a,A;if(this.state.isFetching){if(this.state.dataUpdatedAt&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(o&&this.setOptions(o),!this.options.queryFn){var l=this.observers.find(function(f){return f.options.queryFn});l&&this.setOptions(l.options)}var u=Mfe(this.queryKey),g=Cmn(),h={queryKey:u,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(g)return r.abortSignalConsumed=!0,g.signal}});var d=function(){return r.options.queryFn?(r.abortSignalConsumed=!1,r.options.queryFn(h)):Promise.reject("Missing queryFn")},p={fetchOptions:i,options:this.options,queryKey:u,state:this.state,fetchFn:d,meta:this.meta};if((s=this.options.behavior)!=null&&s.onFetch){var m;(m=this.options.behavior)==null||m.onFetch(p)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=p.fetchOptions)==null?void 0:a.meta)){var _;this.dispatch({type:"fetch",meta:(_=p.fetchOptions)==null?void 0:_.meta})}return this.retryer=new xmn({fn:p.fetchFn,abort:g==null||(A=g.abort)==null?void 0:A.bind(g),onSuccess:function(I){r.setData(I),r.cache.config.onSuccess==null||r.cache.config.onSuccess(I,r),r.cacheTime===0&&r.optionalRemove()},onError:function(I){Ffe(I)&&I.silent||r.dispatch({type:"error",error:I}),Ffe(I)||(r.cache.config.onError==null||r.cache.config.onError(I,r),Lfe().error(I)),r.cacheTime===0&&r.optionalRemove()},onFail:function(){r.dispatch({type:"failed"})},onPause:function(){r.dispatch({type:"pause"})},onContinue:function(){r.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(o){var i=this;this.state=this.reducer(this.state,o),dh.batch(function(){i.observers.forEach(function(r){r.onQueryUpdate(o)}),i.cache.notify({query:i,type:"queryUpdated",action:o})})},e.getDefaultState=function(o){var i=typeof o.initialData=="function"?o.initialData():o.initialData,r=typeof o.initialData<"u",s=r?typeof o.initialDataUpdatedAt=="function"?o.initialDataUpdatedAt():o.initialDataUpdatedAt:0,a=typeof i<"u";return{data:i,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?"success":"idle"}},e.reducer=function(o,i){var r,s;switch(i.type){case"failed":return ca({},o,{fetchFailureCount:o.fetchFailureCount+1});case"pause":return ca({},o,{isPaused:!0});case"continue":return ca({},o,{isPaused:!1});case"fetch":return ca({},o,{fetchFailureCount:0,fetchMeta:(r=i.meta)!=null?r:null,isFetching:!0,isPaused:!1},!o.dataUpdatedAt&&{error:null,status:"loading"});case"success":return ca({},o,{data:i.data,dataUpdateCount:o.dataUpdateCount+1,dataUpdatedAt:(s=i.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=i.error;return Ffe(a)&&a.revert&&this.revertState?ca({},this.revertState):ca({},o,{error:a,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return ca({},o,{isInvalidated:!0});case"setState":return ca({},o,i.state);default:return o}},t})(),jKi=(function(t){NN(e,t);function e(o){var i;return i=t.call(this)||this,i.config=o||{},i.queries=[],i.queriesMap={},i}var n=e.prototype;return n.build=function(i,r,s){var a,A=r.queryKey,c=(a=r.queryHash)!=null?a:Cqe(A,r),l=this.get(c);return l||(l=new WKi({cache:this,queryKey:A,queryHash:c,options:i.defaultQueryOptions(r),state:s,defaultOptions:i.getQueryDefaults(A),meta:r.meta}),this.add(l)),l},n.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:"queryAdded",query:i}))},n.remove=function(i){var r=this.queriesMap[i.queryHash];r&&(i.destroy(),this.queries=this.queries.filter(function(s){return s!==i}),r===i&&delete this.queriesMap[i.queryHash],this.notify({type:"queryRemoved",query:i}))},n.clear=function(){var i=this;dh.batch(function(){i.queries.forEach(function(r){i.remove(r)})})},n.get=function(i){return this.queriesMap[i]},n.getAll=function(){return this.queries},n.find=function(i,r){var s=$P(i,r),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(A){return pmn(a,A)})},n.findAll=function(i,r){var s=$P(i,r),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(A){return pmn(a,A)}):this.queries},n.notify=function(i){var r=this;dh.batch(function(){r.listeners.forEach(function(s){s(i)})})},n.onFocus=function(){var i=this;dh.batch(function(){i.queries.forEach(function(r){r.onFocus()})})},n.onOnline=function(){var i=this;dh.batch(function(){i.queries.forEach(function(r){r.onOnline()})})},e})($U),$Ki=(function(){function t(n){this.options=ca({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||Bmn(),this.meta=n.meta}var e=t.prototype;return e.setState=function(o){this.dispatch({type:"setState",state:o})},e.addObserver=function(o){this.observers.indexOf(o)===-1&&this.observers.push(o)},e.removeObserver=function(o){this.observers=this.observers.filter(function(i){return i!==o})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(II).catch(II)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var o=this,i,r=this.state.status==="loading",s=Promise.resolve();return r||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){o.mutationCache.config.onMutate==null||o.mutationCache.config.onMutate(o.state.variables,o)}).then(function(){return o.options.onMutate==null?void 0:o.options.onMutate(o.state.variables)}).then(function(a){a!==o.state.context&&o.dispatch({type:"loading",context:a,variables:o.state.variables})})),s.then(function(){return o.executeMutation()}).then(function(a){i=a,o.mutationCache.config.onSuccess==null||o.mutationCache.config.onSuccess(i,o.state.variables,o.state.context,o)}).then(function(){return o.options.onSuccess==null?void 0:o.options.onSuccess(i,o.state.variables,o.state.context)}).then(function(){return o.options.onSettled==null?void 0:o.options.onSettled(i,null,o.state.variables,o.state.context)}).then(function(){return o.dispatch({type:"success",data:i}),i}).catch(function(a){return o.mutationCache.config.onError==null||o.mutationCache.config.onError(a,o.state.variables,o.state.context,o),Lfe().error(a),Promise.resolve().then(function(){return o.options.onError==null?void 0:o.options.onError(a,o.state.variables,o.state.context)}).then(function(){return o.options.onSettled==null?void 0:o.options.onSettled(void 0,a,o.state.variables,o.state.context)}).then(function(){throw o.dispatch({type:"error",error:a}),a})})},e.executeMutation=function(){var o=this,i;return this.retryer=new xmn({fn:function(){return o.options.mutationFn?o.options.mutationFn(o.state.variables):Promise.reject("No mutationFn found")},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(o){var i=this;this.state=qKi(this.state,o),dh.batch(function(){i.observers.forEach(function(r){r.onMutationUpdate(o)}),i.mutationCache.notify(i)})},t})();function Bmn(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function qKi(t,e){switch(e.type){case"failed":return ca({},t,{failureCount:t.failureCount+1});case"pause":return ca({},t,{isPaused:!0});case"continue":return ca({},t,{isPaused:!1});case"loading":return ca({},t,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return ca({},t,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return ca({},t,{data:void 0,error:e.error,failureCount:t.failureCount+1,isPaused:!1,status:"error"});case"setState":return ca({},t,e.state);default:return t}}var XKi=(function(t){NN(e,t);function e(o){var i;return i=t.call(this)||this,i.config=o||{},i.mutations=[],i.mutationId=0,i}var n=e.prototype;return n.build=function(i,r,s){var a=new $Ki({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(r),state:s,defaultOptions:r.mutationKey?i.getMutationDefaults(r.mutationKey):void 0,meta:r.meta});return this.add(a),a},n.add=function(i){this.mutations.push(i),this.notify(i)},n.remove=function(i){this.mutations=this.mutations.filter(function(r){return r!==i}),i.cancel(),this.notify(i)},n.clear=function(){var i=this;dh.batch(function(){i.mutations.forEach(function(r){i.remove(r)})})},n.getAll=function(){return this.mutations},n.find=function(i){return typeof i.exact>"u"&&(i.exact=!0),this.mutations.find(function(r){return mmn(i,r)})},n.findAll=function(i){return this.mutations.filter(function(r){return mmn(i,r)})},n.notify=function(i){var r=this;dh.batch(function(){r.listeners.forEach(function(s){s(i)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var i=this.mutations.filter(function(r){return r.state.isPaused});return dh.batch(function(){return i.reduce(function(r,s){return r.then(function(){return s.continue().catch(II)})},Promise.resolve())})},e})($U);function ZKi(){return{onFetch:function(e){e.fetchFn=function(){var n,o,i,r,s,a,A=(n=e.fetchOptions)==null||(o=n.meta)==null?void 0:o.refetchPage,c=(i=e.fetchOptions)==null||(r=i.meta)==null?void 0:r.fetchMore,l=c?.pageParam,u=c?.direction==="forward",g=c?.direction==="backward",h=((s=e.state.data)==null?void 0:s.pages)||[],d=((a=e.state.data)==null?void 0:a.pageParams)||[],p=Cmn(),m=p?.signal,_=d,f=!1,I=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},C=function(R,F,O,U){return _=U?[F].concat(_):[].concat(_,[F]),U?[O].concat(R):[].concat(R,[O])},y=function(R,F,O,U){if(f)return Promise.reject("Cancelled");if(typeof O>"u"&&!F&&R.length)return Promise.resolve(R);var Y={queryKey:e.queryKey,signal:m,pageParam:O,meta:e.meta},W=I(Y),te=Promise.resolve(W).then(function(J){return C(R,O,J,U)});if(kfe(W)){var j=te;j.cancel=W.cancel}return te},x;if(!h.length)x=y([]);else if(u){var E=typeof l<"u",B=E?l:bmn(e.options,h);x=y(h,E,B)}else if(g){var S=typeof l<"u",Q=S?l:eVi(e.options,h);x=y(h,S,Q,!0)}else(function(){_=[];var k=typeof e.options.getNextPageParam>"u",R=A&&h[0]?A(h[0],0,h):!0;x=R?y([],k,d[0]):Promise.resolve(C([],d[0],h[0]));for(var F=function(Y){x=x.then(function(W){var te=A&&h[Y]?A(h[Y],Y,h):!0;if(te){var j=k?d[Y]:bmn(e.options,W);return y(W,k,j)}return Promise.resolve(C(W,d[Y],h[Y]))})},O=1;O<h.length;O++)F(O)})();var w=x.then(function(k){return{pages:k,pageParams:_}}),M=w;return M.cancel=function(){f=!0,p?.abort(),kfe(x)&&x.cancel()},w}}}}function bmn(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function eVi(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}var tVi=(function(){function t(n){n===void 0&&(n={}),this.queryCache=n.queryCache||new jKi,this.mutationCache=n.mutationCache||new XKi,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=t.prototype;return e.mount=function(){var o=this;this.unsubscribeFocus=Qee.subscribe(function(){Qee.isFocused()&&Tfe.isOnline()&&(o.mutationCache.onFocus(),o.queryCache.onFocus())}),this.unsubscribeOnline=Tfe.subscribe(function(){Qee.isFocused()&&Tfe.isOnline()&&(o.mutationCache.onOnline(),o.queryCache.onOnline())})},e.unmount=function(){var o,i;(o=this.unsubscribeFocus)==null||o.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},e.isFetching=function(o,i){var r=$P(o,i),s=r[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(o){return this.mutationCache.findAll(ca({},o,{fetching:!0})).length},e.getQueryData=function(o,i){var r;return(r=this.queryCache.find(o,i))==null?void 0:r.state.data},e.getQueriesData=function(o){return this.getQueryCache().findAll(o).map(function(i){var r=i.queryKey,s=i.state,a=s.data;return[r,a]})},e.setQueryData=function(o,i,r){var s=Dfe(o),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(i,r)},e.setQueriesData=function(o,i,r){var s=this;return dh.batch(function(){return s.getQueryCache().findAll(o).map(function(a){var A=a.queryKey;return[A,s.setQueryData(A,i,r)]})})},e.getQueryState=function(o,i){var r;return(r=this.queryCache.find(o,i))==null?void 0:r.state},e.removeQueries=function(o,i){var r=$P(o,i),s=r[0],a=this.queryCache;dh.batch(function(){a.findAll(s).forEach(function(A){a.remove(A)})})},e.resetQueries=function(o,i,r){var s=this,a=$P(o,i,r),A=a[0],c=a[1],l=this.queryCache,u=ca({},A,{active:!0});return dh.batch(function(){return l.findAll(A).forEach(function(g){g.reset()}),s.refetchQueries(u,c)})},e.cancelQueries=function(o,i,r){var s=this,a=$P(o,i,r),A=a[0],c=a[1],l=c===void 0?{}:c;typeof l.revert>"u"&&(l.revert=!0);var u=dh.batch(function(){return s.queryCache.findAll(A).map(function(g){return g.cancel(l)})});return Promise.all(u).then(II).catch(II)},e.invalidateQueries=function(o,i,r){var s,a,A,c=this,l=$P(o,i,r),u=l[0],g=l[1],h=ca({},u,{active:(s=(a=u.refetchActive)!=null?a:u.active)!=null?s:!0,inactive:(A=u.refetchInactive)!=null?A:!1});return dh.batch(function(){return c.queryCache.findAll(u).forEach(function(d){d.invalidate()}),c.refetchQueries(h,g)})},e.refetchQueries=function(o,i,r){var s=this,a=$P(o,i,r),A=a[0],c=a[1],l=dh.batch(function(){return s.queryCache.findAll(A).map(function(g){return g.fetch(void 0,ca({},c,{meta:{refetchPage:A?.refetchPage}}))})}),u=Promise.all(l).then(II);return c?.throwOnError||(u=u.catch(II)),u},e.fetchQuery=function(o,i,r){var s=Dfe(o,i,r),a=this.defaultQueryOptions(s);typeof a.retry>"u"&&(a.retry=!1);var A=this.queryCache.build(this,a);return A.isStaleByTime(a.staleTime)?A.fetch(a):Promise.resolve(A.state.data)},e.prefetchQuery=function(o,i,r){return this.fetchQuery(o,i,r).then(II).catch(II)},e.fetchInfiniteQuery=function(o,i,r){var s=Dfe(o,i,r);return s.behavior=ZKi(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(o,i,r){return this.fetchInfiniteQuery(o,i,r).then(II).catch(II)},e.cancelMutations=function(){var o=this,i=dh.batch(function(){return o.mutationCache.getAll().map(function(r){return r.cancel()})});return Promise.all(i).then(II).catch(II)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(o){return this.mutationCache.build(this,o).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(o){this.defaultOptions=o},e.setQueryDefaults=function(o,i){var r=this.queryDefaults.find(function(s){return WT(o)===WT(s.queryKey)});r?r.defaultOptions=i:this.queryDefaults.push({queryKey:o,defaultOptions:i})},e.getQueryDefaults=function(o){var i;return o?(i=this.queryDefaults.find(function(r){return Nfe(o,r.queryKey)}))==null?void 0:i.defaultOptions:void 0},e.setMutationDefaults=function(o,i){var r=this.mutationDefaults.find(function(s){return WT(o)===WT(s.mutationKey)});r?r.defaultOptions=i:this.mutationDefaults.push({mutationKey:o,defaultOptions:i})},e.getMutationDefaults=function(o){var i;return o?(i=this.mutationDefaults.find(function(r){return Nfe(o,r.mutationKey)}))==null?void 0:i.defaultOptions:void 0},e.defaultQueryOptions=function(o){if(o?._defaulted)return o;var i=ca({},this.defaultOptions.queries,this.getQueryDefaults(o?.queryKey),o,{_defaulted:!0});return!i.queryHash&&i.queryKey&&(i.queryHash=Cqe(i.queryKey,i)),i},e.defaultQueryObserverOptions=function(o){return this.defaultQueryOptions(o)},e.defaultMutationOptions=function(o){return o?._defaulted?o:ca({},this.defaultOptions.mutations,this.getMutationDefaults(o?.mutationKey),o,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},t})(),nVi=(function(t){NN(e,t);function e(o,i){var r;return r=t.call(this)||this,r.client=o,r.options=i,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(i),r}var n=e.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Smn(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return xqe(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return xqe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(i,r){var s=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();var A=this.hasListeners();A&&Qmn(this.currentQuery,a,this.options,s)&&this.executeFetch(),this.updateResult(r),A&&(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var c=this.computeRefetchInterval();A&&(this.currentQuery!==a||this.options.enabled!==s.enabled||c!==this.currentRefetchInterval)&&this.updateRefetchInterval(c)},n.getOptimisticResult=function(i){var r=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,r);return this.createResult(s,r)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(i,r){var s=this,a={},A=function(l){s.trackedProps.includes(l)||s.trackedProps.push(l)};return Object.keys(i).forEach(function(c){Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:function(){return A(c),i[c]}})}),(r.useErrorBoundary||r.suspense)&&A("error"),a},n.getNextResult=function(i){var r=this;return new Promise(function(s,a){var A=r.subscribe(function(c){c.isFetching||(A(),c.isError&&i?.throwOnError?a(c.error):s(c))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(i){return this.fetch(ca({},i,{meta:{refetchPage:i?.refetchPage}}))},n.fetchOptimistic=function(i){var r=this,s=this.client.defaultQueryObserverOptions(i),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return r.createResult(a,s)})},n.fetch=function(i){var r=this;return this.executeFetch(i).then(function(){return r.updateResult(),r.currentResult})},n.executeFetch=function(i){this.updateQuery();var r=this.currentQuery.fetch(this.options,i);return i?.throwOnError||(r=r.catch(II)),r},n.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Pfe||this.currentResult.isStale||!Iqe(this.options.staleTime))){var r=hmn(this.currentResult.dataUpdatedAt,this.options.staleTime),s=r+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},s)}},n.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},n.updateRefetchInterval=function(i){var r=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Pfe||this.options.enabled===!1||!Iqe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(r.options.refetchIntervalInBackground||Qee.isFocused())&&r.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(i,r){var s=this.currentQuery,a=this.options,A=this.currentResult,c=this.currentResultState,l=this.currentResultOptions,u=i!==s,g=u?i.state:this.currentQueryInitialState,h=u?this.currentResult:this.previousQueryResult,d=i.state,p=d.dataUpdatedAt,m=d.error,_=d.errorUpdatedAt,f=d.isFetching,I=d.status,C=!1,y=!1,x;if(r.optimisticResults){var E=this.hasListeners(),B=!E&&Smn(i,r),S=E&&Qmn(i,s,r,a);(B||S)&&(f=!0,p||(I="loading"))}if(r.keepPreviousData&&!d.dataUpdateCount&&h?.isSuccess&&I!=="error")x=h.data,p=h.dataUpdatedAt,I=h.status,C=!0;else if(r.select&&typeof d.data<"u")if(A&&d.data===c?.data&&r.select===this.selectFn)x=this.selectResult;else try{this.selectFn=r.select,x=r.select(d.data),r.structuralSharing!==!1&&(x=Rfe(A?.data,x)),this.selectResult=x,this.selectError=null}catch(M){Lfe().error(M),this.selectError=M}else x=d.data;if(typeof r.placeholderData<"u"&&typeof x>"u"&&(I==="loading"||I==="idle")){var Q;if(A?.isPlaceholderData&&r.placeholderData===l?.placeholderData)Q=A.data;else if(Q=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof Q<"u")try{Q=r.select(Q),r.structuralSharing!==!1&&(Q=Rfe(A?.data,Q)),this.selectError=null}catch(M){Lfe().error(M),this.selectError=M}typeof Q<"u"&&(I="success",x=Q,y=!0)}this.selectError&&(m=this.selectError,x=this.selectResult,_=Date.now(),I="error");var w={status:I,isLoading:I==="loading",isSuccess:I==="success",isError:I==="error",isIdle:I==="idle",data:x,dataUpdatedAt:p,error:m,errorUpdatedAt:_,failureCount:d.fetchFailureCount,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>g.dataUpdateCount||d.errorUpdateCount>g.errorUpdateCount,isFetching:f,isRefetching:f&&I!=="loading",isLoadingError:I==="error"&&d.dataUpdatedAt===0,isPlaceholderData:y,isPreviousData:C,isRefetchError:I==="error"&&d.dataUpdatedAt!==0,isStale:Eqe(i,r),refetch:this.refetch,remove:this.remove};return w},n.shouldNotifyListeners=function(i,r){if(!r)return!0;var s=this.options,a=s.notifyOnChangeProps,A=s.notifyOnChangePropsExclusions;if(!a&&!A||a==="tracked"&&!this.trackedProps.length)return!0;var c=a==="tracked"?this.trackedProps:a;return Object.keys(i).some(function(l){var u=l,g=i[u]!==r[u],h=c?.some(function(p){return p===l}),d=A?.some(function(p){return p===l});return g&&!d&&(!c||h)})},n.updateResult=function(i){var r=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!GKi(this.currentResult,r)){var s={cache:!0};i?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,r)&&(s.listeners=!0),this.notify(ca({},s,i))}},n.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var r=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r?.removeObserver(this),i.addObserver(this))}},n.onQueryUpdate=function(i){var r={};i.type==="success"?r.onSuccess=!0:i.type==="error"&&!Ffe(i.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()},n.notify=function(i){var r=this;dh.batch(function(){i.onSuccess?(r.options.onSuccess==null||r.options.onSuccess(r.currentResult.data),r.options.onSettled==null||r.options.onSettled(r.currentResult.data,null)):i.onError&&(r.options.onError==null||r.options.onError(r.currentResult.error),r.options.onSettled==null||r.options.onSettled(void 0,r.currentResult.error)),i.listeners&&r.listeners.forEach(function(s){s(r.currentResult)}),i.cache&&r.client.getQueryCache().notify({query:r.currentQuery,type:"observerResultsUpdated"})})},e})($U);function oVi(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Smn(t,e){return oVi(t,e)||t.state.dataUpdatedAt>0&&xqe(t,e,e.refetchOnMount)}function xqe(t,e,n){if(e.enabled!==!1){var o=typeof n=="function"?n(t):n;return o==="always"||o!==!1&&Eqe(t,e)}return!1}function Qmn(t,e,n,o){return n.enabled!==!1&&(t!==e||o.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&Eqe(t,n)}function Eqe(t,e){return t.isStaleByTime(e.staleTime)}var iVi=(function(t){NN(e,t);function e(o,i){var r;return r=t.call(this)||this,r.client=o,r.setOptions(i),r.bindMethods(),r.updateResult(),r}var n=e.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(i){this.options=this.client.defaultMutationOptions(i)},n.onUnsubscribe=function(){if(!this.listeners.length){var i;(i=this.currentMutation)==null||i.removeObserver(this)}},n.onMutationUpdate=function(i){this.updateResult();var r={listeners:!0};i.type==="success"?r.onSuccess=!0:i.type==="error"&&(r.onError=!0),this.notify(r)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(i,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,ca({},this.options,{variables:typeof i<"u"?i:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var i=this.currentMutation?this.currentMutation.state:Bmn(),r=ca({},i,{isLoading:i.status==="loading",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=r},n.notify=function(i){var r=this;dh.batch(function(){r.mutateOptions&&(i.onSuccess?(r.mutateOptions.onSuccess==null||r.mutateOptions.onSuccess(r.currentResult.data,r.currentResult.variables,r.currentResult.context),r.mutateOptions.onSettled==null||r.mutateOptions.onSettled(r.currentResult.data,null,r.currentResult.variables,r.currentResult.context)):i.onError&&(r.mutateOptions.onError==null||r.mutateOptions.onError(r.currentResult.error,r.currentResult.variables,r.currentResult.context),r.mutateOptions.onSettled==null||r.mutateOptions.onSettled(void 0,r.currentResult.error,r.currentResult.variables,r.currentResult.context))),i.listeners&&r.listeners.forEach(function(s){s(r.currentResult)})})},e})($U),rVi=NFt.unstable_batchedUpdates;dh.setBatchNotifyFunction(rVi);var sVi=console;JKi(sVi);var vmn=Fs.createContext(void 0),wmn=Fs.createContext(!1);function Pmn(t){return t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=vmn),window.ReactQueryClientContext):vmn}var Bqe=function(){var e=Fs.useContext(Pmn(Fs.useContext(wmn)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},aVi=function(e){var n=e.client,o=e.contextSharing,i=o===void 0?!1:o,r=e.children;Fs.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var s=Pmn(i);return Fs.createElement(wmn.Provider,{value:i},Fs.createElement(s.Provider,{value:n},r))};function AVi(){var t=!1;return{clearReset:function(){t=!1},reset:function(){t=!0},isReset:function(){return t}}}var cVi=Fs.createContext(AVi()),lVi=function(){return Fs.useContext(cVi)};function Mmn(t,e,n){return typeof e=="function"?e.apply(void 0,n):typeof e=="boolean"?e:!!t}function uVi(t,e,n){var o=Fs.useRef(!1),i=Fs.useState(0),r=i[1],s=LKi(t,e),a=Bqe(),A=Fs.useRef();A.current?A.current.setOptions(s):A.current=new iVi(a,s);var c=A.current.getCurrentResult();Fs.useEffect(function(){o.current=!0;var u=A.current.subscribe(dh.batchCalls(function(){o.current&&r(function(g){return g+1})}));return function(){o.current=!1,u()}},[]);var l=Fs.useCallback(function(u,g){A.current.mutate(u,g).catch(II)},[]);if(c.error&&Mmn(void 0,A.current.options.useErrorBoundary,[c.error]))throw c.error;return ca({},c,{mutate:l,mutateAsync:c.mutate})}function gVi(t,e){var n=Fs.useRef(!1),o=Fs.useState(0),i=o[1],r=Bqe(),s=lVi(),a=r.defaultQueryObserverOptions(t);a.optimisticResults=!0,a.onError&&(a.onError=dh.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=dh.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=dh.batchCalls(a.onSettled)),a.suspense&&(typeof a.staleTime!="number"&&(a.staleTime=1e3),a.cacheTime===0&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(s.isReset()||(a.retryOnMount=!1));var A=Fs.useState(function(){return new e(r,a)}),c=A[0],l=c.getOptimisticResult(a);if(Fs.useEffect(function(){n.current=!0,s.clearReset();var u=c.subscribe(dh.batchCalls(function(){n.current&&i(function(g){return g+1})}));return c.updateResult(),function(){n.current=!1,u()}},[s,c]),Fs.useEffect(function(){c.setOptions(a,{listeners:!1})},[a,c]),a.suspense&&l.isLoading)throw c.fetchOptimistic(a).then(function(u){var g=u.data;a.onSuccess==null||a.onSuccess(g),a.onSettled==null||a.onSettled(g,null)}).catch(function(u){s.clearReset(),a.onError==null||a.onError(u),a.onSettled==null||a.onSettled(void 0,u)});if(l.isError&&!s.isReset()&&!l.isFetching&&Mmn(a.suspense,a.useErrorBoundary,[l.error,c.getCurrentQuery()]))throw l.error;return a.notifyOnChangeProps==="tracked"&&(l=c.trackResult(l,a)),l}function dVi(t,e,n){var o=Dfe(t,e,n);return gVi(o,nVi)}function hVi({orderQuote:t,selectedShippingCarrier:e,onSelectShippingCarrier:n,lowestShippingCarrierCost:o}){const i=e?t.shipping_options.find(r=>r.carrier===e):null;return K.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[K.jsx(bbi,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),K.jsx("span",{className:"rf-font-semibold rf-text-lg",children:t.vendor_name.toUpperCase()})]}),K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[K.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[K.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",o.toFixed(2)]}),K.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),K.jsx("hr",{className:"rf-border-gray-200"}),K.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[K.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),K.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:t.shipping_options.map((r,s)=>K.jsxs("button",{type:"button",className:Oi("rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white",e===r.carrier?"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500":"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300"),onClick:()=>n(r.carrier),children:[K.jsx(wbi,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),K.jsxs("div",{className:"rf-text-left rf-flex-1",children:[K.jsx("div",{className:"rf-leading-tight rf-font-medium",children:r.carrier}),K.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[K.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",r.cost.toFixed(2)]}),K.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},r.carrier+s))})]}),e!==null&&i&&K.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:K.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[K.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[K.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(t.total_cost_without_shipping+i.cost).toFixed(2)]}),K.jsx("div",{className:"rf-flex rf-items-center",children:K.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const pVi=async t=>{try{const{order_quote_id:e}=await gq.post("order_quotes/create",{json:{package_release_id:t,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof Wb){const n=await e.response.json();throw{error:{message:n.message,error_code:n.error_code}}}throw e}},mVi=async t=>{const{order_quote:e}=await gq.get("order_quotes/get",{searchParams:{order_quote_id:t}}).json();return e},_Vi=()=>{const t=Bqe();return uVi({mutationKey:["createOrderQuote"],mutationFn:e=>pVi(e),onSuccess:e=>{t.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},fVi=t=>{const{data:e,error:n,status:o}=dVi(["getOrderQuote",t],()=>mVi(t||""),{enabled:!!t,refetchInterval:i=>i?.is_completed||i?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:o==="loading"?"loading":o==="error"?"error":"success",data:e??null,error:n instanceof Error?n:null}},IVi=({onCancel:t,packageReleaseId:e,signIn:n,isLoggedIn:o})=>{const[i,r]=ee.useState(null),[s,a]=ee.useState(null),{mutate:A,error:c}=_Vi();ee.useEffect(()=>{e&&A(e,{onSuccess:p=>{a(p.order_quote_id)}})},[e]);const{data:l}=fVi(s||void 0),u=c&&c.error?.message||l?.error?.message;hpn({errorMessage:u});const g=async p=>{const m=uq("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${m}?client_reference_id=${p}&shipping_option=${i}`};ee.useEffect(()=>{if(i===null&&l&&Array.isArray(l.shipping_options)&&l.shipping_options.length>0){const p=l.shipping_options.reduce((m,_)=>_.cost<m.cost?_:m,l.shipping_options[0]);r(p?.carrier||null)}},[l]);const h=ee.useMemo(()=>l&&Array.isArray(l.shipping_options)&&l.shipping_options.length>0?l.shipping_options.reduce((p,m)=>m.cost<p.cost?m:p,l.shipping_options[0]).cost:0,[l]),d=c&&c.error?.error_code?.includes("no_token")||l?.error?.error_code?.includes("no_token")&&n;return!o||d?K.jsx(xVi,{signIn:n}):K.jsxs("div",{className:`
      rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl 
      rf-p-4 sm:rf-p-6 md:rf-p-8 
      rf-flex rf-flex-col rf-gap-3
      rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl
    `,children:[K.jsx("h2",{className:"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(c||l?.error)&&(!s||!l||l?.is_processing)&&K.jsx(CVi,{message:"Fetching quotes..."}),(c||l?.error)&&K.jsx(yVi,{message:c&&c.error?.message||l?.error?.message||"Failed to fetch quotes"}),l?.is_completed&&!c&&!l?.error&&Array.isArray(l?.shipping_options)&&l.shipping_options.length>0&&K.jsxs(K.Fragment,{children:[K.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-2 sm:rf-p-3 rf-rounded-md rf-text-center rf-text-xs sm:rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),K.jsx(hVi,{orderQuote:l,selectedShippingCarrier:i,onSelectShippingCarrier:r,lowestShippingCarrierCost:h+(l.total_cost_without_shipping||0)},l?.order_quote_id)]}),K.jsxs("div",{className:"rf-flex rf-flex-col-reverse sm:rf-flex-row rf-justify-between rf-mt-5 rf-gap-3 sm:rf-gap-4",children:[K.jsx(fA,{variant:"outline",type:"button",className:"rf-w-full sm:rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600 rf-text-sm sm:rf-text-base",onClick:t,children:"Cancel"}),K.jsx(fA,{type:"button",className:"rf-w-full sm:rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700 rf-text-sm sm:rf-text-base",disabled:i===null,onClick:()=>{if(i===null){ua.error("Please select a shipping option.");return}l&&g(l.order_quote_id)},children:"Continue"})]}),K.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-3 sm:rf-mt-4 rf-px-2",children:"Pricing may vary based on specifications."})]})},CVi=({message:t})=>K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[K.jsx(SE,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),K.jsx("p",{className:"rf-text-gray-600",children:t})]}),yVi=({message:t})=>K.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:t}),xVi=({signIn:t})=>K.jsxs("div",{className:`
    rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl 
    rf-p-4 sm:rf-p-6 md:rf-p-8 
    rf-flex rf-flex-col rf-gap-3
    rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl
  `,children:[K.jsx("h2",{className:"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4 sm:rf-py-6 md:rf-py-8",children:[K.jsx("p",{className:"rf-text-gray-600 rf-text-sm sm:rf-text-base rf-text-center rf-px-2",children:"Please sign in to continue"}),K.jsxs(fA,{onClick:t,className:"rf-flex rf-items-center rf-gap-2 rf-text-sm sm:rf-text-base rf-px-4 sm:rf-px-6",children:[K.jsx(nWe,{className:"rf-w-4 rf-h-4 sm:rf-w-5 sm:rf-h-5"}),"Sign in with GitHub"]})]})]}),EVi=new tVi,BVi=({isOpen:t,onClose:e,stage:n,setStage:o,circuitJson:i,packageReleaseId:r,signIn:s,isLoggedIn:a})=>K.jsx(aVi,{client:EVi,children:K.jsx(KT,{open:t,onOpenChange:A=>{A||e()},children:K.jsx(VP,{className:`
          !rf-p-0 !rf-z-[101] rf-rounded-md
          !rf-w-[95vw] !rf-max-w-[95vw]
          sm:rf-w-[90vw] sm:rf-max-w-[500px]
          md:rf-w-auto md:rf-max-w-[660px]
          lg:rf-max-w-[720px]
          xl:rf-max-w-[800px]
          rf-max-h-[90vh] rf-overflow-y-auto
        `,children:K.jsx("div",{className:"rf-relative rf-w-full",children:n==="initial"&&K.jsx(IVi,{onCancel:e,packageReleaseId:r??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),bVi=({isOpen:t,onClose:e,stage:n,setStage:o,signIn:i,isLoggedIn:r})=>{const s=md(a=>a.circuitJson);return K.jsx(BVi,{signIn:i,isOpen:t,onClose:e,stage:n,setStage:o,circuitJson:s,isLoggedIn:r??!1})},SVi=()=>{const[t,e]=ee.useState(!1),[n,o]=ee.useState("initial");return{isOpen:t,stage:n,open:()=>e(!0),close:()=>{e(!1),o("initial")},setStage:o,OrderDialog:bVi}};async function Dmn(){const t=await fetch(`${QC}/files/list`),{file_list:e}=await t.json(),n=new Map;for(const o of e){const r=await(await fetch(`${QC}/files/get?file_path=${encodeURIComponent(o.file_path)}`)).json();(r.file?.text_content||r.file?.binary_content_b64)&&n.set(o.file_path,{text_content:r.file.text_content,binary_content_b64:r.file.binary_content_b64})}return n}const QVi="https://api.tscircuit.com/bug_reports/view?bug_report_id=",vVi=t=>`${QVi}${t}`,wVi=t=>{const[e,n]=ee.useState(!1),[o,i]=ee.useState(!1),[r,s]=ee.useState(null),[a,A]=ee.useState(null),[c,l]=ee.useState([]),u=ee.useRef(null),[g,h]=ee.useState(null),[d,p]=ee.useState(0),m=t?.onLoginRequired,_=ee.useMemo(()=>zge()?!0:typeof document>"u"?!1:document.cookie.split(";").some(x=>x.trim().startsWith("session=")),[e]);ee.useEffect(()=>{if(e&&!g&&u.current){const x=typeof window<"u"?window.__TSCIRCUIT_LAST_EXECUTION_ERROR:void 0;x&&(u.current.value=`I'm getting this execution error:

${x}`)}},[e,g]),ee.useEffect(()=>{e&&!g&&Dmn().then(x=>{p(x.size)}).catch(x=>{console.error("Failed to fetch file count",x),p(0)})},[e,g]);const f=ee.useCallback(()=>{s(null),h(null),A(null),l([]),u.current&&(u.current.value=""),n(!0)},[]),I=ee.useCallback(()=>{n(!1)},[]),C=ee.useCallback(async()=>{i(!0),s(null),A(null),l([]);const x=Hw(),E=u.current?.value||"";try{const B=await Dmn();if(B.size===0){ua.error("No project files available to include in the bug report"),i(!1);return}const S=new Date(Date.now()+1440*60*1e3).toISOString(),w=(await x.post("bug_reports/create",{json:{text:E.trim()||void 0,is_auto_deleted:!0,delete_at:S}}).json()).bug_report.bug_report_id,M=Array.from(B.entries()),k=[];for(let F=0;F<M.length;F++){const[O,U]=M[F];A({current:F+1,total:M.length,currentFile:O});try{const Y={bug_report_id:w,file_path:O};U.text_content&&(Y.content_text=U.text_content),U.binary_content_b64&&(Y.content_base64=U.binary_content_b64),await x.post("bug_reports/upload_file",{json:Y})}catch(Y){const W=Y instanceof Wb?`HTTP ${Y.response.status}`:Y instanceof Error?Y.message:"Upload failed";k.push({filePath:O,message:W}),l([...k])}}A(null);const R=vVi(w);h({bugReportUrl:R})}catch(B){if(console.error("Failed to submit bug report",B),B instanceof Wb)if(B.response.status===401)if(_){const S="Your session has expired. Please sign in again to continue.";s(S),ua.error(S),m&&(I(),m())}else{const S="You must be logged in to report a bug. Please sign in via cli and try again.";s(S),ua.error(S),setTimeout(()=>{m&&(I(),m())},1e3)}else{const S=`Failed to submit bug report (${B.response.status})`;s(S),ua.error(S)}else if(B instanceof Error)s(B.message),ua.error(B.message);else{const S="Failed to submit bug report";s(S),ua.error(S)}}finally{i(!1)}},[_,m]);return{BugReportDialog:ee.useMemo(()=>{const x=a?Math.round(a.current/a.total*100):0;return K.jsx(Epn,{open:e,onOpenChange:E=>{E?(s(null),h(null),A(null),l([]),n(!0)):o||I()},children:K.jsxs(k$e,{children:[K.jsxs(F$e,{children:[K.jsx(H$e,{children:g?"Bug Report Created":"Report Bug"}),K.jsx(O$e,{asChild:!0,children:g?K.jsxs("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:[K.jsx("p",{children:"Bug report created successfully."}),c.length>0&&K.jsxs("div",{className:"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-28 rf-overflow-y-auto rf-overflow-x-hidden",children:[K.jsxs("p",{className:"rf-text-red-700 rf-font-medium rf-text-xs rf-mb-1",children:[c.length," file(s) failed:"]}),c.map((E,B)=>K.jsxs("div",{className:"rf-text-red-600 rf-text-xs rf-mb-0.5",title:`${E.filePath}: ${E.message}`,children:[K.jsx("span",{className:"rf-font-medium rf-break-all",children:E.filePath.split("/").pop()}),K.jsx("span",{className:"rf-text-red-500 rf-block rf-truncate",children:E.message})]},B))]}),K.jsx("div",{children:K.jsx("a",{className:"rf-text-blue-600 hover:rf-underline",href:g.bugReportUrl,target:"_blank",rel:"noreferrer",children:"View bug report"})}),K.jsxs("p",{children:["Please share this link privately with tscircuit staff so we can help debug. Join the",K.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"tscircuit Discord"}),"."]})]}):K.jsx("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:a?K.jsxs("div",{className:"rf-space-y-2 rf-overflow-hidden",children:[K.jsxs("div",{className:"rf-flex rf-justify-between rf-text-xs",children:[K.jsx("span",{children:"Uploading files..."}),K.jsxs("span",{children:[a.current,"/",a.total]})]}),K.jsx("div",{className:"rf-w-full rf-h-2 rf-bg-gray-200 rf-rounded-full rf-overflow-hidden",children:K.jsx("div",{className:"rf-h-full rf-bg-blue-500 rf-transition-all rf-duration-150",style:{width:`${x}%`}})}),K.jsx("p",{className:"rf-text-xs rf-text-gray-500 rf-break-all rf-truncate rf-w-full rf-max-w-full",children:`${a.currentFile.slice(0,60)}${a.currentFile.length>60?"...":""}`}),c.length>0&&K.jsx("div",{className:"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-20 rf-overflow-y-auto rf-overflow-x-hidden",children:c.map((E,B)=>K.jsxs("div",{className:"rf-text-red-600 rf-text-xs rf-mb-0.5",title:`${E.filePath}: ${E.message}`,children:[K.jsx("span",{className:"rf-font-medium rf-break-all",children:E.filePath.split("/").pop()}),K.jsx("span",{className:"rf-text-red-500 rf-block rf-truncate",children:E.message})]},B))})]}):K.jsxs(K.Fragment,{children:[K.jsxs("p",{children:["Reporting a bug will upload your entire project",d>0?` (${d} file${d===1?"":"s"})`:""," ","to tscircuit support."]}),K.jsxs("div",{className:"rf-space-y-2",children:[K.jsx("label",{htmlFor:"bug-description",className:"rf-block rf-font-medium",children:"Description (optional)"}),K.jsx("textarea",{ref:u,id:"bug-description",className:"rf-w-full rf-min-h-[100px] rf-px-3 rf-py-2 rf-text-sm rf-border rf-border-gray-300 rf-rounded-md focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-blue-500",placeholder:"Describe the issue you're experiencing...",disabled:o})]}),K.jsxs("p",{children:["Share the generated bug report link privately with tscircuit staff so we can help debug your issue. You can also reach out on our",K.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"Discord community"}),"."]}),!_&&K.jsx("p",{className:"rf-text-red-600",children:"You appear to be logged out. Please log in before reporting a bug or the upload will fail."}),r&&K.jsx("p",{className:"rf-text-red-600",children:r})]})})})]}),K.jsx(L$e,{children:g?K.jsx("button",{type:"button",className:gU(),onClick:()=>{I()},children:"Close"}):K.jsxs(K.Fragment,{children:[K.jsx(G$e,{disabled:o,onClick:()=>{o||I()},children:"Cancel"}),!_&&m?K.jsx("button",{type:"button",className:gU(),onClick:E=>{E.preventDefault(),I(),m()},children:"Sign In"}):K.jsx("button",{type:"button",className:NB(gU(),o&&"rf-opacity-70 rf-cursor-not-allowed"),disabled:o,onClick:E=>{E.preventDefault(),C()},children:o?"Reporting...":"Upload & Report"})]})})]})},"bug-report-dialog")},[e,o,I,r,g,d,_,C,m,a,c]),openBugReportDialog:f}};function PVi({open:t,onOpenChange:e,onExport:n}){const[o,i]=ee.useState(!1),r=()=>{n({includeSilkscreen:o}),e(!1)},s=()=>{e(!1)};return K.jsx(KT,{open:t,onOpenChange:e,children:K.jsxs(VP,{children:[K.jsxs(zP,{children:[K.jsx(JP,{children:"LightBurn Export Options"}),K.jsx(VT,{children:"Configure export settings for PCB laser ablation with LightBurn"})]}),K.jsx("div",{className:"rf-flex rf-flex-col rf-gap-4 rf-py-4",children:K.jsxs("div",{className:"rf-flex rf-items-center rf-space-x-2",children:[K.jsx(Iee,{id:"includeSilkscreen",checked:o,onCheckedChange:a=>i(a===!0)}),K.jsx("label",{htmlFor:"includeSilkscreen",className:"rf-text-xs rf-font-medium rf-leading-none peer-disabled:rf-cursor-not-allowed peer-disabled:rf-opacity-70",children:"Include silkscreen layer"})]})}),K.jsxs(jU,{children:[K.jsx(fA,{variant:"outline",onClick:s,children:"Cancel"}),K.jsx(fA,{onClick:r,children:"Export"})]})]})})}const MVi=/#(\d+)/,DVi=t=>{const e=t.match(MVi);if(!e)return null;const n=Number.parseInt(e[1],10);return Number.isFinite(n)?n:null},NVi=t=>{if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null},RVi=t=>{if(!t)return null;let e=null,n=-1,o=-1;for(const[i,r]of Object.entries(t)){const s=DVi(i),a=NVi(r.createdAt);if(s!==null){s>n&&(n=s,e={key:i,value:r});continue}if(n===-1){if(a!==null&&a>o){o=a,e={key:i,value:r};continue}e||(e={key:i,value:r})}}return e};var TVi=Object.defineProperty,kVi=(t,e)=>TVi(t,"name",{value:e,configurable:!0});function bqe(t,[e,n]){return Math.min(n,Math.max(e,t))}kVi(bqe,"clamp");var FVi=Object.defineProperty,LVi=(t,e)=>FVi(t,"name",{value:e,configurable:!0});function Nmn(t){const e=ee.useRef({value:t,previous:t});return ee.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}LVi(Nmn,"usePrevious");var HVi=Object.defineProperty,OVi=(t,e)=>HVi(t,"name",{value:e,configurable:!0}),Rmn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),GVi=ee.forwardRef(OVi(function(e,n){return K.jsx(Na.span,{...e,ref:n,style:{...Rmn,...e.style}})},"VisuallyHidden")),YVi=GVi,UVi=Object.defineProperty,nl=(t,e)=>UVi(t,"name",{value:e,configurable:!0}),KVi=[" ","Enter","ArrowUp","ArrowDown"],VVi=[" ","Enter"],qU="Select",[Hfe,Ofe,zVi]=tge(qU),[jT,kmr]=Nx(qU,[zVi,PP]),Sqe=PP(),[JVi,qP]=jT(qU),[WVi,jVi]=jT(qU);function Tmn(t){const{__scopeSelect:e,children:n,open:o,defaultOpen:i,onOpenChange:r,value:s,defaultValue:a,onValueChange:A,dir:c,name:l,autoComplete:u,disabled:g,required:h,form:d,internal_do_not_use_render:p}=t,m=Sqe(e),[_,f]=ee.useState(null),[I,C]=ee.useState(null),[y,x]=ee.useState(!1),E=Q$(c),[B,S]=DB({prop:o,defaultProp:i??!1,onChange:r,caller:qU}),[Q,w]=DB({prop:s,defaultProp:a,onChange:A,caller:qU}),M=ee.useRef(null),k=ee.useRef(Q);ee.useEffect(()=>{const J=d?_?.ownerDocument.getElementById(d):_?.form;if(J instanceof HTMLFormElement){const oe=nl(()=>w(k.current),"reset");return J.addEventListener("reset",oe),()=>J.removeEventListener("reset",oe)}},[d,_,w]);const R=_?!!d||!!_.closest("form"):!0,[F,O]=ee.useState(new Set),U=t_(),Y=Array.from(F).map(J=>J.props.value).join(";"),W=ee.useCallback(J=>{O(oe=>new Set(oe).add(J))},[]),te=ee.useCallback(J=>{O(oe=>{const ie=new Set(oe);return ie.delete(J),ie})},[]),j={required:h,trigger:_,onTriggerChange:f,valueNode:I,onValueNodeChange:C,valueNodeHasChildren:y,onValueNodeHasChildrenChange:x,contentId:U,value:Q,onValueChange:w,open:B,onOpenChange:S,dir:E,triggerPointerDownPosRef:M,disabled:g,name:l,autoComplete:u,form:d,nativeOptions:F,nativeSelectKey:Y,isFormControl:R};return K.jsx(CZ,{...m,children:K.jsx(JVi,{scope:e,...j,children:K.jsx(Hfe.Provider,{scope:e,children:K.jsx(WVi,{scope:e,onNativeOptionAdd:W,onNativeOptionRemove:te,children:$mn(p)?p(j):n})})})})}nl(Tmn,"SelectProvider");var $Vi=nl(t=>{const{__scopeSelect:e,children:n,...o}=t;return K.jsx(Tmn,{__scopeSelect:e,...o,internal_do_not_use_render:({isFormControl:i})=>K.jsxs(K.Fragment,{children:[n,i?K.jsx(Izi,{__scopeSelect:e}):null]})})},"Select"),qVi="SelectTrigger",kmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,disabled:i=!1,...r}=e,s=Sqe(o),a=qP(qVi,o),A=a.disabled||i,c=$A(n,a.onTriggerChange),l=Ofe(o),u=ee.useRef("touch"),[g,h,d]=wqe(m=>{const _=l().filter(C=>!C.disabled),f=_.find(C=>C.value===a.value),I=Pqe(_,m,f);I!==void 0&&a.onValueChange(I.value)}),p=nl(m=>{A||(a.onOpenChange(!0),d()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})},"handleOpen");return K.jsx(Hme,{asChild:!0,...s,children:K.jsx(Na.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:A,"data-disabled":A?"":void 0,"data-placeholder":vee(a.value)?"":void 0,...r,ref:c,onClick:ar(r.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&p(m)}),onPointerDown:ar(r.onPointerDown,m=>{u.current=m.pointerType;const _=m.target;_.hasPointerCapture(m.pointerId)&&_.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(p(m),m.preventDefault())}),onKeyDown:ar(r.onKeyDown,m=>{const _=g.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(_&&m.key===" ")&&KVi.includes(m.key)&&(p(),m.preventDefault())})})})},"SelectTrigger")),XVi="SelectValue",ZVi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,className:i,style:r,children:s,placeholder:a="",...A}=e,c=qP(XVi,o),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,g=$A(n,c.onValueNodeChange);Ep(()=>{l(u)},[l,u]);const h=vee(c.value);return K.jsx(Na.span,{...A,asChild:h?!1:A.asChild,ref:g,style:{pointerEvents:"none"},children:K.jsx(ee.Fragment,{children:h?a:s},h?"placeholder":"value")})},"SelectValue")),ezi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,children:i,...r}=e;return K.jsx(Na.span,{"aria-hidden":!0,...r,ref:n,children:i||"▼"})},"SelectIcon")),tzi="SelectPortal",[nzi,ozi]=jT(tzi,{forceMount:void 0}),izi=nl(t=>{const{__scopeSelect:e,forceMount:n,...o}=t;return K.jsx(nzi,{scope:t.__scopeSelect,forceMount:n,children:K.jsx(Gme,{asChild:!0,...o})})},"SelectPortal"),$T="SelectContent",Fmn=ee.forwardRef(nl(function(e,n){const o=ozi($T,e.__scopeSelect),{forceMount:i=o.forceMount,...r}=e,s=qP($T,e.__scopeSelect),[a,A]=ee.useState();return Ep(()=>{A(new DocumentFragment)},[]),K.jsx(uE,{present:i||s.open,children:({present:c})=>c?K.jsx(azi,{...r,ref:n}):K.jsx(rzi,{...r,fragment:a})})},"SelectContent")),rzi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,children:i,fragment:r}=e;return r?c6.createPortal(K.jsx(Lmn,{scope:o,children:K.jsx(Hfe.Slot,{scope:o,children:K.jsx("div",{ref:n,children:i})})}),r):null},"SelectContentFragment")),s9=10,[Lmn,qT]=jT($T),szi=MB("SelectContent.RemoveScroll"),azi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o}=e,{position:i="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:A,sideOffset:c,align:l,alignOffset:u,arrowPadding:g,collisionBoundary:h,collisionPadding:d,sticky:p,hideWhenDetached:m,avoidCollisions:_,...f}=e,I=qP($T,o),[C,y]=ee.useState(null),[x,E]=ee.useState(null),B=$A(n,y),[S,Q]=ee.useState(null),[w,M]=ee.useState(null),k=Ofe(o),[R,F]=ee.useState(!1),O=ee.useRef(!1);ee.useEffect(()=>{if(C)return Kme(C)},[C]),hU();const U=ee.useCallback(_e=>{const[ue,...fe]=k().map(Me=>Me.ref.current),[pe]=fe.slice(-1),ye=document.activeElement;for(const Me of _e)if(Me===ye||(Me?.scrollIntoView({block:"nearest"}),Me===ue&&x&&(x.scrollTop=0),Me===pe&&x&&(x.scrollTop=x.scrollHeight),Me?.focus(),document.activeElement!==ye))return},[k,x]),Y=ee.useCallback(()=>U([S,C]),[U,S,C]);ee.useEffect(()=>{R&&Y()},[R,Y]);const{onOpenChange:W,triggerPointerDownPosRef:te}=I;ee.useEffect(()=>{if(C){let _e={x:0,y:0};const ue=nl(pe=>{_e={x:Math.abs(Math.round(pe.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(pe.pageY)-(te.current?.y??0))}},"handlePointerMove"),fe=nl(pe=>{_e.x<=10&&_e.y<=10?pe.preventDefault():pe.composedPath().includes(C)||W(!1),document.removeEventListener("pointermove",ue),te.current=null},"handlePointerUp");return te.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",fe,{capture:!0})}}},[C,W,te]),ee.useEffect(()=>{const _e=nl(()=>W(!1),"close");return window.addEventListener("blur",_e),window.addEventListener("resize",_e),()=>{window.removeEventListener("blur",_e),window.removeEventListener("resize",_e)}},[W]);const[j,J]=wqe(_e=>{const ue=k().filter(ye=>!ye.disabled),fe=ue.find(ye=>ye.ref.current===document.activeElement),pe=Pqe(ue,_e,fe);pe&&setTimeout(()=>pe.ref.current?.focus())}),oe=ee.useCallback((_e,ue,fe)=>{const pe=!O.current&&!fe;(I.value!==void 0&&I.value===ue||pe)&&(Q(_e),pe&&(O.current=!0))},[I.value]),ie=ee.useCallback(()=>C?.focus(),[C]),ne=ee.useCallback((_e,ue,fe)=>{const pe=!O.current&&!fe;(I.value!==void 0&&I.value===ue||pe)&&M(_e)},[I.value]),le=i==="popper"?Hmn:Azi,ge=le===Hmn?{side:A,sideOffset:c,align:l,alignOffset:u,arrowPadding:g,collisionBoundary:h,collisionPadding:d,sticky:p,hideWhenDetached:m,avoidCollisions:_}:{};return K.jsx(Lmn,{scope:o,content:C,viewport:x,onViewportChange:E,itemRefCallback:oe,selectedItem:S,onItemLeave:ie,itemTextRefCallback:ne,focusSelectedItem:Y,selectedItemText:w,position:i,isPositioned:R,searchRef:j,children:K.jsx(yZ,{as:szi,allowPinchZoom:!0,children:K.jsx(Sme,{asChild:!0,trapped:I.open,onMountAutoFocus:_e=>{_e.preventDefault()},onUnmountAutoFocus:ar(r,_e=>{I.trigger?.focus({preventScroll:!0}),_e.preventDefault()}),children:K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:_e=>_e.preventDefault(),onDismiss:()=>I.onOpenChange(!1),children:K.jsx(le,{role:"listbox",id:I.contentId,"data-state":I.open?"open":"closed",dir:I.dir,onContextMenu:_e=>_e.preventDefault(),...f,...ge,onPlaced:()=>F(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...f.style},onKeyDown:ar(f.onKeyDown,_e=>{const ue=_e.ctrlKey||_e.altKey||_e.metaKey;if(_e.key==="Tab"&&_e.preventDefault(),!ue&&_e.key.length===1&&J(_e.key),["ArrowUp","ArrowDown","Home","End"].includes(_e.key)){let pe=k().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);if(["ArrowUp","End"].includes(_e.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(_e.key)){const ye=_e.target,Me=pe.indexOf(ye);pe=pe.slice(Me+1)}setTimeout(()=>U(pe)),_e.preventDefault()}})})})})})})},"SelectContentImpl")),Azi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,onPlaced:i,...r}=e,s=qP($T,o),a=qT($T,o),[A,c]=ee.useState(null),[l,u]=ee.useState(null),g=$A(n,u),h=Ofe(o),d=ee.useRef(!1),p=ee.useRef(!0),{viewport:m,selectedItem:_,selectedItemText:f,focusSelectedItem:I}=a,C=ee.useCallback(()=>{if(s.trigger&&s.valueNode&&A&&l&&m&&_&&f){const B=s.trigger.getBoundingClientRect(),S=l.getBoundingClientRect(),Q=s.valueNode.getBoundingClientRect(),w=f.getBoundingClientRect();if(s.dir!=="rtl"){const ye=w.left-S.left,Me=Q.left-ye,ve=B.left-Me,he=B.width+ve,Qe=Math.max(he,S.width),Pe=window.innerWidth-s9,we=bqe(Me,[s9,Math.max(s9,Pe-Qe)]);A.style.minWidth=he+"px",A.style.left=we+"px"}else{const ye=S.right-w.right,Me=window.innerWidth-Q.right-ye,ve=window.innerWidth-B.right-Me,he=B.width+ve,Qe=Math.max(he,S.width),Pe=window.innerWidth-s9,we=bqe(Me,[s9,Math.max(s9,Pe-Qe)]);A.style.minWidth=he+"px",A.style.right=we+"px"}const M=h(),k=window.innerHeight-s9*2,R=m.scrollHeight,F=window.getComputedStyle(l),O=parseInt(F.borderTopWidth,10),U=parseInt(F.paddingTop,10),Y=parseInt(F.borderBottomWidth,10),W=parseInt(F.paddingBottom,10),te=O+U+R+W+Y,j=Math.min(_.offsetHeight*5,te),J=window.getComputedStyle(m),oe=parseInt(J.paddingTop,10),ie=parseInt(J.paddingBottom,10),ne=B.top+B.height/2-s9,le=k-ne,ge=_.offsetHeight/2,_e=_.offsetTop+ge,ue=O+U+_e,fe=te-ue;if(ue<=ne){const ye=M.length>0&&_===M[M.length-1].ref.current;A.style.bottom="0px";const Me=l.clientHeight-m.offsetTop-m.offsetHeight,ve=Math.max(le,ge+(ye?ie:0)+Me+Y),he=ue+ve;A.style.height=he+"px"}else{const ye=M.length>0&&_===M[0].ref.current;A.style.top="0px";const ve=Math.max(ne,O+m.offsetTop+(ye?oe:0)+ge)+fe;A.style.height=ve+"px",m.scrollTop=ue-ne+m.offsetTop}A.style.margin=`${s9}px 0`,A.style.minHeight=j+"px",A.style.maxHeight=k+"px",i?.(),requestAnimationFrame(()=>d.current=!0)}},[h,s.trigger,s.valueNode,A,l,m,_,f,s.dir,i]);Ep(()=>C(),[C]);const[y,x]=ee.useState();Ep(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]);const E=ee.useCallback(B=>{B&&p.current===!0&&(C(),I?.(),p.current=!1)},[C,I]);return K.jsx(czi,{scope:o,contentWrapper:A,shouldExpandOnScrollRef:d,onScrollButtonChange:E,children:K.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:K.jsx(Na.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})},"SelectItemAlignedPosition")),Hmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,align:i="start",collisionPadding:r=s9,...s}=e,a=Sqe(o);return K.jsx(Ome,{...a,...s,ref:n,align:i,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[czi,Qqe]=jT($T,{}),Omn="SelectViewport",lzi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,nonce:i,...r}=e,s=qT(Omn,o),a=Qqe(Omn,o),A=$A(n,s.onViewportChange),c=ee.useRef(0);return K.jsxs(K.Fragment,{children:[K.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),K.jsx(Hfe.Slot,{scope:o,children:K.jsx(Na.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:A,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:ar(r.onScroll,l=>{const u=l.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:h}=a;if(h?.current&&g){const d=Math.abs(c.current-u.scrollTop);if(d>0){const p=window.innerHeight-s9*2,m=parseFloat(g.style.minHeight),_=parseFloat(g.style.height),f=Math.max(m,_);if(f<p){const I=f+d,C=Math.min(p,I),y=I-C;g.style.height=C+"px",g.style.bottom==="0px"&&(u.scrollTop=y>0?y:0,g.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})},"SelectViewport")),uzi="SelectGroup",[Fmr,gzi]=jT(uzi),dzi="SelectLabel",Gmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,...i}=e,r=gzi(dzi,o);return K.jsx(Na.div,{id:r.id,...i,ref:n})},"SelectLabel")),vqe="SelectItem",[hzi,Ymn]=jT(vqe),Umn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,value:i,disabled:r=!1,textValue:s,...a}=e,A=qP(vqe,o),c=qT(vqe,o),l=A.value===i,[u,g]=ee.useState(s??""),[h,d]=ee.useState(!1),p=lE(C=>c.itemRefCallback?.(C,i,r)),m=$A(n,p),_=t_(),f=ee.useRef("touch"),I=nl(()=>{r||(A.onValueChange(i),A.onOpenChange(!1))},"handleSelect");return K.jsx(hzi,{scope:o,value:i,disabled:r,textId:_,isSelected:l,onItemTextChange:ee.useCallback(C=>{g(y=>y||(C?.textContent??"").trim())},[]),children:K.jsx(Hfe.ItemSlot,{scope:o,value:i,disabled:r,textValue:u,children:K.jsx(Na.div,{role:"option","aria-labelledby":_,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:m,onFocus:ar(a.onFocus,()=>d(!0)),onBlur:ar(a.onBlur,()=>d(!1)),onClick:ar(a.onClick,()=>{f.current!=="mouse"&&I()}),onPointerUp:ar(a.onPointerUp,()=>{f.current==="mouse"&&I()}),onPointerDown:ar(a.onPointerDown,C=>{f.current=C.pointerType}),onPointerMove:ar(a.onPointerMove,C=>{f.current=C.pointerType,r?c.onItemLeave?.():f.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ar(a.onPointerLeave,C=>{C.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ar(a.onKeyDown,C=>{r||C.target!==C.currentTarget||c.searchRef?.current!==""&&C.key===" "||(VVi.includes(C.key)&&I(),C.key===" "&&C.preventDefault())})})})})},"SelectItem")),Gfe="SelectItemText",pzi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,className:i,style:r,...s}=e,a=qP(Gfe,o),A=qT(Gfe,o),c=Ymn(Gfe,o),l=jVi(Gfe,o),[u,g]=ee.useState(null),h=lE(I=>A.itemTextRefCallback?.(I,c.value,c.disabled)),d=$A(n,g,c.onItemTextChange,h),p=u?.textContent,m=ee.useMemo(()=>K.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:_,onNativeOptionRemove:f}=l;return Ep(()=>(_(m),()=>f(m)),[_,f,m]),K.jsxs(K.Fragment,{children:[K.jsx(Na.span,{id:c.textId,...s,ref:d}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!vee(a.value)?c6.createPortal(s.children,a.valueNode):null]})},"SelectItemText")),mzi="SelectItemIndicator",_zi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,...i}=e;return Ymn(mzi,o).isSelected?K.jsx(Na.span,{"aria-hidden":!0,...i,ref:n}):null},"SelectItemIndicator")),Kmn="SelectScrollUpButton",Vmn=ee.forwardRef(nl(function(e,n){const o=qT(Kmn,e.__scopeSelect),i=Qqe(Kmn,e.__scopeSelect),[r,s]=ee.useState(!1),a=$A(n,i.onScrollButtonChange);return Ep(()=>{if(o.viewport&&o.isPositioned){let A=function(){const l=c.scrollTop>0;s(l)};nl(A,"handleScroll");const c=o.viewport;return A(),c.addEventListener("scroll",A),()=>c.removeEventListener("scroll",A)}},[o.viewport,o.isPositioned]),r?K.jsx(Wmn,{...e,ref:a,onAutoScroll:()=>{const{viewport:A,selectedItem:c}=o;A&&c&&(A.scrollTop=A.scrollTop-c.offsetHeight)}}):null},"SelectScrollUpButton")),zmn="SelectScrollDownButton",Jmn=ee.forwardRef(nl(function(e,n){const o=qT(zmn,e.__scopeSelect),i=Qqe(zmn,e.__scopeSelect),[r,s]=ee.useState(!1),a=$A(n,i.onScrollButtonChange);return Ep(()=>{if(o.viewport&&o.isPositioned){let A=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};nl(A,"handleScroll");const c=o.viewport;return A(),c.addEventListener("scroll",A),()=>c.removeEventListener("scroll",A)}},[o.viewport,o.isPositioned]),r?K.jsx(Wmn,{...e,ref:a,onAutoScroll:()=>{const{viewport:A,selectedItem:c}=o;A&&c&&(A.scrollTop=A.scrollTop+c.offsetHeight)}}):null},"SelectScrollDownButton")),Wmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,onAutoScroll:i,...r}=e,s=qT("SelectScrollButton",o),a=ee.useRef(null),A=Ofe(o),c=ee.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return ee.useEffect(()=>()=>c(),[c]),Ep(()=>{A().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[A]),K.jsx(Na.div,{"aria-hidden":!0,...r,ref:n,style:{flexShrink:0,...r.style},onPointerDown:ar(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(i,50))}),onPointerMove:ar(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(i,50))}),onPointerLeave:ar(r.onPointerLeave,()=>{c()})})},"SelectScrollButtonImpl")),jmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,...i}=e;return K.jsx(Na.div,{"aria-hidden":!0,...i,ref:n})},"SelectSeparator")),fzi="SelectBubbleInput",Izi=ee.forwardRef(nl(function({__scopeSelect:e,...n},o){const i=qP(fzi,e),{value:r,onValueChange:s,required:a,disabled:A,name:c,autoComplete:l,form:u}=i,{nativeOptions:g,nativeSelectKey:h}=i,d=ee.useRef(null),p=$A(o,d),m=r??"",_=Nmn(m),f=Array.from(g).some(I=>(I.props.value??"")==="");return ee.useEffect(()=>{const I=d.current;if(!I)return;const C=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(C,"value").set;if(_!==m&&x){const E=new Event("change",{bubbles:!0});x.call(I,m),I.dispatchEvent(E)}},[_,m]),K.jsxs(Na.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:c,autoComplete:l,disabled:A,form:u,onChange:I=>s(I.target.value),...n,style:{...Rmn,...n.style},ref:p,defaultValue:m,children:[vee(r)&&!f?K.jsx("option",{value:""}):null,Array.from(g)]},h)},"SelectBubbleInput"));function $mn(t){return typeof t=="function"}nl($mn,"isFunction");function vee(t){return t===""||t===void 0}nl(vee,"shouldShowPlaceholder");function wqe(t){const e=lE(t),n=ee.useRef(""),o=ee.useRef(0),i=ee.useCallback(s=>{const a=n.current+s;e(a),nl((function A(c){n.current=c,window.clearTimeout(o.current),c!==""&&(o.current=window.setTimeout(()=>A(""),1e3))}),"updateSearch")(a)},[e]),r=ee.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return ee.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,i,r]}nl(wqe,"useTypeaheadSearch");function Pqe(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let s=qmn(t,Math.max(r,0));i.length===1&&(s=s.filter(c=>c!==n));const A=s.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return A!==n?A:void 0}nl(Pqe,"findNextItem");function qmn(t,e){return t.map((n,o)=>t[(e+o)%t.length])}nl(qmn,"wrapArray");const Czi=$Vi,yzi=ZVi,Xmn=ee.forwardRef(({className:t,children:e,...n},o)=>K.jsxs(kmn,{ref:o,className:Oi("rf-flex rf-h-10 rf-w-full rf-items-center rf-justify-between rf-rounded-md rf-border rf-border-input rf-bg-background rf-px-3 rf-py-2 rf-text-sm rf-ring-offset-background rf-placeholder:text-muted-foreground focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-ring focus:rf-ring-offset-2 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 [&>span]:rf-line-clamp-1",t),...n,children:[e,K.jsx(ezi,{asChild:!0,children:K.jsx(pZ,{className:"rf-h-4 rf-w-4 rf-opacity-50"})})]}));Xmn.displayName=kmn.displayName;const Zmn=ee.forwardRef(({className:t,...e},n)=>K.jsx(Vmn,{ref:n,className:Oi("rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1",t),...e,children:K.jsx(sbi,{className:"rf-h-4 rf-w-4"})}));Zmn.displayName=Vmn.displayName;const e_n=ee.forwardRef(({className:t,...e},n)=>K.jsx(Jmn,{ref:n,className:Oi("rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1",t),...e,children:K.jsx(pZ,{className:"rf-h-4 rf-w-4"})}));e_n.displayName=Jmn.displayName;const t_n=ee.forwardRef(({className:t,children:e,position:n="popper",...o},i)=>K.jsx(izi,{children:K.jsxs(Fmn,{ref:i,className:Oi("rf-relative rf-z-[100] rf-max-h-96 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-bg-white rf-text-black rf-shadow-md data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:rf-translate-y-1 data-[side=left]:-rf-translate-x-1 data-[side=right]:rf-translate-x-1 data-[side=top]:-rf-translate-y-1",t),position:n,...o,children:[K.jsx(Zmn,{}),K.jsx(lzi,{className:Oi("rf-p-1",n==="popper"&&"rf-h-[var(--radix-select-trigger-height)] rf-w-full rf-min-w-[var(--radix-select-trigger-width)]"),children:e}),K.jsx(e_n,{})]})}));t_n.displayName=Fmn.displayName;const xzi=ee.forwardRef(({className:t,...e},n)=>K.jsx(Gmn,{ref:n,className:Oi("rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-font-semibold",t),...e}));xzi.displayName=Gmn.displayName;const n_n=ee.forwardRef(({className:t,children:e,...n},o)=>K.jsxs(Umn,{ref:o,className:Oi("rf-relative rf-flex rf-w-full rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-text-gray-800 rf-outline-none focus:rf-bg-gray-100 focus:rf-text-gray-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50",t),...n,children:[K.jsx("span",{className:"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center",children:K.jsx(_zi,{children:K.jsx(CS,{className:"rf-h-4 rf-w-4"})})}),K.jsx(pzi,{children:e})]}));n_n.displayName=Umn.displayName;const Ezi=ee.forwardRef(({className:t,...e},n)=>K.jsx(jmn,{ref:n,className:Oi("-rf-mx-1 rf-my-1 rf-h-px rf-bg-muted",t),...e}));Ezi.displayName=jmn.displayName;const o_n="Component Box (3MF)",Mqe=t=>`${t.toFixed(1)} mm`;function Bzi({open:t,onOpenChange:e,circuitJson:n,projectName:o}){mee();const[i,r]=ee.useState(""),[s,a]=ee.useState(null),[A,c]=ee.useState(null),[l,u]=ee.useState(!1),[g,h]=ee.useState(null);ee.useEffect(()=>()=>{A&&URL.revokeObjectURL(A)},[A]),ee.useEffect(()=>{if(!t||i!==o_n)return;let p=!1;return u(!0),a(null),h(null),OUi(n).then(m=>{if(p)return;const _=Uint8Array.from(m.previewPng);a(m),c(URL.createObjectURL(new Blob([_.buffer],{type:"image/png"})))}).catch(m=>{p||h(m instanceof Error?m.message:String(m))}).finally(()=>{p||u(!1)}),()=>{p=!0}},[n,t,i]);const d=p=>{p||(r(""),a(null),c(null),h(null),u(!1)),e(p)};return K.jsx(KT,{open:t,onOpenChange:d,children:K.jsxs(VP,{className:"rf-max-h-[90vh] rf-max-w-3xl rf-overflow-y-auto",children:[K.jsxs(zP,{children:[K.jsx(JP,{children:"Export Accessory"}),K.jsx(VT,{children:"Generate a printable accessory from the components in this circuit."})]}),K.jsxs("div",{className:"rf-grid rf-gap-5 md:rf-grid-cols-[220px_1fr]",children:[K.jsxs("div",{className:"rf-space-y-2",children:[K.jsx("label",{htmlFor:"accessory-select",className:"rf-text-sm rf-font-medium",children:"Accessory"}),K.jsxs(Czi,{value:i,onValueChange:p=>r(p),children:[K.jsx(Xmn,{id:"accessory-select",children:K.jsx(yzi,{placeholder:"Choose an accessory"})}),K.jsx(t_n,{children:K.jsx(n_n,{value:o_n,children:"Component Box"})})]}),K.jsx("p",{className:"rf-text-xs rf-leading-relaxed rf-text-zinc-500",children:"Creates grouped compartments with raised refdes labels as a multi-material 3MF."})]}),K.jsxs("div",{className:"rf-overflow-hidden rf-rounded-lg rf-border rf-border-zinc-200 rf-bg-zinc-50 dark:rf-border-zinc-800 dark:rf-bg-zinc-900",children:[K.jsxs("div",{className:"rf-flex rf-min-h-56 rf-items-center rf-justify-center",children:[!i&&K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-p-8 rf-text-center rf-text-zinc-500",children:[K.jsx(Bbi,{className:"rf-h-10 rf-w-10 rf-stroke-1"}),K.jsx("p",{className:"rf-text-sm",children:"Choose an accessory to generate its preview."})]}),l&&K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-p-8 rf-text-zinc-600 dark:rf-text-zinc-300",children:[K.jsx(SE,{className:"rf-h-8 rf-w-8 rf-animate-spin"}),K.jsx("p",{className:"rf-text-sm",children:"Generating component box…"})]}),g&&!l&&K.jsxs("div",{className:"rf-p-8 rf-text-center",children:[K.jsx("p",{className:"rf-text-sm rf-font-medium rf-text-red-600",children:"Could not generate the preview"}),K.jsx("p",{className:"rf-mt-1 rf-text-xs rf-text-red-500",children:g})]}),A&&s&&!l&&K.jsx("img",{src:A,alt:"Generated component box preview",className:"rf-block rf-h-auto rf-max-h-[300px] rf-w-full rf-object-contain"})]}),s&&!l&&K.jsxs("div",{className:"rf-flex rf-flex-wrap rf-gap-x-5 rf-gap-y-1 rf-border-t rf-border-zinc-200 rf-bg-white rf-px-4 rf-py-3 rf-text-xs rf-text-zinc-600 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-300",children:[K.jsxs("span",{children:[s.compartments.length," compartments"]}),K.jsxs("span",{children:[Mqe(s.dimensions.width)," ×"," ",Mqe(s.dimensions.depth)," ×"," ",Mqe(s.dimensions.height)]})]})]})]}),K.jsxs(jU,{children:[K.jsx(fA,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),K.jsxs(fA,{disabled:!s||l,onClick:()=>{s&&$pn({generatedBox:s,projectName:o})},children:[K.jsx(mZ,{}),"Download 3MF"]})]})]})})}const Yfe=t=>{const e=pfe(ye=>ye.lastRunEvalVersion),n=md(ye=>ye.currentMainComponentPath),[o,i]=ee.useState(null),[r,s]=ee.useState(!1),[a,A]=ee.useState(!0),[c,l]=ee.useState(!1),[u,g]=ee.useState(null),[h,d]=ee.useState(null),[p,m]=ee.useState(!1),[_,f]=ee.useState(null),[I,C]=ee.useState(null),[y,x]=ee.useState(!1),[E,B]=ee.useState(!1),[S,Q]=ee.useState(!1),[w,M]=ee.useState(!1),[k,R]=ee.useState(null),F=SVi(),O=md(ye=>ye.pushEvent),U=md(ye=>ye.recentEvents),Y=ee.useMemo(()=>Date.now(),[]);GGi(ye=>{if(!(new Date(ye.created_at).valueOf()<Y+500)){if(ye.event_type==="FILE_UPDATED"){s(!0);return}if(ye.event_type==="SNIPPET_SAVED"){s(!1),A(!1),f("Snippet saved successfully."),x(!1);return}ye.event_type==="REQUEST_EXPORT"&&(B(!0),f("Export processing..."),x(!1)),ye.event_type==="EXPORT_CREATED"&&(f(`Export created: ${ye.exportFilePath}`),x(!1),B(!1))}}),ee.useEffect(()=>{if(!c||u===null)return;const ye=U.filter(he=>new Date(he.created_at).valueOf()>u),Me=ye.find(he=>he.event_type==="FAILED_TO_SAVE_SNIPPET"),ve=ye.find(he=>he.event_type==="SNIPPET_SAVED");Me&&(l(!1),g(null),C(Me.message??"Failed to save snippet. See console for error."),console.error(Me.message),x(!0),Me.error_code==="SNIPPET_UNSET"&&Me.available_snippet_names&&(d(Me.available_snippet_names),m(!0))),ve&&(l(!1),g(null),f("Snippet saved successfully."),x(!1))},[U,c]);const W=async()=>{l(!0),g(Date.now()),f(null),x(!1),await O({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:o})},j=md(ye=>ye.circuitJson)??t.circuitJson,J=ee.useMemo(()=>{let ye="Untitled";if(n){const Me=n.split("/").pop();Me&&(ye=Me.replace(/\.[^.]+$/,""))}return(t.projectName??o??ye).replace(/\.(board|circuit)$/,"")},[n,t.projectName,o]),[oe,ie]=ee.useState(!1),[ne,le]=ee.useState(!1),{BugReportDialog:ge,openBugReportDialog:_e}=wVi({onLoginRequired:t.onLoginRequired}),ue=async ye=>{k&&(await qpn({circuitJson:k.circuitJson,projectName:k.projectName,options:ye}),R(null))},fe=ee.useMemo(()=>RVi(t.autoroutingLog),[t.autoroutingLog]),pe=ye=>{if(!j){ua.error("No Circuit JSON to export");return}const Me=fe?.value.simpleRouteJson;if(ye==="LightBurn"){R({circuitJson:j,projectName:J}),Q(!0);return}qUi({exportName:ye,circuitJson:j,simpleRouteJson:Me,projectName:J})};return K.jsxs(K.Fragment,{children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-1 rf-flex-shrink-0",children:[K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),K.jsxs(vZ,{className:"rf-z-[101]",children:[!t.isWebEmbedded&&K.jsxs(K.Fragment,{children:[K.jsx(bp,{className:"rf-text-xs",onSelect:W,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&K.jsx(bp,{className:"rf-text-xs",onSelect:()=>{F.open()},children:"Order"}),K.jsx(bp,{className:"rf-text-xs",onSelect:()=>ie(!0),disabled:c,children:"Import"}),K.jsx(bp,{className:"rf-text-xs",onSelect:()=>{if(!zge()){ua.error("Requires tscircuit token");return}le(!0)},children:"AI Review"})]}),!t.isWebEmbedded&&t.onLoginRequired&&K.jsx(bp,{className:"rf-text-xs",onSelect:()=>{t.onLoginRequired?.()},children:"Sign In"}),!t.isWebEmbedded&&K.jsxs(QZ,{children:[K.jsx(BU,{className:"rf-text-xs",children:"Report Bug"}),K.jsx(SZ,{children:K.jsxs(bU,{children:[K.jsx(bp,{className:"rf-text-xs",onSelect:()=>{_e()},children:"Report Entire Circuit"}),K.jsx(bp,{className:"rf-text-xs",disabled:!fe||!t.onReportAutoroutingLog,onSelect:()=>{!fe||!t.onReportAutoroutingLog||t.onReportAutoroutingLog(fe.key,{simpleRouteJson:fe.value.simpleRouteJson})},children:"Report Autorouter Bug"})]})})]}),K.jsxs(QZ,{children:[K.jsx(BU,{className:"rf-text-xs",disabled:E,children:E?"Exporting...":"Export"}),K.jsx(SZ,{children:K.jsx(bU,{children:$Ui.map((ye,Me)=>K.jsx(bp,{onSelect:()=>pe(ye.name),disabled:E||ye.name==="Simple Route JSON"&&!fe,children:K.jsx("span",{className:"rf-text-xs",children:ye.name})},Me))})})]}),K.jsx(bp,{className:"rf-text-xs",disabled:E,onSelect:()=>{if(!j){ua.error("No Circuit JSON to export");return}M(!0)},children:"Export Accessory…"}),!t.isWebEmbedded&&K.jsxs(QZ,{children:[K.jsx(BU,{className:"rf-text-xs",children:"Advanced"}),K.jsx(SZ,{children:K.jsxs(bU,{children:[K.jsx(bp,{className:"rf-flex rf-items-center rf-gap-2",children:K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[K.jsx(Iee,{id:"load-latest-eval",checked:t.shouldLoadLatestEval,onCheckedChange:ye=>{t.onChangeShouldLoadLatestEval?.(ye===!0)}}),K.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&K.jsx(bp,{className:"rf-flex rf-items-center rf-gap-2",children:K.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:K.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),K.jsx(bp,{className:"rf-flex rf-items-center rf-gap-2",children:K.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:K.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/runframe@",LGi.version]})})}),K.jsx(bp,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:K.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:K.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),K.jsx(Epn,{open:y,onOpenChange:x,children:K.jsxs(k$e,{children:[K.jsxs(F$e,{children:[K.jsx(H$e,{children:"Error Saving Snippet"}),K.jsx(O$e,{children:I})]}),K.jsx(L$e,{children:K.jsx(G$e,{onClick:()=>x(!1),children:"Dismiss"})})]})}),K.jsx(OGi,{snippetNames:h??[],onSelect:async ye=>{l(!0),g(Date.now()),i(ye),await O({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:ye}),m(!1)},onCancel:()=>m(!1),isOpen:p})]}),K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"View"})}),K.jsx(vZ,{className:"rf-z-[101]",children:K.jsxs(QZ,{children:[K.jsx(BU,{className:"rf-text-xs",children:"Schematic"}),K.jsx(SZ,{children:K.jsxs(bU,{children:[K.jsx(bp,{className:"rf-flex rf-items-center rf-gap-2",onSelect:ye=>ye.preventDefault(),children:K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[K.jsx(Iee,{id:"show-schematic-ports",checked:t.showSchematicPorts,onCheckedChange:ye=>{t.onChangeShowSchematicPorts?.(ye===!0)}}),K.jsx("label",{htmlFor:"show-schematic-ports",className:"rf-text-xs rf-cursor-pointer",children:"Show Schematic Ports"})]})}),K.jsx(bp,{className:"rf-flex rf-items-center rf-gap-2",onSelect:ye=>ye.preventDefault(),children:K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[K.jsx(Iee,{id:"show-schematic-grid",checked:t.showSchematicDebugGrid,onCheckedChange:ye=>{t.onChangeShowSchematicDebugGrid?.(ye===!0)}}),K.jsx("label",{htmlFor:"show-schematic-grid",className:"rf-text-xs rf-cursor-pointer",children:"Show Schematic Grid"})]})})]})})]})})]})]}),ge,K.jsx(PVi,{open:S,onOpenChange:Q,onExport:ue}),j&&K.jsx(Bzi,{open:w,onOpenChange:M,circuitJson:j,projectName:J}),K.jsx(Wpn,{isOpen:oe,onClose:()=>ie(!1)}),K.jsx(kKi,{isOpen:ne,onClose:()=>le(!1),packageName:o}),K.jsx(ein,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{className:"rf-break-all",style:{zIndex:1e5}}}),K.jsx(F.OrderDialog,{isOpen:F.isOpen,onClose:F.close,stage:F.stage,setStage:F.setStage})]})};var bzi=Object.defineProperty,CI=(t,e)=>bzi(t,"name",{value:e,configurable:!0}),[Dqe,Lmr]=Nx("Tooltip",[PP]),Nqe=PP(),Szi="TooltipProvider",Qzi=700,Rqe="tooltip.open",[vzi,Tqe]=Dqe(Szi),wzi=CI(t=>{const{__scopeTooltip:e,delayDuration:n=Qzi,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:r}=t,s=ee.useRef(!0),a=ee.useRef(!1),A=ee.useRef(0);return ee.useEffect(()=>{const c=A.current;return()=>window.clearTimeout(c)},[]),K.jsx(vzi,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:ee.useCallback(()=>{o<=0||(window.clearTimeout(A.current),s.current=!1)},[o]),onClose:ee.useCallback(()=>{o<=0||(window.clearTimeout(A.current),A.current=window.setTimeout(()=>s.current=!0,o))},[o]),isPointerInTransitRef:a,onPointerInTransitChange:ee.useCallback(c=>{a.current=c},[]),disableHoverableContent:i,children:r})},"TooltipProvider"),kqe="Tooltip",[Pzi,Ufe]=Dqe(kqe),Mzi=CI(t=>{const{__scopeTooltip:e,children:n,open:o,defaultOpen:i,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=t,A=Tqe(kqe,t.__scopeTooltip),c=Nqe(e),[l,u]=ee.useState(null),[g,h]=ee.useState(void 0),d=t_(),p=ee.useRef(0),m=s??A.disableHoverableContent,_=a??A.delayDuration,f=ee.useRef(!1),[I,C]=DB({prop:o,defaultProp:i??!1,onChange:CI(Q=>{Q?(A.onOpen(),document.dispatchEvent(new CustomEvent(Rqe))):A.onClose(),r?.(Q)},"onChange"),caller:kqe}),y=ee.useMemo(()=>I?f.current?"delayed-open":"instant-open":"closed",[I]),x=ee.useCallback(()=>{window.clearTimeout(p.current),p.current=0,f.current=!1,C(!0)},[C]),E=ee.useCallback(()=>{window.clearTimeout(p.current),p.current=0,C(!1)},[C]),B=ee.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{f.current=!0,C(!0),p.current=0},_)},[_,C]);ee.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]);const S=g??d;return K.jsx(CZ,{...c,children:K.jsx(Pzi,{scope:e,contentId:S,setContentId:h,open:I,stateAttribute:y,trigger:l,onTriggerChange:u,onTriggerEnter:ee.useCallback(()=>{A.isOpenDelayedRef.current?B():x()},[A.isOpenDelayedRef,B,x]),onTriggerLeave:ee.useCallback(()=>{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:x,onClose:E,disableHoverableContent:m,children:n})})},"Tooltip"),i_n="TooltipTrigger",Dzi=ee.forwardRef(CI(function(e,n){const{__scopeTooltip:o,...i}=e,r=Ufe(i_n,o),s=Tqe(i_n,o),a=Nqe(o),A=ee.useRef(null),c=$A(n,A,r.onTriggerChange),l=ee.useRef(!1),u=ee.useRef(!1),g=ee.useCallback(()=>l.current=!1,[]);return ee.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),K.jsx(Hme,{asChild:!0,...a,children:K.jsx(Na.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:c,onPointerMove:ar(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:ar(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:ar(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:ar(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:ar(e.onBlur,r.onClose),onClick:ar(e.onClick,r.onClose)})})},"TooltipTrigger")),Nzi="TooltipPortal",[Hmr,Rzi]=Dqe(Nzi,{forceMount:void 0}),wee="TooltipContent",Tzi=ee.forwardRef(CI(function(e,n){const o=Rzi(wee,e.__scopeTooltip),{forceMount:i=o.forceMount,side:r="top",...s}=e,a=Ufe(wee,e.__scopeTooltip);return K.jsx(uE,{present:i||a.open,children:a.disableHoverableContent?K.jsx(r_n,{side:r,...s,ref:n}):K.jsx(kzi,{side:r,...s,ref:n})})},"TooltipContent")),kzi=ee.forwardRef(CI(function(e,n){const o=Ufe(wee,e.__scopeTooltip),i=Tqe(wee,e.__scopeTooltip),r=ee.useRef(null),s=$A(n,r),[a,A]=ee.useState(null),{trigger:c,onClose:l}=o,u=r.current,{onPointerInTransitChange:g}=i,h=ee.useCallback(()=>{A(null),g(!1)},[g]),d=ee.useCallback((p,m)=>{const _=p.currentTarget,f={x:p.clientX,y:p.clientY},I=s_n(f,_.getBoundingClientRect()),C=a_n(f,I),y=A_n(m.getBoundingClientRect()),x=l_n([...C,...y]);A(x),g(!0)},[g]);return ee.useEffect(()=>()=>h(),[h]),ee.useEffect(()=>{if(c&&u){const p=CI(_=>d(_,u),"handleTriggerLeave"),m=CI(_=>d(_,c),"handleContentLeave");return c.addEventListener("pointerleave",p),u.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",p),u.removeEventListener("pointerleave",m)}}},[c,u,d,h]),ee.useEffect(()=>{if(a){const p=CI(m=>{const _=m.target,f={x:m.clientX,y:m.clientY},I=c?.contains(_)||u?.contains(_),C=!c_n(f,a);I?h():C&&(h(),l())},"handleTrackPointerGrace");return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,u,a,l,h]),K.jsx(r_n,{...e,ref:s})},"TooltipContentHoverable")),Fzi=EFt("TooltipContent"),r_n=ee.forwardRef(CI(function(e,n){const{__scopeTooltip:o,children:i,"aria-label":r,id:s,onEscapeKeyDown:a,onPointerDownOutside:A,...c}=e,l=Ufe(wee,o),u=Nqe(o),{onClose:g}=l;ee.useEffect(()=>(document.addEventListener(Rqe,g),()=>document.removeEventListener(Rqe,g)),[g]),ee.useEffect(()=>{if(l.trigger){const d=CI(p=>{p.target instanceof Node&&p.target.contains(l.trigger)&&g()},"handleScroll");return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,g]);const{setContentId:h}=l;return Ep(()=>(h(s),()=>{h(void 0)}),[s,h]),K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:A,onFocusOutside:d=>d.preventDefault(),onDismiss:g,children:K.jsxs(Ome,{"data-state":l.stateAttribute,role:r?void 0:"tooltip",id:r?void 0:l.contentId,...u,...c,ref:n,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[K.jsx(Fzi,{children:i}),r?K.jsx(YVi,{id:l.contentId,role:"tooltip",children:r}):null]})})},"TooltipContentImpl"));function s_n(t,e){const n=Math.abs(e.top-t.y),o=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),r=Math.abs(e.left-t.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}CI(s_n,"getExitSideFromRect");function a_n(t,e,n=5){const o=[];switch(e){case"top":o.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":o.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":o.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":o.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return o}CI(a_n,"getPaddedExitPoints");function A_n(t){const{top:e,right:n,bottom:o,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:o},{x:i,y:o}]}CI(A_n,"getPointsFromRect");function c_n(t,e){const{x:n,y:o}=t;let i=!1;for(let r=0,s=e.length-1;r<e.length;s=r++){const a=e[r],A=e[s],c=a.x,l=a.y,u=A.x,g=A.y;l>o!=g>o&&n<(u-c)*(o-l)/(g-l)+c&&(i=!i)}return i}CI(c_n,"isPointInPolygon");function l_n(t){const e=t.slice();return e.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),u_n(e)}CI(l_n,"getHull");function u_n(t){if(t.length<=1)return t.slice();const e=[];for(let o=0;o<t.length;o++){const i=t[o];for(;e.length>=2;){const r=e[e.length-1],s=e[e.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let o=t.length-1;o>=0;o--){const i=t[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}CI(u_n,"getHullPresorted");var Lzi=wzi,Hzi=Mzi,Ozi=Dzi,g_n=Tzi;const Fqe=Lzi,Lqe=Hzi,Hqe=Ozi,Kfe=ee.forwardRef(({className:t,sideOffset:e=4,...n},o)=>K.jsx(g_n,{ref:o,sideOffset:e,className:Oi("z-50 overflow-hidden rounded-md bg-slate-900 px-3 py-1.5 text-xs text-slate-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-slate-50 dark:text-slate-900",t),...n}));Kfe.displayName=g_n.displayName;const Gzi="24b58135-86c7-4e4b-bf6e-cca862bc4b26",d_n="runframe-crisp-chat-script",Yzi="tscircuit.com",Pee=t=>{window.$crisp=window.$crisp||[],window.$crisp.push(t)},Uzi=()=>{if(window.$crisp=window.$crisp||[],window.CRISP_WEBSITE_ID=Gzi,window.__RUNFRAME_CRISP_CONFIGURED__||(window.__RUNFRAME_CRISP_CONFIGURED__=!0,Pee(["do","chat:hide"]),Pee(["on","chat:closed",()=>Pee(["do","chat:hide"])])),!document.getElementById(d_n)){const t=document.createElement("script");t.id=d_n,t.src="https://client.crisp.chat/l.js",t.async=!0,document.head.appendChild(t)}},Kzi=()=>{Uzi(),Pee(["do","chat:show"]),Pee(["do","chat:open"])},Vzi=({isCli:t,hostname:e=typeof window<"u"?window.location.hostname:void 0}={})=>e?.toLowerCase()===Yzi?!1:!!t,zzi=()=>K.jsx(Fqe,{children:K.jsxs(Lqe,{children:[K.jsx(Hqe,{asChild:!0,children:K.jsx(fA,{type:"button",variant:"ghost",size:"icon","aria-label":"Get Support or Give Feedback",onClick:Kzi,className:"rf-h-8 rf-w-8",children:K.jsx(xbi,{className:"rf-h-4 rf-w-4 rf-text-gray-500"})})}),K.jsx(Kfe,{side:"bottom",children:"Get Support or Give Feedback"})]})}),Jzi=["assembly","pinout","analog_simulation","bom","circuit_json","errors","render_log","autorouting","solvers"],Oqe=t=>t instanceof Error?t.message:"An unknown error occurred",h_n=({code:t,fsMap:e,onRunClicked:n=void 0,errorMessage:o,errorStack:i,circuitJson:r,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:A=!1,codeTabContent:c,showJsonTab:l=!0,showRenderLogTab:u=!0,onActiveTabChange:g,renderLog:h,showImportAndFormatButtons:d=!0,className:p,headerClassName:m,leftHeaderContent:_,readOnly:f,isStreaming:I,autoroutingLog:C,onReportAutoroutingLog:y,isRunningCode:x,hasCodeChangedSinceLastRun:E,onEditEvent:B,editEvents:S,defaultActiveTab:Q,defaultTab:w,availableTabs:M,autoRotate3dViewerDisabled:k,showSchematicDebugGrid:R=!1,showSchematicPorts:F=!1,onChangeShowSchematicDebugGrid:O,onChangeShowSchematicPorts:U,showToggleFullScreen:Y=!0,defaultToFullScreen:W=!1,activeEffectName:te,allowSelectingVersion:j=!0,showFileMenu:J=!1,isWebEmbedded:oe=!1,isCli:ie=!1,projectName:ne,schematicSvgOptions:le,hideSchematicInAnalogSimulation:ge=!1,onRerunWithDebug:_e,solverEvents:ue,autoroutingPhases:fe,onPcbBoundsSelected:pe})=>{mee();const{versions:ye,latestVersion:Me,lastRunEvalVersion:ve,search:he,setSearch:Qe,selectVersion:Pe}=HGi(j),we=ee.useMemo(()=>r?r.filter(Ze=>Ze&&"error_type"in Ze||Ze.type.includes("error")):null,[r]),Te=ee.useMemo(()=>r?r.filter(Ze=>Ze&&"warning_type"in Ze||Ze.type.includes("warning")):null,[r]),Re=ee.useMemo(()=>r?r.some(Ze=>Ze.type==="schematic_group"):!0,[r]),Ee=ee.useMemo(()=>r?.some(Ze=>Ze.type==="pcb_panel"),[r]),ke=(!M||M.includes("schematic"))&&Re&&!Ee,{controller:Ce,focusSchematicComponent:Le}=ANi(),Ye=ke?({source_component_id:Ze})=>{const dt=r?.find(Ut=>Ut.type==="schematic_component"&&Ut.source_component_id===Ze);dt?.type==="schematic_component"&&(Le(dt.schematic_component_id),st("schematic"))}:void 0,tt=ee.useMemo(()=>!r||!x||we?.length?!1:r.some(dt=>dt.type==="simulation_experiment")&&!ojo(r),[r,we,x]),At=ee.useMemo(()=>we?.find(Ze=>Ze.type.startsWith("simulation_")),[we]);hpn({errorMessage:o,errorStack:i,circuitJsonErrors:we});const at=w??M?.[0]??"pcb",[nt,gt]=OO("runframe-active-tab",Q??at,Q);ppn({source:"runframe",component:"CircuitJsonPreview",isWebEmbedded:oe,activeTab:nt});const[bt,Ct]=ee.useState(null),[Dt,kt]=ee.useState(W),[it,Yt]=ee.useState(R),[pn,be]=ee.useState(F),et=O?R:it,It=U?F:pn,Bt=O??Yt,mt=U??be;oOi(Dt);const st=ee.useCallback(Ze=>{gt(Ze),g?.(Ze)},[g,gt]),xt=()=>{kt(!Dt)};ee.useEffect(()=>{o&&(nt!=="errors"&&Ct(nt),st("errors"))},[o]),ee.useEffect(()=>{(nt==="code"||nt==="errors")&&r&&!o&&st(bt??Q??w??M?.[0]??"pcb")},[r]);const Xe=ee.useCallback(Ze=>{window.TSCIRCUIT_3D_OBJECT_REF=Ze===null?void 0:Ze},[]);return K.jsx("div",{className:Oi("flex flex-col relative rf-overflow-x-hidden rf-h-full",p),children:K.jsx("div",{className:Oi("rf-md:sticky rf-md:top-2 rf-h-full",Dt&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:K.jsxs(dRe,{value:nt,onValueChange:st,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[K.jsxs("div",{className:Oi("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",m),children:[_,J&&!_&&K.jsx(Yfe,{isWebEmbedded:oe,circuitJson:r,projectName:ne,autoroutingLog:C,onReportAutoroutingLog:y,showSchematicDebugGrid:et,onChangeShowSchematicDebugGrid:Bt,showSchematicPorts:It,onChangeShowSchematicPorts:mt}),(_||J)&&K.jsx("div",{className:"rf-flex-grow"}),!_&&!J&&x&&K.jsx(SE,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!_&&!J&&K.jsx("div",{className:"rf-flex-grow"}),h&&h.progress!==1&&!o&&K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[te?K.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:te,children:te}):h.lastRenderEvent&&K.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:h.lastRenderEvent?.phase??"",children:h.lastRenderEvent?.phase??""}),K.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:K.jsx(SE,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),K.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((h.progress??0)*100).toFixed(1),"%"]})]}),a&&Vzi({isCli:ie})&&K.jsx(zzi,{}),a&&K.jsxs(Jge,{children:[A&&K.jsx(p6,{value:"code",children:"Code"}),!M||M.includes("pcb")?K.jsxs(p6,{value:"pcb",className:"rf-whitespace-nowrap",children:[r&&K.jsx("span",{className:Oi("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",E?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!M||M.includes("schematic")?K.jsxs(p6,{value:"schematic",className:Oi("rf-whitespace-nowrap",r&&!Re&&"rf-opacity-50"),disabled:r?!Re||Ee:!1,children:[r&&K.jsx("span",{className:Oi("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",E?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!M||M.includes("cad")?K.jsxs(p6,{value:"cad",children:[r&&K.jsx("span",{className:Oi("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",E?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(nt)&&K.jsx(p6,{value:nt,children:xYt(nt)}),K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsxs("button",{type:"button","aria-label":"More views",className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[K.jsx(dbi,{className:"rf-w-4 rf-h-4"}),(we&&we.length>0||o)&&K.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),K.jsxs(vZ,{className:"rf-*:text-xs rf-z-[101]",children:[Jzi.filter(Ze=>!M||M.includes(Ze)).map(Ze=>K.jsxs(bp,{onSelect:()=>st(Ze),children:[nt!==Ze&&K.jsx(pln,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),nt===Ze&&K.jsx(CS,{className:"rf-w-3 rf-h-3"}),K.jsx("div",{className:"rf-pr-2",children:xYt(Ze)}),Ze==="errors"&&(we&&we.length>0||o)&&K.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:o?1:we?.length}),Ze==="solvers"&&ue&&ue.length>0&&K.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-min-w-[12px] rf-h-3 rf-px-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-blue-500 rf-rounded-full",children:ue.length})]},Ze)),K.jsx(bp,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:K.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",mpn.split(".").map((Ze,dt)=>dt===2?parseInt(Ze)+1:Ze).join(".")]})}),j?K.jsxs(QZ,{onOpenChange:Ze=>!Ze&&Qe(""),children:[K.jsx(BU,{className:"rf-text-xs rf-opacity-60",children:K.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",ve??Me??"latest"]})}),K.jsx(SZ,{children:K.jsxs(bU,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[K.jsx("div",{className:"rf-p-1",children:K.jsx(yje,{value:he,onChange:Ze=>Qe(Ze.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),K.jsx(H0n,{}),K.jsx(bp,{onSelect:()=>Pe(null),children:Me?`${Me} (latest)`:"latest"}),ye.map(Ze=>K.jsx(bp,{onSelect:()=>Pe(Ze),children:Ze},Ze))]})})]}):ve&&K.jsx(bp,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:K.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",ve]})})]})]})]}),Y&&K.jsx(fA,{onClick:xt,variant:"ghost",children:Dt?K.jsx(Ebi,{size:16}):K.jsx(fbi,{size:16})})]}),A&&K.jsx(cI,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:K.jsx("div",{className:"rf-h-full",children:c})}),(!M||M.includes("pcb"))&&K.jsx(cI,{value:"pcb",children:K.jsx("div",{className:Oi("rf-overflow-hidden",Dt?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:K.jsx(bE,{fallbackRender:({error:Ze})=>K.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),K.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Oqe(Ze)})]})}),children:r?K.jsx(tOi,{focusOnHover:!1,circuitJson:r,debugGraphics:s,onBoundsSelected:pe,onViewSchematicComponent:Ye,containerClassName:Oi("rf-h-full rf-w-full",Dt?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ze=>{if(B)for(const dt of Ze)B(dt)}}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("assembly"))&&K.jsx(cI,{value:"assembly",children:K.jsx("div",{className:Oi("rf-overflow-auto",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full  rf-min-h-[620px]"),children:K.jsx(bE,{fallback:K.jsx("div",{children:"Error loading Assembly"}),children:r?K.jsx(cNi,{circuitJson:r,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("pinout"))&&K.jsx(cI,{value:"pinout",children:K.jsx("div",{className:Oi("rf-overflow-auto",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full  rf-min-h-[620px]"),children:K.jsx(bE,{fallback:K.jsx("div",{children:"Error loading Pinout Viewer"}),children:r?K.jsx(lNi,{circuitJson:r,containerStyle:{height:"100%"}}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("schematic"))&&K.jsx(cI,{value:"schematic",children:K.jsx("div",{className:Oi("rf-overflow-auto rf-bg-white",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full  rf-min-h-[620px]"),children:K.jsx(bE,{fallbackRender:({error:Ze})=>K.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),K.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Oqe(Ze)})]})}),children:r?K.jsx(zDi,{controller:Ce,circuitJson:r,containerStyle:{height:"100%"},debugGrid:et,showSchematicPorts:It,css:le?.css,className:le?.className}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("cad"))&&K.jsx(cI,{value:"cad",children:K.jsx("div",{className:Oi("rf-overflow-auto",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full  rf-min-h-[620px]"),children:K.jsx(bE,{fallbackRender:({error:Ze,resetErrorBoundary:dt})=>K.jsx(J8i,{error:Ze,resetErrorBoundary:dt}),children:r?K.jsx(V8i,{ref:Xe,circuitJson:r,autoRotateDisabled:k,onViewSchematicComponent:Ye},`cad-${Dt}`):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("analog_simulation"))&&K.jsx(cI,{value:"analog_simulation",children:K.jsx("div",{className:Oi("rf-overflow-auto",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full  rf-min-h-[620px]"),children:K.jsx(bE,{fallback:K.jsx("div",{children:"Error loading Analog Simulation"}),children:r?At?K.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error running analog simulation"}),K.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:At.message})]})}):tt?K.jsx("div",{className:"rf-flex rf-h-full rf-min-h-[300px] rf-items-center rf-justify-center rf-bg-slate-50",children:K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-text-sm rf-text-slate-600",children:[K.jsx(SE,{className:"rf-h-4 rf-w-4 rf-animate-spin"}),"Running analog simulation..."]})}):K.jsx(aNi,{circuitJson:r,hideSchematic:ge,containerStyle:{height:"100%"}}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("bom"))&&K.jsx(cI,{value:"bom",children:K.jsx("div",{className:Oi("rf-overflow-auto",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full  rf-min-h-[620px]"),children:K.jsx(bE,{fallbackRender:({error:Ze})=>K.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),K.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Oqe(Ze)})]})}),children:r?K.jsx(SNi,{circuitJson:r}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("circuit_json"))&&K.jsx(cI,{value:"circuit_json",children:K.jsx("div",{className:Oi("rf-overflow-auto",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full  rf-min-h-[620px]"),children:K.jsx(bE,{fallback:K.jsx("div",{children:"Error loading JSON viewer"}),children:r?K.jsx(dNi,{elements:r}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes("errors"))&&K.jsx(cI,{value:"errors",className:"rf-h-full",children:K.jsx("div",{className:Oi("rf-overflow-hidden",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:o||we&&we.length>0||r?K.jsx(ewi,{code:t,fsMap:e,circuitJsonErrors:we,circuitJsonWarnings:Te,errorMessage:o,errorStack:i,circuitJson:r,evalVersion:ve,autoroutingLog:C,onReportAutoroutingLog:y}):K.jsx(QS,{onRunClicked:n})})}),u&&(!M||M.includes("render_log"))&&K.jsx(cI,{value:"render_log",children:K.jsx(sOi,{renderLog:h,onRerunWithDebug:_e})}),(!M||M.includes("autorouting"))&&K.jsx(cI,{value:"autorouting",children:K.jsx("div",{className:Oi("rf-overflow-auto",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:K.jsx(bE,{fallback:K.jsx("div",{className:"rf-p-4",children:"Error loading autorouting captures"}),children:K.jsx(FGi,{circuitJson:r,phases:fe,isRunning:x})})})}),(!M||M.includes("solvers"))&&K.jsx(cI,{value:"solvers",children:K.jsx("div",{className:Oi("rf-overflow-hidden",Dt?"rf-h-[calc(100vh-60px)]":"rf-h-full rf-min-h-[620px]"),children:K.jsx(bE,{fallback:K.jsx("div",{children:"Error loading Solvers view"}),children:K.jsx(yGi,{solverEvents:ue})})})})]})})})};const p_n=Symbol("Comlink.proxy"),Wzi=Symbol("Comlink.endpoint"),m_n=Symbol("Comlink.releaseProxy"),Gqe=Symbol("Comlink.finalizer"),Vfe=Symbol("Comlink.thrown"),__n=t=>typeof t=="object"&&t!==null||typeof t=="function",jzi={canHandle:t=>__n(t)&&t[p_n],serialize(t){const{port1:e,port2:n}=new MessageChannel;return I_n(t,e),[n,[n]]},deserialize(t){return t.start(),y_n(t)}},$zi={canHandle:t=>__n(t)&&Vfe in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},f_n=new Map([["proxy",jzi],["throw",$zi]]);function qzi(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function I_n(t,e=globalThis,n=["*"]){e.addEventListener("message",function o(i){if(!i||!i.data)return;if(!qzi(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:r,type:s,path:a}=Object.assign({path:[]},i.data),A=(i.data.argumentList||[]).map(XT);let c;try{const l=a.slice(0,-1).reduce((g,h)=>g[h],t),u=a.reduce((g,h)=>g[h],t);switch(s){case"GET":c=u;break;case"SET":l[a.slice(-1)[0]]=XT(i.data.value),c=!0;break;case"APPLY":c=u.apply(l,A);break;case"CONSTRUCT":{const g=new u(...A);c=Uqe(g)}break;case"ENDPOINT":{const{port1:g,port2:h}=new MessageChannel;I_n(t,h),c=nJi(g,[g])}break;case"RELEASE":c=void 0;break;default:return}}catch(l){c={value:l,[Vfe]:0}}Promise.resolve(c).catch(l=>({value:l,[Vfe]:0})).then(l=>{const[u,g]=jfe(l);e.postMessage(Object.assign(Object.assign({},u),{id:r}),g),s==="RELEASE"&&(e.removeEventListener("message",o),C_n(e),Gqe in t&&typeof t[Gqe]=="function"&&t[Gqe]())}).catch(l=>{const[u,g]=jfe({value:new TypeError("Unserializable return value"),[Vfe]:0});e.postMessage(Object.assign(Object.assign({},u),{id:r}),g)})}),e.start&&e.start()}function Xzi(t){return t.constructor.name==="MessagePort"}function C_n(t){Xzi(t)&&t.close()}function y_n(t,e){const n=new Map;return t.addEventListener("message",function(i){const{data:r}=i;if(!r||!r.id)return;const s=n.get(r.id);if(s)try{s(r)}finally{n.delete(r.id)}}),Yqe(t,n,[],e)}function zfe(t){if(t)throw new Error("Proxy has been released and is not useable")}function x_n(t){return XU(t,new Map,{type:"RELEASE"}).then(()=>{C_n(t)})}const Jfe=new WeakMap,Wfe="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(Jfe.get(t)||0)-1;Jfe.set(t,e),e===0&&x_n(t)});function Zzi(t,e){const n=(Jfe.get(e)||0)+1;Jfe.set(e,n),Wfe&&Wfe.register(t,e,t)}function eJi(t){Wfe&&Wfe.unregister(t)}function Yqe(t,e,n=[],o=function(){}){let i=!1;const r=new Proxy(o,{get(s,a){if(zfe(i),a===m_n)return()=>{eJi(r),x_n(t),e.clear(),i=!0};if(a==="then"){if(n.length===0)return{then:()=>r};const A=XU(t,e,{type:"GET",path:n.map(c=>c.toString())}).then(XT);return A.then.bind(A)}return Yqe(t,e,[...n,a])},set(s,a,A){zfe(i);const[c,l]=jfe(A);return XU(t,e,{type:"SET",path:[...n,a].map(u=>u.toString()),value:c},l).then(XT)},apply(s,a,A){zfe(i);const c=n[n.length-1];if(c===Wzi)return XU(t,e,{type:"ENDPOINT"}).then(XT);if(c==="bind")return Yqe(t,e,n.slice(0,-1));const[l,u]=E_n(A);return XU(t,e,{type:"APPLY",path:n.map(g=>g.toString()),argumentList:l},u).then(XT)},construct(s,a){zfe(i);const[A,c]=E_n(a);return XU(t,e,{type:"CONSTRUCT",path:n.map(l=>l.toString()),argumentList:A},c).then(XT)}});return Zzi(r,t),r}function tJi(t){return Array.prototype.concat.apply([],t)}function E_n(t){const e=t.map(jfe);return[e.map(n=>n[0]),tJi(e.map(n=>n[1]))]}const B_n=new WeakMap;function nJi(t,e){return B_n.set(t,e),t}function Uqe(t){return Object.assign(t,{[p_n]:!0})}function jfe(t){for(const[e,n]of f_n)if(n.canHandle(t)){const[o,i]=n.serialize(t);return[{type:"HANDLER",name:e,value:o},i]}return[{type:"RAW",value:t},B_n.get(t)||[]]}function XT(t){switch(t.type){case"HANDLER":return f_n.get(t.name).deserialize(t.value);case"RAW":return t.value}}function XU(t,e,n,o){return new Promise(i=>{const r=oJi();e.set(r,i),t.start&&t.start(),t.postMessage(Object.assign({id:r},n),o)})}function oJi(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function Kqe(t,e=""){const n=[];for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const i=t[o],r=e?`${e}.${o}`:o;if(i!==null&&typeof i=="object"&&!Array.isArray(i)){const s=Kqe(i,r);n.push(...s)}else n.push(r)}return n}function b_n(t,e){const n=e.split(".");let o=t;for(const i of n)o=o[i];return o}var iJi=(t="latest")=>[`https://jscdn.tscircuit.com/@tscircuit/eval/${t}/dist/webworker/entrypoint.js`,`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${t}/dist/webworker/entrypoint.js`,`https://unpkg.com/@tscircuit/eval@${t}/dist/webworker/entrypoint.js`],rJi=async(t="latest",e=!1)=>{let n;for(const o of iJi(t))try{const i=await globalThis.fetch(o);if(!i.ok)throw new Error(`Failed to fetch webworker entrypoint from ${o}: ${i.status} ${i.statusText}`);return await i.blob()}catch(i){n=i,e&&console.warn(`[Worker] Failed to fetch webworker entrypoint from ${o}, trying next CDN fallback if available`,i)}throw n instanceof Error?n:new Error("Failed to fetch webworker entrypoint from CDN fallbacks")},S_n=async t=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){t.verbose&&console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(g){t.verbose&&console.warn("[Worker] Error killing previous global worker instance:",g),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}t.verbose&&console.log("[Worker] Creating circuit web worker with config:",t);let n=t.webWorkerBlobUrl??t.webWorkerUrl;if(!n){const g=await rJi(t.evalVersion??"latest",t.verbose);n=URL.createObjectURL(g)}const o=new Worker(n,{type:"module"});let i;o.addEventListener("error",g=>{console.error("[Worker] Error in worker",g),i=g}),o.addEventListener("unhandledrejection",g=>{console.error("[Worker] Unhandled rejection in worker",g)}),o.addEventListener("messageerror",g=>{console.error("[Worker] Message error in worker",g)});const r=g=>{console.log("[Worker] Message in worker",g)};if(o.addEventListener("message",r),o.addEventListener("message",async g=>{const h=g.data;if(h?.type==="worker_fetch")try{const d=await globalThis.fetch(h.input,h.init),p=await d.text();o.postMessage({type:"worker_fetch_result",requestId:h.requestId,success:!0,response:{body:p,status:d.status,statusText:d.statusText,headers:(()=>{const m={};return d.headers.forEach((_,f)=>{m[f]=_}),m})()}})}catch(d){o.postMessage({type:"worker_fetch_result",requestId:h.requestId,success:!1,error:{name:d.name,message:d.message,stack:d.stack}})}}),i)throw i;const s=y_n(o);o.removeEventListener("message",r);function a(g){return!g||typeof g!="object"?g:g.type&&g.props!==void 0?{__isSerializedReactElement:!0,type:g.type,props:A(g.props),key:g.key}:g}function A(g){if(!g||typeof g!="object")return g;const h={};for(const[d,p]of Object.entries(g))d==="children"?Array.isArray(p)?h.children=p.map(a):h.children=a(p):h[d]=p;return h}t.enableFetchProxy&&o.postMessage({type:"override_global_fetch"}),t.disableCdnLoading&&await s.setDisableCdnLoading(!0),t.snippetsApiBaseUrl&&await s.setSnippetsApiBaseUrl(t.snippetsApiBaseUrl),t.tscircuitSessionToken&&await s.setTscircuitSessionToken(t.tscircuitSessionToken),t.easyEdaProxyConfig&&await s.setEasyEdaProxyConfig(t.easyEdaProxyConfig);const c=g=>typeof g=="function"?Uqe(g):g;if(t.platform)for(const g of Kqe(t.platform))await s.setPlatformConfigProperty(g,c(b_n(t.platform,g))).catch(h=>{throw new Error(`Error setting platform config property ${g}: ${h instanceof Error?h.message:String(h)}`)});if(t.projectConfig)for(const g of Kqe(t.projectConfig))await s.setProjectConfigProperty(g,c(b_n(t.projectConfig,g))).catch(h=>{throw new Error(`Error setting project config property ${g}: ${h instanceof Error?h.message:String(h)}`)});let l=!1;const u={clearEventListeners:s.clearEventListeners.bind(s),enableDebug:async(...g)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't enableDebug");return s.enableDebug.bind(s)(...g)},version:s.version.bind(s),execute:async(...g)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't execute");return s.execute.bind(s)(...g)},executeComponent:async g=>{if(l)throw new Error("CircuitWebWorker was terminated, can't executeComponent");if(typeof g=="function")return s.executeComponent.bind(s)(g);if(g&&typeof g=="object"&&g.type){const h=a(g);return s.executeComponent.bind(s)(h)}return s.executeComponent.bind(s)(g)},executeWithFsMap:async(...g)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return s.executeWithFsMap.bind(s)(...g)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(g,h)=>{const d=Uqe(h);s.on(g,d)},kill:async()=>{s[m_n](),o.terminate(),l=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===u&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return u.__rawWorker=o,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=u,u};const sJi=({error:t,resetErrorBoundary:e,componentStack:n})=>{const o=t instanceof Error?t:new Error(String(t));return K.jsx("section",{className:"rf-h-full rf-w-full rf-grid rf-place-items-center",children:K.jsx("div",{className:"rf-min-h-full rf-flex rf-items-center rf-justify-center rf-px-4",children:K.jsxs("div",{className:"rf-max-w-lg rf-w-full rf-text-center",children:[K.jsxs("div",{className:"rf-mb-8",children:[K.jsx("div",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-20 rf-h-20 rf-bg-red-100 rf-rounded-full rf-mb-6",children:K.jsx(vbi,{className:"rf-w-10 rf-h-10 rf-text-red-600"})}),K.jsx("h1",{className:"rf-text-2xl rf-font-bold rf-text-gray-900 rf-mb-3",children:"Oops! Something went wrong"}),K.jsx("p",{className:"rf-text-gray-600 rf-mb-4",children:"RunFrame encountered an unexpected error."}),K.jsx("pre",{className:"rf-text-xs no-scrollbar rf-font-mono rf-text-left rf-whitespace-pre-wrap rf-text-red-600 rf-bg-red-50 rf-border rf-border-red-200 rf-p-3 rf-rounded-lg rf-mb-4 rf-overflow-auto rf-max-h-[120px]",children:o.message}),o.stack&&K.jsxs("details",{className:"rf-text-center rf-mb-6",children:[K.jsx("summary",{className:"rf-text-xs rf-text-gray-500 rf-cursor-pointer hover:rf-text-gray-700",children:"View stack trace"}),K.jsx("pre",{className:"rf-text-xs rf-font-mono no-scrollbar rf-whitespace-pre-wrap rf-text-gray-500 rf-bg-gray-100 rf-p-3 rf-rounded-lg rf-mt-2 rf-overflow-auto rf-text-left rf-max-h-[150px]",children:o.stack})]}),n&&K.jsxs("details",{className:"rf-text-center rf-mb-6",children:[K.jsx("summary",{className:"rf-text-xs rf-text-gray-500 rf-cursor-pointer hover:rf-text-gray-700",children:"View component stack"}),K.jsx("pre",{className:"rf-text-xs rf-font-mono no-scrollbar rf-whitespace-pre-wrap rf-text-gray-500 rf-bg-gray-100 rf-p-3 rf-rounded-lg rf-mt-2 rf-overflow-auto rf-text-left rf-max-h-[150px]",children:n})]})]}),K.jsxs("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-justify-center",children:[K.jsx(fA,{variant:"destructive",size:"lg",onClick:()=>window.location.reload(),children:"Refresh Dev Server"}),K.jsx(fA,{variant:"outline",size:"lg",onClick:e,children:"Try Again"})]})]})})})},Q_n=t=>{const e={};if(!t)return e;for(const o of rE)e[o]=0;const n=new Map;for(const o of t){const[,,i,r]=o.type.split(":");if(r==="start"){n.set(`${i}:${o.renderId}`,o);continue}if(r==="end"){const s=n.get(`${i}:${o.renderId}`);if(s){const a=o.createdAt-s.createdAt;e[i]=(e[i]||0)+a}}}return e},$fe=t=>{const e=t.toLowerCase(),n=e.split("/").pop();return e.endsWith(".circuit.json")||n==="circuit.json"},aJi=t=>t.endsWith(".tsx")||$fe(t)||t.endsWith(".jsx"),AJi=({mainComponentPath:t,fsMap:e})=>ee.useMemo(()=>{if(!(t!=null&&$fe(t)))return{isStaticCircuitJson:!1,circuitJson:null,error:null};const o=e.get(t);if(!o)return{isStaticCircuitJson:!0,circuitJson:null,error:`Circuit JSON file not found: ${t}`};try{return{isStaticCircuitJson:!0,circuitJson:JSON.parse(o),error:null}}catch(i){return{isStaticCircuitJson:!0,circuitJson:null,error:`Failed to parse circuit.json: ${i instanceof Error?i.message:String(i)}`}}},[t,e]),cJi=(t,e)=>{const n={};for(const[o,i]of t.entries()){const r=e.get(o);r!==i&&(n[o]={old:i,new:r})}for(const[o,i]of e.entries())t.has(o)||(n[o]={old:void 0,new:i});return n},lJi=({message:t="Loading files..."})=>K.jsxs("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full",children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b",children:[K.jsx("div",{className:"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse"}),K.jsx("div",{className:"rf-flex rf-gap-6 rf-ml-auto",children:["PCB","Schematic","3D"].map((e,n)=>K.jsx("div",{className:"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"},n))})]}),K.jsx("div",{className:"rf-flex-1 rf-p-4",children:K.jsx("div",{className:"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center",children:K.jsx("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4",children:K.jsx("div",{className:"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500",children:t})})})})]}),v_n=({projectBaseUrl:t})=>({projectBaseUrl:t,enablePartOrientationAnalysis:!0}),uJi=t=>!t||typeof t!="object"?!1:!!("error_type"in t||typeof t.type=="string"&&t.type.includes("error")),gJi=t=>t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:typeof t=="string"?{message:t}:t&&typeof t=="object"?t:{message:String(t)},dJi=t=>Array.isArray(t)?t.filter(uJi):[],Vqe=({circuitJson:t,executionError:e})=>{const n=[];e&&n.push(gJi(e));const o=dJi(t);return n.push(...o),{hasExecutionError:!!e,...n.length>0?{errors:n}:{}}};function hJi(){const t=ee.useRef(Promise.resolve()),e=ee.useRef(!1),n=ee.useRef(null),o=ee.useCallback(async s=>{await t.current;const a={cancelled:!1};n.current=a;let A;const c=new Promise(l=>{A=l});try{return t.current=c,e.current=!0,await s()}catch(l){if(!a.cancelled)throw l}finally{e.current=!1,n.current=null,A()}},[]),i=ee.useCallback(()=>{n.current&&(n.current.cancelled=!0),t.current=Promise.resolve(),e.current=!1},[]),r=ee.useCallback(()=>e.current,[]);return{runWithMutex:o,isLocked:r,cancel:i}}const pJi=26,e3=vc("run-frame:RunFrame"),mJi=async()=>{try{const t=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(t.ok)return(await t.json()).tags?.latest}catch(t){console.error("Failed to fetch latest eval version",t)}},w_n=async(t,e)=>{if(t)return t;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const n=await mJi();if(n)return window.TSCIRCUIT_LATEST_EVAL_VERSION=n,n}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:"latest"},P_n=t=>{mee();const e=md(ve=>ve.circuitJson),n=md(ve=>ve.setCircuitJson),[o,i]=ee.useState(null),[r,s]=ee.useState(null),a=ee.useRef(null),[A,c]=ee.useState(null),[l,u]=ee.useReducer((ve,he)=>ve+1,0),g=pfe(ve=>ve.setLastRunEvalVersion),h=ee.useRef(0),d=hJi(),[p,m]=ee.useState(!1),[_,f]=ee.useState(!1),[I,C]=ee.useState({}),[y,x]=ee.useState(""),[E,B]=ee.useState(!1),[S,Q]=ee.useState(!1),w=Object.values(I).sort((ve,he)=>ve.startTime-he.startTime)[0]?.effectName,M=ve=>{t.onRunCompleted?.(ve)};ee.useEffect(()=>{const ve=he=>{(he.ctrlKey||he.metaKey)&&he.key==="Enter"&&!p&&(he.preventDefault(),he.stopPropagation(),u(1))};return window.addEventListener("keydown",ve,{capture:!0}),()=>window.removeEventListener("keydown",ve,{capture:!0})},[p]),ee.useEffect(()=>{let ve=!1;return(async()=>{try{if(!globalThis.runFrameWorker){const Qe=await w_n(t.evalVersion,t.forceLatestEvalVersion),Pe=await S_n({evalVersion:Qe,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,projectConfig:v_n({projectBaseUrl:t.projectBaseUrl||`${QC}/files/static`}),...t.platformConfig&&{platform:t.platformConfig},verbose:!0,...t.enableFetchProxy&&{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI&&{disableCdnLoading:!0},...t.tscircuitSessionToken&&{tscircuitSessionToken:t.tscircuitSessionToken},...t.easyEdaProxyConfig&&{easyEdaProxyConfig:t.easyEdaProxyConfig}});if(ve)return;globalThis.runFrameWorker=Pe,g(Qe)}ve||f(!0)}catch(Qe){console.error("Failed to preload eval worker",Qe)}})(),()=>{ve=!0}},[t.evalVersion,t.evalWebWorkerBlobUrl,t.forceLatestEvalVersion,t.tscircuitSessionToken]);const[k,R]=ee.useState(null),[F,O]=ee.useState({}),[U,Y]=ee.useState([]),[W,te]=ee.useState([]),j=ee.useRef(0),[J,oe]=ee.useState(t.defaultActiveTab??t.defaultTab??"pcb");ppn({source:"runframe",component:"RunFrame",isWebEmbedded:t.isWebEmbedded,activeTab:J}),ee.useEffect(()=>{t.debug&&vc.enable("run-frame*")},[t.debug]);const ie=t.fsMap instanceof Map?t.fsMap:Object.entries(t.fsMap??{}).reduce((ve,[he,Qe])=>ve.set(he,Qe),new Map),ne=ee.useRef(null),le=ee.useRef(null),{isStaticCircuitJson:ge,circuitJson:_e,error:ue}=AJi({mainComponentPath:t.mainComponentPath,fsMap:ie});ee.useEffect(()=>{ge&&(_e?(n(_e),i(null)):ue&&i({error:ue,stack:""}))},[ge,_e,ue]),ee.useEffect(()=>{if(t.isLoadingFiles||ge)return;const ve=ie instanceof Map?Object.fromEntries(ie.entries()):ie;if(!ve||Object.keys(ve).length===0){i({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),m(!1);return}const he=l!==h.current;if(ne.current&&e){const Pe=cJi(ne.current,ie);if(Object.keys(Pe).length>0)e3("code changes detected");else if(le.current!==t.entrypoint)e3("render triggered by entrypoint change");else if(!he){e3("render triggered without changes to fsMap, skipping");return}}if(t.showRunButton&&l===h.current)return;ne.current=ie,le.current=t.entrypoint??null,h.current=l,m(!0);const Qe=async()=>{e3("running render worker"),i(null),R(null),C({}),Y([]),te([]);const Pe=++j.current,we={progress:0,debugOutputs:[]};let Te=!1;a.current=()=>{Te=!0};const Re=await w_n(t.evalVersion,!globalThis.runFrameWorker&&t.forceLatestEvalVersion);e3("resolvedEvalVersion",Re);const Ee=globalThis.runFrameWorker??await S_n({evalVersion:Re,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,verbose:!0,projectConfig:v_n({projectBaseUrl:t.projectBaseUrl||`${QC}/files/static`}),...t.platformConfig&&{platform:t.platformConfig},...t.enableFetchProxy&&{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI&&{disableCdnLoading:!0},...t.tscircuitSessionToken&&{tscircuitSessionToken:t.tscircuitSessionToken},...t.easyEdaProxyConfig&&{easyEdaProxyConfig:t.easyEdaProxyConfig}});globalThis.runFrameWorker=Ee,g(Re),await Ee.clearEventListeners(),y?.trim()&&Ee.enableDebug(y.replace("DEBUG=","")),e3("Starting render..."),t.onRenderStarted?.();const ke=ie instanceof Map?Object.fromEntries(ie.entries()):ie;let Ce=Date.now();Ee.on("asyncEffect:start",nt=>{const gt=`${nt.phase}|${nt.componentDisplayName??""}|${nt.effectName}`;C(bt=>({...bt,[gt]:{...nt,startTime:Date.now()}}))}),Ee.on("asyncEffect:end",nt=>{const gt=`${nt.phase}|${nt.componentDisplayName??""}|${nt.effectName}`;C(bt=>{const{[gt]:Ct,...Dt}=bt;return Dt})});let Le=[];const Ye=nt=>{Te||Pe!==j.current||(Le=bGi(Le,nt),te(Le))};Ee.on("autorouting:end",nt=>Ye({...nt,type:"autorouting:end"})),Ee.on("autorouting:error",nt=>Ye({...nt,type:"autorouting:error"})),Ee.on("autorouting:start",nt=>{Ye({...nt,type:"autorouting:start"}),O({...F,[nt.componentDisplayName]:{simpleRouteJson:nt.simpleRouteJson,createdAt:Date.now()}})}),Ee.on("solver:started",nt=>{e3("solver:started",nt),Y(gt=>{const bt=`${nt.componentName}-${nt.solverName}`;return gt.some(Dt=>`${Dt.componentName}-${Dt.solverName}`===bt)?gt:[...gt,nt]})}),Ee.on("board:renderPhaseStarted",nt=>{we.lastRenderEvent=nt,we.eventsProcessed=(we.eventsProcessed??0)+1;const gt=rE.indexOf(nt.phase)/pJi*.75+we.eventsProcessed/1e3*.25,bt=1-Math.exp(-gt*3);we.progress=bt,Te||R({...we})}),J==="render_log"&&Ee.on("renderable:renderLifecycle:anyEvent",nt=>{we.renderEvents=we.renderEvents??[],nt.createdAt=Date.now(),we.renderEvents.push(nt),Date.now()-Ce>500&&(we.phaseTimings=Q_n(we.renderEvents??[]),Ce=Date.now()),Te||R({...we})}),Ee.on("autorouting:progress",nt=>{c(nt.debugGraphics)}),Ee.on("debug:logOutput",nt=>{we.debugOutputs=we.debugOutputs??[],we.debugOutputs.push({type:"debug",name:nt.name,content:nt.content}),Te||R({...we})}),e3("Executing fsMap...");const tt=await Ee.executeWithFsMap({entrypoint:t.entrypoint,fsMap:ke,...t.mainComponentPath?{mainComponentPath:t.mainComponentPath}:{}}).then(()=>({success:!0})).catch(nt=>{const gt=nt.message.replace("Error: ","");return e3(`eval error: ${gt}`),t.onError?.(nt),M(Vqe({executionError:nt})),i({error:gt,stack:nt.stack}),R(null),console.error(nt),{success:!1}});if(e3("worker call started"),!tt.success){m(!1),C({});return}const At=Ee.renderUntilSettled();e3("waiting for initial circuit json...");let at=await Ee.getCircuitJson().catch(nt=>(e3("error getting initial circuit json",nt),t.onError?.(nt),M(Vqe({executionError:nt})),i({error:nt.message,stack:nt.stack}),R(null),m(!1),C({}),null));at&&(e3("got initial circuit json"),n(at),t.onCircuitJsonChange?.(at),t.onInitialRender?.({circuitJson:at}),await At,e3("getting final circuit json"),at=await Ee.getCircuitJson(),t.onCircuitJsonChange?.(at),n(at),M(Vqe({circuitJson:at})),t.onRenderFinished?.({circuitJson:at}),c({}),J==="render_log"&&(we.phaseTimings=Q_n(we.renderEvents??[])),we.progress=1,Te||R({...we}),m(!1),C({}),x(""),a.current=null)};d.runWithMutex(Qe)},[t.fsMap,t.entrypoint,l,t.evalVersion,t.mainComponentPath,t.isLoadingFiles,y,ge]);const fe=ee.useRef(null),pe=ee.useRef(null),ye=ve=>{if(!ve||ve===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}ve.in_progress?(fe.current=ve,pe.current&&(clearTimeout(pe.current),pe.current=null)):(pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{const he=ve||fe.current;t.onEditEvent?.(he),fe.current=null,pe.current=null},100))},Me=async(ve,he)=>{let Qe="";const Pe=Array.isArray(e)&&e.find(Re=>Re.type==="software_project_metadata"),we=t.projectUrl??Pe?.project_url;if(we)try{Qe=new URL(we).pathname}catch{Qe=we}const Te=Qe?`${Qe} - ${ve}`:ve;await gq.post("autorouting/bug_reports/create",{json:{title:Te,simple_route_json:he.simpleRouteJson}}).json().then(({autorouting_bug_report:Re})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${Re.autorouting_bug_report_id}`,"_blank")}).catch(Re=>{console.error("Failed to report autorouting bug",Re);const Ee=Re instanceof Wb&&Re.response?.status===401,ke=Re instanceof Wb&&Re.response?.status===413;if(Ee){t.onLoginRequired?t.onLoginRequired():alert("You must be logged in to report autorouting bugs");return}if(ke){alert("This autorouting log is too large to report online. Download the log and attach it to a GitHub issue.");return}const Ce=Re instanceof Error?Re.message:"Failed to report autorouting bug";alert(`Failed to report autorouting bug: ${Ce}`)})};return t.isLoadingFiles?K.jsx(lJi,{}):K.jsx(bE,{onError:(ve,he)=>{s(he.componentStack??null)},onReset:()=>s(null),fallbackRender:ve=>K.jsx(sJi,{...ve,componentStack:r}),children:K.jsx(h_n,{code:ie.get(t.entrypoint??t.mainComponentPath),fsMap:ie,defaultActiveTab:t.defaultActiveTab??t.defaultTab,defaultTab:t.defaultTab,availableTabs:t.availableTabs,schematicSvgOptions:t.schematicSvgOptions,showToggleFullScreen:t.showToggleFullScreen,autoroutingGraphics:A,autoroutingLog:F,onReportAutoroutingLog:t.onReportAutoroutingLog||Me,leftHeaderContent:K.jsxs(K.Fragment,{children:[t.showRunButton&&K.jsx(Fqe,{children:K.jsxs(Lqe,{children:[K.jsx(Hqe,{asChild:!0,children:K.jsxs("div",{className:"rf-relative rf-inline-flex",children:[K.jsxs("button",{type:"button",onClick:()=>{u(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:p||!_,children:["Run"," ",p||!_?K.jsx(SE,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):K.jsx(_ln,{className:"rf-w-3 rf-h-3"})]}),p&&K.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:K.jsx(fA,{onClick:ve=>{ve.stopPropagation(),m(!1),R(null),i(null),a.current&&(a.current(),a.current=null),d.cancel(),C({}),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:K.jsx(Qbi,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]})}),K.jsx(Kfe,{sideOffset:8,className:"rf-p-0 rf-bg-transparent rf-border-none rf-shadow-none rf-pointer-events-none",children:K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-px-2.5 rf-py-1.5 rf-bg-slate-900 rf-rounded-md rf-shadow-xl rf-border rf-border-slate-800/60",children:[K.jsx("kbd",{className:"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none",children:"Ctrl"}),K.jsx("span",{className:"rf-text-slate-500 rf-text-[11px] rf-font-medium rf-leading-none",children:"+"}),K.jsx("kbd",{className:"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none",children:"Enter"})]})})]})}),t.showFileMenu!==!1&&K.jsx(Yfe,{isWebEmbedded:t.isWebEmbedded,onLoginRequired:t.onLoginRequired,showSchematicDebugGrid:E,onChangeShowSchematicDebugGrid:B,showSchematicPorts:S,onChangeShowSchematicPorts:Q,autoroutingLog:F,onReportAutoroutingLog:t.onReportAutoroutingLog||Me,shouldLoadLatestEval:t.shouldLoadLatestEval,onChangeShouldLoadLatestEval:t.onChangeShouldLoadLatestEval}),t.leftHeaderContent]}),onActiveTabChange:oe,circuitJson:e,renderLog:k,activeEffectName:w,isRunningCode:p,errorMessage:o?.error,errorStack:o?.stack,onEditEvent:ye,editEvents:t.editEvents,onPcbBoundsSelected:t.onPcbBoundsSelected,defaultToFullScreen:t.defaultToFullScreen,onRerunWithDebug:ve=>{x(ve||""),u(1)},solverEvents:U,autoroutingPhases:ge?[]:W,isCli:t.isCli,showSchematicDebugGrid:E,showSchematicPorts:S,onChangeShowSchematicDebugGrid:B,onChangeShowSchematicPorts:Q})})},_Ji=t=>new Promise(e=>setTimeout(e,t)),fJi=({isOpen:t,onClose:e,onLoginSuccess:n})=>{const[o,i]=ee.useState("idle"),[r,s]=ee.useState(null),[a,A]=ee.useState(null),c=md(p=>p.pushEvent),l=ee.useRef(null);ee.useEffect(()=>()=>{l.current&&l.current.abort()},[]);const u=ee.useCallback(async()=>{i("creating"),A(null),l.current=new AbortController;try{const p=Hw(),{login_page:m}=await p.post("sessions/login_page/create",{json:{},signal:l.current?.signal}).json();s(m.url),i("waiting");const _=new URL(m.url);for(_.searchParams.set("autoclose","true"),window.open(_.toString(),"_blank");!l.current?.signal.aborted;){const{login_page:I}=await p.post("sessions/login_page/get",{json:{login_page_id:m.login_page_id},headers:{Authorization:`Bearer ${m.login_page_auth_token}`},signal:l.current?.signal}).json();if(I.was_login_successful){i("exchanging");break}if(I.is_expired)throw new Error("Login page expired. Please try again.");await _Ji(1e3)}if(l.current?.signal.aborted){i("idle");return}const{session:f}=await p.post("sessions/login_page/exchange_for_cli_session",{json:{login_page_id:m.login_page_id},headers:{Authorization:`Bearer ${m.login_page_auth_token}`},signal:l.current?.signal}).json();typeof window<"u"&&(window.TSCIRCUIT_REGISTRY_TOKEN=f.token),await c({event_type:"TOKEN_UPDATED",registry_token:f.token}),i("success"),ua.success("Successfully logged in!"),n?.(),setTimeout(()=>{e(),i("idle"),s(null)},1e3)}catch(p){if(p instanceof DOMException&&p.name==="AbortError"){i("idle");return}console.error("Login error:",p);const m=p instanceof Error?p.message:"Failed to complete login";A(m),i("error"),ua.error(m)}},[c,n,e]),g=ee.useCallback(()=>{l.current&&l.current.abort(),i("idle"),s(null),A(null),e()},[e]),h=o==="creating"||o==="waiting"||o==="exchanging",d=()=>{switch(o){case"creating":return"Creating login page...";case"waiting":return"Waiting for you to complete login in the browser...";case"exchanging":return"Generating token...";case"success":return"Successfully logged in!";case"error":return a||"An error occurred";default:return null}};return K.jsx(KT,{open:t,onOpenChange:p=>!p&&!h&&g(),children:K.jsxs(VP,{className:"rf-max-w-md",children:[K.jsxs(zP,{children:[K.jsx(JP,{children:"Sign In Required"}),K.jsx(VT,{children:o==="idle"||o==="error"?"Sign in to continue. A new browser window will open for authentication.":"Complete the login process in the opened browser window."})]}),K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4",children:[o==="idle"||o==="error"?K.jsx(fA,{onClick:u,className:"rf-w-full",children:"Sign In"}):K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-w-full",children:[o!=="success"&&K.jsx("div",{className:"rf-animate-spin rf-w-6 rf-h-6 rf-border-2 rf-border-gray-300 rf-border-t-blue-600 rf-rounded-full"}),K.jsx("p",{className:"rf-text-sm rf-text-gray-600 rf-text-center",children:d()}),r&&o==="waiting"&&K.jsx("a",{href:r,target:"_blank",rel:"noreferrer",className:"rf-text-xs rf-text-blue-600 hover:rf-underline",children:"Click here if the window didn't open"})]}),a&&o==="error"&&K.jsx("p",{className:"rf-text-sm rf-text-red-600 rf-text-center",children:a}),h&&K.jsx(fA,{variant:"outline",onClick:g,className:"rf-w-full",children:"Cancel"})]})]})})},IJi=()=>{const[t,e]=ee.useState(!1),n=ee.useCallback(()=>{e(!0)},[]),o=ee.useCallback(()=>{e(!1)},[]),i=ee.useCallback(()=>{e(!1)},[]);return{LoginDialog:K.jsx(fJi,{isOpen:t,onClose:o,onLoginSuccess:i}),openLoginDialog:n}},CJi=({apiBaseUrl:t,fetchImpl:e=globalThis.fetch.bind(globalThis)})=>{const n=`${t.replace(/\/$/,"")}/cache`;return{getItem:async o=>{try{const i=await e(`${n}?key=${encodeURIComponent(o)}`);return i.ok?await i.text():null}catch{return null}},setItem:async(o,i)=>{try{await e(`${n}?key=${encodeURIComponent(o)}`,{method:"POST",headers:{"Content-Type":"text/plain; charset=utf-8"},body:i})}catch{}}}},yJi=t=>{const[e,n]=OO("load-latest-eval",!0),o=t.evalWebWorkerBlobUrl??t.workerBlobUrl,i=t.apiBaseUrl??QC,r=ee.useMemo(()=>({...t.platformConfig,localCacheEngine:t.platformConfig?.localCacheEngine??CJi({apiBaseUrl:i})}),[i,t.platformConfig]),[s]=ee.useState(()=>typeof window>"u"?void 0:new URLSearchParams(window.location.hash.slice(1)).get("main_component")??void 0),a=ee.useCallback(l=>{if(typeof window>"u")return;const u=new URLSearchParams(window.location.hash.slice(1));if(u.get("main_component")===l)return;u.set("main_component",l);const g=u.toString(),h=`${window.location.pathname}${window.location.search}${g.length>0?`#${g}`:""}`;window.history.replaceState(null,"",h)},[]),{LoginDialog:A,openLoginDialog:c}=IJi();return K.jsxs(K.Fragment,{children:[A,K.jsx(Cfn,{debug:t.debug,forceLatestEvalVersion:!o&&e,defaultToFullScreen:!0,showToggleFullScreen:!1,evalWebWorkerBlobUrl:o,apiBaseUrl:t.apiBaseUrl,platformConfig:r,isCli:!0,showFilesSwitch:!0,enableFetchProxy:t.enableFetchProxy,initialMainComponentPath:s,onLoginRequired:c,onMainComponentPathChange:a,shouldLoadLatestEval:!o&&e,onChangeShouldLoadLatestEval:l=>{n(l),globalThis.runFrameWorker=null},leftHeaderContent:K.jsx("div",{className:"rf-flex rf-items-center rf-justify-between",children:t.scenarioSelectorContent})})]})};vc("run-frame:ImportComponentDialog");var M_n=1,xJi=.9,EJi=.8,BJi=.17,zqe=.1,Jqe=.999,bJi=.9999,SJi=.99,QJi=/[\\\/_+.#"@\[\(\{&]/,vJi=/[\\\/_+.#"@\[\(\{&]/g,wJi=/[\s-]/,D_n=/[\s-]/g;function Wqe(t,e,n,o,i,r,s){if(r===e.length)return i===t.length?M_n:SJi;var a=`${i},${r}`;if(s[a]!==void 0)return s[a];for(var A=o.charAt(r),c=n.indexOf(A,i),l=0,u,g,h,d;c>=0;)u=Wqe(t,e,n,o,c+1,r+1,s),u>l&&(c===i?u*=M_n:QJi.test(t.charAt(c-1))?(u*=EJi,h=t.slice(i,c-1).match(vJi),h&&i>0&&(u*=Math.pow(Jqe,h.length))):wJi.test(t.charAt(c-1))?(u*=xJi,d=t.slice(i,c-1).match(D_n),d&&i>0&&(u*=Math.pow(Jqe,d.length))):(u*=BJi,i>0&&(u*=Math.pow(Jqe,c-i))),t.charAt(c)!==e.charAt(r)&&(u*=bJi)),(u<zqe&&n.charAt(c-1)===o.charAt(r+1)||o.charAt(r+1)===o.charAt(r)&&n.charAt(c-1)!==o.charAt(r))&&(g=Wqe(t,e,n,o,c+1,r+2,s),g*zqe>u&&(u=g*zqe)),u>l&&(l=u),c=n.indexOf(A,c+1);return s[a]=l,l}function N_n(t){return t.toLowerCase().replace(D_n," ")}function PJi(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Wqe(t,e,N_n(t),N_n(e),0,0,{})}var Mee='[cmdk-group=""]',jqe='[cmdk-group-items=""]',MJi='[cmdk-group-heading=""]',R_n='[cmdk-item=""]',T_n=`${R_n}:not([aria-disabled="true"])`,$qe="cmdk-item-select",ZU="data-value",DJi=(t,e,n)=>PJi(t,e,n),k_n=ee.createContext(void 0),Dee=()=>ee.useContext(k_n),F_n=ee.createContext(void 0),qqe=()=>ee.useContext(F_n),L_n=ee.createContext(void 0),H_n=ee.forwardRef((t,e)=>{let n=eK(()=>{var J,oe;return{search:"",value:(oe=(J=t.value)!=null?J:t.defaultValue)!=null?oe:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=eK(()=>new Set),i=eK(()=>new Map),r=eK(()=>new Map),s=eK(()=>new Set),a=O_n(t),{label:A,children:c,value:l,onValueChange:u,filter:g,shouldFilter:h,loop:d,disablePointerSelection:p=!1,vimBindings:m=!0,..._}=t,f=t_(),I=t_(),C=t_(),y=ee.useRef(null),x=UJi();ZT(()=>{if(l!==void 0){let J=l.trim();n.current.value=J,E.emit()}},[l]),ZT(()=>{x(6,k)},[]);let E=ee.useMemo(()=>({subscribe:J=>(s.current.add(J),()=>s.current.delete(J)),snapshot:()=>n.current,setState:(J,oe,ie)=>{var ne,le,ge,_e;if(!Object.is(n.current[J],oe)){if(n.current[J]=oe,J==="search")M(),Q(),x(1,w);else if(J==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ue=document.getElementById(C);ue?ue.focus():(ne=document.getElementById(f))==null||ne.focus()}if(x(7,()=>{var ue;n.current.selectedItemId=(ue=R())==null?void 0:ue.id,E.emit()}),ie||x(5,k),((le=a.current)==null?void 0:le.value)!==void 0){let ue=oe??"";(_e=(ge=a.current).onValueChange)==null||_e.call(ge,ue);return}}E.emit()}},emit:()=>{s.current.forEach(J=>J())}}),[]),B=ee.useMemo(()=>({value:(J,oe,ie)=>{var ne;oe!==((ne=r.current.get(J))==null?void 0:ne.value)&&(r.current.set(J,{value:oe,keywords:ie}),n.current.filtered.items.set(J,S(oe,ie)),x(2,()=>{Q(),E.emit()}))},item:(J,oe)=>(o.current.add(J),oe&&(i.current.has(oe)?i.current.get(oe).add(J):i.current.set(oe,new Set([J]))),x(3,()=>{M(),Q(),n.current.value||w(),E.emit()}),()=>{r.current.delete(J),o.current.delete(J),n.current.filtered.items.delete(J);let ie=R();x(4,()=>{M(),ie?.getAttribute("id")===J&&w(),E.emit()})}),group:J=>(i.current.has(J)||i.current.set(J,new Set),()=>{r.current.delete(J),i.current.delete(J)}),filter:()=>a.current.shouldFilter,label:A||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:f,inputId:C,labelId:I,listInnerRef:y}),[]);function S(J,oe){var ie,ne;let le=(ne=(ie=a.current)==null?void 0:ie.filter)!=null?ne:DJi;return J?le(J,n.current.search,oe):0}function Q(){if(!n.current.search||a.current.shouldFilter===!1)return;let J=n.current.filtered.items,oe=[];n.current.filtered.groups.forEach(ne=>{let le=i.current.get(ne),ge=0;le.forEach(_e=>{let ue=J.get(_e);ge=Math.max(ue,ge)}),oe.push([ne,ge])});let ie=y.current;F().sort((ne,le)=>{var ge,_e;let ue=ne.getAttribute("id"),fe=le.getAttribute("id");return((ge=J.get(fe))!=null?ge:0)-((_e=J.get(ue))!=null?_e:0)}).forEach(ne=>{let le=ne.closest(jqe);le?le.appendChild(ne.parentElement===le?ne:ne.closest(`${jqe} > *`)):ie.appendChild(ne.parentElement===ie?ne:ne.closest(`${jqe} > *`))}),oe.sort((ne,le)=>le[1]-ne[1]).forEach(ne=>{var le;let ge=(le=y.current)==null?void 0:le.querySelector(`${Mee}[${ZU}="${encodeURIComponent(ne[0])}"]`);ge?.parentElement.appendChild(ge)})}function w(){let J=F().find(ie=>ie.getAttribute("aria-disabled")!=="true"),oe=J?.getAttribute(ZU);E.setState("value",oe||void 0)}function M(){var J,oe,ie,ne;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=o.current.size;return}n.current.filtered.groups=new Set;let le=0;for(let ge of o.current){let _e=(oe=(J=r.current.get(ge))==null?void 0:J.value)!=null?oe:"",ue=(ne=(ie=r.current.get(ge))==null?void 0:ie.keywords)!=null?ne:[],fe=S(_e,ue);n.current.filtered.items.set(ge,fe),fe>0&&le++}for(let[ge,_e]of i.current)for(let ue of _e)if(n.current.filtered.items.get(ue)>0){n.current.filtered.groups.add(ge);break}n.current.filtered.count=le}function k(){var J,oe,ie;let ne=R();ne&&(((J=ne.parentElement)==null?void 0:J.firstChild)===ne&&((ie=(oe=ne.closest(Mee))==null?void 0:oe.querySelector(MJi))==null||ie.scrollIntoView({block:"nearest"})),ne.scrollIntoView({block:"nearest"}))}function R(){var J;return(J=y.current)==null?void 0:J.querySelector(`${R_n}[aria-selected="true"]`)}function F(){var J;return Array.from(((J=y.current)==null?void 0:J.querySelectorAll(T_n))||[])}function O(J){let oe=F()[J];oe&&E.setState("value",oe.getAttribute(ZU))}function U(J){var oe;let ie=R(),ne=F(),le=ne.findIndex(_e=>_e===ie),ge=ne[le+J];(oe=a.current)!=null&&oe.loop&&(ge=le+J<0?ne[ne.length-1]:le+J===ne.length?ne[0]:ne[le+J]),ge&&E.setState("value",ge.getAttribute(ZU))}function Y(J){let oe=R(),ie=oe?.closest(Mee),ne;for(;ie&&!ne;)ie=J>0?GJi(ie,Mee):YJi(ie,Mee),ne=ie?.querySelector(T_n);ne?E.setState("value",ne.getAttribute(ZU)):U(J)}let W=()=>O(F().length-1),te=J=>{J.preventDefault(),J.metaKey?W():J.altKey?Y(1):U(1)},j=J=>{J.preventDefault(),J.metaKey?O(0):J.altKey?Y(-1):U(-1)};return ee.createElement(Na.div,{ref:e,tabIndex:-1,..._,"cmdk-root":"",onKeyDown:J=>{var oe;(oe=_.onKeyDown)==null||oe.call(_,J);let ie=J.nativeEvent.isComposing||J.keyCode===229;if(!(J.defaultPrevented||ie))switch(J.key){case"n":case"j":{m&&J.ctrlKey&&te(J);break}case"ArrowDown":{te(J);break}case"p":case"k":{m&&J.ctrlKey&&j(J);break}case"ArrowUp":{j(J);break}case"Home":{J.preventDefault(),O(0);break}case"End":{J.preventDefault(),W();break}case"Enter":{J.preventDefault();let ne=R();if(ne){let le=new Event($qe);ne.dispatchEvent(le)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:VJi},A),qfe(t,J=>ee.createElement(F_n.Provider,{value:E},ee.createElement(k_n.Provider,{value:B},J))))}),NJi=ee.forwardRef((t,e)=>{var n,o;let i=t_(),r=ee.useRef(null),s=ee.useContext(L_n),a=Dee(),A=O_n(t),c=(o=(n=A.current)==null?void 0:n.forceMount)!=null?o:s?.forceMount;ZT(()=>{if(!c)return a.item(i,s?.id)},[c]);let l=G_n(i,r,[t.value,t.children,r],t.keywords),u=qqe(),g=XP(x=>x.value&&x.value===l.current),h=XP(x=>c||a.filter()===!1?!0:x.search?x.filtered.items.get(i)>0:!0);ee.useEffect(()=>{let x=r.current;if(!(!x||t.disabled))return x.addEventListener($qe,d),()=>x.removeEventListener($qe,d)},[h,t.onSelect,t.disabled]);function d(){var x,E;p(),(E=(x=A.current).onSelect)==null||E.call(x,l.current)}function p(){u.setState("value",l.current,!0)}if(!h)return null;let{disabled:m,value:_,onSelect:f,forceMount:I,keywords:C,...y}=t;return ee.createElement(Na.div,{ref:_R(r,e),...y,id:i,"cmdk-item":"",role:"option","aria-disabled":!!m,"aria-selected":!!g,"data-disabled":!!m,"data-selected":!!g,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:d},t.children)}),RJi=ee.forwardRef((t,e)=>{let{heading:n,children:o,forceMount:i,...r}=t,s=t_(),a=ee.useRef(null),A=ee.useRef(null),c=t_(),l=Dee(),u=XP(h=>i||l.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);ZT(()=>l.group(s),[]),G_n(s,a,[t.value,t.heading,A]);let g=ee.useMemo(()=>({id:s,forceMount:i}),[i]);return ee.createElement(Na.div,{ref:_R(a,e),...r,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},n&&ee.createElement("div",{ref:A,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),qfe(t,h=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},ee.createElement(L_n.Provider,{value:g},h))))}),TJi=ee.forwardRef((t,e)=>{let{alwaysRender:n,...o}=t,i=ee.useRef(null),r=XP(s=>!s.search);return!n&&!r?null:ee.createElement(Na.div,{ref:_R(i,e),...o,"cmdk-separator":"",role:"separator"})}),kJi=ee.forwardRef((t,e)=>{let{onValueChange:n,...o}=t,i=t.value!=null,r=qqe(),s=XP(c=>c.search),a=XP(c=>c.selectedItemId),A=Dee();return ee.useEffect(()=>{t.value!=null&&r.setState("search",t.value)},[t.value]),ee.createElement(Na.input,{ref:e,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":A.listId,"aria-labelledby":A.labelId,"aria-activedescendant":a,id:A.inputId,type:"text",value:i?t.value:s,onChange:c=>{i||r.setState("search",c.target.value),n?.(c.target.value)}})}),FJi=ee.forwardRef((t,e)=>{let{children:n,label:o="Suggestions",...i}=t,r=ee.useRef(null),s=ee.useRef(null),a=XP(c=>c.selectedItemId),A=Dee();return ee.useEffect(()=>{if(s.current&&r.current){let c=s.current,l=r.current,u,g=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let h=c.offsetHeight;l.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return g.observe(c),()=>{cancelAnimationFrame(u),g.unobserve(c)}}},[]),ee.createElement(Na.div,{ref:_R(r,e),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":o,id:A.listId},qfe(t,c=>ee.createElement("div",{ref:_R(s,A.listInnerRef),"cmdk-list-sizer":""},c)))}),LJi=ee.forwardRef((t,e)=>{let{open:n,onOpenChange:o,overlayClassName:i,contentClassName:r,container:s,...a}=t;return ee.createElement(r_e,{open:n,onOpenChange:o},ee.createElement(s_e,{container:s},ee.createElement(wZ,{"cmdk-overlay":"",className:i}),ee.createElement(MZ,{"aria-label":t.label,"cmdk-dialog":"",className:r},ee.createElement(H_n,{ref:e,...a}))))}),HJi=ee.forwardRef((t,e)=>XP(n=>n.filtered.count===0)?ee.createElement(Na.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),OJi=ee.forwardRef((t,e)=>{let{progress:n,children:o,label:i="Loading...",...r}=t;return ee.createElement(Na.div,{ref:e,...r,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},qfe(t,s=>ee.createElement("div",{"aria-hidden":!0},s)))}),t3=Object.assign(H_n,{List:FJi,Item:NJi,Input:kJi,Group:RJi,Separator:TJi,Dialog:LJi,Empty:HJi,Loading:OJi});function GJi(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function YJi(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function O_n(t){let e=ee.useRef(t);return ZT(()=>{e.current=t}),e}var ZT=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function eK(t){let e=ee.useRef();return e.current===void 0&&(e.current=t()),e}function XP(t){let e=qqe(),n=()=>t(e.snapshot());return ee.useSyncExternalStore(e.subscribe,n,n)}function G_n(t,e,n,o=[]){let i=ee.useRef(),r=Dee();return ZT(()=>{var s;let a=(()=>{var c;for(let l of n){if(typeof l=="string")return l.trim();if(typeof l=="object"&&"current"in l)return l.current?(c=l.current.textContent)==null?void 0:c.trim():i.current}})(),A=o.map(c=>c.trim());r.value(t,a,A),(s=e.current)==null||s.setAttribute(ZU,a),i.current=a}),i}var UJi=()=>{let[t,e]=ee.useState(),n=eK(()=>new Map);return ZT(()=>{n.current.forEach(o=>o()),n.current=new Map},[t]),(o,i)=>{n.current.set(o,i),e({})}};function KJi(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function qfe({asChild:t,children:e},n){return t&&ee.isValidElement(e)?ee.cloneElement(KJi(e),{ref:e.ref},n(e.props.children)):n(e)}var VJi={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Y_n=ee.forwardRef(({className:t,...e},n)=>K.jsx(t3,{ref:n,className:Oi("rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",t),...e}));Y_n.displayName=t3.displayName;const U_n=ee.forwardRef(({className:t,...e},n)=>K.jsxs("div",{className:"rf-flex rf-items-center rf-border-b rf-px-3","cmdk-input-wrapper":"",children:[K.jsx(iWe,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50"}),K.jsx(t3.Input,{ref:n,className:Oi("rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400",t),...e})]}));U_n.displayName=t3.Input.displayName;const K_n=ee.forwardRef(({className:t,...e},n)=>K.jsx(t3.List,{ref:n,className:Oi("rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden rf-py-1",t),...e}));K_n.displayName=t3.List.displayName;const Xqe=ee.forwardRef((t,e)=>K.jsx(t3.Empty,{ref:e,className:"rf-py-6 rf-text-center rf-text-sm",...t}));Xqe.displayName=t3.Empty.displayName;const Nee=ee.forwardRef(({className:t,...e},n)=>K.jsx(t3.Group,{ref:n,className:Oi("rf-overflow-hidden rf-px-1 rf-py-0 rf-text-zinc-950 [&_[cmdk-group-heading]]:rf-px-2 [&_[cmdk-group-heading]]:rf-py-1.5 [&_[cmdk-group-heading]]:rf-text-xs [&_[cmdk-group-heading]]:rf-font-medium [&_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[&_[cmdk-group-heading]]:rf-text-zinc-400",t),...e}));Nee.displayName=t3.Group.displayName;const zJi=ee.forwardRef(({className:t,...e},n)=>K.jsx(t3.Separator,{ref:n,className:Oi("rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800",t),...e}));zJi.displayName=t3.Separator.displayName;const Ree=ee.forwardRef(({className:t,...e},n)=>K.jsx(t3.Item,{ref:n,className:Oi("rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50",t),...e}));Ree.displayName=t3.Item.displayName;var JJi=Object.defineProperty,ZP=(t,e)=>JJi(t,"name",{value:e,configurable:!0}),Zqe="Popover",[V_n,Gmr]=Nx(Zqe,[PP]),eXe=PP(),[WJi,tK]=V_n(Zqe),jJi=ZP(t=>{const{__scopePopover:e,children:n,open:o,defaultOpen:i,onOpenChange:r,modal:s=!1}=t,a=eXe(e),A=ee.useRef(null),[c,l]=ee.useState(!1),[u,g]=DB({prop:o,defaultProp:i??!1,onChange:r,caller:Zqe});return K.jsx(CZ,{...a,children:K.jsx(WJi,{scope:e,contentId:t_(),triggerRef:A,open:u,onOpenChange:g,onOpenToggle:ee.useCallback(()=>g(h=>!h),[g]),hasCustomAnchor:c,onCustomAnchorAdd:ee.useCallback(()=>l(!0),[]),onCustomAnchorRemove:ee.useCallback(()=>l(!1),[]),modal:s,children:n})})},"Popover"),$Ji="PopoverTrigger",qJi=ee.forwardRef(ZP(function(e,n){const{__scopePopover:o,...i}=e,r=tK($Ji,o),s=eXe(o),a=$A(n,r.triggerRef),A=K.jsx(Na.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":tXe(r.open),...i,ref:a,onClick:ar(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?A:K.jsx(Hme,{asChild:!0,...s,children:A})},"PopoverTrigger")),z_n="PopoverPortal",[XJi,ZJi]=V_n(z_n,{forceMount:void 0}),eWi=ZP(t=>{const{__scopePopover:e,forceMount:n,children:o,container:i}=t,r=tK(z_n,e);return K.jsx(XJi,{scope:e,forceMount:n,children:K.jsx(uE,{present:n||r.open,children:K.jsx(Gme,{asChild:!0,container:i,children:o})})})},"PopoverPortal"),Tee="PopoverContent",tWi=ee.forwardRef(ZP(function(e,n){const o=ZJi(Tee,e.__scopePopover),{forceMount:i=o.forceMount,...r}=e,s=tK(Tee,e.__scopePopover);return K.jsx(uE,{present:i||s.open,children:s.modal?K.jsx(oWi,{...r,ref:n}):K.jsx(iWi,{...r,ref:n})})},"PopoverContent")),nWi=MB("PopoverContent.RemoveScroll"),oWi=ee.forwardRef(ZP(function(e,n){const o=tK(Tee,e.__scopePopover),i=ee.useRef(null),r=$A(n,i),s=ee.useRef(!1);return ee.useEffect(()=>{const a=i.current;if(a)return Kme(a)},[]),K.jsx(yZ,{as:nWi,allowPinchZoom:!0,children:K.jsx(J_n,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ar(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:ar(e.onPointerDownOutside,a=>{const A=a.detail.originalEvent,c=A.button===0&&A.ctrlKey===!0,l=A.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ar(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),iWi=ee.forwardRef(ZP(function(e,n){const o=tK(Tee,e.__scopePopover),i=ee.useRef(!1),r=ee.useRef(!1);return K.jsx(J_n,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||o.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})},"PopoverContentNonModal")),J_n=ee.forwardRef(ZP(function(e,n){const{__scopePopover:o,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:A,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...g}=e,h=tK(Tee,o),d=eXe(o);return hU(),K.jsx(Sme,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:A,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:K.jsx(Ome,{"data-state":tXe(h.open),role:"dialog",id:h.contentId,...d,...g,ref:n,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function tXe(t){return t?"open":"closed"}ZP(tXe,"getState");var rWi=jJi,sWi=qJi,aWi=eWi,W_n=tWi;const AWi=rWi,cWi=sWi,j_n=ee.forwardRef(({className:t,align:e="center",sideOffset:n=4,...o},i)=>K.jsx(aWi,{children:K.jsx(W_n,{ref:i,align:e,sideOffset:n,className:Oi("rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",t),...o})}));j_n.displayName=W_n.displayName;function $_n(t,e){const n=t.lastIndexOf("."),o=e.lastIndexOf("."),i=n>0?t.substring(0,n):t,r=o>0?e.substring(0,o):e;if(i!==r&&t.substring(n)===e.substring(o)){if(i.startsWith(r))return 1;if(r.startsWith(i))return-1}return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}function lWi(t){const e=[],n=new Map;n.set("",{name:"",path:"",type:"folder",children:e});for(const o of t){const i=o.split("/");let r="";for(let s=0;s<i.length;s++){const a=i[s],A=r;if(r=r?`${r}/${a}`:a,!n.has(r)){const c=s===i.length-1,l={name:a,path:r,type:c?"file":"folder",children:c?void 0:[]};n.set(r,l);const u=n.get(A);u&&u.children&&u.children.push(l)}}}return e}function q_n(t,e){for(const n of t){if(n.path===e)return n;if(n.children){const o=q_n(n.children,e);if(o)return o}}return null}function uWi(t,e){let n;if(e?n=q_n(t,e):n={name:"",path:"",type:"folder",children:t},!n||!n.children)return{files:[],folders:[]};const o=n.children.filter(r=>r.type==="file"),i=n.children.filter(r=>r.type==="folder");return o.sort((r,s)=>$_n(r.name,s.name)),i.sort((r,s)=>$_n(r.name,s.name)),{files:o,folders:i}}const gWi=t=>{const e=t.split("/").pop()||"";return e.endsWith(".py.tsx")?e.slice(0,-4):e};function nXe(t){const e=t.lastIndexOf("/");return e===-1?"/":t.substring(0,e)}function dWi({currentFile:t,files:e}){const[n,o]=ee.useState(!1),[i,r]=ee.useState(()=>{if(typeof window<"u"){const A=new URLSearchParams(window.location.search),c=new URLSearchParams(window.location.hash.slice(1)),l=A.get("file")??c.get("file");if(l&&e.includes(l)){const u=nXe(l);return u==="/"?null:u}}if(t&&e.includes(t)){const A=nXe(t);return A==="/"?null:A}return null});return ee.useEffect(()=>{if(t&&!n&&e.includes(t)){const A=nXe(t);r(A==="/"?null:A)}},[t,n,e]),{currentFolder:i,navigateToFolder:A=>{r(A),o(!0)},resetManualNavigation:()=>{o(!1)}}}const oXe=t=>t.endsWith(".tsx")||t.endsWith(".jsx")?K.jsx(gbi,{className:"rf-h-4 rf-w-4 rf-text-blue-500"}):t.endsWith(".md")||t.endsWith(".txt")?K.jsx(pbi,{className:"rf-h-4 rf-w-4 rf-text-gray-600"}):K.jsx(mbi,{className:"rf-h-4 rf-w-4 rf-text-gray-500"}),hWi=t=>t.endsWith(".tsx")||$fe(t)||t.endsWith(".jsx"),pWi=t=>gWi(t),X_n=t=>t.substring(0,t.lastIndexOf("/"))||"/",Z_n=({files:t,onFileChange:e,currentFile:n,fileFilter:o=hWi,getDisplayName:i=pWi,placeholder:r="Select file",searchPlaceholder:s="Search for file",emptyMessage:a="No files found in this directory.",pinnedFiles:A=[],onToggleFavorite:c,recentlySavedFiles:l=[]})=>{const[u,g]=ee.useState(!1),[h,d]=ee.useState(n),{currentFolder:p,navigateToFolder:m,resetManualNavigation:_}=dWi({currentFile:h,files:t}),[f,I]=ee.useState(0),[C,y]=ee.useState(""),[x,E]=OO("runframe:recentlyViewed",[]),[B,S]=OO("runframe:showRecents",!1);ee.useEffect(()=>{const ie=ne=>{(ne.metaKey||ne.ctrlKey)&&ne.key==="k"&&(ne.preventDefault(),g(le=>!le))};return window.addEventListener("keydown",ie),()=>window.removeEventListener("keydown",ie)},[]);const Q=t.filter(o),w=ee.useRef(null);ee.useEffect(()=>{const ie=()=>{w.current&&(clearTimeout(w.current),w.current=null)};return d(n),n&&Q.includes(n)&&(ie(),w.current=setTimeout(()=>{E(ne=>{if(ne[0]===n)return ne;const le=ne.filter(ge=>ge!==n);return[n,...le].slice(0,10)})},500)),ie},[n,Q,E]);const M=lWi(Q),{files:k,folders:R}=uWi(M,p||""),O=(()=>{if(!C.trim())return{currentDirResults:[],globalResults:[]};const ie=C.toLowerCase(),le=Q.map(ue=>{const fe=ue.split("/").pop()||"";return{path:ue,fileName:fe}}).filter(ue=>ue.fileName.toLowerCase().includes(ie)||ue.path.toLowerCase().includes(ie)),ge=le.filter(ue=>p?ue.path.substring(0,ue.path.lastIndexOf("/"))===p:!ue.path.includes("/")),_e=le.filter(ue=>p?ue.path.substring(0,ue.path.lastIndexOf("/"))!==p:ue.path.includes("/"));return{currentDirResults:ge,globalResults:_e}})(),U=C.trim().length>0,Y=ie=>{m(ie),I(0)},W=ee.useCallback(()=>{if(!p)return;const ie=p.lastIndexOf("/"),ne=ie===-1?null:p.substring(0,ie);Y(ne)},[p,Y]);ee.useEffect(()=>{if(!u)return;const ie=ne=>{(ne.metaKey||ne.ctrlKey)&&ne.key==="ArrowUp"&&(ne.preventDefault(),W())};return window.addEventListener("keydown",ie),()=>window.removeEventListener("keydown",ie)},[u,W]);const te=ee.useCallback((ie,ne,le=!1)=>{if(d(ie),I(ne),g(!1),e(ie),le){const ge=ie.lastIndexOf("/"),_e=ge===-1?null:ie.substring(0,ge);Y(_e)}},[e,Y]);ee.useEffect(()=>{const ie=ne=>{if((ne.metaKey||ne.ctrlKey)&&(ne.key==="ArrowLeft"||ne.key==="ArrowRight")){if(ne.preventDefault(),!n||k.length===0)return;const le=k.findIndex(ue=>ue.path===n);if(le===-1)return;let ge;ne.key==="ArrowLeft"?ge=le===0?k.length-1:le-1:ge=le===k.length-1?0:le+1;const _e=k[ge];_e&&te(_e.path,ge)}};return window.addEventListener("keydown",ie),()=>window.removeEventListener("keydown",ie)},[n,k,te]),ee.useEffect(()=>{if(k.length>0){const ie=k.findIndex(ne=>ne.path===n);ie>=0&&I(ie)}},[k,n]);const j=ee.useMemo(()=>{const ie=l.filter(ge=>Q.includes(ge)),ne=x.filter(ge=>Q.includes(ge)),le=[];ie.length>0&&le.push({path:ie[0],type:"saved"});for(const ge of ne){if(le.length>=3)break;le.some(_e=>_e.path===ge)||le.push({path:ge,type:"viewed"})}return le},[l,x,Q]),J=p??"/";J.length>25&&""+J.slice(-22);const oe=()=>`rf-w-full rf-min-w-[600px] ${U?"rf-max-w-[600px]":"rf-max-w-[1000px]"}`;return K.jsx("div",{className:"rf-flex rf-items-center rf-gap-1",children:K.jsxs(AWi,{open:u,onOpenChange:ie=>{g(ie),ie||(y(""),_())},children:[K.jsx(cWi,{asChild:!0,children:K.jsxs(fA,{variant:"outline",role:"combobox","aria-expanded":u,className:"rf-w-fit rf-min-w-32 rf-max-w-100 rf-justify-center rf-items-center rf-gap-1 !rf-font-normal",children:[K.jsx("span",{className:"rf-truncate rf-text-left",children:h?i(h):r}),K.jsx(abi,{className:"rf-opacity-50 rf-flex-shrink-0"})]})}),K.jsx(j_n,{className:Oi("!rf-p-0 !rf-overflow-y-auto !rf-max-h-[80vh] !rf-z-[200]",oe()),children:K.jsxs(Y_n,{shouldFilter:!1,children:[K.jsx(U_n,{placeholder:s,className:"rf-h-9 rf-w-full",value:C,onValueChange:y}),j.length>0&&K.jsxs("div",{className:"rf-border-b rf-border-gray-200",children:[K.jsxs("button",{onClick:()=>S(!B),className:"rf-w-full rf-px-3 rf-py-2 rf-flex rf-items-center rf-justify-between rf-text-xs rf-text-slate-600 hover:rf-bg-slate-50 rf-bg-transparent rf-border-none rf-cursor-pointer",children:[K.jsx("span",{className:"rf-font-medium",children:"Recent Files"}),K.jsx(pZ,{className:Oi("rf-h-4 rf-w-4 rf-transition-transform",!B&&"-rf-rotate-90")})]}),B&&K.jsx("div",{className:"rf-pb-1",children:j.map((ie,ne)=>K.jsxs("div",{onClick:()=>te(ie.path,ne,!0),className:Oi("rf-flex rf-items-center rf-px-3 rf-py-1.5 rf-cursor-pointer hover:rf-bg-slate-100",ie.path===n&&"rf-font-medium"),children:[ie.type==="saved"?K.jsx("span",{title:"Recently saved",children:K.jsx(Sbi,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-green-500"})}):K.jsx("span",{title:"Recently viewed",children:K.jsx(ubi,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-500"})}),K.jsx("span",{className:"rf-text-sm",children:i(ie.path.split("/").pop()||"")}),K.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:X_n(ie.path)}),K.jsx(CS,{className:Oi("rf-ml-auto rf-h-4 rf-w-4",ie.path===n?"rf-opacity-100":"rf-opacity-0")})]},ie.path))})]}),K.jsxs("div",{className:"rf-px-3 rf-py-2 rf-bg-slate-50 rf-flex rf-items-center rf-justify-between rf-gap-2",children:[K.jsx("div",{className:"rf-flex rf-items-center rf-text-xs rf-text-slate-600 rf-min-w-0 rf-flex-1",children:K.jsxs("div",{className:"rf-flex rf-items-center rf-min-w-0",children:[K.jsx("button",{onClick:()=>Y(null),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-flex-shrink-0",children:"root"}),p?.split("/").filter(Boolean).map((ie,ne,le)=>{const ge=le.slice(0,ne+1).join("/");return K.jsxs("span",{className:"rf-flex rf-items-center rf-min-w-0",children:[K.jsx("span",{className:"rf-mx-1 rf-flex-shrink-0",children:"/"}),ne===le.length-1?K.jsx("span",{className:"rf-text-slate-800 rf-truncate rf-max-w-[200px]",title:ie,children:ie}):K.jsx("button",{onClick:()=>Y(ge),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-truncate rf-max-w-[150px]",title:ie,children:ie})]},ge)})]})}),K.jsx("div",{className:"rf-flex rf-items-center rf-gap-2 rf-flex-shrink-0",children:p&&K.jsxs("button",{onClick:W,className:"rf-flex rf-items-center rf-gap-1 rf-text-slate-600 hover:rf-text-slate-800 rf-bg-transparent rf-border-none rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-colors",title:"Go up one level",children:[K.jsx(ibi,{className:"rf-h-3 rf-w-3"}),K.jsx("span",{className:"rf-text-xs rf-font-medium",children:"Up"})]})})]}),K.jsx(K_n,{className:"rf-overflow-visible rf-max-h-none",children:U?K.jsx(K.Fragment,{children:O.currentDirResults.length===0&&O.globalResults.length===0?K.jsxs(Xqe,{children:['No files found matching "',C,'".']}):K.jsxs(K.Fragment,{children:[O.currentDirResults.length>0&&K.jsx(Nee,{children:O.currentDirResults.map((ie,ne)=>K.jsxs(Ree,{value:`search-current:${ie.path}`,onSelect:()=>{d(ie.path),g(!1),e(ie.path)},className:Oi(ie.path===n&&"rf-font-medium","rf-group"),children:[K.jsx("span",{className:"rf-mr-2",children:oXe(ie.fileName)}),K.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[K.jsx("span",{className:"rf-truncate rf-flex-1",children:i(ie.fileName)}),K.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:p||"/"}),ie.path===n&&K.jsx(CS,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},ie.path))}),O.globalResults.length>0&&K.jsx(Nee,{children:O.globalResults.map(ie=>K.jsxs(Ree,{value:`search-global:${ie.path}`,onSelect:()=>{d(ie.path),g(!1),e(ie.path)},className:Oi(ie.path===n&&"rf-font-medium","rf-group"),children:[K.jsx("span",{className:"rf-mr-2",children:oXe(ie.fileName)}),K.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[K.jsx("span",{className:"rf-truncate rf-flex-1",children:i(ie.fileName)}),K.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:X_n(ie.path)}),ie.path===n&&K.jsx(CS,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},ie.path))})]})}):K.jsxs(K.Fragment,{children:[K.jsx(Xqe,{children:a}),k.length>0&&K.jsx(Nee,{children:k.map((ie,ne)=>K.jsxs(Ree,{value:`current:${ie.path}`,onSelect:()=>te(ie.path,ne),className:Oi(ie.path===n&&"rf-font-medium","rf-group"),children:[K.jsx("span",{className:"rf-mr-2",children:oXe(ie.name)}),i(ie.name),K.jsx("div",{className:"rf-ml-auto rf-flex rf-items-center rf-gap-1",children:K.jsx(CS,{className:Oi("rf-h-4 rf-w-4",ie.path===n?"rf-opacity-100":"rf-opacity-0")})})]},ie.path))}),R.length>0&&K.jsx(Nee,{children:R.map(ie=>K.jsxs(Ree,{value:`folder-${ie.path}`,onSelect:()=>Y(ie.path),className:"rf-text-slate-600 hover:rf-text-slate-900",children:[K.jsx(_bi,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600"}),ie.name,K.jsx(bT,{className:"rf-ml-auto rf-h-4 rf-w-4"})]},ie.path))}),k.length===0&&R.length===0&&K.jsx("div",{className:"rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm",children:"No files or folders in this directory"})]})})]})})]})})},mWi=({files:t,onFileChange:e,currentFile:n})=>K.jsx(Z_n,{files:t,onFileChange:e,currentFile:n,fileFilter:()=>!0,placeholder:"Select circuit",searchPlaceholder:"Search for circuit file",emptyMessage:"No circuit files found in this directory."}),efn=t=>t!==null&&!["0","false","off","no"].includes(t.toLowerCase()),_Wi=({hash:t,search:e=""})=>{const n=new URLSearchParams(t.startsWith("#")?t.slice(1):t),o=new URLSearchParams(e.startsWith("?")?e.slice(1):e);return efn(n.get("gallery"))||efn(o.get("gallery"))},fWi=({hash:t,initialCircuitPath:e})=>{const n=new URLSearchParams(t.startsWith("#")?t.slice(1):t);return n.get("file")??n.get("main_component")??e??""},IWi=({hash:t,filePath:e})=>{const n=new URLSearchParams(t.startsWith("#")?t.slice(1):t);if(n.get("file")===e&&!n.has("gallery")&&(!n.has("main_component")||n.get("main_component")===e))return t.startsWith("#")?t:t?`#${t}`:"";n.delete("gallery"),n.set("file",e),n.has("main_component")&&n.set("main_component",e);const o=n.toString();return o?`#${o}`:""},CWi=(t,e=!1)=>{const[n,o]=ee.useState(()=>typeof window>"u"?t??"":fWi({hash:window.location.hash,initialCircuitPath:t})),[i,r]=ee.useState(()=>typeof window>"u"?e:e||_Wi({hash:window.location.hash,search:window.location.search})),s=ee.useCallback(l=>{if(typeof window>"u")return;const u=new URLSearchParams(window.location.hash.slice(1)),g=new URLSearchParams(window.location.search.slice(1));l?u.set("gallery","true"):(u.delete("gallery"),g.delete("gallery"));const h=g.toString(),d=u.toString();window.history.replaceState(null,"",`${window.location.pathname}${h?`?${h}`:""}${d?`#${d}`:""}`)},[]),a=ee.useCallback(()=>{r(!0),s(!0)},[s]),A=ee.useCallback(()=>{r(!1),s(!1)},[s]),c=ee.useCallback(l=>{if(typeof window>"u")return;const u=IWi({hash:window.location.hash,filePath:l}),g=new URLSearchParams(window.location.search.slice(1));g.delete("gallery");const h=g.toString(),d=`${window.location.pathname}${h?`?${h}`:""}${u}`;u===window.location.hash&&`${h?`?${h}`:""}`===window.location.search||window.history.replaceState(null,"",d)},[]);return{currentCircuitJsonPath:n,setCurrentCircuitJsonPath:o,updateFileHash:c,isGalleryVisible:i,showGallery:a,hideGallery:A}},yWi=t=>{const e=t.fileStaticAssetUrl,n=e.search(/[?#]/),o=n===-1?e:e.slice(0,n),i=n===-1?"":e.slice(n),r=o.includes("/")?o.slice(0,o.lastIndexOf("/")+1):"";return["3d.png","pcb.png","pcb.svg","schematic.png","schematic.svg"].map(s=>`${r}${s}${i}`)},tfn=t=>(t.split("/").pop()??t).replace(/(\.board|\.circuit)?\.(tsx|jsx|json)$/i,""),xWi=({fileRef:t})=>{const e=yWi(t),[n,o]=ee.useState(0);return n>=e.length?K.jsx("div",{className:"rf-flex rf-h-full rf-w-full rf-items-center rf-justify-center rf-bg-zinc-100 rf-text-zinc-400",children:K.jsx(Ibi,{className:"rf-h-8 rf-w-8","aria-hidden":"true"})}):K.jsx("img",{src:e[n],alt:`Preview of ${tfn(t.filePath)}`,className:"rf-h-full rf-w-full rf-object-contain rf-transition-transform rf-duration-200 group-hover:rf-scale-[1.03]",loading:"lazy",onError:()=>o(i=>i+1)})},EWi=({files:t,projectName:e,onSelectFile:n,onClose:o})=>(ee.useEffect(()=>{const i=r=>{r.key==="Escape"&&o()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[o]),K.jsx("main",{className:"rf-h-full rf-w-full rf-overflow-y-auto rf-bg-zinc-50",children:K.jsxs("div",{className:"rf-mx-auto rf-w-full rf-max-w-7xl rf-px-5 rf-py-8 sm:rf-px-8 sm:rf-py-10",children:[K.jsxs("div",{className:"rf-mb-7 rf-flex rf-items-start rf-justify-between rf-gap-4",children:[K.jsxs("div",{children:[K.jsx("p",{className:"rf-mb-1 rf-text-xs rf-font-medium rf-uppercase rf-tracking-wider rf-text-zinc-500",children:e??"tscircuit project"}),K.jsx("h1",{className:"rf-text-2xl rf-font-semibold rf-tracking-tight rf-text-zinc-950 sm:rf-text-3xl",children:"Circuit gallery"}),K.jsxs("p",{className:"rf-mt-2 rf-text-sm rf-text-zinc-600",children:["Explore ",t.length," ",t.length===1?"board":"boards",". Select one to open its interactive preview."]})]}),K.jsxs(fA,{type:"button",variant:"outline",onClick:o,children:[K.jsx(obi,{className:"rf-h-4 rf-w-4"}),"Back to circuit"]})]}),K.jsx("div",{className:"rf-grid rf-grid-cols-1 rf-gap-5 sm:rf-grid-cols-2 lg:rf-grid-cols-3",children:t.map(i=>K.jsxs("button",{type:"button",onClick:()=>n(i.filePath),className:"group rf-overflow-hidden rf-rounded-xl rf-border rf-border-zinc-200 rf-bg-white rf-text-left rf-shadow-sm rf-transition-all hover:rf--translate-y-0.5 hover:rf-border-zinc-300 hover:rf-shadow-md focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-900 focus-visible:rf-ring-offset-2",children:[K.jsx("div",{className:"rf-aspect-[4/3] rf-w-full rf-overflow-hidden rf-bg-white rf-p-3",children:K.jsx(xWi,{fileRef:i})}),K.jsxs("div",{className:"rf-border-t rf-border-zinc-100 rf-px-4 rf-py-3",children:[K.jsx("div",{className:"rf-truncate rf-text-sm rf-font-medium rf-text-zinc-900",children:tfn(i.filePath)}),K.jsx("div",{className:"rf-mt-0.5 rf-truncate rf-text-xs rf-text-zinc-500",children:i.filePath})]})]},i.filePath))})]})})),BWi=t=>t instanceof Error?t.message:"An unknown error occurred",bWi=t=>{mee();const{currentCircuitJsonPath:e,setCurrentCircuitJsonPath:n,updateFileHash:o,isGalleryVisible:i,showGallery:r,hideGallery:s}=CWi(t.initialCircuitPath,t.defaultToGallery),[a,A]=ee.useState(null),[c,l]=ee.useState(!1),[u,g]=ee.useState({}),[h,d]=ee.useState(new Set),[p,m]=ee.useState(new Set),_=t.files,f=_.map(S=>S.filePath),I=ee.useCallback(async S=>{if(!S.fileStaticAssetUrl)throw new Error(`No fileStaticAssetUrl provided for ${S.filePath}`);const Q=await fetch(S.fileStaticAssetUrl);if(!Q.ok)throw new Error(`Failed to fetch ${S.filePath}: ${Q.statusText}`);return await Q.json()},[]),C=ee.useCallback(async S=>{if(u[S]){A(u[S]),o(S),t.onCircuitJsonPathChange?.(S);return}if(p.has(S)){console.warn(`Skipping failed file: ${S}`),A(null);return}if(!h.has(S)){d(Q=>new Set(Q).add(S)),l(!0),A(null);try{const Q=_.find(k=>k.filePath===S);if(!Q)throw new Error(`File reference not found for ${S}`);const M=await(t.onFetchFile||I)(Q);g(k=>({...k,[S]:M})),A(M),o(S),t.onCircuitJsonPathChange?.(S),m(k=>{const R=new Set(k);return R.delete(S),R})}catch(Q){console.error(`Failed to load circuit JSON file ${S}:`,Q),m(w=>new Set(w).add(S)),A(null)}finally{d(Q=>{const w=new Set(Q);return w.delete(S),w}),l(!1)}}},[_,u,h,p,t.onFetchFile,t.onCircuitJsonPathChange,I,o]);ee.useEffect(()=>{if(f.length===0||i)return;let S=e;(!S||!f.includes(S))&&(S=Ifn(f)??f[0],n(S)),S&&f.includes(S)&&C(S)},[e,i]);const y=ee.useCallback(S=>{s(),n(S)},[s]),x=ee.useCallback(S=>{m(Q=>{const w=new Set(Q);return w.delete(S),w}),C(S)},[C]);if(f.length===0)return K.jsx("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center",children:K.jsxs("div",{className:"rf-text-center rf-p-8",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2",children:"No Circuit JSON Files Found"}),K.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Please provide circuit JSON files to view."})]})});if(i)return K.jsx(EWi,{files:_,projectName:t.projectName,onSelectFile:y,onClose:s});const E=f.length>1?K.jsxs(K.Fragment,{children:[K.jsx(mWi,{currentFile:e,files:f,onFileChange:y}),K.jsx(fA,{type:"button",variant:"outline",size:"icon",onClick:r,"aria-label":`Browse all ${f.length} circuits as a gallery`,title:"Open circuit gallery",children:K.jsx(mln,{className:"rf-h-4 rf-w-4"})})]}):null,B=p.has(e);return K.jsx(bE,{fallbackRender:({error:S})=>K.jsx("div",{className:"rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:K.jsxs("div",{className:"rf-p-4",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Circuit JSON Preview"}),K.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:BWi(S)})]})}),children:B?K.jsxs("div",{className:"rf-w-full rf-h-full rf-flex rf-flex-col",children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200",children:[(t.showFileMenu??!0)&&K.jsx(Yfe,{isWebEmbedded:!0,circuitJson:null,projectName:t.projectName}),f.length>1&&K.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2",children:E})]}),K.jsx("div",{className:"rf-flex-1 rf-flex rf-items-center rf-justify-center",children:K.jsxs("div",{className:"rf-text-center rf-p-8",children:[K.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2",children:"Failed to Load Circuit File"}),K.jsxs("p",{className:"rf-text-sm rf-text-gray-600 rf-mb-4",children:["Could not load: ",e]}),K.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2",children:[K.jsx("button",{onClick:()=>x(e),className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600",children:"Retry"}),f.length>1&&K.jsx("p",{className:"rf-text-xs rf-text-gray-500",children:"Or select a different file from the dropdown above"})]})]})})]}):K.jsx(h_n,{circuitJson:a,defaultToFullScreen:t.defaultToFullScreen,showToggleFullScreen:t.showToggleFullScreen,showFileMenu:!1,isWebEmbedded:!1,projectName:t.projectName,defaultActiveTab:t.tabSelected,leftHeaderContent:K.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[(t.showFileMenu??!0)&&K.jsx(Yfe,{isWebEmbedded:!0,circuitJson:a,projectName:t.projectName}),f.length>1&&K.jsx("div",{className:`rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2 ${c?"rf-opacity-50":""}`,children:E})]})})})},SWi=()=>{const t=md(e=>e.fsMap);ee.useEffect(()=>{if(!document||!t)return;const e=Array.from(t.keys()),n=Ifn(e),o=t.get("package.json");try{if(o){const i=JSON.parse(o);if(i?.name){document.title=i.name;return}}}catch{}n&&(document.title=n)},[t])},nfn=(t,e,n)=>{const o=t instanceof RegExp?ofn(t,n):t,i=e instanceof RegExp?ofn(e,n):e,r=o!==null&&i!=null&&QWi(o,i,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+o.length,r[1]),post:n.slice(r[1]+i.length)}},ofn=(t,e)=>{const n=e.match(t);return n?n[0]:null},QWi=(t,e,n)=>{let o,i,r,s,a,A=n.indexOf(t),c=n.indexOf(e,A+1),l=A;if(A>=0&&c>0){if(t===e)return[A,c];for(o=[],r=n.length;l>=0&&!a;){if(l===A)o.push(l),A=n.indexOf(t,l+1);else if(o.length===1){const u=o.pop();u!==void 0&&(a=[u,c])}else i=o.pop(),i!==void 0&&i<r&&(r=i,s=c),c=n.indexOf(e,l+1);l=A<c&&A>=0?A:c}o.length&&s!==void 0&&(a=[r,s])}return a},ifn="\0SLASH"+Math.random()+"\0",rfn="\0OPEN"+Math.random()+"\0",iXe="\0CLOSE"+Math.random()+"\0",sfn="\0COMMA"+Math.random()+"\0",afn="\0PERIOD"+Math.random()+"\0",vWi=new RegExp(ifn,"g"),wWi=new RegExp(rfn,"g"),PWi=new RegExp(iXe,"g"),MWi=new RegExp(sfn,"g"),DWi=new RegExp(afn,"g"),NWi=/\\\\/g,RWi=/\\{/g,TWi=/\\}/g,kWi=/\\,/g,FWi=/\\\./g,LWi=1e5,HWi=4e6,OWi=1e3,GWi=1e3;function rXe(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function YWi(t){return t.replace(NWi,ifn).replace(RWi,rfn).replace(TWi,iXe).replace(kWi,sfn).replace(FWi,afn)}function UWi(t){return t.replace(vWi,"\\").replace(wWi,"{").replace(PWi,"}").replace(MWi,",").replace(DWi,".")}function sXe(t,e){for(let n=0;n<e.length;n++)t.push(e[n])}function KWi(t){const e=[];let n="";for(;;){const o=nfn("{","}",t);if(!o){const A=t.split(",");return A[0]=n+A[0],sXe(e,A),e}const{pre:i,body:r,post:s}=o,a=i.split(",");if(a[0]=n+a[0],a[a.length-1]+="{"+r+"}",!s.length)return sXe(e,a),e;n=a.pop(),sXe(e,a),t=s}}function VWi(t,e={}){if(!t)return[];const{max:n=LWi,maxLength:o=HWi,maxDepth:i=OWi,maxRewrites:r=GWi}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),aXe(YWi(t),n,o,i,0,r,!0).map(UWi)}function zWi(t){return"{"+t+"}"}function JWi(t){return/^-?0\d/.test(t)}function WWi(t,e){return t<=e}function jWi(t,e){return t>=e}function kee(t,e,n,o,i,r){const s=[];let a=0;for(let A=0;A<t.length;A++)for(let c=0;c<n.length;c++){if(s.length>=o)return s;const l=t[A]+e+n[c];if(!(r&&!l)){if(a+l.length>i)return s;s.push(l),a+=l.length}}return s}function $Wi(t,e,n,o){const i=t.split(/\.\./),r=[];if(i[0]===void 0||i[1]===void 0)return r;const s=rXe(i[0]),a=rXe(i[1]),A=Math.max(i[0].length,i[1].length);let c=i.length===3&&i[2]!==void 0?Math.max(Math.abs(rXe(i[2])),1):1,l=WWi;a<s&&(c*=-1,l=jWi);const g=i.some(JWi);let h=0;for(let d=s;l(d,a)&&r.length<n;d+=c){let p;if(e)p=String.fromCharCode(d),p==="\\"&&(p="");else if(p=String(d),g){const m=A-p.length;if(m>0){const _=new Array(m+1).join("0");d<0?p="-"+_+p.slice(1):p=_+p}}if(h+p.length>o)break;r.push(p),h+=p.length}return r}function aXe(t,e,n,o,i,r,s){if(i>o)return[t];let a=[""],A=0,c=!1,l=!0;for(;;){const u=nfn("{","}",t);if(!u)return kee(a,t,[""],e,n,c);const g=u.pre;if(/\$$/.test(g)){if(a=kee(a,g+"{"+u.body+"}",[""],e,n,c&&!u.post.length),l=!1,!u.post.length)break;t=u.post;continue}const h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(u.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(u.body),p=h||d,m=u.body.indexOf(",")>=0;if(!p&&!m){if(A<r&&u.post.match(/,(?!,).*\}/)){A++,t=u.pre+"{"+u.body+iXe+u.post,s=!0;continue}return kee(a,g+"{"+u.body+"}"+u.post,[""],e,n,c)}l&&(c=s&&!p,l=!1);let _;if(p)_=$Wi(u.body,d,e,n);else{let f=KWi(u.body);if(f.length===1&&f[0]!==void 0&&(f=aXe(f[0],e,n,o,i+1,r,!1).map(zWi),f.length===1)){if(a=kee(a,g+f[0],[""],e,n,c&&!u.post.length),!u.post.length)break;t=u.post;continue}let I=c&&!u.post.length&&!g;for(let y=0;I&&y<a.length;y++)a[y]&&(I=!1);_=[];let C=0;e:for(let y=0;y<f.length;y++){const x=aXe(f[y],e,n,o,i+1,r,!1);for(let E=0;E<x.length;E++){const B=x[E];if(!(I&&!B)){if(_.length>=e||C+B.length>n)break e;_.push(B),C+=B.length}}}}if(a=kee(a,g,_,e,n,c&&!u.post.length),!u.post.length)break;t=u.post}return a}const qWi=1024*64,Xfe=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>qWi)throw new TypeError("pattern is too long")},XWi={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Fee=t=>t.replace(/[[\]\\-]/g,"\\$&"),ZWi=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Afn=t=>t.join(""),eji=(t,e)=>{const n=e;if(t.charAt(n)!=="[")throw new Error("not in a brace expression");const o=[],i=[];let r=n+1,s=!1,a=!1,A=!1,c=!1,l=n,u="";e:for(;r<t.length;){const p=t.charAt(r);if((p==="!"||p==="^")&&r===n+1){c=!0,r++;continue}if(p==="]"&&s&&!A){l=r+1;break}if(s=!0,p==="\\"&&!A){A=!0,r++;continue}if(p==="["&&!A){for(const[m,[_,f,I]]of Object.entries(XWi))if(t.startsWith(m,r)){if(u)return["$.",!1,t.length-n,!0];r+=m.length,I?i.push(_):o.push(_),a=a||f;continue e}}if(A=!1,u){p>u?o.push(Fee(u)+"-"+Fee(p)):p===u&&o.push(Fee(p)),u="",r++;continue}if(t.startsWith("-]",r+1)){o.push(Fee(p+"-")),r+=2;continue}if(t.startsWith("-",r+1)){u=p,r+=2;continue}o.push(Fee(p)),r++}if(l<r)return["",!1,0,!1];if(!o.length&&!i.length)return["$.",!1,t.length-n,!0];if(i.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!c){const p=o[0].length===2?o[0].slice(-1):o[0];return[ZWi(p),!1,l-n,!1]}const g="["+(c?"^":"")+Afn(o)+"]",h="["+(c?"":"^")+Afn(i)+"]";return[o.length&&i.length?"("+g+"|"+h+")":o.length?g:h,a,l-n,!0]},Lee=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=>n?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var n3;const tji=new Set(["!","?","+","*","@"]),AXe=t=>tji.has(t),cfn=t=>AXe(t.type),nji=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),oji=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),iji=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),lfn=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),rji="(?!(?:^|/)\\.\\.?(?:$|/))",Zfe="(?!\\.)",sji=new Set(["[","."]),aji=new Set(["..","."]),Aji=new Set("().*{}+?[]^$\\!"),cji=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cXe="[^/]",ufn=cXe+"*?",gfn=cXe+"+?";let lji=0;class lXe{type;#o;#n;#i=!1;#t=[];#e;#s;#r;#c=!1;#a;#l;#g=!1;id=++lji;get depth(){return(this.#e?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#o.id,parent:this.#e?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,n,o={}){this.type=e,e&&(this.#n=!0),this.#e=n,this.#o=this.#e?this.#e.#o:this,this.#a=this.#o===this?o:this.#o.#a,this.#r=this.#o===this?[]:this.#o.#r,e==="!"&&!this.#o.#c&&this.#r.push(this),this.#s=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#l=this.#t.map(e=>String(e)).join("")}#d(){if(this!==this.#o)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#r.pop();){if(e.type!=="!")continue;let n=e,o=n.#e;for(;o;){for(let i=n.#s+1;!o.type&&i<o.#t.length;i++)for(const r of e.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(o.#t[i])}n=o,o=n.#e}}return this}push(...e){for(const n of e)if(n!==""){if(typeof n!="string"&&!(n instanceof n3&&n.#e===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){const e=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#o||this.#o.#c&&this.#e?.type==="!")&&e.push({}),e}isStart(){if(this.#o===this)return!0;if(!this.#e?.isStart())return!1;if(this.#s===0)return!0;const e=this.#e;for(let n=0;n<this.#s;n++){const o=e.#t[n];if(!(o instanceof n3&&o.type==="!"))return!1}return!0}isEnd(){if(this.#o===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const e=this.#e?this.#e.#t.length:0;return this.#s===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const n=new n3(this.type,e);for(const o of this.#t)n.copyIn(o);return n}static#A(e,n,o,i,r){const s=i.maxExtglobRecursion??2;let a=!1,A=!1,c=-1,l=!1;if(n.type===null){let p=o,m="";for(;p<e.length;){const _=e.charAt(p++);if(a||_==="\\"){a=!a,m+=_;continue}if(A){p===c+1?(_==="^"||_==="!")&&(l=!0):_==="]"&&!(p===c+2&&l)&&(A=!1),m+=_;continue}else if(_==="["){A=!0,c=p,l=!1,m+=_;continue}if(!i.noext&&AXe(_)&&e.charAt(p)==="("&&r<=s){n.push(m),m="";const I=new n3(_,n);p=n3.#A(e,I,p,i,r+1),n.push(I);continue}m+=_}return n.push(m),p}let u=o+1,g=new n3(null,n);const h=[];let d="";for(;u<e.length;){const p=e.charAt(u++);if(a||p==="\\"){a=!a,d+=p;continue}if(A){u===c+1?(p==="^"||p==="!")&&(l=!0):p==="]"&&!(u===c+2&&l)&&(A=!1),d+=p;continue}else if(p==="["){A=!0,c=u,l=!1,d+=p;continue}if(!i.noext&&AXe(p)&&e.charAt(u)==="("&&(r<=s||n&&n.#u(p))){const _=n&&n.#u(p)?0:1;g.push(d),d="";const f=new n3(p,g);g.push(f),u=n3.#A(e,f,u,i,r+_);continue}if(p==="|"){g.push(d),d="",h.push(g),g=new n3(null,n);continue}if(p===")")return d===""&&n.#t.length===0&&(n.#g=!0),g.push(d),d="",n.push(...h,g),u;d+=p}return n.type=null,n.#n=void 0,n.#t=[e.substring(o-1)],u}#m(e){return this.#_(e,oji)}#_(e,n=nji){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null)return!1;const o=e.#t[0];return!o||typeof o!="object"||o.type===null?!1:this.#u(o.type,n)}#u(e,n=iji){return!!n.get(this.type)?.includes(e)}#h(e,n){const o=e.#t[0],i=new n3(null,o,this.options);i.#t.push(""),o.push(i),this.#p(e,n)}#p(e,n){const o=e.#t[0];this.#t.splice(n,1,...o.#t);for(const i of o.#t)typeof i=="object"&&(i.#e=this);this.#l=void 0}#C(e){return!!lfn.get(this.type)?.has(e)}#y(e){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;const n=e.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#C(n.type)}#x(e){const n=lfn.get(this.type),o=e.#t[0],i=n?.get(o.type);if(!i)return!1;this.#t=o.#t;for(const r of this.#t)typeof r=="object"&&(r.#e=this);this.type=i,this.#l=void 0,this.#g=!1}static fromGlob(e,n={}){const o=new n3(null,void 0,n);return n3.#A(e,o,0,n,0),o}toMMPattern(){if(this!==this.#o)return this.#o.toMMPattern();const e=this.toString(),[n,o,i,r]=this.toRegExpSource();if(!(i||this.#n||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return o;const a=(this.#a.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${n}$`,a),{_src:n,_glob:e})}get options(){return this.#a}toRegExpSource(e){const n=e??!!this.#a.dot;if(this.#o===this&&(this.#f(),this.#d()),!cfn(this)){const A=this.isStart()&&this.isEnd()&&!this.#t.some(h=>typeof h!="string"),c=this.#t.map(h=>{const[d,p,m,_]=typeof h=="string"?n3.#E(h,this.#n,A):h.toRegExpSource(e);return this.#n=this.#n||m,this.#i=this.#i||_,d}).join("");let l="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&aji.has(this.#t[0]))){const d=sji,p=n&&d.has(c.charAt(0))||c.startsWith("\\.")&&d.has(c.charAt(2))||c.startsWith("\\.\\.")&&d.has(c.charAt(4)),m=!n&&!e&&d.has(c.charAt(0));l=p?rji:m?Zfe:""}let u="";return this.isEnd()&&this.#o.#c&&this.#e?.type==="!"&&(u="(?:$|\\/)"),[l+c+u,Lee(c),this.#n=!!this.#n,this.#i]}const o=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#I(n);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const A=this.toString(),c=this;return c.#t=[A],c.type=null,c.#n=void 0,[A,Lee(this.toString()),!1,!1]}let s=!o||e||n||!Zfe?"":this.#I(!0);s===r&&(s=""),s&&(r=`(?:${r})(?:${s})*?`);let a="";if(this.type==="!"&&this.#g)a=(this.isStart()&&!n?Zfe:"")+gfn;else{const A=this.type==="!"?"))"+(this.isStart()&&!n&&!e?Zfe:"")+ufn+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;a=i+r+A}return[a,Lee(r),this.#n=!!this.#n,this.#i]}#f(){if(cfn(this)){let e=0,n=!1;do{n=!0;for(let o=0;o<this.#t.length;o++){const i=this.#t[o];typeof i=="object"&&(i.#f(),this.#_(i)?(n=!1,this.#p(i,o)):this.#m(i)?(n=!1,this.#h(i,o)):this.#y(i)&&(n=!1,this.#x(i)))}}while(!n&&++e<10)}else for(const e of this.#t)typeof e=="object"&&e.#f();this.#l=void 0}#I(e){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[o,i,r,s]=n.toRegExpSource(e);return this.#i=this.#i||s,o}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#E(e,n,o=!1){let i=!1,r="",s=!1,a=!1;for(let A=0;A<e.length;A++){const c=e.charAt(A);if(i){i=!1,r+=(Aji.has(c)?"\\":"")+c;continue}if(c==="*"){if(a)continue;a=!0,r+=o&&/^[*]+$/.test(e)?gfn:ufn,n=!0;continue}else a=!1;if(c==="\\"){A===e.length-1?r+="\\\\":i=!0;continue}if(c==="["){const[l,u,g,h]=eji(e,A);if(g){r+=l,s=s||u,A+=g-1,n=n||h;continue}}if(c==="?"){r+=cXe,n=!0;continue}r+=cji(c)}return[r,Lee(e),!!n,s]}}n3=lXe;const uji=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=>n?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var nK={env:{}};const d2=(t,e,n={})=>(Xfe(e),!n.nocomment&&e.charAt(0)==="#"?!1:new Hee(e,n).match(t)),gji=/^\*+([^+@!?*[(]*)$/,dji=t=>e=>!e.startsWith(".")&&e.endsWith(t),hji=t=>e=>e.endsWith(t),pji=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),mji=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),_ji=/^\*+\.\*+$/,fji=t=>!t.startsWith(".")&&t.includes("."),Iji=t=>t!=="."&&t!==".."&&t.includes("."),Cji=/^\.\*+$/,yji=t=>t!=="."&&t!==".."&&t.startsWith("."),xji=/^\*+$/,Eji=t=>t.length!==0&&!t.startsWith("."),Bji=t=>t.length!==0&&t!=="."&&t!=="..",bji=/^\?+([^+@!?*[(]*)?$/,Sji=([t,e=""])=>{const n=dfn([t]);return e?(e=e.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(e)):n},Qji=([t,e=""])=>{const n=hfn([t]);return e?(e=e.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(e)):n},vji=([t,e=""])=>{const n=hfn([t]);return e?o=>n(o)&&o.endsWith(e):n},wji=([t,e=""])=>{const n=dfn([t]);return e?o=>n(o)&&o.endsWith(e):n},dfn=([t])=>{const e=t.length;return n=>n.length===e&&!n.startsWith(".")},hfn=([t])=>{const e=t.length;return n=>n.length===e&&n!=="."&&n!==".."},pfn=typeof nK=="object"&&nK?typeof nK.env=="object"&&nK.env&&nK.env.__MINIMATCH_TESTING_PLATFORM__||nK.platform:"posix",mfn={win32:{sep:"\\"},posix:{sep:"/"}},Pji=pfn==="win32"?mfn.win32.sep:mfn.posix.sep;d2.sep=Pji;const kC=Symbol("globstar **");d2.GLOBSTAR=kC;const Mji="[^/]"+"*?",Dji="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Nji="(?:(?!(?:\\/|^)\\.).)*?",Rji=(t,e={})=>n=>d2(n,t,e);d2.filter=Rji;const x4=(t,e={})=>Object.assign({},t,e),Tji=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return d2;const e=d2;return Object.assign((o,i,r={})=>e(o,i,x4(t,r)),{Minimatch:class extends e.Minimatch{constructor(i,r={}){super(i,x4(t,r))}static defaults(i){return e.defaults(x4(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,r,s={}){super(i,r,x4(t,s))}static fromGlob(i,r={}){return e.AST.fromGlob(i,x4(t,r))}},unescape:(o,i={})=>e.unescape(o,x4(t,i)),escape:(o,i={})=>e.escape(o,x4(t,i)),filter:(o,i={})=>e.filter(o,x4(t,i)),defaults:o=>e.defaults(x4(t,o)),makeRe:(o,i={})=>e.makeRe(o,x4(t,i)),braceExpand:(o,i={})=>e.braceExpand(o,x4(t,i)),match:(o,i,r={})=>e.match(o,i,x4(t,r)),sep:e.sep,GLOBSTAR:kC})};d2.defaults=Tji;const _fn=(t,e={})=>(Xfe(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:VWi(t,{max:e.braceExpandMax}));d2.braceExpand=_fn;const kji=(t,e={})=>new Hee(t,e).makeRe();d2.makeRe=kji;const Fji=(t,e,n={})=>{const o=new Hee(e,n);return t=t.filter(i=>o.match(i)),o.options.nonull&&!t.length&&t.push(e),t};d2.match=Fji;const ffn=/[?*]|[+@!]\(.*?\)|\[|\]/,Lji=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Hee{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,n={}){Xfe(e),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=e,this.platform=n.platform||pfn,this.isWindows=this.platform==="win32";const o="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[o]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const n of e)if(typeof n!="string")return!0;return!1}debug(...e){}make(){const e=this.pattern,n=this.options;if(!n.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);const o=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,s,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const A=r[0]===""&&r[1]===""&&(r[2]==="?"||!ffn.test(r[2]))&&!ffn.test(r[3]),c=/^[a-z]:/i.test(r[0]);if(A)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(c)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(A=>this.parse(A))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){const s=this.set[r];s[0]===""&&s[1]===""&&this.globParts[r][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(const o of e)for(let i=0;i<o.length;i++)o[i]==="**"&&(o[i]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=>{let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let i=o;for(;n[i+1]==="**";)i++;i!==o&&n.splice(o,i-o)}return n})}levelOneOptimize(e){return e.map(n=>(n=n.reduce((o,i)=>{const r=o[o.length-1];return i==="**"&&r==="**"?o:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(o.pop(),o):(o.push(i),o)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){const r=e[i];i===1&&r===""&&e[0]===""||(r==="."||r==="")&&(n=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(n=!0,e.pop())}let o=0;for(;(o=e.indexOf("..",o+1))!==-1;){const i=e[o-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(n=!0,e.splice(o-1,2),o-=2)}}while(n);return e.length===0?[""]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let o of e){let i=-1;for(;(i=o.indexOf("**",i+1))!==-1;){let s=i;for(;o[s+1]==="**";)s++;s>i&&o.splice(i+1,s-i);let a=o[i+1];const A=o[i+2],c=o[i+3];if(a!==".."||!A||A==="."||A===".."||!c||c==="."||c==="..")continue;n=!0,o.splice(i,1);const l=o.slice(0);l[i]="**",e.push(l),i--}if(!this.preserveMultipleSlashes){for(let s=1;s<o.length-1;s++){const a=o[s];s===1&&a===""&&o[0]===""||(a==="."||a==="")&&(n=!0,o.splice(s,1),s--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(n=!0,o.pop())}let r=0;for(;(r=o.indexOf("..",r+1))!==-1;){const s=o[r-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;const A=r===1&&o[r+1]==="**"?["."]:[];o.splice(r-1,2,...A),o.length===0&&o.push(""),r-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n<e.length-1;n++)for(let o=n+1;o<e.length;o++){const i=this.partsMatch(e[n],e[o],!this.preserveMultipleSlashes);if(i){e[n]=[],e[o]=i;break}}return e.filter(n=>n.length)}partsMatch(e,n,o=!1){let i=0,r=0,s=[],a="";for(;i<e.length&&r<n.length;)if(e[i]===n[r])s.push(a==="b"?n[r]:e[i]),i++,r++;else if(o&&e[i]==="**"&&n[r]===e[i+1])s.push(e[i]),i++;else if(o&&n[r]==="**"&&e[i]===n[r+1])s.push(n[r]),r++;else if(e[i]==="*"&&n[r]&&(this.options.dot||!n[r].startsWith("."))&&n[r]!=="**"){if(a==="b")return!1;a="a",s.push(e[i]),i++,r++}else if(n[r]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(a==="a")return!1;a="b",s.push(n[r]),i++,r++}else return!1;return e.length===n.length&&s}parseNegate(){if(this.nonegate)return;const e=this.pattern;let n=!1,o=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)n=!n,o++;o&&(this.pattern=e.slice(o)),this.negate=n}matchOne(e,n,o=!1){let i=0,r=0;if(this.isWindows){const a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),A=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),c=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),l=!c&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),u=A?3:a?0:void 0,g=l?3:c?0:void 0;if(typeof u=="number"&&typeof g=="number"){const[h,d]=[e[u],n[g]];h.toLowerCase()===d.toLowerCase()&&(n[g]=h,r=g,i=u)}}const{optimizationLevel:s=1}=this.options;return s>=2&&(e=this.levelTwoFileOptimize(e)),n.includes(kC)?this.#o(e,n,o,i,r):this.#i(e,n,o,i,r)}#o(e,n,o,i,r){const s=n.indexOf(kC,r),a=n.lastIndexOf(kC),[A,c,l]=o?[n.slice(r,s),n.slice(s+1),[]]:[n.slice(r,s),n.slice(s+1,a),n.slice(a+1)];if(A.length){const f=e.slice(i,i+A.length);if(!this.#i(f,A,o,0,0))return!1;i+=A.length,r+=A.length}let u=0;if(l.length){if(l.length+i>e.length)return!1;let f=e.length-l.length;if(this.#i(e,l,o,f,0))u=l.length;else{if(e[e.length-1]!==""||i+l.length===e.length||(f--,!this.#i(e,l,o,f,0)))return!1;u=l.length+1}}if(!c.length){let f=!!u;for(let I=i;I<e.length-u;I++){const C=String(e[I]);if(f=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return o||f}const g=[[[],0]];let h=g[0],d=0;const p=[0];for(const f of c)f===kC?(p.push(d),h=[[],0],g.push(h)):(h[0].push(f),d++);let m=g.length-1;const _=e.length-u;for(const f of g)f[1]=_-(p[m--]+f[0].length);return!!this.#n(e,g,i,0,o,0,!!u)}#n(e,n,o,i,r,s,a){const A=n[i];if(!A){for(let u=o;u<e.length;u++){a=!0;const g=e[u];if(g==="."||g===".."||!this.options.dot&&g.startsWith("."))return!1}return a}const[c,l]=A;for(;o<=l;){if(this.#i(e.slice(0,o+c.length),c,r,o,0)&&s<this.maxGlobstarRecursion){const h=this.#n(e,n,o+c.length,i+1,r,s+1,a);if(h!==!1)return h}const g=e[o];if(g==="."||g===".."||!this.options.dot&&g.startsWith("."))return!1;o++}return r||null}#i(e,n,o,i,r){let s,a,A,c;for(s=i,a=r,c=e.length,A=n.length;s<c&&a<A;s++,a++){this.debug("matchOne loop");let l=n[a],u=e[s];if(this.debug(n,l,u),l===!1||l===kC)return!1;let g;if(typeof l=="string"?(g=u===l,this.debug("string match",l,u,g)):(g=l.test(u),this.debug("pattern match",l,u,g)),!g)return!1}if(s===c&&a===A)return!0;if(s===c)return o;if(a===A)return s===c-1&&e[s]==="";throw new Error("wtf?")}braceExpand(){return _fn(this.pattern,this.options)}parse(e){Xfe(e);const n=this.options;if(e==="**")return kC;if(e==="")return"";let o,i=null;(o=e.match(xji))?i=n.dot?Bji:Eji:(o=e.match(gji))?i=(n.nocase?n.dot?mji:pji:n.dot?hji:dji)(o[1]):(o=e.match(bji))?i=(n.nocase?n.dot?Qji:Sji:n.dot?vji:wji)(o):(o=e.match(_ji))?i=n.dot?Iji:fji:(o=e.match(Cji))&&(i=yji);const r=lXe.fromGlob(e,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const n=this.options,o=n.noglobstar?Mji:n.dot?Dji:Nji,i=new Set(n.nocase?["i"]:[]);let r=e.map(A=>{const c=A.map(u=>{if(u instanceof RegExp)for(const g of u.flags.split(""))i.add(g);return typeof u=="string"?Lji(u):u===kC?kC:u._src});c.forEach((u,g)=>{const h=c[g+1],d=c[g-1];u!==kC||d===kC||(d===void 0?h!==void 0&&h!==kC?c[g+1]="(?:\\/|"+o+"\\/)?"+h:c[g]=o:h===void 0?c[g-1]=d+"(?:\\/|\\/"+o+")?":h!==kC&&(c[g-1]=d+"(?:\\/|\\/"+o+"\\/)"+h,c[g+1]=kC))});const l=c.filter(u=>u!==kC);if(this.partial&&l.length>=1){const u=[];for(let g=1;g<=l.length;g++)u.push(l.slice(0,g).join("/"));return"(?:"+u.join("|")+")"}return l.join("/")}).join("|");const[s,a]=e.length>1?["(?:",")"]:["",""];r="^"+s+r+a+"$",this.partial&&(r="^(?:\\/|"+s+r.slice(1,-1)+a+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,n=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&n)return!0;const o=this.options;this.isWindows&&(e=e.split("\\").join("/"));const i=this.slashSplit(e);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let s=i[i.length-1];if(!s)for(let a=i.length-2;!s&&a>=0;a--)s=i[a];for(const a of r){let A=i;if(o.matchBase&&a.length===1&&(A=[s]),this.matchOne(A,a,n))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(e){return d2.defaults(e).Minimatch}}d2.AST=lXe,d2.Minimatch=Hee,d2.escape=uji,d2.unescape=Lee;const Hji=t=>(t.endsWith(".tsx")||t.endsWith(".ts")||t.endsWith(".jsx")||t.endsWith(".js")||$fe(t))&&!t.endsWith(".d.ts"),Oji=t=>{if(!t)return null;try{const e=JSON.parse(t);return LDn.parse(e)}catch(e){return console.warn("Failed to parse tscircuit.config.json",e),null}},Gji=(t,e)=>{const o=Oji(e)?.includeBoardFiles?.filter(Boolean);if(o&&o.length>0){const i=o.map(r=>new Hee(r,{dot:!0}));return t.filter(r=>i.some(s=>s.match(r)))}return t.filter(Hji)},uXe=vc("run-frame:RunFrameWithApi"),Yji=()=>{const e=!!md(o=>o.error),n=e?"Dev server disconnected":"Dev server connected";return K.jsx(Fqe,{children:K.jsxs(Lqe,{children:[K.jsx(Hqe,{asChild:!0,children:K.jsx("button",{type:"button","aria-label":n,className:"rf-inline-flex rf-items-center rf-justify-center rf-p-2 rf-rounded-full rf-outline-none",children:K.jsx("span",{className:Oi("rf-inline-flex rf-size-2 rf-rounded-full rf-flex-shrink-0",e?"rf-bg-red-600":"rf-bg-green-600 rf-opacity-50"),"aria-hidden":"true"})})}),K.jsx(Kfe,{side:"right",children:n})]})})},Ifn=t=>t.find(e=>e.includes("entrypoint."))??t.find(e=>e.includes("index."))??t.find(e=>e.includes("main."))??t.find(e=>e.endsWith(".tsx")),Uji=t=>t.find(e=>e.includes("manual-edits."))??t.find(e=>e.includes("manual-edit."))??t.find(e=>e.endsWith(".json")),Cfn=t=>{const{apiBaseUrl:e,leftHeaderContent:n}=t;ee.useEffect(()=>{t.debug&&vc.enable("run-frame*")},[t.debug]);const o=md(k=>k.startPolling),i=md(k=>k.stopPolling),r=md(k=>k.setCurrentMainComponentPath),s=md(k=>k.pushEvent),a=zFo(),A=md(k=>k.fsMap),c=md(k=>k.recentlySavedFiles),l=ee.useMemo(()=>Array.from(A.keys()),[A]),u=ee.useMemo(()=>{const k=A.get("tscircuit.config.json");return typeof k=="string"?k:void 0},[A]),g=ee.useMemo(()=>Gji(l,u),[l,u]),h=md(k=>k.circuitJson),[d,p]=ee.useState(()=>typeof window>"u"?t.initialMainComponentPath??"":new URLSearchParams(window.location.hash.slice(1)).get("file")??t.initialMainComponentPath??""),[m,_]=OO("runframe:favorites",[]),f=!a,I=ee.useCallback(k=>{_(R=>R.includes(k)?R.filter(F=>F!==k):[...R,k])},[_]),C=t.fileFilter??aJi,y=ee.useMemo(()=>g.filter(C),[g,C]);ee.useEffect(()=>{if(d&&(y.includes(d)||g.includes(d)))return;if(d){const U=d.includes("/")?d.substring(0,d.lastIndexOf("/")):"",Y=y.find(W=>(W.includes("/")?W.substring(0,W.lastIndexOf("/")):"")===U);if(Y){p(Y);return}}const k=window?.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH,R=[t.initialMainComponentPath,k].filter(U=>!!U);for(const U of R)if(y.includes(U)){p(U);return}const O=(y.length>0?y:g)[0];O&&p(O)},[y,g,t.initialMainComponentPath,d]);const x=ee.useCallback(k=>{if(typeof window>"u")return;const R=new URLSearchParams(window.location.hash.slice(1));if(R.get("file")===k)return;R.set("file",k);const F=R.toString(),O=`${window.location.pathname}${window.location.search}${F.length>0?`#${F}`:""}`;window.history.replaceState(null,"",O)},[]);ee.useEffect(()=>{d&&(x(d),t.onMainComponentPathChange?.(d),r(d))},[d,t.onMainComponentPathChange,x,r]),SWi();const{editEventsForRender:E,pushEditEvent:B,markRenderStarted:S,markRenderComplete:Q}=VFo();ee.useEffect(()=>{e&&(window.TSCIRCUIT_FILESERVER_API_BASE_URL=e)},[e]),ee.useEffect(()=>(o(),()=>i()),[o,i]);const w=ee.useMemo(()=>String(d).length>0?{mainComponentPath:d}:{},[d]),M=ee.useCallback(async k=>{try{await s({event_type:"RUN_COMPLETED",initiator:"runframe",...k})}catch(R){uXe("Failed to push RUN_COMPLETED event",R)}},[s]);return K.jsx(P_n,{fsMap:A,showFileMenu:t.showFileMenu,shouldLoadLatestEval:t.shouldLoadLatestEval,onChangeShouldLoadLatestEval:t.onChangeShouldLoadLatestEval,isCli:t.isCli,schematicSvgOptions:t.schematicSvgOptions,isLoadingFiles:f,evalVersion:t.evalVersion,forceLatestEvalVersion:t.forceLatestEvalVersion,evalWebWorkerBlobUrl:t.evalWebWorkerBlobUrl??t.workerBlobUrl,platformConfig:t.platformConfig,enableFetchProxy:t.enableFetchProxy,leftHeaderContent:K.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[K.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[t.leftHeaderContent,K.jsx(Yji,{})]}),t.showFilesSwitch&&K.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2",children:K.jsx(Z_n,{currentFile:d,files:y,onFileChange:k=>{typeof A.get(k)=="string"&&p(k)},pinnedFiles:m,onToggleFavorite:I,fileFilter:C,recentlySavedFiles:c})})]}),defaultToFullScreen:t.defaultToFullScreen,showToggleFullScreen:t.showToggleFullScreen,onInitialRender:()=>{uXe("onInitialRender / markRenderStarted"),S()},onRenderFinished:()=>{uXe("onRenderFinished / markRenderComplete"),Q()},onRunCompleted:M,editEvents:E,onEditEvent:k=>{B(k),fetch(`${QC}/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:"USER_CREATED_MANUAL_EDIT",...k})});const R=Uji(Array.from(A.keys()))??"manual-edits.json",F=A.get(R),O=JSON.parse(F??"{}");VRt({circuitJson:h,editEvents:[k],manualEditsFile:O}),fetch(`${QC}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:R,text_content:JSON.stringify(O),initiator:"runframe"})})},onLoginRequired:t.onLoginRequired,easyEdaProxyConfig:{proxyEndpointUrl:`${QC}/proxy`},...w})},Kji=()=>new Promise(t=>{document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>t()):t()}),Vji=()=>{const t=window.location.hash.slice(1),n=new URLSearchParams(t).get("tab")?.toLowerCase()?.trim();return n&&["pcb","schematic","cad"].includes(n)?n:"pcb"},zji=()=>{const t=document.getElementById("root");if(t)return t;const e=document.createElement("div");return e.id="root",e.style.height="100vh",document.body.appendChild(e),e},Jji=async()=>{const t=Array.from(document.querySelectorAll("script[type='tscircuit-tsx']")),e=new Map;return await Promise.all(t.map(async(n,o)=>{const i=n.dataset.path||n.getAttribute("data-file-path")||`script${o?o+1:""}.tsx`;if(n.src){const s=await(await fetch(n.src)).text();e.set(i,s)}else e.set(i,n.textContent||"")})),{fsMap:e}},yfn="<--INJECT_TSCIRCUIT_EVAL_WEB_WORKER_BLOB_URL-->",gXe={evalWebWorkerBlobUrl:yfn.includes("<--")?void 0:yfn,enableFetchProxy:"<--INJECT_ENABLE_FETCH_PROXY-->".includes("<--")?void 0:!0};(async()=>{await Kji();const t=H4n.createRoot(zji()),e=window.TSCIRCUIT_RUNFRAME_STATIC_FILE_LIST,n=window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH,o=window.TSCIRCUIT_PACKAGE_NAME;if(Array.isArray(e)){const i=Vji();t.render(K.jsx(bWi,{files:e,initialCircuitPath:n,tabSelected:i,projectName:o}))}else if(window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI)t.render(K.jsx(yJi,{...gXe}));else{const{fsMap:i}=await Jji();i.size>0?t.render(K.jsx(P_n,{...gXe,fsMap:i})):t.render(K.jsx(Cfn,{...gXe}))}})();const xfn=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}));var Wji=0,o8=class{_nodeId;hasExplicitNodeId;_sourceLocation;_dirty=!1;_parent;_revision=0;constructor(t={}){this.hasExplicitNodeId=t.nodeId!==void 0,this._nodeId=t.nodeId??Efn(t.sourceLocation,this.constructor.name)??`altium-node-${(++Wji).toString(36)}`,this._sourceLocation=t.sourceLocation}get document(){let t=this;for(;t.parent;)t=t.parent;return t}get nodeId(){return this._nodeId}get isDirty(){return this._dirty}get parent(){return this._parent}get revision(){return this._revision}get sourceLocation(){return this._sourceLocation}setParent(t){return this._parent=t,this}setSourceLocation(t){return this._sourceLocation=t,this.hasExplicitNodeId||(this._nodeId=Efn(t,this.constructor.name)??this._nodeId),this}adoptChildren(t){for(const e of t)e.setParent(this)}markDirty(){this._dirty=!0,this._revision++,this.parent?.markDirty()}clearDirty(t=!1){if(this._dirty=!1,t)for(const e of this.getChildren())e.clearDirty(!0)}*walk(t=!0){t&&(yield this);for(const e of this.getChildren())yield*e.walk(!0)}visit(t){const e=(n,o,i)=>{if(t(n,{depth:i,parent:o})!==!1)for(const s of n.getChildren())e(s,n,i+1)};e(this,this.parent,0)}findAll(t,e=!0){return[...this.walk(e)].filter(t)}deepEquals(t){if(this.type!==t.type||this.getString()!==t.getString())return!1;const e=this.getChildren(),n=t.getChildren();return e.length===n.length&&e.every((o,i)=>{const r=n[i];return r!==void 0&&o.deepEquals(r)})}getStructuralHash(){let t=2166136261;const e=`${this.type}\0${this.getString()}`;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,text:this.getString(),children:this.getChildren().map(t=>t.toJSON())}}};function Efn(t,e){if(!t)return;const n=t.streamPath!==void 0?[t.streamPath,t.recordIndex??"",t.fieldIndex??"",t.byteOffset??""].join(":"):t.startOffset!==void 0?`text:${t.startOffset}`:t.byteOffset!==void 0?`byte:${t.byteOffset}`:void 0;return n===void 0?void 0:`${n}:${e}`}var ek=class extends Error{code;constructor(t,e="ALTIUM_ERROR",n){super(t,n),this.name=new.target.name,this.code=e}},eM=class extends ek{excerpt;fieldName;location;recordKind;constructor(t,e={}){super(t,"ALTIUM_SYNTAX",{cause:e.cause}),this.excerpt=e.excerpt,this.fieldName=e.fieldName,this.location=e.location,this.recordKind=e.recordKind}},yI=class extends ek{constructor(t,e){super(t,"ALTIUM_FORMAT_DETECTION",e)}},aA=class extends ek{byteOffset;constructor(t,e={}){super(t,"ALTIUM_CORRUPT_CONTAINER",{cause:e.cause}),this.byteOffset=e.byteOffset}},jji=class extends ek{constructor(t,e){super(t,"ALTIUM_UNSUPPORTED_VERSION",e)}},dXe=class extends ek{constructor(t,e){super(t,"ALTIUM_UNSUPPORTED_FEATURE",e)}},Yg=class extends ek{constructor(t,e){super(t,"ALTIUM_SERIALIZATION",e)}},hh=class extends ek{byteOffset;constructor(t,e,n){super(t,"ALTIUM_TRUNCATED_RECORD",n),this.byteOffset=e}},$ji=class extends o8{type="embedded-model";index;record;stream;constructor(t){super({sourceLocation:t.stream.sourceLocation}),this.index=t.index,this.record=t.record,this.stream=t.stream}get compressedSize(){return this.stream.metadata.size}get isCompressedDataLoaded(){return this.stream.isContentLoaded}getCompressedBytes(){return this.stream.content.slice()}async getDecompressedBytes(t={}){return qji(this.stream.content,t)}getChildren(){return[this.record,this.stream]}getString(){return this.record.getString()}};async function qji(t,e={}){const n=e.maximumOutputSize??67108864;if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("maximumOutputSize must be a positive safe integer number of bytes");const o=[];let i=0;try{const a=new Lce(c=>{if(i+=c.byteLength,i>n)throw new aA(`Embedded model expands beyond the ${n}-byte limit`);o.push(c)}),A=64*1024;for(let c=0;c<t.byteLength;){const l=Math.min(c+A,t.byteLength);a.push(t.subarray(c,l),l===t.byteLength),c=l}}catch(a){throw a instanceof aA?a:new aA(`Embedded model zlib decompression failed: ${a instanceof Error?a.message:String(a)}`)}const r=new Uint8Array(i);let s=0;for(const a of o)r.set(a,s),s+=a.byteLength;return r}function xI(t){if(!Number.isFinite(t))return t;const e=(t%360+360)%360;return Object.is(e,-0)?0:e}function hXe(t,e,n=1e-9){return Math.abs(t.x-e.x)<=n&&Math.abs(t.y-e.y)<=n}function Xji(t){if(t.length===0)return;let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)!Number.isFinite(r.x)||!Number.isFinite(r.y)||(e=Math.min(e,r.x),n=Math.min(n,r.y),o=Math.max(o,r.x),i=Math.max(i,r.y));return Number.isFinite(e)?{minX:e,minY:n,maxX:o,maxY:i}:void 0}function Zji(t){if(t.length<3)return 0;let e=0;for(let n=0;n<t.length;n++){const o=t[n],i=t[(n+1)%t.length];!o||!i||(e+=o.x*i.y-i.x*o.y)}return e/2}function e$i(t){const e=Zji(t);return Math.abs(e)<=Number.EPSILON?"degenerate":e<0?"clockwise":"counterclockwise"}var pXe=class extends o8{terminator;constructor(t={}){super(t),this.terminator=t.terminator??""}},a9=class extends o8{type="field";_key;_value;constructor(t){super(t),Bfn(t.key),bfn(t.value??""),this._key=t.key,this._value=t.value??""}get key(){return this._key}set key(t){Bfn(t),t!==this._key&&(this._key=t,this.markDirty())}get value(){return this._value}set value(t){bfn(t),t!==this._value&&(this._value=t,this.markDirty())}getChildren(){return[]}getString(){return`${this.key}=${this.value}`}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,key:this.key,value:this.value}}};function Bfn(t){if(t.length===0||/[=|\r\n]/u.test(t))throw new Error(`Invalid Altium field key: ${JSON.stringify(t)}`)}function bfn(t){if(/[|\r\n]/u.test(t))throw new Error(`Altium field values cannot contain record delimiters: ${JSON.stringify(t)}`)}var t$i={cm:1e4/25.4,in:1e3,inch:1e3,inches:1e3,mil:1,mils:1,mm:1e3/25.4},n$i=/^([+-]?(?:\d+\.\d*|\d+|\.\d+)(?:e[+-]?\d+)?)([a-z]+)?$/iu,Oee=class S4n{unit;value;#o;constructor(e){if(!Number.isFinite(e.value))throw new RangeError("Altium measurement value must be finite");this.value=e.value,this.unit=e.unit,this.#o=e.raw??`${r$i(e.value)}${e.unit===void 0?"":e.unit}`}static parse(e){const n=n$i.exec(e.trim());if(!n?.[1])return;const o=Number(n[1]);if(Number.isFinite(o))return new S4n({raw:e,unit:n[2],value:o})}get normalizedUnit(){return this.unit?.toLowerCase()}get raw(){return this.#o}toMils(){return this.normalizedUnit===void 0?this.value:this.value*(t$i[this.normalizedUnit]??1)}toMillimeters(){return this.toMils()*.0254}to(e){const n=this.toMils();return e==="mil"?n:e==="mm"?n*.0254:e==="cm"?n*.00254:n/1e3}equals(e,n=0){return Math.abs(this.toMils()-e.toMils())<=n}toString(){return this.raw}toJSON(){return{raw:this.raw,unit:this.unit,value:this.value}}};function oK(t){return t===void 0?void 0:Oee.parse(t)}function Gee(t){return oK(t)?.toMils()}function o$i(t,e="mil"){if(t instanceof Oee)return t;if(typeof t=="string"){const n=Oee.parse(t);if(!n)throw new TypeError(`Invalid Altium measurement ${JSON.stringify(t)}`);return n}return typeof t=="number"?new Oee({unit:e,value:t}):new Oee(t)}function i$i(t,e="mil"){return o$i(t,e).toString()}function r$i(t){return Object.is(t,-0)?"-0":String(t)}var Ol=class extends pXe{type="record";items;_originalBinaryPayload;constructor(t={}){super(t),this.items=t.items??[],this._originalBinaryPayload=t.originalBinaryPayload?.slice(),this.adoptChildren(this.items)}get originalBinaryPayload(){return this._originalBinaryPayload?.slice()}setOriginalBinaryPayload(t){return this._originalBinaryPayload=t?.slice(),this}getAltiumMeasurement(t){return oK(this.getCaseInsensitive(t))}get recordKind(){return this.get("RECORD")}get fields(){return this.items.filter(t=>t instanceof a9)}get(t){return this.fields.find(e=>e.key===t)?.value}getCaseInsensitive(t){const e=t.toUpperCase();return this.fields.find(n=>n.key.toUpperCase()===e)?.value}getDecoded(t){const e=this.getCaseInsensitive(`%UTF8%${t}`);return e===void 0?this.getCaseInsensitive(t):A$i(e)}getAll(t){return this.fields.filter(e=>e.key===t).map(e=>e.value)}getFirstField(t){return this.fields.find(e=>e.key===t)}getLastField(t){return this.fields.findLast(e=>e.key===t)}getAllFields(t){return this.fields.filter(e=>e.key===t)}getBoolean(t){const e=this.getCaseInsensitive(t)?.toUpperCase();if(e==="TRUE"||e==="T")return!0;if(e==="FALSE"||e==="F")return!1}getNumber(t){const e=this.getCaseInsensitive(t);if(!(e===void 0||!s$i(e)))return Number(e)}getMeasurement(t){const e=this.getCaseInsensitive(t);if(e===void 0)return;const n=/^\s*([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)\s*([a-z]+)?\s*$/iu.exec(e);if(!n?.[1])return;const o=n[2];return o===void 0?{value:Number(n[1])}:{value:Number(n[1]),unit:o}}set(t,e){const n=this.fields.find(o=>o.key===t);if(n)n.value=e;else{const o=new a9({key:t,value:e}).setParent(this);this.items.push(o),this.markDirty()}return this}setMeasurement(t,e,n="mil"){return this.set(t,i$i(e,n))}setPoint(t,e,n="mil"){return this.setMeasurement(t.x,e.x,n),this.setMeasurement(t.y,e.y,n),this}setSize(t,e,n="mil"){return this.setMeasurement(t.width,e.width,n),this.setMeasurement(t.height,e.height,n),this}setAngle(t,e){if(!Number.isFinite(e))throw new RangeError("Altium angles must be finite");return this.set(t,String(xI(e)))}insertField(t,e,n={}){const o=new a9({key:t,value:e}).setParent(this);let i=n.index;if(i===void 0&&n.beforeKey!==void 0&&(i=this.items.findIndex(s=>s instanceof a9&&s.key===n.beforeKey)),i===void 0&&n.afterKey!==void 0){const s=this.items.findLastIndex(a=>a instanceof a9&&a.key===n.afterKey);i=s<0?this.items.length:s+1}const r=i===void 0?this.items.length:Math.min(Math.max(i,0),this.items.length);return this.items.splice(r,0,o),this.markDirty(),o}replaceFieldOccurrence(t,e,n){if(!Number.isInteger(e)||e<0)return!1;const o=this.getAllFields(t)[e];return o?(o.value=n,!0):!1}delete(t){const e=this.items.length;this.items=this.items.filter(o=>!(o instanceof a9&&o.key===t));const n=e-this.items.length;return n>0&&this.markDirty(),n}getChildren(){return[...this.items]}getString(){return`|${this.items.map(t=>t.getString()).join("|")}`}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,recordKind:this.recordKind,originalBinaryPayloadLength:this._originalBinaryPayload?.byteLength,fields:this.fields.map(t=>({key:t.key,value:t.value})),items:this.items.map(t=>t.toJSON())}}};function s$i(t){return/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/iu.test(t.trim())}var a$i=new Map([["€",128],["‚",130],["ƒ",131],["„",132],["…",133],["†",134],["‡",135],["ˆ",136],["‰",137],["Š",138],["‹",139],["Œ",140],["Ž",142],["‘",145],["’",146],["“",147],["”",148],["•",149],["–",150],["—",151],["˜",152],["™",153],["š",154],["›",155],["œ",156],["ž",158],["Ÿ",159]]);function A$i(t){const e=[];for(const n of t){const o=a$i.get(n);if(o!==void 0){e.push(o);continue}const i=n.codePointAt(0);if(i===void 0||i>255)return t;e.push(i)}try{return new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(e))}catch{return t}}function tc(t,...e){for(const n of e){const o=Gee(t.getCaseInsensitive(n));if(o!==void 0)return o}}function qh(t,e,n){const o=tc(t,...e),i=tc(t,...n);return o===void 0||i===void 0?void 0:{x:o,y:i}}function Yee(t,e,n){const o=tc(t,...e),i=tc(t,...n);return o===void 0||i===void 0?void 0:{width:o,height:i}}function pi(t,...e){for(const n of e){const o=t.getDecoded(n);if(o!==void 0)return o}}function c$i(t,...e){for(const n of e){const o=t.getNumber(n);if(o!==void 0)return o}}var e1e=class extends Ol{type="component-record";constructor(t={}){super(t)}get id(){return this.getNumber("ID")}get designator(){return pi(this,"SOURCEDESIGNATOR","DESIGNATOR")}get comment(){return pi(this,"SOURCECOMMENT","COMMENT")}get footprint(){return pi(this,"PATTERN","FOOTPRINT")}get footprintLibrary(){return pi(this,"SOURCEFOOTPRINTLIBRARY")}get sourceLibrary(){return pi(this,"SOURCECOMPONENTLIBRARY")}get sourceLibraryReference(){return pi(this,"SOURCELIBREFERENCE")}get sourceUniqueId(){return pi(this,"SOURCEUNIQUEID")}get sourceHierarchicalPath(){return pi(this,"SOURCEHIERARCHICALPATH")}get position(){return qh(this,["X","LOCATION.X"],["Y","LOCATION.Y"])}get rotation(){return xI(this.getNumber("ROTATION")??0)}get side(){const t=this.getCaseInsensitive("LAYER")?.toUpperCase();return t==="TOP"||t==="TOP LAYER"?"top":t==="BOTTOM"||t==="BOTTOM LAYER"?"bottom":"unknown"}get mirrored(){return this.side==="bottom"}get locked(){return this.getBoolean("LOCKED")}get selected(){return this.getBoolean("SELECTION")}get unionIndex(){return this.getNumber("UNIONINDEX")}get channelOffset(){return this.getNumber("CHANNELOFFSET")}get heightMils(){return tc(this,"HEIGHT")}getOwnedPrimitives(t){return t.getRecordsOwnedByComponent(this)}getBounds(t,e){return t.getComponentBounds(this,e)}},t1e=class extends Ol{type="net-record";constructor(t={}){super(t)}get id(){return this.getNumber("ID")}get name(){return pi(this,"NAME")}get visible(){return this.getBoolean("VISIBLE")}get color(){return this.getNumber("COLOR")}},l$i=65535,Sfn=new WeakMap,u$i=class{constructor(t){this.document=t,this.components=t.getRecordsByKind("Component").filter(e=>e instanceof e1e),this.nets=t.getRecordsByKind("Net").filter(e=>e instanceof t1e),this.polygons=t.getRecordsByKind("Polygon"),this.rules=[...t.getRecordsByKind("Rule"),...t.getRecordsByKind("DXPRule")],this.componentTargets=o1e(this.components),this.netTargets=o1e(this.nets),this.polygonTargets=o1e(this.polygons),this.ruleTargets=o1e(this.rules);for(const e of t.records){fXe(this.byKind,e.recordKind??"Unknown",e);const n=e.getDecoded("LAYER");n!==void 0&&fXe(this.byLayer,n.toUpperCase(),e),i1e(this.byComponent,e,"COMPONENT"),i1e(this.byNet,e,"NET"),i1e(this.byPolygon,e,"POLYGON"),i1e(this.byRule,e,"RULE");const o=e.getDecoded("UNIQUEID");if(!o)continue;const i=o.toUpperCase(),r=this.uniqueIds.get(i);if(!r){this.uniqueIds.set(i,e);continue}const s=this.duplicateUniqueIds.get(i)??[r];s.push(e),this.duplicateUniqueIds.set(i,s)}}document;byComponent=new Map;byKind=new Map;byLayer=new Map;byNet=new Map;byPolygon=new Map;byRule=new Map;components;duplicateUniqueIds=new Map;nets;polygons;rules;uniqueIds=new Map;componentTargets;netTargets;polygonTargets;ruleTargets;getComponent(t){return nk(t)?this.componentTargets.get(t):void 0}getNet(t){return nk(t)?this.netTargets.get(t):void 0}getPolygon(t){return nk(t)?this.polygonTargets.get(t):void 0}getRule(t){return nk(t)?this.ruleTargets.get(t):void 0}getRecordByUniqueId(t){return this.uniqueIds.get(t.toUpperCase())}getDanglingReferences(){const t=[],e=[["COMPONENT",this.componentTargets],["NET",this.netTargets],["POLYGON",this.polygonTargets],["RULE",this.ruleTargets]];for(const n of this.document.records)for(const[o,i]of e){const r=tk(n,o);r!==void 0&&!i.has(r)&&t.push({field:o,index:r,record:n})}return t}};function rg(t){const e=Sfn.get(t);if(e?.revision===t.revision)return e.index;const n=new u$i(t);return Sfn.set(t,{index:n,revision:t.revision}),n}function Qfn(t,e){return rg(t).getComponent(e)}function vfn(t,e){return rg(t).getNet(e)}function wfn(t,e){return rg(t).getPolygon(e)}function Pfn(t,e){return rg(t).getRule(e)}function mXe(t,e){return e instanceof e1e?tM(rg(t).components,e):tk(e,"COMPONENT")}function _Xe(t,e){return e instanceof t1e?tM(rg(t).nets,e):tk(e,"NET")}function g$i(t,e){return e.recordKind==="Polygon"?tM(rg(t).polygons,e):tk(e,"POLYGON")}function d$i(t,e){return e.recordKind==="Rule"||e.recordKind==="DXPRule"?tM(rg(t).rules,e):tk(e,"RULE")??tk(e,"RULEINDEX")}function Mfn(t,e){const n=mXe(t,e);return n===void 0?void 0:rg(t).getComponent(n)}function Dfn(t,e){const n=_Xe(t,e);return n===void 0?void 0:rg(t).getNet(n)}function Nfn(t,e){const n=g$i(t,e);return n===void 0?void 0:rg(t).getPolygon(n)}function Rfn(t,e){const n=d$i(t,e);return n===void 0?void 0:rg(t).getRule(n)}function n1e(t,e){const n=typeof e=="number"?e:tM(rg(t).components,e);return n===void 0?[]:[...rg(t).byComponent.get(n)??[]]}function Tfn(t,e){const n=typeof e=="number"?e:tM(rg(t).nets,e);return n===void 0?[]:[...rg(t).byNet.get(n)??[]]}function kfn(t,e){const n=typeof e=="number"?e:tM(rg(t).polygons,e);return n===void 0?[]:[...rg(t).byPolygon.get(n)??[]]}function Ffn(t,e){const n=typeof e=="number"?e:tM(rg(t).rules,e);return n===void 0?[]:[...rg(t).byRule.get(n)??[]]}function o1e(t){const e=new Map,n=t.some(o=>o.getNumber("ID")!==void 0);return t.forEach((o,i)=>{const r=n?o.getNumber("ID"):i;r!==void 0&&nk(r)&&e.set(r,o)}),e}function tM(t,e){if(t.some(i=>i.getNumber("ID")!==void 0)){const i=e.getNumber("ID");return i!==void 0&&nk(i)?i:void 0}const o=t.indexOf(e);return o>=0?o:void 0}function i1e(t,e,n){const o=tk(e,n);o!==void 0&&fXe(t,o,e)}function fXe(t,e,n){const o=t.get(e);o?o.push(n):t.set(e,[n])}function tk(t,e){const n=t.getNumber(e);return n!==void 0&&nk(n)?n:void 0}function nk(t){return Number.isInteger(t)&&t>=0&&t<l$i}var Lfn=1e5,h$i=1e4;function IXe(t){return a1e(p$i(t))}function p$i(t){return Hfn(Ufn(t))}function Hfn(t){const e=[];for(let n=0;n<Lfn;n++){const o=ok(t,`VX${n}`),i=ok(t,`VY${n}`);if(o===void 0||i===void 0)break;const r=yXe(t,`KIND${n}`),s={x:o,y:i};if(r!==1){e.push({index:n,kind:r===void 0||r===0?"line":"unknown",position:s,rawKind:r});continue}const a=ok(t,`CX${n}`),A=ok(t,`CY${n}`),c=ok(t,`R${n}`),l=yXe(t,`SA${n}`),u=yXe(t,`EA${n}`),g=a!==void 0&&A!==void 0&&c!==void 0&&c>0&&l!==void 0&&u!==void 0?{center:{x:a,y:A},endAngleDegrees:u,radiusMils:c,startAngleDegrees:l}:void 0;e.push({arc:g,index:n,kind:g?"arc":"unknown",position:s,rawKind:r})}return e}function r1e(t){const e=Ufn(t),n=[],o=Kfn(e.get("HOLECOUNT"),h$i);for(let i=0;i<o;i++){const r=Kfn(e.get(`HOLE${i}COUNT`),Lfn),s=[];for(let a=0;a<r;a++){const A=ok(e,`HOLE${i}VX${a}`),c=ok(e,`HOLE${i}VY${a}`);if(A===void 0||c===void 0)break;s.push({index:a,kind:"line",position:{x:A,y:c},rawKind:0})}s.length>=3&&n.push(a1e(s))}return{holes:n,outline:a1e(Hfn(e)),record:t}}function Ofn(t){const e=t.board?IXe(t.board):a1e([]),n=t.records.filter(o=>o.recordKind==="BoardRegion"||o.recordKind==="Region");return{cutouts:n.filter(o=>s1e(o)==="BOARD_CUTOUT").map(r1e),layerStackRegions:n.filter(o=>s1e(o)==="LAYER_STACK_REGION").map(r1e),outline:e,polygonCutouts:n.filter(o=>s1e(o)==="POLYGON_CUTOUT").map(r1e)}}function s1e(t){if(t.recordKind==="BoardRegion"||t.getDecoded("OBJECTKIND")?.toUpperCase()==="BOARDREGION"||t.getDecoded("LAYERSTACKID")!==void 0)return"LAYER_STACK_REGION";const n=(t.getDecoded("REGIONKIND")??t.getDecoded("KIND")??void 0)?.replace(/[\s-]+/gu,"_").toUpperCase();return n==="0"?t.getBoolean("ISBOARDCUTOUT")===!0?"BOARD_CUTOUT":"COPPER":n==="1"?"POLYGON_CUTOUT":n==="2"?"DASHED_OUTLINE":n==="3"?"UNKNOWN_3":n==="4"?"CAVITY_DEFINITION":n}function a1e(t){const e=[];for(const i of t){if(!i.arc){Yfn(e,i.position);continue}for(const r of m$i(i.position,i.arc))Yfn(e,r)}const n=e[0],o=e.at(-1);return{bounds:Xji(e),isExplicitlyClosed:n!==void 0&&o!==void 0&&hXe(n,o,1e-4),points:e,vertices:t,winding:e$i(e)}}function m$i(t,e){const n=CXe(e.center,e.radiusMils,e.startAngleDegrees),o=CXe(e.center,e.radiusMils,e.endAngleDegrees),i=_$i(e.endAngleDegrees-e.startAngleDegrees)||360,r=Gfn(t,n)<=Gfn(t,o),s=r?e.startAngleDegrees:e.endAngleDegrees,a=r?i:-i,A=Math.max(2,Math.ceil(Math.abs(a)/7.5)),c=[];for(let l=0;l<=A;l++)c.push(CXe(e.center,e.radiusMils,s+a*l/A));return c}function CXe(t,e,n){const o=n*Math.PI/180;return{x:t.x+Math.cos(o)*e,y:t.y+Math.sin(o)*e}}function _$i(t){return(t%360+360)%360}function Gfn(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function Yfn(t,e){const n=t.at(-1);n&&hXe(n,e,1e-4)||t.push(e)}function Ufn(t){const e=new Map;for(const n of t.fields){const o=n.key.toUpperCase();e.has(o)||e.set(o,n.value)}return e}function ok(t,e){return Gee(t.get(e.toUpperCase()))}function yXe(t,e){const n=Number(t.get(e.toUpperCase()));return Number.isFinite(n)?n:void 0}function Kfn(t,e){const n=Number(t??0);return Number.isInteger(n)?Math.min(Math.max(n,0),e):0}var Vfn=class extends Ol{type="dimension-record";constructor(t={}){super(t)}get dimensionKind(){return pi(this,"DIMENSIONKIND","KIND")}get start(){return this.referencePoints[0]??qh(this,["X1"],["Y1"])}get end(){return this.referencePoints[1]??qh(this,["X2"],["Y2"])}get dimensionLineAnchor(){return qh(this,["X1"],["Y1"])}get referencePoints(){return zfn({pointInfix:"POINT",prefix:"REFERENCE",record:this})}get textPoints(){const t=qh(this,["TEXTX"],["TEXTY"]);return t?[t]:zfn({pointInfix:"",prefix:"TEXT",record:this})}get unit(){return pi(this,"TEXTDIMENSIONUNIT","DIMENSIONUNIT","UNIT")}get precision(){return c$i(this,"TEXTPRECISION","PRECISION")??tc(this,"TEXTPRECISION","PRECISION")}get prefix(){return pi(this,"TEXTPREFIX","PREFIX")}get suffix(){return pi(this,"TEXTSUFFIX","SUFFIX")}get lineWidthMils(){return tc(this,"LINEWIDTH","ARROWLINEWIDTH","WIDTH")}get textHeightMils(){return tc(this,"TEXTHEIGHT","HEIGHT")}};function zfn({pointInfix:t,prefix:e,record:n}){const o=[],i=e==="REFERENCE"?n.getNumber("REFERENCES_COUNT"):void 0,r=Math.min(Math.max(i??100,0),1e4),s=e==="REFERENCE"?0:1;for(let a=s;a<s+r;a++){const A=qh(n,[`${e}${a}${t}X`],[`${e}${a}${t}Y`]);if(!A)break;o.push(A)}return o}var f$i=class extends Ol{type="coordinate-record";get position(){return qh(this,["X","LOCATION.X"],["Y","LOCATION.Y"])}};function I$i(t){return t.replace(/[\s_-]/gu,"").toUpperCase()}function iK(t){return Gee(t)}function Md(t,e,n=0){return iK(t.getCaseInsensitive(e))??n}function C$i(t){return IXe(t).points}function y$i(t){if(!(t instanceof Vfn))return;const e=t,n=e.start,o=e.end;if(!n||!o)return;const i=o.x-n.x,r=o.y-n.y,s=Math.hypot(i,r);if(s===0)return;const a=-r/s,A=i/s,c=e.dimensionLineAnchor??n,l=(c.x-n.x)*a+(c.y-n.y)*A,u={x:n.x+a*l,y:n.y+A*l},g={x:o.x+a*l,y:o.y+A*l},h=e.textPoints[0]??{x:(u.x+g.x)/2,y:(u.y+g.y)/2},d=x$i({dimension:e,measuredDistanceMils:s}),p=e.textHeightMils??50,m=Jfn({fallbackMils:10,fieldName:"TEXTGAP",record:t});return{arrowSize:Jfn({fallbackMils:40,fieldName:"ARROWSIZE",record:t}),dimensionEnd:g,dimensionStart:u,estimatedTextHalfWidth:d.length*p*.3+m,label:d,lineWidth:e.lineWidthMils??8,referenceEnd:o,referenceStart:n,textHeight:p,textPosition:h}}function x$i({dimension:t,measuredDistanceMils:e}){const n=t.getDecoded("TEXTFORMAT")?.trim();if(n&&n!=="<>")return n;const o=Math.min(Math.max(t.precision??2,0),6),i=t.unit?.toUpperCase()??"MILS",{amount:r,unitLabel:s}=E$i({measuredDistanceMils:e,normalizedUnit:i}),a=t.prefix??"",A=t.suffix??` ${s}`;return`${a}${r.toFixed(o)}${A}`}function E$i({measuredDistanceMils:t,normalizedUnit:e}){return e.includes("MILLIMETER")?{amount:t*.0254,unitLabel:"mm"}:e.includes("CENTIMETER")?{amount:t*.00254,unitLabel:"cm"}:e.includes("INCH")?{amount:t/1e3,unitLabel:"in"}:{amount:t,unitLabel:"mil"}}function Jfn({fallbackMils:t,fieldName:e,record:n}){return n.getAltiumMeasurement(e)?.toMils()??t}var xXe=I$i;function B$i(t,e){const n=S$i(t,e),o=t.getNumber("PADMODE")??0,i=b$i(t,n,o),r=t.getCaseInsensitive(`LAYER${n}ALTSHAPE`)?.toUpperCase(),s=Number(t.getCaseInsensitive(`LAYER${n}CORNERRADIUS`)??0),a=r==="ROUNDRECT"&&Number.isFinite(s)?Math.min(i.width,i.height)*s/200:0,A=t.getNumber("HOLETYPE"),c=t.getCaseInsensitive("HOLESHAPE")?.toUpperCase()??(A===1?"SQUARE":A===2?"SLOT":"ROUND"),l=Md(t,"HOLESIZE"),u=iK(t.getCaseInsensitive("SLOTLENGTH"))??(c==="SLOT"?iK(t.getCaseInsensitive("HOLEWIDTH")):void 0)??l;return{cornerRadius:a,height:i.height,holeOffsetX:Md(t,`LAYER${n}HOLEXOFFSET`,Md(t,`PADXOFFSET${n}`)),holeOffsetY:Md(t,`LAYER${n}HOLEYOFFSET`,Md(t,`PADYOFFSET${n}`)),holeRotation:Number(t.getCaseInsensitive("SLOTROTATION")??t.getCaseInsensitive("HOLEROTATION")??0),holeShape:c,holeSize:l,layerOrdinal:n,plated:t.getBoolean("PLATED")!==!1,rotation:Number(t.getCaseInsensitive("ROTATION")??0),shape:r==="ROUNDRECT"?r:i.shape,slotLength:u,width:i.width,x:Md(t,"X"),y:Md(t,"Y")}}function b$i(t,e,n){if(!(xXe(t.getCaseInsensitive("LAYER")??"")==="MULTILAYER")||n===0||e===0)return{height:FS(t,["YSIZE","TOPYSIZE"])??FS(t,["XSIZE","TOPXSIZE"])??20,shape:A1e(t,["SHAPE","TOPSHAPE"])?.toUpperCase()??"ROUND",width:FS(t,["XSIZE","TOPXSIZE"])??20};if(e===31){const s=FS(t,["BOTTOMXSIZE","BOTXSIZE","XSIZE","TOPXSIZE"])??20;return{height:FS(t,["BOTTOMYSIZE","BOTYSIZE","YSIZE","TOPYSIZE"])??s,shape:A1e(t,["BOTTOMSHAPE","BOTSHAPE","SHAPE","TOPSHAPE"])?.toUpperCase()??"ROUND",width:s}}if(n===2&&e>=2){const s=FS(t,[`LAYER${e}XSIZE`,"MIDXSIZE","XSIZE"])??20;return{height:FS(t,[`LAYER${e}YSIZE`,"MIDYSIZE","YSIZE"])??s,shape:A1e(t,[`LAYER${e}SHAPE`,"MIDSHAPE","SHAPE"])?.toUpperCase()??"ROUND",width:s}}const r=FS(t,["MIDXSIZE","XSIZE","TOPXSIZE"])??20;return{height:FS(t,["MIDYSIZE","YSIZE","TOPYSIZE"])??r,shape:A1e(t,["MIDSHAPE","SHAPE","TOPSHAPE"])?.toUpperCase()??"ROUND",width:r}}function S$i(t,e){const n=e?.length===1?xXe(e[0]??""):xXe(t.getCaseInsensitive("LAYER")??"");if(n==="BOTTOM")return 31;if(n==="TOP")return 0;const o=/^(?:MIDLAYER|MID|INTERNALPLANE)(\d+)$/u.exec(n);return o?.[1]?Math.min(Math.max(Number(o[1]),1),30):0}function FS(t,e){for(const n of e){const o=iK(t.getCaseInsensitive(n));if(o!==void 0)return o}}function A1e(t,e){for(const n of e){const o=t.getCaseInsensitive(n);if(o!==void 0)return o}}function EXe(t){if(t.length!==0)return{minX:Math.min(...t.map(e=>e.x)),minY:Math.min(...t.map(e=>e.y)),maxX:Math.max(...t.map(e=>e.x)),maxY:Math.max(...t.map(e=>e.y))}}function Q$i(t,e){return t?e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t:e}function BXe(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function v$i(t,e){const n=t.recordKind;if(n==="Dimension"){const o=y$i(t);if(!o)return;const i=o.dimensionEnd.x-o.dimensionStart.x,r=o.dimensionEnd.y-o.dimensionStart.y,s=Math.hypot(i,r),a={x:i/s,y:r/s},A=EXe([o.referenceStart,o.referenceEnd,o.dimensionStart,o.dimensionEnd,o.textPosition,{x:o.textPosition.x-a.x*o.estimatedTextHalfWidth,y:o.textPosition.y-a.y*o.estimatedTextHalfWidth},{x:o.textPosition.x+a.x*o.estimatedTextHalfWidth,y:o.textPosition.y+a.y*o.estimatedTextHalfWidth}]);return A?BXe(A,Math.max(o.arrowSize,o.textHeight)):void 0}if(n==="Track"){const o=EXe([{x:Md(t,"X1"),y:Md(t,"Y1")},{x:Md(t,"X2"),y:Md(t,"Y2")}]),i=Md(t,"WIDTH");return o&&i>0?BXe(o,i/2):o}if(n==="Pad"){const o=B$i(t,e),i=o.rotation*Math.PI/180,r=o.width/2,s=o.height/2,a=Math.abs(Math.cos(i))*r+Math.abs(Math.sin(i))*s,A=Math.abs(Math.sin(i))*r+Math.abs(Math.cos(i))*s;return{minX:o.x-a,minY:o.y-A,maxX:o.x+a,maxY:o.y+A}}if(n==="Via"){const o=Md(t,"X"),i=Md(t,"Y"),r=iK(t.getCaseInsensitive("DIAMETER"))??iK(t.getCaseInsensitive("TOPLAYERSIZE"))??20;return{minX:o-r/2,minY:i-r/2,maxX:o+r/2,maxY:i+r/2}}if(n==="Arc"){const o=Md(t,"LOCATION.X"),i=Md(t,"LOCATION.Y"),r=Md(t,"RADIUS"),s=Md(t,"WIDTH"),a=r+Math.max(s/2,0);return{minX:o-a,minY:i-a,maxX:o+a,maxY:i+a}}if(n==="ComponentBody"||n==="Region"||n==="Polygon"||n==="Board")return EXe(C$i(t));if(n==="Text"){const o=Md(t,"X"),i=Md(t,"Y"),r=Md(t,"HEIGHT",30);return BXe({minX:o,minY:i,maxX:o,maxY:i},r)}if(n==="Fill"){const o=Md(t,"X1"),i=Md(t,"Y1"),r=Md(t,"X2"),s=Md(t,"Y2"),a=(o+r)/2,A=(i+s)/2,c=Math.abs(r-o)/2,l=Math.abs(s-i)/2,u=Number(t.getCaseInsensitive("ROTATION")??0)*Math.PI/180,g=Math.abs(Math.cos(u))*c+Math.abs(Math.sin(u))*l,h=Math.abs(Math.sin(u))*c+Math.abs(Math.cos(u))*l;return{minX:a-g,minY:A-h,maxX:a+g,maxY:A+h}}}var Wfn=new WeakMap,w$i=class{constructor(t){this.document=t;const e=rg(t);this.edges=e.nets.flatMap((n,o)=>{const i=n.getNumber("ID")??o,r=e.byNet.get(i)??[],s=new Map;for(const a of r){const A=mXe(t,a),c=s.get(A);c?c.push(a):s.set(A,[a])}return[...s].map(([a,A])=>({component:a===void 0?void 0:e.getComponent(a),net:n,primitives:A}))})}document;edges;getConnectedRecords(t){const e=_Xe(this.document,t);return e===void 0?[]:[...rg(this.document).byNet.get(e)??[]].filter(n=>n!==t)}getNetsForComponent(t){const e=rg(this.document),n=new Set;for(const o of n1e(this.document,t)){const i=_Xe(this.document,o),r=i===void 0?void 0:e.getNet(i);r&&n.add(r)}return[...n]}getComponentsForNet(t){const e=rg(this.document),n=typeof t=="number"?t:t.getNumber("ID")??e.nets.indexOf(t);if(n<0)return[];const o=new Set;for(const i of e.byNet.get(n)??[]){const r=mXe(this.document,i),s=r===void 0?void 0:e.getComponent(r);s&&o.add(s)}return[...o]}getConnectedComponents(t){const e=new Set,n=typeof t=="number"?rg(this.document).getComponent(t):t;for(const o of this.getNetsForComponent(t))for(const i of this.getComponentsForNet(o))i!==n&&e.add(i);return[...e]}};function jfn(t){const e=Wfn.get(t);if(e?.revision===t.revision)return e.graph;const n=new w$i(t);return Wfn.set(t,{graph:n,revision:t.revision}),n}function $fn(t,e,n){let o;for(const i of n1e(t,e))o=Q$i(o,v$i(i,n));return o}var P$i=class extends o8{type="binary-pcb-document";compoundFile;embeddedModels;primitiveRecords;propertyRecords;streamSummaries;wideStrings;constructor(t){super({sourceLocation:{byteOffset:0,streamPath:"/"}}),this.compoundFile=t.compoundFile,this.primitiveRecords=t.primitiveRecords,this.propertyRecords=t.propertyRecords,this.streamSummaries=t.streamSummaries,this.wideStrings=t.wideStrings??new Map,this.embeddedModels=this.models.flatMap((e,n)=>{const o=this.compoundFile.getStream(["Models",String(n)]);return o?[new $ji({index:n,record:e,stream:o})]:[]}),this.adoptChildren([this.compoundFile,...this.records]),this.clearDirty(!0)}get records(){return[...this.propertyRecords.values(),...this.primitiveRecords.values()].flat()}get board(){return this.propertyRecords.get("Board6")?.[0]}get components(){return this.propertyRecords.get("Components6")??[]}get componentBodies(){return this.primitiveRecords.get("ShapeBasedComponentBodies6")??this.primitiveRecords.get("ComponentBodies6")??[]}get legacyComponentBodies(){return this.primitiveRecords.get("ComponentBodies6")??[]}get nets(){return this.propertyRecords.get("Nets6")??[]}get index(){return rg(this)}get connectivity(){return jfn(this)}get boardGeometry(){return Ofn(this)}get polygons(){return this.propertyRecords.get("Polygons6")??[]}get rules(){return this.propertyRecords.get("Rules6")??[]}getComponentByIndex(t){return Qfn(this,t)}getNetByIndex(t){return vfn(this,t)}getPolygonByIndex(t){return wfn(this,t)}getRuleByIndex(t){return Pfn(this,t)}getComponentForRecord(t){return Mfn(this,t)}getNetForRecord(t){return Dfn(this,t)}getPolygonForRecord(t){return Nfn(this,t)}getRuleForRecord(t){return Rfn(this,t)}getRecordsOwnedByComponent(t){return n1e(this,t)}getRecordsOnNet(t){return Tfn(this,t)}getRecordsForPolygon(t){return kfn(this,t)}getRecordsForRule(t){return Ffn(this,t)}getRecordsByLayer(t){return[...this.index.byLayer.get(t.toUpperCase())??[]]}getComponentBounds(t,e){return $fn(this,t,e)}getRecordByUniqueId(t){return this.index.getRecordByUniqueId(t)}get models(){return this.propertyRecords.get("Models")??[]}getModelsById(t){const e=t.toUpperCase();return this.models.filter(n=>n.getDecoded("ID")?.toUpperCase()===e)}getModelForComponentBody(t){const e=t.getDecoded("MODELID");if(!e)return;const n=this.getModelsById(e);return n.length<=1?n[0]:n.find(o=>bXe(o.getNumber("ROTX"),t.getNumber("MODEL.3D.ROTX"))&&bXe(o.getNumber("ROTY"),t.getNumber("MODEL.3D.ROTY"))&&bXe(o.getNumber("ROTZ"),t.getNumber("MODEL.3D.ROTZ")))??n[0]}getEmbeddedModelForComponentBody(t){const e=this.getModelForComponentBody(t);return this.embeddedModels.find(n=>n.record===e)}get tracks(){return this.primitiveRecords.get("Tracks6")??[]}get arcs(){return this.primitiveRecords.get("Arcs6")??[]}get vias(){return this.primitiveRecords.get("Vias6")??[]}get pads(){return this.primitiveRecords.get("Pads6")??[]}get fills(){return this.primitiveRecords.get("Fills6")??[]}get regions(){return this.primitiveRecords.get("ShapeBasedRegions6")??this.primitiveRecords.get("Regions6")??[]}get regionFills(){return this.primitiveRecords.get("Regions6")??[]}get boardRegions(){return this.primitiveRecords.get("BoardRegions")??[]}get texts(){return this.primitiveRecords.get("Texts6")??[]}getRecordsByKind(t){return this.records.filter(e=>e.recordKind===t)}getStreamSummary(t){return this.streamSummaries.find(e=>e.family.toLowerCase()===t.toLowerCase())}getBytes(){if(this.isDirty)throw new Yg("Modified binary PCB documents cannot yet be serialized safely");return this.compoundFile.getBytes()}getChildren(){return[this.compoundFile,...this.records]}getString(){return this.records.map(t=>t.getString()).join(`
`)}};function bXe(t,e){return t!==void 0&&e!==void 0&&Math.abs(t-e)<Number.EPSILON}function SXe(t,e){if(e!==void 0)return{encoding:e,text:e==="utf-16le"?l1e(t,!0):e==="utf-16be"?l1e(t,!1):new TextDecoder(e,{fatal:e==="utf-8"}).decode(t)};if(t[0]===239&&t[1]===187&&t[2]===191)return{encoding:"utf-8-bom",text:`\uFEFF${new TextDecoder().decode(t.subarray(3))}`};if(t[0]===255&&t[1]===254)return{encoding:"utf-16le-bom",text:`\uFEFF${l1e(t.subarray(2),!0)}`};if(t[0]===254&&t[1]===255)return{encoding:"utf-16be-bom",text:`\uFEFF${l1e(t.subarray(2),!1)}`};try{return{encoding:"utf-8",text:new TextDecoder("utf-8",{fatal:!0}).decode(t)}}catch{return{encoding:"windows-1252",text:new TextDecoder("windows-1252").decode(t)}}}function c1e(t,e="utf-8"){const n=e.endsWith("-bom"),o=n&&t.startsWith("\uFEFF")?t.slice(1):t;if(e==="utf-8"||e==="utf-8-bom"){const c=new TextEncoder().encode(o);return n?Uint8Array.from([239,187,191,...c]):c}if(e==="windows-1252")return D$i(o);const i=e==="utf-16le"||e==="utf-16le-bom",r=o.length*2+(n?2:0),s=new Uint8Array(r),a=new DataView(s.buffer);let A=0;n&&(s[0]=i?255:254,s[1]=i?254:255,A=2);for(let c=0;c<o.length;c++)a.setUint16(A,o.charCodeAt(c),i),A+=2;return s}function l1e(t,e){const n=new DataView(t.buffer,t.byteOffset,t.byteLength),o=[],i=8192;for(let r=0;r+2<=t.byteLength;r+=i*2){const s=Math.min(r+i*2,t.byteLength),a=[];for(let A=r;A+2<=s;A+=2)a.push(n.getUint16(A,e));o.push(String.fromCharCode(...a))}return o.join("")}var M$i=new Map([["€",128],["‚",130],["ƒ",131],["„",132],["…",133],["†",134],["‡",135],["ˆ",136],["‰",137],["Š",138],["‹",139],["Œ",140],["Ž",142],["‘",145],["’",146],["“",147],["”",148],["•",149],["–",150],["—",151],["˜",152],["™",153],["š",154],["›",155],["œ",156],["ž",158],["Ÿ",159]]);function D$i(t){const e=[];for(const n of t){const o=M$i.get(n);if(o!==void 0){e.push(o);continue}const i=n.codePointAt(0);if(i===void 0||i>255)throw new RangeError(`Character ${JSON.stringify(n)} cannot be encoded as Windows-1252`);e.push(i)}return Uint8Array.from(e)}function N$i(t){const e=new Map(t.fields.map(r=>[r.key.toUpperCase(),r.value])),n=[...QXe(e,"LAYER_V8_","v8"),...QXe(e,"LAYERV7_","v7")];n.length===0&&n.push(...QXe(e,"LAYER","legacy"));const o=e.has("V9_MASTERSTACK_ID")?"V9_MASTERSTACK_":"LAYERMASTERSTACK_V8",i=T$i(e);return{entries:n.sort((r,s)=>r.index-s.index),id:EI(e,`${o}ID`),impedanceProfiles:R$i(e,i),isFlex:h2(EI(e,`${o}ISFLEX`)),layerPairs:F$i(e),name:EI(e,`${o}NAME`),style:EI(e,`${o}STYLE`)??EI(e,"LAYERSTACKSTYLE"),subStacks:k$i(e),traceImpedanceConfigurations:i}}function R$i(t,e){return[...Uee(t,/^V9_IMPEDANCEPROFILE(\d+)_ID$/u)].sort((n,o)=>n-o).map(n=>{const o=`V9_IMPEDANCEPROFILE${n}_`,i=EI(t,`${o}ID`);return{displayName:EI(t,`${o}DISPLAY_NAME`),id:i,index:n,isDifferentialPair:h2(EI(t,`${o}ISDIFFPAIR`)),name:EI(t,`${o}NAME`),targetImpedanceOhms:nM(EI(t,`${o}IMPEDANCE`)),traceConfigurations:e.filter(({profileId:r})=>i!==void 0&&r?.toUpperCase()===i.toUpperCase())}})}function T$i(t){return[...Uee(t,/^V9_TRACEIMPEDANCE(\d+)_PROFILE_ID$/u)].sort((e,n)=>e-n).map(e=>{const n=`V9_TRACEIMPEDANCE${e}_`,o=r=>EI(t,`${n}${r}`),i=r=>Gee(o(r));return{calculatedImpedanceOhms:nM(o("CALC_IMPEDANCE")),differentialPairGapMils:i("DIFF_PAIR_GAP"),differentialPairMaximumGapMils:i("DIFF_PAIR_MAXGAP"),differentialPairMinimumGapMils:i("DIFF_PAIR_MINGAP"),enabled:h2(o("ENABLED")),etchFactor:nM(o("ETCH_FACTOR")),impedanceErrorPercent:nM(o("IMPEDANCE_ERR")),index:e,layerId:o("LAYER_V7ID"),profileId:o("PROFILE_ID"),propagationSpeed:nM(o("PROPAGATION_SPEED")),referenceBottomLayerId:o("REF_BOT_V7ID"),referenceTopLayerId:o("REF_TOP_V7ID"),subStackId:o("SUBSTACK_ID"),traceGapLocked:h2(o("TRACEGAP_LOCKED")),traceMaximumWidthMils:i("TRACE_MAXWIDTH"),traceMinimumWidthMils:i("TRACE_MINWIDTH"),traceWidthLocked:h2(o("TRACEWIDTH_LOCKED")),traceWidthMils:i("TRACE_WIDTH")}})}function k$i(t){const e=Uee(t,/^V9_SUBSTACK(\d+)_ID$/u),n=e.size>0?"v9":"v8";return[...n==="v9"?e:Uee(t,/^LAYERSUBSTACK_V8_(\d+)ID$/u)].sort((i,r)=>i-r).map(i=>{const r=n==="v9"?`V9_SUBSTACK${i}_`:`LAYERSUBSTACK_V8_${i}`,s=a=>EI(t,`${r}${a}`);return{id:s("ID"),index:i,isFlex:h2(s("ISFLEX")),name:s("NAME"),service:h2(s("SERVICE")),showBottomDielectric:h2(s("SHOWBOTTOMDIELECTRIC")),showTopDielectric:h2(s("SHOWTOPDIELECTRIC")),source:n,type:nM(s("TYPE")),usedByPrimitives:h2(s("USEDBYPRIMS"))}})}function F$i(t){return[...Uee(t,/^LAYERPAIR(\d+)LOW$/u)].sort((n,o)=>n-o).map(n=>{const o=`LAYERPAIR${n}`,i=`${o}SUBSTACK_`,r=[...t].flatMap(([s,a])=>{if(!s.startsWith(i))return[];const A=s.slice(i.length);return/^\d+$/u.test(A)?[{index:Number(A),value:a}]:[]}).sort((s,a)=>s.index-a.index).map(({value:s})=>s);return{drillDrawing:h2(EI(t,`${o}DRILLDRAWING`)),drillGuide:h2(EI(t,`${o}DRILLGUIDE`)),highLayer:EI(t,`${o}HIGH`),index:n,lowLayer:EI(t,`${o}LOW`),subStackIds:r}})}function Uee(t,e){const n=new Set;for(const o of t.keys()){const i=e.exec(o)?.[1];i!==void 0&&n.add(Number(i))}return n}function QXe(t,e,n){const o=new Set,i=n==="legacy"?/^LAYER(\d+)NAME$/u:new RegExp(`^${L$i(e)}(\\d+)(?:_|)(?:ID|NAME|LAYERID)$`,"u");for(const r of t.keys()){const s=i.exec(r);s?.[1]&&o.add(Number(s[1]))}return[...o].map(r=>{const s=`${e}${r}`,a=c=>EI(t,`${s}${c}`),A={index:r,source:n};return n==="v8"?(A.id=a("ID"),A.name=a("NAME"),A.layerId=a("LAYERID"),A.usedByPrimitives=h2(a("USEDBYPRIMS")),A.mechanicalEnabled=h2(a("MECHENABLED")),A.copperThickness=oK(a("COPTHICK")??""),A.dielectricType=a("DIELTYPE"),A.dielectricConstant=nM(a("DIELCONST")),A.dielectricHeight=oK(a("DIELHEIGHT")??""),A.dielectricMaterial=a("DIELMATERIAL"),A):(A.layerId=a("LAYERID"),A.name=a("NAME"),A.previous=a("PREV"),A.next=a("NEXT"),A.mechanicalEnabled=h2(a("MECHENABLED")),A.copperThickness=oK(a("COPTHICK")??""),A.dielectricType=a("DIELTYPE"),A.dielectricConstant=nM(a("DIELCONST")),A.dielectricHeight=oK(a("DIELHEIGHT")??""),A.dielectricMaterial=a("DIELMATERIAL"),A)})}function EI(t,e){return t.get(e.toUpperCase())}function h2(t){if(t!==void 0){if(/^(?:T|TRUE|1)$/iu.test(t))return!0;if(/^(?:F|FALSE|0)$/iu.test(t))return!1}}function nM(t){if(t===void 0)return;const e=Number(t);return Number.isFinite(e)?e:void 0}function L$i(t){return t.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}var qfn=class extends Ol{type="board-record";constructor(t={}){super(t)}get fileName(){return pi(this,"FILENAME")}get version(){return pi(this,"VERSION")}get date(){return pi(this,"DATE")}get time(){return pi(this,"TIME")}get displayUnit(){return pi(this,"DISPLAYUNIT")}get origin(){return qh(this,["ORIGINX","ORIGIN.X"],["ORIGINY","ORIGIN.Y"])}get sheetOrigin(){return qh(this,["SHEETX"],["SHEETY"])}get sheetSize(){return Yee(this,["SHEETWIDTH"],["SHEETHEIGHT"])}get uniqueId(){return pi(this,"UNIQUEID")}get grid(){return{dotGrid:this.getBoolean("DOTGRID"),electricalGridEnabled:this.getBoolean("ELECTRICALGRIDENABLED"),electricalGridRangeMils:tc(this,"ELECTRICALGRIDRANGE"),largeVisibleGridMultiplier:this.getNumber("BIGVISIBLEGRIDMULTFACTOR"),largeVisibleGridSize:this.getNumber("BIGVISIBLEGRIDSIZE"),snapEnabled:this.getBoolean("GRIDSNAPENABLED"),snapSizeMils:tc(this,"GRIDSIZE"),visibleGridMultiplier:this.getNumber("VISIBLEGRIDMULTFACTOR"),visibleGridSize:this.getNumber("VISIBLEGRIDSIZE")}}get outline(){return IXe(this)}get layerStack(){return N$i(this)}},vXe=class extends Ol{type="class-record";constructor(t={}){super(t)}get name(){return pi(this,"NAME")}get classKind(){return pi(this,"KIND")}get superClass(){return this.getBoolean("SUPERCLASS")}get uniqueId(){return pi(this,"UNIQUEID")}get members(){const t=[];for(let e=0;e<1e5;e++){const n=pi(this,`M${e}`);if(n===void 0)break;t.push(n)}return t}},H$i=class extends vXe{type="signal-class-record"},Xfn=class extends Ol{type="polygon-record";constructor(t={}){super(t)}get id(){return this.getNumber("ID")}get name(){return pi(this,"NAME")}get layer(){return pi(this,"LAYER")}get netIndex(){return this.getNumber("NET")}get polygonType(){return pi(this,"POLYGONTYPE")}get pourOverStyle(){return pi(this,"POUROVERSTYLE","POUROVER")}get hatchStyle(){return pi(this,"HATCHSTYLE")}get pourIndex(){return this.getNumber("POURINDEX")}get priority(){return this.getNumber("POURORDER")??this.getNumber("PRIORITY")}get shelved(){return this.getBoolean("SHELVED")}get removeDeadCopper(){return this.getBoolean("REMOVEDEAD")}get trackWidthMils(){return tc(this,"TRACKWIDTH")}get gridSizeMils(){return tc(this,"GRIDSIZE")}},wXe=class extends Ol{type="rule-record";constructor(t={}){super(t)}get name(){return pi(this,"NAME")}get ruleKind(){return pi(this,"RULEKIND")}get priority(){return this.getNumber("PRIORITY")??this.getNumber("INDEXFORSAVE")}get enabled(){return this.getBoolean("ENABLED")}get scope1Expression(){return pi(this,"SCOPE1EXPRESSION")}get scope2Expression(){return pi(this,"SCOPE2EXPRESSION")}get comment(){return pi(this,"COMMENT")}get uniqueId(){return pi(this,"UNIQUEID")}get category(){const t=this.ruleKind?.toUpperCase();return t?["BOARDOUTLINECLEARANCE","CLEARANCE","COMPONENTCLEARANCE","HOLETOHOLECLEARANCE","PLANECLEARANCE"].includes(t)?"clearance":t==="WIDTH"?"routing-width":t==="ROUTINGVIAS"?"via-style":t==="ROUTINGLAYERS"?"routing-layer":t==="DIFFPAIRSROUTING"?"differential-pair":t==="LENGTH"||t==="MATCHEDLENGTHS"?"length":t==="PLANECONNECT"?"plane-connect":t==="POLYGONCONNECT"?"polygon-connect":t==="SOLDERMASKEXPANSION"||t==="PASTEMASKEXPANSION"?"mask":/(?:ASSEMBLY|FABRICATION|HEIGHT|HOLE|SILK|SLIVER|TESTPOINT)/u.test(t)?"manufacturing":"unknown":"unknown"}get clearanceMils(){if(this.category==="clearance")return tc(this,"GAP","GENERICCLEARANCE","CLEARANCE")}get verticalClearanceMils(){if(this.category==="clearance")return tc(this,"VERTICALGAP")}get widthConstraint(){if(this.normalizedRuleKind==="WIDTH")return oM(this,["MINLIMIT"],["PREFEREDWIDTH","PREFERREDWIDTH"],["MAXLIMIT"])}get layerConstraints(){if(!["DIFFPAIRSROUTING","WIDTH"].includes(this.normalizedRuleKind??""))return[];const t=new Map;for(const e of this.fields){const n=/^(TOPLAYER|BOTTOMLAYER|MIDLAYER(\d+))_(MINWIDTH|PREFWIDTH|MAXWIDTH|MINGAP|PREFGAP|MAXGAP)$/u.exec(e.key.toUpperCase());if(!n?.[1]||!n[3])continue;const o=O$i(n[1],n[2]),i=t.get(o)??{layer:o},r=tc(this,e.key);r!==void 0&&(n[3].endsWith("GAP")?(i.gap??={},e1n(i.gap,n[3],r)):e1n(i,n[3],r),t.set(o,i))}return[...t.values()]}get viaDiameterConstraint(){if(this.normalizedRuleKind==="ROUTINGVIAS")return oM(this,["MINWIDTH"],["WIDTH","PREFEREDWIDTH"],["MAXWIDTH"])}get viaHoleConstraint(){if(this.normalizedRuleKind==="ROUTINGVIAS")return oM(this,["MINHOLEWIDTH"],["HOLEWIDTH","PREFEREDHOLEWIDTH"],["MAXHOLEWIDTH"])}get viaStyle(){if(this.normalizedRuleKind==="ROUTINGVIAS")return pi(this,"VIASTYLE")}get routingLayers(){if(this.normalizedRuleKind!=="ROUTINGLAYERS")return[];const t=new Map;for(const e of this.fields){const n=/^(TOP LAYER|BOTTOM LAYER|MID LAYER (\d+))(_V5)?$/u.exec(e.key.toUpperCase());if(!n?.[1])continue;const o=G$i(n[1],n[2]),i=t.get(o)??{layer:o};n[3]?i.enabled=Y$i(e.value):i.mode=e.value,t.set(o,i)}return[...t.values()]}get differentialPairGap(){if(this.normalizedRuleKind==="DIFFPAIRSROUTING")return oM(this,["MINLIMIT"],["MOSTFREQGAP","PREFEREDGAP","PREFERREDGAP"],["MAXLIMIT"])}get maximumUncoupledLengthMils(){if(this.normalizedRuleKind==="DIFFPAIRSROUTING")return tc(this,"MAXUNCOUPLEDLENGTH")}get matchedLengthToleranceMils(){if(["LENGTH","MATCHEDLENGTHS"].includes(this.normalizedRuleKind??""))return tc(this,"TOLERANCE")}get impedanceConstraint(){if(this.normalizedRuleKind!=="WIDTH")return;const t={maximum:this.getNumber("MAXIMP"),minimum:this.getNumber("MINIMP"),preferred:this.getNumber("FAVIMP")};return u1e(t)?t:void 0}get thermalRelief(){if(!["PLANECONNECT","POLYGONCONNECT"].includes(this.normalizedRuleKind??""))return;const t={airGapMils:tc(this,"AIRGAPWIDTH","RELIEFAIRGAP"),angle:pi(this,"POLYGONRELIEFANGLE"),conductorWidthMils:tc(this,"RELIEFCONDUCTORWIDTH"),connectionStyle:pi(this,"CONNECTSTYLE","PLANECONNECTSTYLE"),expansionMils:tc(this,"RELIEFEXPANSION"),spokeCount:this.getNumber("RELIEFENTRIES")};return u1e(t)?t:void 0}get maskExpansionMils(){if(["PASTEMASKEXPANSION","SOLDERMASKEXPANSION"].includes(this.normalizedRuleKind??""))return tc(this,"EXPANSION")}get heightConstraint(){if(this.normalizedRuleKind==="HEIGHT")return oM(this,["MINHEIGHT"],["PREFHEIGHT","PREFEREDHEIGHT"],["MAXHEIGHT"])}get holeSizeConstraint(){if(this.normalizedRuleKind==="HOLESIZE")return oM(this,["MINLIMIT"],[],["MAXLIMIT"])}get minimumSolderMaskSliverMils(){if(this.normalizedRuleKind==="MINIMUMSOLDERMASKSLIVER")return tc(this,"MINSOLDERMASKWIDTH")}get minimumSilkClearanceMils(){if(["SILKTOBOARDREGIONCLEARANCE","SILKTOSILKCLEARANCE","SILKTOSOLDERMASKCLEARANCE"].includes(this.normalizedRuleKind??""))return tc(this,"MINSILKSCREENTOMASKGAP","SILKTOSILKCLEARANCE")}get testPointSettings(){if(!this.normalizedRuleKind?.includes("TESTPOINT"))return;const t={allowBottom:this.getBoolean("ALLOWSIDEBOTTOM"),allowTop:this.getBoolean("ALLOWSIDETOP"),gridMils:tc(this,"TESTPOINTGRID"),holeSize:oM(this,["MINHOLESIZE"],["PREFEREDHOLESIZE","PREFERREDHOLESIZE"],["MAXHOLESIZE"]),padSize:oM(this,["MINSIZE"],["PREFEREDSIZE","PREFERREDSIZE"],["MAXSIZE"]),underComponent:this.getBoolean("TESTPOINTUNDERCOMPONENT"),useGrid:this.getBoolean("USEGRID")};return u1e(t)?t:void 0}get normalizedRuleKind(){return this.ruleKind?.toUpperCase()}},Zfn=class extends wXe{type="dxp-rule-record"};function oM(t,e,n,o){const i={maximumMils:tc(t,...o),minimumMils:tc(t,...e),preferredMils:tc(t,...n)};return u1e(i)?i:void 0}function e1n(t,e,n){e.startsWith("MIN")?t.minimumMils=n:e.startsWith("MAX")?t.maximumMils=n:t.preferredMils=n}function O$i(t,e){return t==="TOPLAYER"?"TOP":t==="BOTTOMLAYER"?"BOTTOM":`MID-LAYER${e??""}`}function G$i(t,e){return t==="TOP LAYER"?"TOP":t==="BOTTOM LAYER"?"BOTTOM":`MID-LAYER${e??""}`}function Y$i(t){if(/^(?:TRUE|T|1)$/iu.test(t))return!0;if(/^(?:FALSE|F|0)$/iu.test(t))return!1}function u1e(t){return Object.values(t).some(e=>e!==void 0)}var U$i=class extends o8{type="pcb-document";_lines;originalBytes;originalSource;sourceEncoding;constructor(t={}){super({sourceLocation:{column:1,endOffset:t.originalSource?.length,line:1,startOffset:0}}),this._lines=t.lines??[],this.originalBytes=t.originalBytes?.slice(),this.originalSource=t.originalSource,this.sourceEncoding=t.sourceEncoding,this.adoptChildren(this._lines),this.clearDirty(!0)}setOriginalBytes(t,e){return this.originalBytes=t.slice(),this.sourceEncoding=e,this}getBytes(){return!this.isDirty&&this.originalBytes?this.originalBytes.slice():c1e(this.getString(),this.sourceEncoding)}get lines(){return this._lines}set lines(t){t!==this._lines&&(this._lines=t,this.adoptChildren(t),this.markDirty())}get records(){return this.lines.filter(t=>t instanceof Ol)}get board(){return this.records.find(t=>t instanceof qfn)}get components(){return this.records.filter(t=>t instanceof e1e)}get nets(){return this.records.filter(t=>t instanceof t1e)}get classes(){return this.records.filter(t=>t instanceof vXe)}get index(){return rg(this)}get connectivity(){return jfn(this)}get boardGeometry(){return Ofn(this)}get polygons(){return this.records.filter(t=>t instanceof Xfn)}get rules(){return this.records.filter(t=>t instanceof wXe||t instanceof Zfn)}getComponentByIndex(t){return Qfn(this,t)}getNetByIndex(t){return vfn(this,t)}getPolygonByIndex(t){return wfn(this,t)}getRuleByIndex(t){return Pfn(this,t)}getComponentForRecord(t){return Mfn(this,t)}getNetForRecord(t){return Dfn(this,t)}getPolygonForRecord(t){return Nfn(this,t)}getRuleForRecord(t){return Rfn(this,t)}getRecordsOwnedByComponent(t){return n1e(this,t)}getRecordsOnNet(t){return Tfn(this,t)}getRecordsForPolygon(t){return kfn(this,t)}getRecordsForRule(t){return Ffn(this,t)}getRecordsByLayer(t){return[...this.index.byLayer.get(t.toUpperCase())??[]]}getComponentBounds(t,e){return $fn(this,t,e)}getRecordByUniqueId(t){return this.index.getRecordByUniqueId(t)}getRecordsByKind(t){return this.records.filter(e=>e.recordKind===t)}insertRecord(t,e=this.lines.length){const n=Math.min(Math.max(e,0),this.lines.length);return t.setParent(this),this.lines.splice(n,0,t),this.markDirty(),this}removeRecord(t){const e=this.lines.indexOf(t);return e<0?!1:(this.lines.splice(e,1),t.setParent(void 0),this.markDirty(),!0)}allocateRecordId(t,e="ID"){const n=new Set(this.getRecordsByKind(t).map(i=>i.getNumber(e)).filter(i=>i!==void 0));let o=0;for(;n.has(o);)o++;return o}getChildren(){return[...this.lines]}getString(){return!this.isDirty&&this.originalSource!==void 0?this.originalSource:this.lines.map(t=>`${t.getString()}${t.terminator}`).join("")}},K$i=class{index;name;record;storage;compressedBytes;decodedPayload;constructor(t){this.compressedBytes=t.compressedBytes,this.index=t.index,this.name=t.name,this.record=t.record,this.storage=t.storage}get compressedSize(){return this.compressedBytes.byteLength}getCompressedBytes(){return this.compressedBytes.slice()}getBitmapBytes(t={}){return this.getPayload(t).bitmapBytes.slice()}getEnhancedMetafileBytes(t={}){return this.getPayload(t).enhancedMetafileBytes?.slice()}getNativePngBytes(t={}){return this.getPayload(t).nativePngBytes?.slice()}getDataUrl(t={}){return`data:image/png;base64,${X$i(this.getPngBytes(t))}`}getPngBytes(t={}){const e=this.getPayload(t);return e.nativePngBytes?.slice()??$$i(e.bitmapBytes)}getPayload(t){return Object.keys(t).length>0?t1n(this.compressedBytes,t):(this.decodedPayload??=t1n(this.compressedBytes),this.decodedPayload)}};function V$i(t,e){if(!t||e.length===0)return[];const n=z$i(t.content),o=new Set(n);return e.flatMap((i,r)=>{const s=o1n(i.fileName),a=n.find(A=>o.has(A)&&o1n(A.name)===s)??n.find(A=>o.has(A));return a?(o.delete(a),[new K$i({compressedBytes:a.compressedBytes,index:r,name:a.name,record:i,storage:t})]):[]})}function z$i(t){if(t.byteLength<4)throw new aA("Schematic image storage header is truncated");const e=new DataView(t.buffer,t.byteOffset,t.byteLength);let o=4+e.getUint32(0,!0);if(o>t.byteLength)throw new aA("Schematic image storage header exceeds the stream");const i=[];for(;o<t.byteLength;){if(o+4>t.byteLength)throw new aA("Schematic image storage frame length is truncated");const r=e.getUint32(o,!0)&16777215,s=o+4,a=s+r;if(r===0||a>t.byteLength)throw new aA(`Invalid schematic image storage frame length ${r}`);if(s+2>a||t[s]!==208)throw new aA("Schematic image storage entry header is invalid");const A=t[s+1]??0,c=s+2,l=c+A;if(l+4>a)throw new aA("Schematic image storage entry name is truncated");const u=e.getUint32(l,!0),g=l+4,h=g+u;if(h>a)throw new aA("Schematic image storage compressed payload is truncated");i.push({compressedBytes:t.subarray(g,h),name:new TextDecoder("windows-1252").decode(t.subarray(c,l))}),o=a}return i}function t1n(t,e={}){const n=e.maximumBitmapSize??33554432,o=e.maximumMetafileSize??32*1024*1024,i=e.maximumNativeImageSize??32*1024*1024,r=e.maximumOutputSize??64*1024*1024;for(const[g,h]of[["maximumBitmapSize",n],["maximumMetafileSize",o],["maximumNativeImageSize",i],["maximumOutputSize",r]])if(!Number.isSafeInteger(h)||h<=0)throw new RangeError(`${g} must be a positive safe integer`);let s=0;const a=[];try{const g=new Lce(d=>{if(s+=d.byteLength,s>r)throw new aA(`Schematic image expands beyond the ${r}-byte limit`);a.push(d.slice())}),h=64*1024;for(let d=0;d<t.byteLength;){const p=Math.min(d+h,t.byteLength);g.push(t.subarray(d,p),p===t.byteLength),d=p}}catch(g){throw g instanceof aA?g:new aA(`Schematic image zlib decompression failed: ${g instanceof Error?g.message:String(g)}`)}const A=n1n(a);if(A.byteLength<6||A[0]!==66||A[1]!==77)throw new aA("Embedded schematic image is not a Windows bitmap");const l=new DataView(A.buffer,A.byteOffset,A.byteLength).getUint32(2,!0);if(l<14||l>n)throw new aA(`Embedded schematic bitmap declares invalid size ${l}`);if(l>A.byteLength)throw new aA("Embedded schematic bitmap payload is truncated");const u=J$i(A,l,o,i);return{bitmapBytes:A.slice(0,l),...u}}function J$i(t,e,n,o){if(e>=t.byteLength)return{};const i=t[e]??0,r=e+1,s=r+i;if(s>t.byteLength)return{};const a=new TextDecoder("windows-1252").decode(t.subarray(r,s));if(a==="TdxPNGImage"){const d=j$i(t.subarray(s),o);return d?{nativePngBytes:d}:{}}if(a!=="TMetafile"||s+88>t.byteLength)return{};const A=new DataView(t.buffer,t.byteOffset+s,t.byteLength-s),c=A.getUint32(0,!0),l=A.getUint32(4,!0),u=A.getUint32(40,!0),g=A.getUint32(48,!0);if(c!==1||![88,100,108].includes(l)||u!==1179469088||g<l||g%4!==0||g>n||s+g>t.byteLength)return{};const h=t.slice(s,s+g);return W$i(h,l)?{enhancedMetafileBytes:h}:{}}function W$i(t,e){const n=new DataView(t.buffer,t.byteOffset,t.byteLength);let o=e;for(;o+8<=t.byteLength;){const i=n.getUint32(o,!0),r=n.getUint32(o+4,!0),s=o+r;if(r<8||r%4!==0||s<=o||s>t.byteLength)return!1;if(i===14)return r>=20&&s===t.byteLength;o=s}return!1}function j$i(t,e){const n=[137,80,78,71,13,10,26,10];if(t.byteLength<20||t.byteLength>e||!n.every((s,a)=>t[a]===s))return;const o=new DataView(t.buffer,t.byteOffset,t.byteLength);let i=n.length,r=!1;for(;i+12<=t.byteLength;){const s=o.getUint32(i),a=i+12+s;if(s>e||a>t.byteLength||a>e)return;const A=new TextDecoder().decode(t.subarray(i+4,i+8));if(!r){if(A!=="IHDR"||s!==13)return;r=!0}if(A==="IEND")return s!==0?void 0:t.slice(0,a);i=a}}function $$i(t){if(t.byteLength<54||t[0]!==66||t[1]!==77)throw new aA("Embedded schematic image is not a supported Windows bitmap");const e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=e.getUint32(10,!0),o=e.getUint32(14,!0),i=e.getInt32(18,!0),r=e.getInt32(22,!0),s=e.getUint16(26,!0),a=e.getUint16(28,!0),A=e.getUint32(30,!0),c=Math.abs(r);if(o<40||i<=0||c<=0||i>16384||c>16384||s!==1||a!==24&&a!==32||A!==0)throw new aA(`Unsupported schematic bitmap (${i}x${r}, ${a}-bit, compression ${A})`);const l=a/8,u=Math.ceil(i*l/4)*4,g=u*c;if(!Number.isSafeInteger(g)||n<14+o||n+g>t.byteLength)throw new aA("Embedded schematic bitmap pixel payload is truncated");const h=1+i*4,d=new Uint8Array(h*c),p=r<0;for(let f=0;f<c;f++){const I=p?f:c-f-1,C=n+I*u,y=f*h;d[y]=0;for(let x=0;x<i;x++){const E=C+x*l,B=y+1+x*4;d[B]=t[E+2]??0,d[B+1]=t[E+1]??0,d[B+2]=t[E]??0,d[B+3]=a===32?t[E+3]??255:255}}const m=new Uint8Array(13),_=new DataView(m.buffer);return _.setUint32(0,i),_.setUint32(4,c),m[8]=8,m[9]=6,n1n([new Uint8Array([137,80,78,71,13,10,26,10]),PXe("IHDR",m),PXe("IDAT",w8t(d,{level:6})),PXe("IEND",new Uint8Array)])}function PXe(t,e){const n=new TextEncoder().encode(t),o=new Uint8Array(12+e.byteLength),i=new DataView(o.buffer);return i.setUint32(0,e.byteLength),o.set(n,4),o.set(e,8),i.setUint32(8+e.byteLength,q$i(o.subarray(4,8+e.byteLength))),o}function q$i(t){let e=4294967295;for(const n of t){e^=n;for(let o=0;o<8;o++)e=e>>>1^(e&1?3988292384:0)}return(e^4294967295)>>>0}function n1n(t){const e=new Uint8Array(t.reduce((o,i)=>o+i.byteLength,0));let n=0;for(const o of t)e.set(o,n),n+=o.byteLength;return e}function o1n(t){return t?.replace(/\\/gu,"/").split("/").at(-1)?.toLowerCase()}function X$i(t){const e=[];for(let o=0;o<t.byteLength;o+=32768)e.push(String.fromCharCode(...t.subarray(o,o+32768)));return btoa(e.join(""))}var ol=class extends Ol{type="schematic-record";constructor(t={}){super(t)}get ownerIndex(){return this.getNumber("OWNERINDEX")}get ownerPartId(){return this.getNumber("OWNERPARTID")}get indexInSheet(){return this.getNumber("INDEXINSHEET")}get uniqueId(){return pi(this,"UNIQUEID")}get position(){const t=l1n(this,"LOCATION.X"),e=l1n(this,"LOCATION.Y");return t===void 0||e===void 0?void 0:{x:t,y:e}}},i1n=class extends ol{type="schematic-component-record";get libraryReference(){return pi(this,"LIBREFERENCE")}},MXe=class extends ol{type="schematic-pin-record";get name(){return pi(this,"NAME")}get designator(){return pi(this,"DESIGNATOR")}get electricalType(){return this.getNumber("ELECTRICAL")}get hidden(){return this.getBoolean("ISHIDDEN")}},DXe=class extends ol{type="schematic-label-record";get text(){return pi(this,"TEXT")}},Z$i=class extends ol{type="schematic-bezier-record"},eqi=class extends ol{type="schematic-polyline-record"},tqi=class extends ol{type="schematic-polygon-record"},nqi=class extends ol{type="schematic-ellipse-record"},oqi=class extends ol{type="schematic-rounded-rectangle-record"},iqi=class extends ol{type="schematic-elliptical-arc-record"},rqi=class extends ol{type="schematic-arc-record"},sqi=class extends ol{type="schematic-line-record"},aqi=class extends ol{type="schematic-rectangle-record"},r1n=class extends ol{type="schematic-sheet-symbol-record";get fileName(){return pi(this,"FILENAME")}},Aqi=class extends ol{type="schematic-sheet-entry-record";get name(){return pi(this,"NAME")}},NXe=class extends ol{type="schematic-power-port-record";get text(){return pi(this,"TEXT")}},RXe=class extends ol{type="schematic-port-record";get name(){return pi(this,"NAME")}},TXe=class extends ol{type="schematic-net-label-record";get text(){return pi(this,"TEXT")}},cqi=class extends ol{type="schematic-bus-record"},lqi=class extends ol{type="schematic-bus-entry-record"},s1n=class extends ol{type="schematic-wire-record"},uqi=class extends ol{type="schematic-no-erc-record"},gqi=class extends ol{type="schematic-text-frame-record";get text(){return pi(this,"TEXT")}},dqi=class extends ol{type="schematic-junction-record"},a1n=class extends ol{type="schematic-image-record";get fileName(){return pi(this,"FILENAME")}},hqi=class extends ol{type="schematic-sheet-record"},A1n=class extends ol{type="schematic-sheet-name-record"},c1n=class extends ol{type="schematic-sheet-file-name-record"},pqi=class extends ol{type="schematic-designator-record";get text(){return pi(this,"TEXT")}},mqi=class extends ol{type="schematic-template-record";get fileName(){return pi(this,"FILENAME")}},_qi=class extends ol{type="schematic-parameter-record";get name(){return pi(this,"NAME")}get text(){return pi(this,"TEXT")}},fqi=class extends ol{type="schematic-implementation-list-record"},Iqi=class extends ol{type="schematic-implementation-record";get modelName(){return pi(this,"MODELNAME")}get modelType(){return pi(this,"MODELTYPE")}},Cqi=class extends ol{type="schematic-implementation-map-record"},yqi=class extends ol{type="schematic-implementation-parameter-record"},xqi=class extends ol{type="schematic-note-record";get text(){return pi(this,"TEXT")}};function l1n(t,e){const n=t.getCaseInsensitive(e);if(n===void 0)return;const o=Number(n);if(!Number.isFinite(o))return;const i=t.getCaseInsensitive(`${e}_FRAC`);if(i===void 0)return o;const r=+`0.${i.replace(/^[+-]/u,"")}`;return Number.isFinite(r)?o<0?o-r:o+r:o}var u1n=new WeakMap,g1n=new WeakMap,Eqi=class{constructor(t){this.document=t,this.records=t.records;for(const e of this.records){const n=e.getNumber("OWNERINDEX");if(n!==void 0&&n>=0){const a=this.byOwner.get(n);a?a.push(e):this.byOwner.set(n,[e])}const o=e.getDecoded("UNIQUEID");if(!o)continue;const i=o.toUpperCase(),r=this.uniqueIds.get(i);if(!r){this.uniqueIds.set(i,e);continue}const s=this.duplicateUniqueIds.get(i)??[r];s.push(e),this.duplicateUniqueIds.set(i,s)}}document;byOwner=new Map;duplicateUniqueIds=new Map;records;uniqueIds=new Map;getParent(t){const e=t.getNumber("OWNERINDEX");return e===void 0||e<0?void 0:this.records[e]}getOwnedRecords(t){const e=typeof t=="number"?t:this.records.indexOf(t);return e<0?[]:[...this.byOwner.get(e)??[]]}getRecordByUniqueId(t){return this.uniqueIds.get(t.toUpperCase())}getOwnershipCycles(){const t=[],e=new Set;for(const n of this.records){if(e.has(n))continue;const o=[],i=new Map;let r=n;for(;r;){const s=i.get(r);if(s!==void 0){t.push(o.slice(s));break}if(e.has(r))break;i.set(r,o.length),o.push(r),r=this.getParent(r)}for(const s of o)e.add(s)}return t}},Bqi=class{constructor(t){this.document=t;const e=new wqi,n=new Map,o=new Map;for(const a of t.wires){const A=Qqi(a);for(const c of A){const l=g1e(c);e.add(l),o.set(l,c),p1n(n,l,a)}for(let c=1;c<A.length;c++){const l=A[c-1],u=A[c];l&&u&&e.union(g1e(l),g1e(u))}}const i=[...t.pins,...t.labels,...t.netLabels,...t.ports,...t.powerPorts];for(const a of i){const A=a.position;if(!A)continue;const c=g1e(A);e.add(c),o.set(c,A),p1n(n,c,a)}const r=new Map;for(const[a,A]of n){const c=e.find(a),l=r.get(c)??{names:new Set,points:new Map,records:new Set},u=o.get(a);u&&l.points.set(a,u);for(const g of A){l.records.add(g);const h=vqi(g);h&&l.names.add(h)}r.set(c,l)}const s=[];for(const[a,A]of r){const c=new Set([...A.names].map(g=>g.toUpperCase())),l=s.filter(g=>[...g.names].some(h=>c.has(h.toUpperCase())));if(l.length===0||c.size===0){s.push({id:a,...A});continue}const u=l[0];if(u){m1n(u,A);for(const g of l.slice(1)){m1n(u,g);const h=s.indexOf(g);h>=0&&s.splice(h,1)}}}this.nets=s.map(a=>({id:a.id,names:[...a.names],points:[...a.points.values()],records:[...a.records]}));for(const a of this.nets)for(const A of a.records)this.recordNets.set(A,a)}document;nets;recordNets=new Map;getNetForRecord(t){return this.recordNets.get(t)}getNetsByName(t){const e=t.toUpperCase();return this.nets.filter(n=>n.names.some(o=>o.toUpperCase()===e))}getPinsForComponent(t){return kXe(this.document).getOwnedRecords(t).filter(e=>e instanceof MXe)}};function kXe(t){const e=u1n.get(t);if(e?.revision===t.revision)return e.index;const n=new Eqi(t);return u1n.set(t,{index:n,revision:t.revision}),n}function bqi(t){const e=g1n.get(t);if(e?.revision===t.revision)return e.graph;const n=new Bqi(t);return g1n.set(t,{graph:n,revision:t.revision}),n}function Sqi(t){const e=kXe(t);return t.sheetSymbols.map(n=>{const o=e.getOwnedRecords(n),i=o.find(s=>s instanceof A1n),r=o.find(s=>s instanceof c1n);return{fileName:r?.getDecoded("TEXT"),fileNameRecord:r,name:i?.getDecoded("TEXT"),nameRecord:i,symbol:n}})}function Qqi(t){const e=t.getNumber("LOCATIONCOUNT"),n=e===void 0?1e5:Math.min(Math.max(e,0),1e5),o=[];for(let i=1;i<=n;i++){const r=d1n(t,`X${i}`),s=d1n(t,`Y${i}`);if(r===void 0||s===void 0)break;o.push({x:r,y:s})}return o}function vqi(t){if(t instanceof TXe||t instanceof DXe||t instanceof NXe)return t.getDecoded("TEXT");if(t instanceof RXe)return t.getDecoded("NAME")}function d1n(t,e){const n=t.getCaseInsensitive(e);if(n===void 0)return;const o=Number(n);if(!Number.isFinite(o))return;const i=t.getCaseInsensitive(`${e}_FRAC`);if(i===void 0)return o;const r=+`0.${i.replace(/^[+-]/u,"")}`;return Number.isFinite(r)?o<0?o-r:o+r:o}function g1e(t){return`${h1n(t.x)},${h1n(t.y)}`}function h1n(t){return t.toFixed(6).replace(/\.?0+$/u,"")}function p1n(t,e,n){const o=t.get(e);o?o.push(n):t.set(e,[n])}function m1n(t,e){for(const n of e.names)t.names.add(n);for(const[n,o]of e.points)t.points.set(n,o);for(const n of e.records)t.records.add(n)}var wqi=class{parents=new Map;add(t){this.parents.has(t)||this.parents.set(t,t)}find(t){this.add(t);const e=this.parents.get(t);if(e===void 0||e===t)return t;const n=this.find(e);return this.parents.set(t,n),n}union(t,e){const n=this.find(t),o=this.find(e);n!==o&&this.parents.set(o,n)}},d1e=class extends o8{type="schematic-document";compoundFile;embeddedImages;originalBytes;originalText;sourceEncoding;sourceFormat;_lines;constructor(t){super({sourceLocation:t.sourceFormat==="binary"?{byteOffset:0,streamPath:"/"}:{column:1,endOffset:t.originalText?.length,line:1,startOffset:0}}),this.compoundFile=t.compoundFile,this._lines=t.lines??[],this.originalBytes=t.originalBytes,this.originalText=t.originalText,this.sourceEncoding=t.sourceEncoding,this.sourceFormat=t.sourceFormat,this.embeddedImages=V$i(this.compoundFile?.getStream("/Storage"),this.records.filter(e=>e instanceof a1n)),this.adoptChildren([...this.compoundFile?[this.compoundFile]:[],...this._lines]),this.clearDirty(!0)}get lines(){return this._lines}set lines(t){t!==this._lines&&(this._lines=t,this.adoptChildren(t),this.markDirty())}get header(){return this.lines.find(t=>t instanceof Ol&&t.getCaseInsensitive("HEADER")!==void 0)}get records(){return this.lines.filter(t=>t instanceof Ol&&t.recordKind!==void 0)}get index(){return kXe(this)}get netGraph(){return bqi(this)}get components(){return this.records.filter(t=>t instanceof i1n)}get pins(){return this.records.filter(t=>t instanceof MXe)}get wires(){return this.records.filter(t=>t instanceof s1n)}get labels(){return this.records.filter(t=>t instanceof DXe)}get netLabels(){return this.records.filter(t=>t instanceof TXe)}get ports(){return this.records.filter(t=>t instanceof RXe)}get powerPorts(){return this.records.filter(t=>t instanceof NXe)}get sheetSymbols(){return this.records.filter(t=>t instanceof r1n)}get sheetLinks(){return Sqi(this)}getEmbeddedImageForRecord(t){return this.embeddedImages.find(e=>e.record===t)}getRecordsByKind(t){return this.records.filter(e=>e.recordKind===t)}getParent(t){return this.index.getParent(t)}getOwnedRecords(t){return this.index.getOwnedRecords(t)}getRecordByUniqueId(t){return this.index.getRecordByUniqueId(t)}getBytes(){if(!this.isDirty&&this.originalBytes)return this.originalBytes.slice();if(this.sourceFormat==="binary")throw new Yg("Modified binary schematic documents cannot yet be serialized safely");return c1e(this.getString(),this.sourceEncoding)}getChildren(){return[...this.compoundFile?[this.compoundFile]:[],...this.lines]}getString(){return!this.isDirty&&this.originalText!==void 0?this.originalText:this.lines.map(t=>`${t.getString()}${t.terminator}`).join("")}},_1n=class extends o8{metadata;path;constructor(t,e){super(),this.metadata=t,this.path=e,this.setSourceLocation({recordIndex:t.id,streamPath:`/${e.join("/")}`})}get name(){return this.metadata.name}get pathString(){return`/${this.path.join("/")}`}getString(){return this.pathString}},FXe=class extends _1n{type="compound-stream";contentSource;loadedContent;constructor(t,e,n){super(t,e),this.contentSource=n,n instanceof Uint8Array&&(this.loadedContent=n)}get content(){return this.loadedContent??=typeof this.contentSource=="function"?this.contentSource():this.contentSource,this.loadedContent}get isContentLoaded(){return this.loadedContent!==void 0}replaceContent(t){this.loadedContent=t.slice(),this.markDirty()}getChildren(){return[]}},f1n=class Q4n extends _1n{type="compound-storage";entries;constructor(e,n,o){super(e,n),this.entries=o,this.adoptChildren(o)}get storages(){return this.entries.filter(e=>e instanceof Q4n)}get streams(){return this.entries.filter(e=>e instanceof FXe)}getChildren(){return[...this.entries]}},Pqi=class extends o8{type="compound-file";header;originalBytes;root;constructor(t){super({sourceLocation:{byteOffset:0,streamPath:"/"}}),this.header=t.header,this.originalBytes=t.originalBytes,this.root=t.root,this.adoptChildren([this.root]),this.clearDirty(!0)}get entries(){const t=[],e=n=>{for(const o of n.entries)t.push(o),o instanceof f1n&&e(o)};return e(this.root),t}get streams(){return this.entries.filter(t=>t instanceof FXe)}getStream(t){const e=Mqi(t);return this.streams.find(n=>n.path.length===e.length&&n.path.every((o,i)=>o.toLowerCase()===e[i]?.toLowerCase()))}getBytes(){if(this.isDirty)throw new Yg("Modified compound files cannot yet be serialized safely");return this.originalBytes.slice()}getChildren(){return[this.root]}getString(){return this.entries.map(t=>t.pathString).join(`
`)}};function Mqi(t){return(Array.isArray(t)?t:t.split(/[\\/]/u)).filter(Boolean)}var LXe=class extends pXe{},Kee=class extends LXe{type="ini-section-line";_name;leading;trailing;constructor(t){super(t),this._name=t.name,this.leading=t.leading??"",this.trailing=t.trailing??""}get name(){return this._name}set name(t){if(/[\]\r\n]/u.test(t))throw new Error("INI section names cannot contain closing brackets");t!==this._name&&(this._name=t,this.markDirty())}getChildren(){return[]}getString(){return`${this.leading}[${this.name}]${this.trailing}`}},HXe=class extends LXe{type="ini-key-value-line";_key;_value;afterEquals;beforeEquals;leading;constructor(t){super(t),this._key=t.key,this._value=t.value??"",this.leading=t.leading??"",this.beforeEquals=t.beforeEquals??"",this.afterEquals=t.afterEquals??""}get key(){return this._key}set key(t){if(t.length===0||/[=\r\n]/u.test(t))throw new Error("INI keys must be non-empty and cannot contain '='");t!==this._key&&(this._key=t,this.markDirty())}get value(){return this._value}set value(t){if(/[\r\n]/u.test(t))throw new Error("INI values cannot contain line terminators");t!==this._value&&(this._value=t,this.markDirty())}getChildren(){return[]}getString(){return`${this.leading}${this.key}${this.beforeEquals}=${this.afterEquals}${this.value}`}},I1n=class extends LXe{type="ini-comment-line";_raw;constructor(t){super(t),this._raw=t.raw}get raw(){return this._raw}set raw(t){if(/[\r\n]/u.test(t))throw new Error("INI comments cannot contain line terminators");t!==this._raw&&(this._raw=t,this.markDirty())}getChildren(){return[]}getString(){return this.raw}},Dqi=class extends I1n{type="ini-raw-line"},h1e=class extends o8{type="ini-document";_lines;originalBytes;originalSource;sourceEncoding;constructor(t={}){super({sourceLocation:{column:1,endOffset:t.originalSource?.length,line:1,startOffset:0}}),this._lines=t.lines??[],this.originalBytes=t.originalBytes?.slice(),this.originalSource=t.originalSource,this.sourceEncoding=t.sourceEncoding,this.adoptChildren(this._lines),this.clearDirty(!0)}setOriginalBytes(t,e){return this.originalBytes=t.slice(),this.sourceEncoding=e,this}getBytes(){return!this.isDirty&&this.originalBytes?this.originalBytes.slice():c1e(this.getString(),this.sourceEncoding)}get lines(){return this._lines}set lines(t){t!==this._lines&&(this._lines=t,this.adoptChildren(t),this.markDirty())}get sections(){const t=[{entries:[],name:""}];for(const e of this.lines)e instanceof Kee?t.push({entries:[],header:e,name:e.name}):e instanceof HXe&&t.at(-1)?.entries.push(e);return t}getSection(t){const e=t.toUpperCase();return this.sections.find(n=>n.name.toUpperCase()===e)}getAll(t,e){const n=e.toUpperCase();return this.getSection(t)?.entries.filter(o=>o.key.toUpperCase()===n).map(o=>o.value)??[]}get(t,e){return this.getAll(t,e)[0]}set(t,e,n){const o=this.getSection(t),i=e.toUpperCase(),r=o?.entries.find(A=>A.key.toUpperCase()===i);if(r)return r.value=n,this;let s=this.lines.length;if(o){const A=o.header?this.lines.indexOf(o.header):-1,c=this.lines.findIndex((l,u)=>u>A&&l instanceof Kee);s=c<0?this.lines.length:c}else{const A=C1n(this),c=this.lines.at(-1);c&&c.terminator===""&&(c.terminator=A,c.markDirty());const l=new Kee({name:t,terminator:A}).setParent(this);this.lines.push(l),s=this.lines.length}const a=new HXe({key:e,terminator:C1n(this),value:n}).setParent(this);return this.lines.splice(s,0,a),this.markDirty(),this}removeSection(t){const e=this.getSection(t);if(!e)return!1;const n=e.header?this.lines.indexOf(e.header):0,o=this.lines.findIndex((s,a)=>a>n&&s instanceof Kee),i=(o<0?this.lines.length:o)-n,r=this.lines.splice(n,i);for(const s of r)s.setParent(void 0);return this.markDirty(),!0}getChildren(){return[...this.lines]}getString(){return!this.isDirty&&this.originalSource!==void 0?this.originalSource:this.lines.map(t=>`${t.getString()}${t.terminator}`).join("")}};function Nqi(t){return new h1e({lines:p1e(t),originalSource:t})}function p1e(t){return Rqi(t).map(({content:e,lineNumber:n,startOffset:o,terminator:i})=>{const r={column:1,endColumn:e.length+1,endLine:n,endOffset:o+e.length,line:n,startOffset:o},s={nodeId:`ini:${o}`,sourceLocation:r,terminator:i},a=/^(\s*)\[([^\]]*)\](\s*)$/u.exec(e);if(a?.[2]!==void 0)return new Kee({...s,leading:a[1],name:a[2],trailing:a[3]});if(/^\s*[;#]/u.test(e))return new I1n({...s,raw:e});const A=e.indexOf("=");if(A>0){const c=e.slice(0,A),l=/^\s*/u.exec(c)?.[0]??"",u=c.slice(l.length),g=u.trimEnd(),h=u.slice(g.length),d=e.slice(A+1),p=/^\s*/u.exec(d)?.[0]??"";return new HXe({...s,afterEquals:p,beforeEquals:h,key:g,leading:l,value:d.slice(p.length)})}return new Dqi({...s,raw:e})})}function Rqi(t){const e=[];let n=0,o=1;for(let i=0;i<t.length;i++){const r=t[i];if(r!=="\r"&&r!==`
`)continue;const s=r==="\r"&&t[i+1]===`
`;e.push({content:t.slice(n,i),lineNumber:o,startOffset:n,terminator:s?`\r
`:r}),s&&i++,n=i+1,o++}return n<t.length&&e.push({content:t.slice(n),lineNumber:o,startOffset:n,terminator:""}),e}function C1n(t){return t.lines.find(e=>e.terminator!=="")?.terminator??`
`}var Tqi=class extends h1e{type="output-job-document";constructor(t={}){super(t)}get outputs(){return this.sections.flatMap(t=>{const e=rK(t,"OUTPUTTYPE")??rK(t,"OUTPUTGENERATOR")??rK(t,"OUTPUTNAME");return e===void 0?[]:[{category:Lqi(e),dataSource:rK(t,"DATASOURCE")??rK(t,"SOURCE"),outputType:e,section:t,settings:Fqi(t),variant:rK(t,"VARIANT")}]})}get containers(){return this.sections.filter(t=>t.entries.some(e=>/^(?:CONTAINERTYPE|OUTPUTMEDIUM|OUTPUTCONTAINER)$/iu.test(e.key)))}get fabricationOutputs(){return this.outputs.filter(t=>t.category==="fabrication")}get drillOutputs(){return this.outputs.filter(t=>t.category==="drill")}get pickAndPlaceOutputs(){return this.outputs.filter(t=>t.category==="pick-and-place")}get bomOutputs(){return this.outputs.filter(t=>t.category==="bom")}get drawingOutputs(){return this.outputs.filter(t=>t.category==="drawing")}get reportOutputs(){return this.outputs.filter(t=>t.category==="report")}};function kqi(t){return new Tqi({lines:p1e(t),originalSource:t})}function rK(t,e){const n=e.toUpperCase();return t.entries.find(o=>o.key.toUpperCase()===n)?.value}function Fqi(t){const e={};for(const n of t.entries){const o=n.key.toUpperCase(),i=e[o];i?i.push(n.value):e[o]=[n.value]}return e}function Lqi(t){return/GERBER|ODB|IPC.?2581/iu.test(t)?"fabrication":/DRILL|NC\b/iu.test(t)?"drill":/PICK.?AND.?PLACE|PICK.?PLACE|PICKPLACE|CENTROID/iu.test(t)?"pick-and-place":/\bBOM\b|BILL OF MATERIAL/iu.test(t)?"bom":/DRAWING|PDF|DRAFTSMAN|PRINT/iu.test(t)?"drawing":/ASSEMBLY/iu.test(t)?"assembly":/REPORT|VALIDATION|DESIGN RULE|ERC|DRC/iu.test(t)?"report":"unknown"}var Hqi=class{constructor(t,e){this.project=t,this.baseDirectory=e,this.nodes=t.documents.map(n=>({kind:n.kind,path:n.path,reference:n,resolvedPath:OXe(e,n.path),uniqueId:n.uniqueId}));for(const n of this.nodes)this.byPath.set(m1e(n.resolvedPath).toUpperCase(),n),n.uniqueId&&this.byUniqueId.set(n.uniqueId.toUpperCase(),n)}project;baseDirectory;byPath=new Map;byUniqueId=new Map;nodes;getByKind(t){const e=t.toUpperCase();return this.nodes.filter(n=>n.kind?.toUpperCase()===e)}getByPath(t){return this.byPath.get(m1e(t).toUpperCase())}getByUniqueId(t){return this.byUniqueId.get(t.toUpperCase())}},Oqi=class extends h1e{type="project-document";constructor(t={}){super(t)}get documents(){return this.sections.flatMap(t=>{const e=sK(t,"DOCUMENTPATH");return e?[{kind:sK(t,"DOCUMENTKIND")??E1n(e),path:e,section:t,uniqueId:sK(t,"DOCUMENTUNIQUEID")}]:[]})}get variants(){return this.sections.flatMap(t=>{if(!t.name.toUpperCase().includes("VARIANT"))return[];const e=sK(t,"VARIANTNAME")??sK(t,"NAME")??t.name;return[{alternateParts:GXe(t,/ALTERNATE|PARTCHOICE/iu),description:sK(t,"DESCRIPTION"),name:e,parameters:GXe(t,/PARAMETER/iu),section:t}]})}get projectOptions(){return this.sections.filter(t=>/^(?:DESIGN|PROJECTOPTIONS?|OPTIONS?|PREFERENCES)$/iu.test(t.name))}get projectParameters(){return this.sections.flatMap(t=>GXe(t,/PARAMETER/iu,/PARAMETER|PARAMETERS/iu.test(t.name)))}get compilerSettings(){return this.sections.filter(t=>/COMPILER|COMPILATION/iu.test(t.name))}get ecoSettings(){return this.sections.filter(t=>/\bECO\b/iu.test(t.name))}resolveDocumentPaths(t){return this.documents.map(e=>OXe(t,e.path))}getDocumentGraph(t){return new Hqi(this,t)}addDocument(t,e={}){if(t.trim().length===0||t.includes("\0")||/[\r\n]/u.test(t))throw new TypeError("Project document paths must be non-empty single-line values");const n=B1n(this,"Document");this.set(n,"DocumentPath",t);const o=e.kind??E1n(t);o&&this.set(n,"DocumentKind",o),e.uniqueId&&this.set(n,"DocumentUniqueId",e.uniqueId);const i=this.documents.find(r=>r.section.name===n);if(!i)throw new Error("Failed to create project document reference");return i}removeDocument(t){const e=typeof t=="string"?this.documents.find(n=>n.path===t||n.uniqueId===t):t;return e?this.removeSection(e.section.name):!1}addVariant(t,e={}){if(t.trim().length===0||t.includes("\0")||/[\r\n]/u.test(t))throw new TypeError("Project variant names must be non-empty single-line values");const n=B1n(this,"Variant");this.set(n,"VariantName",t),e.description&&this.set(n,"Description",e.description);const o=this.variants.find(i=>i.section.name===n);if(!o)throw new Error("Failed to create project variant");return o}removeVariant(t){const e=typeof t=="string"?this.variants.find(n=>n.name===t):t;return e?this.removeSection(e.section.name):!1}};function y1n(t){return new Oqi({lines:p1e(t),originalSource:t})}function OXe(t,e){if(Gqi(e))return m1e(e);const n=/\\/u.test(t)?"\\":"/",o=`${x1n(t)}${n}${e}`;return m1e(o,n)}function Gqi(t){return/^(?:[a-z]:[\\/]|\\\\|\/)/iu.test(t)}function m1e(t,e){const n=e??(/\\/u.test(t)&&!/\//u.test(t)?"\\":"/"),o=/^([a-z]:|\\\\[^\\/]+[\\/][^\\/]+|\/)/iu.exec(t)?.[0]??"",i=t.slice(o.length).split(/[\\/]+/u).filter(Boolean),r=[];for(const A of i)A!=="."&&(A===".."&&r.length>0?r.pop():A!==".."&&r.push(A));const s=x1n(o),a=r.join(n);return o==="/"?`/${a}`:s?a?`${s}${n}${a}`:s:a}function x1n(t){let e=t.length;for(;e>0;){const n=t[e-1];if(n!=="/"&&n!=="\\")break;e--}return t.slice(0,e)}function E1n(t){const e=/\.([^.\\/]+)$/u.exec(t)?.[1]?.toLowerCase();return e===void 0?void 0:{outjob:"output-job",pcbdoc:"pcb-document",pcblib:"pcb-library",schdoc:"schematic-document",schlib:"schematic-library"}[e]}function sK(t,e){const n=e.toUpperCase();return t.entries.find(o=>o.key.toUpperCase()===n)?.value}function GXe(t,e,n=!1){return t.entries.filter(o=>n||e.test(o.key)).map(o=>({key:o.key,section:t,value:o.value}))}function B1n(t,e){const n=new Set(t.sections.map(i=>i.name.toUpperCase()));let o=1;for(;n.has(`${e}${o}`.toUpperCase());)o++;return`${e}${o}`}var Yqi=class extends h1e{type="workspace-document";constructor(t={}){super(t)}get projects(){return this.sections.flatMap(t=>/SESSION|WINDOW|VIEW|RECENT|UI/iu.test(t.name)?[]:t.entries.filter(e=>/PROJECT/iu.test(e.key)&&/\.PRJPCB(?:$|[?#])/iu.test(e.value.trim())).map(e=>({key:e.key,path:e.value,section:t})))}get sessionSections(){return this.sections.filter(t=>/SESSION|WINDOW|VIEW|RECENT|UI/iu.test(t.name))}resolveProjectPaths(t){return this.projects.map(e=>OXe(t,e.path))}};function Uqi(t){return new Yqi({lines:p1e(t),originalSource:t})}var b1n=new Uint8Array([208,207,17,224,161,177,26,225]),S1n=4294967290,Q1n=4294967294,_1e=4294967295,v1n=4294967295;function f1e(t){return t.byteLength>=b1n.byteLength&&b1n.every((e,n)=>t[n]===e)}function Vee(t,e={}){const n=e.maxFileSize??268435456,o=e.maxChainLength??1e6,i=e.maxDirectoryEntries??1e5;if(t.byteLength>n)throw new aA(`Compound file is ${t.byteLength} bytes, exceeding the ${n}-byte limit`);if(t.byteLength<512)throw new aA("Compound file header is truncated",{byteOffset:t.byteLength});if(!f1e(t))throw new aA("Input does not begin with the OLE/CFB signature",{byteOffset:0});const r=new DataView(t.buffer,t.byteOffset,t.byteLength),s=r.getUint16(24,!0),a=r.getUint16(26,!0),A=r.getUint16(28,!0),c=r.getUint16(30,!0),l=r.getUint16(32,!0);if(a!==3&&a!==4)throw new jji(`Unsupported CFB major version ${a}`);const u=a===3?9:12;if(c!==u)throw new aA(`CFB version ${a} must use sector shift ${u}, got ${c}`,{byteOffset:30});if(A!==65534)throw new aA(`Unsupported CFB byte order 0x${A.toString(16)}`,{byteOffset:28});const g=2**c,h=2**l,d=Math.floor(t.byteLength/g)-1;if(d<0)throw new aA("Compound file has no sectors");const p=r.getUint32(40,!0),m=r.getUint32(44,!0),_=r.getUint32(48,!0),f=r.getUint32(56,!0),I=r.getUint32(60,!0),C=r.getUint32(64,!0),y=r.getUint32(68,!0),x=r.getUint32(72,!0),E={byteOrder:A,directorySectorCount:p,fatSectorCount:m,majorVersion:a,miniFatSectorCount:C,miniSectorSize:h,miniStreamCutoffSize:f,minorVersion:s,sectorSize:g},B=ne=>{zqi(ne,d);const le=(ne+1)*g,ge=le+g;if(ge>t.byteLength)throw new aA(`Sector ${ne} extends beyond the file`,{byteOffset:le});return t.subarray(le,ge)},S=[];for(let ne=0;ne<109;ne++){const le=r.getUint32(76+ne*4,!0);le!==_1e&&S.push(le)}let Q=y;const w=new Set;for(let ne=0;ne<x;ne++){if(Q===Q1n||Q===_1e)throw new aA(`DIFAT chain ended after ${ne} of ${x} sectors`);if(w.has(Q))throw new aA(`DIFAT chain contains a loop at sector ${Q}`);w.add(Q);const le=B(Q),ge=zee(le),_e=g/4-1;for(let ue=0;ue<_e;ue++){const fe=ge.getUint32(ue*4,!0);fe!==_1e&&S.push(fe)}Q=ge.getUint32(g-4,!0)}if(S.length<m)throw new aA(`Header declares ${m} FAT sectors, but DIFAT contains ${S.length}`);S.length=m;const M=[];for(const ne of S){const le=B(ne),ge=zee(le);for(let _e=0;_e<le.byteLength;_e+=4)M.push(ge.getUint32(_e,!0))}const k=(ne,le)=>w1n({allocationTable:M,expectedSize:le,maxChainLength:o,readUnit:B,startSector:ne,unitSize:g}),R=k(_),F=Kqi(R,a,i),O=F[0];if(O?.rawType!==5)throw new aA("Directory entry 0 is not a root storage");const U=k(O.metadata.startSector,O.metadata.size),Y=C===0?new Uint8Array:k(I,C*g),W=zee(Y),te=[];for(let ne=0;ne+4<=Y.byteLength;ne+=4)te.push(W.getUint32(ne,!0));const j=ne=>{const le=ne*h,ge=le+h;if(ne<0||ge>U.byteLength)throw new aA(`Mini sector ${ne} extends beyond the root mini stream`);return U.subarray(le,ge)},J=ne=>{if(ne.size===0)return new Uint8Array;if(ne.size<f){if(te.length===0)throw new aA(`Stream ${JSON.stringify(ne.name)} requires a MiniFAT`);return w1n({allocationTable:te,expectedSize:ne.size,maxChainLength:o,readUnit:j,startSector:ne.startSector,unitSize:h})}return k(ne.startSector,ne.size)},oe=new Set([0]),ie=(ne,le)=>{const ge=ne.rawType===5?le:[...le,ne.metadata.name],_e=[],ue=Vqi(ne.metadata.childId,F);for(const fe of ue){if(oe.has(fe))throw new aA(`Directory entry ${fe} is referenced more than once`);oe.add(fe);const pe=F[fe];!pe||pe.rawType===0||(pe.rawType===1?_e.push(ie(pe,ge)):pe.rawType===2&&_e.push(new FXe(pe.metadata,[...ge,pe.metadata.name],()=>J(pe.metadata))))}return new f1n(ne.metadata,ge,_e)};return new Pqi({header:E,originalBytes:t.slice(),root:ie(O,[])})}function Kqi(t,e,n){const o=Math.floor(t.byteLength/128);if(o>n)throw new aA(`Directory contains ${o} entries, exceeding the ${n}-entry limit`);const i=[],r=zee(t);for(let s=0;s<o;s++){const a=s*128,A=r.getUint16(a+64,!0),c=r.getUint8(a+66);if(A>64||A%2!==0)throw new aA(`Directory entry ${s} has invalid UTF-16 name length ${A}`,{byteOffset:a+64});const l=t.subarray(a,a+Math.max(A-2,0)),u=r.getBigUint64(a+120,!0),g=Number(e===3?u&0xffffffffn:u);if(!Number.isSafeInteger(g))throw new aA(`Directory entry ${s} stream size exceeds JavaScript's safe integer range`);i.push({metadata:{childId:r.getUint32(a+76,!0),clsid:Wqi(t.subarray(a+80,a+96)),color:r.getUint8(a+67),creationTime:r.getBigUint64(a+100,!0),id:s,leftSiblingId:r.getUint32(a+68,!0),modifiedTime:r.getBigUint64(a+108,!0),name:l.byteLength===0?"":jqi(l),rightSiblingId:r.getUint32(a+72,!0),size:g,startSector:r.getUint32(a+116,!0),stateBits:r.getUint32(a+96,!0),type:Jqi(c)},rawType:c})}return i}function Vqi(t,e){if(t===v1n)return[];const n=[],o=new Set,i=r=>{if(r===v1n)return;if(r>=e.length)throw new aA(`Directory sibling tree references missing entry ${r}`);if(o.has(r))throw new aA(`Directory sibling tree contains a loop at entry ${r}`);o.add(r);const s=e[r];s&&(i(s.metadata.leftSiblingId),n.push(r),i(s.metadata.rightSiblingId))};return i(t),n}function w1n(t){if(t.expectedSize===0)return new Uint8Array;const e=[],n=new Set;let o=t.startSector;for(;o!==Q1n;){if(o>=S1n||o>=t.allocationTable.length)throw new aA(`Sector chain references invalid sector ${o}`);if(n.has(o))throw new aA(`Sector chain contains a loop at sector ${o}`);if(e.length>=t.maxChainLength)throw new aA(`Sector chain exceeds the ${t.maxChainLength}-sector limit`);n.add(o),e.push(o),o=t.allocationTable[o]??_1e}const i=e.length*t.unitSize;if(t.expectedSize!==void 0&&i<t.expectedSize)throw new aA(`Sector chain contains ${i} bytes, expected ${t.expectedSize}`);const r=t.expectedSize??i,s=new Uint8Array(r);let a=0;for(const A of e){if(a>=r)break;const c=t.readUnit(A),l=r-a;s.set(c.subarray(0,Math.min(c.byteLength,l)),a),a+=Math.min(c.byteLength,l)}return s}function zqi(t,e){if(t>=S1n||t>=e)throw new aA(`Invalid regular sector ${t}; file contains ${e} sectors`)}function zee(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Jqi(t){return t===1?"storage":t===2?"stream":t===5?"root":"stream"}function Wqi(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}function jqi(t){const e=zee(t),n=[];for(let o=0;o+2<=t.byteLength;o+=2)n.push(e.getUint16(o,!0));return String.fromCharCode(...n)}function $qi(t,e={}){const n=e.maxFileSize??268435456;if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("maxFileSize must be a positive safe integer");if(t.byteLength>n)throw new RangeError(`Altium file is ${t.byteLength} bytes, exceeding the ${n}-byte detection limit`);if(t.byteLength>=4&&t[0]===80&&t[1]===75&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{confidence:1,container:"zip",documentKind:"zip-container",encoding:"binary",evidence:["ZIP local-file or directory signature"]};if(f1e(t)){const a=Vee(t,e),A=["OLE/CFB signature"];if(a.getStream("/Board6/Data")&&a.getStream("/Board6/Header"))return A.push("Board6/Data and Board6/Header streams"),{confidence:1,container:"cfb",documentKind:"pcb-document",encoding:"binary",evidence:A};const c=a.getStream("/FileHeader"),u=(c?qqi(c.content):void 0)?.toLowerCase();return u?.includes("schematic library")?(A.push("schematic library FileHeader stream"),{confidence:.95,container:"cfb",documentKind:"schematic-library",encoding:"binary",evidence:A}):u?.includes("pcb library")?(A.push("PCB library FileHeader stream"),{confidence:.95,container:"cfb",documentKind:"pcb-library",encoding:"binary",evidence:A}):u?.includes("integrated library")?(A.push("integrated library FileHeader stream"),{confidence:.9,container:"cfb",documentKind:"integrated-library",encoding:"binary",evidence:A}):u?.includes("schematic capture")?(A.push("schematic capture FileHeader stream"),{confidence:1,container:"cfb",documentKind:"schematic-document",encoding:"binary",evidence:A}):{confidence:.8,container:"cfb",documentKind:"compound-file",encoding:"binary",evidence:A}}const o=SXe(t,e.encoding),i=o.text.replace(/^\uFEFF/u,""),r=i.trimStart(),s=[];if(/^<\?xml(?:\s|>)/iu.test(r)||/^<[a-z][^>]*>/iu.test(r))return{confidence:.85,container:"xml",documentKind:"xml-document",encoding:o.encoding,evidence:["XML declaration or root element"]};if(/^\|RECORD=Board(?:\||$)/imu.test(i))return s.push("Board root record"),{confidence:.98,container:"ascii",documentKind:"pcb-document",encoding:o.encoding,evidence:s};if(/^\|HEADER=[^\r\n]*Schematic Library/imu.test(i))return{confidence:.95,container:"ascii",documentKind:"schematic-library",encoding:o.encoding,evidence:["schematic library header"]};if(/^\|HEADER=[^\r\n]*(?:PCB|Printed Circuit Board) Library/imu.test(i)||/^\|RECORD=(?:Pcb)?Library(?:\||$)/imu.test(i))return{confidence:.9,container:"ascii",documentKind:"pcb-library",encoding:o.encoding,evidence:["PCB library header or root record"]};if(/^\|HEADER=[^\r\n]*Schematic Capture/imu.test(i)||/^\|RECORD=31(?:\||$)/imu.test(i))return s.push("schematic header or sheet record"),{confidence:.95,container:"ascii",documentKind:"schematic-document",encoding:o.encoding,evidence:s};if(/^\|(?:RECORD|HEADER)=/mu.test(i))return s.push("Altium property records"),{confidence:.65,container:"ascii",documentKind:"unknown",encoding:o.encoding,evidence:s};if(/^\s*\[[^\]\r\n]+\]\s*$/mu.test(i)){const a=i.toUpperCase();return/DOCUMENTPATH\s*=/u.test(a)||/\[(?:DESIGN|DOCUMENT\d+|SOURCEPROJECT)\]/u.test(a)?{confidence:.86,container:"ini",documentKind:"project",encoding:o.encoding,evidence:["INI sections and project document metadata"]}:/OUTPUT(?:TYPE|GENERATOR|MEDIUM|CONTAINER)\s*=/u.test(a)||/\[OUTPUTJOB/u.test(a)?{confidence:.86,container:"ini",documentKind:"output-job",encoding:o.encoding,evidence:["INI sections and output-job metadata"]}:/\[(?:PROJECTGROUP|WORKSPACE)/u.test(a)?{confidence:.8,container:"ini",documentKind:"workspace",encoding:o.encoding,evidence:["INI sections and workspace metadata"]}:{confidence:.65,container:"ini",documentKind:"ini-document",encoding:o.encoding,evidence:["INI section syntax"]}}return{confidence:.1,container:"ascii",documentKind:"unknown",encoding:o.encoding,evidence:s}}function qqi(t){if(t.byteLength<8)return;const n=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0,!0)&16777215;if(n===0||n>t.byteLength-4)return;const o=t.subarray(4,4+n);return new TextDecoder("windows-1252").decode(o)}var P1n=class extends Ol{type="arc-record";constructor(t={}){super(t)}get center(){return qh(this,["LOCATION.X","X"],["LOCATION.Y","Y"])}get radiusMils(){return tc(this,"RADIUS")}get widthMils(){return tc(this,"WIDTH")}get startAngle(){return xI(this.getNumber("STARTANGLE")??0)}get endAngle(){return xI(this.getNumber("ENDANGLE")??360)}get layer(){return pi(this,"LAYER")}get netIndex(){return this.getNumber("NET")}get componentIndex(){return this.getNumber("COMPONENT")}get polygonIndex(){return this.getNumber("POLYGON")}get isFullCircle(){const t=this.getNumber("STARTANGLE")??0,e=this.getNumber("ENDANGLE")??360;return Math.abs(e-t)>=360||e===t}},M1n=class extends Ol{type="fill-record";constructor(t={}){super(t)}get start(){return qh(this,["X1"],["Y1"])}get end(){return qh(this,["X2"],["Y2"])}get bounds(){if(!(!this.start||!this.end))return{minX:Math.min(this.start.x,this.end.x),minY:Math.min(this.start.y,this.end.y),maxX:Math.max(this.start.x,this.end.x),maxY:Math.max(this.start.y,this.end.y)}}get rotation(){return xI(this.getNumber("ROTATION")??0)}get layer(){return pi(this,"LAYER")}get netIndex(){return this.getNumber("NET")}get componentIndex(){return this.getNumber("COMPONENT")}},D1n=class extends Ol{type="pad-record";constructor(t={}){super(t)}get name(){return pi(this,"NAME")}get componentIndex(){return this.getNumber("COMPONENT")}get netIndex(){return this.getNumber("NET")}get layer(){return pi(this,"LAYER")}get position(){return qh(this,["X"],["Y"])}get size(){return Yee(this,["XSIZE"],["YSIZE"])}get middleSize(){return Yee(this,["MIDXSIZE","MIDLAYER1XSIZE"],["MIDYSIZE","MIDLAYER1YSIZE"])}get bottomSize(){return Yee(this,["BOTTOMXSIZE","BOTTOMLAYERXSIZE"],["BOTTOMYSIZE","BOTTOMLAYERYSIZE"])}get holeSizeMils(){return tc(this,"HOLESIZE")}get holeWidthMils(){return tc(this,"HOLEWIDTH")}get shape(){return pi(this,"SHAPE")}get middleShape(){return pi(this,"MIDSHAPE")}get bottomShape(){return pi(this,"BOTTOMSHAPE")}get holeType(){return pi(this,"HOLETYPE","HOLESHAPE")}get rotation(){return xI(this.getNumber("ROTATION")??0)}get holeRotation(){return xI(this.getNumber("HOLEROTATION")??this.getNumber("SLOTROTATION")??0)}get plated(){return this.getBoolean("PLATED")}get padMode(){return this.getNumber("PADMODE")}get behavior(){const t=this.layer?.toUpperCase();return(this.holeSizeMils??0)>0||t==="MULTILAYER"?"through-hole":t==="TOP"||t==="BOTTOM"||t==="TOP LAYER"||t==="BOTTOM LAYER"?"smd":"unknown"}get pasteMaskExpansionMils(){return tc(this,"PASTEMASKEXPANSION_MANUAL")}get solderMaskExpansionMils(){return tc(this,"SOLDERMASKEXPANSION_MANUAL")}get tentedTop(){return this.getBoolean("TENTEDTOP")??this.getBoolean("TENTINGTOP")}get tentedBottom(){return this.getBoolean("TENTEDBOTTOM")??this.getBoolean("TENTINGBOTTOM")}};function N1n(t){if(!t)return"";if(!/^\d+(?:,\d+)*$/u.test(t))return t;try{return String.fromCodePoint(...t.split(",").map(e=>Number(e)))}catch{return t}}var R1n=class extends Ol{type="text-record";constructor(t={}){super(t)}get text(){const t=this.getDecoded("WIDESTRING");return t===void 0?pi(this,"TEXT"):N1n(t)}get position(){return qh(this,["X"],["Y"])}get layer(){return pi(this,"LAYER")}get heightMils(){return tc(this,"HEIGHT")}get strokeWidthMils(){return tc(this,"WIDTH")}get rotation(){return xI(this.getNumber("ROTATION")??0)}get mirrored(){return this.getBoolean("MIRROR")}get inverted(){return this.getBoolean("INVERTED")}get justification(){return pi(this,"JUSTIFICATION")}get fontName(){return pi(this,"FONTNAME")}get usesTrueTypeFont(){return this.getBoolean("USETTFONTS")??this.getBoolean("FONTTYPE")}get textBoxSize(){return Yee(this,["TEXTBOXWIDTH"],["TEXTBOXHEIGHT"])}get componentIndex(){return this.getNumber("COMPONENT")}get isDesignator(){return this.getBoolean("DESIGNATOR")===!0}get isComment(){return this.getBoolean("COMMENT")===!0}},T1n=class extends Ol{type="track-record";constructor(t={}){super(t)}get start(){return qh(this,["X1"],["Y1"])}get end(){return qh(this,["X2"],["Y2"])}get widthMils(){return tc(this,"WIDTH")}get layer(){return pi(this,"LAYER")}get netIndex(){return this.getNumber("NET")}get componentIndex(){return this.getNumber("COMPONENT")}get polygonIndex(){return this.getNumber("POLYGON")}get unionIndex(){return this.getNumber("UNIONINDEX")}get uniqueId(){return pi(this,"UNIQUEID")}get keepout(){return this.getBoolean("KEEPOUT")}get polygonOutline(){return this.getBoolean("POLYGONOUTLINE")}get userRouted(){return this.getBoolean("USERROUTED")}get isZeroLength(){return this.start!==void 0&&this.end!==void 0?hXe(this.start,this.end):!1}},k1n=class extends Ol{type="via-record";constructor(t={}){super(t)}get position(){return qh(this,["X"],["Y"])}get diameterMils(){return tc(this,"DIAMETER","TOPLAYERSIZE")}get holeSizeMils(){return tc(this,"HOLESIZE")}get startLayer(){return pi(this,"STARTLAYER","FROMLAYER")}get endLayer(){return pi(this,"ENDLAYER","TOLAYER")}get netIndex(){return this.getNumber("NET")}get kind(){const t=this.startLayer?.toUpperCase(),e=this.endLayer?.toUpperCase();return!t||!e?"unknown":t.includes("TOP")&&e.includes("BOTTOM")||t.includes("BOTTOM")&&e.includes("TOP")?"through":"blind-buried"}get tentedTop(){return this.getBoolean("TENTEDTOP")??this.getBoolean("TENTINGTOP")}get tentedBottom(){return this.getBoolean("TENTEDBOTTOM")??this.getBoolean("TENTINGBOTTOM")}},F1n=class extends o8{type="raw-field";_raw;constructor(t){if(super(t),/[|\r\n]/u.test(t.raw))throw new Error("Raw Altium fields cannot contain record delimiters");this._raw=t.raw}get raw(){return this._raw}set raw(t){if(/[|\r\n]/u.test(t))throw new Error("Raw Altium fields cannot contain record delimiters");t!==this._raw&&(this._raw=t,this.markDirty())}getChildren(){return[]}getString(){return this.raw}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,raw:this.raw}}},I1e=class extends Ol{type="unknown-record";constructor(t={}){super(t)}},L1n=class extends Ol{type="component-body-record";constructor(t={}){super(t)}get componentIndex(){return this.getNumber("COMPONENT")}get bodyKind(){return pi(this,"KIND")}get identifier(){return pi(this,"IDENTIFIER","NAME")}get modelId(){return pi(this,"MODELID")}get modelEmbedded(){return this.getBoolean("MODEL.EMBED")}get modelPosition(){return qh(this,["MODEL.2D.X"],["MODEL.2D.Y"])}get modelRotation2d(){return xI(this.getNumber("MODEL.2D.ROTATION")??0)}get modelRotation3d(){return{x:xI(this.getNumber("MODEL.3D.ROTX")??0),y:xI(this.getNumber("MODEL.3D.ROTY")??0),z:xI(this.getNumber("MODEL.3D.ROTZ")??0)}}get standoffHeightMils(){return tc(this,"STANDOFFHEIGHT")}get overallHeightMils(){return tc(this,"OVERALLHEIGHT")}get opacity(){return this.getNumber("BODYOPACITY3D")}},Xqi=class extends Ol{type="differential-pair-record";constructor(t={}){super(t)}get name(){return pi(this,"NAME")}get positiveNet(){return pi(this,"POSITIVENET","POSITIVE")}get negativeNet(){return pi(this,"NEGATIVENET","NEGATIVE")}},Zqi=class extends Ol{type="from-to-record";get from(){return pi(this,"FROM")}get to(){return pi(this,"TO")}get netIndex(){return this.getNumber("NET")}},eXi=class extends Ol{type="connection-record";get netIndex(){return this.getNumber("NET")}get from(){return pi(this,"FROM")}get to(){return pi(this,"TO")}},tXi=class extends Ol{type="embedded-board-record";constructor(t={}){super(t)}get sourcePath(){return pi(this,"SOURCEPATH","FILENAME")}get position(){return qh(this,["X","ORIGINX"],["Y","ORIGINY"])}get rotation(){return xI(this.getNumber("ROTATION")??0)}get mirrored(){return this.getBoolean("MIRROR")}},nXi=class extends Ol{type="file-version-info-record";constructor(t={}){super(t)}get versions(){const t=[];for(let e=0;e<1e4;e++){const n=pi(this,`VER${e}`);if(n===void 0)break;t.push(n)}return t}},oXi=class extends Ol{type="unique-id-primitive-information-record";get primitiveIndex(){return this.getNumber("PRIMITIVEINDEX")}get primitiveObjectId(){return pi(this,"PRIMITIVEOBJECTID")}get uniqueId(){return pi(this,"UNIQUEID")}},iM=class extends Ol{type="option-record";get optionFamily(){return this.recordKind}},iXi=class extends iM{type="advanced-placer-options-record"},rXi=class extends iM{type="design-rule-checker-options-record"},sXi=class extends iM{type="engineering-change-order-options-record"},aXi=class extends iM{type="gerber-options-record"},AXi=class extends iM{type="output-options-record"},cXi=class extends iM{type="pin-swap-options-record"},lXi=class extends iM{type="printer-options-record"},uXi=class extends iM{type="testpoint-options-record"},gXi=class extends Ol{type="model-record";constructor(t={}){super(t)}get id(){return pi(this,"ID")}get name(){return pi(this,"NAME")}get checksum(){return pi(this,"CHECKSUM")}get embedded(){return this.getBoolean("EMBED")}get rotation(){return{x:xI(this.getNumber("ROTX")??0),y:xI(this.getNumber("ROTY")??0),z:xI(this.getNumber("ROTZ")??0)}}get standoffRaw(){return this.getNumber("DZ")}},dXi=class extends Ol{type="parameter-record";constructor(t={}){super(t)}get name(){return pi(this,"NAME")}get value(){return pi(this,"VALUE")}get primitiveIndex(){return this.getNumber("PRIMITIVEINDEX")}get imported(){return this.getBoolean("ISIMPORTED")}},YXe=class extends Ol{type="region-record";constructor(t={}){super(t)}get layer(){return pi(this,"LAYER")}get regionKind(){return s1e(this)}get componentIndex(){return this.getNumber("COMPONENT")}get netIndex(){return this.getNumber("NET")}get polygonIndex(){return this.getNumber("POLYGON")}get holeCount(){return Math.max(this.getNumber("HOLECOUNT")??0,0)}get isGeneratedPour(){return this.recordKind==="RegionFill"}get isBoardCutout(){return this.regionKind==="BOARD_CUTOUT"}get isLayerStackRegion(){return this.regionKind==="LAYER_STACK_REGION"}get isPolygonCutout(){return this.regionKind==="POLYGON_CUTOUT"}get layerStackId(){return pi(this,"LAYERSTACKID")}get geometry(){return r1e(this)}},hXi=class extends Ol{type="room-record";constructor(t={}){super(t)}get name(){return pi(this,"NAME")}get start(){return qh(this,["X1"],["Y1"])}get end(){return qh(this,["X2"],["Y2"])}get bounds(){if(!(!this.start||!this.end))return{minX:Math.min(this.start.x,this.end.x),minY:Math.min(this.start.y,this.end.y),maxX:Math.max(this.start.x,this.end.x),maxY:Math.max(this.start.y,this.end.y)}}get ruleIndex(){return this.getNumber("RULE")}},pXi=class extends Ol{type="smart-union-record";constructor(t={}){super(t)}get start(){return qh(this,["X1"],["Y1"])}get end(){return qh(this,["X2"],["Y2"])}get bounds(){if(!(!this.start||!this.end))return{minX:Math.min(this.start.x,this.end.x),minY:Math.min(this.start.y,this.end.y),maxX:Math.max(this.start.x,this.end.x),maxY:Math.max(this.start.y,this.end.y)}}get unionType(){return pi(this,"UNIONTYPE")}get unionIndex(){return this.getNumber("UNIONINDEX")}get rotation(){return xI(this.getNumber("ROTATION")??0)}get mirrored(){return this.getBoolean("MIRROR")}},H1n=new Map([["Arc",P1n],["1",i1n],["2",MXe],["4",DXe],["5",Z$i],["6",eqi],["7",tqi],["8",nqi],["10",oqi],["11",iqi],["12",rqi],["13",sqi],["14",aqi],["15",r1n],["16",Aqi],["17",NXe],["18",RXe],["22",uqi],["25",TXe],["26",cqi],["27",s1n],["28",gqi],["29",dqi],["30",a1n],["31",hqi],["32",A1n],["33",c1n],["34",pqi],["37",lqi],["39",mqi],["41",_qi],["44",fqi],["45",Iqi],["46",Cqi],["48",yqi],["209",xqi],["AdvancedPlacerOptions",iXi],["Board",qfn],["BoardRegion",YXe],["Class",vXe],["ComponentBody",L1n],["ComponentBodyLegacy",L1n],["Component",e1e],["Connection",eXi],["Coordinate",f$i],["DesignRuleCheckerOptions",rXi],["DifferentialPair",Xqi],["Dimension",Vfn],["DXPRule",Zfn],["EmbeddedBoard",tXi],["EngineeringChangeOrderOptions",sXi],["FileVersionInfo",nXi],["Fill",M1n],["FromTo",Zqi],["GerberOptions",aXi],["Model",gXi],["Net",t1e],["OutputOptions",AXi],["Pad",D1n],["ParamItem",dXi],["PinSwapOptions",cXi],["Polygon",Xfn],["PrinterOptions",lXi],["Region",YXe],["RegionFill",YXe],["Room",hXi],["Rule",wXe],["SignalClass",H$i],["SmartUnion",pXi],["TestpointOptions",uXi],["Text",R1n],["Track",T1n],["UniqueIDPrimitiveInformation",oXi],["Via",k1n]]);function UXe(t,e,n){const o=t.at(-1)===0?t.subarray(0,t.byteLength-1):t,i=_Xi(o,124);i[0]?.byteLength===0&&i.shift();const r=i.map(mXi);let s=fXi(r,"RECORD");s===void 0&&e!==void 0&&(r.unshift(new a9({key:"RECORD",value:e})),s=e);const a=(s===void 0?void 0:H1n.get(s))??I1e,A=new a({items:r,originalBinaryPayload:t,sourceLocation:n});for(const[c,l]of r.entries())l.setSourceLocation(n?{...n,fieldIndex:c}:void 0);return A}function mXi(t){const e=t.indexOf(61);if(e<=0)return new F1n({raw:KXe(t)});const n=t.subarray(0,e),o=t.subarray(e+1),i=KXe(n),s=(i.toUpperCase().startsWith("%UTF8%")?new TextDecoder().decode(o):KXe(o)).replaceAll("\r","").replaceAll(`
`,"");return new a9({key:i,value:s})}function _Xi(t,e){const n=[];let o=0;for(let i=0;i<t.byteLength;i++)t[i]===e&&(n.push(t.subarray(o,i)),o=i+1);return n.push(t.subarray(o)),n}function fXi(t,e){const n=e.toUpperCase();return t.find(o=>o instanceof a9&&o.key.toUpperCase()===n)?.value}function KXe(t){return new TextDecoder("windows-1252").decode(t)}var C1e={Arcs6:1,BoardRegions:11,ComponentBodies6:12,Fills6:6,Pads6:2,Regions6:11,ShapeBasedRegions6:11,ShapeBasedComponentBodies6:12,Texts6:5,Tracks6:4,Vias6:3},IXi=512,CXi={BoardRegions:{extendedVertices:!1,recordKind:"BoardRegion"},ComponentBodies6:{extendedVertices:!1,recordKind:"ComponentBodyLegacy"},Regions6:{extendedVertices:!1,recordKind:"RegionFill"},ShapeBasedRegions6:{extendedVertices:!0,recordKind:"Region"},ShapeBasedComponentBodies6:{extendedVertices:!0,recordKind:"ComponentBody"}};function yXi(t,e,n={}){if(t==="Pads6")return y1e(EXi(e,n),t);if(t==="Texts6")return y1e(BXi(e,n),t);if(t==="BoardRegions"||t==="ComponentBodies6"||t==="Regions6"||t==="ShapeBasedRegions6"||t==="ShapeBasedComponentBodies6")return y1e(SXi(t,e,n),t);const o=n.maximumRecordLength??16*1024*1024,i=[],r=new DataView(e.buffer,e.byteOffset,e.byteLength);let s=0;for(;s<e.byteLength;){const a=s;if(s+5>e.byteLength)throw new hh(`${t} primitive frame header is truncated`,s);const A=e[s],l=r.getUint32(s+1,!0)&16777215;if(s+=5,A!==C1e[t])throw new yI(`${t} frame at offset ${a} has unexpected primitive type ${A}`);if(l===0||l>o)throw new hh(`Invalid ${t} primitive length ${l}`,a+1);if(s+l>e.byteLength)throw new hh(`${t} primitive at offset ${a} exceeds its stream`,a);const u=e.subarray(s,s+l);i.push(xXi(t,u,a)),s+=l}if(n.expectedRecordCount!==void 0&&i.length!==n.expectedRecordCount)throw new yI(`${t} stream declares ${n.expectedRecordCount} records but contains ${i.length}`);return y1e(i,t)}function y1e(t,e){for(const[n,o]of t.entries()){const i={recordIndex:n,streamPath:`/${e}/Data`};o.setSourceLocation(i);for(const[r,s]of o.items.entries())s.setSourceLocation({...i,fieldIndex:r})}return t}function xXi(t,e,n){const o=t==="Tracks6"?33:t==="Arcs6"?45:t==="Fills6"?37:31;if(e.byteLength<o)throw new hh(`${t} primitive payload is shorter than ${o} bytes`,n);const i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=LS(i.getUint8(0));if(t==="Fills6"){const A=i.getUint8(2)===2,c=[fi("RECORD","Fill"),fi("LAYER",r),fi("LOCKED",g_((i.getUint8(1)&4)===0)),fi("KEEPOUT",g_(A)),fi("NET",String(i.getUint16(3,!0))),fi("COMPONENT",String(i.getUint16(7,!0))),na("X1",i.getInt32(13,!0)),na("Y1",i.getInt32(17,!0)),na("X2",i.getInt32(21,!0)),na("Y2",i.getInt32(25,!0)),fi("ROTATION",i8(i.getFloat64(29,!0))),fi("KEEPOUTRESTRICTIONS",String(e.byteLength>=47?i.getUint8(46):A?31:0))];return e.byteLength>=46&&c.push(fi("LAYER_V7_ID",String(i.getUint32(42,!0)))),e.byteLength>37&&e.byteLength<46&&c.push(fi("UNPARSEDTRAILINGBYTES",String(e.byteLength-37))),e.byteLength>47&&c.push(fi("UNPARSEDTRAILINGBYTES",String(e.byteLength-47))),new M1n({items:c,originalBinaryPayload:e})}const s=i.getUint16(1,!0),a=[fi("LAYER",r),fi("LOCKED",g_((i.getUint8(1)&4)===0)),...(s&IXi)!==0?[fi("KEEPOUT","TRUE")]:[],fi("NET",String(i.getUint16(3,!0))),fi("COMPONENT",String(i.getUint16(7,!0))),fi("POLYGON",String(i.getUint16(9,!0)))];return t==="Tracks6"?new T1n({originalBinaryPayload:e,items:[fi("RECORD","Track"),...a,na("X1",i.getInt32(13,!0)),na("Y1",i.getInt32(17,!0)),na("X2",i.getInt32(21,!0)),na("Y2",i.getInt32(25,!0)),na("WIDTH",i.getInt32(29,!0))]}):t==="Arcs6"?new P1n({originalBinaryPayload:e,items:[fi("RECORD","Arc"),...a,na("LOCATION.X",i.getInt32(13,!0)),na("LOCATION.Y",i.getInt32(17,!0)),na("RADIUS",i.getInt32(21,!0)),fi("STARTANGLE",i8(i.getFloat64(25,!0))),fi("ENDANGLE",i8(i.getFloat64(33,!0))),na("WIDTH",i.getInt32(41,!0))]}):new k1n({originalBinaryPayload:e,items:[fi("RECORD","Via"),fi("LAYER","MULTILAYER"),fi("LOCKED",g_((i.getUint8(1)&4)===0)),fi("TENTEDTOP",g_((i.getUint8(1)&32)!==0)),fi("TENTEDBOTTOM",g_((i.getUint8(1)&64)!==0)),fi("NET",String(i.getUint16(3,!0))),na("X",i.getInt32(13,!0)),na("Y",i.getInt32(17,!0)),na("DIAMETER",i.getInt32(21,!0)),na("HOLESIZE",i.getInt32(25,!0)),fi("STARTLAYER",LS(i.getUint8(29))),fi("ENDLAYER",LS(i.getUint8(30)))]})}function EXi(t,e){const n=e.maximumRecordLength??16777216,o=[],i=new DataView(t.buffer,t.byteOffset,t.byteLength);let r=0;for(;r<t.byteLength;){const s=r;if(t[r]!==C1e.Pads6)throw new yI(`Pads6 record at offset ${s} has unexpected primitive type ${t[r]}`);r+=1;const a=[];for(let l=0;l<6;l++){const u=r;if(r+4>t.byteLength)throw new hh(`Pads6 subrecord ${l+1} length is truncated`,r);const g=i.getUint32(r,!0)&16777215;if(r+=4,g>n)throw new hh(`Invalid Pads6 subrecord length ${g}`,u);if(r+g>t.byteLength)throw new hh(`Pads6 subrecord ${l+1} at offset ${u} exceeds its stream`,u);a.push(t.subarray(r,r+g)),r+=g}const A=MXi(a[0]??new Uint8Array),c=a[4];if(!c||c.byteLength<110)throw new hh("Pads6 geometry subrecord is shorter than 110 bytes",s);o.push(vXi(A,c,a[5]))}if(e.expectedRecordCount!==void 0&&o.length!==e.expectedRecordCount)throw new yI(`Pads6 stream declares ${e.expectedRecordCount} records but contains ${o.length}`);return o}function BXi(t,e){const n=e.maximumRecordLength??16777216,o=[],i=new DataView(t.buffer,t.byteOffset,t.byteLength);let r=0;for(;r<t.byteLength;){const s=r;if(t[r]!==C1e.Texts6)throw new yI(`Texts6 record at offset ${s} has unexpected primitive type ${t[r]}`);r+=1;const a=VXe("Texts6 properties",t,i,r,n);r=a.nextOffset;const A=VXe("Texts6 legacy text",t,i,r,n);r=A.nextOffset,o.push(bXi(a.payload,A.payload,e.wideStrings,s))}return O1n("Texts6",o,e.expectedRecordCount),o}function bXi(t,e,n,o){if(t.byteLength<40)throw new hh("Texts6 properties subrecord is shorter than 40 bytes",o);const i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.byteLength>=119?i.getUint32(115,!0):4294967295,s=n?.get(r)??DXi(e),a=[fi("RECORD","Text"),fi("LAYER",LS(i.getUint8(0))),fi("LOCKED",g_((i.getUint8(1)&4)===0)),fi("COMPONENT",String(i.getUint16(7,!0))),na("X",i.getInt32(13,!0)),na("Y",i.getInt32(17,!0)),na("HEIGHT",i.getInt32(21,!0)),fi("STROKEFONT",String(i.getUint16(25,!0))),fi("ROTATION",i8(i.getFloat64(27,!0))),fi("MIRROR",g_(i.getUint8(35)!==0)),na("WIDTH",i.getInt32(36,!0)),fi("WIDESTRINGINDEX",String(r)),fi("WIDESTRING",RXi(s))];return t.byteLength>=137&&a.push(fi("COMMENT",g_(i.getUint8(40)!==0)),fi("DESIGNATOR",g_(i.getUint8(41)!==0)),fi("FONTTYPE",String(i.getUint8(43))),fi("BOLD",g_(i.getUint8(44)!==0)),fi("ITALIC",g_(i.getUint8(45)!==0)),fi("FONTNAME",NXi(t.subarray(46,110))),fi("INVERTED",g_(i.getUint8(110)!==0)),na("MARGINBORDERWIDTH",i.getInt32(111,!0)),fi("INVERTEDRECT",g_(i.getUint8(123)!==0)),na("TEXTBOXWIDTH",i.getInt32(124,!0)),na("TEXTBOXHEIGHT",i.getInt32(128,!0)),fi("JUSTIFICATION",String(i.getUint8(132))),na("TEXTOFFSET",i.getInt32(133,!0))),t.byteLength>=230&&a.push(fi("LAYER_V7",LS(i.getUint32(226,!0)))),new R1n({items:a,originalBinaryPayload:t})}function SXi(t,e,n){const o=CXi[t],i=n.maximumRecordLength??16*1024*1024,r=[],s=new DataView(e.buffer,e.byteOffset,e.byteLength);let a=0;for(;a<e.byteLength;){const A=a;if(e[a]!==C1e[t])throw new yI(`${t} record at offset ${A} has unexpected primitive type ${e[a]}`);a+=1;const c=VXe(t,e,s,a,i);r.push(QXi(c.payload,A,t,o.recordKind,o.extendedVertices)),a=c.nextOffset}return O1n(t,r,n.expectedRecordCount),r}function QXi(t,e,n,o,i){if(t.byteLength<26)throw new hh(`${n} payload is shorter than 26 bytes`,e);const r=new DataView(t.buffer,t.byteOffset,t.byteLength),s=r.getUint32(18,!0)&16777215,a=22,A=a+s;if(A+4>t.byteLength)throw new hh(`${n} property block exceeds its record`,e+a);const c=new Uint8Array(s+1);c[0]=124,c.set(t.subarray(a,A),1);const l=UXe(c,o),u=r.getUint8(1),g=Number(l.getCaseInsensitive("KIND")??0),h=l.getBoolean("ISBOARDCUTOUT")===!0,d=[fi("SOURCESTREAM",n),fi("LAYER",LS(r.getUint8(0))),fi("LOCKED",g_((u&4)===0)),fi("TEARDROP",g_((u&16)!==0)),fi("KEEPOUT",g_(r.getUint8(2)===2)),fi("NET",String(r.getUint16(3,!0))),fi("POLYGON",String(r.getUint16(5,!0))),fi("COMPONENT",String(r.getUint16(7,!0))),fi("HOLECOUNT",String(r.getUint16(14,!0)))];(n==="BoardRegions"||n==="Regions6"||n==="ShapeBasedRegions6")&&d.push(fi("REGIONKIND",PXi(n,g,h)));let p=A;const _=r.getUint32(p,!0)+(i?1:0);p+=4,i?zXe(`${n} outline`,_,37,p,t.byteLength,e):zXe(`${n} outline`,_,16,p,t.byteLength,e);for(let y=0;y<_;y++)if(i){const x=r.getUint8(p)!==0;d.push(fi(`KIND${y}`,x?"1":"0"),na(`VX${y}`,r.getInt32(p+1,!0)),na(`VY${y}`,r.getInt32(p+5,!0)),na(`CX${y}`,r.getInt32(p+9,!0)),na(`CY${y}`,r.getInt32(p+13,!0)),na(`R${y}`,r.getInt32(p+17,!0)),fi(`SA${y}`,i8(r.getFloat64(p+21,!0))),fi(`EA${y}`,i8(r.getFloat64(p+29,!0)))),p+=37}else d.push(fi(`KIND${y}`,"0"),na(`VX${y}`,r.getFloat64(p,!0)),na(`VY${y}`,r.getFloat64(p+8,!0))),p+=16;const f=r.getUint16(14,!0);for(let y=0;y<f;y++){if(p+4>t.byteLength)throw new hh(`${n} hole ${y} count is truncated`,e+p);const x=r.getUint32(p,!0);p+=4,zXe(`${n} hole ${y}`,x,16,p,t.byteLength,e),d.push(fi(`HOLE${y}COUNT`,String(x)));for(let E=0;E<x;E++)d.push(na(`HOLE${y}VX${E}`,r.getFloat64(p,!0)),na(`HOLE${y}VY${E}`,r.getFloat64(p+8,!0))),p+=16}p!==t.byteLength&&d.push(fi("UNPARSEDTRAILINGBYTES",String(t.byteLength-p)));const I=l.items,C=[];I[0]&&C.push(I[0]);for(const y of d)C.push(y.setParent(l));for(let y=1;y<I.length;y+=1){const x=I[y];x&&C.push(x)}return l.items=C,l.setOriginalBinaryPayload(t),l}function vXi(t,e,n){const o=new DataView(e.buffer,e.byteOffset,e.byteLength),i=o.getUint8(49),r=o.getUint8(1),s=o.getUint8(62),a=[fi("RECORD","Pad"),fi("NAME",t),fi("LAYER",LS(o.getUint8(0))),fi("LOCKED",g_((r&4)===0)),fi("TENTEDTOP",g_((r&32)!==0)),fi("TENTEDBOTTOM",g_((r&64)!==0)),fi("NET",String(o.getUint16(3,!0))),fi("COMPONENT",String(o.getUint16(7,!0))),na("X",o.getInt32(13,!0)),na("Y",o.getInt32(17,!0)),na("XSIZE",o.getInt32(21,!0)),na("YSIZE",o.getInt32(25,!0)),na("MIDXSIZE",o.getInt32(29,!0)),na("MIDYSIZE",o.getInt32(33,!0)),na("BOTTOMXSIZE",o.getInt32(37,!0)),na("BOTTOMYSIZE",o.getInt32(41,!0)),na("HOLESIZE",o.getInt32(45,!0)),fi("SHAPE",x1e(i)),fi("MIDSHAPE",x1e(o.getUint8(50))),fi("BOTTOMSHAPE",x1e(o.getUint8(51))),fi("ROTATION",i8(o.getFloat64(52,!0))),fi("PLATED",o.getUint8(60)===0?"FALSE":"TRUE"),fi("PADMODE",String(s)),fi("PADSTACKMODE",FXi(s)),na("PASTEMASKEXPANSION_MANUAL",o.getInt32(86,!0)),na("SOLDERMASKEXPANSION_MANUAL",o.getInt32(90,!0)),fi("PASTEMASKEXPANSIONMODE",G1n(o.getUint8(101))),fi("SOLDERMASKEXPANSIONMODE",G1n(o.getUint8(102)))];return e.byteLength>=114&&a.push(fi("HOLEROTATION",i8(o.getFloat64(106,!0)))),e.byteLength>=120&&a.push(fi("TOLAYER",LS(o.getUint8(114))),fi("FROMLAYER",LS(o.getUint8(117)))),n&&n.byteLength>=596&&a.push(...wXi(n)),new D1n({items:a,originalBinaryPayload:e})}function wXi(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=[fi("STACKDATALENGTH",String(t.byteLength)),fi("HOLETYPE",String(e.getUint8(262))),fi("HOLESHAPE",kXi(e.getUint8(262))),na("SLOTLENGTH",e.getInt32(263,!0)),fi("SLOTROTATION",i8(e.getFloat64(267,!0)))];t.byteLength>596&&n.push(fi("UNPARSEDSTACKBYTES",String(t.byteLength-596)));for(let o=0;o<32;o++)n.push(na(`LAYER${o}HOLEXOFFSET`,e.getInt32(275+o*4,!0)),na(`LAYER${o}HOLEYOFFSET`,e.getInt32(403+o*4,!0)),fi(`LAYER${o}ALTSHAPE`,TXi(e.getUint8(532+o))),fi(`LAYER${o}CORNERRADIUS`,String(e.getUint8(564+o))));for(let o=0;o<29;o++){const i=o+2;n.push(na(`LAYER${i}XSIZE`,e.getInt32(o*4,!0)),na(`LAYER${i}YSIZE`,e.getInt32(116+o*4,!0)),fi(`LAYER${i}SHAPE`,x1e(e.getUint8(232+o))))}return n}function VXe(t,e,n,o,i){if(o+4>e.byteLength)throw new hh(`${t} subrecord length is truncated`,o);const r=o,s=n.getUint32(o,!0)&16777215;if(o+=4,s>i)throw new hh(`Invalid ${t} subrecord length ${s}`,r);if(o+s>e.byteLength)throw new hh(`${t} subrecord at offset ${r} exceeds its stream`,r);return{nextOffset:o+s,payload:e.subarray(o,o+s)}}function O1n(t,e,n){if(n!==void 0&&e.length!==n)throw new yI(`${t} stream declares ${n} records but contains ${e.length}`)}function zXe(t,e,n,o,i,r){const s=i-o;if(e>Math.floor(s/n))throw new hh(`${t} declares ${e} vertices but exceeds its record`,r+o)}function PXi(t,e,n){return t==="BoardRegions"?"LAYER_STACK_REGION":e===0?n?"BOARD_CUTOUT":"COPPER":e===1?"POLYGON_CUTOUT":e===2?"DASHED_OUTLINE":e===3?"UNKNOWN_3":e===4?"CAVITY_DEFINITION":`UNKNOWN_${e}`}function MXi(t){if(t.byteLength===0)return"";const e=t[0]??0,n=Math.min(e+1,t.byteLength);return new TextDecoder("windows-1252").decode(t.subarray(1,n))}function DXi(t){if(t.byteLength===0)return"";const e=t[0]??0,n=Math.min(e+1,t.byteLength);return new TextDecoder("windows-1252").decode(t.subarray(1,n)).replaceAll(`\r
`,`
`)}function NXi(t){return Y1n(t).replace(/\0.*$/su,"")}function RXi(t){return Array.from(t,e=>String(e.codePointAt(0)??0)).join(",")}function x1e(t){return t===1?"ROUND":t===2?"RECTANGLE":t===3?"OCTAGONAL":`SHAPE${t}`}function TXi(t){return t===0?"DEFAULT":t===1?"ROUND":t===2?"RECTANGLE":t===3?"OCTAGONAL":t===9?"ROUNDRECT":`ALTSHAPE${t}`}function kXi(t){return t===0?"ROUND":t===1?"SQUARE":t===2?"SLOT":`HOLESHAPE${t}`}function FXi(t){return t===0?"SIMPLE":t===1?"TOP_MIDDLE_BOTTOM":t===2?"FULL_STACK":`PADMODE${t}`}function G1n(t){return t===0?"None":t===1?"Rule":t===2?"Manual":`Mode${t}`}function fi(t,e){return new a9({key:t,value:e})}function g_(t){return t?"TRUE":"FALSE"}function na(t,e){return fi(t,`${i8(e/1e4,4)}mil`)}function i8(t,e=10){return Number.isFinite(t)?t.toFixed(e).replace(/\.?0+$/u,"").replace(/^-0$/u,"0"):"0"}function LS(t){return t===1?"TOP":t>=2&&t<=31?`MID-LAYER${t-1}`:t===32?"BOTTOM":t===33?"TOPOVERLAY":t===34?"BOTTOMOVERLAY":t===35?"TOPPASTE":t===36?"BOTTOMPASTE":t===37?"TOPSOLDER":t===38?"BOTTOMSOLDER":t>=39&&t<=54?`INTERNALPLANE${t-38}`:t===55?"DRILLGUIDE":t===56?"KEEPOUT":t>=57&&t<=72?`MECHANICAL${t-56}`:t===73?"DRILLDRAWING":t===74?"MULTILAYER":t===75?"CONNECTIONS":t===76?"BACKGROUND":t===77?"DRCERROR":t===78?"SELECTIONS":t===79?"VISIBLEGRID1":t===80?"VISIBLEGRID2":t===81?"PADHOLES":t===82?"VIAHOLES":t>=83&&t<=98?`MECHANICAL${t-66}`:`LAYER${t}`}function LXi(t,e=16*1024*1024){const n=new Map,o=new DataView(t.buffer,t.byteOffset,t.byteLength);let i=0;for(;i<t.byteLength;){if(i+8>t.byteLength)throw new hh("WideStrings6 entry header is truncated",i);const r=o.getUint32(i,!0),s=o.getUint32(i+4,!0);if(i+=8,s>e||i+s>t.byteLength)throw new hh(`WideStrings6 entry ${r} has invalid length ${s}`,i-4);const a=s<=2?0:s,A=a===0?"":Y1n(t.subarray(i,i+a-2)).replaceAll(`\r
`,`
`);n.set(r,A),i+=a}return n}function Y1n(t){let e="";for(let n=0;n+1<t.byteLength;n+=2)e+=String.fromCharCode((t[n]??0)|(t[n+1]??0)<<8);return e}var HXi={Board6:{recordKind:"Board"},Classes6:{recordKind:"Class"},Components6:{recordKind:"Component"},Connections6:{allowOpaqueRecords:!0,recordKind:"Connection"},Dimensions6:{headerSize:6,recordKind:"Dimension"},FileVersionInfo:{recordKind:"FileVersionInfo"},FromTos6:{recordKind:"FromTo"},Models:{recordKind:"Model"},Nets6:{recordKind:"Net"},Polygons6:{recordKind:"Polygon"},Rules6:{headerSize:6,recordKind:"Rule"},SignalClasses:{recordKind:"SignalClass"},SmartUnions:{recordKind:"SmartUnion"},UniqueIDPrimitiveInformation:{recordKind:"UniqueIDPrimitiveInformation"}},OXi=new Set(["Arcs6","BoardRegions","ComponentBodies6","Fills6","Pads6","Regions6","ShapeBasedRegions6","ShapeBasedComponentBodies6","Texts6","Tracks6","Vias6"]);function U1n(t,e={}){if(!f1e(t))throw new yI("Binary PcbDoc input does not begin with the OLE/CFB signature");const n=Vee(t,e);if(!n.getStream("/Board6/Data")||!n.getStream("/Board6/Header"))throw new yI("Compound document does not contain the Board6 PCB streams");const o=new Set(n.streams.filter(c=>c.path.length>=2).map(c=>c.path[0]).filter(c=>c!==void 0)),i=new Map,r=new Map,s=[],a=n.getStream("/WideStrings6/Data"),A=a?LXi(a.content):new Map;for(const c of[...o].sort()){const l=n.getStream([c,"Data"]),u=n.getStream([c,"Header"]),g=u?YXi(u.content):void 0,h=HXi[c],d=l&&h?GXi({allowOpaqueRecords:h.allowOpaqueRecords,allowMissingLeadingDelimiter:c==="Models",bytes:l.content,expectedRecordCount:g,family:c,headerSize:h.headerSize,maximumRecordLength:e.maxPropertyRecordLength,recordKind:h.recordKind}):[],p=l&&OXi.has(c)?yXi(c,l.content,{expectedRecordCount:g,maximumRecordLength:e.maxPrimitiveRecordLength,wideStrings:A}):[];d.length>0&&i.set(c,d),p.length>0&&r.set(c,p),s.push({dataSize:l?.content.byteLength,declaredRecordCount:g,decodedPrimitiveRecordCount:p.length,decodedPropertyRecordCount:d.length,family:c,hasData:l!==void 0,hasHeader:u!==void 0})}return new P$i({compoundFile:n,primitiveRecords:r,propertyRecords:i,streamSummaries:s,wideStrings:A})}function GXi({allowOpaqueRecords:t=!1,allowMissingLeadingDelimiter:e=!1,bytes:n,expectedRecordCount:o,recordKind:i,family:r=i,headerSize:s=4,maximumRecordLength:a=16*1024*1024}){if(n.byteLength===0)return[];const A=[],c=new DataView(n.buffer,n.byteOffset,n.byteLength);let l=0,u=0;for(;l<n.byteLength;){const g=l;if(l+s>n.byteLength)throw new hh(`${i} property record length is truncated`,l);const d=c.getUint32(s===6?l+2:l,!0)&16777215,p=s===6?c.getUint16(l,!0):void 0;if(l+=s,d===0||d>a)throw new hh(`Invalid ${i} property record length ${d}`,g);if(l+d>n.byteLength)throw new hh(`${i} property record at offset ${g} exceeds its stream`,g);const m=n.subarray(l,l+d);if(m[0]!==124&&!e){if(t){u+=1,l+=d;continue}throw new yI(`${i} property record at offset ${g} does not begin with "|"`)}const f={byteOffset:g,recordIndex:u,streamPath:`/${r}/Data`},I=UXe(m,i,f);p!==void 0&&(I.insertField("BINARYRECORDTYPE",String(p),{index:1}),I.clearDirty(!0)),A.push(I),u+=1,l+=d}if(o!==void 0&&u!==o)throw new yI(`${i} stream declares ${o} records but contains ${u}`);return A}function YXi(t){if(!(t.byteLength<4))return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0,!0)}var K1n=class extends pXe{type="raw-line";_raw;constructor(t){if(super(t),/[\r\n]/u.test(t.raw))throw new Error("Raw Altium lines cannot include their line terminator");this._raw=t.raw}get raw(){return this._raw}set raw(t){if(/[\r\n]/u.test(t))throw new Error("Raw Altium lines cannot include their line terminator");t!==this._raw&&(this._raw=t,this.markDirty())}getChildren(){return[]}getString(){return this.raw}};function JXe(t,e={}){if(typeof t!="string")throw new eM("parseAltiumAscii expects decoded text; use parseAltiumFile() for binary or byte input");z1n(e.signal);const n=t.startsWith("\uFEFF"),o=n?t.slice(1):t,i=zXi(o,n?1:0),r=e.maxLineCount??1e6;if(i.length>r)throw new eM(`Altium text has ${i.length} lines, exceeding the configured limit of ${r}`);const s=i.map((A,c)=>(z1n(e.signal),UXi(A.content,A.terminator,c+1,A.startOffset,e)));return n?[new K1n({raw:"\uFEFF",terminator:"",nodeId:"text:bom",sourceLocation:{column:1,endColumn:2,endLine:1,endOffset:1,line:1,startOffset:0}}),...s]:s}function UXi(t,e,n,o,i){const r={column:1,endColumn:t.length+1,endLine:n,endOffset:o+t.length,line:n,startOffset:o},s=i.maxLineLength??16*1024*1024;if(t.length>s)throw new eM(`Altium line ${n} has ${t.length} characters, exceeding the configured limit of ${s}`,{excerpt:ik(i,t),location:r});if(!t.startsWith("|")){if(V1n(i)&&t.length>0)throw new eM(i.redactSourceText?`Expected an Altium record at line ${n}`:`Expected an Altium record at line ${n}, got ${JSON.stringify(t.slice(0,40))}`,{excerpt:ik(i,t),location:r});return t.length>0&&WXe(i,{code:"ALTIUM_RAW_TEXT_LINE",excerpt:ik(i,t),location:r,message:`Preserved non-record text at line ${n}`,severity:"warning"}),new K1n({raw:t,terminator:e,nodeId:`text:${o}:raw-line`,sourceLocation:r})}const a=t.slice(1).split("|"),A=i.maxFieldsPerRecord??1e5;if(a.length>A)throw new eM(`Altium record at line ${n} has ${a.length} fields, exceeding the configured limit of ${A}`,{excerpt:ik(i,t),location:r});let c=o+1;const l=a.map((h,d)=>{const p=KXi(h,{itemIndex:d,lineStartOffset:o,lineNumber:n,options:i,startOffset:c});return c+=h.length+1,p}),u=VXi(l);if(u===void 0){if(V1n(i))throw new eM(`Altium record at line ${n} has no RECORD field`,{excerpt:ik(i,t),location:r});return WXe(i,{code:"ALTIUM_RECORD_KIND_MISSING",excerpt:ik(i,t),location:r,message:`Preserved record without a RECORD field at line ${n}`,severity:"warning"}),new I1e({items:l,terminator:e,nodeId:`text:${o}:unknown-record`,sourceLocation:r})}const g=H1n.get(u)??I1e;return new g({items:l,terminator:e,nodeId:`text:${o}:record:${u}`,sourceLocation:r})}function KXi(t,e){const n={column:e.startOffset-e.lineStartOffset+1,endColumn:e.startOffset-e.lineStartOffset+t.length+1,endLine:e.lineNumber,endOffset:e.startOffset+t.length,line:e.lineNumber,startOffset:e.startOffset},o=`text:${e.startOffset}:item:${e.itemIndex}`,i=t.indexOf("=");return i<=0?(t.length>0&&WXe(e.options,{code:"ALTIUM_RAW_FIELD",excerpt:ik(e.options,t),location:n,message:`Preserved malformed field segment at line ${e.lineNumber}`,severity:"warning"}),new F1n({raw:t,nodeId:o,sourceLocation:n})):new a9({key:t.slice(0,i),nodeId:o,sourceLocation:n,value:t.slice(i+1)})}function VXi(t){return new I1e({items:t}).recordKind}function zXi(t,e=0){const n=[];let o=0;for(let i=0;i<t.length;i++){const r=t[i];if(r!=="\r"&&r!==`
`)continue;const s=r==="\r"&&t[i+1]===`
`,a=s?`\r
`:r;n.push({content:t.slice(o,i),startOffset:e+o,terminator:a}),s&&i++,o=i+1}return o<t.length&&n.push({content:t.slice(o),startOffset:e+o,terminator:""}),n}function V1n(t){return t.strict===!0||t.mode==="strict"}function WXe(t,e){t.onDiagnostic?.(e)}function JXi(t,e=120){return t.length<=e?t:`${t.slice(0,e)}…`}function ik(t,e){return t.redactSourceText?void 0:JXi(e)}function z1n(t){t?.throwIfAborted()}function E1e(t,e={}){if(typeof t!="string")throw new eM("parseAltiumPcbDoc expects decoded text; use parseAltiumFile() for binary or byte input");const n=JXe(t,e),o=n.find(i=>i instanceof Ol);if(o?.recordKind!=="Board")throw new eM(`Expected an Altium Board root record, got ${o?.recordKind??"none"}`,{location:o?.sourceLocation,recordKind:o?.recordKind});return new U$i({lines:n,originalSource:t})}function jXe(t,e={}){if(typeof t=="string"){const s=new d1e({lines:JXe(t,e),originalText:t,sourceFormat:"ascii"});return J1n(s),s}if(!f1e(t)){const s=SXe(t,e.encoding),a=new d1e({lines:JXe(s.text,e),originalBytes:t.slice(),originalText:s.text,sourceEncoding:s.encoding,sourceFormat:"ascii"});return J1n(a),a}const n=Vee(t,e),o=n.getStream("/FileHeader");if(!o)throw new yI("Compound document does not contain a FileHeader stream");const i=WXi(o.content,e.maxRecordLength);if(!i[0]?.getCaseInsensitive("HEADER")?.toLowerCase().includes("schematic capture"))throw new yI("FileHeader is not an Altium schematic record stream");return new d1e({compoundFile:n,lines:i,originalBytes:t.slice(),sourceFormat:"binary"})}function J1n(t){if(!t.header?.getCaseInsensitive("HEADER")?.toLowerCase().includes("schematic capture")&&t.getRecordsByKind("31").length===0)throw new yI("Expected an Altium schematic header or sheet record")}function WXi(t,e=16*1024*1024){const n=[],o=new DataView(t.buffer,t.byteOffset,t.byteLength);let i=0;for(;i<t.byteLength;){const r=i;if(i+4>t.byteLength)throw new hh("Schematic record length is truncated",i);const a=o.getUint32(i,!0)&16777215;if(i+=4,a===0||a>e)throw new hh(`Invalid schematic record length ${a}`,r);if(i+a>t.byteLength)throw new hh(`Schematic record at offset ${r} declares ${a} bytes with only ${t.byteLength-i} available`,r);const A=UXe(t.subarray(i,i+a),void 0,{byteOffset:r,recordIndex:n.length,streamPath:"/FileHeader"}),c=i+a<t.byteLength?`
`:"";A.terminator=c,n.push(A),i+=a}return n}function jXi(t,e={}){const n=e.maxFileSize??268435456;if(!Number.isSafeInteger(n)||n<=0)throw new RangeError("maxFileSize must be a positive safe integer");if(t.byteLength>n)throw new aA(`Altium file is ${t.byteLength} bytes, exceeding the ${n}-byte limit`);if(e.signal?.aborted)throw e.signal.reason??new DOMException("Parsing aborted","AbortError");const o=$qi(t,e);if(o.container==="cfb"){if(o.documentKind==="pcb-document")return{detection:o,document:U1n(t,e)};if(o.documentKind==="schematic-document")return{detection:o,document:jXe(t,e)};if(o.documentKind==="pcb-library"||o.documentKind==="schematic-library"||o.documentKind==="integrated-library"){if(e.allowUnknownCompoundFile)return{detection:o,document:Vee(t,e)};throw new dXe(`${o.documentKind} detection is supported, but semantic parsing is not yet fixture-verified`)}if(e.allowUnknownCompoundFile)return{detection:o,document:Vee(t,e)};throw new yI("Compound file is not a recognized Altium PCB or schematic document")}if(o.container==="zip"||o.container==="xml")throw new dXe(`${o.documentKind} detection is supported, but semantic parsing is not yet implemented`);if(o.documentKind==="pcb-library"||o.documentKind==="schematic-library"||o.documentKind==="integrated-library")throw new dXe(`${o.documentKind} detection is supported, but semantic parsing is not yet fixture-verified`);const i=SXe(t,e.encoding);if(o.documentKind==="project"){const r=y1n(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind==="output-job"){const r=kqi(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind==="workspace"){const r=Uqi(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind==="ini-document"){if(!e.allowUnknownIni&&o.documentKind==="ini-document")throw new yI("INI input is not a recognized Altium project, workspace, or output job");const r=Nqi(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind==="pcb-document"){const r=E1e(i.text,e).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind==="schematic-document")return{detection:o,document:jXe(t,e)};throw new yI("Text input is not a recognized Altium PCB or schematic document")}var LE=class{constructor(t=256,e=64*1024*1024){if(this.maximumLength=e,!Number.isSafeInteger(t)||t<0||!Number.isSafeInteger(e)||e<=0||t>e)throw new RangeError("Invalid binary writer capacity or limit");this.bytes=new Uint8Array(t),this.view=new DataView(this.bytes.buffer)}maximumLength;bytes;view;_length=0;get length(){return this._length}uint8(t){return this.ensure(1),this.view.setUint8(this._length,t),this._length++,this}int8(t){return this.ensure(1),this.view.setInt8(this._length,t),this._length++,this}uint16(t){return this.ensure(2),this.view.setUint16(this._length,t,!0),this._length+=2,this}int16(t){return this.ensure(2),this.view.setInt16(this._length,t,!0),this._length+=2,this}uint32(t){return this.ensure(4),this.view.setUint32(this._length,t,!0),this._length+=4,this}int32(t){return this.ensure(4),this.view.setInt32(this._length,t,!0),this._length+=4,this}float64(t){return this.ensure(8),this.view.setFloat64(this._length,t,!0),this._length+=8,this}writeBytes(t){return this.ensure(t.byteLength),this.bytes.set(t,this._length),this._length+=t.byteLength,this}uint32LengthPrefixedBytes(t){return this.uint32(t.byteLength).writeBytes(t)}pascalString(t,e="windows-1252"){const n=$Xi(t,e);if(n.byteLength>255)throw new RangeError("Pascal string exceeds 255 bytes");return this.uint8(n.byteLength).writeBytes(n)}guid(t){const e=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/iu.exec(t);if(!e)throw new TypeError("Invalid GUID");return this.uint32(Number.parseInt(e[1]??"",16)),this.uint16(Number.parseInt(e[2]??"",16)),this.uint16(Number.parseInt(e[3]??"",16)),this.writeBytes(Uint8Array.from(`${e[4]}${e[5]}`.match(/.{2}/gu)?.map(n=>Number.parseInt(n,16))??[]))}toUint8Array(){return this.bytes.slice(0,this._length)}ensure(t){const e=this._length+t;if(!Number.isSafeInteger(e)||e>this.maximumLength)throw new RangeError(`Binary output exceeds the ${this.maximumLength}-byte limit`);if(e<=this.bytes.byteLength)return;let n=Math.max(this.bytes.byteLength,1);for(;n<e;)if(n=Math.min(n*2,this.maximumLength),n<e&&n===this.maximumLength)throw new RangeError(`Binary output exceeds the ${this.maximumLength}-byte limit`);const o=new Uint8Array(n);o.set(this.bytes),this.bytes=o,this.view=new DataView(o.buffer)}};function $Xi(t,e){if(e==="utf-8")return new TextEncoder().encode(t);const n=[];for(const o of t){const i=o.codePointAt(0);if(i===void 0||i>255)throw new RangeError("Windows-1252 writer currently accepts only single-byte code points");n.push(i)}return Uint8Array.from(n)}var $Xe={exports:{}};const qXi=wit(xfn);var W1n;function XXi(){return W1n||(W1n=1,(function(t){var e={},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(Y){for(var W="",te=0,j=0,J=0,oe=0,ie=0,ne=0,le=0,ge=0;ge<Y.length;)te=Y.charCodeAt(ge++),oe=te>>2,j=Y.charCodeAt(ge++),ie=(te&3)<<4|j>>4,J=Y.charCodeAt(ge++),ne=(j&15)<<2|J>>6,le=J&63,isNaN(j)?ne=le=64:isNaN(J)&&(le=64),W+=n.charAt(oe)+n.charAt(ie)+n.charAt(ne)+n.charAt(le);return W}function i(Y){var W="",te=0,j=0,J=0,oe=0,ie=0,ne=0,le=0;Y=Y.replace(/[^\w\+\/\=]/g,"");for(var ge=0;ge<Y.length;)oe=n.indexOf(Y.charAt(ge++)),ie=n.indexOf(Y.charAt(ge++)),te=oe<<2|ie>>4,W+=String.fromCharCode(te),ne=n.indexOf(Y.charAt(ge++)),j=(ie&15)<<4|ne>>2,ne!==64&&(W+=String.fromCharCode(j)),le=n.indexOf(Y.charAt(ge++)),J=(ne&3)<<6|le,le!==64&&(W+=String.fromCharCode(J));return W}var r=(function(){return typeof Buffer<"u"&&typeof e<"u"&&typeof e.versions<"u"&&!!e.versions.node})(),s=(function(){if(typeof Buffer<"u"){var Y=!Buffer.from;if(!Y)try{Buffer.from("foo","utf8")}catch{Y=!0}return Y?function(W,te){return te?new Buffer(W,te):new Buffer(W)}:Buffer.from.bind(Buffer)}return function(){}})();function a(Y){if(r){if(Buffer.alloc)return Buffer.alloc(Y);var W=new Buffer(Y);return W.fill(0),W}return typeof Uint8Array<"u"?new Uint8Array(Y):new Array(Y)}function A(Y){return r?Buffer.allocUnsafe?Buffer.allocUnsafe(Y):new Buffer(Y):typeof Uint8Array<"u"?new Uint8Array(Y):new Array(Y)}var c=function(W){return r?s(W,"binary"):W.split("").map(function(te){return te.charCodeAt(0)&255})},l=/\u0000/g,u=/[\u0001-\u0006]/g,g=function(Y){for(var W=[],te=0;te<Y[0].length;++te)W.push.apply(W,Y[0][te]);return W},h=g,d=function(Y,W,te){for(var j=[],J=W;J<te;J+=2)j.push(String.fromCharCode(y(Y,J)));return j.join("").replace(l,"")},p=d,m=function(Y,W,te){for(var j=[],J=W;J<W+te;++J)j.push(("0"+Y[J].toString(16)).slice(-2));return j.join("")},_=m,f=function(Y){if(Array.isArray(Y[0]))return[].concat.apply([],Y);var W=0,te=0;for(te=0;te<Y.length;++te)W+=Y[te].length;var j=new Uint8Array(W);for(te=0,W=0;te<Y.length;W+=Y[te].length,++te)j.set(Y[te],W);return j},I=f;r&&(d=function(Y,W,te){return Buffer.isBuffer(Y)?Y.toString("utf16le",W,te).replace(l,""):p(Y,W,te)},m=function(Y,W,te){return Buffer.isBuffer(Y)?Y.toString("hex",W,W+te):_(Y,W,te)},g=function(Y){return Y[0].length>0&&Buffer.isBuffer(Y[0][0])?Buffer.concat(Y[0]):h(Y)},c=function(Y){return s(Y,"binary")},I=function(Y){return Buffer.isBuffer(Y[0])?Buffer.concat(Y):f(Y)});var C=function(Y,W){return Y[W]},y=function(Y,W){return Y[W+1]*256+Y[W]},x=function(Y,W){var te=Y[W+1]*256+Y[W];return te<32768?te:(65535-te+1)*-1},E=function(Y,W){return Y[W+3]*(1<<24)+(Y[W+2]<<16)+(Y[W+1]<<8)+Y[W]},B=function(Y,W){return(Y[W+3]<<24)+(Y[W+2]<<16)+(Y[W+1]<<8)+Y[W]};function S(Y,W){var te,j,J=0;switch(Y){case 1:te=C(this,this.l);break;case 2:te=(W!=="i"?y:x)(this,this.l);break;case 4:te=B(this,this.l);break;case 16:J=2,j=m(this,this.l,Y)}return this.l+=Y,J===0?te:j}var Q=function(Y,W,te){Y[te]=W&255,Y[te+1]=W>>>8&255,Y[te+2]=W>>>16&255,Y[te+3]=W>>>24&255},w=function(Y,W,te){Y[te]=W&255,Y[te+1]=W>>8&255,Y[te+2]=W>>16&255,Y[te+3]=W>>24&255};function M(Y,W,te){var j=0,J=0;switch(te){case"hex":for(;J<Y;++J)this[this.l++]=parseInt(W.slice(2*J,2*J+2),16)||0;return this;case"utf16le":var oe=this.l+Y;for(J=0;J<Math.min(W.length,Y);++J){var ie=W.charCodeAt(J);this[this.l++]=ie&255,this[this.l++]=ie>>8}for(;this.l<oe;)this[this.l++]=0;return this}switch(Y){case 1:j=1,this[this.l]=W&255;break;case 2:j=2,this[this.l]=W&255,W>>>=8,this[this.l+1]=W&255;break;case 4:j=4,Q(this,W,this.l);break;case-4:j=4,w(this,W,this.l);break}return this.l+=j,this}function k(Y,W){var te=m(this,this.l,Y.length>>1);if(te!==Y)throw new Error(W+"Expected "+Y+" saw "+te);this.l+=Y.length>>1}function R(Y,W){Y.l=W,Y.read_shift=S,Y.chk=k,Y.write_shift=M}function F(Y){var W=a(Y);return R(W,0),W}var O=(function(){var Y={};Y.version="1.2.1";function W(){for(var Ee=0,ke=new Array(256),Ce=0;Ce!=256;++Ce)Ee=Ce,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,Ee=Ee&1?-306674912^Ee>>>1:Ee>>>1,ke[Ce]=Ee;return typeof Int32Array<"u"?new Int32Array(ke):ke}var te=W();function j(Ee){var ke=0,Ce=0,Le=0,Ye=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(Le=0;Le!=256;++Le)Ye[Le]=Ee[Le];for(Le=0;Le!=256;++Le)for(Ce=Ee[Le],ke=256+Le;ke<4096;ke+=256)Ce=Ye[ke]=Ce>>>8^Ee[Ce&255];var tt=[];for(Le=1;Le!=16;++Le)tt[Le-1]=typeof Int32Array<"u"?Ye.subarray(Le*256,Le*256+256):Ye.slice(Le*256,Le*256+256);return tt}var J=j(te),oe=J[0],ie=J[1],ne=J[2],le=J[3],ge=J[4],_e=J[5],ue=J[6],fe=J[7],pe=J[8],ye=J[9],Me=J[10],ve=J[11],he=J[12],Qe=J[13],Pe=J[14];function we(Ee,ke){for(var Ce=ke^-1,Le=0,Ye=Ee.length;Le<Ye;)Ce=Ce>>>8^te[(Ce^Ee.charCodeAt(Le++))&255];return~Ce}function Te(Ee,ke){for(var Ce=ke^-1,Le=Ee.length-15,Ye=0;Ye<Le;)Ce=Pe[Ee[Ye++]^Ce&255]^Qe[Ee[Ye++]^Ce>>8&255]^he[Ee[Ye++]^Ce>>16&255]^ve[Ee[Ye++]^Ce>>>24]^Me[Ee[Ye++]]^ye[Ee[Ye++]]^pe[Ee[Ye++]]^fe[Ee[Ye++]]^ue[Ee[Ye++]]^_e[Ee[Ye++]]^ge[Ee[Ye++]]^le[Ee[Ye++]]^ne[Ee[Ye++]]^ie[Ee[Ye++]]^oe[Ee[Ye++]]^te[Ee[Ye++]];for(Le+=15;Ye<Le;)Ce=Ce>>>8^te[(Ce^Ee[Ye++])&255];return~Ce}function Re(Ee,ke){for(var Ce=ke^-1,Le=0,Ye=Ee.length,tt=0,At=0;Le<Ye;)tt=Ee.charCodeAt(Le++),tt<128?Ce=Ce>>>8^te[(Ce^tt)&255]:tt<2048?(Ce=Ce>>>8^te[(Ce^(192|tt>>6&31))&255],Ce=Ce>>>8^te[(Ce^(128|tt&63))&255]):tt>=55296&&tt<57344?(tt=(tt&1023)+64,At=Ee.charCodeAt(Le++)&1023,Ce=Ce>>>8^te[(Ce^(240|tt>>8&7))&255],Ce=Ce>>>8^te[(Ce^(128|tt>>2&63))&255],Ce=Ce>>>8^te[(Ce^(128|At>>6&15|(tt&3)<<4))&255],Ce=Ce>>>8^te[(Ce^(128|At&63))&255]):(Ce=Ce>>>8^te[(Ce^(224|tt>>12&15))&255],Ce=Ce>>>8^te[(Ce^(128|tt>>6&63))&255],Ce=Ce>>>8^te[(Ce^(128|tt&63))&255]);return~Ce}return Y.table=te,Y.bstr=we,Y.buf=Te,Y.str=Re,Y})(),U=(function(){var W={};W.version="1.2.2";function te(Et,Gt){for(var Rt=Et.split("/"),Ht=Gt.split("/"),Qt=0,Nt=0,_n=Math.min(Rt.length,Ht.length);Qt<_n;++Qt){if(Nt=Rt[Qt].length-Ht[Qt].length)return Nt;if(Rt[Qt]!=Ht[Qt])return Rt[Qt]<Ht[Qt]?-1:1}return Rt.length-Ht.length}function j(Et){if(Et.charAt(Et.length-1)=="/")return Et.slice(0,-1).indexOf("/")===-1?Et:j(Et.slice(0,-1));var Gt=Et.lastIndexOf("/");return Gt===-1?Et:Et.slice(0,Gt+1)}function J(Et){if(Et.charAt(Et.length-1)=="/")return J(Et.slice(0,-1));var Gt=Et.lastIndexOf("/");return Gt===-1?Et:Et.slice(Gt+1)}function oe(Et,Gt){typeof Gt=="string"&&(Gt=new Date(Gt));var Rt=Gt.getHours();Rt=Rt<<6|Gt.getMinutes(),Rt=Rt<<5|Gt.getSeconds()>>>1,Et.write_shift(2,Rt);var Ht=Gt.getFullYear()-1980;Ht=Ht<<4|Gt.getMonth()+1,Ht=Ht<<5|Gt.getDate(),Et.write_shift(2,Ht)}function ie(Et){var Gt=Et.read_shift(2)&65535,Rt=Et.read_shift(2)&65535,Ht=new Date,Qt=Rt&31;Rt>>>=5;var Nt=Rt&15;Rt>>>=4,Ht.setMilliseconds(0),Ht.setFullYear(Rt+1980),Ht.setMonth(Nt-1),Ht.setDate(Qt);var _n=Gt&31;Gt>>>=5;var qn=Gt&63;return Gt>>>=6,Ht.setHours(Gt),Ht.setMinutes(qn),Ht.setSeconds(_n<<1),Ht}function ne(Et){R(Et,0);for(var Gt={},Rt=0;Et.l<=Et.length-4;){var Ht=Et.read_shift(2),Qt=Et.read_shift(2),Nt=Et.l+Qt,_n={};Ht===21589&&(Rt=Et.read_shift(1),Rt&1&&(_n.mtime=Et.read_shift(4)),Qt>5&&(Rt&2&&(_n.atime=Et.read_shift(4)),Rt&4&&(_n.ctime=Et.read_shift(4))),_n.mtime&&(_n.mt=new Date(_n.mtime*1e3))),Et.l=Nt,Gt[Ht]=_n}return Gt}var le;function ge(){return le||(le=qXi)}function _e(Et,Gt){if(Et[0]==80&&Et[1]==75)return Ro(Et,Gt);if((Et[0]|32)==109&&(Et[1]|32)==105)return Rs(Et,Gt);if(Et.length<512)throw new Error("CFB file size "+Et.length+" < 512");var Rt=3,Ht=512,Qt=0,Nt=0,_n=0,qn=0,En=0,Rn=[],Hn=Et.slice(0,512);R(Hn,0);var Lo=ue(Hn);switch(Rt=Lo[0],Rt){case 3:Ht=512;break;case 4:Ht=4096;break;case 0:if(Lo[1]==0)return Ro(Et,Gt);default:throw new Error("Major Version: Expected 3 or 4 saw "+Rt)}Ht!==512&&(Hn=Et.slice(0,Ht),R(Hn,28));var Io=Et.slice(0,Ht);fe(Hn,Rt);var gi=Hn.read_shift(4,"i");if(Rt===3&&gi!==0)throw new Error("# Directory Sectors: Expected 0 saw "+gi);Hn.l+=4,_n=Hn.read_shift(4,"i"),Hn.l+=4,Hn.chk("00100000","Mini Stream Cutoff Size: "),qn=Hn.read_shift(4,"i"),Qt=Hn.read_shift(4,"i"),En=Hn.read_shift(4,"i"),Nt=Hn.read_shift(4,"i");for(var jo=-1,oi=0;oi<109&&(jo=Hn.read_shift(4,"i"),!(jo<0));++oi)Rn[oi]=jo;var Ji=pe(Et,Ht);ve(En,Nt,Ji,Ht,Rn);var wi=Qe(Ji,_n,Rn,Ht);wi[_n].name="!Directory",Qt>0&&qn!==At&&(wi[qn].name="!MiniFAT"),wi[Rn[0]].name="!FAT",wi.fat_addrs=Rn,wi.ssz=Ht;var Br={},gr=[],oa=[],hs=[];Pe(_n,wi,Ji,gr,Qt,Br,oa,qn),ye(oa,hs,gr),gr.shift();var Li={FileIndex:oa,FullPaths:hs};return Gt&&Gt.raw&&(Li.raw={header:Io,sectors:Ji}),Li}function ue(Et){if(Et[Et.l]==80&&Et[Et.l+1]==75)return[0,0];Et.chk(at,"Header Signature: "),Et.l+=16;var Gt=Et.read_shift(2,"u");return[Et.read_shift(2,"u"),Gt]}function fe(Et,Gt){var Rt=9;switch(Et.l+=2,Rt=Et.read_shift(2)){case 9:if(Gt!=3)throw new Error("Sector Shift: Expected 9 saw "+Rt);break;case 12:if(Gt!=4)throw new Error("Sector Shift: Expected 12 saw "+Rt);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+Rt)}Et.chk("0600","Mini Sector Shift: "),Et.chk("000000000000","Reserved: ")}function pe(Et,Gt){for(var Rt=Math.ceil(Et.length/Gt)-1,Ht=[],Qt=1;Qt<Rt;++Qt)Ht[Qt-1]=Et.slice(Qt*Gt,(Qt+1)*Gt);return Ht[Rt-1]=Et.slice(Rt*Gt),Ht}function ye(Et,Gt,Rt){for(var Ht=0,Qt=0,Nt=0,_n=0,qn=0,En=Rt.length,Rn=[],Hn=[];Ht<En;++Ht)Rn[Ht]=Hn[Ht]=Ht,Gt[Ht]=Rt[Ht];for(;qn<Hn.length;++qn)Ht=Hn[qn],Qt=Et[Ht].L,Nt=Et[Ht].R,_n=Et[Ht].C,Rn[Ht]===Ht&&(Qt!==-1&&Rn[Qt]!==Qt&&(Rn[Ht]=Rn[Qt]),Nt!==-1&&Rn[Nt]!==Nt&&(Rn[Ht]=Rn[Nt])),_n!==-1&&(Rn[_n]=Ht),Qt!==-1&&Ht!=Rn[Ht]&&(Rn[Qt]=Rn[Ht],Hn.lastIndexOf(Qt)<qn&&Hn.push(Qt)),Nt!==-1&&Ht!=Rn[Ht]&&(Rn[Nt]=Rn[Ht],Hn.lastIndexOf(Nt)<qn&&Hn.push(Nt));for(Ht=1;Ht<En;++Ht)Rn[Ht]===Ht&&(Nt!==-1&&Rn[Nt]!==Nt?Rn[Ht]=Rn[Nt]:Qt!==-1&&Rn[Qt]!==Qt&&(Rn[Ht]=Rn[Qt]));for(Ht=1;Ht<En;++Ht)if(Et[Ht].type!==0){if(qn=Ht,qn!=Rn[qn])do qn=Rn[qn],Gt[Ht]=Gt[qn]+"/"+Gt[Ht];while(qn!==0&&Rn[qn]!==-1&&qn!=Rn[qn]);Rn[Ht]=-1}for(Gt[0]+="/",Ht=1;Ht<En;++Ht)Et[Ht].type!==2&&(Gt[Ht]+="/")}function Me(Et,Gt,Rt){for(var Ht=Et.start,Qt=Et.size,Nt=[],_n=Ht;Rt&&Qt>0&&_n>=0;)Nt.push(Gt.slice(_n*tt,_n*tt+tt)),Qt-=tt,_n=B(Rt,_n*4);return Nt.length===0?F(0):I(Nt).slice(0,Et.size)}function ve(Et,Gt,Rt,Ht,Qt){var Nt=At;if(Et===At){if(Gt!==0)throw new Error("DIFAT chain shorter than expected")}else if(Et!==-1){var _n=Rt[Et],qn=(Ht>>>2)-1;if(!_n)return;for(var En=0;En<qn&&(Nt=B(_n,En*4))!==At;++En)Qt.push(Nt);Gt>=1&&ve(B(_n,Ht-4),Gt-1,Rt,Ht,Qt)}}function he(Et,Gt,Rt,Ht,Qt){var Nt=[],_n=[];Qt||(Qt=[]);var qn=Ht-1,En=0,Rn=0;for(En=Gt;En>=0;){Qt[En]=!0,Nt[Nt.length]=En,_n.push(Et[En]);var Hn=Rt[Math.floor(En*4/Ht)];if(Rn=En*4&qn,Ht<4+Rn)throw new Error("FAT boundary crossed: "+En+" 4 "+Ht);if(!Et[Hn])break;En=B(Et[Hn],Rn)}return{nodes:Nt,data:g([_n])}}function Qe(Et,Gt,Rt,Ht){var Qt=Et.length,Nt=[],_n=[],qn=[],En=[],Rn=Ht-1,Hn=0,Lo=0,Io=0,gi=0;for(Hn=0;Hn<Qt;++Hn)if(qn=[],Io=Hn+Gt,Io>=Qt&&(Io-=Qt),!_n[Io]){En=[];var jo=[];for(Lo=Io;Lo>=0;){jo[Lo]=!0,_n[Lo]=!0,qn[qn.length]=Lo,En.push(Et[Lo]);var oi=Rt[Math.floor(Lo*4/Ht)];if(gi=Lo*4&Rn,Ht<4+gi)throw new Error("FAT boundary crossed: "+Lo+" 4 "+Ht);if(!Et[oi]||(Lo=B(Et[oi],gi),jo[Lo]))break}Nt[Io]={nodes:qn,data:g([En])}}return Nt}function Pe(Et,Gt,Rt,Ht,Qt,Nt,_n,qn){for(var En=0,Rn=Ht.length?2:0,Hn=Gt[Et].data,Lo=0,Io=0,gi;Lo<Hn.length;Lo+=128){var jo=Hn.slice(Lo,Lo+128);R(jo,64),Io=jo.read_shift(2),gi=d(jo,0,Io-Rn),Ht.push(gi);var oi={name:gi,type:jo.read_shift(1),color:jo.read_shift(1),L:jo.read_shift(4,"i"),R:jo.read_shift(4,"i"),C:jo.read_shift(4,"i"),clsid:jo.read_shift(16),state:jo.read_shift(4,"i"),start:0,size:0},Ji=jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2);Ji!==0&&(oi.ct=we(jo,jo.l-8));var wi=jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2);wi!==0&&(oi.mt=we(jo,jo.l-8)),oi.start=jo.read_shift(4,"i"),oi.size=jo.read_shift(4,"i"),oi.size<0&&oi.start<0&&(oi.size=oi.type=0,oi.start=At,oi.name=""),oi.type===5?(En=oi.start,Qt>0&&En!==At&&(Gt[En].name="!StreamData")):oi.size>=4096?(oi.storage="fat",Gt[oi.start]===void 0&&(Gt[oi.start]=he(Rt,oi.start,Gt.fat_addrs,Gt.ssz)),Gt[oi.start].name=oi.name,oi.content=Gt[oi.start].data.slice(0,oi.size)):(oi.storage="minifat",oi.size<0?oi.size=0:En!==At&&oi.start!==At&&Gt[En]&&(oi.content=Me(oi,Gt[En].data,(Gt[qn]||{}).data))),oi.content&&R(oi.content,0),Nt[gi]=oi,_n.push(oi)}}function we(Et,Gt){return new Date((E(Et,Gt+4)/1e7*Math.pow(2,32)+E(Et,Gt)/1e7-11644473600)*1e3)}function Te(Et,Gt){return ge(),_e(le.readFileSync(Et),Gt)}function Re(Et,Gt){var Rt=Gt&&Gt.type;switch(Rt||r&&Buffer.isBuffer(Et)&&(Rt="buffer"),Rt||"base64"){case"file":return Te(Et,Gt);case"base64":return _e(c(i(Et)),Gt);case"binary":return _e(c(Et),Gt)}return _e(Et,Gt)}function Ee(Et,Gt){var Rt=Gt||{},Ht=Rt.root||"Root Entry";if(Et.FullPaths||(Et.FullPaths=[]),Et.FileIndex||(Et.FileIndex=[]),Et.FullPaths.length!==Et.FileIndex.length)throw new Error("inconsistent CFB structure");Et.FullPaths.length===0&&(Et.FullPaths[0]=Ht+"/",Et.FileIndex[0]={name:Ht,type:5}),Rt.CLSID&&(Et.FileIndex[0].clsid=Rt.CLSID),ke(Et)}function ke(Et){var Gt="Sh33tJ5";if(!U.find(Et,"/"+Gt)){var Rt=F(4);Rt[0]=55,Rt[1]=Rt[3]=50,Rt[2]=54,Et.FileIndex.push({name:Gt,type:2,content:Rt,size:4,L:69,R:69,C:69}),Et.FullPaths.push(Et.FullPaths[0]+Gt),Ce(Et)}}function Ce(Et,Gt){Ee(Et);for(var Rt=!1,Ht=!1,Qt=Et.FullPaths.length-1;Qt>=0;--Qt){var Nt=Et.FileIndex[Qt];switch(Nt.type){case 0:Ht?Rt=!0:(Et.FileIndex.pop(),Et.FullPaths.pop());break;case 1:case 2:case 5:Ht=!0,isNaN(Nt.R*Nt.L*Nt.C)&&(Rt=!0),Nt.R>-1&&Nt.L>-1&&Nt.R==Nt.L&&(Rt=!0);break;default:Rt=!0;break}}if(!(!Rt&&!Gt)){var _n=new Date(1987,1,19),qn=0,En=Object.create?Object.create(null):{},Rn=[];for(Qt=0;Qt<Et.FullPaths.length;++Qt)En[Et.FullPaths[Qt]]=!0,Et.FileIndex[Qt].type!==0&&Rn.push([Et.FullPaths[Qt],Et.FileIndex[Qt]]);for(Qt=0;Qt<Rn.length;++Qt){var Hn=j(Rn[Qt][0]);for(Ht=En[Hn];!Ht;){for(;j(Hn)&&!En[j(Hn)];)Hn=j(Hn);Rn.push([Hn,{name:J(Hn).replace("/",""),type:1,clsid:gt,ct:_n,mt:_n,content:null}]),En[Hn]=!0,Hn=j(Rn[Qt][0]),Ht=En[Hn]}}for(Rn.sort(function(gi,jo){return te(gi[0],jo[0])}),Et.FullPaths=[],Et.FileIndex=[],Qt=0;Qt<Rn.length;++Qt)Et.FullPaths[Qt]=Rn[Qt][0],Et.FileIndex[Qt]=Rn[Qt][1];for(Qt=0;Qt<Rn.length;++Qt){var Lo=Et.FileIndex[Qt],Io=Et.FullPaths[Qt];if(Lo.name=J(Io).replace("/",""),Lo.L=Lo.R=Lo.C=-(Lo.color=1),Lo.size=Lo.content?Lo.content.length:0,Lo.start=0,Lo.clsid=Lo.clsid||gt,Qt===0)Lo.C=Rn.length>1?1:-1,Lo.size=0,Lo.type=5;else if(Io.slice(-1)=="/"){for(qn=Qt+1;qn<Rn.length&&j(Et.FullPaths[qn])!=Io;++qn);for(Lo.C=qn>=Rn.length?-1:qn,qn=Qt+1;qn<Rn.length&&j(Et.FullPaths[qn])!=j(Io);++qn);Lo.R=qn>=Rn.length?-1:qn,Lo.type=1}else j(Et.FullPaths[Qt+1]||"")==j(Io)&&(Lo.R=Qt+1),Lo.type=2}}}function Le(Et,Gt){var Rt=Gt||{};if(Rt.fileType=="mad")return ur(Et,Rt);if(Ce(Et),Rt.fileType==="zip")return uo(Et,Rt);var Ht=(function(gi){for(var jo=0,oi=0,Ji=0;Ji<gi.FileIndex.length;++Ji){var wi=gi.FileIndex[Ji];if(wi.content){var Br=wi.content.length;Br>0&&(Br<4096?jo+=Br+63>>6:oi+=Br+511>>9)}}for(var gr=gi.FullPaths.length+3>>2,oa=jo+7>>3,hs=jo+127>>7,Li=oa+oi+gr+hs,ys=Li+127>>7,dr=ys<=109?0:Math.ceil((ys-109)/127);Li+ys+dr+127>>7>ys;)dr=++ys<=109?0:Math.ceil((ys-109)/127);var cA=[1,dr,ys,hs,gr,oi,jo,0];return gi.FileIndex[0].size=jo<<6,cA[7]=(gi.FileIndex[0].start=cA[0]+cA[1]+cA[2]+cA[3]+cA[4]+cA[5])+(cA[6]+7>>3),cA})(Et),Qt=F(Ht[7]<<9),Nt=0,_n=0;{for(Nt=0;Nt<8;++Nt)Qt.write_shift(1,nt[Nt]);for(Nt=0;Nt<8;++Nt)Qt.write_shift(2,0);for(Qt.write_shift(2,62),Qt.write_shift(2,3),Qt.write_shift(2,65534),Qt.write_shift(2,9),Qt.write_shift(2,6),Nt=0;Nt<3;++Nt)Qt.write_shift(2,0);for(Qt.write_shift(4,0),Qt.write_shift(4,Ht[2]),Qt.write_shift(4,Ht[0]+Ht[1]+Ht[2]+Ht[3]-1),Qt.write_shift(4,0),Qt.write_shift(4,4096),Qt.write_shift(4,Ht[3]?Ht[0]+Ht[1]+Ht[2]-1:At),Qt.write_shift(4,Ht[3]),Qt.write_shift(-4,Ht[1]?Ht[0]-1:At),Qt.write_shift(4,Ht[1]),Nt=0;Nt<109;++Nt)Qt.write_shift(-4,Nt<Ht[2]?Ht[1]+Nt:-1)}if(Ht[1])for(_n=0;_n<Ht[1];++_n){for(;Nt<236+_n*127;++Nt)Qt.write_shift(-4,Nt<Ht[2]?Ht[1]+Nt:-1);Qt.write_shift(-4,_n===Ht[1]-1?At:_n+1)}var qn=function(gi){for(_n+=gi;Nt<_n-1;++Nt)Qt.write_shift(-4,Nt+1);gi&&(++Nt,Qt.write_shift(-4,At))};for(_n=Nt=0,_n+=Ht[1];Nt<_n;++Nt)Qt.write_shift(-4,bt.DIFSECT);for(_n+=Ht[2];Nt<_n;++Nt)Qt.write_shift(-4,bt.FATSECT);qn(Ht[3]),qn(Ht[4]);for(var En=0,Rn=0,Hn=Et.FileIndex[0];En<Et.FileIndex.length;++En)Hn=Et.FileIndex[En],Hn.content&&(Rn=Hn.content.length,!(Rn<4096)&&(Hn.start=_n,qn(Rn+511>>9)));for(qn(Ht[6]+7>>3);Qt.l&511;)Qt.write_shift(-4,bt.ENDOFCHAIN);for(_n=Nt=0,En=0;En<Et.FileIndex.length;++En)Hn=Et.FileIndex[En],Hn.content&&(Rn=Hn.content.length,!(!Rn||Rn>=4096)&&(Hn.start=_n,qn(Rn+63>>6)));for(;Qt.l&511;)Qt.write_shift(-4,bt.ENDOFCHAIN);for(Nt=0;Nt<Ht[4]<<2;++Nt){var Lo=Et.FullPaths[Nt];if(!Lo||Lo.length===0){for(En=0;En<17;++En)Qt.write_shift(4,0);for(En=0;En<3;++En)Qt.write_shift(4,-1);for(En=0;En<12;++En)Qt.write_shift(4,0);continue}Hn=Et.FileIndex[Nt],Nt===0&&(Hn.start=Hn.size?Hn.start-1:At);var Io=Nt===0&&Rt.root||Hn.name;if(Io.length>32&&(console.error("Name "+Io+" will be truncated to "+Io.slice(0,32)),Io=Io.slice(0,32)),Rn=2*(Io.length+1),Qt.write_shift(64,Io,"utf16le"),Qt.write_shift(2,Rn),Qt.write_shift(1,Hn.type),Qt.write_shift(1,Hn.color),Qt.write_shift(-4,Hn.L),Qt.write_shift(-4,Hn.R),Qt.write_shift(-4,Hn.C),Hn.clsid)Qt.write_shift(16,Hn.clsid,"hex");else for(En=0;En<4;++En)Qt.write_shift(4,0);Qt.write_shift(4,Hn.state||0),Qt.write_shift(4,0),Qt.write_shift(4,0),Qt.write_shift(4,0),Qt.write_shift(4,0),Qt.write_shift(4,Hn.start),Qt.write_shift(4,Hn.size),Qt.write_shift(4,0)}for(Nt=1;Nt<Et.FileIndex.length;++Nt)if(Hn=Et.FileIndex[Nt],Hn.size>=4096)if(Qt.l=Hn.start+1<<9,r&&Buffer.isBuffer(Hn.content))Hn.content.copy(Qt,Qt.l,0,Hn.size),Qt.l+=Hn.size+511&-512;else{for(En=0;En<Hn.size;++En)Qt.write_shift(1,Hn.content[En]);for(;En&511;++En)Qt.write_shift(1,0)}for(Nt=1;Nt<Et.FileIndex.length;++Nt)if(Hn=Et.FileIndex[Nt],Hn.size>0&&Hn.size<4096)if(r&&Buffer.isBuffer(Hn.content))Hn.content.copy(Qt,Qt.l,0,Hn.size),Qt.l+=Hn.size+63&-64;else{for(En=0;En<Hn.size;++En)Qt.write_shift(1,Hn.content[En]);for(;En&63;++En)Qt.write_shift(1,0)}if(r)Qt.l=Qt.length;else for(;Qt.l<Qt.length;)Qt.write_shift(1,0);return Qt}function Ye(Et,Gt){var Rt=Et.FullPaths.map(function(En){return En.toUpperCase()}),Ht=Rt.map(function(En){var Rn=En.split("/");return Rn[Rn.length-(En.slice(-1)=="/"?2:1)]}),Qt=!1;Gt.charCodeAt(0)===47?(Qt=!0,Gt=Rt[0].slice(0,-1)+Gt):Qt=Gt.indexOf("/")!==-1;var Nt=Gt.toUpperCase(),_n=Qt===!0?Rt.indexOf(Nt):Ht.indexOf(Nt);if(_n!==-1)return Et.FileIndex[_n];var qn=!Nt.match(u);for(Nt=Nt.replace(l,""),qn&&(Nt=Nt.replace(u,"!")),_n=0;_n<Rt.length;++_n)if((qn?Rt[_n].replace(u,"!"):Rt[_n]).replace(l,"")==Nt||(qn?Ht[_n].replace(u,"!"):Ht[_n]).replace(l,"")==Nt)return Et.FileIndex[_n];return null}var tt=64,At=-2,at="d0cf11e0a1b11ae1",nt=[208,207,17,224,161,177,26,225],gt="00000000000000000000000000000000",bt={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:At,FREESECT:-1,HEADER_SIGNATURE:at,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:gt,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function Ct(Et,Gt,Rt){ge();var Ht=Le(Et,Rt);le.writeFileSync(Gt,Ht)}function Dt(Et){for(var Gt=new Array(Et.length),Rt=0;Rt<Et.length;++Rt)Gt[Rt]=String.fromCharCode(Et[Rt]);return Gt.join("")}function kt(Et,Gt){var Rt=Le(Et,Gt);switch(Gt&&Gt.type||"buffer"){case"file":return ge(),le.writeFileSync(Gt.filename,Rt),Rt;case"binary":return typeof Rt=="string"?Rt:Dt(Rt);case"base64":return o(typeof Rt=="string"?Rt:Dt(Rt));case"buffer":if(r)return Buffer.isBuffer(Rt)?Rt:s(Rt);case"array":return typeof Rt=="string"?c(Rt):Rt}return Rt}var it;function Yt(Et){try{var Gt=Et.InflateRaw,Rt=new Gt;if(Rt._processChunk(new Uint8Array([3,0]),Rt._finishFlushFlag),Rt.bytesRead)it=Et;else throw new Error("zlib does not expose bytesRead")}catch(Ht){console.error("cannot use native zlib: "+(Ht.message||Ht))}}function pn(Et,Gt){if(!it)return To(Et,Gt);var Rt=it.InflateRaw,Ht=new Rt,Qt=Ht._processChunk(Et.slice(Et.l),Ht._finishFlushFlag);return Et.l+=Ht.bytesRead,Qt}function be(Et){return it?it.deflateRawSync(Et):qt(Et)}var et=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],It=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],Bt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function mt(Et){var Gt=(Et<<1|Et<<11)&139536|(Et<<5|Et<<15)&558144;return(Gt>>16|Gt>>8|Gt)&255}for(var st=typeof Uint8Array<"u",xt=st?new Uint8Array(256):[],Xe=0;Xe<256;++Xe)xt[Xe]=mt(Xe);function Ze(Et,Gt){var Rt=xt[Et&255];return Gt<=8?Rt>>>8-Gt:(Rt=Rt<<8|xt[Et>>8&255],Gt<=16?Rt>>>16-Gt:(Rt=Rt<<8|xt[Et>>16&255],Rt>>>24-Gt))}function dt(Et,Gt){var Rt=Gt&7,Ht=Gt>>>3;return(Et[Ht]|(Rt<=6?0:Et[Ht+1]<<8))>>>Rt&3}function Ut(Et,Gt){var Rt=Gt&7,Ht=Gt>>>3;return(Et[Ht]|(Rt<=5?0:Et[Ht+1]<<8))>>>Rt&7}function Wt(Et,Gt){var Rt=Gt&7,Ht=Gt>>>3;return(Et[Ht]|(Rt<=4?0:Et[Ht+1]<<8))>>>Rt&15}function Xt(Et,Gt){var Rt=Gt&7,Ht=Gt>>>3;return(Et[Ht]|(Rt<=3?0:Et[Ht+1]<<8))>>>Rt&31}function Jt(Et,Gt){var Rt=Gt&7,Ht=Gt>>>3;return(Et[Ht]|(Rt<=1?0:Et[Ht+1]<<8))>>>Rt&127}function yn(Et,Gt,Rt){var Ht=Gt&7,Qt=Gt>>>3,Nt=(1<<Rt)-1,_n=Et[Qt]>>>Ht;return Rt<8-Ht||(_n|=Et[Qt+1]<<8-Ht,Rt<16-Ht)||(_n|=Et[Qt+2]<<16-Ht,Rt<24-Ht)||(_n|=Et[Qt+3]<<24-Ht),_n&Nt}function An(Et,Gt,Rt){var Ht=Gt&7,Qt=Gt>>>3;return Ht<=5?Et[Qt]|=(Rt&7)<<Ht:(Et[Qt]|=Rt<<Ht&255,Et[Qt+1]=(Rt&7)>>8-Ht),Gt+3}function kn(Et,Gt,Rt){var Ht=Gt&7,Qt=Gt>>>3;return Rt=(Rt&1)<<Ht,Et[Qt]|=Rt,Gt+1}function $n(Et,Gt,Rt){var Ht=Gt&7,Qt=Gt>>>3;return Rt<<=Ht,Et[Qt]|=Rt&255,Rt>>>=8,Et[Qt+1]=Rt,Gt+8}function ht(Et,Gt,Rt){var Ht=Gt&7,Qt=Gt>>>3;return Rt<<=Ht,Et[Qt]|=Rt&255,Rt>>>=8,Et[Qt+1]=Rt&255,Et[Qt+2]=Rt>>>8,Gt+16}function Kt(Et,Gt){var Rt=Et.length,Ht=2*Rt>Gt?2*Rt:Gt+5,Qt=0;if(Rt>=Gt)return Et;if(r){var Nt=A(Ht);if(Et.copy)Et.copy(Nt);else for(;Qt<Et.length;++Qt)Nt[Qt]=Et[Qt];return Nt}else if(st){var _n=new Uint8Array(Ht);if(_n.set)_n.set(Et);else for(;Qt<Rt;++Qt)_n[Qt]=Et[Qt];return _n}return Et.length=Ht,Et}function rn(Et){for(var Gt=new Array(Et),Rt=0;Rt<Et;++Rt)Gt[Rt]=0;return Gt}function Lt(Et,Gt,Rt){var Ht=1,Qt=0,Nt=0,_n=0,qn=0,En=Et.length,Rn=st?new Uint16Array(32):rn(32);for(Nt=0;Nt<32;++Nt)Rn[Nt]=0;for(Nt=En;Nt<Rt;++Nt)Et[Nt]=0;En=Et.length;var Hn=st?new Uint16Array(En):rn(En);for(Nt=0;Nt<En;++Nt)Rn[Qt=Et[Nt]]++,Ht<Qt&&(Ht=Qt),Hn[Nt]=0;for(Rn[0]=0,Nt=1;Nt<=Ht;++Nt)Rn[Nt+16]=qn=qn+Rn[Nt-1]<<1;for(Nt=0;Nt<En;++Nt)qn=Et[Nt],qn!=0&&(Hn[Nt]=Rn[qn+16]++);var Lo=0;for(Nt=0;Nt<En;++Nt)if(Lo=Et[Nt],Lo!=0)for(qn=Ze(Hn[Nt],Ht)>>Ht-Lo,_n=(1<<Ht+4-Lo)-1;_n>=0;--_n)Gt[qn|_n<<Lo]=Lo&15|Nt<<4;return Ht}var Ho=st?new Uint16Array(512):rn(512),Ao=st?new Uint16Array(32):rn(32);if(!st){for(var qe=0;qe<512;++qe)Ho[qe]=0;for(qe=0;qe<32;++qe)Ao[qe]=0}(function(){for(var Et=[],Gt=0;Gt<32;Gt++)Et.push(5);Lt(Et,Ao,32);var Rt=[];for(Gt=0;Gt<=143;Gt++)Rt.push(8);for(;Gt<=255;Gt++)Rt.push(9);for(;Gt<=279;Gt++)Rt.push(7);for(;Gt<=287;Gt++)Rt.push(8);Lt(Rt,Ho,288)})();var vt=(function(){for(var Gt=st?new Uint8Array(32768):[],Rt=0,Ht=0;Rt<Bt.length-1;++Rt)for(;Ht<Bt[Rt+1];++Ht)Gt[Ht]=Rt;for(;Ht<32768;++Ht)Gt[Ht]=29;var Qt=st?new Uint8Array(259):[];for(Rt=0,Ht=0;Rt<It.length-1;++Rt)for(;Ht<It[Rt+1];++Ht)Qt[Ht]=Rt;function Nt(qn,En){for(var Rn=0;Rn<qn.length;){var Hn=Math.min(65535,qn.length-Rn),Lo=Rn+Hn==qn.length;for(En.write_shift(1,+Lo),En.write_shift(2,Hn),En.write_shift(2,~Hn&65535);Hn-- >0;)En[En.l++]=qn[Rn++]}return En.l}function _n(qn,En){for(var Rn=0,Hn=0,Lo=st?new Uint16Array(32768):[];Hn<qn.length;){var Io=Math.min(65535,qn.length-Hn);if(Io<10){for(Rn=An(En,Rn,+(Hn+Io==qn.length)),Rn&7&&(Rn+=8-(Rn&7)),En.l=Rn/8|0,En.write_shift(2,Io),En.write_shift(2,~Io&65535);Io-- >0;)En[En.l++]=qn[Hn++];Rn=En.l*8;continue}Rn=An(En,Rn,+(Hn+Io==qn.length)+2);for(var gi=0;Io-- >0;){var jo=qn[Hn];gi=(gi<<5^jo)&32767;var oi=-1,Ji=0;if((oi=Lo[gi])&&(oi|=Hn&-32768,oi>Hn&&(oi-=32768),oi<Hn))for(;qn[oi+Ji]==qn[Hn+Ji]&&Ji<250;)++Ji;if(Ji>2){jo=Qt[Ji],jo<=22?Rn=$n(En,Rn,xt[jo+1]>>1)-1:($n(En,Rn,3),Rn+=5,$n(En,Rn,xt[jo-23]>>5),Rn+=3);var wi=jo<8?0:jo-4>>2;wi>0&&(ht(En,Rn,Ji-It[jo]),Rn+=wi),jo=Gt[Hn-oi],Rn=$n(En,Rn,xt[jo]>>3),Rn-=3;var Br=jo<4?0:jo-2>>1;Br>0&&(ht(En,Rn,Hn-oi-Bt[jo]),Rn+=Br);for(var gr=0;gr<Ji;++gr)Lo[gi]=Hn&32767,gi=(gi<<5^qn[Hn])&32767,++Hn;Io-=Ji-1}else jo<=143?jo=jo+48:Rn=kn(En,Rn,1),Rn=$n(En,Rn,xt[jo]),Lo[gi]=Hn&32767,++Hn}Rn=$n(En,Rn,0)-1}return En.l=(Rn+7)/8|0,En.l}return function(En,Rn){return En.length<8?Nt(En,Rn):_n(En,Rn)}})();function qt(Et){var Gt=F(50+Math.floor(Et.length*1.1)),Rt=vt(Et,Gt);return Gt.slice(0,Rt)}var Zt=st?new Uint16Array(32768):rn(32768),nn=st?new Uint16Array(32768):rn(32768),zn=st?new Uint16Array(128):rn(128),Nn=1,Co=1;function ei(Et,Gt){var Rt=Xt(Et,Gt)+257;Gt+=5;var Ht=Xt(Et,Gt)+1;Gt+=5;var Qt=Wt(Et,Gt)+4;Gt+=4;for(var Nt=0,_n=st?new Uint8Array(19):rn(19),qn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],En=1,Rn=st?new Uint8Array(8):rn(8),Hn=st?new Uint8Array(8):rn(8),Lo=_n.length,Io=0;Io<Qt;++Io)_n[et[Io]]=Nt=Ut(Et,Gt),En<Nt&&(En=Nt),Rn[Nt]++,Gt+=3;var gi=0;for(Rn[0]=0,Io=1;Io<=En;++Io)Hn[Io]=gi=gi+Rn[Io-1]<<1;for(Io=0;Io<Lo;++Io)(gi=_n[Io])!=0&&(qn[Io]=Hn[gi]++);var jo=0;for(Io=0;Io<Lo;++Io)if(jo=_n[Io],jo!=0){gi=xt[qn[Io]]>>8-jo;for(var oi=(1<<7-jo)-1;oi>=0;--oi)zn[gi|oi<<jo]=jo&7|Io<<3}var Ji=[];for(En=1;Ji.length<Rt+Ht;)switch(gi=zn[Jt(Et,Gt)],Gt+=gi&7,gi>>>=3){case 16:for(Nt=3+dt(Et,Gt),Gt+=2,gi=Ji[Ji.length-1];Nt-- >0;)Ji.push(gi);break;case 17:for(Nt=3+Ut(Et,Gt),Gt+=3;Nt-- >0;)Ji.push(0);break;case 18:for(Nt=11+Jt(Et,Gt),Gt+=7;Nt-- >0;)Ji.push(0);break;default:Ji.push(gi),En<gi&&(En=gi);break}var wi=Ji.slice(0,Rt),Br=Ji.slice(Rt);for(Io=Rt;Io<286;++Io)wi[Io]=0;for(Io=Ht;Io<30;++Io)Br[Io]=0;return Nn=Lt(wi,Zt,286),Co=Lt(Br,nn,30),Gt}function ro(Et,Gt){if(Et[0]==3&&!(Et[1]&3))return[a(Gt),2];for(var Rt=0,Ht=0,Qt=A(Gt||1<<18),Nt=0,_n=Qt.length>>>0,qn=0,En=0;(Ht&1)==0;){if(Ht=Ut(Et,Rt),Rt+=3,Ht>>>1)Ht>>1==1?(qn=9,En=5):(Rt=ei(Et,Rt),qn=Nn,En=Co);else{Rt&7&&(Rt+=8-(Rt&7));var Rn=Et[Rt>>>3]|Et[(Rt>>>3)+1]<<8;if(Rt+=32,Rn>0)for(!Gt&&_n<Nt+Rn&&(Qt=Kt(Qt,Nt+Rn),_n=Qt.length);Rn-- >0;)Qt[Nt++]=Et[Rt>>>3],Rt+=8;continue}for(;;){!Gt&&_n<Nt+32767&&(Qt=Kt(Qt,Nt+32767),_n=Qt.length);var Hn=yn(Et,Rt,qn),Lo=Ht>>>1==1?Ho[Hn]:Zt[Hn];if(Rt+=Lo&15,Lo>>>=4,(Lo>>>8&255)===0)Qt[Nt++]=Lo;else{if(Lo==256)break;Lo-=257;var Io=Lo<8?0:Lo-4>>2;Io>5&&(Io=0);var gi=Nt+It[Lo];Io>0&&(gi+=yn(Et,Rt,Io),Rt+=Io),Hn=yn(Et,Rt,En),Lo=Ht>>>1==1?Ao[Hn]:nn[Hn],Rt+=Lo&15,Lo>>>=4;var jo=Lo<4?0:Lo-2>>1,oi=Bt[Lo];for(jo>0&&(oi+=yn(Et,Rt,jo),Rt+=jo),!Gt&&_n<gi&&(Qt=Kt(Qt,gi+100),_n=Qt.length);Nt<gi;)Qt[Nt]=Qt[Nt-oi],++Nt}}}return Gt?[Qt,Rt+7>>>3]:[Qt.slice(0,Nt),Rt+7>>>3]}function To(Et,Gt){var Rt=Et.slice(Et.l||0),Ht=ro(Rt,Gt);return Et.l+=Ht[1],Ht[0]}function yo(Et,Gt){if(Et)typeof console<"u"&&console.error(Gt);else throw new Error(Gt)}function Ro(Et,Gt){var Rt=Et;R(Rt,0);var Ht=[],Qt=[],Nt={FileIndex:Ht,FullPaths:Qt};Ee(Nt,{root:Gt.root});for(var _n=Rt.length-4;(Rt[_n]!=80||Rt[_n+1]!=75||Rt[_n+2]!=5||Rt[_n+3]!=6)&&_n>=0;)--_n;Rt.l=_n+4,Rt.l+=4;var qn=Rt.read_shift(2);Rt.l+=6;var En=Rt.read_shift(4);for(Rt.l=En,_n=0;_n<qn;++_n){Rt.l+=20;var Rn=Rt.read_shift(4),Hn=Rt.read_shift(4),Lo=Rt.read_shift(2),Io=Rt.read_shift(2),gi=Rt.read_shift(2);Rt.l+=8;var jo=Rt.read_shift(4),oi=ne(Rt.slice(Rt.l+Lo,Rt.l+Lo+Io));Rt.l+=Lo+Io+gi;var Ji=Rt.l;Rt.l=jo+4,On(Rt,Rn,Hn,Nt,oi),Rt.l=Ji}return Nt}function On(Et,Gt,Rt,Ht,Qt){Et.l+=2;var Nt=Et.read_shift(2),_n=Et.read_shift(2),qn=ie(Et);if(Nt&8257)throw new Error("Unsupported ZIP encryption");for(var En=Et.read_shift(4),Rn=Et.read_shift(4),Hn=Et.read_shift(4),Lo=Et.read_shift(2),Io=Et.read_shift(2),gi="",jo=0;jo<Lo;++jo)gi+=String.fromCharCode(Et[Et.l++]);if(Io){var oi=ne(Et.slice(Et.l,Et.l+Io));(oi[21589]||{}).mt&&(qn=oi[21589].mt),((Qt||{})[21589]||{}).mt&&(qn=Qt[21589].mt)}Et.l+=Io;var Ji=Et.slice(Et.l,Et.l+Rn);switch(_n){case 8:Ji=pn(Et,Hn);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+_n)}var wi=!1;Nt&8&&(En=Et.read_shift(4),En==134695760&&(En=Et.read_shift(4),wi=!0),Rn=Et.read_shift(4),Hn=Et.read_shift(4)),Rn!=Gt&&yo(wi,"Bad compressed size: "+Gt+" != "+Rn),Hn!=Rt&&yo(wi,"Bad uncompressed size: "+Rt+" != "+Hn);var Br=O.buf(Ji,0);En>>0!=Br>>0&&yo(wi,"Bad CRC32 checksum: "+En+" != "+Br),bi(Ht,gi,Ji,{unsafe:!0,mt:qn})}function uo(Et,Gt){var Rt=Gt||{},Ht=[],Qt=[],Nt=F(1),_n=Rt.compression?8:0,qn=0,En=0,Rn=0,Hn=0,Lo=0,Io=Et.FullPaths[0],gi=Io,jo=Et.FileIndex[0],oi=[],Ji=0;for(En=1;En<Et.FullPaths.length;++En)if(gi=Et.FullPaths[En].slice(Io.length),jo=Et.FileIndex[En],!(!jo.size||!jo.content||gi=="Sh33tJ5")){var wi=Hn,Br=F(gi.length);for(Rn=0;Rn<gi.length;++Rn)Br.write_shift(1,gi.charCodeAt(Rn)&127);Br=Br.slice(0,Br.l),oi[Lo]=O.buf(jo.content,0);var gr=jo.content;_n==8&&(gr=be(gr)),Nt=F(30),Nt.write_shift(4,67324752),Nt.write_shift(2,20),Nt.write_shift(2,qn),Nt.write_shift(2,_n),jo.mt?oe(Nt,jo.mt):Nt.write_shift(4,0),Nt.write_shift(-4,oi[Lo]),Nt.write_shift(4,gr.length),Nt.write_shift(4,jo.content.length),Nt.write_shift(2,Br.length),Nt.write_shift(2,0),Hn+=Nt.length,Ht.push(Nt),Hn+=Br.length,Ht.push(Br),Hn+=gr.length,Ht.push(gr),Nt=F(46),Nt.write_shift(4,33639248),Nt.write_shift(2,0),Nt.write_shift(2,20),Nt.write_shift(2,qn),Nt.write_shift(2,_n),Nt.write_shift(4,0),Nt.write_shift(-4,oi[Lo]),Nt.write_shift(4,gr.length),Nt.write_shift(4,jo.content.length),Nt.write_shift(2,Br.length),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(4,0),Nt.write_shift(4,wi),Ji+=Nt.l,Qt.push(Nt),Ji+=Br.length,Qt.push(Br),++Lo}return Nt=F(22),Nt.write_shift(4,101010256),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(2,Lo),Nt.write_shift(2,Lo),Nt.write_shift(4,Ji),Nt.write_shift(4,Hn),Nt.write_shift(2,0),I([I(Ht),I(Qt),Nt])}var Oo={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function ko(Et,Gt){if(Et.ctype)return Et.ctype;var Rt=Et.name||"",Ht=Rt.match(/\.([^\.]+)$/);return Ht&&Oo[Ht[1]]||Gt&&(Ht=(Rt=Gt).match(/[\.\\]([^\.\\])+$/),Ht&&Oo[Ht[1]])?Oo[Ht[1]]:"application/octet-stream"}function Ko(Et){for(var Gt=o(Et),Rt=[],Ht=0;Ht<Gt.length;Ht+=76)Rt.push(Gt.slice(Ht,Ht+76));return Rt.join(`\r
`)+`\r
`}function mi(Et){var Gt=Et.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Rn){var Hn=Rn.charCodeAt(0).toString(16).toUpperCase();return"="+(Hn.length==1?"0"+Hn:Hn)});Gt=Gt.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),Gt.charAt(0)==`
`&&(Gt="=0D"+Gt.slice(1)),Gt=Gt.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var Rt=[],Ht=Gt.split(`\r
`),Qt=0;Qt<Ht.length;++Qt){var Nt=Ht[Qt];if(Nt.length==0){Rt.push("");continue}for(var _n=0;_n<Nt.length;){var qn=76,En=Nt.slice(_n,_n+qn);En.charAt(qn-1)=="="?qn--:En.charAt(qn-2)=="="?qn-=2:En.charAt(qn-3)=="="&&(qn-=3),En=Nt.slice(_n,_n+qn),_n+=qn,_n<Nt.length&&(En+="="),Rt.push(En)}}return Rt.join(`\r
`)}function Fo(Et){for(var Gt=[],Rt=0;Rt<Et.length;++Rt){for(var Ht=Et[Rt];Rt<=Et.length&&Ht.charAt(Ht.length-1)=="=";)Ht=Ht.slice(0,Ht.length-1)+Et[++Rt];Gt.push(Ht)}for(var Qt=0;Qt<Gt.length;++Qt)Gt[Qt]=Gt[Qt].replace(/[=][0-9A-Fa-f]{2}/g,function(Nt){return String.fromCharCode(parseInt(Nt.slice(1),16))});return c(Gt.join(`\r
`))}function Nr(Et,Gt,Rt){for(var Ht="",Qt="",Nt="",_n,qn=0;qn<10;++qn){var En=Gt[qn];if(!En||En.match(/^\s*$/))break;var Rn=En.match(/^(.*?):\s*([^\s].*)$/);if(Rn)switch(Rn[1].toLowerCase()){case"content-location":Ht=Rn[2].trim();break;case"content-type":Nt=Rn[2].trim();break;case"content-transfer-encoding":Qt=Rn[2].trim();break}}switch(++qn,Qt.toLowerCase()){case"base64":_n=c(i(Gt.slice(qn).join("")));break;case"quoted-printable":_n=Fo(Gt.slice(qn));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+Qt)}var Hn=bi(Et,Ht.slice(Rt.length),_n,{unsafe:!0});Nt&&(Hn.ctype=Nt)}function Rs(Et,Gt){if(Dt(Et.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var Rt=Gt&&Gt.root||"",Ht=(r&&Buffer.isBuffer(Et)?Et.toString("binary"):Dt(Et)).split(`\r
`),Qt=0,Nt="";for(Qt=0;Qt<Ht.length;++Qt)if(Nt=Ht[Qt],!!/^Content-Location:/i.test(Nt)&&(Nt=Nt.slice(Nt.indexOf("file")),Rt||(Rt=Nt.slice(0,Nt.lastIndexOf("/")+1)),Nt.slice(0,Rt.length)!=Rt))for(;Rt.length>0&&(Rt=Rt.slice(0,Rt.length-1),Rt=Rt.slice(0,Rt.lastIndexOf("/")+1),Nt.slice(0,Rt.length)!=Rt););var _n=(Ht[1]||"").match(/boundary="(.*?)"/);if(!_n)throw new Error("MAD cannot find boundary");var qn="--"+(_n[1]||""),En=[],Rn=[],Hn={FileIndex:En,FullPaths:Rn};Ee(Hn);var Lo,Io=0;for(Qt=0;Qt<Ht.length;++Qt){var gi=Ht[Qt];gi!==qn&&gi!==qn+"--"||(Io++&&Nr(Hn,Ht.slice(Lo,Qt),Rt),Lo=Qt)}return Hn}function ur(Et,Gt){var Rt=Gt||{},Ht=Rt.boundary||"SheetJS";Ht="------="+Ht;for(var Qt=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+Ht.slice(2)+'"',"","",""],Nt=Et.FullPaths[0],_n=Nt,qn=Et.FileIndex[0],En=1;En<Et.FullPaths.length;++En)if(_n=Et.FullPaths[En].slice(Nt.length),qn=Et.FileIndex[En],!(!qn.size||!qn.content||_n=="Sh33tJ5")){_n=_n.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(Ji){return"_x"+Ji.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(Ji){return"_u"+Ji.charCodeAt(0).toString(16)+"_"});for(var Rn=qn.content,Hn=r&&Buffer.isBuffer(Rn)?Rn.toString("binary"):Dt(Rn),Lo=0,Io=Math.min(1024,Hn.length),gi=0,jo=0;jo<=Io;++jo)(gi=Hn.charCodeAt(jo))>=32&&gi<128&&++Lo;var oi=Lo>=Io*4/5;Qt.push(Ht),Qt.push("Content-Location: "+(Rt.root||"file:///C:/SheetJS/")+_n),Qt.push("Content-Transfer-Encoding: "+(oi?"quoted-printable":"base64")),Qt.push("Content-Type: "+ko(qn,_n)),Qt.push(""),Qt.push(oi?mi(Hn):Ko(Hn))}return Qt.push(Ht+`--\r
`),Qt.join(`\r
`)}function zi(Et){var Gt={};return Ee(Gt,Et),Gt}function bi(Et,Gt,Rt,Ht){var Qt=Ht&&Ht.unsafe;Qt||Ee(Et);var Nt=!Qt&&U.find(Et,Gt);if(!Nt){var _n=Et.FullPaths[0];Gt.slice(0,_n.length)==_n?_n=Gt:(_n.slice(-1)!="/"&&(_n+="/"),_n=(_n+Gt).replace("//","/")),Nt={name:J(Gt),type:2},Et.FileIndex.push(Nt),Et.FullPaths.push(_n),Qt||U.utils.cfb_gc(Et)}return Nt.content=Rt,Nt.size=Rt?Rt.length:0,Ht&&(Ht.CLSID&&(Nt.clsid=Ht.CLSID),Ht.mt&&(Nt.mt=Ht.mt),Ht.ct&&(Nt.ct=Ht.ct)),Nt}function Ar(Et,Gt){Ee(Et);var Rt=U.find(Et,Gt);if(Rt){for(var Ht=0;Ht<Et.FileIndex.length;++Ht)if(Et.FileIndex[Ht]==Rt)return Et.FileIndex.splice(Ht,1),Et.FullPaths.splice(Ht,1),!0}return!1}function ws(Et,Gt,Rt){Ee(Et);var Ht=U.find(Et,Gt);if(Ht){for(var Qt=0;Qt<Et.FileIndex.length;++Qt)if(Et.FileIndex[Qt]==Ht)return Et.FileIndex[Qt].name=J(Rt),Et.FullPaths[Qt]=Rt,!0}return!1}function ds(Et){Ce(Et,!0)}return W.find=Ye,W.read=Re,W.parse=_e,W.write=kt,W.writeFile=Ct,W.utils={cfb_new:zi,cfb_add:bi,cfb_del:Ar,cfb_mov:ws,cfb_gc:ds,ReadShift:S,CheckField:k,prep_blob:R,bconcat:I,use_zlib:Yt,_deflateRaw:qt,_inflateRaw:To,consts:bt},W})();typeof U8<"u"&&typeof DO_NOT_EXPORT_CFB>"u"&&(t.exports=U)})($Xe)),$Xe.exports}var ZXi=XXi();const A9=_y(ZXi);function j1n(t){return[...t].map(e=>e==="|"||new RegExp("\\p{Cc}","u").test(e)?" ":e).join("")}function $1n(){return A9.utils.cfb_new({root:"Root Entry"})}function rk({compoundFile:t,content:e,path:n}){A9.utils.cfb_add(t,n,e)}function aK(t){const e=new Uint8Array(t.reduce((o,i)=>o+i.byteLength,0));let n=0;for(const o of t)e.set(o,n),n+=o.byteLength;return e}function B1e(t){return new LE(4,4).uint32(t).toUint8Array()}function o3({compoundFile:t,content:e,name:n,recordCount:o}){rk({compoundFile:t,content:B1e(o),path:`/${n}/Header`}),rk({compoundFile:t,content:e,path:`/${n}/Data`})}function q1n(t){const e=A9.write(t,{type:"buffer",fileType:"cfb"});return new Uint8Array(e)}var X1n=65535,eZi=1e4;function Z1n(t){if(typeof t=="string")return t;if("sourceFormat"in t&&t.sourceFormat!=="ascii")throw new Yg("Binary Altium input is already a compound document");return t.getString()}function c9(t){return new Map(qXe(t).map(({fieldName:e,fieldText:n})=>[e,n]))}function tZi(t){return qXe(t).map(({fieldName:e})=>e)}function nZi(t){return c9(t).get("RECORD")??""}function rM(t){const e=[];for(const{fieldName:n,fieldText:o}of qXe(t))/[^\x20-\x7e]/u.test(o)&&e.push(...new TextEncoder().encode(`|%UTF8%${n}=${o}||`)),e.push(...tIn(`|${n}=${o.replace(/[^\x20-\x7e]/gu,"?")}`));return e.push(0),Uint8Array.from(e)}function b1e(t){const e=new LE;for(const n of t)e.uint32LengthPrefixedBytes(rM(n));return e.toUint8Array()}function oZi(t){const e=new LE;for(const n of t){const o=c9(n),i=iZi(o.get("BINARYRECORDTYPE")),r=n.split("|").filter(a=>a&&!/^BINARYRECORDTYPE=/iu.test(a)).map(a=>`|${a}`).join(""),s=rM(r);e.uint16(i).uint32(s.byteLength).writeBytes(s)}return e.toUint8Array()}function _c(t){if(t===void 0)return 0;const e=Gee(t);if(e===void 0||!Number.isFinite(e))throw new Yg(`Invalid Altium measurement: ${JSON.stringify(t)}`);return Math.round(e*eZi)}function S1e(t){if(t===void 0)return X1n;const e=Number(t);if(!Number.isInteger(e)||e<0||e>X1n)throw new Yg(`Invalid Altium record index: ${JSON.stringify(t)}`);return e}function iZi(t){if(t===void 0)return 0;const e=Number(t);if(!Number.isInteger(e)||e<0||e>65535)throw new Yg(`Invalid Altium binary record type: ${JSON.stringify(t)}`);return e}function E4(t){if(t===void 0)return 0;const e=Number(t);if(!Number.isFinite(e))throw new Yg(`Invalid finite Altium number: ${JSON.stringify(t)}`);return e}function i3(t){if(t===void 0||t.toUpperCase()==="FALSE")return!1;if(t.toUpperCase()==="TRUE")return!0;throw new Yg(`Invalid Altium boolean: ${JSON.stringify(t)}`)}function AK(t){const e=tIn(t.slice(0,255));return aK([Uint8Array.of(e.byteLength),e])}function eIn(t,e){const n=new Uint8Array(e??(t.length+1)*2),o=new DataView(n.buffer),i=Math.min(t.length,n.byteLength/2);for(let r=0;r<i;r++)o.setUint16(r*2,t.charCodeAt(r),!0);return n}function rZi(t){return t.replace(/[^\x20-\x7e]/gu,"?")}function qXe(t){return t.split("|").filter(Boolean).map(e=>{const n=e.indexOf("=");if(n<1)throw new Yg(`Invalid Altium record field: ${JSON.stringify(e)}`);return{fieldName:e.slice(0,n).toUpperCase(),fieldText:e.slice(n+1)}})}function tIn(t){return Uint8Array.from(t,e=>e.charCodeAt(0)&127)}var sZi={BACKGROUND:76,BOTTOM:32,BOTTOMOVERLAY:34,BOTTOMPASTE:36,BOTTOMSOLDER:38,CONNECTIONS:75,DRCERROR:77,DRILLDRAWING:73,DRILLGUIDE:55,KEEPOUT:56,MULTILAYER:74,PADHOLES:81,SELECTIONS:78,TOP:1,TOPOVERLAY:33,TOPPASTE:35,TOPSOLDER:37,VIAHOLES:82,VISIBLEGRID1:79,VISIBLEGRID2:80};function B4(t,e=1){if(t===void 0)return e;const n=t.toUpperCase(),o=sZi[n];if(o!==void 0)return o;const i=aZi(n);if(i!==void 0)return i;throw new Yg(`Unsupported Altium PCB layer: ${JSON.stringify(t)}`)}function aZi(t){const e=/^(MID-LAYER|INTERNALPLANE|MECHANICAL)(\d{1,2})$/u.exec(t),n=Number.parseInt(e?.[2]??"",10);if(!(!e||!Number.isInteger(n)||n<1)){if(e[1]==="MID-LAYER"&&n<=30)return n+1;if(e[1]==="INTERNALPLANE"&&n<=16)return n+38;if(e[1]==="MECHANICAL"&&n<=16)return n+56;if(e[1]==="MECHANICAL"&&n<=32)return n+66}}var sk=["COMPONENT","LAYER","LOCKED","NET","POLYGON","RECORD"],AZi={ComponentBody:new Set([...sk,"ARCRESOLUTION","BODYCOLOR3D","BODYOPACITY3D","BODYPROJECTION","CAVITYHEIGHT","HOLECOUNT","IDENTIFIER","ISSHAPEBASED","KEEPOUT","KIND","NAME","OVERALLHEIGHT","STANDOFFHEIGHT","SUBPOLYINDEX","TEARDROP","TEXTURE","TEXTURECENTERX","TEXTURECENTERY","TEXTUREROTATION","TEXTURESIZEX","TEXTURESIZEY","UNIONINDEX","V7_LAYER"]),Fill:new Set([...sk,"KEEPOUT","ROTATION","X1","X2","Y1","Y2"]),Pad:new Set([...sk,"HOLESHAPE","HOLESIZE","HOLEROTATION","HOLEWIDTH","NAME","PLATED","ROTATION","SHAPE","TENTEDBOTTOM","TENTEDTOP","X","XSIZE","Y","YSIZE"]),Region:new Set([...sk,"HOLECOUNT","KEEPOUT","REGIONKIND","TEARDROP"]),Text:new Set([...sk,"BOLD","COMMENT","DESIGNATOR","FONTNAME","HEIGHT","INVERTED","INVERTEDRECT","ITALIC","ISSHAPEBASED","JUSTIFICATION","MARGINBORDERWIDTH","MIRROR","ROTATION","STROKEFONT","TEXT","TEXTBOXHEIGHT","TEXTBOXWIDTH","TEXTOFFSET","USETTFONTS","WIDESTRING","WIDTH","X","Y"]),Track:new Set([...sk,"KEEPOUT","WIDTH","X1","X2","Y1","Y2"]),Via:new Set([...sk,"DIAMETER","ENDLAYER","HOLESIZE","STARTLAYER","STOPLAYER","TENTEDBOTTOM","TENTEDTOP","X","Y"])};function cZi(t,e){const n=tZi(t),o=n.filter((r,s)=>n.indexOf(r)!==s);if(o.length>0)throw new Yg(`${e} binary serialization does not support duplicate fields: ${[...new Set(o)].join(", ")}`);const i=n.filter(r=>!uZi(r,e));if(i.length>0)throw new Yg(`${e} binary serialization does not support fields: ${i.join(", ")}`);lZi(c9(t),e)}function nIn(t){if(t===void 0||t.toUpperCase()==="RECTANGLE")return 2;if(t.toUpperCase()==="ROUND")return 1;throw new Yg(`Unsupported Altium pad shape: ${JSON.stringify(t)}`)}function lZi(t,e){B4(t.get("LAYER"),e==="Via"?74:1);for(const n of["BOLD","COMMENT","DESIGNATOR","INVERTED","INVERTEDRECT","ITALIC","KEEPOUT","LOCKED","MIRROR","PLATED","TENTEDBOTTOM","TENTEDTOP","TEARDROP","USETTFONTS"])t.has(n)&&i3(t.get(n));if(e==="Pad"){nIn(t.get("SHAPE"));const n=t.get("HOLESHAPE")?.toUpperCase();if(n!==void 0&&n!=="ROUND"&&n!=="SLOT"&&n!=="SQUARE")throw new Yg(`Unsupported Altium pad hole shape: ${JSON.stringify(n)}`)}if(e==="Via"){const n=t.get("LAYER")?.toUpperCase();if(n!==void 0&&n!=="MULTILAYER")throw new Yg(`Via binary serialization requires MULTILAYER, got ${JSON.stringify(n)}`);B4(t.get("STARTLAYER"),1),B4(t.get("ENDLAYER")??t.get("STOPLAYER"),32)}if(e==="Region"){const n=t.get("REGIONKIND")?.toUpperCase()??"COPPER";if(n!=="COPPER"&&n!=="POLYGON_CUTOUT")throw new Yg(`Unsupported Altium region kind: ${JSON.stringify(n)}`)}}function uZi(t,e){return AZi[e].has(t)?!0:e!=="Region"&&e!=="ComponentBody"?!1:/^(?:KIND|VX|VY|CX|CY|R|SA|EA)\d+$/u.test(t)||/^HOLE\d+(?:COUNT|V[XY]\d+)$/u.test(t)}var oIn=65535,gZi=4,dZi=8,hZi=32,pZi=64,mZi=512,_Zi=209,ak={componentBody:12,fill:6,pad:2,region:11,text:5,track:4,via:3};function fZi(t){const e=c9(t),n=B4(e.get("LAYER")),o=nIn(e.get("SHAPE")),i=_c(e.get("XSIZE")),r=_c(e.get("YSIZE")),s=new LE;cK({defaultLayerId:n,fields:e,writer:s}),s.int32(_c(e.get("X"))).int32(_c(e.get("Y")));for(let a=0;a<3;a++)s.int32(i).int32(r);return s.int32(_c(e.get("HOLESIZE"))).uint8(o).uint8(o).uint8(o).float64(E4(e.get("ROTATION"))).uint8(i3(e.get("PLATED"))?1:0).uint8(0).uint8(0).int32(0).writeBytes(new Uint8Array(38)).uint8(0).float64(E4(e.get("HOLEROTATION"))),[AK(e.get("NAME")??""),AK(""),AK(""),AK(""),s.toUint8Array(),bZi(e)]}function IZi(t){const e=c9(t),n=new LE;return cK({defaultLayerId:B4(e.get("LAYER")),fields:e,writer:n}),n.int32(_c(e.get("X1"))).int32(_c(e.get("Y1"))).int32(_c(e.get("X2"))).int32(_c(e.get("Y2"))).int32(_c(e.get("WIDTH"))).uint16(0),[n.toUint8Array()]}function CZi(t){const e=c9(t),n=new LE;return cK({defaultLayerId:B4(e.get("LAYER")),fields:e,writer:n}),n.int32(_c(e.get("X1"))).int32(_c(e.get("Y1"))).int32(_c(e.get("X2"))).int32(_c(e.get("Y2"))).float64(E4(e.get("ROTATION"))),[n.toUint8Array()]}function yZi(t){const e=c9(t),n=new LE;return cK({defaultLayerId:B4("MULTILAYER"),fields:e,writer:n}),n.int32(_c(e.get("X"))).int32(_c(e.get("Y"))).int32(_c(e.get("DIAMETER"))).int32(_c(e.get("HOLESIZE"))).uint8(B4(e.get("STARTLAYER"),1)).uint8(B4(e.get("ENDLAYER")??e.get("STOPLAYER"),32)).writeBytes(new Uint8Array(_Zi-n.length)),[n.toUint8Array()]}function xZi(t,e){const n=c9(t),o=iIn(n),i=new LE(137,137);return cK({defaultLayerId:B4(n.get("LAYER")),fields:n,writer:i}),i.int32(_c(n.get("X"))).int32(_c(n.get("Y"))).int32(_c(n.get("HEIGHT"))).uint16(E4(n.get("STROKEFONT"))).float64(E4(n.get("ROTATION"))).uint8(i3(n.get("MIRROR"))?1:0).int32(_c(n.get("WIDTH"))).uint8(i3(n.get("COMMENT"))?1:0).uint8(i3(n.get("DESIGNATOR"))?1:0).uint8(0).uint8(i3(n.get("USETTFONTS"))?1:0).uint8(i3(n.get("BOLD"))?1:0).uint8(i3(n.get("ITALIC"))?1:0).writeBytes(eIn(n.get("FONTNAME")??"",64)).uint8(i3(n.get("INVERTED"))?1:0).int32(_c(n.get("MARGINBORDERWIDTH"))).uint32(e).writeBytes(new Uint8Array(4)).uint8(i3(n.get("INVERTEDRECT"))?1:0).int32(_c(n.get("TEXTBOXWIDTH"))).int32(_c(n.get("TEXTBOXHEIGHT"))).uint8(E4(n.get("JUSTIFICATION"))).int32(_c(n.get("TEXTOFFSET"))),[i.toUint8Array(),AK(rZi(o))]}function EZi(t){const e=new LE;for(const[n,o]of t.entries()){const i=eIn(iIn(c9(o)));e.uint32(n).uint32(i.byteLength),i.byteLength>2&&e.writeBytes(i)}return e.toUint8Array()}function iIn(t){const e=t.get("WIDESTRING");return e===void 0?t.get("TEXT")??"":N1n(e)}function Ak(t,e){const n=new LE;for(const o of e){n.uint8(t);for(const i of o)n.uint32LengthPrefixedBytes(i)}return n.toUint8Array()}function cK({defaultLayerId:t,fields:e,writer:n}){n.uint8(B4(e.get("LAYER"),t)).uint16(BZi(e)).uint16(S1e(e.get("NET"))).uint16(S1e(e.get("POLYGON"))).uint16(S1e(e.get("COMPONENT"))).uint16(oIn).uint16(oIn)}function BZi(t){let e=dZi;return i3(t.get("LOCKED"))||(e|=gZi),i3(t.get("TENTEDTOP"))&&(e|=hZi),i3(t.get("TENTEDBOTTOM"))&&(e|=pZi),i3(t.get("KEEPOUT"))&&(e|=mZi),e}function bZi(t){const e=t.get("HOLESHAPE")?.toUpperCase();if(e!=="SLOT"&&e!=="SQUARE")return new Uint8Array;const n=new Uint8Array(596),o=new DataView(n.buffer);return o.setUint8(262,e==="SLOT"?2:1),o.setInt32(263,_c(t.get("HOLEWIDTH")),!0),o.setFloat64(267,E4(t.get("HOLEROTATION")),!0),n}function rIn({fields:t,propertyBytes:e}){const n=SZi(t),o=QZi(t),i=new LE;cK({defaultLayerId:B4(t.get("LAYER")),fields:t,writer:i}),i.uint8(0).uint16(o).uint16(0).uint32(e.byteLength).writeBytes(e).uint32(n-1);for(let r=0;r<n;r++)vZi({fields:t,vertexIndex:r,writer:i});for(let r=0;r<o;r++)wZi({fields:t,holeIndex:r,writer:i});return[i.toUint8Array()]}function SZi(t){const e=[...t.keys()].flatMap(o=>{const i=/^VX(\d+)$/u.exec(o);return i?.[1]===void 0?[]:[Number(i[1])]}),n=Math.max(...e,-1)+1;if(n<4)throw new Yg("Altium contours require an explicitly closed outline");for(let o=0;o<n;o++)if(!t.has(`VX${o}`)||!t.has(`VY${o}`))throw new Yg(`Altium contour outline is missing vertex ${o}`);if(_c(t.get("VX0"))!==_c(t.get(`VX${n-1}`))||_c(t.get("VY0"))!==_c(t.get(`VY${n-1}`)))throw new Yg("Altium contour outline must repeat its first vertex");return n}function QZi(t){const e=E4(t.get("HOLECOUNT"));if(!Number.isInteger(e)||e<0||e>65535)throw new Yg(`Invalid Altium contour hole count: ${e}`);return e}function vZi({fields:t,vertexIndex:e,writer:n}){const o=E4(t.get(`KIND${e}`));if(o!==0&&o!==1)throw new Yg(`Unsupported Altium contour vertex kind at index ${e}: ${o}`);n.uint8(o).int32(_c(t.get(`VX${e}`))).int32(_c(t.get(`VY${e}`))).int32(_c(t.get(`CX${e}`))).int32(_c(t.get(`CY${e}`))).int32(_c(t.get(`R${e}`))).float64(E4(t.get(`SA${e}`))).float64(E4(t.get(`EA${e}`)))}function wZi({fields:t,holeIndex:e,writer:n}){const o=E4(t.get(`HOLE${e}COUNT`));if(!Number.isInteger(o)||o<3||o>4294967295)throw new Yg(`Invalid Altium contour hole ${e} vertex count: ${o}`);n.uint32(o);for(let i=0;i<o;i++){const r=t.get(`HOLE${e}VX${i}`),s=t.get(`HOLE${e}VY${i}`);if(r===void 0||s===void 0)throw new Yg(`Altium contour hole ${e} is missing vertex ${i}`);n.float64(_c(r)).float64(_c(s))}}var PZi=/^(?:KIND|VX|VY|CX|CY|R|SA|EA)\d+$|^HOLE\d+(?:COUNT|V[XY]\d+)$/u,MZi=new Set(["COMPONENT","HOLECOUNT","KEEPOUT","LAYER","LOCKED","NET","POLYGON","RECORD","SOURCESTREAM","TEARDROP"]);function DZi(t){const e=c9(t),n=[...e.entries()].filter(([o])=>!MZi.has(o)&&!PZi.test(o)).map(([o,i])=>`|${o}=${i}`).join("");return rIn({fields:e,propertyBytes:rM(n).subarray(1)})}var NZi=65535;function RZi(t){const e=c9(t);return rIn({fields:e,propertyBytes:TZi(e)})}function TZi(t){const e=t.get("LAYER")??"TOP",n=S1e(t.get("POLYGON")),o=kZi(t.get("REGIONKIND")),i=[`V7_LAYER=${e}`,"NAME= ",`KIND=${o}`,`SUBPOLYINDEX=${n===NZi?-1:n}`,"UNIONINDEX=0","ARCRESOLUTION=0.5mil","ISSHAPEBASED=FALSE","CAVITYHEIGHT=0mil"].join("|");return rM(`|${i}`).subarray(1)}function kZi(t){return t?.toUpperCase()==="POLYGON_CUTOUT"?1:0}var FZi=["Arcs6","Regions6","ComponentBodies6","Classes6","DifferentialPairs6","Connections6"];function LZi(t){const e=Z1n(t);if(E1e(e).boardGeometry.outline.vertices.length<3)throw new Yg("Cannot create a binary PcbDoc without a board outline");const o=HZi(e),i=$1n();YZi(i),o3({compoundFile:i,content:b1e(o.Board),name:"Board6",recordCount:o.Board.length}),o3({compoundFile:i,content:b1e(o.Net),name:"Nets6",recordCount:o.Net.length}),o3({compoundFile:i,content:b1e(o.Component),name:"Components6",recordCount:o.Component.length}),o3({compoundFile:i,content:b1e(o.Polygon),name:"Polygons6",recordCount:o.Polygon.length}),o3({compoundFile:i,content:oZi(o.Dimension),name:"Dimensions6",recordCount:o.Dimension.length}),o3({compoundFile:i,content:Ak(ak.pad,o.Pad.map(fZi)),name:"Pads6",recordCount:o.Pad.length}),o3({compoundFile:i,content:Ak(ak.via,o.Via.map(yZi)),name:"Vias6",recordCount:o.Via.length}),o3({compoundFile:i,content:Ak(ak.track,o.Track.map(IZi)),name:"Tracks6",recordCount:o.Track.length}),o3({compoundFile:i,content:Ak(ak.fill,o.Fill.map(CZi)),name:"Fills6",recordCount:o.Fill.length}),o3({compoundFile:i,content:Ak(ak.region,o.Region.map(RZi)),name:"ShapeBasedRegions6",recordCount:o.Region.length}),o3({compoundFile:i,content:Ak(ak.componentBody,o.ComponentBody.map(DZi)),name:"ShapeBasedComponentBodies6",recordCount:o.ComponentBody.length}),o3({compoundFile:i,content:Ak(ak.text,o.Text.map(xZi)),name:"Texts6",recordCount:o.Text.length}),o3({compoundFile:i,content:EZi(o.Text),name:"WideStrings6",recordCount:o.Text.length});for(const r of FZi)o3({compoundFile:i,content:new Uint8Array,name:r,recordCount:0});return q1n(i)}function HZi(t){const e={Board:[],Component:[],ComponentBody:[],Dimension:[],Fill:[],Net:[],Pad:[],Polygon:[],Region:[],Text:[],Track:[],Via:[]};for(const n of t.split(/\r?\n|\r/u).filter(Boolean)){const o=nZi(n);if(!OZi(o))throw new Yg(`Unsupported PCB record kind for binary serialization: ${JSON.stringify(o||"missing RECORD")}`);GZi(o)&&cZi(n,o),e[o].push(n)}return e}function OZi(t){return["Board","Component","ComponentBody","Dimension","Fill","Net","Pad","Polygon","Region","Text","Track","Via"].includes(t)}function GZi(t){return["ComponentBody","Fill","Pad","Region","Text","Track","Via"].includes(t)}function YZi(t){const e=new LE().uint32(19);for(const i of"PCB 5.0 Bi")e.uint16(i.charCodeAt(0));rk({compoundFile:t,content:e.toUint8Array(),path:"/FileHeader"});const n="PCB 6.0 Binary File",o=new LE().uint32(n.length).writeBytes(AK(n)).float64(5.01);rk({compoundFile:t,content:o.toUint8Array(),path:"/FileHeaderSix"})}function UZi(t,e={}){const o=Z1n(t).split(/\r?\n|\r/u).filter(Boolean).filter(a=>!a.startsWith("|HEADER=")),i="Protel for Windows - Schematic Capture Binary File Version 5.0",r=[Q1e(rM(`|HEADER=${i}|WEIGHT=${o.length}|MINORVERSION=0|UNIQUEID=ALTIUMTS`)),...o.map(a=>Q1e(rM(a)))],s=$1n();return rk({compoundFile:s,content:aK(r),path:"/FileHeader"}),rk({compoundFile:s,content:KZi(e.embeddedImages??[]),path:"/Storage"}),rk({compoundFile:s,content:Q1e(rM(`|HEADER=${i}`)),path:"/Additional"}),q1n(s)}function KZi(t){const e=Q1e(rM("|HEADER=Icon storage")),n=t.map(({compressedBytes:o,name:i})=>{const r=c1e(i,"windows-1252");if(r.byteLength===0||r.byteLength>255)throw new RangeError("Embedded schematic image names must be 1 to 255 Windows-1252 bytes");if(o.byteLength===0)throw new RangeError("Embedded schematic image compressed bytes must not be empty");const s=aK([Uint8Array.of(208,r.byteLength),r,B1e(o.byteLength),o]);if(s.byteLength>16777215)throw new RangeError("Embedded schematic image storage entries must fit in 24 bits");return aK([B1e(s.byteLength),s])});return aK([e,...n])}function Q1e(t){return aK([B1e(t.byteLength),t])}[...Array.from({length:30},(t,e)=>`MID${e+1}`),...Array.from({length:30},(t,e)=>`MIDLAYER${e+1}`)],[...Array.from({length:16},(t,e)=>`PLANE${e+1}`),...Array.from({length:16},(t,e)=>`INTERNALPLANE${e+1}`)],[...Array.from({length:32},(t,e)=>`MECHANICAL${e+1}`)];const sg=39.3700787402,VZi=100,zZi=80,fr=(t,e=0)=>typeof t=="number"&&Number.isFinite(t)?t:e,Tu=(t,e)=>{const n=fr(t,e);return n>0?n:e},ti=(t,e="")=>typeof t=="string"?t:e,HE=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),AA=t=>{if(HE(t)&&!(typeof t.x!="number"||!Number.isFinite(t.x)||typeof t.y!="number"||!Number.isFinite(t.y)))return{x:t.x,y:t.y}},uu=t=>{const e=typeof t=="number"&&Number.isFinite(t)?String(t):ti(t);return j1n(e).trim()},JZi=t=>{const e=t.replace(/[^a-z0-9._-]+/giu,"-").replace(/^[.-]+|[.-]+$/gu,"").slice(0,80);return e?/^(?:aux|con|nul|prn|com[1-9]|lpt[1-9])$/iu.test(e)?`board-${e}`:e:"board"},Sp=t=>{const e=Math.round(t*1e4)/1e4;return Number.isInteger(e)?String(e):e.toFixed(4)},Xi=t=>`${Sp(t)}mil`,Dd=(t,e)=>t.filter(n=>n.type===e),r3=(t,e)=>Math.abs(t.x-e.x)<1e-9&&Math.abs(t.y-e.y)<1e-9,v1e=t=>{let e=0;for(const[n,o]of t.entries()){const i=t[(n+1)%t.length];i&&(e+=o.x*i.y-i.x*o.y)}return Math.abs(e/2)};class w1e{constructor(e,n){this.maxIterations=1e3,this.iteration=0,this.finished=!1,this.input=e,this.context=n}step(){if(this.iteration++,this.iteration>this.maxIterations)throw new Error(`${this.constructor.name} exceeded ${this.maxIterations} iterations`);this._step()}runUntilFinished(){for(;!this.finished;)this.step()}}function sM(t){const e=(t%360+360)%360;return e===0?0:e}function WZi(t){const e=Math.min(...t.map(i=>i.x)),n=Math.min(...t.map(i=>i.y)),o=Ad(pA(1e3,1e3),dC(sg,sg),pA(-e,-n));return i=>Bn(o,i)}function jZi({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=XZi(t),i=[];for(const r of Dd(t,"cad_component")){const s=n.get(ti(r.pcb_component_id));if(s===void 0)continue;const a=sIn(r.position),A=sIn(r.size);if(!a||!A)continue;$Zi(A,ti(r.cad_component_id));const c=ZZi(r),l=qZi({position:a,rotationDegrees:eer(r),size:A}).map(e),u=ter({boardThicknessMm:o,layer:c,positionZMm:a.z,sizeZMm:A.z});i.push(["|RECORD=ComponentBody",`LAYER=${c==="bottom"?"MECHANICAL14":"MECHANICAL13"}`,"LOCKED=FALSE","KEEPOUT=FALSE","NET=65535","POLYGON=65535",`COMPONENT=${s}`,"TEARDROP=FALSE","HOLECOUNT=0","ISSHAPEBASED=TRUE","KIND=0",`STANDOFFHEIGHT=${Xi(u*sg)}`,`OVERALLHEIGHT=${Xi(A.z*sg)}`,`BODYOPACITY3D=${r.show_as_translucent_model===!0?"0.5":"1"}`,`V7_LAYER=${c==="bottom"?"14":"13"}`,...l.flatMap((g,h)=>[`KIND${h}=0`,`VX${h}=${Xi(g.x)}`,`VY${h}=${Xi(g.y)}`])].join("|"))}return i}function sIn(t){if(!HE(t))return;const e=AA(t);if(!(!e||typeof t.z!="number"||!Number.isFinite(t.z)))return{...e,z:t.z}}function $Zi(t,e){if(!(t.x>0&&t.y>0&&t.z>=0))throw new Error(`CAD component ${JSON.stringify(e)} has an invalid body size`)}function qZi({position:t,rotationDegrees:e,size:n}){const o=Ad(pA(t.x,t.y),vQ(e*Math.PI/180)),i=n.x/2,r=n.y/2;return[{x:-i,y:-r},{x:i,y:-r},{x:i,y:r},{x:-i,y:r},{x:-i,y:-r}].map(a=>Bn(o,a))}function XZi(t){const e=Dd(t,"pcb_board")[0];return Math.max(fr(e?.thickness),0)}function ZZi(t){return ti(t.layer).toLowerCase()==="bottom"?"bottom":"top"}function eer(t){return HE(t.rotation)?fr(t.rotation.z):0}function ter({boardThicknessMm:t,layer:e,positionZMm:n,sizeZMm:o}){const i=e==="bottom"?-t/2:t/2;return(e==="bottom"?i-n:n-i)-o/2}const ner=Math.PI/24;function oer({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n,netEntries:o}){const i=new Map(o.flatMap(l=>l.sourceNetIds.map(u=>[u,l]))),r=t.flatMap(l=>l.type!=="pcb_copper_pour"?[]:[{copperPour:ixe.parse(l),polygonId:ier(l.altium_polygon_id),polygonRole:rer(l.altium_polygon_role),polygonCutoutCount:Math.max(0,Math.trunc(fr(l.altium_polygon_cutout_count))),pcbComponentId:ti(l.pcb_component_id)}]),s=[],a=new Set(r.flatMap(({polygonId:l})=>l===void 0?[]:[l]));let A=0;const c=()=>{for(;a.has(A);)A++;const l=A;return a.add(l),A++,l};for(const l of r){const{copperPour:u,pcbComponentId:g,polygonCutoutCount:h,polygonRole:d}=l,p=l.polygonId??c(),m=ser(u),_={outerRing:m.outerRing.map(e),innerRings:m.innerRings.map(S=>S.map(e))},f=cer(u.layer),I=Math.min(h,_.innerRings.length),C=_.innerRings.length-I,y=_.innerRings.slice(0,C),x=_.innerRings.slice(C),E=u.source_net_id?i.get(u.source_net_id):void 0,B=n.get(g);if(B!==void 0){s.push(Wee({altiumComponentIndex:B,innerRings:_.innerRings,layer:f,outerRing:_.outerRing})),!u.covered_with_solder_mask&&cIn(f)&&s.push(Wee({altiumComponentIndex:B,innerRings:_.innerRings,layer:f==="TOP"?"TOPSOLDER":"BOTTOMSOLDER",outerRing:_.outerRing}));continue}d!=="region"&&s.push(ler({layer:f,net:E,outerRing:_.outerRing,polygonIndex:p})),d!=="outline"&&s.push(Wee({innerRings:y,layer:f,net:E,outerRing:_.outerRing,polygonIndex:p})),s.push(...x.map(S=>Wee({innerRings:[],layer:f,net:E,outerRing:Jee(S),polygonIndex:p,regionKind:"POLYGON_CUTOUT"}))),d!=="outline"&&!u.covered_with_solder_mask&&cIn(f)&&s.push(Wee({innerRings:_.innerRings,layer:f==="TOP"?"TOPSOLDER":"BOTTOMSOLDER",outerRing:_.outerRing}))}return s}function ier(t){return typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<65535?t:void 0}function rer(t){return t==="outline"||t==="region"?t:void 0}function ser(t){return t.shape==="rect"?{innerRings:[],outerRing:Jee(aer(t))}:t.shape==="polygon"?{innerRings:[],outerRing:Jee(t.points)}:{innerRings:t.brep_shape.inner_rings.map(e=>AIn(aIn(e.vertices))),outerRing:Jee(aIn(t.brep_shape.outer_ring.vertices))}}function aer(t){const e=Ad(pA(t.center.x,t.center.y),vQ((t.rotation??0)*Math.PI/180)),n=t.width/2,o=t.height/2;return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(i=>Bn(e,i))}function aIn(t){const e=AIn(t);if(e.length<3)throw new Error("A PCB copper pour ring requires at least three vertices");const n=[];for(const[o,i]of e.entries()){const r=e[(o+1)%e.length];if(r){XXe(n,i);for(const s of Aer({bulge:i.bulge??0,end:r,start:i}))XXe(n,s)}}return Jee(n)}function Aer({bulge:t,end:e,start:n}){if(Math.abs(t)<1e-12||r3(n,e))return[e];const o=e.x-n.x,i=e.y-n.y,r=(1-t*t)/(4*t),s={x:(n.x+e.x)/2-i*r,y:(n.y+e.y)/2+o*r},a=Math.hypot(n.x-s.x,n.y-s.y),A=Math.atan2(n.y-s.y,n.x-s.x),c=4*Math.atan(t),l=Math.max(2,Math.ceil(Math.abs(c)/ner));return Array.from({length:l},(u,g)=>{const h=A+c*(g+1)/l;return{x:s.x+a*Math.cos(h),y:s.y+a*Math.sin(h)}})}function Jee(t){const e=[];for(const o of t)XXe(e,o);const n=e[0];if(n&&!r3(n,e.at(-1)??n)&&e.push(n),e.length<4)throw new Error("A PCB copper pour ring requires at least three vertices");return e}function AIn(t){const e=[...t],n=e[0],o=e.at(-1);return n&&o&&r3(n,o)&&e.pop(),e}function XXe(t,e){const n=t.at(-1);(!n||!r3(n,e))&&t.push(e)}function cer(t){if(t==="top")return"TOP";if(t==="bottom")return"BOTTOM";const e=/^inner(\d+)$/u.exec(t);if(!e?.[1])throw new Error(`Unsupported PCB copper pour layer: ${t}`);return`MID-LAYER${Number(e[1])}`}function cIn(t){return t==="TOP"||t==="BOTTOM"}function ler({layer:t,net:e,outerRing:n,polygonIndex:o}){return["|RECORD=Polygon",`NET=${e?.index??65535}`,`ID=${o}`,"POLYGONTYPE=Polygon","POUROVERSTYLE=1","HATCHSTYLE=Solid","SELECTION=FALSE",`LAYER=${t}`,"LOCKED=FALSE",...lIn(n)].join("|")}function Wee({altiumComponentIndex:t,innerRings:e,layer:n,net:o,outerRing:i,polygonIndex:r,regionKind:s="COPPER"}){return["|RECORD=Region",...t===void 0?[]:[`COMPONENT=${t}`],...o?[`NET=${o.index}`]:[],...r===void 0?[]:[`POLYGON=${r}`],`LAYER=${n}`,"LOCKED=FALSE","KEEPOUT=FALSE","TEARDROP=FALSE",`REGIONKIND=${s}`,`HOLECOUNT=${e.length}`,...lIn(i),...e.flatMap(uer)].join("|")}function lIn(t){return t.flatMap((e,n)=>[`KIND${n}=0`,`VX${n}=${Xi(e.x)}`,`VY${n}=${Xi(e.y)}`])}function uer(t,e){return[`HOLE${e}COUNT=${t.length}`,...t.flatMap((n,o)=>[`HOLE${e}VX${o}=${Xi(n.x)}`,`HOLE${e}VY${o}=${Xi(n.y)}`])]}function lK({altiumComponentIndex:t,circuitPoints:e,circuitToAltiumPcbPoint:n,closePath:o=!1,isKeepout:i=!1,layer:r,strokeWidthMm:s}){const a=o?tZe(e):[...e],A=[];for(let c=1;c<a.length;c++){const l=a[c-1],u=a[c];if(!l||!u)continue;const g=n(l),h=n(u);r3(g,h)||A.push(["|RECORD=Track",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${r}`,...i?["KEEPOUT=TRUE"]:[],"LOCKED=FALSE",`X1=${Xi(g.x)}`,`Y1=${Xi(g.y)}`,`X2=${Xi(h.x)}`,`Y2=${Xi(h.y)}`,`WIDTH=${Xi(s*sg)}`].join("|"))}return A}function uIn({altiumComponentIndex:t,center:e,circuitToAltiumPcbPoint:n,heightMm:o,isKeepout:i=!1,layer:r,rotationDegrees:s=0,widthMm:a}){const A=n({x:e.x-a/2,y:e.y-o/2}),c=n({x:e.x+a/2,y:e.y+o/2});return["|RECORD=Fill",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${r}`,`KEEPOUT=${i?"TRUE":"FALSE"}`,"LOCKED=FALSE",`X1=${Xi(A.x)}`,`Y1=${Xi(A.y)}`,`X2=${Xi(c.x)}`,`Y2=${Xi(c.y)}`,`ROTATION=${Sp(sM(s))}`].join("|")}function ZXe({altiumComponentIndex:t,circuitPoints:e,circuitToAltiumPcbPoint:n,innerRings:o=[],isKeepout:i=!1,layer:r}){const s=tZe(e).map(n),a=o.map(A=>tZe(A).map(n));if(s.length<4)throw new Error("An Altium PCB region requires at least three vertices");return["|RECORD=Region",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${r}`,"LOCKED=FALSE",`KEEPOUT=${i?"TRUE":"FALSE"}`,"TEARDROP=FALSE","REGIONKIND=COPPER",`HOLECOUNT=${a.length}`,...ger(s),...a.flatMap(der)].join("|")}function ger(t){return t.flatMap((e,n)=>[`KIND${n}=0`,`VX${n}=${Xi(e.x)}`,`VY${n}=${Xi(e.y)}`])}function der(t,e){return[`HOLE${e}COUNT=${t.length}`,...t.flatMap((n,o)=>[`HOLE${e}VX${o}=${Xi(n.x)}`,`HOLE${e}VY${o}=${Xi(n.y)}`])]}function eZe({center:t,radiusMm:e}){return Array.from({length:48},(o,i)=>{const r=i*Math.PI*2/48;return{x:t.x+Math.cos(r)*e,y:t.y+Math.sin(r)*e}})}function jee({center:t,cornerRadiusMm:e,heightMm:n,rotationDegrees:o=0,widthMm:i}){const r=i/2,s=n/2,a=Math.min(Math.max(e,0),r,s),A=a===0?[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}]:her({halfHeightMm:s,halfWidthMm:r,radiusMm:a}),c=Ad(pA(t.x,t.y),vQ(o*Math.PI/180));return A.map(l=>Bn(c,l))}function her({halfHeightMm:t,halfWidthMm:e,radiusMm:n}){const o=[{x:e-n,y:t-n,start:0},{x:-e+n,y:t-n,start:90},{x:-e+n,y:-t+n,start:180},{x:e-n,y:-t+n,start:270}],i=8;return o.flatMap(r=>Array.from({length:i},(s,a)=>{const c=(r.start+a*90/i)*Math.PI/180;return{x:r.x+Math.cos(c)*n,y:r.y+Math.sin(c)*n}}))}function tZe(t){const e=[...t],n=e[0],o=e.at(-1);return n&&o&&!r3(n,o)&&e.push(n),e}const per=.05;function mer({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=[];for(const i of t){const r=_er(i);if(!r)continue;const s=n.get(r.pcbComponentId);if(s===void 0)throw new Error(`PCB courtyard references missing component ${r.pcbComponentId}`);o.push(...lK({altiumComponentIndex:s,circuitPoints:r.points,circuitToAltiumPcbPoint:e,closePath:!0,layer:fer(r.layer),strokeWidthMm:per}))}return o}function _er(t){if(t.type==="pcb_courtyard_outline"){const e=sxe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:e.outline}}if(t.type==="pcb_courtyard_polygon"){const e=axe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:e.points}}if(t.type==="pcb_courtyard_rect"){const e=rxe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:jee({center:e.center,cornerRadiusMm:0,heightMm:e.height,rotationDegrees:e.ccw_rotation,widthMm:e.width})}}if(t.type==="pcb_courtyard_circle"){const e=Axe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:eZe({center:e.center,radiusMm:e.radius})}}if(t.type==="pcb_courtyard_pill"){const e=cxe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:jee({center:e.center,cornerRadiusMm:e.radius,heightMm:e.height,widthMm:e.width})}}}function fer(t){return t.toLowerCase()==="bottom"?"MECHANICAL16":"MECHANICAL15"}const OE=1e-9,Ier=4,gIn=8;function Cer({circuitJson:t,circuitToAltiumPcbPoint:e}){const n=[];for(const o of t){if(o.type!=="pcb_cutout")continue;const i=Z2e.parse(o);for(const r of yer(i))n.push(ber({circuitToAltiumPcbPoint:e,innerRings:r.innerRings??[],outerRing:r.outerRing}))}return n}function yer(t){return t.shape==="rect"?[{outerRing:jee({center:t.center,cornerRadiusMm:t.corner_radius??0,heightMm:t.height,rotationDegrees:t.rotation??0,widthMm:t.width})}]:t.shape==="circle"?[{outerRing:eZe({center:t.center,radiusMm:t.radius})}]:t.shape==="polygon"?[{outerRing:t.points}]:xer(t)}function xer(t){const e=nZe(t.route),n=e[0],o=e.at(-1),i=e.length>=3&&n!==void 0&&o!==void 0&&r3(n,o);if(i&&e.pop(),e.length===0)return[];const r=t.slot_width/2,s=Math.min(Math.max(t.slot_corner_radius??r,0),r);if(e.length===1){const A=e[0];return A?[{outerRing:jee({center:A,cornerRadiusMm:s,heightMm:t.slot_width,widthMm:t.slot_width})}]:[]}if(t.slot_length!==void 0&&t.slot_length>OE&&t.space_between_slots!==void 0&&t.space_between_slots>OE){const A=i?[...e,e[0]]:e;return Ber({dashLength:t.slot_length,gapLength:t.space_between_slots,points:A}).flatMap(c=>dIn({cornerRadiusMm:s,halfWidthMm:r,points:c}))}return i?Eer({halfWidthMm:r,points:e}):dIn({cornerRadiusMm:s,halfWidthMm:r,points:e})}function dIn({cornerRadiusMm:t,halfWidthMm:e,points:n}){const o=nZe(n);if(o.length<2||e<=OE)return[];const i=o[0],r=o.at(-1),s=uK(i,o[1]),a=uK(o.at(-2),r);if(!i||!r||!s||!a)return[];const A=hIn(o,e),c=hIn(o,-e),l=s3(A[0],pm(s,-(e-t))),u=s3(A.at(-1),pm(a,e-t)),g=s3(c.at(-1),pm(a,e-t)),h=s3(c[0],pm(s,-(e-t)));A[0]=l,A[A.length-1]=u,c[0]=h,c[c.length-1]=g;const d=[...A];return _In({center:r,cornerRadiusMm:t,halfWidthMm:e,normal:gK(a),outward:a,points:d}),d.push(...c.slice(0,-1).reverse()),_In({center:i,cornerRadiusMm:t,halfWidthMm:e,normal:pm(gK(s),-1),outward:pm(s,-1),points:d}),[{outerRing:d}]}function Eer({halfWidthMm:t,points:e}){if(e.length<3||t<=OE)return[];const n=pIn(e,t),o=pIn(e,-t);if(n.length<3||o.length<3)return[];const[i,r]=v1e(n)>=v1e(o)?[n,o]:[o,n];return[{innerRings:[r],outerRing:i}]}function hIn(t,e){const n=uK(t[0],t[1]),o=uK(t.at(-2),t.at(-1)),i=t[0],r=t.at(-1);if(!i||!r||!n||!o)return[];const s=[s3(i,pm(gK(n),e))];for(let a=1;a<t.length-1;a++)mIn({boundary:s,index:a,offset:e,points:t});return s.push(s3(r,pm(gK(o),e))),s}function pIn(t,e){const n=[];for(const[o]of t.entries())mIn({boundary:n,index:o,offset:e,points:t,wrap:!0});return n}function mIn({boundary:t,index:e,offset:n,points:o,wrap:i=!1}){const r=o[e],s=o[i?(e-1+o.length)%o.length:e-1],a=o[i?(e+1)%o.length:e+1],A=uK(s,r),c=uK(r,a);if(!r||!A||!c)return;const l=s3(r,pm(gK(A),n)),u=s3(r,pm(gK(c),n)),g=ver({firstDirection:A,firstPoint:l,secondDirection:c,secondPoint:u});if(g&&Math.hypot(g.x-r.x,g.y-r.y)<=Math.abs(n)*Ier){aM(t,g);return}aM(t,l),aM(t,u)}function _In({center:t,cornerRadiusMm:e,halfWidthMm:n,normal:o,outward:i,points:r}){if(e<=OE){aM(r,s3(t,pm(i,n),pm(o,n))),aM(r,s3(t,pm(i,n),pm(o,-n)));return}const s=n-e,a=s3(t,pm(i,s),pm(o,s));fIn({center:a,endAngleRadians:0,normal:o,outward:i,points:r,radius:e,startAngleRadians:Math.PI/2});const A=s3(t,pm(i,s),pm(o,-s));fIn({center:A,endAngleRadians:-Math.PI/2,normal:o,outward:i,points:r,radius:e,startAngleRadians:0})}function fIn({center:t,endAngleRadians:e,normal:n,outward:o,points:i,radius:r,startAngleRadians:s}){for(let a=1;a<=gIn;a++){const A=s+(e-s)*a/gIn;aM(i,s3(t,pm(o,Math.cos(A)*r),pm(n,Math.sin(A)*r)))}}function Ber({dashLength:t,gapLength:e,points:n}){const o=[0];for(let s=1;s<n.length;s++){const a=n[s-1],A=n[s];!a||!A||o.push((o.at(-1)??0)+Math.hypot(A.x-a.x,A.y-a.y))}const i=o.at(-1)??0,r=[];for(let s=0;s<i-OE;s+=t+e){const a=Math.min(s+t,i),A=[],c=IIn({cumulativeLengths:o,distance:s,points:n}),l=IIn({cumulativeLengths:o,distance:a,points:n});if(!(!c||!l)){A.push(c);for(let u=1;u<n.length-1;u++){const g=o[u],h=n[u];h&&g!==void 0&&g>s+OE&&g<a-OE&&A.push(h)}aM(A,l),A.length>=2&&r.push(A)}}return r}function IIn({cumulativeLengths:t,distance:e,points:n}){for(let o=1;o<t.length;o++){const i=t[o-1],r=t[o],s=n[o-1],a=n[o];if(i===void 0||r===void 0||!s||!a||e>r+OE)continue;const A=r-i;if(A<=OE)continue;const c=Math.min(Math.max((e-i)/A,0),1);return{x:s.x+(a.x-s.x)*c,y:s.y+(a.y-s.y)*c}}return n.at(-1)}function ber({circuitToAltiumPcbPoint:t,innerRings:e,outerRing:n}){const o=CIn(n).map(t),i=e.map(r=>CIn(r).map(t));return["|RECORD=Region","LAYER=MULTILAYER","LOCKED=FALSE","KEEPOUT=FALSE","TEARDROP=FALSE","ISBOARDCUTOUT=TRUE","REGIONKIND=COPPER",`HOLECOUNT=${i.length}`,...Ser(o),...i.flatMap(Qer)].join("|")}function CIn(t){const e=nZe(t),n=e[0],o=e.at(-1);if(n&&o&&!r3(n,o)&&e.push(n),e.length<4||v1e(e)<=OE)throw new Error("A PCB board cutout requires at least three vertices");return e}function Ser(t){return t.flatMap((e,n)=>[`KIND${n}=0`,`VX${n}=${Xi(e.x)}`,`VY${n}=${Xi(e.y)}`])}function Qer(t,e){return[`HOLE${e}COUNT=${t.length}`,...t.flatMap((n,o)=>[`HOLE${e}VX${o}=${Xi(n.x)}`,`HOLE${e}VY${o}=${Xi(n.y)}`])]}function nZe(t){const e=[];for(const n of t)aM(e,n);return e}function aM(t,e){const n=t.at(-1);(!n||!r3(n,e))&&t.push(e)}function uK(t,e){if(!t||!e)return;const n=e.x-t.x,o=e.y-t.y,i=Math.hypot(n,o);if(!(i<=OE))return{x:n/i,y:o/i}}function gK(t){return{x:-t.y,y:t.x}}function pm(t,e){return{x:t.x*e,y:t.y*e}}function s3(...t){return t.reduce((e,n)=>({x:e.x+n.x,y:e.y+n.y}),{x:0,y:0})}function yIn(t,e){return t.x*e.y-t.y*e.x}function ver({firstDirection:t,firstPoint:e,secondDirection:n,secondPoint:o}){const i=yIn(t,n);if(Math.abs(i)<=OE)return;const r={x:o.x-e.x,y:o.y-e.y},s=yIn(r,n)/i;return s3(e,pm(t,s))}function xIn({altiumComponentIndex:t,circuitToAltiumPcbPoint:e,dimension:n,layer:o}){const i=n.to.x-n.from.x,r=n.to.y-n.from.y;if(Math.hypot(i,r)===0)throw new Error("A PCB dimension requires distinct from and to points");const a=wer({deltaX:i,deltaY:r,offsetDirection:n.offset_direction}),A="offset"in n?n.offset:void 0,c=n.offset_distance??A??0,l={x:n.from.x+a.x*c,y:n.from.y+a.y*c},u={x:n.to.x+a.x*c,y:n.to.y+a.y*c},g=e(n.from),h=e(n.to),d=e(l),p=e(u),m={x:(d.x+p.x)/2,y:(d.y+p.y)/2},_=n.font_size,f=n.arrow_size;return["|RECORD=Dimension",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${o}`,"DIMENSIONKIND=0",`TEXTFORMAT=${n.text?uu(n.text):"<>"}`,`HEIGHT=${Xi(Math.abs(c)*sg)}`,`LINEWIDTH=${Xi(Math.max(.05,_*.1)*sg)}`,`TEXTHEIGHT=${Xi(_*sg)}`,`TEXTLINEWIDTH=${Xi(Math.max(.05,_*.1)*sg)}`,"TEXTPRECISION=3","TEXTBOLD=FALSE","ITALIC=FALSE",`TEXTGAP=${Xi(_*.2*sg)}`,`ARROWSIZE=${Xi(f*sg)}`,"TEXTPOSITION=Manual",`X1=${Xi(d.x)}`,`Y1=${Xi(d.y)}`,"REFERENCES_COUNT=2",`REFERENCE0POINTX=${Xi(g.x)}`,`REFERENCE0POINTY=${Xi(g.y)}`,`REFERENCE1POINTX=${Xi(h.x)}`,`REFERENCE1POINTY=${Xi(h.y)}`,`TEXT1X=${Xi(m.x)}`,`TEXT1Y=${Xi(m.y)}`,"TEXTDIMENSIONUNIT=Millimeters","TEXTSUFFIX=mm",`ANGLE=${Sp(Per({end:p,start:d}))}`].join("|")}function wer({deltaX:t,deltaY:e,offsetDirection:n}){const o=n??{x:-e,y:t},i=Math.hypot(o.x,o.y);if(i===0)throw new Error("A PCB dimension offset direction cannot be zero");return{x:o.x/i,y:o.y/i}}function Per({end:t,start:e}){return(Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI%360+360)%360}function oZe({altiumComponentIndex:t,circuitText:e,circuitToAltiumPcbPoint:n,layer:o}){const i=AA(e.anchor_position)??AA(e.center)??{x:0,y:0},r=n(i),s=ti(e.layer).toLowerCase()==="bottom",a=typeof e.is_mirrored=="boolean"?e.is_mirrored:e.is_mirrored_from_top_view,A=typeof a=="boolean"?a:s,c=Tu(e.font_size,1);return["|RECORD=Text",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${o}`,`X=${Xi(r.x)}`,`Y=${Xi(r.y)}`,`ROTATION=${Sp(sM(fr(e.ccw_rotation)))}`,`MIRROR=${A?"TRUE":"FALSE"}`,`HEIGHT=${Xi(c*sg)}`,`WIDTH=${Xi(Math.max(.05,c*.1)*sg)}`,"USETTFONTS=TRUE","FONTNAME=Arial",`JUSTIFICATION=${Mer(e.anchor_alignment)}`,`WIDESTRING=${Der(ti(e.text))}`].join("|")}function Mer(t){switch(t){case"top_left":return 1;case"center_left":return 2;case"bottom_left":return 3;case"top_center":return 4;case"center":return 5;case"bottom_center":return 6;case"top_right":return 7;case"center_right":return 8;case"bottom_right":return 9;default:return 5}}function Der(t){const e=[];for(const n of t){const o=n.codePointAt(0);o!==void 0&&e.push(o)}return e.join(",")}function Ner({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=[];for(const i of t){if(!Rer(i))continue;const r=Ter({componentIndex:n,element:i});if(i.type==="pcb_fabrication_note_path"){const s=K2e.parse(i);o.push(...lK({altiumComponentIndex:r,circuitPoints:s.route,circuitToAltiumPcbPoint:e,layer:HS(s.layer),strokeWidthMm:s.stroke_width}))}else if(i.type==="pcb_note_path"){const s=j2e.parse(i);o.push(...lK({altiumComponentIndex:r,circuitPoints:s.route,circuitToAltiumPcbPoint:e,layer:HS(s.layer),strokeWidthMm:s.stroke_width}))}else if(i.type==="pcb_note_line"){const s=$2e.parse(i);if(s.is_dashed)throw new Error("Altium PCB note lines do not preserve dashed strokes");o.push(...lK({altiumComponentIndex:r,circuitPoints:[{x:s.x1,y:s.y1},{x:s.x2,y:s.y2}],circuitToAltiumPcbPoint:e,layer:HS(s.layer),strokeWidthMm:s.stroke_width}))}else if(i.type==="pcb_fabrication_note_rect"){const s=V2e.parse(i);o.push(...EIn({altiumComponentIndex:r,center:s.center,circuitToAltiumPcbPoint:e,cornerRadiusMm:s.corner_radius??0,hasStroke:s.has_stroke!==!1,heightMm:s.height,isFilled:s.is_filled===!0,isStrokeDashed:s.is_stroke_dashed===!0,layer:HS(s.layer),strokeWidthMm:s.stroke_width,widthMm:s.width}))}else if(i.type==="pcb_note_rect"){const s=W2e.parse(i);o.push(...EIn({altiumComponentIndex:r,center:s.center,circuitToAltiumPcbPoint:e,cornerRadiusMm:s.corner_radius??0,hasStroke:s.has_stroke!==!1,heightMm:s.height,isFilled:s.is_filled===!0,isStrokeDashed:s.is_stroke_dashed===!0,layer:HS(s.layer),strokeWidthMm:s.stroke_width,widthMm:s.width}))}else if(i.type==="pcb_fabrication_note_text"){const s=U2e.parse(i);o.push(oZe({altiumComponentIndex:r,circuitText:i,circuitToAltiumPcbPoint:e,layer:HS(s.layer)}))}else if(i.type==="pcb_note_text"){const s=J2e.parse(i);o.push(oZe({altiumComponentIndex:r,circuitText:i,circuitToAltiumPcbPoint:e,layer:HS(s.layer)}))}else if(i.type==="pcb_fabrication_note_dimension"){const s=z2e.parse(i);o.push(xIn({altiumComponentIndex:r,circuitToAltiumPcbPoint:e,dimension:s,layer:HS(s.layer)}))}else if(i.type==="pcb_note_dimension"){const s=q2e.parse(i);o.push(xIn({altiumComponentIndex:r,circuitToAltiumPcbPoint:e,dimension:s,layer:HS(s.layer)}))}}return o}function Rer(t){return["pcb_fabrication_note_dimension","pcb_fabrication_note_path","pcb_fabrication_note_rect","pcb_fabrication_note_text","pcb_note_dimension","pcb_note_line","pcb_note_path","pcb_note_rect","pcb_note_text"].includes(t.type??"")}function EIn({altiumComponentIndex:t,center:e,circuitToAltiumPcbPoint:n,cornerRadiusMm:o,hasStroke:i,heightMm:r,isFilled:s,isStrokeDashed:a,layer:A,strokeWidthMm:c,widthMm:l}){if(a)throw new Error("Altium PCB note rectangles do not preserve dashed strokes");const u=jee({center:e,cornerRadiusMm:o,heightMm:r,widthMm:l}),g=[];return s&&g.push(o===0?uIn({altiumComponentIndex:t,center:e,circuitToAltiumPcbPoint:n,heightMm:r,layer:A,widthMm:l}):ZXe({altiumComponentIndex:t,circuitPoints:u,circuitToAltiumPcbPoint:n,layer:A})),i&&g.push(...lK({altiumComponentIndex:t,circuitPoints:u,circuitToAltiumPcbPoint:n,closePath:!0,layer:A,strokeWidthMm:c})),g}function Ter({componentIndex:t,element:e}){if(typeof e.pcb_component_id!="string")return;const n=t.get(e.pcb_component_id);if(n===void 0)throw new Error(`PCB annotation references missing component ${e.pcb_component_id}`);return n}function HS(t){return t.toLowerCase()==="bottom"?"MECHANICAL2":"MECHANICAL1"}class ker{constructor(e){this.parentByTraceIndex=Array.from({length:e},(n,o)=>o)}getRoot(e){if(!Number.isInteger(e)||e<0||e>=this.parentByTraceIndex.length)throw new RangeError(`Unknown trace index: ${e}`);let n=e,o=this.parentByTraceIndex[n];for(;o!==n;){if(o===void 0)throw new RangeError(`Unknown trace index: ${n}`);n=o,o=this.parentByTraceIndex[n]}let i=e;for(;this.parentByTraceIndex[i]!==i;){const r=this.parentByTraceIndex[i];if(r===void 0)throw new RangeError(`Unknown trace index: ${i}`);this.parentByTraceIndex[i]=n,i=r}return n}connect(e,n){const o=this.getRoot(e),i=this.getRoot(n);if(o===i)return;const r=Math.min(o,i);this.parentByTraceIndex[o]=r,this.parentByTraceIndex[i]=r}}function BIn({basePcbNetName:t,useCountByPcbNetName:e}){const n=(e.get(t)??0)+1;return e.set(t,n),n===1?t:`${t}-${n}`}function bIn(t,e){return Math.min(...t.sourceNetIds.map(n=>e.get(n)??Number.POSITIVE_INFINITY))}const SIn=t=>{const e=new Map(Dd(t,"source_net").flatMap(g=>{const h=ti(g.source_net_id);return h?[[h,uu(g.name)||h]]:[]})),n=new Map([...e.keys()].map((g,h)=>[g,h])),o=Dd(t,"source_trace"),i=new ker(o.length),r=new Map,s=new Map;for(const[g,h]of o.entries()){const d=Array.isArray(h.connected_source_port_ids)?h.connected_source_port_ids.map(m=>ti(m)):[],p=Array.isArray(h.connected_source_net_ids)?h.connected_source_net_ids.map(m=>ti(m)):[];for(const[m,_]of[...d.map(f=>[f,r]),...p.map(f=>[f,s])]){if(!m)continue;const f=_.get(m);f===void 0?_.set(m,g):i.connect(f,g)}}const a=new Map;for(const g of o.keys()){const h=i.getRoot(g);a.set(h,[...a.get(h)??[],g])}const A=new Map,c=[];for(const g of a.values()){const h=g.flatMap(I=>{const C=o[I];return C?[C]:[]}),d=[...new Set(h.flatMap(I=>Array.isArray(I.connected_source_net_ids)?I.connected_source_net_ids.map(C=>ti(C)).filter(Boolean):[]))],p=[...new Set(h.flatMap(I=>Array.isArray(I.connected_source_port_ids)?I.connected_source_port_ids.map(C=>ti(C)).filter(Boolean):[]))],m=h.map(I=>uu(I.name)||uu(I.display_name)).find(Boolean);if(d.length===0&&p.length===0&&!m)continue;const _=c.length,f=d.map(I=>e.get(I)).find(Boolean)||m||`Net-${_+1}`;c.push({index:_,name:BIn({basePcbNetName:f,useCountByPcbNetName:A}),sourceNetIds:d,sourcePortIds:p,traceIds:h.map((I,C)=>ti(I.source_trace_id)||`source_trace_${g[C]??C}`)})}const l=new Set(c.flatMap(g=>g.sourceNetIds)),u=new Set([...e.keys(),...Dd(t,"pcb_copper_pour").map(g=>ti(g.source_net_id)).filter(Boolean)]);for(const g of u){if(l.has(g))continue;const h=e.get(g)??g;c.push({index:c.length,name:BIn({basePcbNetName:h,useCountByPcbNetName:A}),sourceNetIds:[g],sourcePortIds:[],traceIds:[]}),l.add(g)}c.sort((g,h)=>{const d=bIn(g,n),p=bIn(h,n);return d!==p?d-p:g.index-h.index});for(const[g,h]of c.entries())h.index=g;return c};function QIn(t){if(/[\r\n|*?]/u.test(t))throw new Error(`Cannot represent keepout exclusion query name: ${JSON.stringify(t)}`);return`'${t.replaceAll("'","''")}'`}function Fer({circuitJson:t,excludedComponentIds:e,unionIndex:n}){const o=Dd(t,"pcb_component"),i=Dd(t,"source_component"),r=o.map((u,g)=>{const h=i.find(d=>d.source_component_id===u.source_component_id);return uu(h?.name)||`Component-${g+1}`}),s=new Set,a=[...new Set(e)].map(u=>{const g=o.findIndex(d=>d.pcb_component_id===u);if(g===-1)throw new Error(`Keepout exclusion references missing PCB component ${u}`);const h=r[g];if(r.filter(d=>d.toLowerCase()===h.toLowerCase()).length!==1)throw new Error(`Keepout exclusion has ambiguous Altium component name ${h}`);return s.add(ti(o[g].source_component_id)),QIn(h)}),A=new Set(Dd(t,"source_port").filter(u=>s.has(ti(u.source_component_id))).map(u=>ti(u.source_port_id))),c=SIn(t).filter(u=>u.sourcePortIds.some(g=>A.has(g))).map(u=>QIn(u.name)),l=[`InComponent(${a.join(", ")})`];return c.length&&l.push(`((IsTrack Or IsArc) And InNet(${c.join(", ")}))`),["|RECORD=Rule","BINARYRECORDTYPE=0","RULEKIND=Clearance","NETSCOPE=AnyNet","LAYERKIND=SameLayer",`SCOPE1EXPRESSION=IsKeepOut And InUnion(${n})`,`SCOPE2EXPRESSION=${l.join(" Or ")}`,`NAME=TscircuitKeepoutExclusion${n}`,"ENABLED=TRUE",`PRIORITY=${n}`,"GAP=0mil","DEFINEDBYLOGICALDOCUMENT=FALSE"].join("|")}function Ler({circuitJson:t,circuitToAltiumPcbPoint:e}){const n=[];let o=0;for(const i of t){if(i.type!=="pcb_keepout")continue;const r=X2e.parse(i),s=r.excluded_pcb_component_ids?.length?++o:void 0;s!==void 0&&n.push(Fer({circuitJson:t,excludedComponentIds:r.excluded_pcb_component_ids,unionIndex:s}));const a=A=>s===void 0?A:`${A}|UNIONINDEX=${s}`;if(r.shape==="outline"&&r.stroke_width<=0)throw new Error(`PCB keepout outline ${r.pcb_keepout_id} requires a stroke width`);for(const A of r.layers.map(Her)){if(r.shape==="rect"){n.push(a(uIn({center:r.center,circuitToAltiumPcbPoint:e,heightMm:r.height,isKeepout:!0,layer:A,widthMm:r.width})));continue}if(r.shape==="circle"){n.push(a(ZXe({circuitPoints:eZe({center:r.center,radiusMm:r.radius}),circuitToAltiumPcbPoint:e,isKeepout:!0,layer:A})));continue}n.push(...lK({circuitPoints:r.outline,circuitToAltiumPcbPoint:e,isKeepout:!0,layer:A,strokeWidthMm:r.stroke_width}).map(a))}}return n}function Her(t){const e=t.toLowerCase();if(e==="top")return"TOP";if(e==="bottom")return"BOTTOM";if(e==="all"||e==="multilayer")return"KEEPOUT";const n=/^inner(\d+)$/u.exec(e);if(n?.[1])return`MID-LAYER${Number(n[1])}`;throw new Error(`Unsupported PCB keepout layer: ${t}`)}function Oer({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=[];for(const i of t){if(i.type!=="pcb_silkscreen_graphic")continue;const r=Ger(i);r&&o.push(ZXe({altiumComponentIndex:n.get(ti(i.pcb_component_id)),circuitPoints:r.outerRing,circuitToAltiumPcbPoint:e,innerRings:r.innerRings,layer:ti(i.layer).toLowerCase()==="bottom"?"BOTTOMOVERLAY":"TOPOVERLAY"}))}return o}function Ger(t){if(t.shape!=="brep"||!HE(t.brep_shape))return;const e=vIn(t.brep_shape.outer_ring);return e.length<3?void 0:{innerRings:Array.isArray(t.brep_shape.inner_rings)?t.brep_shape.inner_rings.map(vIn).filter(o=>o.length>=3):[],outerRing:e}}function vIn(t){return!HE(t)||!Array.isArray(t.vertices)?[]:t.vertices.flatMap(e=>{const n=AA(e);return n?[n]:[]})}function Yer({altiumComponentIndex:t,circuitToAltiumPcbPoint:e,silkscreenText:n}){const o=ti(n.layer).toLowerCase()==="bottom";return oZe({altiumComponentIndex:t,circuitText:n,circuitToAltiumPcbPoint:e,layer:o?"BOTTOMOVERLAY":"TOPOVERLAY"})}const Uer=t=>{const e=Array.isArray(t?.outline)?t.outline.map(AA):[],n=e.filter(c=>!!c),o=n.length===e.length,i=n[0],r=n.at(-1);if(n.length>1&&i&&r&&r3(i,r)&&n.pop(),o&&n.length>=3&&v1e(n)>1e-9)return n;const s=AA(t?.center)??{x:0,y:0},a=Tu(t?.width,VZi),A=Tu(t?.height,zZi);return[{x:s.x-a/2,y:s.y-A/2},{x:s.x+a/2,y:s.y-A/2},{x:s.x+a/2,y:s.y+A/2},{x:s.x-a/2,y:s.y+A/2}]};function wIn(t,e){const n=e.pcbPorts.get(ti(t.pcb_port_id));return e.netBySourcePortId.get(ti(n?.source_port_id))}function PIn(t,e){const n=e.pcbPorts.get(ti(t.pcb_port_id)),o=e.sourcePorts.get(ti(n?.source_port_id));return uu(o?.pin_number?.toString())||uu(o?.name)||"1"}const Ker=t=>{const e=Dd(t,"pcb_board")[0],n=Uer(e),o=WZi(n),i=n[0]??{x:0,y:0},a=[["|RECORD=Board","KIND=Protel_Advanced_PCB","VERSION=5.00",...[...n,i].flatMap((f,I)=>{const C=o(f);return[`KIND${I}=0`,`VX${I}=${Xi(C.x)}`,`VY${I}=${Xi(C.y)}`]})].join("|")],A=new Map(Dd(t,"source_component").filter(f=>typeof f.source_component_id=="string").map(f=>[ti(f.source_component_id),f])),c=new Map(Dd(t,"source_port").map(f=>[ti(f.source_port_id),f])),l=new Map(Dd(t,"pcb_port").map(f=>[ti(f.pcb_port_id),f])),u=SIn(t),g=new Map(u.flatMap(f=>f.traceIds.map(I=>[I,f]))),h=new Map(u.flatMap(f=>f.sourcePortIds.map(I=>[I,f]))),d=Dd(t,"pcb_component"),p=new Map(d.map((f,I)=>[ti(f.pcb_component_id)||`pcb_component_${I}`,I]));for(const f of u)a.push(`|RECORD=Net|ID=${f.index}|NAME=${uu(f.name)}|VISIBLE=FALSE|JUMPERSVISIBLE=FALSE`);a.push(...Cer({circuitJson:t,circuitToAltiumPcbPoint:o})),a.push(...oer({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p,netEntries:u}));for(const[f,I]of d.entries()){const C=ti(I.pcb_component_id)||`pcb_component_${f}`,y=A.get(ti(I.source_component_id)),x=o(AA(I.center)??{x:0,y:0}),E=uu(y?.name)||`Component-${f+1}`,B=`TSCIRCUIT-${Sp(Tu(I.width,1))}x${Sp(Tu(I.height,1))}mm`,S=ti(I.layer).toLowerCase()==="bottom"?"BOTTOM":"TOP";a.push(["|RECORD=Component",`ID=${f}`,`LAYER=${S}`,`X=${Xi(x.x)}`,`Y=${Xi(x.y)}`,`ROTATION=${Sp(sM(fr(I.rotation)))}`,`PATTERN=${B}`,`SOURCEDESIGNATOR=${E}`,"NAMEON=TRUE","COMMENTON=TRUE",`SOURCEUNIQUEID=${uu(C)}`].join("|"))}a.push(...jZi({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p})),a.push(...Ler({circuitJson:t,circuitToAltiumPcbPoint:o}),...mer({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p}),...Ner({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p}));const m={netBySourcePortId:h,pcbPorts:l,sourcePorts:c};for(const f of Dd(t,"pcb_smtpad")){const I=o({x:fr(f.x),y:fr(f.y)}),C=p.get(ti(f.pcb_component_id)),y=wIn(f,m),x=Tu(f.radius,.5)*2,E=Tu(f.width,x),B=Tu(f.height,E),S=f.shape==="circle"?"ROUND":"RECTANGLE",Q=ti(f.layer).toLowerCase()==="bottom"?"BOTTOM":"TOP";a.push(["|RECORD=Pad",...C===void 0?[]:[`COMPONENT=${C}`],...y?[`NET=${y.index}`]:[],`LAYER=${Q}`,`ROTATION=${Sp(sM(fr(f.ccw_rotation)))}`,`NAME=${PIn(f,m)}`,"HOLESIZE=0mil","PLATED=TRUE","LOCKED=FALSE",`X=${Xi(I.x)}`,`Y=${Xi(I.y)}`,`SHAPE=${S}`,`XSIZE=${Xi(E*sg)}`,`YSIZE=${Xi(B*sg)}`].join("|"))}for(const f of Dd(t,"pcb_plated_hole")){const I=o({x:fr(f.x),y:fr(f.y)}),C=p.get(ti(f.pcb_component_id)),y=wIn(f,m),x=Tu(f.outer_width,Tu(f.outer_diameter,1.6)),E=Tu(f.outer_height,x),B=Tu(f.hole_width,Tu(f.hole_diameter,.8)),S=Tu(f.hole_height,B),Q=Math.abs(B-S)>1e-9;a.push(["|RECORD=Pad",...C===void 0?[]:[`COMPONENT=${C}`],...y?[`NET=${y.index}`]:[],"LAYER=MULTILAYER",`ROTATION=${Sp(sM(fr(f.ccw_rotation)))}`,`NAME=${PIn(f,m)}`,`HOLESIZE=${Xi(Math.min(B,S)*sg)}`,`HOLEWIDTH=${Xi(Math.max(B,S)*sg)}`,`HOLESHAPE=${Q?"SLOT":"ROUND"}`,`HOLEROTATION=${Sp(sM(fr(f.ccw_rotation)))}`,"PLATED=TRUE","LOCKED=FALSE",`X=${Xi(I.x)}`,`Y=${Xi(I.y)}`,`SHAPE=${f.shape==="circle"||f.shape==="oval"||f.shape==="pill"?"ROUND":"RECTANGLE"}`,`XSIZE=${Xi(x*sg)}`,`YSIZE=${Xi(E*sg)}`].join("|"))}for(const[f,I]of Dd(t,"pcb_hole").entries()){const C=o({x:fr(I.x),y:fr(I.y)}),y=p.get(ti(I.pcb_component_id)),x=Tu(I.hole_diameter,1),E=Tu(I.hole_width,x),B=Tu(I.hole_height,x),S=Math.abs(E-B)>1e-9;a.push(["|RECORD=Pad",...y===void 0?[]:[`COMPONENT=${y}`],"LAYER=MULTILAYER",`ROTATION=${Sp(sM(fr(I.ccw_rotation)))}`,`NAME=NPTH-${f+1}`,`HOLESIZE=${Xi(Math.min(E,B)*sg)}`,`HOLEWIDTH=${Xi(Math.max(E,B)*sg)}`,`HOLESHAPE=${S?"SLOT":"ROUND"}`,`HOLEROTATION=${Sp(sM(fr(I.ccw_rotation)))}`,"PLATED=FALSE","LOCKED=FALSE",`X=${Xi(C.x)}`,`Y=${Xi(C.y)}`,`SHAPE=${S?"RECTANGLE":"ROUND"}`,`XSIZE=${Xi(E*sg)}`,`YSIZE=${Xi(B*sg)}`].join("|"))}for(const f of Dd(t,"pcb_trace")){const I=Array.isArray(f.route)?f.route.flatMap(y=>HE(y)&&AA(y)?[y]:[]):[],C=g.get(ti(f.source_trace_id));for(let y=1;y<I.length;y++){const x=I[y-1],E=I[y];if(!x||!E||x.route_type==="via"&&E.route_type==="via")continue;const B=o({x:fr(x.x),y:fr(x.y)}),S=o({x:fr(E.x),y:fr(E.y)});if(r3(B,S))continue;const Q=ti(E.layer,ti(x.layer)).toLowerCase()==="bottom"?"BOTTOM":"TOP";a.push(["|RECORD=Track",...C?[`NET=${C.index}`]:[],`LAYER=${Q}`,"LOCKED=FALSE",`X1=${Xi(B.x)}`,`Y1=${Xi(B.y)}`,`X2=${Xi(S.x)}`,`Y2=${Xi(S.y)}`,`WIDTH=${Xi(Tu(E.width,Tu(x.width,.2))*sg)}`].join("|"))}}const _=new Map(Dd(t,"pcb_trace").map(f=>[ti(f.pcb_trace_id),f]));for(const f of Dd(t,"pcb_via")){const I=o({x:fr(f.x),y:fr(f.y)}),C=_.get(ti(f.pcb_trace_id)),y=g.get(ti(f.source_trace_id,ti(C?.source_trace_id)));a.push(["|RECORD=Via",...y?[`NET=${y.index}`]:[],`X=${Xi(I.x)}`,`Y=${Xi(I.y)}`,`DIAMETER=${Xi(Tu(f.outer_diameter,.6)*sg)}`,`HOLESIZE=${Xi(Tu(f.hole_diameter,.3)*sg)}`,"STARTLAYER=TOP","STOPLAYER=BOTTOM","LOCKED=FALSE"].join("|"))}for(const f of Dd(t,"pcb_silkscreen_path")){const I=Array.isArray(f.route)?f.route.flatMap(x=>HE(x)&&AA(x)?[x]:[]):[],C=p.get(ti(f.pcb_component_id)),y=ti(f.layer).toLowerCase()==="bottom"?"BOTTOMOVERLAY":"TOPOVERLAY";for(let x=1;x<I.length;x++){const E=AA(I[x-1]),B=AA(I[x]);if(!E||!B)continue;const S=o(E),Q=o(B);r3(S,Q)||a.push(["|RECORD=Track",...C===void 0?[]:[`COMPONENT=${C}`],`LAYER=${y}`,"LOCKED=FALSE",`X1=${Xi(S.x)}`,`Y1=${Xi(S.y)}`,`X2=${Xi(Q.x)}`,`Y2=${Xi(Q.y)}`,`WIDTH=${Xi(Tu(f.stroke_width,.15)*sg)}`].join("|"))}}a.push(...Oer({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p}));for(const f of Dd(t,"pcb_silkscreen_text"))a.push(Yer({altiumComponentIndex:p.get(ti(f.pcb_component_id)),circuitToAltiumPcbPoint:o,silkscreenText:f}));return`${a.join(`\r
`)}\r
`},Ver=/(?:^|\|)RECORD=Region(?:\||$)/iu,P1e=/\|ISBOARDCUTOUT=TRUE(?=\||$)/giu,MIn="/ShapeBasedRegions6/Data",zer=11,DIn=18,NIn=22,M1e=new TextEncoder().encode("|ISBOARDCUTOUT=TRUE");function RIn(t){const{cutoutRegionIndexes:e,source:n}=Jer(t),o=LZi(n);if(e.size===0)return o;const i=A9.read(o,{type:"buffer"}),r=A9.find(i,MIn);if(!r)throw new Error(`Altium PCB is missing ${MIn}`);const s=Wer(Uint8Array.from(r.content),e);if(s.count!==e.size)throw new Error(`Expected to mark ${e.size} Altium board-cutout regions, marked ${s.count}`);return r.content=s.stream,r.size=s.stream.byteLength,new Uint8Array(A9.write(i,{fileType:"cfb",type:"buffer"}))}function Jer(t){let e=0;const n=new Set,o=t.split(new RegExp("(?<=\\n)","u")).map(i=>{if(!Ver.test(i))return i;const r=e++;return P1e.test(i)?(P1e.lastIndex=0,n.add(r),i.replace(P1e,"")):i});return P1e.lastIndex=0,{cutoutRegionIndexes:n,source:o.join("")}}function Wer(t,e){const n=new DataView(t.buffer,t.byteOffset,t.byteLength),o=[];let i=0,r=0,s=0;for(;i<t.byteLength;){if(t.byteLength-i<5)throw new Error("Truncated Altium region record header");const c=n.getUint8(i),l=n.getUint32(i+1,!0),u=i+5,g=u+l;if(g>t.byteLength)throw new Error("Truncated Altium region record payload");if(c!==zer)throw new Error(`Unexpected Altium region object ID ${c}`);const h=t.subarray(u,g),d=e.has(r)?jer(h,r):h;d!==h&&s++,o.push($er(c,d)),r++,i=g}const a=new Uint8Array(o.reduce((c,l)=>c+l.byteLength,0));let A=0;for(const c of o)a.set(c,A),A+=c.byteLength;return{count:s,stream:a}}function jer(t,e){if(t.byteLength<NIn)throw new Error(`Altium region ${e} has no property block`);const o=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(DIn,!0),i=NIn+o;if(o<1||i>t.byteLength)throw new Error(`Altium region ${e} has an invalid property block`);const r=i-1;if(t[r]!==0)throw new Error(`Altium region ${e} has an unterminated property block`);const s=new Uint8Array(t.byteLength+M1e.byteLength);return s.set(t.subarray(0,r),0),s.set(M1e,r),s.set(t.subarray(r),r+M1e.byteLength),new DataView(s.buffer).setUint32(DIn,o+M1e.byteLength,!0),s}function $er(t,e){const n=new Uint8Array(e.byteLength+5),o=new DataView(n.buffer);return o.setUint8(0,t),o.setUint32(1,e.byteLength,!0),n.set(e,5),n}const qer={Fill:"Fills6",Track:"Tracks6",Region:"ShapeBasedRegions6"};function Xer(t){const e=E1e(t,{mode:"strict"}),n=e.getRecordsByKind("Rule");if(!n.length)return RIn(t);const o=t.split(/\r?\n/u).filter(a=>!/^\|RECORD=Rule\|/u.test(a)).map(a=>a.replace(/\|UNIONINDEX=\d+/gu,"")).join(`\r
`),i=A9.read(RIn(o),{type:"buffer"}),r=n.map(a=>{if(a.get("RULEKIND")!=="Clearance"||a.getNumber("BINARYRECORDTYPE")!==0)throw new Error("Keepout rule serializer only supports native Clearance rules");const A=a.getString().trim().replace(/\|(?:RECORD|BINARYRECORDTYPE)=[^|]*/gu,"");if(/[^\x20-\x7e]/u.test(A))throw new Error("Keepout rule serialization requires ASCII query names");const c=new TextEncoder().encode(`${A}\0`),l=new Uint8Array(c.length+6);return new DataView(l.buffer).setUint32(2,c.length,!0),l.set(c,6),l}),s=new Uint8Array(4);new DataView(s.buffer).setUint32(0,n.length,!0),A9.utils.cfb_add(i,"Rules6/Header",s),A9.utils.cfb_add(i,"Rules6/Data",iZe(r));for(const[a,A]of Object.entries(qer)){const c=e.getRecordsByKind(a);if(!c.some(p=>p.getNumber("UNIONINDEX")!==void 0))continue;const l=A9.find(i,`/${A}/Data`);if(!l)throw new Error(`Missing Altium ${A} stream`);const u=Uint8Array.from(l.content),g=new DataView(u.buffer),h=[];let d=0;for(const p of c){if(d+5>u.length)throw new Error(`Truncated ${A} header`);const m=g.getUint32(d+1,!0),_=d+5+m;if(_>u.length)throw new Error(`Truncated ${A} record`);const f=p.getNumber("UNIONINDEX"),I=u.slice(d+5,_),C=f===void 0?I:Zer(I,a,f),y=new Uint8Array(5+C.length);y[0]=u[d],new DataView(y.buffer).setUint32(1,C.length,!0),y.set(C,5),h.push(y),d=_}if(d!==u.length)throw new Error(`Unexpected trailing ${A} records`);l.content=iZe(h),l.size=l.content.length}return new Uint8Array(A9.write(i,{fileType:"cfb",type:"buffer"}))}function Zer(t,e,n){if(!Number.isInteger(n)||n<=0||n>4294967295)throw new Error("Invalid keepout union index");if(e==="Region"){if(t.length<22)throw new Error("Truncated region properties");const s=new DataView(t.buffer).getUint32(18,!0);if(22+s>t.length)throw new Error("Truncated region property block");const a=new TextDecoder().decode(t.subarray(22,22+s));if(!a.includes("UNIONINDEX=0"))throw new Error("Missing region union field");const A=new TextEncoder().encode(a.replace("UNIONINDEX=0",`UNIONINDEX=${n}`)),c=iZe([t.subarray(0,22),A,t.subarray(22+s)]);return new DataView(c.buffer).setUint32(18,A.length,!0),c}const o=e==="Track"?35:37,i=e==="Track"?36:37;if(t.length!==o)throw new Error(`Unexpected ${e} binary layout`);const r=new Uint8Array(i+9);return r.set(t),new DataView(r.buffer).setUint32(i,n,!0),r}function iZe(t){const e=new Uint8Array(t.reduce((o,i)=>o+i.length,0));let n=0;for(const o of t)e.set(o,n),n+=o.length;return e}class etr extends w1e{_step(){const e=Ker(this.input);this.context.pcb={asciiContent:e,content:Xer(e),filename:`${this.context.safeProjectName}.PcbDoc`},this.finished=!0}getOutput(){if(!this.context.pcb)throw new Error("PCB document stage has not finished");return this.context.pcb}}class ttr extends w1e{_step(){if(!this.context.pcb||!this.context.schematics)throw new Error("PCB and schematic stages must finish before the project");const e=["[Design]",`ProjectName=${this.context.safeProjectName}`,"",...[{path:this.context.pcb.filename,kind:"pcb-document"},...this.context.schematics.map(({filename:n})=>({path:n,kind:"schematic-document"}))].flatMap((n,o)=>[`[Document${o+1}]`,`DocumentPath=${n.path}`,`DocumentKind=${n.kind}`,""])].join(`\r
`);this.context.project={content:e,filename:`${this.context.safeProjectName}.PrjPcb`},this.finished=!0}getOutput(){if(!this.context.project)throw new Error("Project document stage has not finished");return this.context.project}}const rZe={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const t in rZe)Object.freeze(rZe[t]);const $ee=Object.freeze(rZe),TIn=Object.create(null);for(const t in $ee)Object.hasOwn($ee,t)&&(TIn[$ee[t]]=t);const a3={to:{},get:{}};a3.get=function(t){const e=t.slice(0,3).toLowerCase();let n,o;switch(e){case"hsl":{n=a3.get.hsl(t),o="hsl";break}case"hwb":{n=a3.get.hwb(t),o="hwb";break}default:{n=a3.get.rgb(t),o="rgb";break}}return n?{model:o,value:n}:null},a3.get.rgb=function(t){if(!t)return null;const e=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,o=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,i=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,r=/^(\w+)$/;let s=[0,0,0,1],a,A,c;if(a=t.match(n)){for(c=a[2],a=a[1],A=0;A<3;A++){const l=A*2;s[A]=Number.parseInt(a.slice(l,l+2),16)}c&&(s[3]=Number.parseInt(c,16)/255)}else if(a=t.match(e)){for(a=a[1],c=a[3],A=0;A<3;A++)s[A]=Number.parseInt(a[A]+a[A],16);c&&(s[3]=Number.parseInt(c+c,16)/255)}else if(a=t.match(o)){for(A=0;A<3;A++)s[A]=Number.parseFloat(a[A+1]);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(i)){for(A=0;A<3;A++)s[A]=Math.round(Number.parseFloat(a[A+1])*2.55);a[4]&&(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.toLowerCase().match(r))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn($ee,a[1])?(s=$ee[a[1]].slice(),s[3]=1,s):null:null;for(A=0;A<3;A++)s[A]=AM(s[A],0,255);return s[3]=AM(s[3],0,1),s},a3.get.hsl=function(t){if(!t)return null;const e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){const o=Number.parseFloat(n[4]),i=(Number.parseFloat(n[1])%360+360)%360,r=AM(Number.parseFloat(n[2]),0,100),s=AM(Number.parseFloat(n[3]),0,100),a=AM(Number.isNaN(o)?1:o,0,1);return[i,r,s,a]}return null},a3.get.hwb=function(t){if(!t)return null;const e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){const o=Number.parseFloat(n[4]),i=(Number.parseFloat(n[1])%360+360)%360,r=AM(Number.parseFloat(n[2]),0,100),s=AM(Number.parseFloat(n[3]),0,100),a=AM(Number.isNaN(o)?1:o,0,1);return[i,r,s,a]}return null},a3.to.hex=function(...t){return"#"+D1e(t[0])+D1e(t[1])+D1e(t[2])+(t[3]<1?D1e(Math.round(t[3]*255)):"")},a3.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a3.to.rgb.percent=function(...t){const e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),o=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+o+"%)":"rgba("+e+"%, "+n+"%, "+o+"%, "+t[3]+")"},a3.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a3.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a3.to.keyword=function(...t){return TIn[t.slice(0,3)]};function AM(t,e,n){return Math.min(Math.max(e,t),n)}function D1e(t){const e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}function qee({cssColor:t,fallbackAltiumColor:e}){const n=a3.get.rgb(t.trim());if(!n||n.length<3)return e;const[o=0,i=0,r=0]=n.map(Math.round);return o|i<<8|r<<16}const b4=132,kIn=16317695,Xee=16777215;function OS(t,e){const n=Math.round(e*1e5);if(!Number.isSafeInteger(n))throw new RangeError(`Invalid schematic coordinate ${t}: ${e}`);const o=Math.trunc(n/1e5),i=n-o*1e5;return[`${t}=${o}`,...i===0?[]:[`${t}_FRAC=${i<0?"-":""}${String(Math.abs(i)).padStart(5,"0")}`]]}const ntr=16777215,FIn=16711680,otr=16,itr=8,ck=3,rtr="Times New Roman",sZe=11;function str({hasInputArrow:t,hasOutputArrow:e}){return t&&e?3:t?1:e?2:0}function atr({altiumPortPosition:t,facingDirection:e,hasInputArrow:n,hasOutputArrow:o,portName:i}){const r=Math.max([...i].length*itr,otr);return["RECORD=18",`LOCATION.X=${t.x}`,`LOCATION.Y=${t.y}`,`WIDTH=${r}`,`IOTYPE=${str({hasInputArrow:n,hasOutputArrow:o})}`,...e==="up"||e==="down"?["STYLE=4"]:[],`NAME=${i}`,`FONTID=${ck}`,`COLOR=${FIn}`,`AREACOLOR=${ntr}`,`TEXTCOLOR=${FIn}`]}const N1e=20,Zee=4,LIn="Arial",R1e=.18,HIn=.15,OIn=.2;function Atr({netLabelTextPresentations:t=[],schematicElements:e,templateFontFields:n=[]}){const o=new Map,i=new Map([[1,Zee],[2,Zee],[ck,sZe]]),r=sZe/N1e;o.set(r,ck);const s=e.some(d=>d.type==="schematic_net_label"),a=[...new Set([...s?[R1e]:[],...e.flatMap(d=>{const p=d.type==="schematic_text"?fr(d.font_size):0;return p>0?[p]:[]})])].sort((d,p)=>d-p),A=[];let c=ck+1;for(const d of a){if(o.has(d))continue;const p=c++;o.set(d,p),i.set(p,d*N1e),A.push(`SIZE${p}=${Sp(d*N1e)}`,`FONTNAME${p}=${LIn}`)}const l=new Map;for(const d of n){const p=c++;l.set(d.sourceFontId,p),A.push(...d.fields.map(m=>m.replace(/^(\w+?)\d+=/u,`$1${p}=`)))}const u=new Map(o),g=new Map([[Zee,1]]);for(const[d,p]of i)d>ck&&Number.isInteger(p)&&g.set(p,d);const h=[...e.flatMap(d=>d.type==="schematic_text"&&(ti(d.schematic_component_id)||ti(d.source_trace_id))?[fr(d.font_size)]:[]),...s?[R1e]:[],...t.map(d=>fr(d.font_size)),...e.flatMap(d=>d.type==="schematic_port"&&ti(d.schematic_component_id)?[OIn,Tu(d.display_pin_label_font_size,HIn)]:[])];for(const d of h){if(d<=0)continue;const p=u.get(d);if(p!==void 0&&Number.isInteger(i.get(p)))continue;const m=Math.max(1,Math.ceil(Number(Sp(d*N1e))));let _=g.get(m);_===void 0&&(_=c++,g.set(m,_),i.set(_,m),A.push(`SIZE${_}=${m}`,`FONTNAME${_}=${LIn}`)),u.set(d,_)}return{nativeTextFontIdBySizeCircuitUnits:u,fontIdBySizeCircuitUnits:o,fontSizePointsById:i,sheetRecordFields:[`FONTIDCOUNT=${c-1}`,`SIZE1=${Zee}`,"FONTNAME1=Arial",`SIZE2=${Zee}`,"FONTNAME2=Arial",`SIZE${ck}=${sZe}`,`FONTNAME${ck}=${rtr}`,...A],templateFontIdBySourceFontId:l}}const ctr=[.278,.333,.408,.556,.556,.889,.778,.191,.333,.333,.5,.584,.278,.333,.278,.278,.556,.556,.556,.556,.556,.556,.556,.556,.556,.556,.278,.278,.584,.584,.584,.556,1.015,.722,.667,.722,.722,.667,.611,.778,.722,.333,.5,.722,.611,.889,.722,.778,.667,.778,.722,.667,.611,.722,.722,.944,.722,.722,.611,.333,.278,.333,.469,.556,.333,.556,.556,.5,.556,.556,.333,.556,.556,.278,.278,.5,.278,.833,.556,.556,.556,.556,.333,.5,.278,.556,.5,.722,.5,.5,.5,.48,.259,.48,.584];function ltr(t,e){return[...t].reduce((n,o)=>n+(ctr[o.codePointAt(0)-32]??1)*e,0)}const utr={bottom:1,bottom_left:0,bottom_center:1,bottom_right:2,left:3,center_left:3,center:4,center_right:5,right:5,top:7,top_left:6,top_center:7,top_right:8};function aZe(t){return utr[t]??0}function AZe(t){const e=(t%360+360)%360;return e===90||e===270?1:0}function cZe({circuitToAltiumSchematicPoint:t,fallbackAltiumColor:e,fallbackAltiumPosition:n,fallbackFontId:o,fallbackJustification:i,fontTable:r,schematicText:s}){const a=AA(s?.position),A=fr(s?.font_size);return{color:qee({cssColor:ti(s?.color),fallbackAltiumColor:e}),fontId:r.fontIdBySizeCircuitUnits.get(A)??o,justification:s?aZe(ti(s.anchor)):i,orientation:AZe(fr(s?.rotation)),position:a?t(a):n}}const GIn=2,gtr=132,dtr=10,YIn={bottom:{x:0,y:1},left:{x:1,y:0},right:{x:-1,y:0},top:{x:0,y:-1}},htr={bottom:{justification:3,orientation:1},left:{justification:3,orientation:0},right:{justification:5,orientation:0},top:{justification:5,orientation:1}},ptr={bottom:1,left:3,right:5,top:7},UIn={right:0,up:1,left:2,down:3},KIn={rail:2,ground:4};function mtr(t){return t in UIn}function _tr(t){return t in KIn}function ftr(t){return t in YIn}function lZe(t,e){const n="ABCDEFGHIJKLMNOPQRSTUVWXY";let o=Math.max(Math.floor(t),0),i="";for(let r=0;r<4;r++)i=n[o%n.length]+i,o=Math.floor(o/n.length);return`CJN${e}${i}`}function Itr({altiumLabelCenter:t,altiumLabelPosition:e,anchorSide:n,fontSize:o,textFontSize:i,labelText:r}){if(!ftr(n))return;const s=YIn[n],a={x:t.x-e.x,y:t.y-e.y},A=a.x*s.x+a.y*s.y,c=o*.3,l=o*.5,u=o*.2,g=ltr(r,i),h=Math.max(A*2,l+g+u,dtr),d={x:-s.y,y:s.x},p=(f,I=0)=>({x:e.x+s.x*f+d.x*I,y:e.y+s.y*f+d.y*I}),m=o*(.2/.18)/2,_=htr[n];return{orientation:_.orientation,outlinePoints:[p(0),p(c,m),p(h,m),p(h,-m),p(c,-m)],textJustification:_.justification,textPosition:p(l)}}function VIn(t){const e=t.lastIndexOf("_");if(e<1)return;const n=t.slice(0,e),o=t.slice(e+1);if(!(!_tr(n)||!mtr(o)))return{orientationIndex:UIn[o],styleIndex:KIn[n]}}function Ctr({anchorSide:t,altiumLabelCenter:e,altiumLabelPosition:n,decorationIndex:o,fontTable:i,labelText:r,symbolName:s,textPresentation:a}){const A=VIn(s),c=i.fontIdBySizeCircuitUnits.get(fr(a?.font_size))??(A?GIn:i.fontIdBySizeCircuitUnits.get(R1e)??GIn),l=A?c:i.nativeTextFontIdBySizeCircuitUnits.get(fr(a?.font_size))??i.nativeTextFontIdBySizeCircuitUnits.get(R1e)??c,u=qee({cssColor:ti(a?.color),fallbackAltiumColor:A?gtr:b4});if(A)return[["RECORD=17",`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`FONTID=${l}`,`ORIENTATION=${A.orientationIndex}`,`STYLE=${A.styleIndex}`,`COLOR=${u}`,"SHOWNETNAME=T",`TEXT=${r}`]];const g=["RECORD=25",`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`FONTID=${l}`,`ORIENTATION=${AZe(fr(a?.rotation))}`,`JUSTIFICATION=${a?aZe(ti(a.anchor)):ptr[t]??0}`,`COLOR=${u}`,`TEXT=${r}`];if(a&&r3(e,n))return[g];const h=Itr({altiumLabelCenter:e,altiumLabelPosition:n,anchorSide:t,fontSize:i.fontSizePointsById.get(c)??4,textFontSize:i.fontSizePointsById.get(l)??4,labelText:r});return h?[["RECORD=27","LINEWIDTH=0","LOCATIONCOUNT=2",...OS("X1",n.x),...OS("Y1",n.y),...OS("X2",h.textPosition.x),...OS("Y2",h.textPosition.y),"COLOR=34816",`UNIQUEID=${lZe(o,"W")}`],["RECORD=7","OWNERPARTID=-1","LINEWIDTH=0",`LOCATIONCOUNT=${h.outlinePoints.length}`,...h.outlinePoints.flatMap((d,p)=>[...OS(`X${p+1}`,d.x),...OS(`Y${p+1}`,d.y)]),`COLOR=${u}`,`AREACOLOR=${kIn}`,"ISSOLID=T",`UNIQUEID=${lZe(o,"P")}`],["RECORD=25",...OS("LOCATION.X",h.textPosition.x),...OS("LOCATION.Y",h.textPosition.y),`FONTID=${l}`,`ORIENTATION=${h.orientation}`,`JUSTIFICATION=${h.textJustification}`,`COLOR=${u}`,`TEXT=${r}`,`UNIQUEID=${lZe(o,"T")}`]]:[g]}const ytr=255;function zIn({altiumNoConnectPosition:t}){return["RECORD=22",`LOCATION.X=${t.x}`,`LOCATION.Y=${t.y}`,"ISACTIVE=T","SYMBOL=Thin Cross","ORIENTATION=1","OWNERPARTID=-1",`COLOR=${ytr}`,"SUPPRESSALL=T"]}const xtr=new Set(["schematic_line","schematic_path","schematic_rect","schematic_text"]);function T1e(t){return xtr.has(t.type??"")&&!ti(t.schematic_component_id)&&!ti(t.schematic_symbol_id)}const Etr=20,k1e=3615007,JIn=16777215;function uZe(t){return Sp(Math.max(fr(t.stroke_width),0)*Etr)}function dK({annotation:t,colorFieldName:e,fallbackAltiumColor:n}){return qee({cssColor:ti(t[e]),fallbackAltiumColor:n})}function Btr({annotation:t,circuitToAltiumSchematicPoint:e,fontTable:n}){const o=j1n(ti(t.text)),i=AA(t.position),r=fr(t.font_size),s=n.fontIdBySizeCircuitUnits.get(r);if(!o||!i||!s)return;const a=e(i);return["RECORD=4",`LOCATION.X=${a.x}`,`LOCATION.Y=${a.y}`,`FONTID=${s}`,`TEXT=${o}`,`COLOR=${dK({annotation:t,colorFieldName:"color",fallbackAltiumColor:k1e})}`,`ORIENTATION=${AZe(fr(t.rotation))}`,`JUSTIFICATION=${aZe(ti(t.anchor))}`]}function btr({annotation:t,circuitToAltiumSchematicPoint:e}){const n=AA(t.center),o=fr(t.width),i=fr(t.height);if(!n||o<=0||i<=0)return;const r=e({x:n.x-o/2,y:n.y-i/2}),s=e({x:n.x+o/2,y:n.y+i/2}),a=dK({annotation:t,colorFieldName:"color",fallbackAltiumColor:k1e}),A=t.is_filled===!0;return["RECORD=14",`LOCATION.X=${r.x}`,`LOCATION.Y=${r.y}`,`CORNER.X=${s.x}`,`CORNER.Y=${s.y}`,`LINEWIDTH=${uZe(t)}`,`COLOR=${a}`,`AREACOLOR=${dK({annotation:t,colorFieldName:"fill_color",fallbackAltiumColor:A?a:JIn})}`,`ISSOLID=${A?"T":"F"}`]}function Str({annotation:t,circuitToAltiumSchematicPoint:e}){const n=e({x:fr(t.x1),y:fr(t.y1)}),o=e({x:fr(t.x2),y:fr(t.y2)});return["RECORD=13",`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`CORNER.X=${o.x}`,`CORNER.Y=${o.y}`,`LINEWIDTH=${uZe(t)}`,`LINESTYLE=${t.is_dashed===!0?1:0}`,`COLOR=${dK({annotation:t,colorFieldName:"color",fallbackAltiumColor:k1e})}`]}function Qtr({annotation:t,circuitToAltiumSchematicPoint:e}){if(!Array.isArray(t.points))return;const n=t.points.flatMap(r=>{const s=AA(r);return s?[s]:[]});if(n.length<2)return;const o=n.map(e),i=t.is_filled===!0;return[`RECORD=${i?7:6}`,`LINEWIDTH=${uZe(t)}`,`LOCATIONCOUNT=${o.length}`,...o.flatMap((r,s)=>[`X${s+1}=${r.x}`,`Y${s+1}=${r.y}`]),`COLOR=${dK({annotation:t,colorFieldName:"stroke_color",fallbackAltiumColor:k1e})}`,...i?[`AREACOLOR=${dK({annotation:t,colorFieldName:"fill_color",fallbackAltiumColor:JIn})}`,"ISSOLID=T"]:[]]}function WIn(t){if(T1e(t.annotation)){if(t.annotation.type==="schematic_text")return Btr(t);if(t.annotation.type==="schematic_line")return Str(t);if(t.annotation.type==="schematic_rect")return btr(t);if(t.annotation.type==="schematic_path")return Qtr(t)}}const vtr=10,wtr=10,Ptr=60,Mtr=160,gZe=132,jIn=12779519;function Dtr({childSheets:t,circuitJson:e}){const n=new Map(e.filter(o=>o.type==="source_port").map(o=>[ti(o.source_port_id),o]));return t.map(o=>{const i=e.find(c=>c.type==="schematic_component"&&c.is_schematic_group===!0&&!ti(c.schematic_sheet_id)&&o.subcircuitId!==void 0&&ti(c.subcircuit_id)===o.subcircuitId),r=e.filter(c=>c.type==="schematic_port"&&ti(c.schematic_sheet_id)===o.schematicSheetId&&!ti(c.schematic_component_id)),s={0:0,1:0},a=r.flatMap(c=>{const l=n.get(ti(c.source_port_id)),u=ti(c.display_pin_label)||ti(l?.name);if(!u)return[];const g=c.has_input_arrow===!0,h=c.has_output_arrow===!0,d=Ftr(c);return s[d]++,[{distanceFromTop:i?ktr({placementComponent:i,schematicPort:c}):s[d],doNotConnect:l?.do_not_connect===!0,ioType:g?h?3:1:h?2:0,name:u,side:d}]}),A=Math.max(o.name.length,o.filename.length,...a.map(c=>c.name.length*2));return{childSheet:o,entries:a,height:Math.max(Ptr,Math.max(s[0],s[1])*vtr+20),placementComponent:i,width:Math.max(Mtr,A*6+20)}})}function Ntr({location:t,plan:e}){return e.entries.flatMap(n=>n.doNotConnect?[zIn({altiumNoConnectPosition:{x:t.x+(n.side===1?e.width:0),y:t.y-n.distanceFromTop*wtr}})]:[])}function Rtr({altiumSymbolRecordIndex:t,location:e,plan:n}){const{childSheet:o,entries:i}=n;return[["RECORD=32",`OWNERINDEX=${t}`,"OWNERPARTID=-1",`LOCATION.X=${e.x}`,`LOCATION.Y=${e.y+10}`,"COLOR=8388608","FONTID=1",`TEXT=${uu(o.name)}`],["RECORD=33",`OWNERINDEX=${t}`,"OWNERPARTID=-1",`LOCATION.X=${e.x}`,`LOCATION.Y=${e.y}`,"COLOR=8388608","FONTID=1",`TEXT=${uu(o.filename)}`],...i.map(r=>["RECORD=16",`OWNERINDEX=${t}`,"OWNERPARTID=-1",...r.side===1?["SIDE=1"]:[],`DISTANCEFROMTOP=${r.distanceFromTop}`,`COLOR=${gZe}`,`AREACOLOR=${jIn}`,`TEXTCOLOR=${gZe}`,"TEXTFONTID=1","TEXTSTYLE=Full",`NAME=${uu(r.name)}`,`IOTYPE=${r.ioType}`,"ARROWKIND=Block & Triangle"])]}function Ttr({location:t,plan:e}){return["RECORD=15","OWNERPARTID=-1",`LOCATION.X=${t.x}`,`LOCATION.Y=${t.y}`,`XSIZE=${e.width}`,`YSIZE=${e.height}`,`COLOR=${gZe}`,`AREACOLOR=${jIn}`,"ISSOLID=T",`UNIQUEID=${uu(e.childSheet.schematicSheetId)}`,"SYMBOLTYPE=Normal"]}function ktr({placementComponent:t,schematicPort:e}){const n=AA(t.center),o=AA(e.center),i=HE(t.size)?t.size:void 0;if(!n||!o||!i)return 0;const r=n.y+fr(i.height)/2;return Math.max(Math.round((r-o.y)*2),0)}function Ftr(t){const e=ti(t.facing_direction);return e==="right"?1:e==="left"?0:t.has_output_arrow===!0&&t.has_input_arrow!==!0?1:0}function Ltr({graphicPrimitive:t,symbolMapping:e}){return t.type==="path"?Htr({pathPrimitive:t,symbolMapping:e}):t.type==="circle"?Otr({circlePrimitive:t,symbolMapping:e}):Gtr({boxPrimitive:t,symbolMapping:e})}function Htr({pathPrimitive:t,symbolMapping:e}){const n=t.points.map(r=>Utr({symbolMapping:e,symbolPoint:r})),o=n[0],i=n.at(-1);return t.closed&&o&&i&&!r3(o,i)&&n.push(o),[`RECORD=${t.fill?7:6}`,...ete(e.altiumComponentRecordIndex),"LINEWIDTH=1",`LOCATIONCOUNT=${n.length}`,...n.flatMap((r,s)=>[...qIn(`X${s+1}`,r.x),...qIn(`Y${s+1}`,r.y)]),`COLOR=${b4}`,...t.fill?[`AREACOLOR=${b4}`,"ISSOLID=T"]:[]]}const $In=5,dZe=10**$In;function qIn(t,e){const n=Math.round(e*dZe)/dZe,o=Math.trunc(n),i=Math.round(Math.abs(n-o)*dZe);return[`${t}=${o}`,...i>0?[`${t}_FRAC=${String(i).padStart($In,"0")}`]:[]]}function Otr({circlePrimitive:t,symbolMapping:e}){const n=lk({symbolMapping:e,symbolPoint:{x:t.x,y:t.y}}),o=lk({symbolMapping:e,symbolPoint:{x:t.x+t.radius,y:t.y}}),i=Math.max(1,Math.abs(o.x-n.x));return["RECORD=8",...ete(e.altiumComponentRecordIndex),`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`RADIUS=${i}`,`SECONDARYRADIUS=${i}`,"LINEWIDTH=1",`COLOR=${b4}`,`AREACOLOR=${t.fill?b4:Xee}`,`ISSOLID=${t.fill?"T":"F"}`]}function Gtr({boxPrimitive:t,symbolMapping:e}){const n=Ytr(t),o=lk({symbolMapping:e,symbolPoint:{x:n.x-t.width/2,y:n.y-t.height/2}}),i=lk({symbolMapping:e,symbolPoint:{x:n.x+t.width/2,y:n.y+t.height/2}});return["RECORD=14",...ete(e.altiumComponentRecordIndex),`LOCATION.X=${o.x}`,`LOCATION.Y=${o.y}`,`CORNER.X=${i.x}`,`CORNER.Y=${i.y}`,"LINEWIDTH=1",`COLOR=${b4}`,`AREACOLOR=${Xee}`,"ISSOLID=F"]}function Ytr(t){const e=t.anchor.endsWith("_left")?t.width/2:t.anchor.endsWith("_right")?-t.width/2:0,n=t.anchor.startsWith("top_")?-t.height/2:t.anchor.startsWith("bottom_")?t.height/2:0;return{x:t.x+e,y:t.y+n}}function lk({symbolMapping:t,symbolPoint:e}){const n=Bn(t.symbolToCircuitMatrix,e);return t.circuitToAltiumSchematicPoint(n)}function Utr({symbolMapping:t,symbolPoint:e}){const n=Bn(t.symbolToCircuitMatrix,e);return t.circuitToAltiumSchematicPrecisePoint(n)}function ete(t){return[`OWNERINDEX=${t}`,"OWNERPARTID=1","OWNERPARTDISPLAYMODE=0"]}const Ktr=3615007;function XIn({altiumComponentRecordIndex:t,circuitToAltiumSchematicPoint:e,fontTable:n,schematicText:o}){const i=uu(ti(o.text));if(!i)return;const r=cZe({circuitToAltiumSchematicPoint:e,fallbackAltiumColor:Ktr,fallbackAltiumPosition:{x:0,y:0},fallbackFontId:2,fallbackJustification:0,fontTable:n,schematicText:o});return["RECORD=4",`OWNERINDEX=${t}`,"OWNERPARTID=1",`LOCATION.X=${r.position.x}`,`LOCATION.Y=${r.position.y}`,`FONTID=${r.fontId}`,`TEXT=${i}`,`COLOR=${r.color}`,`ORIENTATION=${r.orientation}`,`JUSTIFICATION=${r.justification}`]}const Vtr=new Set(["schematic_arc","schematic_circle","schematic_line","schematic_path","schematic_rect"]);function F1e(t){return Vtr.has(t.type??"")||t.type==="schematic_text"&&typeof t.schematic_symbol_id=="string"&&t.schematic_symbol_id.length>0}function ztr({circuitToAltiumSchematicLength:t,graphic:e}){return Sp(Math.max(1,t(Math.max(fr(e.stroke_width),0))))}function cM({colorFieldName:t,fallbackAltiumColor:e,graphic:n}){return qee({cssColor:ti(n[t]),fallbackAltiumColor:e})}function tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:n}){return[...ete(t),`LINEWIDTH=${ztr({circuitToAltiumSchematicLength:e,graphic:n})}`,`LINESTYLE=${n.is_dashed===!0?1:0}`]}function L1e({circuitToAltiumSchematicLength:t,radius:e}){return Math.max(1,t(e))}function Jtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){if(!Array.isArray(o.points))return;const i=o.points.flatMap(a=>{const A=AA(a);return A?[A]:[]});if(i.length<2)return;const r=i.map(n),s=o.is_filled===!0;return[`RECORD=${s?7:6}`,...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATIONCOUNT=${r.length}`,...r.flatMap((a,A)=>[`X${A+1}=${a.x}`,`Y${A+1}=${a.y}`]),`COLOR=${cM({graphic:o,colorFieldName:"stroke_color",fallbackAltiumColor:b4})}`,...s?[`AREACOLOR=${cM({graphic:o,colorFieldName:"fill_color",fallbackAltiumColor:Xee})}`,"ISSOLID=T"]:[]]}function Wtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=AA(o.center),r=fr(o.radius);if(!i||r<=0)return;const s=n(i),a=o.is_filled===!0;return["RECORD=8",...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${s.x}`,`LOCATION.Y=${s.y}`,`RADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:r}))}`,`SECONDARYRADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:r}))}`,`COLOR=${cM({graphic:o,colorFieldName:"color",fallbackAltiumColor:b4})}`,`AREACOLOR=${cM({graphic:o,colorFieldName:"fill_color",fallbackAltiumColor:Xee})}`,`ISSOLID=${a?"T":"F"}`]}function jtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=AA(o.center),r=fr(o.radius);if(!i||r<=0)return;const s=n(i),a=fr(o.start_angle_degrees),A=fr(o.end_angle_degrees),c=ti(o.direction)==="clockwise",l=fr(o.altium_secondary_radius),u=l>0;return[`RECORD=${u?11:12}`,...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${s.x}`,`LOCATION.Y=${s.y}`,`RADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:r}))}`,...u?[`SECONDARYRADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:l}))}`]:[],`STARTANGLE=${Sp(c?A:a)}`,`ENDANGLE=${Sp(c?a:A)}`,`COLOR=${cM({graphic:o,colorFieldName:"color",fallbackAltiumColor:b4})}`]}function $tr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=n({x:fr(o.x1),y:fr(o.y1)}),r=n({x:fr(o.x2),y:fr(o.y2)});return["RECORD=13",...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${i.x}`,`LOCATION.Y=${i.y}`,`CORNER.X=${r.x}`,`CORNER.Y=${r.y}`,`COLOR=${cM({graphic:o,colorFieldName:"color",fallbackAltiumColor:b4})}`]}function qtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=AA(o.center),r=fr(o.width),s=fr(o.height),a=(fr(o.rotation)%360+360)%360;if(!i||r<=0||s<=0||a!==0)return;const A=n({x:i.x-r/2,y:i.y-s/2}),c=n({x:i.x+r/2,y:i.y+s/2}),l=o.is_filled===!0,u=cM({graphic:o,colorFieldName:"color",fallbackAltiumColor:b4});return["RECORD=14",...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${A.x}`,`LOCATION.Y=${A.y}`,`CORNER.X=${c.x}`,`CORNER.Y=${c.y}`,`COLOR=${u}`,`AREACOLOR=${cM({graphic:o,colorFieldName:"fill_color",fallbackAltiumColor:l?u:Xee})}`,`ISSOLID=${l?"T":"F"}`]}function Xtr(t){if(F1e(t.graphic)){if(t.graphic.type==="schematic_text")return XIn({altiumComponentRecordIndex:t.altiumComponentRecordIndex,circuitToAltiumSchematicPoint:t.circuitToAltiumSchematicPoint,fontTable:t.fontTable,schematicText:t.graphic});if(t.graphic.type==="schematic_path")return Jtr(t);if(t.graphic.type==="schematic_circle")return Wtr(t);if(t.graphic.type==="schematic_arc")return jtr(t);if(t.graphic.type==="schematic_line")return $tr(t);if(t.graphic.type==="schematic_rect")return qtr(t)}}function GE(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function ZIn(t){return typeof t>"u"}function eCn(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function H1e(...t){t=Array.isArray(t[0])?t[0]:t;let e=(n,o)=>({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[n,o,...i]=t,r=e(n,o);return H1e(r,...i)}}}var{cos:Ztr,sin:enr}=Math;function tnr(t,e,n){let o=Ztr(t),i=enr(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return ZIn(e)||ZIn(n)?r:H1e([eCn(e,n),r,eCn(-e,-n)])}function nnr(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function O1e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,O1e.prototype),i.expected=e,i.found=n,i.location=o,i.name="SyntaxError",i}nnr(O1e,Error);function hZe(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}O1e.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,o;for(o=0;o<t.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,r=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(i):i,s=this.location.source+":"+r.line+":"+r.column;if(n){var a=this.location.end,A=hZe("",r.line.toString().length," "),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`
 --> `+s+`
`+A+` |
`+r.line+" | "+c+`
`+A+" | "+hZe("",i.column-1," ")+hZe("",u,"^")}else e+=`
 at `+s}return e},O1e.buildMessage=function(t,e){var n={literal:function(c){return'"'+i(c.text)+'"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+"-"+r(u[1]):r(u)});return"["+(c.inverted?"^":"")+l.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function r(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+o(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length>0){for(u=1,g=1;u<l.length;u++)l[u-1]!==l[u]&&(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function A(c){return c?'"'+i(c)+'"':"end of input"}return"Expected "+a(t)+" but "+A(e)+" found."};function GS(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,i=-1/0,r=s=>{e=Math.min(e,s.x),n=Math.max(n,s.x),o=Math.min(o,s.y),i=Math.max(i,s.y)};return t.forEach(s=>{switch(s.type){case"path":s.points.forEach(r);break;case"text":r({x:s.x,y:s.y});break;case"circle":{let{x:a,y:A,radius:c}=s;r({x:a-c,y:A-c}),r({x:a+c,y:A+c});break}case"box":{let{x:a,y:A,width:c,height:l}=s,u=c/2,g=l/2;r({x:a-u,y:A-g}),r({x:a+u,y:A+g});break}}}),{minX:e,maxX:n,minY:o,maxY:i}}var onr=(t,e="right")=>{switch(e){case"down":switch(t){case"middle_top":return"middle_right";case"middle_bottom":return"middle_left";case"middle_left":return"middle_bottom";case"middle_right":return"middle_top"}break;case"up":switch(t){case"middle_top":return"middle_left";case"middle_bottom":return"middle_right";case"middle_left":return"middle_top";case"middle_right":return"middle_bottom"}break;case"left":switch(t){case"middle_top":return"middle_bottom";case"middle_bottom":return"middle_top";case"middle_left":return"middle_right";case"middle_right":return"middle_left"}break;case"right":return t}return t},hK=(t,e)=>{let{primitives:n,center:o,ports:i,size:r}=t,s=H1e({a:1,b:0,c:0,d:-1,e:0,f:2*o.y}),a=n.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(h=>GE(s,h))};case"text":let l=GE(s,{x:c.x,y:c.y}),u={top_left:"bottom_left",top_right:"bottom_right",bottom_left:"top_left",bottom_right:"top_right",center:"center",middle_top:"middle_bottom",middle_bottom:"middle_top",middle_left:"middle_left",middle_right:"middle_right"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case"circle":case"box":let g=GE(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=>({...c,...GE(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},pK=(t,e)=>{let{primitives:n,center:o,ports:i,size:r}=t,s=H1e({a:-1,b:0,c:0,d:1,e:0,f:2*o.x}),a=n.map(c=>{switch(c={...c},c.type){case"path":return{...c,points:c.points.map(h=>GE(s,h))};case"text":let l=GE(s,{x:c.x,y:c.y}),u={top_left:"top_right",top_right:"top_left",bottom_left:"bottom_right",bottom_right:"bottom_left",center:"center",middle_top:"middle_top",middle_bottom:"middle_bottom",middle_left:"middle_right",middle_right:"middle_left"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case"circle":case"box":let g=GE(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=>({...c,...GE(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},nte=(t,e)=>{let{newOrientation:n,overrides:o}=e,i={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},r=tnr(n?i[n]:Math.PI/2,t.center.x,t.center.y),{primitives:s,center:a,size:A,ports:c}=t,l=s.map(h=>{switch(h={...h},h.type){case"path":return{...h,points:h.points.map(_=>GE(r,_))};case"text":let d=GE(r,{x:h.x,y:h.y});return h.anchor=onr(h.anchor,n??"right"),{...h,x:d.x,y:d.y};case"circle":let p=GE(r,{x:h.x,y:h.y});return{...h,x:p.x,y:p.y};case"box":let m=GE(r,{x:h.x,y:h.y});return{...h,x:m.x,y:m.y,width:h.height,height:h.width}}}),u=c.map(h=>({...h,...GE(r,h)})),g=GS(l);return{primitives:l,center:a,ports:u,size:{width:g.maxX-g.minX,height:g.maxY-g.minY},...o}},si=(t,e="down",n={})=>nte(t,{newOrientation:e,overrides:n}),inr=class{symbol;constructor(t){this.symbol=JSON.parse(JSON.stringify(t)),this.symbol.size=this.computeSize()}changeTextAnchor(t,e,n){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(o=>o.type==="text"&&o.text===t?{...o,anchor:e,...n?{x:o.x+n.x,y:o.y+n.y}:{}}:o)},this}labelPort(t,e){return this.symbol={...this.symbol,ports:this.symbol.ports.map(n=>n.labels.includes(t)?{...n,labels:e}:n)},this}rotateRightFacingSymbol(t){return this.symbol=nte(this.symbol,{newOrientation:t}),this}computeSize(){let t=GS(this.symbol.primitives);return{width:t.maxX-t.minX,height:t.maxY-t.minY}}build(){return{...this.symbol,size:this.computeSize()}}},Ln=t=>{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],n=t.ports??Object.entries(t.refblocks).flatMap(([i,r])=>[{...r,labels:[i]}]),o=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return n.length===2&&(o={x:(n[0].x+n[1].x)/2,y:(n[0].y+n[1].y)/2}),new inr({...t,primitives:e,ports:n,center:o})},mK={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path17:{type:"path",points:[{x:0,y:-.13},{x:.07,y:-.11}],color:"primary",fill:!1},path18:{type:"path",points:[{x:.07,y:-.11},{x:.14,y:-.13}],color:"primary",fill:!1},path19:{type:"path",points:[{x:-.15,y:-.13},{x:-.07,y:-.11}],color:"primary",fill:!1},path20:{type:"path",points:[{x:-.07,y:-.11},{x:0,y:-.13}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:rnr,bounds:G1e,refblocks:tCn,circles:snr}=mK,anr=Ln({primitives:[...Object.values(rnr),...Object.values(snr),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...tCn.left1,labels:["1"]},{...tCn.right1,labels:["2"]}],size:{width:G1e.width,height:G1e.height},center:{x:G1e.centerX,y:G1e.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Anr,bounds:Y1e,refblocks:nCn,circles:cnr}=mK,lnr=Ln({primitives:[...Object.values(Anr),...Object.values(cnr),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...nCn.left1,labels:["1"]},{...nCn.right1,labels:["2"]}],size:{width:Y1e.width,height:Y1e.height},center:{x:Y1e.centerX,y:Y1e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:unr,bounds:U1e,refblocks:oCn,circles:gnr}=mK,dnr=Ln({primitives:[...Object.values(unr),...Object.values(gnr),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...oCn.left1,labels:["1"]},{...oCn.right1,labels:["2"]}],size:{width:U1e.width,height:U1e.height},center:{x:U1e.centerX,y:U1e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:hnr,bounds:K1e,refblocks:iCn,circles:pnr}=mK,mnr=Ln({primitives:[...Object.values(hnr),...Object.values(pnr),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...iCn.left1,labels:["1"]},{...iCn.right1,labels:["2"]}],size:{width:K1e.width,height:K1e.height},center:{x:K1e.centerX,y:K1e.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:_nr,bounds:V1e,refblocks:rCn,circles:fnr}=mK,Inr=Ln({primitives:[...Object.values(_nr),...Object.values(fnr),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...rCn.left1,labels:["1"]},{...rCn.right1,labels:["2"]}],size:{width:V1e.width,height:V1e.height},center:{x:V1e.centerX,y:V1e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Cnr,bounds:z1e,refblocks:sCn,circles:ynr}=mK,xnr=Ln({primitives:[...Object.values(Cnr),...Object.values(ynr),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...sCn.left1,labels:["1"]},{...sCn.right1,labels:["2"]}],size:{width:z1e.width,height:z1e.height},center:{x:z1e.centerX,y:z1e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),_K={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.2}],color:"primary",fill:!1},"path43-8-3":{type:"path",points:[{x:.21,y:-.11},{x:.15,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:Enr,texts:Vmr,bounds:J1e,refblocks:aCn,circles:Bnr}=_K,bnr=Ln({primitives:[...Object.values(Enr),...Object.values(Bnr),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...aCn.left1,labels:["1"]},{...aCn.right1,labels:["2"]}],size:{width:J1e.width,height:J1e.height},center:{x:J1e.centerX,y:J1e.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Snr=Ln(_K).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Qnr,texts:zmr,bounds:W1e,refblocks:ACn,circles:vnr}=_K,wnr=Ln({primitives:[...Object.values(Qnr),...Object.values(vnr),{type:"text",text:"{REF}",x:-0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.3294553499999995}],ports:[{...ACn.left1,labels:["1"]},{...ACn.right1,labels:["2"]}],size:{width:W1e.width,height:W1e.height},center:{x:W1e.centerX,y:W1e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Pnr=Ln(_K).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Mnr,texts:Jmr,bounds:j1e,refblocks:cCn,circles:Dnr}=_K,Nnr=Ln({primitives:[...Object.values(Mnr),...Object.values(Dnr),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...cCn.left1,labels:["1"]},{...cCn.right1,labels:["2"]}],size:{width:j1e.width,height:j1e.height},center:{x:j1e.centerX,y:j1e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Rnr,texts:Wmr,bounds:$1e,refblocks:lCn,circles:Tnr}=_K,knr=Ln({primitives:[...Object.values(Rnr),...Object.values(Tnr),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...lCn.left1,labels:["1"]},{...lCn.right1,labels:["2"]}],size:{width:$1e.width,height:$1e.height},center:{x:$1e.centerX,y:$1e.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),pZe={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.14,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.18,y:.18},{x:.11,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.18,y:-.09},{x:.11,y:-.09}],color:"primary",fill:!1}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:Fnr,bounds:q1e,refblocks:uCn,circles:Lnr}=pZe,Hnr=Ln({primitives:[...Object.values(Fnr),...Object.values(Lnr),{type:"text",text:"{REF}",x:-.16,y:.2294553499999995},{type:"text",text:"{VAL}",x:.16,y:.2294553499999995}],ports:[{...uCn.left1,labels:["1"]},{...uCn.right1,labels:["2"]}],size:{width:q1e.width,height:q1e.height},center:{x:q1e.centerX,y:q1e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:Onr,bounds:X1e,refblocks:gCn,circles:Gnr}=pZe,dCn=Ln({primitives:[...Object.values(Onr),...Object.values(Gnr),{type:"text",text:"{REF}",x:-1118e-7,y:-.18},{type:"text",text:"{VAL}",x:1118e-7,y:.2738453}],ports:[{...gCn.left1,labels:["1"]},{...gCn.right1,labels:["2"]}],size:{width:X1e.width,height:X1e.height},center:{x:X1e.centerX,y:X1e.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["2"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Ynr,bounds:Z1e,refblocks:hCn,circles:Unr}=pZe,Knr=Ln({primitives:[...Object.values(Ynr),...Object.values(Unr),{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384529999999985,anchor:"middle_left"},{type:"text",text:"{VAL}",x:-.00011179999999999524,y:-.27384530000000007,anchor:"middle_left"}],ports:[{...hCn.left1,labels:["1"]},{...hCn.right1,labels:["2"]}],size:{width:Z1e.width,height:Z1e.height},center:{x:Z1e.centerX,y:Z1e.centerY}}).changeTextAnchor("{VAL}","middle_top").labelPort("right1",["2"]).labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),mZe=si(dCn,"down"),_Ze=mZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),fZe=mZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");_Ze.anchor="middle_left",fZe.anchor="middle_left",_Ze.x=.25,_Ze.y+=.21,fZe.y-=.21,fZe.x=.25;var Vnr=mZe,ote={paths:{path43:{type:"path",points:[{x:-.06,y:.19},{x:-.06,y:-.12}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.02,y:.13},{x:.02,y:-.06}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.06,y:.03},{x:-.5,y:.03}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5,y:.03},{x:.03,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.28}},refblocks:{left1:{x:-.5,y:.03},right1:{x:.5,y:.03}},bounds:{width:1,height:.29,centerX:0,centerY:.06},circles:{}},{paths:znr,bounds:pCn,refblocks:mCn,circles:Jnr}=ote,Wnr=Ln({primitives:[...Object.values(znr),...Object.values(Jnr),{type:"text",text:"{REF}",x:-.2,y:.31},{type:"text",text:"{VAL}",x:.2,y:.31}],ports:[{...mCn.left1,labels:["1"]},{...mCn.right1,labels:["2"]}],center:{x:pCn.centerX,y:pCn.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_left").build(),jnr={...Wnr,size:{width:1,height:.9}};function Gl(t){let e=t.size;if(!e){let n=GS(t.primitives);e={width:n.maxX-n.minX,height:n.maxY-n.minY}}return{...t,size:e}}var{paths:$nr,texts:_Cn,bounds:eIe,refblocks:fCn,circles:qnr}=ote,ICn=Gl({primitives:[...Object.values($nr),...Object.values(qnr),{..._Cn.top1,anchor:"middle_bottom"},{..._Cn.bottom1,anchor:"middle_top"}],ports:[{...fCn.left1,labels:["1"]},{...fCn.right1,labels:["2"]}],size:{width:eIe.width,height:eIe.height},center:{x:eIe.centerX,y:eIe.centerY}}),{paths:Xnr,bounds:CCn,refblocks:yCn,circles:Znr}=ote,eor=Ln({primitives:[...Object.values(Xnr),...Object.values(Znr),{type:"text",text:"{REF}",x:0,y:-.22},{type:"text",text:"{VAL}",x:0,y:.28}],ports:[{...yCn.left1,labels:["1"]},{...yCn.right1,labels:["2"]}],center:{x:CCn.centerX,y:CCn.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").build(),tor={...eor,size:{width:1,height:.65}},{paths:nor,bounds:xCn,refblocks:ECn,circles:oor}=ote,ior=Ln({primitives:[...Object.values(nor),...Object.values(oor),{type:"text",text:"{REF}",x:0,y:.28},{type:"text",text:"{VAL}",x:0,y:-.22}],ports:[{...ECn.left1,labels:["1"]},{...ECn.right1,labels:["2"]}],center:{x:xCn.centerX,y:xCn.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_bottom").build(),ror={...ior,size:{width:1,height:.65}},{paths:sor,bounds:BCn,refblocks:bCn,circles:aor}=ote,Aor=Ln({primitives:[...Object.values(sor),...Object.values(aor),{type:"text",text:"{REF}",x:.2,y:-.25},{type:"text",text:"{VAL}",x:-.2,y:-.25}],ports:[{...bCn.left1,labels:["1"]},{...bCn.right1,labels:["2"]}],center:{x:BCn.centerX,y:BCn.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_left").build(),cor={...Aor,size:{width:1,height:.9}},lor=nte(ICn,{newOrientation:"up"}),tIe={paths:{path1:{type:"path",points:[{x:-.3,y:0},{x:-.19998,y:0}],color:"primary",fill:!1,strokeWidth:.012},path2:{type:"path",points:[{x:.19998,y:0},{x:.3,y:0}],color:"primary",fill:!1,strokeWidth:.012},path3:{type:"path",points:[{x:-.19998,y:.07998},{x:.19998,y:.07998},{x:.19998,y:-.07998},{x:-.19998,y:-.07998},{x:-.19998,y:.07998}],color:"primary",fill:!1,strokeWidth:.012}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:uor,bounds:SCn,refblocks:QCn,circles:gor}=tIe,dor=Ln({primitives:[...Object.values(uor),...Object.values(gor),{type:"text",text:"{REF}",x:-.16,y:.16},{type:"text",text:"{VAL}",x:.16,y:.16}],ports:[{...QCn.left1,labels:["1"]},{...QCn.right1,labels:["2"]}],center:{x:SCn.centerX,y:SCn.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),hor={...dor,size:{width:.9,height:.6}},{paths:por,bounds:vCn,refblocks:wCn,circles:mor}=tIe,_or=Ln({primitives:[...Object.values(por),...Object.values(mor),{type:"text",text:"{REF}",x:0,y:-.16},{type:"text",text:"{VAL}",x:0,y:.16}],ports:[{...wCn.left1,labels:["1"]},{...wCn.right1,labels:["2"]}],center:{x:vCn.centerX,y:vCn.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Ior={..._or,size:{width:.6,height:.65}},{paths:Cor,bounds:PCn,refblocks:MCn,circles:yor}=tIe,xor=Ln({primitives:[...Object.values(Cor),...Object.values(yor),{type:"text",text:"{REF}",x:0,y:.16},{type:"text",text:"{VAL}",x:0,y:-.16}],ports:[{...MCn.left1,labels:["1"]},{...MCn.right1,labels:["2"]}],center:{x:PCn.centerX,y:PCn.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Eor={...xor,size:{width:.6,height:.65}},nIe={paths:{path2:{type:"path",points:[{x:.15,y:-.01},{x:.55,y:-.01}],color:"primary",fill:!0},"path2-5":{type:"path",points:[{x:-.15,y:.06},{x:.14,y:.06}],color:"primary",fill:!0},"path2-5-1":{type:"path",points:[{x:.14,y:.06},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-5-1-6":{type:"path",points:[{x:-.16,y:.06},{x:-.16,y:-.08}],color:"primary",fill:!0},"path2-5-4":{type:"path",points:[{x:-.15,y:-.08},{x:.14,y:-.08}],color:"primary",fill:!0},"path2-9":{type:"path",points:[{x:-.55,y:-.01},{x:-.17,y:-.01}],color:"primary",fill:!0}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{width:1.16,height:.35,centerX:0,centerY:0},circles:{}},{paths:Bor,bounds:oIe,refblocks:DCn,circles:bor}=nIe,Sor=Ln({primitives:[...Object.values(Bor),...Object.values(bor),{type:"text",text:"{REF}",x:-.2,y:.1404553499999995},{type:"text",text:"{VAL}",x:.2,y:.1494553499999995}],ports:[{...DCn.left1,labels:["1"]},{...DCn.right1,labels:["2"]}],size:{width:oIe.width,height:oIe.height},center:{x:oIe.centerX,y:oIe.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Qor,bounds:iIe,refblocks:NCn,circles:vor}=nIe,wor=Ln({primitives:[...Object.values(Qor),...Object.values(vor),{type:"text",text:"{REF}",x:0,y:-.2294553499999995},{type:"text",text:"{VAL}",x:0,y:.1704553499999995}],ports:[{...NCn.left1,labels:["1"]},{...NCn.right1,labels:["2"]}],size:{width:iIe.width,height:iIe.height},center:{x:iIe.centerX,y:iIe.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:Por,bounds:rIe,refblocks:RCn,circles:Mor}=nIe,Dor=Ln({primitives:[...Object.values(Por),...Object.values(Mor),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...RCn.left1,labels:["1"]},{...RCn.right1,labels:["2"]}],size:{width:rIe.width,height:rIe.height},center:{x:rIe.centerX,y:rIe.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:Nor,bounds:sIe,refblocks:TCn,circles:Ror}=nIe,Tor=Ln({primitives:[...Object.values(Nor),...Object.values(Ror),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...TCn.left1,labels:["1"]},{...TCn.right1,labels:["2"]}],size:{width:sIe.width,height:sIe.height},center:{x:sIe.centerX,y:sIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:kor,bounds:kCn,refblocks:FCn,circles:For}=tIe,Lor=Ln({primitives:[...Object.values(kor),...Object.values(For),{type:"text",text:"{REF}",x:.16,y:-.16},{type:"text",text:"{VAL}",x:-.16,y:-.16}],ports:[{...FCn.left1,labels:["1"]},{...FCn.right1,labels:["2"]}],center:{x:kCn.centerX,y:kCn.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),Hor={...Lor,size:{width:.9,height:.6}},IZe={paths:{"horizontal-bar":{type:"path",points:[{x:-.4,y:0},{x:.4,y:0}],color:"primary",fill:!1},"middle-dash-1":{type:"path",points:[{x:0,y:.2},{x:0,y:.07}],color:"primary",fill:!1},"middle-dash-2":{type:"path",points:[{x:0,y:.01},{x:0,y:-.12}],color:"primary",fill:!1},"middle-dash-3":{type:"path",points:[{x:0,y:-.18},{x:0,y:-.31}],color:"primary",fill:!1},"left-vertical":{type:"path",points:[{x:-.25,y:0},{x:-.25,y:-.2}],color:"primary",fill:!1},"right-vertical":{type:"path",points:[{x:.25,y:0},{x:.25,y:-.2}],color:"primary",fill:!1},"left-ground":{type:"path",points:[{x:-.3,y:-.2},{x:-.25,y:-.3},{x:-.2,y:-.2},{x:-.3,y:-.2}],color:"primary",fill:!1},"right-ground":{type:"path",points:[{x:.2,y:-.2},{x:.25,y:-.3},{x:.3,y:-.2},{x:.2,y:-.2}],color:"primary",fill:!1}},refblocks:{left1:{x:-.4,y:0},right1:{x:.4,y:0}},bounds:{centerX:0,centerY:-.02},circles:{}},{paths:Oor,bounds:LCn,refblocks:HCn,circles:Gor}=IZe,Yor=Ln({primitives:[...Object.values(Oor),...Object.values(Gor),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...HCn.left1,labels:["1"]},{...HCn.right1,labels:["2"]}],center:{x:LCn.centerX,y:LCn.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),{paths:Uor,bounds:OCn,refblocks:GCn,circles:Kor}=IZe,YCn=Ln({primitives:[...Object.values(Uor),...Object.values(Kor),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...GCn.left1,labels:["1"]},{...GCn.right1,labels:["2"]}],center:{x:OCn.centerX,y:OCn.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Vor=pK(YCn),{paths:zor,bounds:UCn,refblocks:KCn,circles:Jor}=IZe,Wor=Ln({primitives:[...Object.values(zor),...Object.values(Jor),{type:"text",text:"{REF}",x:0,y:.2594553499999995}],ports:[{...KCn.left1,labels:["1"]},{...KCn.right1,labels:["2"]}],center:{x:UCn.centerX,y:UCn.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").build(),aIe={paths:{path27:{type:"path",points:[{x:.3,y:0},{x:.06,y:0}],color:"primary",fill:!1,strokeWidth:.012},path28:{type:"path",points:[{x:-.06,y:0},{x:-.3,y:0}],color:"primary",fill:!1,strokeWidth:.012},path29:{type:"path",points:[{x:.06,y:.16002},{x:.06,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012},path30:{type:"path",points:[{x:-.06,y:.16002},{x:-.06,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.24,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-.24,anchor:"middle_top"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.24,maxY:.24,width:.6,height:.48,centerX:0,centerY:0},circles:{}},{paths:jor,texts:jmr,bounds:AIe,refblocks:VCn,circles:$or}=aIe,qor=Ln({primitives:[...Object.values(jor),...Object.values($or),{type:"text",text:"{REF}",x:-.2,y:.115},{type:"text",text:"{VAL}",x:.2,y:.115}],ports:[{...VCn.left1,labels:["1"]},{...VCn.right1,labels:["2"]}],size:{width:AIe.width,height:AIe.height},center:{x:AIe.centerX,y:AIe.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),Xor={...qor,size:{width:.9,height:.6}},Zor=Ln(aIe).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),eir={...Zor,size:{width:.6,height:.65}},cIe={paths:{path27:{type:"path",points:[{x:.3,y:0},{x:657e-6,y:0}],color:"primary",fill:!1,strokeWidth:.012},path28:{type:"path",points:[{x:-.038683,y:0},{x:-.3,y:0}],color:"primary",fill:!1,strokeWidth:.012},path30:{type:"path",points:[{x:-.074255,y:.16002},{x:-.074255,y:.16002},{x:-.069544,y:.149352},{x:-.065126,y:.138684},{x:-.061005,y:.128016},{x:-.057182,y:.117348},{x:-.053663,y:.10668},{x:-.05045,y:.096012},{x:-.047547,y:.085344},{x:-.044957,y:.074676},{x:-.042684,y:.064008},{x:-.040732,y:.05334},{x:-.039103,y:.042672},{x:-.037801,y:.032004},{x:-.03683,y:.021336},{x:-.036193,y:.010668},{x:-.035893,y:0},{x:-.036193,y:-.010668},{x:-.03683,y:-.021336},{x:-.037801,y:-.032004},{x:-.039103,y:-.042672},{x:-.040732,y:-.05334},{x:-.042684,y:-.064008},{x:-.044957,y:-.074676},{x:-.047547,y:-.085344},{x:-.05045,y:-.096012},{x:-.053663,y:-.10668},{x:-.057182,y:-.117348},{x:-.061005,y:-.128016},{x:-.065126,y:-.138684},{x:-.069544,y:-.149352},{x:-.074255,y:-.16002},{x:-.074255,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012},"path30-7":{type:"path",points:[{x:-385e-6,y:.16002},{x:-385e-6,y:-.16002}],color:"primary",fill:!1,strokeWidth:.012},"path30-9-2":{type:"path",points:[{x:.156026,y:.2},{x:.085846,y:.2}],color:"primary",fill:!1,strokeWidth:.012},"path30-9-2-9":{type:"path",points:[{x:.120936,y:.16491},{x:.120936,y:.23509}],color:"primary",fill:!1,strokeWidth:.012}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.42,anchor:"middle_bottom"},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42,anchor:"middle_top"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.55,maxY:.55,width:.6,height:1.1,centerX:0,centerY:0},circles:{"viewbox-padding-min":{type:"circle",x:-.3,y:-.55,radius:0,fill:!1,color:"transparent"},"viewbox-padding-max":{type:"circle",x:.3,y:.55,radius:0,fill:!1,color:"transparent"}}},tir=Ln(cIe).rotateRightFacingSymbol("up").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.3}).changeTextAnchor("{VAL}","middle_left",{x:-.12,y:-.3}).build(),nir=Ln(cIe).rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),oir=Ln(cIe).rotateRightFacingSymbol("left").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.78}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.78}).build(),iir=Ln(cIe).rotateRightFacingSymbol("down").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_left",{x:-.12,y:.3}).changeTextAnchor("{VAL}","middle_left",{x:.72,y:-.3}).build(),rir=Ln(aIe).rotateRightFacingSymbol("right").changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").build(),sir={...rir,size:{width:.6,height:.65}},{paths:air,texts:$mr,bounds:lIe,refblocks:zCn,circles:Air}=aIe,cir=Ln({primitives:[...Object.values(air),...Object.values(Air),{type:"text",text:"{REF}",x:.2,y:-.095},{type:"text",text:"{VAL}",x:-.2,y:-.095}],ports:[{...zCn.left1,labels:["1"]},{...zCn.right1,labels:["2"]}],size:{width:lIe.width,height:lIe.height},center:{x:lIe.centerX,y:lIe.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),lir={...cir,size:{width:.9,height:.6}},fK={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.29,y:.29},{x:.29,y:-.23}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.37}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.37,maxY:.37,width:1.14,height:.74,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:uir,texts:qmr,bounds:uIe,refblocks:JCn,circles:gir}=fK,dir=Ln({primitives:[...Object.values(uir),...Object.values(gir),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...JCn.left1,labels:["1"]},{...JCn.right1,labels:["2"]}],size:{width:uIe.width,height:uIe.height},center:{x:uIe.centerX,y:uIe.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),hir=Ln(fK).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:pir,texts:Xmr,bounds:gIe,refblocks:WCn,circles:mir}=fK,_ir=Ln({primitives:[...Object.values(pir),...Object.values(mir),{type:"text",text:"{REF}",x:-0,y:-.2894553499999995},{type:"text",text:"{VAL}",x:0,y:.3894553499999995}],ports:[{...WCn.left1,labels:["1"]},{...WCn.right1,labels:["2"]}],size:{width:gIe.width,height:gIe.height},center:{x:gIe.centerX,y:gIe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),fir=Ln(fK).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1","neg"]).labelPort("right1",["2","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Iir,texts:Zmr,bounds:dIe,refblocks:jCn,circles:Cir}=fK,yir=Ln({primitives:[...Object.values(Iir),...Object.values(Cir),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...jCn.left1,labels:["1"]},{...jCn.right1,labels:["2"]}],size:{width:dIe.width,height:dIe.height},center:{x:dIe.centerX,y:dIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:xir,texts:e_r,bounds:hIe,refblocks:$Cn,circles:Eir}=fK,Bir=Ln({primitives:[...Object.values(xir),...Object.values(Eir),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...$Cn.left1,labels:["1"]},{...$Cn.right1,labels:["2"]}],size:{width:hIe.width,height:hIe.height},center:{x:hIe.centerX,y:hIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),pIe={paths:{path27:{type:"path",points:[{x:.54,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:.25},{x:.13,y:-.27}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:.25},{x:.07,y:-.28}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:.25},{x:-.14,y:-.27}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:.26},{x:-.08,y:-.27}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.21,y:.32},{x:.2,y:.32}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.71},{x:0,y:.33},{x:0,y:.32}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:-.21,y:.32},{x:-.21,y:.25}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.2,y:.32},{x:.2,y:.25}],color:"primary",fill:!1},"path43-9":{type:"path",points:[{x:.19,y:-.35},{x:-.22,y:-.35}],color:"primary",fill:!1},"path44-0-5":{type:"path",points:[{x:-.02,y:-.71},{x:-.02,y:-.36},{x:-.02,y:-.35}],color:"primary",fill:!1},"path43-8-1":{type:"path",points:[{x:.19,y:-.35},{x:.19,y:-.28}],color:"primary",fill:!1},"path43-8-8-9":{type:"path",points:[{x:-.22,y:-.35},{x:-.22,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.54,y:-.01}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"{REF}",x:.53,y:.28},right1:{type:"text",text:"{VAL}",x:.54,y:-.28}},refblocks:{top1:{x:0,y:.71},bottom1:{x:-.02,y:-.71},left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.74,maxY:.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:bir,texts:t_r,bounds:mIe,refblocks:_Ie,circles:Sir}=pIe,Qir=Ln({primitives:[...Object.values(bir),...Object.values(Sir),{type:"text",text:"{REF}",x:-.4,y:.4094554499999995},{type:"text",text:"{VAL}",x:.4,y:.4094553499999995}],ports:[{..._Ie.left1,labels:["1"]},{..._Ie.right1,labels:["3"]},{..._Ie.bottom1,labels:["2"]},{..._Ie.top1,labels:["4"]}],size:{width:mIe.width,height:mIe.height},center:{x:mIe.centerX,y:mIe.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),vir=Ln(pIe).labelPort("top1",["2","gnd1"]).labelPort("bottom1",["4","gnd2"]).labelPort("left1",["3"]).labelPort("right1",["1"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),wir=Ln(pIe).labelPort("top1",["4","gnd1"]).labelPort("bottom1",["2","gnd2"]).labelPort("left1",["1"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),{paths:Pir,texts:n_r,bounds:fIe,refblocks:IIe,circles:Mir}=pIe,Dir=Ln({primitives:[...Object.values(Pir),...Object.values(Mir),{type:"text",text:"{VAL}",x:-.4,y:-.4094554499999995},{type:"text",text:"{REF}",x:.4,y:-.4094553499999995}],ports:[{...IIe.left1,labels:["1"]},{...IIe.right1,labels:["3"]},{...IIe.bottom1,labels:["2"]},{...IIe.top1,labels:["4"]}],size:{width:fIe.width,height:fIe.height},center:{x:fIe.centerX,y:fIe.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","bottom_left").changeTextAnchor("{VAL}","top_left").build(),CIe={paths:{path27:{type:"path",points:[{x:.55,y:-.01},{x:.13,y:-.01}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.14,y:-.01},{x:-.55,y:-.01}],color:"primary",fill:!1},path29:{type:"path",points:[{x:.13,y:-.28},{x:.13,y:.25}],color:"primary",fill:!1},"path29-2":{type:"path",points:[{x:.07,y:-.28},{x:.07,y:.25}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.14,y:-.28},{x:-.14,y:.25}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.08,y:-.28},{x:-.08,y:.25}],color:"primary",fill:!1},"path29-2-7":{type:"path",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:"primary",fill:!1},"path29-2-7-6":{type:"path",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{VAL}",x:-.01,y:-.42},bottom1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{minX:-.58,maxX:.58,minY:-.52,maxY:.43,width:1.16,height:1,centerX:0,centerY:-.04},circles:{}},{paths:Nir,texts:o_r,bounds:yIe,refblocks:qCn,circles:Rir}=CIe,Tir=Ln({primitives:[...Object.values(Nir),...Object.values(Rir),{type:"text",text:"{REF}",x:-.3,y:.3094553499999995},{type:"text",text:"{VAL}",x:.3,y:.3094553499999995}],ports:[{...qCn.left1,labels:["1"]},{...qCn.right1,labels:["2"]}],size:{width:yIe.width,height:yIe.height},center:{x:yIe.centerX,y:yIe.centerY}}).changeTextAnchor("{VAL}","top_left").rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),kir=Ln(CIe).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("right1",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").build(),Fir=Ln(CIe).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Lir,texts:i_r,bounds:xIe,refblocks:XCn,circles:Hir}=CIe,Oir=Ln({primitives:[...Object.values(Lir),...Object.values(Hir),{type:"text",text:"{REF}",x:.3,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.3094553499999995}],ports:[{...XCn.left1,labels:["1"]},{...XCn.right1,labels:["2"]}],size:{width:xIe.width,height:xIe.height},center:{x:xIe.centerX,y:xIe.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","bottom_left").build(),ite=.6,CZe=.3,Gir=[{type:"path",points:[{x:-ite,y:0},{x:-CZe,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:CZe,y:0},{x:ite,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:CZe,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],Yir=Ln({primitives:[...Gir,{type:"text",text:"{REF}",x:-.2,y:.35},{type:"text",text:"{VAL}",x:.2,y:.35}],ports:[{x:-ite,y:0,labels:["1"]},{x:ite,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:ite*2,height:.9}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),rte=.6,yZe=.3,Uir=[{type:"path",points:[{x:-rte,y:0},{x:-yZe,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:yZe,y:0},{x:rte,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:yZe,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],Kir=Ln({primitives:[...Uir,{type:"text",text:"{REF}",x:0,y:-.4},{type:"text",text:"{VAL}",x:0,y:.4}],ports:[{x:-rte,y:0,labels:["1"]},{x:rte,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:rte*2,height:.9}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),ste=.6,xZe=.3,Vir=[{type:"path",points:[{x:-ste,y:0},{x:-xZe,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:xZe,y:0},{x:ste,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:xZe,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],zir=Ln({primitives:[...Vir,{type:"text",text:"{REF}",x:0,y:.4},{type:"text",text:"{VAL}",x:0,y:-.4}],ports:[{x:-ste,y:0,labels:["1"]},{x:ste,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:ste*2,height:.9}}).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),ate=.6,EZe=.3,Jir=[{type:"path",points:[{x:-ate,y:0},{x:-EZe,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:EZe,y:0},{x:ate,y:0}],color:"primary",fill:!1},{type:"circle",x:0,y:0,radius:EZe,color:"primary",fill:!1},{type:"path",points:[{x:-.1,y:0},{x:.15,y:0}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:.08}],color:"primary",fill:!1},{type:"path",points:[{x:.15,y:0},{x:.05,y:-.08}],color:"primary",fill:!1}],Wir=Ln({primitives:[...Jir,{type:"text",text:"{REF}",x:.2,y:-.35},{type:"text",text:"{VAL}",x:-.2,y:-.35}],ports:[{x:-ate,y:0,labels:["1"]},{x:ate,y:0,labels:["2"]}],center:{x:0,y:0},size:{width:ate*2,height:.9}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),IK={paths:{path11:{type:"path",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:"primary",fill:!1},"arrow-2":{type:"path",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:"primary",fill:!0},path1:{type:"path",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:"primary",fill:!1},path2:{type:"path",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:"primary",fill:!1},path3:{type:"path",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:"primary",fill:!1},path4:{type:"path",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:"primary",fill:!1},"arrow-1":{type:"path",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:"primary",fill:!0},path9:{type:"path",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:1.88,y:-1.94},right1:{type:"text",text:"{REF}",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:.77,height:.86,centerX:1.96,centerY:-1.55},circles:{"path1-0":{type:"circle",x:2.05,y:-1.54,radius:.3,color:"primary",fill:!1}}},jir=Ln(IK).rotateRightFacingSymbol("down").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:0,y:.15}).build(),$ir=Ln(IK).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),qir=Ln(IK).rotateRightFacingSymbol("left").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.8}).changeTextAnchor("{REF}","middle_left",{x:0,y:.8}).build(),Xir=Ln(IK).rotateRightFacingSymbol("right").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_right").changeTextAnchor("{REF}","middle_right").build(),Zir=Ln(IK).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),err=Ln(IK).rotateRightFacingSymbol("up").labelPort("right2",["1"]).labelPort("right1",["2"]).labelPort("right3",["3"]).changeTextAnchor("{VAL}","middle_left",{x:0,y:-.15}).changeTextAnchor("{REF}","middle_left",{x:.8,y:.15}).build(),trr={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:0,radius:.29,color:"primary",fill:!1}}},{paths:ZCn,bounds:EIe,refblocks:eyn,circles:nrr}=trr,Ate=Gl({primitives:[ZCn.path11,ZCn.path12,{type:"path",points:[{x:-.12,y:.14},{x:.12,y:.14}],color:"primary",fill:!1},...Object.values(nrr),{type:"text",text:"{REF}",x:0,y:.3594553499999995,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.35,anchor:"middle_top"},{type:"path",points:[{x:-.095,y:-.16},{x:0,y:.09}],color:"primary",fill:!1},{type:"path",points:[{x:0,y:.09},{x:.095,y:-.16}],color:"primary",fill:!1},{type:"path",points:[{x:-.048,y:-.045},{x:.048,y:-.045}],color:"primary",fill:!1}],ports:[{...eyn.left1,labels:["1"]},{...eyn.right1,labels:["2"]}],size:{width:EIe.width,height:EIe.height},center:{x:EIe.centerX,y:EIe.centerY}}),BZe=structuredClone(Ate);BZe.primitives=BZe.primitives.map(t=>t.type!=="text"?t:t.text==="{REF}"?{...t,x:-.16,y:.3594553499999995,anchor:"middle_bottom"}:t.text==="{VAL}"?{...t,x:.16,y:.35,anchor:"middle_bottom"}:t);var tyn=nte(BZe,{newOrientation:"down"}),orr=pK(Ate),irr=Ate,bZe=structuredClone(Ate);bZe.primitives=bZe.primitives.map(t=>t.type!=="text"?t:t.text==="{REF}"?{...t,x:.16,y:-.3594553499999995,anchor:"middle_top"}:t.text==="{VAL}"?{...t,x:-.16,y:-.35,anchor:"middle_top"}:t);var rrr=nte(bZe,{newOrientation:"up"}),CK={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.12,y:-.14},{x:.12,y:-.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:srr,bounds:BIe,refblocks:nyn,circles:arr}=CK,Arr=Ln({primitives:[...Object.values(srr),...Object.values(arr),{type:"text",text:"{REF}",x:-.15,y:.3894553499999995},{type:"text",text:"{VAL}",x:.15,y:.3894553499999995}],ports:[{...nyn.left1,labels:["1"]},{...nyn.right1,labels:["2"]}],size:{width:BIe.width,height:BIe.height},center:{x:BIe.centerX,y:BIe.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:crr,bounds:bIe,refblocks:oyn,circles:lrr}=CK,urr=Ln({primitives:[...Object.values(crr),...Object.values(lrr),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...oyn.left1,labels:["1"]},{...oyn.right1,labels:["2"]}],size:{width:bIe.width,height:bIe.height},center:{x:bIe.centerX,y:bIe.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:grr,bounds:SIe,refblocks:iyn,circles:drr}=CK,hrr=Ln({primitives:[...Object.values(grr),...Object.values(drr),{type:"text",text:"{REF}",x:-0,y:-.3294553499999995},{type:"text",text:"{VAL}",x:0,y:.4294553499999995}],ports:[{...iyn.left1,labels:["1"]},{...iyn.right1,labels:["2"]}],size:{width:SIe.width,height:SIe.height},center:{x:SIe.centerX,y:SIe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:prr,bounds:QIe,refblocks:ryn,circles:mrr}=CK,_rr=Ln({primitives:[...Object.values(prr),...Object.values(mrr),{type:"text",text:"{REF}",x:-0,y:.3894553499999995},{type:"text",text:"{VAL}",x:0,y:-.3294553499999995}],ports:[{...ryn.left1,labels:["1"]},{...ryn.right1,labels:["2"]}],size:{width:QIe.width,height:QIe.height},center:{x:QIe.centerX,y:QIe.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:frr,bounds:vIe,refblocks:syn,circles:Irr}=CK,Crr=Ln({primitives:[...Object.values(frr),...Object.values(Irr),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...syn.left1,labels:["1"]},{...syn.right1,labels:["2"]}],size:{width:vIe.width,height:vIe.height},center:{x:vIe.centerX,y:vIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:yrr,bounds:wIe,refblocks:ayn,circles:xrr}=CK,Err=Ln({primitives:[...Object.values(yrr),...Object.values(xrr),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...ayn.left1,labels:["1"]},{...ayn.right1,labels:["2"]}],size:{width:wIe.width,height:wIe.height},center:{x:wIe.centerX,y:wIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),yK={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.03,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},Brr=Ln(yK).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:-.03,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.8,y:-.2}).build(),brr=Ln(yK).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),Srr=Ln(yK).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.8}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.9}).build(),Qrr=Ln(yK).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.1}).changeTextAnchor("{VAL}","middle_top").build(),vrr=Ln(yK).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),wrr=Ln(yK).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left",{x:.7,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:-.13,y:-.2}).build(),PIe={paths:{triangle:{type:"path",points:[{x:-.06,y:-.09},{x:-.06,y:.09},{x:.06,y:0},{x:-.06,y:-.09}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.11,y:0},{x:-.06,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.11,y:0}},bounds:{centerX:0,centerY:0}},{paths:Prr,bounds:Ayn,refblocks:Mrr}=PIe,Drr=Ln({primitives:[...Object.values(Prr),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...Mrr.left1,labels:["1"]}],center:{x:Ayn.centerX,y:Ayn.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:Nrr,bounds:cyn,refblocks:Rrr}=PIe,Trr=Ln({primitives:[...Object.values(Nrr),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...Rrr.left1,labels:["1"]}],center:{x:cyn.centerX,y:cyn.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:krr,bounds:lyn,refblocks:Frr}=PIe,Lrr=Ln({primitives:[...Object.values(krr),{type:"text",text:"{REF}",x:-.13,y:-0}],ports:[{...Frr.left1,labels:["1"]}],center:{x:lyn.centerX,y:lyn.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:Hrr,bounds:uyn,refblocks:Orr}=PIe,Grr=Ln({primitives:[...Object.values(Hrr),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...Orr.left1,labels:["1"]}],center:{x:uyn.centerX,y:uyn.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),Yrr={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},MIe=Ln(Yrr).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Urr=si(MIe,"down"),Krr=si(MIe,"left"),Vrr=si(MIe,"up"),zrr={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-2":{type:"path",points:[{x:-.07,y:.22},{x:.11,y:.16}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-5":{type:"path",points:[{x:-.07,y:-.19},{x:.1,y:-.24}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.2},{x:0,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.56},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},DIe=Ln(zrr).labelPort("left1",["1"]).labelPort("right1",["3"]).labelPort("right2",["2"]).labelPort("right3",["6"]).labelPort("left2",["4"]).labelPort("right5",["5"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),SZe=si(DIe,"down"),QZe=SZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),vZe=SZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");QZe.anchor="middle_bottom",vZe.anchor="middle_top",QZe.x=0,QZe.y+=.537,vZe.y-=.5375,vZe.x=0;var Jrr=SZe,wZe=si(DIe,"left"),PZe=wZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),MZe=wZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");PZe.anchor="middle_bottom",MZe.anchor="middle_top",PZe.x=0,PZe.y+=1,MZe.y-=1,MZe.x=0;var Wrr=wZe,DZe=si(DIe,"up"),NZe=DZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),RZe=DZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");NZe.anchor="middle_bottom",RZe.anchor="middle_top",NZe.x=0,NZe.y+=.537,RZe.y-=.5375,RZe.x=0;var jrr=DZe,$rr={paths:{path1:{type:"path",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.23},{x:.11,y:.33}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:.13},{x:.37,y:.13}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.36},{x:.37,y:.36}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:"primary",fill:!1},"path4-6":{type:"path",points:[{x:-.07,y:-.18},{x:.11,y:-.07}],color:"primary",fill:!1},path5:{type:"path",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:"primary",fill:!1},"path1-4-join":{type:"path",points:[{x:0,y:-.12},{x:0,y:.27}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.61},bottom1:{type:"text",text:"{VAL}",x:0,y:-.52}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{"circle-2":{type:"circle",x:.08,y:.13,radius:.02,color:"primary",fill:!1},"circle-5":{type:"circle",x:.08,y:-.27,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:.08,y:.37,radius:.02,color:"primary",fill:!1},"circle-6":{type:"circle",x:.08,y:-.04,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.22,radius:.02,color:"primary",fill:!1},"circle-4":{type:"circle",x:-.1,y:-.18,radius:.02,color:"primary",fill:!1}}},NIe=Ln($rr).labelPort("left1",["1"]).labelPort("right1",["3"]).labelPort("right2",["2"]).labelPort("right3",["6"]).labelPort("left2",["4"]).labelPort("right5",["5"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),TZe=si(NIe,"down"),kZe=TZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),FZe=TZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");kZe.anchor="middle_bottom",FZe.anchor="middle_top",kZe.x=0,kZe.y+=.565,FZe.y-=.555,FZe.x=0;var qrr=TZe,LZe=si(NIe,"left"),HZe=LZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),OZe=LZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");HZe.anchor="middle_bottom",OZe.anchor="middle_top",HZe.x=0,HZe.y+=1.09,OZe.y-=1.09,OZe.x=0;var Xrr=LZe,GZe=si(NIe,"up"),YZe=GZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),UZe=GZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");YZe.anchor="middle_bottom",UZe.anchor="middle_top",YZe.x=0,YZe.y+=.565,UZe.y-=.555,UZe.x=0;var Zrr=GZe,esr={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.11,y:.11}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.17},{x:.11,y:-.12}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.31}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},RIe=Ln(esr).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),KZe=si(RIe,"down"),VZe=KZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),zZe=KZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");VZe.anchor="middle_bottom",zZe.anchor="middle_top",VZe.x=.4,VZe.y+=.265,zZe.y-=.265,zZe.x=.4;var tsr=KZe,JZe=si(RIe,"left"),WZe=JZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),jZe=JZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");WZe.anchor="middle_bottom",jZe.anchor="middle_top",WZe.x=0,WZe.y+=.67,jZe.y-=.67,jZe.x=0;var nsr=JZe,$Ze=si(RIe,"up"),qZe=$Ze.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),XZe=$Ze.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");qZe.anchor="middle_bottom",XZe.anchor="middle_top",qZe.x=.46,qZe.y+=.265,XZe.y-=.265,XZe.x=.46;var osr=$Ze,isr={paths:{path11:{type:"path",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:.07},{x:.1,y:.2}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.13,y:.06},{x:.38,y:.06}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:-.09,y:-.16},{x:.1,y:-.03}],color:"primary",fill:!1},"path12-0":{type:"path",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.42}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{"circle-4":{type:"circle",x:.1,y:.06,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.1,y:-.17,radius:.02,color:"primary",fill:!1},"circle-3":{type:"circle",x:-.11,y:.06,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.11,y:-.17,radius:.02,color:"primary",fill:!1}}},TIe=Ln(isr).labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("right3",["4"]).labelPort("left3",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),ZZe=si(TIe,"down"),eet=ZZe.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),tet=ZZe.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");eet.anchor="middle_bottom",tet.anchor="middle_top",eet.x=.4,eet.y+=.295,tet.y-=.295,tet.x=.42;var rsr=ZZe,net=si(TIe,"left"),oet=net.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),iet=net.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");oet.anchor="middle_bottom",iet.anchor="middle_top",oet.x=0,oet.y+=.795,iet.y-=.795,iet.x=0;var ssr=net,ret=si(TIe,"up"),set=ret.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),aet=ret.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");set.anchor="middle_bottom",aet.anchor="middle_top",set.x=.46,set.y+=.315,aet.y-=.315,aet.x=.46;var asr=ret,gyn={paths:{path5:{type:"path",points:[{x:-.44,y:0},{x:-.16,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.17,y:0},{x:.44,y:.01}],color:"primary",fill:!1},path9:{type:"path",points:[{x:-.25,y:-.16},{x:.02,y:.3},{x:.25,y:.17},{x:-.02,y:-.29},{x:-.25,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.44,y:0},right1:{x:.44,y:.01}},bounds:{minX:-.57,maxX:.57,minY:-.25,maxY:.25,width:1.13,height:.5,centerX:0,centerY:0},circles:{}},{paths:Asr,texts:r_r,bounds:kIe,refblocks:dyn,circles:csr}=gyn,hyn=Ln({primitives:[...Object.values(Asr),...Object.values(csr),{type:"text",text:"{REF}",x:.18,y:-.3204553499999995},{type:"text",text:"{VAL}",x:-.25,y:-.3294553499999995}],ports:[{...dyn.left1,labels:["1"]},{...dyn.right1,labels:["2"]}],size:{width:kIe.width,height:kIe.height},center:{x:kIe.centerX,y:kIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Aet=hK(hyn),cet=Aet.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),uet=Aet.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");cet.anchor="middle_left",uet.anchor="middle_left",cet.y+=.4,cet.x=.32,uet.y-=.45,uet.x=.32;var lsr=Aet,pyn=Ln(gyn).labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),usr=pK(pyn),xK={paths:{path11:{type:"path",points:[{x:-.56,y:.04},{x:-.22,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:.05},{x:.48,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.14,y:-.15},{x:.14,y:.25}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.22,y:.25},{x:-.21,y:-.15},{x:.14,y:.05},{x:-.22,y:.25}],color:"primary",fill:!0}},refblocks:{left1:{x:-.56,y:.04},right1:{x:.48,y:.05}},bounds:{width:1.18,height:.76,centerX:0,centerY:0},circles:{}},{paths:gsr,bounds:FIe,refblocks:myn,circles:dsr}=xK,hsr=Ln({primitives:[...Object.values(gsr),...Object.values(dsr),{type:"text",text:"{REF}",x:-.15,y:.3294553499999995},{type:"text",text:"{VAL}",x:.15,y:.3294553499999995}],ports:[{...myn.left1,labels:["1"]},{...myn.right1,labels:["2"]}],size:{width:FIe.width,height:FIe.height},center:{x:FIe.centerX,y:FIe.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:psr,bounds:LIe,refblocks:_yn,circles:msr}=xK,_sr=Ln({primitives:[...Object.values(psr),...Object.values(msr),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{..._yn.left1,labels:["1"]},{..._yn.right1,labels:["2"]}],size:{width:LIe.width,height:LIe.height},center:{x:LIe.centerX,y:LIe.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:fsr,bounds:HIe,refblocks:fyn,circles:Isr}=xK,Csr=Ln({primitives:[...Object.values(fsr),...Object.values(Isr),{type:"text",text:"{REF}",x:-0,y:-.3094553499999995},{type:"text",text:"{VAL}",x:0,y:.4094553499999995}],ports:[{...fyn.left1,labels:["1"]},{...fyn.right1,labels:["2"]}],size:{width:HIe.width,height:HIe.height},center:{x:HIe.centerX,y:HIe.centerY}}).changeTextAnchor("{VAL}","middle_bottom").rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:ysr,bounds:OIe,refblocks:Iyn,circles:xsr}=xK,Esr=Ln({primitives:[...Object.values(ysr),...Object.values(xsr),{type:"text",text:"{REF}",x:-0,y:.4094553499999995},{type:"text",text:"{VAL}",x:0,y:-.4094553499999995}],ports:[{...Iyn.left1,labels:["1"]},{...Iyn.right1,labels:["2"]}],size:{width:OIe.width,height:OIe.height},center:{x:OIe.centerX,y:OIe.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Bsr,bounds:GIe,refblocks:Cyn,circles:bsr}=xK,Ssr=Ln({primitives:[...Object.values(Bsr),...Object.values(bsr),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...Cyn.left1,labels:["1"]},{...Cyn.right1,labels:["2"]}],size:{width:GIe.width,height:GIe.height},center:{x:GIe.centerX,y:GIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Qsr,bounds:YIe,refblocks:yyn,circles:vsr}=xK,wsr=Ln({primitives:[...Object.values(Qsr),...Object.values(vsr),{type:"text",text:"{REF}",x:.15,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2894553499999995}],ports:[{...yyn.left1,labels:["1"]},{...yyn.right1,labels:["2"]}],size:{width:YIe.width,height:YIe.height},center:{x:YIe.centerX,y:YIe.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Psr={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Hz",x:0,y:-.04}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:Msr,texts:Dsr,bounds:UIe,refblocks:xyn,circles:Nsr}=Psr,get=Gl({primitives:[...Object.values(Msr),...Object.values(Nsr),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...Dsr.left1,x:0,y:.01,anchor:"center",fontSize:.2}],ports:[{...xyn.left1,labels:["1"]},{...xyn.right1,labels:["2"]}],size:{width:UIe.width,height:UIe.height},center:{x:UIe.centerX,y:UIe.centerY}}),{5:Rsr,...Tsr}=get.primitives;function ksr(t){return typeof t=="object"}var Eyn=si({...get,primitives:Object.values(Tsr).filter(ksr)}),Fsr={...Eyn,primitives:[...Eyn.primitives,Rsr]},Lsr={paths:{path10:{type:"path",points:[{x:-.53,y:.04},{x:.53,y:.04}],color:"primary",fill:!1},path14:{type:"path",points:[{x:0,y:.17},{x:.27,y:.17},{x:.27,y:-.1},{x:-.26,y:-.1},{x:-.26,y:.17},{x:0,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.24}},refblocks:{left1:{x:-.53,y:.04},right1:{x:.53,y:.04}},bounds:{width:1.13,height:.47,centerX:0,centerY:0}},{paths:Hsr,texts:Osr,bounds:KIe,refblocks:Byn}=Lsr,byn=Gl({primitives:[...Object.values(Hsr),{...Osr.top1,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.2,anchor:"middle_top"}],ports:[{...Byn.left1,labels:["1"]},{...Byn.right1,labels:["2"]}],size:{width:KIe.width,height:KIe.height},center:{x:KIe.centerX,y:KIe.centerY}}),Gsr=si(byn),EK={paths:{path1:{type:"path",points:[{x:-.29,y:.01},{x:.04,y:0}],color:"primary",fill:!0},path2:{type:"path",points:[{x:.04,y:-.22},{x:.04,y:.22}],color:"primary",fill:!0},path3:{type:"path",points:[{x:.12,y:-.17},{x:.12,y:.17}],color:"primary",fill:!0},path4:{type:"path",points:[{x:.19,y:-.06},{x:.19,y:.06}],color:"primary",fill:!0}},texts:{right1:{type:"text",text:"{REF}",x:.31,y:-.02}},refblocks:{left1:{x:-.29,y:.01}},bounds:{minX:-.31,maxX:.31,minY:-.22,maxY:.22,width:.62,height:.45,centerX:0,centerY:0},circles:{}},Ysr=Ln(EK).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),Usr=Ln(EK).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),Ksr=Ln(EK).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),Vsr=Ln(EK).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),zsr=Ln(EK).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),Jsr=Ln(EK).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),det={paths:{path11:{type:"path",points:[{x:-.52,y:.03},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.04},{x:.52,y:.04}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.31,y:.2},{x:-.31,y:-.11},{x:-.01,y:.04},{x:-.3,y:.2}],color:"primary",fill:!0},"path11-0-9-5":{type:"path",points:[{x:.33,y:.2},{x:.33,y:-.1},{x:.04,y:.04},{x:.33,y:.2}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.04,y:.32},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.32}},refblocks:{left1:{x:-.52,y:.03},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.32,maxY:.32,width:1.09,height:.63,centerX:0,centerY:0},circles:{}},{paths:s_r,texts:a_r,bounds:A_r,refblocks:c_r,circles:l_r}=det,Wsr=Ln(det).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),jsr=Ln(det).rotateRightFacingSymbol("down").changeTextAnchor("{VAL}","middle_right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),$sr={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.3,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:"primary",fill:!1},box:{type:"path",points:[{x:-.3,y:-.4},{x:.3,y:-.4},{x:.3,y:.4},{x:-.3,y:.4},{x:-.3,y:-.4},{x:-.3,y:.4}],color:"primary",fill:!1},"path48-1":{type:"path",points:[{x:-.3,y:.13},{x:-.54,y:.13}],color:"primary",fill:!1},"path48-2":{type:"path",points:[{x:-.3,y:-.13},{x:-.54,y:-.13}],color:"primary",fill:!1},"path48-3":{type:"path",points:[{x:.3,y:-.13},{x:.54,y:-.13}],color:"primary",fill:!1},"path48-4":{type:"path",points:[{x:.3,y:.13},{x:.54,y:.13}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.43},right1:{type:"text",text:"{REF}",x:0,y:.43}},refblocks:{left1:{x:-.54,y:.13},left2:{x:-.54,y:-.13},right1:{x:.54,y:-.13},right2:{x:.54,y:.13}},bounds:{minX:-.56,maxX:.56,minY:-.32,maxY:.32,width:1.13,height:.65,centerX:0,centerY:0},circles:{}},VIe=Ln($sr).labelPort("left1",["1","DIN"]).labelPort("left2",["2","POWER"]).labelPort("right1",["3","GND"]).labelPort("right2",["4","DOUT"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),qsr=si(VIe,"down"),Xsr=pK(VIe),het=si(VIe,"up"),pet=het.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),met=het.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");pet.anchor="middle_left",met.anchor="middle_left",pet.y+=.21,pet.x=.44,met.y-=.21,met.x=.44;var Zsr=het,ear={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:-.01,y:0}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.01,y:-.12},{x:.01,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.28,y:-.25},{x:.28,y:-.56}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.56},{x:.28,y:.27}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.17,y:-.22},{x:.28,y:-.23},{x:.23,y:-.14}],color:"primary",fill:!0},path17:{type:"path",points:[{x:.08,y:-.09},{x:.23,y:-.2}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.28,y:.26}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.36},bottom1:{type:"text",text:"{VAL}",x:.02,y:-.42}},refblocks:{top1:{x:.28,y:.56},bottom1:{x:.28,y:-.56},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:.01,radius:.29,color:"primary",fill:!1}}},Syn=Ln(ear).changeTextAnchor("{VAL}","middle_right").labelPort("left1",["3"]).labelPort("top1",["2"]).labelPort("bottom1",["1"]).changeTextAnchor("{REF}","middle_right").build(),_et=si(Syn),fet=_et.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Qyn=_et.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");fet.anchor="middle_left",Qyn.anchor="middle_right",fet.x=.45,fet.y+=.065,Qyn.y+=.065;var tar=_et,nar={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.02,y:-.02},{x:.02,y:-.1}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.19},{x:-.17,y:-.19}],color:"primary",fill:!1},"path12-1-5-6-8":{type:"path",points:[{x:.02,y:.17},{x:.02,y:.11}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.15,y:-.03},{x:.2,y:-.19}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.19},{x:.47,y:-.19}],color:"primary",fill:!1},"path12-1-8-6-9-4":{type:"path",points:[{x:.02,y:.12},{x:.02,y:.02}],color:"primary",fill:!1},"path12-1-8-6-9-4-3":{type:"path",points:[{x:.08,y:.11},{x:.08,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-3-1":{type:"path",points:[{x:-.04,y:.11},{x:-.04,y:.05}],color:"primary",fill:!1},"path12-1-8-6-9-4-4":{type:"path",points:[{x:.08,y:.11},{x:-.04,y:.11}],color:"primary",fill:!1},"path14-5":{type:"path",points:[{x:-.01,y:.28},{x:.01,y:.25},{x:.04,y:.23},{x:.06,y:.2}],color:"primary",fill:!0},"path14-5-3":{type:"path",points:[{x:-.01,y:.2},{x:.01,y:.23},{x:.04,y:.25},{x:.06,y:.28}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.38},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.38}},refblocks:{left1:{x:-.47,y:-.19},right1:{x:.47,y:-.19}},bounds:{minX:-.5,maxX:.5,minY:-.38,maxY:.38,width:1,height:.76,centerX:0,centerY:0},circles:{path9:{type:"circle",x:.02,y:.24,radius:.06,color:"primary",fill:!1}}},vyn=Ln(nar).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),wyn=si(vyn),Pyn=wyn.primitives.filter(t=>t.type==="text"),Iet=Pyn.find(t=>t.text==="{VAL}");Iet.x=-.35,Iet.y=0,Iet.anchor="middle_right";var Cet=Pyn.find(t=>t.text==="{REF}");Cet.y=0,Cet.x=.35,Cet.anchor="middle_left";var oar=wyn,zIe={paths:{path8698:{type:"path",points:[{x:-.19796749999999919,y:-.023826854587889912},{x:-.2004570399999992,y:-.018993393814014044},{x:-.2029465799999992,y:-.014174384106555204},{x:-.20543611999999922,y:-.009384187436300498},{x:-.20792565999999923,y:-.004636988132081332},{x:-.21041519999999925,y:5329457033053167e-20},{x:-.21290473999999926,y:.004673092344940184},{x:-.21539427999999927,y:.009209271428771242},{x:-.21788381999999928,y:.013649213595881985},{x:-.2203733599999993,y:.01798089395292432},{x:-.2228628999999993,y:.022192955076609913},{x:-.22535243999999932,y:.02627477703600152},{x:-.22784197999999933,y:.030216542867918667},{x:-.23033151999999935,y:.03400929910178016},{x:-.23282105999999936,y:.03764501096072756},{x:-.23531059999999937,y:.04111661189869628},{x:-.23780013999999938,y:.04441804716802203},{x:-.2402896799999994,y:.04754431114897349},{x:-.2427792199999994,y:.05049147821106258},{x:-.24526875999999942,y:.053256726915861724},{x:-.24775829999999943,y:.05583835741211009},{x:-.25024783999999944,y:.05823580191586174},{x:-.25273737999999946,y:.060449628211062575},{x:-.25522691999999947,y:.0624815361489735},{x:-.2577164599999995,y:.06433434716802203},{x:-.2602059999999995,y:.06601198689869628},{x:-.2626955399999995,y:.06751946096072757},{x:-.2651850799999995,y:.06886282410178016},{x:-.26767461999999953,y:.07004914286791866},{x:-.27016415999999954,y:.0710864520360015},{x:-.27265369999999955,y:.07198370507660991},{x:-.27514323999999957,y:.07275071895292433},{x:-.2776327799999996,y:.07339811359588198},{x:-.2801223199999996,y:.07393724642877124},{x:-.2826118599999996,y:.07438014234494018},{x:-.2851013999999996,y:.07473941957033053},{x:-.28759093999999963,y:.07502821186791866},{x:-.29008047999999964,y:.07526008756369952},{x:-.29257001999999965,y:.07544896589344477},{x:-.29505955999999967,y:.07560903118598594},{x:-.2975490999999997,y:.07575464541211008},{x:-.30003863749999965,y:.07560903118598594},{x:-.3025281749999997,y:.07544896589344477},{x:-.30501771249999965,y:.07526008756369951},{x:-.3075072499999996,y:.07502821186791866},{x:-.30999678749999965,y:.07473941957033052},{x:-.3124863249999996,y:.07438014234494018},{x:-.3149758624999996,y:.07393724642877124},{x:-.31746539999999956,y:.07339811359588198},{x:-.3199549374999996,y:.07275071895292431},{x:-.32244447499999956,y:.07198370507660991},{x:-.32493401249999954,y:.0710864520360015},{x:-.32742354999999956,y:.07004914286791866},{x:-.32991308749999954,y:.06886282410178016},{x:-.3324026249999995,y:.06751946096072756},{x:-.33489216249999954,y:.06601198689869628},{x:-.3373816999999995,y:.06433434716802203},{x:-.3398712374999995,y:.06248153614897349},{x:-.3423607749999995,y:.06044962821106258},{x:-.3448503124999994,y:.05823580191586174},{x:-.34733984999999945,y:.05583835741211009},{x:-.3498293874999995,y:.053256726915861724},{x:-.35231892499999945,y:.050491478211062576},{x:-.3548084624999994,y:.0475443111489735},{x:-.3572979999999994,y:.04441804716802203},{x:-.35978753749999937,y:.04111661189869628},{x:-.3622770749999994,y:.03764501096072756},{x:-.36476661249999937,y:.03400929910178016},{x:-.36725614999999934,y:.030216542867918673},{x:-.36974568749999936,y:.02627477703600152},{x:-.37223522499999934,y:.022192955076609917},{x:-.3747247624999993,y:.017980893952924324},{x:-.37721429999999934,y:.013649213595881985},{x:-.3797038374999993,y:.00920927142877125},{x:-.3821933749999993,y:.004673092344940191},{x:-.3846829124999993,y:5329457033053514e-20},{x:-.3871724499999993,y:-.004636988132081328},{x:-.38966198749999925,y:-.009384187436300498},{x:-.3921515249999992,y:-.014174384106555197},{x:-.39464106249999925,y:-.01899339381401404},{x:-.3971305999999992,y:-.023826854587889912}],color:"primary",fill:!1},path8700:{type:"path",points:[{x:.0011955000000007932,y:-.02382615458789039},{x:-.00129403749999919,y:-.01899269131401453},{x:-.0037835749999991734,y:-.014173679106555696},{x:-.006273112499999156,y:-.009383479936300985},{x:-.00876264999999914,y:-.004636278132081827},{x:-.011252187499999122,y:5400707033003174e-20},{x:-.013741724999999105,y:.004673807344939681},{x:-.016231262499999087,y:.009209988928770731},{x:-.018720799999999073,y:.013649933595881476},{x:-.021210337499999055,y:.017981616452923805},{x:-.023699874999999038,y:.022193680076609393},{x:-.026189412499999024,y:.026275504536001},{x:-.028678949999999002,y:.030217272867918137},{x:-.03116848749999899,y:.034010031601779636},{x:-.03365802499999897,y:.03764574596072702},{x:-.03614756249999895,y:.04111734939869574},{x:-.03863709999999894,y:.04441878716802149},{x:-.04112663749999892,y:.04754505364897295},{x:-.043616174999998904,y:.05049222321106203},{x:-.04610571249999888,y:.05325747441586117},{x:-.04859524999999887,y:.055839107412109526},{x:-.051084787499998854,y:.05823655441586117},{x:-.05357432499999884,y:.06045038321106201},{x:-.05606386249999881,y:.06248229364897292},{x:-.0585533999999988,y:.06433510716802145},{x:-.061042937499998784,y:.0660127493986957},{x:-.06353247499999877,y:.06752022596072697},{x:-.06602201249999876,y:.06886359160177957},{x:-.06851154999999873,y:.07004991286791806},{x:-.07100108749999871,y:.07108722453600091},{x:-.0734906249999987,y:.0719844800766093},{x:-.07598016249999869,y:.07275149645292371},{x:-.07846969999999867,y:.07339889359588138},{x:-.08095923749999864,y:.07393802892877062},{x:-.08344877499999863,y:.07438092734493956},{x:-.08593831249999861,y:.07474020707032991},{x:-.0884278499999986,y:.07502900186791804},{x:-.09091738749999859,y:.07526088006369888},{x:-.09340692499999856,y:.07544976089344414},{x:-.09589646249999854,y:.0756098286859853},{x:-.09838599999999853,y:.07575544541210943},{x:-.10087553999999854,y:.0756098286859853},{x:-.10336507999999855,y:.07544976089344414},{x:-.10585461999999857,y:.07526088006369887},{x:-.10834415999999858,y:.07502900186791804},{x:-.11083369999999859,y:.0747402070703299},{x:-.1133232399999986,y:.07438092734493956},{x:-.11581277999999862,y:.07393802892877062},{x:-.11830231999999863,y:.07339889359588138},{x:-.12079185999999864,y:.07275149645292371},{x:-.12328139999999865,y:.0719844800766093},{x:-.12577093999999867,y:.07108722453600091},{x:-.12826047999999868,y:.07004991286791806},{x:-.1307500199999987,y:.06886359160177957},{x:-.1332395599999987,y:.06752022596072697},{x:-.13572909999999871,y:.0660127493986957},{x:-.13821863999999873,y:.06433510716802145},{x:-.14070817999999874,y:.06248229364897291},{x:-.14319771999999875,y:.06045038321106202},{x:-.14568725999999876,y:.05823655441586117},{x:-.14817679999999878,y:.055839107412109526},{x:-.1506663399999988,y:.05325747441586117},{x:-.1531558799999988,y:.05049222321106202},{x:-.1556454199999988,y:.047545053648972956},{x:-.15813495999999883,y:.04441878716802149},{x:-.16062449999999884,y:.04111734939869574},{x:-.16311403999999885,y:.03764574596072702},{x:-.16560357999999886,y:.034010031601779636},{x:-.16809311999999887,y:.03021727286791814},{x:-.1705826599999989,y:.026275504536001},{x:-.1730721999999989,y:.022193680076609396},{x:-.1755617399999989,y:.017981616452923805},{x:-.17805127999999892,y:.013649933595881474},{x:-.18054081999999894,y:.00920998892877074},{x:-.18303035999999895,y:.0046738073449396865},{x:-.18551989999999896,y:5400707033003521e-20},{x:-.18800943999999897,y:-.004636278132081827},{x:-.19049897999999899,y:-.009383479936300985},{x:-.192988519999999,y:-.01417367910655569},{x:-.19547805999999898,y:-.018992691314014522},{x:-.19796759999999902,y:-.02382615458789039}],color:"primary",fill:!1},path8702:{type:"path",points:[{x:.2003586000000006,y:-.02382615458789039},{x:.19786906000000057,y:-.01899269131401453},{x:.19537952000000058,y:-.014173679106555696},{x:.19288998000000057,y:-.009383479936300985},{x:.1904004400000006,y:-.004636278132081827},{x:.18791090000000055,y:5400707033003174e-20},{x:.1854213600000005,y:.004673807344939681},{x:.18293182000000052,y:.009209988928770731},{x:.1804422800000005,y:.013649933595881476},{x:.17795274000000053,y:.017981616452923805},{x:.17546320000000049,y:.022193680076609393},{x:.17297366000000047,y:.026275504536001},{x:.17048412000000046,y:.030217272867918137},{x:.16799458000000045,y:.034010031601779636},{x:.16550504000000044,y:.03764574596072702},{x:.16301550000000042,y:.04111734939869574},{x:.1605259600000004,y:.04441878716802149},{x:.1580364200000004,y:.04754505364897295},{x:.1555468800000004,y:.05049222321106203},{x:.15305734000000037,y:.05325747441586117},{x:.15056780000000036,y:.055839107412109526},{x:.14807826000000035,y:.05823655441586117},{x:.14558872000000034,y:.06045038321106201},{x:.14309918000000033,y:.06248229364897292},{x:.1406096400000003,y:.06433510716802145},{x:.1381201000000003,y:.0660127493986957},{x:.1356305600000003,y:.06752022596072697},{x:.13314102000000028,y:.06886359160177957},{x:.13065148000000026,y:.07004991286791806},{x:.12816194000000025,y:.07108722453600091},{x:.12567240000000024,y:.0719844800766093},{x:.12318286000000023,y:.07275149645292371},{x:.12069332000000021,y:.07339889359588138},{x:.1182037800000002,y:.07393802892877062},{x:.11571424000000019,y:.07438092734493956},{x:.11322470000000018,y:.07474020707032991},{x:.11073516000000017,y:.07502900186791804},{x:.10824562000000015,y:.07526088006369888},{x:.10575608000000014,y:.07544976089344414},{x:.10326654000000013,y:.0756098286859853},{x:.10077700000000012,y:.07575544541210943},{x:.09828746250000013,y:.0756098286859853},{x:.09579792500000014,y:.07544976089344414},{x:.09330838750000017,y:.07526088006369887},{x:.09081885000000019,y:.07502900186791804},{x:.0883293125000002,y:.0747402070703299},{x:.08583977500000022,y:.07438092734493956},{x:.08335023750000023,y:.07393802892877062},{x:.08086070000000026,y:.07339889359588138},{x:.07837116250000027,y:.07275149645292371},{x:.07588162500000029,y:.0719844800766093},{x:.0733920875000003,y:.07108722453600091},{x:.07090255000000031,y:.07004991286791806},{x:.06841301250000034,y:.06886359160177957},{x:.06592347500000036,y:.06752022596072697},{x:.06343393750000037,y:.0660127493986957},{x:.060944400000000384,y:.06433510716802145},{x:.0584548625000004,y:.06248229364897291},{x:.05596532500000043,y:.06045038321106202},{x:.05347578750000044,y:.05823655441586117},{x:.050986250000000455,y:.055839107412109526},{x:.04849671250000047,y:.05325747441586117},{x:.04600717500000048,y:.05049222321106202},{x:.04351763750000051,y:.047545053648972956},{x:.041028100000000525,y:.04441878716802149},{x:.03853856250000054,y:.04111734939869574},{x:.036049025000000554,y:.03764574596072702},{x:.03355948750000057,y:.034010031601779636},{x:.031069950000000596,y:.03021727286791814},{x:.02858041250000061,y:.026275504536001},{x:.026090875000000624,y:.022193680076609396},{x:.023601337500000638,y:.017981616452923805},{x:.021111800000000652,y:.013649933595881474},{x:.01862226250000068,y:.00920998892877074},{x:.016132725000000694,y:.0046738073449396865},{x:.013643187500000709,y:5400707033003521e-20},{x:.011153650000000723,y:-.004636278132081827},{x:.008664112500000737,y:-.009383479936300985},{x:.006174575000000764,y:-.01417367910655569},{x:.0036850375000007786,y:-.018992691314014522},{x:.0011955000000007932,y:-.02382615458789039}],color:"primary",fill:!1},path8704:{type:"path",points:[{x:.3995216000000006,y:-.02382615458789039},{x:.39703206250000056,y:-.01899269131401453},{x:.3945425250000006,y:-.014173679106555696},{x:.3920529875000006,y:-.009383479936300985},{x:.38956345000000064,y:-.004636278132081827},{x:.38707391250000067,y:5400707033003174e-20},{x:.3845843750000007,y:.004673807344939681},{x:.38209483750000073,y:.009209988928770731},{x:.37960530000000076,y:.013649933595881476},{x:.3771157625000008,y:.017981616452923805},{x:.37462622500000076,y:.022193680076609393},{x:.37213668750000073,y:.026275504536001},{x:.36964715000000076,y:.030217272867918137},{x:.3671576125000008,y:.034010031601779636},{x:.3646680750000008,y:.03764574596072702},{x:.36217853750000084,y:.04111734939869574},{x:.3596890000000008,y:.04441878716802149},{x:.3571994625000009,y:.04754505364897295},{x:.35470992500000087,y:.05049222321106203},{x:.35222038750000095,y:.05325747441586117},{x:.3497308500000009,y:.055839107412109526},{x:.3472413125000009,y:.05823655441586117},{x:.344751775000001,y:.06045038321106201},{x:.34226223750000095,y:.06248229364897292},{x:.33977270000000104,y:.06433510716802145},{x:.337283162500001,y:.0660127493986957},{x:.334793625000001,y:.06752022596072697},{x:.33230408750000107,y:.06886359160177957},{x:.3298145500000011,y:.07004991286791806},{x:.32732501250000107,y:.07108722453600091},{x:.3248354750000011,y:.0719844800766093},{x:.3223459375000011,y:.07275149645292371},{x:.3198564000000011,y:.07339889359588138},{x:.3173668625000012,y:.07393802892877062},{x:.31487732500000115,y:.07438092734493956},{x:.3123877875000012,y:.07474020707032991},{x:.3098982500000012,y:.07502900186791804},{x:.30740871250000124,y:.07526088006369888},{x:.30491917500000126,y:.07544976089344414},{x:.30242963750000124,y:.0756098286859853},{x:.29994010000000126,y:.07575544541210943},{x:.29745056000000125,y:.0756098286859853},{x:.29496102000000124,y:.07544976089344414},{x:.2924714800000012,y:.07526088006369887},{x:.2899819400000012,y:.07502900186791804},{x:.2874924000000012,y:.0747402070703299},{x:.2850028600000012,y:.07438092734493956},{x:.2825133200000012,y:.07393802892877062},{x:.28002378000000117,y:.07339889359588138},{x:.27753424000000115,y:.07275149645292371},{x:.27504470000000114,y:.0719844800766093},{x:.27255516000000113,y:.07108722453600091},{x:.2700656200000011,y:.07004991286791806},{x:.2675760800000011,y:.06886359160177957},{x:.2650865400000011,y:.06752022596072697},{x:.2625970000000011,y:.0660127493986957},{x:.26010746000000107,y:.06433510716802145},{x:.25761792000000105,y:.06248229364897291},{x:.25512838000000104,y:.06045038321106202},{x:.25263884000000103,y:.05823655441586117},{x:.250149300000001,y:.055839107412109526},{x:.247659760000001,y:.05325747441586117},{x:.245170220000001,y:.05049222321106202},{x:.24268068000000098,y:.047545053648972956},{x:.24019114000000097,y:.04441878716802149},{x:.23770160000000096,y:.04111734939869574},{x:.23521206000000094,y:.03764574596072702},{x:.23272252000000093,y:.034010031601779636},{x:.23023298000000092,y:.03021727286791814},{x:.2277434400000009,y:.026275504536001},{x:.2252539000000009,y:.022193680076609396},{x:.22276436000000088,y:.017981616452923805},{x:.22027482000000087,y:.013649933595881474},{x:.21778528000000086,y:.00920998892877074},{x:.21529574000000085,y:.0046738073449396865},{x:.21280620000000083,y:5400707033003521e-20},{x:.21031666000000082,y:-.004636278132081827},{x:.2078271200000008,y:-.009383479936300985},{x:.2053375800000008,y:-.01417367910655569},{x:.20284804000000078,y:-.018992691314014522},{x:.20035850000000077,y:-.02382615458789039}],color:"primary",fill:!1},path8706:{type:"path",points:[{x:-.40026109999999937,y:-.022544054587890106},{x:-.5272914999999991,y:-.022544054587890106}],color:"primary",fill:!1},"path8706-5":{type:"path",points:[{x:.5282280000000006,y:-.027111054587890093},{x:.4011975999999997,y:-.027111054587890093}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0020145999999989783,y:.22997364541210996},bottom1:{type:"text",text:"{VAL}",x:-.002185205294839676,y:-.22997364541210996}},refblocks:{left1:{x:-.5279125,y:-.021272154587890446},right1:{x:.5279125,y:-.026521254587889898}},bounds:{minX:-.556070941,maxX:.556070941,minY:-.22997364541210996,maxY:.22997364541210996,width:1.112141882,height:.4599472908242199,centerX:0,centerY:0},circles:{}},iar=Ln(zIe).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right",{x:-.5,y:0}).changeTextAnchor("{VAL}","middle_left",{x:.5,y:0}).build(),rar=Ln(zIe).rotateRightFacingSymbol("left").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.5}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.5}).build(),sar=Ln(zIe).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),aar=Ln(zIe).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_left").build(),Myn={paths:{path11:{type:"path",points:[{x:-.54,y:-.06},{x:-.15,y:-.06}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:-.05},{x:-.13,y:-.18}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.08},{x:.13,y:-.05}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.18},{x:-.13,y:.08}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.08},{x:.13,y:-.18}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:-.05},{x:.54,y:-.06}],color:"primary",fill:!1},"path25-0-9-8":{type:"path",points:[{x:-.03,y:.39},{x:-.05,y:.47},{x:-.08,y:.39}],color:"primary",fill:!0},"path78-6-5-5":{type:"path",points:[{x:-.05,y:.27},{x:-.05,y:.29},{x:-.05,y:.41},{x:-.05,y:.42}],color:"primary",fill:!1},"path25-0-9-8-2":{type:"path",points:[{x:.07,y:.39},{x:.04,y:.47},{x:.02,y:.39}],color:"primary",fill:!0},"path78-6-5-5-7":{type:"path",points:[{x:.04,y:.27},{x:.04,y:.29},{x:.04,y:.41},{x:.04,y:.42}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:.03,y:.06},{x:.03,y:-.16}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.38,y:.38},bottom1:{type:"text",text:"{VAL}",x:.38,y:-.47}},refblocks:{left1:{x:-.54,y:-.06},right1:{x:.54,y:-.06}},bounds:{minX:-.57,maxX:.57,minY:-.47,maxY:.47,width:1.14,height:.93,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.05,radius:.29,color:"primary",fill:!1}}};Myn.bounds.width+=.2;var JIe=Ln(Myn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),yet=si(JIe,"down"),xet=yet.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Eet=yet.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");xet.anchor="middle_left",Eet.anchor="middle_left",xet.y+=.9,xet.x=.3,Eet.y-=.1,Eet.x=.3;var Aar=yet,Bet=si(JIe,"left"),bet=Bet.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Qet=Bet.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");bet.anchor="middle_left",Qet.anchor="middle_left",bet.y+=.71,bet.x=.44,Qet.y-=.71,Qet.x=.44;var car=Bet,vet=si(JIe,"up"),wet=vet.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Pet=vet.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");wet.anchor="middle_left",Pet.anchor="middle_left",wet.y+=.1,wet.x=.3,Pet.y-=.71,Pet.x=.3;var lar=vet,uar={paths:{path45:{type:"path",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:"primary",fill:!1},"path1-8":{type:"path",points:[{x:.13,y:0},{x:.54,y:0}],color:"primary",fill:!1},path46:{type:"path",points:[{x:-.13,y:.13},{x:.14,y:0}],color:"primary",fill:!1},path47:{type:"path",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:"primary",fill:!1},path48:{type:"path",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:"primary",fill:!1},path49:{type:"path",points:[{x:-.13,y:0},{x:-.54,y:0}],color:"primary",fill:!1},path25:{type:"path",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:"primary",fill:!0},path78:{type:"path",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:"primary",fill:!1}},texts:{bottom1:{type:"text",text:"{VAL}",x:0,y:-.21},right1:{type:"text",text:"{REF}",x:0,y:.41}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.13,height:.65,centerX:0,centerY:0},circles:{}},{paths:gar,texts:Dyn,bounds:WIe,refblocks:Nyn,circles:dar}=uar,Met=Gl({primitives:[...Object.values(gar),...Object.values(dar),{...Dyn.bottom1,anchor:"middle_top"},{...Dyn.right1,anchor:"middle_bottom"}],ports:[{...Nyn.left1,labels:["1"]},{...Nyn.right1,labels:["2"]}],size:{width:WIe.width,height:WIe.height},center:{x:WIe.centerX,y:WIe.centerY}}),Det=si(Met,"up"),Net=Det.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Ret=Det.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Net.anchor="middle_left",Ret.anchor="middle_left",Net.y+=.21,Net.x=.21,Ret.y-=.21,Ret.x=.21;var Ryn=Det,Tet=hK(Ryn),ket=Tet.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Fet=Tet.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");ket.anchor="middle_left",Fet.anchor="middle_left",ket.y+=.4,ket.x=.2,Fet.y-=.41,Fet.x=.2;var har=Tet,par=pK(Met),mar={paths:{path11:{type:"path",points:[{x:-.52,y:-.01},{x:-.18,y:-.01}],color:"primary",fill:!1},"path11-2":{type:"path",points:[{x:-.17,y:-.11},{x:-.17,y:.08}],color:"primary",fill:!1},"path11-5":{type:"path",points:[{x:-.17,y:-.12},{x:.16,y:-.12}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:-.17,y:.08},{x:.16,y:.08}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.17,y:-.01},{x:.52,y:-.01}],color:"primary",fill:!1},"path11-2-1":{type:"path",points:[{x:.16,y:-.12},{x:.16,y:.08}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:-.4,y:-.21},{x:-.33,y:-.18},{x:-.34,y:-.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:-.45,y:-.34},{x:-.44,y:-.32},{x:-.35,y:-.22},{x:-.35,y:-.22}],color:"primary",fill:!1},"path25-0-9-0":{type:"path",points:[{x:-.3,y:-.34},{x:-.22,y:-.31},{x:-.24,y:-.4}],color:"primary",fill:!0},"path78-6-5-9":{type:"path",points:[{x:-.35,y:-.46},{x:-.34,y:-.45},{x:-.25,y:-.35},{x:-.25,y:-.35}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.17,y:-.41},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.46}},refblocks:{left1:{x:-.52,y:-.01},right1:{x:.52,y:-.01}},bounds:{width:1.1,height:.62,centerX:0,centerY:-.02},circles:{path1:{type:"circle",x:0,y:-.02,radius:.28,color:"primary",fill:!1}}},{paths:_ar,texts:Tyn,bounds:jIe,refblocks:kyn,circles:far}=mar,Fyn=Gl({primitives:[...Object.values(_ar),...Object.values(far),{...Tyn.top1,anchor:"middle_left",x:0},{...Tyn.bottom1,anchor:"middle_left",x:0}],ports:[{...kyn.left1,labels:["1"]},{...kyn.right1,labels:["2"]}],size:{width:jIe.width,height:jIe.height},center:{x:jIe.centerX,y:jIe.centerY}}),Lyn=si(Fyn),Hyn=Lyn.primitives.filter(t=>t.type==="text"),Let=Hyn.find(t=>t.text==="{VAL}");Let.x=-.35,Let.y=0,Let.anchor="middle_right";var Het=Hyn.find(t=>t.text==="{REF}");Het.y=0,Het.x=.35,Het.anchor="middle_left";var Iar=Lyn,Car={paths:{path208:{type:"path",points:[{x:.38,y:.13},{x:.52,y:-.13}],color:"primary",fill:!1},path209:{type:"path",points:[{x:.25,y:-.13},{x:.38,y:.13}],color:"primary",fill:!1},path210:{type:"path",points:[{x:.52,y:-.13},{x:.25,y:-.13}],color:"primary",fill:!1},path211:{type:"path",points:[{x:.25,y:.13},{x:.52,y:.13}],color:"primary",fill:!1},path212:{type:"path",points:[{x:.12,y:-.4},{x:.38,y:-.4}],color:"primary",fill:!1},path213:{type:"path",points:[{x:.38,y:.4},{x:.12,y:.4}],color:"primary",fill:!1},path214:{type:"path",points:[{x:.12,y:.54},{x:.12,y:.18}],color:"primary",fill:!1},path215:{type:"path",points:[{x:.12,y:-.54},{x:.12,y:0}],color:"primary",fill:!1},path216:{type:"path",points:[{x:.38,y:-.4},{x:.38,y:.4}],color:"primary",fill:!1},path217:{type:"path",points:[{x:-.14,y:.26},{x:-.14,y:-.27}],color:"primary",fill:!1},path218:{type:"path",points:[{x:-.22,y:-.27},{x:-.22,y:.26}],color:"primary",fill:!1},path219:{type:"path",points:[{x:-.54,y:-.27},{x:-.22,y:-.27}],color:"primary",fill:!1},path220:{type:"path",points:[{x:-.14,y:-.19},{x:.12,y:-.19}],color:"primary",fill:!1},path221:{type:"path",points:[{x:-.14,y:.18},{x:.12,y:.18}],color:"primary",fill:!1},path222:{type:"path",points:[{x:-.07,y:0},{x:.12,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{VAL}",x:.57,y:.02},right2:{type:"text",text:"{REF}",x:.57,y:.21}},refblocks:{top1:{x:.12,y:.54},bottom1:{x:.12,y:-.54},left1:{x:-.54,y:-.27}},bounds:{centerX:0,centerY:0}};function cte(t,e){return{width:Math.max(...e.map(n=>Math.abs(n.x-t.x)))*2,height:Math.max(...e.map(n=>Math.abs(n.y-t.y)))*2}}var{paths:yar,texts:Oyn,bounds:Gyn,refblocks:BK}=Car,Yyn={x:Gyn.centerX+.2,y:Gyn.centerY},Uyn=Gl({primitives:[...Object.values(yar),{...Oyn.right1,anchor:"middle_left"},{...Oyn.right2,anchor:"middle_left"}],ports:[{...BK.top1,labels:["1"]},{...BK.bottom1,labels:["2"]},{...BK.left1,labels:["3"]}],size:cte(Yyn,[BK.top1,BK.bottom1,BK.left1]),center:Yyn}),Oet=si(Uyn),Kyn=Oet.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Get=Oet.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Kyn.anchor="middle_top",Get.anchor="middle_top",Kyn.x=Get.x,Get.y+=.15;var xar=Oet,Ear={paths:{"path12-1-8-6-9":{type:"path",points:[{x:.01,y:.07},{x:.01,y:-.01}],color:"primary",fill:!1},"path12-1-5-6":{type:"path",points:[{x:-.47,y:-.09},{x:-.17,y:-.09}],color:"primary",fill:!1},"path12-1-8-0":{type:"path",points:[{x:-.16,y:-.01},{x:.17,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.2,y:-.09},{x:.47,y:-.09}],color:"primary",fill:!1},path2:{type:"path",points:[{x:-.1,y:.06},{x:-.1,y:.06},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.09,y:.09},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.11},{x:-.09,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.05,y:.14},{x:-.05,y:.15},{x:-.05,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.01,y:.16},{x:-.01,y:.16},{x:0,y:.16},{x:0,y:.16},{x:0,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.05,y:.15},{x:.05,y:.15},{x:.05,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.08,y:.14},{x:.08,y:.13},{x:.08,y:.13},{x:.08,y:.13},{x:.09,y:.13},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.1,y:.11},{x:.1,y:.11},{x:.1,y:.1},{x:.1,y:.1},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.06},{x:.11,y:.06},{x:.1,y:.06},{x:.1,y:.06},{x:.09,y:.06},{x:.09,y:.06},{x:.08,y:.06},{x:.07,y:.06},{x:.07,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.04,y:.06},{x:.03,y:.06},{x:.03,y:.06},{x:.02,y:.06},{x:.01,y:.06},{x:.01,y:.06},{x:0,y:.06},{x:-.01,y:.06},{x:-.01,y:.06},{x:-.02,y:.06},{x:-.03,y:.06},{x:-.03,y:.06},{x:-.04,y:.06},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.07,y:.06},{x:-.07,y:.06},{x:-.08,y:.06},{x:-.09,y:.06},{x:-.09,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.27}},refblocks:{left1:{x:-.47,y:-.09},right1:{x:.47,y:-.09}},bounds:{width:1,height:.53,centerX:0,centerY:0},circles:{}},{paths:Bar,texts:Vyn,bounds:$Ie,refblocks:zyn,circles:bar}=Ear,Jyn=Gl({primitives:[...Object.values(Bar),...Object.values(bar),{...Vyn.top1,anchor:"middle_bottom",x:0},{...Vyn.bottom1,anchor:"middle_top",x:0}],ports:[{...zyn.left1,labels:["1"]},{...zyn.right1,labels:["2"]}],size:{width:$Ie.width,height:$Ie.height},center:{x:$Ie.centerX+.006,y:$Ie.centerY+.06}}),Yet=si(Jyn),lte=Yet.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),qIe=Yet.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");lte.anchor="middle_left",qIe.anchor="middle_right",lte.x=lte.x-.03,lte.y=lte.y,qIe.x=qIe.x,qIe.y=0;var Sar=Yet,t0=({horizontalSymbol:t,verticalSymbol:e,gateSide:n,drainSide:o})=>{let i=n==="left"||n==="right",r=o==="left"||o==="right";if(i===r)throw new Error(`Invalid MOSFET orientation: gate ${n}, drain ${o}. Gate and drain must be perpendicular.`);let s=i?t:e;return(n==="right"||r&&o==="left")&&(s=pK(s)),(n==="bottom"||!r&&o==="bottom")&&(s=hK(s)),s},Qar={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:war,texts:Wyn,bounds:jyn,refblocks:bK,circles:Par}=Qar,$yn={x:jyn.centerX,y:jyn.centerY},r8=Gl({primitives:[...Object.values(war),...Object.values(Par),{...Wyn.top1,anchor:"middle_right",x:0},{...Wyn.bottom1,anchor:"middle_right",x:0}],ports:[{...bK.top1,labels:["1","drain"]},{...bK.bottom1,labels:["2","source"]},{...bK.left1,labels:["3","gate"]}],size:cte($yn,[bK.top1,bK.bottom1,bK.left1]),center:$yn}),qyn=si(r8),Xyn=qyn.primitives.filter(t=>t.type==="text"),Uet=Xyn.find(t=>t.text==="{VAL}");Uet.x=-.35,Uet.y=0,Uet.anchor="middle_right";var Ket=Xyn.find(t=>t.text==="{REF}");Ket.y=0,Ket.x=.35,Ket.anchor="middle_left";var YS=qyn,Mar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"bottom",drainSide:"left"}),Dar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"bottom",drainSide:"right"}),Nar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"left",drainSide:"bottom"}),Rar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"left",drainSide:"top"}),Tar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"right",drainSide:"bottom"}),kar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"right",drainSide:"top"}),Far=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"top",drainSide:"left"}),Lar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:"top",drainSide:"right"}),Har={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:Oar,texts:Zyn,bounds:e2n,refblocks:SK,circles:Gar}=Har,t2n={x:e2n.centerX,y:e2n.centerY},s8=Gl({primitives:[...Object.values(Oar),...Object.values(Gar),{...Zyn.top1,anchor:"middle_right",x:0},{...Zyn.bottom1,anchor:"middle_right",x:0}],ports:[{...SK.top1,labels:["1","drain"]},{...SK.bottom1,labels:["2","source"]},{...SK.left1,labels:["3","gate"]}],size:cte(t2n,[SK.top1,SK.bottom1,SK.left1]),center:t2n}),n2n=si(s8),o2n=n2n.primitives.filter(t=>t.type==="text"),Vet=o2n.find(t=>t.text==="{VAL}");Vet.x=-.35,Vet.y=0,Vet.anchor="middle_right";var zet=o2n.find(t=>t.text==="{REF}");zet.y=0,zet.x=.35,zet.anchor="middle_left";var US=n2n,Yar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"bottom",drainSide:"left"}),Uar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"bottom",drainSide:"right"}),Kar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"left",drainSide:"bottom"}),Var=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"left",drainSide:"top"}),zar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"right",drainSide:"bottom"}),Jar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"right",drainSide:"top"}),War=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"top",drainSide:"left"}),jar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:"top",drainSide:"right"}),$ar={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.07},{x:.01,y:0},{x:-.08,y:.06}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:qar,texts:i2n,bounds:XIe,refblocks:Jet,circles:Xar}=$ar,r2n=Gl({primitives:[...Object.values(qar),...Object.values(Xar),{...i2n.top1,anchor:"middle_right",x:0},{...i2n.bottom1,anchor:"middle_right",x:0}],ports:[{...Jet.top1,labels:["1","drain"]},{...Jet.bottom1,labels:["2","source"]},{...Jet.left1,labels:["3","gate"]}],size:{width:XIe.width,height:XIe.height},center:{x:XIe.centerX,y:XIe.centerY}}),s2n=si(r2n),a2n=s2n.primitives.filter(t=>t.type==="text"),Wet=a2n.find(t=>t.text==="{VAL}");Wet.x=-.35,Wet.y=0,Wet.anchor="middle_right";var jet=a2n.find(t=>t.text==="{REF}");jet.y=0,jet.x=.35,jet.anchor="middle_left";var Zar=s2n,eAr={paths:{diag1:{type:"path",points:[{x:-.1,y:-.1},{x:.1,y:.1}],color:"primary",fill:!1},diag2:{type:"path",points:[{x:-.1,y:.1},{x:.1,y:-.1}],color:"primary",fill:!1},stem:{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:-.2,y:0}},bounds:{centerX:0,centerY:0}},{paths:tAr,bounds:A2n,refblocks:nAr}=eAr,ZIe=Ln({primitives:[...Object.values(tAr)],ports:[{...nAr.left1,labels:["1"]}],center:{x:A2n.centerX,y:A2n.centerY}}).rotateRightFacingSymbol("right").labelPort("left1",["1"]).build(),oAr=si(ZIe,"down"),iAr=si(ZIe,"left"),rAr=si(ZIe,"up"),QK={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.19,y:-.1},{x:.12,y:-.2},{x:.22,y:-.2},{x:.19,y:-.1}],color:"primary",fill:!0}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:sAr,bounds:eCe,refblocks:$et,circles:aAr}=QK,AAr=Ln({primitives:[...Object.values(sAr),...Object.values(aAr),{type:"text",text:"{REF}",x:-.3,y:.5094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.5094553499999995}],ports:[{...$et.top1,labels:["1","collector"]},{...$et.bottom1,labels:["3","emitter"]},{...$et.left1,labels:["2","base"]}],size:{width:eCe.width,height:eCe.height},center:{x:eCe.centerX,y:eCe.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:cAr,bounds:tCe,refblocks:qet,circles:lAr}=QK,uAr=Ln({primitives:[...Object.values(cAr),...Object.values(lAr),{type:"text",text:"{REF}",x:.55,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.4094553499999995}],ports:[{...qet.top1,labels:["1","collector"]},{...qet.bottom1,labels:["3","emitter"]},{...qet.left1,labels:["2","base"]}],size:{width:tCe.width,height:tCe.height},center:{x:tCe.centerX,y:tCe.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:gAr,bounds:nCe,refblocks:Xet,circles:dAr}=QK,hAr=Ln({primitives:[...Object.values(gAr),...Object.values(dAr),{type:"text",text:"{REF}",x:-.5,y:.3094553499999995},{type:"text",text:"{VAL}",x:.55,y:.3094553499999995}],ports:[{...Xet.top1,labels:["1","collector"]},{...Xet.bottom1,labels:["3","emitter"]},{...Xet.left1,labels:["2","base"]}],size:{width:nCe.width,height:nCe.height},center:{x:nCe.centerX,y:nCe.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:pAr,bounds:oCe,refblocks:Zet,circles:mAr}=QK,_Ar=Ln({primitives:[...Object.values(pAr),...Object.values(mAr),{type:"text",text:"{REF}",x:.55,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.4094553499999995}],ports:[{...Zet.top1,labels:["1","collector"]},{...Zet.bottom1,labels:["3","emitter"]},{...Zet.left1,labels:["2","base"]}],size:{width:oCe.width,height:oCe.height},center:{x:oCe.centerX,y:oCe.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:fAr,bounds:iCe,refblocks:ett,circles:IAr}=QK,CAr=Ln({primitives:[...Object.values(fAr),...Object.values(IAr),{type:"text",text:"{REF}",x:-.3,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:.4094553499999995}],ports:[{...ett.top1,labels:["1","collector"]},{...ett.bottom1,labels:["3","emitter"]},{...ett.left1,labels:["2","base"]}],size:{width:iCe.width,height:iCe.height},center:{x:iCe.centerX,y:iCe.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:yAr,bounds:rCe,refblocks:ttt,circles:xAr}=QK,EAr=Ln({primitives:[...Object.values(yAr),...Object.values(xAr),{type:"text",text:"{REF}",x:-.3,y:-.4094553499999995},{type:"text",text:"{VAL}",x:-.3,y:.4094553499999995}],ports:[{...ttt.top1,labels:["1","collector"]},{...ttt.bottom1,labels:["3","emitter"]},{...ttt.left1,labels:["2","base"]}],size:{width:rCe.width,height:rCe.height},center:{x:rCe.centerX,y:rCe.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),BAr={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:0,y:-.3}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},sCe=Ln(BAr).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["3","out"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),bAr=si(sCe,"down"),SAr=hK(si(sCe,"left")),QAr=si(sCe,"up"),vAr={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.43,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path44-1":{type:"path",points:[{x:-.1,y:.44},{x:-.1,y:.18}],color:"primary",fill:!1},"path44-2":{type:"path",points:[{x:-.09,y:-.34},{x:-.09,y:-.09}],color:"primary",fill:!1},"rect1577-3":{type:"path",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.25,y:.32},bottom1:{type:"text",text:"{VAL}",x:.25,y:-.24}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04},top2:{x:-.1,y:.44},bottom1:{x:-.09,y:-.34}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},aCe=Ln(vAr).labelPort("left1",["1","inp1"]).labelPort("left2",["2","inp2"]).labelPort("right1",["4","out"]).labelPort("top2",["5","V+"]).labelPort("bottom1",["3","V-"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),wAr=si(aCe,"down"),PAr=hK(si(aCe,"left")),MAr=si(aCe,"up"),DAr={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:NAr,texts:c2n,bounds:l2n,refblocks:vK,circles:RAr}=DAr,u2n={x:l2n.centerX,y:l2n.centerY},a8=Gl({primitives:[...Object.values(NAr),...Object.values(RAr),{...c2n.top1,anchor:"middle_right",x:0},{...c2n.bottom1,anchor:"middle_right",x:0}],ports:[{...vK.top1,labels:["1","drain"]},{...vK.bottom1,labels:["2","source"]},{...vK.left1,labels:["3","gate"]}],size:cte(u2n,[vK.top1,vK.bottom1,vK.left1]),center:u2n}),g2n=si(a8),d2n=g2n.primitives.filter(t=>t.type==="text"),ntt=d2n.find(t=>t.text==="{VAL}");ntt.x=-.35,ntt.y=0,ntt.anchor="middle_right";var ott=d2n.find(t=>t.text==="{REF}");ott.y=0,ott.x=.35,ott.anchor="middle_left";var KS=g2n,TAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"bottom",drainSide:"left"}),kAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"bottom",drainSide:"right"}),FAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"left",drainSide:"bottom"}),LAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"left",drainSide:"top"}),HAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"right",drainSide:"bottom"}),OAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"right",drainSide:"top"}),GAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"top",drainSide:"left"}),YAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:"top",drainSide:"right"}),UAr={paths:{path11:{type:"path",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.3,y:.55},{x:.3,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.09,y:.11},{x:.31,y:.11}],color:"primary",fill:!1},"path2-8-3-7":{type:"path",points:[{x:.09,y:.15},{x:.09,y:.07}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:"primary",fill:!1},"path2-8-3":{type:"path",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:"primary",fill:!1},"path2-8-3-2":{type:"path",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:"primary",fill:!0},"path2-0":{type:"path",points:[{x:.09,y:0},{x:.31,y:-.01}],color:"primary",fill:!1},"path12-1-0":{type:"path",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.13,y:.36},bottom1:{type:"text",text:"{VAL}",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:"circle",x:.16,y:0,radius:.29,color:"primary",fill:!1}}},{paths:KAr,texts:h2n,bounds:p2n,refblocks:wK,circles:VAr}=UAr,m2n={x:p2n.centerX,y:p2n.centerY},A8=Gl({primitives:[...Object.values(KAr),...Object.values(VAr),{...h2n.top1,anchor:"middle_right",x:0},{...h2n.bottom1,anchor:"middle_right",x:0}],ports:[{...wK.top1,labels:["1","drain"]},{...wK.bottom1,labels:["2","source"]},{...wK.left1,labels:["3","gate"]}],size:cte(m2n,[wK.top1,wK.bottom1,wK.left1]),center:m2n}),_2n=si(A8),f2n=_2n.primitives.filter(t=>t.type==="text"),itt=f2n.find(t=>t.text==="{VAL}");itt.x=-.35,itt.y=0,itt.anchor="middle_right";var rtt=f2n.find(t=>t.text==="{REF}");rtt.y=0,rtt.x=.35,rtt.anchor="middle_left";var VS=_2n,zAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"bottom",drainSide:"left"}),JAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"bottom",drainSide:"right"}),WAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"left",drainSide:"bottom"}),jAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"left",drainSide:"top"}),$Ar=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"right",drainSide:"bottom"}),qAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"right",drainSide:"top"}),XAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"top",drainSide:"left"}),ZAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:"top",drainSide:"right"}),ecr={paths:{path11:{type:"path",points:[{x:-.54,y:-.01},{x:-.15,y:-.02}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.13,y:0},{x:-.13,y:-.13}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.13,y:.13},{x:.13,y:0}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.13,y:-.13},{x:-.13,y:.13}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.13,y:.13},{x:.13,y:-.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.14,y:0},{x:.54,y:-.01}],color:"primary",fill:!1},"path25-0":{type:"path",points:[{x:.2,y:.38},{x:.16,y:.28},{x:.26,y:.3}],color:"primary",fill:!0},"path78-6":{type:"path",points:[{x:.33,y:.43},{x:.32,y:.42},{x:.21,y:.31},{x:.21,y:.31}],color:"primary",fill:!1},"path25-0-9":{type:"path",points:[{x:.35,y:.35},{x:.31,y:.26},{x:.41,y:.27}],color:"primary",fill:!0},"path78-6-5":{type:"path",points:[{x:.48,y:.4},{x:.47,y:.39},{x:.35,y:.29},{x:.35,y:.29}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.1,y:.35},bottom1:{type:"text",text:"{VAL}",x:0,y:-.43}},refblocks:{left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.43,maxY:.43,width:1.14,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:-.01,radius:.29,color:"primary",fill:!1}}},I2n=Ln(ecr).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),C2n=si(I2n),tcr=C2n.primitives.filter(t=>t.type==="text"),y2n=tcr.find(t=>t.text==="{REF}");y2n.y=0,y2n.anchor="middle_left";var ncr=C2n,ocr={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},path40:{type:"path",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:"primary",fill:!1},"path12-1":{type:"path",points:[{x:.28,y:.55},{x:.28,y:.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.11},{x:.29,y:.11}],color:"primary",fill:!1},"path2-5":{type:"path",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.01,y:-.07},{x:.01,y:.06},{x:-.08,y:0},{x:.01,y:-.07}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.15,y:.36},bottom1:{type:"text",text:"{VAL}",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:icr,texts:x2n,bounds:ACe,refblocks:stt,circles:rcr}=ocr,E2n=Gl({primitives:[...Object.values(icr),...Object.values(rcr),{...x2n.top1,anchor:"middle_right",x:0},{...x2n.bottom1,anchor:"middle_right"}],ports:[{...stt.top1,labels:["1","drain"]},{...stt.bottom1,labels:["2","source"]},{...stt.left1,labels:["3","gate"]}],size:{width:ACe.width,height:ACe.height},center:{x:ACe.centerX,y:ACe.centerY}}),B2n=si(E2n),b2n=B2n.primitives.filter(t=>t.type==="text"),att=b2n.find(t=>t.text==="{VAL}");att.x=-.35,att.y=0,att.anchor="middle_right";var Att=b2n.find(t=>t.text==="{REF}");Att.y=0,Att.x=.35,Att.anchor="middle_left";var scr=B2n,uk={paths:{path11:{type:"path",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:"primary",fill:!1},"path40-0":{type:"path",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:"primary",fill:!1},"path40-0-5":{type:"path",points:[{x:.28,y:.24},{x:.08,y:.11}],color:"primary",fill:!1},"path40-0-5-0":{type:"path",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:"primary",fill:!1},"path12-1-5":{type:"path",points:[{x:.29,y:.25},{x:.29,y:.55}],color:"primary",fill:!1},"path12-1-5-3":{type:"path",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:"primary",fill:!1},path15:{type:"path",points:[{x:.15,y:-.23},{x:.22,y:-.12},{x:.12,y:-.12},{x:.15,y:-.23}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.08,y:.37},bottom1:{type:"text",text:"{VAL}",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{"path1-0":{type:"circle",x:.14,y:0,radius:.29,color:"primary",fill:!1}}},{paths:acr,texts:u_r,bounds:cCe,refblocks:ctt,circles:Acr}=uk,ccr=Ln({primitives:[...Object.values(acr),...Object.values(Acr),{type:"text",text:"{REF}",x:-.1,y:.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:-.3094553499999995}],ports:[{...ctt.top1,labels:["1","collector"]},{...ctt.bottom1,labels:["3","emitter"]},{...ctt.left1,labels:["2","base"]}],size:{width:cCe.width,height:cCe.height},center:{x:cCe.centerX,y:cCe.centerY}}).rotateRightFacingSymbol("right").changeTextAnchor("{REF}","middle_right").changeTextAnchor("{VAL}","middle_right").build(),{paths:g_r,texts:d_r,bounds:h_r,refblocks:p_r,circles:m_r}=uk,lcr=Ln(uk).rotateRightFacingSymbol("up").changeTextAnchor("{VAL}","middle_left").labelPort("left1",["2","base"]).labelPort("top1",["1","collector"]).labelPort("bottom1",["3","emitter"]).changeTextAnchor("{REF}","middle_right").build(),{paths:ucr,texts:__r,bounds:lCe,refblocks:ltt,circles:gcr}=uk,dcr=Ln({primitives:[...Object.values(ucr),...Object.values(gcr),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...ltt.top1,labels:["1","collector"]},{...ltt.bottom1,labels:["3","emitter"]},{...ltt.left1,labels:["2","base"]}],size:{width:lCe.width,height:lCe.height},center:{x:lCe.centerX,y:lCe.centerY}}).rotateRightFacingSymbol("down").changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_bottom").build(),{paths:hcr,texts:f_r,bounds:uCe,refblocks:utt,circles:pcr}=uk,mcr=Ln({primitives:[...Object.values(hcr),...Object.values(pcr),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...utt.top1,labels:["1","collector"]},{...utt.bottom1,labels:["3","emitter"]},{...utt.left1,labels:["2","base"]}],size:{width:uCe.width,height:uCe.height},center:{x:uCe.centerX,y:uCe.centerY}}).rotateRightFacingSymbol("up").changeTextAnchor("{REF}","middle_top").changeTextAnchor("{VAL}","middle_top").build(),{paths:_cr,texts:I_r,bounds:gCe,refblocks:gtt,circles:fcr}=uk,Icr=Ln({primitives:[...Object.values(_cr),...Object.values(fcr),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...gtt.top1,labels:["1","collector"]},{...gtt.bottom1,labels:["3","emitter"]},{...gtt.left1,labels:["2","base"]}],size:{width:gCe.width,height:gCe.height},center:{x:gCe.centerX,y:gCe.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Ccr,texts:C_r,bounds:dCe,refblocks:dtt,circles:ycr}=uk,xcr=Ln({primitives:[...Object.values(Ccr),...Object.values(ycr),{type:"text",text:"{REF}",x:-.1,y:-.3094553499999995},{type:"text",text:"{VAL}",x:-.1,y:.3094553499999995}],ports:[{...dtt.top1,labels:["1","collector"]},{...dtt.bottom1,labels:["3","emitter"]},{...dtt.left1,labels:["2","base"]}],size:{width:dCe.width,height:dCe.height},center:{x:dCe.centerX,y:dCe.centerY}}).rotateRightFacingSymbol("left").changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Ecr={paths:{path40:{type:"path",points:[{x:-.19,y:.33},{x:-.26,y:.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:.26},{x:-.19,y:.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:.14},{x:-.38,y:.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:.39},{x:-.13,y:.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:.52},{x:-.19,y:.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:-.32},{x:-.38,y:-.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:-.13},{x:-.19,y:-.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:-.26},{x:-.26,y:-.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:-.26},{x:-.26,y:-.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:-.19},{x:-.51,y:-.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:-.5},{x:-.19,y:-.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:.19},{x:.13,y:.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:.38},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:.26},{x:.26,y:.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:.26},{x:.26,y:.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:.32},{x:.01,y:.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:-.19},{x:.26,y:-.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:-.26},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:-.38},{x:.13,y:-.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:-.13},{x:.39,y:-.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:-.32},{x:0,y:-.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:-.01},{x:.32,y:-.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:-.5}},refblocks:{left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.09,centerX:0,centerY:0}},{paths:Bcr,texts:S2n,bounds:hCe,refblocks:Q2n}=Ecr,v2n=Gl({primitives:[...Object.values(Bcr),{...S2n.bottom1,y:.35,anchor:"middle_top"},{...S2n.top1,anchor:"middle_left"}],ports:[{...Q2n.left1,labels:["1"]},{...Q2n.right1,labels:["2"]}],size:{width:hCe.width+.05,height:hCe.height},center:{x:hCe.centerX,y:hCe.centerY}}),bcr=si(v2n),Scr=bcr,Qcr={paths:{path18:{type:"path",points:[{x:-.53,y:0},{x:-.27,y:0}],color:"primary",fill:!1},path19:{type:"path",points:[{x:.26,y:0},{x:.53,y:0}],color:"primary",fill:!1},path20:{type:"path",points:[{x:0,y:.13},{x:.26,y:.13},{x:.26,y:-.13},{x:-.27,y:-.13},{x:-.27,y:.13},{x:0,y:.13}],color:"primary",fill:!1},path24:{type:"path",points:[{x:.29,y:-.29},{x:.26,y:-.16},{x:.16,y:-.26},{x:.29,y:-.29}],color:"primary",fill:!0},path26:{type:"path",points:[{x:-.3,y:.29},{x:.2,y:-.2}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.06,y:.2},bottom1:{type:"text",text:"{VAL}",x:-.1,y:-.28}},refblocks:{left1:{x:-.53,y:0},right1:{x:.53,y:0}},bounds:{width:1.13,height:.58,centerX:0,centerY:0}},{paths:vcr,texts:w2n,bounds:pCe,refblocks:P2n}=Qcr,mCe=Gl({primitives:[...Object.values(vcr),{...w2n.bottom1,x:0,y:-.35,anchor:"middle_top"},{...w2n.top1,x:0,y:.35,anchor:"middle_bottom"}],ports:[{...P2n.left1,labels:["1"]},{...P2n.right1,labels:["2"]}],size:{width:pCe.width+.05,height:pCe.height},center:{x:pCe.centerX,y:pCe.centerY}}),htt=si(mCe,"down"),ptt=htt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),mtt=htt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");ptt.anchor="middle_left",mtt.anchor="middle_left",ptt.y+=.31,ptt.x=.34,mtt.y-=.31,mtt.x=.34;var wcr=htt,_tt=si(mCe,"left"),ftt=_tt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Itt=_tt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");ftt.anchor="middle_bottom",Itt.anchor="middle_top",ftt.y+=.73,ftt.x=0,Itt.y-=.7,Itt.x=0;var Pcr=_tt,Ctt=si(mCe,"up"),ytt=Ctt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),xtt=Ctt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");ytt.anchor="middle_left",xtt.anchor="middle_left",ytt.y+=.21,ytt.x=.34,xtt.y-=.21,xtt.x=.34;var Mcr=Ctt,_Ce={paths:{path1:{type:"path",points:[{x:-.42,y:0},{x:-.3,y:0}],color:"primary",fill:!1},"path1-2-1":{type:"path",points:[{x:-.3,y:0},{x:-.25,y:.1},{x:-.15,y:-.1},{x:-.05,y:.1},{x:.05,y:-.1},{x:.15,y:.1},{x:.25,y:-.1},{x:.3,y:0}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.3,y:0},{x:.42,y:0}],color:"primary",fill:!1},path3:{type:"path",points:[{x:0,y:-.17},{x:0,y:-.4}],color:"primary",fill:!1},path15:{type:"path",points:[{x:0,y:-.12},{x:.05,y:-.2},{x:-.05,y:-.2},{x:0,y:-.12}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:.3,y:.25},bottom1:{type:"text",text:"{VAL}",x:.3,y:-.25}},refblocks:{left:{x:-.42,y:0},right:{x:.42,y:0},bottom:{x:0,y:-.4}},bounds:{minX:-.42,maxX:.42,minY:-.2,maxY:.2,width:.84,height:.4,centerX:0,centerY:0},circles:{}},{paths:Dcr,texts:y_r,bounds:fCe,refblocks:Ett,circles:Ncr}=_Ce,Rcr=Ln({primitives:[...Object.values(Dcr),...Object.values(Ncr),{type:"text",text:"{REF}",x:-.15,y:.2394553499999995},{type:"text",text:"{VAL}",x:.15,y:.2394553499999995}],ports:[{...Ett.left,labels:["1"]},{...Ett.right,labels:["3"]},{...Ett.bottom,labels:["2"]}],size:{width:fCe.width,height:fCe.height},center:{x:fCe.centerX,y:fCe.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:Tcr,texts:x_r,bounds:ICe,refblocks:Btt,circles:kcr}=_Ce,Fcr=Ln({primitives:[...Object.values(Tcr),...Object.values(kcr),{type:"text",text:"{REF}",x:-.3,y:-.3894553499999995},{type:"text",text:"{VAL}",x:-.3,y:.3194553499999995}],ports:[{...Btt.left,labels:["1"]},{...Btt.right,labels:["3"]},{...Btt.bottom,labels:["2"]}],size:{width:ICe.width,height:ICe.height},center:{x:ICe.centerX,y:ICe.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),Lcr=Ln(_Ce).labelPort("left",["1"]).labelPort("right",["3"]).labelPort("bottom",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:Hcr,texts:E_r,bounds:CCe,refblocks:btt,circles:Ocr}=_Ce,Gcr=Ln({primitives:[...Object.values(Hcr),...Object.values(Ocr),{type:"text",text:"{REF}",x:.3,y:-.2894553499999995},{type:"text",text:"{VAL}",x:-.3,y:-.2894553499999995}],ports:[{...btt.left,labels:["1"]},{...btt.right,labels:["3"]},{...btt.bottom,labels:["2"]}],size:{width:CCe.width,height:CCe.height},center:{x:CCe.centerX,y:CCe.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).labelPort("bottom",["3"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),Ycr={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:Ucr,bounds:yCe,refblocks:M2n,circles:Kcr}=Ycr,D2n=Gl({primitives:[...Object.values(Ucr),...Object.values(Kcr),{type:"text",text:"{REF}",x:0,y:.43330070000000065,anchor:"middle_bottom"},{type:"text",text:"{VAL}",x:0,y:-.43330070000000065,anchor:"middle_top"},{type:"text",text:"COS φ",x:0,y:.014279000000000375,anchor:"center"}],ports:[{...M2n.left1,labels:["1"]},{...M2n.right1,labels:["2"]}],size:{width:yCe.width,height:yCe.height},center:{x:yCe.centerX,y:yCe.centerY}}),N2n=si(D2n),Stt=N2n.primitives.filter(t=>t.type==="text"),Qtt=Stt.find(t=>t.text==="{REF}"),vtt=Stt.find(t=>t.text==="{VAL}"),wtt=Stt.find(t=>t.text==="COS φ");Qtt.x=.35,Qtt.y=.4279000000000375,Qtt.anchor="middle_left",vtt.anchor="middle_left",vtt.x=.35,vtt.y=-.4279000000000375,wtt.x=0,wtt.y=.014279000000000375,wtt.anchor="center";var Vcr=N2n,zcr={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:.01,y:.03},{x:.01,y:-.09}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:-.09},{x:.18,y:-.09}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.22},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:Jcr,texts:R2n,bounds:T2n,refblocks:k2n,circles:Wcr}=zcr,F2n=Gl({primitives:[...Object.values(Jcr),...Object.values(Wcr),{...R2n.top1,anchor:"middle_left"},{...R2n.bottom1,anchor:"middle_left"}],ports:[{...k2n.left1,labels:["1"]},{...k2n.right1,labels:["2"]}],center:{x:T2n.centerX,y:T2n.centerY}}),jcr=si(F2n,"up"),L2n={paths:{"path12-1-8-6-9-9":{type:"path",points:[{x:-.05,y:.09},{x:-.05,y:.04}],color:"primary",fill:!1},"path12-1-8-7-9-9":{type:"path",points:[{x:-.05,y:.09},{x:.07,y:.09}],color:"primary",fill:!1},"path12-1-8-6-9-10":{type:"path",points:[{x:.07,y:.09},{x:.07,y:.04}],color:"primary",fill:!1},"path12-1-5-6-4":{type:"path",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:"primary",fill:!1},"path12-1-8-0-0":{type:"path",points:[{x:-.16,y:.04},{x:.18,y:.04}],color:"primary",fill:!1},"path12-1-0-1":{type:"path",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.29},bottom1:{type:"text",text:"{VAL}",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:-.14,y:-.05,radius:.02,color:"primary",fill:!1},circle:{type:"circle",x:.17,y:-.05,radius:.02,color:"primary",fill:!1}}},{paths:$cr,texts:H2n,bounds:O2n,refblocks:G2n,circles:qcr}=L2n,ute=Gl({primitives:[...Object.values($cr),...Object.values(qcr),{...H2n.top1,x:0,y:.3594553499999995,anchor:"middle_bottom"},{...H2n.bottom1,x:0,y:-.3594553499999995,anchor:"middle_top"}],ports:[{...G2n.left1,labels:["1"]},{...G2n.right1,labels:["2"]}],center:{x:O2n.centerX,y:O2n.centerY}}),Ptt=si(ute,"down"),Mtt=Ptt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Dtt=Ptt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Mtt.anchor="middle_bottom",Dtt.anchor="middle_top",Mtt.y=.4,Mtt.x=.35,Dtt.y=-.4,Dtt.x=.35;var Xcr=Ptt,{paths:Zcr,texts:Y2n,bounds:U2n,refblocks:K2n,circles:elr}=L2n,tlr=Gl({primitives:[...Object.values(Zcr),...Object.values(elr),{...Y2n.top1,x:0,y:.3594553499999995,anchor:"middle_bottom"},{...Y2n.bottom1,x:0,y:-.3594553499999995,anchor:"middle_top"}],ports:[{...K2n.left1,labels:["1"]},{...K2n.right1,labels:["2"]}],center:{x:U2n.centerX,y:U2n.centerY}}),Ntt=si(ute,"left"),Rtt=Ntt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Ttt=Ntt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Rtt.anchor="middle_bottom",Ttt.anchor="middle_top",Rtt.y=.4,Rtt.x=0,Ttt.y=-.4,Ttt.x=0;var nlr=Ntt,ktt=si(ute,"up"),Ftt=ktt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Ltt=ktt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Ftt.anchor="middle_left",Ltt.anchor="middle_left",Ftt.y+=.4,Ftt.x=.34,Ltt.y-=.41,Ltt.x=.34;var olr=ktt,Htt=si(ute,"up"),Ott=Htt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Gtt=Htt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Ott.anchor="middle_left",Gtt.anchor="middle_left",Ott.y+=.4,Ott.x=.34,Gtt.y-=.41,Gtt.x=.34;var ilr=Htt,xCe={paths:{path12_rotated:{type:"path",points:[{x:-.09,y:.12},{x:-.09,y:-.12}],color:"primary",fill:!1},path2_rotated:{type:"path",points:[{x:-.09,y:0},{x:.09,y:0}],color:"primary",fill:!1}},refblocks:{left1:{x:.09,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:rlr,bounds:V2n,refblocks:slr,circles:alr}=xCe,Alr=Ln({primitives:[...Object.values(rlr),...Object.values(alr),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...slr.left1,labels:["1"]}],center:{x:V2n.centerX,y:V2n.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),{paths:clr,bounds:z2n,refblocks:llr,circles:ulr}=xCe,glr=Ln({primitives:[...Object.values(clr),...Object.values(ulr),{type:"text",text:"{REF}",x:-.13,y:0}],ports:[{...llr.left1,labels:["1"]}],center:{x:z2n.centerX,y:z2n.centerY}}).changeTextAnchor("{VAL}","middle_top").rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),{paths:dlr,bounds:J2n,refblocks:hlr,circles:plr}=xCe,mlr=Ln({primitives:[...Object.values(dlr),...Object.values(plr),{type:"text",text:"{REF}",x:-.14,y:-0}],ports:[{...hlr.left1,labels:["1"]}],center:{x:J2n.centerX,y:J2n.centerY}}).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),{paths:_lr,bounds:W2n,refblocks:flr}=xCe,Ilr=Ln({primitives:[...Object.values(_lr),{type:"text",text:"{REF}",x:-.14,y:0}],ports:[{...flr.left1,labels:["1"]}],center:{x:W2n.centerX,y:W2n.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),Clr={paths:{path40:{type:"path",points:[{x:-.19,y:-.33},{x:-.26,y:-.14}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.38,y:-.26},{x:-.19,y:-.33}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.26,y:-.14},{x:-.38,y:-.26}],color:"primary",fill:!1},path43:{type:"path",points:[{x:-.26,y:-.39},{x:-.13,y:-.26}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.32,y:-.2},{x:-.52,y:0}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:0,y:-.52},{x:-.19,y:-.33}],color:"primary",fill:!1},"path40-4":{type:"path",points:[{x:-.19,y:.32},{x:-.38,y:.26}],color:"primary",fill:!1},"path41-1":{type:"path",points:[{x:-.26,y:.13},{x:-.19,y:.32}],color:"primary",fill:!1},"path42-7":{type:"path",points:[{x:-.38,y:.26},{x:-.26,y:.13}],color:"primary",fill:!1},"path43-1":{type:"path",points:[{x:-.13,y:.26},{x:-.26,y:.39}],color:"primary",fill:!1},"path44-8":{type:"path",points:[{x:-.32,y:.19},{x:-.51,y:.01}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:-.01,y:.5},{x:-.19,y:.32}],color:"primary",fill:!1},"path40-4-0":{type:"path",points:[{x:.32,y:-.19},{x:.13,y:-.26}],color:"primary",fill:!1},"path41-1-2":{type:"path",points:[{x:.26,y:-.38},{x:.32,y:-.19}],color:"primary",fill:!1},"path42-7-1":{type:"path",points:[{x:.13,y:-.26},{x:.26,y:-.38}],color:"primary",fill:!1},"path43-1-8":{type:"path",points:[{x:.39,y:-.26},{x:.26,y:-.13}],color:"primary",fill:!1},"path44-8-7":{type:"path",points:[{x:.2,y:-.32},{x:.01,y:-.51}],color:"primary",fill:!1},"path44-0-7-1":{type:"path",points:[{x:.52,y:0},{x:.32,y:-.19}],color:"primary",fill:!1},"path40-4-8":{type:"path",points:[{x:.32,y:.19},{x:.26,y:.38}],color:"primary",fill:!1},"path41-1-4":{type:"path",points:[{x:.13,y:.26},{x:.32,y:.19}],color:"primary",fill:!1},"path42-7-0":{type:"path",points:[{x:.26,y:.38},{x:.13,y:.26}],color:"primary",fill:!1},"path43-1-0":{type:"path",points:[{x:.26,y:.13},{x:.39,y:.26}],color:"primary",fill:!1},"path44-8-9":{type:"path",points:[{x:.19,y:.32},{x:0,y:.52}],color:"primary",fill:!1},"path44-0-7-3":{type:"path",points:[{x:.5,y:.01},{x:.32,y:.19}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.29,y:-.46},bottom1:{type:"text",text:"{VAL}",x:-.29,y:.5}},refblocks:{top1:{x:0,y:-.52},bottom1:{x:0,y:.52},left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:ylr,texts:j2n,bounds:ECe,refblocks:BCe,circles:xlr}=Clr,$2n=Gl({primitives:[...Object.values(ylr),...Object.values(xlr),{...j2n.top1,anchor:"middle_right"},{...j2n.bottom1,anchor:"middle_right"}],ports:[{...BCe.top1,labels:["1"]},{...BCe.bottom1,labels:["2"]},{...BCe.left1,labels:["3"]},{...BCe.right1,labels:["4"]}],size:{width:ECe.width,height:ECe.height},center:{x:ECe.centerX,y:ECe.centerY}}),Ytt=si($2n),Elr=Ytt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Blr=Ytt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Elr.anchor="middle_left",Blr.anchor="middle_right";var blr=Ytt,bCe={paths:{path27:{type:"path",points:[{x:.47,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path27-0":{type:"path",points:[{x:-.21,y:.04},{x:-.47,y:.04}],color:"primary",fill:!1},"path27-8-2-4":{type:"path",points:[{x:.21,y:.04},{x:.19,y:-.05}],color:"primary",fill:!1},"path27-8-2-4-29":{type:"path",points:[{x:-.19,y:.14},{x:-.21,y:.04}],color:"primary",fill:!1},"path27-8-2-4-5":{type:"path",points:[{x:.19,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1":{type:"path",points:[{x:.08,y:-.05},{x:.13,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9":{type:"path",points:[{x:.08,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2":{type:"path",points:[{x:-.03,y:-.05},{x:.03,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1":{type:"path",points:[{x:-.03,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.08,y:.14}],color:"primary",fill:!1},"path27-8-2-4-5-1-9-2-1-2-2":{type:"path",points:[{x:-.13,y:-.05},{x:-.19,y:.14}],color:"primary",fill:!1}},refblocks:{left1:{x:-.47,y:.04},right1:{x:.47,y:.04}},bounds:{width:.99,height:.84,centerX:0,centerY:0},circles:{}},{paths:Slr,bounds:SCe,refblocks:q2n,circles:Qlr}=bCe,vlr=Ln({primitives:[...Object.values(Slr),...Object.values(Qlr),{type:"text",text:"{REF}",x:-.2,y:.2194553499999995},{type:"text",text:"{VAL}",x:.2,y:.2194553499999995}],ports:[{...q2n.left1,labels:["1"]},{...q2n.right1,labels:["2"]}],size:{width:SCe.width,height:SCe.height},center:{x:SCe.centerX,y:SCe.centerY}}).rotateRightFacingSymbol("down").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:wlr,bounds:QCe,refblocks:X2n,circles:Plr}=bCe,Mlr=Ln({primitives:[...Object.values(wlr),...Object.values(Plr),{type:"text",text:"{REF}",x:0,y:-.1704553499999995},{type:"text",text:"{VAL}",x:0,y:.2294553499999995}],ports:[{...X2n.left1,labels:["1"]},{...X2n.right1,labels:["2"]}],size:{width:QCe.width,height:QCe.height},center:{x:QCe.centerX,y:QCe.centerY}}).rotateRightFacingSymbol("left").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:Dlr,bounds:vCe,refblocks:Z2n,circles:Nlr}=bCe,Rlr=Ln({primitives:[...Object.values(Dlr),...Object.values(Nlr),{type:"text",text:"{REF}",x:0,y:.2294553499999995},{type:"text",text:"{VAL}",x:0,y:-.1704553499999995}],ports:[{...Z2n.left1,labels:["1"]},{...Z2n.right1,labels:["2"]}],size:{width:vCe.width,height:vCe.height},center:{x:vCe.centerX,y:vCe.centerY}}).rotateRightFacingSymbol("right").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),{paths:Tlr,bounds:wCe,refblocks:exn,circles:klr}=bCe,Flr=Ln({primitives:[...Object.values(Tlr),...Object.values(klr),{type:"text",text:"{REF}",x:.2,y:-.1404553499999995},{type:"text",text:"{VAL}",x:-.2,y:-.1494553499999995}],ports:[{...exn.left1,labels:["1"]},{...exn.right1,labels:["2"]}],size:{width:wCe.width,height:wCe.height},center:{x:wCe.centerX,y:wCe.centerY}}).rotateRightFacingSymbol("up").labelPort("left",["1"]).labelPort("right",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),txn={paths:{path27:{type:"path",points:[{x:.76,y:-.28},{x:.31,y:-.28}],color:"primary",fill:!1},path28:{type:"path",points:[{x:-.3,y:-.02},{x:-.77,y:-.02}],color:"primary",fill:!1},path30:{type:"path",points:[{x:-.3,y:.35},{x:-.3,y:-.28}],color:"primary",fill:!1},"path27-3":{type:"path",points:[{x:.77,y:.35},{x:.32,y:.35}],color:"primary",fill:!1},"path29-5":{type:"path",points:[{x:-.07,y:-.28},{x:-.3,y:-.28}],color:"primary",fill:!1},"path29-5-7":{type:"path",points:[{x:.33,y:-.28},{x:.11,y:-.28}],color:"primary",fill:!1},"path29-5-7-6":{type:"path",points:[{x:-.06,y:-.17},{x:-.06,y:-.39}],color:"primary",fill:!1},"path29-5-7-6-6":{type:"path",points:[{x:.09,y:-.17},{x:.09,y:-.39}],color:"primary",fill:!1},"path29-5-9":{type:"path",points:[{x:-.07,y:.35},{x:-.3,y:.35}],color:"primary",fill:!1},"path29-5-7-2":{type:"path",points:[{x:.33,y:.35},{x:.11,y:.35}],color:"primary",fill:!1},"path29-5-7-6-0":{type:"path",points:[{x:-.06,y:.46},{x:-.06,y:.24}],color:"primary",fill:!1},"path29-5-7-6-6-2":{type:"path",points:[{x:.09,y:.46},{x:.09,y:.24}],color:"primary",fill:!1},"path29-5-92":{type:"path",points:[{x:.33,y:.13},{x:.33,y:.35}],color:"primary",fill:!1},"path29-5-7-28":{type:"path",points:[{x:.33,y:-.28},{x:.33,y:-.05}],color:"primary",fill:!1},"path29-5-7-6-9":{type:"path",points:[{x:.44,y:.11},{x:.22,y:.11}],color:"primary",fill:!1},"path29-5-7-6-6-7":{type:"path",points:[{x:.44,y:-.04},{x:.22,y:-.04}],color:"primary",fill:!1},"path29-5-7-6-9-2":{type:"path",points:[{x:.44,y:.07},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4":{type:"path",points:[{x:.44,y:0},{x:.44,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-4-6":{type:"path",points:[{x:.22,y:0},{x:.22,y:.07}],color:"primary",fill:!1},"path29-5-7-6-9-2-9":{type:"path",points:[{x:.44,y:0},{x:.22,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.02,y:.53},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.54}},refblocks:{left1:{x:-.77,y:-.02},right1:{x:.76,y:-.28},right2:{x:.77,y:.35}},bounds:{width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:Llr,texts:nxn,bounds:PCe,refblocks:Utt,circles:Hlr}=txn,MCe=Gl({primitives:[...Object.values(Llr),...Object.values(Hlr),{...nxn.top1,anchor:"middle_bottom"},{...nxn.bottom1,anchor:"middle_top"}],ports:[{...Utt.left1,labels:["1"]},{...Utt.right1,labels:["2"]},{...Utt.right2,labels:["3"]}],size:{width:PCe.width,height:PCe.height},center:{x:PCe.centerX,y:PCe.centerY}}),Ktt=si(MCe,"down"),Vtt=Ktt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),ztt=Ktt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Vtt.anchor="middle_bottom",ztt.anchor="middle_top",Vtt.y+=.3,Vtt.x+=.101,ztt.y-=.49999,ztt.x+=1.19999;var Olr=Ktt,{paths:Glr,bounds:DCe,refblocks:Jtt,circles:Ylr}=txn,oxn=Gl({primitives:[...Object.values(Glr),...Object.values(Ylr),{type:"text",text:"{REF}",x:.01596175000000022,y:-.5308501500000009,anchor:"middle_top"},{type:"text",text:"{VAL}",x:.013116750000000454,y:.5408501499999989,anchor:"middle_bottom"}],ports:[{...Jtt.left1,labels:["1"]},{...Jtt.right1,labels:["2"]},{...Jtt.right2,labels:["3"]}],size:{width:DCe.width,height:DCe.height},center:{x:DCe.centerX,y:DCe.centerY}}),Wtt=si(MCe,"left"),jtt=Wtt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),$tt=Wtt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jtt.anchor="middle_bottom",$tt.anchor="middle_top",jtt.y+=.99,jtt.x-=0,$tt.y-=1.10999,$tt.x=0;var Ulr=Wtt,qtt=si(MCe,"up"),Xtt=qtt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Ztt=qtt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Xtt.anchor="middle_bottom",Ztt.anchor="middle_top",Xtt.y+=.499,Xtt.x=.62,Ztt.y-=.29999,Ztt.x+=.1;var Klr=qtt,Vlr=si(oxn),zlr={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-7":{type:"path",points:[{x:.21,y:.18},{x:.14,y:.18}],color:"primary",fill:!1},"path43-7-9":{type:"path",points:[{x:.21,y:.13},{x:.21,y:.18}],color:"primary",fill:!1},"path43-7-2":{type:"path",points:[{x:.08,y:-.09},{x:.14,y:-.09}],color:"primary",fill:!1},"path43-7-9-3":{type:"path",points:[{x:.08,y:-.04},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},NCe=Ln(zlr).labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_top").changeTextAnchor("{REF}","middle_bottom").build(),ent=si(NCe,"down"),tnt=ent.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),nnt=ent.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");tnt.anchor="middle_left",nnt.anchor="middle_left",tnt.y+=.3,tnt.x=.3,nnt.y-=.3,nnt.x=.3;var Jlr=ent,ont=si(NCe,"left"),int=ont.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),rnt=ont.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");int.anchor="middle_bottom",rnt.anchor="middle_top",int.y+=.5,int.x=0,rnt.y-=.55,rnt.x=0;var Wlr=ont,snt=si(NCe,"up"),ant=snt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Ant=snt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");ant.anchor="middle_left",Ant.anchor="middle_left",ant.y+=.3,ant.x=.3,Ant.y-=.3,Ant.x=.3;var jlr=snt,ixn={paths:{path11:{type:"path",points:[{x:-.52,y:.04},{x:-.18,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.19,y:.05},{x:.52,y:.05}],color:"primary",fill:!1},"path12-6":{type:"path",points:[{x:.18,y:-.15},{x:.18,y:.25}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.19,y:0},{x:.35,y:-.14}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.35,y:-.14},{x:.34,y:-.35}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.17,y:.27},{x:-.17,y:-.15},{x:.18,y:.05},{x:-.17,y:.27}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.22,y:.38},bottom1:{type:"text",text:"{VAL}",x:.11,y:-.38}},refblocks:{bottom1:{x:.34,y:-.35},left1:{x:-.52,y:.04},right1:{x:.52,y:.05}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.38,width:1.09,height:.77,centerX:0,centerY:0},circles:{}},{paths:B_r,texts:b_r,bounds:S_r,refblocks:Q_r,circles:v_r}=ixn,rxn=Ln(ixn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),sxn=si(rxn),$lr=sxn.primitives.filter(t=>t.type==="text"),axn=$lr.find(t=>t.text==="{REF}");axn.y=0,axn.anchor="middle_left";var qlr=sxn,Axn={paths:{path44:{type:"path",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.07,y:-.025},{x:-.07,y:-.025}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.4458008,y:-.025023700000000426},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},Xlr=Ln(Axn).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),cnt=Ln(Axn).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),cxn=si(cnt,"left"),lnt=cxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");lnt.anchor="middle_bottom",lnt.y+=.4,lnt.x=0;var Zlr=cxn,lxn=si(cnt,"up"),unt=lxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");unt.anchor="middle_left",unt.y+=0,unt.x=.2;var e0r=lxn,uxn={paths:{path44:{type:"path",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.44,y:-.02},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},t0r=Ln(uxn).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").build(),gnt=Ln(uxn).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),gxn=si(gnt,"left"),dnt=gxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");dnt.anchor="middle_bottom",dnt.y+=.4,dnt.x=0;var n0r=gxn,dxn=si(gnt,"up"),hnt=dxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");hnt.anchor="middle_left",hnt.y+=.05,hnt.x=.2;var o0r=dxn,hxn={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},i0r=Ln(hxn).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),pnt=Ln(hxn).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),pxn=si(pnt,"left"),mnt=pxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");mnt.anchor="middle_left",mnt.y+=.5,mnt.x=.2;var r0r=pxn,mxn=si(pnt,"up"),_nt=mxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");_nt.anchor="middle_left",_nt.y+=.3,_nt.x=.2;var s0r=mxn,_xn={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1},path1:{type:"path",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.125,y:.1},{x:.045,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},a0r=Ln(_xn).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),fnt=Ln(_xn).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),fxn=si(fnt,"left"),Int=fxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");Int.anchor="middle_left",Int.y+=.5,Int.x=.2;var A0r=fxn,Ixn=si(fnt,"up"),Cnt=Ixn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");Cnt.anchor="middle_left",Cnt.y+=.4,Cnt.x=.2;var c0r=Ixn,Cxn={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1},"path44-0-7":{type:"path",points:[{x:.125,y:.1},{x:.045,y:.1}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},l0r=Ln(Cxn).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),ynt=Ln(Cxn).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),yxn=si(ynt,"left"),xnt=yxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");xnt.anchor="middle_left",xnt.y+=.6,xnt.x=.3;var u0r=yxn,xxn=si(ynt,"up"),Ent=xxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");Ent.anchor="middle_left",Ent.y+=.4,Ent.x=.2;var g0r=xxn,Exn={paths:{path44:{type:"path",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.45,y:.1},{x:.25,y:.1}],color:"primary",fill:!1},"path44-5":{type:"path",points:[{x:0,y:-.025},{x:0,y:-.275}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:"primary",fill:!0},"path2-88":{type:"path",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:"primary",fill:!0},"path2-88-5":{type:"path",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-88-5-1":{type:"path",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:"primary",fill:!0},"path2-88-5-1-6":{type:"path",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:"primary",fill:!0},"path2-8":{type:"path",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:"primary",fill:!0},"path8704-1":{type:"path",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:"primary",fill:!1},"path8704-1-7":{type:"path",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},d0r=Ln(Exn).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_left").build(),Bnt=Ln(Exn).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("bottom1",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),Bxn=si(Bnt,"left"),bnt=Bxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");bnt.anchor="middle_left",bnt.y+=.5,bnt.x=.3;var h0r=Bxn,bxn=si(Bnt,"up"),Snt=bxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");Snt.anchor="middle_left",Snt.y+=.3,Snt.x=.2;var p0r=bxn,m0r={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:-.03}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.37},bottom1:{type:"text",text:"{VAL}",x:0,y:-.37}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right2:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},RCe=Ln(m0r).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right2",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),Qnt=si(RCe,"down"),vnt=Qnt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),wnt=Qnt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");vnt.anchor="middle_bottom",wnt.anchor="middle_top",vnt.x=.44,vnt.y+=.28,wnt.y-=.28,wnt.x=.44;var _0r=Qnt,Pnt=si(RCe,"left"),Mnt=Pnt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Dnt=Pnt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Mnt.anchor="middle_bottom",Dnt.anchor="middle_top",Mnt.x=0,Mnt.y+=.625,Dnt.y-=.695,Dnt.x=0;var f0r=Pnt,Nnt=si(RCe,"up"),Rnt=Nnt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Tnt=Nnt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Rnt.anchor="middle_bottom",Tnt.anchor="middle_top",Rnt.x=.4,Rnt.y+=.28,Tnt.y-=.28,Tnt.x=.4;var I0r=Nnt,C0r={paths:{path1:{type:"path",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:"primary",fill:!1},"path-1-3":{type:"path",points:[{x:-.07,y:.03},{x:.11,y:.14}],color:"primary",fill:!1},path2:{type:"path",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:"primary",fill:!1},path3:{type:"path",points:[{x:.12,y:.17},{x:.37,y:.17}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.4},bottom1:{type:"text",text:"{VAL}",x:0,y:-.4}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right3:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{"circle-3":{type:"circle",x:.08,y:-.07,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:.03,radius:.02,color:"primary",fill:!1},"circle-2":{type:"circle",x:.08,y:.17,radius:.02,color:"primary",fill:!1}}},TCe=Ln(C0r).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right3",["2"]).labelPort("right1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),knt=si(TCe,"down"),Fnt=knt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Lnt=knt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Fnt.anchor="middle_bottom",Lnt.anchor="middle_top",Fnt.x=.44,Fnt.y+=.28,Lnt.y-=.28,Lnt.x=.44;var y0r=knt,Hnt=si(TCe,"left"),Ont=Hnt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Gnt=Hnt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Ont.anchor="middle_bottom",Gnt.anchor="middle_top",Ont.x=0,Ont.y+=.625,Gnt.y-=.695,Gnt.x=0;var x0r=Hnt,Ynt=si(TCe,"up"),Unt=Ynt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Knt=Ynt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Unt.anchor="middle_bottom",Knt.anchor="middle_top",Unt.x=.4,Unt.y+=.28,Knt.y-=.28,Knt.x=.4;var E0r=Ynt,PK={paths:{"lead-positive":{type:"path",points:[{x:-.4,y:.19999999999999996},{x:-.20000000000000007,y:.19999999999999996}],color:"primary",fill:!1},"lead-negative":{type:"path",points:[{x:-.4,y:-.20000000000000018},{x:-.20000000000000007,y:-.20000000000000018}],color:"primary",fill:!1},"voice-coil":{type:"path",points:[{x:-.20000000000000007,y:.19999999999999996},{x:0,y:.19999999999999996},{x:0,y:-.20000000000000018},{x:-.20000000000000007,y:-.20000000000000018},{x:-.20000000000000007,y:.19999999999999996}],color:"primary",fill:!1},cone:{type:"path",points:[{x:0,y:.19999999999999996},{x:.3999999999999999,y:.3999999999999999},{x:.3999999999999999,y:-.40000000000000013},{x:0,y:-.20000000000000018},{x:0,y:.19999999999999996}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.6},bottom1:{type:"text",text:"{VAL}",x:0,y:-.6000000000000001}},refblocks:{left1:{x:-.4,y:-.20000000000000018},left2:{x:-.4,y:.19999999999999996}},bounds:{minX:-.4,maxX:.3999999999999999,minY:-.6000000000000001,maxY:.6,width:.7999999999999999,height:1.2000000000000002,centerX:-5551115123125783e-32,centerY:-5551115123125783e-32},circles:{}},Sxn=Ln(PK).rotateRightFacingSymbol("down").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),kCe=GS(Sxn.primitives),B0r={...Sxn,center:{x:(kCe.minX+kCe.maxX)/2,y:(kCe.minY+kCe.maxY)/2}},Qxn=Ln(PK).rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),FCe=GS(Qxn.primitives),b0r={...Qxn,center:{x:(FCe.minX+FCe.maxX)/2,y:(FCe.minY+FCe.maxY)/2}},vxn=Ln(PK).rotateRightFacingSymbol("left").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),LCe=GS(vxn.primitives),S0r={...vxn,center:{x:(LCe.minX+LCe.maxX)/2,y:(LCe.minY+LCe.maxY)/2}},wxn=Ln(PK).rotateRightFacingSymbol("right").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),HCe=GS(wxn.primitives),Q0r={...wxn,center:{x:(HCe.minX+HCe.maxX)/2,y:(HCe.minY+HCe.maxY)/2}},Pxn=Ln(PK).rotateRightFacingSymbol("up").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),OCe=GS(Pxn.primitives),v0r={...Pxn,center:{x:(OCe.minX+OCe.maxX)/2,y:(OCe.minY+OCe.maxY)/2}},Mxn=Ln(PK).rotateRightFacingSymbol("up").labelPort("left1",["2","neg"]).labelPort("left2",["1","pos"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),GCe=GS(Mxn.primitives),w0r={...Mxn,center:{x:(GCe.minX+GCe.maxX)/2,y:(GCe.minY+GCe.maxY)/2}},YCe={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:0},{x:.11,y:.05}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.31},bottom1:{type:"text",text:"{VAL}",x:0,y:-.28}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete YCe.refblocks.left1,delete YCe.refblocks.right1,YCe.bounds.width+=.2;var UCe=Ln(YCe).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),Vnt=si(UCe,"down"),znt=Vnt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Jnt=Vnt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");znt.anchor="middle_bottom",Jnt.anchor="middle_top",znt.x=.3,znt.y+=.265,Jnt.y-=.265,Jnt.x=.3;var P0r=Vnt,Wnt=si(UCe,"left"),jnt=Wnt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),$nt=Wnt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");jnt.anchor="middle_bottom",$nt.anchor="middle_top",jnt.x=0,jnt.y+=.57,$nt.y-=.57,$nt.x=0;var M0r=Wnt,qnt=si(UCe,"up"),Xnt=qnt.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Znt=qnt.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Xnt.anchor="middle_bottom",Znt.anchor="middle_top",Xnt.x=.3,Xnt.y+=.265,Znt.y-=.265,Znt.x=.3;var D0r=qnt,KCe={paths:{path11:{type:"path",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.07,y:.01},{x:.1,y:.14}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.12,y:-.01},{x:.38,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:0,y:.25},bottom1:{type:"text",text:"{VAL}",x:0,y:-.25}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{"circle-2":{type:"circle",x:.1,y:0,radius:.02,color:"primary",fill:!1},"circle-1":{type:"circle",x:-.1,y:0,radius:.02,color:"primary",fill:!1}}};delete KCe.refblocks.left1,delete KCe.refblocks.right1,KCe.bounds.width+=.2;var VCe=Ln(KCe).changeTextAnchor("{VAL}","middle_top").labelPort("left2",["1"]).labelPort("right2",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),eot=si(VCe,"down"),tot=eot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),not=eot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");tot.anchor="middle_bottom",not.anchor="middle_top",tot.x=.3,tot.y+=.265,not.y-=.265,not.x=.3;var N0r=eot,oot=si(VCe,"left"),iot=oot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),rot=oot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");iot.anchor="middle_bottom",rot.anchor="middle_top",iot.x=0,iot.y+=.57,rot.y-=.57,rot.x=0;var R0r=oot,sot=si(VCe,"up"),aot=sot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Aot=sot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");aot.anchor="middle_bottom",Aot.anchor="middle_top",aot.x=.3,aot.y+=.265,Aot.y-=.265,Aot.x=.3;var T0r=sot,zCe={paths:{path44:{type:"path",points:[{x:-.16845120000000047,y:.02621170000000017},{x:-.4458008,y:.02709619999999968}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.4458008,y:.026971799999999657},{x:.1677968999999997,y:.027926399999999685}],color:"primary",fill:!1},"path8704-1":{type:"path",points:[{x:-.0040837000000002455,y:-.13467459999999964},{x:-.0040837000000002455,y:-.13467459999999964},{x:-.017668143940740948,y:-.1311205263185182},{x:-.03043520885925943,y:-.12727072121481456},{x:-.04240966440000013,y:-.1231399985999998},{x:-.05361628020740751,y:-.11874317238518502},{x:-.064079825925926,y:-.11409505648148131},{x:-.07382507120000005,y:-.10921046479999987},{x:-.0828767856740741,y:-.10410421125185171},{x:-.0912597389925926,y:-.09879110974814802},{x:-.09899870079999995,y:-.0932859741999998},{x:-.10611844074074069,y:-.08760361851851838},{x:-.11264372845925916,y:-.0817588566148146},{x:-.11859933359999993,y:-.07576650239999982},{x:-.12401002580740728,y:-.06964136978518495},{x:-.12890057472592584,y:-.06339827268148127},{x:-.13329574999999985,y:-.05705202499999972},{x:-.13722032127407394,y:-.05061744065185156},{x:-.14069905819259243,y:-.04410933354814783},{x:-.14375673039999987,y:-.03754251759999966},{x:-.14641810754074058,y:-.030931806718518143},{x:-.1487079592592591,y:-.0242920148148144},{x:-.15065105519999983,y:-.017637955799999563},{x:-.15227216500740723,y:-.01098444358518472},{x:-.15359605832592574,y:-.004346292081480994},{x:-.1546475047999998,y:.00226168480000051},{x:-.15545127407407386,y:.008824673148148676},{x:-.1560321357925924,y:.015327859051852397},{x:-.1564148595999998,y:.02175642860000056},{x:-.1566242151407405,y:.028095567881482052},{x:-.15668497205925902,y:.03433046298518576},{x:-.15662189999999976,y:.04044630000000058},{x:-.15662189999999976,y:.0404463000000006},{x:-.15662189999999976,y:.0404463000000006},{x:-.15622857394444417,y:.04717166472222282},{x:-.1553217675555553,y:.05388046444444503},{x:-.15392183849999977,y:.060558907500000585},{x:-.1520491444444442,y:.0671932022222228},{x:-.1497240430555553,y:.07376955694444502},{x:-.14696689199999974,y:.08027418000000058},{x:-.14379804894444415,y:.0866932797222228},{x:-.1402378715555553,y:.09301306444444506},{x:-.13630671749999965,y:.09921974250000057},{x:-.13202494444444415,y:.10529952222222282},{x:-.12741291005555522,y:.11123861194444501},{x:-.1224909719999997,y:.1170232200000006},{x:-.11727948794444407,y:.12263955472222278},{x:-.11179881555555524,y:.12807382444444504},{x:-.10606931249999965,y:.13331223750000057},{x:-.1001113364444441,y:.13834100222222284},{x:-.09394524505555521,y:.14314632694444504},{x:-.08759139599999967,y:.14771442000000062},{x:-.08107014694444413,y:.15203148972222283},{x:-.07440185555555523,y:.15608374444444503},{x:-.0676068794999997,y:.15985739250000058},{x:-.06070557644444415,y:.16333864222222283},{x:-.05371830405555529,y:.16651370194444504},{x:-.04666541999999976,y:.1693687800000006},{x:-.03956728194444424,y:.1718900847222228},{x:-.03244424755555539,y:.17406382444444501},{x:-.025316674499999876,y:.17587620750000055},{x:-.01820492044444437,y:.17731344222222278},{x:-.01112934305555553,y:.178361736944445},{x:-.004110300000000034,y:.17900730000000054},{x:-.004110300000000011,y:.17900730000000054}],color:"primary",fill:!1},"path8704-1-9":{type:"path",points:[{x:.004158700000000071,y:-.1355885000000001},{x:.004158700000000071,y:-.1355885000000001},{x:.017743143940740766,y:-.1320344263185187},{x:.03051020885925925,y:-.12818462121481505},{x:.042484664399999955,y:-.12405389860000024},{x:.053691280207407335,y:-.11965707238518546},{x:.0641548259259258,y:-.11500895648148178},{x:.07390007119999986,y:-.1101243648000003},{x:.0829517856740739,y:-.10501811125185218},{x:.0913347389925924,y:-.09970500974814848},{x:.09907370079999973,y:-.09419987420000027},{x:.10619344074074046,y:-.08851751851851883},{x:.11271872845925893,y:-.08267275661481507},{x:.11867433359999968,y:-.07668040240000029},{x:.12408502580740703,y:-.0705552697851854},{x:.12897557472592555,y:-.06431217268148172},{x:.13337074999999957,y:-.05796592500000018},{x:.13729532127407365,y:-.05153134065185202},{x:.14077405819259214,y:-.045023233548148286},{x:.14383173039999952,y:-.038456417600000126},{x:.14649310754074024,y:-.03184570671851861},{x:.14878295925925875,y:-.02520591481481487},{x:.1507260551999995,y:-.01855185580000003},{x:.15234716500740686,y:-.011898343585185192},{x:.15367105832592537,y:-.005260192081481464},{x:.15472250479999944,y:.001347784800000043},{x:.1555262740740735,y:.007910773148148207},{x:.156107135792592,y:.01441395905185193},{x:.1564898595999994,y:.020842528600000094},{x:.15669921514074014,y:.02718166788148159},{x:.15675997205925862,y:.03341656298518529},{x:.15669689999999936,y:.03953240000000011},{x:.15669689999999936,y:.039532400000000134},{x:.15669689999999936,y:.039532400000000134},{x:.1563035739444438,y:.04625776472222235},{x:.15539676755555493,y:.05296656444444457},{x:.15399683849999934,y:.05964500750000013},{x:.1521241444444438,y:.06627930222222234},{x:.14979904305555491,y:.07285565694444456},{x:.14704189199999937,y:.07936028000000013},{x:.1438730489444438,y:.08577937972222234},{x:.1403128715555549,y:.09209916444444458},{x:.13638171749999925,y:.0983058425000001},{x:.13209994444444376,y:.10438562222222235},{x:.12748791005555482,y:.11032471194444453},{x:.12256597199999929,y:.11610932000000013},{x:.1173544879444437,y:.1217256547222223},{x:.11187381555555485,y:.12715992444444457},{x:.10614431249999925,y:.1323983375000001},{x:.10018633644444369,y:.13742710222222235},{x:.09402024505555481,y:.14223242694444457},{x:.08766639599999927,y:.14680052000000016},{x:.08114514694444372,y:.15111758972222236},{x:.07447685555555483,y:.15516984444444457},{x:.06768187949999929,y:.15894349250000012},{x:.06078057644444377,y:.16242474222222236},{x:.053793304055554894,y:.16559980194444457},{x:.046740419999999366,y:.16845488000000014},{x:.039642281944443844,y:.17097618472222234},{x:.03251924755555499,y:.17314992444444455},{x:.02539167449999948,y:.17496230750000008},{x:.018279920444443973,y:.17639954222222232},{x:.011204343055555134,y:.17744783694444452},{x:.004185299999999637,y:.17809340000000007},{x:.004185299999999614,y:.17809340000000007}],color:"primary",fill:!1},path4:{type:"path",points:[{x:-.08039130000000005,y:.0179576999999993},{x:-.08039130000000005,y:.09650599999999931}],color:"primary",fill:!0},"path4-5":{type:"path",points:[{x:.01494479999999987,y:-.055216500000000224},{x:.01494479999999987,y:.09691909999999937}],color:"primary",fill:!0},"path4-5-8":{type:"path",points:[{x:.06871169999999927,y:-.056870000000000864},{x:.06871169999999927,y:.018784499999999538}],color:"primary",fill:!0},"path4-1":{type:"path",points:[{x:-.08179359999999969,y:.09650570000000003},{x:.015771699999999722,y:.09650570000000003}],color:"primary",fill:!0},"path4-1-6":{type:"path",points:[{x:.0117995999999998,y:-.05594970000000088},{x:.06843709999999925,y:-.05594970000000088}],color:"primary",fill:!0},"rect1577-4":{type:"path",points:[{x:-.17162450000000073,y:.11125030000000025},{x:-.2688274000000015,y:.11125030000000025},{x:-.2688274000000015,y:.11469129999999961},{x:-.17162450000000073,y:.11469129999999961}],color:"primary",fill:!0},"rect1577-4-7":{type:"path",points:[{x:-.2184661999999995,y:.16159429999999997},{x:-.2184661999999995,y:.06439139999999943},{x:-.22190719999999908,y:.06439139999999943},{x:-.22190719999999908,y:.16159429999999997}],color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.0024445000000006267,y:.23933980000000044},bottom1:{type:"text",text:"{VAL}",x:.00341719999999901,y:-.23933980000000066}},refblocks:{left1:{x:-.4458008,y:.02709619999999968},right1:{x:.4458008,y:.026971799999999657}},bounds:{minX:-.473959241,maxX:.473959241,minY:-.23933980000000066,maxY:.23933980000000044,width:.947918482,height:.4786796000000011,centerX:0,centerY:-11102230246251565e-32},circles:{}},k0r=Ln(zCe).rotateRightFacingSymbol("down").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_left",{x:.02,y:.2}).changeTextAnchor("{VAL}","middle_left",{x:.5,y:-.2}).build(),F0r=Ln(zCe).rotateRightFacingSymbol("left").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom",{x:0,y:.45}).changeTextAnchor("{VAL}","middle_top",{x:0,y:-.55}).build(),L0r=Ln(zCe).rotateRightFacingSymbol("right").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),H0r=Ln(zCe).rotateRightFacingSymbol("up").labelPort("left1",["1","pos"]).labelPort("right1",["2","neg"]).changeTextAnchor("{VAL}","middle_left",{x:.02,y:-.2}).changeTextAnchor("{REF}","middle_left",{x:.5,y:.2}).build(),Dxn={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-5":{type:"path",points:[{x:.19,y:-.09},{x:.15,y:-.09}],color:"primary",fill:!1},"path43-5-2":{type:"path",points:[{x:.19,y:-.14},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:w_r,texts:P_r,bounds:M_r,refblocks:D_r,circles:N_r}=Dxn,Nxn=Ln(Dxn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),O0r=si(Nxn),G0r={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"RPM",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:Y0r,texts:U0r,bounds:JCe,refblocks:Rxn,circles:K0r}=G0r,cot=Gl({primitives:[...Object.values(Y0r),...Object.values(K0r),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...U0r.left1,y:.01,anchor:"center",fontSize:.2}],ports:[{...Rxn.left1,labels:["1"]},{...Rxn.right1,labels:["2"]}],size:{width:JCe.width,height:JCe.height},center:{x:JCe.centerX,y:JCe.centerY}}),{5:V0r,...z0r}=cot.primitives;function J0r(t){return typeof t=="object"}var Txn=si({...cot,primitives:Object.values(z0r).filter(J0r)}),W0r={...Txn,primitives:[...Txn.primitives,V0r]},WCe=Gl({primitives:[{type:"path",points:[{x:-.2,y:0},{x:0,y:0}],color:"primary",fill:!1},{type:"path",points:Array.from({length:32},(t,e)=>{let n=Math.PI/2-e*Math.PI/31,o=.1;return{x:.1-o*Math.cos(n),y:o*Math.sin(n)}}),color:"primary",fill:!1},{type:"text",text:"{REF}",x:.125,y:0,anchor:"middle_left"}],ports:[{x:-.2,y:0,labels:["1"]}],center:{x:0,y:0}}),kxn=si(WCe,"down"),Fxn=kxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");Fxn&&(Fxn.anchor="middle_top");var j0r=kxn,$0r=si(WCe,"left"),Lxn=si(WCe,"up"),Hxn=Lxn.primitives.find(t=>t.type==="text"&&t.text==="{REF}");Hxn&&(Hxn.anchor="middle_bottom");var q0r=Lxn,X0r={paths:{path40:{type:"path",points:[{x:.44,y:.04},{x:.19,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:.19,y:.18},{x:.44,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:.19,y:-.09},{x:.19,y:.18}],color:"primary",fill:!1},path44:{type:"path",points:[{x:.19,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path45:{type:"path",points:[{x:-.43,y:.22},{x:-.11,y:.04}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{right1:{x:-.43,y:.22}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},lot=Ln(X0r).labelPort("right1",["1"]).changeTextAnchor("{REF}","middle_bottom").changeTextAnchor("{VAL}","middle_top").build(),uot=si(lot,"up"),got=uot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),dot=uot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");got.anchor="middle_bottom",dot.anchor="middle_top",got.x=.4,got.y+=.2,dot.y-=.3,dot.x=.4;var Oxn=uot,hot=hK(Oxn),pot=hot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),mot=hot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");pot.anchor="middle_bottom",mot.anchor="middle_top",pot.x=.35,pot.y+=.4,mot.y-=.4,mot.x=.35;var Z0r=hot,_ot=si(lot,"left"),fot=_ot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Iot=_ot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");fot.anchor="middle_bottom",Iot.anchor="middle_top",fot.x=0,fot.y+=.5,Iot.y-=.6,Iot.x=0;var eur=_ot,Gxn={paths:{path11:{type:"path",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.1,y:.04},{x:.54,y:.04}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:"primary",fill:!0},"path11-0-9-0":{type:"path",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:"primary",fill:!0},"path12-2":{type:"path",points:[{x:.09,y:-.06},{x:.27,y:-.17}],color:"primary",fill:!1},"path12-2-9":{type:"path",points:[{x:.27,y:-.18},{x:.27,y:-.31}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:.01,y:.42},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{bottom1:{x:.27,y:-.31},left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.05,radius:.29,color:"primary",fill:!1}}},{paths:R_r,texts:T_r,bounds:k_r,refblocks:F_r,circles:L_r}=Gxn,Yxn=Ln(Gxn).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).labelPort("bottom1",["3"]).changeTextAnchor("{REF}","middle_bottom").build(),Uxn=si(Yxn),Kxn=Uxn.primitives.filter(t=>t.type==="text"),tur=Kxn.find(t=>t.text==="{REF}"),nur=Kxn.find(t=>t.text==="{VAL}");tur.y=0,nur.y=0;var our=Uxn,iur={paths:{path40:{type:"path",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.15,y:.04}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14,y:.18},{x:.08,y:.18}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.14,y:-.09},{x:.08,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:rur,texts:Vxn,bounds:jCe,refblocks:zxn,circles:sur}=iur,Jxn=Gl({primitives:[...Object.values(rur),...Object.values(sur),{...Vxn.top1,anchor:"middle_bottom"},{...Vxn.bottom1,anchor:"middle_top"}],ports:[{...zxn.left1,labels:["1"]},{...zxn.right1,labels:["2"]}],size:{width:jCe.width,height:jCe.height},center:{x:jCe.centerX,y:jCe.centerY}}),Cot=si(Jxn),aur=Cot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),Aur=Cot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");aur.anchor="middle_left",Aur.anchor="middle_right";var cur=Cot,lur={paths:{path11:{type:"path",points:[{x:-.34,y:.22},{x:-.02,y:.01}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.23,y:.13},{x:.23,y:.4}],color:"primary",fill:!1},"path12-2":{type:"path",points:[{x:.23,y:-.08},{x:.23,y:-.35}],color:"primary",fill:!1},"path11-0":{type:"path",points:[{x:-.01,y:-.18},{x:-.01,y:.23}],color:"primary",fill:!1},"path11-0-3":{type:"path",points:[{x:.23,y:.12},{x:-.01,y:.12}],color:"primary",fill:!1},"path11-0-9":{type:"path",points:[{x:-.11,y:.13},{x:-.17,y:.04},{x:-.06,y:.03},{x:-.11,y:.13}],color:"primary",fill:!0},"path11-0-3-8":{type:"path",points:[{x:.23,y:-.08},{x:-.01,y:-.08}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.2,y:.39},bottom1:{type:"text",text:"{VAL}",x:-.03,y:-.42}},refblocks:{top1:{x:.23,y:.4},bottom1:{x:.23,y:-.35},left1:{x:-.34,y:.22}},bounds:{width:.74,height:.85,centerX:0,centerY:0},circles:{path1:{type:"circle",x:.08,y:.01,radius:.29,color:"primary",fill:!1}}},{paths:uur,texts:Wxn,bounds:$Ce,refblocks:yot,circles:gur}=lur,jxn=Gl({primitives:[...Object.values(uur),...Object.values(gur),{...Wxn.top1,anchor:"middle_left"},{...Wxn.bottom1,anchor:"middle_right"}],ports:[{...yot.top1,labels:["1"]},{...yot.bottom1,labels:["2"]},{...yot.left1,labels:["3"]}],size:{width:$Ce.width,height:$Ce.height},center:{x:$Ce.centerX,y:$Ce.centerY}}),$xn=si(jxn),qxn=$xn.primitives.filter(t=>t.type==="text"),dur=qxn.find(t=>t.text==="{REF}");dur.y=.1;var Xxn=qxn.find(t=>t.text==="{VAL}");Xxn.y=.1,Xxn.x=-.4;var hur=$xn,pur={paths:{capsule_outer:{type:"path",points:[{x:-.44,y:.34},{x:-.45,y:.39},{x:-.46,y:.42},{x:-.49,y:.44},{x:-.52,y:.46},{x:-.56,y:.46},{x:-.6,y:.46},{x:-.63,y:.44},{x:-.65,y:.42},{x:-.67,y:.39},{x:-.68,y:.34},{x:-.68,y:-.34},{x:-.67,y:-.39},{x:-.65,y:-.42},{x:-.63,y:-.44},{x:-.6,y:-.45},{x:-.56,y:-.46},{x:-.52,y:-.45},{x:-.49,y:-.44},{x:-.46,y:-.42},{x:-.45,y:-.39},{x:-.44,y:-.34},{x:-.44,y:.34}],color:"primary",fill:!1},capsule_inner:{type:"path",points:[{x:-.51,y:.28},{x:-.52,y:.32},{x:-.53,y:.34},{x:-.56,y:.35},{x:-.57,y:.35},{x:-.58,y:.34},{x:-.6,y:.32},{x:-.61,y:.28},{x:-.61,y:-.28},{x:-.6,y:-.32},{x:-.58,y:-.34},{x:-.57,y:-.35},{x:-.56,y:-.35},{x:-.53,y:-.34},{x:-.52,y:-.32},{x:-.51,y:-.28},{x:-.51,y:.28}],color:"primary",fill:!0},usb_vertical:{type:"path",points:[{x:.1,y:-.4},{x:.1,y:.4}],color:"primary",fill:!1},usb_left_branch:{type:"path",points:[{x:.1,y:-.1},{x:-.03,y:.05},{x:-.03,y:.15}],color:"primary",fill:!1},usb_right_branch:{type:"path",points:[{x:.1,y:0},{x:.25,y:.15},{x:.25,y:.25}],color:"primary",fill:!1},usb_arrow:{type:"path",points:[{x:.05,y:.4},{x:.1,y:.5},{x:.15,y:.4},{x:.05,y:.4}],color:"primary",fill:!0},usb_square:{type:"path",points:[{x:.2,y:.25},{x:.3,y:.25},{x:.3,y:.35},{x:.2,y:.35},{x:.2,y:.25}],color:"primary",fill:!0}},circles:{usb_base:{type:"circle",x:.1,y:-.4,radius:.07,color:"primary",fill:!0},usb_tip_circle:{type:"circle",x:-.03,y:.15,radius:.04,color:"primary",fill:!0}},texts:{top1:{type:"text",text:"{REF}",x:-.25,y:.7}},refblocks:{},bounds:{minX:-.75,maxX:.35,minY:-.6,maxY:.75,width:1.1,height:1.35,centerX:-.2,centerY:.08}},mur=Ln(pur).changeTextAnchor("{REF}","middle_bottom").build(),_ur={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.18,y:-.36},bottom1:{type:"text",text:"{VAL}",x:-.01,y:.43},left1:{type:"text",text:"Var",x:-.19,y:.07}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:fur,texts:xot,bounds:qCe,refblocks:Zxn,circles:Iur}=_ur,e3n=Gl({primitives:[...Object.values(fur),...Object.values(Iur),{...xot.top1,x:0,y:-.3594553499999995,anchor:"middle_top"},{...xot.bottom1,x:0,y:.35,anchor:"middle_bottom"},{...xot.left1,x:-.02,y:.01,fontSize:.2,anchor:"center"}],ports:[{...Zxn.left1,labels:["1"]},{...Zxn.right1,labels:["2"]}],size:{width:qCe.width,height:qCe.height},center:{x:qCe.centerX,y:qCe.centerY}}),Cur=si(e3n),yur={paths:{path40:{type:"path",points:[{x:.08,y:.04},{x:-.18,y:-.09}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.18,y:.18},{x:.08,y:.04}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.18,y:-.09},{x:-.18,y:.18}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.09,y:.17},{x:.1,y:-.09}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.2,y:.04},{x:-.52,y:.04}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.52,y:.04},{x:.21,y:.04}],color:"primary",fill:!1},"path43-6":{type:"path",points:[{x:.19,y:.17},{x:.19,y:-.09}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.01,y:.27},bottom1:{type:"text",text:"{VAL}",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:xur,texts:t3n,bounds:XCe,refblocks:n3n,circles:Eur}=yur,o3n=Gl({primitives:[...Object.values(xur),...Object.values(Eur),{...t3n.top1,anchor:"middle_bottom"},{...t3n.bottom1,anchor:"middle_top"}],ports:[{...n3n.left1,labels:["1"]},{...n3n.right1,labels:["2"]}],size:{width:XCe.width,height:XCe.height},center:{x:XCe.centerX,y:XCe.centerY}}),Eot=si(o3n),Bur=Eot.primitives.find(t=>t.type==="text"&&t.text==="{REF}"),bur=Eot.primitives.find(t=>t.type==="text"&&t.text==="{VAL}");Bur.anchor="middle_left",bur.anchor="middle_right";var Sur=Eot,Qur={paths:{path5:{type:"path",points:[{x:-.54,y:0},{x:-.26,y:0}],color:"primary",fill:!1},path6:{type:"path",points:[{x:.27,y:0},{x:.54,y:.01}],color:"primary",fill:!1},path7:{type:"path",points:[{x:.27,y:-.23},{x:-.26,y:.24}],color:"primary",fill:!1},path8:{type:"path",points:[{x:.38,y:-.23},{x:.27,y:-.23}],color:"primary",fill:!1},path9:{type:"path",points:[{x:0,y:.14},{x:.27,y:.14},{x:.27,y:-.13},{x:-.26,y:-.13},{x:-.26,y:.14},{x:0,y:.14}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.06,y:.25},bottom1:{type:"text",text:"{VAL}",x:.01,y:-.25}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:.01}},bounds:{width:1.13,height:.5,centerX:0,centerY:0}},{paths:vur,texts:i3n,bounds:ZCe,refblocks:r3n}=Qur,s3n=Gl({primitives:[...Object.values(vur),{...i3n.top1,anchor:"middle_left"},{...i3n.bottom1,anchor:"middle_right"}],ports:[{...r3n.left1,labels:["1","-"]},{...r3n.right1,labels:["2","+"]}],size:{width:ZCe.width,height:ZCe.height},center:{x:ZCe.centerX,y:ZCe.centerY}}),wur=si(s3n),Pur={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Var",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:Mur,texts:Dur,bounds:eye,refblocks:a3n,circles:Nur}=Pur,Bot=Gl({primitives:[...Object.values(Mur),...Object.values(Nur),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...Dur.left1,anchor:"center",y:.02,fontSize:.2}],ports:[{...a3n.left1,labels:["1"]},{...a3n.right1,labels:["2"]}],size:{width:eye.width,height:eye.height},center:{x:eye.centerX,y:eye.centerY}}),{5:Rur,...Tur}=Bot.primitives;function kur(t){return typeof t=="object"}var A3n=si({...Bot,primitives:Object.values(Tur).filter(kur)}),Fur={...A3n,primitives:[...A3n.primitives,Rur]},tye={paths:{"path28-2":{type:"path",points:[{x:.19,y:0},{x:0,y:.09}],color:"primary",fill:!1},"path28-2-6":{type:"path",points:[{x:.19,y:0},{x:0,y:-.09}],color:"primary",fill:!1},"path29-3":{type:"path",points:[{x:.19,y:0},{x:-.23,y:0}],color:"primary",fill:!1}},texts:{right1:{type:"text",text:"{REF}",x:.25,y:0}},refblocks:{left1:{x:-.23,y:0}},bounds:{minX:-.25,maxX:.25,minY:-.09,maxY:.09,width:.5,height:.19,centerX:0,centerY:0},circles:{}};function nye(t,e){let{width:n,height:o}=t.size,i=1,r=1;e.width!==void 0&&e.height!==void 0?(i=e.width/n,r=e.height/o):e.width!==void 0?i=r=e.width/n:e.height!==void 0&&(i=r=e.height/o);let s=t.primitives.map(a=>{switch(a.type){case"path":return{...a,points:a.points.map(A=>({x:A.x*i,y:A.y*r}))};case"text":return{...a,x:a.x*i,y:a.y*r,fontSize:a.fontSize?a.fontSize*i:void 0};case"circle":return{...a,x:a.x*i,y:a.y*r,radius:a.radius*i};case"box":return{...a,x:a.x*i,y:a.y*r,width:a.width*i,height:a.height*r};default:return a}});return{...t,primitives:s,center:{x:t.center.x*i,y:t.center.y*r},ports:t.ports.map(a=>({...a,x:a.x*i,y:a.y*r})),size:{width:n*i,height:o*r}}}var Lur=Ln(tye).rotateRightFacingSymbol("down").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_top").build(),Hur=nye(Lur,{width:.24,height:.23}),Our=Ln(tye).rotateRightFacingSymbol("left").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_right").build(),Gur=nye(Our,{width:.23,height:.24}),Yur=Ln(tye).rotateRightFacingSymbol("right").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_left").build(),Uur=nye(Yur,{width:.23,height:.24}),Kur=Ln(tye).rotateRightFacingSymbol("up").labelPort("left1",["1"]).changeTextAnchor("{REF}","middle_bottom").build(),Vur=nye(Kur,{width:.24,height:.23}),bot={paths:{path11:{type:"path",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:"primary",fill:!1},"path11-5-5":{type:"path",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:.03},{x:.54,y:.03}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.02,y:.4},bottom1:{type:"text",text:"{VAL}",x:-.01,y:-.4}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.4,maxY:.4,width:1.14,height:.8,centerX:0,centerY:0},circles:{path1:{type:"circle",x:0,y:.04,radius:.29,color:"primary",fill:!1}}},{paths:H_r,texts:O_r,bounds:G_r,circles:Y_r,refblocks:U_r}=bot,zur=Ln(bot).changeTextAnchor("{VAL}","middle_top").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_bottom").build(),{paths:Jur,texts:K_r,bounds:c3n,circles:Wur,refblocks:l3n}=bot,jur=Ln({primitives:[...Object.values(Jur),...Object.values(Wur),{type:"text",text:"{REF}",x:-.2,y:.35},{type:"text",text:"{VAL}",x:.2,y:.35}],ports:[{...l3n.left1,labels:["left1"]},{...l3n.right1,labels:["right1"]}],center:{x:c3n.centerX,y:c3n.centerY}}).rotateRightFacingSymbol("down").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),$ur=jur,qur={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"Wh",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:Xur,texts:Zur,bounds:oye,refblocks:u3n,circles:egr}=qur,Sot=Gl({primitives:[...Object.values(Xur),...Object.values(egr),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...Zur.left1,anchor:"center",y:.01,fontSize:.2}],ports:[{...u3n.left1,labels:["1"]},{...u3n.right1,labels:["2"]}],size:{width:oye.width,height:oye.height},center:{x:oye.centerX,y:oye.centerY}}),{5:tgr,...ngr}=Sot.primitives;function ogr(t){return typeof t=="object"}var g3n=si({...Sot,primitives:Object.values(ngr).filter(ogr)}),igr={...g3n,primitives:[...g3n.primitives,tgr]},rgr={paths:{path11:{type:"path",points:[{x:-.54,y:0},{x:-.3,y:0}],color:"primary",fill:!1},path12:{type:"path",points:[{x:.29,y:0},{x:.54,y:0}],color:"primary",fill:!1}},texts:{left1:{type:"text",text:"W",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:"circle",x:-.01,y:-.01,radius:.29,color:"primary",fill:!1}}},{paths:sgr,texts:agr,bounds:iye,refblocks:d3n,circles:Agr}=rgr,Qot=Gl({primitives:[...Object.values(sgr),...Object.values(Agr),{type:"text",text:"{REF}",x:0,y:-.3594553499999995,anchor:"middle_top"},{type:"text",text:"{VAL}",x:0,y:.35,anchor:"middle_bottom"},{...agr.left1,anchor:"center",y:.01,fontSize:.3}],ports:[{...d3n.left1,labels:["1"]},{...d3n.right1,labels:["2"]}],size:{width:iye.width,height:iye.height},center:{x:iye.centerX,y:iye.centerY}}),{5:cgr,...lgr}=Qot.primitives;function ugr(t){return typeof t=="object"}var h3n=si({...Qot,primitives:Object.values(lgr).filter(ugr)}),ggr={...h3n,primitives:[...h3n.primitives,cgr]},p3n={paths:{path40:{type:"path",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:"primary",fill:!1},path41:{type:"path",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:"primary",fill:!1},path42:{type:"path",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:"primary",fill:!1},path43:{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:"primary",fill:!1},path44:{type:"path",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:"primary",fill:!1},"path44-0":{type:"path",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:"primary",fill:!1},"path43-8":{type:"path",points:[{x:.14458890000000002,y:.17632800000000026},{x:.21069330000000042,y:.17632800000000026}],color:"primary",fill:!1},"path43-8-8":{type:"path",points:[{x:.14458890000000002,y:-.0882553999999991},{x:.07848449999999962,y:-.0882553999999991}],color:"primary",fill:!1}},texts:{top1:{type:"text",text:"{REF}",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:"text",text:"{VAL}",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.27384529999999985,maxY:.27384530000000007,width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},dgr=Ln(p3n).rotateRightFacingSymbol("right").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),{paths:hgr,bounds:rye,refblocks:m3n,circles:pgr}=p3n,mgr=Ln({primitives:[...Object.values(hgr),...Object.values(pgr),{type:"text",text:"{REF}",x:.15,y:-.2294553499999995},{type:"text",text:"{VAL}",x:-.15,y:-.2294553499999995}],ports:[{...m3n.left1,labels:["1"]},{...m3n.right1,labels:["2"]}],size:{width:rye.width,height:rye.height},center:{x:rye.centerX,y:rye.centerY}}).rotateRightFacingSymbol("up").labelPort("left1",["1"]).labelPort("right1",["2"]).changeTextAnchor("{REF}","middle_left").changeTextAnchor("{VAL}","middle_left").build(),_3n={ac_voltmeter_down:anr,ac_voltmeter_horz:lnr,ac_voltmeter_left:dnr,ac_voltmeter_right:mnr,ac_voltmeter_up:Inr,ac_voltmeter_vert:xnr,avalanche_diode_down:bnr,avalanche_diode_horz:Snr,avalanche_diode_left:wnr,avalanche_diode_right:Pnr,avalanche_diode_up:Nnr,avalanche_diode_vert:knr,backward_diode_down:Hnr,backward_diode_left:dCn,backward_diode_right:Knr,backward_diode_up:Vnr,battery_down:jnr,battery_horz:ICn,battery_left:tor,battery_right:ror,battery_up:cor,battery_vert:lor,boxresistor_down:hor,boxresistor_left:Ior,boxresistor_right:Eor,boxresistor_small_down:Sor,boxresistor_small_left:wor,boxresistor_small_right:Dor,boxresistor_small_up:Tor,boxresistor_up:Hor,bridged_ground_down:Yor,bridged_ground_left:Vor,bridged_ground_right:YCn,bridged_ground_up:Wor,capacitor_down:Xor,capacitor_left:eir,capacitor_polarized_down:tir,capacitor_polarized_left:nir,capacitor_polarized_right:oir,capacitor_polarized_up:iir,capacitor_right:sir,capacitor_up:lir,constant_current_diode_down:dir,constant_current_diode_horz:hir,constant_current_diode_left:_ir,constant_current_diode_right:fir,constant_current_diode_up:yir,constant_current_diode_vert:Bir,crystal_4pin_down:Qir,crystal_4pin_left:vir,crystal_4pin_right:wir,crystal_4pin_up:Dir,crystal_down:Tir,crystal_left:kir,crystal_right:Fir,crystal_up:Oir,current_source_down:Yir,current_source_left:Kir,current_source_right:zir,current_source_up:Wir,darlington_pair_transistor_down:jir,darlington_pair_transistor_horz:$ir,darlington_pair_transistor_left:qir,darlington_pair_transistor_right:Xir,darlington_pair_transistor_up:Zir,darlington_pair_transistor_vert:err,dc_ammeter_down:tyn,dc_ammeter_horz:Ate,dc_ammeter_left:orr,dc_ammeter_right:irr,dc_ammeter_up:rrr,dc_ammeter_vert:tyn,dc_voltmeter_down:Arr,dc_voltmeter_horz:urr,dc_voltmeter_left:hrr,dc_voltmeter_right:_rr,dc_voltmeter_up:Crr,dc_voltmeter_vert:Err,diac_down:Brr,diac_horz:brr,diac_left:Srr,diac_right:Qrr,diac_up:vrr,diac_vert:wrr,digital_ground_down:Drr,digital_ground_left:Trr,digital_ground_right:Lrr,digital_ground_up:Grr,diode_down:Urr,diode_left:Krr,diode_right:MIe,diode_up:Vrr,dpdt_normally_closed_switch_down:Jrr,dpdt_normally_closed_switch_left:Wrr,dpdt_normally_closed_switch_right:DIe,dpdt_normally_closed_switch_up:jrr,dpdt_switch_down:qrr,dpdt_switch_left:Xrr,dpdt_switch_right:NIe,dpdt_switch_up:Zrr,dpst_normally_closed_switch_down:tsr,dpst_normally_closed_switch_left:nsr,dpst_normally_closed_switch_right:RIe,dpst_normally_closed_switch_up:osr,dpst_switch_down:rsr,dpst_switch_left:ssr,dpst_switch_right:TIe,dpst_switch_up:asr,ferrite_bead_down:lsr,ferrite_bead_left:usr,ferrite_bead_right:pyn,ferrite_bead_up:hyn,filled_diode_down:hsr,filled_diode_horz:_sr,filled_diode_left:Csr,filled_diode_right:Esr,filled_diode_up:Ssr,filled_diode_vert:wsr,frequency_meter_horz:get,frequency_meter_vert:Fsr,fuse_horz:byn,fuse_vert:Gsr,ground_down:Ysr,ground_horz:Usr,ground_left:Ksr,ground_right:Vsr,ground_up:zsr,ground_vert:Jsr,gunn_diode_horz:Wsr,gunn_diode_vert:jsr,icled_down:qsr,icled_left:Xsr,icled_right:VIe,icled_up:Zsr,igbt_transistor_horz:Syn,igbt_transistor_vert:tar,illuminated_push_button_normally_open_horz:vyn,illuminated_push_button_normally_open_vert:oar,inductor_down:iar,inductor_left:rar,inductor_right:sar,inductor_up:aar,laser_diode_down:Aar,laser_diode_left:car,laser_diode_right:JIe,laser_diode_up:lar,led_down:har,led_left:par,led_right:Met,led_up:Ryn,light_dependent_resistor_horz:Fyn,light_dependent_resistor_vert:Iar,mosfet_depletion_normally_on_horz:Uyn,mosfet_depletion_normally_on_vert:xar,mushroom_head_normally_open_momentary_horz:Jyn,mushroom_head_normally_open_momentary_vert:Sar,n_channel_d_mosfet_transistor_gate_bottom_drain_left:Mar,n_channel_d_mosfet_transistor_gate_bottom_drain_right:Dar,n_channel_d_mosfet_transistor_gate_left_drain_bottom:Nar,n_channel_d_mosfet_transistor_gate_left_drain_top:Rar,n_channel_d_mosfet_transistor_gate_right_drain_bottom:Tar,n_channel_d_mosfet_transistor_gate_right_drain_top:kar,n_channel_d_mosfet_transistor_gate_top_drain_left:Far,n_channel_d_mosfet_transistor_gate_top_drain_right:Lar,n_channel_d_mosfet_transistor_horz:r8,n_channel_d_mosfet_transistor_vert:YS,n_channel_e_mosfet_transistor_gate_bottom_drain_left:Yar,n_channel_e_mosfet_transistor_gate_bottom_drain_right:Uar,n_channel_e_mosfet_transistor_gate_left_drain_bottom:Kar,n_channel_e_mosfet_transistor_gate_left_drain_top:Var,n_channel_e_mosfet_transistor_gate_right_drain_bottom:zar,n_channel_e_mosfet_transistor_gate_right_drain_top:Jar,n_channel_e_mosfet_transistor_gate_top_drain_left:War,n_channel_e_mosfet_transistor_gate_top_drain_right:jar,n_channel_e_mosfet_transistor_horz:s8,n_channel_e_mosfet_transistor_vert:US,njfet_transistor_horz:r2n,njfet_transistor_vert:Zar,not_connected_down:oAr,not_connected_left:iAr,not_connected_right:ZIe,not_connected_up:rAr,npn_bipolar_transistor_down:AAr,npn_bipolar_transistor_horz:uAr,npn_bipolar_transistor_left:hAr,npn_bipolar_transistor_right:_Ar,npn_bipolar_transistor_up:CAr,npn_bipolar_transistor_vert:EAr,opamp_no_power_down:bAr,opamp_no_power_left:SAr,opamp_no_power_right:sCe,opamp_no_power_up:QAr,opamp_with_power_down:wAr,opamp_with_power_left:PAr,opamp_with_power_right:aCe,opamp_with_power_up:MAr,p_channel_d_mosfet_transistor_gate_bottom_drain_left:TAr,p_channel_d_mosfet_transistor_gate_bottom_drain_right:kAr,p_channel_d_mosfet_transistor_gate_left_drain_bottom:FAr,p_channel_d_mosfet_transistor_gate_left_drain_top:LAr,p_channel_d_mosfet_transistor_gate_right_drain_bottom:HAr,p_channel_d_mosfet_transistor_gate_right_drain_top:OAr,p_channel_d_mosfet_transistor_gate_top_drain_left:GAr,p_channel_d_mosfet_transistor_gate_top_drain_right:YAr,p_channel_d_mosfet_transistor_horz:a8,p_channel_d_mosfet_transistor_vert:KS,p_channel_e_mosfet_transistor_gate_bottom_drain_left:zAr,p_channel_e_mosfet_transistor_gate_bottom_drain_right:JAr,p_channel_e_mosfet_transistor_gate_left_drain_bottom:WAr,p_channel_e_mosfet_transistor_gate_left_drain_top:jAr,p_channel_e_mosfet_transistor_gate_right_drain_bottom:$Ar,p_channel_e_mosfet_transistor_gate_right_drain_top:qAr,p_channel_e_mosfet_transistor_gate_top_drain_left:XAr,p_channel_e_mosfet_transistor_gate_top_drain_right:ZAr,p_channel_e_mosfet_transistor_horz:A8,p_channel_e_mosfet_transistor_vert:VS,photodiode_horz:I2n,photodiode_vert:ncr,pjfet_transistor_horz:E2n,pjfet_transistor_vert:scr,pnp_bipolar_transistor_down:ccr,pnp_bipolar_transistor_horz:lcr,pnp_bipolar_transistor_left:dcr,pnp_bipolar_transistor_right:mcr,pnp_bipolar_transistor_up:Icr,pnp_bipolar_transistor_vert:xcr,potentiometer_horz:v2n,potentiometer_vert:Scr,potentiometer2_down:wcr,potentiometer2_left:Pcr,potentiometer2_right:mCe,potentiometer2_up:Mcr,potentiometer3_down:Rcr,potentiometer3_left:Fcr,potentiometer3_right:Lcr,potentiometer3_up:Gcr,power_factor_meter_horz:D2n,power_factor_meter_vert:Vcr,push_button_normally_closed_momentary_horz:F2n,push_button_normally_closed_momentary_vert:jcr,push_button_normally_open_momentary_down:Xcr,push_button_normally_open_momentary_horz:tlr,push_button_normally_open_momentary_left:nlr,push_button_normally_open_momentary_right:ute,push_button_normally_open_momentary_up:olr,push_button_normally_open_momentary_vert:ilr,rail_down:Alr,rail_left:glr,rail_right:mlr,rail_up:Ilr,rectifier_diode_horz:$2n,rectifier_diode_vert:blr,resistor_down:vlr,resistor_left:Mlr,resistor_right:Rlr,resistor_up:Flr,resonator_down:Olr,resonator_horz:oxn,resonator_left:Ulr,resonator_right:MCe,resonator_up:Klr,resonator_vert:Vlr,schottky_diode_down:Jlr,schottky_diode_left:Wlr,schottky_diode_right:NCe,schottky_diode_up:jlr,silicon_controlled_rectifier_horz:rxn,silicon_controlled_rectifier_vert:qlr,solderjumper2_bridged12_down:Xlr,solderjumper2_bridged12_left:Zlr,solderjumper2_bridged12_right:cnt,solderjumper2_bridged12_up:e0r,solderjumper2_down:t0r,solderjumper2_left:n0r,solderjumper2_right:gnt,solderjumper2_up:o0r,solderjumper3_bridged12_down:i0r,solderjumper3_bridged12_left:r0r,solderjumper3_bridged12_right:pnt,solderjumper3_bridged12_up:s0r,solderjumper3_bridged123_down:a0r,solderjumper3_bridged123_left:A0r,solderjumper3_bridged123_right:fnt,solderjumper3_bridged123_up:c0r,solderjumper3_bridged23_down:l0r,solderjumper3_bridged23_left:u0r,solderjumper3_bridged23_right:ynt,solderjumper3_bridged23_up:g0r,solderjumper3_down:d0r,solderjumper3_left:h0r,solderjumper3_right:Bnt,solderjumper3_up:p0r,spdt_normally_closed_switch_down:_0r,spdt_normally_closed_switch_left:f0r,spdt_normally_closed_switch_right:RCe,spdt_normally_closed_switch_up:I0r,spdt_switch_down:y0r,spdt_switch_left:x0r,spdt_switch_right:TCe,spdt_switch_up:E0r,speaker_down:B0r,speaker_horz:b0r,speaker_left:S0r,speaker_right:Q0r,speaker_up:v0r,speaker_vert:w0r,spst_normally_closed_switch_down:P0r,spst_normally_closed_switch_left:M0r,spst_normally_closed_switch_right:UCe,spst_normally_closed_switch_up:D0r,spst_switch_down:N0r,spst_switch_left:R0r,spst_switch_right:VCe,spst_switch_up:T0r,square_wave_down:k0r,square_wave_left:F0r,square_wave_right:L0r,square_wave_up:H0r,step_recovery_diode_horz:Nxn,step_recovery_diode_vert:O0r,tachometer_horz:cot,tachometer_vert:W0r,testpoint_down:j0r,testpoint_left:$0r,testpoint_right:WCe,testpoint_up:q0r,tilted_ground_down:Z0r,tilted_ground_left:eur,tilted_ground_right:lot,tilted_ground_up:Oxn,triac_horz:Yxn,triac_vert:our,tunnel_diode_horz:Jxn,tunnel_diode_vert:cur,unijunction_transistor_horz:jxn,unijunction_transistor_vert:hur,usbc:mur,var_meter_horz:e3n,var_meter_vert:Cur,varactor_diode_horz:o3n,varactor_diode_vert:Sur,varistor_horz:s3n,varistor_vert:wur,varmeter_horz:Bot,varmeter_vert:Fur,vcc_down:Hur,vcc_left:Gur,vcc_right:Uur,vcc_up:Vur,volt_meter_horz:zur,volt_meter_vert:$ur,watt_hour_meter_horz:Sot,watt_hour_meter_vert:igr,wattmeter_horz:Qot,wattmeter_vert:ggr,zener_diode_horz:dgr,zener_diode_vert:mgr};Object.fromEntries(Object.keys(_3n).map(t=>[t,t]));const _gr={bottom_left:0,middle_bottom:1,bottom_right:2,middle_left:3,center:4,middle_right:5,top_left:6,middle_top:7,top_right:8};function fgr({altiumComponentRecordIndex:t,circuitComponentCenter:e,circuitToAltiumSchematicPoint:n,circuitToAltiumSchematicPrecisePoint:o,symbolName:i}){const r=ygr(i);if(!r)return;const s=Ad(pA(e.x,e.y),pA(-r.center.x,-r.center.y)),a=n(e),A=o(e),c={altiumComponentRecordIndex:t,circuitToAltiumSchematicPoint:n,circuitToAltiumSchematicPrecisePoint:p=>{const m=o(p);return{x:m.x+a.x-A.x,y:m.y+a.y-A.y}},symbolToCircuitMatrix:s},l=[],{pinGeometryByLabel:u,pinGeometryByTerminal:g}=Cgr({schematicSymbol:r,symbolMapping:c});let h,d;for(const p of r.primitives){if(p.type!=="text"){l.push(Ltr({graphicPrimitive:p,symbolMapping:c}));continue}const m=f3n({symbolMapping:c,textPrimitive:p});p.text==="{REF}"?d=m:p.text==="{VAL}"?h=m:l.push(xgr({symbolMapping:c,textPrimitive:p}))}return{commentPlacement:h,designatorPlacement:d,graphicRecordFields:l,pinGeometryByLabel:u,pinGeometryByTerminal:g}}function Igr(t){return`${t.x}:${t.y}`}function Cgr({schematicSymbol:t,symbolMapping:e}){const n=new Map,o=new Map;for(const i of t.ports){const s=t.primitives.flatMap(l=>{if(l.type!=="path"||l.points.length<2)return[];const u=l.points[0],g=l.points.at(-1);if(u?.x===i.x&&u.y===i.y)return l.points[1]?[l.points[1]]:[];if(g?.x===i.x&&g.y===i.y){const h=l.points.at(-2);return h?[h]:[]}return[]}).toSorted((l,u)=>{const g=Math.hypot(l.x-i.x,l.y-i.y),h=Math.hypot(u.x-i.x,u.y-i.y);return g-h})[0];if(!s)continue;const a=lk({symbolMapping:e,symbolPoint:s}),A=lk({symbolMapping:e,symbolPoint:i}),c={length:Math.max(1,Math.round(Math.hypot(A.x-a.x,A.y-a.y))),location:a};o.set(Igr(A),c);for(const l of i.labels)n.has(l)||n.set(l,c)}return{pinGeometryByLabel:n,pinGeometryByTerminal:o}}function ygr(t){return Object.entries(_3n).find(([e])=>e===t)?.[1]}function xgr({symbolMapping:t,textPrimitive:e}){const n=f3n({symbolMapping:t,textPrimitive:e});return["RECORD=4",...ete(t.altiumComponentRecordIndex),`LOCATION.X=${n.position.x}`,`LOCATION.Y=${n.position.y}`,"FONTID=2",`TEXT=${uu(e.text)}`,"ORIENTATION=0",`JUSTIFICATION=${n.justification}`]}function f3n({symbolMapping:t,textPrimitive:e}){return{justification:_gr[e.anchor],position:lk({symbolMapping:t,symbolPoint:{x:e.x,y:e.y}})}}function sye({componentTexts:t,excludedText:e,renderedText:n}){if(n)return t.find(o=>o!==e&&o.type==="schematic_text"&&uu(o.text)===n)}const Egr=.05;function Bgr({excludedTexts:t,renderedText:e,schematicTexts:n,targetPosition:o}){const i=n.filter(r=>!t.has(r)&&r.type==="schematic_text"&&uu(r.text)===e).map(r=>{const s=AA(r.position);return{distanceSquared:s?(s.x-o.x)**2+(s.y-o.y)**2:Number.POSITIVE_INFINITY,schematicText:r}}).sort((r,s)=>r.distanceSquared-s.distanceSquared)[0];return i&&i.distanceSquared<=Egr**2?i.schematicText:void 0}const m1=20,bgr=300,Sgr=400,I3n=100;function Qgr(t,e){const n=Bn(e,t);return{x:Math.round(n.x),y:Math.round(n.y)}}function vgr({element:t,points:e}){if(t.type==="schematic_line"){e.push({x:fr(t.x1),y:fr(t.y1)},{x:fr(t.x2),y:fr(t.y2)});return}if(t.type==="schematic_path"&&Array.isArray(t.points)){for(const o of t.points){const i=AA(o);i&&e.push(i)}return}const n=AA(t.center);if(n){if(t.type==="schematic_rect"){const o=fr(t.width),i=fr(t.height);e.push({x:n.x-o/2,y:n.y-i/2},{x:n.x+o/2,y:n.y+i/2});return}if(t.type==="schematic_circle"||t.type==="schematic_arc"){const o=fr(t.radius),i=t.type==="schematic_arc"?fr(t.altium_secondary_radius):0,r=i>0?i:o;e.push({x:n.x-o,y:n.y-r},{x:n.x+o,y:n.y+r});return}}}function wgr(t,e){const n=[];for(const I of t){const C=AA(I.center);C&&n.push(C),F1e(I)&&(ti(I.schematic_symbol_id)||ti(I.schematic_component_id))&&vgr({element:I,points:n});const y=AA(I.anchor_position);y&&n.push(y);const x=T1e(I),E=x?AA(I.position):void 0;if(E&&n.push(E),x&&I.type==="schematic_rect"){const B=fr(I.width),S=fr(I.height);C&&B>0&&S>0&&n.push({x:C.x-B/2,y:C.y-S/2},{x:C.x+B/2,y:C.y+S/2})}if(x&&I.type==="schematic_path"&&Array.isArray(I.points))for(const B of I.points){const S=AA(B);S&&n.push(S)}if(I.type==="schematic_trace"&&Array.isArray(I.edges))for(const B of I.edges){if(!HE(B))continue;const S=AA(B.from),Q=AA(B.to);S&&n.push(S),Q&&n.push(Q)}if(I.type==="schematic_trace"&&Array.isArray(I.junctions))for(const B of I.junctions){const S=AA(B);S&&n.push(S)}}const o=n.length>0?Math.min(...n.map(I=>I.x)):0,i=n.length>0?Math.min(...n.map(I=>I.y)):0,r=n.length>0?Math.max(...n.map(I=>I.x)):0,s=n.length>0?Math.max(...n.map(I=>I.y)):0,a=Math.round(o*m1)/m1,A=Math.round(i*m1)/m1,c=Math.round(r*m1)/m1,l=Math.round(s*m1)/m1,u=(c-a)*m1,g=(l-A)*m1,h=e?e.width*m1:Math.max(Sgr,u+I3n*2),d=e?e.height*m1:Math.max(bgr,g+I3n*2),p=(h-u)/2,m=(d-g)/2,_=e?.circuitOrigin?Ad(pA(e.circuitOrigin.x*m1,e.circuitOrigin.y*m1),dC(m1,m1)):Ad(pA(p,m),dC(m1,m1),pA(-a,-A)),f=Bn(_,{x:0,y:0});return{circuitToAltiumSchematicLength:I=>{const C=Bn(_,{x:I,y:0});return Math.abs(C.x-f.x)},circuitToAltiumSchematicPoint:I=>Qgr(I,_),circuitToAltiumSchematicPrecisePoint:I=>Bn(_,I),width:h,height:d}}const Pgr=32,Mgr=8,Dgr=16,C3n=16,Ngr=1,Rgr=.1,Tgr=3,kgr=1,y3n=3615007,Fgr=12779519,Lgr={left:2,right:0,up:1,down:3},x3n={x:-1,y:0},Hgr={left:x3n,right:{x:1,y:0},up:{x:0,y:1},down:{x:0,y:-1}};function vot({element:t,id:e,map:n}){e&&n.set(e,[...n.get(e)??[],t])}function Ogr(t){const e={byComponentId:new Map,bySymbolId:new Map};for(const n of t.filter(F1e))vot({element:n,id:ti(n.schematic_component_id),map:e.byComponentId}),vot({element:n,id:ti(n.schematic_symbol_id),map:e.bySymbolId});return e}function Ggr({maps:t,schematicComponent:e}){const n=ti(e.schematic_component_id),o=ti(e.schematic_symbol_id),i=t.byComponentId.get(n)??[],r=i.filter(A=>{const c=ti(A.schematic_symbol_id);return!o||!c||c===o}),a=[...new Set(o?[o]:i.map(A=>ti(A.schematic_symbol_id)).filter(Boolean))].flatMap(A=>t.bySymbolId.get(A)??[]);return[...new Set([...r,...a])]}function Ygr({circuitComponentCenter:t,circuitComponentHeight:e,circuitComponentWidth:n,circuitToAltiumSchematicPoint:o}){const i=o({x:t.x-n/2,y:t.y-e/2}),r=o({x:t.x+n/2,y:t.y+e/2});return{bottom:Math.min(i.y,r.y),left:Math.min(i.x,r.x),right:Math.max(i.x,r.x),top:Math.max(i.y,r.y)}}function Ugr({circuitPinTerminal:t,circuitToAltiumSchematicPoint:e,distanceFromComponentEdge:n,facingDirection:o}){const i=Hgr[o]??x3n,r={x:t.x-i.x*n,y:t.y-i.y*n},s=e(r),a=e(t);return{length:Math.max(1,Math.round(Math.hypot(a.x-s.x,a.y-s.y))),location:s}}function Kgr({element:t,includeAllSchematicElements:e,schematicSheetId:n}){const o=ti(t.schematic_sheet_id);return n?o===n||e&&!o:!o||e}function Vgr({element:t,schematicComponents:e}){if(t.type!=="schematic_rect"||t.is_filled!==!0||!T1e(t))return!1;const n=AA(t.center),o=fr(t.width)/2,i=fr(t.height)/2;return!n||o<=0||i<=0?!1:e.some(r=>{const s=AA(r.center),a=HE(r.size)?r.size:void 0,A=fr(a?.width)/2,c=fr(a?.height)/2;return s!==void 0&&A>0&&c>0&&Math.abs(s.x-n.x)+A<=o&&Math.abs(s.y-n.y)+c<=i})}function d_(t,e){const n=e.nextRecordIndex;return e.lines.push(`|${t.join("|")}`),e.nextRecordIndex++,n}function zgr({fontIdBySourceFontId:t,recordFields:e}){return e.map(n=>{const o=/^FONTID=(\d+)$/iu.exec(n),i=Number(o?.[1]),r=t.get(i);return r===void 0?n:`FONTID=${r}`})}function Jgr({childSheets:t=[],circuitJson:e,includeAllSchematicElements:n,schematicSheetId:o,sheetSettings:i,template:r}){const s=new Map(Dd(e,"source_port").map(ne=>[ti(ne.source_port_id),ne])),a=e.filter(ne=>ne.type?.startsWith("schematic_")===!0&&ne.type!=="schematic_sheet"&&!(ne.type==="schematic_port"&&!ti(ne.schematic_component_id)&&ne.is_connected===!1&&s.get(ti(ne.source_port_id))?.do_not_connect!==!0)&&Kgr({element:ne,includeAllSchematicElements:n,schematicSheetId:o})),{circuitToAltiumSchematicLength:A,circuitToAltiumSchematicPoint:c,circuitToAltiumSchematicPrecisePoint:l,width:u,height:g}=wgr(a,i),h=Dtr({childSheets:t,circuitJson:e}),d=a.some(ne=>ne.type!=="schematic_graphic"&&ne.type!=="schematic_group"&&ne.type!=="schematic_symbol"),p=new Set(h.flatMap(ne=>ne.placementComponent?[ne.placementComponent]:[])),m=h.filter(ne=>!ne.placementComponent),_=Math.max(Math.ceil(Math.sqrt(m.length)),1),f=Math.ceil(m.length/_),I=Math.max(...m.map(ne=>ne.width),0),C=Math.max(...m.map(ne=>ne.height),0),y=d?u+40:60,x=_*I+Math.max(_-1,0)*40,E=f*C+Math.max(f-1,0)*40,B=Math.max(u,m.length>0?y+x+60:0),S=Math.max(g,m.length>0?E+120:0),Q=a.filter(ne=>ne.type==="schematic_text"&&T1e(ne)),w=new Set,M=[];for(const[ne,le]of a.filter(ge=>ge.type==="schematic_net_label").entries()){const ge=uu(le.text);if(!ge)continue;const _e=AA(le.anchor_position)??AA(le.center)??{x:0,y:0},ue=Bgr({excludedTexts:w,renderedText:ge,schematicTexts:Q,targetPosition:_e});ue&&w.add(ue),M.push({circuitLabelPosition:_e,labelText:ge,netLabelIndex:ne,schematicNetLabel:le,textPresentation:ue})}const k=Atr({netLabelTextPresentations:M.flatMap(({schematicNetLabel:ne,textPresentation:le})=>le&&!VIn(ti(ne.symbol_name))?[le]:[]),schematicElements:a,templateFontFields:r?.fontFields}),R={...k,fontIdBySizeCircuitUnits:k.nativeTextFontIdBySizeCircuitUnits},F={lines:["|HEADER=Protel for Windows - Schematic Capture Ascii File Version 5.0"],nextRecordIndex:0};d_(["RECORD=31",...k.sheetRecordFields,`AREACOLOR=${kIn}`,`CUSTOMX=${B}`,`CUSTOMY=${S}`,"USECUSTOMSHEET=T","SNAPGRIDON=T","SNAPGRIDSIZE=10",...r?.sheetRecordFields??[]],F);for(const ne of r?.recordFields??[])d_(zgr({fontIdBySourceFontId:k.templateFontIdBySourceFontId,recordFields:ne}),F);const O=a.filter(ne=>ne.type==="schematic_component"),U=new Set(a.filter(ne=>Vgr({element:ne,schematicComponents:O})));for(const ne of U){const le=WIn({annotation:ne,circuitToAltiumSchematicPoint:c,fontTable:k});le&&d_(le,F)}let Y=0;for(const ne of h){let le=ne,ge;if(ne.placementComponent){const ue=AA(ne.placementComponent.center)??{x:0,y:0},fe=HE(ne.placementComponent.size)?ne.placementComponent.size:{},pe=A(Tu(fe.width,ne.width/20)),ye=A(Tu(fe.height,ne.height/20)),Me=c(ue);ge={x:Me.x-pe/2,y:Me.y+ye/2},le={...ne,height:ye,width:pe}}else{const ue=Y%_,fe=Math.floor(Y/_);ge={x:y+ue*(I+40),y:S-60-fe*(C+40)},Y++}const _e=d_(Ttr({location:ge,plan:le}),F);for(const ue of Rtr({altiumSymbolRecordIndex:_e,location:ge,plan:le}))d_(ue,F);for(const ue of Ntr({location:ge,plan:le}))d_(ue,F)}const W=new Map(Dd(e,"source_component").filter(ne=>typeof ne.source_component_id=="string").map(ne=>[ti(ne.source_component_id),ne])),te=new Map(Dd(e,"schematic_symbol").map(ne=>[ti(ne.schematic_symbol_id),ne])),j=new Map,J=new Map,oe=Ogr(a);for(const ne of a.filter(le=>le.type==="schematic_port")){const le=ti(ne.schematic_component_id);le&&j.set(le,[...j.get(le)??[],ne])}for(const ne of a.filter(le=>le.type==="schematic_text"&&!F1e(le)))vot({element:ne,id:ti(ne.schematic_component_id),map:J});for(const[ne,le]of a.filter(ge=>ge.type==="schematic_component"&&!p.has(ge)).entries()){const ge=AA(le.center)??{x:0,y:0},_e=c(ge),ue=W.get(ti(le.source_component_id)),fe=uu(ue?.name)||`U${ne+1}`,pe=uu(le.symbol_display_value),ye=ti(le.schematic_component_id),Me=J.get(ye)??[],ve=sye({componentTexts:Me,excludedText:void 0,renderedText:fe}),he=sye({componentTexts:Me,excludedText:ve,renderedText:pe}),Qe=Me.filter(kt=>kt!==ve&&kt!==he),Pe=Me.length>0,we=te.get(ti(le.schematic_symbol_id)),Te=uu(we?.name)||uu(le.symbol_name)||fe,Re=d_(["RECORD=1",`LOCATION.X=${_e.x}`,`LOCATION.Y=${_e.y}`,"ORIENTATION=0",`LIBREFERENCE=${Te}`,"SHOWHIDDENPINS=F","CURRENTPARTID=1","ISMIRRORED=F",`UNIQUEID=${uu(le.schematic_component_id)}`],F),Ee=HE(le.size)?le.size:{},ke=Tu(Ee.width,2),Ce=Tu(Ee.height,1.5),Le=Ygr({circuitComponentCenter:ge,circuitComponentHeight:Ce,circuitComponentWidth:ke,circuitToAltiumSchematicPoint:c}),Ye=Ggr({maps:oe,schematicComponent:le}).flatMap(kt=>{const it=Xtr({altiumComponentRecordIndex:Re,circuitToAltiumSchematicLength:A,circuitToAltiumSchematicPoint:c,fontTable:k,graphic:kt});return it?[it]:[]}),tt=Ye.length>0,At=!ve&&(Pe||tt),at=tt?void 0:fgr({altiumComponentRecordIndex:Re,circuitComponentCenter:ge,circuitToAltiumSchematicPoint:c,circuitToAltiumSchematicPrecisePoint:l,symbolName:ti(le.symbol_name)});if(tt)for(const kt of Ye)d_(kt,F);else if(at)for(const kt of at.graphicRecordFields)d_(kt,F);else d_(["RECORD=14",`OWNERINDEX=${Re}`,"OWNERPARTID=1",`LOCATION.X=${Le.left}`,`LOCATION.Y=${Le.bottom}`,`CORNER.X=${Le.right}`,`CORNER.Y=${Le.top}`,"LINEWIDTH=1","COLOR=136",`AREACOLOR=${Fgr}`,"ISSOLID=T"],F);const nt=at?.designatorPlacement,gt=at?.commentPlacement,bt=cZe({circuitToAltiumSchematicPoint:c,fallbackAltiumColor:y3n,fallbackAltiumPosition:nt?.position??{x:Le.left,y:Le.top+12},fallbackFontId:1,fallbackJustification:nt?.justification??0,fontTable:R,schematicText:ve}),Ct=cZe({circuitToAltiumSchematicPoint:c,fallbackAltiumColor:y3n,fallbackAltiumPosition:gt?.position??{x:Le.left,y:Le.bottom-12},fallbackFontId:2,fallbackJustification:gt?.justification??0,fontTable:R,schematicText:he});d_(["RECORD=34",`OWNERINDEX=${Re}`,"OWNERPARTID=-1",`LOCATION.X=${bt.position.x}`,`LOCATION.Y=${bt.position.y}`,`FONTID=${bt.fontId}`,"NAME=Designator",`TEXT=${fe}`,`COLOR=${bt.color}`,"SHOWNAME=F",`ISHIDDEN=${At?"T":"F"}`,`ORIENTATION=${bt.orientation}`,`JUSTIFICATION=${bt.justification}`],F),d_(["RECORD=41",`OWNERINDEX=${Re}`,"OWNERPARTID=-1",`LOCATION.X=${Ct.position.x}`,`LOCATION.Y=${Ct.position.y}`,`FONTID=${Ct.fontId}`,"NAME=Comment",`TEXT=${pe}`,`COLOR=${Ct.color}`,"SHOWNAME=F",`ISHIDDEN=${pe?"F":"T"}`,`ORIENTATION=${Ct.orientation}`,`JUSTIFICATION=${Ct.justification}`],F);const Dt=j.get(ye)??[];for(const[kt,it]of Dt.entries()){const Yt=s.get(ti(it.source_port_id)),pn=AA(it.center)??{x:0,y:0},be=ti(it.facing_direction),et=Ugr({circuitPinTerminal:pn,circuitToAltiumSchematicPoint:c,distanceFromComponentEdge:Math.max(fr(it.distance_from_component_edge),0),facingDirection:be}),It=Lgr[be]??2,Bt=!at&&!tt,mt=uu(it.display_pin_label)||uu(Yt?.name)||`Pin ${kt+1}`,st=uu(Yt?.pin_number)||`${kt+1}`,xt=[ti(it.display_pin_label),ti(Yt?.name),...Array.isArray(Yt?.port_hints)?Yt.port_hints.flatMap(Ao=>typeof Ao=="string"?[Ao]:[]):[],st],Xe=c(pn),Ze=at?.pinGeometryByTerminal.get(`${Xe.x}:${Xe.y}`)??xt.map(Ao=>at?.pinGeometryByLabel.get(Ao)).find(Ao=>Ao!==void 0),dt=Ze?.location??(at?c(pn):et.location),Ut=Ze?.length??(at?10:et.length),Wt=typeof it.display_pin_label=="string"?sye({componentTexts:Qe,excludedText:void 0,renderedText:mt}):void 0,Xt=typeof it.pin_number=="number"?sye({componentTexts:Qe,excludedText:Wt,renderedText:st}):void 0,Jt=tt&&typeof it.display_pin_label=="string",yn=!tt&&(Pe?typeof it.display_pin_label=="string":Bt),An=Wt===void 0&&(Jt||yn),kn=Xt===void 0&&!tt&&(Pe?typeof it.pin_number=="number":Bt),$n=(An?Mgr:0)|(kn?Dgr:0),ht=Pgr|$n|It,rn=qee({cssColor:ti((Wt??Xt)?.color),fallbackAltiumColor:b4}),Lt=R.fontIdBySizeCircuitUnits.get(Tu(it.display_pin_label_font_size,HIn)),Ho=R.fontIdBySizeCircuitUnits.get(OIn);d_(["RECORD=2",`OWNERINDEX=${Re}`,"OWNERPARTID=1",`DESIGNATOR=${st}`,`NAME=${mt}`,`PINCONGLOMERATE=${ht}`,`LOCATION.X=${dt.x}`,`LOCATION.Y=${dt.y}`,`PINLENGTH=${Ut}`,...it.has_input_arrow===!0?[`SYMBOL_INNEREDGE=${Tgr}`]:[],...it.is_drawn_with_inversion_circle===!0?[`SYMBOL_OUTEREDGE=${kgr}`]:[],`COLOR=${rn}`,`PINNAME_POSITIONCONGLOMERATE=${C3n|Ngr}`,...OS("NAME_CUSTOMPOSITION_MARGIN",-A(Rgr)),`NAME_CUSTOMFONTID=${Lt}`,`NAME_CUSTOMCOLOR=${rn}`,`PINDESIGNATOR_POSITIONCONGLOMERATE=${C3n}`,`DESIGNATOR_CUSTOMFONTID=${Ho}`,`DESIGNATOR_CUSTOMCOLOR=${rn}`],F)}for(const kt of Qe){const it=XIn({altiumComponentRecordIndex:Re,circuitToAltiumSchematicPoint:c,fontTable:R,schematicText:kt});it&&d_(it,F)}}for(const ne of a.filter(le=>le.type==="schematic_port"&&!ti(le.schematic_component_id))){const le=s.get(ti(ne.source_port_id));if(le?.do_not_connect===!0&&ne.is_internal_circuit_port!==!0)continue;const _e=uu(ne.display_pin_label)||uu(le?.name),ue=AA(ne.center);!_e||!ue||d_(atr({altiumPortPosition:c(ue),facingDirection:ti(ne.facing_direction),hasInputArrow:ne.has_input_arrow===!0,hasOutputArrow:ne.has_output_arrow===!0,portName:_e}),F)}for(const ne of a.filter(le=>le.type==="schematic_trace"))if(Array.isArray(ne.edges))for(const le of ne.edges){if(!HE(le))continue;const ge=AA(le.from),_e=AA(le.to);if(!ge||!_e)continue;const ue=c(ge),fe=c(_e);d_(["RECORD=27","LINEWIDTH=1","LOCATIONCOUNT=2",`X1=${ue.x}`,`Y1=${ue.y}`,`X2=${fe.x}`,`Y2=${fe.y}`,"COLOR=34816"],F)}const ie=new Set;for(const ne of a.filter(le=>le.type==="schematic_trace"))if(Array.isArray(ne.junctions))for(const le of ne.junctions){const ge=AA(le);if(!ge)continue;const _e=c(ge),ue=`${_e.x}:${_e.y}`;ie.has(ue)||(ie.add(ue),d_(["RECORD=29",`LOCATION.X=${_e.x}`,`LOCATION.Y=${_e.y}`,"COLOR=34816"],F))}for(const{circuitLabelPosition:ne,labelText:le,netLabelIndex:ge,schematicNetLabel:_e,textPresentation:ue}of M){const fe=Ctr({anchorSide:ti(_e.anchor_side),altiumLabelCenter:c(AA(_e.center)??ne),altiumLabelPosition:c(ne),decorationIndex:ge,fontTable:ti(ue?.source_trace_id)?R:k,labelText:le,symbolName:ti(_e.symbol_name),textPresentation:ue});for(const pe of fe)d_(pe,F)}for(const ne of a.filter(le=>le.type==="schematic_port")){if(s.get(ti(ne.source_port_id))?.do_not_connect!==!0)continue;const ge=AA(ne.center);ge&&d_(zIn({altiumNoConnectPosition:c(ge)}),F)}for(const ne of a){if(w.has(ne)||U.has(ne))continue;const le=WIn({annotation:ne,circuitToAltiumSchematicPoint:c,fontTable:ti(ne.source_trace_id)?R:k});le&&d_(le,F)}return`${F.lines.join(`\r
`)}\r
`}const Wgr="39",jgr="30",$gr=new Set(["AREACOLOR","CUSTOMX","CUSTOMY","FONTIDCOUNT","RECORD","SNAPGRIDON","SNAPGRIDSIZE","USECUSTOMSHEET"]),E3n=/^(?:BOLD|FONTNAME|ITALIC|ROTATION|SIZE|STRIKEOUT|UNDERLINE)(\d+)$/u;function qgr({ancestor:t,document:e,record:n}){const o=new Set;let i=e.getParent(n);for(;i&&!o.has(i);){if(i===t)return!0;o.add(i),i=e.getParent(i)}return!1}function Xgr(t){if(!t)return[];const e=new Map;for(const n of t.fields){const o=E3n.exec(n.key.toUpperCase()),i=Number(o?.[1]);!Number.isSafeInteger(i)||i<1||e.set(i,[...e.get(i)??[],`${n.key}=${n.value}`])}return[...e.entries()].sort(([n],[o])=>n-o).map(([n,o])=>({fields:o,sourceFontId:n}))}function Zgr(t){return t?t.fields.flatMap(e=>{const n=e.key.toUpperCase();return $gr.has(n)||E3n.test(n)?[]:[`${e.key}=${e.value}`]}):[]}function edr(t){return new Set(t.flatMap(e=>{const n=e.getDecoded("TEXT")??"";return n.startsWith("=")&&n.length>1?[n.slice(1)]:[]}))}function tdr({content:t}){const e=jXi(t).document;if(!(e instanceof d1e))throw new TypeError(`Expected an Altium SchDot or SchDoc template, got ${e.type}`);const n=e.records,o=n.find(u=>u.recordKind===Wgr);if(!o)throw new TypeError("Altium schematic template has no RECORD=39 template");const i=n.filter(u=>u===o||qgr({ancestor:o,document:e,record:u})),r=edr(i),s=n.filter(u=>i.includes(u)||u.recordKind===jgr&&e.getParent(u)===void 0?!0:u.recordKind==="41"&&e.getParent(u)===void 0&&r.has(u.getDecoded("NAME")??"")),a=new Set(s),A=new Map(s.map((u,g)=>[u,g+1])),c=s.map(u=>{const g=e.getParent(u),h=g?A.get(g):void 0;return u.fields.map(d=>{if(d.key.toUpperCase()!=="OWNERINDEX")return`${d.key}=${d.value}`;if(h===void 0)throw new TypeError("Altium schematic template record has an owner outside its template");return`${d.key}=${h}`})}),l=n.find(u=>u.recordKind==="31");return{embeddedImages:e.embeddedImages.flatMap(u=>a.has(u.record)?[{compressedBytes:u.getCompressedBytes(),name:u.name}]:[]),fontFields:Xgr(l),recordFields:c,sheetRecordFields:Zgr(l)}}function ndr(t,e){return t.find(n=>n.schematicSheetId===e)}function odr({fallbackFilename:t,sourceFilename:e}){let i=e.replaceAll("\\","/").split("/").at(-1)?.replace(/\.SchDoc$/iu,"")?.replace(/[<>:"/\\|?*]/gu,"-").replace(/[. ]+$/gu,"").trim();for(let r=0;r<=31;r++)i=i?.replaceAll(String.fromCharCode(r),"-");return i?`${i}.SchDoc`:t}class idr extends w1e{_step(){const n=Dd(this.input,"schematic_sheet").sort((s,a)=>fr(s.sheet_index)-fr(a.sheet_index)).map((s,a)=>{const A=`${this.context.safeProjectName}-${String(a+1).padStart(2,"0")}.SchDoc`;return{filename:odr({fallbackFilename:A,sourceFilename:ti(s.source_filename)}),name:ti(s.display_name)||ti(s.name)||`Sheet ${a+1}`,schematicSheetId:ti(s.schematic_sheet_id),subcircuitId:ti(s.subcircuit_id)||void 0}}),o=new Set,i=n.filter(s=>{const a=s.filename.toLocaleLowerCase("en-US");return o.has(a)?!1:(o.add(a),!0)}),r=n.length===0?[{childSheets:[],filename:`${this.context.safeProjectName}.SchDoc`,includeAllSchematicElements:!0,schematicSheetId:void 0}]:[{childSheets:n,filename:`${this.context.safeProjectName}.SchDoc`,includeAllSchematicElements:!1,schematicSheetId:void 0},...i.map(s=>({childSheets:[],filename:s.filename,includeAllSchematicElements:!1,schematicSheetId:s.schematicSheetId}))];this.context.schematics=r.map(s=>{const a=ndr(this.context.schematicSheets,s.schematicSheetId),A=a?.templateContent?tdr({content:a.templateContent}):void 0,c=Jgr({childSheets:s.childSheets,circuitJson:this.input,schematicSheetId:s.schematicSheetId,includeAllSchematicElements:s.includeAllSchematicElements,sheetSettings:a,template:A});return{asciiContent:c,content:UZi(c,{embeddedImages:A?.embeddedImages}),filename:s.filename}}),this.finished=!0}getOutput(){if(!this.context.schematics)throw new Error("Schematic document stage has not finished");return this.context.schematics}}class rdr extends w1e{_step(){const{pcb:e,project:n,schematics:o}=this.context;if(!e||!n||!o)throw new Error("Every document stage must finish before validation");E1e(e.asciiContent,{mode:"strict"}),U1n(e.content);for(const i of o)jXe(i.content);y1n(n.content),this.context.validated=!0,this.finished=!0}getOutput(){if(!this.context.validated)throw new Error("Altium document validation has not finished");return!0}}function sdr(t){return t.map(e=>{const n={};for(const[o,i]of Object.entries(e))n[o]=i;return n})}class B3n{constructor(e,n={}){this.currentStageIndex=0,this.finished=!1;const o=n.projectName??"board",i=sdr(e);this.context={circuitJson:i,projectName:o,safeProjectName:JZi(o),schematicSheets:n.schematicSheets??[],validated:!1},this.pipeline=[new etr(i,this.context),new idr(i,this.context),new ttr(i,this.context),new rdr(i,this.context)]}get currentStage(){return this.pipeline[this.currentStageIndex]}step(){const e=this.currentStage;if(!e){this.finished=!0;return}e.step(),e.finished&&(this.currentStageIndex++,this.finished=this.currentStageIndex>=this.pipeline.length)}runUntilFinished(){for(;!this.finished;)this.step()}getOutput(){const{pcb:e,project:n,schematics:o,validated:i}=this.context;if(!this.finished||!i||!e||!n||!o)throw new Error("Converter must finish before its output is read");return{pcb:e,project:n,schematics:o}}async getOutputZip(){const{pcb:e,project:n,schematics:o}=this.getOutput(),i=new xfe;i.file(n.filename,n.content),i.file(e.filename,e.content);for(const r of o)i.file(r.filename,r.content);return i.file("README.txt",[`${this.context.projectName} — Altium Designer project`,"","Generated in Altium's native binary document format from the board's routed Circuit JSON.",`Open ${n.filename} in Altium Designer.`].join(`\r
`)),i.generateAsync({type:"uint8array"})}}async function adr(t,e){const n=new B3n(t,{projectName:e});return n.runUntilFinished(),n.getOutputZip()}const Adr=Object.freeze(Object.defineProperty({__proto__:null,CircuitJsonToAltiumConverter:B3n,convertCircuitJsonToAltiumZip:adr},Symbol.toStringTag,{value:"Module"}))}));
\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.`,type:us.EOI_ANCHOR_FOUND,tokenTypes:[We]}))}function Ps(re){const X=mu(re,He=\u003eHe.PATTERN.test(\"\"));return Gi(X,He=\u003e({message:\"Token Type: -\u003e\"+He.name+\"\u003c- static 'PATTERN' must not match an empty string\",type:us.EMPTY_MATCH_PATTERN,tokenTypes:[He]}))}const wh=/[^\\\\[][\\^]|^\\^/;function qg(re){class X extends Nf{constructor(){super(...arguments),this.found=!1}visitStartAnchor(ft){this.found=!0}}const me=mu(re,We=\u003e{const ft=We.PATTERN;try{const wt=fa(ft),zt=new X;return zt.visit(wt),zt.found}catch{return wh.test(ft.source)}});return Gi(me,We=\u003e({message:`Unexpected RegExp Anchor Error:\n\tToken Type: -\u003e`+We.name+`\u003c- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.`,type:us.SOI_ANCHOR_FOUND,tokenTypes:[We]}))}function gl(re){const X=mu(re,He=\u003e{const We=He[jI];return We instanceof RegExp\u0026\u0026(We.multiline||We.global)});return Gi(X,He=\u003e({message:\"Token Type: -\u003e\"+He.name+\"\u003c- static 'PATTERN' may NOT contain global('g') or multiline('m')\",type:us.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[He]}))}function y3(re){const X=[];let me=Gi(re,ft=\u003e_u(re,(wt,zt)=\u003e(ft.PATTERN.source===zt.PATTERN.source\u0026\u0026!A0(X,zt)\u0026\u0026zt.PATTERN!==yu.NA\u0026\u0026(X.push(zt),wt.push(zt)),wt),[]));me=zg(me);const He=mu(me,ft=\u003eft.length\u003e1);return Gi(He,ft=\u003e{const wt=Gi(ft,en=\u003een.name);return{message:`The same RegExp pattern -\u003e${Jc(ft).PATTERN}\u003c-has been used in all of the following Token Types: ${wt.join(\", \")} \u003c-`,type:us.DUPLICATE_PATTERNS_FOUND,tokenTypes:ft}})}function Tf(re){const X=mu(re,He=\u003e{if(!ai(He,\"GROUP\"))return!1;const We=He.GROUP;return We!==yu.SKIPPED\u0026\u0026We!==yu.NA\u0026\u0026!Al(We)});return Gi(X,He=\u003e({message:\"Token Type: -\u003e\"+He.name+\"\u003c- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String\",type:us.INVALID_GROUP_TYPE_FOUND,tokenTypes:[He]}))}function Pa(re,X){const me=mu(re,We=\u003eWe.PUSH_MODE!==void 0\u0026\u0026!A0(X,We.PUSH_MODE));return Gi(me,We=\u003e({message:`Token Type: -\u003e${We.name}\u003c- static 'PUSH_MODE' value cannot refer to a Lexer Mode -\u003e${We.PUSH_MODE}\u003c-which does not exist`,type:us.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[We]}))}function qc(re){const X=[],me=_u(re,(He,We,ft)=\u003e{const wt=We.PATTERN;return wt===yu.NA||(Al(wt)?He.push({str:wt,idx:ft,tokenType:We}):yc(wt)\u0026\u0026xc(wt)\u0026\u0026He.push({str:wt.source,idx:ft,tokenType:We})),He},[]);return zr(re,(He,We)=\u003e{zr(me,({str:ft,idx:wt,tokenType:zt})=\u003e{if(We\u003cwt\u0026\u0026Yu(ft,He.PATTERN)){const en=`Token: -\u003e${zt.name}\u003c- can never be matched.\nBecause it appears AFTER the Token Type -\u003e${He.name}\u003c-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;X.push({message:en,type:us.UNREACHABLE_PATTERN,tokenTypes:[He,zt]})}})}),X}function Yu(re,X){if(yc(X)){const me=X.exec(re);return me!==null\u0026\u0026me.index===0}else{if(ye(X))return X(re,0,[],{});if(ai(X,\"exec\"))return X.exec(re,0,[],{});if(typeof X==\"string\")return X===re;throw Error(\"non exhaustive match\")}}function xc(re){return cp([\".\",\"\\\\\",\"[\",\"]\",\"|\",\"^\",\"$\",\"(\",\")\",\"?\",\"*\",\"+\",\"{\"],me=\u003ere.source.indexOf(me)!==-1)===void 0}function xg(re){const X=re.ignoreCase?\"i\":\"\";return new RegExp(`^(?:${re.source})`,X)}function $I(re){const X=re.ignoreCase?\"iy\":\"y\";return new RegExp(`${re.source}`,X)}function T1(re,X,me){const He=[];return ai(re,vh)||He.push({message:\"A MultiMode Lexer cannot be initialized without a \u003c\"+vh+`\u003e property in its definition\n`,type:us.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),ai(re,R1)||He.push({message:\"A MultiMode Lexer cannot be initialized without a \u003c\"+R1+`\u003e property in its definition\n`,type:us.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),ai(re,R1)\u0026\u0026ai(re,vh)\u0026\u0026!ai(re.modes,re.defaultMode)\u0026\u0026He.push({message:`A MultiMode Lexer cannot be initialized with a ${vh}: \u003c${re.defaultMode}\u003ewhich does not exist\n`,type:us.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),ai(re,R1)\u0026\u0026zr(re.modes,(We,ft)=\u003e{zr(We,(wt,zt)=\u003e{if(cs(wt))He.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:\u003c${ft}\u003e at index: \u003c${zt}\u003e\n`,type:us.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(ai(wt,\"LONGER_ALT\")){const en=B(wt.LONGER_ALT)?wt.LONGER_ALT:[wt.LONGER_ALT];zr(en,In=\u003e{!cs(In)\u0026\u0026!A0(We,In)\u0026\u0026He.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt \u003c${In.name}\u003e on token \u003c${wt.name}\u003e outside of mode \u003c${ft}\u003e\n`,type:us.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),He}function Xg(re,X,me){const He=[];let We=!1;const ft=zg(hu(Wc(re.modes))),wt=Ig(ft,en=\u003een[jI]===yu.NA),zt=gA(me);return X\u0026\u0026zr(wt,en=\u003e{const In=qI(en,zt);if(In!==!1){const wo={message:ls(en,In),type:In.issue,tokenType:en};He.push(wo)}else ai(en,\"LINE_BREAKS\")?en.LINE_BREAKS===!0\u0026\u0026(We=!0):u5(zt,en.PATTERN)\u0026\u0026(We=!0)}),X\u0026\u0026!We\u0026\u0026He.push({message:`Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.`,type:us.NO_LINE_BREAKS_FLAGS}),He}function U2(re){const X={},me=O0(re);return zr(me,He=\u003e{const We=re[He];if(B(We))X[He]=[];else throw Error(\"non exhaustive match\")}),X}function K2(re){const X=re.PATTERN;if(yc(X))return!1;if(ye(X))return!0;if(ai(X,\"exec\"))return!0;if(Al(X))return!1;throw Error(\"non exhaustive match\")}function ty(re){return Al(re)\u0026\u0026re.length===1?re.charCodeAt(0):!1}const kf={test:function(re){const X=re.length;for(let me=this.lastIndex;me\u003cX;me++){const He=re.charCodeAt(me);if(He===10)return this.lastIndex=me+1,!0;if(He===13)return re.charCodeAt(me+1)===10?this.lastIndex=me+2:this.lastIndex=me+1,!0}return!1},lastIndex:0};function qI(re,X){if(ai(re,\"LINE_BREAKS\"))return!1;if(yc(re.PATTERN)){try{u5(X,re.PATTERN)}catch(me){return{issue:us.IDENTIFY_TERMINATOR,errMsg:me.message}}return!1}else{if(Al(re.PATTERN))return!1;if(K2(re))return{issue:us.CUSTOM_LINE_BREAK};throw Error(\"non exhaustive match\")}}function ls(re,X){if(X.issue===us.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the \u003c${re.name}\u003e Token Type\n\t Root cause: ${X.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(X.issue===us.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the \u003cline_breaks\u003e option.\n\tThe problem is in the \u003c${re.name}\u003e Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(\"non exhaustive match\")}function gA(re){return Gi(re,me=\u003eAl(me)?me.charCodeAt(0):me)}function Us(re,X,me){re[X]===void 0?re[X]=[me]:re[X].push(me)}const Zr=256;let os=[];function l0(re){return re\u003cZr?re:os[re]}function k1(){if(RA(os)){os=new Array(65536);for(let re=0;re\u003c65536;re++)os[re]=re\u003e255?255+~~(re/255):re}}function Ph(re,X){const me=re.tokenTypeIdx;return me===X.tokenTypeIdx?!0:X.isParent===!0\u0026\u0026X.categoryMatchesMap[me]===!0}function XI(re,X){return re.tokenTypeIdx===X.tokenTypeIdx}let dl=1;const hl={};function Sl(re){const X=Uu(re);zp(X),Jp(X),pl(X),zr(X,me=\u003e{me.isParent=me.categoryMatches.length\u003e0})}function Uu(re){let X=x0(re),me=re,He=!0;for(;He;){me=zg(hu(Gi(me,ft=\u003eft.CATEGORIES)));const We=L2(me,X);X=X.concat(We),RA(We)?He=!1:me=We}return X}function zp(re){zr(re,X=\u003e{Vl(X)||(hl[dl]=X,X.tokenTypeIdx=dl++),Mh(X)\u0026\u0026!B(X.CATEGORIES)\u0026\u0026(X.CATEGORIES=[X.CATEGORIES]),Mh(X)||(X.CATEGORIES=[]),ny(X)||(X.categoryMatches=[]),x3(X)||(X.categoryMatchesMap={})})}function pl(re){zr(re,X=\u003e{X.categoryMatches=[],zr(X.categoryMatchesMap,(me,He)=\u003e{X.categoryMatches.push(hl[He].tokenTypeIdx)})})}function Jp(re){zr(re,X=\u003e{P_([],X)})}function P_(re,X){zr(re,me=\u003e{X.categoryMatchesMap[me.tokenTypeIdx]=!0}),zr(X.CATEGORIES,me=\u003e{const He=re.concat(X);A0(He,me)||P_(He,me)})}function Vl(re){return ai(re,\"tokenTypeIdx\")}function Mh(re){return ai(re,\"CATEGORIES\")}function ny(re){return ai(re,\"categoryMatches\")}function x3(re){return ai(re,\"categoryMatchesMap\")}function F1(re){return ai(re,\"tokenTypeIdx\")}const Wp={buildUnableToPopLexerModeMessage(re){return`Unable to pop Lexer Mode after encountering Token -\u003e${re.image}\u003c- The Mode Stack is empty`},buildUnexpectedCharactersMessage(re,X,me,He,We){return`unexpected character: -\u003e${re.charAt(X)}\u003c- at offset: ${X}, skipped ${me} characters.`}};var us;(function(re){re[re.MISSING_PATTERN=0]=\"MISSING_PATTERN\",re[re.INVALID_PATTERN=1]=\"INVALID_PATTERN\",re[re.EOI_ANCHOR_FOUND=2]=\"EOI_ANCHOR_FOUND\",re[re.UNSUPPORTED_FLAGS_FOUND=3]=\"UNSUPPORTED_FLAGS_FOUND\",re[re.DUPLICATE_PATTERNS_FOUND=4]=\"DUPLICATE_PATTERNS_FOUND\",re[re.INVALID_GROUP_TYPE_FOUND=5]=\"INVALID_GROUP_TYPE_FOUND\",re[re.PUSH_MODE_DOES_NOT_EXIST=6]=\"PUSH_MODE_DOES_NOT_EXIST\",re[re.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=\"MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE\",re[re.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=\"MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY\",re[re.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=\"MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST\",re[re.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=\"LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED\",re[re.SOI_ANCHOR_FOUND=11]=\"SOI_ANCHOR_FOUND\",re[re.EMPTY_MATCH_PATTERN=12]=\"EMPTY_MATCH_PATTERN\",re[re.NO_LINE_BREAKS_FLAGS=13]=\"NO_LINE_BREAKS_FLAGS\",re[re.UNREACHABLE_PATTERN=14]=\"UNREACHABLE_PATTERN\",re[re.IDENTIFY_TERMINATOR=15]=\"IDENTIFY_TERMINATOR\",re[re.CUSTOM_LINE_BREAK=16]=\"CUSTOM_LINE_BREAK\",re[re.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=\"MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE\"})(us||(us={}));const Jd={deferDefinitionErrorsHandling:!1,positionTracking:\"full\",lineTerminatorsPattern:/\\n|\\r\\n?/g,lineTerminatorCharacters:[`\n`,\"\\r\"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Wp,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Jd);class yu{constructor(X,me=Jd){if(this.lexerDefinition=X,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(We,ft)=\u003e{if(this.traceInitPerf===!0){this.traceInitIndent++;const wt=new Array(this.traceInitIndent+1).join(\"\t\");this.traceInitIndent\u003cthis.traceInitMaxIdent\u0026\u0026console.log(`${wt}--\u003e \u003c${We}\u003e`);const{time:zt,value:en}=cl(ft),In=zt\u003e10?console.warn:console.log;return this.traceInitIndent\u003cthis.traceInitMaxIdent\u0026\u0026In(`${wt}\u003c-- \u003c${We}\u003e time: ${zt}ms`),this.traceInitIndent--,en}else return ft()},typeof me==\"boolean\")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported`);this.config=tr({},Jd,me);const He=this.config.traceInitPerf;He===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof He==\"number\"\u0026\u0026(this.traceInitMaxIdent=He,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(\"Lexer Constructor\",()=\u003e{let We,ft=!0;this.TRACE_INIT(\"Lexer Config handling\",()=\u003e{if(this.config.lineTerminatorsPattern===Jd.lineTerminatorsPattern)this.config.lineTerminatorsPattern=kf;else if(this.config.lineTerminatorCharacters===Jd.lineTerminatorCharacters)throw Error(`Error: Missing \u003clineTerminatorCharacters\u003e property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(me.safeMode\u0026\u0026me.ensureOptimizations)throw Error('\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),B(X)?We={modes:{defaultMode:x0(X)},defaultMode:vh}:(ft=!1,We=x0(X))}),this.config.skipValidations===!1\u0026\u0026(this.TRACE_INIT(\"performRuntimeChecks\",()=\u003e{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(T1(We,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(\"performWarningRuntimeChecks\",()=\u003e{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Xg(We,this.trackStartLines,this.config.lineTerminatorCharacters))})),We.modes=We.modes?We.modes:{},zr(We.modes,(zt,en)=\u003e{We.modes[en]=Ig(zt,In=\u003ecs(In))});const wt=O0(We.modes);if(zr(We.modes,(zt,en)=\u003e{this.TRACE_INIT(`Mode: \u003c${en}\u003e processing`,()=\u003e{if(this.modes.push(en),this.config.skipValidations===!1\u0026\u0026this.TRACE_INIT(\"validatePatterns\",()=\u003e{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Vp(zt,wt))}),RA(this.lexerDefinitionErrors)){Sl(zt);let In;this.TRACE_INIT(\"analyzeTokenTypes\",()=\u003e{In=N4(zt,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:me.positionTracking,ensureOptimizations:me.ensureOptimizations,safeMode:me.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[en]=In.patternIdxToConfig,this.charCodeToPatternIdxToConfig[en]=In.charCodeToPatternIdxToConfig,this.emptyGroups=tr({},this.emptyGroups,In.emptyGroups),this.hasCustom=In.hasCustom||this.hasCustom,this.canModeBeOptimized[en]=In.canBeOptimized}})}),this.defaultMode=We.defaultMode,!RA(this.lexerDefinitionErrors)\u0026\u0026!this.config.deferDefinitionErrorsHandling){const en=Gi(this.lexerDefinitionErrors,In=\u003eIn.message).join(`-----------------------\n`);throw new Error(`Errors detected in definition of Lexer:\n`+en)}zr(this.lexerDefinitionWarning,zt=\u003e{jc(zt.message)}),this.TRACE_INIT(\"Choosing sub-methods implementations\",()=\u003e{if(Cu?(this.chopInput=ge,this.match=this.matchWithTest):(this.updateLastIndex=Yt,this.match=this.matchWithExec),ft\u0026\u0026(this.handleModes=Yt),this.trackStartLines===!1\u0026\u0026(this.computeNewColumn=ge),this.trackEndLines===!1\u0026\u0026(this.updateTokenEndLineColumnLocation=Yt),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid \u003cpositionTracking\u003e config option: \"${this.config.positionTracking}\"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(\"Failed Optimization Warnings\",()=\u003e{const zt=_u(this.canModeBeOptimized,(en,In,po)=\u003e(In===!1\u0026\u0026en.push(po),en),[]);if(me.ensureOptimizations\u0026\u0026!RA(zt))throw Error(`Lexer Modes: \u003c ${zt.join(\", \")} \u003e cannot be optimized.\n\t Disable the \"ensureOptimizations\" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(\"clearRegExpParserCache\",()=\u003e{zs()}),this.TRACE_INIT(\"toFastProperties\",()=\u003e{Ou(this)})})}tokenize(X,me=this.defaultMode){if(!RA(this.lexerDefinitionErrors)){const We=Gi(this.lexerDefinitionErrors,ft=\u003eft.message).join(`-----------------------\n`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:\n`+We)}return this.tokenizeInternal(X,me)}tokenizeInternal(X,me){let He,We,ft,wt,zt,en,In,po,wo,ci,Hi,pr,Wr,Ca,rr;const Wi=X,Mi=Wi.length;let Gr=0,Bc=0;const qp=this.hasCustom?0:Math.floor(X.length/10),T_=new Array(qp),ly=[];let K1=this.trackStartLines?1:void 0,uy=this.trackStartLines?1:void 0;const Lm=U2(this.emptyGroups),gy=this.trackStartLines,rC=this.config.lineTerminatorsPattern;let dy=0,vr=[],sC=[];const D=[],H=[];Object.freeze(H);let z;function se(){return vr}function xe(Pn){const Zn=l0(Pn),Qo=sC[Zn];return Qo===void 0?H:Qo}const Fe=Pn=\u003e{if(D.length===1\u0026\u0026Pn.tokenType.PUSH_MODE===void 0){const Zn=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Pn);ly.push({offset:Pn.startOffset,line:Pn.startLine,column:Pn.startColumn,length:Pn.image.length,message:Zn})}else{D.pop();const Zn=GI(D);vr=this.patternIdxToConfig[Zn],sC=this.charCodeToPatternIdxToConfig[Zn],dy=vr.length;const Qo=this.canModeBeOptimized[Zn]\u0026\u0026this.config.safeMode===!1;sC\u0026\u0026Qo?z=xe:z=se}};function pt(Pn){D.push(Pn),sC=this.charCodeToPatternIdxToConfig[Pn],vr=this.patternIdxToConfig[Pn],dy=vr.length,dy=vr.length;const Zn=this.canModeBeOptimized[Pn]\u0026\u0026this.config.safeMode===!1;sC\u0026\u0026Zn?z=xe:z=se}pt.call(this,me);let St;const on=this.config.recoveryEnabled;for(;Gr\u003cMi;){en=null;const Pn=Wi.charCodeAt(Gr),Zn=z(Pn),Qo=Zn.length;for(He=0;He\u003cQo;He++){St=Zn[He];const Gn=St.pattern;In=null;const jn=St.short;if(jn!==!1?Pn===jn\u0026\u0026(en=Gn):St.isCustom===!0?(rr=Gn.exec(Wi,Gr,T_,Lm),rr!==null?(en=rr[0],rr.payload!==void 0\u0026\u0026(In=rr.payload)):en=null):(this.updateLastIndex(Gn,Gr),en=this.match(Gn,X,Gr)),en!==null){if(zt=St.longerAlt,zt!==void 0){const wr=zt.length;for(ft=0;ft\u003cwr;ft++){const br=vr[zt[ft]],tA=br.pattern;if(po=null,br.isCustom===!0?(rr=tA.exec(Wi,Gr,T_,Lm),rr!==null?(wt=rr[0],rr.payload!==void 0\u0026\u0026(po=rr.payload)):wt=null):(this.updateLastIndex(tA,Gr),wt=this.match(tA,X,Gr)),wt\u0026\u0026wt.length\u003een.length){en=wt,In=po,St=br;break}}}break}}if(en!==null){if(wo=en.length,ci=St.group,ci!==void 0\u0026\u0026(Hi=St.tokenTypeIdx,pr=this.createTokenInstance(en,Gr,Hi,St.tokenType,K1,uy,wo),this.handlePayload(pr,In),ci===!1?Bc=this.addToken(T_,Bc,pr):Lm[ci].push(pr)),X=this.chopInput(X,wo),Gr=Gr+wo,uy=this.computeNewColumn(uy,wo),gy===!0\u0026\u0026St.canLineTerminator===!0){let Gn=0,jn,wr;rC.lastIndex=0;do jn=rC.test(en),jn===!0\u0026\u0026(wr=rC.lastIndex-1,Gn++);while(jn===!0);Gn!==0\u0026\u0026(K1=K1+Gn,uy=wo-wr,this.updateTokenEndLineColumnLocation(pr,ci,wr,Gn,K1,uy,wo))}this.handleModes(St,Fe,pt,pr)}else{const Gn=Gr,jn=K1,wr=uy;let br=on===!1;for(;br===!1\u0026\u0026Gr\u003cMi;)for(X=this.chopInput(X,1),Gr++,We=0;We\u003cdy;We++){const tA=vr[We],Mn=tA.pattern,Cn=tA.short;if(Cn!==!1?Wi.charCodeAt(Gr)===Cn\u0026\u0026(br=!0):tA.isCustom===!0?br=Mn.exec(Wi,Gr,T_,Lm)!==null:(this.updateLastIndex(Mn,Gr),br=Mn.exec(X)!==null),br===!0)break}if(Wr=Gr-Gn,uy=this.computeNewColumn(uy,Wr),Ca=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(Wi,Gn,Wr,jn,wr),ly.push({offset:Gn,line:jn,column:wr,length:Wr,message:Ca}),on===!1)break}}return this.hasCustom||(T_.length=Bc),{tokens:T_,groups:Lm,errors:ly}}handleModes(X,me,He,We){if(X.pop===!0){const ft=X.push;me(We),ft!==void 0\u0026\u0026He.call(this,ft)}else X.push!==void 0\u0026\u0026He.call(this,X.push)}chopInput(X,me){return X.substring(me)}updateLastIndex(X,me){X.lastIndex=me}updateTokenEndLineColumnLocation(X,me,He,We,ft,wt,zt){let en,In;me!==void 0\u0026\u0026(en=He===zt-1,In=en?-1:0,We===1\u0026\u0026en===!0||(X.endLine=ft+In,X.endColumn=wt-1+-In))}computeNewColumn(X,me){return X+me}createOffsetOnlyToken(X,me,He,We){return{image:X,startOffset:me,tokenTypeIdx:He,tokenType:We}}createStartOnlyToken(X,me,He,We,ft,wt){return{image:X,startOffset:me,startLine:ft,startColumn:wt,tokenTypeIdx:He,tokenType:We}}createFullToken(X,me,He,We,ft,wt,zt){return{image:X,startOffset:me,endOffset:me+zt-1,startLine:ft,endLine:ft,startColumn:wt,endColumn:wt+zt-1,tokenTypeIdx:He,tokenType:We}}addTokenUsingPush(X,me,He){return X.push(He),me}addTokenUsingMemberAccess(X,me,He){return X[me]=He,me++,me}handlePayloadNoCustom(X,me){}handlePayloadWithCustom(X,me){me!==null\u0026\u0026(X.payload=me)}matchWithTest(X,me,He){return X.test(me)===!0?me.substring(He,X.lastIndex):null}matchWithExec(X,me){const He=X.exec(me);return He!==null?He[0]:null}}yu.SKIPPED=\"This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.\",yu.NA=/NOT_APPLICABLE/;function Dh(re){return V2(re)?re.LABEL:re.name}function V2(re){return Al(re.LABEL)\u0026\u0026re.LABEL!==\"\"}const g5=\"parent\",oy=\"categories\",up=\"label\",Ku=\"group\",G=\"push_mode\",V=\"pop_mode\",Ae=\"longer_alt\",Be=\"line_breaks\",Oe=\"start_chars_hint\";function Je(re){return Tt(re)}function Tt(re){const X=re.pattern,me={};if(me.name=re.name,cs(X)||(me.PATTERN=X),ai(re,g5))throw`The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return ai(re,oy)\u0026\u0026(me.CATEGORIES=re[oy]),Sl([me]),ai(re,up)\u0026\u0026(me.LABEL=re[up]),ai(re,Ku)\u0026\u0026(me.GROUP=re[Ku]),ai(re,V)\u0026\u0026(me.POP_MODE=re[V]),ai(re,G)\u0026\u0026(me.PUSH_MODE=re[G]),ai(re,Ae)\u0026\u0026(me.LONGER_ALT=re[Ae]),ai(re,Be)\u0026\u0026(me.LINE_BREAKS=re[Be]),ai(re,Oe)\u0026\u0026(me.START_CHARS_HINT=re[Oe]),me}const ln=Je({name:\"EOF\",pattern:yu.NA});Sl([ln]);function wn(re,X,me,He,We,ft,wt,zt){return{image:X,startOffset:me,endOffset:He,startLine:We,endLine:ft,startColumn:wt,endColumn:zt,tokenTypeIdx:re.tokenTypeIdx,tokenType:re}}function $o(re,X){return Ph(re,X)}const Ai={buildMismatchTokenMessage({expected:re,actual:X,previous:me,ruleName:He}){return`Expecting ${V2(re)?`--\u003e ${Dh(re)} \u003c--`:`token of type --\u003e ${re.name} \u003c--`} but found --\u003e '${X.image}' \u003c--`},buildNotAllInputParsedMessage({firstRedundant:re,ruleName:X}){return\"Redundant input, expecting EOF but found: \"+re.image},buildNoViableAltMessage({expectedPathsPerAlt:re,actual:X,previous:me,customUserDescription:He,ruleName:We}){const ft=\"Expecting: \",zt=`\nbut found: '`+Jc(X).image+\"'\";if(He)return ft+He+zt;{const en=_u(re,(ci,Hi)=\u003eci.concat(Hi),[]),In=Gi(en,ci=\u003e`[${Gi(ci,Hi=\u003eDh(Hi)).join(\", \")}]`),wo=`one of these possible Token sequences:\n${Gi(In,(ci,Hi)=\u003e` ${Hi+1}. ${ci}`).join(`\n`)}`;return ft+wo+zt}},buildEarlyExitMessage({expectedIterationPaths:re,actual:X,customUserDescription:me,ruleName:He}){const We=\"Expecting: \",wt=`\nbut found: '`+Jc(X).image+\"'\";if(me)return We+me+wt;{const en=`expecting at least one iteration which starts with one of these possible Token sequences::\n \u003c${Gi(re,In=\u003e`[${Gi(In,po=\u003eDh(po)).join(\",\")}]`).join(\" ,\")}\u003e`;return We+en+wt}}};Object.freeze(Ai);const Qi={buildRuleNotFoundError(re,X){return\"Invalid grammar, reference to a rule which is not defined: -\u003e\"+X.nonTerminalName+`\u003c-\ninside top level rule: -\u003e`+re.name+\"\u003c-\"}},Ni={buildDuplicateFoundError(re,X){function me(po){return po instanceof $c?po.terminalType.name:po instanceof za?po.nonTerminalName:\"\"}const He=re.name,We=Jc(X),ft=We.idx,wt=b0(We),zt=me(We),en=ft\u003e0;let In=`-\u003e${wt}${en?ft:\"\"}\u003c- ${zt?`with argument: -\u003e${zt}\u003c-`:\"\"}\n appears more than once (${X.length} times) in the top level rule: -\u003e${He}\u003c-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return In=In.replace(/[ \\t]+/g,\" \"),In=In.replace(/\\s\\s+/g,`\n`),In},buildNamespaceConflictError(re){return`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: \u003c${re.name}\u003e.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(re){const X=Gi(re.prefixPath,We=\u003eDh(We)).join(\", \"),me=re.alternation.idx===0?\"\":re.alternation.idx;return`Ambiguous alternatives: \u003c${re.ambiguityIndices.join(\" ,\")}\u003e due to common lookahead prefix\nin \u003cOR${me}\u003e inside \u003c${re.topLevelRule.name}\u003e Rule,\n\u003c${X}\u003e may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(re){const X=Gi(re.prefixPath,We=\u003eDh(We)).join(\", \"),me=re.alternation.idx===0?\"\":re.alternation.idx;let He=`Ambiguous Alternatives Detected: \u003c${re.ambiguityIndices.join(\" ,\")}\u003e in \u003cOR${me}\u003e inside \u003c${re.topLevelRule.name}\u003e Rule,\n\u003c${X}\u003e may appears as a prefix path in all these alternatives.\n`;return He=He+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.`,He},buildEmptyRepetitionError(re){let X=b0(re.repetition);return re.repetition.idx!==0\u0026\u0026(X+=re.repetition.idx),`The repetition \u003c${X}\u003e within Rule \u003c${re.topLevelRule.name}\u003e can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError(re){return\"deprecated\"},buildEmptyAlternationError(re){return`Ambiguous empty alternative: \u003c${re.emptyChoiceIdx+1}\u003e in \u003cOR${re.alternation.idx}\u003e inside \u003c${re.topLevelRule.name}\u003e Rule.\nOnly the last alternative may be an empty alternative.`},buildTooManyAlternativesError(re){return`An Alternation cannot have more than 256 alternatives:\n\u003cOR${re.alternation.idx}\u003e inside \u003c${re.topLevelRule.name}\u003e Rule.\n has ${re.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(re){const X=re.topLevelRule.name,me=Gi(re.leftRecursionPath,ft=\u003eft.name),He=`${X} --\u003e ${me.concat([X]).join(\" --\u003e \")}`;return`Left Recursion found in grammar.\nrule: \u003c${X}\u003e can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${He}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(re){return\"deprecated\"},buildDuplicateRuleNameError(re){let X;return re.topLevelRule instanceof $g?X=re.topLevelRule.name:X=re.topLevelRule,`Duplicate definition, rule: -\u003e${X}\u003c- is already defined in the grammar: -\u003e${re.grammarName}\u003c-`}};function Xs(re,X){const me=new jp(re,X);return me.resolveRefs(),me.errors}class jp extends VI{constructor(X,me){super(),this.nameToTopRule=X,this.errMsgProvider=me,this.errors=[]}resolveRefs(){zr(Wc(this.nameToTopRule),X=\u003e{this.currTopLevel=X,X.accept(this)})}visitNonTerminal(X){const me=this.nameToTopRule[X.nonTerminalName];if(me)X.referencedRule=me;else{const He=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,X);this.errors.push({message:He,type:pp.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:X.nonTerminalName})}}}class L1 extends Mf{constructor(X,me){super(),this.topProd=X,this.path=me,this.possibleTokTypes=[],this.nextProductionName=\"\",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(\"The path does not start with the walker's top Rule!\");return this.ruleStack=x0(this.path.ruleStack).reverse(),this.occurrenceStack=x0(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(X,me=[]){this.found||super.walk(X,me)}walkProdRef(X,me,He){if(X.referencedRule.name===this.nextProductionName\u0026\u0026X.idx===this.nextProductionOccurrence){const We=me.concat(He);this.updateExpectedNext(),this.walk(X.referencedRule,We)}}updateExpectedNext(){RA(this.ruleStack)?(this.nextProductionName=\"\",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Eg extends L1{constructor(X,me){super(X,me),this.path=me,this.nextTerminalName=\"\",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(X,me,He){if(this.isAtEndOfPath\u0026\u0026X.terminalType.name===this.nextTerminalName\u0026\u0026X.idx===this.nextTerminalOccurrence\u0026\u0026!this.found){const We=me.concat(He),ft=new Xa({definition:We});this.possibleTokTypes=Cg(ft),this.found=!0}}}class Yn extends Mf{constructor(X,me){super(),this.topRule=X,this.occurrence=me,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class Qn extends Yn{walkMany(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c\u0026\u0026(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkMany(X,me,He)}}class to extends Yn{walkManySep(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c\u0026\u0026(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkManySep(X,me,He)}}class zo extends Yn{walkAtLeastOne(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c\u0026\u0026(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkAtLeastOne(X,me,He)}}class Bi extends Yn{walkAtLeastOneSep(X,me,He){if(X.idx===this.occurrence){const We=Jc(me.concat(He));this.result.isEndOfRule=We===void 0,We instanceof $c\u0026\u0026(this.result.token=We.terminalType,this.result.occurrence=We.idx)}else super.walkAtLeastOneSep(X,me,He)}}function eA(re,X,me=[]){me=x0(me);let He=[],We=0;function ft(zt){return zt.concat(Hu(re,We+1))}function wt(zt){const en=eA(ft(zt),X,me);return He.concat(en)}for(;me.length\u003cX\u0026\u0026We\u003cre.length;){const zt=re[We];if(zt instanceof Xa)return wt(zt.definition);if(zt instanceof za)return wt(zt.definition);if(zt instanceof Za)He=wt(zt.definition);else if(zt instanceof Vs){const en=zt.definition.concat([new Si({definition:zt.definition})]);return wt(en)}else if(zt instanceof fu){const en=[new Xa({definition:zt.definition}),new Si({definition:[new $c({terminalType:zt.separator})].concat(zt.definition)})];return wt(en)}else if(zt instanceof lp){const en=zt.definition.concat([new Si({definition:[new $c({terminalType:zt.separator})].concat(zt.definition)})]);He=wt(en)}else if(zt instanceof Si){const en=zt.definition.concat([new Si({definition:zt.definition})]);He=wt(en)}else{if(zt instanceof c0)return zr(zt.definition,en=\u003e{RA(en.definition)===!1\u0026\u0026(He=wt(en.definition))}),He;if(zt instanceof $c)me.push(zt.terminalType);else throw Error(\"non exhaustive match\")}We++}return He.push({partialPath:me,suffixDef:Hu(re,We)}),He}function Or(re,X,me,He){const We=\"EXIT_NONE_TERMINAL\",ft=[We],wt=\"EXIT_ALTERNATIVE\";let zt=!1;const en=X.length,In=en-He-1,po=[],wo=[];for(wo.push({idx:-1,def:re,ruleStack:[],occurrenceStack:[]});!RA(wo);){const ci=wo.pop();if(ci===wt){zt\u0026\u0026GI(wo).idx\u003c=In\u0026\u0026wo.pop();continue}const Hi=ci.def,pr=ci.idx,Wr=ci.ruleStack,Ca=ci.occurrenceStack;if(RA(Hi))continue;const rr=Hi[0];if(rr===We){const Wi={idx:pr,def:Hu(Hi),ruleStack:wm(Wr),occurrenceStack:wm(Ca)};wo.push(Wi)}else if(rr instanceof $c)if(pr\u003cen-1){const Wi=pr+1,Mi=X[Wi];if(me(Mi,rr.terminalType)){const Gr={idx:Wi,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Gr)}}else if(pr===en-1)po.push({nextTokenType:rr.terminalType,nextTokenOccurrence:rr.idx,ruleStack:Wr,occurrenceStack:Ca}),zt=!0;else throw Error(\"non exhaustive match\");else if(rr instanceof za){const Wi=x0(Wr);Wi.push(rr.nonTerminalName);const Mi=x0(Ca);Mi.push(rr.idx);const Gr={idx:pr,def:rr.definition.concat(ft,Hu(Hi)),ruleStack:Wi,occurrenceStack:Mi};wo.push(Gr)}else if(rr instanceof Za){const Wi={idx:pr,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Wi),wo.push(wt);const Mi={idx:pr,def:rr.definition.concat(Hu(Hi)),ruleStack:Wr,occurrenceStack:Ca};wo.push(Mi)}else if(rr instanceof Vs){const Wi=new Si({definition:rr.definition,idx:rr.idx}),Mi=rr.definition.concat([Wi],Hu(Hi)),Gr={idx:pr,def:Mi,ruleStack:Wr,occurrenceStack:Ca};wo.push(Gr)}else if(rr instanceof fu){const Wi=new $c({terminalType:rr.separator}),Mi=new Si({definition:[Wi].concat(rr.definition),idx:rr.idx}),Gr=rr.definition.concat([Mi],Hu(Hi)),Bc={idx:pr,def:Gr,ruleStack:Wr,occurrenceStack:Ca};wo.push(Bc)}else if(rr instanceof lp){const Wi={idx:pr,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Wi),wo.push(wt);const Mi=new $c({terminalType:rr.separator}),Gr=new Si({definition:[Mi].concat(rr.definition),idx:rr.idx}),Bc=rr.definition.concat([Gr],Hu(Hi)),qp={idx:pr,def:Bc,ruleStack:Wr,occurrenceStack:Ca};wo.push(qp)}else if(rr instanceof Si){const Wi={idx:pr,def:Hu(Hi),ruleStack:Wr,occurrenceStack:Ca};wo.push(Wi),wo.push(wt);const Mi=new Si({definition:rr.definition,idx:rr.idx}),Gr=rr.definition.concat([Mi],Hu(Hi)),Bc={idx:pr,def:Gr,ruleStack:Wr,occurrenceStack:Ca};wo.push(Bc)}else if(rr instanceof c0)for(let Wi=rr.definition.length-1;Wi\u003e=0;Wi--){const Mi=rr.definition[Wi],Gr={idx:pr,def:Mi.definition.concat(Hu(Hi)),ruleStack:Wr,occurrenceStack:Ca};wo.push(Gr),wo.push(wt)}else if(rr instanceof Xa)wo.push({idx:pr,def:rr.definition.concat(Hu(Hi)),ruleStack:Wr,occurrenceStack:Ca});else if(rr instanceof $g)wo.push(Js(rr,pr,Wr,Ca));else throw Error(\"non exhaustive match\")}return po}function Js(re,X,me,He){const We=x0(me);We.push(re.name);const ft=x0(He);return ft.push(1),{idx:X,def:re.definition,ruleStack:We,occurrenceStack:ft}}var Qs;(function(re){re[re.OPTION=0]=\"OPTION\",re[re.REPETITION=1]=\"REPETITION\",re[re.REPETITION_MANDATORY=2]=\"REPETITION_MANDATORY\",re[re.REPETITION_MANDATORY_WITH_SEPARATOR=3]=\"REPETITION_MANDATORY_WITH_SEPARATOR\",re[re.REPETITION_WITH_SEPARATOR=4]=\"REPETITION_WITH_SEPARATOR\",re[re.ALTERNATION=5]=\"ALTERNATION\"})(Qs||(Qs={}));function Wa(re){if(re instanceof Za||re===\"Option\")return Qs.OPTION;if(re instanceof Si||re===\"Repetition\")return Qs.REPETITION;if(re instanceof Vs||re===\"RepetitionMandatory\")return Qs.REPETITION_MANDATORY;if(re instanceof fu||re===\"RepetitionMandatoryWithSeparator\")return Qs.REPETITION_MANDATORY_WITH_SEPARATOR;if(re instanceof lp||re===\"RepetitionWithSeparator\")return Qs.REPETITION_WITH_SEPARATOR;if(re instanceof c0||re===\"Alternation\")return Qs.ALTERNATION;throw Error(\"non exhaustive match\")}function Bg(re,X,me,He,We,ft){const wt=Ff(re,X,me),zt=h5(wt)?XI:Ph;return ft(wt,He,zt,We)}function d5(re,X,me,He,We,ft){const wt=Wd(re,X,We,me),zt=h5(wt)?XI:Ph;return ft(wt[0],zt,He)}function E3(re,X,me,He){const We=re.length,ft=Bh(re,wt=\u003eBh(wt,zt=\u003ezt.length===1));if(X)return function(wt){const zt=Gi(wt,en=\u003een.GATE);for(let en=0;en\u003cWe;en++){const In=re[en],po=In.length,wo=zt[en];if(!(wo!==void 0\u0026\u0026wo.call(this)===!1))e:for(let ci=0;ci\u003cpo;ci++){const Hi=In[ci],pr=Hi.length;for(let Wr=0;Wr\u003cpr;Wr++){const Ca=this.LA(Wr+1);if(me(Ca,Hi[Wr])===!1)continue e}return en}}};if(ft\u0026\u0026!He){const wt=Gi(re,en=\u003ehu(en)),zt=_u(wt,(en,In,po)=\u003e(zr(In,wo=\u003e{ai(en,wo.tokenTypeIdx)||(en[wo.tokenTypeIdx]=po),zr(wo.categoryMatches,ci=\u003e{ai(en,ci)||(en[ci]=po)})}),en),{});return function(){const en=this.LA(1);return zt[en.tokenTypeIdx]}}else return function(){for(let wt=0;wt\u003cWe;wt++){const zt=re[wt],en=zt.length;e:for(let In=0;In\u003cen;In++){const po=zt[In],wo=po.length;for(let ci=0;ci\u003cwo;ci++){const Hi=this.LA(ci+1);if(me(Hi,po[ci])===!1)continue e}return wt}}}}function H1(re,X,me){const He=Bh(re,ft=\u003eft.length===1),We=re.length;if(He\u0026\u0026!me){const ft=hu(re);if(ft.length===1\u0026\u0026RA(ft[0].categoryMatches)){const zt=ft[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===zt}}else{const wt=_u(ft,(zt,en,In)=\u003e(zt[en.tokenTypeIdx]=!0,zr(en.categoryMatches,po=\u003e{zt[po]=!0}),zt),[]);return function(){const zt=this.LA(1);return wt[zt.tokenTypeIdx]===!0}}}else return function(){e:for(let ft=0;ft\u003cWe;ft++){const wt=re[ft],zt=wt.length;for(let en=0;en\u003czt;en++){const In=this.LA(en+1);if(X(In,wt[en])===!1)continue e}return!0}return!1}}class M_ extends Mf{constructor(X,me,He){super(),this.topProd=X,this.targetOccurrence=me,this.targetProdType=He}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(X,me,He,We){return X.idx===this.targetOccurrence\u0026\u0026this.targetProdType===me?(this.restDef=He.concat(We),!0):!1}walkOption(X,me,He){this.checkIsTarget(X,Qs.OPTION,me,He)||super.walkOption(X,me,He)}walkAtLeastOne(X,me,He){this.checkIsTarget(X,Qs.REPETITION_MANDATORY,me,He)||super.walkOption(X,me,He)}walkAtLeastOneSep(X,me,He){this.checkIsTarget(X,Qs.REPETITION_MANDATORY_WITH_SEPARATOR,me,He)||super.walkOption(X,me,He)}walkMany(X,me,He){this.checkIsTarget(X,Qs.REPETITION,me,He)||super.walkOption(X,me,He)}walkManySep(X,me,He){this.checkIsTarget(X,Qs.REPETITION_WITH_SEPARATOR,me,He)||super.walkOption(X,me,He)}}class gp extends VI{constructor(X,me,He){super(),this.targetOccurrence=X,this.targetProdType=me,this.targetRef=He,this.result=[]}checkIsTarget(X,me){X.idx===this.targetOccurrence\u0026\u0026this.targetProdType===me\u0026\u0026(this.targetRef===void 0||X===this.targetRef)\u0026\u0026(this.result=X.definition)}visitOption(X){this.checkIsTarget(X,Qs.OPTION)}visitRepetition(X){this.checkIsTarget(X,Qs.REPETITION)}visitRepetitionMandatory(X){this.checkIsTarget(X,Qs.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(X){this.checkIsTarget(X,Qs.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(X){this.checkIsTarget(X,Qs.REPETITION_WITH_SEPARATOR)}visitAlternation(X){this.checkIsTarget(X,Qs.ALTERNATION)}}function Ma(re){const X=new Array(re);for(let me=0;me\u003cre;me++)X[me]=[];return X}function ja(re){let X=[\"\"];for(let me=0;me\u003cre.length;me++){const He=re[me],We=[];for(let ft=0;ft\u003cX.length;ft++){const wt=X[ft];We.push(wt+\"_\"+He.tokenTypeIdx);for(let zt=0;zt\u003cHe.categoryMatches.length;zt++){const en=\"_\"+He.categoryMatches[zt];We.push(wt+en)}}X=We}return X}function z2(re,X,me){for(let He=0;He\u003cre.length;He++){if(He===me)continue;const We=re[He];for(let ft=0;ft\u003cX.length;ft++){const wt=X[ft];if(We[wt]===!0)return!1}}return!0}function ms(re,X){const me=Gi(re,wt=\u003eeA([wt],1)),He=Ma(me.length),We=Gi(me,wt=\u003e{const zt={};return zr(wt,en=\u003e{const In=ja(en.partialPath);zr(In,po=\u003e{zt[po]=!0})}),zt});let ft=me;for(let wt=1;wt\u003c=X;wt++){const zt=ft;ft=Ma(zt.length);for(let en=0;en\u003czt.length;en++){const In=zt[en];for(let po=0;po\u003cIn.length;po++){const wo=In[po].partialPath,ci=In[po].suffixDef,Hi=ja(wo);if(z2(We,Hi,en)||RA(ci)||wo.length===X){const Wr=He[en];if(ZI(Wr,wo)===!1){Wr.push(wo);for(let Ca=0;Ca\u003cHi.length;Ca++){const rr=Hi[Ca];We[en][rr]=!0}}}else{const Wr=eA(ci,wt+1,wo);ft[en]=ft[en].concat(Wr),zr(Wr,Ca=\u003e{const rr=ja(Ca.partialPath);zr(rr,Wi=\u003e{We[en][Wi]=!0})})}}}}return He}function Ff(re,X,me,He){const We=new gp(re,Qs.ALTERNATION,He);return X.accept(We),ms(We.result,me)}function Wd(re,X,me,He){const We=new gp(re,me);X.accept(We);const ft=We.result,zt=new M_(X,re,me).startWalking(),en=new Xa({definition:ft}),In=new Xa({definition:zt});return ms([en,In],He)}function ZI(re,X){e:for(let me=0;me\u003cre.length;me++){const He=re[me];if(He.length===X.length){for(let We=0;We\u003cHe.length;We++){const ft=X[We],wt=He[We];if((ft===wt||wt.categoryMatchesMap[ft.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Ia(re,X){return re.length\u003cX.length\u0026\u0026Bh(re,(me,He)=\u003e{const We=X[He];return me===We||We.categoryMatchesMap[me.tokenTypeIdx]})}function h5(re){return Bh(re,X=\u003eBh(X,me=\u003eBh(me,He=\u003eRA(He.categoryMatches))))}function p5(re){const X=re.lookaheadStrategy.validate({rules:re.rules,tokenTypes:re.tokenTypes,grammarName:re.grammarName});return Gi(X,me=\u003eObject.assign({type:pp.CUSTOM_LOOKAHEAD_VALIDATION},me))}function zS(re,X,me,He){const We=pg(re,en=\u003eNh(en,me)),ft=tC(re,X,me),wt=pg(re,en=\u003eWn(en,me)),zt=pg(re,en=\u003eiy(en,re,He,me));return We.concat(ft,wt,zt)}function Nh(re,X){const me=new B3;re.accept(me);const He=me.allProductions,We=Ys(He,yA),ft=fg(We,zt=\u003ezt.length\u003e1);return Gi(Wc(ft),zt=\u003e{const en=Jc(zt),In=X.buildDuplicateFoundError(re,zt),po=b0(en),wo={message:In,type:pp.DUPLICATE_PRODUCTIONS,ruleName:re.name,dslName:po,occurrence:en.idx},ci=Lf(en);return ci\u0026\u0026(wo.parameter=ci),wo})}function yA(re){return`${b0(re)}_#_${re.idx}_#_${Lf(re)}`}function Lf(re){return re instanceof $c?re.terminalType.name:re instanceof za?re.nonTerminalName:\"\"}class B3 extends VI{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(X){this.allProductions.push(X)}visitOption(X){this.allProductions.push(X)}visitRepetitionWithSeparator(X){this.allProductions.push(X)}visitRepetitionMandatory(X){this.allProductions.push(X)}visitRepetitionMandatoryWithSeparator(X){this.allProductions.push(X)}visitRepetition(X){this.allProductions.push(X)}visitAlternation(X){this.allProductions.push(X)}visitTerminal(X){this.allProductions.push(X)}}function iy(re,X,me,He){const We=[];if(_u(X,(wt,zt)=\u003ezt.name===re.name?wt+1:wt,0)\u003e1){const wt=He.buildDuplicateRuleNameError({topLevelRule:re,grammarName:me});We.push({message:wt,type:pp.DUPLICATE_RULE_NAME,ruleName:re.name})}return We}function b3(re,X,me){const He=[];let We;return A0(X,re)||(We=`Invalid rule override, rule: -\u003e${re}\u003c- cannot be overridden in the grammar: -\u003e${me}\u003c-as it is not defined in any of the super grammars `,He.push({message:We,type:pp.INVALID_RULE_OVERRIDE,ruleName:re})),He}function dp(re,X,me,He=[]){const We=[],ft=eC(X.definition);if(RA(ft))return[];{const wt=re.name;A0(ft,re)\u0026\u0026We.push({message:me.buildLeftRecursionError({topLevelRule:re,leftRecursionPath:He}),type:pp.LEFT_RECURSION,ruleName:wt});const en=L2(ft,He.concat([re])),In=pg(en,po=\u003e{const wo=x0(He);return wo.push(po),dp(re,po,me,wo)});return We.concat(In)}}function eC(re){let X=[];if(RA(re))return X;const me=Jc(re);if(me instanceof za)X.push(me.referencedRule);else if(me instanceof Xa||me instanceof Za||me instanceof Vs||me instanceof fu||me instanceof lp||me instanceof Si)X=X.concat(eC(me.definition));else if(me instanceof c0)X=hu(Gi(me.definition,ft=\u003eeC(ft.definition)));else if(!(me instanceof $c))throw Error(\"non exhaustive match\");const He=zI(me),We=re.length\u003e1;if(He\u0026\u0026We){const ft=Hu(re);return X.concat(eC(ft))}else return X}class J2 extends VI{constructor(){super(...arguments),this.alternations=[]}visitAlternation(X){this.alternations.push(X)}}function JS(re,X){const me=new J2;re.accept(me);const He=me.alternations;return pg(He,ft=\u003e{const wt=wm(ft.definition);return pg(wt,(zt,en)=\u003e{const In=Or([zt],[],Ph,1);return RA(In)?[{message:X.buildEmptyAlternationError({topLevelRule:re,alternation:ft,emptyChoiceIdx:en}),type:pp.NONE_LAST_EMPTY_ALT,ruleName:re.name,occurrence:ft.idx,alternative:en+1}]:[]})})}function l8(re,X,me){const He=new J2;re.accept(He);let We=He.alternations;return We=Ig(We,wt=\u003ewt.ignoreAmbiguities===!0),pg(We,wt=\u003e{const zt=wt.idx,en=wt.maxLookahead||X,In=Ff(zt,re,en,wt),po=u8(In,wt,re,me),wo=Rh(In,wt,re,me);return po.concat(wo)})}class ra extends VI{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(X){this.allProductions.push(X)}visitRepetitionMandatory(X){this.allProductions.push(X)}visitRepetitionMandatoryWithSeparator(X){this.allProductions.push(X)}visitRepetition(X){this.allProductions.push(X)}}function Wn(re,X){const me=new J2;re.accept(me);const He=me.alternations;return pg(He,ft=\u003eft.definition.length\u003e255?[{message:X.buildTooManyAlternativesError({topLevelRule:re,alternation:ft}),type:pp.TOO_MANY_ALTS,ruleName:re.name,occurrence:ft.idx}]:[])}function _s(re,X,me){const He=[];return zr(re,We=\u003e{const ft=new ra;We.accept(ft);const wt=ft.allProductions;zr(wt,zt=\u003e{const en=Wa(zt),In=zt.maxLookahead||X,po=zt.idx,ci=Wd(po,We,en,In)[0];if(RA(hu(ci))){const Hi=me.buildEmptyRepetitionError({topLevelRule:We,repetition:zt});He.push({message:Hi,type:pp.NO_NON_EMPTY_LOOKAHEAD,ruleName:We.name})}})}),He}function u8(re,X,me,He){const We=[],ft=_u(re,(zt,en,In)=\u003e(X.definition[In].ignoreAmbiguities===!0||zr(en,po=\u003e{const wo=[In];zr(re,(ci,Hi)=\u003e{In!==Hi\u0026\u0026ZI(ci,po)\u0026\u0026X.definition[Hi].ignoreAmbiguities!==!0\u0026\u0026wo.push(Hi)}),wo.length\u003e1\u0026\u0026!ZI(We,po)\u0026\u0026(We.push(po),zt.push({alts:wo,path:po}))}),zt),[]);return Gi(ft,zt=\u003e{const en=Gi(zt.alts,po=\u003epo+1);return{message:He.buildAlternationAmbiguityError({topLevelRule:me,alternation:X,ambiguityIndices:en,prefixPath:zt.path}),type:pp.AMBIGUOUS_ALTS,ruleName:me.name,occurrence:X.idx,alternatives:zt.alts}})}function Rh(re,X,me,He){const We=_u(re,(wt,zt,en)=\u003e{const In=Gi(zt,po=\u003e({idx:en,path:po}));return wt.concat(In)},[]);return zg(pg(We,wt=\u003e{if(X.definition[wt.idx].ignoreAmbiguities===!0)return[];const en=wt.idx,In=wt.path,po=mu(We,ci=\u003eX.definition[ci.idx].ignoreAmbiguities!==!0\u0026\u0026ci.idx\u003cen\u0026\u0026Ia(ci.path,In));return Gi(po,ci=\u003e{const Hi=[ci.idx+1,en+1],pr=X.idx===0?\"\":X.idx;return{message:He.buildAlternationPrefixAmbiguityError({topLevelRule:me,alternation:X,ambiguityIndices:Hi,prefixPath:ci.path}),type:pp.AMBIGUOUS_PREFIX_ALTS,ruleName:me.name,occurrence:pr,alternatives:Hi}})}))}function tC(re,X,me){const He=[],We=Gi(X,ft=\u003eft.name);return zr(re,ft=\u003e{const wt=ft.name;if(A0(We,wt)){const zt=me.buildNamespaceConflictError(ft);He.push({message:zt,type:pp.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:wt})}}),He}function Tm(re){const X=o5(re,{errMsgProvider:Qi}),me={};return zr(re.rules,He=\u003e{me[He.name]=He}),Xs(me,X.errMsgProvider)}function O1(re){return re=o5(re,{errMsgProvider:Ni}),zS(re.rules,re.tokenTypes,re.errMsgProvider,re.grammarName)}const ry=\"MismatchedTokenException\",$p=\"NoViableAltException\",W2=\"EarlyExitException\",G1=\"NotAllInputParsedException\",S3=[ry,$p,W2,G1];Object.freeze(S3);function R4(re){return A0(S3,re.name)}class sy extends Error{constructor(X,me){super(X),this.token=me,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace\u0026\u0026Error.captureStackTrace(this,this.constructor)}}class g8 extends sy{constructor(X,me,He){super(X,me),this.previousToken=He,this.name=ry}}class D_ extends sy{constructor(X,me,He){super(X,me),this.previousToken=He,this.name=$p}}class ay extends sy{constructor(X,me){super(X,me),this.name=G1}}class Ay extends sy{constructor(X,me,He){super(X,me),this.previousToken=He,this.name=W2}}const Y1={},Q3=\"InRuleRecoveryException\";class m5 extends Error{constructor(X){super(X),this.name=Q3}}class m9{initRecoverable(X){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=ai(X,\"recoveryEnabled\")?X.recoveryEnabled:Fm.recoveryEnabled,this.recoveryEnabled\u0026\u0026(this.attemptInRepetitionRecovery=nC)}getTokenToInsert(X){const me=wn(X,\"\",NaN,NaN,NaN,NaN,NaN,NaN);return me.isInsertedInRecovery=!0,me}canTokenTypeBeInsertedInRecovery(X){return!0}canTokenTypeBeDeletedInRecovery(X){return!0}tryInRepetitionRecovery(X,me,He,We){const ft=this.findReSyncTokenType(),wt=this.exportLexerState(),zt=[];let en=!1;const In=this.LA(1);let po=this.LA(1);const wo=()=\u003e{const ci=this.LA(0),Hi=this.errorMessageProvider.buildMismatchTokenMessage({expected:We,actual:In,previous:ci,ruleName:this.getCurrRuleFullName()}),pr=new g8(Hi,In,this.LA(0));pr.resyncedTokens=wm(zt),this.SAVE_ERROR(pr)};for(;!en;)if(this.tokenMatcher(po,We)){wo();return}else if(He.call(this)){wo(),X.apply(this,me);return}else this.tokenMatcher(po,ft)?en=!0:(po=this.SKIP_TOKEN(),this.addToResyncTokens(po,zt));this.importLexerState(wt)}shouldInRepetitionRecoveryBeTried(X,me,He){return!(He===!1||this.tokenMatcher(this.LA(1),X)||this.isBackTracking()||this.canPerformInRuleRecovery(X,this.getFollowsForInRuleRecovery(X,me)))}getFollowsForInRuleRecovery(X,me){const He=this.getCurrentGrammarPath(X,me);return this.getNextPossibleTokenTypes(He)}tryInRuleRecovery(X,me){if(this.canRecoverWithSingleTokenInsertion(X,me))return this.getTokenToInsert(X);if(this.canRecoverWithSingleTokenDeletion(X)){const He=this.SKIP_TOKEN();return this.consumeToken(),He}throw new m5(\"sad sad panda\")}canPerformInRuleRecovery(X,me){return this.canRecoverWithSingleTokenInsertion(X,me)||this.canRecoverWithSingleTokenDeletion(X)}canRecoverWithSingleTokenInsertion(X,me){if(!this.canTokenTypeBeInsertedInRecovery(X)||RA(me))return!1;const He=this.LA(1);return cp(me,ft=\u003ethis.tokenMatcher(He,ft))!==void 0}canRecoverWithSingleTokenDeletion(X){return this.canTokenTypeBeDeletedInRecovery(X)?this.tokenMatcher(this.LA(2),X):!1}isInCurrentRuleReSyncSet(X){const me=this.getCurrFollowKey(),He=this.getFollowSetFromFollowKey(me);return A0(He,X)}findReSyncTokenType(){const X=this.flattenFollowSet();let me=this.LA(1),He=2;for(;;){const We=cp(X,ft=\u003e$o(me,ft));if(We!==void 0)return We;me=this.LA(He),He++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Y1;const X=this.getLastExplicitRuleShortName(),me=this.getLastExplicitRuleOccurrenceIndex(),He=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(X),idxInCallingRule:me,inRule:this.shortRuleNameToFullName(He)}}buildFullFollowKeyStack(){const X=this.RULE_STACK,me=this.RULE_OCCURRENCE_STACK;return Gi(X,(He,We)=\u003eWe===0?Y1:{ruleName:this.shortRuleNameToFullName(He),idxInCallingRule:me[We],inRule:this.shortRuleNameToFullName(X[We-1])})}flattenFollowSet(){const X=Gi(this.buildFullFollowKeyStack(),me=\u003ethis.getFollowSetFromFollowKey(me));return hu(X)}getFollowSetFromFollowKey(X){if(X===Y1)return[ln];const me=X.ruleName+X.idxInCallingRule+Nm+X.inRule;return this.resyncFollows[me]}addToResyncTokens(X,me){return this.tokenMatcher(X,ln)||me.push(X),me}reSyncTo(X){const me=[];let He=this.LA(1);for(;this.tokenMatcher(He,X)===!1;)He=this.SKIP_TOKEN(),this.addToResyncTokens(He,me);return wm(me)}attemptInRepetitionRecovery(X,me,He,We,ft,wt,zt){}getCurrentGrammarPath(X,me){const He=this.getHumanReadableRuleStack(),We=x0(this.RULE_OCCURRENCE_STACK);return{ruleStack:He,occurrenceStack:We,lastTok:X,lastTokOccurrence:me}}getHumanReadableRuleStack(){return Gi(this.RULE_STACK,X=\u003ethis.shortRuleNameToFullName(X))}}function nC(re,X,me,He,We,ft,wt){const zt=this.getKeyForAutomaticLookahead(He,We);let en=this.firstAfterRepMap[zt];if(en===void 0){const ci=this.getCurrRuleFullName(),Hi=this.getGAstProductions()[ci];en=new ft(Hi,We).startWalking(),this.firstAfterRepMap[zt]=en}let In=en.token,po=en.occurrence;const wo=en.isEndOfRule;this.RULE_STACK.length===1\u0026\u0026wo\u0026\u0026In===void 0\u0026\u0026(In=ln,po=1),!(In===void 0||po===void 0)\u0026\u0026this.shouldInRepetitionRecoveryBeTried(In,po,wt)\u0026\u0026this.tryInRepetitionRecovery(re,X,me,In)}const km=4,jd=8,Vu=1\u003c\u003cjd,Pi=2\u003c\u003cjd,Zg=3\u003c\u003cjd,Ql=4\u003c\u003cjd,q0=5\u003c\u003cjd,cy=6\u003c\u003cjd;function U1(re,X,me){return me|X|re}class v3{constructor(X){var me;this.maxLookahead=(me=X?.maxLookahead)!==null\u0026\u0026me!==void 0?me:Fm.maxLookahead}validate(X){const me=this.validateNoLeftRecursion(X.rules);if(RA(me)){const He=this.validateEmptyOrAlternatives(X.rules),We=this.validateAmbiguousAlternationAlternatives(X.rules,this.maxLookahead),ft=this.validateSomeNonEmptyLookaheadPath(X.rules,this.maxLookahead);return[...me,...He,...We,...ft]}return me}validateNoLeftRecursion(X){return pg(X,me=\u003edp(me,me,Ni))}validateEmptyOrAlternatives(X){return pg(X,me=\u003eJS(me,Ni))}validateAmbiguousAlternationAlternatives(X,me){return pg(X,He=\u003el8(He,me,Ni))}validateSomeNonEmptyLookaheadPath(X,me){return _s(X,me,Ni)}buildLookaheadForAlternation(X){return Bg(X.prodOccurrence,X.rule,X.maxLookahead,X.hasPredicates,X.dynamicTokensEnabled,E3)}buildLookaheadForOptional(X){return d5(X.prodOccurrence,X.rule,X.maxLookahead,X.dynamicTokensEnabled,Wa(X.prodType),H1)}}class T4{initLooksAhead(X){this.dynamicTokensEnabled=ai(X,\"dynamicTokensEnabled\")?X.dynamicTokensEnabled:Fm.dynamicTokensEnabled,this.maxLookahead=ai(X,\"maxLookahead\")?X.maxLookahead:Fm.maxLookahead,this.lookaheadStrategy=ai(X,\"lookaheadStrategy\")?X.lookaheadStrategy:new v3({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(X){zr(X,me=\u003e{this.TRACE_INIT(`${me.name} Rule Lookahead`,()=\u003e{const{alternation:He,repetition:We,option:ft,repetitionMandatory:wt,repetitionMandatoryWithSeparator:zt,repetitionWithSeparator:en}=N_(me);zr(He,In=\u003e{const po=In.idx===0?\"\":In.idx;this.TRACE_INIT(`${b0(In)}${po}`,()=\u003e{const wo=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:In.idx,rule:me,maxLookahead:In.maxLookahead||this.maxLookahead,hasPredicates:In.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),ci=U1(this.fullRuleNameToShort[me.name],Vu,In.idx);this.setLaFuncCache(ci,wo)})}),zr(We,In=\u003e{this.computeLookaheadFunc(me,In.idx,Zg,\"Repetition\",In.maxLookahead,b0(In))}),zr(ft,In=\u003e{this.computeLookaheadFunc(me,In.idx,Pi,\"Option\",In.maxLookahead,b0(In))}),zr(wt,In=\u003e{this.computeLookaheadFunc(me,In.idx,Ql,\"RepetitionMandatory\",In.maxLookahead,b0(In))}),zr(zt,In=\u003e{this.computeLookaheadFunc(me,In.idx,cy,\"RepetitionMandatoryWithSeparator\",In.maxLookahead,b0(In))}),zr(en,In=\u003e{this.computeLookaheadFunc(me,In.idx,q0,\"RepetitionWithSeparator\",In.maxLookahead,b0(In))})})})}computeLookaheadFunc(X,me,He,We,ft,wt){this.TRACE_INIT(`${wt}${me===0?\"\":me}`,()=\u003e{const zt=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:me,rule:X,maxLookahead:ft||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:We}),en=U1(this.fullRuleNameToShort[X.name],He,me);this.setLaFuncCache(en,zt)})}getKeyForAutomaticLookahead(X,me){const He=this.getLastExplicitRuleShortName();return U1(He,X,me)}getLaFuncFromCache(X){return this.lookAheadFuncsCache.get(X)}setLaFuncCache(X,me){this.lookAheadFuncsCache.set(X,me)}}class ed extends VI{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(X){this.dslMethods.option.push(X)}visitRepetitionWithSeparator(X){this.dslMethods.repetitionWithSeparator.push(X)}visitRepetitionMandatory(X){this.dslMethods.repetitionMandatory.push(X)}visitRepetitionMandatoryWithSeparator(X){this.dslMethods.repetitionMandatoryWithSeparator.push(X)}visitRepetition(X){this.dslMethods.repetition.push(X)}visitAlternation(X){this.dslMethods.alternation.push(X)}}const hp=new ed;function N_(re){hp.reset(),re.accept(hp);const X=hp.dslMethods;return hp.reset(),X}function w3(re,X){isNaN(re.startOffset)===!0?(re.startOffset=X.startOffset,re.endOffset=X.endOffset):re.endOffset\u003cX.endOffset\u0026\u0026(re.endOffset=X.endOffset)}function td(re,X){isNaN(re.startOffset)===!0?(re.startOffset=X.startOffset,re.startColumn=X.startColumn,re.startLine=X.startLine,re.endOffset=X.endOffset,re.endColumn=X.endColumn,re.endLine=X.endLine):re.endOffset\u003cX.endOffset\u0026\u0026(re.endOffset=X.endOffset,re.endColumn=X.endColumn,re.endLine=X.endLine)}function zl(re,X,me){re.children[me]===void 0?re.children[me]=[X]:re.children[me].push(X)}function vl(re,X,me){re.children[X]===void 0?re.children[X]=[me]:re.children[X].push(me)}const X0=\"name\";function zu(re,X){Object.defineProperty(re,X0,{enumerable:!1,configurable:!0,writable:!1,value:X})}function Hf(re,X){const me=O0(re),He=me.length;for(let We=0;We\u003cHe;We++){const ft=me[We],wt=re[ft],zt=wt.length;for(let en=0;en\u003czt;en++){const In=wt[en];In.tokenTypeIdx===void 0\u0026\u0026this[In.name](In.children,X)}}}function oC(re,X){const me=function(){};zu(me,re+\"BaseSemantics\");const He={visit:function(We,ft){if(B(We)\u0026\u0026(We=We[0]),!cs(We))return this[We.name](We.children,ft)},validateVisitor:function(){const We=WS(this,X);if(!RA(We)){const ft=Gi(We,wt=\u003ewt.msg);throw Error(`Errors Detected in CST Visitor \u003c${this.constructor.name}\u003e:\n\t${ft.join(`\n\n`).replace(/\\n/g,`\n\t`)}`)}}};return me.prototype=He,me.prototype.constructor=me,me._RULE_NAMES=X,me}function P3(re,X,me){const He=function(){};zu(He,re+\"BaseSemanticsWithDefaults\");const We=Object.create(me.prototype);return zr(X,ft=\u003e{We[ft]=Hf}),He.prototype=We,He.prototype.constructor=He,He}var j2;(function(re){re[re.REDUNDANT_METHOD=0]=\"REDUNDANT_METHOD\",re[re.MISSING_METHOD=1]=\"MISSING_METHOD\"})(j2||(j2={}));function WS(re,X){return Of(re,X)}function Of(re,X){const me=mu(X,We=\u003eye(re[We])===!1),He=Gi(me,We=\u003e({msg:`Missing visitor method: \u003c${We}\u003e on ${re.constructor.name} CST Visitor.`,type:j2.MISSING_METHOD,methodName:We}));return zg(He)}class $2{initTreeBuilder(X){if(this.CST_STACK=[],this.outputCst=X.outputCst,this.nodeLocationTracking=ai(X,\"nodeLocationTracking\")?X.nodeLocationTracking:Fm.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Yt,this.cstFinallyStateUpdate=Yt,this.cstPostTerminal=Yt,this.cstPostNonTerminal=Yt,this.cstPostRule=Yt;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=td,this.setNodeLocationFromNode=td,this.cstPostRule=Yt,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=w3,this.setNodeLocationFromNode=w3,this.cstPostRule=Yt,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=Yt,this.setInitialNodeLocation=Yt;else throw Error(`Invalid \u003cnodeLocationTracking\u003e config option: \"${X.nodeLocationTracking}\"`)}setInitialNodeLocationOnlyOffsetRecovery(X){X.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(X){X.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(X){X.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(X){const me=this.LA(1);X.location={startOffset:me.startOffset,startLine:me.startLine,startColumn:me.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(X){const me={name:X,children:Object.create(null)};this.setInitialNodeLocation(me),this.CST_STACK.push(me)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(X){const me=this.LA(0),He=X.location;He.startOffset\u003c=me.startOffset?(He.endOffset=me.endOffset,He.endLine=me.endLine,He.endColumn=me.endColumn):(He.startOffset=NaN,He.startLine=NaN,He.startColumn=NaN)}cstPostRuleOnlyOffset(X){const me=this.LA(0),He=X.location;He.startOffset\u003c=me.startOffset?He.endOffset=me.endOffset:He.startOffset=NaN}cstPostTerminal(X,me){const He=this.CST_STACK[this.CST_STACK.length-1];zl(He,me,X),this.setNodeLocationFromToken(He.location,me)}cstPostNonTerminal(X,me){const He=this.CST_STACK[this.CST_STACK.length-1];vl(He,me,X),this.setNodeLocationFromNode(He.location,X.location)}getBaseCstVisitorConstructor(){if(cs(this.baseCstVisitorConstructor)){const X=oC(this.className,O0(this.gastProductionsCache));return this.baseCstVisitorConstructor=X,X}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(cs(this.baseCstVisitorWithDefaultsConstructor)){const X=P3(this.className,O0(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=X,X}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const X=this.RULE_STACK;return X[X.length-1]}getPreviousExplicitRuleShortName(){const X=this.RULE_STACK;return X[X.length-2]}getLastExplicitRuleOccurrenceIndex(){const X=this.RULE_OCCURRENCE_STACK;return X[X.length-1]}}class q2{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(X){if(this.selfAnalysisDone!==!0)throw Error(\"Missing \u003cperformSelfAnalysis\u003e invocation at the end of the Parser's constructor.\");this.reset(),this.tokVector=X,this.tokVectorLength=X.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx\u003c=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):_5}LA(X){const me=this.currIdx+X;return me\u003c0||this.tokVectorLength\u003c=me?_5:this.tokVector[me]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(X){this.currIdx=X}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class _9{ACTION(X){return X.call(this)}consume(X,me,He){return this.consumeInternal(me,X,He)}subrule(X,me,He){return this.subruleInternal(me,X,He)}option(X,me){return this.optionInternal(me,X)}or(X,me){return this.orInternal(me,X)}many(X,me){return this.manyInternal(X,me)}atLeastOne(X,me){return this.atLeastOneInternal(X,me)}CONSUME(X,me){return this.consumeInternal(X,0,me)}CONSUME1(X,me){return this.consumeInternal(X,1,me)}CONSUME2(X,me){return this.consumeInternal(X,2,me)}CONSUME3(X,me){return this.consumeInternal(X,3,me)}CONSUME4(X,me){return this.consumeInternal(X,4,me)}CONSUME5(X,me){return this.consumeInternal(X,5,me)}CONSUME6(X,me){return this.consumeInternal(X,6,me)}CONSUME7(X,me){return this.consumeInternal(X,7,me)}CONSUME8(X,me){return this.consumeInternal(X,8,me)}CONSUME9(X,me){return this.consumeInternal(X,9,me)}SUBRULE(X,me){return this.subruleInternal(X,0,me)}SUBRULE1(X,me){return this.subruleInternal(X,1,me)}SUBRULE2(X,me){return this.subruleInternal(X,2,me)}SUBRULE3(X,me){return this.subruleInternal(X,3,me)}SUBRULE4(X,me){return this.subruleInternal(X,4,me)}SUBRULE5(X,me){return this.subruleInternal(X,5,me)}SUBRULE6(X,me){return this.subruleInternal(X,6,me)}SUBRULE7(X,me){return this.subruleInternal(X,7,me)}SUBRULE8(X,me){return this.subruleInternal(X,8,me)}SUBRULE9(X,me){return this.subruleInternal(X,9,me)}OPTION(X){return this.optionInternal(X,0)}OPTION1(X){return this.optionInternal(X,1)}OPTION2(X){return this.optionInternal(X,2)}OPTION3(X){return this.optionInternal(X,3)}OPTION4(X){return this.optionInternal(X,4)}OPTION5(X){return this.optionInternal(X,5)}OPTION6(X){return this.optionInternal(X,6)}OPTION7(X){return this.optionInternal(X,7)}OPTION8(X){return this.optionInternal(X,8)}OPTION9(X){return this.optionInternal(X,9)}OR(X){return this.orInternal(X,0)}OR1(X){return this.orInternal(X,1)}OR2(X){return this.orInternal(X,2)}OR3(X){return this.orInternal(X,3)}OR4(X){return this.orInternal(X,4)}OR5(X){return this.orInternal(X,5)}OR6(X){return this.orInternal(X,6)}OR7(X){return this.orInternal(X,7)}OR8(X){return this.orInternal(X,8)}OR9(X){return this.orInternal(X,9)}MANY(X){this.manyInternal(0,X)}MANY1(X){this.manyInternal(1,X)}MANY2(X){this.manyInternal(2,X)}MANY3(X){this.manyInternal(3,X)}MANY4(X){this.manyInternal(4,X)}MANY5(X){this.manyInternal(5,X)}MANY6(X){this.manyInternal(6,X)}MANY7(X){this.manyInternal(7,X)}MANY8(X){this.manyInternal(8,X)}MANY9(X){this.manyInternal(9,X)}MANY_SEP(X){this.manySepFirstInternal(0,X)}MANY_SEP1(X){this.manySepFirstInternal(1,X)}MANY_SEP2(X){this.manySepFirstInternal(2,X)}MANY_SEP3(X){this.manySepFirstInternal(3,X)}MANY_SEP4(X){this.manySepFirstInternal(4,X)}MANY_SEP5(X){this.manySepFirstInternal(5,X)}MANY_SEP6(X){this.manySepFirstInternal(6,X)}MANY_SEP7(X){this.manySepFirstInternal(7,X)}MANY_SEP8(X){this.manySepFirstInternal(8,X)}MANY_SEP9(X){this.manySepFirstInternal(9,X)}AT_LEAST_ONE(X){this.atLeastOneInternal(0,X)}AT_LEAST_ONE1(X){return this.atLeastOneInternal(1,X)}AT_LEAST_ONE2(X){this.atLeastOneInternal(2,X)}AT_LEAST_ONE3(X){this.atLeastOneInternal(3,X)}AT_LEAST_ONE4(X){this.atLeastOneInternal(4,X)}AT_LEAST_ONE5(X){this.atLeastOneInternal(5,X)}AT_LEAST_ONE6(X){this.atLeastOneInternal(6,X)}AT_LEAST_ONE7(X){this.atLeastOneInternal(7,X)}AT_LEAST_ONE8(X){this.atLeastOneInternal(8,X)}AT_LEAST_ONE9(X){this.atLeastOneInternal(9,X)}AT_LEAST_ONE_SEP(X){this.atLeastOneSepFirstInternal(0,X)}AT_LEAST_ONE_SEP1(X){this.atLeastOneSepFirstInternal(1,X)}AT_LEAST_ONE_SEP2(X){this.atLeastOneSepFirstInternal(2,X)}AT_LEAST_ONE_SEP3(X){this.atLeastOneSepFirstInternal(3,X)}AT_LEAST_ONE_SEP4(X){this.atLeastOneSepFirstInternal(4,X)}AT_LEAST_ONE_SEP5(X){this.atLeastOneSepFirstInternal(5,X)}AT_LEAST_ONE_SEP6(X){this.atLeastOneSepFirstInternal(6,X)}AT_LEAST_ONE_SEP7(X){this.atLeastOneSepFirstInternal(7,X)}AT_LEAST_ONE_SEP8(X){this.atLeastOneSepFirstInternal(8,X)}AT_LEAST_ONE_SEP9(X){this.atLeastOneSepFirstInternal(9,X)}RULE(X,me,He=R_){if(A0(this.definedRulesNames,X)){const wt={message:Ni.buildDuplicateRuleNameError({topLevelRule:X,grammarName:this.className}),type:pp.DUPLICATE_RULE_NAME,ruleName:X};this.definitionErrors.push(wt)}this.definedRulesNames.push(X);const We=this.defineRule(X,me,He);return this[X]=We,We}OVERRIDE_RULE(X,me,He=R_){const We=b3(X,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(We);const ft=this.defineRule(X,me,He);return this[X]=ft,ft}BACKTRACK(X,me){return function(){this.isBackTrackingStack.push(1);const He=this.saveRecogState();try{return X.apply(this,me),!0}catch(We){if(R4(We))return!1;throw We}finally{this.reloadRecogState(He),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Qh(Wc(this.gastProductionsCache))}}class k4{initRecognizerEngine(X,me){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=XI,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},ai(me,\"serializedGrammar\"))throw Error(`The Parser's configuration can no longer contain a \u003cserializedGrammar\u003e property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.`);if(B(X)){if(RA(X))throw Error(`A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).`);if(typeof X[0].startOffset==\"number\")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.`)}if(B(X))this.tokensMap=_u(X,(ft,wt)=\u003e(ft[wt.name]=wt,ft),{});else if(ai(X,\"modes\")\u0026\u0026Bh(hu(Wc(X.modes)),F1)){const ft=hu(Wc(X.modes)),wt=KI(ft);this.tokensMap=_u(wt,(zt,en)=\u003e(zt[en.name]=en,zt),{})}else if(O(X))this.tokensMap=x0(X);else throw new Error(\"\u003ctokensDictionary\u003e argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition\");this.tokensMap.EOF=ln;const He=ai(X,\"modes\")?hu(Wc(X.modes)):Wc(X),We=Bh(He,ft=\u003eRA(ft.categoryMatches));this.tokenMatcher=We?XI:Ph,Sl(Wc(this.tokensMap))}defineRule(X,me,He){if(this.selfAnalysisDone)throw Error(`Grammar rule \u003c${X}\u003e may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const We=ai(He,\"resyncEnabled\")?He.resyncEnabled:R_.resyncEnabled,ft=ai(He,\"recoveryValueFunc\")?He.recoveryValueFunc:R_.recoveryValueFunc,wt=this.ruleShortNameIdx\u003c\u003ckm+jd;this.ruleShortNameIdx++,this.shortRuleNameToFull[wt]=X,this.fullRuleNameToShort[X]=wt;let zt;return this.outputCst===!0?zt=function(...po){try{this.ruleInvocationStateUpdate(wt,X,this.subruleIdx),me.apply(this,po);const wo=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(wo),wo}catch(wo){return this.invokeRuleCatch(wo,We,ft)}finally{this.ruleFinallyStateUpdate()}}:zt=function(...po){try{return this.ruleInvocationStateUpdate(wt,X,this.subruleIdx),me.apply(this,po)}catch(wo){return this.invokeRuleCatch(wo,We,ft)}finally{this.ruleFinallyStateUpdate()}},Object.assign(zt,{ruleName:X,originalGrammarAction:me})}invokeRuleCatch(X,me,He){const We=this.RULE_STACK.length===1,ft=me\u0026\u0026!this.isBackTracking()\u0026\u0026this.recoveryEnabled;if(R4(X)){const wt=X;if(ft){const zt=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(zt))if(wt.resyncedTokens=this.reSyncTo(zt),this.outputCst){const en=this.CST_STACK[this.CST_STACK.length-1];return en.recoveredNode=!0,en}else return He(X);else{if(this.outputCst){const en=this.CST_STACK[this.CST_STACK.length-1];en.recoveredNode=!0,wt.partialCstResult=en}throw wt}}else{if(We)return this.moveToTerminatedState(),He(X);throw wt}}else throw X}optionInternal(X,me){const He=this.getKeyForAutomaticLookahead(Pi,me);return this.optionInternalLogic(X,me,He)}optionInternalLogic(X,me,He){let We=this.getLaFuncFromCache(He),ft;if(typeof X!=\"function\"){ft=X.DEF;const wt=X.GATE;if(wt!==void 0){const zt=We;We=()=\u003ewt.call(this)\u0026\u0026zt.call(this)}}else ft=X;if(We.call(this)===!0)return ft.call(this)}atLeastOneInternal(X,me){const He=this.getKeyForAutomaticLookahead(Ql,X);return this.atLeastOneInternalLogic(X,me,He)}atLeastOneInternalLogic(X,me,He){let We=this.getLaFuncFromCache(He),ft;if(typeof me!=\"function\"){ft=me.DEF;const wt=me.GATE;if(wt!==void 0){const zt=We;We=()=\u003ewt.call(this)\u0026\u0026zt.call(this)}}else ft=me;if(We.call(this)===!0){let wt=this.doSingleRepetition(ft);for(;We.call(this)===!0\u0026\u0026wt===!0;)wt=this.doSingleRepetition(ft)}else throw this.raiseEarlyExitException(X,Qs.REPETITION_MANDATORY,me.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[X,me],We,Ql,X,zo)}atLeastOneSepFirstInternal(X,me){const He=this.getKeyForAutomaticLookahead(cy,X);this.atLeastOneSepFirstInternalLogic(X,me,He)}atLeastOneSepFirstInternalLogic(X,me,He){const We=me.DEF,ft=me.SEP;if(this.getLaFuncFromCache(He).call(this)===!0){We.call(this);const zt=()=\u003ethis.tokenMatcher(this.LA(1),ft);for(;this.tokenMatcher(this.LA(1),ft)===!0;)this.CONSUME(ft),We.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[X,ft,zt,We,Bi],zt,cy,X,Bi)}else throw this.raiseEarlyExitException(X,Qs.REPETITION_MANDATORY_WITH_SEPARATOR,me.ERR_MSG)}manyInternal(X,me){const He=this.getKeyForAutomaticLookahead(Zg,X);return this.manyInternalLogic(X,me,He)}manyInternalLogic(X,me,He){let We=this.getLaFuncFromCache(He),ft;if(typeof me!=\"function\"){ft=me.DEF;const zt=me.GATE;if(zt!==void 0){const en=We;We=()=\u003ezt.call(this)\u0026\u0026en.call(this)}}else ft=me;let wt=!0;for(;We.call(this)===!0\u0026\u0026wt===!0;)wt=this.doSingleRepetition(ft);this.attemptInRepetitionRecovery(this.manyInternal,[X,me],We,Zg,X,Qn,wt)}manySepFirstInternal(X,me){const He=this.getKeyForAutomaticLookahead(q0,X);this.manySepFirstInternalLogic(X,me,He)}manySepFirstInternalLogic(X,me,He){const We=me.DEF,ft=me.SEP;if(this.getLaFuncFromCache(He).call(this)===!0){We.call(this);const zt=()=\u003ethis.tokenMatcher(this.LA(1),ft);for(;this.tokenMatcher(this.LA(1),ft)===!0;)this.CONSUME(ft),We.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[X,ft,zt,We,to],zt,q0,X,to)}}repetitionSepSecondInternal(X,me,He,We,ft){for(;He();)this.CONSUME(me),We.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[X,me,He,We,ft],He,cy,X,ft)}doSingleRepetition(X){const me=this.getLexerPosition();return X.call(this),this.getLexerPosition()\u003eme}orInternal(X,me){const He=this.getKeyForAutomaticLookahead(Vu,me),We=B(X)?X:X.DEF,wt=this.getLaFuncFromCache(He).call(this,We);if(wt!==void 0)return We[wt].ALT.call(this);this.raiseNoAltException(me,X.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0\u0026\u0026this.isAtEndOfInput()===!1){const X=this.LA(1),me=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:X,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new ay(me,X))}}subruleInternal(X,me,He){let We;try{const ft=He!==void 0?He.ARGS:void 0;return this.subruleIdx=me,We=X.apply(this,ft),this.cstPostNonTerminal(We,He!==void 0\u0026\u0026He.LABEL!==void 0?He.LABEL:X.ruleName),We}catch(ft){throw this.subruleInternalError(ft,He,X.ruleName)}}subruleInternalError(X,me,He){throw R4(X)\u0026\u0026X.partialCstResult!==void 0\u0026\u0026(this.cstPostNonTerminal(X.partialCstResult,me!==void 0\u0026\u0026me.LABEL!==void 0?me.LABEL:He),delete X.partialCstResult),X}consumeInternal(X,me,He){let We;try{const ft=this.LA(1);this.tokenMatcher(ft,X)===!0?(this.consumeToken(),We=ft):this.consumeInternalError(X,ft,He)}catch(ft){We=this.consumeInternalRecovery(X,me,ft)}return this.cstPostTerminal(He!==void 0\u0026\u0026He.LABEL!==void 0?He.LABEL:X.name,We),We}consumeInternalError(X,me,He){let We;const ft=this.LA(0);throw He!==void 0\u0026\u0026He.ERR_MSG?We=He.ERR_MSG:We=this.errorMessageProvider.buildMismatchTokenMessage({expected:X,actual:me,previous:ft,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new g8(We,me,ft))}consumeInternalRecovery(X,me,He){if(this.recoveryEnabled\u0026\u0026He.name===\"MismatchedTokenException\"\u0026\u0026!this.isBackTracking()){const We=this.getFollowsForInRuleRecovery(X,me);try{return this.tryInRuleRecovery(X,We)}catch(ft){throw ft.name===Q3?He:ft}}else throw He}saveRecogState(){const X=this.errors,me=x0(this.RULE_STACK);return{errors:X,lexerState:this.exportLexerState(),RULE_STACK:me,CST_STACK:this.CST_STACK}}reloadRecogState(X){this.errors=X.errors,this.importLexerState(X.lexerState),this.RULE_STACK=X.RULE_STACK}ruleInvocationStateUpdate(X,me,He){this.RULE_OCCURRENCE_STACK.push(He),this.RULE_STACK.push(X),this.cstInvocationStateUpdate(me)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const X=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[X]}shortRuleNameToFullName(X){return this.shortRuleNameToFull[X]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),ln)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class F4{initErrorHandler(X){this._errors=[],this.errorMessageProvider=ai(X,\"errorMessageProvider\")?X.errorMessageProvider:Fm.errorMessageProvider}SAVE_ERROR(X){if(R4(X))return X.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:x0(this.RULE_OCCURRENCE_STACK)},this._errors.push(X),X;throw Error(\"Trying to save an Error which is not a RecognitionException\")}get errors(){return x0(this._errors)}set errors(X){this._errors=X}raiseEarlyExitException(X,me,He){const We=this.getCurrRuleFullName(),ft=this.getGAstProductions()[We],zt=Wd(X,ft,me,this.maxLookahead)[0],en=[];for(let po=1;po\u003c=this.maxLookahead;po++)en.push(this.LA(po));const In=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:zt,actual:en,previous:this.LA(0),customUserDescription:He,ruleName:We});throw this.SAVE_ERROR(new Ay(In,this.LA(1),this.LA(0)))}raiseNoAltException(X,me){const He=this.getCurrRuleFullName(),We=this.getGAstProductions()[He],ft=Ff(X,We,this.maxLookahead),wt=[];for(let In=1;In\u003c=this.maxLookahead;In++)wt.push(this.LA(In));const zt=this.LA(0),en=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:ft,actual:wt,previous:zt,customUserDescription:me,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new D_(en,this.LA(1),zt))}}class Gf{initContentAssist(){}computeContentAssist(X,me){const He=this.gastProductionsCache[X];if(cs(He))throw Error(`Rule -\u003e${X}\u003c- does not exist in this grammar.`);return Or([He],me,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(X){const me=Jc(X.ruleStack),We=this.getGAstProductions()[me];return new Eg(We,X).startWalking()}}const X2={description:\"This Object indicates the Parser is during Recording Phase\"};Object.freeze(X2);const Z2=!0,d8=Math.pow(2,jd)-1,f9=Je({name:\"RECORDING_PHASE_TOKEN\",pattern:yu.NA});Sl([f9]);const ex=wn(f9,`This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(ex);const jS={name:`This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class tx{initGastRecorder(X){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(\"Enable Recording\",()=\u003e{for(let X=0;X\u003c10;X++){const me=X\u003e0?X:\"\";this[`CONSUME${me}`]=function(He,We){return this.consumeInternalRecord(He,X,We)},this[`SUBRULE${me}`]=function(He,We){return this.subruleInternalRecord(He,X,We)},this[`OPTION${me}`]=function(He){return this.optionInternalRecord(He,X)},this[`OR${me}`]=function(He){return this.orInternalRecord(He,X)},this[`MANY${me}`]=function(He){this.manyInternalRecord(X,He)},this[`MANY_SEP${me}`]=function(He){this.manySepFirstInternalRecord(X,He)},this[`AT_LEAST_ONE${me}`]=function(He){this.atLeastOneInternalRecord(X,He)},this[`AT_LEAST_ONE_SEP${me}`]=function(He){this.atLeastOneSepFirstInternalRecord(X,He)}}this.consume=function(X,me,He){return this.consumeInternalRecord(me,X,He)},this.subrule=function(X,me,He){return this.subruleInternalRecord(me,X,He)},this.option=function(X,me){return this.optionInternalRecord(me,X)},this.or=function(X,me){return this.orInternalRecord(me,X)},this.many=function(X,me){this.manyInternalRecord(X,me)},this.atLeastOne=function(X,me){this.atLeastOneInternalRecord(X,me)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(\"Deleting Recording methods\",()=\u003e{const X=this;for(let me=0;me\u003c10;me++){const He=me\u003e0?me:\"\";delete X[`CONSUME${He}`],delete X[`SUBRULE${He}`],delete X[`OPTION${He}`],delete X[`OR${He}`],delete X[`MANY${He}`],delete X[`MANY_SEP${He}`],delete X[`AT_LEAST_ONE${He}`],delete X[`AT_LEAST_ONE_SEP${He}`]}delete X.consume,delete X.subrule,delete X.option,delete X.or,delete X.many,delete X.atLeastOne,delete X.ACTION,delete X.BACKTRACK,delete X.LA})}ACTION_RECORD(X){}BACKTRACK_RECORD(X,me){return()=\u003e!0}LA_RECORD(X){return _5}topLevelRuleRecord(X,me){try{const He=new $g({definition:[],name:X});return He.name=X,this.recordingProdStack.push(He),me.call(this),this.recordingProdStack.pop(),He}catch(He){if(He.KNOWN_RECORDER_ERROR!==!0)try{He.message=He.message+`\n\t This error was thrown during the \"grammar recording phase\" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw He}throw He}}optionInternalRecord(X,me){return fs.call(this,Za,X,me)}atLeastOneInternalRecord(X,me){fs.call(this,Vs,me,X)}atLeastOneSepFirstInternalRecord(X,me){fs.call(this,fu,me,X,Z2)}manyInternalRecord(X,me){fs.call(this,Si,me,X)}manySepFirstInternalRecord(X,me){fs.call(this,lp,me,X,Z2)}orInternalRecord(X,me){return Ec.call(this,X,me)}subruleInternalRecord(X,me,He){if(iC(me),!X||ai(X,\"ruleName\")===!1){const zt=new Error(`\u003cSUBRULE${u0(me)}\u003e argument is invalid expecting a Parser method reference but got: \u003c${JSON.stringify(X)}\u003e\n inside top level rule: \u003c${this.recordingProdStack[0].name}\u003e`);throw zt.KNOWN_RECORDER_ERROR=!0,zt}const We=GI(this.recordingProdStack),ft=X.ruleName,wt=new za({idx:me,nonTerminalName:ft,label:He?.LABEL,referencedRule:void 0});return We.definition.push(wt),this.outputCst?jS:X2}consumeInternalRecord(X,me,He){if(iC(me),!Vl(X)){const wt=new Error(`\u003cCONSUME${u0(me)}\u003e argument is invalid expecting a TokenType reference but got: \u003c${JSON.stringify(X)}\u003e\n inside top level rule: \u003c${this.recordingProdStack[0].name}\u003e`);throw wt.KNOWN_RECORDER_ERROR=!0,wt}const We=GI(this.recordingProdStack),ft=new $c({idx:me,terminalType:X,label:He?.LABEL});return We.definition.push(ft),ex}}function fs(re,X,me,He=!1){iC(me);const We=GI(this.recordingProdStack),ft=ye(X)?X:X.DEF,wt=new re({definition:[],idx:me});return He\u0026\u0026(wt.separator=X.SEP),ai(X,\"MAX_LOOKAHEAD\")\u0026\u0026(wt.maxLookahead=X.MAX_LOOKAHEAD),this.recordingProdStack.push(wt),ft.call(this),We.definition.push(wt),this.recordingProdStack.pop(),X2}function Ec(re,X){iC(X);const me=GI(this.recordingProdStack),He=B(re)===!1,We=He===!1?re:re.DEF,ft=new c0({definition:[],idx:X,ignoreAmbiguities:He\u0026\u0026re.IGNORE_AMBIGUITIES===!0});ai(re,\"MAX_LOOKAHEAD\")\u0026\u0026(ft.maxLookahead=re.MAX_LOOKAHEAD);const wt=f3(We,zt=\u003eye(zt.GATE));return ft.hasPredicates=wt,me.definition.push(ft),zr(We,zt=\u003e{const en=new Xa({definition:[]});ft.definition.push(en),ai(zt,\"IGNORE_AMBIGUITIES\")?en.ignoreAmbiguities=zt.IGNORE_AMBIGUITIES:ai(zt,\"GATE\")\u0026\u0026(en.ignoreAmbiguities=!0),this.recordingProdStack.push(en),zt.ALT.call(this),this.recordingProdStack.pop()}),X2}function u0(re){return re===0?\"\":`${re}`}function iC(re){if(re\u003c0||re\u003ed8){const X=new Error(`Invalid DSL Method idx value: \u003c${re}\u003e\n\tIdx value must be a none negative value smaller than ${d8+1}`);throw X.KNOWN_RECORDER_ERROR=!0,X}}class Th{initPerformanceTracer(X){if(ai(X,\"traceInitPerf\")){const me=X.traceInitPerf,He=typeof me==\"number\";this.traceInitMaxIdent=He?me:1/0,this.traceInitPerf=He?me\u003e0:me}else this.traceInitMaxIdent=0,this.traceInitPerf=Fm.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(X,me){if(this.traceInitPerf===!0){this.traceInitIndent++;const He=new Array(this.traceInitIndent+1).join(\"\t\");this.traceInitIndent\u003cthis.traceInitMaxIdent\u0026\u0026console.log(`${He}--\u003e \u003c${X}\u003e`);const{time:We,value:ft}=cl(me),wt=We\u003e10?console.warn:console.log;return this.traceInitIndent\u003cthis.traceInitMaxIdent\u0026\u0026wt(`${He}\u003c-- \u003c${X}\u003e time: ${We}ms`),this.traceInitIndent--,ft}else return me()}}function nd(re,X){X.forEach(me=\u003e{const He=me.prototype;Object.getOwnPropertyNames(He).forEach(We=\u003e{if(We===\"constructor\")return;const ft=Object.getOwnPropertyDescriptor(He,We);ft\u0026\u0026(ft.get||ft.set)?Object.defineProperty(re.prototype,We,ft):re.prototype[We]=me.prototype[We]})})}const _5=wn(ln,\"\",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(_5);const Fm=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ai,nodeLocationTracking:\"none\",traceInitPerf:!1,skipValidations:!1}),R_=Object.freeze({recoveryValueFunc:()=\u003e{},resyncEnabled:!0});var pp;(function(re){re[re.INVALID_RULE_NAME=0]=\"INVALID_RULE_NAME\",re[re.DUPLICATE_RULE_NAME=1]=\"DUPLICATE_RULE_NAME\",re[re.INVALID_RULE_OVERRIDE=2]=\"INVALID_RULE_OVERRIDE\",re[re.DUPLICATE_PRODUCTIONS=3]=\"DUPLICATE_PRODUCTIONS\",re[re.UNRESOLVED_SUBRULE_REF=4]=\"UNRESOLVED_SUBRULE_REF\",re[re.LEFT_RECURSION=5]=\"LEFT_RECURSION\",re[re.NONE_LAST_EMPTY_ALT=6]=\"NONE_LAST_EMPTY_ALT\",re[re.AMBIGUOUS_ALTS=7]=\"AMBIGUOUS_ALTS\",re[re.CONFLICT_TOKENS_RULES_NAMESPACE=8]=\"CONFLICT_TOKENS_RULES_NAMESPACE\",re[re.INVALID_TOKEN_NAME=9]=\"INVALID_TOKEN_NAME\",re[re.NO_NON_EMPTY_LOOKAHEAD=10]=\"NO_NON_EMPTY_LOOKAHEAD\",re[re.AMBIGUOUS_PREFIX_ALTS=11]=\"AMBIGUOUS_PREFIX_ALTS\",re[re.TOO_MANY_ALTS=12]=\"TOO_MANY_ALTS\",re[re.CUSTOM_LOOKAHEAD_VALIDATION=13]=\"CUSTOM_LOOKAHEAD_VALIDATION\"})(pp||(pp={}));class f5{static performSelfAnalysis(X){throw Error(\"The **static** `performSelfAnalysis` method has been deprecated.\t\\nUse the **instance** method with the same name instead.\")}performSelfAnalysis(){this.TRACE_INIT(\"performSelfAnalysis\",()=\u003e{let X;this.selfAnalysisDone=!0;const me=this.className;this.TRACE_INIT(\"toFastProps\",()=\u003e{Ou(this)}),this.TRACE_INIT(\"Grammar Recording\",()=\u003e{try{this.enableRecording(),zr(this.definedRulesNames,We=\u003e{const wt=this[We].originalGrammarAction;let zt;this.TRACE_INIT(`${We} Rule`,()=\u003e{zt=this.topLevelRuleRecord(We,wt)}),this.gastProductionsCache[We]=zt})}finally{this.disableRecording()}});let He=[];if(this.TRACE_INIT(\"Grammar Resolving\",()=\u003e{He=Tm({rules:Wc(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(He)}),this.TRACE_INIT(\"Grammar Validations\",()=\u003e{if(RA(He)\u0026\u0026this.skipValidations===!1){const We=O1({rules:Wc(this.gastProductionsCache),tokenTypes:Wc(this.tokensMap),errMsgProvider:Ni,grammarName:me}),ft=p5({lookaheadStrategy:this.lookaheadStrategy,rules:Wc(this.gastProductionsCache),tokenTypes:Wc(this.tokensMap),grammarName:me});this.definitionErrors=this.definitionErrors.concat(We,ft)}}),RA(this.definitionErrors)\u0026\u0026(this.recoveryEnabled\u0026\u0026this.TRACE_INIT(\"computeAllProdsFollows\",()=\u003e{const We=WI(Wc(this.gastProductionsCache));this.resyncFollows=We}),this.TRACE_INIT(\"ComputeLookaheadFunctions\",()=\u003e{var We,ft;(ft=(We=this.lookaheadStrategy).initialize)===null||ft===void 0||ft.call(We,{rules:Wc(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Wc(this.gastProductionsCache))})),!f5.DEFER_DEFINITION_ERRORS_HANDLING\u0026\u0026!RA(this.definitionErrors))throw X=Gi(this.definitionErrors,We=\u003eWe.message),new Error(`Parser Definition Errors detected:\n ${X.join(`\n-------------------------------\n`)}`)})}constructor(X,me){this.definitionErrors=[],this.selfAnalysisDone=!1;const He=this;if(He.initErrorHandler(me),He.initLexerAdapter(),He.initLooksAhead(me),He.initRecognizerEngine(X,me),He.initRecoverable(me),He.initTreeBuilder(me),He.initContentAssist(),He.initGastRecorder(me),He.initPerformanceTracer(me),ai(me,\"ignoredIssues\"))throw new Error(`The \u003cignoredIssues\u003e IParserConfig property has been deprecated.\n\tPlease use the \u003cIGNORE_AMBIGUITIES\u003e flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.`);this.skipValidations=ai(me,\"skipValidations\")?me.skipValidations:Fm.skipValidations}}f5.DEFER_DEFINITION_ERRORS_HANDLING=!1,nd(f5,[m9,T4,$2,q2,k4,_9,F4,Gf,tx,Th]);class co extends f5{constructor(X,me=Fm){const He=x0(me);He.outputCst=!0,super(X,He)}}return{CstParser:co,Lexer:yu,createToken:Je}})();class _oi extends x6{constructor(e){super(e)}load(e,n,o,i){const r=this,s=r.path===\"\"?jR.extractUrlBase(e):r.path,a=new fY(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(A){try{n(r.parse(A,s))}catch(c){i?i(c):console.error(c),r.manager.itemError(e)}},o,i)}parse(e,n){const o={};function i(ke){const Ce=r(),Le=new foi(Ce.tokens),Ye=new Ioi(Ce.tokenVocabulary),tt=s(Ye.getBaseCstVisitorConstructor()),At=Le.lex(ke);Ye.input=At.tokens;const at=Ye.vrml();if(Ye.errors.length\u003e0)throw console.error(Ye.errors),Error(\"THREE.VRMLLoader: Parsing errors detected.\");return tt.visit(at)}function r(){const ke=a_({name:\"RouteIdentifier\",pattern:/[^\\x30-\\x39\\0-\\x20\\x22\\x27\\x23\\x2b\\x2c\\x2d\\x2e\\x5b\\x5d\\x5c\\x7b\\x7d][^\\0-\\x20\\x22\\x27\\x23\\x2b\\x2c\\x2d\\x2e\\x5b\\x5d\\x5c\\x7b\\x7d]*[\\.][^\\x30-\\x39\\0-\\x20\\x22\\x27\\x23\\x2b\\x2c\\x2d\\x2e\\x5b\\x5d\\x5c\\x7b\\x7d][^\\0-\\x20\\x22\\x27\\x23\\x2b\\x2c\\x2d\\x2e\\x5b\\x5d\\x5c\\x7b\\x7d]*/}),Ce=a_({name:\"Identifier\",pattern:/[^\\x30-\\x39\\0-\\x20\\x22\\x27\\x23\\x2b\\x2c\\x2d\\x2e\\x5b\\x5d\\x5c\\x7b\\x7d][^\\0-\\x20\\x22\\x27\\x23\\x2b\\x2c\\x2d\\x2e\\x5b\\x5d\\x5c\\x7b\\x7d]*/,longer_alt:ke}),Le=[\"Anchor\",\"Billboard\",\"Collision\",\"Group\",\"Transform\",\"Inline\",\"LOD\",\"Switch\",\"AudioClip\",\"DirectionalLight\",\"PointLight\",\"Script\",\"Shape\",\"Sound\",\"SpotLight\",\"WorldInfo\",\"CylinderSensor\",\"PlaneSensor\",\"ProximitySensor\",\"SphereSensor\",\"TimeSensor\",\"TouchSensor\",\"VisibilitySensor\",\"Box\",\"Cone\",\"Cylinder\",\"ElevationGrid\",\"Extrusion\",\"IndexedFaceSet\",\"IndexedLineSet\",\"PointSet\",\"Sphere\",\"Color\",\"Coordinate\",\"Normal\",\"TextureCoordinate\",\"Appearance\",\"FontStyle\",\"ImageTexture\",\"Material\",\"MovieTexture\",\"PixelTexture\",\"TextureTransform\",\"ColorInterpolator\",\"CoordinateInterpolator\",\"NormalInterpolator\",\"OrientationInterpolator\",\"PositionInterpolator\",\"ScalarInterpolator\",\"Background\",\"Fog\",\"NavigationInfo\",\"Viewpoint\",\"Text\"],Ye=a_({name:\"Version\",pattern:/#VRML.*/,longer_alt:Ce}),tt=a_({name:\"NodeName\",pattern:new RegExp(Le.join(\"|\")),longer_alt:Ce}),At=a_({name:\"DEF\",pattern:/DEF/,longer_alt:Ce}),at=a_({name:\"USE\",pattern:/USE/,longer_alt:Ce}),nt=a_({name:\"ROUTE\",pattern:/ROUTE/,longer_alt:Ce}),gt=a_({name:\"TO\",pattern:/TO/,longer_alt:Ce}),bt=a_({name:\"StringLiteral\",pattern:/\"(?:[^\\\\\"\\n\\r]|\\\\[bfnrtv\"\\\\/]|\\\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*\"/}),Ct=a_({name:\"HexLiteral\",pattern:/0[xX][0-9a-fA-F]+/}),Dt=a_({name:\"NumberLiteral\",pattern:/[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?/}),kt=a_({name:\"TrueLiteral\",pattern:/TRUE/}),it=a_({name:\"FalseLiteral\",pattern:/FALSE/}),Yt=a_({name:\"NullLiteral\",pattern:/NULL/}),pn=a_({name:\"LSquare\",pattern:/\\[/}),be=a_({name:\"RSquare\",pattern:/]/}),et=a_({name:\"LCurly\",pattern:/{/}),It=a_({name:\"RCurly\",pattern:/}/}),Bt=a_({name:\"Comment\",pattern:/#.*/,group:Eke.SKIPPED}),st=[a_({name:\"WhiteSpace\",pattern:/[ ,\\s]/,group:Eke.SKIPPED}),tt,At,at,nt,gt,kt,it,Yt,Ye,Ce,ke,bt,Ct,Dt,pn,be,et,It,Bt],xt={};for(let Xe=0,Ze=st.length;Xe\u003cZe;Xe++){const dt=st[Xe];xt[dt.name]=dt}return{tokens:st,tokenVocabulary:xt}}function s(ke){function Ce(){ke.call(this),this.validateVisitor()}Ce.prototype=Object.assign(Object.create(ke.prototype),{constructor:Ce,vrml:function(Ye){const tt={version:this.visit(Ye.version),nodes:[],routes:[]};for(let At=0,at=Ye.node.length;At\u003cat;At++){const nt=Ye.node[At];tt.nodes.push(this.visit(nt))}if(Ye.route)for(let At=0,at=Ye.route.length;At\u003cat;At++){const nt=Ye.route[At];tt.routes.push(this.visit(nt))}return tt},version:function(Ye){return Ye.Version[0].image},node:function(Ye){const tt={name:Ye.NodeName[0].image,fields:[]};if(Ye.field)for(let At=0,at=Ye.field.length;At\u003cat;At++){const nt=Ye.field[At];tt.fields.push(this.visit(nt))}return Ye.def\u0026\u0026(tt.DEF=this.visit(Ye.def[0])),tt},field:function(Ye){const tt={name:Ye.Identifier[0].image,type:null,values:null};let At;return Ye.singleFieldValue\u0026\u0026(At=this.visit(Ye.singleFieldValue[0])),Ye.multiFieldValue\u0026\u0026(At=this.visit(Ye.multiFieldValue[0])),tt.type=At.type,tt.values=At.values,tt},def:function(Ye){return(Ye.Identifier||Ye.NodeName)[0].image},use:function(Ye){return{USE:(Ye.Identifier||Ye.NodeName)[0].image}},singleFieldValue:function(Ye){return Le(this,Ye)},multiFieldValue:function(Ye){return Le(this,Ye)},route:function(Ye){return{FROM:Ye.RouteIdentifier[0].image,TO:Ye.RouteIdentifier[1].image}}});function Le(Ye,tt){const At={type:null,values:[]};if(tt.node){At.type=\"node\";for(let at=0,nt=tt.node.length;at\u003cnt;at++){const gt=tt.node[at];At.values.push(Ye.visit(gt))}}if(tt.use){At.type=\"use\";for(let at=0,nt=tt.use.length;at\u003cnt;at++){const gt=tt.use[at];At.values.push(Ye.visit(gt))}}if(tt.StringLiteral){At.type=\"string\";for(let at=0,nt=tt.StringLiteral.length;at\u003cnt;at++){const gt=tt.StringLiteral[at];At.values.push(gt.image.replace(/'|\"/g,\"\"))}}if(tt.NumberLiteral){At.type=\"number\";for(let at=0,nt=tt.NumberLiteral.length;at\u003cnt;at++){const gt=tt.NumberLiteral[at];At.values.push(parseFloat(gt.image))}}if(tt.HexLiteral){At.type=\"hex\";for(let at=0,nt=tt.HexLiteral.length;at\u003cnt;at++){const gt=tt.HexLiteral[at];At.values.push(gt.image)}}if(tt.TrueLiteral){At.type=\"boolean\";for(let at=0,nt=tt.TrueLiteral.length;at\u003cnt;at++)tt.TrueLiteral[at].image===\"TRUE\"\u0026\u0026At.values.push(!0)}if(tt.FalseLiteral){At.type=\"boolean\";for(let at=0,nt=tt.FalseLiteral.length;at\u003cnt;at++)tt.FalseLiteral[at].image===\"FALSE\"\u0026\u0026At.values.push(!1)}return tt.NullLiteral\u0026\u0026(At.type=\"null\",tt.NullLiteral.forEach(function(){At.values.push(null)})),At}return new Ce}function a(ke){const Ce=ke.nodes,Le=new KR;for(let Ye=0,tt=Ce.length;Ye\u003ctt;Ye++){const At=Ce[Ye];A(At)}for(let Ye=0,tt=Ce.length;Ye\u003ctt;Ye++){const At=Ce[Ye],at=c(At);at instanceof T0\u0026\u0026Le.add(at),At.name===\"WorldInfo\"\u0026\u0026(Le.userData.worldInfo=at)}return Le}function A(ke){ke.DEF\u0026\u0026(o[ke.DEF]=ke);const Ce=ke.fields;for(let Le=0,Ye=Ce.length;Le\u003cYe;Le++){const tt=Ce[Le];if(tt.type===\"node\"){const At=tt.values;for(let at=0,nt=At.length;at\u003cnt;at++)A(At[at])}}}function c(ke){return ke.USE?O(ke.USE):(ke.build!==void 0||(ke.build=l(ke)),ke.build)}function l(ke){const Ce=ke.name;let Le;switch(Ce){case\"Group\":case\"Transform\":case\"Collision\":Le=u(ke);break;case\"Background\":Le=g(ke);break;case\"Shape\":Le=h(ke);break;case\"Appearance\":Le=d(ke);break;case\"Material\":Le=p(ke);break;case\"ImageTexture\":Le=I(ke);break;case\"PixelTexture\":Le=f(ke);break;case\"TextureTransform\":Le=C(ke);break;case\"IndexedFaceSet\":Le=E(ke);break;case\"IndexedLineSet\":Le=B(ke);break;case\"PointSet\":Le=S(ke);break;case\"Box\":Le=Q(ke);break;case\"Cone\":Le=w(ke);break;case\"Cylinder\":Le=M(ke);break;case\"Sphere\":Le=k(ke);break;case\"ElevationGrid\":Le=R(ke);break;case\"Extrusion\":Le=F(ke);break;case\"Color\":case\"Coordinate\":case\"Normal\":case\"TextureCoordinate\":Le=y(ke);break;case\"WorldInfo\":Le=x(ke);break;case\"Anchor\":case\"Billboard\":case\"Inline\":case\"LOD\":case\"Switch\":case\"AudioClip\":case\"DirectionalLight\":case\"PointLight\":case\"Script\":case\"Sound\":case\"SpotLight\":case\"CylinderSensor\":case\"PlaneSensor\":case\"ProximitySensor\":case\"SphereSensor\":case\"TimeSensor\":case\"TouchSensor\":case\"VisibilitySensor\":case\"Text\":case\"FontStyle\":case\"MovieTexture\":case\"ColorInterpolator\":case\"CoordinateInterpolator\":case\"NormalInterpolator\":case\"OrientationInterpolator\":case\"PositionInterpolator\":case\"ScalarInterpolator\":case\"Fog\":case\"NavigationInfo\":case\"Viewpoint\":break;default:console.warn(\"THREE.VRMLLoader: Unknown node:\",Ce);break}return Le!==void 0\u0026\u0026ke.DEF!==void 0\u0026\u0026Le.hasOwnProperty(\"name\")===!0\u0026\u0026(Le.name=ke.DEF),Le}function u(ke){const Ce=new lh,Le=ke.fields;for(let Ye=0,tt=Le.length;Ye\u003ctt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case\"bboxCenter\":break;case\"bboxSize\":break;case\"center\":break;case\"children\":U(nt,Ce);break;case\"collide\":break;case\"rotation\":const gt=new jt(nt[0],nt[1],nt[2]).normalize(),bt=nt[3];Ce.quaternion.setFromAxisAngle(gt,bt);break;case\"scale\":Ce.scale.set(nt[0],nt[1],nt[2]);break;case\"scaleOrientation\":break;case\"translation\":Ce.position.set(nt[0],nt[1],nt[2]);break;case\"proxy\":break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",at);break}}return Ce}function g(ke){const Ce=new lh;let Le,Ye,tt,At;const at=ke.fields;for(let gt=0,bt=at.length;gt\u003cbt;gt++){const Ct=at[gt],Dt=Ct.name,kt=Ct.values;switch(Dt){case\"groundAngle\":Le=kt;break;case\"groundColor\":Ye=kt;break;case\"backUrl\":break;case\"bottomUrl\":break;case\"frontUrl\":break;case\"leftUrl\":break;case\"rightUrl\":break;case\"topUrl\":break;case\"skyAngle\":tt=kt;break;case\"skyColor\":At=kt;break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",Dt);break}}const nt=1e4;if(At){const gt=new WR(nt,32,16),bt=new fE({fog:!1,side:uI,depthWrite:!1,depthTest:!1});At.length\u003e3?(we(gt,nt,tt,Pe(At),!0),bt.vertexColors=!0):bt.color.setRGB(At[0],At[1],At[2]);const Ct=new Er(gt,bt);Ce.add(Ct)}if(Ye\u0026\u0026Ye.length\u003e0){const gt=new WR(nt,32,16,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),bt=new fE({fog:!1,side:uI,vertexColors:!0,depthWrite:!1,depthTest:!1});we(gt,nt,Le,Pe(Ye),!1);const Ct=new Er(gt,bt);Ce.add(Ct)}return Ce.renderOrder=-1/0,Ce}function h(ke){const Ce=ke.fields;let Le=new fE({color:0}),Ye;for(let At=0,at=Ce.length;At\u003cat;At++){const nt=Ce[At],gt=nt.name,bt=nt.values;switch(gt){case\"appearance\":bt[0]!==null\u0026\u0026(Le=c(bt[0]));break;case\"geometry\":bt[0]!==null\u0026\u0026(Ye=c(bt[0]));break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",gt);break}}let tt;if(Ye\u0026\u0026Ye.attributes.position){const At=Ye._type;if(At===\"points\"){const at=new zR({color:16777215});Ye.attributes.color!==void 0?at.vertexColors=!0:Le.isMeshPhongMaterial\u0026\u0026at.color.copy(Le.emissive),tt=new Wq(Ye,at)}else if(At===\"line\"){const at=new VR({color:16777215});Ye.attributes.color!==void 0?at.vertexColors=!0:Le.isMeshPhongMaterial\u0026\u0026at.color.copy(Le.emissive),tt=new Jq(Ye,at)}else Ye._solid!==void 0\u0026\u0026(Le.side=Ye._solid?mE:r_),Ye.attributes.color!==void 0\u0026\u0026(Le.vertexColors=!0),tt=new Er(Ye,Le)}else tt=new T0,tt.visible=!1;return tt}function d(ke){let Ce=new ike,Le;const Ye=ke.fields;for(let tt=0,At=Ye.length;tt\u003cAt;tt++){const at=Ye[tt],nt=at.name,gt=at.values;switch(nt){case\"material\":if(gt[0]!==null){const Ct=c(gt[0]);Ct.diffuseColor\u0026\u0026Ce.color.copy(Ct.diffuseColor),Ct.emissiveColor\u0026\u0026Ce.emissive.copy(Ct.emissiveColor),Ct.shininess\u0026\u0026(Ce.shininess=Ct.shininess),Ct.specularColor\u0026\u0026Ce.specular.copy(Ct.specularColor),Ct.transparency\u0026\u0026(Ce.opacity=1-Ct.transparency),Ct.transparency\u003e0\u0026\u0026(Ce.transparent=!0)}else Ce=new fE({color:0});break;case\"texture\":const bt=gt[0];bt!==null\u0026\u0026(bt.name===\"ImageTexture\"||bt.name===\"PixelTexture\")\u0026\u0026(Ce.map=c(bt));break;case\"textureTransform\":gt[0]!==null\u0026\u0026(Le=c(gt[0]));break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",nt);break}}if(Ce.map){if(Ce.map.__type){switch(Ce.map.__type){case zB.INTENSITY_ALPHA:Ce.opacity=1;break;case zB.RGB:Ce.color.set(16777215);break;case zB.RGBA:Ce.color.set(16777215),Ce.opacity=1;break}delete Ce.map.__type}Le\u0026\u0026(Ce.map.center.copy(Le.center),Ce.map.rotation=Le.rotation,Ce.map.repeat.copy(Le.scale),Ce.map.offset.copy(Le.translation))}return Ce}function p(ke){const Ce={},Le=ke.fields;for(let Ye=0,tt=Le.length;Ye\u003ctt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case\"ambientIntensity\":break;case\"diffuseColor\":Ce.diffuseColor=new Vi(nt[0],nt[1],nt[2]);break;case\"emissiveColor\":Ce.emissiveColor=new Vi(nt[0],nt[1],nt[2]);break;case\"shininess\":Ce.shininess=nt[0];break;case\"specularColor\":Ce.emissiveColor=new Vi(nt[0],nt[1],nt[2]);break;case\"transparency\":Ce.transparency=nt[0];break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",at);break}}return Ce}function m(ke,Ce,Le){let Ye;switch(Ce){case zB.INTENSITY:Ye=parseInt(ke),Le.r=Ye,Le.g=Ye,Le.b=Ye,Le.a=1;break;case zB.INTENSITY_ALPHA:Ye=parseInt(\"0x\"+ke.substring(2,4)),Le.r=Ye,Le.g=Ye,Le.b=Ye,Le.a=parseInt(\"0x\"+ke.substring(4,6));break;case zB.RGB:Le.r=parseInt(\"0x\"+ke.substring(2,4)),Le.g=parseInt(\"0x\"+ke.substring(4,6)),Le.b=parseInt(\"0x\"+ke.substring(6,8)),Le.a=1;break;case zB.RGBA:Le.r=parseInt(\"0x\"+ke.substring(2,4)),Le.g=parseInt(\"0x\"+ke.substring(4,6)),Le.b=parseInt(\"0x\"+ke.substring(6,8)),Le.a=parseInt(\"0x\"+ke.substring(8,10));break}}function _(ke){let Ce;switch(ke){case 1:Ce=zB.INTENSITY;break;case 2:Ce=zB.INTENSITY_ALPHA;break;case 3:Ce=zB.RGB;break;case 4:Ce=zB.RGBA;break}return Ce}function f(ke){let Ce,Le=c4,Ye=c4;const tt=ke.fields;for(let At=0,at=tt.length;At\u003cat;At++){const nt=tt[At],gt=nt.name,bt=nt.values;switch(gt){case\"image\":const Ct=bt[0],Dt=bt[1],kt=bt[2],it=_(kt),Yt=new Uint8Array(4*Ct*Dt),pn={r:0,g:0,b:0,a:0};for(let be=3,et=0,It=bt.length;be\u003cIt;be++,et++){m(bt[be],it,pn);const Bt=et*4;Yt[Bt+0]=pn.r,Yt[Bt+1]=pn.g,Yt[Bt+2]=pn.b,Yt[Bt+3]=pn.a}Ce=new OTe(Yt,Ct,Dt),Ce.needsUpdate=!0,Ce.__type=it;break;case\"repeatS\":bt[0]===!1\u0026\u0026(Le=Xy);break;case\"repeatT\":bt[0]===!1\u0026\u0026(Ye=Xy);break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",gt);break}}return Ce\u0026\u0026(Ce.wrapS=Le,Ce.wrapT=Ye),Ce}function I(ke){let Ce,Le=c4,Ye=c4;const tt=ke.fields;for(let At=0,at=tt.length;At\u003cat;At++){const nt=tt[At],gt=nt.name,bt=nt.values;switch(gt){case\"url\":const Ct=bt[0];Ct\u0026\u0026(Ce=Te.load(Ct));break;case\"repeatS\":bt[0]===!1\u0026\u0026(Le=Xy);break;case\"repeatT\":bt[0]===!1\u0026\u0026(Ye=Xy);break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",gt);break}}return Ce\u0026\u0026(Ce.wrapS=Le,Ce.wrapT=Ye),Ce}function C(ke){const Ce={center:new ni,rotation:new ni,scale:new ni,translation:new ni},Le=ke.fields;for(let Ye=0,tt=Le.length;Ye\u003ctt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case\"center\":Ce.center.set(nt[0],nt[1]);break;case\"rotation\":Ce.rotation=nt[0];break;case\"scale\":Ce.scale.set(nt[0],nt[1]);break;case\"translation\":Ce.translation.set(nt[0],nt[1]);break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",at);break}}return Ce}function y(ke){return ke.fields[0].values}function x(ke){const Ce={},Le=ke.fields;for(let Ye=0,tt=Le.length;Ye\u003ctt;Ye++){const At=Le[Ye],at=At.name,nt=At.values;switch(at){case\"title\":Ce.title=nt[0];break;case\"info\":Ce.info=nt;break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",at);break}}return Ce}function E(ke){let Ce,Le,Ye,tt,At=!0,at=!0,nt=0,gt,bt,Ct,Dt,kt=!0,it=!0;const Yt=ke.fields;for(let st=0,xt=Yt.length;st\u003cxt;st++){const Xe=Yt[st],Ze=Xe.name,dt=Xe.values;switch(Ze){case\"color\":const Ut=dt[0];Ut!==null\u0026\u0026(Ce=c(Ut));break;case\"coord\":const Wt=dt[0];Wt!==null\u0026\u0026(Le=c(Wt));break;case\"normal\":const Xt=dt[0];Xt!==null\u0026\u0026(Ye=c(Xt));break;case\"texCoord\":const Jt=dt[0];Jt!==null\u0026\u0026(tt=c(Jt));break;case\"ccw\":At=dt[0];break;case\"colorIndex\":gt=dt;break;case\"colorPerVertex\":kt=dt[0];break;case\"convex\":break;case\"coordIndex\":bt=dt;break;case\"creaseAngle\":nt=dt[0];break;case\"normalIndex\":Ct=dt;break;case\"normalPerVertex\":it=dt[0];break;case\"solid\":at=dt[0];break;case\"texCoordIndex\":Dt=dt;break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",Ze);break}}if(bt===void 0)return console.warn(\"THREE.VRMLLoader: Missing coordIndex.\"),new Zl;const pn=Y(bt,At);let be,et,It;if(Ce)if(kt===!0)if(gt\u0026\u0026gt.length\u003e0){const st=Y(gt,At);be=ue(pn,st,Ce,3)}else be=ye(pn,new Bs(Ce,3));else if(gt\u0026\u0026gt.length\u003e0){const st=te(Ce,gt),xt=W(st,bt);be=fe(pn,xt)}else{const st=W(Ce,bt);be=fe(pn,st)}if(Ye)if(it===!0)if(Ct\u0026\u0026Ct.length\u003e0){const st=Y(Ct,At);et=ue(pn,st,Ye,3)}else et=ye(pn,new Bs(Ye,3));else if(Ct\u0026\u0026Ct.length\u003e0){const st=te(Ye,Ct),xt=W(st,bt);et=fe(pn,xt)}else{const st=W(Ye,bt);et=fe(pn,st)}else et=he(pn,Le,nt);if(tt)if(Dt\u0026\u0026Dt.length\u003e0){const st=Y(Dt,At);It=ue(pn,st,tt,2)}else It=ye(pn,new Bs(tt,2));const Bt=new Zl,mt=ye(pn,new Bs(Le,3));return Bt.setAttribute(\"position\",mt),Bt.setAttribute(\"normal\",et),be\u0026\u0026Bt.setAttribute(\"color\",be),It\u0026\u0026Bt.setAttribute(\"uv\",It),Bt._solid=at,Bt._type=\"mesh\",Bt}function B(ke){let Ce,Le,Ye,tt,At=!0;const at=ke.fields;for(let Dt=0,kt=at.length;Dt\u003ckt;Dt++){const it=at[Dt],Yt=it.name,pn=it.values;switch(Yt){case\"color\":const be=pn[0];be!==null\u0026\u0026(Ce=c(be));break;case\"coord\":const et=pn[0];et!==null\u0026\u0026(Le=c(et));break;case\"colorIndex\":Ye=pn;break;case\"colorPerVertex\":At=pn[0];break;case\"coordIndex\":tt=pn;break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",Yt);break}}let nt;const gt=j(tt);if(Ce)if(At===!0)if(Ye.length\u003e0){const Dt=j(Ye);nt=ue(gt,Dt,Ce,3)}else nt=ye(gt,new Bs(Ce,3));else if(Ye.length\u003e0){const Dt=te(Ce,Ye),kt=J(Dt,tt);nt=pe(gt,kt)}else{const Dt=J(Ce,tt);nt=pe(gt,Dt)}const bt=new Zl,Ct=ye(gt,new Bs(Le,3));return bt.setAttribute(\"position\",Ct),nt\u0026\u0026bt.setAttribute(\"color\",nt),bt._type=\"line\",bt}function S(ke){let Ce,Le;const Ye=ke.fields;for(let At=0,at=Ye.length;At\u003cat;At++){const nt=Ye[At],gt=nt.name,bt=nt.values;switch(gt){case\"color\":const Ct=bt[0];Ct!==null\u0026\u0026(Ce=c(Ct));break;case\"coord\":const Dt=bt[0];Dt!==null\u0026\u0026(Le=c(Dt));break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",gt);break}}const tt=new Zl;return tt.setAttribute(\"position\",new Bs(Le,3)),Ce\u0026\u0026tt.setAttribute(\"color\",new Bs(Ce,3)),tt._type=\"points\",tt}function Q(ke){const Ce=new jt(2,2,2),Le=ke.fields;for(let tt=0,At=Le.length;tt\u003cAt;tt++){const at=Le[tt],nt=at.name,gt=at.values;nt===\"size\"?(Ce.x=gt[0],Ce.y=gt[1],Ce.z=gt[2]):console.warn(\"THREE.VRMLLoader: Unknown field:\",nt)}return new Yx(Ce.x,Ce.y,Ce.z)}function w(ke){let Ce=1,Le=2,Ye=!1;const tt=ke.fields;for(let at=0,nt=tt.length;at\u003cnt;at++){const gt=tt[at],bt=gt.name,Ct=gt.values;switch(bt){case\"bottom\":Ye=!Ct[0];break;case\"bottomRadius\":Ce=Ct[0];break;case\"height\":Le=Ct[0];break;case\"side\":break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",bt);break}}return new ZTe(Ce,Le,16,1,Ye)}function M(ke){let Ce=1,Le=2;const Ye=ke.fields;for(let At=0,at=Ye.length;At\u003cat;At++){const nt=Ye[At],gt=nt.name,bt=nt.values;switch(gt){case\"bottom\":break;case\"radius\":Ce=bt[0];break;case\"height\":Le=bt[0];break;case\"side\":break;case\"top\":break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",gt);break}}return new lY(Ce,Ce,Le,16,1)}function k(ke){let Ce=1;const Le=ke.fields;for(let tt=0,At=Le.length;tt\u003cAt;tt++){const at=Le[tt],nt=at.name,gt=at.values;nt===\"radius\"?Ce=gt[0]:console.warn(\"THREE.VRMLLoader: Unknown field:\",nt)}return new WR(Ce,16,16)}function R(ke){let Ce,Le,Ye,tt,At=!0,at=!0,nt=!0,gt=!0,bt=0,Ct=2,Dt=2,kt=1,it=1;const Yt=ke.fields;for(let dt=0,Ut=Yt.length;dt\u003cUt;dt++){const Wt=Yt[dt],Xt=Wt.name,Jt=Wt.values;switch(Xt){case\"color\":const yn=Jt[0];yn!==null\u0026\u0026(Ce=c(yn));break;case\"normal\":const An=Jt[0];An!==null\u0026\u0026(Le=c(An));break;case\"texCoord\":const kn=Jt[0];kn!==null\u0026\u0026(Ye=c(kn));break;case\"height\":tt=Jt;break;case\"ccw\":gt=Jt[0];break;case\"colorPerVertex\":At=Jt[0];break;case\"creaseAngle\":bt=Jt[0];break;case\"normalPerVertex\":at=Jt[0];break;case\"solid\":nt=Jt[0];break;case\"xDimension\":Ct=Jt[0];break;case\"xSpacing\":kt=Jt[0];break;case\"zDimension\":Dt=Jt[0];break;case\"zSpacing\":it=Jt[0];break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",Xt);break}}const pn=[],be=[],et=[],It=[];for(let dt=0;dt\u003cDt;dt++)for(let Ut=0;Ut\u003cCt;Ut++){const Wt=dt*Ct+Ut,Xt=kt*dt,Jt=tt[Wt],yn=it*Ut;if(pn.push(Xt,Jt,yn),Ce\u0026\u0026At===!0){const An=Ce[Wt*3+0],kn=Ce[Wt*3+1],$n=Ce[Wt*3+2];et.push(An,kn,$n)}if(Le\u0026\u0026at===!0){const An=Le[Wt*3+0],kn=Le[Wt*3+1],$n=Le[Wt*3+2];be.push(An,kn,$n)}if(Ye){const An=Ye[Wt*2+0],kn=Ye[Wt*2+1];It.push(An,kn)}else It.push(dt/(Ct-1),Ut/(Dt-1))}const Bt=[];for(let dt=0;dt\u003cCt-1;dt++)for(let Ut=0;Ut\u003cDt-1;Ut++){const Wt=dt+Ut*Ct,Xt=dt+(Ut+1)*Ct,Jt=dt+1+(Ut+1)*Ct,yn=dt+1+Ut*Ct;gt===!0?(Bt.push(Wt,Jt,Xt),Bt.push(Jt,Wt,yn)):(Bt.push(Wt,Xt,Jt),Bt.push(Jt,yn,Wt))}const mt=ye(Bt,new Bs(pn,3)),st=ye(Bt,new Bs(It,2));let xt,Xe;if(Ce)if(At===!1){for(let dt=0;dt\u003cCt-1;dt++)for(let Ut=0;Ut\u003cDt-1;Ut++){const Wt=dt+Ut*(Ct-1),Xt=Ce[Wt*3+0],Jt=Ce[Wt*3+1],yn=Ce[Wt*3+2];et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn),et.push(Xt,Jt,yn)}xt=new Bs(et,3)}else xt=ye(Bt,new Bs(et,3));if(Le)if(at===!1){for(let dt=0;dt\u003cCt-1;dt++)for(let Ut=0;Ut\u003cDt-1;Ut++){const Wt=dt+Ut*(Ct-1),Xt=Le[Wt*3+0],Jt=Le[Wt*3+1],yn=Le[Wt*3+2];be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn),be.push(Xt,Jt,yn)}Xe=new Bs(be,3)}else Xe=ye(Bt,new Bs(be,3));else Xe=he(Bt,pn,bt);const Ze=new Zl;return Ze.setAttribute(\"position\",mt),Ze.setAttribute(\"normal\",Xe),Ze.setAttribute(\"uv\",st),xt\u0026\u0026Ze.setAttribute(\"color\",xt),Ze._solid=nt,Ze._type=\"mesh\",Ze}function F(ke){let Ce=[1,1,1,-1,-1,-1,-1,1,1,1],Le=[0,0,0,0,1,0],Ye,tt,At=!0,at=!0,nt=0,gt=!0,bt=!0;const Ct=ke.fields;for(let Ze=0,dt=Ct.length;Ze\u003cdt;Ze++){const Ut=Ct[Ze],Wt=Ut.name,Xt=Ut.values;switch(Wt){case\"beginCap\":At=Xt[0];break;case\"ccw\":at=Xt[0];break;case\"convex\":break;case\"creaseAngle\":nt=Xt[0];break;case\"crossSection\":Ce=Xt;break;case\"endCap\":gt=Xt[0];break;case\"orientation\":tt=Xt;break;case\"scale\":Ye=Xt;break;case\"solid\":bt=Xt[0];break;case\"spine\":Le=Xt;break;default:console.warn(\"THREE.VRMLLoader: Unknown field:\",Wt);break}}const Dt=Ce[0]===Ce[Ce.length-2]\u0026\u0026Ce[1]===Ce[Ce.length-1],kt=[],it=new jt,Yt=new jt,pn=new jt,be=new jt,et=new Zy;for(let Ze=0,dt=0,Ut=0,Wt=Le.length;Ze\u003cWt;Ze+=3,dt+=2,Ut+=4){it.fromArray(Le,Ze),Yt.x=Ye?Ye[dt+0]:1,Yt.y=1,Yt.z=Ye?Ye[dt+1]:1,pn.x=tt?tt[Ut+0]:0,pn.y=tt?tt[Ut+1]:0,pn.z=tt?tt[Ut+2]:1;const Xt=tt?tt[Ut+3]:0;for(let Jt=0,yn=Ce.length;Jt\u003cyn;Jt+=2)be.x=Ce[Jt+0],be.y=0,be.z=Ce[Jt+1],be.multiply(Yt),et.setFromAxisAngle(pn,Xt),be.applyQuaternion(et),be.add(it),kt.push(be.x,be.y,be.z)}const It=[],Bt=Le.length/3,mt=Ce.length/2;for(let Ze=0;Ze\u003cBt-1;Ze++)for(let dt=0;dt\u003cmt-1;dt++){const Ut=dt+Ze*mt;let Wt=dt+1+Ze*mt;const Xt=dt+(Ze+1)*mt;let Jt=dt+1+(Ze+1)*mt;dt===mt-2\u0026\u0026Dt===!0\u0026\u0026(Wt=Ze*mt,Jt=(Ze+1)*mt),at===!0?(It.push(Ut,Wt,Xt),It.push(Xt,Wt,Jt)):(It.push(Ut,Xt,Wt),It.push(Xt,Jt,Wt))}if(At===!0||gt===!0){const Ze=[];for(let Wt=0,Xt=Ce.length;Wt\u003cXt;Wt+=2)Ze.push(new ni(Ce[Wt],Ce[Wt+1]));const dt=gY.triangulateShape(Ze,[]),Ut=[];for(let Wt=0,Xt=dt.length;Wt\u003cXt;Wt++){const Jt=dt[Wt];Ut.push(Jt[0],Jt[1],Jt[2])}if(At===!0)for(let Wt=0,Xt=Ut.length;Wt\u003cXt;Wt+=3)at===!0?It.push(Ut[Wt+0],Ut[Wt+1],Ut[Wt+2]):It.push(Ut[Wt+0],Ut[Wt+2],Ut[Wt+1]);if(gt===!0){const Wt=mt*(Bt-1);for(let Xt=0,Jt=Ut.length;Xt\u003cJt;Xt+=3)at===!0?It.push(Wt+Ut[Xt+0],Wt+Ut[Xt+2],Wt+Ut[Xt+1]):It.push(Wt+Ut[Xt+0],Wt+Ut[Xt+1],Wt+Ut[Xt+2])}}const st=ye(It,new Bs(kt,3)),xt=he(It,kt,nt),Xe=new Zl;return Xe.setAttribute(\"position\",st),Xe.setAttribute(\"normal\",xt),Xe._solid=bt,Xe._type=\"mesh\",Xe}function O(ke){const Ce=o[ke],Le=c(Ce);return Le.isObject3D||Le.isMaterial?Le.clone():Le}function U(ke,Ce){for(let Le=0,Ye=ke.length;Le\u003cYe;Le++){const tt=c(ke[Le]);tt instanceof T0\u0026\u0026Ce.add(tt)}}function Y(ke,Ce){const Le=[];let Ye=0;for(let tt=0,At=ke.length;tt\u003cAt;tt++){const at=ke[Ye],nt=ke[tt+(Ce?1:2)],gt=ke[tt+(Ce?2:1)];Le.push(at,nt,gt),(ke[tt+3]===-1||tt+3\u003e=At)\u0026\u0026(tt+=3,Ye=tt+1)}return Le}function W(ke,Ce){const Le=[];let Ye=0;for(let tt=0,At=Ce.length;tt\u003cAt;tt++){const at=Ye*3,nt=ke[at],gt=ke[at+1],bt=ke[at+2];Le.push(nt,gt,bt),(Ce[tt+3]===-1||tt+3\u003e=At)\u0026\u0026(tt+=3,Ye++)}return Le}function te(ke,Ce){const Le=[];for(let Ye=0,tt=Ce.length;Ye\u003ctt;Ye++){const at=Ce[Ye]*3,nt=ke[at],gt=ke[at+1],bt=ke[at+2];Le.push(nt,gt,bt)}return Le}function j(ke){const Ce=[];for(let Le=0,Ye=ke.length;Le\u003cYe;Le++){const tt=ke[Le],At=ke[Le+1];Ce.push(tt,At),(ke[Le+2]===-1||Le+2\u003e=Ye)\u0026\u0026(Le+=2)}return Ce}function J(ke,Ce){const Le=[];let Ye=0;for(let tt=0,At=Ce.length;tt\u003cAt;tt++){const at=Ye*3,nt=ke[at],gt=ke[at+1],bt=ke[at+2];Le.push(nt,gt,bt),(Ce[tt+2]===-1||tt+2\u003e=At)\u0026\u0026(tt+=2,Ye++)}return Le}const oe=new jt,ie=new jt,ne=new jt,le=new ni,ge=new ni,_e=new ni;function ue(ke,Ce,Le,Ye){const tt=[];for(let At=0,at=ke.length;At\u003cat;At+=3){const nt=Ce[At],gt=Ce[At+1],bt=Ce[At+2];Ye===2?(le.fromArray(Le,nt*Ye),ge.fromArray(Le,gt*Ye),_e.fromArray(Le,bt*Ye),tt.push(le.x,le.y),tt.push(ge.x,ge.y),tt.push(_e.x,_e.y)):(oe.fromArray(Le,nt*Ye),ie.fromArray(Le,gt*Ye),ne.fromArray(Le,bt*Ye),tt.push(oe.x,oe.y,oe.z),tt.push(ie.x,ie.y,ie.z),tt.push(ne.x,ne.y,ne.z))}return new Bs(tt,Ye)}function fe(ke,Ce){const Le=[];for(let Ye=0,tt=0,At=ke.length;Ye\u003cAt;Ye+=3,tt++)oe.fromArray(Ce,tt*3),Le.push(oe.x,oe.y,oe.z),Le.push(oe.x,oe.y,oe.z),Le.push(oe.x,oe.y,oe.z);return new Bs(Le,3)}function pe(ke,Ce){const Le=[];for(let Ye=0,tt=0,At=ke.length;Ye\u003cAt;Ye+=2,tt++)oe.fromArray(Ce,tt*3),Le.push(oe.x,oe.y,oe.z),Le.push(oe.x,oe.y,oe.z);return new Bs(Le,3)}function ye(ke,Ce){const Le=Ce.array,Ye=Ce.itemSize,tt=new Le.constructor(ke.length*Ye);let At=0,at=0;for(let nt=0,gt=ke.length;nt\u003cgt;nt++){At=ke[nt]*Ye;for(let bt=0;bt\u003cYe;bt++)tt[at++]=Le[At++]}return new Bs(tt,Ye)}const Me=new jt,ve=new jt;function he(ke,Ce,Le){const Ye=[],tt={};for(let at=0,nt=ke.length;at\u003cnt;at+=3){const gt=ke[at],bt=ke[at+1],Ct=ke[at+2],Dt=new Coi(gt,bt,Ct);oe.fromArray(Ce,gt*3),ie.fromArray(Ce,bt*3),ne.fromArray(Ce,Ct*3),ve.subVectors(ne,ie),Me.subVectors(oe,ie),ve.cross(Me),ve.normalize(),Dt.normal.copy(ve),tt[gt]===void 0\u0026\u0026(tt[gt]=[]),tt[bt]===void 0\u0026\u0026(tt[bt]=[]),tt[Ct]===void 0\u0026\u0026(tt[Ct]=[]),tt[gt].push(Dt.normal),tt[bt].push(Dt.normal),tt[Ct].push(Dt.normal),Ye.push(Dt)}const At=[];for(let at=0,nt=Ye.length;at\u003cnt;at++){const gt=Ye[at],bt=Qe(tt[gt.a],gt.normal,Le),Ct=Qe(tt[gt.b],gt.normal,Le),Dt=Qe(tt[gt.c],gt.normal,Le);oe.fromArray(Ce,gt.a*3),ie.fromArray(Ce,gt.b*3),ne.fromArray(Ce,gt.c*3),At.push(bt.x,bt.y,bt.z),At.push(Ct.x,Ct.y,Ct.z),At.push(Dt.x,Dt.y,Dt.z)}return new Bs(At,3)}function Qe(ke,Ce,Le){const Ye=new jt;if(Le===0)Ye.copy(Ce);else for(let tt=0,At=ke.length;tt\u003cAt;tt++)ke[tt].angleTo(Ce)\u003cLe\u0026\u0026Ye.add(ke[tt]);return Ye.normalize()}function Pe(ke){const Ce=[];for(let Le=0,Ye=ke.length;Le\u003cYe;Le+=3)Ce.push(new Vi(ke[Le],ke[Le+1],ke[Le+2]));return Ce}function we(ke,Ce,Le,Ye,tt){const At=[],at=tt===!0?0:Math.PI;for(let kt=0,it=Ye.length;kt\u003cit;kt++){let Yt=kt===0?0:Le[kt-1];Yt=tt===!0?Yt:at-Yt;const pn=new jt;pn.setFromSphericalCoords(Ce,Yt,0),At.push(pn)}const nt=ke.index,gt=ke.attributes.position,bt=new tg(new Float32Array(ke.attributes.position.count*3),3),Ct=new jt,Dt=new Vi;for(let kt=0;kt\u003cnt.count;kt++){const it=nt.getX(kt);Ct.fromBufferAttribute(gt,it);let Yt,pn,be=1;for(let Bt=1;Bt\u003cAt.length;Bt++){Yt=Bt-1,pn=Bt;const mt=At[Yt],st=At[pn];if(tt===!0){if(Ct.y\u003c=mt.y\u0026\u0026Ct.y\u003est.y){be=Math.abs(mt.y-Ct.y)/Math.abs(mt.y-st.y);break}}else if(Ct.y\u003e=mt.y\u0026\u0026Ct.y\u003cst.y){be=Math.abs(mt.y-Ct.y)/Math.abs(mt.y-st.y);break}}const et=Ye[Yt],It=Ye[pn];Dt.copy(et).lerp(It,be),bt.setXYZ(it,Dt.r,Dt.g,Dt.b)}ke.setAttribute(\"color\",bt)}const Te=new rke(this.manager);if(Te.setPath(this.resourcePath||n).setCrossOrigin(this.crossOrigin),e.indexOf(\"#VRML V2.0\")===-1)throw Error(\"THREE.VRMLLexer: Version of VRML asset not supported.\");const Re=i(e);return a(Re)}}class foi{constructor(e){this.lexer=new Eke(e)}lex(e){const n=this.lexer.tokenize(e);if(n.errors.length\u003e0)throw console.error(n.errors),Error(\"THREE.VRMLLexer: Lexing errors detected.\");return n}}class Ioi extends moi{constructor(e){super(e);const n=this,o=e.Version,i=e.LCurly,r=e.RCurly,s=e.LSquare,a=e.RSquare,A=e.Identifier,c=e.RouteIdentifier,l=e.StringLiteral,u=e.HexLiteral,g=e.NumberLiteral,h=e.TrueLiteral,d=e.FalseLiteral,p=e.NullLiteral,m=e.DEF,_=e.USE,f=e.ROUTE,I=e.TO,C=e.NodeName;n.RULE(\"vrml\",function(){n.SUBRULE(n.version),n.AT_LEAST_ONE(function(){n.SUBRULE(n.node)}),n.MANY(function(){n.SUBRULE(n.route)})}),n.RULE(\"version\",function(){n.CONSUME(o)}),n.RULE(\"node\",function(){n.OPTION(function(){n.SUBRULE(n.def)}),n.CONSUME(C),n.CONSUME(i),n.MANY(function(){n.SUBRULE(n.field)}),n.CONSUME(r)}),n.RULE(\"field\",function(){n.CONSUME(A),n.OR2([{ALT:function(){n.SUBRULE(n.singleFieldValue)}},{ALT:function(){n.SUBRULE(n.multiFieldValue)}}])}),n.RULE(\"def\",function(){n.CONSUME(m),n.OR([{ALT:function(){n.CONSUME(A)}},{ALT:function(){n.CONSUME(C)}}])}),n.RULE(\"use\",function(){n.CONSUME(_),n.OR([{ALT:function(){n.CONSUME(A)}},{ALT:function(){n.CONSUME(C)}}])}),n.RULE(\"singleFieldValue\",function(){n.AT_LEAST_ONE(function(){n.OR([{ALT:function(){n.SUBRULE(n.node)}},{ALT:function(){n.SUBRULE(n.use)}},{ALT:function(){n.CONSUME(l)}},{ALT:function(){n.CONSUME(u)}},{ALT:function(){n.CONSUME(g)}},{ALT:function(){n.CONSUME(h)}},{ALT:function(){n.CONSUME(d)}},{ALT:function(){n.CONSUME(p)}}])})}),n.RULE(\"multiFieldValue\",function(){n.CONSUME(s),n.MANY(function(){n.OR([{ALT:function(){n.SUBRULE(n.node)}},{ALT:function(){n.SUBRULE(n.use)}},{ALT:function(){n.CONSUME(l)}},{ALT:function(){n.CONSUME(u)}},{ALT:function(){n.CONSUME(g)}},{ALT:function(){n.CONSUME(p)}}])}),n.CONSUME(a)}),n.RULE(\"route\",function(){n.CONSUME(f),n.CONSUME(c),n.CONSUME(I),n.CONSUME2(c)}),this.performSelfAnalysis()}}let Coi=class{constructor(e,n,o){this.a=e,this.b=n,this.c=o,this.normal=new jt}};const zB={INTENSITY:1,INTENSITY_ALPHA:2,RGB:3,RGBA:4},yoi=/^[og]\\s*(.+)?/,xoi=/^mtllib /,Eoi=/^usemtl /,Boi=/^usemap /,MJt=new jt,Bke=new jt,DJt=new jt,NJt=new jt,h4=new jt;function boi(){const t={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,n){if(this.object\u0026\u0026this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=n!==!1;return}const o=this.object\u0026\u0026typeof this.object.currentMaterial==\"function\"?this.object.currentMaterial():void 0;if(this.object\u0026\u0026typeof this.object._finalize==\"function\"\u0026\u0026this.object._finalize(!0),this.object={name:e||\"\",fromDeclaration:n!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(i,r){const s=this._finalize(!1);s\u0026\u0026(s.inherited||s.groupCount\u003c=0)\u0026\u0026this.materials.splice(s.index,1);const a={index:this.materials.length,name:i||\"\",mtllib:Array.isArray(r)\u0026\u0026r.length\u003e0?r[r.length-1]:\"\",smooth:s!==void 0?s.smooth:this.smooth,groupStart:s!==void 0?s.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(A){const c={index:typeof A==\"number\"?A:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length\u003e0)return this.materials[this.materials.length-1]},_finalize:function(i){const r=this.currentMaterial();if(r\u0026\u0026r.groupEnd===-1\u0026\u0026(r.groupEnd=this.geometry.vertices.length/3,r.groupCount=r.groupEnd-r.groupStart,r.inherited=!1),i\u0026\u0026this.materials.length\u003e1)for(let s=this.materials.length-1;s\u003e=0;s--)this.materials[s].groupCount\u003c=0\u0026\u0026this.materials.splice(s,1);return i\u0026\u0026this.materials.length===0\u0026\u0026this.materials.push({name:\"\",smooth:this.smooth}),r}},o\u0026\u0026o.name\u0026\u0026typeof o.clone==\"function\"){const i=o.clone(0);i.inherited=!0,this.object.materials.push(i)}this.objects.push(this.object)},finalize:function(){this.object\u0026\u0026typeof this.object._finalize==\"function\"\u0026\u0026this.object._finalize(!0)},parseVertexIndex:function(e,n){const o=parseInt(e,10);return(o\u003e=0?o-1:o+n/3)*3},parseNormalIndex:function(e,n){const o=parseInt(e,10);return(o\u003e=0?o-1:o+n/3)*3},parseUVIndex:function(e,n){const o=parseInt(e,10);return(o\u003e=0?o-1:o+n/2)*2},addVertex:function(e,n,o){const i=this.vertices,r=this.object.geometry.vertices;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[n+0],i[n+1],i[n+2]),r.push(i[o+0],i[o+1],i[o+2])},addVertexPoint:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addVertexLine:function(e){const n=this.vertices;this.object.geometry.vertices.push(n[e+0],n[e+1],n[e+2])},addNormal:function(e,n,o){const i=this.normals,r=this.object.geometry.normals;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[n+0],i[n+1],i[n+2]),r.push(i[o+0],i[o+1],i[o+2])},addFaceNormal:function(e,n,o){const i=this.vertices,r=this.object.geometry.normals;MJt.fromArray(i,e),Bke.fromArray(i,n),DJt.fromArray(i,o),h4.subVectors(DJt,Bke),NJt.subVectors(MJt,Bke),h4.cross(NJt),h4.normalize(),r.push(h4.x,h4.y,h4.z),r.push(h4.x,h4.y,h4.z),r.push(h4.x,h4.y,h4.z)},addColor:function(e,n,o){const i=this.colors,r=this.object.geometry.colors;i[e]!==void 0\u0026\u0026r.push(i[e+0],i[e+1],i[e+2]),i[n]!==void 0\u0026\u0026r.push(i[n+0],i[n+1],i[n+2]),i[o]!==void 0\u0026\u0026r.push(i[o+0],i[o+1],i[o+2])},addUV:function(e,n,o){const i=this.uvs,r=this.object.geometry.uvs;r.push(i[e+0],i[e+1]),r.push(i[n+0],i[n+1]),r.push(i[o+0],i[o+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const n=this.uvs;this.object.geometry.uvs.push(n[e+0],n[e+1])},addFace:function(e,n,o,i,r,s,a,A,c){const l=this.vertices.length;let u=this.parseVertexIndex(e,l),g=this.parseVertexIndex(n,l),h=this.parseVertexIndex(o,l);if(this.addVertex(u,g,h),this.addColor(u,g,h),a!==void 0\u0026\u0026a!==\"\"){const d=this.normals.length;u=this.parseNormalIndex(a,d),g=this.parseNormalIndex(A,d),h=this.parseNormalIndex(c,d),this.addNormal(u,g,h)}else this.addFaceNormal(u,g,h);if(i!==void 0\u0026\u0026i!==\"\"){const d=this.uvs.length;u=this.parseUVIndex(i,d),g=this.parseUVIndex(r,d),h=this.parseUVIndex(s,d),this.addUV(u,g,h),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type=\"Points\";const n=this.vertices.length;for(let o=0,i=e.length;o\u003ci;o++){const r=this.parseVertexIndex(e[o],n);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(e,n){this.object.geometry.type=\"Line\";const o=this.vertices.length,i=this.uvs.length;for(let r=0,s=e.length;r\u003cs;r++)this.addVertexLine(this.parseVertexIndex(e[r],o));for(let r=0,s=n.length;r\u003cs;r++)this.addUVLine(this.parseUVIndex(n[r],i))}};return t.startObject(\"\",!1),t}class Soi extends x6{constructor(e){super(e),this.materials=null}load(e,n,o,i){const r=this,s=new fY(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(r.parse(a))}catch(A){i?i(A):console.error(A),r.manager.itemError(e)}},o,i)}setMaterials(e){return this.materials=e,this}parse(e){const n=new boi;e.indexOf(`\\r\n`)!==-1\u0026\u0026(e=e.replace(/\\r\\n/g,`\n`)),e.indexOf(`\\\\\n`)!==-1\u0026\u0026(e=e.replace(/\\\\\\n/g,\"\"));const o=e.split(`\n`);let i=\"\",r=\"\",s=0,a=[];const A=typeof\"\".trimLeft==\"function\";for(let u=0,g=o.length;u\u003cg;u++)if(i=o[u],i=A?i.trimLeft():i.trim(),s=i.length,s!==0\u0026\u0026(r=i.charAt(0),r!==\"#\"))if(r===\"v\"){const h=i.split(/\\s+/);switch(h[0]){case\"v\":n.vertices.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3])),h.length\u003e=7?n.colors.push(parseFloat(h[4]),parseFloat(h[5]),parseFloat(h[6])):n.colors.push(void 0,void 0,void 0);break;case\"vn\":n.normals.push(parseFloat(h[1]),parseFloat(h[2]),parseFloat(h[3]));break;case\"vt\":n.uvs.push(parseFloat(h[1]),parseFloat(h[2]));break}}else if(r===\"f\"){const d=i.substr(1).trim().split(/\\s+/),p=[];for(let _=0,f=d.length;_\u003cf;_++){const I=d[_];if(I.length\u003e0){const C=I.split(\"/\");p.push(C)}}const m=p[0];for(let _=1,f=p.length-1;_\u003cf;_++){const I=p[_],C=p[_+1];n.addFace(m[0],I[0],C[0],m[1],I[1],C[1],m[2],I[2],C[2])}}else if(r===\"l\"){const h=i.substring(1).trim().split(\" \");let d=[];const p=[];if(i.indexOf(\"/\")===-1)d=h;else for(let m=0,_=h.length;m\u003c_;m++){const f=h[m].split(\"/\");f[0]!==\"\"\u0026\u0026d.push(f[0]),f[1]!==\"\"\u0026\u0026p.push(f[1])}n.addLineGeometry(d,p)}else if(r===\"p\"){const d=i.substr(1).trim().split(\" \");n.addPointGeometry(d)}else if((a=yoi.exec(i))!==null){const h=(\" \"+a[0].substr(1).trim()).substr(1);n.startObject(h)}else if(Eoi.test(i))n.object.startMaterial(i.substring(7).trim(),n.materialLibraries);else if(xoi.test(i))n.materialLibraries.push(i.substring(7).trim());else if(Boi.test(i))console.warn('THREE.OBJLoader: Rendering identifier \"usemap\" not supported. Textures must be defined in MTL files.');else if(r===\"s\"){if(a=i.split(\" \"),a.length\u003e1){const d=a[1].trim().toLowerCase();n.object.smooth=d!==\"0\"\u0026\u0026d!==\"off\"}else n.object.smooth=!0;const h=n.object.currentMaterial();h\u0026\u0026(h.smooth=n.object.smooth)}else{if(i===\"\\0\")continue;console.warn('THREE.OBJLoader: Unexpected line: \"'+i+'\"')}n.finalize();const c=new lh;if(c.materialLibraries=[].concat(n.materialLibraries),!(n.objects.length===1\u0026\u0026n.objects[0].geometry.vertices.length===0)===!0)for(let u=0,g=n.objects.length;u\u003cg;u++){const h=n.objects[u],d=h.geometry,p=h.materials,m=d.type===\"Line\",_=d.type===\"Points\";let f=!1;if(d.vertices.length===0)continue;const I=new Zl;I.setAttribute(\"position\",new Bs(d.vertices,3)),d.normals.length\u003e0\u0026\u0026I.setAttribute(\"normal\",new Bs(d.normals,3)),d.colors.length\u003e0\u0026\u0026(f=!0,I.setAttribute(\"color\",new Bs(d.colors,3))),d.hasUVIndices===!0\u0026\u0026I.setAttribute(\"uv\",new Bs(d.uvs,2));const C=[];for(let x=0,E=p.length;x\u003cE;x++){const B=p[x],S=B.name+\"_\"+B.smooth+\"_\"+f;let Q=n.materials[S];if(this.materials!==null){if(Q=this.materials.create(B.name),m\u0026\u0026Q\u0026\u0026!(Q instanceof VR)){const w=new VR;Gx.prototype.copy.call(w,Q),w.color.copy(Q.color),Q=w}else if(_\u0026\u0026Q\u0026\u0026!(Q instanceof zR)){const w=new zR({size:10,sizeAttenuation:!1});Gx.prototype.copy.call(w,Q),w.color.copy(Q.color),w.map=Q.map,Q=w}}Q===void 0\u0026\u0026(m?Q=new VR:_?Q=new zR({size:1,sizeAttenuation:!1}):Q=new ike,Q.name=B.name,Q.flatShading=!B.smooth,Q.vertexColors=f,n.materials[S]=Q),C.push(Q)}let y;if(C.length\u003e1){for(let x=0,E=p.length;x\u003cE;x++){const B=p[x];I.addGroup(B.groupStart,B.groupCount,x)}m?y=new Jq(I,C):_?y=new Wq(I,C):y=new Er(I,C)}else m?y=new Jq(I,C[0]):_?y=new Wq(I,C[0]):y=new Er(I,C[0]);y.name=h.name,c.add(y)}else if(n.vertices.length\u003e0){const u=new zR({size:1,sizeAttenuation:!1}),g=new Zl;g.setAttribute(\"position\",new Bs(n.vertices,3)),n.colors.length\u003e0\u0026\u0026n.colors[0]!==void 0\u0026\u0026(g.setAttribute(\"color\",new Bs(n.colors,3)),u.vertexColors=!0);const h=new Wq(g,u);c.add(h)}return c}}const RJt={type:\"change\"},bke={type:\"start\"},TJt={type:\"end\"},mhe=new zG,kJt=new nP,Qoi=Math.cos(70*OG.DEG2RAD);let voi=class extends RR{constructor(e,n){super(),this.object=e,this.domElement=n,this.domElement.style.touchAction=\"none\",this.enabled=!0,this.target=new jt,this.cursor=new jt,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:\"ArrowLeft\",UP:\"ArrowUp\",RIGHT:\"ArrowRight\",BOTTOM:\"ArrowDown\"},this.mouseButtons={LEFT:Vw.ROTATE,MIDDLE:Vw.DOLLY,RIGHT:Vw.PAN},this.touches={ONE:SG.ROTATE,TWO:SG.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(be){be.addEventListener(\"keydown\",at),this._domElementKeyEvents=be},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener(\"keydown\",at),this._domElementKeyEvents=null},this.saveState=function(){o.target0.copy(o.target),o.position0.copy(o.object.position),o.zoom0=o.object.zoom},this.reset=function(){o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),o.dispatchEvent(RJt),o.update(),r=i.NONE},this.update=(function(){const be=new jt,et=new Zy().setFromUnitVectors(e.up,new jt(0,1,0)),It=et.clone().invert(),Bt=new jt,mt=new Zy,st=new jt,xt=2*Math.PI;return function(Ze=null){const dt=o.object.position;be.copy(dt).sub(o.target),be.applyQuaternion(et),a.setFromVector3(be),o.autoRotate\u0026\u0026r===i.NONE\u0026\u0026M(Q(Ze)),o.enableDamping?(a.theta+=A.theta*o.dampingFactor,a.phi+=A.phi*o.dampingFactor):(a.theta+=A.theta,a.phi+=A.phi);let Ut=o.minAzimuthAngle,Wt=o.maxAzimuthAngle;isFinite(Ut)\u0026\u0026isFinite(Wt)\u0026\u0026(Ut\u003c-Math.PI?Ut+=xt:Ut\u003eMath.PI\u0026\u0026(Ut-=xt),Wt\u003c-Math.PI?Wt+=xt:Wt\u003eMath.PI\u0026\u0026(Wt-=xt),Ut\u003c=Wt?a.theta=Math.max(Ut,Math.min(Wt,a.theta)):a.theta=a.theta\u003e(Ut+Wt)/2?Math.max(Ut,a.theta):Math.min(Wt,a.theta)),a.phi=Math.max(o.minPolarAngle,Math.min(o.maxPolarAngle,a.phi)),a.makeSafe(),o.enableDamping===!0?o.target.addScaledVector(l,o.dampingFactor):o.target.add(l),o.target.sub(o.cursor),o.target.clampLength(o.minTargetRadius,o.maxTargetRadius),o.target.add(o.cursor);let Xt=!1;if(o.zoomToCursor\u0026\u0026x||o.object.isOrthographicCamera)a.radius=te(a.radius);else{const Jt=a.radius;a.radius=te(a.radius*c),Xt=Jt!=a.radius}if(be.setFromSpherical(a),be.applyQuaternion(It),dt.copy(o.target).add(be),o.object.lookAt(o.target),o.enableDamping===!0?(A.theta*=1-o.dampingFactor,A.phi*=1-o.dampingFactor,l.multiplyScalar(1-o.dampingFactor)):(A.set(0,0,0),l.set(0,0,0)),o.zoomToCursor\u0026\u0026x){let Jt=null;if(o.object.isPerspectiveCamera){const yn=be.length();Jt=te(yn*c);const An=yn-Jt;o.object.position.addScaledVector(C,An),o.object.updateMatrixWorld(),Xt=!!An}else if(o.object.isOrthographicCamera){const yn=new jt(y.x,y.y,0);yn.unproject(o.object);const An=o.object.zoom;o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/c)),o.object.updateProjectionMatrix(),Xt=An!==o.object.zoom;const kn=new jt(y.x,y.y,0);kn.unproject(o.object),o.object.position.sub(kn).add(yn),o.object.updateMatrixWorld(),Jt=be.length()}else console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.\"),o.zoomToCursor=!1;Jt!==null\u0026\u0026(this.screenSpacePanning?o.target.set(0,0,-1).transformDirection(o.object.matrix).multiplyScalar(Jt).add(o.object.position):(mhe.origin.copy(o.object.position),mhe.direction.set(0,0,-1).transformDirection(o.object.matrix),Math.abs(o.object.up.dot(mhe.direction))\u003cQoi?e.lookAt(o.target):(kJt.setFromNormalAndCoplanarPoint(o.object.up,o.target),mhe.intersectPlane(kJt,o.target))))}else if(o.object.isOrthographicCamera){const Jt=o.object.zoom;o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/c)),Jt!==o.object.zoom\u0026\u0026(o.object.updateProjectionMatrix(),Xt=!0)}return c=1,x=!1,Xt||Bt.distanceToSquared(o.object.position)\u003es||8*(1-mt.dot(o.object.quaternion))\u003es||st.distanceToSquared(o.target)\u003es?(o.dispatchEvent(RJt),Bt.copy(o.object.position),mt.copy(o.object.quaternion),st.copy(o.target),!0):!1}})(),this.dispose=function(){o.domElement.removeEventListener(\"contextmenu\",bt),o.domElement.removeEventListener(\"pointerdown\",Te),o.domElement.removeEventListener(\"pointercancel\",Ee),o.domElement.removeEventListener(\"wheel\",Le),o.domElement.removeEventListener(\"pointermove\",Re),o.domElement.removeEventListener(\"pointerup\",Ee),o.domElement.getRootNode().removeEventListener(\"keydown\",tt,{capture:!0}),o._domElementKeyEvents!==null\u0026\u0026(o._domElementKeyEvents.removeEventListener(\"keydown\",at),o._domElementKeyEvents=null)};const o=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let r=i.NONE;const s=1e-6,a=new dJt,A=new dJt;let c=1;const l=new jt,u=new ni,g=new ni,h=new ni,d=new ni,p=new ni,m=new ni,_=new ni,f=new ni,I=new ni,C=new jt,y=new ni;let x=!1;const E=[],B={};let S=!1;function Q(be){return be!==null?2*Math.PI/60*o.autoRotateSpeed*be:2*Math.PI/60/60*o.autoRotateSpeed}function w(be){const et=Math.abs(be*.01);return Math.pow(.95,o.zoomSpeed*et)}function M(be){A.theta-=be}function k(be){A.phi-=be}const R=(function(){const be=new jt;return function(It,Bt){be.setFromMatrixColumn(Bt,0),be.multiplyScalar(-It),l.add(be)}})(),F=(function(){const be=new jt;return function(It,Bt){o.screenSpacePanning===!0?be.setFromMatrixColumn(Bt,1):(be.setFromMatrixColumn(Bt,0),be.crossVectors(o.object.up,be)),be.multiplyScalar(It),l.add(be)}})(),O=(function(){const be=new jt;return function(It,Bt){const mt=o.domElement;if(o.object.isPerspectiveCamera){const st=o.object.position;be.copy(st).sub(o.target);let xt=be.length();xt*=Math.tan(o.object.fov/2*Math.PI/180),R(2*It*xt/mt.clientHeight,o.object.matrix),F(2*Bt*xt/mt.clientHeight,o.object.matrix)}else o.object.isOrthographicCamera?(R(It*(o.object.right-o.object.left)/o.object.zoom/mt.clientWidth,o.object.matrix),F(Bt*(o.object.top-o.object.bottom)/o.object.zoom/mt.clientHeight,o.object.matrix)):(console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.\"),o.enablePan=!1)}})();function U(be){o.object.isPerspectiveCamera||o.object.isOrthographicCamera?c/=be:(console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\"),o.enableZoom=!1)}function Y(be){o.object.isPerspectiveCamera||o.object.isOrthographicCamera?c*=be:(console.warn(\"WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.\"),o.enableZoom=!1)}function W(be,et){if(!o.zoomToCursor)return;x=!0;const It=o.domElement.getBoundingClientRect(),Bt=be-It.left,mt=et-It.top,st=It.width,xt=It.height;y.x=Bt/st*2-1,y.y=-(mt/xt)*2+1,C.set(y.x,y.y,1).unproject(o.object).sub(o.object.position).normalize()}function te(be){return Math.max(o.minDistance,Math.min(o.maxDistance,be))}function j(be){u.set(be.clientX,be.clientY)}function J(be){W(be.clientX,be.clientX),_.set(be.clientX,be.clientY)}function oe(be){d.set(be.clientX,be.clientY)}function ie(be){g.set(be.clientX,be.clientY),h.subVectors(g,u).multiplyScalar(o.rotateSpeed);const et=o.domElement;M(2*Math.PI*h.x/et.clientHeight),k(2*Math.PI*h.y/et.clientHeight),u.copy(g),o.update()}function ne(be){f.set(be.clientX,be.clientY),I.subVectors(f,_),I.y\u003e0?U(w(I.y)):I.y\u003c0\u0026\u0026Y(w(I.y)),_.copy(f),o.update()}function le(be){p.set(be.clientX,be.clientY),m.subVectors(p,d).multiplyScalar(o.panSpeed),O(m.x,m.y),d.copy(p),o.update()}function ge(be){W(be.clientX,be.clientY),be.deltaY\u003c0?Y(w(be.deltaY)):be.deltaY\u003e0\u0026\u0026U(w(be.deltaY)),o.update()}function _e(be){let et=!1;switch(be.code){case o.keys.UP:be.ctrlKey||be.metaKey||be.shiftKey?k(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(0,o.keyPanSpeed),et=!0;break;case o.keys.BOTTOM:be.ctrlKey||be.metaKey||be.shiftKey?k(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(0,-o.keyPanSpeed),et=!0;break;case o.keys.LEFT:be.ctrlKey||be.metaKey||be.shiftKey?M(2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(o.keyPanSpeed,0),et=!0;break;case o.keys.RIGHT:be.ctrlKey||be.metaKey||be.shiftKey?M(-2*Math.PI*o.rotateSpeed/o.domElement.clientHeight):O(-o.keyPanSpeed,0),et=!0;break}et\u0026\u0026(be.preventDefault(),o.update())}function ue(be){if(E.length===1)u.set(be.pageX,be.pageY);else{const et=Yt(be),It=.5*(be.pageX+et.x),Bt=.5*(be.pageY+et.y);u.set(It,Bt)}}function fe(be){if(E.length===1)d.set(be.pageX,be.pageY);else{const et=Yt(be),It=.5*(be.pageX+et.x),Bt=.5*(be.pageY+et.y);d.set(It,Bt)}}function pe(be){const et=Yt(be),It=be.pageX-et.x,Bt=be.pageY-et.y,mt=Math.sqrt(It*It+Bt*Bt);_.set(0,mt)}function ye(be){o.enableZoom\u0026\u0026pe(be),o.enablePan\u0026\u0026fe(be)}function Me(be){o.enableZoom\u0026\u0026pe(be),o.enableRotate\u0026\u0026ue(be)}function ve(be){if(E.length==1)g.set(be.pageX,be.pageY);else{const It=Yt(be),Bt=.5*(be.pageX+It.x),mt=.5*(be.pageY+It.y);g.set(Bt,mt)}h.subVectors(g,u).multiplyScalar(o.rotateSpeed);const et=o.domElement;M(2*Math.PI*h.x/et.clientHeight),k(2*Math.PI*h.y/et.clientHeight),u.copy(g)}function he(be){if(E.length===1)p.set(be.pageX,be.pageY);else{const et=Yt(be),It=.5*(be.pageX+et.x),Bt=.5*(be.pageY+et.y);p.set(It,Bt)}m.subVectors(p,d).multiplyScalar(o.panSpeed),O(m.x,m.y),d.copy(p)}function Qe(be){const et=Yt(be),It=be.pageX-et.x,Bt=be.pageY-et.y,mt=Math.sqrt(It*It+Bt*Bt);f.set(0,mt),I.set(0,Math.pow(f.y/_.y,o.zoomSpeed)),U(I.y),_.copy(f);const st=(be.pageX+et.x)*.5,xt=(be.pageY+et.y)*.5;W(st,xt)}function Pe(be){o.enableZoom\u0026\u0026Qe(be),o.enablePan\u0026\u0026he(be)}function we(be){o.enableZoom\u0026\u0026Qe(be),o.enableRotate\u0026\u0026ve(be)}function Te(be){o.enabled!==!1\u0026\u0026(E.length===0\u0026\u0026(o.domElement.setPointerCapture(be.pointerId),o.domElement.addEventListener(\"pointermove\",Re),o.domElement.addEventListener(\"pointerup\",Ee)),!kt(be)\u0026\u0026(Ct(be),be.pointerType===\"touch\"?nt(be):ke(be)))}function Re(be){o.enabled!==!1\u0026\u0026(be.pointerType===\"touch\"?gt(be):Ce(be))}function Ee(be){switch(Dt(be),E.length){case 0:o.domElement.releasePointerCapture(be.pointerId),o.domElement.removeEventListener(\"pointermove\",Re),o.domElement.removeEventListener(\"pointerup\",Ee),o.dispatchEvent(TJt),r=i.NONE;break;case 1:const et=E[0],It=B[et];nt({pointerId:et,pageX:It.x,pageY:It.y});break}}function ke(be){let et;switch(be.button){case 0:et=o.mouseButtons.LEFT;break;case 1:et=o.mouseButtons.MIDDLE;break;case 2:et=o.mouseButtons.RIGHT;break;default:et=-1}switch(et){case Vw.DOLLY:if(o.enableZoom===!1)return;J(be),r=i.DOLLY;break;case Vw.ROTATE:if(be.ctrlKey||be.metaKey||be.shiftKey){if(o.enablePan===!1)return;oe(be),r=i.PAN}else{if(o.enableRotate===!1)return;j(be),r=i.ROTATE}break;case Vw.PAN:if(be.ctrlKey||be.metaKey||be.shiftKey){if(o.enableRotate===!1)return;j(be),r=i.ROTATE}else{if(o.enablePan===!1)return;oe(be),r=i.PAN}break;default:r=i.NONE}r!==i.NONE\u0026\u0026o.dispatchEvent(bke)}function Ce(be){switch(r){case i.ROTATE:if(o.enableRotate===!1)return;ie(be);break;case i.DOLLY:if(o.enableZoom===!1)return;ne(be);break;case i.PAN:if(o.enablePan===!1)return;le(be);break}}function Le(be){o.enabled===!1||o.enableZoom===!1||r!==i.NONE||(be.preventDefault(),o.dispatchEvent(bke),ge(Ye(be)),o.dispatchEvent(TJt))}function Ye(be){const et=be.deltaMode,It={clientX:be.clientX,clientY:be.clientY,deltaY:be.deltaY};switch(et){case 1:It.deltaY*=16;break;case 2:It.deltaY*=100;break}return be.ctrlKey\u0026\u0026!S\u0026\u0026(It.deltaY*=10),It}function tt(be){be.key===\"Control\"\u0026\u0026(S=!0,o.domElement.getRootNode().addEventListener(\"keyup\",At,{passive:!0,capture:!0}))}function At(be){be.key===\"Control\"\u0026\u0026(S=!1,o.domElement.getRootNode().removeEventListener(\"keyup\",At,{passive:!0,capture:!0}))}function at(be){o.enabled===!1||o.enablePan===!1||_e(be)}function nt(be){switch(it(be),E.length){case 1:switch(o.touches.ONE){case SG.ROTATE:if(o.enableRotate===!1)return;ue(be),r=i.TOUCH_ROTATE;break;case SG.PAN:if(o.enablePan===!1)return;fe(be),r=i.TOUCH_PAN;break;default:r=i.NONE}break;case 2:switch(o.touches.TWO){case SG.DOLLY_PAN:if(o.enableZoom===!1\u0026\u0026o.enablePan===!1)return;ye(be),r=i.TOUCH_DOLLY_PAN;break;case SG.DOLLY_ROTATE:if(o.enableZoom===!1\u0026\u0026o.enableRotate===!1)return;Me(be),r=i.TOUCH_DOLLY_ROTATE;break;default:r=i.NONE}break;default:r=i.NONE}r!==i.NONE\u0026\u0026o.dispatchEvent(bke)}function gt(be){switch(it(be),r){case i.TOUCH_ROTATE:if(o.enableRotate===!1)return;ve(be),o.update();break;case i.TOUCH_PAN:if(o.enablePan===!1)return;he(be),o.update();break;case i.TOUCH_DOLLY_PAN:if(o.enableZoom===!1\u0026\u0026o.enablePan===!1)return;Pe(be),o.update();break;case i.TOUCH_DOLLY_ROTATE:if(o.enableZoom===!1\u0026\u0026o.enableRotate===!1)return;we(be),o.update();break;default:r=i.NONE}}function bt(be){o.enabled!==!1\u0026\u0026be.preventDefault()}function Ct(be){E.push(be.pointerId)}function Dt(be){delete B[be.pointerId];for(let et=0;et\u003cE.length;et++)if(E[et]==be.pointerId){E.splice(et,1);return}}function kt(be){for(let et=0;et\u003cE.length;et++)if(E[et]==be.pointerId)return!0;return!1}function it(be){let et=B[be.pointerId];et===void 0\u0026\u0026(et=new ni,B[be.pointerId]=et),et.set(be.pageX,be.pageY)}function Yt(be){const et=be.pointerId===E[0]?E[1]:E[0];return B[et]}o.domElement.addEventListener(\"contextmenu\",bt),o.domElement.addEventListener(\"pointerdown\",Te),o.domElement.addEventListener(\"pointercancel\",Ee),o.domElement.addEventListener(\"wheel\",Le,{passive:!1}),o.domElement.getRootNode().addEventListener(\"keydown\",tt,{passive:!0,capture:!0}),this.update()}};var FJt={env:{}};function woi(){var t=Object.create(null);function e(i,r){var s=i.id,a=i.name,A=i.dependencies;A===void 0\u0026\u0026(A=[]);var c=i.init;c===void 0\u0026\u0026(c=function(){});var l=i.getTransferables;if(l===void 0\u0026\u0026(l=null),!t[s])try{A=A.map(function(g){return g\u0026\u0026g.isWorkerModule\u0026\u0026(e(g,function(h){if(h instanceof Error)throw h}),g=t[g.id].value),g}),c=o(\"\u003c\"+a+\"\u003e.init\",c),l\u0026\u0026(l=o(\"\u003c\"+a+\"\u003e.getTransferables\",l));var u=null;typeof c==\"function\"?u=c.apply(void 0,A):console.error(\"worker module init function failed to rehydrate\"),t[s]={id:s,value:u,getTransferables:l},r(u)}catch(g){g\u0026\u0026g.noLog||console.error(g),r(g)}}function n(i,r){var s,a=i.id,A=i.args;(!t[a]||typeof t[a].value!=\"function\")\u0026\u0026r(new Error(\"Worker module \"+a+\": not found or its 'init' did not return a function\"));try{var c=(s=t[a]).value.apply(s,A);c\u0026\u0026typeof c.then==\"function\"?c.then(l,function(u){return r(u instanceof Error?u:new Error(\"\"+u))}):l(c)}catch(u){r(u)}function l(u){try{var g=t[a].getTransferables\u0026\u0026t[a].getTransferables(u);(!g||!Array.isArray(g)||!g.length)\u0026\u0026(g=void 0),r(u,g)}catch(h){console.error(h),r(h)}}}function o(i,r){var s=void 0;self.troikaDefine=function(A){return s=A};var a=URL.createObjectURL(new Blob([\"/** \"+i.replace(/\\*/g,\"\")+` **/\n\ntroikaDefine(\n`+r+`\n)`],{type:\"application/javascript\"}));try{importScripts(a)}catch(A){console.error(A)}return URL.revokeObjectURL(a),delete self.troikaDefine,s}self.addEventListener(\"message\",function(i){var r=i.data,s=r.messageId,a=r.action,A=r.data;try{a===\"registerModule\"\u0026\u0026e(A,function(c){c instanceof Error?postMessage({messageId:s,success:!1,error:c.message}):postMessage({messageId:s,success:!0,result:{isCallable:typeof c==\"function\"}})}),a===\"callModule\"\u0026\u0026n(A,function(c,l){c instanceof Error?postMessage({messageId:s,success:!1,error:c.message}):postMessage({messageId:s,success:!0,result:c},l||void 0)})}catch(c){postMessage({messageId:s,success:!1,error:c.stack})}})}function Poi(t){var e=function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return e._getInitResult().then(function(i){if(typeof i==\"function\")return i.apply(void 0,n);throw new Error(\"Worker module function was called but `init` did not return a callable function\")})};return e._getInitResult=function(){var n=t.dependencies,o=t.init;n=Array.isArray(n)?n.map(function(r){return r\u0026\u0026(r=r.onMainThread||r,r._getInitResult\u0026\u0026(r=r._getInitResult())),r}):[];var i=Promise.all(n).then(function(r){return o.apply(null,r)});return e._getInitResult=function(){return i},i},e}var LJt=function(){var t=!1;if(typeof window\u003c\"u\"\u0026\u0026typeof window.document\u003c\"u\")try{var e=new Worker(URL.createObjectURL(new Blob([\"\"],{type:\"application/javascript\"})));e.terminate(),t=!0}catch(n){typeof FJt\u003c\"u\"\u0026\u0026FJt.env.NODE_ENV===\"test\"||console.log(\"Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: [\"+n.message+\"]\")}return LJt=function(){return t},t},Moi=0,Doi=0,Ske=!1,sX=Object.create(null),aX=Object.create(null),Qke=Object.create(null);function yY(t){if((!t||typeof t.init!=\"function\")\u0026\u0026!Ske)throw new Error(\"requires `options.init` function\");var e=t.dependencies,n=t.init,o=t.getTransferables,i=t.workerId,r=Poi(t);i==null\u0026\u0026(i=\"#default\");var s=\"workerModule\"+ ++Moi,a=t.name||s,A=null;e=e\u0026\u0026e.map(function(l){return typeof l==\"function\"\u0026\u0026!l.workerModuleData\u0026\u0026(Ske=!0,l=yY({workerId:i,name:\"\u003c\"+a+\"\u003e function dependency: \"+l.name,init:`function(){return (\n`+_he(l)+`\n)}`}),Ske=!1),l\u0026\u0026l.workerModuleData\u0026\u0026(l=l.workerModuleData),l});function c(){for(var l=[],u=arguments.length;u--;)l[u]=arguments[u];if(!LJt())return r.apply(void 0,l);if(!A){A=HJt(i,\"registerModule\",c.workerModuleData);var g=function(){A=null,aX[i].delete(g)};(aX[i]||(aX[i]=new Set)).add(g)}return A.then(function(h){var d=h.isCallable;if(d)return HJt(i,\"callModule\",{id:s,args:l});throw new Error(\"Worker module function was called but `init` did not return a callable function\")})}return c.workerModuleData={isWorkerModule:!0,id:s,name:a,dependencies:e,init:_he(n),getTransferables:o\u0026\u0026_he(o)},c.onMainThread=r,c}function Noi(t){aX[t]\u0026\u0026aX[t].forEach(function(e){e()}),sX[t]\u0026\u0026(sX[t].terminate(),delete sX[t])}function _he(t){var e=t.toString();return!/^function/.test(e)\u0026\u0026/^\\w+\\s*\\(/.test(e)\u0026\u0026(e=\"function \"+e),e}function Roi(t){var e=sX[t];if(!e){var n=_he(woi);e=sX[t]=new Worker(URL.createObjectURL(new Blob([\"/** Worker Module Bootstrap: \"+t.replace(/\\*/g,\"\")+` **/\n\n;(`+n+\")()\"],{type:\"application/javascript\"}))),e.onmessage=function(o){var i=o.data,r=i.messageId,s=Qke[r];if(!s)throw new Error(\"WorkerModule response with empty or unknown messageId\");delete Qke[r],s(i)}}return e}function HJt(t,e,n){return new Promise(function(o,i){var r=++Doi;Qke[r]=function(s){s.success?o(s.result):i(new Error(\"Error in worker \"+e+\" call: \"+s.error))},Roi(t).postMessage({messageId:r,action:e,data:n})})}function OJt(){var t=(function(e){function n(W,te,j,J,oe,ie,ne,le){var ge=1-ne;le.x=ge*ge*W+2*ge*ne*j+ne*ne*oe,le.y=ge*ge*te+2*ge*ne*J+ne*ne*ie}function o(W,te,j,J,oe,ie,ne,le,ge,_e){var ue=1-ge;_e.x=ue*ue*ue*W+3*ue*ue*ge*j+3*ue*ge*ge*oe+ge*ge*ge*ne,_e.y=ue*ue*ue*te+3*ue*ue*ge*J+3*ue*ge*ge*ie+ge*ge*ge*le}function i(W,te){for(var j=/([MLQCZ])([^MLQCZ]*)/g,J,oe,ie,ne,le;J=j.exec(W);){var ge=J[2].replace(/^\\s*|\\s*$/g,\"\").split(/[,\\s]+/).map(function(_e){return parseFloat(_e)});switch(J[1]){case\"M\":ne=oe=ge[0],le=ie=ge[1];break;case\"L\":(ge[0]!==ne||ge[1]!==le)\u0026\u0026te(\"L\",ne,le,ne=ge[0],le=ge[1]);break;case\"Q\":{te(\"Q\",ne,le,ne=ge[2],le=ge[3],ge[0],ge[1]);break}case\"C\":{te(\"C\",ne,le,ne=ge[4],le=ge[5],ge[0],ge[1],ge[2],ge[3]);break}case\"Z\":(ne!==oe||le!==ie)\u0026\u0026te(\"L\",ne,le,oe,ie);break}}}function r(W,te,j){j===void 0\u0026\u0026(j=16);var J={x:0,y:0};i(W,function(oe,ie,ne,le,ge,_e,ue,fe,pe){switch(oe){case\"L\":te(ie,ne,le,ge);break;case\"Q\":{for(var ye=ie,Me=ne,ve=1;ve\u003cj;ve++)n(ie,ne,_e,ue,le,ge,ve/(j-1),J),te(ye,Me,J.x,J.y),ye=J.x,Me=J.y;break}case\"C\":{for(var he=ie,Qe=ne,Pe=1;Pe\u003cj;Pe++)o(ie,ne,_e,ue,fe,pe,le,ge,Pe/(j-1),J),te(he,Qe,J.x,J.y),he=J.x,Qe=J.y;break}}})}var s=\"precision highp float;attribute vec2 aUV;varying vec2 vUV;void main(){vUV=aUV;gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}\",a=\"precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){gl_FragColor=texture2D(tex,vUV);}\",A=new WeakMap,c={premultipliedAlpha:!1,preserveDrawingBuffer:!0,antialias:!1,depth:!1};function l(W,te){var j=W.getContext?W.getContext(\"webgl\",c):W,J=A.get(j);if(!J){let ue=function(he){var Qe=ie[he];if(!Qe\u0026\u0026(Qe=ie[he]=j.getExtension(he),!Qe))throw new Error(he+\" not supported\");return Qe},fe=function(he,Qe){var Pe=j.createShader(Qe);return j.shaderSource(Pe,he),j.compileShader(Pe),Pe},pe=function(he,Qe,Pe,we){if(!ne[he]){var Te={},Re={},Ee=j.createProgram();j.attachShader(Ee,fe(Qe,j.VERTEX_SHADER)),j.attachShader(Ee,fe(Pe,j.FRAGMENT_SHADER)),j.linkProgram(Ee),ne[he]={program:Ee,transaction:function(Ce){j.useProgram(Ee),Ce({setUniform:function(Ye,tt){for(var At=[],at=arguments.length-2;at-- \u003e0;)At[at]=arguments[at+2];var nt=Re[tt]||(Re[tt]=j.getUniformLocation(Ee,tt));j[\"uniform\"+Ye].apply(j,[nt].concat(At))},setAttribute:function(Ye,tt,At,at,nt){var gt=Te[Ye];gt||(gt=Te[Ye]={buf:j.createBuffer(),loc:j.getAttribLocation(Ee,Ye),data:null}),j.bindBuffer(j.ARRAY_BUFFER,gt.buf),j.vertexAttribPointer(gt.loc,tt,j.FLOAT,!1,0,0),j.enableVertexAttribArray(gt.loc),oe?j.vertexAttribDivisor(gt.loc,at):ue(\"ANGLE_instanced_arrays\").vertexAttribDivisorANGLE(gt.loc,at),nt!==gt.data\u0026\u0026(j.bufferData(j.ARRAY_BUFFER,nt,At),gt.data=nt)}})}}}ne[he].transaction(we)},ye=function(he,Qe){ge++;try{j.activeTexture(j.TEXTURE0+ge);var Pe=le[he];Pe||(Pe=le[he]=j.createTexture(),j.bindTexture(j.TEXTURE_2D,Pe),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_MIN_FILTER,j.NEAREST),j.texParameteri(j.TEXTURE_2D,j.TEXTURE_MAG_FILTER,j.NEAREST)),j.bindTexture(j.TEXTURE_2D,Pe),Qe(Pe,ge)}finally{ge--}},Me=function(he,Qe,Pe){var we=j.createFramebuffer();_e.push(we),j.bindFramebuffer(j.FRAMEBUFFER,we),j.activeTexture(j.TEXTURE0+Qe),j.bindTexture(j.TEXTURE_2D,he),j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_2D,he,0);try{Pe(we)}finally{j.deleteFramebuffer(we),j.bindFramebuffer(j.FRAMEBUFFER,_e[--_e.length-1]||null)}},ve=function(){ie={},ne={},le={},ge=-1,_e.length=0};var oe=typeof WebGL2RenderingContext\u003c\"u\"\u0026\u0026j instanceof WebGL2RenderingContext,ie={},ne={},le={},ge=-1,_e=[];j.canvas.addEventListener(\"webglcontextlost\",function(he){ve(),he.preventDefault()},!1),A.set(j,J={gl:j,isWebGL2:oe,getExtension:ue,withProgram:pe,withTexture:ye,withTextureFramebuffer:Me,handleContextLoss:ve})}te(J)}function u(W,te,j,J,oe,ie,ne,le){ne===void 0\u0026\u0026(ne=15),le===void 0\u0026\u0026(le=null),l(W,function(ge){var _e=ge.gl,ue=ge.withProgram,fe=ge.withTexture;fe(\"copy\",function(pe,ye){_e.texImage2D(_e.TEXTURE_2D,0,_e.RGBA,oe,ie,0,_e.RGBA,_e.UNSIGNED_BYTE,te),ue(\"copy\",s,a,function(Me){var ve=Me.setUniform,he=Me.setAttribute;he(\"aUV\",2,_e.STATIC_DRAW,0,new Float32Array([0,0,2,0,0,2])),ve(\"1i\",\"image\",ye),_e.bindFramebuffer(_e.FRAMEBUFFER,le||null),_e.disable(_e.BLEND),_e.colorMask(ne\u00268,ne\u00264,ne\u00262,ne\u00261),_e.viewport(j,J,oe,ie),_e.scissor(j,J,oe,ie),_e.drawArrays(_e.TRIANGLES,0,3)})})})}function g(W,te,j){var J=W.width,oe=W.height;l(W,function(ie){var ne=ie.gl,le=new Uint8Array(J*oe*4);ne.readPixels(0,0,J,oe,ne.RGBA,ne.UNSIGNED_BYTE,le),W.width=te,W.height=j,u(ne,le,0,0,J,oe)})}var h=Object.freeze({__proto__:null,withWebGLContext:l,renderImageData:u,resizeWebGLCanvasWithoutClearing:g});function d(W,te,j,J,oe,ie){ie===void 0\u0026\u0026(ie=1);var ne=new Uint8Array(W*te),le=J[2]-J[0],ge=J[3]-J[1],_e=[];r(j,function(he,Qe,Pe,we){_e.push({x1:he,y1:Qe,x2:Pe,y2:we,minX:Math.min(he,Pe),minY:Math.min(Qe,we),maxX:Math.max(he,Pe),maxY:Math.max(Qe,we)})}),_e.sort(function(he,Qe){return he.maxX-Qe.maxX});for(var ue=0;ue\u003cW;ue++)for(var fe=0;fe\u003cte;fe++){var pe=Me(J[0]+le*(ue+.5)/W,J[1]+ge*(fe+.5)/te),ye=Math.pow(1-Math.abs(pe)/oe,ie)/2;pe\u003c0\u0026\u0026(ye=1-ye),ye=Math.max(0,Math.min(255,Math.round(ye*255))),ne[fe*W+ue]=ye}return ne;function Me(he,Qe){for(var Pe=1/0,we=1/0,Te=_e.length;Te--;){var Re=_e[Te];if(Re.maxX+we\u003c=he)break;if(he+we\u003eRe.minX\u0026\u0026Qe-we\u003cRe.maxY\u0026\u0026Qe+we\u003eRe.minY){var Ee=_(he,Qe,Re.x1,Re.y1,Re.x2,Re.y2);Ee\u003cPe\u0026\u0026(Pe=Ee,we=Math.sqrt(Pe))}}return ve(he,Qe)\u0026\u0026(we=-we),we}function ve(he,Qe){for(var Pe=0,we=_e.length;we--;){var Te=_e[we];if(Te.maxX\u003c=he)break;var Re=Te.y1\u003eQe!=Te.y2\u003eQe\u0026\u0026he\u003c(Te.x2-Te.x1)*(Qe-Te.y1)/(Te.y2-Te.y1)+Te.x1;Re\u0026\u0026(Pe+=Te.y1\u003cTe.y2?1:-1)}return Pe!==0}}function p(W,te,j,J,oe,ie,ne,le,ge,_e){ie===void 0\u0026\u0026(ie=1),le===void 0\u0026\u0026(le=0),ge===void 0\u0026\u0026(ge=0),_e===void 0\u0026\u0026(_e=0),m(W,te,j,J,oe,ie,ne,null,le,ge,_e)}function m(W,te,j,J,oe,ie,ne,le,ge,_e,ue){ie===void 0\u0026\u0026(ie=1),ge===void 0\u0026\u0026(ge=0),_e===void 0\u0026\u0026(_e=0),ue===void 0\u0026\u0026(ue=0);for(var fe=d(W,te,j,J,oe,ie),pe=new Uint8Array(fe.length*4),ye=0;ye\u003cfe.length;ye++)pe[ye*4+ue]=fe[ye];u(ne,pe,ge,_e,W,te,1\u003c\u003c3-ue,le)}function _(W,te,j,J,oe,ie){var ne=oe-j,le=ie-J,ge=ne*ne+le*le,_e=ge?Math.max(0,Math.min(1,((W-j)*ne+(te-J)*le)/ge)):0,ue=W-(j+_e*ne),fe=te-(J+_e*le);return ue*ue+fe*fe}var f=Object.freeze({__proto__:null,generate:d,generateIntoCanvas:p,generateIntoFramebuffer:m}),I=\"precision highp float;uniform vec4 uGlyphBounds;attribute vec2 aUV;attribute vec4 aLineSegment;varying vec4 vLineSegment;varying vec2 vGlyphXY;void main(){vLineSegment=aLineSegment;vGlyphXY=mix(uGlyphBounds.xy,uGlyphBounds.zw,aUV);gl_Position=vec4(mix(vec2(-1.0),vec2(1.0),aUV),0.0,1.0);}\",C=\"precision highp float;uniform vec4 uGlyphBounds;uniform float uMaxDistance;uniform float uExponent;varying vec4 vLineSegment;varying vec2 vGlyphXY;float absDistToSegment(vec2 point,vec2 lineA,vec2 lineB){vec2 lineDir=lineB-lineA;float lenSq=dot(lineDir,lineDir);float t=lenSq==0.0 ? 0.0 : clamp(dot(point-lineA,lineDir)/lenSq,0.0,1.0);vec2 linePt=lineA+t*lineDir;return distance(point,linePt);}void main(){vec4 seg=vLineSegment;vec2 p=vGlyphXY;float dist=absDistToSegment(p,seg.xy,seg.zw);float val=pow(1.0-clamp(dist/uMaxDistance,0.0,1.0),uExponent)*0.5;bool crossing=(seg.y\u003ep.y!=seg.w\u003ep.y)\u0026\u0026(p.x\u003c(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing\u0026\u0026vLineSegment.y\u003cvLineSegment.w;gl_FragColor=vec4(crossingUp ? 1.0/255.0 : 0.0,crossing\u0026\u0026!crossingUp ? 1.0/255.0 : 0.0,0.0,val);}\",y=\"precision highp float;uniform sampler2D tex;varying vec2 vUV;void main(){vec4 color=texture2D(tex,vUV);bool inside=color.r!=color.g;float val=inside ? 1.0-color.a : color.a;gl_FragColor=vec4(val);}\",x=new Float32Array([0,0,2,0,0,2]),E=null,B=!1,S={},Q=new WeakMap;function w(W){if(!B\u0026\u0026!F(W))throw new Error(\"WebGL generation not supported\")}function M(W,te,j,J,oe,ie,ne){if(ie===void 0\u0026\u0026(ie=1),ne===void 0\u0026\u0026(ne=null),!ne\u0026\u0026(ne=E,!ne)){var le=typeof OffscreenCanvas==\"function\"?new OffscreenCanvas(1,1):typeof document\u003c\"u\"?document.createElement(\"canvas\"):null;if(!le)throw new Error(\"OffscreenCanvas or DOM canvas not supported\");ne=E=le.getContext(\"webgl\",{depth:!1})}w(ne);var ge=new Uint8Array(W*te*4);l(ne,function(pe){var ye=pe.gl,Me=pe.withTexture,ve=pe.withTextureFramebuffer;Me(\"readable\",function(he,Qe){ye.texImage2D(ye.TEXTURE_2D,0,ye.RGBA,W,te,0,ye.RGBA,ye.UNSIGNED_BYTE,null),ve(he,Qe,function(Pe){R(W,te,j,J,oe,ie,ye,Pe,0,0,0),ye.readPixels(0,0,W,te,ye.RGBA,ye.UNSIGNED_BYTE,ge)})})});for(var _e=new Uint8Array(W*te),ue=0,fe=0;ue\u003cge.length;ue+=4)_e[fe++]=ge[ue];return _e}function k(W,te,j,J,oe,ie,ne,le,ge,_e){ie===void 0\u0026\u0026(ie=1),le===void 0\u0026\u0026(le=0),ge===void 0\u0026\u0026(ge=0),_e===void 0\u0026\u0026(_e=0),R(W,te,j,J,oe,ie,ne,null,le,ge,_e)}function R(W,te,j,J,oe,ie,ne,le,ge,_e,ue){ie===void 0\u0026\u0026(ie=1),ge===void 0\u0026\u0026(ge=0),_e===void 0\u0026\u0026(_e=0),ue===void 0\u0026\u0026(ue=0),w(ne);var fe=[];r(j,function(pe,ye,Me,ve){fe.push(pe,ye,Me,ve)}),fe=new Float32Array(fe),l(ne,function(pe){var ye=pe.gl,Me=pe.isWebGL2,ve=pe.getExtension,he=pe.withProgram,Qe=pe.withTexture,Pe=pe.withTextureFramebuffer,we=pe.handleContextLoss;if(Qe(\"rawDistances\",function(Te,Re){(W!==Te._lastWidth||te!==Te._lastHeight)\u0026\u0026ye.texImage2D(ye.TEXTURE_2D,0,ye.RGBA,Te._lastWidth=W,Te._lastHeight=te,0,ye.RGBA,ye.UNSIGNED_BYTE,null),he(\"main\",I,C,function(Ee){var ke=Ee.setAttribute,Ce=Ee.setUniform,Le=!Me\u0026\u0026ve(\"ANGLE_instanced_arrays\"),Ye=!Me\u0026\u0026ve(\"EXT_blend_minmax\");ke(\"aUV\",2,ye.STATIC_DRAW,0,x),ke(\"aLineSegment\",4,ye.DYNAMIC_DRAW,1,fe),Ce.apply(void 0,[\"4f\",\"uGlyphBounds\"].concat(J)),Ce(\"1f\",\"uMaxDistance\",oe),Ce(\"1f\",\"uExponent\",ie),Pe(Te,Re,function(tt){ye.enable(ye.BLEND),ye.colorMask(!0,!0,!0,!0),ye.viewport(0,0,W,te),ye.scissor(0,0,W,te),ye.blendFunc(ye.ONE,ye.ONE),ye.blendEquationSeparate(ye.FUNC_ADD,Me?ye.MAX:Ye.MAX_EXT),ye.clear(ye.COLOR_BUFFER_BIT),Me?ye.drawArraysInstanced(ye.TRIANGLES,0,3,fe.length/4):Le.drawArraysInstancedANGLE(ye.TRIANGLES,0,3,fe.length/4)})}),he(\"post\",s,y,function(Ee){Ee.setAttribute(\"aUV\",2,ye.STATIC_DRAW,0,x),Ee.setUniform(\"1i\",\"tex\",Re),ye.bindFramebuffer(ye.FRAMEBUFFER,le),ye.disable(ye.BLEND),ye.colorMask(ue===0,ue===1,ue===2,ue===3),ye.viewport(ge,_e,W,te),ye.scissor(ge,_e,W,te),ye.drawArrays(ye.TRIANGLES,0,3)})}),ye.isContextLost())throw we(),new Error(\"webgl context lost\")})}function F(W){var te=!W||W===E?S:W.canvas||W,j=Q.get(te);if(j===void 0){B=!0;var J=null;try{var oe=[97,106,97,61,99,137,118,80,80,118,137,99,61,97,106,97],ie=M(4,4,\"M8,8L16,8L24,24L16,24Z\",[0,0,32,32],24,1,W);j=ie\u0026\u0026oe.length===ie.length\u0026\u0026ie.every(function(ne,le){return ne===oe[le]}),j||(J=\"bad trial run results\",console.info(oe,ie))}catch(ne){j=!1,J=ne.message}J\u0026\u0026console.warn(\"WebGL SDF generation not supported:\",J),B=!1,Q.set(te,j)}return j}var O=Object.freeze({__proto__:null,generate:M,generateIntoCanvas:k,generateIntoFramebuffer:R,isSupported:F});function U(W,te,j,J,oe,ie){oe===void 0\u0026\u0026(oe=Math.max(J[2]-J[0],J[3]-J[1])/2),ie===void 0\u0026\u0026(ie=1);try{return M.apply(O,arguments)}catch(ne){return console.info(\"WebGL SDF generation failed, falling back to JS\",ne),d.apply(f,arguments)}}function Y(W,te,j,J,oe,ie,ne,le,ge,_e){oe===void 0\u0026\u0026(oe=Math.max(J[2]-J[0],J[3]-J[1])/2),ie===void 0\u0026\u0026(ie=1),le===void 0\u0026\u0026(le=0),ge===void 0\u0026\u0026(ge=0),_e===void 0\u0026\u0026(_e=0);try{return k.apply(O,arguments)}catch(ue){return console.info(\"WebGL SDF generation failed, falling back to JS\",ue),p.apply(f,arguments)}}return e.forEachPathCommand=i,e.generate=U,e.generateIntoCanvas=Y,e.javascript=f,e.pathToLineSegments=r,e.webgl=O,e.webglUtils=h,Object.defineProperty(e,\"__esModule\",{value:!0}),e})({});return t}function Toi(){var t=(function(e){var n={R:\"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73\",EN:\"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9\",ES:\"17,2,6dp+1,f+1,av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1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n\",AL:\"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d\",LRO:\"6ct\",RLO:\"6cu\",LRE:\"6cq\",RLE:\"6cr\",PDF:\"6cs\",LRI:\"6ee\",RLI:\"6ef\",FSI:\"6eg\",PDI:\"6eh\"},o={},i={};o.L=1,i[1]=\"L\",Object.keys(n).forEach(function(we,Te){o[we]=1\u003c\u003cTe+1,i[o[we]]=we}),Object.freeze(o);var r=o.LRI|o.RLI|o.FSI,s=o.L|o.R|o.AL,a=o.B|o.S|o.WS|o.ON|o.FSI|o.LRI|o.RLI|o.PDI,A=o.BN|o.RLE|o.LRE|o.RLO|o.LRO|o.PDF,c=o.S|o.WS|o.B|r|o.PDI|A,l=null;function u(){if(!l){l=new Map;var we=0;for(var Te in n)if(n.hasOwnProperty(Te))for(var Re=n[Te],Ee=\"\",ke=void 0,Ce=!1,Le=0,Ye=0;Ye\u003c=Re.length+1;Ye+=1){var tt=Re[Ye];if(tt!==\",\"\u0026\u0026Ye!==Re.length)tt===\"+\"?(Ce=!0,Le=we=Le+parseInt(Ee,36),Ee=\"\"):Ee+=tt;else{Ce?ke=we+parseInt(Ee,36):(Le=we=Le+parseInt(Ee,36),ke=we),Ce=!1,Ee=\"\",Le=ke;for(var At=we;At\u003cke+1;At+=1)l.set(At,o[Te])}}}}function g(we){return u(),l.get(we.codePointAt(0))||o.L}function h(we){return i[g(we)]}var d={pairs:\"14\u003e1,1e\u003e2,u\u003e2,2wt\u003e1,1\u003e1,1ge\u003e1,1wp\u003e1,1j\u003e1,f\u003e1,hm\u003e1,1\u003e1,u\u003e1,u6\u003e1,1\u003e1,+5,28\u003e1,w\u003e1,1\u003e1,+3,b8\u003e1,1\u003e1,+3,1\u003e3,-1\u003e-1,3\u003e1,1\u003e1,+2,1s\u003e1,1\u003e1,x\u003e1,th\u003e1,1\u003e1,+2,db\u003e1,1\u003e1,+3,3\u003e1,1\u003e1,+2,14qm\u003e1,1\u003e1,+1,4q\u003e1,1e\u003e2,u\u003e2,2\u003e1,+1\",canonical:\"6f1\u003e-6dx,6dy\u003e-6dx,6ec\u003e-6ed,6ee\u003e-6ed,6ww\u003e2jj,-2ji\u003e2jj,14r4\u003e-1e7l,1e7m\u003e-1e7l,1e7m\u003e-1e5c,1e5d\u003e-1e5b,1e5c\u003e-14qx,14qy\u003e-14qx,14vn\u003e-1ecg,1ech\u003e-1ecg,1edu\u003e-1ecg,1eci\u003e-1ecg,1eda\u003e-1ecg,1eci\u003e-1ecg,1eci\u003e-168q,168r\u003e-168q,168s\u003e-14ye,14yf\u003e-14ye\"};function p(we,Te){var Re=36,Ee=0,ke=new Map,Ce=Te\u0026\u0026new Map,Le;return we.split(\",\").forEach(function Ye(tt){if(tt.indexOf(\"+\")!==-1)for(var At=+tt;At--;)Ye(Le);else{Le=tt;var at=tt.split(\"\u003e\"),nt=at[0],gt=at[1];nt=String.fromCodePoint(Ee+=parseInt(nt,Re)),gt=String.fromCodePoint(Ee+=parseInt(gt,Re)),ke.set(nt,gt),Te\u0026\u0026Ce.set(gt,nt)}}),{map:ke,reverseMap:Ce}}var m,_,f;function I(){if(!m){var we=p(d.pairs,!0),Te=we.map,Re=we.reverseMap;m=Te,_=Re,f=p(d.canonical,!1).map}}function C(we){return I(),m.get(we)||null}function y(we){return I(),_.get(we)||null}function x(we){return I(),f.get(we)||null}var E=o.L,B=o.R,S=o.EN,Q=o.ES,w=o.ET,M=o.AN,k=o.CS,R=o.B,F=o.S,O=o.ON,U=o.BN,Y=o.NSM,W=o.AL,te=o.LRO,j=o.RLO,J=o.LRE,oe=o.RLE,ie=o.PDF,ne=o.LRI,le=o.RLI,ge=o.FSI,_e=o.PDI;function ue(we,Te){for(var Re=125,Ee=new Uint32Array(we.length),ke=0;ke\u003cwe.length;ke++)Ee[ke]=g(we[ke]);var Ce=new Map;function Le(tr,Vo){var wA=Ee[tr];Ee[tr]=Vo,Ce.set(wA,Ce.get(wA)-1),wA\u0026a\u0026\u0026Ce.set(a,Ce.get(a)-1),Ce.set(Vo,(Ce.get(Vo)||0)+1),Vo\u0026a\u0026\u0026Ce.set(a,(Ce.get(a)||0)+1)}for(var Ye=new Uint8Array(we.length),tt=new Map,At=[],at=null,nt=0;nt\u003cwe.length;nt++)at||At.push(at={start:nt,end:we.length-1,level:Te===\"rtl\"?1:Te===\"ltr\"?0:Qp(nt,!1)}),Ee[nt]\u0026R\u0026\u0026(at.end=nt,at=null);for(var gt=oe|J|j|te|r|_e|ie|R,bt=function(tr){return tr+(tr\u00261?1:2)},Ct=function(tr){return tr+(tr\u00261?2:1)},Dt=0;Dt\u003cAt.length;Dt++){at=At[Dt];var kt=[{_level:at.level,_override:0,_isolate:0}],it=void 0,Yt=0,pn=0,be=0;Ce.clear();for(var et=at.start;et\u003c=at.end;et++){var It=Ee[et];if(it=kt[kt.length-1],Ce.set(It,(Ce.get(It)||0)+1),It\u0026a\u0026\u0026Ce.set(a,(Ce.get(a)||0)+1),It\u0026gt)if(It\u0026(oe|J)){Ye[et]=it._level;var Bt=(It===oe?Ct:bt)(it._level);Bt\u003c=Re\u0026\u0026!Yt\u0026\u0026!pn?kt.push({_level:Bt,_override:0,_isolate:0}):Yt||pn++}else if(It\u0026(j|te)){Ye[et]=it._level;var mt=(It===j?Ct:bt)(it._level);mt\u003c=Re\u0026\u0026!Yt\u0026\u0026!pn?kt.push({_level:mt,_override:It\u0026j?B:E,_isolate:0}):Yt||pn++}else if(It\u0026r){It\u0026ge\u0026\u0026(It=Qp(et+1,!0)===1?le:ne),Ye[et]=it._level,it._override\u0026\u0026Le(et,it._override);var st=(It===le?Ct:bt)(it._level);st\u003c=Re\u0026\u0026Yt===0\u0026\u0026pn===0?(be++,kt.push({_level:st,_override:0,_isolate:1,_isolInitIndex:et})):Yt++}else if(It\u0026_e){if(Yt\u003e0)Yt--;else if(be\u003e0){for(pn=0;!kt[kt.length-1]._isolate;)kt.pop();var xt=kt[kt.length-1]._isolInitIndex;xt!=null\u0026\u0026(tt.set(xt,et),tt.set(et,xt)),kt.pop(),be--}it=kt[kt.length-1],Ye[et]=it._level,it._override\u0026\u0026Le(et,it._override)}else It\u0026ie?(Yt===0\u0026\u0026(pn\u003e0?pn--:!it._isolate\u0026\u0026kt.length\u003e1\u0026\u0026(kt.pop(),it=kt[kt.length-1])),Ye[et]=it._level):It\u0026R\u0026\u0026(Ye[et]=at.level);else Ye[et]=it._level,it._override\u0026\u0026It!==U\u0026\u0026Le(et,it._override)}for(var Xe=[],Ze=null,dt=at.start;dt\u003c=at.end;dt++){var Ut=Ee[dt];if(!(Ut\u0026A)){var Wt=Ye[dt],Xt=Ut\u0026r,Jt=Ut===_e;Ze\u0026\u0026Wt===Ze._level?(Ze._end=dt,Ze._endsWithIsolInit=Xt):Xe.push(Ze={_start:dt,_end:dt,_level:Wt,_startsWithPDI:Jt,_endsWithIsolInit:Xt})}}for(var yn=[],An=0;An\u003cXe.length;An++){var kn=Xe[An];if(!kn._startsWithPDI||kn._startsWithPDI\u0026\u0026!tt.has(kn._start)){for(var $n=[Ze=kn],ht=void 0;Ze\u0026\u0026Ze._endsWithIsolInit\u0026\u0026(ht=tt.get(Ze._end))!=null;)for(var Kt=An+1;Kt\u003cXe.length;Kt++)if(Xe[Kt]._start===ht){$n.push(Ze=Xe[Kt]);break}for(var rn=[],Lt=0;Lt\u003c$n.length;Lt++)for(var Ho=$n[Lt],Ao=Ho._start;Ao\u003c=Ho._end;Ao++)rn.push(Ao);for(var qe=Ye[rn[0]],vt=at.level,qt=rn[0]-1;qt\u003e=0;qt--)if(!(Ee[qt]\u0026A)){vt=Ye[qt];break}var Zt=rn[rn.length-1],nn=Ye[Zt],zn=at.level;if(!(Ee[Zt]\u0026r)){for(var Nn=Zt+1;Nn\u003c=at.end;Nn++)if(!(Ee[Nn]\u0026A)){zn=Ye[Nn];break}}yn.push({_seqIndices:rn,_sosType:Math.max(vt,qe)%2?B:E,_eosType:Math.max(zn,nn)%2?B:E})}}for(var Co=0;Co\u003cyn.length;Co++){var ei=yn[Co],ro=ei._seqIndices,To=ei._sosType,yo=ei._eosType,Ro=Ye[ro[0]]\u00261?B:E;if(Ce.get(Y))for(var On=0;On\u003cro.length;On++){var uo=ro[On];if(Ee[uo]\u0026Y){for(var Oo=To,ko=On-1;ko\u003e=0;ko--)if(!(Ee[ro[ko]]\u0026A)){Oo=Ee[ro[ko]];break}Le(uo,Oo\u0026(r|_e)?O:Oo)}}if(Ce.get(S))for(var Ko=0;Ko\u003cro.length;Ko++){var mi=ro[Ko];if(Ee[mi]\u0026S)for(var Fo=Ko-1;Fo\u003e=-1;Fo--){var Nr=Fo===-1?To:Ee[ro[Fo]];if(Nr\u0026s){Nr===W\u0026\u0026Le(mi,M);break}}}if(Ce.get(W))for(var Rs=0;Rs\u003cro.length;Rs++){var ur=ro[Rs];Ee[ur]\u0026W\u0026\u0026Le(ur,B)}if(Ce.get(Q)||Ce.get(k))for(var zi=1;zi\u003cro.length-1;zi++){var bi=ro[zi];if(Ee[bi]\u0026(Q|k)){for(var Ar=0,ws=0,ds=zi-1;ds\u003e=0\u0026\u0026(Ar=Ee[ro[ds]],!!(Ar\u0026A));ds--);for(var Et=zi+1;Et\u003cro.length\u0026\u0026(ws=Ee[ro[Et]],!!(ws\u0026A));Et++);Ar===ws\u0026\u0026(Ee[bi]===Q?Ar===S:Ar\u0026(S|M))\u0026\u0026Le(bi,Ar)}}if(Ce.get(S))for(var Gt=0;Gt\u003cro.length;Gt++){var Rt=ro[Gt];if(Ee[Rt]\u0026S){for(var Ht=Gt-1;Ht\u003e=0\u0026\u0026Ee[ro[Ht]]\u0026(w|A);Ht--)Le(ro[Ht],S);for(Gt++;Gt\u003cro.length\u0026\u0026Ee[ro[Gt]]\u0026(w|A|S);Gt++)Ee[ro[Gt]]!==S\u0026\u0026Le(ro[Gt],S)}}if(Ce.get(w)||Ce.get(Q)||Ce.get(k))for(var Qt=0;Qt\u003cro.length;Qt++){var Nt=ro[Qt];if(Ee[Nt]\u0026(w|Q|k)){Le(Nt,O);for(var _n=Qt-1;_n\u003e=0\u0026\u0026Ee[ro[_n]]\u0026A;_n--)Le(ro[_n],O);for(var qn=Qt+1;qn\u003cro.length\u0026\u0026Ee[ro[qn]]\u0026A;qn++)Le(ro[qn],O)}}if(Ce.get(S))for(var En=0,Rn=To;En\u003cro.length;En++){var Hn=ro[En],Lo=Ee[Hn];Lo\u0026S?Rn===E\u0026\u0026Le(Hn,E):Lo\u0026s\u0026\u0026(Rn=Lo)}if(Ce.get(a)){var Io=B|S|M,gi=Io|E,jo=[];{for(var oi=[],Ji=0;Ji\u003cro.length;Ji++)if(Ee[ro[Ji]]\u0026a){var wi=we[ro[Ji]],Br=void 0;if(C(wi)!==null)if(oi.length\u003c63)oi.push({char:wi,seqIndex:Ji});else break;else if((Br=y(wi))!==null)for(var gr=oi.length-1;gr\u003e=0;gr--){var oa=oi[gr].char;if(oa===Br||oa===y(x(wi))||C(x(oa))===wi){jo.push([oi[gr].seqIndex,Ji]),oi.length=gr;break}}}jo.sort(function(tr,Vo){return tr[0]-Vo[0]})}for(var hs=0;hs\u003cjo.length;hs++){for(var Li=jo[hs],ys=Li[0],dr=Li[1],cA=!1,vA=0,Yl=ys+1;Yl\u003cdr;Yl++){var H0=ro[Yl];if(Ee[H0]\u0026gi){cA=!0;var ph=Ee[H0]\u0026Io?B:E;if(ph===Ro){vA=ph;break}}}if(cA\u0026\u0026!vA){vA=To;for(var Xh=ys-1;Xh\u003e=0;Xh--){var Bl=ro[Xh];if(Ee[Bl]\u0026gi){var fc=Ee[Bl]\u0026Io?B:E;fc!==Ro?vA=fc:vA=Ro;break}}}if(vA){if(Ee[ro[ys]]=Ee[ro[dr]]=vA,vA!==Ro){for(var Nd=ys+1;Nd\u003cro.length;Nd++)if(!(Ee[ro[Nd]]\u0026A)){g(we[ro[Nd]])\u0026Y\u0026\u0026(Ee[ro[Nd]]=vA);break}}if(vA!==Ro){for(var il=dr+1;il\u003cro.length;il++)if(!(Ee[ro[il]]\u0026A)){g(we[ro[il]])\u0026Y\u0026\u0026(Ee[ro[il]]=vA);break}}}}for(var Ul=0;Ul\u003cro.length;Ul++)if(Ee[ro[Ul]]\u0026a){for(var m_=Ul,ag=Ul,Rd=To,mh=Ul-1;mh\u003e=0;mh--)if(Ee[ro[mh]]\u0026A)m_=mh;else{Rd=Ee[ro[mh]]\u0026Io?B:E;break}for(var mm=yo,gu=Ul+1;gu\u003cro.length;gu++)if(Ee[ro[gu]]\u0026(a|A))ag=gu;else{mm=Ee[ro[gu]]\u0026Io?B:E;break}for(var Ag=m_;Ag\u003c=ag;Ag++)Ee[ro[Ag]]=Rd===mm?Rd:Ro;Ul=ag}}}for(var C0=at.start;C0\u003c=at.end;C0++){var FC=Ye[C0],O0=Ee[C0];if(FC\u00261?O0\u0026(E|S|M)\u0026\u0026Ye[C0]++:O0\u0026B?Ye[C0]++:O0\u0026(M|S)\u0026\u0026(Ye[C0]+=2),O0\u0026A\u0026\u0026(Ye[C0]=C0===0?at.level:Ye[C0-1]),C0===at.end||g(we[C0])\u0026(F|R))for(var __=C0;__\u003e=0\u0026\u0026g(we[__])\u0026c;__--)Ye[__]=at.level}}return{levels:Ye,paragraphs:At};function Qp(tr,Vo){for(var wA=tr;wA\u003cwe.length;wA++){var Td=Ee[wA];if(Td\u0026(B|W))return 1;if(Td\u0026(R|E)||Vo\u0026\u0026Td===_e)return 0;if(Td\u0026r){var da=_1(wA);wA=da===-1?we.length:da}}return 0}function _1(tr){for(var Vo=1,wA=tr+1;wA\u003cwe.length;wA++){var Td=Ee[wA];if(Td\u0026R)break;if(Td\u0026_e){if(--Vo===0)return wA}else Td\u0026r\u0026\u0026Vo++}return-1}}var fe=\"14\u003e1,j\u003e2,t\u003e2,u\u003e2,1a\u003eg,2v3\u003e1,1\u003e1,1ge\u003e1,1wd\u003e1,b\u003e1,1j\u003e1,f\u003e1,ai\u003e3,-2\u003e3,+1,8\u003e1k0,-1jq\u003e1y7,-1y6\u003e1hf,-1he\u003e1h6,-1h5\u003e1ha,-1h8\u003e1qi,-1pu\u003e1,6\u003e3u,-3s\u003e7,6\u003e1,1\u003e1,f\u003e1,1\u003e1,+2,3\u003e1,1\u003e1,+13,4\u003e1,1\u003e1,6\u003e1eo,-1ee\u003e1,3\u003e1mg,-1me\u003e1mk,-1mj\u003e1mi,-1mg\u003e1mi,-1md\u003e1,1\u003e1,+2,1\u003e10k,-103\u003e1,1\u003e1,4\u003e1,5\u003e1,1\u003e1,+10,3\u003e1,1\u003e8,-7\u003e8,+1,-6\u003e7,+1,a\u003e1,1\u003e1,u\u003e1,u6\u003e1,1\u003e1,+5,26\u003e1,1\u003e1,2\u003e1,2\u003e2,8\u003e1,7\u003e1,4\u003e1,1\u003e1,+5,b8\u003e1,1\u003e1,+3,1\u003e3,-2\u003e1,2\u003e1,1\u003e1,+2,c\u003e1,3\u003e1,1\u003e1,+2,h\u003e1,3\u003e1,a\u003e1,1\u003e1,2\u003e1,3\u003e1,1\u003e1,d\u003e1,f\u003e1,3\u003e1,1a\u003e1,1\u003e1,6\u003e1,7\u003e1,13\u003e1,k\u003e1,1\u003e1,+19,4\u003e1,1\u003e1,+2,2\u003e1,1\u003e1,+18,m\u003e1,a\u003e1,1\u003e1,lk\u003e1,1\u003e1,4\u003e1,2\u003e1,f\u003e1,3\u003e1,1\u003e1,+3,db\u003e1,1\u003e1,+3,3\u003e1,1\u003e1,+2,14qm\u003e1,1\u003e1,+1,6\u003e1,4j\u003e1,j\u003e2,t\u003e2,u\u003e2,2\u003e1,+1\",pe;function ye(){if(!pe){var we=p(fe,!0),Te=we.map,Re=we.reverseMap;Re.forEach(function(Ee,ke){Te.set(ke,Ee)}),pe=Te}}function Me(we){return ye(),pe.get(we)||null}function ve(we,Te,Re,Ee){var ke=we.length;Re=Math.max(0,Re==null?0:+Re),Ee=Math.min(ke-1,Ee==null?ke-1:+Ee);for(var Ce=new Map,Le=Re;Le\u003c=Ee;Le++)if(Te[Le]\u00261){var Ye=Me(we[Le]);Ye!==null\u0026\u0026Ce.set(Le,Ye)}return Ce}function he(we,Te,Re,Ee){var ke=we.length;Re=Math.max(0,Re==null?0:+Re),Ee=Math.min(ke-1,Ee==null?ke-1:+Ee);var Ce=[];return Te.paragraphs.forEach(function(Le){var Ye=Math.max(Re,Le.start),tt=Math.min(Ee,Le.end);if(Ye\u003ctt){for(var At=Te.levels.slice(Ye,tt+1),at=tt;at\u003e=Ye\u0026\u0026g(we[at])\u0026c;at--)At[at]=Le.level;for(var nt=Le.level,gt=1/0,bt=0;bt\u003cAt.length;bt++){var Ct=At[bt];Ct\u003ent\u0026\u0026(nt=Ct),Ct\u003cgt\u0026\u0026(gt=Ct|1)}for(var Dt=nt;Dt\u003e=gt;Dt--)for(var kt=0;kt\u003cAt.length;kt++)if(At[kt]\u003e=Dt){for(var it=kt;kt+1\u003cAt.length\u0026\u0026At[kt+1]\u003e=Dt;)kt++;kt\u003eit\u0026\u0026Ce.push([it+Ye,kt+Ye])}}}),Ce}function Qe(we,Te,Re,Ee){var ke=Pe(we,Te,Re,Ee),Ce=[].concat(we);return ke.forEach(function(Le,Ye){Ce[Ye]=(Te.levels[Le]\u00261?Me(we[Le]):null)||we[Le]}),Ce.join(\"\")}function Pe(we,Te,Re,Ee){for(var ke=he(we,Te,Re,Ee),Ce=[],Le=0;Le\u003cwe.length;Le++)Ce[Le]=Le;return ke.forEach(function(Ye){for(var tt=Ye[0],At=Ye[1],at=Ce.slice(tt,At+1),nt=at.length;nt--;)Ce[At-nt]=at[nt]}),Ce}return e.closingToOpeningBracket=y,e.getBidiCharType=g,e.getBidiCharTypeName=h,e.getCanonicalBracket=x,e.getEmbeddingLevels=ue,e.getMirroredCharacter=Me,e.getMirroredCharactersMap=ve,e.getReorderSegments=he,e.getReorderedIndices=Pe,e.getReorderedString=Qe,e.openingToClosingBracket=C,Object.defineProperty(e,\"__esModule\",{value:!0}),e})({});return t}const GJt=/\\bvoid\\s+main\\s*\\(\\s*\\)\\s*{/g;function vke(t){const e=/^[ \\t]*#include +\u003c([\\w\\d./]+)\u003e/gm;function n(o,i){let r=OA[i];return r?vke(r):o}return t.replace(e,n)}const gI=[];for(let t=0;t\u003c256;t++)gI[t]=(t\u003c16?\"0\":\"\")+t.toString(16);function koi(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,o=Math.random()*4294967295|0;return(gI[t\u0026255]+gI[t\u003e\u003e8\u0026255]+gI[t\u003e\u003e16\u0026255]+gI[t\u003e\u003e24\u0026255]+\"-\"+gI[e\u0026255]+gI[e\u003e\u003e8\u0026255]+\"-\"+gI[e\u003e\u003e16\u002615|64]+gI[e\u003e\u003e24\u0026255]+\"-\"+gI[n\u002663|128]+gI[n\u003e\u003e8\u0026255]+\"-\"+gI[n\u003e\u003e16\u0026255]+gI[n\u003e\u003e24\u0026255]+gI[o\u0026255]+gI[o\u003e\u003e8\u0026255]+gI[o\u003e\u003e16\u0026255]+gI[o\u003e\u003e24\u0026255]).toUpperCase()}const XR=Object.assign||function(){let t=arguments[0];for(let e=1,n=arguments.length;e\u003cn;e++){let o=arguments[e];if(o)for(let i in o)Object.prototype.hasOwnProperty.call(o,i)\u0026\u0026(t[i]=o[i])}return t},Foi=Date.now(),YJt=new WeakMap,UJt=new Map;let Loi=1e10;function wke(t,e){const n=Yoi(e);let o=YJt.get(t);if(o||YJt.set(t,o=Object.create(null)),o[n])return new o[n];const i=`_onBeforeCompile${n}`,r=function(c,l){t.onBeforeCompile.call(this,c,l);const u=this.customProgramCacheKey()+\"|\"+c.vertexShader+\"|\"+c.fragmentShader;let g=UJt[u];if(!g){const h=Hoi(this,c,e,n);g=UJt[u]=h}c.vertexShader=g.vertexShader,c.fragmentShader=g.fragmentShader,XR(c.uniforms,this.uniforms),e.timeUniform\u0026\u0026(c.uniforms[e.timeUniform]={get value(){return Date.now()-Foi}}),this[i]\u0026\u0026this[i](c)},s=function(){return a(e.chained?t:t.clone())},a=function(c){const l=Object.create(c,A);return Object.defineProperty(l,\"baseMaterial\",{value:t}),Object.defineProperty(l,\"id\",{value:Loi++}),l.uuid=koi(),l.uniforms=XR({},c.uniforms,e.uniforms),l.defines=XR({},c.defines,e.defines),l.defines[`TROIKA_DERIVED_MATERIAL_${n}`]=\"\",l.extensions=XR({},c.extensions,e.extensions),l._listeners=void 0,l},A={constructor:{value:s},isDerivedMaterial:{value:!0},type:{get:()=\u003et.type,set:c=\u003e{t.type=c}},isDerivedFrom:{writable:!0,configurable:!0,value:function(c){const l=this.baseMaterial;return c===l||l.isDerivedMaterial\u0026\u0026l.isDerivedFrom(c)||!1}},customProgramCacheKey:{writable:!0,configurable:!0,value:function(){return t.customProgramCacheKey()+\"|\"+n}},onBeforeCompile:{get(){return r},set(c){this[i]=c}},copy:{writable:!0,configurable:!0,value:function(c){return t.copy.call(this,c),!t.isShaderMaterial\u0026\u0026!t.isDerivedMaterial\u0026\u0026(XR(this.extensions,c.extensions),XR(this.defines,c.defines),XR(this.uniforms,KVt.clone(c.uniforms))),this}},clone:{writable:!0,configurable:!0,value:function(){const c=new t.constructor;return a(c).copy(this)}},getDepthMaterial:{writable:!0,configurable:!0,value:function(){let c=this._depthMaterial;return c||(c=this._depthMaterial=wke(t.isDerivedMaterial?t.getDepthMaterial():new Ezt({depthPacking:mVt}),e),c.defines.IS_DEPTH_MATERIAL=\"\",c.uniforms=this.uniforms),c}},getDistanceMaterial:{writable:!0,configurable:!0,value:function(){let c=this._distanceMaterial;return c||(c=this._distanceMaterial=wke(t.isDerivedMaterial?t.getDistanceMaterial():new Bzt,e),c.defines.IS_DISTANCE_MATERIAL=\"\",c.uniforms=this.uniforms),c}},dispose:{writable:!0,configurable:!0,value(){const{_depthMaterial:c,_distanceMaterial:l}=this;c\u0026\u0026c.dispose(),l\u0026\u0026l.dispose(),t.dispose.call(this)}}};return o[n]=s,new s}function Hoi(t,{vertexShader:e,fragmentShader:n},o,i){let{vertexDefs:r,vertexMainIntro:s,vertexMainOutro:a,vertexTransform:A,fragmentDefs:c,fragmentMainIntro:l,fragmentMainOutro:u,fragmentColorTransform:g,customRewriter:h,timeUniform:d}=o;if(r=r||\"\",s=s||\"\",a=a||\"\",c=c||\"\",l=l||\"\",u=u||\"\",(A||h)\u0026\u0026(e=vke(e)),(g||h)\u0026\u0026(n=n.replace(/^[ \\t]*#include \u003c((?:tonemapping|encodings|colorspace|fog|premultiplied_alpha|dithering)_fragment)\u003e/gm,`\n//!BEGIN_POST_CHUNK $1\n$\u0026\n//!END_POST_CHUNK\n`),n=vke(n)),h){let p=h({vertexShader:e,fragmentShader:n});e=p.vertexShader,n=p.fragmentShader}if(g){let p=[];n=n.replace(/^\\/\\/!BEGIN_POST_CHUNK[^]+?^\\/\\/!END_POST_CHUNK/gm,m=\u003e(p.push(m),\"\")),u=`${g}\n${p.join(`\n`)}\n${u}`}if(d){const p=`\nuniform float ${d};\n`;r=p+r,c=p+c}return A\u0026\u0026(e=`vec3 troika_position_${i};\nvec3 troika_normal_${i};\nvec2 troika_uv_${i};\n${e}\n`,r=`${r}\nvoid troikaVertexTransform${i}() {\n vec3 position = troika_position_${i};\n vec3 normal = troika_normal_${i};\n vec2 uv = troika_uv_${i};\n ${A}\n troika_position_${i} = position;\n troika_normal_${i} = normal;\n troika_uv_${i} = uv;\n}\n`,s=`\ntroika_position_${i} = vec3(position);\ntroika_normal_${i} = vec3(normal);\ntroika_uv_${i} = vec2(uv);\ntroikaVertexTransform${i}();\n${s}\n`,e=e.replace(/\\b(position|normal|uv)\\b/g,(p,m,_,f)=\u003e/\\battribute\\s+vec[23]\\s+$/.test(f.substr(0,_))?m:`troika_${m}_${i}`),t.map\u0026\u0026t.map.channel\u003e0||(e=e.replace(/\\bMAP_UV\\b/g,`troika_uv_${i}`))),e=KJt(e,i,r,s,a),n=KJt(n,i,c,l,u),{vertexShader:e,fragmentShader:n}}function KJt(t,e,n,o,i){return(o||i||n)\u0026\u0026(t=t.replace(GJt,`\n${n}\nvoid troikaOrigMain${e}() {`),t+=`\nvoid main() {\n ${o}\n troikaOrigMain${e}();\n ${i}\n}`),t}function Ooi(t,e){return t===\"uniforms\"?void 0:typeof e==\"function\"?e.toString():e}let Goi=0;const VJt=new Map;function Yoi(t){const e=JSON.stringify(t,Ooi);let n=VJt.get(e);return n==null\u0026\u0026VJt.set(e,n=++Goi),n}function Uoi(){return typeof window\u003e\"u\"\u0026\u0026(self.window=self),(function(t){var e={parse:function(i){var r=e._bin,s=new Uint8Array(i);if(r.readASCII(s,0,4)==\"ttcf\"){var a=4;r.readUshort(s,a),a+=2,r.readUshort(s,a),a+=2;var A=r.readUint(s,a);a+=4;for(var c=[],l=0;l\u003cA;l++){var u=r.readUint(s,a);a+=4,c.push(e._readFont(s,u))}return c}return[e._readFont(s,0)]},_readFont:function(i,r){var s=e._bin,a=r;s.readFixed(i,r),r+=4;var A=s.readUshort(i,r);r+=2,s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2;for(var c=[\"cmap\",\"head\",\"hhea\",\"maxp\",\"hmtx\",\"name\",\"OS/2\",\"post\",\"loca\",\"glyf\",\"kern\",\"CFF \",\"GDEF\",\"GPOS\",\"GSUB\",\"SVG \"],l={_data:i,_offset:a},u={},g=0;g\u003cA;g++){var h=s.readASCII(i,r,4);r+=4,s.readUint(i,r),r+=4;var d=s.readUint(i,r);r+=4;var p=s.readUint(i,r);r+=4,u[h]={offset:d,length:p}}for(g=0;g\u003cc.length;g++){var m=c[g];u[m]\u0026\u0026(l[m.trim()]=e[m.trim()].parse(i,u[m].offset,u[m].length,l))}return l},_tabOffset:function(i,r,s){for(var a=e._bin,A=a.readUshort(i,s+4),c=s+12,l=0;l\u003cA;l++){var u=a.readASCII(i,c,4);c+=4,a.readUint(i,c),c+=4;var g=a.readUint(i,c);if(c+=4,a.readUint(i,c),c+=4,u==r)return g}return 0}};e._bin={readFixed:function(i,r){return(i[r]\u003c\u003c8|i[r+1])+(i[r+2]\u003c\u003c8|i[r+3])/65540},readF2dot14:function(i,r){return e._bin.readShort(i,r)/16384},readInt:function(i,r){return e._bin._view(i).getInt32(r)},readInt8:function(i,r){return e._bin._view(i).getInt8(r)},readShort:function(i,r){return e._bin._view(i).getInt16(r)},readUshort:function(i,r){return e._bin._view(i).getUint16(r)},readUshorts:function(i,r,s){for(var a=[],A=0;A\u003cs;A++)a.push(e._bin.readUshort(i,r+2*A));return a},readUint:function(i,r){return e._bin._view(i).getUint32(r)},readUint64:function(i,r){return 4294967296*e._bin.readUint(i,r)+e._bin.readUint(i,r+4)},readASCII:function(i,r,s){for(var a=\"\",A=0;A\u003cs;A++)a+=String.fromCharCode(i[r+A]);return a},readUnicode:function(i,r,s){for(var a=\"\",A=0;A\u003cs;A++){var c=i[r++]\u003c\u003c8|i[r++];a+=String.fromCharCode(c)}return a},_tdec:typeof window\u003c\"u\"\u0026\u0026window.TextDecoder?new window.TextDecoder:null,readUTF8:function(i,r,s){var a=e._bin._tdec;return a\u0026\u0026r==0\u0026\u0026s==i.length?a.decode(i):e._bin.readASCII(i,r,s)},readBytes:function(i,r,s){for(var a=[],A=0;A\u003cs;A++)a.push(i[r+A]);return a},readASCIIArray:function(i,r,s){for(var a=[],A=0;A\u003cs;A++)a.push(String.fromCharCode(i[r+A]));return a},_view:function(i){return i._dataView||(i._dataView=i.buffer?new DataView(i.buffer,i.byteOffset,i.byteLength):new DataView(new Uint8Array(i).buffer))}},e._lctf={},e._lctf.parse=function(i,r,s,a,A){var c=e._bin,l={},u=r;c.readFixed(i,r),r+=4;var g=c.readUshort(i,r);r+=2;var h=c.readUshort(i,r);r+=2;var d=c.readUshort(i,r);return r+=2,l.scriptList=e._lctf.readScriptList(i,u+g),l.featureList=e._lctf.readFeatureList(i,u+h),l.lookupList=e._lctf.readLookupList(i,u+d,A),l},e._lctf.readLookupList=function(i,r,s){var a=e._bin,A=r,c=[],l=a.readUshort(i,r);r+=2;for(var u=0;u\u003cl;u++){var g=a.readUshort(i,r);r+=2;var h=e._lctf.readLookupTable(i,A+g,s);c.push(h)}return c},e._lctf.readLookupTable=function(i,r,s){var a=e._bin,A=r,c={tabs:[]};c.ltype=a.readUshort(i,r),r+=2,c.flag=a.readUshort(i,r),r+=2;var l=a.readUshort(i,r);r+=2;for(var u=c.ltype,g=0;g\u003cl;g++){var h=a.readUshort(i,r);r+=2;var d=s(i,u,A+h,c);c.tabs.push(d)}return c},e._lctf.numOfOnes=function(i){for(var r=0,s=0;s\u003c32;s++)(i\u003e\u003e\u003es\u00261)!=0\u0026\u0026r++;return r},e._lctf.readClassDef=function(i,r){var s=e._bin,a=[],A=s.readUshort(i,r);if(r+=2,A==1){var c=s.readUshort(i,r);r+=2;var l=s.readUshort(i,r);r+=2;for(var u=0;u\u003cl;u++)a.push(c+u),a.push(c+u),a.push(s.readUshort(i,r)),r+=2}if(A==2){var g=s.readUshort(i,r);for(r+=2,u=0;u\u003cg;u++)a.push(s.readUshort(i,r)),r+=2,a.push(s.readUshort(i,r)),r+=2,a.push(s.readUshort(i,r)),r+=2}return a},e._lctf.getInterval=function(i,r){for(var s=0;s\u003ci.length;s+=3){var a=i[s],A=i[s+1];if(i[s+2],a\u003c=r\u0026\u0026r\u003c=A)return s}return-1},e._lctf.readCoverage=function(i,r){var s=e._bin,a={};a.fmt=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);return r+=2,a.fmt==1\u0026\u0026(a.tab=s.readUshorts(i,r,A)),a.fmt==2\u0026\u0026(a.tab=s.readUshorts(i,r,3*A)),a},e._lctf.coverageIndex=function(i,r){var s=i.tab;if(i.fmt==1)return s.indexOf(r);if(i.fmt==2){var a=e._lctf.getInterval(s,r);if(a!=-1)return s[a+2]+(r-s[a])}return-1},e._lctf.readFeatureList=function(i,r){var s=e._bin,a=r,A=[],c=s.readUshort(i,r);r+=2;for(var l=0;l\u003cc;l++){var u=s.readASCII(i,r,4);r+=4;var g=s.readUshort(i,r);r+=2;var h=e._lctf.readFeatureTable(i,a+g);h.tag=u.trim(),A.push(h)}return A},e._lctf.readFeatureTable=function(i,r){var s=e._bin,a=r,A={},c=s.readUshort(i,r);r+=2,c\u003e0\u0026\u0026(A.featureParams=a+c);var l=s.readUshort(i,r);r+=2,A.tab=[];for(var u=0;u\u003cl;u++)A.tab.push(s.readUshort(i,r+2*u));return A},e._lctf.readScriptList=function(i,r){var s=e._bin,a=r,A={},c=s.readUshort(i,r);r+=2;for(var l=0;l\u003cc;l++){var u=s.readASCII(i,r,4);r+=4;var g=s.readUshort(i,r);r+=2,A[u.trim()]=e._lctf.readScriptTable(i,a+g)}return A},e._lctf.readScriptTable=function(i,r){var s=e._bin,a=r,A={},c=s.readUshort(i,r);r+=2,c\u003e0\u0026\u0026(A.default=e._lctf.readLangSysTable(i,a+c));var l=s.readUshort(i,r);r+=2;for(var u=0;u\u003cl;u++){var g=s.readASCII(i,r,4);r+=4;var h=s.readUshort(i,r);r+=2,A[g.trim()]=e._lctf.readLangSysTable(i,a+h)}return A},e._lctf.readLangSysTable=function(i,r){var s=e._bin,a={};s.readUshort(i,r),r+=2,a.reqFeature=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);return r+=2,a.features=s.readUshorts(i,r,A),a},e.CFF={},e.CFF.parse=function(i,r,s){var a=e._bin;(i=new Uint8Array(i.buffer,r,s))[r=0],i[++r],i[++r],i[++r],r++;var A=[];r=e.CFF.readIndex(i,r,A);for(var c=[],l=0;l\u003cA.length-1;l++)c.push(a.readASCII(i,r+A[l],A[l+1]-A[l]));r+=A[A.length-1];var u=[];r=e.CFF.readIndex(i,r,u);var g=[];for(l=0;l\u003cu.length-1;l++)g.push(e.CFF.readDict(i,r+u[l],r+u[l+1]));r+=u[u.length-1];var h=g[0],d=[];r=e.CFF.readIndex(i,r,d);var p=[];for(l=0;l\u003cd.length-1;l++)p.push(a.readASCII(i,r+d[l],d[l+1]-d[l]));if(r+=d[d.length-1],e.CFF.readSubrs(i,r,h),h.CharStrings){r=h.CharStrings,d=[],r=e.CFF.readIndex(i,r,d);var m=[];for(l=0;l\u003cd.length-1;l++)m.push(a.readBytes(i,r+d[l],d[l+1]-d[l]));h.CharStrings=m}if(h.ROS){r=h.FDArray;var _=[];for(r=e.CFF.readIndex(i,r,_),h.FDArray=[],l=0;l\u003c_.length-1;l++){var f=e.CFF.readDict(i,r+_[l],r+_[l+1]);e.CFF._readFDict(i,f,p),h.FDArray.push(f)}r+=_[_.length-1],r=h.FDSelect,h.FDSelect=[];var I=i[r];if(r++,I!=3)throw I;var C=a.readUshort(i,r);for(r+=2,l=0;l\u003cC+1;l++)h.FDSelect.push(a.readUshort(i,r),i[r+2]),r+=3}return h.Encoding\u0026\u0026(h.Encoding=e.CFF.readEncoding(i,h.Encoding,h.CharStrings.length)),h.charset\u0026\u0026(h.charset=e.CFF.readCharset(i,h.charset,h.CharStrings.length)),e.CFF._readFDict(i,h,p),h},e.CFF._readFDict=function(i,r,s){var a;for(var A in r.Private\u0026\u0026(a=r.Private[1],r.Private=e.CFF.readDict(i,a,a+r.Private[0]),r.Private.Subrs\u0026\u0026e.CFF.readSubrs(i,a+r.Private.Subrs,r.Private)),r)[\"FamilyName\",\"FontName\",\"FullName\",\"Notice\",\"version\",\"Copyright\"].indexOf(A)!=-1\u0026\u0026(r[A]=s[r[A]-426+35])},e.CFF.readSubrs=function(i,r,s){var a=e._bin,A=[];r=e.CFF.readIndex(i,r,A);var c,l=A.length;c=l\u003c1240?107:l\u003c33900?1131:32768,s.Bias=c,s.Subrs=[];for(var u=0;u\u003cA.length-1;u++)s.Subrs.push(a.readBytes(i,r+A[u],A[u+1]-A[u]))},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(i,r){for(var s=0;s\u003ci.charset.length;s++)if(i.charset[s]==r)return s;return-1},e.CFF.glyphBySE=function(i,r){return r\u003c0||r\u003e255?-1:e.CFF.glyphByUnicode(i,e.CFF.tableSE[r])},e.CFF.readEncoding=function(i,r,s){e._bin;var a=[\".notdef\"],A=i[r];if(r++,A!=0)throw\"error: unknown encoding format: \"+A;var c=i[r];r++;for(var l=0;l\u003cc;l++)a.push(i[r+l]);return a},e.CFF.readCharset=function(i,r,s){var a=e._bin,A=[\".notdef\"],c=i[r];if(r++,c==0)for(var l=0;l\u003cs;l++){var u=a.readUshort(i,r);r+=2,A.push(u)}else{if(c!=1\u0026\u0026c!=2)throw\"error: format: \"+c;for(;A.length\u003cs;){u=a.readUshort(i,r),r+=2;var g=0;for(c==1?(g=i[r],r++):(g=a.readUshort(i,r),r+=2),l=0;l\u003c=g;l++)A.push(u),u++}}return A},e.CFF.readIndex=function(i,r,s){var a=e._bin,A=a.readUshort(i,r)+1,c=i[r+=2];if(r++,c==1)for(var l=0;l\u003cA;l++)s.push(i[r+l]);else if(c==2)for(l=0;l\u003cA;l++)s.push(a.readUshort(i,r+2*l));else if(c==3)for(l=0;l\u003cA;l++)s.push(16777215\u0026a.readUint(i,r+3*l-1));else if(A!=1)throw\"unsupported offset size: \"+c+\", count: \"+A;return(r+=A*c)-1},e.CFF.getCharString=function(i,r,s){var a=e._bin,A=i[r],c=i[r+1];i[r+2],i[r+3],i[r+4];var l=1,u=null,g=null;A\u003c=20\u0026\u0026(u=A,l=1),A==12\u0026\u0026(u=100*A+c,l=2),21\u003c=A\u0026\u0026A\u003c=27\u0026\u0026(u=A,l=1),A==28\u0026\u0026(g=a.readShort(i,r+1),l=3),29\u003c=A\u0026\u0026A\u003c=31\u0026\u0026(u=A,l=1),32\u003c=A\u0026\u0026A\u003c=246\u0026\u0026(g=A-139,l=1),247\u003c=A\u0026\u0026A\u003c=250\u0026\u0026(g=256*(A-247)+c+108,l=2),251\u003c=A\u0026\u0026A\u003c=254\u0026\u0026(g=256*-(A-251)-c-108,l=2),A==255\u0026\u0026(g=a.readInt(i,r+1)/65535,l=5),s.val=g??\"o\"+u,s.size=l},e.CFF.readCharString=function(i,r,s){for(var a=r+s,A=e._bin,c=[];r\u003ca;){var l=i[r],u=i[r+1];i[r+2],i[r+3],i[r+4];var g=1,h=null,d=null;l\u003c=20\u0026\u0026(h=l,g=1),l==12\u0026\u0026(h=100*l+u,g=2),l!=19\u0026\u0026l!=20||(h=l,g=2),21\u003c=l\u0026\u0026l\u003c=27\u0026\u0026(h=l,g=1),l==28\u0026\u0026(d=A.readShort(i,r+1),g=3),29\u003c=l\u0026\u0026l\u003c=31\u0026\u0026(h=l,g=1),32\u003c=l\u0026\u0026l\u003c=246\u0026\u0026(d=l-139,g=1),247\u003c=l\u0026\u0026l\u003c=250\u0026\u0026(d=256*(l-247)+u+108,g=2),251\u003c=l\u0026\u0026l\u003c=254\u0026\u0026(d=256*-(l-251)-u-108,g=2),l==255\u0026\u0026(d=A.readInt(i,r+1)/65535,g=5),c.push(d??\"o\"+h),r+=g}return c},e.CFF.readDict=function(i,r,s){for(var a=e._bin,A={},c=[];r\u003cs;){var l=i[r],u=i[r+1];i[r+2],i[r+3],i[r+4];var g=1,h=null,d=null;if(l==28\u0026\u0026(d=a.readShort(i,r+1),g=3),l==29\u0026\u0026(d=a.readInt(i,r+1),g=5),32\u003c=l\u0026\u0026l\u003c=246\u0026\u0026(d=l-139,g=1),247\u003c=l\u0026\u0026l\u003c=250\u0026\u0026(d=256*(l-247)+u+108,g=2),251\u003c=l\u0026\u0026l\u003c=254\u0026\u0026(d=256*-(l-251)-u-108,g=2),l==255)throw d=a.readInt(i,r+1)/65535,g=5,\"unknown number\";if(l==30){var p=[];for(g=1;;){var m=i[r+g];g++;var _=m\u003e\u003e4,f=15\u0026m;if(_!=15\u0026\u0026p.push(_),f!=15\u0026\u0026p.push(f),f==15)break}for(var I=\"\",C=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],y=0;y\u003cp.length;y++)I+=C[p[y]];d=parseFloat(I)}l\u003c=21\u0026\u0026(h=[\"version\",\"Notice\",\"FullName\",\"FamilyName\",\"Weight\",\"FontBBox\",\"BlueValues\",\"OtherBlues\",\"FamilyBlues\",\"FamilyOtherBlues\",\"StdHW\",\"StdVW\",\"escape\",\"UniqueID\",\"XUID\",\"charset\",\"Encoding\",\"CharStrings\",\"Private\",\"Subrs\",\"defaultWidthX\",\"nominalWidthX\"][l],g=1,l==12\u0026\u0026(h=[\"Copyright\",\"isFixedPitch\",\"ItalicAngle\",\"UnderlinePosition\",\"UnderlineThickness\",\"PaintType\",\"CharstringType\",\"FontMatrix\",\"StrokeWidth\",\"BlueScale\",\"BlueShift\",\"BlueFuzz\",\"StemSnapH\",\"StemSnapV\",\"ForceBold\",0,0,\"LanguageGroup\",\"ExpansionFactor\",\"initialRandomSeed\",\"SyntheticBase\",\"PostScript\",\"BaseFontName\",\"BaseFontBlend\",0,0,0,0,0,0,\"ROS\",\"CIDFontVersion\",\"CIDFontRevision\",\"CIDFontType\",\"CIDCount\",\"UIDBase\",\"FDArray\",\"FDSelect\",\"FontName\"][u],g=2)),h!=null?(A[h]=c.length==1?c[0]:c,c=[]):c.push(d),r+=g}return A},e.cmap={},e.cmap.parse=function(i,r,s){i=new Uint8Array(i.buffer,r,s),r=0;var a=e._bin,A={};a.readUshort(i,r),r+=2;var c=a.readUshort(i,r);r+=2;var l=[];A.tables=[];for(var u=0;u\u003cc;u++){var g=a.readUshort(i,r);r+=2;var h=a.readUshort(i,r);r+=2;var d=a.readUint(i,r);r+=4;var p=\"p\"+g+\"e\"+h,m=l.indexOf(d);if(m==-1){var _;m=A.tables.length,l.push(d);var f=a.readUshort(i,d);f==0?_=e.cmap.parse0(i,d):f==4?_=e.cmap.parse4(i,d):f==6?_=e.cmap.parse6(i,d):f==12?_=e.cmap.parse12(i,d):console.debug(\"unknown format: \"+f,g,h,d),A.tables.push(_)}if(A[p]!=null)throw\"multiple tables for one platform+encoding\";A[p]=m}return A},e.cmap.parse0=function(i,r){var s=e._bin,a={};a.format=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);r+=2,s.readUshort(i,r),r+=2,a.map=[];for(var c=0;c\u003cA-6;c++)a.map.push(i[r+c]);return a},e.cmap.parse4=function(i,r){var s=e._bin,a=r,A={};A.format=s.readUshort(i,r),r+=2;var c=s.readUshort(i,r);r+=2,s.readUshort(i,r),r+=2;var l=s.readUshort(i,r);r+=2;var u=l/2;A.searchRange=s.readUshort(i,r),r+=2,A.entrySelector=s.readUshort(i,r),r+=2,A.rangeShift=s.readUshort(i,r),r+=2,A.endCount=s.readUshorts(i,r,u),r+=2*u,r+=2,A.startCount=s.readUshorts(i,r,u),r+=2*u,A.idDelta=[];for(var g=0;g\u003cu;g++)A.idDelta.push(s.readShort(i,r)),r+=2;for(A.idRangeOffset=s.readUshorts(i,r,u),r+=2*u,A.glyphIdArray=[];r\u003ca+c;)A.glyphIdArray.push(s.readUshort(i,r)),r+=2;return A},e.cmap.parse6=function(i,r){var s=e._bin,a={};a.format=s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2,s.readUshort(i,r),r+=2,a.firstCode=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);r+=2,a.glyphIdArray=[];for(var c=0;c\u003cA;c++)a.glyphIdArray.push(s.readUshort(i,r)),r+=2;return a},e.cmap.parse12=function(i,r){var s=e._bin,a={};a.format=s.readUshort(i,r),r+=2,r+=2,s.readUint(i,r),r+=4,s.readUint(i,r),r+=4;var A=s.readUint(i,r);r+=4,a.groups=[];for(var c=0;c\u003cA;c++){var l=r+12*c,u=s.readUint(i,l+0),g=s.readUint(i,l+4),h=s.readUint(i,l+8);a.groups.push([u,g,h])}return a},e.glyf={},e.glyf.parse=function(i,r,s,a){for(var A=[],c=0;c\u003ca.maxp.numGlyphs;c++)A.push(null);return A},e.glyf._parseGlyf=function(i,r){var s=e._bin,a=i._data,A=e._tabOffset(a,\"glyf\",i._offset)+i.loca[r];if(i.loca[r]==i.loca[r+1])return null;var c={};if(c.noc=s.readShort(a,A),A+=2,c.xMin=s.readShort(a,A),A+=2,c.yMin=s.readShort(a,A),A+=2,c.xMax=s.readShort(a,A),A+=2,c.yMax=s.readShort(a,A),A+=2,c.xMin\u003e=c.xMax||c.yMin\u003e=c.yMax)return null;if(c.noc\u003e0){c.endPts=[];for(var l=0;l\u003cc.noc;l++)c.endPts.push(s.readUshort(a,A)),A+=2;var u=s.readUshort(a,A);if(A+=2,a.length-A\u003cu)return null;c.instructions=s.readBytes(a,A,u),A+=u;var g=c.endPts[c.noc-1]+1;for(c.flags=[],l=0;l\u003cg;l++){var h=a[A];if(A++,c.flags.push(h),(8\u0026h)!=0){var d=a[A];A++;for(var p=0;p\u003cd;p++)c.flags.push(h),l++}}for(c.xs=[],l=0;l\u003cg;l++){var m=(2\u0026c.flags[l])!=0,_=(16\u0026c.flags[l])!=0;m?(c.xs.push(_?a[A]:-a[A]),A++):_?c.xs.push(0):(c.xs.push(s.readShort(a,A)),A+=2)}for(c.ys=[],l=0;l\u003cg;l++)m=(4\u0026c.flags[l])!=0,_=(32\u0026c.flags[l])!=0,m?(c.ys.push(_?a[A]:-a[A]),A++):_?c.ys.push(0):(c.ys.push(s.readShort(a,A)),A+=2);var f=0,I=0;for(l=0;l\u003cg;l++)f+=c.xs[l],I+=c.ys[l],c.xs[l]=f,c.ys[l]=I}else{var C;c.parts=[];do{C=s.readUshort(a,A),A+=2;var y={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(c.parts.push(y),y.glyphIndex=s.readUshort(a,A),A+=2,1\u0026C){var x=s.readShort(a,A);A+=2;var E=s.readShort(a,A);A+=2}else x=s.readInt8(a,A),A++,E=s.readInt8(a,A),A++;2\u0026C?(y.m.tx=x,y.m.ty=E):(y.p1=x,y.p2=E),8\u0026C?(y.m.a=y.m.d=s.readF2dot14(a,A),A+=2):64\u0026C?(y.m.a=s.readF2dot14(a,A),A+=2,y.m.d=s.readF2dot14(a,A),A+=2):128\u0026C\u0026\u0026(y.m.a=s.readF2dot14(a,A),A+=2,y.m.b=s.readF2dot14(a,A),A+=2,y.m.c=s.readF2dot14(a,A),A+=2,y.m.d=s.readF2dot14(a,A),A+=2)}while(32\u0026C);if(256\u0026C){var B=s.readUshort(a,A);for(A+=2,c.instr=[],l=0;l\u003cB;l++)c.instr.push(a[A]),A++}}return c},e.GDEF={},e.GDEF.parse=function(i,r,s,a){var A=r;r+=4;var c=e._bin.readUshort(i,r);return{glyphClassDef:c===0?null:e._lctf.readClassDef(i,A+c)}},e.GPOS={},e.GPOS.parse=function(i,r,s,a){return e._lctf.parse(i,r,s,a,e.GPOS.subt)},e.GPOS.subt=function(i,r,s,a){var A=e._bin,c=s,l={};if(l.fmt=A.readUshort(i,s),s+=2,r==1||r==2||r==3||r==7||r==8\u0026\u0026l.fmt\u003c=2){var u=A.readUshort(i,s);s+=2,l.coverage=e._lctf.readCoverage(i,u+c)}if(r==1\u0026\u0026l.fmt==1){var g=A.readUshort(i,s);s+=2,g!=0\u0026\u0026(l.pos=e.GPOS.readValueRecord(i,s,g))}else if(r==2\u0026\u0026l.fmt\u003e=1\u0026\u0026l.fmt\u003c=2){g=A.readUshort(i,s),s+=2;var h=A.readUshort(i,s);s+=2;var d=e._lctf.numOfOnes(g),p=e._lctf.numOfOnes(h);if(l.fmt==1){l.pairsets=[];var m=A.readUshort(i,s);s+=2;for(var _=0;_\u003cm;_++){var f=c+A.readUshort(i,s);s+=2;var I=A.readUshort(i,f);f+=2;for(var C=[],y=0;y\u003cI;y++){var x=A.readUshort(i,f);f+=2,g!=0\u0026\u0026(M=e.GPOS.readValueRecord(i,f,g),f+=2*d),h!=0\u0026\u0026(k=e.GPOS.readValueRecord(i,f,h),f+=2*p),C.push({gid2:x,val1:M,val2:k})}l.pairsets.push(C)}}if(l.fmt==2){var E=A.readUshort(i,s);s+=2;var B=A.readUshort(i,s);s+=2;var S=A.readUshort(i,s);s+=2;var Q=A.readUshort(i,s);for(s+=2,l.classDef1=e._lctf.readClassDef(i,c+E),l.classDef2=e._lctf.readClassDef(i,c+B),l.matrix=[],_=0;_\u003cS;_++){var w=[];for(y=0;y\u003cQ;y++){var M=null,k=null;g!=0\u0026\u0026(M=e.GPOS.readValueRecord(i,s,g),s+=2*d),h!=0\u0026\u0026(k=e.GPOS.readValueRecord(i,s,h),s+=2*p),w.push({val1:M,val2:k})}l.matrix.push(w)}}}else if(r==4\u0026\u0026l.fmt==1)l.markCoverage=e._lctf.readCoverage(i,A.readUshort(i,s)+c),l.baseCoverage=e._lctf.readCoverage(i,A.readUshort(i,s+2)+c),l.markClassCount=A.readUshort(i,s+4),l.markArray=e.GPOS.readMarkArray(i,A.readUshort(i,s+6)+c),l.baseArray=e.GPOS.readBaseArray(i,A.readUshort(i,s+8)+c,l.markClassCount);else if(r==6\u0026\u0026l.fmt==1)l.mark1Coverage=e._lctf.readCoverage(i,A.readUshort(i,s)+c),l.mark2Coverage=e._lctf.readCoverage(i,A.readUshort(i,s+2)+c),l.markClassCount=A.readUshort(i,s+4),l.mark1Array=e.GPOS.readMarkArray(i,A.readUshort(i,s+6)+c),l.mark2Array=e.GPOS.readBaseArray(i,A.readUshort(i,s+8)+c,l.markClassCount);else{if(r==9\u0026\u0026l.fmt==1){var R=A.readUshort(i,s);s+=2;var F=A.readUint(i,s);if(s+=4,a.ltype==9)a.ltype=R;else if(a.ltype!=R)throw\"invalid extension substitution\";return e.GPOS.subt(i,a.ltype,c+F)}console.debug(\"unsupported GPOS table LookupType\",r,\"format\",l.fmt)}return l},e.GPOS.readValueRecord=function(i,r,s){var a=e._bin,A=[];return A.push(1\u0026s?a.readShort(i,r):0),r+=1\u0026s?2:0,A.push(2\u0026s?a.readShort(i,r):0),r+=2\u0026s?2:0,A.push(4\u0026s?a.readShort(i,r):0),r+=4\u0026s?2:0,A.push(8\u0026s?a.readShort(i,r):0),r+=8\u0026s?2:0,A},e.GPOS.readBaseArray=function(i,r,s){var a=e._bin,A=[],c=r,l=a.readUshort(i,r);r+=2;for(var u=0;u\u003cl;u++){for(var g=[],h=0;h\u003cs;h++)g.push(e.GPOS.readAnchorRecord(i,c+a.readUshort(i,r))),r+=2;A.push(g)}return A},e.GPOS.readMarkArray=function(i,r){var s=e._bin,a=[],A=r,c=s.readUshort(i,r);r+=2;for(var l=0;l\u003cc;l++){var u=e.GPOS.readAnchorRecord(i,s.readUshort(i,r+2)+A);u.markClass=s.readUshort(i,r),a.push(u),r+=4}return a},e.GPOS.readAnchorRecord=function(i,r){var s=e._bin,a={};return a.fmt=s.readUshort(i,r),a.x=s.readShort(i,r+2),a.y=s.readShort(i,r+4),a},e.GSUB={},e.GSUB.parse=function(i,r,s,a){return e._lctf.parse(i,r,s,a,e.GSUB.subt)},e.GSUB.subt=function(i,r,s,a){var A=e._bin,c=s,l={};if(l.fmt=A.readUshort(i,s),s+=2,r!=1\u0026\u0026r!=2\u0026\u0026r!=4\u0026\u0026r!=5\u0026\u0026r!=6)return null;if(r==1||r==2||r==4||r==5\u0026\u0026l.fmt\u003c=2||r==6\u0026\u0026l.fmt\u003c=2){var u=A.readUshort(i,s);s+=2,l.coverage=e._lctf.readCoverage(i,c+u)}if(r==1\u0026\u0026l.fmt\u003e=1\u0026\u0026l.fmt\u003c=2){if(l.fmt==1)l.delta=A.readShort(i,s),s+=2;else if(l.fmt==2){var g=A.readUshort(i,s);s+=2,l.newg=A.readUshorts(i,s,g),s+=2*l.newg.length}}else if(r==2\u0026\u0026l.fmt==1){g=A.readUshort(i,s),s+=2,l.seqs=[];for(var h=0;h\u003cg;h++){var d=A.readUshort(i,s)+c;s+=2;var p=A.readUshort(i,d);l.seqs.push(A.readUshorts(i,d+2,p))}}else if(r==4)for(l.vals=[],g=A.readUshort(i,s),s+=2,h=0;h\u003cg;h++){var m=A.readUshort(i,s);s+=2,l.vals.push(e.GSUB.readLigatureSet(i,c+m))}else if(r==5\u0026\u0026l.fmt==2){if(l.fmt==2){var _=A.readUshort(i,s);s+=2,l.cDef=e._lctf.readClassDef(i,c+_),l.scset=[];var f=A.readUshort(i,s);for(s+=2,h=0;h\u003cf;h++){var I=A.readUshort(i,s);s+=2,l.scset.push(I==0?null:e.GSUB.readSubClassSet(i,c+I))}}}else if(r==6\u0026\u0026l.fmt==3){if(l.fmt==3){for(h=0;h\u003c3;h++){g=A.readUshort(i,s),s+=2;for(var C=[],y=0;y\u003cg;y++)C.push(e._lctf.readCoverage(i,c+A.readUshort(i,s+2*y)));s+=2*g,h==0\u0026\u0026(l.backCvg=C),h==1\u0026\u0026(l.inptCvg=C),h==2\u0026\u0026(l.ahedCvg=C)}g=A.readUshort(i,s),s+=2,l.lookupRec=e.GSUB.readSubstLookupRecords(i,s,g)}}else{if(r==7\u0026\u0026l.fmt==1){var x=A.readUshort(i,s);s+=2;var E=A.readUint(i,s);if(s+=4,a.ltype==9)a.ltype=x;else if(a.ltype!=x)throw\"invalid extension substitution\";return e.GSUB.subt(i,a.ltype,c+E)}console.debug(\"unsupported GSUB table LookupType\",r,\"format\",l.fmt)}return l},e.GSUB.readSubClassSet=function(i,r){var s=e._bin.readUshort,a=r,A=[],c=s(i,r);r+=2;for(var l=0;l\u003cc;l++){var u=s(i,r);r+=2,A.push(e.GSUB.readSubClassRule(i,a+u))}return A},e.GSUB.readSubClassRule=function(i,r){var s=e._bin.readUshort,a={},A=s(i,r),c=s(i,r+=2);r+=2,a.input=[];for(var l=0;l\u003cA-1;l++)a.input.push(s(i,r)),r+=2;return a.substLookupRecords=e.GSUB.readSubstLookupRecords(i,r,c),a},e.GSUB.readSubstLookupRecords=function(i,r,s){for(var a=e._bin.readUshort,A=[],c=0;c\u003cs;c++)A.push(a(i,r),a(i,r+2)),r+=4;return A},e.GSUB.readChainSubClassSet=function(i,r){var s=e._bin,a=r,A=[],c=s.readUshort(i,r);r+=2;for(var l=0;l\u003cc;l++){var u=s.readUshort(i,r);r+=2,A.push(e.GSUB.readChainSubClassRule(i,a+u))}return A},e.GSUB.readChainSubClassRule=function(i,r){for(var s=e._bin,a={},A=[\"backtrack\",\"input\",\"lookahead\"],c=0;c\u003cA.length;c++){var l=s.readUshort(i,r);r+=2,c==1\u0026\u0026l--,a[A[c]]=s.readUshorts(i,r,l),r+=2*a[A[c]].length}return l=s.readUshort(i,r),r+=2,a.subst=s.readUshorts(i,r,2*l),r+=2*a.subst.length,a},e.GSUB.readLigatureSet=function(i,r){var s=e._bin,a=r,A=[],c=s.readUshort(i,r);r+=2;for(var l=0;l\u003cc;l++){var u=s.readUshort(i,r);r+=2,A.push(e.GSUB.readLigature(i,a+u))}return A},e.GSUB.readLigature=function(i,r){var s=e._bin,a={chain:[]};a.nglyph=s.readUshort(i,r),r+=2;var A=s.readUshort(i,r);r+=2;for(var c=0;c\u003cA-1;c++)a.chain.push(s.readUshort(i,r)),r+=2;return a},e.head={},e.head.parse=function(i,r,s){var a=e._bin,A={};return a.readFixed(i,r),r+=4,A.fontRevision=a.readFixed(i,r),r+=4,a.readUint(i,r),r+=4,a.readUint(i,r),r+=4,A.flags=a.readUshort(i,r),r+=2,A.unitsPerEm=a.readUshort(i,r),r+=2,A.created=a.readUint64(i,r),r+=8,A.modified=a.readUint64(i,r),r+=8,A.xMin=a.readShort(i,r),r+=2,A.yMin=a.readShort(i,r),r+=2,A.xMax=a.readShort(i,r),r+=2,A.yMax=a.readShort(i,r),r+=2,A.macStyle=a.readUshort(i,r),r+=2,A.lowestRecPPEM=a.readUshort(i,r),r+=2,A.fontDirectionHint=a.readShort(i,r),r+=2,A.indexToLocFormat=a.readShort(i,r),r+=2,A.glyphDataFormat=a.readShort(i,r),r+=2,A},e.hhea={},e.hhea.parse=function(i,r,s){var a=e._bin,A={};return a.readFixed(i,r),r+=4,A.ascender=a.readShort(i,r),r+=2,A.descender=a.readShort(i,r),r+=2,A.lineGap=a.readShort(i,r),r+=2,A.advanceWidthMax=a.readUshort(i,r),r+=2,A.minLeftSideBearing=a.readShort(i,r),r+=2,A.minRightSideBearing=a.readShort(i,r),r+=2,A.xMaxExtent=a.readShort(i,r),r+=2,A.caretSlopeRise=a.readShort(i,r),r+=2,A.caretSlopeRun=a.readShort(i,r),r+=2,A.caretOffset=a.readShort(i,r),r+=2,r+=8,A.metricDataFormat=a.readShort(i,r),r+=2,A.numberOfHMetrics=a.readUshort(i,r),r+=2,A},e.hmtx={},e.hmtx.parse=function(i,r,s,a){for(var A=e._bin,c={aWidth:[],lsBearing:[]},l=0,u=0,g=0;g\u003ca.maxp.numGlyphs;g++)g\u003ca.hhea.numberOfHMetrics\u0026\u0026(l=A.readUshort(i,r),r+=2,u=A.readShort(i,r),r+=2),c.aWidth.push(l),c.lsBearing.push(u);return c},e.kern={},e.kern.parse=function(i,r,s,a){var A=e._bin,c=A.readUshort(i,r);if(r+=2,c==1)return e.kern.parseV1(i,r-2,s,a);var l=A.readUshort(i,r);r+=2;for(var u={glyph1:[],rval:[]},g=0;g\u003cl;g++){r+=2,s=A.readUshort(i,r),r+=2;var h=A.readUshort(i,r);r+=2;var d=h\u003e\u003e\u003e8;if((d\u0026=15)!=0)throw\"unknown kern table format: \"+d;r=e.kern.readFormat0(i,r,u)}return u},e.kern.parseV1=function(i,r,s,a){var A=e._bin;A.readFixed(i,r),r+=4;var c=A.readUint(i,r);r+=4;for(var l={glyph1:[],rval:[]},u=0;u\u003cc;u++){A.readUint(i,r),r+=4;var g=A.readUshort(i,r);r+=2,A.readUshort(i,r),r+=2;var h=g\u003e\u003e\u003e8;if((h\u0026=15)!=0)throw\"unknown kern table format: \"+h;r=e.kern.readFormat0(i,r,l)}return l},e.kern.readFormat0=function(i,r,s){var a=e._bin,A=-1,c=a.readUshort(i,r);r+=2,a.readUshort(i,r),r+=2,a.readUshort(i,r),r+=2,a.readUshort(i,r),r+=2;for(var l=0;l\u003cc;l++){var u=a.readUshort(i,r);r+=2;var g=a.readUshort(i,r);r+=2;var h=a.readShort(i,r);r+=2,u!=A\u0026\u0026(s.glyph1.push(u),s.rval.push({glyph2:[],vals:[]}));var d=s.rval[s.rval.length-1];d.glyph2.push(g),d.vals.push(h),A=u}return r},e.loca={},e.loca.parse=function(i,r,s,a){var A=e._bin,c=[],l=a.head.indexToLocFormat,u=a.maxp.numGlyphs+1;if(l==0)for(var g=0;g\u003cu;g++)c.push(A.readUshort(i,r+(g\u003c\u003c1))\u003c\u003c1);if(l==1)for(g=0;g\u003cu;g++)c.push(A.readUint(i,r+(g\u003c\u003c2)));return c},e.maxp={},e.maxp.parse=function(i,r,s){var a=e._bin,A={},c=a.readUint(i,r);return r+=4,A.numGlyphs=a.readUshort(i,r),r+=2,c==65536\u0026\u0026(A.maxPoints=a.readUshort(i,r),r+=2,A.maxContours=a.readUshort(i,r),r+=2,A.maxCompositePoints=a.readUshort(i,r),r+=2,A.maxCompositeContours=a.readUshort(i,r),r+=2,A.maxZones=a.readUshort(i,r),r+=2,A.maxTwilightPoints=a.readUshort(i,r),r+=2,A.maxStorage=a.readUshort(i,r),r+=2,A.maxFunctionDefs=a.readUshort(i,r),r+=2,A.maxInstructionDefs=a.readUshort(i,r),r+=2,A.maxStackElements=a.readUshort(i,r),r+=2,A.maxSizeOfInstructions=a.readUshort(i,r),r+=2,A.maxComponentElements=a.readUshort(i,r),r+=2,A.maxComponentDepth=a.readUshort(i,r),r+=2),A},e.name={},e.name.parse=function(i,r,s){var a=e._bin,A={};a.readUshort(i,r),r+=2;var c=a.readUshort(i,r);r+=2,a.readUshort(i,r);for(var l,u=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"ID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"urlVendor\",\"urlDesigner\",\"licence\",\"licenceURL\",\"---\",\"typoFamilyName\",\"typoSubfamilyName\",\"compatibleFull\",\"sampleText\",\"postScriptCID\",\"wwsFamilyName\",\"wwsSubfamilyName\",\"lightPalette\",\"darkPalette\"],g=r+=2,h=0;h\u003cc;h++){var d=a.readUshort(i,r);r+=2;var p=a.readUshort(i,r);r+=2;var m=a.readUshort(i,r);r+=2;var _=a.readUshort(i,r);r+=2;var f=a.readUshort(i,r);r+=2;var I=a.readUshort(i,r);r+=2;var C,y=u[_],x=g+12*c+I;if(d==0)C=a.readUnicode(i,x,f/2);else if(d==3\u0026\u0026p==0)C=a.readUnicode(i,x,f/2);else if(p==0)C=a.readASCII(i,x,f);else if(p==1)C=a.readUnicode(i,x,f/2);else if(p==3)C=a.readUnicode(i,x,f/2);else{if(d!=1)throw\"unknown encoding \"+p+\", platformID: \"+d;C=a.readASCII(i,x,f),console.debug(\"reading unknown MAC encoding \"+p+\" as ASCII\")}var E=\"p\"+d+\",\"+m.toString(16);A[E]==null\u0026\u0026(A[E]={}),A[E][y!==void 0?y:_]=C,A[E]._lang=m}for(var B in A)if(A[B].postScriptName!=null\u0026\u0026A[B]._lang==1033)return A[B];for(var B in A)if(A[B].postScriptName!=null\u0026\u0026A[B]._lang==0)return A[B];for(var B in A)if(A[B].postScriptName!=null\u0026\u0026A[B]._lang==3084)return A[B];for(var B in A)if(A[B].postScriptName!=null)return A[B];for(var B in A){l=B;break}return console.debug(\"returning name table with languageID \"+A[l]._lang),A[l]},e[\"OS/2\"]={},e[\"OS/2\"].parse=function(i,r,s){var a=e._bin.readUshort(i,r);r+=2;var A={};if(a==0)e[\"OS/2\"].version0(i,r,A);else if(a==1)e[\"OS/2\"].version1(i,r,A);else if(a==2||a==3||a==4)e[\"OS/2\"].version2(i,r,A);else{if(a!=5)throw\"unknown OS/2 table version: \"+a;e[\"OS/2\"].version5(i,r,A)}return A},e[\"OS/2\"].version0=function(i,r,s){var a=e._bin;return s.xAvgCharWidth=a.readShort(i,r),r+=2,s.usWeightClass=a.readUshort(i,r),r+=2,s.usWidthClass=a.readUshort(i,r),r+=2,s.fsType=a.readUshort(i,r),r+=2,s.ySubscriptXSize=a.readShort(i,r),r+=2,s.ySubscriptYSize=a.readShort(i,r),r+=2,s.ySubscriptXOffset=a.readShort(i,r),r+=2,s.ySubscriptYOffset=a.readShort(i,r),r+=2,s.ySuperscriptXSize=a.readShort(i,r),r+=2,s.ySuperscriptYSize=a.readShort(i,r),r+=2,s.ySuperscriptXOffset=a.readShort(i,r),r+=2,s.ySuperscriptYOffset=a.readShort(i,r),r+=2,s.yStrikeoutSize=a.readShort(i,r),r+=2,s.yStrikeoutPosition=a.readShort(i,r),r+=2,s.sFamilyClass=a.readShort(i,r),r+=2,s.panose=a.readBytes(i,r,10),r+=10,s.ulUnicodeRange1=a.readUint(i,r),r+=4,s.ulUnicodeRange2=a.readUint(i,r),r+=4,s.ulUnicodeRange3=a.readUint(i,r),r+=4,s.ulUnicodeRange4=a.readUint(i,r),r+=4,s.achVendID=[a.readInt8(i,r),a.readInt8(i,r+1),a.readInt8(i,r+2),a.readInt8(i,r+3)],r+=4,s.fsSelection=a.readUshort(i,r),r+=2,s.usFirstCharIndex=a.readUshort(i,r),r+=2,s.usLastCharIndex=a.readUshort(i,r),r+=2,s.sTypoAscender=a.readShort(i,r),r+=2,s.sTypoDescender=a.readShort(i,r),r+=2,s.sTypoLineGap=a.readShort(i,r),r+=2,s.usWinAscent=a.readUshort(i,r),r+=2,s.usWinDescent=a.readUshort(i,r),r+=2},e[\"OS/2\"].version1=function(i,r,s){var a=e._bin;return r=e[\"OS/2\"].version0(i,r,s),s.ulCodePageRange1=a.readUint(i,r),r+=4,s.ulCodePageRange2=a.readUint(i,r),r+=4},e[\"OS/2\"].version2=function(i,r,s){var a=e._bin;return r=e[\"OS/2\"].version1(i,r,s),s.sxHeight=a.readShort(i,r),r+=2,s.sCapHeight=a.readShort(i,r),r+=2,s.usDefault=a.readUshort(i,r),r+=2,s.usBreak=a.readUshort(i,r),r+=2,s.usMaxContext=a.readUshort(i,r),r+=2},e[\"OS/2\"].version5=function(i,r,s){var a=e._bin;return r=e[\"OS/2\"].version2(i,r,s),s.usLowerOpticalPointSize=a.readUshort(i,r),r+=2,s.usUpperOpticalPointSize=a.readUshort(i,r),r+=2},e.post={},e.post.parse=function(i,r,s){var a=e._bin,A={};return A.version=a.readFixed(i,r),r+=4,A.italicAngle=a.readFixed(i,r),r+=4,A.underlinePosition=a.readShort(i,r),r+=2,A.underlineThickness=a.readShort(i,r),r+=2,A},e==null\u0026\u0026(e={}),e.U==null\u0026\u0026(e.U={}),e.U.codeToGlyph=function(i,r){var s=i.cmap,a=-1;if(s.p0e4!=null?a=s.p0e4:s.p3e1!=null?a=s.p3e1:s.p1e0!=null?a=s.p1e0:s.p0e3!=null\u0026\u0026(a=s.p0e3),a==-1)throw\"no familiar platform and encoding!\";var A=s.tables[a];if(A.format==0)return r\u003e=A.map.length?0:A.map[r];if(A.format==4){for(var c=-1,l=0;l\u003cA.endCount.length;l++)if(r\u003c=A.endCount[l]){c=l;break}return c==-1||A.startCount[c]\u003er?0:65535\u0026(A.idRangeOffset[c]!=0?A.glyphIdArray[r-A.startCount[c]+(A.idRangeOffset[c]\u003e\u003e1)-(A.idRangeOffset.length-c)]:r+A.idDelta[c])}if(A.format==12){if(r\u003eA.groups[A.groups.length-1][1])return 0;for(l=0;l\u003cA.groups.length;l++){var u=A.groups[l];if(u[0]\u003c=r\u0026\u0026r\u003c=u[1])return u[2]+(r-u[0])}return 0}throw\"unknown cmap table format \"+A.format},e.U.glyphToPath=function(i,r){var s={cmds:[],crds:[]};if(i.SVG\u0026\u0026i.SVG.entries[r]){var a=i.SVG.entries[r];return a==null?s:(typeof a==\"string\"\u0026\u0026(a=e.SVG.toPath(a),i.SVG.entries[r]=a),a)}if(i.CFF){var A={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:i.CFF.Private?i.CFF.Private.defaultWidthX:0,open:!1},c=i.CFF,l=i.CFF.Private;if(c.ROS){for(var u=0;c.FDSelect[u+2]\u003c=r;)u+=2;l=c.FDArray[c.FDSelect[u+1]].Private}e.U._drawCFF(i.CFF.CharStrings[r],A,c,l,s)}else i.glyf\u0026\u0026e.U._drawGlyf(r,i,s);return s},e.U._drawGlyf=function(i,r,s){var a=r.glyf[i];a==null\u0026\u0026(a=r.glyf[i]=e.glyf._parseGlyf(r,i)),a!=null\u0026\u0026(a.noc\u003e-1?e.U._simpleGlyph(a,s):e.U._compoGlyph(a,r,s))},e.U._simpleGlyph=function(i,r){for(var s=0;s\u003ci.noc;s++){for(var a=s==0?0:i.endPts[s-1]+1,A=i.endPts[s],c=a;c\u003c=A;c++){var l=c==a?A:c-1,u=c==A?a:c+1,g=1\u0026i.flags[c],h=1\u0026i.flags[l],d=1\u0026i.flags[u],p=i.xs[c],m=i.ys[c];if(c==a)if(g){if(!h){e.U.P.moveTo(r,p,m);continue}e.U.P.moveTo(r,i.xs[l],i.ys[l])}else h?e.U.P.moveTo(r,i.xs[l],i.ys[l]):e.U.P.moveTo(r,(i.xs[l]+p)/2,(i.ys[l]+m)/2);g?h\u0026\u0026e.U.P.lineTo(r,p,m):d?e.U.P.qcurveTo(r,p,m,i.xs[u],i.ys[u]):e.U.P.qcurveTo(r,p,m,(p+i.xs[u])/2,(m+i.ys[u])/2)}e.U.P.closePath(r)}},e.U._compoGlyph=function(i,r,s){for(var a=0;a\u003ci.parts.length;a++){var A={cmds:[],crds:[]},c=i.parts[a];e.U._drawGlyf(c.glyphIndex,r,A);for(var l=c.m,u=0;u\u003cA.crds.length;u+=2){var g=A.crds[u],h=A.crds[u+1];s.crds.push(g*l.a+h*l.b+l.tx),s.crds.push(g*l.c+h*l.d+l.ty)}for(u=0;u\u003cA.cmds.length;u++)s.cmds.push(A.cmds[u])}},e.U._getGlyphClass=function(i,r){var s=e._lctf.getInterval(r,i);return s==-1?0:r[s+2]},e.U._applySubs=function(i,r,s,a){for(var A=i.length-r-1,c=0;c\u003cs.tabs.length;c++)if(s.tabs[c]!=null){var l,u=s.tabs[c];if(!u.coverage||(l=e._lctf.coverageIndex(u.coverage,i[r]))!=-1){if(s.ltype==1)i[r],u.fmt==1?i[r]=i[r]+u.delta:i[r]=u.newg[l];else if(s.ltype==4)for(var g=u.vals[l],h=0;h\u003cg.length;h++){var d=g[h],p=d.chain.length;if(!(p\u003eA)){for(var m=!0,_=0,f=0;f\u003cp;f++){for(;i[r+_+(1+f)]==-1;)_++;d.chain[f]!=i[r+_+(1+f)]\u0026\u0026(m=!1)}if(m){for(i[r]=d.nglyph,f=0;f\u003cp+_;f++)i[r+f+1]=-1;break}}}else if(s.ltype==5\u0026\u0026u.fmt==2)for(var I=e._lctf.getInterval(u.cDef,i[r]),C=u.cDef[I+2],y=u.scset[C],x=0;x\u003cy.length;x++){var E=y[x],B=E.input;if(!(B.length\u003eA)){for(m=!0,f=0;f\u003cB.length;f++){var S=e._lctf.getInterval(u.cDef,i[r+1+f]);if(I==-1\u0026\u0026u.cDef[S+2]!=B[f]){m=!1;break}}if(m){var Q=E.substLookupRecords;for(h=0;h\u003cQ.length;h+=2)Q[h],Q[h+1]}}}else if(s.ltype==6\u0026\u0026u.fmt==3){if(!e.U._glsCovered(i,u.backCvg,r-u.backCvg.length)||!e.U._glsCovered(i,u.inptCvg,r)||!e.U._glsCovered(i,u.ahedCvg,r+u.inptCvg.length))continue;var w=u.lookupRec;for(x=0;x\u003cw.length;x+=2){I=w[x];var M=a[w[x+1]];e.U._applySubs(i,r+I,M,a)}}}}},e.U._glsCovered=function(i,r,s){for(var a=0;a\u003cr.length;a++)if(e._lctf.coverageIndex(r[a],i[s+a])==-1)return!1;return!0},e.U.glyphsToPath=function(i,r,s){for(var a={cmds:[],crds:[]},A=0,c=0;c\u003cr.length;c++){var l=r[c];if(l!=-1){for(var u=c\u003cr.length-1\u0026\u0026r[c+1]!=-1?r[c+1]:0,g=e.U.glyphToPath(i,l),h=0;h\u003cg.crds.length;h+=2)a.crds.push(g.crds[h]+A),a.crds.push(g.crds[h+1]);for(s\u0026\u0026a.cmds.push(s),h=0;h\u003cg.cmds.length;h++)a.cmds.push(g.cmds[h]);s\u0026\u0026a.cmds.push(\"X\"),A+=i.hmtx.aWidth[l],c\u003cr.length-1\u0026\u0026(A+=e.U.getPairAdjustment(i,l,u))}}return a},e.U.P={},e.U.P.moveTo=function(i,r,s){i.cmds.push(\"M\"),i.crds.push(r,s)},e.U.P.lineTo=function(i,r,s){i.cmds.push(\"L\"),i.crds.push(r,s)},e.U.P.curveTo=function(i,r,s,a,A,c,l){i.cmds.push(\"C\"),i.crds.push(r,s,a,A,c,l)},e.U.P.qcurveTo=function(i,r,s,a,A){i.cmds.push(\"Q\"),i.crds.push(r,s,a,A)},e.U.P.closePath=function(i){i.cmds.push(\"Z\")},e.U._drawCFF=function(i,r,s,a,A){for(var c=r.stack,l=r.nStems,u=r.haveWidth,g=r.width,h=r.open,d=0,p=r.x,m=r.y,_=0,f=0,I=0,C=0,y=0,x=0,E=0,B=0,S=0,Q=0,w={val:0,size:0};d\u003ci.length;){e.CFF.getCharString(i,d,w);var M=w.val;if(d+=w.size,M==\"o1\"||M==\"o18\")c.length%2!=0\u0026\u0026!u\u0026\u0026(g=c.shift()+a.nominalWidthX),l+=c.length\u003e\u003e1,c.length=0,u=!0;else if(M==\"o3\"||M==\"o23\")c.length%2!=0\u0026\u0026!u\u0026\u0026(g=c.shift()+a.nominalWidthX),l+=c.length\u003e\u003e1,c.length=0,u=!0;else if(M==\"o4\")c.length\u003e1\u0026\u0026!u\u0026\u0026(g=c.shift()+a.nominalWidthX,u=!0),h\u0026\u0026e.U.P.closePath(A),m+=c.pop(),e.U.P.moveTo(A,p,m),h=!0;else if(M==\"o5\")for(;c.length\u003e0;)p+=c.shift(),m+=c.shift(),e.U.P.lineTo(A,p,m);else if(M==\"o6\"||M==\"o7\")for(var k=c.length,R=M==\"o6\",F=0;F\u003ck;F++){var O=c.shift();R?p+=O:m+=O,R=!R,e.U.P.lineTo(A,p,m)}else if(M==\"o8\"||M==\"o24\"){k=c.length;for(var U=0;U+6\u003c=k;)_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),p=I+c.shift(),m=C+c.shift(),e.U.P.curveTo(A,_,f,I,C,p,m),U+=6;M==\"o24\"\u0026\u0026(p+=c.shift(),m+=c.shift(),e.U.P.lineTo(A,p,m))}else{if(M==\"o11\")break;if(M==\"o1234\"||M==\"o1235\"||M==\"o1236\"||M==\"o1237\")M==\"o1234\"\u0026\u0026(f=m,I=(_=p+c.shift())+c.shift(),Q=C=f+c.shift(),x=C,B=m,p=(E=(y=(S=I+c.shift())+c.shift())+c.shift())+c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m)),M==\"o1235\"\u0026\u0026(_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),S=I+c.shift(),Q=C+c.shift(),y=S+c.shift(),x=Q+c.shift(),E=y+c.shift(),B=x+c.shift(),p=E+c.shift(),m=B+c.shift(),c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m)),M==\"o1236\"\u0026\u0026(_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),Q=C=f+c.shift(),x=C,E=(y=(S=I+c.shift())+c.shift())+c.shift(),B=x+c.shift(),p=E+c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m)),M==\"o1237\"\u0026\u0026(_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),S=I+c.shift(),Q=C+c.shift(),y=S+c.shift(),x=Q+c.shift(),E=y+c.shift(),B=x+c.shift(),Math.abs(E-p)\u003eMath.abs(B-m)?p=E+c.shift():m=B+c.shift(),e.U.P.curveTo(A,_,f,I,C,S,Q),e.U.P.curveTo(A,y,x,E,B,p,m));else if(M==\"o14\"){if(c.length\u003e0\u0026\u0026!u\u0026\u0026(g=c.shift()+s.nominalWidthX,u=!0),c.length==4){var Y=c.shift(),W=c.shift(),te=c.shift(),j=c.shift(),J=e.CFF.glyphBySE(s,te),oe=e.CFF.glyphBySE(s,j);e.U._drawCFF(s.CharStrings[J],r,s,a,A),r.x=Y,r.y=W,e.U._drawCFF(s.CharStrings[oe],r,s,a,A)}h\u0026\u0026(e.U.P.closePath(A),h=!1)}else if(M==\"o19\"||M==\"o20\")c.length%2!=0\u0026\u0026!u\u0026\u0026(g=c.shift()+a.nominalWidthX),l+=c.length\u003e\u003e1,c.length=0,u=!0,d+=l+7\u003e\u003e3;else if(M==\"o21\")c.length\u003e2\u0026\u0026!u\u0026\u0026(g=c.shift()+a.nominalWidthX,u=!0),m+=c.pop(),p+=c.pop(),h\u0026\u0026e.U.P.closePath(A),e.U.P.moveTo(A,p,m),h=!0;else if(M==\"o22\")c.length\u003e1\u0026\u0026!u\u0026\u0026(g=c.shift()+a.nominalWidthX,u=!0),p+=c.pop(),h\u0026\u0026e.U.P.closePath(A),e.U.P.moveTo(A,p,m),h=!0;else if(M==\"o25\"){for(;c.length\u003e6;)p+=c.shift(),m+=c.shift(),e.U.P.lineTo(A,p,m);_=p+c.shift(),f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),p=I+c.shift(),m=C+c.shift(),e.U.P.curveTo(A,_,f,I,C,p,m)}else if(M==\"o26\")for(c.length%2\u0026\u0026(p+=c.shift());c.length\u003e0;)_=p,f=m+c.shift(),p=I=_+c.shift(),m=(C=f+c.shift())+c.shift(),e.U.P.curveTo(A,_,f,I,C,p,m);else if(M==\"o27\")for(c.length%2\u0026\u0026(m+=c.shift());c.length\u003e0;)f=m,I=(_=p+c.shift())+c.shift(),C=f+c.shift(),p=I+c.shift(),m=C,e.U.P.curveTo(A,_,f,I,C,p,m);else if(M==\"o10\"||M==\"o29\"){var ie=M==\"o10\"?a:s;if(c.length==0)console.debug(\"error: empty stack\");else{var ne=c.pop(),le=ie.Subrs[ne+ie.Bias];r.x=p,r.y=m,r.nStems=l,r.haveWidth=u,r.width=g,r.open=h,e.U._drawCFF(le,r,s,a,A),p=r.x,m=r.y,l=r.nStems,u=r.haveWidth,g=r.width,h=r.open}}else if(M==\"o30\"||M==\"o31\"){var ge=c.length,_e=(U=0,M==\"o31\");for(U+=ge-(k=-3\u0026ge);U\u003ck;)_e?(f=m,I=(_=p+c.shift())+c.shift(),m=(C=f+c.shift())+c.shift(),k-U==5?(p=I+c.shift(),U++):p=I,_e=!1):(_=p,f=m+c.shift(),I=_+c.shift(),C=f+c.shift(),p=I+c.shift(),k-U==5?(m=C+c.shift(),U++):m=C,_e=!0),e.U.P.curveTo(A,_,f,I,C,p,m),U+=4}else{if((M+\"\").charAt(0)==\"o\")throw console.debug(\"Unknown operation: \"+M,i),M;c.push(M)}}}r.x=p,r.y=m,r.nStems=l,r.haveWidth=u,r.width=g,r.open=h};var n=e,o={Typr:n};return t.Typr=n,t.default=o,Object.defineProperty(t,\"__esModule\",{value:!0}),t})({}).Typr}function Koi(){return(function(t){var e=Uint8Array,n=Uint16Array,o=Uint32Array,i=new e([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),r=new e([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(M,k){for(var R=new n(31),F=0;F\u003c31;++F)R[F]=k+=1\u003c\u003cM[F-1];var O=new o(R[30]);for(F=1;F\u003c30;++F)for(var U=R[F];U\u003cR[F+1];++U)O[U]=U-R[F]\u003c\u003c5|F;return[R,O]},A=a(i,2),c=A[0],l=A[1];c[28]=258,l[258]=28;for(var u=a(r,0)[0],g=new n(32768),h=0;h\u003c32768;++h){var d=(43690\u0026h)\u003e\u003e\u003e1|(21845\u0026h)\u003c\u003c1;d=(61680\u0026(d=(52428\u0026d)\u003e\u003e\u003e2|(13107\u0026d)\u003c\u003c2))\u003e\u003e\u003e4|(3855\u0026d)\u003c\u003c4,g[h]=((65280\u0026d)\u003e\u003e\u003e8|(255\u0026d)\u003c\u003c8)\u003e\u003e\u003e1}var p=function(M,k,R){for(var F=M.length,O=0,U=new n(k);O\u003cF;++O)++U[M[O]-1];var Y,W=new n(k);for(O=0;O\u003ck;++O)W[O]=W[O-1]+U[O-1]\u003c\u003c1;{Y=new n(1\u003c\u003ck);var te=15-k;for(O=0;O\u003cF;++O)if(M[O])for(var j=O\u003c\u003c4|M[O],J=k-M[O],oe=W[M[O]-1]++\u003c\u003cJ,ie=oe|(1\u003c\u003cJ)-1;oe\u003c=ie;++oe)Y[g[oe]\u003e\u003e\u003ete]=j}return Y},m=new e(288);for(h=0;h\u003c144;++h)m[h]=8;for(h=144;h\u003c256;++h)m[h]=9;for(h=256;h\u003c280;++h)m[h]=7;for(h=280;h\u003c288;++h)m[h]=8;var _=new e(32);for(h=0;h\u003c32;++h)_[h]=5;var f=p(m,9),I=p(_,5),C=function(M){for(var k=M[0],R=1;R\u003cM.length;++R)M[R]\u003ek\u0026\u0026(k=M[R]);return k},y=function(M,k,R){var F=k/8|0;return(M[F]|M[F+1]\u003c\u003c8)\u003e\u003e(7\u0026k)\u0026R},x=function(M,k){var R=k/8|0;return(M[R]|M[R+1]\u003c\u003c8|M[R+2]\u003c\u003c16)\u003e\u003e(7\u0026k)},E=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],B=function(M,k,R){var F=new Error(k||E[M]);if(F.code=M,Error.captureStackTrace\u0026\u0026Error.captureStackTrace(F,B),!R)throw F;return F},S=function(M,k,R){var F=M.length;if(!F||R\u0026\u0026!R.l\u0026\u0026F\u003c5)return k||new e(0);var O=!k||R,U=!R||R.i;R||(R={}),k||(k=new e(3*F));var Y,W=function(it){var Yt=k.length;if(it\u003eYt){var pn=new e(Math.max(2*Yt,it));pn.set(k),k=pn}},te=R.f||0,j=R.p||0,J=R.b||0,oe=R.l,ie=R.d,ne=R.m,le=R.n,ge=8*F;do{if(!oe){R.f=te=y(M,j,1);var _e=y(M,j+1,3);if(j+=3,!_e){var ue=M[(Re=((Y=j)/8|0)+(7\u0026Y\u0026\u00261)+4)-4]|M[Re-3]\u003c\u003c8,fe=Re+ue;if(fe\u003eF){U\u0026\u0026B(0);break}O\u0026\u0026W(J+ue),k.set(M.subarray(Re,fe),J),R.b=J+=ue,R.p=j=8*fe;continue}if(_e==1)oe=f,ie=I,ne=9,le=5;else if(_e==2){var pe=y(M,j,31)+257,ye=y(M,j+10,15)+4,Me=pe+y(M,j+5,31)+1;j+=14;for(var ve=new e(Me),he=new e(19),Qe=0;Qe\u003cye;++Qe)he[s[Qe]]=y(M,j+3*Qe,7);j+=3*ye;var Pe=C(he),we=(1\u003c\u003cPe)-1,Te=p(he,Pe);for(Qe=0;Qe\u003cMe;){var Re,Ee=Te[y(M,j,we)];if(j+=15\u0026Ee,(Re=Ee\u003e\u003e\u003e4)\u003c16)ve[Qe++]=Re;else{var ke=0,Ce=0;for(Re==16?(Ce=3+y(M,j,3),j+=2,ke=ve[Qe-1]):Re==17?(Ce=3+y(M,j,7),j+=3):Re==18\u0026\u0026(Ce=11+y(M,j,127),j+=7);Ce--;)ve[Qe++]=ke}}var Le=ve.subarray(0,pe),Ye=ve.subarray(pe);ne=C(Le),le=C(Ye),oe=p(Le,ne),ie=p(Ye,le)}else B(1);if(j\u003ege){U\u0026\u0026B(0);break}}O\u0026\u0026W(J+131072);for(var tt=(1\u003c\u003cne)-1,At=(1\u003c\u003cle)-1,at=j;;at=j){var nt=(ke=oe[x(M,j)\u0026tt])\u003e\u003e\u003e4;if((j+=15\u0026ke)\u003ege){U\u0026\u0026B(0);break}if(ke||B(2),nt\u003c256)k[J++]=nt;else{if(nt==256){at=j,oe=null;break}var gt=nt-254;if(nt\u003e264){var bt=i[Qe=nt-257];gt=y(M,j,(1\u003c\u003cbt)-1)+c[Qe],j+=bt}var Ct=ie[x(M,j)\u0026At],Dt=Ct\u003e\u003e\u003e4;if(Ct||B(3),j+=15\u0026Ct,Ye=u[Dt],Dt\u003e3\u0026\u0026(bt=r[Dt],Ye+=x(M,j)\u0026(1\u003c\u003cbt)-1,j+=bt),j\u003ege){U\u0026\u0026B(0);break}O\u0026\u0026W(J+131072);for(var kt=J+gt;J\u003ckt;J+=4)k[J]=k[J-Ye],k[J+1]=k[J+1-Ye],k[J+2]=k[J+2-Ye],k[J+3]=k[J+3-Ye];J=kt}}R.l=oe,R.p=at,R.b=J,oe\u0026\u0026(te=1,R.m=ne,R.d=ie,R.n=le)}while(!te);return J==k.length?k:(function(it,Yt,pn){(pn==null||pn\u003eit.length)\u0026\u0026(pn=it.length);var be=new(it instanceof n?n:it instanceof o?o:e)(pn-Yt);return be.set(it.subarray(Yt,pn)),be})(k,0,J)},Q=new e(0),w=typeof TextDecoder\u003c\"u\"\u0026\u0026new TextDecoder;try{w.decode(Q,{stream:!0})}catch{}return t.convert_streams=function(M){var k=new DataView(M),R=0;function F(){var pe=k.getUint16(R);return R+=2,pe}function O(){var pe=k.getUint32(R);return R+=4,pe}function U(pe){ue.setUint16(fe,pe),fe+=2}function Y(pe){ue.setUint32(fe,pe),fe+=4}for(var W={signature:O(),flavor:O(),length:O(),numTables:F(),reserved:F(),totalSfntSize:O(),majorVersion:F(),minorVersion:F(),metaOffset:O(),metaLength:O(),metaOrigLength:O(),privOffset:O(),privLength:O()},te=0;Math.pow(2,te)\u003c=W.numTables;)te++;te--;for(var j=16*Math.pow(2,te),J=16*W.numTables-j,oe=12,ie=[],ne=0;ne\u003cW.numTables;ne++)ie.push({tag:O(),offset:O(),compLength:O(),origLength:O(),origChecksum:O()}),oe+=16;var le,ge=new Uint8Array(12+16*ie.length+ie.reduce((function(pe,ye){return pe+ye.origLength+4}),0)),_e=ge.buffer,ue=new DataView(_e),fe=0;return Y(W.flavor),U(W.numTables),U(j),U(te),U(J),ie.forEach((function(pe){Y(pe.tag),Y(pe.origChecksum),Y(oe),Y(pe.origLength),pe.outOffset=oe,(oe+=pe.origLength)%4!=0\u0026\u0026(oe+=4-oe%4)})),ie.forEach((function(pe){var ye,Me=M.slice(pe.offset,pe.offset+pe.compLength);if(pe.compLength!=pe.origLength){var ve=new Uint8Array(pe.origLength);ye=new Uint8Array(Me,2),S(ye,ve)}else ve=new Uint8Array(Me);ge.set(ve,pe.outOffset);var he=0;(oe=pe.outOffset+pe.origLength)%4!=0\u0026\u0026(he=4-oe%4),ge.set(new Uint8Array(he).buffer,pe.outOffset+pe.origLength),le=oe+he})),_e.slice(0,le)},Object.defineProperty(t,\"__esModule\",{value:!0}),t})({}).convert_streams}function Voi(t,e){const n={M:2,L:2,Q:4,C:6,Z:0},o={C:\"18g,ca,368,1kz\",D:\"17k,6,2,2+4,5+c,2+6,2+1,10+1,9+f,j+11,2+1,a,2,2+1,15+2,3,j+2,6+3,2+8,2,2,2+1,w+a,4+e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,3y,2p+v,ff+3,30+1,n9x,1+2,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,5s,6y+2,ea,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+9,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2,2b+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,470+8,at4+4,1o+6,t5,1s+3,2a,f5l+1,2+3,43o+2,a+7,1+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,1,gzau,v+2n,3l+6n\"},i=1,r=2,s=4,a=8,A=16,c=32;let l;function u(E){if(!l){const B={R:r,L:i,D:s,C:A,U:c,T:a};l=new Map;for(let S in o){let Q=0;o[S].split(\",\").forEach(w=\u003e{let[M,k]=w.split(\"+\");M=parseInt(M,36),k=k?parseInt(k,36):0,l.set(Q+=M,B[S]);for(let R=k;R--;)l.set(++Q,B[S])})}}return l.get(E)||c}const g=1,h=2,d=3,p=4,m=[null,\"isol\",\"init\",\"fina\",\"medi\"];function _(E){const B=new Uint8Array(E.length);let S=c,Q=g,w=-1;for(let M=0;M\u003cE.length;M++){const k=E.codePointAt(M);let R=u(k)|0,F=g;R\u0026a||(S\u0026(i|s|A)?R\u0026(r|s|A)?(F=d,(Q===g||Q===d)\u0026\u0026B[w]++):R\u0026(i|c)\u0026\u0026(Q===h||Q===p)\u0026\u0026B[w]--:S\u0026(r|c)\u0026\u0026(Q===h||Q===p)\u0026\u0026B[w]--,Q=B[M]=F,S=R,w=M,k\u003e65535\u0026\u0026M++)}return B}function f(E,B){const S=[];for(let w=0;w\u003cB.length;w++){const M=B.codePointAt(w);M\u003e65535\u0026\u0026w++,S.push(t.U.codeToGlyph(E,M))}const Q=E.GSUB;if(Q){const{lookupList:w,featureList:M}=Q;let k;const R=/^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws|ccmp)$/,F=[];M.forEach(O=\u003e{if(R.test(O.tag))for(let U=0;U\u003cO.tab.length;U++){if(F[O.tab[U]])continue;F[O.tab[U]]=!0;const Y=w[O.tab[U]],W=/^(isol|init|fina|medi)$/.test(O.tag);W\u0026\u0026!k\u0026\u0026(k=_(B));for(let te=0;te\u003cS.length;te++)(!k||!W||m[k[te]]===O.tag)\u0026\u0026t.U._applySubs(S,te,Y,w)}})}return S}function I(E,B){const S=new Int16Array(B.length*3);let Q=0;for(;Q\u003cB.length;Q++){const R=B[Q];if(R===-1)continue;S[Q*3+2]=E.hmtx.aWidth[R];const F=E.GPOS;if(F){const O=F.lookupList;for(let U=0;U\u003cO.length;U++){const Y=O[U];for(let W=0;W\u003cY.tabs.length;W++){const te=Y.tabs[W];if(Y.ltype===1){if(t._lctf.coverageIndex(te.coverage,R)!==-1\u0026\u0026te.pos){k(te.pos,Q);break}}else if(Y.ltype===2){let j=null,J=w();if(J!==-1){const oe=t._lctf.coverageIndex(te.coverage,B[J]);if(oe!==-1){if(te.fmt===1){const ie=te.pairsets[oe];for(let ne=0;ne\u003cie.length;ne++)ie[ne].gid2===R\u0026\u0026(j=ie[ne])}else if(te.fmt===2){const ie=t.U._getGlyphClass(B[J],te.classDef1),ne=t.U._getGlyphClass(R,te.classDef2);j=te.matrix[ie][ne]}if(j){j.val1\u0026\u0026k(j.val1,J),j.val2\u0026\u0026k(j.val2,Q);break}}}}else if(Y.ltype===4){const j=t._lctf.coverageIndex(te.markCoverage,R);if(j!==-1){const J=w(M),oe=J===-1?-1:t._lctf.coverageIndex(te.baseCoverage,B[J]);if(oe!==-1){const ie=te.markArray[j],ne=te.baseArray[oe][ie.markClass];S[Q*3]=ne.x-ie.x+S[J*3]-S[J*3+2],S[Q*3+1]=ne.y-ie.y+S[J*3+1];break}}}else if(Y.ltype===6){const j=t._lctf.coverageIndex(te.mark1Coverage,R);if(j!==-1){const J=w();if(J!==-1){const oe=B[J];if(C(E,oe)===3){const ie=t._lctf.coverageIndex(te.mark2Coverage,oe);if(ie!==-1){const ne=te.mark1Array[j],le=te.mark2Array[ie][ne.markClass];S[Q*3]=le.x-ne.x+S[J*3]-S[J*3+2],S[Q*3+1]=le.y-ne.y+S[J*3+1];break}}}}}}}}else if(E.kern\u0026\u0026!E.cff){const O=w();if(O!==-1){const U=E.kern.glyph1.indexOf(B[O]);if(U!==-1){const Y=E.kern.rval[U].glyph2.indexOf(R);Y!==-1\u0026\u0026(S[O*3+2]+=E.kern.rval[U].vals[Y])}}}}return S;function w(R){for(let F=Q-1;F\u003e=0;F--)if(B[F]!==-1\u0026\u0026(!R||R(B[F])))return F;return-1}function M(R){return C(E,R)===1}function k(R,F){for(let O=0;O\u003c3;O++)S[F*3+O]+=R[O]||0}}function C(E,B){const S=E.GDEF\u0026\u0026E.GDEF.glyphClassDef;return S?t.U._getGlyphClass(B,S):0}function y(...E){for(let B=0;B\u003cE.length;B++)if(typeof E[B]==\"number\")return E[B]}function x(E){const B=Object.create(null),S=E[\"OS/2\"],Q=E.hhea,w=E.head.unitsPerEm,M=y(S\u0026\u0026S.sTypoAscender,Q\u0026\u0026Q.ascender,w),k={unitsPerEm:w,ascender:M,descender:y(S\u0026\u0026S.sTypoDescender,Q\u0026\u0026Q.descender,0),capHeight:y(S\u0026\u0026S.sCapHeight,M),xHeight:y(S\u0026\u0026S.sxHeight,M),lineGap:y(S\u0026\u0026S.sTypoLineGap,Q\u0026\u0026Q.lineGap),supportsCodePoint(R){return t.U.codeToGlyph(E,R)\u003e0},forEachGlyph(R,F,O,U){let Y=0;const W=1/k.unitsPerEm*F,te=f(E,R);let j=0;const J=I(E,te);return te.forEach((oe,ie)=\u003e{if(oe!==-1){let ne=B[oe];if(!ne){const{cmds:le,crds:ge}=t.U.glyphToPath(E,oe);let _e=\"\",ue=0;for(let ve=0,he=le.length;ve\u003che;ve++){const Qe=n[le[ve]];_e+=le[ve];for(let Pe=1;Pe\u003c=Qe;Pe++)_e+=(Pe\u003e1?\",\":\"\")+ge[ue++]}let fe,pe,ye,Me;if(ge.length){fe=pe=1/0,ye=Me=-1/0;for(let ve=0,he=ge.length;ve\u003che;ve+=2){let Qe=ge[ve],Pe=ge[ve+1];Qe\u003cfe\u0026\u0026(fe=Qe),Pe\u003cpe\u0026\u0026(pe=Pe),Qe\u003eye\u0026\u0026(ye=Qe),Pe\u003eMe\u0026\u0026(Me=Pe)}}else fe=ye=pe=Me=0;ne=B[oe]={index:oe,advanceWidth:E.hmtx.aWidth[oe],xMin:fe,yMin:pe,xMax:ye,yMax:Me,path:_e}}U.call(null,ne,Y+J[ie*3]*W,J[ie*3+1]*W,j),Y+=J[ie*3+2]*W,O\u0026\u0026(Y+=O*F)}j+=R.codePointAt(j)\u003e65535?2:1}),Y}};return k}return function(B){const S=new Uint8Array(B,0,4),Q=t._bin.readASCII(S,0,4);if(Q===\"wOFF\")B=e(B);else if(Q===\"wOF2\")throw new Error(\"woff2 fonts not supported\");return x(t.parse(B)[0])}}const zoi=yY({name:\"Typr Font Parser\",dependencies:[Uoi,Koi,Voi],init(t,e,n){const o=t(),i=e();return n(o,i)}});function Joi(){return(function(t){var e=function(){this.buckets=new Map};e.prototype.add=function(I){var C=I\u003e\u003e5;this.buckets.set(C,(this.buckets.get(C)||0)|1\u003c\u003c(31\u0026I))},e.prototype.has=function(I){var C=this.buckets.get(I\u003e\u003e5);return C!==void 0\u0026\u0026(C\u00261\u003c\u003c(31\u0026I))!=0},e.prototype.serialize=function(){var I=[];return this.buckets.forEach((function(C,y){I.push((+y).toString(36)+\":\"+C.toString(36))})),I.join(\",\")},e.prototype.deserialize=function(I){var C=this;this.buckets.clear(),I.split(\",\").forEach((function(y){var x=y.split(\":\");C.buckets.set(parseInt(x[0],36),parseInt(x[1],36))}))};var n=Math.pow(2,8),o=n-1,i=~o;function r(I){var C=(function(x){return x\u0026i})(I).toString(16),y=(function(x){return(x\u0026i)+n-1})(I).toString(16);return\"codepoint-index/plane\"+(I\u003e\u003e16)+\"/\"+C+\"-\"+y+\".json\"}function s(I,C){var y=I\u0026o,x=C.codePointAt(y/6|0);return((x=(x||48)-48)\u00261\u003c\u003cy%6)!=0}function a(I,C){var y;(y=I,y.replace(/U\\+/gi,\"\").replace(/^,+|,+$/g,\"\").split(/,+/).map((function(x){return x.split(\"-\").map((function(E){return parseInt(E.trim(),16)}))}))).forEach((function(x){var E=x[0],B=x[1];B===void 0\u0026\u0026(B=E),C(E,B)}))}function A(I,C){a(I,(function(y,x){for(var E=y;E\u003c=x;E++)C(E)}))}var c={},l={},u=new WeakMap,g=\"https://cdn.jsdelivr.net/gh/lojjic/unicode-font-resolver@v1.0.1/packages/data\";function h(I){var C=u.get(I);return C||(C=new e,A(I.ranges,(function(y){return C.add(y)})),u.set(I,C)),C}var d,p=new Map;function m(I,C,y){return I[C]?C:I[y]?y:(function(x){for(var E in x)return E})(I)}function _(I,C){var y=C;if(!I.includes(y)){y=1/0;for(var x=0;x\u003cI.length;x++)Math.abs(I[x]-C)\u003cMath.abs(y-C)\u0026\u0026(y=I[x])}return y}function f(I){return d||(d=new Set,A(\"9-D,20,85,A0,1680,2000-200A,2028-202F,205F,3000\",(function(C){d.add(C)}))),d.has(I)}return t.CodePointSet=e,t.clearCache=function(){c={},l={}},t.getFontsForString=function(I,C){C===void 0\u0026\u0026(C={});var y,x=C.lang;x===void 0\u0026\u0026(x=new RegExp(\"\\\\p{Script=Hangul}\",\"u\").test(y=I)?\"ko\":new RegExp(\"\\\\p{Script=Hiragana}|\\\\p{Script=Katakana}\",\"u\").test(y)?\"ja\":\"en\");var E=C.category;E===void 0\u0026\u0026(E=\"sans-serif\");var B=C.style;B===void 0\u0026\u0026(B=\"normal\");var S=C.weight;S===void 0\u0026\u0026(S=400);var Q=(C.dataUrl||g).replace(/\\/$/g,\"\"),w=new Map,M=new Uint8Array(I.length),k={},R={},F=new Array(I.length),O=new Map,U=!1;function Y(j){var J=p.get(j);return J||(J=fetch(Q+\"/\"+j).then((function(oe){if(!oe.ok)throw new Error(oe.statusText);return oe.json().then((function(ie){if(!Array.isArray(ie)||ie[0]!==1)throw new Error(\"Incorrect schema version; need 1, got \"+ie[0]);return ie[1]}))})).catch((function(oe){if(Q!==g)return U||(console.error('unicode-font-resolver: Failed loading from dataUrl \"'+Q+'\", trying default CDN. '+oe.message),U=!0),Q=g,p.delete(j),Y(j);throw oe})),p.set(j,J)),J}for(var W=function(j){var J=I.codePointAt(j),oe=r(J);F[j]=oe,c[oe]||O.has(oe)||O.set(oe,Y(oe).then((function(ie){c[oe]=ie}))),J\u003e65535\u0026\u0026(j++,te=j)},te=0;te\u003cI.length;te++)W(te);return Promise.all(O.values()).then((function(){O.clear();for(var j=function(oe){var ie=I.codePointAt(oe),ne=null,le=c[F[oe]],ge=void 0;for(var _e in le){var ue=R[_e];if(ue===void 0\u0026\u0026(ue=R[_e]=new RegExp(_e).test(x||\"en\")),ue){for(var fe in ge=_e,le[_e])if(s(ie,le[_e][fe])){ne=fe;break}break}}if(!ne){e:for(var pe in le)if(pe!==ge){for(var ye in le[pe])if(s(ie,le[pe][ye])){ne=ye;break e}}}ne||(console.debug(\"No font coverage for U+\"+ie.toString(16)),ne=\"latin\"),F[oe]=ne,l[ne]||O.has(ne)||O.set(ne,Y(\"font-meta/\"+ne+\".json\").then((function(Me){l[ne]=Me}))),ie\u003e65535\u0026\u0026(oe++,J=oe)},J=0;J\u003cI.length;J++)j(J);return Promise.all(O.values())})).then((function(){for(var j,J=null,oe=0;oe\u003cI.length;oe++){var ie=I.codePointAt(oe);if(J\u0026\u0026(f(ie)||h(J).has(ie)))M[oe]=M[oe-1];else{J=l[F[oe]];var ne=k[J.id];if(!ne){var le=J.typeforms,ge=m(le,E,\"sans-serif\"),_e=m(le[ge],B,\"normal\"),ue=_((j=le[ge])===null||j===void 0?void 0:j[_e],S);ne=k[J.id]=Q+\"/font-files/\"+J.id+\"/\"+ge+\".\"+_e+\".\"+ue+\".woff\"}var fe=w.get(ne);fe==null\u0026\u0026(fe=w.size,w.set(ne,fe)),M[oe]=fe}ie\u003e65535\u0026\u0026(oe++,M[oe]=M[oe-1])}return{fontUrls:Array.from(w.keys()),chars:M}}))},Object.defineProperty(t,\"__esModule\",{value:!0}),t})({})}function Woi(t,e){const n=Object.create(null),o=Object.create(null);function i(s,a){const A=c=\u003e{console.error(`Failure loading font ${s}`,c)};try{const c=new XMLHttpRequest;c.open(\"get\",s,!0),c.responseType=\"arraybuffer\",c.onload=function(){if(c.status\u003e=400)A(new Error(c.statusText));else if(c.status\u003e0)try{const l=t(c.response);l.src=s,a(l)}catch(l){A(l)}},c.onerror=A,c.send()}catch(c){A(c)}}function r(s,a){let A=n[s];A?a(A):o[s]?o[s].push(a):(o[s]=[a],i(s,c=\u003e{c.src=s,n[s]=c,o[s].forEach(l=\u003el(c)),delete o[s]}))}return function(s,a,{lang:A,fonts:c=[],style:l=\"normal\",weight:u=\"normal\",unicodeFontsURL:g}={}){const h=new Uint8Array(s.length),d=[];s.length||f();const p=new Map,m=[];if(l!==\"italic\"\u0026\u0026(l=\"normal\"),typeof u!=\"number\"\u0026\u0026(u=u===\"bold\"?700:400),c\u0026\u0026!Array.isArray(c)\u0026\u0026(c=[c]),c=c.slice().filter(C=\u003e!C.lang||C.lang.test(A)).reverse(),c.length){let E=0;(function B(S=0){for(let Q=S,w=s.length;Q\u003cw;Q++){const M=s.codePointAt(Q);if(E===1\u0026\u0026d[h[Q-1]].supportsCodePoint(M)||Q\u003e0\u0026\u0026/\\s/.test(s[Q]))h[Q]=h[Q-1],E===2\u0026\u0026(m[m.length-1][1]=Q);else for(let k=h[Q],R=c.length;k\u003c=R;k++)if(k===R){const F=E===2?m[m.length-1]:m[m.length]=[Q,Q];F[1]=Q,E=2}else{h[Q]=k;const{src:F,unicodeRange:O}=c[k];if(!O||I(M,O)){const U=n[F];if(!U){r(F,()=\u003e{B(Q)});return}if(U.supportsCodePoint(M)){let Y=p.get(U);typeof Y!=\"number\"\u0026\u0026(Y=d.length,d.push(U),p.set(U,Y)),h[Q]=Y,E=1;break}}}M\u003e65535\u0026\u0026Q+1\u003cw\u0026\u0026(h[Q+1]=h[Q],Q++,E===2\u0026\u0026(m[m.length-1][1]=Q))}_()})()}else m.push([0,s.length-1]),_();function _(){if(m.length){const C=m.map(y=\u003es.substring(y[0],y[1]+1)).join(`\n`);e.getFontsForString(C,{lang:A||void 0,style:l,weight:u,dataUrl:g}).then(({fontUrls:y,chars:x})=\u003e{const E=d.length;let B=0;m.forEach(Q=\u003e{for(let w=0,M=Q[1]-Q[0];w\u003c=M;w++)h[Q[0]+w]=x[B++]+E;B++});let S=0;y.forEach((Q,w)=\u003e{r(Q,M=\u003e{d[w+E]=M,++S===y.length\u0026\u0026f()})})})}else f()}function f(){a({chars:h,fonts:d})}function I(C,y){for(let x=0;x\u003cy.length;x++){const[E,B=E]=y[x];if(E\u003c=C\u0026\u0026C\u003c=B)return!0}return!1}}}const joi=yY({name:\"FontResolver\",dependencies:[Woi,zoi,Joi],init(t,e,n){return t(e,n())}});function $oi(t,e){const o=/[\\u00AD\\u034F\\u061C\\u115F-\\u1160\\u17B4-\\u17B5\\u180B-\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u206F\\u3164\\uFE00-\\uFE0F\\uFEFF\\uFFA0\\uFFF0-\\uFFF8]/,i=\"[^\\\\S\\\\u00A0]\",r=new RegExp(`${i}|[\\\\-\\\\u007C\\\\u00AD\\\\u2010\\\\u2012-\\\\u2014\\\\u2027\\\\u2056\\\\u2E17\\\\u2E40]`);function s({text:d,lang:p,fonts:m,style:_,weight:f,preResolvedFonts:I,unicodeFontsURL:C},y){const x=({chars:E,fonts:B})=\u003e{let S,Q;const w=[];for(let M=0;M\u003cE.length;M++)E[M]!==Q?(Q=E[M],w.push(S={start:M,end:M,fontObj:B[E[M]]})):S.end=M;y(w)};I?x(I):t(d,x,{lang:p,fonts:m,style:_,weight:f,unicodeFontsURL:C})}function a({text:d=\"\",font:p,lang:m,sdfGlyphSize:_=64,fontSize:f=400,fontWeight:I=1,fontStyle:C=\"normal\",letterSpacing:y=0,lineHeight:x=\"normal\",maxWidth:E=1/0,direction:B,textAlign:S=\"left\",textIndent:Q=0,whiteSpace:w=\"normal\",overflowWrap:M=\"normal\",anchorX:k=0,anchorY:R=0,metricsOnly:F=!1,unicodeFontsURL:O,preResolvedFonts:U=null,includeCaretPositions:Y=!1,chunkedBoundsSize:W=8192,colorRanges:te=null},j){const J=u(),oe={fontLoad:0,typesetting:0};d.indexOf(\"\\r\")\u003e-1\u0026\u0026(console.info(\"Typesetter: got text with \\\\r chars; normalizing to \\\\n\"),d=d.replace(/\\r\\n/g,`\n`).replace(/\\r/g,`\n`)),f=+f,y=+y,E=+E,x=x||\"normal\",Q=+Q,s({text:d,lang:m,style:C,weight:I,fonts:typeof p==\"string\"?[{src:p}]:p,unicodeFontsURL:O,preResolvedFonts:U},ie=\u003e{oe.fontLoad=u()-J;const ne=isFinite(E);let le=null,ge=null,_e=null,ue=null,fe=null,pe=null,ye=null,Me=null,ve=0,he=0,Qe=w!==\"nowrap\";const Pe=new Map,we=u();let Te=Q,Re=0,Ee=new g;const ke=[Ee];ie.forEach(At=\u003e{const{fontObj:at}=At,{ascender:nt,descender:gt,unitsPerEm:bt,lineGap:Ct,capHeight:Dt,xHeight:kt}=at;let it=Pe.get(at);if(!it){const It=f/bt,Bt=x===\"normal\"?(nt-gt+Ct)*It:x*f,mt=(Bt-(nt-gt)*It)/2,st=Math.min(Bt,(nt-gt)*It),xt=(nt+gt)/2*It+st/2;it={index:Pe.size,src:at.src,fontObj:at,fontSizeMult:It,unitsPerEm:bt,ascender:nt*It,descender:gt*It,capHeight:Dt*It,xHeight:kt*It,lineHeight:Bt,baseline:-mt-nt*It,caretTop:xt,caretBottom:xt-st},Pe.set(at,it)}const{fontSizeMult:Yt}=it,pn=d.slice(At.start,At.end+1);let be,et;at.forEachGlyph(pn,f,y,(It,Bt,mt,st)=\u003e{Bt+=Re,st+=At.start,be=Bt,et=It;const xt=d.charAt(st),Xe=It.advanceWidth*Yt,Ze=Ee.count;let dt;if(\"isEmpty\"in It||(It.isWhitespace=!!xt\u0026\u0026new RegExp(i).test(xt),It.canBreakAfter=!!xt\u0026\u0026r.test(xt),It.isEmpty=It.xMin===It.xMax||It.yMin===It.yMax||o.test(xt)),!It.isWhitespace\u0026\u0026!It.isEmpty\u0026\u0026he++,Qe\u0026\u0026ne\u0026\u0026!It.isWhitespace\u0026\u0026Bt+Xe+Te\u003eE\u0026\u0026Ze){if(Ee.glyphAt(Ze-1).glyphObj.canBreakAfter)dt=new g,Te=-Bt;else for(let Wt=Ze;Wt--;)if(Wt===0\u0026\u0026M===\"break-word\"){dt=new g,Te=-Bt;break}else if(Ee.glyphAt(Wt).glyphObj.canBreakAfter){dt=Ee.splitAt(Wt+1);const Xt=dt.glyphAt(0).x;Te-=Xt;for(let Jt=dt.count;Jt--;)dt.glyphAt(Jt).x-=Xt;break}dt\u0026\u0026(Ee.isSoftWrapped=!0,Ee=dt,ke.push(Ee),ve=E)}let Ut=Ee.glyphAt(Ee.count);Ut.glyphObj=It,Ut.x=Bt+Te,Ut.y=mt,Ut.width=Xe,Ut.charIndex=st,Ut.fontData=it,xt===`\n`\u0026\u0026(Ee=new g,ke.push(Ee),Te=-(Bt+Xe+y*f)+Q)}),Re=be+et.advanceWidth*Yt+y*f});let Ce=0;ke.forEach(At=\u003e{let at=!0;for(let nt=At.count;nt--;){const gt=At.glyphAt(nt);at\u0026\u0026!gt.glyphObj.isWhitespace\u0026\u0026(At.width=gt.x+gt.width,At.width\u003eve\u0026\u0026(ve=At.width),at=!1);let{lineHeight:bt,capHeight:Ct,xHeight:Dt,baseline:kt}=gt.fontData;bt\u003eAt.lineHeight\u0026\u0026(At.lineHeight=bt);const it=kt-At.baseline;it\u003c0\u0026\u0026(At.baseline+=it,At.cap+=it,At.ex+=it),At.cap=Math.max(At.cap,At.baseline+Ct),At.ex=Math.max(At.ex,At.baseline+Dt)}At.baseline-=Ce,At.cap-=Ce,At.ex-=Ce,Ce+=At.lineHeight});let Le=0,Ye=0;if(k\u0026\u0026(typeof k==\"number\"?Le=-k:typeof k==\"string\"\u0026\u0026(Le=-ve*(k===\"left\"?0:k===\"center\"?.5:k===\"right\"?1:c(k)))),R\u0026\u0026(typeof R==\"number\"?Ye=-R:typeof R==\"string\"\u0026\u0026(Ye=R===\"top\"?0:R===\"top-baseline\"?-ke[0].baseline:R===\"top-cap\"?-ke[0].cap:R===\"top-ex\"?-ke[0].ex:R===\"middle\"?Ce/2:R===\"bottom\"?Ce:R===\"bottom-baseline\"?-ke[ke.length-1].baseline:c(R)*Ce)),!F){const At=e.getEmbeddingLevels(d,B);le=new Uint16Array(he),ge=new Uint8Array(he),_e=new Float32Array(he*2),ue={},ye=[1/0,1/0,-1/0,-1/0],Me=[],Y\u0026\u0026(pe=new Float32Array(d.length*4)),te\u0026\u0026(fe=new Uint8Array(he*3));let at=0,nt=-1,gt=-1,bt,Ct;if(ke.forEach((Dt,kt)=\u003e{let{count:it,width:Yt}=Dt;if(it\u003e0){let pn=0;for(let st=it;st--\u0026\u0026Dt.glyphAt(st).glyphObj.isWhitespace;)pn++;let be=0,et=0;if(S===\"center\")be=(ve-Yt)/2;else if(S===\"right\")be=ve-Yt;else if(S===\"justify\"\u0026\u0026Dt.isSoftWrapped){let st=0;for(let xt=it-pn;xt--;)Dt.glyphAt(xt).glyphObj.isWhitespace\u0026\u0026st++;et=(ve-Yt)/st}if(et||be){let st=0;for(let xt=0;xt\u003cit;xt++){let Xe=Dt.glyphAt(xt);const Ze=Xe.glyphObj;Xe.x+=be+st,et!==0\u0026\u0026Ze.isWhitespace\u0026\u0026xt\u003cit-pn\u0026\u0026(st+=et,Xe.width+=et)}}const It=e.getReorderSegments(d,At,Dt.glyphAt(0).charIndex,Dt.glyphAt(Dt.count-1).charIndex);for(let st=0;st\u003cIt.length;st++){const[xt,Xe]=It[st];let Ze=1/0,dt=-1/0;for(let Ut=0;Ut\u003cit;Ut++)if(Dt.glyphAt(Ut).charIndex\u003e=xt){let Wt=Ut,Xt=Ut;for(;Xt\u003cit;Xt++){let Jt=Dt.glyphAt(Xt);if(Jt.charIndex\u003eXe)break;Xt\u003cit-pn\u0026\u0026(Ze=Math.min(Ze,Jt.x),dt=Math.max(dt,Jt.x+Jt.width))}for(let Jt=Wt;Jt\u003cXt;Jt++){const yn=Dt.glyphAt(Jt);yn.x=dt-(yn.x+yn.width-Ze)}break}}let Bt;const mt=st=\u003eBt=st;for(let st=0;st\u003cit;st++){const xt=Dt.glyphAt(st);Bt=xt.glyphObj;const Xe=Bt.index,Ze=At.levels[xt.charIndex]\u00261;if(Ze){const dt=e.getMirroredCharacter(d[xt.charIndex]);dt\u0026\u0026xt.fontData.fontObj.forEachGlyph(dt,0,0,mt)}if(Y){const{charIndex:dt,fontData:Ut}=xt,Wt=xt.x+Le,Xt=xt.x+xt.width+Le;pe[dt*4]=Ze?Xt:Wt,pe[dt*4+1]=Ze?Wt:Xt,pe[dt*4+2]=Dt.baseline+Ut.caretBottom+Ye,pe[dt*4+3]=Dt.baseline+Ut.caretTop+Ye;const Jt=dt-nt;Jt\u003e1\u0026\u0026l(pe,nt,Jt),nt=dt}if(te){const{charIndex:dt}=xt;for(;dt\u003egt;)gt++,te.hasOwnProperty(gt)\u0026\u0026(Ct=te[gt])}if(!Bt.isWhitespace\u0026\u0026!Bt.isEmpty){const dt=at++,{fontSizeMult:Ut,src:Wt,index:Xt}=xt.fontData,Jt=ue[Wt]||(ue[Wt]={});Jt[Xe]||(Jt[Xe]={path:Bt.path,pathBounds:[Bt.xMin,Bt.yMin,Bt.xMax,Bt.yMax]});const yn=xt.x+Le,An=xt.y+Dt.baseline+Ye;_e[dt*2]=yn,_e[dt*2+1]=An;const kn=yn+Bt.xMin*Ut,$n=An+Bt.yMin*Ut,ht=yn+Bt.xMax*Ut,Kt=An+Bt.yMax*Ut;kn\u003cye[0]\u0026\u0026(ye[0]=kn),$n\u003cye[1]\u0026\u0026(ye[1]=$n),ht\u003eye[2]\u0026\u0026(ye[2]=ht),Kt\u003eye[3]\u0026\u0026(ye[3]=Kt),dt%W===0\u0026\u0026(bt={start:dt,end:dt,rect:[1/0,1/0,-1/0,-1/0]},Me.push(bt)),bt.end++;const rn=bt.rect;if(kn\u003crn[0]\u0026\u0026(rn[0]=kn),$n\u003crn[1]\u0026\u0026(rn[1]=$n),ht\u003ern[2]\u0026\u0026(rn[2]=ht),Kt\u003ern[3]\u0026\u0026(rn[3]=Kt),le[dt]=Xe,ge[dt]=Xt,te){const Lt=dt*3;fe[Lt]=Ct\u003e\u003e16\u0026255,fe[Lt+1]=Ct\u003e\u003e8\u0026255,fe[Lt+2]=Ct\u0026255}}}}}),pe){const Dt=d.length-nt;Dt\u003e1\u0026\u0026l(pe,nt,Dt)}}const tt=[];Pe.forEach(({index:At,src:at,unitsPerEm:nt,ascender:gt,descender:bt,lineHeight:Ct,capHeight:Dt,xHeight:kt})=\u003e{tt[At]={src:at,unitsPerEm:nt,ascender:gt,descender:bt,lineHeight:Ct,capHeight:Dt,xHeight:kt}}),oe.typesetting=u()-we,j({glyphIds:le,glyphFontIndices:ge,glyphPositions:_e,glyphData:ue,fontData:tt,caretPositions:pe,glyphColors:fe,chunkedBounds:Me,fontSize:f,topBaseline:Ye+ke[0].baseline,blockBounds:[Le,Ye-Ce,Le+ve,Ye],visibleBounds:ye,timings:oe})})}function A(d,p){a({...d,metricsOnly:!0},m=\u003e{const[_,f,I,C]=m.blockBounds;p({width:I-_,height:C-f})})}function c(d){let p=d.match(/^([\\d.]+)%$/),m=p?parseFloat(p[1]):NaN;return isNaN(m)?0:m/100}function l(d,p,m){const _=d[p*4],f=d[p*4+1],I=d[p*4+2],C=d[p*4+3],y=(f-_)/m;for(let x=0;x\u003cm;x++){const E=(p+x)*4;d[E]=_+y*x,d[E+1]=_+y*(x+1),d[E+2]=I,d[E+3]=C}}function u(){return(self.performance||Date).now()}function g(){this.data=[]}const h=[\"glyphObj\",\"x\",\"y\",\"width\",\"charIndex\",\"fontData\"];return g.prototype={width:0,lineHeight:0,baseline:0,cap:0,ex:0,isSoftWrapped:!1,get count(){return Math.ceil(this.data.length/h.length)},glyphAt(d){let p=g.flyweight;return p.data=this.data,p.index=d,p},splitAt(d){let p=new g;return p.data=this.data.splice(d*h.length),p}},g.flyweight=h.reduce((d,p,m,_)=\u003e(Object.defineProperty(d,p,{get(){return this.data[this.index*h.length+m]},set(f){this.data[this.index*h.length+m]=f}}),d),{data:null,index:0}),{typeset:a,measure:A}}const ZR=()=\u003e(self.performance||Date).now(),fhe=OJt();let zJt;function qoi(t,e,n,o,i,r,s,a,A,c,l=!0){return l?Zoi(t,e,n,o,i,r,s,a,A,c).then(null,u=\u003e(zJt||(console.warn(\"WebGL SDF generation failed, falling back to JS\",u),zJt=!0),jJt(t,e,n,o,i,r,s,a,A,c))):jJt(t,e,n,o,i,r,s,a,A,c)}const Ihe=[],Xoi=5;let Pke=0;function JJt(){const t=ZR();for(;Ihe.length\u0026\u0026ZR()-t\u003cXoi;)Ihe.shift()();Pke=Ihe.length?setTimeout(JJt,0):0}const Zoi=(...t)=\u003enew Promise((e,n)=\u003e{Ihe.push(()=\u003e{const o=ZR();try{fhe.webgl.generateIntoCanvas(...t),e({timing:ZR()-o})}catch(i){n(i)}}),Pke||(Pke=setTimeout(JJt,0))}),eii=4,tii=2e3,WJt={};let nii=0;function jJt(t,e,n,o,i,r,s,a,A,c){const l=\"TroikaTextSDFGenerator_JS_\"+nii++%eii;let u=WJt[l];return u||(u=WJt[l]={workerModule:yY({name:l,workerId:l,dependencies:[OJt,ZR],init(g,h){const d=g().javascript.generate;return function(...p){const m=h();return{textureData:d(...p),timing:h()-m}}},getTransferables(g){return[g.textureData.buffer]}}),requests:0,idleTimer:null}),u.requests++,clearTimeout(u.idleTimer),u.workerModule(t,e,n,o,i,r).then(({textureData:g,timing:h})=\u003e{const d=ZR(),p=new Uint8Array(g.length*4);for(let m=0;m\u003cg.length;m++)p[m*4+c]=g[m];return fhe.webglUtils.renderImageData(s,p,a,A,t,e,1\u003c\u003c3-c),h+=ZR()-d,--u.requests===0\u0026\u0026(u.idleTimer=setTimeout(()=\u003e{Noi(l)},tii)),{timing:h}})}function oii(t){t._warm||(fhe.webgl.isSupported(t),t._warm=!0)}const iii=fhe.webglUtils.resizeWebGLCanvasWithoutClearing,AX={unicodeFontsURL:null,sdfGlyphSize:64,sdfMargin:1/16,sdfExponent:9,textureWidth:2048},rii=new Vi;function xY(){return(self.performance||Date).now()}const $Jt=Object.create(null);function sii(t,e){t=Aii({},t);const n=xY(),o=[];if(t.font\u0026\u0026o.push({label:\"user\",src:cii(t.font)}),t.font=o,t.text=\"\"+t.text,t.sdfGlyphSize=t.sdfGlyphSize||AX.sdfGlyphSize,t.unicodeFontsURL=t.unicodeFontsURL||AX.unicodeFontsURL,t.colorRanges!=null){let g={};for(let h in t.colorRanges)if(t.colorRanges.hasOwnProperty(h)){let d=t.colorRanges[h];typeof d!=\"number\"\u0026\u0026(d=rii.set(d).getHex()),g[h]=d}t.colorRanges=g}Object.freeze(t);const{textureWidth:i,sdfExponent:r}=AX,{sdfGlyphSize:s}=t,a=i/s*4;let A=$Jt[s];if(!A){const g=document.createElement(\"canvas\");g.width=i,g.height=s*256/a,A=$Jt[s]={glyphCount:0,sdfGlyphSize:s,sdfCanvas:g,sdfTexture:new Hg(g,void 0,void 0,void 0,Fl,Fl),contextLost:!1,glyphsByFont:new Map},A.sdfTexture.generateMipmaps=!1,aii(A)}const{sdfTexture:c,sdfCanvas:l}=A;ZJt(t).then(g=\u003e{const{glyphIds:h,glyphFontIndices:d,fontData:p,glyphPositions:m,fontSize:_,timings:f}=g,I=[],C=new Float32Array(h.length*4);let y=0,x=0;const E=xY(),B=p.map(k=\u003e{let R=A.glyphsByFont.get(k.src);return R||A.glyphsByFont.set(k.src,R=new Map),R});h.forEach((k,R)=\u003e{const F=d[R],{src:O,unitsPerEm:U}=p[F];let Y=B[F].get(k);if(!Y){const{path:oe,pathBounds:ie}=g.glyphData[O][k],ne=Math.max(ie[2]-ie[0],ie[3]-ie[1])/s*(AX.sdfMargin*s+.5),le=A.glyphCount++,ge=[ie[0]-ne,ie[1]-ne,ie[2]+ne,ie[3]+ne];B[F].set(k,Y={path:oe,atlasIndex:le,sdfViewBox:ge}),I.push(Y)}const{sdfViewBox:W}=Y,te=m[x++],j=m[x++],J=_/U;C[y++]=te+W[0]*J,C[y++]=j+W[1]*J,C[y++]=te+W[2]*J,C[y++]=j+W[3]*J,h[R]=Y.atlasIndex}),f.quads=(f.quads||0)+(xY()-E);const S=xY();f.sdf={};const Q=l.height,w=Math.ceil(A.glyphCount/a),M=Math.pow(2,Math.ceil(Math.log2(w*s)));M\u003eQ\u0026\u0026(console.info(`Increasing SDF texture size ${Q}-\u003e${M}`),iii(l,i,M),c.dispose()),Promise.all(I.map(k=\u003eqJt(k,A,t.gpuAccelerateSDF).then(({timing:R})=\u003e{f.sdf[k.atlasIndex]=R}))).then(()=\u003e{I.length\u0026\u0026!A.contextLost\u0026\u0026(XJt(A),c.needsUpdate=!0),f.sdfTotal=xY()-S,f.total=xY()-n,e(Object.freeze({parameters:t,sdfTexture:c,sdfGlyphSize:s,sdfExponent:r,glyphBounds:C,glyphAtlasIndices:h,glyphColors:g.glyphColors,caretPositions:g.caretPositions,chunkedBounds:g.chunkedBounds,ascender:g.ascender,descender:g.descender,lineHeight:g.lineHeight,capHeight:g.capHeight,xHeight:g.xHeight,topBaseline:g.topBaseline,blockBounds:g.blockBounds,visibleBounds:g.visibleBounds,timings:g.timings}))})}),Promise.resolve().then(()=\u003e{A.contextLost||oii(l)})}function qJt({path:t,atlasIndex:e,sdfViewBox:n},{sdfGlyphSize:o,sdfCanvas:i,contextLost:r},s){if(r)return Promise.resolve({timing:-1});const{textureWidth:a,sdfExponent:A}=AX,c=Math.max(n[2]-n[0],n[3]-n[1]),l=Math.floor(e/4),u=l%(a/o)*o,g=Math.floor(l/(a/o))*o,h=e%4;return qoi(o,o,t,n,c,A,i,u,g,h,s)}function aii(t){const e=t.sdfCanvas;e.addEventListener(\"webglcontextlost\",n=\u003e{console.log(\"Context Lost\",n),n.preventDefault(),t.contextLost=!0}),e.addEventListener(\"webglcontextrestored\",n=\u003e{console.log(\"Context Restored\",n),t.contextLost=!1;const o=[];t.glyphsByFont.forEach(i=\u003e{i.forEach(r=\u003e{o.push(qJt(r,t,!0))})}),Promise.all(o).then(()=\u003e{XJt(t),t.sdfTexture.needsUpdate=!0})})}function Aii(t,e){for(let n in e)e.hasOwnProperty(n)\u0026\u0026(t[n]=e[n]);return t}let Che;function cii(t){return Che||(Che=typeof document\u003e\"u\"?{}:document.createElement(\"a\")),Che.href=t,Che.href}function XJt(t){if(typeof createImageBitmap!=\"function\"){console.info(\"Safari\u003c15: applying SDF canvas workaround\");const{sdfCanvas:e,sdfTexture:n}=t,{width:o,height:i}=e,r=t.sdfCanvas.getContext(\"webgl\");let s=n.image.data;(!s||s.length!==o*i*4)\u0026\u0026(s=new Uint8Array(o*i*4),n.image={width:o,height:i,data:s},n.flipY=!1,n.isDataTexture=!0),r.readPixels(0,0,o,i,r.RGBA,r.UNSIGNED_BYTE,s)}}const ZJt=yY({name:\"Typesetter\",dependencies:[yY({name:\"Typesetter\",dependencies:[$oi,joi,Toi],init(t,e,n){return t(e,n())}})],init(t){return function(e){return new Promise(n=\u003e{t.typeset(e,n)})}},getTransferables(t){const e=[];for(let n in t)t[n]\u0026\u0026t[n].buffer\u0026\u0026e.push(t[n].buffer);return e}});ZJt.onMainThread;const eWt={};function lii(t){let e=eWt[t];return e||(e=eWt[t]=new VB(1,1,t,t).translate(.5,.5,0)),e}const uii=\"aTroikaGlyphBounds\",tWt=\"aTroikaGlyphIndex\",gii=\"aTroikaGlyphColor\";class dii extends jti{constructor(){super(),this.detail=1,this.curveRadius=0,this.groups=[{start:0,count:1/0,materialIndex:0},{start:0,count:1/0,materialIndex:1}],this.boundingSphere=new GB,this.boundingBox=new e2}computeBoundingSphere(){}computeBoundingBox(){}set detail(e){if(e!==this._detail){this._detail=e,(typeof e!=\"number\"||e\u003c1)\u0026\u0026(e=1);let n=lii(e);[\"position\",\"normal\",\"uv\"].forEach(o=\u003e{this.attributes[o]=n.attributes[o].clone()}),this.setIndex(n.getIndex().clone())}}get detail(){return this._detail}set curveRadius(e){e!==this._curveRadius\u0026\u0026(this._curveRadius=e,this._updateBounds())}get curveRadius(){return this._curveRadius}updateGlyphs(e,n,o,i,r){this.updateAttributeData(uii,e,4),this.updateAttributeData(tWt,n,1),this.updateAttributeData(gii,r,3),this._blockBounds=o,this._chunkedBounds=i,this.instanceCount=n.length,this._updateBounds()}_updateBounds(){const e=this._blockBounds;if(e){const{curveRadius:n,boundingBox:o}=this;if(n){const{PI:i,floor:r,min:s,max:a,sin:A,cos:c}=Math,l=i/2,u=i*2,g=Math.abs(n),h=e[0]/g,d=e[2]/g,p=r((h+l)/u)!==r((d+l)/u)?-g:s(A(h)*g,A(d)*g),m=r((h-l)/u)!==r((d-l)/u)?g:a(A(h)*g,A(d)*g),_=r((h+i)/u)!==r((d+i)/u)?g*2:a(g-c(h)*g,g-c(d)*g);o.min.set(p,e[1],n\u003c0?-_:0),o.max.set(m,e[3],n\u003c0?0:_)}else o.min.set(e[0],e[1],0),o.max.set(e[2],e[3],0);o.getBoundingSphere(this.boundingSphere)}}applyClipRect(e){let n=this.getAttribute(tWt).count,o=this._chunkedBounds;if(o)for(let i=o.length;i--;){n=o[i].end;let r=o[i].rect;if(r[1]\u003ce.w\u0026\u0026r[3]\u003ee.y\u0026\u0026r[0]\u003ce.z\u0026\u0026r[2]\u003ee.x)break}this.instanceCount=n}updateAttributeData(e,n,o){const i=this.getAttribute(e);n?i\u0026\u0026i.array.length===n.length?(i.array.set(n),i.needsUpdate=!0):(this.setAttribute(e,new Xde(n,o)),delete this._maxInstanceCount,this.dispose()):i\u0026\u0026this.deleteAttribute(e)}}const hii=`\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform vec4 uTroikaTotalBounds;\nuniform vec4 uTroikaClipRect;\nuniform mat3 uTroikaOrient;\nuniform bool uTroikaUseGlyphColors;\nuniform float uTroikaEdgeOffset;\nuniform float uTroikaBlurRadius;\nuniform vec2 uTroikaPositionOffset;\nuniform float uTroikaCurveRadius;\nattribute vec4 aTroikaGlyphBounds;\nattribute float aTroikaGlyphIndex;\nattribute vec3 aTroikaGlyphColor;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec3 vTroikaGlyphColor;\nvarying vec2 vTroikaGlyphDimensions;\n`,pii=`\nvec4 bounds = aTroikaGlyphBounds;\nbounds.xz += uTroikaPositionOffset.x;\nbounds.yw -= uTroikaPositionOffset.y;\n\nvec4 outlineBounds = vec4(\n bounds.xy - uTroikaEdgeOffset - uTroikaBlurRadius,\n bounds.zw + uTroikaEdgeOffset + uTroikaBlurRadius\n);\nvec4 clippedBounds = vec4(\n clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw),\n clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw)\n);\n\nvec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy);\n\nposition.xy = mix(bounds.xy, bounds.zw, clippedXY);\n\nuv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy);\n\nfloat rad = uTroikaCurveRadius;\nif (rad != 0.0) {\n float angle = position.x / rad;\n position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad);\n normal.xz = vec2(sin(angle), cos(angle));\n}\n \nposition = uTroikaOrient * position;\nnormal = uTroikaOrient * normal;\n\nvTroikaGlyphUV = clippedXY.xy;\nvTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]);\n\n\nfloat txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize;\nvec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize;\nvec2 txStartUV = txUvPerSquare * vec2(\n mod(floor(aTroikaGlyphIndex / 4.0), txCols),\n floor(floor(aTroikaGlyphIndex / 4.0) / txCols)\n);\nvTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare);\nvTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0);\n`,mii=`\nuniform sampler2D uTroikaSDFTexture;\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform float uTroikaSDFExponent;\nuniform float uTroikaEdgeOffset;\nuniform float uTroikaFillOpacity;\nuniform float uTroikaBlurRadius;\nuniform vec3 uTroikaStrokeColor;\nuniform float uTroikaStrokeWidth;\nuniform float uTroikaStrokeOpacity;\nuniform bool uTroikaSDFDebug;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec2 vTroikaGlyphDimensions;\n\nfloat troikaSdfValueToSignedDistance(float alpha) {\n // Inverse of exponential encoding in webgl-sdf-generator\n \n float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y);\n float absDist = (1.0 - pow(2.0 * (alpha \u003e 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension;\n float signedDist = absDist * (alpha \u003e 0.5 ? -1.0 : 1.0);\n return signedDist;\n}\n\nfloat troikaGlyphUvToSdfValue(vec2 glyphUV) {\n vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV);\n vec4 rgba = texture2D(uTroikaSDFTexture, textureUV);\n float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1\n return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a;\n}\n\nfloat troikaGlyphUvToDistance(vec2 uv) {\n return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv));\n}\n\nfloat troikaGetAADist() {\n \n #if defined(GL_OES_standard_derivatives) || __VERSION__ \u003e= 300\n return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5;\n #else\n return vTroikaGlyphDimensions.x / 64.0;\n #endif\n}\n\nfloat troikaGetFragDistValue() {\n vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize);\n float distance = troikaGlyphUvToDistance(clampedGlyphUV);\n \n // Extrapolate distance when outside bounds:\n distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : \n length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n\n \n\n return distance;\n}\n\nfloat troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) {\n #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL)\n float alpha = step(-distanceOffset, -distance);\n #else\n\n float alpha = smoothstep(\n distanceOffset + aaDist,\n distanceOffset - aaDist,\n distance\n );\n #endif\n\n return alpha;\n}\n`,_ii=`\nfloat aaDist = troikaGetAADist();\nfloat fragDistance = troikaGetFragDistValue();\nfloat edgeAlpha = uTroikaSDFDebug ?\n troikaGlyphUvToSdfValue(vTroikaGlyphUV) :\n troikaGetEdgeAlpha(fragDistance, uTroikaEdgeOffset, max(aaDist, uTroikaBlurRadius));\n\n#if !defined(IS_DEPTH_MATERIAL) \u0026\u0026 !defined(IS_DISTANCE_MATERIAL)\nvec4 fillRGBA = gl_FragColor;\nfillRGBA.a *= uTroikaFillOpacity;\nvec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity);\nif (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb;\ngl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep(\n -uTroikaStrokeWidth - aaDist,\n -uTroikaStrokeWidth + aaDist,\n fragDistance\n));\ngl_FragColor.a *= edgeAlpha;\n#endif\n\nif (edgeAlpha == 0.0) {\n discard;\n}\n`;function fii(t){const e=wke(t,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new ni},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new ru(0,0,0,0)},uTroikaClipRect:{value:new ru(0,0,0,0)},uTroikaEdgeOffset:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new ni},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new Vi},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new HA},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:hii,vertexTransform:pii,fragmentDefs:mii,fragmentColorTransform:_ii,customRewriter({vertexShader:n,fragmentShader:o}){let i=/\\buniform\\s+vec3\\s+diffuse\\b/;return i.test(o)\u0026\u0026(o=o.replace(i,\"varying vec3 vTroikaGlyphColor\").replace(/\\bdiffuse\\b/g,\"vTroikaGlyphColor\"),i.test(n)||(n=n.replace(GJt,`uniform vec3 diffuse;\n$\u0026\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\n`))),{vertexShader:n,fragmentShader:o}}});return e.transparent=!0,e.forceSinglePass=!0,Object.defineProperties(e,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),e}const Mke=new fE({color:16777215,side:r_,transparent:!0}),nWt=8421504,oWt=new va,yhe=new jt,Dke=new jt,cX=[],Iii=new jt,Nke=\"+x+y\";function iWt(t){return Array.isArray(t)?t[0]:t}let rWt=()=\u003e{const t=new Er(new VB(1,1),Mke);return rWt=()=\u003et,t},sWt=()=\u003e{const t=new Er(new VB(1,1,32,1),Mke);return sWt=()=\u003et,t};const Cii={type:\"syncstart\"},yii={type:\"synccomplete\"},aWt=[\"font\",\"fontSize\",\"fontStyle\",\"fontWeight\",\"lang\",\"letterSpacing\",\"lineHeight\",\"maxWidth\",\"overflowWrap\",\"text\",\"direction\",\"textAlign\",\"textIndent\",\"whiteSpace\",\"anchorX\",\"anchorY\",\"colorRanges\",\"sdfGlyphSize\"],xii=aWt.concat(\"material\",\"color\",\"depthOffset\",\"clipRect\",\"curveRadius\",\"orientation\",\"glyphGeometryDetail\");let Rke=class extends Er{constructor(){const e=new dii;super(e,null),this.text=\"\",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction=\"auto\",this.font=null,this.unicodeFontsURL=null,this.fontSize=.1,this.fontWeight=\"normal\",this.fontStyle=\"normal\",this.lang=null,this.letterSpacing=0,this.lineHeight=\"normal\",this.maxWidth=1/0,this.overflowWrap=\"normal\",this.textAlign=\"left\",this.textIndent=0,this.whiteSpace=\"normal\",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=nWt,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=Nke,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(e){this._needsSync\u0026\u0026(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(e):(this._isSyncing=!0,this.dispatchEvent(Cii),sii({text:this.text,font:this.font,lang:this.lang,fontSize:this.fontSize||.1,fontWeight:this.fontWeight||\"normal\",fontStyle:this.fontStyle||\"normal\",letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||\"normal\",maxWidth:this.maxWidth,direction:this.direction||\"auto\",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF,unicodeFontsURL:this.unicodeFontsURL},n=\u003e{this._isSyncing=!1,this._textRenderInfo=n,this.geometry.updateGlyphs(n.glyphBounds,n.glyphAtlasIndices,n.blockBounds,n.chunkedBounds,n.glyphColors);const o=this._queuedSyncs;o\u0026\u0026(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=\u003e{o.forEach(i=\u003ei\u0026\u0026i())})),this.dispatchEvent(yii),e\u0026\u0026e()})))}onBeforeRender(e,n,o,i,r,s){this.sync(),r.isTroikaTextMaterial\u0026\u0026this._prepareForRender(r)}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}createDerivedMaterial(e){return fii(e)}get material(){let e=this._derivedMaterial;const n=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=Mke.clone());if((!e||!e.isDerivedFrom(n))\u0026\u0026(e=this._derivedMaterial=this.createDerivedMaterial(n),n.addEventListener(\"dispose\",function o(){n.removeEventListener(\"dispose\",o),e.dispose()})),this.hasOutline()){let o=e._outlineMtl;return o||(o=e._outlineMtl=Object.create(e,{id:{value:e.id+.1}}),o.isTextOutlineMaterial=!0,o.depthWrite=!1,o.map=null,e.addEventListener(\"dispose\",function i(){e.removeEventListener(\"dispose\",i),o.dispose()})),[o,e]}else return e}set material(e){e\u0026\u0026e.isTroikaTextMaterial?(this._derivedMaterial=e,this._baseMaterial=e.baseMaterial):this._baseMaterial=e}hasOutline(){return!!(this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY)}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(e){this.geometry.detail=e}get curveRadius(){return this.geometry.curveRadius}set curveRadius(e){this.geometry.curveRadius=e}get customDepthMaterial(){return iWt(this.material).getDepthMaterial()}set customDepthMaterial(e){}get customDistanceMaterial(){return iWt(this.material).getDistanceMaterial()}set customDistanceMaterial(e){}_prepareForRender(e){const n=e.isTextOutlineMaterial,o=e.uniforms,i=this.textRenderInfo;if(i){const{sdfTexture:a,blockBounds:A}=i;o.uTroikaSDFTexture.value=a,o.uTroikaSDFTextureSize.value.set(a.image.width,a.image.height),o.uTroikaSDFGlyphSize.value=i.sdfGlyphSize,o.uTroikaSDFExponent.value=i.sdfExponent,o.uTroikaTotalBounds.value.fromArray(A),o.uTroikaUseGlyphColors.value=!n\u0026\u0026!!i.glyphColors;let c=0,l=0,u=0,g,h,d,p=0,m=0;if(n){let{outlineWidth:f,outlineOffsetX:I,outlineOffsetY:C,outlineBlur:y,outlineOpacity:x}=this;c=this._parsePercent(f)||0,l=Math.max(0,this._parsePercent(y)||0),g=x,p=this._parsePercent(I)||0,m=this._parsePercent(C)||0}else u=Math.max(0,this._parsePercent(this.strokeWidth)||0),u\u0026\u0026(d=this.strokeColor,o.uTroikaStrokeColor.value.set(d??nWt),h=this.strokeOpacity,h==null\u0026\u0026(h=1)),g=this.fillOpacity;o.uTroikaEdgeOffset.value=c,o.uTroikaPositionOffset.value.set(p,m),o.uTroikaBlurRadius.value=l,o.uTroikaStrokeWidth.value=u,o.uTroikaStrokeOpacity.value=h,o.uTroikaFillOpacity.value=g??1,o.uTroikaCurveRadius.value=this.curveRadius||0;let _=this.clipRect;if(_\u0026\u0026Array.isArray(_)\u0026\u0026_.length===4)o.uTroikaClipRect.value.fromArray(_);else{const f=(this.fontSize||.1)*100;o.uTroikaClipRect.value.set(A[0]-f,A[1]-f,A[2]+f,A[3]+f)}this.geometry.applyClipRect(o.uTroikaClipRect.value)}o.uTroikaSDFDebug.value=!!this.debugSDF,e.polygonOffset=!!this.depthOffset,e.polygonOffsetFactor=e.polygonOffsetUnits=this.depthOffset||0;const r=n?this.outlineColor||0:this.color;if(r==null)delete e.color;else{const a=e.hasOwnProperty(\"color\")?e.color:e.color=new Vi;(r!==a._input||typeof r==\"object\")\u0026\u0026a.set(a._input=r)}let s=this.orientation||Nke;if(s!==e._orientation){let a=o.uTroikaOrient.value;s=s.replace(/[^-+xyz]/g,\"\");let A=s!==Nke\u0026\u0026s.match(/^([-+])([xyz])([-+])([xyz])$/);if(A){let[,c,l,u,g]=A;yhe.set(0,0,0)[l]=c===\"-\"?1:-1,Dke.set(0,0,0)[g]=u===\"-\"?-1:1,oWt.lookAt(Iii,yhe.cross(Dke),Dke),a.setFromMatrix4(oWt)}else a.identity();e._orientation=s}}_parsePercent(e){if(typeof e==\"string\"){let n=e.match(/^(-?[\\d.]+)%$/),o=n?parseFloat(n[1]):NaN;e=(isNaN(o)?0:o/100)*this.fontSize}return e}localPositionToTextCoords(e,n=new ni){n.copy(e);const o=this.curveRadius;return o\u0026\u0026(n.x=Math.atan2(e.x,Math.abs(o)-Math.abs(e.z))*Math.abs(o)),n}worldPositionToTextCoords(e,n=new ni){return yhe.copy(e),this.localPositionToTextCoords(this.worldToLocal(yhe),n)}raycast(e,n){const{textRenderInfo:o,curveRadius:i}=this;if(o){const r=o.blockBounds,s=i?sWt():rWt(),a=s.geometry,{position:A,uv:c}=a.attributes;for(let l=0;l\u003cc.count;l++){let u=r[0]+c.getX(l)*(r[2]-r[0]);const g=r[1]+c.getY(l)*(r[3]-r[1]);let h=0;i\u0026\u0026(h=i-Math.cos(u/i)*i,u=Math.sin(u/i)*i),A.setXYZ(l,u,g,h)}a.boundingSphere=this.geometry.boundingSphere,a.boundingBox=this.geometry.boundingBox,s.matrixWorld=this.matrixWorld,s.material.side=this.material.side,cX.length=0,s.raycast(e,cX);for(let l=0;l\u003ccX.length;l++)cX[l].object=this,n.push(cX[l])}}copy(e){const n=this.geometry;return super.copy(e),this.geometry=n,xii.forEach(o=\u003e{this[o]=e[o]}),this}clone(){return new this.constructor().copy(this)}};aWt.forEach(t=\u003e{const e=\"_private_\"+t;Object.defineProperty(Rke.prototype,t,{get(){return this[e]},set(n){n!==this[e]\u0026\u0026(this[e]=n,this._needsSync=!0)}})}),new e2,new Vi;var Tke,AWt;function la(){return AWt||(AWt=1,Tke=e=\u003ee.flat(1/0)),Tke}var kke,cWt;function Eii(){return cWt||(cWt=1,kke=e=\u003eObject.assign({},e)),kke}var Fke,lWt;function Bii(){return lWt||(lWt=1,Fke=(e,n,o)=\u003e(e[0]=n[0]+o[0],e[1]=n[1]+o[1],e[2]=n[2]+o[2],e[3]=n[3]+o[3],e[4]=n[4]+o[4],e[5]=n[5]+o[5],e[6]=n[6]+o[6],e[7]=n[7]+o[7],e[8]=n[8]+o[8],e[9]=n[9]+o[9],e[10]=n[10]+o[10],e[11]=n[11]+o[11],e[12]=n[12]+o[12],e[13]=n[13]+o[13],e[14]=n[14]+o[14],e[15]=n[15]+o[15],e)),Fke}var Lke,uWt;function Hke(){return uWt||(uWt=1,Lke=()=\u003e[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Lke}var Oke,gWt;function bii(){if(gWt)return Oke;gWt=1;const t=Hke();return Oke=n=\u003e{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o[4]=n[4],o[5]=n[5],o[6]=n[6],o[7]=n[7],o[8]=n[8],o[9]=n[9],o[10]=n[10],o[11]=n[11],o[12]=n[12],o[13]=n[13],o[14]=n[14],o[15]=n[15],o},Oke}var Gke,dWt;function hWt(){return dWt||(dWt=1,Gke=(e,n)=\u003e(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e)),Gke}var Yke,pWt;function Sii(){return pWt||(pWt=1,Yke=(e,n)=\u003e{const o=n[0],i=n[1],r=n[2],s=n[3],a=n[4],A=n[5],c=n[6],l=n[7],u=n[8],g=n[9],h=n[10],d=n[11],p=n[12],m=n[13],_=n[14],f=n[15],I=o*A-i*a,C=o*c-r*a,y=o*l-s*a,x=i*c-r*A,E=i*l-s*A,B=r*l-s*c,S=u*m-g*p,Q=u*_-h*p,w=u*f-d*p,M=g*_-h*m,k=g*f-d*m,R=h*f-d*_;let F=I*R-C*k+y*M+x*w-E*Q+B*S;return F?(F=1/F,e[0]=(A*R-c*k+l*M)*F,e[1]=(r*k-i*R-s*M)*F,e[2]=(m*B-_*E+f*x)*F,e[3]=(h*E-g*B-d*x)*F,e[4]=(c*w-a*R-l*Q)*F,e[5]=(o*R-r*w+s*Q)*F,e[6]=(_*y-p*B-f*C)*F,e[7]=(u*B-h*y+d*C)*F,e[8]=(a*k-A*w+l*S)*F,e[9]=(i*w-o*k-s*S)*F,e[10]=(p*E-m*y+f*I)*F,e[11]=(g*y-u*E-d*I)*F,e[12]=(A*Q-a*M-c*S)*F,e[13]=(o*M-i*Q+r*S)*F,e[14]=(m*C-p*x-_*I)*F,e[15]=(u*x-g*C+h*I)*F,e):null}),Yke}var Uke,mWt;function Qii(){return mWt||(mWt=1,Uke=(e,n)=\u003ee[0]===n[0]\u0026\u0026e[1]===n[1]\u0026\u0026e[2]===n[2]\u0026\u0026e[3]===n[3]\u0026\u0026e[4]===n[4]\u0026\u0026e[5]===n[5]\u0026\u0026e[6]===n[6]\u0026\u0026e[7]===n[7]\u0026\u0026e[8]===n[8]\u0026\u0026e[9]===n[9]\u0026\u0026e[10]===n[10]\u0026\u0026e[11]===n[11]\u0026\u0026e[12]===n[12]\u0026\u0026e[13]===n[13]\u0026\u0026e[14]===n[14]\u0026\u0026e[15]===n[15]),Uke}var Kke,_Wt;function pc(){if(_Wt)return Kke;_Wt=1;const t=1e5,e=1e-5,n=1e-13,o=Math.PI*2;return Kke={EPS:e,NEPS:n,TAU:o,spatialResolution:t},Kke}var Vke,fWt;function dI(){if(fWt)return Vke;fWt=1;const{NEPS:t}=pc(),e=i=\u003eMath.abs(i)\u003ct?0:i;return Vke={sin:i=\u003ee(Math.sin(i)),cos:i=\u003ee(Math.cos(i))},Vke}var zke,IWt;function CWt(){return IWt||(IWt=1,zke=e=\u003e(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)),zke}var Jke,yWt;function xWt(){if(yWt)return Jke;yWt=1;const{EPS:t}=pc(),{sin:e,cos:n}=dI(),o=CWt();return Jke=(r,s,a)=\u003e{let[A,c,l]=a;const u=A*A+c*c+l*l;if(Math.abs(u)\u003ct)return o(r);const g=1/Math.sqrt(u);A*=g,c*=g,l*=g;const h=e(s),d=n(s),p=1-d;return r[0]=A*A*p+d,r[1]=c*A*p+l*h,r[2]=l*A*p-c*h,r[3]=0,r[4]=A*c*p-l*h,r[5]=c*c*p+d,r[6]=l*c*p+A*h,r[7]=0,r[8]=A*l*p+c*h,r[9]=c*l*p-A*h,r[10]=l*l*p+d,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r},Jke}var Wke,EWt;function vii(){return EWt||(EWt=1,Wke=(e,n)=\u003e(e[0]=n[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=n[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)),Wke}var jke,BWt;function wii(){if(BWt)return jke;BWt=1;const{sin:t,cos:e}=dI();return jke=(o,i,r,s)=\u003e{const a=t(i),A=e(i),c=t(r),l=e(r),u=t(s),g=e(s);return o[0]=l*A,o[1]=l*a,o[2]=-c,o[3]=0,o[4]=u*c*A-g*a,o[5]=g*A+u*c*a,o[6]=u*l,o[7]=0,o[8]=u*a+g*c*A,o[9]=g*c*a-u*A,o[10]=g*l,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},jke}var $ke,bWt;function Pii(){return bWt||(bWt=1,$ke=(e,n)=\u003e(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e)),$ke}var qke,SWt;function Mii(){if(SWt)return qke;SWt=1;const t=Hke();return qke=(n,o,i,r,s,a,A,c,l,u,g,h,d,p,m,_)=\u003e{const f=t();return f[0]=n,f[1]=o,f[2]=i,f[3]=r,f[4]=s,f[5]=a,f[6]=A,f[7]=c,f[8]=l,f[9]=u,f[10]=g,f[11]=h,f[12]=d,f[13]=p,f[14]=m,f[15]=_,f},qke}var Xke,QWt;function vWt(){return QWt||(QWt=1,Xke=(e,n)=\u003e(e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e[2]=Math.abs(n[2]),e)),Xke}var Zke,wWt;function PWt(){return wWt||(wWt=1,Zke=(e,n,o)=\u003e(e[0]=n[0]+o[0],e[1]=n[1]+o[1],e[2]=n[2]+o[2],e)),Zke}var eFe,MWt;function xhe(){return MWt||(MWt=1,eFe=(e,n)=\u003ee[0]*n[0]+e[1]*n[1]+e[2]*n[2]),eFe}var tFe,DWt;function Dii(){if(DWt)return tFe;DWt=1;const t=xhe();return tFe=(n,o)=\u003e{const i=n[0],r=n[1],s=n[2],a=o[0],A=o[1],c=o[2],l=Math.sqrt(i*i+r*r+s*s),u=Math.sqrt(a*a+A*A+c*c),g=l*u,h=g\u0026\u0026t(n,o)/g;return Math.acos(Math.min(Math.max(h,-1),1))},tFe}var nFe,NWt;function Ehe(){return NWt||(NWt=1,nFe=()=\u003e[0,0,0]),nFe}var oFe,RWt;function Nii(){if(RWt)return oFe;RWt=1;const t=Ehe();return oFe=n=\u003e{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o},oFe}var iFe,TWt;function kWt(){return TWt||(TWt=1,iFe=(e,n)=\u003e(e[0]=n[0],e[1]=n[1],e[2]=n[2],e)),iFe}var rFe,FWt;function lX(){return FWt||(FWt=1,rFe=(e,n,o)=\u003e{const i=n[0],r=n[1],s=n[2],a=o[0],A=o[1],c=o[2];return e[0]=r*c-s*A,e[1]=s*a-i*c,e[2]=i*A-r*a,e}),rFe}var sFe,LWt;function HWt(){return LWt||(LWt=1,sFe=(e,n)=\u003e{const o=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2];return Math.sqrt(o*o+i*i+r*r)}),sFe}var aFe,OWt;function Rii(){return OWt||(OWt=1,aFe=(e,n,o)=\u003e(e[0]=n[0]/o[0],e[1]=n[1]/o[1],e[2]=n[2]/o[2],e)),aFe}var AFe,GWt;function Tii(){return GWt||(GWt=1,AFe=(e,n)=\u003ee[0]===n[0]\u0026\u0026e[1]===n[1]\u0026\u0026e[2]===n[2]),AFe}var cFe,YWt;function kii(){return YWt||(YWt=1,cFe=(e,n)=\u003e(e[0]=n,e[1]=n,e[2]=n,e)),cFe}var lFe,UWt;function Fii(){if(UWt)return lFe;UWt=1;const t=Ehe();return lFe=(n,o,i)=\u003e{const r=t();return r[0]=n,r[1]=o,r[2]=i,r},lFe}var uFe,KWt;function Lii(){return KWt||(KWt=1,uFe=(e,n,o=0)=\u003e(e[0]=n[0],e[1]=n[1],e[2]=o,e)),uFe}var gFe,VWt;function zWt(){return VWt||(VWt=1,gFe=e=\u003e{const n=e[0],o=e[1],i=e[2];return Math.sqrt(n*n+o*o+i*i)}),gFe}var dFe,JWt;function Hii(){return JWt||(JWt=1,dFe=(e,n,o,i)=\u003e(e[0]=n[0]+i*(o[0]-n[0]),e[1]=n[1]+i*(o[1]-n[1]),e[2]=n[2]+i*(o[2]-n[2]),e)),dFe}var hFe,WWt;function jWt(){return WWt||(WWt=1,hFe=(e,n,o)=\u003e(e[0]=Math.max(n[0],o[0]),e[1]=Math.max(n[1],o[1]),e[2]=Math.max(n[2],o[2]),e)),hFe}var pFe,$Wt;function qWt(){return $Wt||($Wt=1,pFe=(e,n,o)=\u003e(e[0]=Math.min(n[0],o[0]),e[1]=Math.min(n[1],o[1]),e[2]=Math.min(n[2],o[2]),e)),pFe}var mFe,XWt;function Oii(){return XWt||(XWt=1,mFe=(e,n,o)=\u003e(e[0]=n[0]*o[0],e[1]=n[1]*o[1],e[2]=n[2]*o[2],e)),mFe}var _Fe,ZWt;function Gii(){return ZWt||(ZWt=1,_Fe=(e,n)=\u003e(e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e)),_Fe}var fFe,ejt;function IFe(){return ejt||(ejt=1,fFe=(e,n)=\u003e{const o=n[0],i=n[1],r=n[2];let s=o*o+i*i+r*r;return s\u003e0\u0026\u0026(s=1/Math.sqrt(s)),e[0]=o*s,e[1]=i*s,e[2]=r*s,e}),fFe}var CFe,tjt;function Yii(){if(tjt)return CFe;tjt=1;const t=vWt(),e=Ehe(),n=lX();return CFe=(i,r)=\u003e{const s=t(e(),r),a=0+(s[0]\u003cs[1]\u0026\u0026s[0]\u003cs[2]),A=0+(s[1]\u003c=s[0]\u0026\u0026s[1]\u003cs[2]),c=0+(s[2]\u003c=s[0]\u0026\u0026s[2]\u003c=s[1]);return n(i,r,[a,A,c])},CFe}var yFe,njt;function Uii(){return njt||(njt=1,yFe=(e,n,o,i)=\u003e{const r=[],s=[];return r[0]=n[0]-o[0],r[1]=n[1]-o[1],r[2]=n[2]-o[2],s[0]=r[0],s[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),s[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),e[0]=s[0]+o[0],e[1]=s[1]+o[1],e[2]=s[2]+o[2],e}),yFe}var xFe,ojt;function Kii(){return ojt||(ojt=1,xFe=(e,n,o,i)=\u003e{const r=[],s=[];return r[0]=n[0]-o[0],r[1]=n[1]-o[1],r[2]=n[2]-o[2],s[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),s[1]=r[1],s[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),e[0]=s[0]+o[0],e[1]=s[1]+o[1],e[2]=s[2]+o[2],e}),xFe}var EFe,ijt;function Vii(){return ijt||(ijt=1,EFe=(e,n,o,i)=\u003e{const r=[],s=[];return r[0]=n[0]-o[0],r[1]=n[1]-o[1],s[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),s[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),e[0]=s[0]+o[0],e[1]=s[1]+o[1],e[2]=n[2],e}),EFe}var BFe,rjt;function sjt(){return rjt||(rjt=1,BFe=(e,n,o)=\u003e(e[0]=n[0]*o,e[1]=n[1]*o,e[2]=n[2]*o,e)),BFe}var bFe,ajt;function zii(){return ajt||(ajt=1,bFe=(e,n,o)=\u003e(e[0]=Math.round(n[0]/o)*o+0,e[1]=Math.round(n[1]/o)*o+0,e[2]=Math.round(n[2]/o)*o+0,e)),bFe}var SFe,Ajt;function cjt(){return Ajt||(Ajt=1,SFe=(e,n)=\u003e{const o=n[0]-e[0],i=n[1]-e[1],r=n[2]-e[2];return o*o+i*i+r*r}),SFe}var QFe,ljt;function ujt(){return ljt||(ljt=1,QFe=e=\u003e{const n=e[0],o=e[1],i=e[2];return n*n+o*o+i*i}),QFe}var vFe,gjt;function Bhe(){return gjt||(gjt=1,vFe=(e,n,o)=\u003e(e[0]=n[0]-o[0],e[1]=n[1]-o[1],e[2]=n[2]-o[2],e)),vFe}var wFe,djt;function Jii(){return djt||(djt=1,wFe=e=\u003e`[${e[0].toFixed(7)}, ${e[1].toFixed(7)}, ${e[2].toFixed(7)}]`),wFe}var PFe,hjt;function Wii(){return hjt||(hjt=1,PFe=(e,n,o)=\u003e{const i=n[0],r=n[1],s=n[2];let a=o[3]*i+o[7]*r+o[11]*s+o[15];return a=a||1,e[0]=(o[0]*i+o[4]*r+o[8]*s+o[12])/a,e[1]=(o[1]*i+o[5]*r+o[9]*s+o[13])/a,e[2]=(o[2]*i+o[6]*r+o[10]*s+o[14])/a,e}),PFe}var MFe,pjt;function jr(){return pjt||(pjt=1,MFe={abs:vWt(),add:PWt(),angle:Dii(),clone:Nii(),copy:kWt(),create:Ehe(),cross:lX(),distance:HWt(),divide:Rii(),dot:xhe(),equals:Tii(),fromScalar:kii(),fromValues:Fii(),fromVec2:Lii(),length:zWt(),lerp:Hii(),max:jWt(),min:qWt(),multiply:Oii(),negate:Gii(),normalize:IFe(),orthogonal:Yii(),rotateX:Uii(),rotateY:Kii(),rotateZ:Vii(),scale:sjt(),snap:zii(),squaredDistance:cjt(),squaredLength:ujt(),subtract:Bhe(),toString:Jii(),transform:Wii()}),MFe}var DFe,mjt;function jii(){if(mjt)return DFe;mjt=1;const t=jr(),e=xWt();return DFe=(o,i,r)=\u003e{const s=t.normalize(t.create(),i),a=t.normalize(t.create(),r),A=t.cross(t.create(),a,s),c=t.dot(a,s);if(c===-1)return e(o,Math.PI,t.orthogonal(A,s));const l=1/(1+c);return o[0]=A[0]*A[0]*l+c,o[1]=A[1]*A[0]*l-A[2],o[2]=A[2]*A[0]*l+A[1],o[3]=0,o[4]=A[0]*A[1]*l+A[2],o[5]=A[1]*A[1]*l+c,o[6]=A[2]*A[1]*l-A[0],o[7]=0,o[8]=A[0]*A[2]*l-A[1],o[9]=A[1]*A[2]*l+A[0],o[10]=A[2]*A[2]*l+c,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},DFe}var NFe,_jt;function $ii(){if(_jt)return NFe;_jt=1;const{sin:t,cos:e}=dI();return NFe=(o,i)=\u003e{const r=t(i),s=e(i);return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=r,o[7]=0,o[8]=0,o[9]=-r,o[10]=s,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},NFe}var RFe,fjt;function qii(){if(fjt)return RFe;fjt=1;const{sin:t,cos:e}=dI();return RFe=(o,i)=\u003e{const r=t(i),s=e(i);return o[0]=s,o[1]=0,o[2]=-r,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=r,o[9]=0,o[10]=s,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},RFe}var TFe,Ijt;function Xii(){if(Ijt)return TFe;Ijt=1;const{sin:t,cos:e}=dI();return TFe=(o,i)=\u003e{const r=t(i),s=e(i);return o[0]=s,o[1]=r,o[2]=0,o[3]=0,o[4]=-r,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},TFe}var kFe,Cjt;function Zii(){return Cjt||(Cjt=1,kFe=e=\u003ee[0]===1\u0026\u0026e[1]===0\u0026\u0026e[2]===0\u0026\u0026e[3]===0\u0026\u0026e[4]===0\u0026\u0026e[5]===1\u0026\u0026e[6]===0\u0026\u0026e[7]===0\u0026\u0026e[8]===0\u0026\u0026e[9]===0\u0026\u0026e[10]===1\u0026\u0026e[11]===0\u0026\u0026e[12]===0\u0026\u0026e[13]===0\u0026\u0026e[14]===0\u0026\u0026e[15]===1),kFe}var FFe,yjt;function eri(){if(yjt)return FFe;yjt=1;const t=n=\u003ee(n[1])\u0026\u0026e(n[2])\u0026\u0026e(n[3])\u0026\u0026e(n[4])\u0026\u0026e(n[6])\u0026\u0026e(n[7])\u0026\u0026e(n[8])\u0026\u0026e(n[9])\u0026\u0026e(n[11])\u0026\u0026n[15]===1,e=n=\u003eMath.abs(n)\u003cNumber.EPSILON;return FFe=t,FFe}var LFe,xjt;function tri(){return xjt||(xjt=1,LFe=e=\u003e{const n=e[4]*e[9]-e[8]*e[5],o=e[8]*e[1]-e[0]*e[9],i=e[0]*e[5]-e[4]*e[1];return n*e[2]+o*e[6]+i*e[10]\u003c0}),LFe}var HFe,Ejt;function nri(){return Ejt||(Ejt=1,HFe=(e,n)=\u003e{const[o,i,r,s]=n;return e[0]=1-2*o*o,e[1]=-2*i*o,e[2]=-2*r*o,e[3]=0,e[4]=-2*o*i,e[5]=1-2*i*i,e[6]=-2*r*i,e[7]=0,e[8]=-2*o*r,e[9]=-2*i*r,e[10]=1-2*r*r,e[11]=0,e[12]=2*o*s,e[13]=2*i*s,e[14]=2*r*s,e[15]=1,e}),HFe}var OFe,Bjt;function ori(){return Bjt||(Bjt=1,OFe=(e,n,o)=\u003e{const i=n[0],r=n[1],s=n[2],a=n[3],A=n[4],c=n[5],l=n[6],u=n[7],g=n[8],h=n[9],d=n[10],p=n[11],m=n[12],_=n[13],f=n[14],I=n[15];let C=o[0],y=o[1],x=o[2],E=o[3];return e[0]=C*i+y*A+x*g+E*m,e[1]=C*r+y*c+x*h+E*_,e[2]=C*s+y*l+x*d+E*f,e[3]=C*a+y*u+x*p+E*I,C=o[4],y=o[5],x=o[6],E=o[7],e[4]=C*i+y*A+x*g+E*m,e[5]=C*r+y*c+x*h+E*_,e[6]=C*s+y*l+x*d+E*f,e[7]=C*a+y*u+x*p+E*I,C=o[8],y=o[9],x=o[10],E=o[11],e[8]=C*i+y*A+x*g+E*m,e[9]=C*r+y*c+x*h+E*_,e[10]=C*s+y*l+x*d+E*f,e[11]=C*a+y*u+x*p+E*I,C=o[12],y=o[13],x=o[14],E=o[15],e[12]=C*i+y*A+x*g+E*m,e[13]=C*r+y*c+x*h+E*_,e[14]=C*s+y*l+x*d+E*f,e[15]=C*a+y*u+x*p+E*I,e}),OFe}var GFe,bjt;function iri(){if(bjt)return GFe;bjt=1;const{EPS:t}=pc(),{sin:e,cos:n}=dI(),o=hWt();return GFe=(r,s,a,A)=\u003e{let[c,l,u]=A;const g=c*c+l*l+u*u;if(Math.abs(g)\u003ct)return o(r,s);const h=1/Math.sqrt(g);c*=h,l*=h,u*=h;const d=e(a),p=n(a),m=1-p,_=s[0],f=s[1],I=s[2],C=s[3],y=s[4],x=s[5],E=s[6],B=s[7],S=s[8],Q=s[9],w=s[10],M=s[11],k=c*c*m+p,R=l*c*m+u*d,F=u*c*m-l*d,O=c*l*m-u*d,U=l*l*m+p,Y=u*l*m+c*d,W=c*u*m+l*d,te=l*u*m-c*d,j=u*u*m+p;return r[0]=_*k+y*R+S*F,r[1]=f*k+x*R+Q*F,r[2]=I*k+E*R+w*F,r[3]=C*k+B*R+M*F,r[4]=_*O+y*U+S*Y,r[5]=f*O+x*U+Q*Y,r[6]=I*O+E*U+w*Y,r[7]=C*O+B*U+M*Y,r[8]=_*W+y*te+S*j,r[9]=f*W+x*te+Q*j,r[10]=I*W+E*te+w*j,r[11]=C*W+B*te+M*j,s!==r\u0026\u0026(r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r},GFe}var YFe,Sjt;function rri(){if(Sjt)return YFe;Sjt=1;const{sin:t,cos:e}=dI();return YFe=(o,i,r)=\u003e{const s=t(r),a=e(r),A=i[4],c=i[5],l=i[6],u=i[7],g=i[8],h=i[9],d=i[10],p=i[11];return i!==o\u0026\u0026(o[0]=i[0],o[1]=i[1],o[2]=i[2],o[3]=i[3],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15]),o[4]=A*a+g*s,o[5]=c*a+h*s,o[6]=l*a+d*s,o[7]=u*a+p*s,o[8]=g*a-A*s,o[9]=h*a-c*s,o[10]=d*a-l*s,o[11]=p*a-u*s,o},YFe}var UFe,Qjt;function sri(){if(Qjt)return UFe;Qjt=1;const{sin:t,cos:e}=dI();return UFe=(o,i,r)=\u003e{const s=t(r),a=e(r),A=i[0],c=i[1],l=i[2],u=i[3],g=i[8],h=i[9],d=i[10],p=i[11];return i!==o\u0026\u0026(o[4]=i[4],o[5]=i[5],o[6]=i[6],o[7]=i[7],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15]),o[0]=A*a-g*s,o[1]=c*a-h*s,o[2]=l*a-d*s,o[3]=u*a-p*s,o[8]=A*s+g*a,o[9]=c*s+h*a,o[10]=l*s+d*a,o[11]=u*s+p*a,o},UFe}var KFe,vjt;function ari(){if(vjt)return KFe;vjt=1;const{sin:t,cos:e}=dI();return KFe=(o,i,r)=\u003e{const s=t(r),a=e(r),A=i[0],c=i[1],l=i[2],u=i[3],g=i[4],h=i[5],d=i[6],p=i[7];return i!==o\u0026\u0026(o[8]=i[8],o[9]=i[9],o[10]=i[10],o[11]=i[11],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15]),o[0]=A*a+g*s,o[1]=c*a+h*s,o[2]=l*a+d*s,o[3]=u*a+p*s,o[4]=g*a-A*s,o[5]=h*a-c*s,o[6]=d*a-l*s,o[7]=p*a-u*s,o},KFe}var VFe,wjt;function Ari(){return wjt||(wjt=1,VFe=(e,n,o)=\u003e{const i=o[0],r=o[1],s=o[2];return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=n[3]*i,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=n[7]*r,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=n[11]*s,e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e}),VFe}var zFe,Pjt;function cri(){return Pjt||(Pjt=1,zFe=(e,n,o)=\u003e(e[0]=n[0]-o[0],e[1]=n[1]-o[1],e[2]=n[2]-o[2],e[3]=n[3]-o[3],e[4]=n[4]-o[4],e[5]=n[5]-o[5],e[6]=n[6]-o[6],e[7]=n[7]-o[7],e[8]=n[8]-o[8],e[9]=n[9]-o[9],e[10]=n[10]-o[10],e[11]=n[11]-o[11],e[12]=n[12]-o[12],e[13]=n[13]-o[13],e[14]=n[14]-o[14],e[15]=n[15]-o[15],e)),zFe}var JFe,Mjt;function lri(){return Mjt||(Mjt=1,JFe=e=\u003ee.map(n=\u003en.toFixed(7)).toString()),JFe}var WFe,Djt;function uri(){return Djt||(Djt=1,WFe=(e,n,o)=\u003e{const i=o[0],r=o[1],s=o[2];let a,A,c,l,u,g,h,d,p,m,_,f;return n===e?(e[12]=n[0]*i+n[4]*r+n[8]*s+n[12],e[13]=n[1]*i+n[5]*r+n[9]*s+n[13],e[14]=n[2]*i+n[6]*r+n[10]*s+n[14],e[15]=n[3]*i+n[7]*r+n[11]*s+n[15]):(a=n[0],A=n[1],c=n[2],l=n[3],u=n[4],g=n[5],h=n[6],d=n[7],p=n[8],m=n[9],_=n[10],f=n[11],e[0]=a,e[1]=A,e[2]=c,e[3]=l,e[4]=u,e[5]=g,e[6]=h,e[7]=d,e[8]=p,e[9]=m,e[10]=_,e[11]=f,e[12]=a*i+u*r+p*s+n[12],e[13]=A*i+g*r+m*s+n[13],e[14]=c*i+h*r+_*s+n[14],e[15]=l*i+d*r+f*s+n[15]),e}),WFe}var jFe,Njt;function Mu(){return Njt||(Njt=1,jFe={add:Bii(),clone:bii(),copy:hWt(),create:Hke(),invert:Sii(),equals:Qii(),fromRotation:xWt(),fromScaling:vii(),fromTaitBryanRotation:wii(),fromTranslation:Pii(),fromValues:Mii(),fromVectorRotation:jii(),fromXRotation:$ii(),fromYRotation:qii(),fromZRotation:Xii(),identity:CWt(),isIdentity:Zii(),isOnlyTransformScale:eri(),isMirroring:tri(),mirrorByPlane:nri(),multiply:ori(),rotate:iri(),rotateX:rri(),rotateY:sri(),rotateZ:ari(),scale:Ari(),subtract:cri(),toString:lri(),translate:uri()}),jFe}var $Fe,Rjt;function bhe(){if(Rjt)return $Fe;Rjt=1;const t=Mu();return $Fe=n=\u003e(n===void 0\u0026\u0026(n=[]),{sides:n,transforms:t.create()}),$Fe}var qFe,Tjt;function gri(){return Tjt||(Tjt=1,qFe=(e,n)=\u003e(e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e)),qFe}var XFe,kjt;function dri(){return kjt||(kjt=1,XFe=(e,n,o)=\u003e(e[0]=n[0]+o[0],e[1]=n[1]+o[1],e)),XFe}var ZFe,Fjt;function eLe(){return Fjt||(Fjt=1,ZFe=e=\u003eMath.atan2(e[1],e[0])),ZFe}var tLe,Ljt;function hri(){return Ljt||(Ljt=1,tLe=eLe()),tLe}var nLe,Hjt;function pri(){if(Hjt)return nLe;Hjt=1;const t=eLe();return nLe=n=\u003et(n)*57.29577951308232,nLe}var oLe,Ojt;function She(){return Ojt||(Ojt=1,oLe=()=\u003e[0,0]),oLe}var iLe,Gjt;function mri(){if(Gjt)return iLe;Gjt=1;const t=She();return iLe=n=\u003e{const o=t();return o[0]=n[0],o[1]=n[1],o},iLe}var rLe,Yjt;function _ri(){return Yjt||(Yjt=1,rLe=(e,n)=\u003e(e[0]=n[0],e[1]=n[1],e)),rLe}var sLe,Ujt;function fri(){return Ujt||(Ujt=1,sLe=(e,n,o)=\u003e(e[0]=0,e[1]=0,e[2]=n[0]*o[1]-n[1]*o[0],e)),sLe}var aLe,Kjt;function Iri(){return Kjt||(Kjt=1,aLe=(e,n)=\u003e{const o=n[0]-e[0],i=n[1]-e[1];return Math.sqrt(o*o+i*i)}),aLe}var ALe,Vjt;function Cri(){return Vjt||(Vjt=1,ALe=(e,n,o)=\u003e(e[0]=n[0]/o[0],e[1]=n[1]/o[1],e)),ALe}var cLe,zjt;function yri(){return zjt||(zjt=1,cLe=(e,n)=\u003ee[0]*n[0]+e[1]*n[1]),cLe}var lLe,Jjt;function xri(){return Jjt||(Jjt=1,lLe=(e,n)=\u003ee[0]===n[0]\u0026\u0026e[1]===n[1]),lLe}var uLe,Wjt;function jjt(){if(Wjt)return uLe;Wjt=1;const{sin:t,cos:e}=dI();return uLe=(o,i)=\u003e(o[0]=e(i),o[1]=t(i),o),uLe}var gLe,$jt;function Eri(){if($jt)return gLe;$jt=1;const t=jjt();return gLe=(n,o)=\u003et(n,o*.017453292519943295),gLe}var dLe,qjt;function Bri(){return qjt||(qjt=1,dLe=(e,n)=\u003e(e[0]=n,e[1]=n,e)),dLe}var hLe,Xjt;function bri(){if(Xjt)return hLe;Xjt=1;const t=She();return hLe=(n,o)=\u003e{const i=t();return i[0]=n,i[1]=o,i},hLe}var pLe,Zjt;function Sri(){return Zjt||(Zjt=1,pLe=e=\u003eMath.sqrt(e[0]*e[0]+e[1]*e[1])),pLe}var mLe,e$t;function Qri(){return e$t||(e$t=1,mLe=(e,n,o,i)=\u003e{const r=n[0],s=n[1];return e[0]=r+i*(o[0]-r),e[1]=s+i*(o[1]-s),e}),mLe}var _Le,t$t;function vri(){return t$t||(t$t=1,_Le=(e,n,o)=\u003e(e[0]=Math.max(n[0],o[0]),e[1]=Math.max(n[1],o[1]),e)),_Le}var fLe,n$t;function wri(){return n$t||(n$t=1,fLe=(e,n,o)=\u003e(e[0]=Math.min(n[0],o[0]),e[1]=Math.min(n[1],o[1]),e)),fLe}var ILe,o$t;function Pri(){return o$t||(o$t=1,ILe=(e,n,o)=\u003e(e[0]=n[0]*o[0],e[1]=n[1]*o[1],e)),ILe}var CLe,i$t;function Mri(){return i$t||(i$t=1,CLe=(e,n)=\u003e(e[0]=-n[0],e[1]=-n[1],e)),CLe}var yLe,r$t;function s$t(){return r$t||(r$t=1,yLe=(e,n,o,i)=\u003e{const r=n[0]-o[0],s=n[1]-o[1],a=Math.cos(i),A=Math.sin(i);return e[0]=r*a-s*A+o[0],e[1]=r*A+s*a+o[1],e}),yLe}var xLe,a$t;function Dri(){if(a$t)return xLe;a$t=1;const{TAU:t}=pc(),e=She(),n=s$t();return xLe=(i,r)=\u003en(i,r,e(),t/4),xLe}var ELe,A$t;function Nri(){return A$t||(A$t=1,ELe=(e,n)=\u003e{const o=n[0],i=n[1];let r=o*o+i*i;return r\u003e0\u0026\u0026(r=1/Math.sqrt(r)),e[0]=o*r,e[1]=i*r,e}),ELe}var BLe,c$t;function Rri(){return c$t||(c$t=1,BLe=(e,n,o)=\u003e(e[0]=n[0]*o,e[1]=n[1]*o,e)),BLe}var bLe,l$t;function Tri(){return l$t||(l$t=1,bLe=(e,n,o)=\u003e(e[0]=Math.round(n[0]/o)*o+0,e[1]=Math.round(n[1]/o)*o+0,e)),bLe}var SLe,u$t;function kri(){return u$t||(u$t=1,SLe=(e,n)=\u003e{const o=n[0]-e[0],i=n[1]-e[1];return o*o+i*i}),SLe}var QLe,g$t;function Fri(){return g$t||(g$t=1,QLe=e=\u003e{const n=e[0],o=e[1];return n*n+o*o}),QLe}var vLe,d$t;function Lri(){return d$t||(d$t=1,vLe=(e,n,o)=\u003e(e[0]=n[0]-o[0],e[1]=n[1]-o[1],e)),vLe}var wLe,h$t;function Hri(){return h$t||(h$t=1,wLe=e=\u003e`[${e[0].toFixed(7)}, ${e[1].toFixed(7)}]`),wLe}var PLe,p$t;function Ori(){return p$t||(p$t=1,PLe=(e,n,o)=\u003e{const i=n[0],r=n[1];return e[0]=o[0]*i+o[4]*r+o[12],e[1]=o[1]*i+o[5]*r+o[13],e}),PLe}var MLe,m$t;function mA(){return m$t||(m$t=1,MLe={abs:gri(),add:dri(),angle:hri(),angleDegrees:pri(),angleRadians:eLe(),clone:mri(),copy:_ri(),create:She(),cross:fri(),distance:Iri(),divide:Cri(),dot:yri(),equals:xri(),fromAngleDegrees:Eri(),fromAngleRadians:jjt(),fromScalar:Bri(),fromValues:bri(),length:Sri(),lerp:Qri(),max:vri(),min:wri(),multiply:Pri(),negate:Mri(),normal:Dri(),normalize:Nri(),rotate:s$t(),scale:Rri(),snap:Tri(),squaredDistance:kri(),squaredLength:Fri(),subtract:Lri(),toString:Hri(),transform:Ori()}),MLe}var DLe,_$t;function Gri(){if(_$t)return DLe;_$t=1;const t=mA(),e=bhe();return DLe=o=\u003e{if(!Array.isArray(o))throw new Error(\"the given points must be an array\");let i=o.length;if(i\u003c3)throw new Error(\"the given points must define a closed geometry with three or more points\");t.equals(o[0],o[i-1])\u0026\u0026--i;const r=[];let s=o[i-1];for(let a=0;a\u003ci;a++){const A=o[a];r.push([t.clone(s),t.clone(A)]),s=A}return e(r)},DLe}var NLe,f$t;function Yri(){if(f$t)return NLe;f$t=1;const t=Mu(),e=mA(),n=bhe();return NLe=i=\u003e{if(i[0]!==0)throw new Error(\"invalid compact binary data\");const r=n();r.transforms=t.clone(i.slice(1,17));for(let s=21;s\u003ci.length;s+=4){const a=e.fromValues(i[s+0],i[s+1]),A=e.fromValues(i[s+2],i[s+3]);r.sides.push([a,A])}return i[17]\u003e=0\u0026\u0026(r.color=[i[17],i[18],i[19],i[20]]),r},NLe}var RLe,I$t;function C$t(){return I$t||(I$t=1,RLe=e=\u003e!!(e\u0026\u0026typeof e==\"object\"\u0026\u0026\"sides\"in e\u0026\u0026\"transforms\"in e\u0026\u0026Array.isArray(e.sides)\u0026\u0026\"length\"in e.transforms)),RLe}var TLe,y$t;function Uri(){if(y$t)return TLe;y$t=1;const t=Mu(),e=mA();return TLe=o=\u003e(t.isIdentity(o.transforms)||(o.sides=o.sides.map(i=\u003e{const r=e.transform(e.create(),i[0],o.transforms),s=e.transform(e.create(),i[1],o.transforms);return[r,s]}),o.transforms=t.create()),o),TLe}var kLe,x$t;function uX(){if(x$t)return kLe;x$t=1;const t=Uri();return kLe=n=\u003et(n).sides,kLe}var FLe,E$t;function B$t(){if(E$t)return FLe;E$t=1;const t=bhe(),e=uX();return FLe=o=\u003e{const r=e(o).map(s=\u003e[s[1],s[0]]);return r.reverse(),t(r)},FLe}var LLe,b$t;function S$t(){if(b$t)return LLe;b$t=1;const t=mA(),e=uX(),n=s=\u003e{const a=new Map,A=c=\u003e{const l=c.toString();return a.has(l)?a.get(l):(a.set(l,c),c)};return s.map(c=\u003ec.map(A))},o=s=\u003e{const a=new Map;return n(s).forEach(c=\u003e{a.has(c[0])?a.get(c[0]).push(c):a.set(c[0],[c])}),a},i=s=\u003e{const a=o(e(s)),A=[];for(;;){let c;for(const[g,h]of a){if(c=h.shift(),!c){a.delete(g);continue}break}if(c===void 0)break;const l=[],u=c[0];for(;;){l.push(c[0]);const g=c[1];if(g===u)break;const h=a.get(g);if(!h)throw new Error(`geometry is not closed at vertex ${g}`);const d=r(c,h);h.length===0\u0026\u0026a.delete(g),c=d}l.length\u003e0\u0026\u0026l.push(l.shift()),A.push(l)}return a.clear(),A},r=(s,a)=\u003e{if(a.length===1)return a.pop();const A=t.create(),c=t.angleDegrees(t.subtract(A,s[1],s[0]));let l,u;a.forEach((h,d)=\u003e{let m=t.angleDegrees(t.subtract(A,h[1],h[0]))-c;m\u003c-180\u0026\u0026(m+=360),m\u003e=180\u0026\u0026(m-=360),(u===void 0||m\u003el)\u0026\u0026(u=d,l=m)});const g=a[u];return a.splice(u,1),g};return LLe=i,LLe}var HLe,Q$t;function Kri(){if(Q$t)return HLe;Q$t=1;const t=uX();return HLe=n=\u003e{const i=t(n).map(r=\u003er[0]);return i.length\u003e0\u0026\u0026i.push(i.shift()),i},HLe}var OLe,v$t;function Vri(){if(v$t)return OLe;v$t=1;const t=mA(),e=uX();return OLe=o=\u003e{const i=e(o);let r=\"geom2 (\"+i.length+` sides):\n[\n`;return i.forEach(s=\u003e{r+=\" [\"+t.toString(s[0])+\", \"+t.toString(s[1])+`]\n`}),r+=`]\n`,r},OLe}var GLe,w$t;function zri(){return w$t||(w$t=1,GLe=e=\u003e{const n=e.sides,o=e.transforms;let i=[-1,-1,-1,-1];e.color\u0026\u0026(i=e.color);const r=new Float32Array(21+n.length*4);r[0]=0,r[1]=o[0],r[2]=o[1],r[3]=o[2],r[4]=o[3],r[5]=o[4],r[6]=o[5],r[7]=o[6],r[8]=o[7],r[9]=o[8],r[10]=o[9],r[11]=o[10],r[12]=o[11],r[13]=o[12],r[14]=o[13],r[15]=o[14],r[16]=o[15],r[17]=i[0],r[18]=i[1],r[19]=i[2],r[20]=i[3];for(let s=0;s\u003cn.length;s++){const a=s*4+21,A=n[s][0],c=n[s][1];r[a+0]=A[0],r[a+1]=A[1],r[a+2]=c[0],r[a+3]=c[1]}return r}),GLe}var YLe,P$t;function Jri(){if(P$t)return YLe;P$t=1;const t=Mu(),e=B$t();return YLe=(o,i)=\u003e{const r=t.multiply(t.create(),o,i.transforms),s=Object.assign({},i,{transforms:r});return o[0]*o[5]-o[4]*o[1]\u003c0?e(s):s},YLe}var ULe,M$t;function Wri(){if(M$t)return ULe;M$t=1;const t=mA(),e=C$t(),n=S$t();return ULe=i=\u003e{if(!e(i))throw new Error(\"invalid geom2 structure\");if(n(i),i.sides.forEach(r=\u003e{if(t.equals(r[0],r[1]))throw new Error(`geom2 self-edge ${r[0]}`)}),!i.transforms.every(Number.isFinite))throw new Error(`geom2 invalid transforms ${i.transforms}`)},ULe}var KLe,D$t;function Ga(){return D$t||(D$t=1,KLe={clone:Eii(),create:bhe(),fromPoints:Gri(),fromCompactBinary:Yri(),isA:C$t(),reverse:B$t(),toOutlines:S$t(),toPoints:Kri(),toSides:uX(),toString:Vri(),toCompactBinary:zri(),transform:Jri(),validate:Wri()}),KLe}var VLe,N$t;function jri(){return N$t||(N$t=1,VLe=e=\u003eObject.assign({},e)),VLe}var zLe,R$t;function gX(){if(R$t)return zLe;R$t=1;const t=Mu();return zLe=n=\u003e(n===void 0\u0026\u0026(n=[]),{polygons:n,transforms:t.create()}),zLe}var JLe,T$t;function $ri(){if(T$t)return JLe;T$t=1;const t=lX(),e=Bhe(),n=ujt(),o=(r,s,a)=\u003e{const A=[],c=[],l=[];e(A,a,s),e(c,r,s);const u=n(t(l,c,A)),g=n(A);if(g===0)throw Error(\"a and b are the same point\");return u/g};return JLe=(r,s,a)=\u003eMath.sqrt(o(r,s,a)),JLe}var WLe,k$t;function qri(){if(k$t)return WLe;k$t=1;const t=lX(),e=IFe(),n=Bhe();return WLe=(i,r,s,a)=\u003e{const A=[0,0,0];return n(i,r,s),n(A,s,a),t(i,i,A),e(i,i)},WLe}var jLe,F$t;function Xri(){if(F$t)return jLe;F$t=1;class t{constructor(){this.head=null,this.tail=null}clear(){this.head=this.tail=null}insertBefore(n,o){o.prev=n.prev,o.next=n,o.prev?o.prev.next=o:this.head=o,n.prev=o}insertAfter(n,o){o.prev=n,o.next=n.next,o.next?o.next.prev=o:this.tail=o,n.next=o}add(n){this.head?this.tail.next=n:this.head=n,n.prev=this.tail,n.next=null,this.tail=n}addAll(n){for(this.head?this.tail.next=n:this.head=n,n.prev=this.tail;n.next;)n=n.next;this.tail=n}remove(n){n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev}removeChain(n,o){n.prev?n.prev.next=o.next:this.head=o.next,o.next?o.next.prev=n.prev:this.tail=n.prev}first(){return this.head}isEmpty(){return!this.head}}return jLe=t,jLe}var $Le,L$t;function Zri(){if(L$t)return $Le;L$t=1;class t{constructor(n,o){this.point=n,this.index=o,this.next=null,this.prev=null,this.face=null}}return $Le=t,$Le}var qLe,H$t;function esi(){if(H$t)return qLe;H$t=1;const t=HWt(),e=cjt();class n{constructor(i,r){this.vertex=i,this.face=r,this.next=null,this.prev=null,this.opposite=null}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){return this.tail()?t(this.tail().point,this.head().point):-1}lengthSquared(){return this.tail()?e(this.tail().point,this.head().point):-1}setOpposite(i){this.opposite=i,i.opposite=this}}return qLe=n,qLe}var XLe,O$t;function tsi(){if(O$t)return XLe;O$t=1;const t=PWt(),e=kWt(),n=lX(),o=xhe(),i=zWt(),r=IFe(),s=sjt(),a=Bhe(),A=esi(),c=0,l=1,u=2;class g{constructor(){this.normal=[],this.centroid=[],this.offset=0,this.outside=null,this.mark=c,this.edge=null,this.nVertices=0}getEdge(d){if(typeof d!=\"number\")throw Error(\"requires a number\");let p=this.edge;for(;d\u003e0;)p=p.next,d-=1;for(;d\u003c0;)p=p.prev,d+=1;return p}computeNormal(){const d=this.edge,p=d.next;let m=p.next;const _=a([],p.head().point,d.head().point),f=[],I=[];for(this.nVertices=2,this.normal=[0,0,0];m!==d;)e(I,_),a(_,m.head().point,d.head().point),t(this.normal,this.normal,n(f,I,_)),m=m.next,this.nVertices+=1;this.area=i(this.normal),this.normal=s(this.normal,this.normal,1/this.area)}computeNormalMinArea(d){if(this.computeNormal(),this.area\u003cd){let p,m=0,_=this.edge;do{const E=_.lengthSquared();E\u003em\u0026\u0026(p=_,m=E),_=_.next}while(_!==this.edge);const f=p.tail().point,I=p.head().point,C=a([],I,f),y=Math.sqrt(m);s(C,C,1/y);const x=o(this.normal,C);s(C,C,-x),t(this.normal,this.normal,C),r(this.normal,this.normal)}}computeCentroid(){this.centroid=[0,0,0];let d=this.edge;do t(this.centroid,this.centroid,d.head().point),d=d.next;while(d!==this.edge);s(this.centroid,this.centroid,1/this.nVertices)}computeNormalAndCentroid(d){typeof d\u003c\"u\"?this.computeNormalMinArea(d):this.computeNormal(),this.computeCentroid(),this.offset=o(this.normal,this.centroid)}distanceToPlane(d){return o(this.normal,d)-this.offset}connectHalfEdges(d,p){let m;if(d.opposite.face===p.opposite.face){const _=p.opposite.face;let f;d===this.edge\u0026\u0026(this.edge=p),_.nVertices===3?(f=p.opposite.prev.opposite,_.mark=u,m=_):(f=p.opposite.next,_.edge===f.prev\u0026\u0026(_.edge=f),f.prev=f.prev.prev,f.prev.next=f),p.prev=d.prev,p.prev.next=p,p.setOpposite(f),_.computeNormalAndCentroid()}else d.next=p,p.prev=d;return m}mergeAdjacentFaces(d,p){const m=d.opposite,_=m.face;p.push(_),_.mark=u;let f=d.prev,I=d.next,C=m.prev,y=m.next;for(;f.opposite.face===_;)f=f.prev,y=y.next;for(;I.opposite.face===_;)I=I.next,C=C.prev;let x;for(x=y;x!==C.next;x=x.next)x.face=this;this.edge=I;let E;return E=this.connectHalfEdges(C,I),E\u0026\u0026p.push(E),E=this.connectHalfEdges(f,y),E\u0026\u0026p.push(E),this.computeNormalAndCentroid(),p}collectIndices(){const d=[];let p=this.edge;do d.push(p.head().index),p=p.next;while(p!==this.edge);return d}static createTriangle(d,p,m,_=0){const f=new g,I=new A(d,f),C=new A(p,f),y=new A(m,f);return I.next=y.prev=C,C.next=I.prev=y,y.next=C.prev=I,f.edge=I,f.computeNormalAndCentroid(_),f}}return XLe={VISIBLE:c,NON_CONVEX:l,DELETED:u,Face:g},XLe}var ZLe,G$t;function nsi(){if(G$t)return ZLe;G$t=1;const t=xhe(),e=$ri(),n=qri(),o=Xri(),i=Zri(),{Face:r,VISIBLE:s,NON_CONVEX:a,DELETED:A}=tsi(),c=1,l=2;class u{constructor(h){if(!Array.isArray(h))throw TypeError(\"input is not a valid array\");if(h.length\u003c4)throw Error(\"cannot build a simplex out of \u003c4 points\");this.tolerance=-1,this.nFaces=0,this.nPoints=h.length,this.faces=[],this.newFaces=[],this.claimed=new o,this.unclaimed=new o,this.vertices=[];for(let d=0;d\u003ch.length;d+=1)this.vertices.push(new i(h[d],d));this.discardedFaces=[],this.vertexPointIndices=[]}addVertexToFace(h,d){h.face=d,d.outside?this.claimed.insertBefore(d.outside,h):this.claimed.add(h),d.outside=h}removeVertexFromFace(h,d){h===d.outside\u0026\u0026(h.next\u0026\u0026h.next.face===d?d.outside=h.next:d.outside=null),this.claimed.remove(h)}removeAllVerticesFromFace(h){if(h.outside){let d=h.outside;for(;d.next\u0026\u0026d.next.face===h;)d=d.next;return this.claimed.removeChain(h.outside,d),d.next=null,h.outside}}deleteFaceVertices(h,d){const p=this.removeAllVerticesFromFace(h);if(p)if(!d)this.unclaimed.addAll(p);else{let m;for(let _=p;_;_=m)m=_.next,d.distanceToPlane(_.point)\u003ethis.tolerance?this.addVertexToFace(_,d):this.unclaimed.add(_)}}resolveUnclaimedPoints(h){let d=this.unclaimed.first();for(let p=d;p;p=d){d=p.next;let m=this.tolerance,_;for(let f=0;f\u003ch.length;f+=1){const I=h[f];if(I.mark===s){const C=I.distanceToPlane(p.point);if(C\u003em\u0026\u0026(m=C,_=I),m\u003e1e3*this.tolerance)break}}_\u0026\u0026this.addVertexToFace(p,_)}}computeExtremes(){const h=[],d=[],p=[],m=[];let _,f;for(_=0;_\u003c3;_+=1)p[_]=m[_]=this.vertices[0];for(_=0;_\u003c3;_+=1)h[_]=d[_]=this.vertices[0].point[_];for(_=1;_\u003cthis.vertices.length;_+=1){const I=this.vertices[_],C=I.point;for(f=0;f\u003c3;f+=1)C[f]\u003ch[f]\u0026\u0026(h[f]=C[f],p[f]=I);for(f=0;f\u003c3;f+=1)C[f]\u003ed[f]\u0026\u0026(d[f]=C[f],m[f]=I)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(h[0]),Math.abs(d[0]))+Math.max(Math.abs(h[1]),Math.abs(d[1]))+Math.max(Math.abs(h[2]),Math.abs(d[2]))),[p,m]}createInitialSimplex(){const h=this.vertices,[d,p]=this.computeExtremes();let m,_,f,I,C=0,y=0;for(f=0;f\u003c3;f+=1){const w=p[f].point[f]-d[f].point[f];w\u003eC\u0026\u0026(C=w,y=f)}const x=d[y],E=p[y];for(C=0,f=0;f\u003cthis.vertices.length;f+=1){const w=this.vertices[f];if(w!==x\u0026\u0026w!==E){const M=e(w.point,x.point,E.point);M\u003eC\u0026\u0026(C=M,m=w)}}const B=n([],x.point,E.point,m.point),S=t(x.point,B);for(C=-1,f=0;f\u003cthis.vertices.length;f+=1){const w=this.vertices[f];if(w!==x\u0026\u0026w!==E\u0026\u0026w!==m){const M=Math.abs(t(B,w.point)-S);M\u003eC\u0026\u0026(C=M,_=w)}}const Q=[];if(t(_.point,B)-S\u003c0)for(Q.push(r.createTriangle(x,E,m),r.createTriangle(_,E,x),r.createTriangle(_,m,E),r.createTriangle(_,x,m)),f=0;f\u003c3;f+=1){const w=(f+1)%3;Q[f+1].getEdge(2).setOpposite(Q[0].getEdge(w)),Q[f+1].getEdge(1).setOpposite(Q[w+1].getEdge(0))}else for(Q.push(r.createTriangle(x,m,E),r.createTriangle(_,x,E),r.createTriangle(_,E,m),r.createTriangle(_,m,x)),f=0;f\u003c3;f+=1){const w=(f+1)%3;Q[f+1].getEdge(2).setOpposite(Q[0].getEdge((3-f)%3)),Q[f+1].getEdge(0).setOpposite(Q[w+1].getEdge(1))}for(f=0;f\u003c4;f+=1)this.faces.push(Q[f]);for(f=0;f\u003ch.length;f+=1){const w=h[f];if(w!==x\u0026\u0026w!==E\u0026\u0026w!==m\u0026\u0026w!==_){C=this.tolerance;let M;for(I=0;I\u003c4;I+=1){const k=Q[I].distanceToPlane(w.point);k\u003eC\u0026\u0026(C=k,M=Q[I])}M\u0026\u0026this.addVertexToFace(w,M)}}}reindexFaceAndVertices(){const h=[];for(let d=0;d\u003cthis.faces.length;d+=1){const p=this.faces[d];p.mark===s\u0026\u0026h.push(p)}this.faces=h}collectFaces(h){const d=[];for(let p=0;p\u003cthis.faces.length;p+=1){if(this.faces[p].mark!==s)throw Error(\"attempt to include a destroyed face in the hull\");const m=this.faces[p].collectIndices();if(h)d.push(m);else for(let _=0;_\u003cm.length-2;_+=1)d.push([m[0],m[_+1],m[_+2]])}return d}nextVertexToAdd(){if(!this.claimed.isEmpty()){let h,d,p=0;const m=this.claimed.first().face;for(d=m.outside;d\u0026\u0026d.face===m;d=d.next){const _=m.distanceToPlane(d.point);_\u003ep\u0026\u0026(p=_,h=d)}return h}}computeHorizon(h,d,p,m){this.deleteFaceVertices(p),p.mark=A;let _;d?_=d.next:_=d=p.getEdge(0);do{const f=_.opposite,I=f.face;I.mark===s\u0026\u0026(I.distanceToPlane(h)\u003ethis.tolerance?this.computeHorizon(h,f,I,m):m.push(_)),_=_.next}while(_!==d)}addAdjoiningFace(h,d){const p=r.createTriangle(h,d.tail(),d.head());return this.faces.push(p),p.getEdge(-1).setOpposite(d.opposite),p.getEdge(0)}addNewFaces(h,d){this.newFaces=[];let p,m;for(let _=0;_\u003cd.length;_+=1){const f=d[_],I=this.addAdjoiningFace(h,f);p?I.next.setOpposite(m):p=I,this.newFaces.push(I.face),m=I}p.next.setOpposite(m)}oppositeFaceDistance(h){return h.face.distanceToPlane(h.opposite.face.centroid)}doAdjacentMerge(h,d){let p=h.edge,m=!0,_=0;do{if(_\u003e=h.nVertices)throw Error(\"merge recursion limit exceeded\");const f=p.opposite.face;let I=!1;if(d===l?(this.oppositeFaceDistance(p)\u003e-this.tolerance||this.oppositeFaceDistance(p.opposite)\u003e-this.tolerance)\u0026\u0026(I=!0):h.area\u003ef.area?this.oppositeFaceDistance(p)\u003e-this.tolerance?I=!0:this.oppositeFaceDistance(p.opposite)\u003e-this.tolerance\u0026\u0026(m=!1):this.oppositeFaceDistance(p.opposite)\u003e-this.tolerance?I=!0:this.oppositeFaceDistance(p)\u003e-this.tolerance\u0026\u0026(m=!1),I){const C=h.mergeAdjacentFaces(p,[]);for(let y=0;y\u003cC.length;y+=1)this.deleteFaceVertices(C[y],h);return!0}p=p.next,_+=1}while(p!==h.edge);return m||(h.mark=a),!1}addVertexToHull(h){const d=[];this.unclaimed.clear(),this.removeVertexFromFace(h,h.face),this.computeHorizon(h.point,null,h.face,d),this.addNewFaces(h,d);for(let p=0;p\u003cthis.newFaces.length;p+=1){const m=this.newFaces[p];if(m.mark===s)for(;this.doAdjacentMerge(m,c););}for(let p=0;p\u003cthis.newFaces.length;p+=1){const m=this.newFaces[p];if(m.mark===a)for(m.mark=s;this.doAdjacentMerge(m,l););}this.resolveUnclaimedPoints(this.newFaces)}build(){let h;for(this.createInitialSimplex();h=this.nextVertexToAdd();)this.addVertexToHull(h);this.reindexFaceAndVertices()}}return ZLe=u,ZLe}var eHe,Y$t;function U$t(){if(Y$t)return eHe;Y$t=1;const t=nsi();return eHe=(n,o={})=\u003e{const i=new t(n);return i.build(),i.collectFaces(o.skipTriangulation)},eHe}var tHe,K$t;function EY(){return K$t||(K$t=1,tHe=e=\u003e((e===void 0||e.length\u003c3)\u0026\u0026(e=[]),{vertices:e})),tHe}var nHe,V$t;function osi(){if(V$t)return nHe;V$t=1;const t=EY(),e=jr();return nHe=(...o)=\u003e{let i,r;return o.length===1?(i=t(),r=o[0]):(i=o[0],r=o[1]),i.vertices=r.vertices.map(s=\u003ee.clone(s)),i},nHe}var oHe,z$t;function isi(){if(z$t)return oHe;z$t=1;const t=jr(),e=EY();return oHe=o=\u003e{const i=o.map(r=\u003et.clone(r));return e(i)},oHe}var iHe,J$t;function rsi(){if(J$t)return iHe;J$t=1;const t=EY();return iHe=(n,o)=\u003e{const i=t(n);return i.plane=o,i},iHe}var rHe,W$t;function Qhe(){return W$t||(W$t=1,rHe=()=\u003e[0,0,0,0]),rHe}var sHe,j$t;function $t(){if(j$t)return sHe;j$t=1;const t=Qhe();return sHe=n=\u003e{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o},sHe}var aHe,q$t;function X$t(){return q$t||(q$t=1,aHe=(e,n)=\u003e(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e)),aHe}var AHe,Z$t;function eqt(){return Z$t||(Z$t=1,AHe=(e,n)=\u003ee[0]===n[0]\u0026\u0026e[1]===n[1]\u0026\u0026e[2]===n[2]\u0026\u0026e[3]===n[3]),AHe}var cHe,tqt;function nqt(){return tqt||(tqt=1,cHe=(e,n)=\u003e(e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e)),cHe}var lHe,oqt;function iqt(){if(oqt)return lHe;oqt=1;const t=jr();return lHe=(n,o,i)=\u003e{const r=t.normalize(t.create(),o),s=t.dot(i,r);return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=s,n},lHe}var uHe,rqt;function sqt(){if(rqt)return uHe;rqt=1;const t=Qhe();return uHe=(n,o,i,r)=\u003e{const s=t();return s[0]=n,s[1]=o,s[2]=i,s[3]=r,s},uHe}var gHe,aqt;function ssi(){if(aqt)return gHe;aqt=1;const t=jr(),e=iqt();return gHe=(o,...i)=\u003e{o[0]=0,o[1]=0,o[2]=0,o[3]=0;const r=i.length;i.forEach(m=\u003e{t.add(o,o,m)}),t.scale(o,o,1/r);let s=0,a=0,A=0,c=0,l=0,u=0;const g=t.create();i.forEach(m=\u003e{t.subtract(g,m,o),s+=g[0]*g[0],a+=g[0]*g[1],A+=g[0]*g[2],c+=g[1]*g[1],l+=g[1]*g[2],u+=g[2]*g[2]}),s/=r,a/=r,A/=r,c/=r,l/=r,u/=r,g[0]=0,g[1]=0,g[2]=0;const h=t.create();let d=c*u-l*l;h[0]=d,h[1]=A*l-a*u,h[2]=a*l-A*c;let p=d*d;return t.add(g,g,t.scale(h,h,p)),d=s*u-A*A,h[0]=A*l-a*u,h[1]=d,h[2]=a*A-l*s,p=d*d,t.dot(g,h)\u003c0\u0026\u0026(p=-p),t.add(g,g,t.scale(h,h,p)),d=s*c-a*a,h[0]=a*l-A*c,h[1]=a*A-l*s,h[2]=d,p=d*d,t.dot(g,h)\u003c0\u0026\u0026(p=-p),t.add(g,g,t.scale(h,h,p)),e(o,g,o)},gHe}var dHe,Aqt;function cqt(){if(Aqt)return dHe;Aqt=1;const t=jr();return dHe=(n,...o)=\u003e{const i=o.length,r=t.create(),s=t.create(),a=A=\u003e{const c=o[A],l=o[(A+1)%i],u=o[(A+2)%i];return t.subtract(r,l,c),t.subtract(s,u,c),t.cross(r,r,s),t.normalize(r,r),r};return n[0]=0,n[1]=0,n[2]=0,i===3?t.copy(n,a(0)):(o.forEach((A,c)=\u003e{t.add(n,n,a(c))}),t.normalize(n,n)),n[3]=t.dot(n,o[0]),n},dHe}var hHe,lqt;function asi(){if(lqt)return hHe;lqt=1;const{EPS:t}=pc(),e=jr();return hHe=(o,i,r,s)=\u003e{let a=e.subtract(e.create(),r,i),A=e.subtract(e.create(),s,i);e.length(a)\u003ct\u0026\u0026(a=e.orthogonal(a,A)),e.length(A)\u003ct\u0026\u0026(A=e.orthogonal(A,a));let c=e.cross(e.create(),a,A);e.length(c)\u003ct\u0026\u0026(A=e.orthogonal(A,a),c=e.cross(c,a,A)),c=e.normalize(c,c);const l=e.dot(c,i);return o[0]=c[0],o[1]=c[1],o[2]=c[2],o[3]=l,o},hHe}var pHe,uqt;function Asi(){if(uqt)return pHe;uqt=1;const t=jr();return pHe=(n,o)=\u003e{const i=o[0]*n[0]+o[1]*n[1]+o[2]*n[2]-n[3],r=o[0]-i*n[0],s=o[1]-i*n[1],a=o[2]-i*n[2];return t.fromValues(r,s,a)},pHe}var mHe,gqt;function dqt(){if(gqt)return mHe;gqt=1;const t=jr();return mHe=(n,o)=\u003et.dot(n,o)-n[3],mHe}var _He,hqt;function pqt(){return hqt||(hqt=1,_He=e=\u003e`(${e[0].toFixed(9)}, ${e[1].toFixed(9)}, ${e[2].toFixed(9)}, ${e[3].toFixed(9)})`),_He}var fHe,mqt;function csi(){if(mqt)return fHe;mqt=1;const t=Mu(),e=jr(),n=cqt(),o=nqt();return fHe=(r,s,a)=\u003e{const A=t.isMirroring(a),c=e.orthogonal(e.create(),s),l=e.cross(c,s,c),u=e.cross(e.create(),s,l);let g=e.fromScalar(e.create(),s[3]);e.multiply(g,g,s);let h=e.add(e.create(),g,l),d=e.add(e.create(),g,u);return g=e.transform(g,g,a),h=e.transform(h,h,a),d=e.transform(d,d,a),n(r,g,h,d),A\u0026\u0026o(r,r),r},fHe}var IHe,_qt;function E6(){return _qt||(_qt=1,IHe={clone:$t(),copy:X$t(),create:Qhe(),equals:eqt(),flip:nqt(),fromNormalAndPoint:iqt(),fromValues:sqt(),fromNoisyPoints:ssi(),fromPoints:cqt(),fromPointsRandom:asi(),projectionOfPoint:Asi(),signedDistanceToPoint:dqt(),toString:pqt(),transform:csi()}),IHe}var CHe,fqt;function lsi(){if(fqt)return CHe;fqt=1;const t=E6(),e=EY();return CHe=o=\u003e{const i=o.vertices.slice().reverse(),r=e(i);return o.plane\u0026\u0026(r.plane=t.flip(t.create(),o.plane)),r},CHe}var yHe,Iqt;function Cqt(){return Iqt||(Iqt=1,yHe=e=\u003e!!(e\u0026\u0026typeof e==\"object\"\u0026\u0026\"vertices\"in e\u0026\u0026Array.isArray(e.vertices))),yHe}var xHe,yqt;function xqt(){if(yqt)return xHe;yqt=1;const t=E6(),e=jr(),n=r=\u003eo(r.vertices),o=r=\u003e{const s=r.length;if(s\u003e2){const a=t.fromPoints(t.create(),...r);let A=r[s-2],c=r[s-1];for(let l=0;l\u003cs;l++){const u=r[l];if(!i(A,c,u,a))return!1;A=c,c=u}}return!0},i=(r,s,a,A)=\u003e{const c=e.cross(e.create(),e.subtract(e.create(),s,r),e.subtract(e.create(),a,s));return e.dot(c,A)\u003e=0};return xHe=n,xHe}var EHe,Eqt;function BHe(){if(Eqt)return EHe;Eqt=1;const t=E6();return EHe=n=\u003e(n.plane||(n.plane=t.fromPoints(t.create(),...n.vertices)),n.plane),EHe}var bHe,Bqt;function bqt(){if(Bqt)return bHe;Bqt=1;const t=BHe();return bHe=n=\u003e{const o=n.vertices.length;if(o\u003c3)return 0;const i=n.vertices,r=t(n),s=Math.abs(r[0]),a=Math.abs(r[1]),A=Math.abs(r[2]);if(s+a+A===0)return 0;let c=3;s\u003ea\u0026\u0026s\u003eA?c=1:a\u003eA\u0026\u0026(c=2);let l=0,u=0,g=1,h=2;switch(c){case 1:for(g=1;g\u003co;g++)u=g-1,h=(g+1)%o,l+=i[g][1]*(i[h][2]-i[u][2]);l+=i[0][1]*(i[1][2]-i[o-1][2]),l/=2*r[0];break;case 2:for(g=1;g\u003co;g++)u=g-1,h=(g+1)%o,l+=i[g][2]*(i[h][0]-i[u][0]);l+=i[0][2]*(i[1][0]-i[o-1][0]),l/=2*r[1];break;default:for(g=1;g\u003co;g++)u=g-1,h=(g+1)%o,l+=i[g][0]*(i[h][1]-i[u][1]);l+=i[0][0]*(i[1][1]-i[o-1][1]),l/=2*r[2];break}return l},bHe}var SHe,Sqt;function usi(){if(Sqt)return SHe;Sqt=1;const t=jr();return SHe=n=\u003e{const o=n.vertices,i=o.length,r=i===0?t.create():t.clone(o[0]),s=t.clone(r);for(let a=1;a\u003ci;a++)t.min(r,r,o[a]),t.max(s,s,o[a]);return[r,s]},SHe}var QHe,Qqt;function gsi(){return Qqt||(Qqt=1,QHe=(e,n)=\u003ee[0]*n[0]+e[1]*n[1]+e[2]*n[2]+e[3]*n[3]),QHe}var vHe,vqt;function dsi(){return vqt||(vqt=1,vHe=(e,n)=\u003e(e[0]=n,e[1]=n,e[2]=n,e[3]=n,e)),vHe}var wHe,wqt;function hsi(){return wqt||(wqt=1,wHe=(e,n,o)=\u003e{const[i,r,s,a]=n;return e[0]=o[0]*i+o[4]*r+o[8]*s+o[12]*a,e[1]=o[1]*i+o[5]*r+o[9]*s+o[13]*a,e[2]=o[2]*i+o[6]*r+o[10]*s+o[14]*a,e[3]=o[3]*i+o[7]*r+o[11]*s+o[15]*a,e}),wHe}var PHe,Pqt;function Mqt(){return Pqt||(Pqt=1,PHe={clone:$t(),copy:X$t(),create:Qhe(),dot:gsi(),equals:eqt(),fromScalar:dsi(),fromValues:sqt(),toString:pqt(),transform:hsi()}),PHe}var MHe,Dqt;function psi(){if(Dqt)return MHe;Dqt=1;const t=Mqt(),e=new WeakMap;return MHe=o=\u003e{const i=e.get(o);if(i)return i;const r=o.vertices,s=t.create();if(r.length===0)return s[0]=0,s[1]=0,s[2]=0,s[3]=0,s;let a=r[0],A=a,c=a,l=a,u=a,g=a;r.forEach(m=\u003e{a[0]\u003em[0]\u0026\u0026(a=m),A[1]\u003em[1]\u0026\u0026(A=m),c[2]\u003em[2]\u0026\u0026(c=m),l[0]\u003cm[0]\u0026\u0026(l=m),u[1]\u003cm[1]\u0026\u0026(u=m),g[2]\u003cm[2]\u0026\u0026(g=m)}),s[0]=(a[0]+l[0])*.5,s[1]=(A[1]+u[1])*.5,s[2]=(c[2]+g[2])*.5;const h=s[0]-l[0],d=s[1]-u[1],p=s[2]-g[2];return s[3]=Math.sqrt(h*h+d*d+p*p),e.set(o,s),s},MHe}var DHe,Nqt;function msi(){if(Nqt)return DHe;Nqt=1;const t=jr();return DHe=n=\u003e{let o=0;const i=n.vertices,r=t.create();for(let s=0;s\u003ci.length-2;s++)t.cross(r,i[s+1],i[s+2]),o+=t.dot(i[0],r);return o/=6,o},DHe}var NHe,Rqt;function _si(){return Rqt||(Rqt=1,NHe=e=\u003ee.vertices),NHe}var RHe,Tqt;function fsi(){if(Tqt)return RHe;Tqt=1;const t=jr();return RHe=n=\u003e{let o=\"poly3: vertices: [\";return n.vertices.forEach(i=\u003e{o+=`${t.toString(i)}, `}),o+=\"]\",o},RHe}var THe,kqt;function Isi(){if(kqt)return THe;kqt=1;const t=Mu(),e=jr(),n=EY();return THe=(i,r)=\u003e{const s=r.vertices.map(a=\u003ee.transform(e.create(),a,i));return t.isMirroring(i)\u0026\u0026s.reverse(),n(s)},THe}var kHe,Fqt;function Csi(){if(Fqt)return kHe;Fqt=1;const t=dqt(),{NEPS:e}=pc(),n=jr(),o=Cqt(),i=xqt(),r=bqt(),s=BHe();return kHe=A=\u003e{if(!o(A))throw new Error(\"invalid poly3 structure\");if(A.vertices.length\u003c3)throw new Error(`poly3 not enough vertices ${A.vertices.length}`);if(r(A)\u003c=0)throw new Error(\"poly3 area must be greater than zero\");for(let c=0;c\u003cA.vertices.length;c++)if(n.equals(A.vertices[c],A.vertices[(c+1)%A.vertices.length]))throw new Error(`poly3 duplicate vertex ${A.vertices[c]}`);if(!i(A))throw new Error(\"poly3 must be convex\");if(A.vertices.forEach(c=\u003e{if(!c.every(Number.isFinite))throw new Error(`poly3 invalid vertex ${c}`)}),A.vertices.length\u003e3){const c=s(A);A.vertices.forEach(l=\u003e{const u=Math.abs(t(c,l));if(u\u003ee)throw new Error(`poly3 must be coplanar: vertex ${l} distance ${u}`)})}},kHe}var FHe,Lqt;function qA(){return Lqt||(Lqt=1,FHe={clone:osi(),create:EY(),fromPoints:isi(),fromPointsAndPlane:rsi(),invert:lsi(),isA:Cqt(),isConvex:xqt(),measureArea:bqt(),measureBoundingBox:usi(),measureBoundingSphere:psi(),measureSignedVolume:msi(),plane:BHe(),toPoints:_si(),toString:fsi(),transform:Isi(),validate:Csi()}),FHe}var LHe,Hqt;function ysi(){if(Hqt)return LHe;Hqt=1;const t=U$t(),e=gX(),n=qA();return LHe=i=\u003e{if(!Array.isArray(i))throw new Error(\"the given points must be an array\");const s=t(i,{skipTriangulation:!0}).map(a=\u003e{const A=a.map(c=\u003ei[c]);return n.create(A)});return e(s)},LHe}var HHe,Oqt;function xsi(){if(Oqt)return HHe;Oqt=1;const t=qA(),e=gX();return HHe=o=\u003e{if(!Array.isArray(o))throw new Error(\"the given points must be an array\");const i=o.map((s,a)=\u003et.create(s));return e(i)},HHe}var OHe,Gqt;function Esi(){if(Gqt)return OHe;Gqt=1;const t=jr(),e=Mu(),n=qA(),o=gX();return OHe=r=\u003e{if(r[0]!==1)throw new Error(\"invalid compact binary data\");const s=o();s.transforms=e.clone(r.slice(1,17));const a=r[21];let A=22,c=r.length-a*3;for(;c\u003cr.length;){const l=r[A];A++;const u=[];for(let g=0;g\u003cl;g++)u.push(t.fromValues(r[c],r[c+1],r[c+2])),c+=3;s.polygons.push(n.create(u))}return r[17]\u003e=0\u0026\u0026(s.color=[r[17],r[18],r[19],r[20]]),s},OHe}var GHe,Yqt;function Bsi(){if(Yqt)return GHe;Yqt=1;const t=Mu(),e=qA();return GHe=o=\u003e(t.isIdentity(o.transforms)||(o.polygons=o.polygons.map(i=\u003ee.transform(o.transforms,i)),o.transforms=t.create()),o),GHe}var YHe,Uqt;function dX(){if(Uqt)return YHe;Uqt=1;const t=Bsi();return YHe=n=\u003et(n).polygons,YHe}var UHe,Kqt;function bsi(){if(Kqt)return UHe;Kqt=1;const t=qA(),e=gX(),n=dX();return UHe=i=\u003e{const s=n(i).map(a=\u003et.invert(a));return e(s)},UHe}var KHe,Vqt;function VHe(){return Vqt||(Vqt=1,KHe=e=\u003e!!(e\u0026\u0026typeof e==\"object\"\u0026\u0026\"polygons\"in e\u0026\u0026\"transforms\"in e\u0026\u0026Array.isArray(e.polygons)\u0026\u0026\"length\"in e.transforms)),KHe}var zHe,zqt;function Ssi(){if(zqt)return zHe;zqt=1;const{EPS:t}=pc(),e=jr(),n=VHe(),o=dX(),i=qA();return zHe=s=\u003e{if(!n(s))throw new Error(\"isConvex requires a geom3 geometry\");const a=o(s);if(a.length===0)return!0;const A=[],c=new Set;for(let l=0;l\u003ca.length;l++){const u=a[l].vertices;for(let g=0;g\u003cu.length;g++){const h=u[g],d=`${h[0]},${h[1]},${h[2]}`;c.has(d)||(c.add(d),A.push(h))}}for(let l=0;l\u003ca.length;l++){const u=i.plane(a[l]);for(let g=0;g\u003cA.length;g++){const h=A[g];if(e.dot(u,h)-u[3]\u003et)return!1}}return!0},zHe}var JHe,Jqt;function Qsi(){if(Jqt)return JHe;Jqt=1;const t=qA(),e=dX();return JHe=o=\u003ee(o).map(s=\u003et.toPoints(s)),JHe}var WHe,Wqt;function vsi(){if(Wqt)return WHe;Wqt=1;const t=qA(),e=dX();return WHe=o=\u003e{const i=e(o);let r=\"geom3 (\"+i.length+` polygons):\n`;return i.forEach(s=\u003e{r+=\" \"+t.toString(s)+`\n`}),r},WHe}var jHe,jqt;function wsi(){if(jqt)return jHe;jqt=1;const t=qA();return jHe=n=\u003e{const o=n.polygons,i=n.transforms,r=o.length,s=o.reduce((u,g)=\u003eu+g.vertices.length,0);let a=[-1,-1,-1,-1];n.color\u0026\u0026(a=n.color);const A=new Float32Array(22+r+s*3);A[0]=1,A[1]=i[0],A[2]=i[1],A[3]=i[2],A[4]=i[3],A[5]=i[4],A[6]=i[5],A[7]=i[6],A[8]=i[7],A[9]=i[8],A[10]=i[9],A[11]=i[10],A[12]=i[11],A[13]=i[12],A[14]=i[13],A[15]=i[14],A[16]=i[15],A[17]=a[0],A[18]=a[1],A[19]=a[2],A[20]=a[3],A[21]=s;let c=22,l=c+r;return o.forEach(u=\u003e{const g=t.toPoints(u);A[c]=g.length,c++;for(let h=0;h\u003cg.length;h++){const d=g[h];A[l+0]=d[0],A[l+1]=d[1],A[l+2]=d[2],l+=3}}),A},jHe}var $He,$qt;function Psi(){if($qt)return $He;$qt=1;const t=Mu();return $He=(n,o)=\u003e{const i=t.multiply(t.create(),n,o.transforms);return Object.assign({},o,{transforms:i})},$He}var qHe,qqt;function Msi(){if(qqt)return qHe;qqt=1;const t=qA(),e=VHe(),n=i=\u003e{if(!e(i))throw new Error(\"invalid geom3 structure\");if(i.polygons.forEach(t.validate),o(i),!i.transforms.every(Number.isFinite))throw new Error(`geom3 invalid transforms ${i.transforms}`)},o=i=\u003e{const r=new Map;i.polygons.forEach(({vertices:a})=\u003e{a.forEach((A,c)=\u003e{const l=`${A}`,u=`${a[(c+1)%a.length]}`,g=`${l}/${u}`,h=r.has(g)?r.get(g):0;r.set(g,h+1)})});const s=[];if(r.forEach((a,A)=\u003e{const c=A.split(\"/\").reverse().join(\"/\"),l=r.get(c);a!==l\u0026\u0026s.push(A.replace(\"/\",\" -\u003e \"))}),s.length\u003e0)throw new Error(`non-manifold edges ${s.length}\n${s.join(`\n`)}`)};return qHe=n,qHe}var XHe,Xqt;function Ra(){return Xqt||(Xqt=1,XHe={clone:jri(),create:gX(),fromPointsConvex:ysi(),fromPoints:xsi(),fromCompactBinary:Esi(),invert:bsi(),isA:VHe(),isConvex:Ssi(),toPoints:Qsi(),toPolygons:dX(),toString:vsi(),toCompactBinary:wsi(),transform:Psi(),validate:Msi()}),XHe}var ZHe,Zqt;function eOe(){return Zqt||(Zqt=1,ZHe=e=\u003eObject.assign({},e)),ZHe}var tOe,eXt;function tXt(){if(eXt)return tOe;eXt=1;const{EPS:t}=pc(),e=mA(),n=eOe();return tOe=i=\u003e{if(i.isClosed)return i;const r=n(i);if(r.isClosed=!0,r.points.length\u003e1){const s=r.points,a=s[0];let A=s[s.length-1];for(;e.distance(a,A)\u003ct*t\u0026\u0026(s.pop(),s.length!==1);)A=s[s.length-1]}return r},tOe}var nOe,nXt;function vhe(){if(nXt)return nOe;nXt=1;const t=Mu();return nOe=n=\u003e(n===void 0\u0026\u0026(n=[]),{points:n,isClosed:!1,transforms:t.create()}),nOe}var oOe,oXt;function iOe(){if(oXt)return oOe;oXt=1;const{EPS:t}=pc(),e=mA(),n=tXt(),o=vhe();return oOe=(r,s)=\u003e{const a={closed:!1};let{closed:A}=Object.assign({},a,r),c=o();if(c.points=s.map(l=\u003ee.clone(l)),c.points.length\u003e1){const l=c.points[0],u=c.points[c.points.length-1];e.distance(l,u)\u003ct*t\u0026\u0026(A=!0)}return A===!0\u0026\u0026(c=n(c)),c},oOe}var rOe,iXt;function Dsi(){if(iXt)return rOe;iXt=1;const t=Mu(),e=mA();return rOe=o=\u003e(t.isIdentity(o.transforms)||(o.points=o.points.map(i=\u003ee.transform(e.create(),i,o.transforms)),o.transforms=t.create()),o),rOe}var sOe,rXt;function BY(){if(rXt)return sOe;rXt=1;const t=Dsi();return sOe=n=\u003et(n).points,sOe}var aOe,sXt;function Nsi(){if(sXt)return aOe;sXt=1;const{TAU:t}=pc(),e=mA(),n=iOe(),o=BY();return aOe=(r,s)=\u003e{const a={radius:[0,0],xaxisrotation:0,clockwise:!1,large:!1,segments:16};let{endpoint:A,radius:c,xaxisrotation:l,clockwise:u,large:g,segments:h}=Object.assign({},a,r);if(!Array.isArray(A))throw new Error(\"endpoint must be an array of X and Y values\");if(A.length\u003c2)throw new Error(\"endpoint must contain X and Y values\");if(A=e.clone(A),!Array.isArray(c))throw new Error(\"radius must be an array of X and Y values\");if(c.length\u003c2)throw new Error(\"radius must contain X and Y values\");if(h\u003c4)throw new Error(\"segments must be four or more\");const d=1e5;if(s.isClosed)throw new Error(\"the given path cannot be closed\");const p=o(s);if(p.length\u003c1)throw new Error(\"the given path must contain one or more points (as the starting point for the arc)\");let m=c[0],_=c[1];const f=p[p.length-1];m=Math.round(m*d)/d,_=Math.round(_*d)/d,A=e.fromValues(Math.round(A[0]*d)/d,Math.round(A[1]*d)/d);const I=!u;let C=[];if(m===0||_===0)C.push(A);else{m=Math.abs(m),_=Math.abs(_);const x=l,E=Math.cos(x),B=Math.sin(x),S=e.subtract(e.create(),f,A);e.scale(S,S,.5);const Q=Math.round((E*S[0]+B*S[1])*d)/d,w=Math.round((-B*S[0]+E*S[1])*d)/d,M=e.fromValues(Q,w),k=M[0]*M[0]/(m*m)+M[1]*M[1]/(_*_);if(k\u003e1){const oe=Math.sqrt(k);m*=oe,_*=oe,m=Math.round(m*d)/d,_=Math.round(_*d)/d}let R=Math.sqrt((m*m*_*_-m*m*M[1]*M[1]-_*_*M[0]*M[0])/(m*m*M[1]*M[1]+_*_*M[0]*M[0]));I===g\u0026\u0026(R=-R);const F=e.fromValues(m*M[1]/_,-_*M[0]/m);e.scale(F,F,R);let O=e.fromValues(E*F[0]-B*F[1],B*F[0]+E*F[1]);O=e.add(O,O,e.scale(e.create(),e.add(e.create(),f,A),.5));const U=e.fromValues((M[0]-F[0])/m,(M[1]-F[1])/_),Y=e.fromValues((-M[0]-F[0])/m,(-M[1]-F[1])/_),W=e.angleRadians(U);let j=e.angleRadians(Y)-W;j=j%t,!I\u0026\u0026j\u003e0?j-=t:I\u0026\u0026j\u003c0\u0026\u0026(j+=t);let J=Math.floor(h*(Math.abs(j)/t));J\u003c1\u0026\u0026(J=1);for(let oe=1;oe\u003cJ;oe++){const ie=W+oe/J*j,ne=Math.cos(ie),le=Math.sin(ie),ge=e.fromValues(E*m*ne-B*_*le,B*m*ne+E*_*le);e.add(ge,ge,O),C.push(ge)}J\u0026\u0026C.push(r.endpoint)}return C=p.concat(C),n({},C)},aOe}var AOe,aXt;function AXt(){if(aXt)return AOe;aXt=1;const t=iOe(),e=BY(),{equals:n}=mA();return AOe=(...i)=\u003e{let r=!1,s=[];return i.forEach((a,A)=\u003e{const c=e(a).slice();if(s.length\u003e0\u0026\u0026c.length\u003e0\u0026\u0026n(c[0],s[s.length-1])\u0026\u0026c.shift(),c.length\u003e0\u0026\u0026r)throw new Error(`Cannot concatenate to a closed path; check the ${A}th path`);r=a.isClosed,s=s.concat(c)}),t({closed:r},s)},AOe}var cOe,cXt;function lXt(){if(cXt)return cOe;cXt=1;const t=AXt(),e=vhe();return cOe=(o,i)=\u003et(i,e(o)),cOe}var lOe,uXt;function Rsi(){if(uXt)return lOe;uXt=1;const{TAU:t}=pc(),e=mA(),n=mA(),o=lXt(),i=BY();return lOe=(s,a)=\u003e{const A={segments:16};let{controlPoints:c,segments:l}=Object.assign({},A,s);if(!Array.isArray(c))throw new Error(\"controlPoints must be an array of one or more points\");if(c.length\u003c1)throw new Error(\"controlPoints must be an array of one or more points\");if(l\u003c4)throw new Error(\"segments must be four or more\");if(a.isClosed)throw new Error(\"the given geometry cannot be closed\");const u=i(a);if(u.length\u003c1)throw new Error(\"the given path must contain one or more points (as the starting point for the bezier curve)\");if(c=c.slice(),c[0]===null){if(c.length\u003c2)throw new Error(\"a null control point must be passed with one more control points\");let M=u[u.length-2];if(\"lastBezierControlPoint\"in a\u0026\u0026(M=a.lastBezierControlPoint),!Array.isArray(M))throw new Error(\"the given path must contain TWO or more points if given a null control point\");const k=e.scale(e.create(),u[u.length-1],2);e.subtract(k,k,M),c[0]=k}c.unshift(u[u.length-1]);const h=c.length-1,d=[];let p=1;for(let M=0;M\u003c=h;++M)M\u003e0\u0026\u0026(p*=M),d.push(p);const m=[];for(let M=0;M\u003c=h;++M){const k=d[h]/(d[M]*d[h-M]);m.push(k)}const _=e.create(),f=e.create(),I=n.create(),C=M=\u003e{let k=1,R=Math.pow(1-M,h);const F=M!==1?1/(1-M):1,O=e.create();for(let U=0;U\u003c=h;++U){U===h\u0026\u0026(R=1);const Y=m[U]*k*R,W=e.scale(_,c[U],Y);e.add(O,O,W),k*=M,R*=F}return O},y=[],x=[],E=h+1;for(let M=0;M\u003cE;++M){const k=M/(E-1),R=C(k);y.push(R),x.push(k)}let B=1;const S=t/l,Q=Math.sin(S);for(;B\u003cy.length-1;){const M=e.subtract(_,y[B],y[B-1]);e.normalize(M,M);const k=e.subtract(f,y[B+1],y[B]);e.normalize(k,k);const R=e.cross(I,M,k);if(Math.abs(R[2])\u003eQ){const F=x[B-1],O=x[B+1],U=F+(O-F)*1/3,Y=F+(O-F)*2/3,W=C(U),te=C(Y);y.splice(B,1,W,te),x.splice(B,1,U,Y),B--,B\u003c1\u0026\u0026(B=1)}else++B}y.shift();const w=o(y,a);return w.lastBezierControlPoint=c[c.length-2],w},lOe}var uOe,gXt;function Tsi(){if(gXt)return uOe;gXt=1;const t=mA(),e=BY();return uOe=(o,i)=\u003e{if(o.isClosed!==i.isClosed||o.points.length!==i.points.length)return!1;const r=e(o),s=e(i),a=r.length;let A=0;do{let c=!1;for(let l=0;l\u003ca;l++)if(!t.equals(r[l],s[(l+A)%a])){c=!0;break}if(c===!1)return!0;if(!o.isClosed)return!1}while(++A\u003ca);return!1},uOe}var gOe,dXt;function ksi(){if(dXt)return gOe;dXt=1;const t=Mu(),e=mA(),n=vhe();return gOe=i=\u003e{if(i[0]!==2)throw new Error(\"invalid compact binary data\");const r=n();r.transforms=t.clone(i.slice(1,17)),r.isClosed=!!i[17];for(let s=22;s\u003ci.length;s+=2){const a=e.fromValues(i[s],i[s+1]);r.points.push(a)}return i[18]\u003e=0\u0026\u0026(r.color=[i[18],i[19],i[20],i[21]]),r},gOe}var dOe,hXt;function pXt(){return hXt||(hXt=1,dOe=e=\u003e!!(e\u0026\u0026typeof e==\"object\"\u0026\u0026\"points\"in e\u0026\u0026\"transforms\"in e\u0026\u0026\"isClosed\"in e\u0026\u0026Array.isArray(e.points)\u0026\u0026\"length\"in e.transforms)),dOe}var hOe,mXt;function Fsi(){if(mXt)return hOe;mXt=1;const t=eOe();return hOe=n=\u003e{const o=t(n);return o.points=n.points.slice().reverse(),o},hOe}var pOe,_Xt;function Lsi(){if(_Xt)return pOe;_Xt=1;const t=mA(),e=BY();return pOe=o=\u003e{const i=e(o);let r=\"path (\"+i.length+\" points, \"+o.isClosed+`):\n[\n`;return i.forEach(s=\u003e{r+=\" \"+t.toString(s)+`,\n`}),r+=`]\n`,r},pOe}var mOe,fXt;function Hsi(){return fXt||(fXt=1,mOe=e=\u003e{const n=e.points,o=e.transforms;let i=[-1,-1,-1,-1];e.color\u0026\u0026(i=e.color);const r=new Float32Array(22+n.length*2);r[0]=2,r[1]=o[0],r[2]=o[1],r[3]=o[2],r[4]=o[3],r[5]=o[4],r[6]=o[5],r[7]=o[6],r[8]=o[7],r[9]=o[8],r[10]=o[9],r[11]=o[10],r[12]=o[11],r[13]=o[12],r[14]=o[13],r[15]=o[14],r[16]=o[15],r[17]=e.isClosed?1:0,r[18]=i[0],r[19]=i[1],r[20]=i[2],r[21]=i[3];for(let s=0;s\u003cn.length;s++){const a=s*2+22,A=n[s];r[a]=A[0],r[a+1]=A[1]}return r}),mOe}var _Oe,IXt;function Osi(){if(IXt)return _Oe;IXt=1;const t=Mu();return _Oe=(n,o)=\u003e{const i=t.multiply(t.create(),n,o.transforms);return Object.assign({},o,{transforms:i})},_Oe}var fOe,CXt;function Gsi(){if(CXt)return fOe;CXt=1;const t=mA(),e=pXt();return fOe=o=\u003e{if(!e(o))throw new Error(\"invalid path2 structure\");if(o.points.length\u003e1){for(let i=0;i\u003co.points.length;i++)if(t.equals(o.points[i],o.points[(i+1)%o.points.length]))throw new Error(`path2 duplicate points ${o.points[i]}`)}if(o.points.forEach(i=\u003e{if(!i.every(Number.isFinite))throw new Error(`path2 invalid point ${i}`)}),!o.transforms.every(Number.isFinite))throw new Error(`path2 invalid transforms ${o.transforms}`)},fOe}var IOe,yXt;function au(){return yXt||(yXt=1,IOe={appendArc:Nsi(),appendBezier:Rsi(),appendPoints:lXt(),clone:eOe(),close:tXt(),concat:AXt(),create:vhe(),equals:Tsi(),fromPoints:iOe(),fromCompactBinary:ksi(),isA:pXt(),reverse:Fsi(),toPoints:BY(),toString:Lsi(),toCompactBinary:Hsi(),transform:Osi(),validate:Gsi()}),IOe}var COe,xXt;function Ysi(){if(xXt)return COe;xXt=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=qA(),r=(l,u)=\u003e{const g=e.clone(u);return g.color=l,g},s=(l,u)=\u003e{const g=n.clone(u);return g.color=l,g},a=(l,u)=\u003e{const g=o.clone(u);return g.color=l,g},A=(l,u)=\u003e{const g=i.clone(u);return g.color=l,g};return COe=(l,...u)=\u003e{if(!Array.isArray(l))throw new Error(\"color must be an array\");if(l.length\u003c3)throw new Error(\"color must contain R, G and B values\");if(l.length===3\u0026\u0026(l=[l[0],l[1],l[2],1]),u=t(u),u.length===0)throw new Error(\"wrong number of arguments\");const g=u.map(h=\u003ee.isA(h)?r(l,h):n.isA(h)?s(l,h):o.isA(h)?a(l,h):i.isA(h)?A(l,h):(h.color=l,h));return g.length===1?g[0]:g},COe}var yOe,EXt;function BXt(){return EXt||(EXt=1,yOe={black:[0/255,0/255,0/255],silver:[192/255,192/255,192/255],gray:[128/255,128/255,128/255],white:[255/255,255/255,255/255],maroon:[128/255,0/255,0/255],red:[255/255,0/255,0/255],purple:[128/255,0/255,128/255],fuchsia:[255/255,0/255,255/255],green:[0/255,128/255,0/255],lime:[0/255,255/255,0/255],olive:[128/255,128/255,0/255],yellow:[255/255,255/255,0/255],navy:[0/255,0/255,128/255],blue:[0/255,0/255,255/255],teal:[0/255,128/255,128/255],aqua:[0/255,255/255,255/255],aliceblue:[240/255,248/255,255/255],antiquewhite:[250/255,235/255,215/255],aquamarine:[127/255,255/255,212/255],azure:[240/255,255/255,255/255],beige:[245/255,245/255,220/255],bisque:[255/255,228/255,196/255],blanchedalmond:[255/255,235/255,205/255],blueviolet:[138/255,43/255,226/255],brown:[165/255,42/255,42/255],burlywood:[222/255,184/255,135/255],cadetblue:[95/255,158/255,160/255],chartreuse:[127/255,255/255,0/255],chocolate:[210/255,105/255,30/255],coral:[255/255,127/255,80/255],cornflowerblue:[100/255,149/255,237/255],cornsilk:[255/255,248/255,220/255],crimson:[220/255,20/255,60/255],cyan:[0/255,255/255,255/255],darkblue:[0/255,0/255,139/255],darkcyan:[0/255,139/255,139/255],darkgoldenrod:[184/255,134/255,11/255],darkgray:[169/255,169/255,169/255],darkgreen:[0/255,100/255,0/255],darkgrey:[169/255,169/255,169/255],darkkhaki:[189/255,183/255,107/255],darkmagenta:[139/255,0/255,139/255],darkolivegreen:[85/255,107/255,47/255],darkorange:[255/255,140/255,0/255],darkorchid:[153/255,50/255,204/255],darkred:[139/255,0/255,0/255],darksalmon:[233/255,150/255,122/255],darkseagreen:[143/255,188/255,143/255],darkslateblue:[72/255,61/255,139/255],darkslategray:[47/255,79/255,79/255],darkslategrey:[47/255,79/255,79/255],darkturquoise:[0/255,206/255,209/255],darkviolet:[148/255,0/255,211/255],deeppink:[255/255,20/255,147/255],deepskyblue:[0/255,191/255,255/255],dimgray:[105/255,105/255,105/255],dimgrey:[105/255,105/255,105/255],dodgerblue:[30/255,144/255,255/255],firebrick:[178/255,34/255,34/255],floralwhite:[255/255,250/255,240/255],forestgreen:[34/255,139/255,34/255],gainsboro:[220/255,220/255,220/255],ghostwhite:[248/255,248/255,255/255],gold:[255/255,215/255,0/255],goldenrod:[218/255,165/255,32/255],greenyellow:[173/255,255/255,47/255],grey:[128/255,128/255,128/255],honeydew:[240/255,255/255,240/255],hotpink:[255/255,105/255,180/255],indianred:[205/255,92/255,92/255],indigo:[75/255,0/255,130/255],ivory:[255/255,255/255,240/255],khaki:[240/255,230/255,140/255],lavender:[230/255,230/255,250/255],lavenderblush:[255/255,240/255,245/255],lawngreen:[124/255,252/255,0/255],lemonchiffon:[255/255,250/255,205/255],lightblue:[173/255,216/255,230/255],lightcoral:[240/255,128/255,128/255],lightcyan:[224/255,255/255,255/255],lightgoldenrodyellow:[250/255,250/255,210/255],lightgray:[211/255,211/255,211/255],lightgreen:[144/255,238/255,144/255],lightgrey:[211/255,211/255,211/255],lightpink:[255/255,182/255,193/255],lightsalmon:[255/255,160/255,122/255],lightseagreen:[32/255,178/255,170/255],lightskyblue:[135/255,206/255,250/255],lightslategray:[119/255,136/255,153/255],lightslategrey:[119/255,136/255,153/255],lightsteelblue:[176/255,196/255,222/255],lightyellow:[255/255,255/255,224/255],limegreen:[50/255,205/255,50/255],linen:[250/255,240/255,230/255],magenta:[255/255,0/255,255/255],mediumaquamarine:[102/255,205/255,170/255],mediumblue:[0/255,0/255,205/255],mediumorchid:[186/255,85/255,211/255],mediumpurple:[147/255,112/255,219/255],mediumseagreen:[60/255,179/255,113/255],mediumslateblue:[123/255,104/255,238/255],mediumspringgreen:[0/255,250/255,154/255],mediumturquoise:[72/255,209/255,204/255],mediumvioletred:[199/255,21/255,133/255],midnightblue:[25/255,25/255,112/255],mintcream:[245/255,255/255,250/255],mistyrose:[255/255,228/255,225/255],moccasin:[255/255,228/255,181/255],navajowhite:[255/255,222/255,173/255],oldlace:[253/255,245/255,230/255],olivedrab:[107/255,142/255,35/255],orange:[255/255,165/255,0/255],orangered:[255/255,69/255,0/255],orchid:[218/255,112/255,214/255],palegoldenrod:[238/255,232/255,170/255],palegreen:[152/255,251/255,152/255],paleturquoise:[175/255,238/255,238/255],palevioletred:[219/255,112/255,147/255],papayawhip:[255/255,239/255,213/255],peachpuff:[255/255,218/255,185/255],peru:[205/255,133/255,63/255],pink:[255/255,192/255,203/255],plum:[221/255,160/255,221/255],powderblue:[176/255,224/255,230/255],rosybrown:[188/255,143/255,143/255],royalblue:[65/255,105/255,225/255],saddlebrown:[139/255,69/255,19/255],salmon:[250/255,128/255,114/255],sandybrown:[244/255,164/255,96/255],seagreen:[46/255,139/255,87/255],seashell:[255/255,245/255,238/255],sienna:[160/255,82/255,45/255],skyblue:[135/255,206/255,235/255],slateblue:[106/255,90/255,205/255],slategray:[112/255,128/255,144/255],slategrey:[112/255,128/255,144/255],snow:[255/255,250/255,250/255],springgreen:[0/255,255/255,127/255],steelblue:[70/255,130/255,180/255],tan:[210/255,180/255,140/255],thistle:[216/255,191/255,216/255],tomato:[255/255,99/255,71/255],turquoise:[64/255,224/255,208/255],violet:[238/255,130/255,238/255],wheat:[245/255,222/255,179/255],whitesmoke:[245/255,245/255,245/255],yellowgreen:[154/255,205/255,50/255]}),yOe}var xOe,bXt;function Usi(){if(bXt)return xOe;bXt=1;const t=BXt();return xOe=n=\u003et[n.toLowerCase()],xOe}var EOe,SXt;function Ksi(){return SXt||(SXt=1,EOe=e=\u003e{if(e=e.replace(\"#\",\"\"),e.length\u003c6)throw new Error(\"the given notation must contain 3 or more hex values\");const n=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,i=parseInt(e.substring(4,6),16)/255;if(e.length\u003e=8){const r=parseInt(e.substring(6,8),16)/255;return[n,o,i,r]}return[n,o,i]}),EOe}var BOe,QXt;function vXt(){return QXt||(QXt=1,BOe=(e,n,o)=\u003e(o\u003c0\u0026\u0026(o+=1),o\u003e1\u0026\u0026(o-=1),o\u003c1/6?e+(n-e)*6*o:o\u003c1/2?n:o\u003c2/3?e+(n-e)*(2/3-o)*6:e)),BOe}var bOe,wXt;function Vsi(){if(wXt)return bOe;wXt=1;const t=la(),e=vXt();return bOe=(...o)=\u003e{if(o=t(o),o.length\u003c3)throw new Error(\"values must contain H, S and L values\");const i=o[0],r=o[1],s=o[2];let a=s,A=s,c=s;if(r!==0){const l=s\u003c.5?s*(1+r):s+r-s*r,u=2*s-l;a=e(u,l,i+1/3),A=e(u,l,i),c=e(u,l,i-1/3)}if(o.length\u003e3){const l=o[3];return[a,A,c,l]}return[a,A,c]},bOe}var SOe,PXt;function zsi(){if(PXt)return SOe;PXt=1;const t=la();return SOe=(...n)=\u003e{if(n=t(n),n.length\u003c3)throw new Error(\"values must contain H, S and V values\");const o=n[0],i=n[1],r=n[2];let s=0,a=0,A=0;const c=Math.floor(o*6),l=o*6-c,u=r*(1-i),g=r*(1-l*i),h=r*(1-(1-l)*i);switch(c%6){case 0:s=r,a=h,A=u;break;case 1:s=g,a=r,A=u;break;case 2:s=u,a=r,A=h;break;case 3:s=u,a=g,A=r;break;case 4:s=h,a=u,A=r;break;case 5:s=r,a=u,A=g;break}if(n.length\u003e3){const d=n[3];return[s,a,A,d]}return[s,a,A]},SOe}var QOe,MXt;function Jsi(){if(MXt)return QOe;MXt=1;const t=la();return QOe=(...n)=\u003e{if(n=t(n),n.length\u003c3)throw new Error(\"values must contain R, G and B values\");const o=n[0]*255,i=n[1]*255,r=n[2]*255;let s=`#${Number(16777216+o*65536+i*256+r).toString(16).substring(1,7)}`;return n.length\u003e3\u0026\u0026(s=s+Number(n[3]*255).toString(16)),s},QOe}var vOe,DXt;function Wsi(){if(DXt)return vOe;DXt=1;const t=la();return vOe=(...n)=\u003e{if(n=t(n),n.length\u003c3)throw new Error(\"values must contain R, G and B values\");const o=n[0],i=n[1],r=n[2],s=Math.max(o,i,r),a=Math.min(o,i,r);let A,c;const l=(s+a)/2;if(s===a)A=c=0;else{const u=s-a;switch(c=l\u003e.5?u/(2-s-a):u/(s+a),s){case o:A=(i-r)/u+(i\u003cr?6:0);break;case i:A=(r-o)/u+2;break;case r:A=(o-i)/u+4;break}A/=6}if(n.length\u003e3){const u=n[3];return[A,c,l,u]}return[A,c,l]},vOe}var wOe,NXt;function jsi(){if(NXt)return wOe;NXt=1;const t=la();return wOe=(...n)=\u003e{if(n=t(n),n.length\u003c3)throw new Error(\"values must contain R, G and B values\");const o=n[0],i=n[1],r=n[2],s=Math.max(o,i,r),a=Math.min(o,i,r);let A;const c=s,l=s-a,u=s===0?0:l/s;if(s===a)A=0;else{switch(s){case o:A=(i-r)/l+(i\u003cr?6:0);break;case i:A=(r-o)/l+2;break;case r:A=(o-i)/l+4;break}A/=6}if(n.length\u003e3){const g=n[3];return[A,u,c,g]}return[A,u,c]},wOe}var POe,RXt;function $si(){return RXt||(RXt=1,POe={colorize:Ysi(),colorNameToRgb:Usi(),cssColors:BXt(),hexToRgb:Ksi(),hslToRgb:Vsi(),hsvToRgb:zsi(),hueToColorComponent:vXt(),rgbToHex:Jsi(),rgbToHsl:Wsi(),rgbToHsv:jsi()}),POe}var MOe,TXt;function qsi(){if(TXt)return MOe;TXt=1;const t=i=\u003e{if(!Array.isArray(i))throw new Error(\"Bezier points must be a valid array/\");if(i.length\u003c2)throw new Error(\"Bezier points must contain at least 2 values.\");const r=e(i);return{points:i,pointType:r,dimensions:r===\"float_single\"?0:i[0].length,permutations:n(i.length-1),tangentPermutations:n(i.length-2)}},e=function(i){let r=null;return i.forEach(s=\u003e{let a=\"\";if(Number.isFinite(s))a=\"float_single\";else if(Array.isArray(s))s.forEach(A=\u003e{if(!Number.isFinite(A))throw new Error(\"Bezier point values must all be numbers.\")}),a=\"float_\"+s.length;else throw new Error(\"Bezier points must all be numbers or arrays of number.\");if(r==null)r=a;else if(r!==a)throw new Error(\"Bezier points must be either all numbers or all arrays of numbers of the same size.\")}),r},n=function(i){const r=[];for(let s=0;s\u003c=i;s++)r.push(o(i)/(o(s)*o(i-s)));return r},o=function(i){let r=1;for(let s=2;s\u003c=i;s++)r*=s;return r};return MOe=t,MOe}var DOe,kXt;function FXt(){if(kXt)return DOe;kXt=1;const t=(n,o)=\u003e{if(n\u003c0||n\u003e1)throw new Error(\"Bezier valueAt() input must be between 0 and 1\");if(o.pointType===\"float_single\")return e(o,o.points,n);{const i=[];for(let r=0;r\u003co.dimensions;r++){const s=[];for(let a=0;a\u003co.points.length;a++)s.push(o.points[a][r]);i.push(e(o,s,n))}return i}},e=function(n,o,i){const r=o.length-1;let s=0;for(let a=0;a\u003c=r;a++)s+=n.permutations[a]*Math.pow(1-i,r-a)*Math.pow(i,a)*o[a];return s};return DOe=t,DOe}var NOe,LXt;function Xsi(){if(LXt)return NOe;LXt=1;const t=(n,o)=\u003e{if(n\u003c0||n\u003e1)throw new Error(\"Bezier tangentAt() input must be between 0 and 1\");if(o.pointType===\"float_single\")return e(o,o.points,n);{const i=[];for(let r=0;r\u003co.dimensions;r++){const s=[];for(let a=0;a\u003co.points.length;a++)s.push(o.points[a][r]);i.push(e(o,s,n))}return i}},e=function(n,o,i){const r=o.length-1;let s=0;for(let a=0;a\u003cr;a++){const A=r*(o[a+1]-o[a]);s+=n.tangentPermutations[a]*Math.pow(1-i,r-1-a)*Math.pow(i,a)*A}return s};return NOe=t,NOe}var ROe,HXt;function TOe(){if(HXt)return ROe;HXt=1;const t=FXt(),e=(o,i)=\u003e{let r=0;const s=[0];let a=t(0,i);for(let A=1;A\u003c=o;A++){const c=t(A/o,i);r+=n(c,a),s.push(r),a=c}return s},n=(o,i)=\u003e{if(Number.isFinite(o)\u0026\u0026Number.isFinite(i))return Math.abs(o-i);if(Array.isArray(o)\u0026\u0026Array.isArray(i)){if(o.length!==i.length)throw new Error(\"The operands must have the same number of dimensions.\");let r=0;for(let s=0;s\u003co.length;s++)r+=(i[s]-o[s])*(i[s]-o[s]);return Math.sqrt(r)}else throw new Error(\"The operands must be of the same type, either number or array.\")};return ROe=e,ROe}var kOe,OXt;function Zsi(){if(OXt)return kOe;OXt=1;const t=TOe();return kOe=(n,o)=\u003et(n,o)[n],kOe}var FOe,GXt;function eai(){if(GXt)return FOe;GXt=1;const t=TOe();return FOe=(n,o)=\u003e{const i={distance:0,segments:100},{distance:r,segments:s}=Object.assign({},i,n),a=t(s,o);let A=0,c=s;for(;A\u003c=c;){const p=Math.floor(A+(c-A)/2),m=a[p]-r;if(m\u003c0)A=p+1;else if(m\u003e0)c=p-1;else{c=p;break}}const l=c;if(a[l]===r)return l/s;const u=a[l],h=a[l+1]-u,d=(r-u)/h;return(l+d)/s},FOe}var LOe,YXt;function tai(){return YXt||(YXt=1,LOe={create:qsi(),valueAt:FXt(),tangentAt:Xsi(),lengths:TOe(),length:Zsi(),arcLengthToT:eai()}),LOe}var HOe,UXt;function nai(){return UXt||(UXt=1,HOe={bezier:tai()}),HOe}var OOe,KXt;function whe(){return KXt||(KXt=1,OOe=e=\u003e{let n=0;for(let o=0;o\u003ce.length;o++){const i=(o+1)%e.length;n+=e[o][0]*e[i][1],n-=e[i][0]*e[o][1]}return n/2}),OOe}var GOe,VXt;function zXt(){if(VXt)return GOe;VXt=1;const t=whe();return GOe=n=\u003et(n.vertices),GOe}var YOe,JXt;function WXt(){return JXt||(JXt=1,YOe=e=\u003e((e===void 0||e.length\u003c3)\u0026\u0026(e=[]),{vertices:e})),YOe}var UOe,jXt;function $Xt(){if(jXt)return UOe;jXt=1;const t=WXt();return UOe=n=\u003e{const o=n.vertices.slice().reverse();return t(o)},UOe}var KOe,qXt;function oai(){if(qXt)return KOe;qXt=1;const t=zXt(),e=$Xt(),n=(i,r)=\u003e{if(i.length===0)return 0;const s=r.vertices;return s.length\u003c3?0:(t(r)\u003c0\u0026\u0026(r=e(r)),i.reduce((A,c)=\u003eA+o(c,s),0)===i.length?1:0)},o=(i,r)=\u003e{const s=r.length,a=i[0],A=i[1];let c=r[s-1],l=r[0],u=c[1]\u003eA,g=0,h=0;for(let d=s+1;--d;){const p=l[1]\u003eA;if(u!==p){const m=c[0]\u003ea,_=l[0]\u003ea;(m\u0026\u0026_||l[0]-(l[1]-A)*(c[0]-l[0])/(c[1]-l[1])\u003e=a)\u0026\u0026(g=!g)}u=p,c=l,l=r[++h]}return g};return KOe=n,KOe}var VOe,XXt;function zOe(){return XXt||(XXt=1,VOe={arePointsInside:oai(),create:WXt(),flip:$Xt(),measureArea:zXt()}),VOe}var JOe,ZXt;function WOe(){return ZXt||(ZXt=1,JOe={geom2:Ga(),geom3:Ra(),path2:au(),poly2:zOe(),poly3:qA()}),JOe}var jOe,eZt;function $Oe(){return eZt||(eZt=1,jOe=()=\u003e[0,1,0]),jOe}var qOe,tZt;function iai(){if(tZt)return qOe;tZt=1;const t=$Oe();return qOe=n=\u003e{const o=t();return o[0]=n[0],o[1]=n[1],o[2]=n[2],o},qOe}var XOe,nZt;function ZOe(){if(nZt)return XOe;nZt=1;const t=mA();return XOe=n=\u003e{const o=t.normal(t.create(),n);return t.negate(o,o),o},XOe}var eGe,oZt;function Phe(){if(oZt)return eGe;oZt=1;const t=mA();return eGe=n=\u003et.scale(t.create(),n,n[2]),eGe}var tGe,iZt;function rai(){if(iZt)return tGe;iZt=1;const t=mA(),e=ZOe(),n=Phe();return tGe=(i,r)=\u003e{const s=n(i),a=e(i),A=t.subtract(t.create(),r,s),c=t.dot(A,a);return t.scale(A,a,c),t.add(A,A,s),A},tGe}var nGe,rZt;function sZt(){return rZt||(rZt=1,nGe=(e,n)=\u003e(e[0]=n[0],e[1]=n[1],e[2]=n[2],e)),nGe}var oGe,aZt;function sai(){if(aZt)return oGe;aZt=1;const t=mA();return oGe=(n,o)=\u003e{let i=t.dot(o,n);return i=Math.abs(i-n[2]),i},oGe}var iGe,AZt;function aai(){return AZt||(AZt=1,iGe=(e,n)=\u003ee[0]===n[0]\u0026\u0026e[1]===n[1]\u0026\u0026e[2]===n[2]),iGe}var rGe,cZt;function lZt(){if(cZt)return rGe;cZt=1;const t=mA();return rGe=(n,o,i)=\u003e{const r=t.subtract(t.create(),i,o);t.normal(r,r),t.normalize(r,r);const s=t.dot(o,r);return n[0]=r[0],n[1]=r[1],n[2]=s,n},rGe}var sGe,uZt;function gZt(){if(uZt)return sGe;uZt=1;const t=$Oe();return sGe=(n,o,i)=\u003e{const r=t();return r[0]=n,r[1]=o,r[2]=i,r},sGe}var aGe,dZt;function AGe(){if(dZt)return aGe;dZt=1;const{NEPS:t}=pc();return aGe=(n,o)=\u003eMath.abs(n[0]-o[0])\u003c=t\u0026\u0026Math.abs(n[1]-o[1])\u003c=t\u0026\u0026Math.abs(n[2]-o[2])\u003c=t,aGe}var cGe,hZt;function pZt(){return hZt||(hZt=1,cGe=(e,n,o)=\u003e{let i=o-e[1],r=n[1]-e[1];r\u003c0\u0026\u0026(i=-i,r=-r);let s;return i\u003c=0?s=0:i\u003e=r?s=1:r\u003c1e-10?s=.5:s=i/r,e[0]+s*(n[0]-e[0])}),cGe}var lGe,mZt;function _Zt(){return mZt||(mZt=1,lGe=(e,n,o,i)=\u003e{if(e[0]===n[0]\u0026\u0026e[1]===n[1]||o[0]===i[0]\u0026\u0026o[1]===i[1])return;const r=(i[1]-o[1])*(n[0]-e[0])-(i[0]-o[0])*(n[1]-e[1]);if(Math.abs(r)\u003cNumber.MIN_VALUE)return;const s=((i[0]-o[0])*(e[1]-o[1])-(i[1]-o[1])*(e[0]-o[0]))/r,a=((n[0]-e[0])*(e[1]-o[1])-(n[1]-e[1])*(e[0]-o[0]))/r;if(s\u003c0||s\u003e1||a\u003c0||a\u003e1)return;const A=e[0]+s*(n[0]-e[0]),c=e[1]+s*(n[1]-e[1]);return[A,c]}),lGe}var uGe,fZt;function Aai(){return fZt||(fZt=1,uGe=(e,n,o,i,r,s)=\u003e{const A=1/(e*i-n*o);let c=r*i-n*s,l=-r*o+e*s;return c*=A,l*=A,[c,l]}),uGe}var gGe,IZt;function hX(){return IZt||(IZt=1,gGe={aboutEqualNormals:AGe(),area:whe(),cos:dI().cos,interpolateBetween2DPointsForY:pZt(),intersect:_Zt(),sin:dI().sin,solve2Linear:Aai()}),gGe}var dGe,CZt;function cai(){if(CZt)return dGe;CZt=1;const t=mA(),{solve2Linear:e}=hX();return dGe=(o,i)=\u003e{const r=e(o[0],o[1],i[0],i[1],o[2],i[2]);return t.clone(r)},dGe}var hGe,yZt;function lai(){if(yZt)return hGe;yZt=1;const t=mA(),e=sZt(),n=gZt();return hGe=(i,r)=\u003e{const s=t.negate(t.create(),r),a=-r[2];return e(i,n(s[0],s[1],a))},hGe}var pGe,xZt;function uai(){return xZt||(xZt=1,pGe=e=\u003e`line2: (${e[0].toFixed(7)}, ${e[1].toFixed(7)}, ${e[2].toFixed(7)})`),pGe}var mGe,EZt;function gai(){if(EZt)return mGe;EZt=1;const t=mA(),e=lZt(),n=Phe(),o=ZOe();return mGe=(r,s,a)=\u003e{const A=n(s),c=o(s);return t.transform(A,A,a),t.transform(c,c,a),e(r,A,c)},mGe}var _Ge,BZt;function dai(){if(BZt)return _Ge;BZt=1;const t=Phe();return _Ge=(n,o)=\u003e{let i=(n[2]-n[1]*o)/n[0];return Number.isNaN(i)\u0026\u0026(i=t(n)[0]),i},_Ge}var fGe,bZt;function IGe(){return bZt||(bZt=1,fGe={clone:iai(),closestPoint:rai(),copy:sZt(),create:$Oe(),direction:ZOe(),distanceToPoint:sai(),equals:aai(),fromPoints:lZt(),fromValues:gZt(),intersectPointOfLines:cai(),origin:Phe(),reverse:lai(),toString:uai(),transform:gai(),xAtY:dai()}),fGe}var CGe,SZt;function QZt(){if(SZt)return CGe;SZt=1;const t=jr();return CGe=()=\u003e[t.fromValues(0,0,0),t.fromValues(0,0,1)],CGe}var yGe,vZt;function hai(){if(vZt)return yGe;vZt=1;const t=jr(),e=QZt();return yGe=o=\u003e{const i=e();return t.copy(i[0],o[0]),t.copy(i[1],o[1]),i},yGe}var xGe,wZt;function PZt(){if(wZt)return xGe;wZt=1;const t=jr();return xGe=(n,o)=\u003e{const i=n[0],r=n[1],s=t.dot(t.subtract(t.create(),o,i),r),a=t.dot(r,r),A=s/a,c=t.scale(t.create(),r,A);return t.add(c,c,i),c},xGe}var EGe,MZt;function pai(){if(MZt)return EGe;MZt=1;const t=jr();return EGe=(n,o)=\u003e(t.copy(n[0],o[0]),t.copy(n[1],o[1]),n),EGe}var BGe,DZt;function mai(){return DZt||(DZt=1,BGe=e=\u003ee[1]),BGe}var bGe,NZt;function _ai(){if(NZt)return bGe;NZt=1;const t=jr(),e=PZt();return bGe=(o,i)=\u003e{const r=e(o,i),s=t.subtract(t.create(),i,r);return t.length(s)},bGe}var SGe,RZt;function fai(){if(RZt)return SGe;RZt=1;const t=jr();return SGe=(n,o)=\u003e!(!t.equals(n[1],o[1])||!t.equals(n[0],o[0])),SGe}var QGe,TZt;function pX(){if(TZt)return QGe;TZt=1;const t=jr();return QGe=(n,o,i)=\u003e{const r=t.normalize(t.create(),i);return t.copy(n[0],o),t.copy(n[1],r),n},QGe}var vGe,kZt;function Iai(){if(kZt)return vGe;kZt=1;const t=jr(),{solve2Linear:e}=hX(),{EPS:n}=pc(),o=pX();return vGe=(r,s,a)=\u003e{let A=t.cross(t.create(),s,a),c=t.length(A);if(c\u003cn)throw new Error(\"parallel planes do not intersect\");c=1/c,A=t.scale(A,A,c);const l=Math.abs(A[0]),u=Math.abs(A[1]),g=Math.abs(A[2]);let h,d;return l\u003e=u\u0026\u0026l\u003e=g?(d=e(s[1],s[2],a[1],a[2],s[3],a[3]),h=t.fromValues(0,d[0],d[1])):u\u003e=l\u0026\u0026u\u003e=g?(d=e(s[0],s[2],a[0],a[2],s[3],a[3]),h=t.fromValues(d[0],0,d[1])):(d=e(s[0],s[1],a[0],a[1],s[3],a[3]),h=t.fromValues(d[0],d[1],0)),o(r,h,A)},vGe}var wGe,FZt;function Cai(){if(FZt)return wGe;FZt=1;const t=jr(),e=pX();return wGe=(o,i,r)=\u003e{const s=t.subtract(t.create(),r,i);return e(o,i,s)},wGe}var PGe,LZt;function yai(){if(LZt)return PGe;LZt=1;const t=jr();return PGe=(n,o)=\u003e{const i=o,r=o[3],s=n[0],a=n[1],A=(r-t.dot(i,s))/t.dot(i,a);return t.add(t.create(),s,t.scale(t.create(),a,A))},PGe}var MGe,HZt;function xai(){return HZt||(HZt=1,MGe=e=\u003ee[0]),MGe}var DGe,OZt;function Eai(){if(OZt)return DGe;OZt=1;const t=jr(),e=pX();return DGe=(o,i)=\u003e{const r=t.clone(i[0]),s=t.negate(t.create(),i[1]);return e(o,r,s)},DGe}var NGe,GZt;function Bai(){return GZt||(GZt=1,NGe=e=\u003e{const n=e[0],o=e[1];return`line3: point: (${n[0].toFixed(7)}, ${n[1].toFixed(7)}, ${n[2].toFixed(7)}) direction: (${o[0].toFixed(7)}, ${o[1].toFixed(7)}, ${o[2].toFixed(7)})`}),NGe}var RGe,YZt;function bai(){if(YZt)return RGe;YZt=1;const t=jr(),e=pX();return RGe=(o,i,r)=\u003e{const s=i[0],a=i[1],A=t.add(t.create(),s,a),c=t.transform(t.create(),s,r),l=t.transform(A,A,r),u=t.subtract(l,l,c);return e(o,c,u)},RGe}var TGe,UZt;function Sai(){return UZt||(UZt=1,TGe={clone:hai(),closestPoint:PZt(),copy:pai(),create:QZt(),direction:mai(),distanceToPoint:_ai(),equals:fai(),fromPlanes:Iai(),fromPointAndDirection:pX(),fromPoints:Cai(),intersectPointOfLineAndPlane:yai(),origin:xai(),reverse:Eai(),toString:Bai(),transform:bai()}),TGe}var kGe,KZt;function Qai(){return KZt||(KZt=1,kGe={constants:pc(),line2:IGe(),line3:Sai(),mat4:Mu(),plane:E6(),utils:hX(),vec2:mA(),vec3:jr(),vec4:Mqt()}),kGe}var FGe,VZt;function zZt(){if(VZt)return FGe;VZt=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=qA(),r=new WeakMap,s=()=\u003e0,a=l=\u003e{let u=r.get(l);return u||(u=e.toSides(l).reduce((h,d)=\u003eh+(d[0][0]*d[1][1]-d[0][1]*d[1][0]),0),u*=.5,r.set(l,u),u)},A=l=\u003e{let u=r.get(l);return u||(u=n.toPolygons(l).reduce((h,d)=\u003eh+i.measureArea(d),0),r.set(l,u),u)};return FGe=(...l)=\u003e{if(l=t(l),l.length===0)throw new Error(\"wrong number of arguments\");const u=l.map(g=\u003eo.isA(g)?s():e.isA(g)?a(g):n.isA(g)?A(g):0);return u.length===1?u[0]:u},FGe}var LGe,JZt;function vai(){if(JZt)return LGe;JZt=1;const t=la(),e=zZt();return LGe=(...o)=\u003e{if(o=t(o),o.length===0)throw new Error(\"measureAggregateArea: no geometries supplied\");const i=e(o);return o.length===1?i:i.reduce((s,a)=\u003es+a,0)},LGe}var HGe,WZt;function eT(){if(WZt)return HGe;WZt=1;const t=la(),e=mA(),n=jr(),o=Ga(),i=Ra(),r=au(),s=qA(),a=new WeakMap,A=g=\u003e{let h=a.get(g);if(h)return h;const d=r.toPoints(g);let p;d.length===0?p=e.create():p=e.clone(d[0]);let m=e.clone(p);return d.forEach(_=\u003e{e.min(p,p,_),e.max(m,m,_)}),p=[p[0],p[1],0],m=[m[0],m[1],0],h=[p,m],a.set(g,h),h},c=g=\u003e{let h=a.get(g);if(h)return h;const d=o.toPoints(g);let p;d.length===0?p=e.create():p=e.clone(d[0]);let m=e.clone(p);return d.forEach(_=\u003e{e.min(p,p,_),e.max(m,m,_)}),p=[p[0],p[1],0],m=[m[0],m[1],0],h=[p,m],a.set(g,h),h},l=g=\u003e{let h=a.get(g);if(h)return h;const d=i.toPolygons(g);let p=n.create();if(d.length\u003e0){const _=s.toPoints(d[0]);n.copy(p,_[0])}let m=n.clone(p);return d.forEach(_=\u003e{s.toPoints(_).forEach(f=\u003e{n.min(p,p,f),n.max(m,m,f)})}),p=[p[0],p[1],p[2]],m=[m[0],m[1],m[2]],h=[p,m],a.set(g,h),h};return HGe=(...g)=\u003e{if(g=t(g),g.length===0)throw new Error(\"wrong number of arguments\");const h=g.map(d=\u003er.isA(d)?A(d):o.isA(d)?c(d):i.isA(d)?l(d):[[0,0,0],[0,0,0]]);return h.length===1?h[0]:h},HGe}var OGe,jZt;function GGe(){if(jZt)return OGe;jZt=1;const t=la(),e=qWt(),n=jWt(),o=eT();return OGe=(...r)=\u003e{if(r=t(r),r.length===0)throw new Error(\"measureAggregateBoundingBox: no geometries supplied\");const s=o(r);if(r.length===1)return s;const a=[[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE],[-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE]];return s.reduce((A,c)=\u003e(A=[e(A[0],A[0],c[0]),n(A[1],A[1],c[1])],A),a)},OGe}var YGe,$Zt;function qZt(){if($Zt)return YGe;$Zt=1;const{EPS:t}=pc();return YGe=(n,o)=\u003e{let i=0;for(let r=0;r\u003co;r++)i+=n[1][r]-n[0][r];return t*i/o},YGe}var UGe,XZt;function wai(){if(XZt)return UGe;XZt=1;const t=la(),e=GGe(),n=qZt(),{geom2:o,geom3:i,path2:r}=WOe();return UGe=(...a)=\u003e{if(a=t(a),a.length===0)throw new Error(\"measureAggregateEpsilon: no geometries supplied\");const A=e(a);let c=0;return c=a.reduce((l,u)=\u003er.isA(u)||o.isA(u)?Math.max(l,2):i.isA(u)?Math.max(l,3):0,c),n(A,c)},UGe}var KGe,ZZt;function een(){if(ZZt)return KGe;ZZt=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=qA(),r=new WeakMap,s=()=\u003e0,a=()=\u003e0,A=l=\u003e{let u=r.get(l);return u||(u=n.toPolygons(l).reduce((h,d)=\u003eh+i.measureSignedVolume(d),0),r.set(l,u),u)};return KGe=(...l)=\u003e{if(l=t(l),l.length===0)throw new Error(\"wrong number of arguments\");const u=l.map(g=\u003eo.isA(g)?s():e.isA(g)?a():n.isA(g)?A(g):0);return u.length===1?u[0]:u},KGe}var VGe,ten;function Pai(){if(ten)return VGe;ten=1;const t=la(),e=een();return VGe=(...o)=\u003e{if(o=t(o),o.length===0)throw new Error(\"measureAggregateVolume: no geometries supplied\");const i=e(o);return o.length===1?i:i.reduce((s,a)=\u003es+a,0)},VGe}var zGe,nen;function Mai(){if(nen)return zGe;nen=1;const t=la(),e=mA(),n=jr(),o=Ga(),i=Ra(),r=au(),s=qA(),a=new WeakMap,A=g=\u003e{let h=a.get(g);if(h!==void 0)return h;const d=n.create();let p=0;const m=r.toPoints(g);if(m.length\u003e0){let _=0;const f=n.create();m.forEach(I=\u003e{n.add(d,d,n.fromVec2(f,I,0)),_++}),n.scale(d,d,1/_),m.forEach(I=\u003e{p=Math.max(p,e.squaredDistance(d,I))}),p=Math.sqrt(p)}return h=[d,p],a.set(g,h),h},c=g=\u003e{let h=a.get(g);if(h!==void 0)return h;const d=n.create();let p=0;const m=o.toSides(g);if(m.length\u003e0){let _=0;const f=n.create();m.forEach(I=\u003e{n.add(d,d,n.fromVec2(f,I[0],0)),_++}),n.scale(d,d,1/_),m.forEach(I=\u003e{p=Math.max(p,e.squaredDistance(d,I[0]))}),p=Math.sqrt(p)}return h=[d,p],a.set(g,h),h},l=g=\u003e{let h=a.get(g);if(h!==void 0)return h;const d=n.create();let p=0;const m=i.toPolygons(g);if(m.length\u003e0){let _=0;m.forEach(f=\u003e{s.toPoints(f).forEach(I=\u003e{n.add(d,d,I),_++})}),n.scale(d,d,1/_),m.forEach(f=\u003e{s.toPoints(f).forEach(I=\u003e{p=Math.max(p,n.squaredDistance(d,I))})}),p=Math.sqrt(p)}return h=[d,p],a.set(g,h),h};return zGe=(...g)=\u003e{g=t(g);const h=g.map(d=\u003er.isA(d)?A(d):o.isA(d)?c(d):i.isA(d)?l(d):[[0,0,0],0]);return h.length===1?h[0]:h},zGe}var JGe,oen;function Dai(){if(oen)return JGe;oen=1;const t=la(),e=eT();return JGe=(...o)=\u003e{o=t(o);const i=o.map(r=\u003e{const s=e(r);return[s[0][0]+(s[1][0]-s[0][0])/2,s[0][1]+(s[1][1]-s[0][1])/2,s[0][2]+(s[1][2]-s[0][2])/2]});return i.length===1?i[0]:i},JGe}var WGe,ien;function Nai(){if(ien)return WGe;ien=1;const t=la(),e=jr(),n=Ga(),o=Ra(),i=new WeakMap,r=A=\u003e{let c=i.get(A);if(c!==void 0)return c;const l=n.toSides(A);let u=0,g=0,h=0;if(l.length\u003e0){for(let p=0;p\u003cl.length;p++){const m=l[p][0],_=l[p][1],f=m[0]*_[1]-m[1]*_[0];u+=f,g+=(m[0]+_[0])*f,h+=(m[1]+_[1])*f}u/=2;const d=1/(u*6);g*=d,h*=d}return c=e.fromValues(g,h,0),i.set(A,c),c},s=A=\u003e{let c=i.get(A);if(c!==void 0)return c;c=e.create();const l=o.toPolygons(A);if(l.length===0)return c;let u=0;const g=e.create();return l.forEach(h=\u003e{const d=h.vertices;for(let p=0;p\u003cd.length-2;p++){e.cross(g,d[p+1],d[p+2]);const m=e.dot(d[0],g)/6;u+=m,e.add(g,d[0],d[p+1]),e.add(g,g,d[p+2]);const _=e.scale(g,g,1/4*m);e.add(c,c,_)}}),e.scale(c,c,1/u),i.set(A,c),c};return WGe=(...A)=\u003e{A=t(A);const c=A.map(l=\u003en.isA(l)?r(l):o.isA(l)?s(l):[0,0,0]);return c.length===1?c[0]:c},WGe}var jGe,ren;function Rai(){if(ren)return jGe;ren=1;const t=la(),e=eT();return jGe=(...o)=\u003e{o=t(o);const i=o.map(r=\u003e{const s=e(r);return[s[1][0]-s[0][0],s[1][1]-s[0][1],s[1][2]-s[0][2]]});return i.length===1?i[0]:i},jGe}var $Ge,sen;function rP(){if(sen)return $Ge;sen=1;const t=la(),{geom2:e,geom3:n,path2:o}=WOe(),i=qZt(),r=eT(),s=l=\u003ei(r(l),2),a=l=\u003ei(r(l),2),A=l=\u003ei(r(l),3);return $Ge=(...l)=\u003e{if(l=t(l),l.length===0)throw new Error(\"wrong number of arguments\");const u=l.map(g=\u003eo.isA(g)?s(g):e.isA(g)?a(g):n.isA(g)?A(g):0);return u.length===1?u[0]:u},$Ge}var qGe,aen;function Tai(){return aen||(aen=1,qGe={measureAggregateArea:vai(),measureAggregateBoundingBox:GGe(),measureAggregateEpsilon:wai(),measureAggregateVolume:Pai(),measureArea:zZt(),measureBoundingBox:eT(),measureBoundingSphere:Mai(),measureCenter:Dai(),measureCenterOfMass:Nai(),measureDimensions:Rai(),measureEpsilon:rP(),measureVolume:een()}),qGe}var XGe,Aen;function cf(){return Aen||(Aen=1,XGe={isNumberArray:(o,i)=\u003eArray.isArray(o)\u0026\u0026o.length\u003e=i?o.every(r=\u003eNumber.isFinite(r)):!1,isGT:(o,i)=\u003eNumber.isFinite(o)\u0026\u0026o\u003ei,isGTE:(o,i)=\u003eNumber.isFinite(o)\u0026\u0026o\u003e=i}),XGe}var ZGe,cen;function kai(){if(cen)return ZGe;cen=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=au(),{isGT:i,isGTE:r,isNumberArray:s}=cf();return ZGe=A=\u003e{const c={center:[0,0],radius:1,startAngle:0,endAngle:e,makeTangent:!1,segments:32};let{center:l,radius:u,startAngle:g,endAngle:h,makeTangent:d,segments:p}=Object.assign({},c,A);if(!s(l,2))throw new Error(\"center must be an array of X and Y values\");if(!i(u,0))throw new Error(\"radius must be greater than zero\");if(!r(g,0))throw new Error(\"startAngle must be positive\");if(!r(h,0))throw new Error(\"endAngle must be positive\");if(!r(p,4))throw new Error(\"segments must be four or more\");g=g%e,h=h%e;let m=e;g\u003ch\u0026\u0026(m=h-g),g\u003eh\u0026\u0026(m=h+(e-g));const _=Math.acos((u*u+u*u-t*t)/(2*u*u)),f=n.clone(l);let I;const C=[];if(m\u003c_)I=n.fromAngleRadians(n.create(),g),n.scale(I,I,u),n.add(I,I,f),C.push(I);else{const y=Math.floor(p*(Math.abs(m)/e));let x=y*.5/m;x\u003e.25\u0026\u0026(x=.25);const E=d?y+2:y;for(let B=0;B\u003c=E;B++){let S=B;d\u0026\u0026(S=(B-1)*(y-2*x)/y+x,S\u003c0\u0026\u0026(S=0),S\u003ey\u0026\u0026(S=y));const Q=g+S*(m/y);I=n.fromAngleRadians(n.create(),Q),n.scale(I,I,u),n.add(I,I,f),C.push(I)}}return o.fromPoints({closed:!1},C)},ZGe}var eYe,len;function uen(){if(len)return eYe;len=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=Ga(),{sin:i,cos:r}=dI(),{isGTE:s,isNumberArray:a}=cf();return eYe=c=\u003e{const l={center:[0,0],radius:[1,1],startAngle:0,endAngle:e,segments:32};let{center:u,radius:g,startAngle:h,endAngle:d,segments:p}=Object.assign({},l,c);if(!a(u,2))throw new Error(\"center must be an array of X and Y values\");if(!a(g,2))throw new Error(\"radius must be an array of X and Y values\");if(!g.every(x=\u003ex\u003e=0))throw new Error(\"radius values must be positive\");if(!s(h,0))throw new Error(\"startAngle must be positive\");if(!s(d,0))throw new Error(\"endAngle must be positive\");if(!s(p,3))throw new Error(\"segments must be three or more\");if(g[0]===0||g[1]===0)return o.create();h=h%e,d=d%e;let m=e;h\u003cd\u0026\u0026(m=d-h),h\u003ed\u0026\u0026(m=d+(e-h));const _=Math.min(g[0],g[1]),f=Math.acos((_*_+_*_-t*t)/(2*_*_));if(m\u003cf)throw new Error(\"startAngle and endAngle do not define a significant rotation\");p=Math.floor(p*(m/e));const I=n.clone(u),C=m/p,y=[];p=m\u003ce?p+1:p;for(let x=0;x\u003cp;x++){const E=C*x+h,B=n.fromValues(g[0]*r(E),g[1]*i(E));n.add(B,I,B),y.push(B)}return m\u003ce\u0026\u0026y.push(I),o.fromPoints(y)},eYe}var tYe,gen;function den(){if(gen)return tYe;gen=1;const{TAU:t}=pc(),e=uen(),{isGTE:n}=cf();return tYe=i=\u003e{const r={center:[0,0],radius:1,startAngle:0,endAngle:t,segments:32};let{center:s,radius:a,startAngle:A,endAngle:c,segments:l}=Object.assign({},r,i);if(!n(a,0))throw new Error(\"radius must be positive\");return a=[a,a],e({center:s,radius:a,startAngle:A,endAngle:c,segments:l})},tYe}var nYe,hen;function oYe(){if(hen)return nYe;hen=1;const t=Ra(),e=qA(),{isNumberArray:n}=cf();return nYe=i=\u003e{const r={center:[0,0,0],size:[2,2,2]},{center:s,size:a}=Object.assign({},r,i);if(!n(s,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!n(a,3))throw new Error(\"size must be an array of width, depth and height values\");if(!a.every(c=\u003ec\u003e=0))throw new Error(\"size values must be positive\");return a[0]===0||a[1]===0||a[2]===0?t.create():t.create([[[0,4,6,2],[-1,0,0]],[[1,3,7,5],[1,0,0]],[[0,1,5,4],[0,-1,0]],[[2,6,7,3],[0,1,0]],[[0,2,3,1],[0,0,-1]],[[4,5,7,6],[0,0,1]]].map(c=\u003e{const l=c[0].map(u=\u003e[s[0]+a[0]/2*(2*!!(u\u00261)-1),s[1]+a[1]/2*(2*!!(u\u00262)-1),s[2]+a[2]/2*(2*!!(u\u00264)-1)]);return e.create(l)}))},nYe}var iYe,pen;function Fai(){if(pen)return iYe;pen=1;const t=oYe(),{isGTE:e}=cf();return iYe=o=\u003e{const i={center:[0,0,0],size:2};let{center:r,size:s}=Object.assign({},i,o);if(!e(s,0))throw new Error(\"size must be positive\");return s=[s,s,s],t({center:r,size:s})},iYe}var rYe,men;function _en(){if(men)return rYe;men=1;const{EPS:t,TAU:e}=pc(),n=jr(),o=Ra(),i=qA(),{sin:r,cos:s}=dI(),{isGT:a,isGTE:A,isNumberArray:c}=cf();return rYe=u=\u003e{const g={center:[0,0,0],height:2,startRadius:[1,1],startAngle:0,endRadius:[1,1],endAngle:e,segments:32};let{center:h,height:d,startRadius:p,startAngle:m,endRadius:_,endAngle:f,segments:I}=Object.assign({},g,u);if(!c(h,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!a(d,0))throw new Error(\"height must be greater then zero\");if(!c(p,2))throw new Error(\"startRadius must be an array of X and Y values\");if(!p.every(te=\u003ete\u003e=0))throw new Error(\"startRadius values must be positive\");if(!c(_,2))throw new Error(\"endRadius must be an array of X and Y values\");if(!_.every(te=\u003ete\u003e=0))throw new Error(\"endRadius values must be positive\");if(_.every(te=\u003ete===0)\u0026\u0026p.every(te=\u003ete===0))throw new Error(\"at least one radius must be positive\");if(!A(m,0))throw new Error(\"startAngle must be positive\");if(!A(f,0))throw new Error(\"endAngle must be positive\");if(!A(I,4))throw new Error(\"segments must be four or more\");m=m%e,f=f%e;let C=e;m\u003cf\u0026\u0026(C=f-m),m\u003ef\u0026\u0026(C=f+(e-m));const y=Math.min(p[0],p[1],_[0],_[1]),x=Math.acos((y*y+y*y-t*t)/(2*y*y));if(C\u003cx)throw new Error(\"startAngle and endAngle do not define a significant rotation\");const E=Math.floor(I*(C/e)),B=n.fromValues(0,0,-(d/2)),S=n.fromValues(0,0,d/2),Q=n.subtract(n.create(),S,B),w=n.fromValues(1,0,0),M=n.fromValues(0,1,0),k=n.create(),R=n.create(),F=n.create(),O=(te,j,J)=\u003e{const oe=j*C+m;return n.scale(k,w,J[0]*s(oe)),n.scale(R,M,J[1]*r(oe)),n.add(k,k,R),n.scale(F,Q,te),n.add(F,F,B),n.add(n.create(),k,F)},U=(...te)=\u003e{const j=te.map(J=\u003en.add(n.create(),J,h));return i.create(j)},Y=[];for(let te=0;te\u003cE;te++){const j=te/E;let J=(te+1)/E;C===e\u0026\u0026te===E-1\u0026\u0026(J=0),_[0]===p[0]\u0026\u0026_[1]===p[1]?(Y.push(U(B,O(0,J,_),O(0,j,_))),Y.push(U(O(0,J,_),O(1,J,_),O(1,j,_),O(0,j,_))),Y.push(U(S,O(1,j,_),O(1,J,_)))):(p[0]\u003e0\u0026\u0026p[1]\u003e0\u0026\u0026Y.push(U(B,O(0,J,p),O(0,j,p))),(p[0]\u003e0||p[1]\u003e0)\u0026\u0026Y.push(U(O(0,j,p),O(0,J,p),O(1,j,_))),_[0]\u003e0\u0026\u0026_[1]\u003e0\u0026\u0026Y.push(U(S,O(1,j,_),O(1,J,_))),(_[0]\u003e0||_[1]\u003e0)\u0026\u0026Y.push(U(O(1,j,_),O(0,J,p),O(1,J,_))))}return C\u003ce\u0026\u0026(Y.push(U(B,O(0,0,p),S)),Y.push(U(O(0,0,p),O(1,0,_),S)),Y.push(U(B,S,O(0,1,p))),Y.push(U(O(0,1,p),S,O(1,1,_)))),o.create(Y)},rYe}var sYe,fen;function Ien(){if(fen)return sYe;fen=1;const t=Ra(),e=_en(),{isGTE:n}=cf();return sYe=i=\u003e{const r={center:[0,0,0],height:2,radius:1,segments:32},{center:s,height:a,radius:A,segments:c}=Object.assign({},r,i);if(!n(A,0))throw new Error(\"radius must be positive\");return a===0||A===0?t.create():e({center:s,height:a,startRadius:[A,A],endRadius:[A,A],segments:c})},sYe}var aYe,Cen;function yen(){if(Cen)return aYe;Cen=1;const{TAU:t}=pc(),e=jr(),n=Ra(),o=qA(),{sin:i,cos:r}=dI(),{isGTE:s,isNumberArray:a}=cf();return aYe=c=\u003e{const l={center:[0,0,0],radius:[1,1,1],segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]},{center:u,radius:g,segments:h,axes:d}=Object.assign({},l,c);if(!a(u,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!a(g,3))throw new Error(\"radius must be an array of X, Y and Z values\");if(!g.every(E=\u003eE\u003e=0))throw new Error(\"radius values must be positive\");if(!s(h,4))throw new Error(\"segments must be four or more\");if(g[0]===0||g[1]===0||g[2]===0)return n.create();const p=e.scale(e.create(),e.normalize(e.create(),d[0]),g[0]),m=e.scale(e.create(),e.normalize(e.create(),d[1]),g[1]),_=e.scale(e.create(),e.normalize(e.create(),d[2]),g[2]),f=Math.round(h/4);let I;const C=[],y=e.create(),x=e.create();for(let E=0;E\u003c=h;E++){const B=t*E/h,S=e.add(e.create(),e.scale(y,p,r(B)),e.scale(x,m,i(B)));if(E\u003e0){let Q,w;for(let M=0;M\u003c=f;M++){const k=t/4*M/f,R=r(k),F=i(k);if(M\u003e0){let O=[],U;U=e.subtract(e.create(),e.scale(y,I,Q),e.scale(x,_,w)),O.push(e.add(U,U,u)),U=e.subtract(e.create(),e.scale(y,S,Q),e.scale(x,_,w)),O.push(e.add(U,U,u)),M\u003cf\u0026\u0026(U=e.subtract(e.create(),e.scale(y,S,R),e.scale(x,_,F)),O.push(e.add(U,U,u))),U=e.subtract(e.create(),e.scale(y,I,R),e.scale(x,_,F)),O.push(e.add(U,U,u)),C.push(o.create(O)),O=[],U=e.add(e.create(),e.scale(y,I,Q),e.scale(x,_,w)),O.push(e.add(e.create(),u,U)),U=e.add(U,e.scale(y,S,Q),e.scale(x,_,w)),O.push(e.add(e.create(),u,U)),M\u003cf\u0026\u0026(U=e.add(U,e.scale(y,S,R),e.scale(x,_,F)),O.push(e.add(e.create(),u,U))),U=e.add(U,e.scale(y,I,R),e.scale(x,_,F)),O.push(e.add(e.create(),u,U)),O.reverse(),C.push(o.create(O))}Q=R,w=F}}I=S}return n.create(C)},aYe}var AYe,xen;function Een(){if(xen)return AYe;xen=1;const t=Ra(),e=qA(),{isNumberArray:n}=cf();return AYe=i=\u003e{const r={points:[],faces:[],colors:void 0,orientation:\"outward\"},{points:s,faces:a,colors:A,orientation:c}=Object.assign({},r,i);if(!(Array.isArray(s)\u0026\u0026Array.isArray(a)))throw new Error(\"points and faces must be arrays\");if(s.length\u003c3)throw new Error(\"three or more points are required\");if(a.length\u003c1)throw new Error(\"one or more faces are required\");if(A){if(!Array.isArray(A))throw new Error(\"colors must be an array\");if(A.length!==a.length)throw new Error(\"faces and colors must have the same length\")}s.forEach((u,g)=\u003e{if(!n(u,3))throw new Error(`point ${g} must be an array of X, Y, Z values`)}),a.forEach((u,g)=\u003e{if(u.length\u003c3)throw new Error(`face ${g} must contain 3 or more indexes`);if(!n(u,u.length))throw new Error(`face ${g} must be an array of numbers`)}),c!==\"outward\"\u0026\u0026a.forEach(u=\u003eu.reverse());const l=a.map((u,g)=\u003e{const h=e.create(u.map(d=\u003es[d]));return A\u0026\u0026A[g]\u0026\u0026(h.color=A[g]),h});return t.create(l)},AYe}var cYe,Ben;function Lai(){if(Ben)return cYe;Ben=1;const t=Mu(),e=jr(),n=Ra(),o=Een(),{isGTE:i}=cf();return cYe=s=\u003e{const a={radius:1,frequency:6};let{radius:A,frequency:c}=Object.assign({},a,s);if(!i(A,0))throw new Error(\"radius must be positive\");if(!i(c,6))throw new Error(\"frequency must be six or more\");if(A===0)return n.create();c=Math.floor(c/6);const l=[[.850651,0,-.525731],[.850651,-0,.525731],[-.850651,-0,.525731],[-.850651,0,-.525731],[0,-.525731,.850651],[0,.525731,.850651],[0,.525731,-.850651],[0,-.525731,-.850651],[-.525731,-.850651,-0],[.525731,-.850651,-0],[.525731,.850651,0],[-.525731,.850651,0]],u=[[0,9,1],[1,10,0],[6,7,0],[10,6,0],[7,9,0],[5,1,4],[4,1,9],[5,10,1],[2,8,3],[3,11,2],[2,5,4],[4,8,2],[2,11,5],[3,7,6],[6,11,3],[8,7,3],[9,8,4],[11,10,5],[10,11,6],[8,9,7]],g=(f,I,C)=\u003e{const y=f[0],x=f[1],E=f[2];let B=C;const S=[],Q=[];for(let w=0;w\u003cI;w++)for(let M=0;M\u003cI-w;M++){const k=w/I,R=(w+1)/I,F=M/(I-w),O=(M+1)/(I-w),U=I-w-1?M/(I-w-1):1,Y=[];Y[0]=h(h(y,x,F),E,k),Y[1]=h(h(y,x,O),E,k),Y[2]=h(h(y,x,U),E,R);for(let W=0;W\u003c3;W++){const te=e.length(Y[W]);for(let j=0;j\u003c3;j++)Y[W][j]/=te}if(S.push(Y[0],Y[1],Y[2]),Q.push([B,B+1,B+2]),B+=3,M\u003cI-w-1){const W=I-w-1?(M+1)/(I-w-1):1;Y[0]=h(h(y,x,O),E,k),Y[1]=h(h(y,x,W),E,R),Y[2]=h(h(y,x,U),E,R);for(let te=0;te\u003c3;te++){const j=e.length(Y[te]);for(let J=0;J\u003c3;J++)Y[te][J]/=j}S.push(Y[0],Y[1],Y[2]),Q.push([B,B+1,B+2]),B+=3}}return{points:S,triangles:Q,offset:B}},h=(f,I,C)=\u003e{const y=1-C,x=[];for(let E=0;E\u003c3;E++)x[E]=f[E]*y+I[E]*C;return x};let d=[],p=[],m=0;for(let f=0;f\u003cu.length;f++){const I=g([l[u[f][0]],l[u[f][1]],l[u[f][2]]],c,m);d=d.concat(I.points),p=p.concat(I.triangles),m=I.offset}let _=o({points:d,faces:p,orientation:\"inward\"});return A!==1\u0026\u0026(_=n.transform(t.fromScaling(t.create(),[A,A,A]),_)),_},cYe}var lYe,ben;function Hai(){if(ben)return lYe;ben=1;const t=au();return lYe=n=\u003e{if(!Array.isArray(n))throw new Error(\"points must be an array\");return t.fromPoints({},n)},lYe}var uYe,Sen;function Oai(){if(Sen)return uYe;Sen=1;const t=Ga();return uYe=n=\u003e{const o={points:[],paths:[],orientation:\"counterclockwise\"},{points:i,paths:r,orientation:s}=Object.assign({},o,n);if(!(Array.isArray(i)\u0026\u0026Array.isArray(r)))throw new Error(\"points and paths must be arrays\");let a=i;Array.isArray(i[0])\u0026\u0026(Array.isArray(i[0][0])||(a=[i])),a.forEach((g,h)=\u003e{if(!Array.isArray(g))throw new Error(\"list of points \"+h+\" must be an array\");if(g.length\u003c3)throw new Error(\"list of points \"+h+\" must contain three or more points\");g.forEach((d,p)=\u003e{if(!Array.isArray(d))throw new Error(\"list of points \"+h+\", point \"+p+\" must be an array\");if(d.length\u003c2)throw new Error(\"list of points \"+h+\", point \"+p+\" must contain by X and Y values\")})});let A=r;if(r.length===0){let g=0;A=a.map(h=\u003eh.map(d=\u003eg++))}const c=[];a.forEach(g=\u003eg.forEach(h=\u003ec.push(h)));let l=[];A.forEach(g=\u003e{const h=g.map(p=\u003ec[p]),d=t.fromPoints(h);l=l.concat(t.toSides(d))});let u=t.create(l);return s===\"clockwise\"\u0026\u0026(u=t.reverse(u)),u},uYe}var gYe,Qen;function dYe(){if(Qen)return gYe;Qen=1;const t=mA(),e=Ga(),{isNumberArray:n}=cf();return gYe=i=\u003e{const r={center:[0,0],size:[2,2]},{center:s,size:a}=Object.assign({},r,i);if(!n(s,2))throw new Error(\"center must be an array of X and Y values\");if(!n(a,2))throw new Error(\"size must be an array of X and Y values\");if(!a.every(u=\u003eu\u003e=0))throw new Error(\"size values must be positive\");if(a[0]===0||a[1]===0)return e.create();const A=[a[0]/2,a[1]/2],c=[A[0],-A[1]],l=[t.subtract(t.create(),s,A),t.add(t.create(),s,c),t.add(t.create(),s,A),t.subtract(t.create(),s,c)];return e.fromPoints(l)},gYe}var hYe,ven;function Gai(){if(ven)return hYe;ven=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=jr(),i=Ra(),r=qA(),{sin:s,cos:a}=dI(),{isGTE:A,isNumberArray:c}=cf(),l=oYe(),u=(m,_,f,I,C,y)=\u003e{const x=e/4*C/I,E=a(x),B=s(x),S=I-C;let Q=f*E,w=_[2]-(f-f*B);y||(w=f-f*B-_[2]),Q=Q\u003et?Q:0;const M=o.add(o.create(),m,[_[0]-f,_[1]-f,w]),k=o.add(o.create(),m,[f-_[0],_[1]-f,w]),R=o.add(o.create(),m,[f-_[0],f-_[1],w]),F=o.add(o.create(),m,[_[0]-f,f-_[1],w]),O=[],U=[],Y=[],W=[];for(let te=0;te\u003c=S;te++){const j=S\u003e0?e/4*te/S:0,J=n.fromAngleRadians(n.create(),j);n.scale(J,J,Q);const oe=o.fromVec2(o.create(),J);O.push(o.add(o.create(),M,oe)),o.rotateZ(oe,oe,[0,0,0],e/4),U.push(o.add(o.create(),k,oe)),o.rotateZ(oe,oe,[0,0,0],e/4),Y.push(o.add(o.create(),R,oe)),o.rotateZ(oe,oe,[0,0,0],e/4),W.push(o.add(o.create(),F,oe))}return y?[O,U,Y,W]:(O.reverse(),U.reverse(),Y.reverse(),W.reverse(),[W,Y,U,O])},g=(m,_)=\u003e{const f=[];for(let I=0;I\u003cm.length;I++){const C=m[I],y=_[I];for(let x=0;x\u003cC.length-1;x++)f.push(r.create([C[x],C[x+1],y[x]])),x\u003cy.length-1\u0026\u0026f.push(r.create([y[x],C[x+1],y[x+1]]))}return f},h=(m,_)=\u003e{const f=[];for(let I=0;I\u003cm.length;I++){let C=m[I],y=_[I];const x=C[C.length-1],E=y[y.length-1],B=(I+1)%m.length;C=m[B],y=_[B];const S=C[0],Q=y[0];f.push(r.create([x,S,Q,E]))}return f},d=(m,_)=\u003e{m=[m[3],m[2],m[1],m[0]],m=m.map(y=\u003ey.slice().reverse());const f=[];m.forEach(y=\u003e{y.forEach(x=\u003ef.push(x))});const I=[];_.forEach(y=\u003e{y.forEach(x=\u003eI.push(x))});const C=[];for(let y=0;y\u003cI.length;y++){const x=(y+1)%I.length;C.push(r.create([f[y],f[x],I[x],I[y]]))}return C};return hYe=m=\u003e{const _={center:[0,0,0],size:[2,2,2],roundRadius:.2,segments:32};let{center:f,size:I,roundRadius:C,segments:y}=Object.assign({},_,m);if(!c(f,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!c(I,3))throw new Error(\"size must be an array of X, Y and Z values\");if(!I.every(S=\u003eS\u003e=0))throw new Error(\"size values must be positive\");if(!A(C,0))throw new Error(\"roundRadius must be positive\");if(!A(y,4))throw new Error(\"segments must be four or more\");if(I[0]===0||I[1]===0||I[2]===0)return i.create();if(C===0)return l({center:f,size:I});if(I=I.map(S=\u003eS/2),C\u003eI[0]-t||C\u003eI[1]-t||C\u003eI[2]-t)throw new Error(\"roundRadius must be smaller than the radius of all dimensions\");y=Math.floor(y/4);let x=null,E=null,B=[];for(let S=0;S\u003c=y;S++){const Q=u(f,I,C,y,S,!0),w=u(f,I,C,y,S,!1);if(S===0\u0026\u0026(B=B.concat(d(w,Q))),x\u0026\u0026(B=B.concat(g(x,Q),h(x,Q))),E\u0026\u0026(B=B.concat(g(E,w),h(E,w))),S===y){let M=Q.map(k=\u003ek[0]);B.push(r.create(M)),M=w.map(k=\u003ek[0]),B.push(r.create(M))}x=Q,E=w}return i.create(B)},hYe}var pYe,wen;function Yai(){if(wen)return pYe;wen=1;const{EPS:t,TAU:e}=pc(),n=jr(),o=Ra(),i=qA(),{sin:r,cos:s}=dI(),{isGTE:a,isNumberArray:A}=cf(),c=Ien();return pYe=u=\u003e{const g={center:[0,0,0],height:2,radius:1,roundRadius:.2,segments:32},{center:h,height:d,radius:p,roundRadius:m,segments:_}=Object.assign({},g,u);if(!A(h,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!a(d,0))throw new Error(\"height must be positive\");if(!a(p,0))throw new Error(\"radius must be positive\");if(!a(m,0))throw new Error(\"roundRadius must be positive\");if(m\u003ep)throw new Error(\"roundRadius must be smaller than the radius\");if(!a(_,4))throw new Error(\"segments must be four or more\");if(d===0||p===0)return o.create();if(m===0)return c({center:h,height:d,radius:p});const f=[0,0,-(d/2)],I=[0,0,d/2],C=n.subtract(n.create(),I,f),y=n.length(C);if(2*m\u003ey-t)throw new Error(\"height must be larger than twice roundRadius\");let x;Math.abs(C[0])\u003eMath.abs(C[1])?x=n.fromValues(0,1,0):x=n.fromValues(1,0,0);const E=n.scale(n.create(),n.normalize(n.create(),C),m),B=n.scale(n.create(),n.normalize(n.create(),n.cross(n.create(),E,x)),p),S=n.scale(n.create(),n.normalize(n.create(),n.cross(n.create(),B,E)),p);n.add(f,f,E),n.subtract(I,I,E);const Q=Math.floor(.25*_),w=U=\u003e{const Y=U.map(W=\u003en.add(W,W,h));return i.create(Y)},M=[],k=n.create(),R=n.create();let F;for(let U=0;U\u003c=_;U++){const Y=e*U/_,W=n.add(n.create(),n.scale(k,B,s(Y)),n.scale(R,S,r(Y)));if(U\u003e0){let te=[];te.push(n.add(n.create(),f,W)),te.push(n.add(n.create(),f,F)),te.push(n.add(n.create(),I,F)),te.push(n.add(n.create(),I,W)),M.push(w(te));let j,J;for(let oe=0;oe\u003c=Q;oe++){const ie=e/4*oe/Q,ne=s(ie),le=r(ie);if(oe\u003e0){te=[];let ge;ge=n.add(n.create(),f,n.subtract(k,n.scale(k,F,j),n.scale(R,E,J))),te.push(ge),ge=n.add(n.create(),f,n.subtract(k,n.scale(k,W,j),n.scale(R,E,J))),te.push(ge),oe\u003cQ\u0026\u0026(ge=n.add(n.create(),f,n.subtract(k,n.scale(k,W,ne),n.scale(R,E,le))),te.push(ge)),ge=n.add(n.create(),f,n.subtract(k,n.scale(k,F,ne),n.scale(R,E,le))),te.push(ge),M.push(w(te)),te=[],ge=n.add(n.create(),n.scale(k,F,j),n.scale(R,E,J)),n.add(ge,ge,I),te.push(ge),ge=n.add(n.create(),n.scale(k,W,j),n.scale(R,E,J)),n.add(ge,ge,I),te.push(ge),oe\u003cQ\u0026\u0026(ge=n.add(n.create(),n.scale(k,W,ne),n.scale(R,E,le)),n.add(ge,ge,I),te.push(ge)),ge=n.add(n.create(),n.scale(k,F,ne),n.scale(R,E,le)),n.add(ge,ge,I),te.push(ge),te.reverse(),M.push(w(te))}j=ne,J=le}}F=W}return o.create(M)},pYe}var mYe,Pen;function Uai(){if(Pen)return mYe;Pen=1;const{EPS:t,TAU:e}=pc(),n=mA(),o=Ga(),{isGTE:i,isNumberArray:r}=cf(),s=dYe();return mYe=A=\u003e{const c={center:[0,0],size:[2,2],roundRadius:.2,segments:32};let{center:l,size:u,roundRadius:g,segments:h}=Object.assign({},c,A);if(!r(l,2))throw new Error(\"center must be an array of X and Y values\");if(!r(u,2))throw new Error(\"size must be an array of X and Y values\");if(!u.every(E=\u003eE\u003e=0))throw new Error(\"size values must be positive\");if(!i(g,0))throw new Error(\"roundRadius must be positive\");if(!i(h,4))throw new Error(\"segments must be four or more\");if(u[0]===0||u[1]===0)return o.create();if(g===0)return s({center:l,size:u});if(u=u.map(E=\u003eE/2),g\u003eu[0]-t||g\u003eu[1]-t)throw new Error(\"roundRadius must be smaller than the radius of all dimensions\");const d=Math.floor(h/4),p=n.add(n.create(),l,[u[0]-g,u[1]-g]),m=n.add(n.create(),l,[g-u[0],u[1]-g]),_=n.add(n.create(),l,[g-u[0],g-u[1]]),f=n.add(n.create(),l,[u[0]-g,g-u[1]]),I=[],C=[],y=[],x=[];for(let E=0;E\u003c=d;E++){const B=e/4*E/d,S=n.fromAngleRadians(n.create(),B);n.scale(S,S,g),I.push(n.add(n.create(),p,S)),n.rotate(S,S,n.create(),e/4),C.push(n.add(n.create(),m,S)),n.rotate(S,S,n.create(),e/4),y.push(n.add(n.create(),_,S)),n.rotate(S,S,n.create(),e/4),x.push(n.add(n.create(),f,S))}return o.fromPoints(I.concat(C,y,x))},mYe}var _Ye,Men;function Den(){if(Men)return _Ye;Men=1;const t=yen(),{isGTE:e}=cf();return _Ye=o=\u003e{const i={center:[0,0,0],radius:1,segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]};let{center:r,radius:s,segments:a,axes:A}=Object.assign({},i,o);if(!e(s,0))throw new Error(\"radius must be positive\");return s=[s,s,s],t({center:r,radius:s,segments:a,axes:A})},_Ye}var fYe,Nen;function Kai(){if(Nen)return fYe;Nen=1;const t=dYe(),{isGTE:e}=cf();return fYe=o=\u003e{const i={center:[0,0],size:2};let{center:r,size:s}=Object.assign({},i,o);if(!e(s,0))throw new Error(\"size must be positive\");return s=[s,s],t({center:r,size:s})},fYe}var IYe,Ren;function Vai(){if(Ren)return IYe;Ren=1;const{TAU:t}=pc(),e=mA(),n=Ga(),{isGT:o,isGTE:i,isNumberArray:r}=cf(),s=(c,l)=\u003ec\u003e0\u0026\u0026l\u003e1\u0026\u0026l\u003cc/2?Math.cos(Math.PI*l/c)/Math.cos(Math.PI*(l-1)/c):0,a=(c,l,u,g)=\u003e{const h=t/c,d=[];for(let p=0;p\u003cc;p++){const m=e.fromAngleRadians(e.create(),h*p+u);e.scale(m,m,l),e.add(m,g,m),d.push(m)}return d};return IYe=c=\u003e{const l={center:[0,0],vertices:5,outerRadius:1,innerRadius:0,density:2,startAngle:0};let{center:u,vertices:g,outerRadius:h,innerRadius:d,density:p,startAngle:m}=Object.assign({},l,c);if(!r(u,2))throw new Error(\"center must be an array of X and Y values\");if(!i(g,2))throw new Error(\"vertices must be two or more\");if(!o(h,0))throw new Error(\"outerRadius must be greater than zero\");if(!i(d,0))throw new Error(\"innerRadius must be greater than zero\");if(!i(m,0))throw new Error(\"startAngle must be greater than zero\");if(g=Math.floor(g),p=Math.floor(p),m=m%t,d===0){if(!i(p,2))throw new Error(\"density must be two or more\");d=h*s(g,p)}const _=e.clone(u),f=a(g,h,m,_),I=a(g,d,m+Math.PI/g,_),C=[];for(let y=0;y\u003cg;y++)C.push(f[y]),C.push(I[y]);return n.fromPoints(C)},IYe}var CYe,Ten;function mX(){if(Ten)return CYe;Ten=1;const t=la(),e=Mu(),n=E6(),o=Ga(),i=Ra(),r=au(),s=(l,...u)=\u003e{const g={origin:[0,0,0],normal:[0,0,1]},{origin:h,normal:d}=Object.assign({},g,l);if(u=t(u),u.length===0)throw new Error(\"wrong number of arguments\");const p=n.fromNormalAndPoint(n.create(),d,h);if(Number.isNaN(p[0]))throw new Error(\"the given origin and normal do not define a proper plane\");const m=e.mirrorByPlane(e.create(),p),_=u.map(f=\u003er.isA(f)?r.transform(m,f):o.isA(f)?o.transform(m,f):i.isA(f)?i.transform(m,f):f);return _.length===1?_[0]:_};return CYe={mirror:s,mirrorX:(...l)=\u003es({normal:[1,0,0]},l),mirrorY:(...l)=\u003es({normal:[0,1,0]},l),mirrorZ:(...l)=\u003es({normal:[0,0,1]},l)},CYe}var yYe,ken;function Fen(){if(ken)return yYe;ken=1;const t=E6(),e=jr();return yYe=o=\u003e{const i=o.edges;if(i.length\u003c3)throw new Error(\"slices must have 3 or more edges to calculate a plane\");const r=i.reduce((c,l)=\u003ee.add(e.create(),c,l[0]),e.create());e.scale(r,r,1/i.length);let s,a=0;i.forEach(c=\u003e{if(!e.equals(c[0],c[1])){const l=e.squaredDistance(r,c[0]);l\u003ea\u0026\u0026(s=c,a=l)}});const A=i.find(c=\u003ee.equals(c[1],s[0]));return t.fromPoints(t.create(),A[0],s[0],s[1])},yYe}var xYe,Len;function tT(){return Len||(Len=1,xYe=e=\u003e(e||(e=[]),{edges:e})),xYe}var EYe,Hen;function zai(){if(Hen)return EYe;Hen=1;const t=tT(),e=jr();return EYe=(...o)=\u003e{let i,r;return o.length===1?(i=t(),r=o[0]):(i=o[0],r=o[1]),i.edges=r.edges.map(s=\u003e[e.clone(s[0]),e.clone(s[1])]),i},EYe}var BYe,Oen;function Jai(){if(Oen)return BYe;Oen=1;const t=jr();return BYe=(n,o)=\u003e{const i=n.edges,r=o.edges;return i.length!==r.length?!1:i.reduce((a,A,c)=\u003e{const l=r[c],u=t.squaredDistance(A[0],l[0]);return a\u0026\u0026u\u003cNumber.EPSILON},!0)},BYe}var bYe,Gen;function Wai(){if(Gen)return bYe;Gen=1;const t=jr(),e=tT();return bYe=o=\u003e{if(!Array.isArray(o))throw new Error(\"the given points must be an array\");if(o.length\u003c3)throw new Error(\"the given points must contain THREE or more points\");const i=[];let r=o[o.length-1];return o.forEach(s=\u003e{s.length===2\u0026\u0026i.push([t.fromVec2(t.create(),r),t.fromVec2(t.create(),s)]),s.length===3\u0026\u0026i.push([r,s]),r=s}),e(i)},bYe}var SYe,Yen;function jai(){if(Yen)return SYe;Yen=1;const t=jr(),e=tT();return SYe=o=\u003e{if(!Array.isArray(o))throw new Error(\"the given sides must be an array\");const i=[];return o.forEach(r=\u003e{i.push([t.fromVec2(t.create(),r[0]),t.fromVec2(t.create(),r[1])])}),e(i)},SYe}var QYe,Uen;function $ai(){return Uen||(Uen=1,QYe=e=\u003e!!(e\u0026\u0026typeof e==\"object\"\u0026\u0026\"edges\"in e\u0026\u0026Array.isArray(e.edges))),QYe}var vYe,Ken;function qai(){if(Ken)return vYe;Ken=1;const t=tT();return vYe=(...n)=\u003e{let o,i;return n.length===1?(o=t(),i=n[0]):(o=n[0],i=n[1]),o.edges=i.edges.map(r=\u003e[r[1],r[0]]),o},vYe}var wYe,Ven;function Xai(){return Ven||(Ven=1,wYe=e=\u003ee.edges),wYe}var PYe,zen;function Zai(){return zen||(zen=1,PYe=(e,n)=\u003e{let o,i,r,s,a,A=1;do{i=e,e=null;let c=null;for(a=0;i;){a++,r=i;let l=0;for(o=0;o\u003cA\u0026\u0026(l++,r=r.nextZ,!!r);o++);let u=A;for(;l\u003e0||u\u003e0\u0026\u0026r;)l!==0\u0026\u0026(u===0||!r||n(i)\u003c=n(r))?(s=i,i=i.nextZ,l--):(s=r,r=r.nextZ,u--),c?c.nextZ=s:e=s,s.prevZ=c,c=s;i=r}c.nextZ=null,A*=2}while(a\u003e1);return e}),PYe}var MYe,Jen;function Wen(){if(Jen)return MYe;Jen=1;const t=Zai();class e{constructor(r,s,a){this.i=r,this.x=s,this.y=a,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}}return MYe={Node:e,insertNode:(i,r,s,a)=\u003e{const A=new e(i,r,s);return a?(A.next=a.next,A.prev=a,a.next.prev=A,a.next=A):(A.prev=A,A.next=A),A},removeNode:i=\u003e{i.next.prev=i.prev,i.prev.next=i.next,i.prevZ\u0026\u0026(i.prevZ.nextZ=i.nextZ),i.nextZ\u0026\u0026(i.nextZ.prevZ=i.prevZ)},sortLinked:t},MYe}var DYe,jen;function NYe(){return jen||(jen=1,DYe={area:(n,o,i)=\u003e(o.y-n.y)*(i.x-o.x)-(o.x-n.x)*(i.y-o.y),pointInTriangle:(n,o,i,r,s,a,A,c)=\u003e(s-A)*(o-c)-(n-A)*(a-c)\u003e=0\u0026\u0026(n-A)*(r-c)-(i-A)*(o-c)\u003e=0\u0026\u0026(i-A)*(a-c)-(s-A)*(r-c)\u003e=0}),DYe}var RYe,$en;function qen(){if($en)return RYe;$en=1;const{Node:t,insertNode:e,removeNode:n}=Wen(),{area:o}=NYe(),i=(m,_,f,I,C)=\u003e{let y;if(C===d(m,_,f,I)\u003e0)for(let x=_;x\u003cf;x+=I)y=e(x,m[x],m[x+1],y);else for(let x=f-I;x\u003e=_;x-=I)y=e(x,m[x],m[x+1],y);return y\u0026\u0026p(y,y.next)\u0026\u0026(n(y),y=y.next),y},r=(m,_)=\u003e{if(!m)return m;_||(_=m);let f=m,I;do if(I=!1,!f.steiner\u0026\u0026(p(f,f.next)||o(f.prev,f,f.next)===0)){if(n(f),f=_=f.prev,f===f.next)break;I=!0}else f=f.next;while(I||f!==_);return _},s=(m,_,f)=\u003e{let I=m;do{const C=I.prev,y=I.next.next;!p(C,y)\u0026\u0026g(C,I,I.next,y)\u0026\u0026A(C,y)\u0026\u0026A(y,C)\u0026\u0026(_.push(C.i/f),_.push(I.i/f),_.push(y.i/f),n(I),n(I.next),I=m=y),I=I.next}while(I!==m);return r(I)},a=(m,_)=\u003e{let f=m;do{if(f.i!==m.i\u0026\u0026f.next.i!==m.i\u0026\u0026f.i!==_.i\u0026\u0026f.next.i!==_.i\u0026\u0026g(f,f.next,m,_))return!0;f=f.next}while(f!==m);return!1},A=(m,_)=\u003eo(m.prev,m,m.next)\u003c0?o(m,_,m.next)\u003e=0\u0026\u0026o(m,m.prev,_)\u003e=0:o(m,_,m.prev)\u003c0||o(m,m.next,_)\u003c0,c=(m,_)=\u003e{let f=m,I=!1;const C=(m.x+_.x)/2,y=(m.y+_.y)/2;do f.y\u003ey!=f.next.y\u003ey\u0026\u0026f.next.y!==f.y\u0026\u0026C\u003c(f.next.x-f.x)*(y-f.y)/(f.next.y-f.y)+f.x\u0026\u0026(I=!I),f=f.next;while(f!==m);return I},l=(m,_)=\u003e{const f=new t(m.i,m.x,m.y),I=new t(_.i,_.x,_.y),C=m.next,y=_.prev;return m.next=_,_.prev=m,f.next=C,C.prev=f,I.next=f,f.prev=I,y.next=I,I.prev=y,I},u=(m,_)=\u003em.next.i!==_.i\u0026\u0026m.prev.i!==_.i\u0026\u0026!a(m,_)\u0026\u0026(A(m,_)\u0026\u0026A(_,m)\u0026\u0026c(m,_)\u0026\u0026(o(m.prev,m,_.prev)||o(m,_.prev,_))||p(m,_)\u0026\u0026o(m.prev,m,m.next)\u003e0\u0026\u0026o(_.prev,_,_.next)\u003e0),g=(m,_,f,I)=\u003e{const C=Math.sign(o(m,_,f)),y=Math.sign(o(m,_,I)),x=Math.sign(o(f,I,m)),E=Math.sign(o(f,I,_));return!!(C!==y\u0026\u0026x!==E||C===0\u0026\u0026h(m,f,_)||y===0\u0026\u0026h(m,I,_)||x===0\u0026\u0026h(f,m,I)||E===0\u0026\u0026h(f,_,I))},h=(m,_,f)=\u003e_.x\u003c=Math.max(m.x,f.x)\u0026\u0026_.x\u003e=Math.min(m.x,f.x)\u0026\u0026_.y\u003c=Math.max(m.y,f.y)\u0026\u0026_.y\u003e=Math.min(m.y,f.y),d=(m,_,f,I)=\u003e{let C=0;for(let y=_,x=f-I;y\u003cf;y+=I)C+=(m[x]-m[y])*(m[y+1]+m[x+1]),x=y;return C},p=(m,_)=\u003em.x===_.x\u0026\u0026m.y===_.y;return RYe={cureLocalIntersections:s,filterPoints:r,isValidDiagonal:u,linkedPolygon:i,locallyInside:A,splitPolygon:l},RYe}var TYe,Xen;function eAi(){if(Xen)return TYe;Xen=1;const{filterPoints:t,linkedPolygon:e,locallyInside:n,splitPolygon:o}=qen(),{area:i,pointInTriangle:r}=NYe(),s=(u,g,h,d)=\u003e{const p=[];for(let m=0,_=g.length;m\u003c_;m++){const f=g[m]*d,I=m\u003c_-1?g[m+1]*d:u.length,C=e(u,f,I,d,!1);C===C.next\u0026\u0026(C.steiner=!0),p.push(l(C))}p.sort((m,_)=\u003em.x-_.x);for(let m=0;m\u003cp.length;m++)h=a(p[m],h),h=t(h,h.next);return h},a=(u,g)=\u003e{const h=A(u,g);if(!h)return g;const d=o(h,u),p=t(h,h.next);return t(d,d.next),g===h?p:g},A=(u,g)=\u003e{let h=g;const d=u.x,p=u.y;let m=-1/0,_;do{if(p\u003c=h.y\u0026\u0026p\u003e=h.next.y\u0026\u0026h.next.y!==h.y){const x=h.x+(p-h.y)*(h.next.x-h.x)/(h.next.y-h.y);if(x\u003c=d\u0026\u0026x\u003em){if(m=x,x===d){if(p===h.y)return h;if(p===h.next.y)return h.next}_=h.x\u003ch.next.x?h:h.next}}h=h.next}while(h!==g);if(!_)return null;if(d===m)return _;const f=_,I=_.x,C=_.y;let y=1/0;h=_;do{if(d\u003e=h.x\u0026\u0026h.x\u003e=I\u0026\u0026d!==h.x\u0026\u0026r(p\u003cC?d:m,p,I,C,p\u003cC?m:d,p,h.x,h.y)){const x=Math.abs(p-h.y)/(d-h.x);n(h,u)\u0026\u0026(x\u003cy||x===y\u0026\u0026(h.x\u003e_.x||h.x===_.x\u0026\u0026c(_,h)))\u0026\u0026(_=h,y=x)}h=h.next}while(h!==f);return _},c=(u,g)=\u003ei(u.prev,u,g.prev)\u003c0\u0026\u0026i(g.next,u,u.next)\u003c0,l=u=\u003e{let g=u,h=u;do(g.x\u003ch.x||g.x===h.x\u0026\u0026g.y\u003ch.y)\u0026\u0026(h=g),g=g.next;while(g!==u);return h};return TYe=s,TYe}var kYe,Zen;function tAi(){if(Zen)return kYe;Zen=1;const t=eAi(),{removeNode:e,sortLinked:n}=Wen(),{cureLocalIntersections:o,filterPoints:i,isValidDiagonal:r,linkedPolygon:s,splitPolygon:a}=qen(),{area:A,pointInTriangle:c}=NYe(),l=(_,f,I=2)=\u003e{const C=f\u0026\u0026f.length,y=C?f[0]*I:_.length;let x=s(_,0,y,I,!0);const E=[];if(!x||x.next===x.prev)return E;let B,S,Q,w,M;if(C\u0026\u0026(x=t(_,f,x,I)),_.length\u003e80*I){B=Q=_[0],S=w=_[1];for(let k=I;k\u003cy;k+=I){const R=_[k],F=_[k+1];R\u003cB\u0026\u0026(B=R),F\u003cS\u0026\u0026(S=F),R\u003eQ\u0026\u0026(Q=R),F\u003ew\u0026\u0026(w=F)}M=Math.max(Q-B,w-S),M=M!==0?1/M:0}return u(x,E,I,B,S,M),E},u=(_,f,I,C,y,x,E)=\u003e{if(!_)return;!E\u0026\u0026x\u0026\u0026p(_,C,y,x);let B=_,S,Q;for(;_.prev!==_.next;){if(S=_.prev,Q=_.next,x?h(_,C,y,x):g(_)){f.push(S.i/I),f.push(_.i/I),f.push(Q.i/I),e(_),_=Q.next,B=Q.next;continue}if(_=Q,_===B){E?E===1?(_=o(i(_),f,I),u(_,f,I,C,y,x,2)):E===2\u0026\u0026d(_,f,I,C,y,x):u(i(_),f,I,C,y,x,1);break}}},g=_=\u003e{const f=_.prev,I=_,C=_.next;if(A(f,I,C)\u003e=0)return!1;let y=_.next.next;for(;y!==_.prev;){if(c(f.x,f.y,I.x,I.y,C.x,C.y,y.x,y.y)\u0026\u0026A(y.prev,y,y.next)\u003e=0)return!1;y=y.next}return!0},h=(_,f,I,C)=\u003e{const y=_.prev,x=_,E=_.next;if(A(y,x,E)\u003e=0)return!1;const B=y.x\u003cx.x?y.x\u003cE.x?y.x:E.x:x.x\u003cE.x?x.x:E.x,S=y.y\u003cx.y?y.y\u003cE.y?y.y:E.y:x.y\u003cE.y?x.y:E.y,Q=y.x\u003ex.x?y.x\u003eE.x?y.x:E.x:x.x\u003eE.x?x.x:E.x,w=y.y\u003ex.y?y.y\u003eE.y?y.y:E.y:x.y\u003eE.y?x.y:E.y,M=m(B,S,f,I,C),k=m(Q,w,f,I,C);let R=_.prevZ,F=_.nextZ;for(;R\u0026\u0026R.z\u003e=M\u0026\u0026F\u0026\u0026F.z\u003c=k;){if(R!==_.prev\u0026\u0026R!==_.next\u0026\u0026c(y.x,y.y,x.x,x.y,E.x,E.y,R.x,R.y)\u0026\u0026A(R.prev,R,R.next)\u003e=0||(R=R.prevZ,F!==_.prev\u0026\u0026F!==_.next\u0026\u0026c(y.x,y.y,x.x,x.y,E.x,E.y,F.x,F.y)\u0026\u0026A(F.prev,F,F.next)\u003e=0))return!1;F=F.nextZ}for(;R\u0026\u0026R.z\u003e=M;){if(R!==_.prev\u0026\u0026R!==_.next\u0026\u0026c(y.x,y.y,x.x,x.y,E.x,E.y,R.x,R.y)\u0026\u0026A(R.prev,R,R.next)\u003e=0)return!1;R=R.prevZ}for(;F\u0026\u0026F.z\u003c=k;){if(F!==_.prev\u0026\u0026F!==_.next\u0026\u0026c(y.x,y.y,x.x,x.y,E.x,E.y,F.x,F.y)\u0026\u0026A(F.prev,F,F.next)\u003e=0)return!1;F=F.nextZ}return!0},d=(_,f,I,C,y,x)=\u003e{let E=_;do{let B=E.next.next;for(;B!==E.prev;){if(E.i!==B.i\u0026\u0026r(E,B)){let S=a(E,B);E=i(E,E.next),S=i(S,S.next),u(E,f,I,C,y,x),u(S,f,I,C,y,x);return}B=B.next}E=E.next}while(E!==_)},p=(_,f,I,C)=\u003e{let y=_;do y.z===null\u0026\u0026(y.z=m(y.x,y.y,f,I,C)),y.prevZ=y.prev,y.nextZ=y.next,y=y.next;while(y!==_);y.prevZ.nextZ=null,y.prevZ=null,n(y,x=\u003ex.z)},m=(_,f,I,C,y)=\u003e(_=32767*(_-I)*y,f=32767*(f-C)*y,_=(_|_\u003c\u003c8)\u002616711935,_=(_|_\u003c\u003c4)\u0026252645135,_=(_|_\u003c\u003c2)\u0026858993459,_=(_|_\u003c\u003c1)\u00261431655765,f=(f|f\u003c\u003c8)\u002616711935,f=(f|f\u003c\u003c4)\u0026252645135,f=(f|f\u003c\u003c2)\u0026858993459,f=(f|f\u003c\u003c1)\u00261431655765,_|f\u003c\u003c1);return kYe=l,kYe}var FYe,etn;function nAi(){if(etn)return FYe;etn=1;const{area:t}=hX(),{toOutlines:e}=Ga(),{arePointsInside:n}=zOe(),o=r=\u003e{const s=e(r),a=[],A=[];s.forEach((u,g)=\u003e{const h=t(u);h\u003c0?A.push(g):h\u003e0\u0026\u0026a.push(g)});const c=[],l=[];return a.forEach((u,g)=\u003e{const h=s[u];c[g]=[],A.forEach((d,p)=\u003e{const m=s[d];n([m[0]],{vertices:h})\u0026\u0026(c[g].push(d),l[p]||(l[p]=[]),l[p].push(g))})}),A.forEach((u,g)=\u003e{if(l[g]\u0026\u0026l[g].length\u003e1){const h=i(l[g],d=\u003ec[d].length);l[g].forEach((d,p)=\u003e{p!==h\u0026\u0026(c[d]=c[d].filter(m=\u003em!==u))})}}),c.map((u,g)=\u003e({solid:s[a[g]],holes:u.map(h=\u003es[h])}))},i=(r,s)=\u003e{let a,A;return r.forEach((c,l)=\u003e{const u=s(c);(A===void 0||u\u003cA)\u0026\u0026(a=l,A=u)}),a};return FYe=o,FYe}var LYe,ttn;function oAi(){if(ttn)return LYe;ttn=1;const t=Ga(),e=E6(),n=mA(),o=jr(),i=Fen(),r=nAi();class s{constructor(A){this.plane=i(A);const c=o.orthogonal(o.create(),this.plane),l=o.cross(o.create(),this.plane,c);this.v=o.normalize(l,l),this.u=o.cross(o.create(),this.v,this.plane),this.basisMap=new Map;const u=A.edges.map(h=\u003eh.map(d=\u003ethis.to2D(d))),g=t.create(u);this.roots=r(g)}to2D(A){const c=n.fromValues(o.dot(A,this.u),o.dot(A,this.v));return this.basisMap.set(c,A),c}to3D(A){const c=this.basisMap.get(A);if(c)return c;{console.log(\"Warning: point not in original slice\");const l=o.scale(o.create(),this.u,A[0]),u=o.scale(o.create(),this.v,A[1]),g=o.scale(o.create(),e,e[3]),h=o.add(l,l,g);return o.add(u,u,h)}}}return LYe=s,LYe}var HYe,ntn;function iAi(){if(ntn)return HYe;ntn=1;const t=qA(),e=tAi(),n=oAi();return HYe=i=\u003e{const r=new n(i),s=[];return r.roots.forEach(({solid:a,holes:A})=\u003e{let c=a.length;const l=[];A.forEach((p,m)=\u003e{l.push(c),c+=p.length});const u=[a,...A].flat(),g=u.flat(),h=p=\u003er.to3D(u[p]),d=e(g,l);for(let p=0;p\u003cd.length;p+=3){const m=d.slice(p,p+3).map(h);s.push(t.fromPointsAndPlane(m,r.plane))}}),s},HYe}var OYe,otn;function rAi(){if(otn)return OYe;otn=1;const t=jr(),e=o=\u003eo.reduce((i,r)=\u003ei+=`[${t.toString(r[0])}, ${t.toString(r[1])}], `,\"\");return OYe=o=\u003e`[${e(o.edges)}]`,OYe}var GYe,itn;function sAi(){if(itn)return GYe;itn=1;const t=jr(),e=tT();return GYe=(o,i)=\u003e{const r=i.edges.map(s=\u003e[t.transform(t.create(),s[0],o),t.transform(t.create(),s[1],o)]);return e(r)},GYe}var YYe,rtn;function bY(){return rtn||(rtn=1,YYe={calculatePlane:Fen(),clone:zai(),create:tT(),equals:Jai(),fromPoints:Wai(),fromSides:jai(),isA:$ai(),reverse:qai(),toEdges:Xai(),toPolygons:iAi(),toString:rAi(),transform:sAi()}),YYe}var UYe,stn;function aAi(){if(stn)return UYe;stn=1;const t=jr(),e=tT();return UYe=o=\u003e{if(!o.edges)return o;let i=o.edges;const r=new Map,s=new Map;i=i.filter(c=\u003e!t.equals(c[0],c[1])),i.forEach(c=\u003e{const l=c[0].toString(),u=c[1].toString();r.set(l,c[0]),r.set(u,c[1]),s.set(l,(s.get(l)||0)+1),s.set(u,(s.get(u)||0)-1)});const a=[],A=[];return s.forEach((c,l)=\u003e{c\u003c0\u0026\u0026a.push(l),c\u003e0\u0026\u0026A.push(l)}),a.forEach(c=\u003e{const l=r.get(c);let u=1/0,g;A.forEach(h=\u003e{const d=r.get(h),p=t.distance(l,d);p\u003cu\u0026\u0026(u=p,g=d)}),console.warn(`slice.repair: repairing vertex gap ${l} to ${g} distance ${u}`),i=i.map(h=\u003eh[0].toString()===c?[g,h[1]]:h[1].toString()===c?[h[0],g]:h)}),e(i)},UYe}var KYe,atn;function AAi(){if(atn)return KYe;atn=1;const{EPS:t}=pc(),e=jr(),n=qA(),o=bY(),i=(c,l)=\u003ec===l?c:c\u003cl?i(l,c):l===1?1:l===0?c:i(l,c%l),r=(c,l)=\u003ec*l/i(c,l),s=(c,l)=\u003e{const u=c/l.length;if(u===1)return l;const g=e.fromValues(u,u,u),h=e.create(),d=[];return l.forEach(p=\u003e{e.subtract(h,p[1],p[0]),e.divide(h,h,g);let m=p[0];for(let _=1;_\u003c=u;++_){const f=e.add(e.create(),m,h);d.push([m,f]),m=f}}),d},a=t*t/2*Math.sin(Math.PI/3);return KYe=(c,l)=\u003e{let u=o.toEdges(c),g=o.toEdges(l);if(u.length!==g.length){const d=r(u.length,g.length);d!==u.length\u0026\u0026(u=s(d,u)),d!==g.length\u0026\u0026(g=s(d,g))}const h=[];return u.forEach((d,p)=\u003e{const m=g[p],_=n.create([d[0],d[1],m[1]]),f=n.measureArea(_);Number.isFinite(f)\u0026\u0026f\u003ea\u0026\u0026h.push(_);const I=n.create([d[0],m[1],m[0]]),C=n.measureArea(I);Number.isFinite(C)\u0026\u0026C\u003ea\u0026\u0026h.push(I)}),h},KYe}var VYe,Atn;function Mhe(){if(Atn)return VYe;Atn=1;const t=Mu(),e=Ga(),n=Ra(),o=qA(),i=bY(),r=aAi(),s=AAi(),a=(c,l,u)=\u003e{let g=null;return e.isA(u)\u0026\u0026(g=i.fromSides(e.toSides(u))),o.isA(u)\u0026\u0026(g=i.fromPoints(o.toPoints(u))),c===0||c===1?i.transform(t.fromTranslation(t.create(),[0,0,c]),g):null};return VYe=(c,l)=\u003e{const u={numberOfSlices:2,capStart:!0,capEnd:!0,close:!1,repair:!0,callback:a},{numberOfSlices:g,capStart:h,capEnd:d,close:p,repair:m,callback:_}=Object.assign({},u,c);if(g\u003c2)throw new Error(\"numberOfSlices must be 2 or more\");m\u0026\u0026(l=r(l));const f=g-1;let I=null,C=null,y=null,x=[];for(let E=0;E\u003cg;E++){const B=_(E/f,E,l);if(B){if(!i.isA(B))throw new Error(\"the callback function must return slice objects\");if(i.toEdges(B).length===0)throw new Error(\"the callback function must return slices with one or more edges\");if(y){const Q=s(y,B);for(let w=0;w\u003cQ.length;w++)x.push(Q[w])}E===0\u0026\u0026(I=B),E===g-1\u0026\u0026(C=B),y=B}}if(d){const E=i.toPolygons(C);for(let B=0;B\u003cE.length;B++)x.push(E[B])}if(h){const E=i.toPolygons(I).map(o.invert);for(let B=0;B\u003cE.length;B++)x.push(E[B])}if(!h\u0026\u0026!d\u0026\u0026p\u0026\u0026!i.equals(C,I)){const E=s(C,I);for(let B=0;B\u003cE.length;B++)x.push(E[B])}return n.create(x)},VYe}var zYe,ctn;function ltn(){if(ctn)return zYe;ctn=1;const{TAU:t}=pc(),e=Mu(),{mirrorX:n}=mX(),o=Ga(),i=bY(),r=Mhe();return zYe=(a,A)=\u003e{const c={segments:12,startAngle:0,angle:t,overflow:\"cap\"};let{segments:l,startAngle:u,angle:g,overflow:h}=Object.assign({},c,a);if(l\u003c3)throw new Error(\"segments must be greater then 3\");u=Math.abs(u)\u003et?u%t:u,g=Math.abs(g)\u003et?g%t:g;let d=u+g;if(d=Math.abs(d)\u003et?d%t:d,d\u003cu){const w=u;u=d,d=w}let p=d-u;if(p\u003c=0\u0026\u0026(p=t),Math.abs(p)\u003ct){const w=t/l;l=Math.floor(Math.abs(p)/w),Math.abs(p)\u003el*w\u0026\u0026l++}let m=o.toSides(A);if(m.length===0)throw new Error(\"the given geometry cannot be empty\");const _=m.filter(w=\u003ew[0][0]\u003c0),f=m.filter(w=\u003ew[0][0]\u003e=0);_.length\u003e0\u0026\u0026f.length\u003e0\u0026\u0026h===\"cap\"\u0026\u0026(_.length\u003ef.length?(m=m.map(w=\u003e{let M=w[0],k=w[1];return M=[Math.min(M[0],0),M[1]],k=[Math.min(k[0],0),k[1]],[M,k]}),A=o.create(m),A=n(A)):f.length\u003e=_.length\u0026\u0026(m=m.map(w=\u003e{let M=w[0],k=w[1];return M=[Math.max(M[0],0),M[1]],k=[Math.max(k[0],0),k[1]],[M,k]}),A=o.create(m)));const C=p/l,y=Math.abs(p)\u003ct,x=i.fromSides(o.toSides(A));i.reverse(x,x);const E=e.create(),B=e.fromXRotation(e.create(),t/4),S=e.create(),Q=(w,M,k)=\u003e{let R=C*M+u;return p===t\u0026\u0026M===l\u0026\u0026(R=u),e.fromZRotation(S,R),e.multiply(E,S,B),i.transform(E,k)};return a={numberOfSlices:l+1,capStart:y,capEnd:y,close:!y,callback:Q},r(a,x)},zYe}var JYe,utn;function _X(){if(utn)return JYe;utn=1;const t=la(),e=Mu(),n=Ga(),o=Ra(),i=au(),r=(c,...l)=\u003e{if(!Array.isArray(c))throw new Error(\"angles must be an array\");if(l=t(l),l.length===0)throw new Error(\"wrong number of arguments\");for(c=c.slice();c.length\u003c3;)c.push(0);const u=c[2],g=c[1],h=c[0],d=e.fromTaitBryanRotation(e.create(),u,g,h),p=l.map(m=\u003ei.isA(m)?i.transform(d,m):n.isA(m)?n.transform(d,m):o.isA(m)?o.transform(d,m):m);return p.length===1?p[0]:p};return JYe={rotate:r,rotateX:(c,...l)=\u003er([c,0,0],l),rotateY:(c,...l)=\u003er([0,c,0],l),rotateZ:(c,...l)=\u003er([0,0,c],l)},JYe}var WYe,gtn;function nT(){if(gtn)return WYe;gtn=1;const t=la(),e=Mu(),n=Ga(),o=Ra(),i=au(),r=(c,...l)=\u003e{if(!Array.isArray(c))throw new Error(\"offset must be an array\");if(l=t(l),l.length===0)throw new Error(\"wrong number of arguments\");for(c=c.slice();c.length\u003c3;)c.push(0);const u=e.fromTranslation(e.create(),c),g=l.map(h=\u003ei.isA(h)?i.transform(u,h):n.isA(h)?n.transform(u,h):o.isA(h)?o.transform(u,h):h);return g.length===1?g[0]:g};return WYe={translate:r,translateX:(c,...l)=\u003er([c,0,0],l),translateY:(c,...l)=\u003er([0,c,0],l),translateZ:(c,...l)=\u003er([0,0,c],l)},WYe}var jYe,dtn;function cAi(){if(dtn)return jYe;dtn=1;const{TAU:t}=pc(),e=ltn(),{rotate:n}=_X(),{translate:o}=nT(),i=den(),{isGT:r,isGTE:s}=cf();return jYe=A=\u003e{const c={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:t},{innerRadius:l,innerSegments:u,outerRadius:g,outerSegments:h,innerRotation:d,startAngle:p,outerRotation:m}=Object.assign({},c,A);if(!r(l,0))throw new Error(\"innerRadius must be greater than zero\");if(!s(u,3))throw new Error(\"innerSegments must be three or more\");if(!r(g,0))throw new Error(\"outerRadius must be greater than zero\");if(!s(h,3))throw new Error(\"outerSegments must be three or more\");if(!s(p,0))throw new Error(\"startAngle must be positive\");if(!r(m,0))throw new Error(\"outerRotation must be greater than zero\");if(l\u003e=g)throw new Error(\"inner circle is too large to rotate about the outer circle\");let _=i({radius:l,segments:u});return d!==0\u0026\u0026(_=n([0,0,d],_)),_=o([g,0],_),e({startAngle:p,angle:m,segments:h},_)},jYe}var $Ye,htn;function lAi(){if(htn)return $Ye;htn=1;const{NEPS:t}=pc(),e=mA(),n=Ga(),{isNumberArray:o}=cf(),i=(d,p,m)=\u003eMath.acos((d*d+p*p-m*m)/(2*d*p)),r=(d,p,m)=\u003ep\u003et?Math.sqrt(d*d+m*m-2*d*m*Math.cos(p)):Math.sqrt((d-m)*(d-m)+d*m*p*p*(1-p*p/12)),s=d=\u003e{if(Math.abs(d[0]+d[1]+d[2]-Math.PI)\u003et)throw new Error(\"AAA triangles require angles that sum to PI\");const m=d[0],_=d[1],f=Math.PI-m-_,I=1,C=I/Math.sin(f)*Math.sin(m),y=I/Math.sin(f)*Math.sin(_);return g(m,_,f,C,y,I)},a=d=\u003e{const p=d[0],m=d[1],_=Math.PI+t-p-m;if(_\u003ct)throw new Error(\"AAS triangles require angles that sum to PI\");const f=d[2],I=f/Math.sin(p)*Math.sin(m),C=f/Math.sin(p)*Math.sin(_);return g(p,m,_,f,I,C)},A=d=\u003e{const p=d[0],m=d[2],_=Math.PI+t-p-m;if(_\u003ct)throw new Error(\"ASA triangles require angles that sum to PI\");const f=d[1],I=f/Math.sin(_)*Math.sin(p),C=f/Math.sin(_)*Math.sin(m);return g(p,m,_,I,C,f)},c=d=\u003e{const p=d[0],m=d[1],_=d[2],f=r(p,m,_),I=i(f,p,_),C=Math.PI-I-m;return g(I,m,C,_,f,p)},l=d=\u003e{const p=d[0],m=d[1],_=d[2],f=Math.asin(m*Math.sin(_)/p),I=Math.PI-f-_,C=p/Math.sin(_)*Math.sin(I);return g(f,I,_,m,C,p)},u=d=\u003e{const p=d[1],m=d[2],_=d[0];if(p+m\u003c=_||m+_\u003c=p||_+p\u003c=m)throw new Error(\"SSS triangle is incorrect, as the longest side is longer than the sum of the other sides\");const f=i(m,_,p),I=i(_,p,m),C=Math.PI-f-I;return g(f,I,C,p,m,_)},g=(d,p,m,_,f,I)=\u003e{const C=e.fromValues(0,0),y=e.fromValues(I,0),x=e.fromValues(_,0);return e.add(x,e.rotate(x,x,[0,0],Math.PI-p),y),n.fromPoints([C,y,x])};return $Ye=d=\u003e{const p={type:\"SSS\",values:[1,1,1]};let{type:m,values:_}=Object.assign({},p,d);if(typeof m!=\"string\")throw new Error(\"triangle type must be a string\");if(m=m.toUpperCase(),!((m[0]===\"A\"||m[0]===\"S\")\u0026\u0026(m[1]===\"A\"||m[1]===\"S\")\u0026\u0026(m[2]===\"A\"||m[2]===\"S\")))throw new Error(\"triangle type must contain three letters; A or S\");if(!o(_,3))throw new Error(\"triangle values must contain three values\");if(!_.every(f=\u003ef\u003e0))throw new Error(\"triangle values must be greater than zero\");switch(m){case\"AAA\":return s(_);case\"AAS\":return a(_);case\"ASA\":return A(_);case\"SAS\":return c(_);case\"SSA\":return l(_);case\"SSS\":return u(_);default:throw new Error(\"invalid triangle type, try again\")}},$Ye}var qYe,ptn;function uAi(){return ptn||(ptn=1,qYe={arc:kai(),circle:den(),cube:Fai(),cuboid:oYe(),cylinder:Ien(),cylinderElliptic:_en(),ellipse:uen(),ellipsoid:yen(),geodesicSphere:Lai(),line:Hai(),polygon:Oai(),polyhedron:Een(),rectangle:dYe(),roundedCuboid:Gai(),roundedCylinder:Yai(),roundedRectangle:Uai(),sphere:Den(),square:Kai(),star:Vai(),torus:cAi(),triangle:lAi()}),qYe}var XYe,mtn;function gAi(){return mtn||(mtn=1,XYe={height:14,32:[16],33:[10,5,21,5,7,void 0,5,2,4,1,5,0,6,1,5,2],34:[16,4,21,4,14,void 0,12,21,12,14],35:[21,11,25,4,-7,void 0,17,25,10,-7,void 0,4,12,18,12,void 0,3,6,17,6],36:[20,8,25,8,-4,void 0,12,25,12,-4,void 0,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],37:[24,21,21,3,0,void 0,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,void 0,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7],38:[26,23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2],39:[10,5,19,4,20,5,21,6,20,6,18,5,16,4,15],40:[14,11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7],41:[14,3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7],42:[16,8,21,8,9,void 0,3,18,13,12,void 0,13,18,3,12],43:[26,13,18,13,0,void 0,4,9,22,9],44:[10,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],45:[26,4,9,22,9],46:[10,5,2,4,1,5,0,6,1,5,2],47:[22,20,25,2,-7],48:[20,9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21],49:[20,6,17,8,18,11,21,11,0],50:[20,4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0],51:[20,5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],52:[20,13,21,3,7,18,7,void 0,13,21,13,0],53:[20,15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],54:[20,16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7],55:[20,17,21,7,0,void 0,3,21,17,21],56:[20,8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21],57:[20,16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3],58:[10,5,14,4,13,5,12,6,13,5,14,void 0,5,2,4,1,5,0,6,1,5,2],59:[10,5,14,4,13,5,12,6,13,5,14,void 0,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],60:[24,20,18,4,9,20,0],61:[26,4,12,22,12,void 0,4,6,22,6],62:[24,4,18,20,9,4,0],63:[18,3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,void 0,9,2,8,1,9,0,10,1,9,2],64:[27,18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,void 0,12,16,10,14,9,11,9,8,10,6,11,5,void 0,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,void 0,19,16,18,8,18,6,19,5],65:[18,9,21,1,0,void 0,9,21,17,0,void 0,4,7,14,7],66:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,void 0,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0],67:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5],68:[21,4,21,4,0,void 0,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0],69:[19,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11,void 0,4,0,17,0],70:[18,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11],71:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,void 0,13,8,18,8],72:[22,4,21,4,0,void 0,18,21,18,0,void 0,4,11,18,11],73:[8,4,21,4,0],74:[16,12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7],75:[21,4,21,4,0,void 0,18,21,4,7,void 0,9,12,18,0],76:[17,4,21,4,0,void 0,4,0,16,0],77:[24,4,21,4,0,void 0,4,21,12,0,void 0,20,21,12,0,void 0,20,21,20,0],78:[22,4,21,4,0,void 0,4,21,18,0,void 0,18,21,18,0],79:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21],80:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10],81:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,void 0,12,4,18,-2],82:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,void 0,11,11,18,0],83:[20,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],84:[16,8,21,8,0,void 0,1,21,15,21],85:[22,4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21],86:[18,1,21,9,0,void 0,17,21,9,0],87:[24,2,21,7,0,void 0,12,21,7,0,void 0,12,21,17,0,void 0,22,21,17,0],88:[20,3,21,17,0,void 0,17,21,3,0],89:[18,1,21,9,11,9,0,void 0,17,21,9,11],90:[20,17,21,3,0,void 0,3,21,17,21,void 0,3,0,17,0],91:[14,4,25,4,-7,void 0,5,25,5,-7,void 0,4,25,11,25,void 0,4,-7,11,-7],92:[14,0,21,14,-3],93:[14,9,25,9,-7,void 0,10,25,10,-7,void 0,3,25,10,25,void 0,3,-7,10,-7],94:[16,6,15,8,18,10,15,void 0,3,12,8,17,13,12,void 0,8,17,8,0],95:[16,0,-2,16,-2],96:[10,6,21,5,20,4,18,4,16,5,15,6,16,5,17],97:[19,15,14,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],98:[19,4,21,4,0,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],99:[18,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],100:[19,15,21,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],101:[18,3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],102:[12,10,21,8,21,6,20,5,17,5,0,void 0,2,14,9,14],103:[19,15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],104:[19,4,21,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],105:[8,3,21,4,20,5,21,4,22,3,21,void 0,4,14,4,0],106:[10,5,21,6,20,7,21,6,22,5,21,void 0,6,14,6,-3,5,-6,3,-7,1,-7],107:[17,4,21,4,0,void 0,14,14,4,4,void 0,8,8,15,0],108:[8,4,21,4,0],109:[30,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0,void 0,15,10,18,13,20,14,23,14,25,13,26,10,26,0],110:[19,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],111:[19,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14],112:[19,4,14,4,-7,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],113:[19,15,14,15,-7,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],114:[13,4,14,4,0,void 0,4,8,5,11,7,13,9,14,12,14],115:[17,14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3],116:[12,5,21,5,4,6,1,8,0,10,0,void 0,2,14,9,14],117:[19,4,14,4,4,5,1,7,0,10,0,12,1,15,4,void 0,15,14,15,0],118:[16,2,14,8,0,void 0,14,14,8,0],119:[22,3,14,7,0,void 0,11,14,7,0,void 0,11,14,15,0,void 0,19,14,15,0],120:[17,3,14,14,0,void 0,14,14,3,0],121:[16,2,14,8,0,void 0,14,14,8,0,6,-4,4,-6,2,-7,1,-7],122:[17,14,14,3,0,void 0,3,14,14,14,void 0,3,0,14,0],123:[14,9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,void 0,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,void 0,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7],124:[8,4,25,4,-7],125:[14,5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,void 0,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,void 0,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7],126:[24,3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,void 0,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]}),XYe}var ZYe,_tn;function ftn(){if(_tn)return ZYe;_tn=1;const e={xOffset:0,yOffset:0,input:\"?\",align:\"left\",font:gAi(),height:14,lineSpacing:2.142857142857143,letterSpacing:1,extrudeOffset:0};return ZYe=(o,i)=\u003e{!i\u0026\u0026typeof o==\"string\"\u0026\u0026(o={input:o}),o=o||{};const r=Object.assign({},e,o);return r.input=i||r.input,r},ZYe}var eUe,Itn;function Ctn(){if(Itn)return eUe;Itn=1;const t=ftn();return eUe=(n,o)=\u003e{const{xOffset:i,yOffset:r,input:s,font:a,height:A,extrudeOffset:c}=t(n,o);let l=s.charCodeAt(0);(!l||!a[l])\u0026\u0026(l=63);const u=[].concat(a[l]),g=(A-c)/a.height,h=c/2,d=u.shift()*g,p=[];let m=[];for(let _=0,f=u.length;_\u003cf;_+=2){const I=g*u[_]+i,C=g*u[_+1]+r+h;if(u[_]!==void 0){m.push([I,C]);continue}p.push(m),m=[],_--}return m.length\u0026\u0026p.push(m),{width:d,height:A,segments:p}},eUe}var tUe,ytn;function dAi(){if(ytn)return tUe;ytn=1;const t=Ctn(),e=ftn(),n=(i,r)=\u003e{const{x:s,y:a}=Object.assign({x:0,y:0},i||{}),A=r.segments;let c=null,l=null;for(let u=0,g=A.length;u\u003cg;u++){c=A[u];for(let h=0,d=c.length;h\u003cd;h++)l=c[h],c[h]=[l[0]+s,l[1]+a]}return r};return tUe=(i,r)=\u003e{const{xOffset:s,yOffset:a,input:A,font:c,height:l,align:u,extrudeOffset:g,lineSpacing:h,letterSpacing:d}=e(i,r);let[p,m]=[s,a],_,f,I,C,y,x,E={width:0,segments:[]};const B=[];let S=[],Q=0;const w=p,M=()=\u003e{B.push(E),Q=Math.max(Q,E.width),E={width:0,segments:[]}};for(_=0,f=A.length;_\u003cf;_++){if(I=A[_],C=t({xOffset:p,yOffset:m,font:c,height:l,extrudeOffset:g},I),I===`\n`){p=w,m-=C.height*h,M();continue}y=C.width*d,E.width+=y,p+=y,I!==\" \"\u0026\u0026(E.segments=E.segments.concat(C.segments))}for(E.segments.length\u0026\u0026M(),_=0,f=B.length;_\u003cf;_++)E=B[_],Q\u003eE.width\u0026\u0026(x=Q-E.width,u===\"right\"?E=n({x},E):u===\"center\"\u0026\u0026(E=n({x:x/2},E))),S=S.concat(E.segments);return S},tUe}var nUe,xtn;function hAi(){return xtn||(xtn=1,nUe={vectorChar:Ctn(),vectorText:dAi()}),nUe}var oUe,Etn;function fX(){if(Etn)return oUe;Etn=1;const t=Ga(),e=Ra(),n=au();return oUe=i=\u003e{let r;for(const s of i){let a=0;if(t.isA(s)\u0026\u0026(a=1),e.isA(s)\u0026\u0026(a=2),n.isA(s)\u0026\u0026(a=3),r\u0026\u0026a!==r)return!1;r=a}return!0},oUe}var iUe,Btn;function pAi(){return Btn||(Btn=1,iUe=e=\u003ee*.017453292519943295),iUe}var rUe,btn;function Stn(){return btn||(btn=1,rUe=(e,n)=\u003ee-n),rUe}var sUe,Qtn;function mAi(){return Qtn||(Qtn=1,sUe=(e,n,o)=\u003e{let i=0,r=e.length;for(;r\u003ei;){const s=Math.floor((i+r)/2),a=e[s];o(n,a)\u003e0?i=s+1:r=s}e.splice(i,0,n)}),sUe}var aUe,vtn;function _Ai(){if(vtn)return aUe;vtn=1;const{TAU:t}=pc();return aUe=(n,o,i)=\u003e{const r=o\u003e0?n*t/o:0,s=i\u003e0?t/i:0;return Math.ceil(Math.max(r,s,4))},aUe}var AUe,wtn;function fAi(){return wtn||(wtn=1,AUe=e=\u003ee*57.29577951308232),AUe}var cUe,Ptn;function Mtn(){return Ptn||(Ptn=1,cUe={areAllShapesTheSameType:fX(),degToRad:pAi(),flatten:la(),fnNumberSort:Stn(),insertSorted:mAi(),radiusToSegments:_Ai(),radToDeg:fAi()}),cUe}var lUe,Dtn;function uUe(){if(Dtn)return lUe;Dtn=1;const t=mA(),e=Ga(),n=(i,r)=\u003e{if(r.vertices.length\u003c4)return null;const s=[],a=r.vertices.filter((l,u)=\u003el[2]\u003e0?(s.push(u),!0):!1);if(a.length!==2)throw new Error(\"Assertion failed: fromFakePolygon: not enough points found\");const A=a.map(l=\u003e{const u=Math.round(l[0]/i)*i+0,g=Math.round(l[1]/i)*i+0;return t.fromValues(u,g)});if(t.equals(A[0],A[1]))return null;const c=s[1]-s[0];if(c===1||c===3)c===1\u0026\u0026A.reverse();else throw new Error(\"Assertion failed: fromFakePolygon: unknown index ordering\");return A};return lUe=(i,r)=\u003e{const s=r.map(a=\u003en(i,a)).filter(a=\u003ea!==null);return e.create(s)},lUe}var gUe,Ntn;function dUe(){if(Ntn)return gUe;Ntn=1;const t=jr(),e=Ga(),n=Ra(),o=qA(),i=(s,a,A)=\u003e{const c=[t.fromVec2(t.create(),A[0],s),t.fromVec2(t.create(),A[1],s),t.fromVec2(t.create(),A[1],a),t.fromVec2(t.create(),A[0],a)];return o.create(c)};return gUe=(s,a)=\u003e{const c=e.toSides(a).map(u=\u003ei(s.z0,s.z1,u));return n.create(c)},gUe}var hUe,Rtn;function IAi(){if(Rtn)return hUe;Rtn=1;const t=Mu(),e=mA(),n=jr(),o=function(i,r){arguments.length\u003c2\u0026\u0026(r=n.orthogonal(n.create(),i)),this.v=n.normalize(n.create(),n.cross(n.create(),i,r)),this.u=n.cross(n.create(),this.v,i),this.plane=i,this.planeorigin=n.scale(n.create(),i,i[3])};return o.prototype={getProjectionMatrix:function(){return t.fromValues(this.u[0],this.v[0],this.plane[0],0,this.u[1],this.v[1],this.plane[1],0,this.u[2],this.v[2],this.plane[2],0,0,0,-this.plane[3],1)},getInverseProjectionMatrix:function(){const i=n.scale(n.create(),this.plane,this.plane[3]);return t.fromValues(this.u[0],this.u[1],this.u[2],0,this.v[0],this.v[1],this.v[2],0,this.plane[0],this.plane[1],this.plane[2],0,i[0],i[1],i[2],1)},to2D:function(i){return e.fromValues(n.dot(i,this.u),n.dot(i,this.v))},to3D:function(i){const r=n.scale(n.create(),this.u,i[0]),s=n.scale(n.create(),this.v,i[1]),a=n.add(r,r,this.planeorigin);return n.add(s,s,a)}},hUe=o,hUe}var pUe,Ttn;function CAi(){if(Ttn)return pUe;Ttn=1;const{EPS:t}=pc(),e=IGe(),n=mA(),o=IAi(),i=pZt(),{insertSorted:r,fnNumberSort:s}=Mtn(),a=qA();return pUe=c=\u003e{if(c.length\u003c2)return c;const l=[],u=c.length,g=a.plane(c[0]),h=new o(g),d=[],p=[],m=new Map,_=new Map,f=new Map,I=10/t;for(let E=0;E\u003cu;E++){const B=c[E];let S=[],Q=B.vertices.length,w=-1;if(Q\u003e0){let M,k;for(let R=0;R\u003cQ;R++){let F=h.to2D(B.vertices[R]);const O=Math.floor(F[1]*I);let U;f.has(O)?U=f.get(O):f.has(O+1)?U=f.get(O+1):f.has(O-1)?U=f.get(O-1):(U=F[1],f.set(O,F[1])),F=n.fromValues(F[0],U),S.push(F);const Y=F[1];(R===0||Y\u003cM)\u0026\u0026(M=Y,w=R),(R===0||Y\u003ek)\u0026\u0026(k=Y);let W=_.get(Y);W||(W={},_.set(Y,W)),W[E]=!0}if(M\u003e=k)S=[],Q=0,w=-1;else{let R=m.get(M);R||(R=[],m.set(M,R)),R.push(E)}}S.reverse(),w=Q-w-1,d.push(S),p.push(w)}const C=[];_.forEach((E,B)=\u003eC.push(B)),C.sort(s);let y=[],x=[];for(let E=0;E\u003cC.length;E++){const B=[],S=C[E],Q=_.get(S);let w=0;for(let k=0;k\u003cy.length;++k){const R=y[k],F=R.polygonindex;if(Q[F]){const O=d[F],U=O.length;let Y=R.leftvertexindex,W=R.rightvertexindex;for(;;){let j=Y+1;if(j\u003e=U\u0026\u0026(j=0),O[j][1]!==S)break;Y=j}let te=W-1;if(te\u003c0\u0026\u0026(te=U-1),O[te][1]===S\u0026\u0026(W=te),Y!==R.leftvertexindex\u0026\u0026Y===W)R._remove=!0,w++;else{R.leftvertexindex=Y,R.rightvertexindex=W,R.topleft=O[Y],R.topright=O[W];let j=Y+1;j\u003e=U\u0026\u0026(j=0),R.bottomleft=O[j];let J=W-1;J\u003c0\u0026\u0026(J=U-1),R.bottomright=O[J]}}}w\u003e0\u0026\u0026(y=y.filter(k=\u003e!k._remove));let M;if(E\u003e=C.length-1)y=[],M=null;else{M=Number(C[E+1]);const k=.5*(S+M),R=m.get(S);for(const F in R){const O=R[F],U=d[O],Y=U.length,W=p[O];let te=W;for(;;){let ne=te+1;if(ne\u003e=Y\u0026\u0026(ne=0),U[ne][1]!==S||ne===W)break;te=ne}let j=W;for(;;){let ne=j-1;if(ne\u003c0\u0026\u0026(ne=Y-1),U[ne][1]!==S||ne===te)break;j=ne}let J=te+1;J\u003e=Y\u0026\u0026(J=0);let oe=j-1;oe\u003c0\u0026\u0026(oe=Y-1);const ie={polygonindex:O,leftvertexindex:te,rightvertexindex:j,topleft:U[te],topright:U[j],bottomleft:U[J],bottomright:U[oe]};r(y,ie,(ne,le)=\u003e{const ge=i(ne.topleft,ne.bottomleft,k),_e=i(le.topleft,le.bottomleft,k);return ge\u003e_e?1:ge\u003c_e?-1:0})}}for(const k in y){const R=y[k];let F=i(R.topleft,R.bottomleft,S);const O=n.fromValues(F,S);F=i(R.topright,R.bottomright,S);const U=n.fromValues(F,S);F=i(R.topleft,R.bottomleft,M);const Y=n.fromValues(F,M);F=i(R.topright,R.bottomright,M);const W=n.fromValues(F,M),te={topleft:O,topright:U,bottomleft:Y,bottomright:W,leftline:e.fromPoints(e.create(),O,Y),rightline:e.fromPoints(e.create(),W,U)};if(B.length\u003e0){const j=B[B.length-1],J=n.distance(te.topleft,j.topright),oe=n.distance(te.bottomleft,j.bottomright);J\u003ct\u0026\u0026oe\u003ct\u0026\u0026(te.topleft=j.topleft,te.leftline=j.leftline,te.bottomleft=j.bottomleft,B.splice(B.length-1,1))}B.push(te)}if(E\u003e0){const k=new Set,R=new Set;for(let F=0;F\u003cB.length;F++){const O=B[F];for(let U=0;U\u003cx.length;U++)if(!R.has(U)){const Y=x[U];if(n.distance(Y.bottomleft,O.topleft)\u003ct\u0026\u0026n.distance(Y.bottomright,O.topright)\u003ct){R.add(U);const W=e.direction(O.leftline),te=e.direction(Y.leftline),j=W[0]-te[0],J=e.direction(O.rightline),oe=e.direction(Y.rightline),ie=J[0]-oe[0],ne=Math.abs(j)\u003ct,le=Math.abs(ie)\u003ct,ge=ne||j\u003e=0,_e=le||ie\u003e=0;ge\u0026\u0026_e\u0026\u0026(O.outpolygon=Y.outpolygon,O.leftlinecontinues=ne,O.rightlinecontinues=le,k.add(U));break}}}for(let F=0;F\u003cx.length;F++)if(!k.has(F)){const O=x[F];O.outpolygon.rightpoints.push(O.bottomright),n.distance(O.bottomright,O.bottomleft)\u003et\u0026\u0026O.outpolygon.leftpoints.push(O.bottomleft),O.outpolygon.leftpoints.reverse();const Y=O.outpolygon.rightpoints.concat(O.outpolygon.leftpoints).map(te=\u003eh.to3D(te)),W=a.fromPointsAndPlane(Y,g);W.vertices.length\u0026\u0026l.push(W)}}for(let k=0;k\u003cB.length;k++){const R=B[k];R.outpolygon?(R.leftlinecontinues||R.outpolygon.leftpoints.push(R.topleft),R.rightlinecontinues||R.outpolygon.rightpoints.push(R.topright)):(R.outpolygon={leftpoints:[],rightpoints:[]},R.outpolygon.leftpoints.push(R.topleft),n.distance(R.topleft,R.topright)\u003et\u0026\u0026R.outpolygon.rightpoints.push(R.topright))}x=B}return l},pUe}var mUe,ktn;function IX(){if(ktn)return mUe;ktn=1;const t=Ra(),e=qA(),{NEPS:n}=pc(),o=CAi(),i=a=\u003e{if(a.isRetesselated)return a;const A=t.toPolygons(a).map((g,h)=\u003e({vertices:g.vertices,plane:e.plane(g),index:h})),c=r(A),l=[];c.forEach(g=\u003e{if(Array.isArray(g)){const h=o(g);for(let d=0;d\u003ch.length;d++)l.push(h[d])}else l.push(g)});const u=t.create(l);return u.isRetesselated=!0,u},r=a=\u003e{let A=[a];const c=[];for(let u=3;u\u003e=0;u--){const g=[],h=u===3?15e-9:n;A.forEach(d=\u003e{d.sort(s(u,h));let p=0;for(let m=1;m\u003cd.length;m++)d[m].plane[u]-d[p].plane[u]\u003eh\u0026\u0026(m-p===1?c.push(d[p]):g.push(d.slice(p,m)),p=m);d.length-p===1?c.push(d[p]):g.push(d.slice(p))}),A=g}const l=[];return A.forEach(u=\u003e{u[0]\u0026\u0026(l[u[0].index]=u)}),c.forEach(u=\u003e{l[u.index]=u}),l},s=(a,A)=\u003e(c,l)=\u003ec.plane[a]-l.plane[a]\u003eA?1:l.plane[a]-c.plane[a]\u003eA?-1:0;return mUe=i,mUe}var _Ue,Ftn;function fUe(){if(Ftn)return _Ue;Ftn=1;const{EPS:t}=pc(),e=eT();return _Ue=(o,i)=\u003e{if(o.polygons.length===0||i.polygons.length===0)return!1;const r=e(o),s=r[0],a=r[1],A=e(i),c=A[0],l=A[1];return!(c[0]-a[0]\u003et||s[0]-l[0]\u003et||c[1]-a[1]\u003et||s[1]-l[1]\u003et||c[2]-a[2]\u003et||s[2]-l[2]\u003et)},_Ue}var IUe,Ltn;function yAi(){if(Ltn)return IUe;Ltn=1;const t=E6(),e=qA();class n{constructor(i){this.plane=null,this.front=null,this.back=null,this.polygontreenodes=[],this.parent=i}invert(){const i=[this];let r;for(let s=0;s\u003ci.length;s++){r=i[s],r.plane\u0026\u0026(r.plane=t.flip(t.create(),r.plane)),r.front\u0026\u0026i.push(r.front),r.back\u0026\u0026i.push(r.back);const a=r.front;r.front=r.back,r.back=a}}clipPolygons(i,r){let s={node:this,polygontreenodes:i},a;const A=[];do{if(a=s.node,i=s.polygontreenodes,a.plane){const c=a.plane,l=[],u=[],g=r?l:u,h=i.length;for(let p=0;p\u003ch;p++){const m=i[p];m.isRemoved()||m.splitByPlane(c,g,l,u,l)}a.front\u0026\u0026u.length\u003e0\u0026\u0026A.push({node:a.front,polygontreenodes:u});const d=l.length;if(a.back\u0026\u0026d\u003e0)A.push({node:a.back,polygontreenodes:l});else for(let p=0;p\u003cd;p++)l[p].remove()}s=A.pop()}while(s!==void 0)}clipTo(i,r){let s=this;const a=[];do s.polygontreenodes.length\u003e0\u0026\u0026i.rootnode.clipPolygons(s.polygontreenodes,r),s.front\u0026\u0026a.push(s.front),s.back\u0026\u0026a.push(s.back),s=a.pop();while(s!==void 0)}addPolygonTreeNodes(i){let r={node:this,polygontreenodes:i};const s=[];do{const a=r.node,A=r.polygontreenodes;if(A.length===0){r=s.pop();continue}if(!a.plane){let g=0;g=Math.floor(A.length/2);const h=A[g].getPolygon();a.plane=e.plane(h)}const c=[],l=[],u=A.length;for(let g=0;g\u003cu;++g)A[g].splitByPlane(a.plane,a.polygontreenodes,l,c,l);c.length\u003e0\u0026\u0026(a.front||(a.front=new n(a)),u===c.length\u0026\u0026l.length===0?a.front.polygontreenodes=c:s.push({node:a.front,polygontreenodes:c})),l.length\u003e0\u0026\u0026(a.back||(a.back=new n(a)),u===l.length\u0026\u0026c.length===0?a.back.polygontreenodes=l:s.push({node:a.back,polygontreenodes:l})),r=s.pop()}while(r!==void 0)}}return IUe=n,IUe}var CUe,Htn;function xAi(){if(Htn)return CUe;Htn=1;const t=jr();return CUe=(n,o,i)=\u003e{const r=t.subtract(t.create(),i,o);let s=(n[3]-t.dot(n,o))/t.dot(n,r);return Number.isNaN(s)\u0026\u0026(s=0),s\u003e1\u0026\u0026(s=1),s\u003c0\u0026\u0026(s=0),t.scale(r,r,s),t.add(r,o,r),r},CUe}var yUe,Otn;function EAi(){if(Otn)return yUe;Otn=1;const{EPS:t}=pc(),e=E6(),n=jr(),o=qA(),i=xAi(),r=t*t,s=A=\u003e{const c=[];let l=A[A.length-1];for(let u=0;u\u003cA.length;u++){const g=A[u];n.squaredDistance(g,l)\u003e=r\u0026\u0026c.push(g),l=g}return c};return yUe=(A,c)=\u003e{const l={type:null,front:null,back:null},u=c.vertices,g=u.length,h=o.plane(c);if(e.equals(h,A))l.type=0;else{let d=!1,p=!1;const m=[],_=-t;for(let f=0;f\u003cg;f++){const I=n.dot(A,u[f])-A[3],C=I\u003c_;m.push(C),I\u003et\u0026\u0026(d=!0),I\u003c_\u0026\u0026(p=!0)}if(!d\u0026\u0026!p){const f=n.dot(A,h);l.type=f\u003e=0?0:1}else if(!p)l.type=2;else if(!d)l.type=3;else{l.type=4;const f=[],I=[];let C=m[0];for(let y=0;y\u003cg;y++){const x=u[y];let E=y+1;E\u003e=g\u0026\u0026(E=0);const B=m[E];if(C===B)C?I.push(x):f.push(x);else{const S=u[E],Q=i(A,x,S);C?(I.push(x),I.push(Q),f.push(Q)):(f.push(x),f.push(Q),I.push(Q))}C=B}if(f.length\u003e=3){const y=s(f);y.length\u003e=3\u0026\u0026(l.front=o.fromPointsAndPlane(y,h))}if(I.length\u003e=3){const y=s(I);y.length\u003e=3\u0026\u0026(l.back=o.fromPointsAndPlane(y,h))}}}return l},yUe}var xUe,Gtn;function BAi(){if(Gtn)return xUe;Gtn=1;const{EPS:t}=pc(),e=jr(),n=qA(),o=EAi();class i{constructor(s,a){this.parent=s,this.children=[],this.polygon=a,this.removed=!1}addPolygons(s){if(!this.isRootNode())throw new Error(\"Assertion failed\");const a=this;s.forEach(A=\u003e{a.addChild(A)})}remove(){this.removed||(this.removed=!0,this.polygon=null,this.parent.recursivelyInvalidatePolygon())}isRemoved(){return this.removed}isRootNode(){return!this.parent}invert(){if(!this.isRootNode())throw new Error(\"Assertion failed\");this.invertSub()}getPolygon(){if(!this.polygon)throw new Error(\"Assertion failed\");return this.polygon}getPolygons(s){if(this.isRootNode()\u0026\u0026this.children.length\u003e0){const h=[];for(let d=0;d\u003cthis.children.length;d++)this.children[d].removed||h.push(this.children[d]);this.children=h}let a=[this];const A=[a];let c,l,u,g;for(c=0;c\u003cA.length;++c)for(a=A[c],l=0,u=a.length;l\u003cu;l++)g=a[l],g.polygon?s.push(g.polygon):g.children.length\u003e0\u0026\u0026A.push(g.children)}splitByPlane(s,a,A,c,l){if(this.children.length){const u=[this.children];let g,h,d,p,m;for(g=0;g\u003cu.length;g++)for(m=u[g],h=0,d=m.length;h\u003cd;h++)p=m[h],p.children.length\u003e0?u.push(p.children):p._splitByPlane(s,a,A,c,l)}else this._splitByPlane(s,a,A,c,l)}_splitByPlane(s,a,A,c,l){const u=this.polygon;if(u){const g=n.measureBoundingSphere(u),h=g[3]+t,d=g,p=e.dot(s,d)-s[3];if(p\u003eh)c.push(this);else if(p\u003c-h)l.push(this);else{const m=o(s,u);switch(m.type){case 0:a.push(this);break;case 1:A.push(this);break;case 2:c.push(this);break;case 3:l.push(this);break;case 4:if(m.front){const _=this.addChild(m.front);c.push(_)}if(m.back){const _=this.addChild(m.back);l.push(_)}break}}}}addChild(s){const a=new i(this,s);return this.children.push(a),a}invertSub(){let s=[this];const a=[s];let A,c,l,u;for(A=0;A\u003ca.length;A++)for(s=a[A],c=0,l=s.length;c\u003cl;c++)u=s[c],u.polygon\u0026\u0026(u.polygon=n.invert(u.polygon)),u.children.length\u003e0\u0026\u0026a.push(u.children)}recursivelyInvalidatePolygon(){this.polygon=null,this.parent\u0026\u0026this.parent.recursivelyInvalidatePolygon()}clear(){let s=[this];const a=[s];for(let A=0;A\u003ca.length;++A){s=a[A];const c=s.length;for(let l=0;l\u003cc;l++){const u=s[l];u.polygon\u0026\u0026(u.polygon=null),u.parent\u0026\u0026(u.parent=null),u.children.length\u003e0\u0026\u0026a.push(u.children),u.children=[]}}}toString(){let s=\"\",a=[this];const A=[a];let c,l,u,g;for(c=0;c\u003cA.length;++c){a=A[c];const h=\" \".repeat(c);for(l=0,u=a.length;l\u003cu;l++)g=a[l],s+=`${h}PolygonTreeNode (${g.isRootNode()}): ${g.children.length}`,g.polygon?s+=`\n ${h}polygon: ${g.polygon.vertices}\n`:s+=`\n`,g.children.length\u003e0\u0026\u0026A.push(g.children)}return s}}return xUe=i,xUe}var EUe,Ytn;function bAi(){if(Ytn)return EUe;Ytn=1;const t=yAi(),e=BAi();class n{constructor(i){this.polygonTree=new e,this.rootnode=new t(null),i\u0026\u0026this.addPolygons(i)}invert(){this.polygonTree.invert(),this.rootnode.invert()}clipTo(i,r=!1){this.rootnode.clipTo(i,r)}allPolygons(){const i=[];return this.polygonTree.getPolygons(i),i}addPolygons(i){const r=new Array(i.length);for(let s=0;s\u003ci.length;s++)r[s]=this.polygonTree.addChild(i[s]);this.rootnode.addPolygonTreeNodes(r)}clear(){this.polygonTree.clear()}toString(){return\"Tree: \"+this.polygonTree.toString(\"\")}}return EUe=n,EUe}var BUe,Utn;function bUe(){return Utn||(Utn=1,BUe={Tree:bAi()}),BUe}var SUe,Ktn;function SAi(){if(Ktn)return SUe;Ktn=1;const t=Ra(),e=fUe(),{Tree:n}=bUe();return SUe=(i,r)=\u003e{if(!e(i,r))return t.create();const s=new n(t.toPolygons(i)),a=new n(t.toPolygons(r));s.invert(),a.clipTo(s),a.invert(),s.clipTo(a),a.clipTo(s),s.addPolygons(a.allPolygons()),s.invert();const A=s.allPolygons();return t.create(A)},SUe}var QUe,Vtn;function ztn(){if(Vtn)return QUe;Vtn=1;const t=la(),e=IX(),n=SAi();return QUe=(...i)=\u003e{i=t(i);let r=i.shift();return i.forEach(s=\u003e{r=n(r,s)}),r=e(r),r},QUe}var vUe,Jtn;function QAi(){if(Jtn)return vUe;Jtn=1;const t=la(),e=Ra(),n=rP(),o=uUe(),i=dUe(),r=ztn();return vUe=(...a)=\u003e{a=t(a);const A=a.map(u=\u003ei({z0:-1,z1:1},u)),c=r(A),l=n(c);return o(l,e.toPolygons(c))},vUe}var wUe,Wtn;function vAi(){if(Wtn)return wUe;Wtn=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=QAi(),r=ztn();return wUe=(...a)=\u003e{if(a=t(a),a.length===0)throw new Error(\"wrong number of arguments\");if(!e(a))throw new Error(\"only intersect of the types are supported\");const A=a[0];return n.isA(A)?i(a):o.isA(A)?r(a):A},wUe}var PUe,jtn;function MUe(){if(jtn)return PUe;jtn=1;const t=qA(),e=U$t();return PUe=o=\u003ee(o,{skipTriangulation:!0}).map(s=\u003e{const a=s.map(A=\u003eo[A]);return t.create(a)}),PUe}var DUe,$tn;function qtn(){if($tn)return DUe;$tn=1;const t=Ra(),e=fUe(),{Tree:n}=bUe(),o=(r,s)=\u003e{if(!e(r,s))return i(r,s);const a=new n(t.toPolygons(r)),A=new n(t.toPolygons(s));a.clipTo(A,!1),A.clipTo(a),A.invert(),A.clipTo(a),A.invert();const c=a.allPolygons().concat(A.allPolygons());return t.create(c)},i=(r,s)=\u003e{let a=t.toPolygons(r);return a=a.concat(t.toPolygons(s)),t.create(a)};return DUe=o,DUe}var NUe,Xtn;function RUe(){if(Xtn)return NUe;Xtn=1;const t=la(),e=IX(),n=qtn();return NUe=(...i)=\u003e{i=t(i);let r;for(r=1;r\u003ci.length;r+=2)i.push(n(i[r-1],i[r]));let s=i[r-1];return s=e(s),s},NUe}var TUe,Ztn;function enn(){if(Ztn)return TUe;Ztn=1;const t=la(),e=Ra(),n=qA(),o=MUe(),i=RUe(),r=(...u)=\u003e{if(u=t(u),u.length!==2)throw new Error(\"minkowskiSum requires exactly two geometries\");const[g,h]=u;if(!e.isA(g)||!e.isA(h))throw new Error(\"minkowskiSum requires geom3 geometries\");const d=e.isConvex(g),p=e.isConvex(h);if(d\u0026\u0026p)return c(g,h);if(!d\u0026\u0026p)return s(g,h);if(d\u0026\u0026!p)return s(h,g);throw new Error(\"minkowskiSum of two non-convex geometries is not yet supported\")},s=(u,g)=\u003e{const h=a(u);if(h.length===0)return e.create();const d=h.map(p=\u003ec(p,g));return d.length===1?d[0]:i(d)},a=u=\u003e{const g=e.toPolygons(u);if(g.length===0)return[];const h=[];for(let d=0;d\u003cg.length;d++){const p=g[d],m=p.vertices;let _=0,f=0,I=0;for(let Q=0;Q\u003cm.length;Q++)_+=m[Q][0],f+=m[Q][1],I+=m[Q][2];_/=m.length,f/=m.length,I/=m.length;const C=n.plane(p),y=C[0],x=C[1],E=C[2],B=.1,S=[_-y*B,f-x*B,I-E*B];for(let Q=1;Q\u003cm.length-1;Q++){const w=m[0],M=m[Q],k=m[Q+1],R=A(S,w,M,k);h.push(e.create(R))}}return h},A=(u,g,h,d)=\u003e[n.create([u,h,g]),n.create([u,g,d]),n.create([g,h,d]),n.create([h,u,d])],c=(u,g)=\u003e{const h=l(u),d=l(g);if(h.length===0||d.length===0)return e.create();const p=[];for(let _=0;_\u003ch.length;_++){const f=h[_];for(let I=0;I\u003cd.length;I++){const C=d[I];p.push([f[0]+C[0],f[1]+C[1],f[2]+C[2]])}}const m=o(p);return e.create(m)},l=u=\u003e{const g=new Set,h=[],d=e.toPolygons(u);for(let p=0;p\u003cd.length;p++){const m=d[p].vertices;for(let _=0;_\u003cm.length;_++){const f=m[_],I=`${f[0]},${f[1]},${f[2]}`;g.has(I)||(g.add(I),h.push(f))}}return h};return TUe=r,TUe}var kUe,tnn;function wAi(){if(tnn)return kUe;tnn=1;const t=jr(),e=rP(),n=Ra(),o=a=\u003ea.sort((A,c)=\u003eA-c).filter((A,c,l)=\u003e!c||A!==l[c-1]),i=(a,A,c)=\u003e{const l=`${A}`,u=a.get(l);u===void 0?a.set(l,[c]):u.push(c)},r=(a,A)=\u003e{const c=`${A}`;return a.get(c)};return kUe=a=\u003e{const A=e(a),c=n.toPolygons(a),l=c.length,u=new Map,g=t.create();c.forEach((_,f)=\u003e{_.vertices.forEach(I=\u003e{i(u,t.snap(g,I,A),f)})});const h=c.map(_=\u003e{let f=[];return _.vertices.forEach(I=\u003e{f=f.concat(r(u,t.snap(g,I,A)))}),{e:1,d:o(f)}});u.clear();let d=0;const p=h.length;for(let _=0;_\u003cp;_++){const f=h[_];if(f.e\u003e0){const I=new Array(l);I[_]=!0;do d=0,I.forEach((C,y)=\u003e{const x=h[y];if(x.e\u003e0){x.e=-1;for(let E=0;E\u003cx.d.length;E++)I[x.d[E]]=!0;d++}});while(d\u003e0);f.indexes=I}}const m=[];for(let _=0;_\u003cp;_++)if(h[_].indexes){const f=[];h[_].indexes.forEach((I,C)=\u003ef.push(c[C])),m.push(n.create(f))}return m},kUe}var FUe,nnn;function PAi(){if(nnn)return FUe;nnn=1;const t=la(),e=Ra(),n=wAi();return FUe=(...i)=\u003e{if(i=t(i),i.length===0)throw new Error(\"wrong number of arguments\");const r=i.map(s=\u003ee.isA(s)?n(s):s);return r.length===1?r[0]:r},FUe}var LUe,onn;function MAi(){if(onn)return LUe;onn=1;const t=Ra(),e=fUe(),{Tree:n}=bUe();return LUe=(i,r)=\u003e{if(!e(i,r))return t.clone(i);const s=new n(t.toPolygons(i)),a=new n(t.toPolygons(r));s.invert(),s.clipTo(a),a.clipTo(s,!0),s.addPolygons(a.allPolygons()),s.invert();const A=s.allPolygons();return t.create(A)},LUe}var HUe,inn;function rnn(){if(inn)return HUe;inn=1;const t=la(),e=IX(),n=MAi();return HUe=(...i)=\u003e{i=t(i);let r=i.shift();return i.forEach(s=\u003e{r=n(r,s)}),r=e(r),r},HUe}var OUe,snn;function DAi(){if(snn)return OUe;snn=1;const t=la(),e=Ra(),n=rP(),o=uUe(),i=dUe(),r=rnn();return OUe=(...a)=\u003e{a=t(a);const A=a.map(u=\u003ei({z0:-1,z1:1},u)),c=r(A),l=n(c);return o(l,e.toPolygons(c))},OUe}var GUe,ann;function NAi(){if(ann)return GUe;ann=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=DAi(),r=rnn();return GUe=(...a)=\u003e{if(a=t(a),a.length===0)throw new Error(\"wrong number of arguments\");if(!e(a))throw new Error(\"only subtract of the types are supported\");const A=a[0];return n.isA(A)?i(a):o.isA(A)?r(a):A},GUe}var YUe,Ann;function cnn(){if(Ann)return YUe;Ann=1;const t=la(),e=Ra(),n=rP(),o=uUe(),i=dUe(),r=RUe();return YUe=(...a)=\u003e{a=t(a);const A=a.map(u=\u003ei({z0:-1,z1:1},u)),c=r(A),l=n(c);return o(l,e.toPolygons(c))},YUe}var UUe,lnn;function KUe(){if(lnn)return UUe;lnn=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=cnn(),r=RUe();return UUe=(...a)=\u003e{if(a=t(a),a.length===0)throw new Error(\"wrong number of arguments\");if(!e(a))throw new Error(\"only unions of the same type are supported\");const A=a[0];return n.isA(A)?i(a):o.isA(A)?r(a):A},UUe}var VUe,unn;function RAi(){return unn||(unn=1,VUe={intersect:vAi(),minkowski:enn(),scission:PAi(),subtract:NAi(),union:KUe()}),VUe}var zUe,gnn;function Dhe(){if(gnn)return zUe;gnn=1;const{EPS:t,TAU:e}=pc(),n=_Zt(),o=IGe(),i=mA(),r=whe();return zUe=(a,A)=\u003e{const c={delta:1,corners:\"edge\",closed:!1,segments:16};let{delta:l,corners:u,closed:g,segments:h}=Object.assign({},c,a);if(Math.abs(l)\u003ct)return A;let d=a.closed?r(A):1;d===0\u0026\u0026(d=1);const p=d\u003e0\u0026\u0026l\u003e=0||d\u003c0\u0026\u0026l\u003c0;l=Math.abs(l);let m=null,_=[];const f=[],I=i.create(),C=A.length;for(let y=0;y\u003cC;y++){const x=(y+1)%C,E=A[y],B=A[x];p?i.subtract(I,E,B):i.subtract(I,B,E),i.normal(I,I),i.normalize(I,I),i.scale(I,I,l);const S=i.add(i.create(),E,I),Q=i.add(i.create(),B,I),w=[S,Q];if(m!=null\u0026\u0026(g||!g\u0026\u0026x!==0)){const M=n(m[0],m[1],w[0],w[1]);M?(_.pop(),w[0]=M):f.push({c:E,s0:m,s1:w})}m=[S,Q],!(x===0\u0026\u0026!g)\u0026\u0026(_.push(w[0]),_.push(w[1]))}if(g\u0026\u0026m!=null){const y=_[0],x=_[1],E=n(m[0],m[1],y,x);if(E)_[0]=E,_.pop();else{const B=A[0],S=[y,x];f.push({c:B,s0:m,s1:S})}}if(u===\"edge\"){const y=new Map;_.forEach((B,S)=\u003ey.set(B,S));const x=o.create(),E=o.create();f.forEach(B=\u003e{o.fromPoints(x,B.s0[0],B.s0[1]),o.fromPoints(E,B.s1[0],B.s1[1]);const S=o.intersectPointOfLines(x,E);if(Number.isFinite(S[0])\u0026\u0026Number.isFinite(S[1])){const Q=B.s0[1],w=y.get(Q);_[w]=S,_[(w+1)%_.length]=void 0}else{const Q=B.s1[0],w=y.get(Q);_[w]=void 0}}),_=_.filter(B=\u003eB!==void 0)}if(u===\"round\"){let y=Math.floor(h/4);const x=i.create();f.forEach(E=\u003e{let B=i.angle(i.subtract(x,E.s1[0],E.c));if(B-=i.angle(i.subtract(x,E.s0[1],E.c)),p\u0026\u0026B\u003c0\u0026\u0026(B=B+Math.PI,B\u003c0\u0026\u0026(B=B+Math.PI)),!p\u0026\u0026B\u003e0\u0026\u0026(B=B-Math.PI,B\u003e0\u0026\u0026(B=B-Math.PI)),B!==0){y=Math.floor(h*(Math.abs(B)/e));const S=B/y,Q=i.angle(i.subtract(x,E.s0[1],E.c)),w=[];for(let M=1;M\u003cy;M++){const k=Q+S*M,R=i.fromAngleRadians(i.create(),k);i.scale(R,R,l),i.add(R,R,E.c),w.push(R)}if(w.length\u003e0){const M=E.s0[1];let k=_.findIndex(R=\u003ei.equals(M,R));k=(k+1)%_.length,_.splice(k,0,...w)}}else{const S=E.s1[0],Q=_.findIndex(w=\u003ei.equals(S,w));_.splice(Q,1)}})}return _},zUe}var JUe,dnn;function TAi(){if(dnn)return JUe;dnn=1;const t=Ga(),e=Dhe();return JUe=(o,i)=\u003e{const r={delta:1,corners:\"edge\",segments:16},{delta:s,corners:a,segments:A}=Object.assign({},r,o);if(!(a===\"edge\"||a===\"chamfer\"||a===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');const u=t.toOutlines(i).map(g=\u003e(o={delta:s,corners:a,closed:!0,segments:A},e(o,g))).reduce((g,h)=\u003eg.concat(t.toSides(t.fromPoints(h))),[]);return t.create(u)},JUe}var WUe,hnn;function kAi(){if(hnn)return WUe;hnn=1;const t=Mu(),e=jr(),n=Ra(),o=qA();return WUe=(r,s)=\u003e{e.dot(o.plane(s),r)\u003e0\u0026\u0026(s=o.invert(s));const A=[s],c=o.transform(t.fromTranslation(t.create(),r),s),l=s.vertices.length;for(let u=0;u\u003cl;u++){const g=u\u003cl-1?u+1:0,h=o.create([s.vertices[u],c.vertices[u],c.vertices[g],s.vertices[g]]);A.push(h)}return A.push(o.invert(c)),n.create(A)},WUe}var jUe,pnn;function FAi(){if(pnn)return jUe;pnn=1;const{EPS:t,TAU:e}=pc(),n=Mu(),o=jr(),i=Stn(),r=Ra(),s=qA(),a=Den(),A=IX(),c=qtn(),l=kAi(),u=(p,m,_)=\u003e{const f=m.toString();if(p.has(f))p.get(f)[1].push(_);else{const I=[m,[_]];p.set(f,I)}},g=(p,m,_)=\u003e{const f=m[0].toString(),I=m[1].toString(),C=f\u003cI?`${f},${I}`:`${I},${f}`;if(p.has(C))p.get(C)[1].push(_);else{const y=[m,[_]];p.set(C,y)}},h=(p,m)=\u003e{p.findIndex(f=\u003ef===m)\u003c0\u0026\u0026p.push(m)};return jUe=(p,m)=\u003e{const _={delta:1,segments:12},{delta:f,segments:I}=Object.assign({},_,p);let C=r.create();const y=new Map,x=new Map,E=o.create(),B=o.create();return r.toPolygons(m).forEach((Q,w)=\u003e{const M=o.scale(o.create(),s.plane(Q),2*f),k=s.transform(n.fromTranslation(n.create(),o.scale(o.create(),M,-.5)),Q),R=l(M,k);C=c(C,R);const F=Q.vertices;for(let O=0;O\u003cF.length;O++){u(y,F[O],s.plane(Q));const U=(O+1)%F.length,Y=[F[O],F[U]];g(x,Y,s.plane(Q))}}),x.forEach(Q=\u003e{const w=Q[0],M=Q[1],k=w[0],R=w[1],F=o.subtract(o.create(),R,k);o.normalize(F,F);const O=M[0],U=o.cross(o.create(),O,F);let Y=[];for(let le=0;le\u003cI;le++)h(Y,le*e/I);for(let le=0,ge=M.length;le\u003cge;le++){const _e=M[le],ue=o.dot(U,_e),fe=o.dot(O,_e);let pe=Math.atan2(ue,fe);pe\u003c0\u0026\u0026(pe+=e),h(Y,pe),pe=Math.atan2(-ue,-fe),pe\u003c0\u0026\u0026(pe+=e),h(Y,pe)}Y=Y.sort(i);const W=Y.length;let te,j;const J=[],oe=[],ie=[];for(let le=-1;le\u003cW;le++){const ge=Y[le\u003c0?le+W:le],_e=Math.sin(ge),ue=Math.cos(ge);o.scale(E,O,ue*f),o.scale(B,U,_e*f),o.add(E,E,B);const fe=o.add(o.create(),k,E),pe=o.add(o.create(),R,E);let ye=!1;if(le\u003e=0\u0026\u0026o.distance(fe,te)\u003ct\u0026\u0026(ye=!0),!ye){if(le\u003e=0){J.push(fe),oe.push(pe);const Me=[j,pe,fe,te],ve=s.create(Me);ie.push(ve)}te=fe,j=pe}}oe.reverse(),ie.push(s.create(J)),ie.push(s.create(oe));const ne=r.create(ie);C=c(C,ne)}),y.forEach(Q=\u003e{const w=Q[0],M=Q[1],k=M[0];let R=null,F=0;for(let W=1;W\u003cM.length;W++){const te=M[W],j=o.cross(E,k,te),J=o.length(j);J\u003e.05\u0026\u0026J\u003eF\u0026\u0026(F=J,R=te)}R||(R=o.orthogonal(E,k));const O=o.cross(E,k,R);o.normalize(O,O);const U=o.cross(B,O,k),Y=a({center:[w[0],w[1],w[2]],radius:f,segments:I,axes:[k,O,U]});C=c(C,Y)}),A(C)},jUe}var $Ue,mnn;function LAi(){if(mnn)return $Ue;mnn=1;const t=Ra(),e=KUe(),n=FAi();return $Ue=(i,r)=\u003e{const s={delta:1,corners:\"round\",segments:12},{delta:a,corners:A,segments:c}=Object.assign({},s,i);if(A!==\"round\")throw new Error('corners must be \"round\" for 3D geometries');if(t.toPolygons(r).length===0)throw new Error(\"the given geometry cannot be empty\");i={delta:a,corners:A,segments:c};const u=n(i,r);return e(r,u)},$Ue}var qUe,_nn;function HAi(){if(_nn)return qUe;_nn=1;const t=whe(),e=mA(),n=Ga(),o=au(),i=Dhe(),r=A=\u003e{let{external:c,internal:l}=A;t(c)\u003c0?c=c.reverse():l=l.reverse();const u=o.fromPoints({closed:!0},c),g=o.fromPoints({closed:!0},l),h=n.toSides(n.fromPoints(o.toPoints(u))),d=n.toSides(n.fromPoints(o.toPoints(g)));return h.push(...d),n.create(h)},s=(A,c,l,u)=\u003e{const{points:g,external:h,internal:d}=A,p=Math.floor(c/2),m=[],_=[];if(l===\"round\"\u0026\u0026p\u003e0){const I=Math.PI/p,C=g[g.length-1],y=e.angle(e.subtract(e.create(),h[h.length-1],C)),x=g[0],E=e.angle(e.subtract(e.create(),d[0],x));for(let B=1;B\u003cp;B++){let S=y+I*B,Q=e.fromAngleRadians(e.create(),S);e.scale(Q,Q,u),e.add(Q,Q,C),m.push(Q),S=E+I*B,Q=e.fromAngleRadians(e.create(),S),e.scale(Q,Q,u),e.add(Q,Q,x),_.push(Q)}}const f=[];return f.push(...h,...m,...d.reverse(),..._),n.fromPoints(f)};return qUe=(A,c)=\u003e{A=Object.assign({},{delta:1,corners:\"edge\",segments:16},A);const{delta:u,corners:g,segments:h}=A;if(u\u003c=0)throw new Error(\"the given delta must be positive for paths\");if(!(g===\"edge\"||g===\"chamfer\"||g===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');const d=c.isClosed,p=o.toPoints(c);if(p.length===0)throw new Error(\"the given geometry cannot be empty\");const m={points:p,external:i({delta:u,corners:g,segments:h,closed:d},p),internal:i({delta:-u,corners:g,segments:h,closed:d},p)};return c.isClosed?r(m):s(m,h,g,u)},qUe}var XUe,fnn;function ZUe(){if(fnn)return XUe;fnn=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=TAi(),r=LAi(),s=HAi();return XUe=(A,...c)=\u003e{if(c=t(c),c.length===0)throw new Error(\"wrong number of arguments\");const l=c.map(u=\u003eo.isA(u)?s(A,u):e.isA(u)?i(A,u):n.isA(u)?r(A,u):u);return l.length===1?l[0]:l},XUe}var eKe,Inn;function OAi(){if(Inn)return eKe;Inn=1;const t=Ga(),e=zOe(),n=Dhe();return eKe=(i,r)=\u003e{const s={delta:1,corners:\"edge\",segments:0},{delta:a,corners:A,segments:c}=Object.assign({},s,i);if(!(A===\"edge\"||A===\"chamfer\"||A===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');const l=t.toOutlines(r),g=l.map(h=\u003e(i={delta:l.reduce((m,_)=\u003em+e.arePointsInside(h,e.create(_)),0)%2===0?a:-a,corners:A,closed:!0,segments:c},n(i,h))).reduce((h,d)=\u003eh.concat(t.toSides(t.fromPoints(d))),[]);return t.create(g)},eKe}var tKe,Cnn;function GAi(){if(Cnn)return tKe;Cnn=1;const t=au(),e=Dhe();return tKe=(o,i)=\u003e{const r={delta:1,corners:\"edge\",closed:i.isClosed,segments:16},{delta:s,corners:a,closed:A,segments:c}=Object.assign({},r,o);if(!(a===\"edge\"||a===\"chamfer\"||a===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');o={delta:s,corners:a,closed:A,segments:c};const l=e(o,t.toPoints(i));return t.fromPoints({closed:A},l)},tKe}var nKe,ynn;function YAi(){if(ynn)return nKe;ynn=1;const t=la(),e=Ga(),n=au(),o=OAi(),i=GAi();return nKe=(s,...a)=\u003e{if(a=t(a),a.length===0)throw new Error(\"wrong number of arguments\");const A=a.map(c=\u003en.isA(c)?i(s,c):e.isA(c)?o(s,c):c);return A.length===1?A[0]:A},nKe}var oKe,xnn;function UAi(){return xnn||(xnn=1,oKe={expand:ZUe(),offset:YAi()}),oKe}var iKe,Enn;function Nhe(){if(Enn)return iKe;Enn=1;const t=Mu(),e=jr(),n=Ga(),o=bY(),i=Mhe();return iKe=(s,a)=\u003e{const A={offset:[0,0,1],twistAngle:0,twistSteps:12,repair:!0};let{offset:c,twistAngle:l,twistSteps:u,repair:g}=Object.assign({},A,s);if(u\u003c1)throw new Error(\"twistSteps must be 1 or more\");l===0\u0026\u0026(u=1);const h=e.clone(c),d=n.toSides(a);if(d.length===0)throw new Error(\"the given geometry cannot be empty\");const p=o.fromSides(d);h[2]\u003c0\u0026\u0026o.reverse(p,p);const m=t.create(),_=(f,I,C)=\u003e{const y=I/u*l,x=e.scale(e.create(),h,I/u);return t.multiply(m,t.fromZRotation(m,y),t.fromTranslation(t.create(),x)),o.transform(m,C)};return s={numberOfSlices:u+1,capStart:!0,capEnd:!0,repair:g,callback:_},i(s,p)},iKe}var rKe,Bnn;function KAi(){if(Bnn)return rKe;Bnn=1;const t=Ga(),e=au(),n=Nhe();return rKe=(i,r)=\u003e{if(!r.isClosed)throw new Error(\"extruded path must be closed\");const s=e.toPoints(r),a=t.fromPoints(s);return n(i,a)},rKe}var sKe,bnn;function VAi(){if(bnn)return sKe;bnn=1;const t=la(),e=Ga(),n=au(),o=Nhe(),i=KAi();return sKe=(s,...a)=\u003e{const A={height:1,twistAngle:0,twistSteps:1,repair:!0},{height:c,twistAngle:l,twistSteps:u,repair:g}=Object.assign({},A,s);if(a=t(a),a.length===0)throw new Error(\"wrong number of arguments\");s={offset:[0,0,c],twistAngle:l,twistSteps:u,repair:g};const h=a.map(d=\u003en.isA(d)?i(s,d):e.isA(d)?o(s,d):d);return h.length===1?h[0]:h},sKe}var aKe,Snn;function zAi(){if(Snn)return aKe;Snn=1;const t=au(),e=ZUe(),n=Nhe();return aKe=(i,r)=\u003e{const s={size:1,height:1},{size:a,height:A}=Object.assign({},s,i);if(i.delta=a,i.offset=[0,0,A],t.toPoints(r).length===0)throw new Error(\"the given geometry cannot be empty\");const l=e(i,r);return n(i,l)},aKe}var AKe,Qnn;function JAi(){if(Qnn)return AKe;Qnn=1;const{area:t}=hX(),e=Ga(),n=au(),o=ZUe(),i=Nhe();return AKe=(s,a)=\u003e{const A={size:1,height:1},{size:c,height:l}=Object.assign({},A,s);s.delta=c,s.offset=[0,0,l];const u=e.toOutlines(a);if(u.length===0)throw new Error(\"the given geometry cannot be empty\");const h=u.map(p=\u003e(t(p)\u003c0\u0026\u0026p.reverse(),o(s,n.fromPoints({closed:!0},p)))).reduce((p,m)=\u003ep.concat(e.toSides(m)),[]),d=e.create(h);return i(s,d)},AKe}var cKe,vnn;function WAi(){if(vnn)return cKe;vnn=1;const t=la(),e=Ga(),n=au(),o=zAi(),i=JAi();return cKe=(s,...a)=\u003e{const A={size:1,height:1},{size:c,height:l}=Object.assign({},A,s);if(a=t(a),a.length===0)throw new Error(\"wrong number of arguments\");if(c\u003c=0)throw new Error(\"size must be positive\");if(l\u003c=0)throw new Error(\"height must be positive\");const u=a.map(g=\u003en.isA(g)?o(s,g):e.isA(g)?i(s,g):g);return u.length===1?u[0]:u},cKe}var lKe,wnn;function jAi(){if(wnn)return lKe;wnn=1;const{TAU:t}=pc(),e=Mu(),n=Ga(),o=Mhe(),i=bY();return lKe=(s,a)=\u003e{const A={angle:t,startAngle:0,pitch:10,height:0,endOffset:0,segmentsPerRotation:32};let{angle:c,startAngle:l,pitch:u,height:g,endOffset:h,segmentsPerRotation:d}=Object.assign({},A,s);if(g!=0\u0026\u0026(u=g/(c/t)),d\u003c3)throw new Error(\"The number of segments per rotation needs to be at least 3.\");const m=n.toSides(a);if(m.length===0)throw new Error(\"The given geometry cannot be empty\");const _=m.filter(B=\u003eB[0][0]\u003e=0);let f=i.fromSides(m);_.length===0\u0026\u0026(f=i.reverse(f));const I=Math.round(d/t*Math.abs(c)),C=I\u003e=2?I:2,y=e.create(),x=e.create(),E=(B,S,Q)=\u003e{const w=l+c/C*S,M=h/C*S,k=(w-l)/t*u;return e.multiply(y,e.fromTranslation(e.create(),[M,0,k*Math.sign(c)]),e.fromXRotation(e.create(),-t/4*Math.sign(c))),e.multiply(x,e.fromZRotation(e.create(),w),y),i.transform(x,Q)};return o({numberOfSlices:C+1,callback:E},f)},lKe}var uKe,Pnn;function $Ai(){if(Pnn)return uKe;Pnn=1;const t=la(),e=AGe(),n=E6(),o=Mu(),i=Ga(),r=Ra(),s=qA(),a=rP(),A=cnn(),c=(u,g)=\u003e{const h=n.fromNormalAndPoint(n.create(),u.axis,u.origin);if(Number.isNaN(h[0])||Number.isNaN(h[1])||Number.isNaN(h[2])||Number.isNaN(h[3]))throw new Error(\"project: invalid axis or origin\");const d=a(g),p=d*d*Math.sqrt(3)/4;if(d===0)return i.create();const m=r.toPolygons(g);let _=[];for(let I=0;I\u003cm.length;I++){const C=m[I].vertices.map(E=\u003en.projectionOfPoint(h,E)),y=s.create(C),x=s.plane(y);e(h,x)\u0026\u0026(s.measureArea(y)\u003cp||_.push(y))}if(!e(h,[0,0,1])){const I=o.fromVectorRotation(o.create(),h,[0,0,1]);_=_.map(C=\u003es.transform(I,C))}_=_.sort((I,C)=\u003es.measureArea(C)-s.measureArea(I));const f=_.map(I=\u003ei.fromPoints(I.vertices));return A(f)};return uKe=(u,...g)=\u003e{const h={axis:[0,0,1],origin:[0,0,0]},{axis:d,origin:p}=Object.assign({},h,u);if(g=t(g),g.length===0)throw new Error(\"wrong number of arguments\");u={axis:d,origin:p};const m=g.map(_=\u003er.isA(_)?c(u,_):_);return m.length===1?m[0]:m},uKe}var gKe,Mnn;function qAi(){return Mnn||(Mnn=1,gKe={extrudeFromSlices:Mhe(),extrudeLinear:VAi(),extrudeRectangular:WAi(),extrudeRotate:ltn(),extrudeHelical:jAi(),project:$Ai(),slice:bY()}),gKe}var dKe,Dnn;function hKe(){if(Dnn)return dKe;Dnn=1;const t=mA(),e=i=\u003e{let r=t.fromValues(1/0,1/0);i.forEach(A=\u003e{(A[1]\u003cr[1]||A[1]===r[1]\u0026\u0026A[0]\u003cr[0])\u0026\u0026(r=A)});const s=[];i.forEach(A=\u003e{const c=o(A[1]-r[1],A[0]-r[0]),l=t.squaredDistance(A,r);s.push({point:A,angle:c,distSq:l})}),s.sort((A,c)=\u003eA.angle!==c.angle?A.angle-c.angle:A.distSq-c.distSq);const a=[];return s.forEach(A=\u003e{let c=a.length;for(;c\u003e1\u0026\u0026n(a[c-2],a[c-1],A.point)\u003c=Number.EPSILON;)a.pop(),c=a.length;a.push(A.point)}),a},n=(i,r,s)=\u003e(r[0]-i[0])*(s[1]-i[1])-(r[1]-i[1])*(s[0]-i[0]),o=(i,r)=\u003ei===0\u0026\u0026r===0?-1/0:-r/i;return dKe=e,dKe}var pKe,Nnn;function mKe(){if(Nnn)return pKe;Nnn=1;const t=Ga(),e=Ra(),n=au();return pKe=i=\u003e{const r=new Set,s=[],a=A=\u003e{const c=A.toString();r.has(c)||(s.push(A),r.add(c))};return i.forEach(A=\u003e{t.isA(A)?t.toPoints(A).forEach(a):e.isA(A)?e.toPoints(A).forEach(c=\u003ec.forEach(a)):n.isA(A)\u0026\u0026n.toPoints(A).forEach(a)}),s},pKe}var _Ke,Rnn;function XAi(){if(Rnn)return _Ke;Rnn=1;const t=la(),e=au(),n=hKe(),o=mKe();return _Ke=(...r)=\u003e{r=t(r);const s=o(r),a=n(s);return e.fromPoints({closed:!0},a)},_Ke}var fKe,Tnn;function ZAi(){if(Tnn)return fKe;Tnn=1;const t=la(),e=Ga(),n=hKe(),o=mKe();return fKe=(...r)=\u003e{r=t(r);const s=o(r),a=n(s);return a.length\u003c3?e.create():e.fromPoints(a)},fKe}var IKe,knn;function eci(){if(knn)return IKe;knn=1;const t=la(),e=Ra(),n=mKe(),o=MUe();return IKe=(...r)=\u003e{r=t(r);const s=n(r);return s.length===0?e.create():e.create(o(s))},IKe}var CKe,Fnn;function Lnn(){if(Fnn)return CKe;Fnn=1;const t=la(),e=fX(),n=Ga(),o=Ra(),i=au(),r=XAi(),s=ZAi(),a=eci();return CKe=(...c)=\u003e{if(c=t(c),c.length===0)throw new Error(\"wrong number of arguments\");if(!e(c))throw new Error(\"only hulls of the same type are supported\");const l=c[0];return i.isA(l)?r(c):n.isA(l)?s(c):o.isA(l)?a(c):l},CKe}var yKe,Hnn;function tci(){if(Hnn)return yKe;Hnn=1;const t=la(),e=KUe(),n=Lnn();return yKe=(...i)=\u003e{if(i=t(i),i.length\u003c2)throw new Error(\"wrong number of arguments\");const r=[];for(let s=1;s\u003ci.length;s++)r.push(n(i[s-1],i[s]));return e(r)},yKe}var xKe,Onn;function nci(){return Onn||(Onn=1,xKe={hull:Lnn(),hullChain:tci(),hullPoints2:hKe(),hullPoints3:MUe()}),xKe}var EKe,Gnn;function oci(){return Gnn||(Gnn=1,EKe={minkowskiSum:enn()}),EKe}var BKe,Ynn;function Unn(){if(Ynn)return BKe;Ynn=1;const t=jr(),e=qA(),n=(i,r)=\u003e{const s=Math.abs(e.measureArea(r));return Number.isFinite(s)\u0026\u0026s\u003ei};return BKe=(i,r)=\u003e{let s=r.map(A=\u003e{const c=A.vertices.map(g=\u003et.snap(t.create(),g,i)),l=[];for(let g=0;g\u003cc.length;g++){const h=(g+1)%c.length;t.equals(c[g],c[h])||l.push(c[g])}const u=e.create(l);return A.color\u0026\u0026(u.color=A.color),u});const a=i*i*Math.sqrt(3)/4;return s=s.filter(A=\u003en(a,A)),s},BKe}var bKe,Knn;function ici(){if(Knn)return bKe;Knn=1;const t=AGe(),e=jr(),n=qA(),o=p=\u003e{const m=n.toPoints(p),_=[];for(let f=0;f\u003cm.length;f++){const I=(f+1)%m.length,C={v1:m[f],v2:m[I]};_.push(C)}for(let f=0;f\u003c_.length;f++){const I=(f+1)%m.length;_[f].next=_[I],_[I].prev=_[f]}return _},i=(p,m)=\u003e{const _=`${m.v1}:${m.v2}`;p.set(_,m)},r=(p,m)=\u003e{const _=`${m.v1}:${m.v2}`;p.delete(_)},s=(p,m)=\u003e{const _=`${m.v2}:${m.v1}`;return p.get(_)},a=(p,m,_)=\u003e{let f=p.prev.v1,I=p.prev.v2,C=m.next.v2;const y=l(f,I,C,_);f=m.prev.v1,I=m.prev.v2,C=p.next.v2;const x=l(f,I,C,_);return[y,x]},A=e.create(),c=e.create(),l=(p,m,_,f)=\u003e{const I=e.subtract(A,m,p),C=e.subtract(c,_,m);return e.cross(I,I,C),e.dot(I,f)},u=p=\u003e{let m;const _=[];for(;p.next;){const f=p.next;_.push(p.v1),p.v1=null,p.v2=null,p.next=null,p.prev=null,p=f}return _.length\u003e0\u0026\u0026(m=n.create(_)),m},g=p=\u003e{if(p.length\u003c2)return p;const m=p[0].plane,_=p.slice(),f=new Map;for(;_.length\u003e0;){const C=_.shift(),y=o(C);for(let x=0;x\u003cy.length;x++){const E=y[x],B=s(f,E);if(B){const S=a(E,B,m);if(S[0]\u003e=0\u0026\u0026S[1]\u003e=0){const Q=B.next,w=E.next;E.prev.next=B.next,E.next.prev=B.prev,B.prev.next=E.next,B.next.prev=E.prev,E.v1=null,E.v2=null,E.next=null,E.prev=null,r(f,B),B.v1=null,B.v2=null,B.next=null,B.prev=null;const M=(k,R,F)=\u003e{const O={v1:F.v1,v2:R.v2,next:R.next,prev:F.prev};F.prev.next=O,R.next.prev=O,r(k,R),R.v1=null,R.v2=null,R.next=null,R.prev=null,r(k,F),F.v1=null,F.v2=null,F.next=null,F.prev=null};S[0]===0\u0026\u0026M(f,Q,Q.prev),S[1]===0\u0026\u0026M(f,w,w.prev)}}else E.next\u0026\u0026i(f,E)}}const I=[];return f.forEach(C=\u003e{const y=u(C);y\u0026\u0026I.push(y)}),f.clear(),I},h=(p,m)=\u003eMath.abs(p[3]-m[3])\u003c15e-8?t(p,m):!1;return bKe=(p,m)=\u003e{const _=[];m.forEach(I=\u003e{const C=_.find(y=\u003eh(y[0],n.plane(I)));C?C[1].push(I):_.push([n.plane(I),[I]])});let f=[];return _.forEach(I=\u003e{const C=I[1],y=g(C);f=f.concat(y)}),f},bKe}var SKe,Vnn;function rci(){if(Vnn)return SKe;Vnn=1;const t=pc(),e=jr(),n=qA(),o=a=\u003e`${a}`,i=(a,A,c,l,u,g)=\u003e{const h=o(l),d=o(u),p=`${h}/${d}`,m=`${d}/${h}`;if(a.has(m))return r(a,A,c,u,l,null),null;const _={vertex0:l,vertex1:u,polygonindex:g};return a.has(p)?a.get(p).push(_):a.set(p,[_]),A.has(h)?A.get(h).push(p):A.set(h,[p]),c.has(d)?c.get(d).push(p):c.set(d,[p]),p},r=(a,A,c,l,u,g)=\u003e{const h=o(l),d=o(u),p=`${h}/${d}`;let m=-1;const _=a.get(p);for(let f=0;f\u003c_.length;f++){const I=_[f];let C=o(I.vertex0);if(C===h\u0026\u0026(C=o(I.vertex1),C===d\u0026\u0026!(g!==null\u0026\u0026I.polygonindex!==g))){m=f;break}}_.splice(m,1),_.length===0\u0026\u0026a.delete(p),m=A.get(h).indexOf(p),A.get(h).splice(m,1),A.get(h).length===0\u0026\u0026A.delete(h),m=c.get(d).indexOf(p),c.get(d).splice(m,1),c.get(d).length===0\u0026\u0026c.delete(d)};return SKe=a=\u003e{const A=new Map;for(let c=0;c\u003ca.length;c++){const l=a[c],u=l.vertices.length;if(u\u003e=3){let g=l.vertices[0],h=o(g);for(let d=0;d\u003cu;d++){let p=d+1;p===u\u0026\u0026(p=0);const m=l.vertices[p],_=o(m),f=`${h}/${_}`,I=`${_}/${h}`;if(A.has(I)){const C=A.get(I);C.splice(-1,1),C.length===0\u0026\u0026A.delete(I)}else{const C={vertex0:g,vertex1:m,polygonindex:c};A.has(f)?A.get(f).push(C):A.set(f,[C])}g=m,h=_}}else console.warn(\"warning: invalid polygon found during insertTjunctions\")}if(A.size\u003e0){const c=new Map,l=new Map,u=new Map;for(const[h,d]of A)u.set(h,!0),d.forEach(p=\u003e{const m=o(p.vertex0),_=o(p.vertex1);c.has(m)?c.get(m).push(h):c.set(m,[h]),l.has(_)?l.get(_).push(h):l.set(_,[h])});const g=a.slice(0);for(;A.size!==0;){for(const d of A.keys())u.set(d,!0);let h=!1;for(;;){const d=Array.from(u.keys());if(d.length===0)break;const p=d[0];let m=!0;if(A.has(p)){const f=A.get(p)[0];for(let I=0;I\u003c2;I++){const C=I===0?f.vertex0:f.vertex1,y=I===0?f.vertex1:f.vertex0,x=o(C),E=o(y);let B=[];I===0?l.has(x)\u0026\u0026(B=l.get(x)):c.has(x)\u0026\u0026(B=c.get(x));for(let S=0;S\u003cB.length;S++){const Q=B[S],w=A.get(Q)[0],M=I===0?w.vertex0:w.vertex1;if(I===0?w.vertex1:w.vertex0,o(M)===E){r(A,c,l,C,y,null),r(A,c,l,y,C,null),m=!1,I=2,h=!0;break}else{const R=C,F=y,O=M,U=e.subtract(e.create(),O,R),Y=e.dot(e.subtract(e.create(),F,R),U)/e.dot(U,U);if(Y\u003e0\u0026\u0026Y\u003c1){const W=e.scale(e.create(),U,Y);if(e.add(W,W,R),e.squaredDistance(W,F)\u003ct.EPS*t.EPS){const j=w.polygonindex,J=g[j],oe=o(w.vertex1);let ie=-1;for(let ue=0;ue\u003cJ.vertices.length;ue++)if(o(J.vertices[ue])===oe){ie=ue;break}const ne=J.vertices.slice(0);ne.splice(ie,0,y);const le=n.create(ne);g[j]=le,r(A,c,l,w.vertex0,w.vertex1,j);const ge=i(A,c,l,w.vertex0,y,j),_e=i(A,c,l,y,w.vertex1,j);ge!==null\u0026\u0026u.set(ge,!0),_e!==null\u0026\u0026u.set(_e,!0),m=!1,I=2,h=!0;break}}}}}}m\u0026\u0026u.delete(p)}if(!h)break}a=g}return A.clear(),a},SKe}var QKe,znn;function sci(){if(znn)return QKe;znn=1;const t=jr(),e=qA(),n=(i,r,s)=\u003e{const a=r.vertices.length;if(a\u003e3){if(a\u003e4){const l=[0,0,0];r.vertices.forEach(u=\u003et.add(l,l,u)),t.snap(l,t.divide(l,l,[a,a,a]),i);for(let u=0;u\u003ca;u++){const g=e.create([l,r.vertices[u],r.vertices[(u+1)%a]]);r.color\u0026\u0026(g.color=r.color),s.push(g)}return}const A=e.create([r.vertices[0],r.vertices[1],r.vertices[2]]),c=e.create([r.vertices[0],r.vertices[2],r.vertices[3]]);r.color\u0026\u0026(A.color=r.color,c.color=r.color),s.push(A,c);return}s.push(r)};return QKe=(i,r)=\u003e{const s=[];return r.forEach(a=\u003e{n(i,a,s)}),s},QKe}var vKe,Jnn;function aci(){if(Jnn)return vKe;Jnn=1;const t=la(),e=rP(),n=Ga(),o=Ra(),i=au(),r=Unn(),s=ici(),a=rci(),A=sci(),c=(h,d)=\u003ed,l=(h,d)=\u003ed,u=(h,d)=\u003e{const p={snap:!1,simplify:!1,triangulate:!1},{snap:m,simplify:_,triangulate:f}=Object.assign({},p,h),I=e(d);let C=o.toPolygons(d);m\u0026\u0026(C=r(I,C)),_\u0026\u0026(C=s(I,C)),f\u0026\u0026(C=a(C),C=A(I,C));const y=Object.assign({},d);return y.polygons=C,y};return vKe=(h,...d)=\u003e{if(d=t(d),d.length===0)throw new Error(\"wrong number of arguments\");const p=d.map(m=\u003e{if(i.isA(m))return c(h,m);if(n.isA(m))return l(h,m);if(o.isA(m))return u(h,m);throw new Error(\"invalid geometry\")});return p.length===1?p[0]:p},vKe}var wKe,Wnn;function Aci(){if(Wnn)return wKe;Wnn=1;const t=la(),e=mA(),n=Ga(),o=Ra(),i=au(),r=rP(),s=Unn(),a=u=\u003e{const g=r(u),d=i.toPoints(u).map(p=\u003ee.snap(e.create(),p,g));return i.create(d)},A=u=\u003e{const g=r(u);let d=n.toSides(u).map(p=\u003e[e.snap(e.create(),p[0],g),e.snap(e.create(),p[1],g)]);return d=d.filter(p=\u003e!e.equals(p[0],p[1])),n.create(d)},c=u=\u003e{const g=r(u),h=o.toPolygons(u),d=s(g,h);return o.create(d)};return wKe=(...u)=\u003e{if(u=t(u),u.length===0)throw new Error(\"wrong number of arguments\");const g=u.map(h=\u003ei.isA(h)?a(h):n.isA(h)?A(h):o.isA(h)?c(h):h);return g.length===1?g[0]:g},wKe}var PKe,jnn;function cci(){return jnn||(jnn=1,PKe={generalize:aci(),snap:Aci(),retessellate:IX()}),PKe}var MKe,$nn;function lci(){return $nn||($nn=1,MKe=(e,n,o)=\u003e{for(e=e.slice();e.length\u003co;)e.push(n);return e}),MKe}var DKe,qnn;function uci(){if(qnn)return DKe;qnn=1;const t=la(),e=lci(),n=GGe(),{translate:o}=nT(),i=A=\u003e{if(!Array.isArray(A.modes)||A.modes.length\u003e3)throw new Error(\"align(): modes must be an array of length \u003c= 3\");if(A.modes=e(A.modes,\"none\",3),A.modes.filter(c=\u003e[\"center\",\"max\",\"min\",\"none\"].includes(c)).length!==3)throw new Error('align(): all modes must be one of \"center\", \"max\" or \"min\"');if(!Array.isArray(A.relativeTo)||A.relativeTo.length\u003e3)throw new Error(\"align(): relativeTo must be an array of length \u003c= 3\");if(A.relativeTo=e(A.relativeTo,0,3),A.relativeTo.filter(c=\u003eNumber.isFinite(c)||c==null).length!==3)throw new Error(\"align(): all relativeTo values must be a number, or null.\");if(typeof A.grouped!=\"boolean\")throw new Error(\"align(): grouped must be a boolean value.\");return A},r=(A,c,l)=\u003e{for(let u=0;u\u003c3;u++)A[u]==null\u0026\u0026(c[u]===\"center\"?A[u]=(l[0][u]+l[1][u])/2:c[u]===\"max\"?A[u]=l[1][u]:c[u]===\"min\"\u0026\u0026(A[u]=l[0][u]));return A},s=(A,c,l)=\u003e{const u=n(A),g=[0,0,0];for(let h=0;h\u003c3;h++)c[h]===\"center\"?g[h]=l[h]-(u[0][h]+u[1][h])/2:c[h]===\"max\"?g[h]=l[h]-u[1][h]:c[h]===\"min\"\u0026\u0026(g[h]=l[h]-u[0][h]);return o(g,A)};return DKe=(A,...c)=\u003e{A=Object.assign({},{modes:[\"center\",\"center\",\"min\"],relativeTo:[0,0,0],grouped:!1},A),A=i(A);let{modes:u,relativeTo:g,grouped:h}=A;if(c=t(c),c.length===0)throw new Error(\"align(): No geometries were provided to act upon\");if(g.filter(d=\u003ed==null).length){const d=n(c);g=r(g,u,d)}return h?c=s(c,u,g):c=c.map(d=\u003es(d,u,g)),c.length===1?c[0]:c},DKe}var NKe,Xnn;function Rhe(){if(Xnn)return NKe;Xnn=1;const t=la(),e=Ga(),n=Ra(),o=au(),i=eT(),{translate:r}=nT(),s=(u,g)=\u003e{const h={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:d,relativeTo:p}=Object.assign({},h,u),m=i(g),_=[0,0,0];return d[0]\u0026\u0026(_[0]=p[0]-(m[0][0]+(m[1][0]-m[0][0])/2)),d[1]\u0026\u0026(_[1]=p[1]-(m[0][1]+(m[1][1]-m[0][1])/2)),d[2]\u0026\u0026(_[2]=p[2]-(m[0][2]+(m[1][2]-m[0][2])/2)),r(_,g)},a=(u,...g)=\u003e{const h={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:d,relativeTo:p}=Object.assign({},h,u);if(g=t(g),g.length===0)throw new Error(\"wrong number of arguments\");if(p.length!==3)throw new Error(\"relativeTo must be an array of length 3\");u={axes:d,relativeTo:p};const m=g.map(_=\u003eo.isA(_)||e.isA(_)||n.isA(_)?s(u,_):_);return m.length===1?m[0]:m};return NKe={center:a,centerX:(...u)=\u003ea({axes:[!0,!1,!1]},u),centerY:(...u)=\u003ea({axes:[!1,!0,!1]},u),centerZ:(...u)=\u003ea({axes:[!1,!1,!0]},u)},NKe}var RKe,Znn;function The(){if(Znn)return RKe;Znn=1;const t=la(),e=Mu(),n=Ga(),o=Ra(),i=au(),r=(c,...l)=\u003e{if(!Array.isArray(c))throw new Error(\"factors must be an array\");if(l=t(l),l.length===0)throw new Error(\"wrong number of arguments\");for(c=c.slice();c.length\u003c3;)c.push(1);if(c[0]\u003c=0||c[1]\u003c=0||c[2]\u003c=0)throw new Error(\"factors must be positive\");const u=e.fromScaling(e.create(),c),g=l.map(h=\u003ei.isA(h)?i.transform(u,h):n.isA(h)?n.transform(u,h):o.isA(h)?o.transform(u,h):h);return g.length===1?g[0]:g};return RKe={scale:r,scaleX:(c,...l)=\u003er([c,1,1],l),scaleY:(c,...l)=\u003er([1,c,1],l),scaleZ:(c,...l)=\u003er([1,1,c],l)},RKe}var TKe,eon;function gci(){if(eon)return TKe;eon=1;const t=la(),e=Ga(),n=Ra(),o=au();return TKe=(r,...s)=\u003e{if(s=t(s),s.length===0)throw new Error(\"wrong number of arguments\");const a=s.map(A=\u003eo.isA(A)?o.transform(r,A):e.isA(A)?e.transform(r,A):n.isA(A)?n.transform(r,A):A);return a.length===1?a[0]:a},TKe}var kKe,ton;function dci(){return ton||(ton=1,kKe={align:uci(),center:Rhe().center,centerX:Rhe().centerX,centerY:Rhe().centerY,centerZ:Rhe().centerZ,mirror:mX().mirror,mirrorX:mX().mirrorX,mirrorY:mX().mirrorY,mirrorZ:mX().mirrorZ,rotate:_X().rotate,rotateX:_X().rotateX,rotateY:_X().rotateY,rotateZ:_X().rotateZ,scale:The().scale,scaleX:The().scaleX,scaleY:The().scaleY,scaleZ:The().scaleZ,transform:gci(),translate:nT().translate,translateX:nT().translateX,translateY:nT().translateY,translateZ:nT().translateZ}),kKe}var FKe,non;function LKe(){return non||(non=1,FKe={colors:$si(),curves:nai(),geometries:WOe(),maths:Qai(),measurements:Tai(),primitives:uAi(),text:hAi(),utils:Mtn(),booleans:RAi(),expansions:UAi(),extrusions:qAi(),hulls:nci(),minkowski:oci(),modifiers:cci(),transforms:dci()}),FKe}var HKe,oon;function hci(){if(oon)return HKe;oon=1;const t=e=\u003ee.reduce((n,o)=\u003eArray.isArray(o)?n.concat(t(o)):n.concat(o),[]);return HKe=t,HKe}var OKe,ion;function pci(){return ion||(ion=1,OKe=(e,n)=\u003ee-n),OKe}var GKe,ron;function mci(){return ron||(ron=1,GKe=e=\u003e{if(!(!Array.isArray(e)||e.length===0))return e[0]}),GKe}var YKe,son;function _ci(){return son||(son=1,YKe=(e,n,o)=\u003e{let i=0,r=e.length;for(;r\u003ei;){const s=Math.floor((i+r)/2),a=e[s];o(n,a)\u003e0?i=s+1:r=s}return e.splice(i,0,n),e}),YKe}var UKe,aon;function fci(){return aon||(aon=1,UKe=(e,n)=\u003e{if(!(!Array.isArray(e)||e.length\u003cn))return e[n]}),UKe}var KKe,Aon;function Ici(){return Aon||(Aon=1,KKe=(e,n,o)=\u003e{for(e=e.slice();e.length\u003co;)e.push(n);return e}),KKe}var VKe,con;function Cci(){return con||(con=1,VKe=e=\u003eArray.isArray(e)?e:e==null?[]:[e]),VKe}var zKe,lon;function yci(){return lon||(lon=1,zKe={flatten:hci(),fnNumberSort:pci(),head:mci(),insertSorted:_ci(),nth:fci(),padToLength:Ici(),toArray:Cci()}),zKe}var JKe,uon;function xci(){if(uon)return JKe;uon=1;const{geometries:t}=LKe();return JKe={serializeBinary:(n,o)=\u003e{o.statusCallback\u0026\u0026o.statusCallback({progress:0});const i=new ArrayBuffer(4),r=new Int32Array(i,0,1),s=new Int8Array(i,0,4);if(r[0]=287454020,s[0]!==68)throw new Error(\"Binary STL output is currently only supported on little-endian (Intel) processors\");let a=0,A=0;n.forEach((f,I)=\u003e{t.geom3.toPolygons(f).forEach(y=\u003e{const x=y.vertices.length,E=x\u003e=3?x-2:0;a+=E,A+=1})});const c=new Uint8Array(80);for(let f=0;f\u003c80;f++)c[f]=65;const l=new Uint32Array(1);l[0]=a;const u=new ArrayBuffer(50*a),g=new Int8Array(u),h=new ArrayBuffer(50),d=new Int8Array(h),p=new Float32Array(h,0,12),m=new Uint16Array(h,48,1);let _=0;return n.forEach(f=\u003e{t.geom3.toPolygons(f).forEach((C,y)=\u003e{const x=C.vertices,E=x.length,B=t.poly3.plane(C);for(let S=0;S\u003cE-2;S++){p[0]=B[0],p[1]=B[1],p[2]=B[2];let Q=3;for(let w=0;w\u003c3;w++){const M=w+(w\u003e0?S:0),k=x[M];p[Q++]=k[0],p[Q++]=k[1],p[Q++]=k[2]}m[0]=0,g.set(d,_),_+=50}o.statusCallback\u0026\u0026o.statusCallback({progress:100*y/A})})}),o.statusCallback\u0026\u0026o.statusCallback({progress:100}),[c.buffer,l.buffer,u]}},JKe}var WKe,gon;function Eci(){if(gon)return WKe;gon=1;const{geometries:t}=LKe(),e=(a,A)=\u003e{A.statusCallback\u0026\u0026A.statusCallback({progress:0});const c=`solid JSCAD\n${n(a,A)}\nendsolid JSCAD\n`;return A.statusCallback\u0026\u0026A.statusCallback({progress:100}),[c]},n=(a,A)=\u003e{const c=[];return a.forEach((l,u)=\u003e{c.push(o(l)),A.statusCallback\u0026\u0026A.statusCallback({progress:100*u/a.length})}),c.join(`\n`)},o=(a,A)=\u003e{const c=[];return t.geom3.toPolygons(a).forEach((u,g)=\u003e{c.push(s(u))}),c.join(`\n`)},i=a=\u003e`${a[0]} ${a[1]} ${a[2]}`,r=a=\u003e`vertex ${i(a)}`,s=a=\u003e{const A=[];if(a.vertices.length\u003e=3){const c=r(a.vertices[0]);for(let l=0;l\u003ca.vertices.length-2;l++){const u=`facet normal ${i(t.poly3.plane(a))}\nouter loop\n${c}\n${r(a.vertices[l+1])}\n${r(a.vertices[l+2])}\nendloop\nendfacet`;A.push(u)}}return A.join(`\n`)};return WKe={serializeText:e},WKe}var jKe,don;function Bci(){if(don)return jKe;don=1;const{geometries:t,modifiers:e}=LKe(),{flatten:n,toArray:o}=yci(),{serializeBinary:i}=xci(),{serializeText:r}=Eci();return jKe={mimeType:\"application/sla\",serialize:(A,...c)=\u003e{A=Object.assign({},{binary:!0,statusCallback:null},A),c=n(c);let u=c.filter(g=\u003et.geom3.isA(g));if(u.length===0)throw new Error(\"only 3D geometries can be serialized to STL\");return c.length!==u.length\u0026\u0026console.warn(\"some objects could not be serialized to STL\"),u=o(e.generalize({snap:!0,triangulate:!0},u)),A.binary?i(u,A):r(u,A)}},jKe}var bci=Bci();const Sci=_y(bci);var Qci={0:[[{x:.019944796633211075,y:.35828068632415006},{x:.020222641007547733,y:.3550960892473839},{x:.020327535068617307,y:.3519011161217302},{x:.02060526835904108,y:.3507104904820116},{x:.02071153113201321,y:.34949252766745387},{x:.047065531132013214,y:.20882352766745393},{x:.047989939967683706,y:.20564918300405605},{x:.04875673163473768,y:.20243312543665407},{x:.04922094308839032,y:.20142201853303832},{x:.04953201774467938,y:.20035381349539033},{x:.05105794824635218,y:.1974208061920286},{x:.05243742793298141,y:.1944161379022362},{x:.1205174279329814,y:.07784313790223615},{x:.1216536619223176,y:.07627409360623287},{x:.12261018498510404,y:.07458945972562232},{x:.1242345189777056,y:.07271014544101197},{x:.12569143736362237,y:.07069826276137084},{x:.12711194429242206,y:.06938103546641537},{x:.12837874379901673,y:.06791537974577894},{x:.130338502698373,y:.06638906779986004},{x:.132159925645859,y:.06470007355882942},{x:.13381011622947792,y:.06368528357115737},{x:.13533850978527173,y:.062494930337889824},{x:.2330665097852717,y:.000743930337889824},{x:.2364974226485404,y:-.000978818921256936},{x:.23988324554357096,y:-.0027885789630079164},{x:.24043487144166406,y:-.0029559128497863825},{x:.24095002304009888,y:-.0032145836671228292},{x:.2446511035824589,y:-.0042348928870151745},{x:.24832493550927423,y:-.005349337618145378},{x:.24889860729226898,y:-.005405839357118937},{x:.2494543245702404,y:-.005559038796006631},{x:.2532833423420387,y:-.0058376980655201055},{x:.257104,y:-.006214000000000011},{x:.344948,y:-.006214000000000011},{x:.34876845169289644,y:-.005837718351308385},{x:.352597265623821,y:-.005559109487024962},{x:.35315318526669126,y:-.00540585978827806},{x:.3537270644907258,y:-.005349337618145378},{x:.3574006983675983,y:-.004234952964808514},{x:.36110158881940224,y:-.0032147329490055873},{x:.36161692908913895,y:-.0029559733581057666},{x:.36216875445642904,y:-.0027885789630079164},{x:.36555439482758706,y:-.000978916482299381},{x:.3689851386556908,y:.0007437082019616584},{x:.4667151386556908,y:.06249470820196166},{x:.46824382031514195,y:.0636852631221029},{x:.4698943035897058,y:.06470024765114774},{x:.4717154585013725,y:.06638901501054441},{x:.47367495473362387,y:.0679150932923645},{x:.4749419974608878,y:.0693810030307532},{x:.47636275350351887,y:.0706984782301942},{x:.4778194532662604,y:.07271008609647399},{x:.47944357522443626,y:.07458911996296573},{x:.4804002872780698,y:.07627405043044727},{x:.48153671723081914,y:.07784338646721853},{x:.5496157172308191,y:.19441638646721857},{x:.5509951179002539,y:.19742093333312605},{x:.5525209822553206,y:.20035381349539033},{x:.5528320971760705,y:.20142215679791795},{x:.5532963622471587,y:.2024333975455826},{x:.5540631001039363,y:.20564932060673602},{x:.5549874688679868,y:.20882352766745393},{x:.5813414688679868,y:.34949252766745387},{x:.5814477200321959,y:.3507103574246747},{x:.581725430046729,y:.351900851345405},{x:.5818303474337426,y:.35509595676374855},{x:.5821082033667889,y:.35828068632415006},{x:.5819748261451739,y:.3594958443979094},{x:.5820149461972951,y:.36071764184793353},{x:.5710349461972951,y:.5284976418479336},{x:.5705756858728281,y:.5312810757499365},{x:.5703149436633981,y:.5340900680661724},{x:.5698592272920282,y:.5356233082419208},{x:.5695988288779222,y:.5372015019922555},{x:.5686053720955593,y:.5398418557477263},{x:.5678016327590553,y:.5425460057826548},{x:.5216826327590552,y:.6556800057826547},{x:.5211943471023096,y:.656605995281004},{x:.5208498728309648,y:.6575945381025444},{x:.5191405880551111,y:.6605007631972294},{x:.5175679428069421,y:.6634831423933323},{x:.5169083878327574,y:.664296079457111},{x:.5163776774005638,y:.665198424109003},{x:.5141342596628157,y:.6677153419860701},{x:.5120099990343735,y:.6703336077343061},{x:.511204521070525,y:.6710022516480534},{x:.510507969381766,y:.6717837215313657},{x:.425955969381766,y:.7497057215313657},{x:.4243831978740034,y:.750892537075826},{x:.42294870744900304,y:.7522432326643229},{x:.4208707687817478,y:.7535430209032156},{x:.4189143183619635,y:.7550193610827685},{x:.4171402309909699,y:.7558765397994217},{x:.4154697962599445,y:.7569214269519826},{x:.41317820849544135,y:.7577908544006052},{x:.41097133104084405,y:.7588571425751742},{x:.40906410498936707,y:.7593517435666508},{x:.4072219198222394,y:.7600506678559823},{x:.3127869198222394,y:.7856226678559822},{x:.3097655669518694,y:.7861297177594856},{x:.3067801557646532,y:.7868174624905968},{x:.3054245519856559,y:.7868582361795984},{x:.30408703940192616,y:.7870827004032797},{x:.3010248204508113,y:.7869905707806608},{x:.2979626007613803,y:.7870826758597451},{x:.29662508997676323,y:.7868582009159747},{x:.29526948652460844,y:.786817416361878},{x:.2922840808497275,y:.7861296477028675},{x:.28926273204343433,y:.7856225735833884},{x:.19483073204343437,y:.7600505735833885},{x:.19298859701529922,y:.7593516514268194},{x:.1910814199885863,y:.7588570511522524},{x:.1888745059729717,y:.757790729268721},{x:.18658288068670334,y:.7569212665731724},{x:.18491249471518256,y:.7558763912940257},{x:.18313845528709377,y:.7550192228447639},{x:.18118197558509466,y:.7535428424712565},{x:.17910400699337814,y:.7522430123425641},{x:.17766956207459372,y:.7508923379118444},{x:.17609683558545802,y:.7497055417906873},{x:.09154583558545802,y:.6717835417906872},{x:.09084937681091164,y:.6710021668773223},{x:.09004400096562647,y:.6703336077343061},{x:.087919657143162,y:.6677152394449524},{x:.08567616637982708,y:.6651982097729843},{x:.0851455285488078,y:.6642959763928821},{x:.08448605719305789,y:.6634831423933323},{x:.08291335035419628,y:.6605006463960624},{x:.08120401576602496,y:.6575942974079984},{x:.08085959099279398,y:.6566058778839782},{x:.08037136724094471,y:.6556800057826547},{x:.03425236724094472,y:.5425460057826548},{x:.03344866581310472,y:.5398419832899659},{x:.03245524021837327,y:.537201759963462},{x:.0321948107181119,y:.5356234361255728},{x:.03173905633660196,y:.5340900680661724},{x:.03147832642517492,y:.5312812082371015},{x:.031019071243648687,y:.5284979083423142},{x:.020038071243648682,y:.36071790834231426},{x:.020078188427320915,y:.3594959771633442},{x:.019944796633211075,y:.35828068632415006}],[{x:.11021604810185967,y:.3604951889884744},{x:.12035004420691338,y:.5153337161267963},{x:.1599220965290545,y:.612407472440097},{x:.22898846858521874,y:.6760588762479813},{x:.301025186831377,y:.6955662779655215},{x:.373064807645506,y:.6760587099720985},{x:.44213195602343713,y:.6124073435241713},{x:.48170390405887986,y:.5153338430353971},{x:.49183697687726113,y:.3604953223188204},{x:.4679633532090146,y:.23306575687188358},{x:.4093572783633461,y:.13271343144136735},{x:.3319224534250481,y:.08378599999999999},{x:.27012977192577264,y:.08378599999999999},{x:.19269670382412518,y:.13271332265415062},{x:.13408961949133952,y:.23306590258843124},{x:.11021604810185967,y:.3604951889884744}]],1:[[{x:.17556757075794932,y:.5951166967821685},{x:.17573368487361973,y:.586296718297643},{x:.17761729959585784,y:.5776786204828649},{x:.18114602866723137,y:.5695935920037709},{x:.1861842650084615,y:.5623523359706766},{x:.19253839202243023,y:.5562331297919906},{x:.19996422417142623,y:.5514711311294693},{x:.20817639089041826,y:.548249340921154},{x:.21685930321783156,y:.5466915707579493},{x:.225679281702357,y:.5468576848736197},{x:.2342973795171352,y:.5487412995958578},{x:.24238240799622912,y:.5522700286672314},{x:.24962366402932343,y:.5573082650084615},{x:.33662600000000004,y:.6314944876419193},{x:.33662600000000004,y:.051034000000000024},{x:.33749066238185466,y:.042254935509274234},{x:.3400514210369921,y:.033813245543570986},{x:.3442098674463855,y:.026033339514117928},{x:.34980619484660536,y:.019214194846605387},{x:.35662533951411796,y:.013617867446385483},{x:.364405245543571,y:.00945942103699212},{x:.3728469355092743,y:.006898662381854659},{x:.381626,y:.0060340000000000255},{x:.3904050644907258,y:.006898662381854659},{x:.3988467544564291,y:.00945942103699212},{x:.40662666048588214,y:.01361786744638549},{x:.4134458051533947,y:.019214194846605387},{x:.41904213255361455,y:.026033339514117928},{x:.42320057896300795,y:.033813245543570986},{x:.4257613376181454,y:.042254935509274255},{x:.426626,y:.051034000000000024},{x:.426626,y:.729004},{x:.42636789988195944,y:.7316245344755278},{x:.4263183151263803,y:.7342572817023569},{x:.42593657376816557,y:.7360038620015019},{x:.4257613376181454,y:.7377830644907257},{x:.42499695590681574,y:.7403028932959718},{x:.4244347004041422,y:.7428753795171351},{x:.42371955318609683,y:.744513925721078},{x:.42320057896300795,y:.746224754456429},{x:.4219592904188853,y:.7485470419835442},{x:.42090597133276864,y:.7509604079962291},{x:.419884900961423,y:.7524279516932593},{x:.41904213255361455,y:.7540046604858821},{x:.41737163919932724,y:.7560401625275525},{x:.41586773499153856,y:.7582016640293234},{x:.4145799806286405,y:.7594418083381722},{x:.4134458051533947,y:.7608238051533946},{x:.41141030311172405,y:.7624942985076821},{x:.4095136079775698,y:.7643208702080094},{x:.40800865730110464,y:.7652859570783687},{x:.40662666048588214,y:.7664201325536145},{x:.40430437295876726,y:.767661421097737},{x:.4020877758285738,y:.7690828688705307},{x:.4004234632490515,y:.7697358105551997},{x:.3988467544564291,y:.7705785789630079},{x:.39632692565118355,y:.7713429606743374},{x:.3938756091095818,y:.772304659078846},{x:.39211589322607654,y:.7726203633950566},{x:.3904050644907258,y:.7731393376181454},{x:.3877845300151986,y:.7733974377361859},{x:.3851926967821685,y:.7738624292420507},{x:.38340520248922366,y:.7738287638499798},{x:.381626,y:.774004},{x:.37900546552447173,y:.7737458998819594},{x:.376372718297643,y:.7736963151263803},{x:.37462613799849803,y:.7733145737681656},{x:.3728469355092743,y:.7731393376181454},{x:.3703271067040287,y:.7723749559068158},{x:.36775462048286484,y:.7718127004041422},{x:.3661160742789217,y:.7710975531860966},{x:.364405245543571,y:.7705785789630079},{x:.3620829580164563,y:.7693372904188854},{x:.3596695920037709,y:.7682839713327686},{x:.35820204830674063,y:.7672629009614229},{x:.35662533951411796,y:.7664201325536145},{x:.3545898374724472,y:.7647496391993269},{x:.35242833597067663,y:.7632457349915385},{x:.1912283359706766,y:.6257917349915385},{x:.18510912979199054,y:.6194376079775697},{x:.18034713112946932,y:.6120117758285738},{x:.17712534092115398,y:.6037996091095817},{x:.17556757075794932,y:.5951166967821685}]],2:[[{x:.034589999999999996,y:.05195499999999997},{x:.034692251306008066,y:.05091682506774448},{x:.03463809526377374,y:.04987503351343359},{x:.03512383076438082,y:.04653492529109402},{x:.03545466238185463,y:.043175935509274184},{x:.03575748683953214,y:.042177657057450094},{x:.03590761484026801,y:.04114531791601493},{x:.0370356398580977,y:.03796415123181852},{x:.03801542103699209,y:.034734245543570935},{x:.03850718127225641,y:.0338142268532408},{x:.03885582398108696,y:.03283101233894428},{x:.040582789147307716,y:.02993103764454602},{x:.04217386744638545,y:.02695433951411788},{x:.04283566538917773,y:.026147936387598623},{x:.04336942466232366,y:.025251630882832152},{x:.04562896367409083,y:.022744292579413156},{x:.04777019484660536,y:.020135194846605337},{x:.04857659797312457,y:.019473396903813094},{x:.04927496174105457,y:.01869844492647086},{x:.0519802417813102,y:.01668009861889986},{x:.05458933951411791,y:.014538867446385433},{x:.055509358204447995,y:.01404710721112114},{x:.05634548873920743,y:.013423289731094336},{x:.05939254741314285,y:.011971499336069797},{x:.062369245543570956,y:.01038042103699207},{x:.0633675239953951,y:.010077596579314544},{x:.06430928926944049,y:.00962888655251979},{x:.06758102982102647,y:.008799443560749052},{x:.07081093550927423,y:.007819662381854608},{x:.0718491104415297,y:.007717411075846537},{x:.07286031894352762,y:.007461052176974015},{x:.07623101021818018,y:.0072858316174737835},{x:.07959,y:.006954999999999975},{x:.522462,y:.006954999999999975},{x:.5312410644907257,y:.007819662381854608},{x:.539682754456429,y:.01038042103699207},{x:.5474626604858821,y:.014538867446385433},{x:.5542818051533946,y:.020135194846605337},{x:.5598781325536145,y:.02695433951411788},{x:.5640365789630079,y:.034734245543570935},{x:.5665973376181453,y:.043175935509274205},{x:.567462,y:.05195499999999997},{x:.5665973376181453,y:.06073406449072574},{x:.5640365789630079,y:.06917575445642901},{x:.5598781325536145,y:.07695566048588207},{x:.5542818051533946,y:.08377480515339461},{x:.5474626604858821,y:.08937113255361451},{x:.539682754456429,y:.09352957896300787},{x:.5312410644907257,y:.09609033761814534},{x:.522462,y:.09695499999999997},{x:.1815000359059797,y:.09695499999999997},{x:.2783905550735291,y:.2032469617410546},{x:.2792807818102756,y:.20444017254595384},{x:.28031851181367967,y:.20550758629318672},{x:.43775551181367967,y:.4029575862931866},{x:.4393581707982963,y:.4054309283363016},{x:.4411189018513206,y:.4077943501865292},{x:.5036359018513206,y:.5115903501865292},{x:.5044316302389797,y:.5132634494776924},{x:.5054127007337849,y:.5148350555317778},{x:.5063216043693862,y:.5172373109446714},{x:.5074247535047713,y:.5195567934026113},{x:.5078787867151084,y:.5213529834674229},{x:.5085344010842773,y:.5230857889106145},{x:.5229384010842772,y:.5764717889106146},{x:.5230947969602031,y:.5774089507908463},{x:.5233933154704733,y:.5783109589719573},{x:.5238196553887738,y:.5817524776504878},{x:.5243904806061233,y:.5851730002877248},{x:.5243610401661515,y:.586122666187007},{x:.5244778496604383,y:.5870655806061408},{x:.5252778496604383,y:.6189585806061408},{x:.525154398698275,y:.6206444560860672},{x:.5252359209411441,y:.6223328785443973},{x:.5248330095087286,y:.6250334227224941},{x:.5246336028763079,y:.6277565667648055},{x:.5241836259995084,y:.6293859645321488},{x:.5239341869342451,y:.6310578486269935},{x:.5118811869342451,y:.6790048486269935},{x:.5115474759395316,y:.6799350391147754},{x:.5113589931552627,y:.6809051378786065},{x:.5100605296725933,y:.6840797730170447},{x:.5089023081582834,y:.6873082151493771},{x:.5083935381649621,y:.6881554285023456},{x:.5080194201443183,y:.6890701159233712},{x:.5061265656819337,y:.6919304336788418},{x:.5043607612540449,y:.6948708843926746},{x:.5036964840076373,y:.6956025626767983},{x:.5031511078963445,y:.6964266878303904},{x:.4695951078963445,y:.7376876878303904},{x:.46829294792790443,y:.7390014838193654},{x:.46714904955699066,y:.7404551608815331},{x:.46519525859727806,y:.7421268539092958},{x:.4633851429208498,y:.7439531446668906},{x:.4618516947085211,y:.7449876576267703},{x:.4604461776978856,y:.7461902391902692},{x:.4582037971525157,y:.7474486453977692},{x:.45607217068925404,y:.7488867084403534},{x:.4543663637878686,y:.7496021826182516},{x:.45275324136800726,y:.7505074541480116},{x:.3913892413680073,y:.7774134541480116},{x:.3883140702117422,y:.7784156528007931},{x:.3852957573995619,y:.7795779210778271},{x:.3841283231887951,y:.779779788263216},{x:.3830018757962646,y:.7801468976050565},{x:.3797902739335826,y:.7805299031606142},{x:.3766032098633093,y:.781080995160135},{x:.2948022098633093,y:.7870669951601349},{x:.29450281220893076,y:.7870594704966325},{x:.2942070489499988,y:.7871065838776864},{x:.29009611613079095,y:.7869487184427649},{x:.2859834519838158,y:.7868453561974301},{x:.28569127516043946,y:.7867795665334233},{x:.28539200354491423,y:.7867680740946454},{x:.2381110035449142,y:.7802710740946455},{x:.2365476307297285,y:.7798972084805876},{x:.2349498387179436,y:.7797212234138579},{x:.23226739693423346,y:.7788736316211718},{x:.2295313767481002,y:.7782193386355017},{x:.22807098126622102,y:.7775476578384392},{x:.22653822336325463,y:.7770633405173258},{x:.15287222336325462,y:.7455503405173259},{x:.15277120515837472,y:.7454948388638573},{x:.15266147866932564,y:.7454595513468599},{x:.14890641990559073,y:.7433714396994592},{x:.14514076206912752,y:.7413025033471496},{x:.1450525127361761,y:.7412283604682699},{x:.14495177886390068,y:.7411723444149347},{x:.14167624287507044,y:.7383917796239132},{x:.1383865705572421,y:.7356279539035645},{x:.138314481468594,y:.7355380190685297},{x:.13822661135931125,y:.7354634271443719},{x:.09327661135931127,y:.6889934271443718},{x:.09215967204365061,y:.6875853345117547},{x:.09088652507606766,y:.6863167230283468},{x:.0894249598835053,y:.6841377631074377},{x:.0877944205712414,y:.6820821900242812},{x:.08697364817646357,y:.6804832494460014},{x:.08597245819367963,y:.6789906353246448},{x:.0849640705590952,y:.6765684062835642},{x:.08376588401722862,y:.6742342280213215},{x:.08327282036617045,y:.6725058858871059},{x:.08258206253775009,y:.6708466294514168},{x:.06737006253775008,y:.6210196294514168},{x:.06563362911198059,y:.61237067498716},{x:.06561788807912042,y:.6035491464015462},{x:.0673234443582347,y:.5948940500909503},{x:.07068475437800403,y:.5867379965527546},{x:.07557264487941309,y:.5793944183504645},{x:.08179927697165325,y:.5731455250760676},{x:.08912536467535526,y:.5682314581936796},{x:.09726937054858317,y:.56484106253775},{x:.10591832501283995,y:.5631046291119806},{x:.11473985359845373,y:.5630888880791204},{x:.12339494990904962,y:.5647944443582347},{x:.13155100344724535,y:.568155754378004},{x:.13889458164953555,y:.5730436448794131},{x:.14514347492393234,y:.5792702769716532},{x:.15005754180632036,y:.5865963646753553},{x:.1534479374622499,y:.5947403705485832},{x:.16549687462406137,y:.6342067386764809},{x:.19660916323298405,y:.666371100226128},{x:.2563653288901179,y:.6919337213587163},{x:.29295461470925055,y:.696961546277117},{x:.3623268316838737,y:.6918850546595318},{x:.40664087103378327,y:.672454875030618},{x:.4270299373286165,y:.6473841495451277},{x:.4351521014718352,y:.6150740687208592},{x:.4346413299816387,y:.5947115247998124},{x:.4232850296720603,y:.5526213103922067},{x:.3655461500158852,y:.45675834907300783},{x:.21087613207581168,y:.2627785664153893},{x:.04633344492647088,y:.0822700382589454},{x:.04431509861889995,y:.07956475821868986},{x:.04217386744638545,y:.07695566048588207},{x:.04168210721112112,y:.0760356417955519},{x:.04105828973109435,y:.07519951126079251},{x:.03960649933606985,y:.07215245258685718},{x:.03801542103699209,y:.06917575445642901},{x:.037712596579314576,y:.0681774760046049},{x:.037263886552519804,y:.06723571073055948},{x:.036434443560749034,y:.06396397017897336},{x:.03545466238185463,y:.06073406449072574},{x:.03535241107584656,y:.059695889558470286},{x:.035096052176974035,y:.05868468105647236},{x:.03492083161747381,y:.05531398978181981},{x:.034589999999999996,y:.05195499999999997}]],3:[[{x:.02624429558875499,y:.07454886751538828},{x:.02628189246403191,y:.06572740500388341},{x:.028039748887915363,y:.057082779207475086},{x:.03145031142385274,y:.04894719824755728},{x:.036382514066253493,y:.04163330793793327},{x:.042646815033581253,y:.035422176981524986},{x:.05000248075272204,y:.030552495657744837},{x:.05816683711519421,y:.027211403088916904},{x:.11448783711519421,y:.010388403088916982},{x:.11753114712885143,y:.009796523380387901},{x:.12053464064709668,y:.009027703431080128},{x:.20267064064709667,y:-.0035892965689199724},{x:.20562630159751,y:-.003749783589053152},{x:.20856537842676282,y:-.004101230781641964},{x:.30947437842676284,y:-.00620423078164193},{x:.31075400531193675,y:-.006105070212514369},{x:.31203499449415534,y:-.0061847225744922005},{x:.3151428517207607,y:-.005764970678224511},{x:.3182695531731509,y:-.005522677007230838},{x:.31950524711917533,y:-.005175778959545043},{x:.3207771618583987,y:-.005003992231664048},{x:.3829651618583987,y:.009716007768336019},{x:.3849642059743718,y:.010402067561162992},{x:.38702295869345676,y:.010879972006216251},{x:.389126076828856,y:.011830396347599064},{x:.3913090018652735,y:.012579562954916447},{x:.3931357912831918,y:.013642434461507345},{x:.39506175111398195,y:.014512798837572657},{x:.47719975111398194,y:.06182779883757265},{x:.47924722409526294,y:.06329195880211928},{x:.48141099047099317,y:.06457804786673271},{x:.4828265323572166,y:.06585154318044145},{x:.484375351035892,y:.06695911252196202},{x:.4860978389589892,y:.06879458122658251},{x:.48796912564078,y:.07047808832945178},{x:.54077112564078,y:.12830608832945176},{x:.5409949120745448,y:.12860551518367325},{x:.5412686389329152,y:.1288600940829806},{x:.5436334835107667,y:.13213593090859313},{x:.5460522072884215,y:.13537218987116906},{x:.5462132784472015,y:.1357095218897727},{x:.546432079841298,y:.13601261058785885},{x:.5481124005325159,y:.13968686141763526},{x:.5498532864078638,y:.14333280617235186},{x:.5499454524173568,y:.14369507987504085},{x:.5501009199323095,y:.14403503084321223},{x:.5735679199323094,y:.2123790308432122},{x:.5742003382158373,y:.21504899342087444},{x:.5750294951185407,y:.21766455299430504},{x:.5752146521018063,y:.21933125436759},{x:.575601167738761,y:.22096305773765262},{x:.575700550423256,y:.22370509641963415},{x:.5760035049491392,y:.22643215923642232},{x:.5758599468852712,y:.22810295774565637},{x:.5759206866877095,y:.2297788119316045},{x:.5754832145523405,y:.2324875517091097},{x:.575248324328873,y:.23522131827456078},{x:.563515324328873,y:.2983063182745607},{x:.5624930457986839,y:.30183400865706583},{x:.561587550163308,y:.3053934651440046},{x:.5612670272694029,y:.3060647673464004},{x:.5610599744254687,y:.30677926765590185},{x:.5593691204378909,y:.31003973780923805},{x:.5577866081350055,y:.3133541469027738},{x:.5573412794357957,y:.31395001930700017},{x:.5569988129587381,y:.31461039668740554},{x:.5547043620842722,y:.317478348572073},{x:.5525056481741942,y:.32042033938948294},{x:.4997036481741942,y:.378250339389483},{x:.4970091109540712,y:.38067456957783247},{x:.49440132723244246,y:.38319188697894757},{x:.4937347452782226,y:.3836204617554604},{x:.49314561461057166,y:.3841504927896343},{x:.49002990831948917,y:.38600246394071897},{x:.48698112816844114,y:.387962658427834},{x:.4171684643874312,y:.4237087345514058},{x:.48487098803351525,y:.4540412587201935},{x:.4882241875669253,y:.4559584413246188},{x:.4916233115558361,y:.4577929691542233},{x:.4920492459188098,y:.45814540790983926},{x:.4925291804180174,y:.45841980913886743},{x:.49544392539098053,y:.4609543303938907},{x:.49841983754054403,y:.46341674447922576},{x:.545354837540544,y:.5107317444792258},{x:.5454749496657809,y:.5108793107625336},{x:.5456205162109946,y:.5110018387655073},{x:.548258239278959,y:.5142987798858712},{x:.5509236260451226,y:.5175733969812307},{x:.5510126414958236,y:.5177415605329735},{x:.5511315069931322,y:.5178901328189077},{x:.5530753456471339,y:.5216383183828395},{x:.5550506716503533,y:.525370005791429},{x:.5551051696126684,y:.5255523041806199},{x:.555192766127671,y:.525721211199887},{x:.5563680197383496,y:.5297766005381628},{x:.5575773743081012,y:.5338219516056334},{x:.5575952604559016,y:.5340113792074108},{x:.557648221703651,y:.5341941299579837},{x:.569382221703651,y:.5972801299579837},{x:.5696549699390315,y:.6004540423597167},{x:.5701008412017201,y:.6036082951002054},{x:.5700318821169291,y:.6048400880993865},{x:.5701375119403227,y:.6060692795769916},{x:.5697858198023349,y:.6092354166829699},{x:.5696077595908724,y:.6124160465097288},{x:.5692998146426919,y:.6136107177017713},{x:.5691636114574624,y:.614836897966064},{x:.5682009942777376,y:.6178735869028962},{x:.5674058453461934,y:.6209583639953996},{x:.5668707486862845,y:.622070002836373},{x:.5664979467044567,y:.623246050467446},{x:.5649613973213707,y:.6260365929822823},{x:.5635797167972587,y:.6289069710868302},{x:.5283787167972587,y:.6867359710868302},{x:.526364685994031,y:.6894131274243959},{x:.524479650893362,y:.6921826271628648},{x:.5237177195860089,y:.6929316152663909},{x:.5230754099184859,y:.6937854072711274},{x:.5205777908604191,y:.6960182048823972},{x:.5181886735848373,y:.6983667373551676},{x:.4595186735848373,y:.7456807373551677},{x:.45627545779875317,y:.7478078267647688},{x:.4530837115337172,y:.7500113951823929},{x:.4525909707504246,y:.7502243275150239},{x:.4521421155924859,y:.7505187128152536},{x:.44854624273044896,y:.7519722107862162},{x:.4449859301027389,y:.7535107594479447},{x:.362848930102739,y:.7797967594479446},{x:.36158078031831586,y:.7800691142952486},{x:.3603625229719573,y:.7805143446587972},{x:.35727696699365546,y:.7809934249999153},{x:.35422405316989464,y:.781649085623381},{x:.352927136733123,y:.7816688034988555},{x:.3516454277250751,y:.7818678086678129},{x:.2577774277250751,y:.7871168086678129},{x:.2534831925795917,y:.7869349938938289},{x:.24918809681378723,y:.7867747925856998},{x:.2490774333618657,y:.786748457272228},{x:.24896378128970398,y:.7867436453266514},{x:.24478752897123962,y:.7857275603552258},{x:.2406062159909945,y:.7847325056542677},{x:.16433721599099446,y:.7584545056542678},{x:.1612047546311144,y:.7570179671101032},{x:.15801334200327716,y:.7557176430739929},{x:.09817134200327716,y:.7241756430739928},{x:.09479788711775466,y:.721949723610623},{x:.09138819905405325,y:.7197797137879894},{x:.05384019905405325,y:.6903397137879895},{x:.04746503339724546,y:.6842424293748122},{x:.0424018859405069,y:.677018569451043},{x:.0388453306011542,y:.6689457429023652},{x:.036932043806339465,y:.6603341839257509},{x:.036735552094603836,y:.6515148299032538},{x:.03826340653223549,y:.6428266036640077},{x:.041456892530026886,y:.6346033888699733},{x:.046193286212010486,y:.6271611990540533},{x:.05229057062518783,y:.6207860333972455},{x:.05951443054895701,y:.615722885940507},{x:.06758725709763488,y:.6121663306011542},{x:.07619881607424907,y:.6102530438063395},{x:.08501817009674617,y:.6100565520946039},{x:.09370639633599236,y:.6115844065322356},{x:.1019296111300268,y:.6147778925300269},{x:.10937180094594674,y:.6195142862120105},{x:.14372643260130716,y:.6464504840370294},{x:.1969218011618275,y:.6744891243755197},{x:.2615721948597163,y:.6967640072977177},{x:.3408866683163358,y:.6923288252210377},{x:.40955721054777616,y:.6703524458415177},{x:.4555820596629536,y:.6332360369266462},{x:.477752059875079,y:.596814658492312},{x:.4716998550115053,y:.5642759337587675},{x:.44042564505409965,y:.532748518309004},{x:.3700728058889163,y:.5012285825754976},{x:.28267158635688694,y:.4816496665818946},{x:.2026156257994338,y:.47140070238604853},{x:.19958923290487823,y:.4707064281346213},{x:.19652752938874105,y:.4701896668089735},{x:.19529880233776667,y:.46972217540403877},{x:.1940174323454584,y:.4694282207777866},{x:.19118463692903986,y:.4681568668470777},{x:.18828257832087977,y:.4670527262205195},{x:.18716866396437967,y:.46635450477580015},{x:.18596926283986664,y:.4658162155208443},{x:.1834389276407875,y:.4640166393294268},{x:.18080803842542348,y:.46236755090702814},{x:.17985174386742717,y:.4614654316810775},{x:.17878040392329292,y:.4607034939516098},{x:.17664976830422657,y:.45844485220330683},{x:.1743911520787843,y:.45631418952832026},{x:.17362922718285934,y:.45524284045707714},{x:.17272711941234267,y:.45428653509274164},{x:.17107806250525512,y:.45165562612327925},{x:.16927851662463225,y:.44912526936741537},{x:.1687402417372368,y:.44792586179486843},{x:.1680420336360506,y:.4468119390745141},{x:.1669379277730794,y:.44390986724015796},{x:.1656666077762714,y:.4410770565945043},{x:.16537266849946,y:.43979568308103084},{x:.16490519181337332,y:.438566950430106},{x:.16438846716364272,y:.4355052407239498},{x:.16369422916516244,y:.43247883951296023},{x:.16365592142049992,y:.43116474252408066},{x:.16343714101639506,y:.42986841944927895},{x:.1635276550184117,y:.4267647316583033},{x:.16343717819520762,y:.42366104278329114},{x:.1636559741278381,y:.4223647223293339},{x:.1636942976139514,y:.42105062579943375},{x:.1643885718653787,y:.41802423290487795},{x:.16490533319102646,y:.414962529388741},{x:.1653728245959611,y:.41373380233776696},{x:.1656667792222133,y:.41245243234545836},{x:.1669381331529224,y:.40961963692903947},{x:.16804227377948042,y:.40671757832087974},{x:.16874049522419982,y:.4056036639643795},{x:.16927878447915568,y:.4044042628398666},{x:.17107836067057278,y:.40187392764078794},{x:.1727274490929718,y:.3992430384254234},{x:.17362956831892262,y:.3982867438674269},{x:.17439150604839013,y:.3972154039232929},{x:.1766501477966929,y:.39508476830422673},{x:.1787808104716797,y:.39282615207878424},{x:.17985215954292283,y:.39206422718285927},{x:.18080846490725827,y:.39116211941234263},{x:.18343937387672077,y:.38951306250525497},{x:.18596973063258454,y:.3877135166246322},{x:.18716913820513145,y:.3871752417372368},{x:.1882830609254858,y:.38647703363605057},{x:.19118513275984234,y:.3853729277730792},{x:.19401794340549564,y:.3841016077762714},{x:.19529931691896882,y:.38380766849946},{x:.19652804956989395,y:.38334019181337325},{x:.19958975927605035,y:.38282346716364263},{x:.20261616048703973,y:.3821292291651624},{x:.28149235433605535,y:.37203226198800626},{x:.3678476199052635,y:.34785057975990136},{x:.4387239808422848,y:.31155986033736477},{x:.4773813812672204,y:.26922136053481893},{x:.48460036747312013,y:.2304069273293995},{x:.4680118822440525,y:.1820955353962423},{x:.4262197745588727,y:.1363254129914362},{x:.35583608100487274,y:.09578139608686695},{x:.3056218275014876,y:.083895601213743},{x:.2134048551529998,y:.08581745449589688},{x:.13726972612583144,y:.09751265420048184},{x:.0839251628848058,y:.11344659691108305},{x:.0752658675153883,y:.11513070441124498},{x:.06644440500388343,y:.11509310753596806},{x:.05779977920747511,y:.11333525111208462},{x:.0496641982475573,y:.10992468857614723},{x:.04235030793793329,y:.10499248593374648},{x:.036139176981525016,y:.09872818496641873},{x:.03126949565774486,y:.09137251924727793},{x:.027928403088916927,y:.08320816288480577},{x:.02624429558875499,y:.07454886751538828}]],4:[[{x:.003828000000000005,y:.27580099999999996},{x:.0040512821902059844,y:.2735339778783202},{x:.004058111165048277,y:.2712559968420181},{x:.004482570943879651,y:.26915502967601196},{x:.004692662381854638,y:.26702193550927417},{x:.005353928343121064,y:.26484203377636983},{x:.005805038155045426,y:.26260915577382815},{x:.0066312204192078995,y:.26063136609773396},{x:.0072534210369921,y:.25858024554357095},{x:.008327258689269697,y:.2565712366005347},{x:.009205313441189196,y:.2544692698811785},{x:.010401468469599332,y:.25269066304309135},{x:.011411867446385462,y:.25080033951411784},{x:.01285700981091242,y:.2490394284479652},{x:.014128266351129452,y:.24714915041402313},{x:.01564842657685691,y:.24563807727727646},{x:.017008194846605366,y:.24398119484660533},{x:.018769105912757822,y:.24253605248207852},{x:.020384710565360974,y:.24093010545831445},{x:.022170457083446928,y:.23974463571613375},{x:.023827339514117918,y:.23838486744638543},{x:.025836348457154004,y:.2373110297941079},{x:.027734214441385185,y:.2360511294240198},{x:.029716922014597604,y:.23523682001377813},{x:.031607245543570965,y:.23422642103699207},{x:.03378714727647517,y:.23356515507572567},{x:.03589434066689576,y:.23269971862397582},{x:.03799781495511128,y:.23228786299963877},{x:.040048935509274235,y:.2316656623818546},{x:.04231595763095386,y:.23144238019164864},{x:.0445515001672978,y:.23100466589573537},{x:.046694905833262405,y:.23101109143797494},{x:.048828,y:.23080099999999998},{x:.36918100000000004,y:.23080099999999998},{x:.36918100000000004,y:.05103000000000002},{x:.37004566238185466,y:.04225093550927423},{x:.3726064210369921,y:.03380924554357098},{x:.3767648674463855,y:.026029339514117924},{x:.38236119484660536,y:.019210194846605383},{x:.38918033951411796,y:.013613867446385479},{x:.396960245543571,y:.009455421036992116},{x:.4054019355092743,y:.006894662381854655},{x:.414181,y:.0060300000000000215},{x:.4229600644907258,y:.006894662381854655},{x:.4314017544564291,y:.009455421036992116},{x:.43918166048588214,y:.013613867446385486},{x:.4460008051533947,y:.019210194846605383},{x:.45159713255361456,y:.026029339514117924},{x:.45575557896300795,y:.03380924554357098},{x:.4583163376181454,y:.04225093550927425},{x:.459181,y:.05103000000000002},{x:.459181,y:.23080099999999998},{x:.553224,y:.23080099999999998},{x:.5620030644907258,y:.2316656623818546},{x:.5704447544564291,y:.23422642103699207},{x:.5782246604858822,y:.23838486744638543},{x:.5850438051533947,y:.24398119484660533},{x:.5906401325536146,y:.25080033951411784},{x:.5947985789630079,y:.25858024554357095},{x:.5973593376181454,y:.26702193550927417},{x:.5982240000000001,y:.27580099999999996},{x:.5973593376181454,y:.28458006449072576},{x:.5947985789630079,y:.293021754456429},{x:.5906401325536146,y:.3008016604858821},{x:.5850438051533947,y:.3076208051533946},{x:.5782246604858822,y:.3132171325536145},{x:.5704447544564291,y:.3173755789630079},{x:.5620030644907258,y:.31993633761814533},{x:.553224,y:.32080099999999995},{x:.459181,y:.32080099999999995},{x:.459181,y:.421833},{x:.4583163376181454,y:.4306120644907258},{x:.45575557896300795,y:.439053754456429},{x:.45159713255361456,y:.4468336604858821},{x:.4460008051533947,y:.4536528051533947},{x:.43918166048588214,y:.45924913255361455},{x:.4314017544564291,y:.4634075789630079},{x:.4229600644907258,y:.4659683376181454},{x:.414181,y:.466833},{x:.4054019355092743,y:.4659683376181454},{x:.396960245543571,y:.4634075789630079},{x:.38918033951411796,y:.45924913255361455},{x:.38236119484660536,y:.4536528051533947},{x:.3767648674463855,y:.4468336604858821},{x:.3726064210369921,y:.439053754456429},{x:.37004566238185466,y:.4306120644907258},{x:.36918100000000004,y:.421833},{x:.36918100000000004,y:.32080099999999995},{x:.1436046917940101,y:.32080099999999995},{x:.4533648945416855,y:.700560710565361},{x:.45824387057598015,y:.7079102144413851},{x:.4615952813760241,y:.7160703406668958},{x:.46329033410426457,y:.7247275001672978},{x:.46326388883495173,y:.7335490031579818},{x:.46151696184495455,y:.7421958442261718},{x:.45811668655881077,y:.7503357301188214},{x:.4531937336488705,y:.7576558495859769},{x:.446937289434639,y:.7638748945416856},{x:.4395877855586148,y:.7687538705759801},{x:.43142765933310423,y:.7721052813760241},{x:.42277049983270215,y:.7738003341042645},{x:.41394899684201814,y:.7737738888349517},{x:.40530215577382817,y:.7720269618449546},{x:.39716226988117853,y:.7686266865588108},{x:.38984215041402315,y:.7637037336488706},{x:.38362310545831446,y:.757447289434639},{x:.013957105458314502,y:.304244289434639},{x:.012771635716133971,y:.30245854291655333},{x:.011411867446385462,y:.3008016604858821},{x:.010338029794107799,y:.29879265154284573},{x:.009078129424019837,y:.29689478555861476},{x:.008263820013778204,y:.2949120779854024},{x:.0072534210369921,y:.293021754456429},{x:.006592155075725704,y:.29084185272352475},{x:.005726718623975863,y:.2887346593331042},{x:.0053148629996388475,y:.28663118504488877},{x:.004692662381854638,y:.28458006449072576},{x:.00446938019164866,y:.282313042369046},{x:.00403166589573542,y:.2800774998327022},{x:.00403809143797499,y:.27793409416673776},{x:.003828000000000005,y:.27580099999999996}]],5:[[{x:.029951000000000005,y:.38529899999999995},{x:.030026331329377584,y:.3845341481773043},{x:.029977079633894697,y:.38376717530271315},{x:.030458063889865227,y:.38015069392879464},{x:.03081566238185464,y:.37651993550927415},{x:.03103876142924568,y:.3757844765131909},{x:.03114008507636279,y:.3750226322781917},{x:.0323173678705276,y:.3715694759531816},{x:.0333764210369921,y:.36807824554357094},{x:.033738714231120716,y:.3674004426508694},{x:.033986719409902104,y:.366673004302166},{x:.03581505842470893,y:.3635158758870829},{x:.03753486744638546,y:.3602983395141178},{x:.03802243206297786,y:.35970424030984804},{x:.03840758807348568,y:.3590391628952293},{x:.04081672126593952,y:.35629938906452685},{x:.04313119484660537,y:.3534791948466053},{x:.04372529405087513,y:.3529916302300129},{x:.04423279956362368,y:.3524144723015426},{x:.04713014529619686,y:.3501973410270508},{x:.04995033951411792,y:.3478828674463854},{x:.05062814240681941,y:.3475205742522568},{x:.05123849426956635,y:.347053515665452},{x:.054512709170605814,y:.34544423005866864},{x:.057730245543570965,y:.343724421036992},{x:.05846570453965444,y:.3435013219896009},{x:.05915544727260316,y:.34316231154402344},{x:.06268070509966306,y:.34222271554831923},{x:.06617193550927424,y:.3411636623818546},{x:.0669367873319697,y:.34108833105247705},{x:.06767941450870582,y:.34089039672943083},{x:.07132024158048059,y:.34065659849198926},{x:.074951,y:.34029899999999996},{x:.0757158518226955,y:.3403743313293775},{x:.07648282469728679,y:.34032507963389463},{x:.08009930607120508,y:.3408060638898651},{x:.08373006449072577,y:.3411636623818546},{x:.0844655234868091,y:.3413867614292456},{x:.08522736772180821,y:.34148808507636275},{x:.2701097088502776,y:.3848544225750548},{x:.39095673206080095,y:.3699215697302287},{x:.4312208460684155,y:.34735587040502247},{x:.4569274445394237,y:.3179203076157562},{x:.4808881134259603,y:.2201177906149206},{x:.47151862074291284,y:.1781066999956386},{x:.4461217481742335,y:.14395206669668215},{x:.3876788357927069,y:.10680533743499816},{x:.3169820044514503,y:.08634947983662909},{x:.2505487358362677,y:.08307118781270932},{x:.19638270317906092,y:.09339965838335124},{x:.15518503458472022,y:.11245499400015477},{x:.1051531598037562,y:.15775209985578706},{x:.09806479623887651,y:.16300326318775482},{x:.09008818244690309,y:.16677065575830224},{x:.0815298552225249,y:.16890949878372125},{x:.07271870628140957,y:.16933759772602197},{x:.06399334313601493,y:.16803850098293246},{x:.05568907659877849,y:.16506213211374782},{x:.04812503497563989,y:.16052287130494386},{x:.041591900144212934,y:.15459515980375618},{x:.03634073681224515,y:.1475067962388765},{x:.03257334424169774,y:.13953018244690307},{x:.03043450121627874,y:.13097185522252489},{x:.03000640227397801,y:.12216070628140954},{x:.031305499017067515,y:.1134353431360149},{x:.034281867886252176,y:.10513107659877846},{x:.03882112869505611,y:.09756703497563987},{x:.044748840196243804,y:.09103390014421289},{x:.09986584019624378,y:.041132900144212926},{x:.10178680031290575,y:.03970982481314967},{x:.10357183338498165,y:.03811957700249835},{x:.10532248536915285,y:.037090537646117014},{x:.10695420376112348,y:.035881736812245144},{x:.10911588139237749,y:.0348607662023731},{x:.11117685751196796,y:.03364931723433351},{x:.16362485751196798,y:.009390317234333478},{x:.1646572774363771,y:.009030847933342759},{x:.16562545909873666,y:.008523173483185618},{x:.16881529925253239,y:.0075831025339957205},{x:.1719558576504946,y:.006489618860012841},{x:.17303856889723523,y:.006338471796353147},{x:.17408718959239433,y:.0060294350406820685},{x:.23897018959239436,y:-.00634256495931787},{x:.2399001168767359,y:-.006426714843400178},{x:.24080591100583193,y:-.006653392925378379},{x:.24428588214420577,y:-.0068235863462415185},{x:.247755834543085,y:-.007137585190079683},{x:.24868431036339586,y:-.007038698344381461},{x:.24961692261229596,y:-.007084309202250054},{x:.32666292261229596,y:-.003282309202250082},{x:.32746661284147915,y:-.0031629125067284265},{x:.32827905619988357,y:-.00317336931171093},{x:.3318231917274382,y:-.002515696572186591},{x:.33538870069659477,y:-.001986002452099067},{x:.33615365510360457,y:-.0017121077449900682},{x:.3369525276121403,y:-.0015638637889859724},{x:.4188855276121403,y:.02214313621101406},{x:.4207304127428032,y:.02287964098341223},{x:.42264402370761556,y:.023412682727046455},{x:.4248170355152836,y:.024511079778651145},{x:.4270783417525648,y:.02541382586724525},{x:.42874409297954025,y:.02649609814118395},{x:.43051694316083267,y:.027392224616519634},{x:.5014129431608326,y:.07245422461651957},{x:.5044011686844615,y:.0747943741105689},{x:.5074525565132345,y:.07705154573740032},{x:.5078697672823866,y:.07751071502587484},{x:.5083582165656543,y:.07789323111579813},{x:.5108324836553944,y:.0807713891731658},{x:.5133848875831327,y:.08358048611421783},{x:.5494628875831328,y:.1320994861142178},{x:.5497798823390716,y:.1326268676033582},{x:.5501811109693575,y:.13309337858567127},{x:.5520495631508493,y:.13640291633591076},{x:.5540074974944301,y:.13966031511116345},{x:.5542155142604781,y:.14023940572188273},{x:.5545180216173755,y:.1407752286491667},{x:.5557049132287019,y:.14438569149730107},{x:.5569897394368822,y:.14796247431004633},{x:.5570807842453774,y:.1485710199149322},{x:.5572729451408087,y:.14915556341258465},{x:.5710219451408087,y:.2108035634125847},{x:.5712046210163666,y:.21230267395853206},{x:.5715791512667351,y:.2137656948046034},{x:.571736996194895,y:.21667155541097086},{x:.5720890113736304,y:.2195603313107129},{x:.5719757152243157,y:.2210662751632623},{x:.5720576277729665,y:.2225742517011615},{x:.5716455344736617,y:.2254550710286549},{x:.5714272135589309,y:.2283570146640783},{x:.5710222992922247,y:.22981191924551903},{x:.5708084462858501,y:.23130690078257787},{x:.5417354462858501,y:.3499769007825779},{x:.5411002871662289,y:.3517814599872898},{x:.540669734049328,y:.3536454570484658},{x:.5396393400617131,y:.355932176655931},{x:.5388066121493867,y:.3582980512419798},{x:.5378316053978042,y:.3599440229503987},{x:.537045677451414,y:.361688207084494},{x:.5355889653307644,y:.36372996812105773},{x:.5343106788169316,y:.36588792593376723},{x:.5330332933960605,y:.36731205637621067},{x:.5319221933904076,y:.36886939956510134},{x:.49389619339040763,y:.4124113995651013},{x:.49150876583293945,y:.41465677330496736},{x:.4892379705562563,y:.41702003426923534},{x:.48830169237996507,y:.41767302336482964},{x:.48747017448549057,y:.4184550652905171},{x:.4846905699931398,y:.420191530792605},{x:.4820023580684325,y:.4220663721783498},{x:.4272473580684325,y:.4527533721783498},{x:.42330567688981036,y:.45447898255061825},{x:.4193723578126433,y:.45622356923745777},{x:.4192660752068488,y:.4562474610875831},{x:.4191662841579818,y:.4562911481493166},{x:.41496369139475175,y:.45721461755172516},{x:.4107655979622113,y:.4581583300092093},{x:.27317359796221125,y:.47516033000920926},{x:.26964530070808584,y:.4752477446385603},{x:.2661231753027132,y:.4754739203661053},{x:.26524270860794985,y:.4753568201865933},{x:.26435476148695686,y:.47537881934450843},{x:.2608772057270339,y:.4747762176787918},{x:.2573786322781918,y:.4743109149236372},{x:.119951,y:.44207564006371447},{x:.119951,y:.684004},{x:.527101,y:.684004},{x:.5358800644907258,y:.6848686623818546},{x:.544321754456429,y:.6874294210369921},{x:.5521016604858822,y:.6915878674463855},{x:.5589208051533947,y:.6971841948466053},{x:.5645171325536146,y:.7040033395141179},{x:.5686755789630079,y:.711783245543571},{x:.5712363376181454,y:.7202249355092742},{x:.5721010000000001,y:.729004},{x:.5712363376181454,y:.7377830644907257},{x:.5686755789630079,y:.746224754456429},{x:.5645171325536146,y:.7540046604858821},{x:.5589208051533947,y:.7608238051533946},{x:.5521016604858822,y:.7664201325536145},{x:.544321754456429,y:.7705785789630079},{x:.5358800644907258,y:.7731393376181454},{x:.527101,y:.774004},{x:.074951,y:.774004},{x:.06617193550927424,y:.7731393376181454},{x:.05773024554357094,y:.7705785789630079},{x:.04995033951411792,y:.7664201325536145},{x:.04313119484660537,y:.7608238051533946},{x:.03753486744638546,y:.7540046604858821},{x:.0333764210369921,y:.746224754456429},{x:.03081566238185464,y:.7377830644907257},{x:.029951000000000005,y:.729004},{x:.029951000000000005,y:.38529899999999995}]],6:[[{x:.01994450211145162,y:.2755194646798348},{x:.020758274672659796,y:.26806396163938684},{x:.0201773643330274,y:.24423363638780976},{x:.020440223451033163,y:.2406784570189078},{x:.020568639264984916,y:.237115887070161},{x:.02076496657089406,y:.23628629421823594},{x:.02082782677693791,y:.23543610758842642},{x:.021779216218601925,y:.23200052126419074},{x:.022600187477202785,y:.22853145778054884},{x:.04459918747720279,y:.16442145778054884},{x:.04602253566469808,y:.16130748249724527},{x:.047307319174730654,y:.15813382633120915},{x:.06831231917473066,y:.11806482633120913},{x:.06934150993632018,y:.11649740482650416},{x:.07018719324152095,y:.11482382676006757},{x:.07175673818837072,y:.11281909673987861},{x:.07315419088510985,y:.11069082519836773},{x:.0744693948008918,y:.10935430641546007},{x:.07562532742241568,y:.1078778703106287},{x:.1253733274224157,y:.055788870310628645},{x:.12585541612958862,y:.055374327647901005},{x:.12626130847256478,y:.0548849335871293},{x:.1291958120945167,y:.0525019586891126},{x:.1320620582603259,y:.05003730581521479},{x:.13261575702973094,y:.04972477931463493},{x:.1331093263100589,y:.049323974491408525},{x:.1861743263100589,y:.014262974491408516},{x:.18683955107784095,y:.013911818906951787},{x:.187438960697758,y:.013457349607970202},{x:.1907349034619545,y:.011855559414887177},{x:.19397565070571454,y:.010144849670490022},{x:.19469660042216425,y:.009930220356283175},{x:.19537315511619574,y:.009601422573216056},{x:.19891826102894206,y:.008673416864759805},{x:.2024304811380398,y:.007627816351770726},{x:.20317945010986724,y:.007557961391993223},{x:.20390715026053782,y:.0073674706392518954},{x:.2857161502605378,y:-.005654529360748083},{x:.2860775594607644,y:-.005676122674759226},{x:.28642923596273784,y:-.0057621838110407525},{x:.2904772893795591,y:-.005938995755027237},{x:.2945219894833068,y:-.006180656673914681},{x:.2948806669536751,y:-.006131327641200151},{x:.2952423757850646,y:-.006147126454864343},{x:.38700037578506463,y:-.001139126454864331},{x:.39074801870473747,y:-.000562375362895672},{x:.3945101708776463,y:-8942684208443352e-20},{x:.395102371884912,y:.00010774663253235539},{x:.3957192721812796,y:.00020268575218489876},{x:.39928238663684656,y:.0014994835976446027},{x:.4028799824314506,y:.002697304024131271},{x:.47474098243145063,y:.03475230402413133},{x:.4764407459001163,y:.03572046389197228},{x:.4782361407270164,y:.03649705052245801},{x:.48026428101539703,y:.03789829234877595},{x:.4824063061811086,y:.03911835786940705},{x:.4838845305509628,y:.04039952221931584},{x:.48549392283388365,y:.041511451110380196},{x:.5363469228338836,y:.08458545111038014},{x:.5369424578291695,y:.08519979361043255},{x:.5376274627831791,y:.08571247952886965},{x:.5400078699953618,y:.08836201411598918},{x:.5424869876672573,y:.09091942444541115},{x:.5429512273484354,y:.09163814564059086},{x:.5435230500634102,y:.09227461827992436},{x:.5453408198626901,y:.09533763721244376},{x:.5472733759789791,y:.0983295594844189},{x:.5475884798754501,y:.09912503932225875},{x:.5480251455251356,y:.09986083939589693},{x:.5756631455251356,y:.15896283939589692},{x:.5756676990332947,y:.1589757429605767},{x:.575674675284325,y:.15898751446598428},{x:.5771354507402345,y:.1631350040011944},{x:.5785987361645655,y:.16728160865370237},{x:.5786006848177536,y:.16729515262537814},{x:.5786052305152959,y:.16730805894366996},{x:.5792288025114348,y:.17166083878445604},{x:.5798550088797246,y:.1760132404159827},{x:.5798542777922926,y:.17602690430741857},{x:.5798562182477396,y:.17604044945602063},{x:.5820672182477395,y:.2261264494560206},{x:.5819074721227447,y:.22907858468741052},{x:.5819395990078049,y:.232034864293962},{x:.5816696541741431,y:.23347350033714379},{x:.5815905637246603,y:.23493510513282764},{x:.580857954063737,y:.2377993509905685},{x:.5803127220992973,y:.2407050941577823},{x:.5648357220992973,y:.2937960941577823},{x:.5632290277642941,y:.2977974374258546},{x:.5616400226499054,y:.30180583827676916},{x:.5384240226499054,y:.3468838382767692},{x:.5373215489467563,y:.3485896803397862},{x:.5364060617863755,y:.35040275195151915},{x:.5349331318310961,y:.3522852445680167},{x:.5336357086983223,y:.35429272914301846},{x:.5322216254408594,y:.35575071197935654},{x:.5309700163849885,y:.3573503432435408},{x:.49559401638498846,y:.39441334324354077},{x:.4926979475395651,y:.39690515537305066},{x:.48986855873600776,y:.3994724304741097},{x:.48935820160472765,y:.3997787125549045},{x:.48890701524930746,y:.4001669186691625},{x:.48558046512393155,y:.4020458563236817},{x:.4823045917066957,y:.404011815580751},{x:.4336605917066957,y:.42705181558075106},{x:.43309173356321873,y:.4272557130907893},{x:.4325654489917744,y:.42755269513041455},{x:.42894434743018467,y:.4287422729922158},{x:.4253563740806812,y:.43002832091195864},{x:.42475866795602985,y:.4301173218701226},{x:.42418455747331046,y:.430305924456616},{x:.35674655747331047,y:.44533192445661596},{x:.3529000911149492,y:.4457998510145922},{x:.3490659246900917,y:.4463596961147396},{x:.28494592469009167,y:.4493636961147396},{x:.2805873413475358,y:.449139645094856},{x:.27622830276644406,y:.44892463285807194},{x:.20879130276644411,y:.4389076328580719},{x:.2058686377582091,y:.4381749274884603},{x:.2029059705898912,y:.4376259000221244},{x:.2015992206546876,y:.4371045944779896},{x:.20023455588710068,y:.4367624761715421},{x:.19751099279397463,y:.4354736658725529},{x:.19471236238975773,y:.4343572001231398},{x:.1250653623897577,y:.39829620012313977},{x:.12281565387932818,y:.3968352958512946},{x:.12046004217050754,y:.3955521266688945},{x:.11912493361112,y:.39443863469229795},{x:.1176668837895426,y:.39349181371392206},{x:.11574541108214431,y:.3916200839502759},{x:.11440461043594556,y:.3905018447245139},{x:.11499744675527566,y:.4076710597897629},{x:.14015918883207887,y:.48309781218266834},{x:.17625691985197756,y:.5624688107059582},{x:.22079283681825793,y:.6049160879451294},{x:.2812243215554422,y:.6473094683632384},{x:.35529887985725983,y:.6721340784004237},{x:.44197867319461825,y:.699237682451455},{x:.450099621980826,y:.7026829408131323},{x:.45739239245003865,y:.7076463180152294},{x:.4635767275229571,y:.7139370742553635},{x:.4684149666709443,y:.7213134592991232},{x:.47172117907685873,y:.729492002806001},{x:.4733683088520865,y:.7381584079356077},{x:.4732930577230865,y:.7469796295989887},{x:.471498317548545,y:.7556166731946181},{x:.4680530591868676,y:.7637376219808258},{x:.4630896819847706,y:.7710303924500386},{x:.4567989257446365,y:.7772147275229571},{x:.4494225407008768,y:.7820529666709441},{x:.4412439971939989,y:.7853591790768587},{x:.43257759206439217,y:.7870063088520864},{x:.4237563704010112,y:.7869310577230865},{x:.41511932680538177,y:.7851363175485448},{x:.32800332680538175,y:.7578963175485449},{x:.32758097645219697,y:.7577171382279785},{x:.32713377373466446,y:.7576146941984534},{x:.2464307737346645,y:.7305686941984535},{x:.24453959681011464,y:.7297206474805041},{x:.2425703892464572,y:.7290741531131611},{x:.24052462272791658,y:.727920241844807},{x:.2383814751569417,y:.7269592057619036},{x:.2366920823739949,y:.725758503708645},{x:.23488683737580707,y:.7247402582115807},{x:.16634483737580705,y:.6766572582115807},{x:.16379281785599412,y:.6744641039532857},{x:.16114120086592887,y:.6723924725748345},{x:.10785520086592887,y:.6216054725748346},{x:.10512406158167997,y:.61843588774195},{x:.10236095541706475,y:.6152941312068447},{x:.10224621895073822,y:.6150960484276141},{x:.1020967920615373,y:.6149226331776604},{x:.10003648617852028,y:.6112811321861437},{x:.09793939861820375,y:.6076606883504815},{x:.057256398618203745,y:.5182076883504814},{x:.05649445644348035,y:.515973451082899},{x:.055531562043165734,y:.5138181769891187},{x:.02756156204316574,y:.4299731769891187},{x:.02710606704062858,y:.4279720709807987},{x:.026442901166776424,y:.42602987841114226},{x:.0261294707087366,y:.42368163359604843},{x:.025603668479436986,y:.4213716499642221},{x:.02554732210120287,y:.4193201319800137},{x:.025275801747494525,y:.4172858808521062},{x:.022290801747494524,y:.3308368808521062},{x:.022305383523873214,y:.330608131273329},{x:.022277364333027405,y:.33038063638780973},{x:.021194122115214913,y:.2859434614650037},{x:.02071653916751727,y:.2843071590959475},{x:.01994450211145162,y:.2755194646798348}],[{x:.11034731747482908,y:.25010871966048204},{x:.11054573733688708,y:.2582483748303443},{x:.14138614929871246,y:.28974619429248377},{x:.17280436841728808,y:.32166563054627706},{x:.2294333737827033,y:.3509863272379111},{x:.2851142784460479,y:.35925709287120927},{x:.3409693478959939,y:.3566403020317264},{x:.39969116147327427,y:.34355637352239615},{x:.43624565447916347,y:.3262425111990739},{x:.46138408324665353,y:.29990528863548604},{x:.47964461062187336,y:.2644492215688011},{x:.49182659739178797,y:.22266115801633354},{x:.4903391577658353,y:.18896604218391924},{x:.47066764412974615,y:.14689983627465894},{x:.4322187986209955,y:.11433252320671945},{x:.3738017517723872,y:.08827446060346957},{x:.29512698962943984,y:.08398052210424463},{x:.22766698305582697,y:.09471851188045},{x:.18695506157646963,y:.1216176107024183},{x:.1450838647757246,y:.1654591474507099},{x:.12861258258928074,y:.1968796571354811},{x:.11034731747482908,y:.25010871966048204}]],7:[[{x:.026534000000000002,y:.729004},{x:.027398662381854635,y:.7202249355092742},{x:.029959421036992097,y:.711783245543571},{x:.03411786744638546,y:.7040033395141179},{x:.039714194846605363,y:.6971841948466053},{x:.046533339514117915,y:.6915878674463855},{x:.05431324554357096,y:.6874294210369921},{x:.06275493550927423,y:.6848686623818546},{x:.071534,y:.684004},{x:.4019606654607806,y:.684004},{x:.4004737160341744,y:.6825246433416329},{x:.3773547160341744,y:.6545006433416328},{x:.37631768094411194,y:.6529571778549935},{x:.37511206403824765,y:.6515414747212956},{x:.3516100640382476,y:.6177174747212957},{x:.35070717908442606,y:.6160998190359583},{x:.34962595461558005,y:.6145955036421288},{x:.32637595461558006,y:.5744575036421288},{x:.32562538351875275,y:.5728072168885044},{x:.3246890272988689,y:.5712547864166106},{x:.3023170272988689,y:.5242907864166106},{x:.3017220252289498,y:.5226423026482856},{x:.3009361907094137,y:.5210757809262708},{x:.2800741907094137,y:.4667717809262708},{x:.2796297795277362,y:.4651572895546526},{x:.27899211910181604,y:.46360891205912846},{x:.26027511910181605,y:.40145091205912853},{x:.2599700482242006,y:.399900691568321},{x:.2594722021762355,y:.3984012246220316},{x:.2435242021762355,y:.3278752246220315},{x:.24329560198997774,y:.32604433113097486},{x:.24285939794168837,y:.32425152465814894},{x:.22552039794168838,y:.201651524658149},{x:.22543629437721757,y:.19966542745190077},{x:.2251384028560513,y:.1976999971774209},{x:.21759140285605127,y:.0533799971774209},{x:.2179964236931644,y:.04456775725283754},{x:.22011284489303193,y:.03600385769296016},{x:.22385933357584556,y:.028017404355184638},{x:.22909191428257988,y:.020915312162427036},{x:.23560950187114016,y:.014970510534755857},{x:.24316162910560324,y:.010411454864839347},{x:.25145807197163045,y:.007413347105324521},{x:.2601800028225791,y:.006091402856051323},{x:.26899224274716244,y:.0064964236931644576},{x:.27755614230703984,y:.008612844893031955},{x:.2855425956448154,y:.0123593335758456},{x:.29264468783757297,y:.017591914282579925},{x:.29858948946524416,y:.02410950187114019},{x:.30314854513516065,y:.03166162910560326},{x:.30614665289467546,y:.03995807197163046},{x:.3074685971439487,y:.04868000282257914},{x:.3149118365119932,y:.19101580586964154},{x:.33171443080019297,y:.3098230069615897},{x:.3469078029209317,y:.3770118558572018},{x:.3646876244488305,y:.43605754408347375},{x:.3843219343355222,y:.48716585412502805},{x:.40516196826036527,y:.5309139031705462},{x:.42657620329737017,y:.5678827017045378},{x:.4479617026009278,y:.5986606409626235},{x:.4682073320853445,y:.6232016470905397},{x:.5069453480603512,y:.6602460238293135},{x:.5211069187127709,y:.670919967941474},{x:.553634852004927,y:.6903949675582732},{x:.5545334052571363,y:.6910607030437311},{x:.5555196604858821,y:.6915878674463855},{x:.5580709875097788,y:.6936816874233654},{x:.5607229359621996,y:.6956465083018619},{x:.5614743452153894,y:.6964747509099635},{x:.5623388051533946,y:.6971841948466053},{x:.5644326251303754,y:.699735521870503},{x:.5666502995990071,y:.7021799587443133},{x:.5672256886169725,y:.7031388795761127},{x:.5679351325536145,y:.7040033395141179},{x:.5694909811561905,y:.7069141275182039},{x:.5711891576548912,y:.709744242049125},{x:.5715664145603537,y:.7107969903148255},{x:.5720935789630078,y:.711783245543571},{x:.5730516658019124,y:.7149416345772374},{x:.5741650843601849,y:.7180486670509921},{x:.5743297113818354,y:.7191547862251302},{x:.5746543376181453,y:.7202249355092742},{x:.574977843953461,y:.7235095504532041},{x:.5754637165205229,y:.7267740993542682},{x:.5754093871342436,y:.7278910818973009},{x:.575519,y:.729004},{x:.5751954936646845,y:.7322886149439295},{x:.5750351484302645,y:.735585225488817},{x:.5747639504839017,y:.7366701463880269},{x:.5746543376181453,y:.7377830644907257},{x:.5736962507792408,y:.7409414535243923},{x:.5728958497207748,y:.7441434388186243},{x:.5724182051993175,y:.7451546051722857},{x:.5720935789630078,y:.746224754456429},{x:.570537730360432,y:.749135542460515},{x:.5691280324417267,y:.752119852004927},{x:.5684622969562688,y:.7530184052571364},{x:.5679351325536145,y:.7540046604858821},{x:.5658413125766343,y:.756555987509779},{x:.563876491698138,y:.7592079359621996},{x:.5630482490900365,y:.7599593452153895},{x:.5623388051533946,y:.7608238051533946},{x:.5597874781294971,y:.7629176251303754},{x:.5573430412556867,y:.7651352995990072},{x:.5563841204238874,y:.7657106886169726},{x:.5555196604858821,y:.7664201325536145},{x:.5526088724817957,y:.7679759811561907},{x:.5497787579508749,y:.7696741576548912},{x:.5487260096851745,y:.7700514145603538},{x:.547739754456429,y:.7705785789630079},{x:.5445813654227618,y:.7715366658019126},{x:.5414743329490078,y:.7726500843601849},{x:.5403682137748697,y:.7728147113818356},{x:.5392980644907257,y:.7731393376181454},{x:.5360134495467959,y:.773462843953461},{x:.5327489006457318,y:.7739487165205229},{x:.531631918102699,y:.7738943871342436},{x:.530519,y:.774004},{x:.071534,y:.774004},{x:.06275493550927423,y:.7731393376181454},{x:.054313245543570934,y:.7705785789630079},{x:.046533339514117915,y:.7664201325536145},{x:.039714194846605363,y:.7608238051533946},{x:.03411786744638546,y:.7540046604858821},{x:.029959421036992097,y:.746224754456429},{x:.027398662381854635,y:.7377830644907257},{x:.026534000000000002,y:.729004}]],8:[[{x:.018998734783549534,y:.19034712298183487},{x:.01918983868826437,y:.187136446932327},{x:.01920952916989005,y:.18392014879903562},{x:.019451409422642358,y:.18274188004279768},{x:.019522877627479743,y:.18154116541629586},{x:.0203366813486396,y:.1784294641291047},{x:.020983462121705806,y:.17527880768498513},{x:.021450563544301488,y:.17417036752890672},{x:.021754906310756543,y:.17300666705236456},{x:.02316013582774355,y:.17011352146289485},{x:.024409151469860245,y:.16714958466818597},{x:.06244715146986025,y:.097021584668186},{x:.06364531823888224,y:.0952519506947441},{x:.06465809579443724,y:.09337006609963419},{x:.0661122558858275,y:.09160840391706095},{x:.06739294989385258,y:.08971688123025286},{x:.06891333268610705,y:.08821500101819715},{x:.07027378747657535,y:.08656685940733966},{x:.07204368953204261,y:.0851227396301211},{x:.07366879313388441,y:.08351741302778071},{x:.0754529644913056,y:.08234100299139627},{x:.07710881500204132,y:.08098994152260804},{x:.14910981500204132,y:.03317594152260801},{x:.1504928100364302,y:.03244176283843531},{x:.15177178054792087,y:.031538475488709236},{x:.15438005907773164,y:.030378172358910993},{x:.15690151209615905,y:.029039630272177964},{x:.1584011644246711,y:.028589367572161194},{x:.15983178249634203,y:.027952951404511282},{x:.24949378249634205,y:-.0017990485954887184},{x:.251605077566582,y:-.002276091838878668},{x:.25365804064979064,y:-.002962007073194259},{x:.2558970148670134,y:-.0032458471890824472},{x:.2580984148155577,y:-.003743249464233246},{x:.2602622084630055,y:-.003799233220341744},{x:.26240953986016613,y:-.0040714555567724145},{x:.33848653986016614,y:-.006196455556772458},{x:.34211630259529946,y:-.0059410451417675775},{x:.3457527120689106,y:-.005810898556388326},{x:.34651004211407876,y:-.005631877045722989},{x:.3472863241290845,y:-.005577253499755554},{x:.35079651389094996,y:-.004618619143417753},{x:.3543376604369356,y:-.0037815449929937683},{x:.4535096604369356,y:.03022045500700621},{x:.45591274590665615,y:.03131812424947078},{x:.4583949217344816,y:.03222283453480715},{x:.45991547545056405,y:.03314647083206772},{x:.461533744189149,y:.033885655452327273},{x:.46367651039942226,y:.035431052006208004},{x:.4659344916938285,y:.03680262701864639},{x:.5338604916938285,y:.08780462701864639},{x:.5368034713408607,y:.09050382186837246},{x:.5397962541268131,y:.09314768896709699},{x:.5400513850489728,y:.09348269124727963},{x:.5403617177400871,y:.09376731720532937},{x:.5427215620660051,y:.09698879462990716},{x:.5451410464862535,y:.10016572352111452},{x:.5453259194365666,y:.1005440624001799},{x:.5455747614022292,y:.10088376225489704},{x:.547260782913003,y:.10450372268352329},{x:.5490139895381407,y:.10809162577156875},{x:.5802599895381407,y:.1920326257715688},{x:.5808621946470703,y:.19431314395649216},{x:.5816704362178704,y:.19652903198349428},{x:.5819856183913868,y:.19856748893015458},{x:.5825122482529622,y:.20056180773987195},{x:.5826579751325236,y:.20291599079595712},{x:.5830183882594349,y:.20524698126417715},{x:.5829298310737253,y:.20730775882392333},{x:.5830572695913885,y:.20936649774620245},{x:.5827409180393249,y:.21170387573884492},{x:.582639652248002,y:.21406038999182395},{x:.570412652248002,y:.30012638999182395},{x:.5703409363500996,y:.30042034316527866},{x:.5703238989157716,y:.30072243812390526},{x:.5692961437829783,y:.3047027979582916},{x:.5683217827960937,y:.30869656381164773},{x:.5681940974797931,y:.30897087767968473},{x:.5681184516122305,y:.3092638441298401},{x:.5663339148242972,y:.3129672173863048},{x:.5645991308441736,y:.31669415574996157},{x:.5644203829845738,y:.31693828858446854},{x:.5642890357120441,y:.31721086798977133},{x:.5618162960169492,y:.32049493611094637},{x:.5593877558190667,y:.3238118228336772},{x:.5591648145961691,y:.32401639274673566},{x:.5589828135206953,y:.3242581100335041},{x:.5032838135206953,y:.3848241100335041},{x:.5011622073766187,y:.38671918495638496},{x:.4991781602202921,y:.38875783119234486},{x:.4978799327840818,y:.3896509997457094},{x:.496704700181234,y:.39070074870143656},{x:.4942541493273608,y:.39214550546522026},{x:.4919105049301597,y:.39375791128677606},{x:.42072451102124153,y:.4330589294870645},{x:.4777200661568854,y:.4633968522602595},{x:.4805213378044988,y:.46526159042857346},{x:.48340658539474834,y:.46699355971902134},{x:.4841865730327025,y:.4677014480666941},{x:.48506339053858555,y:.46828512408085676},{x:.487447044167244,y:.4706605328159332},{x:.4899389620874836,y:.4729221066835925},{x:.4905658603159866,y:.4737685611946159},{x:.49131196047780046,y:.47451208064740324},{x:.493186393615322,y:.4773068743236967},{x:.4951892188573616,y:.48001114175313947},{x:.5250762188573616,y:.5299501417531395},{x:.5263287500632193,y:.5326029758232522},{x:.5277533683388757,y:.5351675080991},{x:.5282078804872482,y:.5365829335183069},{x:.5288425912810938,y:.5379272372855163},{x:.5295535131980511,y:.5407734546091212},{x:.5304504424054924,y:.5435666393545394},{x:.5306200854295579,y:.5450435386925929},{x:.5309803397786421,y:.5464858379730204},{x:.5311223320761199,y:.5494160600145488},{x:.5314571037289079,y:.5523305567062068},{x:.5328161037289079,y:.6362725567062067},{x:.5325682225912138,y:.6392892202473488},{x:.5325070847315841,y:.6423154334158161},{x:.5322077563487247,y:.6436760218476847},{x:.5320936668790056,y:.6450644677251389},{x:.5312620268462096,y:.647974807711247},{x:.530611678831884,y:.6509309456375182},{x:.530052664324664,y:.6522069946735811},{x:.5296698946987799,y:.6535465042014387},{x:.5282864552309536,y:.656238677898982},{x:.5270718895714029,y:.659011137860374},{x:.493108889571403,y:.7195761378603741},{x:.49086599866607616,y:.7227903647520136},{x:.4886941713149356,y:.7260530293196586},{x:.4883443495413535,y:.7264040725827037},{x:.48806074906628455,y:.7268104928286833},{x:.4852338901214668,y:.7295253929429124},{x:.4824672795427586,y:.7323016638284542},{x:.4820556943532359,y:.7325777150511769},{x:.48169825452511067,y:.7329209983380867},{x:.4783960621447291,y:.7350322395860499},{x:.4751409876314614,y:.737215426256307},{x:.4058559876314614,y:.774404426256307},{x:.40535390944732597,y:.7746134197603937},{x:.4048950878292554,y:.7749053846735706},{x:.40128606998249994,y:.7763066859700772},{x:.39771184087056327,y:.7777944834687843},{x:.3971786373679402,y:.7779015106266721},{x:.3966716723496766,y:.778098353858693},{x:.39285862044769176,y:.7787686450898307},{x:.3890628142527955,y:.7795305574683767},{x:.38851897614326597,y:.7795315052864096},{x:.3879833501061526,y:.7796256622622586},{x:.29017035010615255,y:.7870576622622585},{x:.28883979914978264,y:.7870279344512828},{x:.28751770557027906,y:.7871806372910648},{x:.2844390802539456,y:.7869296114679608},{x:.28135100845003463,y:.7868606162788429},{x:.2800518232654171,y:.7865718820648824},{x:.2787253424971381,y:.7864637231002555},{x:.20264834249713812,y:.7726567231002556},{x:.20090732012312768,y:.7721604024311715},{x:.19912055356042774,y:.7718689262507037},{x:.1966754417776232,y:.7709540028332816},{x:.19416478523538352,y:.7702382792713757},{x:.19255404347725652,y:.7694118386491953},{x:.19085847331495095,y:.7687773822377194},{x:.12157447331495094,y:.7347753822377193},{x:.11864840230662128,y:.7329636093328938},{x:.1156466869822177,y:.7312801255296781},{x:.11490452792065226,y:.7306454666247165},{x:.11407427694169714,y:.7301313894804525},{x:.11155788892673538,y:.7277835811487093},{x:.10894228211787771,y:.7255468394054793},{x:.1083381992447159,y:.7247795872431081},{x:.10762419278113186,y:.7241134140161837},{x:.10561419113974596,y:.7213197952150451},{x:.1034852091492498,y:.7186157522626143},{x:.05457920914924981,y:.6421127522626143},{x:.05400544809690788,y:.6409849569633866},{x:.05327967340990527,y:.639948436299892},{x:.05200937551205521,y:.6370614399018406},{x:.05057918033015655,y:.6342502218929852},{x:.050236465883645505,y:.633032161635733},{x:.04972685190376166,y:.6318739658087451},{x:.04904418748077848,y:.6287946194110116},{x:.04818991452487371,y:.6257584009293389},{x:.04809141700817653,y:.6244968850866522},{x:.047817547914863534,y:.6232615229122788},{x:.04774875137767971,y:.6201081640700103},{x:.04750322987838258,y:.6169636252890404},{x:.04765273449582791,y:.6157071332072875},{x:.04762513492475421,y:.6144420789610904},{x:.04817285008571219,y:.6113358894861711},{x:.048545515296550656,y:.608203873267779},{x:.04893727666953319,y:.607000691233013},{x:.04915700725673716,y:.6057545602402229},{x:.06817600725673716,y:.537751560240223},{x:.0695259178796919,y:.5342803033966695},{x:.07076883034011841,y:.5307693133112962},{x:.07112252784165454,y:.530174666206544},{x:.07137329591617819,y:.5295298232221028},{x:.07337447700044117,y:.5263886201035727},{x:.07527846743280868,y:.5231875729003385},{x:.0757413786311829,y:.522673354732434},{x:.07611313089295507,y:.5220898246495332},{x:.07868867817173447,y:.5193993899302627},{x:.08118057729149615,y:.5166313000580217},{x:.13823757729149616,y:.46456630005802163},{x:.1415344063491032,y:.46210392848613274},{x:.14479841194755694,y:.45959821041612353},{x:.17870395742216458,y:.4385038845164132},{x:.16590813892329467,y:.43401753680148847},{x:.1630836262780146,y:.43270367241359486},{x:.16018787852971583,y:.4315553012665589},{x:.15909238677042803,y:.43084708753997614},{x:.15790960896480868,y:.43029690071741367},{x:.15539569076452509,y:.4284572467838155},{x:.15277962009410193,y:.4267660089056696},{x:.07398562009410191,y:.3640750089056696},{x:.07334669706368892,y:.36345515994886657},{x:.07261876409580822,y:.3629427646304707},{x:.07018582297292754,y:.3603886489381779},{x:.067654053855944,y:.3579324619307791},{x:.06714833408498834,y:.3571998754981266},{x:.06653435151263618,y:.35655531303498644},{x:.06464644192410274,y:.3535756306924294},{x:.06264249835499126,y:.3506727149773525},{x:.06228941637067996,y:.3498555439546183},{x:.061812979199786275,y:.3491035845207174},{x:.026491979199786284,y:.27897658452071744},{x:.026206182636496978,y:.2782362375154344},{x:.02580526951533789,y:.27755135647970497},{x:.024619992088609113,y:.2741272608068926},{x:.023315086847465263,y:.27074694483548933},{x:.02317921632066564,y:.26996506724675395},{x:.022919620294515476,y:.2692151317381758},{x:.022425125568608657,y:.2656255929487299},{x:.02180476064715109,y:.2620556544171705},{x:.02182403758498896,y:.26126229336223583},{x:.021715734783549545,y:.26047612298183487},{x:.018998734783549534,y:.19034712298183487}],[{x:.10940940002433477,y:.19920410482166873},{x:.1112697837122767,y:.2472228194523932},{x:.137749803196691,y:.2997967648781603},{x:.20286290613296581,y:.3516028102138205},{x:.27392321813344717,y:.3765172983642545},{x:.30180455045059645,y:.38547932587505673},{x:.3589974388819276,y:.364332623176267},{x:.44199758150171664,y:.31850914110336725},{x:.48327372240847105,y:.27362627516037924},{x:.4919267227459848,y:.21271770175329152},{x:.46927072007314496,y:.15185335046477932},{x:.41758736799183827,y:.11304708595854013},{x:.33285528741119674,y:.08399594043457195},{x:.2715476841223936,y:.0857083982994813},{x:.19388634557978268,y:.1114782912788902},{x:.13622191473335832,y:.14977174687660325},{x:.10940940002433477,y:.19920410482166873}],[{x:.1412545940070051,y:.610603192179028},{x:.17253143522148345,y:.6595291354872365},{x:.22488466829434647,y:.6852221473073319},{x:.28911227954018853,y:.6968786351876549},{x:.37167628924266627,y:.6906052797020977},{x:.4210229734590171,y:.664118250196117},{x:.4426312796779887,y:.6255849325813003},{x:.4416638895166663,y:.5658316839266069},{x:.4243877259953326,y:.5369644730960824},{x:.3411654121752423,y:.49266641996418925},{x:.3038587353431559,y:.48067475972705925},{x:.2482367446999157,y:.5012406330709052},{x:.1958501022844071,y:.5338329684082593},{x:.1513751879049268,y:.5744167077770947},{x:.1412545940070051,y:.610603192179028}]],9:[[{x:.04617702144416433,y:.5785043710151274},{x:.046308257010348054,y:.5777836867379841},{x:.04632014162646953,y:.5770512474182771},{x:.047097404355444614,y:.5734500590446777},{x:.04775742235616295,y:.5698255492446179},{x:.06775742235616294,y:.499825549244618},{x:.06870401207934061,y:.497431122678351},{x:.06945142103699212,y:.4949672455435709},{x:.07032179921115676,y:.4933388825112154},{x:.07100061044171635,y:.4916218095236955},{x:.07239614115864691,y:.4894580616864063},{x:.07360986744638548,y:.48718733951411786},{x:.07478119941633177,y:.4857600673791044},{x:.07578195180149752,y:.48420841696912487},{x:.07757279404935197,y:.4823584994767568},{x:.07920619484660538,y:.4803681948466053},{x:.1292061948466054,y:.43036819484660543},{x:.1324047212320044,y:.4277432320802026},{x:.1355710052680468,y:.42507946670648067},{x:.13581237417673697,y:.4249466435819557},{x:.13602533951411794,y:.4247718674463855},{x:.13967451194327588,y:.422821344145996},{x:.14329963156393744,y:.42082647364918746},{x:.21329963156393744,y:.39082647364918743},{x:.21510775104315333,y:.39025382151681987},{x:.2168404136401385,y:.3894823898342746},{x:.21930272871556003,y:.3889252240779052},{x:.22170947225776405,y:.3881629808537447},{x:.22359456811709633,y:.38795407868297094},{x:.22544443694348562,y:.38753549554788497},{x:.30544443694348566,y:.37753549554788496},{x:.30933066171136914,y:.37743373006124875},{x:.3132134481214367,y:.3772411973248817},{x:.31373545479679327,y:.3773183852372503},{x:.314262956584918,y:.37730457196617717},{x:.3180943620951528,y:.37796292671622445},{x:.321940103126635,y:.37853158749346005},{x:.39912055139763536,y:.39782669956121014},{x:.3920145202755848,y:.3793136184800785},{x:.3919728818872528,y:.3791621799808353},{x:.39190347676812315,y:.3790212888743934},{x:.33928123709710245,y:.23902627390054626},{x:.29593066247424293,y:.13853176000209894},{x:.2601678276974797,y:.06104561798577861},{x:.25727396725620644,y:.05271224015242973},{x:.25606147289685455,y:.04397442167208486},{x:.2565769400976792,y:.035167952008718584},{x:.2588005597432301,y:.02663125885276897},{x:.2626468793775489,y:.018692402534786497},{x:.2679680870941297,y:.011656468850909336},{x:.274559691864592,y:.005793844786811796},{x:.2821683820142214,y:.0013298276974796769},{x:.29050175984757026,y:-.0015640327437935753},{x:.29923957832791515,y:-.002776527103145486},{x:.30804604799128144,y:-.002261059902320825},{x:.31658274114723106,y:-3744025676995222e-20},{x:.32452159746521353,y:.003808879377548882},{x:.3315575311490907,y:.009130087094129706},{x:.33742015521318824,y:.015721691864591977},{x:.34188417230252033,y:.023330382014221395},{x:.3778841723025203,y:.10133038201422136},{x:.3780704961344211,y:.10186693411204945},{x:.37834550457920557,y:.10236389998544072},{x:.42234550457920556,y:.2043638999854408},{x:.4226728981736059,y:.20538920106595157},{x:.42314852323187685,y:.20635471112560658},{x:.47609350933819694,y:.3472083534084579},{x:.5496013805841499,y:.5387157021808093},{x:.5512752235949963,y:.542063388202502},{x:.5520259437659378,y:.5440252139743784},{x:.5529745491659372,y:.5458993775022888},{x:.553598518494472,y:.5481347580495968},{x:.5544279630456541,y:.5503023109672317},{x:.5547815251174404,y:.5523728990468965},{x:.5553462721645,y:.554396114781092},{x:.555522150986547,y:.5567102734952235},{x:.5559127893965689,y:.5589979940959194},{x:.5558556061770612,y:.5610977729446709},{x:.5560147919588762,y:.5631922898391183},{x:.5557358213499382,y:.5654962948984841},{x:.5556726416037749,y:.5678162673625252},{x:.5552069106120301,y:.5698645436567753},{x:.5549544177082778,y:.5719498706018395},{x:.5349544177082779,y:.6619498706018395},{x:.5345092452033302,y:.663307558548854},{x:.5342480120020212,y:.6647122835522489},{x:.5331378863550271,y:.6674899313564284},{x:.5322058990004909,y:.6703323081518522},{x:.5315044085816177,y:.6715770596583215},{x:.5309741466497647,y:.6729038291953012},{x:.5293434595512297,y:.6754115305058349},{x:.5278748598680685,y:.6780174701150343},{x:.5269440094186665,y:.6791014500786302},{x:.5261650964249364,y:.6802992771399491},{x:.4861650964249363,y:.7302992771399491},{x:.4855393928217795,y:.7309407996522789},{x:.48502142797480674,y:.7316720783612058},{x:.48246447922773295,y:.7340934525762789},{x:.48000567043073006,y:.7366144244690945},{x:.4792668347133476,y:.7371215515888083},{x:.4786161570168623,y:.7377377290536072},{x:.47563595264764597,y:.7396137412876539},{x:.4727325719538572,y:.7416065836124539},{x:.4719089971645242,y:.7419598267287414},{x:.4711506117974981,y:.7424372235949962},{x:.4111506117974981,y:.7724372235949962},{x:.40814803697660645,y:.7735862009991664},{x:.4052110607504687,y:.7748937847545917},{x:.4040364518244048,y:.77515955677446},{x:.40291168903276836,y:.7755899630456542},{x:.39974265347336024,y:.7761310898824948},{x:.39660701348596056,y:.7768405731449995},{x:.3166070134859606,y:.7868395731449994},{x:.31542693671630134,y:.7868704603456931},{x:.31426350899694466,y:.7870703881908964},{x:.3110259999999998,y:.7869856499834279},{x:.3077884910030554,y:.7870703881908964},{x:.3066250632836987,y:.7868704603456931},{x:.30544498651403945,y:.7868395731449994},{x:.22544498651403946,y:.7768405731449995},{x:.22359484289355938,y:.7764219517671516},{x:.22170947225776405,y:.7762130191462554},{x:.21930299190993624,y:.775450859278766},{x:.2168409392495313,y:.7748937847545917},{x:.21510801459933976,y:.7741222619544408},{x:.21329963156393744,y:.7735495263508126},{x:.14329963156393744,y:.7435495263508126},{x:.1396745119432796,y:.741554655854006},{x:.13602533951411788,y:.7396041325536146},{x:.13581237417673678,y:.7394293564180442},{x:.1355710052680468,y:.7392965332935194},{x:.13240472123200803,y:.7366327679198006},{x:.12920619484660534,y:.7340078051533947},{x:.07920619484660535,y:.6840078051533947},{x:.07757279404935197,y:.6820175005232432},{x:.0757819518014975,y:.6801675830308751},{x:.07478119941633177,y:.6786159326208956},{x:.07360986744638545,y:.6771886604858821},{x:.07239614115864686,y:.6749179383135936},{x:.07100061044171635,y:.6727541904763045},{x:.07032179921115676,y:.6710371174887846},{x:.06945142103699209,y:.669408754456429},{x:.06870401207934061,y:.666944877321649},{x:.06775742235616294,y:.664550450755382},{x:.04775742235616295,y:.5945504507553819},{x:.0470974043554446,y:.590925940955322},{x:.04632014162646953,y:.5873247525817227},{x:.046308257010348054,y:.5865923132620157},{x:.04617702144416433,y:.5858716289848723},{x:.0462367922883029,y:.5821879999999999},{x:.04617702144416433,y:.5785043710151274}],[{x:.13782670643108905,y:.5821879999999999},{x:.15109114488080894,y:.6286135345740196},{x:.18671787059591238,y:.6642402602891231},{x:.24291204200407931,y:.688323476606909},{x:.311026,y:.696836869931924},{x:.377796042530131,y:.6884914492411893},{x:.4220611757635009,y:.6663588826245044},{x:.4493630453483168,y:.6322315456434845},{x:.46363172164975686,y:.5680225022870041},{x:.4540425513192988,y:.5488441616260881},{x:.42235697647551157,y:.5171585867823008},{x:.37255000597497323,y:.48395393978194207},{x:.30826669745594837,y:.4678831126521858},{x:.24291230161158606,y:.4760524121327311},{x:.1867178705959123,y:.500135739710877},{x:.15109114488080894,y:.5357624654259804},{x:.13782670643108905,y:.5821879999999999}]],\"!\":[[{x:.20646600000000004,y:.05103000000000002},{x:.20733066238185466,y:.04225093550927423},{x:.20989142103699213,y:.03380924554357098},{x:.2140498674463855,y:.026029339514117927},{x:.21964619484660539,y:.019210194846605383},{x:.22646533951411793,y:.013613867446385479},{x:.23424524554357098,y:.009455421036992116},{x:.24268693550927425,y:.006894662381854655},{x:.251466,y:.0060300000000000215},{x:.350587,y:.0060300000000000215},{x:.3593660644907258,y:.006894662381854655},{x:.36780775445642905,y:.009455421036992116},{x:.3755876604858821,y:.013613867446385479},{x:.38240680515339465,y:.019210194846605383},{x:.3880031325536145,y:.026029339514117927},{x:.3921615789630079,y:.03380924554357098},{x:.39472233761814535,y:.04225093550927425},{x:.39558699999999997,y:.05103000000000002},{x:.39472233761814535,y:.05980906449072579},{x:.3921615789630079,y:.06825075445642906},{x:.3880031325536145,y:.07603066048588211},{x:.38240680515339465,y:.08284980515339466},{x:.3755876604858821,y:.08844613255361455},{x:.36780775445642905,y:.09260457896300792},{x:.3593660644907258,y:.09516533761814538},{x:.350587,y:.09603000000000002},{x:.251466,y:.09603000000000002},{x:.24268693550927425,y:.09516533761814538},{x:.23424524554357098,y:.09260457896300792},{x:.22646533951411793,y:.08844613255361455},{x:.21964619484660539,y:.08284980515339466},{x:.2140498674463855,y:.07603066048588211},{x:.20989142103699213,y:.06825075445642906},{x:.20733066238185466,y:.05980906449072579},{x:.20646600000000004,y:.05103000000000002}],[{x:.25602600000000003,y:.25043400000000005},{x:.25689066238185465,y:.24165493550927428},{x:.2594514210369921,y:.233213245543571},{x:.2636098674463855,y:.22543333951411795},{x:.26920619484660535,y:.2186141948466054},{x:.27602533951411795,y:.2130178674463855},{x:.283805245543571,y:.20885942103699215},{x:.2922469355092743,y:.20629866238185468},{x:.301026,y:.20543400000000006},{x:.3098050644907258,y:.20629866238185468},{x:.3182467544564291,y:.20885942103699215},{x:.32602666048588214,y:.2130178674463855},{x:.3328458051533947,y:.2186141948466054},{x:.33844213255361455,y:.22543333951411795},{x:.34260057896300794,y:.233213245543571},{x:.3451613376181454,y:.24165493550927428},{x:.346026,y:.25043400000000005},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.25043400000000005}]],'\"':[[{x:.12004,y:.476978},{x:.12090466238185463,y:.4681989355092742},{x:.1234654210369921,y:.459757245543571},{x:.12762386744638546,y:.4519773395141179},{x:.13322019484660536,y:.44515819484660535},{x:.1400393395141179,y:.4395618674463855},{x:.14781924554357095,y:.4354034210369921},{x:.15626093550927422,y:.43284266238185465},{x:.16504,y:.43197800000000003},{x:.17381906449072576,y:.43284266238185465},{x:.18226075445642903,y:.4354034210369921},{x:.19004066048588208,y:.4395618674463855},{x:.19685980515339463,y:.44515819484660535},{x:.20245613255361453,y:.4519773395141179},{x:.2066145789630079,y:.459757245543571},{x:.20917533761814536,y:.4681989355092742},{x:.21004,y:.476978},{x:.21004,y:.729004},{x:.20917533761814536,y:.7377830644907257},{x:.2066145789630079,y:.746224754456429},{x:.20245613255361453,y:.7540046604858821},{x:.19685980515339463,y:.7608238051533946},{x:.19004066048588208,y:.7664201325536145},{x:.18226075445642903,y:.7705785789630079},{x:.17381906449072576,y:.7731393376181454},{x:.16504,y:.774004},{x:.15626093550927422,y:.7731393376181454},{x:.14781924554357095,y:.7705785789630079},{x:.1400393395141179,y:.7664201325536145},{x:.13322019484660536,y:.7608238051533946},{x:.12762386744638546,y:.7540046604858821},{x:.1234654210369921,y:.746224754456429},{x:.12090466238185463,y:.7377830644907257},{x:.12004,y:.729004},{x:.12004,y:.476978}],[{x:.392013,y:.476978},{x:.3928776623818546,y:.4681989355092742},{x:.39543842103699206,y:.459757245543571},{x:.39959686744638545,y:.4519773395141179},{x:.4051931948466053,y:.44515819484660535},{x:.4120123395141179,y:.4395618674463855},{x:.419792245543571,y:.4354034210369921},{x:.42823393550927424,y:.43284266238185465},{x:.437013,y:.43197800000000003},{x:.4457920644907258,y:.43284266238185465},{x:.45423375445642905,y:.4354034210369921},{x:.4620136604858821,y:.4395618674463855},{x:.46883280515339465,y:.44515819484660535},{x:.4744291325536145,y:.4519773395141179},{x:.4785875789630079,y:.459757245543571},{x:.48114833761814535,y:.4681989355092742},{x:.48201299999999997,y:.476978},{x:.48201299999999997,y:.729004},{x:.48114833761814535,y:.7377830644907257},{x:.4785875789630079,y:.746224754456429},{x:.4744291325536145,y:.7540046604858821},{x:.46883280515339465,y:.7608238051533946},{x:.4620136604858821,y:.7664201325536145},{x:.45423375445642905,y:.7705785789630079},{x:.4457920644907258,y:.7731393376181454},{x:.437013,y:.774004},{x:.42823393550927424,y:.7731393376181454},{x:.419792245543571,y:.7705785789630079},{x:.4120123395141179,y:.7664201325536145},{x:.4051931948466053,y:.7608238051533946},{x:.39959686744638545,y:.7540046604858821},{x:.39543842103699206,y:.746224754456429},{x:.3928776623818546,y:.7377830644907257},{x:.392013,y:.729004},{x:.392013,y:.476978}]],\"#\":[[{x:-.04343582416242281,y:.17932596542766122},{x:-.043155600373289436,y:.1705088746946064},{x:-.04116063193533153,y:.16191587083690517},{x:-.037527584366828626,y:.15387717817379684},{x:-.03239607364840174,y:.1467017191561739},{x:-.025963300859175642,y:.14066524265003977},{x:-.01847647384989975,y:.13599972706223024},{x:-.010223307183879607,y:.1328844655403335},{x:-.0015209654276611437,y:.13143917583757725},{x:.007296125305393629,y:.13171939962671061},{x:.11028337660265361,y:.14517801654688708},{x:.10171449233133083,y:.05447855391336175},{x:.10174959121806887,y:.04565708110917159},{x:.10350499965956604,y:.03701195788446062},{x:.10691325829386003,y:.02887541147651351},{x:.11184338965300836,y:.02156012480075985},{x:.11810593155372849,y:.015347220221688843},{x:.1254602180228497,y:.01047545617803717},{x:.13362362795569505,y:.007132051829885598},{x:.14228244608663826,y:.005445492331330834},{x:.15110391889082841,y:.0054805912180688685},{x:.1597490421155394,y:.0072359996595660475},{x:.1678855885234865,y:.010644258293860037},{x:.17520087519924016,y:.015574389653008364},{x:.18141377977831116,y:.02183693155372849},{x:.18628554382196283,y:.029191218022849703},{x:.18962894817011441,y:.03735462795569504},{x:.19131550766866917,y:.04601344608663827},{x:.2018142041879224,y:.1571394809935999},{x:.36570083500909,y:.17855657247605955},{x:.35397849233133083,y:.05447855391336175},{x:.35401359121806886,y:.04565708110917159},{x:.35576899965956604,y:.03701195788446062},{x:.35917725829386,y:.02887541147651351},{x:.3641073896530084,y:.02156012480075985},{x:.3703699315537285,y:.015347220221688843},{x:.37772421802284967,y:.01047545617803717},{x:.38588762795569503,y:.007132051829885598},{x:.39454644608663825,y:.005445492331330834},{x:.4033679188908284,y:.0054805912180688685},{x:.4120130421155394,y:.0072359996595660475},{x:.4201495885234865,y:.010644258293860037},{x:.42746487519924015,y:.015574389653008364},{x:.4336777797783111,y:.02183693155372849},{x:.4385495438219628,y:.029191218022849703},{x:.44189294817011443,y:.03735462795569504},{x:.44357950766866916,y:.04601344608663827},{x:.45723166259435877,y:.19051803692277236},{x:.5748861253053936,y:.20589339962671058},{x:.5834791291630949,y:.20788836806466848},{x:.5915178218262032,y:.2115214156331714},{x:.5986932808438261,y:.21665292635159827},{x:.6047297573499603,y:.22308569914082438},{x:.6093952729377698,y:.23057252615010027},{x:.6125105344596665,y:.2388256928161204},{x:.6139558241624228,y:.24752803457233888},{x:.6136756003732894,y:.25634512530539366},{x:.6116806319353315,y:.2649381291630949},{x:.6080475843668286,y:.2729768218262032},{x:.6029160736484017,y:.2801522808438262},{x:.5964833008591757,y:.2861887573499603},{x:.5889964738498997,y:.29085427293776983},{x:.5807433071838796,y:.29396953445966656},{x:.5720409654276611,y:.2954148241624228},{x:.5632238746946063,y:.2951346003732895},{x:.4659139564059225,y:.28241791072205386},{x:.48521785958998953,y:.48674482074743597},{x:.6064180682130128,y:.5025833921657807},{x:.6150110746232834,y:.5045783496089273},{x:.6230497719348954,y:.5082113868918628},{x:.6302252375183169,y:.5133428884292346},{x:.6362617222552247,y:.5197756534947408},{x:.640927247422479,y:.5272624745344501},{x:.6440425195043586,y:.5355156372144642},{x:.645487820341822,y:.544217977121417},{x:.6452076078342193,y:.5530350682130128},{x:.6432126503910727,y:.5616280746232835},{x:.6395796131081373,y:.5696667719348955},{x:.6344481115707654,y:.576842237518317},{x:.6280153465052593,y:.5828787222552247},{x:.6205285254655499,y:.587544247422479},{x:.6122753627855358,y:.5906595195043587},{x:.603573022878583,y:.592104820341822},{x:.5947559317869872,y:.5918246078342193},{x:.493900150869001,y:.5786446677402959},{x:.5066445076686692,y:.7135404460866382},{x:.5066094087819312,y:.7223619188908285},{x:.5048540003404339,y:.7310070421155394},{x:.50144574170614,y:.7391435885234865},{x:.4965156103469916,y:.7464588751992401},{x:.4902530684462715,y:.7526717797783111},{x:.4828987819771503,y:.7575435438219629},{x:.47473537204430494,y:.7608869481701144},{x:.4660765539133617,y:.7625735076686692},{x:.45725508110917157,y:.7625384087819311},{x:.44860995788446056,y:.760783000340434},{x:.4404734114765135,y:.7573747417061399},{x:.43315812480075977,y:.7524446103469916},{x:.4269452202216888,y:.7461820684462716},{x:.42207345617803715,y:.7388277819771503},{x:.41873005182988554,y:.730664372044305},{x:.4170434923313308,y:.7220055539133617},{x:.40236933467780645,y:.5666833238969633},{x:.23848272425781383,y:.5452664483557571},{x:.25438050766866915,y:.7135404460866382},{x:.2543454087819311,y:.7223619188908285},{x:.25259000034043394,y:.7310070421155394},{x:.24918174170614,y:.7391435885234865},{x:.2442516103469916,y:.7464588751992401},{x:.23798906844627152,y:.7526717797783111},{x:.2306347819771503,y:.7575435438219629},{x:.22247137204430495,y:.7608869481701144},{x:.21381255391336174,y:.7625735076686692},{x:.20499108110917158,y:.7625384087819311},{x:.1963459578844606,y:.760783000340434},{x:.18820941147651346,y:.7573747417061399},{x:.1808941248007598,y:.7524446103469916},{x:.17468122022168883,y:.7461820684462716},{x:.16980945617803714,y:.7388277819771503},{x:.16646605182988555,y:.730664372044305},{x:.16477949233133082,y:.7220055539133617},{x:.14695190806661926,y:.5333051045124245},{x:.02716793178698713,y:.5176516078342193},{x:.01857492537671658,y:.5156566503910727},{x:.01053622806510461,y:.5120236131081373},{x:.0033607624816830023,y:.5068921115707654},{x:-.0026757222552247634,y:.5004593465052593},{x:-.0073412474224789775,y:.4929725254655499},{x:-.010456519504358698,y:.48471936278553585},{x:-.011901820341822023,y:.476017022878583},{x:-.011621607834219276,y:.4671999317869871},{x:-.00962665039107264,y:.45860692537671655},{x:-.005993613108137223,y:.45056822806510455},{x:-.0008621115707654614,y:.44339276248168297},{x:.005570653494740684,y:.4373562777447752},{x:.013057474534450029,y:.432690752577521},{x:.02131063721446411,y:.42957548049564126},{x:.03001297712141698,y:.42813017965817796},{x:.03883006821301287,y:.4284103921657807},{x:.13826961678760774,y:.4414052575195645},{x:.1189656704142173,y:.23707789034616855},{x:-.004366125305393629,y:.2209606003732895},{x:-.012959129163094893,y:.21896563193533158},{x:-.0209978218262032,y:.2153325843668287},{x:-.028173280843826164,y:.2102010736484018},{x:-.034209757349960276,y:.2037683008591757},{x:-.03887527293776982,y:.1962814738498998},{x:-.041990534459666565,y:.18802830718387967},{x:-.04343582416242281,y:.17932596542766122}],[{x:.2104964979994861,y:.24903935479288136},{x:.22980043297880234,y:.4533666013628972},{x:.39368704339879496,y:.4747834769041034},{x:.3743831288206537,y:.27045644627534104},{x:.2104964979994861,y:.24903935479288136}]],$:[[{x:.030517420733400163,y:.165091535964518},{x:.03086584266660257,y:.1562768767808978},{x:.032927224468652025,y:.14769956254897784},{x:.06950822446865203,y:.04228956254897785},{x:.0704003940010533,y:.04035550336969822},{x:.07109145007989037,y:.03834080913001754},{x:.07224350295250744,y:.03635998272422403},{x:.073203348392932,y:.034279214644477654},{x:.0744556913660193,y:.03255637151138059},{x:.07552651634405921,y:.03071520740954014},{x:.07704287290513265,y:.02899719639360223},{x:.07839021289928177,y:.02714366624511229},{x:.07995460247492134,y:.0256982470536212},{x:.08136404514878363,y:.02410136799351792},{x:.08318643266605391,y:.022712194567306505},{x:.08486948969354943,y:.02115713247420773},{x:.0866858072576693,y:.0200446838732511},{x:.08837970353582197,y:.01875345702162473},{x:.17373770353582196,y:-.03394954297837521},{x:.17475219432147746,y:-.03444582628601368},{x:.17568351020275566,y:-.03508468417701866},{x:.17870701554383397,y:-.03638050305696308},{x:.18166188368778688,y:-.037826008286632525},{x:.18275370138776084,y:-.03811483831561822},{x:.18379175728720304,y:-.038559730016208084},{x:.18700996854351615,y:-.03924079346911771},{x:.19019006380536974,y:-.04008205754340442},{x:.19131725047775072,y:-.0401523347177012},{x:.19242215448928965,y:-.04038616328932037},{x:.262121,y:-.048110644533924524},{x:.262121,y:-.08350199999999997},{x:.2629856623818546,y:-.09228106449072573},{x:.26554642103699205,y:-.100722754456429},{x:.26970486744638544,y:-.10850266048588206},{x:.2753011948466053,y:-.1153218051533946},{x:.2821203395141179,y:-.1209181325536145},{x:.28990024554357097,y:-.12507657896300786},{x:.29834193550927424,y:-.12763733761814533},{x:.307121,y:-.12850199999999995},{x:.3159000644907258,y:-.12763733761814533},{x:.32434175445642904,y:-.12507657896300786},{x:.3321216604858821,y:-.1209181325536145},{x:.33894080515339464,y:-.1153218051533946},{x:.3445371325536145,y:-.10850266048588206},{x:.3486955789630079,y:-.100722754456429},{x:.35125633761814534,y:-.09228106449072573},{x:.35212099999999996,y:-.08350199999999997},{x:.35212099999999996,y:-.05796857189257534},{x:.3537665284657676,y:-.05798865052825875},{x:.3565834008023822,y:-.05822276473922817},{x:.35816715833059226,y:-.05804234673933715},{x:.35976104048452195,y:-.05806179518994546},{x:.3625398346041163,y:-.05754422155704884},{x:.36534825494544937,y:-.05722429279787242},{x:.3668663832111493,y:-.05673836571308556},{x:.3684334335709129,y:-.056446489484502926},{x:.37105786033397337,y:-.05539674504422484},{x:.37374990266128777,y:-.05453506799769968},{x:.49568890266128773,y:-.0018330679976996528},{x:.4995437197067623,y:.0003036028478311586},{x:.5033988605511543,y:.0024396894158641644},{x:.5034014762743246,y:.0024419030290919073},{x:.503404473339876,y:.00244356426035406},{x:.5067683773534712,y:.005291217073469004},{x:.510132712931077,y:.008138360005776092},{x:.5101348465393426,y:.008141041387321917},{x:.510137461926978,y:.00814325539697476},{x:.5128811799638975,y:.011592456477016289},{x:.5156254207452635,y:.015041241667436683},{x:.5156269902452553,y:.015044287773311453},{x:.5156291234470946,y:.015046969478205698},{x:.5176472159618929,y:.018965167962033513},{x:.519665902312761,y:.02288306052976895},{x:.5684429023127611,y:.1458620605297689},{x:.5688122064775901,y:.14714915498994666},{x:.5693537919217377,y:.14837377040805427},{x:.5700262192706007,y:.15138021786244946},{x:.5708758841928585,y:.15434145989163614},{x:.5709869926090132,y:.15567587086110493},{x:.5712792610244494,y:.1569826137160382},{x:.5713522390683521,y:.16006247719363653},{x:.5716078682563359,y:.16313258119086366},{x:.5714565110896938,y:.16446302800441426},{x:.5714882307651191,y:.1658016809010868},{x:.5709589549987614,y:.16883660297565092},{x:.5706107247661352,y:.1718975865660398},{x:.570202718587728,y:.17317294089875004},{x:.5699726705538047,y:.1744920601570685},{x:.5455836705538047,y:.26233106015706853},{x:.5448796820390573,y:.26415145628779163},{x:.5443792359109676,y:.2660379863232085},{x:.5432925447356423,y:.2682555269445408},{x:.5424018225194911,y:.2705587850827968},{x:.5413562192793141,y:.27220686146627543},{x:.5404973453311464,y:.27395951015977},{x:.5389989139081434,y:.2759224384285429},{x:.5376759632977357,y:.2780076688235372},{x:.5363289272782685,y:.2794200908086057},{x:.5351446315541886,y:.28097150485378414},{x:.5332920437627642,y:.28260438653745124},{x:.5315877050081386,y:.28439145495451523},{x:.529991002048182,y:.2855139439563835},{x:.528526796368706,y:.2868045033815319},{x:.4553637963687061,y:.3395095033815319},{x:.4552094954443409,y:.33959910378534747},{x:.4550747122553104,y:.3397160246969866},{x:.45139660000367776,y:.341813199213456},{x:.44773515946955245,y:.3439393468807752},{x:.44756634322254935,y:.3439971230209339},{x:.4474113397164003,y:.34408550243429054},{x:.4433947629085852,y:.34542481622689836},{x:.43938888509457313,y:.34679579895012297},{x:.43921204103863115,y:.34681953052195974},{x:.439042773913178,y:.34687597206574233},{x:.35212099999999996,y:.3666493043587998},{x:.35212099999999996,y:.6320956693586206},{x:.3838005126074005,y:.6288356018928482},{x:.4577579663937751,y:.5527249728659002},{x:.46449612147708186,y:.5470313904751531},{x:.47221556762189953,y:.5427617575185425},{x:.48061965084199804,y:.5400801535961528},{x:.48938540693229315,y:.5390896312428609},{x:.49817597280212744,y:.5398282556772123},{x:.5066535319349293,y:.5422676419764202},{x:.5144922964874953,y:.5463140458930298},{x:.5213910271340998,y:.551811966393775},{x:.5270846095248467,y:.5585501214770818},{x:.5313542424814575,y:.5662695676218995},{x:.534035846403847,y:.5746736508419981},{x:.535026368757139,y:.5834394069322931},{x:.5342877443227877,y:.5922299728021274},{x:.5318483580235798,y:.6007075319349293},{x:.5278019541069703,y:.6085462964874953},{x:.5223040336062249,y:.6154450271340998},{x:.4369490336062249,y:.7032850271340998},{x:.435089451582588,y:.7048563301588934},{x:.43337550685970433,y:.706585327551969},{x:.43172842132509603,y:.7076963215886295},{x:.4302108785229181,y:.7089786095248467},{x:.4280804818333404,y:.7101569339468108},{x:.4260621594195314,y:.7115183351118896},{x:.4242299779872524,y:.7122866512623272},{x:.42249143237810044,y:.7132482424814575},{x:.4201720909726226,y:.7139883059538676},{x:.4179269538663623,y:.7149297930076584},{x:.4159800862413552,y:.7153259053130885},{x:.41408734915800194,y:.715929846403847},{x:.4116681940261354,y:.716203208702491},{x:.4092825215873294,y:.7166886008255086},{x:.35212099999999996,y:.7225709645831306},{x:.35212099999999996,y:.7597659999999999},{x:.35125633761814534,y:.7685450644907257},{x:.3486955789630079,y:.776986754456429},{x:.3445371325536145,y:.7847666604858821},{x:.33894080515339464,y:.7915858051533946},{x:.3321216604858821,y:.7971821325536145},{x:.32434175445642904,y:.8013405789630078},{x:.3159000644907258,y:.8039013376181453},{x:.307121,y:.804766},{x:.29834193550927424,y:.8039013376181453},{x:.28990024554357097,y:.8013405789630078},{x:.2821203395141179,y:.7971821325536145},{x:.2753011948466053,y:.7915858051533946},{x:.26970486744638544,y:.7847666604858821},{x:.26554642103699205,y:.776986754456429},{x:.2629856623818546,y:.7685450644907257},{x:.262121,y:.7597659999999999},{x:.262121,y:.7318326623736131},{x:.23856652158732947,y:.7342566008255086},{x:.23743405616423266,y:.7342615520061975},{x:.23631438427367413,y:.7344313675125375},{x:.2330314335362298,y:.7342808004350606},{x:.22974506326706257,y:.734295168567351},{x:.22863339192208898,y:.7340790915684273},{x:.22750210485113245,y:.7340272069677483},{x:.2243116092711877,y:.7332390610779145},{x:.22108558260167874,y:.7326120140964958},{x:.22003742624118275,y:.7321832126358507},{x:.21893799871753236,y:.7319116218242595},{x:.21596256725097532,y:.7305161851266182},{x:.21292085857685591,y:.729271820095334},{x:.21197649726195836,y:.7286467727726252},{x:.21095117966878213,y:.7281659128327016},{x:.2083051564782311,y:.7262168111769735},{x:.20556465695803808,y:.7244029483461277},{x:.204760381964467,y:.7236056753794367},{x:.20384857668186554,y:.7229340254890024},{x:.10629557668186554,y:.6350940254890024},{x:.10393291169686979,y:.6325042238563513},{x:.10146752815288923,y:.6300120075116347},{x:.10096488682836192,y:.6292508655939548},{x:.10035013880638408,y:.6285770182897039},{x:.09853811700104832,y:.6255760458964971},{x:.09660631239978806,y:.6226507443205297},{x:.09626182060918942,y:.6218061670735107},{x:.09579034588565258,y:.6210253361666956},{x:.09459860224176168,y:.6177285186990383},{x:.0932746147506803,y:.6144825495908574},{x:.056695614750680294,y:.49150554959085735},{x:.05654965816703397,y:.490750439567249},{x:.05628361804350595,y:.49002883224693095},{x:.05571374572525952,y:.48642582571377374},{x:.055021470477783566,y:.4828443224653027},{x:.055025633066628665,y:.4820752469521588},{x:.05490548343396577,y:.4813156032607913},{x:.055049472757300266,y:.47767065091379934},{x:.05506921600663437,y:.4740229090450286},{x:.05522333780201598,y:.4732694231830167},{x:.05525369594322076,y:.472500935801646},{x:.05610601347919053,y:.46895411111540136},{x:.056837016503334954,y:.46538031130067065},{x:.05713517469108906,y:.46467137112890816},{x:.05731487395982006,y:.46392357259662753},{x:.08169987395982006,y:.39365157259662753},{x:.08192222202041206,y:.3931695328553223},{x:.08205835369770847,y:.3926564352635495},{x:.08376780756696771,y:.3891683934837906},{x:.08539480756850773,y:.3856411369034641},{x:.08570692456181836,y:.38521173737536313},{x:.08594054088151196,y:.3847350567827023},{x:.08829763126802886,y:.38164753465350854},{x:.09058150254284453,y:.37850546527353984},{x:.0909713939878581,y:.378145207541698},{x:.09129351720579659,y:.37772326251599964},{x:.09420766244788897,y:.3751549117812935},{x:.09706063710369874,y:.372518777565862},{x:.09751331969083687,y:.37224150613287915},{x:.09791157079240381,y:.3718905117848512},{x:.17107757079240382,y:.3191875117848513},{x:.17123114354048857,y:.3190983419119289},{x:.17136528774468962,y:.3189819753030134},{x:.17504412834709762,y:.3168843854977816},{x:.17870637355344754,y:.314757953928811},{x:.1788743916234626,y:.3147004579868701},{x:.17902866028359976,y:.31461249756570947},{x:.183046032465951,y:.31327291855818423},{x:.1870527548771027,y:.3119018143721617},{x:.18722876142884332,y:.31187820189800686},{x:.18739722608682208,y:.3118220279342577},{x:.262121,y:.2948235482063542},{x:.262121,y:.04244038202745839},{x:.212402420161311,y:.04795051974434915},{x:.14928483997433578,y:.08692151049617265},{x:.11795277553134796,y:.17720643745102208},{x:.114257651607068,y:.18521678535552225},{x:.10907078710071823,y:.1923523337548876},{x:.10259151030645056,y:.1983388675257922},{x:.09506881619784838,y:.20294632753270694},{x:.08679179769072982,y:.20599765167145945},{x:.07807853596451803,y:.20737557926659977},{x:.06926387678089782,y:.20702715733339738},{x:.0606865625489779,y:.20496577553134793},{x:.052676214644477706,y:.20127065160706795},{x:.04554066624511235,y:.1960837871007182},{x:.039554132474207776,y:.18960451030645054},{x:.034946672467293015,y:.18208181619784836},{x:.03189534832854049,y:.1738047976907298},{x:.030517420733400163,y:.165091535964518}],[{x:.14709211773983194,y:.4797371545422716},{x:.17592903295677773,y:.5766856037244347},{x:.24922570721126042,y:.6426843927572041},{x:.262121,y:.6413573671491031},{x:.262121,y:.3871228845247169},{x:.21626819752335621,y:.3975536737173561},{x:.16206100150816494,y:.4366002507010456},{x:.14709211773983194,y:.4797371545422716}],[{x:.35212099999999996,y:.034163101195078524},{x:.35212099999999996,y:.2743499680404371},{x:.4101709471377665,y:.26114452085874473},{x:.4630938273127818,y:.2230200535785049},{x:.47920731446793274,y:.1649859973145621},{x:.44287681685863156,y:.07338773859643172},{x:.35212099999999996,y:.034163101195078524}]],\"'\":[[{x:.25602600000000003,y:.476978},{x:.25689066238185465,y:.4681989355092742},{x:.2594514210369921,y:.459757245543571},{x:.2636098674463855,y:.4519773395141179},{x:.26920619484660535,y:.44515819484660535},{x:.27602533951411795,y:.4395618674463855},{x:.283805245543571,y:.4354034210369921},{x:.2922469355092743,y:.43284266238185465},{x:.301026,y:.43197800000000003},{x:.3098050644907258,y:.43284266238185465},{x:.3182467544564291,y:.4354034210369921},{x:.32602666048588214,y:.4395618674463855},{x:.3328458051533947,y:.44515819484660535},{x:.33844213255361455,y:.4519773395141179},{x:.34260057896300794,y:.459757245543571},{x:.3451613376181454,y:.4681989355092742},{x:.346026,y:.476978},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.476978}]],\"(\":[[{x:.14398102142772873,y:.343473372436119},{x:.14438344127795402,y:.34024506484177663},{x:.14461855620935057,y:.33700027938992067},{x:.15480555620935058,y:.27783527938992064},{x:.15553530200183258,y:.27518493680242373},{x:.1560666158259812,y:.2724877993619115},{x:.1764416158259812,y:.20487079936191147},{x:.17757136816824137,y:.2021290142392397},{x:.17852197521392682,y:.19932008699588913},{x:.2090839752139268,y:.13170208699588917},{x:.21040800505224358,y:.12940389577393302},{x:.21154775445201235,y:.12700896170152925},{x:.25229575445201236,y:.05939296170152925},{x:.2531150427152032,y:.05829379345186112},{x:.2537782786760274,y:.05709399256856861},{x:.29452927867602746,y:-.0020700074314313824},{x:.29560111146026063,y:-.0033391000809501682},{x:.29650963843516415,y:-.004729783512322571},{x:.3372576384351641,y:-.05544378351232261},{x:.3386866074193021,y:-.05690267270426387},{x:.3399537097957662,y:-.05850416001284604},{x:.38070370979576623,y:-.10073716001284601},{x:.38742176905533504,y:-.10645444032360908},{x:.3951261287468799,y:-.11075123635207199},{x:.40352071464810957,y:-.11346242463653189},{x:.41228292753057777,y:-.11448381573166892},{x:.42107604046711683,y:-.11377615815049966},{x:.4295621390588101,y:-.11136664677700951},{x:.4374151072958377,y:-.10734787778201216},{x:.444333160012846,y:-.10187429020423372},{x:.4500504403236091,y:-.09515623094466494},{x:.45434723635207197,y:-.08745187125312004},{x:.4570584246365319,y:-.07905728535189037},{x:.45807981573166895,y:-.07029507246942218},{x:.4573721581504997,y:-.06150195953288313},{x:.45496264677700954,y:-.053015860941189874},{x:.45094387778201217,y:-.04516289270416226},{x:.44547029020423373,y:-.03824483998715393},{x:.4061377413616867,y:.0025191240684850026},{x:.3677075745656829,y:.050348403515145926},{x:.3286739379437331,y:.10701906379590062},{x:.2900025757951927,y:.1711891536907596},{x:.2617573982317254,y:.23368121626802973},{x:.24303344075060918,y:.2958190240226623},{x:.23462816944303005,y:.34463593546989096},{x:.24303340667749923,y:.39345182392970596},{x:.26175739639474455,y:.45558881969516635},{x:.2900026404789191,y:.5180819536434618},{x:.328674029726828,y:.5822520885061939},{x:.36770768599197223,y:.6389237351633864},{x:.4061420841180472,y:.6867582808236831},{x:.4454798975405431,y:.7275528000242046},{x:.45095135740921277,y:.7344725356602282},{x:.45496771125722263,y:.7423267393839987},{x:.45737461285859093,y:.7508135785511003},{x:.458079566334583,y:.759606908691815},{x:.4570554807184589,y:.768368807060192},{x:.4543417110461325,y:.7767625588156633},{x:.4500425459642118,y:.7844655967855365},{x:.4443231999757953,y:.791181897540543},{x:.4374034643397718,y:.7966533574092127},{x:.4295492606160011,y:.8006697112572226},{x:.42106242144889966,y:.8030766128585909},{x:.41226909130818484,y:.803781566334583},{x:.403507192939808,y:.8027574807184589},{x:.39511344118433667,y:.8000437110461325},{x:.3874104032144634,y:.7957445459642117},{x:.38069410245945684,y:.7900251999757952},{x:.33994410245945683,y:.7477661999757953},{x:.338681775527778,y:.7461697396410558},{x:.3372576384351641,y:.7447157835123226},{x:.29650963843516415,y:.6940017835123226},{x:.2956010143988682,y:.6926109515089496},{x:.29452907712829884,y:.6913417148135671},{x:.2537780771282988,y:.6321767148135672},{x:.25311493656839296,y:.6309770641401381},{x:.25229575445201236,y:.6298780382984708},{x:.21154775445201235,y:.5622620382984707},{x:.21040795156345282,y:.5598669918310725},{x:.2090838723444427,y:.5575686854051248},{x:.17852187234444272,y:.48994968540512485},{x:.17757135012625538,y:.48714095747585867},{x:.17644166886939822,y:.4843993766680373},{x:.1560666688693982,y:.4167833766680374},{x:.15553533856931018,y:.4140862136984408},{x:.15480557779123924,y:.4114358459543075},{x:.14461857779123924,y:.3522718459543075},{x:.14438345368873493,y:.3490270611669966},{x:.14398102471397584,y:.3457987547100726},{x:.14406527252602844,y:.3446360634540339},{x:.14398102142772873,y:.343473372436119}]],\")\":[[{x:.14397318426833106,y:-.07029507246942218},{x:.14499457536346808,y:-.07905728535189037},{x:.14770576364792798,y:-.08745187125312004},{x:.1520025596763909,y:-.09515623094466495},{x:.15771983998715397,y:-.10187429020423372},{x:.16463789270416226,y:-.10734787778201214},{x:.1724908609411899,y:-.11136664677700951},{x:.18097695953288315,y:-.11377615815049966},{x:.1897700724694222,y:-.11448381573166892},{x:.19853228535189038,y:-.11346242463653189},{x:.20692687125312006,y:-.11075123635207199},{x:.21463123094466496,y:-.10645444032360907},{x:.22134929020423375,y:-.10073716001284601},{x:.2620992902042337,y:-.05850416001284604},{x:.2633660586938147,y:-.05690309470300352},{x:.26479468609075496,y:-.05544462417080616},{x:.30554468609075497,y:-.004730624170806122},{x:.3064541047100432,y:-.003338648753719708},{x:.307526891803669,y:-.002068307996824087},{x:.348273891803669,y:.05709569200317591},{x:.3489362195699084,y:.058293979727073175},{x:.3497544895549002,y:.059391707275619196},{x:.39050548955490016,y:.12700770727561922},{x:.39164563057902163,y:.12940326331913213},{x:.3929700247860732,y:.13170208699588917},{x:.42353202478607316,y:.19932008699588913},{x:.4244827292530259,y:.20212930210713742},{x:.4256125601984483,y:.2048713835354543},{x:.4459865601984483,y:.27248838353545435},{x:.4465177787005257,y:.27518522990297933},{x:.4472474437906494,y:.27783527938992064},{x:.4574344437906494,y:.33700027938992067},{x:.45766955872204595,y:.3402450648417768},{x:.4580719785722712,y:.34347337243611903},{x:.45798772747397154,y:.3446360634540339},{x:.4580719752860241,y:.3457987547100726},{x:.45766954631126505,y:.34902706116699656},{x:.45743442220876074,y:.3522718459543075},{x:.44724742220876074,y:.4114358459543075},{x:.4465177421348676,y:.414085920594514},{x:.44598650715958776,y:.4167827924880124},{x:.42561250715958776,y:.4843987924880123},{x:.42448274729464536,y:.48714066960378194},{x:.42353212765555726,y:.48994968540512485},{x:.3929701276555573,y:.5575686854051248},{x:.39164568407140216,y:.5598676242877579},{x:.39050548955490016,y:.5622632927243807},{x:.3497544895549002,y:.6298792927243808},{x:.3489363257182038,y:.6309768778726063},{x:.34827409333092635,y:.6321750153799588},{x:.3075270933309263,y:.6913400153799587},{x:.3064542017711834,y:.692610500189881},{x:.30554468609075497,y:.6940026241708062},{x:.26479468609075496,y:.7447166241708062},{x:.26337089070969094,y:.7461701617493295},{x:.2621088975405431,y:.7477661999757953},{x:.2213588975405431,y:.7900251999757952},{x:.21464259678553657,y:.7957445459642117},{x:.20693955881566328,y:.8000437110461325},{x:.19854580706019195,y:.8027574807184589},{x:.1897839086918151,y:.803781566334583},{x:.1809905785511003,y:.8030766128585909},{x:.17250373938399882,y:.8006697112572226},{x:.16464953566022822,y:.7966533574092127},{x:.15772980002420467,y:.791181897540543},{x:.15201045403578817,y:.7844655967855365},{x:.14771128895386743,y:.7767625588156633},{x:.14499751928154103,y:.7683688070601918},{x:.14397343366541698,y:.759606908691815},{x:.14467838714140904,y:.7508135785511002},{x:.14708528874277732,y:.7423267393839987},{x:.1511016425907872,y:.7344725356602282},{x:.15657310245945688,y:.7275528000242046},{x:.19591129092993145,y:.6867578918874246},{x:.23434697314436972,y:.6389240958672278},{x:.27337685298529213,y:.5822523693404118},{x:.3120516621801016,y:.518081284004684},{x:.34029647741491703,y:.4555890988936643},{x:.35901954136421654,y:.39345212569273014},{x:.36742483055696995,y:.344635935469891},{x:.359019507292604,y:.29581872226323463},{x:.3402964755778617,y:.23368093707349602},{x:.3120517268674457,y:.17118982332763816},{x:.27337694476991303,y:.10701878295300266},{x:.23434708457036935,y:.05034804280413771},{x:.1959156338111051,y:.0025195128948044543},{x:.15658270979576625,y:-.03824483998715393},{x:.1511091222179878,y:-.045162892704162266},{x:.14709035322299047,y:-.053015860941189874},{x:.1446808418495003,y:-.06150195953288312},{x:.14397318426833106,y:-.07029507246942218}]],\"*\":[[{x:.03611444520266741,y:.4654782574484574},{x:.03652686631141767,y:.45666636076295464},{x:.038650478626155074,y:.4481042415682919},{x:.04240367291655979,y:.4401209373034283},{x:.04764221603086716,y:.4330232418741738},{x:.05416479369500318,y:.42708391573544136},{x:.06172074690723879,y:.42253120385992987},{x:.07001970462305517,y:.4195400644118251},{x:.0787427425515426,y:.41822544520266736},{x:.08755463923704532,y:.41863786631141764},{x:.09611675843170807,y:.42076147862615504},{x:.25602600000000003,y:.47756000598755177},{x:.25602600000000003,y:.31805799999999995},{x:.25689066238185465,y:.30927893550927416},{x:.2594514210369921,y:.30083724554357094},{x:.2636098674463855,y:.29305733951411783},{x:.26920619484660535,y:.2862381948466053},{x:.27602533951411795,y:.2806418674463854},{x:.283805245543571,y:.276483421036992},{x:.2922469355092743,y:.2739226623818546},{x:.301026,y:.27305799999999997},{x:.3098050644907258,y:.2739226623818546},{x:.3182467544564291,y:.276483421036992},{x:.32602666048588214,y:.2806418674463854},{x:.3328458051533947,y:.2862381948466053},{x:.33844213255361455,y:.29305733951411783},{x:.34260057896300794,y:.30083724554357094},{x:.3451613376181454,y:.30927893550927416},{x:.346026,y:.31805799999999995},{x:.346026,y:.47756000598755177},{x:.505935241568292,y:.42076147862615504},{x:.5144973607629547,y:.41863786631141764},{x:.5233092574484575,y:.41822544520266736},{x:.5320322953769449,y:.4195400644118251},{x:.5403312530927612,y:.42253120385992987},{x:.5478872063049969,y:.42708391573544136},{x:.5544097839691329,y:.4330232418741738},{x:.5596483270834403,y:.4401209373034283},{x:.5634015213738449,y:.4481042415682919},{x:.5655251336885824,y:.45666636076295464},{x:.5659375547973327,y:.4654782574484574},{x:.5646229355881749,y:.4742012953769448},{x:.5616317961400701,y:.4825002530927612},{x:.5570790842645587,y:.4900562063049968},{x:.5511397581258262,y:.4965787839691328},{x:.5440420626965717,y:.5018173270834402},{x:.5360587584317081,y:.5055705213738448},{x:.37146215609131306,y:.5640339630732496},{x:.47696549129035026,y:.7165911114148321},{x:.48124783600971727,y:.7243035129909579},{x:.48394328176908086,y:.732703166943666},{x:.4849482440995321,y:.7414672792821342},{x:.48422410286230105,y:.7502590500841659},{x:.48179868639903156,y:.758740616528321},{x:.47776520210421775,y:.7665860367726678},{x:.4722786545173053,y:.7734938157169785},{x:.4655498885851679,y:.7791984912903502},{x:.45783748700904214,y:.7834808360097172},{x:.449437833056334,y:.7861762817690807},{x:.4406737207178658,y:.7871812440995319},{x:.431881949915834,y:.786457102862301},{x:.4234003834716789,y:.7840316863990314},{x:.4155549632273321,y:.7799982021042177},{x:.40864718428302144,y:.7745116545173052},{x:.40294250870964976,y:.7677828885851677},{x:.301026,y:.6204122684209616},{x:.19910949129035027,y:.7677828885851677},{x:.19340481571697854,y:.7745116545173052},{x:.18649703677266788,y:.7799982021042177},{x:.17865161652832107,y:.7840316863990314},{x:.17017005008416597,y:.786457102862301},{x:.1613782792821342,y:.7871812440995319},{x:.15261416694366597,y:.7861762817690807},{x:.14421451299095783,y:.7834808360097172},{x:.13650211141483212,y:.7791984912903502},{x:.12977334548269473,y:.7734938157169785},{x:.12428679789578226,y:.7665860367726678},{x:.12025331360096844,y:.758740616528321},{x:.11782789713769894,y:.7502590500841659},{x:.11710375590046794,y:.7414672792821342},{x:.11810871823091917,y:.732703166943666},{x:.12080416399028275,y:.7243035129909579},{x:.1250865087096497,y:.7165911114148321},{x:.23058984390868703,y:.5640339630732496},{x:.06599324156829194,y:.5055705213738448},{x:.058009937303428294,y:.5018173270834402},{x:.05091224187417384,y:.4965787839691328},{x:.04497291573544139,y:.4900562063049968},{x:.04042020385992993,y:.4825002530927612},{x:.03742906441182516,y:.4742012953769448},{x:.03611444520266741,y:.4654782574484574}]],\"+\":[[{x:-.002030999999999998,y:.33155},{x:-.0011663376181453647,y:.3227709355092742},{x:.0013944210369920967,y:.314329245543571},{x:.005552867446385459,y:.3065493395141179},{x:.011149194846605363,y:.29973019484660535},{x:.017968339514117915,y:.2941338674463855},{x:.025748245543570962,y:.2899754210369921},{x:.03418993550927423,y:.28741466238185465},{x:.042969,y:.28655},{x:.256023,y:.28655},{x:.256023,y:.09133899999999995},{x:.2568876623818546,y:.08255993550927418},{x:.25944842103699206,y:.07411824554357091},{x:.26360686744638545,y:.06633833951411786},{x:.2692031948466054,y:.05951919484660531},{x:.2760223395141179,y:.053922867446385414},{x:.2838022455435709,y:.049764421036992045},{x:.2922439355092742,y:.04720366238185458},{x:.301023,y:.04633899999999995},{x:.3098020644907258,y:.04720366238185458},{x:.31824375445642905,y:.049764421036992045},{x:.3260236604858821,y:.053922867446385414},{x:.3328428051533946,y:.05951919484660531},{x:.3384391325536145,y:.06633833951411786},{x:.3425975789630079,y:.07411824554357091},{x:.34515833761814535,y:.08255993550927418},{x:.34602299999999997,y:.09133899999999995},{x:.34602299999999997,y:.28655},{x:.559083,y:.28655},{x:.5678620644907257,y:.28741466238185465},{x:.576303754456429,y:.2899754210369921},{x:.5840836604858821,y:.2941338674463855},{x:.5909028051533947,y:.29973019484660535},{x:.5964991325536145,y:.3065493395141179},{x:.6006575789630079,y:.314329245543571},{x:.6032183376181454,y:.3227709355092742},{x:.604083,y:.33155},{x:.6032183376181454,y:.3403290644907258},{x:.6006575789630079,y:.348770754456429},{x:.5964991325536145,y:.35655066048588213},{x:.5909028051533947,y:.3633698051533947},{x:.5840836604858821,y:.36896613255361455},{x:.576303754456429,y:.37312457896300794},{x:.5678620644907257,y:.3756853376181454},{x:.559083,y:.37655},{x:.34602299999999997,y:.37655},{x:.34602299999999997,y:.571777},{x:.34515833761814535,y:.5805560644907257},{x:.3425975789630079,y:.588997754456429},{x:.3384391325536145,y:.5967776604858821},{x:.3328428051533946,y:.6035968051533946},{x:.3260236604858821,y:.6091931325536145},{x:.31824375445642905,y:.6133515789630078},{x:.3098020644907258,y:.6159123376181453},{x:.301023,y:.616777},{x:.2922439355092742,y:.6159123376181453},{x:.2838022455435709,y:.6133515789630078},{x:.2760223395141179,y:.6091931325536145},{x:.2692031948466054,y:.6035968051533946},{x:.26360686744638545,y:.5967776604858821},{x:.25944842103699206,y:.588997754456429},{x:.2568876623818546,y:.5805560644907257},{x:.256023,y:.571777},{x:.256023,y:.37655},{x:.042969,y:.37655},{x:.03418993550927421,y:.3756853376181454},{x:.025748245543570934,y:.37312457896300794},{x:.017968339514117904,y:.36896613255361455},{x:.011149194846605356,y:.3633698051533947},{x:.005552867446385459,y:.35655066048588213},{x:.0013944210369920967,y:.348770754456429},{x:-.0011663376181453647,y:.3403290644907258},{x:-.002030999999999998,y:.33155}]],\",\":[[{x:.1703425796668749,y:-.03158948169003215},{x:.1707557440557006,y:-.035050650253961146},{x:.17102563140319493,y:-.03852592771911176},{x:.17127771326913271,y:-.039423300660751795},{x:.17138819577001116,y:-.0403488367651378},{x:.1724686618106471,y:-.0436628955719719},{x:.1734113563482083,y:-.04701874414557815},{x:.1738336633079298,y:-.04784969558537063},{x:.17412258605517572,y:-.048735893706360625},{x:.1758288320436127,y:-.05177548533469908},{x:.17740810654883146,y:-.054882941638058576},{x:.177984409582707,y:-.05561553857817519},{x:.17844066943717352,y:-.05642834261896521},{x:.18070712529694977,y:-.05907665726715373},{x:.18286228913625774,y:-.06181630349720979},{x:.26855428913625773,y:-.1511263034972098},{x:.27525630293239317,y:-.15686238451505874},{x:.2829485933055849,y:-.16118075031492074},{x:.2913355498506774,y:-.16391544852087458},{x:.3000948665311021,y:-.16496138621450188},{x:.3088899277191117,y:-.1642783685968051},{x:.3173827441455781,y:-.16189264365179173},{x:.3252469416380585,y:-.15789589345116858},{x:.33218030349720973,y:-.1524417108637423},{x:.3379163845150587,y:-.14573969706760687},{x:.3422347503149207,y:-.13804740669441512},{x:.3449694485208745,y:-.12966045014932262},{x:.3460153862145018,y:-.12090113346889794},{x:.34533236859680505,y:-.11210607228088836},{x:.34294664365179167,y:-.10361325585442197},{x:.33894989345116855,y:-.09574905836194152},{x:.33349571086374225,y:-.08881569650279031},{x:.277697993368333,y:-.03066214483501502},{x:.41918956700521515,y:.11679250439324337},{x:.42464400414059766,y:.12372566600271688},{x:.42864104306488354,y:.1315897167531037},{x:.43102707981377775,y:.14008244558427704},{x:.4317104203331251,y:.14887748169003212},{x:.4306648042299889,y:.15763683676513773},{x:.4279304139448243,y:.1660238937063606},{x:.4236123305628265,y:.17371634261896518},{x:.41787649560675666,y:.1804185670052151},{x:.41094333399728317,y:.18587300414059763},{x:.4030792832468963,y:.18987004306488353},{x:.39458655441572293,y:.19225607981377774},{x:.3857915183099679,y:.19293942033312508},{x:.37703216323486227,y:.19189380422998883},{x:.36864510629363945,y:.18915941394482427},{x:.3609526573810348,y:.18484133056282648},{x:.35425043299478487,y:.17910549560675662},{x:.18286343299478489,y:.000495495606756581},{x:.18070816857348473,y:-.0022440714967103576},{x:.1784416154849413,y:-.004892302932393237},{x:.17798532578947307,y:-.005705090221499034},{x:.17740899585940237,y:-.006437666002716908},{x:.1758296072680145,y:-.009545064322455634},{x:.1741232496850793,y:-.012584593305585},{x:.17383429440212667,y:-.013470780818460306},{x:.1734119569351165,y:-.014301716753103766},{x:.1724691391914766,y:-.01765753071433596},{x:.17138855147912546,y:-.02097154985067746},{x:.17127803499816427,y:-.02189708189818214},{x:.17102592018622226,y:-.022794445584277102},{x:.17075590524748027,y:-.02626971313843455},{x:.17034261378549817,y:-.029730866531102167},{x:.17041478319291342,y:-.03066017543569507},{x:.1703425796668749,y:-.03158948169003215}]],\"-\":[[{x:.12882900000000003,y:.31396500000000005},{x:.12969366238185465,y:.30518593550927425},{x:.13225442103699211,y:.29674424554357104},{x:.13641286744638548,y:.28896433951411793},{x:.14200919484660537,y:.2821451948466054},{x:.14882833951411792,y:.2765488674463855},{x:.15660824554357097,y:.2723904210369921},{x:.16504993550927424,y:.2698296623818547},{x:.173829,y:.26896500000000007},{x:.428224,y:.26896500000000007},{x:.4370030644907258,y:.2698296623818547},{x:.44544475445642906,y:.2723904210369921},{x:.4532246604858821,y:.2765488674463855},{x:.4600438051533946,y:.2821451948466054},{x:.4656401325536145,y:.28896433951411793},{x:.4697985789630079,y:.29674424554357104},{x:.47235933761814536,y:.30518593550927425},{x:.473224,y:.31396500000000005},{x:.47235933761814536,y:.32274406449072585},{x:.4697985789630079,y:.33118575445642906},{x:.4656401325536145,y:.33896566048588217},{x:.4600438051533946,y:.3457848051533947},{x:.4532246604858821,y:.3513811325536146},{x:.44544475445642906,y:.355539578963008},{x:.4370030644907258,y:.3581003376181454},{x:.428224,y:.35896500000000003},{x:.173829,y:.35896500000000003},{x:.16504993550927424,y:.3581003376181454},{x:.15660824554357097,y:.355539578963008},{x:.14882833951411792,y:.3513811325536146},{x:.14200919484660537,y:.3457848051533947},{x:.13641286744638548,y:.33896566048588217},{x:.13225442103699211,y:.33118575445642906},{x:.12969366238185465,y:.32274406449072585},{x:.12882900000000003,y:.31396500000000005}]],\".\":[[{x:.19450299999999998,y:.148926},{x:.19536766238185463,y:.14014693550927423},{x:.1979284210369921,y:.13170524554357096},{x:.20208686744638546,y:.12392533951411791},{x:.20768319484660536,y:.11710619484660537},{x:.2145023395141179,y:.11150986744638547},{x:.22228224554357093,y:.1073514210369921},{x:.2307239355092742,y:.10479066238185464},{x:.239503,y:.103926},{x:.362549,y:.103926},{x:.3713280644907258,y:.10479066238185464},{x:.3797697544564291,y:.1073514210369921},{x:.38754966048588213,y:.11150986744638547},{x:.3943688051533947,y:.11710619484660537},{x:.39996513255361454,y:.12392533951411791},{x:.40412357896300793,y:.13170524554357096},{x:.4066843376181454,y:.14014693550927423},{x:.407549,y:.148926},{x:.4066843376181454,y:.1577050644907258},{x:.40412357896300793,y:.16614675445642904},{x:.39996513255361454,y:.1739266604858821},{x:.3943688051533947,y:.18074580515339464},{x:.38754966048588213,y:.18634213255361454},{x:.3797697544564291,y:.1905005789630079},{x:.3713280644907258,y:.19306133761814537},{x:.362549,y:.193926},{x:.239503,y:.193926},{x:.2307239355092742,y:.19306133761814537},{x:.22228224554357093,y:.1905005789630079},{x:.2145023395141179,y:.18634213255361454},{x:.20768319484660536,y:.18074580515339464},{x:.20208686744638546,y:.1739266604858821},{x:.1979284210369921,y:.16614675445642904},{x:.19536766238185463,y:.1577050644907258},{x:.19450299999999998,y:.148926}]],\"/\":[[{x:.017522651058219416,y:-.036644753012328966},{x:.01865919532569161,y:-.04539277458837648},{x:.02148055556003016,y:-.053750976595687026},{x:.02587830846966649,y:-.06139815801845333},{x:.031683450876571484,y:-.06804044196318723},{x:.038672894413609195,y:-.07342256918292836},{x:.04657803868537635,y:-.0773377075469538},{x:.0550950934307649,y:-.07963540048356893},{x:.0638967530123289,y:-.08022734894178067},{x:.07264477458837641,y:-.07909080467430848},{x:.08100297659568695,y:-.07626944443996993},{x:.08865015801845323,y:-.0718716915303336},{x:.09529244196318715,y:-.0660665491234286},{x:.10067456918292828,y:-.059077105586390885},{x:.5777245691829282,y:.7051758944136092},{x:.5816397075469537,y:.7130810386853763},{x:.5839374004835688,y:.7215980934307649},{x:.5845293489417805,y:.7303997530123288},{x:.5833928046743084,y:.7391477745883763},{x:.5805714444399699,y:.747505976595687},{x:.5761736915303335,y:.7551531580184532},{x:.5703685491234285,y:.7617954419631872},{x:.5633791055863908,y:.7671775691829282},{x:.5554739613146237,y:.7710927075469537},{x:.5469569065692351,y:.7733904004835688},{x:.5381552469876711,y:.7739823489417805},{x:.5294072254116237,y:.7728458046743084},{x:.521049023404313,y:.7700244444399699},{x:.5134018419815468,y:.7656266915303335},{x:.5067595580368128,y:.7598215491234285},{x:.5013774308170718,y:.7528321055863908},{x:.024327430817071727,y:-.011420894413609283},{x:.020412292453046287,y:-.019326038685376436},{x:.018114599516431164,y:-.027843093430764996},{x:.017522651058219416,y:-.036644753012328966}]],\"\u003c\":[[{x:-.002019645490236678,y:.32959917016575135},{x:-.0016099914284145765,y:.3262199732716625},{x:-.0013526191024594778,y:.3228257800560043},{x:-.001080072865731869,y:.3218487260950263},{x:-.0009579981642362373,y:.3208417436418168},{x:.00010303311987996846,y:.3176073966113462},{x:.0010176343561875828,y:.3143286327165328},{x:.0014755574652736251,y:.31342352370653337},{x:.001791739066671412,y:.3124597057316259},{x:.003463372735866293,y:.309494502707312},{x:.00500005526992945,y:.3064571691910689},{x:.005625757523098081,y:.30565878796371126},{x:.0061238953427729045,y:.3047751734513664},{x:.008341891452602095,y:.3021930655225286},{x:.010441601436418424,y:.2995138854085287},{x:.011211037446978121,y:.298852913306643},{x:.011871988327878901,y:.29808345906703315},{x:.014551110531708777,y:.29598367519331337},{x:.017133157288130564,y:.2937656078708368},{x:.01801675806170013,y:.2932674456816211},{x:.018815122032139454,y:.29264172140965955},{x:.021852413166145952,y:.29110495510775264},{x:.024817570086352318,y:.28943323966009543},{x:.5409315700863523,y:.06192123966009548},{x:.5493135321567164,y:.059171271257023414},{x:.5580709293975171,y:.05810938240515066},{x:.5668672199439956,y:.058776380897540545},{x:.5753643672834672,y:.061146634356187606},{x:.583235830808931,y:.06512905526992949},{x:.5901791145914712,y:.07057060143641844},{x:.5959273921291632,y:.07726215728813057},{x:.6002597603399046,y:.08494657008635234},{x:.6030097287429766,y:.09332853215671641},{x:.6040716175948494,y:.10208592939751719},{x:.6034046191024595,y:.11088221994399564},{x:.6010343656438124,y:.11937936728346718},{x:.5970519447300705,y:.12725083080893104},{x:.5916103985635816,y:.13419411459147126},{x:.5849188427118694,y:.1399423921291632},{x:.5772344299136477,y:.14427476033990455},{x:.15453394878652635,y:.33060846154195217},{x:.577233294268374,y:.5169277390666714},{x:.5849178265486336,y:.521259895342773},{x:.5916095409329668,y:.527007988327879},{x:.5970512785903404,y:.5339511220321395},{x:.6010339165943431,y:.5418224757210541},{x:.6034044043999703,y:.5503195576866639},{x:.6040716454902366,y:.5591158298342486},{x:.6030099981642363,y:.5678732563581832},{x:.6002602609333286,y:.5762552942683741},{x:.5959281046572271,y:.5839398265486336},{x:.5901800116721211,y:.5906315409329669},{x:.5832368779678606,y:.5960732785903404},{x:.5753655242789459,y:.6000559165943432},{x:.5668684423133362,y:.6024264043999704},{x:.5580721701657515,y:.6030936454902367},{x:.5493147436418169,y:.6020319981642364},{x:.540932705731626,y:.5992822609333287},{x:.024818705731625975,y:.37178726093332853},{x:.02185350270731245,y:.3701156272641339},{x:.018816169191068974,y:.3685789447300705},{x:.01801778796371134,y:.36795324247690187},{x:.01713417345136639,y:.367455104657227},{x:.01455206552252819,y:.3652371085473975},{x:.011872885408528756,y:.3631373985635815},{x:.011211913306643135,y:.3623679625530219},{x:.010442459067033207,y:.36170701167212105},{x:.008342675193313383,y:.3590278894682912},{x:.006124607870836803,y:.3564458427118694},{x:.005626445681621026,y:.3555622419382997},{x:.005000721409659611,y:.3547638779678605},{x:.0034639551077528313,y:.3517265868338544},{x:.0017922396600954515,y:.3487614299136476},{x:.0014760314771086122,y:.3477976206592673},{x:.0010180834056568513,y:.3468925242789459},{x:.00010339174271701993,y:.34361378560971106},{x:-.0009577287429766018,y:.3403794678432836},{x:-.0010798312165939596,y:.33937248875722786},{x:-.0013524043999703778,y:.33839544231333624},{x:-.001609870336301571,y:.33500125619719334},{x:-.0020196175948493655,y:.3316220706024828},{x:-.001942922029511974,y:.3306106193263084},{x:-.002019645490236678,y:.32959917016575135}]],\"=\":[[{x:-.002030999999999998,y:.19162999999999997},{x:-.0011663376181453647,y:.1828509355092742},{x:.0013944210369920967,y:.17440924554357093},{x:.005552867446385459,y:.16662933951411787},{x:.011149194846605363,y:.15981019484660533},{x:.017968339514117915,y:.15421386744638543},{x:.025748245543570962,y:.15005542103699207},{x:.03418993550927423,y:.1474946623818546},{x:.042969,y:.14662999999999998},{x:.559083,y:.14662999999999998},{x:.5678620644907257,y:.1474946623818546},{x:.576303754456429,y:.15005542103699207},{x:.5840836604858821,y:.15421386744638543},{x:.5909028051533947,y:.15981019484660533},{x:.5964991325536145,y:.16662933951411787},{x:.6006575789630079,y:.17440924554357093},{x:.6032183376181454,y:.1828509355092742},{x:.604083,y:.19162999999999997},{x:.6032183376181454,y:.20040906449072574},{x:.6006575789630079,y:.208850754456429},{x:.5964991325536145,y:.21663066048588206},{x:.5909028051533947,y:.2234498051533946},{x:.5840836604858821,y:.2290461325536145},{x:.576303754456429,y:.23320457896300786},{x:.5678620644907257,y:.23576533761814533},{x:.559083,y:.23662999999999995},{x:.042969,y:.23662999999999995},{x:.03418993550927421,y:.23576533761814533},{x:.025748245543570934,y:.23320457896300786},{x:.017968339514117904,y:.2290461325536145},{x:.011149194846605356,y:.2234498051533946},{x:.005552867446385459,y:.21663066048588206},{x:.0013944210369920967,y:.208850754456429},{x:-.0011663376181453647,y:.20040906449072574},{x:-.002030999999999998,y:.19162999999999997}],[{x:-.002030999999999998,y:.454102},{x:-.0011663376181453647,y:.4453229355092742},{x:.0013944210369920967,y:.436881245543571},{x:.005552867446385459,y:.4291013395141179},{x:.011149194846605363,y:.42228219484660534},{x:.017968339514117915,y:.41668586744638547},{x:.025748245543570962,y:.4125274210369921},{x:.03418993550927423,y:.40996666238185464},{x:.042969,y:.409102},{x:.559083,y:.409102},{x:.5678620644907257,y:.40996666238185464},{x:.576303754456429,y:.4125274210369921},{x:.5840836604858821,y:.41668586744638547},{x:.5909028051533947,y:.42228219484660534},{x:.5964991325536145,y:.4291013395141179},{x:.6006575789630079,y:.436881245543571},{x:.6032183376181454,y:.4453229355092742},{x:.604083,y:.454102},{x:.6032183376181454,y:.4628810644907258},{x:.6006575789630079,y:.471322754456429},{x:.5964991325536145,y:.4791026604858821},{x:.5909028051533947,y:.48592180515339467},{x:.5840836604858821,y:.49151813255361454},{x:.576303754456429,y:.49567657896300793},{x:.5678620644907257,y:.49823733761814537},{x:.559083,y:.499102},{x:.042969,y:.499102},{x:.03418993550927421,y:.49823733761814537},{x:.025748245543570934,y:.49567657896300793},{x:.017968339514117904,y:.49151813255361454},{x:.011149194846605356,y:.48592180515339467},{x:.005552867446385459,y:.4791026604858821},{x:.0013944210369920967,y:.471322754456429},{x:-.0011663376181453647,y:.4628810644907258},{x:-.002030999999999998,y:.454102}]],\"\u003e\":[[{x:-.002019645490236678,y:.5591158298342487},{x:-.0013524043999703708,y:.5503195576866637},{x:.0010180834056568513,y:.5418224757210541},{x:.005000721409659611,y:.5339511220321396},{x:.01044245906703322,y:.527007988327879},{x:.01713417345136643,y:.521259895342773},{x:.024818705731625975,y:.5169277390666714},{x:.44751805121347366,y:.33060846154195217},{x:.024817570086352318,y:.14427476033990455},{x:.017133157288130554,y:.1399423921291632},{x:.01044160143641841,y:.13419411459147126},{x:.00500005526992945,y:.12725083080893107},{x:.0010176343561875828,y:.11937936728346718},{x:-.0013526191024594778,y:.11088221994399562},{x:-.0020196175948493655,y:.10208592939751718},{x:-.0009577287429766018,y:.0933285321567164},{x:.0017922396600954585,y:.08494657008635234},{x:.00612460787083681,y:.07726215728813059},{x:.011872885408528759,y:.07057060143641844},{x:.018816169191068984,y:.06512905526992947},{x:.02668763271653284,y:.061146634356187606},{x:.03518478005600438,y:.058776380897540545},{x:.04398107060248284,y:.05810938240515066},{x:.052738467843283614,y:.05917127125702342},{x:.06112042991364768,y:.06192123966009548},{x:.5772344299136477,y:.28943323966009543},{x:.5801995868338548,y:.29110495510775297},{x:.5832368779678606,y:.2926417214096596},{x:.5840352419382998,y:.29326744568162105},{x:.5849188427118694,y:.2937656078708368},{x:.5875008894682915,y:.29598367519331353},{x:.5901800116721211,y:.29808345906703315},{x:.5908409625530218,y:.2988529133066429},{x:.5916103985635817,y:.29951388540852875},{x:.5937101085473976,y:.3021930655225282},{x:.5959281046572271,y:.3047751734513664},{x:.5964262424769022,y:.30565878796371176},{x:.5970519447300705,y:.30645716919106897},{x:.5985886272641329,y:.3094945027073105},{x:.6002602609333286,y:.31245970573162596},{x:.6005764425347265,y:.31342352370653376},{x:.6010343656438124,y:.31432863271653283},{x:.6019489668801197,y:.31760739661134507},{x:.6030099981642363,y:.32084174364181683},{x:.6031320728657319,y:.3218487260950267},{x:.6034046191024595,y:.3228257800560044},{x:.6036619914284146,y:.3262199732716634},{x:.6040716454902366,y:.32959917016575135},{x:.603994922029512,y:.330610619326308},{x:.6040716175948494,y:.33162207060248283},{x:.6036618703363014,y:.3350012561971954},{x:.6034044043999703,y:.33839544231333624},{x:.6031318312165941,y:.33937248875722736},{x:.6030097287429766,y:.3403794678432836},{x:.6019486082572825,y:.3436137856097129},{x:.6010339165943431,y:.3468925242789459},{x:.6005759685228916,y:.3477976206592668},{x:.6002597603399046,y:.34876142991364767},{x:.5985880448922466,y:.3517265868338553},{x:.5970512785903404,y:.3547638779678605},{x:.596425554318379,y:.35556224193829966},{x:.5959273921291631,y:.35644584271186947},{x:.5937093248066866,y:.3590278894682911},{x:.5916095409329668,y:.36170701167212105},{x:.5908400866933569,y:.3623679625530219},{x:.5901791145914712,y:.36313739856358157},{x:.5874999344774714,y:.3652371085473978},{x:.5849178265486336,y:.367455104657227},{x:.5840342120362888,y:.36795324247690175},{x:.583235830808931,y:.3685789447300705},{x:.5801984972926872,y:.37011562726413405},{x:.577233294268374,y:.37178726093332853},{x:.06111929426837402,y:.5992822609333287},{x:.05273725635818315,y:.6020319981642364},{x:.04397982983424857,y:.6030936454902367},{x:.035183557686663716,y:.6024264043999704},{x:.02668647572105406,y:.6000559165943432},{x:.018815122032139416,y:.5960732785903404},{x:.011871988327878898,y:.5906315409329669},{x:.006123895342772898,y:.5839398265486336},{x:.001791739066671405,y:.5762552942683741},{x:-.0009579981642362442,y:.5678732563581832},{x:-.002019645490236678,y:.5591158298342487}]],A:[[{x:-.026930267425517032,y:.05053409251215203},{x:-.025968910797820398,y:.041765089843587025},{x:-.02331527881378681,y:.03335213247651147},{x:-.019071349062388714,y:.025618525644501258},{x:-.013400213383949137,y:.018861467521053887},{x:-.006519810342180955,y:.013340628060451547},{x:.0013054500325951415,y:.009268170027042777},{x:.009774847372633092,y:.006800595699190677},{x:.018562907487847988,y:.006032732574482988},{x:.02733191015641301,y:.006994089202179622},{x:.035744867523488544,y:.00964772118621321},{x:.043478474355498745,y:.013891650937611293},{x:.05023553247894613,y:.019562786616050876},{x:.055756371939548466,y:.02644318965781906},{x:.05982882997295724,y:.03426845003259516},{x:.15465984441872488,y:.2705423452957767},{x:.155303,y:.27047899999999997},{x:.433548,y:.27047899999999997},{x:.439584057854266,y:.2710734998088117},{x:.5426964027293978,y:.03313672871631684},{x:.5469805748198717,y:.025425342079263714},{x:.5526868446471364,y:.018697928086846893},{x:.559595923461843,y:.013213017486017727},{x:.5674422992397985,y:.009181392315192764},{x:.5759244401601543,y:.006757985668725375},{x:.5847163823041805,y:.006035927704977205},{x:.5934802562658602,y:.007042966706560308},{x:.6018792712836831,y:.009740402729397836},{x:.6095906579207363,y:.01402457481987169},{x:.6163180719131531,y:.019730844647136342},{x:.6218029825139822,y:.026639923461843008},{x:.6258346076848073,y:.03448629923979854},{x:.6282580143312746,y:.042968440160154345},{x:.6289800722950228,y:.05176038230418057},{x:.6279730332934397,y:.060524256265860256},{x:.6252755972706022,y:.0689232712836832},{x:.3314685972706022,y:.7468972712836831},{x:.3293831787279993,y:.7506509647260751},{x:.32731734906238874,y:.7544154743554987},{x:.32724162770964893,y:.7545056950115825},{x:.32718442518012836,y:.7546086579207363},{x:.324406768107635,y:.7578833802211685},{x:.32164621338394916,y:.7611725324789461},{x:.3215543458189217,y:.761246247067332},{x:.32147815535286367,y:.7613360719131531},{x:.3181150035540548,y:.764005977330098},{x:.314765810342181,y:.7666933719395485},{x:.31466132698386995,y:.7667477476499444},{x:.314569076538157,y:.7668209825139822},{x:.31074967405057474,y:.7687834680795742},{x:.3069405499674049,y:.7707658299729572},{x:.30682746605267575,y:.7707987771773066},{x:.30672270076020147,y:.7708526076848072},{x:.3025938250794972,y:.7720322561793334},{x:.29847115262736695,y:.7732334043008093},{x:.2983538139076442,y:.7732436568565263},{x:.29824055983984565,y:.7732760143312747},{x:.29396088134293,y:.7736274925246428},{x:.289683092512152,y:.774001267425517},{x:.28956600824863027,y:.7739884313326351},{x:.2894486176958195,y:.7739980722950228},{x:.2851826020272766,y:.773507873077374},{x:.280914089843587,y:.7730399107978204},{x:.2808017595188513,y:.7730044793401902},{x:.28068474373413976,y:.7729910332934397},{x:.2765963314836881,y:.7716779947458032},{x:.2725011324765115,y:.7703862788137869},{x:.27239787288194656,y:.7703296136024552},{x:.27228572871631684,y:.7702935972706022},{x:.26853203527393116,y:.7682081787280027},{x:.2647675256445013,y:.7661423490623888},{x:.26467730498841713,y:.7660666277096486},{x:.2645743420792637,y:.7660094251801283},{x:.2612996197788366,y:.7632317681076393},{x:.2580104675210539,y:.7604712133839491},{x:.2579367529326681,y:.7603793458189217},{x:.2578469280868469,y:.7603031553528636},{x:.25517702266989234,y:.7569400035540427},{x:.25248962806045155,y:.7535908103421809},{x:.2524352523500559,y:.7534863269838704},{x:.2523620174860177,y:.753394076538157},{x:.2503995319204231,y:.7495746740505695},{x:.24841717002704278,y:.7457655499674049},{x:-.023694829972957243,y:.06779154996740488},{x:-.026162404300809343,y:.05932215262736691},{x:-.026930267425517032,y:.05053409251215203}],[{x:.19075686729109992,y:.36047899999999994},{x:.2917712201653896,y:.6121588409316518},{x:.4008392655839541,y:.36047899999999994},{x:.19075686729109992,y:.36047899999999994}]],B:[[{x:.018964999999999996,y:.05103000000000002},{x:.018993157630992935,y:.05074411077481729},{x:.01896863696544404,y:.050457886669927884},{x:.019425235762019696,y:.046357147889743},{x:.01982966238185463,y:.04225093550927423},{x:.019913053192865363,y:.04197603284668677},{x:.019944843237820968,y:.04169052471317667},{x:.02119268306568244,y:.037757658485048945},{x:.02239042103699209,y:.03380924554357098},{x:.0225258403659196,y:.03355589379873479},{x:.022612719447780122,y:.03328207355405998},{x:.02460384652213923,y:.029668217721559587},{x:.026548867446385453,y:.026029339514117924},{x:.02673111120436309,y:.02580727485250577},{x:.026869740608734982,y:.025555665255108946},{x:.029527637032761178,y:.022399698271204867},{x:.03214519484660536,y:.019210194846605383},{x:.03236725950821749,y:.019027951088627763},{x:.03255231178483501,y:.01880822135423258},{x:.03577483608951879,y:.016231425260229353},{x:.03896433951411791,y:.013613867446385479},{x:.03921769125895406,y:.013478448117457993},{x:.03944205495260531,y:.013299042336531411},{x:.04310536733612953,y:.011400441961238211},{x:.046744245543570956,y:.009455421036992116},{x:.04701914820615845,y:.009372030225981372},{x:.047274201145921,y:.009239842862072495},{x:.051237522567796415,y:.008092400353164256},{x:.055185935509274225,y:.006894662381854655},{x:.05547182473445692,y:.006866504750861718},{x:.05574776537889109,y:.006786615690234012},{x:.05985878761953148,y:.006434426619834929},{x:.063965,y:.0060300000000000215},{x:.06425088922518268,y:.006058157630992957},{x:.06453711333007213,y:.00603363696544406},{x:.4241221133300721,y:.01060563696544408},{x:.4260098351414485,y:.010815826288282449},{x:.4279092214657345,y:.010813640036582327},{x:.43038314701987823,y:.011302774871886453},{x:.43288947528682337,y:.011581843237821021},{x:.43469991915024053,y:.012156270087817089},{x:.43656323581544765,y:.012524677733968342},{x:.4388942001112364,y:.013487052913568918},{x:.44129792644594007,y:.014249719447780182},{x:.4429615180190356,y:.01516630892323094},{x:.4447171588106798,y:.015891152767997317},{x:.5224141588106799,y:.0573061527679973},{x:.525028554951968,y:.05904868699814221},{x:.5277374225537912,y:.06064039332865708},{x:.5286915199232336,y:.06149010807639827},{x:.529754639763497,y:.06219869339105244},{x:.5319788494519322,y:.06441778869965879},{x:.5343251404217865,y:.06650738469209135},{x:.5350951339540482,y:.06752690757225652},{x:.5359995881074716,y:.06842928201075814},{x:.5377481362120787,y:.07103965980959966},{x:.5396416839038074,y:.07354684346181917},{x:.5707946839038074,y:.12450984346181915},{x:.5718407730360667,y:.12667263757185424},{x:.573076251912317,y:.12873311634664666},{x:.5737567016649755,y:.13063382885667474},{x:.5746357412153917,y:.13245124718509382},{x:.57523978983892,y:.1347765656784282},{x:.576049549867314,y:.13703848290314058},{x:.576346114353134,y:.13903542291661675},{x:.5768537026781452,y:.1409894121704204},{x:.5769924975430949,y:.14338789436140983},{x:.5773454200998597,y:.14576432582559334},{x:.5830324200998597,y:.2611263258255933},{x:.5829003037879823,y:.26382496142481277},{x:.5829742287592172,y:.2665258175697889},{x:.5826851199428378,y:.2682203519457296},{x:.5826010630436497,y:.26993731586400416},{x:.5819450076216034,y:.2725583233230625},{x:.5814906012502021,y:.27522170532098544},{x:.5808764603215925,y:.2768272773619606},{x:.5804590555084463,y:.278494851612457},{x:.5793042728181804,y:.28093750708458076},{x:.5783389976861617,y:.283461062658912},{x:.5774234257367941,y:.284915971131802},{x:.5766887136425759,y:.2864700717712602},{x:.575079581335268,y:.2886405053765124},{x:.5736405324246225,y:.2909272557017569},{x:.5044305324246225,y:.38012925570175693},{x:.5017223718437749,y:.38298983800955333},{x:.499075053174031,y:.3859068173944946},{x:.49869279401231464,y:.38618992769627897},{x:.4983657648506557,y:.38653536283797296},{x:.49515156889241035,y:.38881264393905274},{x:.49198604326106643,y:.39115710813128307},{x:.4915558970220145,y:.39136020348505085},{x:.4911677605809681,y:.39163520096290155},{x:.48757104899345777,y:.3932416662216644},{x:.4840089657752798,y:.3949235187770668},{x:.3737297002329455,y:.43429966367120415},{x:.4408630401939032,y:.4733794631163462},{x:.44336631106573315,y:.475186847643908},{x:.4459719275146733,y:.476843279595192},{x:.4469351296354233,y:.4777635673817196},{x:.4480152047486495,y:.4785433915190981},{x:.45011777274311354,y:.48080441158023823},{x:.45235016915983667,y:.4829373462081214},{x:.4531153243813002,y:.4840278623347861},{x:.4540225100120052,y:.48500341457167107},{x:.4556435746202097,y:.4876311804334344},{x:.4574169612623637,y:.4901586502563309},{x:.45795466509848404,y:.4913774867999537},{x:.45865409861163536,y:.4925112772109775},{x:.4597313632297904,y:.4954048053049642},{x:.460977589843244,y:.49822968107500176},{x:.46126717863714684,y:.4995299988307428},{x:.46173198119508085,y:.5007784564862466},{x:.46222404714804793,y:.5038265501505143},{x:.4628952219429378,y:.5068402734760588},{x:.4768502219429378,y:.6216502734760588},{x:.47694604753136066,y:.6258560133977795},{x:.4770801736029929,y:.6300607061367898},{x:.47704647561686464,y:.6302637547476413},{x:.47705116403527437,y:.6304695272224051},{x:.47632464920624185,y:.6346131496757303},{x:.47563590322258376,y:.6387632171212809},{x:.475563239914934,y:.6389557900590453},{x:.4755276940283349,y:.6391585233384632},{x:.47400675833929046,y:.6430807912362932},{x:.4725216084222428,y:.647016748623825},{x:.4724127722032346,y:.6471914454185},{x:.4723383580201142,y:.6473833485763381},{x:.4700814501766401,y:.6509335313629835},{x:.46785696980463054,y:.6545041220574128},{x:.46771614318912413,y:.6546542292091504},{x:.46760572040480797,y:.6548279275146733},{x:.4646995721096373,y:.6578695936566139},{x:.4618212468158623,y:.6609376018599591},{x:.3721282468158623,y:.739463601859959},{x:.3693406873548985,y:.7414576112446344},{x:.36664335021940475,y:.7435720694617842},{x:.36575927454484214,y:.7440194833243711},{x:.36495338890552403,y:.7445959530105889},{x:.3618303796850022,y:.746007822191186},{x:.35877236079175173,y:.7475554273162446},{x:.35781798626885214,y:.7478217696388809},{x:.3569151218394033,y:.7482299421328396},{x:.35357667835226414,y:.7490054137685334},{x:.3502754956523681,y:.7499266922044516},{x:.21714549565236804,y:.7733246922044517},{x:.2164184100494338,y:.7733799121498203},{x:.21571010443589486,y:.773553134187072},{x:.21202614434596675,y:.7737134914026773},{x:.20834928456346336,y:.7739927377465721},{x:.20762539682958886,y:.7739050492917646},{x:.20689690716677497,y:.7739367593459113},{x:.061505907166774995,y:.7659797593459113},{x:.05835682356136361,y:.7654946428322841},{x:.055185935509274225,y:.7651823376181454},{x:.05400593378019863,y:.7648243880069794},{x:.05278721145616079,y:.7646366437616691},{x:.0497932781460736,y:.7635464928911877},{x:.046744245543570956,y:.7626215789630079},{x:.045656749721751114,y:.7620403003359452},{x:.0444980718907103,y:.7616184026130197},{x:.04177434405403643,y:.7599651112722733},{x:.03896433951411791,y:.7584631325536145},{x:.03801114145411163,y:.7576808631223083},{x:.03695703545532078,y:.7570410252146568},{x:.03460818442533898,y:.7548881284626934},{x:.03214519484660536,y:.7528668051533947},{x:.03136292541529926,y:.7519136070933885},{x:.03045389995114224,y:.7510804176129765},{x:.02857019075568381,y:.7485106500646154},{x:.026548867446385453,y:.7460476604858821},{x:.025967588819322866,y:.7449601646640625},{x:.025238577228599887,y:.7439656426153641},{x:.023892399755650346,y:.7410777589963466},{x:.02239042103699209,y:.738267754456429},{x:.022032471425826126,y:.7370877527273536},{x:.021511489215134356,y:.7359701170349662},{x:.02075457631003429,y:.7328750970932278},{x:.01982966238185463,y:.7298260644907257},{x:.019708797589401895,y:.7285989036590902},{x:.01941586581292807,y:.7274011044358949},{x:.019277305214138767,y:.7242178880520896},{x:.018964999999999996,y:.721047},{x:.018964999999999996,y:.05103000000000002}],[{x:.10896499999999999,y:.09660579683225357},{x:.10896499999999999,y:.37786028838708235},{x:.29722384626437015,y:.36605169579422814},{x:.44137514989764515,y:.3145812530901673},{x:.49232133133007555,y:.24891875813083103},{x:.48801965008125897,y:.1616582425292873},{x:.46925190911582665,y:.130956211173677},{x:.41203782454012283,y:.1004592638951106},{x:.10896499999999999,y:.09660579683225357}],[{x:.10896499999999999,y:.47257215902605326},{x:.10896499999999999,y:.6784424315209651},{x:.20665565807681563,y:.6837888736412973},{x:.32230778354311135,y:.6634626629325134},{x:.3846372425734713,y:.608893375476212},{x:.3762519660226853,y:.5399063743443061},{x:.2981741908903496,y:.4944555775409729},{x:.10896499999999999,y:.47257215902605326}]],C:[[{x:.028007484408327545,y:.4010798543150725},{x:.028340096336253087,y:.39680461654123217},{x:.028649292669517497,y:.39252762152779447},{x:.06572429266951751,y:.1769866215277945},{x:.0657499934516808,y:.17689321918606288},{x:.06575739253020782,y:.1767966283931179},{x:.06691993730130205,y:.17264138379230456},{x:.0680646634579554,y:.1684811950870131},{x:.0681080922997215,y:.16839460141895576},{x:.06813419313592875,y:.16830131007962543},{x:.07008504794245551,y:.16445270857242494},{x:.07201939106115751,y:.16059578172109576},{x:.07207887901649253,y:.16051932447281397},{x:.0721226785698821,y:.1604329177209502},{x:.1274306785698821,y:.07363491772095027},{x:.13009575906138268,y:.07023973030268985},{x:.13274648275581225,y:.06683332229320074},{x:.13281865262016482,y:.06677089175108791},{x:.13287757357360944,y:.06669582922279092},{x:.1361538134974972,y:.06388581079003605},{x:.13941816151489866,y:.0610619864944041},{x:.19692016151489866,y:.020443986494404057},{x:.19808425112310213,y:.019782383965415776},{x:.19914710087537263,y:.01896802966513257},{x:.20191114759162085,y:.01760739299916557},{x:.20458957759683996,y:.01608512525217841},{x:.2058603718000633,y:.015663337846789194},{x:.20706167183504787,y:.015071982836463577},{x:.21003805521400143,y:.014276729186446702},{x:.2129619996426652,y:.013306247159584957},{x:.21429066253234816,y:.013140483931242813},{x:.21558424756339917,y:.01279485365228588},{x:.32760524756339915,y:-.005618146347714133},{x:.32775803960473765,y:-.005628051859015257},{x:.32790622767465843,y:-.005666572281957827},{x:.3321581535063009,y:-.005913311337168391},{x:.3364083102547015,y:-.006188849089881349},{x:.3365600989091985,y:-.006168756021014132},{x:.33671295454862427,y:-.006177626226551311},{x:.34093131721939995,y:-.005590114680318674},{x:.3451535631465426,y:-.005031193603710363},{x:.34529851526132993,y:-.004981874120043047},{x:.3454501643137599,y:-.004960753231150514},{x:.44307616431375996,y:.01857424676884946},{x:.4458503498549469,y:.019539172468847843},{x:.4486819664572553,y:.020319643122350156},{x:.45000735163266253,y:.02098507354168687},{x:.45140809089867484,y:.021472282957461515},{x:.45394072357704407,y:.022959884631265325},{x:.4565656691892177,y:.024277779754777677},{x:.4577357684253341,y:.0251889939358613},{x:.459014543037309,y:.025940112433793877},{x:.4612082951993476,y:.027893222383335445},{x:.4635256946335971,y:.029697896006345384},{x:.5358116946335971,y:.09837789600634546},{x:.5383578959705028,y:.10132350300922108},{x:.5409714489909738,y:.10420951799057969},{x:.5412394420583803,y:.10465705806338507},{x:.5415805729157932,y:.10505169984914184},{x:.5435031902892489,y:.10843744707814906},{x:.545503491029224,y:.11177788699125937},{x:.5456790239480676,y:.11226911056087577},{x:.5459366092786453,y:.11272272074420048},{x:.5471617575812067,y:.11641849583208026},{x:.548471935605029,y:.12008498944441898},{x:.572709935605029,y:.21701898944441894},{x:.5740007070580636,y:.2257455880614603},{x:.5735642017652605,y:.23455632455146336},{x:.571417194380227,y:.24311260725223527},{x:.5676421931927146,y:.25108562301800397},{x:.5623842693813143,y:.2581689733242098},{x:.5558454820094204,y:.2640904489909738},{x:.5482771130087407,y:.26862249102922403},{x:.539970010555581,y:.27159093560502906},{x:.5312434119385397,y:.2728817070580635},{x:.5224326754485367,y:.2724452017652604},{x:.5138763927477648,y:.270298194380227},{x:.5059033769819961,y:.26652319319271456},{x:.49882002667579023,y:.2612652693813142},{x:.49289855100902624,y:.25472648200942033},{x:.488366508970776,y:.24715811300874066},{x:.48539806439497096,y:.23885101055558106},{x:.46433420621000654,y:.15461122058523102},{x:.4102697826671089,y:.10324381045150927},{x:.3332137540403124,y:.08466767669890593},{x:.24039332695070226,y:.09992465997883551},{x:.1985742470214596,y:.12946463056361485},{x:.15288732813236672,y:.2011637190451272},{x:.11884238546013813,y:.39908903228895243},{x:.16184523767713488,y:.5942488915238071},{x:.2166399992296726,y:.6603981208316636},{x:.2708106585112101,y:.6880654725502051},{x:.33167151101531583,y:.6962265900331734},{x:.41875307675349,y:.6679697644015699},{x:.4604926982936834,y:.628705384802963},{x:.487421989657252,y:.5630715564186946},{x:.49155436139101494,y:.5552777692634718},{x:.49712782320648147,y:.5484399232752638},{x:.5039281900917167,y:.5428207930406891},{x:.5116941277610109,y:.5386363185834178},{x:.5201271955849208,y:.5360473069101626},{x:.5289033154962927,y:.5351532522875923},{x:.5376852261286371,y:.5359885127334604},{x:.5461354435813054,y:.5385209896572519},{x:.5539292307365281,y:.5426533613910148},{x:.5607670767247361,y:.5482268232064814},{x:.5663862069593109,y:.5550271900917166},{x:.5705706814165822,y:.5627931277610108},{x:.5731596930898373,y:.5712261955849207},{x:.5740537477124077,y:.5800023154962926},{x:.5732184872665396,y:.588784226128637},{x:.570686010342748,y:.5972344435813053},{x:.540057010342748,y:.6718854435813053},{x:.5396985836895672,y:.6725614478775368},{x:.539454213118803,y:.6732865233897278},{x:.5376352487491008,y:.6764529645154376},{x:.5359246386089851,y:.679679230736528},{x:.5354412171276051,y:.6802723202285732},{x:.5350600868536766,y:.680935789284769},{x:.5326583313554347,y:.6836865257875079},{x:.5303511767935185,y:.686517076724736},{x:.5297613381003629,y:.6870044593160238},{x:.5292580947459566,y:.687580825172473},{x:.47307109474595666,y:.7404358251724731},{x:.4722065860115991,y:.7411021817697292},{x:.4714497622811152,y:.7418887085063782},{x:.4687194058651613,y:.7437900730587934},{x:.46608420409854834,y:.7458212660502541},{x:.46510630693397415,y:.746306161504971},{x:.46421058160492856,y:.7469299263656303},{x:.4611617503991064,y:.748262090618912},{x:.45818091720073817,y:.7497401524453693},{x:.45712721164557074,y:.7500249524971546},{x:.4561270069400303,y:.7504619845480405},{x:.3497190069400303,y:.7849899845480404},{x:.34852117258500637,y:.7852523061157466},{x:.34737251112679673,y:.7856814874310271},{x:.34422084285321763,y:.7861940634064482},{x:.3411016855274714,y:.7868771480384597},{x:.33987569082458696,y:.7869007432807547},{x:.3386653714532072,y:.7870975852636362},{x:.3354742629896646,y:.786985452257037},{x:.33228177619648713,y:.7870468942022847},{x:.3310747354346284,y:.7868308563672394},{x:.32984927004476555,y:.7867877944907101},{x:.25121827004476555,y:.7762437944907102},{x:.24809780050166644,y:.7755083028870222},{x:.24494229970605153,y:.7749416523797719},{x:.24381291428322105,y:.7744983594176508},{x:.24263200473447152,y:.7742200201979198},{x:.2397149814324578,y:.772889887451158},{x:.2367306607297473,y:.771718517308175},{x:.16743766072974728,y:.7363275173081749},{x:.16716950847174827,y:.7361554960544541},{x:.16687461978467572,y:.7360349240533984},{x:.16345937419922074,y:.733775423054901},{x:.16001260855282193,y:.7315643025810339},{x:.15978316844705134,y:.7313432727571054},{x:.15951746839392553,y:.7311674875843215},{x:.15660865257214304,y:.7282851209029094},{x:.15365948376641753,y:.7254440558690711},{x:.15347757306746915,y:.725182511527114},{x:.15325127235232486,y:.7249582685082102},{x:.08558827235232488,y:.6432742685082102},{x:.0845522070982367,y:.6417389136031936},{x:.0833480194008015,y:.6403315480201149},{x:.08209078724421986,y:.6380913122274521},{x:.0806538380596292,y:.6359618836319892},{x:.07993721339171088,y:.6342539038369039},{x:.07903072722802115,y:.632638655023214},{x:.07823470075697891,y:.6301961909068614},{x:.07724079305844417,y:.627827343805619},{x:.07687114846079628,y:.6260123758261444},{x:.07629719958575912,y:.6242513168879111},{x:.02905219958575911,y:.40983931688791114},{x:.028544362954760993,y:.4055813372409792},{x:.028013217832748447,y:.4013262022752188},{x:.028022142274708197,y:.401202753871557},{x:.028007484408327545,y:.4010798543150725}]],D:[[{x:.019456783112310236,y:.0515304721392918},{x:.019516560837245702,y:.0508455251733057},{x:.019462408649259272,y:.05016011050819538},{x:.01989956114396584,y:.04645701928180655},{x:.020223754746627687,y:.042742334175020345},{x:.02041601038349858,y:.04208221032853139},{x:.020496616482350807,y:.04139940114622653},{x:.021647806474261868,y:.03785274800035644},{x:.022690469901424933,y:.03427268656062632},{x:.023007815173924504,y:.033662754022853354},{x:.023220081912440925,y:.03300879029730612},{x:.025041069815762075,y:.029754871123364675},{x:.026762134096652887,y:.026447013104097812},{x:.027192373603928278,y:.025910711240413317},{x:.027528143690388265,y:.025310724430849408},{x:.029948949961216734,y:.02247458551787214},{x:.03228227556070457,y:.019566050047680916},{x:.03280887543977226,y:.01912398863794477},{x:.03325524541805519,y:.01860103590097925},{x:.03618283982900684,y:.01629166847686688},{x:.03903875835284746,y:.013894228942745224},{x:.03964148166567549,y:.013563396159022682},{x:.0401812977878431,y:.013137574275061882},{x:.04350317452751879,y:.011443726034814963},{x:.04677193462845869,y:.0096495146935595},{x:.04742761905614622,y:.009442624254195854},{x:.048040136491355995,y:.009130297319436702},{x:.05162863769958001,y:.008117061901006828},{x:.05518462276008175,y:.0069950292882567724},{x:.05586807071778482,y:.006920031876811272},{x:.05652975076450537,y:.006733202440201605},{x:.060246972352300414,y:.0064395179124900545},{x:.06395352786070822,y:.006032783112310258},{x:.06463847482669428,y:.006092560837245719},{x:.06532388949180462,y:.006038408649259287},{x:.22607288949180462,y:.009146408649259287},{x:.22716730592225892,y:.009275605270020776},{x:.2282688262216939,y:.009242558031150067},{x:.23153975417198444,y:.00979177582685766},{x:.23483359885377353,y:.010180616482350843},{x:.23588178136904675,y:.010520840680108605},{x:.23696858346127098,y:.010703324384590318},{x:.374121583461271,y:.04785532438459028},{x:.3763172878682137,y:.048688585594252994},{x:.37858028056243914,y:.049316523610364836},{x:.3804311803743379,y:.05024979166335608},{x:.3823691959266467,y:.050985260963484026},{x:.38436014929137596,y:.0522308719724549},{x:.38645715458576285,y:.05328823230909956},{x:.47004915458576285,y:.1063032323090996},{x:.47296331256678825,y:.10858070495130694},{x:.47594842000778254,y:.11076435600861785},{x:.476434095048061,y:.11129319075325024},{x:.4769998347544389,y:.11173532762855881},{x:.47941368513584726,y:.11453756329148114},{x:.48191542538645477,y:.11726162167794474},{x:.5445294253864548,y:.20053762167794476},{x:.5457907389554543,y:.20261097926106453},{x:.5472304508598836,y:.2045646816997861},{x:.5480776582474705,y:.2063702359380903},{x:.54911422277829,y:.20807414921008693},{x:.5499468085621922,y:.21035373787896267},{x:.5509777083681839,y:.21255077433219424},{x:.570480708368184,y:.26758877433219413},{x:.5715324066676154,y:.27184261440989077},{x:.5725895850614416,y:.2760950958693092},{x:.5821235850614417,y:.3411630958693092},{x:.5823063349967632,y:.3450227385412275},{x:.5825832689280143,y:.34887676846995497},{x:.5805752689280143,y:.424797768469955},{x:.5800798101377765,y:.42875301375722},{x:.5796594372976747,y:.43271694253692033},{x:.5588164372976746,y:.5335539425369203},{x:.5581925601051908,y:.535556542700639},{x:.5577783377379867,y:.5376127649642906},{x:.5568838034059929,y:.5397575559956548},{x:.5561926080991778,y:.5419762423834013},{x:.555190030621201,y:.5438186507441294},{x:.5543826183570809,y:.5457545524985521},{x:.5020956183570809,y:.6430055524985521},{x:.5018901867095668,y:.6433113858234256},{x:.5017428412228655,y:.6436490624319612},{x:.4994325691935421,y:.6469701275279692},{x:.4971767628200625,y:.6503284258808291},{x:.4969156133622187,y:.650588304977856},{x:.4967052216394318,y:.6508907475465959},{x:.49379143318032753,y:.6536972875938759},{x:.49092379998669317,y:.6565509711937552},{x:.49061696854573045,y:.6567549090549786},{x:.49035161582277553,y:.657010494885618},{x:.39890061582277553,y:.7292364948856179},{x:.3986791836579038,y:.7293785203585265},{x:.39848760231040037,y:.7295587979940886},{x:.39496847203231433,y:.7317585520660096},{x:.39147518928128755,y:.7339991259907827},{x:.39123030407812903,y:.7340952232117042},{x:.391007233490524,y:.7342346611962726},{x:.3871265715837099,y:.7357055993513507},{x:.38326329699273004,y:.7372216156196327},{x:.3830043695523095,y:.737268091626259},{x:.38275838220218455,y:.7373613314362847},{x:.25909638220218456,y:.7708063314362847},{x:.2580664240588666,y:.7709788511982676},{x:.2570738325025125,y:.7713034106651087},{x:.2537238261308602,y:.7717062438265866},{x:.2503960471743838,y:.7722636525302581},{x:.2493522224520667,y:.7722319225075465},{x:.24831538485324267,y:.7723566006488801},{x:.17218438485324267,y:.7739936006488801},{x:.16854768223369815,y:.7737142062783378},{x:.16490357022768087,y:.7735589167265521},{x:.06552457022768086,y:.7594769167265522},{x:.06454980411013514,y:.759239472501363},{x:.06355033417502035,y:.7591522452533723},{x:.06027159361314519,y:.7581973390517399},{x:.056953647958865025,y:.7573891174476861},{x:.056043934769293216,y:.7569660682109414},{x:.05508068656062633,y:.7566855300985751},{x:.05205123903764884,y:.7551093215998242},{x:.04895472299174925,y:.7536693306611393},{x:.04814502249785432,y:.7530769339577588},{x:.0472550131040978,y:.7526138659033472},{x:.04459127858939255,y:.7504769279161366},{x:.04183518952697092,y:.7484605056870383},{x:.041156618064647085,y:.7477215269901124},{x:.040374050047680896,y:.7470937244392954},{x:.03817839436480973,y:.744478178292066},{x:.035868647242901154,y:.7419628147479951},{x:.03534728193289863,y:.7411056525944231},{x:.03470222894274521,y:.7403372416471526},{x:.03305902990826266,y:.7373436013115269},{x:.03128438701344127,y:.73442596046285},{x:.030940263632238257,y:.7334835551134912},{x:.030457514693559486,y:.7326040653715413},{x:.029429919524844063,y:.7293473747667649},{x:.028258579388326675,y:.7261395799150647},{x:.028104922404476318,y:.7251481474789881},{x:.02780302928825676,y:.7241913772399183},{x:.02743052789135989,y:.7207967891595589},{x:.026907504457698045,y:.7174221140620348},{x:.02695021882291786,y:.7164197547317572},{x:.026840783112310238,y:.7154224721392919},{x:.019456783112310236,y:.0515304721392918}],[{x:.1099671672449683,y:.09691838411671685},{x:.1164055200593884,y:.675787686211921},{x:.17390769441284104,y:.6839357418297609},{x:.2408956143230629,y:.6824953400894312},{x:.35035782392371695,y:.652890743688808},{x:.42724604872976657,y:.5921661050862587},{x:.4720072878873445,y:.5089126143655517},{x:.4907125333997566,y:.41841792349882906},{x:.4925121994894803,y:.35037387509349616},{x:.4841787199640398,y:.2934992321564965},{x:.4684498534661817,y:.24911194023683725},{x:.41491413338319044,y:.1779099626338861},{x:.34401115658372555,y:.1329424859013802},{x:.21878934362335548,y:.0990224054430332},{x:.1099671672449683,y:.09691838411671685}]],E:[[{x:.035078,y:.05103000000000002},{x:.03594266238185463,y:.04225093550927423},{x:.03850342103699209,y:.03380924554357098},{x:.042661867446385456,y:.026029339514117924},{x:.04825819484660536,y:.019210194846605383},{x:.05507733951411791,y:.013613867446385479},{x:.06285724554357096,y:.009455421036992116},{x:.07129893550927423,y:.006894662381854655},{x:.080078,y:.0060300000000000215},{x:.521974,y:.0060300000000000215},{x:.5307530644907258,y:.006894662381854655},{x:.5391947544564291,y:.009455421036992116},{x:.5469746604858822,y:.013613867446385479},{x:.5537938051533947,y:.019210194846605383},{x:.5593901325536146,y:.026029339514117924},{x:.5635485789630079,y:.03380924554357098},{x:.5661093376181454,y:.04225093550927425},{x:.5669740000000001,y:.05103000000000002},{x:.5661093376181454,y:.05980906449072579},{x:.5635485789630079,y:.06825075445642906},{x:.5593901325536146,y:.07603066048588211},{x:.5537938051533947,y:.08284980515339466},{x:.5469746604858822,y:.08844613255361455},{x:.5391947544564291,y:.09260457896300792},{x:.5307530644907258,y:.09516533761814538},{x:.521974,y:.09603000000000002},{x:.125078,y:.09603000000000002},{x:.125078,y:.345019},{x:.389405,y:.345019},{x:.3981840644907258,y:.34588366238185464},{x:.40662575445642907,y:.3484444210369921},{x:.4144056604858821,y:.35260286744638547},{x:.42122480515339467,y:.35819919484660534},{x:.42682113255361454,y:.3650183395141179},{x:.4309795789630079,y:.372798245543571},{x:.43354033761814537,y:.3812399355092742},{x:.434405,y:.390019},{x:.43354033761814537,y:.3987980644907258},{x:.4309795789630079,y:.407239754456429},{x:.42682113255361454,y:.4150196604858821},{x:.42122480515339467,y:.42183880515339467},{x:.4144056604858821,y:.42743513255361454},{x:.40662575445642907,y:.43159357896300793},{x:.3981840644907258,y:.43415433761814537},{x:.389405,y:.435019},{x:.125078,y:.435019},{x:.125078,y:.684004},{x:.521974,y:.684004},{x:.5307530644907258,y:.6848686623818546},{x:.5391947544564291,y:.6874294210369921},{x:.5469746604858822,y:.6915878674463855},{x:.5537938051533947,y:.6971841948466053},{x:.5593901325536146,y:.7040033395141179},{x:.5635485789630079,y:.711783245543571},{x:.5661093376181454,y:.7202249355092742},{x:.5669740000000001,y:.729004},{x:.5661093376181454,y:.7377830644907257},{x:.5635485789630079,y:.746224754456429},{x:.5593901325536146,y:.7540046604858821},{x:.5537938051533947,y:.7608238051533946},{x:.5469746604858822,y:.7664201325536145},{x:.5391947544564291,y:.7705785789630079},{x:.5307530644907258,y:.7731393376181454},{x:.521974,y:.774004},{x:.080078,y:.774004},{x:.07129893550927423,y:.7731393376181454},{x:.06285724554357093,y:.7705785789630079},{x:.05507733951411791,y:.7664201325536145},{x:.04825819484660536,y:.7608238051533946},{x:.042661867446385456,y:.7540046604858821},{x:.03850342103699209,y:.746224754456429},{x:.03594266238185463,y:.7377830644907257},{x:.035078,y:.729004},{x:.035078,y:.05103000000000002}]],F:[[{x:.041426000000000004,y:.05103000000000002},{x:.04229066238185464,y:.04225093550927423},{x:.0448514210369921,y:.03380924554357098},{x:.04900986744638546,y:.026029339514117924},{x:.054606194846605366,y:.019210194846605383},{x:.06142533951411792,y:.013613867446385479},{x:.06920524554357096,y:.009455421036992116},{x:.07764693550927423,y:.006894662381854655},{x:.086426,y:.0060300000000000215},{x:.09520506449072577,y:.006894662381854655},{x:.10364675445642904,y:.009455421036992116},{x:.11142666048588211,y:.013613867446385486},{x:.11824580515339464,y:.019210194846605383},{x:.12384213255361454,y:.026029339514117924},{x:.1280005789630079,y:.03380924554357098},{x:.13056133761814537,y:.04225093550927425},{x:.131426,y:.05103000000000002},{x:.131426,y:.347323},{x:.447344,y:.347323},{x:.4561230644907258,y:.3481876623818546},{x:.4645647544564291,y:.35074842103699205},{x:.47234466048588214,y:.35490686744638544},{x:.47916380515339463,y:.3605031948466053},{x:.48476013255361455,y:.36732233951411786},{x:.48891857896300794,y:.37510224554357097},{x:.4914793376181454,y:.3835439355092742},{x:.492344,y:.392323},{x:.4914793376181454,y:.4011020644907258},{x:.48891857896300794,y:.409543754456429},{x:.48476013255361455,y:.4173236604858821},{x:.47916380515339463,y:.42414280515339464},{x:.47234466048588214,y:.4297391325536145},{x:.4645647544564291,y:.4338975789630079},{x:.4561230644907258,y:.43645833761814534},{x:.447344,y:.43732299999999996},{x:.131426,y:.43732299999999996},{x:.131426,y:.679393},{x:.515626,y:.679393},{x:.5244050644907258,y:.6802576623818547},{x:.532846754456429,y:.6828184210369922},{x:.5406266604858821,y:.6869768674463855},{x:.5474458051533947,y:.6925731948466054},{x:.5530421325536146,y:.6993923395141179},{x:.5572005789630079,y:.707172245543571},{x:.5597613376181454,y:.7156139355092743},{x:.5606260000000001,y:.7243930000000001},{x:.5597613376181454,y:.7331720644907258},{x:.5572005789630079,y:.7416137544564291},{x:.5530421325536146,y:.7493936604858822},{x:.5474458051533947,y:.7562128051533947},{x:.5406266604858821,y:.7618091325536146},{x:.532846754456429,y:.7659675789630079},{x:.5244050644907258,y:.7685283376181454},{x:.515626,y:.7693930000000001},{x:.10586481668800227,y:.7693930000000001},{x:.10364675445642904,y:.7705785789630079},{x:.09520506449072577,y:.7731393376181454},{x:.086426,y:.774004},{x:.0776469355092742,y:.7731393376181454},{x:.06920524554357094,y:.7705785789630079},{x:.06142533951411792,y:.7664201325536145},{x:.054606194846605366,y:.7608238051533946},{x:.04900986744638546,y:.7540046604858821},{x:.0448514210369921,y:.746224754456429},{x:.04229066238185464,y:.7377830644907257},{x:.041426000000000004,y:.729004},{x:.041426000000000004,y:.05103000000000002}]],G:[[{x:.011397831509003739,y:.41623356008285023},{x:.011618856500496228,y:.4138403978921803},{x:.011624876992355357,y:.4114370583257866},{x:.031979876992355355,y:.20994505832578658},{x:.0322125865037964,y:.20879027461506633},{x:.03227702681480045,y:.2076140405475535},{x:.033082276634523504,y:.2044745765152392},{x:.033722542929381774,y:.20129735748690203},{x:.034176068118796386,y:.2002101619949014},{x:.03446874211029117,y:.19906910061620064},{x:.03587099832954512,y:.19614705695158466},{x:.03711880677043453,y:.1931557970536144},{x:.03777571891913337,y:.19217797009338475},{x:.03828537929375919,y:.19111593175236494},{x:.08239837929375919,y:.11845093175236496},{x:.08400149586436068,y:.11631468084865614},{x:.08543403702225794,y:.1140604899753128},{x:.08664282877724949,y:.11279494315419919},{x:.08769326713863865,y:.11139516977529508},{x:.08968234215056696,y:.10961271886167734},{x:.09152712825517066,y:.10768131654967852},{x:.15960912825517065,y:.049144316549678456},{x:.16129904644183068,y:.0479582081853546},{x:.16285577619764602,y:.04660201166682107},{x:.1649006360722032,y:.045430348778213794},{x:.16682965744636918,y:.04407642028337947},{x:.16871850259167306,y:.043242789341903884},{x:.17050990103726027,y:.04221635466854622},{x:.25257090103726026,y:.005359354668546305},{x:.2555014876285109,y:.004375276469579791},{x:.2583690572759664,y:.003220377345201267},{x:.25967433471463813,y:.0029740526131209386},{x:.2609335532503684,y:.0025512125194529015},{x:.2639998135747395,y:.0021577721889240492},{x:.26703759331756605,y:.0015844992133087973},{x:.35309859331756605,y:-.006038500786691249},{x:.3541123404679588,y:-.006028536718703998},{x:.3551159915981175,y:-.006171599559831674},{x:.3585153812714738,y:-.005985259459774228},{x:.361919709861342,y:-.005951798491220829},{x:.36291203425126567,y:-.00574425362199294},{x:.3639243106821295,y:-.005688764928569123},{x:.3672220288859873,y:-.004842817275250554},{x:.37055441634545594,y:-.004145847688979236},{x:.3714871835051078,y:-.003748697851442632},{x:.37246918402112983,y:-.003496790022837183},{x:.4525501840211298,y:.02567020997716287},{x:.4548144879103283,y:.026756908839544704},{x:.45716266717941917,y:.02764799841997529},{x:.45878159595452606,y:.02866082810547922},{x:.4605032369247208,y:.02948708879101062},{x:.4625120284186098,y:.03099465081435172},{x:.46464124512829075,y:.032326725408117304},{x:.4660314733714444,y:.03363593119127184},{x:.46755883802994086,y:.034782191000688294},{x:.46923492039795345,y:.03665268142188218},{x:.47106334994415,y:.038374550149380404},{x:.53517534994415,y:.11188255014938031},{x:.5366918789074028,y:.11401106513419482},{x:.5383741006891446,y:.11601120663268963},{x:.5392453250303639,y:.11759493887966013},{x:.5402941837404813,y:.11906705813061697},{x:.5413663203511413,y:.12145053442062861},{x:.5426260104640281,y:.12374042895017842},{x:.5431715236397763,y:.1254636976633839},{x:.5439130326051668,y:.12711215273922669},{x:.5444995752545472,y:.12965899467727895},{x:.5452883245139833,y:.13215064287530112},{x:.5896823245139834,y:.3420786428753011},{x:.5897067631627176,y:.34229945557802055},{x:.5897717252277992,y:.3425119065778641},{x:.5901917436343531,y:.346681442891342},{x:.5906527316031134,y:.3508466486034176},{x:.590633622248786,y:.3510679861958218},{x:.5906558889520306,y:.35128902847947113},{x:.590254400640623,y:.3554603898480228},{x:.5898939395311937,y:.3596354965915505},{x:.5898320165355749,y:.3598488531940917},{x:.589810732180064,y:.3600699922305474},{x:.5886031661213459,y:.3640828755761044},{x:.5874351082520124,y:.3681074363403587},{x:.5873327512810971,y:.3683046127784522},{x:.5872687338126765,y:.3685173503185603},{x:.5853014960930706,y:.3722175427846122},{x:.5833707292727002,y:.37593689595641405},{x:.5832318718474782,y:.3761103148501221},{x:.583127581421558,y:.3763064755095204},{x:.5804762718833937,y:.37955178077467916},{x:.577856994398102,y:.38282299369748307},{x:.5776869727315521,y:.38296599065597503},{x:.5775464171707139,y:.38313803609053093},{x:.5743129241526703,y:.3858037388934479},{x:.5711057933673104,y:.38850110068914456},{x:.5709111412967293,y:.38860818041949885},{x:.5707397220723512,y:.3887494990196469},{x:.5670483068977423,y:.3907331578965531},{x:.5633765710498215,y:.39275301046402805},{x:.5631647689451196,y:.3928200579522583},{x:.5629690736018615,y:.39292521892344706},{x:.5589615952856832,y:.39415060297614785},{x:.5549663571246989,y:.39541532451398326},{x:.5547455444219794,y:.39543976316271745},{x:.5545330934221359,y:.39550472522779906},{x:.5503635571086607,y:.3959247436343527},{x:.5461983513965825,y:.39638573160311336},{x:.5459770138041778,y:.396366622248786},{x:.5457559715205288,y:.3963888889520305},{x:.32969497152052885,y:.39686888895203054},{x:.32091400776945256,y:.3960237321800639},{x:.31246664968143967,y:.39348173381267654},{x:.3046775244904796,y:.389340581421558},{x:.29784596390946905,y:.3837594171707138},{x:.2922345009803531,y:.3769527220723512},{x:.2880587810765529,y:.3691820736018615},{x:.2854792747722009,y:.3607460934221358},{x:.2845951110479695,y:.3519689715205288},{x:.2854402678199361,y:.3431880077694525},{x:.2879822661873235,y:.33474064968143963},{x:.29212341857844204,y:.32695152449047954},{x:.29770458282928614,y:.320119963909469},{x:.3045112779276488,y:.31450850098035305},{x:.31228192639813845,y:.3103327810765529},{x:.3207179065778642,y:.3077532747722009},{x:.3294950284794712,y:.30686911104796943},{x:.49017057214072013,y:.30651215509128404},{x:.45965681956734333,y:.16222033524572274},{x:.4108567628008364,y:.10626833604444391},{x:.35107150330533127,y:.0844934248457151},{x:.2825297162303303,y:.09056463065174497},{x:.21333680545064249,y:.12164203785622632},{x:.15562253329738823,y:.17126485077351794},{x:.1205010051965362,y:.2291186770707186},{x:.10185989085514695,y:.41364510354456796},{x:.13655871914038514,y:.5827099362211221},{x:.190187982415082,y:.6526649281775241},{x:.2569251189377254,y:.6872526727450867},{x:.3715857772516941,y:.6967797369989467},{x:.4883723057362636,y:.6711064406866752},{x:.49713228125159653,y:.6700660353148682},{x:.5059269093127409,y:.6707546074846872},{x:.5144182172953911,y:.6731456957538017},{x:.5222798889957544,y:.6771474119409674},{x:.529209804779262,y:.6826059723372997},{x:.5349416518686954,y:.6893116075279637},{x:.5392551585948644,y:.6970066237131456},{x:.5419845593133248,y:.7053953057362636},{x:.5430249646851317,y:.7141552812515966},{x:.5423363925153128,y:.722949909312741},{x:.5399453042461984,y:.7314412172953911},{x:.5359435880590326,y:.7393028889957545},{x:.5304850276627003,y:.7462328047792621},{x:.5237793924720363,y:.7519646518686954},{x:.5160843762868544,y:.7562781585948645},{x:.5076956942637364,y:.7590075593133249},{x:.38428269426373635,y:.7861375593133247},{x:.3819812519937546,y:.7864108971664274},{x:.3797153389243004,y:.7868977113667894},{x:.37761181025895013,y:.7869298473215656},{x:.37552271874840343,y:.7871779646851318},{x:.3732121724765259,y:.7869970613144796},{x:.370894825552222,y:.7870324638061055},{x:.24049282555222196,y:.7761974638061055},{x:.24043595887820252,y:.7761870527203061},{x:.24037815170992255,y:.776187787986971},{x:.2360978388350013,y:.7753928346522221},{x:.2318155069745089,y:.7746088302209789},{x:.231761764079766,y:.7745875250435272},{x:.2317049242166051,y:.7745769685631748},{x:.227661944055434,y:.7729622424167508},{x:.22361484767780643,y:.7713578609091699},{x:.22356629387164592,y:.7713264803860874},{x:.22351260563766895,y:.7713050378383375},{x:.13987060563766895,y:.7279560378383374},{x:.13900257424615298,y:.727391873258006},{x:.13805978359276902,y:.7269641982011581},{x:.13531067905832161,y:.7249923788161832},{x:.13247402218179744,y:.7231487342752945},{x:.13173273281971745,y:.7224260654354895},{x:.1308914928889356,y:.7218226787027751},{x:.128579894506033,y:.7193524235854973},{x:.12615742040314795,y:.7169907998540069},{x:.12557136040496888,y:.7161373985129647},{x:.12486399957555622,y:.7153814879181388},{x:.05884299957555622,y:.6292624879181389},{x:.05814177883495547,y:.6281337214080167},{x:.057292540659828396,y:.62711165542026},{x:.05581896837632758,y:.6243946553718145},{x:.05418793684040681,y:.6217691571968414},{x:.05372040128165289,y:.6205252782386133},{x:.05308687616260495,y:.6193571728131668},{x:.052171678571706244,y:.6164048994674943},{x:.051084196133809955,y:.613511651036194},{x:.05086831288622884,y:.6122004612006492},{x:.05047484683830003,y:.6109312059739318},{x:.012315846838300032,y:.4250072059739319},{x:.012065742114142504,y:.42261690788694145},{x:.011602778634016861,y:.4202585732767163},{x:.011607833784388823,y:.41824059149262255},{x:.011397831509003739,y:.41623356008285023}]],H:[[{x:.021894999999999998,y:.05103000000000002},{x:.02275966238185463,y:.04225093550927423},{x:.025320421036992093,y:.03380924554357098},{x:.029478867446385455,y:.026029339514117924},{x:.03507519484660536,y:.019210194846605383},{x:.04189433951411791,y:.013613867446385479},{x:.04967424554357096,y:.009455421036992116},{x:.05811593550927423,y:.006894662381854655},{x:.066895,y:.0060300000000000215},{x:.07567406449072576,y:.006894662381854655},{x:.08411575445642903,y:.009455421036992116},{x:.0918956604858821,y:.013613867446385486},{x:.09871480515339463,y:.019210194846605383},{x:.10431113255361453,y:.026029339514117924},{x:.1084695789630079,y:.03380924554357098},{x:.11103033761814536,y:.04225093550927425},{x:.111895,y:.05103000000000002},{x:.111895,y:.359342},{x:.490157,y:.359342},{x:.490157,y:.05103000000000002},{x:.49102166238185463,y:.04225093550927423},{x:.49358242103699207,y:.03380924554357098},{x:.49774086744638546,y:.026029339514117924},{x:.5033371948466053,y:.019210194846605383},{x:.5101563395141179,y:.013613867446385479},{x:.517936245543571,y:.009455421036992116},{x:.5263779355092743,y:.006894662381854655},{x:.535157,y:.0060300000000000215},{x:.5439360644907257,y:.006894662381854655},{x:.552377754456429,y:.009455421036992116},{x:.5601576604858821,y:.013613867446385486},{x:.5669768051533947,y:.019210194846605383},{x:.5725731325536145,y:.026029339514117924},{x:.5767315789630079,y:.03380924554357098},{x:.5792923376181454,y:.04225093550927425},{x:.580157,y:.05103000000000002},{x:.580157,y:.729004},{x:.5792923376181454,y:.7377830644907257},{x:.5767315789630079,y:.746224754456429},{x:.5725731325536145,y:.7540046604858821},{x:.5669768051533947,y:.7608238051533946},{x:.5601576604858821,y:.7664201325536145},{x:.552377754456429,y:.7705785789630079},{x:.5439360644907257,y:.7731393376181454},{x:.535157,y:.774004},{x:.5263779355092743,y:.7731393376181454},{x:.517936245543571,y:.7705785789630079},{x:.5101563395141179,y:.7664201325536145},{x:.5033371948466053,y:.7608238051533946},{x:.49774086744638546,y:.7540046604858821},{x:.49358242103699207,y:.746224754456429},{x:.49102166238185463,y:.7377830644907257},{x:.490157,y:.729004},{x:.490157,y:.44934199999999996},{x:.111895,y:.44934199999999996},{x:.111895,y:.729004},{x:.11103033761814536,y:.7377830644907257},{x:.10846957896300788,y:.746224754456429},{x:.10431113255361453,y:.7540046604858821},{x:.09871480515339463,y:.7608238051533946},{x:.09189566048588207,y:.7664201325536145},{x:.08411575445642903,y:.7705785789630079},{x:.07567406449072576,y:.7731393376181454},{x:.066895,y:.774004},{x:.05811593550927421,y:.7731393376181454},{x:.04967424554357093,y:.7705785789630079},{x:.04189433951411791,y:.7664201325536145},{x:.03507519484660536,y:.7608238051533946},{x:.029478867446385455,y:.7540046604858821},{x:.025320421036992093,y:.746224754456429},{x:.02275966238185463,y:.7377830644907257},{x:.021894999999999998,y:.729004},{x:.021894999999999998,y:.05103000000000002}]],I:[[{x:.25602600000000003,y:.05103000000000002},{x:.25689066238185465,y:.04225093550927423},{x:.2594514210369921,y:.03380924554357098},{x:.2636098674463855,y:.026029339514117924},{x:.26920619484660535,y:.019210194846605383},{x:.27602533951411795,y:.013613867446385479},{x:.283805245543571,y:.009455421036992116},{x:.2922469355092743,y:.006894662381854655},{x:.301026,y:.0060300000000000215},{x:.3098050644907258,y:.006894662381854655},{x:.3182467544564291,y:.009455421036992116},{x:.32602666048588214,y:.013613867446385486},{x:.3328458051533947,y:.019210194846605383},{x:.33844213255361455,y:.026029339514117924},{x:.34260057896300794,y:.03380924554357098},{x:.3451613376181454,y:.04225093550927425},{x:.346026,y:.05103000000000002},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.05103000000000002}]],J:[[{x:.0492700034030052,y:.22191686675397743},{x:.05066400340300519,y:.18438286675397747},{x:.05116783173382979,y:.18068175768771486},{x:.05155979864248331,y:.17696713613904605},{x:.05874879864248331,y:.14209513613904604},{x:.05880353678004782,y:.1419191061579158},{x:.05882437610196882,y:.14173594355086241},{x:.060112741823836933,y:.13770889095133898},{x:.06136821695472819,y:.13367146342030908},{x:.0614562450600313,y:.133509494686791},{x:.06151241721221637,y:.13333391704789688},{x:.07511841721221638,y:.10184091704789687},{x:.07557207470549994,y:.10102219111224012},{x:.07589401217340325,y:.10014328637013822},{x:.07770640675364808,y:.09717031380613761},{x:.07939396242231754,y:.09412474393402119},{x:.07999862852050488,y:.09341025377409445},{x:.08048584585939292,y:.09261104382444658},{x:.10112984585939291,y:.06520804382444652},{x:.10197173470408774,y:.06429305686105671},{x:.10267645797068833,y:.06326868237508665},{x:.10495244591663212,y:.06105354143298789},{x:.10710291637241387,y:.058716353519649434},{x:.10810713366035453,y:.05798319214000915},{x:.10899816141532707,y:.05711598541156246},{x:.1373061614153271,y:.03451898541156248},{x:.13912164740426522,y:.03334117545586675},{x:.1408101373903697,y:.03198757757075004},{x:.14281300361792376,y:.03094638082514127},{x:.14470672673278473,y:.029717813955661344},{x:.1467171079910441,y:.028916819034200267},{x:.14863722796281134,y:.027918638208003034},{x:.20683022796281134,y:.004592638208003076},{x:.20850921914024034,y:.004104279923540699},{x:.2101185278310492,y:.0034204446176558795},{x:.21273469892125257,y:.0028752394826936905},{x:.21530073387518742,y:.0021288719943945503},{x:.21704273768291169,y:.0019774523068977427},{x:.21875453360851305,y:.0016207172553791283},{x:.2976895336085131,y:-.0068802827446208525},{x:.29850402526559744,y:-.006887701289741747},{x:.2993068957135494,y:-.007024999279811796},{x:.30290822222422875,y:-.006927815554356645},{x:.3065107103471747,y:-.0069606277022222565},{x:.30731099906181086,y:-.006809004262418785},{x:.30812522808832776,y:-.0067870318558802545},{x:.3663632280883278,y:.0005399681441197179},{x:.367446910459264,y:.0007860908462292888},{x:.3685549625674647,y:.000870733572342984},{x:.37174033606180384,y:.0017612008405818037},{x:.37496569353784953,y:.0024937343933679954},{x:.37598053709868623,y:.002946543859479297},{x:.3770507853196353,y:.0032457304419443098},{x:.4423997853196353,y:.028649730441944292},{x:.44339023767510893,y:.0291515261148112},{x:.4444435524779453,y:.029502699422305954},{x:.4473177196266577,y:.03114131738307233},{x:.45026902431580135,y:.03263654520916596},{x:.4511425499275847,y:.03332192668785485},{x:.4521071150681948,y:.03387184382278591},{x:.4818761150681948,y:.0549598438227859},{x:.482276572000261,y:.05530719927286456},{x:.48273081061614365,y:.05558049186877649},{x:.48560514894853896,y:.05819439949693127},{x:.48854004666413575,y:.060740123232255375},{x:.48886504324193186,y:.061158929616590856},{x:.48925723704963914,y:.06151558852974905},{x:.5141262370496392,y:.08904658852974903},{x:.5149956342421861,y:.09022293690705172},{x:.5160117353213701,y:.09127516577002369},{x:.5176116053111659,y:.0937625081737249},{x:.5193693801104602,y:.0961408866071265},{x:.519992577896003,y:.09746424275846524},{x:.5207838752101566,y:.09869448482562238},{x:.5385188752101566,y:.1333154848256224},{x:.5396070973995049,y:.13607819549886616},{x:.5408707323766272,y:.1387652058155645},{x:.5412201620380835,y:.14017334347255597},{x:.5417518824254063,y:.14152324205357814},{x:.5422802166156467,y:.1444451696332536},{x:.5429953614930656,y:.1473270727547606},{x:.5523413614930656,y:.2113020727547606},{x:.5524962602601196,y:.21460328519222147},{x:.5528139181508881,y:.2178928278123641},{x:.5518389181508881,y:.7290898278123641},{x:.5509575131661891,y:.7378672271777721},{x:.5483806584624608,y:.7463040176932935},{x:.5442073811208505,y:.7540759782308231},{x:.5385980578491955,y:.7608844367054697},{x:.5317682517950807,y:.7664677478762799},{x:.5239804285749665,y:.7706113482261165},{x:.5155338698677402,y:.7731560015172932},{x:.5067531721876358,y:.7740039181508881},{x:.4979757728222279,y:.7731225131661891},{x:.4895389823067066,y:.7705456584624607},{x:.48176702176917696,y:.7663723811208505},{x:.4749585632945304,y:.7607630578491954},{x:.46937525212372017,y:.7539332517950806},{x:.4652316517738835,y:.7461454285749665},{x:.46268699848270683,y:.7376988698677401},{x:.461839081849112,y:.7289181721876359},{x:.462807763438783,y:.22103394388498027},{x:.45501827222953295,y:.16771351802238937},{x:.44337725180090903,y:.14498874958374325},{x:.42579959063650114,y:.12552955984883984},{x:.4046143325842134,y:.11052217895574154},{x:.34961801160788414,y:.08914271579513207},{x:.3021031758959219,y:.08316481131246532},{x:.2345584384824393,y:.09043912324952764},{x:.18827433696976265,y:.10899157718530504},{x:.16959144206995366,y:.1239052897771866},{x:.155605251275173,y:.14247066404328695},{x:.14596289111822178,y:.16478926233983734},{x:.14046290234137151,y:.19146830095804884},{x:.13920799659699482,y:.22525713324602253},{x:.1380181031040591,y:.23399805813086086},{x:.13514580323043823,y:.24233889189031887},{x:.13070147784947123,y:.24995910096061402},{x:.12485591989314217,y:.25656584498063745},{x:.11783377087548613,y:.26190523048280423},{x:.10990488804518514,y:.26577206787662816},{x:.10137397392283892,y:.2680177567696118},{x:.09256886675397746,y:.2685559965969948},{x:.08382794186913914,y:.26736610310405906},{x:.07548710810968112,y:.26449380323043825},{x:.06786689903938595,y:.2600494778494712},{x:.06126015501936256,y:.2542039198931421},{x:.055920769517195726,y:.24718177087548612},{x:.052053932123371845,y:.23925288804518513},{x:.04980824323038816,y:.2307219739228389},{x:.0492700034030052,y:.22191686675397743}]],K:[[{x:-.009598999999999996,y:.05103000000000002},{x:-.008734337618145363,y:.04225093550927423},{x:-.006173578963007902,y:.03380924554357098},{x:-.002015132553614539,y:.026029339514117924},{x:.003581194846605365,y:.019210194846605383},{x:.010400339514117916,y:.013613867446385479},{x:.018180245543570964,y:.009455421036992116},{x:.026621935509274233,y:.006894662381854655},{x:.035401,y:.0060300000000000215},{x:.04418006449072578,y:.006894662381854655},{x:.05262175445642904,y:.009455421036992116},{x:.06040166048588211,y:.013613867446385486},{x:.06722080515339464,y:.019210194846605383},{x:.07281713255361454,y:.026029339514117924},{x:.07697557896300791,y:.03380924554357098},{x:.07953633761814537,y:.04225093550927425},{x:.080401,y:.05103000000000002},{x:.080401,y:.29048154892126793},{x:.18934433769134518,y:.3772029724897202},{x:.5349508182082354,y:.03415901207017739},{x:.5417907398770268,y:.02858809778868676},{x:.5495860658299886,y:.024458629583942203},{x:.5580372260624178,y:.02192930060321959},{x:.5668194472260474,y:.021097311540784057},{x:.5755952334866855,y:.021994635269720175},{x:.5840273362998535,y:.024586788142349852},{x:.5917917146832189,y:.028774155177474024},{x:.5985899879298227,y:.03439581820823536},{x:.6041609022113132,y:.04123573987702663},{x:.6082903704160578,y:.04903106582998847},{x:.6108196993967804,y:.05748222606241771},{x:.6116516884592159,y:.06626444722604735},{x:.6107543647302798,y:.07504023348668547},{x:.6081622118576502,y:.08347233629985339},{x:.603974844822526,y:.0912367146832188},{x:.5983531817917647,y:.09803498792982254},{x:.26024203797571366,y:.43363918627462555},{x:.5302838206406747,y:.648598708462355},{x:.5366139141989896,y:.654742773070568},{x:.5416237292416561,y:.6620037211908337},{x:.545120741386121,y:.6701025186588768},{x:.5469705624168195,y:.6787279332298585},{x:.5471021047489336,y:.6875484950590041},{x:.5455103132844098,y:.6962252349018474},{x:.542256359676543,y:.7044247105121999},{x:.537465291537645,y:.7118318206406747},{x:.531321226929432,y:.7181619141989897},{x:.5240602788091663,y:.7231717292416562},{x:.5159614813411232,y:.726668741386121},{x:.5073360667701415,y:.7285185624168196},{x:.498515504940996,y:.7286501047489337},{x:.48983876509815266,y:.7270583132844098},{x:.48163928948780005,y:.723804359676543},{x:.47423217935932527,y:.719013291537645},{x:.080401,y:.4055145384845117},{x:.080401,y:.729004},{x:.07953633761814537,y:.7377830644907257},{x:.07697557896300788,y:.746224754456429},{x:.07281713255361454,y:.7540046604858821},{x:.06722080515339464,y:.7608238051533946},{x:.06040166048588208,y:.7664201325536145},{x:.052621754456429054,y:.7705785789630079},{x:.04418006449072578,y:.7731393376181454},{x:.035401,y:.774004},{x:.026621935509274212,y:.7731393376181454},{x:.018180245543570936,y:.7705785789630079},{x:.010400339514117906,y:.7664201325536145},{x:.003581194846605358,y:.7608238051533946},{x:-.002015132553614539,y:.7540046604858821},{x:-.006173578963007902,y:.746224754456429},{x:-.008734337618145363,y:.7377830644907257},{x:-.009598999999999996,y:.729004},{x:-.009598999999999996,y:.05103000000000002}]],L:[[{x:.030439999999999995,y:.05103000000000002},{x:.03130466238185463,y:.04225093550927423},{x:.03386542103699209,y:.03380924554357098},{x:.03802386744638545,y:.026029339514117924},{x:.043620194846605356,y:.019210194846605383},{x:.05043933951411791,y:.013613867446385479},{x:.058219245543570955,y:.009455421036992116},{x:.06666093550927422,y:.006894662381854655},{x:.07544,y:.0060300000000000215},{x:.526613,y:.0060300000000000215},{x:.5353920644907257,y:.006894662381854655},{x:.543833754456429,y:.009455421036992116},{x:.5516136604858821,y:.013613867446385479},{x:.5584328051533947,y:.019210194846605383},{x:.5640291325536145,y:.026029339514117924},{x:.5681875789630079,y:.03380924554357098},{x:.5707483376181454,y:.04225093550927425},{x:.571613,y:.05103000000000002},{x:.5707483376181454,y:.05980906449072579},{x:.5681875789630079,y:.06825075445642906},{x:.5640291325536145,y:.07603066048588211},{x:.5584328051533947,y:.08284980515339466},{x:.5516136604858821,y:.08844613255361455},{x:.543833754456429,y:.09260457896300792},{x:.5353920644907257,y:.09516533761814538},{x:.526613,y:.09603000000000002},{x:.12043999999999999,y:.09603000000000002},{x:.12043999999999999,y:.729004},{x:.11957533761814536,y:.7377830644907257},{x:.11701457896300788,y:.746224754456429},{x:.11285613255361453,y:.7540046604858821},{x:.10725980515339463,y:.7608238051533946},{x:.10044066048588207,y:.7664201325536145},{x:.09266075445642903,y:.7705785789630079},{x:.08421906449072576,y:.7731393376181454},{x:.07544,y:.774004},{x:.06666093550927422,y:.7731393376181454},{x:.05821924554357093,y:.7705785789630079},{x:.05043933951411791,y:.7664201325536145},{x:.043620194846605356,y:.7608238051533946},{x:.03802386744638545,y:.7540046604858821},{x:.03386542103699209,y:.746224754456429},{x:.03130466238185463,y:.7377830644907257},{x:.030439999999999995,y:.729004},{x:.030439999999999995,y:.05103000000000002}]],M:[[{x:-.0025190000000000004,y:.05103000000000002},{x:-.001654337618145367,y:.04225093550927423},{x:.0009064210369920944,y:.03380924554357098},{x:.005064867446385457,y:.026029339514117924},{x:.010661194846605361,y:.019210194846605383},{x:.017480339514117912,y:.013613867446385479},{x:.02526024554357096,y:.009455421036992116},{x:.03370193550927423,y:.006894662381854655},{x:.042481,y:.0060300000000000215},{x:.051260064490725774,y:.006894662381854655},{x:.05970175445642904,y:.009455421036992116},{x:.06748166048588208,y:.013613867446385486},{x:.07430080515339463,y:.019210194846605383},{x:.07989713255361454,y:.026029339514117924},{x:.0840555789630079,y:.03380924554357098},{x:.08661633761814536,y:.04225093550927425},{x:.087481,y:.05103000000000002},{x:.087481,y:.5631122522964573},{x:.26219554141599577,y:.26476777519375044},{x:.26376288989624813,y:.2626088267569117},{x:.2651577075441738,y:.2603345964826191},{x:.26634817172230724,y:.2590477232579252},{x:.26737807478439135,y:.2576290804774607},{x:.2693364970488442,y:.25581739014918375},{x:.271148193983327,y:.2538589739959976},{x:.27256684023788735,y:.25282907571933333},{x:.27385371747828813,y:.25163861588213104},{x:.27612795245761435,y:.25024380590572387},{x:.27828690618147356,y:.24867646470811877},{x:.2798792167324836,y:.24794311979268302},{x:.28137361418054185,y:.2470265916026687},{x:.2838762642998919,y:.24610226374330602},{x:.28629950743227456,y:.24498622954453103},{x:.28800429067823724,y:.24457762002415934},{x:.28964877947809164,y:.24397024514568044},{x:.29228366929688115,y:.24355192080462856},{x:.2948780779631802,y:.2429300821730634},{x:.29662982004000654,y:.24286191068247276},{x:.29836120340931876,y:.24258703019148947},{x:.3010270755894747,y:.24269078533857608},{x:.3036929481196057,y:.24258703918410057},{x:.30542433056167173,y:.24286192551544342},{x:.30717607240852984,y:.24293010291506947},{x:.3097704789772072,y:.24355195029817853},{x:.3124053673848756,y:.24397028352732772},{x:.31404985413590314,y:.24457766395304856},{x:.3157546360035206,y:.24498627922405064},{x:.3181778753712451,y:.24610232159698525},{x:.32068052237260675,y:.24702665789836697},{x:.32217491672899246,y:.24794319112932822},{x:.32376722480624953,y:.2486765414159958},{x:.3259261732430879,y:.2502438898962479},{x:.3282004035173809,y:.2516387075441738},{x:.329487276742075,y:.2528291717223074},{x:.3309059195225393,y:.2538590747843914},{x:.3327176098508159,y:.2558174970488439},{x:.33467602600400237,y:.257629193983327},{x:.3357059242806667,y:.2590478402378874},{x:.33689638411786893,y:.2603347174782881},{x:.3382911940942761,y:.2626089524576143},{x:.3398585352918812,y:.26476790618147356},{x:.514571,y:.5631111449291359},{x:.514571,y:.05103000000000002},{x:.5154356623818547,y:.04225093550927423},{x:.5179964210369922,y:.03380924554357098},{x:.5221548674463855,y:.026029339514117924},{x:.5277511948466054,y:.019210194846605383},{x:.5345703395141179,y:.013613867446385479},{x:.542350245543571,y:.009455421036992116},{x:.5507919355092743,y:.006894662381854655},{x:.559571,y:.0060300000000000215},{x:.5683500644907258,y:.006894662381854655},{x:.576791754456429,y:.009455421036992116},{x:.5845716604858822,y:.013613867446385486},{x:.5913908051533947,y:.019210194846605383},{x:.5969871325536146,y:.026029339514117924},{x:.6011455789630079,y:.03380924554357098},{x:.6037063376181454,y:.04225093550927425},{x:.6045710000000001,y:.05103000000000002},{x:.6045710000000001,y:.729004},{x:.6044399806971988,y:.7303342613054065},{x:.6044919608158994,y:.7316699481196056},{x:.6040085293496043,y:.7347148603514975},{x:.6037063376181454,y:.7377830644907257},{x:.6033183147080721,y:.7390622046001841},{x:.6031087164726723,y:.7403823673848756},{x:.6020405410986152,y:.7432744596816038},{x:.6011455789630079,y:.746224754456429},{x:.6005154639484909,y:.7474036167328832},{x:.600052342101633,y:.7486575223726067},{x:.5984404722003996,y:.7512856532491108},{x:.5969871325536146,y:.7540046604858821},{x:.596139140401289,y:.7550379419131618},{x:.5954402924558263,y:.7561774035173808},{x:.5933466712837743,y:.758440575377949},{x:.5913908051533947,y:.7608238051533946},{x:.5903575237261146,y:.7616717973057207},{x:.589449806016673,y:.7626530260040023},{x:.5869548902613284,y:.7644642664232344},{x:.5845716604858822,y:.7664201325536145},{x:.5833927982094276,y:.7670502475681318},{x:.5823110938185264,y:.7678355352918812},{x:.579510761693201,y:.7691252393162225},{x:.576791754456429,y:.7705785789630079},{x:.5755126143469705,y:.7709666018730812},{x:.5742984925677255,y:.7715257704554689},{x:.5713003592655512,y:.772244375482538},{x:.5683500644907258,y:.7731393376181454},{x:.5670198031853202,y:.7732703569209465},{x:.5657199220368199,y:.7735819178269366},{x:.5626392041392276,y:.7737018082685412},{x:.559571,y:.774004},{x:.5582407386945936,y:.7738729806971988},{x:.5569050518803944,y:.7739249608158993},{x:.5538601396485026,y:.7734415293496042},{x:.5507919355092743,y:.7731393376181454},{x:.5495127953998159,y:.772751314708072},{x:.5481926326151244,y:.7725417164726722},{x:.5453005403183963,y:.7714735410986151},{x:.542350245543571,y:.7705785789630079},{x:.5411713832671168,y:.7699484639484908},{x:.5399174776273933,y:.769485342101633},{x:.5372893467508892,y:.7678734722003996},{x:.5345703395141179,y:.7664201325536145},{x:.5335370580868383,y:.765572140401289},{x:.5323975964826192,y:.7648732924558262},{x:.5301344246220511,y:.7627796712837742},{x:.5277511948466054,y:.7608238051533946},{x:.5269032026942794,y:.7597905237261146},{x:.5259219739959977,y:.7588828060166729},{x:.5241107335767656,y:.7563878902613284},{x:.5221548674463855,y:.7540046604858821},{x:.5215247524318682,y:.7528257982094275},{x:.5207394647081188,y:.7517440938185264},{x:.30102684980758887,y:.3765575080608823},{x:.08131245858400418,y:.7517442248062496},{x:.0805272117946797,y:.752825865136849},{x:.07989713255361454,y:.7540046604858821},{x:.07794121846393844,y:.7563879486998997},{x:.0761299252156086,y:.7588829195225393},{x:.07514874916275306,y:.7597905823884902},{x:.07430080515339463,y:.7608238051533946},{x:.0719175169393771,y:.7627797192430708},{x:.06965428252171184,y:.764873384117869},{x:.06851488325078628,y:.7655721885442563},{x:.06748166048588208,y:.7664201325536145},{x:.06476258657702469,y:.7678735078373721},{x:.06213438581945812,y:.7694854083973313},{x:.06088054980546198,y:.7699484997219428},{x:.05970175445642904,y:.7705785789630079},{x:.056751387338174995,y:.7714735630437544},{x:.05385922052190834,y:.7725417548543195},{x:.05253913197970031,y:.7727513367372549},{x:.051260064490725774,y:.7731393376181454},{x:.04819178511684276,y:.773441536759571},{x:.0451467965906812,y:.7739249698085104},{x:.04381118578262464,y:.7738729881355436},{x:.042481,y:.774004},{x:.039412720626117295,y:.7737018008585744},{x:.03633192759147018,y:.7735818970849305},{x:.035032121291898165,y:.7732703494826018},{x:.03370193550927423,y:.7731393376181454},{x:.030751568391020223,y:.7722443535373988},{x:.02775336399647938,y:.7715257207759494},{x:.026539313032545114,y:.7709665798438982},{x:.02526024554357096,y:.7705785789630079},{x:.02254117163471342,y:.7691252036792503},{x:.01974077519375046,y:.7678354585840041},{x:.01865913486315115,y:.7670502117946798},{x:.017480339514117912,y:.7664201325536145},{x:.015097051300099952,y:.7644642184639381},{x:.012602080477460715,y:.7626529252156086},{x:.011694417611510011,y:.7616717491627533},{x:.010661194846605361,y:.7608238051533946},{x:.008705280756928618,y:.7584405169393763},{x:.006611615882131057,y:.7561772825217118},{x:.005912811455744052,y:.7550378832507868},{x:.005064867446385457,y:.7540046604858821},{x:.0036114921626275165,y:.7512855865770239},{x:.0019995916026687363,y:.7486573858194581},{x:.0015365002780573323,y:.7474035498054622},{x:.0009064210369920944,y:.746224754456429},{x:11436956245516774e-21,y:.7432743873381747},{x:-.0010567548543195318,y:.7403822205219084},{x:-.0012663367372549837,y:.7390621319797002},{x:-.001654337618145367,y:.7377830644907257},{x:-.0019565367595708303,y:.7347147851168438},{x:-.0024399698085105087,y:.7316697965906812},{x:-.0023879881355436095,y:.730334185782624},{x:-.0025190000000000004,y:.729004},{x:-.0025190000000000004,y:.05103000000000002}]],N:[[{x:.022871000000000002,y:.05103000000000002},{x:.023735662381854636,y:.04225093550927423},{x:.026296421036992097,y:.03380924554357098},{x:.03045486744638546,y:.026029339514117924},{x:.036051194846605364,y:.019210194846605383},{x:.042870339514117915,y:.013613867446385479},{x:.05065024554357096,y:.009455421036992116},{x:.05909193550927423,y:.006894662381854655},{x:.067871,y:.0060300000000000215},{x:.07665006449072577,y:.006894662381854655},{x:.08509175445642904,y:.009455421036992116},{x:.0928716604858821,y:.013613867446385486},{x:.09969080515339464,y:.019210194846605383},{x:.10528713255361455,y:.026029339514117924},{x:.10944557896300791,y:.03380924554357098},{x:.11200633761814537,y:.04225093550927425},{x:.112871,y:.05103000000000002},{x:.112871,y:.5841703094604355},{x:.49710429367778214,y:.025528669675955993},{x:.4971050718109503,y:.02552774709009411},{x:.49710565506134197,y:.025526690456344234},{x:.49994880496714983,y:.022156103119426583},{x:.5027917749380927,y:.01878536401177818},{x:.5027927181072235,y:.018784610959395015},{x:.5027934962896407,y:.018783688415073364},{x:.5062395848358414,y:.016032536999645196},{x:.5096855265142521,y:.01328120162562755},{x:.5096865984738844,y:.013280647046104224},{x:.5096875416832135,y:.013279894044071351},{x:.5136041376200112,y:.011253903755746949},{x:.5175206253992491,y:.009227704391234041},{x:.5175217849545753,y:.009227369596750634},{x:.5175228569438108,y:.00922681507445236},{x:.5217594476858983,y:.008003843583871996},{x:.5259959731369073,y:.006780645934087934},{x:.5259971757268666,y:.006780543790608634},{x:.5259983353000632,y:.006780209058025982},{x:.5303921110410749,y:.006407254473822295},{x:.5347858668666982,y:.00603406533837119},{x:.5347870662764328,y:.00603419977121261},{x:.5347882688718429,y:.006034097691931008},{x:.5391703792739257,y:.006525492449663053},{x:.5435525159020149,y:.007016653277689966},{x:.5435536660388816,y:.007017019120673398},{x:.543554865441438,y:.007017153617542397},{x:.547756908459233,y:.008354013692199154},{x:.5519590228368241,y:.009690649448577907},{x:.5519600795017079,y:.0096912326425627},{x:.551961229619043,y:.009691598546943021},{x:.555821723096155,y:.01182254915564361},{x:.559682330324044,y:.013953293677782128},{x:.5596832529099061,y:.01395407181095043},{x:.5596843095436558,y:.013954655061341997},{x:.5630548968806759,y:.016797804967236304},{x:.5664256359882218,y:.01964077493809272},{x:.5664263890406048,y:.019641718107223288},{x:.5664273115849267,y:.019642496289640633},{x:.5691784630004857,y:.02308858483600535},{x:.5719297983743725,y:.026534526514252196},{x:.5719303529538958,y:.0265355984738845},{x:.5719311059559287,y:.0265365416832135},{x:.5739570962443242,y:.03045313762014873},{x:.575983295608766,y:.03436962539924916},{x:.5759836304032494,y:.03437078495457533},{x:.5759841849255477,y:.0343718569438108},{x:.5772071564160691,y:.03860844768569421},{x:.5784303540659121,y:.04284497313690728},{x:.5784304562093915,y:.04284617572686688},{x:.578430790941974,y:.042847335300063204},{x:.5788037455260991,y:.04724111104014873},{x:.5791769346616289,y:.05163486686669809},{x:.5791768002287875,y:.05163606627643281},{x:.5791769023080691,y:.05163726887184294},{x:.5700269023080691,y:.7296112688718429},{x:.5690438463824576,y:.738377865441438},{x:.566369401453057,y:.746784229619043},{x:.5621063449386581,y:.7545073095436557},{x:.5564185037103594,y:.7612503115849266},{x:.5495244583167865,y:.7667541059559286},{x:.5416891430561892,y:.7708071849255477},{x:.5332136646999368,y:.773253790941974},{x:.5244237311281571,y:.773999902308069},{x:.515657134558562,y:.7730168463824576},{x:.507250770380957,y:.770342401453057},{x:.49952769045634426,y:.766079344938658},{x:.4927846884150734,y:.7603915037103594},{x:.4872808940440714,y:.7534974583167865},{x:.4832278150744524,y:.7456621430561892},{x:.480781209058026,y:.7371866646999369},{x:.48003509769193103,y:.7283967311281571},{x:.48718300813543913,y:.19876859615253395},{x:.10494770632221789,y:.754505330324044},{x:.1022980223560627,y:.75764690179997},{x:.09969080515339464,y:.7608238051533946},{x:.09945603456444842,y:.7610164763964532},{x:.09926022506190729,y:.7612486359882218},{x:.09604856383930557,y:.7638129153509474},{x:.0928716604858821,y:.7664201325536145},{x:.09260381265312083,y:.7665633002029657},{x:.09236647348574781,y:.7667527983743725},{x:.08871625734636118,y:.7686412418060533},{x:.08509175445642904,y:.7705785789630079},{x:.08480112262185491,y:.7706667411661766},{x:.08453137460075086,y:.770806295608766},{x:.08058287930375276,y:.7719463312873718},{x:.07665006449072577,y:.7731393376181454},{x:.07634781747275289,y:.773169106351106},{x:.07605602686309273,y:.7732533540659121},{x:.07196099086840901,y:.7736011710596524},{x:.067871,y:.774004},{x:.06756875298202693,y:.7739742312670393},{x:.06726613313330192,y:.7739999346616289},{x:.06318192637768459,y:.7735421665584931},{x:.05909193550927423,y:.7731393376181454},{x:.05880130367469977,y:.7730511754149765},{x:.05849948409798508,y:.77301734672231},{x:.054583060356599135,y:.7717715852937818},{x:.05065024554357096,y:.7705785789630079},{x:.0503823977108098,y:.7704354113136568},{x:.050092977163175983,y:.7703433505514221},{x:.04649484240404986,y:.768357469710569},{x:.042870339514117915,y:.7664201325536145},{x:.04263556892517204,y:.7662274613105563},{x:.04236966967595597,y:.7660807063222179},{x:.03922809820002561,y:.7634310223560591},{x:.036051194846605364,y:.7608238051533946},{x:.03585852360354703,y:.7605890345644487},{x:.035626364011778155,y:.7603932250619073},{x:.033062084649052234,y:.7571815638393052},{x:.03045486744638546,y:.7540046604858821},{x:.030311699797034096,y:.7537368126531205},{x:.03012220162562753,y:.7534994734857478},{x:.028233758193948882,y:.7498492573463653},{x:.026296421036992097,y:.746224754456429},{x:.026208258833823234,y:.7459341226218545},{x:.026068704391234022,y:.7456643746007509},{x:.02492866871262922,y:.741715879303756},{x:.023735662381854636,y:.7377830644907257},{x:.023705893648893955,y:.7374808174727527},{x:.023621645934087915,y:.7371890268630927},{x:.023273828940347806,y:.7330939908684111},{x:.022871000000000002,y:.729004},{x:.022871000000000002,y:.05103000000000002}]],O:[[{x:.012131736117046842,y:.4355587711738732},{x:.012426138979982786,y:.43287355609157196},{x:.012514983726773468,y:.43017371170811375},{x:.012905745911416293,y:.42849911573111366},{x:.01309315536666239,y:.42678977537085305},{x:.07316415536666239,y:.1412837753708531},{x:.07429915106219231,y:.13768552483470178},{x:.07533122192175289,y:.13405641311271962},{x:.07562440736087628,y:.1334840955199844},{x:.07581784742995093,y:.1328708369543332},{x:.07763301835724021,y:.12956315246900071},{x:.0793532628391043,y:.12620512014747703},{x:.07975246842568721,y:.12570099711853563},{x:.0800618324091279,y:.12513726042963025},{x:.08248742256740031,y:.1222472544549173},{x:.0848297326408542,y:.1192893488327618},{x:.1660597326408542,y:.03517334883276172},{x:.16792084009780786,y:.033590824390739155},{x:.16963596886504836,y:.031851158363102774},{x:.17127304088861567,y:.03074040344046043},{x:.172780173663761,y:.0294588683817891},{x:.1749142556657825,y:.0282698357562587},{x:.17693582072022015,y:.026898201947035502},{x:.17875813439943417,y:.026128166777013812},{x:.18048632312818114,y:.025165283073572443},{x:.1828113681007397,y:.02441543612151622},{x:.18506168183103927,y:.023464545648773483},{x:.2739246818310393,y:-.0041824543512264944},{x:.2748960678404206,y:-.004382857312604547},{x:.27582577451608603,y:-.004728396924478621},{x:.2792086173377598,y:-.005272563034129881},{x:.28256427991205235,y:-.0059648570457577},{x:.28355609768991147,y:-.005971901311054349},{x:.2845353517466465,y:-.006129424701440567},{x:.287959355733624,y:-.0060031749164705245},{x:.2913856000541485,y:-.006027509400590186},{x:.29235973459950004,y:-.005840924262640544},{x:.29335090385307644,y:-.005804377895986514},{x:.3811419038530764,y:.006122622104013507},{x:.38318930529213563,y:.00660893405691686},{x:.3852758334501729,y:.006882342567970358},{x:.387470347489584,y:.0076257947232155985},{x:.38972465411174423,y:.008161252125438313},{x:.3916378405507577,y:.009037647936572414},{x:.39363093730084414,y:.009712864429997858},{x:.3956382440479665,y:.010870159811164118},{x:.3977447722434711,y:.011835121954387393},{x:.39945022100051475,y:.01306792222421872},{x:.4012732927522862,y:.01411899850883961},{x:.4916652927522862,y:.07880999850883955},{x:.49276799959381884,y:.07977586317754862},{x:.49398769122063274,y:.08058901093294302},{x:.4960788615418114,y:.08267585840574071},{x:.4983012083703825,y:.08462241954283417},{x:.4991942961599152,y:.08578485282556958},{x:.5002319144966787,y:.08682032620708877},{x:.5018757798210403,y:.08927504258220473},{x:.5036756696393939,y:.09161775945128844},{x:.5043248175140242,y:.09293208968889465},{x:.5051404874699588,y:.09415009603518716},{x:.5560304874699588,y:.18912209603518723},{x:.5570965448702581,y:.19168827319789875},{x:.5583465570022521,y:.1941700494329812},{x:.5587848767756364,y:.19575236841213633},{x:.559414776433869,y:.19726864147332673},{x:.5599597135111237,y:.1999934877429328},{x:.5607015364856348,y:.20267144261291137},{x:.5892585364856349,y:.36700144261291134},{x:.5895780755292599,y:.371318367211785},{x:.589913428370686,y:.37563409214099147},{x:.5899036127276142,y:.3757163259822715},{x:.58990972616553,y:.3757989176124618},{x:.5893809351459178,y:.38009523269056544},{x:.5888678881103582,y:.38439345626922305},{x:.5314878881103581,y:.6446844562692231},{x:.5303800126922803,y:.6480826863142071},{x:.5293998170293023,y:.651519919480997},{x:.5290148883003433,y:.6522699863013032},{x:.5287535704445262,y:.6530715368858165},{x:.5270040207481954,y:.6561883351212919},{x:.5253720883446767,y:.6593682961290664},{x:.5248482251358019,y:.6600288547560561},{x:.5244355536676654,y:.6607640231862051},{x:.522111563906752,y:.6634796128039058},{x:.5198906090097624,y:.6662800975344761},{x:.4528876090097624,y:.7355630975344761},{x:.4513498405668143,y:.7368687638478525},{x:.44995999895015265,y:.7383308981052339},{x:.44799560298794544,y:.7397167316507253},{x:.4461630292013509,y:.741272707045399},{x:.44440008568631667,y:.7422532816059559},{x:.4427517012434998,y:.743416176715023},{x:.4405546878862334,y:.7443921472166956},{x:.43845377075029196,y:.7455607075703166},{x:.43653340109378364,y:.7461785074476045},{x:.43468982031452474,y:.7469974740014746},{x:.32025082031452473,y:.7849044740014746},{x:.3162756641960007,y:.785800462676764},{x:.3123143949565378,y:.7867559771378485},{x:.3119757732525013,y:.7867696456410259},{x:.3116451697261732,y:.786844162718285},{x:.30757159639863574,y:.7869474207351895},{x:.30350003021295163,y:.7871117699623142},{x:.30316524843732107,y:.7870591140117537},{x:.302826459804451,y:.7870677017158569},{x:.29881101440639224,y:.7863742609266953},{x:.29478561927964103,y:.7857411290712295},{x:.173234619279641,y:.7541621290712296},{x:.17180894449846637,y:.7536379076298808},{x:.17032768986057922,y:.753301394035824},{x:.16767817066393412,y:.7521190197025511},{x:.16495505208167519,y:.7511177274253745},{x:.16365904177145735,y:.7503254433998781},{x:.16227189957151614,y:.7497064173758784},{x:.15990395993272244,y:.7480298664806163},{x:.1574285077432372,y:.7465165596726792},{x:.15631196685338702,y:.745486660093817},{x:.15507224418821702,y:.7446089104628228},{x:.08487024418821705,y:.6837459104628228},{x:.08477922863788438,y:.6836498346778195},{x:.08467166808724909,y:.6835727301071804},{x:.08174665618590948,y:.6804486588585436},{x:.07880340242944883,y:.6773417676286113},{x:.07873287917322891,y:.6772297816598538},{x:.07864242772392874,y:.6771331746094597},{x:.07638309517198695,y:.6734984900001298},{x:.07410251962167697,y:.6698770964908778},{x:.07405519882875666,y:.6697535038963435},{x:.0739853324792622,y:.6696411069209627},{x:.07247850415964274,y:.6656354878421232},{x:.07094824805491862,y:.6616387601752097},{x:.07092594823683183,y:.6615083105489945},{x:.0708793519117729,y:.6613844430013583},{x:.013660351911772894,y:.4476944430013583},{x:.013380528959940628,y:.4459977798389246},{x:.012899536483696877,y:.44434683677239306},{x:.012664423003084308,y:.4416557821956227},{x:.012224847112815455,y:.43899048181468664},{x:.012281403443251489,y:.4372718288093888},{x:.012131736117046842,y:.4355587711738732}],[{x:.10337829031332789,y:.4348001396911351},{x:.15424861715004387,y:.6247803934833692},{x:.2060651876410252,y:.6697037849792326},{x:.3045603004668897,y:.6952928559694175},{x:.3958853477721772,y:.6650421672339206},{x:.4463402797077116,y:.6128703383711886},{x:.499069598507425,y:.373676069990286},{x:.47327322171072966,y:.22523195474705573},{x:.4307624349909165,y:.1458974207255564},{x:.35796896612556683,y:.09380119213930618},{x:.2911281310221294,y:.08472041346861442},{x:.22279798440939425,y:.10597924519162948},{x:.15856873728877424,y:.17249047688925445},{x:.10337829031332789,y:.4348001396911351}]],P:[[{x:.025556999999999996,y:.05103000000000002},{x:.02642166238185463,y:.04225093550927423},{x:.02898242103699209,y:.03380924554357098},{x:.033140867446385454,y:.026029339514117924},{x:.03873719484660536,y:.019210194846605383},{x:.04555633951411791,y:.013613867446385479},{x:.053336245543570956,y:.009455421036992116},{x:.061777935509274226,y:.006894662381854655},{x:.070557,y:.0060300000000000215},{x:.07933606449072576,y:.006894662381854655},{x:.08777775445642903,y:.009455421036992116},{x:.09555766048588209,y:.013613867446385486},{x:.10237680515339463,y:.019210194846605383},{x:.10797313255361454,y:.026029339514117924},{x:.1121315789630079,y:.03380924554357098},{x:.11469233761814536,y:.04225093550927425},{x:.11555699999999999,y:.05103000000000002},{x:.11555699999999999,y:.3249696679740436},{x:.22632413005583354,y:.32573306868659574},{x:.22797244585475993,y:.3259068917113995},{x:.2296296407459454,y:.32587748916779646},{x:.3399906407459454,y:.3347734891677965},{x:.3425199358315593,y:.3352301100895628},{x:.3450781711944775,y:.33547763407671893},{x:.4262801711944775,y:.3514846340767189},{x:.43023360415359113,y:.35267647626036297},{x:.4342017122431381,y:.35381850872164355},{x:.49034871224313803,y:.3761405087216436},{x:.49223471805815816,y:.37711419756221787},{x:.49421014578428074,y:.3778905822551455},{x:.4961445509948513,y:.379132728294546},{x:.49818726580808836,y:.3801873213410173},{x:.49984707528076383,y:.38151024250532195},{x:.5016330805772936,y:.3826570960152846},{x:.5368430805772937,y:.4104950960152846},{x:.538268982488492,y:.41186995272090265},{x:.539835277869678,y:.41308244849417974},{x:.5414366048100854,y:.41492417879038607},{x:.5431934850553138,y:.4166181652891421},{x:.5443237674236908,y:.41824478417169497},{x:.5456234206874699,y:.41973955124896434},{x:.546834674823181,y:.4218582966024136},{x:.5482273167355989,y:.4238624839583804},{x:.5490185434436073,y:.4256783549664296},{x:.5500016096439067,y:.4273979502871872},{x:.5725636096439066,y:.4777629502871872},{x:.5732747072201834,y:.47988746499756846},{x:.5741879174558705,y:.48193325814034926},{x:.5746713208988057,y:.4840600657825243},{x:.5753635933927087,y:.4861283376286891},{x:.5756465551694752,y:.4883507586397718},{x:.5761431038835471,y:.49053540091990977},{x:.5762022992770958,y:.49271564988294925},{x:.5764777701286589,y:.49487923612929946},{x:.5763217220435205,y:.4971141570479765},{x:.5763825271473633,y:.4993536938878067},{x:.5706825271473633,y:.5794656938878067},{x:.5700654182420953,y:.5830779192715516},{x:.5695689975224034,y:.5867086990904052},{x:.5693236589408173,y:.5874197813867033},{x:.5691969863455608,y:.5881612549906394},{x:.5678870248015591,y:.5915836805014664},{x:.5666918126627678,y:.5950478490261242},{x:.5415328126627678,y:.6498468490261241},{x:.5413708296623262,y:.6501242105110185},{x:.5412617638147841,y:.650426323944409},{x:.5391478795722351,y:.653930540410781},{x:.5370840246571379,y:.6574644536133865},{x:.536871043573226,y:.6577048843594048},{x:.5367051339883567,y:.6579799150765678},{x:.5339482287199508,y:.661004400648547},{x:.5312345979336611,y:.6640677725799057},{x:.5309788035098929,y:.664262032968313},{x:.5307624259999995,y:.6644994116930277},{x:.47414742599999943,y:.7155204116930277},{x:.47266946719886654,y:.7166100541651699},{x:.4713261182021025,y:.7178618913781634},{x:.46912758296129603,y:.7192213498885075},{x:.46704701478499566,y:.7207552731949938},{x:.4653848758470294,y:.7215356430341334},{x:.4638231175995642,y:.7225013521577397},{x:.4283261175995643,y:.7398953521577398},{x:.4243082080780145,y:.7413960258251278},{x:.4202985181688539,y:.7429185254841078},{x:.34090751816885384,y:.7644395254841077},{x:.3408415384597873,y:.7644506164558663},{x:.3407789202555512,y:.7644741810938074},{x:.33649241770984384,y:.7651816893280429},{x:.33220802793590354,y:.7659018811363755},{x:.33214115226719376,y:.7658998869955335},{x:.33207514002138977,y:.7659107826399355},{x:.2099811400213898,y:.7739077826399355},{x:.20641155146718015,y:.773790767187745},{x:.20284008504333162,y:.7738075792583221},{x:.0663570850433316,y:.7610135792583221},{x:.06408313636872824,y:.7605723800858132},{x:.061777935509274226,y:.7603453376181454},{x:.05976354040438703,y:.759734277543603},{x:.05769704052657306,y:.7593333282846051},{x:.05555285882676713,y:.7584569812513055},{x:.053336245543570956,y:.7577845789630079},{x:.05147976838249502,y:.7567922712467745},{x:.04953119704042999,y:.7559958719887517},{x:.04759918201567506,y:.7547180546196904},{x:.04555633951411791,y:.7536261325536145},{x:.043929123673028744,y:.7522907110247322},{x:.04217336337061703,y:.7511294669445447},{x:.04052776127482757,y:.7494992850446065},{x:.03873719484660536,y:.7480298051533947},{x:.037401773317722896,y:.7464025893123053},{x:.03590629693874444,y:.7449211263687215},{x:.034610347337597366,y:.7430012269141045},{x:.033140867446385454,y:.7412106604858821},{x:.032148559730151835,y:.7393541833248057},{x:.030970837593177758,y:.7376094333079335},{x:.030074343103068113,y:.7354735969579864},{x:.02898242103699209,y:.733430754456429},{x:.028371360962449563,y:.7314163593515414},{x:.027556652268729623,y:.729475372026062},{x:.027094064670152376,y:.7272056777739226},{x:.02642166238185463,y:.7249890644907258},{x:.02621533264498147,y:.722894163516222},{x:.025794946192721373,y:.7208315299365354},{x:.02578404246766777,y:.7185152008594541},{x:.025556999999999996,y:.71621},{x:.025556999999999996,y:.05103000000000002}],[{x:.11555699999999999,y:.414971805397996},{x:.11555699999999999,y:.6752310456989574},{x:.20767337575712835,y:.6838660911730216},{x:.3217031184787672,y:.6763972896549704},{x:.3925929523867085,y:.6571807523203506},{x:.4185706758911827,y:.6444513238436673},{x:.46361487793542,y:.6038578374443203},{x:.4814895996448674,y:.5649247767123354},{x:.48580725170954087,y:.5042413131675768},{x:.4723746184159119,y:.474255736718963},{x:.45098032059796866,y:.45734081304228297},{x:.40480552914494095,y:.4389833995595593},{x:.3301954695220376,y:.42427584033215343},{x:.22404845814303564,y:.41571952231013837},{x:.11555699999999999,y:.414971805397996}]],Q:[[{x:.012134510452571898,y:.39776120903599943},{x:.012467756958298536,y:.3937322544040442},{x:.012734737801221134,y:.38969836671479857},{x:.012831073490929856,y:.38933975275179394},{x:.012861682585025715,y:.38896968840207613},{x:.0716656825850257,y:.06709568840207614},{x:.07243605319674906,y:.06440524795975149},{x:.07301096718930201,y:.06166637692330789},{x:.07364750148994079,y:.06017438890024393},{x:.07409402290033937,y:.05861495861744442},{x:.07537446994903126,y:.05612650608452361},{x:.07647266436288541,y:.053552421842995857},{x:.07738804025928744,y:.05221328363312273},{x:.0781302116420243,y:.05077092937167972},{x:.07987152826568633,y:.04858009458346291},{x:.08145080010539194,y:.04626971775068952},{x:.16096480010539196,y:-.04855928224931053},{x:.16315500529851779,y:-.05070373085173594},{x:.16521251383898505,y:-.052975804178533654},{x:.1663001767861927,y:-.05378319510572523},{x:.1672680674520078,y:-.05473086511953138},{x:.1698345496348827,y:-.056406820906963286},{x:.172295783242646,y:-.058233836978172464},{x:.17352006120728586,y:-.058813521600477286},{x:.17465423537351554,y:-.059554156299027654},{x:.17749836607515132,y:-.06069721323044178},{x:.18026874092294012,y:-.06200896084304842},{x:.2672567409229401,y:-.09317596084304836},{x:.2695830047845554,y:-.09375972267138269},{x:.2718475349769373,y:-.09454977610873284},{x:.2738508793967248,y:-.09483071995927067},{x:.27581299058749986,y:-.09532309988014809},{x:.2782084422243766,y:-.09544181332278269},{x:.28058359188359605,y:-.09577489818042065},{x:.2826032520283714,y:-.0956596106656824},{x:.28462372036011635,y:-.09575974074040533},{x:.28699630390923414,y:-.09540884370631499},{x:.2893907973658866,y:-.09527215971995788},{x:.3753267973658866,y:-.08182715971995795},{x:.37840631600914065,y:-.08102976437129623},{x:.38152495221950905,y:-.08040256216817918},{x:.38266795913198753,y:-.07992627554804835},{x:.3838666954562622,y:-.07961588068444121},{x:.38673147789694834,y:-.07823302278004476},{x:.38966782930723504,y:-.07700945634885908},{x:.3906959547522998,y:-.07631933185595965},{x:.3918111026603398,y:-.07578103928710583},{x:.3943510569158511,y:-.07386586128072498},{x:.3969922811880835,y:-.07209295159323717},{x:.45217017177581864,y:-.026613783173476364},{x:.5097585536672307,y:-.09873256043298734},{x:.5159122791302333,y:-.10505326271144577},{x:.5231808703268614,y:-.11005198218579294},{x:.5312849993737013,y:-.11353662086994384},{x:.5399132291363312,y:-.11537326605347448},{x:.5487339815837399,y:-.1154913364919842},{x:.5574082801461085,y:-.11388629480473579},{x:.5656027763942881,y:-.11061982184365243},{x:.5730025604329874,y:-.10581744633276943},{x:.5793232627114457,y:-.0996637208697668},{x:.5843219821857929,y:-.09239512967313873},{x:.5878066208699438,y:-.08429100062629874},{x:.5896432660534744,y:-.07566277086366895},{x:.5897613364919841,y:-.06684201841626024},{x:.5881562948047357,y:-.058167719853891554},{x:.5848898218436525,y:-.04997322360571205},{x:.5800874463327694,y:-.042573439567012816},{x:.5106129498444961,y:.04443049374200151},{x:.5474711182959175,y:.12365010382899572},{x:.5481373073434039,y:.1255496832776173},{x:.5490025186311253,y:.12736726941208848},{x:.5495935209593992,y:.1297019482663393},{x:.5503905347901464,y:.13197456307270286},{x:.5506733336355601,y:.13396760967066554},{x:.5511673266667299,y:.13591906574595297},{x:.5791213266667299,y:.32118306574595296},{x:.5792865967797204,y:.3243841932678159},{x:.5796238248970751,y:.32757179562983435},{x:.579513579388425,y:.3287806341158348},{x:.5795761658223595,y:.3299928748079828},{x:.5791137513174164,y:.3331647361616822},{x:.5788226293197903,y:.33635687958013644},{x:.5226546293197903,y:.6297998795801365},{x:.5219105438778229,y:.6323181740447382},{x:.521369234544533,y:.6348876981954499},{x:.5206636104444891,y:.6365383151545928},{x:.5201549436340621,y:.6382598551025291},{x:.5189338607071872,y:.6405845973766512},{x:.5179016631869613,y:.6429991446291672},{x:.5168875780620563,y:.6444803850133782},{x:.5160528293589531,y:.6460696100820955},{x:.5144016744792594,y:.6481114616238732},{x:.5129182555439367,y:.6502782422813739},{x:.4473292555439367,y:.7283852422813738},{x:.4454767413796947,y:.7301964293264013},{x:.4437773055972873,y:.732151966404103},{x:.44233025961343425,y:.7332727172827731},{x:.4410215211764534,y:.7345522595114605},{x:.4388512574885805,y:.735967237520439},{x:.4368029695300015,y:.737553656027496},{x:.4351650804791521,y:.7383705673253327},{x:.43363186277883553,y:.7393702013057781},{x:.431227251583759,y:.7403345934673514},{x:.4289088260065632,y:.7414909282302113},{x:.3168848260065632,y:.7842309282302113},{x:.31544522398579106,y:.7846236280557255},{x:.31406876767085296,y:.7851998529634103},{x:.3111991137964475,y:.7857818972901452},{x:.30837424253549156,y:.7865524758495462},{x:.30688569012846406,y:.7866567776362199},{x:.305423266132861,y:.7869533972381565},{x:.30249520063786056,y:.7869644160479279},{x:.2995742760667897,y:.7871690831124285},{x:.29809397750772,y:.7869809786010931},{x:.2966017859654652,y:.7869865939723252},{x:.2937278327647654,y:.7864261638184524},{x:.2908231043767717,y:.786057054147543},{x:.2894079467091229,y:.7855837720890787},{x:.28794333170435554,y:.785298167434039},{x:.16895933170435556,y:.7496931674340391},{x:.16685145995859063,y:.7488293371508981},{x:.16467103610787698,y:.748169732810473},{x:.1627799564873854,y:.7471607878174731},{x:.16079664289106937,y:.7463480029082842},{x:.1588977982379503,y:.7450895455041626},{x:.15688795304330724,y:.7440172356850165},{x:.15523004539103946,y:.7426587459550258},{x:.15344340707901263,y:.7414746531917952},{x:.15182656105367498,y:.739869930478983},{x:.1500645317387979,y:.7384261234461069},{x:.08134353173879794,y:.6698101234461069},{x:.07898814712174665,y:.6669445493412297},{x:.07654417665723892,y:.6641541443502993},{x:.0761910053095167,y:.6635415309608049},{x:.07574199244846258,y:.6629952594015535},{x:.07399091166125166,y:.6597252337561722},{x:.07213828241215867,y:.6565116506297859},{x:.07191141209628055,y:.6558419081228384},{x:.07157759918584938,y:.6552185349547689},{x:.07049811528111428,y:.6516697230205841},{x:.06930802275051184,y:.6481564579560907},{x:.013298022750511833,y:.4072474579560906},{x:.013249789700227431,y:.40687927578320093},{x:.013136451320225305,y:.40652566731159423},{x:.012677284531251238,y:.4025091147450468},{x:.012152162963867598,y:.3985006516980174},{x:.01217668547678935,y:.39813013424102855},{x:.012134510452571898,y:.39776120903599943}],[{x:.1030741934540208,y:.3959601630333355},{x:.15405220468618464,y:.6152256818322884},{x:.20562817178182732,y:.6667228451191239},{x:.2990925609035841,y:.6946913078929434},{x:.38591644511804135,y:.6615657918309754},{x:.4364618489221904,y:.6013735361946543},{x:.4889800495366121,y:.3269984766785998},{x:.4631403994395801,y:.1557472448128009},{x:.4478929247459949,y:.12297570323093639},{x:.3763894463327694,y:.21252056043298723},{x:.3702357208697667,y:.2188412627114457},{x:.36296712967313866,y:.22383998218579282},{x:.35486300062629866,y:.22732462086994373},{x:.34623477086366883,y:.22916126605347437},{x:.3374140184162602,y:.2292793364919841},{x:.3287397198538915,y:.22767429480473567},{x:.32054522360571197,y:.22440782184365232},{x:.31314543956701274,y:.21960544633276935},{x:.3068247372885543,y:.2134517208697667},{x:.30182601781420715,y:.20618312967313862},{x:.2983413791300562,y:.19807900062629863},{x:.2965047339465256,y:.18945077086366885},{x:.29638666350801585,y:.18063001841626014},{x:.2979917051952643,y:.17195571985389144},{x:.30125817815634764,y:.16376122360571194},{x:.3060605536672306,y:.1563614395670127},{x:.3960043024488616,y:.04372356068896105},{x:.3492507773512258,y:.005187991106938553},{x:.28681342879982186,y:-.004580559340762309},{x:.22209853619564562,y:.018606191220169738},{x:.15806156000107346,y:.09497717514193305},{x:.1030741934540208,y:.3959601630333355}]],R:[[{x:-.010088,y:.05588800000000005},{x:-.009223337618145366,y:.04710893550927426},{x:-.006662578963007905,y:.03866724554357101},{x:-.0025041325536145423,y:.030887339514117953},{x:.0030921948466053617,y:.024068194846605412},{x:.009911339514117913,y:.018471867446385508},{x:.01769124554357096,y:.014313421036992145},{x:.02613293550927423,y:.011752662381854684},{x:.034912,y:.01088800000000005},{x:.043691064490725774,y:.011752662381854684},{x:.05213275445642904,y:.014313421036992145},{x:.059912660485882105,y:.018471867446385515},{x:.06673180515339464,y:.024068194846605412},{x:.07232813255361453,y:.030887339514117953},{x:.0764865789630079,y:.03866724554357101},{x:.07904733761814536,y:.04710893550927428},{x:.079912,y:.05588800000000005},{x:.079912,y:.36648688236049143},{x:.25933152798675563,y:.3728389247505383},{x:.2598033776805002,y:.3702688775066002},{x:.2630584474090824,y:.36206984491555727},{x:.26785052379396923,y:.35466338703825},{x:.5319365237939692,y:.022999387038250052},{x:.5380814500271169,y:.016670129897313986},{x:.5453430800394999,y:.011661303295187019},{x:.5534423534621115,y:.008165393629206541},{x:.5620680197594453,y:.00631674674730745},{x:.5708885994130244,y:.006186405112428031},{x:.5795651224933998,y:.00777937768050025},{x:.5877641550844427,y:.011034447409082423},{x:.59517061296175,y:.015826523793969254},{x:.601499870102686,y:.021971450027116944},{x:.606508696704813,y:.02923308003949996},{x:.6100046063707935,y:.03733235346211146},{x:.6118532532526926,y:.04595801975944533},{x:.6119835948875719,y:.05477859941302443},{x:.6103906223194997,y:.06345512249339977},{x:.6071355525909176,y:.07165415508444274},{x:.6023434762060308,y:.07906061296174999},{x:.36492288462028066,y:.3772356888373974},{x:.45122307475864126,y:.3907421966461853},{x:.4517263325772421,y:.3908725352482557},{x:.4522445282141884,y:.3909141268943158},{x:.4559919550269364,y:.3919772876167318},{x:.459762859565968,y:.3929539131315124},{x:.46023101962685037,y:.3931799280437793},{x:.4607311441523136,y:.39332181547170203},{x:.5072261441523136,y:.41160281547170213},{x:.5099186672764574,y:.4129799887569096},{x:.5126912264123276,y:.4141879634543456},{x:.5138373975854011,y:.41498434320238026},{x:.5150799754049854,y:.4156198976243936},{x:.5174520892726079,y:.41749589411441484},{x:.5199357102894067,y:.4192215573713852},{x:.5536387102894067,y:.4479225573713852},{x:.5544422891842978,y:.4487559165260936},{x:.5553578681885658,y:.44946439490120116},{x:.5574982196806069,y:.4519250983842071},{x:.5597619879819907,y:.4542727608851649},{x:.5603875460278954,y:.4552468777427617},{x:.5611473151639865,y:.4561203635073251},{x:.5627664809673836,y:.45895134712470415},{x:.5645287453623273,y:.46169553923588524},{x:.5649522427143585,y:.46277297903182424},{x:.5655270044804562,y:.4637779046177677},{x:.5843050044804562,y:.5056739046177676},{x:.5856980535944053,y:.5098331481877504},{x:.5870956418010017,y:.5139908687307394},{x:.5870987900445207,y:.5140153439302019},{x:.587106627133701,y:.514038743222053},{x:.5876614810321307,y:.5183898384933372},{x:.5882210839336397,y:.522740325535193},{x:.5899430839336397,y:.580600325535193},{x:.589777587866933,y:.5830153029012521},{x:.5898269599494498,y:.5854354407122341},{x:.5894767504310368,y:.5874052295805413},{x:.5893399666658296,y:.589401226848592},{x:.5887065118476329,y:.5917375144207835},{x:.5882827897945603,y:.5941207819778186},{x:.5699357897945603,y:.6593647819778187},{x:.5695566600666073,y:.6603356321127045},{x:.5693270257483343,y:.6613522723710545},{x:.5679549854437747,y:.6644370937206254},{x:.5667268644118839,y:.6675819841936177},{x:.5661656160899001,y:.668460215174679},{x:.5657420574552864,y:.6694125215424361},{x:.5637945617300048,y:.6721703971299327},{x:.5619765010042908,y:.6750152648867381},{x:.5612547025465381,y:.6757671267898905},{x:.5606534967163777,y:.6766185026674012},{x:.5398464967163776,y:.7006785026674012},{x:.5387925287989109,y:.70167944573824},{x:.5378793324857355,y:.7028102896247742},{x:.535601038014175,y:.7047103734673366},{x:.5334498940671065,y:.7067532939324781},{x:.5322209035416287,y:.707529385222465},{x:.5311046373415733,y:.7084603444980107},{x:.5029396373415734,y:.7276033444980106},{x:.49917038563569516,y:.7296565217962586},{x:.49541206095977475,y:.7317296332429761},{x:.4611910609597748,y:.7464366332429762},{x:.457170688924302,y:.7477143925092122},{x:.45316143447737084,y:.7490266191763204},{x:.37177643447737085,y:.7670666191763205},{x:.36787988134157384,y:.7675363076101905},{x:.36399443936523473,y:.7680904503837813},{x:.2290834393652347,y:.7739614503837813},{x:.2260604581328276,y:.7737959747883908},{x:.2230330269857825,y:.7738173839936113},{x:.030818026985782503,y:.7562573839936113},{x:.028490934977474184,y:.7558115802948838},{x:.02613293550927423,y:.7555793376181453},{x:.024169339379190496,y:.7549836872441402},{x:.022154034015341384,y:.7545976128723226},{x:.01995862841458906,y:.7537063820373993},{x:.01769124554357096,y:.7530185789630078},{x:.01588158498580211,y:.7520512952425895},{x:.013980322522940947,y:.7512794726091756},{x:.012000971535783972,y:.7499770641392344},{x:.009911339514117913,y:.7488601325536145},{x:.008325158769029223,y:.7475583876576994},{x:.006611003657363959,y:.7464304774736483},{x:.004923772632206568,y:.7447669421957904},{x:.0030921948466053617,y:.7432638051533946},{x:.0017904499506900475,y:.7416776244083056},{x:.0003292762098528329,y:.7402369716294513},{x:-.001000995511218774,y:.7382762382714833},{x:-.0025041325536145423,y:.7364446604858821},{x:-.0034714162740331275,y:.7346349999281129},{x:-.004623456556617868,y:.732936968032819},{x:-.005545647377387794,y:.7307543864780955},{x:-.006662578963007905,y:.728664754456429},{x:-.007258229337013042,y:.7267011583263452},{x:-.008056863899357211,y:.7248110017280808},{x:-.008535534543753812,y:.7224904473617442},{x:-.009223337618145366,y:.7202230644907257},{x:-.009424464135908606,y:.7181809926864091},{x:-.009839001899660749,y:.7161713490432334},{x:-.009855757323261527,y:.7138019994682},{x:-.010088,y:.711444},{x:-.010088,y:.05588800000000005}],[{x:.079912,y:.45654326739466394},{x:.079912,y:.6703676283824797},{x:.22820062174801237,y:.6839146886946046},{x:.3561457472749752,y:.6783468266821017},{x:.42954781695254723,y:.662076342723345},{x:.4559144639404158,y:.6507448714849071},{x:.47563211893454127,y:.6373433067928232},{x:.48601322722124407,y:.6253391992627579},{x:.4997779385388953,y:.5763903343143285},{x:.4985264355495565,y:.5343392524542002},{x:.48755361344964526,y:.5098575528750181},{x:.467303195590932,y:.4926125823096997},{x:.43241084881177044,y:.4788935374345549},{x:.3509044963348569,y:.4661372945522357},{x:.079912,y:.45654326739466394}]],S:[[{x:.021897597226735628,y:.20918252956592975},{x:.022856530106274857,y:.20041326151782815},{x:.025507836686771486,y:.19199957102060095},{x:.07532383668677148,y:.0752955710206009},{x:.07606476437254353,y:.07394451179196875},{x:.07662717764446286,y:.07250992955787258},{x:.07818101321859919,y:.07008559601860773},{x:.07956562874320691,y:.06756079148160443},{x:.08055589829123208,y:.06638024029801701},{x:.0813873780598424,y:.06508294454561242},{x:.08338432112997196,y:.06300833217803187},{x:.0852348965856767,y:.0608021661408081},{x:.08643645249257384,y:.05983749092219001},{x:.08750504545666679,y:.05872733599970995},{x:.08986835462050304,y:.05708217099364391},{x:.09211377343035676,y:.05527942517977789},{x:.09348044057646428,y:.05456769785378441},{x:.09474508130770348,y:.05368734639231786},{x:.18347008130770348,y:.00406434639231789},{x:.18531117162778632,y:.0032602675504258996},{x:.18705570252460849,y:.0022638899609980986},{x:.18934358471290644,y:.0014991491478438968},{x:.19155425509545604,y:.0005336596975895336},{x:.19351683738147718,y:.0001042099085839361},{x:.19542223123106015,y:-.0005326814704223887},{x:.1978153459361366,y:-.0008363843304376121},{x:.20017189655491793,y:-.0013520417748285815},{x:.2021805498702545,y:-.0013903589963945293},{x:.20417358345551592,y:-.0016432887864569548},{x:.36640558345551594,y:-.006196288786456984},{x:.3683537351453612,y:-.006059465175549666},{x:.37030515940756886,y:-.006136660097762148},{x:.3727431942064551,y:-.005751182385354602},{x:.3752054496398049,y:-.005578251970786187},{x:.37708947517888647,y:-.005063991846688501},{x:.37901846335331396,y:-.004758999502412188},{x:.3813344490261288,y:-.00390529164215812},{x:.3837156558614866,y:-.003255321831637216},{x:.38546315320491126,y:-.002383387922517842},{x:.38729557535780434,y:-.001707928996501587},{x:.5134735753578044,y:.059451071003498376},{x:.5144073364238021,y:.06002293670994077},{x:.5154151369003129,y:.060451046875811966},{x:.5181619939873726,y:.06232241135953579},{x:.5209964106485654,y:.06405830049148753},{x:.5218006642926897,y:.06480134570578519},{x:.5227055800155168,y:.06541784197435321},{x:.5250345719141375,y:.06778913394790613},{x:.5274758708842278,y:.07004463571609586},{x:.5281197100899656,y:.07093030562736781},{x:.5288869656553633,y:.07171149639276676},{x:.5307085905129939,y:.07449158843544039},{x:.5326629540416582,y:.07718002517181716},{x:.5331216364294024,y:.07817428398206286},{x:.5337217466362741,y:.07909014852127505},{x:.5349660004312154,y:.08217220325496363},{x:.5363583234240663,y:.08519025984344057},{x:.5366142220868877,y:.08625489874416871},{x:.5370241250365293,y:.08727024089657527},{x:.5783351250365293,y:.22800124089657534},{x:.5784689928995229,y:.22870739358153944},{x:.5787167010683089,y:.22938208824013706},{x:.5792894483007394,y:.23303529403132756},{x:.5799781923062021,y:.23666841715613338},{x:.579971724381043,y:.23738711763976203},{x:.5800830465086156,y:.23809717369609615},{x:.5799320834693805,y:.24179192160438975},{x:.5798988062915618,y:.2454896025769029},{x:.5797522511369868,y:.24619323160266243},{x:.5797229091764134,y:.2469113620006918},{x:.5788540372904492,y:.2505056649360105},{x:.5781000177526308,y:.2541258039501414},{x:.5778190074010411,y:.2547873214491718},{x:.5776501289474114,y:.2554859288404322},{x:.5462891289474114,y:.3454679288404322},{x:.5453940585085517,y:.34740151578805634},{x:.5446999978282894,y:.3494160105998292},{x:.5435456407901493,y:.3513945829466735},{x:.5425833616033817,y:.3534733584203385},{x:.5413282655917657,y:.35519517245680393},{x:.5402545326513293,y:.3570355547940282},{x:.5387363559437135,y:.3587509055417339},{x:.537387017705137,y:.36060200657115166},{x:.5358201287566253,y:.36204587934864135},{x:.5344079865107593,y:.36364142435019586},{x:.5325843328131388,y:.3650276335315076},{x:.5308997898345437,y:.36657992334222783},{x:.5290813226127058,y:.36769036763963614},{x:.5273850388959807,y:.368979759405903},{x:.44286903889598056,y:.42100375940590296},{x:.4391930936098881,y:.42279580082266366},{x:.4355432374645799,y:.42464039733796655},{x:.4352309585303121,y:.42472736117212373},{x:.4349395777453148,y:.4248694107387315},{x:.430984654780085,y:.42590987723258605},{x:.42704506666901776,y:.42700697873237736},{x:.18802361397643091,y:.46887992641475673},{x:.1445277950559712,y:.506325930968192},{x:.1345999941059918,y:.5433489412625321},{x:.1668438673565076,y:.6442112383308392},{x:.2418447705661005,y:.6964178007533797},{x:.3847076342900009,y:.6886954406015322},{x:.4475324208368403,y:.608018765726417},{x:.4536085342974724,y:.6016234190133417},{x:.4608155671913789,y:.5965363480257236},{x:.46887655728619765,y:.5929530460487544},{x:.47748172525324006,y:.5910112173678703},{x:.48630037931336645,y:.5907854853702875},{x:.49499362353660437,y:.5922845248100812},{x:.5032273814226823,y:.5954507284422511},{x:.5106852342735829,y:.6001624208368403},{x:.5170805809866582,y:.6062385342974724},{x:.5221676519742764,y:.6134455671913789},{x:.5257509539512455,y:.6215065572861976},{x:.5276927826321296,y:.63011172525324},{x:.5279185146297124,y:.6389303793133664},{x:.5264194751899187,y:.6476236235366044},{x:.5232532715577489,y:.6558573814226824},{x:.5185415791631597,y:.663315234273583},{x:.4431175791631597,y:.760171234273583},{x:.4420344490669973,y:.7613112710002186},{x:.44110391182703096,y:.7625789282836855},{x:.4390031114098716,y:.7645018722698176},{x:.4370414657025276,y:.7665665809866583},{x:.43575673751534005,y:.767473404028016},{x:.4345967726198766,y:.768535164822443},{x:.4321611907321885,y:.7700113141492059},{x:.4298344328086211,y:.7716536519742764},{x:.42839747791415833,y:.7722924126294288},{x:.42705266216361437,y:.7731074740629288},{x:.4243758968514515,y:.7740801011395291},{x:.42177344271380235,y:.7752369539512456},{x:.4202394824828045,y:.7755831050064366},{x:.4187614963922926,y:.7761201447252115},{x:.4159464142454535,y:.7765518720385514},{x:.41316827474676,y:.7771787826321297},{x:.4115962584106506,y:.7772190216964318},{x:.4100419001567639,y:.7774574015652649},{x:.23125890015676387,y:.7871214015652648},{x:.22961427991333744,y:.7870487065186679},{x:.22797320559841586,y:.7871788426312305},{x:.22521775007366066,y:.7868543723294609},{x:.22244596265035355,y:.7867318545526676},{x:.22084712542379714,y:.7863397068281228},{x:.21921219559556868,y:.7861471846952227},{x:.21657298639174055,y:.7852913862936938},{x:.21387836011908076,y:.7846304737606538},{x:.21238674832737245,y:.7839339433752962},{x:.2108207924222569,y:.7834261615145331},{x:.2083992528689725,y:.782071922865878},{x:.2058853407234555,y:.7808980140745921},{x:.20455827617124617,y:.7799238683005129},{x:.20312147299647784,y:.7791203404840283},{x:.10291447299647782,y:.7093683404840284},{x:.10181255131472464,y:.7084283417469311},{x:.10059641238964509,y:.7076416809983432},{x:.09846400643554813,y:.7055718520256913},{x:.09620311784593605,y:.7036431918911783},{x:.09530575393663021,y:.7025062807105057},{x:.09426645267874648,y:.7014974784931097},{x:.09257882390791694,y:.6990514089395268},{x:.09073764058529563,y:.6967187299857058},{x:.09007931964022471,y:.6954285972205445},{x:.08925679581402991,y:.6942364212378118},{x:.08807879885369768,y:.6915081121844703},{x:.08672807644060793,y:.6888610579553555},{x:.08633409736450004,y:.6874672826843552},{x:.08575996009935855,y:.6861375475907227},{x:.04484896009935855,y:.5581635475907226},{x:.04400698871411546,y:.5542371548008082},{x:.04309586967447821,y:.5503262293029391},{x:.04308290316808571,y:.5499278363503387},{x:.04299932697019912,y:.5495380927241992},{x:.04293953506277818,y:.5455228840020936},{x:.042808906634767226,y:.5415093553341928},{x:.04287391188557095,y:.5411160877505585},{x:.04286797679041901,y:.5407175280315513},{x:.04359266213029085,y:.5367678055966908},{x:.04424754429113727,y:.532805911414652},{x:.06119154429113727,y:.4696179114146519},{x:.06126294463056804,y:.4694283141856516},{x:.06129777501412092,y:.46922873472253734},{x:.06281676603792068,y:.46530228011432895},{x:.0643004966052513,y:.46136236601319713},{x:.0644075135916399,y:.46119034135699993},{x:.06448061074086608,y:.46100139182805006},{x:.06673642807197144,y:.45744672339211917},{x:.06896028828319853,y:.453871975109843},{x:.06909880931377366,y:.45372413383751425},{x:.06920736414622189,y:.4535530754671619},{x:.07211331798967527,y:.4505067971180214},{x:.07499184614403663,y:.4474345902263458},{x:.07515654793327702,y:.4473166137950705},{x:.07529638874761438,y:.44717002026055797},{x:.1386943887476144,y:.392590020260558},{x:.14135607757337018,y:.39071931904916735},{x:.1439175788350931,y:.3887136217356019},{x:.14495796828078528,y:.38818782053421796},{x:.14591168674437638,y:.38751752344016943},{x:.1488871876674173,y:.38620203695812855},{x:.15179076253542007,y:.38473460266203335},{x:.15291373991533655,y:.3844218744952798},{x:.15397990142199966,y:.3839505182141148},{x:.15715486761053352,y:.383240799869195},{x:.1602889333309822,y:.3823680212676226},{x:.4030282434963717,y:.3398437611206276},{x:.46657219784598525,y:.30072914754350266},{x:.487912612564808,y:.23949853636308405},{x:.45628203537627,y:.13174508671722343},{x:.35793695341674575,y:.08407681754539842},{x:.21775140382412592,y:.0880110894972649},{x:.15207256592030022,y:.12474460286217379},{x:.10828216331322851,y:.2273324289793991},{x:.10404037125679308,y:.23506720851839558},{x:.09837110341432329,y:.2418258338591919},{x:.09149222656964323,y:.24734857482022213},{x:.08366809210217534,y:.25142319556354265},{x:.07519937711167927,y:.2538931106990613},{x:.06641152956592972,y:.2546634027732644},{x:.05764226151782814,y:.2537044698937252},{x:.04922857102060091,y:.2510531633132285},{x:.04149379148160447,y:.24681137125679312},{x:.034735166140808106,y:.24114210341432332},{x:.029212425179777887,y:.23426322656964324},{x:.025137804436457384,y:.22643909210217536},{x:.022667889300938757,y:.21797037711167933},{x:.021897597226735628,y:.20918252956592975}]],T:[[{x:-.022050999999999998,y:.729004},{x:-.021186337618145364,y:.7202249355092742},{x:-.018625578963007903,y:.711783245543571},{x:-.01446713255361454,y:.7040033395141179},{x:-.008870805153394636,y:.6971841948466053},{x:-.002051660485882085,y:.6915878674463855},{x:.005728245543570962,y:.6874294210369921},{x:.014169935509274232,y:.6848686623818546},{x:.022949,y:.684004},{x:.264284,y:.684004},{x:.264284,y:.05103000000000002},{x:.26514866238185464,y:.04225093550927423},{x:.2677094210369921,y:.03380924554357098},{x:.27186786744638547,y:.026029339514117924},{x:.27746419484660534,y:.019210194846605383},{x:.28428333951411794,y:.013613867446385479},{x:.292063245543571,y:.009455421036992116},{x:.30050493550927426,y:.006894662381854655},{x:.309284,y:.0060300000000000215},{x:.3180630644907258,y:.006894662381854655},{x:.32650475445642907,y:.009455421036992116},{x:.3342846604858821,y:.013613867446385486},{x:.34110380515339467,y:.019210194846605383},{x:.34670013255361454,y:.026029339514117924},{x:.3508585789630079,y:.03380924554357098},{x:.35341933761814537,y:.04225093550927425},{x:.354284,y:.05103000000000002},{x:.354284,y:.684004},{x:.579103,y:.684004},{x:.5878820644907258,y:.6848686623818546},{x:.596323754456429,y:.6874294210369921},{x:.6041036604858822,y:.6915878674463855},{x:.6109228051533947,y:.6971841948466053},{x:.6165191325536146,y:.7040033395141179},{x:.6206775789630079,y:.711783245543571},{x:.6232383376181454,y:.7202249355092742},{x:.6241030000000001,y:.729004},{x:.6232383376181454,y:.7377830644907257},{x:.6206775789630079,y:.746224754456429},{x:.6165191325536146,y:.7540046604858821},{x:.6109228051533947,y:.7608238051533946},{x:.6041036604858822,y:.7664201325536145},{x:.596323754456429,y:.7705785789630079},{x:.5878820644907258,y:.7731393376181454},{x:.579103,y:.774004},{x:.022949,y:.774004},{x:.014169935509274211,y:.7731393376181454},{x:.005728245543570935,y:.7705785789630079},{x:-.0020516604858820953,y:.7664201325536145},{x:-.008870805153394643,y:.7608238051533946},{x:-.01446713255361454,y:.7540046604858821},{x:-.018625578963007903,y:.746224754456429},{x:-.021186337618145364,y:.7377830644907257},{x:-.022050999999999998,y:.729004}]],U:[[{x:.027022176378557076,y:.7288780077818786},{x:.02808017637855708,y:.35099900778187865},{x:.02823473618726791,y:.3494735334648019},{x:.028192796744230073,y:.34794082288884604},{x:.035484796744230065,y:.24514582288884607},{x:.03612518708694976,y:.24139252668431194},{x:.03666424897987138,y:.2376233431565944},{x:.055316248979871384,y:.16148034315659432},{x:.05618736340037885,y:.15900518320818077},{x:.05685851158014249,y:.15646848905542057},{x:.057648252259250334,y:.15485425480263812},{x:.058244846291224776,y:.15315910934454152},{x:.0595821022437829,y:.15090145489330362},{x:.06073523897858293,y:.14854443712190207},{x:.09649723897858292,y:.0906284371219021},{x:.09834293286415725,y:.08820732921922435},{x:.10003759110096133,y:.08567820232322114},{x:.10101147458130413,y:.08470684222595504},{x:.10184538199049184,y:.08361295562088691},{x:.10412794610596264,y:.08159844564215248},{x:.10628345014049506,y:.07944852663140606},{x:.15306845014049508,y:.041154526631406},{x:.15518086878702558,y:.03974701384514513},{x:.15716842451696925,y:.03816808161035298},{x:.15884280372557036,y:.03730705230772802},{x:.16040964618671547,y:.03626305906247794},{x:.1627560674239954,y:.03529470367371844},{x:.16501346722603244,y:.034133863066459845},{x:.23490646722603245,y:.006476863066459913},{x:.23625924682734178,y:.006089880823813601},{x:.23754823013535448,y:.005525708919597472},{x:.24049103862888763,y:.004879315347967098},{x:.24338780663402787,y:.004050652809021178},{x:.24479008944495417,y:.003935020529692536},{x:.24616436977860445,y:.0036331571990539033},{x:.3343553697786044,y:-.006825842800946093},{x:.3363658265006992,y:-.006865793301669296},{x:.3383604992721398,y:-.007120376900508131},{x:.34076517153289726,y:-.0069532142518240045},{x:.3431751712391958,y:-.00700110421331946},{x:.3451547915551648,y:-.0066480664270605625},{x:.3471608040448924,y:-.0065086169201366215},{x:.4090588040448924,y:.003962383079863387},{x:.4119620232343868,y:.004752615784895447},{x:.4149089852784979,y:.005359710588792872},{x:.4162090298953196,y:.005908616535408058},{x:.4175706649775032,y:.0062792425557079215},{x:.42026393287145114,y:.0076206811274584655},{x:.4230358315454356,y:.008791034549085273},{x:.4738028315454356,y:.03637303454908527},{x:.4760785863358737,y:.0379161826666043},{x:.4784624107710392,y:.03928649177082543},{x:.47972093897980134,y:.04038599604431689},{x:.48110410464379305,y:.04132389563682743},{x:.48303507818089647,y:.043281370330868374},{x:.4851057640535682,y:.045090410406577325},{x:.5154867640535682,y:.07740541040657731},{x:.5155903820373309,y:.07753992155387555},{x:.5157174079857786,y:.07765259073212467},{x:.5182811318880063,y:.08103290449336144},{x:.5208701788099869,y:.08439386230433626},{x:.5209455639802052,y:.08454600372347547},{x:.521048168494406,y:.08468128952824439},{x:.5340921684944061,y:.10592328952824437},{x:.5341054861393935,y:.10595068243490303},{x:.5341238592672674,y:.10597497562685786},{x:.5360339092314592,y:.10991723311331511},{x:.5379492688231333,y:.11385691363208547},{x:.5379569864823256,y:.11388637833537296},{x:.5379702672090579,y:.11391378915988949},{x:.557924267209058,y:.16807278915988946},{x:.5580810067186996,y:.16867450001810444},{x:.5583366124011981,y:.1692413235937006},{x:.5591915686944892,y:.17293786157308777},{x:.5601479818122073,y:.1766094575809222},{x:.5601843216510317,y:.17723018509512725},{x:.5603244341481242,y:.17783598350956487},{x:.5696394341481241,y:.2495799835095649},{x:.569721927352796,y:.25224539988339456},{x:.5700114646960025,y:.2548963275892337},{x:.5750284646960026,y:.7275053275892338},{x:.5742570402937379,y:.7362930758081182},{x:.5717860339652341,y:.7447614724740409},{x:.5677104050979391,y:.752585081852262},{x:.5621867778235843,y:.7594632470219072},{x:.5554274220406369,y:.7651316439528263},{x:.5476920960011455,y:.7693724393298378},{x:.5392780639467868,y:.7720226617648687},{x:.5305086724107663,y:.7729804646960026},{x:.5217209241918819,y:.7722090402937379},{x:.5132525275259592,y:.7697380339652341},{x:.505428918147738,y:.7656624050979391},{x:.4985507529780929,y:.7601387778235843},{x:.49288235604717384,y:.753379422040637},{x:.48864156067016223,y:.7456440960011456},{x:.48599133823513135,y:.7372300639467868},{x:.4850335353039975,y:.7284606724107663},{x:.48004487037154997,y:.258520878697574},{x:.4717248917269394,y:.19444051929027983},{x:.4550625667192203,y:.14921575933773623},{x:.4467624246683876,y:.135699076001046},{x:.42448554918380393,y:.11200409455592171},{x:.3866565267646711,y:.09145137140181527},{x:.33852910612300163,y:.08330987698295},{x:.2625775703514966,y:.09231733933890664},{x:.20464797458906397,y:.11524036210229632},{x:.16911733402594603,y:.14432255403825953},{x:.14104265103985364,y:.1897890642955865},{x:.12498883901236212,y:.25532548983758135},{x:.11807553704626646,y:.35278200048003916},{x:.11702182362144292,y:.7291299922181214},{x:.11613258476624799,y:.737906601393955},{x:.11354820087598706,y:.7463410885908555},{x:.10936798837422372,y:.7541093211959605},{x:.10375259048311052,y:.7609127703867312},{x:.09691780379445152,y:.7664899834261845},{x:.0891262853276994,y:.770626631144951},{x:.08067745876799748,y:.7731637444910576},{x:.07189600778187862,y:.7740038236214429},{x:.06311939860604492,y:.773114584766248},{x:.05468491140914452,y:.770530200875987},{x:.04691667880403945,y:.7663499883742237},{x:.04011322961326877,y:.7607345904831105},{x:.03453601657381558,y:.7538998037944515},{x:.030399368855048972,y:.7461082853276993},{x:.027862255508942363,y:.7376594587679974},{x:.027022176378557076,y:.7288780077818786}]],V:[[{x:-.017163400590915968,y:.72836062945125},{x:-.016173311217885875,y:.7195948244454146},{x:-.01349212241321528,y:.7111906087794154},{x:.27875887758678475,y:.033216608779415485},{x:.2789749302503264,y:.03282594254600198},{x:.27911899522766415,y:.032403397706182537},{x:.2811076886540147,y:.028969490703698003},{x:.2830281292409603,y:.025496951748158487},{x:.28331624571443165,y:.0251559418405784},{x:.28353997693249255,y:.024769621764193565},{x:.2861603801951793,y:.021789671162821947},{x:.2887213787977949,y:.018758515442121357},{x:.2890704869266977,y:.018480266679882864},{x:.2893652865202418,y:.018145017430816868},{x:.2925166989914198,y:.015733541060992128},{x:.2956198378696305,y:.013260254189586457},{x:.29601652162435305,y:.013055459516578674},{x:.296371060610326,y:.012784164535463174},{x:.29993237527606087,y:.011033834081706148},{x:.30345840254303674,y:.009213463087028258},{x:.303887417589348,y:.00908999264768462},{x:.3042880712333465,y:.00889307764850001},{x:.3081224287682413,y:.00787115732855266},{x:.3119358411735324,y:.006773658047051503},{x:.31238070070379703,y:.0067362567411129665},{x:.3128120721109714,y:.0066212890568466964},{x:.3167721203052928,y:.006367050695504971},{x:.32072637054875,y:.006034599409084053},{x:.3211699788607,y:.006084704547762943},{x:.3216154906697884,y:.006056102322046737},{x:.325549047092249,y:.006579316156958459},{x:.3294921755545854,y:.0070246887821141385},{x:.32991748502957097,y:.007160374853030322},{x:.330360016471596,y:.007219237253358143},{x:.3341159167548444,y:.008499796470269213},{x:.33789639122058457,y:.00970587758678474},{x:.33828705745399834,y:.009921930250326543},{x:.33870960229381747,y:.01006599522766418},{x:.3421435092963017,y:.012054688654014527},{x:.34561604825184156,y:.013975129240960359},{x:.3459570581594215,y:.014263245714431577},{x:.34634337823580646,y:.014486976932492547},{x:.34932332883717915,y:.01710738019518028},{x:.35235448455787866,y:.01966837879779494},{x:.3526327333201171,y:.020017486926697612},{x:.35296798256918316,y:.020312286520241793},{x:.3553794589390082,y:.023463698991420194},{x:.3578527458104136,y:.026566837869630475},{x:.3580575404834214,y:.026963521624353053},{x:.35832883546453687,y:.02731806061032596},{x:.3600791659182934,y:.03087937527605991},{x:.3618995369129718,y:.03440540254303673},{x:.3620230073523154,y:.034834417589348},{x:.3622199223515,y:.0352350712333465},{x:.6163569223515,y:.7132090712333464},{x:.6186287109431533,y:.7217330721109714},{x:.6191938976779532,y:.7305364906697883},{x:.6180307627466418,y:.7392810164715959},{x:.6151840047723358,y:.7476306022938175},{x:.6107630230675074,y:.7552643782358064},{x:.6049377134797582,y:.7618889825691831},{x:.597931939389674,y:.7672498354645368},{x:.5900149287666535,y:.7711409223515},{x:.5814909278890286,y:.7734127109431533},{x:.5726875093302116,y:.7739778976779532},{x:.5639429835284039,y:.7728147627466418},{x:.5555933977061824,y:.7699680047723358},{x:.5479596217641935,y:.7655470230675074},{x:.5413350174308168,y:.7597217134797583},{x:.5359741645354631,y:.7527159393896741},{x:.5320830776484999,y:.7447989287666535},{x:.3171703309688009,y:.17146543337864517},{x:.06915612241321528,y:.7468173912205845},{x:.06488687075903964,y:.7545370482518415},{x:.059193621202205074,y:.7612754845578786},{x:.05229516213036956,y:.7667737458104136},{x:.04445659745696326,y:.7708205369129717},{x:.0359791588264676,y:.7732603419529485},{x:.027188629451250054,y:.773999400590916},{x:.01842282444541461,y:.7730093112178859},{x:.010018608779415478,y:.7703281224132152},{x:.0022989517481584835,y:.7660588707590397},{x:-.004439484557878664,y:.7603656212022051},{x:-.009937745810413578,y:.7534671621303695},{x:-.013984536912971763,y:.7456285974569633},{x:-.016424341952948517,y:.7371511588264675},{x:-.017163400590915968,y:.72836062945125}]],W:[[{x:-.04486424190193638,y:.7324968210037928},{x:-.04468360364824366,y:.7236771280279449},{x:.03511539635175633,y:.05429612802794491},{x:.03538914303981033,y:.053053468981350556},{x:.035486899606724354,y:.05178477579191172},{x:.03633616861564037,y:.04875449496443272},{x:.037013200434797444,y:.04568114375463893},{x:.03752411791055629,y:.04451576738270255},{x:.03786750587531561,y:.043290523137271594},{x:.039291634880795206,y:.040484152470619886},{x:.040555238800576446,y:.03760193719815913},{x:.041283692791972554,y:.036558628261303676},{x:.041859515947665654,y:.035423918409107566},{x:.04380377647068911,y:.032949305154171604},{x:.045605392901094464,y:.030368987735599786},{x:.046523389329760155,y:.02948784001117424},{x:.047309519115439125,y:.028487270815480248},{x:.049699194314460494,y:.02643951297186818},{x:.05196958814642765,y:.024260253558522238},{x:.05304184892442764,y:.02357512905942291},{x:.054008074813295476,y:.022747151833295932},{x:.056751330810561565,y:.021204943586542027},{x:.059403252082379655,y:.019510489895534},{x:.060588570829346225,y:.019047717572039012},{x:.06169776130235942,y:.01842415101594414},{x:.06468917630833097,y:.01744675856409077},{x:.06762071317273859,y:.01630222750050557},{x:.06887353875396018,y:.016079591433481148},{x:.07008306824328207,y:.01568439886046892},{x:.07320768385688461,y:.015309382847312772},{x:.07630617899620724,y:.014758758098063603},{x:.07757836602719018,y:.014784814066709744},{x:.07884175299285809,y:.014633182505734484},{x:.08197949198836539,y:.014874954586349768},{x:.08512587197205507,y:.014939396351756326},{x:.08636853101864941,y:.015213143039810315},{x:.08763722420808827,y:.015310899606724347},{x:.09066750503556728,y:.016160168615640357},{x:.09374085624536103,y:.01683720043479743},{x:.09490623261729739,y:.017348117910556266},{x:.09613147686272838,y:.017691505875315594},{x:.09893784752938008,y:.01911563488079519},{x:.10182006280184085,y:.020379238800576432},{x:.10286337173869634,y:.02110769279197256},{x:.1039980815908924,y:.02168351594766564},{x:.10647269484582828,y:.023627776470689026},{x:.1090530122644002,y:.025429392901094458},{x:.10993415998882576,y:.026347389329760156},{x:.11093472918451973,y:.02713351911543911},{x:.11298248702813177,y:.02952319431446044},{x:.11516174644147774,y:.03179358814642764},{x:.11584687094057705,y:.032865848924427614},{x:.11667484816670405,y:.03383207481329547},{x:.118217056413458,y:.03657533081056164},{x:.11991151010446596,y:.039227252082379635},{x:.12037428242796094,y:.040412570829346184},{x:.12099784898405583,y:.041521761302359406},{x:.2862381791186236,y:.4176126753554925},{x:.4644074439049092,y:.03214939722735514},{x:.46457066699968924,y:.031871550040082325},{x:.46468087848244366,y:.03156873942729889},{x:.4668033610072479,y:.028070937443703255},{x:.4688757411162635,y:.024543219843286366},{x:.46909003322228215,y:.024302554657928657},{x:.4692572024422568,y:.02402706365982141},{x:.47202128937582516,y:.021010546759784428},{x:.47474207284479647,y:.017954914566682648},{x:.47499919883659564,y:.017760680011347015},{x:.4752169015744166,y:.01752309559247584},{x:.47851637060601154,y:.015103786828781735},{x:.4817809992520572,y:.012637666274559728},{x:.4820710779219699,y:.012497326674279732},{x:.48233094798351184,y:.012306779070622963},{x:.4860390023686124,y:.010577651122297159},{x:.4897220183436901,y:.008795813836836655},{x:.4900339021311097,y:.008714762363747632},{x:.4903259528556443,y:.008578574212853553},{x:.49430009414373083,y:.007606076497244536},{x:.4982599612093785,y:.006576997488159493},{x:.4985816645952609,y:.006558348904918078},{x:.4988946726372282,y:.006481753841050326},{x:.5029821768073245,y:.006303258899985619},{x:.5070667194929276,y:.00606648509648134},{x:.5073858795965667,y:.006110956057683261},{x:.5077078162324508,y:.006096897586191266},{x:.5117516027915979,y:.006719264880154805},{x:.5158038544123874,y:.0072838953667157535},{x:.5161082060899873,y:.007389776878261636},{x:.5164266994754154,y:.007438795258320738},{x:.5202713679739276,y:.008838107561233023},{x:.5241356027726449,y:.01018244390490916},{x:.524413449959918,y:.010345666999689355},{x:.5247162605727012,y:.010455878482443691},{x:.5282140625562944,y:.012578361007246536},{x:.5317417801567137,y:.014650741116263542},{x:.5319824453420714,y:.01486503322228222},{x:.5322579363401786,y:.01503220244225683},{x:.535274453240215,y:.01779628937582467},{x:.5383300854333174,y:.020517072844796484},{x:.5385243199886531,y:.020774198836595797},{x:.5387619044075241,y:.0209919015744166},{x:.5411812131712181,y:.024291370606011366},{x:.5436473337254403,y:.027555999252057217},{x:.5437876733257202,y:.027846077921969747},{x:.5439782209293771,y:.028105947983511865},{x:.5457073488777034,y:.03181400236861376},{x:.5474891861631633,y:.0354970183436901},{x:.5475702376362523,y:.03580890213110964},{x:.5477064257871465,y:.03610095285564429},{x:.548678923502756,y:.040075094143733274},{x:.5497080025118405,y:.04403496120937851},{x:.5497266510950819,y:.04435666459526063},{x:.5498032461589497,y:.04466967263722821},{x:.6466002461589497,y:.7226436726372282},{x:.6469851024138088,y:.7314568162324507},{x:.6456432047416794,y:.7401756994754154},{x:.6426261215175564,y:.7484652605727011},{x:.6380497975577433,y:.7560069363401786},{x:.6320900984255835,y:.7625109044075241},{x:.6249760520164882,y:.7677272209293771},{x:.6169810471443558,y:.7714554257871464},{x:.6084123273627718,y:.7735522461589497},{x:.5995991837675493,y:.7739371024138088},{x:.5908803005245846,y:.7725952047416793},{x:.5825907394272989,y:.7695781215175563},{x:.5750490636598214,y:.7650017975577432},{x:.5685450955924759,y:.7590420984255835},{x:.563328779070623,y:.7519280520164882},{x:.5596005742128536,y:.7439330471443557},{x:.5575037538410503,y:.7353643273627718},{x:.4822251865940539,y:.2081071670095049},{x:.3260455560950909,y:.5459966027726448},{x:.3245096626856286,y:.5486110836728201},{x:.32313748405233433,y:.5513150815908924},{x:.32228015650766817,y:.5524062697730983},{x:.32157725888373645,y:.5536027801567136},{x:.3195608173147473,y:.5558673865996665},{x:.3176874808845609,y:.5582517291845196},{x:.31663374639442166,y:.5591546941850146},{x:.31571092715520355,y:.5601910854333173},{x:.3132914281453504,y:.5620187898634509},{x:.3109889251867045,y:.563991848166704},{x:.30977927817660644,y:.5646718895469083},{x:.3086720007479428,y:.5655083337254402},{x:.3059424242873038,y:.566828898486493},{x:.3032992386976406,y:.5683148489840557},{x:.30198016522380455,y:.5687458331350992},{x:.3007309816563099,y:.5693501861631632},{x:.29779622383750376,y:.570112862691949},{x:.29491393175671793,y:.571054601139531},{x:.29353612307299787,y:.5712199655821879},{x:.29219303879062153,y:.5715690025118404},{x:.28916588071079274,y:.5717444815770724},{x:.2861552470071419,y:.5721058174942654},{x:.2847716515285703,y:.5719992073657418},{x:.2833862805070725,y:.5720795149035186},{x:.28038305415357795,y:.5716610529431293},{x:.27735977579191173,y:.5714281003932755},{x:.27602356431680025,y:.5710536126610233},{x:.27464914558761266,y:.5708621046332842},{x:.27178526326499086,y:.5698657829057354},{x:.26886552313727163,y:.5690474941246844},{x:.26762804552325165,y:.5684195201422382},{x:.26631739722735515,y:.5679635560950907},{x:.26370291632718046,y:.5664276626856288},{x:.2609989184091076,y:.5650554840523343},{x:.25990773022690183,y:.5641981565076682},{x:.2587112198432863,y:.5634952588837364},{x:.25644661340033337,y:.5614788173147471},{x:.2540622708154803,y:.5596054808845607},{x:.2531593058149851,y:.5585517463944213},{x:.2521229145666826,y:.5576289271552034},{x:.2502952101365493,y:.5552094281453507},{x:.24832215183329598,y:.5529069251867045},{x:.2476421104530918,y:.5516972781766065},{x:.24680566627455972,y:.5505900007479427},{x:.245485101513507,y:.5478604242873037},{x:.24399915101594416,y:.5452172386976405},{x:.10495542809967917,y:.22875042455884986},{x:.04468360364824366,y:.734330871972055},{x:.04278579956520255,y:.742945856245361},{x:.03924376119942353,y:.7510250628018409},{x:.034193607098905524,y:.7582580122644001},{x:.02782941185357234,y:.7643667464414777},{x:.020395747917620333,y:.7691165101044659},{x:.012178286827261426,y:.7723247724994944},{x:.003492821003792758,y:.7738682419019364},{x:-.00532687197205508,y:.7736876036482436},{x:-.013941856245361059,y:.7717897995652026},{x:-.022021062801840872,y:.7682477611994235},{x:-.029254012264400202,y:.7631976070989055},{x:-.035362746441477744,y:.7568334118535723},{x:-.04011251010446598,y:.7493997479176203},{x:-.04332077249949441,y:.7411822868272614},{x:-.04486424190193638,y:.7324968210037928}]],X:[[{x:-.03582341524240513,y:.7325834270170574},{x:-.035659804156077404,y:.7237634017461555},{x:-.03377863524060577,y:.7151447697271875},{x:-.030252200762440104,y:.7070587401552579},{x:-.02521601962092907,y:.6998160546121182},{x:.24190189785100796,y:.3863717955888736},{x:-.0190039697420246,y:.08021800391719859},{x:-.024040163260448045,y:.07297532698032597},{x:-.027566611556706647,y:.06488930343468059},{x:-.029447795200430175,y:.056270674630427356},{x:-.029611421359170286,y:.047450649639130975},{x:-.028051201971409197,y:.03876817707487998},{x:-.024827095393237467,y:.030556919489131844},{x:-.02006300223235442,y:.02313243090598055},{x:-.013942003917198569,y:.016780030257975413},{x:-.006699326980325947,y:.011743836739551976},{x:.0013866965653194212,y:.00821738844329338},{x:.010005325369572668,y:.006336204799569846},{x:.018825350360869044,y:.0061725786408297345},{x:.02750782292512003,y:.007732798028590823},{x:.03571908051086817,y:.010956904606762553},{x:.04314356909401947,y:.0157209977676456},{x:.049495969742024595,y:.021841996082801452},{x:.3010259353438819,y:.31699385831754345},{x:.5525549803790709,y:.021842054612118165},{x:.558907370566982,y:.01572104544144637},{x:.5663318510088331,y:.010956939592969957},{x:.5745431030849405,y:.007732818982704524},{x:.5832255729829426,y:.006172584757594898},{x:.5920455982538445,y:.006336195843922615},{x:.6006642302728125,y:.008217364759394247},{x:.6087502598447422,y:.011743799237559922},{x:.6159929453878819,y:.016779980379070948},{x:.6221139545585537,y:.023132370566981995},{x:.6268780604070301,y:.03055685100883309},{x:.6301021810172955,y:.0387681030849405},{x:.6316624152424052,y:.04745057298294264},{x:.6314988041560774,y:.05627059825384449},{x:.6296176352406058,y:.06488923027281246},{x:.6260912007624402,y:.07297525984474214},{x:.6210550196209291,y:.08021794538788188},{x:.36015009139561527,y:.3863716945525663},{x:.6272689697420246,y:.6998159960828014},{x:.632305163260448,y:.7070586730196741},{x:.6358316115567066,y:.7151446965653194},{x:.6377127952004301,y:.7237633253695727},{x:.6378764213591702,y:.7325833503608691},{x:.6363162019714091,y:.74126582292512},{x:.6330920953932374,y:.7494770805108681},{x:.6283280022323544,y:.7569015690940195},{x:.6222070039171985,y:.7632539697420246},{x:.6149643269803259,y:.7682901632604481},{x:.6068783034346805,y:.7718166115567067},{x:.5982596746304273,y:.7736977952004301},{x:.5894396496391309,y:.7738614213591702},{x:.58075717707488,y:.7723012019714092},{x:.5725459194891318,y:.7690770953932374},{x:.5651214309059804,y:.7643130022323544},{x:.5587690302579753,y:.7581920039171985},{x:.30102605390274134,y:.4557496318238965},{x:.04328401962092907,y:.7581919453878818},{x:.03693162943301802,y:.7643129545585536},{x:.029507148991166913,y:.76907706040703},{x:.021295896915059523,y:.7723011810172955},{x:.012613427017057378,y:.7738614152424051},{x:.003793401746155514,y:.7736978041560774},{x:-.004825230272812429,y:.7718166352406057},{x:-.012911259844742107,y:.7682902007624401},{x:-.02015394538788185,y:.7632540196209291},{x:-.02627495455855365,y:.756901629433018},{x:-.031039060407030063,y:.7494771489911669},{x:-.034263181017295495,y:.7412658969150595},{x:-.03582341524240513,y:.7325834270170574}]],Y:[[{x:-.02688005049839745,y:.731186349993587},{x:-.02644216088936969,y:.7223756821949907},{x:-.024293809188388457,y:.7138197369324374},{x:-.020517555346512936,y:.7058473143841377},{x:-.015258518681138845,y:.6987647902776368},{x:.25043465103960333,y:.4059541390643743},{x:.26029423204414154,y:.04978477430584237},{x:.26140149479875585,y:.04103299828270508},{x:.26419486861258723,y:.03266540142918031},{x:.26856700569651215,y:.025003545799746604},{x:.27434988727431814,y:.01834187220942495},{x:.28132128045004745,y:.012936385038381841},{x:.28921327849355916,y:.008994814127168342},{x:.2977225963459245,y:.006668631835443931},{x:.30652222569415766,y:.00604723204414153},{x:.3152740017172949,y:.007154494798755871},{x:.32364159857081976,y:.009947868612587236},{x:.3313034542002534,y:.014320005696512164},{x:.3379651277905751,y:.020102887274318144},{x:.3433706149616182,y:.027074280450047443},{x:.3473121858728317,y:.03496627849355913},{x:.3496383681645561,y:.04347559634592452},{x:.3502597679558585,y:.05227522569415767},{x:.34045421751128274,y:.4064927803087797},{x:.6166036868780955,y:.6970396048261934},{x:.6220250193382449,y:.7039986829780357},{x:.6259845336177533,y:.7118816938899454},{x:.6283300678033804,y:.7203856978734211},{x:.6289714843317633,y:.7291838908244783},{x:.6278841339254269,y:.7379381631220915},{x:.6251098028506934,y:.7463120929913156},{x:.620755107094902,y:.7539838750034306},{x:.6149873951738065,y:.7606586868780956},{x:.6080283170219642,y:.7660800193382449},{x:.6001453061100546,y:.7700395336177532},{x:.5916413021265788,y:.7723850678033803},{x:.5828431091755216,y:.7730264843317632},{x:.5740888368779085,y:.7719391339254268},{x:.5657149070086843,y:.7691648028506933},{x:.5580431249965694,y:.7648101070949019},{x:.5513683131219045,y:.7590423951738065},{x:.29567976193894085,y:.4900232412279098},{x:.051392518681138845,y:.7592432097223631},{x:.04485280102201476,y:.765163657957578},{x:.03728372005126494,y:.7696945108160528},{x:.028976151305805796,y:.7726616501633681},{x:.02024934999358704,y:.7739510504983974},{x:.011438682194990706,y:.7735131608893697},{x:.002882736932437466,y:.7713648091883885},{x:-.0050896856158622154,y:.7675885553465129},{x:-.012172209722363214,y:.7623295186811389},{x:-.01809265795757798,y:.7557898010220148},{x:-.022623510816052815,y:.7482207200512649},{x:-.025590650163368103,y:.7399131513058058},{x:-.02688005049839745,y:.731186349993587}]],Z:[[{x:.008711000000000003,y:.05103000000000002},{x:.00905278632815029,y:.04755978517413498},{x:.009251179439517476,y:.04407842782316871},{x:.009484424544736794,y:.043177288815328604},{x:.009575662381854637,y:.04225093550927423},{x:.01058788670939069,y:.038914079093048184},{x:.01146164687940622,y:.0355383196233794},{x:.011866213744552238,y:.0346999996115786},{x:.012136421036992098,y:.03380924554357098},{x:.013780184150668652,y:.030733981057728944},{x:.015295733266009179,y:.0275935480126292},{x:.015856074613338045,y:.026850263164785913},{x:.01629486744638546,y:.026029339514117927},{x:.01850700045157689,y:.023333847648222647},{x:.020606096809669634,y:.02054942610843994},{x:.02130067903544657,y:.01992974044441782},{x:.021891194846605365,y:.019210194846605383},{x:.024586686712500538,y:.016998061841414044},{x:.027188663217490867,y:.014676655565200585},{x:.02799079391630549,y:.014204383257544266},{x:.028710339514117916,y:.013613867446385479},{x:.03178560399995988,y:.01197010433270896},{x:.03479046815396611,y:.010200923661400137},{x:.035669321892902964,y:.00989421387003954},{x:.036490245543570964,y:.009455421036992116},{x:.03982710195979704,y:.008443196709456058},{x:.04311937851852794,y:.007294230264082269},{x:.04404118144126662,y:.007164869674294513},{x:.04493193550927423,y:.006894662381854655},{x:.048402150335139275,y:.006552876053704368},{x:.05185531895677298,y:.006068277970413476},{x:.052784646693945655,y:.006121237837117864},{x:.053711,y:.0060300000000000215},{x:.548341,y:.0060300000000000215},{x:.5571200644907257,y:.006894662381854655},{x:.565561754456429,y:.009455421036992116},{x:.5733416604858821,y:.013613867446385479},{x:.5801608051533946,y:.019210194846605383},{x:.5857571325536145,y:.026029339514117927},{x:.5899155789630078,y:.03380924554357098},{x:.5924763376181453,y:.04225093550927425},{x:.593341,y:.05103000000000002},{x:.5924763376181453,y:.05980906449072579},{x:.5899155789630078,y:.06825075445642906},{x:.5857571325536145,y:.07603066048588211},{x:.5801608051533946,y:.08284980515339466},{x:.5733416604858821,y:.08844613255361455},{x:.565561754456429,y:.09260457896300792},{x:.5571200644907257,y:.09516533761814538},{x:.548341,y:.09603000000000002},{x:.14224494935878249,y:.09603000000000002},{x:.5846943444347994,y:.7024816632174908},{x:.5851666167424556,y:.7032837939163054},{x:.5857571325536145,y:.7040033395141179},{x:.5874008956672913,y:.7070786039999603},{x:.5891700763385999,y:.7100834681539662},{x:.5894767861299605,y:.7109623218929031},{x:.5899155789630078,y:.711783245543571},{x:.5909278032905438,y:.7151201019597967},{x:.5920767697359177,y:.7184123785185279},{x:.5922061303257055,y:.7193341814412667},{x:.5924763376181453,y:.7202249355092742},{x:.5928181239462956,y:.7236951503351391},{x:.5933027220295866,y:.7271483189567729},{x:.5932497621628822,y:.7280776466939456},{x:.593341,y:.729004},{x:.5929992136718496,y:.7324742148258655},{x:.5928008205604824,y:.7359555721768313},{x:.5925675754552632,y:.7368567111846711},{x:.5924763376181453,y:.7377830644907257},{x:.5914641132906093,y:.7411199209069517},{x:.5905903531205937,y:.7444956803766206},{x:.5901857862554476,y:.7453340003884216},{x:.5899155789630078,y:.746224754456429},{x:.5882718158493319,y:.74930001894227},{x:.5867562667339908,y:.7524404519873709},{x:.5861959253866618,y:.7531837368352144},{x:.5857571325536145,y:.7540046604858821},{x:.5835449995484229,y:.7567001523517777},{x:.5814459031903303,y:.7594845738915601},{x:.5807513209645536,y:.760104259555582},{x:.5801608051533946,y:.7608238051533946},{x:.5774653132874991,y:.7630359381585863},{x:.5748633367825091,y:.7653573444347994},{x:.5740612060836946,y:.7658296167424556},{x:.5733416604858821,y:.7664201325536145},{x:.5702663960000408,y:.7680638956672906},{x:.5672615318460339,y:.7698330763385999},{x:.5663826781070966,y:.7701397861299606},{x:.565561754456429,y:.7705785789630079},{x:.5622248980402041,y:.7715908032905435},{x:.558932621481472,y:.7727397697359177},{x:.5580108185587332,y:.7728691303257055},{x:.5571200644907257,y:.7731393376181454},{x:.553649849664861,y:.7734811239462956},{x:.5501966810432269,y:.7739657220295866},{x:.5492673533060543,y:.7739127621628822},{x:.548341,y:.774004},{x:.053711,y:.774004},{x:.04493193550927421,y:.7731393376181454},{x:.036490245543570936,y:.7705785789630079},{x:.028710339514117906,y:.7664201325536145},{x:.021891194846605358,y:.7608238051533946},{x:.01629486744638546,y:.7540046604858821},{x:.012136421036992098,y:.746224754456429},{x:.009575662381854637,y:.7377830644907257},{x:.008711000000000003,y:.729004},{x:.009575662381854637,y:.7202249355092742},{x:.012136421036992098,y:.711783245543571},{x:.01629486744638546,y:.7040033395141179},{x:.021891194846605365,y:.6971841948466053},{x:.028710339514117916,y:.6915878674463855},{x:.036490245543570964,y:.6874294210369921},{x:.04493193550927423,y:.6848686623818546},{x:.053711,y:.684004},{x:.4598070506412174,y:.684004},{x:.017357655565200567,y:.07755233678250915},{x:.016885383257544267,y:.07675020608369457},{x:.01629486744638546,y:.07603066048588211},{x:.014651104332708876,y:.07295539600004002},{x:.012881923661400112,y:.06995053184603389},{x:.012575213870039523,y:.06907167810709706},{x:.012136421036992098,y:.06825075445642906},{x:.011124196709456038,y:.06491389804020298},{x:.00997523026408225,y:.06162162148147208},{x:.009845869674294495,y:.0606998185587334},{x:.009575662381854637,y:.05980906449072579},{x:.009233876053704348,y:.056338849664860746},{x:.008749277970413458,y:.05288568104322705},{x:.008802237837117845,y:.05195635330605437},{x:.008711000000000003,y:.05103000000000002}]],\"[\":[[{x:.152511,y:-.06942399999999993},{x:.15337566238185463,y:-.0782030644907257},{x:.1559364210369921,y:-.08664475445642897},{x:.16009486744638546,y:-.09442466048588202},{x:.16569119484660536,y:-.10124380515339457},{x:.1725103395141179,y:-.10684013255361446},{x:.18029024554357093,y:-.11099857896300783},{x:.1887319355092742,y:-.1135593376181453},{x:.197511,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.4486773376181454,y:-.06064493550927416},{x:.44611657896300794,y:-.05220324554357089},{x:.44195813255361455,y:-.04442333951411784},{x:.4363618051533946,y:-.03760419484660529},{x:.42954266048588213,y:-.032007867446385396},{x:.4217627544564291,y:-.027849421036992027},{x:.4133210644907258,y:-.025288662381854565},{x:.404542,y:-.024423999999999932},{x:.24251099999999998,y:-.024423999999999932},{x:.24251099999999998,y:.7147659999999999},{x:.404542,y:.7147659999999999},{x:.4133210644907258,y:.7156306623818546},{x:.4217627544564291,y:.7181914210369921},{x:.42954266048588213,y:.7223498674463854},{x:.4363618051533946,y:.7279461948466053},{x:.44195813255361455,y:.7347653395141178},{x:.44611657896300794,y:.7425452455435709},{x:.4486773376181454,y:.7509869355092742},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.197511,y:.804766},{x:.1887319355092742,y:.8039013376181453},{x:.18029024554357093,y:.8013405789630078},{x:.1725103395141179,y:.7971821325536145},{x:.16569119484660536,y:.7915858051533946},{x:.16009486744638546,y:.7847666604858821},{x:.1559364210369921,y:.776986754456429},{x:.15337566238185463,y:.7685450644907257},{x:.152511,y:.7597659999999999},{x:.152511,y:-.06942399999999993}]],\"\\\\\":[[{x:.017522651058219416,y:.7303997530123288},{x:.018114599516431164,y:.7215980934307649},{x:.020412292453046287,y:.7130810386853763},{x:.024327430817071727,y:.7051758944136092},{x:.5013774308170718,y:-.059077105586390885},{x:.5067595580368128,y:-.06606654912342862},{x:.5134018419815468,y:-.0718716915303336},{x:.521049023404313,y:-.07626944443996993},{x:.5294072254116235,y:-.07909080467430848},{x:.5381552469876711,y:-.08022734894178067},{x:.5469569065692351,y:-.07963540048356893},{x:.5554739613146237,y:-.0773377075469538},{x:.5633791055863908,y:-.07342256918292836},{x:.5703685491234285,y:-.06804044196318723},{x:.5761736915303335,y:-.06139815801845332},{x:.5805714444399699,y:-.05375097659568702},{x:.5833928046743084,y:-.04539277458837649},{x:.5845293489417805,y:-.03664475301232898},{x:.5839374004835688,y:-.02784309343076498},{x:.5816397075469537,y:-.01932603868537643},{x:.5777245691829282,y:-.011420894413609283},{x:.10067456918292828,y:.7528321055863908},{x:.09529244196318712,y:.7598215491234285},{x:.0886501580184532,y:.7656266915303336},{x:.08100297659568693,y:.7700244444399699},{x:.07264477458837638,y:.7728458046743084},{x:.06389675301232887,y:.7739823489417805},{x:.055095093430764894,y:.7733904004835688},{x:.04657803868537634,y:.7710927075469537},{x:.03867289441360919,y:.7671775691829282},{x:.03168345087657147,y:.7617954419631872},{x:.025878308469666468,y:.7551531580184532},{x:.021480555560030153,y:.747505976595687},{x:.01865919532569161,y:.7391477745883763},{x:.017522651058219416,y:.7303997530123288}]],\"]\":[[{x:.15250999999999998,y:-.06942399999999993},{x:.15337466238185463,y:-.0782030644907257},{x:.1559354210369921,y:-.08664475445642897},{x:.16009386744638546,y:-.09442466048588202},{x:.16569019484660535,y:-.10124380515339457},{x:.1725093395141179,y:-.10684013255361446},{x:.18028924554357095,y:-.11099857896300783},{x:.18873093550927422,y:-.1135593376181453},{x:.19751,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.19751,y:.804766},{x:.18873093550927422,y:.8039013376181453},{x:.18028924554357095,y:.8013405789630078},{x:.1725093395141179,y:.7971821325536145},{x:.16569019484660535,y:.7915858051533946},{x:.16009386744638546,y:.7847666604858821},{x:.1559354210369921,y:.776986754456429},{x:.15337466238185463,y:.7685450644907257},{x:.15250999999999998,y:.7597659999999999},{x:.15337466238185463,y:.7509869355092742},{x:.1559354210369921,y:.7425452455435709},{x:.16009386744638546,y:.7347653395141178},{x:.16569019484660535,y:.7279461948466053},{x:.1725093395141179,y:.7223498674463854},{x:.18028924554357095,y:.7181914210369921},{x:.18873093550927422,y:.7156306623818546},{x:.19751,y:.7147659999999999},{x:.35954200000000003,y:.7147659999999999},{x:.35954200000000003,y:-.024423999999999932},{x:.19751,y:-.024423999999999932},{x:.18873093550927422,y:-.025288662381854565},{x:.18028924554357095,y:-.027849421036992027},{x:.1725093395141179,y:-.03200786744638539},{x:.16569019484660535,y:-.03760419484660529},{x:.16009386744638546,y:-.04442333951411784},{x:.1559354210369921,y:-.052203245543570885},{x:.15337466238185463,y:-.06064493550927414},{x:.15250999999999998,y:-.06942399999999993}]],\"^\":[[{x:-.009830024293871129,y:.4771904357900641},{x:-.009184411720694952,y:.46839254975009553},{x:-.006834821991481832,y:.4598896653882279},{x:-.002871548521860348,y:.4520085437820153},{x:.002553102311361327,y:.44505205201500053},{x:.009230664218841726,y:.43928752416454453},{x:.016904522241296224,y:.4349364878031557},{x:.02527977431847106,y:.43216615081811305},{x:.034034564209935884,y:.43108297570612886},{x:.04283245024990444,y:.431728588279305},{x:.05133533461177206,y:.4340781780085181},{x:.05921645621798466,y:.4380414514781396},{x:.06617294798499941,y:.4434661023113613},{x:.30102423332324457,y:.6668931783680099},{x:.5358792969655858,y:.44346586927801307},{x:.5428358294884947,y:.4380412707099504},{x:.5507169808710617,y:.43407805645230807},{x:.5592198828854552,y:.4317285306064111},{x:.5680177737757447,y:.431082984132888},{x:.5767725555289304,y:.4321662250206897},{x:.5851477867919753,y:.43493662492998636},{x:.5928216121243246,y:.439287718945922},{x:.5994991307219868,y:.44505229696558585},{x:.6049237292900496,y:.45200882948849475},{x:.6088869435476919,y:.4598899808710617},{x:.6112364693935889,y:.4683928828854553},{x:.6118820158671119,y:.47719077377574476},{x:.6107987749793102,y:.4859455555289303},{x:.6080283750700135,y:.4943207867919753},{x:.6036772810540779,y:.5019946121243246},{x:.5979127030344141,y:.5086721307219868},{x:.33204070303441413,y:.7616071307219868},{x:.3294429315385385,y:.7636328335402047},{x:.3269493357811583,y:.7657854758354554},{x:.3259710287822201,y:.7663401706594313},{x:.32508417051150523,y:.7670317292900496},{x:.3221411194513825,y:.7685117087189752},{x:.3192754777587038,y:.7701365121968442},{x:.31820775306259985,y:.7704896904878621},{x:.3172030191289383,y:.7709949435476919},{x:.31402778830632944,y:.7718723248078522},{x:.310900225681529,y:.7729068491818869},{x:.30978411534954325,y:.7730449384962876},{x:.3087001171145447,y:.7733444693935889},{x:.30541472886927135,y:.7735855352151975},{x:.30214543579006414,y:.7739900242938711},{x:.3010238313163334,y:.7739077179367437},{x:.2999022262242552,y:.773990015867112},{x:.29663293618411596,y:.7735855022258356},{x:.2933475497500956,y:.7733444117206949},{x:.29226355376554153,y:.7730448726791859},{x:.29114744447106966,y:.7729067749793103},{x:.2880198896188706,y:.7718722271075298},{x:.28484466538822795,y:.7709948219914818},{x:.28383993525062523,y:.7704895613829726},{x:.2827722132080247,y:.7701363750700135},{x:.27990658372278143,y:.7685115500622604},{x:.2769635437820154,y:.7670315485218604},{x:.2760766907070934,y:.7663399832281829},{x:.2750983878756754,y:.765785281054078},{x:.27260480829144085,y:.7636326200241867},{x:.2700070520150006,y:.7616068976886387},{x:.004139052015000585,y:.5086718976886386},{x:-.001625475835455463,y:.5019943357811583},{x:-.0059765121968442594,y:.49432047775870375},{x:-.00874684918188691,y:.4859452256815289},{x:-.009830024293871129,y:.4771904357900641}]],_:[[{x:-.045,y:-.160601},{x:-.044135337618145365,y:-.16938006449072576},{x:-.041574578963007904,y:-.17782175445642903},{x:-.03741613255361454,y:-.1856016604858821},{x:-.03181980515339464,y:-.19242080515339463},{x:-.025000660485882086,y:-.19801713255361453},{x:-.017220754456429038,y:-.2021755789630079},{x:-.008779064490725769,y:-.20473633761814536},{x:0,y:-.20560099999999998},{x:.602052,y:-.20560099999999998},{x:.6108310644907258,y:-.20473633761814536},{x:.619272754456429,y:-.2021755789630079},{x:.6270526604858822,y:-.19801713255361453},{x:.6338718051533947,y:-.19242080515339463},{x:.6394681325536146,y:-.1856016604858821},{x:.6436265789630079,y:-.17782175445642903},{x:.6461873376181454,y:-.16938006449072576},{x:.6470520000000001,y:-.160601},{x:.6461873376181454,y:-.15182193550927423},{x:.6436265789630079,y:-.14338024554357096},{x:.6394681325536146,y:-.1356003395141179},{x:.6338718051533947,y:-.12878119484660536},{x:.6270526604858822,y:-.12318486744638546},{x:.619272754456429,y:-.1190264210369921},{x:.6108310644907258,y:-.11646566238185463},{x:.602052,y:-.115601},{x:0,y:-.115601},{x:-.00877906449072579,y:-.11646566238185463},{x:-.017220754456429066,y:-.1190264210369921},{x:-.025000660485882096,y:-.12318486744638546},{x:-.03181980515339464,y:-.12878119484660536},{x:-.03741613255361454,y:-.1356003395141179},{x:-.041574578963007904,y:-.14338024554357096},{x:-.044135337618145365,y:-.15182193550927423},{x:-.045,y:-.160601}]],a:[[{x:.029951000000000005,y:.25490100000000004},{x:.030216131121475042,y:.2522090785486062},{x:.03027571711850824,y:.2495047884160563},{x:.03064747136410999,y:.24782960757010103},{x:.03081566238185464,y:.24612193550927428},{x:.0316008669059687,y:.24353346308961055},{x:.0321868888075612,y:.2408927597850148},{x:.06949088880756119,y:.12701175978501478},{x:.07014919013856018,y:.12551652306247207},{x:.07061771774296957,y:.1239514111231075},{x:.07192248021942128,y:.12148874987750752},{x:.07304546130734973,y:.1189380599695235},{x:.0739828197765546,y:.11759998201998349},{x:.07474768294666384,y:.11615634846888903},{x:.07650781615341086,y:.11399555310027064},{x:.07810683439013419,y:.11171295672570881},{x:.07928722783725009,y:.11058345913436952},{x:.08031903331037206,y:.10931678199931477},{x:.15605303331037207,y:.033026781999314685},{x:.1581401110567553,y:.03130114899494214},{x:.16009013354595797,y:.02942202284781055},{x:.16153164054777758,y:.028496972085311937},{x:.16285166496406625,y:.027405552418137233},{x:.16523529439528092,y:.026120245637685162},{x:.16751444707429886,y:.024657656887915},{x:.24324744707429888,y:-.014037343112084925},{x:.24491821916217926,y:-.014693433733650136},{x:.24650124554357095,y:-.015539578963007873},{x:.24901423193062222,y:-.016301885049470277},{x:.2514585861893129,y:-.017261751399011975},{x:.25322525179064753,y:-.017579283958613606},{x:.2549429355092742,y:-.018100337618145335},{x:.2575563541074305,y:-.01835773688343746},{x:.2601410014196699,y:-.018822289810772906},{x:.26193566856615697,y:-.018789061710219754},{x:.263722,y:-.018964999999999968},{x:.376759,y:-.018964999999999968},{x:.3786816094876915,y:-.018775639493449434},{x:.3806133727303473,y:-.01879962736385296},{x:.3830607170270406,y:-.018344335046447002},{x:.3855380644907258,y:-.018100337618145335},{x:.3873867891740171,y:-.01753953311656589},{x:.3892861139289994,y:-.017186191753697247},{x:.3915976100664607,y:-.016262194563578608},{x:.3939797544564291,y:-.015539578963007873},{x:.3956835488825182,y:-.014628881868892333},{x:.3974774451646465,y:-.013911789983170525},{x:.4720844451646465,y:.0247832100168294},{x:.4742399118062311,y:.026185049737888398},{x:.4765030886255536,y:.02740538646642049},{x:.47792879308654873,y:.028584168427667152},{x:.47947957817165415,y:.02959274452399146},{x:.48132014276352414,y:.0313881589690925},{x:.48210100000000006,y:.032033776942416534},{x:.48210100000000006,y:.02603500000000003},{x:.4829656623818547,y:.01725593550927424},{x:.4855264210369921,y:.008814245543570985},{x:.4896848674463855,y:.0010343395141179344},{x:.4952811948466054,y:-.0057848051533946065},{x:.5021003395141179,y:-.01138113255361451},{x:.509880245543571,y:-.015539578963007873},{x:.5183219355092743,y:-.018100337618145335},{x:.527101,y:-.018964999999999968},{x:.5358800644907258,y:-.018100337618145335},{x:.544321754456429,y:-.015539578963007873},{x:.5521016604858822,y:-.011381132553614504},{x:.5589208051533947,y:-.0057848051533946065},{x:.5645171325536146,y:.0010343395141179344},{x:.5686755789630079,y:.008814245543570992},{x:.5712363376181454,y:.01725593550927426},{x:.5721010000000001,y:.02603500000000003},{x:.5721010000000001,y:.560059},{x:.5712363376181454,y:.5688380644907257},{x:.5686755789630079,y:.577279754456429},{x:.5645171325536146,y:.5850596604858821},{x:.5589208051533947,y:.5918788051533946},{x:.5521016604858822,y:.5974751325536145},{x:.544321754456429,y:.6016335789630078},{x:.5358800644907258,y:.6041943376181453},{x:.527101,y:.605059},{x:.5183219355092743,y:.6041943376181453},{x:.509880245543571,y:.6016335789630078},{x:.5021003395141179,y:.5974751325536145},{x:.4952811948466054,y:.5918788051533946},{x:.4896848674463855,y:.5850596604858821},{x:.4855264210369921,y:.577279754456429},{x:.4829656623818547,y:.5688380644907257},{x:.48210100000000006,y:.560059},{x:.48210100000000006,y:.5551612473179106},{x:.48111784979070266,y:.5559741116228759},{x:.47906658786156825,y:.5579287481398052},{x:.4777260461549398,y:.558778440075324},{x:.476502844006682,y:.5597897782764175},{x:.474008872962507,y:.5611345413953497},{x:.47161569478864906,y:.5626514387693977},{x:.3970086947886491,y:.6002454387693977},{x:.39545173243232984,y:.6008467903430146},{x:.3939797544564291,y:.6016335789630078},{x:.39134652561635536,y:.6024323601988234},{x:.3887796173011618,y:.6034237870938969},{x:.38713525366780027,y:.6037098355781862},{x:.3855380644907258,y:.6041943376181453},{x:.3827995979159321,y:.6044640530341434},{x:.3800885942320307,y:.6049356509696303},{x:.37842002129388747,y:.6048954036817589},{x:.376759,y:.605059},{x:.263722,y:.605059},{x:.26219504701733515,y:.604908608257877},{x:.26066140118579323,y:.6049547986330399},{x:.25781511370268967,y:.6044772224791067},{x:.2549429355092742,y:.6041943376181453},{x:.2534746624734083,y:.6037489418620853},{x:.2519614739213154,y:.6034950452430072},{x:.24926304753974865,y:.6024713624393285},{x:.24650124554357095,y:.6016335789630078},{x:.24514807736385555,y:.6009102955021357},{x:.24371349707866236,y:.6003660689935006},{x:.16798049707866233,y:.5627720689935006},{x:.1654642487594581,y:.5611982224645521},{x:.16285190958182658,y:.5597896123262998},{x:.16173267757498783,y:.5588642237445607},{x:.16050143578237863,y:.5580941146870384},{x:.15834057869520102,y:.5560596134829665},{x:.15605324108782545,y:.5541684273021619},{x:.08031924108782545,y:.47787942730216193},{x:.07924694249287094,y:.47656305714472025},{x:.07802357952480113,y:.4753857561141845},{x:.07646760484406812,y:.47315109973327435},{x:.07474784589903924,y:.4710398973462887},{x:.07395296229881854,y:.46953962579412084},{x:.07298278594430238,y:.4681462799973844},{x:.07189266871370663,y:.46565100631071576},{x:.07061782960809859,y:.46324486175923196},{x:.0701309079335922,y:.4616183434067253},{x:.06945120152585271,y:.46006249834135976},{x:.032147201525852716,y:.3450764983413597},{x:.031582343425880205,y:.34249647318004567},{x:.03081566238185464,y:.3399690644907258},{x:.030641204072877935,y:.33819775955415116},{x:.03026054307811779,y:.33645906634171463},{x:.03020987650767869,y:.3338184172918108},{x:.029951000000000005,y:.33119},{x:.029951000000000005,y:.25490100000000004}],[{x:.119951,y:.2620835578942187},{x:.119951,y:.3240730820964405},{x:.15174843963453788,y:.42208563822492473},{x:.21467365091165175,y:.4854719831046318},{x:.2742766075147511,y:.5150589999999999},{x:.3660620360389177,y:.5150589999999999},{x:.4245839309326211,y:.4855701837142105},{x:.48210100000000006,y:.4276323784447675},{x:.48210100000000006,y:.15956344905445352},{x:.4243936225653894,y:.10143318135145685},{x:.36578354074375496,y:.07103500000000003},{x:.2745522516182332,y:.07103500000000003},{x:.21486246778999646,y:.10153288315838035},{x:.15170083487400915,y:.1651582162341545},{x:.119951,y:.2620835578942187}]],b:[[{x:.03166000000000001,y:.04001500000000002},{x:.03252466238185464,y:.031235935509274233},{x:.0350854210369921,y:.022794245543570978},{x:.039243867446385465,y:.015014339514117927},{x:.04484019484660537,y:.008195194846605386},{x:.05165933951411792,y:.002598867446385482},{x:.05943924554357097,y:-.0015595789630078807},{x:.06788093550927424,y:-.004120337618145342},{x:.07666,y:-.0049849999999999756},{x:.08543906449072577,y:-.004120337618145342},{x:.09388075445642904,y:-.0015595789630078807},{x:.10166066048588211,y:.002598867446385489},{x:.10847980515339464,y:.008195194846605386},{x:.11407613255361454,y:.015014339514117927},{x:.1182345789630079,y:.022794245543570985},{x:.12079533761814537,y:.031235935509274254},{x:.12166,y:.04001500000000002},{x:.12166,y:.041388769861289504},{x:.12338630711141785,y:.04010106584896898},{x:.12512540667363178,y:.03853443023544684},{x:.12691331624345048,y:.03747016444054036},{x:.12858112311649333,y:.036226097502515},{x:.13069431360107225,y:.035219499067818724},{x:.13270563229917137,y:.034022247411931134},{x:.20674863229917137,y:-.0007227525880688923},{x:.20772794171481185,y:-.0010698043626217635},{x:.20864424554357097,y:-.0015595789630078669},{x:.21187816153300185,y:-.0025405766534664824},{x:.21506348921487128,y:-.003669406425619949},{x:.21609168791714548,y:-.0038187359083884913},{x:.21708593550927424,y:-.004120337618145342},{x:.22044909586509742,y:-.004451580001305548},{x:.22379344213248661,y:-.004937293022731791},{x:.22483101702188665,y:-.00488316156543817},{x:.225865,y:-.0049849999999999756},{x:.338045,y:-.0049849999999999756},{x:.33894984805462636,y:-.004895880245274822},{x:.33985755144997865,y:-.004948481373678995},{x:.343332465401001,y:-.004464230112452937},{x:.3468240644907258,y:-.004120337618145342},{x:.3476941397420575,y:-.003856403176165039},{x:.34859466384226984,y:-.0037309094409420443},{x:.351908335561611,y:-.0025780408502315546},{x:.35526575445642905,y:-.0015595789630078807},{x:.35606762040050133,y:-.0011309726863615623},{x:.35692635856942223,y:-.0008322067413783357},{x:.43209235856942224,y:.03391279325862169},{x:.4342218624454842,y:.03516383683568551},{x:.43645162164562873,y:.03622594356254809},{x:.4380158580934015,y:.037392738102356306},{x:.4396984532755396,y:.03838123120587913},{x:.4415429728374372,y:.04002368192832182},{x:.4435226810964235,y:.04150038501262054},{x:.5186856810964235,y:.11000138501262047},{x:.5200684051728882,y:.11153543836568303},{x:.5216038163727121,y:.1129166544997947},{x:.5230144082918019,y:.11480386048953693},{x:.5245918796416693,y:.11655397481445093},{x:.5256487561000858,y:.11832830784782436},{x:.5268852029038621,y:.11998252816661786},{x:.5279005150705119,y:.12210866485417524},{x:.5291062453835067,y:.12413290061668979},{x:.5297966590542814,y:.12607932670695898},{x:.530686625504748,y:.12794298045128052},{x:.567704625504748,y:.2301969804512806},{x:.5685418230641662,y:.23348712941632632},{x:.5695273376181453,y:.23673593550927427},{x:.5696276430094915,y:.2377543532384077},{x:.5698799976366801,y:.23874609563675617},{x:.5700592324586751,y:.24213635445346285},{x:.570392,y:.24551500000000004},{x:.570392,y:.314017},{x:.570065993218988,y:.3173270023951309},{x:.5699006262411136,y:.32064890697528625},{x:.569634437926433,y:.3217086568121163},{x:.5695273376181453,y:.3227960644907258},{x:.5685618455328773,y:.32597886535008125},{x:.5677515846008636,y:.32920467896823863},{x:.5307335846008636,y:.4324506789682387},{x:.5298196963817511,y:.43437967657309706},{x:.5291061063615623,y:.4363913954201699},{x:.5279358002551,y:.43835612690926706},{x:.5269566878799311,y:.4404227969757902},{x:.5256840310027916,y:.4421364386856148},{x:.5245916855370664,y:.44397028841230757},{x:.523060566435399,y:.4456689527415915},{x:.5216970801011935,y:.44750489697372575},{x:.5201145620561008,y:.4489373284986299},{x:.5186854393684929,y:.45052283528838016},{x:.44352243936849295,y:.5190228352883801},{x:.44134657552661755,y:.5206458300432604},{x:.43929971954126384,y:.5224287703137037},{x:.4378191137317927,y:.523276992839783},{x:.43645134158383936,y:.5242972253466508},{x:.43400065578620683,y:.5254645447348341},{x:.43164529517316985,y:.52681390451462},{x:.35647929517316984,y:.56056790451462},{x:.3558506134628383,y:.560778965311121},{x:.35526575445642905,y:.5610915789630079},{x:.351674330744245,y:.5621810254355277},{x:.34811645117964274,y:.5633754754766519},{x:.34745867349333664,y:.563459831081816},{x:.3468240644907258,y:.5636523376181454},{x:.3430891085149791,y:.5640201986736739},{x:.3393665669654169,y:.5644975898222324},{x:.3387049713307353,y:.5644519984974604},{x:.338045,y:.564517},{x:.225865,y:.564517},{x:.22507819619617456,y:.5644395065891945},{x:.22428916125732748,y:.5644893996719887},{x:.22069487882474298,y:.5640077875099223},{x:.21708593550927424,y:.5636523376181454},{x:.21632936813438544,y:.5634228354140474},{x:.21554576062305134,y:.5633178367349442},{x:.2121144991913443,y:.5621442688983362},{x:.20864424554357097,y:.5610915789630079},{x:.20794698905754733,y:.5607188876066144},{x:.20719892257093525,y:.5604630322059678},{x:.13315592257093525,y:.5267090322059678},{x:.13091775246116674,y:.5254099486077729},{x:.12858140317750869,y:.5242970714087468},{x:.1271119341080524,y:.5232009671819817},{x:.12552641140636125,y:.5222806946221156},{x:.12358468574515913,y:.5205699272235509},{x:.12166,y:.5191342684374534},{x:.12166,y:.7597659999999999},{x:.12079533761814537,y:.7685450644907257},{x:.1182345789630079,y:.776986754456429},{x:.11407613255361454,y:.7847666604858821},{x:.10847980515339464,y:.7915858051533946},{x:.10166066048588208,y:.7971821325536145},{x:.09388075445642904,y:.8013405789630078},{x:.08543906449072577,y:.8039013376181453},{x:.07666,y:.804766},{x:.06788093550927421,y:.8039013376181453},{x:.05943924554357094,y:.8013405789630078},{x:.05165933951411792,y:.7971821325536145},{x:.04484019484660537,y:.7915858051533946},{x:.039243867446385465,y:.7847666604858821},{x:.0350854210369921,y:.776986754456429},{x:.03252466238185464,y:.7685450644907257},{x:.03166000000000001,y:.7597659999999999},{x:.03166000000000001,y:.04001500000000002}],[{x:.12166,y:.16313400296117606},{x:.12166,y:.39738980161800674},{x:.17691400696537596,y:.447746357818324},{x:.23563826658076475,y:.474517},{x:.3284048540018634,y:.474517},{x:.3882155063572531,y:.44765846343288423},{x:.44979135555302596,y:.39154114946310603},{x:.480392,y:.30619363915535625},{x:.480392,y:.2534097446111891},{x:.44984564070758065,y:.16903221413717517},{x:.38802932067077023,y:.11269492399652684},{x:.3281476350434013,y:.08501500000000002},{x:.2358983461114888,y:.08501500000000002},{x:.1771018588393058,y:.11260550754658781},{x:.12166,y:.16313400296117606}]],c:[[{x:.0446,y:.25490100000000004},{x:.044822712444716174,y:.2526397626013558},{x:.04482893549381362,y:.2503675925637664},{x:.045254001037800355,y:.24826081602954003},{x:.045464662381854634,y:.24612193550927428},{x:.04612424100165128,y:.2439475961957434},{x:.04657362286091401,y:.24172029932495478},{x:.08145962286091402,y:.1278402993249547},{x:.08196610920465827,y:.1266269431042867},{x:.08230081253195312,y:.125355433994083},{x:.08366176737769918,y:.12256476567779218},{x:.08485778977199918,y:.11969953302126297},{x:.0855912581784792,y:.11860830168404396},{x:.08616758939694805,y:.11742652164475936},{x:.08804682625741464,y:.11495498435675963},{x:.08977884657839008,y:.1123781387363477},{x:.09071111026807865,y:.11145096769089737},{x:.09150692129220603,y:.11040433186669174},{x:.16233292129220603,y:.03411333186669174},{x:.16445877247754231,y:.03223237849112975},{x:.1664474797904295,y:.03020697184383589},{x:.16775479669311927,y:.029316055882572942},{x:.16893962068732413,y:.02826772347496185},{x:.17139158003796548,y:.02683764508339147},{x:.17373721213250964,y:.02523913360696181},{x:.24456521213250962,y:-.013455866393038113},{x:.2467886390083486,y:-.014400746043602006},{x:.24891924554357092,y:-.015539578963007873},{x:.25083834630720225,y:-.016121731815163746},{x:.25268405147305695,y:-.01690609278116076},{x:.2550490927002279,y:-.01739904776899966},{x:.2573609355092742,y:-.018100337618145335},{x:.259356733677244,y:-.018296906580526337},{x:.26131999536931183,y:-.018706117055345653},{x:.26373576373978486,y:-.0187282033967292},{x:.26614,y:-.018964999999999968},{x:.371854,y:-.018964999999999968},{x:.3744001776009888,y:-.018714223394882004},{x:.3769583677219744,y:-.018674567546095353},{x:.3787793796063011,y:-.01828290964379429},{x:.3806330644907258,y:-.018100337618145335},{x:.3830813939144215,y:-.01735764500708899},{x:.3855826926572475,y:-.01681967299983559},{x:.38729230564255435,y:-.01608027889939661},{x:.3890747544564291,y:-.015539578963007873},{x:.391331147776118,y:-.014333511606549179},{x:.393679431632842,y:-.013317897403369645},{x:.463449431632842,y:.02537710259663028},{x:.46566730315778443,y:.026909287408228903},{x:.46799586592077425,y:.028267352155161442},{x:.4692879686356918,y:.029410572352257962},{x:.47070743151062955,y:.03039118797094862},{x:.4725837728278355,y:.03232661755101331},{x:.4746026476214732,y:.03411286752390576},{x:.5454306476214732,y:.11040386752390575},{x:.5507700783887176,y:.11742598212342069},{x:.5546369668925095,y:.12535484002769406},{x:.5568827107762242,y:.13388573967401945},{x:.5574210073618384,y:.14269084337317217},{x:.5562311702134469,y:.15143177592795284},{x:.5533589241053942,y:.15977262820225266},{x:.5489146478448386,y:.16739286592077418},{x:.5430691324760942,y:.17399964762147313},{x:.5360470178765793,y:.17933907838871752},{x:.5281181599723059,y:.18320596689250943},{x:.5195872603259806,y:.1854517107762242},{x:.5107821566268278,y:.1859900073618383},{x:.5020412240720471,y:.18480017021344686},{x:.4937003717977473,y:.18192792410539416},{x:.4860801340792258,y:.17748364784483847},{x:.47947335237852684,y:.17163813247609414},{x:.41352572033101553,y:.10060392571412592},{x:.36021071976053953,y:.07103500000000003},{x:.27763077403847125,y:.07103500000000003},{x:.2233107097601157,y:.10071132697875086},{x:.16448866962379677,y:.16407213041308155},{x:.1346,y:.2616391113440561},{x:.1346,y:.3245158400933278},{x:.1645319520417492,y:.4231721923699009},{x:.2231207776861973,y:.4862793045993598},{x:.27734241586879393,y:.5150589999999999},{x:.3605019191882548,y:.5150589999999999},{x:.41371701660545657,y:.4863852380349392},{x:.47947395272027693,y:.4155592208902026},{x:.48608084903755494,y:.4097138350672089},{x:.4937011738972078,y:.40526970822380387},{x:.5020420824884065,y:.4023976256622846},{x:.5107830383716269,y:.4012079599048077},{x:.5195881315142611,y:.40174642913926084},{x:.5281189871247909,y:.40399234029494097},{x:.5360477692062626,y:.4078593842656568},{x:.5430697791097975,y:.41319895272027696},{x:.5489151649327911,y:.41980584903755497},{x:.5533592917761961,y:.42742617389720783},{x:.5562313743377155,y:.4357670824884066},{x:.5574210400951923,y:.4445080383716269},{x:.5568825708607392,y:.4533131315142611},{x:.5546366597050592,y:.4618439871247909},{x:.5507696157343432,y:.46977276920626265},{x:.5454300472797231,y:.4767947791097975},{x:.4746020472797231,y:.5530827791097974},{x:.47237947035514305,y:.5550491819442839},{x:.4702881116089302,y:.5571546051529963},{x:.469083054274185,y:.5579656532949738},{x:.4679951509624451,y:.5589281649327911},{x:.46543165406806053,y:.5604231806402761},{x:.46296973250196366,y:.5620801448811513},{x:.39319973250196366,y:.5996741448811513},{x:.39109075852725916,y:.6005560023370271},{x:.3890747544564291,y:.6016335789630078},{x:.38703122642603144,y:.6022534764138876},{x:.38506104886577136,y:.6030772968079529},{x:.3828205563795885,y:.6035307692082409},{x:.3806330644907258,y:.6041943376181453},{x:.3785078662851109,y:.6044036513718285},{x:.37641482574826585,y:.6048272797133635},{x:.3741289156203665,y:.604834940368031},{x:.371854,y:.605059},{x:.26614,y:.605059},{x:.26400488750824663,y:.6048487097743618},{x:.26185945318827825,y:.6048549475733314},{x:.2596259398913868,y:.6044174210783497},{x:.2573609355092742,y:.6041943376181453},{x:.2553078741931944,y:.60357154827667},{x:.25320244685788745,y:.6031591127457343},{x:.2510972070775077,y:.6022942563713519},{x:.24891924554357092,y:.6016335789630078},{x:.24702713339817148,y:.6006222239508241},{x:.24504262343928468,y:.5998069647561404},{x:.1742146234392847,y:.5622129647561404},{x:.17162525666515238,y:.5604936738034747},{x:.16894033563687538,y:.5589277936219744},{x:.16795812189104978,y:.5580587651214349},{x:.16686556037036515,y:.5573333247718834},{x:.16466136457832586,y:.5551419091149951},{x:.16233352162359432,y:.5530823147741101},{x:.09150752162359431,y:.47679431477411016},{x:.09067474586023959,y:.4756991081857825},{x:.08970182133886938,y:.4747262717047309},{x:.08801053269383365,y:.4721953272870651},{x:.08616805203977476,y:.4697722296898647},{x:.08556494203519081,y:.46853560069719197},{x:.08480050296804506,y:.467391648838166},{x:.08363547472152838,y:.4645793817614187},{x:.08230111970711389,y:.461843393160995},{x:.08195085264054901,y:.4605128647226562},{x:.08142427599227564,y:.4592417589140625},{x:.046538275992275634,y:.3442567589140625},{x:.04610669192420131,y:.34208755224892967},{x:.045464662381854634,y:.33997106449072584},{x:.04524807462900009,y:.3377720121321243},{x:.04481688692083,y:.3356047976316928},{x:.044816786846426454,y:.33339307378956023},{x:.0446,y:.33119200000000004},{x:.0446,y:.25490100000000004}]],d:[[{x:.03166100000000001,y:.24551500000000004},{x:.03199378652782141,y:.24213616168032864},{x:.032173060891358886,y:.2387457109778176},{x:.032425376075824915,y:.237754159461938},{x:.03252566238185464,y:.23673593550927427},{x:.03351123316568353,y:.23348694405135337},{x:.034348506941927405,y:.23019661460170962},{x:.0713675069419274,y:.12794261460170955},{x:.07225746993456125,y:.1260790095358921},{x:.0729478813145148,y:.12413263082247869},{x:.07415364826248581,y:.12210836405190925},{x:.07516899837159816,y:.11998219518580837},{x:.07640543228727825,y:.1183280219355851},{x:.07746229725612473,y:.11655373492181778},{x:.07903981058640837,y:.11480359733178996},{x:.08045044599662987,y:.11291636718401242},{x:.08198583537337678,y:.11153519469971836},{x:.08336853920306012,y:.1100011842405046},{x:.15853253920306012,y:.04150018424050468},{x:.16051177365736521,y:.04002385498013544},{x:.16235580937568672,y:.038381768082408986},{x:.16403890527939927,y:.03739293492543645},{x:.16560363358955885,y:.03622578962650935},{x:.16783285515961555,y:.03516395710594637},{x:.16996181351033893,y:.03391317596960988},{x:.24512381351033893,y:-.0008318240303901436},{x:.24598297689097734,y:-.0011307574341723537},{x:.24678524554357095,y:-.0015595789630078807},{x:.25014222995258023,y:-.0025779090504023904},{x:.2534554494825366,y:-.0037306956028641883},{x:.25435642329373365,y:-.003856270624521421},{x:.2552269355092742,y:-.004120337618145342},{x:.2587180827488419,y:-.0044641856090968535},{x:.2621925371943035,y:-.004948444626188875},{x:.2631006975177666,y:-.004895835488062085},{x:.264006,y:-.0049849999999999756},{x:.376189,y:-.0049849999999999756},{x:.37722298297811335,y:-.004883161565438171},{x:.3782605578675134,y:-.004937293022731791},{x:.3816049041349026,y:-.004451580001305548},{x:.3849680644907258,y:-.004120337618145342},{x:.3859623120828546,y:-.003818735908388489},{x:.38699051078512875,y:-.003669406425619949},{x:.39017583846699794,y:-.0025405766534665605},{x:.39340975445642906,y:-.0015595789630078807},{x:.39432605828518835,y:-.0010698043626217065},{x:.39530536770082864,y:-.0007227525880688923},{x:.46934836770082866,y:.034022247411931134},{x:.4713599418403825,y:.035219651121148166},{x:.4734733873673339,y:.03622640539423388},{x:.4751409393435705,y:.037470316580519136},{x:.4769285933263682,y:.03853443023544684},{x:.47866791375766776,y:.04010126481479184},{x:.480392,y:.041387347763641016},{x:.480392,y:.04001500000000002},{x:.4812566623818546,y:.031235935509274233},{x:.48381742103699205,y:.022794245543570978},{x:.48797586744638544,y:.015014339514117927},{x:.4935721948466053,y:.008195194846605386},{x:.5003913395141178,y:.002598867446385482},{x:.508171245543571,y:-.0015595789630078807},{x:.5166129355092742,y:-.004120337618145342},{x:.525392,y:-.0049849999999999756},{x:.5341710644907257,y:-.004120337618145342},{x:.542612754456429,y:-.0015595789630078807},{x:.5503926604858821,y:.002598867446385489},{x:.5572118051533946,y:.008195194846605386},{x:.5628081325536145,y:.015014339514117927},{x:.5669665789630078,y:.022794245543570985},{x:.5695273376181453,y:.031235935509274254},{x:.570392,y:.04001500000000002},{x:.570392,y:.7597659999999999},{x:.5695273376181453,y:.7685450644907257},{x:.5669665789630078,y:.776986754456429},{x:.5628081325536145,y:.7847666604858821},{x:.5572118051533946,y:.7915858051533946},{x:.5503926604858821,y:.7971821325536145},{x:.542612754456429,y:.8013405789630078},{x:.5341710644907257,y:.8039013376181453},{x:.525392,y:.804766},{x:.5166129355092742,y:.8039013376181453},{x:.508171245543571,y:.8013405789630078},{x:.5003913395141178,y:.7971821325536145},{x:.4935721948466053,y:.7915858051533946},{x:.48797586744638544,y:.7847666604858821},{x:.48381742103699205,y:.776986754456429},{x:.4812566623818546,y:.7685450644907257},{x:.480392,y:.7597659999999999},{x:.480392,y:.5191356905079497},{x:.47846953719699326,y:.5205697307992189},{x:.47652758859363875,y:.5222806946221157},{x:.47494232329576636,y:.5232008177790934},{x:.47347310730786674,y:.524296763521154},{x:.4711365045177018,y:.5254097994515352},{x:.46889807742906475,y:.5267090322059679},{x:.3948550774290648,y:.5604630322059679},{x:.3941070109424522,y:.5607188876066146},{x:.39340975445642906,y:.5610915789630079},{x:.389939500808656,y:.5621442688983361},{x:.38650823937694867,y:.5633178367349442},{x:.38572463186561456,y:.5634228354140474},{x:.3849680644907258,y:.5636523376181454},{x:.38135912117525683,y:.5640077875099224},{x:.3777648387426725,y:.5644893996719887},{x:.3769758038038255,y:.5644395065891945},{x:.376189,y:.564517},{x:.264006,y:.564517},{x:.26334558239453953,y:.5644519545432365},{x:.2626835384795895,y:.5644975635305632},{x:.2589614482177297,y:.5640201550156564},{x:.2552269355092742,y:.5636523376181454},{x:.25459189738202526,y:.5634597009082802},{x:.2539336765832372,y:.5633752751711479},{x:.2503762430229788,y:.5621808961392286},{x:.24678524554357095,y:.5610915789630079},{x:.24619999105363047,y:.5607787539207695},{x:.24557088842716707,y:.5605675378929096},{x:.17040888842716706,y:.5268135378929095},{x:.16805407047382528,y:.5254644267942322},{x:.16560391365212207,y:.5242973792806265},{x:.16423565717286473,y:.5232767996121171},{x:.1627545512703112,y:.5224282514648534},{x:.16070817900232118,y:.5206456609648356},{x:.15853278093215223,y:.5190230360586235},{x:.08336878093215222,y:.45052303605862365},{x:.08193967718325436,y:.44893757139643337},{x:.08035717944512263,y:.44750518296134467},{x:.07899365114577664,y:.44566921514174185},{x:.07746249136223225,y:.4439705283033309},{x:.07637015625263606,y:.44213672358948825},{x:.0750975108858587,y:.44042312810321155},{x:.07411836195358443,y:.43835642671545355},{x:.07294802033824888,y:.4363916652130956},{x:.07223443169362759,y:.4343799925343442},{x:.07132054574594202,y:.4324510425104215},{x:.034301545745942026,y:.32920504251042143},{x:.033491210284420626,y:.32597904935505284},{x:.03252566238185464,y:.3227960644907258},{x:.03241858101312289,y:.3217088491086539},{x:.03215243067755317,y:.32064928896150824},{x:.031987025628206905,y:.31732719375391183},{x:.03166100000000001,y:.314017},{x:.03166100000000001,y:.24551500000000004}],[{x:.121661,y:.25340994514221},{x:.121661,y:.3061934402169761},{x:.15226243948714763,y:.39154086238640384},{x:.21383969339611897,y:.4476587099299689},{x:.27364661400534074,y:.474517},{x:.3664157334192352,y:.474517},{x:.42513971513426946,y:.4477464845048247},{x:.480392,y:.3973901578243758},{x:.480392,y:.1631336467554691},{x:.4249518651426514,y:.1126053780239199},{x:.3661556538885112,y:.08501500000000002},{x:.2739038430667855,y:.08501500000000002},{x:.21402588591940364,y:.11269467351967463},{x:.15220815290195538,y:.1690325018607451},{x:.121661,y:.25340994514221}]],e:[[{x:.014571,y:.25490100000000004},{x:.014880046743786594,y:.2517631957525991},{x:.01501248842711947,y:.2486129918567585},{x:.015311525398480692,y:.24738231945287367},{x:.015435662381854634,y:.24612193550927428},{x:.016350926120166094,y:.24310471531940006},{x:.01709539726614681,y:.24004087979874045},{x:.05693639726614681,y:.12616087979874036},{x:.057746546207777846,y:.12441615547982068},{x:.05835851556287996,y:.12259245107255745},{x:.05959975008908581,y:.12042512406141898},{x:.06065161969764369,y:.11815983382640528},{x:.06178658068373706,y:.11660668611395116},{x:.06274257829935428,y:.11493741297405176},{x:.06438278737670251,y:.11305388338712186},{x:.06585638180708843,y:.11103732964943176},{x:.06727253892344205,y:.10973544513901749},{x:.06853582634733585,y:.1082847524971091},{x:.14942282634733584,y:.031993752497109104},{x:.15144602889400902,y:.03043003785468449},{x:.15333307828862142,y:.02870446646813117},{x:.1549277151407192,y:.027739074573098352},{x:.15640262843323158,y:.02659912765300345},{x:.15869202130341495,y:.025460166585296706},{x:.1608794538505091,y:.024135896643135493},{x:.2417664538505091,y:-.01455910335686443},{x:.24290092295632487,y:-.014970686687880902},{x:.2439652455435709,y:-.015539578963007873},{x:.24703931387581265,y:-.016472087396775758},{x:.2500591116803148,y:-.017567664555291233},{x:.2512520782049556,y:-.01775001548484057},{x:.2524069355092742,y:-.018100337618145335},{x:.25560385985111694,y:-.01841520718300011},{x:.2587793695882151,y:-.01890059980751419},{x:.2599849884971624,y:-.018846710691637396},{x:.261186,y:-.018964999999999968},{x:.381914,y:-.018964999999999968},{x:.3832466926412995,y:-.01883374123151461},{x:.3845848263549422,y:-.018885671038862982},{x:.3876272824249201,y:-.01840229079619376},{x:.39069306449072577,y:-.018100337618145335},{x:.3919745425012029,y:-.017711605513551366},{x:.39329709535359264,y:-.017501480567117658},{x:.39618678867610163,y:-.016433834605858122},{x:.39913475445642904,y:-.015539578963007873},{x:.4003157713548023,y:-.014908312279081314},{x:.40157191838151796,y:-.014444207562717595},{x:.48125191838151804,y:.02425079243728233},{x:.4833189661071789,y:.02551885102394819},{x:.4854901362659954,y:.026598980192539007},{x:.48706966813422276,y:.027819770278194},{x:.48877129863032925,y:.028863658687316496},{x:.4905512426555404,y:.030510612890229178},{x:.492469971641239,y:.03199356196515255},{x:.573357971641239,y:.10828456196515254},{x:.5791512607417543,y:.11493718669263933},{x:.5835353707163221,y:.12259219773755695},{x:.5863418226772573,y:.13095541731842886},{x:.5874627662495775,y:.13970545159690978},{x:.5868551242004307,y:.1485060416627534},{x:.584542247872996,y:.15701898577515713},{x:.5806130198074609,y:.16491713626599536},{x:.5752184380348474,y:.17189697164123896},{x:.5685658133073607,y:.17769026074175415},{x:.560910802262443,y:.1820743707163221},{x:.5525475826815711,y:.18488082267725728},{x:.5437975484030901,y:.18600176624957743},{x:.5349969583372466,y:.1853941242004306},{x:.5264840142248428,y:.183081247872996},{x:.5185858637340046,y:.17915201980746093},{x:.511606028358761,y:.17375743803484736},{x:.43573388395098006,y:.1021972341849065},{x:.3715652104827451,y:.07103500000000003},{x:.2713955768569904,y:.07103500000000003},{x:.2060606884620834,y:.10229012760321096},{x:.13826613078700495,y:.16623259795801962},{x:.104571,y:.2625454790108076},{x:.104571,y:.28619200000000006},{x:.542482,y:.28619200000000006},{x:.5512610644907258,y:.2870566623818547},{x:.559702754456429,y:.2896174210369921},{x:.5674826604858821,y:.2937758674463855},{x:.5743018051533947,y:.2993721948466054},{x:.5798981325536146,y:.3061913395141179},{x:.5840565789630079,y:.31397124554357103},{x:.5866173376181454,y:.32241293550927425},{x:.5874820000000001,y:.33119200000000004},{x:.5866173376181454,y:.33997106449072584},{x:.5840565789630079,y:.34841275445642905},{x:.5798981325536146,y:.35619266048588216},{x:.5743018051533947,y:.3630118051533947},{x:.5674826604858821,y:.3686081325536146},{x:.5660433240263831,y:.3693774739195968},{x:.5706944449992851,y:.3724210772554575},{x:.5769918122169339,y:.3785986803904119},{x:.5819629867044116,y:.38588613801169297},{x:.5854169290140312,y:.3940033972097681},{x:.5872209060798271,y:.40263851626586683},{x:.5873055920748429,y:.4114596523972937},{x:.5856677325637826,y:.4201278142894682},{x:.5823702695691338,y:.4283098893420352},{x:.5425292695691338,y:.5045998893420351},{x:.54083893518448,y:.5071829952333479},{x:.5393041274419548,y:.5098614335042745},{x:.5384286685906833,y:.5108662746451583},{x:.5376989227445426,y:.5119814449992851},{x:.5355371287009763,y:.5141851493557908},{x:.5335092744740836,y:.5165126960496618},{x:.49246227447408364,y:.5552086960496617},{x:.4903478252727746,y:.5568421196453192},{x:.48836639942178184,y:.5586345815458318},{x:.486865329057947,y:.5595323670561179},{x:.4854811710293013,y:.5606016367187369},{x:.48308868524123094,y:.5617911659624512},{x:.4807956399629947,y:.5631626292028359},{x:.40111563996299465,y:.6007566292028359},{x:.40009264564938235,y:.6011215754533451},{x:.39913475445642904,y:.6016335789630078},{x:.3959457374462889,y:.6026009566970012},{x:.3928069722488333,y:.6037206897930685},{x:.3917324370025758,y:.603879047413643},{x:.39069306449072577,y:.6041943376181453},{x:.38737659751458814,y:.6045209811048129},{x:.38407969371999856,y:.6050068561303112},{x:.38299491132800306,y:.6049525395264004},{x:.381914,y:.605059},{x:.261186,y:.605059},{x:.26023449599616577,y:.6049652850353624},{x:.2592798763752433,y:.6050186117946668},{x:.25585213857488087,y:.6045336605029273},{x:.2524069355092742,y:.6041943376181453},{x:.2514919972706982,y:.6039167941377678},{x:.2505453168634681,y:.6037828591890964},{x:.24727805138745723,y:.6026385076291858},{x:.2439652455435709,y:.6016335789630078},{x:.24312203363365809,y:.6011828728071931},{x:.24221967283726598,y:.6008668231955117},{x:.161332672837266,y:.5632728231955116},{x:.15891596978001063,y:.5618462817840929},{x:.15640337688314435,y:.5605963413854953},{x:.1551260781006526,y:.5596091689500753},{x:.15373589412748892,y:.5587885654418143},{x:.1516439317651508,y:.5569179592459522},{x:.1494234689111216,y:.555201853544281},{x:.06853646891112161,y:.47891385354428107},{x:.06722863655802509,y:.4774120673763562},{x:.06576662511800205,y:.47605991734502884},{x:.06433886916992998,y:.4740937424536807},{x:.06274309028364713,y:.4722613067803989},{x:.06175337150959475,y:.4705332315776763},{x:.06058324359446483,y:.4689218384474283},{x:.05956650326928079,y:.4667149016876259},{x:.05835887729241062,y:.4646063547351938},{x:.05772530643484857,y:.4627183994585984},{x:.05689202940417486,y:.4609096881637455},{x:.017051029404174856,y:.3459246881637455},{x:.016331419439147486,y:.342923979771159},{x:.015435662381854634,y:.33997106449072584},{x:.015304912520774374,y:.33864353887302173},{x:.014993833838408223,y:.33734636893611664},{x:.014873460143664087,y:.33426292937408214},{x:.014571,y:.33119200000000004},{x:.014571,y:.25490100000000004}],[{x:.12278767041868709,y:.376192},{x:.13831799224413532,y:.421014018902617},{x:.20587340146207272,y:.4847284236699839},{x:.27113246747276615,y:.5150589999999999},{x:.37183117966561724,y:.5150589999999999},{x:.4359272756482788,y:.48481767680255794},{x:.4662598881310508,y:.45622238914125884},{x:.5025937304308662,y:.3866481106579649},{x:.5074240772554575,y:.379266555000715},{x:.5104401600015575,y:.376192},{x:.12278767041868709,y:.376192}]],f:[[{x:.044112,y:.5239119999999999},{x:.04497666238185463,y:.5151329355092742},{x:.04753742103699209,y:.5066912455435709},{x:.051695867446385456,y:.4989113395141178},{x:.05729219484660536,y:.49209219484660527},{x:.0641113395141179,y:.4864958674463854},{x:.07189124554357096,y:.482337421036992},{x:.08033293550927423,y:.47977666238185457},{x:.089112,y:.47891199999999995},{x:.20304699999999998,y:.47891199999999995},{x:.20304699999999998,y:.05318299999999998},{x:.20391166238185462,y:.04440393550927419},{x:.2064724210369921,y:.03596224554357094},{x:.21063086744638546,y:.028182339514117884},{x:.21622719484660535,y:.021363194846605343},{x:.2230463395141179,y:.01576686744638544},{x:.23082624554357095,y:.011608421036992077},{x:.23926793550927422,y:.009047662381854615},{x:.248047,y:.008182999999999982},{x:.25682606449072576,y:.009047662381854615},{x:.26526775445642903,y:.011608421036992077},{x:.2730476604858821,y:.015766867446385446},{x:.2798668051533946,y:.021363194846605343},{x:.28546313255361455,y:.028182339514117884},{x:.2896215789630079,y:.03596224554357094},{x:.2921823376181454,y:.04440393550927421},{x:.293047,y:.05318299999999998},{x:.293047,y:.47891199999999995},{x:.459965,y:.47891199999999995},{x:.4687440644907258,y:.47977666238185457},{x:.4771857544564291,y:.482337421036992},{x:.48496566048588213,y:.4864958674463854},{x:.4917848051533946,y:.49209219484660527},{x:.49738113255361455,y:.4989113395141178},{x:.5015395789630079,y:.5066912455435709},{x:.5041003376181454,y:.5151329355092742},{x:.504965,y:.5239119999999999},{x:.5041003376181454,y:.5326910644907257},{x:.5015395789630079,y:.5411327544564289},{x:.49738113255361455,y:.548912660485882},{x:.4917848051533946,y:.5557318051533946},{x:.48496566048588213,y:.5613281325536145},{x:.4771857544564291,y:.5654865789630078},{x:.4687440644907258,y:.5680473376181453},{x:.459965,y:.568912},{x:.293047,y:.568912},{x:.293047,y:.6141229501499061},{x:.3322669208002554,y:.6884371453882767},{x:.4140490730325775,y:.7147659999999999},{x:.512941,y:.7147659999999999},{x:.5217200644907257,y:.7156306623818546},{x:.530161754456429,y:.7181914210369921},{x:.5379416604858821,y:.7223498674463854},{x:.5447608051533946,y:.7279461948466053},{x:.5503571325536145,y:.7347653395141178},{x:.5545155789630078,y:.7425452455435709},{x:.5570763376181453,y:.7509869355092742},{x:.557941,y:.7597659999999999},{x:.5570763376181453,y:.7685450644907257},{x:.5545155789630078,y:.776986754456429},{x:.5503571325536145,y:.7847666604858821},{x:.5447608051533946,y:.7915858051533946},{x:.5379416604858821,y:.7971821325536145},{x:.530161754456429,y:.8013405789630078},{x:.5217200644907257,y:.8039013376181453},{x:.512941,y:.804766},{x:.406984,y:.804766},{x:.40440576588043703,y:.8045120661033809},{x:.40181542834229744,y:.8044681908525655},{x:.400026512750784,y:.8040807473169851},{x:.3982049355092742,y:.8039013376181453},{x:.39572578148103565,y:.8031492944655273},{x:.39319377618916257,y:.8026009124809075},{x:.2872357761891626,y:.7684889124809076},{x:.28342960508890525,y:.7668362808879404},{x:.2796044085190959,y:.7652281761559891},{x:.27938594032962494,y:.7650805300410848},{x:.27914407460343155,y:.764975512444704},{x:.2757334504432472,y:.7626120885587936},{x:.27229547962292316,y:.7602886242777711},{x:.2721100135665551,y:.7601011941121303},{x:.27189328313916555,y:.7599510087370087},{x:.2690092742928275,y:.7569676176126634},{x:.26609064851257996,y:.7540180832118794},{x:.26594531194585036,y:.7537980718316557},{x:.26576204564604555,y:.7536084902175343},{x:.26351548295615396,y:.7501197819025626},{x:.26122836336792754,y:.7466575263349163},{x:.2082493633679275,y:.6462725263349164},{x:.20745880379789322,y:.6443351468057326},{x:.2064724210369921,y:.6424897544564291},{x:.20579637196662365,y:.6402611193438609},{x:.20491647908027386,y:.6381048157198157},{x:.20451907388691828,y:.636050431873947},{x:.20391166238185462,y:.6340480644907258},{x:.20368338854657433,y:.6317303613460921},{x:.20324107652369047,y:.6294438319050109},{x:.20325209776572678,y:.6273513925615422},{x:.20304699999999998,y:.6252690000000001},{x:.20304699999999998,y:.568912},{x:.089112,y:.568912},{x:.0803329355092742,y:.5680473376181453},{x:.07189124554357093,y:.5654865789630078},{x:.0641113395141179,y:.5613281325536145},{x:.05729219484660536,y:.5557318051533946},{x:.051695867446385456,y:.548912660485882},{x:.04753742103699209,y:.5411327544564289},{x:.04497666238185463,y:.5326910644907257},{x:.044112,y:.5239119999999999}]],g:[[{x:.03166100000000001,y:.285331},{x:.03199195389402992,y:.28197076872347165},{x:.03216742697517915,y:.27859884139484714},{x:.032423533978450624,y:.2775888625904497},{x:.03252566238185464,y:.2765519355092742},{x:.03350580569139788,y:.2733208360362635},{x:.034335737494852386,y:.2700479324456657},{x:.07135573749485238,y:.1675239324456658},{x:.07223945098422414,y:.16566943556296815},{x:.07292365731738822,y:.16373243532732273},{x:.07413231799188957,y:.16169720247238553},{x:.07515058411631778,y:.15956034321175439},{x:.07637911169281072,y:.15791388391586245},{x:.07742806119285411,y:.15614758463046624},{x:.07901055202445481,y:.15438725620434748},{x:.0804261330120869,y:.15249010996133996},{x:.08195226304990277,y:.15111496075964967},{x:.08332564517579637,y:.14958724031548856},{x:.1584886451757964,y:.08090524031548854},{x:.16047116284778873,y:.07942238349974136},{x:.16231838489394151,y:.07777404756068641},{x:.16399482319868336,y:.07678680357956279},{x:.16555276842115366,y:.07562151273533077},{x:.16778648358567103,y:.07455391860853194},{x:.1699197861673149,y:.07329763012616651},{x:.2450797861673149,y:.038459630126166475},{x:.2459605302529857,y:.0381521715215269},{x:.24678324554357095,y:.03771242103699209},{x:.2501181687545519,y:.03670078314085588},{x:.253408434365457,y:.03555218561964517},{x:.254332237398671,y:.03542245939316866},{x:.2552249355092742,y:.03515166238185463},{x:.2586931398688001,y:.03481007406735549},{x:.26214426420887293,y:.034325445502994434},{x:.2630756249571383,y:.03437843696081321},{x:.264004,y:.034287},{x:.376189,y:.034287},{x:.37724627227682206,y:.03439113223027483},{x:.37830727432005307,y:.03433688416138392},{x:.3816280756224084,y:.03482270219101675},{x:.3849680644907258,y:.03515166238185463},{x:.38598470638687477,y:.035460057329467706},{x:.38703590484658207,y:.03561384285228289},{x:.39019811948723343,y:.036738182220129235},{x:.39340975445642906,y:.03771242103699209},{x:.39434669699397534,y:.038213227257056566},{x:.39534769490287125,y:.03856913648017993},{x:.4693886949028713,y:.07340713648017996},{x:.47140406041677185,y:.07460963544760885},{x:.47352148667564636,y:.07562166704766733},{x:.4751827197672129,y:.0768642309221422},{x:.47696422705836306,y:.07792719476830276},{x:.47870627197824944,y:.0794997663623443},{x:.480392,y:.08076065187723735},{x:.480392,y:.018480463023952315},{x:.44982106300216956,y:-.06618482166306154},{x:.42509763890365326,y:-.0887666681923909},{x:.3663917896728536,y:-.115601},{x:.27366828971008494,y:-.115601},{x:.21388478385740822,y:-.08868092320279419},{x:.15228882603575622,y:-.032396134475538775},{x:.11903308523020223,y:.0605977685009861},{x:.11526275900748023,y:.06857299605517989},{x:.11000898883421664,y:.07565942769130271},{x:.1034736741518217,y:.08158473581569503},{x:.09590796343849313,y:.08612121416008753},{x:.08760260271404471,y:.08909452840579157},{x:.07887676233341709,y:.09039041575379858},{x:.07006577144893004,y:.08995907598006667},{x:.061508231499013855,y:.08781708523020218},{x:.05353300394482007,y:.08404675900748018},{x:.046446572308697254,y:.07879298883421659},{x:.04052126418430494,y:.07225767415182165},{x:.035984785839912437,y:.06469196343849308},{x:.03301147159420839,y:.05638660271404467},{x:.03171558424620138,y:.04766076233341703},{x:.0321469240199333,y:.038849771448930016},{x:.03428891476979778,y:.030292231499013812},{x:.07130891476979778,y:-.07322776850098624},{x:.07221644299685706,y:-.07514742841768875},{x:.07292365731738822,y:-.07714956467267746},{x:.07409706350042253,y:-.07912543338941479},{x:.07507924099251978,y:-.08120299605518004},{x:.07634383839048098,y:-.08290872027080634},{x:.07742806119285414,y:-.08473441536953392},{x:.07896439356931816,y:-.08644339813281518},{x:.08033301116578337,y:-.08828942769130284},{x:.0819060799658371,y:-.08971566618082738},{x:.08332564517579637,y:-.09129475968451163},{x:.1584886451757964,y:-.15997675968451153},{x:.16066766565506738,y:-.1616065940183929},{x:.16271768036753925,y:-.16339598773796155},{x:.16419165994754753,y:-.1642424237156923},{x:.16555276842115366,y:-.1652604872646693},{x:.16800788453794988,y:-.16643389898185532},{x:.17036760218951646,y:-.1677889719724602},{x:.24552760218951647,y:-.2016329719724602},{x:.24617798725770038,y:-.20185206166908357},{x:.24678324554357095,y:-.2021755789630079},{x:.2503526828238078,y:-.20325835592431216},{x:.25388756161766735,y:-.20444912053505218},{x:.25456819199860076,y:-.20453711665220192},{x:.2552249355092742,y:-.20473633761814536},{x:.25893702635910487,y:-.20510194665533446},{x:.2626362900994872,y:-.20558021041579141},{x:.263321009549333,y:-.20553373131203426},{x:.264004,y:-.20560099999999998},{x:.376189,y:-.20560099999999998},{x:.3769985938815523,y:-.20552126196245651},{x:.37781053527049396,y:-.2055717752142049},{x:.38138177137190815,y:-.20508955666026785},{x:.3849680644907258,y:-.20473633761814536},{x:.3857465461334356,y:-.20450018779358015},{x:.38655274094280934,y:-.2043913285403334},{x:.3899612805709507,y:-.2032216620796743},{x:.39340975445642906,y:-.2021755789630079},{x:.39412720724734457,y:-.20179209245674457},{x:.39489667386274535,y:-.20152804409855607},{x:.4689376738627454,y:-.16768404409855608},{x:.471176129388074,y:-.16638175223486265},{x:.4735129313995788,y:-.16526550692304898},{x:.47497970384913024,y:-.16416890323360386},{x:.4765626813675205,y:-.163247956304222},{x:.47850406105855325,y:-.16153398660426738},{x:.480578193417323,y:-.15998330217620907},{x:.5187211934173229,y:-.125144302176209},{x:.5200982241105119,y:-.12361318710120846},{x:.5216280341275545,y:-.12223470670068204},{x:.5230406381933351,y:-.12034152832018923},{x:.5246201913815024,y:-.1185852292702623},{x:.52567205708302,y:-.11681488878073784},{x:.5269035440443172,y:-.11516444436572898},{x:.5279196645391884,y:-.1130320574948894},{x:.5291262301085498,y:-.11100134969861394},{x:.5298125082093796,y:-.10905981698676002},{x:.5306983467616347,y:-.10720083421055714},{x:.5677173467616347,y:-.0046778342105572215},{x:.5685472301626403,y:-.001405045768812418},{x:.5695273376181453,y:.0018259355092742052},{x:.5696294781899907,y:.002862986138707272},{x:.5698856101392306,y:.003873086692614168},{x:.5700610582123972,y:.007244891642088324},{x:.570392,y:.010604999999999976},{x:.570392,y:.560059},{x:.5695273376181453,y:.5688380644907257},{x:.5669665789630078,y:.577279754456429},{x:.5628081325536145,y:.5850596604858821},{x:.5572118051533946,y:.5918788051533946},{x:.5503926604858821,y:.5974751325536145},{x:.542612754456429,y:.6016335789630078},{x:.5341710644907257,y:.6041943376181453},{x:.525392,y:.605059},{x:.5166129355092742,y:.6041943376181453},{x:.508171245543571,y:.6016335789630078},{x:.5003913395141178,y:.5974751325536145},{x:.4935721948466053,y:.5918788051533946},{x:.48797586744638544,y:.5850596604858821},{x:.48381742103699205,y:.577279754456429},{x:.4812566623818546,y:.5688380644907257},{x:.480392,y:.560059},{x:.480392,y:.5595783858718113},{x:.47850787544975776,y:.5609876460911735},{x:.47656308903374583,y:.5627046621197919},{x:.47498407852937236,y:.5636233247252487},{x:.47352120750708176,y:.5647175018259646},{x:.47118052218859596,y:.5658362200595997},{x:.46893813108831367,y:.5671408350985324},{x:.39489713108831365,y:.6009858350985324},{x:.39412742928685096,y:.6012499737741558},{x:.39340975445642906,y:.6016335789630078},{x:.38996152003118717,y:.6026795894402057},{x:.3865532301567984,y:.60384921275647},{x:.38574678706033977,y:.6039581147092028},{x:.3849680644907258,y:.6041943376181453},{x:.38138202040224084,y:.6045475321329209},{x:.37781103767268465,y:.6050297570960106},{x:.3769988444371686,y:.6049792372848822},{x:.376189,y:.605059},{x:.264004,y:.605059},{x:.2633207613423033,y:.6049917068657756},{x:.2626357925427961,y:.6050381952835313},{x:.25893677979996554,y:.6045599223713788},{x:.2552249355092742,y:.6041943376181453},{x:.25456795333002863,y:.6039950442528821},{x:.2538870765735461,y:.6039070086250592},{x:.2503524457397967,y:.6027162840056636},{x:.24678324554357095,y:.6016335789630078},{x:.24617776729948443,y:.6013099440989677},{x:.24552714829793862,y:.6010907675853725},{x:.17036714829793861,y:.5672457675853725},{x:.16800780172583518,y:.5658908729822889},{x:.16555304759050302,y:.5647176561362495},{x:.1641916021742222,y:.563699355958929},{x:.16271727507130354,y:.5628526987282604},{x:.16066758950642807,y:.5610635523625588},{x:.15848888603577402,y:.5594339797745099},{x:.08332588603577401,y:.49075297977450993},{x:.08190615458499984,y:.48917372437901785},{x:.08033291862515302,y:.48774732555289924},{x:.07896444452212992,y:.48590147772545017},{x:.07742825448734617,y:.4841926782200152},{x:.07634390022195357,y:.48236679190821125},{x:.07507917015624571,y:.48066087782555583},{x:.0740970979464375,y:.4785835213931001},{x:.07292379561819572,y:.47660786018244516},{x:.07221648966449083,y:.47460551074132296},{x:.0713088683600783,y:.4726856387236396},{x:.034288868360078294,y:.36916463872363964},{x:.03348577523186824,y:.3659561323879453},{x:.03252566238185464,y:.3627910644907258},{x:.0324167369020588,y:.3616851255348066},{x:.032146903820267865,y:.36060709221327164},{x:.03198519043554786,y:.35730356073015046},{x:.03166100000000001,y:.354012},{x:.03166100000000001,y:.285331}],[{x:.121661,y:.29320659086815803},{x:.121661,y:.34620780969623244},{x:.15228882172599023,y:.4318540207415116},{x:.21388481974037543,y:.48813802669691503},{x:.2736685500834057,y:.5150589999999999},{x:.3663915263934284,y:.5150589999999999},{x:.4250929420729598,y:.48822590193711934},{x:.480392,y:.4376951204586189},{x:.480392,y:.20264468470162808},{x:.4249051037436742,y:.15194152341431572},{x:.3661311050032371,y:.124287},{x:.2739261218560311,y:.124287},{x:.21407100266628776,y:.15203091487935444},{x:.15223458736534265,y:.208535427414771},{x:.121661,y:.29320659086815803}]],h:[[{x:.047041,y:.05318299999999998},{x:.04790566238185463,y:.04440393550927419},{x:.050466421036992094,y:.03596224554357094},{x:.05462486744638546,y:.028182339514117884},{x:.06022119484660536,y:.021363194846605343},{x:.06704033951411792,y:.01576686744638544},{x:.07482024554357096,y:.011608421036992077},{x:.08326193550927423,y:.009047662381854615},{x:.092041,y:.008182999999999982},{x:.10082006449072577,y:.009047662381854615},{x:.10926175445642904,y:.011608421036992077},{x:.1170416604858821,y:.015766867446385446},{x:.12386080515339463,y:.021363194846605343},{x:.12945713255361452,y:.028182339514117884},{x:.1336155789630079,y:.03596224554357094},{x:.13617633761814535,y:.04440393550927421},{x:.137041,y:.05318299999999998},{x:.137041,y:.3692271498339558},{x:.23047284680205596,y:.45237128863270537},{x:.2915669774325256,y:.478914},{x:.38669764440631527,y:.478914},{x:.43644054132690624,y:.4571557093088599},{x:.465011,y:.38123324165433015},{x:.465011,y:.05318299999999998},{x:.4658756623818546,y:.04440393550927419},{x:.46843642103699207,y:.03596224554357094},{x:.47259486744638546,y:.028182339514117884},{x:.4781911948466053,y:.021363194846605343},{x:.4850103395141179,y:.01576686744638544},{x:.492790245543571,y:.011608421036992077},{x:.5012319355092743,y:.009047662381854615},{x:.510011,y:.008182999999999982},{x:.5187900644907257,y:.009047662381854615},{x:.527231754456429,y:.011608421036992077},{x:.5350116604858821,y:.015766867446385446},{x:.5418308051533947,y:.021363194846605343},{x:.5474271325536145,y:.028182339514117884},{x:.5515855789630079,y:.03596224554357094},{x:.5541463376181454,y:.04440393550927421},{x:.555011,y:.05318299999999998},{x:.555011,y:.38942},{x:.5546506186962206,y:.39307901278178137},{x:.554410350301749,y:.3967478709583736},{x:.5542188683658584,y:.3974626474508545},{x:.5541463376181454,y:.3981990644907258},{x:.5530790429582076,y:.40171746346329923},{x:.5521276325304605,y:.40526895152034226},{x:.5139866325304605,y:.5066239515203422},{x:.5138553396770835,y:.5068902237569821},{x:.5137747554395128,y:.50717595947055},{x:.511905898744729,y:.5108438433478746},{x:.5100853961903059,y:.5145359657635786},{x:.5099046789559015,y:.5147715076888114},{x:.5097698988494882,y:.5150360318659072},{x:.5072213830653152,y:.5182688425286295},{x:.504715563605999,y:.5215348594178236},{x:.5044923668525381,y:.521730619287556},{x:.5043085704011859,y:.5219637664124008},{x:.5011783335599848,y:.5246372687597332},{x:.4980834944323178,y:.5273516689249697},{x:.497826395485866,y:.5275001237971909},{x:.49760064588412606,y:.5276929341565276},{x:.49400898123224624,y:.5297043869925788},{x:.49044405536829966,y:.5317628575577613},{x:.490162934397186,y:.5318583023949868},{x:.48990390707565157,y:.532003366394835},{x:.41414290707565155,y:.5651423663948351},{x:.41372099607879415,y:.5652794559590063},{x:.41332975445642905,y:.5654885789630079},{x:.40952975949805703,y:.5666412948313546},{x:.4057531353317914,y:.5678684156337233},{x:.40531258638921414,y:.5679205603081202},{x:.4048880644907258,y:.5680493376181454},{x:.4009362016599996,y:.5684385621342186},{x:.39699274487562397,y:.5689053213297277},{x:.39655048803612764,y:.5688705172237564},{x:.396109,y:.568914},{x:.282214,y:.568914},{x:.28182836168040026,y:.5688760179407144},{x:.2814421286004882,y:.5689073796745989},{x:.27744221175957573,y:.5684440198796774},{x:.2734349355092742,y:.5680493376181454},{x:.2730641170540284,y:.5679368510695262},{x:.2726791869636831,y:.5678922598605547},{x:.26884652441488044,y:.5666574583296339},{x:.26499324554357095,y:.5654885789630079},{x:.2646514972979566,y:.5653059107200353},{x:.264282662844679,y:.5651870801833616},{x:.18800566284467896,y:.5320480801833616},{x:.1856267698486466,y:.5307235797343987},{x:.1831549202301779,y:.529581917442145},{x:.18178185218619736,y:.5285828381463435},{x:.18029822995654404,y:.527756799180932},{x:.17822344394147954,y:.5259936496360635},{x:.17602181748454487,y:.5243916901265875},{x:.137041,y:.4897030201456747},{x:.137041,y:.7597659999999999},{x:.13617633761814535,y:.7685450644907257},{x:.1336155789630079,y:.776986754456429},{x:.12945713255361452,y:.7847666604858821},{x:.12386080515339463,y:.7915858051533946},{x:.11704166048588208,y:.7971821325536145},{x:.10926175445642904,y:.8013405789630078},{x:.10082006449072577,y:.8039013376181453},{x:.092041,y:.804766},{x:.08326193550927423,y:.8039013376181453},{x:.07482024554357093,y:.8013405789630078},{x:.06704033951411792,y:.7971821325536145},{x:.06022119484660536,y:.7915858051533946},{x:.05462486744638546,y:.7847666604858821},{x:.050466421036992094,y:.776986754456429},{x:.04790566238185463,y:.7685450644907257},{x:.047041,y:.7597659999999999},{x:.047041,y:.05318299999999998}]],i:[[{x:.216026,y:.7597659999999999},{x:.21689066238185462,y:.7509869355092742},{x:.21945142103699208,y:.7425452455435709},{x:.22360986744638545,y:.7347653395141178},{x:.22920619484660534,y:.7279461948466053},{x:.2360253395141179,y:.7223498674463854},{x:.24380524554357094,y:.7181914210369921},{x:.25224693550927424,y:.7156306623818546},{x:.261026,y:.7147659999999999},{x:.341026,y:.7147659999999999},{x:.3498050644907258,y:.7156306623818546},{x:.35824675445642906,y:.7181914210369921},{x:.3660266604858821,y:.7223498674463854},{x:.3728458051533946,y:.7279461948466053},{x:.37844213255361453,y:.7347653395141178},{x:.3826005789630079,y:.7425452455435709},{x:.38516133761814536,y:.7509869355092742},{x:.386026,y:.7597659999999999},{x:.38516133761814536,y:.7685450644907257},{x:.3826005789630079,y:.776986754456429},{x:.37844213255361453,y:.7847666604858821},{x:.3728458051533946,y:.7915858051533946},{x:.3660266604858821,y:.7971821325536145},{x:.35824675445642906,y:.8013405789630078},{x:.3498050644907258,y:.8039013376181453},{x:.341026,y:.804766},{x:.261026,y:.804766},{x:.25224693550927424,y:.8039013376181453},{x:.24380524554357094,y:.8013405789630078},{x:.2360253395141179,y:.7971821325536145},{x:.22920619484660534,y:.7915858051533946},{x:.22360986744638545,y:.7847666604858821},{x:.21945142103699208,y:.776986754456429},{x:.21689066238185462,y:.7685450644907257},{x:.216026,y:.7597659999999999}],[{x:.25597800000000004,y:.05318299999999998},{x:.25684266238185466,y:.04440393550927419},{x:.2594034210369921,y:.03596224554357094},{x:.2635618674463855,y:.028182339514117884},{x:.2691581948466054,y:.021363194846605343},{x:.27597733951411796,y:.01576686744638544},{x:.28375724554357096,y:.011608421036992077},{x:.2921989355092742,y:.009047662381854615},{x:.300978,y:.008182999999999982},{x:.3097570644907258,y:.009047662381854615},{x:.3181987544564291,y:.011608421036992077},{x:.32597866048588214,y:.015766867446385446},{x:.33279780515339463,y:.021363194846605343},{x:.33839413255361456,y:.028182339514117884},{x:.34255257896300795,y:.03596224554357094},{x:.3451133376181454,y:.04440393550927421},{x:.345978,y:.05318299999999998},{x:.345978,y:.523911},{x:.3451133376181454,y:.5326900644907258},{x:.34255257896300795,y:.541131754456429},{x:.33839413255361456,y:.5489116604858821},{x:.33279780515339463,y:.5557308051533947},{x:.32597866048588214,y:.5613271325536145},{x:.3181987544564291,y:.5654855789630079},{x:.3097570644907258,y:.5680463376181454},{x:.300978,y:.5689110000000001},{x:.2921989355092742,y:.5680463376181454},{x:.28375724554357096,y:.5654855789630079},{x:.27597733951411796,y:.5613271325536145},{x:.2691581948466054,y:.5557308051533947},{x:.2635618674463855,y:.5489116604858821},{x:.2594034210369921,y:.541131754456429},{x:.25684266238185466,y:.5326900644907258},{x:.25597800000000004,y:.523911},{x:.25597800000000004,y:.05318299999999998}]],j:[[{x:.11017199870220953,y:-.1121580749666587},{x:.11173080987432929,y:-.12084080046598154},{x:.114953584640513,y:-.12905258085596802},{x:.11971647357384912,y:-.1364778420214504},{x:.12583644152368842,y:-.14283123533997366},{x:.1330783015538362,y:-.147868603469331},{x:.14116375304461573,y:-.15139636317729976},{x:.23896575304461573,y:-.18307436317729964},{x:.2424293887998465,y:-.18383095770413346},{x:.24586120600074532,y:-.1847208108507566},{x:.24673197042105502,y:-.1847708110651418},{x:.2475840766296098,y:-.18495694463669302},{x:.2511287638648936,y:-.18502327959701073},{x:.25466824139749206,y:-.18522652014211538},{x:.25553202888155596,y:-.18510568190524296},{x:.2564040749666586,y:-.1851220012977904},{x:.25989359333942796,y:-.1844955274762681},{x:.2634047110671092,y:-.18400434499968443},{x:.3944597110671092,y:-.15232634499968456},{x:.39510744613291976,y:-.15210060706564532},{x:.39578357398914765,y:-.1519849807175323},{x:.3992672661785621,y:-.15065089524264363},{x:.4027898773796621,y:-.14942325292878383},{x:.40338112711156726,y:-.1490754856432793},{x:.40402170577913904,y:-.1488301750218278},{x:.4071781926350792,y:-.14684208899421944},{x:.4103936167153703,y:-.14495080812962524},{x:.41090565971774945,y:-.14449437599440731},{x:.41148607211771127,y:-.14412880824922783},{x:.41419405162048195,y:-.14156312270000898},{x:.41697872163578864,y:-.1390808841476645},{x:.4173918803832174,y:-.13853332759371953},{x:.41788982159253774,y:-.13806155128824654},{x:.42004522760849955,y:-.13501686407422092},{x:.422292130251795,y:-.13203905886963707},{x:.4225905272853119,y:-.13142142018825975},{x:.42298686170256505,y:-.13086156542133753},{x:.4245068631872901,y:-.12745488216466036},{x:.4261296512500701,y:-.1240959456918764},{x:.4263018193390199,y:-.1234319603912164},{x:.42658131605481786,y:-.12280554206756752},{x:.4588533160548179,y:-.025908542067567514},{x:.4594769463166796,y:-.023162642495487502},{x:.46029433761814537,y:-.02046806449072583},{x:.46045163429328767,y:-.01887100454660151},{x:.46080705178433234,y:-.017306069686551954},{x:.4608830007338393,y:-.01449126757618431},{x:.461159,y:-.01168900000000006},{x:.461159,y:.534292},{x:.46029433761814537,y:.5430710644907257},{x:.4577335789630079,y:.551512754456429},{x:.45357513255361454,y:.5592926604858821},{x:.4479788051533946,y:.5661118051533947},{x:.4411596604858821,y:.5717081325536145},{x:.43337975445642907,y:.5758665789630079},{x:.4249380644907258,y:.5784273376181454},{x:.416159,y:.579292},{x:.4073799355092742,y:.5784273376181454},{x:.39893824554357094,y:.5758665789630079},{x:.39115833951411794,y:.5717081325536145},{x:.3843391948466054,y:.5661118051533947},{x:.37874286744638547,y:.5592926604858821},{x:.3745844210369921,y:.551512754456429},{x:.37202366238185464,y:.5430710644907257},{x:.371159,y:.534292},{x:.371159,y:-.004392296840350002},{x:.3490732119536395,y:-.07070509444595838},{x:.254610065464387,y:-.09353828321774525},{x:.16889624695538427,y:-.06577563682270039},{x:.16027792337039018,y:-.063893055363307},{x:.15145792503334138,y:-.0637279987022096},{x:.14277519953401854,y:-.06528680987432936},{x:.13456341914403205,y:-.06850958464051307},{x:.12713815797854966,y:-.0732724735738492},{x:.12078476466002638,y:-.07939244152368852},{x:.11574739653066908,y:-.08663430155383627},{x:.11221963682270032,y:-.0947197530446158},{x:.11033705536330693,y:-.10333807662960988},{x:.11017199870220953,y:-.1121580749666587}],[{x:.3403,y:.7597659999999999},{x:.3411646623818546,y:.7509869355092742},{x:.34372542103699205,y:.7425452455435709},{x:.34788386744638544,y:.7347653395141178},{x:.3534801948466053,y:.7279461948466053},{x:.3602993395141179,y:.7223498674463854},{x:.36807924554357097,y:.7181914210369921},{x:.37652093550927423,y:.7156306623818546},{x:.3853,y:.7147659999999999},{x:.447023,y:.7147659999999999},{x:.4558020644907258,y:.7156306623818546},{x:.46424375445642907,y:.7181914210369921},{x:.4720236604858821,y:.7223498674463854},{x:.4788428051533946,y:.7279461948466053},{x:.48443913255361454,y:.7347653395141178},{x:.48859757896300793,y:.7425452455435709},{x:.49115833761814537,y:.7509869355092742},{x:.492023,y:.7597659999999999},{x:.49115833761814537,y:.7685450644907257},{x:.48859757896300793,y:.776986754456429},{x:.48443913255361454,y:.7847666604858821},{x:.4788428051533946,y:.7915858051533946},{x:.4720236604858821,y:.7971821325536145},{x:.46424375445642907,y:.8013405789630078},{x:.4558020644907258,y:.8039013376181453},{x:.447023,y:.804766},{x:.3853,y:.804766},{x:.37652093550927423,y:.8039013376181453},{x:.36807924554357097,y:.8013405789630078},{x:.3602993395141179,y:.7971821325536145},{x:.3534801948466053,y:.7915858051533946},{x:.34788386744638544,y:.7847666604858821},{x:.34372542103699205,y:.776986754456429},{x:.3411646623818546,y:.7685450644907257},{x:.3403,y:.7597659999999999}]],k:[[{x:.020185999999999996,y:.05318299999999998},{x:.02105066238185463,y:.04440393550927419},{x:.02361142103699209,y:.03596224554357094},{x:.027769867446385453,y:.028182339514117884},{x:.03336619484660536,y:.021363194846605343},{x:.04018533951411791,y:.01576686744638544},{x:.047965245543570956,y:.011608421036992077},{x:.056406935509274225,y:.009047662381854615},{x:.065186,y:.008182999999999982},{x:.07396506449072576,y:.009047662381854615},{x:.08240675445642903,y:.011608421036992077},{x:.0901866604858821,y:.015766867446385446},{x:.09700580515339463,y:.021363194846605343},{x:.10260213255361453,y:.028182339514117884},{x:.10676057896300789,y:.03596224554357094},{x:.10932133761814536,y:.04440393550927421},{x:.11018599999999999,y:.05318299999999998},{x:.11018599999999999,y:.16578332733911408},{x:.23477705990096162,y:.26351643594805596},{x:.5068321321577423,y:.019673199736523116},{x:.5139466814455551,y:.014457569113271652},{x:.5219420457215526,y:.010730135081525344},{x:.5305109676204599,y:.008634140840755075},{x:.539324148279209,y:.008250134274186548},{x:.5480429021075728,y:.009592872538819623},{x:.5563321722854605,y:.012610754956160736},{x:.5638734068086124,y:.017187805997359452},{x:.5703768002634768,y:.02314813215774228},{x:.5755924308867283,y:.030262681445555134},{x:.5793198649184746,y:.03825804572155257},{x:.5814158591592449,y:.04682696762045996},{x:.5817998657258134,y:.05564014827920904},{x:.5804571274611804,y:.06435890210757275},{x:.5774392450438393,y:.07264817228546054},{x:.5728621940026405,y:.08018940680861247},{x:.5669018678422577,y:.08669280026347684},{x:.3066862956724008,y:.3199242805817128},{x:.5215978711622948,y:.4885076152557163},{x:.5279716470169837,y:.49460635247919954},{x:.533033147947031,y:.5018313661609891},{x:.5365878633102175,y:.5099050030771282},{x:.5384991873886431,y:.5185169978886772},{x:.5386936690698568,y:.5273363964646907},{x:.5371638345319164,y:.5360242742638681},{x:.5339684744581735,y:.5442467610146052},{x:.5292303847442837,y:.5516878711622948},{x:.5231316475208004,y:.5580616470169838},{x:.5159066338390108,y:.5631231479470311},{x:.5078329969228718,y:.5666778633102175},{x:.4992210021113228,y:.5685891873886431},{x:.49040160353530926,y:.5687836690698569},{x:.4817137257361318,y:.5672538345319164},{x:.47349123898539475,y:.5640584744581736},{x:.46605012883770514,y:.5593203847442837},{x:.11018599999999999,y:.28016947631338524},{x:.11018599999999999,y:.7597659999999999},{x:.10932133761814536,y:.7685450644907257},{x:.10676057896300789,y:.776986754456429},{x:.10260213255361453,y:.7847666604858821},{x:.09700580515339463,y:.7915858051533946},{x:.09018666048588207,y:.7971821325536145},{x:.08240675445642903,y:.8013405789630078},{x:.07396506449072576,y:.8039013376181453},{x:.065186,y:.804766},{x:.056406935509274204,y:.8039013376181453},{x:.04796524554357093,y:.8013405789630078},{x:.04018533951411791,y:.7971821325536145},{x:.03336619484660536,y:.7915858051533946},{x:.027769867446385453,y:.7847666604858821},{x:.02361142103699209,y:.776986754456429},{x:.02105066238185463,y:.7685450644907257},{x:.020185999999999996,y:.7597659999999999},{x:.020185999999999996,y:.05318299999999998}]],l:[[{x:.25602600000000003,y:.05355900000000002},{x:.25689066238185465,y:.044779935509274234},{x:.2594514210369921,y:.036338245543570985},{x:.2636098674463855,y:.028558339514117927},{x:.26920619484660535,y:.021739194846605386},{x:.27602533951411795,y:.016142867446385482},{x:.283805245543571,y:.01198442103699212},{x:.2922469355092743,y:.009423662381854658},{x:.301026,y:.008559000000000025},{x:.3098050644907258,y:.009423662381854658},{x:.3182467544564291,y:.01198442103699212},{x:.32602666048588214,y:.01614286744638549},{x:.3328458051533947,y:.021739194846605386},{x:.33844213255361455,y:.028558339514117927},{x:.34260057896300794,y:.036338245543570985},{x:.3451613376181454,y:.044779935509274255},{x:.346026,y:.05355900000000002},{x:.346026,y:.765137},{x:.3451613376181454,y:.7739160644907257},{x:.34260057896300794,y:.782357754456429},{x:.33844213255361455,y:.7901376604858821},{x:.3328458051533947,y:.7969568051533946},{x:.32602666048588214,y:.8025531325536145},{x:.3182467544564291,y:.8067115789630078},{x:.3098050644907258,y:.8092723376181453},{x:.301026,y:.810137},{x:.2922469355092743,y:.8092723376181453},{x:.283805245543571,y:.8067115789630078},{x:.27602533951411795,y:.8025531325536145},{x:.26920619484660535,y:.7969568051533946},{x:.2636098674463855,y:.7901376604858821},{x:.2594514210369921,y:.782357754456429},{x:.25689066238185465,y:.7739160644907257},{x:.25602600000000003,y:.765137},{x:.25602600000000003,y:.05355900000000002}]],m:[[{x:.005538000000000001,y:.03920400000000002},{x:.006402662381854635,y:.030424935509274227},{x:.008963421036992096,y:.02198324554357097},{x:.013121867446385459,y:.01420333951411792},{x:.018718194846605363,y:.00738419484660538},{x:.025537339514117914,y:.0017878674463854757},{x:.03331724554357096,y:-.002370578963007887},{x:.04175893550927423,y:-.004931337618145348},{x:.050538,y:-.005795999999999982},{x:.059317064490725775,y:-.004931337618145348},{x:.06775875445642904,y:-.002370578963007887},{x:.0755386604858821,y:.0017878674463854827},{x:.08235780515339464,y:.00738419484660538},{x:.08795413255361453,y:.01420333951411792},{x:.0921125789630079,y:.02198324554357098},{x:.09467333761814536,y:.030424935509274248},{x:.095538,y:.03920400000000002},{x:.095538,y:.3993271266071161},{x:.14963521853994496,y:.4943223065353007},{x:.1738257653562211,y:.5150589999999999},{x:.22021623464377893,y:.5150589999999999},{x:.2416666625786254,y:.49667119950297894},{x:.27741,y:.4029520066676719},{x:.27741,y:.03920400000000002},{x:.2782746623818546,y:.030424935509274227},{x:.28083542103699205,y:.02198324554357097},{x:.28499386744638544,y:.01420333951411792},{x:.2905901948466053,y:.00738419484660538},{x:.2974093395141179,y:.0017878674463854757},{x:.30518924554357096,y:-.002370578963007887},{x:.31363093550927423,y:-.004931337618145348},{x:.32241,y:-.005795999999999982},{x:.33118906449072577,y:-.004931337618145348},{x:.33963075445642904,y:-.002370578963007887},{x:.3474106604858821,y:.0017878674463854827},{x:.35422980515339464,y:.00738419484660538},{x:.3598261325536145,y:.01420333951411792},{x:.3639845789630079,y:.02198324554357098},{x:.36654533761814534,y:.030424935509274248},{x:.36740999999999996,y:.03920400000000002},{x:.36740999999999996,y:.3993264781598986},{x:.4215891088917321,y:.494459500052724},{x:.445289826307752,y:.5150589999999999},{x:.4920928256254945,y:.5150589999999999},{x:.5065149999999999,y:.5026965582556255},{x:.5065149999999999,y:.03920400000000002},{x:.5073796623818546,y:.030424935509274227},{x:.5099404210369921,y:.02198324554357097},{x:.5140988674463854,y:.01420333951411792},{x:.5196951948466053,y:.00738419484660538},{x:.5265143395141179,y:.0017878674463854757},{x:.534294245543571,y:-.002370578963007887},{x:.5427359355092742,y:-.004931337618145348},{x:.551515,y:-.005795999999999982},{x:.5602940644907257,y:-.004931337618145348},{x:.568735754456429,y:-.002370578963007887},{x:.5765156604858821,y:.0017878674463854827},{x:.5833348051533946,y:.00738419484660538},{x:.5889311325536145,y:.01420333951411792},{x:.5930895789630078,y:.02198324554357098},{x:.5956503376181453,y:.030424935509274248},{x:.596515,y:.03920400000000002},{x:.596515,y:.523393},{x:.5963454778388272,y:.5251141873868636},{x:.5963825315707437,y:.5268433058919912},{x:.5959141404350922,y:.5294936295415332},{x:.5956503376181453,y:.5321720644907257},{x:.5951482857762117,y:.5338271076115645},{x:.59484729324509,y:.5355302304139588},{x:.5938708496195351,y:.5380382502602514},{x:.5930895789630078,y:.540613754456429},{x:.592274291011045,y:.5421390509322689},{x:.5916468191910574,y:.543750727977755},{x:.5901998472565338,y:.5460200622246176},{x:.5889311325536145,y:.5483936604858821},{x:.5878339395503975,y:.5497305940285525},{x:.5869041018316961,y:.5511888894721116},{x:.5850422079081763,y:.5531323288770946},{x:.5833348051533946,y:.5552128051533947},{x:.581997871610724,y:.5563099981566119},{x:.5808014011353795,y:.5575588705221693},{x:.5380264011353795,y:.5942248705221693},{x:.5358211367621821,y:.5957677297988329},{x:.5337406604858821,y:.5974751325536145},{x:.5322153640100423,y:.5982904205055773},{x:.5307982404674333,y:.599281876328501},{x:.5283343527176928,y:.600364864260089},{x:.525960754456429,y:.6016335789630078},{x:.5243057113355902,y:.6021356308049415},{x:.5227223939887274,y:.6028315689939708},{x:.5200945686869033,y:.6034130669616181},{x:.5175190644907257,y:.6041943376181453},{x:.5157978771038628,y:.6043638597793182},{x:.5141092119504517,y:.6047375358201355},{x:.5114184349491921,y:.6047951971830532},{x:.50874,y:.605059},{x:.428467,y:.605059},{x:.42563553135621585,y:.6047801246797119},{x:.42279150043448566,y:.6046996620098968},{x:.4212557149999115,y:.6043487504203328},{x:.4196879355092742,y:.6041943376181453},{x:.41696527861756566,y:.6033684286794448},{x:.4141915924406847,y:.6027346691689239},{x:.4127537761476033,y:.6020908833721776},{x:.4112462455435709,y:.6016335789630078},{x:.40873703058140176,y:.6002923756232341},{x:.4061402803536474,y:.5991296742945802},{x:.40485568767586616,y:.5982177546177817},{x:.4034663395141179,y:.5974751325536145},{x:.4012669942053008,y:.5956701765049598},{x:.3989469715816508,y:.5940232153181825},{x:.3567609715816508,y:.5573572153181825},{x:.3545792701559384,y:.5550484712393128},{x:.3522737143614353,y:.552863400803129},{x:.35155574109793963,y:.5518488790642903},{x:.35070210094674875,y:.5509455305944583},{x:.3490127339279754,y:.5482555195520005},{x:.34717776483660073,y:.5456626430091704},{x:.33048446785976626,y:.5163509060824124},{x:.3216828574856715,y:.5394287684036221},{x:.32062739498214626,y:.5415455848316745},{x:.31976928952310246,y:.5437498007710907},{x:.3186639603788477,y:.5454834136126945},{x:.31774653490223986,y:.5473233854865517},{x:.3162983824161672,y:.5491936173608123},{x:.31502674401548947,y:.5511880718386934},{x:.3136044423732838,y:.5526727347769701},{x:.3123456842645886,y:.5542983712755478},{x:.3105604934838748,y:.5558501466339272},{x:.30892419049215825,y:.5575581938831911},{x:.2661511904921582,y:.594224193883191},{x:.26394553725639397,y:.5957674011217274},{x:.2618646604858821,y:.5974751325536145},{x:.26033982189406285,y:.5982901757614695},{x:.258923146662659,y:.5992813666868191},{x:.25645880963824363,y:.6003646200309664},{x:.25408475445642903,y:.6016335789630078},{x:.25243020816870526,y:.6021354800922637},{x:.25084738219782576,y:.6028312459348294},{x:.24821906447459133,y:.6034129165660671},{x:.24564306449072576,y:.6041943376181453},{x:.24392239379305308,y:.6043638088898747},{x:.2422342441971012,y:.6047374117585159},{x:.2395429505511757,y:.6047951464006902},{x:.236864,y:.605059},{x:.157178,y:.605059},{x:.1544990494488241,y:.6047951464006902},{x:.1518077558028988,y:.6047374117585159},{x:.15011960620694695,y:.6043638088898747},{x:.14839893550927424,y:.6041943376181453},{x:.14582293552540848,y:.6034129165660671},{x:.1431946178021742,y:.6028312459348294},{x:.1416117918312948,y:.6021354800922637},{x:.13995724554357097,y:.6016335789630078},{x:.13758319036175665,y:.6003646200309664},{x:.135118853337341,y:.5992813666868191},{x:.13370217810593676,y:.5982901757614691},{x:.13217733951411792,y:.5974751325536145},{x:.13009646274360603,y:.5957674011217274},{x:.1278908095078418,y:.594224193883191},{x:.09495385911112918,y:.5659898819750746},{x:.09467333761814536,y:.5688380644907257},{x:.0921125789630079,y:.577279754456429},{x:.08795413255361453,y:.5850596604858821},{x:.08235780515339464,y:.5918788051533946},{x:.07553866048588208,y:.5974751325536145},{x:.06775875445642904,y:.6016335789630078},{x:.059317064490725775,y:.6041943376181453},{x:.050538,y:.605059},{x:.04175893550927421,y:.6041943376181453},{x:.033317245543570934,y:.6016335789630078},{x:.025537339514117904,y:.5974751325536145},{x:.018718194846605356,y:.5918788051533946},{x:.013121867446385459,y:.5850596604858821},{x:.008963421036992096,y:.577279754456429},{x:.006402662381854635,y:.5688380644907257},{x:.005538000000000001,y:.560059},{x:.005538000000000001,y:.03920400000000002}]],n:[[{x:.047041,y:.03920400000000002},{x:.04790566238185463,y:.030424935509274227},{x:.050466421036992094,y:.02198324554357097},{x:.05462486744638546,y:.01420333951411792},{x:.06022119484660536,y:.00738419484660538},{x:.06704033951411792,y:.0017878674463854757},{x:.07482024554357096,y:-.002370578963007887},{x:.08326193550927423,y:-.004931337618145348},{x:.092041,y:-.005795999999999982},{x:.10082006449072577,y:-.004931337618145348},{x:.10926175445642904,y:-.002370578963007887},{x:.1170416604858821,y:.0017878674463854827},{x:.12386080515339463,y:.00738419484660538},{x:.12945713255361452,y:.01420333951411792},{x:.1336155789630079,y:.02198324554357098},{x:.13617633761814535,y:.030424935509274248},{x:.137041,y:.03920400000000002},{x:.137041,y:.3923986904044417},{x:.23217657812189968,y:.4860775193429304},{x:.29246969284729285,y:.5150589999999999},{x:.3857956927587408,y:.5150589999999999},{x:.4353266752666751,y:.4910865745843881},{x:.465011,y:.4037995608673687},{x:.465011,y:.03920400000000002},{x:.4658756623818546,y:.030424935509274227},{x:.46843642103699207,y:.02198324554357097},{x:.47259486744638546,y:.01420333951411792},{x:.4781911948466053,y:.00738419484660538},{x:.4850103395141179,y:.0017878674463854757},{x:.492790245543571,y:-.002370578963007887},{x:.5012319355092743,y:-.004931337618145348},{x:.510011,y:-.005795999999999982},{x:.5187900644907257,y:-.004931337618145348},{x:.527231754456429,y:-.002370578963007887},{x:.5350116604858821,y:.0017878674463854827},{x:.5418308051533947,y:.00738419484660538},{x:.5474271325536145,y:.01420333951411792},{x:.5515855789630079,y:.02198324554357098},{x:.5541463376181454,y:.030424935509274248},{x:.555011,y:.03920400000000002},{x:.555011,y:.411242},{x:.5547211401667089,y:.41418499627592825},{x:.5546227314347089,y:.4171405946120584},{x:.5542897326303223,y:.4185651504993601},{x:.5541463376181454,y:.4200210644907258},{x:.5532878972691104,y:.42285096307022063},{x:.5526147708021555,y:.4257305718218671},{x:.5144747708021555,y:.537881571821867},{x:.5144109474804813,y:.5380222238814931},{x:.5143747633675698,y:.5381723808934484},{x:.5125889395552703,y:.5420375142269895},{x:.5108295711501452,y:.5459147613418461},{x:.5107395343200961,y:.546040259499208},{x:.5106747512949527,y:.5461804721160435},{x:.5081691914797779,y:.5496229410537735},{x:.5056872154570532,y:.5530824522038071},{x:.5055744251835149,y:.5531879736350976},{x:.505483532821465,y:.5533128535645805},{x:.5023545242619802,y:.5562003659557777},{x:.4992453215682988,y:.5591091940676126},{x:.49911411231822944,y:.5591906836434047},{x:.49900060356177384,y:.559295431819878},{x:.49536839230215873,y:.5615170221826804},{x:.49175144785337105,y:.5637633826232722},{x:.4916068619246677,y:.563817708744868},{x:.49147509885166074,y:.5638982997546532},{x:.41571709885166075,y:.6005642997546532},{x:.4144883994140345,y:.6010164083750983},{x:.41333375445642906,y:.6016335789630078},{x:.41035728417594536,y:.6025364813514484},{x:.4074382196167836,y:.6036105717354909},{x:.4061449272779714,y:.6038142858466193},{x:.4048920644907258,y:.6041943376181453},{x:.4017966387343604,y:.6044992104448776},{x:.3987241185432898,y:.6049831812385367},{x:.3974159338025849,y:.6049306722213019},{x:.396113,y:.605059},{x:.282216,y:.605059},{x:.28097323419788345,y:.6049365982521052},{x:.2797255990169867,y:.6049900349640848},{x:.2765922846246742,y:.6045051123806029},{x:.2734369355092743,y:.6041943376181453},{x:.2722419284999821,y:.603831836204989},{x:.27100784129389754,y:.6036408445963318},{x:.26802933636200627,y:.6025539603505436},{x:.264995245543571,y:.6016335789630078},{x:.2638939207763026,y:.6010449086106044},{x:.2627208068242762,y:.6006168283817219},{x:.18644080682427616,y:.563950828381722},{x:.18387931815291048,y:.5623935720684188},{x:.18122474955630472,y:.5610008994562176},{x:.18011833133270075,y:.5601070811947741},{x:.17890296169536754,y:.5593681975674947},{x:.17669449694619624,y:.5573411418478543},{x:.17436263208920222,y:.5554573484070612},{x:.137041,y:.5187071981771466},{x:.137041,y:.560059},{x:.13617633761814535,y:.5688380644907257},{x:.1336155789630079,y:.577279754456429},{x:.12945713255361452,y:.5850596604858821},{x:.12386080515339463,y:.5918788051533946},{x:.11704166048588208,y:.5974751325536145},{x:.10926175445642904,y:.6016335789630078},{x:.10082006449072577,y:.6041943376181453},{x:.092041,y:.605059},{x:.08326193550927423,y:.6041943376181453},{x:.07482024554357093,y:.6016335789630078},{x:.06704033951411792,y:.5974751325536145},{x:.06022119484660536,y:.5918788051533946},{x:.05462486744638546,y:.5850596604858821},{x:.050466421036992094,y:.577279754456429},{x:.04790566238185463,y:.5688380644907257},{x:.047041,y:.560059},{x:.047041,y:.03920400000000002}]],o:[[{x:.021894999999999998,y:.25490100000000004},{x:.022142430975592695,y:.2523887911456351},{x:.02217771682540861,y:.24986467341374632},{x:.02257373987793045,y:.24800963837050735},{x:.02275966238185463,y:.24612193550927428},{x:.023492446675001572,y:.24370626943231966},{x:.02401948545822835,y:.2412375358426815},{x:.060310485458228355,y:.12735753584268142},{x:.06080304558444478,y:.12621387418764726},{x:.061129830312657105,y:.12501229639135567},{x:.06254436541764224,y:.12217075210694647},{x:.06379993607002282,y:.11925547753662338},{x:.06450614911208748,y:.11822988473324028},{x:.0650610709625847,y:.11711514745523491},{x:.06700278396163635,y:.114604164756607},{x:.06880297103068717,y:.11198985605258731},{x:.06969569761744246,y:.11112174505713},{x:.07045743125471368,y:.1101366870258529},{x:.14244943125471368,y:.0338456870258529},{x:.144568728324263,y:.03200109409682955},{x:.1465508815997487,y:.0300098604251366},{x:.14788834203377002,y:.029111770054614114},{x:.1491035320893312,y:.02805409342394511},{x:.1515419696884587,y:.026658398178569347},{x:.15387450686277807,y:.025092124424329433},{x:.22587150686277807,y:-.01360287557567049},{x:.22795933917571506,y:-.014473279294209745},{x:.22995424554357097,y:-.015539578963007873},{x:.23202067225559728,y:-.016166422653018674},{x:.2340138134199343,y:-.01699735024728135},{x:.23623133596214702,y:-.01744371352418634},{x:.23839593550927424,y:-.018100337618145335},{x:.2405449475487996,y:-.01831199682974963},{x:.24266189699648397,y:-.01873811583170923},{x:.2449238916202761,y:-.018743285176571887},{x:.247175,y:-.018964999999999968},{x:.354874,y:-.018964999999999968},{x:.35712497901801044,y:-.018743297917588594},{x:.3593868436844028,y:-.018738141970160445},{x:.36150392306047363,y:-.018312009573623896},{x:.3636530644907258,y:-.018100337618145335},{x:.36581753964743763,y:-.017443751257606326},{x:.36803493734305537,y:-.016997426474138877},{x:.370028203326089,y:-.016166460394901543},{x:.3720947544564291,y:-.015539578963007873},{x:.3740895461854217,y:-.014473340569958804},{x:.376177263560353,y:-.01360299896157894},{x:.448175263560353,y:.025092001038420984},{x:.4505076595021602,y:.026658160356610353},{x:.4529459593263057,y:.028053731854915283},{x:.45416130097157975,y:.029111510806286087},{x:.45549891730603415,y:.030009694621828502},{x:.4574809543881169,y:.03200078850323144},{x:.4596001404718476,y:.03384523318438343},{x:.5315941404718476,y:.11013623318438343},{x:.5323560786638525,y:.11112152750713142},{x:.5332490289693128,y:.11198985605258731},{x:.5350490398057314,y:.11460390882403626},{x:.5369905975332091,y:.11711461878219896},{x:.5375456739097991,y:.11822962771804991},{x:.5382520639299772,y:.11925547753662338},{x:.5395075116659538,y:.12217046671076734},{x:.5409219476918898,y:.12501171320336152},{x:.5412488309792026,y:.126213587584214},{x:.5417415145417717,y:.12735753584268142},{x:.5780325145417716,y:.2412375358426815},{x:.5785595533249983,y:.2437062694323195},{x:.5792923376181454,y:.24612193550927428},{x:.5794782601220696,y:.2480096383705079},{x:.5798742831745913,y:.24986467341374632},{x:.5799095690244073,y:.25238879114563434},{x:.580157,y:.25490100000000004},{x:.580157,y:.33119200000000004},{x:.5799156873690254,y:.3336420882589673},{x:.5798881240960263,y:.3361038771468651},{x:.5794843860383102,y:.3380211641581212},{x:.5792923376181454,y:.33997106449072584},{x:.5785776732343003,y:.3423269972319261},{x:.5780703683949873,y:.3447361062088315},{x:.5417793683949873,y:.4597211062088315},{x:.5412650895934552,y:.4609244011905288},{x:.540921633437906,y:.46218711230867804},{x:.5395351283421765,y:.46497211555478546},{x:.5383124760126231,y:.46783284286481475},{x:.5375733277285976,y:.46891268605384906},{x:.5369901282681178,y:.47008412955994733},{x:.5350869372989228,y:.47254512602400234},{x:.5333296776789325,y:.47511235762423976},{x:.5323940649664491,y:.4760272512524403},{x:.5315935342292432,y:.47706240922950055},{x:.45959953422924316,y:.5533504092295005},{x:.4572787448447235,y:.5553702403350376},{x:.45508230823461715,y:.5575246421731296},{x:.45395838697349994,y:.5582600166131206},{x:.4529452394037514,y:.5591417799431011},{x:.45027499383570063,y:.5606700370119551},{x:.44770045819082444,y:.5623545390972755},{x:.3757024581908245,y:.5999485390972755},{x:.37385313535723513,y:.6006937047902838},{x:.3720947544564291,y:.6016335789630078},{x:.36977177563531344,y:.6023382468844833},{x:.3675201821794923,y:.6032455034042244},{x:.36556101895058973,y:.6036155659602718},{x:.3636530644907258,y:.6041943376181453},{x:.36123724716457173,y:.6044322748568528},{x:.35885192047906295,y:.6048828346046191},{x:.35685820639902277,y:.60486357272721},{x:.354874,y:.605059},{x:.247175,y:.605059},{x:.24519066624232813,y:.6048635601834779},{x:.24319682408363533,y:.6048828119349353},{x:.24081162559758007,y:.6044322623250186},{x:.23839593550927424,y:.6041943376181453},{x:.23648785858508298,y:.6036155288111242},{x:.234528571713998,y:.6032454313367869},{x:.23227710201651716,y:.602338209770572},{x:.22995424554357097,y:.6016335789630078},{x:.2281957517789948,y:.6006936444633418},{x:.22634631449119302,y:.5999484204015954},{x:.15434931449119302,y:.5623544204015953},{x:.15177463525955168,y:.5606698034147719},{x:.14910425200363037,y:.5591414183832311},{x:.14809125527340347,y:.55825976164439},{x:.1469674919716301,y:.5575244814106152},{x:.14477093694990967,y:.5553699388664325},{x:.14245003748743465,y:.5533499553954043},{x:.07045803748743465,y:.4770619553954044},{x:.06965771196430402,y:.47602703312304784},{x:.06872232232106745,y:.47511235762423976},{x:.06696488716695402,y:.4725448695811053},{x:.06506154021654398,y:.4700836008922148},{x:.0644784960433022,y:.46891242859710086},{x:.06373952398737684,y:.46783284286481475},{x:.06251674952606694,y:.46497182979435886},{x:.06113014455468816,y:.46218652912371366},{x:.06078678779193787,y:.46092411430034236},{x:.06027263160501272,y:.4597211062088315},{x:.023981631605012717,y:.3447361062088315},{x:.0234743267656997,y:.3423269972319261},{x:.02275966238185463,y:.33997106449072584},{x:.0225676139616898,y:.3380211641581212},{x:.022163875903973694,y:.3361038771468651},{x:.022136312630974576,y:.33364208825896713},{x:.021894999999999998,y:.33119200000000004},{x:.021894999999999998,y:.25490100000000004}],[{x:.111895,y:.2618978965790472},{x:.111895,y:.324259211613835},{x:.14299436878278687,y:.42279496206129447},{x:.20271328316555492,y:.48607750096051383},{x:.25821631520114247,y:.5150589999999999},{x:.3438328207386419,y:.5150589999999999},{x:.3993370917152178,y:.4860772565752743},{x:.4590577300605173,y:.42279464888454726},{x:.490157,y:.324259211613835},{x:.490157,y:.2618978965790472},{x:.4591028039244665,y:.16445082019422033},{x:.39914727445977055,y:.10091681321598435},{x:.3435475642149213,y:.07103500000000003},{x:.2585015743575747,y:.07103500000000003},{x:.20290309936793577,y:.10091656436690524},{x:.14294929572583875,y:.164450507494742},{x:.111895,y:.2618978965790472}]],p:[[{x:.031904,y:-.15424400000000005},{x:.032768662381854635,y:-.16302306449072582},{x:.0353294210369921,y:-.17146475445642909},{x:.03948786744638546,y:-.17924466048588214},{x:.04508419484660536,y:-.18606380515339468},{x:.051903339514117915,y:-.19166013255361458},{x:.05968324554357096,y:-.19581857896300794},{x:.06812493550927423,y:-.1983793376181454},{x:.076904,y:-.19924400000000003},{x:.08568306449072577,y:-.1983793376181454},{x:.09412475445642904,y:-.19581857896300794},{x:.1019046604858821,y:-.19166013255361458},{x:.10872380515339464,y:-.18606380515339468},{x:.11432013255361453,y:-.17924466048588214},{x:.1184785789630079,y:-.17146475445642909},{x:.12103933761814537,y:-.16302306449072582},{x:.121904,y:-.15424400000000005},{x:.121904,y:.08461372659928788},{x:.12362832174470662,y:.08333438131496537},{x:.12536021772829115,y:.08178035235824195},{x:.1271620685101291,y:.08071254912256186},{x:.12884414120453105,y:.07946455014784792},{x:.13094744853162613,y:.07846927732892851},{x:.13294924262910485,y:.07728298474798974},{x:.20690724262910487,y:.04275398474798971},{x:.20784573679964677,y:.04242345923251374},{x:.20872324554357097,y:.041954421036992075},{x:.21199903754957586,y:.040960720395783044},{x:.21522783943974558,y:.03982357810698025},{x:.21621278303720604,y:.03968249467654502},{x:.21716493550927424,y:.0393936623818546},{x:.22057164546850772,y:.03905813073713887},{x:.2239602522910248,y:.038572746319036566},{x:.22495379448531613,y:.03862652673075318},{x:.225944,y:.038528999999999966},{x:.338005,y:.038528999999999966},{x:.33886621477794643,y:.03861382225207184},{x:.3397300481447032,y:.038562076501738984},{x:.34324908380057223,y:.0390454971728409},{x:.3467840644907258,y:.0393936623818546},{x:.3476121832677305,y:.039644869466491955},{x:.3484695134136621,y:.03976264352593092},{x:.35182662109175783,y:.04092330520367998},{x:.35522575445642907,y:.04195442103699206},{x:.3559889530923063,y:.042362359206810904},{x:.35680683330070073,y:.04264512708496585},{x:.4318888333007007,y:.07717412708496588},{x:.43400924312431544,y:.07841428389434572},{x:.43622962614931016,y:.07946501028796468},{x:.4378075563324746,y:.08063579029221077},{x:.43950360927818305,y:.0816277549521855},{x:.44134133343031445,y:.08325775393151234},{x:.4433140658676044,y:.08472146615145025},{x:.5183930658676044,y:.1527974661514503},{x:.519792625068414,y:.15434228537837358},{x:.5213447099268285,y:.1557337827706549},{x:.522746916505161,y:.1576032022519019},{x:.5243158963961404,y:.15933502631539204},{x:.52538718417891,y:.1611232027292085},{x:.5266379784876352,y:.1627907596241023},{x:.5276485364111687,y:.16489781566710873},{x:.5288495066792682,y:.16690245600899573},{x:.5295513540552914,y:.16886527099294393},{x:.530452790490496,y:.17074480411415546},{x:.5674347904904959,y:.2723648041141554},{x:.5682868803844835,y:.2756900562357905},{x:.5692833376181453,y:.27897493550927416},{x:.5693799285821196,y:.2799556400244087},{x:.5696245448495124,y:.2809102467717411},{x:.5698115375679212,y:.2843378395980749},{x:.570148,y:.28775399999999995},{x:.570148,y:.355831},{x:.5698183264321395,y:.3591782319067787},{x:.5696454905753794,y:.362537215959393},{x:.5693867528695432,y:.3635600718226051},{x:.5692833376181453,y:.3646100644907258},{x:.5683069860848939,y:.3678286641524751},{x:.567482165940186,y:.37108938766543825},{x:.530500165940186,y:.47369538766543823},{x:.5295747233109523,y:.4756403735939819},{x:.5288495066792682,y:.4776685439910043},{x:.5276841925618525,y:.47961366765708685},{x:.5267099630491849,y:.4816611880905031},{x:.5254228546094585,y:.48338825675926556},{x:.5243158963961404,y:.48523597368460797},{x:.5227934986603558,y:.48691638083844907},{x:.5214385372739072,y:.48873449599152474},{x:.5198392258792078,y:.49017727712011666},{x:.5183930658676044,y:.4917735338485497},{x:.4433140658676044,y:.5598495338485497},{x:.44114571117720175,y:.5614583923016819},{x:.43910641435493325,y:.5632279843609703},{x:.43761161896162687,y:.5640805897495177},{x:.43622962614931016,y:.5651059897120353},{x:.43378906307257026,y:.5662609093863238},{x:.43144372048223223,y:.5675986521566495},{x:.35636172048223225,y:.6011446521566495},{x:.355773047491519,y:.6013410447411239},{x:.35522575445642907,y:.6016335789630078},{x:.3515938477815883,y:.6027353058079922},{x:.3479935881359665,y:.6039364213810477},{x:.34737791203915763,y:.6040141959337602},{x:.3467840644907258,y:.6041943376181453},{x:.34300700763927916,y:.6045663452480041},{x:.3392415999493003,y:.6050420059085138},{x:.33862258083352115,y:.60499817359702},{x:.338005,y:.605059},{x:.225944,y:.605059},{x:.2251997336627212,y:.6049856961639699},{x:.22445344765540867,y:.6050343071552383},{x:.22081614914993766,y:.6045539507735711},{x:.21716493550927424,y:.6041943376181453},{x:.21644927090994795,y:.6039772431353645},{x:.21570784104506457,y:.6038793269025836},{x:.2122341450916469,y:.6026985986973952},{x:.20872324554357097,y:.6016335789630078},{x:.20806368527139987,y:.6012810366527016},{x:.20735560428285457,y:.6010403560617851},{x:.13339760428285458,y:.5674943560617851},{x:.13116986982932302,y:.566206971138138},{x:.12884414120453105,y:.5651064498521521},{x:.1273598902040749,y:.5640052229355318},{x:.12575970914356202,y:.5630804946901414},{x:.12382593632220404,y:.5613832370749092},{x:.121904,y:.5599572734007121},{x:.121904,y:.560059},{x:.12103933761814537,y:.5688380644907257},{x:.1184785789630079,y:.577279754456429},{x:.11432013255361453,y:.5850596604858821},{x:.10872380515339464,y:.5918788051533946},{x:.10190466048588208,y:.5974751325536145},{x:.09412475445642904,y:.6016335789630078},{x:.08568306449072577,y:.6041943376181453},{x:.076904,y:.605059},{x:.0681249355092742,y:.6041943376181453},{x:.059683245543570934,y:.6016335789630078},{x:.051903339514117915,y:.5974751325536145},{x:.04508419484660536,y:.5918788051533946},{x:.03948786744638546,y:.5850596604858821},{x:.0353294210369921,y:.577279754456429},{x:.032768662381854635,y:.5688380644907257},{x:.031904,y:.560059},{x:.031904,y:-.15424400000000005}],[{x:.121904,y:.20607608160839302},{x:.121904,y:.438494918391607},{x:.17699192809119763,y:.48844251958412144},{x:.23567259519301437,y:.5150589999999999},{x:.3284092961747297,y:.5150589999999999},{x:.38817711429028284,y:.4883552464171925},{x:.4496333594179428,y:.43263133769024387},{x:.48014799999999996,y:.3479689286382035},{x:.48014799999999996,y:.29568777567179994},{x:.44968806913177495,y:.21198926897045803},{x:.3879916447872207,y:.1560475837631447},{x:.32815352882369925,y:.12852899999999995},{x:.2359312215606538,y:.12852899999999995},{x:.17717907548697515,y:.15595879598931894},{x:.121904,y:.20607608160839302}]],q:[[{x:.031905,y:.285813},{x:.03224141038262204,y:.2823973680650777},{x:.0324282929389951,y:.2789703010434802},{x:.03267301908894614,y:.2780151713289937},{x:.032769662381854636,y:.2770339355092742},{x:.03376596546737772,y:.2737495643941025},{x:.03461784473664685,y:.27042480648246636},{x:.07159784473664685,y:.1688028064824664},{x:.0724995244823713,y:.166922651750872},{x:.0732016076706368,y:.1649592141085361},{x:.07440224792307432,y:.1629551516523985},{x:.07541246819615938,y:.16084867156853302},{x:.07666362241043057,y:.15918055247485355},{x:.0777352629490018,y:.15739181137154173},{x:.07930380642556048,y:.15566048970702676},{x:.08070556947724908,y:.15379156924569237},{x:.08225811700526783,y:.15239959067120604},{x:.08365813234923056,y:.15085428642438087},{x:.15873913234923054,y:.08277728642438094},{x:.16071062555900373,y:.0813145118522212},{x:.16254708404197357,y:.07968542770293169},{x:.16424441690754124,y:.07869257021816739},{x:.16582360332185575,y:.07752087268448676},{x:.16804258800473576,y:.07647082416071167},{x:.17016157800418052,y:.07523131768336211},{x:.24523757800418056,y:.0406993176833621},{x:.24605678866737324,y:.04041603175027397},{x:.24682124554357093,y:.04000742103699214},{x:.2502190216384501,y:.03897671692697023},{x:.2535747153580455,y:.03781630621794852},{x:.25443345146196317,y:.037698283616711674},{x:.2552629355092742,y:.03744666238185468},{x:.25879650468596477,y:.037098636194782805},{x:.2623141045905799,y:.03661518582049534},{x:.2631793653883337,y:.03666696209348752},{x:.264042,y:.036582000000000045},{x:.376106,y:.036582000000000045},{x:.3770966034546813,y:.036679565924422064},{x:.37809054588497415,y:.03662578154659327},{x:.38147875036256007,y:.037111169723096304},{x:.3848850644907258,y:.03744666238185468},{x:.3858375996101805,y:.03773561075136079},{x:.38682293652697,y:.03787676837406198},{x:.39005134306992567,y:.03901383585544661},{x:.39332675445642906,y:.04000742103699214},{x:.39420461585020444,y:.04047664772778637},{x:.3951434813083616,y:.04080732274273922},{x:.4691044813083616,y:.07533932274273922},{x:.47110618065167786,y:.07652560719175487},{x:.47320939667814427,y:.07752087268448679},{x:.4748915208069018,y:.0787689461703934},{x:.4766934263594154,y:.07983682509171056},{x:.47842523099597173,y:.08139082758714347},{x:.48014799999999996,y:.08266905805748193},{x:.48014799999999996,y:-.15619500000000008},{x:.4810126623818546,y:-.16497406449072585},{x:.483573421036992,y:-.17341575445642912},{x:.4877318674463854,y:-.18119566048588218},{x:.4933281948466053,y:-.18801480515339472},{x:.5001473395141178,y:-.19361113255361462},{x:.5079272455435709,y:-.19776957896300798},{x:.5163689355092742,y:-.20033033761814545},{x:.525148,y:-.20119500000000007},{x:.5339270644907257,y:-.20033033761814545},{x:.542368754456429,y:-.19776957896300798},{x:.5501486604858821,y:-.19361113255361462},{x:.5569678051533946,y:-.18801480515339472},{x:.5625641325536145,y:-.18119566048588218},{x:.5667225789630078,y:-.17341575445642912},{x:.5692833376181453,y:-.16497406449072585},{x:.570148,y:-.15619500000000008},{x:.570148,y:.5581050000000001},{x:.5692833376181453,y:.5668840644907258},{x:.5667225789630078,y:.5753257544564291},{x:.5625641325536145,y:.5831056604858822},{x:.5569678051533946,y:.5899248051533947},{x:.5501486604858821,y:.5955211325536146},{x:.542368754456429,y:.5996795789630079},{x:.5339270644907257,y:.6022403376181454},{x:.525148,y:.6031050000000001},{x:.5163689355092742,y:.6022403376181454},{x:.5079272455435709,y:.5996795789630079},{x:.5001473395141178,y:.5955211325536146},{x:.4933281948466053,y:.5899248051533947},{x:.4877318674463854,y:.5831056604858822},{x:.483573421036992,y:.5753257544564291},{x:.4810126623818546,y:.5668840644907258},{x:.48014799999999996,y:.5581050000000001},{x:.48014799999999996,y:.558005596763998},{x:.4782247267606458,y:.559432223348863},{x:.47629232280480055,y:.5611281889595863},{x:.4746904859851039,y:.5620538174856352},{x:.4732046002880372,y:.5631560030691136},{x:.4708804506539088,y:.5642554633364756},{x:.4686543108210992,y:.5655418481335316},{x:.3946933108210992,y:.5990868481335316},{x:.3939857884552202,y:.5993273179516839},{x:.39332675445642906,y:.5996795789630079},{x:.3898152875083263,y:.6007447708163117},{x:.38634099890642704,y:.6019255978665906},{x:.3856001580501581,y:.6020234163584227},{x:.3848850644907258,y:.6022403376181454},{x:.38123326077373504,y:.6026000088910167},{x:.3775953617236344,y:.6030803465985108},{x:.3768496724756141,y:.6030317546542387},{x:.376106,y:.6031050000000001},{x:.264042,y:.6031050000000001},{x:.26342400033164626,y:.6030441323453897},{x:.26280456058717394,y:.6030879828235033},{x:.25903957642572706,y:.602612304281983},{x:.2552629355092742,y:.6022403376181454},{x:.254668685221597,y:.6020600737641458},{x:.25405259303422617,y:.6019822349683996},{x:.25045275226756825,y:.6007811844842303},{x:.24682124554357093,y:.5996795789630079},{x:.24627358134186672,y:.5993868463484354},{x:.24568451278884912,y:.5991903095800973},{x:.17060851278884911,y:.5656453095800973},{x:.16826609518471405,y:.5643091772352096},{x:.16582839971196278,y:.5631560030691136},{x:.1644435861855132,y:.5621287897998347},{x:.16294590048199914,y:.5612744987855388},{x:.1609091582647261,y:.559507056844315},{x:.15874327554635076,y:.5579004698017108},{x:.08366227554635075,y:.4898404698017108},{x:.0822135909199537,y:.48824184486316324},{x:.08061175169940471,y:.4867967151276658},{x:.07925889408089541,y:.48498133393711457},{x:.07773859373239328,y:.48330368097737925},{x:.0766296214289207,y:.4814531488185024},{x:.0753404919252871,y:.4797232835162987},{x:.07436779238761855,y:.4776788549378484},{x:.07320399804016177,y:.47573684172476444},{x:.07247735524331753,y:.47370551725863386},{x:.07155047598047157,y:.4717573941431678},{x:.034570475980471575,y:.3691493941431678},{x:.03374586128764337,y:.36588916100716024},{x:.032769662381854636,y:.3626710644907258},{x:.032666195333495754,y:.36162054591923504},{x:.032407352052251925,y:.36059717166956007},{x:.03223462203187315,y:.35723870865311785},{x:.031905,y:.353892},{x:.031905,y:.285813}],[{x:.121905,y:.2937462257558374},{x:.121905,y:.3460304727958324},{x:.1524170009298456,y:.4306917867874386},{x:.21387346155335435,y:.48640130996954867},{x:.2736381428091649,y:.513105},{x:.36637802828147564,y:.513105},{x:.4250638403772601,y:.4864880590885319},{x:.48014799999999996,y:.4365549481293854},{x:.48014799999999996,y:.20413270643748072},{x:.4248733312055972,y:.15401438585682045},{x:.36611835928516706,y:.12658200000000003},{x:.27389496414813935,y:.12658200000000003},{x:.2140623112166411,y:.15410266134357853},{x:.15236330162501277,y:.21004602219345103},{x:.121905,y:.2937462257558374}]],r:[[{x:.062422000000000005,y:.03920400000000002},{x:.06328666238185464,y:.030424935509274227},{x:.0658474210369921,y:.02198324554357097},{x:.07000586744638546,y:.01420333951411792},{x:.07560219484660537,y:.00738419484660538},{x:.08242133951411793,y:.0017878674463854757},{x:.09020124554357097,y:-.002370578963007887},{x:.09864293550927423,y:-.004931337618145348},{x:.107422,y:-.005795999999999982},{x:.11620106449072577,y:-.004931337618145348},{x:.12464275445642904,y:-.002370578963007887},{x:.1324226604858821,y:.0017878674463854827},{x:.13924180515339463,y:.00738419484660538},{x:.14483813255361455,y:.01420333951411792},{x:.14899657896300791,y:.02198324554357098},{x:.15155733761814538,y:.030424935509274248},{x:.152422,y:.03920400000000002},{x:.152422,y:.3275398012121413},{x:.1925108808296549,y:.4204278633799401},{x:.27478075869941443,y:.4836647262821032},{x:.3576648607132649,y:.5150589999999999},{x:.49463,y:.5150589999999999},{x:.5034090644907258,y:.5159236623818546},{x:.511850754456429,y:.5184844210369921},{x:.5196306604858821,y:.5226428674463854},{x:.5264498051533947,y:.5282391948466053},{x:.5320461325536145,y:.5350583395141179},{x:.5362045789630079,y:.542838245543571},{x:.5387653376181454,y:.5512799355092742},{x:.53963,y:.560059},{x:.5387653376181454,y:.5688380644907257},{x:.5362045789630079,y:.577279754456429},{x:.5320461325536145,y:.5850596604858821},{x:.5264498051533947,y:.5918788051533946},{x:.5196306604858821,y:.5974751325536145},{x:.511850754456429,y:.6016335789630078},{x:.5034090644907258,y:.6041943376181453},{x:.49463,y:.605059},{x:.349428,y:.605059},{x:.34572095329292224,y:.6046938877675093},{x:.3420044651532413,y:.6044424555930356},{x:.34133700376168824,y:.6042621064259311},{x:.3406489355092742,y:.6041943376181453},{x:.33708434852821606,y:.6031130319790114},{x:.33348832364990477,y:.6021413801353276},{x:.23668632364990477,y:.5654753801353276},{x:.2347311434313091,y:.5645060813254815},{x:.23268939209293205,y:.5637356779621759},{x:.23078888495220712,y:.562551669954317},{x:.22878273496962892,y:.5615571024090896},{x:.2270542238076375,y:.5602249916656349},{x:.22520200238894322,y:.5590710654608507},{x:.152422,y:.5031286093364514},{x:.152422,y:.560059},{x:.15155733761814538,y:.5688380644907257},{x:.14899657896300791,y:.577279754456429},{x:.14483813255361455,y:.5850596604858821},{x:.13924180515339463,y:.5918788051533946},{x:.1324226604858821,y:.5974751325536145},{x:.12464275445642904,y:.6016335789630078},{x:.11620106449072577,y:.6041943376181453},{x:.107422,y:.605059},{x:.09864293550927423,y:.6041943376181453},{x:.09020124554357094,y:.6016335789630078},{x:.08242133951411793,y:.5974751325536145},{x:.07560219484660537,y:.5918788051533946},{x:.07000586744638546,y:.5850596604858821},{x:.0658474210369921,y:.577279754456429},{x:.06328666238185464,y:.5688380644907257},{x:.062422000000000005,y:.560059},{x:.062422000000000005,y:.03920400000000002}]],s:[[{x:.056563,y:.369888},{x:.056809270227573656,y:.3673875764180495},{x:.05684306423764694,y:.36487528163458033},{x:.05724057756471223,y:.36300843953465567},{x:.057427662381854636,y:.3611089355092742},{x:.05815700903783985,y:.3587046018033244},{x:.05868027810379197,y:.35624717294397146},{x:.05943435615016931,y:.3544937526945111},{x:.0599884210369921,y:.352667245543571},{x:.06117281573842168,y:.3504513989095756},{x:.06216545092350078,y:.34814327358726177},{x:.06324711489275962,y:.3465706581451233},{x:.06414686744638545,y:.3448873395141179},{x:.06574079456909979,y:.3429451336955602},{x:.0671646494598194,y:.3408750118720105},{x:.06853233161222538,y:.3395436359667022},{x:.06974319484660536,y:.33806819484660533},{x:.07168540066516299,y:.33647426772389105},{x:.07348575731657993,y:.3347217030198468},{x:.07508689839402109,y:.33368273068076537},{x:.07656233951411792,y:.33247186744638546},{x:.07877818614811302,y:.331287472744956},{x:.08088585786376518,y:.3299198152391437},{x:.15568385786376518,y:.29122381523914376},{x:.1574569269125657,y:.29051717359061785},{x:.15914024554357095,y:.2896174210369921},{x:.16154457924952065,y:.28888807438100694},{x:.16387856938737105,y:.2879578823843842},{x:.16575542835833412,y:.2876107272686775},{x:.16758193550927422,y:.2870566623818547},{x:.17008235909122482,y:.286810392154281},{x:.17255297371919248,y:.2863534124236203},{x:.17446149597461844,y:.28637908481714247},{x:.176361,y:.28619200000000006},{x:.288347309340128,y:.28619200000000006},{x:.3974525128623667,y:.21942256309828728},{x:.45549,y:.1602321160680505},{x:.45549,y:.13007078589845048},{x:.407404042616179,y:.10590438131127383},{x:.31753214348357883,y:.07103500000000003},{x:.21224543978224936,y:.07103500000000003},{x:.16354378174687056,y:.09622932957230687},{x:.14433666195924297,y:.15500005013212306},{x:.1407876006468136,y:.16307617408904287},{x:.13573115992893667,y:.17030473007440486},{x:.12936165598671553,y:.1764079287355125},{x:.12192386528459082,y:.18115122757053267},{x:.11370361794808405,y:.18435234426530817},{x:.10501681347236942,y:.18588826170046568},{x:.09619728088183255,y:.18569995543032455},{x:.08758394986787689,y:.1837946619592429},{x:.07950782591095708,y:.18024560064681355},{x:.07227926992559508,y:.1751891599289366},{x:.06617607126448745,y:.1688196559867155},{x:.06143277242946728,y:.16138186528459075},{x:.05823165573469179,y:.153161617948084},{x:.05669573829953427,y:.14447481347236937},{x:.0568840445696754,y:.1356552808818325},{x:.05878933804075704,y:.12704194986787684},{x:.08372233804075704,y:.050750949867876836},{x:.08542587043333498,y:.04687444913825993},{x:.08709879890390285,y:.042984643121031924},{x:.08719974017890864,y:.04283789110571456},{x:.0872713993531864,y:.04267482591095703},{x:.0896984666241539,y:.03920515373890898},{x:.0920981137517354,y:.03571646140762123},{x:.09222574536637099,y:.03559222185697407},{x:.09232784007106334,y:.035446269925595034},{x:.09538517138631239,y:.032516763866873036},{x:.0984193200775319,y:.02956325371133576},{x:.09856873722042347,y:.029466301081615798},{x:.09869734401328446,y:.029343071264487396},{x:.10226744784494098,y:.027066310594042624},{x:.10581949746716537,y:.024761484353185106},{x:.18061849746716538,y:-.013933515646814817},{x:.1823912439162618,y:-.014639995851387814},{x:.18407424554357094,y:-.01553957896300786},{x:.18647892276401756,y:-.016269029822976466},{x:.18881326125361947,y:-.017199317363260178},{x:.19068977232738848,y:-.017546377073194466},{x:.1925159355092742,y:-.018100337618145335},{x:.19501671633437545,y:-.018346643031098245},{x:.19748769126025723,y:-.018803648509519946},{x:.19939585369049342,y:-.018777950414796084},{x:.201295,y:-.018964999999999968},{x:.325956,y:-.018964999999999968},{x:.3298421413721484,y:-.018582248482612737},{x:.33373593654739714,y:-.01828737118339306},{x:.334227355251249,y:-.018150342613638803},{x:.3347350644907258,y:-.018100337618145335},{x:.33847186362931597,y:-.016966791992147238},{x:.34223331291484477,y:-.015917938922943478},{x:.44196531291484475,y:.022777061077056446},{x:.44388622686678575,y:.02374867869889352},{x:.4458951331158935,y:.02452214291663178},{x:.5206971331158935,y:.06211514291663188},{x:.5230429253028388,y:.06359852573319036},{x:.5254906604858821,y:.06490686744638552},{x:.526762463529903,y:.06595060923072474},{x:.5281530225051898,y:.06682994172267823},{x:.5301643473216751,y:.06874246310749585},{x:.5323098051533947,y:.07050319484660542},{x:.5333535469377338,y:.07177499789062616},{x:.5345458374532134,y:.07290871885358566},{x:.536145400814505,y:.07517688168239829},{x:.5379061325536145,y:.07732233951411796},{x:.538681702666837,y:.0787733291400739},{x:.5396299056666436,y:.08011787031323085},{x:.5407562372498129,y:.08265451036052812},{x:.5420645789630079,y:.08510224554357101},{x:.5425421726806072,y:.08667666103386074},{x:.5432098492552168,y:.08818035245395842},{x:.5438196647691762,y:.09088798806528645},{x:.5446253376181454,y:.09354393550927428},{x:.5447866012813922,y:.09518127295954937},{x:.5451480929944793,y:.09678632860859225},{x:.545217957571016,y:.09956090686586556},{x:.54549,y:.10232300000000005},{x:.54549,y:.17861300000000002},{x:.5450792542455133,y:.1827833716312913},{x:.5447095428008049,y:.18695758114513777},{x:.5446471218945653,y:.18717088502046353},{x:.5446253376181454,y:.1873920644907258},{x:.5434088850836819,y:.19140217107899518},{x:.5422319296624953,y:.19542404720269643},{x:.5421290946347417,y:.1956210747891699},{x:.5420645789630079,y:.19583375445642906},{x:.5400891672372728,y:.199529489854385},{x:.5381501975764,y:.20324447414399938},{x:.5380109003195782,y:.20341765378196683},{x:.5379061325536145,y:.20361366048588211},{x:.5352476756014034,y:.20685299965477524},{x:.5326212052175259,y:.21011832734743824},{x:.45781920521752584,y:.28640632734743826},{x:.45695946559173245,y:.28712616331644525},{x:.45621413415776596,y:.2879638966272176},{x:.45358375241990234,y:.28995255364350675},{x:.45105542866152953,y:.29206944848930627},{x:.4500717756605794,y:.29260772613156716},{x:.4491773318997613,y:.2932839556822147},{x:.3245133318997613,y:.3695749556822147},{x:.3213472249094816,y:.3711082739568931},{x:.3182447544564291,y:.37276657896300797},{x:.31738368821196916,y:.37302778055263114},{x:.3165738477898179,y:.3734199792757539},{x:.31316944110160955,y:.3743061584374605},{x:.3098030644907258,y:.3753273376181454},{x:.3089075854904768,y:.3754155346015568},{x:.3080367917497669,y:.3756422053074494},{x:.30452491480344407,y:.37584718998797495},{x:.301024,y:.376192},{x:.18731182116617404,y:.376192},{x:.146563,y:.397272996602132},{x:.146563,y:.42779681790574337},{x:.20153437253410483,y:.48386323770148376},{x:.2842918489876165,y:.5150589999999999},{x:.39008456648169626,y:.5150589999999999},{x:.4553477907191711,y:.4822576837794137},{x:.4635801440629335,y:.47908783003036465},{x:.47227272283422006,y:.4775849365970516},{x:.4810914761057044,y:.47780675883128426},{x:.48969750413477736,y:.47974477222900047},{x:.4977600820905977,y:.48332450002217653},{x:.5049693696238691,y:.488408375279255},{x:.5110483178577028,y:.4948010275251766},{x:.5157633162205862,y:.5022567907191711},{x:.5189331699696352,y:.5104891440629334},{x:.5204360634029483,y:.51918172283422},{x:.5202142411687157,y:.5280004761057044},{x:.5182762277709995,y:.5366065041347774},{x:.5146964999778234,y:.5446690820905977},{x:.509612624720745,y:.551878369623869},{x:.5032199724748234,y:.5579573178577029},{x:.49576420928082887,y:.5626723162205862},{x:.42096520928082887,y:.6002663162205862},{x:.41942927464851043,y:.6008577252562829},{x:.41797775445642904,y:.6016335789630078},{x:.4153223812886681,y:.6024390776071881},{x:.41273285593706643,y:.6034361699696352},{x:.41111105567880996,y:.6037165692645292},{x:.40953606449072577,y:.6041943376181453},{x:.40677456858393113,y:.6044663212253706},{x:.4040402771657799,y:.6049390634029483},{x:.4023949361559939,y:.6048976773693867},{x:.400757,y:.605059},{x:.276092,y:.605059},{x:.2724204350331364,y:.6046973824138966},{x:.26873912724910987,y:.6044542166602351},{x:.2680367190736708,y:.6042656240771296},{x:.2673129355092742,y:.6041943376181453},{x:.2637824667250502,y:.6031233816208718},{x:.26021933352302795,y:.6021667007079561},{x:.1604883335230279,y:.5645727007079561},{x:.15963695838633216,y:.5641523105976027},{x:.15873109713512196,y:.563867735718488},{x:.15568848233041307,y:.5622026409240001},{x:.1525785174681621,y:.5606670094317409},{x:.15182551530799093,y:.5600886019499048},{x:.15099257773152036,y:.559632770334096},{x:.14833326979676884,y:.5574060851671644},{x:.1455826488796249,y:.5552932363569977},{x:.14495695714670492,y:.554579039378831},{x:.14422895256892138,y:.5539694683796904},{x:.06943095256892137,y:.47768146837969044},{x:.06680494464711424,y:.4744165369262552},{x:.06414686744638545,y:.4711776604858821},{x:.0640418150384659,y:.470981121254323},{x:.0639021439692389,y:.47080746737336276},{x:.06196355058191934,y:.4670929619312254},{x:.0599884210369921,y:.46339775445642906},{x:.05992373008360734,y:.46318449696300446},{x:.05982062094636722,y:.462986931318802},{x:.05864394115023422,y:.4589655982489849},{x:.057427662381854636,y:.45495606449072584},{x:.05740581892006417,y:.454734284101312},{x:.05734323414113077,y:.4545203990307778},{x:.05697368708086039,y:.4503467759079653},{x:.056563,y:.44617700000000005},{x:.056563,y:.369888}]],t:[[{x:.036055000000000004,y:.484201},{x:.03691966238185464,y:.4754219355092742},{x:.0394804210369921,y:.466980245543571},{x:.04363886744638546,y:.4592003395141179},{x:.049235194846605365,y:.45238119484660533},{x:.05605433951411792,y:.44678486744638546},{x:.06383424554357096,y:.44262642103699207},{x:.07227593550927423,y:.4400656623818546},{x:.081055,y:.439201},{x:.201032,y:.439201},{x:.201032,y:.17345100000000002},{x:.2013458215844704,y:.17026471598156256},{x:.20148726326025637,y:.1670661406603643},{x:.20177732050748418,y:.165883633894134},{x:.20189666238185464,y:.16467193550927425},{x:.20282606714776777,y:.16160809859877695},{x:.20358880215081968,y:.15849857690755997},{x:.20410398165518515,y:.15739537903902878},{x:.2044574210369921,y:.15623024554357098},{x:.20596669248041014,y:.15340659727526443},{x:.20732140933230742,y:.15050562638878262},{x:.2623124093323074,y:.05773162638878261},{x:.2645408071528226,y:.05469603003381387},{x:.2666808493837164,y:.051597510818645845},{x:.2671477670132535,y:.051144744093296994},{x:.26753264280400524,y:.05062045370997057},{x:.2703104380556505,y:.04807792433615628},{x:.27301385108661325,y:.04545644382682572},{x:.2735601274310704,y:.04510346799784869},{x:.2740398919211364,y:.04466433724917905},{x:.27726033549019774,y:.04271258283448707},{x:.28042322867453984,y:.040668883056825214},{x:.28102787064035484,y:.04042926278737637},{x:.28158408674943697,y:.04009216722176761},{x:.28512341879560005,y:.038806192593798694},{x:.288624243922019,y:.03741881178414046},{x:.39861224392201905,y:.005893811784140432},{x:.4004470188387682,y:.005558110934368086},{x:.4022319355092743,y:.0050166623818546086},{x:.4047755505163489,y:.004766138170207483},{x:.4072897364122725,y:.0043061284251197166},{x:.4091547486303562,y:.0043348248023798485},{x:.411011,y:.004151999999999975},{x:.520997,y:.004151999999999975},{x:.5297760644907258,y:.0050166623818546086},{x:.538217754456429,y:.00757742103699207},{x:.5459976604858822,y:.011735867446385433},{x:.5528168051533947,y:.017332194846605337},{x:.5584131325536146,y:.02415133951411788},{x:.5625715789630079,y:.031931245543570935},{x:.5651323376181454,y:.040372935509274205},{x:.5659970000000001,y:.049151999999999973},{x:.5651323376181454,y:.05793106449072574},{x:.5625715789630079,y:.06637275445642901},{x:.5584131325536146,y:.07415266048588207},{x:.5528168051533947,y:.08097180515339461},{x:.5459976604858822,y:.08656813255361451},{x:.538217754456429,y:.09072657896300787},{x:.5297760644907258,y:.09328733761814534},{x:.520997,y:.09415199999999997},{x:.41733272532416527,y:.09415199999999997},{x:.33061421916568134,y:.11900744701827656},{x:.291032,y:.1857856616511605},{x:.291032,y:.439201},{x:.466004,y:.439201},{x:.47478306449072577,y:.4400656623818546},{x:.48322475445642904,y:.44262642103699207},{x:.4910046604858821,y:.44678486744638546},{x:.49782380515339464,y:.45238119484660533},{x:.5034201325536145,y:.4592003395141179},{x:.5075785789630078,y:.466980245543571},{x:.5101393376181453,y:.4754219355092742},{x:.511004,y:.484201},{x:.5101393376181453,y:.4929800644907258},{x:.5075785789630078,y:.501421754456429},{x:.5034201325536145,y:.5092016604858821},{x:.49782380515339464,y:.5160208051533947},{x:.4910046604858821,y:.5216171325536145},{x:.48322475445642904,y:.5257755789630079},{x:.47478306449072577,y:.5283363376181454},{x:.466004,y:.529201},{x:.291032,y:.529201},{x:.291032,y:.702148},{x:.2901673376181454,y:.7109270644907257},{x:.2876065789630079,y:.719368754456429},{x:.28344813255361456,y:.7271486604858821},{x:.27785180515339464,y:.7339678051533947},{x:.2710326604858821,y:.7395641325536145},{x:.26325275445642904,y:.7437225789630079},{x:.25481106449072577,y:.7462833376181454},{x:.246032,y:.747148},{x:.23725293550927423,y:.7462833376181454},{x:.22881124554357096,y:.7437225789630079},{x:.2210313395141179,y:.7395641325536145},{x:.21421219484660536,y:.7339678051533947},{x:.20861586744638547,y:.7271486604858821},{x:.2044574210369921,y:.719368754456429},{x:.20189666238185464,y:.7109270644907257},{x:.201032,y:.702148},{x:.201032,y:.529201},{x:.081055,y:.529201},{x:.07227593550927423,y:.5283363376181454},{x:.06383424554357094,y:.5257755789630079},{x:.05605433951411792,y:.5216171325536145},{x:.049235194846605365,y:.5160208051533947},{x:.04363886744638546,y:.5092016604858821},{x:.0394804210369921,y:.501421754456429},{x:.03691966238185464,y:.4929800644907258},{x:.036055000000000004,y:.484201}]],u:[[{x:.047041,y:.17386599999999997},{x:.04733731084809023,y:.17085750547164297},{x:.04744678100255899,y:.1678364368310572},{x:.0477687404511641,y:.16647712720137547},{x:.04790566238185463,y:.1650869355092742},{x:.048783207866406234,y:.16219405573845885},{x:.04947995583647738,y:.15925239265237093},{x:.08761895583647737,y:.04817539265237096},{x:.08938287590080696,y:.04431825367483454},{x:.09111755940033861,y:.04044787795123246},{x:.0912166047918106,y:.04030846472648272},{x:.0912877277290914,y:.04015294120864865},{x:.09377024504918263,y:.03671403980837168},{x:.09622666993792225,y:.03325645223155292},{x:.09635101037087945,y:.03313904059014135},{x:.09645110783403886,y:.03300038080982997},{x:.09955682066149267,y:.030111872039067004},{x:.10264058790854466,y:.027199945760571206},{x:.10278544504987946,y:.027109047766032002},{x:.10291067034954356,y:.026992580340839414},{x:.10652022788210418,y:.024765467971757132},{x:.11011283004156149,y:.02251110668543916},{x:.1858688300415615,y:-.015231893314560811},{x:.1873332068933575,y:-.0157898639141544},{x:.18871524554357097,y:-.01652857896300789},{x:.19144581156206075,y:-.017356887109087667},{x:.19411224226228255,y:-.018372875537717062},{x:.1956573361874375,y:-.018634439137126358},{x:.19715693550927424,y:-.019089337618145352},{x:.1999966293703256,y:-.019369023051625026},{x:.20281003486202434,y:-.01984529472354478},{x:.2043764687674932,y:-.01980039958033106},{x:.205936,y:-.019953999999999986},{x:.319832,y:-.019953999999999986},{x:.32132997950952447,y:-.01980646189590665},{x:.3228344649392302,y:-.019853723877644197},{x:.3257100002545037,y:-.019375067506000147},{x:.3286110644907258,y:-.019089337618145352},{x:.3300514774877758,y:-.018652393112465325},{x:.33153627500704863,y:-.018405236421526333},{x:.3342631764918695,y:-.017374788187221168},{x:.33705275445642907,y:-.01652857896300789},{x:.3383802466773209,y:-.015819019588053155},{x:.3397882963501792,y:-.015286942317463331},{x:.4160692963501792,y:.02245605768253664},{x:.4183042276197719,y:.02384992521458428},{x:.42064256487504254,y:.025062345668598177},{x:.4220380841989542,y:.02617863282445781},{x:.4235544084161923,y:.027124324140885128},{x:.42547446604244665,y:.028927422360218155},{x:.42753134130624215,y:.03057273346328787},{x:.465011,y:.06712410441560081},{x:.465011,y:.025046000000000013},{x:.4658756623818546,y:.016266935509274223},{x:.46843642103699207,y:.007825245543570968},{x:.47259486744638546,y:45339514117916785e-21},{x:.4781911948466053,y:-.006773805153394624},{x:.4850103395141179,y:-.012370132553614528},{x:.492790245543571,y:-.01652857896300789},{x:.5012319355092743,y:-.019089337618145352},{x:.510011,y:-.019953999999999986},{x:.5187900644907257,y:-.019089337618145352},{x:.527231754456429,y:-.01652857896300789},{x:.5350116604858821,y:-.012370132553614521},{x:.5418308051533947,y:-.006773805153394624},{x:.5474271325536145,y:45339514117916785e-21},{x:.5515855789630079,y:.007825245543570974},{x:.5541463376181454,y:.016266935509274244},{x:.555011,y:.025046000000000013},{x:.555011,y:.545898},{x:.5541463376181454,y:.5546770644907257},{x:.5515855789630079,y:.563118754456429},{x:.5474271325536145,y:.5708986604858821},{x:.5418308051533947,y:.5777178051533947},{x:.5350116604858821,y:.5833141325536145},{x:.527231754456429,y:.5874725789630079},{x:.5187900644907257,y:.5900333376181454},{x:.510011,y:.590898},{x:.5012319355092743,y:.5900333376181454},{x:.492790245543571,y:.5874725789630079},{x:.4850103395141179,y:.5833141325536145},{x:.4781911948466053,y:.5777178051533947},{x:.47259486744638546,y:.5708986604858821},{x:.46843642103699207,y:.563118754456429},{x:.4658756623818546,y:.5546770644907257},{x:.465011,y:.545898},{x:.465011,y:.19283699530520199},{x:.36978450462305706,y:.099969048308901},{x:.30930812362389754,y:.07004600000000001},{x:.2165251763155874,y:.07004600000000001},{x:.16675256431883717,y:.09484360935890679},{x:.137041,y:.18137632992954258},{x:.137041,y:.545898},{x:.13617633761814535,y:.5546770644907257},{x:.1336155789630079,y:.563118754456429},{x:.12945713255361452,y:.5708986604858821},{x:.12386080515339463,y:.5777178051533947},{x:.11704166048588208,y:.5833141325536145},{x:.10926175445642904,y:.5874725789630079},{x:.10082006449072577,y:.5900333376181454},{x:.092041,y:.590898},{x:.08326193550927423,y:.5900333376181454},{x:.07482024554357093,y:.5874725789630079},{x:.06704033951411792,y:.5833141325536145},{x:.06022119484660536,y:.5777178051533947},{x:.05462486744638546,y:.5708986604858821},{x:.050466421036992094,y:.563118754456429},{x:.04790566238185463,y:.5546770644907257},{x:.047041,y:.545898},{x:.047041,y:.17386599999999997}]],v:[[{x:.003930906419490336,y:.5438334563092145},{x:.005386967221411215,y:.5351329102741644},{x:.00851244255100142,y:.5268836061622384},{x:.26071044255100145,y:.018289606162238365},{x:.26144011887972296,y:.017121905714788027},{x:.2620056398700735,y:.01586646241095203},{x:.26377267234206975,y:.013389122267562115},{x:.26538522214413157,y:.010808560104194675},{x:.26632868500311185,y:.009805649483352854},{x:.267128264504625,y:.008684656842684199},{x:.2693446490294707,y:.006599649029470163},{x:.2714296568426842,y:.00438326450462502},{x:.27255064948335267,y:.0035836850031119977},{x:.2735535601041947,y:.0026402221441315446},{x:.27613412226756273,y:.0010276723420693272},{x:.278611462410952,y:-.0007393601299264599},{x:.2798669057147878,y:-.0013048811202769175},{x:.28103460616223835,y:-.0020345574489985807},{x:.28388017640738666,y:-.0031126798553442526},{x:.2866546460885495,y:-.00436245420755494},{x:.28799629407344673,y:-.00467218403223142},{x:.2892839102741644,y:-.005160032778588779},{x:.2922851349323858,y:-.00566229614975999},{x:.29525011283741587,y:-.006346784254711718},{x:.2966264067237199,y:-.006388820170250395},{x:.2979844563092145,y:-.006616093580509658},{x:.301026,y:-.00652319621682493},{x:.30406754369078554,y:-.006616093580509658},{x:.3054255932762801,y:-.006388820170250395},{x:.30680188716258416,y:-.006346784254711718},{x:.30976686506761425,y:-.005662296149759988},{x:.31276808972583564,y:-.005160032778588779},{x:.3140557059265533,y:-.00467218403223142},{x:.3153973539114505,y:-.00436245420755494},{x:.3181718235926135,y:-.0031126798553442175},{x:.3210173938377617,y:-.0020345574489985807},{x:.32218509428521225,y:-.0013048811202769192},{x:.323440537589048,y:-.0007393601299264599},{x:.32591787773243747,y:.0010276723420694187},{x:.32849843989580535,y:.0026402221441315446},{x:.32950135051664736,y:.0035836850031119635},{x:.3306223431573158,y:.00438326450462502},{x:.3327073509705293,y:.006599649029470129},{x:.334923735495375,y:.008684656842684203},{x:.33572331499688823,y:.009805649483352899},{x:.33666677785586846,y:.01080856010419469},{x:.3382793276579303,y:.013389122267562135},{x:.3400463601299265,y:.01586646241095204},{x:.34061188112027707,y:.017121905714788034},{x:.3413415574489986,y:.018289606162238365},{x:.5935395574489987,y:.5268836061622384},{x:.5966650327785888,y:.5351329102741644},{x:.5981210935805097,y:.5438334563092145},{x:.5978517842547117,y:.5526508871625841},{x:.595867454207555,y:.5612463539114505},{x:.5922443601299265,y:.569289537589048},{x:.587121735495375,y:.5764713431573159},{x:.5806964398958053,y:.5825157778558685},{x:.5732153938377617,y:.5871905574489986},{x:.5649660897258356,y:.5903160327785888},{x:.5562655436907855,y:.5917720935805096},{x:.5474481128374159,y:.5915027842547117},{x:.5388526460885495,y:.589518454207555},{x:.5308094624109521,y:.5858953601299265},{x:.5236276568426842,y:.580772735495375},{x:.5175832221441315,y:.5743474398958054},{x:.5129084425510014,y:.5668663938377616},{x:.301026,y:.13957458745236595},{x:.08914355744899859,y:.5668663938377616},{x:.08446877785586845,y:.5743474398958054},{x:.07842434315731579,y:.580772735495375},{x:.07124253758904797,y:.5858953601299265},{x:.06319935391145051,y:.589518454207555},{x:.054603887162584124,y:.5915027842547117},{x:.04578645630921451,y:.5917720935805096},{x:.037085910274164385,y:.5903160327785888},{x:.028836606162238352,y:.5871905574489986},{x:.02135556010419467,y:.5825157778558685},{x:.014930264504625007,y:.5764713431573159},{x:.009807639870073534,y:.569289537589048},{x:.006184545792445054,y:.5612463539114505},{x:.004200215745288276,y:.5526508871625841},{x:.003930906419490336,y:.5438334563092145}]],w:[[{x:-.04481226541001698,y:.5427688011711321},{x:-.0431501306438814,y:.534105261341125},{x:.1073618693561186,y:.025511261341124997},{x:.10747750697825527,y:.02522662926113043},{x:.10753949092041715,y:.02492572151525217},{x:.1091366577408943,y:.021142772088450095},{x:.11068223944402648,y:.01733845540642648},{x:.11085118408582124,y:.017081852232977028},{x:.1109706812129555,y:.01679881881229654},{x:.11327517574267339,y:.0134001494872997},{x:.11553324489331337,y:.009970459715744673},{x:.11574900410692728,y:.009751746564891355},{x:.11592142221145292,y:.009497464285038355},{x:.11884468401801046,y:.006613684018010047},{x:.12172846428503836,y:.0036904222114529234},{x:.12198274656489135,y:.0035180041069272803},{x:.12220145971574467,y:.0033022448933133844},{x:.1256311494872997,y:.001044175742673395},{x:.12902981881229655,y:-.0012603187870445023},{x:.12931285223297703,y:-.0013798159141787526},{x:.12956945540642648,y:-.0015487605559735135},{x:.1333737720884501,y:-.0030943422591057004},{x:.13715672151525218,y:-.004691509079582858},{x:.13745762926113045,y:-.004753493021744735},{x:.137742261341125,y:-.004869130643881392},{x:.14177500717701197,y:-.005642829061426576},{x:.14579686008065018,y:-.006471289947453558},{x:.1461040784358031,y:-.006473378696506754},{x:.14640580117113214,y:-.006531265410016966},{x:.150512,y:-.006503347745684165},{x:.15461819882886788,y:-.006531265410016966},{x:.15491992156419693,y:-.006473378696506754},{x:.15522713991934983,y:-.006471289947453558},{x:.159248992822988,y:-.005642829061426585},{x:.16328173865887502,y:-.004869130643881392},{x:.16356637073886957,y:-.004753493021744732},{x:.16386727848474786,y:-.004691509079582851},{x:.1676502279115502,y:-.0030943422591055763},{x:.17145454459357354,y:-.0015487605559735135},{x:.17171114776702298,y:-.0013798159141787517},{x:.17199418118770346,y:-.0012603187870445023},{x:.17539285051270065,y:.001044175742673613},{x:.17882254028425534,y:.0033022448933133844},{x:.17904125343510863,y:.0035180041069272374},{x:.17929553571496165,y:.0036904222114529095},{x:.18217931598198978,y:.006613684018010279},{x:.1851025777885471,y:.009497464285038375},{x:.18527499589307275,y:.009751746564891386},{x:.18549075510668664,y:.009970459715744683},{x:.1877488242573266,y:.013400149487299715},{x:.1900533187870445,y:.016798818812296553},{x:.19017281591417878,y:.01708185223297707},{x:.19034176055597352,y:.01733845540642648},{x:.19188734225910553,y:.02114277208844964},{x:.19348450907958287,y:.02492572151525217},{x:.19354649302174473,y:.02522662926113043},{x:.1936621306438814,y:.025511261341124997},{x:.30102443002882817,y:.38829842311817664},{x:.4083889386148475,y:.025511027311792445},{x:.40850451632069196,y:.025226547135196155},{x:.40856646677585007,y:.0249257992040805},{x:.410163689741502,y:.021142697708463984},{x:.41170935302882616,y:.01733823938560964},{x:.41187820927072055,y:.017081773507688556},{x:.41199764237598097,y:.016798890297984457},{x:.41430222163921304,y:.013400082779514221},{x:.4165603984391837,y:.009970270005002412},{x:.41677604416644776,y:.009751674265617277},{x:.4169483701745541,y:.009497526820430955},{x:.41987174204670485,y:.006613627545966159},{x:.42275565189129766,y:.0036902661012626486},{x:.42300979995956794,y:.0035179410120882958},{x:.4232283964786704,y:.003302296075210584},{x:.4266582174181369,y:.0010441316765615349},{x:.4300570332693414,y:-.001260435297455717},{x:.43033991691088264,y:-.001379867379883588},{x:.4305963833993421,y:-.0015487226944633017},{x:.43440084731088763,y:-.0030943722258508074},{x:.43818395458161874,y:-.004691581512785238},{x:.43848470273672896,y:-.004753530880516994},{x:.4387691833312223,y:-.0048691075577547704},{x:.44280208680029426,y:-.005642843777199688},{x:.4468241027997286,y:-.0064713155198797695},{x:.44713115788546864,y:-.006473401493455157},{x:.44743272015628793,y:-.006531257986460835},{x:.45153908096424766,y:-.006503346644966049},{x:.45564544187310013,y:-.00653124313893301},{x:.4559470039347234,y:-.006473385555557348},{x:.4562540590129192,y:-.0064712984717510205},{x:.4602760720167908,y:-.005642812186517322},{x:.4643089726882076,y:-.004869061385152536},{x:.46459345286480397,y:-.004753483679308031},{x:.46489420079591953,y:-.0046915332241499325},{x:.46867730229153426,y:-.003094310258498727},{x:.4724817606143904,y:-.0015486469711738574},{x:.4727382264923116,y:-.0013797907292793573},{x:.47302110970201555,y:-.0012603576240190345},{x:.4764199172204845,y:.0010442216392121837},{x:.47984972999499764,y:.0033023984391836667},{x:.4800683257343829,y:.003518044166447842},{x:.48032247317956905,y:.003690370174554085},{x:.483206372454032,y:.0066137420467029156},{x:.48612973389873737,y:.009497651891297622},{x:.4863020589879118,y:.009751799959568049},{x:.48651770392478944,y:.009970396478670394},{x:.4887758683234383,y:.01340021741813658},{x:.49108043529745576,y:.016799033269341422},{x:.49119986737988364,y:.017081916910882677},{x:.4913687226944633,y:.017338383399342037},{x:.4929143722258502,y:.021142847310886045},{x:.4945115815127853,y:.024925954581618698},{x:.4945735308805171,y:.025226702736729056},{x:.4946891075577548,y:.025511183331222268},{x:.6452021075577549,y:.5341051833312223},{x:.6468642579864609,y:.542768720156288},{x:.646804298471751,y:.5515900590129192},{x:.64502453322415,y:.5602302007959196},{x:.641593357624019,y:.5683571097020156},{x:.636642629825446,y:.5756584731795691},{x:.6303626035213297,y:.5818537039247894},{x:.622994616600658,y:.5867047226944633},{x:.6148218166687778,y:.5900251075577548},{x:.6061582798437121,y:.5916872579864608},{x:.5973369409870808,y:.591627298471751},{x:.5886967992040805,y:.58984753322415},{x:.5805698902979844,y:.5864163576240191},{x:.573268526820431,y:.5814656298254459},{x:.5670732960752106,y:.5751856035213296},{x:.5622222773055368,y:.567817616600658},{x:.5589018924422452,y:.5596448166687777},{x:.4515387133151436,y:.1968570925189096},{x:.34417406138515255,y:.5596449726882076},{x:.3440584683142858,y:.559929490683899},{x:.34399650907958285,y:.5602302784847478},{x:.3423992950207163,y:.5640133397974443},{x:.3408536469711739,y:.5678177606143904},{x:.3406847682813525,y:.5680742605871558},{x:.34056531878704455,y:.5683571811877035},{x:.33826075609875456,y:.5717559510329858},{x:.33600260156081635,y:.5751857299949976},{x:.33578692716538155,y:.5754043547947312},{x:.3356145777885471,y:.5756585357149616},{x:.33269122952253233,y:.5785424012737268},{x:.32980734810870244,y:.5814657338987373},{x:.3295531662537196,y:.581638081896991},{x:.3293345402842553,y:.5818537551066867},{x:.3259047490749403,y:.5841118910428063},{x:.32250596673065857,y:.5864164352974557},{x:.322223045482268,y:.5865358832573104},{x:.32196654459357354,y:.5867047605559735},{x:.318162115393689,y:.5882503879717952},{x:.31437904541838135,y:.5898475815127853},{x:.31407825728149374,y:.5899095391161314},{x:.313793738658875,y:.5900251306438814},{x:.30976087354902626,y:.5907988519446131},{x:.3057388972002714,y:.5916273155198798},{x:.3054318012943039,y:.5916294017707667},{x:.3051301988288679,y:.5916872654100169},{x:.30102387855356455,y:.5916593469199811},{x:.29691755812689985,y:.5916872431389331},{x:.2966159559752979,y:.5916293778639092},{x:.2963088600806502,y:.5916272899474536},{x:.29228688822522214,y:.5907988045585649},{x:.28825402731179245,y:.5900250613851525},{x:.2879695093161011,y:.5899094683142858},{x:.2876687215152522,y:.5898475090795828},{x:.2838856602025565,y:.5882502950207166},{x:.28008123938560964,y:.5867046469711739},{x:.27982473941284386,y:.5865357682813523},{x:.27954181881229656,y:.5864163187870445},{x:.276143048967013,y:.5841117560987538},{x:.2727132700050024,y:.5818536015608163},{x:.2724946452052691,y:.5816379271653819},{x:.27224046428503834,y:.5814655777885471},{x:.2693565987262721,y:.5785422295225312},{x:.2664332661012626,y:.5756583481087024},{x:.2662609181030087,y:.5754041662537193},{x:.2660452448933134,y:.5751855402842553},{x:.26378710895719626,y:.5717557490749442},{x:.2614825647025443,y:.5683569667306586},{x:.2613631167426894,y:.5680740454822678},{x:.2611942394440265,y:.5678175445935736},{x:.2596486120282045,y:.5640131153936881},{x:.2580514184872148,y:.5602300454183813},{x:.25798946088386876,y:.5599292572814941},{x:.2578738693561186,y:.559644738658875},{x:.150512,y:.196859029989096},{x:.0431501306438814,y:.559644738658875},{x:.039829760555973516,y:.5678175445935736},{x:.034978755106686646,y:.5751855402842553},{x:.028783535714961644,y:.5814655777885471},{x:.021482181187703456,y:.5864163187870445},{x:.01335527848474783,y:.5898475090795828},{x:.0047151399193498065,y:.5916272899474536},{x:-.004106198828867862,y:.5916872654100169},{x:-.01276973865887501,y:.5900251306438814},{x:-.020942544593573535,y:.5867047605559735},{x:-.028310540284255312,y:.5818537551066867},{x:-.034590577788547086,y:.5756585357149616},{x:-.03954131878704451,y:.5683571811877035},{x:-.04297250907958286,y:.5602302784847478},{x:-.04475228994745356,y:.5515901399193498},{x:-.04481226541001698,y:.5427688011711321}]],x:[[{x:-.007882248997940308,y:.03911618267902263},{x:-.007180671607209664,y:.030322582532795114},{x:-.0047770285451087455,y:.021834819906700376},{x:-.0007636904665355299,y:.013979074758467071},{x:.004705112296856322,y:.007057238968589209},{x:.011419216721809594,y:.001335314804661543},{x:.019120603540586492,y:-.0029668073965882433},{x:.02751331277672888,y:-.0056837994916240225},{x:.036274817320977384,y:-.006711248997940296},{x:.04506841746720488,y:-.006009671607209652},{x:.05355618009329963,y:-.003606028545108733},{x:.061411925241532925,y:.0004073095334644686},{x:.0683337610314108,y:.005876112296856327},{x:.3010265,y:.23008742701759316},{x:.5337192389685892,y:.005876112296856327},{x:.540641074758467,y:.0004073095334644686},{x:.5484968199067003,y:-.003606028545108733},{x:.556984582532795,y:-.006009671607209652},{x:.5657781826790226,y:-.006711248997940296},{x:.5745396872232711,y:-.0056837994916240225},{x:.5829323964594135,y:-.0029668073965882433},{x:.5906337832781904,y:.001335314804661536},{x:.5973478877031436,y:.007057238968589213},{x:.6028166904665355,y:.013979074758467089},{x:.6068300285451087,y:.021834819906700383},{x:.6092336716072096,y:.030322582532795128},{x:.6099352489979403,y:.03911618267902263},{x:.608907799491624,y:.047877687223271126},{x:.6061908073965883,y:.05627039645941352},{x:.6018886851953384,y:.0639717832781904},{x:.5961667610314108,y:.07068588770314368},{x:.36588095484811606,y:.292578},{x:.5961667610314108,y:.5144701122968564},{x:.6018886851953384,y:.5211842167218096},{x:.6061908073965883,y:.5288856035405864},{x:.608907799491624,y:.5372783127767289},{x:.6099352489979403,y:.5460398173209774},{x:.6092336716072096,y:.5548334174672048},{x:.6068300285451087,y:.5633211800932996},{x:.6028166904665355,y:.571176925241533},{x:.5973478877031436,y:.5780987610314108},{x:.5906337832781904,y:.5838206851953385},{x:.5829323964594135,y:.5881228073965883},{x:.5745396872232711,y:.590839799491624},{x:.5657781826790226,y:.5918672489979403},{x:.556984582532795,y:.5911656716072097},{x:.5484968199067003,y:.5887620285451087},{x:.540641074758467,y:.5847486904665355},{x:.5337192389685892,y:.5792798877031436},{x:.3010265,y:.35506857298240685},{x:.0683337610314108,y:.5792798877031436},{x:.06141192524153289,y:.5847486904665355},{x:.05355618009329961,y:.5887620285451087},{x:.0450684174672049,y:.5911656716072097},{x:.03627481732097735,y:.5918672489979403},{x:.02751331277672888,y:.590839799491624},{x:.01912060354058648,y:.5881228073965883},{x:.011419216721809584,y:.5838206851953385},{x:.004705112296856315,y:.5780987610314108},{x:-.0007636904665355368,y:.571176925241533},{x:-.004777028545108752,y:.5633211800932996},{x:-.007180671607209664,y:.5548334174672048},{x:-.007882248997940308,y:.5460398173209774},{x:-.006854799491624035,y:.5372783127767289},{x:-.004137807396588256,y:.5288856035405864},{x:.0001643148046615306,y:.5211842167218096},{x:.005886238968589197,y:.5144701122968564},{x:.23617204515188386,y:.292578},{x:.005886238968589197,y:.07068588770314368},{x:.00016431480466150977,y:.0639717832781904},{x:-.004137807396588256,y:.05627039645941351},{x:-.006854799491624035,y:.047877687223271126},{x:-.007882248997940308,y:.03911618267902263}]],y:[[{x:-7800000000000168e-20,y:-.15516599999999992},{x:.0007866623818546317,y:-.16394506449072568},{x:.003347421036992093,y:-.17238675445642895},{x:.007505867446385456,y:-.180166660485882},{x:.013102194846605353,y:-.18698580515339455},{x:.0199213395141179,y:-.19258213255361445},{x:.02770124554357093,y:-.1967405789630078},{x:.03614293550927421,y:-.19930133761814528},{x:.044922,y:-.2001659999999999},{x:.084618,y:-.2001659999999999},{x:.08470326921416556,y:-.20015760171543356},{x:.08478856964894584,y:-.200165676732115},{x:.08909199801123496,y:-.19972534965725622},{x:.09339706449072577,y:-.19930133761814528},{x:.0934790568568106,y:-.19927646550581232},{x:.09356429362525961,y:-.1992677440740231},{x:.09769912926743524,y:-.1979963205354665},{x:.10183875445642904,y:-.1967405789630078},{x:.1019143190537861,y:-.19670018884423682},{x:.10199621655469396,y:-.19667500612370953},{x:.18074721655469395,y:-.16370500612370958},{x:.18295470197399702,y:-.16251430076809983},{x:.18525522528778574,y:-.16151511930158513},{x:.18682754729843723,y:-.16042530954354395},{x:.18851130436774752,y:-.15951710034658062},{x:.19044407848245243,y:-.15791861501920362},{x:.19250546725178602,y:-.1564898227103016},{x:.27125546725178606,y:-.08958282271030155},{x:.27347158712358693,y:-.0872898341236823},{x:.27580944257935097,y:-.08512109812948883},{x:.27653091968085064,y:-.08412438503144627},{x:.2773860111192193,y:-.08323963374445845},{x:.2791122089873479,y:-.0805583607511536},{x:.2809820438025964,y:-.07797520343727593},{x:.35909504380259644,y:.055837796562724036},{x:.35921507445013207,y:.05609937330868571},{x:.35938084670619436,y:.05633463764830328},{x:.359814044874128,y:.05731131476590327},{x:.3603874218559792,y:.0582128676935936},{x:.5972854218559792,y:.5265638676935935},{x:.6004763520268956,y:.5347880745861305},{x:.6020015061983327,y:.5434767752438966},{x:.6018022735507984,y:.5522960677732933},{x:.5998863104832066,y:.5609070317083322},{x:.5963272463817603,y:.568978752534074},{x:.591261854083932,y:.5762010385458585},{x:.5848847937750224,y:.5822963413425576},{x:.5774411323064065,y:.5870304218559792},{x:.5692169254138695,y:.5902213520268956},{x:.5605282247561034,y:.5917465061983327},{x:.5517089322267067,y:.5915472735507984},{x:.5430979682916678,y:.5896313104832066},{x:.5350262474659261,y:.5860722463817603},{x:.5278039614541415,y:.5810068540839319},{x:.5217086586574424,y:.5746297937750224},{x:.5169745781440208,y:.5671861323064065},{x:.3203411783046204,y:.17843886787959407},{x:.12481771439881506,y:.5670983271806026},{x:.12009991274687032,y:.5745523168465348},{x:.11401856108654926,y:.5809426827476728},{x:.10680736235169674,y:.5860238467061943},{x:.09874343886560628,y:.5896005424407229},{x:.09013668268554793,y:.5915353195400148},{x:.08131784662479694,y:.5917538256051798},{x:.0726258336075076,y:.5902476635706729},{x:.06439467281939737,y:.5870747143988151},{x:.05694068315346515,y:.5823569127468703},{x:.05055031725232718,y:.5762755610865493},{x:.04546915329380567,y:.5690643623516968},{x:.041892457559277035,y:.5610004388656062},{x:.039957680459985136,y:.5523936826855479},{x:.039739174394820276,y:.5435748466247969},{x:.0412453364293271,y:.5348828336075077},{x:.04441828560118493,y:.5266516728193974},{x:.26905653043412125,y:.0801181620528446},{x:.20712852539925722,y:-.025968816269973185},{x:.1395520619925953,y:-.08338263769409424},{x:.07557825049874085,y:-.11016599999999992},{x:.044922,y:-.11016599999999992},{x:.03614293550927422,y:-.11103066238185455},{x:.02770124554357096,y:-.11359142103699202},{x:.01992133951411791,y:-.11774986744638538},{x:.01310219484660536,y:-.12334619484660528},{x:.007505867446385456,y:-.13016533951411782},{x:.003347421036992093,y:-.13794524554357088},{x:.0007866623818546317,y:-.14638693550927412},{x:-7800000000000168e-20,y:-.15516599999999992}]],z:[[{x:.051680000000000004,y:.038348999999999966},{x:.05192127447228559,y:.035899299172703986},{x:.05194879067317478,y:.033437899088824954},{x:.05235257576103353,y:.03152022369965088},{x:.05254466238185464,y:.029569935509274177},{x:.053259213756049764,y:.02721437531096308},{x:.05376639657582897,y:.024805638484003446},{x:.054536542955643516,y:.023003585252525667},{x:.0551054210369921,y:.02112824554357092},{x:.05626578950451143,y:.018957348831652537},{x:.05723314819184797,y:.01669384166703705},{x:.05834005957014514,y:.015076662488338128},{x:.05926386744638546,y:.01334833951411787},{x:.060825460697764414,y:.011445532631778232},{x:.062215820200804926,y:.009414240440453706},{x:.0636169585940798,y:.00804408260344652},{x:.06486019484660537,y:.0065291948466053296},{x:.06676300172894496,y:.004967601595226417},{x:.06852293131171022,y:.0032465857969436324},{x:.07016445175727676,y:.0021761036989109733},{x:.07167933951411792,y:.0009328674463854256},{x:.07385023622603624,y:-.00022750102113387976},{x:.07591210278164046,y:-.0015721027544036703},{x:.07773092256935071,y:-.0023017710867676167},{x:.07945924554357096,y:-.003225578963007937},{x:.08181480574188199,y:-.003940130337203038},{x:.08409937289490133,y:-.004856645714911602},{x:.08602559580031956,y:-.00521745953679684},{x:.08790093550927423,y:-.0057863376181453985},{x:.09035063633657014,y:-.00602761209043098},{x:.09277010945251417,y:-.006480819940600742},{x:.09472971180962335,y:-.006458913379178931},{x:.09668,y:-.006651000000000032},{x:.505373,y:-.006651000000000032},{x:.5141520644907257,y:-.0057863376181453985},{x:.522593754456429,y:-.003225578963007937},{x:.5303736604858821,y:.0009328674463854256},{x:.5371928051533946,y:.0065291948466053296},{x:.5427891325536145,y:.013348339514117874},{x:.5469475789630078,y:.021128245543570928},{x:.5495083376181453,y:.029569935509274198},{x:.550373,y:.038348999999999966},{x:.5495083376181453,y:.047128064490725735},{x:.5469475789630078,y:.055569754456429005},{x:.5427891325536145,y:.06334966048588206},{x:.5371928051533946,y:.0701688051533946},{x:.5303736604858821,y:.0757651325536145},{x:.522593754456429,y:.07992357896300786},{x:.5141520644907257,y:.08248433761814533},{x:.505373,y:.08334899999999996},{x:.190464663126857,y:.08334899999999996},{x:.5404754142030563,y:.5196949313117102},{x:.5415458963010891,y:.5213364517572769},{x:.5427891325536145,y:.5228513395141179},{x:.5439495010211337,y:.525022236226036},{x:.5452941027544036,y:.5270841027816404},{x:.5460237710867677,y:.5289029225693511},{x:.5469475789630078,y:.530631245543571},{x:.5476621303372028,y:.5329868057418816},{x:.5485786457149116,y:.5352713728949013},{x:.5489394595367969,y:.53719759580032},{x:.5495083376181453,y:.5390729355092743},{x:.5497496120904308,y:.5415226363365697},{x:.5502028199406007,y:.5439421094525142},{x:.5501809133791788,y:.5459017118096235},{x:.550373,y:.547852},{x:.5501317255277144,y:.5503017008272966},{x:.5501042093268251,y:.552763100911175},{x:.5497004242389665,y:.5546807763003486},{x:.5495083376181453,y:.5566310644907257},{x:.5487937862439503,y:.5589866246890365},{x:.548286603424171,y:.5613953615159966},{x:.5475164570443563,y:.5631974147474748},{x:.5469475789630078,y:.565072754456429},{x:.5457872104954887,y:.567243651168347},{x:.544819851808152,y:.569507158332963},{x:.5437129404298549,y:.5711243375116617},{x:.5427891325536145,y:.5728526604858821},{x:.5412275393022352,y:.5747554673682221},{x:.539837179799195,y:.5767867595595463},{x:.5384360414059206,y:.578156917396553},{x:.5371928051533946,y:.5796718051533947},{x:.5352899982710546,y:.5812333984047738},{x:.5335300686882897,y:.5829544142030564},{x:.5318885482427235,y:.5840248963010888},{x:.5303736604858821,y:.5852681325536145},{x:.5282027637739638,y:.5864285010211338},{x:.5261408972183595,y:.5877731027544036},{x:.5243220774306487,y:.5885027710867679},{x:.522593754456429,y:.5894265789630079},{x:.5202381942581186,y:.5901411303372028},{x:.5179536271050986,y:.5910576457149116},{x:.5160274041996802,y:.5914184595367968},{x:.5141520644907257,y:.5919873376181454},{x:.5117023636634302,y:.5922286120904309},{x:.5092828905474858,y:.5926818199406008},{x:.5073232881903766,y:.5926599133791789},{x:.505373,y:.592852},{x:.09668,y:.592852},{x:.08790093550927423,y:.5919873376181454},{x:.07945924554357094,y:.5894265789630079},{x:.07167933951411792,y:.5852681325536145},{x:.06486019484660537,y:.5796718051533947},{x:.05926386744638546,y:.5728526604858821},{x:.0551054210369921,y:.565072754456429},{x:.05254466238185464,y:.5566310644907257},{x:.051680000000000004,y:.547852},{x:.05254466238185464,y:.5390729355092743},{x:.0551054210369921,y:.530631245543571},{x:.05926386744638546,y:.5228513395141179},{x:.06486019484660537,y:.5160321948466053},{x:.07167933951411792,y:.5104358674463855},{x:.07945924554357096,y:.5062774210369921},{x:.08790093550927423,y:.5037166623818546},{x:.09668,y:.502852},{x:.41158833687314295,y:.502852},{x:.06157758579694366,y:.06650606868828973},{x:.06050710369891106,y:.06486454824272328},{x:.05926386744638546,y:.06334966048588206},{x:.05810349897886612,y:.06117876377396365},{x:.05675889724559635,y:.059116897218359485},{x:.05602922891323242,y:.05729807743064926},{x:.0551054210369921,y:.055569754456429005},{x:.054390869662797,y:.05321419425811798},{x:.053474354285088434,y:.050929627105098636},{x:.0531135404632032,y:.04900340419968042},{x:.05254466238185464,y:.047128064490725735},{x:.05230338790956906,y:.04467836366342984},{x:.051850180059399294,y:.04225889054748581},{x:.05187208662082111,y:.04029928819037662},{x:.051680000000000004,y:.038348999999999966}]]},vci=Qci;function khe(t){const{ctx:e,points:n,fill:o,stroke:i,strokeWidth:r=1,minStrokePx:s,realToCanvasMat:a,closePath:A=!1}=t;if(n.length\u003c2)return;e.beginPath();const c=n.map(h=\u003eBn(a,[h.x,h.y])),l=c[0];if(!l)return;const[u,g]=l;e.moveTo(u,g);for(let h=1;h\u003cc.length;h++){const d=c[h];if(!d)continue;const[p,m]=d;e.lineTo(p,m)}if(A\u0026\u0026e.closePath(),o\u0026\u0026(e.fillStyle=o,e.fill()),i){const h=r*Math.abs(a.a),d=s===void 0?h:Math.max(h,s);e.strokeStyle=i,e.lineWidth=d,e.stroke()}}function Bp(t){const{ctx:e,center:n,width:o,height:i,fill:r,realToCanvasMat:s,borderRadius:a=0,ccwRotationDegrees:A=0,stroke:c,strokeWidth:l,isStrokeDashed:u=!1,lineJoin:g}=t,[h,d]=Bn(s,[n.x,n.y]),p=o*Math.abs(s.a),m=i*Math.abs(s.a),_=a*Math.abs(s.a),f=l?l*Math.abs(s.a):void 0;if(e.save(),e.translate(h,d),A!==0\u0026\u0026e.rotate(-A*(Math.PI/180)),e.beginPath(),_\u003e0){const I=-p/2,C=-m/2,y=Math.min(_,p/2,m/2);e.moveTo(I+y,C),e.lineTo(I+p-y,C),e.arcTo(I+p,C,I+p,C+y,y),e.lineTo(I+p,C+m-y),e.arcTo(I+p,C+m,I+p-y,C+m,y),e.lineTo(I+y,C+m),e.arcTo(I,C+m,I,C+m-y,y),e.lineTo(I,C+y),e.arcTo(I,C,I+y,C,y)}else e.rect(-p/2,-m/2,p,m);r\u0026\u0026(e.fillStyle=r,e.fill()),c\u0026\u0026f\u0026\u0026(u?e.setLineDash([f*3,f*2]):e.setLineDash([]),g\u0026\u0026(e.lineJoin=g),e.strokeStyle=c,e.lineWidth=f,e.stroke()),e.restore()}function wci(t){const{ctx:e,board:n,realToCanvasMat:o,colorMap:i,drawBoardMaterial:r,minBoardOutlineStrokePx:s}=t,{width:a,height:A,center:c,outline:l}=n;if(l\u0026\u0026Array.isArray(l)\u0026\u0026l.length\u003e=3){r\u0026\u0026khe({ctx:e,points:l.map(u=\u003e({x:u.x,y:u.y})),fill:i.substrate,realToCanvasMat:o,closePath:!0}),khe({ctx:e,points:l.map(u=\u003e({x:u.x,y:u.y})),stroke:i.boardOutline,strokeWidth:.1,realToCanvasMat:o,closePath:!0,minStrokePx:s});return}if(a!==void 0\u0026\u0026A!==void 0\u0026\u0026c){r\u0026\u0026Bp({ctx:e,center:c,width:a,height:A,fill:i.substrate,realToCanvasMat:o});const u=a/2,g=A/2,h=[{x:c.x-u,y:c.y-g},{x:c.x+u,y:c.y-g},{x:c.x+u,y:c.y+g},{x:c.x-u,y:c.y+g}];khe({ctx:e,points:h,stroke:i.boardOutline,strokeWidth:.1,realToCanvasMat:o,closePath:!0,minStrokePx:s})}}function Pci({startX:t,startY:e,endX:n,endY:o,bulge:i}){if(Math.abs(i)\u003c1e-10)return null;const r=n-t,s=o-e,a=Math.hypot(r,s);if(a\u003c1e-10)return null;const A=Math.abs(i)*(a/2),c=a/2,l=(A*A+c*c)/(2*A),u=l-A,g=(t+n)/2,h=(e+o)/2,d=-s/a,p=r/a,m=i\u003e0?-1:1;return{centerX:g+m*d*u,centerY:h+m*p*u,radius:l}}function $Ke({ctx:t,realStartX:e,realStartY:n,realEndX:o,realEndY:i,bulge:r,realToCanvasMat:s}){if(Math.abs(r)\u003c1e-10){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const a=Pci({startX:e,startY:n,endX:o,endY:i,bulge:r});if(!a){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const[A,c]=Bn(s,[e,n]),[l,u]=Bn(s,[o,i]),[g,h]=Bn(s,[a.centerX,a.centerY]),d=Math.hypot(A-g,c-h),p=Math.atan2(c-h,A-g),m=Math.atan2(u-h,l-g),f=s.a*s.d-s.b*s.c\u003c0,I=r\u003e0?!f:f;t.arc(g,h,d,p,m,I)}function hon({ctx:t,ring:e,realToCanvasMat:n}){if(e.vertices.length\u003c2)return;if(e.vertices.length===2){const[s,a]=e.vertices;if(s\u0026\u0026a\u0026\u0026Math.abs((s.bulge??0)-1)\u003c1e-10\u0026\u0026Math.abs((a.bulge??0)-1)\u003c1e-10){const[A,c]=Bn(n,[s.x,s.y]);t.moveTo(A,c),$Ke({ctx:t,realStartX:s.x,realStartY:s.y,realEndX:a.x,realEndY:a.y,bulge:1,realToCanvasMat:n}),$Ke({ctx:t,realStartX:a.x,realStartY:a.y,realEndX:s.x,realEndY:s.y,bulge:1,realToCanvasMat:n});return}}const o=e.vertices[0];if(!o)return;const[i,r]=Bn(n,[o.x,o.y]);t.moveTo(i,r);for(let s=0;s\u003ce.vertices.length;s++){const a=e.vertices[s],A=e.vertices[(s+1)%e.vertices.length];!a||!A||$Ke({ctx:t,realStartX:a.x,realStartY:a.y,realEndX:A.x,realEndY:A.y,bulge:a.bulge??0,realToCanvasMat:n})}}function pon({ctx:t,shape:e,realToCanvasMat:n}){hon({ctx:t,ring:e.outer_ring,realToCanvasMat:n});for(const o of e.inner_rings??[])hon({ctx:t,ring:o,realToCanvasMat:n})}function Mci(t,e){return e.copper[t]??e.copper.top}function qKe(t){const{ctx:e,pour:n,realToCanvasMat:o}=t;if(n.shape===\"rect\"){const i=n.width/2,r=n.height/2,s=(n.rotation??0)*Math.PI/180,a=Math.cos(s),A=Math.sin(s),c=[{x:-i,y:-r},{x:i,y:-r},{x:i,y:r},{x:-i,y:r}].map(u=\u003eBn(o,[n.center.x+u.x*a-u.y*A,n.center.y+u.x*A+u.y*a])),l=c[0];if(!l)return;e.moveTo(l[0],l[1]);for(let u=1;u\u003cc.length;u++){const g=c[u];g\u0026\u0026e.lineTo(g[0],g[1])}e.closePath();return}if(n.shape===\"polygon\"){const i=n.points[0];if(!i)return;const[r,s]=Bn(o,[i.x,i.y]);e.moveTo(r,s);for(let a=1;a\u003cn.points.length;a++){const A=n.points[a];if(!A)continue;const[c,l]=Bn(o,[A.x,A.y]);e.lineTo(c,l)}e.closePath();return}n.shape===\"brep\"\u0026\u0026pon({ctx:e,shape:n.brep_shape,realToCanvasMat:o})}function Dci(t){const{ctx:e,pour:n,realToCanvasMat:o,colorMap:i}=t,r=Mci(n.layer,i),s=.5;e.save(),e.globalAlpha=s,e.beginPath(),qKe({ctx:e,pour:n,realToCanvasMat:o}),e.fillStyle=r,e.fill(n.shape===\"brep\"?\"evenodd\":\"nonzero\"),e.restore()}function Nci(t,e){if(e.length\u003c3)return;const n=e[0];if(n){t.moveTo(n.x,n.y);for(let o=1;o\u003ce.length;o++){const i=e[o];i\u0026\u0026t.lineTo(i.x,i.y)}t.closePath()}}var Rci=t=\u003eQho[t]??(t===\" \"?Gv.spaceWidthRatio:Gv.glyphWidthRatio);function XKe(t,e,n){const o=Rci(t),i=e?Gv.letterSpacingRatio:0,r=e?vho[t]?.[e]??0:0;return n*(o+i+r)}function Tci(t,e){const n=e*Gv.glyphWidthRatio,o=e*Gv.letterSpacingRatio,i=e*Gv.spaceWidthRatio,r=e*Gv.strokeWidthRatio,s=e*Gv.lineHeightRatio,a=t.replace(/\\\\n/g,`\n`).split(`\n`),A=a.map(u=\u003e{const g=Array.from(u);return g.reduce((h,d,p)=\u003eh+XKe(d,g[p+1],e),0)}),c=A.reduce((u,g)=\u003eMath.max(u,g),0),l=a.length\u003e1?e+(a.length-1)*s:e;return{width:c,height:l,glyphWidth:n,letterSpacing:o,spaceWidth:i,strokeWidth:r,lineHeight:s,lines:a,lineWidths:A}}function kci(t){const{line:e,fontSize:n,startX:o,startY:i}=t,r=n,s=n,a=Array.from(e),A=[];let c=o+t.layout.strokeWidth/2;return a.forEach((l,u)=\u003e{const g=vci[l];if(g?.length){const h=[];for(const d of g){const p=d.map(m=\u003e({x:c+m.x*s,y:i+(1-m.y)*r}));p.length\u003e=3\u0026\u0026h.push(p)}h.length\u003e0\u0026\u0026A.push(h)}c+=XKe(l,a[u+1],n)}),A}function Fci(t){let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)for(const s of r)e=Math.min(e,s.x),n=Math.min(n,s.y),o=Math.max(o,s.x),i=Math.max(i,s.y);return e===Number.POSITIVE_INFINITY||n===Number.POSITIVE_INFINITY||o===Number.NEGATIVE_INFINITY||i===Number.NEGATIVE_INFINITY?null:{minX:e,minY:n,maxX:o,maxY:i}}function Lci(t,e,n){const o=Oci(t,e),i=Gci(o,e,n),r=Fci(i.flat()),s=Yci(t,e,r);return{bounds:r?zci(r,s):null,glyphGroups:Vci(i,s),linePlacements:o.map(({line:a,startX:A,startY:c})=\u003e({line:a,startX:A+s.x,startY:c+s.y})),startOffset:s}}function Hci(t,e){const n=e.width+e.strokeWidth,o=e.height+e.strokeWidth;let i=0,r=0;return t===\"center\"||t===\"top_center\"||t===\"bottom_center\"?i=-n/2:t===\"top_left\"||t===\"bottom_left\"||t===\"center_left\"?i=0:t===\"top_right\"||t===\"bottom_right\"||t===\"center_right\"?i=-n:(t===\"top_center\"||t===\"bottom_center\")\u0026\u0026(i=-n/2),t===\"center\"||t===\"center_left\"||t===\"center_right\"?r=-o/2:t===\"top_left\"||t===\"top_right\"||t===\"top_center\"?r=0:(t===\"bottom_left\"||t===\"bottom_right\"||t===\"bottom_center\")\u0026\u0026(r=-o),{x:i,y:r}}function Oci(t,e){return e.lines.map((n,o)=\u003e({line:n,startX:Jci({alignment:t,lineWidth:e.lineWidths[o],maxWidth:e.width,strokeWidth:e.strokeWidth}),startY:o*e.lineHeight}))}function Gci(t,e,n){return t.flatMap(({line:o,startX:i,startY:r})=\u003ekci({line:o,fontSize:n,startX:i,startY:r,layout:e}))}function Yci(t,e,n){return n?{x:-Uci(t,n),y:-Kci(t,n)}:Hci(t,e)}function Uci(t,e){return t===\"top_left\"||t===\"bottom_left\"||t===\"center_left\"?e.minX:t===\"top_right\"||t===\"bottom_right\"||t===\"center_right\"?e.maxX:(e.minX+e.maxX)/2}function Kci(t,e){return t===\"top_left\"||t===\"top_right\"||t===\"top_center\"?e.minY:t===\"bottom_left\"||t===\"bottom_right\"||t===\"bottom_center\"?e.maxY:(e.minY+e.maxY)/2}function Vci(t,e){return e.x===0\u0026\u0026e.y===0?t:t.map(n=\u003en.map(o=\u003eo.map(i=\u003e({x:i.x+e.x,y:i.y+e.y}))))}function zci(t,e){return{minX:t.minX+e.x,minY:t.minY+e.y,maxX:t.maxX+e.x,maxY:t.maxY+e.y}}function Jci(t){const{alignment:e,lineWidth:n,maxWidth:o,strokeWidth:i}=t,r=n+i,s=o+i;return e===\"top_left\"||e===\"bottom_left\"||e===\"center_left\"?0:e===\"top_right\"||e===\"bottom_right\"||e===\"center_right\"?s-r:(s-r)/2}var Wci=t=\u003eSho[t];function jci(t){const{ctx:e,line:n,fontSize:o,startX:i,startY:r,layout:s}=t,{strokeWidth:a}=s,A=o,c=o,l=r,u=Array.from(n);let g=i+a/2;u.forEach((h,d)=\u003e{const p=Wci(h);if(p?.length){e.beginPath();for(const m of p){const _=g+m.x1*c,f=l+(1-m.y1)*A,I=g+m.x2*c,C=l+(1-m.y2)*A;e.moveTo(_,f),e.lineTo(I,C)}e.stroke()}g+=XKe(h,u[d+1],o)})}var $ci={left:.2,right:.2,top:.2,bottom:.2};function SY(t){const{ctx:e,text:n,x:o,y:i,fontSize:r,color:s,realToCanvasMat:a,anchorAlignment:A,rotation:c=0,mirrorX:l=!1,knockout:u=!1,knockoutPadding:g={}}=t;if(!n)return;const[h,d]=Bn(a,[o,i]),p=Math.abs(a.a),m=r*p,_=Tci(n,m),f=Lci(A,_,m);if(e.save(),e.translate(h,d),c!==0\u0026\u0026e.rotate(-c*(Math.PI/180)),l\u0026\u0026e.scale(-1,1),u){const I={...$ci,...g},C=I.left*p,y=I.right*p,x=I.top*p,E=I.bottom*p,B=f.bounds;if(!B){e.restore();return}const S=B.minX-C,Q=B.minY-x,w=B.maxX-B.minX+C+y,M=B.maxY-B.minY+x+E;e.fillStyle=s,e.beginPath(),e.rect(S,Q,w,M);for(const k of f.glyphGroups)for(const R of k)Nci(e,R);e.fill(\"evenodd\")}else e.strokeStyle=s;e.lineWidth=_.strokeWidth,e.lineCap=\"round\",e.lineJoin=\"round\",u||f.linePlacements.forEach(({line:I,startX:C,startY:y})=\u003e{jci({ctx:e,line:I,fontSize:m,startX:C,startY:y,layout:_})}),e.restore()}function qci(t){return t||\"center\"}function Xci(t){const{ctx:e,text:n,realToCanvasMat:o,colorMap:i}=t,r=n.text??\"\";r\u0026\u0026SY({ctx:e,text:r,x:n.anchor_position.x,y:n.anchor_position.y,fontSize:n.font_size??1,color:i.copper[n.layer]??i.copper.top,realToCanvasMat:o,anchorAlignment:qci(n.anchor_alignment),rotation:n.ccw_rotation??0,mirrorX:n.is_mirrored??n.layer===\"bottom\",knockout:n.is_knockout,knockoutPadding:n.is_knockout?n.knockout_padding:void 0})}function dm(t){const{ctx:e,center:n,radius:o,fill:i,realToCanvasMat:r,stroke:s,strokeWidth:a,isStrokeDashed:A=!1}=t,[c,l]=Bn(r,[n.x,n.y]),u=o*Math.abs(r.a),g=a?a*Math.abs(r.a):void 0;e.beginPath(),e.arc(c,l,u,0,Math.PI*2),i\u0026\u0026(e.fillStyle=i,e.fill()),s\u0026\u0026g\u0026\u0026(A?e.setLineDash([g*3,g*2]):e.setLineDash([]),e.strokeStyle=s,e.lineWidth=g,e.stroke())}function Zci(t,e){return t===\"bottom\"?e.courtyard.bottom:e.courtyard.top}function eli(t){const{ctx:e,circle:n,realToCanvasMat:o,colorMap:i}=t;dm({ctx:e,center:n.center,radius:n.radius,stroke:Zci(n.layer,i),strokeWidth:.05,realToCanvasMat:o})}function tli(t,e){return t===\"bottom\"?e.courtyard.bottom:e.courtyard.top}function nli(t){const{ctx:e,outline:n,realToCanvasMat:o,colorMap:i}=t;if(!n.outline||n.outline.length\u003c2)return;e.beginPath();const r=Bn(o,n.outline[0]);e.moveTo(r.x,r.y);for(let s=1;s\u003cn.outline.length;s++){const a=Bn(o,n.outline[s]);e.lineTo(a.x,a.y)}e.closePath(),e.lineWidth=.05*Math.abs(o.a),e.strokeStyle=tli(n.layer,i),e.lineJoin=\"round\",e.stroke()}function oli(t,e){return t===\"bottom\"?e.courtyard.bottom:e.courtyard.top}function ili(t){const{ctx:e,rect:n,realToCanvasMat:o,colorMap:i}=t;Bp({ctx:e,center:n.center,width:n.width,height:n.height,stroke:oli(n.layer,i),strokeWidth:.05,realToCanvasMat:o,ccwRotationDegrees:n.ccw_rotation??0,lineJoin:\"round\"})}function sP(t){const{ctx:e,points:n,fill:o,realToCanvasMat:i}=t;if(n.length\u003c3)return;e.beginPath();const r=n.map(c=\u003eBn(i,[c.x,c.y])),s=r[0];if(!s)return;const[a,A]=s;e.moveTo(a,A);for(let c=1;c\u003cr.length;c++){const l=r[c];if(!l)continue;const[u,g]=l;e.lineTo(u,g)}e.closePath(),e.fillStyle=o,e.fill()}function rli(t){const{ctx:e,cutout:n,realToCanvasMat:o,colorMap:i}=t;if(n.shape===\"rect\"){Bp({ctx:e,center:n.center,width:n.width,height:n.height,fill:i.drill,realToCanvasMat:o,ccwRotationDegrees:n.rotation??0,borderRadius:n.corner_radius??0});return}if(n.shape===\"circle\"){dm({ctx:e,center:n.center,radius:n.radius,fill:i.drill,realToCanvasMat:o});return}if(n.shape===\"polygon\"){n.points\u0026\u0026n.points.length\u003e=3\u0026\u0026sP({ctx:e,points:n.points,fill:i.drill,realToCanvasMat:o});return}}var mon=\"#ff4d4d\",sli={a:1,b:0,c:0,d:1,e:0,f:0};function ali(t){const e=Math.min(t.canvas.width,t.canvas.height),n=Math.max(1,Math.min(2,e*.002)),o=Math.max(10,Math.min(18,e*.02));return{fontSize:o,strokeWidth:n,dashLength:n*4,labelGap:o*.35,pointRadius:n*3}}function ZKe({ctx:t,label:e,x:n,y:o,style:i,align:r=\"left\"}){e\u0026\u0026(t.setLineDash([]),SY({ctx:t,text:e,x:n,y:o,fontSize:i.fontSize,color:mon,realToCanvasMat:sli,anchorAlignment:r===\"center\"?\"bottom_center\":\"bottom_left\"}))}function Ali({ctx:t,debugObject:e,realToCanvasMat:n,labelStackIndex:o=0}){const i=ali(t);if(t.save(),t.strokeStyle=mon,t.lineWidth=i.strokeWidth,t.setLineDash([i.dashLength,i.dashLength]),e.shape===\"rect\"){const a=Bn(n,[e.center.x-e.size.width/2,e.center.y-e.size.height/2]),A=Bn(n,[e.center.x+e.size.width/2,e.center.y+e.size.height/2]),c=Math.min(a[0],A[0]),l=Math.min(a[1],A[1]),u=Math.abs(A[0]-a[0]),g=Math.abs(A[1]-a[1]);t.beginPath(),t.rect(c,l,u,g),t.stroke(),ZKe({ctx:t,label:e.label,x:c,y:l-i.labelGap-o*(i.fontSize+i.labelGap),style:i}),t.restore();return}if(e.shape===\"line\"){const[a,A]=Bn(n,[e.start.x,e.start.y]),[c,l]=Bn(n,[e.end.x,e.end.y]);t.beginPath(),t.moveTo(a,A),t.lineTo(c,l),t.stroke(),ZKe({ctx:t,label:e.label,x:(a+c)/2,y:(A+l)/2-i.labelGap,style:i,align:\"center\"}),t.restore();return}const[r,s]=Bn(n,[e.center.x,e.center.y]);t.beginPath(),t.arc(r,s,i.pointRadius,0,Math.PI*2),t.stroke(),ZKe({ctx:t,label:e.label,x:r+i.pointRadius+i.labelGap,y:s-i.pointRadius,style:i}),t.restore()}var cli=1.5,lli=.6,uli=.3;function eVe(t){const e=Math.hypot(t.x,t.y)||1;return{x:t.x/e,y:t.y/e}}function _on(t){const{ctx:e,from:n,to:o,realToCanvasMat:i,color:r,fontSize:s,arrowSize:a=1,strokeWidth:A,text:c,textRotation:l,offset:u}=t,g=eVe({x:o.x-n.x,y:o.y-n.y}),h={x:-g.y,y:g.x},d=u?.direction\u0026\u0026typeof u.direction.x==\"number\"\u0026\u0026typeof u.direction.y==\"number\",p=d?eVe(u.direction):{x:0,y:0},m=u?.distance??0,_={x:p.x*m,y:p.y*m},f={x:n.x+_.x,y:n.y+_.y},I={x:o.x+_.x,y:o.y+_.y},C={x:f.x+g.x*a,y:f.y+g.y*a},y={x:I.x-g.x*a,y:I.y-g.y*a};Math.abs(i.a);const x=A??a/5,E=r||\"rgba(255,255,255,0.5)\",B=d\u0026\u0026(Math.abs(p.x)\u003eNumber.EPSILON||Math.abs(p.y)\u003eNumber.EPSILON)?p:h,S=m+.5,Q=[],w=R=\u003e{const F={x:R.x+B.x*S,y:R.y+B.y*S},O=x/2,U={x:-B.y,y:B.x};return[{x:R.x+U.x*O,y:R.y+U.y*O},{x:R.x-U.x*O,y:R.y-U.y*O},{x:F.x-U.x*O,y:F.y-U.y*O},{x:F.x+U.x*O,y:F.y+U.y*O}]};Q.push(f),Q.push({x:C.x+h.x*(a/2),y:C.y+h.y*(a/2)}),Q.push({x:C.x+h.x*(x/2),y:C.y+h.y*(x/2)}),Q.push({x:y.x+h.x*(x/2),y:y.y+h.y*(x/2)}),Q.push({x:y.x+h.x*(a/2),y:y.y+h.y*(a/2)}),Q.push(I),Q.push({x:y.x-h.x*(a/2),y:y.y-h.y*(a/2)}),Q.push({x:y.x-h.x*(x/2),y:y.y-h.y*(x/2)}),Q.push({x:C.x-h.x*(x/2),y:C.y-h.y*(x/2)}),Q.push({x:C.x-h.x*(a/2),y:C.y-h.y*(a/2)}),Q.push(f);const M=Q[0],k=R=\u003e{const F=w(R);Q.push(M),Q.push(F[0]),Q.push(...F),Q.push(F[0]),Q.push(M)};if(k(n),k(o),sP({ctx:e,points:Q,fill:E,realToCanvasMat:i}),c){const R={x:(n.x+o.x)/2+_.x,y:(n.y+o.y)/2+_.y},[F,O]=Bn(i,[f.x,f.y]),[U,Y]=Bn(i,[I.x,I.y]),W=eVe({x:U-F,y:Y-O});let te=Math.atan2(W.y,W.x)*180/Math.PI;(te\u003e90||te\u003c-90)\u0026\u0026(te+=180);const j=typeof l==\"number\"\u0026\u0026Number.isFinite(l)?te-l:te;let J=0;if(c\u0026\u0026typeof l==\"number\"\u0026\u0026Number.isFinite(l)){const ne=c.length*s*lli,le=s,ge=l*Math.PI/180,_e=Math.abs(Math.sin(ge)),ue=Math.abs(Math.cos(ge)),fe=ne/2,pe=le/2;J=fe*_e+pe*ue+s*uli}const oe=a*cli+J,ie={x:R.x+h.x*oe,y:R.y+h.y*oe};SY({ctx:e,text:c,x:ie.x,y:ie.y,fontSize:s,color:E,realToCanvasMat:i,anchorAlignment:\"center\",rotation:-j})}}function gli(t){const{ctx:e,pcbFabricationNoteDimension:n,realToCanvasMat:o,colorMap:i}=t,r=n.color??i.fabricationNote;_on({ctx:e,from:n.from,to:n.to,realToCanvasMat:o,color:r,fontSize:n.font_size??1,arrowSize:n.arrow_size??1,text:n.text,textRotation:n.text_ccw_rotation,offset:n.offset_distance\u0026\u0026n.offset_direction?{distance:n.offset_distance,direction:n.offset_direction}:void 0})}function QY(t){const{ctx:e,start:n,end:o,strokeWidth:i,stroke:r,realToCanvasMat:s,lineCap:a=\"round\"}=t,[A,c]=Bn(s,[n.x,n.y]),[l,u]=Bn(s,[o.x,o.y]),g=i*Math.abs(s.a);e.beginPath(),e.moveTo(A,c),e.lineTo(l,u),e.lineWidth=g,e.strokeStyle=r,e.lineCap=a,e.stroke()}function dli(t){const{ctx:e,path:n,realToCanvasMat:o,colorMap:i}=t,r=i.fabricationNote,s=n.color??r;if(!(!n.route||n.route.length\u003c2))for(let a=0;a\u003cn.route.length-1;a++){const A=n.route[a],c=n.route[a+1];!A||!c||QY({ctx:e,start:{x:A.x,y:A.y},end:{x:c.x,y:c.y},strokeWidth:n.stroke_width??.1,stroke:s,realToCanvasMat:o})}}function hli(t){const{ctx:e,rect:n,realToCanvasMat:o,colorMap:i}=t,r=i.fabricationNote,s=n.color??r,a=n.is_filled??!1,A=n.has_stroke??!0,c=n.is_stroke_dashed??!1;Bp({ctx:e,center:n.center,width:n.width,height:n.height,fill:a?s:void 0,stroke:A?s:void 0,strokeWidth:A?n.stroke_width:void 0,borderRadius:n.corner_radius,realToCanvasMat:o,isStrokeDashed:c})}function pli(t,e){return e.fabricationNote}function mli(t){const{ctx:e,text:n,realToCanvasMat:o,colorMap:i}=t,r=pli(n.layer,i),s=n.color??r,a=n.font_size;SY({ctx:e,text:n.text,x:n.anchor_position.x,y:n.anchor_position.y,fontSize:a,color:s,realToCanvasMat:o,anchorAlignment:n.anchor_alignment})}function JB(t){const{ctx:e,center:n,radius_x:o,radius_y:i,fill:r,stroke:s,strokeWidth:a=.1,realToCanvasMat:A,rotation:c=0}=t,[l,u]=Bn(A,[n.x,n.y]),g=o*Math.abs(A.a),h=i*Math.abs(A.a),d=a*Math.abs(A.a);e.save(),e.translate(l,u),c!==0\u0026\u0026e.rotate(-c*(Math.PI/180)),e.beginPath(),e.ellipse(0,0,g,h,0,0,Math.PI*2),r\u0026\u0026(e.fillStyle=r,e.fill()),s\u0026\u0026(e.strokeStyle=s,e.lineWidth=d,e.stroke()),e.restore()}function A_(t){const{ctx:e,center:n,width:o,height:i,fill:r,realToCanvasMat:s,rotation:a=0,stroke:A,strokeWidth:c}=t,[l,u]=Bn(s,[n.x,n.y]),g=o*Math.abs(s.a),h=i*Math.abs(s.a),d=c?c*Math.abs(s.a):void 0;if(e.save(),e.translate(l,u),a!==0\u0026\u0026e.rotate(-a*(Math.PI/180)),e.beginPath(),g\u003eh){const p=h/2,m=g-h;e.moveTo(-m/2,-p),e.lineTo(m/2,-p),e.arc(m/2,0,p,-Math.PI/2,Math.PI/2),e.lineTo(-m/2,p),e.arc(-m/2,0,p,Math.PI/2,-Math.PI/2)}else if(h\u003eg){const p=g/2,m=h-g;e.moveTo(p,-m/2),e.lineTo(p,m/2),e.arc(0,m/2,p,0,Math.PI),e.lineTo(-p,-m/2),e.arc(0,-m/2,p,Math.PI,0)}else e.arc(0,0,g/2,0,Math.PI*2);e.closePath(),r\u0026\u0026(e.fillStyle=r,e.fill()),A\u0026\u0026d\u0026\u0026(e.strokeStyle=A,e.lineWidth=d,e.stroke()),e.restore()}function Fhe(t){return\"ccw_rotation\"in t\u0026\u0026typeof t.ccw_rotation==\"number\"?t.ccw_rotation:0}function fon(t){const{ctx:e,hole:n,realToCanvasMat:o,colorMap:i,soldermaskMargin:r=0,drawSoldermask:s=!1}=t;if(s\u0026\u0026n.is_covered_with_solder_mask===!0)return;const a=r\u003c0?Math.abs(r):0;if(n.hole_shape===\"circle\"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2-a,fill:i.drill,realToCanvasMat:o});return}if(n.hole_shape===\"square\"){const A=Fhe(n);Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_diameter-a*2,height:n.hole_diameter-a*2,fill:i.drill,realToCanvasMat:o,ccwRotationDegrees:A});return}if(n.hole_shape===\"oval\"){const A=Fhe(n);JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2-a,radius_y:n.hole_height/2-a,fill:i.drill,realToCanvasMat:o,rotation:A});return}if(n.hole_shape===\"rect\"){const A=Fhe(n);Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width-a*2,height:n.hole_height-a*2,fill:i.drill,realToCanvasMat:o,ccwRotationDegrees:A});return}if(n.hole_shape===\"pill\"||n.hole_shape===\"rotated_pill\"){const A=Fhe(n);A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width-a*2,height:n.hole_height-a*2,fill:i.drill,realToCanvasMat:o,rotation:A});return}}function _li(t){const{ctx:e,cx:n,cy:o,radius:i}=t;e.beginPath(),e.arc(n,o,i,0,Math.PI*2)}function fli(t){const{ctx:e,cx:n,cy:o,width:i,height:r}=t;e.beginPath(),e.rect(n-i/2,o-r/2,i,r)}function aS(t){const{ctx:e,cx:n,cy:o,width:i,height:r,ccwRotationDegrees:s=0}=t,a=s*Math.PI/180,A=Ad(pA(n,o),vQ(-a));if(i\u003er){const c=r/2,l=(i-r)/2,u=Bn(A,{x:-l,y:0}),g=Bn(A,{x:l,y:0}),h=Bn(A,{x:l,y:-c});e.moveTo(h.x,h.y),e.arc(g.x,g.y,c,-a-Math.PI/2,-a+Math.PI/2),e.arc(u.x,u.y,c,-a+Math.PI/2,-a-Math.PI/2)}else if(r\u003ei){const c=i/2,l=(r-i)/2,u=Bn(A,{x:0,y:-l}),g=Bn(A,{x:0,y:l}),h=Bn(A,{x:c,y:l});e.moveTo(h.x,h.y),e.arc(g.x,g.y,c,-a,-a+Math.PI),e.arc(u.x,u.y,c,-a+Math.PI,-a)}else{const c=i/2;e.moveTo(n+c,o),e.arc(n,o,c,0,Math.PI*2)}e.closePath()}function aP(t){const{ctx:e,points:n}=t;if(n.length\u003c3)return;const o=n[0];if(o){e.moveTo(o.x,o.y);for(let i=1;i\u003cn.length;i++){const r=n[i];r\u0026\u0026e.lineTo(r.x,r.y)}e.closePath()}}function xE(t){const{ctx:e,cx:n,cy:o,width:i,height:r,radius:s,ccwRotationDegrees:a=0}=t,A=a*Math.PI/180,c=Ad(pA(n,o),vQ(-A)),l=i/2,u=r/2,g=Math.min(s,l,u);if(g\u003e0){const h=Bn(c,{x:-l,y:-u}),d=Bn(c,{x:l,y:-u}),p=Bn(c,{x:l,y:u}),m=Bn(c,{x:-l,y:u}),_=Bn(c,{x:-l,y:0});e.moveTo(_.x,_.y),e.arcTo(h.x,h.y,d.x,d.y,g),e.arcTo(d.x,d.y,p.x,p.y,g),e.arcTo(p.x,p.y,m.x,m.y,g),e.arcTo(m.x,m.y,h.x,h.y,g)}else{const h=Bn(c,{x:-l,y:-u}),d=Bn(c,{x:l,y:-u}),p=Bn(c,{x:l,y:u}),m=Bn(c,{x:-l,y:u});e.moveTo(h.x,h.y),e.lineTo(d.x,d.y),e.lineTo(p.x,p.y),e.lineTo(m.x,m.y)}e.closePath()}function Ili(t){const{ctx:e,pad:n,realToCanvasMat:o,color:i,drillCutouts:r}=t;if(e.save(),e.beginPath(),!Ion(e,n,o)){e.restore();return}e.clip(),e.beginPath(),Ion(e,n,o);for(const s of r)yli(e,s,o);e.fillStyle=i,e.fill(\"evenodd\"),e.restore()}function Cli(t){const{pad:e,holes:n=[],platedHoles:o=[],vias:i=[],cutouts:r=[]}=t,s=Eli(e);if(!s)return[];const a=[],A=c=\u003e{c\u0026\u0026Sli(s,Bli(c))\u0026\u0026a.push(c)};for(const c of r)A(bli(c));for(const c of n)A(Qli(c));for(const c of o)bon(c.layers,e.layer)\u0026\u0026A(vli(c));for(const c of i){if(!bon(c.layers,e.layer))continue;const l=c.hole_diameter/2;if(l\u003c=0)continue;const u={shape:\"circle\",x:c.x,y:c.y,radius:l};A(u)}return a}function Ion(t,e,n){return e.shape===\"rect\"||e.shape===\"rotated_rect\"?(yon(t,{x:e.x,y:e.y,width:e.width,height:e.height,radius:wli(e),rotation:e.shape===\"rotated_rect\"?e.ccw_rotation??0:0,realToCanvasMat:n}),!0):e.shape===\"circle\"?(Con(t,{x:e.x,y:e.y,radius:e.radius,realToCanvasMat:n}),!0):e.shape===\"pill\"||e.shape===\"rotated_pill\"?(xon(t,{x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.shape===\"rotated_pill\"?e.ccw_rotation??0:0,realToCanvasMat:n}),!0):e.shape===\"polygon\"\u0026\u0026e.points\u0026\u0026e.points.length\u003e=3?(Eon(t,e.points,n),!0):!1}function yli(t,e,n){if(e.shape===\"circle\"){Con(t,{x:e.x,y:e.y,radius:e.radius,realToCanvasMat:n});return}if(e.shape===\"oval\"){xli(t,{x:e.x,y:e.y,radiusX:e.radiusX,radiusY:e.radiusY,rotation:e.rotation,realToCanvasMat:n});return}if(e.shape===\"pill\"){xon(t,{x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,realToCanvasMat:n});return}if(e.shape===\"polygon\"){Eon(t,e.points,n);return}yon(t,{x:e.x,y:e.y,width:e.width,height:e.height,radius:e.radius,rotation:e.rotation,realToCanvasMat:n})}function Con(t,e){const{x:n,y:o,radius:i,realToCanvasMat:r}=e,[s,a]=Bn(r,[n,o]),A=i*Math.abs(r.a);t.moveTo(s+A,a),t.arc(s,a,A,0,Math.PI*2),t.closePath()}function xli(t,e){const{x:n,y:o,radiusX:i,radiusY:r,rotation:s=0,realToCanvasMat:a}=e,[A,c]=Bn(a,[n,o]),l=i*Math.abs(a.a),u=r*Math.abs(a.a);t.save(),t.translate(A,c),s!==0\u0026\u0026t.rotate(-s*(Math.PI/180)),t.moveTo(l,0),t.ellipse(0,0,l,u,0,0,Math.PI*2),t.closePath(),t.restore()}function yon(t,e){const{x:n,y:o,width:i,height:r,radius:s=0,rotation:a=0,realToCanvasMat:A}=e,[c,l]=Bn(A,[n,o]),u=i*Math.abs(A.a),g=r*Math.abs(A.a),h=s*Math.abs(A.a);if(t.save(),t.translate(c,l),a!==0\u0026\u0026t.rotate(-a*(Math.PI/180)),h\u003e0){const d=-u/2,p=-g/2,m=Math.min(h,u/2,g/2);t.moveTo(d+m,p),t.lineTo(d+u-m,p),t.arcTo(d+u,p,d+u,p+m,m),t.lineTo(d+u,p+g-m),t.arcTo(d+u,p+g,d+u-m,p+g,m),t.lineTo(d+m,p+g),t.arcTo(d,p+g,d,p+g-m,m),t.lineTo(d,p+m),t.arcTo(d,p,d+m,p,m),t.closePath()}else t.rect(-u/2,-g/2,u,g);t.restore()}function xon(t,e){const{x:n,y:o,width:i,height:r,rotation:s=0,realToCanvasMat:a}=e,[A,c]=Bn(a,[n,o]),l=i*Math.abs(a.a),u=r*Math.abs(a.a);if(t.save(),t.translate(A,c),s!==0\u0026\u0026t.rotate(-s*(Math.PI/180)),l\u003eu){const g=u/2,h=l-u;t.moveTo(-h/2,-g),t.lineTo(h/2,-g),t.arc(h/2,0,g,-Math.PI/2,Math.PI/2),t.lineTo(-h/2,g),t.arc(-h/2,0,g,Math.PI/2,-Math.PI/2)}else if(u\u003el){const g=l/2,h=u-l;t.moveTo(g,-h/2),t.lineTo(g,h/2),t.arc(0,h/2,g,0,Math.PI),t.lineTo(-g,-h/2),t.arc(0,-h/2,g,Math.PI,0)}else t.moveTo(l/2,0),t.arc(0,0,l/2,0,Math.PI*2);t.closePath(),t.restore()}function Eon(t,e,n){const o=e[0];if(!o)return;const[i,r]=Bn(n,[o.x,o.y]);t.moveTo(i,r);for(let s=1;s\u003ce.length;s++){const a=e[s];if(!a)continue;const[A,c]=Bn(n,[a.x,a.y]);t.lineTo(A,c)}t.closePath()}function Eli(t){if(t.shape===\"circle\")return AP(t.x,t.y,t.radius,t.radius);if(t.shape===\"rect\"||t.shape===\"rotated_rect\"||t.shape===\"pill\"||t.shape===\"rotated_pill\"){const e=Math.hypot(t.width/2,t.height/2);return(t.shape===\"rotated_rect\"||t.shape===\"rotated_pill\")\u0026\u0026(t.ccw_rotation??0)!==0?AP(t.x,t.y,e,e):AP(t.x,t.y,t.width/2,t.height/2)}if(t.shape===\"polygon\"\u0026\u0026t.points\u0026\u0026t.points.length\u003e=3)return Bon(t.points)}function Bli(t){if(t.shape===\"polygon\")return Bon(t.points);if(t.shape===\"circle\")return AP(t.x,t.y,t.radius,t.radius);if(t.shape===\"oval\"){if((t.rotation??0)!==0){const o=Math.hypot(t.radiusX,t.radiusY);return AP(t.x,t.y,o,o)}return AP(t.x,t.y,t.radiusX,t.radiusY)}const e=t.width/2,n=t.height/2;if((t.rotation??0)!==0){const o=Math.hypot(e,n);return AP(t.x,t.y,o,o)}return AP(t.x,t.y,e,n)}function bli(t){if(t.shape===\"circle\")return t.radius\u003c=0?void 0:{shape:\"circle\",x:t.center.x,y:t.center.y,radius:t.radius};if(t.shape===\"rect\")return t.width\u003c=0||t.height\u003c=0?void 0:{shape:\"rect\",x:t.center.x,y:t.center.y,width:t.width,height:t.height,radius:t.corner_radius,rotation:t.rotation};if(t.shape===\"polygon\"\u0026\u0026t.points.length\u003e=3)return{shape:\"polygon\",points:t.points}}function Bon(t){let e=1/0,n=-1/0,o=1/0,i=-1/0;for(const r of t)e=Math.min(e,r.x),n=Math.max(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.y);return{minX:e,maxX:n,minY:o,maxY:i}}function AP(t,e,n,o){return{minX:t-n,maxX:t+n,minY:e-o,maxY:e+o}}function Sli(t,e){return t.minX\u003c=e.maxX\u0026\u0026t.maxX\u003e=e.minX\u0026\u0026t.minY\u003c=e.maxY\u0026\u0026t.maxY\u003e=e.minY}function Qli(t){if(t.hole_shape===\"circle\"){const e=t.hole_diameter/2;return e\u003c=0?void 0:{shape:\"circle\",x:t.x,y:t.y,radius:e}}if(t.hole_shape===\"square\")return t.hole_diameter\u003c=0?void 0:{shape:\"rect\",x:t.x,y:t.y,width:t.hole_diameter,height:t.hole_diameter,rotation:Lhe(t)};if(t.hole_shape===\"oval\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"oval\",x:t.x,y:t.y,radiusX:t.hole_width/2,radiusY:t.hole_height/2,rotation:Lhe(t)};if(t.hole_shape===\"rect\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"rect\",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:Lhe(t)};if(t.hole_shape===\"pill\"||t.hole_shape===\"rotated_pill\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"pill\",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:Lhe(t)}}function vli(t){if(t.shape===\"circle\"){const i=t.hole_diameter/2;return i\u003c=0?void 0:{shape:\"circle\",x:t.x,y:t.y,radius:i}}if(t.shape===\"oval\"){const i=t.hole_width/2,r=t.hole_height/2;return i\u003c=0||r\u003c=0?void 0:{shape:\"oval\",x:t.x,y:t.y,radiusX:i,radiusY:r,rotation:t.ccw_rotation}}if(t.shape===\"pill\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"pill\",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:t.ccw_rotation};if(t.shape===\"circular_hole_with_rect_pad\"){const i=t.hole_diameter/2;return i\u003c=0?void 0:{shape:\"circle\",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),radius:i}}if(t.shape===\"pill_hole_with_rect_pad\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"pill\",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height};if(t.shape===\"rotated_pill_hole_with_rect_pad\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"pill\",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height,rotation:t.hole_ccw_rotation};if(t.shape!==\"hole_with_polygon_pad\")return;const e=t.x+(t.hole_offset_x??0),n=t.y+(t.hole_offset_y??0),o=t.hole_shape;if(o===\"circle\"){const i=(t.hole_diameter??0)/2;return i\u003c=0?void 0:{shape:\"circle\",x:e,y:n,radius:i}}if(o===\"oval\"){const i=(t.hole_width??0)/2,r=(t.hole_height??0)/2;return i\u003c=0||r\u003c=0?void 0:{shape:\"oval\",x:e,y:n,radiusX:i,radiusY:r}}if(o===\"pill\"||o===\"rotated_pill\"){const i=t.hole_width??0,r=t.hole_height??0;return i\u003c=0||r\u003c=0?void 0:{shape:\"pill\",x:e,y:n,width:i,height:r,rotation:o===\"rotated_pill\"?t.ccw_rotation:0}}}function Lhe(t){return\"ccw_rotation\"in t\u0026\u0026typeof t.ccw_rotation==\"number\"?t.ccw_rotation:0}function wli(t){return t.shape===\"rect\"||t.shape===\"rotated_rect\"?t.corner_radius??t.rect_border_radius??0:0}function bon(t,e){if(!t||t.length===0)return!0;const n=Son(e);return t.some(o=\u003eSon(o)===n)}function Son(t){if(typeof t==\"string\")return t;if(t\u0026\u0026typeof t==\"object\"\u0026\u0026\"name\"in t\u0026\u0026typeof t.name==\"string\")return t.name}function Pli(t,e){const n=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16);return`rgba(${n}, ${o}, ${i}, ${e})`}function Mli(t,e){return t.layers.includes(\"bottom\")\u0026\u0026!t.layers.includes(\"top\")?e.keepout.bottom:e.keepout.top}function Qon(t){const{ctx:e,strokeColor:n,hatchWidth:o,hatchSpacing:i,diagonal:r,getLineEndpoints:s}=t;e.strokeStyle=n,e.lineWidth=o,e.setLineDash([]);for(let a=-r;a\u003cr*2;a+=i){const{startX:A,startY:c,endX:l,endY:u}=s(a);e.beginPath(),e.moveTo(A,c),e.lineTo(l,u),e.stroke()}}function von(t){const{ctx:e,fillColor:n,drawPath:o,drawHatch:i}=t;o(),e.fillStyle=n,e.fill(),o(),e.clip(),i()}function Dli(t){const{ctx:e,keepout:n,realToCanvasMat:o,colorMap:i}=t,r=Math.abs(o.a),s=Mli(n,i),a=Pli(s,.2),A=1*r,c=.15*r;if(n.shape===\"rect\"){const[l,u]=Bn(o,[n.center.x,n.center.y]),g=n.width*r,h=n.height*r,d=n.rotation??0,p=Math.sqrt(g*g+h*h),m=g/2,_=h/2;e.save(),e.translate(l,u),d!==0\u0026\u0026e.rotate(-d*(Math.PI/180)),von({ctx:e,fillColor:a,drawPath:()=\u003efli({ctx:e,cx:0,cy:0,width:g,height:h}),drawHatch:()=\u003eQon({ctx:e,strokeColor:s,hatchWidth:c,hatchSpacing:A,diagonal:p,getLineEndpoints:f=\u003e({startX:-m+f,startY:-_,endX:-m+f+p,endY:-_+p})})}),e.restore();return}if(n.shape===\"circle\"){const[l,u]=Bn(o,[n.center.x,n.center.y]),g=n.radius*r,h=g*2;e.save(),e.translate(l,u),von({ctx:e,fillColor:a,drawPath:()=\u003e_li({ctx:e,cx:0,cy:0,radius:g}),drawHatch:()=\u003eQon({ctx:e,strokeColor:s,hatchWidth:c,hatchSpacing:A,diagonal:h,getLineEndpoints:d=\u003e({startX:d-h,startY:-h,endX:d+h,endY:h})})}),e.restore()}}var Nli=\"rgba(255,255,255,0.5)\";function Rli(t){const{ctx:e,pcbNoteDimension:n,realToCanvasMat:o}=t,i=n.color??Nli;_on({ctx:e,from:n.from,to:n.to,realToCanvasMat:o,color:i,fontSize:n.font_size,arrowSize:n.arrow_size,text:n.text,textRotation:n.text_ccw_rotation,offset:n.offset_distance\u0026\u0026n.offset_direction?{distance:n.offset_distance,direction:n.offset_direction}:void 0})}function Tli(t){const{ctx:e,line:n,realToCanvasMat:o}=t,r=n.color??\"rgb(89, 148, 220)\",s=n.stroke_width??.1,a=n.is_dashed??!1,[A,c]=Bn(o,[n.x1,n.y1]),[l,u]=Bn(o,[n.x2,n.y2]),g=s*Math.abs(o.a);e.save(),a?e.setLineDash([g*2,g*2]):e.setLineDash([]),e.beginPath(),e.moveTo(A,c),e.lineTo(l,u),e.lineWidth=g,e.strokeStyle=r,e.lineCap=\"round\",e.stroke(),e.restore()}function kli(t){const{ctx:e,path:n,realToCanvasMat:o}=t,r=n.color??\"rgb(89, 148, 220)\";if(!(!n.route||n.route.length\u003c2))for(let s=0;s\u003cn.route.length-1;s++){const a=n.route[s],A=n.route[s+1];!a||!A||QY({ctx:e,start:{x:a.x,y:a.y},end:{x:A.x,y:A.y},strokeWidth:n.stroke_width??.1,stroke:r,realToCanvasMat:o})}}function Fli(t){const{ctx:e,rect:n,realToCanvasMat:o}=t,r=n.color??\"rgb(89, 148, 220)\",s=n.is_filled??!1,a=n.has_stroke??!0,A=n.is_stroke_dashed??!1;Bp({ctx:e,center:n.center,width:n.width,height:n.height,fill:s?r:void 0,stroke:a?r:void 0,strokeWidth:a?n.stroke_width:void 0,borderRadius:n.corner_radius,realToCanvasMat:o,isStrokeDashed:A})}var Lli=\"rgb(89, 148, 220)\";function Hli(t){const{ctx:e,text:n,realToCanvasMat:o}=t,i=Lli,r=n.color??i,s=n.font_size??1;SY({ctx:e,text:n.text??\"\",x:n.anchor_position.x,y:n.anchor_position.y,fontSize:s,color:r,realToCanvasMat:o,anchorAlignment:n.anchor_alignment??\"center\",mirrorX:n.is_mirrored_from_top_view??n.layer===\"bottom\"})}function Oli(t){const{ctx:e,panel:n,realToCanvasMat:o,colorMap:i}=t,{width:r,height:s,center:a}=n;if(r!==void 0\u0026\u0026s!==void 0\u0026\u0026a){const A=r/2,c=s/2,l=[{x:a.x-A,y:a.y-c},{x:a.x+A,y:a.y-c},{x:a.x+A,y:a.y+c},{x:a.x-A,y:a.y+c}];khe({ctx:e,points:l,stroke:i.boardOutline,strokeWidth:.5,realToCanvasMat:o,closePath:!0})}}function CX(t,e){if(t.length\u003c3||e===0)return t;let n=0,o=0;for(const r of t)n+=r.x,o+=r.y;n/=t.length,o/=t.length;const i=[];for(const r of t){const s=r.x-n,a=r.y-o,A=Math.sqrt(s*s+a*a);if(A\u003e0){const c=s/A,l=a/A;i.push({x:r.x+c*e,y:r.y+l*e})}else i.push({x:r.x+e,y:r.y})}return i}function won(t){const{ctx:e,hole:n,realToCanvasMat:o,colorMap:i,soldermaskMargin:r=0,drawSoldermask:s}=t;if(n.is_covered_with_solder_mask===!0\u0026\u0026s)return;const a=i.copper[t.layer??\"top\"],A=r\u003c0?Math.abs(r):0;if(n.shape===\"circle\"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.outer_diameter/2-A,fill:a,realToCanvasMat:o}),B6(e,()=\u003e{dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:\"#000\",realToCanvasMat:o})}),dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:i.drill,realToCanvasMat:o});return}if(n.shape===\"oval\"){JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.outer_width/2-A,radius_y:n.outer_height/2-A,fill:a,realToCanvasMat:o,rotation:n.ccw_rotation}),B6(e,()=\u003e{JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2,radius_y:n.hole_height/2,fill:\"#000\",realToCanvasMat:o,rotation:n.ccw_rotation})}),JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2,radius_y:n.hole_height/2,fill:i.drill,realToCanvasMat:o,rotation:n.ccw_rotation});return}if(n.shape===\"pill\"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.outer_width-A*2,height:n.outer_height-A*2,fill:a,realToCanvasMat:o,rotation:n.ccw_rotation}),B6(e,()=\u003e{A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,fill:\"#000\",realToCanvasMat:o,rotation:n.ccw_rotation})}),A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,fill:i.drill,realToCanvasMat:o,rotation:n.ccw_rotation});return}if(n.shape===\"circular_hole_with_rect_pad\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width-A*2,height:n.rect_pad_height-A*2,fill:a,realToCanvasMat:o,borderRadius:n.rect_border_radius?Math.max(0,n.rect_border_radius-A):0,ccwRotationDegrees:n.rect_ccw_rotation});const c=n.x+(n.hole_offset_x??0),l=n.y+(n.hole_offset_y??0);B6(e,()=\u003e{dm({ctx:e,center:{x:c,y:l},radius:n.hole_diameter/2,fill:\"#000\",realToCanvasMat:o})}),dm({ctx:e,center:{x:c,y:l},radius:n.hole_diameter/2,fill:i.drill,realToCanvasMat:o});return}if(n.shape===\"pill_hole_with_rect_pad\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width-A*2,height:n.rect_pad_height-A*2,fill:a,realToCanvasMat:o,borderRadius:n.rect_border_radius?Math.max(0,n.rect_border_radius-A):0});const c=n.x+(n.hole_offset_x??0),l=n.y+(n.hole_offset_y??0);B6(e,()=\u003e{A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:\"#000\",realToCanvasMat:o})}),A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:i.drill,realToCanvasMat:o});return}if(n.shape===\"rotated_pill_hole_with_rect_pad\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width-A*2,height:n.rect_pad_height-A*2,fill:a,realToCanvasMat:o,borderRadius:n.rect_border_radius?Math.max(0,n.rect_border_radius-A):0,ccwRotationDegrees:n.rect_ccw_rotation});const c=n.x+(n.hole_offset_x??0),l=n.y+(n.hole_offset_y??0);B6(e,()=\u003e{A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:\"#000\",realToCanvasMat:o,rotation:n.hole_ccw_rotation})}),A_({ctx:e,center:{x:c,y:l},width:n.hole_width,height:n.hole_height,fill:i.drill,realToCanvasMat:o,rotation:n.hole_ccw_rotation});return}if(n.shape===\"hole_with_polygon_pad\"){const c=n.pad_outline;if(c\u0026\u0026c.length\u003e=3){const h=c.map(p=\u003e({x:n.x+p.x,y:n.y+p.y})),d=A\u003e0?CX(h,-A):h;d.length\u003e=3\u0026\u0026sP({ctx:e,points:d,fill:a,realToCanvasMat:o})}const l=n.x+(n.hole_offset_x??0),u=n.y+(n.hole_offset_y??0),g=n.hole_shape;g===\"circle\"?(B6(e,()=\u003e{dm({ctx:e,center:{x:l,y:u},radius:(n.hole_diameter??0)/2,fill:\"#000\",realToCanvasMat:o})}),dm({ctx:e,center:{x:l,y:u},radius:(n.hole_diameter??0)/2,fill:i.drill,realToCanvasMat:o})):g===\"oval\"?(B6(e,()=\u003e{JB({ctx:e,center:{x:l,y:u},radius_x:(n.hole_width??0)/2,radius_y:(n.hole_height??0)/2,fill:\"#000\",realToCanvasMat:o})}),JB({ctx:e,center:{x:l,y:u},radius_x:(n.hole_width??0)/2,radius_y:(n.hole_height??0)/2,fill:i.drill,realToCanvasMat:o})):g===\"pill\"?(B6(e,()=\u003e{A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:\"#000\",realToCanvasMat:o})}),A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:i.drill,realToCanvasMat:o})):g===\"rotated_pill\"\u0026\u0026(B6(e,()=\u003e{A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:\"#000\",realToCanvasMat:o})}),A_({ctx:e,center:{x:l,y:u},width:n.hole_width??0,height:n.hole_height??0,fill:i.drill,realToCanvasMat:o}));return}}function B6(t,e){t.save(),t.globalCompositeOperation=\"destination-out\",e(),t.restore()}function Gli(t,e){return t===\"bottom\"?e.silkscreen.bottom:e.silkscreen.top}function Yli(t){const{ctx:e,circle:n,realToCanvasMat:o,colorMap:i}=t,r=Gli(n.layer,i);dm({ctx:e,center:n.center,radius:n.radius,stroke:r,strokeWidth:n.stroke_width,realToCanvasMat:o})}function Uli(t){const{ctx:e,graphic:n,realToCanvasMat:o,colorMap:i}=t,r=n.layer===\"bottom\"?i.silkscreen.bottom:i.silkscreen.top;e.beginPath(),pon({ctx:e,shape:n.brep_shape,realToCanvasMat:o}),e.fillStyle=r,e.fill(\"evenodd\")}function Kli(t,e){return t===\"bottom\"?e.silkscreen.bottom:e.silkscreen.top}function Vli(t){const{ctx:e,line:n,realToCanvasMat:o,colorMap:i}=t,r=Kli(n.layer,i);QY({ctx:e,start:{x:n.x1,y:n.y1},end:{x:n.x2,y:n.y2},strokeWidth:n.stroke_width??.1,stroke:r,realToCanvasMat:o})}function zli(t,e){return t===\"bottom\"?e.silkscreen.bottom:e.silkscreen.top}function Jli(t){const{ctx:e,oval:n,realToCanvasMat:o,colorMap:i}=t,r=zli(n.layer,i);JB({ctx:e,center:n.center,radius_x:n.radius_x,radius_y:n.radius_y,stroke:r,strokeWidth:.1,realToCanvasMat:o,rotation:n.ccw_rotation??0})}function Wli(t,e){return t===\"bottom\"?e.silkscreen.bottom:e.silkscreen.top}function jli(t){const{ctx:e,path:n,realToCanvasMat:o,colorMap:i}=t,r=Wli(n.layer,i);if(!(!n.route||n.route.length\u003c2))for(let s=0;s\u003cn.route.length-1;s++){const a=n.route[s],A=n.route[s+1];!a||!A||QY({ctx:e,start:{x:a.x,y:a.y},end:{x:A.x,y:A.y},strokeWidth:n.stroke_width??.1,stroke:r,realToCanvasMat:o})}}function $li(t,e){return t===\"bottom\"?e.silkscreen.bottom:e.silkscreen.top}function qli(t){const{ctx:e,pill:n,realToCanvasMat:o,colorMap:i}=t,r=$li(n.layer,i);A_({ctx:e,center:n.center,width:n.width,height:n.height,stroke:r,strokeWidth:.2,realToCanvasMat:o})}function Xli(t,e){return t===\"bottom\"?e.silkscreen.bottom:e.silkscreen.top}function Zli(t){const{ctx:e,rect:n,realToCanvasMat:o,colorMap:i}=t,r=Xli(n.layer,i);Bp({ctx:e,center:n.center,width:n.width,height:n.height,borderRadius:n.corner_radius,fill:n.is_filled?r:\"transparent\",stroke:r,strokeWidth:n.stroke_width,realToCanvasMat:o})}function e0i(t,e){return t===\"bottom\"?e.silkscreen.bottom:e.silkscreen.top}function t0i(t){return t||\"center\"}function n0i(t){const{ctx:e,text:n,realToCanvasMat:o,colorMap:i}=t,r=n.text??\"\";if(!r)return;const s=e0i(n.layer,i),a=t0i(n.anchor_alignment),A=n.font_size??1;SY({ctx:e,text:r,x:n.anchor_position.x,y:n.anchor_position.y,fontSize:A,color:s,realToCanvasMat:o,anchorAlignment:a,rotation:n.ccw_rotation??0,mirrorX:n.layer===\"bottom\",knockout:n.is_knockout,knockoutPadding:n.is_knockout?n.knockout_padding:void 0})}function o0i(t,e){return e.copper[t]??e.copper.top}function Pon(t){return t.shape===\"rect\"||t.shape===\"rotated_rect\"?t.corner_radius??t.rect_border_radius??0:0}function i0i(t){const{ctx:e,pad:n,realToCanvasMat:o,colorMap:i}=t,r=o0i(n.layer,i),s=Cli(t);if(s.length\u003e0){Ili({ctx:e,pad:n,realToCanvasMat:o,color:r,drillCutouts:s});return}if(n.shape===\"rect\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o,borderRadius:Pon(n)});return}if(n.shape===\"rotated_rect\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o,borderRadius:Pon(n),ccwRotationDegrees:n.ccw_rotation??0});return}if(n.shape===\"circle\"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.radius,fill:r,realToCanvasMat:o});return}if(n.shape===\"pill\"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o});return}if(n.shape===\"rotated_pill\"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,fill:r,realToCanvasMat:o,rotation:n.ccw_rotation??0});return}if(n.shape===\"polygon\"){n.points\u0026\u0026n.points.length\u003e=3\u0026\u0026sP({ctx:e,points:n.points,fill:r,realToCanvasMat:o});return}}var yX=\"rgb(105, 105, 105)\";function Mon(t){const{ctx:e,solderPaste:n,realToCanvasMat:o}=t,i={x:n.x,y:n.y};if(n.shape===\"rect\"){Bp({ctx:e,center:i,width:n.width,height:n.height,fill:yX,realToCanvasMat:o});return}if(n.shape===\"rotated_rect\"){Bp({ctx:e,center:i,width:n.width,height:n.height,fill:yX,realToCanvasMat:o,ccwRotationDegrees:n.ccw_rotation});return}if(n.shape===\"pill\"){A_({ctx:e,center:i,width:n.width,height:n.height,fill:yX,realToCanvasMat:o});return}if(n.shape===\"oval\"){JB({ctx:e,center:i,radius_x:n.width/2,radius_y:n.height/2,fill:yX,realToCanvasMat:o});return}n.shape===\"circle\"\u0026\u0026dm({ctx:e,center:i,radius:n.radius,fill:yX,realToCanvasMat:o})}function r0i(t){return typeof t==\"function\"}function Don(t,e,n){if(e\u003c=0||n\u003c=0)return null;const o=globalThis;let i=null;if(\"OffscreenCanvas\"in o\u0026\u0026typeof o.OffscreenCanvas==\"function\")i=new o.OffscreenCanvas(e,n);else if(\"document\"in o\u0026\u0026o.document\u0026\u0026typeof o.document.createElement==\"function\"){const s=o.document.createElement(\"canvas\");s.width=e,s.height=n,i=s}else{const s=t.canvas.constructor;if(r0i(s))try{i=new s(e,n)}catch{return null}}if(!i)return null;const r=i.getContext(\"2d\");return r\u0026\u0026(r.boardOwnerMap=t.boardOwnerMap),r}function s0i(t){return\"createPattern\"in t\u0026\u0026typeof Reflect.get(t,\"createPattern\")==\"function\"}function Non(t,e){if(t===e||e.canvas.width\u003c=0||e.canvas.height\u003c=0||!s0i(t))return!1;let n=null;try{n=t.createPattern(e.canvas,\"no-repeat\")}catch{return!1}return n?(t.save(),t.globalCompositeOperation=\"source-over\",t.fillStyle=n,t.fillRect(0,0,e.canvas.width,e.canvas.height),t.restore(),!0):!1}function Ron(t){const{ctx:e,board:n,realToCanvasMat:o,soldermaskColor:i}=t,{width:r,height:s,center:a,outline:A}=n;if(A\u0026\u0026Array.isArray(A)\u0026\u0026A.length\u003e=3){const c=A.map(l=\u003e{const[u,g]=Bn(o,[l.x,l.y]);return{x:u,y:g}});e.beginPath(),aP({ctx:e,points:c}),e.fillStyle=i,e.fill()}else if(r!==void 0\u0026\u0026s!==void 0\u0026\u0026a){const[c,l]=Bn(o,[a.x,a.y]),u=r*Math.abs(o.a),g=s*Math.abs(o.a);e.fillStyle=i,e.fillRect(c-u/2,l-g/2,u,g)}}function a0i(t){const{ctx:e,panel:n,realToCanvasMat:o,soldermaskColor:i}=t,{width:r,height:s,center:a}=n;if(r===void 0||s===void 0||!a)return;const[A,c]=Bn(o,[a.x,a.y]),l=r*Math.abs(o.a),u=s*Math.abs(o.a);e.fillStyle=i,e.fillRect(A-l/2,c-u/2,l,u)}function EE(t){t.save(),t.globalCompositeOperation=\"destination-out\",t.fill(),t.restore()}function A0i(t){const{ctx:e,cutout:n,realToCanvasMat:o}=t;if(n.shape===\"rect\"){const[i,r]=Bn(o,[n.center?.x??0,n.center?.y??0]),s=n.width*Math.abs(o.a),a=n.height*Math.abs(o.a),A=(n.corner_radius??0)*Math.abs(o.a);e.save(),e.translate(i,r),n.rotation\u0026\u0026e.rotate(-n.rotation*Math.PI/180),e.beginPath(),xE({ctx:e,cx:0,cy:0,width:s,height:a,radius:A}),e.restore(),EE(e)}else if(n.shape===\"circle\"){const[i,r]=Bn(o,[n.center?.x??0,n.center?.y??0]),s=n.radius*Math.abs(o.a);e.beginPath(),e.arc(i,r,s,0,Math.PI*2),e.closePath(),EE(e)}else if(n.shape===\"polygon\"\u0026\u0026n.points\u0026\u0026n.points.length\u003e=3){const i=n.points.map(r=\u003e{const[s,a]=Bn(o,[r.x,r.y]);return{x:s,y:a}});e.beginPath(),aP({ctx:e,points:i}),EE(e)}}var s1=\"rgba(255, 255, 255, 1)\";function tVe(t){const{ctx:e,elements:n,layer:o,realToCanvasMat:i}=t;e.save(),e.globalCompositeOperation=\"destination-out\";for(const r of n){if(r.type===\"pcb_smtpad\"){if(r.layer!==o||r.is_covered_with_solder_mask===!0)continue;c0i({ctx:e,pad:r,realToCanvasMat:i});continue}if(r.type===\"pcb_plated_hole\"){if(r.layers\u0026\u0026!r.layers.includes(o)||r.is_covered_with_solder_mask===!0)continue;l0i({ctx:e,hole:r,realToCanvasMat:i});continue}if(r.type===\"pcb_via\"){if(r.layers\u0026\u0026!r.layers.includes(o))continue;dm({ctx:e,center:{x:r.x,y:r.y},radius:r.outer_diameter/2,fill:s1,realToCanvasMat:i});continue}if(r.type===\"pcb_hole\"){if(r.is_covered_with_solder_mask===!0)continue;u0i({ctx:e,hole:r,realToCanvasMat:i})}}e.restore()}function c0i(t){const{ctx:e,pad:n,realToCanvasMat:o}=t;if(n.shape===\"rect\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,borderRadius:n.corner_radius??n.rect_border_radius??0,fill:s1,realToCanvasMat:o});return}if(n.shape===\"rotated_rect\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,borderRadius:n.corner_radius??n.rect_border_radius??0,ccwRotationDegrees:n.ccw_rotation??0,fill:s1,realToCanvasMat:o});return}if(n.shape===\"circle\"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.radius,fill:s1,realToCanvasMat:o});return}if(n.shape===\"pill\"||n.shape===\"rotated_pill\"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.width,height:n.height,rotation:n.shape===\"rotated_pill\"?n.ccw_rotation??0:0,fill:s1,realToCanvasMat:o});return}n.shape===\"polygon\"\u0026\u0026n.points\u0026\u0026n.points.length\u003e=3\u0026\u0026sP({ctx:e,points:n.points,fill:s1,realToCanvasMat:o})}function l0i(t){const{ctx:e,hole:n,realToCanvasMat:o}=t;if(n.shape===\"circle\"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.outer_diameter/2,fill:s1,realToCanvasMat:o});return}if(n.shape===\"oval\"){JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.outer_width/2,radius_y:n.outer_height/2,rotation:n.ccw_rotation,fill:s1,realToCanvasMat:o});return}if(n.shape===\"pill\"){A_({ctx:e,center:{x:n.x,y:n.y},width:n.outer_width,height:n.outer_height,rotation:n.ccw_rotation,fill:s1,realToCanvasMat:o});return}if(n.shape===\"circular_hole_with_rect_pad\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width,height:n.rect_pad_height,borderRadius:n.rect_border_radius??0,ccwRotationDegrees:n.rect_ccw_rotation,fill:s1,realToCanvasMat:o});return}if(n.shape===\"pill_hole_with_rect_pad\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width,height:n.rect_pad_height,borderRadius:n.rect_border_radius??0,fill:s1,realToCanvasMat:o});return}if(n.shape===\"rotated_pill_hole_with_rect_pad\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.rect_pad_width,height:n.rect_pad_height,borderRadius:n.rect_border_radius??0,ccwRotationDegrees:n.rect_ccw_rotation,fill:s1,realToCanvasMat:o});return}n.shape===\"hole_with_polygon_pad\"\u0026\u0026n.pad_outline\u0026\u0026n.pad_outline.length\u003e=3\u0026\u0026sP({ctx:e,points:n.pad_outline.map(i=\u003e({x:n.x+i.x,y:n.y+i.y})),fill:s1,realToCanvasMat:o})}function u0i(t){const{ctx:e,hole:n,realToCanvasMat:o}=t,i=\"ccw_rotation\"in n\u0026\u0026typeof n.ccw_rotation==\"number\"?n.ccw_rotation:0;if(n.hole_shape===\"circle\"){dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:s1,realToCanvasMat:o});return}if(n.hole_shape===\"square\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_diameter,height:n.hole_diameter,ccwRotationDegrees:i,fill:s1,realToCanvasMat:o});return}if(n.hole_shape===\"oval\"){JB({ctx:e,center:{x:n.x,y:n.y},radius_x:n.hole_width/2,radius_y:n.hole_height/2,rotation:i,fill:s1,realToCanvasMat:o});return}if(n.hole_shape===\"rect\"){Bp({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,ccwRotationDegrees:i,fill:s1,realToCanvasMat:o});return}(n.hole_shape===\"pill\"||n.hole_shape===\"rotated_pill\")\u0026\u0026A_({ctx:e,center:{x:n.x,y:n.y},width:n.hole_width,height:n.hole_height,rotation:i,fill:s1,realToCanvasMat:o})}function g0i(t,e,n,o,i){if(Math.abs(i)\u003c1e-10)return null;const r=n-t,s=o-e,a=Math.hypot(r,s);if(a\u003c1e-10)return null;const A=Math.abs(i)*(a/2),c=a/2,l=(A*A+c*c)/(2*A),u=l-A,g=(t+n)/2,h=(e+o)/2,d=-s/a,p=r/a,m=i\u003e0?-1:1;return{centerX:g+m*d*u,centerY:h+m*p*u,radius:l}}function nVe(t,e,n,o,i,r,s){if(Math.abs(r)\u003c1e-10){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const a=g0i(e,n,o,i,r);if(!a){const[C,y]=Bn(s,[o,i]);t.lineTo(C,y);return}const[A,c]=Bn(s,[e,n]),[l,u]=Bn(s,[o,i]),[g,h]=Bn(s,[a.centerX,a.centerY]),d=Math.hypot(A-g,c-h),p=Math.atan2(c-h,A-g),m=Math.atan2(u-h,l-g),f=s.a*s.d-s.b*s.c\u003c0,I=r\u003e0?!f:f;t.arc(g,h,d,p,m,I)}function Ton(t,e,n){if(e.vertices.length\u003c2)return;if(e.vertices.length===2){const s=e.vertices[0],a=e.vertices[1];if(s\u0026\u0026a\u0026\u0026Math.abs((s.bulge??0)-1)\u003c1e-10\u0026\u0026Math.abs((a.bulge??0)-1)\u003c1e-10){const[A,c]=Bn(n,[s.x,s.y]);t.moveTo(A,c),nVe(t,s.x,s.y,a.x,a.y,1,n),nVe(t,a.x,a.y,s.x,s.y,1,n);return}}const o=e.vertices[0];if(!o)return;const[i,r]=Bn(n,[o.x,o.y]);t.moveTo(i,r);for(let s=0;s\u003ce.vertices.length;s++){const a=e.vertices[s],A=e.vertices[(s+1)%e.vertices.length];if(!a||!A)continue;const c=a.bulge??0;if(Math.abs(c)\u003c1e-10){const[l,u]=Bn(n,[A.x,A.y]);t.lineTo(l,u)}else nVe(t,a.x,a.y,A.x,A.y,c,n)}}function d0i(t){const{ctx:e,pour:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r,elements:s}=t;if(n.layer===r\u0026\u0026n.covered_with_solder_mask===!0){if(e.save(),e.fillStyle=i,n.shape===\"rect\"){const[a,A]=Bn(o,[n.center.x,n.center.y]),c=n.width*Math.abs(o.a),l=n.height*Math.abs(o.a);e.translate(a,A),n.rotation\u0026\u0026e.rotate(-n.rotation*(Math.PI/180)),e.beginPath(),e.rect(-c/2,-l/2,c,l),e.fill(),e.restore(),tVe({ctx:e,elements:s,layer:r,realToCanvasMat:o});return}if(n.shape===\"polygon\"){if(n.points\u0026\u0026n.points.length\u003e=3){const a=n.points.map(c=\u003eBn(o,[c.x,c.y])),A=a[0];if(A){e.beginPath();const[c,l]=A;e.moveTo(c,l);for(let u=1;u\u003ca.length;u++){const g=a[u];if(!g)continue;const[h,d]=g;e.lineTo(h,d)}e.closePath(),e.fill(),tVe({ctx:e,elements:s,layer:r,realToCanvasMat:o})}}e.restore();return}if(n.shape===\"brep\"){if(e.beginPath(),Ton(e,n.brep_shape.outer_ring,o),n.brep_shape.inner_rings)for(const a of n.brep_shape.inner_rings)Ton(e,a,o);e.fill(\"evenodd\"),tVe({ctx:e,elements:s,layer:r,realToCanvasMat:o}),e.restore();return}e.restore()}}function h0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i}=t,r=n.is_covered_with_solder_mask===!0,s=n.soldermask_margin??0;r?(e.fillStyle=i,Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),e.fill()):s\u003c0?(Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:s}),EE(e),p0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:s})):s\u003e0?(Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:s}),EE(e)):(Hhe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),EE(e))}function kon(t){return\"ccw_rotation\"in t\u0026\u0026typeof t.ccw_rotation==\"number\"?t.ccw_rotation:0}function Hhe(t){const{ctx:e,hole:n,realToCanvasMat:o,margin:i}=t,r=kon(n);if(n.hole_shape===\"circle\"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_diameter/2+i)*Math.abs(o.a);e.beginPath(),e.arc(s,a,A,0,Math.PI*2),e.closePath()}else if(n.hole_shape===\"square\"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_diameter+i*2)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0\u0026\u0026e.rotate(-r*Math.PI/180),e.beginPath(),e.rect(-A/2,-A/2,A,A),e.closePath(),e.restore()}else if(n.hole_shape===\"oval\"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_width/2+i)*Math.abs(o.a),c=(n.hole_height/2+i)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0\u0026\u0026e.rotate(-r*Math.PI/180),e.beginPath(),e.ellipse(0,0,A,c,0,0,Math.PI*2),e.closePath(),e.restore()}else if(n.hole_shape===\"rect\"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_width+i*2)*Math.abs(o.a),c=(n.hole_height+i*2)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0\u0026\u0026e.rotate(-r*Math.PI/180),e.beginPath(),e.rect(-A/2,-c/2,A,c),e.closePath(),e.restore()}else if(n.hole_shape===\"pill\"||n.hole_shape===\"rotated_pill\"){const[s,a]=Bn(o,[n.x,n.y]),A=(n.hole_width+i*2)*Math.abs(o.a),c=(n.hole_height+i*2)*Math.abs(o.a);e.save(),e.translate(s,a),r!==0\u0026\u0026e.rotate(-r*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:A,height:c}),e.restore()}}function p0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:r}=t,s=Math.abs(r),a=kon(n);if(e.fillStyle=i,n.hole_shape===\"circle\"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_diameter/2*Math.abs(o.a),u=s*Math.abs(o.a),g=Math.max(0,l-u);e.save(),e.beginPath(),e.arc(A,c,l,0,Math.PI*2),g\u003e0\u0026\u0026e.arc(A,c,g,0,Math.PI*2,!0),e.fill(\"evenodd\"),e.restore()}else if(n.hole_shape===\"square\"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_diameter*Math.abs(o.a),u=s*Math.abs(o.a),g=Math.max(0,l-u*2);e.save(),e.translate(A,c),a!==0\u0026\u0026e.rotate(-a*Math.PI/180),e.beginPath(),e.rect(-l/2,-l/2,l,l),g\u003e0\u0026\u0026e.rect(-g/2,-g/2,g,g),e.fill(\"evenodd\"),e.restore()}else if(n.hole_shape===\"oval\"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_width/2*Math.abs(o.a),u=n.hole_height/2*Math.abs(o.a),g=s*Math.abs(o.a),h=Math.max(0,l-g),d=Math.max(0,u-g);e.save(),e.translate(A,c),a!==0\u0026\u0026e.rotate(-a*Math.PI/180),e.beginPath(),e.ellipse(0,0,l,u,0,0,Math.PI*2),h\u003e0\u0026\u0026d\u003e0\u0026\u0026(e.moveTo(h,0),e.ellipse(0,0,h,d,0,0,Math.PI*2)),e.fill(\"evenodd\"),e.restore()}else if(n.hole_shape===\"rect\"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_width*Math.abs(o.a),u=n.hole_height*Math.abs(o.a),g=s*Math.abs(o.a),h=Math.max(0,l-g*2),d=Math.max(0,u-g*2);e.save(),e.translate(A,c),a!==0\u0026\u0026e.rotate(-a*Math.PI/180),e.beginPath(),e.rect(-l/2,-u/2,l,u),h\u003e0\u0026\u0026d\u003e0\u0026\u0026e.rect(-h/2,-d/2,h,d),e.fill(\"evenodd\"),e.restore()}else if(n.hole_shape===\"pill\"||n.hole_shape===\"rotated_pill\"){const[A,c]=Bn(o,[n.x,n.y]),l=n.hole_width*Math.abs(o.a),u=n.hole_height*Math.abs(o.a),g=s*Math.abs(o.a);e.save(),e.translate(A,c),a!==0\u0026\u0026e.rotate(-a*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:l,height:u});const h=l-g*2,d=u-g*2;h\u003e0\u0026\u0026d\u003e0\u0026\u0026aS({ctx:e,cx:0,cy:0,width:h,height:d}),e.fill(\"evenodd\"),e.restore()}}function m0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(n.layers\u0026\u0026!n.layers.includes(r))return;const s=n.is_covered_with_solder_mask===!0,a=n.soldermask_margin??0;s?(e.fillStyle=i,Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),e.fill()):a\u003c0?(Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:a}),EE(e),_0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:a})):a\u003e0?(Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:a}),EE(e)):(Ohe({ctx:e,hole:n,realToCanvasMat:o,margin:0}),EE(e))}function Ohe(t){const{ctx:e,hole:n,realToCanvasMat:o,margin:i}=t;if(n.shape===\"circle\"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.outer_diameter/2+i)*Math.abs(o.a);e.beginPath(),e.arc(r,s,a,0,Math.PI*2),e.closePath()}else if(n.shape===\"oval\"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.outer_width/2+i)*Math.abs(o.a),A=(n.outer_height/2+i)*Math.abs(o.a);e.beginPath(),e.ellipse(r,s,a,A,-((n.ccw_rotation??0)*Math.PI)/180,0,Math.PI*2),e.closePath()}else if(n.shape===\"pill\"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.outer_width+i*2)*Math.abs(o.a),A=(n.outer_height+i*2)*Math.abs(o.a);e.beginPath(),aS({ctx:e,cx:r,cy:s,width:a,height:A,ccwRotationDegrees:n.ccw_rotation})}else if(n.shape===\"circular_hole_with_rect_pad\"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.rect_pad_width+i*2)*Math.abs(o.a),A=(n.rect_pad_height+i*2)*Math.abs(o.a),c=(n.rect_border_radius??0)*Math.abs(o.a);e.beginPath(),xE({ctx:e,cx:r,cy:s,width:a,height:A,radius:c,ccwRotationDegrees:n.rect_ccw_rotation})}else if(n.shape===\"pill_hole_with_rect_pad\"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.rect_pad_width+i*2)*Math.abs(o.a),A=(n.rect_pad_height+i*2)*Math.abs(o.a),c=(n.rect_border_radius??0)*Math.abs(o.a);e.beginPath(),xE({ctx:e,cx:r,cy:s,width:a,height:A,radius:c})}else if(n.shape===\"rotated_pill_hole_with_rect_pad\"){const[r,s]=Bn(o,[n.x,n.y]),a=(n.rect_pad_width+i*2)*Math.abs(o.a),A=(n.rect_pad_height+i*2)*Math.abs(o.a),c=(n.rect_border_radius??0)*Math.abs(o.a);e.beginPath(),xE({ctx:e,cx:r,cy:s,width:a,height:A,radius:c,ccwRotationDegrees:n.rect_ccw_rotation})}else if(n.shape===\"hole_with_polygon_pad\"\u0026\u0026n.pad_outline\u0026\u0026n.pad_outline.length\u003e=3){const r=n.pad_outline.map(A=\u003e({x:n.x+A.x,y:n.y+A.y})),a=(i!==0?CX(r,i):r).map(A=\u003e{const[c,l]=Bn(o,[A.x,A.y]);return{x:c,y:l}});e.beginPath(),aP({ctx:e,points:a})}}function _0i(t){const{ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,margin:r}=t,s=Math.abs(r);if(e.fillStyle=i,n.shape===\"circle\"){const[a,A]=Bn(o,[n.x,n.y]),c=n.outer_diameter/2*Math.abs(o.a),l=s*Math.abs(o.a),u=Math.max(0,c-l);e.beginPath(),e.arc(a,A,c,0,Math.PI*2),u\u003e0\u0026\u0026e.arc(a,A,u,0,Math.PI*2,!0),e.fill(\"evenodd\")}else if(n.shape===\"oval\"){const[a,A]=Bn(o,[n.x,n.y]),c=n.outer_width/2*Math.abs(o.a),l=n.outer_height/2*Math.abs(o.a),u=s*Math.abs(o.a),g=Math.max(0,c-u),h=Math.max(0,l-u),d=-((n.ccw_rotation??0)*Math.PI)/180;if(e.beginPath(),e.ellipse(a,A,c,l,d,0,Math.PI*2),g\u003e0\u0026\u0026h\u003e0){const p=a+g*Math.cos(d),m=A+g*Math.sin(d);e.moveTo(p,m),e.ellipse(a,A,g,h,d,0,Math.PI*2)}e.fill(\"evenodd\")}else if(n.shape===\"pill\"){const[a,A]=Bn(o,[n.x,n.y]),c=n.outer_width*Math.abs(o.a),l=n.outer_height*Math.abs(o.a),u=s*Math.abs(o.a);e.beginPath(),aS({ctx:e,cx:a,cy:A,width:c,height:l,ccwRotationDegrees:n.ccw_rotation});const g=c-u*2,h=l-u*2;g\u003e0\u0026\u0026h\u003e0\u0026\u0026aS({ctx:e,cx:a,cy:A,width:g,height:h,ccwRotationDegrees:n.ccw_rotation}),e.fill(\"evenodd\")}else if(n.shape===\"circular_hole_with_rect_pad\"){const[a,A]=Bn(o,[n.x,n.y]),c=n.rect_pad_width*Math.abs(o.a),l=n.rect_pad_height*Math.abs(o.a),u=s*Math.abs(o.a),g=n.rect_border_radius?n.rect_border_radius*Math.abs(o.a):0;e.beginPath(),xE({ctx:e,cx:a,cy:A,width:c,height:l,radius:g,ccwRotationDegrees:n.rect_ccw_rotation});const h=c-u*2,d=l-u*2;if(h\u003e0\u0026\u0026d\u003e0){const p=Math.max(0,g-u);xE({ctx:e,cx:a,cy:A,width:h,height:d,radius:p,ccwRotationDegrees:n.rect_ccw_rotation})}e.fill(\"evenodd\")}else if(n.shape===\"pill_hole_with_rect_pad\"){const[a,A]=Bn(o,[n.x,n.y]),c=n.rect_pad_width*Math.abs(o.a),l=n.rect_pad_height*Math.abs(o.a),u=s*Math.abs(o.a),g=n.rect_border_radius?n.rect_border_radius*Math.abs(o.a):0;e.beginPath(),xE({ctx:e,cx:a,cy:A,width:c,height:l,radius:g});const h=c-u*2,d=l-u*2;if(h\u003e0\u0026\u0026d\u003e0){const p=Math.max(0,g-u);xE({ctx:e,cx:a,cy:A,width:h,height:d,radius:p})}e.fill(\"evenodd\")}else if(n.shape===\"rotated_pill_hole_with_rect_pad\"){const[a,A]=Bn(o,[n.x,n.y]),c=n.rect_pad_width*Math.abs(o.a),l=n.rect_pad_height*Math.abs(o.a),u=s*Math.abs(o.a),g=n.rect_border_radius?n.rect_border_radius*Math.abs(o.a):0;e.beginPath(),xE({ctx:e,cx:a,cy:A,width:c,height:l,radius:g,ccwRotationDegrees:n.rect_ccw_rotation});const h=c-u*2,d=l-u*2;if(h\u003e0\u0026\u0026d\u003e0){const p=Math.max(0,g-u);xE({ctx:e,cx:a,cy:A,width:h,height:d,radius:p,ccwRotationDegrees:n.rect_ccw_rotation})}e.fill(\"evenodd\")}else if(n.shape===\"hole_with_polygon_pad\"\u0026\u0026n.pad_outline\u0026\u0026n.pad_outline.length\u003e=3){const a=n.pad_outline.map(l=\u003e({x:n.x+l.x,y:n.y+l.y}));e.beginPath();const A=a.map(l=\u003e{const[u,g]=Bn(o,[l.x,l.y]);return{x:u,y:g}});aP({ctx:e,points:A});const c=CX(a,-s);if(c.length\u003e=3){const l=c.map(u=\u003e{const[g,h]=Bn(o,[u.x,u.y]);return{x:g,y:h}});aP({ctx:e,points:l})}e.fill(\"evenodd\")}}function f0i(t){const{ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(n.layer!==r)return;const s=n.is_covered_with_solder_mask===!0,a=n.soldermask_margin??0;let A=a,c=a,l=a,u=a;(n.shape===\"rect\"||n.shape===\"rotated_rect\")\u0026\u0026(A=n.soldermask_margin_left??a,c=n.soldermask_margin_right??a,l=n.soldermask_margin_top??a,u=n.soldermask_margin_bottom??a),s?(e.fillStyle=i,Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:0,mr:0,mt:0,mb:0}),e.fill()):A\u003c0||c\u003c0||l\u003c0||u\u003c0?(Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:A,mr:c,mt:l,mb:u}),EE(e),I0i({ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,ml:A,mr:c,mt:l,mb:u})):A\u003e0||c\u003e0||l\u003e0||u\u003e0?(Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:A,mr:c,mt:l,mb:u}),EE(e)):(Ghe({ctx:e,pad:n,realToCanvasMat:o,ml:0,mr:0,mt:0,mb:0}),EE(e))}function Ghe(t){const{ctx:e,pad:n,realToCanvasMat:o,ml:i,mr:r,mt:s,mb:a}=t,A=n.shape===\"rotated_rect\"||n.shape===\"rotated_pill\"?n.ccw_rotation??0:0;if(n.shape===\"rect\"||n.shape===\"rotated_rect\"){const c=n.corner_radius??n.rect_border_radius??0,l=A*Math.PI/180,u=(r-i)/2,g=(s-a)/2,h=u*Math.cos(l)-g*Math.sin(l),d=u*Math.sin(l)+g*Math.cos(l),[p,m]=Bn(o,[n.x+h,n.y+d]),_=(n.width+i+r)*Math.abs(o.a),f=(n.height+s+a)*Math.abs(o.a),I=c*Math.abs(o.a);e.save(),e.translate(p,m),A!==0\u0026\u0026e.rotate(-A*Math.PI/180),e.beginPath(),xE({ctx:e,cx:0,cy:0,width:_,height:f,radius:I}),e.restore()}else if(n.shape===\"circle\"){const c=(i+r+s+a)/4,[l,u]=Bn(o,[n.x,n.y]),g=(n.radius+c)*Math.abs(o.a);e.beginPath(),e.arc(l,u,g,0,Math.PI*2),e.closePath()}else if(n.shape===\"pill\"||n.shape===\"rotated_pill\"){const c=(i+r)/2,[l,u]=Bn(o,[n.x,n.y]),g=(n.width+c*2)*Math.abs(o.a),h=(n.height+c*2)*Math.abs(o.a);e.save(),e.translate(l,u),A!==0\u0026\u0026e.rotate(-A*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:g,height:h}),e.restore()}else if(n.shape===\"polygon\"\u0026\u0026n.points\u0026\u0026n.points.length\u003e=3){const c=(i+r+s+a)/4,u=(c!==0?CX(n.points,c):n.points).map(g=\u003e{const[h,d]=Bn(o,[g.x,g.y]);return{x:h,y:d}});e.beginPath(),aP({ctx:e,points:u})}}function I0i(t){const{ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,ml:r,mr:s,mt:a,mb:A}=t,c=n.shape===\"rotated_rect\"||n.shape===\"rotated_pill\"?n.ccw_rotation??0:0,l=Math.max(0,-r),u=Math.max(0,-s),g=Math.max(0,-a),h=Math.max(0,-A);if(e.fillStyle=i,n.shape===\"rect\"||n.shape===\"rotated_rect\"){const d=n.corner_radius??n.rect_border_radius??0,[p,m]=Bn(o,[n.x,n.y]),_=n.width*Math.abs(o.a),f=n.height*Math.abs(o.a),I=d*Math.abs(o.a),C=l*Math.abs(o.a),y=u*Math.abs(o.a),x=g*Math.abs(o.a),E=h*Math.abs(o.a);e.save(),e.translate(p,m),c!==0\u0026\u0026e.rotate(-c*Math.PI/180),e.beginPath(),xE({ctx:e,cx:0,cy:0,width:_,height:f,radius:I});const B=_-C-y,S=f-x-E,Q=(C-y)/2,w=(x-E)/2,M=Math.max(0,I-(C+y+x+E)/4);B\u003e0\u0026\u0026S\u003e0\u0026\u0026xE({ctx:e,cx:Q,cy:w,width:B,height:S,radius:M}),e.fill(\"evenodd\"),e.restore()}else if(n.shape===\"circle\"){const d=Math.max(l,u,g,h),[p,m]=Bn(o,[n.x,n.y]),_=n.radius*Math.abs(o.a),f=d*Math.abs(o.a),I=Math.max(0,_-f);e.save(),e.beginPath(),e.arc(p,m,_,0,Math.PI*2),I\u003e0\u0026\u0026e.arc(p,m,I,0,Math.PI*2,!0),e.fill(\"evenodd\"),e.restore()}else if(n.shape===\"pill\"||n.shape===\"rotated_pill\"){const d=Math.max(l,u,g,h),[p,m]=Bn(o,[n.x,n.y]),_=n.width*Math.abs(o.a),f=n.height*Math.abs(o.a),I=d*Math.abs(o.a);e.save(),e.translate(p,m),c!==0\u0026\u0026e.rotate(-c*Math.PI/180),e.beginPath(),aS({ctx:e,cx:0,cy:0,width:_,height:f});const C=_-I*2,y=f-I*2;C\u003e0\u0026\u0026y\u003e0\u0026\u0026aS({ctx:e,cx:0,cy:0,width:C,height:y}),e.fill(\"evenodd\"),e.restore()}else if(n.shape===\"polygon\"\u0026\u0026n.points\u0026\u0026n.points.length\u003e=3){const d=Math.max(l,u,g,h);e.save(),e.beginPath();const p=n.points.map(_=\u003e{const[f,I]=Bn(o,[_.x,_.y]);return{x:f,y:I}});aP({ctx:e,points:p});const m=CX(n.points,-d);if(m.length\u003e=3){const _=m.map(f=\u003e{const[I,C]=Bn(o,[f.x,f.y]);return{x:I,y:C}});aP({ctx:e,points:_})}e.fill(\"evenodd\"),e.restore()}}function vY(t,e){const n=Math.hypot(t,e);return n\u003c=Number.EPSILON?{x:0,y:0}:{x:t/n,y:e/n}}function C0i(t,e){const n=t.length;if(n\u003c2)return{x:1,y:0};if(e\u003c=0){const c=t[1],l=t[0];if(!c||!l)return{x:1,y:0};const u=vY(c.x-l.x,c.y-l.y);return u.x===0\u0026\u0026u.y===0?{x:1,y:0}:u}if(e\u003e=n-1){const c=t[n-2],l=t[n-1];if(!c||!l)return{x:1,y:0};const u=vY(l.x-c.x,l.y-c.y);return u.x===0\u0026\u0026u.y===0?{x:1,y:0}:u}const o=t[e-1],i=t[e],r=t[e+1];if(!o||!i||!r)return{x:1,y:0};const s=vY(i.x-o.x,i.y-o.y),a=vY(r.x-i.x,r.y-i.y),A=vY(s.x+a.x,s.y+a.y);return A.x===0\u0026\u0026A.y===0?s.x!==0||s.y!==0?s:a.x!==0||a.y!==0?a:{x:1,y:0}:A}function Fon(t){const e=[],n=[];for(let o=0;o\u003ct.length;o++){const i=t[o];if(!i)continue;const r=C0i(t,o),s=vY(-r.y,r.x),a=i.width/2;e.push({x:i.x+s.x*a,y:i.y+s.y*a}),n.push({x:i.x-s.x*a,y:i.y-s.y*a})}return e.concat(n.reverse())}function oVe(t){const e=[];let n=[],o=null;for(const i of t??[]){if(!i||i.route_type!==\"wire\"){n.length\u003e=2\u0026\u0026e.push(n),n=[],o=null;continue}const r=i.layer??o;if(!r)continue;const s=i.x,a=i.y;typeof s!=\"number\"||typeof a!=\"number\"||typeof i.width==\"number\"\u0026\u0026(i.width,o\u0026\u0026r!==o\u0026\u0026(n.length\u003e=2\u0026\u0026e.push(n),n=[]),o=r,n.push(i))}return n.length\u003e=2\u0026\u0026e.push(n),e}var Lon=1e-6;function Hon(t){const{ctx:e,trace:n,realToCanvasMat:o,vias:i,platedHoles:r,layer:s}=t;if(!n.route||n.route.length\u003c2)return;const a=oVe(n.route);if(a.length===0)return;const A=new Map;for(const c of a){const l=c[0]?.layer,u=c[c.length-1];if(!(!l||!u)\u0026\u0026!(s\u0026\u0026l!==s)){for(const g of i){if(g.layers\u0026\u0026Array.isArray(g.layers)\u0026\u0026!g.layers.includes(l)||!Oon(u.x,u.y,g.x,g.y))continue;const h=g.hole_diameter/2;if(h\u003c=0)continue;const d={shape:\"circle\",x:g.x,y:g.y,radius:h};A.set(Gon(d),d)}for(const g of r){if(g.layers\u0026\u0026Array.isArray(g.layers)\u0026\u0026!g.layers.includes(l))continue;const h=y0i(g);h\u0026\u0026Oon(u.x,u.y,h.x,h.y)\u0026\u0026A.set(Gon(h),h)}}}if(A.size!==0){e.save(),e.globalCompositeOperation=\"destination-out\";for(const c of A.values()){if(c.shape===\"circle\"){dm({ctx:e,center:{x:c.x,y:c.y},radius:c.radius,fill:\"#000\",realToCanvasMat:o});continue}if(c.shape===\"oval\"){JB({ctx:e,center:{x:c.x,y:c.y},radius_x:c.radiusX,radius_y:c.radiusY,fill:\"#000\",realToCanvasMat:o,rotation:c.rotation});continue}A_({ctx:e,center:{x:c.x,y:c.y},width:c.width,height:c.height,fill:\"#000\",realToCanvasMat:o,rotation:c.rotation})}e.restore()}}function y0i(t){if(t.shape===\"circle\"){const i=t.hole_diameter/2;return i\u003c=0?void 0:{shape:\"circle\",x:t.x,y:t.y,radius:i}}if(t.shape===\"oval\"){const i=t.hole_width/2,r=t.hole_height/2;return i\u003c=0||r\u003c=0?void 0:{shape:\"oval\",x:t.x,y:t.y,radiusX:i,radiusY:r,rotation:t.ccw_rotation}}if(t.shape===\"pill\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"pill\",x:t.x,y:t.y,width:t.hole_width,height:t.hole_height,rotation:t.ccw_rotation};if(t.shape===\"circular_hole_with_rect_pad\"){const i=t.hole_diameter/2;return i\u003c=0?void 0:{shape:\"circle\",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),radius:i}}if(t.shape===\"pill_hole_with_rect_pad\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"pill\",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height};if(t.shape===\"rotated_pill_hole_with_rect_pad\")return t.hole_width\u003c=0||t.hole_height\u003c=0?void 0:{shape:\"pill\",x:t.x+(t.hole_offset_x??0),y:t.y+(t.hole_offset_y??0),width:t.hole_width,height:t.hole_height,rotation:t.hole_ccw_rotation};if(t.shape!==\"hole_with_polygon_pad\")return;const e=t.x+(t.hole_offset_x??0),n=t.y+(t.hole_offset_y??0),o=t.hole_shape;if(o===\"circle\"){const i=(t.hole_diameter??0)/2;return i\u003c=0?void 0:{shape:\"circle\",x:e,y:n,radius:i}}if(o===\"oval\"){const i=(t.hole_width??0)/2,r=(t.hole_height??0)/2;return i\u003c=0||r\u003c=0?void 0:{shape:\"oval\",x:e,y:n,radiusX:i,radiusY:r}}if(o===\"pill\"||o===\"rotated_pill\"){const i=t.hole_width??0,r=t.hole_height??0;return i\u003c=0||r\u003c=0?void 0:{shape:\"pill\",x:e,y:n,width:i,height:r,rotation:o===\"rotated_pill\"?t.ccw_rotation:0}}}function Oon(t,e,n,o){return Math.abs(t-n)\u003c=Lon\u0026\u0026Math.abs(e-o)\u003c=Lon}function Gon(t){return t.shape===\"circle\"?`circle:${t.x}:${t.y}:${t.radius}`:t.shape===\"oval\"?`oval:${t.x}:${t.y}:${t.radiusX}:${t.radiusY}:${t.rotation??0}`:`pill:${t.x}:${t.y}:${t.width}:${t.height}:${t.rotation??0}`}function x0i(t){const{ctx:e,trace:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(!n.route||!Array.isArray(n.route)||n.route.length\u003c2)return;const s=oVe(n.route);for(const a of s)if(a[0]?.layer===r){if(n.route_thickness_mode===\"interpolated\"){sP({ctx:e,points:Fon(a),fill:i,realToCanvasMat:o});continue}for(let c=0;c\u003ca.length-1;c++){const l=a[c],u=a[c+1];!l||!u||QY({ctx:e,start:{x:l.x,y:l.y},end:{x:u.x,y:u.y},strokeWidth:l.width,stroke:i,realToCanvasMat:o,lineCap:\"round\"})}}Hon({ctx:e,trace:n,realToCanvasMat:o,layer:r,vias:t.vias,platedHoles:t.platedHoles})}function Yon(t){const{ctx:e,via:n,realToCanvasMat:o,layer:i,soldermaskOverCopperColor:r}=t;if(!n.layers.includes(i))return;const s=iVe(n,i,e),[a,A]=Bn(o,[n.x,n.y]),c=n.outer_diameter/2*Math.abs(o.a);e.beginPath(),e.arc(a,A,c,0,Math.PI*2),e.closePath(),s?(e.fillStyle=r,e.fill()):EE(e)}function iVe(t,e,n){let o=n.boardOwnerMap?.get(t.pcb_via_id);!n.boardOwnerMap?.has(t.pcb_via_id)\u0026\u0026t.pcb_trace_id\u0026\u0026(o=n.boardOwnerMap?.get(t.pcb_trace_id));const i=t,r=e===\"top\"?i.tented_on_top:i.tented_on_bottom,s=e===\"top\"?o?.default_via_tented_on_top:o?.default_via_tented_on_bottom;return r??i.is_tented??s??!1}function Uon(t){const{ctx:e,realToCanvasMat:n,colorMap:o,layer:i,drawSoldermask:r}=t;let{elements:s}=t;if(!r||e.canvas.width\u003c=0||e.canvas.height\u003c=0)return;const a=s.filter(d=\u003ed.type===\"pcb_board\"),A=s.find(d=\u003ed.type===\"pcb_panel\");a.length===0\u0026\u0026!A\u0026\u0026(s=s.filter(d=\u003ed.type===\"pcb_via\"));const c=o.soldermask[i]??o.soldermask.top,l=o.soldermaskOverCopper[i]??o.soldermaskOverCopper.top,u=s.filter(d=\u003ed.type===\"pcb_via\"),g=s.filter(d=\u003ed.type===\"pcb_plated_hole\"),h=Don(e,e.canvas.width,e.canvas.height)??e;if(A\u0026\u0026a0i({ctx:h,panel:A,realToCanvasMat:n,soldermaskColor:c}),A\u0026\u0026a.length\u003e0){h.save(),h.globalCompositeOperation=\"destination-out\";for(const d of a)Ron({ctx:h,board:d,realToCanvasMat:n,soldermaskColor:\"#000\"});h.restore()}for(const d of a)Ron({ctx:h,board:d,realToCanvasMat:n,soldermaskColor:c});for(const d of s)d.type===\"pcb_trace\"?x0i({ctx:h,trace:d,realToCanvasMat:n,soldermaskOverCopperColor:l,layer:i,vias:u,platedHoles:g}):d.type===\"pcb_copper_pour\"\u0026\u0026d0i({ctx:h,pour:d,realToCanvasMat:n,soldermaskOverCopperColor:l,layer:i,elements:s});for(const d of u)iVe(d,i,h)\u0026\u0026Yon({ctx:h,via:d,realToCanvasMat:n,layer:i,soldermaskOverCopperColor:l});for(const d of s)E0i({ctx:h,element:d,realToCanvasMat:n,soldermaskOverCopperColor:l,layer:i});Non(e,h)}function E0i(t){const{ctx:e,element:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r}=t;if(n.type===\"pcb_smtpad\")f0i({ctx:e,pad:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r});else if(n.type===\"pcb_plated_hole\")m0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i,layer:r});else if(n.type===\"pcb_hole\")h0i({ctx:e,hole:n,realToCanvasMat:o,soldermaskOverCopperColor:i});else if(n.type===\"pcb_via\"){if(iVe(n,r,e))return;Yon({ctx:e,via:n,realToCanvasMat:o,layer:r,soldermaskOverCopperColor:i})}else if(n.type===\"pcb_cutout\")A0i({ctx:e,cutout:n,realToCanvasMat:o});else{if(n.type===\"pcb_copper_pour\")return;if(n.type===\"pcb_trace\")return}}function B0i(t,e){return e.copper[t]??e.copper.top}function b0i(t){const{ctx:e,trace:n,realToCanvasMat:o,colorMap:i,layer:r}=t;if(!n.route||!Array.isArray(n.route)||n.route.length\u003c2)return;const s=oVe(n.route);for(const a of s){const A=a[0]?.layer;if(!A||r\u0026\u0026A!==r)continue;const c=B0i(A,i);if(n.route_thickness_mode===\"interpolated\"){sP({ctx:e,points:Fon(a),fill:c,realToCanvasMat:o});continue}for(let l=0;l\u003ca.length-1;l++){const u=a[l],g=a[l+1];!u||!g||u.is_inside_copper_pour\u0026\u0026g.is_inside_copper_pour||QY({ctx:e,start:{x:u.x,y:u.y},end:{x:g.x,y:g.y},strokeWidth:u.width,stroke:c,realToCanvasMat:o,lineCap:\"round\"})}}Hon({ctx:e,trace:n,realToCanvasMat:o,vias:t.vias??[],platedHoles:t.platedHoles??[],layer:r})}function Kon(t){const{ctx:e,traces:n,copperPours:o,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a,renderLayers:A}=t;for(const c of Q0i(n,A)){const l=o.filter(g=\u003eg.layer===c);if(l.length===0){rVe({ctx:e,traces:n,layer:c,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a});continue}const u=Don(e,e.canvas.width,e.canvas.height);u\u0026\u0026(rVe({ctx:u,traces:n,layer:c,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a}),S0i({ctx:u,copperPours:l,realToCanvasMat:i}),Non(e,u))||(e.save(),v0i({ctx:e,copperPours:l,realToCanvasMat:i}),rVe({ctx:e,traces:n,layer:c,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a}),e.restore())}}function rVe(t){const{ctx:e,traces:n,layer:o,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a}=t;for(const A of n)b0i({ctx:e,trace:A,realToCanvasMat:i,colorMap:r,vias:s,platedHoles:a,layer:o})}function S0i(t){const{ctx:e,copperPours:n,realToCanvasMat:o}=t;if(n.length!==0){e.save(),e.globalCompositeOperation=\"destination-out\",e.fillStyle=\"#000\";for(const i of n)e.beginPath(),qKe({ctx:e,pour:i,realToCanvasMat:o}),e.fill(i.shape===\"brep\"?\"evenodd\":\"nonzero\");e.restore()}}function Q0i(t,e){const n=new Set;for(const o of t)for(const i of o.route??[])i.route_type!==\"wire\"||!i.layer||e?.length\u0026\u0026!e.includes(`${i.layer}_copper`)||n.add(i.layer);return[...n]}function v0i(t){const{ctx:e,copperPours:n,realToCanvasMat:o}=t;if(n.length!==0){e.beginPath(),e.rect(0,0,e.canvas.width,e.canvas.height);for(const i of n)qKe({ctx:e,pour:i,realToCanvasMat:o});e.clip(\"evenodd\")}}function w0i(t,e,n=[]){const o=[...t,...n].filter(a=\u003ea.type===\"pcb_via\"),i=new Map;for(const a of o){const c=`${e.boardOwnerMap?.get(a.pcb_via_id)?.pcb_board_id??\"\"}:${a.x}:${a.y}`,l=i.get(c)??[];l.push(a),i.set(c,l)}const r=t.filter(a=\u003ea.type===\"pcb_trace\"),s=[];for(const a of r){const A=e.boardOwnerMap?.get(a.pcb_trace_id);for(const[c,l]of a.route.entries()){if(l.route_type!==\"via\")continue;const u=`${A?.pcb_board_id??\"\"}:${l.x}:${l.y}`,g=i.get(u)??[];if(g.some(p=\u003ep.layers.includes(l.from_layer)\u0026\u0026p.layers.includes(l.to_layer)))continue;const d={type:\"pcb_via\",pcb_via_id:`${a.pcb_trace_id}_route_via_${c}`,pcb_trace_id:a.pcb_trace_id,subcircuit_id:a.subcircuit_id,pcb_group_id:a.pcb_group_id,x:l.x,y:l.y,layers:[l.from_layer,l.to_layer],hole_diameter:l.hole_diameter??A?.min_via_hole_diameter??.25,outer_diameter:l.outer_diameter??A?.min_via_pad_diameter??.6,tented_on_top:l.tented_on_top,tented_on_bottom:l.tented_on_bottom};s.push(d),g.push(d),i.set(u,g)}}return s}function Von(t){const{ctx:e,via:n,realToCanvasMat:o,colorMap:i,layer:r}=t;dm({ctx:e,center:{x:n.x,y:n.y},radius:n.outer_diameter/2,fill:i.copper[r??\"top\"],realToCanvasMat:o}),e.save(),e.globalCompositeOperation=\"destination-out\",dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:\"#000\",realToCanvasMat:o}),e.restore(),dm({ctx:e,center:{x:n.x,y:n.y},radius:n.hole_diameter/2,fill:i.drill,realToCanvasMat:o})}function Kx(t,e){if(!e.layers||e.layers.length===0)return!0;if(t.type===\"pcb_silkscreen_graphic\")return e.layers.some(o=\u003eo===`${t.layer}_silkscreen`);const n=umt(t);return n.length===0?!0:n.some(o=\u003ee.layers.includes(o))}var i2={copper:{top:\"rgb(200, 52, 52)\",inner1:\"rgb(127, 200, 127)\",inner2:\"rgb(206, 125, 44)\",inner3:\"rgb(79, 203, 203)\",inner4:\"rgb(219, 98, 139)\",inner5:\"rgb(167, 165, 198)\",inner6:\"rgb(40, 204, 217)\",inner7:\"rgb(232, 178, 167)\",inner8:\"rgb(242, 237, 161)\",bottom:\"rgb(77, 127, 196)\"},copperPour:{top:\"rgb(230, 95, 95)\",bottom:\"rgb(122, 162, 222)\"},soldermaskWithCopperUnderneath:{top:\"rgb(18, 82, 50)\",bottom:\"rgb(77, 127, 196)\"},soldermask:{top:\"rgb(12, 55, 33)\",bottom:\"rgb(12, 55, 33)\"},soldermaskOverCopper:{top:\"rgb(52, 135, 73)\",bottom:\"rgb(52, 135, 73)\"},substrate:\"rgb(201, 162, 110)\",drill:\"#FF26E2\",silkscreen:{top:\"#f2eda1\",bottom:\"#5da9e9\"},boardOutline:\"rgba(255, 255, 255, 0.5)\",courtyard:{top:\"#FF00FF\",bottom:\"rgb(38, 233, 255)\"},keepout:{top:\"#FF6B6B\",bottom:\"#5da9e9\"},fabricationNote:\"rgba(255, 255, 255, 0.5)\"};function P0i(t){return!t||t.length===0?\"top\":(t.find(n=\u003en.endsWith(\"_copper\"))??t[0]??\"top_copper\").split(\"_\")[0]}var wY=(t,e)=\u003et.layers?.includes(e)??!0,xl=class f4n{ctx;colorMap;realToCanvasMat;constructor(e){if(\"getContext\"in e\u0026\u0026typeof e.getContext==\"function\"){const n=e.getContext(\"2d\");if(!n)throw new Error(\"Failed to get 2D rendering context from canvas\");this.ctx=n}else this.ctx=e;this.colorMap={...i2},this.realToCanvasMat=QQ()}configure(e){e.colorOverrides\u0026\u0026(this.colorMap={...this.colorMap,...e.colorOverrides,copper:{...this.colorMap.copper,...e.colorOverrides.copper},copperPour:{...this.colorMap.copperPour,...e.colorOverrides.copperPour},silkscreen:{...this.colorMap.silkscreen,...e.colorOverrides.silkscreen},soldermask:{...this.colorMap.soldermask,...e.colorOverrides.soldermask},soldermaskWithCopperUnderneath:{...this.colorMap.soldermaskWithCopperUnderneath,...e.colorOverrides.soldermaskWithCopperUnderneath},soldermaskOverCopper:{...this.colorMap.soldermaskOverCopper,...e.colorOverrides.soldermaskOverCopper}})}setCameraBounds(e){const n=this.ctx.canvas,o=n.width,i=n.height,r=e.maxX-e.minX,s=e.maxY-e.minY,a=o/r,A=i/s,c=Math.min(a,A),l=(o-r*c)/2,u=(i-s*c)/2;this.realToCanvasMat=Ad(pA(l,u),dC(c,-c),pA(-e.minX,-e.maxY))}drawElements(e,n={}){this.ctx.boardOwnerMap=omt([...n.clipContextElements??[],...e]),e=[...e,...w0i(e,this.ctx,n.clipContextElements)];const o=P0i(n.layers),i=e.find(x=\u003ex.type===\"pcb_board\"),r=e.find(x=\u003ex.type===\"pcb_panel\");r\u0026\u0026Oli({ctx:this.ctx,panel:r,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});const s=n.drawBoardMaterial??!1,a=n.drawSoldermask??!1,A=n.drawSolderPaste??!1,c=n.drawSoldermaskTop!==void 0||n.drawSoldermaskBottom!==void 0,l=n.drawSolderPasteTop!==void 0||n.drawSolderPasteBottom!==void 0,u=a\u0026\u0026(n.drawSoldermaskTop??!c),g=a\u0026\u0026(n.drawSoldermaskBottom??!1),h=A\u0026\u0026(n.drawSolderPasteTop??!l)\u0026\u0026e.some(x=\u003ex.type===\"pcb_solder_paste\"\u0026\u0026x.layer===\"top\"),d=A\u0026\u0026(n.drawSolderPasteBottom??!1)\u0026\u0026e.some(x=\u003ex.type===\"pcb_solder_paste\"\u0026\u0026x.layer===\"bottom\"),p=u||h,m=e.filter(x=\u003eKx(x,n)\u0026\u0026x.type===\"pcb_via\"\u0026\u0026wY(x,o)),_=e.filter(x=\u003eKx(x,n)\u0026\u0026x.type===\"pcb_hole\"),f=e.filter(x=\u003eKx(x,n)\u0026\u0026x.type===\"pcb_plated_hole\"\u0026\u0026wY(x,o)),I=e.filter(x=\u003eKx(x,n)\u0026\u0026x.type===\"pcb_cutout\"),C=(n.clipContextElements??e).filter(x=\u003eKx(x,n)\u0026\u0026x.type===\"pcb_copper_pour\"),y=e.filter(x=\u003eKx(x,n)\u0026\u0026x.type===\"pcb_trace\");i\u0026\u0026wci({ctx:this.ctx,board:i,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,drawBoardMaterial:s,minBoardOutlineStrokePx:n.minBoardOutlineStrokePx});for(const x of e)Kx(x,n)\u0026\u0026x.type===\"pcb_copper_pour\"\u0026\u0026Dci({ctx:this.ctx,pour:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});for(const x of e)Kx(x,n)\u0026\u0026(x.type===\"pcb_smtpad\"\u0026\u0026i0i({ctx:this.ctx,pad:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,holes:_,platedHoles:f,vias:m,cutouts:I}),x.type===\"pcb_copper_text\"\u0026\u0026Xci({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}));if(p){Kon({ctx:this.ctx,traces:y,copperPours:C,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,vias:m,platedHoles:f,renderLayers:n.layers});for(const x of e)Kx(x,n)\u0026\u0026(x.type===\"pcb_hole\"\u0026\u0026fon({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u}),x.type===\"pcb_plated_hole\"\u0026\u0026wY(x,o)\u0026\u0026won({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u,layer:o}),x.type===\"pcb_via\"\u0026\u0026wY(x,o)\u0026\u0026Von({ctx:this.ctx,via:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:o}))}if(u\u0026\u0026Uon({ctx:this.ctx,elements:e,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:\"top\",drawSoldermask:!0}),h)for(const x of e)x.type!==\"pcb_solder_paste\"||x.layer!==\"top\"||Mon({ctx:this.ctx,solderPaste:x,realToCanvasMat:this.realToCanvasMat});for(const x of e)Kx(x,n)\u0026\u0026(x.type===\"pcb_silkscreen_text\"\u0026\u0026n0i({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_silkscreen_rect\"\u0026\u0026Zli({ctx:this.ctx,rect:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_silkscreen_circle\"\u0026\u0026Yli({ctx:this.ctx,circle:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_silkscreen_line\"\u0026\u0026Vli({ctx:this.ctx,line:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_silkscreen_path\"\u0026\u0026jli({ctx:this.ctx,path:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_silkscreen_pill\"\u0026\u0026qli({ctx:this.ctx,pill:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_silkscreen_oval\"\u0026\u0026Jli({ctx:this.ctx,oval:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_silkscreen_graphic\"\u0026\u0026Uli({ctx:this.ctx,graphic:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}));p||Kon({ctx:this.ctx,traces:y,copperPours:C,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,vias:m,platedHoles:f,renderLayers:n.layers});for(const x of e)Kx(x,n)\u0026\u0026x.type===\"pcb_hole\"\u0026\u0026!p\u0026\u0026fon({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u});for(const x of e)Kx(x,n)\u0026\u0026(x.type===\"pcb_plated_hole\"\u0026\u0026!p\u0026\u0026wY(x,o)\u0026\u0026won({ctx:this.ctx,hole:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,soldermaskMargin:u?x.soldermask_margin:void 0,drawSoldermask:u,layer:o}),x.type===\"pcb_via\"\u0026\u0026!p\u0026\u0026wY(x,o)\u0026\u0026Von({ctx:this.ctx,via:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:o}));if(g\u0026\u0026Uon({ctx:this.ctx,elements:e,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,layer:\"bottom\",drawSoldermask:!0}),d)for(const x of e)x.type!==\"pcb_solder_paste\"||x.layer!==\"bottom\"||Mon({ctx:this.ctx,solderPaste:x,realToCanvasMat:this.realToCanvasMat});for(const x of e)Kx(x,n)\u0026\u0026x.type===\"pcb_cutout\"\u0026\u0026rli({ctx:this.ctx,cutout:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});for(const x of e){if(!Kx(x,n))continue;x.type===\"pcb_keepout\"\u0026\u0026Dli({ctx:this.ctx,keepout:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_fabrication_note_text\"\u0026\u0026mli({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_fabrication_note_rect\"\u0026\u0026hli({ctx:this.ctx,rect:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap});const E=n.showPcbNotes??!0;E\u0026\u0026x.type===\"pcb_note_rect\"\u0026\u0026Fli({realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap,ctx:this.ctx,rect:x}),x.type===\"pcb_fabrication_note_path\"\u0026\u0026dli({ctx:this.ctx,path:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E\u0026\u0026x.type===\"pcb_note_path\"\u0026\u0026kli({ctx:this.ctx,path:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E\u0026\u0026x.type===\"pcb_note_text\"\u0026\u0026Hli({ctx:this.ctx,text:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E\u0026\u0026x.type===\"pcb_note_line\"\u0026\u0026Tli({ctx:this.ctx,line:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),E\u0026\u0026x.type===\"pcb_note_dimension\"\u0026\u0026Rli({ctx:this.ctx,pcbNoteDimension:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_fabrication_note_dimension\"\u0026\u0026gli({ctx:this.ctx,pcbFabricationNoteDimension:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_courtyard_circle\"\u0026\u0026eli({ctx:this.ctx,circle:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_courtyard_rect\"\u0026\u0026ili({ctx:this.ctx,rect:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap}),x.type===\"pcb_courtyard_outline\"\u0026\u0026nli({ctx:this.ctx,outline:x,realToCanvasMat:this.realToCanvasMat,colorMap:this.colorMap})}if(n.clearDrillHoles\u0026\u0026this.clearDrillHoles(e,o),n.showDebugObjects){const x=new Map;for(const E of e){if(E.type!==\"pcb_debug_object\")continue;const B=E.shape===\"rect\"?`${E.center.x}:${E.center.y}:${E.size.width}:${E.size.height}`:void 0,S=B?x.get(B)??0:0;Ali({ctx:this.ctx,debugObject:E,realToCanvasMat:this.realToCanvasMat,labelStackIndex:S}),B\u0026\u0026x.set(B,S+1)}}}clearDrillHoles(e,n){const o=e.filter(a=\u003ea.type===\"pcb_hole\"||a.type===\"pcb_plated_hole\"||a.type===\"pcb_via\"||a.type===\"pcb_cutout\");if(o.length===0)return;const i=\"rgba(0,0,0,0)\",r=new f4n(this.ctx);r.realToCanvasMat=this.realToCanvasMat,r.configure({colorOverrides:{copper:{top:i,bottom:i,inner1:i,inner2:i,inner3:i,inner4:i,inner5:i,inner6:i,inner7:i,inner8:i},drill:\"#000\"}}),this.ctx.save(),this.ctx.globalCompositeOperation=\"destination-out\";const s=this.ctx.boardOwnerMap;r.drawElements(o,{layers:[`${n}_copper`],showPcbNotes:!1}),this.ctx.boardOwnerMap=s,this.ctx.restore()}};let M0i={data:\"\"},D0i=t=\u003e{if(typeof window==\"object\"){let e=(t?t.querySelector(\"#_goober\"):window._goober)||Object.assign(document.createElement(\"style\"),{innerHTML:\" \",id:\"_goober\"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||M0i},N0i=/(?:([\\u0080-\\uFFFF\\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\\s*)/g,R0i=/\\/\\*[^]*?\\*\\/| +/g,zon=/\\n+/g,cP=(t,e)=\u003e{let n=\"\",o=\"\",i=\"\";for(let r in t){let s=t[r];r[0]==\"@\"?r[1]==\"i\"?n=r+\" \"+s+\";\":o+=r[1]==\"f\"?cP(s,r):r+\"{\"+cP(s,r[1]==\"k\"?\"\":e)+\"}\":typeof s==\"object\"?o+=cP(s,e?e.replace(/([^,])+/g,a=\u003er.replace(/([^,]*:\\S+\\([^)]*\\))|([^,])+/g,A=\u003e/\u0026/.test(A)?A.replace(/\u0026/g,a):a?a+\" \"+A:A)):r):s!=null\u0026\u0026(r=r[1]==\"-\"?r:r.replace(/[A-Z]/g,\"-$\u0026\").toLowerCase(),i+=cP.p?cP.p(r,s):r+\":\"+s+\";\")}return n+(e\u0026\u0026i?e+\"{\"+i+\"}\":i)+o},lP={},Jon=t=\u003e{if(typeof t==\"object\"){let e=\"\";for(let n in t)e+=n+Jon(t[n]);return e}return t},T0i=(t,e,n,o,i)=\u003e{let r=Jon(t),s=lP[r]||(lP[r]=(A=\u003e{let c=0,l=11;for(;c\u003cA.length;)l=101*l+A.charCodeAt(c++)\u003e\u003e\u003e0;return\"go\"+l})(r));if(!lP[s]){let A=r!==t?t:(c=\u003e{let l,u,g=[{}];for(;l=N0i.exec(c.replace(R0i,\"\"));)l[4]?g.shift():l[3]?(u=l[3].replace(zon,\" \").trim(),g.unshift(g[0][u]=g[0][u]||{})):g[0][l[1]]=l[2].replace(zon,\" \").trim();return g[0]})(t);lP[s]=cP(i?{[\"@keyframes \"+s]:A}:A,n?\"\":\".\"+s)}let a=n\u0026\u0026lP.g;return n\u0026\u0026(lP.g=lP[s]),((A,c,l,u)=\u003e{u?c.data=c.data.replace(u,A):c.data.indexOf(A)===-1\u0026\u0026(c.data=l?A+c.data:c.data+A)})(lP[s],e,o,a),s},k0i=(t,e,n)=\u003et.reduce((o,i,r)=\u003e{let s=e[r];if(s\u0026\u0026s.call){let a=s(n),A=a\u0026\u0026a.props\u0026\u0026a.props.className||/^go/.test(a)\u0026\u0026a;s=A?\".\"+A:a\u0026\u0026typeof a==\"object\"?a.props?\"\":cP(a,\"\"):a===!1?\"\":a}return o+i+(s??\"\")},\"\");function Yhe(t){let e=this||{},n=t.call?t(e.p):t;return T0i(n.unshift?n.raw?k0i(n,[].slice.call(arguments,1),e.p):n.reduce((o,i)=\u003eObject.assign(o,i\u0026\u0026i.call?i(e.p):i),{}):n,D0i(e.target),e.g,e.o,e.k)}let Won,sVe,aVe;Yhe.bind({g:1});let AS=Yhe.bind({k:1});function F0i(t,e,n,o){cP.p=e,Won=t,sVe=n,aVe=o}function uP(t,e){let n=this||{};return function(){let o=arguments;function i(r,s){let a=Object.assign({},r),A=a.className||i.className;n.p=Object.assign({theme:sVe\u0026\u0026sVe()},a),n.o=/go\\d/.test(A),a.className=Yhe.apply(n,o)+(A?\" \"+A:\"\");let c=t;return t[0]\u0026\u0026(c=a.as||t,delete a.as),aVe\u0026\u0026c[0]\u0026\u0026aVe(a),Won(c,a)}return i}}var L0i=t=\u003etypeof t==\"function\",Uhe=(t,e)=\u003eL0i(t)?t(e):t,H0i=(()=\u003e{let t=0;return()=\u003e(++t).toString()})(),jon=(()=\u003e{let t;return()=\u003e{if(t===void 0\u0026\u0026typeof window\u003c\"u\"){let e=matchMedia(\"(prefers-reduced-motion: reduce)\");t=!e||e.matches}return t}})(),O0i=20,AVe=\"default\",$on=(t,e)=\u003e{let{toastLimit:n}=t.settings;switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,n)};case 1:return{...t,toasts:t.toasts.map(s=\u003es.id===e.toast.id?{...s,...e.toast}:s)};case 2:let{toast:o}=e;return $on(t,{type:t.toasts.find(s=\u003es.id===o.id)?1:0,toast:o});case 3:let{toastId:i}=e;return{...t,toasts:t.toasts.map(s=\u003es.id===i||i===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(s=\u003es.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let r=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(s=\u003e({...s,pauseDuration:s.pauseDuration+r}))}}},Khe=[],qon={toasts:[],pausedAt:void 0,settings:{toastLimit:O0i}},b6={},Xon=(t,e=AVe)=\u003e{b6[e]=$on(b6[e]||qon,t),Khe.forEach(([n,o])=\u003e{n===e\u0026\u0026o(b6[e])})},Zon=t=\u003eObject.keys(b6).forEach(e=\u003eXon(t,e)),G0i=t=\u003eObject.keys(b6).find(e=\u003eb6[e].toasts.some(n=\u003en.id===t)),Vhe=(t=AVe)=\u003ee=\u003e{Xon(e,t)},Y0i={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},U0i=(t={},e=AVe)=\u003e{let[n,o]=ee.useState(b6[e]||qon),i=ee.useRef(b6[e]);ee.useEffect(()=\u003e(i.current!==b6[e]\u0026\u0026o(b6[e]),Khe.push([e,o]),()=\u003e{let s=Khe.findIndex(([a])=\u003ea===e);s\u003e-1\u0026\u0026Khe.splice(s,1)}),[e]);let r=n.toasts.map(s=\u003e{var a,A,c;return{...t,...t[s.type],...s,removeDelay:s.removeDelay||((a=t[s.type])==null?void 0:a.removeDelay)||t?.removeDelay,duration:s.duration||((A=t[s.type])==null?void 0:A.duration)||t?.duration||Y0i[s.type],style:{...t.style,...(c=t[s.type])==null?void 0:c.style,...s.style}}});return{...n,toasts:r}},K0i=(t,e=\"blank\",n)=\u003e({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:\"status\",\"aria-live\":\"polite\"},message:t,pauseDuration:0,...n,id:n?.id||H0i()}),xX=t=\u003e(e,n)=\u003e{let o=K0i(e,t,n);return Vhe(o.toasterId||G0i(o.id))({type:2,toast:o}),o.id},ua=(t,e)=\u003exX(\"blank\")(t,e);ua.error=xX(\"error\"),ua.success=xX(\"success\"),ua.loading=xX(\"loading\"),ua.custom=xX(\"custom\"),ua.dismiss=(t,e)=\u003e{let n={type:3,toastId:t};e?Vhe(e)(n):Zon(n)},ua.dismissAll=t=\u003eua.dismiss(void 0,t),ua.remove=(t,e)=\u003e{let n={type:4,toastId:t};e?Vhe(e)(n):Zon(n)},ua.removeAll=t=\u003eua.remove(void 0,t),ua.promise=(t,e,n)=\u003e{let o=ua.loading(e.loading,{...n,...n?.loading});return typeof t==\"function\"\u0026\u0026(t=t()),t.then(i=\u003e{let r=e.success?Uhe(e.success,i):void 0;return r?ua.success(r,{id:o,...n,...n?.success}):ua.dismiss(o),i}).catch(i=\u003e{let r=e.error?Uhe(e.error,i):void 0;r?ua.error(r,{id:o,...n,...n?.error}):ua.dismiss(o)}),t};var V0i=1e3,z0i=(t,e=\"default\")=\u003e{let{toasts:n,pausedAt:o}=U0i(t,e),i=ee.useRef(new Map).current,r=ee.useCallback((u,g=V0i)=\u003e{if(i.has(u))return;let h=setTimeout(()=\u003e{i.delete(u),s({type:4,toastId:u})},g);i.set(u,h)},[]);ee.useEffect(()=\u003e{if(o)return;let u=Date.now(),g=n.map(h=\u003e{if(h.duration===1/0)return;let d=(h.duration||0)+h.pauseDuration-(u-h.createdAt);if(d\u003c0){h.visible\u0026\u0026ua.dismiss(h.id);return}return setTimeout(()=\u003eua.dismiss(h.id,e),d)});return()=\u003e{g.forEach(h=\u003eh\u0026\u0026clearTimeout(h))}},[n,o,e]);let s=ee.useCallback(Vhe(e),[e]),a=ee.useCallback(()=\u003e{s({type:5,time:Date.now()})},[s]),A=ee.useCallback((u,g)=\u003e{s({type:1,toast:{id:u,height:g}})},[s]),c=ee.useCallback(()=\u003e{o\u0026\u0026s({type:6,time:Date.now()})},[o,s]),l=ee.useCallback((u,g)=\u003e{let{reverseOrder:h=!1,gutter:d=8,defaultPosition:p}=g||{},m=n.filter(I=\u003e(I.position||p)===(u.position||p)\u0026\u0026I.height),_=m.findIndex(I=\u003eI.id===u.id),f=m.filter((I,C)=\u003eC\u003c_\u0026\u0026I.visible).length;return m.filter(I=\u003eI.visible).slice(...h?[f+1]:[0,f]).reduce((I,C)=\u003eI+(C.height||0)+d,0)},[n]);return ee.useEffect(()=\u003e{n.forEach(u=\u003e{if(u.dismissed)r(u.id,u.removeDelay);else{let g=i.get(u.id);g\u0026\u0026(clearTimeout(g),i.delete(u.id))}})},[n,r]),{toasts:n,handlers:{updateHeight:A,startPause:a,endPause:c,calculateOffset:l}}},J0i=AS` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,W0i=AS` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,j0i=AS` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,$0i=uP(\"div\")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${t=\u003et.primary||\"#ff4b4b\"}; position: relative; transform: rotate(45deg); animation: ${J0i} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; \u0026:after, \u0026:before { content: ''; animation: ${W0i} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${t=\u003et.secondary||\"#fff\"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } \u0026:before { animation: ${j0i} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,q0i=AS` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,X0i=uP(\"div\")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${t=\u003et.secondary||\"#e0e0e0\"}; border-right-color: ${t=\u003et.primary||\"#616161\"}; animation: ${q0i} 1s linear infinite; `,Z0i=AS` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,eui=AS` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,tui=uP(\"div\")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${t=\u003et.primary||\"#61d345\"}; position: relative; transform: rotate(45deg); animation: ${Z0i} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; \u0026:after { content: ''; box-sizing: border-box; animation: ${eui} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${t=\u003et.secondary||\"#fff\"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,nui=uP(\"div\")` position: absolute; `,oui=uP(\"div\")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,iui=AS` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,rui=uP(\"div\")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${iui} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,sui=({toast:t})=\u003e{let{icon:e,type:n,iconTheme:o}=t;return e!==void 0?typeof e==\"string\"?ee.createElement(rui,null,e):e:n===\"blank\"?null:ee.createElement(oui,null,ee.createElement(X0i,{...o}),n!==\"loading\"\u0026\u0026ee.createElement(nui,null,n===\"error\"?ee.createElement($0i,{...o}):ee.createElement(tui,{...o})))},aui=t=\u003e` 0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;} 100% {transform: translate3d(0,0,0) scale(1); opacity:1;} `,Aui=t=\u003e` 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;} `,cui=\"0%{opacity:0;} 100%{opacity:1;}\",lui=\"0%{opacity:1;} 100%{opacity:0;}\",uui=uP(\"div\")` :where(\u0026) { display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; } `,gui=uP(\"div\")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,dui=(t,e)=\u003e{let n=t.includes(\"top\")?1:-1,[o,i]=jon()?[cui,lui]:[aui(n),Aui(n)];return{animation:e?`${AS(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${AS(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},hui=ee.memo(({toast:t,position:e,style:n,children:o})=\u003e{let i=t.height?dui(t.position||e||\"top-center\",t.visible):{opacity:0},r=ee.createElement(sui,{toast:t}),s=ee.createElement(gui,{...t.ariaProps},Uhe(t.message,t));return ee.createElement(uui,{className:t.className,style:{...i,...n,...t.style}},typeof o==\"function\"?o({icon:r,message:s}):ee.createElement(ee.Fragment,null,r,s))});F0i(ee.createElement);var pui=({id:t,className:e,style:n,onHeightUpdate:o,children:i})=\u003e{let r=ee.useCallback(s=\u003e{if(s){let a=()=\u003e{let A=s.getBoundingClientRect().height;o(t,A)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[t,o]);return ee.createElement(\"div\",{ref:r,className:e,style:n},i)},mui=(t,e)=\u003e{let n=t.includes(\"top\"),o=n?{top:0}:{bottom:0},i=t.includes(\"center\")?{justifyContent:\"center\"}:t.includes(\"right\")?{justifyContent:\"flex-end\"}:{};return{left:0,right:0,display:\"flex\",position:\"absolute\",transition:jon()?void 0:\"all 230ms cubic-bezier(.21,1.02,.73,1)\",transform:`translateY(${e*(n?1:-1)}px)`,...o,...i}},_ui=Yhe` z-index: 9999; \u003e * { pointer-events: auto; } `,zhe=16,ein=({reverseOrder:t,position:e=\"top-center\",toastOptions:n,gutter:o,children:i,toasterId:r,containerStyle:s,containerClassName:a})=\u003e{let{toasts:A,handlers:c}=z0i(n,r);return ee.createElement(\"div\",{\"data-rht-toaster\":r||\"\",style:{position:\"fixed\",zIndex:9999,top:zhe,left:zhe,right:zhe,bottom:zhe,pointerEvents:\"none\",...s},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},A.map(l=\u003e{let u=l.position||e,g=c.calculateOffset(l,{reverseOrder:t,gutter:o,defaultPosition:e}),h=mui(u,g);return ee.createElement(pui,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?_ui:\"\",style:h},l.type===\"custom\"?Uhe(l.message,l):i?i(l):ee.createElement(hui,{toast:l,position:u}))}))},cVe={env:{},version:\"\"},fui=Object.create,tin=Object.defineProperty,Iui=Object.getOwnPropertyDescriptor,nin=Object.getOwnPropertyNames,Cui=Object.getPrototypeOf,yui=Object.prototype.hasOwnProperty,yt=(t,e)=\u003efunction(){return e||(0,t[nin(t)[0]])((e={exports:{}}).exports,e),e.exports},xui=(t,e,n,o)=\u003e{if(e\u0026\u0026typeof e==\"object\"||typeof e==\"function\")for(let i of nin(e))!yui.call(t,i)\u0026\u0026i!==n\u0026\u0026tin(t,i,{get:()=\u003ee[i],enumerable:!(o=Iui(e,i))||o.enumerable});return t},_0=(t,e,n)=\u003e(n=t!=null?fui(Cui(t)):{},xui(tin(n,\"default\",{value:t,enumerable:!0}),t)),ga=yt({\"node_modules/@jscad/modeling/src/utils/flatten.js\"(t,e){var n=o=\u003eo.flat(1/0);e.exports=n}}),Eui=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/clone.js\"(t,e){var n=o=\u003eObject.assign({},o);e.exports=n}}),Bui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/add.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]+r[0],o[1]=i[1]+r[1],o[2]=i[2]+r[2],o[3]=i[3]+r[3],o[4]=i[4]+r[4],o[5]=i[5]+r[5],o[6]=i[6]+r[6],o[7]=i[7]+r[7],o[8]=i[8]+r[8],o[9]=i[9]+r[9],o[10]=i[10]+r[10],o[11]=i[11]+r[11],o[12]=i[12]+r[12],o[13]=i[13]+r[13],o[14]=i[14]+r[14],o[15]=i[15]+r[15],o);e.exports=n}}),lVe=yt({\"node_modules/@jscad/modeling/src/maths/mat4/create.js\"(t,e){var n=()=\u003e[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.exports=n}}),bui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/clone.js\"(t,e){var n=lVe(),o=i=\u003e{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],r[4]=i[4],r[5]=i[5],r[6]=i[6],r[7]=i[7],r[8]=i[8],r[9]=i[9],r[10]=i[10],r[11]=i[11],r[12]=i[12],r[13]=i[13],r[14]=i[14],r[15]=i[15],r};e.exports=o}}),oin=yt({\"node_modules/@jscad/modeling/src/maths/mat4/copy.js\"(t,e){var n=(o,i)=\u003e(o[0]=i[0],o[1]=i[1],o[2]=i[2],o[3]=i[3],o[4]=i[4],o[5]=i[5],o[6]=i[6],o[7]=i[7],o[8]=i[8],o[9]=i[9],o[10]=i[10],o[11]=i[11],o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15],o);e.exports=n}}),Sui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/invert.js\"(t,e){var n=(o,i)=\u003e{const r=i[0],s=i[1],a=i[2],A=i[3],c=i[4],l=i[5],u=i[6],g=i[7],h=i[8],d=i[9],p=i[10],m=i[11],_=i[12],f=i[13],I=i[14],C=i[15],y=r*l-s*c,x=r*u-a*c,E=r*g-A*c,B=s*u-a*l,S=s*g-A*l,Q=a*g-A*u,w=h*f-d*_,M=h*I-p*_,k=h*C-m*_,R=d*I-p*f,F=d*C-m*f,O=p*C-m*I;let U=y*O-x*F+E*R+B*k-S*M+Q*w;return U?(U=1/U,o[0]=(l*O-u*F+g*R)*U,o[1]=(a*F-s*O-A*R)*U,o[2]=(f*Q-I*S+C*B)*U,o[3]=(p*S-d*Q-m*B)*U,o[4]=(u*k-c*O-g*M)*U,o[5]=(r*O-a*k+A*M)*U,o[6]=(I*E-_*Q-C*x)*U,o[7]=(h*Q-p*E+m*x)*U,o[8]=(c*F-l*k+g*w)*U,o[9]=(s*k-r*F-A*w)*U,o[10]=(_*S-f*E+C*y)*U,o[11]=(d*E-h*S-m*y)*U,o[12]=(l*M-c*R-u*w)*U,o[13]=(r*R-s*M+a*w)*U,o[14]=(f*x-_*B-I*y)*U,o[15]=(h*B-d*x+p*y)*U,o):null};e.exports=n}}),Qui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/equals.js\"(t,e){var n=(o,i)=\u003eo[0]===i[0]\u0026\u0026o[1]===i[1]\u0026\u0026o[2]===i[2]\u0026\u0026o[3]===i[3]\u0026\u0026o[4]===i[4]\u0026\u0026o[5]===i[5]\u0026\u0026o[6]===i[6]\u0026\u0026o[7]===i[7]\u0026\u0026o[8]===i[8]\u0026\u0026o[9]===i[9]\u0026\u0026o[10]===i[10]\u0026\u0026o[11]===i[11]\u0026\u0026o[12]===i[12]\u0026\u0026o[13]===i[13]\u0026\u0026o[14]===i[14]\u0026\u0026o[15]===i[15];e.exports=n}}),mc=yt({\"node_modules/@jscad/modeling/src/maths/constants.js\"(t,e){var n=1e5,o=1e-5,i=1e-13,r=Math.PI*2;e.exports={EPS:o,NEPS:i,TAU:r,spatialResolution:n}}}),hI=yt({\"node_modules/@jscad/modeling/src/maths/utils/trigonometry.js\"(t,e){var{NEPS:n}=mc(),o=s=\u003eMath.abs(s)\u003cn?0:s,i=s=\u003eo(Math.sin(s)),r=s=\u003eo(Math.cos(s));e.exports={sin:i,cos:r}}}),iin=yt({\"node_modules/@jscad/modeling/src/maths/mat4/identity.js\"(t,e){var n=o=\u003e(o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o);e.exports=n}}),rin=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromRotation.js\"(t,e){var{EPS:n}=mc(),{sin:o,cos:i}=hI(),r=iin(),s=(a,A,c)=\u003e{let[l,u,g]=c;const h=l*l+u*u+g*g;if(Math.abs(h)\u003cn)return r(a);const d=1/Math.sqrt(h);l*=d,u*=d,g*=d;const p=o(A),m=i(A),_=1-m;return a[0]=l*l*_+m,a[1]=u*l*_+g*p,a[2]=g*l*_-u*p,a[3]=0,a[4]=l*u*_-g*p,a[5]=u*u*_+m,a[6]=g*u*_+l*p,a[7]=0,a[8]=l*g*_+u*p,a[9]=u*g*_-l*p,a[10]=g*g*_+m,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a};e.exports=s}}),vui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromScaling.js\"(t,e){var n=(o,i)=\u003e(o[0]=i[0],o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=i[1],o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=i[2],o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o);e.exports=n}}),wui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromTaitBryanRotation.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a,A)=\u003e{const c=n(s),l=o(s),u=n(a),g=o(a),h=n(A),d=o(A);return r[0]=g*l,r[1]=g*c,r[2]=-u,r[3]=0,r[4]=h*u*l-d*c,r[5]=d*l+h*u*c,r[6]=h*g,r[7]=0,r[8]=h*c+d*u*l,r[9]=d*u*c-h*l,r[10]=d*g,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),Pui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromTranslation.js\"(t,e){var n=(o,i)=\u003e(o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=i[0],o[13]=i[1],o[14]=i[2],o[15]=1,o);e.exports=n}}),Mui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromValues.js\"(t,e){var n=lVe(),o=(i,r,s,a,A,c,l,u,g,h,d,p,m,_,f,I)=\u003e{const C=n();return C[0]=i,C[1]=r,C[2]=s,C[3]=a,C[4]=A,C[5]=c,C[6]=l,C[7]=u,C[8]=g,C[9]=h,C[10]=d,C[11]=p,C[12]=m,C[13]=_,C[14]=f,C[15]=I,C};e.exports=o}}),sin=yt({\"node_modules/@jscad/modeling/src/maths/vec3/abs.js\"(t,e){var n=(o,i)=\u003e(o[0]=Math.abs(i[0]),o[1]=Math.abs(i[1]),o[2]=Math.abs(i[2]),o);e.exports=n}}),ain=yt({\"node_modules/@jscad/modeling/src/maths/vec3/add.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]+r[0],o[1]=i[1]+r[1],o[2]=i[2]+r[2],o);e.exports=n}}),Jhe=yt({\"node_modules/@jscad/modeling/src/maths/vec3/dot.js\"(t,e){var n=(o,i)=\u003eo[0]*i[0]+o[1]*i[1]+o[2]*i[2];e.exports=n}}),Dui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/angle.js\"(t,e){var n=Jhe(),o=(i,r)=\u003e{const s=i[0],a=i[1],A=i[2],c=r[0],l=r[1],u=r[2],g=Math.sqrt(s*s+a*a+A*A),h=Math.sqrt(c*c+l*l+u*u),d=g*h,p=d\u0026\u0026n(i,r)/d;return Math.acos(Math.min(Math.max(p,-1),1))};e.exports=o}}),Whe=yt({\"node_modules/@jscad/modeling/src/maths/vec3/create.js\"(t,e){var n=()=\u003e[0,0,0];e.exports=n}}),Nui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/clone.js\"(t,e){var n=Whe(),o=i=\u003e{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r};e.exports=o}}),Ain=yt({\"node_modules/@jscad/modeling/src/maths/vec3/copy.js\"(t,e){var n=(o,i)=\u003e(o[0]=i[0],o[1]=i[1],o[2]=i[2],o);e.exports=n}}),EX=yt({\"node_modules/@jscad/modeling/src/maths/vec3/cross.js\"(t,e){var n=(o,i,r)=\u003e{const s=i[0],a=i[1],A=i[2],c=r[0],l=r[1],u=r[2];return o[0]=a*u-A*l,o[1]=A*c-s*u,o[2]=s*l-a*c,o};e.exports=n}}),cin=yt({\"node_modules/@jscad/modeling/src/maths/vec3/distance.js\"(t,e){var n=(o,i)=\u003e{const r=i[0]-o[0],s=i[1]-o[1],a=i[2]-o[2];return Math.sqrt(r*r+s*s+a*a)};e.exports=n}}),Rui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/divide.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]/r[0],o[1]=i[1]/r[1],o[2]=i[2]/r[2],o);e.exports=n}}),Tui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/equals.js\"(t,e){var n=(o,i)=\u003eo[0]===i[0]\u0026\u0026o[1]===i[1]\u0026\u0026o[2]===i[2];e.exports=n}}),kui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/fromScalar.js\"(t,e){var n=(o,i)=\u003e(o[0]=i,o[1]=i,o[2]=i,o);e.exports=n}}),Fui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/fromValues.js\"(t,e){var n=Whe(),o=(i,r,s)=\u003e{const a=n();return a[0]=i,a[1]=r,a[2]=s,a};e.exports=o}}),Lui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/fromVec2.js\"(t,e){var n=(o,i,r=0)=\u003e(o[0]=i[0],o[1]=i[1],o[2]=r,o);e.exports=n}}),lin=yt({\"node_modules/@jscad/modeling/src/maths/vec3/length.js\"(t,e){var n=o=\u003e{const i=o[0],r=o[1],s=o[2];return Math.sqrt(i*i+r*r+s*s)};e.exports=n}}),Hui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/lerp.js\"(t,e){var n=(o,i,r,s)=\u003e(o[0]=i[0]+s*(r[0]-i[0]),o[1]=i[1]+s*(r[1]-i[1]),o[2]=i[2]+s*(r[2]-i[2]),o);e.exports=n}}),uin=yt({\"node_modules/@jscad/modeling/src/maths/vec3/max.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=Math.max(i[0],r[0]),o[1]=Math.max(i[1],r[1]),o[2]=Math.max(i[2],r[2]),o);e.exports=n}}),gin=yt({\"node_modules/@jscad/modeling/src/maths/vec3/min.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=Math.min(i[0],r[0]),o[1]=Math.min(i[1],r[1]),o[2]=Math.min(i[2],r[2]),o);e.exports=n}}),Oui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/multiply.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]*r[0],o[1]=i[1]*r[1],o[2]=i[2]*r[2],o);e.exports=n}}),Gui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/negate.js\"(t,e){var n=(o,i)=\u003e(o[0]=-i[0],o[1]=-i[1],o[2]=-i[2],o);e.exports=n}}),uVe=yt({\"node_modules/@jscad/modeling/src/maths/vec3/normalize.js\"(t,e){var n=(o,i)=\u003e{const r=i[0],s=i[1],a=i[2];let A=r*r+s*s+a*a;return A\u003e0\u0026\u0026(A=1/Math.sqrt(A)),o[0]=r*A,o[1]=s*A,o[2]=a*A,o};e.exports=n}}),Yui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/orthogonal.js\"(t,e){var n=sin(),o=Whe(),i=EX(),r=(s,a)=\u003e{const A=n(o(),a),c=0+(A[0]\u003cA[1]\u0026\u0026A[0]\u003cA[2]),l=0+(A[1]\u003c=A[0]\u0026\u0026A[1]\u003cA[2]),u=0+(A[2]\u003c=A[0]\u0026\u0026A[2]\u003c=A[1]);return i(s,a,[c,l,u])};e.exports=r}}),Uui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/rotateX.js\"(t,e){var n=(o,i,r,s)=\u003e{const a=[],A=[];return a[0]=i[0]-r[0],a[1]=i[1]-r[1],a[2]=i[2]-r[2],A[0]=a[0],A[1]=a[1]*Math.cos(s)-a[2]*Math.sin(s),A[2]=a[1]*Math.sin(s)+a[2]*Math.cos(s),o[0]=A[0]+r[0],o[1]=A[1]+r[1],o[2]=A[2]+r[2],o};e.exports=n}}),Kui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/rotateY.js\"(t,e){var n=(o,i,r,s)=\u003e{const a=[],A=[];return a[0]=i[0]-r[0],a[1]=i[1]-r[1],a[2]=i[2]-r[2],A[0]=a[2]*Math.sin(s)+a[0]*Math.cos(s),A[1]=a[1],A[2]=a[2]*Math.cos(s)-a[0]*Math.sin(s),o[0]=A[0]+r[0],o[1]=A[1]+r[1],o[2]=A[2]+r[2],o};e.exports=n}}),Vui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/rotateZ.js\"(t,e){var n=(o,i,r,s)=\u003e{const a=[],A=[];return a[0]=i[0]-r[0],a[1]=i[1]-r[1],A[0]=a[0]*Math.cos(s)-a[1]*Math.sin(s),A[1]=a[0]*Math.sin(s)+a[1]*Math.cos(s),o[0]=A[0]+r[0],o[1]=A[1]+r[1],o[2]=i[2],o};e.exports=n}}),din=yt({\"node_modules/@jscad/modeling/src/maths/vec3/scale.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]*r,o[1]=i[1]*r,o[2]=i[2]*r,o);e.exports=n}}),zui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/snap.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=Math.round(i[0]/r)*r+0,o[1]=Math.round(i[1]/r)*r+0,o[2]=Math.round(i[2]/r)*r+0,o);e.exports=n}}),hin=yt({\"node_modules/@jscad/modeling/src/maths/vec3/squaredDistance.js\"(t,e){var n=(o,i)=\u003e{const r=i[0]-o[0],s=i[1]-o[1],a=i[2]-o[2];return r*r+s*s+a*a};e.exports=n}}),pin=yt({\"node_modules/@jscad/modeling/src/maths/vec3/squaredLength.js\"(t,e){var n=o=\u003e{const i=o[0],r=o[1],s=o[2];return i*i+r*r+s*s};e.exports=n}}),jhe=yt({\"node_modules/@jscad/modeling/src/maths/vec3/subtract.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]-r[0],o[1]=i[1]-r[1],o[2]=i[2]-r[2],o);e.exports=n}}),Jui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/toString.js\"(t,e){var n=o=\u003e`[${o[0].toFixed(7)}, ${o[1].toFixed(7)}, ${o[2].toFixed(7)}]`;e.exports=n}}),Wui=yt({\"node_modules/@jscad/modeling/src/maths/vec3/transform.js\"(t,e){var n=(o,i,r)=\u003e{const s=i[0],a=i[1],A=i[2];let c=r[3]*s+r[7]*a+r[11]*A+r[15];return c=c||1,o[0]=(r[0]*s+r[4]*a+r[8]*A+r[12])/c,o[1]=(r[1]*s+r[5]*a+r[9]*A+r[13])/c,o[2]=(r[2]*s+r[6]*a+r[10]*A+r[14])/c,o};e.exports=n}}),$r=yt({\"node_modules/@jscad/modeling/src/maths/vec3/index.js\"(t,e){e.exports={abs:sin(),add:ain(),angle:Dui(),clone:Nui(),copy:Ain(),create:Whe(),cross:EX(),distance:cin(),divide:Rui(),dot:Jhe(),equals:Tui(),fromScalar:kui(),fromValues:Fui(),fromVec2:Lui(),length:lin(),lerp:Hui(),max:uin(),min:gin(),multiply:Oui(),negate:Gui(),normalize:uVe(),orthogonal:Yui(),rotateX:Uui(),rotateY:Kui(),rotateZ:Vui(),scale:din(),snap:zui(),squaredDistance:hin(),squaredLength:pin(),subtract:jhe(),toString:Jui(),transform:Wui()}}}),jui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromVectorRotation.js\"(t,e){var n=$r(),o=rin(),i=(r,s,a)=\u003e{const A=n.normalize(n.create(),s),c=n.normalize(n.create(),a),l=n.cross(n.create(),c,A),u=n.dot(c,A);if(u===-1)return o(r,Math.PI,n.orthogonal(l,A));const g=1/(1+u);return r[0]=l[0]*l[0]*g+u,r[1]=l[1]*l[0]*g-l[2],r[2]=l[2]*l[0]*g+l[1],r[3]=0,r[4]=l[0]*l[1]*g+l[2],r[5]=l[1]*l[1]*g+u,r[6]=l[2]*l[1]*g-l[0],r[7]=0,r[8]=l[0]*l[2]*g-l[1],r[9]=l[1]*l[2]*g+l[0],r[10]=l[2]*l[2]*g+u,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),$ui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromXRotation.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=\u003e{const a=n(s),A=o(s);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=A,r[6]=a,r[7]=0,r[8]=0,r[9]=-a,r[10]=A,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),qui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromYRotation.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=\u003e{const a=n(s),A=o(s);return r[0]=A,r[1]=0,r[2]=-a,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=a,r[9]=0,r[10]=A,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),Xui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/fromZRotation.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=\u003e{const a=n(s),A=o(s);return r[0]=A,r[1]=a,r[2]=0,r[3]=0,r[4]=-a,r[5]=A,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r};e.exports=i}}),Zui=yt({\"node_modules/@jscad/modeling/src/maths/mat4/isIdentity.js\"(t,e){var n=o=\u003eo[0]===1\u0026\u0026o[1]===0\u0026\u0026o[2]===0\u0026\u0026o[3]===0\u0026\u0026o[4]===0\u0026\u0026o[5]===1\u0026\u0026o[6]===0\u0026\u0026o[7]===0\u0026\u0026o[8]===0\u0026\u0026o[9]===0\u0026\u0026o[10]===1\u0026\u0026o[11]===0\u0026\u0026o[12]===0\u0026\u0026o[13]===0\u0026\u0026o[14]===0\u0026\u0026o[15]===1;e.exports=n}}),egi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/isOnlyTransformScale.js\"(t,e){var n=i=\u003eo(i[1])\u0026\u0026o(i[2])\u0026\u0026o(i[3])\u0026\u0026o(i[4])\u0026\u0026o(i[6])\u0026\u0026o(i[7])\u0026\u0026o(i[8])\u0026\u0026o(i[9])\u0026\u0026o(i[11])\u0026\u0026i[15]===1,o=i=\u003eMath.abs(i)\u003cNumber.EPSILON;e.exports=n}}),tgi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/isMirroring.js\"(t,e){var n=o=\u003e{const i=o[4]*o[9]-o[8]*o[5],r=o[8]*o[1]-o[0]*o[9],s=o[0]*o[5]-o[4]*o[1];return i*o[2]+r*o[6]+s*o[10]\u003c0};e.exports=n}}),ngi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/mirrorByPlane.js\"(t,e){var n=(o,i)=\u003e{const[r,s,a,A]=i;return o[0]=1-2*r*r,o[1]=-2*s*r,o[2]=-2*a*r,o[3]=0,o[4]=-2*r*s,o[5]=1-2*s*s,o[6]=-2*a*s,o[7]=0,o[8]=-2*r*a,o[9]=-2*s*a,o[10]=1-2*a*a,o[11]=0,o[12]=2*r*A,o[13]=2*s*A,o[14]=2*a*A,o[15]=1,o};e.exports=n}}),ogi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/multiply.js\"(t,e){var n=(o,i,r)=\u003e{const s=i[0],a=i[1],A=i[2],c=i[3],l=i[4],u=i[5],g=i[6],h=i[7],d=i[8],p=i[9],m=i[10],_=i[11],f=i[12],I=i[13],C=i[14],y=i[15];let x=r[0],E=r[1],B=r[2],S=r[3];return o[0]=x*s+E*l+B*d+S*f,o[1]=x*a+E*u+B*p+S*I,o[2]=x*A+E*g+B*m+S*C,o[3]=x*c+E*h+B*_+S*y,x=r[4],E=r[5],B=r[6],S=r[7],o[4]=x*s+E*l+B*d+S*f,o[5]=x*a+E*u+B*p+S*I,o[6]=x*A+E*g+B*m+S*C,o[7]=x*c+E*h+B*_+S*y,x=r[8],E=r[9],B=r[10],S=r[11],o[8]=x*s+E*l+B*d+S*f,o[9]=x*a+E*u+B*p+S*I,o[10]=x*A+E*g+B*m+S*C,o[11]=x*c+E*h+B*_+S*y,x=r[12],E=r[13],B=r[14],S=r[15],o[12]=x*s+E*l+B*d+S*f,o[13]=x*a+E*u+B*p+S*I,o[14]=x*A+E*g+B*m+S*C,o[15]=x*c+E*h+B*_+S*y,o};e.exports=n}}),igi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/rotate.js\"(t,e){var{EPS:n}=mc(),{sin:o,cos:i}=hI(),r=oin(),s=(a,A,c,l)=\u003e{let[u,g,h]=l;const d=u*u+g*g+h*h;if(Math.abs(d)\u003cn)return r(a,A);const p=1/Math.sqrt(d);u*=p,g*=p,h*=p;const m=o(c),_=i(c),f=1-_,I=A[0],C=A[1],y=A[2],x=A[3],E=A[4],B=A[5],S=A[6],Q=A[7],w=A[8],M=A[9],k=A[10],R=A[11],F=u*u*f+_,O=g*u*f+h*m,U=h*u*f-g*m,Y=u*g*f-h*m,W=g*g*f+_,te=h*g*f+u*m,j=u*h*f+g*m,J=g*h*f-u*m,oe=h*h*f+_;return a[0]=I*F+E*O+w*U,a[1]=C*F+B*O+M*U,a[2]=y*F+S*O+k*U,a[3]=x*F+Q*O+R*U,a[4]=I*Y+E*W+w*te,a[5]=C*Y+B*W+M*te,a[6]=y*Y+S*W+k*te,a[7]=x*Y+Q*W+R*te,a[8]=I*j+E*J+w*oe,a[9]=C*j+B*J+M*oe,a[10]=y*j+S*J+k*oe,a[11]=x*j+Q*J+R*oe,A!==a\u0026\u0026(a[12]=A[12],a[13]=A[13],a[14]=A[14],a[15]=A[15]),a};e.exports=s}}),rgi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/rotateX.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a)=\u003e{const A=n(a),c=o(a),l=s[4],u=s[5],g=s[6],h=s[7],d=s[8],p=s[9],m=s[10],_=s[11];return s!==r\u0026\u0026(r[0]=s[0],r[1]=s[1],r[2]=s[2],r[3]=s[3],r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r[4]=l*c+d*A,r[5]=u*c+p*A,r[6]=g*c+m*A,r[7]=h*c+_*A,r[8]=d*c-l*A,r[9]=p*c-u*A,r[10]=m*c-g*A,r[11]=_*c-h*A,r};e.exports=i}}),sgi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/rotateY.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a)=\u003e{const A=n(a),c=o(a),l=s[0],u=s[1],g=s[2],h=s[3],d=s[8],p=s[9],m=s[10],_=s[11];return s!==r\u0026\u0026(r[4]=s[4],r[5]=s[5],r[6]=s[6],r[7]=s[7],r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r[0]=l*c-d*A,r[1]=u*c-p*A,r[2]=g*c-m*A,r[3]=h*c-_*A,r[8]=l*A+d*c,r[9]=u*A+p*c,r[10]=g*A+m*c,r[11]=h*A+_*c,r};e.exports=i}}),agi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/rotateZ.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s,a)=\u003e{const A=n(a),c=o(a),l=s[0],u=s[1],g=s[2],h=s[3],d=s[4],p=s[5],m=s[6],_=s[7];return s!==r\u0026\u0026(r[8]=s[8],r[9]=s[9],r[10]=s[10],r[11]=s[11],r[12]=s[12],r[13]=s[13],r[14]=s[14],r[15]=s[15]),r[0]=l*c+d*A,r[1]=u*c+p*A,r[2]=g*c+m*A,r[3]=h*c+_*A,r[4]=d*c-l*A,r[5]=p*c-u*A,r[6]=m*c-g*A,r[7]=_*c-h*A,r};e.exports=i}}),Agi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/scale.js\"(t,e){var n=(o,i,r)=\u003e{const s=r[0],a=r[1],A=r[2];return o[0]=i[0]*s,o[1]=i[1]*s,o[2]=i[2]*s,o[3]=i[3]*s,o[4]=i[4]*a,o[5]=i[5]*a,o[6]=i[6]*a,o[7]=i[7]*a,o[8]=i[8]*A,o[9]=i[9]*A,o[10]=i[10]*A,o[11]=i[11]*A,o[12]=i[12],o[13]=i[13],o[14]=i[14],o[15]=i[15],o};e.exports=n}}),cgi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/subtract.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]-r[0],o[1]=i[1]-r[1],o[2]=i[2]-r[2],o[3]=i[3]-r[3],o[4]=i[4]-r[4],o[5]=i[5]-r[5],o[6]=i[6]-r[6],o[7]=i[7]-r[7],o[8]=i[8]-r[8],o[9]=i[9]-r[9],o[10]=i[10]-r[10],o[11]=i[11]-r[11],o[12]=i[12]-r[12],o[13]=i[13]-r[13],o[14]=i[14]-r[14],o[15]=i[15]-r[15],o);e.exports=n}}),lgi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/toString.js\"(t,e){var n=o=\u003eo.map(i=\u003ei.toFixed(7)).toString();e.exports=n}}),ugi=yt({\"node_modules/@jscad/modeling/src/maths/mat4/translate.js\"(t,e){var n=(o,i,r)=\u003e{const s=r[0],a=r[1],A=r[2];let c,l,u,g,h,d,p,m,_,f,I,C;return i===o?(o[12]=i[0]*s+i[4]*a+i[8]*A+i[12],o[13]=i[1]*s+i[5]*a+i[9]*A+i[13],o[14]=i[2]*s+i[6]*a+i[10]*A+i[14],o[15]=i[3]*s+i[7]*a+i[11]*A+i[15]):(c=i[0],l=i[1],u=i[2],g=i[3],h=i[4],d=i[5],p=i[6],m=i[7],_=i[8],f=i[9],I=i[10],C=i[11],o[0]=c,o[1]=l,o[2]=u,o[3]=g,o[4]=h,o[5]=d,o[6]=p,o[7]=m,o[8]=_,o[9]=f,o[10]=I,o[11]=C,o[12]=c*s+h*a+_*A+i[12],o[13]=l*s+d*a+f*A+i[13],o[14]=u*s+p*a+I*A+i[14],o[15]=g*s+m*a+C*A+i[15]),o};e.exports=n}}),Du=yt({\"node_modules/@jscad/modeling/src/maths/mat4/index.js\"(t,e){e.exports={add:Bui(),clone:bui(),copy:oin(),create:lVe(),invert:Sui(),equals:Qui(),fromRotation:rin(),fromScaling:vui(),fromTaitBryanRotation:wui(),fromTranslation:Pui(),fromValues:Mui(),fromVectorRotation:jui(),fromXRotation:$ui(),fromYRotation:qui(),fromZRotation:Xui(),identity:iin(),isIdentity:Zui(),isOnlyTransformScale:egi(),isMirroring:tgi(),mirrorByPlane:ngi(),multiply:ogi(),rotate:igi(),rotateX:rgi(),rotateY:sgi(),rotateZ:agi(),scale:Agi(),subtract:cgi(),toString:lgi(),translate:ugi()}}}),$he=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/create.js\"(t,e){var n=Du(),o=i=\u003e(i===void 0\u0026\u0026(i=[]),{sides:i,transforms:n.create()});e.exports=o}}),ggi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/abs.js\"(t,e){var n=(o,i)=\u003e(o[0]=Math.abs(i[0]),o[1]=Math.abs(i[1]),o);e.exports=n}}),dgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/add.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]+r[0],o[1]=i[1]+r[1],o);e.exports=n}}),gVe=yt({\"node_modules/@jscad/modeling/src/maths/vec2/angleRadians.js\"(t,e){var n=o=\u003eMath.atan2(o[1],o[0]);e.exports=n}}),hgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/angle.js\"(t,e){e.exports=gVe()}}),pgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/angleDegrees.js\"(t,e){var n=gVe(),o=i=\u003en(i)*57.29577951308232;e.exports=o}}),qhe=yt({\"node_modules/@jscad/modeling/src/maths/vec2/create.js\"(t,e){var n=()=\u003e[0,0];e.exports=n}}),mgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/clone.js\"(t,e){var n=qhe(),o=i=\u003e{const r=n();return r[0]=i[0],r[1]=i[1],r};e.exports=o}}),_gi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/copy.js\"(t,e){var n=(o,i)=\u003e(o[0]=i[0],o[1]=i[1],o);e.exports=n}}),fgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/cross.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=0,o[1]=0,o[2]=i[0]*r[1]-i[1]*r[0],o);e.exports=n}}),Igi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/distance.js\"(t,e){var n=(o,i)=\u003e{const r=i[0]-o[0],s=i[1]-o[1];return Math.sqrt(r*r+s*s)};e.exports=n}}),Cgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/divide.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]/r[0],o[1]=i[1]/r[1],o);e.exports=n}}),ygi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/dot.js\"(t,e){var n=(o,i)=\u003eo[0]*i[0]+o[1]*i[1];e.exports=n}}),xgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/equals.js\"(t,e){var n=(o,i)=\u003eo[0]===i[0]\u0026\u0026o[1]===i[1];e.exports=n}}),min=yt({\"node_modules/@jscad/modeling/src/maths/vec2/fromAngleRadians.js\"(t,e){var{sin:n,cos:o}=hI(),i=(r,s)=\u003e(r[0]=o(s),r[1]=n(s),r);e.exports=i}}),Egi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/fromAngleDegrees.js\"(t,e){var n=min(),o=(i,r)=\u003en(i,r*.017453292519943295);e.exports=o}}),Bgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/fromScalar.js\"(t,e){var n=(o,i)=\u003e(o[0]=i,o[1]=i,o);e.exports=n}}),bgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/fromValues.js\"(t,e){var n=qhe(),o=(i,r)=\u003e{const s=n();return s[0]=i,s[1]=r,s};e.exports=o}}),Sgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/length.js\"(t,e){var n=o=\u003eMath.sqrt(o[0]*o[0]+o[1]*o[1]);e.exports=n}}),Qgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/lerp.js\"(t,e){var n=(o,i,r,s)=\u003e{const a=i[0],A=i[1];return o[0]=a+s*(r[0]-a),o[1]=A+s*(r[1]-A),o};e.exports=n}}),vgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/max.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=Math.max(i[0],r[0]),o[1]=Math.max(i[1],r[1]),o);e.exports=n}}),wgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/min.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=Math.min(i[0],r[0]),o[1]=Math.min(i[1],r[1]),o);e.exports=n}}),Pgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/multiply.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]*r[0],o[1]=i[1]*r[1],o);e.exports=n}}),Mgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/negate.js\"(t,e){var n=(o,i)=\u003e(o[0]=-i[0],o[1]=-i[1],o);e.exports=n}}),_in=yt({\"node_modules/@jscad/modeling/src/maths/vec2/rotate.js\"(t,e){var n=(o,i,r,s)=\u003e{const a=i[0]-r[0],A=i[1]-r[1],c=Math.cos(s),l=Math.sin(s);return o[0]=a*c-A*l+r[0],o[1]=a*l+A*c+r[1],o};e.exports=n}}),Dgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/normal.js\"(t,e){var{TAU:n}=mc(),o=qhe(),i=_in(),r=(s,a)=\u003ei(s,a,o(),n/4);e.exports=r}}),Ngi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/normalize.js\"(t,e){var n=(o,i)=\u003e{const r=i[0],s=i[1];let a=r*r+s*s;return a\u003e0\u0026\u0026(a=1/Math.sqrt(a)),o[0]=r*a,o[1]=s*a,o};e.exports=n}}),Rgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/scale.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]*r,o[1]=i[1]*r,o);e.exports=n}}),Tgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/snap.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=Math.round(i[0]/r)*r+0,o[1]=Math.round(i[1]/r)*r+0,o);e.exports=n}}),kgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/squaredDistance.js\"(t,e){var n=(o,i)=\u003e{const r=i[0]-o[0],s=i[1]-o[1];return r*r+s*s};e.exports=n}}),Fgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/squaredLength.js\"(t,e){var n=o=\u003e{const i=o[0],r=o[1];return i*i+r*r};e.exports=n}}),Lgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/subtract.js\"(t,e){var n=(o,i,r)=\u003e(o[0]=i[0]-r[0],o[1]=i[1]-r[1],o);e.exports=n}}),Hgi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/toString.js\"(t,e){var n=o=\u003e`[${o[0].toFixed(7)}, ${o[1].toFixed(7)}]`;e.exports=n}}),Ogi=yt({\"node_modules/@jscad/modeling/src/maths/vec2/transform.js\"(t,e){var n=(o,i,r)=\u003e{const s=i[0],a=i[1];return o[0]=r[0]*s+r[4]*a+r[12],o[1]=r[1]*s+r[5]*a+r[13],o};e.exports=n}}),_A=yt({\"node_modules/@jscad/modeling/src/maths/vec2/index.js\"(t,e){e.exports={abs:ggi(),add:dgi(),angle:hgi(),angleDegrees:pgi(),angleRadians:gVe(),clone:mgi(),copy:_gi(),create:qhe(),cross:fgi(),distance:Igi(),divide:Cgi(),dot:ygi(),equals:xgi(),fromAngleDegrees:Egi(),fromAngleRadians:min(),fromScalar:Bgi(),fromValues:bgi(),length:Sgi(),lerp:Qgi(),max:vgi(),min:wgi(),multiply:Pgi(),negate:Mgi(),normal:Dgi(),normalize:Ngi(),rotate:_in(),scale:Rgi(),snap:Tgi(),squaredDistance:kgi(),squaredLength:Fgi(),subtract:Lgi(),toString:Hgi(),transform:Ogi()}}}),Ggi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/fromPoints.js\"(t,e){var n=_A(),o=$he(),i=r=\u003e{if(!Array.isArray(r))throw new Error(\"the given points must be an array\");let s=r.length;if(s\u003c3)throw new Error(\"the given points must define a closed geometry with three or more points\");n.equals(r[0],r[s-1])\u0026\u0026--s;const a=[];let A=r[s-1];for(let c=0;c\u003cs;c++){const l=r[c];a.push([n.clone(A),n.clone(l)]),A=l}return o(a)};e.exports=i}}),Ygi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/fromCompactBinary.js\"(t,e){var n=Du(),o=_A(),i=$he(),r=s=\u003e{if(s[0]!==0)throw new Error(\"invalid compact binary data\");const a=i();a.transforms=n.clone(s.slice(1,17));for(let A=21;A\u003cs.length;A+=4){const c=o.fromValues(s[A+0],s[A+1]),l=o.fromValues(s[A+2],s[A+3]);a.sides.push([c,l])}return s[17]\u003e=0\u0026\u0026(a.color=[s[17],s[18],s[19],s[20]]),a};e.exports=r}}),fin=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/isA.js\"(t,e){var n=o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"sides\"in o\u0026\u0026\"transforms\"in o\u0026\u0026Array.isArray(o.sides)\u0026\u0026\"length\"in o.transforms);e.exports=n}}),Ugi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/applyTransforms.js\"(t,e){var n=Du(),o=_A(),i=r=\u003e(n.isIdentity(r.transforms)||(r.sides=r.sides.map(s=\u003e{const a=o.transform(o.create(),s[0],r.transforms),A=o.transform(o.create(),s[1],r.transforms);return[a,A]}),r.transforms=n.create()),r);e.exports=i}}),BX=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/toSides.js\"(t,e){var n=Ugi(),o=i=\u003en(i).sides;e.exports=o}}),Iin=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/reverse.js\"(t,e){var n=$he(),o=BX(),i=r=\u003e{const a=o(r).map(A=\u003e[A[1],A[0]]);return a.reverse(),n(a)};e.exports=i}}),Cin=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/toOutlines.js\"(t,e){var n=_A(),o=BX(),i=A=\u003e{const c=new Map,l=u=\u003e{const g=u.toString();return c.has(g)?c.get(g):(c.set(g,u),u)};return A.map(u=\u003eu.map(l))},r=A=\u003e{const c=new Map;return i(A).forEach(u=\u003e{c.has(u[0])?c.get(u[0]).push(u):c.set(u[0],[u])}),c},s=A=\u003e{const c=r(o(A)),l=[];for(;;){let u;for(const[d,p]of c){if(u=p.shift(),!u){c.delete(d);continue}break}if(u===void 0)break;const g=[],h=u[0];for(;;){g.push(u[0]);const d=u[1];if(d===h)break;const p=c.get(d);if(!p)throw new Error(`geometry is not closed at vertex ${d}`);const m=a(u,p);p.length===0\u0026\u0026c.delete(d),u=m}g.length\u003e0\u0026\u0026g.push(g.shift()),l.push(g)}return c.clear(),l},a=(A,c)=\u003e{if(c.length===1)return c.pop();const l=n.create(),u=n.angleDegrees(n.subtract(l,A[1],A[0]));let g,h;c.forEach((p,m)=\u003e{let f=n.angleDegrees(n.subtract(l,p[1],p[0]))-u;f\u003c-180\u0026\u0026(f+=360),f\u003e=180\u0026\u0026(f-=360),(h===void 0||f\u003eg)\u0026\u0026(h=m,g=f)});const d=c[h];return c.splice(h,1),d};e.exports=s}}),Kgi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/toPoints.js\"(t,e){var n=BX(),o=i=\u003e{const s=n(i).map(a=\u003ea[0]);return s.length\u003e0\u0026\u0026s.push(s.shift()),s};e.exports=o}}),Vgi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/toString.js\"(t,e){var n=_A(),o=BX(),i=r=\u003e{const s=o(r);let a=\"geom2 (\"+s.length+` sides):\n[\n`;return s.forEach(A=\u003e{a+=\" [\"+n.toString(A[0])+\", \"+n.toString(A[1])+`]\n`}),a+=`]\n`,a};e.exports=i}}),zgi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/toCompactBinary.js\"(t,e){var n=o=\u003e{const i=o.sides,r=o.transforms;let s=[-1,-1,-1,-1];o.color\u0026\u0026(s=o.color);const a=new Float32Array(21+i.length*4);a[0]=0,a[1]=r[0],a[2]=r[1],a[3]=r[2],a[4]=r[3],a[5]=r[4],a[6]=r[5],a[7]=r[6],a[8]=r[7],a[9]=r[8],a[10]=r[9],a[11]=r[10],a[12]=r[11],a[13]=r[12],a[14]=r[13],a[15]=r[14],a[16]=r[15],a[17]=s[0],a[18]=s[1],a[19]=s[2],a[20]=s[3];for(let A=0;A\u003ci.length;A++){const c=A*4+21,l=i[A][0],u=i[A][1];a[c+0]=l[0],a[c+1]=l[1],a[c+2]=u[0],a[c+3]=u[1]}return a};e.exports=n}}),Jgi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/transform.js\"(t,e){var n=Du(),o=Iin(),i=(r,s)=\u003e{const a=n.multiply(n.create(),r,s.transforms),A=Object.assign({},s,{transforms:a});return r[0]*r[5]-r[4]*r[1]\u003c0?o(A):A};e.exports=i}}),Wgi=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/validate.js\"(t,e){var n=_A(),o=fin(),i=Cin(),r=s=\u003e{if(!o(s))throw new Error(\"invalid geom2 structure\");if(i(s),s.sides.forEach(a=\u003e{if(n.equals(a[0],a[1]))throw new Error(`geom2 self-edge ${a[0]}`)}),!s.transforms.every(Number.isFinite))throw new Error(`geom2 invalid transforms ${s.transforms}`)};e.exports=r}}),Ya=yt({\"node_modules/@jscad/modeling/src/geometries/geom2/index.js\"(t,e){e.exports={clone:Eui(),create:$he(),fromPoints:Ggi(),fromCompactBinary:Ygi(),isA:fin(),reverse:Iin(),toOutlines:Cin(),toPoints:Kgi(),toSides:BX(),toString:Vgi(),toCompactBinary:zgi(),transform:Jgi(),validate:Wgi()}}}),jgi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/clone.js\"(t,e){var n=o=\u003eObject.assign({},o);e.exports=n}}),bX=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/create.js\"(t,e){var n=Du(),o=i=\u003e(i===void 0\u0026\u0026(i=[]),{polygons:i,transforms:n.create()});e.exports=o}}),$gi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/point-line-distance.js\"(t,e){var n=EX(),o=jhe(),i=pin(),r=(a,A,c)=\u003e{const l=[],u=[],g=[];o(l,c,A),o(u,a,A);const h=i(n(g,u,l)),d=i(l);if(d===0)throw Error(\"a and b are the same point\");return h/d},s=(a,A,c)=\u003eMath.sqrt(r(a,A,c));e.exports=s}}),qgi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/get-plane-normal.js\"(t,e){var n=EX(),o=uVe(),i=jhe(),r=(s,a,A,c)=\u003e{const l=[0,0,0];return i(s,a,A),i(l,A,c),n(s,s,l),o(s,s)};e.exports=r}}),Xgi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/VertexList.js\"(t,e){var n=class{constructor(){this.head=null,this.tail=null}clear(){this.head=this.tail=null}insertBefore(o,i){i.prev=o.prev,i.next=o,i.prev?i.prev.next=i:this.head=i,o.prev=i}insertAfter(o,i){i.prev=o,i.next=o.next,i.next?i.next.prev=i:this.tail=i,o.next=i}add(o){this.head?this.tail.next=o:this.head=o,o.prev=this.tail,o.next=null,this.tail=o}addAll(o){for(this.head?this.tail.next=o:this.head=o,o.prev=this.tail;o.next;)o=o.next;this.tail=o}remove(o){o.prev?o.prev.next=o.next:this.head=o.next,o.next?o.next.prev=o.prev:this.tail=o.prev}removeChain(o,i){o.prev?o.prev.next=i.next:this.head=i.next,i.next?i.next.prev=o.prev:this.tail=o.prev}first(){return this.head}isEmpty(){return!this.head}};e.exports=n}}),Zgi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/Vertex.js\"(t,e){var n=class{constructor(o,i){this.point=o,this.index=i,this.next=null,this.prev=null,this.face=null}};e.exports=n}}),edi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/HalfEdge.js\"(t,e){var n=cin(),o=hin(),i=class{constructor(r,s){this.vertex=r,this.face=s,this.next=null,this.prev=null,this.opposite=null}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){return this.tail()?n(this.tail().point,this.head().point):-1}lengthSquared(){return this.tail()?o(this.tail().point,this.head().point):-1}setOpposite(r){this.opposite=r,r.opposite=this}};e.exports=i}}),tdi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/Face.js\"(t,e){var n=ain(),o=Ain(),i=EX(),r=Jhe(),s=lin(),a=uVe(),A=din(),c=jhe(),l=edi(),u=0,g=1,h=2,d=class I4n{constructor(){this.normal=[],this.centroid=[],this.offset=0,this.outside=null,this.mark=u,this.edge=null,this.nVertices=0}getEdge(m){if(typeof m!=\"number\")throw Error(\"requires a number\");let _=this.edge;for(;m\u003e0;)_=_.next,m-=1;for(;m\u003c0;)_=_.prev,m+=1;return _}computeNormal(){const m=this.edge,_=m.next;let f=_.next;const I=c([],_.head().point,m.head().point),C=[],y=[];for(this.nVertices=2,this.normal=[0,0,0];f!==m;)o(y,I),c(I,f.head().point,m.head().point),n(this.normal,this.normal,i(C,y,I)),f=f.next,this.nVertices+=1;this.area=s(this.normal),this.normal=A(this.normal,this.normal,1/this.area)}computeNormalMinArea(m){if(this.computeNormal(),this.area\u003cm){let _,f=0,I=this.edge;do{const S=I.lengthSquared();S\u003ef\u0026\u0026(_=I,f=S),I=I.next}while(I!==this.edge);const C=_.tail().point,y=_.head().point,x=c([],y,C),E=Math.sqrt(f);A(x,x,1/E);const B=r(this.normal,x);A(x,x,-B),n(this.normal,this.normal,x),a(this.normal,this.normal)}}computeCentroid(){this.centroid=[0,0,0];let m=this.edge;do n(this.centroid,this.centroid,m.head().point),m=m.next;while(m!==this.edge);A(this.centroid,this.centroid,1/this.nVertices)}computeNormalAndCentroid(m){typeof m\u003c\"u\"?this.computeNormalMinArea(m):this.computeNormal(),this.computeCentroid(),this.offset=r(this.normal,this.centroid)}distanceToPlane(m){return r(this.normal,m)-this.offset}connectHalfEdges(m,_){let f;if(m.opposite.face===_.opposite.face){const I=_.opposite.face;let C;m===this.edge\u0026\u0026(this.edge=_),I.nVertices===3?(C=_.opposite.prev.opposite,I.mark=h,f=I):(C=_.opposite.next,I.edge===C.prev\u0026\u0026(I.edge=C),C.prev=C.prev.prev,C.prev.next=C),_.prev=m.prev,_.prev.next=_,_.setOpposite(C),I.computeNormalAndCentroid()}else m.next=_,_.prev=m;return f}mergeAdjacentFaces(m,_){const f=m.opposite,I=f.face;_.push(I),I.mark=h;let C=m.prev,y=m.next,x=f.prev,E=f.next;for(;C.opposite.face===I;)C=C.prev,E=E.next;for(;y.opposite.face===I;)y=y.next,x=x.prev;let B;for(B=E;B!==x.next;B=B.next)B.face=this;this.edge=y;let S;return S=this.connectHalfEdges(x,y),S\u0026\u0026_.push(S),S=this.connectHalfEdges(C,E),S\u0026\u0026_.push(S),this.computeNormalAndCentroid(),_}collectIndices(){const m=[];let _=this.edge;do m.push(_.head().index),_=_.next;while(_!==this.edge);return m}static createTriangle(m,_,f,I=0){const C=new I4n,y=new l(m,C),x=new l(_,C),E=new l(f,C);return y.next=E.prev=x,x.next=y.prev=E,E.next=x.prev=y,C.edge=y,C.computeNormalAndCentroid(I),C}};e.exports={VISIBLE:u,NON_CONVEX:g,DELETED:h,Face:d}}}),ndi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/QuickHull.js\"(t,e){var n=Jhe(),o=$gi(),i=qgi(),r=Xgi(),s=Zgi(),{Face:a,VISIBLE:A,NON_CONVEX:c,DELETED:l}=tdi(),u=1,g=2,h=class{constructor(d){if(!Array.isArray(d))throw TypeError(\"input is not a valid array\");if(d.length\u003c4)throw Error(\"cannot build a simplex out of \u003c4 points\");this.tolerance=-1,this.nFaces=0,this.nPoints=d.length,this.faces=[],this.newFaces=[],this.claimed=new r,this.unclaimed=new r,this.vertices=[];for(let p=0;p\u003cd.length;p+=1)this.vertices.push(new s(d[p],p));this.discardedFaces=[],this.vertexPointIndices=[]}addVertexToFace(d,p){d.face=p,p.outside?this.claimed.insertBefore(p.outside,d):this.claimed.add(d),p.outside=d}removeVertexFromFace(d,p){d===p.outside\u0026\u0026(d.next\u0026\u0026d.next.face===p?p.outside=d.next:p.outside=null),this.claimed.remove(d)}removeAllVerticesFromFace(d){if(d.outside){let p=d.outside;for(;p.next\u0026\u0026p.next.face===d;)p=p.next;return this.claimed.removeChain(d.outside,p),p.next=null,d.outside}}deleteFaceVertices(d,p){const m=this.removeAllVerticesFromFace(d);if(m)if(!p)this.unclaimed.addAll(m);else{let _;for(let f=m;f;f=_)_=f.next,p.distanceToPlane(f.point)\u003ethis.tolerance?this.addVertexToFace(f,p):this.unclaimed.add(f)}}resolveUnclaimedPoints(d){let p=this.unclaimed.first();for(let m=p;m;m=p){p=m.next;let _=this.tolerance,f;for(let I=0;I\u003cd.length;I+=1){const C=d[I];if(C.mark===A){const y=C.distanceToPlane(m.point);if(y\u003e_\u0026\u0026(_=y,f=C),_\u003e1e3*this.tolerance)break}}f\u0026\u0026this.addVertexToFace(m,f)}}computeExtremes(){const d=[],p=[],m=[],_=[];let f,I;for(f=0;f\u003c3;f+=1)m[f]=_[f]=this.vertices[0];for(f=0;f\u003c3;f+=1)d[f]=p[f]=this.vertices[0].point[f];for(f=1;f\u003cthis.vertices.length;f+=1){const C=this.vertices[f],y=C.point;for(I=0;I\u003c3;I+=1)y[I]\u003cd[I]\u0026\u0026(d[I]=y[I],m[I]=C);for(I=0;I\u003c3;I+=1)y[I]\u003ep[I]\u0026\u0026(p[I]=y[I],_[I]=C)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(d[0]),Math.abs(p[0]))+Math.max(Math.abs(d[1]),Math.abs(p[1]))+Math.max(Math.abs(d[2]),Math.abs(p[2]))),[m,_]}createInitialSimplex(){const d=this.vertices,[p,m]=this.computeExtremes();let _,f,I,C,y=0,x=0;for(I=0;I\u003c3;I+=1){const M=m[I].point[I]-p[I].point[I];M\u003ey\u0026\u0026(y=M,x=I)}const E=p[x],B=m[x];for(y=0,I=0;I\u003cthis.vertices.length;I+=1){const M=this.vertices[I];if(M!==E\u0026\u0026M!==B){const k=o(M.point,E.point,B.point);k\u003ey\u0026\u0026(y=k,_=M)}}const S=i([],E.point,B.point,_.point),Q=n(E.point,S);for(y=-1,I=0;I\u003cthis.vertices.length;I+=1){const M=this.vertices[I];if(M!==E\u0026\u0026M!==B\u0026\u0026M!==_){const k=Math.abs(n(S,M.point)-Q);k\u003ey\u0026\u0026(y=k,f=M)}}const w=[];if(n(f.point,S)-Q\u003c0)for(w.push(a.createTriangle(E,B,_),a.createTriangle(f,B,E),a.createTriangle(f,_,B),a.createTriangle(f,E,_)),I=0;I\u003c3;I+=1){const M=(I+1)%3;w[I+1].getEdge(2).setOpposite(w[0].getEdge(M)),w[I+1].getEdge(1).setOpposite(w[M+1].getEdge(0))}else for(w.push(a.createTriangle(E,_,B),a.createTriangle(f,E,B),a.createTriangle(f,B,_),a.createTriangle(f,_,E)),I=0;I\u003c3;I+=1){const M=(I+1)%3;w[I+1].getEdge(2).setOpposite(w[0].getEdge((3-I)%3)),w[I+1].getEdge(0).setOpposite(w[M+1].getEdge(1))}for(I=0;I\u003c4;I+=1)this.faces.push(w[I]);for(I=0;I\u003cd.length;I+=1){const M=d[I];if(M!==E\u0026\u0026M!==B\u0026\u0026M!==_\u0026\u0026M!==f){y=this.tolerance;let k;for(C=0;C\u003c4;C+=1){const R=w[C].distanceToPlane(M.point);R\u003ey\u0026\u0026(y=R,k=w[C])}k\u0026\u0026this.addVertexToFace(M,k)}}}reindexFaceAndVertices(){const d=[];for(let p=0;p\u003cthis.faces.length;p+=1){const m=this.faces[p];m.mark===A\u0026\u0026d.push(m)}this.faces=d}collectFaces(d){const p=[];for(let m=0;m\u003cthis.faces.length;m+=1){if(this.faces[m].mark!==A)throw Error(\"attempt to include a destroyed face in the hull\");const _=this.faces[m].collectIndices();if(d)p.push(_);else for(let f=0;f\u003c_.length-2;f+=1)p.push([_[0],_[f+1],_[f+2]])}return p}nextVertexToAdd(){if(!this.claimed.isEmpty()){let d,p,m=0;const _=this.claimed.first().face;for(p=_.outside;p\u0026\u0026p.face===_;p=p.next){const f=_.distanceToPlane(p.point);f\u003em\u0026\u0026(m=f,d=p)}return d}}computeHorizon(d,p,m,_){this.deleteFaceVertices(m),m.mark=l;let f;p?f=p.next:f=p=m.getEdge(0);do{const I=f.opposite,C=I.face;C.mark===A\u0026\u0026(C.distanceToPlane(d)\u003ethis.tolerance?this.computeHorizon(d,I,C,_):_.push(f)),f=f.next}while(f!==p)}addAdjoiningFace(d,p){const m=a.createTriangle(d,p.tail(),p.head());return this.faces.push(m),m.getEdge(-1).setOpposite(p.opposite),m.getEdge(0)}addNewFaces(d,p){this.newFaces=[];let m,_;for(let f=0;f\u003cp.length;f+=1){const I=p[f],C=this.addAdjoiningFace(d,I);m?C.next.setOpposite(_):m=C,this.newFaces.push(C.face),_=C}m.next.setOpposite(_)}oppositeFaceDistance(d){return d.face.distanceToPlane(d.opposite.face.centroid)}doAdjacentMerge(d,p){let m=d.edge,_=!0,f=0;do{if(f\u003e=d.nVertices)throw Error(\"merge recursion limit exceeded\");const I=m.opposite.face;let C=!1;if(p===g?(this.oppositeFaceDistance(m)\u003e-this.tolerance||this.oppositeFaceDistance(m.opposite)\u003e-this.tolerance)\u0026\u0026(C=!0):d.area\u003eI.area?this.oppositeFaceDistance(m)\u003e-this.tolerance?C=!0:this.oppositeFaceDistance(m.opposite)\u003e-this.tolerance\u0026\u0026(_=!1):this.oppositeFaceDistance(m.opposite)\u003e-this.tolerance?C=!0:this.oppositeFaceDistance(m)\u003e-this.tolerance\u0026\u0026(_=!1),C){const y=d.mergeAdjacentFaces(m,[]);for(let x=0;x\u003cy.length;x+=1)this.deleteFaceVertices(y[x],d);return!0}m=m.next,f+=1}while(m!==d.edge);return _||(d.mark=c),!1}addVertexToHull(d){const p=[];this.unclaimed.clear(),this.removeVertexFromFace(d,d.face),this.computeHorizon(d.point,null,d.face,p),this.addNewFaces(d,p);for(let m=0;m\u003cthis.newFaces.length;m+=1){const _=this.newFaces[m];if(_.mark===A)for(;this.doAdjacentMerge(_,u););}for(let m=0;m\u003cthis.newFaces.length;m+=1){const _=this.newFaces[m];if(_.mark===c)for(_.mark=A;this.doAdjacentMerge(_,g););}this.resolveUnclaimedPoints(this.newFaces)}build(){let d;for(this.createInitialSimplex();d=this.nextVertexToAdd();)this.addVertexToHull(d);this.reindexFaceAndVertices()}};e.exports=h}}),yin=yt({\"node_modules/@jscad/modeling/src/operations/hulls/quickhull/index.js\"(t,e){var n=ndi(),o=(i,r={})=\u003e{const s=new n(i);return s.build(),s.collectFaces(r.skipTriangulation)};e.exports=o}}),PY=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/create.js\"(t,e){var n=o=\u003e((o===void 0||o.length\u003c3)\u0026\u0026(o=[]),{vertices:o});e.exports=n}}),odi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/clone.js\"(t,e){var n=PY(),o=$r(),i=(...r)=\u003e{let s,a;return r.length===1?(s=n(),a=r[0]):(s=r[0],a=r[1]),s.vertices=a.vertices.map(A=\u003eo.clone(A)),s};e.exports=i}}),idi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/fromPoints.js\"(t,e){var n=$r(),o=PY(),i=r=\u003e{const s=r.map(a=\u003en.clone(a));return o(s)};e.exports=i}}),rdi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/fromPointsAndPlane.js\"(t,e){var n=PY(),o=(i,r)=\u003e{const s=n(i);return s.plane=r,s};e.exports=o}}),Xhe=yt({\"node_modules/@jscad/modeling/src/maths/vec4/create.js\"(t,e){var n=()=\u003e[0,0,0,0];e.exports=n}}),xin=yt({\"node_modules/@jscad/modeling/src/maths/vec4/clone.js\"(t,e){var n=Xhe(),o=i=\u003e{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],r};e.exports=o}}),Ein=yt({\"node_modules/@jscad/modeling/src/maths/vec4/copy.js\"(t,e){var n=(o,i)=\u003e(o[0]=i[0],o[1]=i[1],o[2]=i[2],o[3]=i[3],o);e.exports=n}}),Bin=yt({\"node_modules/@jscad/modeling/src/maths/vec4/equals.js\"(t,e){var n=(o,i)=\u003eo[0]===i[0]\u0026\u0026o[1]===i[1]\u0026\u0026o[2]===i[2]\u0026\u0026o[3]===i[3];e.exports=n}}),bin=yt({\"node_modules/@jscad/modeling/src/maths/plane/flip.js\"(t,e){var n=(o,i)=\u003e(o[0]=-i[0],o[1]=-i[1],o[2]=-i[2],o[3]=-i[3],o);e.exports=n}}),Sin=yt({\"node_modules/@jscad/modeling/src/maths/plane/fromNormalAndPoint.js\"(t,e){var n=$r(),o=(i,r,s)=\u003e{const a=n.normalize(n.create(),r),A=n.dot(s,a);return i[0]=a[0],i[1]=a[1],i[2]=a[2],i[3]=A,i};e.exports=o}}),Qin=yt({\"node_modules/@jscad/modeling/src/maths/vec4/fromValues.js\"(t,e){var n=Xhe(),o=(i,r,s,a)=\u003e{const A=n();return A[0]=i,A[1]=r,A[2]=s,A[3]=a,A};e.exports=o}}),sdi=yt({\"node_modules/@jscad/modeling/src/maths/plane/fromNoisyPoints.js\"(t,e){var n=$r(),o=Sin(),i=(r,...s)=\u003e{r[0]=0,r[1]=0,r[2]=0,r[3]=0;const a=s.length;s.forEach(f=\u003e{n.add(r,r,f)}),n.scale(r,r,1/a);let A=0,c=0,l=0,u=0,g=0,h=0;const d=n.create();s.forEach(f=\u003e{n.subtract(d,f,r),A+=d[0]*d[0],c+=d[0]*d[1],l+=d[0]*d[2],u+=d[1]*d[1],g+=d[1]*d[2],h+=d[2]*d[2]}),A/=a,c/=a,l/=a,u/=a,g/=a,h/=a,d[0]=0,d[1]=0,d[2]=0;const p=n.create();let m=u*h-g*g;p[0]=m,p[1]=l*g-c*h,p[2]=c*g-l*u;let _=m*m;return n.add(d,d,n.scale(p,p,_)),m=A*h-l*l,p[0]=l*g-c*h,p[1]=m,p[2]=c*l-g*A,_=m*m,n.dot(d,p)\u003c0\u0026\u0026(_=-_),n.add(d,d,n.scale(p,p,_)),m=A*u-c*c,p[0]=c*g-l*u,p[1]=c*l-g*A,p[2]=m,_=m*m,n.dot(d,p)\u003c0\u0026\u0026(_=-_),n.add(d,d,n.scale(p,p,_)),o(r,d,r)};e.exports=i}}),vin=yt({\"node_modules/@jscad/modeling/src/maths/plane/fromPoints.js\"(t,e){var n=$r(),o=(i,...r)=\u003e{const s=r.length,a=n.create(),A=n.create(),c=l=\u003e{const u=r[l],g=r[(l+1)%s],h=r[(l+2)%s];return n.subtract(a,g,u),n.subtract(A,h,u),n.cross(a,a,A),n.normalize(a,a),a};return i[0]=0,i[1]=0,i[2]=0,s===3?n.copy(i,c(0)):(r.forEach((l,u)=\u003e{n.add(i,i,c(u))}),n.normalize(i,i)),i[3]=n.dot(i,r[0]),i};e.exports=o}}),adi=yt({\"node_modules/@jscad/modeling/src/maths/plane/fromPointsRandom.js\"(t,e){var{EPS:n}=mc(),o=$r(),i=(r,s,a,A)=\u003e{let c=o.subtract(o.create(),a,s),l=o.subtract(o.create(),A,s);o.length(c)\u003cn\u0026\u0026(c=o.orthogonal(c,l)),o.length(l)\u003cn\u0026\u0026(l=o.orthogonal(l,c));let u=o.cross(o.create(),c,l);o.length(u)\u003cn\u0026\u0026(l=o.orthogonal(l,c),u=o.cross(u,c,l)),u=o.normalize(u,u);const g=o.dot(u,s);return r[0]=u[0],r[1]=u[1],r[2]=u[2],r[3]=g,r};e.exports=i}}),Adi=yt({\"node_modules/@jscad/modeling/src/maths/plane/projectionOfPoint.js\"(t,e){var n=$r(),o=(i,r)=\u003e{const s=r[0]*i[0]+r[1]*i[1]+r[2]*i[2]-i[3],a=r[0]-s*i[0],A=r[1]-s*i[1],c=r[2]-s*i[2];return n.fromValues(a,A,c)};e.exports=o}}),win=yt({\"node_modules/@jscad/modeling/src/maths/plane/signedDistanceToPoint.js\"(t,e){var n=$r(),o=(i,r)=\u003en.dot(i,r)-i[3];e.exports=o}}),Pin=yt({\"node_modules/@jscad/modeling/src/maths/vec4/toString.js\"(t,e){var n=o=\u003e`(${o[0].toFixed(9)}, ${o[1].toFixed(9)}, ${o[2].toFixed(9)}, ${o[3].toFixed(9)})`;e.exports=n}}),cdi=yt({\"node_modules/@jscad/modeling/src/maths/plane/transform.js\"(t,e){var n=Du(),o=$r(),i=vin(),r=bin(),s=(a,A,c)=\u003e{const l=n.isMirroring(c),u=o.orthogonal(o.create(),A),g=o.cross(u,A,u),h=o.cross(o.create(),A,g);let d=o.fromScalar(o.create(),A[3]);o.multiply(d,d,A);let p=o.add(o.create(),d,g),m=o.add(o.create(),d,h);return d=o.transform(d,d,c),p=o.transform(p,p,c),m=o.transform(m,m,c),i(a,d,p,m),l\u0026\u0026r(a,a),a};e.exports=s}}),S6=yt({\"node_modules/@jscad/modeling/src/maths/plane/index.js\"(t,e){e.exports={clone:xin(),copy:Ein(),create:Xhe(),equals:Bin(),flip:bin(),fromNormalAndPoint:Sin(),fromValues:Qin(),fromNoisyPoints:sdi(),fromPoints:vin(),fromPointsRandom:adi(),projectionOfPoint:Adi(),signedDistanceToPoint:win(),toString:Pin(),transform:cdi()}}}),ldi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/invert.js\"(t,e){var n=S6(),o=PY(),i=r=\u003e{const s=r.vertices.slice().reverse(),a=o(s);return r.plane\u0026\u0026(a.plane=n.flip(n.create(),r.plane)),a};e.exports=i}}),Min=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/isA.js\"(t,e){var n=o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"vertices\"in o\u0026\u0026Array.isArray(o.vertices));e.exports=n}}),Din=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/isConvex.js\"(t,e){var n=S6(),o=$r(),i=a=\u003er(a.vertices),r=a=\u003e{const A=a.length;if(A\u003e2){const c=n.fromPoints(n.create(),...a);let l=a[A-2],u=a[A-1];for(let g=0;g\u003cA;g++){const h=a[g];if(!s(l,u,h,c))return!1;l=u,u=h}}return!0},s=(a,A,c,l)=\u003e{const u=o.cross(o.create(),o.subtract(o.create(),A,a),o.subtract(o.create(),c,A));return o.dot(u,l)\u003e=0};e.exports=i}}),dVe=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/plane.js\"(t,e){var n=S6(),o=i=\u003e(i.plane||(i.plane=n.fromPoints(n.create(),...i.vertices)),i.plane);e.exports=o}}),Nin=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/measureArea.js\"(t,e){var n=dVe(),o=i=\u003e{const r=i.vertices.length;if(r\u003c3)return 0;const s=i.vertices,a=n(i),A=Math.abs(a[0]),c=Math.abs(a[1]),l=Math.abs(a[2]);if(A+c+l===0)return 0;let u=3;A\u003ec\u0026\u0026A\u003el?u=1:c\u003el\u0026\u0026(u=2);let g=0,h=0,d=1,p=2;switch(u){case 1:for(d=1;d\u003cr;d++)h=d-1,p=(d+1)%r,g+=s[d][1]*(s[p][2]-s[h][2]);g+=s[0][1]*(s[1][2]-s[r-1][2]),g/=2*a[0];break;case 2:for(d=1;d\u003cr;d++)h=d-1,p=(d+1)%r,g+=s[d][2]*(s[p][0]-s[h][0]);g+=s[0][2]*(s[1][0]-s[r-1][0]),g/=2*a[1];break;default:for(d=1;d\u003cr;d++)h=d-1,p=(d+1)%r,g+=s[d][0]*(s[p][1]-s[h][1]);g+=s[0][0]*(s[1][1]-s[r-1][1]),g/=2*a[2];break}return g};e.exports=o}}),udi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/measureBoundingBox.js\"(t,e){var n=$r(),o=i=\u003e{const r=i.vertices,s=r.length,a=s===0?n.create():n.clone(r[0]),A=n.clone(a);for(let c=1;c\u003cs;c++)n.min(a,a,r[c]),n.max(A,A,r[c]);return[a,A]};e.exports=o}}),gdi=yt({\"node_modules/@jscad/modeling/src/maths/vec4/dot.js\"(t,e){var n=(o,i)=\u003eo[0]*i[0]+o[1]*i[1]+o[2]*i[2]+o[3]*i[3];e.exports=n}}),ddi=yt({\"node_modules/@jscad/modeling/src/maths/vec4/fromScalar.js\"(t,e){var n=(o,i)=\u003e(o[0]=i,o[1]=i,o[2]=i,o[3]=i,o);e.exports=n}}),hdi=yt({\"node_modules/@jscad/modeling/src/maths/vec4/transform.js\"(t,e){var n=(o,i,r)=\u003e{const[s,a,A,c]=i;return o[0]=r[0]*s+r[4]*a+r[8]*A+r[12]*c,o[1]=r[1]*s+r[5]*a+r[9]*A+r[13]*c,o[2]=r[2]*s+r[6]*a+r[10]*A+r[14]*c,o[3]=r[3]*s+r[7]*a+r[11]*A+r[15]*c,o};e.exports=n}}),Rin=yt({\"node_modules/@jscad/modeling/src/maths/vec4/index.js\"(t,e){e.exports={clone:xin(),copy:Ein(),create:Xhe(),dot:gdi(),equals:Bin(),fromScalar:ddi(),fromValues:Qin(),toString:Pin(),transform:hdi()}}}),pdi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/measureBoundingSphere.js\"(t,e){var n=Rin(),o=new WeakMap,i=r=\u003e{const s=o.get(r);if(s)return s;const a=r.vertices,A=n.create();if(a.length===0)return A[0]=0,A[1]=0,A[2]=0,A[3]=0,A;let c=a[0],l=c,u=c,g=c,h=c,d=c;a.forEach(f=\u003e{c[0]\u003ef[0]\u0026\u0026(c=f),l[1]\u003ef[1]\u0026\u0026(l=f),u[2]\u003ef[2]\u0026\u0026(u=f),g[0]\u003cf[0]\u0026\u0026(g=f),h[1]\u003cf[1]\u0026\u0026(h=f),d[2]\u003cf[2]\u0026\u0026(d=f)}),A[0]=(c[0]+g[0])*.5,A[1]=(l[1]+h[1])*.5,A[2]=(u[2]+d[2])*.5;const p=A[0]-g[0],m=A[1]-h[1],_=A[2]-d[2];return A[3]=Math.sqrt(p*p+m*m+_*_),o.set(r,A),A};e.exports=i}}),mdi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/measureSignedVolume.js\"(t,e){var n=$r(),o=i=\u003e{let r=0;const s=i.vertices,a=n.create();for(let A=0;A\u003cs.length-2;A++)n.cross(a,s[A+1],s[A+2]),r+=n.dot(s[0],a);return r/=6,r};e.exports=o}}),_di=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/toPoints.js\"(t,e){var n=o=\u003eo.vertices;e.exports=n}}),fdi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/toString.js\"(t,e){var n=$r(),o=i=\u003e{let r=\"poly3: vertices: [\";return i.vertices.forEach(s=\u003e{r+=`${n.toString(s)}, `}),r+=\"]\",r};e.exports=o}}),Idi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/transform.js\"(t,e){var n=Du(),o=$r(),i=PY(),r=(s,a)=\u003e{const A=a.vertices.map(c=\u003eo.transform(o.create(),c,s));return n.isMirroring(s)\u0026\u0026A.reverse(),i(A)};e.exports=r}}),Cdi=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/validate.js\"(t,e){var n=win(),{NEPS:o}=mc(),i=$r(),r=Min(),s=Din(),a=Nin(),A=dVe(),c=l=\u003e{if(!r(l))throw new Error(\"invalid poly3 structure\");if(l.vertices.length\u003c3)throw new Error(`poly3 not enough vertices ${l.vertices.length}`);if(a(l)\u003c=0)throw new Error(\"poly3 area must be greater than zero\");for(let u=0;u\u003cl.vertices.length;u++)if(i.equals(l.vertices[u],l.vertices[(u+1)%l.vertices.length]))throw new Error(`poly3 duplicate vertex ${l.vertices[u]}`);if(!s(l))throw new Error(\"poly3 must be convex\");if(l.vertices.forEach(u=\u003e{if(!u.every(Number.isFinite))throw new Error(`poly3 invalid vertex ${u}`)}),l.vertices.length\u003e3){const u=A(l);l.vertices.forEach(g=\u003e{const h=Math.abs(n(u,g));if(h\u003eo)throw new Error(`poly3 must be coplanar: vertex ${g} distance ${h}`)})}};e.exports=c}}),XA=yt({\"node_modules/@jscad/modeling/src/geometries/poly3/index.js\"(t,e){e.exports={clone:odi(),create:PY(),fromPoints:idi(),fromPointsAndPlane:rdi(),invert:ldi(),isA:Min(),isConvex:Din(),measureArea:Nin(),measureBoundingBox:udi(),measureBoundingSphere:pdi(),measureSignedVolume:mdi(),plane:dVe(),toPoints:_di(),toString:fdi(),transform:Idi(),validate:Cdi()}}}),ydi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/fromPointsConvex.js\"(t,e){var n=yin(),o=bX(),i=XA(),r=s=\u003e{if(!Array.isArray(s))throw new Error(\"the given points must be an array\");const A=n(s,{skipTriangulation:!0}).map(c=\u003e{const l=c.map(u=\u003es[u]);return i.create(l)});return o(A)};e.exports=r}}),xdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/fromPoints.js\"(t,e){var n=XA(),o=bX(),i=r=\u003e{if(!Array.isArray(r))throw new Error(\"the given points must be an array\");const s=r.map((A,c)=\u003en.create(A));return o(s)};e.exports=i}}),Edi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/fromCompactBinary.js\"(t,e){var n=$r(),o=Du(),i=XA(),r=bX(),s=a=\u003e{if(a[0]!==1)throw new Error(\"invalid compact binary data\");const A=r();A.transforms=o.clone(a.slice(1,17));const c=a[21];let l=22,u=a.length-c*3;for(;u\u003ca.length;){const g=a[l];l++;const h=[];for(let d=0;d\u003cg;d++)h.push(n.fromValues(a[u],a[u+1],a[u+2])),u+=3;A.polygons.push(i.create(h))}return a[17]\u003e=0\u0026\u0026(A.color=[a[17],a[18],a[19],a[20]]),A};e.exports=s}}),Bdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/applyTransforms.js\"(t,e){var n=Du(),o=XA(),i=r=\u003e(n.isIdentity(r.transforms)||(r.polygons=r.polygons.map(s=\u003eo.transform(r.transforms,s)),r.transforms=n.create()),r);e.exports=i}}),SX=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/toPolygons.js\"(t,e){var n=Bdi(),o=i=\u003en(i).polygons;e.exports=o}}),bdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/invert.js\"(t,e){var n=XA(),o=bX(),i=SX(),r=s=\u003e{const A=i(s).map(c=\u003en.invert(c));return o(A)};e.exports=r}}),hVe=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/isA.js\"(t,e){var n=o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"polygons\"in o\u0026\u0026\"transforms\"in o\u0026\u0026Array.isArray(o.polygons)\u0026\u0026\"length\"in o.transforms);e.exports=n}}),Sdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/isConvex.js\"(t,e){var{EPS:n}=mc(),o=$r(),i=hVe(),r=SX(),s=XA(),a=A=\u003e{if(!i(A))throw new Error(\"isConvex requires a geom3 geometry\");const c=r(A);if(c.length===0)return!0;const l=[],u=new Set;for(let g=0;g\u003cc.length;g++){const h=c[g].vertices;for(let d=0;d\u003ch.length;d++){const p=h[d],m=`${p[0]},${p[1]},${p[2]}`;u.has(m)||(u.add(m),l.push(p))}}for(let g=0;g\u003cc.length;g++){const h=s.plane(c[g]);for(let d=0;d\u003cl.length;d++){const p=l[d];if(o.dot(h,p)-h[3]\u003en)return!1}}return!0};e.exports=a}}),Qdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/toPoints.js\"(t,e){var n=XA(),o=SX(),i=r=\u003eo(r).map(A=\u003en.toPoints(A));e.exports=i}}),vdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/toString.js\"(t,e){var n=XA(),o=SX(),i=r=\u003e{const s=o(r);let a=\"geom3 (\"+s.length+` polygons):\n`;return s.forEach(A=\u003e{a+=\" \"+n.toString(A)+`\n`}),a};e.exports=i}}),wdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/toCompactBinary.js\"(t,e){var n=XA(),o=i=\u003e{const r=i.polygons,s=i.transforms,a=r.length,A=r.reduce((h,d)=\u003eh+d.vertices.length,0);let c=[-1,-1,-1,-1];i.color\u0026\u0026(c=i.color);const l=new Float32Array(22+a+A*3);l[0]=1,l[1]=s[0],l[2]=s[1],l[3]=s[2],l[4]=s[3],l[5]=s[4],l[6]=s[5],l[7]=s[6],l[8]=s[7],l[9]=s[8],l[10]=s[9],l[11]=s[10],l[12]=s[11],l[13]=s[12],l[14]=s[13],l[15]=s[14],l[16]=s[15],l[17]=c[0],l[18]=c[1],l[19]=c[2],l[20]=c[3],l[21]=A;let u=22,g=u+a;return r.forEach(h=\u003e{const d=n.toPoints(h);l[u]=d.length,u++;for(let p=0;p\u003cd.length;p++){const m=d[p];l[g+0]=m[0],l[g+1]=m[1],l[g+2]=m[2],g+=3}}),l};e.exports=o}}),Pdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/transform.js\"(t,e){var n=Du(),o=(i,r)=\u003e{const s=n.multiply(n.create(),i,r.transforms);return Object.assign({},r,{transforms:s})};e.exports=o}}),Mdi=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/validate.js\"(t,e){var n=XA(),o=hVe(),i=s=\u003e{if(!o(s))throw new Error(\"invalid geom3 structure\");if(s.polygons.forEach(n.validate),r(s),!s.transforms.every(Number.isFinite))throw new Error(`geom3 invalid transforms ${s.transforms}`)},r=s=\u003e{const a=new Map;s.polygons.forEach(({vertices:c})=\u003e{c.forEach((l,u)=\u003e{const g=`${l}`,h=`${c[(u+1)%c.length]}`,d=`${g}/${h}`,p=a.has(d)?a.get(d):0;a.set(d,p+1)})});const A=[];if(a.forEach((c,l)=\u003e{const u=l.split(\"/\").reverse().join(\"/\"),g=a.get(u);c!==g\u0026\u0026A.push(l.replace(\"/\",\" -\u003e \"))}),A.length\u003e0)throw new Error(`non-manifold edges ${A.length}\n${A.join(`\n`)}`)};e.exports=i}}),Ta=yt({\"node_modules/@jscad/modeling/src/geometries/geom3/index.js\"(t,e){e.exports={clone:jgi(),create:bX(),fromPointsConvex:ydi(),fromPoints:xdi(),fromCompactBinary:Edi(),invert:bdi(),isA:hVe(),isConvex:Sdi(),toPoints:Qdi(),toPolygons:SX(),toString:vdi(),toCompactBinary:wdi(),transform:Pdi(),validate:Mdi()}}}),pVe=yt({\"node_modules/@jscad/modeling/src/geometries/path2/clone.js\"(t,e){var n=o=\u003eObject.assign({},o);e.exports=n}}),Tin=yt({\"node_modules/@jscad/modeling/src/geometries/path2/close.js\"(t,e){var{EPS:n}=mc(),o=_A(),i=pVe(),r=s=\u003e{if(s.isClosed)return s;const a=i(s);if(a.isClosed=!0,a.points.length\u003e1){const A=a.points,c=A[0];let l=A[A.length-1];for(;o.distance(c,l)\u003cn*n\u0026\u0026(A.pop(),A.length!==1);)l=A[A.length-1]}return a};e.exports=r}}),Zhe=yt({\"node_modules/@jscad/modeling/src/geometries/path2/create.js\"(t,e){var n=Du(),o=i=\u003e(i===void 0\u0026\u0026(i=[]),{points:i,isClosed:!1,transforms:n.create()});e.exports=o}}),mVe=yt({\"node_modules/@jscad/modeling/src/geometries/path2/fromPoints.js\"(t,e){var{EPS:n}=mc(),o=_A(),i=Tin(),r=Zhe(),s=(a,A)=\u003e{const c={closed:!1};let{closed:l}=Object.assign({},c,a),u=r();if(u.points=A.map(g=\u003eo.clone(g)),u.points.length\u003e1){const g=u.points[0],h=u.points[u.points.length-1];o.distance(g,h)\u003cn*n\u0026\u0026(l=!0)}return l===!0\u0026\u0026(u=i(u)),u};e.exports=s}}),Ddi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/applyTransforms.js\"(t,e){var n=Du(),o=_A(),i=r=\u003e(n.isIdentity(r.transforms)||(r.points=r.points.map(s=\u003eo.transform(o.create(),s,r.transforms)),r.transforms=n.create()),r);e.exports=i}}),MY=yt({\"node_modules/@jscad/modeling/src/geometries/path2/toPoints.js\"(t,e){var n=Ddi(),o=i=\u003en(i).points;e.exports=o}}),Ndi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/appendArc.js\"(t,e){var{TAU:n}=mc(),o=_A(),i=mVe(),r=MY(),s=(a,A)=\u003e{const c={radius:[0,0],xaxisrotation:0,clockwise:!1,large:!1,segments:16};let{endpoint:l,radius:u,xaxisrotation:g,clockwise:h,large:d,segments:p}=Object.assign({},c,a);if(!Array.isArray(l))throw new Error(\"endpoint must be an array of X and Y values\");if(l.length\u003c2)throw new Error(\"endpoint must contain X and Y values\");if(l=o.clone(l),!Array.isArray(u))throw new Error(\"radius must be an array of X and Y values\");if(u.length\u003c2)throw new Error(\"radius must contain X and Y values\");if(p\u003c4)throw new Error(\"segments must be four or more\");const m=1e5;if(A.isClosed)throw new Error(\"the given path cannot be closed\");const _=r(A);if(_.length\u003c1)throw new Error(\"the given path must contain one or more points (as the starting point for the arc)\");let f=u[0],I=u[1];const C=_[_.length-1];f=Math.round(f*m)/m,I=Math.round(I*m)/m,l=o.fromValues(Math.round(l[0]*m)/m,Math.round(l[1]*m)/m);const y=!h;let x=[];if(f===0||I===0)x.push(l);else{f=Math.abs(f),I=Math.abs(I);const B=g,S=Math.cos(B),Q=Math.sin(B),w=o.subtract(o.create(),C,l);o.scale(w,w,.5);const M=Math.round((S*w[0]+Q*w[1])*m)/m,k=Math.round((-Q*w[0]+S*w[1])*m)/m,R=o.fromValues(M,k),F=R[0]*R[0]/(f*f)+R[1]*R[1]/(I*I);if(F\u003e1){const ne=Math.sqrt(F);f*=ne,I*=ne,f=Math.round(f*m)/m,I=Math.round(I*m)/m}let O=Math.sqrt((f*f*I*I-f*f*R[1]*R[1]-I*I*R[0]*R[0])/(f*f*R[1]*R[1]+I*I*R[0]*R[0]));y===d\u0026\u0026(O=-O);const U=o.fromValues(f*R[1]/I,-I*R[0]/f);o.scale(U,U,O);let Y=o.fromValues(S*U[0]-Q*U[1],Q*U[0]+S*U[1]);Y=o.add(Y,Y,o.scale(o.create(),o.add(o.create(),C,l),.5));const W=o.fromValues((R[0]-U[0])/f,(R[1]-U[1])/I),te=o.fromValues((-R[0]-U[0])/f,(-R[1]-U[1])/I),j=o.angleRadians(W);let oe=o.angleRadians(te)-j;oe=oe%n,!y\u0026\u0026oe\u003e0?oe-=n:y\u0026\u0026oe\u003c0\u0026\u0026(oe+=n);let ie=Math.floor(p*(Math.abs(oe)/n));ie\u003c1\u0026\u0026(ie=1);for(let ne=1;ne\u003cie;ne++){const le=j+ne/ie*oe,ge=Math.cos(le),_e=Math.sin(le),ue=o.fromValues(S*f*ge-Q*I*_e,Q*f*ge+S*I*_e);o.add(ue,ue,Y),x.push(ue)}ie\u0026\u0026x.push(a.endpoint)}return x=_.concat(x),i({},x)};e.exports=s}}),kin=yt({\"node_modules/@jscad/modeling/src/geometries/path2/concat.js\"(t,e){var n=mVe(),o=MY(),{equals:i}=_A(),r=(...s)=\u003e{let a=!1,A=[];return s.forEach((c,l)=\u003e{const u=o(c).slice();if(A.length\u003e0\u0026\u0026u.length\u003e0\u0026\u0026i(u[0],A[A.length-1])\u0026\u0026u.shift(),u.length\u003e0\u0026\u0026a)throw new Error(`Cannot concatenate to a closed path; check the ${l}th path`);a=c.isClosed,A=A.concat(u)}),n({closed:a},A)};e.exports=r}}),Fin=yt({\"node_modules/@jscad/modeling/src/geometries/path2/appendPoints.js\"(t,e){var n=kin(),o=Zhe(),i=(r,s)=\u003en(s,o(r));e.exports=i}}),Rdi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/appendBezier.js\"(t,e){var{TAU:n}=mc(),o=_A(),i=_A(),r=Fin(),s=MY(),a=(A,c)=\u003e{const l={segments:16};let{controlPoints:u,segments:g}=Object.assign({},l,A);if(!Array.isArray(u))throw new Error(\"controlPoints must be an array of one or more points\");if(u.length\u003c1)throw new Error(\"controlPoints must be an array of one or more points\");if(g\u003c4)throw new Error(\"segments must be four or more\");if(c.isClosed)throw new Error(\"the given geometry cannot be closed\");const h=s(c);if(h.length\u003c1)throw new Error(\"the given path must contain one or more points (as the starting point for the bezier curve)\");if(u=u.slice(),u[0]===null){if(u.length\u003c2)throw new Error(\"a null control point must be passed with one more control points\");let R=h[h.length-2];if(\"lastBezierControlPoint\"in c\u0026\u0026(R=c.lastBezierControlPoint),!Array.isArray(R))throw new Error(\"the given path must contain TWO or more points if given a null control point\");const F=o.scale(o.create(),h[h.length-1],2);o.subtract(F,F,R),u[0]=F}u.unshift(h[h.length-1]);const p=u.length-1,m=[];let _=1;for(let R=0;R\u003c=p;++R)R\u003e0\u0026\u0026(_*=R),m.push(_);const f=[];for(let R=0;R\u003c=p;++R){const F=m[p]/(m[R]*m[p-R]);f.push(F)}const I=o.create(),C=o.create(),y=i.create(),x=R=\u003e{let F=1,O=Math.pow(1-R,p);const U=R!==1?1/(1-R):1,Y=o.create();for(let W=0;W\u003c=p;++W){W===p\u0026\u0026(O=1);const te=f[W]*F*O,j=o.scale(I,u[W],te);o.add(Y,Y,j),F*=R,O*=U}return Y},E=[],B=[],S=p+1;for(let R=0;R\u003cS;++R){const F=R/(S-1),O=x(F);E.push(O),B.push(F)}let Q=1;const w=n/g,M=Math.sin(w);for(;Q\u003cE.length-1;){const R=o.subtract(I,E[Q],E[Q-1]);o.normalize(R,R);const F=o.subtract(C,E[Q+1],E[Q]);o.normalize(F,F);const O=o.cross(y,R,F);if(Math.abs(O[2])\u003eM){const U=B[Q-1],Y=B[Q+1],W=U+(Y-U)*1/3,te=U+(Y-U)*2/3,j=x(W),J=x(te);E.splice(Q,1,j,J),B.splice(Q,1,W,te),Q--,Q\u003c1\u0026\u0026(Q=1)}else++Q}E.shift();const k=r(E,c);return k.lastBezierControlPoint=u[u.length-2],k};e.exports=a}}),Tdi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/equals.js\"(t,e){var n=_A(),o=MY(),i=(r,s)=\u003e{if(r.isClosed!==s.isClosed||r.points.length!==s.points.length)return!1;const a=o(r),A=o(s),c=a.length;let l=0;do{let u=!1;for(let g=0;g\u003cc;g++)if(!n.equals(a[g],A[(g+l)%c])){u=!0;break}if(u===!1)return!0;if(!r.isClosed)return!1}while(++l\u003cc);return!1};e.exports=i}}),kdi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/fromCompactBinary.js\"(t,e){var n=Du(),o=_A(),i=Zhe(),r=s=\u003e{if(s[0]!==2)throw new Error(\"invalid compact binary data\");const a=i();a.transforms=n.clone(s.slice(1,17)),a.isClosed=!!s[17];for(let A=22;A\u003cs.length;A+=2){const c=o.fromValues(s[A],s[A+1]);a.points.push(c)}return s[18]\u003e=0\u0026\u0026(a.color=[s[18],s[19],s[20],s[21]]),a};e.exports=r}}),Lin=yt({\"node_modules/@jscad/modeling/src/geometries/path2/isA.js\"(t,e){var n=o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"points\"in o\u0026\u0026\"transforms\"in o\u0026\u0026\"isClosed\"in o\u0026\u0026Array.isArray(o.points)\u0026\u0026\"length\"in o.transforms);e.exports=n}}),Fdi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/reverse.js\"(t,e){var n=pVe(),o=i=\u003e{const r=n(i);return r.points=i.points.slice().reverse(),r};e.exports=o}}),Ldi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/toString.js\"(t,e){var n=_A(),o=MY(),i=r=\u003e{const s=o(r);let a=\"path (\"+s.length+\" points, \"+r.isClosed+`):\n[\n`;return s.forEach(A=\u003e{a+=\" \"+n.toString(A)+`,\n`}),a+=`]\n`,a};e.exports=i}}),Hdi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/toCompactBinary.js\"(t,e){var n=o=\u003e{const i=o.points,r=o.transforms;let s=[-1,-1,-1,-1];o.color\u0026\u0026(s=o.color);const a=new Float32Array(22+i.length*2);a[0]=2,a[1]=r[0],a[2]=r[1],a[3]=r[2],a[4]=r[3],a[5]=r[4],a[6]=r[5],a[7]=r[6],a[8]=r[7],a[9]=r[8],a[10]=r[9],a[11]=r[10],a[12]=r[11],a[13]=r[12],a[14]=r[13],a[15]=r[14],a[16]=r[15],a[17]=o.isClosed?1:0,a[18]=s[0],a[19]=s[1],a[20]=s[2],a[21]=s[3];for(let A=0;A\u003ci.length;A++){const c=A*2+22,l=i[A];a[c]=l[0],a[c+1]=l[1]}return a};e.exports=n}}),Odi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/transform.js\"(t,e){var n=Du(),o=(i,r)=\u003e{const s=n.multiply(n.create(),i,r.transforms);return Object.assign({},r,{transforms:s})};e.exports=o}}),Gdi=yt({\"node_modules/@jscad/modeling/src/geometries/path2/validate.js\"(t,e){var n=_A(),o=Lin(),i=r=\u003e{if(!o(r))throw new Error(\"invalid path2 structure\");if(r.points.length\u003e1){for(let s=0;s\u003cr.points.length;s++)if(n.equals(r.points[s],r.points[(s+1)%r.points.length]))throw new Error(`path2 duplicate points ${r.points[s]}`)}if(r.points.forEach(s=\u003e{if(!s.every(Number.isFinite))throw new Error(`path2 invalid point ${s}`)}),!r.transforms.every(Number.isFinite))throw new Error(`path2 invalid transforms ${r.transforms}`)};e.exports=i}}),Au=yt({\"node_modules/@jscad/modeling/src/geometries/path2/index.js\"(t,e){e.exports={appendArc:Ndi(),appendBezier:Rdi(),appendPoints:Fin(),clone:pVe(),close:Tin(),concat:kin(),create:Zhe(),equals:Tdi(),fromPoints:mVe(),fromCompactBinary:kdi(),isA:Lin(),reverse:Fdi(),toPoints:MY(),toString:Ldi(),toCompactBinary:Hdi(),transform:Odi(),validate:Gdi()}}}),Ydi=yt({\"node_modules/@jscad/modeling/src/colors/colorize.js\"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=XA(),a=(g,h)=\u003e{const d=o.clone(h);return d.color=g,d},A=(g,h)=\u003e{const d=i.clone(h);return d.color=g,d},c=(g,h)=\u003e{const d=r.clone(h);return d.color=g,d},l=(g,h)=\u003e{const d=s.clone(h);return d.color=g,d},u=(g,...h)=\u003e{if(!Array.isArray(g))throw new Error(\"color must be an array\");if(g.length\u003c3)throw new Error(\"color must contain R, G and B values\");if(g.length===3\u0026\u0026(g=[g[0],g[1],g[2],1]),h=n(h),h.length===0)throw new Error(\"wrong number of arguments\");const d=h.map(p=\u003eo.isA(p)?a(g,p):i.isA(p)?A(g,p):r.isA(p)?c(g,p):s.isA(p)?l(g,p):(p.color=g,p));return d.length===1?d[0]:d};e.exports=u}}),Hin=yt({\"node_modules/@jscad/modeling/src/colors/cssColors.js\"(t,e){var n={black:[0,0,0],silver:[.7529411764705882,.7529411764705882,.7529411764705882],gray:[.5019607843137255,.5019607843137255,.5019607843137255],white:[1,1,1],maroon:[.5019607843137255,0,0],red:[1,0,0],purple:[.5019607843137255,0,.5019607843137255],fuchsia:[1,0,1],green:[0,.5019607843137255,0],lime:[0,1,0],olive:[.5019607843137255,.5019607843137255,0],yellow:[1,1,0],navy:[0,0,.5019607843137255],blue:[0,0,1],teal:[0,.5019607843137255,.5019607843137255],aqua:[0,1,1],aliceblue:[.9411764705882353,.9725490196078431,1],antiquewhite:[.9803921568627451,.9215686274509803,.8431372549019608],aquamarine:[.4980392156862745,1,.8313725490196079],azure:[.9411764705882353,1,1],beige:[.9607843137254902,.9607843137254902,.8627450980392157],bisque:[1,.8941176470588236,.7686274509803922],blanchedalmond:[1,.9215686274509803,.803921568627451],blueviolet:[.5411764705882353,.16862745098039217,.8862745098039215],brown:[.6470588235294118,.16470588235294117,.16470588235294117],burlywood:[.8705882352941177,.7215686274509804,.5294117647058824],cadetblue:[.37254901960784315,.6196078431372549,.6274509803921569],chartreuse:[.4980392156862745,1,0],chocolate:[.8235294117647058,.4117647058823529,.11764705882352941],coral:[1,.4980392156862745,.3137254901960784],cornflowerblue:[.39215686274509803,.5843137254901961,.9294117647058824],cornsilk:[1,.9725490196078431,.8627450980392157],crimson:[.8627450980392157,.0784313725490196,.23529411764705882],cyan:[0,1,1],darkblue:[0,0,.5450980392156862],darkcyan:[0,.5450980392156862,.5450980392156862],darkgoldenrod:[.7215686274509804,.5254901960784314,.043137254901960784],darkgray:[.6627450980392157,.6627450980392157,.6627450980392157],darkgreen:[0,.39215686274509803,0],darkgrey:[.6627450980392157,.6627450980392157,.6627450980392157],darkkhaki:[.7411764705882353,.7176470588235294,.4196078431372549],darkmagenta:[.5450980392156862,0,.5450980392156862],darkolivegreen:[.3333333333333333,.4196078431372549,.1843137254901961],darkorange:[1,.5490196078431373,0],darkorchid:[.6,.19607843137254902,.8],darkred:[.5450980392156862,0,0],darksalmon:[.9137254901960784,.5882352941176471,.47843137254901963],darkseagreen:[.5607843137254902,.7372549019607844,.5607843137254902],darkslateblue:[.2823529411764706,.23921568627450981,.5450980392156862],darkslategray:[.1843137254901961,.30980392156862746,.30980392156862746],darkslategrey:[.1843137254901961,.30980392156862746,.30980392156862746],darkturquoise:[0,.807843137254902,.8196078431372549],darkviolet:[.5803921568627451,0,.8274509803921568],deeppink:[1,.0784313725490196,.5764705882352941],deepskyblue:[0,.7490196078431373,1],dimgray:[.4117647058823529,.4117647058823529,.4117647058823529],dimgrey:[.4117647058823529,.4117647058823529,.4117647058823529],dodgerblue:[.11764705882352941,.5647058823529412,1],firebrick:[.6980392156862745,.13333333333333333,.13333333333333333],floralwhite:[1,.9803921568627451,.9411764705882353],forestgreen:[.13333333333333333,.5450980392156862,.13333333333333333],gainsboro:[.8627450980392157,.8627450980392157,.8627450980392157],ghostwhite:[.9725490196078431,.9725490196078431,1],gold:[1,.8431372549019608,0],goldenrod:[.8549019607843137,.6470588235294118,.12549019607843137],greenyellow:[.6784313725490196,1,.1843137254901961],grey:[.5019607843137255,.5019607843137255,.5019607843137255],honeydew:[.9411764705882353,1,.9411764705882353],hotpink:[1,.4117647058823529,.7058823529411765],indianred:[.803921568627451,.3607843137254902,.3607843137254902],indigo:[.29411764705882354,0,.5098039215686274],ivory:[1,1,.9411764705882353],khaki:[.9411764705882353,.9019607843137255,.5490196078431373],lavender:[.9019607843137255,.9019607843137255,.9803921568627451],lavenderblush:[1,.9411764705882353,.9607843137254902],lawngreen:[.48627450980392156,.9882352941176471,0],lemonchiffon:[1,.9803921568627451,.803921568627451],lightblue:[.6784313725490196,.8470588235294118,.9019607843137255],lightcoral:[.9411764705882353,.5019607843137255,.5019607843137255],lightcyan:[.8784313725490196,1,1],lightgoldenrodyellow:[.9803921568627451,.9803921568627451,.8235294117647058],lightgray:[.8274509803921568,.8274509803921568,.8274509803921568],lightgreen:[.5647058823529412,.9333333333333333,.5647058823529412],lightgrey:[.8274509803921568,.8274509803921568,.8274509803921568],lightpink:[1,.7137254901960784,.7568627450980392],lightsalmon:[1,.6274509803921569,.47843137254901963],lightseagreen:[.12549019607843137,.6980392156862745,.6666666666666666],lightskyblue:[.5294117647058824,.807843137254902,.9803921568627451],lightslategray:[.4666666666666667,.5333333333333333,.6],lightslategrey:[.4666666666666667,.5333333333333333,.6],lightsteelblue:[.6901960784313725,.7686274509803922,.8705882352941177],lightyellow:[1,1,.8784313725490196],limegreen:[.19607843137254902,.803921568627451,.19607843137254902],linen:[.9803921568627451,.9411764705882353,.9019607843137255],magenta:[1,0,1],mediumaquamarine:[.4,.803921568627451,.6666666666666666],mediumblue:[0,0,.803921568627451],mediumorchid:[.7294117647058823,.3333333333333333,.8274509803921568],mediumpurple:[.5764705882352941,.4392156862745098,.8588235294117647],mediumseagreen:[.23529411764705882,.7019607843137254,.44313725490196076],mediumslateblue:[.4823529411764706,.40784313725490196,.9333333333333333],mediumspringgreen:[0,.9803921568627451,.6039215686274509],mediumturquoise:[.2823529411764706,.8196078431372549,.8],mediumvioletred:[.7803921568627451,.08235294117647059,.5215686274509804],midnightblue:[.09803921568627451,.09803921568627451,.4392156862745098],mintcream:[.9607843137254902,1,.9803921568627451],mistyrose:[1,.8941176470588236,.8823529411764706],moccasin:[1,.8941176470588236,.7098039215686275],navajowhite:[1,.8705882352941177,.6784313725490196],oldlace:[.9921568627450981,.9607843137254902,.9019607843137255],olivedrab:[.4196078431372549,.5568627450980392,.13725490196078433],orange:[1,.6470588235294118,0],orangered:[1,.27058823529411763,0],orchid:[.8549019607843137,.4392156862745098,.8392156862745098],palegoldenrod:[.9333333333333333,.9098039215686274,.6666666666666666],palegreen:[.596078431372549,.984313725490196,.596078431372549],paleturquoise:[.6862745098039216,.9333333333333333,.9333333333333333],palevioletred:[.8588235294117647,.4392156862745098,.5764705882352941],papayawhip:[1,.9372549019607843,.8352941176470589],peachpuff:[1,.8549019607843137,.7254901960784313],peru:[.803921568627451,.5215686274509804,.24705882352941178],pink:[1,.7529411764705882,.796078431372549],plum:[.8666666666666667,.6274509803921569,.8666666666666667],powderblue:[.6901960784313725,.8784313725490196,.9019607843137255],rosybrown:[.7372549019607844,.5607843137254902,.5607843137254902],royalblue:[.2549019607843137,.4117647058823529,.8823529411764706],saddlebrown:[.5450980392156862,.27058823529411763,.07450980392156863],salmon:[.9803921568627451,.5019607843137255,.4470588235294118],sandybrown:[.9568627450980393,.6431372549019608,.3764705882352941],seagreen:[.1803921568627451,.5450980392156862,.3411764705882353],seashell:[1,.9607843137254902,.9333333333333333],sienna:[.6274509803921569,.3215686274509804,.17647058823529413],skyblue:[.5294117647058824,.807843137254902,.9215686274509803],slateblue:[.41568627450980394,.35294117647058826,.803921568627451],slategray:[.4392156862745098,.5019607843137255,.5647058823529412],slategrey:[.4392156862745098,.5019607843137255,.5647058823529412],snow:[1,.9803921568627451,.9803921568627451],springgreen:[0,1,.4980392156862745],steelblue:[.27450980392156865,.5098039215686274,.7058823529411765],tan:[.8235294117647058,.7058823529411765,.5490196078431373],thistle:[.8470588235294118,.7490196078431373,.8470588235294118],tomato:[1,.38823529411764707,.2784313725490196],turquoise:[.25098039215686274,.8784313725490196,.8156862745098039],violet:[.9333333333333333,.5098039215686274,.9333333333333333],wheat:[.9607843137254902,.8705882352941177,.7019607843137254],whitesmoke:[.9607843137254902,.9607843137254902,.9607843137254902],yellowgreen:[.6039215686274509,.803921568627451,.19607843137254902]};e.exports=n}}),Udi=yt({\"node_modules/@jscad/modeling/src/colors/colorNameToRgb.js\"(t,e){var n=Hin(),o=i=\u003en[i.toLowerCase()];e.exports=o}}),Kdi=yt({\"node_modules/@jscad/modeling/src/colors/hexToRgb.js\"(t,e){var n=o=\u003e{if(o=o.replace(\"#\",\"\"),o.length\u003c6)throw new Error(\"the given notation must contain 3 or more hex values\");const i=parseInt(o.substring(0,2),16)/255,r=parseInt(o.substring(2,4),16)/255,s=parseInt(o.substring(4,6),16)/255;if(o.length\u003e=8){const a=parseInt(o.substring(6,8),16)/255;return[i,r,s,a]}return[i,r,s]};e.exports=n}}),Oin=yt({\"node_modules/@jscad/modeling/src/colors/hueToColorComponent.js\"(t,e){var n=(o,i,r)=\u003e(r\u003c0\u0026\u0026(r+=1),r\u003e1\u0026\u0026(r-=1),r\u003c.16666666666666666?o+(i-o)*6*r:r\u003c.5?i:r\u003c.6666666666666666?o+(i-o)*(.6666666666666666-r)*6:o);e.exports=n}}),Vdi=yt({\"node_modules/@jscad/modeling/src/colors/hslToRgb.js\"(t,e){var n=ga(),o=Oin(),i=(...r)=\u003e{if(r=n(r),r.length\u003c3)throw new Error(\"values must contain H, S and L values\");const s=r[0],a=r[1],A=r[2];let c=A,l=A,u=A;if(a!==0){const g=A\u003c.5?A*(1+a):A+a-A*a,h=2*A-g;c=o(h,g,s+1/3),l=o(h,g,s),u=o(h,g,s-1/3)}if(r.length\u003e3){const g=r[3];return[c,l,u,g]}return[c,l,u]};e.exports=i}}),zdi=yt({\"node_modules/@jscad/modeling/src/colors/hsvToRgb.js\"(t,e){var n=ga(),o=(...i)=\u003e{if(i=n(i),i.length\u003c3)throw new Error(\"values must contain H, S and V values\");const r=i[0],s=i[1],a=i[2];let A=0,c=0,l=0;const u=Math.floor(r*6),g=r*6-u,h=a*(1-s),d=a*(1-g*s),p=a*(1-(1-g)*s);switch(u%6){case 0:A=a,c=p,l=h;break;case 1:A=d,c=a,l=h;break;case 2:A=h,c=a,l=p;break;case 3:A=h,c=d,l=a;break;case 4:A=p,c=h,l=a;break;case 5:A=a,c=h,l=d;break}if(i.length\u003e3){const m=i[3];return[A,c,l,m]}return[A,c,l]};e.exports=o}}),Jdi=yt({\"node_modules/@jscad/modeling/src/colors/rgbToHex.js\"(t,e){var n=ga(),o=(...i)=\u003e{if(i=n(i),i.length\u003c3)throw new Error(\"values must contain R, G and B values\");const r=i[0]*255,s=i[1]*255,a=i[2]*255;let A=`#${Number(16777216+r*65536+s*256+a).toString(16).substring(1,7)}`;return i.length\u003e3\u0026\u0026(A=A+Number(i[3]*255).toString(16)),A};e.exports=o}}),Wdi=yt({\"node_modules/@jscad/modeling/src/colors/rgbToHsl.js\"(t,e){var n=ga(),o=(...i)=\u003e{if(i=n(i),i.length\u003c3)throw new Error(\"values must contain R, G and B values\");const r=i[0],s=i[1],a=i[2],A=Math.max(r,s,a),c=Math.min(r,s,a);let l,u;const g=(A+c)/2;if(A===c)l=u=0;else{const h=A-c;switch(u=g\u003e.5?h/(2-A-c):h/(A+c),A){case r:l=(s-a)/h+(s\u003ca?6:0);break;case s:l=(a-r)/h+2;break;case a:l=(r-s)/h+4;break}l/=6}if(i.length\u003e3){const h=i[3];return[l,u,g,h]}return[l,u,g]};e.exports=o}}),jdi=yt({\"node_modules/@jscad/modeling/src/colors/rgbToHsv.js\"(t,e){var n=ga(),o=(...i)=\u003e{if(i=n(i),i.length\u003c3)throw new Error(\"values must contain R, G and B values\");const r=i[0],s=i[1],a=i[2],A=Math.max(r,s,a),c=Math.min(r,s,a);let l;const u=A,g=A-c,h=A===0?0:g/A;if(A===c)l=0;else{switch(A){case r:l=(s-a)/g+(s\u003ca?6:0);break;case s:l=(a-r)/g+2;break;case a:l=(r-s)/g+4;break}l/=6}if(i.length\u003e3){const d=i[3];return[l,h,u,d]}return[l,h,u]};e.exports=o}}),epe=yt({\"node_modules/@jscad/modeling/src/colors/index.js\"(t,e){e.exports={colorize:Ydi(),colorNameToRgb:Udi(),cssColors:Hin(),hexToRgb:Kdi(),hslToRgb:Vdi(),hsvToRgb:zdi(),hueToColorComponent:Oin(),rgbToHex:Jdi(),rgbToHsl:Wdi(),rgbToHsv:jdi()}}}),$di=yt({\"node_modules/@jscad/modeling/src/curves/bezier/create.js\"(t,e){var n=s=\u003e{if(!Array.isArray(s))throw new Error(\"Bezier points must be a valid array/\");if(s.length\u003c2)throw new Error(\"Bezier points must contain at least 2 values.\");const a=o(s);return{points:s,pointType:a,dimensions:a===\"float_single\"?0:s[0].length,permutations:i(s.length-1),tangentPermutations:i(s.length-2)}},o=function(s){let a=null;return s.forEach(A=\u003e{let c=\"\";if(Number.isFinite(A))c=\"float_single\";else if(Array.isArray(A))A.forEach(l=\u003e{if(!Number.isFinite(l))throw new Error(\"Bezier point values must all be numbers.\")}),c=\"float_\"+A.length;else throw new Error(\"Bezier points must all be numbers or arrays of number.\");if(a==null)a=c;else if(a!==c)throw new Error(\"Bezier points must be either all numbers or all arrays of numbers of the same size.\")}),a},i=function(s){const a=[];for(let A=0;A\u003c=s;A++)a.push(r(s)/(r(A)*r(s-A)));return a},r=function(s){let a=1;for(let A=2;A\u003c=s;A++)a*=A;return a};e.exports=n}}),Gin=yt({\"node_modules/@jscad/modeling/src/curves/bezier/valueAt.js\"(t,e){var n=(i,r)=\u003e{if(i\u003c0||i\u003e1)throw new Error(\"Bezier valueAt() input must be between 0 and 1\");if(r.pointType===\"float_single\")return o(r,r.points,i);{const s=[];for(let a=0;a\u003cr.dimensions;a++){const A=[];for(let c=0;c\u003cr.points.length;c++)A.push(r.points[c][a]);s.push(o(r,A,i))}return s}},o=function(i,r,s){const a=r.length-1;let A=0;for(let c=0;c\u003c=a;c++)A+=i.permutations[c]*Math.pow(1-s,a-c)*Math.pow(s,c)*r[c];return A};e.exports=n}}),qdi=yt({\"node_modules/@jscad/modeling/src/curves/bezier/tangentAt.js\"(t,e){var n=(i,r)=\u003e{if(i\u003c0||i\u003e1)throw new Error(\"Bezier tangentAt() input must be between 0 and 1\");if(r.pointType===\"float_single\")return o(r,r.points,i);{const s=[];for(let a=0;a\u003cr.dimensions;a++){const A=[];for(let c=0;c\u003cr.points.length;c++)A.push(r.points[c][a]);s.push(o(r,A,i))}return s}},o=function(i,r,s){const a=r.length-1;let A=0;for(let c=0;c\u003ca;c++){const l=a*(r[c+1]-r[c]);A+=i.tangentPermutations[c]*Math.pow(1-s,a-1-c)*Math.pow(s,c)*l}return A};e.exports=n}}),_Ve=yt({\"node_modules/@jscad/modeling/src/curves/bezier/lengths.js\"(t,e){var n=Gin(),o=(r,s)=\u003e{let a=0;const A=[0];let c=n(0,s);for(let l=1;l\u003c=r;l++){const u=n(l/r,s);a+=i(u,c),A.push(a),c=u}return A},i=(r,s)=\u003e{if(Number.isFinite(r)\u0026\u0026Number.isFinite(s))return Math.abs(r-s);if(Array.isArray(r)\u0026\u0026Array.isArray(s)){if(r.length!==s.length)throw new Error(\"The operands must have the same number of dimensions.\");let a=0;for(let A=0;A\u003cr.length;A++)a+=(s[A]-r[A])*(s[A]-r[A]);return Math.sqrt(a)}else throw new Error(\"The operands must be of the same type, either number or array.\")};e.exports=o}}),Xdi=yt({\"node_modules/@jscad/modeling/src/curves/bezier/length.js\"(t,e){var n=_Ve(),o=(i,r)=\u003en(i,r)[i];e.exports=o}}),Zdi=yt({\"node_modules/@jscad/modeling/src/curves/bezier/arcLengthToT.js\"(t,e){var n=_Ve(),o=(i,r)=\u003e{const s={distance:0,segments:100},{distance:a,segments:A}=Object.assign({},s,i),c=n(A,r);let l=0,u=A;for(;l\u003c=u;){const _=Math.floor(l+(u-l)/2),f=c[_]-a;if(f\u003c0)l=_+1;else if(f\u003e0)u=_-1;else{u=_;break}}const g=u;if(c[g]===a)return g/A;const h=c[g],p=c[g+1]-h,m=(a-h)/p;return(g+m)/A};e.exports=o}}),ehi=yt({\"node_modules/@jscad/modeling/src/curves/bezier/index.js\"(t,e){e.exports={create:$di(),valueAt:Gin(),tangentAt:qdi(),lengths:_Ve(),length:Xdi(),arcLengthToT:Zdi()}}}),thi=yt({\"node_modules/@jscad/modeling/src/curves/index.js\"(t,e){e.exports={bezier:ehi()}}}),tpe=yt({\"node_modules/@jscad/modeling/src/maths/utils/area.js\"(t,e){var n=o=\u003e{let i=0;for(let r=0;r\u003co.length;r++){const s=(r+1)%o.length;i+=o[r][0]*o[s][1],i-=o[s][0]*o[r][1]}return i/2};e.exports=n}}),Yin=yt({\"node_modules/@jscad/modeling/src/geometries/poly2/measureArea.js\"(t,e){var n=tpe(),o=i=\u003en(i.vertices);e.exports=o}}),Uin=yt({\"node_modules/@jscad/modeling/src/geometries/poly2/create.js\"(t,e){var n=o=\u003e((o===void 0||o.length\u003c3)\u0026\u0026(o=[]),{vertices:o});e.exports=n}}),Kin=yt({\"node_modules/@jscad/modeling/src/geometries/poly2/flip.js\"(t,e){var n=Uin(),o=i=\u003e{const r=i.vertices.slice().reverse();return n(r)};e.exports=o}}),nhi=yt({\"node_modules/@jscad/modeling/src/geometries/poly2/arePointsInside.js\"(t,e){var n=Yin(),o=Kin(),i=(s,a)=\u003e{if(s.length===0)return 0;const A=a.vertices;return A.length\u003c3?0:(n(a)\u003c0\u0026\u0026(a=o(a)),s.reduce((l,u)=\u003el+r(u,A),0)===s.length?1:0)},r=(s,a)=\u003e{const A=a.length,c=s[0],l=s[1];let u=a[A-1],g=a[0],h=u[1]\u003el,d=0,p=0;for(let m=A+1;--m;){const _=g[1]\u003el;if(h!==_){const f=u[0]\u003ec,I=g[0]\u003ec;(f\u0026\u0026I||g[0]-(g[1]-l)*(u[0]-g[0])/(u[1]-g[1])\u003e=c)\u0026\u0026(d=!d)}h=_,u=g,g=a[++p]}return d};e.exports=i}}),fVe=yt({\"node_modules/@jscad/modeling/src/geometries/poly2/index.js\"(t,e){e.exports={arePointsInside:nhi(),create:Uin(),flip:Kin(),measureArea:Yin()}}}),IVe=yt({\"node_modules/@jscad/modeling/src/geometries/index.js\"(t,e){e.exports={geom2:Ya(),geom3:Ta(),path2:Au(),poly2:fVe(),poly3:XA()}}}),CVe=yt({\"node_modules/@jscad/modeling/src/maths/line2/create.js\"(t,e){var n=()=\u003e[0,1,0];e.exports=n}}),ohi=yt({\"node_modules/@jscad/modeling/src/maths/line2/clone.js\"(t,e){var n=CVe(),o=i=\u003e{const r=n();return r[0]=i[0],r[1]=i[1],r[2]=i[2],r};e.exports=o}}),yVe=yt({\"node_modules/@jscad/modeling/src/maths/line2/direction.js\"(t,e){var n=_A(),o=i=\u003e{const r=n.normal(n.create(),i);return n.negate(r,r),r};e.exports=o}}),npe=yt({\"node_modules/@jscad/modeling/src/maths/line2/origin.js\"(t,e){var n=_A(),o=i=\u003en.scale(n.create(),i,i[2]);e.exports=o}}),ihi=yt({\"node_modules/@jscad/modeling/src/maths/line2/closestPoint.js\"(t,e){var n=_A(),o=yVe(),i=npe(),r=(s,a)=\u003e{const A=i(s),c=o(s),l=n.subtract(n.create(),a,A),u=n.dot(l,c);return n.scale(l,c,u),n.add(l,l,A),l};e.exports=r}}),Vin=yt({\"node_modules/@jscad/modeling/src/maths/line2/copy.js\"(t,e){var n=(o,i)=\u003e(o[0]=i[0],o[1]=i[1],o[2]=i[2],o);e.exports=n}}),rhi=yt({\"node_modules/@jscad/modeling/src/maths/line2/distanceToPoint.js\"(t,e){var n=_A(),o=(i,r)=\u003e{let s=n.dot(r,i);return s=Math.abs(s-i[2]),s};e.exports=o}}),shi=yt({\"node_modules/@jscad/modeling/src/maths/line2/equals.js\"(t,e){var n=(o,i)=\u003eo[0]===i[0]\u0026\u0026o[1]===i[1]\u0026\u0026o[2]===i[2];e.exports=n}}),zin=yt({\"node_modules/@jscad/modeling/src/maths/line2/fromPoints.js\"(t,e){var n=_A(),o=(i,r,s)=\u003e{const a=n.subtract(n.create(),s,r);n.normal(a,a),n.normalize(a,a);const A=n.dot(r,a);return i[0]=a[0],i[1]=a[1],i[2]=A,i};e.exports=o}}),Jin=yt({\"node_modules/@jscad/modeling/src/maths/line2/fromValues.js\"(t,e){var n=CVe(),o=(i,r,s)=\u003e{const a=n();return a[0]=i,a[1]=r,a[2]=s,a};e.exports=o}}),xVe=yt({\"node_modules/@jscad/modeling/src/maths/utils/aboutEqualNormals.js\"(t,e){var{NEPS:n}=mc(),o=(i,r)=\u003eMath.abs(i[0]-r[0])\u003c=n\u0026\u0026Math.abs(i[1]-r[1])\u003c=n\u0026\u0026Math.abs(i[2]-r[2])\u003c=n;e.exports=o}}),Win=yt({\"node_modules/@jscad/modeling/src/maths/utils/interpolateBetween2DPointsForY.js\"(t,e){var n=(o,i,r)=\u003e{let s=r-o[1],a=i[1]-o[1];a\u003c0\u0026\u0026(s=-s,a=-a);let A;return s\u003c=0?A=0:s\u003e=a?A=1:a\u003c1e-10?A=.5:A=s/a,o[0]+A*(i[0]-o[0])};e.exports=n}}),jin=yt({\"node_modules/@jscad/modeling/src/maths/utils/intersect.js\"(t,e){var n=(o,i,r,s)=\u003e{if(o[0]===i[0]\u0026\u0026o[1]===i[1]||r[0]===s[0]\u0026\u0026r[1]===s[1])return;const a=(s[1]-r[1])*(i[0]-o[0])-(s[0]-r[0])*(i[1]-o[1]);if(Math.abs(a)\u003cNumber.MIN_VALUE)return;const A=((s[0]-r[0])*(o[1]-r[1])-(s[1]-r[1])*(o[0]-r[0]))/a,c=((i[0]-o[0])*(o[1]-r[1])-(i[1]-o[1])*(o[0]-r[0]))/a;if(A\u003c0||A\u003e1||c\u003c0||c\u003e1)return;const l=o[0]+A*(i[0]-o[0]),u=o[1]+A*(i[1]-o[1]);return[l,u]};e.exports=n}}),ahi=yt({\"node_modules/@jscad/modeling/src/maths/utils/solve2Linear.js\"(t,e){var n=(o,i,r,s,a,A)=\u003e{const l=1/(o*s-i*r);let u=a*s-i*A,g=-a*r+o*A;return u*=l,g*=l,[u,g]};e.exports=n}}),QX=yt({\"node_modules/@jscad/modeling/src/maths/utils/index.js\"(t,e){e.exports={aboutEqualNormals:xVe(),area:tpe(),cos:hI().cos,interpolateBetween2DPointsForY:Win(),intersect:jin(),sin:hI().sin,solve2Linear:ahi()}}}),Ahi=yt({\"node_modules/@jscad/modeling/src/maths/line2/intersectPointOfLines.js\"(t,e){var n=_A(),{solve2Linear:o}=QX(),i=(r,s)=\u003e{const a=o(r[0],r[1],s[0],s[1],r[2],s[2]);return n.clone(a)};e.exports=i}}),chi=yt({\"node_modules/@jscad/modeling/src/maths/line2/reverse.js\"(t,e){var n=_A(),o=Vin(),i=Jin(),r=(s,a)=\u003e{const A=n.negate(n.create(),a),c=-a[2];return o(s,i(A[0],A[1],c))};e.exports=r}}),lhi=yt({\"node_modules/@jscad/modeling/src/maths/line2/toString.js\"(t,e){var n=o=\u003e`line2: (${o[0].toFixed(7)}, ${o[1].toFixed(7)}, ${o[2].toFixed(7)})`;e.exports=n}}),uhi=yt({\"node_modules/@jscad/modeling/src/maths/line2/transform.js\"(t,e){var n=_A(),o=zin(),i=npe(),r=yVe(),s=(a,A,c)=\u003e{const l=i(A),u=r(A);return n.transform(l,l,c),n.transform(u,u,c),o(a,l,u)};e.exports=s}}),ghi=yt({\"node_modules/@jscad/modeling/src/maths/line2/xAtY.js\"(t,e){var n=npe(),o=(i,r)=\u003e{let s=(i[2]-i[1]*r)/i[0];return Number.isNaN(s)\u0026\u0026(s=n(i)[0]),s};e.exports=o}}),EVe=yt({\"node_modules/@jscad/modeling/src/maths/line2/index.js\"(t,e){e.exports={clone:ohi(),closestPoint:ihi(),copy:Vin(),create:CVe(),direction:yVe(),distanceToPoint:rhi(),equals:shi(),fromPoints:zin(),fromValues:Jin(),intersectPointOfLines:Ahi(),origin:npe(),reverse:chi(),toString:lhi(),transform:uhi(),xAtY:ghi()}}}),$in=yt({\"node_modules/@jscad/modeling/src/maths/line3/create.js\"(t,e){var n=$r(),o=()=\u003e[n.fromValues(0,0,0),n.fromValues(0,0,1)];e.exports=o}}),dhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/clone.js\"(t,e){var n=$r(),o=$in(),i=r=\u003e{const s=o();return n.copy(s[0],r[0]),n.copy(s[1],r[1]),s};e.exports=i}}),qin=yt({\"node_modules/@jscad/modeling/src/maths/line3/closestPoint.js\"(t,e){var n=$r(),o=(i,r)=\u003e{const s=i[0],a=i[1],A=n.dot(n.subtract(n.create(),r,s),a),c=n.dot(a,a),l=A/c,u=n.scale(n.create(),a,l);return n.add(u,u,s),u};e.exports=o}}),hhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/copy.js\"(t,e){var n=$r(),o=(i,r)=\u003e(n.copy(i[0],r[0]),n.copy(i[1],r[1]),i);e.exports=o}}),phi=yt({\"node_modules/@jscad/modeling/src/maths/line3/direction.js\"(t,e){var n=o=\u003eo[1];e.exports=n}}),mhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/distanceToPoint.js\"(t,e){var n=$r(),o=qin(),i=(r,s)=\u003e{const a=o(r,s),A=n.subtract(n.create(),s,a);return n.length(A)};e.exports=i}}),_hi=yt({\"node_modules/@jscad/modeling/src/maths/line3/equals.js\"(t,e){var n=$r(),o=(i,r)=\u003e!(!n.equals(i[1],r[1])||!n.equals(i[0],r[0]));e.exports=o}}),vX=yt({\"node_modules/@jscad/modeling/src/maths/line3/fromPointAndDirection.js\"(t,e){var n=$r(),o=(i,r,s)=\u003e{const a=n.normalize(n.create(),s);return n.copy(i[0],r),n.copy(i[1],a),i};e.exports=o}}),fhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/fromPlanes.js\"(t,e){var n=$r(),{solve2Linear:o}=QX(),{EPS:i}=mc(),r=vX(),s=(a,A,c)=\u003e{let l=n.cross(n.create(),A,c),u=n.length(l);if(u\u003ci)throw new Error(\"parallel planes do not intersect\");u=1/u,l=n.scale(l,l,u);const g=Math.abs(l[0]),h=Math.abs(l[1]),d=Math.abs(l[2]);let p,m;return g\u003e=h\u0026\u0026g\u003e=d?(m=o(A[1],A[2],c[1],c[2],A[3],c[3]),p=n.fromValues(0,m[0],m[1])):h\u003e=g\u0026\u0026h\u003e=d?(m=o(A[0],A[2],c[0],c[2],A[3],c[3]),p=n.fromValues(m[0],0,m[1])):(m=o(A[0],A[1],c[0],c[1],A[3],c[3]),p=n.fromValues(m[0],m[1],0)),r(a,p,l)};e.exports=s}}),Ihi=yt({\"node_modules/@jscad/modeling/src/maths/line3/fromPoints.js\"(t,e){var n=$r(),o=vX(),i=(r,s,a)=\u003e{const A=n.subtract(n.create(),a,s);return o(r,s,A)};e.exports=i}}),Chi=yt({\"node_modules/@jscad/modeling/src/maths/line3/intersectPointOfLineAndPlane.js\"(t,e){var n=$r(),o=(i,r)=\u003e{const s=r,a=r[3],A=i[0],c=i[1],l=(a-n.dot(s,A))/n.dot(s,c);return n.add(n.create(),A,n.scale(n.create(),c,l))};e.exports=o}}),yhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/origin.js\"(t,e){var n=o=\u003eo[0];e.exports=n}}),xhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/reverse.js\"(t,e){var n=$r(),o=vX(),i=(r,s)=\u003e{const a=n.clone(s[0]),A=n.negate(n.create(),s[1]);return o(r,a,A)};e.exports=i}}),Ehi=yt({\"node_modules/@jscad/modeling/src/maths/line3/toString.js\"(t,e){var n=o=\u003e{const i=o[0],r=o[1];return`line3: point: (${i[0].toFixed(7)}, ${i[1].toFixed(7)}, ${i[2].toFixed(7)}) direction: (${r[0].toFixed(7)}, ${r[1].toFixed(7)}, ${r[2].toFixed(7)})`};e.exports=n}}),Bhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/transform.js\"(t,e){var n=$r(),o=vX(),i=(r,s,a)=\u003e{const A=s[0],c=s[1],l=n.add(n.create(),A,c),u=n.transform(n.create(),A,a),g=n.transform(l,l,a),h=n.subtract(g,g,u);return o(r,u,h)};e.exports=i}}),bhi=yt({\"node_modules/@jscad/modeling/src/maths/line3/index.js\"(t,e){e.exports={clone:dhi(),closestPoint:qin(),copy:hhi(),create:$in(),direction:phi(),distanceToPoint:mhi(),equals:_hi(),fromPlanes:fhi(),fromPointAndDirection:vX(),fromPoints:Ihi(),intersectPointOfLineAndPlane:Chi(),origin:yhi(),reverse:xhi(),toString:Ehi(),transform:Bhi()}}}),Shi=yt({\"node_modules/@jscad/modeling/src/maths/index.js\"(t,e){e.exports={constants:mc(),line2:EVe(),line3:bhi(),mat4:Du(),plane:S6(),utils:QX(),vec2:_A(),vec3:$r(),vec4:Rin()}}}),Xin=yt({\"node_modules/@jscad/modeling/src/measurements/measureArea.js\"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=XA(),a=new WeakMap,A=()=\u003e0,c=g=\u003e{let h=a.get(g);return h||(h=o.toSides(g).reduce((p,m)=\u003ep+(m[0][0]*m[1][1]-m[0][1]*m[1][0]),0),h*=.5,a.set(g,h),h)},l=g=\u003e{let h=a.get(g);return h||(h=i.toPolygons(g).reduce((p,m)=\u003ep+s.measureArea(m),0),a.set(g,h),h)},u=(...g)=\u003e{if(g=n(g),g.length===0)throw new Error(\"wrong number of arguments\");const h=g.map(d=\u003er.isA(d)?A():o.isA(d)?c(d):i.isA(d)?l(d):0);return h.length===1?h[0]:h};e.exports=u}}),Qhi=yt({\"node_modules/@jscad/modeling/src/measurements/measureAggregateArea.js\"(t,e){var n=ga(),o=Xin(),i=(...r)=\u003e{if(r=n(r),r.length===0)throw new Error(\"measureAggregateArea: no geometries supplied\");const s=o(r);return r.length===1?s:s.reduce((A,c)=\u003eA+c,0)};e.exports=i}}),oT=yt({\"node_modules/@jscad/modeling/src/measurements/measureBoundingBox.js\"(t,e){var n=ga(),o=_A(),i=$r(),r=Ya(),s=Ta(),a=Au(),A=XA(),c=new WeakMap,l=d=\u003e{let p=c.get(d);if(p)return p;const m=a.toPoints(d);let _;m.length===0?_=o.create():_=o.clone(m[0]);let f=o.clone(_);return m.forEach(I=\u003e{o.min(_,_,I),o.max(f,f,I)}),_=[_[0],_[1],0],f=[f[0],f[1],0],p=[_,f],c.set(d,p),p},u=d=\u003e{let p=c.get(d);if(p)return p;const m=r.toPoints(d);let _;m.length===0?_=o.create():_=o.clone(m[0]);let f=o.clone(_);return m.forEach(I=\u003e{o.min(_,_,I),o.max(f,f,I)}),_=[_[0],_[1],0],f=[f[0],f[1],0],p=[_,f],c.set(d,p),p},g=d=\u003e{let p=c.get(d);if(p)return p;const m=s.toPolygons(d);let _=i.create();if(m.length\u003e0){const I=A.toPoints(m[0]);i.copy(_,I[0])}let f=i.clone(_);return m.forEach(I=\u003e{A.toPoints(I).forEach(C=\u003e{i.min(_,_,C),i.max(f,f,C)})}),_=[_[0],_[1],_[2]],f=[f[0],f[1],f[2]],p=[_,f],c.set(d,p),p},h=(...d)=\u003e{if(d=n(d),d.length===0)throw new Error(\"wrong number of arguments\");const p=d.map(m=\u003ea.isA(m)?l(m):r.isA(m)?u(m):s.isA(m)?g(m):[[0,0,0],[0,0,0]]);return p.length===1?p[0]:p};e.exports=h}}),BVe=yt({\"node_modules/@jscad/modeling/src/measurements/measureAggregateBoundingBox.js\"(t,e){var n=ga(),o=gin(),i=uin(),r=oT(),s=(...a)=\u003e{if(a=n(a),a.length===0)throw new Error(\"measureAggregateBoundingBox: no geometries supplied\");const A=r(a);if(a.length===1)return A;const c=[[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE],[-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE]];return A.reduce((l,u)=\u003e(l=[o(l[0],l[0],u[0]),i(l[1],l[1],u[1])],l),c)};e.exports=s}}),Zin=yt({\"node_modules/@jscad/modeling/src/measurements/calculateEpsilonFromBounds.js\"(t,e){var{EPS:n}=mc(),o=(i,r)=\u003e{let s=0;for(let a=0;a\u003cr;a++)s+=i[1][a]-i[0][a];return n*s/r};e.exports=o}}),vhi=yt({\"node_modules/@jscad/modeling/src/measurements/measureAggregateEpsilon.js\"(t,e){var n=ga(),o=BVe(),i=Zin(),{geom2:r,geom3:s,path2:a}=IVe(),A=(...c)=\u003e{if(c=n(c),c.length===0)throw new Error(\"measureAggregateEpsilon: no geometries supplied\");const l=o(c);let u=0;return u=c.reduce((g,h)=\u003ea.isA(h)||r.isA(h)?Math.max(g,2):s.isA(h)?Math.max(g,3):0,u),i(l,u)};e.exports=A}}),ern=yt({\"node_modules/@jscad/modeling/src/measurements/measureVolume.js\"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=XA(),a=new WeakMap,A=()=\u003e0,c=()=\u003e0,l=g=\u003e{let h=a.get(g);return h||(h=i.toPolygons(g).reduce((p,m)=\u003ep+s.measureSignedVolume(m),0),a.set(g,h),h)},u=(...g)=\u003e{if(g=n(g),g.length===0)throw new Error(\"wrong number of arguments\");const h=g.map(d=\u003er.isA(d)?A():o.isA(d)?c():i.isA(d)?l(d):0);return h.length===1?h[0]:h};e.exports=u}}),whi=yt({\"node_modules/@jscad/modeling/src/measurements/measureAggregateVolume.js\"(t,e){var n=ga(),o=ern(),i=(...r)=\u003e{if(r=n(r),r.length===0)throw new Error(\"measureAggregateVolume: no geometries supplied\");const s=o(r);return r.length===1?s:s.reduce((A,c)=\u003eA+c,0)};e.exports=i}}),Phi=yt({\"node_modules/@jscad/modeling/src/measurements/measureBoundingSphere.js\"(t,e){var n=ga(),o=_A(),i=$r(),r=Ya(),s=Ta(),a=Au(),A=XA(),c=new WeakMap,l=d=\u003e{let p=c.get(d);if(p!==void 0)return p;const m=i.create();let _=0;const f=a.toPoints(d);if(f.length\u003e0){let I=0;const C=i.create();f.forEach(y=\u003e{i.add(m,m,i.fromVec2(C,y,0)),I++}),i.scale(m,m,1/I),f.forEach(y=\u003e{_=Math.max(_,o.squaredDistance(m,y))}),_=Math.sqrt(_)}return p=[m,_],c.set(d,p),p},u=d=\u003e{let p=c.get(d);if(p!==void 0)return p;const m=i.create();let _=0;const f=r.toSides(d);if(f.length\u003e0){let I=0;const C=i.create();f.forEach(y=\u003e{i.add(m,m,i.fromVec2(C,y[0],0)),I++}),i.scale(m,m,1/I),f.forEach(y=\u003e{_=Math.max(_,o.squaredDistance(m,y[0]))}),_=Math.sqrt(_)}return p=[m,_],c.set(d,p),p},g=d=\u003e{let p=c.get(d);if(p!==void 0)return p;const m=i.create();let _=0;const f=s.toPolygons(d);if(f.length\u003e0){let I=0;f.forEach(C=\u003e{A.toPoints(C).forEach(y=\u003e{i.add(m,m,y),I++})}),i.scale(m,m,1/I),f.forEach(C=\u003e{A.toPoints(C).forEach(y=\u003e{_=Math.max(_,i.squaredDistance(m,y))})}),_=Math.sqrt(_)}return p=[m,_],c.set(d,p),p},h=(...d)=\u003e{d=n(d);const p=d.map(m=\u003ea.isA(m)?l(m):r.isA(m)?u(m):s.isA(m)?g(m):[[0,0,0],0]);return p.length===1?p[0]:p};e.exports=h}}),Mhi=yt({\"node_modules/@jscad/modeling/src/measurements/measureCenter.js\"(t,e){var n=ga(),o=oT(),i=(...r)=\u003e{r=n(r);const s=r.map(a=\u003e{const A=o(a);return[A[0][0]+(A[1][0]-A[0][0])/2,A[0][1]+(A[1][1]-A[0][1])/2,A[0][2]+(A[1][2]-A[0][2])/2]});return s.length===1?s[0]:s};e.exports=i}}),Dhi=yt({\"node_modules/@jscad/modeling/src/measurements/measureCenterOfMass.js\"(t,e){var n=ga(),o=$r(),i=Ya(),r=Ta(),s=new WeakMap,a=l=\u003e{let u=s.get(l);if(u!==void 0)return u;const g=i.toSides(l);let h=0,d=0,p=0;if(g.length\u003e0){for(let _=0;_\u003cg.length;_++){const f=g[_][0],I=g[_][1],C=f[0]*I[1]-f[1]*I[0];h+=C,d+=(f[0]+I[0])*C,p+=(f[1]+I[1])*C}h/=2;const m=1/(h*6);d*=m,p*=m}return u=o.fromValues(d,p,0),s.set(l,u),u},A=l=\u003e{let u=s.get(l);if(u!==void 0)return u;u=o.create();const g=r.toPolygons(l);if(g.length===0)return u;let h=0;const d=o.create();return g.forEach(p=\u003e{const m=p.vertices;for(let _=0;_\u003cm.length-2;_++){o.cross(d,m[_+1],m[_+2]);const f=o.dot(m[0],d)/6;h+=f,o.add(d,m[0],m[_+1]),o.add(d,d,m[_+2]);const I=o.scale(d,d,1/4*f);o.add(u,u,I)}}),o.scale(u,u,1/h),s.set(l,u),u},c=(...l)=\u003e{l=n(l);const u=l.map(g=\u003ei.isA(g)?a(g):r.isA(g)?A(g):[0,0,0]);return u.length===1?u[0]:u};e.exports=c}}),Nhi=yt({\"node_modules/@jscad/modeling/src/measurements/measureDimensions.js\"(t,e){var n=ga(),o=oT(),i=(...r)=\u003e{r=n(r);const s=r.map(a=\u003e{const A=o(a);return[A[1][0]-A[0][0],A[1][1]-A[0][1],A[1][2]-A[0][2]]});return s.length===1?s[0]:s};e.exports=i}}),gP=yt({\"node_modules/@jscad/modeling/src/measurements/measureEpsilon.js\"(t,e){var n=ga(),{geom2:o,geom3:i,path2:r}=IVe(),s=Zin(),a=oT(),A=g=\u003es(a(g),2),c=g=\u003es(a(g),2),l=g=\u003es(a(g),3),u=(...g)=\u003e{if(g=n(g),g.length===0)throw new Error(\"wrong number of arguments\");const h=g.map(d=\u003er.isA(d)?A(d):o.isA(d)?c(d):i.isA(d)?l(d):0);return h.length===1?h[0]:h};e.exports=u}}),Rhi=yt({\"node_modules/@jscad/modeling/src/measurements/index.js\"(t,e){e.exports={measureAggregateArea:Qhi(),measureAggregateBoundingBox:BVe(),measureAggregateEpsilon:vhi(),measureAggregateVolume:whi(),measureArea:Xin(),measureBoundingBox:oT(),measureBoundingSphere:Phi(),measureCenter:Mhi(),measureCenterOfMass:Dhi(),measureDimensions:Nhi(),measureEpsilon:gP(),measureVolume:ern()}}}),lf=yt({\"node_modules/@jscad/modeling/src/primitives/commonChecks.js\"(t,e){var n=(r,s)=\u003eArray.isArray(r)\u0026\u0026r.length\u003e=s?r.every(a=\u003eNumber.isFinite(a)):!1,o=(r,s)=\u003eNumber.isFinite(r)\u0026\u0026r\u003es,i=(r,s)=\u003eNumber.isFinite(r)\u0026\u0026r\u003e=s;e.exports={isNumberArray:n,isGT:o,isGTE:i}}}),Thi=yt({\"node_modules/@jscad/modeling/src/primitives/arc.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=Au(),{isGT:s,isGTE:a,isNumberArray:A}=lf(),c=l=\u003e{const u={center:[0,0],radius:1,startAngle:0,endAngle:o,makeTangent:!1,segments:32};let{center:g,radius:h,startAngle:d,endAngle:p,makeTangent:m,segments:_}=Object.assign({},u,l);if(!A(g,2))throw new Error(\"center must be an array of X and Y values\");if(!s(h,0))throw new Error(\"radius must be greater than zero\");if(!a(d,0))throw new Error(\"startAngle must be positive\");if(!a(p,0))throw new Error(\"endAngle must be positive\");if(!a(_,4))throw new Error(\"segments must be four or more\");d=d%o,p=p%o;let f=o;d\u003cp\u0026\u0026(f=p-d),d\u003ep\u0026\u0026(f=p+(o-d));const I=Math.acos((h*h+h*h-n*n)/(2*h*h)),C=i.clone(g);let y;const x=[];if(f\u003cI)y=i.fromAngleRadians(i.create(),d),i.scale(y,y,h),i.add(y,y,C),x.push(y);else{const E=Math.floor(_*(Math.abs(f)/o));let B=E*.5/f;B\u003e.25\u0026\u0026(B=.25);const S=m?E+2:E;for(let Q=0;Q\u003c=S;Q++){let w=Q;m\u0026\u0026(w=(Q-1)*(E-2*B)/E+B,w\u003c0\u0026\u0026(w=0),w\u003eE\u0026\u0026(w=E));const M=d+w*(f/E);y=i.fromAngleRadians(i.create(),M),i.scale(y,y,h),i.add(y,y,C),x.push(y)}}return r.fromPoints({closed:!1},x)};e.exports=c}}),trn=yt({\"node_modules/@jscad/modeling/src/primitives/ellipse.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=Ya(),{sin:s,cos:a}=hI(),{isGTE:A,isNumberArray:c}=lf(),l=u=\u003e{const g={center:[0,0],radius:[1,1],startAngle:0,endAngle:o,segments:32};let{center:h,radius:d,startAngle:p,endAngle:m,segments:_}=Object.assign({},g,u);if(!c(h,2))throw new Error(\"center must be an array of X and Y values\");if(!c(d,2))throw new Error(\"radius must be an array of X and Y values\");if(!d.every(B=\u003eB\u003e=0))throw new Error(\"radius values must be positive\");if(!A(p,0))throw new Error(\"startAngle must be positive\");if(!A(m,0))throw new Error(\"endAngle must be positive\");if(!A(_,3))throw new Error(\"segments must be three or more\");if(d[0]===0||d[1]===0)return r.create();p=p%o,m=m%o;let f=o;p\u003cm\u0026\u0026(f=m-p),p\u003em\u0026\u0026(f=m+(o-p));const I=Math.min(d[0],d[1]),C=Math.acos((I*I+I*I-n*n)/(2*I*I));if(f\u003cC)throw new Error(\"startAngle and endAngle do not define a significant rotation\");_=Math.floor(_*(f/o));const y=i.clone(h),x=f/_,E=[];_=f\u003co?_+1:_;for(let B=0;B\u003c_;B++){const S=x*B+p,Q=i.fromValues(d[0]*a(S),d[1]*s(S));i.add(Q,y,Q),E.push(Q)}return f\u003co\u0026\u0026E.push(y),r.fromPoints(E)};e.exports=l}}),nrn=yt({\"node_modules/@jscad/modeling/src/primitives/circle.js\"(t,e){var{TAU:n}=mc(),o=trn(),{isGTE:i}=lf(),r=s=\u003e{const a={center:[0,0],radius:1,startAngle:0,endAngle:n,segments:32};let{center:A,radius:c,startAngle:l,endAngle:u,segments:g}=Object.assign({},a,s);if(!i(c,0))throw new Error(\"radius must be positive\");return c=[c,c],o({center:A,radius:c,startAngle:l,endAngle:u,segments:g})};e.exports=r}}),bVe=yt({\"node_modules/@jscad/modeling/src/primitives/cuboid.js\"(t,e){var n=Ta(),o=XA(),{isNumberArray:i}=lf(),r=s=\u003e{const a={center:[0,0,0],size:[2,2,2]},{center:A,size:c}=Object.assign({},a,s);if(!i(A,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!i(c,3))throw new Error(\"size must be an array of width, depth and height values\");if(!c.every(u=\u003eu\u003e=0))throw new Error(\"size values must be positive\");return c[0]===0||c[1]===0||c[2]===0?n.create():n.create([[[0,4,6,2],[-1,0,0]],[[1,3,7,5],[1,0,0]],[[0,1,5,4],[0,-1,0]],[[2,6,7,3],[0,1,0]],[[0,2,3,1],[0,0,-1]],[[4,5,7,6],[0,0,1]]].map(u=\u003e{const g=u[0].map(h=\u003e[A[0]+c[0]/2*(2*!!(h\u00261)-1),A[1]+c[1]/2*(2*!!(h\u00262)-1),A[2]+c[2]/2*(2*!!(h\u00264)-1)]);return o.create(g)}))};e.exports=r}}),khi=yt({\"node_modules/@jscad/modeling/src/primitives/cube.js\"(t,e){var n=bVe(),{isGTE:o}=lf(),i=r=\u003e{const s={center:[0,0,0],size:2};let{center:a,size:A}=Object.assign({},s,r);if(!o(A,0))throw new Error(\"size must be positive\");return A=[A,A,A],n({center:a,size:A})};e.exports=i}}),orn=yt({\"node_modules/@jscad/modeling/src/primitives/cylinderElliptic.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=$r(),r=Ta(),s=XA(),{sin:a,cos:A}=hI(),{isGT:c,isGTE:l,isNumberArray:u}=lf(),g=h=\u003e{const d={center:[0,0,0],height:2,startRadius:[1,1],startAngle:0,endRadius:[1,1],endAngle:o,segments:32};let{center:p,height:m,startRadius:_,startAngle:f,endRadius:I,endAngle:C,segments:y}=Object.assign({},d,h);if(!u(p,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!c(m,0))throw new Error(\"height must be greater then zero\");if(!u(_,2))throw new Error(\"startRadius must be an array of X and Y values\");if(!_.every(J=\u003eJ\u003e=0))throw new Error(\"startRadius values must be positive\");if(!u(I,2))throw new Error(\"endRadius must be an array of X and Y values\");if(!I.every(J=\u003eJ\u003e=0))throw new Error(\"endRadius values must be positive\");if(I.every(J=\u003eJ===0)\u0026\u0026_.every(J=\u003eJ===0))throw new Error(\"at least one radius must be positive\");if(!l(f,0))throw new Error(\"startAngle must be positive\");if(!l(C,0))throw new Error(\"endAngle must be positive\");if(!l(y,4))throw new Error(\"segments must be four or more\");f=f%o,C=C%o;let x=o;f\u003cC\u0026\u0026(x=C-f),f\u003eC\u0026\u0026(x=C+(o-f));const E=Math.min(_[0],_[1],I[0],I[1]),B=Math.acos((E*E+E*E-n*n)/(2*E*E));if(x\u003cB)throw new Error(\"startAngle and endAngle do not define a significant rotation\");const S=Math.floor(y*(x/o)),Q=i.fromValues(0,0,-(m/2)),w=i.fromValues(0,0,m/2),M=i.subtract(i.create(),w,Q),k=i.fromValues(1,0,0),R=i.fromValues(0,1,0),F=i.create(),O=i.create(),U=i.create(),Y=(J,oe,ie)=\u003e{const ne=oe*x+f;return i.scale(F,k,ie[0]*A(ne)),i.scale(O,R,ie[1]*a(ne)),i.add(F,F,O),i.scale(U,M,J),i.add(U,U,Q),i.add(i.create(),F,U)},W=(...J)=\u003e{const oe=J.map(ie=\u003ei.add(i.create(),ie,p));return s.create(oe)},te=[];for(let J=0;J\u003cS;J++){const oe=J/S;let ie=(J+1)/S;x===o\u0026\u0026J===S-1\u0026\u0026(ie=0),I[0]===_[0]\u0026\u0026I[1]===_[1]?(te.push(W(Q,Y(0,ie,I),Y(0,oe,I))),te.push(W(Y(0,ie,I),Y(1,ie,I),Y(1,oe,I),Y(0,oe,I))),te.push(W(w,Y(1,oe,I),Y(1,ie,I)))):(_[0]\u003e0\u0026\u0026_[1]\u003e0\u0026\u0026te.push(W(Q,Y(0,ie,_),Y(0,oe,_))),(_[0]\u003e0||_[1]\u003e0)\u0026\u0026te.push(W(Y(0,oe,_),Y(0,ie,_),Y(1,oe,I))),I[0]\u003e0\u0026\u0026I[1]\u003e0\u0026\u0026te.push(W(w,Y(1,oe,I),Y(1,ie,I))),(I[0]\u003e0||I[1]\u003e0)\u0026\u0026te.push(W(Y(1,oe,I),Y(0,ie,_),Y(1,ie,I))))}return x\u003co\u0026\u0026(te.push(W(Q,Y(0,0,_),w)),te.push(W(Y(0,0,_),Y(1,0,I),w)),te.push(W(Q,w,Y(0,1,_))),te.push(W(Y(0,1,_),w,Y(1,1,I)))),r.create(te)};e.exports=g}}),irn=yt({\"node_modules/@jscad/modeling/src/primitives/cylinder.js\"(t,e){var n=Ta(),o=orn(),{isGTE:i}=lf(),r=s=\u003e{const a={center:[0,0,0],height:2,radius:1,segments:32},{center:A,height:c,radius:l,segments:u}=Object.assign({},a,s);if(!i(l,0))throw new Error(\"radius must be positive\");return c===0||l===0?n.create():o({center:A,height:c,startRadius:[l,l],endRadius:[l,l],segments:u})};e.exports=r}}),rrn=yt({\"node_modules/@jscad/modeling/src/primitives/ellipsoid.js\"(t,e){var{TAU:n}=mc(),o=$r(),i=Ta(),r=XA(),{sin:s,cos:a}=hI(),{isGTE:A,isNumberArray:c}=lf(),l=u=\u003e{const g={center:[0,0,0],radius:[1,1,1],segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]},{center:h,radius:d,segments:p,axes:m}=Object.assign({},g,u);if(!c(h,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!c(d,3))throw new Error(\"radius must be an array of X, Y and Z values\");if(!d.every(S=\u003eS\u003e=0))throw new Error(\"radius values must be positive\");if(!A(p,4))throw new Error(\"segments must be four or more\");if(d[0]===0||d[1]===0||d[2]===0)return i.create();const _=o.scale(o.create(),o.normalize(o.create(),m[0]),d[0]),f=o.scale(o.create(),o.normalize(o.create(),m[1]),d[1]),I=o.scale(o.create(),o.normalize(o.create(),m[2]),d[2]),C=Math.round(p/4);let y;const x=[],E=o.create(),B=o.create();for(let S=0;S\u003c=p;S++){const Q=n*S/p,w=o.add(o.create(),o.scale(E,_,a(Q)),o.scale(B,f,s(Q)));if(S\u003e0){let M,k;for(let R=0;R\u003c=C;R++){const F=n/4*R/C,O=a(F),U=s(F);if(R\u003e0){let Y=[],W;W=o.subtract(o.create(),o.scale(E,y,M),o.scale(B,I,k)),Y.push(o.add(W,W,h)),W=o.subtract(o.create(),o.scale(E,w,M),o.scale(B,I,k)),Y.push(o.add(W,W,h)),R\u003cC\u0026\u0026(W=o.subtract(o.create(),o.scale(E,w,O),o.scale(B,I,U)),Y.push(o.add(W,W,h))),W=o.subtract(o.create(),o.scale(E,y,O),o.scale(B,I,U)),Y.push(o.add(W,W,h)),x.push(r.create(Y)),Y=[],W=o.add(o.create(),o.scale(E,y,M),o.scale(B,I,k)),Y.push(o.add(o.create(),h,W)),W=o.add(W,o.scale(E,w,M),o.scale(B,I,k)),Y.push(o.add(o.create(),h,W)),R\u003cC\u0026\u0026(W=o.add(W,o.scale(E,w,O),o.scale(B,I,U)),Y.push(o.add(o.create(),h,W))),W=o.add(W,o.scale(E,y,O),o.scale(B,I,U)),Y.push(o.add(o.create(),h,W)),Y.reverse(),x.push(r.create(Y))}M=O,k=U}}y=w}return i.create(x)};e.exports=l}}),srn=yt({\"node_modules/@jscad/modeling/src/primitives/polyhedron.js\"(t,e){var n=Ta(),o=XA(),{isNumberArray:i}=lf(),r=s=\u003e{const a={points:[],faces:[],colors:void 0,orientation:\"outward\"},{points:A,faces:c,colors:l,orientation:u}=Object.assign({},a,s);if(!(Array.isArray(A)\u0026\u0026Array.isArray(c)))throw new Error(\"points and faces must be arrays\");if(A.length\u003c3)throw new Error(\"three or more points are required\");if(c.length\u003c1)throw new Error(\"one or more faces are required\");if(l){if(!Array.isArray(l))throw new Error(\"colors must be an array\");if(l.length!==c.length)throw new Error(\"faces and colors must have the same length\")}A.forEach((h,d)=\u003e{if(!i(h,3))throw new Error(`point ${d} must be an array of X, Y, Z values`)}),c.forEach((h,d)=\u003e{if(h.length\u003c3)throw new Error(`face ${d} must contain 3 or more indexes`);if(!i(h,h.length))throw new Error(`face ${d} must be an array of numbers`)}),u!==\"outward\"\u0026\u0026c.forEach(h=\u003eh.reverse());const g=c.map((h,d)=\u003e{const p=o.create(h.map(m=\u003eA[m]));return l\u0026\u0026l[d]\u0026\u0026(p.color=l[d]),p});return n.create(g)};e.exports=r}}),Fhi=yt({\"node_modules/@jscad/modeling/src/primitives/geodesicSphere.js\"(t,e){var n=Du(),o=$r(),i=Ta(),r=srn(),{isGTE:s}=lf(),a=A=\u003e{const c={radius:1,frequency:6};let{radius:l,frequency:u}=Object.assign({},c,A);if(!s(l,0))throw new Error(\"radius must be positive\");if(!s(u,6))throw new Error(\"frequency must be six or more\");if(l===0)return i.create();u=Math.floor(u/6);const g=[[.850651,0,-.525731],[.850651,-0,.525731],[-.850651,-0,.525731],[-.850651,0,-.525731],[0,-.525731,.850651],[0,.525731,.850651],[0,.525731,-.850651],[0,-.525731,-.850651],[-.525731,-.850651,-0],[.525731,-.850651,-0],[.525731,.850651,0],[-.525731,.850651,0]],h=[[0,9,1],[1,10,0],[6,7,0],[10,6,0],[7,9,0],[5,1,4],[4,1,9],[5,10,1],[2,8,3],[3,11,2],[2,5,4],[4,8,2],[2,11,5],[3,7,6],[6,11,3],[8,7,3],[9,8,4],[11,10,5],[10,11,6],[8,9,7]],d=(C,y,x)=\u003e{const E=C[0],B=C[1],S=C[2];let Q=x;const w=[],M=[];for(let k=0;k\u003cy;k++)for(let R=0;R\u003cy-k;R++){const F=k/y,O=(k+1)/y,U=R/(y-k),Y=(R+1)/(y-k),W=y-k-1?R/(y-k-1):1,te=[];te[0]=p(p(E,B,U),S,F),te[1]=p(p(E,B,Y),S,F),te[2]=p(p(E,B,W),S,O);for(let j=0;j\u003c3;j++){const J=o.length(te[j]);for(let oe=0;oe\u003c3;oe++)te[j][oe]/=J}if(w.push(te[0],te[1],te[2]),M.push([Q,Q+1,Q+2]),Q+=3,R\u003cy-k-1){const j=y-k-1?(R+1)/(y-k-1):1;te[0]=p(p(E,B,Y),S,F),te[1]=p(p(E,B,j),S,O),te[2]=p(p(E,B,W),S,O);for(let J=0;J\u003c3;J++){const oe=o.length(te[J]);for(let ie=0;ie\u003c3;ie++)te[J][ie]/=oe}w.push(te[0],te[1],te[2]),M.push([Q,Q+1,Q+2]),Q+=3}}return{points:w,triangles:M,offset:Q}},p=(C,y,x)=\u003e{const E=1-x,B=[];for(let S=0;S\u003c3;S++)B[S]=C[S]*E+y[S]*x;return B};let m=[],_=[],f=0;for(let C=0;C\u003ch.length;C++){const y=d([g[h[C][0]],g[h[C][1]],g[h[C][2]]],u,f);m=m.concat(y.points),_=_.concat(y.triangles),f=y.offset}let I=r({points:m,faces:_,orientation:\"inward\"});return l!==1\u0026\u0026(I=i.transform(n.fromScaling(n.create(),[l,l,l]),I)),I};e.exports=a}}),Lhi=yt({\"node_modules/@jscad/modeling/src/primitives/line.js\"(t,e){var n=Au(),o=i=\u003e{if(!Array.isArray(i))throw new Error(\"points must be an array\");return n.fromPoints({},i)};e.exports=o}}),Hhi=yt({\"node_modules/@jscad/modeling/src/primitives/polygon.js\"(t,e){var n=Ya(),o=i=\u003e{const r={points:[],paths:[],orientation:\"counterclockwise\"},{points:s,paths:a,orientation:A}=Object.assign({},r,i);if(!(Array.isArray(s)\u0026\u0026Array.isArray(a)))throw new Error(\"points and paths must be arrays\");let c=s;Array.isArray(s[0])\u0026\u0026(Array.isArray(s[0][0])||(c=[s])),c.forEach((d,p)=\u003e{if(!Array.isArray(d))throw new Error(\"list of points \"+p+\" must be an array\");if(d.length\u003c3)throw new Error(\"list of points \"+p+\" must contain three or more points\");d.forEach((m,_)=\u003e{if(!Array.isArray(m))throw new Error(\"list of points \"+p+\", point \"+_+\" must be an array\");if(m.length\u003c2)throw new Error(\"list of points \"+p+\", point \"+_+\" must contain by X and Y values\")})});let l=a;if(a.length===0){let d=0;l=c.map(p=\u003ep.map(m=\u003ed++))}const u=[];c.forEach(d=\u003ed.forEach(p=\u003eu.push(p)));let g=[];l.forEach(d=\u003e{const p=d.map(_=\u003eu[_]),m=n.fromPoints(p);g=g.concat(n.toSides(m))});let h=n.create(g);return A===\"clockwise\"\u0026\u0026(h=n.reverse(h)),h};e.exports=o}}),SVe=yt({\"node_modules/@jscad/modeling/src/primitives/rectangle.js\"(t,e){var n=_A(),o=Ya(),{isNumberArray:i}=lf(),r=s=\u003e{const a={center:[0,0],size:[2,2]},{center:A,size:c}=Object.assign({},a,s);if(!i(A,2))throw new Error(\"center must be an array of X and Y values\");if(!i(c,2))throw new Error(\"size must be an array of X and Y values\");if(!c.every(h=\u003eh\u003e=0))throw new Error(\"size values must be positive\");if(c[0]===0||c[1]===0)return o.create();const l=[c[0]/2,c[1]/2],u=[l[0],-l[1]],g=[n.subtract(n.create(),A,l),n.add(n.create(),A,u),n.add(n.create(),A,l),n.subtract(n.create(),A,u)];return o.fromPoints(g)};e.exports=r}}),Ohi=yt({\"node_modules/@jscad/modeling/src/primitives/roundedCuboid.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=$r(),s=Ta(),a=XA(),{sin:A,cos:c}=hI(),{isGTE:l,isNumberArray:u}=lf(),g=bVe(),h=(f,I,C,y,x,E)=\u003e{const B=o/4*x/y,S=c(B),Q=A(B),w=y-x;let M=C*S,k=I[2]-(C-C*Q);E||(k=C-C*Q-I[2]),M=M\u003en?M:0;const R=r.add(r.create(),f,[I[0]-C,I[1]-C,k]),F=r.add(r.create(),f,[C-I[0],I[1]-C,k]),O=r.add(r.create(),f,[C-I[0],C-I[1],k]),U=r.add(r.create(),f,[I[0]-C,C-I[1],k]),Y=[],W=[],te=[],j=[];for(let J=0;J\u003c=w;J++){const oe=w\u003e0?o/4*J/w:0,ie=i.fromAngleRadians(i.create(),oe);i.scale(ie,ie,M);const ne=r.fromVec2(r.create(),ie);Y.push(r.add(r.create(),R,ne)),r.rotateZ(ne,ne,[0,0,0],o/4),W.push(r.add(r.create(),F,ne)),r.rotateZ(ne,ne,[0,0,0],o/4),te.push(r.add(r.create(),O,ne)),r.rotateZ(ne,ne,[0,0,0],o/4),j.push(r.add(r.create(),U,ne))}return E?[Y,W,te,j]:(Y.reverse(),W.reverse(),te.reverse(),j.reverse(),[j,te,W,Y])},d=(f,I)=\u003e{const C=[];for(let y=0;y\u003cf.length;y++){const x=f[y],E=I[y];for(let B=0;B\u003cx.length-1;B++)C.push(a.create([x[B],x[B+1],E[B]])),B\u003cE.length-1\u0026\u0026C.push(a.create([E[B],x[B+1],E[B+1]]))}return C},p=(f,I)=\u003e{const C=[];for(let y=0;y\u003cf.length;y++){let x=f[y],E=I[y];const B=x[x.length-1],S=E[E.length-1],Q=(y+1)%f.length;x=f[Q],E=I[Q];const w=x[0],M=E[0];C.push(a.create([B,w,M,S]))}return C},m=(f,I)=\u003e{f=[f[3],f[2],f[1],f[0]],f=f.map(E=\u003eE.slice().reverse());const C=[];f.forEach(E=\u003e{E.forEach(B=\u003eC.push(B))});const y=[];I.forEach(E=\u003e{E.forEach(B=\u003ey.push(B))});const x=[];for(let E=0;E\u003cy.length;E++){const B=(E+1)%y.length;x.push(a.create([C[E],C[B],y[B],y[E]]))}return x},_=f=\u003e{const I={center:[0,0,0],size:[2,2,2],roundRadius:.2,segments:32};let{center:C,size:y,roundRadius:x,segments:E}=Object.assign({},I,f);if(!u(C,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!u(y,3))throw new Error(\"size must be an array of X, Y and Z values\");if(!y.every(w=\u003ew\u003e=0))throw new Error(\"size values must be positive\");if(!l(x,0))throw new Error(\"roundRadius must be positive\");if(!l(E,4))throw new Error(\"segments must be four or more\");if(y[0]===0||y[1]===0||y[2]===0)return s.create();if(x===0)return g({center:C,size:y});if(y=y.map(w=\u003ew/2),x\u003ey[0]-n||x\u003ey[1]-n||x\u003ey[2]-n)throw new Error(\"roundRadius must be smaller than the radius of all dimensions\");E=Math.floor(E/4);let B=null,S=null,Q=[];for(let w=0;w\u003c=E;w++){const M=h(C,y,x,E,w,!0),k=h(C,y,x,E,w,!1);if(w===0\u0026\u0026(Q=Q.concat(m(k,M))),B\u0026\u0026(Q=Q.concat(d(B,M),p(B,M))),S\u0026\u0026(Q=Q.concat(d(S,k),p(S,k))),w===E){let R=M.map(F=\u003eF[0]);Q.push(a.create(R)),R=k.map(F=\u003eF[0]),Q.push(a.create(R))}B=M,S=k}return s.create(Q)};e.exports=_}}),Ghi=yt({\"node_modules/@jscad/modeling/src/primitives/roundedCylinder.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=$r(),r=Ta(),s=XA(),{sin:a,cos:A}=hI(),{isGTE:c,isNumberArray:l}=lf(),u=irn(),g=h=\u003e{const d={center:[0,0,0],height:2,radius:1,roundRadius:.2,segments:32},{center:p,height:m,radius:_,roundRadius:f,segments:I}=Object.assign({},d,h);if(!l(p,3))throw new Error(\"center must be an array of X, Y and Z values\");if(!c(m,0))throw new Error(\"height must be positive\");if(!c(_,0))throw new Error(\"radius must be positive\");if(!c(f,0))throw new Error(\"roundRadius must be positive\");if(f\u003e_)throw new Error(\"roundRadius must be smaller than the radius\");if(!c(I,4))throw new Error(\"segments must be four or more\");if(m===0||_===0)return r.create();if(f===0)return u({center:p,height:m,radius:_});const C=[0,0,-(m/2)],y=[0,0,m/2],x=i.subtract(i.create(),y,C),E=i.length(x);if(2*f\u003eE-n)throw new Error(\"height must be larger than twice roundRadius\");let B;Math.abs(x[0])\u003eMath.abs(x[1])?B=i.fromValues(0,1,0):B=i.fromValues(1,0,0);const S=i.scale(i.create(),i.normalize(i.create(),x),f),Q=i.scale(i.create(),i.normalize(i.create(),i.cross(i.create(),S,B)),_),w=i.scale(i.create(),i.normalize(i.create(),i.cross(i.create(),Q,S)),_);i.add(C,C,S),i.subtract(y,y,S);const M=Math.floor(.25*I),k=W=\u003e{const te=W.map(j=\u003ei.add(j,j,p));return s.create(te)},R=[],F=i.create(),O=i.create();let U;for(let W=0;W\u003c=I;W++){const te=o*W/I,j=i.add(i.create(),i.scale(F,Q,A(te)),i.scale(O,w,a(te)));if(W\u003e0){let J=[];J.push(i.add(i.create(),C,j)),J.push(i.add(i.create(),C,U)),J.push(i.add(i.create(),y,U)),J.push(i.add(i.create(),y,j)),R.push(k(J));let oe,ie;for(let ne=0;ne\u003c=M;ne++){const le=o/4*ne/M,ge=A(le),_e=a(le);if(ne\u003e0){J=[];let ue;ue=i.add(i.create(),C,i.subtract(F,i.scale(F,U,oe),i.scale(O,S,ie))),J.push(ue),ue=i.add(i.create(),C,i.subtract(F,i.scale(F,j,oe),i.scale(O,S,ie))),J.push(ue),ne\u003cM\u0026\u0026(ue=i.add(i.create(),C,i.subtract(F,i.scale(F,j,ge),i.scale(O,S,_e))),J.push(ue)),ue=i.add(i.create(),C,i.subtract(F,i.scale(F,U,ge),i.scale(O,S,_e))),J.push(ue),R.push(k(J)),J=[],ue=i.add(i.create(),i.scale(F,U,oe),i.scale(O,S,ie)),i.add(ue,ue,y),J.push(ue),ue=i.add(i.create(),i.scale(F,j,oe),i.scale(O,S,ie)),i.add(ue,ue,y),J.push(ue),ne\u003cM\u0026\u0026(ue=i.add(i.create(),i.scale(F,j,ge),i.scale(O,S,_e)),i.add(ue,ue,y),J.push(ue)),ue=i.add(i.create(),i.scale(F,U,ge),i.scale(O,S,_e)),i.add(ue,ue,y),J.push(ue),J.reverse(),R.push(k(J))}oe=ge,ie=_e}}U=j}return r.create(R)};e.exports=g}}),Yhi=yt({\"node_modules/@jscad/modeling/src/primitives/roundedRectangle.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=_A(),r=Ya(),{isGTE:s,isNumberArray:a}=lf(),A=SVe(),c=l=\u003e{const u={center:[0,0],size:[2,2],roundRadius:.2,segments:32};let{center:g,size:h,roundRadius:d,segments:p}=Object.assign({},u,l);if(!a(g,2))throw new Error(\"center must be an array of X and Y values\");if(!a(h,2))throw new Error(\"size must be an array of X and Y values\");if(!h.every(S=\u003eS\u003e=0))throw new Error(\"size values must be positive\");if(!s(d,0))throw new Error(\"roundRadius must be positive\");if(!s(p,4))throw new Error(\"segments must be four or more\");if(h[0]===0||h[1]===0)return r.create();if(d===0)return A({center:g,size:h});if(h=h.map(S=\u003eS/2),d\u003eh[0]-n||d\u003eh[1]-n)throw new Error(\"roundRadius must be smaller than the radius of all dimensions\");const m=Math.floor(p/4),_=i.add(i.create(),g,[h[0]-d,h[1]-d]),f=i.add(i.create(),g,[d-h[0],h[1]-d]),I=i.add(i.create(),g,[d-h[0],d-h[1]]),C=i.add(i.create(),g,[h[0]-d,d-h[1]]),y=[],x=[],E=[],B=[];for(let S=0;S\u003c=m;S++){const Q=o/4*S/m,w=i.fromAngleRadians(i.create(),Q);i.scale(w,w,d),y.push(i.add(i.create(),_,w)),i.rotate(w,w,i.create(),o/4),x.push(i.add(i.create(),f,w)),i.rotate(w,w,i.create(),o/4),E.push(i.add(i.create(),I,w)),i.rotate(w,w,i.create(),o/4),B.push(i.add(i.create(),C,w))}return r.fromPoints(y.concat(x,E,B))};e.exports=c}}),arn=yt({\"node_modules/@jscad/modeling/src/primitives/sphere.js\"(t,e){var n=rrn(),{isGTE:o}=lf(),i=r=\u003e{const s={center:[0,0,0],radius:1,segments:32,axes:[[1,0,0],[0,-1,0],[0,0,1]]};let{center:a,radius:A,segments:c,axes:l}=Object.assign({},s,r);if(!o(A,0))throw new Error(\"radius must be positive\");return A=[A,A,A],n({center:a,radius:A,segments:c,axes:l})};e.exports=i}}),Uhi=yt({\"node_modules/@jscad/modeling/src/primitives/square.js\"(t,e){var n=SVe(),{isGTE:o}=lf(),i=r=\u003e{const s={center:[0,0],size:2};let{center:a,size:A}=Object.assign({},s,r);if(!o(A,0))throw new Error(\"size must be positive\");return A=[A,A],n({center:a,size:A})};e.exports=i}}),Khi=yt({\"node_modules/@jscad/modeling/src/primitives/star.js\"(t,e){var{TAU:n}=mc(),o=_A(),i=Ya(),{isGT:r,isGTE:s,isNumberArray:a}=lf(),A=(u,g)=\u003eu\u003e0\u0026\u0026g\u003e1\u0026\u0026g\u003cu/2?Math.cos(Math.PI*g/u)/Math.cos(Math.PI*(g-1)/u):0,c=(u,g,h,d)=\u003e{const p=n/u,m=[];for(let _=0;_\u003cu;_++){const f=o.fromAngleRadians(o.create(),p*_+h);o.scale(f,f,g),o.add(f,d,f),m.push(f)}return m},l=u=\u003e{const g={center:[0,0],vertices:5,outerRadius:1,innerRadius:0,density:2,startAngle:0};let{center:h,vertices:d,outerRadius:p,innerRadius:m,density:_,startAngle:f}=Object.assign({},g,u);if(!a(h,2))throw new Error(\"center must be an array of X and Y values\");if(!s(d,2))throw new Error(\"vertices must be two or more\");if(!r(p,0))throw new Error(\"outerRadius must be greater than zero\");if(!s(m,0))throw new Error(\"innerRadius must be greater than zero\");if(!s(f,0))throw new Error(\"startAngle must be greater than zero\");if(d=Math.floor(d),_=Math.floor(_),f=f%n,m===0){if(!s(_,2))throw new Error(\"density must be two or more\");m=p*A(d,_)}const I=o.clone(h),C=c(d,p,f,I),y=c(d,m,f+Math.PI/d,I),x=[];for(let E=0;E\u003cd;E++)x.push(C[E]),x.push(y[E]);return i.fromPoints(x)};e.exports=l}}),wX=yt({\"node_modules/@jscad/modeling/src/operations/transforms/mirror.js\"(t,e){var n=ga(),o=Du(),i=S6(),r=Ya(),s=Ta(),a=Au(),A=(g,...h)=\u003e{const d={origin:[0,0,0],normal:[0,0,1]},{origin:p,normal:m}=Object.assign({},d,g);if(h=n(h),h.length===0)throw new Error(\"wrong number of arguments\");const _=i.fromNormalAndPoint(i.create(),m,p);if(Number.isNaN(_[0]))throw new Error(\"the given origin and normal do not define a proper plane\");const f=o.mirrorByPlane(o.create(),_),I=h.map(C=\u003ea.isA(C)?a.transform(f,C):r.isA(C)?r.transform(f,C):s.isA(C)?s.transform(f,C):C);return I.length===1?I[0]:I},c=(...g)=\u003eA({normal:[1,0,0]},g),l=(...g)=\u003eA({normal:[0,1,0]},g),u=(...g)=\u003eA({normal:[0,0,1]},g);e.exports={mirror:A,mirrorX:c,mirrorY:l,mirrorZ:u}}}),Arn=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/calculatePlane.js\"(t,e){var n=S6(),o=$r(),i=r=\u003e{const s=r.edges;if(s.length\u003c3)throw new Error(\"slices must have 3 or more edges to calculate a plane\");const a=s.reduce((u,g)=\u003eo.add(o.create(),u,g[0]),o.create());o.scale(a,a,1/s.length);let A,c=0;s.forEach(u=\u003e{if(!o.equals(u[0],u[1])){const g=o.squaredDistance(a,u[0]);g\u003ec\u0026\u0026(A=u,c=g)}});const l=s.find(u=\u003eo.equals(u[1],A[0]));return n.fromPoints(n.create(),l[0],A[0],A[1])};e.exports=i}}),iT=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/create.js\"(t,e){var n=o=\u003e(o||(o=[]),{edges:o});e.exports=n}}),Vhi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/clone.js\"(t,e){var n=iT(),o=$r(),i=(...r)=\u003e{let s,a;return r.length===1?(s=n(),a=r[0]):(s=r[0],a=r[1]),s.edges=a.edges.map(A=\u003e[o.clone(A[0]),o.clone(A[1])]),s};e.exports=i}}),zhi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/equals.js\"(t,e){var n=$r(),o=(i,r)=\u003e{const s=i.edges,a=r.edges;return s.length!==a.length?!1:s.reduce((c,l,u)=\u003e{const g=a[u],h=n.squaredDistance(l[0],g[0]);return c\u0026\u0026h\u003cNumber.EPSILON},!0)};e.exports=o}}),Jhi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/fromPoints.js\"(t,e){var n=$r(),o=iT(),i=r=\u003e{if(!Array.isArray(r))throw new Error(\"the given points must be an array\");if(r.length\u003c3)throw new Error(\"the given points must contain THREE or more points\");const s=[];let a=r[r.length-1];return r.forEach(A=\u003e{A.length===2\u0026\u0026s.push([n.fromVec2(n.create(),a),n.fromVec2(n.create(),A)]),A.length===3\u0026\u0026s.push([a,A]),a=A}),o(s)};e.exports=i}}),Whi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/fromSides.js\"(t,e){var n=$r(),o=iT(),i=r=\u003e{if(!Array.isArray(r))throw new Error(\"the given sides must be an array\");const s=[];return r.forEach(a=\u003e{s.push([n.fromVec2(n.create(),a[0]),n.fromVec2(n.create(),a[1])])}),o(s)};e.exports=i}}),jhi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/isA.js\"(t,e){var n=o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"edges\"in o\u0026\u0026Array.isArray(o.edges));e.exports=n}}),$hi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/reverse.js\"(t,e){var n=iT(),o=(...i)=\u003e{let r,s;return i.length===1?(r=n(),s=i[0]):(r=i[0],s=i[1]),r.edges=s.edges.map(a=\u003e[a[1],a[0]]),r};e.exports=o}}),qhi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/toEdges.js\"(t,e){var n=o=\u003eo.edges;e.exports=n}}),Xhi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/linkedListSort.js\"(t,e){var n=(o,i)=\u003e{let r,s,a,A,c,l=1;do{s=o,o=null;let u=null;for(c=0;s;){c++,a=s;let g=0;for(r=0;r\u003cl\u0026\u0026(g++,a=a.nextZ,!!a);r++);let h=l;for(;g\u003e0||h\u003e0\u0026\u0026a;)g!==0\u0026\u0026(h===0||!a||i(s)\u003c=i(a))?(A=s,s=s.nextZ,g--):(A=a,a=a.nextZ,h--),u?u.nextZ=A:o=A,A.prevZ=u,u=A;s=a}u.nextZ=null,l*=2}while(c\u003e1);return o};e.exports=n}}),crn=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/linkedList.js\"(t,e){var n=Xhi(),o=class{constructor(s,a,A){this.i=s,this.x=a,this.y=A,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}},i=(s,a,A,c)=\u003e{const l=new o(s,a,A);return c?(l.next=c.next,l.prev=c,c.next.prev=l,c.next=l):(l.prev=l,l.next=l),l},r=s=\u003e{s.next.prev=s.prev,s.prev.next=s.next,s.prevZ\u0026\u0026(s.prevZ.nextZ=s.nextZ),s.nextZ\u0026\u0026(s.nextZ.prevZ=s.prevZ)};e.exports={Node:o,insertNode:i,removeNode:r,sortLinked:n}}}),QVe=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/triangle.js\"(t,e){var n=(i,r,s,a,A,c,l,u)=\u003e(A-l)*(r-u)-(i-l)*(c-u)\u003e=0\u0026\u0026(i-l)*(a-u)-(s-l)*(r-u)\u003e=0\u0026\u0026(s-l)*(c-u)-(A-l)*(a-u)\u003e=0,o=(i,r,s)=\u003e(r.y-i.y)*(s.x-r.x)-(r.x-i.x)*(s.y-r.y);e.exports={area:o,pointInTriangle:n}}}),lrn=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/linkedPolygon.js\"(t,e){var{Node:n,insertNode:o,removeNode:i}=crn(),{area:r}=QVe(),s=(f,I,C,y,x)=\u003e{let E;if(x===m(f,I,C,y)\u003e0)for(let B=I;B\u003cC;B+=y)E=o(B,f[B],f[B+1],E);else for(let B=C-y;B\u003e=I;B-=y)E=o(B,f[B],f[B+1],E);return E\u0026\u0026_(E,E.next)\u0026\u0026(i(E),E=E.next),E},a=(f,I)=\u003e{if(!f)return f;I||(I=f);let C=f,y;do if(y=!1,!C.steiner\u0026\u0026(_(C,C.next)||r(C.prev,C,C.next)===0)){if(i(C),C=I=C.prev,C===C.next)break;y=!0}else C=C.next;while(y||C!==I);return I},A=(f,I,C)=\u003e{let y=f;do{const x=y.prev,E=y.next.next;!_(x,E)\u0026\u0026d(x,y,y.next,E)\u0026\u0026l(x,E)\u0026\u0026l(E,x)\u0026\u0026(I.push(x.i/C),I.push(y.i/C),I.push(E.i/C),i(y),i(y.next),y=f=E),y=y.next}while(y!==f);return a(y)},c=(f,I)=\u003e{let C=f;do{if(C.i!==f.i\u0026\u0026C.next.i!==f.i\u0026\u0026C.i!==I.i\u0026\u0026C.next.i!==I.i\u0026\u0026d(C,C.next,f,I))return!0;C=C.next}while(C!==f);return!1},l=(f,I)=\u003er(f.prev,f,f.next)\u003c0?r(f,I,f.next)\u003e=0\u0026\u0026r(f,f.prev,I)\u003e=0:r(f,I,f.prev)\u003c0||r(f,f.next,I)\u003c0,u=(f,I)=\u003e{let C=f,y=!1;const x=(f.x+I.x)/2,E=(f.y+I.y)/2;do C.y\u003eE!=C.next.y\u003eE\u0026\u0026C.next.y!==C.y\u0026\u0026x\u003c(C.next.x-C.x)*(E-C.y)/(C.next.y-C.y)+C.x\u0026\u0026(y=!y),C=C.next;while(C!==f);return y},g=(f,I)=\u003e{const C=new n(f.i,f.x,f.y),y=new n(I.i,I.x,I.y),x=f.next,E=I.prev;return f.next=I,I.prev=f,C.next=x,x.prev=C,y.next=C,C.prev=y,E.next=y,y.prev=E,y},h=(f,I)=\u003ef.next.i!==I.i\u0026\u0026f.prev.i!==I.i\u0026\u0026!c(f,I)\u0026\u0026(l(f,I)\u0026\u0026l(I,f)\u0026\u0026u(f,I)\u0026\u0026(r(f.prev,f,I.prev)||r(f,I.prev,I))||_(f,I)\u0026\u0026r(f.prev,f,f.next)\u003e0\u0026\u0026r(I.prev,I,I.next)\u003e0),d=(f,I,C,y)=\u003e{const x=Math.sign(r(f,I,C)),E=Math.sign(r(f,I,y)),B=Math.sign(r(C,y,f)),S=Math.sign(r(C,y,I));return!!(x!==E\u0026\u0026B!==S||x===0\u0026\u0026p(f,C,I)||E===0\u0026\u0026p(f,y,I)||B===0\u0026\u0026p(C,f,y)||S===0\u0026\u0026p(C,I,y))},p=(f,I,C)=\u003eI.x\u003c=Math.max(f.x,C.x)\u0026\u0026I.x\u003e=Math.min(f.x,C.x)\u0026\u0026I.y\u003c=Math.max(f.y,C.y)\u0026\u0026I.y\u003e=Math.min(f.y,C.y),m=(f,I,C,y)=\u003e{let x=0;for(let E=I,B=C-y;E\u003cC;E+=y)x+=(f[B]-f[E])*(f[E+1]+f[B+1]),B=E;return x},_=(f,I)=\u003ef.x===I.x\u0026\u0026f.y===I.y;e.exports={cureLocalIntersections:A,filterPoints:a,isValidDiagonal:h,linkedPolygon:s,locallyInside:l,splitPolygon:g}}}),Zhi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/eliminateHoles.js\"(t,e){var{filterPoints:n,linkedPolygon:o,locallyInside:i,splitPolygon:r}=lrn(),{area:s,pointInTriangle:a}=QVe(),A=(h,d,p,m)=\u003e{const _=[];for(let f=0,I=d.length;f\u003cI;f++){const C=d[f]*m,y=f\u003cI-1?d[f+1]*m:h.length,x=o(h,C,y,m,!1);x===x.next\u0026\u0026(x.steiner=!0),_.push(g(x))}_.sort((f,I)=\u003ef.x-I.x);for(let f=0;f\u003c_.length;f++)p=c(_[f],p),p=n(p,p.next);return p},c=(h,d)=\u003e{const p=l(h,d);if(!p)return d;const m=r(p,h),_=n(p,p.next);return n(m,m.next),d===p?_:d},l=(h,d)=\u003e{let p=d;const m=h.x,_=h.y;let f=-1/0,I;do{if(_\u003c=p.y\u0026\u0026_\u003e=p.next.y\u0026\u0026p.next.y!==p.y){const B=p.x+(_-p.y)*(p.next.x-p.x)/(p.next.y-p.y);if(B\u003c=m\u0026\u0026B\u003ef){if(f=B,B===m){if(_===p.y)return p;if(_===p.next.y)return p.next}I=p.x\u003cp.next.x?p:p.next}}p=p.next}while(p!==d);if(!I)return null;if(m===f)return I;const C=I,y=I.x,x=I.y;let E=1/0;p=I;do{if(m\u003e=p.x\u0026\u0026p.x\u003e=y\u0026\u0026m!==p.x\u0026\u0026a(_\u003cx?m:f,_,y,x,_\u003cx?f:m,_,p.x,p.y)){const B=Math.abs(_-p.y)/(m-p.x);i(p,h)\u0026\u0026(B\u003cE||B===E\u0026\u0026(p.x\u003eI.x||p.x===I.x\u0026\u0026u(I,p)))\u0026\u0026(I=p,E=B)}p=p.next}while(p!==C);return I},u=(h,d)=\u003es(h.prev,h,d.prev)\u003c0\u0026\u0026s(d.next,h,h.next)\u003c0,g=h=\u003e{let d=h,p=h;do(d.x\u003cp.x||d.x===p.x\u0026\u0026d.y\u003cp.y)\u0026\u0026(p=d),d=d.next;while(d!==h);return p};e.exports=A}}),epi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/index.js\"(t,e){var n=Zhi(),{removeNode:o,sortLinked:i}=crn(),{cureLocalIntersections:r,filterPoints:s,isValidDiagonal:a,linkedPolygon:A,splitPolygon:c}=lrn(),{area:l,pointInTriangle:u}=QVe(),g=(I,C,y=2)=\u003e{const x=C\u0026\u0026C.length,E=x?C[0]*y:I.length;let B=A(I,0,E,y,!0);const S=[];if(!B||B.next===B.prev)return S;let Q,w,M,k,R;if(x\u0026\u0026(B=n(I,C,B,y)),I.length\u003e80*y){Q=M=I[0],w=k=I[1];for(let F=y;F\u003cE;F+=y){const O=I[F],U=I[F+1];O\u003cQ\u0026\u0026(Q=O),U\u003cw\u0026\u0026(w=U),O\u003eM\u0026\u0026(M=O),U\u003ek\u0026\u0026(k=U)}R=Math.max(M-Q,k-w),R=R!==0?1/R:0}return h(B,S,y,Q,w,R),S},h=(I,C,y,x,E,B,S)=\u003e{if(!I)return;!S\u0026\u0026B\u0026\u0026_(I,x,E,B);let Q=I,w,M;for(;I.prev!==I.next;){if(w=I.prev,M=I.next,B?p(I,x,E,B):d(I)){C.push(w.i/y),C.push(I.i/y),C.push(M.i/y),o(I),I=M.next,Q=M.next;continue}if(I=M,I===Q){S?S===1?(I=r(s(I),C,y),h(I,C,y,x,E,B,2)):S===2\u0026\u0026m(I,C,y,x,E,B):h(s(I),C,y,x,E,B,1);break}}},d=I=\u003e{const C=I.prev,y=I,x=I.next;if(l(C,y,x)\u003e=0)return!1;let E=I.next.next;for(;E!==I.prev;){if(u(C.x,C.y,y.x,y.y,x.x,x.y,E.x,E.y)\u0026\u0026l(E.prev,E,E.next)\u003e=0)return!1;E=E.next}return!0},p=(I,C,y,x)=\u003e{const E=I.prev,B=I,S=I.next;if(l(E,B,S)\u003e=0)return!1;const Q=E.x\u003cB.x?E.x\u003cS.x?E.x:S.x:B.x\u003cS.x?B.x:S.x,w=E.y\u003cB.y?E.y\u003cS.y?E.y:S.y:B.y\u003cS.y?B.y:S.y,M=E.x\u003eB.x?E.x\u003eS.x?E.x:S.x:B.x\u003eS.x?B.x:S.x,k=E.y\u003eB.y?E.y\u003eS.y?E.y:S.y:B.y\u003eS.y?B.y:S.y,R=f(Q,w,C,y,x),F=f(M,k,C,y,x);let O=I.prevZ,U=I.nextZ;for(;O\u0026\u0026O.z\u003e=R\u0026\u0026U\u0026\u0026U.z\u003c=F;){if(O!==I.prev\u0026\u0026O!==I.next\u0026\u0026u(E.x,E.y,B.x,B.y,S.x,S.y,O.x,O.y)\u0026\u0026l(O.prev,O,O.next)\u003e=0||(O=O.prevZ,U!==I.prev\u0026\u0026U!==I.next\u0026\u0026u(E.x,E.y,B.x,B.y,S.x,S.y,U.x,U.y)\u0026\u0026l(U.prev,U,U.next)\u003e=0))return!1;U=U.nextZ}for(;O\u0026\u0026O.z\u003e=R;){if(O!==I.prev\u0026\u0026O!==I.next\u0026\u0026u(E.x,E.y,B.x,B.y,S.x,S.y,O.x,O.y)\u0026\u0026l(O.prev,O,O.next)\u003e=0)return!1;O=O.prevZ}for(;U\u0026\u0026U.z\u003c=F;){if(U!==I.prev\u0026\u0026U!==I.next\u0026\u0026u(E.x,E.y,B.x,B.y,S.x,S.y,U.x,U.y)\u0026\u0026l(U.prev,U,U.next)\u003e=0)return!1;U=U.nextZ}return!0},m=(I,C,y,x,E,B)=\u003e{let S=I;do{let Q=S.next.next;for(;Q!==S.prev;){if(S.i!==Q.i\u0026\u0026a(S,Q)){let w=c(S,Q);S=s(S,S.next),w=s(w,w.next),h(S,C,y,x,E,B),h(w,C,y,x,E,B);return}Q=Q.next}S=S.next}while(S!==I)},_=(I,C,y,x)=\u003e{let E=I;do E.z===null\u0026\u0026(E.z=f(E.x,E.y,C,y,x)),E.prevZ=E.prev,E.nextZ=E.next,E=E.next;while(E!==I);E.prevZ.nextZ=null,E.prevZ=null,i(E,B=\u003eB.z)},f=(I,C,y,x,E)=\u003e(I=32767*(I-y)*E,C=32767*(C-x)*E,I=(I|I\u003c\u003c8)\u002616711935,I=(I|I\u003c\u003c4)\u0026252645135,I=(I|I\u003c\u003c2)\u0026858993459,I=(I|I\u003c\u003c1)\u00261431655765,C=(C|C\u003c\u003c8)\u002616711935,C=(C|C\u003c\u003c4)\u0026252645135,C=(C|C\u003c\u003c2)\u0026858993459,C=(C|C\u003c\u003c1)\u00261431655765,I|C\u003c\u003c1);e.exports=g}}),tpi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/assignHoles.js\"(t,e){var{area:n}=QX(),{toOutlines:o}=Ya(),{arePointsInside:i}=fVe(),r=a=\u003e{const A=o(a),c=[],l=[];A.forEach((h,d)=\u003e{const p=n(h);p\u003c0?l.push(d):p\u003e0\u0026\u0026c.push(d)});const u=[],g=[];return c.forEach((h,d)=\u003e{const p=A[h];u[d]=[],l.forEach((m,_)=\u003e{const f=A[m];i([f[0]],{vertices:p})\u0026\u0026(u[d].push(m),g[_]||(g[_]=[]),g[_].push(d))})}),l.forEach((h,d)=\u003e{if(g[d]\u0026\u0026g[d].length\u003e1){const p=s(g[d],m=\u003eu[m].length);g[d].forEach((m,_)=\u003e{_!==p\u0026\u0026(u[m]=u[m].filter(f=\u003ef!==h))})}}),u.map((h,d)=\u003e({solid:A[c[d]],holes:h.map(p=\u003eA[p])}))},s=(a,A)=\u003e{let c,l;return a.forEach((u,g)=\u003e{const h=A(u);(l===void 0||h\u003cl)\u0026\u0026(c=g,l=h)}),c};e.exports=r}}),npi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/earcut/polygonHierarchy.js\"(t,e){var n=Ya(),o=S6(),i=_A(),r=$r(),s=Arn(),a=tpi(),A=class{constructor(c){this.plane=s(c);const l=r.orthogonal(r.create(),this.plane),u=r.cross(r.create(),this.plane,l);this.v=r.normalize(u,u),this.u=r.cross(r.create(),this.v,this.plane),this.basisMap=new Map;const g=c.edges.map(d=\u003ed.map(p=\u003ethis.to2D(p))),h=n.create(g);this.roots=a(h)}to2D(c){const l=i.fromValues(r.dot(c,this.u),r.dot(c,this.v));return this.basisMap.set(l,c),l}to3D(c){const l=this.basisMap.get(c);if(l)return l;{console.log(\"Warning: point not in original slice\");const u=r.scale(r.create(),this.u,c[0]),g=r.scale(r.create(),this.v,c[1]),h=r.scale(r.create(),o,o[3]),d=r.add(u,u,h);return r.add(g,g,d)}}};e.exports=A}}),opi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/toPolygons.js\"(t,e){var n=XA(),o=epi(),i=npi(),r=s=\u003e{const a=new i(s),A=[];return a.roots.forEach(({solid:c,holes:l})=\u003e{let u=c.length;const g=[];l.forEach((_,f)=\u003e{g.push(u),u+=_.length});const h=[c,...l].flat(),d=h.flat(),p=_=\u003ea.to3D(h[_]),m=o(d,g);for(let _=0;_\u003cm.length;_+=3){const f=m.slice(_,_+3).map(p);A.push(n.fromPointsAndPlane(f,a.plane))}}),A};e.exports=r}}),ipi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/toString.js\"(t,e){var n=$r(),o=r=\u003er.reduce((s,a)=\u003es+=`[${n.toString(a[0])}, ${n.toString(a[1])}], `,\"\"),i=r=\u003e`[${o(r.edges)}]`;e.exports=i}}),rpi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/transform.js\"(t,e){var n=$r(),o=iT(),i=(r,s)=\u003e{const a=s.edges.map(A=\u003e[n.transform(n.create(),A[0],r),n.transform(n.create(),A[1],r)]);return o(a)};e.exports=i}}),DY=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/index.js\"(t,e){e.exports={calculatePlane:Arn(),clone:Vhi(),create:iT(),equals:zhi(),fromPoints:Jhi(),fromSides:Whi(),isA:jhi(),reverse:$hi(),toEdges:qhi(),toPolygons:opi(),toString:ipi(),transform:rpi()}}}),spi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/slice/repair.js\"(t,e){var n=$r(),o=iT(),i=r=\u003e{if(!r.edges)return r;let s=r.edges;const a=new Map,A=new Map;s=s.filter(u=\u003e!n.equals(u[0],u[1])),s.forEach(u=\u003e{const g=u[0].toString(),h=u[1].toString();a.set(g,u[0]),a.set(h,u[1]),A.set(g,(A.get(g)||0)+1),A.set(h,(A.get(h)||0)-1)});const c=[],l=[];return A.forEach((u,g)=\u003e{u\u003c0\u0026\u0026c.push(g),u\u003e0\u0026\u0026l.push(g)}),c.forEach(u=\u003e{const g=a.get(u);let h=1/0,d;l.forEach(p=\u003e{const m=a.get(p),_=n.distance(g,m);_\u003ch\u0026\u0026(h=_,d=m)}),console.warn(`slice.repair: repairing vertex gap ${g} to ${d} distance ${h}`),s=s.map(p=\u003ep[0].toString()===u?[d,p[1]]:p[1].toString()===u?[p[0],d]:p)}),o(s)};e.exports=i}}),api=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeWalls.js\"(t,e){var{EPS:n}=mc(),o=$r(),i=XA(),r=DY(),s=(u,g)=\u003eu===g?u:u\u003cg?s(g,u):g===1?1:g===0?u:s(g,u%g),a=(u,g)=\u003eu*g/s(u,g),A=(u,g)=\u003e{const h=u/g.length;if(h===1)return g;const d=o.fromValues(h,h,h),p=o.create(),m=[];return g.forEach(_=\u003e{o.subtract(p,_[1],_[0]),o.divide(p,p,d);let f=_[0];for(let I=1;I\u003c=h;++I){const C=o.add(o.create(),f,p);m.push([f,C]),f=C}}),m},c=n*n/2*Math.sin(Math.PI/3),l=(u,g)=\u003e{let h=r.toEdges(u),d=r.toEdges(g);if(h.length!==d.length){const m=a(h.length,d.length);m!==h.length\u0026\u0026(h=A(m,h)),m!==d.length\u0026\u0026(d=A(m,d))}const p=[];return h.forEach((m,_)=\u003e{const f=d[_],I=i.create([m[0],m[1],f[1]]),C=i.measureArea(I);Number.isFinite(C)\u0026\u0026C\u003ec\u0026\u0026p.push(I);const y=i.create([m[0],f[1],f[0]]),x=i.measureArea(y);Number.isFinite(x)\u0026\u0026x\u003ec\u0026\u0026p.push(y)}),p};e.exports=l}}),ope=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeFromSlices.js\"(t,e){var n=Du(),o=Ya(),i=Ta(),r=XA(),s=DY(),a=spi(),A=api(),c=(u,g,h)=\u003e{let d=null;return o.isA(h)\u0026\u0026(d=s.fromSides(o.toSides(h))),r.isA(h)\u0026\u0026(d=s.fromPoints(r.toPoints(h))),u===0||u===1?s.transform(n.fromTranslation(n.create(),[0,0,u]),d):null},l=(u,g)=\u003e{const h={numberOfSlices:2,capStart:!0,capEnd:!0,close:!1,repair:!0,callback:c},{numberOfSlices:d,capStart:p,capEnd:m,close:_,repair:f,callback:I}=Object.assign({},h,u);if(d\u003c2)throw new Error(\"numberOfSlices must be 2 or more\");f\u0026\u0026(g=a(g));const C=d-1;let y=null,x=null,E=null,B=[];for(let S=0;S\u003cd;S++){const Q=I(S/C,S,g);if(Q){if(!s.isA(Q))throw new Error(\"the callback function must return slice objects\");if(s.toEdges(Q).length===0)throw new Error(\"the callback function must return slices with one or more edges\");if(E){const M=A(E,Q);for(let k=0;k\u003cM.length;k++)B.push(M[k])}S===0\u0026\u0026(y=Q),S===d-1\u0026\u0026(x=Q),E=Q}}if(m){const S=s.toPolygons(x);for(let Q=0;Q\u003cS.length;Q++)B.push(S[Q])}if(p){const S=s.toPolygons(y).map(r.invert);for(let Q=0;Q\u003cS.length;Q++)B.push(S[Q])}if(!p\u0026\u0026!m\u0026\u0026_\u0026\u0026!s.equals(x,y)){const S=A(x,y);for(let Q=0;Q\u003cS.length;Q++)B.push(S[Q])}return i.create(B)};e.exports=l}}),urn=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRotate.js\"(t,e){var{TAU:n}=mc(),o=Du(),{mirrorX:i}=wX(),r=Ya(),s=DY(),a=ope(),A=(c,l)=\u003e{const u={segments:12,startAngle:0,angle:n,overflow:\"cap\"};let{segments:g,startAngle:h,angle:d,overflow:p}=Object.assign({},u,c);if(g\u003c3)throw new Error(\"segments must be greater then 3\");h=Math.abs(h)\u003en?h%n:h,d=Math.abs(d)\u003en?d%n:d;let m=h+d;if(m=Math.abs(m)\u003en?m%n:m,m\u003ch){const k=h;h=m,m=k}let _=m-h;if(_\u003c=0\u0026\u0026(_=n),Math.abs(_)\u003cn){const k=n/g;g=Math.floor(Math.abs(_)/k),Math.abs(_)\u003eg*k\u0026\u0026g++}let f=r.toSides(l);if(f.length===0)throw new Error(\"the given geometry cannot be empty\");const I=f.filter(k=\u003ek[0][0]\u003c0),C=f.filter(k=\u003ek[0][0]\u003e=0);I.length\u003e0\u0026\u0026C.length\u003e0\u0026\u0026p===\"cap\"\u0026\u0026(I.length\u003eC.length?(f=f.map(k=\u003e{let R=k[0],F=k[1];return R=[Math.min(R[0],0),R[1]],F=[Math.min(F[0],0),F[1]],[R,F]}),l=r.create(f),l=i(l)):C.length\u003e=I.length\u0026\u0026(f=f.map(k=\u003e{let R=k[0],F=k[1];return R=[Math.max(R[0],0),R[1]],F=[Math.max(F[0],0),F[1]],[R,F]}),l=r.create(f)));const x=_/g,E=Math.abs(_)\u003cn,B=s.fromSides(r.toSides(l));s.reverse(B,B);const S=o.create(),Q=o.fromXRotation(o.create(),n/4),w=o.create(),M=(k,R,F)=\u003e{let O=x*R+h;return _===n\u0026\u0026R===g\u0026\u0026(O=h),o.fromZRotation(w,O),o.multiply(S,w,Q),s.transform(S,F)};return c={numberOfSlices:g+1,capStart:E,capEnd:E,close:!E,callback:M},a(c,B)};e.exports=A}}),PX=yt({\"node_modules/@jscad/modeling/src/operations/transforms/rotate.js\"(t,e){var n=ga(),o=Du(),i=Ya(),r=Ta(),s=Au(),a=(u,...g)=\u003e{if(!Array.isArray(u))throw new Error(\"angles must be an array\");if(g=n(g),g.length===0)throw new Error(\"wrong number of arguments\");for(u=u.slice();u.length\u003c3;)u.push(0);const h=u[2],d=u[1],p=u[0],m=o.fromTaitBryanRotation(o.create(),h,d,p),_=g.map(f=\u003es.isA(f)?s.transform(m,f):i.isA(f)?i.transform(m,f):r.isA(f)?r.transform(m,f):f);return _.length===1?_[0]:_},A=(u,...g)=\u003ea([u,0,0],g),c=(u,...g)=\u003ea([0,u,0],g),l=(u,...g)=\u003ea([0,0,u],g);e.exports={rotate:a,rotateX:A,rotateY:c,rotateZ:l}}}),rT=yt({\"node_modules/@jscad/modeling/src/operations/transforms/translate.js\"(t,e){var n=ga(),o=Du(),i=Ya(),r=Ta(),s=Au(),a=(u,...g)=\u003e{if(!Array.isArray(u))throw new Error(\"offset must be an array\");if(g=n(g),g.length===0)throw new Error(\"wrong number of arguments\");for(u=u.slice();u.length\u003c3;)u.push(0);const h=o.fromTranslation(o.create(),u),d=g.map(p=\u003es.isA(p)?s.transform(h,p):i.isA(p)?i.transform(h,p):r.isA(p)?r.transform(h,p):p);return d.length===1?d[0]:d},A=(u,...g)=\u003ea([u,0,0],g),c=(u,...g)=\u003ea([0,u,0],g),l=(u,...g)=\u003ea([0,0,u],g);e.exports={translate:a,translateX:A,translateY:c,translateZ:l}}}),Api=yt({\"node_modules/@jscad/modeling/src/primitives/torus.js\"(t,e){var{TAU:n}=mc(),o=urn(),{rotate:i}=PX(),{translate:r}=rT(),s=nrn(),{isGT:a,isGTE:A}=lf(),c=l=\u003e{const u={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:n},{innerRadius:g,innerSegments:h,outerRadius:d,outerSegments:p,innerRotation:m,startAngle:_,outerRotation:f}=Object.assign({},u,l);if(!a(g,0))throw new Error(\"innerRadius must be greater than zero\");if(!A(h,3))throw new Error(\"innerSegments must be three or more\");if(!a(d,0))throw new Error(\"outerRadius must be greater than zero\");if(!A(p,3))throw new Error(\"outerSegments must be three or more\");if(!A(_,0))throw new Error(\"startAngle must be positive\");if(!a(f,0))throw new Error(\"outerRotation must be greater than zero\");if(g\u003e=d)throw new Error(\"inner circle is too large to rotate about the outer circle\");let I=s({radius:g,segments:h});return m!==0\u0026\u0026(I=i([0,0,m],I)),I=r([d,0],I),o({startAngle:_,angle:f,segments:p},I)};e.exports=c}}),cpi=yt({\"node_modules/@jscad/modeling/src/primitives/triangle.js\"(t,e){var{NEPS:n}=mc(),o=_A(),i=Ya(),{isNumberArray:r}=lf(),s=(m,_,f)=\u003eMath.acos((m*m+_*_-f*f)/(2*m*_)),a=(m,_,f)=\u003e_\u003en?Math.sqrt(m*m+f*f-2*m*f*Math.cos(_)):Math.sqrt((m-f)*(m-f)+m*f*_*_*(1-_*_/12)),A=m=\u003e{if(Math.abs(m[0]+m[1]+m[2]-Math.PI)\u003en)throw new Error(\"AAA triangles require angles that sum to PI\");const f=m[0],I=m[1],C=Math.PI-f-I,y=1,x=y/Math.sin(C)*Math.sin(f),E=y/Math.sin(C)*Math.sin(I);return d(f,I,C,x,E,y)},c=m=\u003e{const _=m[0],f=m[1],I=Math.PI+n-_-f;if(I\u003cn)throw new Error(\"AAS triangles require angles that sum to PI\");const C=m[2],y=C/Math.sin(_)*Math.sin(f),x=C/Math.sin(_)*Math.sin(I);return d(_,f,I,C,y,x)},l=m=\u003e{const _=m[0],f=m[2],I=Math.PI+n-_-f;if(I\u003cn)throw new Error(\"ASA triangles require angles that sum to PI\");const C=m[1],y=C/Math.sin(I)*Math.sin(_),x=C/Math.sin(I)*Math.sin(f);return d(_,f,I,y,x,C)},u=m=\u003e{const _=m[0],f=m[1],I=m[2],C=a(_,f,I),y=s(C,_,I),x=Math.PI-y-f;return d(y,f,x,I,C,_)},g=m=\u003e{const _=m[0],f=m[1],I=m[2],C=Math.asin(f*Math.sin(I)/_),y=Math.PI-C-I,x=_/Math.sin(I)*Math.sin(y);return d(C,y,I,f,x,_)},h=m=\u003e{const _=m[1],f=m[2],I=m[0];if(_+f\u003c=I||f+I\u003c=_||I+_\u003c=f)throw new Error(\"SSS triangle is incorrect, as the longest side is longer than the sum of the other sides\");const C=s(f,I,_),y=s(I,_,f),x=Math.PI-C-y;return d(C,y,x,_,f,I)},d=(m,_,f,I,C,y)=\u003e{const x=o.fromValues(0,0),E=o.fromValues(y,0),B=o.fromValues(I,0);return o.add(B,o.rotate(B,B,[0,0],Math.PI-_),E),i.fromPoints([x,E,B])},p=m=\u003e{const _={type:\"SSS\",values:[1,1,1]};let{type:f,values:I}=Object.assign({},_,m);if(typeof f!=\"string\")throw new Error(\"triangle type must be a string\");if(f=f.toUpperCase(),!((f[0]===\"A\"||f[0]===\"S\")\u0026\u0026(f[1]===\"A\"||f[1]===\"S\")\u0026\u0026(f[2]===\"A\"||f[2]===\"S\")))throw new Error(\"triangle type must contain three letters; A or S\");if(!r(I,3))throw new Error(\"triangle values must contain three values\");if(!I.every(C=\u003eC\u003e0))throw new Error(\"triangle values must be greater than zero\");switch(f){case\"AAA\":return A(I);case\"AAS\":return c(I);case\"ASA\":return l(I);case\"SAS\":return u(I);case\"SSA\":return g(I);case\"SSS\":return h(I);default:throw new Error(\"invalid triangle type, try again\")}};e.exports=p}}),sT=yt({\"node_modules/@jscad/modeling/src/primitives/index.js\"(t,e){e.exports={arc:Thi(),circle:nrn(),cube:khi(),cuboid:bVe(),cylinder:irn(),cylinderElliptic:orn(),ellipse:trn(),ellipsoid:rrn(),geodesicSphere:Fhi(),line:Lhi(),polygon:Hhi(),polyhedron:srn(),rectangle:SVe(),roundedCuboid:Ohi(),roundedCylinder:Ghi(),roundedRectangle:Yhi(),sphere:arn(),square:Uhi(),star:Khi(),torus:Api(),triangle:cpi()}}}),lpi=yt({\"node_modules/@jscad/modeling/src/text/fonts/single-line/hershey/simplex.js\"(t,e){e.exports={height:14,32:[16],33:[10,5,21,5,7,void 0,5,2,4,1,5,0,6,1,5,2],34:[16,4,21,4,14,void 0,12,21,12,14],35:[21,11,25,4,-7,void 0,17,25,10,-7,void 0,4,12,18,12,void 0,3,6,17,6],36:[20,8,25,8,-4,void 0,12,25,12,-4,void 0,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],37:[24,21,21,3,0,void 0,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,void 0,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7],38:[26,23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2],39:[10,5,19,4,20,5,21,6,20,6,18,5,16,4,15],40:[14,11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7],41:[14,3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7],42:[16,8,21,8,9,void 0,3,18,13,12,void 0,13,18,3,12],43:[26,13,18,13,0,void 0,4,9,22,9],44:[10,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],45:[26,4,9,22,9],46:[10,5,2,4,1,5,0,6,1,5,2],47:[22,20,25,2,-7],48:[20,9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21],49:[20,6,17,8,18,11,21,11,0],50:[20,4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0],51:[20,5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],52:[20,13,21,3,7,18,7,void 0,13,21,13,0],53:[20,15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4],54:[20,16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7],55:[20,17,21,7,0,void 0,3,21,17,21],56:[20,8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21],57:[20,16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3],58:[10,5,14,4,13,5,12,6,13,5,14,void 0,5,2,4,1,5,0,6,1,5,2],59:[10,5,14,4,13,5,12,6,13,5,14,void 0,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4],60:[24,20,18,4,9,20,0],61:[26,4,12,22,12,void 0,4,6,22,6],62:[24,4,18,20,9,4,0],63:[18,3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,void 0,9,2,8,1,9,0,10,1,9,2],64:[27,18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,void 0,12,16,10,14,9,11,9,8,10,6,11,5,void 0,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,void 0,19,16,18,8,18,6,19,5],65:[18,9,21,1,0,void 0,9,21,17,0,void 0,4,7,14,7],66:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,void 0,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0],67:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5],68:[21,4,21,4,0,void 0,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0],69:[19,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11,void 0,4,0,17,0],70:[18,4,21,4,0,void 0,4,21,17,21,void 0,4,11,12,11],71:[21,18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,void 0,13,8,18,8],72:[22,4,21,4,0,void 0,18,21,18,0,void 0,4,11,18,11],73:[8,4,21,4,0],74:[16,12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7],75:[21,4,21,4,0,void 0,18,21,4,7,void 0,9,12,18,0],76:[17,4,21,4,0,void 0,4,0,16,0],77:[24,4,21,4,0,void 0,4,21,12,0,void 0,20,21,12,0,void 0,20,21,20,0],78:[22,4,21,4,0,void 0,4,21,18,0,void 0,18,21,18,0],79:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21],80:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10],81:[22,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,void 0,12,4,18,-2],82:[21,4,21,4,0,void 0,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,void 0,11,11,18,0],83:[20,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3],84:[16,8,21,8,0,void 0,1,21,15,21],85:[22,4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21],86:[18,1,21,9,0,void 0,17,21,9,0],87:[24,2,21,7,0,void 0,12,21,7,0,void 0,12,21,17,0,void 0,22,21,17,0],88:[20,3,21,17,0,void 0,17,21,3,0],89:[18,1,21,9,11,9,0,void 0,17,21,9,11],90:[20,17,21,3,0,void 0,3,21,17,21,void 0,3,0,17,0],91:[14,4,25,4,-7,void 0,5,25,5,-7,void 0,4,25,11,25,void 0,4,-7,11,-7],92:[14,0,21,14,-3],93:[14,9,25,9,-7,void 0,10,25,10,-7,void 0,3,25,10,25,void 0,3,-7,10,-7],94:[16,6,15,8,18,10,15,void 0,3,12,8,17,13,12,void 0,8,17,8,0],95:[16,0,-2,16,-2],96:[10,6,21,5,20,4,18,4,16,5,15,6,16,5,17],97:[19,15,14,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],98:[19,4,21,4,0,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],99:[18,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],100:[19,15,21,15,0,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],101:[18,3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],102:[12,10,21,8,21,6,20,5,17,5,0,void 0,2,14,9,14],103:[19,15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],104:[19,4,21,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],105:[8,3,21,4,20,5,21,4,22,3,21,void 0,4,14,4,0],106:[10,5,21,6,20,7,21,6,22,5,21,void 0,6,14,6,-3,5,-6,3,-7,1,-7],107:[17,4,21,4,0,void 0,14,14,4,4,void 0,8,8,15,0],108:[8,4,21,4,0],109:[30,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0,void 0,15,10,18,13,20,14,23,14,25,13,26,10,26,0],110:[19,4,14,4,0,void 0,4,10,7,13,9,14,12,14,14,13,15,10,15,0],111:[19,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14],112:[19,4,14,4,-7,void 0,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3],113:[19,15,14,15,-7,void 0,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3],114:[13,4,14,4,0,void 0,4,8,5,11,7,13,9,14,12,14],115:[17,14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3],116:[12,5,21,5,4,6,1,8,0,10,0,void 0,2,14,9,14],117:[19,4,14,4,4,5,1,7,0,10,0,12,1,15,4,void 0,15,14,15,0],118:[16,2,14,8,0,void 0,14,14,8,0],119:[22,3,14,7,0,void 0,11,14,7,0,void 0,11,14,15,0,void 0,19,14,15,0],120:[17,3,14,14,0,void 0,14,14,3,0],121:[16,2,14,8,0,void 0,14,14,8,0,6,-4,4,-6,2,-7,1,-7],122:[17,14,14,3,0,void 0,3,14,14,14,void 0,3,0,14,0],123:[14,9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,void 0,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,void 0,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7],124:[8,4,25,4,-7],125:[14,5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,void 0,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,void 0,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7],126:[24,3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,void 0,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]}}}),grn=yt({\"node_modules/@jscad/modeling/src/text/vectorParams.js\"(t,e){var n=lpi(),o={xOffset:0,yOffset:0,input:\"?\",align:\"left\",font:n,height:14,lineSpacing:2.142857142857143,letterSpacing:1,extrudeOffset:0},i=(r,s)=\u003e{!s\u0026\u0026typeof r==\"string\"\u0026\u0026(r={input:r}),r=r||{};const a=Object.assign({},o,r);return a.input=s||a.input,a};e.exports=i}}),drn=yt({\"node_modules/@jscad/modeling/src/text/vectorChar.js\"(t,e){var n=grn(),o=(i,r)=\u003e{const{xOffset:s,yOffset:a,input:A,font:c,height:l,extrudeOffset:u}=n(i,r);let g=A.charCodeAt(0);(!g||!c[g])\u0026\u0026(g=63);const h=[].concat(c[g]),d=(l-u)/c.height,p=u/2,m=h.shift()*d,_=[];let f=[];for(let I=0,C=h.length;I\u003cC;I+=2){const y=d*h[I]+s,x=d*h[I+1]+a+p;if(h[I]!==void 0){f.push([y,x]);continue}_.push(f),f=[],I--}return f.length\u0026\u0026_.push(f),{width:m,height:l,segments:_}};e.exports=o}}),upi=yt({\"node_modules/@jscad/modeling/src/text/vectorText.js\"(t,e){var n=drn(),o=grn(),i=(s,a)=\u003e{const{x:A,y:c}=Object.assign({x:0,y:0},s||{}),l=a.segments;let u=null,g=null;for(let h=0,d=l.length;h\u003cd;h++){u=l[h];for(let p=0,m=u.length;p\u003cm;p++)g=u[p],u[p]=[g[0]+A,g[1]+c]}return a},r=(s,a)=\u003e{const{xOffset:A,yOffset:c,input:l,font:u,height:g,align:h,extrudeOffset:d,lineSpacing:p,letterSpacing:m}=o(s,a);let[_,f]=[A,c],I,C,y,x,E,B,S={width:0,segments:[]};const Q=[];let w=[],M=0;const k=_,R=()=\u003e{Q.push(S),M=Math.max(M,S.width),S={width:0,segments:[]}};for(I=0,C=l.length;I\u003cC;I++){if(y=l[I],x=n({xOffset:_,yOffset:f,font:u,height:g,extrudeOffset:d},y),y===`\n`){_=k,f-=x.height*p,R();continue}E=x.width*m,S.width+=E,_+=E,y!==\" \"\u0026\u0026(S.segments=S.segments.concat(x.segments))}for(S.segments.length\u0026\u0026R(),I=0,C=Q.length;I\u003cC;I++)S=Q[I],M\u003eS.width\u0026\u0026(B=M-S.width,h===\"right\"?S=i({x:B},S):h===\"center\"\u0026\u0026(S=i({x:B/2},S))),w=w.concat(S.segments);return w};e.exports=r}}),gpi=yt({\"node_modules/@jscad/modeling/src/text/index.js\"(t,e){e.exports={vectorChar:drn(),vectorText:upi()}}}),MX=yt({\"node_modules/@jscad/modeling/src/utils/areAllShapesTheSameType.js\"(t,e){var n=Ya(),o=Ta(),i=Au(),r=s=\u003e{let a;for(const A of s){let c=0;if(n.isA(A)\u0026\u0026(c=1),o.isA(A)\u0026\u0026(c=2),i.isA(A)\u0026\u0026(c=3),a\u0026\u0026c!==a)return!1;a=c}return!0};e.exports=r}}),dpi=yt({\"node_modules/@jscad/modeling/src/utils/degToRad.js\"(t,e){var n=o=\u003eo*.017453292519943295;e.exports=n}}),hrn=yt({\"node_modules/@jscad/modeling/src/utils/fnNumberSort.js\"(t,e){var n=(o,i)=\u003eo-i;e.exports=n}}),hpi=yt({\"node_modules/@jscad/modeling/src/utils/insertSorted.js\"(t,e){var n=(o,i,r)=\u003e{let s=0,a=o.length;for(;a\u003es;){const A=Math.floor((s+a)/2),c=o[A];r(i,c)\u003e0?s=A+1:a=A}o.splice(s,0,i)};e.exports=n}}),ppi=yt({\"node_modules/@jscad/modeling/src/utils/radiusToSegments.js\"(t,e){var{TAU:n}=mc(),o=(i,r,s)=\u003e{const a=r\u003e0?i*n/r:0,A=s\u003e0?n/s:0;return Math.ceil(Math.max(a,A,4))};e.exports=o}}),mpi=yt({\"node_modules/@jscad/modeling/src/utils/radToDeg.js\"(t,e){var n=o=\u003eo*57.29577951308232;e.exports=n}}),prn=yt({\"node_modules/@jscad/modeling/src/utils/index.js\"(t,e){e.exports={areAllShapesTheSameType:MX(),degToRad:dpi(),flatten:ga(),fnNumberSort:hrn(),insertSorted:hpi(),radiusToSegments:ppi(),radToDeg:mpi()}}}),vVe=yt({\"node_modules/@jscad/modeling/src/operations/booleans/fromFakePolygons.js\"(t,e){var n=_A(),o=Ya(),i=(s,a)=\u003e{if(a.vertices.length\u003c4)return null;const A=[],c=a.vertices.filter((g,h)=\u003eg[2]\u003e0?(A.push(h),!0):!1);if(c.length!==2)throw new Error(\"Assertion failed: fromFakePolygon: not enough points found\");const l=c.map(g=\u003e{const h=Math.round(g[0]/s)*s+0,d=Math.round(g[1]/s)*s+0;return n.fromValues(h,d)});if(n.equals(l[0],l[1]))return null;const u=A[1]-A[0];if(u===1||u===3)u===1\u0026\u0026l.reverse();else throw new Error(\"Assertion failed: fromFakePolygon: unknown index ordering\");return l},r=(s,a)=\u003e{const A=a.map(c=\u003ei(s,c)).filter(c=\u003ec!==null);return o.create(A)};e.exports=r}}),wVe=yt({\"node_modules/@jscad/modeling/src/operations/booleans/to3DWalls.js\"(t,e){var n=$r(),o=Ya(),i=Ta(),r=XA(),s=(A,c,l)=\u003e{const u=[n.fromVec2(n.create(),l[0],A),n.fromVec2(n.create(),l[1],A),n.fromVec2(n.create(),l[1],c),n.fromVec2(n.create(),l[0],c)];return r.create(u)},a=(A,c)=\u003e{const u=o.toSides(c).map(h=\u003es(A.z0,A.z1,h));return i.create(u)};e.exports=a}}),_pi=yt({\"node_modules/@jscad/modeling/src/maths/OrthoNormalBasis.js\"(t,e){var n=Du(),o=_A(),i=$r(),r=function(s,a){arguments.length\u003c2\u0026\u0026(a=i.orthogonal(i.create(),s)),this.v=i.normalize(i.create(),i.cross(i.create(),s,a)),this.u=i.cross(i.create(),this.v,s),this.plane=s,this.planeorigin=i.scale(i.create(),s,s[3])};r.prototype={getProjectionMatrix:function(){return n.fromValues(this.u[0],this.v[0],this.plane[0],0,this.u[1],this.v[1],this.plane[1],0,this.u[2],this.v[2],this.plane[2],0,0,0,-this.plane[3],1)},getInverseProjectionMatrix:function(){const s=i.scale(i.create(),this.plane,this.plane[3]);return n.fromValues(this.u[0],this.u[1],this.u[2],0,this.v[0],this.v[1],this.v[2],0,this.plane[0],this.plane[1],this.plane[2],0,s[0],s[1],s[2],1)},to2D:function(s){return o.fromValues(i.dot(s,this.u),i.dot(s,this.v))},to3D:function(s){const a=i.scale(i.create(),this.u,s[0]),A=i.scale(i.create(),this.v,s[1]),c=i.add(a,a,this.planeorigin);return i.add(A,A,c)}},e.exports=r}}),fpi=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/reTesselateCoplanarPolygons.js\"(t,e){var{EPS:n}=mc(),o=EVe(),i=_A(),r=_pi(),s=Win(),{insertSorted:a,fnNumberSort:A}=prn(),c=XA(),l=u=\u003e{if(u.length\u003c2)return u;const g=[],h=u.length,d=c.plane(u[0]),p=new r(d),m=[],_=[],f=new Map,I=new Map,C=new Map,y=10/n;for(let S=0;S\u003ch;S++){const Q=u[S];let w=[],M=Q.vertices.length,k=-1;if(M\u003e0){let R,F;for(let O=0;O\u003cM;O++){let U=p.to2D(Q.vertices[O]);const Y=Math.floor(U[1]*y);let W;C.has(Y)?W=C.get(Y):C.has(Y+1)?W=C.get(Y+1):C.has(Y-1)?W=C.get(Y-1):(W=U[1],C.set(Y,U[1])),U=i.fromValues(U[0],W),w.push(U);const te=U[1];(O===0||te\u003cR)\u0026\u0026(R=te,k=O),(O===0||te\u003eF)\u0026\u0026(F=te);let j=I.get(te);j||(j={},I.set(te,j)),j[S]=!0}if(R\u003e=F)w=[],M=0,k=-1;else{let O=f.get(R);O||(O=[],f.set(R,O)),O.push(S)}}w.reverse(),k=M-k-1,m.push(w),_.push(k)}const x=[];I.forEach((S,Q)=\u003ex.push(Q)),x.sort(A);let E=[],B=[];for(let S=0;S\u003cx.length;S++){const Q=[],w=x[S],M=I.get(w);let k=0;for(let F=0;F\u003cE.length;++F){const O=E[F],U=O.polygonindex;if(M[U]){const Y=m[U],W=Y.length;let te=O.leftvertexindex,j=O.rightvertexindex;for(;;){let oe=te+1;if(oe\u003e=W\u0026\u0026(oe=0),Y[oe][1]!==w)break;te=oe}let J=j-1;if(J\u003c0\u0026\u0026(J=W-1),Y[J][1]===w\u0026\u0026(j=J),te!==O.leftvertexindex\u0026\u0026te===j)O._remove=!0,k++;else{O.leftvertexindex=te,O.rightvertexindex=j,O.topleft=Y[te],O.topright=Y[j];let oe=te+1;oe\u003e=W\u0026\u0026(oe=0),O.bottomleft=Y[oe];let ie=j-1;ie\u003c0\u0026\u0026(ie=W-1),O.bottomright=Y[ie]}}}k\u003e0\u0026\u0026(E=E.filter(F=\u003e!F._remove));let R;if(S\u003e=x.length-1)E=[],R=null;else{R=Number(x[S+1]);const F=.5*(w+R),O=f.get(w);for(const U in O){const Y=O[U],W=m[Y],te=W.length,j=_[Y];let J=j;for(;;){let ge=J+1;if(ge\u003e=te\u0026\u0026(ge=0),W[ge][1]!==w||ge===j)break;J=ge}let oe=j;for(;;){let ge=oe-1;if(ge\u003c0\u0026\u0026(ge=te-1),W[ge][1]!==w||ge===J)break;oe=ge}let ie=J+1;ie\u003e=te\u0026\u0026(ie=0);let ne=oe-1;ne\u003c0\u0026\u0026(ne=te-1);const le={polygonindex:Y,leftvertexindex:J,rightvertexindex:oe,topleft:W[J],topright:W[oe],bottomleft:W[ie],bottomright:W[ne]};a(E,le,(ge,_e)=\u003e{const ue=s(ge.topleft,ge.bottomleft,F),fe=s(_e.topleft,_e.bottomleft,F);return ue\u003efe?1:ue\u003cfe?-1:0})}}for(const F in E){const O=E[F];let U=s(O.topleft,O.bottomleft,w);const Y=i.fromValues(U,w);U=s(O.topright,O.bottomright,w);const W=i.fromValues(U,w);U=s(O.topleft,O.bottomleft,R);const te=i.fromValues(U,R);U=s(O.topright,O.bottomright,R);const j=i.fromValues(U,R),J={topleft:Y,topright:W,bottomleft:te,bottomright:j,leftline:o.fromPoints(o.create(),Y,te),rightline:o.fromPoints(o.create(),j,W)};if(Q.length\u003e0){const oe=Q[Q.length-1],ie=i.distance(J.topleft,oe.topright),ne=i.distance(J.bottomleft,oe.bottomright);ie\u003cn\u0026\u0026ne\u003cn\u0026\u0026(J.topleft=oe.topleft,J.leftline=oe.leftline,J.bottomleft=oe.bottomleft,Q.splice(Q.length-1,1))}Q.push(J)}if(S\u003e0){const F=new Set,O=new Set;for(let U=0;U\u003cQ.length;U++){const Y=Q[U];for(let W=0;W\u003cB.length;W++)if(!O.has(W)){const te=B[W];if(i.distance(te.bottomleft,Y.topleft)\u003cn\u0026\u0026i.distance(te.bottomright,Y.topright)\u003cn){O.add(W);const j=o.direction(Y.leftline),J=o.direction(te.leftline),oe=j[0]-J[0],ie=o.direction(Y.rightline),ne=o.direction(te.rightline),le=ie[0]-ne[0],ge=Math.abs(oe)\u003cn,_e=Math.abs(le)\u003cn,ue=ge||oe\u003e=0,fe=_e||le\u003e=0;ue\u0026\u0026fe\u0026\u0026(Y.outpolygon=te.outpolygon,Y.leftlinecontinues=ge,Y.rightlinecontinues=_e,F.add(W));break}}}for(let U=0;U\u003cB.length;U++)if(!F.has(U)){const Y=B[U];Y.outpolygon.rightpoints.push(Y.bottomright),i.distance(Y.bottomright,Y.bottomleft)\u003en\u0026\u0026Y.outpolygon.leftpoints.push(Y.bottomleft),Y.outpolygon.leftpoints.reverse();const te=Y.outpolygon.rightpoints.concat(Y.outpolygon.leftpoints).map(J=\u003ep.to3D(J)),j=c.fromPointsAndPlane(te,d);j.vertices.length\u0026\u0026g.push(j)}}for(let F=0;F\u003cQ.length;F++){const O=Q[F];O.outpolygon?(O.leftlinecontinues||O.outpolygon.leftpoints.push(O.topleft),O.rightlinecontinues||O.outpolygon.rightpoints.push(O.topright)):(O.outpolygon={leftpoints:[],rightpoints:[]},O.outpolygon.leftpoints.push(O.topleft),i.distance(O.topleft,O.topright)\u003en\u0026\u0026O.outpolygon.rightpoints.push(O.topright))}B=Q}return g};e.exports=l}}),DX=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/retessellate.js\"(t,e){var n=Ta(),o=XA(),{NEPS:i}=mc(),r=fpi(),s=c=\u003e{if(c.isRetesselated)return c;const l=n.toPolygons(c).map((d,p)=\u003e({vertices:d.vertices,plane:o.plane(d),index:p})),u=a(l),g=[];u.forEach(d=\u003e{if(Array.isArray(d)){const p=r(d);for(let m=0;m\u003cp.length;m++)g.push(p[m])}else g.push(d)});const h=n.create(g);return h.isRetesselated=!0,h},a=c=\u003e{let l=[c];const u=[];for(let h=3;h\u003e=0;h--){const d=[],p=h===3?15e-9:i;l.forEach(m=\u003e{m.sort(A(h,p));let _=0;for(let f=1;f\u003cm.length;f++)m[f].plane[h]-m[_].plane[h]\u003ep\u0026\u0026(f-_===1?u.push(m[_]):d.push(m.slice(_,f)),_=f);m.length-_===1?u.push(m[_]):d.push(m.slice(_))}),l=d}const g=[];return l.forEach(h=\u003e{h[0]\u0026\u0026(g[h[0].index]=h)}),u.forEach(h=\u003e{g[h.index]=h}),g},A=(c,l)=\u003e(u,g)=\u003eu.plane[c]-g.plane[c]\u003el?1:g.plane[c]-u.plane[c]\u003el?-1:0;e.exports=s}}),PVe=yt({\"node_modules/@jscad/modeling/src/operations/booleans/mayOverlap.js\"(t,e){var{EPS:n}=mc(),o=oT(),i=(r,s)=\u003e{if(r.polygons.length===0||s.polygons.length===0)return!1;const a=o(r),A=a[0],c=a[1],l=o(s),u=l[0],g=l[1];return!(u[0]-c[0]\u003en||A[0]-g[0]\u003en||u[1]-c[1]\u003en||A[1]-g[1]\u003en||u[2]-c[2]\u003en||A[2]-g[2]\u003en)};e.exports=i}}),Ipi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/trees/Node.js\"(t,e){var n=S6(),o=XA(),i=class bit{constructor(s){this.plane=null,this.front=null,this.back=null,this.polygontreenodes=[],this.parent=s}invert(){const s=[this];let a;for(let A=0;A\u003cs.length;A++){a=s[A],a.plane\u0026\u0026(a.plane=n.flip(n.create(),a.plane)),a.front\u0026\u0026s.push(a.front),a.back\u0026\u0026s.push(a.back);const c=a.front;a.front=a.back,a.back=c}}clipPolygons(s,a){let A={node:this,polygontreenodes:s},c;const l=[];do{if(c=A.node,s=A.polygontreenodes,c.plane){const u=c.plane,g=[],h=[],d=a?g:h,p=s.length;for(let _=0;_\u003cp;_++){const f=s[_];f.isRemoved()||f.splitByPlane(u,d,g,h,g)}c.front\u0026\u0026h.length\u003e0\u0026\u0026l.push({node:c.front,polygontreenodes:h});const m=g.length;if(c.back\u0026\u0026m\u003e0)l.push({node:c.back,polygontreenodes:g});else for(let _=0;_\u003cm;_++)g[_].remove()}A=l.pop()}while(A!==void 0)}clipTo(s,a){let A=this;const c=[];do A.polygontreenodes.length\u003e0\u0026\u0026s.rootnode.clipPolygons(A.polygontreenodes,a),A.front\u0026\u0026c.push(A.front),A.back\u0026\u0026c.push(A.back),A=c.pop();while(A!==void 0)}addPolygonTreeNodes(s){let a={node:this,polygontreenodes:s};const A=[];do{const c=a.node,l=a.polygontreenodes;if(l.length===0){a=A.pop();continue}if(!c.plane){let d=0;d=Math.floor(l.length/2);const p=l[d].getPolygon();c.plane=o.plane(p)}const u=[],g=[],h=l.length;for(let d=0;d\u003ch;++d)l[d].splitByPlane(c.plane,c.polygontreenodes,g,u,g);u.length\u003e0\u0026\u0026(c.front||(c.front=new bit(c)),h===u.length\u0026\u0026g.length===0?c.front.polygontreenodes=u:A.push({node:c.front,polygontreenodes:u})),g.length\u003e0\u0026\u0026(c.back||(c.back=new bit(c)),h===g.length\u0026\u0026u.length===0?c.back.polygontreenodes=g:A.push({node:c.back,polygontreenodes:g})),a=A.pop()}while(a!==void 0)}};e.exports=i}}),Cpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/trees/splitLineSegmentByPlane.js\"(t,e){var n=$r(),o=(i,r,s)=\u003e{const a=n.subtract(n.create(),s,r);let A=(i[3]-n.dot(i,r))/n.dot(i,a);return Number.isNaN(A)\u0026\u0026(A=0),A\u003e1\u0026\u0026(A=1),A\u003c0\u0026\u0026(A=0),n.scale(a,a,A),n.add(a,r,a),a};e.exports=o}}),ypi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/trees/splitPolygonByPlane.js\"(t,e){var{EPS:n}=mc(),o=S6(),i=$r(),r=XA(),s=Cpi(),a=n*n,A=l=\u003e{const u=[];let g=l[l.length-1];for(let h=0;h\u003cl.length;h++){const d=l[h];i.squaredDistance(d,g)\u003e=a\u0026\u0026u.push(d),g=d}return u},c=(l,u)=\u003e{const g={type:null,front:null,back:null},h=u.vertices,d=h.length,p=r.plane(u);if(o.equals(p,l))g.type=0;else{let m=!1,_=!1;const f=[],I=-n;for(let C=0;C\u003cd;C++){const y=i.dot(l,h[C])-l[3],x=y\u003cI;f.push(x),y\u003en\u0026\u0026(m=!0),y\u003cI\u0026\u0026(_=!0)}if(!m\u0026\u0026!_){const C=i.dot(l,p);g.type=C\u003e=0?0:1}else if(!_)g.type=2;else if(!m)g.type=3;else{g.type=4;const C=[],y=[];let x=f[0];for(let E=0;E\u003cd;E++){const B=h[E];let S=E+1;S\u003e=d\u0026\u0026(S=0);const Q=f[S];if(x===Q)x?y.push(B):C.push(B);else{const w=h[S],M=s(l,B,w);x?(y.push(B),y.push(M),C.push(M)):(C.push(B),C.push(M),y.push(M))}x=Q}if(C.length\u003e=3){const E=A(C);E.length\u003e=3\u0026\u0026(g.front=r.fromPointsAndPlane(E,p))}if(y.length\u003e=3){const E=A(y);E.length\u003e=3\u0026\u0026(g.back=r.fromPointsAndPlane(E,p))}}}return g};e.exports=c}}),xpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/trees/PolygonTreeNode.js\"(t,e){var{EPS:n}=mc(),o=$r(),i=XA(),r=ypi(),s=class C4n{constructor(A,c){this.parent=A,this.children=[],this.polygon=c,this.removed=!1}addPolygons(A){if(!this.isRootNode())throw new Error(\"Assertion failed\");const c=this;A.forEach(l=\u003e{c.addChild(l)})}remove(){this.removed||(this.removed=!0,this.polygon=null,this.parent.recursivelyInvalidatePolygon())}isRemoved(){return this.removed}isRootNode(){return!this.parent}invert(){if(!this.isRootNode())throw new Error(\"Assertion failed\");this.invertSub()}getPolygon(){if(!this.polygon)throw new Error(\"Assertion failed\");return this.polygon}getPolygons(A){if(this.isRootNode()\u0026\u0026this.children.length\u003e0){const p=[];for(let m=0;m\u003cthis.children.length;m++)this.children[m].removed||p.push(this.children[m]);this.children=p}let c=[this];const l=[c];let u,g,h,d;for(u=0;u\u003cl.length;++u)for(c=l[u],g=0,h=c.length;g\u003ch;g++)d=c[g],d.polygon?A.push(d.polygon):d.children.length\u003e0\u0026\u0026l.push(d.children)}splitByPlane(A,c,l,u,g){if(this.children.length){const h=[this.children];let d,p,m,_,f;for(d=0;d\u003ch.length;d++)for(f=h[d],p=0,m=f.length;p\u003cm;p++)_=f[p],_.children.length\u003e0?h.push(_.children):_._splitByPlane(A,c,l,u,g)}else this._splitByPlane(A,c,l,u,g)}_splitByPlane(A,c,l,u,g){const h=this.polygon;if(h){const d=i.measureBoundingSphere(h),p=d[3]+n,m=d,_=o.dot(A,m)-A[3];if(_\u003ep)u.push(this);else if(_\u003c-p)g.push(this);else{const f=r(A,h);switch(f.type){case 0:c.push(this);break;case 1:l.push(this);break;case 2:u.push(this);break;case 3:g.push(this);break;case 4:if(f.front){const I=this.addChild(f.front);u.push(I)}if(f.back){const I=this.addChild(f.back);g.push(I)}break}}}}addChild(A){const c=new C4n(this,A);return this.children.push(c),c}invertSub(){let A=[this];const c=[A];let l,u,g,h;for(l=0;l\u003cc.length;l++)for(A=c[l],u=0,g=A.length;u\u003cg;u++)h=A[u],h.polygon\u0026\u0026(h.polygon=i.invert(h.polygon)),h.children.length\u003e0\u0026\u0026c.push(h.children)}recursivelyInvalidatePolygon(){this.polygon=null,this.parent\u0026\u0026this.parent.recursivelyInvalidatePolygon()}clear(){let A=[this];const c=[A];for(let l=0;l\u003cc.length;++l){A=c[l];const u=A.length;for(let g=0;g\u003cu;g++){const h=A[g];h.polygon\u0026\u0026(h.polygon=null),h.parent\u0026\u0026(h.parent=null),h.children.length\u003e0\u0026\u0026c.push(h.children),h.children=[]}}}toString(){let A=\"\",c=[this];const l=[c];let u,g,h,d;for(u=0;u\u003cl.length;++u){c=l[u];const p=\" \".repeat(u);for(g=0,h=c.length;g\u003ch;g++)d=c[g],A+=`${p}PolygonTreeNode (${d.isRootNode()}): ${d.children.length}`,d.polygon?A+=`\n ${p}polygon: ${d.polygon.vertices}\n`:A+=`\n`,d.children.length\u003e0\u0026\u0026l.push(d.children)}return A}};e.exports=s}}),Epi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/trees/Tree.js\"(t,e){var n=Ipi(),o=xpi(),i=class{constructor(r){this.polygonTree=new o,this.rootnode=new n(null),r\u0026\u0026this.addPolygons(r)}invert(){this.polygonTree.invert(),this.rootnode.invert()}clipTo(r,s=!1){this.rootnode.clipTo(r,s)}allPolygons(){const r=[];return this.polygonTree.getPolygons(r),r}addPolygons(r){const s=new Array(r.length);for(let a=0;a\u003cr.length;a++)s[a]=this.polygonTree.addChild(r[a]);this.rootnode.addPolygonTreeNodes(s)}clear(){this.polygonTree.clear()}toString(){return\"Tree: \"+this.polygonTree.toString(\"\")}};e.exports=i}}),MVe=yt({\"node_modules/@jscad/modeling/src/operations/booleans/trees/index.js\"(t,e){e.exports={Tree:Epi()}}}),Bpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/intersectGeom3Sub.js\"(t,e){var n=Ta(),o=PVe(),{Tree:i}=MVe(),r=(s,a)=\u003e{if(!o(s,a))return n.create();const A=new i(n.toPolygons(s)),c=new i(n.toPolygons(a));A.invert(),c.clipTo(A),c.invert(),A.clipTo(c),c.clipTo(A),A.addPolygons(c.allPolygons()),A.invert();const l=A.allPolygons();return n.create(l)};e.exports=r}}),mrn=yt({\"node_modules/@jscad/modeling/src/operations/booleans/intersectGeom3.js\"(t,e){var n=ga(),o=DX(),i=Bpi(),r=(...s)=\u003e{s=n(s);let a=s.shift();return s.forEach(A=\u003e{a=i(a,A)}),a=o(a),a};e.exports=r}}),bpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/intersectGeom2.js\"(t,e){var n=ga(),o=Ta(),i=gP(),r=vVe(),s=wVe(),a=mrn(),A=(...c)=\u003e{c=n(c);const l=c.map(h=\u003es({z0:-1,z1:1},h)),u=a(l),g=i(u);return r(g,o.toPolygons(u))};e.exports=A}}),Spi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/intersect.js\"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=bpi(),a=mrn(),A=(...c)=\u003e{if(c=n(c),c.length===0)throw new Error(\"wrong number of arguments\");if(!o(c))throw new Error(\"only intersect of the types are supported\");const l=c[0];return i.isA(l)?s(c):r.isA(l)?a(c):l};e.exports=A}}),DVe=yt({\"node_modules/@jscad/modeling/src/operations/hulls/hullPoints3.js\"(t,e){var n=XA(),o=yin(),i=r=\u003eo(r,{skipTriangulation:!0}).map(A=\u003e{const c=A.map(l=\u003er[l]);return n.create(c)});e.exports=i}}),_rn=yt({\"node_modules/@jscad/modeling/src/operations/booleans/unionGeom3Sub.js\"(t,e){var n=Ta(),o=PVe(),{Tree:i}=MVe(),r=(a,A)=\u003e{if(!o(a,A))return s(a,A);const c=new i(n.toPolygons(a)),l=new i(n.toPolygons(A));c.clipTo(l,!1),l.clipTo(c),l.invert(),l.clipTo(c),l.invert();const u=c.allPolygons().concat(l.allPolygons());return n.create(u)},s=(a,A)=\u003e{let c=n.toPolygons(a);return c=c.concat(n.toPolygons(A)),n.create(c)};e.exports=r}}),NVe=yt({\"node_modules/@jscad/modeling/src/operations/booleans/unionGeom3.js\"(t,e){var n=ga(),o=DX(),i=_rn(),r=(...s)=\u003e{s=n(s);let a;for(a=1;a\u003cs.length;a+=2)s.push(i(s[a-1],s[a]));let A=s[a-1];return A=o(A),A};e.exports=r}}),frn=yt({\"node_modules/@jscad/modeling/src/operations/minkowski/minkowskiSum.js\"(t,e){var n=ga(),o=Ta(),i=XA(),r=DVe(),s=NVe(),a=(...h)=\u003e{if(h=n(h),h.length!==2)throw new Error(\"minkowskiSum requires exactly two geometries\");const[d,p]=h;if(!o.isA(d)||!o.isA(p))throw new Error(\"minkowskiSum requires geom3 geometries\");const m=o.isConvex(d),_=o.isConvex(p);if(m\u0026\u0026_)return u(d,p);if(!m\u0026\u0026_)return A(d,p);if(m\u0026\u0026!_)return A(p,d);throw new Error(\"minkowskiSum of two non-convex geometries is not yet supported\")},A=(h,d)=\u003e{const p=c(h);if(p.length===0)return o.create();const m=p.map(_=\u003eu(_,d));return m.length===1?m[0]:s(m)},c=h=\u003e{const d=o.toPolygons(h);if(d.length===0)return[];const p=[];for(let m=0;m\u003cd.length;m++){const _=d[m],f=_.vertices;let I=0,C=0,y=0;for(let M=0;M\u003cf.length;M++)I+=f[M][0],C+=f[M][1],y+=f[M][2];I/=f.length,C/=f.length,y/=f.length;const x=i.plane(_),E=x[0],B=x[1],S=x[2],Q=.1,w=[I-E*Q,C-B*Q,y-S*Q];for(let M=1;M\u003cf.length-1;M++){const k=f[0],R=f[M],F=f[M+1],O=l(w,k,R,F);p.push(o.create(O))}}return p},l=(h,d,p,m)=\u003e[i.create([h,p,d]),i.create([h,d,m]),i.create([d,p,m]),i.create([p,h,m])],u=(h,d)=\u003e{const p=g(h),m=g(d);if(p.length===0||m.length===0)return o.create();const _=[];for(let I=0;I\u003cp.length;I++){const C=p[I];for(let y=0;y\u003cm.length;y++){const x=m[y];_.push([C[0]+x[0],C[1]+x[1],C[2]+x[2]])}}const f=r(_);return o.create(f)},g=h=\u003e{const d=new Set,p=[],m=o.toPolygons(h);for(let _=0;_\u003cm.length;_++){const f=m[_].vertices;for(let I=0;I\u003cf.length;I++){const C=f[I],y=`${C[0]},${C[1]},${C[2]}`;d.has(y)||(d.add(y),p.push(C))}}return p};e.exports=a}}),Qpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/scissionGeom3.js\"(t,e){var n=$r(),o=gP(),i=Ta(),r=c=\u003ec.sort((l,u)=\u003el-u).filter((l,u,g)=\u003e!u||l!==g[u-1]),s=(c,l,u)=\u003e{const g=`${l}`,h=c.get(g);h===void 0?c.set(g,[u]):h.push(u)},a=(c,l)=\u003e{const u=`${l}`;return c.get(u)},A=c=\u003e{const l=o(c),u=i.toPolygons(c),g=u.length,h=new Map,d=n.create();u.forEach((I,C)=\u003e{I.vertices.forEach(y=\u003e{s(h,n.snap(d,y,l),C)})});const p=u.map(I=\u003e{let C=[];return I.vertices.forEach(y=\u003e{C=C.concat(a(h,n.snap(d,y,l)))}),{e:1,d:r(C)}});h.clear();let m=0;const _=p.length;for(let I=0;I\u003c_;I++){const C=p[I];if(C.e\u003e0){const y=new Array(g);y[I]=!0;do m=0,y.forEach((x,E)=\u003e{const B=p[E];if(B.e\u003e0){B.e=-1;for(let S=0;S\u003cB.d.length;S++)y[B.d[S]]=!0;m++}});while(m\u003e0);C.indexes=y}}const f=[];for(let I=0;I\u003c_;I++)if(p[I].indexes){const C=[];p[I].indexes.forEach((y,x)=\u003eC.push(u[x])),f.push(i.create(C))}return f};e.exports=A}}),vpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/scission.js\"(t,e){var n=ga(),o=Ta(),i=Qpi(),r=(...s)=\u003e{if(s=n(s),s.length===0)throw new Error(\"wrong number of arguments\");const a=s.map(A=\u003eo.isA(A)?i(A):A);return a.length===1?a[0]:a};e.exports=r}}),wpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/subtractGeom3Sub.js\"(t,e){var n=Ta(),o=PVe(),{Tree:i}=MVe(),r=(s,a)=\u003e{if(!o(s,a))return n.clone(s);const A=new i(n.toPolygons(s)),c=new i(n.toPolygons(a));A.invert(),A.clipTo(c),c.clipTo(A,!0),A.addPolygons(c.allPolygons()),A.invert();const l=A.allPolygons();return n.create(l)};e.exports=r}}),Irn=yt({\"node_modules/@jscad/modeling/src/operations/booleans/subtractGeom3.js\"(t,e){var n=ga(),o=DX(),i=wpi(),r=(...s)=\u003e{s=n(s);let a=s.shift();return s.forEach(A=\u003e{a=i(a,A)}),a=o(a),a};e.exports=r}}),Ppi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/subtractGeom2.js\"(t,e){var n=ga(),o=Ta(),i=gP(),r=vVe(),s=wVe(),a=Irn(),A=(...c)=\u003e{c=n(c);const l=c.map(h=\u003es({z0:-1,z1:1},h)),u=a(l),g=i(u);return r(g,o.toPolygons(u))};e.exports=A}}),Mpi=yt({\"node_modules/@jscad/modeling/src/operations/booleans/subtract.js\"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=Ppi(),a=Irn(),A=(...c)=\u003e{if(c=n(c),c.length===0)throw new Error(\"wrong number of arguments\");if(!o(c))throw new Error(\"only subtract of the types are supported\");const l=c[0];return i.isA(l)?s(c):r.isA(l)?a(c):l};e.exports=A}}),Crn=yt({\"node_modules/@jscad/modeling/src/operations/booleans/unionGeom2.js\"(t,e){var n=ga(),o=Ta(),i=gP(),r=vVe(),s=wVe(),a=NVe(),A=(...c)=\u003e{c=n(c);const l=c.map(h=\u003es({z0:-1,z1:1},h)),u=a(l),g=i(u);return r(g,o.toPolygons(u))};e.exports=A}}),RVe=yt({\"node_modules/@jscad/modeling/src/operations/booleans/union.js\"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=Crn(),a=NVe(),A=(...c)=\u003e{if(c=n(c),c.length===0)throw new Error(\"wrong number of arguments\");if(!o(c))throw new Error(\"only unions of the same type are supported\");const l=c[0];return i.isA(l)?s(c):r.isA(l)?a(c):l};e.exports=A}}),NX=yt({\"node_modules/@jscad/modeling/src/operations/booleans/index.js\"(t,e){e.exports={intersect:Spi(),minkowski:frn(),scission:vpi(),subtract:Mpi(),union:RVe()}}}),ipe=yt({\"node_modules/@jscad/modeling/src/operations/expansions/offsetFromPoints.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=jin(),r=EVe(),s=_A(),a=tpe(),A=(c,l)=\u003e{const u={delta:1,corners:\"edge\",closed:!1,segments:16};let{delta:g,corners:h,closed:d,segments:p}=Object.assign({},u,c);if(Math.abs(g)\u003cn)return l;let m=c.closed?a(l):1;m===0\u0026\u0026(m=1);const _=m\u003e0\u0026\u0026g\u003e=0||m\u003c0\u0026\u0026g\u003c0;g=Math.abs(g);let f=null,I=[];const C=[],y=s.create(),x=l.length;for(let E=0;E\u003cx;E++){const B=(E+1)%x,S=l[E],Q=l[B];_?s.subtract(y,S,Q):s.subtract(y,Q,S),s.normal(y,y),s.normalize(y,y),s.scale(y,y,g);const w=s.add(s.create(),S,y),M=s.add(s.create(),Q,y),k=[w,M];if(f!=null\u0026\u0026(d||!d\u0026\u0026B!==0)){const R=i(f[0],f[1],k[0],k[1]);R?(I.pop(),k[0]=R):C.push({c:S,s0:f,s1:k})}f=[w,M],!(B===0\u0026\u0026!d)\u0026\u0026(I.push(k[0]),I.push(k[1]))}if(d\u0026\u0026f!=null){const E=I[0],B=I[1],S=i(f[0],f[1],E,B);if(S)I[0]=S,I.pop();else{const Q=l[0],w=[E,B];C.push({c:Q,s0:f,s1:w})}}if(h===\"edge\"){const E=new Map;I.forEach((Q,w)=\u003eE.set(Q,w));const B=r.create(),S=r.create();C.forEach(Q=\u003e{r.fromPoints(B,Q.s0[0],Q.s0[1]),r.fromPoints(S,Q.s1[0],Q.s1[1]);const w=r.intersectPointOfLines(B,S);if(Number.isFinite(w[0])\u0026\u0026Number.isFinite(w[1])){const M=Q.s0[1],k=E.get(M);I[k]=w,I[(k+1)%I.length]=void 0}else{const M=Q.s1[0],k=E.get(M);I[k]=void 0}}),I=I.filter(Q=\u003eQ!==void 0)}if(h===\"round\"){let E=Math.floor(p/4);const B=s.create();C.forEach(S=\u003e{let Q=s.angle(s.subtract(B,S.s1[0],S.c));if(Q-=s.angle(s.subtract(B,S.s0[1],S.c)),_\u0026\u0026Q\u003c0\u0026\u0026(Q=Q+Math.PI,Q\u003c0\u0026\u0026(Q=Q+Math.PI)),!_\u0026\u0026Q\u003e0\u0026\u0026(Q=Q-Math.PI,Q\u003e0\u0026\u0026(Q=Q-Math.PI)),Q!==0){E=Math.floor(p*(Math.abs(Q)/o));const w=Q/E,M=s.angle(s.subtract(B,S.s0[1],S.c)),k=[];for(let R=1;R\u003cE;R++){const F=M+w*R,O=s.fromAngleRadians(s.create(),F);s.scale(O,O,g),s.add(O,O,S.c),k.push(O)}if(k.length\u003e0){const R=S.s0[1];let F=I.findIndex(O=\u003es.equals(R,O));F=(F+1)%I.length,I.splice(F,0,...k)}}else{const w=S.s1[0],M=I.findIndex(k=\u003es.equals(w,k));I.splice(M,1)}})}return I};e.exports=A}}),Dpi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/expandGeom2.js\"(t,e){var n=Ya(),o=ipe(),i=(r,s)=\u003e{const a={delta:1,corners:\"edge\",segments:16},{delta:A,corners:c,segments:l}=Object.assign({},a,r);if(!(c===\"edge\"||c===\"chamfer\"||c===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');const h=n.toOutlines(s).map(d=\u003e(r={delta:A,corners:c,closed:!0,segments:l},o(r,d))).reduce((d,p)=\u003ed.concat(n.toSides(n.fromPoints(p))),[]);return n.create(h)};e.exports=i}}),Npi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/extrudePolygon.js\"(t,e){var n=Du(),o=$r(),i=Ta(),r=XA(),s=(a,A)=\u003e{o.dot(r.plane(A),a)\u003e0\u0026\u0026(A=r.invert(A));const l=[A],u=r.transform(n.fromTranslation(n.create(),a),A),g=A.vertices.length;for(let h=0;h\u003cg;h++){const d=h\u003cg-1?h+1:0,p=r.create([A.vertices[h],u.vertices[h],u.vertices[d],A.vertices[d]]);l.push(p)}return l.push(r.invert(u)),i.create(l)};e.exports=s}}),Rpi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/expandShell.js\"(t,e){var{EPS:n,TAU:o}=mc(),i=Du(),r=$r(),s=hrn(),a=Ta(),A=XA(),c=arn(),l=DX(),u=_rn(),g=Npi(),h=(_,f,I)=\u003e{const C=f.toString();if(_.has(C))_.get(C)[1].push(I);else{const y=[f,[I]];_.set(C,y)}},d=(_,f,I)=\u003e{const C=f[0].toString(),y=f[1].toString(),x=C\u003cy?`${C},${y}`:`${y},${C}`;if(_.has(x))_.get(x)[1].push(I);else{const E=[f,[I]];_.set(x,E)}},p=(_,f)=\u003e{_.findIndex(C=\u003eC===f)\u003c0\u0026\u0026_.push(f)},m=(_,f)=\u003e{const I={delta:1,segments:12},{delta:C,segments:y}=Object.assign({},I,_);let x=a.create();const E=new Map,B=new Map,S=r.create(),Q=r.create();return a.toPolygons(f).forEach((M,k)=\u003e{const R=r.scale(r.create(),A.plane(M),2*C),F=A.transform(i.fromTranslation(i.create(),r.scale(r.create(),R,-.5)),M),O=g(R,F);x=u(x,O);const U=M.vertices;for(let Y=0;Y\u003cU.length;Y++){h(E,U[Y],A.plane(M));const W=(Y+1)%U.length,te=[U[Y],U[W]];d(B,te,A.plane(M))}}),B.forEach(M=\u003e{const k=M[0],R=M[1],F=k[0],O=k[1],U=r.subtract(r.create(),O,F);r.normalize(U,U);const Y=R[0],W=r.cross(r.create(),Y,U);let te=[];for(let _e=0;_e\u003cy;_e++)p(te,_e*o/y);for(let _e=0,ue=R.length;_e\u003cue;_e++){const fe=R[_e],pe=r.dot(W,fe),ye=r.dot(Y,fe);let Me=Math.atan2(pe,ye);Me\u003c0\u0026\u0026(Me+=o),p(te,Me),Me=Math.atan2(-pe,-ye),Me\u003c0\u0026\u0026(Me+=o),p(te,Me)}te=te.sort(s);const j=te.length;let J,oe;const ie=[],ne=[],le=[];for(let _e=-1;_e\u003cj;_e++){const ue=te[_e\u003c0?_e+j:_e],fe=Math.sin(ue),pe=Math.cos(ue);r.scale(S,Y,pe*C),r.scale(Q,W,fe*C),r.add(S,S,Q);const ye=r.add(r.create(),F,S),Me=r.add(r.create(),O,S);let ve=!1;if(_e\u003e=0\u0026\u0026r.distance(ye,J)\u003cn\u0026\u0026(ve=!0),!ve){if(_e\u003e=0){ie.push(ye),ne.push(Me);const he=[oe,Me,ye,J],Qe=A.create(he);le.push(Qe)}J=ye,oe=Me}}ne.reverse(),le.push(A.create(ie)),le.push(A.create(ne));const ge=a.create(le);x=u(x,ge)}),E.forEach(M=\u003e{const k=M[0],R=M[1],F=R[0];let O=null,U=0;for(let j=1;j\u003cR.length;j++){const J=R[j],oe=r.cross(S,F,J),ie=r.length(oe);ie\u003e.05\u0026\u0026ie\u003eU\u0026\u0026(U=ie,O=J)}O||(O=r.orthogonal(S,F));const Y=r.cross(S,F,O);r.normalize(Y,Y);const W=r.cross(Q,Y,F),te=c({center:[k[0],k[1],k[2]],radius:C,segments:y,axes:[F,Y,W]});x=u(x,te)}),l(x)};e.exports=m}}),Tpi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/expandGeom3.js\"(t,e){var n=Ta(),o=RVe(),i=Rpi(),r=(s,a)=\u003e{const A={delta:1,corners:\"round\",segments:12},{delta:c,corners:l,segments:u}=Object.assign({},A,s);if(l!==\"round\")throw new Error('corners must be \"round\" for 3D geometries');if(n.toPolygons(a).length===0)throw new Error(\"the given geometry cannot be empty\");s={delta:c,corners:l,segments:u};const h=i(s,a);return o(a,h)};e.exports=r}}),kpi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/expandPath2.js\"(t,e){var n=tpe(),o=_A(),i=Ya(),r=Au(),s=ipe(),a=l=\u003e{let{external:u,internal:g}=l;n(u)\u003c0?u=u.reverse():g=g.reverse();const h=r.fromPoints({closed:!0},u),d=r.fromPoints({closed:!0},g),p=i.toSides(i.fromPoints(r.toPoints(h))),m=i.toSides(i.fromPoints(r.toPoints(d)));return p.push(...m),i.create(p)},A=(l,u,g,h)=\u003e{const{points:d,external:p,internal:m}=l,_=Math.floor(u/2),f=[],I=[];if(g===\"round\"\u0026\u0026_\u003e0){const y=Math.PI/_,x=d[d.length-1],E=o.angle(o.subtract(o.create(),p[p.length-1],x)),B=d[0],S=o.angle(o.subtract(o.create(),m[0],B));for(let Q=1;Q\u003c_;Q++){let w=E+y*Q,M=o.fromAngleRadians(o.create(),w);o.scale(M,M,h),o.add(M,M,x),f.push(M),w=S+y*Q,M=o.fromAngleRadians(o.create(),w),o.scale(M,M,h),o.add(M,M,B),I.push(M)}}const C=[];return C.push(...p,...f,...m.reverse(),...I),i.fromPoints(C)},c=(l,u)=\u003e{l=Object.assign({},{delta:1,corners:\"edge\",segments:16},l);const{delta:h,corners:d,segments:p}=l;if(h\u003c=0)throw new Error(\"the given delta must be positive for paths\");if(!(d===\"edge\"||d===\"chamfer\"||d===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');const m=u.isClosed,_=r.toPoints(u);if(_.length===0)throw new Error(\"the given geometry cannot be empty\");const f={points:_,external:s({delta:h,corners:d,segments:p,closed:m},_),internal:s({delta:-h,corners:d,segments:p,closed:m},_)};return u.isClosed?a(f):A(f,p,d,h)};e.exports=c}}),TVe=yt({\"node_modules/@jscad/modeling/src/operations/expansions/expand.js\"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=Dpi(),a=Tpi(),A=kpi(),c=(l,...u)=\u003e{if(u=n(u),u.length===0)throw new Error(\"wrong number of arguments\");const g=u.map(h=\u003er.isA(h)?A(l,h):o.isA(h)?s(l,h):i.isA(h)?a(l,h):h);return g.length===1?g[0]:g};e.exports=c}}),Fpi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/offsetGeom2.js\"(t,e){var n=Ya(),o=fVe(),i=ipe(),r=(s,a)=\u003e{const A={delta:1,corners:\"edge\",segments:0},{delta:c,corners:l,segments:u}=Object.assign({},A,s);if(!(l===\"edge\"||l===\"chamfer\"||l===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');const g=n.toOutlines(a),d=g.map(p=\u003e(s={delta:g.reduce((f,I)=\u003ef+o.arePointsInside(p,o.create(I)),0)%2===0?c:-c,corners:l,closed:!0,segments:u},i(s,p))).reduce((p,m)=\u003ep.concat(n.toSides(n.fromPoints(m))),[]);return n.create(d)};e.exports=r}}),Lpi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/offsetPath2.js\"(t,e){var n=Au(),o=ipe(),i=(r,s)=\u003e{const a={delta:1,corners:\"edge\",closed:s.isClosed,segments:16},{delta:A,corners:c,closed:l,segments:u}=Object.assign({},a,r);if(!(c===\"edge\"||c===\"chamfer\"||c===\"round\"))throw new Error('corners must be \"edge\", \"chamfer\", or \"round\"');r={delta:A,corners:c,closed:l,segments:u};const g=o(r,n.toPoints(s));return n.fromPoints({closed:l},g)};e.exports=i}}),Hpi=yt({\"node_modules/@jscad/modeling/src/operations/expansions/offset.js\"(t,e){var n=ga(),o=Ya(),i=Au(),r=Fpi(),s=Lpi(),a=(A,...c)=\u003e{if(c=n(c),c.length===0)throw new Error(\"wrong number of arguments\");const l=c.map(u=\u003ei.isA(u)?s(A,u):o.isA(u)?r(A,u):u);return l.length===1?l[0]:l};e.exports=a}}),yrn=yt({\"node_modules/@jscad/modeling/src/operations/expansions/index.js\"(t,e){e.exports={expand:TVe(),offset:Hpi()}}}),rpe=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeLinearGeom2.js\"(t,e){var n=Du(),o=$r(),i=Ya(),r=DY(),s=ope(),a=(A,c)=\u003e{const l={offset:[0,0,1],twistAngle:0,twistSteps:12,repair:!0};let{offset:u,twistAngle:g,twistSteps:h,repair:d}=Object.assign({},l,A);if(h\u003c1)throw new Error(\"twistSteps must be 1 or more\");g===0\u0026\u0026(h=1);const p=o.clone(u),m=i.toSides(c);if(m.length===0)throw new Error(\"the given geometry cannot be empty\");const _=r.fromSides(m);p[2]\u003c0\u0026\u0026r.reverse(_,_);const f=n.create(),I=(C,y,x)=\u003e{const E=y/h*g,B=o.scale(o.create(),p,y/h);return n.multiply(f,n.fromZRotation(f,E),n.fromTranslation(n.create(),B)),r.transform(f,x)};return A={numberOfSlices:h+1,capStart:!0,capEnd:!0,repair:d,callback:I},s(A,_)};e.exports=a}}),Opi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeLinearPath2.js\"(t,e){var n=Ya(),o=Au(),i=rpe(),r=(s,a)=\u003e{if(!a.isClosed)throw new Error(\"extruded path must be closed\");const A=o.toPoints(a),c=n.fromPoints(A);return i(s,c)};e.exports=r}}),Gpi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeLinear.js\"(t,e){var n=ga(),o=Ya(),i=Au(),r=rpe(),s=Opi(),a=(A,...c)=\u003e{const l={height:1,twistAngle:0,twistSteps:1,repair:!0},{height:u,twistAngle:g,twistSteps:h,repair:d}=Object.assign({},l,A);if(c=n(c),c.length===0)throw new Error(\"wrong number of arguments\");A={offset:[0,0,u],twistAngle:g,twistSteps:h,repair:d};const p=c.map(m=\u003ei.isA(m)?s(A,m):o.isA(m)?r(A,m):m);return p.length===1?p[0]:p};e.exports=a}}),Ypi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRectangularPath2.js\"(t,e){var n=Au(),o=TVe(),i=rpe(),r=(s,a)=\u003e{const A={size:1,height:1},{size:c,height:l}=Object.assign({},A,s);if(s.delta=c,s.offset=[0,0,l],n.toPoints(a).length===0)throw new Error(\"the given geometry cannot be empty\");const g=o(s,a);return i(s,g)};e.exports=r}}),Upi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRectangularGeom2.js\"(t,e){var{area:n}=QX(),o=Ya(),i=Au(),r=TVe(),s=rpe(),a=(A,c)=\u003e{const l={size:1,height:1},{size:u,height:g}=Object.assign({},l,A);A.delta=u,A.offset=[0,0,g];const h=o.toOutlines(c);if(h.length===0)throw new Error(\"the given geometry cannot be empty\");const p=h.map(_=\u003e(n(_)\u003c0\u0026\u0026_.reverse(),r(A,i.fromPoints({closed:!0},_)))).reduce((_,f)=\u003e_.concat(o.toSides(f)),[]),m=o.create(p);return s(A,m)};e.exports=a}}),Kpi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeRectangular.js\"(t,e){var n=ga(),o=Ya(),i=Au(),r=Ypi(),s=Upi(),a=(A,...c)=\u003e{const l={size:1,height:1},{size:u,height:g}=Object.assign({},l,A);if(c=n(c),c.length===0)throw new Error(\"wrong number of arguments\");if(u\u003c=0)throw new Error(\"size must be positive\");if(g\u003c=0)throw new Error(\"height must be positive\");const h=c.map(d=\u003ei.isA(d)?r(A,d):o.isA(d)?s(A,d):d);return h.length===1?h[0]:h};e.exports=a}}),Vpi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/extrudeHelical.js\"(t,e){var{TAU:n}=mc(),o=Du(),i=Ya(),r=ope(),s=DY(),a=(A,c)=\u003e{const l={angle:n,startAngle:0,pitch:10,height:0,endOffset:0,segmentsPerRotation:32};let{angle:u,startAngle:g,pitch:h,height:d,endOffset:p,segmentsPerRotation:m}=Object.assign({},l,A);if(d!=0\u0026\u0026(h=d/(u/n)),m\u003c3)throw new Error(\"The number of segments per rotation needs to be at least 3.\");const f=i.toSides(c);if(f.length===0)throw new Error(\"The given geometry cannot be empty\");const I=f.filter(Q=\u003eQ[0][0]\u003e=0);let C=s.fromSides(f);I.length===0\u0026\u0026(C=s.reverse(C));const y=Math.round(m/n*Math.abs(u)),x=y\u003e=2?y:2,E=o.create(),B=o.create(),S=(Q,w,M)=\u003e{const k=g+u/x*w,R=p/x*w,F=(k-g)/n*h;return o.multiply(E,o.fromTranslation(o.create(),[R,0,F*Math.sign(u)]),o.fromXRotation(o.create(),-n/4*Math.sign(u))),o.multiply(B,o.fromZRotation(o.create(),k),E),s.transform(B,M)};return r({numberOfSlices:x+1,callback:S},C)};e.exports=a}}),zpi=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/project.js\"(t,e){var n=ga(),o=xVe(),i=S6(),r=Du(),s=Ya(),a=Ta(),A=XA(),c=gP(),l=Crn(),u=(h,d)=\u003e{const p=i.fromNormalAndPoint(i.create(),h.axis,h.origin);if(Number.isNaN(p[0])||Number.isNaN(p[1])||Number.isNaN(p[2])||Number.isNaN(p[3]))throw new Error(\"project: invalid axis or origin\");const m=c(d),_=m*m*Math.sqrt(3)/4;if(m===0)return s.create();const f=a.toPolygons(d);let I=[];for(let y=0;y\u003cf.length;y++){const x=f[y].vertices.map(S=\u003ei.projectionOfPoint(p,S)),E=A.create(x),B=A.plane(E);o(p,B)\u0026\u0026(A.measureArea(E)\u003c_||I.push(E))}if(!o(p,[0,0,1])){const y=r.fromVectorRotation(r.create(),p,[0,0,1]);I=I.map(x=\u003eA.transform(y,x))}I=I.sort((y,x)=\u003eA.measureArea(x)-A.measureArea(y));const C=I.map(y=\u003es.fromPoints(y.vertices));return l(C)},g=(h,...d)=\u003e{const p={axis:[0,0,1],origin:[0,0,0]},{axis:m,origin:_}=Object.assign({},p,h);if(d=n(d),d.length===0)throw new Error(\"wrong number of arguments\");h={axis:m,origin:_};const f=d.map(I=\u003ea.isA(I)?u(h,I):I);return f.length===1?f[0]:f};e.exports=g}}),RX=yt({\"node_modules/@jscad/modeling/src/operations/extrusions/index.js\"(t,e){e.exports={extrudeFromSlices:ope(),extrudeLinear:Gpi(),extrudeRectangular:Kpi(),extrudeRotate:urn(),extrudeHelical:Vpi(),project:zpi(),slice:DY()}}}),kVe=yt({\"node_modules/@jscad/modeling/src/operations/hulls/hullPoints2.js\"(t,e){var n=_A(),o=s=\u003e{let a=n.fromValues(1/0,1/0);s.forEach(l=\u003e{(l[1]\u003ca[1]||l[1]===a[1]\u0026\u0026l[0]\u003ca[0])\u0026\u0026(a=l)});const A=[];s.forEach(l=\u003e{const u=r(l[1]-a[1],l[0]-a[0]),g=n.squaredDistance(l,a);A.push({point:l,angle:u,distSq:g})}),A.sort((l,u)=\u003el.angle!==u.angle?l.angle-u.angle:l.distSq-u.distSq);const c=[];return A.forEach(l=\u003e{let u=c.length;for(;u\u003e1\u0026\u0026i(c[u-2],c[u-1],l.point)\u003c=Number.EPSILON;)c.pop(),u=c.length;c.push(l.point)}),c},i=(s,a,A)=\u003e(a[0]-s[0])*(A[1]-s[1])-(a[1]-s[1])*(A[0]-s[0]),r=(s,a)=\u003es===0\u0026\u0026a===0?-1/0:-a/s;e.exports=o}}),FVe=yt({\"node_modules/@jscad/modeling/src/operations/hulls/toUniquePoints.js\"(t,e){var n=Ya(),o=Ta(),i=Au(),r=s=\u003e{const a=new Set,A=[],c=l=\u003e{const u=l.toString();a.has(u)||(A.push(l),a.add(u))};return s.forEach(l=\u003e{n.isA(l)?n.toPoints(l).forEach(c):o.isA(l)?o.toPoints(l).forEach(u=\u003eu.forEach(c)):i.isA(l)\u0026\u0026i.toPoints(l).forEach(c)}),A};e.exports=r}}),Jpi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/hullPath2.js\"(t,e){var n=ga(),o=Au(),i=kVe(),r=FVe(),s=(...a)=\u003e{a=n(a);const A=r(a),c=i(A);return o.fromPoints({closed:!0},c)};e.exports=s}}),Wpi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/hullGeom2.js\"(t,e){var n=ga(),o=Ya(),i=kVe(),r=FVe(),s=(...a)=\u003e{a=n(a);const A=r(a),c=i(A);return c.length\u003c3?o.create():o.fromPoints(c)};e.exports=s}}),jpi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/hullGeom3.js\"(t,e){var n=ga(),o=Ta(),i=FVe(),r=DVe(),s=(...a)=\u003e{a=n(a);const A=i(a);return A.length===0?o.create():o.create(r(A))};e.exports=s}}),xrn=yt({\"node_modules/@jscad/modeling/src/operations/hulls/hull.js\"(t,e){var n=ga(),o=MX(),i=Ya(),r=Ta(),s=Au(),a=Jpi(),A=Wpi(),c=jpi(),l=(...u)=\u003e{if(u=n(u),u.length===0)throw new Error(\"wrong number of arguments\");if(!o(u))throw new Error(\"only hulls of the same type are supported\");const g=u[0];return s.isA(g)?a(u):i.isA(g)?A(u):r.isA(g)?c(u):g};e.exports=l}}),$pi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/hullChain.js\"(t,e){var n=ga(),o=RVe(),i=xrn(),r=(...s)=\u003e{if(s=n(s),s.length\u003c2)throw new Error(\"wrong number of arguments\");const a=[];for(let A=1;A\u003cs.length;A++)a.push(i(s[A-1],s[A]));return o(a)};e.exports=r}}),qpi=yt({\"node_modules/@jscad/modeling/src/operations/hulls/index.js\"(t,e){e.exports={hull:xrn(),hullChain:$pi(),hullPoints2:kVe(),hullPoints3:DVe()}}}),Xpi=yt({\"node_modules/@jscad/modeling/src/operations/minkowski/index.js\"(t,e){e.exports={minkowskiSum:frn()}}}),Ern=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/snapPolygons.js\"(t,e){var n=$r(),o=XA(),i=(s,a)=\u003e{const A=Math.abs(o.measureArea(a));return Number.isFinite(A)\u0026\u0026A\u003es},r=(s,a)=\u003e{let A=a.map(l=\u003e{const u=l.vertices.map(d=\u003en.snap(n.create(),d,s)),g=[];for(let d=0;d\u003cu.length;d++){const p=(d+1)%u.length;n.equals(u[d],u[p])||g.push(u[d])}const h=o.create(g);return l.color\u0026\u0026(h.color=l.color),h});const c=s*s*Math.sqrt(3)/4;return A=A.filter(l=\u003ei(c,l)),A};e.exports=r}}),Zpi=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/mergePolygons.js\"(t,e){var n=xVe(),o=$r(),i=XA(),r=_=\u003e{const f=i.toPoints(_),I=[];for(let C=0;C\u003cf.length;C++){const y=(C+1)%f.length,x={v1:f[C],v2:f[y]};I.push(x)}for(let C=0;C\u003cI.length;C++){const y=(C+1)%f.length;I[C].next=I[y],I[y].prev=I[C]}return I},s=(_,f)=\u003e{const I=`${f.v1}:${f.v2}`;_.set(I,f)},a=(_,f)=\u003e{const I=`${f.v1}:${f.v2}`;_.delete(I)},A=(_,f)=\u003e{const I=`${f.v2}:${f.v1}`;return _.get(I)},c=(_,f,I)=\u003e{let C=_.prev.v1,y=_.prev.v2,x=f.next.v2;const E=g(C,y,x,I);C=f.prev.v1,y=f.prev.v2,x=_.next.v2;const B=g(C,y,x,I);return[E,B]},l=o.create(),u=o.create(),g=(_,f,I,C)=\u003e{const y=o.subtract(l,f,_),x=o.subtract(u,I,f);return o.cross(y,y,x),o.dot(y,C)},h=_=\u003e{let f;const I=[];for(;_.next;){const C=_.next;I.push(_.v1),_.v1=null,_.v2=null,_.next=null,_.prev=null,_=C}return I.length\u003e0\u0026\u0026(f=i.create(I)),f},d=_=\u003e{if(_.length\u003c2)return _;const f=_[0].plane,I=_.slice(),C=new Map;for(;I.length\u003e0;){const x=I.shift(),E=r(x);for(let B=0;B\u003cE.length;B++){const S=E[B],Q=A(C,S);if(Q){const w=c(S,Q,f);if(w[0]\u003e=0\u0026\u0026w[1]\u003e=0){const M=Q.next,k=S.next;S.prev.next=Q.next,S.next.prev=Q.prev,Q.prev.next=S.next,Q.next.prev=S.prev,S.v1=null,S.v2=null,S.next=null,S.prev=null,a(C,Q),Q.v1=null,Q.v2=null,Q.next=null,Q.prev=null;const R=(F,O,U)=\u003e{const Y={v1:U.v1,v2:O.v2,next:O.next,prev:U.prev};U.prev.next=Y,O.next.prev=Y,a(F,O),O.v1=null,O.v2=null,O.next=null,O.prev=null,a(F,U),U.v1=null,U.v2=null,U.next=null,U.prev=null};w[0]===0\u0026\u0026R(C,M,M.prev),w[1]===0\u0026\u0026R(C,k,k.prev)}}else S.next\u0026\u0026s(C,S)}}const y=[];return C.forEach(x=\u003e{const E=h(x);E\u0026\u0026y.push(E)}),C.clear(),y},p=(_,f)=\u003eMath.abs(_[3]-f[3])\u003c15e-8?n(_,f):!1,m=(_,f)=\u003e{const I=[];f.forEach(y=\u003e{const x=I.find(E=\u003ep(E[0],i.plane(y)));x?x[1].push(y):I.push([i.plane(y),[y]])});let C=[];return I.forEach(y=\u003e{const x=y[1],E=d(x);C=C.concat(E)}),C};e.exports=m}}),emi=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/insertTjunctions.js\"(t,e){var n=mc(),o=$r(),i=XA(),r=c=\u003e`${c}`,s=(c,l,u,g,h,d)=\u003e{const p=r(g),m=r(h),_=`${p}/${m}`,f=`${m}/${p}`;if(c.has(f))return a(c,l,u,h,g,null),null;const I={vertex0:g,vertex1:h,polygonindex:d};return c.has(_)?c.get(_).push(I):c.set(_,[I]),l.has(p)?l.get(p).push(_):l.set(p,[_]),u.has(m)?u.get(m).push(_):u.set(m,[_]),_},a=(c,l,u,g,h,d)=\u003e{const p=r(g),m=r(h),_=`${p}/${m}`;let f=-1;const I=c.get(_);for(let C=0;C\u003cI.length;C++){const y=I[C];let x=r(y.vertex0);if(x===p\u0026\u0026(x=r(y.vertex1),x===m\u0026\u0026!(d!==null\u0026\u0026y.polygonindex!==d))){f=C;break}}I.splice(f,1),I.length===0\u0026\u0026c.delete(_),f=l.get(p).indexOf(_),l.get(p).splice(f,1),l.get(p).length===0\u0026\u0026l.delete(p),f=u.get(m).indexOf(_),u.get(m).splice(f,1),u.get(m).length===0\u0026\u0026u.delete(m)},A=c=\u003e{const l=new Map;for(let u=0;u\u003cc.length;u++){const g=c[u],h=g.vertices.length;if(h\u003e=3){let d=g.vertices[0],p=r(d);for(let m=0;m\u003ch;m++){let _=m+1;_===h\u0026\u0026(_=0);const f=g.vertices[_],I=r(f),C=`${p}/${I}`,y=`${I}/${p}`;if(l.has(y)){const x=l.get(y);x.splice(-1,1),x.length===0\u0026\u0026l.delete(y)}else{const x={vertex0:d,vertex1:f,polygonindex:u};l.has(C)?l.get(C).push(x):l.set(C,[x])}d=f,p=I}}else console.warn(\"warning: invalid polygon found during insertTjunctions\")}if(l.size\u003e0){const u=new Map,g=new Map,h=new Map;for(const[p,m]of l)h.set(p,!0),m.forEach(_=\u003e{const f=r(_.vertex0),I=r(_.vertex1);u.has(f)?u.get(f).push(p):u.set(f,[p]),g.has(I)?g.get(I).push(p):g.set(I,[p])});const d=c.slice(0);for(;l.size!==0;){for(const m of l.keys())h.set(m,!0);let p=!1;for(;;){const m=Array.from(h.keys());if(m.length===0)break;const _=m[0];let f=!0;if(l.has(_)){const C=l.get(_)[0];for(let y=0;y\u003c2;y++){const x=y===0?C.vertex0:C.vertex1,E=y===0?C.vertex1:C.vertex0,B=r(x),S=r(E);let Q=[];y===0?g.has(B)\u0026\u0026(Q=g.get(B)):u.has(B)\u0026\u0026(Q=u.get(B));for(let w=0;w\u003cQ.length;w++){const M=Q[w],k=l.get(M)[0],R=y===0?k.vertex0:k.vertex1;if(y===0?k.vertex1:k.vertex0,r(R)===S){a(l,u,g,x,E,null),a(l,u,g,E,x,null),f=!1,y=2,p=!0;break}else{const O=x,U=E,Y=R,W=o.subtract(o.create(),Y,O),te=o.dot(o.subtract(o.create(),U,O),W)/o.dot(W,W);if(te\u003e0\u0026\u0026te\u003c1){const j=o.scale(o.create(),W,te);if(o.add(j,j,O),o.squaredDistance(j,U)\u003cn.EPS*n.EPS){const oe=k.polygonindex,ie=d[oe],ne=r(k.vertex1);let le=-1;for(let pe=0;pe\u003cie.vertices.length;pe++)if(r(ie.vertices[pe])===ne){le=pe;break}const ge=ie.vertices.slice(0);ge.splice(le,0,E);const _e=i.create(ge);d[oe]=_e,a(l,u,g,k.vertex0,k.vertex1,oe);const ue=s(l,u,g,k.vertex0,E,oe),fe=s(l,u,g,E,k.vertex1,oe);ue!==null\u0026\u0026h.set(ue,!0),fe!==null\u0026\u0026h.set(fe,!0),f=!1,y=2,p=!0;break}}}}}}f\u0026\u0026h.delete(_)}if(!p)break}c=d}return l.clear(),c};e.exports=A}}),tmi=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/triangulatePolygons.js\"(t,e){var n=$r(),o=XA(),i=(s,a,A)=\u003e{const c=a.vertices.length;if(c\u003e3){if(c\u003e4){const g=[0,0,0];a.vertices.forEach(h=\u003en.add(g,g,h)),n.snap(g,n.divide(g,g,[c,c,c]),s);for(let h=0;h\u003cc;h++){const d=o.create([g,a.vertices[h],a.vertices[(h+1)%c]]);a.color\u0026\u0026(d.color=a.color),A.push(d)}return}const l=o.create([a.vertices[0],a.vertices[1],a.vertices[2]]),u=o.create([a.vertices[0],a.vertices[2],a.vertices[3]]);a.color\u0026\u0026(l.color=a.color,u.color=a.color),A.push(l,u);return}A.push(a)},r=(s,a)=\u003e{const A=[];return a.forEach(c=\u003e{i(s,c,A)}),A};e.exports=r}}),nmi=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/generalize.js\"(t,e){var n=ga(),o=gP(),i=Ya(),r=Ta(),s=Au(),a=Ern(),A=Zpi(),c=emi(),l=tmi(),u=(p,m)=\u003em,g=(p,m)=\u003em,h=(p,m)=\u003e{const _={snap:!1,simplify:!1,triangulate:!1},{snap:f,simplify:I,triangulate:C}=Object.assign({},_,p),y=o(m);let x=r.toPolygons(m);f\u0026\u0026(x=a(y,x)),I\u0026\u0026(x=A(y,x)),C\u0026\u0026(x=c(x),x=l(y,x));const E=Object.assign({},m);return E.polygons=x,E},d=(p,...m)=\u003e{if(m=n(m),m.length===0)throw new Error(\"wrong number of arguments\");const _=m.map(f=\u003e{if(s.isA(f))return u(p,f);if(i.isA(f))return g(p,f);if(r.isA(f))return h(p,f);throw new Error(\"invalid geometry\")});return _.length===1?_[0]:_};e.exports=d}}),omi=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/snap.js\"(t,e){var n=ga(),o=_A(),i=Ya(),r=Ta(),s=Au(),a=gP(),A=Ern(),c=h=\u003e{const d=a(h),m=s.toPoints(h).map(_=\u003eo.snap(o.create(),_,d));return s.create(m)},l=h=\u003e{const d=a(h);let m=i.toSides(h).map(_=\u003e[o.snap(o.create(),_[0],d),o.snap(o.create(),_[1],d)]);return m=m.filter(_=\u003e!o.equals(_[0],_[1])),i.create(m)},u=h=\u003e{const d=a(h),p=r.toPolygons(h),m=A(d,p);return r.create(m)},g=(...h)=\u003e{if(h=n(h),h.length===0)throw new Error(\"wrong number of arguments\");const d=h.map(p=\u003es.isA(p)?c(p):i.isA(p)?l(p):r.isA(p)?u(p):p);return d.length===1?d[0]:d};e.exports=g}}),imi=yt({\"node_modules/@jscad/modeling/src/operations/modifiers/index.js\"(t,e){e.exports={generalize:nmi(),snap:omi(),retessellate:DX()}}}),rmi=yt({\"node_modules/@jscad/modeling/src/utils/padArrayToLength.js\"(t,e){var n=(o,i,r)=\u003e{for(o=o.slice();o.length\u003cr;)o.push(i);return o};e.exports=n}}),smi=yt({\"node_modules/@jscad/modeling/src/operations/transforms/align.js\"(t,e){var n=ga(),o=rmi(),i=BVe(),{translate:r}=rT(),s=l=\u003e{if(!Array.isArray(l.modes)||l.modes.length\u003e3)throw new Error(\"align(): modes must be an array of length \u003c= 3\");if(l.modes=o(l.modes,\"none\",3),l.modes.filter(u=\u003e[\"center\",\"max\",\"min\",\"none\"].includes(u)).length!==3)throw new Error('align(): all modes must be one of \"center\", \"max\" or \"min\"');if(!Array.isArray(l.relativeTo)||l.relativeTo.length\u003e3)throw new Error(\"align(): relativeTo must be an array of length \u003c= 3\");if(l.relativeTo=o(l.relativeTo,0,3),l.relativeTo.filter(u=\u003eNumber.isFinite(u)||u==null).length!==3)throw new Error(\"align(): all relativeTo values must be a number, or null.\");if(typeof l.grouped!=\"boolean\")throw new Error(\"align(): grouped must be a boolean value.\");return l},a=(l,u,g)=\u003e{for(let h=0;h\u003c3;h++)l[h]==null\u0026\u0026(u[h]===\"center\"?l[h]=(g[0][h]+g[1][h])/2:u[h]===\"max\"?l[h]=g[1][h]:u[h]===\"min\"\u0026\u0026(l[h]=g[0][h]));return l},A=(l,u,g)=\u003e{const h=i(l),d=[0,0,0];for(let p=0;p\u003c3;p++)u[p]===\"center\"?d[p]=g[p]-(h[0][p]+h[1][p])/2:u[p]===\"max\"?d[p]=g[p]-h[1][p]:u[p]===\"min\"\u0026\u0026(d[p]=g[p]-h[0][p]);return r(d,l)},c=(l,...u)=\u003e{l=Object.assign({},{modes:[\"center\",\"center\",\"min\"],relativeTo:[0,0,0],grouped:!1},l),l=s(l);let{modes:h,relativeTo:d,grouped:p}=l;if(u=n(u),u.length===0)throw new Error(\"align(): No geometries were provided to act upon\");if(d.filter(m=\u003em==null).length){const m=i(u);d=a(d,h,m)}return p?u=A(u,h,d):u=u.map(m=\u003eA(m,h,d)),u.length===1?u[0]:u};e.exports=c}}),spe=yt({\"node_modules/@jscad/modeling/src/operations/transforms/center.js\"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=oT(),{translate:a}=rT(),A=(h,d)=\u003e{const p={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:m,relativeTo:_}=Object.assign({},p,h),f=s(d),I=[0,0,0];return m[0]\u0026\u0026(I[0]=_[0]-(f[0][0]+(f[1][0]-f[0][0])/2)),m[1]\u0026\u0026(I[1]=_[1]-(f[0][1]+(f[1][1]-f[0][1])/2)),m[2]\u0026\u0026(I[2]=_[2]-(f[0][2]+(f[1][2]-f[0][2])/2)),a(I,d)},c=(h,...d)=\u003e{const p={axes:[!0,!0,!0],relativeTo:[0,0,0]},{axes:m,relativeTo:_}=Object.assign({},p,h);if(d=n(d),d.length===0)throw new Error(\"wrong number of arguments\");if(_.length!==3)throw new Error(\"relativeTo must be an array of length 3\");h={axes:m,relativeTo:_};const f=d.map(I=\u003er.isA(I)||o.isA(I)||i.isA(I)?A(h,I):I);return f.length===1?f[0]:f},l=(...h)=\u003ec({axes:[!0,!1,!1]},h),u=(...h)=\u003ec({axes:[!1,!0,!1]},h),g=(...h)=\u003ec({axes:[!1,!1,!0]},h);e.exports={center:c,centerX:l,centerY:u,centerZ:g}}}),ape=yt({\"node_modules/@jscad/modeling/src/operations/transforms/scale.js\"(t,e){var n=ga(),o=Du(),i=Ya(),r=Ta(),s=Au(),a=(u,...g)=\u003e{if(!Array.isArray(u))throw new Error(\"factors must be an array\");if(g=n(g),g.length===0)throw new Error(\"wrong number of arguments\");for(u=u.slice();u.length\u003c3;)u.push(1);if(u[0]\u003c=0||u[1]\u003c=0||u[2]\u003c=0)throw new Error(\"factors must be positive\");const h=o.fromScaling(o.create(),u),d=g.map(p=\u003es.isA(p)?s.transform(h,p):i.isA(p)?i.transform(h,p):r.isA(p)?r.transform(h,p):p);return d.length===1?d[0]:d},A=(u,...g)=\u003ea([u,1,1],g),c=(u,...g)=\u003ea([1,u,1],g),l=(u,...g)=\u003ea([1,1,u],g);e.exports={scale:a,scaleX:A,scaleY:c,scaleZ:l}}}),ami=yt({\"node_modules/@jscad/modeling/src/operations/transforms/transform.js\"(t,e){var n=ga(),o=Ya(),i=Ta(),r=Au(),s=(a,...A)=\u003e{if(A=n(A),A.length===0)throw new Error(\"wrong number of arguments\");const c=A.map(l=\u003er.isA(l)?r.transform(a,l):o.isA(l)?o.transform(a,l):i.isA(l)?i.transform(a,l):l);return c.length===1?c[0]:c};e.exports=s}}),aT=yt({\"node_modules/@jscad/modeling/src/operations/transforms/index.js\"(t,e){e.exports={align:smi(),center:spe().center,centerX:spe().centerX,centerY:spe().centerY,centerZ:spe().centerZ,mirror:wX().mirror,mirrorX:wX().mirrorX,mirrorY:wX().mirrorY,mirrorZ:wX().mirrorZ,rotate:PX().rotate,rotateX:PX().rotateX,rotateY:PX().rotateY,rotateZ:PX().rotateZ,scale:ape().scale,scaleX:ape().scaleX,scaleY:ape().scaleY,scaleZ:ape().scaleZ,transform:ami(),translate:rT().translate,translateX:rT().translateX,translateY:rT().translateY,translateZ:rT().translateZ}}}),Ape=yt({\"node_modules/@jscad/modeling/src/index.js\"(t,e){e.exports={colors:epe(),curves:thi(),geometries:IVe(),maths:Shi(),measurements:Rhi(),primitives:sT(),text:gpi(),utils:prn(),booleans:NX(),expansions:yrn(),extrusions:RX(),hulls:qpi(),minkowski:Xpi(),modifiers:imi(),transforms:aT()}}}),Brn=yt({\"node_modules/jscad-planner/dist/index.cjs\"(t,e){var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,s=(g,h)=\u003e{for(var d in h)n(g,d,{get:h[d],enumerable:!0})},a=(g,h,d,p)=\u003e{if(h\u0026\u0026typeof h==\"object\"||typeof h==\"function\")for(let m of i(h))!r.call(g,m)\u0026\u0026m!==d\u0026\u0026n(g,m,{get:()=\u003eh[m],enumerable:!(p=o(h,m))||p.enumerable});return g},A=g=\u003ea(n({},\"__esModule\",{value:!0}),g),c={};s(c,{executeJscadOperations:()=\u003eu,jscadPlanner:()=\u003el}),e.exports=A(c);var l={booleans:{intersect:(...g)=\u003e({type:\"intersect\",shapes:g}),subtract:(...g)=\u003e({type:\"subtract\",shapes:g}),union:(...g)=\u003e({type:\"union\",shapes:g})},hulls:{hull:(...g)=\u003e({type:\"hull\",shapes:g.flat()}),hullChain:(...g)=\u003e({type:\"hullChain\",shapes:g.flat()})},colors:{colorize:(g,h)=\u003e({type:\"colorize\",color:g,shape:h})},primitives:{cube:g=\u003e({type:\"cube\",...g}),sphere:g=\u003e({type:\"sphere\",...g}),cylinder:g=\u003e({type:\"cylinder\",...g}),polygon:g=\u003e({type:\"polygon\",...g}),cuboid:g=\u003e({type:\"cuboid\",...g}),roundedCuboid:g=\u003e({type:\"roundedCuboid\",...g})},transforms:{rotate:(g,h)=\u003e({type:\"rotate\",angles:g,shape:h}),scale:(g,h)=\u003e({type:\"scale\",factors:g,shape:h}),translate:(g,h)=\u003e({type:\"translate\",vector:g,shape:h})},extrusions:{extrudeLinear:(g,h)=\u003e({type:\"extrudeLinear\",options:g,shape:h}),extrudeRotate:(g,h)=\u003e({type:\"extrudeRotate\",options:g,shape:h})},maths:{vec2:{create:(g,h)=\u003e[g,h],fromValues:(g,h)=\u003e[g,h]},vec3:{create:(g,h,d)=\u003e[g,h,d],fromValues:(g,h,d)=\u003e[g,h,d]}},geometries:{geom2:{create:g=\u003e({type:\"createGeom2\",points:g})},geom3:{create:g=\u003e({type:\"createGeom3\",polygons:g})},path2:{create:g=\u003e({type:\"createPath2\",points:g})}},measurements:{measureBoundingBox:g=\u003e({type:\"measureBoundingBox\",shape:g}),measureArea:g=\u003e({type:\"measureArea\",shape:g}),measureVolume:g=\u003e({type:\"measureVolume\",shape:g})},utils:{degToRad:g=\u003eg*Math.PI/180,radToDeg:g=\u003eg*180/Math.PI}},u=(g,h)=\u003e{if(Array.isArray(h)\u0026\u0026h.length===1)return u(g,h[0]);if(Array.isArray(h))throw new Error(\"executeJscadOperations currently doesn't support Array\u003cJscadOperation\u003e, try adding a root union or or executing each element individually\");const d=_=\u003eu(g,_),{type:p,...m}=h;switch(p){case\"intersect\":return g.booleans.intersect(...h.shapes.map(d));case\"subtract\":return g.booleans.subtract(...h.shapes.map(d));case\"union\":return g.booleans.union(...h.shapes.map(d));case\"hull\":return g.hulls.hull(...h.shapes.map(d));case\"hullChain\":return g.hulls.hullChain(...h.shapes.map(d));case\"colorize\":return g.colors.colorize(h.color,d(h.shape));case\"cube\":return g.primitives.cube(m);case\"sphere\":return g.primitives.sphere(m);case\"cylinder\":return g.primitives.cylinder(m);case\"polygon\":return g.primitives.polygon(m);case\"cuboid\":return g.primitives.cuboid(m);case\"roundedCuboid\":return g.primitives.roundedCuboid(m);case\"rotate\":return g.transforms.rotate(h.angles,d(h.shape));case\"scale\":return g.transforms.scale(h.factors,d(h.shape));case\"translate\":return g.transforms.translate(h.vector,d(h.shape));case\"extrudeLinear\":return g.extrusions.extrudeLinear(h.options,d(h.shape));case\"extrudeRotate\":return g.extrusions.extrudeRotate(h.options,d(h.shape));case\"createGeom2\":return g.geometries.geom2.create(h.points);case\"createGeom3\":return g.geometries.geom3.create(h.polygons);case\"createPath2\":return g.geometries.path2.create(h.points);case\"measureBoundingBox\":return g.measurements.measureBoundingBox(d(h.shape));case\"measureArea\":return g.measurements.measureArea(d(h.shape));case\"measureVolume\":return g.measurements.measureVolume(d(h.shape));case\"degToRad\":return g.utils.degToRad(h.degrees);case\"radToDeg\":return g.utils.radToDeg(h.radians);default:throw h.type===void 0?new Error(`Operation type is undefined. This usually means the operation object is malformed or not properly initialized. Operation: ${JSON.stringify(h,null,2).slice(0,200)}...`):new Error(`Unsupported operation type: ${h.type}. Operation: ${JSON.stringify(h,null,2)}`)}}}}),Ami=yt({\"node_modules/ms/index.js\"(t,e){var n=1e3,o=n*60,i=o*60,r=i*24,s=r*7,a=r*365.25;e.exports=function(g,h){h=h||{};var d=typeof g;if(d===\"string\"\u0026\u0026g.length\u003e0)return A(g);if(d===\"number\"\u0026\u0026isFinite(g))return h.long?l(g):c(g);throw new Error(\"val is not a non-empty string or a valid number. val=\"+JSON.stringify(g))};function A(g){if(g=String(g),!(g.length\u003e100)){var h=/^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(g);if(h){var d=parseFloat(h[1]),p=(h[2]||\"ms\").toLowerCase();switch(p){case\"years\":case\"year\":case\"yrs\":case\"yr\":case\"y\":return d*a;case\"weeks\":case\"week\":case\"w\":return d*s;case\"days\":case\"day\":case\"d\":return d*r;case\"hours\":case\"hour\":case\"hrs\":case\"hr\":case\"h\":return d*i;case\"minutes\":case\"minute\":case\"mins\":case\"min\":case\"m\":return d*o;case\"seconds\":case\"second\":case\"secs\":case\"sec\":case\"s\":return d*n;case\"milliseconds\":case\"millisecond\":case\"msecs\":case\"msec\":case\"ms\":return d;default:return}}}}function c(g){var h=Math.abs(g);return h\u003e=r?Math.round(g/r)+\"d\":h\u003e=i?Math.round(g/i)+\"h\":h\u003e=o?Math.round(g/o)+\"m\":h\u003e=n?Math.round(g/n)+\"s\":g+\"ms\"}function l(g){var h=Math.abs(g);return h\u003e=r?u(g,h,r,\"day\"):h\u003e=i?u(g,h,i,\"hour\"):h\u003e=o?u(g,h,o,\"minute\"):h\u003e=n?u(g,h,n,\"second\"):g+\" ms\"}function u(g,h,d,p){var m=h\u003e=d*1.5;return Math.round(g/d)+\" \"+p+(m?\"s\":\"\")}}}),cmi=yt({\"node_modules/debug/src/common.js\"(t,e){function n(o){r.debug=r,r.default=r,r.coerce=u,r.disable=c,r.enable=a,r.enabled=l,r.humanize=Ami(),r.destroy=g,Object.keys(o).forEach(h=\u003e{r[h]=o[h]}),r.names=[],r.skips=[],r.formatters={};function i(h){let d=0;for(let p=0;p\u003ch.length;p++)d=(d\u003c\u003c5)-d+h.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=i;function r(h){let d,p=null,m,_;function f(...I){if(!f.enabled)return;const C=f,y=Number(new Date),x=y-(d||y);C.diff=x,C.prev=d,C.curr=y,d=y,I[0]=r.coerce(I[0]),typeof I[0]!=\"string\"\u0026\u0026I.unshift(\"%O\");let E=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(S,Q)=\u003e{if(S===\"%%\")return\"%\";E++;const w=r.formatters[Q];if(typeof w==\"function\"){const M=I[E];S=w.call(C,M),I.splice(E,1),E--}return S}),r.formatArgs.call(C,I),(C.log||r.log).apply(C,I)}return f.namespace=h,f.useColors=r.useColors(),f.color=r.selectColor(h),f.extend=s,f.destroy=r.destroy,Object.defineProperty(f,\"enabled\",{enumerable:!0,configurable:!1,get:()=\u003ep!==null?p:(m!==r.namespaces\u0026\u0026(m=r.namespaces,_=r.enabled(h)),_),set:I=\u003e{p=I}}),typeof r.init==\"function\"\u0026\u0026r.init(f),f}function s(h,d){const p=r(this.namespace+(typeof d\u003e\"u\"?\":\":d)+h);return p.log=this.log,p}function a(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];const d=(typeof h==\"string\"?h:\"\").trim().replace(/\\s+/g,\",\").split(\",\").filter(Boolean);for(const p of d)p[0]===\"-\"?r.skips.push(p.slice(1)):r.names.push(p)}function A(h,d){let p=0,m=0,_=-1,f=0;for(;p\u003ch.length;)if(m\u003cd.length\u0026\u0026(d[m]===h[p]||d[m]===\"*\"))d[m]===\"*\"?(_=m,f=p,m++):(p++,m++);else if(_!==-1)m=_+1,f++,p=f;else return!1;for(;m\u003cd.length\u0026\u0026d[m]===\"*\";)m++;return m===d.length}function c(){const h=[...r.names,...r.skips.map(d=\u003e\"-\"+d)].join(\",\");return r.enable(\"\"),h}function l(h){for(const d of r.skips)if(A(h,d))return!1;for(const d of r.names)if(A(h,d))return!0;return!1}function u(h){return h instanceof Error?h.stack||h.message:h}function g(){console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\")}return r.enable(r.load()),r}e.exports=n}}),lmi=yt({\"node_modules/debug/src/browser.js\"(t,e){t.formatArgs=o,t.save=i,t.load=r,t.useColors=n,t.storage=s(),t.destroy=(()=\u003e{let A=!1;return()=\u003e{A||(A=!0,console.warn(\"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.\"))}})(),t.colors=[\"#0000CC\",\"#0000FF\",\"#0033CC\",\"#0033FF\",\"#0066CC\",\"#0066FF\",\"#0099CC\",\"#0099FF\",\"#00CC00\",\"#00CC33\",\"#00CC66\",\"#00CC99\",\"#00CCCC\",\"#00CCFF\",\"#3300CC\",\"#3300FF\",\"#3333CC\",\"#3333FF\",\"#3366CC\",\"#3366FF\",\"#3399CC\",\"#3399FF\",\"#33CC00\",\"#33CC33\",\"#33CC66\",\"#33CC99\",\"#33CCCC\",\"#33CCFF\",\"#6600CC\",\"#6600FF\",\"#6633CC\",\"#6633FF\",\"#66CC00\",\"#66CC33\",\"#9900CC\",\"#9900FF\",\"#9933CC\",\"#9933FF\",\"#99CC00\",\"#99CC33\",\"#CC0000\",\"#CC0033\",\"#CC0066\",\"#CC0099\",\"#CC00CC\",\"#CC00FF\",\"#CC3300\",\"#CC3333\",\"#CC3366\",\"#CC3399\",\"#CC33CC\",\"#CC33FF\",\"#CC6600\",\"#CC6633\",\"#CC9900\",\"#CC9933\",\"#CCCC00\",\"#CCCC33\",\"#FF0000\",\"#FF0033\",\"#FF0066\",\"#FF0099\",\"#FF00CC\",\"#FF00FF\",\"#FF3300\",\"#FF3333\",\"#FF3366\",\"#FF3399\",\"#FF33CC\",\"#FF33FF\",\"#FF6600\",\"#FF6633\",\"#FF9900\",\"#FF9933\",\"#FFCC00\",\"#FFCC33\"];function n(){if(typeof window\u003c\"u\"\u0026\u0026window.process\u0026\u0026(window.process.type===\"renderer\"||window.process.__nwjs))return!0;if(typeof navigator\u003c\"u\"\u0026\u0026navigator.userAgent\u0026\u0026navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/))return!1;let A;return typeof document\u003c\"u\"\u0026\u0026document.documentElement\u0026\u0026document.documentElement.style\u0026\u0026document.documentElement.style.WebkitAppearance||typeof window\u003c\"u\"\u0026\u0026window.console\u0026\u0026(window.console.firebug||window.console.exception\u0026\u0026window.console.table)||typeof navigator\u003c\"u\"\u0026\u0026navigator.userAgent\u0026\u0026(A=navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/))\u0026\u0026parseInt(A[1],10)\u003e=31||typeof navigator\u003c\"u\"\u0026\u0026navigator.userAgent\u0026\u0026navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/)}function o(A){if(A[0]=(this.useColors?\"%c\":\"\")+this.namespace+(this.useColors?\" %c\":\" \")+A[0]+(this.useColors?\"%c \":\" \")+\"+\"+e.exports.humanize(this.diff),!this.useColors)return;const c=\"color: \"+this.color;A.splice(1,0,c,\"color: inherit\");let l=0,u=0;A[0].replace(/%[a-zA-Z%]/g,g=\u003e{g!==\"%%\"\u0026\u0026(l++,g===\"%c\"\u0026\u0026(u=l))}),A.splice(u,0,c)}t.log=console.debug||console.log||(()=\u003e{});function i(A){try{A?t.storage.setItem(\"debug\",A):t.storage.removeItem(\"debug\")}catch{}}function r(){let A;try{A=t.storage.getItem(\"debug\")||t.storage.getItem(\"DEBUG\")}catch{}return!A\u0026\u0026typeof cVe\u003c\"u\"\u0026\u0026\"env\"in cVe\u0026\u0026(A=cVe.env.DEBUG),A}function s(){try{return localStorage}catch{}}e.exports=cmi()(t);var{formatters:a}=e.exports;a.j=function(A){try{return JSON.stringify(A)}catch(c){return\"[UnexpectedJSONParseError]: \"+c.message}}}}),LVe=ee.createContext(null),uf=()=\u003e{const t=ee.useContext(LVe);if(!t)throw new Error(\"useThree must be used within a ThreeProvider\");return t},TX=(t,e=[])=\u003e{const{addFrameListener:n,removeFrameListener:o}=uf();Fs.useEffect(()=\u003e(n(t),()=\u003eo(t)),[n,o,...e])},HVe=ee.createContext(null),umi=()=\u003e{const t=ee.useContext(HVe),e=uf();return ee.useEffect(()=\u003e{if(t)return t.current=e,()=\u003e{t.current=null}},[t,e]),null},gmi=({cadComponent:t,children:e})=\u003e{const n=uf(),o=ee.useMemo(()=\u003enew lh,[]);o.userData.cad_component_id=t.cad_component_id,o.userData.pcb_component_id=t.pcb_component_id,ee.useEffect(()=\u003e(n.rootObject.add(o),()=\u003e{n.rootObject.remove(o)}),[n.rootObject,o]);const i=ee.useMemo(()=\u003e({...n,rootObject:o}),[n,o]);return K.jsx(LVe.Provider,{value:i,children:e})},brn=(t,e)=\u003e{if(!t)return;const{camera:n,rootObject:o,renderer:i}=t,r=i.domElement.getBoundingClientRect();if(!r.width||!r.height||e.x\u003cr.left||e.x\u003er.right||e.y\u003cr.top||e.y\u003er.bottom)return;const s=new uJt;n.updateWorldMatrix(!0,!1),o.updateWorldMatrix(!0,!0),s.setFromCamera(new ni((e.x-r.left)/r.width*2-1,-((e.y-r.top)/r.height)*2+1),n);for(const a of s.intersectObject(o,!0)){if(!(a.object instanceof Er))continue;let A=a.object,c=!0;for(;A;)A.visible||(c=!1),A=A.parent;if(c)return a.object}},dmi=(t,e,n)=\u003e{let o=brn(t,e)??null,i;for(;o;)i??=o.userData.pcb_component_id,o=o.parent;if(!i)return;const r=n.find(a=\u003ea.type===\"pcb_component\"\u0026\u0026a.pcb_component_id===i);if(r?.type!==\"pcb_component\")return;const s=n.find(a=\u003ea.type===\"source_component\"\u0026\u0026a.source_component_id===r.source_component_id);if(s?.type===\"source_component\")return{source_component_id:s.source_component_id,pcb_component_id:r.pcb_component_id,refdes:s.name}};function Srn(t,e){return e??t.some(n=\u003en.type===\"cad_component\"\u0026\u0026n.is_on_folded_board===!0)}var hmi=(t,e,n)=\u003e{let o=brn(t,e)??null;for(;o;){const i=o.userData.cad_component_id;if(i){const r=n.find(a=\u003ea.type===\"cad_component\"\u0026\u0026a.cad_component_id===i);if(r?.type!==\"cad_component\")return;const s=n.find(a=\u003ea.type===\"source_component\"\u0026\u0026a.source_component_id===r.source_component_id);return{cad_component_id:r.cad_component_id,componentName:s?.type===\"source_component\"?s.name:r.cad_component_id}}o=o.parent}},cpe=new Set,pmi=t=\u003e{const[e,n]=ee.useState({circuitKey:t,ids:cpe}),o=e.circuitKey===t?e.ids:cpe;return e.circuitKey!==t\u0026\u0026n({circuitKey:t,ids:cpe}),{hiddenCadComponentIds:o,hideComponent:i=\u003e{n(r=\u003e({circuitKey:t,ids:new Set([...r.circuitKey===t?r.ids:[],i])}))},unhideAllComponents:()=\u003e{n({circuitKey:t,ids:cpe})}}},OVe=t=\u003eee.useMemo(()=\u003e{if(!t)return[];const e=new SFo;return e.add(t),e.render(),e.getCircuitJson()},[t]),mmi=(t,e)=\u003e{const n=t.pcb_component_id?e.find(o=\u003eo.type===\"pcb_component\"\u0026\u0026o.pcb_component_id===t.pcb_component_id):void 0;return{pcbComponent:n,layer:t.layer??n?.layer??\"top\",isThroughHole:!!(n\u0026\u0026e.some(o=\u003eo.type===\"pcb_plated_hole\"\u0026\u0026o.pcb_component_id===n.pcb_component_id))}},GVe=[\"translucent\",\"opaque\",\"hidden\"],_mi=t=\u003eGVe[(GVe.indexOf(t)+1)%GVe.length],Qrn={boardBody:!0,topCopper:!0,bottomCopper:!0,keepout:!0,adhesive:!1,solderPaste:!1,topSilkscreen:!0,bottomSilkscreen:!0,topMask:!0,bottomMask:!0,throughHoleModels:!0,smtModels:!0,translucentModels:!0,modelsNotInPosFile:!1,modelsMarkedDNP:!1,modelBoundingBoxes:!1,threedAxis:!1,pcbNotes:!1,backgroundStart:!0,backgroundEnd:!0,enclosure:\"translucent\"},vrn=ee.createContext(void 0),fmi=({children:t})=\u003e{const[e,n]=ee.useState(Qrn),o=ee.useCallback((s,a)=\u003e{n(A=\u003e({...A,[s]:a}))},[]),i=ee.useCallback(()=\u003e{n(Qrn)},[]),r=ee.useMemo(()=\u003e({visibility:e,setLayerVisibility:o,resetToDefaults:i}),[e,o,i]);return K.jsx(vrn.Provider,{value:r,children:t})},AT=()=\u003e{const t=ee.useContext(vrn);if(!t)throw new Error(\"useLayerVisibility must be used within a LayerVisibilityProvider\");return t},YVe=1.2;function wrn(t){return ee.useMemo(()=\u003e{if(!t)return YVe;try{return Mr(t).pcb_board.list()[0]?.thickness??YVe}catch{return YVe}},[t])}var kX={clickToInteractOverlay:100,htmlElements:95,orientationCube:95,contextMenu:110,appearanceMenu:111},Prn=({children:t,position:e,style:n})=\u003e{const{camera:o,renderer:i}=uf(),r=ee.useRef(document.createElement(\"div\")),[s,a]=ee.useState(null);return ee.useEffect(()=\u003e{const A=i?.domElement.parentNode;if(A)return A.style.position!==\"relative\"\u0026\u0026A.style.position!==\"absolute\"\u0026\u0026(A.style.position=\"relative\"),A.appendChild(r.current),a(NFt.createPortal(t,r.current)),()=\u003e{A.contains(r.current)\u0026\u0026A.removeChild(r.current)}},[i,t]),TX(()=\u003e{if(!o||!r.current||!i)return;const A=new jt(...e);A.project(o);const c=i.domElement.getBoundingClientRect(),l=Math.round((A.x+1)/2*c.width),u=Math.round((-A.y+1)/2*c.height);r.current.style.position=\"absolute\",r.current.style.left=`${l}px`,r.current.style.top=`${u}px`,r.current.style.pointerEvents=\"none\",r.current.style.zIndex=kX.htmlElements.toString(),n\u0026\u0026Object.assign(r.current.style,n)},[o,i,e,n]),s},Mrn={in:25.4,inch:25.4,mil:.0254,mm:1,m:1e3,cm:10,ft:304.8,feet:304.8},Ua=t=\u003e{let e=typeof t==\"number\"?\"mm\":t.replace(/^[^a-zA-Z]+/g,\"\").toLowerCase();e||(e=\"mm\");const n=typeof t==\"number\"?t:Number.parseFloat(t.split(e)[0]);if(e in Mrn)return n*Mrn[e];throw new Error(`Unsupported unit: ${e}`)},Bd=Ua,Imi=Object.defineProperty,Cmi=(t,e)=\u003e{for(var n in e)Imi(t,n,{get:e[n],enumerable:!0})},cS={};Cmi(cS,{axial:()=\u003edfi,bga:()=\u003eh_i,breakoutheaders:()=\u003ePfi,cap:()=\u003eLmi,crystal:()=\u003eOmi,d2pak:()=\u003ekrn,dfn:()=\u003eW_i,diode:()=\u003eFmi,dip:()=\u003eQmi,dpak:()=\u003eTrn,electrolytic:()=\u003evCi,fpc:()=\u003eMCi,hc49:()=\u003eNfi,headermodule:()=\u003e$_i,jst:()=\u003eUIi,lcc:()=\u003eyyi,led:()=\u003eGmi,led2835:()=\u003eUmi,led5050:()=\u003eVmi,lga:()=\u003evfi,lqfp:()=\u003eSfi,m2host:()=\u003egyi,melf:()=\u003eq1i,micromelf:()=\u003etIi,minimelf:()=\u003eU1i,mlp:()=\u003eb_i,mountedpcbmodule:()=\u003ehyi,ms012:()=\u003etfi,ms013:()=\u003eofi,msop:()=\u003eZIi,pad:()=\u003eRfi,pinrow:()=\u003eZrn,platedhole:()=\u003eeyi,potentiometer:()=\u003ebCi,pushbutton:()=\u003eCfi,qfn:()=\u003ex_i,qfp:()=\u003eB_i,quad:()=\u003euT,radial:()=\u003emfi,res:()=\u003eg_i,rj45:()=\u003effi,sma:()=\u003erIi,smb:()=\u003edIi,smbf:()=\u003eNCi,smc:()=\u003e_Ii,smdpads:()=\u003eKCi,smdpinheader:()=\u003eXCi,smdpushbutton:()=\u003ezCi,smdslideswitch:()=\u003e$Ci,smf:()=\u003ecIi,smtpad:()=\u003eYCi,sod110:()=\u003eVIi,sod123:()=\u003ecfi,sod123f:()=\u003em1i,sod123fl:()=\u003eC1i,sod123w:()=\u003e$fi,sod128:()=\u003ev1i,sod323:()=\u003ee1i,sod323f:()=\u003eg1i,sod323fl:()=\u003erCi,sod323w:()=\u003etCi,sod523:()=\u003eOfi,sod723:()=\u003eB1i,sod80:()=\u003ezfi,sod882:()=\u003eA1i,sod882d:()=\u003eJ1i,sod923:()=\u003ei1i,soic:()=\u003em_i,solderjumper:()=\u003emCi,son:()=\u003ecCi,sop8:()=\u003eKfi,sot:()=\u003enyi,sot143:()=\u003eryi,sot223:()=\u003eyIi,sot23:()=\u003eG_i,sot23w:()=\u003ePIi,sot25:()=\u003eV_i,sot323:()=\u003eLCi,sot343:()=\u003eAyi,sot363:()=\u003eR_i,sot457:()=\u003eICi,sot563:()=\u003eZ_i,sot723:()=\u003erfi,sot886:()=\u003eF_i,sot89:()=\u003eL1i,sot963:()=\u003exCi,ssop:()=\u003ev_i,stampboard:()=\u003exfi,stampreceiver:()=\u003ebfi,to220:()=\u003ersn,to220f:()=\u003eG1i,to252:()=\u003eMmi,to263:()=\u003eDmi,to92:()=\u003eLfi,to92l:()=\u003efyi,to92s:()=\u003ekIi,tqfp:()=\u003eE_i,tssop:()=\u003eM_i,usbcmidmount:()=\u003eCyi,vson:()=\u003euCi,vssop:()=\u003e$Ii,wson:()=\u003epCi});var xi=(t,e,n)=\u003e({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:\"silkscreen_text_1\",font:\"tscircuit2024\",font_size:n,pcb_component_id:\"pcb_component_1\",text:\"{REF}\",layer:\"top\",anchor_position:{x:t,y:e},anchor_alignment:\"center\"}),FX=Z().or(dn(rd())).transform(t=\u003eArray.isArray(t)?t:(t.startsWith(\"(\")\u0026\u0026t.endsWith(\")\")\u0026\u0026(t=t.slice(1,-1)),t.split(\",\").map(e=\u003e{const n=Number(e);return isNaN(n)?e:n}))).pipe(dn(Z().or(_t()))),ymi=Kn([\"leftside\",\"rightside\"]),xmi=Kn([\"topside\",\"bottomside\"]),Emi=Kn([\"left\",\"right\"]),Bmi=Kn([\"top\",\"bottom\"]),Drn=FX.pipe(xo([fQ([ymi,Bmi]),fQ([xmi,Emi])])),Ci=Pt({norefdes:je().optional().describe(\"disable reference designator label\"),invert:je().optional().describe(\"install the part backwards: for a pin header, the LONG pins pass through the board instead of the short ones. It does not change which side of the board the part is on — that is the component's `layer`\"),faceup:je().optional().describe(\"DEPRECATED, and a no-op for through-hole parts. It meant 'the male pin header should face upwards, out of the top layer', which is what a correctly mounted header does by default; its other effect was to delete the pins below the board, leaving a through-hole part that cannot be soldered into its own plated holes. Use `layer` for which side of the board a part is on, and `invert` to install it backwards\"),nosilkscreen:je().optional().describe(\"omit all silkscreen elements from the footprint\"),rounded:ce.refine(t=\u003et\u003e=0,{message:\"rounded radius must be non-negative\"}).optional().describe(\"corner radius applied to all rectangular copper pads\"),pin1location:Drn.optional().describe(\"rotate the footprint to place pin 1 on a requested side\"),cathodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe(\"identify which diode pad is the cathode\"),anodepin:S5.number().pipe(xo([$e(1),$e(2)])).optional().describe(\"identify which diode pad is the anode\")}),Os=(t,e,n,o,i)=\u003e({pcb_plated_hole_id:\"\",type:\"pcb_plated_hole\",shape:\"circle\",x:e,y:n,hole_diameter:Ua(o),outer_diameter:Ua(i),pcb_port_id:\"\",layers:[\"top\",\"bottom\"],port_hints:[t.toString()]}),r2=t=\u003e{const{pn:e,x:n,y:o,holeDiameter:i,rectPadWidth:r,rectPadHeight:s,holeOffsetX:a=0,holeOffsetY:A=0,rectBorderRadius:c}=t;return{pcb_plated_hole_id:\"\",type:\"pcb_plated_hole\",shape:\"circular_hole_with_rect_pad\",x:n,y:o,hole_diameter:Ua(i),hole_shape:\"circle\",pad_shape:\"rect\",rect_pad_width:Ua(r),rect_pad_height:Ua(s),...c!==void 0\u0026\u0026{rect_border_radius:c},pcb_port_id:\"\",layers:[\"top\",\"bottom\"],port_hints:[e.toString()],hole_offset_x:a,hole_offset_y:A}},lpe=Array.from({length:9},(t,e)=\u003eMath.cos(e/8*Math.PI-Math.PI)).map(t=\u003e({x:t,y:-Math.sqrt(1-t**2)})),s2=t=\u003e{if(t.length\u003c2)throw new Error(\"Rect union outline requires at least two bounds\");for(const c of t)if(c.minX\u003e=c.maxX||c.minY\u003e=c.maxY)throw new Error(\"Each rectangle bound must have min \u003c max on both axes\");for(let c=1;c\u003ct.length;c++){const l=t[c-1],u=t[c];if(u.minX\u003cl.minX||u.maxX\u003el.maxX||u.minY\u003el.minY||u.maxY\u003cl.maxY)throw new Error(\"Bounds must be ordered outer-to-inner with tighter X and larger Y span\")}const e=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].maxY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.maxY}),c.push({x:g.minX,y:g.maxY}),l-=1}return c},n=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].maxY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.maxY}),c.push({x:g.maxX,y:g.maxY}),l-=1}return c},o=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].maxX,y:t[l].minY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.maxX,y:g.minY}),c.push({x:g.maxX,y:g.minY}),l-=1}return c},i=()=\u003e{const c=[];let l=t.length-1;for(c.push({x:t[l].minX,y:t[l].minY});l\u003e0;){const u=t[l],g=t[l-1];c.push({x:u.minX,y:g.minY}),c.push({x:g.minX,y:g.minY}),l-=1}return c},r=e(),s=n(),a=o(),A=i();return[...r.reverse(),...s,...a.reverse(),...A]};function dP(t){return typeof t==\"string\"?t.trim().toLowerCase().endsWith(\"mil\")?parseFloat(t)*.0254:parseFloat(t):Number(t)}var upe=xo([Z(),_t()]).transform(t=\u003edP(t)),bmi=t=\u003eCi.extend({fn:Z(),num_pins:_t().optional().default(6),wide:je().optional(),narrow:je().optional(),w:upe.optional(),p:upe.default(t.p??\"2.54mm\"),id:upe.optional(),od:upe.optional(),nosquareplating:je().optional().default(!1).describe(\"do not use rectangular pad for pin 1\")}).transform(e=\u003e(!e.id\u0026\u0026!e.od?Math.abs(e.p-1.27)\u003c.01?(e.id=dP(\"0.55mm\"),e.od=dP(\"0.95mm\")):(e.id=dP(\"0.8mm\"),e.od=dP(\"1.6mm\")):e.id?e.od||(e.od=e.id*(1.5/1)):e.id=e.od*(1/1.5),e.w||(e.wide?e.w=dP(\"600mil\"):e.narrow?e.w=dP(\"300mil\"):e.w=dP(t.w??\"300mil\")),e)),Smi=bmi({}),Nrn=(t,e,n,o,i)=\u003e{const r=t/2,s=e\u003c=r,a=r-1,A=o,c=A*a;return s?{x:-n/2,y:c/2-(e-1)*A}:{x:n/2,y:-c/2+(e-r-1)*A}},Qmi=t=\u003e{const e=Smi.parse(t),n=[];for(let _=0;_\u003ce.num_pins;_++){const{x:f,y:I}=Nrn(e.num_pins,_+1,e.w,e.p??2.54,e.nosquareplating);if(_===0\u0026\u0026!e.nosquareplating){n.push(r2({pn:_+1,x:f,y:I,holeDiameter:e.id??\"0.8mm\",rectPadWidth:e.od??\"1mm\",rectPadHeight:e.od??\"1mm\"}));continue}n.push(Os(_+1,f,I,e.id??\"0.8mm\",e.od??\"1mm\"))}const o=(e.num_pins/2-1)*e.p+e.od,r=e.w-e.od-1,s=(e.num_pins/2-1)*e.p+e.od+.4,a={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...lpe.map(({x:_,y:f})=\u003e({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},A=[];for(let _=0;_\u003ce.num_pins;_++){const f=_+1,I=f\u003c=e.num_pins/2,C=Nrn(e.num_pins,f,e.w,e.p??2.54,e.nosquareplating),y=.6,x=I?C.x-e.od/2-y:C.x+e.od/2+y,E=.3;A.push({type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:`pin_${f}`,layer:\"top\",pcb_component_id:`pin_${f}`,text:`{pin${f}}`,anchor_position:{x,y:C.y+E/2},font_size:E,font:\"tscircuit2024\",anchor_alignment:I?\"top_right\":\"top_left\"})}const c=xi(0,s/2+.5,.4),l=e.w+e.od,u=o,g=l/2+.25,h=g,d=u/2+.72,p=d,m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:s2([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:\"top\"};return{circuitJson:[...n,a,c,...A,m],parameters:e}},Wo=(t,e,n,o,i,r)=\u003e({type:\"pcb_smtpad\",x:e,y:n,width:o,height:i,layer:\"top\",shape:\"rect\",...r!==void 0\u0026\u0026{corner_radius:r},pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(s=\u003es.toString()):[t.toString()]}),sA=(t,e={})=\u003e({type:\"pcb_silkscreen_path\",layer:e.layer||\"top\",pcb_component_id:e.pcb_component_id||\"\",pcb_silkscreen_path_id:e.pcb_silkscreen_path_id||\"\",route:t,stroke_width:e.stroke_width||.1}),vmi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(6)]).default(3),p:ce.default(\"2.29mm\").describe(\"pitch between adjacent lead positions\"),pw:ce.default(\"1.6mm\").describe(\"lead pad width along the pin column\"),pl:ce.default(\"3mm\").describe(\"lead pad length toward the package\"),tabw:ce.default(\"6.2mm\").describe(\"large tab pad width\"),tabh:ce.default(\"5.8mm\").describe(\"large tab pad height\"),span:ce.default(\"6.85mm\").describe(\"center-to-center distance from the leads to the tab\"),w:ce.default(\"6.6mm\").describe(\"package body width\"),h:ce.default(\"6.5mm\").describe(\"package body height\"),string:Z().optional()}),wmi={p:\"2.54mm\",pw:\"1.5mm\",pl:\"3.5mm\",tabw:\"8.38mm\",tabh:\"10.7mm\",span:\"10.21mm\",w:\"10.1mm\",h:\"10.1mm\"},Pmi=t=\u003e{if(t.num_pins===3||t.num_pins===6)return t.num_pins;const e=t.string?.match(/^(?:d2pak|to252|to263)_(\\d+)/i),n=Number.parseInt(e?.[1]??\"3\",10);return n===5||n===6?6:3},Rrn=(t,e)=\u003e{const n=vmi.parse({...e,...t,num_pins:Pmi(t)}),{num_pins:o,p:i,pw:r,pl:s,tabw:a,tabh:A,span:c,w:l,h:u}=n,g=o===3?2:5,h=-c/2,d=c/2,p=[];for(let M=0;M\u003cg;M++){const k=o===3?M*2+1:M+1,R=o===3?(1-M*2)*i:((g-1)/2-M)*i;p.push(Wo(k,h,R,s,r))}p.push(Wo(o===3?2:6,d,0,a,A));const m=-l/2,_=l/2,f=Math.min(h-s/2,d-a/2),I=Math.max(h+s/2,d+a/2),C=(o===3?i:(g-1)/2*i)+r/2,y=Math.max(C,A/2),x=Math.max(y,u/2)+.2,E=[sA([{x:m,y:x},{x:_,y:x}]),sA([{x:m,y:-x},{x:_,y:-x}]),sA([{x:h-.3,y:x+.15},{x:h,y:x+.45},{x:h+.3,y:x+.15}])],B=Math.min(f,m)-.25,S=Math.max(I,_)+.25,Q=Math.max(y,u/2)+.25,w={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(B+S)/2,y:0},width:S-B,height:Q*2,layer:\"top\"};return{circuitJson:[...p,...E,xi(0,Q+.55,.5),w],parameters:n}},Trn=t=\u003eRrn(t),krn=t=\u003eRrn(t,wmi),Mmi=Trn,Dmi=krn,Frn=[{imperial:\"01005\",metric:\"0402\",p_mm_min:.5,pw_mm_min:.4,ph_mm_min:.3,w_mm_min:.58,h_mm_min:.21,courtyard_width_mm:1.2,courtyard_height_mm:.6},{imperial:\"0504\",metric:\"1310\",p_mm_min:1.1,pw_mm_min:.65,ph_mm_min:1.3,w_mm_min:.58,h_mm_min:.21},{imperial:\"1812\",metric:\"4532\",p_mm_min:4.275,pw_mm_min:1.125,ph_mm_min:3.4,w_mm_min:5.4,h_mm_min:3.4,courtyard_width_mm:5.9,courtyard_height_mm:3.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.386252,line_y_mm:1.71,stroke_width_mm:.12}},{imperial:\"0201\",metric:\"0603\",p_mm_min:.66,pw_mm_min:.46,ph_mm_min:.4,w_mm_min:.9,h_mm_min:.3,courtyard_width_mm:1.4,courtyard_height_mm:.7,rounded_pads:!0},{imperial:\"0402\",metric:\"1005\",p_mm_min:1.02,pw_mm_min:.54,ph_mm_min:.64,w_mm_min:1.56,h_mm_min:.64,courtyard_width_mm:1.86,courtyard_height_mm:.94,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.153641,line_y_mm:.38,stroke_width_mm:.12}},{imperial:\"0603\",metric:\"1608\",p_mm_min:1.65,pw_mm_min:.8,ph_mm_min:.95,w_mm_min:2.45,h_mm_min:.95,courtyard_width_mm:2.96,courtyard_height_mm:1.46,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.237258,line_y_mm:.5225,stroke_width_mm:.12}},{imperial:\"0805\",metric:\"2012\",p_mm_min:1.825,pw_mm_min:1.025,ph_mm_min:1.4,w_mm_min:2.8499999999999996,h_mm_min:1.4,courtyard_width_mm:3.36,courtyard_height_mm:1.9,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.227064,line_y_mm:.735,stroke_width_mm:.12}},{imperial:\"1206\",metric:\"3216\",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:1.75,w_mm_min:4.05,h_mm_min:1.75,courtyard_width_mm:4.56,courtyard_height_mm:2.26,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.727064,line_y_mm:.91,stroke_width_mm:.12}},{imperial:\"1210\",metric:\"3225\",p_mm_min:2.925,pw_mm_min:1.125,ph_mm_min:2.65,w_mm_min:4.05,h_mm_min:2.65,courtyard_width_mm:4.56,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:.723737,line_y_mm:1.355,stroke_width_mm:.12}},{imperial:\"2010\",metric:\"5025\",p_mm_min:4.625,pw_mm_min:1.225,ph_mm_min:2.65,w_mm_min:5.85,h_mm_min:2.65,courtyard_width_mm:6.36,courtyard_height_mm:3.16,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:1.527064,line_y_mm:1.36,stroke_width_mm:.12}},{imperial:\"2512\",metric:\"6332\",p_mm_min:5.925,pw_mm_min:1.225,ph_mm_min:3.35,w_mm_min:7.15,h_mm_min:3.35,courtyard_width_mm:7.66,courtyard_height_mm:3.86,rounded_pads:!0,nonpolarizedSilkscreen:{line_half_length_mm:2.177064,line_y_mm:1.71,stroke_width_mm:.12}}],Nmi=Object.fromEntries(Frn.map(t=\u003e[t.metric,t])),Rmi=Object.fromEntries(Frn.map(t=\u003e[t.imperial,t])),Lrn=(t,e)=\u003e({type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:t,height:e,layer:\"top\"});Ci.extend({fn:Z().optional(),string:Z().optional(),tht:je(),p:ce.optional(),pw:ce.optional(),ph:ce.optional(),metric:lt.optional(),imperial:lt.optional(),w:ce.optional(),h:ce.optional(),cyw:ce.optional().describe(\"courtyard width\"),cyh:ce.optional().describe(\"courtyard height\"),nonpolarized:je().optional(),textbottom:je().optional(),roundedPads:je().optional()});var gpe=t=\u003e{let{fn:e,tht:n,p:o,pw:i,ph:r,metric:s,imperial:a,w:A,h:c,cyw:l,cyh:u,nonpolarized:g,textbottom:h,roundedPads:d,string:p}=t;if(typeof A==\"string\"\u0026\u0026(A=Bd(A)),typeof c==\"string\"\u0026\u0026(c=Bd(c)),typeof l==\"string\"\u0026\u0026(l=Bd(l)),typeof u==\"string\"\u0026\u0026(u=Bd(u)),typeof o==\"string\"\u0026\u0026(o=Bd(o)),typeof i==\"string\"\u0026\u0026(i=Bd(i)),typeof r==\"string\"\u0026\u0026(r=Bd(r)),c!==void 0\u0026\u0026A!==void 0\u0026\u0026c\u003eA)throw new Error(\"height cannot be greater than width (rotated footprint not yet implemented)\");let m;if(s\u0026\u0026(m=Nmi[s]),a\u0026\u0026(m=Rmi[a]),m\u0026\u0026(A=m.w_mm_min,c=m.h_mm_min,o=m.p_mm_min,i=m.pw_mm_min,r=m.ph_mm_min),o===void 0||i===void 0||r===void 0)throw new Error(\"Could not determine required pad dimensions (p, pw, ph)\");let _=[];const f=e===\"res\"\u0026\u0026(g===!0||typeof p!=\"string\"||/^res(?:\\d{4}|\\d{5})(?:_|$)/i.test(p))?m?.nonpolarizedSilkscreen:void 0;if(f?.stroke_width_mm){const{line_half_length_mm:B=0,line_y_mm:S=0,stroke_width_mm:Q}=f;_=[{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-B,y:S},{x:B,y:S}],stroke_width:Q,pcb_silkscreen_path_id:\"\"},{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-B,y:-S},{x:B,y:-S}],stroke_width:Q,pcb_silkscreen_path_id:\"\"}]}else _=[{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:o/2,y:r/2+.4},{x:-o/2-i/2-.2,y:r/2+.4},{x:-o/2-i/2-.2,y:-r/2-.4},{x:o/2,y:-r/2-.4}],stroke_width:.1,pcb_silkscreen_path_id:\"\"}];const I=h?-r/2-.9:r/2+.9,C=xi(0,I,.2),y=m?.courtyard_width_mm\u0026\u0026m.courtyard_height_mm?Lrn(m.courtyard_width_mm,m.courtyard_height_mm):l!==void 0\u0026\u0026u!==void 0?Lrn(l,u):null,E=d??m?.rounded_pads??!1?Math.min(.125,Math.min(i,r)/8):void 0;return n?[Os(1,-o/2,0,i,i*1/.8),Os(2,o/2,0,i,i*1/.8),..._,C,...y?[y]:[]]:[Wo([\"1\",\"left\"],-o/2,0,i,r,E),Wo([\"2\",\"right\"],o/2,0,i,r,E),..._,C,...y?[y]:[]]},Tmi=t=\u003e{let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)r.type===\"pcb_smtpad\"\u0026\u0026(e=Math.min(e,r.x-r.width/2),n=Math.max(n,r.x+r.width/2),o=Math.min(o,r.y-r.height/2),i=Math.max(i,r.y+r.height/2)),r.type===\"pcb_plated_hole\"\u0026\u0026(e=Math.min(e,r.x-r.outer_diameter/2),n=Math.max(n,r.x+r.outer_diameter/2),o=Math.min(o,r.y-r.outer_diameter/2),i=Math.max(i,r.y+r.outer_diameter/2));if(!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(i))throw new Error(\"Could not determine diode copper bounds\");return{minX:e,maxX:n,minY:o,maxY:i}},Hrn=(t,e={})=\u003edpe(Tmi(t),e),kmi=({anodePin:t,cathodePin:e})=\u003e{if(t!==void 0\u0026\u0026t!==1\u0026\u0026t!==2)throw new Error(\"Diode anode pin must be 1 or 2\");if(e!==void 0\u0026\u0026e!==1\u0026\u0026e!==2)throw new Error(\"Diode cathode pin must be 1 or 2\");if(t!==void 0\u0026\u0026e!==void 0){if(t===e)throw new Error(\"Diode anode and cathode cannot use the same pin\");return e}if(e!==void 0)return e;if(t===1)return 2;if(t===2)return 1},uh=t=\u003e{const e=t.p??t.pad_spacing;if(e===void 0||t.pl===void 0||t.pw===void 0)throw new Error(\"Diode fabrication note requires p or pad_spacing, pl, and pw\");const n=ce.parse(e),o=ce.parse(t.pl),i=ce.parse(t.pw);return dpe({minX:-n/2-o/2,maxX:n/2+o/2,minY:-i/2,maxY:i/2},{anodePin:t.anodepin,cathodePin:t.cathodepin})},dpe=(t,e={})=\u003e{const n=[],o=t.maxX-t.minX,i=t.maxY-t.minY,r=(t.minX+t.maxX)/2,s=(t.minY+t.maxY)/2,A=kmi(e)===1?x=\u003e2*r-x:x=\u003ex,c=i*.28,l=c*2,u=o*.2,h=Math.min(u,l*1.25),d=r-h/2,p=r+h/2,m=h*.18,_=d+m,f=p-m,I=Math.max(Math.min(o,i)*.035,.01),C=Math.max(Math.min(o,i)*.25,.1),y=x=\u003ee.idSuffix?`${x}_${e.idSuffix}`:x;return n.push({type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_anode_leg\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(d),y:s},{x:A(_),y:s}]},{type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_triangle\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(_),y:s+c},{x:A(f),y:s},{x:A(_),y:s-c},{x:A(_),y:s+c}]},{type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_cathode\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(f),y:s+c},{x:A(f),y:s-c}]},{type:\"pcb_fabrication_note_path\",pcb_fabrication_note_path_id:y(\"diode_fabrication_note_cathode_leg\"),pcb_component_id:\"\",layer:\"top\",stroke_width:I,route:[{x:A(f),y:s},{x:A(p),y:s}]},{type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:y(\"diode_fabrication_note_positive\"),pcb_component_id:\"\",layer:\"top\",font:\"tscircuit2024\",font_size:C,text:\"+\",anchor_position:{x:A(t.minX+o*.125),y:s},anchor_alignment:\"center\"},{type:\"pcb_fabrication_note_text\",pcb_fabrication_note_text_id:y(\"diode_fabrication_note_negative\"),pcb_component_id:\"\",layer:\"top\",font:\"tscircuit2024\",font_size:C,text:\"-\",anchor_position:{x:A(t.maxX-o*.125),y:s},anchor_alignment:\"center\"}),n},Fmi=t=\u003e{const e=gpe({...t,roundedPads:!0});return{circuitJson:e.concat(Hrn(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})),parameters:t}},Lmi=t=\u003e({circuitJson:gpe(t),parameters:t}),Hmi=Ci.extend({fn:$e(\"crystal\"),num_pins:$e(4).default(4),px:ce.default(\"2.2mm\").describe(\"horizontal pad center pitch\"),py:ce.default(\"1.7mm\").describe(\"vertical pad center pitch\"),pw:ce.default(\"1.4mm\").describe(\"pad width\"),ph:ce.default(\"1.2mm\").describe(\"pad height\")}),Omi=t=\u003e{const e=Hmi.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Wo(1,-n/2,-o/2,i,r),Wo(2,n/2,-o/2,i,r),Wo(3,n/2,o/2,i,r),Wo(4,-n/2,o/2,i,r)],a=(n+i)/2+.2,A=(o+r)/2+.2,c=sA([{x:-a,y:-A},{x:a,y:-A},{x:a,y:A},{x:-a,y:A},{x:-a,y:-A}]),l=xi(0,A+.6,.5),u={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:\"top\"};return{circuitJson:[...s,c,l,u],parameters:e}},Gmi=t=\u003e{const e=gpe(t);return{circuitJson:e.concat(Hrn(e,{anodePin:t.anodepin,cathodePin:t.cathodepin})).map(o=\u003eo.type!==\"pcb_silkscreen_path\"?o:{...o,route:o.route.map(i=\u003e({...i,x:-i.x}))}),parameters:t}},Ymi=Ci.extend({fn:$e(\"led2835\"),num_pins:$e(2).default(2),p1w:ce.default(\"2.2mm\").describe(\"pin 1 (anode) pad width\"),p2w:ce.default(\"1.25mm\").describe(\"pin 2 (cathode) pad width\"),ph:ce.default(\"2.2mm\").describe(\"pad height\"),p1x:ce.default(\"-0.9mm\").describe(\"pin 1 pad center x\"),p2x:ce.default(\"1.375mm\").describe(\"pin 2 pad center x\"),w:ce.default(\"3.5mm\").describe(\"package body width\"),h:ce.default(\"2.8mm\").describe(\"package body height\")}),Umi=t=\u003e{const e=Ymi.parse(t),{p1w:n,p2w:o,ph:i,p1x:r,p2x:s,w:a,h:A}=e,c=[Wo(1,r,0,n,i),Wo(2,s,0,o,i)],l=a/2+.45,u=A/2+.2,g=[sA([{x:s-o/2,y:-u},{x:-l,y:-u},{x:-l,y:u},{x:s-o/2,y:u}])],h=xi(0,u+.8,.5),d={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(r-n/2+s+o/2)/2,y:0},width:s+o/2-(r-n/2)+.5,height:Math.max(A,i)+.5,layer:\"top\"},p=dpe({minX:Math.min(r-n/2,s-o/2),maxX:Math.max(r+n/2,s+o/2),minY:-i/2,maxY:i/2},{anodePin:e.anodepin,cathodePin:e.cathodepin});return{circuitJson:[...c,...g,h,d,...p],parameters:e}},Kmi=Ci.extend({fn:$e(\"led5050\"),num_pins:$e(6).default(6),p:ce.default(\"1.7mm\").describe(\"pin pitch along each column\"),rowspan:ce.default(\"4.8mm\").describe(\"distance between pad columns\"),pl:ce.default(\"2mm\").describe(\"pad length across the package edge\"),pw:ce.default(\"1.1mm\").describe(\"pad width along the pin column\"),w:ce.default(\"5mm\").describe(\"package body width\"),h:ce.default(\"5mm\").describe(\"package body height\")}),Vmi=t=\u003e{const e=Kmi.parse(t),{p:n,rowspan:o,pl:i,pw:r,w:s,h:a}=e,A=[];for(let m=0;m\u003c3;m++)A.push(Wo(m+1,-o/2,n-m*n,i,r)),A.push(Wo(6-m,o/2,n-m*n,i,r));const c=s/2,l=a/2+.2,u=[sA([{x:-c,y:l},{x:c,y:l}]),sA([{x:-c,y:-l},{x:c,y:-l}]),sA([{x:-o/2-i/2-.4,y:n+r/2},{x:-o/2-i/2-.4,y:n-r/2}])],g=xi(0,l+.8,.5),h={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:o+i+.5,height:Math.max(a,2*n+r)+.5,layer:\"top\"},p=[{color:\"green\",y:n},{color:\"red\",y:0},{color:\"blue\",y:-n}].flatMap(({color:m,y:_})=\u003edpe({minX:-o/2-i/2,maxX:o/2+i/2,minY:_-r/2,maxY:_+r/2},{idSuffix:m}));return{circuitJson:[...A,...u,g,h,...p],parameters:e}},NY=t=\u003e{const{padSpacing:e,padWidth:n,padHeight:o,padPitch:i,numRows:r,textbottom:s,courtyardOutline:a}=t,A=[],c=(r-1)*(i/2);for(let Q=0;Q\u003cr;Q++)A.push(c-Q*i);const l=[];A.forEach((Q,w)=\u003e{l.push(Wo(w+1,-e/2,Q,n,o))}),A.slice().reverse().forEach((Q,w)=\u003e{l.push(Wo(w+r+1,e/2,Q,n,o))});const u=Math.max(...A)+o/2+.4,g=Math.min(...A)-o/2-.4,h=-e/2-n/2-.4,d=e/2+n/2+.4,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d*.5,y:u},{x:h*.5,y:u}],stroke_width:.12,pcb_silkscreen_path_id:\"silkscreen_top\"},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d*.5,y:g},{x:h*.5,y:g}],stroke_width:.12,pcb_silkscreen_path_id:\"silkscreen_bottom\"},_=-e/2,f=Math.max(...A),I=.2,C=_-n/2-.1,y=f+o/2+.1,x={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_marker\",route:[{x:C,y},{x:C-I,y},{x:C,y:y+I},{x:C,y}],stroke_width:.1},E=s?g-.9:u+.9,B=xi(0,E,.2),S=a?{type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:a}:null;return[...l,p,m,x,B,...S?[S]:[]]},zmi=Ci.extend({pw:ce.default(\"0.5mm\"),ph:ce.default(\"0.4mm\"),p:ce.default(\"0.7mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Jmi=1,Wmi=t=\u003e{const e=zmi.parse(t);if(e.concave===!0)return[];const n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:Jmi,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:.95},{x:-1,y:-.95},{x:1,y:-.95},{x:1,y:.95}]})},jmi=Ci.extend({pw:ce.default(\"0.5mm\"),ph:ce.default(\"0.32mm\"),p:ce.default(\"0.5mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),$mi=1,qmi=t=\u003e{const e=jmi.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:$mi,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1,y:1.25},{x:-1,y:-1.25},{x:1,y:-1.25},{x:1,y:1.25}]})},Xmi=Ci.extend({pw:ce.default(\"0.9mm\"),ph:ce.default(\"0.4mm\"),p:ce.default(\"0.8mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),Zmi=1.7,e_i=t=\u003e{const e=Xmi.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:Zmi,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.05},{x:-1.55,y:-1.05},{x:1.55,y:-1.05},{x:1.55,y:1.05}]})},t_i=Ci.extend({pw:ce.default(\"0.9mm\"),ph:ce.default(\"0.4mm\"),p:ce.default(\"0.8mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),n_i=1.7,o_i=t=\u003e{const e=t_i.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:n_i,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.55,y:1.88},{x:-1.55,y:-1.87},{x:1.55,y:-1.87},{x:1.55,y:1.88}]})},i_i=Ci.extend({pw:ce.default(\"0.7mm\"),ph:ce.default(\"0.64mm\"),p:ce.default(\"0.94mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),r_i=1.4,s_i=t=\u003e{const e=i_i.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:r_i,padWidth:n,padHeight:o,padPitch:i,numRows:2,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-1.3,y:1.05},{x:-1.3,y:-1.05},{x:1.3,y:-1.05},{x:1.3,y:1.05}]})},a_i=Ci.extend({pw:ce.default(\"0.9mm\"),ph:ce.default(\"0.9mm\"),p:ce.default(\"1.34mm\"),textbottom:je().optional(),convex:je().optional(),concave:je().optional()}),A_i=3,c_i=t=\u003e{const e=a_i.parse(t),n=Bd(e.pw),o=Bd(e.ph),i=Bd(e.p);return NY({padSpacing:A_i,padWidth:n,padHeight:o,padPitch:i,numRows:4,textbottom:e.textbottom,convex:e.convex,concave:e.concave,courtyardOutline:[{x:-2.21,y:2.85},{x:-2.21,y:-2.85},{x:2.2,y:-2.85},{x:2.2,y:2.85}]})},l_i=t=\u003e{const e=t.array??t.x;if(typeof e==\"number\")return Number.isNaN(e)?void 0:e;if(typeof e==\"string\"){const n=Number.parseInt(e,10);return Number.isNaN(n)?void 0:n}if(typeof t.imperial==\"string\"){const o=t.imperial.match(/x(2|4)$/)?.[1];if(o)return Number.parseInt(o,10)}},u_i=t=\u003et?(typeof t==\"number\"?`${t}`:t).split(/[_x]/)[0]:void 0,g_i=t=\u003e{const e=l_i(t),n=u_i(t.imperial);return e===2\u0026\u0026n===\"0402\"?{circuitJson:Wmi(t),parameters:t}:e===4\u0026\u0026n===\"0402\"?{circuitJson:qmi(t),parameters:t}:e===2\u0026\u0026n===\"0603\"?{circuitJson:e_i(t),parameters:t}:e===4\u0026\u0026n===\"0603\"?{circuitJson:o_i(t),parameters:t}:e===2\u0026\u0026n===\"0606\"?{circuitJson:s_i(t),parameters:t}:e===4\u0026\u0026n===\"1206\"?{circuitJson:c_i(t),parameters:t}:{circuitJson:gpe(t),parameters:t}},Orn=(t,{x:e,y:n,radius:o})=\u003e({type:\"pcb_smtpad\",x:e,y:n,radius:o,layer:\"top\",shape:\"circle\",pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(i=\u003ei.toString()):[t.toString()]}),Grn=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",WB=Z().transform(t=\u003e{const[e,n]=t.split(/[x ]/);return{x:parseFloat(e??\"\"),y:parseFloat(n??\"\")}}).pipe(Pt({x:_t(),y:_t()})),d_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(64),grid:WB.optional(),p:lt.default(\"0.8mm\"),w:ce.optional(),h:ce.optional(),ball:ce.optional().describe(\"ball diameter\"),pad:ce.optional().describe(\"pad width/height\"),circularpads:je().optional().default(!0).describe(\"use circular pads\"),tlorigin:je().optional(),blorigin:je().optional(),trorigin:je().optional(),brorigin:je().optional(),missing:FX.default([])}).transform(t=\u003e{let e=\"tl\";if(t.blorigin\u0026\u0026(e=\"bl\"),t.trorigin\u0026\u0026(e=\"tr\"),t.brorigin\u0026\u0026(e=\"br\"),!t.grid){const o=Math.ceil(Math.sqrt(t.num_pins));t.grid={x:o,y:o}}return t.missing\u0026\u0026(t.missing=t.missing.map(o=\u003e{if(typeof o==\"number\")return o;if(o===\"center\")return\"center\";if(o===\"topleft\")return\"topleft\";const i=o.match(/([A-Z]+)(\\d+)/);if(!i)return o;const r=Grn.indexOf(i[1]),s=Number.parseInt(i[2])-1;return r*t.grid.x+s+1})),{...t,origin:e}}),h_i=t=\u003e{const e=d_i.parse(t);let{num_pins:n,grid:o,p:i,w:r,h:s,ball:a,pad:A,missing:c}=e;a??=.75/1.27*i,A??=e.ball===void 0?i*.5:a*.8;const l=[],u=(c??[]).filter(Y=\u003etypeof Y==\"number\"),g=o.x*o.y-n;if(c.length===0\u0026\u0026g\u003e0\u0026\u0026(Math.sqrt(g)%1===0?c.push(\"center\"):g===1\u0026\u0026c.push(\"topleft\")),c?.includes(\"center\")){const Y=Math.floor(Math.sqrt(g)),W=Math.floor((o.x-Y)/2),te=Math.floor((o.y-Y)/2);for(let j=te;j\u003cte+Y;j++)for(let J=W;J\u003cW+Y;J++)u.push(j*o.x+J+1)}c?.includes(\"topleft\")\u0026\u0026u.push(1);const h=new Set(u);let d=0;for(let Y=0;Y\u003co.y;Y++)for(let W=0;W\u003co.x;W++){const te=(W-(o.x-1)/2)*i,j=(Y-(o.y-1)/2)*i;let J=W,oe=Y;switch(e.origin){case\"bl\":J=W,oe=o.y-1-Y;break;case\"br\":J=o.x-1-W,oe=o.y-1-Y;break;case\"tr\":J=o.x-1-W,oe=Y;break}let ie=oe*o.x+J+1;if(h.has(ie)){d++;continue}ie-=d;const ne=[ie,`${Grn[oe]}${J+1}`];l.push(e.circularpads?Orn(ne,{x:te,y:j,radius:A/2}):Wo(ne,te,j,A,A))}const p=xi(0,o.y*i/2,.2),m=i/6;let _;const f=o.x*i/2,I=o.y*i/2;switch(e.origin){case\"bl\":_=[{x:-f,y:-I},{x:-f,y:-I-m},{x:-f-m,y:-I},{x:-f,y:-I}];break;case\"br\":_=[{x:f,y:-I},{x:f,y:-I-m},{x:f+m,y:-I},{x:f,y:-I}];break;case\"tr\":_=[{x:f,y:I},{x:f,y:I+m},{x:f+m,y:I},{x:f,y:I}];break;default:_=[{x:-f,y:I},{x:-f,y:I+m},{x:-f-m,y:I},{x:-f,y:I}];break}const C={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_marker\",route:_,stroke_width:.05},y=(o.x-1)*i+A,x=(o.y-1)*i+A,E=r??y,B=s??x,S=Math.max(y/2,E/2),Q=Math.max(x/2,B/2),w=1.715,M=1.765,k=S+w,R=k,F=Q+M,O=F,U={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:s2([{minX:-k,maxX:k,minY:-O,maxY:O},{minX:-R,maxX:R,minY:-F,maxY:F}]),layer:\"top\"};return{circuitJson:[...l,p,C,U],parameters:e}},cT=(t,e,n,o,i)=\u003e({type:\"pcb_smtpad\",x:e,y:n,width:o,height:i,radius:Math.min(o,i)/2,layer:\"top\",shape:\"pill\",pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(r=\u003er.toString()):[t.toString()]}),RY={thermalpadcenteroffsetx:ce.optional().default(0),thermalpadcenteroffsety:ce.optional().default(0)},hP=(t,e)=\u003eWo([\"thermalpad\"],e.x,e.y,t.x,t.y),lT=t=\u003eCi.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(t.w??\"5.3mm\")),p:ce.default(ce.parse(t.p??\"1.27mm\")),pw:ce.default(ce.parse(t.pw??\"0.6mm\")),pl:ce.default(ce.parse(t.pl??\"1.0mm\")),legsoutside:je().optional().default(t.legsoutside??!1),pillpads:je().optional().default(t.pillpads??!1),thermalpad:WB.optional(),...RY,silkscreen_stroke_width:_t().optional().default(.1)}).transform(e=\u003e(!e.pw\u0026\u0026!e.pl?(e.pw=ce.parse(\"0.6mm\"),e.pl=ce.parse(\"1.0mm\")):e.pw?e.pl||(e.pl=e.pw*(1/.6)):e.pw=e.pl*(.6/1),e)),p_i=lT({}),UVe=t=\u003e{t.widthincludeslegs!==void 0\u0026\u0026(t.legsoutside=!t.widthincludeslegs);const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n\u003c=a,c=a-1,l=i,u=l*c,g=s?r/2:-r/2;return A?{x:-o/2-g,y:u/2-(n-1)*l}:{x:o/2+g,y:-u/2+(n-a-1)*l}},m_i=t=\u003e{const e=p_i.parse(t);return{circuitJson:LX(e),parameters:e}},LX=t=\u003e{const e=[],n=Math.min(t.pl,t.pw)/8;let o=0,i=0;for(let _=0;_\u003ct.num_pins;_++){const{x:f,y:I}=UVe({num_pins:t.num_pins,pn:_+1,w:t.w,p:t.p,pl:t.pl,legsoutside:t.legsoutside});o=Math.max(o,Math.abs(f)+t.pl/2),i=Math.max(i,Math.abs(I)+t.pw/2),t.pillpads?e.push(cT(_+1,f,I,t.pl,t.pw)):e.push(Wo(_+1,f,I,t.pl,t.pw,n))}t.thermalpad\u0026\u0026e.push(hP(t.thermalpad,{x:t.thermalpadcenteroffsetx,y:t.thermalpadcenteroffsety}));const r=Math.min(1,t.p/2),s=t.w-(t.legsoutside?0:t.pl*2)-.2,a=(t.num_pins/2-1)*t.p+t.pw+r,A=xi(0,a/2+.4,a/12),c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",stroke_width:t.silkscreen_stroke_width??.1,route:[{x:-s/2,y:-a/2},{x:-s/2,y:a/2},...lpe.map(({x:_,y:f})=\u003e({x:_*s/6,y:f*s/6+a/2})),{x:s/2,y:a/2},{x:s/2,y:-a/2},{x:-s/2,y:-a/2}]},l=t.w/2,u=a/2,g=Math.max(o,l)+.25,h=Math.min(i,u)+.25,d=Math.min(o,l)+.25,p=Math.max(i,u)+.25,m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-g,maxX:g,minY:-h,maxY:h},{minX:-d,maxX:d,minY:-p,maxY:p}])};return[...e,c,A,m]},__i=({num_pins:t,sidePinCounts:e,cw:n,ccw:o,startingpin:i})=\u003e{const r=[],s=e.left,a=s+1,A=e.left+e.bottom,c=A+1,l=e.left+e.bottom+e.right,u=l+1;let g=1;const h={};for(const d of i??[])h[d]=!0;!h.leftside\u0026\u0026!h.topside\u0026\u0026!h.rightside\u0026\u0026!h.bottomside\u0026\u0026(h.leftside=!0),!h.bottompin\u0026\u0026!h.leftpin\u0026\u0026!h.rightpin\u0026\u0026!h.toppin\u0026\u0026(h.leftside?h.toppin=!0:h.topside?h.rightpin=!0:h.rightside?h.bottompin=!0:h.bottomside\u0026\u0026(h.leftpin=!0)),h.leftside\u0026\u0026h.toppin?g=1:h.leftside\u0026\u0026h.bottompin?g=s:h.bottomside\u0026\u0026h.leftpin?g=a:h.bottomside\u0026\u0026h.rightpin?g=A:h.rightside\u0026\u0026h.bottompin?g=c:h.rightside\u0026\u0026h.toppin?g=l:h.topside\u0026\u0026h.rightpin?g=u:h.topside\u0026\u0026h.leftpin\u0026\u0026(g=t),r.push(-1);for(let d=0;d\u003ct;d++)r[g]=d+1,o||!n?(g++,g\u003et\u0026\u0026(g=1)):(g--,g\u003c1\u0026\u0026(g=t));return r},Yrn=(t,e,n,o)=\u003e{if(e!==void 0\u0026\u0026o!==void 0\u0026\u0026e!==o)throw new Error(`Conflicting ${t} (${e}) and ${n} (${o})`);return o??e},Urn=t=\u003e{const e=Yrn(\"lrpins\",t.lrpins,\"leftrightpins\",t.leftrightpins),n=Yrn(\"tbpins\",t.tbpins,\"topbottompins\",t.topbottompins),o=t.num_pins/4,i={left:t.leftpins??e??o,top:t.toppins??n??o,right:t.rightpins??e??o,bottom:t.bottompins??n??o};if([t.leftpins,t.toppins,t.rightpins,t.bottompins,t.lrpins,t.leftrightpins,t.tbpins,t.topbottompins].some(s=\u003es!==void 0)){const s=Object.entries(i),a=s.find(([,c])=\u003e!Number.isInteger(c)||c\u003c1);if(a)throw new Error(`Quad ${a[0]} pin count must be a positive integer, got ${a[1]}`);const A=s.reduce((c,[,l])=\u003ec+l,0);if(A!==t.num_pins)throw new Error(`Quad side pin counts left=${i.left}, top=${i.top}, right=${i.right}, bottom=${i.bottom} require ${A} pins, got ${t.num_pins}`)}return i},Krn=Kn([\"leftside\",\"topside\",\"rightside\",\"bottomside\",\"toppin\",\"bottompin\",\"leftpin\",\"rightpin\"]),pP=S5.number().int().positive().optional(),hpe=Ci.extend({fn:Z(),cc:je().default(!0).optional(),ccw:je().default(!0).optional(),startingpin:Z().or(dn(Krn)).transform(t=\u003etypeof t==\"string\"?t.slice(1,-1).split(\",\"):t).pipe(dn(Krn)).optional(),num_pins:_t().optional().default(64),leftpins:pP,toppins:pP,rightpins:pP,bottompins:pP,lrpins:pP,leftrightpins:pP,tbpins:pP,topbottompins:pP,w:ce.optional(),h:ce.optional(),p:ce.default(ce.parse(\"0.5mm\")),px:ce.optional().describe(\"top and bottom side pad pitch\"),py:ce.optional().describe(\"left and right side pad pitch\"),pw:ce.optional(),pl:ce.optional(),lrpw:ce.optional().describe(\"alias for leftrightpadwidth\"),lrpl:ce.optional().describe(\"alias for leftrightpadlength\"),leftrightpadwidth:ce.optional().describe(\"left and right side pad width\"),leftrightpadlength:ce.optional().describe(\"left and right side pad length\"),thermalpad:xo([$e(!0),WB]).optional(),...RY,pillpads:je().optional().default(!1),legsoutside:je().default(!1)}),ppe=t=\u003e{if(t.lrpw!==void 0\u0026\u0026t.leftrightpadwidth!==void 0\u0026\u0026t.lrpw!==t.leftrightpadwidth)throw new Error(`Conflicting lrpw (${t.lrpw}) and leftrightpadwidth (${t.leftrightpadwidth})`);if(t.lrpl!==void 0\u0026\u0026t.leftrightpadlength!==void 0\u0026\u0026t.lrpl!==t.leftrightpadlength)throw new Error(`Conflicting lrpl (${t.lrpl}) and leftrightpadlength (${t.leftrightpadlength})`);t.leftrightpadwidth=t.leftrightpadwidth??t.lrpw,t.leftrightpadlength=t.leftrightpadlength??t.lrpl,t.w\u0026\u0026!t.h?t.h=t.w:!t.w\u0026\u0026t.h\u0026\u0026(t.w=t.h);const e=Urn(t),n=Math.max(e.top,e.bottom),o=Math.max(e.left,e.right),i=t.px??t.p,r=t.py??t.p;if(!t.p\u0026\u0026!t.pw\u0026\u0026!t.pl\u0026\u0026t.w){const s=n+4;t.p=t.w/s}if(!t.p\u0026\u0026t.w\u0026\u0026t.h\u0026\u0026t.pw\u0026\u0026t.pl){const s=(t.w-t.pl*2)/Math.max(n-1,1),a=(t.h-t.pl*2)/Math.max(o-1,1);t.p=(s+a)/2}return!t.w\u0026\u0026!t.h\u0026\u0026t.p\u0026\u0026(t.w=i*(n+4),t.h=r*(o+4)),t.p\u0026\u0026!t.pw\u0026\u0026!t.pl?(t.pw=t.p/2,t.pl=t.p/2):t.pw?t.pl||(t.pl=t.pw*(1/.6)):t.pw=t.pl*(.6/1),t},Vrn=hpe.transform(ppe),f_i=[\"left\",\"bottom\",\"right\",\"top\"],I_i=t=\u003e{const{sidePinCounts:e,pn:n,w:o,h:i,p:r,px:s,py:a,pl:A,leftRightPadLength:c,legsoutside:l}=t,u=[e.left,e.bottom,e.right,e.top];let g=0,h=n-1;for(;g\u003cu.length-1\u0026\u0026h\u003e=u[g];)h-=u[g],g+=1;const d=u[g],p=f_i[g],m=p===\"left\"||p===\"right\"?a??r:s??r,_=p===\"left\"||p===\"right\"?c??A:A,f=m*(d-1),I=m*(d-1),C=l?_/2:-_/2;switch(p){case\"left\":return{x:-o/2-C+.1,y:I/2-h*m,o:\"vert\"};case\"bottom\":return{x:-f/2+h*m,y:-i/2-C+.1,o:\"horz\"};case\"right\":return{x:o/2+C-.1,y:-I/2+h*m,o:\"vert\"};case\"top\":return{x:f/2-h*m,y:i/2+C-.1,o:\"horz\"};default:throw new Error(\"Invalid pin number\")}},uT=t=\u003e{const e=Vrn.parse(t),n=e.leftrightpadwidth??e.lrpw??e.pw,o=e.leftrightpadlength??e.lrpl??e.pl,i=Urn(e),r=[];let s=0,a=0;const A=__i({...e,sidePinCounts:i}),c=Math.max(i.left,i.right),l=Math.max(i.top,i.bottom),u=i.left,g=u+1,h=i.left+i.bottom,d=h+1,p=i.left+i.bottom+i.right,m=p+1,_=e.num_pins;for(let R=0;R\u003ce.num_pins;R++){const{x:F,y:O,o:U}=I_i({sidePinCounts:i,pin_count:e.num_pins,pn:R+1,w:e.w,h:e.h,p:e.p??.5,px:e.px,py:e.py,pl:e.pl,leftRightPadLength:o,legsoutside:e.legsoutside}),Y=U===\"vert\";let W=Y?n:e.pw,te=Y?o:e.pl;U===\"vert\"\u0026\u0026([W,te]=[te,W]);const j=Math.min(W,te)/8,J=A[R+1];s=Math.max(s,Math.abs(F)+W/2),a=Math.max(a,Math.abs(O)+te/2),r.push(e.pillpads?cT(J,F,O,W,te):Wo(J,F,O,W,te,j))}if(e.thermalpad){const R={x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety};if(typeof e.thermalpad==\"boolean\"){const F=(e.px??e.p)*(l-1)+e.pw,O=(e.py??e.p)*(c-1)+n;s=Math.max(s,Math.abs(R.x)+F/2),a=Math.max(a,Math.abs(R.y)+O/2),r.push(hP({x:F,y:O},R))}else s=Math.max(s,Math.abs(R.x)+e.thermalpad.x/2),a=Math.max(a,Math.abs(R.y)+e.thermalpad.y/2),r.push(hP(e.thermalpad,R))}const f=[];for(const[R,F,O]of[[\"top-left\",-1,1],[\"bottom-left\",-1,-1],[\"bottom-right\",1,-1],[\"top-right\",1,1]]){const U=e.w/2*F,Y=e.h/2*O;let W=\"none\",te=U,j=Y;const J=e.pw*2;A[1]===1\u0026\u0026R===\"top-left\"?W=\"in1\":A[_]===1\u0026\u0026R===\"top-left\"||A[m]===1\u0026\u0026R===\"top-right\"?W=\"in2\":A[p]===1\u0026\u0026R===\"top-right\"||A[u]===1\u0026\u0026R===\"bottom-left\"?W=\"in1\":A[g]===1\u0026\u0026R===\"bottom-left\"?W=\"in2\":A[h]===1\u0026\u0026R===\"bottom-right\"?W=\"in1\":A[d]===1\u0026\u0026R===\"bottom-right\"\u0026\u0026(W=\"in2\");const oe=W===\"in1\"?1:-1;if(e.legsoutside){const ie=W===\"in1\"?e.pl/2:e.pw/2,ne=W===\"in1\"?e.pw/2:e.pl/2;te+=ie*F*oe,j-=ne*O*oe}(W===\"none\"||e.legsoutside)\u0026\u0026f.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}`,route:[{x:U-J*F,y:Y},{x:U,y:Y},{x:U,y:Y-J*O}],type:\"pcb_silkscreen_path\",stroke_width:.1}),(W===\"in1\"||W===\"in2\")\u0026\u0026!e.legsoutside\u0026\u0026f.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_1`,route:[{x:U-J*F,y:Y},{x:U-J*F/2,y:Y}],type:\"pcb_silkscreen_path\",stroke_width:0},{layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_2`,route:[{x:U,y:Y-J*O/2},{x:U,y:Y-J*O}],type:\"pcb_silkscreen_path\",stroke_width:.1}),(W===\"in1\"||W===\"in2\")\u0026\u0026f.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:`pcb_silkscreen_path_${R}_3`,route:[{x:te-.2*-F,y:j+.2*oe},{x:te,y:j},{x:te+.2*oe*-F,y:j+.2},{x:te-.2*-F,y:j+.2*oe}],type:\"pcb_silkscreen_path\",stroke_width:.1})}const I=xi(0,e.h/2+(e.legsoutside?e.pl*1.2:.5),.3),C=R=\u003eMath.ceil(R/.05)*.05,y=(l-1)*(e.px??e.p)+e.pw,x=(c-1)*(e.py??e.p)+n,E=y/2+.25,B=x/2+.25,S=e.w/2+.25,Q=e.h/2+.25,w=Math.max(S,C(s+.25)),M=Math.max(Q,C(a+.25)),k={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-w,maxX:w,minY:-B,maxY:B},{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-E,maxX:E,minY:-M,maxY:M}])};return{circuitJson:[...r,...f,I,k],parameters:e}},C_i=WB.refine(({x:t,y:e})=\u003eNumber.isInteger(t)\u0026\u0026Number.isInteger(e)\u0026\u0026t\u003e0\u0026\u0026e\u003e0,\"thermal via grid dimensions must be positive integers\"),KVe=ce.refine(t=\u003et\u003e0,{message:\"thermal via dimensions must be positive\"}),VVe=Pt({thermalvias:xo([$e(!0),C_i]).optional(),thermalviapitch:KVe.optional(),thermalviaid:KVe.optional().describe(\"thermal via inner (hole) diameter\"),thermalviaod:KVe.optional().describe(\"thermal via outer diameter\")}),mpe={grid:{x:4,y:4},pitch:ce.parse(\"1mm\"),holeDiameter:ce.parse(\"0.3048mm\"),outerDiameter:ce.parse(\"0.6096mm\")},y_i=(t,e)=\u003e{if(!t.thermalvias)return[];const n=t.thermalvias===!0?mpe.grid:t.thermalvias,o=t.thermalviapitch??mpe.pitch,i=t.thermalviaid??mpe.holeDiameter,r=t.thermalviaod??mpe.outerDiameter;if(r\u003ci)throw new Error(\"thermalviaod must be greater than or equal to thermalviaid\");const s=(n.x-1)*o+r,a=(n.y-1)*o+r;if(s\u003ee.width||a\u003ee.height)throw new Error(\"thermal via grid must fit inside thermalpad\");return Array.from({length:n.x*n.y},(A,c)=\u003e{const l=c%n.x,u=Math.floor(c/n.x);return{pcb_via_id:\"\",type:\"pcb_via\",x:e.x+(l-(n.x-1)/2)*o,y:e.y+(u-(n.y-1)/2)*o,hole_diameter:i,outer_diameter:r,layers:[\"top\",\"bottom\"]}})},zrn=(t,e)=\u003e{if(!e.thermalvias)return t;const n=t.find(o=\u003eo.type===\"pcb_smtpad\"\u0026\u0026o.port_hints.includes(\"thermalpad\"));if(!n)throw new Error(\"thermalvias requires a thermalpad\");return[...t,...y_i(e,n)]};hpe.extend(VVe.shape).transform(ppe);var x_i=t=\u003e{const e={...t,legsoutside:!1,pl:t.pl??.875,pw:t.pw??.25},n=uT(e),o=VVe.parse(t);return{circuitJson:zrn(n.circuitJson,o),parameters:{...n.parameters,...o}}},E_i=t=\u003e{if(t.legsoutside=!0,!t.p)switch(t.num_pins){case 32:t.p=.8;break;case 44:case 48:t.p=.5;break;case 64:case 80:case 100:t.p=.5;break;case 144:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 32:case 44:case 48:case 64:case 80:case 100:t.pl=1.475;break;case 144:t.pl=1.6;break}if(!t.pw)switch(t.num_pins){case 32:t.pw=.55;break;case 44:case 48:case 64:case 80:case 100:t.pw=.3;break;case 144:t.pw=.25;break}return uT(t)},B_i=t=\u003e{t.legsoutside=!0;const e=Vrn.parse(t);if(!t.p)switch(t.num_pins){case 44:case 64:t.p=.8;break;case 52:t.w===14?t.p=1:t.p=.65;break;case 208:t.p=.5;break}if(!t.pl)switch(t.num_pins){case 44:case 52:case 64:t.pl=2.25;break;case 208:t.pl=1.65;break;default:t.pl=e.pl*4;break}if(!t.pw)switch(t.num_pins){case 44:case 64:t.pw=.5;break;case 52:t.w===14?t.pw=.45:t.pw=.55;break;case 208:t.pw=.3;break;default:t.pw=e.pw;break}return uT(t)};hpe.extend({}).transform(ppe);var b_i=t=\u003e(t.legsoutside=!1,t.thermalpad===void 0\u0026\u0026(t.thermalpad=!0),uT(t)),S_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(\"3.9mm\")),p:ce.default(ce.parse(\"1.27mm\")),pw:ce.optional(),pl:ce.optional(),legsoutside:je().optional().default(!1),thermalpad:WB.optional(),...RY,silkscreen_stroke_width:_t().optional().default(.1)}).transform(t=\u003e(t.pw==null\u0026\u0026t.pl==null?(t.pw=ce.parse(\"0.51mm\"),t.pl=ce.parse(\"1.1mm\")):t.pw==null?t.pw=t.pl*(.51/1.1):t.pl==null\u0026\u0026(t.pl=t.pw*(1.1/.51)),t)),Q_i=t=\u003e{const{num_pins:e,pn:n,w:o,p:i}=t,r=e/2,s=n\u003c=r,a=r-1,A=i,c=A*a,l=o+ce.parse(\"0.2mm\"),u=(s?-1:1)*(l/2);return s?{x:u,y:c/2-(n-1)*A}:{x:u,y:-c/2+(n-r-1)*A}},v_i=t=\u003e{const e=S_i.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let _=0;_\u003ce.num_pins;_++){const{x:f,y:I}=Q_i({num_pins:e.num_pins,pn:_+1,w:e.w,p:e.p,pl:e.pl,legsoutside:e.legsoutside});n.push(Wo(_+1,f,I,e.pl,e.pw,o))}e.thermalpad\u0026\u0026n.push(hP(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const i=Math.min(1,e.p/2),r=e.w-(e.legsoutside?0:e.pl)-.2,s=(e.num_pins/2-1)*e.p+e.pw+i,a=xi(0,s/2+.4,s/12),A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",stroke_width:e.silkscreen_stroke_width??.1,route:[{x:-r/2,y:-s/2},{x:-r/2,y:s/2},...lpe.map(({x:_,y:f})=\u003e({x:_*r/6,y:f*r/6+s/2})),{x:r/2,y:s/2},{x:r/2,y:-s/2},{x:-r/2,y:-s/2}]},c=(e.num_pins/2-1)*e.p+e.pw,l=e.legsoutside?e.w/2+e.pl:(e.w+.2)/2+e.pl/2,u=c/2,g=l+.25,h=g,d=u+.445,p=d,m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:s2([{minX:-g,maxX:g,minY:-p,maxY:p},{minX:-h,maxX:h,minY:-d,maxY:d}]),layer:\"top\"};return{circuitJson:[...n,A,a,m],parameters:e}},w_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(8),w:ce.default(ce.parse(\"3.0mm\")),p:ce.default(ce.parse(\"0.5mm\")),pw:ce.default(ce.parse(\"0.30mm\")),pl:ce.default(ce.parse(\"1.45mm\")),legsoutside:je().optional().default(!0),thermalpad:WB.optional(),...RY,silkscreen_stroke_width:_t().optional().default(.1)}),P_i=t=\u003e{const{num_pins:e,pn:n,w:o,p:i,pl:r,legsoutside:s}=t,a=e/2,A=n\u003c=a,c=a-1,l=i*c,u=s?r/2:-r/2;return A?{x:-o/2-u,y:l/2-(n-1)*i}:{x:o/2+u,y:-l/2+(n-a-1)*i}},M_i=t=\u003e{const e={...t},n=e.p,o=typeof n==\"string\"||typeof n==\"number\"?ce.parse(n):void 0,i=o!=null\u0026\u0026o\u003c=ce.parse(\"0.5mm\"),r=w_i.parse(e),s=[],a=r.rounded??Math.min(r.pl,r.pw)/8,A=i?r.w-ce.parse(\"0.15mm\"):r.w;for(let y=0;y\u003cr.num_pins;y++){const{x,y:E}=P_i({num_pins:r.num_pins,pn:y+1,w:A,p:r.p,pl:r.pl,legsoutside:r.legsoutside});s.push(Wo(y+1,x,E,r.pl,r.pw,a))}r.thermalpad\u0026\u0026s.push(hP(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const c=Math.min(1,r.p/2),l=r.w-(r.legsoutside?0:r.pl*2)-.2,u=(r.num_pins/2-1)*r.p+r.pw+c,g=xi(0,u/2+.4,u/12),h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",stroke_width:r.silkscreen_stroke_width??.1,route:[{x:-l/2,y:-u/2},{x:-l/2,y:u/2},...lpe.map(({x:y,y:x})=\u003e({x:y*l/6,y:x*l/6+u/2})),{x:l/2,y:u/2},{x:l/2,y:-u/2},{x:-l/2,y:-u/2}]},d=(r.num_pins/2-1)*r.p+r.pw,p=r.w/2+(r.legsoutside?r.pl:0),m=r.w/2+.25,_=p+.18,f=d/2+.25,I=f+.35,C={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-_,maxX:_,minY:-f,maxY:f},{minX:-m,maxX:m,minY:-I,maxY:I}])};return{circuitJson:[...s,h,g,C],parameters:r}},D_i=[{x:-1.45,y:.93},{x:-.73,y:.93},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.93},{x:1.45,y:.93},{x:1.45,y:-.93},{x:.73,y:-.93},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.93},{x:-1.45,y:-.93}],N_i=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"3.1mm\"),h:Z().default(\"2.0mm\"),p:Z().default(\"0.65mm\"),pl:Z().default(\"1.03mm\"),pw:Z().default(\"0.35mm\"),string:Z().optional()}),R_i=t=\u003e{const e=N_i.parse({...t,fn:\"sot363\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=Jrn(p+1,n,i);A.push(Wo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/4,y:o/2+.1},{x:n/4,y:o/2+.1}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/4,y:-o/2-.1},{x:n/4,y:-o/2-.1}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=Jrn(1,n,i),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=xi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:D_i,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},Jrn=(t,e,n,o)=\u003et\u003c=3?{x:-.84,y:n-(t-1)*n}:{x:.84,y:-n+(t-4)*n},T_i=[{x:-.75,y:1},{x:-.75,y:-1},{x:.75,y:-1},{x:.75,y:1}],k_i=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"1.01mm\"),h:Z().default(\"1.45mm\"),p:Z().default(\"0.5mm\"),pl:Z().default(\"0.33mm\"),pw:Z().default(\"0.27mm\"),string:Z().optional()}),F_i=t=\u003e{const e=k_i.parse({...t,fn:\"sot886\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=Wrn(p+1,n,i,r);A.push(Wo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=Wrn(1,n,i,r),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=xi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:T_i,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},Wrn=(t,e,n,o)=\u003e{const i=e/2-o/2;return t\u003c=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},L_i=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:.55},{x:2.05,y:.55},{x:2.05,y:-.55},{x:1.05,y:-.55},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5},{x:-2.05,y:-.39},{x:-1.05,y:-.39},{x:-1.05,y:.39},{x:-2.05,y:.39}],H_i=[{x:-2.05,y:1.5},{x:-1.05,y:1.5},{x:-1.05,y:1.7},{x:1.05,y:1.7},{x:1.05,y:1.5},{x:2.05,y:1.5},{x:2.05,y:.39},{x:1.05,y:.39},{x:1.05,y:-.39},{x:2.05,y:-.39},{x:2.05,y:-1.5},{x:1.05,y:-1.5},{x:1.05,y:-1.7},{x:-1.05,y:-1.7},{x:-1.05,y:-1.5},{x:-2.05,y:-1.5}],jrn=Ci.extend({fn:Z(),num_pins:_t().default(3),w:Z().default(\"2.275mm\"),h:Z().default(\"2.74mm\"),pl:Z().default(\"1.325mm\"),pw:Z().default(\"0.6mm\"),p:Z().default(\"0.95mm\"),string:Z().optional()}),O_i=lT({p:\"0.95mm\",w:\"1.6mm\",legsoutside:!0}),G_i=t=\u003e{const e=t.string?.match(/^sot23_(\\d+)/),n=e?Number.parseInt(e[1],10):3;if(n===6||n===8){const i=O_i.parse({...t,num_pins:n});return{circuitJson:LX(i),parameters:i}}const o=jrn.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:U_i(o),parameters:o};if(o.num_pins===5)return{circuitJson:qrn(o),parameters:o};throw new Error(\"Invalid number of pins\")},Y_i=t=\u003e{const{pn:e,w:n,p:o}=t;return e===1?{x:-n/2,y:o}:e===2?{x:-n/2,y:-o}:{x:n/2,y:0}},U_i=t=\u003e{const e=[],n=Number.parseFloat(t.w);Number.parseFloat(t.h);const o=Number.parseFloat(t.pl),i=Number.parseFloat(t.pw),r=Number.parseFloat(t.p),s=t.rounded??Math.min(o,i)/8;for(let c=0;c\u003ct.num_pins;c++){const{x:l,y:u}=Y_i({num_pins:t.num_pins,pn:c+1,w:n,p:r});e.push(Wo(c+1,l,u,o,i,s))}const a=xi(0,Number.parseInt(t.h),.3),A={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:L_i,layer:\"top\"};return[...e,a,A]},$rn=t=\u003e{const{w:e,p:n,h:o,pn:i}=t;if(i===1)return{x:-e/2,y:n};if(i===2)return{x:-e/2,y:0};if(i===3)return{x:-e/2,y:-n};if(i===4)return{x:e/2,y:-n};if(i===5)return{x:e/2,y:n};throw new Error(\"Invalid pin number\")},qrn=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.p),r=Number.parseFloat(t.pl),s=Number.parseFloat(t.pw),a=t.rounded??Math.min(r,s)/8;for(let f=1;f\u003c=t.num_pins;f++){const{x:I,y:C}=$rn({w:n,h:o,p:i,pn:f});e.push(Wo(f,I,C,r,s,a))}const A=(t.num_pins+1)/2*i,c=o,l={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-A/3,y:c/2+i/1.3},{x:A/3,y:c/2+i/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-A/3,y:-c/2-i/1.3},{x:A/3,y:-c/2-i/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},g=xi(0,c+.3,.3),h=$rn({w:n,h:o,p:i,pn:1});h.x=h.x-s*1.5;const d=.3,p=.4,m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_indicator\",route:[{x:h.x+d/2,y:h.y},{x:h.x-d/2,y:h.y+p/2},{x:h.x-d/2,y:h.y-p/2},{x:h.x+d/2,y:h.y}],stroke_width:.05},_={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:H_i,layer:\"top\"};return[...e,g,l,u,m,_]},K_i=jrn.extend({}),V_i=t=\u003e{const e=K_i.parse({...t,num_pins:5});return{circuitJson:qrn(e),parameters:e}},z_i=[{name:\"top-left\",dx:-1,dy:1},{name:\"top-right\",dx:1,dy:1},{name:\"bottom-left\",dx:-1,dy:-1},{name:\"bottom-right\",dx:1,dy:-1}],zVe=(t,e)=\u003e({type:\"pcb_smtpad\",points:e,layer:\"top\",shape:\"polygon\",pcb_smtpad_id:\"\",port_hints:Array.isArray(t)?t.map(n=\u003en.toString()):[t.toString()]}),J_i=lT({}).and(VVe),W_i=t=\u003e{const e=je().optional().parse(t.cornerpads),n=t.cornerpadcutlength===void 0?void 0:ce.parse(t.cornerpadcutlength),o=FX.parse(t.missing??[]);if(o.some(S=\u003etypeof S!=\"number\"))throw new Error(\"DFN missing positions must be pad numbers\");const i=[...new Set(o)];if(i.length!==o.length)throw new Error(\"DFN missing positions must not contain duplicates\");const r={...J_i.parse(t),cornerpads:e,cornerpadcutlength:n,missing:i},s=r.num_pins;if(i.some(S=\u003eS\u003c1||S\u003es))throw new Error(\"DFN missing position is outside the nominal pad range\");if(e){if(s!==4||i.length\u003e0||r.pillpads)throw new Error(\"DFN corner pads require four nominal pads with none missing\");if(n===void 0||n\u003c=0||n\u003eMath.min(r.pl,r.pw))throw new Error(\"DFN corner pads require a valid cornerpadcutlength\")}const a=new Set(i),A=[],c=Math.min(r.pl,r.pw)/8;let l=0,u=1;for(let S=1;S\u003c=s;S+=1){if(a.has(S))continue;const{x:Q,y:w}=UVe({num_pins:s,pn:S,w:r.w,p:r.p??1.27,pl:r.pl,widthincludeslegs:!0});if(l=Math.max(l,Math.abs(w)+r.pw/2),e){const M=Math.sign(Q),k=Math.sign(w),R=Q-M*r.pl/2,F=w-k*r.pw/2,O=Q+M*r.pl/2,U=w+k*r.pw/2;A.push(zVe(u,[{x:R,y:F+k*n},{x:R,y:U},{x:O,y:U},{x:O,y:F},{x:R+M*n,y:F}]))}else A.push((r.pillpads?cT:Wo)(u,Q,w,r.pl??\"1mm\",r.pw??\"0.6mm\",c));u+=1}r.thermalpad\u0026\u0026A.push(hP(r.thermalpad,{x:r.thermalpadcenteroffsetx,y:r.thermalpadcenteroffsety}));const g=Math.min(1,r.p/2),h=r.w+g,d=l*2+g,p=[];for(const S of z_i){const{dx:Q,dy:w}=S;p.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",route:[{x:Q*h/2-Q*r.p,y:w*d/2},{x:Q*h/2,y:w*d/2},{x:Q*h/2,y:w*d/2-w*r.p}],type:\"pcb_silkscreen_path\",stroke_width:.1})}const m=r.p/4,_=-h/2-m/2,f=d/2-r.p/2;p.push({layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:_,y:f},{x:_-m,y:f+m},{x:_-m,y:f-m},{x:_,y:f}],stroke_width:.1});const I=xi(0,d/2+.4,d/12),C=S=\u003eMath.ceil(S/.05)*.05,y=C(r.w/2+.25),x=C(l+.45),E={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:y*2,height:x*2,layer:\"top\"},B=[...A,I,...p,E];return{circuitJson:zrn(B,r),parameters:r}};function Xrn({pinlabeltextalignleft:t,pinlabeltextalignright:e,pinlabelorthogonal:n}){let o=\"top\";return n?o=\"left\":o=\"top\",t\u0026\u0026(n?o=\"bottom\":o=\"right\"),e\u0026\u0026(n?o=\"top\":o=\"left\"),o}var gT=({fs:t,pn:e,anchor_x:n,anchor_y:o,textalign:i=\"center\",anchorplacement:r,orthogonal:s=!1,verticallyinverted:a=!1,layer:A=\"top\"})=\u003e{let c=0;s\u0026\u0026a?c=270:a?c=180:s?c=90:c=0;let l=\"center\";if(i!==\"center\"\u0026\u0026(l=i===\"left\"?a?\"center_right\":\"center_left\":a?\"center_left\":\"center_right\",r)){const g={top:{x:0,y:1},bottom:{x:0,y:-1},left:{x:-1,y:0},right:{x:1,y:0}}[r],h=c*Math.PI/180,d={x:Math.cos(h),y:Math.sin(h)},p=g.x*d.x+g.y*d.y;Math.abs(p)\u003e.5\u0026\u0026(l=p\u003e0?\"center_left\":\"center_right\")}return A===\"bottom\"\u0026\u0026(l===\"center_left\"?l=\"center_right\":l===\"center_right\"\u0026\u0026(l=\"center_left\")),{type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:\"silkscreen_text_1\",font:\"tscircuit2024\",font_size:t,pcb_component_id:\"pcb_component_1\",text:`{PIN${e}}`,layer:A,anchor_position:{x:n,y:o},anchor_alignment:l,ccw_rotation:c}},j_i=Ci.extend({fn:Z(),num_pins:_t().optional().default(6),rows:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional().default(1).describe(\"number of rows\"),cols:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional().describe(\"number of nominal columns in a sparse grid\"),p:ce.default(\"0.1in\").describe(\"pitch\"),py:ce.optional().describe(\"vertical row pitch\"),id:ce.default(\"1.0mm\").describe(\"inner diameter\"),od:ce.default(\"1.5mm\").describe(\"outer diameter\"),missing:FX.default([]).describe(\"row-major nominal grid positions to omit\"),male:je().optional().describe(\"for male pin headers\"),female:je().optional().describe(\"for female pin headers\"),smd:je().optional().describe(\"surface mount device\"),surfacemount:je().optional().describe(\"surface mount device (verbose)\"),rightangle:je().optional().describe(\"right angle\"),pw:ce.optional().default(\"1.0mm\").describe(\"pad width for SMD\"),pl:ce.optional().default(\"2.0mm\").describe(\"pad length for SMD\"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nosquareplating:je().optional().default(!1).describe(\"do not use rectangular pad for pin 1\"),nopinlabels:je().optional().default(!1).describe(\"omit silkscreen pin labels\"),doublesidedpinlabel:je().optional().default(!1).describe(\"add silkscreen pins in top and bottom layers\"),bottomsidepinlabel:je().optional().default(!1).describe(\"place the silkscreen reference text on the bottom layer instead of top\"),silkscreenborder:je().optional().default(!1).describe(\"add a rectangular silkscreen border around the pin row\"),silkscreenlabel:Z().transform(t=\u003et.startsWith(\"(\")\u0026\u0026t.endsWith(\")\")?t.slice(1,-1):t).optional().describe(\"replace the reference designator with a custom silkscreen label\")}).transform(t=\u003e{const e=Xrn(t);return{...t,pinlabelAnchorSide:e,male:t.male??!t.female,female:t.female??!1,smd:t.smd??t.surfacemount??!1,rightangle:t.rightangle??!1}}).superRefine((t,e)=\u003e{t.male\u0026\u0026t.female\u0026\u0026e.addIssue({code:lo.custom,message:\"'male' and 'female' cannot both be true; it should be male or female.\",path:[\"male\",\"female\"]}),t.cols!==void 0\u0026\u0026(!Number.isInteger(t.cols)||t.cols\u003c1)\u0026\u0026e.addIssue({code:lo.custom,message:\"'cols' must be a positive integer\",path:[\"cols\"]}),t.missing.some(n=\u003etypeof n!=\"number\")\u0026\u0026e.addIssue({code:lo.custom,message:\"'missing' positions must be pad numbers\",path:[\"missing\"]})}),Zrn=t=\u003e{const e=j_i.parse(t),{p:n,py:o,id:i,od:r,rows:s,cols:a,num_pins:A,missing:c,pinlabelAnchorSide:l,pinlabelverticallyinverted:u,pinlabelorthogonal:g,pinlabeltextalignleft:h,pinlabeltextalignright:d,nopinlabels:p,doublesidedpinlabel:m,bottomsidepinlabel:_,silkscreenborder:f,silkscreenlabel:I}=e;let C=\"center\";h?C=\"left\":d\u0026\u0026(C=\"right\");const y=[];let x=null;const E=c,B=new Set(E);if(B.size!==E.length)throw new Error(\"Pinrow missing positions must not contain duplicates\");const S=A+E.length,Q=a??Math.ceil(S/s),w=Q*s,M=a!==void 0||E.length\u003e0;if(M\u0026\u0026w!==S)throw new Error(`Pinrow grid has ${w} positions, but ${S} are required for ${A} pins and ${E.length} missing positions`);if(E.some(he=\u003e!Number.isInteger(he)||he\u003c1||he\u003ew))throw new Error(\"Pinrow missing position is outside the nominal grid\");const k=o??n,R=(s-1)*k,F=R/2,O=-k,U=({xoff:he,yoff:Qe,od:Pe,anchorSide:we,smd:Te,pw:Re,pl:Ee})=\u003e{let ke=0,Ce=0;if(Te){const Le=Pe/5;switch(we){case\"right\":ke=Re/2+Le;break;case\"top\":Ce=Ee/2+Le;break;case\"bottom\":Ce=-(Ee/2+Le);break;case\"left\":ke=-(Re/2+Le);break}}else{const Le=Pe/2+.6;switch(we){case\"right\":ke=Le;break;case\"top\":Ce=Le;break;case\"bottom\":Ce=-Le;break;case\"left\":ke=-Le;break}}return{anchor_x:he+ke,anchor_y:Qe+Ce}},Y=(he,Qe,Pe)=\u003e{he===1\u0026\u0026(x={x:Qe,y:Pe}),e.smd?y.push(Wo(he,Qe,Pe,e.pw,e.pl)):he===1\u0026\u0026!e.nosquareplating?y.push(r2({pn:he,x:Qe,y:Pe,holeDiameter:i,rectPadWidth:r,rectPadHeight:r})):y.push(Os(he,Qe,Pe,i,r));const{anchor_x:we,anchor_y:Te}=U({xoff:Qe,yoff:Pe,od:r,anchorSide:l,smd:e.smd,pw:e.pw,pl:e.pl});p||(_?y.push(gT({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:\"bottom\"})):y.push(gT({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:\"top\"})),m\u0026\u0026y.push(gT({fs:r/5,pn:he,anchor_x:we,anchor_y:Te,anchorplacement:l,textalign:C,orthogonal:g,verticallyinverted:u,layer:\"bottom\"})))},W=new Set;if(M){const he=-((Q-1)/2)*n;let Qe=1;for(let Pe=0;Pe\u003cs;Pe++)for(let we=0;we\u003cQ;we++){const Te=Pe*Q+we+1;if(B.has(Te))continue;const Re=he+we*n,Ee=F+Pe*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Qe++,Re,Ee)}}else if(s===1){const he=-((A-1)/2)*n;for(let Qe=0;Qe\u003cA;Qe++){const Pe=Qe+1,we=he+Qe*n,Te=`${we},0`;if(W.has(Te))throw new Error(`Overlap at ${Te}`);W.add(Te),Y(Pe,we,0)}}else if(s\u003e2\u0026\u0026Q\u003e2){const Qe=-((Q-1)/2)*n;let Pe=1;for(let we=0;we\u003cs\u0026\u0026Pe\u003c=A;we++)for(let Te=0;Te\u003cQ\u0026\u0026Pe\u003c=A;Te++){const Re=Qe+Te*n,Ee=F+we*O,ke=`${Re},${Ee}`;if(W.has(ke))throw new Error(`Overlap at ${ke}`);W.add(ke),Y(Pe++,Re,Ee)}}else{const Qe=-((Q-1)/2)*n;let Pe=1,we=0,Te=s-1,Re=0,Ee=Q-1;for(;Pe\u003c=A\u0026\u0026we\u003c=Te\u0026\u0026Re\u003c=Ee;){for(let ke=we;ke\u003c=Te\u0026\u0026Pe\u003c=A;ke++){const Ce=Qe+Re*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Re++;for(let ke=Re;ke\u003c=Ee\u0026\u0026Pe\u003c=A;ke++){const Ce=Qe+ke*n,Le=F+Te*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}if(Te--,Re\u003c=Ee){for(let ke=Te;ke\u003e=we\u0026\u0026Pe\u003c=A;ke--){const Ce=Qe+Ee*n,Le=F+ke*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}Ee--}if(we\u003c=Te){for(let ke=Ee;ke\u003e=Re\u0026\u0026Pe\u003c=A;ke--){const Ce=Qe+ke*n,Le=F+we*O,Ye=`${Ce},${Le}`;if(W.has(Ye))throw new Error(`Overlap at ${Ye}`);W.add(Ye),Y(Pe++,Ce,Le)}we++}}if(Pe-1\u003cA)throw new Error(`Missing pins: assigned ${Pe-1}, expected ${A}`)}const te=e.smd?e.pw/2:r/2,j=e.smd?e.pl/2:r/2,J=(Q-1)*n,oe=J/2+n/2+1,ie=Math.max(R/2+j+1,n/2+1),ne=f?sA([{x:-oe,y:-ie},{x:oe,y:-ie},{x:oe,y:ie},{x:-oe,y:ie},{x:-oe,y:-ie}]):null,le=(()=\u003e{if(e.fn!==\"headermodule\"||!x)return null;const he=Math.max(.3,Math.min(.6,n/4)),Qe=.15;if(l===\"top\"||l===\"bottom\"){const Ee=Math.sign(x.x)||(l===\"top\"?-1:1),ke=x.x+Ee*(te+Qe),Ce=ke+Ee*he;return sA([{x:ke,y:x.y},{x:Ce,y:x.y-he},{x:Ce,y:x.y+he},{x:ke,y:x.y}],{pcb_component_id:\"pin_marker_1\",pcb_silkscreen_path_id:\"pin_marker_1\"})}const we=Math.sign(x.y)||1,Te=x.y+we*(j+Qe),Re=Te+we*he;return sA([{x:x.x,y:Te},{x:x.x-he,y:Re},{x:x.x+he,y:Re},{x:x.x,y:Te}],{pcb_component_id:\"pin_marker_1\",pcb_silkscreen_path_id:\"pin_marker_1\"})})(),ge=I?{type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:\"silkscreen_text_1\",font:\"tscircuit2024\",font_size:.8,pcb_component_id:\"pcb_component_1\",text:I,layer:\"top\",anchor_position:{x:0,y:0},anchor_alignment:\"center\"}:xi(0,R/2+n,.5),_e=J/2+te,ue=R/2+j,fe=J/2+n/2,pe=R/2+n/2,ye=Math.max(_e+.25,fe+.5),Me=Math.max(ue+.25,pe+.5),ve={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*ye,height:2*Me,layer:\"top\"};return{circuitJson:[...y,...ne?[ne]:[],...le?[le]:[],ge,ve],parameters:e}},$_i=t=\u003eZrn({...t,fn:\"headermodule\"}),q_i=[{x:-1.2,y:.83},{x:-.75,y:.83},{x:-.75,y:.95},{x:.75,y:.95},{x:.75,y:.83},{x:1.2,y:.83},{x:1.2,y:-.83},{x:.75,y:-.83},{x:.75,y:-.95},{x:-.75,y:-.95},{x:-.75,y:-.83},{x:-1.2,y:-.83}],X_i=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"2.1mm\"),h:Z().default(\"2.45mm\"),p:Z().default(\"0.5mm\"),pl:Z().default(\"0.675mm\"),pw:Z().default(\"0.35mm\"),string:Z().optional()}),Z_i=t=\u003e{const e=X_i.parse({...t,fn:\"sot563\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=esn(p+1,n,i,r);A.push(Wo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=esn(1,n,i,r),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=xi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:q_i,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},esn=(t,e,n,o)=\u003e{const i=e/2-o/2;return t\u003c=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},efi=lT({p:\"1.27mm\",w:\"3.9mm\",legsoutside:!0}),tfi=t=\u003e{const e=efi.parse({...t,num_pins:8});return{circuitJson:LX(e),parameters:e}},nfi=lT({p:\"1.27mm\",w:\"7.5mm\",legsoutside:!0}),ofi=t=\u003e{const e=nfi.parse({...t,num_pins:16});return{circuitJson:LX(e),parameters:e}},ifi=Ci.extend({fn:Z(),num_pins:$e(3).default(3),w:Z().default(\"1.2mm\"),h:Z().default(\"1.2mm\"),pw:Z().default(\"0.40mm\"),pl:Z().default(\"0.45mm\"),p:Z().default(\"0.575mm\")}),rfi=t=\u003e{const e=ifi.parse(t),n=afi(e),o=xi(0,ce.parse(e.h),.2),i=1.8,r=1.8,s={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:[{x:-i/2,y:r/2},{x:i/2,y:r/2},{x:i/2,y:-r/2},{x:-i/2,y:-r/2}],layer:\"top\"};return{circuitJson:[...n,o,s],parameters:e}},sfi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:n,y:0}:e===2?{x:-n,y:-.4}:{x:-n,y:.4}},afi=t=\u003e{const e=[];Number.parseFloat(t.w),Number.parseFloat(t.h);const n=Number.parseFloat(t.pl),o=Number.parseFloat(t.pw),i=Number.parseFloat(t.p),r=Math.min(n,o)/8;for(let s=0;s\u003c3;s++){const{x:a,y:A}=sfi({num_pins:t.num_pins,pn:s+1,p:i});e.push(Wo(s+1,a,A,n,o,r))}return e},Afi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"2.36mm\"),h:Z().default(\"1.22mm\"),pl:Z().default(\"0.9mm\"),pw:Z().default(\"1.2mm\"),p:Z().default(\"3.30mm\")}),cfi=t=\u003e{const e=Afi.parse(t),n=ce.parse(e.h),o=xi(0,n/4+.4,.3),s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.7,height:2.3,layer:\"top\"};return{circuitJson:ufi(e).concat(...uh(e),o,s),parameters:e}},lfi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},ufi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=lfi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1125))}return e},gfi=Ci.extend({fn:Z(),p:ce.optional().default(\"2.54mm\"),id:ce.optional().default(\"0.7mm\"),od:ce.optional().default(\"1.4mm\")}),dfi=t=\u003e{const e=gfi.parse(t),{p:n,id:o,od:i}=e,r=[Os(1,-n/2,0,o,i),Os(2,n/2,0,o,i)],s={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2+i+o/2,y:0},{x:n/2-i-o/2,y:0}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},a=xi(0,1.5,.5),A=-n/2,c=n/2,l=i/2,u=i/2,g=A-l-.35,h=c+l+.26,d=u+.35,p=g,m=h,_=d,f={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:s2([{minX:g,maxX:h,minY:-_,maxY:_},{minX:p,maxX:m,minY:-d,maxY:d}]),layer:\"top\"};return{circuitJson:[...r,s,a,f],parameters:e}},hfi=(t,e,n,o,i,r=.1)=\u003e{const s=[],a=[],A=Math.max(1,Math.ceil(Math.PI*n/r)),c=Math.PI/A;for(let l=0;l\u003c=A;l++){const u=l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g\u003ct-o\u0026\u0026h\u003e=e-i/2\u0026\u0026h\u003c=e+i/2||s.push({x:g,y:h})}for(let l=0;l\u003c=A;l++){const u=Math.PI+l*c,g=t+Math.cos(u)*n,h=e+Math.sin(u)*n;g\u003ct-o\u0026\u0026h\u003e=e-i/2\u0026\u0026h\u003c=e+i/2||a.push({x:g,y:h})}return{topArc:s,bottomArc:a}},pfi=Ci.extend({fn:Z(),p:ce.optional().default(\"5mm\"),id:ce.optional().default(\"0.8mm\"),od:ce.optional().default(\"1.6mm\"),ceramic:je().optional(),electrolytic:je().optional(),polarized:je().optional()}),mfi=t=\u003e{const e=pfi.parse(t),{p:n,id:o,od:i}=e;o===.8\u0026\u0026i===1.6\u0026\u0026(e.id=n===5?.8:n*.25,e.od=n===5?1.6:n*.5);const r=[Os(1,-n/2,0,e.id,e.od),Os(2,n/2,0,e.id,e.od)],s=n+.1,{topArc:a,bottomArc:A}=hfi(0,0,s,e.od/2,e.od),c=.02*n,l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:a,stroke_width:c,pcb_silkscreen_path_id:\"\"},u={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:A,stroke_width:c,pcb_silkscreen_path_id:\"\"},g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:0,y:s},{x:0,y:-s}],stroke_width:c,pcb_silkscreen_path_id:\"\"},h=.1*n,d=-(n+h+.04*n),p=s-h-.08*n,m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d-h,y:p},{x:d+h,y:p}],stroke_width:c,pcb_silkscreen_path_id:\"\"},_={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:d,y:p-h},{x:d,y:p+h}],stroke_width:c,pcb_silkscreen_path_id:\"\"},f=xi(0,s+.12*n,.1*n),I=[...r,l,u,g,f];(e.electrolytic===!0||e.polarized===!0)\u0026\u0026I.push(m,_);const y=n+.25,x={type:\"pcb_courtyard_circle\",pcb_courtyard_circle_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},radius:y,layer:\"top\"};return I.push(x),{circuitJson:I,parameters:e}},_fi=Ci.extend({fn:$e(\"rj45\"),num_pins:xo([$e(10),$e(14)]).default(10),ledpins:je().default(!1).describe(\"add the four through-hole LED connections as pins 9 through 12\"),firstpinleft:je().default(!1).describe(\"mirror the eight signal pins so pin 1 is on the left\"),firstpintop:je().default(!1).describe(\"mirror the eight signal pins so pin 1 is in the top row\"),p:ce.default(\"1.02mm\").describe(\"horizontal signal-pin pitch\"),py:ce.default(\"1.78mm\").describe(\"signal-row pitch\"),id:ce.default(\"0.9144mm\").describe(\"signal and LED hole diameter\"),od:ce.default(\"1.524mm\").describe(\"signal and LED outer diameter\"),shieldx:ce.default(\"8.13mm\").describe(\"shield-pin x offset from the footprint center\"),shieldy:ce.default(\"0.13mm\").describe(\"signed shield-pin y offset from the signal-row center\"),shieldid:ce.default(\"1.8mm\").describe(\"shield-pin hole diameter\"),shieldod:ce.default(\"2.5mm\").describe(\"shield-pin outer diameter\"),holex:ce.default(\"6.35mm\").describe(\"locator-hole x offset from the footprint center\"),holey:ce.default(\"-3.43mm\").describe(\"signed locator-hole y offset from the signal-row center\"),holed:ce.default(\"3.25mm\").describe(\"locator-hole diameter\"),ledx:ce.default(\"4.57mm\").describe(\"inner LED-pin x offset from the footprint center\"),ledp:ce.default(\"2.29mm\").describe(\"pitch within each LED-pin pair\"),ledy:ce.default(\"5.7mm\").describe(\"signed LED-pin y offset from the signal-row center\"),w:ce.default(\"16.26mm\").describe(\"connector body width\"),h:ce.default(\"15.88mm\").describe(\"connector body height\"),bodyy:ce.default(\"-0.96mm\").describe(\"signed connector body center y offset\")}),ffi=t=\u003e{const e=t.ledpins===!0||t.num_pins===14,n=_fi.parse({...t,ledpins:e,num_pins:e?14:10}),{ledpins:o,firstpinleft:i,firstpintop:r,p:s,py:a,id:A,od:c,shieldx:l,shieldy:u,shieldid:g,shieldod:h,holex:d,holey:p,holed:m,ledx:_,ledp:f,ledy:I,w:C,h:y,bodyy:x}=n,E=Me=\u003eNumber(Me.toFixed(12)),B=Array.from({length:8},(Me,ve)=\u003e{const he=ve+1,Qe=(3.5-ve)*s,Pe=ve%2===0?-a/2:a/2,we=E(i?-Qe:Qe),Te=E(r?-Pe:Pe);return Os(he,we,Te,A,c)}),S=o?[Os(9,E(-_-f),I,A,c),Os(10,-_,I,A,c),Os(11,_,I,A,c),Os(12,E(_+f),I,A,c)]:[],Q=o?14:9,w=o?13:10,M=i!==r,k=M?w:Q,R=M?Q:w,F=[Os(k,-l,u,g,h),Os(R,l,u,g,h)],O=[-d,d].map(Me=\u003e({type:\"pcb_hole\",pcb_hole_id:\"\",pcb_component_id:\"\",hole_shape:\"circle\",hole_diameter:m,x:Me,y:p})),U=-C/2,Y=C/2,W=x-y/2,te=x+y/2,j=h/2+.2,J=[[W,Math.min(te,u-j)],[Math.max(W,u+j),te]].filter(([Me,ve])=\u003eve-Me\u003e.01),oe=[sA([{x:U,y:W},{x:Y,y:W}]),sA([{x:U,y:te},{x:Y,y:te}]),...J.flatMap(([Me,ve])=\u003e[sA([{x:U,y:Me},{x:U,y:ve}]),sA([{x:Y,y:Me},{x:Y,y:ve}])])],ie=Math.min(-l-h/2,-d-m/2,o?-_-f-c/2:0),ne=-ie,le=Math.min(u-h/2,p-m/2,-a/2-c/2,o?I-c/2:Number.POSITIVE_INFINITY),ge=Math.max(u+h/2,p+m/2,a/2+c/2,o?I+c/2:Number.NEGATIVE_INFINITY),_e=Math.min(U,ie)-.25,ue=Math.max(Y,ne)+.25,fe=Math.min(W,le)-.25,pe=Math.max(te,ge)+.25,ye={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(_e+ue)/2,y:(fe+pe)/2},width:ue-_e,height:pe-fe,layer:\"top\"};return{circuitJson:[...O,...B,...S,...F,...oe,xi(0,pe+.55,.5),ye],parameters:n}},Ifi=Ci.extend({fn:$e(\"pushbutton\"),w:ce.default(4.5),h:ce.default(6.5),id:ce.default(1),od:ce.default(1.2)}),Cfi=t=\u003e{const e=Ifi.parse(t),n=e.w,o=e.h,i=e.id,r=[Os(1,-n/2,o/2,i,i*1.5),Os(2,-n/2,-o/2,i,i*1.5),Os(3,n/2,-o/2,i,i*1.5),Os(4,n/2,o/2,i,i*1.5)],s=[sA([{x:-n/2,y:-o/2},{x:-n/2,y:o/2}]),sA([{x:n/2,y:-o/2},{x:n/2,y:o/2}]),sA([{x:-n/2,y:0},{x:-n/5,y:0},{x:n/5*1/Math.sqrt(2),y:o/8}]),sA([{x:n/2,y:0},{x:n/5,y:0}])],a=xi(0,o/2+.4,.5),A=i*1.5/2,c=n,l=o,u=c/2+A,g=l/2+A,h=u+.5,d=g+.5,p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*h,height:2*d,layer:\"top\"};return{circuitJson:[...r,...s,a,p],parameters:e}},tsn=Ci.extend({fn:Z(),w:ce.default(\"22.58mm\"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse(\"2.54mm\")),pw:ce.default(ce.parse(\"1.6mm\")),pl:ce.default(ce.parse(\"2.4mm\")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse(\"1.61mm\")),silkscreenlabels:je().default(!1),silkscreenlabelmargin:ce.default(ce.parse(\"0.1mm\"))}),yfi=t=\u003e{const e=tsn.parse(t);return e.left\u0026\u0026e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},_pe=(t,e,n)=\u003e{let o=[];return n===\"right\"\u0026\u0026(o=[{x:t+1/2,y:e},{x:t-1/2,y:e+.6/2},{x:t-1/2,y:e-.6/2},{x:t+1/2,y:e}]),n===\"left\"\u0026\u0026(o=[{x:t-1/2,y:e},{x:t+1/2,y:e+.6/2},{x:t+1/2,y:e-.6/2},{x:t-1/2,y:e}]),n===\"top\"\u0026\u0026(o=[{x:t,y:e+1/2},{x:t-.6/2,y:e-1/2},{x:t+.6/2,y:e-1/2},{x:t,y:e+1/2}]),n===\"bottom\"\u0026\u0026(o=[{x:t,y:e-1/2},{x:t-.6/2,y:e+1/2},{x:t+.6/2,y:e+1/2},{x:t,y:e-1/2}]),o},xfi=t=\u003e{const e=tsn.parse(t),n=e.h??yfi(e),o=[],i=[],r=[];let s=[];const a=1,A=a,c=e.left+e.right+(e.bottom??0)+(e.top??0),u=`pin${c}`.length*.7/2;if(e.right){const p=-((e.right-1)/2)*e.p;for(let m=0;m\u003ce.right;m++){if(m===0\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=_pe(e.w/2-e.pl*1.4,p+m*e.p,\"right\")),o.push(Wo(m+1+e.left+(e.bottom??0),e.w/2-e.pl/2,p+m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1+e.left+(e.bottom??0),f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:e.w/2-e.pl-(u+e.silkscreenlabelmargin),y:p+m*e.p},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"})}e.innerhole\u0026\u0026(i.push(Os(m+1+e.left+(e.bottom??0)+c,e.w/2,p+m*e.p,a,A)),i.push(Os(m+1+e.left+(e.bottom??0)+c*2,e.w/2-e.innerholeedgedistance,p+m*e.p,a,A)))}}if(e.left){const p=(e.left-1)/2*e.p;for(let m=0;m\u003ce.left;m++){if(m===0\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=_pe(-e.w/2+e.pl*1.4,p-m*e.p,\"left\")),o.push(Wo(m+1,-e.w/2+e.pl/2,p-m*e.p,e.pl,e.pw)),e.silkscreenlabels){const _=m+1,f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:-e.w/2+e.pl+(u+e.silkscreenlabelmargin),y:p-m*e.p},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"})}e.innerhole\u0026\u0026(i.push(Os(m+1+c,-e.w/2,p-m*e.p,a,A)),i.push(Os(m+1+c*2,-e.w/2+e.innerholeedgedistance,p-m*e.p,a,A)))}}if(e.top){const p=(e.top-1)/2*e.p;for(let m=0;m\u003ce.top;m++){if(m===0\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026!e.right\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=_pe(p-m*e.p,n/2-e.pl*1.4,\"top\")),o.push(Wo(m+1+e.left+e.right+(e.bottom??0),p-m*e.p,n/2-e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left+e.right+(e.bottom??0),f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:p-m*e.p,y:n/2-e.pl-(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\",ccw_rotation:270})}e.innerhole\u0026\u0026(i.push(Os(m+1+e.left+e.right+(e.bottom??0)+c,p-m*e.p,n/2,a,A)),i.push(Os(m+1+e.left+e.right+(e.bottom??0)+c*2,p-m*e.p,n/2-e.innerholeedgedistance,a,A)))}}if(e.bottom){const p=-((e.bottom-1)/2)*e.p;for(let m=0;m\u003ce.bottom;m++){if(m===0\u0026\u0026!e.left\u0026\u0026!e.silkscreenlabels\u0026\u0026(s=_pe(p+m*e.p,-n/2+e.pl*1.4,\"bottom\")),o.push(Wo(m+1+e.left,p+m*e.p,-n/2+e.pl/2,e.pw,e.pl)),e.silkscreenlabels){const _=m+1+e.left,f=`pin${_}`;r.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${_}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:p+m*e.p,y:-n/2+e.pl+(u+e.silkscreenlabelmargin)},text:f,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\",ccw_rotation:90})}e.innerhole\u0026\u0026(i.push(Os(m+1+e.left+c,p+m*e.p,-n/2,a,A)),i.push(Os(m+1+e.left+c*2,p+m*e.p,-n/2+e.innerholeedgedistance,a,A)))}}const g={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_triangle_1\",pcb_component_id:\"2\",route:s,stroke_width:.1,layer:\"top\"},h={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_path_1\",pcb_component_id:\"1\",route:[{x:-e.w/2,y:n/2},{x:e.w/2,y:n/2},{x:e.w/2,y:-n/2},{x:-e.w/2,y:-n/2},{x:-e.w/2,y:n/2}],stroke_width:.1,layer:\"top\"},d=xi(0,n/1.8,n/25);return{circuitJson:[...o,...i,...r,h,...e.silkscreenlabels?[]:[g],d],parameters:e}},nsn=Ci.extend({fn:Z(),w:ce.default(\"22.58mm\"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(2),bottom:ce.optional().default(2),p:ce.default(ce.parse(\"2.54mm\")),pw:ce.default(ce.parse(\"1.6mm\")),pl:ce.default(ce.parse(\"3.2mm\")),innerhole:je().default(!1),innerholeedgedistance:ce.default(ce.parse(\"1.61mm\"))}),Efi=t=\u003e{const e=nsn.parse(t);return e.left\u0026\u0026e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},Bfi=(t,e,n,o=1,i=.6)=\u003e{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},bfi=t=\u003e{const e=nsn.parse(t),n=e.h??Efi(e),o=[],i=[],r=[],s=1,a=1.2,A=e.left+e.right+(e.bottom??0)+(e.top??0);let c=[],l=1;if(e.left){const d=(e.left-1)/2*e.p;for(let p=0;p\u003ce.left;p++)p===0\u0026\u0026(c=Bfi(-e.w/2-e.pl/2,d-p*e.p,\"left\")),o.push(Wo(l,-e.w/2+e.pl/2,d-p*e.p,e.pl,e.pw)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:-e.w/2+e.pl/2-4.5,y:d-p*e.p},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(Os(l+A,-e.w/2+e.innerholeedgedistance,d-p*e.p,s,a))}if(e.bottom){const d=(e.bottom-1)/2*e.p;for(let p=e.bottom-1;p\u003e=0;p--)o.push(Wo(l,d-p*e.p,-n/2+e.pl/2,e.pw,e.pl)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:d-p*e.p,y:-n/2+e.pl/2-3.2},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(Os(l+A,d-p*e.p,-n/2+e.innerholeedgedistance,s,a))}if(e.right){const d=-((e.right-1)/2)*e.p;for(let p=0;p\u003ce.right;p++)o.push(Wo(l,e.w/2-e.pl/2,d+p*e.p,e.pl,e.pw)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:e.w/2-e.pl/2+3.7,y:d+p*e.p},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(Os(l+A,e.w/2-e.innerholeedgedistance,d+p*e.p,s,a))}if(e.top){const d=-((e.top-1)/2)*e.p;for(let p=e.top-1;p\u003e=0;p--)o.push(Wo(l,d+p*e.p,n/2-e.pl/2,e.pw,e.pl)),i.push({type:\"pcb_silkscreen_text\",pcb_silkscreen_text_id:`pin_${l}`,pcb_component_id:\"1\",layer:\"top\",anchor_position:{x:d+p*e.p,y:n/2-e.pl/2+3.2},text:`pin${l}`,font_size:.7,font:\"tscircuit2024\",anchor_alignment:\"center\"}),l++,e.innerhole\u0026\u0026r.push(Os(l+A,d+p*e.p,n/2-e.innerholeedgedistance,s,a))}const u={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"1\",pcb_component_id:\"1\",layer:\"top\",route:c,stroke_width:.1},g={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_path_1\",pcb_component_id:\"1\",route:[{x:-e.w/2-e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:n/2+e.pl/3},{x:e.w/2+e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:-n/2-e.pl/3},{x:-e.w/2-e.pl/3,y:n/2+e.pl/3}],stroke_width:.1,layer:\"top\"},h=xi(0,n/1.8,n/25);return{circuitJson:[...r,...o,...i,g,u,h],parameters:e}},Sfi=t=\u003e(t.legsoutside=!0,t.pl||(t.pl=1.5),t.pw||(t.pw=.3),uT(t)),Qfi=Ci.extend({fn:Z(),num_pins:_t().int().positive().optional().default(14),grid:WB.optional(),p:ce.default(ce.parse(\"0.5mm\")),w:ce.optional(),h:ce.optional(),pw:ce.default(ce.parse(\"0.28mm\")),pl:ce.default(ce.parse(\"0.7mm\")),pillpads:je().optional().default(!1)}),vfi=t=\u003e{const e=Qfi.parse(t),n=e.num_pins/2;if(!Number.isInteger(n))throw new Error(\"LGA footprints require an even number of perimeter pads\");const o=e.grid??{x:Math.ceil(n/2),y:Math.floor(n/2)};if(!Number.isInteger(o.x)||!Number.isInteger(o.y)||o.x\u003c0||o.y\u003c0||o.x+o.y\u003c=0||2*(o.x+o.y)!==e.num_pins)throw new Error(`LGA grid ${o.x}x${o.y} requires ${2*(o.x+o.y)} pads, got ${e.num_pins}`);const i=e.w??(o.y-1)*e.p+2*e.pl,r=e.h??(o.x-1)*e.p+2*e.pl,s=(i-e.pl)/2,a=(r-e.pl)/2,A=[],c=(p,m,_,f,I)=\u003e{A.push(e.pillpads?cT(p,m,_,f,I):Wo(p,m,_,f,I))};let l=1;for(let p=0;p\u003co.x;p+=1)c(l++,-s,((o.x-1)/2-p)*e.p,e.pl,e.pw);for(let p=0;p\u003co.y;p+=1)c(l++,(p-(o.y-1)/2)*e.p,-a,e.pw,e.pl);for(let p=0;p\u003co.x;p+=1)c(l++,s,(p-(o.x-1)/2)*e.p,e.pl,e.pw);for(let p=0;p\u003co.y;p+=1)c(l++,((o.y-1)/2-p)*e.p,a,e.pw,e.pl);const u=Math.max(e.pw,.15),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_marker\",stroke_width:.1,route:[{x:-i/2,y:r/2-u},{x:-i/2,y:r/2},{x:-i/2+u,y:r/2}]},h=.25,d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:[{x:-i/2-h,y:-r/2-h},{x:i/2+h,y:-r/2-h},{x:i/2+h,y:r/2+h},{x:-i/2-h,y:r/2+h},{x:-i/2-h,y:-r/2-h}]};return{circuitJson:[...A,g,xi(0,r/2+.5,.3),d],parameters:{...e,grid:o,w:i,h:r}}},osn=Ci.extend({fn:Z(),w:ce.default(\"10mm\"),h:ce.optional(),left:ce.optional().default(20),right:ce.optional().default(20),top:ce.optional().default(0),bottom:ce.optional().default(0),p:ce.default(ce.parse(\"2.54mm\")),id:ce.optional().default(ce.parse(\"1mm\")),od:ce.optional().default(ce.parse(\"1.5mm\"))}),wfi=t=\u003e{const e=osn.parse(t);return e.left\u0026\u0026e.right?Math.max(e.left,e.right)*e.p:e.left?e.left*e.p:e.right?e.right*e.p:51},fpe=(t,e,n,o=1,i=.6)=\u003e{const r=o/2,s=i/2;return{left:[{x:t+r,y:e},{x:t-r,y:e+s},{x:t-r,y:e-s},{x:t+r,y:e}],right:[{x:t-r,y:e},{x:t+r,y:e+s},{x:t+r,y:e-s},{x:t-r,y:e}],top:[{x:t,y:e-r},{x:t-s,y:e+r},{x:t+s,y:e+r},{x:t,y:e-r}],bottom:[{x:t,y:e+r},{x:t-s,y:e-r},{x:t+s,y:e-r},{x:t,y:e+r}]}[n]},Pfi=t=\u003e{const e=osn.parse(t),n=e.h??wfi(e),o=[],i=e.id,r=e.od;let s=[];if(e.right){const l=-((e.right-1)/2)*e.p;for(let u=0;u\u003ce.right;u++)u===0\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026(s=fpe(e.w/2+r*1.4,l+u*e.p,\"right\")),o.push(Os(u+1+e.left+(e.bottom??0),e.w/2,l+u*e.p,i,r))}if(e.left){const l=-((e.left-1)/2)*e.p;for(let u=0;u\u003ce.left;u++)u===e.left-1\u0026\u0026(s=fpe(-e.w/2-r*1.4,l+u*e.p,\"left\")),o.push(Os(u+1,-e.w/2,l+u*e.p,i,r))}if(e.top){const l=-((e.top-1)/2)*e.p;for(let u=0;u\u003ce.top;u++)u===e.top-1\u0026\u0026!e.left\u0026\u0026!e.bottom\u0026\u0026!e.right\u0026\u0026(s=fpe(l+u*e.p,n/2+r*1.4,\"top\")),o.push(Os(u+1+e.right+(e.bottom??0)+e.left,l+u*e.p,n/2,i,r))}if(e.bottom){const l=-((e.bottom-1)/2)*e.p;for(let u=0;u\u003ce.bottom;u++)u===0\u0026\u0026!e.left\u0026\u0026(s=fpe(l+u*e.p,-n/2-r*1.4,\"bottom\")),o.push(Os(u+1+e.left,l+u*e.p,-n/2,i,r))}const a={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"1\",pcb_component_id:\"1\",layer:\"top\",route:s,stroke_width:.1},A={type:\"pcb_silkscreen_path\",pcb_silkscreen_path_id:\"pcb_silkscreen_path_1\",pcb_component_id:\"1\",route:[{x:-e.w/2-r,y:n/2+r},{x:e.w/2+r,y:n/2+r},{x:e.w/2+r,y:-n/2-r},{x:-e.w/2-r,y:-n/2-r},{x:-e.w/2-r,y:n/2+r}],stroke_width:.1,layer:\"top\"},c=xi(0,n/1.7,n/25);return{circuitJson:[...o,A,c,a],parameters:e}},Mfi=t=\u003e{const{centerX:e,centerY:n,straightHalfLength:o,radius:i,arcSegmentCount:r=9,orientation:s=\"horizontal\"}=t;if(o\u003c0)throw new Error(\"Capsule straightHalfLength must be non-negative\");if(i\u003c=0)throw new Error(\"Capsule radius must be positive\");if(r\u003c2)throw new Error(\"Capsule arcSegmentCount must be at least 2\");if(s===\"horizontal\"){const u=e-o,g=e+o,h=Array.from({length:r+1},(p,m)=\u003e{const _=Math.PI/2-m*Math.PI/r;return{x:g+Math.cos(_)*i,y:n+Math.sin(_)*i}}),d=Array.from({length:r+1},(p,m)=\u003e{const _=-Math.PI/2+m*Math.PI/r;return{x:u-Math.cos(_)*i,y:n+Math.sin(_)*i}});return[{x:u,y:n+i},{x:g,y:n+i},...h.slice(1,-1),{x:g,y:n-i},{x:u,y:n-i},...d.slice(1,-1)]}const a=n-o,A=n+o,c=Array.from({length:r+1},(u,g)=\u003e{const h=Math.PI-g*Math.PI/r;return{x:e+Math.cos(h)*i,y:A+Math.sin(h)*i}}),l=Array.from({length:r+1},(u,g)=\u003e{const h=g*Math.PI/r;return{x:e+Math.cos(h)*i,y:a-Math.sin(h)*i}});return[{x:e-i,y:a},{x:e-i,y:A},...c.slice(1,-1),{x:e+i,y:A},{x:e+i,y:a},...l.slice(1,-1)]},isn=(t,e,n,o)=\u003eArray.from({length:25},(i,r)=\u003e{const s=r/24*Math.PI-Math.PI/2;return{x:t+(o===\"right\"?1:-1)*Math.cos(s)*n,y:e+Math.sin(s)*n}}),Dfi=Ci.extend({fn:Z(),p:ce.optional().default(\"4.88mm\"),id:ce.optional().default(\"0.8mm\"),od:ce.optional().default(\"1.5mm\"),w:ce.optional().default(\"5.6mm\"),h:ce.optional().default(\"3.5mm\")}),Nfi=t=\u003e{const e=Dfi.parse(t),{p:n,id:o,od:i,w:r,h:s}=e,a=s/2,A=[Os(1,-n/2,0,o,i),Os(2,n/2,0,o,i)],c=isn(-r/2,0,a,\"left\"),l=isn(r/2,0,a,\"right\"),u={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[...c,...c.slice(1).reverse(),{x:-r/2,y:-s/2},{x:r/2,y:-s/2},...l,{x:r/2,y:s/2},{x:-r/2,y:s/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},g=xi(0,n/4,.5),d=n/2+i/2,p=Math.max(s/2+.25,r/2+.03),m={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:Mfi({centerX:0,centerY:0,straightHalfLength:d,radius:p,arcSegmentCount:9}),layer:\"top\"};return{circuitJson:[...A,u,g,m],parameters:e}};Ci.extend({w:ce,h:ce});var Rfi=t=\u003e{const{w:e,h:n}=t,o=Ua(e),i=Ua(n);return{circuitJson:[Wo(1,0,0,o,i),xi(0,i/2+.5,.2)],parameters:t}},Q6=(t,e,n,o,i,r)=\u003e({pcb_plated_hole_id:\"\",type:\"pcb_plated_hole\",shape:\"pill\",x:e,y:n,outer_width:Ua(i),outer_height:Ua(r),hole_width:Ua(o),hole_height:Ua(o),pcb_port_id:\"\",layers:[\"top\",\"bottom\"],port_hints:[t.toString()],ccw_rotation:0}),Tfi=[{x:-2.5,y:4.75},{x:-2.5,y:-.25},{x:2.5,y:-.25},{x:2.5,y:4.75}],kfi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default(\"1.27mm\"),id:Z().default(\"0.72mm\"),od:Z().default(\"0.95mm\"),w:Z().default(\"4.5mm\"),h:Z().default(\"4.5mm\"),inline:je().default(!1),string:Z().optional()}),Ffi=(t,e,n)=\u003eArray.from({length:25},(o,i)=\u003e{const r=i/24*Math.PI;return{x:t+Math.cos(r)*n,y:e+Math.sin(r)*n}}),Lfi=t=\u003e{const e=t.string?.match(/^to92_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=kfi.parse({...t,num_pins:n}),{p:i,id:r,od:s,w:a,h:A,inline:c}=o,l=Number.parseFloat(A)/2,u=Number.parseFloat(i),g=Number.parseFloat(r),h=Number.parseFloat(s),d=h,p=h*(1.5/1.05);let m=[];if(o.num_pins===3)c?m=[r2({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:p}),Q6(2,0,l-u,g,d,p),Q6(3,u,l-u,g,d,p)]:m=[r2({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:h,rectPadHeight:h}),Os(2,0,l,g,h),Os(3,u,l-u,g,h)];else if(o.num_pins===2)m=[r2({pn:1,x:-u,y:l-u,holeDiameter:g,rectPadWidth:d,rectPadHeight:p}),Q6(2,u,l-u,g,d,p)];else throw new Error(\"Invalid number of pins for TO-92\");const _=Number.parseFloat(a)/2,f=Ffi(0,l,_),I={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[...f,{x:-_,y:0},{x:_,y:0},f[0]],stroke_width:.1,pcb_silkscreen_path_id:\"\"},C=xi(0,l+1,.5),y={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:Tfi,layer:\"top\"};return{circuitJson:[...m,I,C,y],parameters:o}},Hfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"2.15mm\"),h:Z().default(\"0.7mm\"),pl:Z().default(\"0.6mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"1.4mm\")}),Ofi=t=\u003e{const e=Hfi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2.5,height:1.4,layer:\"top\"};return{circuitJson:Yfi(e).concat(...uh(e),o,n,s),parameters:e}},Gfi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Yfi=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.075;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=Gfi({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},Ufi=lT({w:\"7.05mm\",p:\"1.27mm\",pw:\"0.65mm\",pl:\"1.975mm\"}),Kfi=t=\u003e{const e=Ufi.parse(t),n=[],o=Math.min(e.pl,e.pw)/8;for(let h=0;h\u003ce.num_pins;h++){const{x:d,y:p}=UVe({num_pins:e.num_pins,pn:h+1,w:e.w,p:e.p??1.27,pl:e.pl,widthincludeslegs:!0});n.push(Wo(h+1,d,p,e.pl,e.pw,o))}const i=(e.num_pins/2-1)*e.p+e.pw,r=xi(0,i/2+1,i/12),s={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:-e.w/3,y:i/2+.4},{x:e.w/3,y:i/2+.4}],stroke_width:.1},a=(e.num_pins/2-1)*e.p+e.pw,A=e.w/2-1.395,c=e.w/2+.255,l=a/2+.25,u=a/2+.5,g={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-c,maxX:c,minY:-l,maxY:l},{minX:-A,maxX:A,minY:-u,maxY:u}])};return{circuitJson:[...n,r,s,g],parameters:e}},Vfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"5.0mm\"),h:Z().default(\"2.30mm\"),pl:Z().default(\"1.25mm\"),pw:Z().default(\"2mm\"),p:Z().default(\"3.75mm\")}),zfi=t=\u003e{const e=Vfi.parse(t),n=xi(0,ce.parse(e.h)/2+1,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2+.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2+.5},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2-.5},{x:ce.parse(e.p)/2+.5,y:-ce.parse(e.h)/2-.5}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:5.1,height:2.8,layer:\"top\"};return{circuitJson:Wfi(e).concat(...uh(e),o,n,s),parameters:e}},Jfi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Wfi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=Jfi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},jfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.4mm\"),h:Z().default(\"1.7mm\"),pl:Z().default(\"1.2mm\"),pw:Z().default(\"1.2mm\"),p:Z().default(\"2.8mm\")}),$fi=t=\u003e{const e=jfi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.5,height:2.2,layer:\"top\"};return{circuitJson:Xfi(e).concat(...uh(e),o,n,s),parameters:e}},qfi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Xfi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=qfi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Zfi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.30mm\"),h:Z().default(\"1.80mm\"),pl:Z().default(\"0.60mm\"),pw:Z().default(\"0.45mm\"),p:Z().default(\"2.1mm\")}),e1i=t=\u003e{const e=Zfi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.2,height:1.9,layer:\"top\"};return{circuitJson:n1i(e).concat(...uh(e),o,n,s),parameters:e}},t1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},n1i=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.05625;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=t1i({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},o1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.4mm\"),h:Z().default(\"0.9mm\"),pl:Z().default(\"0.36mm\"),pw:Z().default(\"0.25mm\"),p:Z().default(\"0.85mm\")}),i1i=t=\u003e{const e=o1i.parse(t),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.pl),r=ce.parse(e.pw),s=ce.parse(e.p),a=xi(0,o,.3),A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:s/2+.15,y:o/2},{x:-n/2-.15,y:o/2},{x:-n/2-.15,y:-o/2},{x:s/2+.15,y:-o/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},c=s+i,l=r,u=n/2,g=o/2,h=c/2,d=l/2,p=Math.max(u,h),m=Math.max(g,d),_=Math.min(u,h),f=Math.min(g,d),I=p+.05,C=_-.055,y=m,x=f+.155,E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:s2([{minX:-I,maxX:I,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-y,maxY:y}]),layer:\"top\"};return{circuitJson:s1i(e).concat(...uh(e),A,a,E),parameters:e}},r1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},s1i=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.03125;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=r1i({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},a1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.3mm\"),h:Z().default(\"0.9mm\"),pl:Z().default(\"0.4mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"0.7mm\")}),A1i=t=\u003e{const e=a1i.parse(t),n=xi(0,ce.parse(e.h)+.1,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2+.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2+.2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2-.2},{x:ce.parse(e.p)/2+.2,y:-ce.parse(e.h)/2-.2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:1.6,height:1.2,layer:\"top\"};return{circuitJson:l1i(e).concat(...uh(e),o,n,s),parameters:e}},c1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},l1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=c1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.025))}return e},u1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.05mm\"),h:Z().default(\"1.4mm\"),pl:Z().default(\"0.5mm\"),pw:Z().default(\"0.5mm\"),pad_spacing:Z().default(\"2.2mm\")}),g1i=t=\u003e{const e=u1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.2,height:1.9,layer:\"top\"};return{circuitJson:h1i(e).concat(...uh(e),o,n,s),parameters:e}},d1i=t=\u003e{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},h1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=d1i({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},p1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.4mm\"),h:Z().default(\"2.1mm\"),pl:Z().default(\"1.10mm\"),pw:Z().default(\"1.10mm\"),p:Z().default(\"2.8mm\")}),m1i=t=\u003e{const e=p1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.4,height:2.3,layer:\"top\"};return{circuitJson:f1i(e).concat(...uh(e),o,n,s),parameters:e}},_1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},f1i=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=_1i({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},I1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.4mm\"),h:Z().default(\"2.1mm\"),pl:Z().default(\"0.91mm\"),pw:Z().default(\"1.22mm\"),p:Z().default(\"3.146mm\")}),C1i=t=\u003e{const e=I1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.9,height:2.7,layer:\"top\"};return{circuitJson:x1i(e).concat(...uh(e),o,n,s),parameters:e}},y1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},x1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=y1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},E1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.80mm\"),h:Z().default(\"1.00mm\"),pl:Z().default(\"0.66mm\"),pw:Z().default(\"0.5mm\"),p:Z().default(\"0.8mm\")}),B1i=t=\u003e{const e=E1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2.3,height:1.5,layer:\"top\"};return{circuitJson:S1i(e).concat(...uh(e),o,n,s),parameters:e}},b1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},S1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=b1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},Q1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"6.2mm\"),h:Z().default(\"3.4mm\"),pl:Z().default(\"1.4mm\"),pw:Z().default(\"2.1mm\"),p:Z().default(\"4.4mm\")}),v1i=t=\u003e{const e=Q1i.parse(t),n=xi(0,ce.parse(e.h)/2+.4,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:6.3,height:3,layer:\"top\"};return{circuitJson:P1i(e).concat(...uh(e),o,n,s),parameters:e}},w1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},P1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=w1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},M1i=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.25,y:2.5},{x:2.25,y:-2.5}],D1i=[{x:-2.85,y:-2.5},{x:-2.85,y:2.5},{x:2.85,y:2.5},{x:2.85,y:-2.5}],N1i=[{x:.9,y:.5},{x:2.6,y:.5},{x:2.6,y:-.5},{x:.9,y:-.5},{x:.4,y:-1},{x:-.4,y:-1},{x:-.9,y:-.5},{x:-2.6,y:-.5},{x:-2.6,y:.5},{x:-.9,y:.5},{x:-.4,y:1},{x:.4,y:1}],R1i=[{x:2,y:-.8665},{x:-1.125,y:-.8665},{x:-1.125,y:-.45},{x:-2.6,y:-.45},{x:-2.6,y:.45},{x:-1.125,y:.45},{x:-1.125,y:.8665},{x:2,y:.8665}],T1i=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(5)]).default(3),w:Z().default(\"4.20mm\"),h:Z().default(\"4.80mm\"),pl:Z().default(\"1.3mm\"),pw:Z().default(\"0.9mm\"),p:Z().default(\"1.5mm\"),string:Z().optional()}),k1i=t=\u003e{const e=Number.parseFloat(t.p),n=Number.parseFloat(t.pw),o=Number.parseFloat(t.w),i=Number.parseFloat(t.pl),r=Math.min(i,n)/8,s=-o/2+.15,a=o/2-1,A=Number.parseFloat(t.h)/2,c=[Wo(1,s,e,i,n,r),zVe(2,R1i),Wo(3,s,-e,i,n,r)],l=xi(0,A+.5,.3),u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-a,y:A},{x:a,y:A},{x:a,y:A/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},g={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-a,y:-A},{x:a,y:-A},{x:a,y:-A/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},h={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:M1i,layer:\"top\"};return[...c,u,g,l,h]},F1i=t=\u003e{const e=Math.min(1.5,.7)/8,n=[Wo(1,-1.85,-1.5,1.5,.7,e),Wo(2,-1.85,1.5,1.5,.7,e),zVe(3,N1i),Wo(4,1.85,-1.5,1.5,.7,e),Wo(5,1.85,1.5,1.5,.7,e)],o=Number.parseFloat(t.w)/2-1,i=Number.parseFloat(t.h)/2,r=xi(0,i+.5,.3),s={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-o,y:i},{x:o,y:i}],type:\"pcb_silkscreen_path\",stroke_width:.1},a={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-o,y:-i},{x:o,y:-i}],type:\"pcb_silkscreen_path\",stroke_width:.1},A={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:D1i,layer:\"top\"};return[...n,s,a,r,A]},L1i=t=\u003e{const e=t.string?.match(/^sot89_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=T1i.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:k1i(o),parameters:o};if(o.num_pins===5)return{circuitJson:F1i(o),parameters:o};throw new Error(\"Invalid number of pins for SOT89\")},H1i=Ci.extend({fn:Z(),p:ce.optional().default(\"5.0mm\"),id:ce.optional().default(\"1.0mm\"),od:ce.optional().default(\"1.9mm\"),w:ce.optional().default(\"13mm\"),h:ce.optional().default(\"7mm\"),num_pins:_t().optional(),string:Z().optional()}),rsn=t=\u003e{const e=H1i.parse(t),{id:n,od:o,w:i,h:r,string:s}=e,a=e.num_pins??Number.parseInt(s?.match(/^to220(?:_|-)(\\d+)/i)?.[1]??\"3\"),A=-1,c=i/2,l=r/2,u=2.5,g=i*.4,h=Math.max(u,g/(a-1)),d=Array.from({length:a},(F,O)=\u003e{const U=a%2===0?(O-a/2+.5)*h:(O-Math.floor(a/2))*h;return Os(O+1,U,A,n,o)}),p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-c,y:-l},{x:c,y:-l},{x:c,y:l},{x:-c,y:l},{x:-c,y:-l}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},m=-l+2*r/3,_={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-c,y:m},{x:c,y:m}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},f=[{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-i/6,y:m},{x:-i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},{type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:i/6,y:m},{x:i/6,y:l}],stroke_width:.1,pcb_silkscreen_path_id:\"\"}],I=xi(0,r/2+.6,.5),C=Math.max(...d.map(F=\u003eMath.abs(F.x)))+o/2,y=A+o/2,x=A-o/2,E=Math.max(C+.25,c-o*.59),B=l-o*.63,S=x-(o/2+.01),Q=-E,w=E,M=Math.min(S,x-.25),k=Math.max(B,y+.25),R={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(Q+w)/2,y:(M+k)/2},width:w-Q,height:k-M,layer:\"top\"};return{circuitJson:[...d,p,_,...f,I,R],parameters:{...e,p:h}}},JVe=2.54,O1i=Ci.extend({fn:Z(),id:ce.optional().default(\"1.2mm\"),od:ce.optional().default(\"1.905mm\"),ph:ce.optional().default(\"2mm\"),w:ce.optional().default(\"13mm\"),h:ce.optional().default(\"7mm\"),num_pins:_t().optional(),string:Z().optional()}),G1i=t=\u003e{const e=O1i.parse(t),n=e.num_pins??Number.parseInt(e.string?.match(/^to220f(?:_|-)(\\d+)/i)?.[1]??\"3\"),o=rsn({...e,fn:\"to220\",string:e.string?.replace(/^to220f/i,\"to220\"),num_pins:n}),i=-1,r=Array.from({length:n},(a,A)=\u003e{const c=n%2===0?(A-n/2+.5)*JVe:(A-Math.floor(n/2))*JVe;return A===0?r2({pn:1,x:c,y:i,holeDiameter:e.id,rectPadWidth:e.od,rectPadHeight:e.ph}):Q6(A+1,c,i,Ua(e.id),Ua(e.od),Ua(e.ph))}),s=o.circuitJson.filter(a=\u003ea.type!==\"pcb_plated_hole\");return{circuitJson:[...r,...s],parameters:{...e,p:JVe,num_pins:n}}},Y1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"5.40mm\"),h:Z().default(\"2.30mm\"),pl:Z().default(\"1.30mm\"),pw:Z().default(\"1.70mm\"),p:Z().default(\"3.5mm\")}),U1i=t=\u003e{const e=Y1i.parse(t),n=xi(0,ce.parse(e.h)/2+.4,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:5.3,height:2.2,layer:\"top\"};return{circuitJson:V1i(e).concat(...uh(e),o,n,s),parameters:e}},K1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},V1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=K1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},z1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"1.90mm\"),h:Z().default(\"1.33mm\"),pl:Z().default(\"0.5mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"0.8mm\")}),J1i=t=\u003e{const e=z1i.parse(t),n=xi(0,ce.parse(e.h)+.1,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2+.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2+.1,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:1.8,height:1.2,layer:\"top\"};return{circuitJson:j1i(e).concat(...uh(e),o,n,s),parameters:e}},W1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},j1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=W1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.0625))}return e},$1i=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"7.0mm\"),h:Z().default(\"3.35mm\"),pl:Z().default(\"1.50mm\"),pw:Z().default(\"2.70mm\"),p:Z().default(\"4.8mm\")}),q1i=t=\u003e{const e=$1i.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:6.8,height:3.2,layer:\"top\"};return{circuitJson:Z1i(e).concat(...uh(e),o,n,s),parameters:e}},X1i=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},Z1i=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=X1i({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},eIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.0mm\"),h:Z().default(\"1.80mm\"),pl:Z().default(\"0.80mm\"),pw:Z().default(\"1.20mm\"),p:Z().default(\"1.6mm\")}),tIi=t=\u003e{const e=eIi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2.9,height:1.7,layer:\"top\"};return{circuitJson:oIi(e).concat(...uh(e),o,n,s),parameters:e}},nIi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},oIi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=nIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},iIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"7.10mm\"),h:Z().default(\"3.40mm\"),pl:Z().default(\"2.50mm\"),pw:Z().default(\"1.80mm\"),p:Z().default(\"4.00mm\")}),rIi=t=\u003e{const e=iIi.parse(t),n=xi(0,ce.parse(e.h)/2+.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.5,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:7,height:3.5,layer:\"top\"};return{circuitJson:aIi(e).concat(...uh(e),o,n,s),parameters:e}},sIi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},aIi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=sIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},AIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"4.80mm\"),h:Z().default(\"2.10mm\"),pl:Z().default(\"1.30mm\"),pw:Z().default(\"1.40mm\"),p:Z().default(\"2.9mm\")}),cIi=t=\u003e{const e=AIi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.7,height:2.3,layer:\"top\"};return{circuitJson:uIi(e).concat(...uh(e),o,n,s),parameters:e}},lIi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},uIi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=lIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},gIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"7.30mm\"),h:Z().default(\"4.40mm\"),pl:Z().default(\"2.50mm\"),pw:Z().default(\"2.30mm\"),p:Z().default(\"4.30mm\")}),dIi=t=\u003e{const e=gIi.parse(t),n=xi(0,ce.parse(e.h)/2+.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.1,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:7.3,height:4.5,layer:\"top\"};return{circuitJson:pIi(e).concat(...uh(e),o,n,s),parameters:e}},hIi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},pIi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=hIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},mIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"10.70mm\"),h:Z().default(\"6.60mm\"),pl:Z().default(\"2.50mm\"),pw:Z().default(\"3.30mm\"),p:Z().default(\"6.80mm\")}),_Ii=t=\u003e{const e=mIi.parse(t),n=xi(0,3,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:ce.parse(e.h)/2-.8},{x:-ce.parse(e.w)/2-.8,y:-ce.parse(e.h)/2+.8},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2+.8}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:9.8,height:6.7,layer:\"top\"};return{circuitJson:IIi(e).concat(...uh(e),o,n,s),parameters:e}},fIi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},IIi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=fIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.125))}return e},CIi=Ci.extend({fn:Z(),num_pins:_t().default(4),w:Z().default(\"8.50mm\"),h:Z().default(\"6.90mm\"),pl:Z().default(\"2mm\"),pw:Z().default(\"1.5mm\"),p:Z().default(\"2.30mm\"),tabpl:Z().optional(),tabpw:Z().default(\"3.8mm\"),taboffset:Z().default(\"0mm\"),string:Z().optional()}),yIi=t=\u003e{const e=t.string?.match(/^sot223_(\\d+)/),n=e?Number.parseInt(e[1],10):4;if(n===8){const i=BIi.parse({...t,num_pins:n});return{circuitJson:LX(i),parameters:i}}const o=CIi.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:EIi(o),parameters:o};if(o.num_pins===5)return{circuitJson:SIi(o),parameters:o};if(o.num_pins===6)return{circuitJson:vIi(o),parameters:o};throw new Error(\"Invalid number of pins\")},xIi=t=\u003e{const{pn:e,w:n,p:o,taboffset:i}=t;return e===1?{x:-n/2+1.1,y:o}:e===2?{x:-n/2+1.1,y:0}:e===3?{x:-n/2+1.1,y:-o}:{x:n/2-1.1+i,y:0}},EIi=t=\u003e{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h),s=Number.parseFloat(t.pl),a=Number.parseFloat(t.p),A=Number.parseFloat(t.pw),c=Number.parseFloat(t.tabpl??t.pl),l=Number.parseFloat(t.tabpw),u=Number.parseFloat(t.taboffset);for(let x=0;x\u003ct.num_pins;x++){const{x:E,y:B}=xIi({num_pins:t.num_pins,pn:x+1,w:i,p:a,taboffset:u}),S=x===3?l:A,Q=x===3?c:s,w=Math.min(Q,S)/8;n=Math.max(n,Math.abs(E)+Q/2),o=Math.max(o,Math.abs(B)+S/2),e.push(Wo(x+1,E,B,Q,S,w))}const g=xi(0,0,.3),h=i/2-2.4,d=r/2,p={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-h,y:d},{x:h,y:d},{x:h,y:d/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},m={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-h,y:-d},{x:h,y:-d},{x:h,y:-d/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},_=i/2,f=r/2,I=Math.max(n+.25,_+.15),C=Math.max(o+.25,f+.15),y={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*I,height:2*C,layer:\"top\"};return[...e,p,m,g,y]},BIi=lT({p:\"0.90mm\",w:\"2.8mm\",legsoutside:!0}),bIi=t=\u003e{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:e/2+e};if(n===2)return{x:-o/2+1.2,y:e/2};if(n===3)return{x:-o/2+1.2,y:-e/2};if(n===4)return{x:-o/2+1.2,y:-e/2-e};if(n===5)return{x:o/2-1,y:0};throw new Error(\"Invalid pin number\")},SIi=t=\u003e{const e=[];let n=0,o=0;const i=Number.parseFloat(t.w),r=Number.parseFloat(t.h);for(let m=1;m\u003c=t.num_pins;m++){const{x:_,y:f}=bIi({p:1.5,pn:m,w:i});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===5?(I=3.4,C=1.8):(I=1,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Wo(m,_,f,C,I,y))}const s=i/2-2.4,a=r/2,A={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},c={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},l=xi(0,0,.3),u=i/2,g=r/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*h,height:2*d,layer:\"top\"};return[...e,A,c,l,p]},QIi=t=\u003e{const{p:e,pn:n,w:o}=t;if(n===1)return{x:-o/2+1.2,y:2*e};if(n===2)return{x:-o/2+1.2,y:e};if(n===3)return{x:-o/2+1.2,y:0};if(n===4)return{x:-o/2+1.2,y:-e};if(n===5)return{x:-o/2+1.2,y:-2*e};if(n===6)return{x:o/2-1.175,y:0};throw new Error(\"Invalid pin number\")},vIi=t=\u003e{const e=[];let n=0,o=0;const i=Number.parseFloat(t.h),r=8.7;for(let m=1;m\u003c=t.num_pins;m++){const{x:_,y:f}=QIi({p:1.3,pn:m,w:r});let I=Number.parseFloat(t.pw),C=Number.parseFloat(t.pl);m===6?(I=3.4,C=2.15):(I=.6,C=2.2);const y=Math.min(C,I)/8;n=Math.max(n,Math.abs(_)+C/2),o=Math.max(o,Math.abs(f)+I/2),e.push(Wo(m,_,f,C,I,y))}const s=Number.parseFloat(t.w)/2-2.4,a=i/2,A={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-s,y:a},{x:s,y:a},{x:s,y:a/2+.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},c={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-s,y:-a},{x:s,y:-a},{x:s,y:-a/2-.5}],type:\"pcb_silkscreen_path\",stroke_width:.1},l=xi(0,0,.3),u=Number.parseFloat(t.w)/2,g=i/2,h=Math.max(n+.25,u+.15),d=Math.max(o+.25,g+.15),p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*h,height:2*d,layer:\"top\"};return[...e,A,c,l,p]},wIi=Ci.extend({fn:Z(),num_pins:_t().default(3),w:Z().default(\"3.40mm\"),h:Z().default(\"3.30mm\"),pl:Z().default(\"1mm\"),pw:Z().default(\"0.7mm\"),p:Z().default(\"1.2mm\"),string:Z().optional()}),PIi=t=\u003e{const e=t.string?.match(/^sot23w_(\\d+)/),n=e?Number.parseInt(e[1],3):3,o=wIi.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:DIi(o),parameters:o};throw new Error(\"Invalid number of pins\")},MIi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n,y:.95}:e===2?{x:-n,y:-.95}:{x:n,y:0}},DIi=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let I=0;I\u003ct.num_pins;I++){const{x:C,y}=MIi({num_pins:t.num_pins,pn:I+1,p:s});e.push(Wo(I+1,C,y,i,r,a))}const A=xi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-1,l=o/2,u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-c,y:l},{x:c+.3,y:l},{x:c+.3,y:l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},g={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-c,y:-l},{x:c+.3,y:-l},{x:c+.3,y:-l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},h=s+i/2,d=.95+r/2,p=o/2,m=h+.25,_=Math.max(d+.25,p+.09),f={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*m,height:2*_,layer:\"top\"};return[...e,u,g,A,f]},NIi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default(\"1.27mm\"),id:Z().default(\"0.72mm\"),od:Z().default(\"0.95mm\"),w:Z().default(\"2.5mm\"),h:Z().default(\"4.2mm\"),string:Z().optional()}),RIi=t=\u003e{const{p:e,id:n,od:o,w:i,h:r}=t,s=Number.parseFloat(r)/2,a=Number.parseFloat(e);return[Os(1,-a,s-a,n,o),Os(2,0,s-a,n,o),Os(3,a,s-a,n,o)]},TIi=t=\u003e{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i)/2,s=Number.parseFloat(e),a=Number.parseFloat(n),A=Number.parseFloat(o),c=A*(1.5/1.05);return[r2({pn:1,x:-s,y:r-s,holeDiameter:a,rectPadWidth:A,rectPadHeight:c}),Q6(2,s,r-s,a,A,c)]},kIi=t=\u003e{const e=t.string?.match(/^to92s_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=NIi.parse({...t,num_pins:n});let i=[];if(o.num_pins===3)i=RIi(o);else if(o.num_pins===2)i=TIi(o);else throw new Error(\"Invalid number of pins for TO-92\");const r=Number.parseFloat(o.h)/2,s=Number.parseFloat(o.p),a={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-r,y:r-s},{x:-1.9,y:0},{x:1.9,y:0},{x:r,y:r-s},{x:1.5,y:Number.parseFloat(o.h)/2+.5},{x:-1.5,y:Number.parseFloat(o.h)/2+.5},{x:-r,y:r-s}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},A=xi(0,r+1,.5),c=Number.parseFloat(o.od),l=r-s,u=-s-c/2,g=s+c/2,h=l-c/2,d=l+c/2,p=-r,m=r,_=0,f=r+.5,I=Math.min(u,p)-.25,C=Math.max(g,m)+.25,y=Math.min(h,_)-.25,x=Math.max(d,f)+.25,E={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(I+C)/2,y:(y+x)/2},width:C-I,height:x-y,layer:\"top\"};return{circuitJson:[...i,a,A,E],parameters:o}},FIi=Ci.extend({fn:Z(),p:ce.optional(),id:ce.optional(),pw:ce.optional(),pl:ce.optional(),w:ce.optional(),h:ce.optional(),mpx:ce.optional().describe(\"center-to-center distance between the SMD mounting pads\"),mpy:ce.optional().describe(\"mounting-pad row distance from the signal-pad row\"),mpw:ce.optional().describe(\"SMD mounting pad width\"),mpl:ce.optional().describe(\"SMD mounting pad length\"),mounttop:je().optional().describe(\"place SMD mounting pads above the signal-pad row\"),smd:je().optional().describe(\"Generic surface-mount JST-style connector with one signal row and two mounting pads.\"),sh:je().optional().describe('JST SH (Surface-mount) connector family. SH stands for \"Super High-density\".'),ph:je().optional().describe('JST PH (Through-hole) connector family. PH stands for \"Pin Header\".'),zh:je().optional().describe(\"JST ZH (Through-hole) connector family. 1.5mm pitch wire-to-board.\"),xh:je().optional().describe(\"JST XH (Through-hole) connector family. 2.5mm pitch wire-to-board.\"),string:Z().optional()}),LIi=()=\u003e({minX:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY}),mP=({bounds:t,centerX:e,centerY:n,width:o,height:i})=\u003e{const r=o/2,s=i/2;t.minX=Math.min(t.minX,e-r),t.maxX=Math.max(t.maxX,e+r),t.minY=Math.min(t.minY,n-s),t.maxY=Math.max(t.maxY,n+s)},HIi={ph:{p:ce.parse(\"2mm\"),id:ce.parse(\"0.75mm\"),pw:ce.parse(\"1.20mm\"),pl:ce.parse(\"1.75mm\"),h:ce.parse(\"5mm\")},sh:{p:ce.parse(\"1mm\"),pw:ce.parse(\"0.6mm\"),pl:ce.parse(\"1.55mm\"),w:ce.parse(\"5.8mm\"),h:ce.parse(\"7.8mm\")},smd:{p:ce.parse(\"2mm\"),id:0,pw:ce.parse(\"1mm\"),pl:ce.parse(\"3mm\"),mpw:ce.parse(\"1.8mm\"),mpl:ce.parse(\"3mm\"),mpy:ce.parse(\"2.5mm\"),w:ce.parse(\"8mm\"),h:ce.parse(\"5mm\")},zh:{p:ce.parse(\"1.5mm\"),id:ce.parse(\"0.73mm\"),pw:ce.parse(\"1.03mm\"),pl:ce.parse(\"1.73mm\"),w:ce.parse(\"3mm\"),h:ce.parse(\"3.5mm\")},xh:{p:ce.parse(\"2.5mm\"),pw:ce.parse(\"1.7mm\")}};function OIi(t){return t.smd?\"smd\":t.sh?\"sh\":t.ph?\"ph\":t.zh?\"zh\":t.xh?\"xh\":\"ph\"}function GIi({variant:t,numPins:e,p:n,id:o,pw:i,pl:r,mpx:s,mpy:a,mpw:A,mpl:c,mounttop:l}){const u=[],g=LIi();let h=0;if(t===\"smd\"){const d=-((e-1)/2)*n;for(let m=0;m\u003ce;m++){const _=d+m*n;u.push(Wo(m+1,_,0,i,r)),mP({bounds:g,centerX:_,centerY:0,width:i,height:r})}const p=a===0?0:(l?1:-1)*a;for(const[m,_]of[-s/2,s/2].entries())u.push(Wo(e+m+1,_,p,A,c)),mP({bounds:g,centerX:_,centerY:p,width:A,height:c});h=Math.max(r/2,c/2)}else if(t===\"ph\"){const d=-((e-1)/2)*n;for(let p=0;p\u003ce;p++){const m=d+p*n;p===0?u.push(r2({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.1249998})):u.push(Q6(p+1,m,0,o,i,r)),mP({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t===\"zh\"){const d=-((e-1)/2)*n;for(let p=0;p\u003ce;p++){const m=d+p*n;p===0?u.push(r2({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12499977})):u.push(Q6(p+1,m,0,o,i,r)),mP({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else if(t===\"xh\"){const d=-((e-1)/2)*n;for(let p=0;p\u003ce;p++){const m=d+p*n;p===0?u.push(r2({pn:p+1,x:m,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:r,rectBorderRadius:.12500015})):u.push(Q6(p+1,m,0,o,i,r)),mP({bounds:g,centerX:m,centerY:0,width:i,height:r}),h=Math.max(h,r/2)}}else{const d=-((e-1)/2)*n;for(let m=0;m\u003ce;m++){const _=d+m*n;u.push(Wo(m+1,_,-1.325,i,r)),mP({bounds:g,centerX:_,centerY:-1.325,width:i,height:r}),h=Math.max(h,r/2)}const p=(e-1)/2*n+1.3;u.push(Wo(e+1,-p,1.22,1.2,1.8)),u.push(Wo(e+2,p,1.22,1.2,1.8)),mP({bounds:g,centerX:-p,centerY:1.22,width:1.2,height:1.8}),mP({bounds:g,centerX:p,centerY:1.22,width:1.2,height:1.8}),h=Math.max(h,.9)}return{pads:u,padBounds:g,maxPadHalfY:h}}function YIi({variant:t,w:e,h:n,numPins:o,p:i}){const r=s=\u003e({type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:s,stroke_width:.1,pcb_silkscreen_path_id:\"\"});if(t===\"smd\")return[r([{x:-e/2,y:-n/2},{x:e/2,y:-n/2},{x:e/2,y:n/2},{x:-e/2,y:n/2},{x:-e/2,y:-n/2}])];if(t===\"ph\"){const s=n/2+.5,a=s-n;return[r([{x:-e/2,y:s},{x:e/2,y:s},{x:e/2,y:a},{x:-e/2,y:a},{x:-e/2,y:s}])]}else if(t===\"zh\"\u0026\u0026o\u0026\u0026i){const s=(o-1)*i,a=-s/2-1.5,A=s/2+1.5,c=-n/2,l=n/2;return[r([{x:a,y:c},{x:A,y:c},{x:A,y:l},{x:a,y:l},{x:a,y:c}])]}else if(t===\"xh\"\u0026\u0026o\u0026\u0026i){const s=-((o-1)/2)*i,a=Array.from({length:o},(I,C)=\u003es+C*i),A=a[0],c=a[o-1],l=(A+c)/2,u=-2.75,g=-3.51,h=2.46,d=2.75,p=1.5,m=.2,_=(I,C,y,x)=\u003er([{x:I,y:C},{x:y,y:C},{x:y,y:x},{x:I,y:x},{x:I,y:C}]),f=[];return f.push(_(A-2.56,h,c+2.56,g)),f.push(r([{x:A-1.6,y:d},{x:A-2.85,y:d},{x:A-2.85,y:p}])),f.push(r([{x:A-2.55,y:m},{x:A-1.8,y:m},{x:A-1.8,y:u},{x:l,y:u}])),f.push(r([{x:c+2.55,y:m},{x:c+1.8,y:m},{x:c+1.8,y:u},{x:l,y:u}])),f.push(_(A-2.55,2.45,A-.75,1.7)),c-.75\u003eA+.75\u0026\u0026f.push(_(A+.75,2.45,c-.75,1.7)),f.push(_(c+.75,2.45,c+2.55,1.7)),f}else return[]}var UIi=t=\u003e{const e=FIi.parse(t),n=OIi(e),o=HIi[n];let i;const r=t.num_pins;typeof r==\"number\"\u0026\u0026(i=r);const s=typeof t.string==\"string\"?t.string:\"\",a=s.match(/(?:^|_)jst(\\d+)(?:_|$)/),A=s.match(/(?:^|_)zh(\\d+)(?:_|$)/);if(a\u0026\u0026a[1]){const fe=Number.parseInt(a[1],10);Number.isNaN(fe)||(i=fe)}if(A\u0026\u0026A[1]){const fe=Number.parseInt(A[1],10);Number.isNaN(fe)||(i=fe)}if(typeof i!=\"number\")throw new Error(`JST requires an explicit pin count (e.g. jst6_sh or .jst(6))${e.string?`, from string \"${e.string}\"`:\"\"}`);const c=e.p??o.p,l=e.id??(n===\"xh\"?i===2?1:.95:o.id),u=e.pw??o.pw,g=e.pl??(n===\"xh\"?i===2?2:1.95:o.pl),h=(i-1)*c+4,d=n===\"xh\"?(i-1)*c+5.12:n===\"ph\"?h:o.w,p=e.w??d,m=e.h??(n===\"xh\"?5.97:o.h),_=e.mpx??(i-1)*c+3.4,f=e.mpy??o.mpy??0,I=e.mpw??o.mpw??0,C=e.mpl??o.mpl??0,y=e.mounttop??!1,x=GIi({variant:n,numPins:i,p:c,id:l,pw:u,pl:g,mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}),{pads:E,padBounds:B,maxPadHalfY:S}=x,Q=n===\"smd\"?Math.max(p,2*Math.max(Math.abs(B.minX),Math.abs(B.maxX))+.4):p,w=n===\"smd\"?Math.max(m,2*Math.max(Math.abs(B.minY),Math.abs(B.maxY))+.4):m,M=YIi({variant:n,w:Q,h:w,numPins:i,p:c}),k=xi(0,w/2+1,.5),R=M.flatMap(fe=\u003efe.route),F=R.map(fe=\u003efe.x),O=R.map(fe=\u003efe.y),U=F.length\u003e0\u0026\u0026O.length\u003e0,Y=U?Math.min(B.minX,Math.min(...F)):B.minX,W=U?Math.max(B.maxX,Math.max(...F)):B.maxX,te=U?Math.min(B.minY,Math.min(...O)):B.minY,j=U?Math.max(B.maxY,Math.max(...O)):B.maxY,J=.5,oe=.05,ie=S+.085,ne=Y-J,le=W+J,ge=te-ie,_e=j+oe,ue=n===\"ph\"?{type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:-.55},width:(i-1)*c+4.9,height:5.5,layer:\"top\"}:n===\"xh\"?{type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:-.525},width:(i-1)*c+5.9,height:6.75,layer:\"top\"}:{type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(ne+le)/2,y:(ge+_e)/2},width:le-ne,height:_e-ge,layer:\"top\"};return{circuitJson:[...E,...M,k,ue],parameters:{...e,p:c,id:l,pw:u,pl:g,w:p,h:m,num_pins:i,sh:n===\"sh\",ph:n===\"ph\",smd:n===\"smd\",zh:n===\"zh\",xh:n===\"xh\",...n===\"smd\"?{mpx:_,mpy:f,mpw:I,mpl:C,mounttop:y}:{}}}},KIi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.30mm\"),h:Z().default(\"1.70mm\"),pl:Z().default(\"0.80mm\"),pw:Z().default(\"1mm\"),p:Z().default(\"1.90mm\")}),VIi=t=\u003e{const e=KIi.parse(t),n=xi(0,ce.parse(e.h)/2+.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.2,height:2,layer:\"top\"};return{circuitJson:JIi(e).concat(...uh(e),o,n,s),parameters:e}},zIi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},JIi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=zIi({pn:n,p:Number.parseFloat(t.p)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw),.1))}return e},WIi=t=\u003e{switch(t){case 8:return{w:\"3.06mm\",h:\"3.14mm\",p:\"0.65mm\",pl:\"1.6mm\",pw:\"0.5mm\"};case 10:return{w:\"3.10mm\",h:\"3.33mm\",p:\"0.5mm\",pl:\"1.45mm\",pw:\"0.3mm\"};default:return{w:\"3.06mm\",h:\"3.14mm\",p:\"0.65mm\",pl:\"1.6mm\",pw:\"0.5mm\"}}},jIi=Ci.extend({fn:Z(),num_pins:xo([$e(8),$e(10)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:WB.optional(),...RY,string:Z().optional()}),$Ii=t=\u003e{const e=jIi.parse(t),n=WIi(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[],l=e.num_pins/2;for(let S=0;S\u003ce.num_pins;S++){const{x:Q,y:w}=ssn(e.num_pins,S+1,o,r),M=S\u003cl?S+1:e.num_pins-(S-l);c.push(Wo(M,Q,w,s,a,A))}e.thermalpad\u0026\u0026c.push(hP(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const u=o,g=i,h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-u/2,y:g/2},{x:u/2,y:g/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},d={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-u/2,y:-g/2},{x:u/2,y:-g/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},p=ssn(e.num_pins,1,u,r),m={x:p.x-.8,y:p.y},_={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:m.x-.4,y:m.y},{x:m.x-.7,y:m.y+.3},{x:m.x-.7,y:m.y-.3},{x:m.x-.4,y:m.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},f=xi(0,g/2+.5,.3),I=(e.num_pins/2-1)*r+a,C=o/2+.25,y=C+1.43,x=I/2+.255,E=i/2+.25,B={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-y,maxX:y,minY:-x,maxY:x},{minX:-C,maxX:C,minY:-E,maxY:E}])};return{circuitJson:[...c,h,d,f,_,B],parameters:e}},ssn=(t,e,n,o)=\u003e{const i=t/2,r=(e-1)%i,s=e\u003c=i?-1:1,a=(i-1)/2-r;return{x:s*2.11,y:a*o}},qIi=t=\u003e{switch(t){case 10:return{w:\"3.10mm\",h:\"3.32mm\",p:\"0.5mm\",pl:\"1.63mm\",pw:\"0.33mm\"};case 12:return{w:\"3mm\",h:\"4mm\",p:\"0.65mm\",pl:\"0.88mm\",pw:\"0.4mm\"};case 16:return{w:\"3.10mm\",h:\"4mm\",p:\"0.5mm\",pl:\"0.88mm\",pw:\"0.3mm\"};default:return{w:\"3.10mm\",h:\"3.32mm\",p:\"0.65mm\",pl:\"1.63mm\",pw:\"0.4mm\"}}},XIi=Ci.extend({fn:Z(),num_pins:xo([$e(8),$e(10),$e(12),$e(16)]).default(8),w:Z().optional(),h:Z().optional(),p:Z().optional(),pl:Z().optional(),pw:Z().optional(),thermalpad:WB.optional(),...RY,string:Z().optional()}),asn=(t,e,n,o,i)=\u003e{const r=t/2,s=(e-1)%r,a=e\u003c=r?-1:1,A=(r-1)/2-s,c=ce.parse(\"0.2mm\");return{x:a*(n/2+i/2-c),y:A*o}},ZIi=t=\u003e{const e=XIi.parse(t),n=qIi(e.num_pins),o=ce.parse(e.w||n.w),i=ce.parse(e.h||n.h),r=ce.parse(e.p||n.p),s=ce.parse(e.pl||n.pl),a=ce.parse(e.pw||n.pw),A=Math.min(s,a)/8,c=[];for(let B=0;B\u003ce.num_pins;B++){const{x:S,y:Q}=asn(e.num_pins,B+1,o,r,s);c.push(Wo(B+1,S,Q,s,a,A))}e.thermalpad\u0026\u0026c.push(hP(e.thermalpad,{x:e.thermalpadcenteroffsetx,y:e.thermalpadcenteroffsety}));const l=o,u=i,g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-l/2,y:u/2},{x:l/2,y:u/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-l/2,y:-u/2},{x:l/2,y:-u/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},d=asn(e.num_pins,1,l,r,s),p={x:d.x-.8,y:d.y},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:p.x-.4,y:p.y},{x:p.x-.7,y:p.y+.3},{x:p.x-.7,y:p.y-.3},{x:p.x-.4,y:p.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},_=xi(0,u/2+.5,.3),f=(e.num_pins/2-1)*r+a,I=o/2+.25,C=I+1.43,y=f/2+.255,x=i/2+.25,E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return{circuitJson:[...c,g,h,_,m,E],parameters:e}},eCi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.8mm\"),h:Z().default(\"1.65mm\"),pl:Z().default(\"1.2mm\"),pw:Z().default(\"1.2mm\"),pad_spacing:Z().default(\"2.6mm\")}),tCi=t=\u003e{const e=eCi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:4.3,height:2.15,layer:\"top\"};return{circuitJson:oCi(e).concat(...uh(e),o,n,s),parameters:e}},nCi=t=\u003e{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},oCi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=nCi({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},iCi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"3.20mm\"),h:Z().default(\"1.65mm\"),pl:Z().default(\"0.8mm\"),pw:Z().default(\"0.9mm\"),pad_spacing:Z().default(\"2.1mm\")}),rCi=t=\u003e{const e=iCi.parse(t),n=xi(0,ce.parse(e.h),.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.pad_spacing)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.2,y:-ce.parse(e.h)/2},{x:ce.parse(e.pad_spacing)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:3.7,height:2.15,layer:\"top\"};return{circuitJson:aCi(e).concat(...uh(e),o,n,s),parameters:e}},sCi=t=\u003e{const{pn:e,pad_spacing:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},aCi=t=\u003e{const e=[];for(let n=1;n\u003c=t.num_pins;n++){const{x:o,y:i}=sCi({pn:n,pad_spacing:Number.parseFloat(t.pad_spacing)});e.push(Wo(n,o,i,Number.parseFloat(t.pl),Number.parseFloat(t.pw)))}return e},ACi=Ci.extend({fn:Z(),num_pins:xo([$e(6),$e(8)]).default(8),w:Z().default(\"3mm\"),h:Z().default(\"3mm\"),p:Z().default(\"0.5mm\"),pl:Z().default(\"0.52mm\"),pw:Z().default(\"0.35mm\"),epw:Z().default(\"1.40mm\"),eph:Z().default(\"1.60mm\"),string:Z().optional(),ep:je().default(!1)}),cCi=t=\u003e{t.string\u0026\u0026t.string.includes(\"_ep\")\u0026\u0026(t.ep=!0);const e=t.string?.match(/^son_(\\d+)/),n=e?Number.parseInt(e[1],10):t.num_pins||8,o=ACi.parse({...t,num_pins:n}),i=ce.parse(o.w),r=ce.parse(o.h),s=ce.parse(o.p),a=ce.parse(o.pl),A=ce.parse(o.pw),c=ce.parse(o.epw),l=ce.parse(o.eph),u=Math.min(a,A)/8,g=[];for(let k=0;k\u003co.num_pins;k++){const{x:R,y:F}=WVe(o.num_pins,k+1,i,s);g.push(Wo(k+1,R,F,a,A,u))}o.ep\u0026\u0026g.push(Wo(o.num_pins+1,0,0,c,l));const h=i,d=r,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-h/2,y:d/2},{x:h/2,y:d/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-h/2,y:-d/2},{x:h/2,y:-d/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},_=WVe(o.num_pins,1,h,s),f={x:_.x-.4,y:_.y},I={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:f.x-.4,y:f.y},{x:f.x-.7,y:f.y+.3},{x:f.x-.7,y:f.y-.3},{x:f.x-.4,y:f.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},C=xi(0,d/2+.5,.3),y=Math.abs(WVe(o.num_pins,1,i,s).x),x=(o.num_pins/2-1)*s+A,E=y*2+a,B=i/2+.25,S=E/2+.25,Q=x/2+.25,w=r/2+.25,M={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-S,maxX:S,minY:-Q,maxY:Q},{minX:-B,maxX:B,minY:-w,maxY:w}])};return{circuitJson:[...g,p,m,C,I,M],parameters:o}},WVe=(t,e,n,o)=\u003e{const i=t/2,r=(e-1)%i,s=e\u003c=i?-1:1,a=(i-1)/2-r;return{x:s*ce.parse(\"1.4mm\"),y:a*o}},lCi=Ci.extend({fn:Z(),num_pins:_t().optional().default(8),p:lt.describe(\"pitch (distance between center of each pin)\"),w:ce.describe(\"width between vertical rows of pins\"),grid:WB.describe(\"width and height of the border of the footprint\"),ep:WB.default(\"0x0mm\").describe(\"width and height of the central exposed thermal pad\"),epx:ce.default(\"0mm\").describe(\"x offset of the center of the central exposed thermal pad\"),pinw:ce.describe(\"width of the pin pads\"),pinh:ce.describe(\"height of the pin pads\")}),uCi=t=\u003e{const e=lCi.parse(t),{num_pins:n,p:o,w:i,grid:r,ep:s,epx:a,pinw:A,pinh:c}=e;if(n%2!==0)throw new Error(\"invalid number of pins\");const l=[],u=Math.min(A,c)/8;for(let B=0;B\u003cn;B++){const{pinX:S,pinY:Q}=gCi({pinCount:n,pinIndex:B,width:i,pitch:o});l.push(Wo(B+1,S,Q,A,c,u))}s.x\u003e0\u0026\u0026s.y\u003e0\u0026\u0026l.push(Wo(e.num_pins+1,a,0,s.x,s.y));const g=dCi(r),h=xi(0,r.y/2+o,r.y/6),d=(n/2-1)*o+c,p=i+A,m=r.x/2+.25,_=p/2+.25,f=d/2+.25,I=d/2+.45+Math.max(0,.8-o),C=Math.min(r.y/2+.25,I),y=Math.max(0,.37-Math.max(0,_-m-.38)*1.4),x=Math.max(f,C-y),E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-_,maxX:_,minY:-x,maxY:x},{minX:-m,maxX:m,minY:-C,maxY:C}])};return{circuitJson:[...l,...g,h,E],parameters:e}},gCi=t=\u003e{let e=0,n=0;const o=(t.pinCount/2-1)*t.pitch/2,i=t.pinCount/2;return t.pinIndex+1\u003c=i?(e=t.pitch*t.pinIndex-o,n=0-t.width/2):(e=t.pitch*(t.pinCount-t.pinIndex-1)-o,n=t.width/2),{pinX:n,pinY:e}},dCi=t=\u003e{const n=t.y/30;return[{layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:-t.x/2-.1,y:t.y/2+.1-n},{x:-t.x/2-.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1},{x:t.x/2+.1,y:t.y/2+.1-n}],stroke_width:t.y/30},{layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",type:\"pcb_silkscreen_path\",route:[{x:-t.x/2-.1,y:-t.y/2-.1+n},{x:-t.x/2-.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1},{x:t.x/2+.1,y:-t.y/2-.1+n}],stroke_width:t.y/30}]},hCi=Ci.extend({fn:$e(\"wson\"),num_pins:$e(8).default(8),p:ce.default(\"0.5mm\").describe(\"pin pitch\"),rowspan:ce.default(\"3.015mm\").describe(\"distance between pad rows\"),pl:ce.default(\"0.6mm\").describe(\"pad length across the package edge\"),pw:ce.default(\"0.28mm\").describe(\"pad width along the pin row\"),ep:je().default(!0).describe(\"include the exposed pad\"),epw:ce.default(\"1.7mm\").describe(\"exposed pad width\"),eph:ce.default(\"0.3mm\").describe(\"exposed pad height\"),w:ce.default(\"2mm\").describe(\"package body width\"),h:ce.default(\"3mm\").describe(\"package body height\")}),pCi=t=\u003e{const e=hCi.parse(t),{p:n,rowspan:o,pl:i,pw:r,ep:s,epw:a,eph:A,w:c,h:l}=e,u=[],g=-3*n/2;for(let f=0;f\u003c4;f+=1){const I=g+f*n;u.push(Wo(f+1,I,-o/2,r,i)),u.push(Wo(8-f,I,o/2,r,i))}s\u0026\u0026u.push(Wo(9,0,0,a,A));const h=[sA([{x:-c/2,y:-l/2},{x:-c/2,y:l/2}]),sA([{x:c/2,y:-l/2},{x:c/2,y:l/2}])],d=xi(0,Math.max(l/2,(o+i)/2)+.6,.5),p=Math.max(3*n+r,s?a:0),m=Math.max(o+i,s?A:0),_={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:Math.max(c,p)+.5,height:Math.max(l,m)+.5,layer:\"top\"};return{circuitJson:[...u,...h,d,_],parameters:e}},mCi=t=\u003e{const{num_pins:e,bridged:n,p:o=2.54,pw:i=1.5,ph:r=1.5}=t,s=ce.parse(o),a=ce.parse(i),A=ce.parse(r),c=Math.min(A/4,.5),l=[];for(let Q=0;Q\u003ce;Q++)l.push(Wo(Q+1,Q*s,0,a,A));let u=[];if(n){const Q=n.split(\"\").map(Number);if(Q.length\u003e1)for(let w=0;w\u003cQ.length-1;w++){const M=Q[w],k=Q[w+1];if(typeof M==\"number\"\u0026\u0026typeof k==\"number\"\u0026\u0026!isNaN(M)\u0026\u0026!isNaN(k)){const R=(M-1)*s,F=(k-1)*s,O=Math.sign(F-R),U=R+O*(a/2),Y=F-O*(a/2);u.push({type:\"pcb_trace\",pcb_trace_id:\"\",route:[{start_pcb_port_id:`{PIN${M}}`,x:U,y:0,width:c,layer:\"top\",route_type:\"wire\"},{end_pcb_port_id:`{PIN${k}}`,x:Y,y:0,width:c,layer:\"top\",route_type:\"wire\"}]})}}}const g=(e-1)*s+a+.7,h=A+1,d=(e-1)*s/2,p=0,m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"outline\",route:[{x:d-g/2,y:p-h/2},{x:d+g/2,y:p-h/2},{x:d+g/2,y:p+h/2},{x:d-g/2,y:p+h/2},{x:d-g/2,y:p-h/2}],stroke_width:.15},f=p+h/2+.6,I=xi(d,f,.4),C=(e-1)*s,y=C/2+a/2,x=A/2,E=y+.5,B=x+.5,S={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:C/2,y:0},width:2*E,height:2*B,layer:\"top\"};return{circuitJson:[...l,...u,m,I,S],parameters:t}},Asn={fn:$e(\"sot457\"),num_pins:$e(6).default(6),pillh:Z().default(\"0.45mm\"),pillw:Z().default(\"1.45mm\"),pl:Z(),pw:Z(),p:Z(),wave:je().optional(),reflow:je().optional()},_Ci=Ci.extend({...Asn,h:Z().default(\"2.5mm\"),w:Z().default(\"2.7mm\"),pl:Z().default(\"0.8mm\"),pw:Z().default(\"0.55mm\"),p:Z().default(\"0.95mm\")}),fCi=Ci.extend({...Asn,h:Z().default(\"3mm\"),w:Z().default(\"4mm\"),pillr:Z().default(\"0.225mm\"),pl:Z().default(\"1.45mm\"),pw:Z().default(\"1.5mm\"),p:Z().default(\"1.475mm\")}).transform(t=\u003e({...t,wave:t.wave??(t.reflow===void 0?!0:!t.reflow),reflow:t.reflow??(t.wave===void 0?!1:!t.wave)})),lS=t=\u003eNumber.parseFloat(t.replace(\"mm\",\"\")),csn=({pitch:t,width:e,pinNumber:n})=\u003e{const r={1:{x:-e/2-.1,y:t},2:{x:-e/2-.1,y:0},3:{x:-e/2-.1,y:-t},4:{x:e/2+.1,y:-t},5:{x:e/2+.1,y:0},6:{x:e/2+.1,y:t}}[n];if(!r)throw new Error(`Invalid pin number: ${n}`);return r},lsn=t=\u003e{const e=[],n=lS(t.p),o=lS(t.pl),i=lS(t.pw),r=lS(t.w),s=lS(t.h),a=Math.min(o,i)/8;if(t.wave){const m={1:({padWidth:_,padHeight:f})=\u003eWo(1,-n,n,f,_,a),2:({padWidth:_,padHeight:f})=\u003eWo(2,-n,-n,f,_,a),3:({padWidth:_,padHeight:f})=\u003ecT(3,-n,0,lS(t.pillw),lS(t.pillh)),4:({padWidth:_,padHeight:f})=\u003ecT(4,n,0,lS(t.pillw),lS(t.pillh)),5:({padWidth:_,padHeight:f})=\u003eWo(5,n,n,f,_,a),6:({padWidth:_,padHeight:f})=\u003eWo(6,n,-n,f,_,a)};for(let _=1;_\u003c=t.num_pins;_++){const f=m[_];f\u0026\u0026e.push(f({padWidth:o,padHeight:i}))}}else for(let m=1;m\u003c=t.num_pins;m++){const{x:_,y:f}=csn({pitch:n,width:r,pinNumber:m});e.push(Wo(m,_,f,o,i,a))}const A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-r/3,y:s/2+n/1.3},{x:r/3,y:s/2+n/1.3}],stroke_width:.05},c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-r/3,y:-s/2-n/1.3},{x:r/3,y:-s/2-n/1.3}],stroke_width:.05},l=xi(0,s+.5,.3),u=csn({pitch:n,width:r,pinNumber:1}),g=t.wave?1:.5,h=t.wave?.7:.3;u.x-=t.wave?i:i*1.7;const d={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_indicator\",route:[{x:u.x+g/2,y:u.y},{x:u.x-g/2,y:u.y+h/2},{x:u.x-g/2,y:u.y-h/2},{x:u.x+g/2,y:u.y}],stroke_width:.05};let p;if(t.wave){const m=2*n,_=2*n,f=m/2+i/2,I=_/2+o/2,C=f+.25,y=I+.25;p={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*C,height:2*y,layer:\"top\"}}else{const _=r/2+.1+o/2,f=n+i/2,I=r/2,C=s/2,y=_+.25,x=I+.08,E=f+.25,B=Math.max(C+.45,E);p={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:s2([{minX:-y,maxX:y,minY:-E,maxY:E},{minX:-x,maxX:x,minY:-B,maxY:B}]),layer:\"top\"}}return[l,A,c,d,...e,p]},ICi=t=\u003e{if(t.wave){const n=fCi.parse({...t,fn:\"sot457\"});return{circuitJson:lsn(n),parameters:n}}const e=_Ci.parse(t);return{circuitJson:lsn(e),parameters:e}},CCi=[{x:-.8,y:.75},{x:.8,y:.75},{x:.8,y:-.75},{x:-.8,y:-.75}],yCi=Ci.extend({fn:Z(),num_pins:$e(6).default(6),w:Z().default(\"1.1mm\"),h:Z().default(\"1.45mm\"),p:Z().default(\"0.35mm\"),pl:Z().default(\"0.2mm\"),pw:Z().default(\"0.2mm\"),string:Z().optional()}),xCi=t=\u003e{const e=yCi.parse({...t,fn:\"sot963\"}),n=ce.parse(e.w),o=ce.parse(e.h),i=ce.parse(e.p),r=ce.parse(e.pl),s=ce.parse(e.pw),a=Math.min(r,s)/8,A=[];for(let p=0;p\u003c6;p++){const{x:m,y:_}=usn(p+1,n,i,r);A.push(Wo(p+1,m,_,r,s,a))}const c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:o/2},{x:n/2,y:o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:-n/2,y:-o/2},{x:n/2,y:-o/2}],stroke_width:.05,pcb_silkscreen_path_id:\"\"},u=usn(1,n,i,r),g={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:u.x-r/2-.3,y:u.y},{x:u.x-r/2-.45,y:u.y+.15},{x:u.x-r/2-.45,y:u.y-.15},{x:u.x-r/2-.3,y:u.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"},h=xi(0,o/2+.4,.25),d={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:CCi,layer:\"top\"};return{circuitJson:[...A,c,l,h,g,d],parameters:e}},usn=(t,e,n,o)=\u003e{const i=e/2-o/2;return t\u003c=3?{x:-i,y:n-(t-1)*n}:{x:i,y:-n+(t-4)*n}},ECi=Ci.extend({fn:Z(),num_pins:xo([$e(3),$e(2)]).default(3),p:Z().default(\"5mm\"),id:Z().default(\"1.25mm\"),od:Z().default(\"2.35mm\"),ca:Z().default(\"14mm\").describe(\"Caliper axis (width or diameter of the potentiometer body or adjustment knob)\"),w:Z().default(\"5.35mm\"),h:Z().default(\"4mm\"),string:Z().optional()}),BCi=t=\u003e{const{p:e,id:n,od:o,h:i}=t,r=Number.parseFloat(i),s=Number.parseFloat(e);return[Os(1,0,s,n,o),Os(2,r,0,n,o),Os(3,0,-s,n,o)]},bCi=t=\u003e{const e=t.string?.match(/^potentiometer_(\\d+)/),n=e?Number.parseInt(e[1],10):3,o=ECi.parse({...t,num_pins:n});let i=[];o.num_pins===3\u0026\u0026(i=BCi(o));const r=Number.parseFloat(o.ca)/2+.15,s=Number.parseFloat(o.w),a=Number.parseFloat(o.od)/2+.35,A={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:0,y:r-1.75},{x:0,y:r},{x:s,y:r},{x:s,y:a}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:s,y:-a},{x:s,y:-r},{x:0,y:-r},{x:0,y:-r+1.75}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},l=Number.parseFloat(o.w)/2,u=xi(l,r+1,.5),g=Number.parseFloat(o.od)/2,h=Number.parseFloat(o.h),d=Number.parseFloat(o.ca)/2,p=-(g+.25),m=h+g+.25,_=d+.25,f={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(p+m)/2,y:0},width:m-p,height:2*_,layer:\"top\"};return{circuitJson:[...i,A,c,u,f],parameters:o}},SCi=Ci.extend({fn:Z(),p:ce.optional().default(\"7.5mm\"),id:ce.optional().default(\"1mm\"),od:ce.optional().default(\"2mm\"),d:ce.optional().default(\"10.5mm\")}),QCi=(t,e,n,o,i)=\u003e{const r=[],s=[];for(let a=0;a\u003c=50;a++){const A=a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c\u003ct-o\u0026\u0026l\u003e=e-i/2\u0026\u0026l\u003c=e+i/2||r.push({x:c,y:l})}for(let a=0;a\u003c=50;a++){const A=Math.PI+a/50*Math.PI,c=t+Math.cos(A)*n,l=e+Math.sin(A)*n;c\u003ct-o\u0026\u0026l\u003e=e-i/2\u0026\u0026l\u003c=e+i/2||s.push({x:c,y:l})}return{topArc:r,bottomArc:s}},vCi=t=\u003e{const e=SCi.parse(t),{p:n,id:o,od:i,d:r}=e,s=[r2({pn:1,x:-n/2,y:0,holeDiameter:o,rectPadWidth:i,rectPadHeight:i}),Os(2,n/2,0,o,i)],{topArc:a,bottomArc:A}=QCi(0,0,r/2+.1,i/2,i),c={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:a,stroke_width:.1,pcb_silkscreen_path_id:\"\"},l={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:A,stroke_width:.1,pcb_silkscreen_path_id:\"\"},u={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:0,y:r/2+.1},{x:0,y:-(r/2+.1)}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},g=-(r/2+.5),h=i/2+1.5,d=.5,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:g-d,y:h},{x:g+d,y:h}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},m={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:g,y:h-d},{x:g,y:h+d}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},_=xi(0,r/2+1,.5),f=r/2,I=n/2+i/2,y=Math.max(f,I)+.25,x={type:\"pcb_courtyard_circle\",pcb_courtyard_circle_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},radius:y,layer:\"top\"};return{circuitJson:[...s,c,l,u,p,m,_,x],parameters:e}},wCi=Ci.extend({fn:$e(\"fpc\"),num_pins:S5.number().int().min(2),p:ce.default(\"0.5mm\").describe(\"contact pad pitch\"),pw:ce.default(\"0.3mm\").describe(\"contact pad width\"),pl:ce.default(\"1.25mm\").describe(\"contact pad length\"),staggered:je().default(!1).describe(\"alternate contacts between two rows\"),reverse:je().default(!1).describe(\"place pin 1 on the upper row when staggered\"),py:ce.default(\"2.4mm\").describe(\"staggered row center pitch\"),toppl:ce.optional().describe(\"upper-row contact pad length\"),bottompl:ce.optional().describe(\"lower-row contact pad length\"),mpx:ce.optional().describe(\"mounting pad center pitch\"),mpy:ce.optional().describe(\"mounting pad row distance from the contact-row center\"),mounttop:je().default(!1).describe(\"place the mounting pads above the contact-row center\"),mpw:ce.default(\"2mm\").describe(\"mounting pad width\"),mpl:ce.default(\"2.5mm\").describe(\"mounting pad length\")}),jVe=(...t)=\u003eWo(...t),PCi=t=\u003e({maxX:Math.max(...t.map(e=\u003ee.x+e.width/2)),maxY:Math.max(...t.map(e=\u003ee.y+e.height/2)),minX:Math.min(...t.map(e=\u003ee.x-e.width/2)),minY:Math.min(...t.map(e=\u003ee.y-e.height/2))}),MCi=t=\u003e{const e=wCi.parse(t),{num_pins:n,p:o,pw:i,pl:r,staggered:s,reverse:a,py:A,toppl:c,bottompl:l,mounttop:u,mpw:g,mpl:h}=e,d=(n-1)*o,p=e.mpx??d+(s?3.5:3.38),m=e.mpy??(s?0:2.575),_=m===0?0:(u?1:-1)*m,f=-d/2,I=Array.from({length:n},(O,U)=\u003e{const Y=s\u0026\u0026U%2===1!==a,W=s?Y?A/2:-A/2:0,te=Y?c??r:l??r;return jVe(U+1,f+U*o,W,i,te)}),C=[jVe(n+1,p/2,_,g,h),jVe(n+2,-p/2,_,g,h)],y=[...I,...C],x=PCi(y),E=Math.min(d/2+i/2,p/2-g/2),B=x.maxY+.2,S=x.minY-.2,Q=I[0],w=Q.x-Q.width/2-.2,M=Q.y,k=[sA([{x:-E,y:B},{x:E,y:B}]),sA([{x:-E,y:S},{x:E,y:S}]),sA([{x:w-.25,y:M-.25},{x:w,y:M},{x:w-.25,y:M+.25}])],R=xi(0,B+.7,.5),F={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:(x.minX+x.maxX)/2,y:(x.minY+x.maxY)/2},width:x.maxX-x.minX+.5,height:x.maxY-x.minY+.5,layer:\"top\"};return{circuitJson:[...y,...k,R,F],parameters:{...e,mpx:p,mpy:m,toppl:c??r,bottompl:l??r}}},DCi=Ci.extend({fn:Z(),num_pins:$e(2).default(2),w:Z().default(\"6.5mm\"),h:Z().default(\"3mm\"),pl:Z().default(\"1.75mm\"),pw:Z().default(\"2.40mm\"),p:Z().default(\"4.75mm\")}),NCi=t=\u003e{const e=DCi.parse(t),n=xi(0,ce.parse(e.h)-.5,.3),o={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",route:[{x:ce.parse(e.p)/2,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:ce.parse(e.h)/2},{x:-ce.parse(e.w)/2-.3,y:-ce.parse(e.h)/2},{x:ce.parse(e.p)/2,y:-ce.parse(e.h)/2}],stroke_width:.1,pcb_silkscreen_path_id:\"\"},s={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:7,height:3.5,layer:\"top\"};return{circuitJson:TCi(e).concat(...uh(e),o,n,s),parameters:e}},RCi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n/2,y:0}:{x:n/2,y:0}},TCi=t=\u003e{const e=[],n=ce.parse(t.p),o=ce.parse(t.pl),i=ce.parse(t.pw),r=.125;for(let s=1;s\u003c=t.num_pins;s++){const{x:a,y:A}=RCi({pn:s,p:n});e.push(Wo(s,a,A,o,i,r))}return e},kCi=[{x:-1.45,y:.98},{x:-.73,y:.98},{x:-.73,y:1.1},{x:.73,y:1.1},{x:.73,y:.33},{x:1.45,y:.33},{x:1.45,y:-.33},{x:.73,y:-.33},{x:.73,y:-1.1},{x:-.73,y:-1.1},{x:-.73,y:-.98},{x:-1.45,y:-.98},{x:-1.45,y:-.32},{x:-.73,y:-.32},{x:-.73,y:.32},{x:-1.45,y:.32}],FCi=Ci.extend({fn:Z(),num_pins:_t().default(3),w:Z().default(\"2.45mm\"),h:Z().default(\"2.40mm\"),pl:Z().default(\"0.92mm\"),pw:Z().default(\"0.45mm\"),p:Z().default(\"0.891mm\"),string:Z().optional()}),LCi=t=\u003e{const e=t.string?.match(/^sot323_(\\d+)/),n=e?Number.parseInt(e[1],3):3,o=FCi.parse({...t,num_pins:n});if(o.num_pins===3)return{circuitJson:OCi(o),parameters:o};throw new Error(\"Invalid number of pins\")},HCi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n,y:.65}:e===2?{x:-n,y:-.65}:{x:n,y:0}},OCi=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;for(let d=0;d\u003ct.num_pins;d++){const{x:p,y:m}=HCi({num_pins:t.num_pins,pn:d+1,p:s});e.push(Wo(d+1,p,m,i,r,a))}const A=xi(0,Number.parseInt(t.h)/2+1,.3),c=n/2-i,l=o/2,u={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-c,y:l+.3},{x:c,y:l+.3},{x:c,y:l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},g={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-c,y:-l-.3},{x:c,y:-l-.3},{x:c,y:-l/2}],type:\"pcb_silkscreen_path\",stroke_width:.1},h={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:kCi,layer:\"top\"};return[...e,u,g,A,h]},GCi=Ci.extend({fn:Z(),circle:je().optional(),rect:je().optional(),square:je().optional(),pill:je().optional(),d:ce.optional(),pd:ce.optional(),diameter:ce.optional(),r:ce.optional(),pr:ce.optional(),radius:ce.optional(),w:ce.optional(),pw:ce.optional(),width:ce.optional(),h:ce.optional(),ph:ce.optional(),height:ce.optional(),s:ce.optional(),size:ce.optional(),string:Z().optional()}).transform(t=\u003e{let e=\"rect\";t.circle\u0026\u0026(e=\"circle\"),t.square\u0026\u0026(e=\"square\"),t.rect\u0026\u0026(e=\"rect\"),t.pill\u0026\u0026(e=\"pill\");let n,o,i;return e===\"circle\"?t.r!==void 0?n=Ua(t.r):t.pr!==void 0?n=Ua(t.pr):t.radius!==void 0?n=Ua(t.radius):t.d!==void 0?n=Ua(t.d)/2:t.pd!==void 0?n=Ua(t.pd)/2:t.diameter!==void 0?n=Ua(t.diameter)/2:n=Ua(\"1mm\")/2:(t.w!==void 0?o=Ua(t.w):t.pw!==void 0?o=Ua(t.pw):t.width!==void 0?o=Ua(t.width):t.s!==void 0?o=Ua(t.s):t.size!==void 0?o=Ua(t.size):o=Ua(\"1mm\"),t.h!==void 0?i=Ua(t.h):t.ph!==void 0?i=Ua(t.ph):t.height!==void 0?i=Ua(t.height):e===\"square\"||e===\"rect\"?i=o:i=Ua(\"1mm\")),{fn:t.fn,shape:e,radius:n,width:o,height:i}}),YCi=t=\u003e{const e=GCi.parse(t),{shape:n,radius:o,width:i,height:r}=e;let s,a;return n===\"circle\"?(s=Orn(1,{x:0,y:0,radius:o}),a=o+.5):n===\"pill\"?(s=cT(1,0,0,i,r),a=Math.max(i,r)/2+.5):(s=Wo(1,0,0,i,r),a=r/2+.5),{circuitJson:[s,xi(0,a,.2)],parameters:e}},UCi=Ci.extend({fn:$e(\"smdpads\"),num_pins:_t().int().positive().default(3),p:ce.default(\"1mm\").describe(\"pad center pitch\"),pw:ce.default(\"1mm\").describe(\"outer pad width\"),ph:ce.default(\"1mm\").describe(\"pad height\"),cyw:ce.optional().describe(\"courtyard width\"),cyh:ce.optional().describe(\"courtyard height\"),centerpadwidth:ce.optional().describe(\"center pad width\")}).superRefine((t,e)=\u003e{t.centerpadwidth!==void 0\u0026\u0026t.num_pins%2===0\u0026\u0026e.addIssue({code:lo.custom,message:\"'centerpadwidth' requires an odd number of SMD pads\",path:[\"centerpadwidth\"]})}),KCi=t=\u003e{const e=UCi.parse(t),{num_pins:n,p:o,pw:i,ph:r,cyw:s,cyh:a,centerpadwidth:A}=e,c=Math.ceil(n/2),l=-((n-1)*o)/2,u=Array.from({length:n},(_,f)=\u003e{const I=f+1,C=A!==void 0\u0026\u0026I===c?A:i;return Wo(I,l+f*o,0,C,r)}),g=(n-1)*o/2+i/2,h=A?A/2:0,d=Math.max(g,h),p=s!==void 0\u0026\u0026a!==void 0?{width:s,height:a}:{width:d*2+.5,height:r+.5},m={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:p.width,height:p.height,layer:\"top\"};return{circuitJson:[...u,xi(0,r/2+.8,.4),m],parameters:e}},VCi=Ci.extend({fn:$e(\"smdpushbutton\"),num_pins:$e(4).default(4),px:ce.default(\"4.2mm\").describe(\"horizontal pad center pitch\"),py:ce.default(\"2.15mm\").describe(\"vertical pad center pitch\"),pw:ce.default(\"1.05mm\").describe(\"pad width\"),ph:ce.default(\"0.7mm\").describe(\"pad height\")}),zCi=t=\u003e{const e=VCi.parse(t),{px:n,py:o,pw:i,ph:r}=e,s=[Wo(1,-n/2,o/2,i,r),Wo(2,n/2,o/2,i,r),Wo(3,-n/2,-o/2,i,r),Wo(4,n/2,-o/2,i,r)],a=Math.max(n/2-i/2-.15,.2),A=o/2+r/2+.1,c=Math.max(o/2-r/2-.15,.2),l=[sA([{x:-a,y:A},{x:a,y:A}]),sA([{x:-a,y:-A},{x:a,y:-A}]),sA([{x:-n/2,y:-c},{x:-n/2,y:c}]),sA([{x:n/2,y:-c},{x:n/2,y:c}])],u=xi(0,A+.6,.5),g={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:n+i+.5,height:o+r+.5,layer:\"top\"};return{circuitJson:[...s,...l,u,g],parameters:e}},JCi=t=\u003e({x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}),WCi=t=\u003e{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r\u003ct.length;r++){const s=t[r];s.x\u003ce\u0026\u0026(e=s.x),s.y\u003cn\u0026\u0026(n=s.y),s.x\u003eo\u0026\u0026(o=s.x),s.y\u003ei\u0026\u0026(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}},jCi=Ci.extend({fn:$e(\"smdslideswitch\"),num_pins:$e(7).default(7),signalcols:S5.number().int().min(3).default(3),missing:FX.default([]),p:ce.default(\"1mm\").describe(\"signal-pad column pitch\"),pw:ce.default(\"0.7mm\").describe(\"signal-pad width\"),pl:ce.default(\"1.5mm\").describe(\"signal-pad length\"),mounty:ce.default(\"-1.8mm\").describe(\"Y position of the mounting-pad row center\"),mpx:ce.default(\"5.5mm\").describe(\"horizontal center-to-center mounting-pad distance\"),mpy:ce.default(\"2.2mm\").describe(\"vertical center-to-center mounting-pad distance\"),mpw:ce.default(\"1mm\").describe(\"mounting-pad width\"),mpl:ce.default(\"0.8mm\").describe(\"mounting-pad length\"),holex:ce.default(\"1.5mm\").describe(\"alignment-hole X distance from the footprint center\"),holey:ce.optional().describe(\"alignment-hole Y position; defaults to mounty\"),holed:ce.default(\"0.9mm\").describe(\"alignment-hole diameter\"),noholes:je().optional().default(!1)}),$Ci=t=\u003e{const e=jCi.parse(t),{num_pins:n,signalcols:o,missing:i,p:r,pw:s,pl:a,mounty:A,mpx:c,mpy:l,mpw:u,mpl:g,holex:h,holed:d,noholes:p}=e,m=e.holey??A,_=i.find(J=\u003etypeof J!=\"number\"||!Number.isInteger(J)||J\u003c1||J\u003eo);if(_!==void 0)throw new Error(`Invalid missing signal column \"${_}\" for signalcols${o}`);const f=new Set(i.filter(J=\u003etypeof J==\"number\")),I=o-f.size;if(I+4!==n)throw new Error(`smdslideswitch${n} needs ${n-4} signal pads, but signalcols${o}_missing(${[...f].join(\",\")}) creates ${I}`);const C=J=\u003eNumber(J.toFixed(12)),y=[],x=-((o-1)*r)/2;let E=1;for(let J=1;J\u003c=o;J++)f.has(J)||(y.push(Wo(E,C(x+(J-1)*r),0,s,a)),E++);const B=A+l/2,S=A-l/2,Q=[{x:C(-c/2),y:C(B)},{x:C(c/2),y:C(B)},{x:C(-c/2),y:C(S)},{x:C(c/2),y:C(S)}];for(const J of Q)y.push(Wo(E,J.x,J.y,u,g)),E++;const w=p?[]:[-h,h].map(J=\u003e({type:\"pcb_hole\",pcb_hole_id:\"\",pcb_component_id:\"\",hole_shape:\"circle\",hole_diameter:d,x:J,y:m})),M=Math.max(c/2-u/2-.2,r),k=-a/2-.2,R=S+g/2+.2,F=[sA([{x:-M,y:k},{x:M,y:k}]),sA([{x:-M,y:R},{x:M,y:R}]),sA([{x:-M,y:R},{x:-M,y:k}]),sA([{x:M,y:R},{x:M,y:k}])],O=x+(o-1)*r,U=WCi([{x:x-s/2,y:-a/2},{x:O+s/2,y:a/2},{x:-c/2-u/2,y:S-g/2},{x:c/2+u/2,y:B+g/2},...p?[]:[{x:-h-d/2,y:m-d/2},{x:h+d/2,y:m+d/2}]]);if(!U)throw new Error(\"Could not determine SMD slide-switch bounds\");const Y=.25,W=JCi(U),te={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:W,width:U.maxX-U.minX+Y*2,height:U.maxY-U.minY+Y*2,layer:\"top\"},j=xi(W.x,U.maxY+.6,.5);return{circuitJson:[...y,...w,...F,j,te],parameters:e}},qCi=Ci.extend({fn:$e(\"smdpinheader\"),num_pins:_t().int().positive().default(6),p:ce.default(\"2.54mm\").describe(\"contact pitch\"),py:ce.default(\"3.31mm\").describe(\"center-to-center distance between alternating pad rows\"),pw:ce.default(\"1mm\").describe(\"pad width\"),ph:ce.default(\"2.51mm\").describe(\"pad height\"),bh:ce.default(\"2.5mm\").describe(\"plastic body height\"),male:$e(!0).default(!0),female:$e(!1).default(!1),smd:$e(!0).default(!0)}),XCi=t=\u003e{const e=qCi.parse(t),{num_pins:n,p:o,py:i,pw:r,ph:s,bh:a}=e,A=-((n-1)*o)/2,c=Array.from({length:n},(y,x)=\u003eWo(x+1,A+x*o,x%2===0?i/2:-i/2,r,s)),l=n*o/2,u=a/2,g=Math.min(.5,a/4),h=(y,x,E=-l)=\u003e{const B=r/2+.2,S=[];let Q=E;for(let w=x;w\u003cn;w+=2){const M=A+w*o,k=M-B;k\u003eQ\u0026\u0026S.push(sA([{x:Q,y},{x:k,y}])),Q=M+B}return Q\u003cl\u0026\u0026S.push(sA([{x:Q,y},{x:l,y}])),S},d=[...h(u,0,-l+g),...h(-u,1),sA([{x:l,y:-u},{x:l,y:u}]),sA([{x:-l,y:-u},{x:-l,y:u-g},{x:-l+g,y:u}])],p=(n-1)*o/2+r/2,m=i/2+s/2,_=Math.max(l,p)+.25,f=Math.max(u,m)+.25,I={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:2*_,height:2*f,layer:\"top\"},C=xi(0,f+.6,.5);return{circuitJson:[...c,...d,C,I],parameters:e}},ZCi=Ci.extend({fn:Z(),d:ce.optional(),hd:ce.optional(),r:ce.optional(),hr:ce.optional(),pd:ce.optional(),pr:ce.optional(),squarepad:je().optional().default(!1)}).transform(t=\u003e{let e;t.d!==void 0?e=Ua(t.d):t.hd!==void 0?e=Ua(t.hd):t.r!==void 0?e=Ua(t.r)*2:t.hr!==void 0?e=Ua(t.hr)*2:e=Ua(\"1mm\");let n;return t.pd!==void 0?n=Ua(t.pd):t.pr!==void 0?n=Ua(t.pr)*2:n=e*(1.5/1),{fn:t.fn,d:e,pd:n,squarepad:t.squarepad??!1}}),eyi=t=\u003e{const e=ZCi.parse(t),{d:n,pd:o,squarepad:i}=e;return{circuitJson:[i?r2({pn:1,x:0,y:0,holeDiameter:n,rectPadWidth:o,rectPadHeight:o}):Os(1,0,0,n,o),xi(0,o/2+.5,.2)],parameters:e}},tyi=Ci.extend({fn:Z(),num_pins:$e(6).default(6),h:Z().default(\"1.3mm\"),pl:Z().default(\"1.325mm\"),pw:Z().default(\"0.6mm\"),p:Z().default(\"0.95mm\")}),nyi=t=\u003e{const e=tyi.parse(t);return{circuitJson:oyi(e),parameters:e}},gsn=t=\u003e{const{p:e,h:n,pn:o}=t;if(o===1)return{x:-n/2-.4875,y:e};if(o===2)return{x:-n/2-.4875,y:0};if(o===3)return{x:-n/2-.4875,y:-e};if(o===4)return{x:n/2+.4875,y:-e};if(o===5)return{x:n/2+.4875,y:0};if(o===6)return{x:n/2+.4875,y:e};throw new Error(\"Invalid pin number\")},oyi=t=\u003e{const e=[],n=Number.parseFloat(t.h),o=Number.parseFloat(t.p),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Math.min(i,r)/8;for(let B=1;B\u003c=t.num_pins;B++){const{x:S,y:Q}=gsn({h:n,p:o,pn:B});e.push(Wo(B,S,Q,i,r,s))}const a=t.num_pins/2*o,A=n,c={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_1\",route:[{x:-a/3,y:A/2+Number.parseFloat(t.p)/1.3},{x:a/3,y:A/2+o/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},l={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_2\",route:[{x:-a/3,y:-A/2-o/1.3},{x:a/3,y:-A/2-o/1.3}],type:\"pcb_silkscreen_path\",stroke_width:.05},u=xi(0,A+.3,.3),g=gsn({h:n,p:o,pn:1});g.x=g.x-r*1.5;const h=.7,d=.3,p={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"pin1_indicator\",route:[{x:g.x+h/2-.2,y:g.y},{x:g.x-h/2,y:g.y+d/2},{x:g.x-h/2,y:g.y-d/2},{x:g.x+h/2-.2,y:g.y}],stroke_width:.05},m=n/2+.4875,_=o*2+r,f=m+i/2,I=n/2+.4,C=f+.25,y=_/2+.25,x=y+.2,E={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",layer:\"top\",outline:s2([{minX:-C,maxX:C,minY:-y,maxY:y},{minX:-I,maxX:I,minY:-x,maxY:x}])};return[...e,u,c,l,p,E]},iyi=Ci.extend({fn:$e(\"sot143\"),num_pins:$e(4).default(4),p:ce.default(\"2.382774mm\"),px:ce.default(\"1.89992mm\"),pw:ce.default(\"0.8382mm\"),ph:ce.default(\"0.8382mm\"),pin1padwidth:ce.default(\"1.1938mm\"),pin1centeroffsetx:ce.default(\"0.199898mm\"),w:ce.default(\"3mm\"),h:ce.default(\"2.9mm\")}),ryi=t=\u003e{const e=iyi.parse(t),{p:n,px:o,pw:i,ph:r,pin1padwidth:s,pin1centeroffsetx:a,w:A,h:c}=e,l=o/2,u=n/2,g=[Wo(1,-l+a,-u,s,r),Wo(2,l,-u,i,r),Wo(3,l,u,i,r),Wo(4,-l,u,i,r)],h=A/2,d=c/2,p=[sA([{x:-h,y:-d/2},{x:-h,y:d/2}]),sA([{x:h,y:d/2},{x:h,y:-d/2}])],m=o+Math.max(s,i),_=n+r,f={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:0},width:Math.max(A,m)+.5,height:Math.max(c,_)+.5,layer:\"top\"};return{circuitJson:[...g,...p,xi(0,Math.max(d,_/2)+.8,.4),f],parameters:e}},syi=[{x:-1.703,y:.98},{x:-.983,y:.98},{x:-.983,y:1.1},{x:.477,y:1.1},{x:.477,y:.98},{x:1.197,y:.98},{x:1.197,y:-.98},{x:.477,y:-.98},{x:.477,y:-1.1},{x:-.983,y:-1.1},{x:-.983,y:-.98},{x:-1.703,y:-.98}],ayi=Ci.extend({fn:Z(),num_pins:_t().default(4),w:Z().default(\"3.2mm\"),h:Z().default(\"2.6mm\"),pl:Z().default(\"1.05mm\"),pw:Z().default(\"0.45mm\"),p:Z().default(\"0.55mm\"),string:Z().optional()}),Ayi=t=\u003e{const e=t.string?.match(/^sot343_(\\d+)/),n=e?Number.parseInt(e[1],4):4,o=ayi.parse({...t,num_pins:n});if(o.num_pins===4)return{circuitJson:lyi(o),parameters:o};throw new Error(\"Invalid number of pins\")},cyi=t=\u003e{const{pn:e,p:n}=t;return e===1?{x:-n*1.92,y:-.65}:e===2?{x:-n*1.92,y:.65}:e===3?{x:n,y:.65}:e===4?{x:n,y:-.65}:{x:0,y:0}},lyi=t=\u003e{const e=[],n=Number.parseFloat(t.w),o=Number.parseFloat(t.h),i=Number.parseFloat(t.pl),r=Number.parseFloat(t.pw),s=Number.parseFloat(t.p),a=Math.min(i,r)/8;let A=1/0,c=-1/0,l=1/0,u=-1/0;for(let y=0;y\u003ct.num_pins;y++){const{x,y:E}=cyi({num_pins:t.num_pins,pn:y+1,p:s});e.push(Wo(y+1,x,E,i,r,a)),x\u003cA\u0026\u0026(A=x),x\u003ec\u0026\u0026(c=x),E\u003cl\u0026\u0026(l=E),E\u003eu\u0026\u0026(u=E)}const g=(A+c)/2,h=u-l,d=o*.3,p=h/2+d;let m=n*.8;o\u003c=2.6\u0026\u0026(m/=2);const _=xi(g,p+.5,.3),f={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_top\",route:[{x:g-m/2,y:p},{x:g+m/2,y:p}],type:\"pcb_silkscreen_path\",stroke_width:.1},I={layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"silkscreen_path_bottom\",route:[{x:g-m/2,y:-p},{x:g+m/2,y:-p}],type:\"pcb_silkscreen_path\",stroke_width:.1},C={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:syi,layer:\"top\"};return[...e,f,I,_,C]},uyi=Ci.extend({fn:Z()}),gyi=t=\u003e{const e=uyi.parse(t),n=[],o=.5-.15,i=1.5,s=.5/2,a=75,A=-37/2;for(let E=0;E\u003ca;E++){const B=E+1;if(B\u003e=24\u0026\u0026B\u003c=31)continue;const S=A-E*s,Q=B%2===0,w=i+(Q?.25:0),k=.5-w/2,R=Wo(B,k,S,w,o);R.layer=Q?\"bottom\":\"top\",n.push(R)}const c=46*.0254,l=137*.0254,u=261*.0254,g={type:\"pcb_cutout\",pcb_cutout_id:\"\",shape:\"rect\",center:{x:-l/2+i/2,y:A-u},width:l,height:c},h={x:-.5,y:A},d={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"pin_marker_1\",route:[{x:h.x-.4,y:h.y},{x:h.x-.7,y:h.y+.3},{x:h.x-.7,y:h.y-.3},{x:h.x-.4,y:h.y}],stroke_width:.05,pcb_silkscreen_path_id:\"pin_marker_1\"};let p=1/0,m=-1/0,_=1/0,f=-1/0;const I=(E,B,S=0,Q=0)=\u003e{p=Math.min(p,E-S/2),m=Math.max(m,E+S/2),_=Math.min(_,B-Q/2),f=Math.max(f,B+Q/2)};for(const E of n){const B=E;I(B.x,B.y,B.width,B.height)}I(g.center.x,g.center.y,g.width,g.height);for(const E of d.route)I(E.x,E.y);const C=(p+m)/2,y=(_+f)/2,x=E=\u003e{typeof E.x==\"number\"\u0026\u0026(E.x-=C),typeof E.y==\"number\"\u0026\u0026(E.y-=y),E.center\u0026\u0026(E.center.x-=C,E.center.y-=y),Array.isArray(E.route)\u0026\u0026(E.route=E.route.map(B=\u003e({x:B.x-C,y:B.y-y})))};for(const E of n)x(E);return x(g),x(d),{circuitJson:[...n,g,d],parameters:e}},dyi=Ci.extend({fn:Z(),numPins:_t().optional().default(0),rows:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional().default(1).describe(\"number of rows\"),p:ce.default(\"2.54mm\").describe(\"pitch\"),id:ce.default(\"1.0mm\").describe(\"inner diameter\"),od:ce.default(\"1.5mm\").describe(\"outer diameter\"),male:je().optional().describe(\"the module uses male headers\"),nopin:je().optional().default(!1).describe(\"omit pins rendering\"),female:je().optional().describe(\"the module uses female headers\"),smd:je().optional().describe(\"surface mount device\"),pinlabeltextalignleft:je().optional().default(!1),pinlabeltextaligncenter:je().optional().default(!1),pinlabeltextalignright:je().optional().default(!1),pinlabelverticallyinverted:je().optional().default(!1),pinlabelorthogonal:je().optional().default(!1),nopinlabels:je().optional().default(!1).describe(\"omit silkscreen pin labels\"),doublesidedpinlabel:je().optional().default(!1).describe(\"add silkscreen pins in top and bottom layers\"),bottomsidepinlabel:je().optional().default(!1).describe(\"place the silkscreen reference text on the bottom layer instead of top\"),pinRowSide:Kn([\"left\",\"right\",\"top\",\"bottom\"]).optional().default(\"left\"),pinrowleft:je().optional().default(!1),pinrowright:je().optional().default(!1),pinrowtop:je().optional().default(!1),pinrowbottom:je().optional().default(!1),pinrowleftpins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),pinrowrightpins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),pinrowtoppins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),pinrowbottompins:xo([Z(),_t()]).transform(t=\u003eNumber(t)).optional(),width:ce.optional(),height:ce.optional(),pinRowHoleEdgeToEdgeDist:ce.default(\"2mm\"),holes:xo([Z(),dn(Z())]).optional().transform(t=\u003e!t||Array.isArray(t)?t:t.startsWith(\"(\")\u0026\u0026t.endsWith(\")\")?t.slice(1,-1).split(\",\").map(e=\u003ee.trim()):[t]),holeXDist:ce.optional(),holeYDist:ce.optional(),holeInset:ce.default(\"1mm\"),pinrow:xo([Z(),_t()]).optional(),usbposition:Kn([\"left\",\"right\",\"top\",\"bottom\"]).optional().default(\"left\"),usbleft:je().optional().default(!1),usbtop:je().optional().default(!1),usbright:je().optional().default(!1),usbbottom:je().optional().default(!1),usbtype:Kn([\"micro\",\"c\"]).optional(),usbmicro:je().optional().default(!1),usbc:je().optional().default(!1),screen:je().optional().default(!1).describe(\"add silkscreen outline for screen/display area\"),screenwidth:ce.optional(),screenheight:ce.optional(),screencenteroffsetx:ce.optional(),screencenteroffsety:ce.optional()}).transform(t=\u003e{const e=Xrn(t);let n=t.pinRowSide;t.pinrowleft\u0026\u0026(n=\"left\"),t.pinrowright\u0026\u0026(n=\"right\"),t.pinrowtop\u0026\u0026(n=\"top\"),t.pinrowbottom\u0026\u0026(n=\"bottom\");let o=t.usbposition;t.usbleft\u0026\u0026(o=\"left\"),t.usbtop\u0026\u0026(o=\"top\"),t.usbright\u0026\u0026(o=\"right\"),t.usbbottom\u0026\u0026(o=\"bottom\");let i=t.usbtype;t.usbmicro\u0026\u0026(i=\"micro\"),t.usbc\u0026\u0026(i=\"c\"),t.pinrow!==void 0\u0026\u0026(t.numPins=Number(t.pinrow));const r={left:t.pinrowleftpins,right:t.pinrowrightpins,top:t.pinrowtoppins,bottom:t.pinrowbottompins},s=Object.values(r).some(C=\u003eC!==void 0\u0026\u0026C\u003e0),a=(r.left??0)\u003e0\u0026\u0026(r.right??0)\u003e0,A=(r.top??0)\u003e0\u0026\u0026(r.bottom??0)\u003e0;s\u0026\u0026((r.left??0)\u003e0?n=\"left\":(r.right??0)\u003e0?n=\"right\":(r.top??0)\u003e0?n=\"top\":(r.bottom??0)\u003e0\u0026\u0026(n=\"bottom\"),t.numPins=(r.left??0)+(r.right??0)+(r.top??0)+(r.bottom??0));const c=Math.ceil(t.numPins/t.rows),l=Math.max(r.left??0,r.right??0),u=Math.max(r.top??0,r.bottom??0);let g,h;if(s){const C=a?t.p:0,y=A?t.p:0;g=(u\u003e0?(u-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+C,h=(l\u003e0?(l-1)*t.p:0)+2*t.pinRowHoleEdgeToEdgeDist+y}else n===\"left\"||n===\"right\"?(g=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,h=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist):(h=(t.rows-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist,g=(c-1)*t.p+2*t.pinRowHoleEdgeToEdgeDist);t.numPins===0\u0026\u0026(g=10,h=10);const d=t.width??g,p=t.height??h,m=t.screenwidth??d*.95,_=t.screenheight??p*.95,f=t.screencenteroffsetx??0,I=t.screencenteroffsety??0;return{...t,pinlabelAnchorSide:e,pinRowSide:n,usbposition:o,usbtype:i,male:t.male??!t.female,female:t.female??!1,width:d,height:p,screenwidth:m,screenheight:_,screencenteroffsetx:f,screencenteroffsety:I,pinrowleftpins:r.left,pinrowrightpins:r.right,pinrowtoppins:r.top,pinrowbottompins:r.bottom}}).superRefine((t,e)=\u003e{t.male\u0026\u0026t.female\u0026\u0026e.addIssue({code:lo.custom,message:\"'male' and 'female' cannot both be true; it should be male or female.\",path:[\"male\",\"female\"]})}),hyi=t=\u003e{const e=dyi.parse(t),{p:n,id:o,od:i,rows:r,numPins:s,pinlabelAnchorSide:a,pinlabelverticallyinverted:A,pinlabelorthogonal:c,pinlabeltextalignleft:l,pinlabeltextalignright:u,nopinlabels:g,doublesidedpinlabel:h,bottomsidepinlabel:d,pinRowSide:p,width:m,height:_,pinRowHoleEdgeToEdgeDist:f,holes:I,holeXDist:C,holeYDist:y,holeInset:x,pinrowleftpins:E,pinrowrightpins:B,pinrowtoppins:S,pinrowbottompins:Q,usbposition:w,usbtype:M,screen:k,screenwidth:R,screenheight:F,screencenteroffsetx:O,screencenteroffsety:U}=e;let Y=\"center\";l?Y=\"left\":u\u0026\u0026(Y=\"right\");const W=[],te={left:E,right:B,top:S,bottom:Q},j=Object.values(te).some(ie=\u003eie!==void 0\u0026\u0026ie\u003e0),J=(ie,ne,le,ge)=\u003e{if(e.smd?W.push(Wo(ie,ne,le,e.od,e.od)):ie===1?W.push(r2({pn:ie,x:ne,y:le,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(Os(ie,ne,le,o,i)),!g){const _e=ne+(ge===\"left\"?-i:ge===\"right\"?i:0),ue=le+(ge===\"top\"?i:ge===\"bottom\"?-i:0);d||W.push(gT({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"top\"})),(h||d)\u0026\u0026W.push(gT({fs:i/5,pn:ie,anchor_x:_e,anchor_y:ue,anchorplacement:ge,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"bottom\"}))}};if(j){const ie=n;let ne=1;const le=te.left??0,ge=te.right??0,_e=te.top??0,ue=te.bottom??0,fe=(pe,ye)=\u003e{if(!(ye\u003c=0))if(pe===\"left\"||pe===\"right\"){const Me=pe===\"left\"?-m/2+f:m/2-f,ve=(ye-1)/2*ie;for(let he=0;he\u003cye;he++)J(ne,Me,ve-he*ie,pe),ne++}else{const Me=pe===\"top\"?_/2-f:-_/2+f,ve=-((ye-1)/2)*ie;for(let he=0;he\u003cye;he++)J(ne,ve+he*ie,Me,pe),ne++}};fe(\"left\",le),fe(\"right\",ge),fe(\"top\",_e),fe(\"bottom\",ue)}else{const ie=n;let ne=0,le=0,ge=0,_e=0,ue=0,fe=0;const pe=Math.ceil(s/r);p===\"left\"||p===\"right\"?(ne=p===\"left\"?-m/2+f:m/2-f,le=(pe-1)/2*ie,ge=0,_e=-ie,ue=p===\"left\"?ie:-ie,fe=0):(ne=-(pe-1)/2*ie,le=p===\"top\"?_/2-f:-_/2+f,ge=ie,_e=0,ue=0,fe=p===\"top\"?-ie:ie);let ye=1;for(let Me=0;Me\u003cr\u0026\u0026ye\u003c=s;Me++)for(let ve=0;ve\u003cpe\u0026\u0026ye\u003c=s;ve++){const he=ne+ve*ge+Me*ue,Qe=le+ve*_e+Me*fe;if(e.smd?W.push(Wo(ye,he,Qe,e.od,e.od)):ye===1?W.push(r2({pn:ye,x:he,y:Qe,holeDiameter:o,rectPadWidth:i,rectPadHeight:i})):W.push(Os(ye,he,Qe,o,i)),!g){const Pe=he+(p===\"left\"?-i:p===\"right\"?i:0),we=Qe+(p===\"top\"?i:p===\"bottom\"?-i:0);d||W.push(gT({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"top\"})),(h||d)\u0026\u0026W.push(gT({fs:i/5,pn:ye,anchor_x:Pe,anchor_y:we,anchorplacement:a,textalign:Y,orthogonal:c,verticallyinverted:A,layer:\"bottom\"}))}ye++}}if(I)for(const ie of I){let ne=0,le=0;ie===\"topleft\"?(ne=-m/2+x,le=_/2-x):ie===\"topright\"?(ne=m/2-x,le=_/2-x):ie===\"bottomleft\"?(ne=-m/2+x,le=-_/2+x):ie===\"bottomright\"?(ne=m/2-x,le=-_/2+x):ie===\"center\"\u0026\u0026(ne=0,le=0),C!==void 0\u0026\u0026(ne+=C),y!==void 0\u0026\u0026(le+=y),W.push(Os(s+I.indexOf(ie)+1,ne,le,o,i))}if(!e.nosilkscreen){const ie=[{x:-m/2,y:-_/2},{x:m/2,y:-_/2},{x:m/2,y:_/2},{x:-m/2,y:_/2},{x:-m/2,y:-_/2}];W.push(sA(ie,{stroke_width:.1,layer:\"top\"}))}const oe=xi(0,_/2+1,.5);if(W.push(oe),w\u0026\u0026M){let ie,ne;if(M===\"c\")ie=8,ne=3;else if(M===\"micro\")ie=6,ne=2;else return{circuitJson:W,parameters:e};let le;if(w===\"left\")le=[{x:-m/2,y:-ie/2},{x:-m/2+ne,y:-ie/2},{x:-m/2+ne,y:ie/2},{x:-m/2,y:ie/2},{x:-m/2,y:-ie/2}];else if(w===\"right\")le=[{x:m/2-ne,y:-ie/2},{x:m/2,y:-ie/2},{x:m/2,y:ie/2},{x:m/2-ne,y:ie/2},{x:m/2-ne,y:-ie/2}];else if(w===\"top\")le=[{x:-ie/2,y:_/2-ne},{x:ie/2,y:_/2-ne},{x:ie/2,y:_/2},{x:-ie/2,y:_/2},{x:-ie/2,y:_/2-ne}];else if(w===\"bottom\")le=[{x:-ie/2,y:-_/2},{x:ie/2,y:-_/2},{x:ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2+ne},{x:-ie/2,y:-_/2}];else return{circuitJson:W,parameters:e};W.push(sA(le,{stroke_width:.1,layer:\"top\"}))}if(k){const ie=R/2,ne=F/2,le=O,ge=U,_e=[{x:-ie+le,y:-ne+ge},{x:ie+le,y:-ne+ge},{x:ie+le,y:ne+ge},{x:-ie+le,y:ne+ge},{x:-ie+le,y:-ne+ge}];W.push(sA(_e,{stroke_width:.05,layer:\"top\"}))}return{circuitJson:W,parameters:e}},pyi=[{x:-1.45,y:2.75},{x:-1.45,y:-1.85},{x:4.05,y:-1.85},{x:4.05,y:2.75}],myi=[{x:-1.55,y:2.75},{x:-1.55,y:-1.85},{x:3.95,y:-1.85},{x:3.95,y:2.75}],_yi=Ci.extend({fn:Z(),num_pins:_t().default(3),inline:je().default(!1),p:Z().default(\"1.27mm\"),id:Z().default(\"0.75mm\"),od:Z().default(\"1.3mm\"),w:Z().default(\"4.8mm\"),h:Z().default(\"4.0mm\")}),fyi=t=\u003e{const e=_yi.parse(t),n=Number.parseFloat(e.p),o=Number.parseFloat(e.w),i=Number.parseFloat(e.h),r=e.inline?1.05:Number.parseFloat(e.od),s=e.inline?1.5:r,a=[r2({pn:1,x:0,y:0,holeDiameter:e.id,rectPadWidth:r,rectPadHeight:s}),e.inline?Q6(2,n,0,Number.parseFloat(e.id),r,s):Os(2,n,n,e.id,r),e.inline?Q6(3,n*2,0,Number.parseFloat(e.id),r,s):Os(3,n*2,0,e.id,r)],A=o/2,c=e.inline?n-.09:n,l=.2,u=l+A-i,g=Array.from({length:32},(m,_)=\u003e{const f=Math.PI*_/31;return{x:c+A*Math.cos(f),y:l+A*Math.sin(f)}}),h={type:\"pcb_silkscreen_path\",layer:\"top\",pcb_component_id:\"\",pcb_silkscreen_path_id:\"\",stroke_width:.12,route:[...g,{x:c-A,y:u},{x:c+A,y:u},g[0]]},d=xi(c,l+A+1,.5),p={type:\"pcb_courtyard_outline\",pcb_courtyard_outline_id:\"\",pcb_component_id:\"\",outline:e.inline?myi:pyi,layer:\"top\"};return{circuitJson:[...a,h,d,p],parameters:e}},Iyi=Ci.extend({fn:$e(\"usbcmidmount\"),num_pins:$e(16).default(16),pinstart:S5.number().int().positive().default(1),split:je().default(!1).describe(\"emit all 16 contact lands\"),reverse:je().default(!1).describe(\"number contact lands right-to-left\"),noholes:je().default(!1).describe(\"omit the two locator holes\"),rowy:ce.default(\"2.125mm\").describe(\"contact pad row y position\"),ph:ce.default(\"1.1mm\").describe(\"contact pad height\"),pw:ce.default(\"0.3mm\").describe(\"signal contact pad width\"),powerpw:ce.default(\"0.55mm\").describe(\"merged power pad width\"),powerx:ce.default(\"3.2mm\").describe(\"outer merged power pad x\"),shellx:ce.default(\"4.325mm\").describe(\"shell tab x position\"),topy:ce.default(\"1.575mm\").describe(\"upper shell tab y position\"),bottomy:ce.default(\"2.625mm\").describe(\"lower shell tab negative y magnitude\"),tophw:ce.default(\"0.6mm\").describe(\"upper shell slot width\"),tophh:ce.default(\"1.5mm\").describe(\"upper shell slot height\"),topring:ce.default(\"0.25mm\").describe(\"upper shell annular ring\"),bottomhw:ce.default(\"0.6mm\").describe(\"lower shell slot width\"),bottomhh:ce.default(\"1.2mm\").describe(\"lower shell slot height\"),bottomring:ce.default(\"0.3mm\").describe(\"lower shell annular ring\"),holex:ce.default(\"2.89mm\").describe(\"locator hole x position\"),holey:ce.default(\"1.055mm\").describe(\"locator hole y position\"),holed:ce.default(\"0.7mm\").describe(\"locator hole diameter\"),bodybottom:ce.default(\"5.225mm\").describe(\"connector body negative y extent\")}),Ipe=({pin:t,x:e,y:n,holeWidth:o,holeHeight:i,outerWidth:r,outerHeight:s})=\u003e({type:\"pcb_plated_hole\",shape:\"pill\",pcb_plated_hole_id:\"\",pcb_component_id:\"\",pcb_port_id:\"\",x:e,y:n,hole_width:o,hole_height:i,outer_width:r,outer_height:s,ccw_rotation:0,layers:[\"top\",\"bottom\"],port_hints:[t.toString()]}),Cyi=t=\u003e{const e=Iyi.parse(t),{pinstart:n,split:o,reverse:i,noholes:r,rowy:s,ph:a,pw:A,powerpw:c,powerx:l,shellx:u,topy:g,bottomy:h,tophw:d,tophh:p,topring:m,bottomhw:_,bottomhh:f,bottomring:I,holex:C,holey:y,holed:x,bodybottom:E}=e,B=r?[]:[-C,C].map(ge=\u003e({type:\"pcb_hole\",pcb_hole_id:\"\",pcb_component_id:\"\",hole_shape:\"circle\",hole_diameter:x,x:ge,y})),S=[Ipe({pin:n,x:-u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Ipe({pin:n+1,x:u,y:g,holeWidth:d,holeHeight:p,outerWidth:d+2*m,outerHeight:p+2*m}),Ipe({pin:n+2,x:-u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I}),Ipe({pin:n+3,x:u,y:-h,holeWidth:_,holeHeight:f,outerWidth:_+2*I,outerHeight:f+2*I})],Q=Number((l-.8).toFixed(12)),w=[-l,-Q,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,Q,l],k=o?[-3.35,-3.05,-2.55,-2.25,-1.75,-1.25,-.75,-.25,.25,.75,1.25,1.75,2.25,2.55,3.05,3.35]:w,R=i?k.slice().reverse():k,F=o?R.map(()=\u003eA):R.map((ge,_e)=\u003e_e\u003c2||_e\u003e=R.length-2?c:A),O=R.map((ge,_e)=\u003eWo(n+4+_e,ge,s,F[_e],a)),U=Math.min(u-Math.max(d,_)/2-.2,4.5),Y=[sA([{x:-U,y:-h+f/2+I+.2},{x:-U,y:g-p/2-m-.2}]),sA([{x:U,y:-h+f/2+I+.2},{x:U,y:g-p/2-m-.2}]),sA([{x:-U,y:-E},{x:U,y:-E}])],W=Math.max(s+a/2,g+p/2+m),te=Math.min(-E,-h-f/2-I),j=-u-Math.max(d+2*m,_+2*I)/2-.25,J=-j,oe=W+.25,ie=te-.25,ne=xi(0,oe+.75,.5),le={type:\"pcb_courtyard_rect\",pcb_courtyard_rect_id:\"\",pcb_component_id:\"\",center:{x:0,y:(oe+ie)/2},width:J-j,height:oe-ie,layer:\"top\"};return{circuitJson:[...B,...S,...O,...Y,ne,le],parameters:e}};hpe.extend({}).transform(ppe);var yyi=t=\u003e(t.legsoutside=!1,t.pl||(t.pl=1),t.pw||(t.pw=.6),uT(t)),xyi=(t,e)=\u003e{const n=t.filter(o=\u003eo.type===\"pcb_silkscreen_text\");if(n.length===0)return t;for(const o of n)e.norefdes\u0026\u0026(o.text=\"\");return t},Eyi=(t,e)=\u003ee.nosilkscreen?t.filter(n=\u003en.type!==\"pcb_silkscreen_path\"\u0026\u0026n.type!==\"pcb_silkscreen_text\"):t,Byi=(t,e)=\u003e{if(!e)return t;const n=t.filter(l=\u003el.type===\"pcb_smtpad\"||l.type===\"pcb_plated_hole\");if(n.length===0)return t;let o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const a=(l,u,g=0,h=0)=\u003e{const d=l-g/2,p=l+g/2,m=u-h/2,_=u+h/2;o=Math.min(o,d),i=Math.max(i,p),r=Math.min(r,m),s=Math.max(s,_)};for(const l of n)if(l.type===\"pcb_smtpad\"){const u=l.shape===\"circle\"?l.radius*2:l.width,g=l.shape===\"circle\"?l.radius*2:l.height;a(l.x,l.y,u,g)}else if(l.type===\"pcb_plated_hole\"){const u=l.outer_diameter??l.hole_diameter;a(l.x,l.y,u,u)}let A=0,c=0;switch(e){case\"center\":A=(o+i)/2,c=(r+s)/2;break;case\"bottomleft\":A=o,c=r;break;case\"bottomcenter\":case\"centerbottom\":A=(o+i)/2,c=r;break;case\"topcenter\":case\"centertop\":A=(o+i)/2,c=s;break;case\"leftcenter\":case\"centerleft\":A=o,c=(r+s)/2;break;case\"rightcenter\":case\"centerright\":A=i,c=(r+s)/2;break;case\"pin1\":{const l=n.find(u=\u003eu.port_hints?.[0]===\"1\")||n[0];A=l.x,c=l.y;break}}if(A===0\u0026\u0026c===0)return t;for(const l of t){if(typeof l.x==\"number\"\u0026\u0026(l.x-=A),typeof l.y==\"number\"\u0026\u0026(l.y-=c),l.center\u0026\u0026typeof l.center.x==\"number\"\u0026\u0026(l.center.x-=A,l.center.y-=c),l.type===\"pcb_silkscreen_path\")for(const u of l.route)u.x-=A,u.y-=c;l.type===\"pcb_silkscreen_text\"\u0026\u0026l.anchor_position\u0026\u0026(l.anchor_position.x-=A,l.anchor_position.y-=c)}return t},byi=[0,90,180,270],Cpe=(t,e)=\u003e{switch(e){case 90:return{x:-t.y,y:t.x};case 180:return{x:-t.x,y:-t.y};case 270:return{x:t.y,y:-t.x};default:return{...t}}},dsn=t=\u003e{if(typeof t.x==\"number\"\u0026\u0026typeof t.y==\"number\")return{x:t.x,y:t.y};if(Array.isArray(t.points)\u0026\u0026t.points.length\u003e0){const e=t.points.map(o=\u003eo.x),n=t.points.map(o=\u003eo.y);return{x:(Math.min(...e)+Math.max(...e))/2,y:(Math.min(...n)+Math.max(...n))/2}}return null},Syi=t=\u003et.port_hints?.some(e=\u003e/^(?:pin)?1$/i.test(String(e))),Qyi=(t,e,[n,o])=\u003e{const i=t.map(_=\u003e_.x),r=t.map(_=\u003e_.y),s=Math.min(...i),a=Math.max(...i),A=Math.min(...r),c=Math.max(...r),l=(s+a)/2,u=(A+c)/2,g=a-s,h=c-A,d=Math.max(g,h,1)*1e-6,p=n===\"leftside\"\u0026\u0026Math.abs(e.x-s)\u003c=d||n===\"rightside\"\u0026\u0026Math.abs(e.x-a)\u003c=d||n===\"topside\"\u0026\u0026Math.abs(e.y-c)\u003c=d||n===\"bottomside\"\u0026\u0026Math.abs(e.y-A)\u003c=d,m=o===\"left\"\u0026\u0026(g\u003c=d||e.x\u003cl-d)||o===\"right\"\u0026\u0026(g\u003c=d||e.x\u003el+d)||o===\"top\"\u0026\u0026(h\u003c=d||e.y\u003eu+d)||o===\"bottom\"\u0026\u0026(h\u003c=d||e.y\u003cu-d);return p\u0026\u0026m},$Ve=(t,e)=\u003e{if(!t||typeof t!=\"object\"||typeof t.x!=\"number\"||typeof t.y!=\"number\")return;const n=Cpe(t,e);t.x=n.x,t.y=n.y},ype=t=\u003e(t%360+360)%360,vyi=(t,e)=\u003e{switch(t.shape){case\"rect\":return{...t,shape:\"rotated_rect\",ccw_rotation:ype(e)};case\"pill\":return{...t,shape:\"rotated_pill\",ccw_rotation:ype(e)};case\"rotated_rect\":case\"rotated_pill\":return{...t,ccw_rotation:ype(t.ccw_rotation+e)};default:return t}},wyi=(t,e)=\u003ee===0?t:t.map(n=\u003e{const o=structuredClone(n);if(typeof o.x==\"number\"\u0026\u0026typeof o.y==\"number\"){const i=Cpe(o,e);o.x=i.x,o.y=i.y}$Ve(o.center,e),$Ve(o.anchor_position,e);for(const i of[\"route\",\"outline\",\"points\"])if(Array.isArray(o[i]))for(const r of o[i])$Ve(r,e);return o.type===\"pcb_smtpad\"?vyi(o,e):((o.type===\"pcb_plated_hole\"||o.type===\"pcb_silkscreen_text\"||o.type===\"pcb_fabrication_note_text\")\u0026\u0026(o.ccw_rotation=ype(Number(o.ccw_rotation??0)+e)),(e===90||e===270)\u0026\u0026(o.type===\"pcb_courtyard_rect\"||o.type===\"pcb_silkscreen_rect\"||o.type===\"pcb_fabrication_note_rect\"||o.type===\"pcb_cutout\"\u0026\u0026o.shape===\"rect\")\u0026\u0026([o.width,o.height]=[o.height,o.width]),o)}),Pyi=(t,e)=\u003e{if(!e)return t;const n=t.filter(a=\u003ea.type===\"pcb_smtpad\"||a.type===\"pcb_plated_hole\"),o=n.find(Syi),i=n.map(dsn).filter(a=\u003ea!==null),r=o?dsn(o):null;if(!o||!r||i.length===0)throw new Error(`pin1location(${e.join(\",\")}) requires a footprint with a pad whose port_hints contain \"1\" or \"pin1\"`);const s=byi.find(a=\u003e{const A=i.map(l=\u003eCpe(l,a)),c=Cpe(r,a);return Qyi(A,c,e)});if(s===void 0)throw new Error(`pin1location(${e.join(\",\")}) cannot be reached with a rotation; the requested location may be the mirrored orientation of this footprint`);return wyi(t,s)},hsn=(t,e,n)=\u003eMath.min(t,e/2,n/2),Myi=(t,e)=\u003e{if(e===void 0)return t;const n=Ua(e);if(!Number.isFinite(n)||n\u003c0)throw new Error(`rounded radius must be a non-negative length, got \"${e}\"`);for(const o of t)o.type===\"pcb_smtpad\"\u0026\u0026(o.shape===\"rect\"||o.shape===\"rotated_rect\")\u0026\u0026(o.corner_radius=hsn(n,o.width,o.height)),o.type===\"pcb_plated_hole\"\u0026\u0026\"rect_pad_width\"in o\u0026\u0026\"rect_pad_height\"in o\u0026\u0026(o.rect_border_radius=hsn(n,o.rect_pad_width,o.rect_pad_height));return t};function Dyi(t){return t!=null}var Nyi=t=\u003et.trim().replace(/^pinheader(?=[\\d_]|$)/i,\"pinrow\").replace(/^d2pak(\\d+)(?=_|$)/i,\"d2pak_$1\").replace(/^to-252(?:-(\\d+))?(?=_|$)/i,(e,n)=\u003en?`to252_${n}`:\"to252\").replace(/^to-263(?:-(\\d+))?(?=_|$)/i,(e,n)=\u003en?`to263_${n}`:\"to263\").replace(/^sot-23(?:-(\\d+))?(?=_|$)/i,(e,n)=\u003en?`sot23_${n}`:\"sot23\").replace(/^sot23-(\\d+)(?=_|$)/i,\"sot23_$1\").replace(/^sot-223-(\\d+)(?=_|$)/i,\"sot223_$1\").replace(/^to-220f-(\\d+)(?=_|$)/i,\"to220f_$1\").replace(/^jst_(ph|sh|zh|xh)_(\\d+)(?=_|$)/i,\"jst$2_$1\"),Ryi=t=\u003et.replace(/([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+))\\s*(?:um|µm)(?=$|[x,() ])/gi,e=\u003e`${Number(ce.parse(e).toPrecision(12))}mm`),Tyi=t=\u003e{let e=xpe();const n=Nyi(t),i=n.replace(/^((?:\\d{4}|\\d{5}))(?=$|_|x)/,\"res$1\").replace(/^zh(\\d+)(?:$|_)/,\"jst$1_zh\").split(/_(?!metric)/).map(r=\u003e{const s=r.match(/^(pin1location)(\\(.*\\))$/i);if(s)return{fn:s[1].toLowerCase(),v:s[2]};const a=r.match(/((?:p\\d+[a-zA-Z]+(?=[\\(\\d\\.\\+\\-\\?]))|[a-zA-Z]+)([\\(\\d\\.\\+\\-\\?].*)?/);if(!a)return null;const[,A,c]=a;if(!A)return null;const l=A.toLowerCase();return c?.includes(\"?\")?null:{fn:l,v:c}}).filter(Dyi);for(const{fn:r,v:s}of i)e=e[r](s);return e.setString(n),e},kyi=()=\u003eObject.keys(cS),xpe=()=\u003e{const t=new Proxy({},{get:(e,n)=\u003e{if(n===\"soup\"||n===\"circuitJson\"){if(\"fn\"in e\u0026\u0026cS[e.fn])return()=\u003e{const{circuitJson:o}=cS[e.fn](e),i=Eyi(o,e),r=xyi(i,e),s=Pyi(r,e.pin1location?Drn.parse(e.pin1location):void 0),a=Myi(s,e.rounded);return Byi(a,e.origin)};if(!cS[e.fn])throw new Error(`Invalid footprint function, got \"${e.fn}\"${e.string?`, from string \"${e.string}\"`:\"\"}`);return()=\u003e{throw new Error(`No function found for footprinter, make sure to specify .dip, .lr, .p, etc. Got \"${n}\"`)}}if(n===\"json\"){if(!cS[e.fn])throw new Error(`Invalid footprint function, got \"${e.fn}\"${e.string?`, from string \"${e.string}\"`:\"\"}`);return()=\u003ecS[e.fn](e).parameters}return n===\"getFootprintNames\"?()=\u003eObject.keys(cS):n===\"params\"?()=\u003ee:n===\"setString\"?o=\u003e(e.string=o,t):(...o)=\u003e{const i=o[0],r=typeof i==\"string\"?Ryi(i):i;return Object.keys(e).length===0?`${n}${i}`in cS?(e[`${n}${i}`]=!0,e.fn=`${n}${i}`):(e[n]=!0,e.fn=n,n===\"res\"||n===\"cap\"||n===\"led\"||n===\"diode\"?i\u0026\u0026(typeof i==\"string\"\u0026\u0026i.includes(\"_metric\")?e.metric=i.split(\"_metric\")[0]:e.imperial=i):e.num_pins=Number.isNaN(Number.parseFloat(i))?void 0:Number.parseFloat(i)):!i\u0026\u0026[\"w\",\"h\",\"p\"].includes(n)||(e[n]=n===\"pin1location\"\u0026\u0026o.length\u003e1?o:r??!0),t}}});return t};xpe.string=Tyi,xpe.getFootprintNames=kyi;var pI=xpe,psn={in:25.4,inch:25.4,mil:.0254,mm:1,m:1e3,cm:10,ft:304.8,feet:304.8},Fyi=t=\u003e{let e=typeof t==\"number\"?\"mm\":t.replace(/^[^a-zA-Z]+/g,\"\").toLowerCase();e||(e=\"mm\");const n=typeof t==\"number\"?t:Number.parseFloat(t.split(e)[0]);if(e in psn)return n*psn[e];throw new Error(`Unsupported unit: ${e}`)},v6=xo([_t(),Z()]).transform((t,e)=\u003e{try{const n=Fyi(t);if(!Number.isFinite(n))throw new Error(\"Length is not finite\");return n}catch{return e.addIssue({code:\"custom\",message:`Invalid model length: ${String(t)}`}),gBn}}),a1=v6.refine(t=\u003et\u003e0,\"Length must be greater than zero\"),w6=v6.refine(t=\u003et\u003e=0,\"Length cannot be negative\"),Lyi=Kn([\"sitsFlat\",\"sitsFlatBelowBoard\",\"foldedToFaceAboveBoard\",\"foldedToFaceBelowBoard\",\"foldedToRightAngleAboveBoard\",\"foldedToRightAngleBelowBoard\"]),qVe=_t().finite().positive(),Hyi=Z().refine(t=\u003e{const e=t.split(\":\");if(e.length!==2)return!1;const n=Number(e[0]),o=Number(e[1]);return Number.isFinite(n)\u0026\u0026Number.isFinite(o)\u0026\u0026n\u003e0\u0026\u0026o\u003e0},'Aspect ratio must look like \"16:9\"').transform(t=\u003et),msn=xo([qVe,Hyi,fQ([qVe,qVe])]),_sn=Pt({x:v6.optional(),y:v6.optional(),z:v6.optional()}).strict(),XVe=xo([_t().finite(),Z().min(1)]),fsn=fQ([XVe,XVe,XVe]),Oyi=[\"sitsFlat\",\"sitsFlatBelowBoard\",\"foldedToFaceAboveBoard\",\"foldedToFaceBelowBoard\",\"foldsAboveBoard\",\"foldsBelowBoard\",\"foldedToRightAngleAboveBoard\",\"foldedToRightAngleBelowBoard\"],Isn={width:a1.optional(),height:a1.optional(),diagonal:a1.optional(),aspectRatio:msn.optional(),ratio:msn.optional(),defaultDiagonal:a1.optional(),orientation:Lyi.optional(),sitsFlat:je().optional(),sitsFlatBelowBoard:je().optional(),foldedToFaceAboveBoard:je().optional(),foldedToFaceBelowBoard:je().optional(),foldsAboveBoard:je().optional(),foldsBelowBoard:je().optional(),foldedToRightAngleAboveBoard:je().optional(),foldedToRightAngleBelowBoard:je().optional(),screenThickness:a1.optional(),bezelInset:w6.optional(),bezelDepth:a1.optional(),activeAreaWidth:a1.optional(),activeAreaHeight:a1.optional(),screenColor:Z().min(1).optional(),bezelColor:Z().min(1).optional(),showScreen:je().optional(),flexCableLength:a1.optional(),flexCableWidth:a1.optional(),flexCableThickness:a1.optional(),flexCableColor:Z().min(1).optional(),conductorCount:_t().int().positive().optional(),conductorPitch:a1.optional(),conductorWidth:a1.optional(),conductorThickness:a1.optional(),conductorColor:Z().min(1).optional(),cableEdgeMargin:w6.optional(),exposedContactLength:w6.optional(),showConductors:je().optional(),showFlexCable:je().optional(),showStiffeners:je().optional(),stiffenerLength:w6.optional(),stiffenerThickness:a1.optional(),stiffenerColor:Z().min(1).optional(),bendRadius:a1.optional(),bendSegments:_t().int().min(2).optional(),rightAngleVerticalLead:w6.optional(),distanceAboveBoard:w6.optional(),distanceBelowBoard:w6.optional(),foldDistanceFromConnector:w6.optional(),foldOutset:a1.optional(),foldSegments:_t().int().min(4).optional(),screenGap:w6.optional(),boardTopZ:v6.optional(),boardThickness:a1.optional(),boardClearance:w6.optional(),cableStartX:v6.optional(),cableStartY:v6.optional(),cableStartZ:v6.optional(),cableLateralOffset:v6.optional(),screenOffset:_sn.optional(),screenRotation:fsn.optional(),rotation:fsn.optional(),offset:_sn.optional()},Csn=(t,e)=\u003e{const n=Oyi.filter(o=\u003et[o]===!0);n.length\u003e1\u0026\u0026e(n[1])};Pt(Isn).strict().superRefine((t,e)=\u003e{Csn(t,n=\u003e{e.addIssue({code:\"custom\",message:\"Only one FlexScreen orientation shortcut can be true\",path:[n]})})});var Gyi=Pt({fn:$e(\"flexscreen\"),...Isn}).strict().superRefine((t,e)=\u003e{Csn(t,n=\u003e{e.addIssue({code:\"custom\",message:\"Only one FlexScreen orientation shortcut can be true\",path:[n]})})}),ysn=t=\u003e{const e=t.match(/^([a-zA-Z]+)([\\(\\d\\.\\+\\-].*)?$/);if(e?.[1])return{fn:e[1].toLowerCase(),value:e[2]}},Yyi=t=\u003e{const e=t.trim();if(!e)throw new Error(\"Model string cannot be empty\");const n=e.split(\"_\"),o=n[0],i=ysn(o),r={},s=i?.fn??o.toLowerCase();if(r[s]=!0,r.fn=s,i?.value){const a=Number.parseFloat(i.value);Number.isFinite(a)\u0026\u0026(r.num_pins=a)}for(const a of n.slice(1)){if(!a)throw new Error(\"Model strings cannot contain empty tokens\");const A=ysn(a);if(!A)throw new Error(`Invalid model string token \"${a}\"`);r[A.fn]=A.value??!0}return r.string=e,r},Uyi={sitsflat:\"sitsFlat\",sitsflatbelow:\"sitsFlatBelowBoard\",sitsflatbelowboard:\"sitsFlatBelowBoard\",foldsabove:\"foldedToFaceAboveBoard\",foldsaboveboard:\"foldedToFaceAboveBoard\",foldedtofaceaboveboard:\"foldedToFaceAboveBoard\",foldsbelow:\"foldedToFaceBelowBoard\",foldsbelowboard:\"foldedToFaceBelowBoard\",foldedtofacebelowboard:\"foldedToFaceBelowBoard\",rightangleabove:\"foldedToRightAngleAboveBoard\",rightangleaboveboard:\"foldedToRightAngleAboveBoard\",foldedtorightangleaboveboard:\"foldedToRightAngleAboveBoard\",rightanglebelow:\"foldedToRightAngleBelowBoard\",rightanglebelowboard:\"foldedToRightAngleBelowBoard\",foldedtorightanglebelowboard:\"foldedToRightAngleBelowBoard\"},Kyi={width:[\"width\",\"w\"],height:[\"height\",\"h\"],diagonal:[\"diagonal\",\"diag\",\"d\"],defaultDiagonal:[\"defaultdiagonal\",\"defaultdiag\"],screenThickness:[\"screenthickness\"],bezelInset:[\"bezelinset\"],bezelDepth:[\"bezeldepth\"],activeAreaWidth:[\"activeareawidth\",\"activew\"],activeAreaHeight:[\"activeareaheight\",\"activeh\"],flexCableLength:[\"flexcablelength\",\"flexlength\",\"flex\"],flexCableWidth:[\"flexcablewidth\",\"flexwidth\"],flexCableThickness:[\"flexcablethickness\",\"flexthickness\"],conductorPitch:[\"conductorpitch\"],conductorWidth:[\"conductorwidth\"],conductorThickness:[\"conductorthickness\"],cableEdgeMargin:[\"cableedgemargin\",\"edgemargin\"],exposedContactLength:[\"exposedcontactlength\",\"contactlength\"],stiffenerLength:[\"stiffenerlength\"],stiffenerThickness:[\"stiffenerthickness\"],bendRadius:[\"bendradius\"],rightAngleVerticalLead:[\"rightangleverticallead\",\"verticallead\"],distanceAboveBoard:[\"distanceaboveboard\",\"distanceabove\"],distanceBelowBoard:[\"distancebelowboard\",\"distancebelow\"],foldDistanceFromConnector:[\"folddistancefromconnector\",\"folddistance\",\"foldstart\"],foldOutset:[\"foldoutset\",\"outset\"],screenGap:[\"screengap\"],boardTopZ:[\"boardtopz\"],boardThickness:[\"boardthickness\"],boardClearance:[\"boardclearance\"],cableStartX:[\"cablestartx\"],cableStartY:[\"cablestarty\"],cableStartZ:[\"cablestartz\"],cableLateralOffset:[\"cablelateraloffset\",\"lateraloffset\"]},Vyi=Object.fromEntries(Object.entries(Kyi).flatMap(([t,e])=\u003ee.map(n=\u003e[n,t]))),zyi={conductorcount:\"conductorCount\",conductors:\"conductorCount\",bendsegments:\"bendSegments\",foldsegments:\"foldSegments\"},xsn={showscreen:[\"showScreen\",!0],hidescreen:[\"showScreen\",!1],showflex:[\"showFlexCable\",!0],hideflex:[\"showFlexCable\",!1],showconductors:[\"showConductors\",!0],hideconductors:[\"showConductors\",!1],showstiffeners:[\"showStiffeners\",!0],hidestiffeners:[\"showStiffeners\",!1]},Jyi={screencolor:\"screenColor\",bezelcolor:\"bezelColor\",flexcolor:\"flexCableColor\",conductorcolor:\"conductorColor\",stiffenercolor:\"stiffenerColor\"},Wyi=t=\u003e{const e=String(t).toLowerCase().replace(\"x\",\":\");if(e.includes(\":\")){const[o,i,r]=e.split(\":\"),s=Number(o),a=Number(i);if(r!==void 0||!Number.isFinite(s)||!Number.isFinite(a)||s\u003c=0||a\u003c=0)throw new Error(`Invalid FlexScreen aspect ratio \"${String(t)}\"`);return`${s}:${a}`}const n=Number(e);if(!Number.isFinite(n)||n\u003c=0)throw new Error(`Invalid FlexScreen aspect ratio \"${String(t)}\"`);return n},jyi=(t,e)=\u003e{if(typeof t!=\"string\"||!/^\\(.+\\)$/.test(t))throw new Error(`FlexScreen token \"${e}\" requires a value in (...)`);return t.slice(1,-1)},Esn=(t,e)=\u003e{if(t!==!0)throw new Error(`FlexScreen token \"${e}\" does not accept a value`)},$yi=t=\u003e{if(t.fn!==\"flexscreen\")throw new Error(`Expected FlexScreen params, got \"${t.fn}\"`);const e={};let n,o;for(const[i,r]of Object.entries(t)){if(i===\"fn\"||i===\"string\"||i===\"flexscreen\")continue;const s=Uyi[i];if(s){if(Esn(r,i),n\u0026\u0026n!==s)throw new Error(\"A FlexScreen model string can only set one orientation\");n=s,e.orientation=s;continue}if(i in xsn){Esn(r,i);const[l,u]=xsn[i];e[l]=u;continue}const a=Jyi[i];if(a){e[a]=jyi(r,i);continue}if(i===\"ratio\"){e.aspectRatio=Wyi(r);continue}const A=Vyi[i];if(A){e[A]=r;continue}if(i===\"distance\"){o=r;continue}const c=zyi[i];if(c){const l=Number(r);if(!Number.isInteger(l)||l\u003c1)throw new Error(`Invalid positive integer in FlexScreen token \"${i}${String(r)}\"`);e[c]=l;continue}throw new Error(`Unknown FlexScreen model token \"${i}${String(r)}\"`)}if(o!==void 0)if(n===\"foldedToFaceAboveBoard\")e.distanceAboveBoard=o;else if(n===\"foldedToFaceBelowBoard\")e.distanceBelowBoard=o;else throw new Error('The \"distance\" token requires foldsabove or foldsbelow; use distanceabove or distancebelow for an explicit side');return Gyi.parse({fn:\"flexscreen\",...e})},Bsn={flexscreen:$yi},qyi=t=\u003e{const e=Bsn[t.fn];if(e)return e(t);throw new Error(`Unsupported modelprinter function \"${t.fn}\"`)},Xyi=t=\u003e{const e=Yyi(t);return{params:()=\u003ee,json:()=\u003eqyi(e)}},Zyi={string:Xyi,getModelNames:()=\u003eObject.keys(Bsn)},ZVe=Zyi,bsn=Symbol(\"Fragment\");function eze(t,e,...n){const o=n.length?n:e?.children!==void 0?[e.children]:[],i=[],r=(Array.isArray(o)?o:[o]).flat(1/0);for(const s of r)s==null||s===!1||(Array.isArray(s)?i.push(...s):i.push(s));return{type:t,props:(e\u0026\u0026e.children!==void 0?{...e,children:void 0}:e)||{},children:i}}var $t=Symbol(\"Cuboid\"),Ssn=Symbol(\"Cube\"),Ns=Symbol(\"Cylinder\"),TY=Symbol(\"Sphere\"),A1=Symbol(\"RoundedCuboid\"),Uo=Symbol(\"Translate\"),Ac=Symbol(\"Rotate\"),gh=Symbol(\"Union\"),e0=Symbol(\"Subtract\"),ZA=Symbol(\"Hull\"),qo=Symbol(\"Colorize\"),kY=Symbol(\"Polygon\"),FY=Symbol(\"ExtrudeLinear\"),a2=Symbol(\"RoundedCylinder\"),Ei=bsn,De=(t,e,n)=\u003eeze(t,e),Sn=(t,e,n)=\u003eeze(t,e),tze=({hole:t,isPin1:e})=\u003e{const n=e?\"#00ff00\":\"#b87333\";if(t.shape===\"circle\")return De(qo,{color:n,children:De(Uo,{offset:[t.x,t.y,-.005],children:Sn(e0,{children:[De(Ns,{radius:t.outer_diameter/2,height:.01}),De(Ns,{radius:t.hole_diameter/2,height:.01})]})})});if(t.shape===\"circular_hole_with_rect_pad\")return De(qo,{color:n,children:De(Uo,{offset:[t.x,t.y,0],children:Sn(e0,{children:[De($t,{size:[t.rect_pad_width,t.rect_pad_height,.01],center:[0,0,0]}),De(Ns,{radius:t.hole_diameter/2,height:.01})]})})});if(t.shape===\"pill\"){const o=t.outer_width,i=t.outer_height,r=Math.min(o,i)/2,s=o\u003ei,a=t.hole_width??.8,A=t.hole_height??.8;return De(qo,{color:n,children:De(Uo,{offset:[t.x,t.y,0],children:Sn(e0,{children:[Sn(ZA,{children:[De(Ns,{radius:r,height:.01,center:[s?-(o/2-r):0,s?0:-(i/2-r),0]}),De(Ns,{radius:r,height:.01,center:[s?o/2-r:0,s?0:i/2-r,0]})]}),a===A?De(Ns,{radius:a/2,height:.01}):Sn(ZA,{children:[De(Ns,{radius:Math.min(a,A)/2,height:.01,center:[a\u003eA?-(a/2-A/2):0,a\u003eA?0:-(A/2-a/2),0]}),De(Ns,{radius:Math.min(a,A)/2,height:.01,center:[a\u003eA?a/2-A/2:0,a\u003eA?0:A/2-a/2,0]})]})]})})})}throw new Error(\"Shape not supported: \"+t.shape)};function e2i(t){for(const o of[\"bodyWidth\",\"bodyLength\",\"bodyHeight\",\"pitch\",\"landWidth\",\"landLength\",\"landThickness\"])if(!Number.isFinite(t[o])||t[o]\u003c=0)throw new Error(`${o} must be finite and positive`);for(const o of[\"landsPerSideX\",\"landsPerSideY\"])if(!Number.isInteger(t[o])||t[o]\u003c0)throw new Error(`${o} must be a nonnegative integer`);if(!Number.isFinite(t.edgeInset)||t.edgeInset\u003c0||t.landThickness\u003e=t.bodyHeight||t.landWidth\u003e=t.pitch||t.landsPerSideX+t.landsPerSideY\u003c1)throw new Error(\"Invalid land layout or thickness\");const e=[{count:t.landsPerSideX,across:t.bodyWidth,along:t.bodyLength,horizontal:!0},{count:t.landsPerSideY,across:t.bodyLength,along:t.bodyWidth,horizontal:!1}];for(const o of e){if(o.count===0)continue;const i=(o.count-1)*t.pitch+t.landWidth;if(i\u003e=o.along-2*t.edgeInset||2*(t.edgeInset+t.landLength)\u003e=o.across)throw new Error(\"Lands must fit below the body without opposite-row overlap\");const r=o.horizontal?t.landsPerSideY:t.landsPerSideX;if(r\u003e0\u0026\u0026i\u003e=o.along-2*(t.edgeInset+t.landLength)\u0026\u0026(r-1)*t.pitch+t.landWidth\u003e=o.across-2*(t.edgeInset+t.landLength))throw new Error(\"Adjacent land rows overlap at corners\")}const n=Math.min(t.bodyWidth,t.bodyLength)*.035;return Sn(Ei,{children:[De(qo,{color:\"#353535\",children:Sn(e0,{children:[De(Uo,{z:(t.bodyHeight+t.landThickness/2)/2,children:De($t,{size:[t.bodyWidth,t.bodyLength,t.bodyHeight-t.landThickness/2]})}),De(Uo,{offset:[-t.bodyWidth/2+2*n,t.bodyLength/2-2*n,t.bodyHeight],children:De(Ns,{radius:n,height:Math.min(.04,t.bodyHeight/10)})})]})}),De(qo,{color:\"#c5b987\",children:e.flatMap(o=\u003e[-1,1].flatMap(i=\u003eArray.from({length:o.count},(r,s)=\u003e{const a=i*(o.across/2-t.edgeInset-t.landLength/2),A=((o.count-1)/2-s)*t.pitch;return De(Uo,{offset:[o.horizontal?a:A,o.horizontal?A:a,t.landThickness/2],children:De($t,{size:o.horizontal?[t.landLength,t.landWidth,t.landThickness]:[t.landWidth,t.landLength,t.landThickness]})},`${o.horizontal}-${i}-${s}`)})))})]})}function Epe(t){const{pinCount:e,pitch:n,bodyWidth:o,bodyLength:i,bodyHeight:r,standoff:s,leadSpan:a,leadWidth:A,leadThickness:c,contactLength:l,taperInset:u,exposedPadWidth:g=0,exposedPadLength:h=0}=t;for(const E of[\"pitch\",\"bodyWidth\",\"bodyLength\",\"bodyHeight\",\"leadSpan\",\"leadWidth\",\"leadThickness\",\"contactLength\"])if(!Number.isFinite(t[E])||t[E]\u003c=0)throw new Error(`${E} must be finite and positive`);for(const[E,B]of Object.entries({standoff:s,taperInset:u,exposedPadWidth:g,exposedPadLength:h}))if(!Number.isFinite(B)||B\u003c0)throw new Error(`${E} must be finite and nonnegative`);if(!Number.isInteger(e)||e\u003c4||e%2)throw new Error(\"pinCount must be even and at least 4\");const d=r-s,p=(a-o)/2,m=(e/2-1)*n+A;if(d\u003c=c*2||A\u003e=n||m\u003e=i-2*u||u*2\u003e=Math.min(o,i)||l\u003e=p)throw new Error(\"Invalid mold, lead spacing, or terminal reach\");if(g===0!=(h===0)||g\u003e=o-2*u||h\u003e=i-2*u)throw new Error(\"Exposed pad must fit inside the bottom mold face\");const _=s+d/2,f=Math.min(.002,d/100),I=Sn(ZA,{children:[De(Uo,{z:s+f/2,children:De($t,{size:[o-2*u,i-2*u,f]})}),De(Uo,{z:_,children:De($t,{size:[o,i,f]})}),De(Uo,{z:r-f/2,children:De($t,{size:[o-2*u,i-2*u,f]})})]}),C=Math.min(o,i)*.045,y=Math.min(.04,d/10),x=(E,B)=\u003e{const S=a/2,Q=o/2-Math.min(o/8,.15),w=S-l,M=o/2+Math.min(.08,(p-l)/4),k=[[S-f/2,c/2],[w,c/2]];for(let F=1;F\u003c=12;F++){const O=F/12;k.push([w+(M-w)*O,c/2+(_-c/2)*O*O*(3-2*O)])}k.push([Q,_]);const R=([F,O])=\u003eDe(Uo,{offset:{x:E*F,y:B,z:O},children:De($t,{size:[f,A,c]})});return De(gh,{children:k.slice(1).map((F,O)=\u003eSn(ZA,{children:[R(k[O]),R(F)]}))})};return Sn(Ei,{children:[De(qo,{color:\"#353535\",children:Sn(e0,{children:[I,De(Uo,{offset:{x:-o/2+u+C*2,y:i/2-u-C*2,z:r},children:De(Ns,{radius:C,height:y*2})})]})}),De(qo,{color:\"#bfc1c4\",children:Array.from({length:e},(E,B)=\u003ex(B\u003ce/2?-1:1,((e/2-1)/2-B%(e/2))*n))}),g\u003e0\u0026\u0026De(qo,{color:\"#bfc1c4\",children:De(Uo,{z:(s+c)/2,children:De($t,{size:[g,h,s+c]})})})]})}var t2i=t=\u003eEpe(t);function n2i(t){if(t.bodywidth===void 0\u0026\u0026t.bodyheight===void 0\u0026\u0026t.bodythickness===void 0)return null;if(t.fn===\"ssop\"){const e=t.bodywidth??t.w*.55,n=t.bodyheight??(t.num_pins/2-1)*t.p+t.pw+.4,o=t.bodythickness??1,i=Math.min(t.pw,t.p*.5),r=(t.num_pins/2-1)*t.p+i;if(n\u003c=r)throw new Error(\"SSOP bodyheight must contain the lead row\");const s=Math.max(t.w+.2+t.pl/2,e+t.p),a=Math.min(.1,o/10);return De(t2i,{pinCount:t.num_pins,pitch:t.p,bodyWidth:e,bodyLength:n,bodyHeight:o+a,standoff:a,leadSpan:s,leadWidth:i,leadThickness:Math.min(.15,o/4),contactLength:Math.min(t.pl/2,(s-e)/4),taperInset:Math.min(.12,(n-r)/4,e/8)})}if(t.fn===\"lga\"){const e=t.bodywidth??t.w,n=t.bodyheight??t.h,o=t.bodythickness??1,i=t.grid,r=Math.min(t.pw,t.p/2),s=e-((i.y-1)*t.p+r),a=n-((i.x-1)*t.p+r),A=Math.min(t.pl/2,e/8,n/8,s/4,a/4);return De(e2i,{bodyWidth:e,bodyLength:n,bodyHeight:o,landsPerSideX:i.x,landsPerSideY:i.y,pitch:t.p,landWidth:r,landLength:A,edgeInset:0,landThickness:Math.min(.015,o/10)})}return null}var ng=({center:t,width:e,length:n,height:o,heightAboveSurface:i=.15,color:r=\"#555\",taperRatio:s=.12,faceRatio:a=.75,straightHeightRatio:A=.5,includeNotch:c=!0,notchRadius:l,notchPosition:u,notchRotation:g=[0,0,0],notchLength:h=.5,notchWidth:d=.25,chamferSize:p=0})=\u003e{const m=o*A,_=o-m,f=Math.min(e,n)*s,I=Math.max(e-f,e*a),C=Math.max(n-f,n*a),y=Math.min(e,n)*.12,x=l??y,E={x:0,y:n/2-x*.25,z:o},B=u??E,S=Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.005,children:De($t,{size:[I,C,.01]})}),De(Uo,{z:m,children:De($t,{size:[e,n,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:m,children:De($t,{size:[e,n,.01]})}),De(Uo,{z:m+_,children:De($t,{size:[I,C,.01]})})]})]}),Q=(M,k)=\u003eDe(Uo,{offset:{x:M,y:k,z:0},children:De(Ac,{rotation:[0,0,Math.PI/4],children:De($t,{size:[p*Math.SQRT2,p*Math.SQRT2,o*3]})})});let w=S;if(p\u003e0){const M=e/2,k=n/2;w=Sn(e0,{children:[S,Q(M,k),Q(-M,k),Q(M,-k),Q(-M,-k)]})}return De(qo,{color:r,children:De(Uo,{offset:t,children:De(Uo,{offset:{x:0,y:0,z:i},children:c?Sn(e0,{children:[w,De(Uo,{offset:B,children:De(Ac,{rotation:g,children:De(Ns,{radius:x,height:d})})})]}):w})})})},o2i=t=\u003eArray.from({length:t},(e,n)=\u003en);function nze(t,e){if(t.length\u003c2)throw new Error(\"Stroke must have at least two points\");const n=Array.isArray(t[0])?t.map(([l,u])=\u003e({x:l,y:u})):t,o=e/2,i=[],r=[];function s(l,u){const g=u.x-l.x,h=u.y-l.y,d=Math.sqrt(g*g+h*h);return{x:-h/d,y:g/d}}function a(l,u,g){const h={x:l.x+u.x*o*g,y:l.y+u.y*o*g};g\u003e0?i.push(h):r.unshift(h)}const A=s(n[0],n[1]);a(n[0],A,1),a(n[0],A,-1);for(let l=1;l\u003cn.length-1;l++){const u=n[l-1],g=n[l],h=n[l+1],d=s(u,g),p=s(g,h),m=d.x+p.x,_=d.y+p.y,f=Math.sqrt(m*m+_*_);if(f/2\u003e2*o)a(g,d,1),a(g,p,1),a(g,d,-1),a(g,p,-1);else{const C=1/f;a(g,{x:m*C,y:_*C},1),a(g,{x:m*C,y:_*C},-1)}}const c=s(n[n.length-2],n[n.length-1]);return a(n[n.length-1],c,1),a(n[n.length-1],c,-1),[...i,...r]}var i2i=t=\u003e{const e=Math.min(...t.map(a=\u003ea.x)),n=Math.max(...t.map(a=\u003ea.x)),o=Math.min(...t.map(a=\u003ea.y)),s=5.47/(Math.max(...t.map(a=\u003ea.y))-o);return t.map(a=\u003e({x:(a.x-e-(n-e)/2)*s,y:(a.y-o)*s}))},r2i=i2i([{x:20,y:105},{x:20,y:109},{x:20,y:102},{x:26,y:102},{x:26,y:109},{x:24,y:111},{x:24,y:118},{x:22,y:118},{x:22,y:111},{x:20,y:109}]),Qsn=5.47,Bpe=.5,s2i=({x:t,y:e,z:n})=\u003e{const o=t\u003e0;return Sn(Ei,{children:[De(Uo,{offset:{x:t+.25/2,y:e,z:n},children:De(Ac,{rotation:[\"-90deg\",0,\"90deg\"],children:De(FY,{height:.25,children:De(kY,{points:r2i.slice().reverse().map(i=\u003e[i.x,i.y])})})})}),De(Uo,{offset:{x:t,y:e+(o?1:-1),z:n},children:De(Ac,{rotation:[\"-90deg\",\"90deg\",o?\"180deg\":\"0deg\"],children:De(FY,{height:2,children:De(kY,{points:nze([[0,0],[-1,0],[-1,-1]],.25).map(i=\u003e[i.x,i.y])})})})})]})},a2i=({numPins:t=8,pitch:e=2.54,bodyWidth:n=6.4,rowSpacing:o})=\u003e{const i=Math.floor(t/2),r=o??(n\u003e=7?n:n+1.22),s=n\u003e=7?r-1.22:n;return Sn(Ei,{children:[o2i(t).map(a=\u003e{const A=a%i,c=(Math.floor(a/i)-.5)*2;return De(s2i,{x:c*r/2,y:A*e-(i-1)/2*e,z:Qsn/2+Bpe})}),De(ng,{width:s,length:i*e+.5,height:Qsn-Bpe,heightAboveSurface:Bpe,center:{x:0,y:0,z:Bpe}})]})};function A2i(t,{height:e,padContactLength:n,curveLength:o,bodyDistance:i,steepness:r=10}){o||(o=i*.3);let s=i-n-o;s\u003c0\u0026\u0026(o+=s,s=0);const a=n*.75,A=n+o+(i-n-o)*.25;if(t\u003c=a)return 0;if(t\u003e=A)return e;const c=(t-a)/(A-a);return e/(1+Math.exp(-r*(c-.5)))}var ns=t=\u003e{const{thickness:e,width:n,padContactLength:o,bodyDistance:i,height:r,rotation:s}=t,a=15,A=Array.from({length:a}).map((l,u)=\u003eu/(a-1)*i).map(l=\u003e[l,A2i(l,t)]),c=nze(A,e);return De(qo,{color:\"#fff\",children:De(Uo,{offset:{z:0,y:0,x:0,...t.position},children:De(Ac,{rotation:[\"90deg\",0,s??0],children:De(Uo,{offset:{x:0,y:0,z:-n/2},children:De(FY,{height:n,children:De(kY,{points:c.map(l=\u003e[l.x,l.y])})})})})})})},c2i=({pinCount:t,leadLength:e,leadWidth:n,pitch:o,bodyWidth:i})=\u003e{const r=Math.ceil(t/2),s=r\u003c=4,a=(r-1)*o/2,A=o*Math.max(r-1,0)+(s?1.5:1.15),c=i-(s?.66:.58),l=.15,u=.8,g=1.22,h=e*.5,d=h+Math.max(.22,Math.min(.4,e*.65)),p=i/2+e/2,m=d*.1,_=Math.min(Math.min(c,A)*.18,1),f=Math.min(Math.min(c,A)*.12,.45);return Sn(Ei,{children:[Array.from({length:r}).map((I,C)=\u003eDe(ns,{position:{x:-p,y:C*o-a,z:l/2},width:n,thickness:l,padContactLength:h,bodyDistance:d,curveLength:m,height:u})),Array.from({length:r}).map((I,C)=\u003eDe(ns,{rotation:Math.PI,position:{x:p,y:C*o-a,z:l/2},width:n,thickness:l,padContactLength:h,bodyDistance:d,curveLength:m,height:u})),De(ng,{center:{x:0,y:0,z:0},width:c,length:A,height:g,notchPosition:{x:-(c/2-_-.2),y:A/2-_-.2,z:g},notchRadius:f})]})},l2i=t=\u003e\"leadSpan\"in t?Epe(t):c2i(t),u2i=({pinCount:t,padContactLength:e=.4,leadWidth:n=.2,pitch:o=.65,bodyWidth:i=3})=\u003e{const r=Math.ceil(t/2),s=(r-1)*o/2,a=.2;return Sn(Ei,{children:[Array.from({length:r}).map((A,c)=\u003eDe(ns,{position:{x:-i/2-e-.3,y:c*o-s,z:a/2},width:n,thickness:a,padContactLength:e,bodyDistance:e+.4,height:.6})),Array.from({length:r}).map((A,c)=\u003eDe(ns,{rotation:Math.PI,position:{x:i/2+e+.3,y:c*o-s,z:a/2},width:n,thickness:a,padContactLength:e,bodyDistance:e+.4,height:.6})),De(ng,{center:{x:0,y:0,z:a/2},width:i,length:i,height:1.1,notchRadius:.35,heightAboveSurface:.1,taperRatio:.09})]})},g2i=t=\u003e\"leadSpan\"in t?Epe(t):u2i(t),oze=1,ize=.5,LY=.5,HX=.2,d2i=oze-HX*2,vsn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[d2i,ize,LY],offset:[0,0,LY/2],color:t}),De($t,{size:[HX,LY,ize],offset:[oze/2-HX/2,0,LY/2],color:\"#ccc\"}),De($t,{size:[HX,LY,ize],offset:[-oze/2+HX/2,0,LY/2],color:\"#ccc\"})]}),rze=1.6,h2i=rze-.3*2,bpe=.3,sze=.85,HY=.6,wsn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[h2i,sze,HY],offset:[0,0,HY/2],color:t}),De($t,{size:[bpe,sze,HY],offset:[rze/2-bpe/2,0,HY/2],color:\"#ccc\"}),De($t,{size:[bpe,sze,HY],offset:[-rze/2+bpe/2,0,HY/2],color:\"#ccc\"})]}),aze=2,Aze=1.25,OY=.55,OX=.5,p2i=aze-OX*2,Psn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[p2i,Aze,OY],offset:[0,0,OY/2],color:t}),De($t,{size:[OX,Aze,OY],offset:[aze/2-OX/2,0,OY/2],color:\"#ccc\"}),De($t,{size:[OX,Aze,OY],offset:[-aze/2+OX/2,0,OY/2],color:\"#ccc\"})]}),Msn=({pinCount:t,pitch:e,leadWidth:n,padContactLength:o,bodyWidth:i})=\u003e{const r=t/4;e||(e=m2i(t,i)),o||(o=_2i(t)),n||(n=f2i(t,i)),i||(i=e*(r+4));const s=o,a=i,A=(r-1)*e/2,c=s*.5,l=a+2*c,u=l,g=.8,h=.15,d=c,p=c*.5,m=c*.18;return Sn(Ei,{children:[Array.from({length:r}).map((_,f)=\u003eDe(ns,{position:{x:-u/2,y:f*e-A,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),Array.from({length:r}).map((_,f)=\u003eDe(ns,{rotation:Math.PI,position:{x:u/2,y:f*e-A,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),Array.from({length:r}).map((_,f)=\u003eDe(ns,{rotation:Math.PI/2,position:{x:f*e-A,y:-l/2,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),Array.from({length:r}).map((_,f)=\u003eDe(ns,{rotation:-Math.PI/2,position:{x:f*e-A,y:l/2,z:h/2},width:n,thickness:h,padContactLength:p,bodyDistance:d,curveLength:m,height:g})),De(ng,{center:{x:0,y:0,z:0},width:i,length:a,height:1.5,taperRatio:.03,chamferSize:.7,notchPosition:{x:-(a/2-1.5),y:i/2-1.5,z:1.5},notchRadius:1.5/2})]})},m2i=(t,e)=\u003e{switch(t){case 44:case 64:return .8;case 52:return e===14?1:.65;case 208:return .5;default:return .5}},_2i=t=\u003e{switch(t){case 32:return .6;case 40:return .6;case 52:case 64:return .65;case 208:return 1.65;default:return .6}},f2i=(t,e)=\u003e{switch(t){case 44:case 64:return .5;case 52:return e===14?.45:.55;case 208:return .3;default:return .25}},GY=\"#c0c0c0\",Dsn=({x:t,y:e,pinThickness:n,shortSidePinLength:o,longSidePinLength:i,bodyHeight:r,bodyLength:s=2.54,bodyWidth:a=2.54,flipZ:A,smd:c,rightangle:l})=\u003eSn(Ei,{children:[De(Uo,{y:l?-3:0,children:De($t,{color:\"#222\",size:[s,a,r],center:[t,e,A(r/2)]})}),De(qo,{color:GY,children:c?De(ns,{rotation:-Math.PI/2,position:{x:t,y:e+1,z:n/2},thickness:n,width:n,height:n,padContactLength:2,bodyDistance:3}):Sn(ZA,{children:[De($t,{color:GY,size:[n,n,o*.9],center:[t,e,A(r*.9+r/2)]}),De($t,{color:GY,size:[n/1.8,n/1.8,o],center:[t,e,A(r+r/2)]})]})}),De(qo,{color:GY,children:De(Uo,{y:l?-3.9:0,z:l?1:0,children:De(Ac,{rotation:l?[-Math.PI/2,0,0]:[0,0,0],children:Sn(ZA,{children:[De($t,{color:GY,size:[n,n,i*.9],center:[t,e,A(-i/2*.9)]}),De($t,{color:GY,size:[n/1.8,n/1.8,i],center:[t,e,A(-i/2)]})]})})})})]}),Nsn=({numberOfPins:t,pitch:e=2.54,longSidePinLength:n=6,invert:o,rows:i=1,smd:r,rightangle:s})=\u003e{const c=Math.ceil(t/i),l=2.54,u=3,g=-((c-1)/2)*e,d=!r\u0026\u0026!s?!o:!!o,p=m=\u003ed?-m+2:m;return De(Ei,{children:Array.from({length:t},(m,_)=\u003e{const f=Math.floor(_/c),I=_%c,C=g+I*e,y=((i-1)/2-f)*l;return De(Dsn,{x:C,y,pinThickness:.63,shortSidePinLength:u,longSidePinLength:n,bodyHeight:2,flipZ:p,smd:r,rightangle:s},_)})})};function I2i(t){const{num_pins:e,bodyWidth:n,bodyLength:o,bodyHeight:i,standoff:r,terminalSpanX:s,terminalSpanY:a,terminalThickness:A,padWidth:c,padLength:l,pitch:u,exposedPadWidth:g,exposedPadLength:h}=t;for(const _ of[\"bodyWidth\",\"bodyLength\",\"bodyHeight\",\"terminalSpanX\",\"terminalSpanY\",\"terminalThickness\",\"padWidth\",\"padLength\",\"pitch\",\"exposedPadWidth\",\"exposedPadLength\"])if(!Number.isFinite(t[_])||t[_]\u003c=0)throw new Error(`${_} must be finite and positive`);if(!Number.isInteger(e)||e\u003c8||e%4)throw new Error(\"num_pins must be divisible by four and at least eight\");if(!Number.isFinite(r)||r\u003c0)throw new Error(\"standoff must be finite and nonnegative\");const d=(e/4-1)*u+c;if(A\u003c=r||A\u003e=i||c\u003e=u||d\u003e=Math.min(n,o))throw new Error(\"Invalid mold, terminal thickness or spacing\");if(s\u003cn||a\u003co||s/2-l\u003e=n/2||a/2-l\u003e=o/2||g\u003e=Math.min(n,s-2*l)||h\u003e=Math.min(o,a-2*l)||d\u003e=Math.min(s,a)-2*l)throw new Error(\"Terminals must enter the mold and clear the exposed pad and corners\");const p=De(Uo,{z:(i+r)/2,children:De($t,{size:[n,o,i-r]})}),m=Math.min(n,o)*.035;return Sn(Ei,{children:[De(qo,{color:\"#353535\",children:Sn(e0,{children:[p,De(Uo,{offset:{x:-n/2+m*2,y:o/2-m*2,z:i},children:De(Ns,{radius:m,height:Math.min(.06,(i-r)/5)})})]})}),De(qo,{color:\"#bfc1c4\",children:Array.from({length:e},(_,f)=\u003e{const I=Math.floor(f/(e/4)),C=((e/4-1)/2-f%(e/4))*u,y=I%2===0,x=I\u003c2?-1:1,E=((y?s:a)-l)/2*x;return De(Uo,{offset:{x:y?E:C,y:y?C:E,z:A/2},children:De($t,{size:y?[l,c,A]:[c,l,A]})},f)})}),De(qo,{color:\"#bfc1c4\",children:De(Uo,{z:A/2,children:De($t,{size:[g,h,A]})})})]})}var C2i=t=\u003e{const e=[\"left\",\"bottom\",\"right\",\"top\"],{pin_count:n,pn:o,w:i,h:r,p:s,pl:a}=t,A=n/4,c=e[Math.floor((o-1)/A)],l=(o-1)%A,u=s*(A-1),g=s*(A-1),h=-a/2;switch(c){case\"left\":return{x:-i/2-h,y:g/2-l*s,o:\"vert\"};case\"bottom\":return{x:-u/2+l*s,y:-r/2-h,o:\"horz\"};case\"right\":return{x:i/2+h,y:-g/2+l*s,o:\"vert\"};case\"top\":return{x:u/2-l*s,y:r/2+h,o:\"horz\"};default:throw new Error(\"Invalid pin number\")}},y2i=({num_pins:t,cw:e,ccw:n,startingpin:o})=\u003e{const i=[],r=t/4;let s=1;const a={};for(const A of o??[])a[A]=!0;!a.leftside\u0026\u0026!a.topside\u0026\u0026!a.rightside\u0026\u0026!a.bottomside\u0026\u0026(a.leftside=!0),!a.bottompin\u0026\u0026!a.leftpin\u0026\u0026!a.rightpin\u0026\u0026!a.toppin\u0026\u0026(a.leftside?a.toppin=!0:a.topside?a.rightpin=!0:a.rightside?a.bottompin=!0:a.bottomside\u0026\u0026(a.leftpin=!0)),a.leftside\u0026\u0026a.toppin?s=1:a.leftside\u0026\u0026a.bottompin?s=r:a.bottomside\u0026\u0026a.leftpin?s=r+1:a.bottomside\u0026\u0026a.rightpin?s=r*2:a.rightside\u0026\u0026a.bottompin?s=r*2+1:a.rightside\u0026\u0026a.toppin?s=r*3:a.topside\u0026\u0026a.rightpin?s=r*3+1:a.topside\u0026\u0026a.leftpin\u0026\u0026(s=r*4),i.push(-1);for(let A=0;A\u003ct;A++)i[s]=A+1,s++,s\u003et\u0026\u0026(s=1);return i},x2i=({num_pins:t=16,bodyWidth:e=9,bodyLength:n=9,bodyThickness:o=.8,thermalPadSize:i,padWidth:r=.25,padLength:s=.25,pitch:a=.5,thermalPadThickness:A=.05})=\u003e{const c=y2i({num_pins:t,cw:!0,ccw:!0}),l=[];for(let u=0;u\u003ct;u++){const{x:g,y:h,o:d}=C2i({pin_count:t,pn:u+1,w:e,h:n,p:a,pl:s});let p=r,m=s;d===\"vert\"\u0026\u0026([p,m]=[m,p]);const _=c[u+1];l.push({pn:_,x:g,y:h,pw:p,pl:m})}return Sn(Ei,{children:[De(qo,{color:\"grey\",children:De($t,{center:[0,0,o/2],size:[e,n,o]})}),l.map((u,g)=\u003eDe($t,{center:[u.x,u.y,A/2],size:[u.pw,u.pl,A]})),i?.length!==void 0\u0026\u0026i?.width!==void 0\u0026\u0026De($t,{center:[0,0,A/2],size:[i.width,i.length,A]})]})},E2i=t=\u003e\"bodyHeight\"in t?I2i(t):x2i(t),Rsn=E2i,B2i=()=\u003e{const A=1.1999999999999997;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2.8/2+A/4,y:-1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{rotation:Math.PI,position:{x:2.8/2+A/4,y:1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{position:{x:-2.8/2-A/4,y:0,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{position:{x:-2.8/2-A/4,y:-1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ns,{position:{x:-2.8/2-A/4,y:1,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:A,height:.95}),De(ng,{center:{x:0,y:0,z:0},width:1.6,length:2.9,height:1.2})]})},Tsn=B2i,b2i=({fullWidth:t=2.9,fullLength:e=2.8,color:n}={})=\u003e{const u=(t-1.3)/2+.3;return Sn(Ei,{children:[De(ns,{position:{x:-t/2,y:.95,z:.075},width:.4,thickness:.15,padContactLength:.4,bodyDistance:u,height:.95}),De(ns,{position:{x:-t/2,y:-.95,z:.075},width:.4,thickness:.15,padContactLength:.4,bodyDistance:u,height:.95}),De(ns,{rotation:Math.PI,position:{x:t/2,y:0,z:.075},width:.4,thickness:.15,padContactLength:.4,bodyDistance:u,height:.95}),De(ng,{center:{x:0,y:0,z:0},width:1.3,length:2.9,height:1.1,color:n})]})},S2i=({fullWidth:t=2.9,fullLength:e=2.8})=\u003e{const l=(t-1.92)/2+.3;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:t/2,y:0,z:.075},width:.4,thickness:.15,padContactLength:.25,bodyDistance:l,height:.45}),De(ns,{position:{x:-t/2,y:-.95,z:.075},width:.4,thickness:.15,padContactLength:.25,bodyDistance:l,height:.45}),De(ns,{position:{x:-t/2,y:.95,z:.075},width:.4,thickness:.15,padContactLength:.25,bodyDistance:l,height:.45}),De(ng,{center:{x:0,y:0,z:0},width:1.92,length:2.9,height:1.1,straightHeightRatio:.45,heightAboveSurface:.05})]})},cze=.6,lze=.3,YY=.33,GX=.1,Q2i=cze-GX*2,ksn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[Q2i,lze,YY],offset:[0,0,YY/2],color:t}),De($t,{size:[GX,lze,YY],offset:[cze/2-GX/2,0,YY/2],color:\"#ccc\"}),De($t,{size:[GX,lze,YY],offset:[-cze/2+GX/2,0,YY/2],color:\"#ccc\"})]}),uze=.4,gze=.2,UY=.13,YX=.07,v2i=uze-YX*2,Fsn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[v2i,gze,UY],offset:[0,0,UY/2],color:t}),De($t,{size:[YX,gze,UY],offset:[uze/2-YX/2,0,UY/2],color:\"#ccc\"}),De($t,{size:[YX,gze,UY],offset:[-uze/2+YX/2,0,UY/2],color:\"#ccc\"})]}),dze=3.2,hze=1.6,KY=.9,UX=.5,w2i=dze-UX*2,Lsn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[w2i,hze,KY],offset:[0,0,KY/2],color:t}),De($t,{size:[UX,hze,KY],offset:[dze/2-UX/2,0,KY/2],color:\"#ccc\"}),De($t,{size:[UX,hze,KY],offset:[-dze/2+UX/2,0,KY/2],color:\"#ccc\"})]}),pze=3.2,mze=2.5,VY=1,KX=.6,P2i=pze-KX*2,Hsn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[P2i,mze,VY],offset:[0,0,VY/2],color:t}),De($t,{size:[KX,mze,VY],offset:[pze/2-KX/2,0,VY/2],color:\"#ccc\"}),De($t,{size:[KX,mze,VY],offset:[-pze/2+KX/2,0,VY/2],color:\"#ccc\"})]}),_ze=5,fze=2.5,zY=1.4,VX=.6,M2i=_ze-VX*2,Osn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[M2i,fze,zY],offset:[0,0,zY/2],color:t}),De($t,{size:[VX,fze,zY],offset:[_ze/2-VX/2,0,zY/2],color:\"#ccc\"}),De($t,{size:[VX,fze,zY],offset:[-_ze/2+VX/2,0,zY/2],color:\"#ccc\"})]}),Ize=6.3,Cze=3.2,JY=1.8,zX=.8,D2i=Ize-zX*2,Gsn=({color:t=\"#333\"})=\u003eSn(Ei,{children:[De($t,{size:[D2i,Cze,JY],offset:[0,0,JY/2],color:t}),De($t,{size:[zX,Cze,JY],offset:[Ize/2-zX/2,0,JY/2],color:\"#ccc\"}),De($t,{size:[zX,Cze,JY],offset:[-Ize/2+zX/2,0,JY/2],color:\"#ccc\"})]}),Ysn=({x:t,y:e,z:n=0,pitch:o=2.54,legsLength:i=3,innerDiameter:r=.945,bodyHeight:s=5,bodyLength:a=o,bodyWidth:A=o,flipZ:c})=\u003e{const l=r||.945,u=l/1.5,g=l,h=g*1.8,d=Math.min(s*.18,o*.24),p=s+.1,m=c(n+p/2),_=n+s-d,f=u*1.6;return Sn(Ei,{children:[De(qo,{color:\"#1a1a1a\",children:Sn(e0,{children:[De($t,{color:\"#000\",size:[a,A,s],center:[t,e,c(n+s/2)]}),De($t,{size:[g,g,p],center:[t,e,m]}),Sn(ZA,{children:[De($t,{size:[g,g,.01],center:[t,e,c(_)]}),De($t,{size:[h,h,.01],center:[t,e,c(n+s)]})]})]})}),Sn(qo,{color:\"silver\",children:[Sn(ZA,{children:[De($t,{color:\"silver\",size:[u,u,i*.9],center:[t,e,c(n+-i/2*.9)]}),De($t,{color:\"silver\",size:[u/1.8,u/1.8,i],center:[t,e,c(n+-i/2)]})]}),De($t,{color:\"silver\",size:[f,f,f*.5],center:[t,e,c(n+f/2*.5)]})]})]})},N2i=({numberOfPins:t,pitch:e=2.54,legsLength:n=3,innerDiameter:o=.945,rows:i=1,invert:r})=\u003e{const a=Math.ceil(t/i),A=2.54,c=-((a-1)/2)*e,l=u=\u003er?-u+5:u;return De(Ei,{children:Array.from({length:t},(u,g)=\u003e{const h=Math.floor(g/a),d=g%a,p=c+d*e,m=((i-1)/2-h)*A;return De(Ysn,{x:p,y:m,pitch:e,legsLength:n,innerDiameter:o,flipZ:l},g)})})},R2i=({width:t,length:e,innerDiameter:n=1})=\u003e{const o=t,i=e,r=t*.7,s=n/2.5;return Sn(Ei,{children:[De(A1,{color:\"#1a1a1f\",center:[0,0,r/2],size:[i,i,r],roundRadius:.3}),De(A1,{color:\"#f2f2f2\",center:[0,0,r+r*.1/2.5],size:[i,i,r*.1],roundRadius:.14}),De(Ns,{color:\"#1a1a1f\",height:r*.8,radius:o/3,center:[0,0,r+r*.8/2]}),De(Ns,{color:\"#1a1a1f\",height:r*.2,radius:n/2,center:[i/3,i/3,r+r*.1/2]}),De(Ns,{color:\"#1a1a1f\",height:r*.2,radius:n/2,center:[-i/3,-i/3,r+r*.1/2]}),De(Ns,{color:\"#1a1a1f\",height:r*.2,radius:n/2,center:[-i/3,i/3,r+r*.1/2]}),De(Ns,{color:\"#1a1a1f\",height:r*.2,radius:n/2,center:[i/3,-i/3,r+r*.1/2]}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:-o/2,y:-i/2,z:-r*1.2}}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:-o/2,y:i/2,z:-r*1.2},rotation:Math.PI}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:o/2,y:i/2,z:-r*1.2},rotation:Math.PI}),De(Spe,{thickness:n/3,width:s,horizontalLength:i*.8,verticalLength:r/2,position:{x:o/2+n/3.6,y:-i/2,z:-r*1.2}})]})},Spe=t=\u003e{const{thickness:e,width:n,horizontalLength:o,verticalLength:i,rotation:r=0,position:s}=t,a=[[0,o],[-i/3,o/3],[-i/5,o/4],[0,0]],A=nze(a,e);return De(qo,{color:\"#f2f2f2\",children:De(Uo,{offset:{x:s?.x||0,y:s?.y||0,z:s?.z||0},children:De(Ac,{rotation:[0,55,r],children:De(FY,{height:n,children:De(kY,{points:A.map(c=\u003e[c.y,c.x])})})})})})},T2i=({pinCount:t,leadLength:e,leadWidth:n,pitch:o,bodyWidth:i})=\u003e{const r=Math.ceil(t/2),s=(r-1)*o/2,a=.25,A=1,c=.8,l=e*0,u=o*(r-1)+n+.2,g=i*.55;return Sn(Ei,{children:[Array.from({length:r}).map((h,d)=\u003eDe(ns,{position:{x:-i/2-l,y:d*o-s,z:a/2},width:n,thickness:a,padContactLength:e/2,bodyDistance:e+.3,height:c})),Array.from({length:r}).map((h,d)=\u003eDe(ns,{rotation:Math.PI,position:{x:i/2+l,y:d*o-s,z:a/2},width:n,thickness:a,padContactLength:e/2,bodyDistance:e+.3,height:c})),De(ng,{center:{x:0,y:0,z:a/2},width:g,length:u,height:A})]})},k2i=t=\u003e\"leadSpan\"in t?Epe(t):T2i(t),F2i=({pinCount:t,pitch:e,leadWidth:n,leadLength:o,bodyWidth:i,bodyLength:r})=\u003e{const s=t===8?{pitch:.65,leadWidth:.3}:{pitch:.5,leadWidth:.225},a=isNaN(parseFloat(e))?s.pitch:parseFloat(e),A=isNaN(parseFloat(n))?s.leadWidth:parseFloat(n)*.8,c=isNaN(parseFloat(i))?2.6:parseFloat(i)*.8,l=isNaN(parseFloat(r))?2+Number(a)*1.4:parseFloat(r),u=t/2,g=(u-1)*a/2,h=.15,d=.8,p=4.5,m=(p-c)/2,_=m*.5;return Sn(Ei,{children:[Array.from({length:u}).map((f,I)=\u003eDe(ns,{position:{x:-p/2,y:g-I*a,z:h/2},width:A,thickness:h,padContactLength:_+.05,bodyDistance:m+.1,height:d})),Array.from({length:u}).map((f,I)=\u003eDe(ns,{rotation:Math.PI,position:{x:p/2,y:g-I*a,z:h/2},width:A,thickness:h,padContactLength:_+.05,bodyDistance:m+.1,height:d})),De(ng,{center:{x:0,y:0,z:h/2},width:c,length:l,height:1})]})},L2i=()=\u003eSn(Ei,{children:[De($t,{color:\"#ccc\",size:[.5,.6,.12],center:[-.725,0,.12/2]}),De($t,{color:\"#ccc\",size:[.5,.6,.12],center:[.725,0,.12/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[De(Uo,{z:.3/2,children:De($t,{size:[1.65,.8,.3]})}),Sn(ZA,{children:[De(Uo,{z:.3,children:De($t,{size:[1.65,.8,.01]})}),De(Uo,{z:.6,children:De($t,{size:[1.65-.2,.8-.2,.01]})})]})]})})]}),Usn=()=\u003eSn(Ei,{children:[De($t,{color:\"#ccc\",size:[.26,.51,.12],center:[-.325,0,.12/2]}),De($t,{color:\"#ccc\",size:[.26,.51,.12],center:[.325,0,.12/2]}),De(qo,{color:\"#222\",children:De(Uo,{z:.47/2+.02,children:De($t,{size:[.98,.58,.47]})})}),De($t,{color:\"#ccc\",size:[.98+.001,.26/2,.26/4],center:[0,.26/2,.47/4]}),De($t,{color:\"#ccc\",size:[.98+.001,.26/2,.26/4],center:[0,-.26/2,.47/4]}),De($t,{color:\"#ccc\",size:[.26/1.5,.58+.001,.26/4],center:[.65/2,0,.47/4]}),De($t,{color:\"#ccc\",size:[.26/1.5,.58+.001,.26/4],center:[-.65/2,0,.47/4]})]}),H2i=()=\u003e{const c=De(qo,{color:\"#1a1a1a\",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.13,children:De($t,{size:[4,3,.03]})}),De(Uo,{z:1.15,children:De($t,{size:[4.4,3.4,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:1.15,children:De($t,{size:[4.4,3.4,.01]})}),De(Uo,{z:2.3,children:De($t,{size:[4,3,.01]})})]})]})}),l=({xDir:u})=\u003e{const d=u*1.78,p=u*(3.4/2-.2/2+1),m=u*(3.4/2-.2/2),_=Math.abs(m-p),f=(p+m)/2;return De(qo,{color:\"#c0c0c0\",children:Sn(gh,{children:[De($t,{size:[2.3*.8,1.45,.2],center:[d,0,.2/2]}),De($t,{size:[.2,1.45,1.14],center:[p,0,1.14/2+.2]}),De($t,{size:[_,1.45,.2],center:[f,0,.2/2+1.14]})]})})};return Sn(Ei,{children:[De(l,{xDir:1}),De(l,{xDir:-1}),c]})},Ksn=()=\u003e{const c=De(qo,{color:\"#1a1a1a\",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.13,children:De($t,{size:[4.199999999999999,3.6,.03]})}),De(Uo,{z:1.15,children:De($t,{size:[4.6,4,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:1.15,children:De($t,{size:[4.6,4,.01]})}),De(Uo,{z:2.3,children:De($t,{size:[4.199999999999999,3.6,.01]})})]})]})}),l=({xDir:u})=\u003e{const d=u*2.08,p=u*(4/2-.2/2+1),m=u*(4/2-.2/2),_=Math.abs(m-p),f=(p+m)/2;return De(qo,{color:\"#c0c0c0\",children:Sn(gh,{children:[De($t,{size:[2.3*.8,1.45,.2],center:[d,0,.2/2]}),De($t,{size:[.2,1.45,1.14],center:[p,0,1.14/2+.2]}),De($t,{size:[_,1.45,.2],center:[f,0,.2/2+1.14]})]})})};return Sn(Ei,{children:[De(l,{xDir:1}),De(l,{xDir:-1}),c]})},O2i=()=\u003e{const c=De(qo,{color:\"#1a1a1a\",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.21000000000000002,children:De($t,{size:[6.3999999999999995,5.6,.03]})}),De(Uo,{z:1.15,children:De($t,{size:[6.8,6,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:1.15,children:De($t,{size:[6.8,6,.01]})}),De(Uo,{z:2.3,children:De($t,{size:[6.3999999999999995,5.6,.01]})})]})]})}),l=({xDir:u})=\u003e{const d=u*3.08,p=u*(6/2-.2/2+1),m=u*(6/2-.2/2),_=Math.abs(m-p),f=(p+m)/2;return De(qo,{color:\"#c0c0c0\",children:Sn(gh,{children:[De($t,{size:[2.3*.8,2.95,.2],center:[d,0,.2/2]}),De($t,{size:[.2,2.95,1.14],center:[p,0,1.14/2+.2]}),De($t,{size:[_,2.95,.2],center:[f,0,.2/2+1.14]})]})})};return Sn(Ei,{children:[De(l,{xDir:1}),De(l,{xDir:-1}),c]})},G2i=()=\u003e{const u=De(qo,{color:\"#222\",children:Sn(gh,{children:[De(Uo,{z:.27,children:De($t,{size:[2.9,1.9,.54]})}),Sn(ZA,{children:[De(Uo,{z:.54,children:De($t,{size:[2.9,1.9,.01]})}),De(Uo,{z:1.08,children:De($t,{size:[2.6999999999999997,1.7,.01]})})]})]})});return Sn(Ei,{children:[De($t,{color:\"#ccc\",size:[1,1.2,.25],center:[-1.3,0,.25/2]}),De($t,{color:\"#ccc\",size:[1,1.2,.25],center:[1.3,0,.25/2]}),u]})},Y2i=()=\u003eSn(Ei,{children:[De($t,{color:\"#ccc\",size:[1,.6,.12],center:[-1.3,0,.12/2]}),De($t,{color:\"#ccc\",size:[1,.6,.12],center:[1.3,0,.12/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[De(Uo,{z:.55/2,children:De($t,{size:[2.7,1.6,.55]})}),Sn(ZA,{children:[De(Uo,{z:.55,children:De($t,{size:[2.7,1.6,.01]})}),De(Uo,{z:1.1,children:De($t,{size:[2.7-.2,1.6-.2,.01]})})]})]})})]}),U2i=()=\u003eSn(Ei,{children:[De($t,{color:\"#ccc\",size:[1,.9,.2],center:[-1.3,0,.2/2]}),De($t,{color:\"#ccc\",size:[1,.9,.2],center:[1.3,0,.2/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[De(Uo,{z:.2/2,children:De($t,{size:[2.75,1.8,.2]})}),Sn(ZA,{children:[De(Uo,{z:.2,children:De($t,{size:[2.75,1.8,.01]})}),De(Uo,{z:1,children:De($t,{size:[2.75-.4,1.8-.4,.01]})})]})]})}),De($t,{color:\"#777\",size:[.2,1.8-.4,.01],center:[-1.3+.4,0,1]})]}),Vsn=({bodyWidth:t=2.6,bodyLength:e=1.7,bodyHeight:n=1}={})=\u003e{const o=t,i=e*.53,r=t*.35,s=.2,a=-(o/2-.075),A=o/2-.075,c=.4,l=.1,u=n*.2;return Sn(Ei,{children:[De($t,{color:\"#ccc\",size:[r,i,s],center:[a,0,s/2]}),De($t,{color:\"#ccc\",size:[r,i,s],center:[A,0,s/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:u,children:De($t,{size:[o-l/2,e-l/2,.01]})}),De(Uo,{z:.01,children:De($t,{size:[o-l,e-l,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:u,children:De($t,{size:[o,e,.01]})}),De(Uo,{z:n,children:De($t,{size:[o-c,e-c,.01]})})]})]})}),De($t,{color:\"#777\",size:[s*2.7,e-c,.02],center:[a+c,0,n]})]})},K2i=({fullWidth:t=3.7,fullLength:e=1.55}={})=\u003e{const n=t-1,o=e,i=1.175,r=.1,s=i-r,a=.55,A=.12,c=.35,l=(t-n)/2,u=.25,g=.2;return Sn(Ei,{children:[De(ns,{position:{x:-t/2,y:0,z:A/2},width:a,thickness:A,padContactLength:u,bodyDistance:l,curveLength:g,height:c}),De(ns,{rotation:Math.PI,position:{x:t/2,y:0,z:A/2},width:a,thickness:A,padContactLength:u,bodyDistance:l,curveLength:g,height:c}),De(ng,{center:{x:0,y:0,z:0},width:n,length:o,height:s,heightAboveSurface:r,includeNotch:!1,color:\"#222\",taperRatio:.06,straightHeightRatio:.6}),De($t,{color:\"#777\",size:[.45,o-.15,.02],center:[-n/4,0,i]})]})},V2i=()=\u003eSn(Ei,{children:[De($t,{color:\"#ccc\",size:[.9,1.75,.2],center:[-1.825,0,.2/2]}),De($t,{color:\"#ccc\",size:[.9,1.75,.2],center:[1.825,0,.2/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[Sn(ZA,{children:[De(Uo,{z:.2,children:De($t,{size:[3.8-.05/2,2.5-.05/2,.01]})}),De(Uo,{z:.01,children:De($t,{size:[3.8-.05,2.5-.05,.01]})})]}),Sn(ZA,{children:[De(Uo,{z:.2,children:De($t,{size:[3.8,2.5,.01]})}),De(Uo,{z:1,children:De($t,{size:[3.8-.4,2.5-.4,.01]})})]})]})}),De($t,{color:\"#777\",size:[.2*2.7,2.5-.4,.02],center:[-1.825+.4,0,1]})]}),z2i=()=\u003eSn(Ei,{children:[De($t,{color:\"#ccc\",size:[.4,.25,.14],center:[-.4,0,.14/2]}),De($t,{color:\"#ccc\",size:[.4,.25,.14],center:[.4,0,.14/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[De(Uo,{z:.14/2,children:De($t,{size:[.8,.6,.14]})}),Sn(ZA,{children:[De(Uo,{z:.14,children:De($t,{size:[.8,.6,.01]})}),De(Uo,{z:.37,children:De($t,{size:[.8-.1,.6-.1,.01]})})]})]})})]}),zsn=({fullWidth:t=6.6,bodyWidth:e=3.5,bodyLength:n=6.5,bodyHeight:o=1.7,leadWidth:i=.7,tabLeadWidth:r=3,padPitch:s=2.3,leadHeight:a=.75}={})=\u003e{const A=r,c=.25,l=.5,u=t-e;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:t/2+u/4,y:0,z:c/2},width:A,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ns,{position:{x:-t/2-u/4,y:0,z:c/2},width:i,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ns,{position:{x:-t/2-u/4,y:-s,z:c/2},width:i,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ns,{position:{x:-t/2-u/4,y:s,z:c/2},width:i,thickness:c,padContactLength:l,bodyDistance:u,height:a}),De(ng,{center:{x:0,y:0,z:0},width:e,length:n,height:o,includeNotch:!1,taperRatio:.06,straightHeightRatio:.45})]})},J2i=()=\u003eSn(Ei,{children:[Array.from({length:16}).map((h,d)=\u003eDe(ns,{position:{x:-10.5/2,y:d*.5-3.75,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),Array.from({length:16}).map((h,d)=\u003eDe(ns,{rotation:Math.PI,position:{x:10.5/2,y:d*.5-3.75,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),Array.from({length:16}).map((h,d)=\u003eDe(ns,{rotation:Math.PI/2,position:{x:d*.5-3.75,y:-10.5/2,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),Array.from({length:16}).map((h,d)=\u003eDe(ns,{rotation:-Math.PI/2,position:{x:d*.5-3.75,y:10.5/2,z:.25/2},width:.2,thickness:.25,padContactLength:.45,bodyDistance:.95,height:.65})),De(ng,{center:{x:0,y:0,z:0},width:9,length:9,height:1.2,chamferSize:.7,taperRatio:.05,notchPosition:{x:-3.5,y:3.5,z:1.2},notchRadius:1.2/2})]}),W2i=J2i,j2i=()=\u003e{const c=.7999999999999998;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2.05/2+c/4,y:0,z:.18/2},width:.3,thickness:.18,padContactLength:.2,bodyDistance:c,height:.65}),De(ns,{position:{x:-2.05/2-c/4,y:-.65,z:.18/2},width:.3,thickness:.18,padContactLength:.2,bodyDistance:c,height:.65}),De(ns,{position:{x:-2.05/2-c/4,y:.65,z:.18/2},width:.3,thickness:.18,padContactLength:.2,bodyDistance:c,height:.65}),De(ng,{center:{x:0,y:0,z:0},width:1.25,length:2,height:.9,includeNotch:!1,taperRatio:.06,straightHeightRatio:.7,heightAboveSurface:.05})]})};function $2i(t){const{pinCount:e,pitch:n,bodyWidth:o,bodyLength:i,bodyHeight:r,standoff:s,leadSpanX:a,leadSpanY:A,leadWidth:c,leadThickness:l,contactLength:u,taperInset:g}=t;for(const x of[\"pitch\",\"bodyWidth\",\"bodyLength\",\"bodyHeight\",\"leadSpanX\",\"leadSpanY\",\"leadWidth\",\"leadThickness\",\"contactLength\"])if(!Number.isFinite(t[x])||t[x]\u003c=0)throw new Error(`${x} must be finite and positive`);for(const[x,E]of Object.entries({standoff:s,taperInset:g}))if(!Number.isFinite(E)||E\u003c0)throw new Error(`${x} must be finite and nonnegative`);if(!Number.isInteger(e)||e\u003c8||e%4)throw new Error(\"pinCount must be divisible by four and at least eight\");const h=r-s,d=Math.min(a-o,A-i)/2,p=(e/4-1)*n+c;if(h\u003c=l*2||c\u003e=n||p\u003e=Math.min(o,i)-2*g||g*2\u003e=Math.min(o,i)||u\u003e=d)throw new Error(\"Invalid mold, lead spacing, or terminal reach\");const m=s+h/2,_=Math.min(.002,h/100),f=Sn(ZA,{children:[De(Uo,{z:s+_/2,children:De($t,{size:[o-2*g,i-2*g,_]})}),De(Uo,{z:m,children:De($t,{size:[o,i,_]})}),De(Uo,{z:r-_/2,children:De($t,{size:[o-2*g,i-2*g,_]})})]}),I=Math.min(o,i)*.045,C=Math.min(.04,h/10),y=(x,E)=\u003e{const B=x%2===0,S=x\u003c2?-1:1,Q=B?o:i,w=(B?a:A)/2,M=Q/2-Math.min(Q/8,.15),k=w-u,R=Q/2+Math.min(.08,(d-u)/4),F=[[w-_/2,l/2],[k,l/2]];for(let U=1;U\u003c=12;U++){const Y=U/12;F.push([k+(R-k)*Y,l/2+(m-l/2)*Y*Y*(3-2*Y)])}F.push([M,m]);const O=([U,Y])=\u003eDe(Uo,{offset:{x:B?S*U:E,y:B?E:S*U,z:Y},children:De($t,{size:B?[_,c,l]:[c,_,l]})});return De(gh,{children:F.slice(1).map((U,Y)=\u003eSn(ZA,{children:[O(F[Y]),O(U)]}))})};return Sn(Ei,{children:[De(qo,{color:\"#353535\",children:Sn(e0,{children:[f,De(Uo,{offset:{x:-o/2+g+I*2,y:i/2-g-I*2,z:r},children:De(Ns,{radius:I,height:C*2})})]})}),De(qo,{color:\"#bfc1c4\",children:Array.from({length:e},(x,E)=\u003ey(Math.floor(E/(e/4)),((e/4-1)/2-E%(e/4))*n))})]})}var q2i=({pinCount:t,pitch:e,leadWidth:n,padContactLength:o,bodyWidth:i})=\u003e{const r=t/4;if(r!==Math.floor(r))throw new Error(`LQFP pinCount must be divisible by 4, got ${t}`);e||(e=.5),o||(o=.6),n||(n=.22),i||(i=e*(r+4));const s=i,a=(r-1)*e/2,A=s+3.3*o,c=A,l=.8,u=.2,g=(c-i)/2+.4;return Sn(Ei,{children:[Array.from({length:r}).map((h,d)=\u003eDe(ns,{position:{x:-c/2-.36,y:d*e-a,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),Array.from({length:r}).map((h,d)=\u003eDe(ns,{rotation:Math.PI,position:{x:c/2+.36,y:d*e-a,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),Array.from({length:r}).map((h,d)=\u003eDe(ns,{rotation:Math.PI/2,position:{x:d*e-a,y:-A/2-.36,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),Array.from({length:r}).map((h,d)=\u003eDe(ns,{rotation:-Math.PI/2,position:{x:d*e-a,y:A/2+.36,z:u/2},width:n,thickness:u,padContactLength:o,bodyDistance:g,height:l})),De(ng,{center:{x:0,y:0,z:0},width:i,length:s,height:1.5,heightAboveSurface:.1,taperRatio:.04,chamferSize:.7,notchPosition:{x:-(s/2-1.5),y:s/2-1.5,z:1.5},notchRadius:1.5/2})]})},X2i=t=\u003e\"leadSpanX\"in t?$2i(t):q2i(t),Z2i=()=\u003e{const o=.20900000000000002,i=.1,r=.3,s=.1,a=.2;return Sn(Ei,{children:[De(qo,{color:\"#222\",children:Sn(gh,{children:[De($t,{size:[.85,1.2,o],center:[0,0,o/2]}),Sn(ZA,{children:[De(Uo,{z:o,children:De($t,{size:[.85,1.2,.01]})}),De(Uo,{z:.38,children:De($t,{size:[.85-i,1.2-i,.01]})})]})]})}),De($t,{color:\"#ccc\",size:[r,.25,s],center:[.55,0,s/2]}),De($t,{color:\"#ccc\",size:[r,a,s],center:[-.55,.4,s/2]}),De($t,{color:\"#ccc\",size:[r,a,s],center:[-.55,-.4,s/2]})]})},Jsn=({num_pins:t,bodyWidth:e=5.3,bodyLength:n=5.3,bodyThickness:o=1,thermalPadSize:i,padWidth:r=n/5.3*.6,padLength:s=n/5.3*1,pitch:a=.5,thermalPadThickness:A=.2,bodyStyle:c=\"chamfered\",standoff:l=0,terminalInset:u=0,terminalThickness:g=A,pin1TerminalChamfer:h=0,pin1MarkWidth:d=0})=\u003e{if(c===\"rectangular\"){if(!Number.isInteger(t)||t\u003c2||t%2!==0)throw new Error(\"DFN requires an even pin count of at least two\");for(const f of[e,n,o,r,s,a,g])if(!Number.isFinite(f)||f\u003c=0)throw new Error(\"DFN dimensions must be finite and positive\");for(const f of[l,u,h,d])if(!Number.isFinite(f)||f\u003c0)throw new Error(\"DFN offsets must be finite and nonnegative\");if(g\u003c=l||g\u003el+o||u+s\u003e=e/2||(t/2-1)*a+r\u003en||t\u003e2\u0026\u0026r\u003e=a||h\u003e=Math.min(s,r/2)||d\u003e=e/4)throw new Error(\"DFN dimensions leave disconnected or overlapping terminals\")}const p=[],m=Math.floor(t/2),_=a*(m-1);for(let f=0;f\u003ct;f++){const I=f\u003cm?\"left\":\"right\",C=f%m,y=_/2-C*a,x=s,E=r,B=I===\"left\"?-e/2+x/2+u:e/2-x/2-u,S=f+1;p.push({pinNumber:S,x:B,y,padSizeX:x,padSizeY:E})}if(c===\"rectangular\"){const f=l+o,I=Math.min(o,n)/100,C=De($t,{size:[d,n*.8,I],center:[-e/2+d*1.5,0,f-I/2]}),y=De($t,{size:[e,n,o],center:[0,0,l+o/2]});return Sn(Ei,{children:[De(qo,{color:\"#25272a\",children:d\u003e0?Sn(e0,{children:[y,C]}):y}),De(qo,{color:\"#c7c9cd\",children:p.map(x=\u003ex.pinNumber===1\u0026\u0026h\u003e0?Sn(ZA,{children:[De($t,{size:[s-h,r,g],center:[x.x+h/2,x.y,g/2]}),De($t,{size:[s,r-2*h,g],center:[x.x,x.y,g/2]})]},x.pinNumber):De($t,{size:[x.padSizeX,x.padSizeY,g],center:[x.x,x.y,g/2]},x.pinNumber))}),i\u0026\u0026De($t,{color:\"#c7c9cd\",size:[i.width,i.length,A],center:[0,0,A/2]}),d\u003e0\u0026\u0026De(qo,{color:\"#969997\",children:C})]})}return Sn(Ei,{children:[De(ng,{center:{x:0,y:0,z:0},width:e,length:n,height:o,heightAboveSurface:0,color:\"grey\",chamferSize:.2,taperRatio:0,notchPosition:{x:-(e/2-s),y:n/2-s,z:o}}),p.map((f,I)=\u003eDe($t,{center:[f.x,f.y,A/2],size:[f.padSizeX,f.padSizeY,A]})),i?.length!==void 0\u0026\u0026i?.width!==void 0\u0026\u0026De($t,{center:[0,0,A/2],size:[i.width,i.length,A]})]})},exi=({bodyLength:t=10.2,bodyWidth:e=4.65,bodyHeight:n=13.46,leadSpacing:o=5,leadDiameter:i=.8,leadLength:r=12.7,color:s=\"#ddd\",leadColor:a=\"#b87333\"})=\u003e{const A=t/2,c=e/2,l=A-c,u=o/2,g=.85;return Sn(Ei,{children:[Sn(qo,{color:s,children:[Sn(ZA,{children:[De(a2,{height:n,roundRadius:.5,radius:c,center:[-l,0,n]}),De(a2,{height:n,roundRadius:.5,radius:c,center:[l,0,n]})]}),Sn(ZA,{children:[De(a2,{height:g,roundRadius:.1,radius:c+.85,center:[-l,0,n/2+g/2]}),De(a2,{height:g,roundRadius:.1,radius:c+.85,center:[l,0,n/2+g/2]})]})]}),Sn(qo,{color:a,children:[De(Ns,{height:r+n/2,radius:i/2,center:[-u+.06,0,-(r/2)+n/2]}),De(Ns,{height:r+n/2,radius:i/2,center:[u-.06,0,-(r/2)+n/2]})]})]})},txi=({bodyLength:t=1.4,bodyDiameter:e=1.1,color:n=\"#3a3a3aff\",contactColor:o=\"#c6c6c6\",cathodeIdentification:i=\"#111\"})=\u003eSn(Ei,{children:[De(qo,{color:n,children:Sn(Ac,{rotation:[0,\"90deg\",0],children:[De(A1,{size:[e,e,t-.2],roundRadius:.2,center:[-e/2,0,.05]}),De(Ns,{height:.2/2,radius:e/2-.2,center:[-e/2,0,-t/2+.2/2]})]})}),De(qo,{color:i,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(A1,{size:[e*1.01,e*1.01,t/3],roundRadius:.2,center:[-e/2,0,-t/4+.1]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:.2,radius:e/2,roundRadius:.2/3,center:[-e/2,0,-t/2]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:.2,radius:e/2,roundRadius:.2/3,center:[-e/2,0,t/2]})})})]}),Wsn=({bodyLength:t=3.5,bodyDiameter:e=1.5,color:n=\"#202020\",contactColor:o=\"#c6c6c6\",bandColor:i=\"#f2f2f2\"})=\u003e{const s=t-.8+.04,a=(t-.4)/2,A=e/2+.02,c=.14,l=-t/2+.4+.35;return Sn(Ei,{children:[De(qo,{color:n,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:s,radius:e/2,roundRadius:.05,center:[-e/2,0,0]})})}),De(qo,{color:i,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(Ns,{height:c,radius:e/2+.002,center:[-e/2,0,l]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:.4,radius:A,roundRadius:.04,center:[-e/2,0,-a]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:.4,radius:A,roundRadius:.04,center:[-e/2,0,a]})})})]})},nxi=({bodyLength:t=3.9,bodyDiameter:e=2.5,color:n=\"#3a3a3aff\",contactColor:o=\"#c6c6c6\"})=\u003eSn(Ei,{children:[De(qo,{color:n,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:t,radius:e/2,roundRadius:.3,center:[-e/2,0,0]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:.55,radius:e/2,roundRadius:.2,center:[-e/2,0,-t/2]})})}),De(qo,{color:o,children:De(Ac,{rotation:[0,\"90deg\",0],children:De(a2,{height:.55,radius:e/2,roundRadius:.2,center:[-e/2,0,t/2]})})})]}),oxi=({pinCount:t,padContactLength:e=.6,leadWidth:n=.41,pitch:o=1.27})=\u003e{if(t%2!==0)throw new Error(\"MS012 pinCount must be even\");const i=t/2,r=4.9,s=3.9,a=(i-1)*o/2,A=.2;return Sn(Ei,{children:[Array.from({length:i}).map((c,l)=\u003eDe(ns,{position:{x:-s/2-e-.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),Array.from({length:i}).map((c,l)=\u003eDe(ns,{rotation:Math.PI,position:{x:s/2+e+.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),De(ng,{center:{x:0,y:0,z:A/2},width:s,length:r,height:1.55,notchPosition:{x:-.95,y:r/2-1,z:1.55},heightAboveSurface:.17,taperRatio:.09})]})},ixi=({pinCount:t=16,padContactLength:e=.6,leadWidth:n=.41,pitch:o=1.27})=\u003e{if(t!==16)throw new Error(\"MS013 only supports 16 pins\");const i=t/2,r=7.5,s=10.3,a=(i-1)*o/2,A=.2;return Sn(Ei,{children:[Array.from({length:i}).map((c,l)=\u003eDe(ns,{position:{x:-r/2-e-.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),Array.from({length:i}).map((c,l)=\u003eDe(ns,{rotation:Math.PI,position:{x:r/2+e+.3,y:l*o-a,z:A/2},width:n,thickness:A,padContactLength:e,bodyDistance:e+.4,height:.85})),De(ng,{center:{x:0,y:0,z:A/2},width:r,length:s,height:1.1,notchPosition:{x:-2.25,y:s/2-1.5,z:1.1},heightAboveSurface:.17,taperRatio:.05})]})},rxi=[{x:-2.54,y:-1},{x:0,y:-1},{x:2.54,y:-1}],jsn=({mouldedTab:t=!1,leads:e=rxi,bodyWidth:n=10,bodyThickness:o=4.5,bodyHeight:i=9.2,tabHeight:r=6.4,tabThickness:s=1.4,mountingHoleDiameter:a=3.6,standoff:A=3,leadLength:c=3,bodyColor:l=\"#222\",tabColor:u=\"#ccc\",leadColor:g=\"#d4b106\"}={})=\u003e{const h=e.reduce((x,E)=\u003ex+E.x,0)/e.length,d=e.reduce((x,E)=\u003ex+E.y,0)/e.length,p=A,m=p+i,_=m+r,f=d+(o-s)/2,I=_-Math.max(a*.8,2.6),C=.8,y=.5;return Sn(Ei,{children:[De(qo,{color:l,children:De($t,{size:[n,o,i],center:[h,d,p+i/2]})}),De(qo,{color:t?l:u,children:Sn(e0,{children:[De($t,{size:[n,s,r],center:[h,f,m+r/2]}),De(Ac,{rotation:[\"90deg\",0,0],children:De(Uo,{center:[h,I,-f],children:De(Ns,{radius:a/2,height:s*3})})})]})}),e.map(x=\u003eDe(qo,{color:g,children:De($t,{size:[C,y,A+c],center:[x.x,x.y,(A-c)/2]})},`lead-${x.x}-${x.y}`))]})},sxi=()=\u003e{const c=1.1999999999999997;return Sn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2.8/2+c/4,y:-.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{rotation:Math.PI,position:{x:2.8/2+c/4,y:0,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{rotation:Math.PI,position:{x:2.8/2+c/4,y:.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{position:{x:-2.8/2-c/4,y:0,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{position:{x:-2.8/2-c/4,y:-.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ns,{position:{x:-2.8/2-c/4,y:.95,z:.15/2},width:.4,thickness:.15,padContactLength:.5,bodyDistance:c,height:.95}),De(ng,{center:{x:0,y:0,z:0},width:1.6,length:2.9,height:1.2,straightHeightRatio:.6,notchPosition:{x:-.4,y:1.2/2+.4,z:1.2+.05},notchRadius:.1})]})},axi=()=\u003eSn(Ei,{children:[De(ng,{center:{x:0,y:0,z:0},width:.8,length:1,height:.37,heightAboveSurface:0,color:\"#1a1a1a\",taperRatio:.15,straightHeightRatio:0,notchPosition:{x:-.8/4,y:.7/2.2,z:.37+.1}}),[0,1,2].map(c=\u003e{const l=-.35+c*.35;return De($t,{center:[-.8/2+.19/2-.1,l,.12/2],size:[.19,.15,.12]})}),[0,1,2].map(c=\u003e{const l=-.35+c*.35;return De($t,{center:[.8/2-.19/2+.1,l,.12/2],size:[.19,.15,.12]})})]}),Axi=[{x:-1.27,y:.98},{x:0,y:2.25},{x:1.27,y:.98}],cxi=t=\u003e{let e=[t[0],t[t.length-1]],n=-1;for(let o=0;o\u003ct.length;o++)for(let i=o+1;i\u003ct.length;i++){const r=Math.hypot(t[o].x-t[i].x,t[o].y-t[i].y);r\u003en\u0026\u0026(n=r,e=[t[o],t[i]])}return{outer:e,separation:n}},$sn=({bodyDiameter:t=4.8,bodyHeight:e=4.5,flatCut:n=1.1,leads:o=Axi,standoff:i=1.5,leadLength:r=3,bodyColor:s=\"#222\"}={})=\u003e{const a=t/2,A=.4,c=.25,{outer:l,separation:u}=cxi(o),[g,h]=l,d={x:(g.x+h.x)/2,y:(g.y+h.y)/2},p=Math.max(u,.001),m={x:(h.x-g.x)/p,y:(h.y-g.y)/p},_=u/2,f=C=\u003e{const y=(C-(o.length-1)/2)*_;return{x:d.x+m.x*y,y:d.y+m.y*y}},I=[c,A,c];return Sn(Ei,{children:[De(qo,{color:s,children:Sn(e0,{children:[De(Uo,{center:[d.x,d.y,i+e/2],children:De(Ns,{radius:a,height:e})}),De(Uo,{center:[d.x,d.y-(a-n/2),i+e/2],children:De($t,{size:[a*2,n,e+.2]})})]})}),o.map((C,y)=\u003e{const x=f(y);return Sn(Uo,{center:[0,0,0],children:[Sn(ZA,{children:[De(Uo,{center:[C.x,C.y,0],children:De($t,{size:I})}),De(Uo,{center:[x.x,x.y,i],children:De($t,{size:I})})]}),De(Uo,{center:[C.x,C.y,-r/2],children:De($t,{size:[c,A,r]})})]},`lead-${C.x}-${C.y}`)})]})},lxi=()=\u003eSn(Ei,{children:[De(ns,{rotation:Math.PI,position:{x:2/2+.75/4,y:-.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{rotation:Math.PI,position:{x:2/2+.75/4,y:0,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{rotation:Math.PI,position:{x:2/2+.75/4,y:.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{position:{x:-2/2-.75/4,y:0,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{position:{x:-2/2-.75/4,y:-.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ns,{position:{x:-2/2-.75/4,y:.65,z:.15/2},width:.25,thickness:.15,padContactLength:.3,bodyDistance:.75,height:.85}),De(ng,{center:{x:0,y:0,z:0},width:1.25,length:2,height:1.1,straightHeightRatio:.6,notchPosition:{x:-.375,y:1.1/2+.2,z:1.1},heightAboveSurface:.1})]}),uxi=lxi,gxi=()=\u003eSn(Ei,{children:[De(ng,{center:{x:0,y:0,z:.05},width:1,length:1.45,height:.5,heightAboveSurface:0,color:\"#1a1a1a\",taperRatio:0,includeNotch:!1}),[0,1,2].map(a=\u003e{const A=-.5+a*.5;return De($t,{center:[-1/2+.3/2,A,.05/2],size:[.3,.2,.05]})}),[0,1,2].map(a=\u003e{const A=-.5+a*.5;return De($t,{center:[1/2-.3/2,A,.05/2],size:[.3,.2,.05]})})]}),qsn=()=\u003eSn(Ei,{children:[De(ns,{position:{x:-2.5/2,y:0,z:.175/2},width:.3,thickness:.175,padContactLength:.3,bodyDistance:.45,height:.7}),De(ns,{rotation:Math.PI,position:{x:2.5/2,y:0,z:.175/2},width:.3,thickness:.175,padContactLength:.3,bodyDistance:.45,height:.7}),De(qo,{color:\"#222\",children:De(ng,{center:{x:0,y:0,z:0},width:1.8,length:1.4,height:.95,includeNotch:!1,taperRatio:.06,straightHeightRatio:.7,heightAboveSurface:.05})}),De($t,{color:\"#777\",size:[1.8/3,1.4-.075,.02],center:[-.9*2/3+.035,0,.95+.05]})]}),dxi=()=\u003eSn(Ei,{children:[De($t,{color:\"#ccc\",size:[.4,.325,.175],center:[-1.05,0,.175/2]}),De($t,{color:\"#ccc\",size:[.4,.325,.175],center:[1.05,0,.175/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[De(Uo,{z:.175/2,children:De($t,{size:[1.7,1.25,.175]})}),Sn(ZA,{children:[De(Uo,{z:.175,children:De($t,{size:[1.7,1.25,.01]})}),De(Uo,{z:.725,children:De($t,{size:[1.7-.2,1.25-.2,.01]})})]})]})}),De($t,{color:\"#777\",size:[1.7/3,1.25-.2,.02],center:[-1.05+1.7/4.4+.2,0,.725]})]}),hxi=()=\u003e{const s=-1.0474999999999999,a=1.775/2+.4/2-.04;return Sn(Ei,{children:[De($t,{color:\"#ccc\",size:[.4,.325,.13],center:[s,0,.13/2]}),De($t,{color:\"#ccc\",size:[.4,.325,.13],center:[a,0,.13/2]}),De(qo,{color:\"#222\",children:De(ng,{width:1.775,length:1.25,height:.725,center:{x:0,y:0,z:0},heightAboveSurface:0,straightHeightRatio:.7,taperRatio:.06,includeNotch:!1})}),De($t,{color:\"#777\",size:[1.775/3,1.25-.05,.02],center:[s+1.775/4.4+.2,0,.725]})]})},pxi=({pitch:t=10})=\u003eSn(Ei,{children:[De(Ns,{height:4,radius:.5,center:[-t/2,0,.5]}),De(TY,{radius:.5,center:[-t/2,0,2.5]}),De(Uo,{x:-2.5,y:0,z:2.5,children:Sn(Ac,{rotation:[0,Math.PI/2,0],children:[De(Ns,{height:t,radius:.5,center:[0,0,2.5]}),De(qo,{color:\"#d2b48c\",children:De(Ns,{height:5,radius:1.3,center:[0,0,2.5]})})]})}),De(Ns,{height:4,radius:.5,center:[t/2,0,.5]}),De(TY,{radius:.5,center:[t/2,0,2.5]})]}),mxi=({bodyWidth:t=21,boardThickness:e=.5,leadWidth:n=1.6,leadLength:o=2.4,leadsPitch:i=2.54,leadsLeft:r,leadsRight:s,leadsTop:a,leadsBottom:A,innerHoles:c=!0,innerHoleEdgeDistance:l=1.61,innerHoleDiameter:u=1})=\u003e{const g=t/2,h=e/2,d=e*1.05,p=u/2,m=Math.max(r||0,s||0,a||0,A||0)*i||51,_=[],f=[];if(s){const x=-((s-1)/2)*i;for(let E=0;E\u003cs;E++){const B=x+E*i;_.push({x:g-o/2,y:-B,pl:o,pw:n}),c\u0026\u0026f.push({x:g,y:-B},{x:g-l,y:-B})}}if(r){const x=-((r-1)/2)*i;for(let E=0;E\u003cr;E++){const B=x+E*i;_.push({x:-g+o/2,y:-B,pl:o,pw:n}),c\u0026\u0026f.push({x:-g,y:-B},{x:-g+l,y:-B})}}if(a){const x=-((a-1)/2)*i;for(let E=0;E\u003ca;E++){const B=x+E*i;_.push({x:-B,y:m/2-o/2,pl:n,pw:o}),c\u0026\u0026f.push({x:-B,y:m/2},{x:-B,y:m/2-l})}}if(A){const x=-((A-1)/2)*i;for(let E=0;E\u003cA;E++){const B=x+E*i;_.push({x:-B,y:-m/2+o/2,pl:n,pw:o}),c\u0026\u0026f.push({x:-B,y:-m/2},{x:-B,y:-m/2+l})}}const I=De(qo,{color:\"#051a0a\",children:Sn(e0,{children:[De($t,{center:[0,0,h],size:[t,m,e]}),_.map((x,E)=\u003eDe($t,{center:[x.x,x.y,h],size:[x.pl+.01,x.pw+.01,d]},E))]})}),C=c\u0026\u0026f.map((x,E)=\u003eDe(Ns,{color:\"black\",center:[x.x,x.y,h],radius:p,height:e*1.07})),y=_.map((x,E)=\u003eDe($t,{center:[x.x,x.y,h],size:[x.pl+.01,x.pw+.01,d]}));return Sn(Ei,{children:[I,De(qo,{color:\"#FFD700\",children:c?Sn(e0,{children:[De(gh,{children:_.map((x,E)=\u003eDe($t,{center:[x.x,x.y,h],size:[x.pl+.01,x.pw+.01,d]},E))}),C]}):y})]})},Xsn=({width:t=30,height:e=22,thickness:n=1,bezelInset:o=2,bezelDepth:i=1,screenColor:r=\"#001414\",bezelColor:s=\"#0f1116\",screenWidth:a,screenHeight:A,offset:c})=\u003e{const l=t,u=e,g=Math.max(n,.4),h=Math.max(Math.min(i,g),.2),d=Math.max(g-h,0),p=Math.max(o,0),m=Math.max(a??l-p*2,2),_=Math.max(A??u-p*2,2),f=Math.min(Math.max(h*.6,.2),h),I=c?.x??0,C=c?.y??0,y=c?.z??0;return Sn(Uo,{offset:{x:I,y:C,z:y},children:[d\u003e0\u0026\u0026De(qo,{color:s,children:De($t,{size:[l,u,d],offset:[0,0,d/2]})}),De(qo,{color:s,children:Sn(e0,{children:[De($t,{size:[l,u,h],offset:[0,0,d+h/2]}),De($t,{size:[m,_,h+.02],offset:[0,0,d+h/2]})]})}),De(qo,{color:r,children:De($t,{size:[m,_,f],offset:[0,0,d+f/2]})})]})},_xi=({numPins:t=5,rows:e=1,p:n=2.54,id:o=1,od:i=1.5,boardThickness:r=1.6,width:s,height:a,pinRowSide:A=\"left\",holes:c=[],holeInset:l=1,pinRowHoleEdgeToEdgeDist:u=2,female:g,nopin:h,screen:d,screenWidth:p,screenHeight:m,screenCenterOffsetX:_,screenCenterOffsetY:f})=\u003e{const I=d??!1,C=r/2,y=Math.ceil(t/e);let x,E;A===\"left\"||A===\"right\"?(x=(e-1)*n+2*u,E=(y-1)*n+2*u):(E=(e-1)*n+2*u,x=(y-1)*n+2*u),t===0\u0026\u0026(x=10,E=10);const B=Number(s??x),S=Number(a??E),Q=[];let w=0,M=0,k=0,R=0,F=0,O=0;A===\"left\"||A===\"right\"?(w=A===\"left\"?-B/2+u:B/2-u,M=-((y-1)/2)*n,k=0,R=n,F=A===\"left\"?n:-n,O=0):(w=-((y-1)/2)*n,M=A===\"top\"?S/2-u:-S/2+u,k=n,R=0,F=0,O=A===\"top\"?-n:n);let U=0;for(let ue=0;ue\u003ce\u0026\u0026U\u003ct;ue++)for(let fe=0;fe\u003cy\u0026\u0026U\u003ct;fe++){const pe=w+fe*k+ue*F,ye=M+fe*R+ue*O;Q.push({x:pe,y:ye}),U++}const Y=[];if(c)for(const ue of c){let fe=0,pe=0;ue===\"topleft\"?(fe=-B/2+l,pe=S/2-l):ue===\"topright\"?(fe=B/2-l,pe=S/2-l):ue===\"bottomleft\"?(fe=-B/2+l,pe=-S/2+l):ue===\"bottomright\"?(fe=B/2-l,pe=-S/2+l):ue===\"center\"\u0026\u0026(fe=0,pe=0),Y.push({x:fe,y:pe})}const W=.63,te=2,j=6,J=3,oe=h||g?0:te,ie=oe+r,ne=De(qo,{color:\"#008080\",children:Sn(e0,{children:[De($t,{center:[0,0,C+oe],size:[B,S,r]}),Y.map((ue,fe)=\u003eDe(Ns,{center:[ue.x,ue.y,C+oe],radius:i/2,height:r},`hole-${fe}`)),Q.map((ue,fe)=\u003eDe(Ns,{center:[ue.x,ue.y,C+oe],radius:i/2,height:r},`pin-hole-${fe}`))]})}),le=Q.map((ue,fe)=\u003eDe(qo,{color:\"#FFD700\",children:Sn(e0,{children:[De(Ns,{center:[ue.x,ue.y,r/2+oe],radius:i/2,height:r}),De(Ns,{center:[ue.x,ue.y,r/2+oe],radius:o/2,height:r})]})})),ge=Q.map((ue,fe)=\u003eDe(Dsn,{x:ue.x,y:ue.y,pinThickness:W,shortSidePinLength:J,longSidePinLength:j,bodyHeight:te,flipZ:pe=\u003epe})),_e=Q.map((ue,fe)=\u003eDe(Ysn,{x:ue.x,y:ue.y,flipZ:pe=\u003e-pe}));return Sn(Ei,{children:[ne,le,!g\u0026\u0026!h\u0026\u0026ge,g\u0026\u0026_e,I\u0026\u0026De(Xsn,{width:p??B*.8,height:m??S*.6,offset:{x:_??0,y:f??0,z:ie}})]})},fxi=()=\u003e{const s=.8999999999999999,a=-s/2+.5/2-.15,A=s/2-.5/2+.15,c=.2,l=.5*.24;return Sn(Ei,{children:[De($t,{color:\"#ccc\",size:[.5,.28,.12],center:[a,0,.12/2]}),De($t,{color:\"#ccc\",size:[.5,.28,.12],center:[A,0,.12/2]}),De(qo,{color:\"#222\",children:Sn(gh,{children:[De(Uo,{z:l/2,children:De($t,{size:[s,.6,l]})}),Sn(ZA,{children:[De(Uo,{z:l,children:De($t,{size:[s,.6,.01]})}),De(Uo,{z:.5,children:De($t,{size:[s-c,.6-c,.01]})})]})]})}),De($t,{color:\"#777\",size:[1.4/6,.6-c,.02],center:[-s/4,0,.5]})]})},Ixi=fxi,Cxi=({numPins:t=7,showPins:e=!0,showFootprint:n=!0,bodyColor:o=\"#f5f5f5\",pinColor:i=\"#635959\"})=\u003e{const c=3.5999999999999996,l=6,u=(t-1)*1.5+4,g=-((t-1)*1.5)/2;return Sn(Ei,{children:[De(Uo,{offset:[0,0,6],children:De(Ac,{angles:[Math.PI,0,0],children:De(qo,{color:o,children:Sn(e0,{children:[De($t,{size:[u,3.5,6],center:[0,0,6/2]}),De($t,{size:[u-.5*2,3.5-.5*2,c],center:[0,0,c/2]}),De($t,{size:[u,3.5/3,c],center:[0,0,c/6]}),De($t,{size:[u-.5*2,.5/2,c],center:[0,3.5/2-.5/4,c/2]}),De($t,{size:[u-.5*2,.5/2,c],center:[0,-3.5/2+.5/4,c/2]}),De($t,{size:[1,.5+2,1],center:[-u/4,3.5/2,6/2]}),De($t,{size:[1,.5+3,1],center:[u/4,3.5/2,6/2]}),De($t,{size:[1,.5+2,1],center:[-u/4,-3.5/2,6/2]}),De($t,{size:[1,.5+3,1],center:[u/4,-3.5/2,6/2]})]})})})}),e\u0026\u0026Array.from({length:t}).map((h,d)=\u003eDe(qo,{color:i,children:De(Ns,{height:l,radius:.35,center:[g+d*1.5,0,2.5]})})),n\u0026\u0026Array.from({length:t}).map((h,d)=\u003e{const p=d===0,m=p?{type:\"pcb_plated_hole\",pcb_plated_hole_id:`jstzh_${d}`,shape:\"circular_hole_with_rect_pad\",x:g+d*1.5,y:0,hole_diameter:.73,rect_pad_width:1.03,rect_pad_height:1.73,hole_shape:\"circle\",pad_shape:\"rect\",layers:[\"top\",\"bottom\"],port_hints:[`${d+1}`]}:{type:\"pcb_plated_hole\",pcb_plated_hole_id:`jstzh_${d}`,shape:\"pill\",x:g+d*1.5,y:0,hole_height:.73,hole_width:.73,outer_height:1.73,outer_width:1.03,layers:[\"top\",\"bottom\"],port_hints:[`${d+1}`]};return De(tze,{hole:m,isPin1:p})})]})},yxi=({numPins:t=2,showPins:e=!0,showFootprint:n=!0,bodyColor:o=\"#f5f5f5\",pinColor:i=\"#635959\"})=\u003e{const c=3.5999999999999996,l=3.4,u=5.5,g=.5,h=l+u,d=(t-1)*2+3.9,p=-((t-1)*2)/2,m=1,_=1.8,f=.7,I=.8,C=.65;return Sn(Ei,{children:[De(Uo,{offset:[0,0,6],children:De(Ac,{angles:[Math.PI,0,0],children:De(qo,{color:o,children:Sn(e0,{children:[De($t,{size:[d,4.5,6],center:[0,0,6/2]}),De($t,{size:[d-.5*2,4.5-.5*2,c],center:[0,0,c/2]}),De($t,{size:[d,4.5/3,c],center:[0,0,c/6]}),De($t,{size:[d-.5*2,.5/2,c],center:[0,4.5/2-.5/4,c/2]}),De($t,{size:[d-.5*2,.5/2,c],center:[0,-4.5/2+.5/4,c/2]}),De($t,{size:[m,4.5+.5,_],center:[-d/2+f,0,6/2]}),De($t,{size:[m,4.5+.5,_],center:[d/2-f,0,6/2]}),De($t,{size:[.5*3,I,C],center:[-d/2,0,C/2]}),De(Uo,{offset:[-d/2,0,C],children:De(Ac,{angles:[0,Math.PI/2,0],children:De(Ns,{height:.5*3,radius:I/2})})}),De($t,{size:[.5*3,I,C],center:[d/2,0,C/2]}),De(Uo,{offset:[d/2,0,C],children:De(Ac,{angles:[0,Math.PI/2,0],children:De(Ns,{height:.5*3,radius:I/2})})})]})})})}),e\u0026\u0026Array.from({length:t}).map((y,x)=\u003eDe(qo,{color:i,children:De($t,{size:[g,g,h],center:[p+x*2,0,(u-l)/2]})})),n\u0026\u0026Array.from({length:t}).map((y,x)=\u003e{const E=x===0,B=E?{type:\"pcb_plated_hole\",pcb_plated_hole_id:`jstph_${x}`,shape:\"circular_hole_with_rect_pad\",x:p+x*2,y:0,hole_diameter:.73,rect_pad_width:1.2,rect_pad_height:1.2,hole_shape:\"circle\",pad_shape:\"rect\",layers:[\"top\",\"bottom\"],port_hints:[`${x+1}`]}:{type:\"pcb_plated_hole\",pcb_plated_hole_id:`jstph_${x}`,shape:\"pill\",x:p+x*2,y:0,hole_height:.73,hole_width:.73,outer_height:1.2,outer_width:1.2,layers:[\"top\",\"bottom\"],port_hints:[`${x+1}`]};return De(tze,{hole:B,isPin1:E})})]})},xxi=({numPins:t=4,showPins:e=!0,showFootprint:n=!0,bodyColor:o=\"#f8fafc\",pinColor:i=\"#635959\"})=\u003e{const g=(t-1)*2.5+4.9,h=-((t-1)*2.5)/2,d=.8,p=.85+.2,m=3.5,_=g/2-1.3,f=Math.min(g-3.4,Math.max(3,(t-1)*2.5*.4+2.2)),I=2.4;return Sn(Ei,{children:[De(Uo,{offset:[0,0,7/2],children:De(qo,{color:o,children:Sn(e0,{children:[De($t,{size:[g,5.75,7]}),De(Uo,{offset:[0,0,(7-5.35)/2+.1],children:De($t,{size:[g-.85*2,5.75-.85*2,5.35+.2]})}),De(Uo,{offset:[0,-5.75/2+.85/2,7/2-I/2+.1],children:De($t,{size:[f,.85+.2,I+.2]})}),De(Uo,{offset:[-_,-5.75/2+.85/2,7/2-m/2+.1],children:De($t,{size:[d,p,m+.2]})}),De(Uo,{offset:[_,-5.75/2+.85/2,7/2-m/2+.1],children:De($t,{size:[d,p,m+.2]})}),Array.from({length:t}).map((C,y)=\u003eDe(Uo,{offset:[h+y*2.5,-5.75/2+.3,-7/2+.25],children:De($t,{size:[1,.8,.5]})},`vent_${y}`))]})})}),e\u0026\u0026Array.from({length:t}).map((C,y)=\u003eDe(qo,{color:i,children:De(Uo,{offset:[h+y*2.5,0,8.75/2-3.4],children:De($t,{size:[.64,.64,8.75]})})})),n\u0026\u0026(()=\u003e{try{return pI.string(`jst${t}_xh`).circuitJson().filter(x=\u003ex.type===\"pcb_plated_hole\").map((x,E)=\u003eDe(tze,{hole:x,isPin1:E===0},`footprint_${E}`))}catch{return null}})()]})};function Zsn(t){const e=pI.string(t).json();return e.fn!==\"jst\"?!1:!!(e.sh||e.smd\u0026\u0026Math.abs(Ua(e.p)-1)\u003c.01\u0026\u0026Math.abs(Ua(e.mpx??0)-(e.num_pins-1+2.6))\u003c.15\u0026\u0026Math.abs(Ua(e.mpy??0)-2.525)\u003c.15)}var Exi=({footprint:t=\"jst6_sh\"})=\u003e{if(!Zsn(t))throw new Error(\"JstSh requires a named SH or matching 1mm SH top-entry footprint\");const e=t.replace(/_pin1location\\([^)]*\\)/g,\"\"),n=pI.string(e).json(),o=pI.string(e).circuitJson().filter(_=\u003e_.type===\"pcb_smtpad\"\u0026\u0026_.shape===\"rect\"),i=pI.string(t).circuitJson().filter(_=\u003e_.type===\"pcb_smtpad\"\u0026\u0026(_.shape===\"rect\"||_.shape===\"rotated_rect\")),r=n.num_pins;if(!Number.isInteger(r)||r\u003c2||r\u003e20||o.length!==r+2)throw new Error(\"JstSh requires 2–20 contacts and two hold-down pads\");const s=o.slice(0,r),a=o.slice(r),A=Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)-Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x),c=s.reduce((_,f)=\u003e_+f.x,0)/r,l=s[0].y,u=a[0].y\u003el?1:-1,g=l+u*1.8,h=r+2,d=2.9,p=4.2,m=g-u*.25;return Sn(Ac,{rotation:[0,0,A],children:[De(qo,{color:\"#e4e1d6\",children:Sn(e0,{children:[De($t,{size:[h,d,p],center:[c,g,p/2+.05]}),De($t,{size:[h-1.3,1.8,p],center:[c,g,p/2+.8]}),a.map((_,f)=\u003eDe($t,{size:[.7,_.height*.8,1.5],center:[_.x,_.y,.75]},`recess-${f}`)),[-1,1].map(_=\u003eDe($t,{size:[.55,.6,1],center:[c+_*(h/2-.9),g+u*d/2,4]},_))]})}),Sn(qo,{color:\"#c6c7c9\",children:[s.map((_,f)=\u003e{const I=_.y-u*_.height*.4;return Sn(gh,{children:[De($t,{size:[.2,Math.abs(m-I)+.1,.2],center:[_.x,(m+I)/2,.1]}),De($t,{size:[.2,.2,3.45],center:[_.x,m,1.725]})]},f)}),a.map((_,f)=\u003eSn(gh,{children:[De($t,{size:[.7,_.height*.75,.2],center:[_.x,_.y,.1]}),De($t,{size:[.2,_.height*.6,1.35],center:[_.x,_.y,.675]})]},`mount-${f}`))]})]})},Bxi=([t,e],n,o,i,r)=\u003e{const s=Math.sign(t),a=Math.sign(e),A=n/2,c=o/2,l=r?Math.min(.32,o*.36):0,u=Math.min(i,A,c),g=[[-A,-c],[A,-c],[A,c-u],[A-u,c],[-A,c]];l\u0026\u0026(g[0]=[-A+l,-c],g.push([-A,-c+l]));const h=g.map(([d,p])=\u003e[t+d*s,e+p*a]);return s*a\u003c0?h.reverse():h},yze=({width:t,length:e,radius:n,height:o,z:i})=\u003e{const r=t/2-n,s=e/2-n;return[[-r,-s],[r,-s],[r,s],[-r,s]].map(([a,A],c)=\u003eDe(Ns,{center:[a,A,i+o/2],height:o,radius:n}))},bxi=({horizontalPadPitch:t=2.2,verticalPadPitch:e=1.7,padWidth:n=1.4,padHeight:o=1.2,bodyHeight:i=.7})=\u003e{const r=t+n*.7142857142857143,s=e+o*(2/3),a=Math.min(.01,i*.02),A=n*(5/7),c=o*.75,l=i*(5/7),u=l-a,g=i*(2/35),h=r*.95,d=s*.94,p=r*.905,m=s*.9,_=r*.83,f=s*.82,I=l+g,C=Math.min(.01,i*.015),y=Math.min(.12,s*.05),x=(r-A)/2,E=(s-c)/2,B=[[-x,-E],[x,-E],[x,E],[-x,E]],S=yze({width:h,length:d,radius:Math.min(.13,d*.08),height:g,z:l}),Q=[...yze({width:p,length:m,radius:Math.min(.14,m*.08),height:C,z:I}),...yze({width:_,length:f,radius:Math.min(.15,f*.09),height:C,z:i-C})];return Sn(Ei,{children:[B.map((w,M)=\u003eDe(qo,{color:\"#d6a258\",children:De(FY,{height:a,children:De(kY,{points:Bxi(w,A,c,y,M===0)})})})),De(ng,{center:{x:0,y:0,z:a},width:r,length:s,height:u-.005,heightAboveSurface:0,color:\"#34343d\",taperRatio:0,straightHeightRatio:1,includeNotch:!1,chamferSize:y}),De(qo,{color:\"#d2a057\",children:De(ZA,{children:S})}),De(qo,{color:\"#b9bec2\",children:De(ZA,{children:Q})})]})},Sxi=\"#303339\",Qpe=\"#1f2227\",ean=\"#eee8d8\",tan=\"#f8f3e7\",xze=\"#b7bdc2\",Qxi=\"#d2d6d9\",vxi=\"#767d82\",wxi=\"#9ba1a5\",Pxi=({pinCount:t=12,pitch:e=.5,padWidth:n=.3,padLength:o=1.25,staggered:i=!1,reverse:r=!1,rowPitch:s=2.4,topPadLength:a=o,bottomPadLength:A=o,mountPadPitchX:c,mountPadOffsetY:l=2.575,mountTop:u=!1,mountPadWidth:g=2,mountPadLength:h=2.5})=\u003e{const d=Math.max((t-1)*e,e),p=-d/2,m=c??d+(i?3.5:3.38),_=l===0?0:(u?1:-1)*l,f=Array.from({length:t},(Ce,Le)=\u003e{const Ye=i\u0026\u0026Le%2===1!==r,tt=i?Ye?s/2:-s/2:0,At=Ye?a:A;return{index:Le,x:p+Le*e,y:tt,length:At}}),I=Math.max(...f.map(Ce=\u003eCe.y+Ce.length/2)),C=Math.min(...f.map(Ce=\u003eCe.y-Ce.length/2)),y=_-h/2,x=_+h/2,E=u?C:I,B=u?Math.max(x,I)+.67:Math.min(y,C)-.67,S=u?-1:1,Q=E-S*Math.max(o*.86,1.05),w=B+S*.22,M=Math.abs(Q-w),k=(Q+w)/2,R=w-S*.01,F=Math.max(d+4.9,m+g*.76),O=Math.min(F-2.3,d+1.1),U=.3,Y=1.42,W=2,te=Math.min(.92,M*.28),j=R+S*(te/2-.04),J=1.6,oe=1.1,ie=Math.max(M-.78,1.5),ne=R+S*(ie/2+.68),le=F-.72,ge=.34,_e=W-ge/2,ue=R+S*Math.min(.68,M*.22),fe=1.48,pe=Math.max(n*.82,.15),ye=E,Me=Math.abs(ye-Q),ve=(ye+Q)/2,he=Math.max(te*.8,.5),Qe=R+S*(he/2+.08),Pe=m/2,we=.75,Te=F/2-.04,Re=F/2-.23,Ee=F/2-.32,ke=.68;return Sn(Ei,{children:[[-1,1].map(Ce=\u003eDe($t,{color:xze,center:[Ce*Pe,_,.07],size:[g,h,.14]})),f.map(Ce=\u003eDe($t,{color:xze,center:[Ce.x,ve,.065],size:[pe,Me,.13]},`terminal:${Ce.index}`)),De(A1,{color:Qpe,center:[0,k,U/2],size:[F,M,U],roundRadius:.1}),De(qo,{color:Sxi,children:Sn(e0,{children:[De(A1,{center:[0,k,U+Y/2],size:[F-.2,M-.12,Y],roundRadius:.14}),De($t,{center:[0,j,oe],size:[O,te,J]}),De($t,{center:[0,ne,W-ge*.72],size:[le-.32,ie-.16,ge]})]})}),f.map(Ce=\u003eDe(A1,{color:Qxi,center:[Ce.x,Qe,U+.82],size:[pe*.82,he,.14],roundRadius:.035},`spring:${Ce.index}`)),f.map(Ce=\u003eDe($t,{color:xze,center:[Ce.x,Q-S*.03,U+.32],size:[pe,.13,.62]},`terminal-rise:${Ce.index}`)),De($t,{color:Qpe,center:[0,R+S*.1,U+.71],size:[O+.18,.16,.8]}),De(A1,{color:ean,center:[0,ne,_e],size:[le,ie,ge],roundRadius:.11}),De($t,{color:tan,center:[0,ne-S*(ie/2-.12),W-.035],size:[le-.36,.24,.07]}),[-1,1].map(Ce=\u003eDe(A1,{color:ean,center:[Ce*Ee,ue,fe],size:[ke,.92,.72],roundRadius:.1})),[-1,1].map(Ce=\u003eDe(Uo,{x:Ce*Ee,y:ue,z:fe,children:De(Ac,{rotation:[0,Math.PI/2,0],children:De(Ns,{color:tan,height:ke+.12,radius:.24})})})),[-1,1].map(Ce=\u003eDe(A1,{color:vxi,center:[Ce*Te,_,we/2],size:[.17,Math.min(h*.3,.7),we],roundRadius:.04})),[-1,1].map(Ce=\u003eDe(A1,{color:wxi,center:[Ce*Re,_,we-.05],size:[.42,Math.min(h*.3,.7),.1],roundRadius:.035})),De($t,{color:Qpe,center:[0,k,.025],size:[O+.7,M*.58,.05]}),De($t,{color:Qpe,center:[0,Q-S*.06,U+.82],size:[O+.4,.15,.92]})]})},Mxi=({numberOfPins:t,pitch:e=2.54,pinThickness:n=.64,bodyWidth:o=2.5,bodyHeight:i=2.54,standoffHeight:r=1.27,matingPinLength:s=5.8,tailSpan:a=5.08})=\u003e{const A=-((t-1)*e)/2,c=r+i,l=a/2,u=n*.35;return De(Ei,{children:Array.from({length:t},(g,h)=\u003e{const d=A+h*e,p=h%2===0?1:-1,m=s-u,_=r-n/2;return Sn(Uo,{x:d,children:[De($t,{color:\"#222\",size:[e,o,i],center:[0,0,r+i/2]}),Sn(qo,{color:\"#d4af37\",children:[De($t,{size:[n,l,n],center:[0,p*(l/2),n/2]}),De($t,{size:[n,n,_],center:[0,0,n/2+_/2]}),De($t,{size:[n,n,m],center:[0,0,c+m/2]}),Sn(ZA,{children:[De($t,{size:[n,n,.01],center:[0,0,c+m]}),De($t,{size:[n*.65,n*.65,.01],center:[0,0,c+s]})]})]})]})})})},JX=t=\u003epI.string(t).circuitJson().filter(n=\u003en.type===\"pcb_plated_hole\"\u0026\u0026Number.isFinite(n.x)\u0026\u0026Number.isFinite(n.y)).map(n=\u003e({x:n.x,y:n.y,pin:n.port_hints?.[0]})),nan=t=\u003epI.string(t).circuitJson().filter(n=\u003en.type===\"pcb_smtpad\"\u0026\u0026n.shape===\"rect\"\u0026\u0026Number.isFinite(n.x)\u0026\u0026Number.isFinite(n.y)).map(n=\u003e({x:n.x,y:n.y,width:n.width??.4,height:n.height??.4,pin:n.port_hints?.[0]})),Dxi=({bodyWidth:t,bodyLength:e,bodyHeight:n=1,pads:o,leadThickness:i=.15,leadHeightRatio:r=.75})=\u003e{const s=o.reduce((c,l)=\u003ec+l.x,0)/(o.length||1),a=o.reduce((c,l)=\u003ec+l.y,0)/(o.length||1),A=n*r;return Sn(Ei,{children:[De(ng,{center:{x:s,y:a,z:0},width:t,length:e,height:n}),o.map(c=\u003e{const l=c.width??.4,u=c.height??.4,g=c.x\u003e=s?1:-1,h=c.x+g*l/2,d=Math.max(Math.abs(h-s)-t/2,.1),p=Math.min(.15,t*.15);return De(ns,{rotation:g\u003e0?Math.PI:0,position:{x:h,y:c.y,z:i/2},width:u,thickness:i,padContactLength:l*.6,bodyDistance:d+p,height:A},`lead-${c.x}-${c.y}`)})]})},Nxi=({padPitch:t,padHeight:e,color:n=\"#333\"})=\u003e{const o=t,i=e*.85,r=i,s=o*.2,a=o-s*2;return Sn(Ei,{children:[De($t,{size:[a,i,r],offset:[0,0,r/2],color:n}),De($t,{size:[s,r,i],offset:[o/2-s/2,0,r/2],color:\"#ccc\"}),De($t,{size:[s,r,i],offset:[-o/2+s/2,0,r/2],color:\"#ccc\"})]})},Rxi=({color:t=\"#ffff00\",bodyColor:e=\"#ffffff\",leadColor:n=\"#dedede\"})=\u003e{const m=[-1.7,0,1.7],_=[-1,1];return Sn(Ei,{children:[m.flatMap(f=\u003e_.map(I=\u003eDe($t,{color:n,size:[1.4,1,.2],center:[I*2,f,.2/2]}))),De(qo,{color:e,children:Sn(e0,{children:[De(ng,{width:5,length:5,height:1.3,heightAboveSurface:.2,center:{x:0,y:0,z:0},color:e,taperRatio:.036,straightHeightRatio:.01,includeNotch:!1}),De(Ns,{radius:2,height:.25,center:[0,0,1.5-.25/2]}),De(Uo,{offset:[-5/2,5/2,1.5-.3/2+.005],children:De(Ac,{rotation:[0,0,Math.PI/4],children:De($t,{size:[.9,.9,.3+.01]})})})]})}),De(Ns,{color:t,radius:2,height:.25,center:[0,0,1.55-.25/2]})]})},Txi=({bodyWidth:t=3.5,bodyLength:e=2.8,bodyHeight:n=.8,color:o=\"#ffe08a\",bodyColor:i=\"#f2f2f2\",padColor:r=\"#cccccc\",pad1X:s=-.9,pad1Width:a=2.2,pad2X:A=1.375,pad2Width:c=1.25,padLength:l=2.2}={})=\u003e{const h=(s+A)/2,d=t*.55,p=e*.55;return Sn(Ei,{children:[[{x:s,w:a,key:\"pad-1\"},{x:A,w:c,key:\"pad-2\"}].map(({x:m,w:_,key:f})=\u003eDe(qo,{color:r,children:De($t,{size:[_,l,.1],center:[m,0,.1/2]})})),De(qo,{color:i,children:De($t,{size:[t,e,n],center:[h,0,.1+n/2]})}),De(qo,{color:o,children:De($t,{size:[d,p,.15],center:[h,0,.1+n+.15/2-.05]})})]})},oan=t=\u003eArray.from({length:t},(e,n)=\u003en),kxi=({bodyWidth:t=16.26,bodyDepth:e=15.88,bodyHeight:n=13.5,bodyCenterY:o=-.96,ledPins:i=!1,firstPinLeft:r=!1,firstPinTop:s=!1,signalPitch:a=1.02,signalRowPitch:A=1.78,signalHoleDiameter:c=.9144,shieldPinX:l=8.13,shieldPinY:u=.13,shieldHoleDiameter:g=1.8,locatorHoleX:h=6.35,locatorHoleY:d=-3.43,locatorHoleDiameter:p=3.25,ledPinX:m=4.57,ledPinPitch:_=2.29,ledPinY:f=5.7,openingDirection:I,shellColor:C=\"#b7bdc2\",housingColor:y=\"#20242a\",contactColor:x=\"#d6a928\"})=\u003e{const E=I??(o\u003e0?1:-1),B=o+E*e/2,S=Math.min(.38,t*.024),Q=Math.max(t-2.5,t*.72),w=Math.min(n-2.4,9.6),M=1.3+w/2,k=Math.min(4.4,e*.34),R=B-E*k/2,F=B-E*(k+S*.7),O=Math.max(.22,Math.min(c*.36,.38)),U=oan(8).map(oe=\u003e{const ie=(3.5-oe)*a,ne=oe%2===0?-A/2:A/2;return{x:r?-ie:ie,y:s?-ne:ne}}),Y=[-m-_,-m,m,m+_],W=Q/10,te=B-E*Math.max(k*.48,1.2),j=M+w*.18,J=B+E*S*.2;return Sn(Ei,{children:[Sn(qo,{color:C,children:[Sn(e0,{children:[De($t,{center:[0,o,n/2],size:[t,e,n]}),De($t,{center:[0,R,M],size:[Q,k+S*2,w]})]}),De($t,{center:[0,J,.72],size:[Q+.5,S*1.25,1.05]}),[-1,1].map(oe=\u003eDe($t,{center:[oe*l,u,.25],size:[Math.max(g*.46,.65),Math.max(g*.72,1.1),3.4]})),[-1,1].map(oe=\u003eDe($t,{center:[oe*t*.24,o-E*e*.08,n+.04],size:[t*.22,e*.42,.1]}))]}),Sn(qo,{color:y,children:[Sn(e0,{children:[De(A1,{center:[0,R,M],size:[Q-.2,k+S*.5,w-.2],roundRadius:.22}),De($t,{center:[0,R-E*S*.2,M-.05],size:[Q-1.25,k+S,w-1.35]})]}),De($t,{center:[0,F,M],size:[Q-1.15,S,w-1.25]}),De(A1,{center:[0,B-E*k*.28,1.55],size:[Q-2.6,k*.5,1.15],roundRadius:.16}),[-1,1].map(oe=\u003eDe(Ns,{center:[oe*h,d,-.25],radius:Math.max(p*.41,.65),height:2.7}))]}),Sn(qo,{color:x,children:[U.map(({x:oe,y:ie},ne)=\u003eDe(Ns,{center:[oe,ie,.15],radius:O,height:3.1})),oan(8).map(oe=\u003eDe(Uo,{offset:[(oe-3.5)*W,te,j+(oe%2===0?.03:-.03)],children:De(Ac,{rotation:[E*.2,0,0],children:De(A1,{size:[Math.max(W*.28,.28),3.25,.16],roundRadius:.05})})})),i\u0026\u0026Y.map((oe,ie)=\u003eDe(Ns,{center:[oe,f,.15],radius:O,height:3.1}))]}),i\u0026\u0026Sn(Ei,{children:[De(A1,{color:\"#73b744\",center:[-t/2+2.05,B+E*S*.35,n-2.05],size:[2.15,S*1.55,1.45],roundRadius:.18}),De(A1,{color:\"#e0aa35\",center:[t/2-2.05,B+E*S*.35,n-2.05],size:[2.15,S*1.55,1.45],roundRadius:.18})]})]})},Fxi=({bodyWidth:t=6.1,bodyLength:e=6.5,bodyHeight:n=2.3,tabWidth:o=6.2,tabLength:i=5.8,span:r=6.85,pitch:s=2.29,leadWidth:a=.9,leadContactLength:A=1.5,color:c=\"#222\",tabColor:l=\"#cccccc\",leadColor:u=\"#cccccc\"})=\u003e{const h=r/2,d=-r/2,p=h+(o-t)/2,m=p-t/2,_=.5/2,f=.4;return Sn(Ei,{children:[De(qo,{color:l,children:De($t,{size:[o,i,.5],center:[h,0,.5/2]})}),De(qo,{color:c,children:De($t,{size:[t,e,n],center:[p,0,.5+n/2]})}),[-1,1].map(I=\u003eSn(qo,{color:u,children:[De($t,{size:[A,a,f],center:[d+A/2,I*s,f/2]}),Sn(ZA,{children:[De($t,{size:[.1,a,f],center:[d+A,I*s,f/2]}),De($t,{size:[.1,a,f],center:[m,I*s,_+.5/2]})]})]},`lead-${I}`))]})},Lxi=({diameter:t=6.3,heightToDiameterRatio:e=1.4,height:n=t*e,leadPitch:o=2.5,leadDiameter:i=.6,leadLength:r=3,sleeveColor:s=\"#1b2a6b\",baseColor:a=\"#1a1a1a\"})=\u003e{const A=t/2,c=Math.min(1,t*.12),l=Math.max(n-c,.1),u=c,g=u+l,h=Math.max(t*.06,.2),d=.3;return Sn(Ei,{children:[De(qo,{color:a,children:De(Ns,{radius:A-.05,height:c,center:[0,0,c/2]})}),De(qo,{color:s,children:Sn(e0,{children:[De(a2,{radius:A,height:l,roundRadius:Math.min(.3,A*.15),center:[0,0,u+l/2]}),De($t,{size:[t,h,d*2],center:[0,0,g]}),De($t,{size:[h,t,d*2],center:[0,0,g]})]})}),[-1,1].map(p=\u003eDe(qo,{color:\"#c0c0c0\",children:De(Ns,{radius:i/2,height:r+c,center:[p*o/2,0,(c-r)/2]})}))]})},Hxi=({bodyWidth:t=5.35,bodyLength:e=14,bodyHeight:n=4,bodyCenterX:o=t/2,adjusterDiameter:i=Math.min(t,e)*.55,shaftDiameter:r=0,shaftHeight:s=0,leads:a=[],leadDiameter:A=.6,leadLength:c=3,bodyColor:l=\"#1f4fa3\",adjusterColor:u=\"#d8d8d8\"})=\u003e{const h=n+.4,d=Math.max(i*.16,.3);return Sn(Ei,{children:[De(qo,{color:l,children:De($t,{size:[t,e,n],center:[o,0,n/2]})}),De(qo,{color:u,children:Sn(e0,{children:[De(Ns,{radius:i/2,height:.8,center:[o,0,h]}),De($t,{size:[i,d,.8*.6],center:[o,0,h+.8/2]})]})}),s\u003e0\u0026\u0026r\u003e0?De(qo,{color:u,children:De(Ns,{radius:r/2,height:s,center:[o,0,n+s/2]})}):null,a.map(p=\u003eDe(qo,{color:\"#c0c0c0\",children:De(Ns,{radius:A/2,height:n/2+c,center:[p.x,p.y,(n/2-c)/2]})},`lead-${p.x}-${p.y}`))]})},Oxi=({bodyWidth:t=2.9,bodyLength:e=3,bodyHeight:n=1.4,actuatorDiameter:o=1.5,actuatorHeight:i=.5,padSpanX:r=4.2,padSpanY:s=2.15,padWidth:a=1.05,padLength:A=.7,bodyColor:c=\"#2b2b2b\",actuatorColor:l=\"#d9d9d9\",leadColor:u=\"#cccccc\"})=\u003eSn(Ei,{children:[De(qo,{color:c,children:De($t,{size:[t,e,n],center:[0,0,n/2]})}),De(qo,{color:l,children:De(Ns,{radius:o/2,height:i,center:[0,0,n+i/2]})}),[-1,1].flatMap(h=\u003e[-1,1].map(d=\u003eDe(qo,{color:u,children:De($t,{size:[a,A,.15],center:[h*r/2,d*s/2,.15/2]})})))]}),Gxi=({footprint:t=\"smdslideswitch7\",position:e=0})=\u003e{const n=t.replace(/_pin1location\\([^)]*\\)/g,\"\"),o=pI.string(n).json(),i=pI.string(n).circuitJson(),r=i.filter(g=\u003eg.type===\"pcb_smtpad\"\u0026\u0026g.shape===\"rect\"),s=pI.string(t).circuitJson().filter(g=\u003eg.type===\"pcb_smtpad\"\u0026\u0026(g.shape===\"rect\"||g.shape===\"rotated_rect\"));if(r.length\u003c7||!Number.isFinite(o.mpx)||o.mpx\u003c3)throw new Error(\"SmdSlideSwitch needs signal pads and four mounting pads\");const a=Math.atan2(s[1].y-s[0].y,s[1].x-s[0].x)-Math.atan2(r[1].y-r[0].y,r[1].x-r[0].x),A=o.mpx-.5,c=2.7,l=o.mpx\u003e6?1.5:1.4,u=o.mounty;return Sn(Ac,{rotation:[0,0,a],children:[De(qo,{color:\"#aeb4ba\",children:Sn(e0,{children:[De($t,{size:[A,c,l],center:[0,u,l/2]}),De($t,{size:[A-.3,c-.3,l],center:[0,u,l/2-.15]}),De($t,{size:[2.7,.5,.9],center:[0,u-c/2,.65]})]})}),Sn(qo,{color:\"#28292c\",children:[De($t,{size:[A-.32,c-.32,.35],center:[0,u,.175]}),De($t,{size:[1,2.25,.65],center:[e===0?-.5:.5,u-1.5,.65]}),i.filter(g=\u003eg.type===\"pcb_hole\").map((g,h)=\u003e\"hole_diameter\"in g\u0026\u0026\"x\"in g?De(Ns,{radius:g.hole_diameter*.42,height:.6,center:[g.x,g.y,-.2]}):null)]}),De(qo,{color:\"#c6c7c9\",children:r.map((g,h)=\u003e{const d=h\u003cr.length-4,p=g.y+g.height*.4,m=Math.min(g.y-g.height*.4,u+c/2-.2);return De($t,{size:[g.width*.8,d?p-m:g.height*.8,.18],center:[g.x,d?(p+m)/2:g.y,.09]},h)})})]})},Yxi=({fullWidth:t=1.94,fullLength:e=1.6})=\u003eSn(Ei,{children:[De(Ac,{rotation:[45*Math.PI,0,0],children:De(Uo,{center:[0,0,-.4],children:De(qo,{color:\"grey\",children:De($t,{size:[1.2,1.6,.55]})})})}),[-1,0,1].flatMap((l,u)=\u003e[De(Uo,{center:[-1.2/2-.03,l*.5,.13/2],children:De($t,{size:[.67,.3,.13]})}),De(Uo,{center:[1.2/2+.03,l*.5,.13/2],children:De($t,{size:[.67,.3,.13]})})])]}),Uxi=({packageWidth:t=10,packageLength:e=10,packageHeight:n=1.2,standoffHeight:o=.2,ballPitch:i=.8,ballDiameter:r=.5,ballRows:s=8,ballColumns:a=8,missingBalls:A=[],footprintString:c})=\u003e{const l=n-o,u=o+l/2,g=Math.max(o/2,r/2),h=c?pI.string(c).circuitJson():null;return Sn(Ei,{children:[De(Uo,{z:u,children:De(qo,{color:\"#555\",children:De($t,{size:[t,e,l]})})}),!c\u0026\u0026Array.from({length:s*a}).map((d,p)=\u003e{if(A.includes(p+1))return null;const m=Math.floor(p/a),f=(p%a-(a-1)/2)*i,I=(m-(s-1)/2)*i;return De(Uo,{x:f,y:I,z:g,children:De(TY,{radius:r/2})})}),h\u0026\u0026h.map((d,p)=\u003ed.type===\"pcb_smtpad\"?De(Uo,{x:d.x,y:d.y,z:g,children:De(TY,{radius:r/2})}):null)]})},ian=({width:t,height:e,depth:n})=\u003eDe(ZA,{children:[-1,1].map(o=\u003eDe(Uo,{offset:[o*(t-e)/2,0,0],children:De(Ac,{rotation:[Math.PI/2,0,0],children:De(Ns,{radius:e/2,height:n})})},o))}),Kxi=({footprint:t=\"usbcmidmount16\"})=\u003e{const e=t.replace(/_pin1location\\([^)]*\\)/g,\"\"),n=pI.string(e).json(),o=pI.string(e).circuitJson(),i=o.filter(C=\u003eC.type===\"pcb_smtpad\"\u0026\u0026C.shape===\"rect\"),r=o.filter(C=\u003eC.type===\"pcb_plated_hole\"),s=o.filter(C=\u003eC.type===\"pcb_hole\"),a=pI.string(t).circuitJson().find(C=\u003eC.type===\"pcb_plated_hole\"),A=r[0],c=A\u0026\u0026a\u0026\u0026\"x\"in a?Math.atan2(a.y,a.x)-Math.atan2(A.y,A.x):0,l=8.94,u=3.2,g=.22,h=n.rowy+.23,d=-n.bodybottom,p=h-d,m=(h+d)/2,_=1.65;if(!Number.isFinite(p)||p\u003c3||r.length!==4)throw new Error(\"UsbCMidmount requires four mounting slots and a positive body depth\");const f=-.9,I=_+.1;return Sn(Ac,{rotation:[0,0,c],children:[De(qo,{color:\"#b8bdc4\",children:De(Uo,{offset:[0,m,_],children:Sn(e0,{children:[De(ian,{width:l,height:u,depth:p}),De(ian,{width:l-g*2,height:u-g*2,depth:p+.2})]})})}),Sn(qo,{color:\"#242529\",children:[De($t,{size:[6.65,p-1.1,.7],center:[0,m+.3,_]}),De($t,{size:[7.6,1,2.45],center:[0,h-.65,_]}),s.map((C,y)=\u003e\"x\"in C\u0026\u0026\"hole_diameter\"in C?De(Ns,{radius:C.hole_diameter*.42,height:.8,center:[C.x,C.y,-.3]}):null)]}),Sn(qo,{color:\"#d3ad57\",children:[[-1,1].flatMap(C=\u003e[-2.75,-2.25,-1.25,-.25,.25,1.25,2.25,2.75].map(y=\u003eDe($t,{size:[.24,p-2,.04],center:[y,m+.1,_+C*.365]}))),i.map((C,y)=\u003eDe($t,{size:[Math.min(C.width*.7,.35),C.height*.8+.35,.15],center:[C.x,C.y-.175,.075]}))]}),De(qo,{color:\"#b8bdc4\",children:r.map((C,y)=\u003eDe($t,{size:[.4,\"hole_height\"in C?Math.max(.3,C.hole_height-.2):1,I-f],center:[C.x,C.y,(I+f)/2]},y))})]})},ran=t=\u003epI.string(t).circuitJson().filter(e=\u003ee.type===\"pcb_smtpad\"\u0026\u0026(e.shape===\"rect\"||e.shape===\"rotated_rect\")).map(e=\u003e({x:e.x,y:e.y,pin:e.port_hints?.[0]})),Vxi=({footprint:t=\"sot143\"})=\u003e{const e=ran(t);if(e.length!==4)throw new Error(\"SOT143 requires four signal pads\");const n=ran(\"sot143\"),o=pI.string(t).json(),i=n[1],r=e.find(A=\u003eA.pin===\"2\"),s=o.pin1location?Math.round((Math.atan2(r.y,r.x)-Math.atan2(i.y,i.x))/(Math.PI/2))*(Math.PI/2):0,a=e.map(A=\u003e({...A,x:A.x*Math.cos(s)+A.y*Math.sin(s),y:-A.x*Math.sin(s)+A.y*Math.cos(s)}));return Sn(Ac,{rotation:[0,0,s],children:[De(ng,{width:2.9,length:1.3,height:.95,heightAboveSurface:.05,center:{x:0,y:0,z:0},includeNotch:!1,taperRatio:.06}),a.map(A=\u003e{const c=A.y\u003c0?-1:1,l=A.pin===\"1\"?.83:.43;return De(ns,{width:l,thickness:.12,height:.45,padContactLength:.3,bodyDistance:.6,rotation:c\u003c0?Math.PI/2:-Math.PI/2,position:{x:A.x,y:c*1.15,z:.06}},A.pin)})]})},zxi=16/9,Jxi=40,uS=1e-6,gf=(t,e)=\u003e{if(!Number.isFinite(e)||e\u003c=0)throw new Error(`${t} must be a finite number greater than zero`)},Wxi=t=\u003e{if(t===void 0)return zxi;if(typeof t==\"number\")return gf(\"aspectRatio\",t),t;if(typeof t!=\"string\"){const[i,r]=t;return gf(\"aspectRatio width\",i),gf(\"aspectRatio height\",r),i/r}const e=t.split(\":\");if(e.length!==2)throw new Error('aspectRatio must look like \"16:9\"');const n=Number(e[0]),o=Number(e[1]);return gf(\"aspectRatio width\",n),gf(\"aspectRatio height\",o),n/o},jxi=({width:t,height:e,diagonal:n,aspectRatio:o,ratio:i,defaultDiagonal:r=Jxi})=\u003e{const s=Wxi(o??i);t!==void 0\u0026\u0026gf(\"width\",t),e!==void 0\u0026\u0026gf(\"height\",e),n!==void 0\u0026\u0026gf(\"diagonal\",n),gf(\"defaultDiagonal\",r);let a,A;if(t!==void 0\u0026\u0026e!==void 0)a=t,A=e;else if(n!==void 0\u0026\u0026t!==void 0){if(t\u003e=n)throw new Error(\"width must be smaller than diagonal\");a=t,A=Math.sqrt(n**2-t**2)}else if(n!==void 0\u0026\u0026e!==void 0){if(e\u003e=n)throw new Error(\"height must be smaller than diagonal\");a=Math.sqrt(n**2-e**2),A=e}else t!==void 0?(a=t,A=t/s):e!==void 0?(a=e*s,A=e):(A=(n??r)/Math.sqrt(s**2+1),a=A*s);return{width:a,height:A,diagonal:Math.hypot(a,A),aspectRatio:a/A}},$xi=t=\u003e{const e=[[\"sitsFlat\",t.sitsFlat],[\"sitsFlatBelowBoard\",t.sitsFlatBelowBoard],[\"foldedToFaceAboveBoard\",t.foldedToFaceAboveBoard],[\"foldedToFaceBelowBoard\",t.foldedToFaceBelowBoard],[\"foldedToFaceAboveBoard\",t.foldsAboveBoard],[\"foldedToFaceBelowBoard\",t.foldsBelowBoard],[\"foldedToRightAngleAboveBoard\",t.foldedToRightAngleAboveBoard],[\"foldedToRightAngleBelowBoard\",t.foldedToRightAngleBelowBoard]].filter(n=\u003en[1]);if(e.length\u003e1)throw new Error(\"Only one FlexScreen boolean orientation shortcut can be true\");return e[0]?.[0]??t.orientation??\"sitsFlat\"},qxi=(t,e)=\u003eMath.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2]),Xxi=(t,e,n)=\u003e[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n,t[2]+(e[2]-t[2])*n],Eze=t=\u003e{const e=[0];for(let n=1;n\u003ct.length;n+=1)e.push(e[n-1]+qxi(t[n-1],t[n]));return e},san=(t,e,n)=\u003e{if(n\u003c=0)return t[0];const o=e.at(-1);if(n\u003e=o)return t.at(-1);for(let i=1;i\u003ct.length;i+=1)if(e[i]\u003e=n){const r=e[i-1],s=e[i]-r;return Xxi(t[i-1],t[i],(n-r)/s)}return t.at(-1)},vpe=(t,e,n)=\u003e{const o=Eze(t),i=o.at(-1),r=Math.max(0,Math.min(e,i)),s=Math.max(r,Math.min(n,i)),a=[san(t,o,r)];for(let A=1;A\u003ct.length-1;A+=1)o[A]\u003er\u0026\u0026o[A]\u003cs\u0026\u0026a.push(t[A]);return a.push(san(t,o,s)),a},Zxi=(t,e)=\u003e[t,[t[0],t[1]+e,t[2]]],e3i=({start:t,endZ:e,flexCableLength:n,foldDistanceFromConnector:o,foldOutset:i,foldSegments:r})=\u003e{const s=[t],a=[t[0],t[1]+o,t[2]];o\u003euS\u0026\u0026s.push(a);for(let l=1;l\u003c=r;l+=1){const u=Math.PI*l/r;s.push([t[0],a[1]+i*Math.sin(u),t[2]+(e-t[2])*(1-Math.cos(u))/2])}const A=Eze(s).at(-1);if(A\u003en+uS)throw new Error(`flexCableLength must be at least ${A.toFixed(2)} for this 180-degree fold`);const c=Math.max(0,n-A);if(c\u003euS){const l=s.at(-1);s.push([l[0],l[1]-c,l[2]])}return s},t3i=({start:t,flexCableLength:e,bendRadius:n,bendSegments:o,verticalLead:i,direction:r})=\u003e{const s=2*o*Math.sin(Math.PI/(4*o)),a=Math.min(n,e/s),A=a*s,c=Math.max(0,e-A),l=Math.min(i,c*.45),u=c-l,g=[t];u\u003euS\u0026\u0026g.push([t[0],t[1]+u,t[2]]);for(let h=1;h\u003c=o;h+=1){const d=Math.PI/2*h/o;g.push([t[0],t[1]+u+a*Math.sin(d),t[2]+r*a*(1-Math.cos(d))])}if(l\u003euS){const h=g.at(-1);g.push([h[0],h[1],h[2]+r*l])}return g},WX=({points:t,width:e,thickness:n,color:o,acrossOffset:i=0,normalOffset:r=0,overlap:s=.03})=\u003eDe(qo,{color:o,children:t.slice(1).map((a,A)=\u003e{const c=t[A],l=a[0]-c[0],u=a[1]-c[1],g=a[2]-c[2],h=Math.hypot(l,u,g);if(h\u003cuS)return null;const d=Math.asin(g/h),p=Math.atan2(-l,u),m=[(c[0]+a[0])/2,(c[1]+a[1])/2,(c[2]+a[2])/2],_=Math.max(.001,Math.min(e,n,h)/2-.001);return De(Uo,{offset:m,children:De(Ac,{rotation:[d,0,p],children:De(A1,{size:[e,h+s,n],center:[i,0,r],roundRadius:_})})},`${A}:${m.join(\":\")}`)})}),n3i=t=\u003e{const{width:e,height:n,diagonal:o,aspectRatio:i,ratio:r,defaultDiagonal:s,screenThickness:a=1.2,bezelInset:A=2,bezelDepth:c=.65,activeAreaWidth:l,activeAreaHeight:u,screenColor:g=\"#071b24\",bezelColor:h=\"#15181d\",showScreen:d=!0,flexCableLength:p=28,flexCableThickness:m=.18,flexCableColor:_=\"#d79528\",conductorCount:f=8,conductorPitch:I,conductorWidth:C,conductorThickness:y=.035,conductorColor:x=\"#8c4a18\",cableEdgeMargin:E=.6,exposedContactLength:B=2.4,showConductors:S=!0,showFlexCable:Q=!0,showStiffeners:w=!0,stiffenerLength:M=3,stiffenerThickness:k=.16,stiffenerColor:R=\"#416bb3\",bendRadius:F=3,bendSegments:O=10,rightAngleVerticalLead:U=3,distanceAboveBoard:Y=7,distanceBelowBoard:W=7,foldDistanceFromConnector:te=7,foldOutset:j=4,foldSegments:J=18,screenGap:oe=.08,boardTopZ:ie=0,boardThickness:ne=1.6,boardClearance:le=.15,cableStartX:ge=0,cableStartY:_e=0,cableStartZ:ue,cableLateralOffset:fe=0,screenOffset:pe,screenRotation:ye,rotation:Me=[0,0,0],offset:ve}=t,he=jxi({width:e,height:n,diagonal:o,aspectRatio:i,ratio:r,defaultDiagonal:s}),Qe=$xi(t),Pe=Qe===\"sitsFlatBelowBoard\"||Qe===\"foldedToFaceBelowBoard\"||Qe===\"foldedToRightAngleBelowBoard\",we=Qe===\"foldedToFaceAboveBoard\"||Qe===\"foldedToFaceBelowBoard\",Te=Qe===\"foldedToRightAngleAboveBoard\"||Qe===\"foldedToRightAngleBelowBoard\";if(gf(\"screenThickness\",a),gf(\"flexCableLength\",p),gf(\"flexCableThickness\",m),gf(\"conductorThickness\",y),gf(\"bendRadius\",F),gf(\"foldOutset\",j),gf(\"boardThickness\",ne),w\u0026\u0026gf(\"stiffenerThickness\",k),!Number.isInteger(f)||f\u003c1)throw new Error(\"conductorCount must be a positive integer\");if(!Number.isInteger(O)||O\u003c2)throw new Error(\"bendSegments must be an integer of at least 2\");if(!Number.isInteger(J)||J\u003c4)throw new Error(\"foldSegments must be an integer of at least 4\");if(le\u003c0||oe\u003c0||E\u003c0||B\u003c0||M\u003c0||U\u003c0||Y\u003c0||W\u003c0||te\u003c0)throw new Error(\"clearances, margins, contact lengths, and lead lengths cannot be negative\");const Re=t.flexCableWidth??Math.min(12,Math.max(5,he.width*.3));gf(\"flexCableWidth\",Re);const Ee=Re-E*2;if(Ee\u003c=0)throw new Error(\"cableEdgeMargin leaves no usable flex cable width\");const ke=I??(f===1?0:Ee/f);if(f\u003e1\u0026\u0026(!Number.isFinite(ke)||ke\u003c=0))throw new Error(\"conductorPitch must be greater than zero\");const Ce=C??(f===1?Math.min(Ee,Re*.45):ke*.48);if(gf(\"conductorWidth\",Ce),(f-1)*ke+Ce\u003eEe+uS)throw new Error(\"conductorPitch and conductorWidth do not fit inside the flex cable margins\");const tt=Pe\u0026\u0026!we?ie-ne-le-m/2:ie+le+m/2,At=[ge+fe,_e,ue??tt],at=Pe?-1:1,nt=Qe===\"foldedToFaceAboveBoard\"?ie+Y:ie-ne-W,gt=Qe===\"foldedToFaceAboveBoard\"?nt-oe-m/2:nt+oe+m/2,bt=we?e3i({start:At,endZ:gt,flexCableLength:p,foldDistanceFromConnector:te,foldOutset:j,foldSegments:J}):Te?t3i({start:At,flexCableLength:p,bendRadius:F,bendSegments:O,verticalLead:U,direction:at}):Zxi(At,p),Ct=Eze(bt).at(-1),Dt=Math.min(Math.max(0,B),Ct/2),kt=Math.min(Math.max(0,M),Ct/2),it=vpe(bt,0,Dt),Yt=vpe(bt,Ct-Dt,Ct),pn=vpe(bt,0,kt),be=vpe(bt,Ct-kt,Ct),et=bt.at(-1);let It,Bt;Qe===\"sitsFlat\"?(It=[0,0,0],Bt=[et[0],et[1]+he.height/2,et[2]+m/2+oe]):Qe===\"sitsFlatBelowBoard\"?(It=[0,Math.PI,0],Bt=[et[0],et[1]+he.height/2,et[2]-m/2-oe]):Qe===\"foldedToFaceAboveBoard\"?(It=[0,0,0],Bt=[et[0],et[1]-he.height/2,nt]):Qe===\"foldedToFaceBelowBoard\"?(It=[0,Math.PI,0],Bt=[et[0],et[1]-he.height/2,nt]):Qe===\"foldedToRightAngleAboveBoard\"?(It=[Math.PI/2,0,0],Bt=[et[0],et[1]-m/2-oe,et[2]+he.height/2]):(It=[-Math.PI/2,0,0],Bt=[et[0],et[1]+m/2+oe,et[2]-he.height/2]),Bt=[Bt[0]+(pe?.x??0),Bt[1]+(pe?.y??0),Bt[2]+(pe?.z??0)];const mt=Array.from({length:f},(Ze,dt)=\u003ef===1?0:(dt-(f-1)/2)*ke),st=(m+y)/2,xt=-(m+k)/2,Xe=Sn(Ei,{children:[Q\u0026\u0026De(WX,{points:bt,width:Re,thickness:m,color:_}),Q\u0026\u0026w\u0026\u0026kt\u003euS\u0026\u0026Sn(Ei,{children:[De(WX,{points:pn,width:Re,thickness:k,color:R,normalOffset:xt}),De(WX,{points:be,width:Re,thickness:k,color:R,normalOffset:xt})]}),Q\u0026\u0026S\u0026\u0026Dt\u003euS\u0026\u0026mt.map((Ze,dt)=\u003eSn(Ei,{children:[De(WX,{points:it,width:Ce,thickness:y,color:x,acrossOffset:Ze,normalOffset:st}),De(WX,{points:Yt,width:Ce,thickness:y,color:x,acrossOffset:Ze,normalOffset:st})]},`conductor:${dt}`)),d\u0026\u0026De(Uo,{offset:Bt,children:De(Ac,{rotation:ye??It,children:De(Xsn,{width:he.width,height:he.height,thickness:a,bezelInset:A,bezelDepth:c,screenWidth:l,screenHeight:u,screenColor:g,bezelColor:h})})})]});return De(Uo,{offset:{x:ve?.x??0,y:ve?.y??0,z:ve?.z??0},children:De(Uo,{offset:At,children:De(Ac,{rotation:Me,children:De(Uo,{offset:[-At[0],-At[1],-At[2]],children:Xe})})})})},o3i=({footprint:t})=\u003e{const e=ZVe.string(t.split(\"_\",1)[0]).params().fn;if(ZVe.getModelNames().includes(e)){const A=ZVe.string(t).json();if(A.fn===\"flexscreen\"){const{fn:c,...l}=A;return De(n3i,{...l})}}let n=t;if(t.startsWith(\"jstzh1_5mm\")){const A=t.match(/jstzh1_5mm(\\d+)?/);n=`zh${A\u0026\u0026A[1]?A[1]:\"7\"}`}else if(t.startsWith(\"jstph2_0mm\")){const A=t.match(/jstph2_0mm(\\d+)?/);n=`jst${A\u0026\u0026A[1]?A[1]:\"2\"}_ph`}else if(t.startsWith(\"jstxh2_5mm\")){const A=t.match(/jstxh2_5mm(\\d+)?/);n=`jst${A\u0026\u0026A[1]?A[1]:\"2\"}_xh`}const o=pI.string(n).json(),i=t.match(/_color\\(([^)]+)\\)/),r=i?i[1]:void 0,s=(A,c)=\u003e{if(A==null)return c;const l=Ua(A);return Number.isFinite(l)?l:c},a=n2i(o);if(a)return a;switch(o.fn){case\"crystal\":return De(bxi,{horizontalPadPitch:o.px,verticalPadPitch:o.py,padWidth:o.pw,padHeight:o.ph});case\"dip\":return De(a2i,{numPins:o.num_pins,pitch:o.p,bodyWidth:o.w});case\"axial\":return De(pxi,{pitch:o.p});case\"tssop\":return De(l2i,{pinCount:o.num_pins,leadLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w});case\"msop\":return De(g2i,{pinCount:o.num_pins,padContactLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w});case\"vssop\":return De(F2i,{pinCount:o.num_pins,leadLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w,bodyLength:o.h});case\"qfp\":return De(Msn,{pinCount:o.num_pins,pitch:o.p,leadWidth:o.pw,padContactLength:o.pl,bodyWidth:o.w});case\"tqfp\":return De(W2i,{});case\"lqfp\":return De(X2i,{pinCount:o.num_pins});case\"qfn\":{const A=typeof o.thermalpad?.x==\"number\"\u0026\u0026typeof o.thermalpad?.y==\"number\";return De(Rsn,{num_pins:o.num_pins,bodyWidth:o.w,bodyLength:o.h,pitch:o.p,padLength:o.pl,padWidth:o.pw,thermalPadSize:A?{width:o.thermalpad.x,length:o.thermalpad.y}:void 0})}case\"dfn\":{const A=typeof o.thermalpad?.x==\"number\"\u0026\u0026typeof o.thermalpad?.y==\"number\";return De(Jsn,{num_pins:o.num_pins,bodyWidth:o.w,bodyLength:o.h,pitch:o.p,padLength:o.pl,padWidth:o.pw,thermalPadSize:A?{width:o.thermalpad.x,length:o.thermalpad.y}:void 0})}case\"pinrow\":{const A=t.match(/_rows(\\d+)/),c=A\u0026\u0026A[1]?parseInt(A[1],10):1;if(o.male)return De(Nsn,{numberOfPins:o.num_pins,pitch:o.p,invert:o.invert,rows:c,smd:o.smd||o.surface_mount,rightangle:o.rightangle});if(o.female)return De(N2i,{numberOfPins:o.num_pins,pitch:o.p,rows:c})}case\"smdpinheader\":return De(Mxi,{numberOfPins:o.num_pins,pitch:o.p,bodyWidth:o.bh});case\"led5050\":return De(Rxi,{color:r});case\"cap\":{switch(o.imperial){case\"0402\":return De(vsn,{color:\"#856c4d\"});case\"0603\":return De(wsn,{color:\"#856c4d\"});case\"0805\":return De(Psn,{color:\"#856c4d\"});case\"0201\":return De(ksn,{color:\"#856c4d\"});case\"01005\":return De(Fsn,{color:\"#856c4d\"});case\"1206\":return De(Lsn,{color:\"#856c4d\"});case\"1210\":return De(Hsn,{color:\"#856c4d\"});case\"2010\":return De(Osn,{color:\"#856c4d\"});case\"2512\":return De(Gsn,{color:\"#856c4d\"})}break}case\"sot23\":switch(o.num_pins){case 3:return De(b2i,{color:r});case 5:return De(Tsn,{})}break;case\"sot25\":return De(Tsn,{});case\"sot\":case\"sot343\":{const A=o.fn===\"sot343\";return De(Dxi,{pads:nan(n),bodyWidth:A?1.25:1.6,bodyLength:A?2:2.9,bodyHeight:A?1.1:1.3})}case\"sot563\":return De(Yxi,{});case\"sot89\":{const A=s(o.w,4.2);return De(zsn,{fullWidth:A,bodyWidth:A*.6,bodyLength:s(o.h,4.8)*.94,bodyHeight:1.5,leadWidth:s(o.pw,.48),tabLeadWidth:s(o.pw,.48)*2,padPitch:s(o.p,1.5),leadHeight:.66})}case\"sot457\":return De(sxi,{});case\"smdslideswitch\":return De(Gxi,{footprint:n});case\"usbcmidmount\":return De(Kxi,{footprint:n});case\"sot143\":return De(Vxi,{footprint:n});case\"sot223\":return De(zsn,{});case\"sot23w\":return De(S2i,{});case\"sot323\":return De(j2i,{});case\"sod323f\":return De(dxi,{});case\"sod323fl\":return De(hxi,{});case\"sot363\":return De(uxi,{});case\"sot886\":return De(gxi,{});case\"sot963\":return De(axi,{});case\"pushbutton\":return De(R2i,{width:o.w,length:o.h,innerDiameter:o.id});case\"jst\":if(Zsn(n))return De(Exi,{footprint:n});if(o.zh)return De(Cxi,{numPins:o.num_pins});if(o.ph)return De(yxi,{numPins:o.num_pins});if(o.xh)return De(xxi,{numPins:o.num_pins});break;case\"fpc\":return De(Pxi,{pinCount:o.num_pins,pitch:o.p,padWidth:o.pw,padLength:o.pl,staggered:o.staggered,reverse:o.reverse,rowPitch:o.py,topPadLength:o.toppl,bottomPadLength:o.bottompl,mountPadPitchX:o.mpx,mountPadOffsetY:o.mpy,mountTop:o.mounttop,mountPadWidth:o.mpw,mountPadLength:o.mpl});case\"rj45\":return De(kxi,{bodyWidth:o.w,bodyDepth:o.h,bodyCenterY:o.bodyy,ledPins:o.ledpins||o.num_pins===14,firstPinLeft:o.firstpinleft,firstPinTop:o.firstpintop,signalPitch:o.p,signalRowPitch:o.py,signalHoleDiameter:o.id,shieldPinX:o.shieldx,shieldPinY:o.shieldy,shieldHoleDiameter:o.shieldid,locatorHoleX:o.holex,locatorHoleY:o.holey,locatorHoleDiameter:o.holed,ledPinX:o.ledx,ledPinPitch:o.ledp,ledPinY:o.ledy});case\"soic\":case\"sop8\":case\"ssop\":return De(k2i,{pinCount:o.num_pins,leadLength:o.pl,leadWidth:o.pw,pitch:o.p,bodyWidth:o.w});case\"son\":case\"wson\":case\"vson\":{const A=o.fn===\"vson\"?s(o.grid?.x,3):s(o.w,3),c=o.fn===\"vson\"?s(o.grid?.y,3):s(o.h,3),l=s(o.epw,0),u=s(o.eph,0),g=o.pl!==void 0?s(o.pl,0):void 0,h=o.pw!==void 0?s(o.pw,0):void 0,d=nan(n).filter(f=\u003eNumber(f.pin??0)\u003c=o.num_pins),p=f=\u003enew Set(f.map(I=\u003eI.toFixed(3))).size,m=d.length\u003e2\u0026\u0026p(d.map(f=\u003ef.y))===2\u0026\u0026p(d.map(f=\u003ef.x))\u003e2,_=De(Jsn,{num_pins:o.num_pins,bodyWidth:m?c:A,bodyLength:m?A:c,pitch:s(o.p,.5),padLength:g,padWidth:h,thermalPadSize:o.ep\u0026\u0026l\u003e0\u0026\u0026u\u003e0?{width:m?u:l,length:m?l:u}:void 0});return m?De(Ac,{rotation:[0,0,\"90deg\"],children:_}):_}case\"mlp\":case\"lga\":case\"quad\":return o.legsoutside?De(Msn,{pinCount:o.num_pins,pitch:s(o.p,.5),leadWidth:s(o.pw,.25),padContactLength:s(o.pl,.25),bodyWidth:s(o.w,6)}):De(Rsn,{num_pins:o.num_pins,bodyWidth:s(o.w,6),bodyLength:s(o.h,6),pitch:s(o.p,.5),padLength:s(o.pl,.25),padWidth:s(o.pw,.25)});case\"bga\":{const A=s(o.p,.8),c=o.grid?.x??8,l=o.grid?.y??8;return De(Uxi,{ballPitch:A,ballColumns:c,ballRows:l,ballDiameter:A*.625,packageWidth:c*A,packageLength:l*A})}case\"sod523\":return De(L2i,{});case\"sod723\":return De(Ixi,{});case\"sod882\":return De(Usn,{});case\"sma\":return De(H2i,{});case\"smb\":return De(Ksn,{});case\"smc\":return De(O2i,{});case\"smf\":return De(G2i,{});case\"sod123\":return De(K2i,{});case\"sod123f\":return De(Y2i,{});case\"sod123fl\":return De(U2i,{});case\"sod123w\":return De(Vsn,{});case\"sod110\":return De(Vsn,{bodyWidth:2.1,bodyLength:1.4});case\"sod128\":return De(V2i,{});case\"sod323\":return De(qsn,{});case\"sod323w\":return De(qsn,{});case\"sod80\":return De(Wsn,{});case\"sod882d\":return De(Usn,{});case\"smbf\":return De(Ksn,{});case\"led2835\":return De(Txi,{color:r,bodyWidth:s(o.w,3.5),bodyLength:s(o.h,2.8),pad1X:s(o.p1x,-.9),pad1Width:s(o.p1w,2.2),pad2X:s(o.p2x,1.375),pad2Width:s(o.p2w,1.25),padLength:s(o.ph,2.2)});case\"electrolytic\":case\"radial\":{const A=s(o.p,2.5),c=t.match(/_d([\\d.]+)/),l=o.d!==void 0?s(o.d,A*2):c?Number(c[1]):A*2;return De(Lxi,{diameter:l,leadPitch:A})}case\"potentiometer\":return De(Hxi,{bodyWidth:s(o.w,5.35),bodyLength:s(o.ca,14),bodyHeight:s(o.h,4),leads:JX(n)});case\"smdpushbutton\":return De(Oxi,{padSpanX:s(o.px,4.2),padSpanY:s(o.py,2.15),padWidth:s(o.pw,1.05),padLength:s(o.ph,.7)});case\"breakoutheaders\":{const A=s(o.p,2.54),c=s(o.w,10)/2,l=[{x:-c,pins:o.left??0,key:\"left\"},{x:c,pins:o.right??0,key:\"right\"}];return De(Ei,{children:l.filter(({pins:u})=\u003eu\u003e0).map(({x:u,pins:g,key:h})=\u003eDe(Uo,{center:[u,0,0],children:De(Ac,{rotation:[0,0,\"90deg\"],children:De(Nsn,{numberOfPins:g,pitch:A})})},h))})}case\"sod923\":return De(z2i,{});case\"hc49\":return De(exi,{});case\"micromelf\":return De(txi,{});case\"minimelf\":return De(Wsn,{});case\"melf\":return De(nxi,{});case\"ms012\":return De(oxi,{pinCount:o.num_pins,padContactLength:o.pl,leadWidth:o.pw,pitch:o.p});case\"ms013\":return De(ixi,{pinCount:o.num_pins,padContactLength:o.pl,leadWidth:o.pw,pitch:o.p});case\"sot723\":return De(Z2i,{});case\"to220\":return De(jsn,{leads:JX(n)});case\"to220f\":return De(jsn,{mouldedTab:!0,leads:JX(n)});case\"to92\":return De($sn,{leads:JX(n)});case\"to92l\":case\"to92s\":{const A=s(o.w,4.8),c=s(o.h,4),l=Math.max(A,c);return De($sn,{bodyDiameter:l,flatCut:Math.max(l-Math.min(A,c),.4),leads:JX(n)})}case\"to252\":case\"dpak\":case\"to263\":case\"d2pak\":{const A=o.fn===\"to263\"||o.fn===\"d2pak\",c=s(o.tabw,A?8.38:6.2),l=Math.min(s(o.tabh,A?10:5.8),A?10:6.5);return De(Fxi,{bodyWidth:c,bodyLength:s(o.w,A?10.1:6.6),bodyHeight:A?4.4:2.3,tabWidth:c,tabLength:l,span:s(o.span,A?10.21:6.85),pitch:s(o.p,A?2.54:2.29),leadWidth:s(o.pw,1.5),leadContactLength:s(o.pl,3)})}case\"stampboard\":case\"stampreceiver\":return De(mxi,{bodyWidth:o.w,leadsLeft:o.left,leadsRight:o.right,leadsTop:o.top,leadsBottom:o.bottom,leadsPitch:o.p,leadWidth:o.pw,leadLength:o.pl,innerHoles:o.innerhole,innerHoleEdgeDistance:o.innerholeedgedistance});case\"mountedpcbmodule\":{const A=o.rows??1,c=o.pinRowSide??\"left\",l=o.holeInset,u=o.width,g=o.height,h=o.pinrow,d=o.pinRowHoleEdgeToEdgeDist,p=Array.isArray(o.holes)?o.holes:[];return De(_xi,{numPins:h,rows:A,p:o.p,id:o.id,od:o.od,width:u,height:g,pinRowSide:c,holes:p,holeInset:l,pinRowHoleEdgeToEdgeDist:d,nopin:o.nopin,female:o.female,screen:o.screen,screenWidth:o.screenwidth,screenHeight:o.screenheight,screenCenterOffsetX:o.screencenteroffsetx,screenCenterOffsetY:o.screencenteroffsety})}}switch(o.imperial){case\"0402\":return De(vsn,{color:r});case\"0603\":return De(wsn,{color:r});case\"0805\":return De(Psn,{color:r});case\"0201\":return De(ksn,{color:r});case\"01005\":return De(Fsn,{color:r});case\"1206\":return De(Lsn,{color:r});case\"1210\":return De(Hsn,{color:r});case\"2010\":return De(Osn,{color:r});case\"2512\":return De(Gsn,{color:r})}if((o.fn===\"res\"||o.fn===\"cap\")\u0026\u0026o.p!==void 0\u0026\u0026o.ph!==void 0){const A=Ua(o.p),c=Ua(o.ph);if(Number.isFinite(A)\u0026\u0026Number.isFinite(c))return De(Nxi,{padPitch:A,padHeight:c,color:r??(o.fn===\"cap\"?\"#856c4d\":void 0)})}return null},i3i=t=\u003et\u0026\u0026typeof t==\"object\"\u0026\u0026\"type\"in t,WY=t=\u003e{if(typeof t==\"number\")return t;if(typeof t==\"string\"){const e=/^(-?\\d+(?:\\.\\d+)?)\\s*deg$/i.exec(t);if(e)return parseFloat(e[1])*Math.PI/180;const n=Number(t);if(!Number.isNaN(n))return n}return 0},r3i=t=\u003eArray.isArray(t)?[Number(t[0])||0,Number(t[1])||0,Number(t[2])||0]:typeof t==\"object\"\u0026\u0026t?[Number(t.x)||0,Number(t.y)||0,Number(t.z)||0]:[0,0,0];function P6(t,e,n){const{jscad:{primitives:o,booleans:i,hulls:r,geometries:s,extrusions:a,transforms:A}}=n;if(t==null||t===!1)return[];if(Array.isArray(t))return t.flatMap(g=\u003eP6(g,e,n));if(!i3i(t))return[];const{type:c,props:l,children:u}=t;if(c===bsn)return(u??[]).flatMap(g=\u003eP6(g,e,n));if(c===qo){const g=l?.color;return(u??[]).flatMap(h=\u003eP6(h,g??e,n))}if(c===Uo){const g=r3i(l?.offset??l?.center??{x:l?.x,y:l?.y,z:l?.z});return(u??[]).flatMap(d=\u003eP6(d,e,n)).map(({geom:d,color:p})=\u003e({geom:A.translate(g,d),color:p??e}))}if(c===Ac){const g=l?.angles??l?.rotation,h=Array.isArray(g)?[WY(g[0]),WY(g[1]),WY(g[2])]:[WY(l?.x??0),WY(l?.y??0),WY(l?.z??0)];return(u??[]).flatMap(p=\u003eP6(p,e,n)).map(({geom:p,color:m})=\u003e({geom:A.rotateZ(h[2],A.rotateY(h[1],A.rotateX(h[0],p))),color:m}))}if(c===gh||c===e0||c===ZA){const g=(u??[]).flatMap(d=\u003eP6(d,e,n)).map(d=\u003ed.geom);if(g.length===0)return[];let h;return c===gh?h=i.union(g):c===e0?h=i.subtract(g[0],g.slice(1)):h=r.hull(g),[{geom:h,color:e}]}if(c===kY){const g=l?.points??[];return[{geom:s.geom2.fromPoints(g),color:e??l?.color}]}if(c===FY){const g=(u??[]).flatMap(m=\u003eP6(m,e,n)).map(m=\u003em.geom);if(g.length===0)return[];const h=g.length\u003e1?i.union(g):g[0],d=l?.height??l?.h??1;let p=a.extrudeLinear({height:d},h);if(p.polygons)for(const m of p.polygons)!m.plane||!m.vertices||m.vertices.length\u003c3||m.vertices.reverse();return[{geom:p,color:e??l?.color}]}if(c===$t||c===Ssn||c===Ns||c===TY||c===A1||c===a2){let g;if(c===$t){const h=l?.size??[1,1,1],d=l?.offset,p=l?.center??(d?[d[0],d[1],d[2]]:[0,0,0]);g=o.cuboid({size:h,center:p})}else if(c===Ssn){const h=l?.size??1,d=l?.offset,p=l?.center??(d?[d[0],d[1],d[2]]:[0,0,0]);g=o.cube({size:h,center:p})}else if(c===Ns){const h=l?.height??1,d=l?.radius??1,p=l?.center??[0,0,0];g=o.cylinder({height:h,radius:d,center:p})}else if(c===TY){const h=l?.radius??1,d=l?.center??[0,0,0];g=o.sphere({radius:h,center:d})}else if(c===a2){const h=l?.height??1,d=l?.radius??1,p=l?.roundRadius??.1,m=l?.center??[0,0,0];g=o.roundedCylinder({height:h,radius:d,roundRadius:p,center:m})}else{const h=l?.size??[1,1,1],d=l?.roundRadius??.1,p=l?.center??[0,0,0];g=o.roundedCuboid({size:h,roundRadius:d,center:p})}return[{geom:g,color:e??l?.color}]}if(typeof c==\"function\"){const g=c(l??{});return P6(g,e,n)}return(u??[]).flatMap(g=\u003eP6(g,e,n))}function s3i(t,e){return{geometries:P6(t,void 0,{jscad:e})}}function aan(t){if(t.polygons){const e=[],n=[],o=[];let i=0;for(const s of t.polygons){for(const A of s.vertices)A.index=i,e.push(A[0],A[1],A[2]),t.color\u0026\u0026t.color.length\u003e=3?o.push(t.color[0],t.color[1],t.color[2]):o.push(1,1,1),i++;const a=s.vertices[0].index;for(let A=2;A\u003cs.vertices.length;A++){const c=s.vertices[A-1].index,l=s.vertices[A].index;n.push(a,c,l)}}const r=new Zl;if(r.setAttribute(\"position\",new tg(new Float32Array(e),3)),r.setIndex(n),o.length\u003e0\u0026\u0026r.setAttribute(\"color\",new tg(new Float32Array(o),3)),t.transforms){const s=new va;s.fromArray(t.transforms),r.applyMatrix4(s)}return r.computeVertexNormals(),r}if(t.sides){const e=[],n=[];for(const i of t.sides)e.push(i[0][0],i[0][1],0),t.color\u0026\u0026t.color.length\u003e=3?n.push(t.color[0],t.color[1],t.color[2]):n.push(1,1,1);const o=new Zl;if(o.setAttribute(\"position\",new tg(new Float32Array(e),3)),n.length\u003e0\u0026\u0026o.setAttribute(\"color\",new tg(new Float32Array(n),3)),t.transforms){const i=new va;i.fromArray(t.transforms),o.applyMatrix4(i)}return o}return console.error(\"Invalid CSG object: neither polygons nor sides found\"),new Zl}function a3i(t,e){const n=eze(o3i,{footprint:t});return s3i(n,e)}var A3i=_0(Ape()),Aan=ee.createContext(null),c3i=()=\u003e{const t=ee.useContext(Aan);if(!t)throw new Error(\"useHover must be used within a HoverProvider\");return t},l3i=({children:t})=\u003e{const{camera:e,renderer:n}=uf(),[o,i]=ee.useState([]),r=ee.useMemo(()=\u003enew uJt,[]),s=ee.useMemo(()=\u003enew ni,[]),a=ee.useRef(o);a.current=o;const A=ee.useRef(null),c=ee.useCallback(d=\u003e{i(p=\u003e[...p,d])},[]),l=ee.useCallback(d=\u003e{if(A.current){let p=!1,m=A.current.object;for(;m;){if(m===d){p=!0;break}m=m.parent}p\u0026\u0026(A.current.onUnhover(),A.current=null)}i(p=\u003ep.filter(m=\u003em.object!==d))},[]),u=ee.useCallback(d=\u003e{let p=d;for(;p;){const m=a.current.find(_=\u003e_.object===p);if(m)return m;p=p.parent}},[]),g=ee.useCallback(d=\u003e{if(!n.domElement)return;const p=n.domElement.getBoundingClientRect();s.x=(d.clientX-p.left)/p.width*2-1,s.y=-((d.clientY-p.top)/p.height)*2+1,r.setFromCamera(s,e);const m=a.current.map(f=\u003ef.object);if(m.length===0){A.current\u0026\u0026(A.current.onUnhover(),A.current=null);return}const _=r.intersectObjects(m,!0);if(_.length\u003e0){const f=_[0],I=u(f.object);if(I){const C={mousePosition:[f.point.x,f.point.y,f.point.z]};A.current!==I?(A.current?.onUnhover(),I.onHover(C),A.current=I):I.onHover(C)}else A.current\u0026\u0026(A.current.onUnhover(),A.current=null)}else A.current\u0026\u0026(A.current.onUnhover(),A.current=null)},[e,n,r,s,u]);ee.useEffect(()=\u003e{const d=n.domElement;return d.addEventListener(\"mousemove\",g),()=\u003e{d.removeEventListener(\"mousemove\",g)}},[n,g]);const h=ee.useMemo(()=\u003e({addHoverable:c,removeHoverable:l}),[c,l]);return K.jsx(Aan.Provider,{value:h,children:t})},u3i=({children:t,object:e,onHover:n,onUnhover:o,isHovered:i})=\u003e{const{addHoverable:r,removeHoverable:s}=c3i();return ee.useEffect(()=\u003ee?(r({object:e,onHover:n,onUnhover:o}),()=\u003e{s(e)}):void 0,[e,n,o,r,s]),K.jsx(K.Fragment,{children:t})},jX=u3i,p4=(t,{castShadow:e=!0,receiveShadow:n=!0}={})=\u003e{t.traverse(o=\u003e{o instanceof Er\u0026\u0026(o.castShadow=e,o.receiveShadow=n)})},g3i=({positionOffset:t,footprint:e,rotationOffset:n,onHover:o,onUnhover:i,isHovered:r,scale:s,isTranslucent:a=!1})=\u003e{const{rootObject:A}=uf(),c=ee.useMemo(()=\u003e{if(!e)return null;const{geometries:l}=a3i(e,A3i),u=new lh;for(const g of l.flat(1/0)){const h=g.geom;if(!h||!h.polygons\u0026\u0026!h.sides)continue;const d=new Vi(g.color);d.convertLinearToSRGB();const p={...h,color:[d.r,d.g,d.b]},m=aan(p),_=new su({vertexColors:!0,side:r_,transparent:a,opacity:a?.5:1,depthWrite:!a}),f=new Er(m,_);f.renderOrder=a?2:1,p4(f,{castShadow:!a,receiveShadow:!0}),u.add(f)}return u},[e,a]);return ee.useEffect(()=\u003e{if(!(!c||!A))return A.add(c),()=\u003e{A.remove(c)}},[A,c]),ee.useEffect(()=\u003e{c\u0026\u0026(t\u0026\u0026c.position.fromArray(t),n\u0026\u0026c.rotation.fromArray(n),s!==void 0\u0026\u0026c.scale.setScalar(s))},[c,t?.[0],t?.[1],t?.[2],n?.[0],n?.[1],n?.[2],s]),ee.useEffect(()=\u003e{c\u0026\u0026c.traverse(l=\u003e{l instanceof Er\u0026\u0026l.material instanceof su\u0026\u0026(r?(l.material.emissive.setHex(255),l.material.emissiveIntensity=.2):l.material.emissiveIntensity=0)})},[r,c]),c?K.jsx(jX,{isHovered:r,onHover:o,onUnhover:i,object:c}):null},can=new WeakMap,d3i=()=\u003e{const t=new Hg;return t.name=\"fallback-environment-map\",t.mapping=fde,t},h3i=t=\u003e{if(!t)return null;const e=t,n=can.get(e);if(n)return n;let o;if(t instanceof $de){const i=new DTe(t);o=i.fromScene(Pni(),.04).texture,i.dispose()}else o=d3i();return can.set(e,o),o};function p3i(t){const e=new e2;let n=!1;t.updateWorldMatrix(!0,!1);const o=t.parent?t.parent.matrixWorld.clone().invert():new va;return t.traverse(i=\u003e{if(i.updateWorldMatrix(!0,!1),i instanceof Er\u0026\u0026i.geometry\u0026\u0026(i.geometry.boundingBox||i.geometry.computeBoundingBox(),i.geometry.boundingBox)){const r=o.clone().multiply(i.matrixWorld),s=i.geometry.boundingBox.clone();s.applyMatrix4(r),n?e.union(s):(e.copy(s),n=!0)}}),n?e:null}function m3i(t){const e=p3i(t);return e?e.getSize(new jt):new jt}function _3i(t,e,n=\"contain_within_bounds\"){if(!e)return[1,1,1];const o=m3i(t),i=[o.x\u003e0?e[0]/o.x:1,o.y\u003e0?e[1]/o.y:1,o.z\u003e0?e[2]/o.z:1];if(n===\"fill_bounds\")return i;const r=Math.min(...i);return[r,r,r]}var Bze=({model:t,position:e,rotation:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a=\"contain_within_bounds\",scale:A})=\u003e{const{rootObject:c}=uf(),l=ee.useMemo(()=\u003enew lh,[]),u=ee.useMemo(()=\u003enew lh,[]),g=ee.useMemo(()=\u003enew lh,[]),h=ee.useMemo(()=\u003enew lh,[]);return ee.useEffect(()=\u003e(l.add(u),()=\u003e{l.remove(u)}),[l,u]),ee.useEffect(()=\u003e(u.add(g),()=\u003e{u.remove(g)}),[u,g]),ee.useEffect(()=\u003e(g.add(h),()=\u003e{g.remove(h)}),[g,h]),ee.useEffect(()=\u003e{for(;h.children.length\u003e0;){const d=h.children[0];if(!d)break;h.remove(d)}t\u0026\u0026h.add(t)},[h,t]),ee.useEffect(()=\u003e{if(!r){h.matrixAutoUpdate=!0,h.position.set(0,0,0),h.rotation.set(0,0,0),h.scale.set(1,1,1),h.updateMatrix();return}h.matrixAutoUpdate=!1,h.matrix.copy(r),h.matrixWorldNeedsUpdate=!0},[h,r]),ee.useEffect(()=\u003e{if(c)return c.add(l),()=\u003e{c.remove(l)}},[c,l]),ee.useEffect(()=\u003e{if(e?l.position.fromArray(e):l.position.set(0,0,0),n?l.rotation.fromArray(n):l.rotation.set(0,0,0),g.position.fromArray(o),g.rotation.fromArray(i),g.scale.setScalar(A??1),!t){u.scale.set(1,1,1);return}u.scale.set(1,1,1),u.updateWorldMatrix(!0,!0);const d=_3i(g,s,a);u.scale.set(d[0],d[1],d[2])},[l,u,t,a,o,h,g,i,s,e,n,A]),{boardTransformGroup:l}},lan=1.25;function uan({gltfUrl:t,position:e,rotation:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a=\"contain_within_bounds\",onHover:A,onUnhover:c,isHovered:l,scale:u,isTranslucent:g=!1}){const{renderer:h}=uf(),[d,p]=ee.useState(null),[m,_]=ee.useState(null),{boardTransformGroup:f}=Bze({model:d,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:u});if(ee.useEffect(()=\u003e{if(!t)return;const I=new Dni;let C=!0;return I.load(t,y=\u003e{if(!C)return;const x=y.scene;x.traverse(E=\u003e{if(E instanceof Er\u0026\u0026E.material){const B=S=\u003e{S.transparent=g,S.opacity=g?.5:1,S.depthWrite=!g,S.needsUpdate=!0};Array.isArray(E.material)?E.material.forEach(B):B(E.material),E.renderOrder=g?2:1}}),p4(x,{castShadow:!g,receiveShadow:!0}),p(x)},void 0,y=\u003e{if(!C)return;console.error(`An error happened loading ${t}`,y);const x=y instanceof Error?y:new Error(`Failed to load glTF model from ${t}`);_(x)}),()=\u003e{C=!1}},[t,g]),ee.useEffect(()=\u003e{if(!d||!h)return;const I=h3i(h);if(!I)return;const C=[],y=x=\u003e{x instanceof su\u0026\u0026(C.push({material:x,envMap:x.envMap??null,envMapIntensity:x.envMapIntensity??1}),x.envMap=I,(typeof x.envMapIntensity!=\"number\"||x.envMapIntensity\u003clan)\u0026\u0026(x.envMapIntensity=lan),x.needsUpdate=!0)};return d.traverse(x=\u003e{if(!(x instanceof Er))return;const E=x.material;Array.isArray(E)?E.forEach(y):E\u0026\u0026y(E)}),()=\u003e{C.forEach(({material:x,envMap:E,envMapIntensity:B})=\u003e{x.envMap=E,x.envMapIntensity=B,x.needsUpdate=!0})}},[d,h]),ee.useEffect(()=\u003e{d\u0026\u0026d.traverse(I=\u003e{if(!(I instanceof Er))return;const C=Array.isArray(I.material)?I.material:[I.material];for(const y of C)y instanceof su\u0026\u0026(l?(y.emissive.setHex(255),y.emissiveIntensity=.2):y.emissiveIntensity=0)})},[l,d]),m)throw m;return d?K.jsx(jX,{isHovered:l,onHover:A,onUnhover:c,object:f}):null}var f3i=_0(Brn()),I3i=_0(Ape()),C3i=({jscadPlan:t,positionOffset:e,rotationOffset:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a=\"contain_within_bounds\",onHover:A,onUnhover:c,isHovered:l,scale:u,isTranslucent:g=!1})=\u003e{const{threeGeom:h,material:d}=ee.useMemo(()=\u003e{const _=(0,f3i.executeJscadOperations)(I3i.default,t);if(!_||!_.polygons\u0026\u0026!_.sides)return{threeGeom:null,material:null};const f=aan(_),I=new su({vertexColors:!0,side:r_,transparent:g,opacity:g?.5:1,depthWrite:!g});return{threeGeom:f,material:I}},[t,g]),p=ee.useMemo(()=\u003e{if(!h)return null;const _=new Er(h,d);return _.renderOrder=g?2:1,p4(_,{castShadow:!g,receiveShadow:!0}),_},[h,d,g]),{boardTransformGroup:m}=Bze({model:p,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:u});return ee.useEffect(()=\u003e{if(d)if(l){const _=new Vi(d.color.getHex());d.emissive.copy(_),d.emissive.setRGB(0,0,1),d.emissiveIntensity=.2}else d.emissiveIntensity=0},[l,d]),h?K.jsx(jX,{isHovered:l,onHover:A,onUnhover:c,object:m}):null};function y3i(t){return t.replace(/(DEF|USE)\\s+([^\\s]+)/g,(e,n,o)=\u003e`${n} ${o.replace(/-/g,\"_\")}`)}async function x3i(t){const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch \"${t}\": ${e.status} ${e.statusText}`);const n=await e.text();return new _oi().parse(y3i(n),t)}typeof window\u003c\"u\"\u0026\u0026!window.TSCIRCUIT_OBJ_LOADER_CACHE\u0026\u0026(window.TSCIRCUIT_OBJ_LOADER_CACHE=new Map);function E3i(t){const[e,n]=ee.useState(null);return ee.useEffect(()=\u003e{if(!t)return;const o=t.replace(/\u0026cachebust_origin=$/,\"\"),i=window.TSCIRCUIT_OBJ_LOADER_CACHE;let r=!1;async function s(){try{if(o.endsWith(\".wrl\"))return await x3i(o);const A=await fetch(o);if(!A.ok)throw new Error(`Failed to fetch \"${o}\": ${A.status} ${A.statusText}`);const c=await A.text(),l=c.match(/newmtl[\\s\\S]*?endmtl/g),u=new Soi;if(l?.length){const g=l.join(`\n`).replace(/^d\\s+0\\./gm,\"d 1.\"),h=c.replace(/newmtl[\\s\\S]*?endmtl/g,\"\").replace(/^mtllib.*/gm,\"\"),d=new hoi;d.setMaterialOptions({invertTrProperty:!0});const p=d.parse(g,\"embedded.mtl\");return u.setMaterials(p),u.parse(h)}return u.parse(c.replace(/^mtllib.*/gm,\"\"))}catch(A){return A}}function a(){if(i.has(o)){const c=i.get(o);return c.result?Promise.resolve(c.result.clone()):c.promise.then(l=\u003el instanceof Error?l:l.clone())}const A=s().then(c=\u003e(c instanceof Error||i.set(o,{...i.get(o),result:c}),c));return i.set(o,{promise:A,result:null}),A}return a().then(A=\u003e{r||n(A)}).catch(A=\u003e{console.error(A)}),()=\u003e{r=!0}},[t]),e}function B3i({url:t,position:e,rotation:n,modelOffset:o=[0,0,0],modelRotation:i=[0,0,0],sourceCoordinateTransform:r,modelSize:s,modelFitMode:a=\"contain_within_bounds\",onHover:A,onUnhover:c,isHovered:l,scale:u,isTranslucent:g=!1}){const h=E3i(t),d=ee.useMemo(()=\u003e{if(h\u0026\u0026!(h instanceof Error))return h.traverse(_=\u003e{if(_ instanceof Er\u0026\u0026_.material){const f=I=\u003e{I.transparent=g,I.opacity=g?.5:1,I.depthWrite=!g,I.needsUpdate=!0};Array.isArray(_.material)?_.material.forEach(f):f(_.material),_.renderOrder=g?2:1}}),p4(h,{castShadow:!g,receiveShadow:!0}),h;const m=new Er(new Yx(.5,.5,.5),new su({transparent:!0,color:\"red\",opacity:.25}));return p4(m,{castShadow:!1,receiveShadow:!0}),m},[h,g]),{boardTransformGroup:p}=Bze({model:d,position:Array.isArray(e)?e:e?[e.x,e.y,e.z]:void 0,rotation:Array.isArray(n)?n:n?[n.x,n.y,n.z]:void 0,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:u});if(h instanceof Error)throw h;return K.jsx(jX,{isHovered:l,onHover:A,onUnhover:c,object:p})}var b3i=new Vi(.82,.82,.82),gan=t=\u003enew su({color:t?new Vi(t[0],t[1],t[2]):b3i});function S3i(t,e){const n=gan(e.color),o=e.brep_faces??[];if(o.length===0)return[n];const i=o.length\u003e1?[...o].sort((u,g)=\u003eu.first-g.first):o,r=[n],s=new Map,a=e.index.array.length/3;let A=0,c=0;const l=u=\u003e{if(!u)return 0;const g=u.join(\",\"),h=s.get(g);if(h!==void 0)return h;const d=r.length;return r.push(gan(u)),s.set(g,d),d};for(;A\u003ca;){const u=i[c];let g=a,h=0;u\u0026\u0026(A\u003cu.first?g=u.first:(g=u.last+1,h=l(u.color),c+=1)),g\u003eA\u0026\u0026t.addGroup(A*3,(g-A)*3,h),A=g}return r}function Q3i(t){const e=new lh;for(const n of t){const o=n.attributes.position?.array??[],i=n.index?.array??[];if(!o.length||!i.length)continue;const r=new Zl;r.setAttribute(\"position\",new Bs(o,3));const s=n.attributes.normal?.array??[];s.length?r.setAttribute(\"normal\",new Bs(s,3)):r.computeVertexNormals(),r.setIndex(i),r.clearGroups();const a=S3i(r,n),A=new Er(r,a.length\u003e1?a:a[0]);A.name=n.name,e.add(A)}return e}var bze,v3i=\"https://cdn.jsdelivr.net/npm/occt-import-js@0.0.23/dist\";function w3i(t){if(typeof t==\"function\")return t;if(t\u0026\u0026typeof t==\"object\"\u0026\u0026\"default\"in t\u0026\u0026typeof t.default==\"function\")return t.default;throw new Error(\"Unable to resolve occt-import-js factory export\")}async function P3i(){if(!bze){const t=await import(\"https://cdn.jsdelivr.net/npm/occt-import-js@0.0.23/+esm\");bze=w3i(t)({locateFile:n=\u003e`${v3i}/${n}`})}return bze}async function M3i(t){const e=await fetch(t);if(!e.ok)throw new Error(`Failed to fetch STEP file: ${e.statusText}`);const n=await e.arrayBuffer(),i=(await P3i()).ReadStepFile(new Uint8Array(n),null);if(!i.success||!i.meshes.length)throw new Error(\"occt-import-js failed to convert STEP file\");const r=Q3i(i.meshes),s=new pke;return await new Promise((A,c)=\u003e{s.parse(r,l=\u003e{l instanceof ArrayBuffer?A(l):c(new Error(\"GLTFExporter did not return binary output\"))},l=\u003e{c(l)},{binary:!0})})}var dan=\"step-glb-cache:v2:\";function D3i(t){const e=new Uint8Array(t),n=32768;let o=\"\";for(let i=0;i\u003ce.length;i+=n){const r=e.subarray(i,i+n);o+=String.fromCharCode(...r)}return btoa(o)}function N3i(t){const e=atob(t),n=new Uint8Array(e.length);for(let o=0;o\u003ce.length;o+=1)n[o]=e.charCodeAt(o);return n.buffer}function R3i(t){try{const e=localStorage.getItem(`${dan}${t}`);return e?N3i(e):null}catch(e){return console.warn(\"Failed to read STEP GLB cache\",e),null}}function han(t,e){try{const n=D3i(e);localStorage.setItem(`${dan}${t}`,n)}catch(n){console.warn(\"Failed to write STEP GLB cache\",n)}}function T3i(){const t=globalThis;return t.stepUrlToGltfModelConversions||(t.stepUrlToGltfModelConversions={inProgress:new Map,completed:new Map}),t.stepUrlToGltfModelConversions}var k3i=({stepUrl:t,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:A,onHover:c,onUnhover:l,isHovered:u,isTranslucent:g})=\u003e{const[h,d]=ee.useState(null);return ee.useEffect(()=\u003e{let p=!0,m=null,_=!0;const f=T3i(),I=R3i(t);if(I){const x={arrayBuffer:I,blobUrl:URL.createObjectURL(new Blob([I],{type:\"model/gltf-binary\"}))};return f.completed.set(t,x),m=x.blobUrl,_=!1,d(x.blobUrl),()=\u003e{p=!1,m\u0026\u0026_\u0026\u0026URL.revokeObjectURL(m)}}const C=f.completed.get(t);if(C)return m=C.blobUrl,_=!1,d(C.blobUrl),han(t,C.arrayBuffer),()=\u003e{p=!1,m\u0026\u0026_\u0026\u0026URL.revokeObjectURL(m)};let y=f.inProgress.get(t);return y||(y=M3i(t).then(x=\u003e{const E={arrayBuffer:x,blobUrl:URL.createObjectURL(new Blob([x],{type:\"model/gltf-binary\"}))};return f.completed.set(t,E),f.inProgress.delete(t),E}).catch(x=\u003e{throw f.inProgress.delete(t),x}),f.inProgress.set(t,y)),y.then(x=\u003e{p\u0026\u0026(m=x.blobUrl,_=!1,d(x.blobUrl),han(t,x.arrayBuffer))}).catch(x=\u003e{console.error(\"Failed to convert STEP file to GLB\",x),p\u0026\u0026d(null)}),()=\u003e{p=!1,m\u0026\u0026_\u0026\u0026URL.revokeObjectURL(m)}},[t]),h?K.jsx(uan,{gltfUrl:h,position:e,rotation:n,modelOffset:o,modelRotation:i,sourceCoordinateTransform:r,modelSize:s,modelFitMode:a,scale:A,onHover:c,onUnhover:l,isHovered:u,isTranslucent:g}):null};function wpe(t,e){let{x:n,y:o,z:i}=t;if(e.axisMapping){const r={x:n,y:o,z:i};e.axisMapping.x\u0026\u0026(n=Sze(r,e.axisMapping.x)),e.axisMapping.y\u0026\u0026(o=Sze(r,e.axisMapping.y)),e.axisMapping.z\u0026\u0026(i=Sze(r,e.axisMapping.z))}if(n*=e.flipX??1,o*=e.flipY??1,i*=e.flipZ??1,e.rotation){if(e.rotation.x){const r=e.rotation.x*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=o*s-i*a,c=o*a+i*s;o=A,i=c}if(e.rotation.y){const r=e.rotation.y*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=n*s+i*a,c=-n*a+i*s;n=A,i=c}if(e.rotation.z){const r=e.rotation.z*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=n*s-o*a,c=n*a+o*s;n=A,o=c}}return{x:n,y:o,z:i}}function Sze(t,e){switch(e){case\"x\":return t.x;case\"y\":return t.y;case\"z\":return t.z;case\"-x\":return-t.x;case\"-y\":return-t.y;case\"-z\":return-t.z;default:return 0}}var Qze={STEP_INVERTED:{axisMapping:{x:\"-x\",y:\"z\",z:\"-y\"}},Z_UP_TO_Y_UP_USB_FIX:{axisMapping:{x:\"x\",y:\"-z\",z:\"y\"},flipZ:-1},FOOTPRINTER_MODEL_TRANSFORM:{axisMapping:{x:\"x\",y:\"-z\",z:\"y\"},flipX:-1,rotation:{x:180,y:180}}};function F3i(t,e){if(e.coordinateTransform)return e.coordinateTransform;if(!e.usingGlbCoordinates){if(e.hasFootprinterModel)return Qze.FOOTPRINTER_MODEL_TRANSFORM;if(!e.usingObjFormat)return e.usingStepFormat?Qze.STEP_INVERTED:Qze.Z_UP_TO_Y_UP_USB_FIX}}function $X(t,e){return F3i(t,{usingGlbCoordinates:e===\"gltf\"||e===\"glb\"||e===\"jscad\",usingObjFormat:e===\"obj\"||e===\"wrl\",usingStepFormat:e===\"step\",hasFootprinterModel:e===\"footprinter\"})}function Ppe(t){if(!t)return;const e=wpe({x:1,y:0,z:0},t),n=wpe({x:0,y:1,z:0},t),o=wpe({x:0,y:0,z:1},t);return new va().makeBasis(new jt(e.x,e.y,e.z),new jt(n.x,n.y,n.z),new jt(o.x,o.y,o.z))}function _P(t){return t*Math.PI/180}function L3i(t){if(t===\"z+\")return[0,0,0];switch(t){case\"x+\":return[0,_P(-90),0];case\"x-\":return[0,_P(90),0];case\"y+\":return[_P(90),0,0];case\"y-\":return[_P(-90),0,0];case\"z-\":return[_P(180),0,0];default:return[0,0,0]}}function H3i(t,e,n){if(!t.position)return;let o=t.position.z;return!t.is_on_folded_board\u0026\u0026t.pcb_component_id\u0026\u0026e===\"bottom\"\u0026\u0026t.position.z\u003e=0\u0026\u0026(o=-(t.position.z+n)),[t.position.x,t.position.y,o]}function O3i(t,e){return t.rotation?[_P(t.rotation.x),_P(t.rotation.y),_P(t.rotation.z)]:e===\"bottom\"?[Math.PI,0,0]:[0,0,0]}function G3i(t,e){const n=new jt(t.x,t.y,t.z),o=new t2(e[0],e[1],e[2],\"XYZ\");return n.applyEuler(o),[n.x,n.y,n.z]}function Y3i(t,e,n){if(!t.model_origin_position)return[0,0,0];const o=e?wpe(t.model_origin_position,e):t.model_origin_position;return G3i(o,n)}function U3i(t,e){const n=H3i(t,e.layer,e.pcbThickness),o=O3i(t,e.layer),i=$X(t,e.modelType),r=L3i(t.model_board_normal_direction??\"z+\"),s=Y3i(t,i,r);return{position:n,rotation:o,modelPosition:[-s[0],-s[1],-s[2]],modelRotation:r,scale:t.model_unit_to_mm_scale_factor??void 0,fitMode:t.model_object_fit??\"contain_within_bounds\",size:t.size?[t.size.x,t.size.y,t.size.z]:void 0}}var K3i=t=\u003et.model_glb_url||t.model_gltf_url?t.model_glb_url?\"glb\":\"gltf\":t.model_obj_url||t.model_wrl_url||t.model_stl_url?t.model_wrl_url?\"wrl\":t.model_stl_url?\"stl\":\"obj\":t.model_jscad?\"jscad\":t.footprinter_string?\"footprinter\":t.model_step_url?\"step\":\"unknown\",V3i=t=\u003et===\"step\"?\"glb\":t,z3i=(t,e)=\u003e{if(!t.pcb_component_id||!t.model_jscad||t.model_origin_alignment!==\"bottom_center_of_component\")return!1;const n=e.find(o=\u003eo.type===\"pcb_component\"\u0026\u0026o.pcb_component_id===t.pcb_component_id);return!!(n\u0026\u0026n.do_not_place\u0026\u0026n.is_allowed_to_be_off_board\u0026\u0026n.obstructs_within_bounds===!1)},J3i=(t,e)=\u003e{if(t)return e?e(t):t},W3i=(...t)=\u003et,vze=class extends Fs.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}render(){return this.state.hasError\u0026\u0026this.state.error?this.props.fallback({error:this.state.error}):this.props.children}},j3i=({error:t,onError:e})=\u003e(ee.useEffect(()=\u003e{e(t)},[t,e]),null),pan=({cad_component:t,circuitJson:e,resolveStaticAsset:n})=\u003e{const o=wrn(e),[i,r]=ee.useState(!1),{visibility:s}=AT(),[a,A]=ee.useState(null),c=ee.useCallback(Y=\u003e{Y?.mousePosition?(r(!0),A(Y.mousePosition)):(r(!1),A(null))},[]),l=ee.useCallback(()=\u003e{r(!1),A(null)},[]),u=ee.useMemo(()=\u003eMr(e).source_component.getUsing({source_component_id:t.source_component_id})?.name,[e,t.source_component_id]),{pcbComponent:g,layer:h,isThroughHole:d}=ee.useMemo(()=\u003emmi(t,e),[t,e]),p=ee.useCallback(Y=\u003eJ3i(Y,n),[n]),m=p(t.model_wrl_url??t.model_stl_url??t.model_obj_url),_=p(t.model_glb_url??t.model_gltf_url),f=p(t.model_step_url),[I,C]=ee.useState(0),[y,x]=ee.useState(null);ee.useEffect(()=\u003e{C(0),x(null)},[t.cad_component_id,m,_,f]);const E=ee.useMemo(()=\u003ez3i(t,e),[t,e]),B=E?s.enclosure===\"translucent\":!!t.show_as_translucent_model,S=K3i(t),Q=V3i(S),w=t.model_glb_url?\"glb\":\"gltf\",M=t.model_wrl_url?\"wrl\":t.model_stl_url?\"stl\":\"obj\",k=ee.useMemo(()=\u003eU3i(t,{layer:h,pcbThickness:o,modelType:Q}),[t,h,o,Q]),R=W3i(...k.rotation),F=k.position,O=ee.useMemo(()=\u003e{const Y=[];return _\u0026\u0026Y.push(K.jsx(uan,{gltfUrl:_,position:F,rotation:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,w)),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},`${t.cad_component_id}-gltf-${_}`)),m\u0026\u0026Y.push(K.jsx(B3i,{url:m,position:F,rotation:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,M)),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},`${t.cad_component_id}-mixed-${m}`)),f\u0026\u0026!t.model_jscad\u0026\u0026!t.footprinter_string\u0026\u0026Y.push(K.jsx(k3i,{stepUrl:f,position:F,rotation:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,Q)),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},`${t.cad_component_id}-step-${f}`)),Y},[F,t.cad_component_id,t.footprinter_string,t.model_jscad,B,_,w,c,l,i,M,k.modelPosition,k.modelRotation,k.scale,k.fitMode,k.size,Q,R,f,m]);let U=null;if(O.length\u003e0){if(I\u003e=O.length){if(y)throw y;return null}U=K.jsx(vze,{fallback:({error:Y})=\u003eK.jsx(j3i,{error:Y,onError:W=\u003e{x(W),C(te=\u003eMath.max(te,I+1))}}),children:O[I]},`${t.cad_component_id}-fallback-${I}`)}else t.model_jscad?U=K.jsx(C3i,{jscadPlan:t.model_jscad,positionOffset:F,rotationOffset:R,modelOffset:k.modelPosition,modelRotation:k.modelRotation,sourceCoordinateTransform:Ppe($X(t,\"jscad\")),scale:k.scale,modelSize:k.size,modelFitMode:k.fitMode,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B},t.cad_component_id):t.footprinter_string\u0026\u0026(U=K.jsx(g3i,{positionOffset:F,rotationOffset:R,footprint:t.footprinter_string,scale:k.scale,onHover:c,onUnhover:l,isHovered:i,isTranslucent:B}));if(E){if(s.enclosure===\"hidden\")return null}else if(t.show_as_translucent_model){if(!s.translucentModels)return null}else if(g\u0026\u0026(d\u0026\u0026!s.throughHoleModels||!d\u0026\u0026!s.smtModels))return null;return K.jsxs(K.Fragment,{children:[K.jsx(gmi,{cadComponent:t,children:U}),i\u0026\u0026a?K.jsx(Prn,{position:a,style:{fontFamily:\"sans-serif\",transform:\"translate3d(1rem, 1rem, 0)\",backgroundColor:\"white\",padding:\"5px\",borderRadius:\"3px\",pointerEvents:\"none\",userSelect:\"none\",WebkitUserSelect:\"none\",MozUserSelect:\"none\",msUserSelect:\"none\"},children:u??\"\u003cunknown\u003e\"}):null]})},man={version:\"0.0.609\"},_an=\"cadViewerLightingEnabled\",$3i=()=\u003etypeof window\u003e\"u\"?!0:window.localStorage.getItem(_an)!==\"false\",fan=ee.createContext(void 0),q3i=({children:t})=\u003e{const[e,n]=ee.useState(!1),[o,i]=ee.useState(!1),[r,s]=ee.useState($3i);ee.useEffect(()=\u003e{window.localStorage.setItem(_an,r?\"true\":\"false\")},[r]);const a=ee.useMemo(()=\u003e({darkBackgroundEnabled:e,setDarkBackgroundEnabled:n,gridEnabled:o,setGridEnabled:i,lightingEnabled:r,setLightingEnabled:s}),[e,o,r]);return K.jsx(fan.Provider,{value:a,children:t})},wze=()=\u003e{const t=ee.useContext(fan);if(!t)throw new Error(\"useAppearance must be used within an AppearanceProvider\");return t},Ian=\"cadViewerCameraStateSession\",Can=(t,e)=\u003e{try{const n={position:t.position.toArray(),quaternion:t.quaternion.toArray(),up:t.up.toArray(),fov:t.fov??50,target:e.target.toArray()};sessionStorage.setItem(Ian,JSON.stringify(n))}catch(n){console.warn(\"Failed to save camera:\",n)}},Pze=(t,e)=\u003e{try{const n=sessionStorage.getItem(Ian);if(!n)return!1;const o=JSON.parse(n);if(t.position.fromArray(o.position),t.quaternion.fromArray(o.quaternion),t.up.fromArray(o.up),\"fov\"in t){const i=t;i.fov=o.fov,i.updateProjectionMatrix?.()}return e.target.fromArray(o.target),e.update(),t.updateMatrixWorld(),!0}catch(n){return console.warn(\"Failed to restore camera:\",n),!1}},yan=ee.createContext(void 0),X3i=({children:t,defaultTarget:e,initialCameraPosition:n,initialCameraType:o})=\u003e{const i=ee.useRef(null),r=ee.useRef(null),[s,a]=ee.useState(null),[A,c]=ee.useState(o??\"perspective\"),[l,u]=ee.useState(n??null),[g,h]=ee.useState(new t2(0,0,0)),d=ee.useMemo(()=\u003e{const[f,I,C]=n??[5,-5,5],y=Math.hypot(f-e.x,I-e.y,C-e.z);return y\u003e0?y:5},[n,e]),p=ee.useCallback(f=\u003e{const I=[e.x,e.y,e.z],C=r.current,y=i.current;let x=d;switch(C\u0026\u0026y\u0026\u0026(x=C.position.distanceTo(y.target)),f){case\"Top Center Angled\":{const E=x/Math.sqrt(2);return{position:[e.x,e.y-E,e.z+E],target:I,up:[0,0,1]}}case\"Top Down\":return{position:[e.x,e.y,e.z+x],target:I,up:[0,0,1]};case\"Top Left Corner\":return{position:[e.x-x*.6,e.y-x*.6,e.z+x*.6],target:I,up:[0,0,1]};case\"Top Right Corner\":return{position:[e.x+x*.6,e.y-x*.6,e.z+x*.6],target:I,up:[0,0,1]};case\"Left Sideview\":return{position:[e.x-x,e.y,e.z],target:I,up:[0,0,1]};case\"Right Sideview\":return{position:[e.x+x,e.y,e.z],target:I,up:[0,0,1]};case\"Front\":return{position:[e.x,e.y-x,e.z],target:I,up:[0,0,1]};default:return null}},[d,e,r,i]),m=ee.useCallback(f=\u003e{i.current=f},[]),_=ee.useMemo(()=\u003e({controlsRef:i,mainCameraRef:r,defaultTarget:e,baseDistance:d,controller:s,setController:a,getPresetConfig:p,handleControlsChange:m,cameraType:A,setCameraType:c,cameraPosition:l,setCameraPosition:u,cameraRotation:g,setCameraRotation:h,saveCameraToSession:Can,loadCameraFromSession:Pze}),[e,d,s,p,m,A,l,g]);return K.jsx(yan.Provider,{value:_,children:t})},gS=()=\u003e{const t=ee.useContext(yan);if(!t)throw new Error(\"useCameraController must be used within a CameraControllerProvider\");return t},Z3i=t=\u003et\u003c.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,eEi=()=\u003e{const{controlsRef:t,mainCameraRef:e,defaultTarget:n,setController:o,getPresetConfig:i}=gS(),r=ee.useRef(null),s=ee.useRef(new Zy),a=ee.useRef(new jt),A=ee.useRef(new jt),c=ee.useRef(new Zy),l=ee.useRef(new Zy),u=ee.useRef(new T0),g=ee.useRef(new T0),h=ee.useCallback(({position:p,target:m,up:_,durationMs:f=600})=\u003e{if(!e.current)return;const I=t.current?.target??n,C=new jt(p[0],p[1],p[2]),y=m?new jt(m[0],m[1],m[2]):n.clone(),x=new jt(..._??[0,0,1]).normalize(),E=g.current;E.position.copy(C),E.up.copy(x),E.lookAt(y);const B=E.quaternion.clone(),S=e.current.quaternion.clone(),Q=e.current.position.clone(),w=I.clone(),M=u.current;M.up.set(0,0,1),M.position.copy(Q),M.lookAt(w);const k=M.quaternion.clone();M.up.set(0,0,1),M.position.copy(C),M.lookAt(y);const R=M.quaternion.clone(),F=k.clone().invert().multiply(S).normalize(),O=R.clone().invert().multiply(B).normalize();r.current={fromPosition:Q,toPosition:C,fromTarget:w,toTarget:y,toQuaternion:B,rollFrom:F,rollTo:O,startTime:performance.now(),duration:f}},[e,t,n]),d=ee.useCallback(p=\u003e{if(p===\"Custom\")return;const m=i(p);m\u0026\u0026h(m)},[h,i]);return ee.useEffect(()=\u003ee.current?(o({animateTo:h,animateToPreset:d}),()=\u003e{o(null)}):void 0,[h,d,e,o]),TX(()=\u003e{if(!e.current||!r.current)return;const{fromPosition:p,toPosition:m,fromTarget:_,toTarget:f,toQuaternion:I,rollFrom:C,rollTo:y,startTime:x,duration:E}=r.current,B=performance.now()-x,S=E\u003c=0?1:Math.min(B/E,1),Q=Z3i(S);e.current.position.lerpVectors(p,m,Q);const w=a.current;w.copy(_).lerp(f,Q);const M=u.current;M.up.set(0,0,1),M.position.copy(e.current.position),M.lookAt(w);const k=s.current;k.copy(M.quaternion);const R=c.current;R.copy(C);const F=l.current;F.copy(y),C.dot(y)\u003c0\u0026\u0026(F.x*=-1,F.y*=-1,F.z*=-1,F.w*=-1),F.normalize(),R.slerp(F,Q),e.current.quaternion.copy(k).multiply(R).normalize();const O=A.current;O.set(0,1,0).applyQuaternion(e.current.quaternion).normalize(),e.current.up.copy(O),t.current?.target.copy(w),e.current.updateMatrixWorld(),t.current?.update(),S\u003e=1\u0026\u0026(e.current.position.copy(m),e.current.quaternion.copy(I),e.current.up.set(0,0,1),e.current.updateMatrixWorld(),t.current?.target.copy(f),t.current?.update(),r.current=null)}),null},tEi=()=\u003e{const{controlsRef:t}=gS(),e=ee.useRef(null),n=ee.useRef(!1),o=ee.useRef(null),i=ee.useCallback(s=\u003e{e.current=s,!n.current\u0026\u0026t.current\u0026\u0026Pze(s,t.current)\u0026\u0026(n.current=!0)},[t]),r=ee.useCallback(()=\u003e{if(!(!e.current||!t.current)){if(!n.current\u0026\u0026Pze(e.current,t.current)){n.current=!0;return}clearTimeout(o.current),o.current=setTimeout(()=\u003e{e.current\u0026\u0026t.current\u0026\u0026Can(e.current,t.current)},150)}},[t]);return{handleCameraCreated:i,handleControlsChange:r}};function nEi(t){t.querySelectorAll(\"canvas\").forEach(e=\u003ee.remove())}var oEi=t=\u003e{t.outputColorSpace=Ox,t.toneMapping=PKt,t.toneMappingExposure=1,t.shadowMap.enabled=!0,t.shadowMap.type=SKt},iEi=ee.forwardRef(({children:t,scene:e,camera:n,style:o,onCreated:i},r)=\u003e{const{cameraType:s}=gS(),a=ee.useRef(null),[A,c]=ee.useState(null),l=ee.useRef([]),u=ee.useRef(void 0);u.current=i;const g=ee.useRef(null),h=ee.useCallback(_=\u003e{l.current.push(_)},[]),d=ee.useCallback(_=\u003e{l.current=l.current.filter(f=\u003ef!==_)},[]),p=ee.useMemo(()=\u003enew KR,[]);e?.up\u0026\u0026p.up.set(e.up.x,e.up.y,e.up.z);const m=ee.useRef(new T0);return ee.useImperativeHandle(r,()=\u003em.current),ee.useEffect(()=\u003e{if(!a.current)return;nEi(a.current);const _=new $de({antialias:!0,alpha:!0});oEi(_),_.setSize(a.current.clientWidth,a.current.clientHeight),_.setPixelRatio(window.devicePixelRatio),a.current.appendChild(_.domElement);const f=a.current.clientWidth/a.current.clientHeight,I=s===\"perspective\"?new sf(75,f,.1,1e3):new rY(-10*f,10*f,10,-10,-1e3,1e3);g.current?(I.position.copy(g.current.position),I.quaternion.copy(g.current.quaternion),I.up.copy(g.current.up)):(n?.up\u0026\u0026I.up.set(n.up[0],n.up[1],n.up[2]),n?.position\u0026\u0026I.position.set(n.position[0],n.position[1],n.position[2]),I.lookAt(0,0,0)),p.add(m.current),window.__TSCIRCUIT_THREE_OBJECT=m.current,c({scene:p,camera:I,renderer:_,rootObject:m.current,addFrameListener:h,removeFrameListener:d}),u.current?.({camera:I,renderer:_});let C;const y=new qti;let x=!0;const E=new IntersectionObserver(([Q])=\u003e{x=Q?.isIntersecting??!1,x\u0026\u0026S()});E.observe(a.current);const B=()=\u003e{if(C=requestAnimationFrame(B),!x)return;const Q=y.getElapsedTime(),w=y.getDelta();l.current.forEach(M=\u003eM(Q,w)),_.render(p,I)};B();const S=()=\u003e{if(a.current?.clientWidth\u0026\u0026a.current.clientHeight){const Q=a.current.clientWidth/a.current.clientHeight;I instanceof sf?I.aspect=Q:I instanceof rY\u0026\u0026(I.left=-10*Q,I.right=10*Q,I.top=10,I.bottom=-10),I.updateProjectionMatrix(),_.setSize(a.current.clientWidth,a.current.clientHeight)}};return window.addEventListener(\"resize\",S),()=\u003e{g.current={position:I.position.clone(),quaternion:I.quaternion.clone(),up:I.up.clone()},window.removeEventListener(\"resize\",S),cancelAnimationFrame(C),E.disconnect(),a.current\u0026\u0026_.domElement\u0026\u0026a.current.removeChild(_.domElement),_.dispose(),p.remove(m.current),window.__TSCIRCUIT_THREE_OBJECT===m.current\u0026\u0026(window.__TSCIRCUIT_THREE_OBJECT=void 0)}},[p,h,d,s]),K.jsx(\"div\",{ref:a,style:{width:\"100%\",height:\"100%\",...o},children:A\u0026\u0026K.jsx(LVe.Provider,{value:A,children:K.jsx(l3i,{children:t})})})}),rEi=`\n varying vec3 worldPosition;\n void main() {\n worldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n`,sEi=`\n varying vec3 worldPosition;\n uniform float cellSize;\n uniform float sectionSize;\n uniform vec3 gridColor;\n uniform vec3 sectionColor;\n uniform float fadeDistance;\n uniform float fadeStrength;\n\n float getGrid(float size) {\n vec2 r = worldPosition.xy / size;\n vec2 grid = abs(fract(r - 0.5) - 0.5) / fwidth(r);\n float line = min(grid.x, grid.y);\n return 1.0 - min(line * 1.5, 1.0);\n }\n\n void main() {\n float g1 = getGrid(cellSize);\n float g2 = getGrid(sectionSize);\n\n float d = distance(worldPosition.xy, cameraPosition.xy);\n float a = 1.0 - smoothstep(fadeDistance, fadeDistance * fadeStrength, d);\n\n vec3 color = mix(gridColor, sectionColor, g2);\n\n gl_FragColor = vec4(color, max(g1, g2) * a);\n if (gl_FragColor.a \u003c= 0.0) discard;\n }\n`,aEi=({rotation:t,infiniteGrid:e,cellSize:n=1,sectionSize:o=10})=\u003e{const{scene:i,camera:r}=uf(),s=1e3,a=ee.useMemo(()=\u003e{const A=new VB(s,s);A.rotateX(-Math.PI/2);const c=new f6({vertexShader:rEi,fragmentShader:sEi,uniforms:{cellSize:{value:n},sectionSize:{value:o},gridColor:{value:new Vi(15658734)},sectionColor:{value:new Vi(13421823)},fadeDistance:{value:100},fadeStrength:{value:1.5}},transparent:!0,side:r_}),l=new Er(A,c);return t\u0026\u0026l.rotation.fromArray(t),l},[s,n,o,t]);return TX(()=\u003e{e\u0026\u0026a.position.set(r.position.x,r.position.y,0)}),ee.useEffect(()=\u003e{if(!(!i||!a))return i.add(a),()=\u003e{i.remove(a),a.geometry.dispose(),Array.isArray(a.material)?a.material.forEach(A=\u003eA.dispose()):a.material.dispose()}},[i,a]),null},Mze=.75,AEi=({boardDimensions:t,boardCenter:e,darkBackgroundEnabled:n=!1,shadowsEnabled:o=!1})=\u003e{const{scene:i}=uf(),r=ee.useMemo(()=\u003e{const s=new lh;s.name=\"cad-viewer-light-rig\";const a=e?.x??0,A=e?.y??0,c=Math.max(t?.width??0,t?.height??0,20),l=c*.8,u=c,g=c*1.7,h=new AJt(16186360,.22);h.name=\"cad-viewer-soft-ambient\",s.add(h);const d=new Kti(15004141,1581597,.2);d.name=\"cad-viewer-hemisphere\",s.add(d);const p=(m,_,f,I,C=!1)=\u003e{const y=new aJt(_,f);if(y.name=m,y.position.set(a+I[0],A+I[1],I[2]),y.target.position.set(a,A,0),y.castShadow=C,C){y.shadow.mapSize.set(2048,2048),y.shadow.bias=-2e-4,y.shadow.normalBias=.03,y.shadow.radius=5;const x=y.shadow.camera;x.left=-l,x.right=l,x.top=l,x.bottom=-l,x.near=.5,x.far=Math.max(c*4,Math.hypot(...I)+c*2),x.updateProjectionMatrix()}s.add(y),s.add(y.target)};return p(\"cad-viewer-key-light\",16775406,1.35,[g*.68,-g*.8,g*1.08],o),p(\"cad-viewer-fill-light\",14477554,.25,[-u*.85,u*.55,u*.75]),p(\"cad-viewer-rim-light\",12184275,.5,[-u*.35,u*.85,u*.95]),p(\"cad-viewer-underside-key-light\",16775406,1.35*Mze,[g*.68,-g*.8,-g*1.08]),p(\"cad-viewer-underside-fill-light\",14477554,.25*Mze,[-u*.85,u*.55,-u*.75]),p(\"cad-viewer-underside-rim-light\",12184275,.5*Mze,[-u*.35,u*.85,-u*.95]),s},[e,t,o]);return ee.useEffect(()=\u003e{const s=i.background,a=i.environment;return i.background=n?new Vi(1053456):null,i.environment=null,()=\u003e{i.background=s,i.environment=a}},[n,i]),ee.useEffect(()=\u003e{if(i)return i.add(r),()=\u003e{i.remove(r)}},[i,r]),null},cEi=({autoRotate:t,autoRotateSpeed:e,onStart:n,panSpeed:o,rotateSpeed:i,zoomSpeed:r,enableDamping:s,dampingFactor:a,target:A,onControlsChange:c})=\u003e{const{camera:l,renderer:u}=uf(),g=ee.useMemo(()=\u003e!l||!u?null:new voi(l,u.domElement),[l,u]);return ee.useEffect(()=\u003e(c?.(g??null),()=\u003ec?.(null)),[g,c]),ee.useEffect(()=\u003e{if(!g)return;const h=()=\u003e{c?.(g)};return g.addEventListener(\"change\",h),()=\u003e{g.removeEventListener(\"change\",h)}},[g,c]),ee.useEffect(()=\u003e{g\u0026\u0026(g.autoRotate=t||!1,g.autoRotateSpeed=e||1,o!==void 0\u0026\u0026(g.panSpeed=o),i!==void 0\u0026\u0026(g.rotateSpeed=i),r!==void 0\u0026\u0026(g.zoomSpeed=r),s!==void 0\u0026\u0026(g.enableDamping=s),a!==void 0\u0026\u0026(g.dampingFactor=a),g.zoomToCursor=!0,g.mouseButtons={LEFT:Vw.ROTATE,MIDDLE:Vw.PAN,RIGHT:null},A\u0026\u0026(g.target.set(A[0],A[1],A[2]),g.update()))},[g,t,e,o,i,r,s,a,A]),ee.useEffect(()=\u003e{if(!(!g||!n))return g.addEventListener(\"start\",n),()=\u003e{g.removeEventListener(\"start\",n)}},[g,n]),ee.useEffect(()=\u003e{if(g)return()=\u003e{g.dispose()}},[g]),TX(()=\u003e{g?.update()},[g]),null},lEi=10,jY={banana:{type:\"banana\",label:\"Show Banana\",width:190,height:60,depth:34,zCenter:17},\"credit-card\":{type:\"credit-card\",label:\"Show Credit Card\",width:85.6,height:53.98,depth:.76,zCenter:0},\"14in-macbook\":{type:\"14in-macbook\",label:\"Show 14in Macbook\",width:312.6,height:221.2,depth:15.5,zCenter:0}},uEi=Object.values(jY),gEi=[{type:null,label:\"None\"},...uEi],dEi=(t,e)=\u003et===e?null:e,Dze=t=\u003eNumber.isFinite(t)?Math.max(t??0,0):0,Mpe=t=\u003eNumber.isFinite(t)?t??0:0,xan=(t,e,n)=\u003e{const o=jY[t],i=Dze(e?.width),r=Mpe(n?.x),s=Mpe(n?.y);return{x:r+i/2+lEi+o.width/2,y:s,z:0}},hEi=(t,e,n)=\u003e{const o=jY[t],i=Dze(e?.width),r=Dze(e?.height),s=Mpe(n?.x),a=Mpe(n?.y),A=xan(t,e,n);return{minX:Math.min(s-i/2,A.x-o.width/2),maxX:Math.max(s+i/2,A.x+o.width/2),minY:Math.min(a-r/2,A.y-o.height/2),maxY:Math.max(a+r/2,A.y+o.height/2),minZ:Math.min(0,A.z+o.zCenter-o.depth/2),maxZ:Math.max(0,A.z+o.zCenter+o.depth/2)}};function pEi(t,e){const n=new Zy().setFromEuler(new t2(t.x,t.y,t.z)),o=new jt(0,0,1);return o.applyQuaternion(n),o.multiplyScalar(e)}var mEi=()=\u003e{const{mainCameraRef:t}=gS(),e=ee.useRef(null);return ee.useEffect(()=\u003e{if(!e.current)return;const n=e.current,o=document.createElement(\"canvas\");n.appendChild(o);const i=new $de({canvas:o,antialias:!0,alpha:!0});i.setSize(120,120),i.setPixelRatio(window.devicePixelRatio);const r=new KR,s=new sf(75,1,.1,1e3);s.up.set(0,0,1);const a=new AJt(16777215,Math.PI/2);r.add(a);const A=new lh;A.rotation.fromArray([Math.PI/2,0,0]);const c=1,l=new Er(new Yx(c,c,c),new su({color:\"white\"}));A.add(l);const u=new Jq(new gti(new Yx(c,c,c)),new VR({color:0,linewidth:2}));A.add(u),r.add(A);const g=.51,h=(B,S,Q)=\u003e{const w=new Rke;return w.text=B,w.position.fromArray(S),Q\u0026\u0026w.rotation.fromArray(Q),w.color=\"black\",w.fontSize=.25,w.anchorX=\"center\",w.anchorY=\"middle\",w.depthOffset=0,w.font=null,w.sync(),w},d=h(\"Front\",[0,0,g]),p=h(\"Back\",[0,0,-g],[0,Math.PI,0]),m=h(\"Right\",[g,0,0],[0,Math.PI/2,0]),_=h(\"Left\",[-g,0,0],[0,-Math.PI/2,0]),f=h(\"Top\",[0,g,0],[-Math.PI/2,0,0]),I=h(\"Bottom\",[0,-g,0],[Math.PI/2,0,0]);A.add(d),A.add(p),A.add(m),A.add(_),A.add(f),A.add(I);let C=null,y=!0;const x=new IntersectionObserver(([B])=\u003e{y=B?.isIntersecting??!1});x.observe(o);const E=()=\u003e{if(C=requestAnimationFrame(E),!!y){if(t.current){const B=pEi(t.current.rotation??new t2(0,0,0),2);B.equals(s.position)||(s.position.copy(B),s.lookAt(0,0,0))}i.render(r,s)}};return E(),()=\u003e{x.disconnect(),o.remove(),C!==null\u0026\u0026cancelAnimationFrame(C),d.dispose(),p.dispose(),m.dispose(),_.dispose(),f.dispose(),I.dispose(),l.geometry.dispose(),l.material.dispose(),u.geometry.dispose(),u.material.dispose(),r.clear(),i.dispose(),i.forceContextLoss()}},[t]),K.jsx(\"div\",{ref:e,style:{position:\"absolute\",top:0,left:0,width:120,height:120,zIndex:kX.orientationCube}})},Ean=(t,e,n)=\u003e{const o=t/2,i=e/2,r=Math.min(n,o,i),s=new zzt;return s.moveTo(-o+r,-i),s.lineTo(o-r,-i),s.quadraticCurveTo(o,-i,o,-i+r),s.lineTo(o,i-r),s.quadraticCurveTo(o,i,o-r,i),s.lineTo(-o+r,i),s.quadraticCurveTo(-o,i,-o,i-r),s.lineTo(-o,-i+r),s.quadraticCurveTo(-o,-i,-o+r,-i),s},Nze=(t,e,n,o)=\u003eBan(Ean(t,e,o),n),Ban=(t,e)=\u003e{const n=new oke(t,{depth:e,bevelEnabled:!1,curveSegments:24});return n.translate(0,0,-e/2),n.computeVertexNormals(),n},_Ei=(t,e)=\u003e{const n=jY[e];t.updateMatrixWorld(!0);const i=new e2().setFromObject(t).getSize(new jt);t.scale.set(n.width/i.x,n.height/i.y,n.depth/i.z),t.updateMatrixWorld(!0);const s=new e2().setFromObject(t).getCenter(new jt);t.position.set(-s.x,-s.y,n.zCenter-s.z),t.updateMatrixWorld(!0)},fEi=()=\u003e{const t=new Ozt([new jt(-82,18,16),new jt(-67,7,15),new jt(-43,-9,14),new jt(-15,-18,14),new jt(16,-18,14),new jt(47,-8,14.5),new jt(72,8,16),new jt(84,19,17)]),e=84,n=30,o=t.computeFrenetFrames(e,!1),i=[],r=[],s=[],a=[],A=[],c=new Vi(16766023),l=new Vi(12038965);for(let g=0;g\u003c=e;g++){const h=g/e,d=t.getPointAt(h),p=o.normals[g],m=o.binormals[g],f=3.4+12.4*Math.sin(Math.PI*h)**.48,I=Math.max(0,(h-.82)/.18)*.38,C=c.clone().lerp(l,I);for(let y=0;y\u003c=n;y++){const x=y/n*Math.PI*2,E=Math.sin(x),B=Math.cos(x),S=1+Math.cos(x*5+.35)*.035,Q=new jt().addScaledVector(p,B).addScaledVector(m,E*.9).normalize(),w=d.clone().addScaledVector(p,B*f*S).addScaledVector(m,E*f*.9*S);i.push(w.x,w.y,w.z),r.push(Q.x,Q.y,Q.z),s.push(C.r,C.g,C.b),a.push(h,y/n)}}for(let g=1;g\u003c=e;g++)for(let h=1;h\u003c=n;h++){const d=n+1,p=d*(g-1)+(h-1),m=d*g+(h-1),_=d*g+h,f=d*(g-1)+h;A.push(p,f,m,m,f,_)}const u=new Zl;return u.setIndex(A),u.setAttribute(\"position\",new Bs(i,3)),u.setAttribute(\"normal\",new Bs(r,3)),u.setAttribute(\"color\",new Bs(s,3)),u.setAttribute(\"uv\",new Bs(a,2)),u.computeBoundingBox(),u.computeBoundingSphere(),{geometry:u,curve:t}},IEi=()=\u003e{const t=new lh,e=new lh,{geometry:n,curve:o}=fEi(),i=new Er(n,new su({color:16777215,roughness:.72,metalness:0,vertexColors:!0}));i.name=\"banana-peel\",e.add(i);const r=new Er(new WR(3.4,20,12),new su({color:6242844,roughness:.92}));r.position.copy(o.getPointAt(0)),r.scale.set(1.15,.78,.78),r.name=\"banana-blossom-tip\",e.add(r);const s=11,a=o.getTangentAt(1).normalize(),A=new Er(new lY(2.5,4.1,s,18),new su({color:8483625,roughness:.82}));A.quaternion.setFromUnitVectors(new jt(0,1,0),a),A.position.copy(o.getPointAt(1)).addScaledVector(a,s/2),A.name=\"banana-stem\",e.add(A);const c=new Er(new WR(2.55,18,10),new su({color:5981470,roughness:.9}));return c.position.copy(o.getPointAt(1)).addScaledVector(a,s),c.name=\"banana-stem-tip\",e.add(c),_Ei(e,\"banana\"),t.add(e),t},CEi=(t,e,n,o,i)=\u003e{const r=Ean(t,e,o),s=new XTe;return s.absarc(0,0,i,0,Math.PI*2,!0),r.holes.push(s),Ban(r,n)},yEi=(t,e)=\u003e{const i=new Er(new lY(e-.15,e-.15,.25,48),new su({color:10199202,roughness:.48,metalness:.28}));return i.rotation.x=Math.PI/2,i.position.z=t-.35-.25/2,i.name=\"macbook-lid-indent\",i},xEi=()=\u003e{const t=jY[\"credit-card\"],e=new lh,n=new Er(Nze(t.width,t.height,t.depth,3.18),new su({color:2383272,roughness:.38,metalness:.08}));n.name=\"credit-card-body\",e.add(n);const o=t.depth/2+.08,i=new Er(Nze(12,9,.14,1.2),new su({color:14003525,roughness:.3,metalness:.62}));i.position.set(-21,3,o),i.name=\"credit-card-chip\",e.add(i);const r=new su({color:15331061,roughness:.45,metalness:.05});for(let s=0;s\u003c4;s++){const a=new Er(new Yx(s===3?8:12,.8,.1),r);a.position.set(-20+s*14,-14,o+.08),a.name=\"credit-card-detail\",e.add(a)}return e},EEi=()=\u003e{const t=jY[\"14in-macbook\"],e=new lh,n=new su({color:12896201,roughness:.3,metalness:.38}),o=new Er(Nze(t.width,t.height,13.5,9),n);o.position.z=-1,o.name=\"macbook-body\",e.add(o);const i=2,r=6.75,s=r+i/2,a=12,A=new Er(CEi(t.width-1.8,t.height-1.8,i,8.2,a),n.clone());A.position.z=r,A.name=\"macbook-lid\",e.add(A);const c=new Er(new Yx(t.width-42,3.2,1.2),new su({color:3158838,roughness:.55,metalness:.45}));c.position.set(0,t.height/2-2.4,6.15),c.name=\"macbook-hinge\",e.add(c),e.add(yEi(s,a));const l=new Er(new Yx(54,1.2,.8),new su({color:6712174,roughness:.45,metalness:.5}));return l.position.set(0,-221.2/2+.5,2.5),l.name=\"macbook-front-notch\",e.add(l),e},BEi=t=\u003e{const e=t===\"banana\"?IEi():t===\"credit-card\"?xEi():EEi();return e.name=`reference-object-${t}`,e.userData.isReferenceObject=!0,e.userData.referenceObjectType=t,p4(e),e},bEi=t=\u003e{const e=new Set,n=new Set;t.traverse(o=\u003e{if(!(o instanceof Er))return;e.add(o.geometry);const i=Array.isArray(o.material)?o.material:[o.material];for(const r of i)n.add(r)});for(const o of e)o.dispose();for(const o of n)o.dispose()},SEi=(t,e,n,o=1.18)=\u003e{const i=Math.max(n.maxX-n.minX,0),r=Math.max(n.maxY-n.minY,0),s=Math.max(n.maxZ-n.minZ,0),a=new jt((n.minX+n.maxX)/2,(n.minY+n.maxY)/2,(n.minZ+n.maxZ)/2),A=Math.max(Math.hypot(i,r,s)/2,1),c=e?.target??new jt,l=new jt(0,-.75,.9).normalize();let u=Math.max(t.position.distanceTo(c),5);if(t instanceof sf){const g=OG.degToRad(t.fov),h=2*Math.atan(Math.tan(g/2)*t.aspect),d=Math.min(g,h);u=A*o/Math.sin(d/2),t.far=Math.max(t.far,u+A*o*3),t.updateProjectionMatrix()}else if(t instanceof rY){const g=Math.abs(t.right-t.left)/2,h=Math.abs(t.top-t.bottom)/2;t.zoom=Math.min(g/(A*o),h/(A*o)),u=Math.max(u,A*o*2),t.updateProjectionMatrix()}return t.position.copy(a).addScaledVector(l,u),t.lookAt(a),t.updateMatrixWorld(),e\u0026\u0026(e.target.copy(a),e.update()),{center:a,radius:A,distance:u}},QEi=({type:t,boardDimensions:e,boardCenter:n})=\u003e{const{scene:o}=uf(),i=ee.useMemo(()=\u003e{const r=BEi(t),s=xan(t,e,n);return r.position.set(s.x,s.y,s.z),r},[t,e,n]);return ee.useEffect(()=\u003e(o.add(i),()=\u003e{o.remove(i),bEi(i)}),[o,i]),null},ban=({bounds:t})=\u003e{const{camera:e}=uf(),{controlsRef:n}=gS();return ee.useEffect(()=\u003e{SEi(e,n.current,t)},[t,e,n]),null},vEi=()=\u003e{const{camera:t}=uf(),{setCameraRotation:e}=gS();return TX(()=\u003e{t\u0026\u0026e(t.rotation)}),null},San=ee.forwardRef(({children:t,initialCameraPosition:e=[5,-5,5],autoRotateDisabled:n,clickToInteractEnabled:o=!1,boardDimensions:i,boardCenter:r,referenceObject:s,onUserInteraction:a,onCameraControllerReady:A},c)=\u003e{const[l,u]=ee.useState(!o),{mainCameraRef:g,handleControlsChange:h,controller:d}=gS(),{darkBackgroundEnabled:p,gridEnabled:m,lightingEnabled:_}=wze(),{handleCameraCreated:f,handleControlsChange:I}=tEi();ee.useEffect(()=\u003e{A\u0026\u0026A(d)},[d,A]);const C=ee.useMemo(()=\u003e{if(s)return hEi(s,i,r)},[s,i,r]),y=ee.useMemo(()=\u003e{if(!i)return 10;const E=i.width??0,B=i.height??0;return Math.max(Math.max(E,B)*1.5,10)},[i]),x=ee.useMemo(()=\u003e{if(C)return[(C.minX+C.maxX)/2,(C.minY+C.maxY)/2,(C.minZ+C.maxZ)/2];if(r)return[r.x,r.y,0]},[r,C]);return K.jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:[K.jsx(mEi,{}),K.jsxs(iEi,{ref:c,scene:{up:new jt(0,0,1)},camera:{up:[0,0,1],position:e},onCreated:({camera:E})=\u003e{g.current=E,f(E)},children:[K.jsx(umi,{}),K.jsx(eEi,{}),K.jsx(vEi,{}),l\u0026\u0026K.jsx(cEi,{autoRotate:!n,autoRotateSpeed:1,onStart:a,rotateSpeed:.5,panSpeed:.75,zoomSpeed:.5,enableDamping:!0,dampingFactor:.1,target:x,onControlsChange:E=\u003e{h(E),I()}}),K.jsx(AEi,{boardDimensions:i,boardCenter:r,darkBackgroundEnabled:p,shadowsEnabled:_}),s\u0026\u0026K.jsx(QEi,{type:s,boardDimensions:i,boardCenter:r}),C\u0026\u0026K.jsx(ban,{bounds:C}),m\u0026\u0026K.jsx(aEi,{rotation:[Math.PI/2,0,0],infiniteGrid:!0,cellSize:3,sectionSize:y}),t]}),K.jsxs(\"div\",{style:{position:\"absolute\",right:24,bottom:24,fontFamily:\"sans-serif\",color:\"white\",WebkitTextStroke:\"0.5px rgba(0, 0, 0, 0.5)\",fontSize:11},children:[\"@\",man.version]}),o\u0026\u0026!l\u0026\u0026K.jsx(\"button\",{type:\"button\",onClick:()=\u003eu(!0),onKeyDown:E=\u003e{(E.key===\"Enter\"||E.key===\" \")\u0026\u0026u(!0)},style:{position:\"absolute\",inset:0,cursor:\"pointer\",zIndex:kX.clickToInteractOverlay,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:K.jsx(\"div\",{style:{backgroundColor:\"rgba(0, 0, 0, 0.8)\",color:\"white\",padding:\"12px 24px\",borderRadius:\"8px\",fontSize:\"16px\",fontFamily:\"sans-serif\",pointerEvents:\"none\"},children:\"Click to Interact\"})})]})}),wEi=t=\u003e{const[e,n]=ee.useState([]),[o,i]=ee.useState(!0);return ee.useEffect(()=\u003e{if(!t)return;(async()=\u003e{i(!0);const a=(Array.isArray(t)?t:[t]).map(async(A,c)=\u003e{const l=Sci.serialize({binary:!0},[A]),g=await new Blob(l).arrayBuffer(),d=A.layerType||(c===0?\"board\":void 0);return{stlData:g,color:A.color,layerType:d}});try{const A=await Promise.all(a);n(A)}catch(A){console.error(\"Error generating STLs:\",A),n([])}finally{i(!1)}})()},[t]),{stls:e,loading:o}},PEi=_0(epe()),MEi=_0(sT()),DEi=_0(RX()),NEi=_0(sT()),REi=_0(aT()),TEi=_0(yrn()),Qan=t=\u003e{let e=0;for(let o=0;o\u003ct.length;o++){const i=(o+1)%t.length;e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1]}return e/2\u003c=0},Rze=(t,e=1.2,n={})=\u003e{const{xyOutset:o=0}=n,{outline:i}=t;let r=i.map(A=\u003e[A.x,A.y]);Qan(r)\u0026\u0026(r=r.reverse());let s=(0,NEi.polygon)({points:r});o!==0\u0026\u0026(s=(0,TEi.expand)({delta:o,corners:\"edge\"},s));let a=(0,DEi.extrudeLinear)({height:e},s);return a=(0,REi.translate)([0,0,-e/2],a),a},Cs=.01,Tc={copper:[.78,.63,.39],fr4Tan:[.6,.43,.28],fr4SolderMaskGreen:[.06,.31,.19],fr4TracesWithMaskGreen:[.09,.38,.23],fr4TracesWithoutMaskTan:[.6,.43,.28],flexAmber:[.8,.61,.2],fr1Tan:[.8,.4,.2],fr1TracesWithMaskCopper:[.9,.6,.2],fr1SolderMaskGreen:[.02,.1,.04]},jB=.001,df=32,m4=150,Dpe=.6,kEi={fr1:Tc.fr1Tan,fr4:Tc.fr4Tan,flex:Tc.flexAmber},FEi={fr1:Tc.fr1SolderMaskGreen,fr4:Tc.fr4SolderMaskGreen,flex:Tc.flexAmber},LEi={red:\"#650202\",blue:\"#003f7d\",purple:\"#4c1d69\",black:\"#071014\",white:\"#dddddd\",yellow:\"#dcc84a\"},HEi=.875,OEi=/^#(?:[\\da-f]{3}|[\\da-f]{6})$/i,GEi=/^rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\)$/i,YEi=/^rgb\\(\\s*\\d+%\\s*,\\s*\\d+%\\s*,\\s*\\d+%\\s*\\)$/i,UEi=/^hsl\\(\\s*\\d*\\.?\\d+\\s*,\\s*\\d*\\.?\\d+%\\s*,\\s*\\d*\\.?\\d+%\\s*\\)$/i,KEi={blue:.96,purple:.96,black:.99,yellow:.92},van=t=\u003e{const e=t?.trim();if(!e)return null;const n=e.toLowerCase();if(n===\"green\"||n===\"not_specified\")return null;const i=LEi[n];return i?new Vi(i):Object.hasOwn(Vi.NAMES,n)||OEi.test(e)||GEi.test(e)||YEi.test(e)||UEi.test(e)?new Vi(n):null},VEi=t=\u003e{const e=t?.trim().toLowerCase();return KEi[e]??HEi},zEi=({red:t,green:e,blue:n})=\u003eMath.hypot(t-220,e-200,n-74)\u003c4||Math.hypot(t-218,e-197,n-76)\u003c4,JEi=({soldermaskColor:t,copperColor:e,soldermaskOpacity:n})=\u003et.clone().multiplyScalar(n).add(e.clone().multiplyScalar(1-n)),wan=t=\u003e{const e=t.clone().convertLinearToSRGB();return`rgb(${[Math.round(e.r*255),Math.round(e.g*255),Math.round(e.b*255)].join(\",\")})`},WEi=new Vi(1063462),Tze=({material:t,solder_mask_color:e})=\u003e{const n=van(e);if(n)return n;if(t===\"fr4\")return WEi.clone();const o=kEi[t]??Tc.fr4Tan;return new Vi(o[0],o[1],o[2])},jEi=t=\u003e{const e=t.filter(A=\u003eA.type===\"pcb_panel\"),n=Mr(t).pcb_board.list();let o,i,r=1.2;if(e.length\u003e0)o=e[0],i=n.find(A=\u003eA.pcb_panel_id===o.pcb_panel_id),r=i?.thickness??1.2;else{if(o=n.filter(c=\u003e!c.pcb_panel_id)[0],!o)return console.warn(\"No pcb_board or pcb_panel found for simplified geometry\"),[];i=o,r=o.thickness??1.2}let s;\"outline\"in o\u0026\u0026o.outline\u0026\u0026o.outline.length\u003e0?s=Rze({outline:o.outline},r):s=(0,MEi.cuboid)({size:[o.width??10,o.height??10,r],center:[o.center.x,o.center.y,0]});const a=Tze({material:i?.material??\"fr4\",solder_mask_color:i?.solder_mask_color});return[(0,PEi.colorize)([a.r,a.g,a.b],s)]},qX=_0(epe()),c1=_0(NX()),kze=_0(RX()),Vx=_0(aT()),og=_0(sT()),fP=_0(sT()),$Ei=_0(RX()),Npe=_0(aT()),qEi=_0(NX()),XEi=64,ZEi=(t,e,n)=\u003e{const o=(0,fP.ellipse)({center:[0,0],radius:[Math.max(t/2,Cs/2),Math.max(e/2,Cs/2)],segments:XEi}),i=(0,$Ei.extrudeLinear)({height:n},o);return(0,Npe.translate)([0,0,-n/2],i)},e5i=(t,e,n)=\u003e{const o=Math.max(t,Cs),i=Math.max(e,Cs);if(Math.abs(o-i)\u003c1e-6)return(0,fP.cylinder)({center:[0,0,0],radius:o/2,height:n});const r=o\u003e=i,s=r?o:i,a=r?i:o,A=Math.max(s-a,0),c=(0,fP.cuboid)({center:[0,0,0],size:r?[A,a,n]:[a,A,n]});if(A\u003c=1e-6)return(0,fP.cylinder)({center:[0,0,0],radius:a/2,height:n});const l=A/2,u=(0,fP.cylinder)({center:r?[-l,0,0]:[0,-l,0],radius:a/2,height:n}),g=(0,fP.cylinder)({center:r?[l,0,0]:[0,l,0],radius:a/2,height:n});return(0,qEi.union)(c,u,g)},Rpe=(t,e,n={})=\u003e{const o=t.hole_shape||\"circle\",i=n.sizeDelta??0,r=t.hole_offset_x||0,s=t.hole_offset_y||0,a=[t.x+r,t.y+s,0];if(o===\"circle\"){const h=Math.max((t.hole_diameter??0)+i,Cs),d=Math.max(h/2,Cs/2);return(0,fP.cylinder)({center:a,radius:d,height:e})}const A=t.hole_width??t.hole_diameter,c=t.hole_height??t.hole_diameter;if(!A||!c)return null;const l=Math.max(A+i,Cs),u=Math.max(c+i,Cs);if(o===\"oval\"){const h=ZEi(l,u,e);return(0,Npe.translate)([a[0],a[1],0],h)}if(o===\"pill\"||o===\"rotated_pill\"){let h=e5i(l,u,e);if(!h)return null;const d=t.ccw_rotation||0;return d\u0026\u0026(h=(0,Npe.rotateZ)(d*Math.PI/180,h)),(0,Npe.translate)(a,h)}const g=Math.max((t.hole_diameter??A??c??Cs)+i,Cs);return(0,fP.cylinder)({center:a,radius:g/2,height:e})},tl=_0(sT()),M6=_0(epe()),Og=_0(NX()),Pan=_0(aT()),Tpe=_0(RX()),zx=_0(aT()),t5i=1e-5;function Man(t,e,n){if(typeof n!=\"number\"||!Number.isFinite(n)||n\u003c=0)return 0;const o=t/2,i=e/2,r=Math.min(o,i)-2*t5i;return Math.max(0,Math.min(n,r))}function IP(t){if(!(!t||typeof t!=\"object\"))return t.corner_radius??t.cornerRadius??t.rect_pad_border_radius??t.rectPadBorderRadius??t.rect_border_radius??t.rectBorderRadius??void 0}var n5i=.05,Fze=64,dT=(t,e)=\u003ee?(0,Og.intersect)(e,t):t,XX=(t,e,n={})=\u003e{const{clipGeom:o}=n;t.shape||(t.shape=\"circle\");const i=Math.max(e.pcbThickness*.002,Cs/5),r=Math.max(e.pcbThickness*3e-4,Cs/20),s=Math.max(e.pcbThickness*.0025,Cs/4),a=e.pcbThickness+2*n5i+4*Cs,A=Math.max(e.pcbThickness-2*(i+r+s),Cs),c=Math.max(A,Cs);if(t.shape===\"circle\"){const l=t.outer_diameter??Math.max(t.hole_diameter,0),u=A,g=(0,tl.cylinder)({center:[t.x,t.y,0],radius:l/2,height:u}),h=dT(g,o),d=(0,tl.cylinder)({center:[t.x,t.y,0],radius:Math.max(t.hole_diameter/2,.01),height:a});return(0,M6.colorize)(Tc.copper,(0,Og.subtract)(h,d))}if(t.shape===\"oval\"){const l=t.outer_width||t.hole_width||0,u=t.outer_height||t.hole_height||0,g=t.hole_width||0,h=t.hole_height||0,d=(()=\u003e{const _=(0,tl.cylinder)({center:[0,0,0],radius:1,height:A,segments:64}),f=(0,Pan.scale)([l/2,u/2,1],_);return(0,zx.translate)([t.x,t.y,0],f)})(),p=dT(d,o),m=(()=\u003e{const _=(0,tl.cylinder)({center:[0,0,0],radius:1,height:a,segments:64}),f=(0,Pan.scale)([Math.max(g/2,.01),Math.max(h/2,.01),1],_);return(0,zx.translate)([t.x,t.y,0],f)})();return(0,M6.colorize)(Tc.copper,(0,Og.subtract)(p,m))}if(t.shape===\"circular_hole_with_rect_pad\"){const l=t.hole_offset_x||0,u=t.hole_offset_y||0,g=t.rect_pad_width||t.hole_diameter,h=t.rect_pad_height||t.hole_diameter,d=IP(t),p=dT((0,Og.union)((()=\u003e{const f=(0,tl.roundedRectangle)({size:[g,h],roundRadius:d||0,segments:Fze}),I=(0,Tpe.extrudeLinear)({height:A},f);return(0,zx.translate)([t.x,t.y,-A/2],I)})(),(0,tl.cylinder)({center:[t.x+(l||0),t.y+(u||0),0],radius:t.hole_diameter/2,height:c})),o),m=(0,tl.cylinder)({center:[t.x+(l||0),t.y+(u||0),0],radius:Math.max(t.hole_diameter/2-Cs,.01),height:a}),_=(0,Og.subtract)(p,m);return n.clipGeom?(0,M6.colorize)(Tc.copper,(0,Og.intersect)(_,n.clipGeom)):(0,M6.colorize)(Tc.copper,_)}if(t.shape===\"pill\"){const l=(t.ccw_rotation||0)*Math.PI/180,u=M=\u003e{if(!l)return M;const k=(0,zx.translate)([-t.x,-t.y,0],M),R=(0,zx.rotate)([0,0,l],k);return(0,zx.translate)([t.x,t.y,0],R)},g=t.hole_height\u003et.hole_width,h=g?t.hole_height:t.hole_width,d=g?t.hole_width:t.hole_height,p=g?t.outer_height||d+.2:t.outer_width||h+.2,m=g?t.outer_width||h+.2:t.outer_height||d+.2,_=d/2,f=Math.abs(h-d),y=((M,k,R)=\u003e{const F=k/2,O=Math.abs(M-k);if(O\u003c=1e-6)return(0,tl.cylinder)({center:[t.x,t.y,0],radius:F,height:R});const U=(0,tl.cuboid)({center:[t.x,t.y,0],size:g?[k,O,R]:[O,k,R]}),Y=(0,tl.cylinder)({center:g?[t.x,t.y-O/2,0]:[t.x-O/2,t.y,0],radius:F,height:R}),W=(0,tl.cylinder)({center:g?[t.x,t.y+O/2,0]:[t.x+O/2,t.y,0],radius:F,height:R});return(0,Og.union)(U,Y,W)})(p,m,A),x=(0,tl.cuboid)({center:[t.x,t.y,0],size:g?[d-2*Cs,f,a]:[f,d-2*Cs,a]}),E=(0,tl.cylinder)({center:g?[t.x,t.y-f/2,0]:[t.x-f/2,t.y,0],radius:_-Cs,height:a}),B=(0,tl.cylinder)({center:g?[t.x,t.y+f/2,0]:[t.x+f/2,t.y,0],radius:_-Cs,height:a}),S=(0,Og.union)(x,E,B),Q=dT(u(y),o),w=u(S);return(0,M6.colorize)(Tc.copper,(0,Og.subtract)(Q,w))}if(t.shape===\"pill_hole_with_rect_pad\"){if(t.hole_shape\u0026\u0026t.hole_shape!==\"pill\"||t.pad_shape\u0026\u0026t.pad_shape!==\"rect\")throw new Error(\"Invalid hole_shape or pad_shape for pill_hole_with_rect_pad\");const l=t.hole_offset_x||0,u=t.hole_offset_y||0,g=t.hole_height\u003et.hole_width,h=g?t.hole_height:t.hole_width,d=g?t.hole_width:t.hole_height,p=d/2,m=Math.abs(h-d),_=t.rect_pad_width||h+.2,f=t.rect_pad_height||d+.2,I=IP(t),C=.03,y=(0,Og.union)((0,tl.cuboid)({center:[t.x+l,t.y+u,0],size:g?[d+2*C,m+2*C,c]:[m+2*C,d+2*C,c]}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u-m/2,0]:[t.x+l-m/2,t.y+u,0],radius:p+C,height:c}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u+m/2,0]:[t.x+l+m/2,t.y+u,0],radius:p+C,height:c})),x=(0,Og.union)((0,tl.cuboid)({center:[t.x+l,t.y+u,0],size:g?[d,m,a]:[m,d,a]}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u-m/2,0]:[t.x+l-m/2,t.y+u,0],radius:p,height:a}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u+m/2,0]:[t.x+l+m/2,t.y+u,0],radius:p,height:a})),E=(()=\u003e{const M=(0,tl.roundedRectangle)({size:[_,f],roundRadius:I||0,segments:Fze}),k=(0,Tpe.extrudeLinear)({height:A},M);return(0,zx.translate)([t.x,t.y,-A/2],k)})(),B=(0,Og.subtract)(E,x),S=(0,Og.union)((0,tl.cuboid)({center:[t.x+l,t.y+u,0],size:g?[d-2*Cs,m-2*Cs,a]:[m-2*Cs,d-2*Cs,a]}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u-m/2,0]:[t.x+l-m/2,t.y+u,0],radius:p-Cs,height:a}),(0,tl.cylinder)({center:g?[t.x+l,t.y+u+m/2,0]:[t.x+l+m/2,t.y+u,0],radius:p-Cs,height:a})),Q=(0,Og.subtract)(y,S),w=dT((0,Og.union)(B,Q),o);return(0,M6.colorize)(Tc.copper,w)}else if(t.shape===\"rotated_pill_hole_with_rect_pad\"){if(t.hole_shape\u0026\u0026t.hole_shape!==\"rotated_pill\"||t.pad_shape\u0026\u0026t.pad_shape!==\"rect\")throw new Error(\"Invalid hole_shape or pad_shape for rotated_pill_hole_with_rect_pad\");const l=t.hole_offset_x||0,u=t.hole_offset_y||0,g=t.hole_width,h=t.hole_height,d=g\u003e=h,p=d?g:h,m=d?h:g,_=m/2,f=Math.abs(p-m),I=t.rect_pad_width||g+.2,C=t.rect_pad_height||h+.2,y=IP(t),x=.03,E=(t.hole_ccw_rotation||0)*Math.PI/180,B=(t.rect_ccw_rotation||0)*Math.PI/180,S=Y=\u003e{const W=l*Math.cos(E)-u*Math.sin(E),te=l*Math.sin(E)+u*Math.cos(E),j=(0,zx.rotate)([0,0,E],Y);return(0,zx.translate)([t.x+W,t.y+te,0],j)},Q=Y=\u003e{if(!B)return Y;const W=(0,zx.translate)([-t.x,-t.y,0],Y),te=(0,zx.rotate)([0,0,B],W);return(0,zx.translate)([t.x,t.y,0],te)},w=S((0,Og.union)((0,tl.cuboid)({center:[0,0,0],size:d?[f+2*x,m+2*x,c]:[m+2*x,f+2*x,c]}),(0,tl.cylinder)({center:d?[-f/2,0,0]:[0,-f/2,0],radius:_+x,height:c}),(0,tl.cylinder)({center:d?[f/2,0,0]:[0,f/2,0],radius:_+x,height:c}))),M=S((0,Og.union)((0,tl.cuboid)({center:[0,0,0],size:d?[f,m,a]:[m,f,a]}),(0,tl.cylinder)({center:d?[-f/2,0,0]:[0,-f/2,0],radius:_,height:a}),(0,tl.cylinder)({center:d?[f/2,0,0]:[0,f/2,0],radius:_,height:a}))),k=Q((()=\u003e{const Y=(0,tl.roundedRectangle)({size:[I,C],roundRadius:y||0,segments:Fze}),W=(0,Tpe.extrudeLinear)({height:A},Y);return(0,zx.translate)([t.x,t.y,-A/2],W)})()),R=(0,Og.subtract)(k,M),F=S((0,Og.union)((0,tl.cuboid)({center:[0,0,0],size:d?[f-2*Cs,m-2*Cs,a]:[m-2*Cs,f-2*Cs,a]}),(0,tl.cylinder)({center:d?[-f/2,0,0]:[0,-f/2,0],radius:_-Cs,height:a}),(0,tl.cylinder)({center:d?[f/2,0,0]:[0,f/2,0],radius:_-Cs,height:a}))),O=(0,Og.subtract)(w,F),U=dT((0,Og.union)(R,O),o);return(0,M6.colorize)(Tc.copper,U)}else if(t.shape===\"hole_with_polygon_pad\"){const l=t.pad_outline;if(!Array.isArray(l)||l.length\u003c3)throw new Error(`Invalid pad_outline for plated hole at (${t.x}, ${t.y})`);const u=l.map(C=\u003e[C.x,C.y]),g=(0,tl.polygon)({points:u}),p=((C,y)=\u003e{const x=Math.max(C,Cs),E=(0,Tpe.extrudeLinear)({height:x},g);return(0,zx.translate)([t.x,t.y,y-x/2],E)})(A,0),m=dT(p,o),_=Rpe(t,c);if(!_)return(0,M6.colorize)(Tc.copper,m);const f=Rpe(t,a,{sizeDelta:-2*Cs})||_;let I=(0,Og.union)((0,Og.subtract)(m,_),_);return n.clipGeom?(I=(0,Og.subtract)(I,f),I=(0,Og.intersect)(I,n.clipGeom),(0,M6.colorize)(Tc.copper,I)):(0,M6.colorize)(Tc.copper,(0,Og.subtract)(I,f))}else throw new Error(`Unsupported plated hole shape: ${t.shape}`)},o5i=_0(NX()),i5i=_0(aT()),Lze=_0(sT());function r5i({x:t,y:e,outerDiameter:n,holeDiameter:o,thickness:i}){if(n\u003c=o)throw new Error(`Invalid via geometry: outerDiameter (${n}) must be \u003e holeDiameter (${o})`);const r=Cs,s=Math.min(n/2,o/2+r),A=(0,Lze.cylinder)({center:[0,0,0],radius:s,height:i,segments:df}),c=i+2*Cs,l=(0,Lze.cylinder)({center:[0,0,0],radius:o/2,height:c,segments:df}),u=(0,o5i.subtract)(A,l);return(0,i5i.translate)([t,e,0],u)}function s5i({x:t,y:e,holeDiameter:n,thickness:o}){const i=o*1.5,r=n/2+Cs;return(0,Lze.cylinder)({center:[t,e,0],radius:r,height:i,segments:df})}function Dan(t){const e=omt(t),n=[...Mr(t).pcb_via.list()],o=new Map;for(const i of n){const s=`${e.get(i.pcb_via_id)?.pcb_board_id??\"\"}:${i.x}:${i.y}`,a=o.get(s)??[];a.push(i),o.set(s,a)}for(const i of Mr(t).pcb_trace.list()){const r=e.get(i.pcb_trace_id);for(const[s,a]of i.route.entries()){if(a.route_type!==\"via\")continue;const A=`${r?.pcb_board_id??\"\"}:${a.x}:${a.y}`,c=o.get(A)??[];if(c.some(g=\u003eg.layers.includes(a.from_layer)\u0026\u0026g.layers.includes(a.to_layer)))continue;const u={type:\"pcb_via\",pcb_via_id:`${i.pcb_trace_id}_route_via_${s}`,pcb_trace_id:i.pcb_trace_id,subcircuit_id:i.subcircuit_id,pcb_group_id:i.pcb_group_id,x:a.x,y:a.y,layers:[a.from_layer,a.to_layer],hole_diameter:a.hole_diameter??r?.min_via_hole_diameter??.25,outer_diameter:a.outer_diameter??r?.min_via_pad_diameter??.6,tented_on_top:a.tented_on_top,tented_on_bottom:a.tented_on_bottom};n.push(u),c.push(u),o.set(A,c)}}return n}var a5i=64,A5i=1,Hze=.05,Nan=[\"initializing\",\"processing_plated_holes\",\"processing_holes\",\"processing_cutouts\",\"processing_vias\",\"finalizing\",\"done\"],c5i=class{board;plated_holes;holes;pcb_vias;pcb_cutouts;boardGeom=null;platedHoleGeoms=[];viaGeoms=[];boardClipGeom=null;state=\"initializing\";currentIndex=0;ctx;onCompleteCallback;finalGeoms=[];constructor(t,e){this.onCompleteCallback=e;const n=t.filter(i=\u003ei.type===\"pcb_panel\"),o=Mr(t).pcb_board.list();if(n.length\u003e0){const i=n[0],r=o.find(s=\u003es.pcb_panel_id===i.pcb_panel_id);this.board={type:\"pcb_board\",pcb_board_id:i.pcb_panel_id,center:i.center,width:i.width,height:i.height,thickness:r?.thickness??1.4,material:r?.material??\"fr4\",num_layers:r?.num_layers??2,solder_mask_color:r?.solder_mask_color}}else{const i=o.filter(r=\u003e!r.pcb_panel_id);this.board=i[0]}this.plated_holes=Mr(t).pcb_plated_hole.list(),this.holes=Mr(t).pcb_hole.list(),this.pcb_vias=Dan(t),this.pcb_cutouts=Mr(t).pcb_cutout.list(),this.ctx={pcbThickness:this.board.thickness??1.2},this.initializeBoard()}initializeBoard(){const t=this.ctx.pcbThickness+2*A5i;this.board.outline\u0026\u0026this.board.outline.length\u003e0?(this.boardGeom=Rze({outline:this.board.outline},this.ctx.pcbThickness),this.boardClipGeom=Rze({outline:this.board.outline},t,{xyOutset:Hze})):(this.boardGeom=(0,og.cuboid)({size:[this.board.width,this.board.height,this.ctx.pcbThickness],center:[this.board.center.x,this.board.center.y,0]}),this.boardClipGeom=(0,og.cuboid)({size:[this.board.width+2*Hze,this.board.height+2*Hze,t],center:[this.board.center.x,this.board.center.y,0]})),this.state=\"processing_plated_holes\",this.currentIndex=0}goToNextState(){const t=Nan.indexOf(this.state);t!==-1\u0026\u0026(this.state=Nan[t+1],this.currentIndex=0)}step(t=1){if(this.state===\"done\"||!this.boardGeom)return!0;for(let e=0;e\u003ct\u0026\u0026this.state!==\"done\";e++)switch(this.state){case\"processing_plated_holes\":this.currentIndex\u003cthis.plated_holes.length?(this.processPlatedHole(this.plated_holes[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case\"processing_holes\":this.currentIndex\u003cthis.holes.length?(this.processHole(this.holes[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case\"processing_vias\":this.currentIndex\u003cthis.pcb_vias.length?(this.processVia(this.pcb_vias[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case\"processing_cutouts\":this.currentIndex\u003cthis.pcb_cutouts.length?(this.processCutout(this.pcb_cutouts[this.currentIndex]),this.currentIndex++):this.goToNextState();break;case\"finalizing\":this.finalize(),this.state=\"done\";break}return this.state===\"done\"}processCutout(t){if(!this.boardGeom)return;let e=null;const n=this.ctx.pcbThickness*1.5;switch(t.shape){case\"rect\":{const o=Man(t.width,t.height,IP(t));if(o\u003e0){const i=(0,og.roundedRectangle)({size:[t.width,t.height],roundRadius:o,segments:a5i});e=(0,kze.extrudeLinear)({height:n},i),e=(0,Vx.translate)([0,0,-n/2],e)}else e=(0,og.cuboid)({center:[0,0,0],size:[t.width,t.height,n]});if(t.rotation){const i=t.rotation*Math.PI/180;e=(0,Vx.rotateZ)(i,e)}e=(0,Vx.translate)([t.center.x,t.center.y,0],e);break}case\"circle\":e=(0,og.cylinder)({center:[t.center.x,t.center.y,0],radius:t.radius,height:n});break;case\"polygon\":{let o=t.points.map(r=\u003e[r.x,r.y]);if(o.length\u003c3){console.warn(`PCB Cutout [${t.pcb_cutout_id}] polygon has fewer than 3 points, skipping.`);break}Qan(o)\u0026\u0026(o=o.reverse());const i=(0,og.polygon)({points:o});e=(0,kze.extrudeLinear)({height:n},i),e=(0,Vx.translate)([0,0,-n/2],e);break}}e\u0026\u0026(this.boardGeom=(0,c1.subtract)(this.boardGeom,e))}processPlatedHole(t,e={}){if(this.boardGeom){if(t.shape===\"circle\"||t.shape===\"circular_hole_with_rect_pad\"){let n=null;if(t.shape===\"circular_hole_with_rect_pad\"){if(t.hole_shape\u0026\u0026t.hole_shape!==\"circle\"||t.pad_shape\u0026\u0026t.pad_shape!==\"rect\")return;n=(0,og.cylinder)({center:[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0),0],radius:t.hole_diameter/2+Cs,height:this.ctx.pcbThickness*1.5})}else n=(0,og.cylinder)({center:[t.x,t.y,0],radius:t.hole_diameter/2+Cs,height:this.ctx.pcbThickness*1.5});e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,n));const o=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(o)}else if(t.shape===\"pill\"||t.shape===\"oval\"){const n=t.hole_height\u003et.hole_width,o=n?t.hole_height:t.hole_width,i=n?t.hole_width:t.hole_height,r=i/2,s=Math.abs(o-i);let a;if(a=(0,c1.union)((0,og.cuboid)({center:[t.x,t.y,0],size:n?[i,s,this.ctx.pcbThickness*1.5]:[s,i,this.ctx.pcbThickness*1.5]}),(0,og.cylinder)({center:n?[t.x,t.y-s/2,0]:[t.x-s/2,t.y,0],radius:r,height:this.ctx.pcbThickness*1.5}),(0,og.cylinder)({center:n?[t.x,t.y+s/2,0]:[t.x+s/2,t.y,0],radius:r,height:this.ctx.pcbThickness*1.5})),t.ccw_rotation){const c=t.ccw_rotation*Math.PI/180;a=(0,Vx.translate)([t.x,t.y,0],(0,Vx.rotateZ)(c,(0,Vx.translate)([-t.x,-t.y,0],a)))}e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,a));const A=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(A)}else if(t.shape===\"pill_hole_with_rect_pad\"){if(t.hole_shape\u0026\u0026t.hole_shape!==\"pill\"||t.pad_shape\u0026\u0026t.pad_shape!==\"rect\")return;const n=t.hole_height\u003et.hole_width,o=n?t.hole_height:t.hole_width,i=n?t.hole_width:t.hole_height,r=i/2,s=Math.abs(o-i);let a;a=(0,c1.union)((0,og.cuboid)({center:[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0),0],size:n?[i,s,this.ctx.pcbThickness*1.5]:[s,i,this.ctx.pcbThickness*1.5]}),(0,og.cylinder)({center:n?[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0)-s/2,0]:[t.x+(t.hole_offset_x||0)-s/2,t.y+(t.hole_offset_y||0),0],radius:r,height:this.ctx.pcbThickness*1.5}),(0,og.cylinder)({center:n?[t.x+(t.hole_offset_x||0),t.y+(t.hole_offset_y||0)+s/2,0]:[t.x+(t.hole_offset_x||0)+s/2,t.y+(t.hole_offset_y||0),0],radius:r,height:this.ctx.pcbThickness*1.5})),e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,a));const A=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(A)}else if(t.shape===\"rotated_pill_hole_with_rect_pad\"){if(t.hole_shape\u0026\u0026t.hole_shape!==\"rotated_pill\"||t.pad_shape\u0026\u0026t.pad_shape!==\"rect\")return;const n=t.hole_width,o=t.hole_height,i=n\u003e=o,r=i?n:o,s=i?o:n,a=s/2,A=Math.abs(r-s),c=t.hole_offset_x||0,l=t.hole_offset_y||0;let u=(0,c1.union)((0,og.cuboid)({center:[0,0,0],size:i?[A,s,this.ctx.pcbThickness*1.5]:[s,A,this.ctx.pcbThickness*1.5]}),(0,og.cylinder)({center:i?[-A/2,0,0]:[0,-A/2,0],radius:a,height:this.ctx.pcbThickness*1.5}),(0,og.cylinder)({center:i?[A/2,0,0]:[0,A/2,0],radius:a,height:this.ctx.pcbThickness*1.5}));const g=(t.hole_ccw_rotation||0)*Math.PI/180,h=c*Math.cos(g)-l*Math.sin(g),d=c*Math.sin(g)+l*Math.cos(g);u=(0,Vx.rotateZ)(g,u);const p=(0,Vx.translate)([t.x+h,t.y+d,0],u);e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,p));const m=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(m)}else if(t.shape===\"hole_with_polygon_pad\"){const n=t.pad_outline;if(!Array.isArray(n)||n.length\u003c3)return;const o=this.ctx.pcbThickness*1.5,i=Rpe(t,o,{sizeDelta:2*Cs}),r=Rpe(t,o,{sizeDelta:-2*Cs});if(!i||!r)return;e.dontCutBoard||(this.boardGeom=(0,c1.subtract)(this.boardGeom,i)),this.platedHoleGeoms=this.platedHoleGeoms.map(a=\u003e(0,qX.colorize)(Tc.copper,(0,c1.subtract)(a,r)));const s=XX(t,this.ctx,{clipGeom:this.boardClipGeom});this.platedHoleGeoms.push(s)}}}processHole(t){if(!this.boardGeom)return;const e=this.ctx.pcbThickness*1.5;if(t.hole_shape===\"circle\"){const n=(0,og.cylinder)({center:[t.x,t.y,0],radius:t.hole_diameter/2+Cs,height:e});this.boardGeom=(0,c1.subtract)(this.boardGeom,n);const o=(0,og.cylinder)({center:[t.x,t.y,0],radius:t.hole_diameter/2+Cs/2,height:e});this.platedHoleGeoms=this.platedHoleGeoms.map(i=\u003e(0,qX.colorize)(Tc.copper,(0,c1.subtract)(i,o)))}else if(t.hole_shape===\"pill\"||t.hole_shape===\"rotated_pill\"||t.hole_shape===\"rect\"||t.hole_shape===\"oval\"){const n=t.hole_width??t.hole_diameter,o=t.hole_height??t.hole_diameter,i=t.ccw_rotation??t.rotation??0,r=.02,s=(c,l,u,g)=\u003e{if(c\u003c=0||l\u003c=0)return null;if(t.hole_shape===\"rect\")return(0,og.cuboid)({center:[0,0,0],size:[c,l,u]});if(g)return(0,Vx.translate)([0,0,-u/2],(0,kze.extrudeLinear)({height:u},(0,og.ellipse)({radius:[c/2,l/2]})));const h=Math.min(c,l)/2,d=Math.abs(c-l);return c\u003el?(0,c1.union)((0,og.cuboid)({center:[0,0,0],size:[d,l,u]}),(0,og.cylinder)({center:[-d/2,0,0],radius:h,height:u}),(0,og.cylinder)({center:[d/2,0,0],radius:h,height:u})):(0,c1.union)((0,og.cuboid)({center:[0,0,0],size:[c,d,u]}),(0,og.cylinder)({center:[0,-d/2,0],radius:h,height:u}),(0,og.cylinder)({center:[0,d/2,0],radius:h,height:u}))};let a=s(n,o,e,t.hole_shape===\"oval\"),A=s(n-2*r,o-2*r,e,t.hole_shape===\"oval\");if(a\u0026\u0026i!==0\u0026\u0026(a=(0,Vx.rotateZ)(i*Math.PI/180,a)),A\u0026\u0026i!==0\u0026\u0026(A=(0,Vx.rotateZ)(i*Math.PI/180,A)),a){const c=(0,Vx.translate)([t.x,t.y,0],a);this.boardGeom=(0,c1.subtract)(this.boardGeom,c)}if(A){const c=(0,Vx.translate)([t.x,t.y,0],A);this.platedHoleGeoms=this.platedHoleGeoms.map(l=\u003e(0,qX.colorize)(Tc.copper,(0,c1.subtract)(l,c)))}}}processVia(t){if(this.boardGeom){if(typeof t.outer_diameter==\"number\"\u0026\u0026typeof t.hole_diameter==\"number\"){const e=r5i({x:t.x,y:t.y,outerDiameter:t.outer_diameter,holeDiameter:t.hole_diameter,thickness:this.ctx.pcbThickness});let n=e;this.boardClipGeom\u0026\u0026(n=(0,c1.intersect)(this.boardClipGeom,e),n=(0,qX.colorize)(Tc.copper,n)),this.viaGeoms.push(n)}if(typeof t.hole_diameter==\"number\"){const e=s5i({x:t.x,y:t.y,holeDiameter:t.hole_diameter,thickness:this.ctx.pcbThickness});this.boardGeom=(0,c1.subtract)(this.boardGeom,e)}}}finalize(){if(!this.boardGeom)return;const t=Tze(this.board);this.boardGeom=(0,qX.colorize)([t.r,t.g,t.b],this.boardGeom),this.finalGeoms=[this.boardGeom,...this.platedHoleGeoms,...this.viaGeoms],this.onCompleteCallback\u0026\u0026this.onCompleteCallback(this.finalGeoms)}getGeoms(){return this.finalGeoms}},l5i=t=\u003e{const[e,n]=ee.useState(null),o=ee.useRef(!1);return ee.useEffect(()=\u003e{let i=!1;if(!t){n(null);return}if(!t.some(c=\u003ec.type===\"pcb_board\"||c.type===\"pcb_panel\")){n(null);return}const s=jEi(t);n(s);const a=new c5i(t,c=\u003e{});return(async()=\u003e{if(!o.current){o.current=!0;try{let c=!1;for(;!c\u0026\u0026!i;)c=a.step(1),c||await new Promise(l=\u003esetTimeout(l,0));i||n(a.getGeoms())}catch(c){console.error(\"Error during board geometry building:\",c)}finally{o.current=!1}}})(),()=\u003e{i=!0}},[t]),e},u5i=({children:t,parent:e,position:n,rotation:o,scale:i,color:r,fontSize:s,anchorX:a,anchorY:A,depthOffset:c})=\u003e{const{rootObject:l}=uf(),u=ee.useMemo(()=\u003e{const g=new Rke;return g.text=t,n\u0026\u0026g.position.fromArray(n),o\u0026\u0026g.rotation.fromArray(o),i\u0026\u0026g.scale.fromArray(i),g.color=r||\"white\",g.fontSize=s||1,g.anchorX=a||\"center\",g.anchorY=A||\"middle\",g.depthOffset=c||0,g.font=null,g.sync(),g},[t,n,o,i,r,s,a,A,c]);return ee.useEffect(()=\u003e{const g=e||l;if(!(!g||!u))return g.add(u),()=\u003e{g.remove(u),u.dispose()}},[l,e,u]),null},Ran=({error:t,cad_component:e})=\u003e{const{rootObject:n}=uf(),[o,i]=ee.useState(!1),[r,s]=ee.useState(null),a=ee.useCallback(u=\u003e{u?.mousePosition?(i(!0),s(u.mousePosition)):(i(!1),s(null))},[]),A=ee.useCallback(()=\u003e{i(!1),s(null)},[]),c=ee.useMemo(()=\u003ee?.position?[e.position.x,e.position.y,e.position.z].map(g=\u003eNumber.isNaN(g)?0:g):[0,0,0],[e]),l=ee.useMemo(()=\u003e{const u=new lh;return u.position.fromArray(c),u},[c]);return l.userData.cad_component_id=e?.cad_component_id,l.userData.pcb_component_id=e?.pcb_component_id,ee.useEffect(()=\u003e{if(n)return n.add(l),()=\u003e{n.remove(l)}},[n,l]),K.jsxs(K.Fragment,{children:[K.jsxs(jX,{isHovered:o,onHover:a,onUnhover:A,object:l,children:[K.jsx(g5i,{parent:l}),K.jsx(u5i,{parent:l,scale:[.1,.1,.1],color:\"red\",anchorX:\"center\",anchorY:\"middle\",depthOffset:-99999,children:`${t.toString().slice(0,50)}...`})]}),o\u0026\u0026r?K.jsx(Prn,{position:r,style:{fontFamily:\"sans-serif\",transform:\"translate3d(-1rem, 0rem, 0)\",backgroundColor:\"white\",padding:\"6px\",borderRadius:\"4px\",color:\"red\",pointerEvents:\"none\",userSelect:\"none\",WebkitUserSelect:\"none\",MozUserSelect:\"none\",msUserSelect:\"none\"},children:t.toString()}):null]})},g5i=({parent:t})=\u003e{const e=ee.useMemo(()=\u003e{const n=new Er(new Yx(.5,.5,.5),new su({depthTest:!1,transparent:!0,color:\"red\",opacity:.5}));return n.renderOrder=999999,n.rotation.fromArray([Math.PI/4,Math.PI/4,0]),n},[]);return ee.useEffect(()=\u003e(t.add(e),()=\u003e{t.remove(e)}),[t,e]),null},d5i=t=\u003e{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(let r=1;r\u003ct.length;r++){const s=t[r];s.x\u003ce\u0026\u0026(e=s.x),s.y\u003cn\u0026\u0026(n=s.y),s.x\u003eo\u0026\u0026(o=s.x),s.y\u003ei\u0026\u0026(i=s.y)}return{minX:e,minY:n,maxX:o,maxY:i}};function DC(t){if(t.outline\u0026\u0026t.outline.length\u003e=3){const s=d5i(t.outline);return{...s,width:s.maxX-s.minX,height:s.maxY-s.minY,centerX:(s.minX+s.maxX)/2,centerY:(s.minY+s.maxY)/2}}const e=t.width??0,n=t.height??0,o=t.center?.x??0,i=t.center?.y??0;return{...{minX:o-e/2,maxX:o+e/2,minY:i-n/2,maxY:i+n/2},width:e,height:n,centerX:o,centerY:i}}function h5i({layer:t,circuitJson:e,boardData:n,copperColor:o,traceTextureResolution:i}){const s=Mr(e).pcb_smtpad.list().filter(y=\u003ey.layer===t);if(s.length===0)return null;const a=Mr(e).pcb_hole.list(),A=Mr(e).pcb_plated_hole.list().filter(y=\u003e!Array.isArray(y.layers)||y.layers.includes(t)),c=Mr(e).pcb_via.list().filter(y=\u003e!Array.isArray(y.layers)||y.layers.includes(t)),l=Mr(e).pcb_cutout.list(),u=[...a,...A,...c],g=t===\"top\"?\"top_copper\":\"bottom_copper\",h=DC(n),d=document.createElement(\"canvas\"),p=Math.floor(h.width*i),m=Math.floor(h.height*i);d.width=p,d.height=m;const _=d.getContext(\"2d\");if(!_)return null;t===\"bottom\"\u0026\u0026(_.translate(0,m),_.scale(1,-1));const f=\"rgba(0,0,0,0)\",I=new xl(_);I.configure({colorOverrides:{copper:{top:o,bottom:o,inner1:o,inner2:o,inner3:o,inner4:o,inner5:o,inner6:o,inner7:o,inner8:o},copperPour:{top:f,bottom:f},drill:f,boardOutline:f,substrate:f,keepout:{top:f,bottom:f},fabricationNote:f,courtyard:{top:f,bottom:f},silkscreen:{top:f,bottom:f},soldermask:{top:f,bottom:f},soldermaskWithCopperUnderneath:{top:f,bottom:f},soldermaskOverCopper:{top:f,bottom:f}}}),I.setCameraBounds({minX:h.minX,maxX:h.maxX,minY:h.minY,maxY:h.maxY}),I.drawElements([...s,...u,...l],{layers:[g],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1});const C=new Ux(d);return C.generateMipmaps=!0,C.minFilter=gm,C.magFilter=Fl,C.anisotropy=16,C.needsUpdate=!0,C}var p5i=t=\u003e{const e=t.filter(n=\u003en.type===\"pcb_panel\");return e.length===0?null:e.length===1?e[0].pcb_panel_id:null};function m5i({layer:t,circuitJson:e,panelData:n,outlineColor:o=\"black\",traceTextureResolution:i}){const r=p5i(e);if(!r)return null;const a=Mr(e).pcb_board.list().filter(p=\u003ep.pcb_panel_id===r||p.position_mode===\"relative_to_panel_anchor\"\u0026\u0026!p.pcb_panel_id);if(a.length===0)return null;const A=document.createElement(\"canvas\"),c=Math.floor(n.width*i),l=Math.floor(n.height*i);A.width=c,A.height=l;const u=A.getContext(\"2d\");if(!u)return null;t===\"bottom\"\u0026\u0026(u.translate(0,l),u.scale(1,-1)),u.strokeStyle=o,u.lineWidth=.05*i;const g=p=\u003e(p-n.center.x+n.width/2)*i,h=p=\u003e(-(p-n.center.y)+n.height/2)*i;a.forEach(p=\u003e{if(p.outline\u0026\u0026p.outline.length\u003e=2)u.beginPath(),p.outline.forEach((m,_)=\u003e{const f=g(m.x),I=h(m.y);_===0?u.moveTo(f,I):u.lineTo(f,I)}),u.closePath(),u.stroke();else{const m=p.width,_=p.height,{x:f,y:I}=p.center,C=g(f-m/2),y=h(I+_/2);u.strokeRect(C,y,m*i,_*i)}});const d=new Ux(A);return d.generateMipmaps=!0,d.minFilter=gm,d.magFilter=Fl,d.anisotropy=16,d.needsUpdate=!0,d}function _5i({layer:t,circuitJson:e,boardData:n,traceColor:o,traceTextureResolution:i}){const r=Mr(e).pcb_trace.list(),s=Mr(e).pcb_via.list(),a=Mr(e).pcb_plated_hole.list(),A=t===\"top\"?\"top_copper\":\"bottom_copper\",c=r.filter(C=\u003eumt(C).includes(A));if(c.length===0)return null;const l=a.filter(C=\u003eC.layers.includes(t)),u=[...c,...s,...l],g=DC(n),h=document.createElement(\"canvas\"),d=Math.floor(g.width*i),p=Math.floor(g.height*i);h.width=d,h.height=p;const m=h.getContext(\"2d\");if(!m)return null;t===\"bottom\"\u0026\u0026(m.translate(0,p),m.scale(1,-1));const _=\"rgba(0,0,0,0)\",f=new xl(m);f.configure({colorOverrides:{copper:{top:o,bottom:o,inner1:o,inner2:o,inner3:o,inner4:o,inner5:o,inner6:o,inner7:o,inner8:o},copperPour:{top:_,bottom:_},drill:_,boardOutline:_,substrate:_,keepout:{top:_,bottom:_},fabricationNote:_,courtyard:{top:_,bottom:_},silkscreen:{top:_,bottom:_},soldermask:{top:_,bottom:_},soldermaskWithCopperUnderneath:{top:_,bottom:_},soldermaskOverCopper:{top:_,bottom:_}}}),f.setCameraBounds({minX:g.minX,maxX:g.maxX,minY:g.minY,maxY:g.maxY}),f.drawElements(u,{layers:[A],clipContextElements:e,drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1});const I=new Ux(h);return I.generateMipmaps=!0,I.minFilter=gm,I.magFilter=Fl,I.anisotropy=16,I.needsUpdate=!0,I}var f5i=t=\u003e{const[e=0,n=0,o=0]=t;return`rgb(${Math.round(e*255)}, ${Math.round(n*255)}, ${Math.round(o*255)})`},I5i=8;function Tan({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4,copperColor:i=f5i(Tc.copper),onlyCoveredBySoldermask:r=!1}){const s=e.filter(S=\u003eS.type===\"pcb_copper_pour\"),a=t===\"top\"?\"top_copper\":\"bottom_copper\",A=s.filter(S=\u003eS.layer===t\u0026\u0026(!r||S.covered_with_solder_mask!==!1));if(A.length===0)return null;const c=e.filter(S=\u003eS.type===\"pcb_hole\"),l=e.filter(S=\u003eS.type!==\"pcb_plated_hole\"?!1:!Array.isArray(S.layers)||S.layers.includes(t)),u=e.filter(S=\u003eS.type!==\"pcb_via\"?!1:!Array.isArray(S.layers)||S.layers.includes(t)),g=[...c,...l,...u],h=DC(n),d=document.createElement(\"canvas\"),p=Math.floor(h.width*o),m=Math.floor(h.height*o);d.width=p,d.height=m;const _=d.getContext(\"2d\");if(!_)return null;t===\"bottom\"\u0026\u0026(_.translate(0,m),_.scale(1,-1));const f=\"rgba(0,0,0,0)\",I=i,C=i,y=(S,Q)=\u003e{if(S.length===0)return;const w=[...S,...g],M=new xl(_);M.configure({colorOverrides:{copper:{top:Q,bottom:Q,inner1:Q,inner2:Q,inner3:Q,inner4:Q,inner5:Q,inner6:Q,inner7:Q,inner8:Q},copperPour:{top:f,bottom:f},drill:f,boardOutline:f,substrate:f,keepout:{top:f,bottom:f},fabricationNote:f,courtyard:{top:f,bottom:f},silkscreen:{top:f,bottom:f},soldermask:{top:f,bottom:f},soldermaskWithCopperUnderneath:{top:f,bottom:f},soldermaskOverCopper:{top:f,bottom:f}}}),M.setCameraBounds({minX:h.minX,maxX:h.maxX,minY:h.minY,maxY:h.maxY}),M.drawElements(w,{layers:[a],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1});for(let k=1;k\u003cI5i;k+=1)M.drawElements(w,{layers:[a],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1})},x=A.filter(S=\u003eS.covered_with_solder_mask!==!1),E=A.filter(S=\u003eS.covered_with_solder_mask===!1);y(x,I),r||y(E,C);const B=new Ux(d);return B.generateMipmaps=!0,B.minFilter=gm,B.magFilter=Fl,B.anisotropy=16,B.needsUpdate=!0,B}var kan=(t,e)=\u003e{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},C5i=({ctx:t,layer:e,bounds:n,elements:o,copperColor:i})=\u003e{const r=e===\"top\"?\"top_copper\":\"bottom_copper\",s=new xl(t);s.configure({colorOverrides:{copper:{top:i,bottom:i,inner1:i,inner2:i,inner3:i,inner4:i,inner5:i,inner6:i,inner7:i,inner8:i}}}),kan(s,n),s.drawElements(o,{layers:[r]});const a=o.filter(u=\u003eu.type===\"pcb_copper_text\"\u0026\u0026u.is_knockout===!0);if(a.length===0)return;const A=document.createElement(\"canvas\");A.width=t.canvas.width,A.height=t.canvas.height;const c=A.getContext(\"2d\");if(!c)return;const l=new xl(c);l.configure({colorOverrides:{copper:{top:\"rgb(255,255,255)\",bottom:\"rgb(255,255,255)\",inner1:\"rgb(255,255,255)\",inner2:\"rgb(255,255,255)\",inner3:\"rgb(255,255,255)\",inner4:\"rgb(255,255,255)\",inner5:\"rgb(255,255,255)\",inner6:\"rgb(255,255,255)\",inner7:\"rgb(255,255,255)\",inner8:\"rgb(255,255,255)\"}}}),kan(l,n),l.drawElements(a.map(u=\u003e({...u,is_knockout:!1})),{layers:[r]}),t.save(),t.globalCompositeOperation=\"destination-out\",t.drawImage(A,0,0),t.restore()};function y5i({layer:t,circuitJson:e,boardData:n,copperColor:o=\"rgb(230, 153, 51)\",traceTextureResolution:i=m4}){const r=e.filter(g=\u003eg.type===\"pcb_copper_text\"\u0026\u0026\"layer\"in g\u0026\u0026g.layer===t);if(r.length===0)return null;const s=DC(n),a=Math.floor(s.width*i),A=Math.floor(s.height*i);if(a\u003c=0||A\u003c=0)return null;const c=document.createElement(\"canvas\");c.width=a,c.height=A;const l=c.getContext(\"2d\");if(!l)return null;t===\"bottom\"\u0026\u0026(l.translate(0,A),l.scale(1,-1)),C5i({ctx:l,layer:t,bounds:s,elements:r,copperColor:o});const u=new Ux(c);return u.generateMipmaps=!0,u.minFilter=gm,u.magFilter=Fl,u.anisotropy=16,u.needsUpdate=!0,u}var Fan=25.4,x5i=Fan/1e3,E5i=/^\\s*(-?\\d*(?:\\.\\d+)?)(?:\\s*(mm|mil|inch|in|\"))?\\s*$/i;function B5i(t){if(!t)return;const e=t.trim().toLowerCase();return e==='\"'||e===\"inch\"?\"in\":e}function kpe(t){if(t==null)return;if(typeof t==\"number\")return Number.isFinite(t)?t:void 0;if(typeof t!=\"string\")return;const e=t.trim();if(e.length===0)return;const n=e.match(E5i);if(!n){const a=Number.parseFloat(e);return Number.isFinite(a)?a:void 0}const[,o,i]=n,r=Number.parseFloat(o||\"0\");if(!Number.isFinite(r))return;switch(B5i(i)){case\"mil\":return r*x5i;case\"in\":return r*Fan;case\"mm\":case void 0:return r;default:return r}}function k0(t,e){const n=kpe(t);return n===void 0?e:n}var b5i=\"rgb(255,243,204)\",ig=\"rgba(0,0,0,0)\",S5i=(t,e)=\u003e{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},Q5i=t=\u003et.type===\"pcb_fabrication_note_rect\"?{...t,width:kpe(t.width)??0,height:kpe(t.height)??0,stroke_width:k0(t.stroke_width,.1),corner_radius:kpe(t.corner_radius)}:t.type===\"pcb_fabrication_note_path\"?{...t,stroke_width:k0(t.stroke_width,.1)}:t.type===\"pcb_fabrication_note_text\"?{...t,font_size:k0(t.font_size,1)}:t.type===\"pcb_fabrication_note_dimension\"?{...t,font_size:k0(t.font_size,1),arrow_size:k0(t.arrow_size,1),offset_distance:k0(t.offset_distance,0)}:t,v5i=({ctx:t,layer:e,bounds:n,elements:o})=\u003e{const i=`${e}_fabrication_note`,r=o.map(Q5i),s=new xl(t);s.configure({colorOverrides:{copper:{top:ig,bottom:ig,inner1:ig,inner2:ig,inner3:ig,inner4:ig,inner5:ig,inner6:ig,inner7:ig,inner8:ig},copperPour:{top:ig,bottom:ig},drill:ig,boardOutline:ig,substrate:ig,keepout:{top:ig,bottom:ig},courtyard:{top:ig,bottom:ig},soldermask:{top:ig,bottom:ig},soldermaskWithCopperUnderneath:{top:ig,bottom:ig},soldermaskOverCopper:{top:ig,bottom:ig},silkscreen:{top:ig,bottom:ig},fabricationNote:b5i}}),S5i(s,n),s.drawElements(r,{layers:[i]})},w5i=t=\u003e({minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2,width:t.width,height:t.height,centerX:t.center.x,centerY:t.center.y}),P5i=(t,e)=\u003e{const n=Math.min(t.minX,e.minX),o=Math.max(t.maxX,e.maxX),i=Math.min(t.minY,e.minY),r=Math.max(t.maxY,e.maxY);return{minX:n,maxX:o,minY:i,maxY:r,width:o-n,height:r-i,centerX:(n+o)/2,centerY:(i+r)/2}},Fpe=(t,e)=\u003e{const n=t.filter(s=\u003es.type===\"pcb_panel\"),o=t.filter(s=\u003es.type===\"pcb_board\"),i=n.find(s=\u003es.pcb_panel_id===e.pcb_board_id)??n[0];return i\u0026\u0026i.width\u003e0\u0026\u0026i.height\u003e0?w5i(i):(o.length\u003e1?o:[e]).map(s=\u003eDC(s)).reduce((s,a)=\u003eP5i(s,a))},M5i=(t,e)=\u003e{if(!(\"layer\"in t)||t.layer!==e)return!1;const n=t.type;return n.startsWith(\"pcb_fabrication_note_\")\u0026\u0026n!==\"pcb_fabrication_note_text\"};function D5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4}){const i=e.filter(u=\u003eM5i(u,t));if(i.length===0)return null;const r=Fpe(e,n),s=Math.floor(r.width*o),a=Math.floor(r.height*o);if(s\u003c=0||a\u003c=0)return null;const A=document.createElement(\"canvas\");A.width=s,A.height=a;const c=A.getContext(\"2d\");if(!c)return null;t===\"bottom\"\u0026\u0026(c.translate(0,a),c.scale(1,-1)),v5i({ctx:c,layer:t,bounds:r,elements:i});const l=new Ux(A);return l.generateMipmaps=!0,l.minFilter=gm,l.magFilter=Fl,l.anisotropy=16,l.needsUpdate=!0,l}var N5i=(t,e)=\u003e{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},R5i=({ctx:t,layer:e,bounds:n,elements:o,keepoutColor:i})=\u003e{const r=e===\"top\"?\"top_copper\":\"bottom_copper\",s=new xl(t);s.configure({colorOverrides:{keepout:{top:i,bottom:i}}}),N5i(s,n),s.drawElements(o,{layers:[r],drawSoldermask:!1,drawSoldermaskTop:!1,drawSoldermaskBottom:!1})},T5i=(t,e)=\u003et.type!==\"pcb_keepout\"?!1:!(\"layers\"in t)||!Array.isArray(t.layers)?!0:t.layers.includes(e);function k5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4,keepoutColor:i=t===\"bottom\"?\"#4b72d2\":\"#d24b4b\"}){const r=e.filter(g=\u003eT5i(g,t));if(r.length===0)return null;const s=DC(n),a=Math.floor(s.width*o),A=Math.floor(s.height*o);if(a\u003c=0||A\u003c=0)return null;const c=document.createElement(\"canvas\");c.width=a,c.height=A;const l=c.getContext(\"2d\");if(!l)return null;t===\"bottom\"\u0026\u0026(l.translate(0,A),l.scale(1,-1)),R5i({ctx:l,layer:t,bounds:s,elements:r,keepoutColor:i});const u=new Ux(c);return u.generateMipmaps=!0,u.minFilter=gm,u.magFilter=Fl,u.anisotropy=16,u.needsUpdate=!0,u}var Nu=\"rgba(0,0,0,0)\",F5i=(t,e)=\u003e{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},L5i=t=\u003et.type===\"pcb_note_line\"?{...t,x1:k0(t.x1,0),y1:k0(t.y1,0),x2:k0(t.x2,0),y2:k0(t.y2,0),stroke_width:k0(t.stroke_width,.1)}:t.type===\"pcb_note_rect\"?{...t,center:{x:k0(t.center.x,0),y:k0(t.center.y,0)},width:k0(t.width,0),height:k0(t.height,0),stroke_width:k0(t.stroke_width,.1),corner_radius:k0(t.corner_radius,0)}:t.type===\"pcb_note_text\"?{...t,anchor_position:{x:k0(t.anchor_position.x,0),y:k0(t.anchor_position.y,0)},font_size:k0(t.font_size,1)}:t.type===\"pcb_note_path\"?{...t,route:t.route.map(e=\u003e({...e,x:k0(e.x,0),y:k0(e.y,0)})),stroke_width:k0(t.stroke_width,.1)}:t.type===\"pcb_note_dimension\"?{...t,from:{x:k0(t.from.x,0),y:k0(t.from.y,0)},to:{x:k0(t.to.x,0),y:k0(t.to.y,0)},font_size:k0(t.font_size,1),arrow_size:k0(t.arrow_size,1),offset_distance:k0(t.offset_distance,0)}:t,H5i=({ctx:t,bounds:e,elements:n})=\u003e{const o=n.map(L5i),i=new xl(t);i.configure({colorOverrides:{copper:{top:Nu,bottom:Nu,inner1:Nu,inner2:Nu,inner3:Nu,inner4:Nu,inner5:Nu,inner6:Nu,inner7:Nu,inner8:Nu},copperPour:{top:Nu,bottom:Nu},drill:Nu,boardOutline:Nu,substrate:Nu,keepout:{top:Nu,bottom:Nu},courtyard:{top:Nu,bottom:Nu},soldermask:{top:Nu,bottom:Nu},soldermaskWithCopperUnderneath:{top:Nu,bottom:Nu},soldermaskOverCopper:{top:Nu,bottom:Nu},silkscreen:{top:Nu,bottom:Nu},fabricationNote:Nu}}),F5i(i,e),i.drawElements(o)},O5i=(t,e)=\u003e!(\"layer\"in t)||t.layer!==e?!1:t.type.startsWith(\"pcb_note_\");function G5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4}){const i=e.filter(u=\u003eO5i(u,t));if(i.length===0)return null;const r=Fpe(e,n),s=Math.floor(r.width*o),a=Math.floor(r.height*o);if(s\u003c=0||a\u003c=0)return null;const A=document.createElement(\"canvas\");A.width=s,A.height=a;const c=A.getContext(\"2d\");if(!c)return null;t===\"bottom\"\u0026\u0026(c.translate(0,a),c.scale(1,-1)),H5i({ctx:c,bounds:r,elements:i});const l=new Ux(A);return l.generateMipmaps=!0,l.minFilter=gm,l.magFilter=Fl,l.anisotropy=16,l.needsUpdate=!0,l}var Y5i=\"rgb(255,243,204)\",bd=\"rgba(0,0,0,0)\",Lan=(t,e,n)=\u003e{const o=e===\"top\"?t.tented_on_top:t.tented_on_bottom,i=\"is_tented\"in t?t.is_tented:void 0,r=e===\"top\"?n?.default_via_tented_on_top:n?.default_via_tented_on_bottom;return o??i??r??!1},U5i=(t,e,n,o)=\u003et.type===\"pcb_cutout\"?!0:t.type===\"pcb_via\"?!o||!Lan(t,e,n):t.type===\"pcb_hole\"||t.type===\"pcb_plated_hole\"?!o||t.is_covered_with_solder_mask!==!0:!1,K5i=(t,e)=\u003e{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},V5i=({ctx:t,layer:e,bounds:n,elements:o,circuitJson:i,silkscreenColor:r,soldermaskVisible:s})=\u003e{const a=e===\"top\"?\"top_silkscreen\":\"bottom_silkscreen\",A=new xl(t);A.configure({colorOverrides:{copper:{top:bd,bottom:bd,inner1:bd,inner2:bd,inner3:bd,inner4:bd,inner5:bd,inner6:bd,inner7:bd,inner8:bd},copperPour:{top:bd,bottom:bd},drill:bd,boardOutline:bd,substrate:bd,keepout:{top:bd,bottom:bd},courtyard:{top:bd,bottom:bd},soldermask:{top:bd,bottom:bd},soldermaskWithCopperUnderneath:{top:bd,bottom:bd},soldermaskOverCopper:{top:bd,bottom:bd},silkscreen:{top:r,bottom:r},fabricationNote:Y5i}}),K5i(A,n),A.drawElements(o,{layers:[a],clipContextElements:i});const c=i.flatMap(l=\u003e{if(l.type===\"pcb_trace\"){const g=t.boardOwnerMap?.get(l.pcb_trace_id),h=l.route.filter(d=\u003ed.route_type===\"via\"\u0026\u0026(!s||!Lan(d,e,g)));return h.length?[{...l,route:h}]:[]}const u=l.type===\"pcb_via\"?t.boardOwnerMap?.get(l.pcb_via_id):void 0;return U5i(l,e,u,s)?[l]:[]});A.drawElements(c,{layers:[a],clipContextElements:i,clearDrillHoles:!0})},z5i=(t,e)=\u003e!(\"layer\"in t)||t.layer!==e?!1:t.type.startsWith(\"pcb_silkscreen_\");function J5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4,silkscreenColor:i=\"rgb(255,255,255)\",soldermaskVisible:r=!0}){const s=e.filter(h=\u003ez5i(h,t));if(s.length===0)return null;const a=Fpe(e,n),A=Math.floor(a.width*o),c=Math.floor(a.height*o);if(A\u003c=0||c\u003c=0)return null;const l=document.createElement(\"canvas\");l.width=A,l.height=c;const u=l.getContext(\"2d\");if(!u)return null;t===\"bottom\"\u0026\u0026(u.translate(0,c),u.scale(1,-1)),V5i({ctx:u,layer:t,bounds:a,elements:s,circuitJson:e,silkscreenColor:i,soldermaskVisible:r});const g=new Ux(l);return g.generateMipmaps=!0,g.minFilter=gm,g.magFilter=Fl,g.anisotropy=16,g.needsUpdate=!0,g}var ZX=t=\u003e{const[e=0,n=0,o=0]=t;return`rgb(${Math.round(e*255)}, ${Math.round(n*255)}, ${Math.round(o*255)})`},W5i=t=\u003e{const e=ZX(FEi[t.material]??Tc.fr4SolderMaskGreen),n=t.material===\"fr1\"?ZX(Tc.fr1TracesWithMaskCopper):ZX(Tc.fr4TracesWithMaskGreen),o=van(t.solder_mask_color);if(!o)return{soldermask:e,soldermaskOverCopper:n,copper:ZX(Tc.copper),transparent:\"rgba(0,0,0,0)\"};const i=new Vi().setRGB(Tc.copper[0],Tc.copper[1],Tc.copper[2],Ox);return{soldermask:wan(o),soldermaskOverCopper:wan(JEi({soldermaskColor:o,copperColor:i,soldermaskOpacity:VEi(t.solder_mask_color)})),copper:ZX(Tc.copper),transparent:\"rgba(0,0,0,0)\"}},Han=(t,e)=\u003e{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},j5i=({ctx:t,layer:e,bounds:n,elements:o,boardData:i})=\u003e{const r=W5i(i),s=e===\"top\"?\"top_copper\":\"bottom_copper\",a=new xl(t);a.configure({colorOverrides:{copper:{top:r.transparent,bottom:r.transparent,inner1:r.transparent,inner2:r.transparent,inner3:r.transparent,inner4:r.transparent,inner5:r.transparent,inner6:r.transparent,inner7:r.transparent,inner8:r.transparent},drill:r.transparent,boardOutline:r.transparent,substrate:r.transparent,keepout:{top:r.transparent,bottom:r.transparent},fabricationNote:r.transparent,silkscreen:{top:r.transparent,bottom:r.transparent},courtyard:{top:r.transparent,bottom:r.transparent},soldermask:{top:r.soldermask,bottom:r.soldermask},soldermaskWithCopperUnderneath:{top:r.soldermaskOverCopper,bottom:r.soldermaskOverCopper},soldermaskOverCopper:{top:r.soldermaskOverCopper,bottom:r.soldermaskOverCopper}}}),Han(a,n);const A=o.filter(l=\u003el.type!==\"pcb_keepout\");a.drawElements(A,{layers:[s],drawSoldermask:!0,drawSoldermaskTop:e===\"top\",drawSoldermaskBottom:e===\"bottom\"});const c=A.filter(l=\u003el.type===\"pcb_copper_pour\"\u0026\u0026l.layer===e\u0026\u0026l.covered_with_solder_mask===!1);if(c.length\u003e0){t.save(),t.globalCompositeOperation=\"destination-out\";const l=new xl(t);l.configure({colorOverrides:{copper:{top:r.copper,bottom:r.copper,inner1:r.copper,inner2:r.copper,inner3:r.copper,inner4:r.copper,inner5:r.copper,inner6:r.copper,inner7:r.copper,inner8:r.copper}}}),Han(l,n),l.drawElements(c,{layers:[s]}),t.restore()}};function $5i({layer:t,circuitJson:e,boardData:n,traceTextureResolution:o=m4}){const i=Fpe(e,n),r=Math.floor(i.width*o),s=Math.floor(i.height*o);if(r\u003c=0||s\u003c=0)return null;const a=document.createElement(\"canvas\");a.width=r,a.height=s;const A=a.getContext(\"2d\");if(!A)return null;t===\"bottom\"\u0026\u0026(A.translate(0,s),A.scale(1,-1));const c=e.some(u=\u003eu.type===\"pcb_board\")?e:[n,...e];j5i({ctx:A,layer:t,bounds:i,elements:c,boardData:n});const l=new Ux(a);return l.generateMipmaps=!0,l.minFilter=gm,l.magFilter=Fl,l.anisotropy=16,l.needsUpdate=!0,l}var q5i=(t,e)=\u003e{t.setCameraBounds({minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY})},X5i=({ctx:t,layer:e,bounds:n,elements:o,copperColor:i})=\u003e{const r=e===\"top\"?\"top_copper\":\"bottom_copper\",s=\"rgba(0,0,0,0)\",a=new xl(t);a.configure({colorOverrides:{copper:{top:i,bottom:i,inner1:i,inner2:i,inner3:i,inner4:i,inner5:i,inner6:i,inner7:i,inner8:i},drill:s,boardOutline:s,substrate:s,keepout:{top:s,bottom:s},fabricationNote:s,silkscreen:{top:s,bottom:s},courtyard:{top:s,bottom:s},soldermask:{top:s,bottom:s},soldermaskWithCopperUnderneath:{top:s,bottom:s},soldermaskOverCopper:{top:s,bottom:s}}}),q5i(a,n),a.drawElements(o,{layers:[r]})};function Z5i({layer:t,circuitJson:e,boardData:n,copperColor:o=\"rgb(230, 153, 51)\",traceTextureResolution:i=m4}){const r=e.filter(g=\u003e{if(g.type===\"pcb_via\")return!0;if(g.type!==\"pcb_plated_hole\")return!1;const h=g;return!Array.isArray(h.layers)||h.layers.includes(t)});if(r.length===0)return null;const s=DC(n),a=Math.floor(s.width*i),A=Math.floor(s.height*i);if(a\u003c=0||A\u003c=0)return null;const c=document.createElement(\"canvas\");c.width=a,c.height=A;const l=c.getContext(\"2d\");if(!l)return null;t===\"bottom\"\u0026\u0026(l.translate(0,A),l.scale(1,-1)),X5i({ctx:l,layer:t,bounds:s,elements:r,copperColor:o});const u=new Ux(c);return u.generateMipmaps=!0,u.minFilter=gm,u.magFilter=Fl,u.anisotropy=16,u.needsUpdate=!0,u}var Oan=t=\u003e{const[e=0,n=0,o=0]=t;return`rgb(${Math.round(e*255)}, ${Math.round(n*255)}, ${Math.round(o*255)})`},Oze=t=\u003eMath.max(0,Math.min(255,t)),e4i=(t,e,n,o={})=\u003e{const i=t.getImageData(0,0,e,n),r=i.data,s=Math.max(e-1,1),a=Math.max(n-1,1);for(let A=0;A\u003cr.length;A+=4){if((r[A+3]??0)\u003c16)continue;const l=r[A]??0,u=r[A+1]??0,g=r[A+2]??0,h=.2126*l+.7152*u+.0722*g;if(!(u\u003el*1.35\u0026\u0026u\u003eg*1.15\u0026\u0026h\u003c90\u0026\u0026l\u003c80\u0026\u0026g\u003c80))continue;const p=A/4,m=p%e,_=Math.floor(p/e),f=m/s,I=_/a,C=f*.62+(1-I)*.38,y=Math.sin((f*1.15+I*.35)*Math.PI)*.04,x=.74+C*.18+y,E=o.includeReflection?(()=\u003e{const k=f-.36,R=I-.22,F=Math.max(0,1-Math.hypot(k,R)/.38);return F*F*.07})():0,B=(l*.9+3)*x,S=(u*1.08+15)*x,Q=(g*1.28+13)*x;r[A]=Oze(B*(1-E)+255*E),r[A+1]=Oze(S*(1-E)+255*E),r[A+2]=Oze(Q*(1-E)+255*E)}t.putImageData(i,0,0)},t4i=({textures:t,boardData:e,traceTextureResolution:n,layer:o})=\u003e{if(!t.some(u=\u003eu?.image))return null;const r=DC(e),s=Math.floor(r.width*n),a=Math.floor(r.height*n);if(s\u003c=0||a\u003c=0)return null;const A=document.createElement(\"canvas\");A.width=s,A.height=a+1;const c=A.getContext(\"2d\");if(!c)return null;for(const u of t){if(!u?.image)continue;const g=u.image;c.drawImage(g,0,0,s,a)}e4i(c,s,a,{includeReflection:o===\"top\"});const l=new Ux(A);return l.generateMipmaps=!1,l.minFilter=Fl,l.magFilter=Fl,l.premultiplyAlpha=!0,l.anisotropy=16,l.needsUpdate=!0,l},n4i=({textures:t,soldermaskTexture:e,boardData:n,traceTextureResolution:o})=\u003e{if(!e?.image||!t.some(l=\u003el?.image))return null;const i=DC(n),r=Math.floor(i.width*o),s=Math.floor(i.height*o);if(r\u003c=0||s\u003c=0)return null;const a=document.createElement(\"canvas\");a.width=r,a.height=s+1;const A=a.getContext(\"2d\");if(!A)return null;for(const l of t)l?.image\u0026\u0026A.drawImage(l.image,0,0,r,s);A.globalCompositeOperation=\"destination-in\",A.drawImage(e.image,0,0,r,s),A.globalCompositeOperation=\"source-over\";const c=new Ux(a);return c.colorSpace=_6,c.generateMipmaps=!1,c.minFilter=Fl,c.magFilter=Fl,c.premultiplyAlpha=!1,c.needsUpdate=!0,c};function Gan({circuitJson:t,boardData:e,traceTextureResolution:n,visibility:o}){const i=Oan(Tc.copper),r=\"rgb(255,255,255)\",s=Oan(Tc.copper),a=o?.boardBody??!0,A=g=\u003e{const h=(g===\"top\"?o?.topMask:o?.bottomMask)??!0,d=(g===\"top\"?o?.topCopper:o?.bottomCopper)??!0,p=(g===\"top\"?o?.topSilkscreen:o?.bottomSilkscreen)??!0,m=o?.keepout??!0,_=h?$5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,f=d?_5i({layer:g,circuitJson:t,boardData:e,traceColor:i,traceTextureResolution:n}):null,I=d?Tan({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n,copperColor:s}):null,C=h\u0026\u0026d?Tan({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n,copperColor:s,onlyCoveredBySoldermask:!0}):null,y=d?y5i({layer:g,circuitJson:t,boardData:e,copperColor:s,traceTextureResolution:n}):null,x=d?h5i({layer:g,circuitJson:t,boardData:e,copperColor:s,traceTextureResolution:n}):null,E=d?Z5i({layer:g,circuitJson:t,boardData:e,copperColor:s,traceTextureResolution:n}):null,B=p?J5i({layer:g,circuitJson:t,boardData:e,silkscreenColor:r,traceTextureResolution:n,soldermaskVisible:h}):null,S=p?D5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,w=o?.pcbNotes??!1?G5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,M=a?m5i({layer:g,circuitJson:t,panelData:e,traceTextureResolution:n}):null,k=m?k5i({layer:g,circuitJson:t,boardData:e,traceTextureResolution:n}):null,R=t4i({textures:[I,f,x,E,_,y,B,S,w,M,k],boardData:e,traceTextureResolution:n,layer:g}),F=h\u0026\u0026d?n4i({textures:[f,C],soldermaskTexture:_,boardData:e,traceTextureResolution:n}):null;return{boardTexture:R,maskedCopperTexture:F}},c=e.num_layers??2,l=A(\"top\"),u=c\u003c2?null:A(\"bottom\");return{topBoard:l.boardTexture,bottomBoard:u?.boardTexture??null,topMaskedCopper:l.maskedCopperTexture,bottomMaskedCopper:u?.maskedCopperTexture??null}}var $B={bumpScale:.12,normalScale:.08,roughnessBias:.015,clearcoat:.08,clearcoatRoughness:.55},Lpe={roughness:.42,metalness:.5,roughnessVariance:.035,detailStrength:.028},Hpe=.22,o4i=.7,i4i=.86,Yan={height:Hpe,microSurfaceWeight:1,roughness:.7,metalness:.015,isExposedCopper:!1,isMaskedCopper:!1},r4i={height:o4i,microSurfaceWeight:.9,roughness:.54,metalness:.025,isExposedCopper:!1,isMaskedCopper:!0},Gze=t=\u003eMath.max(0,Math.min(1,t)),Uan=t=\u003e1-t,eZ=(t,e,n)=\u003e{let o=Math.imul(t,374761393)^Math.imul(e,668265263)^n;return o=Math.imul(o^o\u003e\u003e\u003e13,1274126177),((o^o\u003e\u003e\u003e16)\u003e\u003e\u003e0)/4294967295},Kan=t=\u003et*t*(3-2*t),Yze=(t,e,n)=\u003et+(e-t)*n,Uze=(t,e,n,o)=\u003e{const i=t/n,r=e/n,s=Math.floor(i),a=Math.floor(r),A=Kan(i-s),c=Kan(r-a),l=Yze(eZ(s,a,o),eZ(s+1,a,o),A),u=Yze(eZ(s,a+1,o),eZ(s+1,a+1,o),A);return Yze(l,u,c)},s4i=(t,e,n)=\u003e{const o=(Uze(t,e,7,n+31)-.5)*.55,i=Math.sin(t*.12+Uze(t,e,44,n+37)*2)*.22;return(o+i)*Lpe.detailStrength},a4i=(t,e,n)=\u003e{const o=(eZ(t,e,n+53)-.5)*.42,i=Math.sin(t*.26+e*.06)*.2+Math.sin(e*.31-t*.04)*.12;return(o+i)*.045},A4i=(t,e,n,o)=\u003eo?r4i:zEi({red:t,green:e,blue:n})?Yan:t\u003e120\u0026\u0026e\u003e70\u0026\u0026n\u003c150\u0026\u0026t\u003ee*1.05\u0026\u0026e\u003en*1.15?{height:i4i,microSurfaceWeight:.9,roughness:Lpe.roughness,metalness:Lpe.metalness,isExposedCopper:!0,isMaskedCopper:!1}:t\u003e170\u0026\u0026e\u003e170\u0026\u0026n\u003e160?{height:Hpe,microSurfaceWeight:.4,roughness:.76,metalness:0,isExposedCopper:!1,isMaskedCopper:!1}:e\u003et*1.25\u0026\u0026e\u003en*1.05\u0026\u0026t\u003c110\u0026\u0026e\u003c180\u0026\u0026n\u003c130?Yan:{height:Hpe,microSurfaceWeight:.7,roughness:.58,metalness:.015,isExposedCopper:!1,isMaskedCopper:!1},Ope=t=\u003e{const e=new Ux(t);return e.colorSpace=_6,e.generateMipmaps=!1,e.minFilter=Fl,e.magFilter=Fl,e.wrapS=Xy,e.wrapT=Xy,e.needsUpdate=!0,e},Van=(t,e)=\u003e{const n=t.image;if(!n?.width||!n.height)return null;const{width:o,height:i}=n,r=n.getContext(\"2d\");if(!r)return null;const s=e?.image,a=s?.getContext(\"2d\"),A=s?.width??0,c=s?.height??0,l=a\u0026\u0026A\u0026\u0026c?a.getImageData(0,0,A,c):null,u=r.getImageData(0,0,o,i),g=u.data,h=new Float32Array(o*i),d=document.createElement(\"canvas\"),p=document.createElement(\"canvas\");d.width=p.width=o,d.height=p.height=i;const m=d.getContext(\"2d\"),_=p.getContext(\"2d\");if(!m||!_)return null;const f=m.createImageData(o,i),I=_.createImageData(o,i),C=f.data,y=I.data;for(let k=0;k\u003cg.length;k+=4){const R=k/4,F=R%o,O=Math.floor(R/o);if((g[k+3]??0)\u003c16){h[R]=Uan(Hpe);continue}const Y=l?Math.min(A-1,Math.floor(F/o*A)):0,W=l?Math.min(c-1,Math.floor(O/i*c)):0,te=l?l.data[(W*A+Y)*4+3]??0:0,j=A4i(g[k]??0,g[k+1]??0,g[k+2]??0,te\u003e=16),J=o+i,oe=j.isExposedCopper?s4i(F,O,J):j.isMaskedCopper?a4i(F,O,J):0,ie=Gze(Uan(j.height)+oe*j.microSurfaceWeight);h[R]=ie;const ne=ie*255;g[k]=g[k+1]=g[k+2]=ne,g[k+3]=255;const ge=(j.isExposedCopper?Gze(j.roughness+oe*.7+(Uze(F,O,36,J+17)-.5)*Lpe.roughnessVariance):j.isMaskedCopper?Gze(j.roughness+oe+$B.roughnessBias):j.roughness)*255;C[k]=C[k+1]=C[k+2]=ge,C[k+3]=255;const _e=j.metalness*255;y[k]=y[k+1]=y[k+2]=_e,y[k+3]=255}m.putImageData(f,0,0),_.putImageData(I,0,0);const x=document.createElement(\"canvas\");x.width=o,x.height=i;const E=x.getContext(\"2d\");if(!E)return null;E.putImageData(u,0,0);const B=document.createElement(\"canvas\");B.width=o,B.height=i;const S=B.getContext(\"2d\");if(!S)return null;const Q=S.createImageData(o,i),w=Q.data,M=(k,R)=\u003eh[Math.max(0,Math.min(i-1,R))*o+Math.max(0,Math.min(o-1,k))]??0;for(let k=0;k\u003ci;k++)for(let R=0;R\u003co;R++){const F=(M(R+1,k)-M(R-1,k))*4,O=(M(R,k+1)-M(R,k-1))*4,U=1/Math.sqrt(F*F+O*O+1),Y=(k*o+R)*4;w[Y]=(-F*U*.5+.5)*255,w[Y+1]=(-O*U*.5+.5)*255,w[Y+2]=(U*.5+.5)*255,w[Y+3]=255}return S.putImageData(Q,0,0),{bumpMap:Ope(x),normalMap:Ope(B),roughnessMap:Ope(d),metalnessMap:Ope(p)}};function zan(t,e){const{texture:n,maskedCopperMask:o,yOffset:i,isBottomLayer:r,usePolygonOffset:s=!1,renderOrder:a=0,isFaux:A=!1}=t;if(!n)return null;const c=DC(e),l=new VB(c.width,c.height);n.colorSpace=Ox;const u={map:n,transparent:!0,alphaTest:.08,side:mE,depthWrite:!0,polygonOffset:s,polygonOffsetFactor:s?-4:0,polygonOffsetUnits:s?-4:0,opacity:A?Dpe:1},g=Van(n,o),h=new CE({...u,bumpMap:g?.bumpMap??null,bumpScale:$B.bumpScale,normalMap:g?.normalMap??null,normalScale:new ni($B.normalScale,$B.normalScale),roughnessMap:g?.roughnessMap??null,roughness:1,metalnessMap:g?.metalnessMap??null,metalness:1,clearcoat:$B.clearcoat,clearcoatRoughness:$B.clearcoatRoughness,envMapIntensity:.18}),d=new Er(l,h);return d.position.set(c.centerX,c.centerY,i),r\u0026\u0026d.rotation.set(Math.PI,0,0),d.name=`${r?\"bottom\":\"top\"}-board-texture-plane`,d.renderOrder=a,p4(d,{castShadow:!1,receiveShadow:!0}),d}function c4i(t,e,n,o=!1){const i=[];if(!t||!e||n===null)return i;const r=.005,s=zan({texture:t.topBoard,maskedCopperMask:t.topMaskedCopper,yOffset:n/2+r,isBottomLayer:!1,usePolygonOffset:!0,renderOrder:1,isFaux:o},e);s\u0026\u0026i.push(s);const a=zan({texture:t.bottomBoard,maskedCopperMask:t.bottomMaskedCopper,yOffset:-n/2-r,isBottomLayer:!0,usePolygonOffset:!0,renderOrder:1,isFaux:o},e);return a\u0026\u0026i.push(a),i}var l4i=4e6,u4i=4096,g4i=1;function Jan(t,e,n={}){const{maxTexturePixels:o=l4i,maxTextureDimension:i=u4i,minTextureResolution:r=g4i}=n,s=DC(t);if(!Number.isFinite(s.width)||!Number.isFinite(s.height)||s.width\u003c=0||s.height\u003c=0)return e;const a=Math.max(s.width,s.height),A=i/a,c=Math.sqrt(o/(s.width*s.height)),l=Math.min(e,A,c);return Math.max(r,l)}function d4i({circuitJson:t,pcbThickness:e,isFaux:n=!1}){const{rootObject:o}=uf(),{visibility:i}=AT(),r=ee.useMemo(()=\u003e{const A=t.filter(u=\u003eu.type===\"pcb_panel\"),c=Mr(t).pcb_board.list();if(A.length\u003e0){const u=A[0],g=c.find(h=\u003eh.pcb_panel_id===u.pcb_panel_id);return{type:\"pcb_board\",pcb_board_id:u.pcb_panel_id,center:u.center,width:u.width,height:u.height,thickness:g?.thickness??1.4,material:g?.material??\"fr4\",num_layers:g?.num_layers??2,solder_mask_color:g?.solder_mask_color}}const l=c.filter(u=\u003e!u.pcb_panel_id);return l.length\u003e0?l[0]:null},[t]),s=ee.useMemo(()=\u003er?Jan(r,m4):m4,[r]),a=ee.useMemo(()=\u003e!r?.width||!r.height?null:Gan({circuitJson:t,boardData:r,traceTextureResolution:s,visibility:i}),[t,r,s,i]);return ee.useEffect(()=\u003e{if(!o||!r||!a)return;const A=[],c=d=\u003e{const p=[\"map\",\"alphaMap\",\"aoMap\",\"bumpMap\",\"displacementMap\",\"emissiveMap\",\"lightMap\",\"metalnessMap\",\"normalMap\",\"roughnessMap\",\"specularMap\"],m=d;for(const _ of p){const f=m[_];f\u0026\u0026f instanceof Hg\u0026\u0026(f.dispose(),m[_]=null)}d.dispose()},l=({texture:d,maskedCopperMask:p,zOffset:m,isBottomLayer:_,name:f,usePolygonOffset:I=!1,depthWrite:C=!0,renderOrder:y=1})=\u003e{if(!d)return null;const x=DC(r),E=new VB(x.width,x.height);d.colorSpace=Ox;const B={map:d,transparent:!0,alphaTest:.08,side:mE,depthWrite:C,polygonOffset:I,polygonOffsetFactor:I?-4:0,polygonOffsetUnits:I?-4:0,opacity:n?Dpe:1},S=Van(d,p),Q=new CE({...B,bumpMap:S?.bumpMap??null,bumpScale:$B.bumpScale,normalMap:S?.normalMap??null,normalScale:new ni($B.normalScale,$B.normalScale),roughnessMap:S?.roughnessMap??null,roughness:1,metalnessMap:S?.metalnessMap??null,metalness:1,clearcoat:$B.clearcoat,clearcoatRoughness:$B.clearcoatRoughness,envMapIntensity:.18}),w=new Er(E,Q);return w.position.set(x.centerX,x.centerY,m),_\u0026\u0026w.rotation.set(Math.PI,0,0),w.name=f,w.renderOrder=y,w.frustumCulled=!1,p4(w,{castShadow:!1,receiveShadow:!0}),w},u=.005,g=l({texture:a.topBoard,maskedCopperMask:a.topMaskedCopper,zOffset:e/2+u,isBottomLayer:!1,name:\"jscad-top-board-texture\",usePolygonOffset:!0});g\u0026\u0026(A.push(g),o.add(g));const h=l({texture:a.bottomBoard,maskedCopperMask:a.bottomMaskedCopper,zOffset:-e/2-u,isBottomLayer:!0,name:\"jscad-bottom-board-texture\",usePolygonOffset:!0});return h\u0026\u0026(A.push(h),o.add(h)),()=\u003e{for(const d of A)if(d.parent===o\u0026\u0026o.remove(d),d.geometry.dispose(),Array.isArray(d.material))for(const p of d.material)c(p);else d.material instanceof Gx\u0026\u0026c(d.material);a.topBoard?.dispose(),a.bottomBoard?.dispose()}},[o,r,a,e]),null}function h4i({stlUrl:t,stlData:e,mtlUrl:n,color:o,opacity:i=1,layerType:r}){const{rootObject:s}=uf(),[a,A]=ee.useState(null);ee.useEffect(()=\u003e{const l=new doi;if(e){try{const u=l.parse(e);A(u)}catch(u){console.error(\"Failed to parse STL data\",u),A(null)}return}t\u0026\u0026l.load(t,u=\u003e{A(u)})},[t,e]);const c=ee.useMemo(()=\u003e{if(!a)return null;const l=r===\"board\",u=new su({color:Array.isArray(o)?new Vi(o[0],o[1],o[2]):o,transparent:i!==1,opacity:i,polygonOffset:l,polygonOffsetFactor:l?6:0,polygonOffsetUnits:l?6:0}),g=new Er(a,u);return g.renderOrder=l?-1:1,p4(g,{castShadow:!l\u0026\u0026i===1,receiveShadow:!0}),g},[a,o,i,r]);return ee.useEffect(()=\u003e{if(!(!s||!c))return s.add(c),()=\u003e{s.remove(c),c.geometry.dispose(),Array.isArray(c.material)?c.material.forEach(l=\u003el.dispose()):c.material.dispose()}},[s,c]),null}function p4i({stlData:t,color:e,opacity:n=1,layerType:o}){const{visibility:i}=AT();let r=!0;return o===\"board\"?r=i.boardBody:o===\"top-copper\"?r=i.topCopper:o===\"bottom-copper\"?r=i.bottomCopper:o===\"top-silkscreen\"?r=i.topSilkscreen:o===\"bottom-silkscreen\"\u0026\u0026(r=i.bottomSilkscreen),r?K.jsx(h4i,{stlData:t,color:e,opacity:n,layerType:o}):null}function m4i(t){const e=Mr(t).cad_component.list().filter(f=\u003ef.pcb_component_id),n=Mr(t).pcb_smtpad.list(),o=Mr(t).pcb_hole.list(),i=Mr(t).pcb_plated_hole.list(),r=Mr(t).pcb_via.list();if(e.length===0\u0026\u0026n.length===0\u0026\u0026o.length===0\u0026\u0026i.length===0\u0026\u0026r.length===0)return null;const s=[...o,...i,...r,...n],a=H8(s);let A=a.minX,c=a.maxX,l=a.minY,u=a.maxY;for(const f of e)if(f.position){const I=f.position.x,C=f.position.y;A=Math.min(A,I),c=Math.max(c,I),l=Math.min(l,C),u=Math.max(u,C)}A===1/0\u0026\u0026(A=-10,c=10,l=-10,u=10);const g=2,h=Math.max(Math.abs(A),Math.abs(c))+g,d=Math.max(Math.abs(l),Math.abs(u))+g,p=Math.max(2*h,10),m=Math.max(2*d,10);return{type:\"pcb_board\",pcb_board_id:\"faux-board\",center:{x:0,y:0},width:p,height:m,thickness:1.4,material:\"fr4\",num_layers:2}}function Wan(t){if(Mr(t).pcb_board.list().length\u003e0)return t;const n=m4i(t);if(!n)return t;const i=n.thickness/2;return[...t.map(s=\u003e{if(s.type===\"cad_component\"\u0026\u0026s.pcb_component_id){const a=s;if(a.position){const A=a.position.z??0;return{...a,position:{...a.position,z:A+i}}}}return s}),n]}var _4i=ee.forwardRef(({circuitJson:t,children:e,autoRotateDisabled:n,clickToInteractEnabled:o,onUserInteraction:i,onCameraControllerReady:r,resolveStaticAsset:s,referenceObject:a,hiddenCadComponentIds:A},c)=\u003e{const l=OVe(e),u=ee.useMemo(()=\u003eWan(t??l),[t,l]),g=l5i(u),h=ee.useMemo(()=\u003e{if(!u)return[5,-5,5];try{const C=Mr(u).pcb_board.list()[0];if(!C)return[5,-5,5];const{width:y,height:x}=C;if(!y\u0026\u0026!x)return[5,-5,5];const E=5,B=Math.max(y,E),S=Math.max(x,E),Q=Math.max(B,S);return[Q*.4,-Q*.7,Q*.9]}catch(C){return console.error(C),[5,-5,5]}},[u]),d=ee.useMemo(()=\u003e{if(!u)return!1;try{const C=Mr(u).pcb_board.list()[0];return!!C\u0026\u0026C.pcb_board_id===\"faux-board\"}catch{return!1}},[u]),p=ee.useMemo(()=\u003e{if(u)try{const C=Mr(u).pcb_board.list()[0];if(!C)return;const y=DC(C);return{width:y.width,height:y.height}}catch(C){console.error(C);return}},[u]),m=ee.useMemo(()=\u003e{if(u)try{const C=Mr(u).pcb_board.list()[0];if(!C)return;const y=DC(C);return{x:y.centerX,y:y.centerY}}catch(C){console.error(C);return}},[u]),_=wrn(u),{stls:f}=wEi(g),I=Mr(u).cad_component.list().filter(C=\u003e!A?.has(C.cad_component_id));return K.jsxs(San,{ref:c,autoRotateDisabled:n,initialCameraPosition:h,clickToInteractEnabled:o,boardDimensions:p,boardCenter:m,referenceObject:a,onUserInteraction:i,onCameraControllerReady:r,children:[f.map(({stlData:C,color:y,layerType:x},E)=\u003eK.jsx(p4i,{stlData:C,color:y,opacity:E===0?d?.8:.95:1,layerType:x},`board-${E}`)),K.jsx(d4i,{circuitJson:u,pcbThickness:_,isFaux:d}),I.map(C=\u003eK.jsx(vze,{fallback:({error:y})=\u003eK.jsx(Ran,{cad_component:C,error:y}),children:K.jsx(pan,{cad_component:C,circuitJson:u,resolveStaticAsset:s},C.cad_component_id)},C.cad_component_id))]})}),Gpe=new Set,Kze=!1;function f4i(t,e,n=2){const o=t.length;Gpe.size\u0026\u0026Gpe.clear();let i=I4i(t,0,o,n,!0);const r=[];if(!i||i.next===i.prev)return r;let s=0,a=0,A=0;if(t.length\u003e80*n){s=t[0],a=t[1];let c=s,l=a;for(let u=n;u\u003co;u+=n){const g=t[u],h=t[u+1];g\u003cs\u0026\u0026(s=g),h\u003ca\u0026\u0026(a=h),g\u003ec\u0026\u0026(c=g),h\u003el\u0026\u0026(l=h)}A=Math.max(c-s,l-a),A=A!==0?32767/A:0}return Vze(i,r,s,a,A),r}function I4i(t,e,n,o,i){let r=null;if(i===P4i(t,e,n,o)\u003e0)for(let s=e;s\u003cn;s+=o)r=$an(s/o|0,t[s],t[s+1],r);else for(let s=n-o;s\u003e=e;s-=o)r=$an(s/o|0,t[s],t[s+1],r);return r\u0026\u0026Wze(r,r.next)\u0026\u0026(oZ(r),r=r.next),r}function Ype(t,e=t){const n=e===t;let o=t,i;do i=!1,o!==o.next\u0026\u0026(Gpe.size===0||!Gpe.has(o))\u0026\u0026(Wze(o,o.next)||l1(o.prev,o,o.next)===0)?((n||o===e)\u0026\u0026(e=o.prev),Kze=!0,oZ(o),o=o.prev,i=!0):(n||o!==e)\u0026\u0026(o=o.next,i=!n);while(i||o!==e);return e}function Vze(t,e,n,o,i){i\u0026\u0026B4i(t,n,o,i);let r=t,s=!1;for(;t.prev!==t.next;){const a=t.prev,A=t.next;if(l1(a,t,A)\u003c0\u0026\u0026(i?y4i(t,n,o,i):C4i(t))){e.push(a.i,t.i,A.i),oZ(t),t=A,r=A;continue}if(t=A,t===r){if(Kze=!1,t=Ype(t),Kze){r=t;continue}if(!s){t=x4i(t,e),r=t,s=!0;continue}E4i(t,e,n,o,i);break}}}function C4i(t){const e=t.prev,n=t,o=t.next,i=e.x,r=n.x,s=o.x,a=e.y,A=n.y,c=o.y,l=Math.min(i,r,s),u=Math.min(a,A,c),g=Math.max(i,r,s),h=Math.max(a,A,c);let d=o.next;for(;d!==e;){if(d.x\u003e=l\u0026\u0026d.x\u003c=g\u0026\u0026d.y\u003e=u\u0026\u0026d.y\u003c=h\u0026\u0026!(i===d.x\u0026\u0026a===d.y)\u0026\u0026Jze(i,a,r,A,s,c,d.x,d.y)\u0026\u0026l1(d.prev,d,d.next)\u003e=0)return!1;d=d.next}return!0}function y4i(t,e,n,o){const i=t.prev,r=t,s=t.next,a=i.x,A=r.x,c=s.x,l=i.y,u=r.y,g=s.y,h=Math.min(a,A,c),d=Math.min(l,u,g),p=Math.max(a,A,c),m=Math.max(l,u,g),_=zze(h,d,e,n,o),f=zze(p,m,e,n,o);let I=t.prevZ;for(;I\u0026\u0026I.z\u003e=_;){if(I.x\u003e=h\u0026\u0026I.x\u003c=p\u0026\u0026I.y\u003e=d\u0026\u0026I.y\u003c=m\u0026\u0026I!==s\u0026\u0026!(a===I.x\u0026\u0026l===I.y)\u0026\u0026Jze(a,l,A,u,c,g,I.x,I.y)\u0026\u0026l1(I.prev,I,I.next)\u003e=0)return!1;I=I.prevZ}let C=t.nextZ;for(;C\u0026\u0026C.z\u003c=f;){if(C.x\u003e=h\u0026\u0026C.x\u003c=p\u0026\u0026C.y\u003e=d\u0026\u0026C.y\u003c=m\u0026\u0026C!==s\u0026\u0026!(a===C.x\u0026\u0026l===C.y)\u0026\u0026Jze(a,l,A,u,c,g,C.x,C.y)\u0026\u0026l1(C.prev,C,C.next)\u003e=0)return!1;C=C.nextZ}return!0}function x4i(t,e){let n=t,o=!1;do{const i=n.prev,r=n.next.next;jan(i,n,n.next,r,!1)\u0026\u0026Vpe(i,r)\u0026\u0026Vpe(r,i)\u0026\u0026(e.push(i.i,n.i,r.i),oZ(n),oZ(n.next),n=t=r,o=!0),n=n.next}while(n!==t);return o?Ype(n):n}function E4i(t,e,n,o,i){let r=t;do{let s=r.next.next;for(;s!==r.prev;){if(r.i!==s.i\u0026\u0026S4i(r,s)){let a=w4i(r,s);r=Ype(r,r.next),a=Ype(a,a.next),Vze(r,e,n,o,i),Vze(a,e,n,o,i);return}s=s.next}r=r.next}while(r!==t)}var BE=[],$Y=[],hT=new Uint32Array(0),tZ=new Uint32Array(0),nZ=new Uint32Array(256);function B4i(t,e,n,o){let i=t,r=0;do i.z=zze(i.x,i.y,e,n,o),BE[r++]=i,i=i.next;while(i!==t);b4i(r);let s=null;for(let a=0;a\u003cr;a++){const A=BE[a];A.prevZ=s,s\u0026\u0026(s.nextZ=A),s=A}s.nextZ=null,BE.fill(null,0,r),$Y.fill(null,0,r)}function b4i(t){if(t\u003c=32){for(let e=1;e\u003ct;e++){const n=BE[e],o=n.z;let i=e-1;for(;i\u003e=0\u0026\u0026BE[i].z\u003eo;)BE[i+1]=BE[i],i--;BE[i+1]=n}return}hT.length\u003ct\u0026\u0026(hT=new Uint32Array(t),tZ=new Uint32Array(t),$Y=new Array(t));for(let e=0;e\u003ct;e++)hT[e]=BE[e].z;Upe(t,BE,hT,$Y,tZ,0),Upe(t,$Y,tZ,BE,hT,8),Upe(t,BE,hT,$Y,tZ,16),Upe(t,$Y,tZ,BE,hT,24)}function Upe(t,e,n,o,i,r){nZ.fill(0);for(let a=0;a\u003ct;a++)nZ[n[a]\u003e\u003e\u003er\u0026255]++;let s=0;for(let a=0;a\u003c256;a++){const A=nZ[a];nZ[a]=s,s+=A}for(let a=0;a\u003ct;a++){const A=n[a],c=nZ[A\u003e\u003e\u003er\u0026255]++;o[c]=e[a],i[c]=A}}function zze(t,e,n,o,i){return t=(t-n)*i|0,e=(e-o)*i|0,t=(t|t\u003c\u003c8)\u002616711935,t=(t|t\u003c\u003c4)\u0026252645135,t=(t|t\u003c\u003c2)\u0026858993459,t=(t|t\u003c\u003c1)\u00261431655765,e=(e|e\u003c\u003c8)\u002616711935,e=(e|e\u003c\u003c4)\u0026252645135,e=(e|e\u003c\u003c2)\u0026858993459,e=(e|e\u003c\u003c1)\u00261431655765,t|e\u003c\u003c1}function Jze(t,e,n,o,i,r,s,a){return(i-s)*(e-a)\u003e=(t-s)*(r-a)\u0026\u0026(t-s)*(o-a)\u003e=(n-s)*(e-a)\u0026\u0026(n-s)*(r-a)\u003e=(i-s)*(o-a)}function S4i(t,e){const n=Wze(t,e)\u0026\u0026l1(t.prev,t,t.next)\u003e0\u0026\u0026l1(e.prev,e,e.next)\u003e0;return t.next.i!==e.i\u0026\u0026(n||Vpe(t,e)\u0026\u0026Vpe(e,t)\u0026\u0026(l1(t.prev,t,e.prev)!==0||l1(t,e.prev,e)!==0))\u0026\u0026!Q4i(t,e)\u0026\u0026(n||v4i(t,e))}function l1(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Wze(t,e){return t.x===e.x\u0026\u0026t.y===e.y}function jan(t,e,n,o,i=!0){const r=l1(t,e,n),s=l1(t,e,o),a=l1(n,o,t),A=l1(n,o,e);return(r\u003e0\u0026\u0026s\u003c0||r\u003c0\u0026\u0026s\u003e0)\u0026\u0026(a\u003e0\u0026\u0026A\u003c0||a\u003c0\u0026\u0026A\u003e0)?!0:i?!!(r===0\u0026\u0026Kpe(t,n,e)||s===0\u0026\u0026Kpe(t,o,e)||a===0\u0026\u0026Kpe(n,t,o)||A===0\u0026\u0026Kpe(n,e,o)):!1}function Kpe(t,e,n){return e.x\u003c=Math.max(t.x,n.x)\u0026\u0026e.x\u003e=Math.min(t.x,n.x)\u0026\u0026e.y\u003c=Math.max(t.y,n.y)\u0026\u0026e.y\u003e=Math.min(t.y,n.y)}function Q4i(t,e){const n=Math.min(t.x,e.x),o=Math.max(t.x,e.x),i=Math.min(t.y,e.y),r=Math.max(t.y,e.y);let s=t;do{const a=s.next;if(s.x\u003eo\u0026\u0026a.x\u003eo||s.x\u003cn\u0026\u0026a.x\u003cn||s.y\u003er\u0026\u0026a.y\u003er||s.y\u003ci\u0026\u0026a.y\u003ci){s=a;continue}if(s.i!==t.i\u0026\u0026a.i!==t.i\u0026\u0026s.i!==e.i\u0026\u0026a.i!==e.i\u0026\u0026jan(s,a,t,e))return!0;s=a}while(s!==t);return!1}function Vpe(t,e){return l1(t.prev,t,t.next)\u003c0?l1(t,e,t.next)\u003e=0\u0026\u0026l1(t,t.prev,e)\u003e=0:l1(t,e,t.prev)\u003c0||l1(t,t.next,e)\u003c0}function v4i(t,e){let n=t,o=!1;const i=(t.x+e.x)/2,r=(t.y+e.y)/2;do{const s=n.next;n.y\u003er!=s.y\u003er\u0026\u0026i\u003c(s.x-n.x)*(r-n.y)/(s.y-n.y)+n.x\u0026\u0026(o=!o),n=s}while(n!==t);return o}function w4i(t,e){const n=jze(t.i,t.x,t.y),o=jze(e.i,e.x,e.y),i=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,o.next=n,n.prev=o,r.next=o,o.prev=r,o}function $an(t,e,n,o){const i=jze(t,e,n);return o?(i.next=o.next,i.prev=o,o.next.prev=i,o.next=i):(i.prev=i,i.next=i),i}function oZ(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ\u0026\u0026(t.prevZ.nextZ=t.nextZ),t.nextZ\u0026\u0026(t.nextZ.prevZ=t.prevZ)}function jze(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function P4i(t,e,n,o){let i=0;for(let r=e,s=n-o;r\u003cn;r+=o)i+=(t[s]-t[r])*(t[r+1]+t[s+1]),s=r;return i}var pT=1e-7;function qan(t,e){if(!Number.isFinite(e)||e\u003c0)throw new Error(\"Board thickness must be finite and nonnegative\");const n=t.map(a=\u003e{const{start:A,end:c,bend_angle:l,bend_radius:u}=a;if([A?.x,A?.y,c?.x,c?.y,l,u].some(C=\u003e!Number.isFinite(C))||u\u003c=e/2||![\"left\",\"right\"].includes(a.bend_side))throw new Error(`Invalid PCB bend ${a.pcb_bend_id}: finite geometry and radius greater than half the board thickness are required`);const h=Math.hypot(c.x-A.x,c.y-A.y);if(h\u003cpT||Math.abs(l)\u003e180)throw new Error(`Unsupported PCB bend ${a.pcb_bend_id}: distinct endpoints and angles within ±180 degrees are required`);const d=a.bend_side===\"right\"?1:-1,p=d*(c.y-A.y)/h,m=-d*(c.x-A.x)/h,_=l*Math.PI/180,f=u*Math.abs(_),I=A.x*p+A.y*m;return{id:a.pcb_bend_id,nx:p,ny:m,start:I-f/2,end:I+f/2,angle:_,radius:u,axisMin:Math.min(-m*A.x+p*A.y,-m*c.x+p*c.y),axisMax:Math.max(-m*A.x+p*A.y,-m*c.x+p*c.y)}}).filter(a=\u003eMath.abs(a.angle)\u003epT),o=n[0];if(o\u0026\u0026n.some(a=\u003eMath.abs(a.nx-o.nx)\u003epT||Math.abs(a.ny-o.ny)\u003epT))throw new Error(\"Folded PCB rendering currently requires parallel bends with the same moving direction\");n.sort((a,A)=\u003ea.start-A.start);for(let a=1;a\u003cn.length;a++)if(n[a].start\u003cn[a-1].end-pT)throw new Error(\"Overlapping PCB bend zones are not supported\");const i=[...n].reverse(),r=({p:a,anchor:A,direction:c})=\u003e{let l={...a};for(const u of i){const g=u.end-u.start,h=A.x*u.nx+A.y*u.ny-u.start,d=Math.max(0,Math.min(g,h)),p=u.angle*d/g,m=Math.cos(p),_=Math.sin(p),f=l.x*u.nx+l.y*u.ny-(c?0:u.start),I=l.x-(f+(c?0:u.start))*u.nx,C=l.y-(f+(c?0:u.start))*u.ny,y=Math.sign(u.angle)*u.radius,x=c?0:y*_-d*m,E=c?0:y*(1-m)-d*_,B=f*m-l.z*_+x;l={x:I+(B+(c?0:u.start))*u.nx,y:C+(B+(c?0:u.start))*u.ny,z:f*_+l.z*m+E}}return l},s=({p:a,anchor:A,direction:c})=\u003e{const l=c?{x:0,y:0,z:0}:r({p:{x:0,y:0,z:0},anchor:A,direction:!1}),u={x:a.x-l.x,y:a.y-l.y,z:a.z-l.z},g=[{x:1,y:0,z:0},{x:0,y:1,z:0},{x:0,y:0,z:1}].map(d=\u003er({p:d,anchor:A,direction:!0})),h=d=\u003ed.x*u.x+d.y*u.y+d.z*u.z;return{x:h(g[0]),y:h(g[1]),z:h(g[2])}};return{bends:n,inversePoint:(a,A)=\u003es({p:a,anchor:A,direction:!1}),inverseDirection:(a,A)=\u003es({p:a,anchor:A,direction:!0}),point:(a,A=a)=\u003er({p:a,anchor:A,direction:!1}),direction:(a,A)=\u003er({p:a,anchor:A,direction:!0}),assertRigid(a,A){for(const c of n){const l=a.map(u=\u003eu.x*c.nx+u.y*c.ny);if(Math.max(...l)\u003ec.start+pT\u0026\u0026Math.min(...l)\u003cc.end-pT)throw new Error(`${A} intersects PCB bend zone ${c.id}`)}}}}var qB=1e-7;function iZ(t){const e=t.flatMap(i=\u003ei.vertices);if(!e.length)return{min:{x:0,y:0,z:0},max:{x:0,y:0,z:0}};const n={x:1/0,y:1/0,z:1/0},o={x:-1/0,y:-1/0,z:-1/0};for(const i of e)for(const r of[\"x\",\"y\",\"z\"])n[r]=Math.min(n[r],i[r]),o[r]=Math.max(o[r],i[r]);return{min:n,max:o}}function Xan(t,e){const n=e.bends.flatMap(a=\u003e{const A=Math.ceil(Math.abs(a.angle)/(Math.PI/36));return Array.from({length:A+1},(c,l)=\u003e({b:a,d:a.start+(a.end-a.start)*l/A}))}),{min:o,max:i}=t.boundingBox,r=({polygon:a,nx:A,ny:c,d:l})=\u003e{const u=a.map(({p:h})=\u003eA*h.x+c*h.y-l);if(Math.min(...u)\u003e=-qB||Math.max(...u)\u003c=qB)return[a];const g=[[],[]];for(let h=0;h\u003c2;h++){const d=h===0?1:-1;for(let p=0;p\u003ca.length;p++){const m=a[p],_=(p+1)%a.length,f=a[_],I=u[p]*d,C=u[_]*d;if(I\u003e=-qB\u0026\u0026g[h].push(m),I\u003eqB\u0026\u0026C\u003c-qB||I\u003c-qB\u0026\u0026C\u003eqB){const y=I/(I-C);g[h].push({p:{x:m.p.x+(f.p.x-m.p.x)*y,y:m.p.y+(f.p.y-m.p.y)*y,z:m.p.z+(f.p.z-m.p.z)*y},uv:{u:m.uv.u+(f.uv.u-m.uv.u)*y,v:m.uv.v+(f.uv.v-m.uv.v)*y}})}}}return g.filter(h=\u003eh.length\u003e=3)},s=[];for(const a of t.triangles){const A=a.pcbFace??(a.normal.z\u003e.8?\"top\":a.normal.z\u003c-.8?\"bottom\":\"side\");let c=[a.vertices.map((l,u)=\u003e({p:l,uv:a.uvs?.[u]??{u:(l.x-o.x)/(i.x-o.x),v:1-(l.y-o.y)/(i.y-o.y)}}))];for(const{b:l,d:u}of n)c=c.flatMap(g=\u003er({polygon:g,nx:l.nx,ny:l.ny,d:u}));for(const l of c){for(const u of e.bends){const g=l.reduce((h,{p:d})=\u003eh+d.x*u.nx+d.y*u.ny,0)/l.length;if(g\u003eu.start+qB\u0026\u0026g\u003cu.end-qB\u0026\u0026l.some(({p:h})=\u003e{const d=-u.ny*h.x+u.nx*h.y;return d\u003cu.axisMin-qB||d\u003eu.axisMax+qB}))throw new Error(`PCB bend ${u.id} must span the full board cross-section through its bend zone`)}for(let u=1;u+1\u003cl.length;u++){const g=[l[0],l[u],l[u+1]],h=g.map(({p:y})=\u003ee.point(y)),[d,p,m]=h,_={x:p.x-d.x,y:p.y-d.y,z:p.z-d.z},f={x:m.x-d.x,y:m.y-d.y,z:m.z-d.z},I={x:_.y*f.z-_.z*f.y,y:_.z*f.x-_.x*f.z,z:_.x*f.y-_.y*f.x},C=Math.hypot(I.x,I.y,I.z);C\u003c1e-12||s.push({...a,vertices:h,normal:{x:I.x/C,y:I.y/C,z:I.z/C},pcbFace:A,uvs:g.map(({uv:y})=\u003ey)})}}}return{...t,triangles:s,boundingBox:iZ(s)}}var M4i=[{x:1,y:0,z:0},{x:0,y:1,z:0},{x:0,y:0,z:1}];function D4i(t,e){const[n,o,i]=[e.x,e.y,e.z].map(a=\u003ea*Math.PI/180),r={x:Math.cos(i)*t.x-Math.sin(i)*t.y,y:Math.sin(i)*t.x+Math.cos(i)*t.y,z:t.z},s={x:Math.cos(o)*r.x+Math.sin(o)*r.z,y:r.y,z:-Math.sin(o)*r.x+Math.cos(o)*r.z};return{x:s.x,y:Math.cos(n)*s.y-Math.sin(n)*s.z,z:Math.sin(n)*s.y+Math.cos(n)*s.z}}function N4i([t,e,n]){const o=Math.asin(Math.max(-1,Math.min(1,n.x))),i=Math.abs(n.x)\u003c1-1e-12;return{x:(i?Math.atan2(-n.y,n.z):Math.atan2(e.z,e.y))*180/Math.PI,y:o*180/Math.PI,z:(i?Math.atan2(-e.x,t.x):0)*180/Math.PI}}function R4i({cadComponent:t,foldPcbs:e},n){return T4i({cadComponentPlacement:t,foldPcbs:e},n)}function T4i({cadComponentPlacement:t,foldPcbs:e},n){if(t.is_on_folded_board===!0===e)return t;const{fold:o,boardCenter:i,flatMount:r}=n,s={x:r.x-i.x,y:r.y-i.y,z:0};o.assertRigid([s],\"CAD mount\");const a={x:t.position.x-i.x,y:t.position.y-i.y,z:t.position.z},A=e?o.direction:o.inverseDirection,c=e?o.point(a,s):o.inversePoint(a,s),l=t.rotation??n.defaultRotation??{x:0,y:0,z:0},u=M4i.map(g=\u003eA(D4i(g,l),s));return{...t,position:{x:c.x+i.x,y:c.y+i.y,z:c.z},rotation:N4i(u),is_on_folded_board:e}}function k4i(t,e){const n=e.find(A=\u003eA.type===\"pcb_component\"\u0026\u0026A.pcb_component_id===t.pcb_component_id);if(n?.type!==\"pcb_component\"){if(t.is_on_folded_board)throw new Error(`Folded CAD ${t.cad_component_id} requires its flat pcb_component reference`);return}const o=e.filter(A=\u003eA.type===\"pcb_board\"),i=n.positioned_relative_to_pcb_board_id,r=i?o.filter(A=\u003eA.pcb_board_id===i):o.filter(A=\u003eA.subcircuit_id\u0026\u0026A.subcircuit_id===n.subcircuit_id),s=r.length===1?r[0]:!i\u0026\u0026!r.length\u0026\u0026o.length===1?o[0]:void 0;if(!s)throw new Error(`Cannot unambiguously resolve board for CAD ${t.cad_component_id}`);const a=e.filter(A=\u003eA.type===\"pcb_bend\"\u0026\u0026A.pcb_board_id===s.pcb_board_id);return{fold:qan(a,s.thickness??1.6),boardCenter:s.center,flatMount:n.center,defaultRotation:{x:(t.layer??n.layer)===\"bottom\"?180:0,y:0,z:0}}}function F4i(t,e){const n=t.some(o=\u003eo.type===\"pcb_bend\");return t.map(o=\u003e{if(o.type!==\"cad_component\")return o;const i=o;if(!n\u0026\u0026!i.is_on_folded_board||i.is_on_folded_board===!0===e.foldPcbs)return o;const r=k4i(i,t);return!r||!r.fold.bends.length\u0026\u0026!i.is_on_folded_board?o:R4i({cadComponent:i,foldPcbs:e.foldPcbs},r)})}function L4i({outline:t,bottom:e,top:n}){if(t.length\u003c3||!Number.isFinite(e)||!Number.isFinite(n)||n\u003c=e||t.some(A=\u003e!Number.isFinite(A.x)||!Number.isFinite(A.y)))throw new Error(\"A finite polygon and positive extrusion thickness are required\");let o=0;for(const[A,c]of t.entries()){const l=t[(A+1)%t.length];o+=c.x*l.y-l.x*c.y}if(Math.abs(o)\u003c1e-12)throw new Error(\"Degenerate polygon\");const i=o\u003e0?t:[...t].reverse(),r=[],s=({a:A,b:c,c:l,pcbFace:u})=\u003e{const g={x:c.x-A.x,y:c.y-A.y,z:c.z-A.z},h={x:l.x-A.x,y:l.y-A.y,z:l.z-A.z},d={x:g.y*h.z-g.z*h.y,y:g.z*h.x-g.x*h.z,z:g.x*h.y-g.y*h.x},p=Math.hypot(d.x,d.y,d.z);p\u003e1e-12\u0026\u0026r.push({vertices:[A,c,l],normal:{x:d.x/p,y:d.y/p,z:d.z/p},pcbFace:u})},a=f4i(i.flatMap(A=\u003e[A.x,A.y]));for(let A=0;A\u003ca.length;A+=3){const[c,l,u]=a.slice(A,A+3).map(g=\u003ei[g]);s({a:{...c,z:n},b:{...l,z:n},c:{...u,z:n},pcbFace:\"top\"}),s({a:{...u,z:e},b:{...l,z:e},c:{...c,z:e},pcbFace:\"bottom\"})}for(let A=0;A\u003ci.length;A++){const c=i[A],l=i[(A+1)%i.length];s({a:{...c,z:e},b:{...l,z:e},c:{...l,z:n},pcbFace:\"side\"}),s({a:{...c,z:e},b:{...l,z:n},c:{...c,z:n},pcbFace:\"side\"})}return{triangles:r,boundingBox:iZ(r)}}function H4i({stiffener:t,boardThickness:e,fold:n}){const o=t.adhesive_thickness??0;if(!Number.isFinite(o)||o\u003c0||!Number.isFinite(t.thickness)||t.thickness\u003c=0||![\"top\",\"bottom\"].includes(t.layer))throw new Error(`Invalid PCB stiffener ${t.pcb_stiffener_id}`);const i=t.shape===\"polygon\"?t.outline:(()=\u003e{if(!(t.width\u003e0\u0026\u0026t.height\u003e0))throw new Error(\"Invalid stiffener dimensions\");const l=(t.rotation??0)*Math.PI/180;return[[-1,-1],[1,-1],[1,1],[-1,1]].map(([u,g])=\u003e({x:t.center.x+u*t.width/2*Math.cos(l)-g*t.height/2*Math.sin(l),y:t.center.y+u*t.width/2*Math.sin(l)+g*t.height/2*Math.cos(l)}))})(),r=e/2+o,s=r+t.thickness,a=L4i({outline:i,bottom:t.layer===\"top\"?r:-s,top:t.layer===\"top\"?s:-r});if(!n)return a;n.assertRigid(a.triangles.flatMap(l=\u003el.vertices),t.pcb_stiffener_id);const A={x:i.reduce((l,u)=\u003el+u.x,0)/i.length,y:i.reduce((l,u)=\u003el+u.y,0)/i.length,z:0},c=a.triangles.map(l=\u003e({...l,vertices:l.vertices.map(u=\u003en.point(u,A)),normal:n.direction(l.normal,A)}));return{...a,triangles:c,boundingBox:iZ(c)}}function Zan(t,e){t.updateMatrix();const n=t.geometry.index?t.geometry.toNonIndexed():t.geometry,o=n.getAttribute(\"position\"),i=n.getAttribute(\"uv\"),r=[];for(let s=0;s\u003co.count;s+=3){const a=[0,1,2].map(g=\u003e{const h=new jt().fromBufferAttribute(o,s+g).applyMatrix4(t.matrix);return{x:h.x-e.x,y:h.y-e.y,z:h.z}}),[A,c,l]=a,u=new jt(c.x-A.x,c.y-A.y,c.z-A.z).cross(new jt(l.x-A.x,l.y-A.y,l.z-A.z)).normalize();r.push({vertices:a,normal:{x:u.x,y:u.y,z:u.z},...i?{uvs:[0,1,2].map(g=\u003e({u:i.getX(s+g),v:i.getY(s+g)}))}:{}})}return n!==t.geometry\u0026\u0026n.dispose(),{triangles:r,boundingBox:iZ(r)}}function eAn(t,e){const n=[],o=[],i=[];for(const s of t.triangles)s.vertices.forEach((a,A)=\u003e{n.push(a.x+e.x,a.y+e.y,a.z),o.push(s.normal.x,s.normal.y,s.normal.z),i.push(s.uvs?.[A]?.u??0,s.uvs?.[A]?.v??0)});const r=new Zl;return r.setAttribute(\"position\",new Bs(n,3)),r.setAttribute(\"normal\",new Bs(o,3)),r.setAttribute(\"uv\",new Bs(i,2)),r.computeBoundingBox(),r.computeBoundingSphere(),r}function tAn(t,e,n){const o=t.clone();return o.geometry=eAn(e,n.center),o.position.set(0,0,0),o.rotation.set(0,0,0),o.scale.set(1,1,1),o.updateMatrix(),o}function O4i(t,e,n,o){const i=n.filter(d=\u003ed.type===\"pcb_board\"),r=n.filter(d=\u003ed.type===\"pcb_bend\"),s=n.filter(d=\u003ed.type===\"pcb_stiffener\");if(!r.length\u0026\u0026!s.length)return{geometryMeshes:t,textureMeshes:e};const a=i[0];if(!a||i.length!==1||n.some(d=\u003ed.type===\"pcb_panel\")||[...r,...s].some(d=\u003ed.pcb_board_id!==a.pcb_board_id))throw new Error(\"Flex rendering requires one board, matching board references, and no panel\");const A=o?qan(r,a.thickness??1.6):void 0,c=t.find(d=\u003ed.name===\"board-geom\"),l=c?Zan(c,a.center):void 0,u=A?t.map(d=\u003etAn(d,Xan(Zan(d,a.center),A),a)):[...t],g=A\u0026\u0026l?e.map(d=\u003e{d.updateMatrix();const p=d.matrix.clone().invert(),m=d.name.startsWith(\"bottom\"),_=d.geometry.parameters,f=l.triangles.filter(C=\u003em?C.normal.z\u003c-.9:C.normal.z\u003e.9).map(C=\u003e{const y=C.vertices.map(E=\u003e({...E,z:d.position.z})),x=y.map(E=\u003e{const B=new jt(E.x+a.center.x,E.y+a.center.y,E.z).applyMatrix4(p);return{u:B.x/_.width+.5,v:B.y/_.height+.5}});return{...C,vertices:y,uvs:x}}),I=tAn(d,Xan({triangles:f,boundingBox:iZ(f)},A),a);return d.geometry.dispose(),I}):e;for(const d of s){const p=new Er(eAn(H4i({stiffener:d,boardThickness:a.thickness??1.6,fold:A}),a.center),new su({color:d.material===\"fr4\"?\"#879568\":d.material===\"polyimide\"?\"#bd7f27\":\"#b8bdc4\",side:r_}));p.name=\"board-stiffener\",p4(p),u.push(p)}const h=new e2;for(const d of[...u,...g])h.expandByObject(d);return{geometryMeshes:u,textureMeshes:g,bounds:{minX:h.min.x,maxX:h.max.x,minY:h.min.y,maxY:h.max.y,minZ:h.min.z,maxZ:h.max.z}}}var G4i=t=\u003e{let e=0;for(let o=0;o\u003ct.length;o++){const i=(o+1)%t.length;t[o]\u0026\u0026t[i]\u0026\u0026(e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1])}return e/2\u003c=0};function Y4i(t,e,n,o,i){let r,s=null;if(n.outline\u0026\u0026n.outline.length\u003e=3){let a=n.outline.map(c=\u003e[c.x,c.y]);G4i(a)\u0026\u0026(a=a.reverse());const A=e.ofPolygons([a]);i.push(A),s=A,r=t.extrude(A,o,void 0,void 0,void 0,!0),i.push(r)}else n.outline\u0026\u0026n.outline.length\u003e0\u0026\u0026console.warn(\"Board outline has fewer than 3 points, falling back to rectangular board.\"),r=t.cube([n.width,n.height,o],!0),i.push(r),r=r.translate([n.center.x,n.center.y,0]),i.push(r);return{boardOp:r,outlineCrossSection:s}}var U4i=64;function mT({Manifold:t,width:e,height:n,thickness:o,borderRadius:i}){const r=Man(e,n,i);if(r\u003c=0)return t.cube([e,n,o],!0);const s=[],a=e-2*r,A=n-2*r;return a\u003e0\u0026\u0026s.push(t.cube([a,n,o],!0)),A\u003e0\u0026\u0026s.push(t.cube([e,A,o],!0)),[[e/2-r,n/2-r],[-e/2+r,n/2-r],[-e/2+r,-n/2+r],[e/2-r,-n/2+r]].forEach(([l,u])=\u003e{s.push(t.cylinder(o,r,r,U4i,!0).translate([l,u,0]))}),t.union(s)}var K4i=t=\u003e{let e=0;for(let o=0;o\u003ct.length;o++){const i=(o+1)%t.length;t[o]\u0026\u0026t[i]\u0026\u0026(e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1])}return e/2\u003c=0};function V4i(t,e,n,o,i){const r=[],s=Mr(n).pcb_cutout.list();for(const a of s){let A;const c=o*1.5;switch(a.shape){case\"rect\":{const g=IP(a);if(typeof g==\"number\"\u0026\u0026g\u003e0?A=mT({Manifold:t,width:a.width,height:a.height,thickness:c,borderRadius:g}):A=t.cube([a.width,a.height,c],!0),i.push(A),a.rotation){const h=A.rotate([0,0,a.rotation]);i.push(h),A=h}A=A.translate([a.center.x,a.center.y,0]),i.push(A);break}case\"circle\":A=t.cylinder(c,a.radius,-1,df,!0),i.push(A),A=A.translate([a.center.x,a.center.y,0]),i.push(A);break;case\"polygon\":if(a.points.length\u003c3){console.warn(`PCB Cutout [${a.pcb_cutout_id}] polygon has fewer than 3 points, skipping.`);continue}let l=a.points.map(g=\u003e[g.x,g.y]);K4i(l)\u0026\u0026(l=l.reverse());const u=e.ofPolygons([l]);i.push(u),A=t.extrude(u,c,0,0,[1,1],!0),i.push(A);break;default:console.warn(`Unsupported cutout shape: ${a.shape} for cutout ${a.pcb_cutout_id}`);continue}A\u0026\u0026r.push(A)}return{cutoutOps:r}}function nAn({Manifold:t,x:e,y:n,diameter:o,thickness:i,segments:r=32}){return t.cylinder(i*1.2,o/2,o/2,r,!0).translate([e,n,0])}function oAn({Manifold:t,x:e,y:n,holeDiameter:o,thickness:i,zOffset:r=.001,segments:s=32}){const a=o/2+r;return t.cylinder(i*1.2,a,a,s,!0).translate([e,n,0])}function z4i(t,e,n,o,i){const r=[],s=Mr(n).pcb_hole.list(),a=(l,u,g)=\u003e{const h=mT({Manifold:t,width:l,height:u,thickness:g,borderRadius:Math.min(l,u)/2});return i.push(h),h},A=(l,u,g)=\u003e{const h=t.cube([l,u,g],!0);return i.push(h),h},c=(l,u,g)=\u003e{const h=[];for(let d=0;d\u003cg;d++){const p=2*Math.PI*d/g;h.push([l/2*Math.cos(p),u/2*Math.sin(p)])}return h};for(const l of s){const u=l.hole_shape,g=l.x,h=l.y,d=o*1.2,p=l.ccw_rotation??l.rotation??0,m=l.hole_width??l.hole_diameter,_=l.hole_height??l.hole_diameter;let f=null;if(u===\"circle\"){f=nAn({Manifold:t,x:g,y:h,diameter:l.hole_diameter,thickness:o,segments:df}),r.push(f),i.push(f);continue}if(u===\"pill\"||u===\"rotated_pill\")f=a(m,_,d);else if(u===\"rect\")f=A(m,_,d);else if(u===\"oval\"){let I=c(m,_,df),C=0;for(let x=0;x\u003cI.length;x++){const E=(x+1)%I.length;C+=I[x][0]*I[E][1],C-=I[E][0]*I[x][1]}C\u003c=0\u0026\u0026(I=I.reverse());const y=e.ofPolygons([I]);i.push(y),f=t.extrude(y,d,0,0,[1,1],!0),i.push(f)}if(f){if(p!==0){const C=f.rotate([0,0,p]);i.push(C),f=C}const I=f.translate([g,h,0]);i.push(I),r.push(I)}}return{nonPlatedHoleBoardDrills:r}}function D6(t){const e=new Zl;if(e.setAttribute(\"position\",new Bs(t.vertProperties,3)),e.setIndex(new xTe(t.triVerts,1)),t.runIndex\u0026\u0026t.runIndex.length\u003e1\u0026\u0026t.runOriginalID)for(let n=0;n\u003ct.runIndex.length-1;n++){const o=t.runIndex[n],i=t.runIndex[n+1]-o;e.addGroup(o,i,0)}else e.addGroup(0,t.triVerts.length,0);return e}var rZ=t=\u003e{let e=0;for(let o=0;o\u003ct.length;o++){const i=(o+1)%t.length;t[o]\u0026\u0026t[i]\u0026\u0026(e+=t[o][0]*t[i][1],e-=t[i][0]*t[o][1])}return e/2\u003c=0},zpe=(t,e,n)=\u003e{const o=[];for(let i=0;i\u003cn;i++){const r=2*Math.PI*i/n;o.push([t/2*Math.cos(r),e/2*Math.sin(r)])}return o},_T=new Vi(...Tc.copper),Jpe=.05,sZ=.003,aZ=5e-4,AZ=.004;function J4i(t,e,n,o,i,r){const s=[],a=Mr(n).pcb_plated_hole.list(),A=[],c=[],l=(d,p,m)=\u003e{const _=mT({Manifold:t,width:d,height:p,thickness:m,borderRadius:Math.min(d,p)/2});return i.push(_),_},u=({padOutline:d,thickness:p})=\u003e{if(!Array.isArray(d)||d.length\u003c3)return null;let m=d.map(I=\u003e[I.x,I.y]);rZ(m)\u0026\u0026(m=m.reverse());const _=e.ofPolygons([m]);i.push(_);const f=t.extrude(_,p,0,0,[1,1],!0);return i.push(f),f},g=({ph:d,depth:p,sizeDelta:m=0})=\u003e{if(d.shape!==\"hole_with_polygon_pad\")return null;const f=d.pad_outline;if(!Array.isArray(f)||f.length\u003c3)return null;const I=d.hole_shape||\"circle\",C=d.hole_offset_x||0,y=d.hole_offset_y||0;let x=null;if(I===\"circle\"){const E=Math.max((d.hole_diameter??0)+m,Cs),B=Math.max(E/2,Cs/2);x=t.cylinder(p,B,B,df,!0),i.push(x)}else{const E=d.hole_width??d.hole_diameter,B=d.hole_height??d.hole_diameter;if(!E||!B)return null;const S=Math.max(E+m,Cs),Q=Math.max(B+m,Cs);if(I===\"oval\"){let w=zpe(S,Q,df);rZ(w)\u0026\u0026(w=w.reverse());const M=e.ofPolygons([w]);i.push(M),x=t.extrude(M,p,0,0,[1,1],!0),i.push(x)}else(I===\"pill\"||I===\"rotated_pill\")\u0026\u0026(x=mT({Manifold:t,width:S,height:Q,thickness:p,borderRadius:Math.min(S,Q)/2}),i.push(x))}if(!x)return null;if(C||y){const E=x.translate([C,y,0]);i.push(E),x=E}return x};a.forEach((d,p)=\u003e{const m=Math.max(o-2*(sZ+aZ+AZ),Cs);if(d.shape===\"circle\"){const _=oAn({Manifold:t,x:d.x,y:d.y,holeDiameter:d.hole_diameter*1.02,thickness:o,zOffset:jB,segments:df});i.push(_),s.push(_);const f=m,I=t.cylinder(f,d.outer_diameter/2,d.outer_diameter/2,df,!0);i.push(I);const C=t.cylinder(f*1.05,d.hole_diameter/2,d.hole_diameter/2,df,!0);i.push(C);const y=I.subtract(C);i.push(y);const x=y.translate([d.x,d.y,0]);i.push(x);let E=x;if(r){const S=t.intersection([x,r]);i.push(S),E=S}c.push(E);const B=D6(E.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:B,color:_T})}else if(d.shape===\"pill\"){const _=d.hole_width,f=d.hole_height,I=.4,C=d.outer_width??_+I,y=d.outer_height??f+I,x=_+2*jB,E=f+2*jB,B=o*1.2;let S=l(x,E,B);if(d.ccw_rotation){const Y=S.rotate([0,0,d.ccw_rotation]);i.push(Y),S=Y}const Q=S.translate([d.x,d.y,0]);i.push(Q),s.push(Q);const w=m,M=l(C,y,w),k=l(_,f,w*1.05);let R=M.subtract(k);if(i.push(R),d.ccw_rotation){const Y=R.rotate([0,0,d.ccw_rotation]);i.push(Y),R=Y}const F=R.translate([d.x,d.y,0]);i.push(F);let O=F;if(r){const Y=t.intersection([F,r]);i.push(Y),O=Y}c.push(O);const U=D6(O.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:U,color:_T})}else if(d.shape===\"pill_hole_with_rect_pad\"){if(d.hole_shape\u0026\u0026d.hole_shape!==\"pill\"||d.pad_shape\u0026\u0026d.pad_shape!==\"rect\")return;const _=d.hole_width,f=d.hole_height,I=d.hole_offset_x||0,C=d.hole_offset_y||0,y=d.rect_pad_width,x=d.rect_pad_height,E=IP(d),B=sZ,S=_+2*jB,Q=f+2*jB,w=o*1.2,k=l(S,Q,w).translate([I,C,0]).translate([d.x,d.y,0]);i.push(k),s.push(k);const R=mT({Manifold:t,width:y,height:x,thickness:Math.max(o-2*(B+aZ+AZ),Cs),borderRadius:E});i.push(R);const F=l(_,f,o*.8).translate([I,C,0]);i.push(F);const O=t.union([R,F]);i.push(O);const U=l(Math.max(_-2*Jpe,.01),Math.max(f-2*Jpe,.01),o*1.2).translate([I,C,0]);i.push(U);const Y=O.subtract(U);i.push(Y);const W=Y.translate([d.x,d.y,0]);i.push(W);let te=W;if(r){const J=t.intersection([W,r]);i.push(J),te=J}c.push(te);const j=D6(te.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:j,color:_T})}else if(d.shape===\"rotated_pill_hole_with_rect_pad\"){if(d.hole_shape\u0026\u0026d.hole_shape!==\"rotated_pill\"||d.pad_shape\u0026\u0026d.pad_shape!==\"rect\")return;const _=d.hole_width,f=d.hole_height,I=d.hole_offset_x||0,C=d.hole_offset_y||0,y=d.rect_pad_width,x=d.rect_pad_height,E=IP(d),B=sZ,S=_+2*jB,Q=f+2*jB,w=o*1.2;let M=l(S,Q,w).translate([I,C,0]);if(d.hole_ccw_rotation){const J=M.rotate([0,0,d.hole_ccw_rotation]);i.push(J),M=J}const k=M.translate([d.x,d.y,0]);i.push(k),s.push(k);let R=mT({Manifold:t,width:y,height:x,thickness:Math.max(o-2*(B+aZ+AZ),Cs),borderRadius:E});if(i.push(R),d.rect_ccw_rotation){const J=R.rotate([0,0,d.rect_ccw_rotation]);i.push(J),R=J}let F=l(_,f,o*.8).translate([I,C,0]);if(d.hole_ccw_rotation){const J=F.rotate([0,0,d.hole_ccw_rotation]);i.push(J),F=J}i.push(F);const O=t.union([R,F]);i.push(O);let U=l(Math.max(_-2*Jpe,.01),Math.max(f-2*Jpe,.01),o*1.2).translate([I,C,0]);if(d.hole_ccw_rotation){const J=U.rotate([0,0,d.hole_ccw_rotation]);i.push(J),U=J}i.push(U);const Y=O.subtract(U);i.push(Y);const W=Y.translate([d.x,d.y,0]);i.push(W);let te=W;if(r){const J=t.intersection([W,r]);i.push(J),te=J}c.push(te);const j=D6(te.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:j,color:_T})}else if(d.shape===\"hole_with_polygon_pad\"){const _=d.pad_outline;if(!Array.isArray(_)||_.length\u003c3)return;const f=g({ph:d,depth:o*1.2,sizeDelta:2*Cs});if(!f)return;const I=f.translate([d.x,d.y,0]);i.push(I),s.push(I);const y=Math.max(o-2*(sZ+aZ+AZ),Cs),x=u({padOutline:_,thickness:y});if(!x)return;const E=g({ph:d,depth:o*1.02});if(!E)return;const B=g({ph:d,depth:o*.8,sizeDelta:-2*Cs})||E,S=t.union([x,E]);i.push(S);const Q=S.subtract(B);i.push(Q);const w=Q.translate([d.x,d.y,0]);i.push(w);let M=w;if(r){const R=t.intersection([w,r]);i.push(R),M=R}c.push(M);const k=D6(M.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:k,color:_T})}else if(d.shape===\"oval\"){const _=d.hole_width,f=d.hole_height,I=d.outer_width??_+.4,C=d.outer_height??f+.4,y=_+2*jB,x=f+2*jB,E=o*1.2;let B=zpe(y,x,df);rZ(B)\u0026\u0026(B=B.reverse());const S=e.ofPolygons([B]);i.push(S);let Q=t.extrude(S,E,0,0,[1,1],!0);if(i.push(Q),d.ccw_rotation){const oe=Q.rotate([0,0,d.ccw_rotation]);i.push(oe),Q=oe}const w=Q.translate([d.x,d.y,0]);i.push(w),s.push(w);const M=m;let k=zpe(I,C,df);rZ(k)\u0026\u0026(k=k.reverse());const R=e.ofPolygons([k]);i.push(R);const F=t.extrude(R,M,0,0,[1,1],!0);i.push(F);let O=zpe(_,f,df);rZ(O)\u0026\u0026(O=O.reverse());const U=e.ofPolygons([O]);i.push(U);const Y=t.extrude(U,M*1.05,0,0,[1,1],!0);i.push(Y);let W=F.subtract(Y);if(i.push(W),d.ccw_rotation){const oe=W.rotate([0,0,d.ccw_rotation]);i.push(oe),W=oe}const te=W.translate([d.x,d.y,0]);i.push(te);let j=te;if(r){const oe=t.intersection([te,r]);i.push(oe),j=oe}c.push(j);const J=D6(j.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:J,color:_T})}else if(d.shape===\"circular_hole_with_rect_pad\"){if(d.hole_shape\u0026\u0026d.hole_shape!==\"circle\"||d.pad_shape\u0026\u0026d.pad_shape!==\"rect\")return;const _=d.hole_offset_x||0,f=d.hole_offset_y||0,I=nAn({Manifold:t,x:d.x+_,y:d.y+f,diameter:d.hole_diameter,thickness:o,segments:df});i.push(I),s.push(I);const C=d.rect_pad_width??d.hole_diameter,y=d.rect_pad_height??d.hole_diameter,x=IP(d),E=sZ,B=d.hole_diameter/2,S=mT({Manifold:t,width:C,height:y,thickness:Math.max(o-2*(E+aZ+AZ),Cs),borderRadius:x});i.push(S);const Q=t.cylinder(o*.8,B,B,df,!0).translate([_,f,0]);i.push(Q);const w=t.union([S,Q]);i.push(w);const M=t.cylinder(o*1.2,Math.max(B-Cs,.01),Math.max(B-Cs,.01),df,!0).translate([_,f,0]);i.push(M);const k=w.subtract(M);i.push(k);const R=k.translate([d.x,d.y,0]);i.push(R);let F=R;if(r){const U=t.intersection([R,r]);i.push(U),F=U}c.push(F);const O=D6(F.getMesh());A.push({key:`ph-${d.pcb_plated_hole_id||p}`,geometry:O,color:_T})}});let h;return c.length\u003e0\u0026\u0026(h=t.union(c),i.push(h)),{platedHoleBoardDrills:s,platedHoleCopperGeoms:A,platedHoleSubtractOp:h}}function W4i({Manifold:t,x:e,y:n,outerDiameter:o,holeDiameter:i,thickness:r,zOffset:s=.001,segments:a=32}){const A=s;if(o\u003ci)throw new Error(`Invalid via geometry: outerDiameter (${o}) must be \u003e= holeDiameter (${i})`);const c=Math.min(o/2,i/2+A),u=t.cylinder(r,c,-1,a,!0),g=r+2*s,h=t.cylinder(g,i/2,-1,a,!0);return u.subtract(h).translate([e,n,0])}var j4i=new Vi(...Tc.copper);function $4i(t,e,n,o,i){const r=[],s=Dan(e),a=[];return s.forEach((A,c)=\u003e{if(typeof A.hole_diameter==\"number\"){const l=oAn({Manifold:t,x:A.x,y:A.y,holeDiameter:A.hole_diameter,thickness:n,zOffset:jB,segments:df});o.push(l),r.push(l)}if(typeof A.outer_diameter==\"number\"\u0026\u0026typeof A.hole_diameter==\"number\"){const l=W4i({Manifold:t,x:A.x,y:A.y,outerDiameter:A.outer_diameter,holeDiameter:A.hole_diameter,thickness:n,zOffset:jB,segments:df});o.push(l);let u=l;if(i){const h=t.intersection([l,i]);o.push(h),u=h}const g=D6(u.getMesh());a.push({key:`via-${A.pcb_via_id||c}`,geometry:g,color:j4i})}}),{viaBoardDrills:r,viaCopperGeoms:a}}var q4i=(t,e,n)=\u003e{const[o,i]=ee.useState(null),[r,s]=ee.useState(null),[a,A]=ee.useState(null),[c,l]=ee.useState(!0),u=ee.useRef([]),g=ee.useMemo(()=\u003e{const m=e.filter(I=\u003eI.type===\"pcb_panel\"),_=Mr(e).pcb_board.list();if(m.length\u003e0){const I=m[0],C=_.find(y=\u003ey.pcb_panel_id===I.pcb_panel_id);return{type:\"pcb_board\",pcb_board_id:I.pcb_panel_id,center:I.center,width:I.width,height:I.height,thickness:C?.thickness??1.4,material:C?.material??\"fr4\",num_layers:C?.num_layers??2,solder_mask_color:C?.solder_mask_color}}const f=_.filter(I=\u003e!I.pcb_panel_id);return f.length\u003e0?f[0]:null},[e]),h=ee.useMemo(()=\u003e{const m=Mr(e).pcb_board.list();return m.length\u003e0\u0026\u0026m[0].pcb_board_id===\"faux-board\"},[e]),d=ee.useMemo(()=\u003eg?Jan(g,m4):m4,[g]);ee.useEffect(()=\u003e{if(!t||!g){i(null),s(null),l(!1);return}if((g.width===0||!g.width)\u0026\u0026(g.height===0||!g.height)\u0026\u0026(!g.outline||g.outline.length\u003c3)){i({platedHoles:[],vias:[]}),s(g.thickness??0),l(!1);return}l(!0),A(null);const m=t.Manifold,_=t.CrossSection,f=y=\u003e{if(!(!y||typeof y.delete!=\"function\"))try{y.delete()}catch(x){(!(x instanceof Error)||!x.message?.includes(\"Manifold instance already deleted\"))\u0026\u0026console.warn(\"Failed to delete Manifold instance\",x)}};u.current.forEach(f),u.current=[];let I=null;const C={};try{const y=g.thickness||1.4;s(y);const{boardOp:x,outlineCrossSection:E}=Y4i(m,_,g,y,u.current);let B=x;const Q=y+2*1;let w=null;const M=.01;if(E){let J=E;if(M\u003e0){const ie=E.offset(M);u.current.push(ie),J=ie}const oe=m.extrude(J,Q,void 0,void 0,void 0,!0);u.current.push(oe),w=oe}else{const J=(g.width||0)+2*M,oe=(g.height||0)+2*M,ie=m.cube([J,oe,Q],!0);u.current.push(ie);const ne=ie.translate([g.center.x,g.center.y,0]);u.current.push(ne),w=ne}const k=[];let R=null;const{nonPlatedHoleBoardDrills:F}=z4i(m,_,e,y,u.current);k.push(...F);const{platedHoleBoardDrills:O,platedHoleCopperGeoms:U,platedHoleSubtractOp:Y}=J4i(m,_,e,y,u.current,w);k.push(...O),C.platedHoles=U;const{viaBoardDrills:W,viaCopperGeoms:te}=$4i(m,e,y,u.current,w);if(k.push(...W),C.vias=te,k.length\u003e0){R=m.union(k),u.current.push(R);const J=Y?m.union([R,Y]):R;u.current.push(J);const oe=B.subtract(J);if(u.current.push(oe),B=oe,Y){const ie=Y.subtract(R);u.current.push(ie);const ne=ie.getMesh(),le=D6(ne);C.platedHoles=[{key:\"plated-holes-union\",geometry:le,color:new Vi(Tc.copper[0],Tc.copper[1],Tc.copper[2])}]}}const{cutoutOps:j}=V4i(m,_,e,y,u.current);if(j.length\u003e0){const J=m.union(j);u.current.push(J);const oe=B.subtract(J);u.current.push(oe),B=oe}if(I=B,I){const J=I.getMesh(),oe=D6(J);C.board={geometry:oe,color:Tze(g),material:g.material,isFaux:h}}i(C)}catch(y){console.error(\"Error processing geometry with Manifold in hook:\",y),A(y.message||\"An unknown error occurred while processing geometry in hook.\"),i(null)}finally{l(!1)}return()=\u003e{u.current.forEach(f),u.current=[]}},[t,e,g]);const p=ee.useMemo(()=\u003e!g||!d?null:Gan({circuitJson:e,boardData:g,traceTextureResolution:d,visibility:n}),[e,g,d,n]);return{geoms:o,textures:p,pcbThickness:r,error:a,isLoading:c,boardData:g,isFauxBoard:h}},X4i=r_,Z4i=({material:t,color:e,side:n=X4i,isFaux:o=!1})=\u003et===\"fr4\"?new CE({color:e,side:n,metalness:0,roughness:.48,specularIntensity:.3,ior:1.45,sheen:0,clearcoat:.16,clearcoatRoughness:.3,transparent:o,opacity:o?Dpe:1,flatShading:!0,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1}):new su({color:e,side:n,flatShading:!0,metalness:.1,roughness:.8,transparent:!0,opacity:o?Dpe:.9,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1});function eBi(t){const e=[];if(!t)return e;if(t.board?.geometry){const o=new Er(t.board.geometry,Z4i({material:t.board.material,color:t.board.color,side:r_,isFaux:t.board.isFaux}));o.name=\"board-geom\",p4(o,{castShadow:!1,receiveShadow:!0}),e.push(o)}const n=o=\u003e{if(o)for(const i of o){const r=new Er(i.geometry,new su({color:i.color,side:r_,flatShading:!0}));r.name=i.key,p4(r),e.push(r)}};return n(t.platedHoles),n(t.vias),e}var tBi=({geometryMeshes:t,textureMeshes:e})=\u003e{const{rootObject:n}=uf(),{visibility:o}=AT(),i=r=\u003e{r.geometry.dispose();const s=Array.isArray(r.material)?r.material:[r.material];for(const a of s){if(!a)continue;const A=[\"map\",\"alphaMap\",\"aoMap\",\"bumpMap\",\"displacementMap\",\"emissiveMap\",\"lightMap\",\"metalnessMap\",\"normalMap\",\"roughnessMap\",\"specularMap\"],c=a;for(const l of A){const u=c[l];u\u0026\u0026u instanceof Hg\u0026\u0026u.dispose()}a.dispose()}};return ee.useEffect(()=\u003e{if(n){for(const r of t){let s=!0;r.name===\"board-geom\"||r.name===\"board-stiffener\"?s=o.boardBody:(r.name.includes(\"plated_hole\")||r.name.includes(\"via\"))\u0026\u0026(s=o.topCopper||o.bottomCopper),s\u0026\u0026n.add(r)}return()=\u003e{for(const r of t)r.parent===n\u0026\u0026n.remove(r),i(r)}}},[n,t,o]),ee.useEffect(()=\u003e{if(n){for(const r of e)n.add(r);return()=\u003e{for(const r of e)r.parent===n\u0026\u0026n.remove(r),i(r)}}},[n,e]),null},nBi=\"https://cdn.jsdelivr.net/npm/manifold-3d@3.2.1\",oBi=({circuitJson:t,foldPcbs:e,autoRotateDisabled:n,clickToInteractEnabled:o,onUserInteraction:i,children:r,onCameraControllerReady:s,resolveStaticAsset:a,referenceObject:A,hiddenCadComponentIds:c})=\u003e{const l=OVe(r),u=ee.useMemo(()=\u003eWan(t??l),[t,l]),[g,h]=ee.useState(null),[d,p]=ee.useState(null),{visibility:m}=AT();ee.useEffect(()=\u003e{if(window.ManifoldModule\u0026\u0026typeof window.ManifoldModule==\"object\"\u0026\u0026window.ManifoldModule.setup){h(window.ManifoldModule);return}const k=async W=\u003e{try{const te=await W();te.setup(),window.ManifoldModule=te,h(te)}catch(te){console.error(\"Failed to initialize Manifold:\",te),p(`Failed to initialize Manifold: ${te instanceof Error?te.message:\"Unknown error\"}`)}},R=window.ManifoldModule??window.MANIFOLD??window.MANIFOLD_MODULE;if(R){window.ManifoldModule=R,k(window.ManifoldModule);return}const F=\"manifoldLoaded\",O=()=\u003e{const W=window.ManifoldModule??window.MANIFOLD??window.MANIFOLD_MODULE;if(W)window.ManifoldModule=W,k(window.ManifoldModule);else{const te=\"ManifoldModule not found on window after script load.\";console.error(te),p(te)}};window.addEventListener(F,O,{once:!0});const U=document.createElement(\"script\");U.type=\"module\",U.innerHTML=`\ntry {\n const { default: ManifoldModule } = await import('${nBi}/manifold.js');\n window.ManifoldModule = ManifoldModule;\n} catch (e) {\n console.error('Error importing manifold in dynamic script:', e);\n} finally {\n window.dispatchEvent(new CustomEvent('${F}'));\n}\n `.trim();const Y=W=\u003e{const te=\"Failed to load Manifold loader script.\";console.error(te,W),p(te),window.removeEventListener(F,O)};return U.addEventListener(\"error\",Y),document.body.appendChild(U),()=\u003e{window.removeEventListener(F,O),U.removeEventListener(\"error\",Y)}},[]);const{geoms:_,textures:f,pcbThickness:I,error:C,isLoading:y,boardData:x,isFauxBoard:E}=q4i(g,u,m),B=ee.useMemo(()=\u003e{try{const k=Srn(u,e),R=F4i(u,{foldPcbs:k});return{...O4i(eBi(_),c4i(f,x,I,E),u,k),posedJson:R,error:void 0}}catch(k){return{error:k instanceof Error?k.message:String(k),geometryMeshes:[],textureMeshes:[],posedJson:u,bounds:void 0}}},[_,f,x,I,E,u,e]),S=ee.useMemo(()=\u003eMr(B.posedJson).cad_component.list().filter(k=\u003e!c?.has(k.cad_component_id)),[B.posedJson,c]),Q=ee.useMemo(()=\u003e{if(!x)return;const k=DC(x);return{width:k.width,height:k.height}},[x]),w=ee.useMemo(()=\u003e{if(!x)return;const k=DC(x);return{x:k.centerX,y:k.centerY}},[x]),M=ee.useMemo(()=\u003e{if(!x)return[5,-5,5];const{width:k=0,height:R=0}=x,F=Math.max(k,1),O=Math.max(R,1),U=Math.max(F,O,5);return[U*.4,-U*.7,U*.9]},[x]);return d?K.jsxs(\"div\",{style:{color:\"red\",padding:\"1em\",border:\"1px solid red\",margin:\"1em\"},children:[\"Error: \",d]}):g?C||B.error?K.jsxs(\"div\",{role:\"alert\",style:{color:\"red\",padding:\"1em\",border:\"1px solid red\",margin:\"1em\"},children:[\"Error: \",C??B.error]}):y?K.jsx(\"div\",{style:{padding:\"1em\"},children:\"Processing board geometry...\"}):K.jsxs(San,{initialCameraPosition:M,autoRotateDisabled:n,clickToInteractEnabled:o,boardDimensions:Q,boardCenter:w,referenceObject:A,onUserInteraction:i,onCameraControllerReady:s,children:[K.jsx(tBi,{geometryMeshes:B.geometryMeshes,textureMeshes:B.textureMeshes}),B.bounds\u0026\u0026K.jsx(ban,{bounds:B.bounds}),S.map(k=\u003eK.jsx(vze,{fallback:({error:R})=\u003eK.jsx(Ran,{cad_component:k,error:R}),children:K.jsx(pan,{cad_component:k,circuitJson:B.posedJson,resolveStaticAsset:a})},k.cad_component_id))]}):K.jsx(\"div\",{style:{padding:\"1em\"},children:\"Loading Manifold module...\"})},iAn=oBi,iBi=Object.defineProperty,qY=(t,e)=\u003eiBi(t,\"name\",{value:e,configurable:!0}),rAn=!!(typeof window\u003c\"u\"\u0026\u0026window.document\u0026\u0026window.document.createElement);function El(t,e,{checkForDefaultPrevented:n=!0}={}){return qY(function(i){if(t?.(i),n===!1||!i||!i.defaultPrevented)return e?.(i)},\"handleEvent\")}qY(El,\"composeEventHandlers\");function rBi(t){if(!rAn)throw new Error(\"Cannot access window outside of the DOM\");return t?.ownerDocument?.defaultView??window}qY(rBi,\"getOwnerWindow\");function $ze(t){if(!rAn)throw new Error(\"Cannot access document outside of the DOM\");return t?.ownerDocument??document}qY($ze,\"getOwnerDocument\");function sAn(t,e=!1){const{activeElement:n}=$ze(t);if(!n?.nodeName)return null;if(aAn(n)\u0026\u0026n.contentDocument)return sAn(n.contentDocument.body,e);if(e){const o=n.getAttribute(\"aria-activedescendant\");if(o){const i=$ze(n).getElementById(o);if(i)return i}}return n}qY(sAn,\"getActiveElement\");function aAn(t){return t.tagName===\"IFRAME\"}qY(aAn,\"isFrame\");var sBi=Object.defineProperty,qze=(t,e)=\u003esBi(t,\"name\",{value:e,configurable:!0});function Xze(t,e){if(typeof t==\"function\")return t(e);t!=null\u0026\u0026(t.current=e)}qze(Xze,\"setRef\");function AAn(...t){return e=\u003e{let n=!1;const o=t.map(i=\u003e{const r=Xze(i,e);return!n\u0026\u0026typeof r==\"function\"\u0026\u0026(n=!0),r});if(n)return()=\u003e{for(let i=0;i\u003co.length;i++){const r=o[i];typeof r==\"function\"?r():Xze(t[i],null)}}}}qze(AAn,\"composeRefs\");function hf(...t){return ee.useCallback(AAn(...t),t)}qze(hf,\"useComposedRefs\");var aBi=Object.defineProperty,_4=(t,e)=\u003eaBi(t,\"name\",{value:e,configurable:!0});function ABi(t,e){const n=ee.createContext(e);n.displayName=t+\"Context\";const o=_4(r=\u003e{const{children:s,...a}=r,A=ee.useMemo(()=\u003ea,Object.values(a));return K.jsx(n.Provider,{value:A,children:s})},\"Provider\");o.displayName=t+\"Provider\";function i(r,s={}){const{optional:a=!1}=s,A=ee.useContext(n);if(A)return A;if(e!==void 0)return e;if(!a)throw new Error(`\\`${r}\\` must be used within \\`${t}\\``)}return _4(i,\"useContext\"),[o,i]}_4(ABi,\"createContext\");function fT(t,e=[]){let n=[];function o(r,s){const a=ee.createContext(s);a.displayName=r+\"Context\";const A=n.length;n=[...n,s];const c=_4(u=\u003e{const{scope:g,children:h,...d}=u,p=g?.[t]?.[A]||a,m=ee.useMemo(()=\u003ed,Object.values(d));return K.jsx(p.Provider,{value:m,children:h})},\"Provider\");c.displayName=r+\"Provider\";function l(u,g,h={}){const{optional:d=!1}=h,p=g?.[t]?.[A]||a,m=ee.useContext(p);if(m)return m;if(s!==void 0)return s;if(!d)throw new Error(`\\`${u}\\` must be used within \\`${r}\\``)}return _4(l,\"useContext\"),[c,l]}_4(o,\"createContext\");const i=_4(()=\u003e{const r=n.map(s=\u003eee.createContext(s));return _4(function(a){const A=a?.[t]||r;return ee.useMemo(()=\u003e({[`__scope${t}`]:{...a,[t]:A}}),[a,A])},\"useScope\")},\"createScope\");return i.scopeName=t,[o,cAn(i,...e)]}_4(fT,\"createContextScope\");function cAn(...t){const e=t[0];if(t.length===1)return e;const n=_4(()=\u003e{const o=t.map(i=\u003e({useScope:i(),scopeName:i.scopeName}));return _4(function(r){const s=o.reduce((a,{useScope:A,scopeName:c})=\u003e{const u=A(r)[`__scope${c}`];return{...a,...u}},{});return ee.useMemo(()=\u003e({[`__scope${e.scopeName}`]:s}),[s])},\"useComposedScopes\")},\"createScope\");return n.scopeName=e.scopeName,n}_4(cAn,\"composeContextScopes\");var XB=globalThis?.document?ee.useLayoutEffect:()=\u003e{},cBi=Object.defineProperty,lBi=(t,e)=\u003ecBi(t,\"name\",{value:e,configurable:!0}),lAn=Q5[\" useEffectEvent \".trim().toString()],uAn=Q5[\" useInsertionEffect \".trim().toString()];function gAn(t){if(typeof lAn==\"function\")return lAn(t);const e=ee.useRef(()=\u003e{throw new Error(\"Cannot call an event handler while rendering.\")});return typeof uAn==\"function\"?uAn(()=\u003e{e.current=t}):XB(()=\u003e{e.current=t}),ee.useMemo(()=\u003e((...n)=\u003ee.current?.(...n)),[])}lBi(gAn,\"useEffectEvent\");var uBi=Object.defineProperty,cZ=(t,e)=\u003euBi(t,\"name\",{value:e,configurable:!0}),gBi=Q5[\" useInsertionEffect \".trim().toString()]||XB;function Wpe({prop:t,defaultProp:e,onChange:n=cZ(()=\u003e{},\"onChange\"),caller:o}){const[i,r,s]=dAn({defaultProp:e,onChange:n}),a=t!==void 0,A=a?t:i,c=ee.useCallback(l=\u003e{if(a){const u=hAn(l)?l(t):l;u!==t\u0026\u0026s.current?.(u)}else r(l)},[a,t,r,s]);return[A,c]}cZ(Wpe,\"useControllableState\");function dAn({defaultProp:t,onChange:e}){const[n,o]=ee.useState(t),i=ee.useRef(n),r=ee.useRef(e);return gBi(()=\u003e{r.current=e},[e]),ee.useEffect(()=\u003e{i.current!==n\u0026\u0026(r.current?.(n),i.current=n)},[n,i]),[n,o,r]}cZ(dAn,\"useUncontrolledState\");function hAn(t){return typeof t==\"function\"}cZ(hAn,\"isFunction\");var pAn=Symbol(\"RADIX:SYNC_STATE\");function dBi(t,e,n,o){const{prop:i,defaultProp:r,onChange:s,caller:a}=e,A=i!==void 0,c=gAn(s),l=[{...n,state:r}];o\u0026\u0026l.push(o);const[u,g]=ee.useReducer((m,_)=\u003e{if(_.type===pAn)return{...m,state:_.state};const f=t(m,_);return A\u0026\u0026!Object.is(f.state,m.state)\u0026\u0026c(f.state),f},...l),h=u.state,d=ee.useRef(h);ee.useEffect(()=\u003e{d.current!==h\u0026\u0026(d.current=h,A||c(h))},[h,d,A]);const p=ee.useMemo(()=\u003ei!==void 0?{...u,state:i}:u,[u,i]);return ee.useEffect(()=\u003e{A\u0026\u0026!Object.is(i,u.state)\u0026\u0026g({type:pAn,state:i})},[i,u.state,A]),[p,g]}cZ(dBi,\"useControllableStateReducer\");var hBi=Object.defineProperty,ZB=(t,e)=\u003ehBi(t,\"name\",{value:e,configurable:!0});function IT(t){const e=ee.forwardRef((n,o)=\u003e{let{children:i,...r}=n,s=null,a=!1;const A=[];Zze(i)\u0026\u0026typeof jpe==\"function\"\u0026\u0026(i=jpe(i._payload)),ee.Children.forEach(i,g=\u003e{if(IAn(g)){a=!0;const h=g;let d=\"child\"in h.props?h.props.child:h.props.children;Zze(d)\u0026\u0026typeof jpe==\"function\"\u0026\u0026(d=jpe(d._payload)),s=mBi(h,d),A.push(s?.props?.children)}else A.push(g)}),s?s=ee.cloneElement(s,void 0,A):!a\u0026\u0026ee.Children.count(i)===1\u0026\u0026ee.isValidElement(i)\u0026\u0026(s=i);const c=s?fAn(s):void 0,l=hf(o,c);if(!s){if(i||i===0)throw new Error(a?IBi(t):fBi(t));return i}const u=_An(r,s.props??{});return s.type!==ee.Fragment\u0026\u0026(u.ref=o?l:c),ee.cloneElement(s,u)});return e.displayName=`${t}.Slot`,e}ZB(IT,\"createSlot\");var mAn=Symbol.for(\"radix.slottable\");function pBi(t){const e=ZB(n=\u003e\"child\"in n?n.children(n.child):n.children,\"Slottable\");return e.displayName=`${t}.Slottable`,e.__radixId=mAn,e}ZB(pBi,\"createSlottable\");var mBi=ZB((t,e)=\u003e{if(\"child\"in t.props){const n=t.props.child;return ee.isValidElement(n)?ee.cloneElement(n,void 0,t.props.children(n.props.children)):null}return ee.isValidElement(e)?e:null},\"getSlottableElementFromSlottable\");function _An(t,e){const n={...e};for(const o in e){const i=t[o],r=e[o];/^on[A-Z]/.test(o)?i\u0026\u0026r?n[o]=(...a)=\u003e{const A=r(...a);return i(...a),A}:i\u0026\u0026(n[o]=i):o===\"style\"?n[o]={...i,...r}:o===\"className\"\u0026\u0026(n[o]=[i,r].filter(Boolean).join(\" \"))}return{...t,...n}}ZB(_An,\"mergeProps\");function fAn(t){let e=Object.getOwnPropertyDescriptor(t.props,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}ZB(fAn,\"getElementRef\");function IAn(t){return ee.isValidElement(t)\u0026\u0026typeof t.type==\"function\"\u0026\u0026\"__radixId\"in t.type\u0026\u0026t.type.__radixId===mAn}ZB(IAn,\"isSlottable\");var _Bi=Symbol.for(\"react.lazy\");function Zze(t){return t!=null\u0026\u0026typeof t==\"object\"\u0026\u0026\"$typeof\"in t\u0026\u0026t.$typeof===_Bi\u0026\u0026\"_payload\"in t\u0026\u0026CAn(t._payload)}ZB(Zze,\"isLazyComponent\");function CAn(t){return typeof t==\"object\"\u0026\u0026t!==null\u0026\u0026\"then\"in t}ZB(CAn,\"isPromiseLike\");var fBi=ZB(t=\u003e`${t} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`,\"createSlotError\"),IBi=ZB(t=\u003e`${t} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`,\"createSlottableError\"),jpe=Q5[\" use \".trim().toString()],CBi=Object.defineProperty,yBi=(t,e)=\u003eCBi(t,\"name\",{value:e,configurable:!0}),xBi=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"select\",\"span\",\"svg\",\"ul\"],N6=xBi.reduce((t,e)=\u003e{const n=IT(`Primitive.${e}`),o=ee.forwardRef((i,r)=\u003e{const{asChild:s,...a}=i,A=s?n:e;return typeof window\u003c\"u\"\u0026\u0026(window[Symbol.for(\"radix-ui\")]=!0),K.jsx(A,{...a,ref:r})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function eJe(t,e){t\u0026\u0026c6.flushSync(()=\u003et.dispatchEvent(e))}yBi(eJe,\"dispatchDiscreteCustomEvent\");var EBi=Object.defineProperty,u1=(t,e)=\u003eEBi(t,\"name\",{value:e,configurable:!0});function tJe(t){const e=t+\"CollectionProvider\",[n,o]=fT(e),[i,r]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=u1(p=\u003e{const{scope:m,children:_}=p,f=ee.useRef(null),I=ee.useRef(new Map).current;return K.jsx(i,{scope:m,itemMap:I,collectionRef:f,children:_})},\"CollectionProvider\");s.displayName=e;const a=t+\"CollectionSlot\",A=IT(a),c=ee.forwardRef((p,m)=\u003e{const{scope:_,children:f}=p,I=r(a,_),C=hf(m,I.collectionRef);return K.jsx(A,{ref:C,children:f})});c.displayName=a;const l=t+\"CollectionItemSlot\",u=\"data-radix-collection-item\",g=IT(l),h=ee.forwardRef((p,m)=\u003e{const{scope:_,children:f,...I}=p,C=ee.useRef(null),y=hf(m,C),x=r(l,_);return ee.useEffect(()=\u003e(x.itemMap.set(C,{ref:C,...I}),()=\u003e{x.itemMap.delete(C)})),K.jsx(g,{[u]:\"\",ref:y,children:f})});h.displayName=l;function d(p){const m=r(t+\"CollectionConsumer\",p);return ee.useCallback(()=\u003e{const f=m.collectionRef.current;if(!f)return[];const I=Array.from(f.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((x,E)=\u003eI.indexOf(x.ref.current)-I.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return u1(d,\"useCollection\"),[{Provider:s,Slot:c,ItemSlot:h},d,o]}u1(tJe,\"createCollection\");var yAn=new WeakMap,nJe=(UE=class extends Map{constructor(n){super(n);uit(this,p_);Yte(this,p_,[...super.keys()]),yAn.set(this,!0)}set(n,o){return yAn.get(this)\u0026\u0026(this.has(n)?w0(this,p_)[w0(this,p_).indexOf(n)]=n:w0(this,p_).push(n)),super.set(n,o),this}insert(n,o,i){const r=this.has(o),s=w0(this,p_).length,a=oJe(n);let A=a\u003e=0?a:s+a;const c=A\u003c0||A\u003e=s?-1:A;if(c===this.size||r\u0026\u0026c===this.size-1||c===-1)return this.set(o,i),this;const l=this.size+(r?0:1);a\u003c0\u0026\u0026A++;const u=[...w0(this,p_)];let g,h=!1;for(let d=A;d\u003cl;d++)if(A===d){let p=u[d];u[d]===o\u0026\u0026(p=u[d+1]),r\u0026\u0026this.delete(o),g=this.get(p),this.set(o,i)}else{!h\u0026\u0026u[d-1]===o\u0026\u0026(h=!0);const p=u[h?d:d-1],m=g;g=this.get(p),this.delete(p),this.set(p,m)}return this}with(n,o,i){const r=new UE(this);return r.insert(n,o,i),r}before(n){const o=w0(this,p_).indexOf(n)-1;if(!(o\u003c0))return this.entryAt(o)}setBefore(n,o,i){const r=w0(this,p_).indexOf(n);return r===-1?this:this.insert(r,o,i)}after(n){let o=w0(this,p_).indexOf(n);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(n,o,i){const r=w0(this,p_).indexOf(n);return r===-1?this:this.insert(r+1,o,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Yte(this,p_,[]),super.clear()}delete(n){const o=super.delete(n);return o\u0026\u0026w0(this,p_).splice(w0(this,p_).indexOf(n),1),o}deleteAt(n){const o=this.keyAt(n);return o!==void 0?this.delete(o):!1}at(n){const o=$pe(w0(this,p_),n);if(o!==void 0)return this.get(o)}entryAt(n){const o=$pe(w0(this,p_),n);if(o!==void 0)return[o,this.get(o)]}indexOf(n){return w0(this,p_).indexOf(n)}keyAt(n){return $pe(w0(this,p_),n)}from(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r\u003c0\u0026\u0026(r=0),r\u003e=this.size\u0026\u0026(r=this.size-1),this.at(r)}keyFrom(n,o){const i=this.indexOf(n);if(i===-1)return;let r=i+o;return r\u003c0\u0026\u0026(r=0),r\u003e=this.size\u0026\u0026(r=this.size-1),this.keyAt(r)}find(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return r;i++}}findIndex(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return i;i++}return-1}filter(n,o){const i=[];let r=0;for(const s of this)Reflect.apply(n,o,[s,r,this])\u0026\u0026i.push(s),r++;return new UE(i)}map(n,o){const i=[];let r=0;for(const s of this)i.push([s[0],Reflect.apply(n,o,[s,r,this])]),r++;return new UE(i)}reduce(...n){const[o,i]=n;let r=0,s=i??this.at(0);for(const a of this)r===0\u0026\u0026n.length===1?s=a:s=Reflect.apply(o,this,[s,a,r,this]),r++;return s}reduceRight(...n){const[o,i]=n;let r=i??this.at(-1);for(let s=this.size-1;s\u003e=0;s--){const a=this.at(s);s===this.size-1\u0026\u0026n.length===1?r=a:r=Reflect.apply(o,this,[r,a,s,this])}return r}toSorted(n){const o=[...this.entries()].sort(n);return new UE(o)}toReversed(){const n=new UE;for(let o=this.size-1;o\u003e=0;o--){const i=this.keyAt(o),r=this.get(i);n.set(i,r)}return n}toSpliced(...n){const o=[...this.entries()];return o.splice(...n),new UE(o)}slice(n,o){const i=new UE;let r=this.size-1;if(n===void 0)return i;n\u003c0\u0026\u0026(n=n+this.size),o!==void 0\u0026\u0026o\u003e0\u0026\u0026(r=o-1);for(let s=n;s\u003c=r;s++){const a=this.keyAt(s),A=this.get(a);i.set(a,A)}return i}every(n,o){let i=0;for(const r of this){if(!Reflect.apply(n,o,[r,i,this]))return!1;i++}return!0}some(n,o){let i=0;for(const r of this){if(Reflect.apply(n,o,[r,i,this]))return!0;i++}return!1}},p_=new WeakMap,u1(UE,\"OrderedDict\"),UE);function $pe(t,e){if(\"at\"in Array.prototype)return Array.prototype.at.call(t,e);const n=xAn(t,e);return n===-1?void 0:t[n]}u1($pe,\"at\");function xAn(t,e){const n=t.length,o=oJe(e),i=o\u003e=0?o:n+o;return i\u003c0||i\u003e=n?-1:i}u1(xAn,\"toSafeIndex\");function oJe(t){return t!==t||t===0?0:Math.trunc(t)}u1(oJe,\"toSafeInteger\");function BBi(t){const e=t+\"CollectionProvider\",[n,o]=fT(e),[i,r]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new nJe,setItemMap:u1(()=\u003e{},\"setItemMap\")}),s=u1(({state:I,...C})=\u003eI?K.jsx(A,{...C,state:I}):K.jsx(a,{...C}),\"CollectionProvider\");s.displayName=e;const a=u1(I=\u003e{const C=m();return K.jsx(A,{...I,state:C})},\"CollectionInit\");a.displayName=e+\"Init\";const A=u1(I=\u003e{const{scope:C,children:y,state:x}=I,E=ee.useRef(null),[B,S]=ee.useState(null),Q=hf(E,S),[w,M]=x;return ee.useEffect(()=\u003e{if(!B)return;const k=bAn(()=\u003e{});return k.observe(B,{childList:!0,subtree:!0}),()=\u003e{k.disconnect()}},[B]),K.jsx(i,{scope:C,itemMap:w,setItemMap:M,collectionRef:Q,collectionRefObject:E,collectionElement:B,children:y})},\"CollectionProviderImpl\");A.displayName=e+\"Impl\";const c=t+\"CollectionSlot\",l=IT(c),u=ee.forwardRef((I,C)=\u003e{const{scope:y,children:x}=I,E=r(c,y),B=hf(C,E.collectionRef);return K.jsx(l,{ref:B,children:x})});u.displayName=c;const g=t+\"CollectionItemSlot\",h=\"data-radix-collection-item\",d=IT(g),p=ee.forwardRef((I,C)=\u003e{const{scope:y,children:x,...E}=I,B=ee.useRef(null),[S,Q]=ee.useState(null),w=hf(C,B,Q),M=r(g,y),{setItemMap:k}=M,R=ee.useRef(E);EAn(R.current,E)||(R.current=E);const F=R.current;return ee.useEffect(()=\u003e{const O=F;return k(U=\u003eS?U.has(S)?U.set(S,{...O,element:S}).toSorted(iJe):(U.set(S,{...O,element:S}),U.toSorted(iJe)):U),()=\u003e{k(U=\u003e!S||!U.has(S)?U:(U.delete(S),new nJe(U)))}},[S,F,k]),K.jsx(d,{[h]:\"\",ref:w,children:x})});p.displayName=g;function m(){return ee.useState(new nJe)}u1(m,\"useInitCollection\");function _(I){const{itemMap:C}=r(t+\"CollectionConsumer\",I);return C}return u1(_,\"useCollection\"),[{Provider:s,Slot:u,ItemSlot:p},{createCollectionScope:o,useCollection:_,useInitCollection:m}]}u1(BBi,\"createCollection\");function EAn(t,e){if(t===e)return!0;if(typeof t!=\"object\"||typeof e!=\"object\"||t==null||e==null)return!1;const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(e,i)||t[i]!==e[i])return!1;return!0}u1(EAn,\"shallowEqual\");function BAn(t,e){return!!(e.compareDocumentPosition(t)\u0026Node.DOCUMENT_POSITION_PRECEDING)}u1(BAn,\"isElementPreceding\");function iJe(t,e){return!t[1].element||!e[1].element?0:BAn(t[1].element,e[1].element)?-1:1}u1(iJe,\"sortByDocumentPosition\");function bAn(t){return new MutationObserver(n=\u003e{for(const o of n)if(o.type===\"childList\"){t();return}})}u1(bAn,\"getChildListObserver\");var bBi=Object.defineProperty,SBi=(t,e)=\u003ebBi(t,\"name\",{value:e,configurable:!0}),QBi=ee.createContext(void 0);function rJe(t){const e=ee.useContext(QBi);return t||e||\"ltr\"}SBi(rJe,\"useDirection\");var vBi=Object.defineProperty,wBi=(t,e)=\u003evBi(t,\"name\",{value:e,configurable:!0});function R6(t){const e=ee.useRef(t);return ee.useEffect(()=\u003e{e.current=t}),ee.useMemo(()=\u003e((...n)=\u003ee.current?.(...n)),[])}wBi(R6,\"useCallbackRef\");var PBi=Object.defineProperty,g1=(t,e)=\u003ePBi(t,\"name\",{value:e,configurable:!0}),sJe=\"dismissableLayer.update\",MBi=\"dismissableLayer.pointerDownOutside\",DBi=\"dismissableLayer.focusOutside\",SAn,QAn=ee.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),NBi=ee.forwardRef(g1(function(e,n){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:A,onDismiss:c,...l}=e,u=ee.useContext(QAn),[g,h]=ee.useState(null),d=g?.ownerDocument??globalThis?.document,[,p]=ee.useState({}),m=hf(n,h),_=Array.from(u.layers),[f]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),I=f?_.indexOf(f):-1,C=g?_.indexOf(g):-1,y=u.layersWithOutsidePointerEventsDisabled.size\u003e0,x=C\u003e=I,E=ee.useRef(!1),B=vAn(M=\u003e{s?.(M),A?.(M),M.defaultPrevented||c?.()},{ownerDocument:d,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:ee.useCallback(M=\u003e{if(!(M instanceof Node))return!1;const k=[...u.branches].some(R=\u003eR.contains(M));return x\u0026\u0026!k},[u.branches,x])}),S=wAn(M=\u003e{if(i\u0026\u0026E.current)return;const k=M.target;[...u.branches].some(F=\u003eF.contains(k))||(a?.(M),A?.(M),M.defaultPrevented||c?.())},d),Q=g?C===_.length-1:!1,w=R6(M=\u003e{M.key===\"Escape\"\u0026\u0026(r?.(M),!M.defaultPrevented\u0026\u0026c\u0026\u0026(M.preventDefault(),c()))});return ee.useEffect(()=\u003e{if(Q)return d.addEventListener(\"keydown\",w,{capture:!0}),()=\u003ed.removeEventListener(\"keydown\",w,{capture:!0})},[d,Q,w]),ee.useEffect(()=\u003e{if(g)return o\u0026\u0026(u.layersWithOutsidePointerEventsDisabled.size===0\u0026\u0026(SAn=d.body.style.pointerEvents,d.body.style.pointerEvents=\"none\"),u.layersWithOutsidePointerEventsDisabled.add(g)),u.layers.add(g),aJe(),()=\u003e{o\u0026\u0026(u.layersWithOutsidePointerEventsDisabled.delete(g),u.layersWithOutsidePointerEventsDisabled.size===0\u0026\u0026(d.body.style.pointerEvents=SAn))}},[g,d,o,u]),ee.useEffect(()=\u003e()=\u003e{g\u0026\u0026(u.layers.delete(g),u.layersWithOutsidePointerEventsDisabled.delete(g),aJe())},[g,u]),ee.useEffect(()=\u003e{const M=g1(()=\u003ep({}),\"handleUpdate\");return document.addEventListener(sJe,M),()=\u003edocument.removeEventListener(sJe,M)},[]),K.jsx(N6.div,{...l,ref:m,style:{pointerEvents:y?x?\"auto\":\"none\":void 0,...e.style},onFocusCapture:El(e.onFocusCapture,S.onFocusCapture),onBlurCapture:El(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:El(e.onPointerDownCapture,B.onPointerDownCapture)})},\"DismissableLayer\"));function RBi(){const t=ee.useContext(QAn),[e,n]=ee.useState(null);return ee.useEffect(()=\u003e{if(e)return t.dismissableSurfaces.add(e),()=\u003e{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}g1(RBi,\"useDismissableLayerSurface\");var TBi=g1(()=\u003e!0,\"IS_TRUE\");function vAn(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:r,shouldHandlePointerDownOutside:s=TBi}=e,a=R6(t),A=ee.useRef(!1),c=ee.useRef(!1),l=ee.useRef(new Map),u=ee.useRef(()=\u003e{});return ee.useEffect(()=\u003e{function g(){c.current=!1,i.current=!1,l.current.clear()}g1(g,\"resetOutsideInteraction\");function h(){return Array.from(l.current.values()).some(Boolean)}g1(h,\"isOutsideInteractionIntercepted\");function d(I){if(!c.current)return;const C=I.target;C instanceof Node\u0026\u0026[...r].some(x=\u003ex.contains(C))||l.current.set(I.type,!0),I.type===\"click\"\u0026\u0026window.setTimeout(()=\u003e{c.current\u0026\u0026u.current()},0)}g1(d,\"handleInteractionCapture\");function p(I){c.current\u0026\u0026l.current.set(I.type,!1)}g1(p,\"handleInteractionBubble\");const m=g1(I=\u003e{if(I.target\u0026\u0026!A.current){let C=function(){n.removeEventListener(\"click\",u.current);const x=h();g(),x||AJe(MBi,a,y,{discrete:!0})};if(g1(C,\"handleAndDispatchPointerDownOutsideEvent\"),!s(I.target)){n.removeEventListener(\"click\",u.current),g(),A.current=!1;return}const y={originalEvent:I};c.current=!0,i.current=o\u0026\u0026I.button===0,l.current.clear(),!o||I.button!==0?C():(n.removeEventListener(\"click\",u.current),u.current=C,n.addEventListener(\"click\",u.current,{once:!0}))}else n.removeEventListener(\"click\",u.current),g();A.current=!1},\"handlePointerDown\"),_=[\"pointerup\",\"mousedown\",\"mouseup\",\"touchstart\",\"touchend\",\"click\"];for(const I of _)n.addEventListener(I,d,!0),n.addEventListener(I,p);const f=window.setTimeout(()=\u003e{n.addEventListener(\"pointerdown\",m)},0);return()=\u003e{window.clearTimeout(f),n.removeEventListener(\"pointerdown\",m),n.removeEventListener(\"click\",u.current);for(const I of _)n.removeEventListener(I,d,!0),n.removeEventListener(I,p)}},[n,a,o,i,r,s]),{onPointerDownCapture:g1(()=\u003eA.current=!0,\"onPointerDownCapture\")}}g1(vAn,\"usePointerDownOutside\");function wAn(t,e=globalThis?.document){const n=R6(t),o=ee.useRef(!1);return ee.useEffect(()=\u003e{const i=g1(r=\u003e{r.target\u0026\u0026!o.current\u0026\u0026AJe(DBi,n,{originalEvent:r},{discrete:!1})},\"handleFocus\");return e.addEventListener(\"focusin\",i),()=\u003ee.removeEventListener(\"focusin\",i)},[e,n]),{onFocusCapture:g1(()=\u003eo.current=!0,\"onFocusCapture\"),onBlurCapture:g1(()=\u003eo.current=!1,\"onBlurCapture\")}}g1(wAn,\"useFocusOutside\");function aJe(){const t=new CustomEvent(sJe);document.dispatchEvent(t)}g1(aJe,\"dispatchUpdate\");function AJe(t,e,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e\u0026\u0026i.addEventListener(t,e,{once:!0}),o?eJe(i,r):i.dispatchEvent(r)}g1(AJe,\"handleAndDispatchCustomEvent\");var kBi=Object.defineProperty,cJe=(t,e)=\u003ekBi(t,\"name\",{value:e,configurable:!0}),qpe=0,XY=null;function FBi(t){return lJe(),t.children}cJe(FBi,\"FocusGuards\");function lJe(){ee.useEffect(()=\u003e{XY||(XY={start:uJe(),end:uJe()});const{start:t,end:e}=XY;return document.body.firstElementChild!==t\u0026\u0026document.body.insertAdjacentElement(\"afterbegin\",t),document.body.lastElementChild!==e\u0026\u0026document.body.insertAdjacentElement(\"beforeend\",e),qpe++,()=\u003e{qpe===1\u0026\u0026(XY?.start.remove(),XY?.end.remove(),XY=null),qpe=Math.max(0,qpe-1)}},[])}cJe(lJe,\"useFocusGuards\");function uJe(){const t=document.createElement(\"span\");return t.setAttribute(\"data-radix-focus-guard\",\"\"),t.tabIndex=0,t.style.outline=\"none\",t.style.opacity=\"0\",t.style.position=\"fixed\",t.style.pointerEvents=\"none\",t}cJe(uJe,\"createFocusGuard\");var LBi=Object.defineProperty,A2=(t,e)=\u003eLBi(t,\"name\",{value:e,configurable:!0}),gJe=\"focusScope.autoFocusOnMount\",dJe=\"focusScope.autoFocusOnUnmount\",PAn={bubbles:!1,cancelable:!0},HBi=ee.forwardRef(A2(function(e,n){const{loop:o=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[A,c]=ee.useState(null),l=R6(r),u=R6(s),g=ee.useRef(null),h=hf(n,c),d=ee.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ee.useEffect(()=\u003e{if(i){let m=function(C){if(d.paused||!A)return;const y=C.target;A.contains(y)?g.current=y:dS(g.current,{select:!0})},_=function(C){if(d.paused||!A)return;const y=C.relatedTarget;y!==null\u0026\u0026(A.contains(y)||dS(g.current,{select:!0}))},f=function(C){if(document.activeElement===document.body)for(const x of C)x.removedNodes.length\u003e0\u0026\u0026dS(A)};A2(m,\"handleFocusIn\"),A2(_,\"handleFocusOut\"),A2(f,\"handleMutations\"),document.addEventListener(\"focusin\",m),document.addEventListener(\"focusout\",_);const I=new MutationObserver(f);return A\u0026\u0026I.observe(A,{childList:!0,subtree:!0}),()=\u003e{document.removeEventListener(\"focusin\",m),document.removeEventListener(\"focusout\",_),I.disconnect()}}},[i,A,d.paused]),ee.useEffect(()=\u003e{if(A){TAn.add(d);const m=document.activeElement;if(!A.contains(m)){const f=new CustomEvent(gJe,PAn);A.addEventListener(gJe,l),A.dispatchEvent(f),f.defaultPrevented||(MAn(FAn(hJe(A)),{select:!0}),document.activeElement===m\u0026\u0026dS(A))}return()=\u003e{A.removeEventListener(gJe,l),setTimeout(()=\u003e{const f=new CustomEvent(dJe,PAn);A.addEventListener(dJe,u),A.dispatchEvent(f),f.defaultPrevented||dS(m??document.body,{select:!0}),A.removeEventListener(dJe,u),TAn.remove(d)},0)}}},[A,l,u,d]);const p=ee.useCallback(m=\u003e{if(!o\u0026\u0026!i||d.paused)return;const _=m.key===\"Tab\"\u0026\u0026!m.altKey\u0026\u0026!m.ctrlKey\u0026\u0026!m.metaKey,f=document.activeElement;if(_\u0026\u0026f){const I=m.currentTarget,[C,y]=DAn(I);C\u0026\u0026y?!m.shiftKey\u0026\u0026f===y?(m.preventDefault(),o\u0026\u0026dS(C,{select:!0})):m.shiftKey\u0026\u0026f===C\u0026\u0026(m.preventDefault(),o\u0026\u0026dS(y,{select:!0})):f===I\u0026\u0026m.preventDefault()}},[o,i,d.paused]);return K.jsx(N6.div,{tabIndex:-1,...a,ref:h,onKeyDown:p})},\"FocusScope\"));function MAn(t,{select:e=!1}={}){const n=document.activeElement;for(const o of t)if(dS(o,{select:e}),document.activeElement!==n)return}A2(MAn,\"focusFirst\");function DAn(t){const e=hJe(t),n=pJe(e,t),o=pJe(e.reverse(),t);return[n,o]}A2(DAn,\"getTabbableEdges\");function hJe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:A2(o=\u003e{const i=o.tagName===\"INPUT\"\u0026\u0026o.type===\"hidden\";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex\u003e=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},\"acceptNode\")});for(;n.nextNode();)e.push(n.currentNode);return e}A2(hJe,\"getTabbableCandidates\");function pJe(t,e){const n=typeof e.checkVisibility==\"function\"\u0026\u0026e.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):NAn(o,{upTo:e})))return o}A2(pJe,\"findVisible\");function NAn(t,{upTo:e}){if(getComputedStyle(t).visibility===\"hidden\")return!0;for(;t;){if(e!==void 0\u0026\u0026t===e)return!1;if(getComputedStyle(t).display===\"none\")return!0;t=t.parentElement}return!1}A2(NAn,\"isHidden\");function RAn(t){return t instanceof HTMLInputElement\u0026\u0026\"select\"in t}A2(RAn,\"isSelectableInput\");function dS(t,{select:e=!1}={}){if(t\u0026\u0026t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n\u0026\u0026RAn(t)\u0026\u0026e\u0026\u0026t.select()}}A2(dS,\"focus\");var TAn=kAn();function kAn(){let t=[];return{add(e){const n=t[0];e!==n\u0026\u0026n?.pause(),t=mJe(t,e),t.unshift(e)},remove(e){t=mJe(t,e),t[0]?.resume()}}}A2(kAn,\"createFocusScopesStack\");function mJe(t,e){const n=[...t],o=n.indexOf(e);return o!==-1\u0026\u0026n.splice(o,1),n}A2(mJe,\"arrayRemove\");function FAn(t){return t.filter(e=\u003ee.tagName!==\"A\")}A2(FAn,\"removeLinks\");var OBi=Object.defineProperty,GBi=(t,e)=\u003eOBi(t,\"name\",{value:e,configurable:!0}),YBi=Q5[\" useId \".trim().toString()]||(()=\u003e{}),UBi=0;function ZY(t){const[e,n]=ee.useState(YBi());return XB(()=\u003e{t||n(o=\u003eo??String(UBi++))},[t]),t||(e?`radix-${e}`:\"\")}GBi(ZY,\"useId\");var KBi=[\"top\",\"right\",\"bottom\",\"left\"],CP=Math.min,hS=Math.max,Xpe=Math.round,Zpe=Math.floor,pS=t=\u003e({x:t,y:t}),VBi={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function LAn(t,e,n){return hS(t,CP(e,n))}function mS(t,e){return typeof t==\"function\"?t(e):t}function yP(t){return t.split(\"-\")[0]}function eU(t){return t.split(\"-\")[1]}function _Je(t){return t===\"x\"?\"y\":\"x\"}function fJe(t){return t===\"y\"?\"height\":\"width\"}function T6(t){const e=t[0];return e===\"t\"||e===\"b\"?\"y\":\"x\"}function IJe(t){return _Je(T6(t))}function zBi(t,e,n){n===void 0\u0026\u0026(n=!1);const o=eU(t),i=IJe(t),r=fJe(i);let s=i===\"x\"?o===(n?\"end\":\"start\")?\"right\":\"left\":o===\"start\"?\"bottom\":\"top\";return e.reference[r]\u003ee.floating[r]\u0026\u0026(s=eme(s)),[s,eme(s)]}function JBi(t){const e=eme(t);return[CJe(t),e,CJe(e)]}function CJe(t){return t.includes(\"start\")?t.replace(\"start\",\"end\"):t.replace(\"end\",\"start\")}var HAn=[\"left\",\"right\"],OAn=[\"right\",\"left\"],WBi=[\"top\",\"bottom\"],jBi=[\"bottom\",\"top\"];function $Bi(t,e,n){switch(t){case\"top\":case\"bottom\":return n?e?OAn:HAn:e?HAn:OAn;case\"left\":case\"right\":return e?WBi:jBi;default:return[]}}function qBi(t,e,n,o){const i=eU(t);let r=$Bi(yP(t),n===\"start\",o);return i\u0026\u0026(r=r.map(s=\u003es+\"-\"+i),e\u0026\u0026(r=r.concat(r.map(CJe)))),r}function eme(t){const e=yP(t);return VBi[e]+t.slice(e.length)}function XBi(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function GAn(t){return typeof t!=\"number\"?XBi(t):{top:t,right:t,bottom:t,left:t}}function tme(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function YAn(t,e,n){let{reference:o,floating:i}=t;const r=T6(e),s=IJe(e),a=fJe(s),A=yP(e),c=r===\"y\",l=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,g=o[a]/2-i[a]/2;let h;switch(A){case\"top\":h={x:l,y:o.y-i.height};break;case\"bottom\":h={x:l,y:o.y+o.height};break;case\"right\":h={x:o.x+o.width,y:u};break;case\"left\":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}const d=eU(e);return d\u0026\u0026(h[s]+=g*(d===\"end\"?1:-1)*(n\u0026\u0026c?-1:1)),h}async function ZBi(t,e){var n;e===void 0\u0026\u0026(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:A}=t,{boundary:c=\"clippingAncestors\",rootBoundary:l=\"viewport\",elementContext:u=\"floating\",altBoundary:g=!1,padding:h=0}=mS(e,t),d=GAn(h),m=a[g?u===\"floating\"?\"reference\":\"floating\":u],_=tme(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:A})),f=u===\"floating\"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,I=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),C=await(r.isElement==null?void 0:r.isElement(I))\u0026\u0026await(r.getScale==null?void 0:r.getScale(I))||{x:1,y:1},y=tme(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:I,strategy:A}):f);return{top:(_.top-y.top+d.top)/C.y,bottom:(y.bottom-_.bottom+d.bottom)/C.y,left:(_.left-y.left+d.left)/C.x,right:(y.right-_.right+d.right)/C.x}}var e9i=50,t9i=async(t,e,n)=\u003e{const{placement:o=\"bottom\",strategy:i=\"absolute\",middleware:r=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:ZBi},A=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:l,y:u}=YAn(c,o,A),g=o,h=0;const d={};for(let p=0;p\u003cr.length;p++){const m=r[p];if(!m)continue;const{name:_,fn:f}=m,{x:I,y:C,data:y,reset:x}=await f({x:l,y:u,initialPlacement:o,placement:g,strategy:i,middlewareData:d,rects:c,platform:a,elements:{reference:t,floating:e}});l=I??l,u=C??u,d[_]={...d[_],...y},x\u0026\u0026h\u003ce9i\u0026\u0026(h++,typeof x==\"object\"\u0026\u0026(x.placement\u0026\u0026(g=x.placement),x.rects\u0026\u0026(c=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:l,y:u}=YAn(c,g,A)),p=-1)}return{x:l,y:u,placement:g,strategy:i,middlewareData:d}},n9i=t=\u003e({name:\"arrow\",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:A}=e,{element:c,padding:l=0}=mS(t,e)||{};if(c==null)return{};const u=GAn(l),g={x:n,y:o},h=IJe(i),d=fJe(h),p=await s.getDimensions(c),m=h===\"y\",_=m?\"top\":\"left\",f=m?\"bottom\":\"right\",I=m?\"clientHeight\":\"clientWidth\",C=r.reference[d]+r.reference[h]-g[h]-r.floating[d],y=g[h]-r.reference[h],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=x?x[I]:0;(!E||!await(s.isElement==null?void 0:s.isElement(x)))\u0026\u0026(E=a.floating[I]||r.floating[d]);const B=C/2-y/2,S=E/2-p[d]/2-1,Q=CP(u[_],S),w=CP(u[f],S),M=E-p[d]-w,k=E/2-p[d]/2+B,R=LAn(Q,k,M),F=!A.arrow\u0026\u0026eU(i)!=null\u0026\u0026k!==R\u0026\u0026r.reference[d]/2-(k\u003cQ?Q:w)-p[d]/2\u003c0,O=F?k\u003cQ?k-Q:k-M:0;return{[h]:g[h]+O,data:{[h]:R,centerOffset:k-R-O,...F\u0026\u0026{alignmentOffset:O}},reset:F}}}),o9i=function(t){return t===void 0\u0026\u0026(t={}),{name:\"flip\",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:A,elements:c}=e,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:h=\"bestFit\",fallbackAxisSideDirection:d=\"none\",flipAlignment:p=!0,...m}=mS(t,e);if((n=r.arrow)!=null\u0026\u0026n.alignmentOffset)return{};const _=yP(i),f=T6(a),I=yP(a)===a,C=await(A.isRTL==null?void 0:A.isRTL(c.floating)),y=g||(I||!p?[eme(a)]:JBi(a)),x=d!==\"none\";!g\u0026\u0026x\u0026\u0026y.push(...qBi(a,p,d,C));const E=[a,...y],B=await A.detectOverflow(e,m),S=[];let Q=((o=r.flip)==null?void 0:o.overflows)||[];if(l\u0026\u0026S.push(B[_]),u){const R=zBi(i,s,C);S.push(B[R[0]],B[R[1]])}if(Q=[...Q,{placement:i,overflows:S}],!S.every(R=\u003eR\u003c=0)){var w,M;const R=(((w=r.flip)==null?void 0:w.index)||0)+1,F=E[R];if(F\u0026\u0026(!(u===\"alignment\"?f!==T6(F):!1)||Q.every(Y=\u003eT6(Y.placement)===f?Y.overflows[0]\u003e0:!0)))return{data:{index:R,overflows:Q},reset:{placement:F}};let O=(M=Q.filter(U=\u003eU.overflows[0]\u003c=0).sort((U,Y)=\u003eU.overflows[1]-Y.overflows[1])[0])==null?void 0:M.placement;if(!O)switch(h){case\"bestFit\":{var k;const U=(k=Q.filter(Y=\u003e{if(x){const W=T6(Y.placement);return W===f||W===\"y\"}return!0}).map(Y=\u003e[Y.placement,Y.overflows.filter(W=\u003eW\u003e0).reduce((W,te)=\u003eW+te,0)]).sort((Y,W)=\u003eY[1]-W[1])[0])==null?void 0:k[0];U\u0026\u0026(O=U);break}case\"initialPlacement\":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function UAn(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function KAn(t){return KBi.some(e=\u003et[e]\u003e=0)}var i9i=function(t){return t===void 0\u0026\u0026(t={}),{name:\"hide\",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i=\"referenceHidden\",...r}=mS(t,e);switch(i){case\"referenceHidden\":{const s=await o.detectOverflow(e,{...r,elementContext:\"reference\"}),a=UAn(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:KAn(a)}}}case\"escaped\":{const s=await o.detectOverflow(e,{...r,altBoundary:!0}),a=UAn(s,n.floating);return{data:{escapedOffsets:a,escaped:KAn(a)}}}default:return{}}}}},VAn=new Set([\"left\",\"top\"]);async function r9i(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=yP(n),a=eU(n),A=T6(n)===\"y\",c=VAn.has(s)?-1:1,l=r\u0026\u0026A?-1:1,u=mS(e,t);let{mainAxis:g,crossAxis:h,alignmentAxis:d}=typeof u==\"number\"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a\u0026\u0026typeof d==\"number\"\u0026\u0026(h=a===\"end\"?d*-1:d),A?{x:h*l,y:g*c}:{x:g*c,y:h*l}}var s9i=function(t){return t===void 0\u0026\u0026(t=0),{name:\"offset\",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=e,A=await r9i(e,t);return s===((n=a.offset)==null?void 0:n.placement)\u0026\u0026(o=a.arrow)!=null\u0026\u0026o.alignmentOffset?{}:{x:i+A.x,y:r+A.y,data:{...A,placement:s}}}}},a9i=function(t){return t===void 0\u0026\u0026(t={}),{name:\"shift\",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:A={fn:f=\u003e{let{x:I,y:C}=f;return{x:I,y:C}}},...c}=mS(t,e),l={x:n,y:o},u=await r.detectOverflow(e,c),g=T6(i),h=_Je(g);let d=l[h],p=l[g];const m=(f,I)=\u003eLAn(I+u[f===\"y\"?\"top\":\"left\"],I,I-u[f===\"y\"?\"bottom\":\"right\"]);s\u0026\u0026(d=m(h,d)),a\u0026\u0026(p=m(g,p));const _=A.fn({...e,[h]:d,[g]:p});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[h]:s,[g]:a}}}}}},A9i=function(t){return t===void 0\u0026\u0026(t={}),{options:t,fn(e){var n,o;const{x:i,y:r,placement:s,rects:a,middlewareData:A}=e,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=mS(t,e),g={x:i,y:r},h=T6(s),d=_Je(h);let p=g[d],m=g[h];const _=mS(c,e),f=typeof _==\"number\"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(o=_.crossAxis)!=null?o:0};if(l){const y=d===\"y\"?\"height\":\"width\",x=a.reference[d]-a.floating[y]+f.mainAxis,E=a.reference[d]+a.reference[y]-f.mainAxis;p\u003cx?p=x:p\u003eE\u0026\u0026(p=E)}if(u){var I,C;const y=d===\"y\"?\"width\":\"height\",x=VAn.has(yP(s)),E=a.reference[h]-a.floating[y]+(x\u0026\u0026((I=A.offset)==null?void 0:I[h])||0)+(x?0:f.crossAxis),B=a.reference[h]+a.reference[y]+(x?0:((C=A.offset)==null?void 0:C[h])||0)-(x?f.crossAxis:0);m\u003cE?m=E:m\u003eB\u0026\u0026(m=B)}return{[d]:p,[h]:m}}}},c9i=function(t){return t===void 0\u0026\u0026(t={}),{name:\"size\",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:r}=e,{apply:s=()=\u003e{},...a}=mS(t,e),A=await i.detectOverflow(e,a),c=yP(n),l=eU(n),u=T6(n)===\"y\",{width:g,height:h}=o.floating;let d,p;c===\"top\"||c===\"bottom\"?(d=c,p=l===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?\"start\":\"end\")?\"left\":\"right\"):(p=c,d=l===\"end\"?\"top\":\"bottom\");const m=h-A.top-A.bottom,_=g-A.left-A.right,f=CP(h-A[d],m),I=CP(g-A[p],_),C=e.middlewareData.shift,y=!C;let x=f,E=I;C!=null\u0026\u0026C.enabled.x\u0026\u0026(E=_),C!=null\u0026\u0026C.enabled.y\u0026\u0026(x=m),y\u0026\u0026!l\u0026\u0026(u?E=g-2*hS(A.left,A.right):x=h-2*hS(A.top,A.bottom)),await s({...e,availableWidth:E,availableHeight:x});const B=await i.getDimensions(r.floating);return g!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function nme(){return typeof window\u003c\"u\"}function tU(t){return zAn(t)?(t.nodeName||\"\").toLowerCase():\"#document\"}function Jx(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _S(t){var e;return(e=(zAn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zAn(t){return nme()?t instanceof Node||t instanceof Jx(t).Node:!1}function k6(t){return nme()?t instanceof Element||t instanceof Jx(t).Element:!1}function xP(t){return nme()?t instanceof HTMLElement||t instanceof Jx(t).HTMLElement:!1}function JAn(t){return!nme()||typeof ShadowRoot\u003e\"u\"?!1:t instanceof ShadowRoot||t instanceof Jx(t).ShadowRoot}function ome(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=F6(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)\u0026\u0026i!==\"inline\"\u0026\u0026i!==\"contents\"}function l9i(t){return/^(table|td|th)$/.test(tU(t))}function ime(t){try{if(t.matches(\":popover-open\"))return!0}catch{}try{return t.matches(\":modal\")}catch{return!1}}var u9i=/transform|translate|scale|rotate|perspective|filter/,g9i=/paint|layout|strict|content/,CT=t=\u003e!!t\u0026\u0026t!==\"none\",yJe;function xJe(t){const e=k6(t)?F6(t):t;return CT(e.transform)||CT(e.translate)||CT(e.scale)||CT(e.rotate)||CT(e.perspective)||!EJe()\u0026\u0026(CT(e.backdropFilter)||CT(e.filter))||u9i.test(e.willChange||\"\")||g9i.test(e.contain||\"\")}function d9i(t){let e=yT(t);for(;xP(e)\u0026\u0026!lZ(e);){if(xJe(e))return e;if(ime(e))return null;e=yT(e)}return null}function EJe(){return yJe==null\u0026\u0026(yJe=typeof CSS\u003c\"u\"\u0026\u0026CSS.supports\u0026\u0026CSS.supports(\"-webkit-backdrop-filter\",\"none\")),yJe}function lZ(t){return/^(html|body|#document)$/.test(tU(t))}function F6(t){return Jx(t).getComputedStyle(t)}function rme(t){return k6(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function yT(t){if(tU(t)===\"html\")return t;const e=t.assignedSlot||t.parentNode||JAn(t)\u0026\u0026t.host||_S(t);return JAn(e)?e.host:e}function WAn(t){const e=yT(t);return lZ(e)?(t.ownerDocument||t).body:xP(e)\u0026\u0026ome(e)?e:WAn(e)}function uZ(t,e,n){var o;e===void 0\u0026\u0026(e=[]),n===void 0\u0026\u0026(n=!0);const i=WAn(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=Jx(i);if(r){const a=BJe(s);return e.concat(s,s.visualViewport||[],ome(i)?i:[],a\u0026\u0026n?uZ(a):[])}else return e.concat(i,uZ(i,[],n))}function BJe(t){return t.parent\u0026\u0026Object.getPrototypeOf(t.parent)?t.frameElement:null}function jAn(t){const e=F6(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=xP(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,a=Xpe(n)!==r||Xpe(o)!==s;return a\u0026\u0026(n=r,o=s),{width:n,height:o,$:a}}function bJe(t){return k6(t)?t:t.contextElement}function nU(t){const e=bJe(t);if(!xP(e))return pS(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=jAn(e);let s=(r?Xpe(n.width):n.width)/o,a=(r?Xpe(n.height):n.height)/i;return(!s||!Number.isFinite(s))\u0026\u0026(s=1),(!a||!Number.isFinite(a))\u0026\u0026(a=1),{x:s,y:a}}var h9i=pS(0);function $An(t){const e=Jx(t);return!EJe()||!e.visualViewport?h9i:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function p9i(t,e,n){return e===void 0\u0026\u0026(e=!1),!!n\u0026\u0026e\u0026\u0026n===Jx(t)}function xT(t,e,n,o){e===void 0\u0026\u0026(e=!1),n===void 0\u0026\u0026(n=!1);const i=t.getBoundingClientRect(),r=bJe(t);let s=pS(1);e\u0026\u0026(o?k6(o)\u0026\u0026(s=nU(o)):s=nU(t));const a=p9i(r,n,o)?$An(r):pS(0);let A=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,l=i.width/s.x,u=i.height/s.y;if(r\u0026\u0026o){const g=Jx(r),h=k6(o)?Jx(o):o;let d=g,p=BJe(d);for(;p\u0026\u0026h!==d;){const m=nU(p),_=p.getBoundingClientRect(),f=F6(p),I=_.left+(p.clientLeft+parseFloat(f.paddingLeft))*m.x,C=_.top+(p.clientTop+parseFloat(f.paddingTop))*m.y;A*=m.x,c*=m.y,l*=m.x,u*=m.y,A+=I,c+=C,d=Jx(p),p=BJe(d)}}return tme({width:l,height:u,x:A,y:c})}function sme(t,e){const n=rme(t).scrollLeft;return e?e.left+n:xT(_S(t)).left+n}function qAn(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-sme(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function m9i(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i===\"fixed\",s=_S(o),a=e?ime(e.floating):!1;if(o===s||a\u0026\u0026r)return n;let A={scrollLeft:0,scrollTop:0},c=pS(1);const l=pS(0),u=xP(o);if((u||!r)\u0026\u0026((tU(o)!==\"body\"||ome(s))\u0026\u0026(A=rme(o)),u)){const h=xT(o);c=nU(o),l.x=h.x+o.clientLeft,l.y=h.y+o.clientTop}const g=s\u0026\u0026!u\u0026\u0026!r?qAn(s,A):pS(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-A.scrollLeft*c.x+l.x+g.x,y:n.y*c.y-A.scrollTop*c.y+l.y+g.y}}function _9i(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function f9i(t){const e=rme(t),n=t.ownerDocument.body,o=hS(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=hS(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+sme(t);const s=-e.scrollTop;return F6(n).direction===\"rtl\"\u0026\u0026(r+=hS(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:r,y:s}}var I9i=25;function C9i(t,e,n){n===void 0\u0026\u0026(n=\"viewport\");const o=n===\"layoutViewport\",i=Jx(t),r=_S(t),s=i.visualViewport;let a=r.clientWidth,A=r.clientHeight,c=0,l=0;if(s){const g=!EJe()||e===\"fixed\";o?g||(c=-s.offsetLeft,l=-s.offsetTop):(a=s.width,A=s.height,g\u0026\u0026(c=s.offsetLeft,l=s.offsetTop))}if(sme(r)\u003c=0){const g=r.ownerDocument,h=g.body,d=getComputedStyle(h),p=g.compatMode===\"CSS1Compat\"\u0026\u0026parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-h.clientWidth-p),_=getComputedStyle(r).scrollbarGutter===\"stable both-edges\"?m/2:m;_\u003c=I9i\u0026\u0026(a-=_)}return{width:a,height:A,x:c,y:l}}function y9i(t,e){const n=xT(t,!0,e===\"fixed\"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=nU(t),s=t.clientWidth*r.x,a=t.clientHeight*r.y,A=i*r.x,c=o*r.y;return{width:s,height:a,x:A,y:c}}function XAn(t,e,n){let o;if(e===\"viewport\"||e===\"layoutViewport\")o=C9i(t,n,e);else if(e===\"document\")o=f9i(_S(t));else if(k6(e))o=y9i(e,n);else{const i=$An(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return tme(o)}function x9i(t,e){const n=e.get(t);if(n)return n;let o=uZ(t,[],!1).filter(a=\u003ek6(a)\u0026\u0026tU(a)!==\"body\"),i=null;const r=F6(t).position===\"fixed\";let s=r?yT(t):t;for(;k6(s)\u0026\u0026!lZ(s);){const a=F6(s),A=xJe(s),c=i?i.position:r?\"fixed\":\"\";!A\u0026\u0026(c===\"fixed\"||c===\"absolute\"\u0026\u0026a.position===\"static\")?o=o.filter(u=\u003eu!==s):i=a,s=yT(s)}return e.set(t,o),o}function E9i(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n===\"clippingAncestors\"?ime(e)?[]:x9i(e,this._c):[].concat(n),o],a=XAn(e,s[0],i);let A=a.top,c=a.right,l=a.bottom,u=a.left;for(let g=1;g\u003cs.length;g++){const h=XAn(e,s[g],i);A=hS(h.top,A),c=CP(h.right,c),l=CP(h.bottom,l),u=hS(h.left,u)}return{width:c-u,height:l-A,x:u,y:A}}function B9i(t){const{width:e,height:n}=jAn(t);return{width:e,height:n}}function b9i(t,e,n){const o=xP(e),i=_S(e),r=n===\"fixed\",s=xT(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const A=pS(0);if((o||!r)\u0026\u0026((tU(e)!==\"body\"||ome(i))\u0026\u0026(a=rme(e)),o)){const g=xT(e,!0,r,e);A.x=g.x+e.clientLeft,A.y=g.y+e.clientTop}!o\u0026\u0026i\u0026\u0026(A.x=sme(i));const c=i\u0026\u0026!o\u0026\u0026!r?qAn(i,a):pS(0),l=s.left+a.scrollLeft-A.x-c.x,u=s.top+a.scrollTop-A.y-c.y;return{x:l,y:u,width:s.width,height:s.height}}function SJe(t){return F6(t).position===\"static\"}function ZAn(t,e){if(!xP(t)||F6(t).position===\"fixed\")return null;if(e)return e(t);let n=t.offsetParent;return _S(t)===n\u0026\u0026(n=n.ownerDocument.body),n}function ecn(t,e){const n=Jx(t);if(ime(t))return n;if(!xP(t)){let i=yT(t);for(;i\u0026\u0026!lZ(i);){if(k6(i)\u0026\u0026!SJe(i))return i;i=yT(i)}return n}let o=ZAn(t,e);for(;o\u0026\u0026l9i(o)\u0026\u0026SJe(o);)o=ZAn(o,e);return o\u0026\u0026lZ(o)\u0026\u0026SJe(o)\u0026\u0026!xJe(o)?n:o||d9i(t)||n}var S9i=async function(t){const e=this.getOffsetParent||ecn,n=this.getDimensions,o=await n(t.floating);return{reference:b9i(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Q9i(t){return F6(t).direction===\"rtl\"}var v9i={convertOffsetParentRelativeRectToViewportRelativeRect:m9i,getDocumentElement:_S,getClippingRect:E9i,getOffsetParent:ecn,getElementRects:S9i,getClientRects:_9i,getDimensions:B9i,getScale:nU,isElement:k6,isRTL:Q9i};function tcn(t,e){return t.x===e.x\u0026\u0026t.y===e.y\u0026\u0026t.width===e.width\u0026\u0026t.height===e.height}function w9i(t,e,n){let o=null,i;const r=_S(t);function s(){var l;clearTimeout(i),(l=o)==null||l.disconnect(),o=null}function a(l,u){l===void 0\u0026\u0026(l=!1),u===void 0\u0026\u0026(u=1),s();const g=t.getBoundingClientRect(),{left:h,top:d,width:p,height:m}=g;if(l||e(),!p||!m)return;const _=Zpe(d),f=Zpe(r.clientWidth-(h+p)),I=Zpe(r.clientHeight-(d+m)),C=Zpe(h),x={rootMargin:-_+\"px \"+-f+\"px \"+-I+\"px \"+-C+\"px\",threshold:hS(0,CP(1,u))||1};let E=!0;function B(S){const Q=S[0].intersectionRatio;if(!tcn(g,t.getBoundingClientRect()))return a();if(Q!==u){if(!E)return a();Q?a(!1,Q):i=setTimeout(()=\u003e{a(!1,1e-7)},1e3)}E=!1}try{o=new IntersectionObserver(B,{...x,root:r.ownerDocument})}catch{o=new IntersectionObserver(B,x)}o.observe(t)}const A=Jx(t),c=()=\u003ea(n);return A.addEventListener(\"resize\",c),a(!0),()=\u003e{A.removeEventListener(\"resize\",c),s()}}function P9i(t,e,n,o){o===void 0\u0026\u0026(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver==\"function\",layoutShift:a=typeof IntersectionObserver==\"function\",animationFrame:A=!1}=o,c=bJe(t),l=i||r?[...c?uZ(c):[],...e?uZ(e):[]]:[];l.forEach(_=\u003e{i\u0026\u0026_.addEventListener(\"scroll\",n),r\u0026\u0026_.addEventListener(\"resize\",n)});const u=c\u0026\u0026a?w9i(c,n,r):null;let g=-1,h=null;s\u0026\u0026(h=new ResizeObserver(_=\u003e{let[f]=_;f\u0026\u0026f.target===c\u0026\u0026h\u0026\u0026e\u0026\u0026(h.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=\u003e{var I;(I=h)==null||I.observe(e)})),n()}),c\u0026\u0026!A\u0026\u0026h.observe(c),e\u0026\u0026h.observe(e));let d,p=A?xT(t):null;A\u0026\u0026m();function m(){const _=xT(t);p\u0026\u0026!tcn(p,_)\u0026\u0026n(),p=_,d=requestAnimationFrame(m)}return n(),()=\u003e{var _;l.forEach(f=\u003e{i\u0026\u0026f.removeEventListener(\"scroll\",n),r\u0026\u0026f.removeEventListener(\"resize\",n)}),u?.(),(_=h)==null||_.disconnect(),h=null,A\u0026\u0026cancelAnimationFrame(d)}}var M9i=s9i,D9i=a9i,N9i=o9i,R9i=c9i,T9i=i9i,ncn=n9i,k9i=A9i,F9i=(t,e,n)=\u003e{const o=new Map,i=n??{},r={...v9i,...i.platform,_c:o};return t9i(t,e,{...i,platform:r})},L9i=typeof document\u003c\"u\",H9i=function(){},ame=L9i?ee.useLayoutEffect:H9i;function Ame(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t==\"function\"\u0026\u0026t.toString()===e.toString())return!0;let n,o,i;if(t\u0026\u0026e\u0026\u0026typeof t==\"object\"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Ame(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r===\"_owner\"\u0026\u0026t.$typeof)\u0026\u0026!Ame(t[r],e[r]))return!1}return!0}return t!==t\u0026\u0026e!==e}function ocn(t){return typeof window\u003e\"u\"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function icn(t,e){const n=ocn(t);return Math.round(e*n)/n}function QJe(t){const e=ee.useRef(t);return ame(()=\u003e{e.current=t}),e}function O9i(t){t===void 0\u0026\u0026(t={});const{placement:e=\"bottom\",strategy:n=\"absolute\",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:A,open:c}=t,[l,u]=ee.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,h]=ee.useState(o);Ame(g,o)||h(o);const[d,p]=ee.useState(null),[m,_]=ee.useState(null),f=ee.useCallback(Y=\u003e{Y!==x.current\u0026\u0026(x.current=Y,p(Y))},[]),I=ee.useCallback(Y=\u003e{Y!==E.current\u0026\u0026(E.current=Y,_(Y))},[]),C=r||d,y=s||m,x=ee.useRef(null),E=ee.useRef(null),B=ee.useRef(l),S=A!=null,Q=QJe(A),w=QJe(i),M=QJe(c),k=ee.useCallback(()=\u003e{if(!x.current||!E.current)return;const Y={placement:e,strategy:n,middleware:g};w.current\u0026\u0026(Y.platform=w.current),F9i(x.current,E.current,Y).then(W=\u003e{const te={...W,isPositioned:M.current!==!1};R.current\u0026\u0026!Ame(B.current,te)\u0026\u0026(B.current=te,c6.flushSync(()=\u003e{u(te)}))})},[g,e,n,w,M]);ame(()=\u003e{c===!1\u0026\u0026B.current.isPositioned\u0026\u0026(B.current.isPositioned=!1,u(Y=\u003e({...Y,isPositioned:!1})))},[c]);const R=ee.useRef(!1);ame(()=\u003e(R.current=!0,()=\u003e{R.current=!1}),[]),ame(()=\u003e{if(C\u0026\u0026(x.current=C),y\u0026\u0026(E.current=y),C\u0026\u0026y){if(Q.current)return Q.current(C,y,k);k()}},[C,y,k,Q,S]);const F=ee.useMemo(()=\u003e({reference:x,floating:E,setReference:f,setFloating:I}),[f,I]),O=ee.useMemo(()=\u003e({reference:C,floating:y}),[C,y]),U=ee.useMemo(()=\u003e{const Y={position:n,left:0,top:0};if(!O.floating)return Y;const W=icn(O.floating,l.x),te=icn(O.floating,l.y);return a?{...Y,transform:\"translate(\"+W+\"px, \"+te+\"px)\",...ocn(O.floating)\u003e=1.5\u0026\u0026{willChange:\"transform\"}}:{position:n,left:W,top:te}},[n,a,O.floating,l.x,l.y]);return ee.useMemo(()=\u003e({...l,update:k,refs:F,elements:O,floatingStyles:U}),[l,k,F,O,U])}var G9i=t=\u003e{function e(n){return{}.hasOwnProperty.call(n,\"current\")}return{name:\"arrow\",options:t,fn(n){const{element:o,padding:i}=typeof t==\"function\"?t(n):t;return o\u0026\u0026e(o)?o.current!=null?ncn({element:o.current,padding:i}).fn(n):{}:o?ncn({element:o,padding:i}).fn(n):{}}}},Y9i=(t,e)=\u003e{const n=M9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},U9i=(t,e)=\u003e{const n=D9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},K9i=(t,e)=\u003e({fn:k9i(t).fn,options:[t,e]}),V9i=(t,e)=\u003e{const n=N9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},z9i=(t,e)=\u003e{const n=R9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},J9i=(t,e)=\u003e{const n=T9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},W9i=(t,e)=\u003e{const n=G9i(t);return{name:n.name,fn:n.fn,options:[t,e]}},j9i=Object.defineProperty,$9i=(t,e)=\u003ej9i(t,\"name\",{value:e,configurable:!0});function rcn(t){const[e,n]=ee.useState(void 0);return XB(()=\u003e{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(i=\u003e{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if(\"borderBoxSize\"in r){const A=r.borderBoxSize,c=Array.isArray(A)?A[0]:A;s=c.inlineSize,a=c.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return o.observe(t,{box:\"border-box\"}),()=\u003eo.unobserve(t)}else n(void 0)},[t]),e}$9i(rcn,\"useSize\");var q9i=Object.defineProperty,EP=(t,e)=\u003eq9i(t,\"name\",{value:e,configurable:!0}),scn=\"Popper\",[acn,Acn]=fT(scn),[X9i,ccn]=acn(scn),Z9i=EP(t=\u003e{const{__scopePopper:e,children:n}=t,[o,i]=ee.useState(null),[r,s]=ee.useState(void 0);return K.jsx(X9i,{scope:e,anchor:o,onAnchorChange:i,placementState:r,setPlacementState:s,children:n})},\"Popper\"),e7i=\"PopperAnchor\",t7i=ee.forwardRef(EP(function(e,n){const{__scopePopper:o,virtualRef:i,...r}=e,s=ccn(e7i,o),a=ee.useRef(null),A=s.onAnchorChange,c=ee.useCallback(p=\u003e{a.current=p,p\u0026\u0026A(p)},[A]),l=hf(n,c),u=ee.useRef(null);ee.useEffect(()=\u003e{if(!i)return;const p=u.current;u.current=i.current,p!==u.current\u0026\u0026A(u.current)});const g=s.placementState\u0026\u0026cme(s.placementState),h=g?.[0],d=g?.[1];return i?null:K.jsx(N6.div,{\"data-radix-popper-side\":h,\"data-radix-popper-align\":d,...r,ref:l})},\"PopperAnchor\")),lcn=\"PopperContent\",[n7i,Npr]=acn(lcn),o7i=ee.forwardRef(EP(function(e,n){const{__scopePopper:o,side:i=\"bottom\",sideOffset:r=0,align:s=\"center\",alignOffset:a=0,arrowPadding:A=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:g=\"partial\",hideWhenDetached:h=!1,updatePositionStrategy:d=\"optimized\",onPlaced:p,...m}=e,_=ccn(lcn,o),[f,I]=ee.useState(null),C=hf(n,I),[y,x]=ee.useState(null),E=rcn(y),B=E?.width??0,S=E?.height??0,Q=i+(s!==\"center\"?\"-\"+s:\"\"),w=typeof u==\"number\"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(l)?l:[l],k=M.length\u003e0,R={padding:w,boundary:M.filter(ucn),altBoundary:k},{refs:F,floatingStyles:O,placement:U,isPositioned:Y,middlewareData:W}=O9i({strategy:\"fixed\",placement:Q,whileElementsMounted:EP((...ue)=\u003eP9i(...ue,{animationFrame:d===\"always\"}),\"whileElementsMounted\"),elements:{reference:_.anchor},middleware:[Y9i({mainAxis:r+S,alignmentAxis:a}),c\u0026\u0026U9i({mainAxis:!0,crossAxis:!1,limiter:g===\"partial\"?K9i():void 0,...R}),c\u0026\u0026V9i({...R}),z9i({...R,apply:EP(({elements:ue,rects:fe,availableWidth:pe,availableHeight:ye})=\u003e{const{width:Me,height:ve}=fe.reference,he=ue.floating.style;he.setProperty(\"--radix-popper-available-width\",`${pe}px`),he.setProperty(\"--radix-popper-available-height\",`${ye}px`),he.setProperty(\"--radix-popper-anchor-width\",`${Me}px`),he.setProperty(\"--radix-popper-anchor-height\",`${ve}px`)},\"apply\")}),y\u0026\u0026W9i({element:y,padding:A}),i7i({arrowWidth:B,arrowHeight:S}),h\u0026\u0026J9i({strategy:\"referenceHidden\",...R,boundary:k?R.boundary:void 0})]}),te=_.setPlacementState;XB(()=\u003e(te(U),()=\u003e{te(void 0)}),[U,te]);const[j,J]=cme(U),oe=R6(p);XB(()=\u003e{Y\u0026\u0026oe?.()},[Y,oe]);const ie=W.arrow?.x,ne=W.arrow?.y,le=W.arrow?.centerOffset!==0,[ge,_e]=ee.useState();return XB(()=\u003e{f\u0026\u0026_e(window.getComputedStyle(f).zIndex)},[f]),K.jsx(\"div\",{ref:F.setFloating,\"data-radix-popper-content-wrapper\":\"\",style:{...O,transform:Y?O.transform:\"translate(0, -200%)\",minWidth:\"max-content\",zIndex:ge,\"--radix-popper-transform-origin\":[W.transformOrigin?.x,W.transformOrigin?.y].join(\" \"),...W.hide?.referenceHidden\u0026\u0026{visibility:\"hidden\",pointerEvents:\"none\"}},dir:e.dir,children:K.jsx(n7i,{scope:o,placedSide:j,placedAlign:J,onArrowChange:x,arrowX:ie,arrowY:ne,shouldHideArrow:le,children:K.jsx(N6.div,{\"data-side\":j,\"data-align\":J,...m,ref:C,style:{...m.style,animation:Y?m.style?.animation:\"none\"}})})})},\"PopperContent\"));function ucn(t){return t!==null}EP(ucn,\"isNotNull\");var i7i=EP(t=\u003e({name:\"transformOrigin\",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,a=s?0:t.arrowWidth,A=s?0:t.arrowHeight,[c,l]=cme(n),u={start:\"0%\",center:\"50%\",end:\"100%\"}[l],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+A/2;let d=\"\",p=\"\";return c===\"bottom\"?(d=s?u:`${g}px`,p=`${-A}px`):c===\"top\"?(d=s?u:`${g}px`,p=`${o.floating.height+A}px`):c===\"right\"?(d=`${-A}px`,p=s?u:`${h}px`):c===\"left\"\u0026\u0026(d=`${o.floating.width+A}px`,p=s?u:`${h}px`),{data:{x:d,y:p}}}}),\"transformOrigin\");function cme(t){const[e,n=\"center\"]=t.split(\"-\");return[e,n]}EP(cme,\"getSideAndAlignFromPlacement\");var gcn=Z9i,r7i=t7i,s7i=o7i,a7i=Object.defineProperty,A7i=(t,e)=\u003ea7i(t,\"name\",{value:e,configurable:!0}),c7i=ee.forwardRef(A7i(function(e,n){const{container:o,...i}=e,[r,s]=ee.useState(!1);XB(()=\u003es(!0),[]);const a=o||r\u0026\u0026globalThis?.document?.body;return a?c6.createPortal(K.jsx(N6.div,{...i,ref:n}),a):null},\"Portal\")),l7i=Object.defineProperty,fS=(t,e)=\u003el7i(t,\"name\",{value:e,configurable:!0});function dcn(t,e){return ee.useReducer((n,o)=\u003ee[n][o]??n,t)}fS(dcn,\"useStateMachine\");var vJe=fS(t=\u003e{const{present:e,children:n}=t,o=hcn(e),i=typeof n==\"function\"?n({present:o.isPresent}):ee.Children.only(n),r=pcn(o.ref,mcn(i));return typeof n==\"function\"||o.isPresent?ee.cloneElement(i,{ref:r}):null},\"Presence\");function hcn(t){const[e,n]=ee.useState(),o=ee.useRef(null),i=ee.useRef(t),r=ee.useRef(\"none\"),s=ee.useRef(void 0),a=t?\"mounted\":\"unmounted\",[A,c]=dcn(a,{mounted:{UNMOUNT:\"unmounted\",ANIMATION_OUT:\"unmountSuspended\"},unmountSuspended:{MOUNT:\"mounted\",ANIMATION_END:\"unmounted\"},unmounted:{MOUNT:\"mounted\"}});return ee.useEffect(()=\u003e{A===\"mounted\"?(r.current=s.current??oU(o.current),s.current=void 0):r.current=\"none\"},[A]),XB(()=\u003e{const l=o.current,u=i.current;if(u!==t){const h=r.current,d=oU(l);t?(s.current=d,c(\"MOUNT\")):d===\"none\"||l?.display===\"none\"?c(\"UNMOUNT\"):c(u\u0026\u0026h!==d?\"ANIMATION_OUT\":\"UNMOUNT\"),i.current=t}},[t,c]),XB(()=\u003e{if(e){let l;const u=e.ownerDocument.defaultView??window,g=fS(d=\u003e{const m=oU(o.current).includes(CSS.escape(d.animationName));if(d.target===e\u0026\u0026m\u0026\u0026(c(\"ANIMATION_END\"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode=\"forwards\",l=u.setTimeout(()=\u003e{e.style.animationFillMode===\"forwards\"\u0026\u0026(e.style.animationFillMode=_)})}},\"handleAnimationEnd\"),h=fS(d=\u003e{d.target===e\u0026\u0026(r.current=oU(o.current))},\"handleAnimationStart\");return e.addEventListener(\"animationstart\",h),e.addEventListener(\"animationcancel\",g),e.addEventListener(\"animationend\",g),()=\u003e{u.clearTimeout(l),e.removeEventListener(\"animationstart\",h),e.removeEventListener(\"animationcancel\",g),e.removeEventListener(\"animationend\",g)}}else c(\"ANIMATION_END\")},[e,c]),{isPresent:[\"mounted\",\"unmountSuspended\"].includes(A),ref:ee.useCallback(l=\u003e{if(l){const u=getComputedStyle(l);o.current=u,s.current=oU(u)}else o.current=null;n(l)},[])}}fS(hcn,\"usePresence\");function wJe(t,e){if(typeof t==\"function\")return t(e);t!=null\u0026\u0026(t.current=e)}fS(wJe,\"setRef\");function pcn(...t){const e=ee.useRef(t);return e.current=t,ee.useCallback(n=\u003e{const o=e.current;let i=!1;const r=o.map(s=\u003e{const a=wJe(s,n);return!i\u0026\u0026typeof a==\"function\"\u0026\u0026(i=!0),a});if(i)return()=\u003e{for(let s=0;s\u003cr.length;s++){const a=r[s];typeof a==\"function\"?a():wJe(o[s],null)}}},[])}fS(pcn,\"useStableComposedRefs\");function oU(t){return t?.animationName||\"none\"}fS(oU,\"getAnimationName\");function mcn(t){let e=Object.getOwnPropertyDescriptor(t.props,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,\"ref\")?.get,n=e\u0026\u0026\"isReactWarning\"in e\u0026\u0026e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}fS(mcn,\"getElementRef\");var u7i=Object.defineProperty,PJe=(t,e)=\u003eu7i(t,\"name\",{value:e,configurable:!0}),MJe=!1;function _cn(){const[t,e]=ee.useState(MJe);return ee.useEffect(()=\u003e{MJe||(MJe=!0,e(!0))},[]),t}PJe(_cn,\"useIsHydrated\");var fcn=Q5[\" useSyncExternalStore \".trim().toString()];function Icn(){return()=\u003e{}}PJe(Icn,\"subscribe\");function Ccn(){return fcn(Icn,()=\u003e!0,()=\u003e!1)}PJe(Ccn,\"useIsHydratedModern\");var g7i=typeof fcn==\"function\"?Ccn:_cn,d7i=Object.defineProperty,ET=(t,e)=\u003ed7i(t,\"name\",{value:e,configurable:!0}),DJe=\"rovingFocusGroup.onEntryFocus\",h7i={bubbles:!1,cancelable:!0},lme=\"RovingFocusGroup\",[NJe,ycn,p7i]=tJe(lme),[m7i,xcn]=fT(lme,[p7i]),[_7i,f7i]=m7i(lme),I7i=ee.forwardRef(ET(function(e,n){return K.jsx(NJe.Provider,{scope:e.__scopeRovingFocusGroup,children:K.jsx(NJe.Slot,{scope:e.__scopeRovingFocusGroup,children:K.jsx(C7i,{...e,ref:n})})})},\"RovingFocusGroup\")),C7i=ee.forwardRef(ET(function(e,n){const{__scopeRovingFocusGroup:o,orientation:i,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:A,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...g}=e,h=ee.useRef(null),d=hf(n,h),p=rJe(s),[m,_]=Wpe({prop:a,defaultProp:A??null,onChange:c,caller:lme}),[f,I]=ee.useState(!1),C=R6(l),y=ycn(o),x=ee.useRef(!1),[E,B]=ee.useState(0);return ee.useEffect(()=\u003e{const S=h.current;if(S)return S.addEventListener(DJe,C),()=\u003eS.removeEventListener(DJe,C)},[C]),K.jsx(_7i,{scope:o,orientation:i,dir:p,loop:r,currentTabStopId:m,onItemFocus:ee.useCallback(S=\u003e_(S),[_]),onItemShiftTab:ee.useCallback(()=\u003eI(!0),[]),onFocusableItemAdd:ee.useCallback(()=\u003eB(S=\u003eS+1),[]),onFocusableItemRemove:ee.useCallback(()=\u003eB(S=\u003eS-1),[]),children:K.jsx(N6.div,{tabIndex:f||E===0?-1:0,\"data-orientation\":i,...g,ref:d,style:{outline:\"none\",...e.style},onMouseDown:El(e.onMouseDown,()=\u003e{x.current=!0}),onFocus:El(e.onFocus,S=\u003e{const Q=!x.current;if(S.target===S.currentTarget\u0026\u0026Q\u0026\u0026!f){const w=new CustomEvent(DJe,h7i);if(S.currentTarget.dispatchEvent(w),!w.defaultPrevented){const M=y().filter(U=\u003eU.focusable),k=M.find(U=\u003eU.active),R=M.find(U=\u003eU.id===m),O=[k,R,...M].filter(Boolean).map(U=\u003eU.ref.current);RJe(O,u)}}x.current=!1}),onBlur:El(e.onBlur,()=\u003eI(!1))})})},\"RovingFocusGroupImpl\")),y7i=\"RovingFocusGroupItem\",x7i=ee.forwardRef(ET(function(e,n){const{__scopeRovingFocusGroup:o,focusable:i=!0,active:r=!1,tabStopId:s,children:a,...A}=e,c=ZY(),l=s||c,u=f7i(y7i,o),g=u.currentTabStopId===l,h=ycn(o),{onFocusableItemAdd:d,onFocusableItemRemove:p,currentTabStopId:m}=u,_=g7i();return XB(()=\u003e{if(!(!_||!i))return d(),()=\u003ep()},[_,i,d,p]),ee.useEffect(()=\u003e{if(!(_||!i))return d(),()=\u003ep()},[_,i,d,p]),K.jsx(NJe.ItemSlot,{scope:o,id:l,focusable:i,active:r,children:K.jsx(N6.span,{tabIndex:g?0:-1,\"data-orientation\":u.orientation,...A,ref:n,onMouseDown:El(e.onMouseDown,f=\u003e{i?u.onItemFocus(l):f.preventDefault()}),onFocus:El(e.onFocus,()=\u003eu.onItemFocus(l)),onKeyDown:El(e.onKeyDown,f=\u003e{if(f.key===\"Tab\"\u0026\u0026f.shiftKey){u.onItemShiftTab();return}if(f.target!==f.currentTarget)return;const I=Bcn(f,u.orientation,u.dir);if(I!==void 0){if(f.metaKey||f.ctrlKey||f.altKey||f.shiftKey)return;f.preventDefault();let y=h().filter(x=\u003ex.focusable).map(x=\u003ex.ref.current);if(I===\"last\")y.reverse();else if(I===\"prev\"||I===\"next\"){I===\"prev\"\u0026\u0026y.reverse();const x=y.indexOf(f.currentTarget);y=u.loop?bcn(y,x+1):y.slice(x+1)}setTimeout(()=\u003eRJe(y))}}),children:typeof a==\"function\"?a({isCurrentTabStop:g,hasTabStop:m!=null}):a})})},\"RovingFocusGroupItem\")),E7i={ArrowLeft:\"prev\",ArrowUp:\"prev\",ArrowRight:\"next\",ArrowDown:\"next\",PageUp:\"first\",Home:\"first\",PageDown:\"last\",End:\"last\"};function Ecn(t,e){return e!==\"rtl\"?t:t===\"ArrowLeft\"?\"ArrowRight\":t===\"ArrowRight\"?\"ArrowLeft\":t}ET(Ecn,\"getDirectionAwareKey\");function Bcn(t,e,n){const o=Ecn(t.key,n);if(!(e===\"vertical\"\u0026\u0026[\"ArrowLeft\",\"ArrowRight\"].includes(o))\u0026\u0026!(e===\"horizontal\"\u0026\u0026[\"ArrowUp\",\"ArrowDown\"].includes(o)))return E7i[o]}ET(Bcn,\"getFocusIntent\");function RJe(t,e=!1){const n=document.activeElement;for(const o of t)if(o===n||(o.focus({preventScroll:e}),document.activeElement!==n))return}ET(RJe,\"focusFirst\");function bcn(t,e){return t.map((n,o)=\u003et[(e+o)%t.length])}ET(bcn,\"wrapArray\");var B7i=I7i,b7i=x7i,S7i=function(t){if(typeof document\u003e\"u\")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},iU=new WeakMap,ume=new WeakMap,gme={},TJe=0,Scn=function(t){return t\u0026\u0026(t.host||Scn(t.parentNode))},Q7i=function(t,e){return e.map(function(n){if(t.contains(n))return n;var o=Scn(n);return o\u0026\u0026t.contains(o)?o:(console.error(\"aria-hidden\",n,\"in not contained inside\",t,\". Doing nothing\"),null)}).filter(function(n){return!!n})},v7i=function(t,e,n,o){var i=Q7i(e,Array.isArray(t)?t:[t]);gme[n]||(gme[n]=new WeakMap);var r=gme[n],s=[],a=new Set,A=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var l=function(u){!u||A.has(u)||Array.prototype.forEach.call(u.children,function(g){if(a.has(g))l(g);else try{var h=g.getAttribute(o),d=h!==null\u0026\u0026h!==\"false\",p=(iU.get(g)||0)+1,m=(r.get(g)||0)+1;iU.set(g,p),r.set(g,m),s.push(g),p===1\u0026\u0026d\u0026\u0026ume.set(g,!0),m===1\u0026\u0026g.setAttribute(n,\"true\"),d||g.setAttribute(o,\"true\")}catch(_){console.error(\"aria-hidden: cannot operate on \",g,_)}})};return l(e),a.clear(),TJe++,function(){s.forEach(function(u){var g=iU.get(u)-1,h=r.get(u)-1;iU.set(u,g),r.set(u,h),g||(ume.has(u)||u.removeAttribute(o),ume.delete(u)),h||u.removeAttribute(n)}),TJe--,TJe||(iU=new WeakMap,iU=new WeakMap,ume=new WeakMap,gme={})}},w7i=function(t,e,n){n===void 0\u0026\u0026(n=\"data-aria-hidden\");var o=Array.from(Array.isArray(t)?t:[t]),i=S7i(t);return i?(o.push.apply(o,Array.from(i.querySelectorAll(\"[aria-live], script\"))),v7i(o,i,n,\"aria-hidden\")):function(){return null}},L6=function(){return L6=Object.assign||function(e){for(var n,o=1,i=arguments.length;o\u003ci;o++){n=arguments[o];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)\u0026\u0026(e[r]=n[r])}return e},L6.apply(this,arguments)};function Qcn(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)\u0026\u0026e.indexOf(o)\u003c0\u0026\u0026(n[o]=t[o]);if(t!=null\u0026\u0026typeof Object.getOwnPropertySymbols==\"function\")for(var i=0,o=Object.getOwnPropertySymbols(t);i\u003co.length;i++)e.indexOf(o[i])\u003c0\u0026\u0026Object.prototype.propertyIsEnumerable.call(t,o[i])\u0026\u0026(n[o[i]]=t[o[i]]);return n}function P7i(t,e,n){for(var o=0,i=e.length,r;o\u003ci;o++)(r||!(o in e))\u0026\u0026(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var dme=\"right-scroll-bar-position\",hme=\"width-before-scroll-bar\",M7i=\"with-scroll-bars-hidden\",D7i=\"--removed-body-scroll-bar-size\";function kJe(t,e){return typeof t==\"function\"?t(e):t\u0026\u0026(t.current=e),t}function N7i(t,e){var n=ee.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o\u0026\u0026(n.value=o,n.callback(o,i))}}}})[0];return n.callback=e,n.facade}var R7i=typeof window\u003c\"u\"?ee.useLayoutEffect:ee.useEffect,vcn=new WeakMap;function T7i(t,e){var n=N7i(null,function(o){return t.forEach(function(i){return kJe(i,o)})});return R7i(function(){var o=vcn.get(n);if(o){var i=new Set(o),r=new Set(t),s=n.current;i.forEach(function(a){r.has(a)||kJe(a,null)}),r.forEach(function(a){i.has(a)||kJe(a,s)})}vcn.set(n,t)},[t]),n}function k7i(t){return t}function F7i(t,e){e===void 0\u0026\u0026(e=k7i);var n=[],o=!1,i={read:function(){if(o)throw new Error(\"Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.\");return n.length?n[n.length-1]:t},useMedium:function(r){var s=e(r,o);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(r){for(o=!0;n.length;){var s=n;n=[],s.forEach(r)}n={push:function(a){return r(a)},filter:function(){return n}}},assignMedium:function(r){o=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(r),s=n}var A=function(){var l=s;s=[],l.forEach(r)},c=function(){return Promise.resolve().then(A)};c(),n={push:function(l){s.push(l),c()},filter:function(l){return s=s.filter(l),n}}}};return i}function L7i(t){t===void 0\u0026\u0026(t={});var e=F7i(null);return e.options=L6({async:!0,ssr:!1},t),e}var wcn=function(t){var e=t.sideCar,n=Qcn(t,[\"sideCar\"]);if(!e)throw new Error(\"Sidecar: please provide `sideCar` property to import the right car\");var o=e.read();if(!o)throw new Error(\"Sidecar medium not found\");return ee.createElement(o,L6({},n))};wcn.isSideCarExport=!0;function H7i(t,e){return t.useMedium(e),wcn}var Pcn=L7i(),FJe=function(){},pme=ee.forwardRef(function(t,e){var n=ee.useRef(null),o=ee.useState({onScrollCapture:FJe,onWheelCapture:FJe,onTouchMoveCapture:FJe}),i=o[0],r=o[1],s=t.forwardProps,a=t.children,A=t.className,c=t.removeScrollBar,l=t.enabled,u=t.shards,g=t.sideCar,h=t.noRelative,d=t.noIsolation,p=t.inert,m=t.allowPinchZoom,_=t.as,f=_===void 0?\"div\":_,I=t.gapMode,C=Qcn(t,[\"forwardProps\",\"children\",\"className\",\"removeScrollBar\",\"enabled\",\"shards\",\"sideCar\",\"noRelative\",\"noIsolation\",\"inert\",\"allowPinchZoom\",\"as\",\"gapMode\"]),y=g,x=T7i([n,e]),E=L6(L6({},C),i);return ee.createElement(ee.Fragment,null,l\u0026\u0026ee.createElement(y,{sideCar:Pcn,removeScrollBar:c,shards:u,noRelative:h,noIsolation:d,inert:p,setCallbacks:r,allowPinchZoom:!!m,lockRef:n,gapMode:I}),s?ee.cloneElement(ee.Children.only(a),L6(L6({},E),{ref:x})):ee.createElement(f,L6({},E,{className:A,ref:x}),a))});pme.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pme.classNames={fullWidth:hme,zeroRight:dme};var O7i=function(){if(typeof __webpack_nonce__\u003c\"u\")return __webpack_nonce__};function G7i(){if(!document)return null;var t=document.createElement(\"style\");t.type=\"text/css\";var e=O7i();return e\u0026\u0026t.setAttribute(\"nonce\",e),t}function Y7i(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function U7i(t){var e=document.head||document.getElementsByTagName(\"head\")[0];e.appendChild(t)}var K7i=function(){var t=0,e=null;return{add:function(n){t==0\u0026\u0026(e=G7i())\u0026\u0026(Y7i(e,n),U7i(e)),t++},remove:function(){t--,!t\u0026\u0026e\u0026\u0026(e.parentNode\u0026\u0026e.parentNode.removeChild(e),e=null)}}},V7i=function(){var t=K7i();return function(e,n){ee.useEffect(function(){return t.add(e),function(){t.remove()}},[e\u0026\u0026n])}},Mcn=function(){var t=V7i(),e=function(n){var o=n.styles,i=n.dynamic;return t(o,i),null};return e},z7i={left:0,top:0,right:0,gap:0},LJe=function(t){return parseInt(t||\"\",10)||0},J7i=function(t){var e=window.getComputedStyle(document.body),n=e[t===\"padding\"?\"paddingLeft\":\"marginLeft\"],o=e[t===\"padding\"?\"paddingTop\":\"marginTop\"],i=e[t===\"padding\"?\"paddingRight\":\"marginRight\"];return[LJe(n),LJe(o),LJe(i)]},W7i=function(t){if(t===void 0\u0026\u0026(t=\"margin\"),typeof window\u003e\"u\")return z7i;var e=J7i(t),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-n+e[2]-e[0])}},j7i=Mcn(),rU=\"data-scroll-locked\",$7i=function(t,e,n,o){var i=t.left,r=t.top,s=t.right,a=t.gap;return n===void 0\u0026\u0026(n=\"margin\"),`\n .`.concat(M7i,` {\n overflow: hidden `).concat(o,`;\n padding-right: `).concat(a,\"px \").concat(o,`;\n }\n body[`).concat(rU,`] {\n overflow: hidden `).concat(o,`;\n overscroll-behavior: contain;\n `).concat([e\u0026\u0026\"position: relative \".concat(o,\";\"),n===\"margin\"\u0026\u0026`\n padding-left: `.concat(i,`px;\n padding-top: `).concat(r,`px;\n padding-right: `).concat(s,`px;\n margin-left:0;\n margin-top:0;\n margin-right: `).concat(a,\"px \").concat(o,`;\n `),n===\"padding\"\u0026\u0026\"padding-right: \".concat(a,\"px \").concat(o,\";\")].filter(Boolean).join(\"\"),`\n }\n \n .`).concat(dme,` {\n right: `).concat(a,\"px \").concat(o,`;\n }\n \n .`).concat(hme,` {\n margin-right: `).concat(a,\"px \").concat(o,`;\n }\n \n .`).concat(dme,\" .\").concat(dme,` {\n right: 0 `).concat(o,`;\n }\n \n .`).concat(hme,\" .\").concat(hme,` {\n margin-right: 0 `).concat(o,`;\n }\n \n body[`).concat(rU,`] {\n `).concat(D7i,\": \").concat(a,`px;\n }\n`)},Dcn=function(){var t=parseInt(document.body.getAttribute(rU)||\"0\",10);return isFinite(t)?t:0},q7i=function(){ee.useEffect(function(){return document.body.setAttribute(rU,(Dcn()+1).toString()),function(){var t=Dcn()-1;t\u003c=0?document.body.removeAttribute(rU):document.body.setAttribute(rU,t.toString())}},[])},X7i=function(t){var e=t.noRelative,n=t.noImportant,o=t.gapMode,i=o===void 0?\"margin\":o;q7i();var r=ee.useMemo(function(){return W7i(i)},[i]);return ee.createElement(j7i,{styles:$7i(r,!e,i,n?\"\":\"!important\")})},HJe=!1;if(typeof window\u003c\"u\")try{gZ=Object.defineProperty({},\"passive\",{get:function(){return HJe=!0,!0}}),window.addEventListener(\"test\",gZ,gZ),window.removeEventListener(\"test\",gZ,gZ)}catch{HJe=!1}var gZ,sU=HJe?{passive:!1}:!1,Z7i=function(t){return t.tagName===\"TEXTAREA\"},Ncn=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!==\"hidden\"\u0026\u0026!(n.overflowY===n.overflowX\u0026\u0026!Z7i(t)\u0026\u0026n[e]===\"visible\")},e6i=function(t){return Ncn(t,\"overflowY\")},t6i=function(t){return Ncn(t,\"overflowX\")},Rcn=function(t,e){var n=e.ownerDocument,o=e;do{typeof ShadowRoot\u003c\"u\"\u0026\u0026o instanceof ShadowRoot\u0026\u0026(o=o.host);var i=Tcn(t,o);if(i){var r=kcn(t,o),s=r[1],a=r[2];if(s\u003ea)return!0}o=o.parentNode}while(o\u0026\u0026o!==n.body);return!1},n6i=function(t){var e=t.scrollTop,n=t.scrollHeight,o=t.clientHeight;return[e,n,o]},o6i=function(t){var e=t.scrollLeft,n=t.scrollWidth,o=t.clientWidth;return[e,n,o]},Tcn=function(t,e){return t===\"v\"?e6i(e):t6i(e)},kcn=function(t,e){return t===\"v\"?n6i(e):o6i(e)},i6i=function(t,e){return t===\"h\"\u0026\u0026e===\"rtl\"?-1:1},r6i=function(t,e,n,o,i){var r=i6i(t,window.getComputedStyle(e).direction),s=r*o,a=n.target,A=e.contains(a),c=!1,l=s\u003e0,u=0,g=0;do{if(!a)break;var h=kcn(t,a),d=h[0],p=h[1],m=h[2],_=p-m-r*d;(d||_)\u0026\u0026Tcn(t,a)\u0026\u0026(u+=_,g+=d);var f=a.parentNode;a=f\u0026\u0026f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!A\u0026\u0026a!==document.body||A\u0026\u0026(e.contains(a)||e===a));return(l\u0026\u0026Math.abs(u)\u003c1||!l\u0026\u0026Math.abs(g)\u003c1)\u0026\u0026(c=!0),c},mme=function(t){return\"changedTouches\"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Fcn=function(t){return[t.deltaX,t.deltaY]},Lcn=function(t){return t\u0026\u0026\"current\"in t?t.current:t},s6i=function(t,e){return t[0]===e[0]\u0026\u0026t[1]===e[1]},a6i=function(t){return`\n .block-interactivity-`.concat(t,` {pointer-events: none;}\n .allow-interactivity-`).concat(t,` {pointer-events: all;}\n`)},A6i=0,aU=[];function c6i(t){var e=ee.useRef([]),n=ee.useRef([0,0]),o=ee.useRef(),i=ee.useState(A6i++)[0],r=ee.useState(Mcn)[0],s=ee.useRef(t);ee.useEffect(function(){s.current=t},[t]),ee.useEffect(function(){if(t.inert){document.body.classList.add(\"block-interactivity-\".concat(i));var p=P7i([t.lockRef.current],(t.shards||[]).map(Lcn)).filter(Boolean);return p.forEach(function(m){return m.classList.add(\"allow-interactivity-\".concat(i))}),function(){document.body.classList.remove(\"block-interactivity-\".concat(i)),p.forEach(function(m){return m.classList.remove(\"allow-interactivity-\".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=ee.useCallback(function(p,m){if(\"touches\"in p\u0026\u0026p.touches.length===2||p.type===\"wheel\"\u0026\u0026p.ctrlKey)return!s.current.allowPinchZoom;var _=mme(p),f=n.current,I=\"deltaX\"in p?p.deltaX:f[0]-_[0],C=\"deltaY\"in p?p.deltaY:f[1]-_[1],y,x=p.target,E=Math.abs(I)\u003eMath.abs(C)?\"h\":\"v\";if(\"touches\"in p\u0026\u0026E===\"h\"\u0026\u0026x.type===\"range\")return!1;var B=window.getSelection(),S=B\u0026\u0026B.anchorNode,Q=S?S===x||S.contains(x):!1;if(Q)return!1;var w=Rcn(E,x);if(!w)return!0;if(w?y=E:(y=E===\"v\"?\"h\":\"v\",w=Rcn(E,x)),!w)return!1;if(!o.current\u0026\u0026\"changedTouches\"in p\u0026\u0026(I||C)\u0026\u0026(o.current=y),!y)return!0;var M=o.current||y;return r6i(M,m,p,M===\"h\"?I:C)},[]),A=ee.useCallback(function(p){var m=p;if(!(!aU.length||aU[aU.length-1]!==r)){var _=\"deltaY\"in m?Fcn(m):mme(m),f=e.current.filter(function(y){return y.name===m.type\u0026\u0026(y.target===m.target||m.target===y.shadowParent)\u0026\u0026s6i(y.delta,_)})[0];if(f\u0026\u0026f.should){m.cancelable\u0026\u0026m.preventDefault();return}if(!f){var I=(s.current.shards||[]).map(Lcn).filter(Boolean).filter(function(y){return y.contains(m.target)}),C=I.length\u003e0?a(m,I[0]):!s.current.noIsolation;C\u0026\u0026m.cancelable\u0026\u0026m.preventDefault()}}},[]),c=ee.useCallback(function(p,m,_,f){var I={name:p,delta:m,target:_,should:f,shadowParent:l6i(_)};e.current.push(I),setTimeout(function(){e.current=e.current.filter(function(C){return C!==I})},1)},[]),l=ee.useCallback(function(p){n.current=mme(p),o.current=void 0},[]),u=ee.useCallback(function(p){c(p.type,Fcn(p),p.target,a(p,t.lockRef.current))},[]),g=ee.useCallback(function(p){c(p.type,mme(p),p.target,a(p,t.lockRef.current))},[]);ee.useEffect(function(){return aU.push(r),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:g}),document.addEventListener(\"wheel\",A,sU),document.addEventListener(\"touchmove\",A,sU),document.addEventListener(\"touchstart\",l,sU),function(){aU=aU.filter(function(p){return p!==r}),document.removeEventListener(\"wheel\",A,sU),document.removeEventListener(\"touchmove\",A,sU),document.removeEventListener(\"touchstart\",l,sU)}},[]);var h=t.removeScrollBar,d=t.inert;return ee.createElement(ee.Fragment,null,d?ee.createElement(r,{styles:a6i(i)}):null,h?ee.createElement(X7i,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function l6i(t){for(var e=null;t!==null;)t instanceof ShadowRoot\u0026\u0026(e=t.host,t=t.host),t=t.parentNode;return e}var u6i=H7i(Pcn,c6i),Hcn=ee.forwardRef(function(t,e){return ee.createElement(pme,L6({},t,{ref:e,sideCar:u6i}))});Hcn.classNames=pme.classNames;var g6i=Hcn,d6i=Object.defineProperty,F0=(t,e)=\u003ed6i(t,\"name\",{value:e,configurable:!0}),OJe=[\"Enter\",\" \"],h6i=[\"ArrowDown\",\"PageUp\",\"Home\"],Ocn=[\"ArrowUp\",\"PageDown\",\"End\"],p6i=[...h6i,...Ocn],m6i={ltr:[...OJe,\"ArrowRight\"],rtl:[...OJe,\"ArrowLeft\"]},_6i={ltr:[\"ArrowLeft\"],rtl:[\"ArrowRight\"]},_me=\"Menu\",[dZ,f6i,I6i]=tJe(_me),[BT,Gcn]=fT(_me,[I6i,Acn,xcn]),fme=Acn(),Ycn=xcn(),[Ucn,BP]=BT(_me),[C6i,hZ]=BT(_me),y6i=F0(t=\u003e{const{__scopeMenu:e,open:n=!1,children:o,dir:i,onOpenChange:r,modal:s=!0}=t,a=fme(e),[A,c]=ee.useState(null),l=ee.useRef(!1),u=R6(r),g=rJe(i);return ee.useEffect(()=\u003e{const h=F0(()=\u003e{l.current=!0,document.addEventListener(\"pointerdown\",d,{capture:!0,once:!0}),document.addEventListener(\"pointermove\",d,{capture:!0,once:!0})},\"handleKeyDown\"),d=F0(()=\u003el.current=!1,\"handlePointer\");return document.addEventListener(\"keydown\",h,{capture:!0}),()=\u003e{document.removeEventListener(\"keydown\",h,{capture:!0}),document.removeEventListener(\"pointerdown\",d,{capture:!0}),document.removeEventListener(\"pointermove\",d,{capture:!0})}},[]),ee.useEffect(()=\u003e{if(!n)return;const h=F0(()=\u003eu(!1),\"handleBlur\");return window.addEventListener(\"blur\",h),()=\u003ewindow.removeEventListener(\"blur\",h)},[n,u]),K.jsx(gcn,{...a,children:K.jsx(Ucn,{scope:e,open:n,onOpenChange:u,content:A,onContentChange:c,children:K.jsx(C6i,{scope:e,onClose:ee.useCallback(()=\u003eu(!1),[u]),isUsingKeyboardRef:l,dir:g,modal:s,children:o})})})},\"Menu\"),Kcn=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,...i}=e,r=fme(o);return K.jsx(r7i,{...r,...i,ref:n})},\"MenuAnchor\")),Vcn=\"MenuPortal\",[x6i,zcn]=BT(Vcn,{forceMount:void 0}),E6i=F0(t=\u003e{const{__scopeMenu:e,forceMount:n,children:o,container:i}=t,r=BP(Vcn,e);return K.jsx(x6i,{scope:e,forceMount:n,children:K.jsx(vJe,{present:n||r.open,children:K.jsx(c7i,{asChild:!0,container:i,children:o})})})},\"MenuPortal\"),e9=\"MenuContent\",[B6i,GJe]=BT(e9),b6i=ee.forwardRef(F0(function(e,n){const o=zcn(e9,e.__scopeMenu),{forceMount:i=o.forceMount,...r}=e,s=BP(e9,e.__scopeMenu),a=hZ(e9,e.__scopeMenu);return K.jsx(dZ.Provider,{scope:e.__scopeMenu,children:K.jsx(vJe,{present:i||s.open,children:K.jsx(dZ.Slot,{scope:e.__scopeMenu,children:a.modal?K.jsx(S6i,{...r,ref:n}):K.jsx(Q6i,{...r,ref:n})})})})},\"MenuContent\")),S6i=ee.forwardRef(F0(function(e,n){const o=BP(e9,e.__scopeMenu),i=ee.useRef(null),r=hf(n,i);return ee.useEffect(()=\u003e{const s=i.current;if(s)return w7i(s)},[]),K.jsx(YJe,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:El(e.onFocusOutside,s=\u003es.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=\u003eo.onOpenChange(!1)})},\"MenuRootContentModal\")),Q6i=ee.forwardRef(F0(function(e,n){const o=BP(e9,e.__scopeMenu);return K.jsx(YJe,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=\u003eo.onOpenChange(!1)})},\"MenuRootContentNonModal\")),v6i=IT(\"MenuContent.ScrollLock\"),YJe=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,loop:i=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:A,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,disableOutsideScroll:p,...m}=e,_=BP(e9,o),f=hZ(e9,o),I=fme(o),C=Ycn(o),y=f6i(o),[x,E]=ee.useState(null),B=ee.useRef(null),S=hf(n,B,_.onContentChange),Q=ee.useRef(0),w=ee.useRef(\"\"),M=ee.useRef(0),k=ee.useRef(null),R=ee.useRef(\"right\"),F=ee.useRef(0),O=p?g6i:ee.Fragment,U=p?{as:v6i,allowPinchZoom:!0}:void 0,Y=F0(te=\u003e{const j=w.current+te,J=y().filter(_e=\u003e!_e.disabled),oe=document.activeElement,ie=J.find(_e=\u003e_e.ref.current===oe)?.textValue,ne=J.map(_e=\u003e_e.textValue),le=tln(ne,j,ie),ge=J.find(_e=\u003e_e.textValue===le)?.ref.current;F0((function _e(ue){w.current=ue,window.clearTimeout(Q.current),ue!==\"\"\u0026\u0026(Q.current=window.setTimeout(()=\u003e_e(\"\"),1e3))}),\"updateSearch\")(j),ge\u0026\u0026setTimeout(()=\u003ege.focus())},\"handleTypeaheadSearch\");ee.useEffect(()=\u003e()=\u003ewindow.clearTimeout(Q.current),[]),lJe();const W=ee.useCallback(te=\u003eR.current===k.current?.side\u0026\u0026oln(te,k.current?.area),[]);return K.jsx(B6i,{scope:o,searchRef:w,onItemEnter:ee.useCallback(te=\u003e{W(te)\u0026\u0026te.preventDefault()},[W]),onItemLeave:ee.useCallback(te=\u003e{W(te)||(B.current?.focus(),E(null))},[W]),onTriggerLeave:ee.useCallback(te=\u003e{W(te)\u0026\u0026te.preventDefault()},[W]),pointerGraceTimerRef:M,onPointerGraceIntentChange:ee.useCallback(te=\u003e{k.current=te},[]),children:K.jsx(O,{...U,children:K.jsx(HBi,{asChild:!0,trapped:r,onMountAutoFocus:El(s,te=\u003e{te.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:K.jsx(NBi,{asChild:!0,disableOutsidePointerEvents:A,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,children:K.jsx(B7i,{asChild:!0,...C,dir:f.dir,orientation:\"vertical\",loop:i,currentTabStopId:x,onCurrentTabStopIdChange:E,onEntryFocus:El(c,te=\u003e{f.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:K.jsx(s7i,{role:\"menu\",\"aria-orientation\":\"vertical\",\"data-state\":KJe(_.open),\"data-radix-menu-content\":\"\",dir:f.dir,...I,...m,ref:S,style:{outline:\"none\",...m.style},onKeyDown:El(m.onKeyDown,te=\u003e{const J=te.target.closest(\"[data-radix-menu-content]\")===te.currentTarget,oe=te.ctrlKey||te.altKey||te.metaKey,ie=te.key.length===1;J\u0026\u0026(te.key===\"Tab\"\u0026\u0026te.preventDefault(),!oe\u0026\u0026ie\u0026\u0026Y(te.key));const ne=B.current;if(te.target!==ne||!p6i.includes(te.key))return;te.preventDefault();const ge=y().filter(_e=\u003e!_e.disabled).map(_e=\u003e_e.ref.current);Ocn.includes(te.key)\u0026\u0026ge.reverse(),Zcn(ge)}),onBlur:El(e.onBlur,te=\u003e{te.currentTarget.contains(te.target)||(window.clearTimeout(Q.current),w.current=\"\")}),onPointerMove:El(e.onPointerMove,AU(te=\u003e{const j=te.target,J=F.current!==te.clientX;if(te.currentTarget.contains(j)\u0026\u0026J){const oe=te.clientX\u003eF.current?\"right\":\"left\";R.current=oe,F.current=te.clientX}}))})})})})})})},\"MenuContentImpl\")),UJe=\"MenuItem\",Jcn=\"menu.itemSelect\",Wcn=ee.forwardRef(F0(function(e,n){const{disabled:o=!1,onSelect:i,...r}=e,s=ee.useRef(null),a=hZ(UJe,e.__scopeMenu),A=GJe(UJe,e.__scopeMenu),c=hf(n,s),l=ee.useRef(!1),u=F0(()=\u003e{const g=s.current;if(!o\u0026\u0026g){const h=new CustomEvent(Jcn,{bubbles:!0,cancelable:!0});g.addEventListener(Jcn,d=\u003ei?.(d),{once:!0}),eJe(g,h),h.defaultPrevented?l.current=!1:a.onClose()}},\"handleSelect\");return K.jsx(jcn,{...r,ref:c,disabled:o,onClick:El(e.onClick,u),onPointerDown:g=\u003e{e.onPointerDown?.(g),l.current=!0},onPointerUp:El(e.onPointerUp,g=\u003e{l.current||g.currentTarget?.click()}),onKeyDown:El(e.onKeyDown,g=\u003e{o||g.target!==g.currentTarget||A.searchRef.current!==\"\"\u0026\u0026g.key===\" \"||OJe.includes(g.key)\u0026\u0026(g.currentTarget.click(),g.preventDefault())})})},\"MenuItem\")),jcn=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,disabled:i=!1,textValue:r,...s}=e,a=GJe(UJe,o),A=Ycn(o),c=ee.useRef(null),l=hf(n,c),[u,g]=ee.useState(!1),[h,d]=ee.useState(\"\");return ee.useEffect(()=\u003e{const p=c.current;p\u0026\u0026d((p.textContent??\"\").trim())},[s.children]),K.jsx(dZ.ItemSlot,{scope:o,disabled:i,textValue:r??h,children:K.jsx(b7i,{asChild:!0,...A,focusable:!i,children:K.jsx(N6.div,{role:\"menuitem\",\"data-highlighted\":u?\"\":void 0,\"aria-disabled\":i||void 0,\"data-disabled\":i?\"\":void 0,...s,ref:l,onPointerMove:El(e.onPointerMove,AU(p=\u003e{i?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:El(e.onPointerLeave,AU(p=\u003ea.onItemLeave(p))),onFocus:El(e.onFocus,()=\u003eg(!0)),onBlur:El(e.onBlur,()=\u003eg(!1))})})})},\"MenuItemImpl\")),w6i=ee.forwardRef(F0(function(e,n){const{checked:o=!1,onCheckedChange:i,...r}=e;return K.jsx(D6i,{scope:e.__scopeMenu,checked:o,children:K.jsx(Wcn,{role:\"menuitemcheckbox\",\"aria-checked\":Cme(o)?\"mixed\":o,...r,ref:n,\"data-state\":Xcn(o),onSelect:El(r.onSelect,()=\u003ei?.(Cme(o)?!0:!o),{checkForDefaultPrevented:!1})})})},\"MenuCheckboxItem\")),P6i=\"MenuRadioGroup\",[Rpr,Tpr]=BT(P6i,{value:void 0,onValueChange:F0(()=\u003e{},\"onValueChange\")}),M6i=\"MenuItemIndicator\",[D6i,kpr]=BT(M6i,{checked:!1}),N6i=ee.forwardRef(F0(function(e,n){const{__scopeMenu:o,...i}=e;return K.jsx(N6.div,{role:\"separator\",\"aria-orientation\":\"horizontal\",...i,ref:n})},\"MenuSeparator\")),$cn=\"MenuSub\",[R6i,qcn]=BT($cn),T6i=F0(t=\u003e{const{__scopeMenu:e,children:n,open:o=!1,onOpenChange:i}=t,r=BP($cn,e),s=fme(e),[a,A]=ee.useState(null),[c,l]=ee.useState(null),u=R6(i);return ee.useEffect(()=\u003e(r.open===!1\u0026\u0026u(!1),()=\u003eu(!1)),[r.open,u]),K.jsx(gcn,{...s,children:K.jsx(Ucn,{scope:e,open:o,onOpenChange:u,content:c,onContentChange:l,children:K.jsx(R6i,{scope:e,contentId:ZY(),triggerId:ZY(),trigger:a,onTriggerChange:A,children:n})})})},\"MenuSub\"),Ime=\"MenuSubTrigger\",k6i=ee.forwardRef(F0(function(e,n){const o=BP(Ime,e.__scopeMenu),i=hZ(Ime,e.__scopeMenu),r=qcn(Ime,e.__scopeMenu),s=GJe(Ime,e.__scopeMenu),a=ee.useRef(null),{pointerGraceTimerRef:A,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},u=ee.useCallback(()=\u003e{a.current\u0026\u0026window.clearTimeout(a.current),a.current=null},[]);ee.useEffect(()=\u003eu,[u]),ee.useEffect(()=\u003e{const h=A.current;return()=\u003e{window.clearTimeout(h),c(null)}},[A,c]);const g=hf(n,r.onTriggerChange);return K.jsx(Kcn,{asChild:!0,...l,children:K.jsx(jcn,{id:r.triggerId,\"aria-haspopup\":\"menu\",\"aria-expanded\":o.open,\"aria-controls\":o.open?r.contentId:void 0,\"data-state\":KJe(o.open),...e,ref:g,onClick:h=\u003e{e.onClick?.(h),!(e.disabled||h.defaultPrevented)\u0026\u0026(h.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:El(e.onPointerMove,AU(h=\u003e{s.onItemEnter(h),!h.defaultPrevented\u0026\u0026!e.disabled\u0026\u0026!o.open\u0026\u0026!a.current\u0026\u0026(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=\u003e{o.onOpenChange(!0),u()},100))})),onPointerLeave:El(e.onPointerLeave,AU(h=\u003e{u();const d=o.content?.getBoundingClientRect();if(d){const p=o.content?.dataset.side,m=p===\"right\",_=m?-5:5,f=d[m?\"left\":\"right\"],I=d[m?\"right\":\"left\"];s.onPointerGraceIntentChange({area:[{x:h.clientX+_,y:h.clientY},{x:f,y:d.top},{x:I,y:d.top},{x:I,y:d.bottom},{x:f,y:d.bottom}],side:p}),window.clearTimeout(A.current),A.current=window.setTimeout(()=\u003es.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:El(e.onKeyDown,h=\u003e{e.disabled||h.target!==h.currentTarget||s.searchRef.current!==\"\"\u0026\u0026h.key===\" \"||m6i[i.dir].includes(h.key)\u0026\u0026(o.onOpenChange(!0),o.content?.focus(),h.preventDefault())})})})},\"MenuSubTrigger\")),F6i=\"MenuSubContent\",L6i=ee.forwardRef(F0(function(e,n){const o=zcn(e9,e.__scopeMenu),{forceMount:i=o.forceMount,align:r=\"start\",...s}=e,a=BP(e9,e.__scopeMenu),A=hZ(e9,e.__scopeMenu),c=qcn(F6i,e.__scopeMenu),l=ee.useRef(null),u=hf(n,l);return K.jsx(dZ.Provider,{scope:e.__scopeMenu,children:K.jsx(vJe,{present:i||a.open,children:K.jsx(dZ.Slot,{scope:e.__scopeMenu,children:K.jsx(YJe,{id:c.contentId,\"aria-labelledby\":c.triggerId,...s,ref:u,align:r,side:A.dir===\"rtl\"?\"left\":\"right\",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=\u003e{A.isUsingKeyboardRef.current\u0026\u0026l.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=\u003eg.preventDefault(),onFocusOutside:El(e.onFocusOutside,g=\u003e{g.target!==c.trigger\u0026\u0026a.onOpenChange(!1)}),onEscapeKeyDown:El(e.onEscapeKeyDown,g=\u003e{A.onClose(),g.preventDefault()}),onKeyDown:El(e.onKeyDown,g=\u003e{const h=g.currentTarget.contains(g.target),d=_6i[A.dir].includes(g.key);h\u0026\u0026d\u0026\u0026(a.onOpenChange(!1),c.trigger?.focus(),g.preventDefault())})})})})})},\"MenuSubContent\"));function KJe(t){return t?\"open\":\"closed\"}F0(KJe,\"getOpenState\");function Cme(t){return t===\"indeterminate\"}F0(Cme,\"isIndeterminate\");function Xcn(t){return Cme(t)?\"indeterminate\":t?\"checked\":\"unchecked\"}F0(Xcn,\"getCheckedState\");function Zcn(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}F0(Zcn,\"focusFirst\");function eln(t,e){return t.map((n,o)=\u003et[(e+o)%t.length])}F0(eln,\"wrapArray\");function tln(t,e,n){const i=e.length\u003e1\u0026\u0026Array.from(e).every(c=\u003ec===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let s=eln(t,Math.max(r,0));i.length===1\u0026\u0026(s=s.filter(c=\u003ec!==n));const A=s.find(c=\u003ec.toLowerCase().startsWith(i.toLowerCase()));return A!==n?A:void 0}F0(tln,\"getNextMatch\");function nln(t,e){const{x:n,y:o}=t;let i=!1;for(let r=0,s=e.length-1;r\u003ce.length;s=r++){const a=e[r],A=e[s],c=a.x,l=a.y,u=A.x,g=A.y;l\u003eo!=g\u003eo\u0026\u0026n\u003c(u-c)*(o-l)/(g-l)+c\u0026\u0026(i=!i)}return i}F0(nln,\"isPointInPolygon\");function oln(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return nln(n,e)}F0(oln,\"isPointerInGraceArea\");function AU(t){return e=\u003ee.pointerType===\"mouse\"?t(e):void 0}F0(AU,\"whenMouse\");var H6i=y6i,O6i=Kcn,G6i=E6i,Y6i=b6i,U6i=Wcn,K6i=w6i,V6i=N6i,z6i=T6i,J6i=k6i,W6i=L6i,j6i=Object.defineProperty,H6=(t,e)=\u003ej6i(t,\"name\",{value:e,configurable:!0}),VJe=\"DropdownMenu\",[$6i,Fpr]=fT(VJe,[Gcn]),O6=Gcn(),[q6i,iln]=$6i(VJe),X6i=H6(t=\u003e{const{__scopeDropdownMenu:e,children:n,dir:o,open:i,defaultOpen:r,onOpenChange:s,modal:a=!0}=t,A=O6(e),c=ee.useRef(null),[l,u]=Wpe({prop:i,defaultProp:r??!1,onChange:s,caller:VJe});return K.jsx(q6i,{scope:e,triggerId:ZY(),triggerRef:c,contentId:ZY(),open:l,onOpenChange:u,onOpenToggle:ee.useCallback(()=\u003eu(g=\u003e!g),[u]),modal:a,children:K.jsx(H6i,{...A,open:l,onOpenChange:u,dir:o,modal:a,children:n})})},\"DropdownMenu\"),Z6i=\"DropdownMenuTrigger\",e8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,disabled:i=!1,...r}=e,s=iln(Z6i,o),a=O6(o),A=hf(n,s.triggerRef);return K.jsx(O6i,{asChild:!0,...a,children:K.jsx(N6.button,{type:\"button\",id:s.triggerId,\"aria-haspopup\":\"menu\",\"aria-expanded\":s.open,\"aria-controls\":s.open?s.contentId:void 0,\"data-state\":s.open?\"open\":\"closed\",\"data-disabled\":i?\"\":void 0,disabled:i,...r,ref:A,onPointerDown:El(e.onPointerDown,c=\u003e{!i\u0026\u0026c.button===0\u0026\u0026c.ctrlKey===!1\u0026\u0026(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:El(e.onKeyDown,c=\u003e{i||([\"Enter\",\" \"].includes(c.key)\u0026\u0026s.onOpenToggle(),c.key===\"ArrowDown\"\u0026\u0026s.onOpenChange(!0),[\"Enter\",\" \",\"ArrowDown\"].includes(c.key)\u0026\u0026c.preventDefault())})})})},\"DropdownMenuTrigger\")),t8i=H6(t=\u003e{const{__scopeDropdownMenu:e,...n}=t,o=O6(e);return K.jsx(G6i,{...o,...n})},\"DropdownMenuPortal\"),n8i=\"DropdownMenuContent\",o8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=iln(n8i,o),s=O6(o),a=ee.useRef(!1);return K.jsx(Y6i,{id:r.contentId,\"aria-labelledby\":r.triggerId,...s,...i,ref:n,onCloseAutoFocus:El(e.onCloseAutoFocus,A=\u003e{a.current||r.triggerRef.current?.focus(),a.current=!1,A.preventDefault()}),onInteractOutside:El(e.onInteractOutside,A=\u003e{const c=A.detail.originalEvent,l=c.button===0\u0026\u0026c.ctrlKey===!0,u=c.button===2||l;(!r.modal||u)\u0026\u0026(a.current=!0)}),style:{...e.style,\"--radix-dropdown-menu-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-dropdown-menu-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-dropdown-menu-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-dropdown-menu-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-dropdown-menu-trigger-height\":\"var(--radix-popper-anchor-height)\"}})},\"DropdownMenuContent\")),i8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(U6i,{...r,...i,ref:n})},\"DropdownMenuItem\")),r8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(K6i,{...r,...i,ref:n})},\"DropdownMenuCheckboxItem\")),s8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(V6i,{...r,...i,ref:n})},\"DropdownMenuSeparator\")),a8i=H6(t=\u003e{const{__scopeDropdownMenu:e,children:n,open:o,onOpenChange:i,defaultOpen:r}=t,s=O6(e),[a,A]=Wpe({prop:o,defaultProp:r??!1,onChange:i,caller:\"DropdownMenuSub\"});return K.jsx(z6i,{...s,open:a,onOpenChange:A,children:n})},\"DropdownMenuSub\"),A8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(J6i,{...r,...i,ref:n})},\"DropdownMenuSubTrigger\")),c8i=ee.forwardRef(H6(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=O6(o);return K.jsx(W6i,{...r,...i,ref:n,style:{...e.style,\"--radix-dropdown-menu-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-dropdown-menu-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-dropdown-menu-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-dropdown-menu-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-dropdown-menu-trigger-height\":\"var(--radix-popper-anchor-height)\"}})},\"DropdownMenuSubContent\")),l8i=X6i,u8i=e8i,yme=t8i,g8i=o8i,Sd=i8i,d8i=r8i,IS=s8i,zJe=a8i,JJe=A8i,h8i=c8i,WJe=t=\u003e{const[e,n]=ee.useState(null),[o,i]=ee.useState();return ee.useLayoutEffect(()=\u003e{if(!e)return;const r=document.getElementById(e.getAttribute(\"aria-labelledby\")??\"\");if(!r)return;let s=0;const a=()=\u003e{if(s=Math.max(s,e.offsetWidth),!s)return;const c=r.getBoundingClientRect(),l=Math.max(c.left-10,document.documentElement.clientWidth-c.right-10);i(l\u003cs?c.width:void 0)},A=new ResizeObserver(a);return A.observe(e),A.observe(r),a(),window.addEventListener(\"resize\",a),()=\u003e{A.disconnect(),window.removeEventListener(\"resize\",a)}},[e]),K.jsx(h8i,{...t,ref:n,sideOffset:o===void 0?t.sideOffset:-o,style:{...t.style,...o===void 0?{}:{minWidth:Math.min(160,o),maxWidth:o}}})},rln={boxSizing:\"border-box\",minWidth:\"min(160px, calc(100vw - 20px))\",maxWidth:\"calc(100vw - 20px)\",maxHeight:\"var(--radix-dropdown-menu-content-available-height, calc(100dvh - 20px))\",overflowY:\"auto\",overflowX:\"hidden\",overscrollBehavior:\"contain\",overflowWrap:\"anywhere\"},d1=()=\u003eK.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:K.jsx(\"path\",{d:\"M20 6 9 17l-5-5\"})}),jJe=({isOpen:t})=\u003eK.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{transition:\"transform 0.2s ease\",transform:t?\"rotate(90deg)\":\"rotate(0deg)\",opacity:.6},children:K.jsx(\"path\",{d:\"m9 18 6-6-6-6\"})}),p8i=()=\u003eK.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:K.jsx(\"path\",{d:\"M5 12h14\"})}),sln=()=\u003eK.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",className:\"lucide lucide-dot-icon lucide-dot\",children:K.jsx(\"circle\",{cx:\"12.1\",cy:\"12.1\",r:\"4.5\",fill:\"white\"})}),c2={padding:\"6px 8px\",borderRadius:6,cursor:\"default\",outline:\"none\",userSelect:\"none\",display:\"flex\",alignItems:\"center\",gap:8,color:\"#fafafa\",fontWeight:400,fontSize:14,transition:\"background-color 0.15s ease, color 0.15s ease\",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif'},m8i={paddingLeft:32,paddingTop:6,paddingBottom:6,paddingRight:8},$Je={height:1,backgroundColor:\"#ffffff1a\",margin:\"4px 0\"},_8i={...rln,backgroundColor:\"#262626\",color:\"#fafafa\",borderRadius:8,boxShadow:\"0px 12px 48px -12px rgba(0, 0, 0, 0.5), 0px 8px 24px -8px rgba(0, 0, 0, 0.3)\",border:\"1px solid #333333\",padding:\"4px\",zIndex:kX.appearanceMenu,fontSize:14,fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif'},Wx={width:16,height:16,display:\"flex\",alignItems:\"flex-end\",justifyContent:\"center\",flexShrink:0},f8i=()=\u003e{const{visibility:t,setLayerVisibility:e}=AT(),{darkBackgroundEnabled:n,setDarkBackgroundEnabled:o,lightingEnabled:i,setLightingEnabled:r}=wze(),[s,a]=ee.useState(!1),[A,c]=ee.useState(null);return K.jsxs(K.Fragment,{children:[K.jsx(IS,{style:$Je}),K.jsxs(zJe,{onOpenChange:a,children:[K.jsxs(JJe,{style:{...c2,...m8i,backgroundColor:s||A===\"appearance\"?\"#404040\":\"transparent\"},onMouseEnter:()=\u003ec(\"appearance\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"appearance\"),children:[K.jsx(\"span\",{style:{flex:1,display:\"flex\",alignItems:\"center\"},children:\"Appearance\"}),K.jsx(\"div\",{style:{marginLeft:\"auto\",display:\"flex\",alignItems:\"flex-end\",marginBottom:\"-5px\"},children:K.jsx(jJe,{isOpen:s})})]}),K.jsx(yme,{children:K.jsxs(WJe,{style:{..._8i,marginLeft:-2},collisionPadding:10,avoidCollisions:!0,children:[K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"darkBackground\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),o(!n)},onMouseEnter:()=\u003ec(\"darkBackground\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"darkBackground\"),children:[K.jsx(\"span\",{style:Wx,children:n\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Dark Background\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"lighting\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),r(!i)},onMouseEnter:()=\u003ec(\"lighting\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"lighting\"),children:[K.jsx(\"span\",{style:Wx,children:i\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Lighting\"})]}),K.jsx(IS,{style:$Je}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"boardBody\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"boardBody\",!t.boardBody)},onMouseEnter:()=\u003ec(\"boardBody\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"boardBody\"),children:[K.jsx(\"span\",{style:Wx,children:t.boardBody\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Board Body\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"topCopper\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"topCopper\",!t.topCopper)},onMouseEnter:()=\u003ec(\"topCopper\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"topCopper\"),children:[K.jsx(\"span\",{style:Wx,children:t.topCopper\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Top Copper\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"bottomCopper\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"bottomCopper\",!t.bottomCopper)},onMouseEnter:()=\u003ec(\"bottomCopper\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"bottomCopper\"),children:[K.jsx(\"span\",{style:Wx,children:t.bottomCopper\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Bottom Copper\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"keepout\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"keepout\",!t.keepout)},onMouseEnter:()=\u003ec(\"keepout\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"keepout\"),children:[K.jsx(\"span\",{style:Wx,children:t.keepout\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Keepout\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"topSilkscreen\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"topSilkscreen\",!t.topSilkscreen)},onMouseEnter:()=\u003ec(\"topSilkscreen\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"topSilkscreen\"),children:[K.jsx(\"span\",{style:Wx,children:t.topSilkscreen\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Top Silkscreen\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"bottomSilkscreen\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"bottomSilkscreen\",!t.bottomSilkscreen)},onMouseEnter:()=\u003ec(\"bottomSilkscreen\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"bottomSilkscreen\"),children:[K.jsx(\"span\",{style:Wx,children:t.bottomSilkscreen\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Bottom Silkscreen\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"topMask\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"topMask\",!t.topMask)},onMouseEnter:()=\u003ec(\"topMask\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"topMask\"),children:[K.jsx(\"span\",{style:Wx,children:t.topMask\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Top Soldermask\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"bottomMask\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"bottomMask\",!t.bottomMask)},onMouseEnter:()=\u003ec(\"bottomMask\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"bottomMask\"),children:[K.jsx(\"span\",{style:Wx,children:t.bottomMask\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Bottom Soldermask\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"pcbNotes\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"pcbNotes\",!t.pcbNotes)},onMouseEnter:()=\u003ec(\"pcbNotes\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"pcbNotes\"),children:[K.jsx(\"span\",{style:Wx,children:t.pcbNotes\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"PCB Notes\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"smtModels\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"smtModels\",!t.smtModels)},onMouseEnter:()=\u003ec(\"smtModels\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"smtModels\"),children:[K.jsx(\"span\",{style:Wx,children:t.smtModels\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Surface Mount Components\"})]}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"throughHoleModels\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"throughHoleModels\",!t.throughHoleModels)},onMouseEnter:()=\u003ec(\"throughHoleModels\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"throughHoleModels\"),children:[K.jsx(\"span\",{style:Wx,children:t.throughHoleModels\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Through-Hole Components\"})]}),K.jsx(IS,{style:$Je}),K.jsxs(Sd,{style:{...c2,backgroundColor:A===\"enclosure\"?\"#404040\":\"transparent\"},onSelect:l=\u003el.preventDefault(),onPointerDown:l=\u003e{l.preventDefault(),e(\"enclosure\",_mi(t.enclosure))},onMouseEnter:()=\u003ec(\"enclosure\"),onMouseLeave:()=\u003ec(null),onTouchStart:()=\u003ec(\"enclosure\"),title:`Enclosure: ${t.enclosure}`,children:[K.jsxs(\"span\",{style:Wx,children:[t.enclosure===\"opaque\"\u0026\u0026K.jsx(d1,{}),t.enclosure===\"translucent\"\u0026\u0026K.jsx(p8i,{})]}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Enclosure\"})]})]})})]})]})},I8i=[\"Custom\",\"Top Center Angled\",\"Top Down\",\"Top Left Corner\",\"Top Right Corner\",\"Left Sideview\",\"Right Sideview\",\"Front\"],qJe={...rln,backgroundColor:\"#262626\",color:\"#fafafa\",borderRadius:6,boxShadow:\"0px 12px 48px -12px rgba(0, 0, 0, 0.5), 0px 8px 24px -8px rgba(0, 0, 0, 0.3)\",border:\"1px solid #333333\",padding:\"4px\",zIndex:kX.contextMenu,fontSize:14,fontWeight:400,fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif'},jx={padding:\"6px 8px\",borderRadius:6,cursor:\"default\",outline:\"none\",userSelect:\"none\",display:\"flex\",alignItems:\"center\",gap:8,color:\"#fafafa\",fontWeight:400,fontSize:14,transition:\"background-color 0.15s ease, color 0.15s ease\",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif'},bP={paddingLeft:32,paddingTop:6,paddingBottom:6,paddingRight:8},cU={width:16,height:16,display:\"flex\",alignItems:\"flex-end\",justifyContent:\"center\",flexShrink:0},lU={height:1,backgroundColor:\"#ffffff1a\",margin:\"4px 0\"},aln={fontSize:11,opacity:.65,fontWeight:500,color:\"#b5b5bcff\",backgroundColor:\"rgba(161, 161, 170, 0.1)\",padding:\"2px 6px\",borderRadius:4,border:\"1px solid rgba(161, 161, 170, 0.2)\",letterSpacing:\"0.3px\"},C8i=({menuRef:t,menuPos:e,engine:n,cameraPreset:o,autoRotate:i,foldPcbs:r=!1,onFoldPcbsToggle:s,flexScene:a=!1,referenceObject:A=null,onEngineSwitch:c,onCameraPresetSelect:l,onAutoRotateToggle:u,onReferenceObjectSelect:g=()=\u003e{},onViewSchematicComponent:h,componentName:d,onHideComponent:p,onUnhideAllComponents:m,onDownloadGltf:_,onOpenKeyboardShortcuts:f})=\u003e{const{cameraType:I,setCameraType:C}=gS(),{gridEnabled:y,setGridEnabled:x}=wze(),[E,B]=ee.useState(!1),[S,Q]=ee.useState(!1),[w,M]=ee.useState(null);return K.jsx(\"div\",{ref:t,style:{position:\"fixed\",left:e.x,top:e.y,width:0,height:0},children:K.jsxs(l8i,{open:!0,modal:!1,children:[K.jsx(u8i,{asChild:!0,children:K.jsx(\"div\",{style:{position:\"absolute\",width:1,height:1}})}),K.jsx(yme,{children:K.jsxs(g8i,{style:qJe,collisionPadding:10,avoidCollisions:!0,sideOffset:0,align:\"start\",children:[h\u0026\u0026K.jsx(K.Fragment,{children:K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w===\"schematic\"?\"#404040\":\"transparent\"},onSelect:h,onMouseEnter:()=\u003eM(\"schematic\"),onMouseLeave:()=\u003eM(null),children:\"Show on schematic\"})}),p\u0026\u0026K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w===\"hide\"?\"#404040\":\"transparent\"},onSelect:p,onMouseEnter:()=\u003eM(\"hide\"),onMouseLeave:()=\u003eM(null),children:`Hide \"${d}\"`}),m\u0026\u0026K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w===\"unhide\"?\"#404040\":\"transparent\"},onSelect:m,onMouseEnter:()=\u003eM(\"unhide\"),onMouseLeave:()=\u003eM(null),children:\"Unhide All Components\"}),(h||p||m)\u0026\u0026K.jsx(IS,{style:lU}),K.jsxs(zJe,{onOpenChange:B,children:[K.jsxs(JJe,{style:{...jx,...bP,backgroundColor:E||w===\"camera\"?\"#404040\":\"transparent\"},onMouseEnter:()=\u003eM(\"camera\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"camera\"),children:[K.jsx(\"span\",{style:{flex:1,display:\"flex\",alignItems:\"center\"},children:\"Camera\"}),K.jsxs(\"div\",{style:{display:\"flex\",alignItems:\"flex-end\",gap:6,marginLeft:\"auto\"},children:[K.jsx(\"span\",{style:{opacity:.55,fontSize:13},children:o}),K.jsx(jJe,{isOpen:E})]})]}),K.jsx(yme,{children:K.jsxs(WJe,{style:{...qJe,marginLeft:-2},collisionPadding:10,avoidCollisions:!0,children:[I8i.map(k=\u003eK.jsxs(Sd,{style:{...jx,backgroundColor:w===k?\"#404040\":\"transparent\"},onSelect:()=\u003el(k),onMouseEnter:()=\u003eM(k),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(k),children:[K.jsx(\"span\",{style:cU,children:o===k\u0026\u0026K.jsx(sln,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:k})]},k)),K.jsx(IS,{style:lU}),K.jsxs(Sd,{style:{...jx,backgroundColor:w===\"autorotate\"?\"#404040\":\"transparent\"},onSelect:u,onMouseEnter:()=\u003eM(\"autorotate\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"autorotate\"),children:[K.jsx(\"span\",{style:cU,children:i\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Auto rotate\"})]}),K.jsxs(Sd,{style:{...jx,backgroundColor:w===\"cameratype\"?\"#404040\":\"transparent\"},onSelect:k=\u003e{k.preventDefault(),C(I===\"perspective\"?\"orthographic\":\"perspective\")},onMouseEnter:()=\u003eM(\"cameratype\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"cameratype\"),children:[K.jsx(\"span\",{style:cU,children:I===\"orthographic\"\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Orthographic Camera\"})]})]})})]}),K.jsxs(zJe,{onOpenChange:Q,children:[K.jsxs(JJe,{style:{...jx,...bP,backgroundColor:S||w===\"reference-object\"?\"#404040\":\"transparent\"},onMouseEnter:()=\u003eM(\"reference-object\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"reference-object\"),children:[K.jsx(\"span\",{style:{flex:1,display:\"flex\",alignItems:\"center\"},children:\"Show Reference Object\"}),K.jsx(\"div\",{style:{display:\"flex\",alignItems:\"flex-end\",gap:6,marginLeft:\"auto\"},children:K.jsx(jJe,{isOpen:S})})]}),K.jsx(yme,{children:K.jsx(WJe,{style:{...qJe,marginLeft:-2},collisionPadding:10,avoidCollisions:!0,children:gEi.map(k=\u003e{const R=k.type??\"none\";return K.jsxs(Sd,{style:{...jx,backgroundColor:w===R?\"#404040\":\"transparent\"},onSelect:F=\u003eF.preventDefault(),onPointerDown:F=\u003e{F.preventDefault(),g(k.type)},onMouseEnter:()=\u003eM(R),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(R),children:[K.jsx(\"span\",{style:cU,children:A===k.type\u0026\u0026K.jsx(sln,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:k.label})]},R)})})})]}),s\u0026\u0026K.jsxs(d8i,{checked:r,onCheckedChange:s,style:{...jx,backgroundColor:w===\"fold\"?\"#404040\":\"transparent\"},onMouseEnter:()=\u003eM(\"fold\"),onMouseLeave:()=\u003eM(null),children:[K.jsx(\"span\",{style:cU,children:r\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{children:\"Fold PCBs\"})]}),K.jsxs(Sd,{style:{...jx,backgroundColor:w===\"grid\"?\"#404040\":\"transparent\"},onSelect:k=\u003ek.preventDefault(),onPointerDown:k=\u003e{k.preventDefault(),x(!y)},onMouseEnter:()=\u003eM(\"grid\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"grid\"),children:[K.jsx(\"span\",{style:cU,children:y\u0026\u0026K.jsx(d1,{})}),K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Show Grid\"})]}),K.jsx(f8i,{}),K.jsx(IS,{style:lU}),K.jsx(Sd,{style:{...jx,...bP,backgroundColor:w===\"download\"?\"#404040\":\"transparent\"},onSelect:_,onMouseEnter:()=\u003eM(\"download\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"download\"),children:K.jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\"},children:\"Download GLTF\"})}),K.jsx(IS,{style:lU}),!a\u0026\u0026K.jsxs(Sd,{style:{...jx,...bP,backgroundColor:w===\"engine\"?\"#404040\":\"transparent\"},onSelect:k=\u003ek.preventDefault(),onPointerDown:k=\u003e{k.preventDefault(),c(n===\"jscad\"?\"manifold\":\"jscad\")},onMouseEnter:()=\u003eM(\"engine\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"engine\"),children:[K.jsxs(\"span\",{style:{flex:1,display:\"flex\",alignItems:\"center\"},children:[\"Switch to \",n===\"jscad\"?\"Manifold\":\"JSCAD\",\" Engine\"]}),K.jsx(\"div\",{style:{...aln,display:\"flex\",alignItems:\"center\"},children:n===\"jscad\"?\"experimental\":\"default\"})]}),K.jsx(IS,{style:lU}),K.jsxs(Sd,{style:{...jx,...bP,backgroundColor:w===\"shortcuts\"?\"#404040\":\"transparent\"},onSelect:f,onMouseEnter:()=\u003eM(\"shortcuts\"),onMouseLeave:()=\u003eM(null),onTouchStart:()=\u003eM(\"shortcuts\"),children:[K.jsx(\"span\",{style:{flex:1,display:\"flex\",alignItems:\"center\"},children:\"Keyboard Shortcuts\"}),K.jsx(\"div\",{style:{...aln,display:\"flex\",alignItems:\"center\"},children:\"Shift+?\"})]}),K.jsx(IS,{style:lU}),K.jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",marginTop:0,paddingLeft:32,paddingTop:4,paddingBottom:4},children:K.jsxs(\"span\",{style:{fontSize:11,opacity:.35,fontWeight:400,color:\"#a1a1aa\",letterSpacing:\"0.2px\"},children:[\"@tscircuit/3d-viewer@\",man.version]})})]})})]})})},uU=new Map,XJe=new Set,Aln=!1,ZJe=0,eWe=0,xme=null,cln=!1,y8i=20,x8i=t=\u003e{const e=t.toLowerCase().split(\"+\"),n=e[e.length-1],o=e.slice(0,-1);return{key:n,ctrl:o.includes(\"ctrl\"),cmd:o.includes(\"cmd\"),shift:o.includes(\"shift\"),alt:o.includes(\"alt\")}},E8i=(t,e)=\u003e{const n=x8i(e),o=t.key.toLowerCase()===n.key,i=n.ctrl===t.ctrlKey,r=n.cmd===t.metaKey,s=n.shift===t.shiftKey,a=n.alt===t.altKey;return o\u0026\u0026i\u0026\u0026r\u0026\u0026s\u0026\u0026a},B8i=t=\u003e{if(!t||typeof t!=\"object\")return!1;const e=t,n=e.tagName,o=[\"INPUT\",\"TEXTAREA\",\"SELECT\"];if(o.includes(n))return!0;const i=e.getAttribute?.(\"contenteditable\");if(i===\"true\"||i===\"\")return!0;let r=e.parentElement;for(let s=0;s\u003cy8i\u0026\u0026r;s++){const a=r.tagName;if(o.includes(a))return!0;const A=r.getAttribute?.(\"contenteditable\");if(A===\"true\"||A===\"\")return!0;r=r.parentElement}return!1},b8i=()=\u003e{if(typeof document\u003e\"u\")return!1;const t=document.activeElement;if(!t)return!1;const e=t.tagName;if(e===\"INPUT\"||e===\"TEXTAREA\"||e===\"SELECT\")return!0;const n=t.getAttribute(\"contenteditable\");return n===\"true\"||n===\"\"},S8i=()=\u003e{if(!xme)return!0;const t=xme.getBoundingClientRect();return ZJe\u003e=t.left\u0026\u0026ZJe\u003c=t.right\u0026\u0026eWe\u003e=t.top\u0026\u0026eWe\u003c=t.bottom},Q8i=()=\u003e{cln||typeof window\u003e\"u\"||(window.addEventListener(\"mousemove\",t=\u003e{ZJe=t.clientX,eWe=t.clientY}),cln=!0)},v8i=t=\u003e{B8i(t.target)||b8i()||xme\u0026\u0026!S8i()||uU.forEach(e=\u003e{E8i(t,e.shortcut)\u0026\u0026(t.preventDefault(),e.invoke())})},lln=()=\u003e{const t=Array.from(uU.values());XJe.forEach(e=\u003ee(t))},w8i=()=\u003e{Aln||typeof window\u003e\"u\"||(window.addEventListener(\"keydown\",v8i),Aln=!0)},P8i=t=\u003e{uU.set(t.id,t),lln(),w8i()},M8i=t=\u003e{uU.delete(t)\u0026\u0026lln()},D8i=t=\u003e(XJe.add(t),t(Array.from(uU.values())),()=\u003e{XJe.delete(t)}),Eme=(t,e,n)=\u003e{const o=ee.useRef(e);o.current=e;const i=ee.useMemo(()=\u003e({shortcut:n.shortcut,description:n.description}),[n.shortcut,n.description]);ee.useEffect(()=\u003e{const r={id:t,...i,invoke:()=\u003eo.current()};return P8i(r),()=\u003e{M8i(t)}},[t,i])},N8i=()=\u003e{const[t,e]=ee.useState(()=\u003eArray.from(uU.values()));return ee.useEffect(()=\u003eD8i(e),[]),t},R8i=t=\u003e{xme=t,Q8i()},T8i=({open:t,onClose:e})=\u003e{const[n,o]=ee.useState(\"\"),i=ee.useRef(null),r=N8i();ee.useEffect(()=\u003e{if(!t)return;const a=A=\u003e{A.key===\"Escape\"\u0026\u0026(A.preventDefault(),e())};return window.addEventListener(\"keydown\",a),()=\u003ewindow.removeEventListener(\"keydown\",a)},[t,e]),ee.useEffect(()=\u003e{t\u0026\u0026setTimeout(()=\u003e{i.current?.focus()},0)},[t]);const s=ee.useMemo(()=\u003e{const a=n.trim().toLowerCase();return a?r.filter(A=\u003e`${A.shortcut} ${A.description}`.toLowerCase().includes(a)):r},[r,n]);return t?K.jsx(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",style:{position:\"fixed\",inset:0,backgroundColor:\"rgba(0, 0, 0, 0.5)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:9999},onClick:e,children:K.jsxs(\"div\",{style:{backgroundColor:\"#1f1f23\",color:\"#f8f8ff\",borderRadius:12,width:\"min(640px, 90vw)\",maxHeight:\"80vh\",boxShadow:\"0 20px 60px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.35)\",display:\"flex\",flexDirection:\"column\",overflow:\"hidden\"},onClick:a=\u003ea.stopPropagation(),children:[K.jsxs(\"header\",{style:{padding:\"20px 24px 12px\",borderBottom:\"1px solid rgba(255, 255, 255, 0.08)\"},children:[K.jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\"},children:[K.jsx(\"h2\",{style:{margin:0,fontSize:\"1.1rem\",fontWeight:600,letterSpacing:\"0.02em\"},children:\"Keyboard Shortcuts\"}),K.jsx(\"button\",{type:\"button\",onClick:e,style:{background:\"transparent\",border:\"none\",color:\"rgba(255, 255, 255, 0.8)\",fontSize:\"1rem\",cursor:\"pointer\"},children:\"✕\"})]}),K.jsx(\"input\",{ref:i,type:\"text\",placeholder:\"Search shortcuts...\",value:n,onChange:a=\u003eo(a.target.value),style:{marginTop:12,width:\"calc(100% - 24px)\",padding:\"10px 12px\",borderRadius:8,border:\"1px solid rgba(255, 255, 255, 0.1)\",backgroundColor:\"rgba(255, 255, 255, 0.05)\",color:\"white\",fontSize:\"0.95rem\"}})]}),K.jsx(\"div\",{style:{overflowY:\"auto\"},children:K.jsxs(\"table\",{style:{width:\"100%\",borderCollapse:\"collapse\",fontSize:\"0.95rem\"},children:[K.jsx(\"thead\",{children:K.jsxs(\"tr\",{style:{textAlign:\"left\",color:\"#a1a1b5\"},children:[K.jsx(\"th\",{style:{padding:\"12px 24px\",width:\"25%\"},children:\"Key\"}),K.jsx(\"th\",{style:{padding:\"12px 24px\"},children:\"Description\"})]})}),K.jsx(\"tbody\",{children:s.length===0?K.jsx(\"tr\",{children:K.jsx(\"td\",{colSpan:2,style:{padding:\"24px\",textAlign:\"center\"},children:\"No shortcuts found\"})}):s.map(a=\u003eK.jsxs(\"tr\",{style:{borderTop:\"1px solid rgba(255, 255, 255, 0.05)\"},children:[K.jsx(\"td\",{style:{padding:\"12px 24px\"},children:K.jsx(\"span\",{style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",border:\"1px solid rgba(255, 255, 255, 0.3)\",borderRadius:6,minWidth:36,padding:\"4px 8px\",fontFamily:\"monospace\",fontSize:\"0.95rem\",textTransform:\"capitalize\"},children:a.shortcut})}),K.jsx(\"td\",{style:{padding:\"12px 24px\"},children:a.description})]},a.id))})]})})]})}):null},k8i=()=\u003e({showToast:(t,e=2e3)=\u003e{ua(t,{duration:e})}}),F8i=({children:t})=\u003eK.jsxs(K.Fragment,{children:[t,K.jsx(ein,{position:\"bottom-right\"})]});function L8i({setAutoRotate:t,setAutoRotateUserToggled:e,setCameraPreset:n,closeMenu:o,cameraControllerRef:i,isAnimatingRef:r,lastPresetSelectTime:s}){return{handleCameraPresetSelect:ee.useCallback(A=\u003e{t(!1),e(!0),n(A),o(),s.current=Date.now(),A!==\"Custom\"\u0026\u0026(r.current=!0,i.current?.animateToPreset(A),setTimeout(()=\u003e{r.current=!1},600))},[t,e,n,o,i,r,s])}}var H8i=({containerRef:t,onOpen:e})=\u003e{const[n,o]=ee.useState(!1),[i,r]=ee.useState({x:0,y:0}),s=ee.useRef(null),a=ee.useRef(null),A=ee.useRef(null),c=ee.useRef(!1),l=()=\u003e{A.current!==null\u0026\u0026(clearTimeout(A.current),A.current=null)},u=ee.useCallback(_=\u003e{_.preventDefault();const f=typeof _.clientX==\"number\"?_.clientX:0,I=typeof _.clientY==\"number\"?_.clientY:0;if(c.current){c.current=!1;return}if(!a.current)return;const{x:C,y}=a.current,x=Math.abs(f-C),E=Math.abs(I-y),B=10;if(x\u003eB||E\u003eB){a.current=null;return}e?.({x:f,y:I}),r({x:f,y:I}),o(!0),a.current=null},[r,o,e]),g=ee.useCallback(_=\u003e{if(_.touches.length===1){const f=_.touches[0];f?(a.current={x:f.clientX,y:f.clientY},l(),A.current=window.setTimeout(()=\u003e{if(a.current){if(t.current){e?.(a.current);const I=t.current.getBoundingClientRect();r({x:I.left+I.width/2,y:I.top+I.height/2}),o(!0),c.current=!0}a.current=null}},600)):a.current=null}else a.current=null,l()},[t,e]),h=ee.useCallback(_=\u003e{if(!a.current||_.touches.length!==1)return;const f=_.touches[0];if(f){const I=Math.abs(f.clientX-a.current.x),C=Math.abs(f.clientY-a.current.y),y=10;(I\u003ey||C\u003ey)\u0026\u0026(a.current=null,l())}else a.current=null,l()},[]),d=ee.useCallback(()=\u003e{l(),setTimeout(()=\u003e{a.current\u0026\u0026(a.current=null)},0)},[]),p=ee.useCallback(_=\u003e{const f=_.target;s.current\u0026\u0026s.current.contains(f)||f.closest?.(\"[data-radix-popper-content-wrapper], [data-radix-dropdown-menu-content], [data-radix-dropdown-menu-sub-content]\")||o(!1)},[]);return ee.useEffect(()=\u003e{if(n)return document.addEventListener(\"mousedown\",p),document.addEventListener(\"touchstart\",p),()=\u003e{document.removeEventListener(\"mousedown\",p),document.removeEventListener(\"touchstart\",p)}},[n,p]),{menuVisible:n,menuPos:i,menuRef:s,contextMenuEventHandlers:{onMouseDown:_=\u003e{_.button===2?a.current={x:_.clientX,y:_.clientY}:a.current=null},onContextMenu:u,onTouchStart:g,onTouchMove:h,onTouchEnd:d},setMenuVisible:o}},O8i=()=\u003eee.useCallback(()=\u003e{const t=window.__TSCIRCUIT_THREE_OBJECT;if(!t)return;new pke().parse(t,n=\u003e{const o=new Blob([n instanceof ArrayBuffer?n:JSON.stringify(n)],{type:\"model/gltf+json\"}),i=URL.createObjectURL(o),r=document.createElement(\"a\");r.href=i,r.download=\"scene.gltf\",r.click(),URL.revokeObjectURL(i)},n=\u003e{console.error(\"Failed to export GLTF\",n)})},[]),G8i=new jt(0,0,0),Y8i=[5,-5,5],U8i=()=\u003e{if(typeof window\u003e\"u\")return;const t=window.localStorage.getItem(\"cadViewerCameraType\");return t===\"orthographic\"||t===\"perspective\"?t:void 0},K8i=t=\u003e{const e=OVe(t.circuitJson?void 0:t.children),n=t.circuitJson??e,o=n.some(Te=\u003eTe.type===\"pcb_bend\"),i=o||n.some(Te=\u003eTe.type===\"pcb_stiffener\"),[r,s]=ee.useState(void 0),a=r??t.foldPcbs,A=Srn(n,a),c=JSON.stringify(n),{hiddenCadComponentIds:l,hideComponent:u,unhideAllComponents:g}=pmi(c),h={...t,circuitJson:n,children:void 0,hiddenCadComponentIds:l},[d,p]=ee.useState(()=\u003e{const Te=window.localStorage.getItem(\"cadViewerEngine\");return Te===\"jscad\"||Te===\"manifold\"?Te:\"manifold\"}),m=ee.useRef(null),[_,f]=ee.useState(!1),[I,C]=ee.useState(()=\u003ewindow.localStorage.getItem(\"cadViewerAutoRotate\")!==\"false\"),[y,x]=ee.useState(()=\u003ewindow.localStorage.getItem(\"cadViewerAutoRotateUserToggled\")===\"true\"),[E,B]=ee.useState(\"Custom\"),[S,Q]=ee.useState(null),{cameraType:w}=gS(),{visibility:M,setLayerVisibility:k}=AT(),{showToast:R}=k8i(),F=ee.useRef(null),O=t.onCameraControllerReady,U=ee.useContext(HVe),[Y,W]=ee.useState(),[te,j]=ee.useState(),J=ee.useCallback(Te=\u003e{j(hmi(U.current,Te,n)),W(t.onViewSchematicComponent?dmi(U.current,Te,n):void 0)},[U,n,t.onViewSchematicComponent]),{menuVisible:oe,menuPos:ie,menuRef:ne,contextMenuEventHandlers:le,setMenuVisible:ge}=H8i({containerRef:m,onOpen:J}),_e=ee.useRef(y);_e.current=y;const ue=ee.useRef(!1),fe=ee.useRef(0),pe=1e3,ye=ee.useCallback(()=\u003e{ue.current||Date.now()-fe.current\u003cpe||(_e.current||C(!1),oe||B(\"Custom\"))},[oe]),Me=ee.useCallback(()=\u003e{C(Te=\u003e!Te),x(!0)},[]),ve=O8i(),he=ee.useCallback(()=\u003e{ge(!1)},[ge]),Qe=ee.useCallback(Te=\u003e{F.current=Te,O?.(Te),Te\u0026\u0026E!==\"Custom\"\u0026\u0026Te.animateToPreset(E)},[E,O]),{handleCameraPresetSelect:Pe}=L8i({setAutoRotate:C,setAutoRotateUserToggled:x,setCameraPreset:B,closeMenu:he,cameraControllerRef:F,isAnimatingRef:ue,lastPresetSelectTime:fe});Eme(\"open_keyboard_shortcuts_dialog\",()=\u003e{f(!0)},{shortcut:\"shift+?\",description:\"Open keyboard shortcuts\"}),Eme(\"toggle_smt_models\",()=\u003e{const Te=!M.smtModels;k(\"smtModels\",Te),R(Te?\"SMT components visible\":\"SMT components hidden\",1500)},{shortcut:\"shift+s\",description:\"Toggle surface mount components\"}),Eme(\"toggle_through_hole_models\",()=\u003e{const Te=!M.throughHoleModels;k(\"throughHoleModels\",Te),R(Te?\"Through-hole components visible\":\"Through-hole components hidden\",1500)},{shortcut:\"shift+t\",description:\"Toggle through-hole components\"}),Eme(\"toggle_translucent_models\",()=\u003e{const Te=!M.translucentModels;k(\"translucentModels\",Te),R(Te?\"Translucent components visible\":\"Translucent components hidden\",1500)},{shortcut:\"shift+v\",description:\"Toggle translucent components\"}),ee.useEffect(()=\u003e{m.current\u0026\u0026R8i(m.current)},[]),ee.useEffect(()=\u003e{window.localStorage.setItem(\"cadViewerEngine\",d)},[d]),ee.useEffect(()=\u003e{window.localStorage.setItem(\"cadViewerAutoRotate\",String(I))},[I]),ee.useEffect(()=\u003e{window.localStorage.setItem(\"cadViewerAutoRotateUserToggled\",String(y))},[y]),ee.useEffect(()=\u003e{window.localStorage.setItem(\"cadViewerCameraType\",w)},[w]);const we=t.circuitJson?c:void 0;return K.jsxs(\"div\",{ref:m,style:{width:\"100%\",height:\"100%\",position:\"relative\",userSelect:\"none\",MozUserSelect:\"none\",msUserSelect:\"none\",WebkitUserSelect:\"none\",WebkitTouchCallout:\"none\"},...le,children:[i?K.jsx(iAn,{...h,foldPcbs:a,autoRotateDisabled:t.autoRotateDisabled||!I,onUserInteraction:ye,onCameraControllerReady:Qe,referenceObject:S}):d===\"jscad\"?K.jsx(_4i,{...h,autoRotateDisabled:t.autoRotateDisabled||!I,cameraType:w,onUserInteraction:ye,onCameraControllerReady:Qe,referenceObject:S}):K.jsx(iAn,{...h,autoRotateDisabled:t.autoRotateDisabled||!I,cameraType:w,onUserInteraction:ye,onCameraControllerReady:Qe,referenceObject:S}),oe\u0026\u0026K.jsx(C8i,{componentName:te?.componentName,onHideComponent:te?()=\u003e{u(te.cad_component_id),he()}:void 0,onUnhideAllComponents:l.size\u003e0?()=\u003e{g(),he()}:void 0,onViewSchematicComponent:Y\u0026\u0026t.onViewSchematicComponent?()=\u003e{t.onViewSchematicComponent?.(Y),he()}:void 0,menuRef:ne,menuPos:ie,engine:d,flexScene:i,foldPcbs:A,onFoldPcbsToggle:o?()=\u003e{s(!A),B(\"Custom\"),he()}:void 0,cameraPreset:E,autoRotate:I,referenceObject:S,onEngineSwitch:Te=\u003e{p(Te),he()},onCameraPresetSelect:Pe,onAutoRotateToggle:()=\u003e{Me(),he()},onReferenceObjectSelect:Te=\u003e{Q(Re=\u003edEi(Re,Te)),C(!1),x(!0),B(\"Custom\"),he()},onDownloadGltf:()=\u003e{ve(),he()},onOpenKeyboardShortcuts:()=\u003e{f(!0),he()}}),K.jsx(T8i,{open:_,onClose:()=\u003ef(!1)})]},we)},V8i=t=\u003e{const e=ee.useRef(null);return K.jsx(HVe.Provider,{value:e,children:K.jsx(X3i,{defaultTarget:G8i,initialCameraPosition:Y8i,initialCameraType:U8i(),children:K.jsx(fmi,{children:K.jsx(q3i,{children:K.jsx(F8i,{children:K.jsx(K8i,{...t})})})})})})},z8i=_0(lmi());_0(Ape()),_0(Brn()),_0(Ape()),(0,z8i.default)(\"tscircuit:3d-viewer:convert-circuit-json-to-3d-svg\");const uln=t=\u003etypeof t==\"boolean\"?`${t}`:t===0?\"0\":t,gln=NB,gU=((t,e)=\u003en=\u003e{var o;if(e?.variants==null)return gln(t,n?.class,n?.className);const{variants:i,defaultVariants:r}=e,s=Object.keys(i).map(c=\u003e{const l=n?.[c],u=r?.[c];if(l===null)return null;const g=uln(l)||uln(u);return i[c][g]}),a=n\u0026\u0026Object.entries(n).reduce((c,l)=\u003e{let[u,g]=l;return g===void 0||(c[u]=g),c},{}),A=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((c,l)=\u003e{let{class:u,className:g,...h}=l;return Object.entries(h).every(d=\u003e{let[p,m]=d;return Array.isArray(m)?m.includes({...r,...a}[p]):{...r,...a}[p]===m})?[...c,u,g]:c},[]);return gln(t,s,A,n?.class,n?.className)})(\"rf-inline-flex rf-items-center rf-justify-center rf-gap-2 rf-whitespace-nowrap rf-rounded-md rf-text-sm rf-font-medium rf-transition-colors focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-pointer-events-none disabled:rf-opacity-50 [\u0026_svg]:rf-pointer-events-none [\u0026_svg]:rf-size-4 [\u0026_svg]:rf-shrink-0 dark:focus-visible:rf-ring-zinc-300\",{variants:{variant:{default:\"rf-bg-zinc-900 rf-text-zinc-50 rf-shadow hover:rf-bg-zinc-900/90 dark:rf-bg-zinc-50 dark:rf-text-zinc-900 dark:hover:rf-bg-zinc-50/90\",destructive:\"rf-bg-red-500 rf-text-zinc-50 rf-shadow-sm hover:rf-bg-red-500/90 dark:rf-bg-red-900 dark:rf-text-zinc-50 dark:hover:rf-bg-red-900/90\",outline:\"rf-border rf-border-zinc-200 rf-bg-white rf-shadow-sm hover:rf-bg-zinc-100 hover:rf-text-zinc-900 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:hover:rf-bg-zinc-800 dark:hover:rf-text-zinc-50\",secondary:\"rf-bg-zinc-100 rf-text-zinc-900 rf-shadow-sm hover:rf-bg-zinc-100/80 dark:rf-bg-zinc-800 dark:rf-text-zinc-50 dark:hover:rf-bg-zinc-800/80\",ghost:\"hover:rf-bg-zinc-100 hover:rf-text-zinc-900 dark:hover:rf-bg-zinc-800 dark:hover:rf-text-zinc-50\",link:\"rf-text-zinc-900 rf-underline-offset-4 hover:rf-underline dark:rf-text-zinc-50\"},size:{default:\"rf-h-9 rf-px-4 rf-py-2\",sm:\"rf-h-8 rf-rounded-md rf-px-3 rf-text-xs\",lg:\"rf-h-10 rf-rounded-md rf-px-8\",icon:\"rf-h-9 rf-w-9\"}},defaultVariants:{variant:\"default\",size:\"default\"}}),fA=ee.forwardRef(({className:t,variant:e,size:n,asChild:o=!1,...i},r)=\u003e{const s=o?ZFo:\"button\";return K.jsx(s,{className:Oi(gU({variant:e,size:n,className:t})),ref:r,...i})});fA.displayName=\"Button\";const J8i=({error:t,resetErrorBoundary:e})=\u003e{const n=t instanceof Error?t:new Error(String(t));return K.jsx(\"div\",{\"data-testid\":\"error-container\",className:\"rf-error-container rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h2\",{className:\"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3\",children:\"Error Loading 3D Viewer\"}),K.jsx(\"p\",{className:\"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-700\",children:n.message}),K.jsx(\"details\",{style:{whiteSpace:\"pre-wrap\"},className:\"rf-text-xs rf-font-mono rf-text-red-600 rf-mt-2\",children:n.stack}),e\u0026\u0026K.jsx(\"div\",{className:\"rf-mt-4\",children:K.jsx(fA,{variant:\"outline\",size:\"sm\",onClick:e,className:\"rf-text-red-700 rf-border-red-300 hover:rf-bg-red-100\",children:\"Retry\"})})]})})},W8i=ee.createContext(null);function j8i({children:t,didCatch:e,error:n,resetErrorBoundary:o}){const i=ee.useMemo(()=\u003e({didCatch:e,error:n,resetErrorBoundary:o}),[e,n,o]);return ee.createElement(W8i.Provider,{value:i},t)}const tWe={didCatch:!1,error:null};let bE=class extends ee.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=tWe}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{didCatch:n}=this.state;n\u0026\u0026(this.props.onReset?.({args:e,reason:\"imperative-api\"}),this.setState(tWe))}componentDidCatch(e,n){this.props.onError?.(e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:i}=this.props;o\u0026\u0026n.didCatch\u0026\u0026$8i(e.resetKeys,i)\u0026\u0026(this.props.onReset?.({next:i,prev:e.resetKeys,reason:\"keys\"}),this.setState(tWe))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:i}=this.props,{didCatch:r,error:s}=this.state;let a=e;if(r){const A={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n==\"function\")a=n(A);else if(o)a=ee.createElement(o,A);else if(\"fallback\"in this.props)a=i;else throw s}return ee.createElement(j8i,{didCatch:r,error:s,resetErrorBoundary:this.resetErrorBoundary},a)}};function $8i(t=[],e=[]){return t.length!==e.length||t.some((n,o)=\u003e!Object.is(n,e[o]))}function q8i(t,e){if(t==null)return{};var n={},o=Object.keys(t),i,r;for(r=0;r\u003co.length;r++)i=o[r],!(e.indexOf(i)\u003e=0)\u0026\u0026(n[i]=t[i]);return n}var X8i=[\"color\"],nWe=ee.forwardRef(function(t,e){var n=t.color,o=n===void 0?\"currentColor\":n,i=q8i(t,X8i);return ee.createElement(\"svg\",Object.assign({width:\"15\",height:\"15\",viewBox:\"0 0 15 15\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\"},i,{ref:e}),ee.createElement(\"path\",{d:\"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z\",fill:o,fillRule:\"evenodd\",clipRule:\"evenodd\"}))});const Z8i=t=\u003et.replace(/([a-z0-9])([A-Z])/g,\"$1-$2\").toLowerCase(),ebi=t=\u003et.replace(/^([A-Z])|[\\s-_]+(\\w)/g,(e,n,o)=\u003eo?o.toUpperCase():n.toLowerCase()),dln=t=\u003e{const e=ebi(t);return e.charAt(0).toUpperCase()+e.slice(1)},hln=(...t)=\u003et.filter((e,n,o)=\u003e!!e\u0026\u0026e.trim()!==\"\"\u0026\u0026o.indexOf(e)===n).join(\" \").trim();var tbi={xmlns:\"http://www.w3.org/2000/svg\",width:24,height:24,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\"};const nbi=ee.forwardRef(({color:t=\"currentColor\",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i=\"\",children:r,iconNode:s,...a},A)=\u003eee.createElement(\"svg\",{ref:A,...tbi,width:e,height:e,stroke:t,strokeWidth:o?Number(n)*24/Number(e):n,className:hln(\"lucide\",i),...a},[...s.map(([c,l])=\u003eee.createElement(c,l)),...Array.isArray(r)?r:[r]]));const ec=(t,e)=\u003e{const n=ee.forwardRef(({className:o,...i},r)=\u003eee.createElement(nbi,{ref:r,iconNode:e,className:hln(`lucide-${Z8i(dln(t))}`,`lucide-${t}`,o),...i}));return n.displayName=dln(t),n};const obi=ec(\"arrow-left\",[[\"path\",{d:\"m12 19-7-7 7-7\",key:\"1l729n\"}],[\"path\",{d:\"M19 12H5\",key:\"x3x0zl\"}]]);const ibi=ec(\"arrow-up\",[[\"path\",{d:\"m5 12 7-7 7 7\",key:\"hav0vg\"}],[\"path\",{d:\"M12 19V5\",key:\"x0mq9r\"}]]);const rbi=ec(\"box\",[[\"path\",{d:\"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z\",key:\"hh9hay\"}],[\"path\",{d:\"m3.3 7 8.7 5 8.7-5\",key:\"g66t2b\"}],[\"path\",{d:\"M12 22V12\",key:\"d0xqtd\"}]]);const Bme=ec(\"bug\",[[\"path\",{d:\"m8 2 1.88 1.88\",key:\"fmnt4t\"}],[\"path\",{d:\"M14.12 3.88 16 2\",key:\"qol33r\"}],[\"path\",{d:\"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1\",key:\"d7y7pr\"}],[\"path\",{d:\"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6\",key:\"xs1cw7\"}],[\"path\",{d:\"M12 20v-9\",key:\"1qisl0\"}],[\"path\",{d:\"M6.53 9C4.6 8.8 3 7.1 3 5\",key:\"32zzws\"}],[\"path\",{d:\"M6 13H2\",key:\"82j7cp\"}],[\"path\",{d:\"M3 21c0-2.1 1.7-3.9 3.8-4\",key:\"4p0ekp\"}],[\"path\",{d:\"M20.97 5c0 2.1-1.6 3.8-3.5 4\",key:\"18gb23\"}],[\"path\",{d:\"M22 13h-4\",key:\"1jl80f\"}],[\"path\",{d:\"M17.2 17c2.1.1 3.8 1.9 3.8 4\",key:\"k3fwyw\"}]]);const CS=ec(\"check\",[[\"path\",{d:\"M20 6 9 17l-5-5\",key:\"1gmf2c\"}]]);const pZ=ec(\"chevron-down\",[[\"path\",{d:\"m6 9 6 6 6-6\",key:\"qrunsl\"}]]);const bT=ec(\"chevron-right\",[[\"path\",{d:\"m9 18 6-6-6-6\",key:\"mthhwq\"}]]);const sbi=ec(\"chevron-up\",[[\"path\",{d:\"m18 15-6-6-6 6\",key:\"153udz\"}]]);const abi=ec(\"chevrons-up-down\",[[\"path\",{d:\"m7 15 5 5 5-5\",key:\"1hf1tw\"}],[\"path\",{d:\"m7 9 5-5 5 5\",key:\"sgt6xg\"}]]);const oWe=ec(\"circle-alert\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"line\",{x1:\"12\",x2:\"12\",y1:\"8\",y2:\"12\",key:\"1pkeuh\"}],[\"line\",{x1:\"12\",x2:\"12.01\",y1:\"16\",y2:\"16\",key:\"4dfq90\"}]]);const Abi=ec(\"circle-x\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"path\",{d:\"m15 9-6 6\",key:\"1uzhvr\"}],[\"path\",{d:\"m9 9 6 6\",key:\"z0biqf\"}]]);const pln=ec(\"circle\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}]]);const cbi=ec(\"circuit-board\",[[\"rect\",{width:\"18\",height:\"18\",x:\"3\",y:\"3\",rx:\"2\",key:\"afitv7\"}],[\"path\",{d:\"M11 9h4a2 2 0 0 0 2-2V3\",key:\"1ve2rv\"}],[\"circle\",{cx:\"9\",cy:\"9\",r:\"2\",key:\"af1f0g\"}],[\"path\",{d:\"M7 21v-4a2 2 0 0 1 2-2h4\",key:\"1fwkro\"}],[\"circle\",{cx:\"15\",cy:\"15\",r:\"2\",key:\"3i40o0\"}]]);const lbi=ec(\"clipboard\",[[\"rect\",{width:\"8\",height:\"4\",x:\"8\",y:\"2\",rx:\"1\",ry:\"1\",key:\"tgr4d6\"}],[\"path\",{d:\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\",key:\"116196\"}]]);const ubi=ec(\"clock\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"10\",key:\"1mglay\"}],[\"polyline\",{points:\"12 6 12 12 16 14\",key:\"68esgv\"}]]);const gbi=ec(\"code\",[[\"polyline\",{points:\"16 18 22 12 16 6\",key:\"z7tu5w\"}],[\"polyline\",{points:\"8 6 2 12 8 18\",key:\"1eg1df\"}]]);const mZ=ec(\"download\",[[\"path\",{d:\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\",key:\"ih7n3h\"}],[\"polyline\",{points:\"7 10 12 15 17 10\",key:\"2ggqvy\"}],[\"line\",{x1:\"12\",x2:\"12\",y1:\"15\",y2:\"3\",key:\"1vk2je\"}]]);const dbi=ec(\"ellipsis\",[[\"circle\",{cx:\"12\",cy:\"12\",r:\"1\",key:\"41hilf\"}],[\"circle\",{cx:\"19\",cy:\"12\",r:\"1\",key:\"1wjl8i\"}],[\"circle\",{cx:\"5\",cy:\"12\",r:\"1\",key:\"1pcz8c\"}]]);const hbi=ec(\"external-link\",[[\"path\",{d:\"M15 3h6v6\",key:\"1q9fwt\"}],[\"path\",{d:\"M10 14 21 3\",key:\"gplh6r\"}],[\"path\",{d:\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\",key:\"a6xqqp\"}]]);const pbi=ec(\"file-text\",[[\"path\",{d:\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\",key:\"1rqfz7\"}],[\"path\",{d:\"M14 2v4a2 2 0 0 0 2 2h4\",key:\"tnqrlb\"}],[\"path\",{d:\"M10 9H8\",key:\"b1mrlr\"}],[\"path\",{d:\"M16 13H8\",key:\"t4e002\"}],[\"path\",{d:\"M16 17H8\",key:\"z1uh3a\"}]]);const mbi=ec(\"file\",[[\"path\",{d:\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\",key:\"1rqfz7\"}],[\"path\",{d:\"M14 2v4a2 2 0 0 0 2 2h4\",key:\"tnqrlb\"}]]);const _bi=ec(\"folder\",[[\"path\",{d:\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\",key:\"1kt360\"}]]);const fbi=ec(\"fullscreen\",[[\"path\",{d:\"M3 7V5a2 2 0 0 1 2-2h2\",key:\"aa7l1z\"}],[\"path\",{d:\"M17 3h2a2 2 0 0 1 2 2v2\",key:\"4qcy5o\"}],[\"path\",{d:\"M21 17v2a2 2 0 0 1-2 2h-2\",key:\"6vwrx8\"}],[\"path\",{d:\"M7 21H5a2 2 0 0 1-2-2v-2\",key:\"ioqczr\"}],[\"rect\",{width:\"10\",height:\"8\",x:\"7\",y:\"8\",rx:\"1\",key:\"vys8me\"}]]);const Ibi=ec(\"image\",[[\"rect\",{width:\"18\",height:\"18\",x:\"3\",y:\"3\",rx:\"2\",ry:\"2\",key:\"1m3agn\"}],[\"circle\",{cx:\"9\",cy:\"9\",r:\"2\",key:\"af1f0g\"}],[\"path\",{d:\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\",key:\"1xmnt7\"}]]);const mln=ec(\"layout-grid\",[[\"rect\",{width:\"7\",height:\"7\",x:\"3\",y:\"3\",rx:\"1\",key:\"1g98yp\"}],[\"rect\",{width:\"7\",height:\"7\",x:\"14\",y:\"3\",rx:\"1\",key:\"6d4xhi\"}],[\"rect\",{width:\"7\",height:\"7\",x:\"14\",y:\"14\",rx:\"1\",key:\"nxv5o0\"}],[\"rect\",{width:\"7\",height:\"7\",x:\"3\",y:\"14\",rx:\"1\",key:\"1bb6yr\"}]]);const Cbi=ec(\"lightbulb\",[[\"path\",{d:\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\",key:\"1gvzjb\"}],[\"path\",{d:\"M9 18h6\",key:\"x1upvd\"}],[\"path\",{d:\"M10 22h4\",key:\"ceow96\"}]]);const SE=ec(\"loader-circle\",[[\"path\",{d:\"M21 12a9 9 0 1 1-6.219-8.56\",key:\"13zald\"}]]);const ybi=ec(\"lock\",[[\"rect\",{width:\"18\",height:\"11\",x:\"3\",y:\"11\",rx:\"2\",ry:\"2\",key:\"1w4ew1\"}],[\"path\",{d:\"M7 11V7a5 5 0 0 1 10 0v4\",key:\"fwvmzm\"}]]);const xbi=ec(\"message-circle-question\",[[\"path\",{d:\"M7.9 20A9 9 0 1 0 4 16.1L2 22Z\",key:\"vv11sd\"}],[\"path\",{d:\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\",key:\"1u773s\"}],[\"path\",{d:\"M12 17h.01\",key:\"p32p05\"}]]);const Ebi=ec(\"minimize\",[[\"path\",{d:\"M8 3v3a2 2 0 0 1-2 2H3\",key:\"hohbtr\"}],[\"path\",{d:\"M21 8h-3a2 2 0 0 1-2-2V3\",key:\"5jw1f3\"}],[\"path\",{d:\"M3 16h3a2 2 0 0 1 2 2v3\",key:\"198tvr\"}],[\"path\",{d:\"M16 21v-3a2 2 0 0 1 2-2h3\",key:\"ph8mxp\"}]]);const Bbi=ec(\"package-open\",[[\"path\",{d:\"M12 22v-9\",key:\"x3hkom\"}],[\"path\",{d:\"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z\",key:\"2ntwy6\"}],[\"path\",{d:\"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13\",key:\"1pmm1c\"}],[\"path\",{d:\"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z\",key:\"12ttoo\"}]]);const bbi=ec(\"package\",[[\"path\",{d:\"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z\",key:\"1a0edw\"}],[\"path\",{d:\"M12 22V12\",key:\"d0xqtd\"}],[\"polyline\",{points:\"3.29 7 12 12 20.71 7\",key:\"ousv84\"}],[\"path\",{d:\"m7.5 4.27 9 5.15\",key:\"1c824w\"}]]);const _ln=ec(\"play\",[[\"polygon\",{points:\"6 3 20 12 6 21 6 3\",key:\"1oa8hb\"}]]);const fln=ec(\"route\",[[\"circle\",{cx:\"6\",cy:\"19\",r:\"3\",key:\"1kj8tv\"}],[\"path\",{d:\"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15\",key:\"1d8sl\"}],[\"circle\",{cx:\"18\",cy:\"5\",r:\"3\",key:\"gq8acd\"}]]);const Sbi=ec(\"save\",[[\"path\",{d:\"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z\",key:\"1c8476\"}],[\"path\",{d:\"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7\",key:\"1ydtos\"}],[\"path\",{d:\"M7 3v4a1 1 0 0 0 1 1h7\",key:\"t51u73\"}]]);const iWe=ec(\"search\",[[\"circle\",{cx:\"11\",cy:\"11\",r:\"8\",key:\"4ej97u\"}],[\"path\",{d:\"m21 21-4.3-4.3\",key:\"1qie3q\"}]]);const Qbi=ec(\"square\",[[\"rect\",{width:\"18\",height:\"18\",x:\"3\",y:\"3\",rx:\"2\",key:\"afitv7\"}]]);const vbi=ec(\"triangle-alert\",[[\"path\",{d:\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\",key:\"wmoenq\"}],[\"path\",{d:\"M12 9v4\",key:\"juzpu7\"}],[\"path\",{d:\"M12 17h.01\",key:\"p32p05\"}]]);const wbi=ec(\"truck\",[[\"path\",{d:\"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2\",key:\"wrbu53\"}],[\"path\",{d:\"M15 18H9\",key:\"1lyqi6\"}],[\"path\",{d:\"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14\",key:\"lysw3i\"}],[\"circle\",{cx:\"17\",cy:\"18\",r:\"2\",key:\"332jqn\"}],[\"circle\",{cx:\"7\",cy:\"18\",r:\"2\",key:\"19iecd\"}]]);const Pbi=ec(\"upload\",[[\"path\",{d:\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\",key:\"ih7n3h\"}],[\"polyline\",{points:\"17 8 12 3 7 8\",key:\"t8dd8p\"}],[\"line\",{x1:\"12\",x2:\"12\",y1:\"3\",y2:\"15\",key:\"widbto\"}]]);function Mbi(t){const e=String.fromCodePoint(...t);return btoa(e)}function Dbi(t){const e=RQe(TQe(t.trim()),{mtime:1739063707691});return Mbi(e)}function Nbi(t){return`#data:application/gzip;base64,${Dbi(t.trim())}`}function Rbi(t,e){return`https://tscircuit.com/editor?${Nbi(t)}`}var Tbi=Object.defineProperty,h1=(t,e)=\u003eTbi(t,\"name\",{value:e,configurable:!0}),rWe=\"dismissableLayer.update\",kbi=\"dismissableLayer.pointerDownOutside\",Fbi=\"dismissableLayer.focusOutside\",Iln,Cln=ee.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),_Z=ee.forwardRef(h1(function(e,n){const{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:A,onDismiss:c,...l}=e,u=ee.useContext(Cln),[g,h]=ee.useState(null),d=g?.ownerDocument??globalThis?.document,[,p]=ee.useState({}),m=$A(n,h),_=Array.from(u.layers),[f]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),I=f?_.indexOf(f):-1,C=g?_.indexOf(g):-1,y=u.layersWithOutsidePointerEventsDisabled.size\u003e0,x=C\u003e=I,E=ee.useRef(!1),B=xln(M=\u003e{s?.(M),A?.(M),M.defaultPrevented||c?.()},{ownerDocument:d,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:ee.useCallback(M=\u003e{if(!(M instanceof Node))return!1;const k=[...u.branches].some(R=\u003eR.contains(M));return x\u0026\u0026!k},[u.branches,x])}),S=Eln(M=\u003e{if(i\u0026\u0026E.current)return;const k=M.target;[...u.branches].some(F=\u003eF.contains(k))||(a?.(M),A?.(M),M.defaultPrevented||c?.())},d),Q=g?C===_.length-1:!1,w=lE(M=\u003e{M.key===\"Escape\"\u0026\u0026(r?.(M),!M.defaultPrevented\u0026\u0026c\u0026\u0026(M.preventDefault(),c()))});return ee.useEffect(()=\u003e{if(Q)return d.addEventListener(\"keydown\",w,{capture:!0}),()=\u003ed.removeEventListener(\"keydown\",w,{capture:!0})},[d,Q,w]),ee.useEffect(()=\u003e{if(g)return o\u0026\u0026(u.layersWithOutsidePointerEventsDisabled.size===0\u0026\u0026(Iln=d.body.style.pointerEvents,d.body.style.pointerEvents=\"none\"),u.layersWithOutsidePointerEventsDisabled.add(g)),u.layers.add(g),sWe(),()=\u003e{o\u0026\u0026(u.layersWithOutsidePointerEventsDisabled.delete(g),u.layersWithOutsidePointerEventsDisabled.size===0\u0026\u0026(d.body.style.pointerEvents=Iln))}},[g,d,o,u]),ee.useEffect(()=\u003e()=\u003e{g\u0026\u0026(u.layers.delete(g),u.layersWithOutsidePointerEventsDisabled.delete(g),sWe())},[g,u]),ee.useEffect(()=\u003e{const M=h1(()=\u003ep({}),\"handleUpdate\");return document.addEventListener(rWe,M),()=\u003edocument.removeEventListener(rWe,M)},[]),K.jsx(Na.div,{...l,ref:m,style:{pointerEvents:y?x?\"auto\":\"none\":void 0,...e.style},onFocusCapture:ar(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ar(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ar(e.onPointerDownCapture,B.onPointerDownCapture)})},\"DismissableLayer\"));function yln(){const t=ee.useContext(Cln),[e,n]=ee.useState(null);return ee.useEffect(()=\u003e{if(e)return t.dismissableSurfaces.add(e),()=\u003e{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}h1(yln,\"useDismissableLayerSurface\");var Lbi=h1(()=\u003e!0,\"IS_TRUE\");function xln(t,e){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:r,shouldHandlePointerDownOutside:s=Lbi}=e,a=lE(t),A=ee.useRef(!1),c=ee.useRef(!1),l=ee.useRef(new Map),u=ee.useRef(()=\u003e{});return ee.useEffect(()=\u003e{function g(){c.current=!1,i.current=!1,l.current.clear()}h1(g,\"resetOutsideInteraction\");function h(){return Array.from(l.current.values()).some(Boolean)}h1(h,\"isOutsideInteractionIntercepted\");function d(I){if(!c.current)return;const C=I.target;C instanceof Node\u0026\u0026[...r].some(x=\u003ex.contains(C))||l.current.set(I.type,!0),I.type===\"click\"\u0026\u0026window.setTimeout(()=\u003e{c.current\u0026\u0026u.current()},0)}h1(d,\"handleInteractionCapture\");function p(I){c.current\u0026\u0026l.current.set(I.type,!1)}h1(p,\"handleInteractionBubble\");const m=h1(I=\u003e{if(I.target\u0026\u0026!A.current){let C=function(){n.removeEventListener(\"click\",u.current);const x=h();g(),x||aWe(kbi,a,y,{discrete:!0})};if(h1(C,\"handleAndDispatchPointerDownOutsideEvent\"),!s(I.target)){n.removeEventListener(\"click\",u.current),g(),A.current=!1;return}const y={originalEvent:I};c.current=!0,i.current=o\u0026\u0026I.button===0,l.current.clear(),!o||I.button!==0?C():(n.removeEventListener(\"click\",u.current),u.current=C,n.addEventListener(\"click\",u.current,{once:!0}))}else n.removeEventListener(\"click\",u.current),g();A.current=!1},\"handlePointerDown\"),_=[\"pointerup\",\"mousedown\",\"mouseup\",\"touchstart\",\"touchend\",\"click\"];for(const I of _)n.addEventListener(I,d,!0),n.addEventListener(I,p);const f=window.setTimeout(()=\u003e{n.addEventListener(\"pointerdown\",m)},0);return()=\u003e{window.clearTimeout(f),n.removeEventListener(\"pointerdown\",m),n.removeEventListener(\"click\",u.current);for(const I of _)n.removeEventListener(I,d,!0),n.removeEventListener(I,p)}},[n,a,o,i,r,s]),{onPointerDownCapture:h1(()=\u003eA.current=!0,\"onPointerDownCapture\")}}h1(xln,\"usePointerDownOutside\");function Eln(t,e=globalThis?.document){const n=lE(t),o=ee.useRef(!1);return ee.useEffect(()=\u003e{const i=h1(r=\u003e{r.target\u0026\u0026!o.current\u0026\u0026aWe(Fbi,n,{originalEvent:r},{discrete:!1})},\"handleFocus\");return e.addEventListener(\"focusin\",i),()=\u003ee.removeEventListener(\"focusin\",i)},[e,n]),{onFocusCapture:h1(()=\u003eo.current=!0,\"onFocusCapture\"),onBlurCapture:h1(()=\u003eo.current=!1,\"onBlurCapture\")}}h1(Eln,\"useFocusOutside\");function sWe(){const t=new CustomEvent(rWe);document.dispatchEvent(t)}h1(sWe,\"dispatchUpdate\");function aWe(t,e,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e\u0026\u0026i.addEventListener(t,e,{once:!0}),o?hDe(i,r):i.dispatchEvent(r)}h1(aWe,\"handleAndDispatchCustomEvent\");var Hbi=Object.defineProperty,AWe=(t,e)=\u003eHbi(t,\"name\",{value:e,configurable:!0}),bme=0,dU=null;function Obi(t){return hU(),t.children}AWe(Obi,\"FocusGuards\");function hU(){ee.useEffect(()=\u003e{dU||(dU={start:cWe(),end:cWe()});const{start:t,end:e}=dU;return document.body.firstElementChild!==t\u0026\u0026document.body.insertAdjacentElement(\"afterbegin\",t),document.body.lastElementChild!==e\u0026\u0026document.body.insertAdjacentElement(\"beforeend\",e),bme++,()=\u003e{bme===1\u0026\u0026(dU?.start.remove(),dU?.end.remove(),dU=null),bme=Math.max(0,bme-1)}},[])}AWe(hU,\"useFocusGuards\");function cWe(){const t=document.createElement(\"span\");return t.setAttribute(\"data-radix-focus-guard\",\"\"),t.tabIndex=0,t.style.outline=\"none\",t.style.opacity=\"0\",t.style.position=\"fixed\",t.style.pointerEvents=\"none\",t}AWe(cWe,\"createFocusGuard\");var Gbi=Object.defineProperty,l2=(t,e)=\u003eGbi(t,\"name\",{value:e,configurable:!0}),lWe=\"focusScope.autoFocusOnMount\",uWe=\"focusScope.autoFocusOnUnmount\",Bln={bubbles:!1,cancelable:!0},Sme=ee.forwardRef(l2(function(e,n){const{loop:o=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[A,c]=ee.useState(null),l=lE(r),u=lE(s),g=ee.useRef(null),h=$A(n,c),d=ee.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ee.useEffect(()=\u003e{if(i){let m=function(C){if(d.paused||!A)return;const y=C.target;A.contains(y)?g.current=y:yS(g.current,{select:!0})},_=function(C){if(d.paused||!A)return;const y=C.relatedTarget;y!==null\u0026\u0026(A.contains(y)||yS(g.current,{select:!0}))},f=function(C){if(document.activeElement===document.body)for(const x of C)x.removedNodes.length\u003e0\u0026\u0026yS(A)};l2(m,\"handleFocusIn\"),l2(_,\"handleFocusOut\"),l2(f,\"handleMutations\"),document.addEventListener(\"focusin\",m),document.addEventListener(\"focusout\",_);const I=new MutationObserver(f);return A\u0026\u0026I.observe(A,{childList:!0,subtree:!0}),()=\u003e{document.removeEventListener(\"focusin\",m),document.removeEventListener(\"focusout\",_),I.disconnect()}}},[i,A,d.paused]),ee.useEffect(()=\u003e{if(A){wln.add(d);const m=document.activeElement;if(!A.contains(m)){const f=new CustomEvent(lWe,Bln);A.addEventListener(lWe,l),A.dispatchEvent(f),f.defaultPrevented||(bln(Mln(gWe(A)),{select:!0}),document.activeElement===m\u0026\u0026yS(A))}return()=\u003e{A.removeEventListener(lWe,l),setTimeout(()=\u003e{const f=new CustomEvent(uWe,Bln);A.addEventListener(uWe,u),A.dispatchEvent(f),f.defaultPrevented||yS(m??document.body,{select:!0}),A.removeEventListener(uWe,u),wln.remove(d)},0)}}},[A,l,u,d]);const p=ee.useCallback(m=\u003e{if(!o\u0026\u0026!i||d.paused)return;const _=m.key===\"Tab\"\u0026\u0026!m.altKey\u0026\u0026!m.ctrlKey\u0026\u0026!m.metaKey,f=document.activeElement;if(_\u0026\u0026f){const I=m.currentTarget,[C,y]=Sln(I);C\u0026\u0026y?!m.shiftKey\u0026\u0026f===y?(m.preventDefault(),o\u0026\u0026yS(C,{select:!0})):m.shiftKey\u0026\u0026f===C\u0026\u0026(m.preventDefault(),o\u0026\u0026yS(y,{select:!0})):f===I\u0026\u0026m.preventDefault()}},[o,i,d.paused]);return K.jsx(Na.div,{tabIndex:-1,...a,ref:h,onKeyDown:p})},\"FocusScope\"));function bln(t,{select:e=!1}={}){const n=document.activeElement;for(const o of t)if(yS(o,{select:e}),document.activeElement!==n)return}l2(bln,\"focusFirst\");function Sln(t){const e=gWe(t),n=dWe(e,t),o=dWe(e.reverse(),t);return[n,o]}l2(Sln,\"getTabbableEdges\");function gWe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:l2(o=\u003e{const i=o.tagName===\"INPUT\"\u0026\u0026o.type===\"hidden\";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex\u003e=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},\"acceptNode\")});for(;n.nextNode();)e.push(n.currentNode);return e}l2(gWe,\"getTabbableCandidates\");function dWe(t,e){const n=typeof e.checkVisibility==\"function\"\u0026\u0026e.checkVisibility({checkVisibilityCSS:!0});for(const o of t)if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):Qln(o,{upTo:e})))return o}l2(dWe,\"findVisible\");function Qln(t,{upTo:e}){if(getComputedStyle(t).visibility===\"hidden\")return!0;for(;t;){if(e!==void 0\u0026\u0026t===e)return!1;if(getComputedStyle(t).display===\"none\")return!0;t=t.parentElement}return!1}l2(Qln,\"isHidden\");function vln(t){return t instanceof HTMLInputElement\u0026\u0026\"select\"in t}l2(vln,\"isSelectableInput\");function yS(t,{select:e=!1}={}){if(t\u0026\u0026t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n\u0026\u0026vln(t)\u0026\u0026e\u0026\u0026t.select()}}l2(yS,\"focus\");var wln=Pln();function Pln(){let t=[];return{add(e){const n=t[0];e!==n\u0026\u0026n?.pause(),t=hWe(t,e),t.unshift(e)},remove(e){t=hWe(t,e),t[0]?.resume()}}}l2(Pln,\"createFocusScopesStack\");function hWe(t,e){const n=[...t],o=n.indexOf(e);return o!==-1\u0026\u0026n.splice(o,1),n}l2(hWe,\"arrayRemove\");function Mln(t){return t.filter(e=\u003ee.tagName!==\"A\")}l2(Mln,\"removeLinks\");const Ybi=[\"top\",\"right\",\"bottom\",\"left\"],SP=Math.min,xS=Math.max,Qme=Math.round,vme=Math.floor,ES=t=\u003e({x:t,y:t}),Ubi={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function Dln(t,e,n){return xS(t,SP(e,n))}function BS(t,e){return typeof t==\"function\"?t(e):t}function QP(t){return t.split(\"-\")[0]}function pU(t){return t.split(\"-\")[1]}function pWe(t){return t===\"x\"?\"y\":\"x\"}function mWe(t){return t===\"y\"?\"height\":\"width\"}function G6(t){const e=t[0];return e===\"t\"||e===\"b\"?\"y\":\"x\"}function _We(t){return pWe(G6(t))}function Kbi(t,e,n){n===void 0\u0026\u0026(n=!1);const o=pU(t),i=_We(t),r=mWe(i);let s=i===\"x\"?o===(n?\"end\":\"start\")?\"right\":\"left\":o===\"start\"?\"bottom\":\"top\";return e.reference[r]\u003ee.floating[r]\u0026\u0026(s=wme(s)),[s,wme(s)]}function Vbi(t){const e=wme(t);return[fWe(t),e,fWe(e)]}function fWe(t){return t.includes(\"start\")?t.replace(\"start\",\"end\"):t.replace(\"end\",\"start\")}const Nln=[\"left\",\"right\"],Rln=[\"right\",\"left\"],zbi=[\"top\",\"bottom\"],Jbi=[\"bottom\",\"top\"];function Wbi(t,e,n){switch(t){case\"top\":case\"bottom\":return n?e?Rln:Nln:e?Nln:Rln;case\"left\":case\"right\":return e?zbi:Jbi;default:return[]}}function jbi(t,e,n,o){const i=pU(t);let r=Wbi(QP(t),n===\"start\",o);return i\u0026\u0026(r=r.map(s=\u003es+\"-\"+i),e\u0026\u0026(r=r.concat(r.map(fWe)))),r}function wme(t){const e=QP(t);return Ubi[e]+t.slice(e.length)}function $bi(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Tln(t){return typeof t!=\"number\"?$bi(t):{top:t,right:t,bottom:t,left:t}}function Pme(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function kln(t,e,n){let{reference:o,floating:i}=t;const r=G6(e),s=_We(e),a=mWe(s),A=QP(e),c=r===\"y\",l=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,g=o[a]/2-i[a]/2;let h;switch(A){case\"top\":h={x:l,y:o.y-i.height};break;case\"bottom\":h={x:l,y:o.y+o.height};break;case\"right\":h={x:o.x+o.width,y:u};break;case\"left\":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}const d=pU(e);return d\u0026\u0026(h[s]+=g*(d===\"end\"?1:-1)*(n\u0026\u0026c?-1:1)),h}async function qbi(t,e){var n;e===void 0\u0026\u0026(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:A}=t,{boundary:c=\"clippingAncestors\",rootBoundary:l=\"viewport\",elementContext:u=\"floating\",altBoundary:g=!1,padding:h=0}=BS(e,t),d=Tln(h),m=a[g?u===\"floating\"?\"reference\":\"floating\":u],_=Pme(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:A})),f=u===\"floating\"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,I=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),C=await(r.isElement==null?void 0:r.isElement(I))\u0026\u0026await(r.getScale==null?void 0:r.getScale(I))||{x:1,y:1},y=Pme(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:f,offsetParent:I,strategy:A}):f);return{top:(_.top-y.top+d.top)/C.y,bottom:(y.bottom-_.bottom+d.bottom)/C.y,left:(_.left-y.left+d.left)/C.x,right:(y.right-_.right+d.right)/C.x}}const Xbi=50,Zbi=async(t,e,n)=\u003e{const{placement:o=\"bottom\",strategy:i=\"absolute\",middleware:r=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:qbi},A=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:l,y:u}=kln(c,o,A),g=o,h=0;const d={};for(let p=0;p\u003cr.length;p++){const m=r[p];if(!m)continue;const{name:_,fn:f}=m,{x:I,y:C,data:y,reset:x}=await f({x:l,y:u,initialPlacement:o,placement:g,strategy:i,middlewareData:d,rects:c,platform:a,elements:{reference:t,floating:e}});l=I??l,u=C??u,d[_]={...d[_],...y},x\u0026\u0026h\u003cXbi\u0026\u0026(h++,typeof x==\"object\"\u0026\u0026(x.placement\u0026\u0026(g=x.placement),x.rects\u0026\u0026(c=x.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:l,y:u}=kln(c,g,A)),p=-1)}return{x:l,y:u,placement:g,strategy:i,middlewareData:d}},eSi=t=\u003e({name:\"arrow\",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:A}=e,{element:c,padding:l=0}=BS(t,e)||{};if(c==null)return{};const u=Tln(l),g={x:n,y:o},h=_We(i),d=mWe(h),p=await s.getDimensions(c),m=h===\"y\",_=m?\"top\":\"left\",f=m?\"bottom\":\"right\",I=m?\"clientHeight\":\"clientWidth\",C=r.reference[d]+r.reference[h]-g[h]-r.floating[d],y=g[h]-r.reference[h],x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let E=x?x[I]:0;(!E||!await(s.isElement==null?void 0:s.isElement(x)))\u0026\u0026(E=a.floating[I]||r.floating[d]);const B=C/2-y/2,S=E/2-p[d]/2-1,Q=SP(u[_],S),w=SP(u[f],S),M=E-p[d]-w,k=E/2-p[d]/2+B,R=Dln(Q,k,M),F=!A.arrow\u0026\u0026pU(i)!=null\u0026\u0026k!==R\u0026\u0026r.reference[d]/2-(k\u003cQ?Q:w)-p[d]/2\u003c0,O=F?k\u003cQ?k-Q:k-M:0;return{[h]:g[h]+O,data:{[h]:R,centerOffset:k-R-O,...F\u0026\u0026{alignmentOffset:O}},reset:F}}}),tSi=function(t){return t===void 0\u0026\u0026(t={}),{name:\"flip\",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:A,elements:c}=e,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:h=\"bestFit\",fallbackAxisSideDirection:d=\"none\",flipAlignment:p=!0,...m}=BS(t,e);if((n=r.arrow)!=null\u0026\u0026n.alignmentOffset)return{};const _=QP(i),f=G6(a),I=QP(a)===a,C=await(A.isRTL==null?void 0:A.isRTL(c.floating)),y=g||(I||!p?[wme(a)]:Vbi(a)),x=d!==\"none\";!g\u0026\u0026x\u0026\u0026y.push(...jbi(a,p,d,C));const E=[a,...y],B=await A.detectOverflow(e,m),S=[];let Q=((o=r.flip)==null?void 0:o.overflows)||[];if(l\u0026\u0026S.push(B[_]),u){const R=Kbi(i,s,C);S.push(B[R[0]],B[R[1]])}if(Q=[...Q,{placement:i,overflows:S}],!S.every(R=\u003eR\u003c=0)){var w,M;const R=(((w=r.flip)==null?void 0:w.index)||0)+1,F=E[R];if(F\u0026\u0026(!(u===\"alignment\"?f!==G6(F):!1)||Q.every(Y=\u003eG6(Y.placement)===f?Y.overflows[0]\u003e0:!0)))return{data:{index:R,overflows:Q},reset:{placement:F}};let O=(M=Q.filter(U=\u003eU.overflows[0]\u003c=0).sort((U,Y)=\u003eU.overflows[1]-Y.overflows[1])[0])==null?void 0:M.placement;if(!O)switch(h){case\"bestFit\":{var k;const U=(k=Q.filter(Y=\u003e{if(x){const W=G6(Y.placement);return W===f||W===\"y\"}return!0}).map(Y=\u003e[Y.placement,Y.overflows.filter(W=\u003eW\u003e0).reduce((W,te)=\u003eW+te,0)]).sort((Y,W)=\u003eY[1]-W[1])[0])==null?void 0:k[0];U\u0026\u0026(O=U);break}case\"initialPlacement\":O=a;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function Fln(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lln(t){return Ybi.some(e=\u003et[e]\u003e=0)}const nSi=function(t){return t===void 0\u0026\u0026(t={}),{name:\"hide\",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i=\"referenceHidden\",...r}=BS(t,e);switch(i){case\"referenceHidden\":{const s=await o.detectOverflow(e,{...r,elementContext:\"reference\"}),a=Fln(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Lln(a)}}}case\"escaped\":{const s=await o.detectOverflow(e,{...r,altBoundary:!0}),a=Fln(s,n.floating);return{data:{escapedOffsets:a,escaped:Lln(a)}}}default:return{}}}}},Hln=new Set([\"left\",\"top\"]);async function oSi(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=QP(n),a=pU(n),A=G6(n)===\"y\",c=Hln.has(s)?-1:1,l=r\u0026\u0026A?-1:1,u=BS(e,t);let{mainAxis:g,crossAxis:h,alignmentAxis:d}=typeof u==\"number\"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a\u0026\u0026typeof d==\"number\"\u0026\u0026(h=a===\"end\"?d*-1:d),A?{x:h*l,y:g*c}:{x:g*c,y:h*l}}const iSi=function(t){return t===void 0\u0026\u0026(t=0),{name:\"offset\",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=e,A=await oSi(e,t);return s===((n=a.offset)==null?void 0:n.placement)\u0026\u0026(o=a.arrow)!=null\u0026\u0026o.alignmentOffset?{}:{x:i+A.x,y:r+A.y,data:{...A,placement:s}}}}},rSi=function(t){return t===void 0\u0026\u0026(t={}),{name:\"shift\",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:A={fn:f=\u003e{let{x:I,y:C}=f;return{x:I,y:C}}},...c}=BS(t,e),l={x:n,y:o},u=await r.detectOverflow(e,c),g=G6(i),h=pWe(g);let d=l[h],p=l[g];const m=(f,I)=\u003eDln(I+u[f===\"y\"?\"top\":\"left\"],I,I-u[f===\"y\"?\"bottom\":\"right\"]);s\u0026\u0026(d=m(h,d)),a\u0026\u0026(p=m(g,p));const _=A.fn({...e,[h]:d,[g]:p});return{..._,data:{x:_.x-n,y:_.y-o,enabled:{[h]:s,[g]:a}}}}}},sSi=function(t){return t===void 0\u0026\u0026(t={}),{options:t,fn(e){var n,o;const{x:i,y:r,placement:s,rects:a,middlewareData:A}=e,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=BS(t,e),g={x:i,y:r},h=G6(s),d=pWe(h);let p=g[d],m=g[h];const _=BS(c,e),f=typeof _==\"number\"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(o=_.crossAxis)!=null?o:0};if(l){const y=d===\"y\"?\"height\":\"width\",x=a.reference[d]-a.floating[y]+f.mainAxis,E=a.reference[d]+a.reference[y]-f.mainAxis;p\u003cx?p=x:p\u003eE\u0026\u0026(p=E)}if(u){var I,C;const y=d===\"y\"?\"width\":\"height\",x=Hln.has(QP(s)),E=a.reference[h]-a.floating[y]+(x\u0026\u0026((I=A.offset)==null?void 0:I[h])||0)+(x?0:f.crossAxis),B=a.reference[h]+a.reference[y]+(x?0:((C=A.offset)==null?void 0:C[h])||0)-(x?f.crossAxis:0);m\u003cE?m=E:m\u003eB\u0026\u0026(m=B)}return{[d]:p,[h]:m}}}},aSi=function(t){return t===void 0\u0026\u0026(t={}),{name:\"size\",options:t,async fn(e){const{placement:n,rects:o,platform:i,elements:r}=e,{apply:s=()=\u003e{},...a}=BS(t,e),A=await i.detectOverflow(e,a),c=QP(n),l=pU(n),u=G6(n)===\"y\",{width:g,height:h}=o.floating;let d,p;c===\"top\"||c===\"bottom\"?(d=c,p=l===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?\"start\":\"end\")?\"left\":\"right\"):(p=c,d=l===\"end\"?\"top\":\"bottom\");const m=h-A.top-A.bottom,_=g-A.left-A.right,f=SP(h-A[d],m),I=SP(g-A[p],_),C=e.middlewareData.shift,y=!C;let x=f,E=I;C!=null\u0026\u0026C.enabled.x\u0026\u0026(E=_),C!=null\u0026\u0026C.enabled.y\u0026\u0026(x=m),y\u0026\u0026!l\u0026\u0026(u?E=g-2*xS(A.left,A.right):x=h-2*xS(A.top,A.bottom)),await s({...e,availableWidth:E,availableHeight:x});const B=await i.getDimensions(r.floating);return g!==B.width||h!==B.height?{reset:{rects:!0}}:{}}}};function Mme(){return typeof window\u003c\"u\"}function mU(t){return Oln(t)?(t.nodeName||\"\").toLowerCase():\"#document\"}function $x(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function bS(t){var e;return(e=(Oln(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Oln(t){return Mme()?t instanceof Node||t instanceof $x(t).Node:!1}function Y6(t){return Mme()?t instanceof Element||t instanceof $x(t).Element:!1}function vP(t){return Mme()?t instanceof HTMLElement||t instanceof $x(t).HTMLElement:!1}function Gln(t){return!Mme()||typeof ShadowRoot\u003e\"u\"?!1:t instanceof ShadowRoot||t instanceof $x(t).ShadowRoot}function Dme(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=U6(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)\u0026\u0026i!==\"inline\"\u0026\u0026i!==\"contents\"}function ASi(t){return/^(table|td|th)$/.test(mU(t))}function Nme(t){try{if(t.matches(\":popover-open\"))return!0}catch{}try{return t.matches(\":modal\")}catch{return!1}}const cSi=/transform|translate|scale|rotate|perspective|filter/,lSi=/paint|layout|strict|content/,ST=t=\u003e!!t\u0026\u0026t!==\"none\";let IWe;function CWe(t){const e=Y6(t)?U6(t):t;return ST(e.transform)||ST(e.translate)||ST(e.scale)||ST(e.rotate)||ST(e.perspective)||!yWe()\u0026\u0026(ST(e.backdropFilter)||ST(e.filter))||cSi.test(e.willChange||\"\")||lSi.test(e.contain||\"\")}function uSi(t){let e=QT(t);for(;vP(e)\u0026\u0026!fZ(e);){if(CWe(e))return e;if(Nme(e))return null;e=QT(e)}return null}function yWe(){return IWe==null\u0026\u0026(IWe=typeof CSS\u003c\"u\"\u0026\u0026CSS.supports\u0026\u0026CSS.supports(\"-webkit-backdrop-filter\",\"none\")),IWe}function fZ(t){return/^(html|body|#document)$/.test(mU(t))}function U6(t){return $x(t).getComputedStyle(t)}function Rme(t){return Y6(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function QT(t){if(mU(t)===\"html\")return t;const e=t.assignedSlot||t.parentNode||Gln(t)\u0026\u0026t.host||bS(t);return Gln(e)?e.host:e}function Yln(t){const e=QT(t);return fZ(e)?(t.ownerDocument||t).body:vP(e)\u0026\u0026Dme(e)?e:Yln(e)}function IZ(t,e,n){var o;e===void 0\u0026\u0026(e=[]),n===void 0\u0026\u0026(n=!0);const i=Yln(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=$x(i);if(r){const a=xWe(s);return e.concat(s,s.visualViewport||[],Dme(i)?i:[],a\u0026\u0026n?IZ(a):[])}else return e.concat(i,IZ(i,[],n))}function xWe(t){return t.parent\u0026\u0026Object.getPrototypeOf(t.parent)?t.frameElement:null}function Uln(t){const e=U6(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=vP(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,a=Qme(n)!==r||Qme(o)!==s;return a\u0026\u0026(n=r,o=s),{width:n,height:o,$:a}}function EWe(t){return Y6(t)?t:t.contextElement}function _U(t){const e=EWe(t);if(!vP(e))return ES(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Uln(e);let s=(r?Qme(n.width):n.width)/o,a=(r?Qme(n.height):n.height)/i;return(!s||!Number.isFinite(s))\u0026\u0026(s=1),(!a||!Number.isFinite(a))\u0026\u0026(a=1),{x:s,y:a}}const gSi=ES(0);function Kln(t){const e=$x(t);return!yWe()||!e.visualViewport?gSi:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function dSi(t,e,n){return e===void 0\u0026\u0026(e=!1),!!n\u0026\u0026e\u0026\u0026n===$x(t)}function vT(t,e,n,o){e===void 0\u0026\u0026(e=!1),n===void 0\u0026\u0026(n=!1);const i=t.getBoundingClientRect(),r=EWe(t);let s=ES(1);e\u0026\u0026(o?Y6(o)\u0026\u0026(s=_U(o)):s=_U(t));const a=dSi(r,n,o)?Kln(r):ES(0);let A=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,l=i.width/s.x,u=i.height/s.y;if(r\u0026\u0026o){const g=$x(r),h=Y6(o)?$x(o):o;let d=g,p=xWe(d);for(;p\u0026\u0026h!==d;){const m=_U(p),_=p.getBoundingClientRect(),f=U6(p),I=_.left+(p.clientLeft+parseFloat(f.paddingLeft))*m.x,C=_.top+(p.clientTop+parseFloat(f.paddingTop))*m.y;A*=m.x,c*=m.y,l*=m.x,u*=m.y,A+=I,c+=C,d=$x(p),p=xWe(d)}}return Pme({width:l,height:u,x:A,y:c})}function Tme(t,e){const n=Rme(t).scrollLeft;return e?e.left+n:vT(bS(t)).left+n}function Vln(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Tme(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function hSi(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i===\"fixed\",s=bS(o),a=e?Nme(e.floating):!1;if(o===s||a\u0026\u0026r)return n;let A={scrollLeft:0,scrollTop:0},c=ES(1);const l=ES(0),u=vP(o);if((u||!r)\u0026\u0026((mU(o)!==\"body\"||Dme(s))\u0026\u0026(A=Rme(o)),u)){const h=vT(o);c=_U(o),l.x=h.x+o.clientLeft,l.y=h.y+o.clientTop}const g=s\u0026\u0026!u\u0026\u0026!r?Vln(s,A):ES(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-A.scrollLeft*c.x+l.x+g.x,y:n.y*c.y-A.scrollTop*c.y+l.y+g.y}}function pSi(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function mSi(t){const e=Rme(t),n=t.ownerDocument.body,o=xS(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=xS(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-e.scrollLeft+Tme(t);const s=-e.scrollTop;return U6(n).direction===\"rtl\"\u0026\u0026(r+=xS(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:r,y:s}}const _Si=25;function fSi(t,e,n){n===void 0\u0026\u0026(n=\"viewport\");const o=n===\"layoutViewport\",i=$x(t),r=bS(t),s=i.visualViewport;let a=r.clientWidth,A=r.clientHeight,c=0,l=0;if(s){const g=!yWe()||e===\"fixed\";o?g||(c=-s.offsetLeft,l=-s.offsetTop):(a=s.width,A=s.height,g\u0026\u0026(c=s.offsetLeft,l=s.offsetTop))}if(Tme(r)\u003c=0){const g=r.ownerDocument,h=g.body,d=getComputedStyle(h),p=g.compatMode===\"CSS1Compat\"\u0026\u0026parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(r.clientWidth-h.clientWidth-p),_=getComputedStyle(r).scrollbarGutter===\"stable both-edges\"?m/2:m;_\u003c=_Si\u0026\u0026(a-=_)}return{width:a,height:A,x:c,y:l}}function ISi(t,e){const n=vT(t,!0,e===\"fixed\"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=_U(t),s=t.clientWidth*r.x,a=t.clientHeight*r.y,A=i*r.x,c=o*r.y;return{width:s,height:a,x:A,y:c}}function zln(t,e,n){let o;if(e===\"viewport\"||e===\"layoutViewport\")o=fSi(t,n,e);else if(e===\"document\")o=mSi(bS(t));else if(Y6(e))o=ISi(e,n);else{const i=Kln(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Pme(o)}function CSi(t,e){const n=e.get(t);if(n)return n;let o=IZ(t,[],!1).filter(a=\u003eY6(a)\u0026\u0026mU(a)!==\"body\"),i=null;const r=U6(t).position===\"fixed\";let s=r?QT(t):t;for(;Y6(s)\u0026\u0026!fZ(s);){const a=U6(s),A=CWe(s),c=i?i.position:r?\"fixed\":\"\";!A\u0026\u0026(c===\"fixed\"||c===\"absolute\"\u0026\u0026a.position===\"static\")?o=o.filter(u=\u003eu!==s):i=a,s=QT(s)}return e.set(t,o),o}function ySi(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n===\"clippingAncestors\"?Nme(e)?[]:CSi(e,this._c):[].concat(n),o],a=zln(e,s[0],i);let A=a.top,c=a.right,l=a.bottom,u=a.left;for(let g=1;g\u003cs.length;g++){const h=zln(e,s[g],i);A=xS(h.top,A),c=SP(h.right,c),l=SP(h.bottom,l),u=xS(h.left,u)}return{width:c-u,height:l-A,x:u,y:A}}function xSi(t){const{width:e,height:n}=Uln(t);return{width:e,height:n}}function ESi(t,e,n){const o=vP(e),i=bS(e),r=n===\"fixed\",s=vT(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const A=ES(0);if((o||!r)\u0026\u0026((mU(e)!==\"body\"||Dme(i))\u0026\u0026(a=Rme(e)),o)){const g=vT(e,!0,r,e);A.x=g.x+e.clientLeft,A.y=g.y+e.clientTop}!o\u0026\u0026i\u0026\u0026(A.x=Tme(i));const c=i\u0026\u0026!o\u0026\u0026!r?Vln(i,a):ES(0),l=s.left+a.scrollLeft-A.x-c.x,u=s.top+a.scrollTop-A.y-c.y;return{x:l,y:u,width:s.width,height:s.height}}function BWe(t){return U6(t).position===\"static\"}function Jln(t,e){if(!vP(t)||U6(t).position===\"fixed\")return null;if(e)return e(t);let n=t.offsetParent;return bS(t)===n\u0026\u0026(n=n.ownerDocument.body),n}function Wln(t,e){const n=$x(t);if(Nme(t))return n;if(!vP(t)){let i=QT(t);for(;i\u0026\u0026!fZ(i);){if(Y6(i)\u0026\u0026!BWe(i))return i;i=QT(i)}return n}let o=Jln(t,e);for(;o\u0026\u0026ASi(o)\u0026\u0026BWe(o);)o=Jln(o,e);return o\u0026\u0026fZ(o)\u0026\u0026BWe(o)\u0026\u0026!CWe(o)?n:o||uSi(t)||n}const BSi=async function(t){const e=this.getOffsetParent||Wln,n=this.getDimensions,o=await n(t.floating);return{reference:ESi(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function bSi(t){return U6(t).direction===\"rtl\"}const SSi={convertOffsetParentRelativeRectToViewportRelativeRect:hSi,getDocumentElement:bS,getClippingRect:ySi,getOffsetParent:Wln,getElementRects:BSi,getClientRects:pSi,getDimensions:xSi,getScale:_U,isElement:Y6,isRTL:bSi};function jln(t,e){return t.x===e.x\u0026\u0026t.y===e.y\u0026\u0026t.width===e.width\u0026\u0026t.height===e.height}function QSi(t,e,n){let o=null,i;const r=bS(t);function s(){var l;clearTimeout(i),(l=o)==null||l.disconnect(),o=null}function a(l,u){l===void 0\u0026\u0026(l=!1),u===void 0\u0026\u0026(u=1),s();const g=t.getBoundingClientRect(),{left:h,top:d,width:p,height:m}=g;if(l||e(),!p||!m)return;const _=vme(d),f=vme(r.clientWidth-(h+p)),I=vme(r.clientHeight-(d+m)),C=vme(h),x={rootMargin:-_+\"px \"+-f+\"px \"+-I+\"px \"+-C+\"px\",threshold:xS(0,SP(1,u))||1};let E=!0;function B(S){const Q=S[0].intersectionRatio;if(!jln(g,t.getBoundingClientRect()))return a();if(Q!==u){if(!E)return a();Q?a(!1,Q):i=setTimeout(()=\u003e{a(!1,1e-7)},1e3)}E=!1}try{o=new IntersectionObserver(B,{...x,root:r.ownerDocument})}catch{o=new IntersectionObserver(B,x)}o.observe(t)}const A=$x(t),c=()=\u003ea(n);return A.addEventListener(\"resize\",c),a(!0),()=\u003e{A.removeEventListener(\"resize\",c),s()}}function vSi(t,e,n,o){o===void 0\u0026\u0026(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver==\"function\",layoutShift:a=typeof IntersectionObserver==\"function\",animationFrame:A=!1}=o,c=EWe(t),l=i||r?[...c?IZ(c):[],...e?IZ(e):[]]:[];l.forEach(_=\u003e{i\u0026\u0026_.addEventListener(\"scroll\",n),r\u0026\u0026_.addEventListener(\"resize\",n)});const u=c\u0026\u0026a?QSi(c,n,r):null;let g=-1,h=null;s\u0026\u0026(h=new ResizeObserver(_=\u003e{let[f]=_;f\u0026\u0026f.target===c\u0026\u0026h\u0026\u0026e\u0026\u0026(h.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=\u003e{var I;(I=h)==null||I.observe(e)})),n()}),c\u0026\u0026!A\u0026\u0026h.observe(c),e\u0026\u0026h.observe(e));let d,p=A?vT(t):null;A\u0026\u0026m();function m(){const _=vT(t);p\u0026\u0026!jln(p,_)\u0026\u0026n(),p=_,d=requestAnimationFrame(m)}return n(),()=\u003e{var _;l.forEach(f=\u003e{i\u0026\u0026f.removeEventListener(\"scroll\",n),r\u0026\u0026f.removeEventListener(\"resize\",n)}),u?.(),(_=h)==null||_.disconnect(),h=null,A\u0026\u0026cancelAnimationFrame(d)}}const wSi=iSi,PSi=rSi,MSi=tSi,DSi=aSi,NSi=nSi,$ln=eSi,RSi=sSi,TSi=(t,e,n)=\u003e{const o=new Map,i=n??{},r={...SSi,...i.platform,_c:o};return Zbi(t,e,{...i,platform:r})};var kSi=typeof document\u003c\"u\",FSi=function(){},kme=kSi?ee.useLayoutEffect:FSi;function Fme(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t==\"function\"\u0026\u0026t.toString()===e.toString())return!0;let n,o,i;if(t\u0026\u0026e\u0026\u0026typeof t==\"object\"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Fme(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r===\"_owner\"\u0026\u0026t.$typeof)\u0026\u0026!Fme(t[r],e[r]))return!1}return!0}return t!==t\u0026\u0026e!==e}function qln(t){return typeof window\u003e\"u\"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xln(t,e){const n=qln(t);return Math.round(e*n)/n}function bWe(t){const e=ee.useRef(t);return kme(()=\u003e{e.current=t}),e}function LSi(t){t===void 0\u0026\u0026(t={});const{placement:e=\"bottom\",strategy:n=\"absolute\",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:A,open:c}=t,[l,u]=ee.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,h]=ee.useState(o);Fme(g,o)||h(o);const[d,p]=ee.useState(null),[m,_]=ee.useState(null),f=ee.useCallback(Y=\u003e{Y!==x.current\u0026\u0026(x.current=Y,p(Y))},[]),I=ee.useCallback(Y=\u003e{Y!==E.current\u0026\u0026(E.current=Y,_(Y))},[]),C=r||d,y=s||m,x=ee.useRef(null),E=ee.useRef(null),B=ee.useRef(l),S=A!=null,Q=bWe(A),w=bWe(i),M=bWe(c),k=ee.useCallback(()=\u003e{if(!x.current||!E.current)return;const Y={placement:e,strategy:n,middleware:g};w.current\u0026\u0026(Y.platform=w.current),TSi(x.current,E.current,Y).then(W=\u003e{const te={...W,isPositioned:M.current!==!1};R.current\u0026\u0026!Fme(B.current,te)\u0026\u0026(B.current=te,c6.flushSync(()=\u003e{u(te)}))})},[g,e,n,w,M]);kme(()=\u003e{c===!1\u0026\u0026B.current.isPositioned\u0026\u0026(B.current.isPositioned=!1,u(Y=\u003e({...Y,isPositioned:!1})))},[c]);const R=ee.useRef(!1);kme(()=\u003e(R.current=!0,()=\u003e{R.current=!1}),[]),kme(()=\u003e{if(C\u0026\u0026(x.current=C),y\u0026\u0026(E.current=y),C\u0026\u0026y){if(Q.current)return Q.current(C,y,k);k()}},[C,y,k,Q,S]);const F=ee.useMemo(()=\u003e({reference:x,floating:E,setReference:f,setFloating:I}),[f,I]),O=ee.useMemo(()=\u003e({reference:C,floating:y}),[C,y]),U=ee.useMemo(()=\u003e{const Y={position:n,left:0,top:0};if(!O.floating)return Y;const W=Xln(O.floating,l.x),te=Xln(O.floating,l.y);return a?{...Y,transform:\"translate(\"+W+\"px, \"+te+\"px)\",...qln(O.floating)\u003e=1.5\u0026\u0026{willChange:\"transform\"}}:{position:n,left:W,top:te}},[n,a,O.floating,l.x,l.y]);return ee.useMemo(()=\u003e({...l,update:k,refs:F,elements:O,floatingStyles:U}),[l,k,F,O,U])}const HSi=t=\u003e{function e(n){return{}.hasOwnProperty.call(n,\"current\")}return{name:\"arrow\",options:t,fn(n){const{element:o,padding:i}=typeof t==\"function\"?t(n):t;return o\u0026\u0026e(o)?o.current!=null?$ln({element:o.current,padding:i}).fn(n):{}:o?$ln({element:o,padding:i}).fn(n):{}}}},OSi=(t,e)=\u003e{const n=wSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},GSi=(t,e)=\u003e{const n=PSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},YSi=(t,e)=\u003e({fn:RSi(t).fn,options:[t,e]}),USi=(t,e)=\u003e{const n=MSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},KSi=(t,e)=\u003e{const n=DSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},VSi=(t,e)=\u003e{const n=NSi(t);return{name:n.name,fn:n.fn,options:[t,e]}},zSi=(t,e)=\u003e{const n=HSi(t);return{name:n.name,fn:n.fn,options:[t,e]}};var JSi=Object.defineProperty,WSi=(t,e)=\u003eJSi(t,\"name\",{value:e,configurable:!0});function SWe(t){const[e,n]=ee.useState(void 0);return Ep(()=\u003e{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(i=\u003e{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if(\"borderBoxSize\"in r){const A=r.borderBoxSize,c=Array.isArray(A)?A[0]:A;s=c.inlineSize,a=c.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return o.observe(t,{box:\"border-box\"}),()=\u003eo.unobserve(t)}else n(void 0)},[t]),e}WSi(SWe,\"useSize\");var jSi=Object.defineProperty,wP=(t,e)=\u003ejSi(t,\"name\",{value:e,configurable:!0}),Zln=\"Popper\",[e0n,PP]=Nx(Zln),[$Si,t0n]=e0n(Zln),qSi=wP(t=\u003e{const{__scopePopper:e,children:n}=t,[o,i]=ee.useState(null),[r,s]=ee.useState(void 0);return K.jsx($Si,{scope:e,anchor:o,onAnchorChange:i,placementState:r,setPlacementState:s,children:n})},\"Popper\"),XSi=\"PopperAnchor\",ZSi=ee.forwardRef(wP(function(e,n){const{__scopePopper:o,virtualRef:i,...r}=e,s=t0n(XSi,o),a=ee.useRef(null),A=s.onAnchorChange,c=ee.useCallback(p=\u003e{a.current=p,p\u0026\u0026A(p)},[A]),l=$A(n,c),u=ee.useRef(null);ee.useEffect(()=\u003e{if(!i)return;const p=u.current;u.current=i.current,p!==u.current\u0026\u0026A(u.current)});const g=s.placementState\u0026\u0026Lme(s.placementState),h=g?.[0],d=g?.[1];return i?null:K.jsx(Na.div,{\"data-radix-popper-side\":h,\"data-radix-popper-align\":d,...r,ref:l})},\"PopperAnchor\")),n0n=\"PopperContent\",[eQi,bmr]=e0n(n0n),tQi=ee.forwardRef(wP(function(e,n){const{__scopePopper:o,side:i=\"bottom\",sideOffset:r=0,align:s=\"center\",alignOffset:a=0,arrowPadding:A=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:g=\"partial\",hideWhenDetached:h=!1,updatePositionStrategy:d=\"optimized\",onPlaced:p,...m}=e,_=t0n(n0n,o),[f,I]=ee.useState(null),C=$A(n,I),[y,x]=ee.useState(null),E=SWe(y),B=E?.width??0,S=E?.height??0,Q=i+(s!==\"center\"?\"-\"+s:\"\"),w=typeof u==\"number\"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(l)?l:[l],k=M.length\u003e0,R={padding:w,boundary:M.filter(o0n),altBoundary:k},{refs:F,floatingStyles:O,placement:U,isPositioned:Y,middlewareData:W}=LSi({strategy:\"fixed\",placement:Q,whileElementsMounted:wP((...ue)=\u003evSi(...ue,{animationFrame:d===\"always\"}),\"whileElementsMounted\"),elements:{reference:_.anchor},middleware:[OSi({mainAxis:r+S,alignmentAxis:a}),c\u0026\u0026GSi({mainAxis:!0,crossAxis:!1,limiter:g===\"partial\"?YSi():void 0,...R}),c\u0026\u0026USi({...R}),KSi({...R,apply:wP(({elements:ue,rects:fe,availableWidth:pe,availableHeight:ye})=\u003e{const{width:Me,height:ve}=fe.reference,he=ue.floating.style;he.setProperty(\"--radix-popper-available-width\",`${pe}px`),he.setProperty(\"--radix-popper-available-height\",`${ye}px`),he.setProperty(\"--radix-popper-anchor-width\",`${Me}px`),he.setProperty(\"--radix-popper-anchor-height\",`${ve}px`)},\"apply\")}),y\u0026\u0026zSi({element:y,padding:A}),nQi({arrowWidth:B,arrowHeight:S}),h\u0026\u0026VSi({strategy:\"referenceHidden\",...R,boundary:k?R.boundary:void 0})]}),te=_.setPlacementState;Ep(()=\u003e(te(U),()=\u003e{te(void 0)}),[U,te]);const[j,J]=Lme(U),oe=lE(p);Ep(()=\u003e{Y\u0026\u0026oe?.()},[Y,oe]);const ie=W.arrow?.x,ne=W.arrow?.y,le=W.arrow?.centerOffset!==0,[ge,_e]=ee.useState();return Ep(()=\u003e{f\u0026\u0026_e(window.getComputedStyle(f).zIndex)},[f]),K.jsx(\"div\",{ref:F.setFloating,\"data-radix-popper-content-wrapper\":\"\",style:{...O,transform:Y?O.transform:\"translate(0, -200%)\",minWidth:\"max-content\",zIndex:ge,\"--radix-popper-transform-origin\":[W.transformOrigin?.x,W.transformOrigin?.y].join(\" \"),...W.hide?.referenceHidden\u0026\u0026{visibility:\"hidden\",pointerEvents:\"none\"}},dir:e.dir,children:K.jsx(eQi,{scope:o,placedSide:j,placedAlign:J,onArrowChange:x,arrowX:ie,arrowY:ne,shouldHideArrow:le,children:K.jsx(Na.div,{\"data-side\":j,\"data-align\":J,...m,ref:C,style:{...m.style,animation:Y?m.style?.animation:\"none\"}})})})},\"PopperContent\"));function o0n(t){return t!==null}wP(o0n,\"isNotNull\");var nQi=wP(t=\u003e({name:\"transformOrigin\",options:t,fn(e){const{placement:n,rects:o,middlewareData:i}=e,s=i.arrow?.centerOffset!==0,a=s?0:t.arrowWidth,A=s?0:t.arrowHeight,[c,l]=Lme(n),u={start:\"0%\",center:\"50%\",end:\"100%\"}[l],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+A/2;let d=\"\",p=\"\";return c===\"bottom\"?(d=s?u:`${g}px`,p=`${-A}px`):c===\"top\"?(d=s?u:`${g}px`,p=`${o.floating.height+A}px`):c===\"right\"?(d=`${-A}px`,p=s?u:`${h}px`):c===\"left\"\u0026\u0026(d=`${o.floating.width+A}px`,p=s?u:`${h}px`),{data:{x:d,y:p}}}}),\"transformOrigin\");function Lme(t){const[e,n=\"center\"]=t.split(\"-\");return[e,n]}wP(Lme,\"getSideAndAlignFromPlacement\");var CZ=qSi,Hme=ZSi,Ome=tQi,oQi=Object.defineProperty,iQi=(t,e)=\u003eoQi(t,\"name\",{value:e,configurable:!0}),Gme=ee.forwardRef(iQi(function(e,n){const{container:o,...i}=e,[r,s]=ee.useState(!1);Ep(()=\u003es(!0),[]);const a=o||r\u0026\u0026globalThis?.document?.body;return a?c6.createPortal(K.jsx(Na.div,{...i,ref:n}),a):null},\"Portal\")),rQi=function(t){if(typeof document\u003e\"u\")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},fU=new WeakMap,Yme=new WeakMap,Ume={},QWe=0,i0n=function(t){return t\u0026\u0026(t.host||i0n(t.parentNode))},sQi=function(t,e){return e.map(function(n){if(t.contains(n))return n;var o=i0n(n);return o\u0026\u0026t.contains(o)?o:(console.error(\"aria-hidden\",n,\"in not contained inside\",t,\". Doing nothing\"),null)}).filter(function(n){return!!n})},aQi=function(t,e,n,o){var i=sQi(e,Array.isArray(t)?t:[t]);Ume[n]||(Ume[n]=new WeakMap);var r=Ume[n],s=[],a=new Set,A=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var l=function(u){!u||A.has(u)||Array.prototype.forEach.call(u.children,function(g){if(a.has(g))l(g);else try{var h=g.getAttribute(o),d=h!==null\u0026\u0026h!==\"false\",p=(fU.get(g)||0)+1,m=(r.get(g)||0)+1;fU.set(g,p),r.set(g,m),s.push(g),p===1\u0026\u0026d\u0026\u0026Yme.set(g,!0),m===1\u0026\u0026g.setAttribute(n,\"true\"),d||g.setAttribute(o,\"true\")}catch(_){console.error(\"aria-hidden: cannot operate on \",g,_)}})};return l(e),a.clear(),QWe++,function(){s.forEach(function(u){var g=fU.get(u)-1,h=r.get(u)-1;fU.set(u,g),r.set(u,h),g||(Yme.has(u)||u.removeAttribute(o),Yme.delete(u)),h||u.removeAttribute(n)}),QWe--,QWe||(fU=new WeakMap,fU=new WeakMap,Yme=new WeakMap,Ume={})}},Kme=function(t,e,n){n===void 0\u0026\u0026(n=\"data-aria-hidden\");var o=Array.from(Array.isArray(t)?t:[t]),i=rQi(t);return i?(o.push.apply(o,Array.from(i.querySelectorAll(\"[aria-live], script\"))),aQi(o,i,n,\"aria-hidden\")):function(){return null}},K6=function(){return K6=Object.assign||function(e){for(var n,o=1,i=arguments.length;o\u003ci;o++){n=arguments[o];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)\u0026\u0026(e[r]=n[r])}return e},K6.apply(this,arguments)};function r0n(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)\u0026\u0026e.indexOf(o)\u003c0\u0026\u0026(n[o]=t[o]);if(t!=null\u0026\u0026typeof Object.getOwnPropertySymbols==\"function\")for(var i=0,o=Object.getOwnPropertySymbols(t);i\u003co.length;i++)e.indexOf(o[i])\u003c0\u0026\u0026Object.prototype.propertyIsEnumerable.call(t,o[i])\u0026\u0026(n[o[i]]=t[o[i]]);return n}function AQi(t,e,n){if(n||arguments.length===2)for(var o=0,i=e.length,r;o\u003ci;o++)(r||!(o in e))\u0026\u0026(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}typeof SuppressedError==\"function\"\u0026\u0026SuppressedError;var Vme=\"right-scroll-bar-position\",zme=\"width-before-scroll-bar\",cQi=\"with-scroll-bars-hidden\",lQi=\"--removed-body-scroll-bar-size\";function vWe(t,e){return typeof t==\"function\"?t(e):t\u0026\u0026(t.current=e),t}function uQi(t,e){var n=ee.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o\u0026\u0026(n.value=o,n.callback(o,i))}}}})[0];return n.callback=e,n.facade}var gQi=typeof window\u003c\"u\"?ee.useLayoutEffect:ee.useEffect,s0n=new WeakMap;function dQi(t,e){var n=uQi(null,function(o){return t.forEach(function(i){return vWe(i,o)})});return gQi(function(){var o=s0n.get(n);if(o){var i=new Set(o),r=new Set(t),s=n.current;i.forEach(function(a){r.has(a)||vWe(a,null)}),r.forEach(function(a){i.has(a)||vWe(a,s)})}s0n.set(n,t)},[t]),n}function hQi(t){return t}function pQi(t,e){e===void 0\u0026\u0026(e=hQi);var n=[],o=!1,i={read:function(){if(o)throw new Error(\"Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.\");return n.length?n[n.length-1]:t},useMedium:function(r){var s=e(r,o);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(r){for(o=!0;n.length;){var s=n;n=[],s.forEach(r)}n={push:function(a){return r(a)},filter:function(){return n}}},assignMedium:function(r){o=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(r),s=n}var A=function(){var l=s;s=[],l.forEach(r)},c=function(){return Promise.resolve().then(A)};c(),n={push:function(l){s.push(l),c()},filter:function(l){return s=s.filter(l),n}}}};return i}function mQi(t){t===void 0\u0026\u0026(t={});var e=pQi(null);return e.options=K6({async:!0,ssr:!1},t),e}var a0n=function(t){var e=t.sideCar,n=r0n(t,[\"sideCar\"]);if(!e)throw new Error(\"Sidecar: please provide `sideCar` property to import the right car\");var o=e.read();if(!o)throw new Error(\"Sidecar medium not found\");return ee.createElement(o,K6({},n))};a0n.isSideCarExport=!0;function _Qi(t,e){return t.useMedium(e),a0n}var A0n=mQi(),wWe=function(){},Jme=ee.forwardRef(function(t,e){var n=ee.useRef(null),o=ee.useState({onScrollCapture:wWe,onWheelCapture:wWe,onTouchMoveCapture:wWe}),i=o[0],r=o[1],s=t.forwardProps,a=t.children,A=t.className,c=t.removeScrollBar,l=t.enabled,u=t.shards,g=t.sideCar,h=t.noRelative,d=t.noIsolation,p=t.inert,m=t.allowPinchZoom,_=t.as,f=_===void 0?\"div\":_,I=t.gapMode,C=r0n(t,[\"forwardProps\",\"children\",\"className\",\"removeScrollBar\",\"enabled\",\"shards\",\"sideCar\",\"noRelative\",\"noIsolation\",\"inert\",\"allowPinchZoom\",\"as\",\"gapMode\"]),y=g,x=dQi([n,e]),E=K6(K6({},C),i);return ee.createElement(ee.Fragment,null,l\u0026\u0026ee.createElement(y,{sideCar:A0n,removeScrollBar:c,shards:u,noRelative:h,noIsolation:d,inert:p,setCallbacks:r,allowPinchZoom:!!m,lockRef:n,gapMode:I}),s?ee.cloneElement(ee.Children.only(a),K6(K6({},E),{ref:x})):ee.createElement(f,K6({},E,{className:A,ref:x}),a))});Jme.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jme.classNames={fullWidth:zme,zeroRight:Vme};var fQi=function(){if(typeof __webpack_nonce__\u003c\"u\")return __webpack_nonce__};function IQi(){if(!document)return null;var t=document.createElement(\"style\");t.type=\"text/css\";var e=fQi();return e\u0026\u0026t.setAttribute(\"nonce\",e),t}function CQi(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function yQi(t){var e=document.head||document.getElementsByTagName(\"head\")[0];e.appendChild(t)}var xQi=function(){var t=0,e=null;return{add:function(n){t==0\u0026\u0026(e=IQi())\u0026\u0026(CQi(e,n),yQi(e)),t++},remove:function(){t--,!t\u0026\u0026e\u0026\u0026(e.parentNode\u0026\u0026e.parentNode.removeChild(e),e=null)}}},EQi=function(){var t=xQi();return function(e,n){ee.useEffect(function(){return t.add(e),function(){t.remove()}},[e\u0026\u0026n])}},c0n=function(){var t=EQi(),e=function(n){var o=n.styles,i=n.dynamic;return t(o,i),null};return e},BQi={left:0,top:0,right:0,gap:0},PWe=function(t){return parseInt(t||\"\",10)||0},bQi=function(t){var e=window.getComputedStyle(document.body),n=e[t===\"padding\"?\"paddingLeft\":\"marginLeft\"],o=e[t===\"padding\"?\"paddingTop\":\"marginTop\"],i=e[t===\"padding\"?\"paddingRight\":\"marginRight\"];return[PWe(n),PWe(o),PWe(i)]},SQi=function(t){if(t===void 0\u0026\u0026(t=\"margin\"),typeof window\u003e\"u\")return BQi;var e=bQi(t),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-n+e[2]-e[0])}},QQi=c0n(),IU=\"data-scroll-locked\",vQi=function(t,e,n,o){var i=t.left,r=t.top,s=t.right,a=t.gap;return n===void 0\u0026\u0026(n=\"margin\"),`\n .`.concat(cQi,` {\n overflow: hidden `).concat(o,`;\n padding-right: `).concat(a,\"px \").concat(o,`;\n }\n body[`).concat(IU,`] {\n overflow: hidden `).concat(o,`;\n overscroll-behavior: contain;\n `).concat([e\u0026\u0026\"position: relative \".concat(o,\";\"),n===\"margin\"\u0026\u0026`\n padding-left: `.concat(i,`px;\n padding-top: `).concat(r,`px;\n padding-right: `).concat(s,`px;\n margin-left:0;\n margin-top:0;\n margin-right: `).concat(a,\"px \").concat(o,`;\n `),n===\"padding\"\u0026\u0026\"padding-right: \".concat(a,\"px \").concat(o,\";\")].filter(Boolean).join(\"\"),`\n }\n \n .`).concat(Vme,` {\n right: `).concat(a,\"px \").concat(o,`;\n }\n \n .`).concat(zme,` {\n margin-right: `).concat(a,\"px \").concat(o,`;\n }\n \n .`).concat(Vme,\" .\").concat(Vme,` {\n right: 0 `).concat(o,`;\n }\n \n .`).concat(zme,\" .\").concat(zme,` {\n margin-right: 0 `).concat(o,`;\n }\n \n body[`).concat(IU,`] {\n `).concat(lQi,\": \").concat(a,`px;\n }\n`)},l0n=function(){var t=parseInt(document.body.getAttribute(IU)||\"0\",10);return isFinite(t)?t:0},wQi=function(){ee.useEffect(function(){return document.body.setAttribute(IU,(l0n()+1).toString()),function(){var t=l0n()-1;t\u003c=0?document.body.removeAttribute(IU):document.body.setAttribute(IU,t.toString())}},[])},PQi=function(t){var e=t.noRelative,n=t.noImportant,o=t.gapMode,i=o===void 0?\"margin\":o;wQi();var r=ee.useMemo(function(){return SQi(i)},[i]);return ee.createElement(QQi,{styles:vQi(r,!e,i,n?\"\":\"!important\")})},MWe=!1;if(typeof window\u003c\"u\")try{var Wme=Object.defineProperty({},\"passive\",{get:function(){return MWe=!0,!0}});window.addEventListener(\"test\",Wme,Wme),window.removeEventListener(\"test\",Wme,Wme)}catch{MWe=!1}var CU=MWe?{passive:!1}:!1,MQi=function(t){return t.tagName===\"TEXTAREA\"},u0n=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!==\"hidden\"\u0026\u0026!(n.overflowY===n.overflowX\u0026\u0026!MQi(t)\u0026\u0026n[e]===\"visible\")},DQi=function(t){return u0n(t,\"overflowY\")},NQi=function(t){return u0n(t,\"overflowX\")},g0n=function(t,e){var n=e.ownerDocument,o=e;do{typeof ShadowRoot\u003c\"u\"\u0026\u0026o instanceof ShadowRoot\u0026\u0026(o=o.host);var i=d0n(t,o);if(i){var r=h0n(t,o),s=r[1],a=r[2];if(s\u003ea)return!0}o=o.parentNode}while(o\u0026\u0026o!==n.body);return!1},RQi=function(t){var e=t.scrollTop,n=t.scrollHeight,o=t.clientHeight;return[e,n,o]},TQi=function(t){var e=t.scrollLeft,n=t.scrollWidth,o=t.clientWidth;return[e,n,o]},d0n=function(t,e){return t===\"v\"?DQi(e):NQi(e)},h0n=function(t,e){return t===\"v\"?RQi(e):TQi(e)},kQi=function(t,e){return t===\"h\"\u0026\u0026e===\"rtl\"?-1:1},FQi=function(t,e,n,o,i){var r=kQi(t,window.getComputedStyle(e).direction),s=r*o,a=n.target,A=e.contains(a),c=!1,l=s\u003e0,u=0,g=0;do{if(!a)break;var h=h0n(t,a),d=h[0],p=h[1],m=h[2],_=p-m-r*d;(d||_)\u0026\u0026d0n(t,a)\u0026\u0026(u+=_,g+=d);var f=a.parentNode;a=f\u0026\u0026f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!A\u0026\u0026a!==document.body||A\u0026\u0026(e.contains(a)||e===a));return(l\u0026\u0026Math.abs(u)\u003c1||!l\u0026\u0026Math.abs(g)\u003c1)\u0026\u0026(c=!0),c},jme=function(t){return\"changedTouches\"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},p0n=function(t){return[t.deltaX,t.deltaY]},m0n=function(t){return t\u0026\u0026\"current\"in t?t.current:t},LQi=function(t,e){return t[0]===e[0]\u0026\u0026t[1]===e[1]},HQi=function(t){return`\n .block-interactivity-`.concat(t,` {pointer-events: none;}\n .allow-interactivity-`).concat(t,` {pointer-events: all;}\n`)},OQi=0,yU=[];function GQi(t){var e=ee.useRef([]),n=ee.useRef([0,0]),o=ee.useRef(),i=ee.useState(OQi++)[0],r=ee.useState(c0n)[0],s=ee.useRef(t);ee.useEffect(function(){s.current=t},[t]),ee.useEffect(function(){if(t.inert){document.body.classList.add(\"block-interactivity-\".concat(i));var p=AQi([t.lockRef.current],(t.shards||[]).map(m0n),!0).filter(Boolean);return p.forEach(function(m){return m.classList.add(\"allow-interactivity-\".concat(i))}),function(){document.body.classList.remove(\"block-interactivity-\".concat(i)),p.forEach(function(m){return m.classList.remove(\"allow-interactivity-\".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=ee.useCallback(function(p,m){if(\"touches\"in p\u0026\u0026p.touches.length===2||p.type===\"wheel\"\u0026\u0026p.ctrlKey)return!s.current.allowPinchZoom;var _=jme(p),f=n.current,I=\"deltaX\"in p?p.deltaX:f[0]-_[0],C=\"deltaY\"in p?p.deltaY:f[1]-_[1],y,x=p.target,E=Math.abs(I)\u003eMath.abs(C)?\"h\":\"v\";if(\"touches\"in p\u0026\u0026E===\"h\"\u0026\u0026x.type===\"range\")return!1;var B=window.getSelection(),S=B\u0026\u0026B.anchorNode,Q=S?S===x||S.contains(x):!1;if(Q)return!1;var w=g0n(E,x);if(!w)return!0;if(w?y=E:(y=E===\"v\"?\"h\":\"v\",w=g0n(E,x)),!w)return!1;if(!o.current\u0026\u0026\"changedTouches\"in p\u0026\u0026(I||C)\u0026\u0026(o.current=y),!y)return!0;var M=o.current||y;return FQi(M,m,p,M===\"h\"?I:C)},[]),A=ee.useCallback(function(p){var m=p;if(!(!yU.length||yU[yU.length-1]!==r)){var _=\"deltaY\"in m?p0n(m):jme(m),f=e.current.filter(function(y){return y.name===m.type\u0026\u0026(y.target===m.target||m.target===y.shadowParent)\u0026\u0026LQi(y.delta,_)})[0];if(f\u0026\u0026f.should){m.cancelable\u0026\u0026m.preventDefault();return}if(!f){var I=(s.current.shards||[]).map(m0n).filter(Boolean).filter(function(y){return y.contains(m.target)}),C=I.length\u003e0?a(m,I[0]):!s.current.noIsolation;C\u0026\u0026m.cancelable\u0026\u0026m.preventDefault()}}},[]),c=ee.useCallback(function(p,m,_,f){var I={name:p,delta:m,target:_,should:f,shadowParent:YQi(_)};e.current.push(I),setTimeout(function(){e.current=e.current.filter(function(C){return C!==I})},1)},[]),l=ee.useCallback(function(p){n.current=jme(p),o.current=void 0},[]),u=ee.useCallback(function(p){c(p.type,p0n(p),p.target,a(p,t.lockRef.current))},[]),g=ee.useCallback(function(p){c(p.type,jme(p),p.target,a(p,t.lockRef.current))},[]);ee.useEffect(function(){return yU.push(r),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:g}),document.addEventListener(\"wheel\",A,CU),document.addEventListener(\"touchmove\",A,CU),document.addEventListener(\"touchstart\",l,CU),function(){yU=yU.filter(function(p){return p!==r}),document.removeEventListener(\"wheel\",A,CU),document.removeEventListener(\"touchmove\",A,CU),document.removeEventListener(\"touchstart\",l,CU)}},[]);var h=t.removeScrollBar,d=t.inert;return ee.createElement(ee.Fragment,null,d?ee.createElement(r,{styles:HQi(i)}):null,h?ee.createElement(PQi,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function YQi(t){for(var e=null;t!==null;)t instanceof ShadowRoot\u0026\u0026(e=t.host,t=t.host),t=t.parentNode;return e}const UQi=_Qi(A0n,GQi);var yZ=ee.forwardRef(function(t,e){return ee.createElement(Jme,K6({},t,{ref:e,sideCar:UQi}))});yZ.classNames=Jme.classNames;var KQi=Object.defineProperty,Hl=(t,e)=\u003eKQi(t,\"name\",{value:e,configurable:!0}),DWe=[\"Enter\",\" \"],VQi=[\"ArrowDown\",\"PageUp\",\"Home\"],_0n=[\"ArrowUp\",\"PageDown\",\"End\"],zQi=[...VQi,..._0n],JQi={ltr:[...DWe,\"ArrowRight\"],rtl:[...DWe,\"ArrowLeft\"]},WQi={ltr:[\"ArrowLeft\"],rtl:[\"ArrowRight\"]},$me=\"Menu\",[xZ,jQi,$Qi]=tge($me),[wT,f0n]=Nx($me,[$Qi,PP,ige]),qme=PP(),I0n=ige(),[C0n,MP]=wT($me),[qQi,EZ]=wT($me),XQi=Hl(t=\u003e{const{__scopeMenu:e,open:n=!1,children:o,dir:i,onOpenChange:r,modal:s=!0}=t,a=qme(e),[A,c]=ee.useState(null),l=ee.useRef(!1),u=lE(r),g=Q$(i);return ee.useEffect(()=\u003e{const h=Hl(()=\u003e{l.current=!0,document.addEventListener(\"pointerdown\",d,{capture:!0,once:!0}),document.addEventListener(\"pointermove\",d,{capture:!0,once:!0})},\"handleKeyDown\"),d=Hl(()=\u003el.current=!1,\"handlePointer\");return document.addEventListener(\"keydown\",h,{capture:!0}),()=\u003e{document.removeEventListener(\"keydown\",h,{capture:!0}),document.removeEventListener(\"pointerdown\",d,{capture:!0}),document.removeEventListener(\"pointermove\",d,{capture:!0})}},[]),ee.useEffect(()=\u003e{if(!n)return;const h=Hl(()=\u003eu(!1),\"handleBlur\");return window.addEventListener(\"blur\",h),()=\u003ewindow.removeEventListener(\"blur\",h)},[n,u]),K.jsx(CZ,{...a,children:K.jsx(C0n,{scope:e,open:n,onOpenChange:u,content:A,onContentChange:c,children:K.jsx(qQi,{scope:e,onClose:ee.useCallback(()=\u003eu(!1),[u]),isUsingKeyboardRef:l,dir:g,modal:s,children:o})})})},\"Menu\"),y0n=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,...i}=e,r=qme(o);return K.jsx(Hme,{...r,...i,ref:n})},\"MenuAnchor\")),x0n=\"MenuPortal\",[ZQi,E0n]=wT(x0n,{forceMount:void 0}),evi=Hl(t=\u003e{const{__scopeMenu:e,forceMount:n,children:o,container:i}=t,r=MP(x0n,e);return K.jsx(ZQi,{scope:e,forceMount:n,children:K.jsx(uE,{present:n||r.open,children:K.jsx(Gme,{asChild:!0,container:i,children:o})})})},\"MenuPortal\"),t9=\"MenuContent\",[tvi,NWe]=wT(t9),nvi=ee.forwardRef(Hl(function(e,n){const o=E0n(t9,e.__scopeMenu),{forceMount:i=o.forceMount,...r}=e,s=MP(t9,e.__scopeMenu),a=EZ(t9,e.__scopeMenu);return K.jsx(xZ.Provider,{scope:e.__scopeMenu,children:K.jsx(uE,{present:i||s.open,children:K.jsx(xZ.Slot,{scope:e.__scopeMenu,children:a.modal?K.jsx(ovi,{...r,ref:n}):K.jsx(ivi,{...r,ref:n})})})})},\"MenuContent\")),ovi=ee.forwardRef(Hl(function(e,n){const o=MP(t9,e.__scopeMenu),i=ee.useRef(null),r=$A(n,i);return ee.useEffect(()=\u003e{const s=i.current;if(s)return Kme(s)},[]),K.jsx(RWe,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:ar(e.onFocusOutside,s=\u003es.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=\u003eo.onOpenChange(!1)})},\"MenuRootContentModal\")),ivi=ee.forwardRef(Hl(function(e,n){const o=MP(t9,e.__scopeMenu);return K.jsx(RWe,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=\u003eo.onOpenChange(!1)})},\"MenuRootContentNonModal\")),rvi=MB(\"MenuContent.ScrollLock\"),RWe=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,loop:i=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:A,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,disableOutsideScroll:p,...m}=e,_=MP(t9,o),f=EZ(t9,o),I=qme(o),C=I0n(o),y=jQi(o),[x,E]=ee.useState(null),B=ee.useRef(null),S=$A(n,B,_.onContentChange),Q=ee.useRef(0),w=ee.useRef(\"\"),M=ee.useRef(0),k=ee.useRef(null),R=ee.useRef(\"right\"),F=ee.useRef(0),O=p?yZ:ee.Fragment,U=p?{as:rvi,allowPinchZoom:!0}:void 0,Y=Hl(te=\u003e{const j=w.current+te,J=y().filter(_e=\u003e!_e.disabled),oe=document.activeElement,ie=J.find(_e=\u003e_e.ref.current===oe)?.textValue,ne=J.map(_e=\u003e_e.textValue),le=D0n(ne,j,ie),ge=J.find(_e=\u003e_e.textValue===le)?.ref.current;Hl((function _e(ue){w.current=ue,window.clearTimeout(Q.current),ue!==\"\"\u0026\u0026(Q.current=window.setTimeout(()=\u003e_e(\"\"),1e3))}),\"updateSearch\")(j),ge\u0026\u0026setTimeout(()=\u003ege.focus())},\"handleTypeaheadSearch\");ee.useEffect(()=\u003e()=\u003ewindow.clearTimeout(Q.current),[]),hU();const W=ee.useCallback(te=\u003eR.current===k.current?.side\u0026\u0026R0n(te,k.current?.area),[]);return K.jsx(tvi,{scope:o,searchRef:w,onItemEnter:ee.useCallback(te=\u003e{W(te)\u0026\u0026te.preventDefault()},[W]),onItemLeave:ee.useCallback(te=\u003e{W(te)||(B.current?.focus(),E(null))},[W]),onTriggerLeave:ee.useCallback(te=\u003e{W(te)\u0026\u0026te.preventDefault()},[W]),pointerGraceTimerRef:M,onPointerGraceIntentChange:ee.useCallback(te=\u003e{k.current=te},[]),children:K.jsx(O,{...U,children:K.jsx(Sme,{asChild:!0,trapped:r,onMountAutoFocus:ar(s,te=\u003e{te.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:A,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g,onInteractOutside:h,onDismiss:d,children:K.jsx(WFt,{asChild:!0,...C,dir:f.dir,orientation:\"vertical\",loop:i,currentTabStopId:x,onCurrentTabStopIdChange:E,onEntryFocus:ar(c,te=\u003e{f.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:K.jsx(Ome,{role:\"menu\",\"aria-orientation\":\"vertical\",\"data-state\":FWe(_.open),\"data-radix-menu-content\":\"\",dir:f.dir,...I,...m,ref:S,style:{outline:\"none\",...m.style},onKeyDown:ar(m.onKeyDown,te=\u003e{const J=te.target.closest(\"[data-radix-menu-content]\")===te.currentTarget,oe=te.ctrlKey||te.altKey||te.metaKey,ie=te.key.length===1;J\u0026\u0026(te.key===\"Tab\"\u0026\u0026te.preventDefault(),!oe\u0026\u0026ie\u0026\u0026Y(te.key));const ne=B.current;if(te.target!==ne||!zQi.includes(te.key))return;te.preventDefault();const ge=y().filter(_e=\u003e!_e.disabled).map(_e=\u003e_e.ref.current);_0n.includes(te.key)\u0026\u0026ge.reverse(),P0n(ge)}),onBlur:ar(e.onBlur,te=\u003e{te.currentTarget.contains(te.target)||(window.clearTimeout(Q.current),w.current=\"\")}),onPointerMove:ar(e.onPointerMove,xU(te=\u003e{const j=te.target,J=F.current!==te.clientX;if(te.currentTarget.contains(j)\u0026\u0026J){const oe=te.clientX\u003eF.current?\"right\":\"left\";R.current=oe,F.current=te.clientX}}))})})})})})})},\"MenuContentImpl\")),svi=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,...i}=e;return K.jsx(Na.div,{...i,ref:n})},\"MenuLabel\")),TWe=\"MenuItem\",B0n=\"menu.itemSelect\",kWe=ee.forwardRef(Hl(function(e,n){const{disabled:o=!1,onSelect:i,...r}=e,s=ee.useRef(null),a=EZ(TWe,e.__scopeMenu),A=NWe(TWe,e.__scopeMenu),c=$A(n,s),l=ee.useRef(!1),u=Hl(()=\u003e{const g=s.current;if(!o\u0026\u0026g){const h=new CustomEvent(B0n,{bubbles:!0,cancelable:!0});g.addEventListener(B0n,d=\u003ei?.(d),{once:!0}),hDe(g,h),h.defaultPrevented?l.current=!1:a.onClose()}},\"handleSelect\");return K.jsx(b0n,{...r,ref:c,disabled:o,onClick:ar(e.onClick,u),onPointerDown:g=\u003e{e.onPointerDown?.(g),l.current=!0},onPointerUp:ar(e.onPointerUp,g=\u003e{l.current||g.currentTarget?.click()}),onKeyDown:ar(e.onKeyDown,g=\u003e{o||g.target!==g.currentTarget||A.searchRef.current!==\"\"\u0026\u0026g.key===\" \"||DWe.includes(g.key)\u0026\u0026(g.currentTarget.click(),g.preventDefault())})})},\"MenuItem\")),b0n=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,disabled:i=!1,textValue:r,...s}=e,a=NWe(TWe,o),A=I0n(o),c=ee.useRef(null),l=$A(n,c),[u,g]=ee.useState(!1),[h,d]=ee.useState(\"\");return ee.useEffect(()=\u003e{const p=c.current;p\u0026\u0026d((p.textContent??\"\").trim())},[s.children]),K.jsx(xZ.ItemSlot,{scope:o,disabled:i,textValue:r??h,children:K.jsx(jFt,{asChild:!0,...A,focusable:!i,children:K.jsx(Na.div,{role:\"menuitem\",\"data-highlighted\":u?\"\":void 0,\"aria-disabled\":i||void 0,\"data-disabled\":i?\"\":void 0,...s,ref:l,onPointerMove:ar(e.onPointerMove,xU(p=\u003e{i?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ar(e.onPointerLeave,xU(p=\u003ea.onItemLeave(p))),onFocus:ar(e.onFocus,()=\u003eg(!0)),onBlur:ar(e.onBlur,()=\u003eg(!1))})})})},\"MenuItemImpl\")),avi=ee.forwardRef(Hl(function(e,n){const{checked:o=!1,onCheckedChange:i,...r}=e;return K.jsx(Q0n,{scope:e.__scopeMenu,checked:o,children:K.jsx(kWe,{role:\"menuitemcheckbox\",\"aria-checked\":BZ(o)?\"mixed\":o,...r,ref:n,\"data-state\":Zme(o),onSelect:ar(r.onSelect,()=\u003ei?.(BZ(o)?!0:!o),{checkForDefaultPrevented:!1})})})},\"MenuCheckboxItem\")),Avi=\"MenuRadioGroup\",[Smr,cvi]=wT(Avi,{value:void 0,onValueChange:Hl(()=\u003e{},\"onValueChange\")}),lvi=\"MenuRadioItem\",uvi=ee.forwardRef(Hl(function(e,n){const{value:o,...i}=e,r=cvi(lvi,e.__scopeMenu),s=o===r.value;return K.jsx(Q0n,{scope:e.__scopeMenu,checked:s,children:K.jsx(kWe,{role:\"menuitemradio\",\"aria-checked\":s,...i,ref:n,\"data-state\":Zme(s),onSelect:ar(i.onSelect,()=\u003er.onValueChange?.(o),{checkForDefaultPrevented:!1})})})},\"MenuRadioItem\")),S0n=\"MenuItemIndicator\",[Q0n,gvi]=wT(S0n,{checked:!1}),dvi=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,forceMount:i,...r}=e,s=gvi(S0n,o);return K.jsx(uE,{present:i||BZ(s.checked)||s.checked===!0,children:K.jsx(Na.span,{...r,ref:n,\"data-state\":Zme(s.checked)})})},\"MenuItemIndicator\")),hvi=ee.forwardRef(Hl(function(e,n){const{__scopeMenu:o,...i}=e;return K.jsx(Na.div,{role:\"separator\",\"aria-orientation\":\"horizontal\",...i,ref:n})},\"MenuSeparator\")),v0n=\"MenuSub\",[pvi,w0n]=wT(v0n),mvi=Hl(t=\u003e{const{__scopeMenu:e,children:n,open:o=!1,onOpenChange:i}=t,r=MP(v0n,e),s=qme(e),[a,A]=ee.useState(null),[c,l]=ee.useState(null),u=lE(i);return ee.useEffect(()=\u003e(r.open===!1\u0026\u0026u(!1),()=\u003eu(!1)),[r.open,u]),K.jsx(CZ,{...s,children:K.jsx(C0n,{scope:e,open:o,onOpenChange:u,content:c,onContentChange:l,children:K.jsx(pvi,{scope:e,contentId:t_(),triggerId:t_(),trigger:a,onTriggerChange:A,children:n})})})},\"MenuSub\"),Xme=\"MenuSubTrigger\",_vi=ee.forwardRef(Hl(function(e,n){const o=MP(Xme,e.__scopeMenu),i=EZ(Xme,e.__scopeMenu),r=w0n(Xme,e.__scopeMenu),s=NWe(Xme,e.__scopeMenu),a=ee.useRef(null),{pointerGraceTimerRef:A,onPointerGraceIntentChange:c}=s,l={__scopeMenu:e.__scopeMenu},u=ee.useCallback(()=\u003e{a.current\u0026\u0026window.clearTimeout(a.current),a.current=null},[]);ee.useEffect(()=\u003eu,[u]),ee.useEffect(()=\u003e{const h=A.current;return()=\u003e{window.clearTimeout(h),c(null)}},[A,c]);const g=$A(n,r.onTriggerChange);return K.jsx(y0n,{asChild:!0,...l,children:K.jsx(b0n,{id:r.triggerId,\"aria-haspopup\":\"menu\",\"aria-expanded\":o.open,\"aria-controls\":o.open?r.contentId:void 0,\"data-state\":FWe(o.open),...e,ref:g,onClick:h=\u003e{e.onClick?.(h),!(e.disabled||h.defaultPrevented)\u0026\u0026(h.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:ar(e.onPointerMove,xU(h=\u003e{s.onItemEnter(h),!h.defaultPrevented\u0026\u0026!e.disabled\u0026\u0026!o.open\u0026\u0026!a.current\u0026\u0026(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=\u003e{o.onOpenChange(!0),u()},100))})),onPointerLeave:ar(e.onPointerLeave,xU(h=\u003e{u();const d=o.content?.getBoundingClientRect();if(d){const p=o.content?.dataset.side,m=p===\"right\",_=m?-5:5,f=d[m?\"left\":\"right\"],I=d[m?\"right\":\"left\"];s.onPointerGraceIntentChange({area:[{x:h.clientX+_,y:h.clientY},{x:f,y:d.top},{x:I,y:d.top},{x:I,y:d.bottom},{x:f,y:d.bottom}],side:p}),window.clearTimeout(A.current),A.current=window.setTimeout(()=\u003es.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(h),h.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ar(e.onKeyDown,h=\u003e{e.disabled||h.target!==h.currentTarget||s.searchRef.current!==\"\"\u0026\u0026h.key===\" \"||JQi[i.dir].includes(h.key)\u0026\u0026(o.onOpenChange(!0),o.content?.focus(),h.preventDefault())})})})},\"MenuSubTrigger\")),fvi=\"MenuSubContent\",Ivi=ee.forwardRef(Hl(function(e,n){const o=E0n(t9,e.__scopeMenu),{forceMount:i=o.forceMount,align:r=\"start\",...s}=e,a=MP(t9,e.__scopeMenu),A=EZ(t9,e.__scopeMenu),c=w0n(fvi,e.__scopeMenu),l=ee.useRef(null),u=$A(n,l);return K.jsx(xZ.Provider,{scope:e.__scopeMenu,children:K.jsx(uE,{present:i||a.open,children:K.jsx(xZ.Slot,{scope:e.__scopeMenu,children:K.jsx(RWe,{id:c.contentId,\"aria-labelledby\":c.triggerId,...s,ref:u,align:r,side:A.dir===\"rtl\"?\"left\":\"right\",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=\u003e{A.isUsingKeyboardRef.current\u0026\u0026l.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=\u003eg.preventDefault(),onFocusOutside:ar(e.onFocusOutside,g=\u003e{g.target!==c.trigger\u0026\u0026a.onOpenChange(!1)}),onEscapeKeyDown:ar(e.onEscapeKeyDown,g=\u003e{A.onClose(),g.preventDefault()}),onKeyDown:ar(e.onKeyDown,g=\u003e{const h=g.currentTarget.contains(g.target),d=WQi[A.dir].includes(g.key);h\u0026\u0026d\u0026\u0026(a.onOpenChange(!1),c.trigger?.focus(),g.preventDefault())})})})})})},\"MenuSubContent\"));function FWe(t){return t?\"open\":\"closed\"}Hl(FWe,\"getOpenState\");function BZ(t){return t===\"indeterminate\"}Hl(BZ,\"isIndeterminate\");function Zme(t){return BZ(t)?\"indeterminate\":t?\"checked\":\"unchecked\"}Hl(Zme,\"getCheckedState\");function P0n(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}Hl(P0n,\"focusFirst\");function M0n(t,e){return t.map((n,o)=\u003et[(e+o)%t.length])}Hl(M0n,\"wrapArray\");function D0n(t,e,n){const i=e.length\u003e1\u0026\u0026Array.from(e).every(c=\u003ec===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let s=M0n(t,Math.max(r,0));i.length===1\u0026\u0026(s=s.filter(c=\u003ec!==n));const A=s.find(c=\u003ec.toLowerCase().startsWith(i.toLowerCase()));return A!==n?A:void 0}Hl(D0n,\"getNextMatch\");function N0n(t,e){const{x:n,y:o}=t;let i=!1;for(let r=0,s=e.length-1;r\u003ce.length;s=r++){const a=e[r],A=e[s],c=a.x,l=a.y,u=A.x,g=A.y;l\u003eo!=g\u003eo\u0026\u0026n\u003c(u-c)*(o-l)/(g-l)+c\u0026\u0026(i=!i)}return i}Hl(N0n,\"isPointInPolygon\");function R0n(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return N0n(n,e)}Hl(R0n,\"isPointerInGraceArea\");function xU(t){return e=\u003ee.pointerType===\"mouse\"?t(e):void 0}Hl(xU,\"whenMouse\");var Cvi=XQi,yvi=y0n,xvi=evi,Evi=nvi,Bvi=svi,bvi=kWe,Svi=avi,Qvi=uvi,vvi=dvi,wvi=hvi,Pvi=mvi,Mvi=_vi,Dvi=Ivi,Nvi=Object.defineProperty,QE=(t,e)=\u003eNvi(t,\"name\",{value:e,configurable:!0}),LWe=\"DropdownMenu\",[Rvi,Qmr]=Nx(LWe,[f0n]),vE=f0n(),[Tvi,T0n]=Rvi(LWe),kvi=QE(t=\u003e{const{__scopeDropdownMenu:e,children:n,dir:o,open:i,defaultOpen:r,onOpenChange:s,modal:a=!0}=t,A=vE(e),c=ee.useRef(null),[l,u]=DB({prop:i,defaultProp:r??!1,onChange:s,caller:LWe});return K.jsx(Tvi,{scope:e,triggerId:t_(),triggerRef:c,contentId:t_(),open:l,onOpenChange:u,onOpenToggle:ee.useCallback(()=\u003eu(g=\u003e!g),[u]),modal:a,children:K.jsx(Cvi,{...A,open:l,onOpenChange:u,dir:o,modal:a,children:n})})},\"DropdownMenu\"),Fvi=\"DropdownMenuTrigger\",Lvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,disabled:i=!1,...r}=e,s=T0n(Fvi,o),a=vE(o),A=$A(n,s.triggerRef);return K.jsx(yvi,{asChild:!0,...a,children:K.jsx(Na.button,{type:\"button\",id:s.triggerId,\"aria-haspopup\":\"menu\",\"aria-expanded\":s.open,\"aria-controls\":s.open?s.contentId:void 0,\"data-state\":s.open?\"open\":\"closed\",\"data-disabled\":i?\"\":void 0,disabled:i,...r,ref:A,onPointerDown:ar(e.onPointerDown,c=\u003e{!i\u0026\u0026c.button===0\u0026\u0026c.ctrlKey===!1\u0026\u0026(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:ar(e.onKeyDown,c=\u003e{i||([\"Enter\",\" \"].includes(c.key)\u0026\u0026s.onOpenToggle(),c.key===\"ArrowDown\"\u0026\u0026s.onOpenChange(!0),[\"Enter\",\" \",\"ArrowDown\"].includes(c.key)\u0026\u0026c.preventDefault())})})})},\"DropdownMenuTrigger\")),Hvi=QE(t=\u003e{const{__scopeDropdownMenu:e,...n}=t,o=vE(e);return K.jsx(xvi,{...o,...n})},\"DropdownMenuPortal\"),Ovi=\"DropdownMenuContent\",Gvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=T0n(Ovi,o),s=vE(o),a=ee.useRef(!1);return K.jsx(Evi,{id:r.contentId,\"aria-labelledby\":r.triggerId,...s,...i,ref:n,onCloseAutoFocus:ar(e.onCloseAutoFocus,A=\u003e{a.current||r.triggerRef.current?.focus(),a.current=!1,A.preventDefault()}),onInteractOutside:ar(e.onInteractOutside,A=\u003e{const c=A.detail.originalEvent,l=c.button===0\u0026\u0026c.ctrlKey===!0,u=c.button===2||l;(!r.modal||u)\u0026\u0026(a.current=!0)}),style:{...e.style,\"--radix-dropdown-menu-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-dropdown-menu-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-dropdown-menu-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-dropdown-menu-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-dropdown-menu-trigger-height\":\"var(--radix-popper-anchor-height)\"}})},\"DropdownMenuContent\")),Yvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Bvi,{...r,...i,ref:n})},\"DropdownMenuLabel\")),Uvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(bvi,{...r,...i,ref:n})},\"DropdownMenuItem\")),Kvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Svi,{...r,...i,ref:n})},\"DropdownMenuCheckboxItem\")),Vvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Qvi,{...r,...i,ref:n})},\"DropdownMenuRadioItem\")),zvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(vvi,{...r,...i,ref:n})},\"DropdownMenuItemIndicator\")),Jvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(wvi,{...r,...i,ref:n})},\"DropdownMenuSeparator\")),Wvi=QE(t=\u003e{const{__scopeDropdownMenu:e,children:n,open:o,onOpenChange:i,defaultOpen:r}=t,s=vE(e),[a,A]=DB({prop:o,defaultProp:r??!1,onChange:i,caller:\"DropdownMenuSub\"});return K.jsx(Pvi,{...s,open:a,onOpenChange:A,children:n})},\"DropdownMenuSub\"),jvi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Mvi,{...r,...i,ref:n})},\"DropdownMenuSubTrigger\")),$vi=ee.forwardRef(QE(function(e,n){const{__scopeDropdownMenu:o,...i}=e,r=vE(o);return K.jsx(Dvi,{...r,...i,ref:n,style:{...e.style,\"--radix-dropdown-menu-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-dropdown-menu-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-dropdown-menu-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-dropdown-menu-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-dropdown-menu-trigger-height\":\"var(--radix-popper-anchor-height)\"}})},\"DropdownMenuSubContent\")),e_e=kvi,t_e=Lvi,EU=Hvi,bZ=Gvi,k0n=Yvi,SS=Uvi,HWe=Kvi,F0n=Vvi,OWe=zvi,n_e=Jvi,L0n=Wvi,GWe=jvi,YWe=$vi;const o_e=e_e,i_e=t_e,SZ=EU,QZ=L0n,BU=ee.forwardRef(({className:t,inset:e,children:n,...o},i)=\u003eK.jsxs(GWe,{ref:i,className:Oi(\"rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none focus:rf-bg-zinc-100 data-[state=open]:rf-bg-zinc-100 [\u0026_svg]:rf-pointer-events-none [\u0026_svg]:rf-size-4 [\u0026_svg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:data-[state=open]:rf-bg-zinc-800\",e\u0026\u0026\"rf-pl-8\",t),...o,children:[n,K.jsx(bT,{className:\"rf-ml-auto\"})]}));BU.displayName=GWe.displayName;const bU=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(YWe,{ref:n,className:Oi(\"rf-z-[102] rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-lg data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50\",t),...e}));bU.displayName=YWe.displayName;const vZ=ee.forwardRef(({className:t,sideOffset:e=4,...n},o)=\u003eK.jsx(EU,{children:K.jsx(bZ,{ref:o,sideOffset:e,className:Oi(\"rf-z-50 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-1 rf-text-zinc-950 rf-shadow-md dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50\",\"data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2\",t),...n})}));vZ.displayName=bZ.displayName;const bp=ee.forwardRef(({className:t,inset:e,...n},o)=\u003eK.jsx(SS,{ref:o,className:Oi(\"rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-gap-2 rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 [\u0026\u003esvg]:rf-size-4 [\u0026\u003esvg]:rf-shrink-0 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50\",e\u0026\u0026\"rf-pl-8\",t),...n}));bp.displayName=SS.displayName;const qvi=ee.forwardRef(({className:t,children:e,checked:n,...o},i)=\u003eK.jsxs(HWe,{ref:i,className:Oi(\"rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50\",t),checked:n,...o,children:[K.jsx(\"span\",{className:\"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center\",children:K.jsx(OWe,{children:K.jsx(CS,{className:\"rf-h-4 rf-w-4\"})})}),e]}));qvi.displayName=HWe.displayName;const Xvi=ee.forwardRef(({className:t,children:e,...n},o)=\u003eK.jsxs(F0n,{ref:o,className:Oi(\"rf-relative rf-flex rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-outline-none rf-transition-colors focus:rf-bg-zinc-100 focus:rf-text-zinc-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50 dark:focus:rf-bg-zinc-800 dark:focus:rf-text-zinc-50\",t),...n,children:[K.jsx(\"span\",{className:\"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center\",children:K.jsx(OWe,{children:K.jsx(pln,{className:\"rf-h-2 rf-w-2 rf-fill-current\"})})}),e]}));Xvi.displayName=F0n.displayName;const Zvi=ee.forwardRef(({className:t,inset:e,...n},o)=\u003eK.jsx(k0n,{ref:o,className:Oi(\"rf-px-2 rf-py-1.5 rf-text-sm rf-font-semibold\",e\u0026\u0026\"rf-pl-8\",t),...n}));Zvi.displayName=k0n.displayName;const H0n=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(n_e,{ref:n,className:Oi(\"rf--mx-1 rf-my-1 rf-h-px rf-bg-zinc-100 dark:rf-bg-zinc-800\",t),...e}));H0n.displayName=n_e.displayName;const O0n=({autoroutingLog:t,onReportAutoroutingLog:e})=\u003eK.jsx(K.Fragment,{children:Object.keys(t??{}).length\u003e0\u0026\u0026K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsxs(fA,{variant:\"outline\",children:[K.jsx(cbi,{className:\"rf-w-4 rf-h-4 rf-mr-2\"}),\"Open Autorouting Log\"]})}),K.jsx(vZ,{className:\"rf-w-96\",children:Object.entries(t??{}).map(([n,{simpleRouteJson:o}])=\u003eK.jsxs(bp,{className:\"rf-flex rf-justify-between rf-items-center\",children:[K.jsx(\"span\",{className:\"rf-truncate rf-text-xs rf-mr-2\",children:n}),K.jsxs(\"div\",{className:\"rf-flex rf-gap-2\",children:[K.jsxs(fA,{variant:\"outline\",size:\"sm\",onClick:i=\u003e{i.stopPropagation();const r=new Blob([JSON.stringify(o,null,2)],{type:\"application/json\"}),s=URL.createObjectURL(r),a=document.createElement(\"a\");a.href=s,a.download=`${n}-autorouting.json`,a.click(),URL.revokeObjectURL(s)},children:[K.jsx(mZ,{className:\"rf-w-3 rf-h-3\"}),\"Download\"]}),e\u0026\u0026K.jsxs(fA,{variant:\"outline\",size:\"sm\",onClick:i=\u003e{i.stopPropagation(),e\u0026\u0026e(n,{simpleRouteJson:o})},children:[K.jsx(Pbi,{className:\"rf-w-3 rf-h-3\"}),\"Report Bug\"]})]})]},n))})]})}),ewi=({code:t,fsMap:e,autoroutingLog:n,circuitJsonErrors:o,circuitJsonWarnings:i,onReportAutoroutingLog:r,errorMessage:s,errorStack:a,circuitJson:A,evalVersion:c})=\u003e{const l=ee.useMemo(()=\u003e{const S=[];if(s\u0026\u0026S.push({type:\"Execution Error\",message:s,stack:a||void 0,source:\"execution\"}),o\u0026\u0026o.length\u003e0)for(const Q of o)S.push({type:Q.type||\"Circuit JSON Error\",message:Q.message||\"No error message available\",stack:Q.stack||\"\",source:\"circuitJson\"});return S},[s,a,o]),u=ee.useMemo(()=\u003e!A||!Array.isArray(A)?void 0:A.find(Q=\u003eQ.type===\"source_project_metadata\")?.software_used_string,[A]),g=ee.useMemo(()=\u003e{const S=[];if(i\u0026\u0026i.length\u003e0)for(const Q of i)S.push({type:Q.type||\"Circuit JSON Warning\",message:Q.message||\"No warning message available\",stack:Q.stack||\"\",source:\"circuitJson\"});return S},[i]),h=()=\u003e{if(e)try{return QUo(e instanceof Map?Object.fromEntries(e.entries()):e)}catch{}return Rbi(t??\"\")},d=(S,Q)=\u003e{const w=`https://github.com/tscircuit/tscircuit.com/issues/new?title=${encodeURIComponent(S)}\u0026body=${encodeURIComponent(Q)}`;window.open(w,\"_blank\")};ee.useEffect(()=\u003e{if(s){let S=s;a\u0026\u0026(S+=`\n\n${a}`),typeof window\u003c\"u\"\u0026\u0026(window.__TSCIRCUIT_LAST_EXECUTION_ERROR=S)}},[s,a]);const[p,m]=ee.useState(()=\u003e{const S=new Set;return l.forEach((Q,w)=\u003eS.add(w)),S}),[_,f]=ee.useState(()=\u003e{const S=new Set;return g.forEach((Q,w)=\u003eS.add(w)),S}),[I,C]=ee.useState(!1),[y,x]=ee.useState(!1);if(l.length===0\u0026\u0026g.length===0)return K.jsxs(\"div\",{className:\"px-2\",children:[K.jsx(\"div\",{className:\"rf-mt-4 rf-bg-green-50 rf-rounded-md rf-border rf-border-green-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-green-800 rf-mb-3\",children:\"No errors or warnings!\"}),K.jsx(\"p\",{className:\"rf-text-sm rf-text-green-700\",children:\"Your code is running without any errors or warnings.\"})]})}),K.jsxs(\"div\",{className:\"rf-flex rf-gap-2 rf-mt-4 rf-justify-end\",children:[K.jsx(O0n,{autoroutingLog:n,onReportAutoroutingLog:r}),K.jsxs(fA,{variant:\"outline\",className:\"rf-p-1\",onClick:()=\u003e{const S=h();d(\"Issue Report\",`[Package code to reproduce](${S})`)},children:[K.jsx(nWe,{className:\"rf-w-4 rf-h-4\"}),\"Report Issue\"]})]})]});const E=S=\u003e{m(Q=\u003e{const w=new Set(Q);return w.has(S)?w.delete(S):w.add(S),w})},B=S=\u003e{f(Q=\u003e{const w=new Set(Q);return w.has(S)?w.delete(S):w.add(S),w})};return K.jsx(K.Fragment,{children:K.jsxs(\"div\",{className:\"rf-w-full rf-flex rf-flex-col rf-h-full\",children:[K.jsxs(\"div\",{className:\"rf-overflow-y-auto rf-min-h-0\",children:[l.length\u003e0\u0026\u0026K.jsxs(\"div\",{className:\"rf-mt-2\",children:[K.jsxs(\"div\",{className:\"rf-text-xs rf-text-red-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-red-50 rf-border-b rf-border-red-200 rf-flex rf-items-center rf-gap-2 rf-cursor-pointer hover:rf-bg-red-100\",onClick:()=\u003eC(!I),children:[I?K.jsx(bT,{className:\"rf-h-3 rf-w-3 rf-text-red-700\"}):K.jsx(pZ,{className:\"rf-h-3 rf-w-3 rf-text-red-700\"}),K.jsxs(\"span\",{children:[l.length,\" \",l.length===1?\"error\":\"errors\"]})]}),!I\u0026\u0026l.map((S,Q)=\u003e{const w=p.has(Q);S.message;const M=S.stack||c||u;return K.jsxs(\"div\",{className:\"rf-bg-white hover:rf-bg-red-100\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-start rf-gap-1 rf-px-2 rf-pt-1 rf-pb-1 rf-cursor-pointer rf-bg-red-50/50\",onClick:()=\u003eM\u0026\u0026E(Q),children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",style:{marginTop:\"2px\"},children:[K.jsx(Abi,{className:\"rf-h-4 rf-w-4 rf-text-red-500 rf-flex-shrink-0\"}),M\u0026\u0026K.jsx(bT,{className:`rf-h-3 rf-w-3 rf-text-red-500 rf-flex-shrink-0 rf-transition-transform ${w?\"rf-rotate-90\":\"\"}`})]}),K.jsxs(\"div\",{className:\"rf-flex-1 rf-min-w-0 rf-leading-[1rem]\",children:[K.jsxs(\"span\",{className:\"rf-text-xs rf-font-mono rf-text-red-700 rf-leading-[0.95rem]\",children:[S.type,\":\"]}),K.jsx(\"span\",{className:\"rf-text-xs rf-font-mono rf-text-red-600 rf-ml-1 rf-leading-[0.95rem]\",children:S.message})]})]}),w\u0026\u0026M\u0026\u0026K.jsxs(\"div\",{className:\"rf-bg-red-50/50 rf-pl-12\",children:[S.stack?.split(`\n`).filter(k=\u003ek.trim()).slice(1).map((k,R)=\u003eK.jsx(\"div\",{className:\"rf-px-2 rf-leading-tight\",children:K.jsx(\"span\",{className:\"rf-text-xs rf-font-mono rf-text-red-500\",children:k})},R)),(c||u)\u0026\u0026K.jsx(\"div\",{className:\"rf-px-2\",children:K.jsxs(\"span\",{className:\"rf-text-xs rf-font-mono rf-text-red-400\",children:[c\u0026\u0026`@tscircuit/eval@${c}`,c\u0026\u0026u\u0026\u0026\" • \",u]})})]})]},Q)})]}),g.length\u003e0\u0026\u0026K.jsxs(\"div\",{className:\"rf-mt-2\",children:[K.jsxs(\"div\",{className:\"rf-text-xs rf-text-orange-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-orange-50 rf-border-b rf-border-orange-200 rf-flex rf-items-center rf-gap-2 rf-cursor-pointer hover:rf-bg-orange-100\",onClick:()=\u003ex(!y),children:[y?K.jsx(bT,{className:\"rf-h-3 rf-w-3 rf-text-orange-700\"}):K.jsx(pZ,{className:\"rf-h-3 rf-w-3 rf-text-orange-700\"}),K.jsxs(\"span\",{children:[g.length,\" \",g.length===1?\"warning\":\"warnings\"]})]}),!y\u0026\u0026g.map((S,Q)=\u003e{const w=_.has(Q);S.message;const M=!!S.stack;return K.jsxs(\"div\",{className:\"rf-bg-white hover:rf-bg-orange-100\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2 rf-px-2 rf-py-1 rf-cursor-pointer rf-bg-orange-50/50\",onClick:()=\u003eM\u0026\u0026B(Q),children:[K.jsx(oWe,{className:\"rf-h-4 rf-w-4 rf-text-orange-500 rf-flex-shrink-0\"}),M\u0026\u0026K.jsx(bT,{className:`rf-h-3 rf-w-3 rf-text-orange-500 rf-flex-shrink-0 rf-transition-transform ${w?\"rf-rotate-90\":\"\"}`}),K.jsxs(\"div\",{className:\"rf-flex-1 rf-min-w-0 rf-flex rf-items-center rf-flex-wrap\",children:[K.jsxs(\"span\",{className:\"rf-text-xs rf-font-mono rf-text-orange-700 rf-break-words\",children:[S.type,\":\"]}),K.jsx(\"span\",{className:\"rf-text-xs rf-font-mono rf-text-orange-600 rf-ml-1 rf-break-words\",children:S.message})]})]}),w\u0026\u0026M\u0026\u0026K.jsx(\"div\",{className:\"rf-bg-orange-50/50 rf-pl-12\",children:S.stack?.split(`\n`).filter(k=\u003ek.trim()).slice(1).map((k,R)=\u003eK.jsx(\"div\",{className:\"rf-px-2 rf-leading-tight\",children:K.jsx(\"span\",{className:\"rf-text-xs rf-font-mono rf-text-orange-500\",children:k})},R))})]},Q)})]})]}),K.jsxs(\"div\",{className:\"rf-flex rf-gap-2 rf-mt-4 rf-justify-end rf-flex-shrink-0\",children:[K.jsx(O0n,{autoroutingLog:n,onReportAutoroutingLog:r}),K.jsxs(fA,{variant:\"outline\",className:\"rf-p-1\",onClick:()=\u003e{const S=l[0]??g[0]??{type:\"General Issue\",message:\"No error or warning details provided.\"};let Q=`${S.type}: ${S.message}`;c\u0026\u0026(Q+=`\n@tscircuit/eval@${c}`),u\u0026\u0026(Q+=`\n${u}`),S.stack\u0026\u0026(Q+=`\n${S.stack}`),navigator.clipboard.writeText(Q),ua.success(\"Error copied to clipboard!\")},children:[K.jsx(lbi,{className:\"rf-w-4 rf-h-4\"}),\"Copy Error\"]}),K.jsxs(fA,{variant:\"outline\",className:\"rf-p-1\",onClick:()=\u003e{const S=l[0]??g[0]??{type:\"General Issue\",message:\"No error or warning details provided.\"},Q=`Error ${S.type}`.replace(/[^a-zA-Z0-9 ]/g,\" \").replace(/\\s+/g,\" \").slice(0,100);let w=`${S.type}: ${S.message}`;c\u0026\u0026(w+=`\n@tscircuit/eval@${c}`),u\u0026\u0026(w+=`\n${u}`),S.stack\u0026\u0026(w+=`\n${S.stack}`);let M=`[Package code to reproduce](${h()})\n\n### Error\n\\`\\`\\`\n${w}\n\\`\\`\\`\n`;if(M.length\u003e35e3){const k=S.message.length\u003e500?`${S.message.slice(0,500)}...`:S.message;M=`[Package code to reproduce](${h()})\n\n### Error\n\\`\\`\\`\n${S.type}: ${k}\n\\`\\`\\``}d(Q,M)},children:[K.jsx(nWe,{className:\"rf-w-4 rf-h-4\"}),\"Report Issue\"]})]})]})})};var twi=Object.defineProperty,wE=(t,e)=\u003etwi(t,\"name\",{value:e,configurable:!0}),UWe=\"Dialog\",[G0n,Y0n]=Nx(UWe),[nwi,n9]=G0n(UWe),r_e=wE(t=\u003e{const{__scopeDialog:e,children:n,open:o,defaultOpen:i,onOpenChange:r,modal:s=!0}=t,a=ee.useRef(null),A=ee.useRef(null),[c,l]=DB({prop:o,defaultProp:i??!1,onChange:r,caller:UWe}),[u,g]=ee.useState(0),[h,d]=ee.useState(0);return K.jsx(nwi,{scope:e,triggerRef:a,contentRef:A,contentId:t_(),titleId:t_(),descriptionId:t_(),titlePresent:u\u003e0,descriptionPresent:h\u003e0,setTitleCount:g,setDescriptionCount:d,open:c,onOpenChange:l,onOpenToggle:ee.useCallback(()=\u003el(p=\u003e!p),[l]),modal:s,children:n})},\"Dialog\"),owi=\"DialogTrigger\",iwi=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(owi,o),s=$A(n,r.triggerRef);return K.jsx(Na.button,{type:\"button\",\"aria-haspopup\":\"dialog\",\"aria-expanded\":r.open,\"aria-controls\":r.open?r.contentId:void 0,\"data-state\":c_e(r.open),...i,ref:s,onClick:ar(e.onClick,r.onOpenToggle)})},\"DialogTrigger\")),U0n=\"DialogPortal\",[rwi,K0n]=G0n(U0n,{forceMount:void 0}),s_e=wE(t=\u003e{const{__scopeDialog:e,forceMount:n,children:o,container:i}=t,r=n9(U0n,e);return K.jsx(rwi,{scope:e,forceMount:n,children:ee.Children.map(o,s=\u003eK.jsx(uE,{present:n||r.open,children:K.jsx(Gme,{asChild:!0,container:i,children:s})}))})},\"DialogPortal\"),KWe=\"DialogOverlay\",wZ=ee.forwardRef(wE(function(e,n){const o=K0n(KWe,e.__scopeDialog),{forceMount:i=o.forceMount,...r}=e,s=n9(KWe,e.__scopeDialog);return s.modal?K.jsx(uE,{present:i||s.open,children:K.jsx(awi,{...r,ref:n})}):null},\"DialogOverlay\")),swi=MB(\"DialogOverlay.RemoveScroll\"),awi=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(KWe,o),s=yln(),a=$A(n,s);return K.jsx(yZ,{as:swi,allowPinchZoom:!0,shards:[r.contentRef],children:K.jsx(Na.div,{\"data-state\":c_e(r.open),...i,ref:a,style:{pointerEvents:\"auto\",...i.style}})})},\"DialogOverlayImpl\")),PZ=\"DialogContent\",MZ=ee.forwardRef(wE(function(e,n){const o=K0n(PZ,e.__scopeDialog),{forceMount:i=o.forceMount,...r}=e,s=n9(PZ,e.__scopeDialog);return K.jsx(uE,{present:i||s.open,children:s.modal?K.jsx(Awi,{...r,ref:n}):K.jsx(cwi,{...r,ref:n})})},\"DialogContent\")),Awi=ee.forwardRef(wE(function(e,n){const o=n9(PZ,e.__scopeDialog),i=ee.useRef(null),r=$A(n,o.contentRef,i);return ee.useEffect(()=\u003e{const s=i.current;if(s)return Kme(s)},[]),K.jsx(V0n,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:ar(e.onCloseAutoFocus,s=\u003e{s.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:ar(e.onPointerDownOutside,s=\u003e{const a=s.detail.originalEvent,A=a.button===0\u0026\u0026a.ctrlKey===!0;(a.button===2||A)\u0026\u0026s.preventDefault()}),onFocusOutside:ar(e.onFocusOutside,s=\u003es.preventDefault())})},\"DialogContentModal\")),cwi=ee.forwardRef(wE(function(e,n){const o=n9(PZ,e.__scopeDialog),i=ee.useRef(!1),r=ee.useRef(!1);return K.jsx(V0n,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=\u003e{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||o.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=\u003e{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type===\"pointerdown\"\u0026\u0026(r.current=!0));const a=s.target;o.triggerRef.current?.contains(a)\u0026\u0026s.preventDefault(),s.detail.originalEvent.type===\"focusin\"\u0026\u0026r.current\u0026\u0026s.preventDefault()}})},\"DialogContentNonModal\")),V0n=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,A=n9(PZ,o);return hU(),K.jsx(K.Fragment,{children:K.jsx(Sme,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:K.jsx(_Z,{role:\"dialog\",id:A.contentId,\"aria-describedby\":A.descriptionPresent?A.descriptionId:void 0,\"aria-labelledby\":A.titlePresent?A.titleId:void 0,\"data-state\":c_e(A.open),...a,ref:n,deferPointerDownOutside:!0,onDismiss:()=\u003eA.onOpenChange(!1)})})})},\"DialogContentImpl\")),lwi=\"DialogTitle\",a_e=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(lwi,o),{setTitleCount:s}=r;return Ep(()=\u003e(s(a=\u003ea+1),()=\u003es(a=\u003ea-1)),[s]),K.jsx(Na.h2,{id:r.titleId,...i,ref:n})},\"DialogTitle\")),uwi=\"DialogDescription\",A_e=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(uwi,o),{setDescriptionCount:s}=r;return Ep(()=\u003e(s(a=\u003ea+1),()=\u003es(a=\u003ea-1)),[s]),K.jsx(Na.p,{id:r.descriptionId,...i,ref:n})},\"DialogDescription\")),gwi=\"DialogClose\",VWe=ee.forwardRef(wE(function(e,n){const{__scopeDialog:o,...i}=e,r=n9(gwi,o);return K.jsx(Na.button,{type:\"button\",...i,ref:n,onClick:ar(e.onClick,()=\u003er.onOpenChange(!1))})},\"DialogClose\"));function c_e(t){return t?\"open\":\"closed\"}wE(c_e,\"getState\");function er(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function dwi(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function DZ(t){return typeof t\u003e\"u\"}function PT(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function NZ(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return NZ(r,...i)}}}function pf(...t){return NZ(...t)}const{cos:hwi,sin:pwi}=Math;function z0n(t,e,n){const o=hwi(t),i=pwi(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return DZ(e)||DZ(n)?r:NZ([PT(e,n),r,PT(-e,-n)])}function zWe(t,e=void 0,n=void 0,o=void 0){DZ(e)\u0026\u0026(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return DZ(n)||DZ(o)?i:NZ([PT(n,o),i,PT(-n,-o)])}function mwi(t){return _wi(t)}function _wi(t){return`matrix(${t.a},${t.b},${t.c},${t.d},${t.e},${t.f})`}function fwi(t,e=1e10){return{a:Math.round(t.a*e)/e,b:Math.round(t.b*e)/e,c:Math.round(t.c*e)/e,d:Math.round(t.d*e)/e,e:Math.round(t.e*e)/e,f:Math.round(t.f*e)/e}}function Iwi(t,e){const n=t[0].x!=null?t[0].x:t[0][0],o=t[0].y!=null?t[0].y:t[0][1],i=e[0].x!=null?e[0].x:e[0][0],r=e[0].y!=null?e[0].y:e[0][1],s=t[1].x!=null?t[1].x:t[1][0],a=t[1].y!=null?t[1].y:t[1][1],A=e[1].x!=null?e[1].x:e[1][0],c=e[1].y!=null?e[1].y:e[1][1],l=t[2].x!=null?t[2].x:t[2][0],u=t[2].y!=null?t[2].y:t[2][1],g=e[2].x!=null?e[2].x:e[2][0],h=e[2].y!=null?e[2].y:e[2][1],d={a:n-l,b:o-u,c:s-l,d:a-u,e:l,f:u},p={a:i-g,b:r-h,c:A-g,d:c-h,e:g,f:h},m=dwi(d),_=NZ([p,m]);return fwi(_)}function Cwi(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function l_e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(i,l_e.prototype),i.expected=e,i.found=n,i.location=o,i.name=\"SyntaxError\",i}Cwi(l_e,Error);function JWe(t,e,n){return n=n||\" \",t.length\u003ee?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}l_e.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var n=null,o;for(o=0;o\u003ct.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\\r\\n|\\n|\\r/g);break}var i=this.location.start,r=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(i):i,s=this.location.source+\":\"+r.line+\":\"+r.column;if(n){var a=this.location.end,A=JWe(\"\",r.line.toString().length,\" \"),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`\n --\u003e `+s+`\n`+A+` |\n`+r.line+\" | \"+c+`\n`+A+\" | \"+JWe(\"\",i.column-1,\" \")+JWe(\"\",u,\"^\")}else e+=`\n at `+s}return e},l_e.buildMessage=function(t,e){var n={literal:function(c){return'\"'+i(c.text)+'\"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+\"-\"+r(u[1]):r(u)});return\"[\"+(c.inverted?\"^\":\"\")+l.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function r(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length\u003e0){for(u=1,g=1;u\u003cl.length;u++)l[u-1]!==l[u]\u0026\u0026(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+\" or \"+l[1];default:return l.slice(0,-1).join(\", \")+\", or \"+l[l.length-1]}}function A(c){return c?'\"'+i(c)+'\"':\"end of input\"}return\"Expected \"+a(t)+\" but \"+A(e)+\" found.\"};function J0n(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}function ywi(t,e){if(!e.subcircuit_id\u0026\u0026!e.source_group_id)return[...t];let n=e;if(e.subcircuit_id){const a=new Set([e.subcircuit_id]),A=new Map,c=new Map;for(const u of t)if(u.type===\"source_group\"){const g=u.source_group_id,h=u.subcircuit_id;h\u0026\u0026c.set(g,h);const d=u.parent_source_group_id;d\u0026\u0026(A.has(d)||A.set(d,[]),A.get(d).push(g))}let l;for(const[u,g]of c)if(g===e.subcircuit_id){l=u;break}if(l){const u=g=\u003e{const h=A.get(g)||[];for(const d of h){const p=c.get(d);p\u0026\u0026a.add(p),u(d)}};u(l),n={...e,subcircuit_ids:Array.from(a)}}}const o=new Map;for(const a of t){const A=`${a.type}_id`,c=a[A];typeof c==\"string\"\u0026\u0026o.set(c,a)}const i=new Map;for(const a of t){const A=Object.entries(a);for(const[c,l]of A)if(c!==\"parent_source_group_id\"){if(c.endsWith(\"_id\")\u0026\u0026typeof l==\"string\"){const u=o.get(l);J0n(i,a,u)}else if(c.endsWith(\"_ids\")\u0026\u0026Array.isArray(l)){for(const u of l)if(typeof u==\"string\"){const g=o.get(u);J0n(i,a,g)}}}}const r=[],s=new Set;for(const a of t){let A=!1;(n.subcircuit_id\u0026\u0026\"subcircuit_id\"in a\u0026\u0026a.subcircuit_id===n.subcircuit_id||n.subcircuit_ids\u0026\u0026\"subcircuit_id\"in a\u0026\u0026a.subcircuit_id\u0026\u0026n.subcircuit_ids.includes(a.subcircuit_id)||n.source_group_id\u0026\u0026\"source_group_id\"in a\u0026\u0026a.source_group_id===n.source_group_id||n.source_group_id\u0026\u0026\"member_source_group_ids\"in a\u0026\u0026Array.isArray(a.member_source_group_ids)\u0026\u0026a.member_source_group_ids.includes(n.source_group_id))\u0026\u0026(A=!0),A\u0026\u0026(r.push(a),s.add(a))}for(;r.length\u003e0;){const a=r.shift(),A=i.get(a);if(A)for(const c of A)s.has(c)||(s.add(c),r.push(c))}return t.filter(a=\u003es.has(a))}var u_e=((t,e={})=\u003e{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split(\"_\").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=\u003e{if(s===\"toArray\")return()=\u003e(n.editCount=o.editCount,n);if(s===\"editCount\")return o.editCount;if(s===\"subtree\")return A=\u003eu_e(ywi(n,A),e);if(s===\"insert\")return A=\u003e{const c=A.type;if(!c)throw new Error(\"insert requires an element with a type\");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts\u0026\u0026(R9[c]??U4).parse(u),n.push(u),o.editCount++,u};if(s===\"insertAll\")return A=\u003eA.map(c=\u003ei.insert(c));const a=s;return{get:A=\u003en.find(c=\u003ec.type===a\u0026\u0026c[`${a}_id`]===A),getUsing:A=\u003e{const c=Object.keys(A);if(c.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const l=c[0],u=l.replace(\"_id\",\"\"),g=n.find(h=\u003eh.type===u\u0026\u0026h[l]===A[l]);return g?n.find(h=\u003eh.type===a\u0026\u0026h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=\u003e{const c=Object.keys(A);return n.find(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},list:A=\u003e{const c=A?Object.keys(A):[];return n.filter(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},insert:A=\u003e{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts\u0026\u0026(R9[a]??U4).parse(l),n.push(l),o.editCount++,l},delete:A=\u003e{const c=n.find(l=\u003el[`${a}_id`]===A);c\u0026\u0026(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=\u003e{const l=n.find(u=\u003eu.type===a\u0026\u0026u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=\u003e{if(a===\"source_component\")return n.find(c=\u003ec.type===\"source_component\"\u0026\u0026c.name===A.replace(/\\./g,\"\"));if(a===\"pcb_port\"||a===\"source_port\"||a===\"schematic_port\"){const[c,l]=A.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),u=n.find(h=\u003eh.type===\"source_component\"\u0026\u0026h.name===c);if(!u)return null;const g=n.find(h=\u003eh.type===\"source_port\"\u0026\u0026h.source_component_id===u.source_component_id\u0026\u0026(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a===\"source_port\")return g;if(a===\"pcb_port\")return n.find(h=\u003eh.type===\"pcb_port\"\u0026\u0026h.source_port_id===g.source_port_id);if(a===\"schematic_port\")return n.find(h=\u003eh.type===\"schematic_port\"\u0026\u0026h.source_port_id===g.source_port_id)}}}}});return i});u_e.unparsed=u_e;var MT=u_e;function WWe(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var W0n=((t,e={})=\u003e{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const s of t){const a=s.type,A=s[`${a}_id`];if(!A)continue;const c=Number.parseInt(A.split(\"_\").pop()||\"\");Number.isNaN(c)||(n.counts[a]=Math.max(n.counts[a]??0,c))}const i=e.indexConfig||{},r=n.indexes;if(i.byId\u0026\u0026(r.byId=new Map),i.byType\u0026\u0026(r.byType=new Map),i.byRelation\u0026\u0026(r.byRelation=new Map),i.bySubcircuit\u0026\u0026(r.bySubcircuit=new Map),i.byCustomField\u0026\u0026i.byCustomField.length\u003e0){r.byCustomField=new Map;for(const s of i.byCustomField)r.byCustomField.set(s,new Map)}for(const s of t){if(i.byId){const a=WWe(s);r.byId.set(a,s)}if(i.byType){const a=r.byType.get(s.type)||[];a.push(s),r.byType.set(s.type,a)}if(i.byRelation){const a=Object.entries(s);for(const[A,c]of a)if(A.endsWith(\"_id\")\u0026\u0026A!==`${s.type}_id`\u0026\u0026typeof c==\"string\"){const l=r.byRelation.get(A)||new Map,u=l.get(c)||[];u.push(s),l.set(c,u),r.byRelation.set(A,l)}}if(i.bySubcircuit\u0026\u0026\"subcircuit_id\"in s){const a=s.subcircuit_id;if(a\u0026\u0026typeof a==\"string\"){const A=r.bySubcircuit.get(a)||[];A.push(s),r.bySubcircuit.set(a,A)}}if(i.byCustomField\u0026\u0026r.byCustomField){for(const a of i.byCustomField)if(a in s){const A=s[a];if(A!==void 0\u0026\u0026(typeof A==\"string\"||typeof A==\"number\")){const c=String(A),l=r.byCustomField.get(a),u=l.get(c)||[];u.push(s),l.set(c,u)}}}}t._internal_store_indexed=n}return new Proxy({},{get:(i,r)=\u003e{if(r===\"toArray\")return()=\u003e(t.editCount=n.editCount,t);if(r===\"editCount\")return n.editCount;const s=r;return{get:a=\u003e{const A=e.indexConfig||{};return A.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${s}:${a}`)||null:A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(l=\u003el[`${s}_id`]===a)||null:t.find(c=\u003ec.type===s\u0026\u0026c[`${s}_id`]===a)||null},getUsing:a=\u003e{const A=e.indexConfig||{},c=Object.keys(a);if(c.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const l=c[0],u=l.replace(\"_id\",\"\");if(A.byRelation\u0026\u0026n.indexes.byRelation){const h=n.indexes.byRelation.get(l);if(h){const p=(h.get(a[l])||[]).find(_=\u003e_.type===u);if(!p)return null;const m=p[`${s}_id`];return A.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${s}:${m}`)||null:A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(f=\u003ef[`${s}_id`]===m)||null:t.find(_=\u003e_.type===s\u0026\u0026_[`${s}_id`]===m)||null}}const g=t.find(h=\u003eh.type===u\u0026\u0026h[l]===a[l]);return g\u0026\u0026t.find(h=\u003eh.type===s\u0026\u0026h[`${s}_id`]===g[`${s}_id`])||null},getWhere:a=\u003e{const A=e.indexConfig||{},c=Object.keys(a);if(c.length===1\u0026\u0026A.byCustomField\u0026\u0026n.indexes.byCustomField){const l=c[0],u=n.indexes.byCustomField.get(l);if(u){const g=String(a[l]);return(u.get(g)||[]).find(d=\u003ed.type===s)||null}}if(\"subcircuit_id\"in a\u0026\u0026A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const l=a.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).find(g=\u003eg.type===s\u0026\u0026c.every(h=\u003eg[h]===a[h]))||null}return A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(u=\u003ec.every(g=\u003eu[g]===a[g]))||null:t.find(l=\u003el.type===s\u0026\u0026c.every(u=\u003el[u]===a[u]))||null},list:a=\u003e{const A=e.indexConfig||{},c=a?Object.keys(a):[];if(c.length===0\u0026\u0026A.byType\u0026\u0026n.indexes.byType)return n.indexes.byType.get(s)||[];if(c.length===1\u0026\u0026c[0]===\"subcircuit_id\"\u0026\u0026A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const u=a.subcircuit_id;return(n.indexes.bySubcircuit.get(u)||[]).filter(h=\u003eh.type===s)}let l;return A.byType\u0026\u0026n.indexes.byType?l=n.indexes.byType.get(s)||[]:l=t.filter(u=\u003eu.type===s),c.length\u003e0?l.filter(u=\u003ec.every(g=\u003eu[g]===a[g])):l},insert:a=\u003e{n.counts[s]??=-1,n.counts[s]++;const A=n.counts[s],c={type:s,[`${s}_id`]:`${s}_${A}`,...a};e.validateInserts\u0026\u0026(R9[s]??U4).parse(c),t.push(c),n.editCount++;const l=e.indexConfig||{};if(l.byId\u0026\u0026n.indexes.byId){const u=WWe(c);n.indexes.byId.set(u,c)}if(l.byType\u0026\u0026n.indexes.byType){const u=n.indexes.byType.get(s)||[];u.push(c),n.indexes.byType.set(s,u)}if(l.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(c);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${c.type}_id`\u0026\u0026typeof h==\"string\"){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.push(c),d.set(h,p),n.indexes.byRelation.set(g,d)}}if(l.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c){const u=c.subcircuit_id;if(u\u0026\u0026typeof u==\"string\"){const g=n.indexes.bySubcircuit.get(u)||[];g.push(c),n.indexes.bySubcircuit.set(u,g)}}if(l.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of l.byCustomField)if(u in c){const g=c[u];if(g!==void 0\u0026\u0026(typeof g==\"string\"||typeof g==\"number\")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.push(c),d.set(h,p)}}}return c},delete:a=\u003e{const A=e.indexConfig||{};let c;if(A.byId\u0026\u0026n.indexes.byId?c=n.indexes.byId.get(`${s}:${a}`):A.byType\u0026\u0026n.indexes.byType?c=(n.indexes.byType.get(s)||[]).find(g=\u003eg[`${s}_id`]===a):c=t.find(u=\u003eu[`${s}_id`]===a),!c)return;const l=t.indexOf(c);if(l\u003e=0\u0026\u0026(t.splice(l,1),n.editCount++),A.byId\u0026\u0026n.indexes.byId){const u=WWe(c);n.indexes.byId.delete(u)}if(A.byType\u0026\u0026n.indexes.byType){const g=(n.indexes.byType.get(s)||[]).filter(h=\u003eh[`${s}_id`]!==a);n.indexes.byType.set(s,g)}if(A.byRelation\u0026\u0026n.indexes.byRelation)for(const[u,g]of n.indexes.byRelation.entries())for(const[h,d]of g.entries()){const p=d.filter(m=\u003em!==c);p.length===0?g.delete(h):g.set(h,p)}if(A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c){const u=c.subcircuit_id;if(u){const h=(n.indexes.bySubcircuit.get(u)||[]).filter(d=\u003ed!==c);h.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,h)}}if(A.byCustomField\u0026\u0026n.indexes.byCustomField)for(const u of n.indexes.byCustomField.values())for(const[g,h]of u.entries()){const d=h.filter(p=\u003ep!==c);d.length===0?u.delete(g):u.set(g,d)}},update:(a,A)=\u003e{const c=e.indexConfig||{};let l;if(c.byId\u0026\u0026n.indexes.byId?l=n.indexes.byId.get(`${s}:${a}`):c.byType\u0026\u0026n.indexes.byType?l=(n.indexes.byType.get(s)||[]).find(g=\u003eg[`${s}_id`]===a):l=t.find(u=\u003eu.type===s\u0026\u0026u[`${s}_id`]===a),!l)return null;if(c.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${l.type}_id`\u0026\u0026typeof h==\"string\"\u0026\u0026g in A\u0026\u0026A[g]!==h){const d=n.indexes.byRelation.get(g);if(d){const m=(d.get(h)||[]).filter(_=\u003e_!==l);m.length===0?d.delete(h):d.set(h,m)}}}if(c.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in l\u0026\u0026\"subcircuit_id\"in A){const u=l.subcircuit_id,g=A.subcircuit_id;if(u!==g){const d=(n.indexes.bySubcircuit.get(u)||[]).filter(p=\u003ep!==l);d.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,d)}}if(c.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l\u0026\u0026u in A\u0026\u0026l[u]!==A[u]){const g=n.indexes.byCustomField.get(u);if(g){const h=String(l[u]),p=(g.get(h)||[]).filter(m=\u003em!==l);p.length===0?g.delete(h):g.set(h,p)}}}if(Object.assign(l,A),n.editCount++,c.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${l.type}_id`\u0026\u0026typeof h==\"string\"\u0026\u0026g in A){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p),n.indexes.byRelation.set(g,d))}}if(c.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in l\u0026\u0026\"subcircuit_id\"in A){const u=l.subcircuit_id;if(u\u0026\u0026typeof u==\"string\"){const g=n.indexes.bySubcircuit.get(u)||[];g.includes(l)||(g.push(l),n.indexes.bySubcircuit.set(u,g))}}if(c.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l\u0026\u0026u in A){const g=l[u];if(g!==void 0\u0026\u0026(typeof g==\"string\"||typeof g==\"number\")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p))}}}return l},select:a=\u003e{if(s===\"source_component\")return t.find(A=\u003eA.type===\"source_component\"\u0026\u0026A.name===a.replace(/\\./g,\"\"))||null;if(s===\"pcb_port\"||s===\"source_port\"||s===\"schematic_port\"){const[A,c]=a.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),l=t.find(g=\u003eg.type===\"source_component\"\u0026\u0026g.name===A);if(!l)return null;const u=t.find(g=\u003eg.type===\"source_port\"\u0026\u0026g.source_component_id===l.source_component_id\u0026\u0026(g.name===c||(g.port_hints??[]).includes(c)));if(!u)return null;if(s===\"source_port\")return u;if(s===\"pcb_port\")return t.find(g=\u003eg.type===\"pcb_port\"\u0026\u0026g.source_port_id===u.source_port_id)||null;if(s===\"schematic_port\")return t.find(g=\u003eg.type===\"schematic_port\"\u0026\u0026g.source_port_id===u.source_port_id)||null}return null}}}})});W0n.unparsed=W0n;var j0n=(t,e)=\u003e({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),RZ=(t,e,n)=\u003e{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},$0n=(t,e,n,o,i)=\u003e{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=\u003e({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=\u003eu.x)),minY:Math.min(...l.map(u=\u003eu.y)),maxX:Math.max(...l.map(u=\u003eu.x)),maxY:Math.max(...l.map(u=\u003eu.y))}},xwi=(t,e,n,o,i)=\u003e{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=Math.hypot(r*A,s*c),u=Math.hypot(r*c,s*A);return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},Ewi=(t,e,n,o,i)=\u003e{const r=Math.min(n,o)/2,s=Math.max(n,o)/2-r,a=i*Math.PI/180,A=n\u003e=o?{x:s,y:0}:{x:0,y:s},c={x:A.x*Math.cos(a)-A.y*Math.sin(a),y:A.x*Math.sin(a)+A.y*Math.cos(a)},l=Math.abs(c.x)+r,u=Math.abs(c.y)+r;return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},g_e=t=\u003et.length===0?null:{minX:Math.min(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxX:Math.max(...t.map(e=\u003ee.x)),maxY:Math.max(...t.map(e=\u003ee.y))},jWe=t=\u003eArray.isArray(t)?t.flatMap(e=\u003e!e||typeof e!=\"object\"?[]:\"x\"in e\u0026\u0026\"y\"in e\u0026\u0026typeof e.x==\"number\"\u0026\u0026typeof e.y==\"number\"?[{x:e.x,y:e.y}]:\"start\"in e\u0026\u0026\"end\"in e?[e.start,e.end].filter(o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"x\"in o\u0026\u0026\"y\"in o\u0026\u0026typeof o.x==\"number\"\u0026\u0026typeof o.y==\"number\")):[]):[],q0n=t=\u003e{if(!t.type.startsWith(\"pcb_\"))return null;if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"polygon\"\u0026\u0026Array.isArray(t.points))return g_e(t.points);if(t.type===\"pcb_hole\"\u0026\u0026t.hole_shape===\"circle\")return RZ(t.x,t.y,t.hole_diameter);if(t.type===\"pcb_plated_hole\"){let u;if(\"outer_diameter\"in t\u0026\u0026typeof t.outer_diameter==\"number\"?u=RZ(t.x,t.y,t.outer_diameter):\"hole_diameter\"in t\u0026\u0026typeof t.hole_diameter==\"number\"\u0026\u0026(u=RZ(t.x,t.y,t.hole_diameter)),(t.shape===\"oval\"||t.shape===\"pill\")\u0026\u0026typeof t.outer_width==\"number\"\u0026\u0026typeof t.outer_height==\"number\"\u0026\u0026(u=(t.shape===\"pill\"?Ewi:xwi)(t.x,t.y,t.outer_width,t.outer_height,t.ccw_rotation??0)),\"rect_pad_width\"in t\u0026\u0026typeof t.rect_pad_width==\"number\"\u0026\u0026\"rect_pad_height\"in t\u0026\u0026typeof t.rect_pad_height==\"number\"){const g=$0n(t.x,t.y,t.rect_pad_width,t.rect_pad_height,\"rect_ccw_rotation\"in t?t.rect_ccw_rotation??0:0);u=u?j0n(u,g):g}if(\"hole_diameter\"in t\u0026\u0026typeof t.hole_diameter==\"number\"){const g=RZ(t.x+(\"hole_offset_x\"in t?t.hole_offset_x??0:0),t.y+(\"hole_offset_y\"in t?t.hole_offset_y??0:0),t.hole_diameter);u=u?j0n(u,g):g}if(u)return u}const e=t,n=g_e(jWe(e.route));if(n)return n;const o=g_e(jWe(e.outline));if(o)return o;const i=g_e(jWe(e.points));if(i)return i;let r,s,a,A;\"x\"in t\u0026\u0026\"y\"in t\u0026\u0026(r=Number(t.x),s=Number(t.y)),\"outer_diameter\"in t\u0026\u0026(a=Number(t.outer_diameter),A=Number(t.outer_diameter)),\"width\"in t\u0026\u0026(a=Number(t.width)),\"height\"in t\u0026\u0026(A=Number(t.height)),\"center\"in t\u0026\u0026t.center\u0026\u0026typeof t.center==\"object\"\u0026\u0026\"x\"in t.center\u0026\u0026\"y\"in t.center\u0026\u0026(r=Number(t.center.x),s=Number(t.center.y));let c=0;if(\"rotation\"in t\u0026\u0026typeof t.rotation==\"number\"\u0026\u0026(c=t.rotation),\"ccw_rotation\"in t\u0026\u0026typeof t.ccw_rotation==\"number\"\u0026\u0026(c=t.ccw_rotation),r!==void 0\u0026\u0026s!==void 0)return a!==void 0\u0026\u0026A!==void 0?c?$0n(r,s,a,A,c):{minX:r-a/2,minY:s-A/2,maxX:r+a/2,maxY:s+A/2}:\"radius\"in t\u0026\u0026typeof t.radius==\"number\"?RZ(r,s,t.radius*2):{minX:r,minY:s,maxX:r,maxY:s};const l=[e.anchor_position,e.position].filter(u=\u003e!!(u\u0026\u0026typeof u==\"object\"\u0026\u0026\"x\"in u\u0026\u0026\"y\"in u\u0026\u0026typeof u.x==\"number\"\u0026\u0026typeof u.y==\"number\")).at(0);return l?{minX:l.x,minY:l.y,maxX:l.x,maxY:l.y}:null},Bwi=(t,e)=\u003et.filter(n=\u003e{const o=q0n(n);return o?o.minX\u003c=e.maxX\u0026\u0026o.maxX\u003e=e.minX\u0026\u0026o.minY\u003c=e.maxY\u0026\u0026o.maxY\u003e=e.minY:!1}),bwi=\"TscircuitAlphabet\",X0n=\"data-tscircuit-alphabet-font\";function $We(t){const e=o=\u003e({...o,children:(o.children??[]).filter(i=\u003e!(X0n in(i.attributes??{}))).map(e)}),n=e(t);return n.children.push({name:\"style\",type:\"element\",value:\"\",attributes:{[X0n]:\"\",type:\"text/css\"},children:[{name:\"\",type:\"text\",value:`@font-face { font-family: '${bwi}'; src: url('data:font/ttf;base64,${EYt}') format('truetype'); font-weight: normal; font-style: normal; }`,attributes:{},children:[]}]}),Cbt(n)}var Z0n=vc(\"circuit-to-svg\");Z0n.extend(\"pcb\"),Z0n.extend(\"sch\");var $h={\"3d_viewer\":{background_bottom:\"rgb(102, 102, 128)\",background_top:\"rgb(204, 204, 230)\",board:\"rgb(51, 43, 23)\",copper:\"rgb(179, 156, 0)\",silkscreen_bottom:\"rgb(230, 230, 230)\",silkscreen_top:\"rgb(230, 230, 230)\",soldermask:\"rgb(20, 51, 36)\",solderpaste:\"rgb(128, 128, 128)\"},board:{anchor:\"rgb(255, 38, 226)\",aux_items:\"rgb(255, 255, 255)\",b_adhes:\"rgb(0, 0, 132)\",b_crtyd:\"rgb(255, 38, 226)\",b_fab:\"rgb(88, 93, 132)\",b_mask:\"rgba(2, 255, 238, 0.400)\",b_paste:\"rgb(0, 194, 194)\",b_silks:\"rgb(232, 178, 167)\",background:\"rgb(0, 16, 35)\",cmts_user:\"rgb(89, 148, 220)\",copper:{b:\"rgb(77, 127, 196)\",f:\"rgb(200, 52, 52)\",in1:\"rgb(127, 200, 127)\",in10:\"rgb(237, 124, 51)\",in11:\"rgb(91, 195, 235)\",in12:\"rgb(247, 111, 142)\",in13:\"rgb(167, 165, 198)\",in14:\"rgb(40, 204, 217)\",in15:\"rgb(232, 178, 167)\",in16:\"rgb(242, 237, 161)\",in17:\"rgb(237, 124, 51)\",in18:\"rgb(91, 195, 235)\",in19:\"rgb(247, 111, 142)\",in2:\"rgb(206, 125, 44)\",in20:\"rgb(167, 165, 198)\",in21:\"rgb(40, 204, 217)\",in22:\"rgb(232, 178, 167)\",in23:\"rgb(242, 237, 161)\",in24:\"rgb(237, 124, 51)\",in25:\"rgb(91, 195, 235)\",in26:\"rgb(247, 111, 142)\",in27:\"rgb(167, 165, 198)\",in28:\"rgb(40, 204, 217)\",in29:\"rgb(232, 178, 167)\",in3:\"rgb(79, 203, 203)\",in30:\"rgb(242, 237, 161)\",in4:\"rgb(219, 98, 139)\",in5:\"rgb(167, 165, 198)\",in6:\"rgb(40, 204, 217)\",in7:\"rgb(232, 178, 167)\",in8:\"rgb(242, 237, 161)\",in9:\"rgb(141, 203, 129)\"},cursor:\"rgb(255, 255, 255)\",drc:\"rgb(194, 194, 194)\",drc_error:\"rgba(215, 91, 107, 0.800)\",drc_exclusion:\"rgb(255, 255, 255)\",drc_warning:\"rgba(255, 208, 66, 0.902)\",dwgs_user:\"rgb(194, 194, 194)\",eco1_user:\"rgb(180, 219, 210)\",eco2_user:\"rgb(216, 200, 82)\",edge_cuts:\"rgb(208, 210, 205)\",f_adhes:\"rgb(132, 0, 132)\",f_crtyd:\"rgb(255, 0, 245)\",f_fab:\"rgb(175, 175, 175)\",f_mask:\"rgba(216, 100, 255, 0.400)\",f_paste:\"rgba(180, 160, 154, 0.902)\",f_silks:\"rgb(242, 237, 161)\",footprint_text_back:\"rgb(0, 0, 132)\",footprint_text_front:\"rgb(194, 194, 194)\",footprint_text_invisible:\"rgb(132, 132, 132)\",grid:\"rgb(132, 132, 132)\",grid_axes:\"rgb(194, 194, 194)\",margin:\"rgb(255, 38, 226)\",microvia:\"rgb(0, 132, 132)\",no_connect:\"rgb(0, 0, 132)\",pad_back:\"rgb(77, 127, 196)\",pad_front:\"rgb(200, 52, 52)\",pad_plated_hole:\"rgb(194, 194, 0)\",pad_through_hole:\"rgb(227, 183, 46)\",plated_hole:\"rgb(26, 196, 210)\",ratsnest:\"rgba(245, 255, 213, 0.702)\",select_overlay:\"rgb(4, 255, 67)\",through_via:\"rgb(236, 236, 236)\",user_1:\"rgb(194, 194, 194)\",user_2:\"rgb(89, 148, 220)\",user_3:\"rgb(180, 219, 210)\",user_4:\"rgb(216, 200, 82)\",user_5:\"rgb(194, 194, 194)\",user_6:\"rgb(89, 148, 220)\",user_7:\"rgb(180, 219, 210)\",user_8:\"rgb(216, 200, 82)\",user_9:\"rgb(232, 178, 167)\",via_blind_buried:\"rgb(187, 151, 38)\",via_hole:\"rgb(227, 183, 46)\",via_micro:\"rgb(0, 132, 132)\",via_through:\"rgb(236, 236, 236)\",worksheet:\"rgb(200, 114, 171)\"},gerbview:{axes:\"rgb(0, 0, 132)\",background:\"rgb(0, 0, 0)\",dcodes:\"rgb(255, 255, 255)\",grid:\"rgb(132, 132, 132)\",layers:[\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\",\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\"],negative_objects:\"rgb(132, 132, 132)\",worksheet:\"rgb(0, 0, 132)\"},meta:{filename:\"kicad_2020\",name:\"KiCad 2020\",version:2},simulation_palette:[\"#1f77b4\",\"#d62728\",\"#2ca02c\",\"#ff7f0e\",\"#9467bd\",\"#17becf\",\"#8c564b\",\"#e377c2\",\"#7f7f7f\",\"#bcbd22\"],palette:[\"rgb(132, 0, 0)\",\"rgb(194, 194, 0)\",\"rgb(194, 0, 194)\",\"rgb(194, 0, 0)\",\"rgb(0, 132, 132)\",\"rgb(0, 132, 0)\",\"rgb(0, 0, 132)\",\"rgb(132, 132, 132)\",\"rgb(132, 0, 132)\",\"rgb(194, 194, 194)\",\"rgb(132, 0, 132)\",\"rgb(132, 0, 0)\",\"rgb(132, 132, 0)\",\"rgb(194, 194, 194)\",\"rgb(0, 0, 132)\",\"rgb(0, 132, 0)\"],schematic:{aux_items:\"rgb(46, 46, 46)\",background:\"rgb(245, 241, 237)\",brightened:\"rgb(255, 0, 255)\",bus:\"rgb(0, 0, 132)\",bus_junction:\"rgb(0, 0, 132)\",component_body:\"rgb(255, 255, 194)\",component_outline:\"rgb(132, 0, 0)\",cursor:\"rgb(15, 15, 15)\",erc_error:\"rgba(230, 9, 13, 0.800)\",erc_warning:\"rgba(209, 146, 0, 0.800)\",fields:\"rgb(132, 0, 132)\",grid:\"rgb(181, 181, 181)\",grid_axes:\"rgb(0, 0, 132)\",hidden:\"rgb(194, 194, 194)\",junction:\"rgb(0, 150, 0)\",label_global:\"rgb(132, 0, 0)\",label_background:\"rgba(255, 255, 255, 0.6)\",label_hier:\"rgb(114, 86, 0)\",label_local:\"rgb(15, 15, 15)\",net_name:\"rgb(132, 132, 132)\",no_connect:\"rgb(132, 0, 0)\",note:\"rgb(0, 0, 194)\",override_item_colors:!1,pin:\"rgb(132, 0, 0)\",pin_name:\"rgb(0, 100, 100)\",pin_number:\"rgb(169, 0, 0)\",reference:\"rgb(0, 100, 100)\",shadow:\"rgba(102, 179, 255, 0.800)\",sheet:\"rgb(132, 0, 0)\",sheet_background:\"rgba(253, 255, 231, 0.000)\",sheet_fields:\"rgb(132, 0, 132)\",sheet_filename:\"rgb(114, 86, 0)\",sheet_label:\"rgb(0, 100, 100)\",sheet_name:\"rgb(0, 100, 100)\",table:\"rgb(102, 102, 102)\",value:\"rgb(0, 100, 100)\",wire:\"rgb(0, 150, 0)\",wire_crossing:\"rgb(30, 180, 30)\",worksheet:\"rgb(132, 0, 0)\"}};$h.board.user_2,$h.board.user_2,$h.board.user_2,$h.board.user_2,$h.board.user_2;var eun=.94,d_e=.09/2,Swi=Object.fromEntries(Object.entries(Ov).map(([t,e])=\u003e{const n=e.flatMap(i=\u003e[i.x1,i.x2]),o=e.flatMap(i=\u003e[i.y1,i.y2]);return[t,e.length?{minX:Math.min(...n)-d_e,maxX:Math.max(...n)+d_e,minY:-(Math.max(...o)+d_e)*eun,maxY:-(Math.min(...o)-d_e)*eun}:null]}));Math.round(Math.max(...Object.values(Swi).map(t=\u003et?t.maxX-t.minX:0))*1e3)/1e3;function qWe(t){return t.find(n=\u003en.type===\"project_software_metadata\"||n.type===\"source_project_metadata\")?.software_used_string}var Qwi={version:\"0.0.431\"},XWe=Qwi.version;function vwi(t,e=\"error_text_overlay\"){const n=t.filter(r=\u003er.type.endsWith(\"_error\"));if(n.length===0)return null;const o=n.map(r=\u003er.message).filter(r=\u003e!!r);return o.length===0?null:{name:\"text\",type:\"element\",value:\"\",attributes:{x:\"10\",y:\"20\",fill:\"red\",\"font-family\":\"monospace\",\"font-size\":\"12px\",\"data-type\":e,\"data-layer\":\"global\"},children:o.map((r,s)=\u003e({name:\"tspan\",type:\"element\",value:\"\",attributes:{x:\"10\",dy:s===0?\"0\":\"1.2em\"},children:[{type:\"text\",value:r,name:\"\",attributes:{},children:[]}]}))}}var wwi={pin_number:.15,negated_pin_number:.15*.8,reference_designator:.18,manufacturer_number:.18,net_label:.18,error:.05},DP=(t,e)=\u003ee??wwi[t],PE=(t,e,n)=\u003eMath.abs(t.a)*DP(e,n);function Pwi(t){const{minX:e,minY:n,maxX:o,maxY:i}=t.bounds,r=t.cellSize??1,s=t.labelCells??!1,a=[],A=(c,l)=\u003e{const[u,g]=er(t.transform,[c,l]);return{x:u,y:g}};for(let c=Math.floor(e);c\u003c=Math.ceil(o);c+=r){const l=A(c,n),u=A(c,i);a.push({name:\"line\",type:\"element\",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:$h.schematic.grid,\"stroke-width\":(.01*Math.abs(t.transform.a)).toString(),\"stroke-opacity\":\"0.5\"}})}for(let c=Math.floor(n);c\u003c=Math.ceil(i);c+=r){const l=A(e,c),u=A(o,c);a.push({name:\"line\",type:\"element\",attributes:{x1:l.x.toString(),y1:l.y.toString(),x2:u.x.toString(),y2:u.y.toString(),stroke:$h.schematic.grid,\"stroke-width\":(.01*Math.abs(t.transform.a)).toString(),\"stroke-opacity\":\"0.5\"}})}if(s){const c=(l,u)=\u003er\u003c=.1?`${l.toFixed(1)},${u.toFixed(1)}`:`${l},${u}`;for(let l=Math.floor(e);l\u003c=Math.ceil(o);l+=r)for(let u=Math.floor(n);u\u003c=Math.ceil(i);u+=r){const g=A(l,u);a.push({name:\"text\",type:\"element\",attributes:{x:(g.x-2.5).toString(),y:(g.y-5).toString(),fill:$h.schematic.grid,\"font-size\":(r/5*Math.abs(t.transform.a)).toString(),\"fill-opacity\":\"0.5\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\"},children:[{type:\"text\",value:c(l,u),name:\"\",attributes:{},children:[]}]})}}return{name:\"g\",value:\"\",type:\"element\",attributes:{class:\"grid sch-grid\"},children:a}}function Mwi(t){const{points:e,transform:n}=t,o=[];for(const i of e){const[r,s]=er(n,[i.x-.1,i.y-.1]),[a,A]=er(n,[i.x+.1,i.y+.1]),[c,l]=er(n,[i.x-.1,i.y+.1]),[u,g]=er(n,[i.x+.1,i.y-.1]);o.push({name:\"path\",type:\"element\",attributes:{d:`M${r},${s} L${a},${A} M${c},${l} L${u},${g}`,stroke:$h.schematic.grid,\"stroke-width\":(.02*Math.abs(n.a)).toString(),\"stroke-opacity\":\"0.7\"}});const[h,d]=er(n,[i.x+.15,i.y-.15]);o.push({name:\"text\",type:\"element\",attributes:{x:h.toString(),y:d.toString(),fill:$h.schematic.grid,\"font-size\":(.1*Math.abs(n.a)).toString(),\"fill-opacity\":\"0.7\",\"text-anchor\":\"start\",\"font-family\":\"sans-serif\",\"dominant-baseline\":\"middle\"},children:[{type:\"text\",value:i.label||`(${i.x},${i.y})`,name:\"\",attributes:{},children:[]}]})}return{name:\"g\",value:\"\",type:\"element\",attributes:{class:\"labeled-points sch-labeled-points\"},children:o}}function Dwi(t){return t.reduce((e,n)=\u003ee?n.sheet_index===void 0?e:e.sheet_index===void 0||n.sheet_index\u003ce.sheet_index?n:e:n,void 0)}var tun={0:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},1:{width:13,height:27,ascent:22,descent:5,left:-3,right:9},2:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},3:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},4:{width:13,height:27,ascent:22,descent:5,left:0,right:12},5:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},6:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},7:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},8:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},9:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\" \":{width:7,height:27,ascent:22,descent:5,left:0,right:0},\"!\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},'\"':{width:9,height:27,ascent:22,descent:5,left:-1,right:7},\"#\":{width:13,height:27,ascent:22,descent:5,left:0,right:13},$:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"%\":{width:21,height:27,ascent:22,descent:5,left:-1,right:20},\"\u0026\":{width:16,height:27,ascent:22,descent:5,left:-1,right:15},\"'\":{width:5,height:27,ascent:22,descent:5,left:-1,right:3},\"(\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\")\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"*\":{width:9,height:27,ascent:22,descent:5,left:-1,right:8},\"+\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\",\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"-\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\".\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"/\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},\":\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\";\":{width:7,height:27,ascent:22,descent:5,left:-2,right:5},\"\u003c\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"=\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"\u003e\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13},\"?\":{width:13,height:27,ascent:22,descent:5,left:-1,right:12},\"@\":{width:24,height:27,ascent:22,descent:5,left:-1,right:23},A:{width:16,height:27,ascent:22,descent:5,left:0,right:16},B:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},C:{width:17,height:27,ascent:22,descent:5,left:-1,right:16},D:{width:17,height:27,ascent:22,descent:5,left:-2,right:16},E:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},F:{width:15,height:27,ascent:22,descent:5,left:-2,right:14},G:{width:19,height:27,ascent:22,descent:5,left:-1,right:17},H:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},I:{width:7,height:27,ascent:22,descent:5,left:-2,right:5},J:{width:12,height:27,ascent:22,descent:5,left:-1,right:10},K:{width:16,height:27,ascent:22,descent:5,left:-2,right:16},L:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},M:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},N:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},O:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},P:{width:16,height:27,ascent:22,descent:5,left:-2,right:15},Q:{width:19,height:27,ascent:22,descent:5,left:-1,right:18},R:{width:17,height:27,ascent:22,descent:5,left:-2,right:17},S:{width:16,height:27,ascent:22,descent:5,left:-1,right:15},T:{width:15,height:27,ascent:22,descent:5,left:-1,right:14},U:{width:17,height:27,ascent:22,descent:5,left:-2,right:15},V:{width:16,height:27,ascent:22,descent:5,left:0,right:16},W:{width:23,height:27,ascent:22,descent:5,left:0,right:22},X:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Y:{width:16,height:27,ascent:22,descent:5,left:0,right:16},Z:{width:15,height:27,ascent:22,descent:5,left:0,right:14},\"[\":{width:7,height:27,ascent:22,descent:5,left:-2,right:6},\"\\\\\":{width:7,height:27,ascent:22,descent:5,left:0,right:7},\"]\":{width:7,height:27,ascent:22,descent:5,left:0,right:5},\"^\":{width:11,height:27,ascent:22,descent:5,left:-1,right:11},_:{width:13,height:27,ascent:22,descent:5,left:0,right:14},\"`\":{width:8,height:27,ascent:22,descent:5,left:-1,right:5},a:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},b:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},c:{width:12,height:27,ascent:22,descent:5,left:-1,right:12},d:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},e:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},f:{width:7,height:27,ascent:22,descent:5,left:0,right:8},g:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},h:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},i:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},j:{width:5,height:27,ascent:22,descent:5,left:1,right:4},k:{width:12,height:27,ascent:22,descent:5,left:-2,right:12},l:{width:5,height:27,ascent:22,descent:5,left:-2,right:4},m:{width:20,height:27,ascent:22,descent:5,left:-2,right:18},n:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},o:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},p:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},q:{width:13,height:27,ascent:22,descent:5,left:-1,right:12},r:{width:8,height:27,ascent:22,descent:5,left:-2,right:8},s:{width:12,height:27,ascent:22,descent:5,left:-1,right:11},t:{width:7,height:27,ascent:22,descent:5,left:0,right:6},u:{width:13,height:27,ascent:22,descent:5,left:-2,right:12},v:{width:12,height:27,ascent:22,descent:5,left:0,right:12},w:{width:17,height:27,ascent:22,descent:5,left:0,right:17},x:{width:12,height:27,ascent:22,descent:5,left:0,right:12},y:{width:12,height:27,ascent:22,descent:5,left:0,right:12},z:{width:12,height:27,ascent:22,descent:5,left:0,right:11},\"{\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"|\":{width:6,height:27,ascent:22,descent:5,left:-2,right:4},\"}\":{width:8,height:27,ascent:22,descent:5,left:-1,right:7},\"~\":{width:14,height:27,ascent:22,descent:5,left:-1,right:13}},TZ=t=\u003e{if(!t)return 0;let e=0;for(const n of t){const o=tun[n];o?e+=o.width:e+=tun[\"?\"].width}return e/27},nun=.65,oun=.08;function h_e(t){return TZ(t.text||\"\")+(t.display_superscript?oun+TZ(t.display_superscript)*nun:0)}function ZWe(t,e,n,o=\"central\"){const i=[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}];return e\u0026\u0026i.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{class:\"sch-net-label-superscript\",\"font-size\":`${n*nun}px`,dx:`${n*oun}`,dy:`${-n*(o===\"ideographic\"?.5:.25)}`},children:[{type:\"text\",value:e,name:\"\",attributes:{},children:[]}]}),i}var SU=t=\u003e{switch(t){case\"top\":return{x:0,y:-1};case\"bottom\":return{x:0,y:1};case\"left\":return{x:1,y:0};case\"right\":return{x:-1,y:0}}throw new Error(`Invalid side: ${t}`)},NP=.3,QU=.3,vU=.06,iun=.2,run=t=\u003e({\"data-circuit-json-type\":\"schematic_net_label\",\"data-schematic-net-label-id\":t.schematic_net_label_id}),Nwi={top_left:\"start\",top_right:\"end\",middle_left:\"start\",middle_right:\"end\",bottom_left:\"start\",bottom_right:\"end\",center:\"middle\",middle_top:\"middle\",middle_bottom:\"middle\"},sun={top_left:\"hanging\",top_right:\"hanging\",bottom_left:\"ideographic\",bottom_right:\"ideographic\",center:\"middle\",middle_left:\"middle\",middle_right:\"middle\",middle_top:\"hanging\",middle_bottom:\"ideographic\"};function Rwi(t){return{left:180,top:90,bottom:-90,right:0}[t]??0}function Twi(t,e,n){const o=n+NP*2+vU*t.text.length+QU,i=SU(t.anchor_side);return t.anchor_position??{x:t.center.x-i.x*o*e/2,y:t.center.y-i.y*o*e/2}}var kwi=(t,e)=\u003e{const n=t\u003c0?t+2*Math.PI:t,o=e\u003c0?e+2*Math.PI:e;let i=Math.abs(n-o);return i\u003eMath.PI\u0026\u0026(i=2*Math.PI-i),i},aun=({schPorts:t,symbol:e,schComponent:n})=\u003e{const o=t.map(a=\u003e{const A=a.center.x-n.center.x,c=a.center.y-n.center.y;return{port:a,angle:Math.atan2(c,A)}}),i=e.ports.map(a=\u003e{const A=a.x-e.center.x,c=a.y-e.center.y;return{port:a,angle:Math.atan2(c,A)}});o.sort((a,A)=\u003ea.angle-A.angle),i.sort((a,A)=\u003ea.angle-A.angle);const r=[],s=new Set;for(const a of o){let A=null;for(const c of i){if(s.has(c.port))continue;const l=kwi(a.angle,c.angle);(A===null||l\u003cA.angleDiff)\u0026\u0026(A={symbolPort:c.port,angleDiff:l})}A\u0026\u0026A.angleDiff\u003cMath.PI/4\u0026\u0026(r.push({schPort:a.port,symbolPort:A.symbolPort}),s.add(A.symbolPort))}return r};function Aun(t,e,n,o){const i=Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2),s=Math.sqrt((o.x-e.x)**2+(o.y-e.y)**2)/i,a=e.x-s*t.x,A=e.y-s*t.y,c=PT(a,A),l=zWe(s,s);return pf(c,l)}function Fwi(t){const e=[],n=new Map,o=new Map;let i=null;for(const r of t)if(r.type===\"schematic_component\")e.push(r);else if(r.type===\"schematic_port\"\u0026\u0026r.schematic_component_id){const s=n.get(r.schematic_component_id)??[];s.push(r),n.set(r.schematic_component_id,s)}else r.type===\"source_component\"\u0026\u0026o.set(r.source_component_id,r);for(const r of e){const s=Lwi({component:r,schematicPorts:n.get(r.schematic_component_id)??[],sourceComponent:r.source_component_id?o.get(r.source_component_id):void 0});s\u0026\u0026(i=i?cun(i,s):s)}return i}function Lwi({component:t,schematicPorts:e,sourceComponent:n}){if(!t.symbol_name)return null;const o=Su[t.symbol_name];if(!o)return null;const i=aun({schPorts:e,symbol:o,schComponent:t});if(!i[0])return null;const r=Aun(i[1]?.symbolPort??o.center,i[1]?.schPort.center??t.center,i[0].symbolPort,i[0].schPort.center);let s=null;for(const a of o.primitives){if(a.type!==\"text\")continue;const A=Hwi({primitive:a,component:t,sourceComponent:n});if(!A)continue;const c=er(r,a),l=DP(\"reference_designator\"),u=Owi({x:c.x,y:c.y,width:TZ(A)*l,height:l,anchor:a.anchor});s=s?cun(s,u):u}return s}function Hwi({primitive:t,component:e,sourceComponent:n}){return t.text===\"{REF}\"?n?.display_name??n?.name??\"\":t.text===\"{VAL}\"?e.symbol_display_value??\"\":\"\"}function Owi({x:t,y:e,width:n,height:o,anchor:i}){let r=t,s=t,a=e-o/2,A=e+o/2;return i.includes(\"left\")?s=t+n:i.includes(\"right\")?r=t-n:(r=t-n/2,s=t+n/2),i.includes(\"top\")?(a=e-o,A=e):i.includes(\"bottom\")\u0026\u0026(a=e,A=e+o),{minX:r,minY:a,maxX:s,maxY:A}}function cun(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}var lun=(t,e)=\u003e{if(t.column_widths\u0026\u0026t.column_widths.length\u003e0\u0026\u0026t.row_heights\u0026\u0026t.row_heights.length\u003e0){const l=u=\u003etypeof u==\"number\"?u:u.endsWith(\"mm\")?parseFloat(u):u.endsWith(\"in\")?parseFloat(u)*25.4:parseFloat(u);return{column_widths:t.column_widths.map(l),row_heights:t.row_heights.map(l)}}const n=e.filter(l=\u003el.type===\"schematic_table_cell\"\u0026\u0026l.schematic_table_id===t.schematic_table_id);if(n.length===0)return{column_widths:[],row_heights:[]};const o=n.reduce((l,u)=\u003eMath.max(l,u.end_column_index),-1)+1,i=n.reduce((l,u)=\u003eMath.max(l,u.end_row_index),-1)+1,{cell_padding:r=.2}=t,s=new Array(o).fill(0),a=new Array(i).fill(0),A={},c={};for(const l of n){const u=DP(\"reference_designator\",l.font_size),h=TZ(l.text??\"\")*u+2*r,d=u*1.2+2*r,p=`${l.start_row_index}-${l.start_column_index}`;A[p]=h,c[p]=d}for(let l=0;l\u003ci;l++)for(let u=0;u\u003co;u++){const g=`${l}-${u}`;A[g]\u0026\u0026A[g]\u003es[u]\u0026\u0026(s[u]=A[g]),c[g]\u0026\u0026c[g]\u003ea[l]\u0026\u0026(a[l]=c[g])}for(const l of n){if(l.start_column_index===l.end_column_index\u0026\u0026l.start_row_index===l.end_row_index)continue;const u=`${l.start_row_index}-${l.start_column_index}`,g=A[u],h=c[u];if(g===void 0||h===void 0)continue;let d=0;for(let m=l.start_column_index;m\u003c=l.end_column_index;m++)d+=s[m];if(g\u003ed){const _=(g-d)/(l.end_column_index-l.start_column_index+1);for(let f=l.start_column_index;f\u003c=l.end_column_index;f++)s[f]+=_}let p=0;for(let m=l.start_row_index;m\u003c=l.end_row_index;m++)p+=a[m];if(h\u003ep){const _=(h-p)/(l.end_row_index-l.start_row_index+1);for(let f=l.start_row_index;f\u003c=l.end_row_index;f++)a[f]+=_}}return{column_widths:s,row_heights:a}},Gwi=10.16,Ywi=1.1,DT=Gwi/Ywi,Uwi=297/DT,Kwi=210/DT,p_e=5/DT;function eje(t={}){const e=t.center??{x:0,y:0},n=t.sheet_width===void 0?Uwi:t.sheet_width/DT,o=t.sheet_height===void 0?Kwi:t.sheet_height/DT,i=e.x-n/2,r=e.x+n/2,s=e.y-o/2,a=e.y+o/2;return{center:e,width:n,height:o,minX:i,maxX:r,minY:s,maxY:a,innerMinX:i+p_e,innerMaxX:r-p_e,innerMinY:s+p_e,innerMaxY:a-p_e}}function Vwi(t,e=.5){let n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const s=.2;for(const c of t)if(c.type===\"schematic_sheet\"){const l=eje(c);A(l.center,{width:l.width,height:l.height},0)}else if(c.type===\"schematic_component\")A(c.center,c.size,0);else if(c.type===\"schematic_port\")A(c.center,{width:s,height:s},0);else if(c.type===\"schematic_debug_object\")c.shape===\"rect\"?A(c.center,c.size,0):c.shape===\"line\"\u0026\u0026(A(c.start,{width:.1,height:.1},0),A(c.end,{width:.1,height:.1},0));else if(c.type===\"schematic_net_label\"){const l=DP(\"net_label\"),u=h_e(c),h=(u+NP*2+vU*(c.text?.length||0)+QU)*l,d=iun,p=Rwi(c.anchor_side)/180*Math.PI,m=Twi(c,l,u),_=SU(c.anchor_side),f={x:m.x+_.x*h/2,y:m.y+_.y*h/2};A(f,{width:h,height:d},p)}else if(c.type===\"schematic_trace\")for(const l of c.edges)A(l.from,{width:.1,height:.1},0),A(l.to,{width:.1,height:.1},0);else if(c.type===\"schematic_text\"){const u=DP(\"reference_designator\",c.font_size)??.18,g=c.text??\"\",h=c.display_superscript;if(h){const d=g.split(`\n`),p=Math.max(...d.map((x,E)=\u003eh_e({text:x,display_superscript:E===d.length-1?h:void 0})))*u,m=c.anchor,_=m===\"left\"||m.endsWith(\"_left\")?p/2:m===\"right\"||m.endsWith(\"_right\")?-p/2:0,f=m===\"top\"||m.startsWith(\"top_\")?0:m===\"bottom\"||m.startsWith(\"bottom_\")?-u:-u/2,I=(d.length+.3)*u,C=-(f-.3*u+I/2),y=-(c.rotation??0)*Math.PI/180;A({x:c.position.x+_*Math.cos(y)-C*Math.sin(y),y:c.position.y+_*Math.sin(y)+C*Math.cos(y)},{width:p,height:I},y)}else{const d=g.length*u,p=u;A(c.position,{width:d,height:p},c.rotation??0)}}else if(c.type===\"schematic_voltage_probe\"){if(A(c.position,{width:.2,height:.4},0),c.name){const l=DP(\"net_label\"),u=TZ(c.name)*l,g=l,h=.3,d=c.label_alignment??\"top_right\";let p=c.position.x,m=c.position.y;d.includes(\"top\")?m+=h+g/2:d.includes(\"bottom\")\u0026\u0026(m-=h+g/2),d.includes(\"right\")?p+=h+u/2:d.includes(\"left\")\u0026\u0026(p-=h+u/2),A({x:p,y:m},{width:u,height:g},0)}}else if(c.type===\"schematic_box\")A({x:c.x+c.width/2,y:c.y+c.height/2},{width:c.width,height:c.height},0);else if(c.type===\"schematic_table\"){const{column_widths:l,row_heights:u}=lun(c,t),g=l.reduce((I,C)=\u003eI+C,0),h=u.reduce((I,C)=\u003eI+C,0),d=c.anchor??\"center\";let p=c.anchor_position.x,m=c.anchor_position.y;d.includes(\"center\")?p-=g/2:d.includes(\"right\")\u0026\u0026(p-=g),d.includes(\"center\")?m+=h/2:d.includes(\"bottom\")\u0026\u0026(m+=h);const _=p+g/2,f=m-h/2;A({x:_,y:f},{width:g,height:h},0)}else if(c.type===\"schematic_line\")A({x:c.x1,y:c.y1},{width:.02,height:.02},0),A({x:c.x2,y:c.y2},{width:.02,height:.02},0);else if(c.type===\"schematic_circle\")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type===\"schematic_rect\")A(c.center,{width:c.width,height:c.height},c.rotation);else if(c.type===\"schematic_arc\")A(c.center,{width:c.radius*2,height:c.radius*2},0);else if(c.type===\"schematic_path\"\u0026\u0026c.points\u0026\u0026c.points.length\u003e0)for(const l of c.points)A(l,{width:.02,height:.02},0);Number.isFinite(n)||(n=-1,o=-1,i=1,r=1),n-=e,o-=e,i+=e,r+=e;const a=Fwi(t);return a\u0026\u0026(a.minX\u003cn\u0026\u0026(n=a.minX-e),a.minY\u003co\u0026\u0026(o=a.minY-e),a.maxX\u003ei\u0026\u0026(i=a.maxX+e),a.maxY\u003er\u0026\u0026(r=a.maxY+e)),{minX:n,minY:o,maxX:i,maxY:r};function A(c,l,u){const g=[{x:-l.width/2,y:-l.height/2},{x:l.width/2,y:-l.height/2},{x:l.width/2,y:l.height/2},{x:-l.width/2,y:l.height/2}];for(const h of g){const d=h.x*Math.cos(u)-h.y*Math.sin(u)+c.x,p=h.x*Math.sin(u)+h.y*Math.cos(u)+c.y;n=Math.min(n,d),o=Math.min(o,p),i=Math.max(i,d),r=Math.max(r,p)}}}function uun(t){if(t.type!==\"element\")throw new Error(\"Expected SVG root element to be of type 'element'\");return t}function gun(t){return{...t,attributes:{...t.attributes??{}},children:t.children?.map(gun)??[]}}function m_e(t,e,n,o,i){const r=gun(t);return r.attributes={...r.attributes,x:f4(e),y:f4(n),width:f4(o),height:f4(i)},delete r.attributes.xmlns,r}function f4(t){return Number.isFinite(t)?Number.parseFloat(t.toFixed(6)).toString():\"0\"}var kZ=\"image/svg+xml\";function zwi({schematicGraphic:t,viewport:e}){const n=Jwi(t);return{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-graphic\",\"pointer-events\":\"none\",\"data-circuit-json-type\":\"schematic_graphic\",\"data-schematic-graphic-id\":t.schematic_graphic_id,...t.schematic_sheet_id?{\"data-schematic-sheet-id\":t.schematic_sheet_id}:{}},children:[{name:\"image\",type:\"element\",value:\"\",attributes:{href:n,x:f4(e.x),y:f4(e.y),width:f4(e.width),height:f4(e.height),preserveAspectRatio:\"xMidYMid meet\",overflow:\"hidden\",\"pointer-events\":\"none\"},children:[]}]}}function Jwi(t){const e=`Unable to render schematic graphic \"${t.schematic_graphic_id}\"`,{asset:n,svg_content:o}=t;if(!n){if(o!==void 0)return dun(o);throw new Error(`${e}: asset or svg_content is required`)}if(hun(n.mimetype)!==kZ)throw new Error(`${e}: asset.mimetype must be \"${kZ}\" (received ${JSON.stringify(n.mimetype)})`);const i=n.url.trim();if(i.toLowerCase().startsWith(\"data:\"))return Wwi(i,e),i;if(o!==void 0)return dun(o);throw new Error(`${e}: asset.url must be an inline SVG data URL because circuit-to-svg cannot synchronously load ${JSON.stringify(n.url)}`)}function Wwi(t,e){const n=t.match(/^data:([^,]*),(.*)$/is);if(!n)throw new Error(`${e}: asset.url is not a valid SVG data URL`);const o=n[1].split(\";\").map(A=\u003eA.trim());if(hun(o.shift()??\"\")!==kZ)throw new Error(`${e}: asset.url must use the \"${kZ}\" media type`);const r=n[2],s=o.findIndex(A=\u003eA.toLowerCase()===\"base64\"),a=s!==-1;if(a\u0026\u0026s!==o.length-1)throw new Error(`${e}: asset.url must place \"base64\" as its final metadata token`);if(a){const A=r.replace(/\\s+/g,\"\");if(!/^(?:[a-z\\d+/]{4})*(?:[a-z\\d+/]{2}==|[a-z\\d+/]{3}=)?$/i.test(A))throw new Error(`${e}: asset.url is not a valid SVG data URL`);return}if(r.includes(\"#\"))throw new Error(`${e}: asset.url must percent-encode \"#\" in a non-base64 SVG data URL`);try{decodeURIComponent(r)}catch(A){throw new Error(`${e}: asset.url is not a valid SVG data URL`,{cause:A})}}function dun(t){const e=new TextEncoder().encode(t);let n=\"\";const o=32768;for(let i=0;i\u003ce.length;i+=o)n+=String.fromCharCode(...e.subarray(i,i+o));return`data:${kZ};base64,${btoa(n)}`}function hun(t){return(t.split(\";\",1)[0]??\"\").trim().toLowerCase()}var c_=t=\u003eMath.abs(t.a)*.02,tje=({text:t,realCenter:e,realToScreenTransform:n})=\u003e{const o=er(n,e);return{type:\"element\",name:\"text\",value:\"\",attributes:{x:o.x.toString(),y:o.y.toString(),fill:\"red\",\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${PE(n,\"error\")}px`},children:[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}]}},jwi=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=\u003e{if(!t.text)return[];const o=t.text.startsWith(\"N_\"),i=o?t.text.slice(2):t.text,r=run(t),s=[],a=Su[t.symbol_name];if(!a){const O=tje({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e});return O.attributes={...O.attributes,...r},s.push(O),s}const A=a.primitives.filter(O=\u003eO.type===\"path\"),c=a.primitives.filter(O=\u003eO.type===\"text\"),l=a.primitives.filter(O=\u003eO.type===\"circle\"),u=a.primitives.filter(O=\u003eO.type===\"box\"),g={minX:Math.min(...A.flatMap(O=\u003eO.points.map(U=\u003eU.x))),maxX:Math.max(...A.flatMap(O=\u003eO.points.map(U=\u003eU.x))),minY:Math.min(...A.flatMap(O=\u003eO.points.map(U=\u003eU.y))),maxY:Math.max(...A.flatMap(O=\u003eO.points.map(U=\u003eU.y)))},h=DP(\"net_label\"),p=h_e({...t,text:i})+NP*2+vU*i.length+QU,m=SU(t.anchor_side),_=t.anchor_position??{x:t.center.x-m.x*p*h/2,y:t.center.y-m.y*p*h/2},I=z0n(0/180*Math.PI),C={minX:Math.min(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.x):[])),maxX:Math.max(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.x):[])),minY:Math.min(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.y):[])),maxY:Math.max(...a.primitives.flatMap(O=\u003eO.type===\"path\"?O.points.map(U=\u003eU.y):[]))},y=a.ports?.[0]?{x:a.ports[0].x,y:a.ports[0].y}:{x:C.minX,y:(C.minY+C.maxY)/2},x=er(I,y),E=pf(PT(_.x-x.x,_.y-x.y),I,zWe(1)),[B,S]=er(pf(e,E),[g.minX,g.minY]),[Q,w]=er(pf(e,E),[g.maxX,g.maxY]),M=Math.abs(w-S),k=Math.min(S,w),R=Math.abs(Q-B),F=Math.min(B,Q);s.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay sch-net-label-overlay\",...r,x:F.toString(),y:k.toString(),width:R.toString(),height:M.toString(),fill:\"transparent\"},children:[]});for(const O of A){const U=O.points.map((Y,W)=\u003e{const[te,j]=er(pf(e,E),[Y.x,Y.y]);return`${W===0?\"M\":\"L\"} ${te} ${j}`}).join(\" \");s.push({name:\"path\",type:\"element\",attributes:{class:\"sch-net-label-symbol-path\",...r,d:U+(O.closed?\" Z\":\"\"),stroke:n.schematic.component_outline,fill:\"none\",\"stroke-width\":`${c_(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}for(const O of c){const U=er(pf(e,E),O);let Y=O.text;Y===\"{REF}\"?Y=i||\"\":Y===\"{VAL}\"\u0026\u0026(Y=\"\"),Math.abs(e.a);const W={x:U.x,y:U.y};s.push({name:\"text\",type:\"element\",attributes:{class:\"sch-net-label-symbol-text\",...r,x:W.x.toString(),y:W.y.toString(),fill:n.schematic.label_local,\"font-family\":\"sans-serif\",\"text-anchor\":Nwi[O.anchor],\"dominant-baseline\":sun[O.anchor],\"font-size\":`${PE(e,\"reference_designator\")}px`,...o\u0026\u0026Y===i?{style:\"text-decoration: overline;\"}:{}},children:ZWe(Y,O.text===\"{REF}\"?t.display_superscript:void 0,PE(e,\"reference_designator\"),sun[O.anchor]),value:\"\"})}for(const O of u){const U=er(pf(e,E),O),Y=pf(e,E).a;s.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-net-label-symbol-box\",...r,x:U.x.toString(),y:U.y.toString(),width:(O.width*Y).toString(),height:(O.height*Y).toString(),fill:\"red\"},value:\"\",children:[]})}for(const O of l){const U=er(pf(e,E),O),Y=pf(e,E).a;s.push({name:\"circle\",type:\"element\",attributes:{class:\"sch-net-label-symbol-circle\",...r,cx:U.x.toString(),cy:U.y.toString(),r:(O.radius*Y).toString(),fill:\"none\",stroke:n.schematic.component_outline,\"stroke-width\":`${c_(e)}px`},value:\"\",children:[]})}return s},$wi=({schNetLabel:t,realToScreenTransform:e,colorMap:n})=\u003e{if(!t.text)return[];const o=t.text;if(t.symbol_name)return jwi({schNetLabel:t,realToScreenTransform:e,colorMap:n});const i=run(t),r=[],s=PE(e,\"net_label\"),a=DP(\"net_label\"),A=iun/a/2,c=h_e({...t,text:o}),l=er(e,t.center),u=SU(t.anchor_side),g={...u};g.y*=-1;const h=c+NP*2+vU*o.length+QU,d=t.anchor_position?er(e,t.anchor_position):{x:l.x-g.x*h*s/2,y:l.y-g.y*h*s/2},p=t.anchor_position??{x:t.center.x-u.x*h*a/2,y:t.center.y-u.y*h*a/2},m={left:0,top:-90,bottom:90,right:180}[t.anchor_side],_=[{x:0,y:0},{x:NP,y:A},{x:NP*2+QU+vU*o.length+c,y:A},{x:NP*2+QU+vU*o.length+c,y:-A},{x:NP,y:-A}].map(x=\u003eer(pf(e,PT(p.x,p.y),zWe(a),z0n(m/180*Math.PI)),x)),f=`\n M ${_[0].x},${_[0].y}\n L ${_[1].x},${_[1].y}\n L ${_[2].x},${_[2].y}\n L ${_[3].x},${_[3].y}\n L ${_[4].x},${_[4].y}\n Z\n `;r.push({name:\"path\",type:\"element\",attributes:{class:\"net-label sch-net-label\",...i,d:f,fill:n.schematic.label_background,stroke:n.schematic.label_global,\"stroke-width\":`${c_(e)}px`},value:\"\",children:[]});const I={x:d.x+g.x*s*.5,y:d.y+g.y*s*.5},C={left:\"start\",top:\"start\",bottom:\"start\",right:\"end\"}[t.anchor_side],y={left:\"\",right:\"\",top:`rotate(90 ${I.x} ${I.y})`,bottom:`rotate(-90 ${I.x} ${I.y})`}[t.anchor_side];return r.push({name:\"text\",type:\"element\",attributes:{class:\"net-label-text sch-net-label-text\",...i,x:I.x.toString(),y:I.y.toString(),fill:n.schematic.label_global,\"text-anchor\":C,\"dominant-baseline\":\"central\",\"font-family\":\"sans-serif\",\"font-variant-numeric\":\"tabular-nums\",\"font-size\":`${s}px`,transform:y},children:ZWe(o,t.display_superscript,s),value:\"\"}),r},qwi=.02,Xwi=({schPort:t,transform:e})=\u003e{const n=er(e,t.center),o=Math.abs(e.a)*qwi*2;return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-port-hover sch-port-hover\",\"data-schematic-port-id\":t.source_port_id,...t.schematic_sheet_id?{\"data-schematic-sheet-id\":t.schematic_sheet_id}:{}},children:[{name:\"circle\",type:\"element\",value:\"\",attributes:{cx:n.x.toString(),cy:n.y.toString(),r:o.toString(),fill:\"red\",opacity:\"0\"},children:[]}]}]},Zwi=({component:t,transform:e,circuitJson:n})=\u003e{const o=MT(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),i=[];for(const r of o)i.push(...Xwi({schPort:r,transform:e}));return i},ePi=({schPort:t,transform:e,colorMap:n})=\u003e{const{x:i,y:r}=t.center,s=[-1,1].map(a=\u003e{const A=er(e,{x:i-.05,y:r-a*.05}),c=er(e,{x:i+.05,y:r+a*.05});return`M ${A.x} ${A.y} L ${c.x} ${c.y}`}).join(\" \");return{name:\"path\",type:\"element\",value:\"\",attributes:{class:\"sch-port-no-connect\",\"data-schematic-port-id\":t.schematic_port_id,\"data-source-port-id\":t.source_port_id,d:s,fill:\"none\",stroke:n.schematic.no_connect,\"stroke-width\":`${c_(e)}px`,\"stroke-linecap\":\"round\"},children:[]}},pun=.02,tPi=({schPort:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=Math.abs(e.a)*pun,s=Math.abs(e.a)*pun,a=er(e,t.center),A=n.find(l=\u003el.type===\"source_port\"\u0026\u0026l.source_port_id===t.source_port_id);A?.do_not_connect||i.push({name:\"circle\",type:\"element\",value:\"\",attributes:{class:\"component-pin sch-component-pin sch-port-indicator\",cx:a.x.toString(),cy:a.y.toString(),r:r.toString(),fill:\"none\",stroke:o.schematic.component_outline,\"stroke-width\":s.toString(),\"data-schematic-port-id\":t.schematic_port_id},children:[]});const c=t.display_pin_label??A?.name;if(c){const l={...t.center},u=t.distance_from_component_edge??0,g=.05;let h=\"middle\",d=\"\";switch(t.facing_direction){case\"left\":l.x+=u/2,l.y+=g,h=\"start\";break;case\"right\":l.x-=u/2,l.y+=g,h=\"end\";break;case\"up\":l.y-=u/2,l.x-=g,h=\"middle\";break;case\"down\":l.y+=u/2,l.x-=g,h=\"middle\";break}const p=er(e,l),m=PE(e,\"pin_number\");(t.facing_direction===\"up\"||t.facing_direction===\"down\")\u0026\u0026(d=`rotate(-90 ${p.x} ${p.y})`),i.push({name:\"text\",type:\"element\",value:\"\",attributes:{class:\"port-indicator-label sch-port-label\",x:p.x.toString(),y:p.y.toString(),fill:o.schematic.component_outline,\"font-family\":\"sans-serif\",\"font-size\":`${m*.7}px`,\"text-anchor\":h,\"dominant-baseline\":\"middle\",...d\u0026\u0026{transform:d}},children:[{type:\"text\",value:c,name:\"\",attributes:{},children:[]}]})}return i},mun=t=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:t.is_overlined?{\"text-decoration\":\"overline\"}:{},children:[{type:\"text\",name:\"\",value:t.text,attributes:{},children:[]}]}),nPi=t=\u003et.filter(e=\u003ee.text).map(mun),oPi=t=\u003e{const e=[[]];for(const n of t)n.text.split(`\n`).forEach((o,i)=\u003e{i\u003e0\u0026\u0026e.push([]),o\u0026\u0026e.at(-1).push(mun({...n,text:o}))});return e},nje=({elm:t,transform:e,colorMap:n})=\u003e{const o=er(e,t.position),i={center:\"middle\",center_right:\"end\",bottom_left:\"start\",bottom_center:\"middle\",bottom_right:\"end\",left:\"start\",right:\"end\",top:\"middle\",bottom:\"middle\",top_left:\"start\",top_center:\"middle\",top_right:\"end\",center_left:\"start\"},r={center:\"middle\",center_right:\"middle\",bottom_left:\"ideographic\",bottom_center:\"ideographic\",bottom_right:\"ideographic\",left:\"middle\",right:\"middle\",top:\"hanging\",bottom:\"ideographic\",top_left:\"hanging\",top_center:\"hanging\",top_right:\"hanging\",center_left:\"middle\"},s=t.text.split(`\n`),a=oPi(t.text_parts??[]),A=s.length===1?t.text_parts?.length?a[0]:[{type:\"text\",value:t.text,name:t.schematic_text_id,attributes:{},children:[]}]:s.map((c,l)=\u003e({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:o.x.toString(),...l\u003e0?{dy:\"1em\"}:{}},children:t.text_parts?.length?a[l]??[]:[{type:\"text\",value:c,name:l===0?t.schematic_text_id:\"\",attributes:{},children:[]}]}));return t.display_superscript\u0026\u0026(s.length===1?A:A[A.length-1].children).push(...ZWe(\"\",t.display_superscript,PE(e,\"reference_designator\",t.font_size),r[t.anchor]).slice(1)),{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-text\",\"data-schematic-text-id\":t.schematic_text_id,x:o.x.toString(),y:o.y.toString(),fill:t.color??n.schematic.sheet_label,\"text-anchor\":i[t.anchor],\"dominant-baseline\":r[t.anchor],\"font-family\":\"sans-serif\",\"font-size\":`${PE(e,\"reference_designator\",t.font_size)}px`,transform:`rotate(${t.rotation}, ${o.x}, ${o.y})`},children:A}};function _un({schArc:t,transform:e,colorMap:n}){const o=er(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=t.start_angle_degrees*Math.PI/180,A=t.end_angle_degrees*Math.PI/180,c=o.x+i*Math.cos(a),l=o.y+i*Math.sin(a),u=o.x+i*Math.cos(A),g=o.y+i*Math.sin(A);let h=t.end_angle_degrees-t.start_angle_degrees;t.direction===\"clockwise\"\u0026\u0026(h=-h),h\u003c0\u0026\u0026(h+=360);const d=h\u003e180?1:0,p=t.direction===\"clockwise\"?1:0;return[{name:\"path\",type:\"element\",attributes:{class:\"sch-arc\",d:`M ${c} ${l} A ${i} ${i} 0 ${d} ${p} ${u} ${g}`,fill:\"none\",stroke:t.color,\"stroke-width\":s.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(s*3).toString()},\"data-schematic-arc-id\":t.schematic_arc_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var iPi=({schematicBox:t,transform:e,colorMap:n})=\u003e{const o=er(e,{x:t.x,y:t.y}),i=er(e,{x:t.x+t.width,y:t.y+t.height}),r=Math.min(o.y,i.y),s=Math.max(o.y,i.y),a=Math.min(o.x,i.x),A=Math.max(o.x,i.x),c=c_(e),l={class:\"schematic-box sch-box\",x:a.toString(),y:r.toString(),width:(A-a).toString(),height:(s-r).toString(),\"stroke-width\":`${c}px`,stroke:n.schematic.component_outline||\"black\",fill:\"transparent\"};if(t.is_dashed){const u=8*c,g=4*c;l[\"stroke-dasharray\"]=`${u} ${g}`}return[{name:\"rect\",type:\"element\",value:\"\",attributes:l,children:[]}]};function fun({schCircle:t,transform:e,colorMap:n}){const o=er(e,t.center),i=Math.abs(e.a)*t.radius,r=t.stroke_width??.02,s=Math.abs(e.a)*r;return[{name:\"circle\",type:\"element\",attributes:{class:\"sch-circle\",cx:o.x.toString(),cy:o.y.toString(),r:i.toString(),fill:t.is_filled?t.fill_color??t.color:\"none\",stroke:t.color,\"stroke-width\":s.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(s*3).toString()},\"data-schematic-circle-id\":t.schematic_circle_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var Iun=(t,e)=\u003e{for(const n of t){if(n.type!==\"source_trace\")continue;const o=n;if(Array.isArray(o.connected_source_port_ids)\u0026\u0026o.connected_source_port_ids.includes(e))return!0}return!1},rPi={top_left:\"start\",top_right:\"end\",middle_left:\"start\",middle_right:\"end\",bottom_left:\"start\",bottom_right:\"end\",center:\"middle\",middle_top:\"middle\",middle_bottom:\"middle\"},sPi={top_left:\"hanging\",top_right:\"hanging\",bottom_left:\"ideographic\",bottom_right:\"ideographic\",center:\"middle\",middle_left:\"middle\",middle_right:\"middle\",middle_top:\"hanging\",middle_bottom:\"ideographic\"},aPi=({component:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=Su[t.symbol_name];if(!r)return[tje({text:`Symbol not found: ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const s=MT(n).schematic_port.list({schematic_component_id:t.schematic_component_id}),a=MT(n).source_component.get(t.source_component_id),A=aun({schPorts:s,symbol:r,schComponent:t});if(!A[0])return[tje({text:`Could not match ports for symbol ${t.symbol_name}`,realCenter:t.center,realToScreenTransform:e})];const c=Aun(A[1]?.symbolPort??r.center,A[1]?.schPort.center??t.center,A[0].symbolPort,A[0].schPort.center),l=r.primitives.filter(B=\u003eB.type===\"path\"),u=r.primitives.filter(B=\u003eB.type===\"text\"),g=r.primitives.filter(B=\u003eB.type===\"circle\"),h=r.primitives.filter(B=\u003eB.type===\"box\"),d=new Set;for(const B of A)(Iun(n,B.schPort.source_port_id)||MT(n).source_port.get(B.schPort.source_port_id)?.do_not_connect)\u0026\u0026d.add(B.symbolPort);const p={minX:Math.min(...l.flatMap(B=\u003eB.points.map(S=\u003eS.x))),maxX:Math.max(...l.flatMap(B=\u003eB.points.map(S=\u003eS.x))),minY:Math.min(...l.flatMap(B=\u003eB.points.map(S=\u003eS.y))),maxY:Math.max(...l.flatMap(B=\u003eB.points.map(S=\u003eS.y)))},[m,_]=er(pf(e,c),[p.minX,p.minY]),[f,I]=er(pf(e,c),[p.maxX,p.maxY]),C=Math.abs(I-_),y=Math.min(_,I),x=Math.abs(f-m),E=Math.min(m,f);i.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay\",x:E.toString(),y:y.toString(),width:x.toString(),height:C.toString(),fill:\"transparent\"},children:[]});for(const B of l){const{points:S,color:Q,closed:w,fill:M}=B;i.push({type:\"element\",name:\"path\",attributes:{class:\"sch-component-symbol-path\",d:S.map((k,R)=\u003e{const[F,O]=er(pf(e,c),[k.x,k.y]);return`${R===0?\"M\":\"L\"} ${F} ${O}`}).join(\" \")+(w?\" Z\":\"\"),stroke:o.schematic.component_outline,fill:\"none\",\"stroke-width\":`${c_(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}for(const B of u){const S=er(pf(e,c),B);let Q=\"\";const w=B.text===\"{REF}\";w?Q=a?.display_name??a?.name??\"\":B.text===\"{VAL}\"\u0026\u0026(Q=t.symbol_display_value??\"\");const M=sPi[B.anchor];i.push({name:\"text\",type:\"element\",attributes:{class:w?\"sch-component-name sch-component-text\":\"sch-component-text\",x:S.x.toString(),y:S.y.toString(),...w?{stroke:o.schematic.background,\"stroke-width\":`${c_(e)}px`,\"paint-order\":\"stroke\"}:{},fill:o.schematic.label_local,\"font-family\":\"sans-serif\",\"text-anchor\":rPi[B.anchor],\"dominant-baseline\":M,\"font-size\":`${PE(e,\"reference_designator\")}px`},value:\"\",children:[{type:\"text\",value:Q,name:\"\",attributes:{},children:[]}]})}for(const B of h){const S=er(pf(e,c),B),Q=pf(e,c).a;i.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-component-symbol-box\",x:S.x.toString(),y:S.y.toString(),width:(B.width*Q).toString(),height:(B.height*Q).toString(),fill:\"red\"},value:\"\",children:[]})}for(const B of r.ports){if(d.has(B))continue;const S=er(pf(e,c),B);i.push({type:\"element\",name:\"circle\",attributes:{class:\"component-pin sch-component-pin\",cx:S.x.toString(),cy:S.y.toString(),r:`${Math.abs(e.a)*.02}px`,\"stroke-width\":`${c_(e)}px`,fill:\"none\",stroke:o.schematic.component_outline},value:\"\",children:[]})}for(const B of g){const S=er(pf(e,c),B),Q=Math.abs(B.radius*e.a);i.push({type:\"element\",name:\"circle\",attributes:{class:\"sch-component-symbol-circle\",cx:S.x.toString(),cy:S.y.toString(),r:`${Q}px`,\"stroke-width\":`${c_(e)}px`,fill:\"none\",stroke:o.schematic.component_outline},value:\"\",children:[]})}return i},FZ=.02,Cun=(t,e,n,o,i)=\u003e{const r=Math.PI/6,s={x:t.x-n*Math.cos(e-r),y:t.y-n*Math.sin(e-r)},a={x:t.x-n*Math.cos(e+r),y:t.y-n*Math.sin(e+r)};return{name:\"polygon\",type:\"element\",attributes:{points:`${t.x},${t.y} ${s.x},${s.y} ${a.x},${a.y}`,fill:\"white\",stroke:o,\"stroke-width\":`${i}px`},value:\"\",children:[]}},APi=({schPort:t,schComponent:e,transform:n,circuitJson:o})=\u003e{const i=[],r=MT(o).source_port.get(t.source_port_id),s={x:t.center.x,y:t.center.y},a=t.distance_from_component_edge??.4;switch(t.side_of_component){case\"left\":s.x+=a;break;case\"right\":s.x-=a;break;case\"top\":s.y-=a;break;case\"bottom\":s.y+=a;break}const A=er(n,t.center),c=er(n,s),l=r!=null\u0026\u0026r.source_component_id==null\u0026\u0026typeof t.is_connected==\"boolean\"?t.is_connected:Iun(o,t.source_port_id),u=t.is_drawn_with_inversion_circle??!1,g=.06,h={...t.center};if(!l\u0026\u0026!r?.do_not_connect)switch(t.side_of_component){case\"left\":h.x+=FZ;break;case\"right\":h.x-=FZ;break;case\"top\":h.y-=FZ;break;case\"bottom\":h.y+=FZ;break}const d=er(n,h);if(u){const I=Math.abs(n.a)*g,C={...c};switch(t.side_of_component){case\"left\":C.x-=I,c.x-=I*2;break;case\"right\":C.x+=I,c.x+=I*2;break;case\"top\":C.y-=I,c.y-=I*2;break;case\"bottom\":C.y+=I,c.y+=I*2;break}i.push({name:\"circle\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-inversion-bubble\",cx:C.x.toString(),cy:C.y.toString(),r:I.toString(),fill:\"white\",stroke:$h.schematic.component_outline,\"stroke-width\":`${c_(n)}px`},value:\"\",children:[]})}i.push({name:\"line\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-port-line\",x1:c.x.toString(),y1:c.y.toString(),x2:d.x.toString(),y2:d.y.toString(),\"stroke-width\":`${c_(n)}px`},value:\"\",children:[]});const p=Math.abs(n.a)*FZ,m=[];!l\u0026\u0026!r?.do_not_connect\u0026\u0026m.push({name:\"circle\",type:\"element\",attributes:{class:\"component-pin sch-component-pin sch-port-terminal\",cx:A.x.toString(),cy:A.y.toString(),r:p.toString(),\"stroke-width\":`${c_(n)}px`},value:\"\",children:[]}),m.push({name:\"rect\",type:\"element\",attributes:{x:(A.x-p).toString(),y:(A.y-p).toString(),width:(p*2).toString(),height:(p*2).toString(),opacity:\"0\"},value:\"\",children:[]}),i.push({name:\"g\",type:\"element\",value:\"\",attributes:{class:\"sch-port\",\"data-schematic-port-id\":t.source_port_id},children:m});const{has_input_arrow:_,has_output_arrow:f}=t;if((_||f)\u0026\u0026t.side_of_component){const I=Math.abs(n.a)*.1,C=$h.schematic.component_outline,y=I*Math.cos(Math.PI/6),x=c_(n)/3;let E=0,B=0;t.side_of_component===\"left\"?(E=0,B=Math.PI):t.side_of_component===\"right\"?(E=Math.PI,B=0):t.side_of_component===\"top\"?(E=Math.PI/2,B=-Math.PI/2):t.side_of_component===\"bottom\"\u0026\u0026(E=-Math.PI/2,B=Math.PI/2);const S=_\u0026\u0026f;let Q={...c},w={...c};if(S){const M=y;t.side_of_component===\"left\"?w.x-=M:t.side_of_component===\"right\"?w.x+=M:t.side_of_component===\"top\"?w.y-=M:t.side_of_component===\"bottom\"\u0026\u0026(w.y+=M)}if(_\u0026\u0026i.push(Cun(Q,E,I,C,x)),f){const M={x:w.x+I*Math.cos(B),y:w.y+I*Math.sin(B)};i.push(Cun(M,B,I,C,x))}}return i},cPi=t=\u003e{const e=[],{schPort:n,transform:o}=t,i={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const r=SU(n.side_of_component),s=n.distance_from_component_edge??.4;i.x+=r.x*s/2,i.y+=r.y*s/2,n.side_of_component===\"top\"||n.side_of_component===\"bottom\"?i.x-=.02:i.y+=.02;const a=er(o,i);return e.push({name:\"text\",type:\"element\",attributes:{class:\"pin-number sch-pin-number\",x:a.x.toString(),y:a.y.toString(),style:\"font-family: sans-serif;\",fill:$h.schematic.pin_number,\"text-anchor\":\"middle\",\"dominant-baseline\":\"auto\",\"font-size\":`${PE(o,\"pin_number\")}px`,transform:n.side_of_component===\"top\"||n.side_of_component===\"bottom\"?`rotate(-90 ${a.x} ${a.y})`:\"\"},children:[{type:\"text\",value:n.pin_number?.toString()||\"\",name:\"\",attributes:{},children:[]}],value:\"\"}),e},yun=.1,xun=t=\u003e{const e=[],{schPort:n,schComponent:o,transform:i,labelColor:r=$h.schematic.pin_number,labelClassName:s=\"pin-number sch-pin-label\"}=t,a={x:n.center.x,y:n.center.y};if(!n.side_of_component)return[];const A=SU(n.side_of_component),c=n.distance_from_component_edge??.4;a.x+=A.x*(c+yun),a.y+=A.y*(c+yun);const l=er(i,a),u=n.display_pin_label??o.port_labels?.[`${n.pin_number}`];if(!u)return[];const g=u.startsWith(\"N_\"),h=g?u.slice(2):u,d=n.display_pin_label_text_parts,p=n.is_drawn_with_inversion_circle??!1,m=PE(i,g||p?\"negated_pin_number\":\"pin_number\",n.display_pin_label_font_size);return e.push({name:\"text\",type:\"element\",attributes:{class:s,x:l.x.toString(),y:l.y.toString(),style:`font-family: sans-serif;${g\u0026\u0026!d?.length?\" text-decoration: overline;\":\"\"}`,fill:r,\"text-anchor\":n.side_of_component===\"left\"||n.side_of_component===\"bottom\"?\"start\":\"end\",\"dominant-baseline\":\"middle\",\"font-size\":`${m}px`,transform:n.side_of_component===\"top\"||n.side_of_component===\"bottom\"?`rotate(-90 ${l.x} ${l.y})`:\"\"},children:d?.length?nPi(d):[{type:\"text\",value:h||\"\",name:\"\",attributes:{},children:[]}],value:\"\"}),e},lPi=t=\u003e{const e=[];return e.push(...APi(t)),e.push(...cPi(t)),e.push(...xun(t)),e},uPi=({component:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=er(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),s=er(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2}),a=s.x-r.x,A=s.y-r.y;i.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component chip sch-component-body\",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),\"stroke-width\":`${c_(e)}px`,fill:o.schematic.component_body,stroke:o.schematic.component_outline},children:[]}),i.push({name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"component-overlay sch-component-overlay\",x:r.x.toString(),y:r.y.toString(),width:a.toString(),height:A.toString(),fill:\"transparent\"},children:[]});const c=MT(n).schematic_text.list();for(const u of c)u.schematic_component_id===t.schematic_component_id\u0026\u0026i.push(nje({elm:u,transform:e,colorMap:o}));const l=MT(n).schematic_port.list({schematic_component_id:t.schematic_component_id});for(const u of l)i.push(...lPi({schPort:u,schComponent:t,transform:e,circuitJson:n}));return i};function Eun({isDashed:t,dashLength:e,dashGap:n,strokeWidth:o,transform:i}){if(!t)return;const r=Math.abs(i.a),s=o*r*3,a=e!==void 0?e*r:s,A=n!==void 0?n*r:s;return`${a} ${A}`}function Bun({schLine:t,transform:e,colorMap:n}){const o=er(e,{x:t.x1,y:t.y1}),i=er(e,{x:t.x2,y:t.y2}),r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=Eun({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return[{name:\"line\",type:\"element\",attributes:{class:\"sch-line\",x1:o.x.toString(),y1:o.y.toString(),x2:i.x.toString(),y2:i.y.toString(),stroke:t.color,\"stroke-width\":s.toString(),...a\u0026\u0026{\"stroke-dasharray\":a},\"data-schematic-line-id\":t.schematic_line_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}function bun({schRect:t,transform:e,colorMap:n}){const o=er(e,t.center),i=Math.abs(e.a)*t.width,r=Math.abs(e.d)*t.height,s=t.stroke_width??.02,a=Math.abs(e.a)*s,A=o.x-i/2,c=o.y-r/2;return[{name:\"rect\",type:\"element\",attributes:{class:\"sch-rect\",x:A.toString(),y:c.toString(),width:i.toString(),height:r.toString(),fill:t.is_filled?t.fill_color??t.color:\"none\",stroke:t.color,\"stroke-width\":a.toString(),...t.is_dashed\u0026\u0026{\"stroke-dasharray\":(a*3).toString()},...t.rotation!==0\u0026\u0026{transform:`rotate(${t.rotation} ${o.x} ${o.y})`},\"data-schematic-rect-id\":t.schematic_rect_id,...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}function Sun({schPath:t,transform:e,colorMap:n}){const o=t.stroke_color??n.schematic.component_outline,i=t.fill_color??\"none\",r=t.stroke_width??.02,s=Math.abs(e.a)*r,a=Eun({isDashed:t.is_dashed,dashLength:t.dash_length,dashGap:t.dash_gap,strokeWidth:r,transform:e});return!t.points||t.points.length\u003c2?[]:[{name:\"path\",type:\"element\",attributes:{class:\"sch-path\",d:t.points.map(l=\u003eer(e,{x:l.x,y:l.y})).map((l,u)=\u003e`${u===0?\"M\":\"L\"} ${l.x} ${l.y}`).join(\" \"),stroke:o,\"stroke-width\":s.toString(),fill:t.is_filled?i:\"none\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",...a\u0026\u0026{\"stroke-dasharray\":a},...t.schematic_component_id\u0026\u0026{\"data-schematic-component-id\":t.schematic_component_id}},children:[],value:\"\"}]}var gPi=({component:t,transform:e,circuitJson:n,colorMap:o})=\u003e{const i=[],r=t.schematic_component_id;for(const s of n)!(\"schematic_component_id\"in s)||s.schematic_component_id!==r||(s.type===\"schematic_text\"\u0026\u0026t.is_box_with_pins===!1?i.push(nje({elm:s,transform:e,colorMap:o})):s.type===\"schematic_line\"?i.push(...Bun({schLine:s,transform:e,colorMap:o})):s.type===\"schematic_circle\"?i.push(...fun({schCircle:s,transform:e,colorMap:o})):s.type===\"schematic_rect\"?i.push(...bun({schRect:s,transform:e,colorMap:o})):s.type===\"schematic_arc\"?i.push(..._un({schArc:s,transform:e,colorMap:o})):s.type===\"schematic_path\"\u0026\u0026i.push(...Sun({schPath:s,transform:e,colorMap:o})));if(t.is_box_with_pins===!1){const s=n.filter(A=\u003eA.type===\"schematic_line\"\u0026\u0026A.schematic_component_id===r),a=n.filter(A=\u003eA.type===\"schematic_port\"\u0026\u0026A.schematic_component_id===r);for(const A of a){const c=s.find(p=\u003ep.x1===A.center.x\u0026\u0026p.y1===A.center.y||p.x2===A.center.x\u0026\u0026p.y2===A.center.y);if(!c)continue;const l=c.x1===A.center.x\u0026\u0026c.y1===A.center.y?{x:c.x2,y:c.y2}:{x:c.x1,y:c.y1},u=l.x-A.center.x,g=l.y-A.center.y,h=Math.abs(u)\u003eMath.abs(g)?u\u003e0?\"left\":\"right\":g\u003e0?\"bottom\":\"top\",d=Math.max(Math.abs(u),Math.abs(g));i.push(...xun({schPort:{...A,side_of_component:h,distance_from_component_edge:d},schComponent:t,transform:e,labelClassName:\"port-label sch-pin-label\",labelColor:o.schematic.pin_name}))}}return i};function dPi(t){const{component:e}=t;let n=[];e.is_box_with_pins!==!1\u0026\u0026(e.symbol_name?n=aPi(t):n=uPi(t));const o=gPi(t),i=[...n,...o];return[{type:\"element\",name:\"g\",attributes:{class:\"sch-component\",\"data-circuit-json-type\":\"schematic_component\",\"data-schematic-component-id\":e.schematic_component_id,...e.schematic_sheet_id?{\"data-schematic-sheet-id\":e.schematic_sheet_id}:{}},children:i,value:\"\"}]}function hPi({debugObject:t,transform:e}){if(t.shape===\"rect\"){let[n,o]=er(e,[t.center.x-t.size.width/2,t.center.y-t.size.height/2]),[i,r]=er(e,[t.center.x+t.size.width/2,t.center.y+t.size.height/2]);[o,r]=[Math.min(o,r),Math.max(o,r)];const s=Math.abs(i-n),a=Math.abs(r-o),[A,c]=er(e,[t.center.x,t.center.y]);return[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:n.toString(),y:o.toString(),width:s.toString(),height:a.toString(),fill:\"none\",stroke:\"red\",\"stroke-width\":(.02*Math.abs(e.a)).toString(),\"stroke-dasharray\":\"5,5\"},children:t.label?[{name:\"text\",type:\"element\",value:\"\",attributes:{x:A.toString(),y:(c-10).toString(),\"text-anchor\":\"middle\",\"font-size\":(.2*Math.abs(e.a)).toString(),fill:\"red\"},children:[{type:\"text\",value:t.label,name:\"\",attributes:{},children:[]}]}]:[]}]}if(t.shape===\"line\"){const[n,o]=er(e,[t.start.x,t.start.y]),[i,r]=er(e,[t.end.x,t.end.y]),s=(n+i)/2,a=(o+r)/2;return[{name:\"line\",type:\"element\",value:\"\",attributes:{x1:n.toString(),y1:o.toString(),x2:i.toString(),y2:r.toString(),stroke:\"red\",\"stroke-width\":(.02*Math.abs(e.a)).toString(),\"stroke-dasharray\":\"5,5\"},children:t.label?[{name:\"text\",type:\"element\",value:\"\",attributes:{x:s.toString(),y:(a-10).toString(),\"text-anchor\":\"middle\",\"font-size\":(.2*Math.abs(e.a)).toString(),fill:\"red\"},children:[{type:\"text\",value:t.label,name:\"\",attributes:{},children:[]}]}]:[]}]}return[]}var Qun=.2/DT,pPi=3/DT,__e=[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"],LZ=[\"A\",\"B\",\"C\",\"D\"];function mPi({schematicSheet:t,transform:e,colorMap:n}){const o=eje(t),i=n.schematic.sheet,r=n.schematic.net_name,s=[vun({id:`${t.schematic_sheet_id}_outer`,center:o.center,width:o.width,height:o.height,transform:e,color:i}),vun({id:`${t.schematic_sheet_id}_inner`,center:o.center,width:o.innerMaxX-o.innerMinX,height:o.innerMaxY-o.innerMinY,transform:e,color:i})];for(let a=1;a\u003c__e.length;a++){const A=o.innerMinX+(o.innerMaxX-o.innerMinX)*a/__e.length;s.push(f_e({id:`${t.schematic_sheet_id}_top_column_${a}`,x1:A,y1:o.maxY,x2:A,y2:o.innerMaxY,transform:e,color:i}),f_e({id:`${t.schematic_sheet_id}_bottom_column_${a}`,x1:A,y1:o.minY,x2:A,y2:o.innerMinY,transform:e,color:i}))}for(let a=1;a\u003cLZ.length;a++){const A=o.innerMinY+(o.innerMaxY-o.innerMinY)*a/LZ.length;s.push(f_e({id:`${t.schematic_sheet_id}_left_row_${a}`,x1:o.minX,y1:A,x2:o.innerMinX,y2:A,transform:e,color:i}),f_e({id:`${t.schematic_sheet_id}_right_row_${a}`,x1:o.maxX,y1:A,x2:o.innerMaxX,y2:A,transform:e,color:i}))}return __e.forEach((a,A)=\u003e{const c=o.innerMinX+(o.innerMaxX-o.innerMinX)*(A+.5)/__e.length;s.push(I_e({text:a,x:c,y:(o.maxY+o.innerMaxY)/2,transform:e,color:r}),I_e({text:a,x:c,y:(o.minY+o.innerMinY)/2,transform:e,color:r}))}),LZ.forEach((a,A)=\u003e{const c=o.innerMinY+(o.innerMaxY-o.innerMinY)*(LZ.length-A-.5)/LZ.length;s.push(I_e({text:a,x:(o.minX+o.innerMinX)/2,y:c,transform:e,color:r}),I_e({text:a,x:(o.maxX+o.innerMaxX)/2,y:c,transform:e,color:r}))}),[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-sheet\",\"data-circuit-json-type\":\"schematic_sheet\",\"data-schematic-sheet-id\":t.schematic_sheet_id},children:s}]}function vun({id:t,center:e,width:n,height:o,transform:i,color:r}){const s=er(i,e),a=Math.abs(i.a)*n,A=Math.abs(i.d)*o;return{name:\"rect\",type:\"element\",value:\"\",attributes:{class:\"sch-rect\",x:(s.x-a/2).toString(),y:(s.y-A/2).toString(),width:a.toString(),height:A.toString(),fill:\"none\",stroke:r,\"stroke-width\":(Math.abs(i.a)*Qun).toString(),\"data-schematic-rect-id\":t},children:[]}}function f_e({id:t,x1:e,y1:n,x2:o,y2:i,transform:r,color:s}){const a=er(r,{x:e,y:n}),A=er(r,{x:o,y:i});return{name:\"line\",type:\"element\",value:\"\",attributes:{class:\"sch-line\",x1:a.x.toString(),y1:a.y.toString(),x2:A.x.toString(),y2:A.y.toString(),stroke:s,\"stroke-width\":(Math.abs(r.a)*Qun).toString(),\"data-schematic-line-id\":t},children:[]}}function I_e({text:t,x:e,y:n,transform:o,color:i}){const r=er(o,{x:e,y:n});return{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-text\",x:r.x.toString(),y:r.y.toString(),fill:i,\"text-anchor\":\"middle\",\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${PE(o,\"reference_designator\",pPi)}px`,transform:`rotate(0, ${r.x}, ${r.y})`},children:[{type:\"text\",value:t,name:\"\",attributes:{},children:[]}]}}var _Pi=({schematicTable:t,transform:e,colorMap:n,circuitJson:o})=\u003e{const{anchor_position:i,border_width:r=.05,anchor:s=\"center\"}=t,{column_widths:a,row_heights:A}=lun(t,o),c=a.reduce((E,B)=\u003eE+B,0),l=A.reduce((E,B)=\u003eE+B,0);let u=i.x,g=i.y;s.includes(\"center\")?u-=c/2:s.includes(\"right\")\u0026\u0026(u-=c),s.includes(\"center\")?g+=l/2:s.includes(\"bottom\")\u0026\u0026(g+=l);const h=[],d=r*Math.abs(e.a),p=c_(e),[m,_]=er(e,[u,g]),[f,I]=er(e,[u+c,g-l]);h.push({name:\"rect\",type:\"element\",attributes:{class:\"sch-table-border\",x:m.toString(),y:_.toString(),width:(f-m).toString(),height:(I-_).toString(),fill:\"none\",stroke:n.schematic.table,\"stroke-width\":d.toString()},children:[],value:\"\"});const C=o.filter(E=\u003eE.type===\"schematic_table_cell\"\u0026\u0026E.schematic_table_id===t.schematic_table_id);let y=u;for(let E=0;E\u003ca.length-1;E++){y+=a[E];let B=g;for(let S=0;S\u003cA.length;S++){const Q=B-A[S];if(!C.some(M=\u003eM.start_column_index\u003c=E\u0026\u0026M.end_column_index\u003eE\u0026\u0026M.start_row_index\u003c=S\u0026\u0026M.end_row_index\u003e=S)){const M=er(e,{x:y,y:B}),k=er(e,{x:y,y:Q});h.push({name:\"line\",type:\"element\",attributes:{class:\"sch-table-grid-line\",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,\"stroke-width\":p.toString()},children:[],value:\"\"})}B=Q}}let x=g;for(let E=0;E\u003cA.length-1;E++){x-=A[E];let B=u;for(let S=0;S\u003ca.length;S++){const Q=B+a[S];if(!C.some(M=\u003eM.start_row_index\u003c=E\u0026\u0026M.end_row_index\u003eE\u0026\u0026M.start_column_index\u003c=S\u0026\u0026M.end_column_index\u003e=S)){const M=er(e,{x:B,y:x}),k=er(e,{x:Q,y:x});h.push({name:\"line\",type:\"element\",attributes:{class:\"sch-table-grid-line\",x1:M.x.toString(),y1:M.y.toString(),x2:k.x.toString(),y2:k.y.toString(),stroke:n.schematic.table,\"stroke-width\":p.toString()},children:[],value:\"\"})}B=Q}}for(const E of C)if(E.text){const B=a.slice(E.start_column_index,E.end_column_index+1).reduce((te,j)=\u003ete+j,0),S=A.slice(E.start_row_index,E.end_row_index+1).reduce((te,j)=\u003ete+j,0),Q=u+a.slice(0,E.start_column_index).reduce((te,j)=\u003ete+j,0),w=g-A.slice(0,E.start_row_index).reduce((te,j)=\u003ete+j,0),{cell_padding:M=.2}=t,k=E.horizontal_align??\"center\",R=E.vertical_align??\"middle\";let F={x:Q+B/2,y:w-S/2};k===\"left\"?F.x=Q+M:k===\"right\"\u0026\u0026(F.x=Q+B-M),R===\"top\"?F.y=w-M:R===\"bottom\"\u0026\u0026(F.y=w-S+M);const O=er(e,F),U=PE(e,\"reference_designator\",E.font_size),Y={left:\"start\",center:\"middle\",right:\"end\"},W={top:\"hanging\",middle:\"middle\",bottom:\"ideographic\"};h.push({name:\"text\",type:\"element\",attributes:{class:\"sch-table-text\",x:O.x.toString(),y:O.y.toString(),\"font-size\":`${U}px`,\"text-anchor\":Y[k],\"dominant-baseline\":W[R],fill:n.schematic.table,\"font-family\":\"sans-serif\"},children:[{type:\"text\",value:E.text,name:\"\",attributes:{},children:[]}],value:\"\"})}return[{name:\"g\",type:\"element\",attributes:{class:\"sch-table\",\"data-schematic-table-id\":t.schematic_table_id},children:h,value:\"\"}]};function fPi({trace:t,transform:e,colorMap:n}){const o=t.edges;if(o.length===0)return[];const i=[],r=[];let s=\"\";for(let a=0;a\u003co.length;a++){const A=o[a];if(A.is_crossing)continue;const[c,l]=er(e,[A.from.x,A.from.y]),[u,g]=er(e,[A.to.x,A.to.y]);a===0||o[a-1]?.is_crossing?s+=`M ${c} ${l} L ${u} ${g}`:s+=` L ${u} ${g}`}s\u0026\u0026(i.push({name:\"path\",type:\"element\",attributes:{d:s,class:\"trace-invisible-hover-outline sch-trace-hitbox\",stroke:n.schematic.wire,fill:\"none\",\"stroke-width\":`${c_(e)*8}px`,\"stroke-linecap\":\"round\",opacity:\"0\",\"stroke-linejoin\":\"round\"},value:\"\",children:[]}),i.push({name:\"path\",type:\"element\",attributes:{class:\"sch-trace-path\",d:s,stroke:n.schematic.wire,fill:\"none\",\"stroke-width\":`${c_(e)}px`,\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"},value:\"\",children:[]}));for(const a of o){if(!a.is_crossing)continue;const[A,c]=er(e,[a.from.x,a.from.y]),[l,u]=er(e,[a.to.x,a.to.y]),g=(A+l)/2,h=(c+u)/2,d=l-A,p=u-c,m=Math.sqrt(d*d+p*p),_=m*.7,f=-p/m*_,I=d/m*_,C=g+f,y=h-Math.abs(I);r.push({name:\"path\",type:\"element\",attributes:{class:\"trace-crossing-outline sch-trace-crossing-outline\",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.background,fill:\"none\",\"stroke-width\":`${c_(e)*1.5}px`,\"stroke-linecap\":\"butt\"},value:\"\",children:[]}),r.push({name:\"path\",type:\"element\",attributes:{class:\"sch-trace-crossing-path\",d:`M ${A} ${c} Q ${C} ${y} ${l} ${u}`,stroke:n.schematic.wire,fill:\"none\",\"stroke-width\":`${c_(e)}px`,\"stroke-linecap\":\"round\"},value:\"\",children:[]})}if(t.junctions)for(const a of t.junctions){const[A,c]=er(e,[a.x,a.y]);r.push({name:\"circle\",type:\"element\",attributes:{cx:A.toString(),cy:c.toString(),r:(Math.abs(e.a)*.03).toString(),class:\"trace-junction sch-trace-junction\",fill:n.schematic.junction},value:\"\",children:[]})}return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"trace sch-trace\",\"data-layer\":\"base\",\"data-circuit-json-type\":\"schematic_trace\",\"data-schematic-trace-id\":t.schematic_trace_id,...t.subcircuit_connectivity_map_key\u0026\u0026{\"data-subcircuit-connectivity-map-key\":t.subcircuit_connectivity_map_key}},children:i},{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"trace-overlays sch-trace-overlays\",\"data-layer\":\"overlay\",\"data-circuit-json-type\":\"schematic_trace\",\"data-schematic-trace-id\":t.schematic_trace_id,...t.subcircuit_connectivity_map_key\u0026\u0026{\"data-subcircuit-connectivity-map-key\":t.subcircuit_connectivity_map_key}},children:r}]}function IPi({probe:t,transform:e,colorMap:n,fallbackColor:o}){const[i,r]=er(e,[t.position.x,t.position.y]),s=t.color??o??n.schematic.reference,a=Math.abs(e.a)*.6,A=Math.abs(e.a)*.28,c=t.label_alignment??\"top_right\";let l,u,g,h;switch(c){case\"top_left\":l=-135*Math.PI/180,u=\"end\",g=-8,h=-8;break;case\"top_center\":l=-90*Math.PI/180,u=\"middle\",g=0,h=-8;break;case\"top_right\":l=-45*Math.PI/180,u=\"start\",g=8,h=-8;break;case\"center_left\":l=180*Math.PI/180,u=\"end\",g=-8,h=0;break;case\"center\":l=-90*Math.PI/180,u=\"middle\",g=0,h=-8;break;case\"center_right\":l=0*Math.PI/180,u=\"start\",g=8,h=0;break;case\"bottom_left\":l=135*Math.PI/180,u=\"end\",g=-8,h=8;break;case\"bottom_center\":l=90*Math.PI/180,u=\"middle\",g=0,h=8;break;case\"bottom_right\":l=45*Math.PI/180,u=\"start\",g=8,h=8;break;default:l=-50*Math.PI/180,u=\"start\",g=8,h=0}const d=i+a*Math.cos(l),p=r+a*Math.sin(l),m=i,_=r,f=[`M ${d},${p}`,`L ${m},${_}`,`M ${m},${_}`,`L ${m-A*Math.cos((l*180/Math.PI+150)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+150)*Math.PI/180)}`,`L ${m-A*Math.cos((l*180/Math.PI+210)*Math.PI/180)},${_-A*Math.sin((l*180/Math.PI+210)*Math.PI/180)}`,\"Z\"].join(\" \"),I=(d+g).toString(),C=(p+h).toString(),y=[];if(t.name\u0026\u0026t.voltage!==void 0)y.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:I},children:[{type:\"text\",value:t.name,name:\"\",attributes:{},children:[]}]}),y.push({type:\"element\",name:\"tspan\",value:\"\",attributes:{x:I,dy:\"1.2em\"},children:[{type:\"text\",value:`${t.voltage}V`,name:\"\",attributes:{},children:[]}]});else{const x=[];t.name\u0026\u0026x.push(t.name),t.voltage!==void 0\u0026\u0026x.push(`${t.voltage}V`),y.push({type:\"text\",value:x.join(\" \"),name:\"\",attributes:{},children:[]})}return[{name:\"path\",type:\"element\",attributes:{class:\"sch-voltage-probe\",d:f,stroke:s,fill:s,\"stroke-width\":`${c_(e)}px`},value:\"\",children:[]},{type:\"element\",name:\"text\",value:\"\",attributes:{class:\"sch-voltage-probe-label\",x:I,y:C,fill:s,\"text-anchor\":u,\"dominant-baseline\":\"middle\",\"font-family\":\"sans-serif\",\"font-size\":`${PE(e,\"reference_designator\")}px`,\"font-weight\":\"bold\",\"data-schematic-voltage-probe-id\":t.schematic_voltage_probe_id},children:y}]}var HZ=6,C_e=12,mI=12,wU=6,wun=14,y_e=11,Pun=280,CPi=140,Mun=t=\u003et.type===\"schematic_component_overlap_warning\"||t.type===\"schematic_component_styling_warning\"||t.type===\"schematic_element_outside_sheet_warning\"||t.type===\"schematic_manual_edit_conflict_warning\";function yPi({circuitJson:t,transform:e,svgWidth:n,svgHeight:o,colorMap:i}){const r=i.schematic.erc_warning,s=[];return t.filter(Mun).flatMap(a=\u003e{const A=xPi(a,t,e);if(!A)return[];const c=Math.max(1,n-mI*2),l=wPi(a.message,Math.max(12,Math.floor((Math.min(Pun,c)-wU*2)/(y_e*.56)))),u=Math.max(...l.map(I=\u003eI.length)),g=Math.min(Pun,c,Math.max(Math.min(CPi,c),u*y_e*.56+wU*2)),h=wU*2+l.length*wun,d=SPi({targetBounds:A,calloutWidth:g,calloutHeight:h,svgWidth:n,svgHeight:o,occupiedCalloutBounds:s});s.push(d);const p=vPi(a),m=x_e(A,HZ),_=QPi(d,m);return[{name:\"g\",type:\"element\",value:\"\",attributes:{class:\"schematic-warning\",\"data-type\":a.type,\"data-warning-id\":p,role:\"note\",\"aria-label\":a.message},children:[{name:\"rect\",type:\"element\",value:\"\",attributes:{x:m.minX.toString(),y:m.minY.toString(),width:(m.maxX-m.minX).toString(),height:(m.maxY-m.minY).toString(),rx:\"6\",fill:\"none\",stroke:r,\"stroke-width\":\"1\",\"stroke-dasharray\":\"4,3\",\"data-warning-reference\":\"target\"},children:[]},{name:\"line\",type:\"element\",value:\"\",attributes:{x1:_.from.x.toString(),y1:_.from.y.toString(),x2:_.to.x.toString(),y2:_.to.y.toString(),stroke:r,\"stroke-width\":\"1\",\"data-warning-reference\":\"leader\"},children:[]},{name:\"rect\",type:\"element\",value:\"\",attributes:{x:d.minX.toString(),y:d.minY.toString(),width:g.toString(),height:h.toString(),fill:\"rgba(255, 250, 235, 0.97)\",stroke:r,\"stroke-width\":\"1\",\"data-warning-reference\":\"callout\"},children:[]},{name:\"text\",type:\"element\",value:\"\",attributes:{x:(d.minX+wU).toString(),y:(d.minY+wU+y_e).toString(),fill:\"#5c4300\",\"font-family\":\"sans-serif\",\"font-size\":y_e.toString()},children:l.map((I,C)=\u003e({name:\"tspan\",type:\"element\",value:\"\",attributes:{x:(d.minX+wU).toString(),dy:C===0?\"0\":wun.toString()},children:[DPi(I)]}))}]}]})}function xPi(t,e,n){const i=EPi(t).map(r=\u003eBPi(e,r)).filter(r=\u003e!!r).map(r=\u003ebPi(r,n)).filter(r=\u003e!!r);return i.length===0?null:i.reduce(PPi)}function EPi(t){switch(t.type){case\"schematic_component_overlap_warning\":return t.schematic_component_ids;case\"schematic_component_styling_warning\":return[t.schematic_component_id,...t.schematic_port_ids??[]];case\"schematic_manual_edit_conflict_warning\":return[t.schematic_component_id];case\"schematic_element_outside_sheet_warning\":return[t.schematic_element_id]}}function BPi(t,e){return t.find(n=\u003e{if(!n.type.startsWith(\"schematic_\"))return!1;const o=`${n.type}_id`;return n[o]===e})}function bPi(t,e){if(t.type===\"schematic_component\"){const n=er(e,{x:t.center.x-t.size.width/2,y:t.center.y+t.size.height/2}),o=er(e,{x:t.center.x+t.size.width/2,y:t.center.y-t.size.height/2});return oje([n,o])}if(t.type===\"schematic_port\"){const n=er(e,t.center);return x_e(oje([n]),4)}if(t.type===\"schematic_net_label\"){const n=er(e,t.anchor_position??t.center),o=Math.max(28,t.text.length*8);return{minX:n.x-o/2,minY:n.y-10,maxX:n.x+o/2,maxY:n.y+10}}if(t.type===\"schematic_trace\"){const n=t.edges.flatMap(o=\u003e[er(e,o.from),er(e,o.to)]);return n.length===0?null:x_e(oje(n),4)}return null}function SPi({targetBounds:t,calloutWidth:e,calloutHeight:n,svgWidth:o,svgHeight:i,occupiedCalloutBounds:r}){const s=(t.minX+t.maxX)/2,a=(t.minY+t.maxY)/2,A=t.minY-HZ-C_e-n,c=t.maxY+HZ+C_e,l=t.minX-HZ-C_e-e,u=t.maxX+HZ+C_e,g=[];A\u003e=mI\u0026\u0026g.push(OZ({x:PU(s-e/2,mI,o-mI-e),y:A,width:e,height:n,side:\"top\"})),c+n\u003c=i-mI\u0026\u0026g.push(OZ({x:PU(s-e/2,mI,o-mI-e),y:c,width:e,height:n,side:\"bottom\"})),u+e\u003c=o-mI\u0026\u0026g.push(OZ({x:u,y:PU(a-n/2,mI,i-mI-n),width:e,height:n,side:\"right\"})),l\u003e=mI\u0026\u0026g.push(OZ({x:l,y:PU(a-n/2,mI,i-mI-n),width:e,height:n,side:\"left\"}));const h=g.find(d=\u003er.every(p=\u003e!MPi(x_e(d,4),p)));return h||(g[0]?g[0]:OZ({x:PU(s-e/2,mI,o-mI-e),y:PU(A,mI,i-mI-n),width:e,height:n,side:\"top\"}))}function QPi(t,e){const n=(e.minX+e.maxX)/2,o=(e.minY+e.maxY)/2,i=(t.minX+t.maxX)/2,r=(t.minY+t.maxY)/2;switch(t.side){case\"top\":return{from:{x:i,y:t.maxY},to:{x:n,y:e.minY}};case\"bottom\":return{from:{x:i,y:t.minY},to:{x:n,y:e.maxY}};case\"left\":return{from:{x:t.maxX,y:r},to:{x:e.minX,y:o}};case\"right\":return{from:{x:t.minX,y:r},to:{x:e.maxX,y:o}}}}function vPi(t){switch(t.type){case\"schematic_component_overlap_warning\":return t.schematic_component_overlap_warning_id;case\"schematic_component_styling_warning\":return t.schematic_component_styling_warning_id;case\"schematic_element_outside_sheet_warning\":return t.schematic_element_outside_sheet_warning_id;case\"schematic_manual_edit_conflict_warning\":return t.schematic_manual_edit_conflict_warning_id}}function wPi(t,e){const n=t.trim().split(/\\s+/),o=[];let i=\"\";for(const r of n){const s=i?`${i} ${r}`:r;if(s.length\u003c=e||i.length===0){i=s;continue}o.push(i),i=r}return i\u0026\u0026o.push(i),o.length\u003e0?o:[\"Warning\"]}function oje(t){return{minX:Math.min(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxX:Math.max(...t.map(e=\u003ee.x)),maxY:Math.max(...t.map(e=\u003ee.y))}}function PPi(t,e){return{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}}function x_e(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function MPi(t,e){return!(t.maxX\u003c=e.minX||t.minX\u003e=e.maxX||t.maxY\u003c=e.minY||t.minY\u003e=e.maxY)}function OZ({x:t,y:e,width:n,height:o,side:i}){return{minX:t,minY:e,maxX:t+n,maxY:e+o,side:i}}function PU(t,e,n){return n\u003ce?(e+n)/2:Math.min(Math.max(t,e),n)}function DPi(t){return{name:\"\",type:\"text\",value:t,attributes:{},children:[]}}function Dun(t,e){const n=t.filter(ge=\u003ege.type===\"schematic_sheet\"),o=Dwi(n);let i=o;e?.schematicSheetId!==void 0?i=n.find(ge=\u003ege.schematic_sheet_id===e.schematicSheetId)??o:e?.schematicSheetIndex!==void 0\u0026\u0026(i=n.find(ge=\u003ege.sheet_index===e.schematicSheetIndex)??o);const r=i?t.filter(ge=\u003e!ge.type.startsWith(\"schematic_\")||Mun(ge)||\"schematic_sheet_id\"in ge\u0026\u0026ge.schematic_sheet_id===i.schematic_sheet_id):t,s=Vwi(r),a=s.maxX-s.minX,A=s.maxY-s.minY,c=e?.width??1200,l=e?.height??600,u=e?.colorOverrides,g={...$h,schematic:{...$h.schematic,...u?.schematic??{}}},h=a/A,d=c/l;let p;if(h\u003ed){const ge=c/h;p={x:0,y:(l-ge)/2}}else{const ge=l*h;p={x:(c-ge)/2,y:0}}const m=Iwi([{x:s.minX,y:s.maxY},{x:s.maxX,y:s.maxY},{x:s.maxX,y:s.minY}],[{x:p.x,y:p.y},{x:c-p.x,y:p.y},{x:c-p.x,y:l-p.y}]),_=[];if(_.push({name:\"rect\",type:\"element\",attributes:{class:\"boundary\",x:\"0\",y:\"0\",width:c.toString(),height:l.toString()},children:[],value:\"\"}),e?.grid){const ge=typeof e.grid==\"object\"?e.grid:{};_.push(Pwi({bounds:s,transform:m,...ge}))}const f=[],I=[],C=[],y=[],x=[],E=[],B=[],S=[],Q=[],w=[],M=[],k=[],R=[],F=[],O=[],U=[],Y=[],W=NPi({transform:m,svgWidth:c,svgHeight:l,schematicSheet:i}),te=Array.isArray(g.simulation_palette)?g.simulation_palette:Array.isArray(g.palette)?g.palette:[];let j=0;for(const ge of r)if(ge.type===\"schematic_sheet\")U.push(...mPi({schematicSheet:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_graphic\")Y.push(zwi({schematicGraphic:ge,viewport:RPi({availableViewport:W,schematicGraphic:ge,transform:m})}));else if(ge.type===\"schematic_debug_object\")f.push(...hPi({debugObject:ge,transform:m}));else if(ge.type===\"schematic_component\")I.push(...dPi({component:ge,transform:m,circuitJson:r,colorMap:g})),Q.push(...Zwi({component:ge,transform:m,circuitJson:r}));else if(ge.type===\"schematic_box\")B.push(...iPi({schematicBox:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_trace\")C.push(...fPi({trace:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_net_label\")y.push(...$wi({schNetLabel:ge,realToScreenTransform:m,colorMap:g}));else if(ge.type===\"schematic_text\"\u0026\u0026!ge.schematic_component_id)x.push(nje({elm:ge,transform:m,colorMap:g}));else if(ge.type===\"schematic_voltage_probe\"){const _e=te.length\u003e0?te[j%te.length]:void 0;j+=1,E.push(...IPi({probe:ge,transform:m,colorMap:g,fallbackColor:_e}))}else if(ge.type===\"schematic_table\")S.push(..._Pi({schematicTable:ge,transform:m,colorMap:g,circuitJson:r}));else if(ge.type===\"schematic_line\"){if(ge.schematic_component_id)continue;M.push(...Bun({schLine:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_circle\"){if(ge.schematic_component_id)continue;k.push(...fun({schCircle:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_rect\"){if(ge.schematic_component_id)continue;R.push(...bun({schRect:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_arc\"){if(ge.schematic_component_id)continue;F.push(..._un({schArc:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_path\"){if(ge.schematic_component_id)continue;O.push(...Sun({schPath:ge,transform:m,colorMap:g}))}else if(ge.type===\"schematic_port\"){const _e=r.find(ue=\u003eue.type===\"source_port\"\u0026\u0026ue.source_port_id===ge.source_port_id);_e?.type===\"source_port\"\u0026\u0026_e.do_not_connect===!0\u0026\u0026w.push(ePi({schPort:ge,transform:m,colorMap:g})),e?.drawPorts\u0026\u0026w.push(...tPi({schPort:ge,transform:m,circuitJson:r,colorMap:g}))}const J=C.filter(ge=\u003ege.attributes?.[\"data-layer\"]!==\"overlay\"),oe=C.filter(ge=\u003ege.attributes?.[\"data-layer\"]===\"overlay\");_.push(...Y,...f,...U,...J,...oe,...M,...k,...R,...F,...O,...I,...Q,...w,...y,...x,...B,...E,...S),e?.labeledPoints\u0026\u0026_.push(Mwi({points:e.labeledPoints,transform:m})),e?.shouldDrawWarnings\u0026\u0026_.push(...yPi({circuitJson:r,transform:m,svgWidth:c,svgHeight:l,colorMap:g}));const ie=qWe(t),ne=XWe;if(e?.showErrorsInTextOverlay){const ge=vwi(t);ge\u0026\u0026_.push(ge)}const le={name:\"svg\",type:\"element\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",class:[\"tscircuit-schematic\",e?.className].filter(Boolean).join(\" \"),width:c.toString(),height:l.toString(),style:`background-color: ${g.schematic.background}`,\"data-real-to-screen-transform\":mwi(m),...ie\u0026\u0026{\"data-software-used-string\":ie},...e?.includeVersion\u0026\u0026{\"data-circuit-to-svg-version\":ne}},children:[{name:\"style\",type:\"element\",children:[{type:\"text\",value:`\n .boundary { fill: ${g.schematic.background}; }\n .schematic-boundary { fill: none; stroke: #fff; }\n .component { fill: none; stroke: ${g.schematic.component_outline}; }\n .chip { fill: ${g.schematic.component_body}; stroke: ${g.schematic.component_outline}; }\n .component-pin { fill: none; stroke: ${g.schematic.component_outline}; }\n .text { font-family: sans-serif; fill: ${g.schematic.wire}; }\n .pin-number { fill: ${g.schematic.pin_number}; }\n .port-label { fill: ${g.schematic.reference}; }\n .component-name { fill: ${g.schematic.reference}; }\n ${e?.css??\"\"}\n `,name:\"\",attributes:{},children:[]}],value:\"\",attributes:{}},..._],value:\"\"};return $We(le)}function NPi({transform:t,svgWidth:e,svgHeight:n,schematicSheet:o}){if(!o)return{x:0,y:0,width:e,height:n};const i=eje(o),r=er(t,{x:i.innerMinX,y:i.innerMaxY}),s=er(t,{x:i.innerMaxX,y:i.innerMinY});return{x:Math.min(r.x,s.x),y:Math.min(r.y,s.y),width:Math.abs(s.x-r.x),height:Math.abs(s.y-r.y)}}function RPi({availableViewport:t,schematicGraphic:e,transform:n}){if(e.width===void 0\u0026\u0026e.height===void 0)return t;const o=e.width===void 0?t.width:Nun(e.width*Math.hypot(n.a,n.b),t.width),i=e.height===void 0?t.height:Nun(e.height*Math.hypot(n.c,n.d),t.height);return{x:t.x+(t.width-o)/2,y:t.y+(t.height-i)/2,width:o,height:i}}function Nun(t,e){return Number.isFinite(t)?Math.max(0,Math.min(t,e)):e}var Run=({simulationResult:t,fallbackName:e})=\u003e{const n=t.name??e,o=t.simulation_parameter_sweep_coordinate;return o?`${n} (${o.parameter_value}${o.parameter_unit})`:n},TPi=t=\u003e{const e=t[0]??0,n=t[1];return{timestamps_ms:t,start_time_ms:e,end_time_ms:t.at(-1)??0,time_per_step:n===void 0?1:Math.abs(n-e)}},kPi=t=\u003et.type===\"simulation_transient_voltage_graph\"?t.simulation_transient_voltage_graph_id:t.simulation_transient_current_graph_id,Tun=t=\u003e{switch(t.type){case\"simulation_transient_voltage_graph\":return t.simulation_transient_voltage_graph_id;case\"simulation_transient_current_graph\":return t.simulation_transient_current_graph_id;case\"simulation_dc_operating_point_voltage\":return t.simulation_dc_operating_point_voltage_id;case\"simulation_dc_operating_point_current\":return t.simulation_dc_operating_point_current_id;case\"simulation_dc_sweep_voltage_graph\":return t.simulation_dc_sweep_voltage_graph_id;case\"simulation_dc_sweep_current_graph\":return t.simulation_dc_sweep_current_graph_id;case\"simulation_ac_sweep_voltage_graph\":return t.simulation_ac_sweep_voltage_graph_id;case\"simulation_ac_sweep_current_graph\":return t.simulation_ac_sweep_current_graph_id}},FPi=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=\u003e{switch(t.type){case\"simulation_dc_operating_point_voltage\":return{horizontalCoordinates:[0],measuredLevels:[t.voltage],isCurrent:!1};case\"simulation_dc_operating_point_current\":return{horizontalCoordinates:[0],measuredLevels:[t.current],isCurrent:!0};case\"simulation_dc_sweep_voltage_graph\":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.voltage_levels,isCurrent:!1};case\"simulation_dc_sweep_current_graph\":return{horizontalCoordinates:t.sweep_values,measuredLevels:t.current_levels,isCurrent:!0};case\"simulation_ac_sweep_voltage_graph\":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_voltages.map(o=\u003ee===\"phase\"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!1};case\"simulation_ac_sweep_current_graph\":return{horizontalCoordinates:n?t.frequencies_hz.map(Math.log10):t.frequencies_hz,measuredLevels:t.complex_currents.map(o=\u003ee===\"phase\"?Math.atan2(o.im,o.re)*180/Math.PI:Math.hypot(o.re,o.im)),isCurrent:!0}}},LPi=({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n})=\u003e{if(t.type===\"simulation_transient_voltage_graph\"||t.type===\"simulation_transient_current_graph\")return t.simulation_parameter_sweep_coordinate?{...t,name:Run({simulationResult:t,fallbackName:t.name??kPi(t)})}:t;const o=Tun(t),{horizontalCoordinates:i,measuredLevels:r,isCurrent:s}=FPi({simulationResult:t,acSweepView:e,usesLogarithmicXValues:n}),a={simulation_experiment_id:t.simulation_experiment_id,simulation_parameter_sweep_coordinate:t.simulation_parameter_sweep_coordinate,name:Run({simulationResult:t,fallbackName:o}),color:t.color,...TPi(i)};return s?{type:\"simulation_transient_current_graph\",simulation_transient_current_graph_id:o,current_levels:r,...a}:{type:\"simulation_transient_voltage_graph\",simulation_transient_voltage_graph_id:o,voltage_levels:r,...a}},HPi=({simulationResultType:t,experiment:e})=\u003et?.startsWith(\"simulation_ac_sweep_\")?\"Frequency (Hz)\":t?.startsWith(\"simulation_dc_sweep_\")?e?.dc_sweep_unit?`DC Sweep (${e.dc_sweep_unit})`:\"DC Sweep\":t?.startsWith(\"simulation_dc_operating_point_\")?\"Operating Point\":\"Time (ms)\",OPi=({results:t,acSweepView:e,experiment:n})=\u003e{const o=t[0]?.type,i=o?.startsWith(\"simulation_ac_sweep_\")??!1,r=i\u0026\u0026n?.ac_sweep_type!==\"linear\";return{graphs:t.map(a=\u003eLPi({simulationResult:a,acSweepView:e,usesLogarithmicXValues:r})),xAxisTitle:HPi({simulationResultType:o,experiment:n}),yAxisTitle:i\u0026\u0026e===\"phase\"?\"Phase (deg)\":void 0,usesLogarithmicXValues:r}};function GZ(t){return t?.valuePerDiv!==void 0\u0026\u0026Number.isFinite(t.valuePerDiv)\u0026\u0026Math.abs(t.valuePerDiv)\u003eNumber.EPSILON}var GPi=1200,YPi=600,hm={top:64,right:100,bottom:80,left:100},ije=24,rje=56,UPi=56,KPi=8,kun=\"#1f77b4\";function qx(t){return t.type===\"simulation_transient_current_graph\"}function sje(t){return qx(t)?t.simulation_transient_current_graph_id:t.simulation_transient_voltage_graph_id}function Fun(t){return qx(t)?\"data-simulation-transient-current-graph-id\":\"data-simulation-transient-voltage-graph-id\"}function Lun(t){return qx(t)?t.current_levels:t.voltage_levels}function VPi(t){const e=t.some(o=\u003eqx(o.graph)),n=t.some(o=\u003e!qx(o.graph));return e\u0026\u0026!n?\"Current (A)\":n\u0026\u0026!e?\"Voltage (V)\":\"Value\"}function zPi(t){return`simulation-graph-${t.replace(/[^a-zA-Z0-9_-]+/g,\"-\")}`}function $i(t){if(!Number.isFinite(t))return\"0\";const e=Number.parseFloat(t.toFixed(6));return Number.isInteger(e),e.toString()}function cc(t,e,n=[]){return{name:t,type:\"element\",value:\"\",attributes:e,children:n}}function o9(t){return{name:\"\",type:\"text\",value:t,attributes:{},children:[]}}function aje(t,e){if(!Number.isFinite(t))return`0 ${e}`;if(t===0)return`0 ${e}`;const n=Math.abs(t),o=[{threshold:1e6,factor:1e6,prefix:\"M\"},{threshold:1e3,factor:1e3,prefix:\"k\"},{threshold:1,factor:1,prefix:\"\"},{threshold:.001,factor:.001,prefix:\"m\"},{threshold:1e-6,factor:1e-6,prefix:\"µ\"},{threshold:1e-9,factor:1e-9,prefix:\"n\"}],i=o.find(s=\u003en\u003e=s.threshold)??o[o.length-1],r=t/i.factor;return`${Hun(r)} ${i.prefix}${e}`}function JPi(t){return`${Hun(t)} div`}function Hun(t){if(!Number.isFinite(t))return\"0\";const e=Math.abs(t),n=e\u003e=100?0:e\u003e=10?1:e\u003e=1?2:3;return Number.parseFloat(t.toFixed(n)).toString()}function Oun(t,e){const n=e.tickLabelOverrides?.get(t);if(n!==void 0)return n;const{ticks:o}=e;if(o.length\u003c=1)return $i(t);const i=o[o.length-1]-o[0];if(!Number.isFinite(i)||i===0)return $i(t);const r=WPi(i),s=10**r;return(Math.round(t*s)/s).toFixed(r).replace(/\\.0+$/,\"\").replace(/(\\.\\d*?)0+$/,\"$1\").replace(/\\.$/,\"\")}function WPi(t){return t\u003e=100?0:t\u003e=10?1:t\u003e=1?2:3}function jPi({graphs:t,valueAxis:e,scaleY:n,plotLeft:o,plotWidth:i,plotHeight:r}){const s=hm.top,a=hm.top+r,A=o,c=o+i,l=[],u=t.filter(g=\u003eGZ(g.scopeTraceDisplay));for(const[g,h]of u.entries()){const d=g%2===0?\"left\":\"right\",p=Math.floor(g/2),m=d===\"left\"?A-10-p*rje:c+10+p*rje,_=d===\"left\"?m-6:m+6,f=d===\"left\"?\"end\":\"start\",I=d===\"left\"?m+6:m-6,C=h.scopeTraceDisplay;if(GZ(C)){l.push(cc(\"line\",{class:\"axis axis-y axis-y-scope\",x1:$i(m),y1:$i(s),x2:$i(m),y2:$i(a),style:`stroke: ${h.color};`}),cc(\"text\",{class:\"axis-title axis-title-y axis-title-y-scope\",x:$i(m),y:$i(s-12),\"text-anchor\":\"middle\",style:`fill: ${h.color}; font-size: 10px;`},[o9(h.label)]));for(const y of e.ticks){const x=n(y),E=(C.center??0)+(y-(C.offsetDivs??0))*C.valuePerDiv;l.push(cc(\"line\",{class:\"axis-tick axis-tick-y axis-tick-y-scope\",x1:$i(m),y1:$i(x),x2:$i(I),y2:$i(x),style:`stroke: ${h.color};`}),cc(\"text\",{class:\"axis-label axis-label-y axis-label-y-scope\",x:$i(_),y:$i(x),\"text-anchor\":f,\"dominant-baseline\":\"middle\",style:`fill: ${h.color}; font-size: 10px;`},[o9(aje(E,qx(h.graph)?\"A\":\"V\"))]))}}}return l}function $Pi({timeAxis:t,valueAxis:e,graphs:n,scaleX:o,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a,yAxisTitle:A,xAxisTitle:c,usesScopeTraceDisplay:l}){const u=hm.top+a,g=r,h=r+s,d=[cc(\"line\",{class:\"axis axis-x\",x1:$i(g),y1:$i(u),x2:$i(h),y2:$i(u)}),...l?[]:[cc(\"line\",{class:\"axis axis-y\",x1:$i(g),y1:$i(hm.top),x2:$i(g),y2:$i(u)})]];for(const p of t.ticks){const m=$i(o(p));d.push(cc(\"line\",{class:\"axis-tick axis-tick-x\",x1:m,y1:$i(u),x2:m,y2:$i(u+6)}),cc(\"text\",{class:\"axis-label axis-label-x\",x:m,y:$i(u+22),\"text-anchor\":\"middle\"},[o9(Oun(p,t))]))}if(l)d.push(...jPi({graphs:n,valueAxis:e,scaleY:i,plotLeft:r,plotWidth:s,plotHeight:a}));else{for(const p of e.ticks){const m=$i(i(p));d.push(cc(\"line\",{class:\"axis-tick axis-tick-y\",x1:$i(g-6),y1:m,x2:$i(g),y2:m}),cc(\"text\",{class:\"axis-label axis-label-y\",x:$i(g-10),y:m,\"text-anchor\":\"end\",\"dominant-baseline\":\"middle\"},[o9(Oun(p,e))]))}d.push(cc(\"text\",{class:\"axis-title axis-title-y\",x:$i(g-64),y:$i(hm.top+a/2),transform:`rotate(-90 ${$i(g-64)} ${$i(hm.top+a/2)})`,\"text-anchor\":\"middle\"},[o9(A)]))}return d.push(cc(\"text\",{class:\"axis-title axis-title-x\",x:$i(g+s/2),y:$i(u+48),\"text-anchor\":\"middle\"},[o9(c)])),cc(\"g\",{class:\"axes\"},d)}function E_e(t,e=!1){if(t.length===0)return{domainMin:0,domainMax:1,ticks:[0,1]};const n=Math.min(...t),o=Math.max(...t);if(n===o){const A=n===0?1:Math.abs(n)*.1||1;return{domainMin:n-A,domainMax:n+A,ticks:[n-A,n,n+A]}}const i=Gun(n,o),r=i.length\u003e0?[...i]:[n,o];let s=r[0],a=r[r.length-1];if(e\u0026\u0026r.length\u003e1){const A=Math.abs(r[1]-r[0]),c=.1;n\u003cs+A*c\u0026\u0026(s-=A,r.unshift(s)),o\u003ea-A*c\u0026\u0026(a+=A,r.push(a))}return{domainMin:s,domainMax:a,ticks:r}}function qPi({values:t,graphs:e,experiment:n}){const o=B_e(n?.start_time_ms),i=B_e(n?.end_time_ms),r=e.map(p=\u003eB_e(p.start_time_ms)).filter(p=\u003ep!==void 0),s=e.map(p=\u003eB_e(p.end_time_ms)).filter(p=\u003ep!==void 0),a=o??(r.length\u003e0?Math.min(...r):void 0),A=i??(s.length\u003e0?Math.max(...s):void 0);if(a===void 0||A===void 0||a===A)return E_e(t);const c=Math.min(a,A),l=Math.max(a,A),g=(l-c)*.12,h=Gun(c,l).filter(p=\u003ep\u003ec+g\u0026\u0026p\u003cl-g),d=XPi([c,...h,l]);return{domainMin:c,domainMax:l,ticks:d,tickLabelOverrides:new Map([[c,$i(c)],[l,$i(l)]])}}function B_e(t){return typeof t==\"number\"\u0026\u0026Number.isFinite(t)?t:void 0}function XPi(t){const e=[...t].sort((o,i)=\u003eo-i),n=[];for(const o of e){const i=n[n.length-1];(i===void 0||Math.abs(o-i)\u003e1e-12)\u0026\u0026n.push(o)}return n}function Gun(t,e,n=6){const o=e-t;if(!Number.isFinite(o)||o\u003c=Number.EPSILON)return[t,e];const i=ZPi(o/Math.max(1,n-1)),r=Math.floor(t/i)*i,s=Math.ceil(e/i)*i,a=[];for(let A=r;A\u003c=s+i/2;A+=i)a.push(Number.parseFloat(A.toPrecision(12)));return a}function ZPi(t){if(!Number.isFinite(t)||t\u003c=0)return 1;const e=Math.floor(Math.log10(t)),n=t/10**e;let o;return n\u003c=1?o=1:n\u003c=2?o=2:n\u003c=5?o=5:o=10,o*10**e}function eMi(t,e){return cc(\"rect\",{class:\"background\",x:\"0\",y:\"0\",width:$i(t),height:$i(e)})}function tMi(t,e,n,o){return cc(\"defs\",{},[cc(\"clipPath\",{id:t},[cc(\"rect\",{x:$i(e),y:$i(hm.top),width:$i(n),height:$i(o)})])])}function nMi({timeAxis:t,valueAxis:e,scaleX:n,scaleY:o,plotLeft:i,plotWidth:r,plotHeight:s}){const a=hm.top,A=hm.top+s,c=i,l=i+r,u=[];for(const g of t.ticks){const h=$i(n(g));u.push(cc(\"line\",{class:\"grid-line grid-line-x\",x1:h,y1:$i(a),x2:h,y2:$i(A)}))}for(const g of e.ticks){const h=$i(o(g));u.push(cc(\"line\",{class:\"grid-line grid-line-y\",x1:$i(c),y1:h,x2:$i(l),y2:h}))}return cc(\"g\",{class:\"grid\"},u)}function Yun(t,e,n,o){if(!Number.isFinite(t)||!Number.isFinite(e)){const r=(n+o)/2;return()=\u003er}const i=e-t;if(Math.abs(i)\u003cNumber.EPSILON){const r=(n+o)/2;return()=\u003er}return r=\u003en+(r-t)/i*(o-n)}function oMi(t,e,n){return cc(\"rect\",{class:\"plot-background\",x:$i(t),y:$i(hm.top),width:$i(e),height:$i(n)})}function iMi(){const t=`\n:root { color-scheme: light; }\nsvg { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; }\n.background { fill: ${$h.schematic.background}; }\n.plot-background { fill: #ffffff; }\n.grid-line { stroke: rgba(0, 0, 0, 0.08); stroke-width: 1; }\n.axis { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1.5; }\n.axis-tick { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1; }\n.axis-label { fill: rgba(0, 0, 0, 0.75); font-size: 12px; }\n.axis-title { fill: rgba(0, 0, 0, 0.9); font-size: 14px; font-weight: 600; }\n.legend-label { fill: rgba(0, 0, 0, 0.75); font-size: 11px; }\n.legend-line { stroke-width: 3; }\n.scope-channel-card { fill: #ffffff; stroke: rgba(0, 0, 0, 0.22); stroke-width: 1; }\n.scope-channel-header-text { fill: #ffffff; font-size: 14px; font-weight: 700; }\n.scope-channel-detail { fill: rgba(0, 0, 0, 0.42); font-size: 14px; }\n.simulation-line { fill: none; stroke-width: 2.5; }\n.simulation-point { stroke-width: 0; }\n.chart-title { fill: rgba(0, 0, 0, 0.85); font-size: 18px; font-weight: 600; }\n`;return cc(\"style\",{},[o9(t)])}function Uun(t,e){const n=t[e];if(typeof n==\"string\")return n}function rMi(t,e,n,o){const r=[4,8],s=r.map(g=\u003e$i(g)).join(\" \"),A=r.reduce((g,h)=\u003eg+h,0)/3,c=[];t.forEach((g,h)=\u003e{if(g.points.length===0)return;const d=[];g.points.forEach((I,C)=\u003e{const y=$i(n(I.timeMs)),x=$i(o(I.displayValue));d.push(`${C===0?\"M\":\"L\"} ${y} ${x}`)});const p={class:\"simulation-line\",d:d.join(\" \"),stroke:g.color,\"clip-path\":`url(#${e})`,[Fun(g.graph)]:sje(g.graph)};g.graph.source_component_id\u0026\u0026(p[\"data-source-component-id\"]=g.graph.source_component_id);const m=Uun(g.graph,\"source_probe_id\");m\u0026\u0026(p[\"data-source-probe-id\"]=m);const _=Uun(g.graph,\"source_probe_name\");_\u0026\u0026(p[\"data-source-probe-name\"]=_),g.graph.subcircuit_connectivity_map_key\u0026\u0026(p[\"data-subcircuit-connectivity-map-key\"]=g.graph.subcircuit_connectivity_map_key);const f=g.points.map(I=\u003e{const C=$i(n(I.timeMs)),y=$i(o(I.displayValue));return cc(\"circle\",{class:\"simulation-point\",cx:C,cy:y,r:\"2.5\",fill:g.color,\"clip-path\":`url(#${e})`})});c.push({entry:g,graphIndex:h,pathAttributes:p,pointElements:f})});const l=[];for(let g=0;g\u003c3;g++)for(const h of c){const d=(h.graphIndex+g)%3,p=$i(d*A);l.push(cc(\"path\",{...h.pathAttributes,\"stroke-dasharray\":s,\"stroke-dashoffset\":p}))}const u=c.flatMap(g=\u003eg.pointElements);return cc(\"g\",{class:\"data-series\"},[...l,...u])}function sMi(t,e){return t?.name?cc(\"text\",{class:\"chart-title\",x:$i(e/2),y:$i(hm.top-40),\"text-anchor\":\"middle\"},[o9(t.name)]):null}var Kun=16;function aMi(t,e,n,o){const i=o.map((r,s)=\u003ecc(\"tspan\",{x:\"20\",dy:s===0?\"0\":String(Kun)},[o9(r)]));return cc(\"g\",{class:\"legend-item\",transform:`translate(${$i(e)} ${$i(n)})`},[cc(\"line\",{class:\"legend-line\",x1:\"0\",y1:\"0\",x2:\"16\",y2:\"0\",stroke:t.color}),cc(\"text\",{class:\"legend-label\",x:\"20\",y:\"0\",\"dominant-baseline\":\"middle\"},i)])}var AMi=15;function cMi(t){const e=t.split(\"_\");if(e.length\u003c=1)return[t];const n=[];let o=e[0]??\"\";for(let i=1;i\u003ce.length;i++){const r=e[i]??\"\",s=`${o}_${r}`;s.length\u003eAMi?(n.push(o),o=r):o=s}return o\u0026\u0026n.push(o),n}var lMi=24;function uMi(t,e){let n=hm.top;const o=t.map(i=\u003e{const r=e-hm.right+10,s=cMi(i.label),a=aMi(i,r,n,s),A=s.length*Kun;return n+=Math.max(A,lMi),a});return cc(\"g\",{class:\"legend\"},o)}var NT=118,b_e=94,MU=18;function Vun(t,e){const n=Math.floor((e+MU)/(NT+MU)),o=Math.max(1,Math.min(n,t)),i=Math.max(1,Math.ceil(t/o)),r=o*NT+(o-1)*MU,s=i*b_e+(i-1)*MU;return{columns:o,rows:i,x:Math.max(0,(e-r)/2),height:s}}var S_e=20,Aje=8,gMi=14;function dMi(t,e,n){const o=Vun(t.length,e),i=[];for(const[r,s]of t.entries()){const a=r%o.columns,A=Math.floor(r/o.columns);i.push(hMi(s,r,o.x+a*(NT+MU),n+ije+A*(b_e+MU)))}return cc(\"g\",{class:\"scope-legend\"},i)}function hMi(t,e,n,o){const i=t.scopeTraceDisplay,r=qx(t.graph)?\"A\":\"V\",s=i\u0026\u0026GZ(i)?aje(i.valuePerDiv,r):`1 ${r}`,a=aje(i?.center??0,r),A=JPi(i?.offsetDivs??0),c=`Ch${e+1}`,u=[t.label===c?void 0:t.label,`${s}/div`,A,a].filter(h=\u003e!!h),g=u.length\u003e1?(b_e-S_e-Aje*2-gMi)/(u.length-1):0;return cc(\"g\",{class:\"scope-channel\",transform:`translate(${$i(n)} ${$i(o)})`,[Fun(t.graph)]:sje(t.graph)},[cc(\"rect\",{class:\"scope-channel-card\",x:\"0\",y:\"0\",width:$i(NT),height:$i(b_e),rx:\"6\",ry:\"6\"}),cc(\"rect\",{x:\"0\",y:\"0\",width:$i(NT),height:$i(S_e),rx:\"6\",ry:\"6\",fill:t.color}),cc(\"rect\",{x:\"0\",y:$i(S_e-6),width:$i(NT),height:\"6\",fill:t.color}),cc(\"text\",{class:\"scope-channel-header-text\",x:$i(NT/2),y:\"14\",\"text-anchor\":\"middle\"},[o9(c)]),...u.map((h,d)=\u003ecc(\"text\",{class:\"scope-channel-detail\",x:$i(Aje),y:$i(S_e+Aje+d*g),\"dominant-baseline\":\"hanging\"},[o9(h)]))])}function pMi(t){const e=Math.ceil(t/2),n=Math.floor(t/2);return{left:zun(e),right:zun(n)}}function zun(t){if(t\u003c=1)return 0;const e=10+(t-1)*rje+6+UPi+KPi;return Math.max(0,e-hm.left)}function Jun(t){return t.type===\"simulation_transient_voltage_graph\"||t.type===\"simulation_transient_current_graph\"||t.type===\"simulation_dc_operating_point_voltage\"||t.type===\"simulation_dc_operating_point_current\"||t.type===\"simulation_dc_sweep_voltage_graph\"||t.type===\"simulation_dc_sweep_current_graph\"||t.type===\"simulation_ac_sweep_voltage_graph\"||t.type===\"simulation_ac_sweep_current_graph\"}function Wun(t){return t?.type===\"simulation_experiment\"}function mMi(t){return t?.type===\"simulation_voltage_probe\"}function _Mi(t){return t?.type===\"simulation_current_probe\"}function fMi(t){return t?.type===\"simulation_oscilloscope_trace\"}function IMi(t,e){const n=yMi(t),o=Lun(t),i=Math.min(n.length,o.length),r=[],s=CMi(e);for(let a=0;a\u003ci;a++){const A=Number(n[a]??Number.NaN),c=Number(o[a]??Number.NaN);!Number.isFinite(A)||!Number.isFinite(c)||r.push({timeMs:A,rawValue:c,displayValue:s(c)})}return r}function CMi(t){if(!GZ(t))return i=\u003ei;const e=t.center??0,n=t.offsetDivs??0,o=t.valuePerDiv;return i=\u003en+(i-e)/o}function yMi(t){const e=Lun(t);if(Array.isArray(t.timestamps_ms)\u0026\u0026t.timestamps_ms.length===e.length)return t.timestamps_ms.map(r=\u003eNumber(r));const n=e.length;if(n===0)return[];const o=[];for(let r=0;r\u003cn;r++)o.push(t.start_time_ms+t.time_per_step*r);const i=o.length\u003e0?o[o.length-1]:void 0;return i!==void 0\u0026\u0026Number.isFinite(t.end_time_ms)\u0026\u0026Number.isFinite(i)\u0026\u0026Math.abs(i-t.end_time_ms)\u003et.time_per_step/2\u0026\u0026o.push(t.end_time_ms),o}function Q_e(t,e){const n=t[e];if(typeof n==\"string\")return n}function xMi(t,e,n,o){const i=qx(t)?\"I\":\"V\";if(n?.displayName)return n.displayName;if(t.simulation_parameter_sweep_coordinate\u0026\u0026t.name)return t.name;if(e?.name)return`${i}(${e.name})`;const r=Q_e(t,\"source_probe_name\");if(r)return`${i}(${r})`;if(t.source_component_id){const s=o.get(t.source_component_id);if(s)return`${i}(${s})`}return t.name?t.name:t.source_component_id?`Probe ${t.source_component_id}`:sje(t)}function EMi(t,e,n,o,i,r){if(qx(t)){const A=o.get(t.simulation_transient_current_graph_id);if(A)return A;const c=Q_e(t,\"source_probe_id\")??(e?.type===\"simulation_current_probe\"?e.simulation_current_probe_id:void 0);return c?r.get(c):void 0}const s=n.get(t.simulation_transient_voltage_graph_id);if(s)return s;const a=Q_e(t,\"source_probe_id\")??(e?.type===\"simulation_voltage_probe\"?e.simulation_voltage_probe_id:void 0);return a?i.get(a):void 0}function BMi(t,e,n,o,i){const r=Q_e(t,\"source_probe_id\");if(r){const s=qx(t)?n.get(r):e.get(r);if(s)return s}if(t.source_component_id)return qx(t)?i.get(t.source_component_id):o.get(t.source_component_id)}function bMi(t,e){if(e)return{displayName:e.display_name,color:e.color,center:e.display_center_value,offsetDivs:e.display_center_offset_divs,valuePerDiv:qx(t)?e.amps_per_div:e.volts_per_div}}function SMi(t,e){const n=Array.isArray($h.simulation_palette)?$h.simulation_palette:Array.isArray($h.palette)?$h.palette:[],o=e.filter(mMi),i=e.filter(_Mi),r=e.filter(fMi),s=new Map,a=new Map,A=new Map,c=new Map,l=new Map,u=new Map,g=new Map,h=new Map,d=new Map,p=new Map,m=new Map,_=new Map;for(const f of r)f.simulation_transient_voltage_graph_id\u0026\u0026d.set(f.simulation_transient_voltage_graph_id,f),f.simulation_transient_current_graph_id\u0026\u0026p.set(f.simulation_transient_current_graph_id,f),f.simulation_voltage_probe_id\u0026\u0026m.set(f.simulation_voltage_probe_id,f),f.simulation_current_probe_id\u0026\u0026_.set(f.simulation_current_probe_id,f);for(const f of o)l.set(f.simulation_voltage_probe_id,f),f.name\u0026\u0026f.source_component_id\u0026\u0026s.set(f.source_component_id,f.name),f.color\u0026\u0026f.source_component_id\u0026\u0026a.set(f.source_component_id,f.color),f.source_component_id\u0026\u0026g.set(f.source_component_id,f);for(const f of i)u.set(f.simulation_current_probe_id,f),f.name\u0026\u0026f.source_component_id\u0026\u0026A.set(f.source_component_id,f.name),f.color\u0026\u0026f.source_component_id\u0026\u0026c.set(f.source_component_id,f.color),f.source_component_id\u0026\u0026h.set(f.source_component_id,f);return t.map((f,I)=\u003e{const C=BMi(f,l,u,g,h),y=EMi(f,C,d,p,m,_),x=bMi(f,y),E=IMi(f,x),B=QMi(n,I),S=vMi(f,C,qx(f)?c:a),Q=f.color??x?.color??S??B,w=xMi(f,C,x,qx(f)?A:s);return{graph:f,points:E,color:Q,label:w,scopeTraceDisplay:x,usesScopeTraceDisplay:GZ(x)}}).filter(f=\u003ef.points.length\u003e0)}function QMi(t,e){return t.length===0?kun:t[e%t.length]??kun}function vMi(t,e,n){if(e?.color)return e.color;if(t.source_component_id)return n.get(t.source_component_id)}function jun({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r=\"magnitude\",width:s=GPi,height:a=YPi,includeVersion:A}){const c=o?new Set(o):null,l=n?new Set(n):null,u=!!(c||l),g=i?new Set(i):null,h=t.find(J=\u003eWun(J)\u0026\u0026J.simulation_experiment_id===e),d=t.filter(J=\u003eJun(J)\u0026\u0026J.simulation_experiment_id===e\u0026\u0026(!g||g.has(Tun(J)))\u0026\u0026(!u||J.type===\"simulation_transient_voltage_graph\"\u0026\u0026(c?.has(J.simulation_transient_voltage_graph_id)??!1)||J.type===\"simulation_transient_current_graph\"\u0026\u0026(l?.has(J.simulation_transient_current_graph_id)??!1))),p=OPi({results:d,acSweepView:r,experiment:h}),m=p.graphs;if(m.length===0)throw new Error(`No simulation analysis results found for simulation_experiment_id \"${e}\"`);const _=SMi(m,t),f=_.flatMap(J=\u003eJ.points);if(f.length===0)throw new Error(`Simulation results for simulation_experiment_id \"${e}\" do not contain any datapoints`);const I=f.map(J=\u003eJ.timeMs);let C;p.usesLogarithmicXValues?C=wMi(I):p.xAxisTitle===\"Time (ms)\"?C=qPi({values:I,graphs:m,experiment:h}):C=E_e(I);const y=E_e(f.map(J=\u003eJ.displayValue),!0),x=_.some(J=\u003eJ.usesScopeTraceDisplay),E=x?pMi(_.length):{left:0,right:0},B=s+E.left+E.right,S=x?Vun(_.length,B):null,Q=S?a+ije+S.height+ije:a,w=Math.max(1,s-hm.left-hm.right),M=Math.max(1,a-hm.top-hm.bottom),k=hm.left+E.left,R=Yun(C.domainMin,C.domainMax,k,k+w),F=Yun(y.domainMin,y.domainMax,hm.top+M,hm.top),O=zPi(e),U=qWe(t),Y=XWe,W=sMi(h,B),te=[iMi(),eMi(B,Q),tMi(O,k,w,M),oMi(k,w,M),nMi({timeAxis:C,valueAxis:y,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M}),rMi(_,O,R,F),$Pi({timeAxis:C,valueAxis:y,graphs:_,scaleX:R,scaleY:F,plotLeft:k,plotWidth:w,plotHeight:M,yAxisTitle:p.yAxisTitle??VPi(_),xAxisTitle:p.xAxisTitle,usesScopeTraceDisplay:x}),x?dMi(_,B,a):uMi(_,B),...W?[W]:[]],j=cc(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:B.toString(),height:Q.toString(),style:`background-color: ${$h.schematic.background}`,viewBox:`0 0 ${$i(B)} ${$i(Q)}`,\"data-simulation-experiment-id\":e,...h?.name\u0026\u0026{\"data-simulation-experiment-name\":h.name},...U\u0026\u0026{\"data-software-used-string\":U},...A\u0026\u0026{\"data-circuit-to-svg-version\":Y}},te);return $We(j)}var wMi=t=\u003e{const e=E_e(t);return{...e,tickLabelOverrides:new Map(e.ticks.map(n=\u003e[n,$i(10**n)]))}},PMi=1200,MMi=1200,$un=.55;function DMi({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s=PMi,height:a=MMi,schematicHeightRatio:A=$un,schematicOptions:c,includeVersion:l,graphAboveSchematic:u=!1,showErrorsInTextOverlay:g}){const h=t.filter(F=\u003e!Wun(F)\u0026\u0026!Jun(F)),d=RMi(A),p=Math.max(1,a*d),m=Math.max(1,a-p),_=p+m,f=_===0?1:a/_,I=p*f,C=m*f,y=Dun(h,{...c,width:s,height:I,includeVersion:!1,showErrorsInTextOverlay:g}),x=jun({circuitJson:t,simulation_experiment_id:e,simulation_transient_current_graph_ids:n,simulation_transient_voltage_graph_ids:o,simulation_result_ids:i,ac_sweep_view:r,width:s,height:C,includeVersion:!1}),E=uun($W(y)),B=uun($W(x)),S=NMi(B)??{width:s,height:C},Q=S.width\u003e0?s*(S.height/S.width):C,w=I+Q,M=[];u?(M.push(m_e(B,0,0,s,Q)),M.push(m_e(E,0,Q,s,I))):(M.push(m_e(E,0,0,s,I)),M.push(m_e(B,0,I,s,Q)));const k=qWe(h),R={name:\"svg\",type:\"element\",value:\"\",attributes:{xmlns:\"http://www.w3.org/2000/svg\",width:f4(s),height:f4(w),viewBox:`0 0 ${f4(s)} ${f4(w)}`,\"data-simulation-experiment-id\":e,...k\u0026\u0026{\"data-software-used-string\":k},...l\u0026\u0026{\"data-circuit-to-svg-version\":XWe}},children:M};return $We(R)}function NMi(t){const e=t.attributes?.viewBox;if(typeof e!=\"string\")return null;const n=e.trim().split(/[\\s,]+/).map(r=\u003eNumber.parseFloat(r));if(n.length!==4)return null;const o=n.at(2),i=n.at(3);return!Number.isFinite(o)||!Number.isFinite(i)||o===void 0||i===void 0||o\u003c=0||i\u003c=0?null:{width:o,height:i}}function RMi(t){return Number.isFinite(t)?t\u003c=0?0:t\u003e=1?1:t:$un}var qun=({initialTransform:t,initialTouch1:e,initialTouch2:n,finalTouch1:o,finalTouch2:i})=\u003e{if(!o||!i)return t;const r={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s={x:(o.x+i.x)/2,y:(o.y+i.y)/2},a=Math.hypot(n.x-e.x,n.y-e.y),A=Math.hypot(i.x-o.x,i.y-o.y),c=a===0?1:A/a,l=s.x-r.x,u=s.y-r.y;return Ad(pA(l,u),pA(r.x,r.y),dC(c,c),pA(-r.x,-r.y),t)},YZ=(t={})=\u003e{const e=ee.useRef(null),[n,o]=ee.useState(0),i=t.canvasElm??e.current,[r,s]=ee.useState(t.initialTransform??QQ()),[a,A]=ee.useState(0),[c,l]=ee.useReducer(I=\u003eI+1,0),u=ee.useCallback(I=\u003e{t.onSetTransform\u0026\u0026t.onSetTransform(I),t.transform||s(I)},[t.onSetTransform,s]),g=ee.useCallback(I=\u003e{u(I),l()},[u]),h=t.transform??r,d=ee.useCallback(()=\u003e{o(Date.now())},[]),p=ee.useRef(\"none\"),m=ee.useRef(null),_=ee.useRef(null);ee.useEffect(()=\u003e{const I=t.canvasElm??e.current;if(I\u0026\u0026!i){A(a+1);return}if(!I){const U=setTimeout(()=\u003e{A(a+1)},100);return()=\u003eclearTimeout(U)}let C=t.transform??r,y={x:0,y:0},x={x:0,y:0},E=!1;const B=U=\u003e({x:U.pageX-I.getBoundingClientRect().left-window.scrollX,y:U.pageY-I.getBoundingClientRect().top-window.scrollY});function S(U){t.enabled!==!1\u0026\u0026(t.shouldDrag\u0026\u0026!t.shouldDrag(U)||(y=B(U),!(Date.now()-n\u003c100)\u0026\u0026(E=!0,U.preventDefault())))}function Q(U){if(!E||t.enabled===!1||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;x=B(U);const Y=Ad(pA(x.x-y.x,x.y-y.y),C);u(Y),C=Y,E=!1}function w(U){if(B(U),!E||t.enabled===!1||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;x=B(U);const Y=Ad(pA(x.x-y.x,x.y-y.y),C);u(Y)}function M(U){if(t.enabled===!1||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;const Y=B(U),W=Ad(pA(Y.x,Y.y),dC(1-U.deltaY/1e3,1-U.deltaY/1e3),pA(-Y.x,-Y.y),C);u(W),C=W,U.preventDefault()}function k(U){if(!E||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;if(I){const W=I.getBoundingClientRect();if(U.clientX\u003e=W.left+10\u0026\u0026U.clientX\u003c=W.right-10\u0026\u0026U.clientY\u003e=W.top+10\u0026\u0026U.clientY\u003c=W.bottom-10)return}E=!1,x=B(U);const Y=Ad(pA(x.x-y.x,x.y-y.y),C);u(Y),C=Y}function R(U){if(U.preventDefault(),t.enabled!==!1){if(U.touches.length===1){p.current=\"drag\";const Y=U.touches[0];m.current={initialTransform:C,initialTouch:{x:Y.clientX,y:Y.clientY}}}else if(U.touches.length===2){p.current=\"pinch\";const Y=U.touches[0],W=U.touches[1];_.current={initialTransform:C,initialTouch1:{x:Y.clientX,y:Y.clientY},initialTouch2:{x:W.clientX,y:W.clientY},finalTouch1:null,finalTouch2:null}}}}function F(U){if(U.preventDefault(),t.enabled!==!1){if(p.current===\"drag\"\u0026\u0026U.touches.length===1\u0026\u0026m.current){const Y=U.touches[0],W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=Ad(pA(te,j),m.current.initialTransform);u(J)}else if(p.current===\"pinch\"\u0026\u0026U.touches.length===2\u0026\u0026_.current){const Y=U.touches[0],W=U.touches[1];_.current.finalTouch1={x:Y.clientX,y:Y.clientY},_.current.finalTouch2={x:W.clientX,y:W.clientY};const te=qun(_.current);u(te)}}}function O(U){U.preventDefault();const Y=U.changedTouches[0];if(p.current===\"drag\"\u0026\u0026m.current\u0026\u0026Y){const W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=Ad(pA(te,j),m.current.initialTransform);u(J),C=J}else if(p.current===\"pinch\"\u0026\u0026_.current){const W=qun(_.current);u(W),C=W}p.current=\"none\",m.current=null,_.current=null}return I.addEventListener(\"mousedown\",S),I.addEventListener(\"mouseup\",Q),window.addEventListener(\"mousemove\",w),I.addEventListener(\"mouseout\",k),I.addEventListener(\"wheel\",M),I.addEventListener(\"touchstart\",R,{passive:!1}),I.addEventListener(\"touchmove\",F,{passive:!1}),I.addEventListener(\"touchend\",O,{passive:!1}),I.addEventListener(\"touchcancel\",O,{passive:!1}),()=\u003e{I.removeEventListener(\"mousedown\",S),I.removeEventListener(\"mouseup\",Q),window.removeEventListener(\"mousemove\",w),I.removeEventListener(\"mouseout\",k),I.removeEventListener(\"wheel\",M),I.removeEventListener(\"touchstart\",R),I.removeEventListener(\"touchmove\",F),I.removeEventListener(\"touchend\",O),I.removeEventListener(\"touchcancel\",O)}},[i,a,c,n,t.enabled,t.shouldDrag]);const f=ee.useCallback(I=\u003eBn(h,I),[h]);return{ref:e,transform:h,applyTransformToPoint:f,setTransform:g,cancelDrag:d}},Xun=YZ;function cje(t){const e=O3(t),n=new Map;for(const s of e.schematic_component.list())s.source_component_id\u0026\u0026n.set(s.source_component_id,s.schematic_component_id);const o=new Map;for(const s of e.source_trace.list()){const a=s.subcircuit_connectivity_map_key;if(a)for(const A of s.connected_source_port_ids??[]){const c=n.get(e.source_port.get(A)?.source_component_id??\"\");c\u0026\u0026(o.has(c)||o.set(c,new Set),o.get(c).add(a))}}const i=new Map;for(const s of e.schematic_net_label.list()){if(!s.source_net_id)continue;const a=e.source_net.get(s.source_net_id)?.subcircuit_connectivity_map_key??s.source_net_id;i.set(s.schematic_net_label_id,a)}const r=new Map;for(const s of e.schematic_text.list()){if(!s.source_trace_id)continue;const a=e.source_trace.get(s.source_trace_id)?.subcircuit_connectivity_map_key;a\u0026\u0026r.set(s.schematic_text_id,a)}return{componentIdToKeys:o,netLabelIdToKey:i,textIdToKey:r}}var v_e=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),Zun=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i,s=r?Math.max(0,Math.min(1,((t.x-e.x)*o+(t.y-e.y)*i)/r)):0;return v_e(t,{x:e.x+s*o,y:e.y+s*i})},RT=(t,e,n)=\u003eMath.abs(v_e(e,t)+v_e(t,n)-v_e(e,n))\u003c1e-5;function TMi(t,e){const n=cje(e),o=t?.closest(\"[data-subcircuit-connectivity-map-key], [data-schematic-net-label-id], [data-schematic-text-id], [data-schematic-trace-id]\");if(!o)return;const i=e.find(r=\u003er.type===\"schematic_trace\"\u0026\u0026r.schematic_trace_id===o.getAttribute(\"data-schematic-trace-id\"));return o.getAttribute(\"data-subcircuit-connectivity-map-key\")||n.netLabelIdToKey.get(o.getAttribute(\"data-schematic-net-label-id\"))||n.textIdToKey.get(o.getAttribute(\"data-schematic-text-id\"))||(i?.type===\"schematic_trace\"?i.subcircuit_connectivity_map_key||e.filter(r=\u003er.type===\"source_trace\").find(r=\u003er.source_trace_id===i.source_trace_id)?.subcircuit_connectivity_map_key:void 0)}function kMi(t,e){const n=cje(t),o=t.filter(u=\u003eu.type===\"source_trace\"),i=t.filter(u=\u003eu.type===\"schematic_trace\"),r=t.filter(u=\u003eu.type===\"schematic_sheet\"),s=r[0]?.schematic_sheet_id,a=[];for(const u of i)if((u.subcircuit_connectivity_map_key??o.find(h=\u003eh.source_trace_id===u.source_trace_id)?.subcircuit_connectivity_map_key)===e)for(const h of u.edges)a.push({a:h.from,b:h.to,sheet:u.schematic_sheet_id??s,target:{type:\"schematic_trace\",id:u.schematic_trace_id},sourceTraceId:u.source_trace_id,portIds:[h.from_schematic_port_id,h.to_schematic_port_id].filter(d=\u003e!!d),junctions:u.junctions});for(const u of t)if(u.type===\"schematic_net_label\"\u0026\u0026n.netLabelIdToKey.get(u.schematic_net_label_id)===e){const g=u.anchor_position??u.center;a.push({a:g,b:g,sheet:u.schematic_sheet_id??s,target:{type:\"schematic_net_label\",id:u.schematic_net_label_id},name:u.text})}for(const u of t){if(u.type!==\"schematic_text\"||n.textIdToKey.get(u.schematic_text_id)!==e)continue;const g=u.schematic_sheet_id??s,d=a.filter(p=\u003ep.sheet===g\u0026\u0026p.sourceTraceId===u.source_trace_id).sort((p,m)=\u003eZun(u.position,p.a,p.b)-Zun(u.position,m.a,m.b))[0]?.a??u.position;a.push({a:d,b:d,sheet:g,target:{type:\"schematic_text\",id:u.schematic_text_id},name:u.text})}const A=a.map((u,g)=\u003eg),c=u=\u003eA[u]===u?u:A[u]=c(A[u]);for(let u=0;u\u003ca.length;u++)for(let g=0;g\u003cu;g++){const h=a[u],d=a[g];h.sheet===d.sheet\u0026\u0026(RT(h.a,d.a,d.b)||RT(h.b,d.a,d.b)||RT(d.a,h.a,h.b)||RT(d.b,h.a,h.b)||[...h.junctions??[],...d.junctions??[]].some(p=\u003eRT(p,h.a,h.b)\u0026\u0026RT(p,d.a,d.b)))\u0026\u0026(A[c(u)]=c(g))}const l=new Map;return a.forEach((u,g)=\u003el.set(c(g),[...l.get(c(g))??[],u])),[...l.values()].map((u,g)=\u003e{const h=u.find(f=\u003ef.target.type!==\"schematic_trace\")??u[0],p=t.filter(f=\u003ef.type===\"schematic_port\").filter(f=\u003e(f.schematic_sheet_id??s)===h.sheet\u0026\u0026u.some(I=\u003eI.portIds?.includes(f.schematic_port_id)||RT(f.center,I.a,I.b))).map(f=\u003e{const I=t.find(y=\u003ey.type===\"source_port\"\u0026\u0026y.source_port_id===f.source_port_id);if(I?.type!==\"source_port\")return;const C=t.find(y=\u003ey.type===\"source_component\"\u0026\u0026y.source_component_id===I.source_component_id);return C?.type===\"source_component\"?`${C.name}.${I.name??`pin${I.pin_number}`}`:void 0}).filter(f=\u003e!!f).sort(),m=r.findIndex(f=\u003ef.schematic_sheet_id===h.sheet);return{kind:\"net\",label:`${r[m]?.name??`Sheet ${Math.max(0,m)+1}`}: ${p[0]??h.name??`Location ${g+1}`}`,schematicSheetId:h.sheet,target:h.target,focusPoint:{x:(h.a.x+h.b.x)/2,y:(h.a.y+h.b.y)/2}}})}var FMi=\"https://jscdn.tscircuit.com/@tscircuit/circuit-json-schematic-placement-analysis/latest/dist/browser.js\",LMi={async load(){const t=await import(FMi);if(typeof t.createSchematicPlacementIssueArtifacts!=\"function\")throw new Error(\"The style analyzer module does not export its analysis function.\");return t}},ME={contextMenu:110,styleAnalysis:120,viewMenu:55,viewMenuIcon:48,clickToInteractOverlay:100,schematicComponentDetailsTooltip:105,schematicComponentHoverOutline:47,schematicPortHoverOutline:48,schematicSearch:101},HMi=({circuitJson:t,onClose:e})=\u003e{const[n,o]=ee.useState({status:\"loading\"});return ee.useEffect(()=\u003e{let i=!1;const r=window.setTimeout(async()=\u003e{try{const{createSchematicPlacementIssueArtifacts:s}=await LMi.load();if(i)return;const a=s(t);i||o({status:\"complete\",artifacts:a})}catch(s){i||o({status:\"error\",message:s instanceof Error?s.message:String(s)})}},0);return()=\u003e{i=!0,window.clearTimeout(r)}},[t]),K.jsx(r_e,{open:!0,onOpenChange:i=\u003e!i\u0026\u0026e(),children:K.jsxs(s_e,{children:[K.jsx(wZ,{style:{position:\"fixed\",inset:0,background:\"#0008\",zIndex:ME.styleAnalysis}}),K.jsxs(MZ,{style:{position:\"fixed\",top:\"5vh\",left:\"50%\",transform:\"translateX(-50%)\",width:\"min(1000px, 94vw)\",maxHeight:\"90vh\",overflowY:\"auto\",boxSizing:\"border-box\",padding:24,borderRadius:12,background:\"#fafafa\",color:\"#171717\",fontFamily:\"system-ui, sans-serif\",boxShadow:\"0 20px 60px #0005\",zIndex:ME.styleAnalysis},children:[K.jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:16},children:[K.jsx(a_e,{style:{margin:0,fontSize:22},children:\"Style Analysis\"}),K.jsx(VWe,{style:{cursor:\"pointer\",padding:\"6px 12px\"},children:\"Close\"})]}),K.jsx(A_e,{style:{color:\"#525252\"},children:\"Placement and style issues across all schematic sheets. Each image highlights one issue with its description below.\"}),n.status===\"loading\"\u0026\u0026K.jsx(\"p\",{role:\"status\",children:\"Running style analysis…\"}),n.status===\"error\"\u0026\u0026K.jsxs(\"p\",{role:\"alert\",children:[\"Style analysis failed: \",n.message]}),n.status===\"complete\"\u0026\u0026K.jsxs(K.Fragment,{children:[K.jsx(\"p\",{role:\"status\",children:n.artifacts.length===0?\"No style issues found.\":`${n.artifacts.length} style ${n.artifacts.length===1?\"issue\":\"issues\"} found.`}),n.artifacts.map(i=\u003eK.jsxs(\"section\",{style:{marginTop:24,border:\"1px solid #ddd\",borderRadius:8,overflow:\"hidden\",background:\"white\"},children:[K.jsxs(\"h3\",{style:{margin:16,fontSize:16},children:[i.issueIndex+1,\".\",\" \",i.issue.lineItemType.replace(/([a-z])([A-Z])/g,\"$1 $2\"),i.schematicSheetId\u0026\u0026K.jsxs(\"small\",{style:{display:\"block\",marginTop:4,color:\"#525252\"},children:[\"Sheet: \",i.schematicSheetId]})]}),K.jsx(\"img\",{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(i.content)}`,alt:i.descriptionXml,loading:\"lazy\",style:{display:\"block\",width:\"100%\",height:\"auto\"}})]},i.issueIndex))]})]})]})})},DU={IS_SHOWING_SCHEMATIC_GROUPS:\"schematic_viewer_show_groups\",IS_SHOWING_SCHEMATIC_PORTS:\"schematic_viewer_show_ports\",SELECTED_SCHEMATIC_SHEET:\"schematic_viewer_selected_sheet\"},egn=(t,e)=\u003e{if(typeof window\u003e\"u\")return e;try{const n=localStorage.getItem(t);return n!==null?JSON.parse(n):e}catch{return e}},tgn=(t,e)=\u003e{if(!(typeof window\u003e\"u\"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},OMi=t=\u003e{if(typeof window\u003e\"u\")return null;try{return localStorage.getItem(t)}catch{return null}},GMi=(t,e)=\u003e{if(!(typeof window\u003e\"u\"))try{localStorage.setItem(t,e)}catch{}},ngn=[\"#8B0000\",\"#2F4F4F\",\"#191970\",\"#006400\",\"#FF4500\",\"#800080\",\"#2E8B57\",\"#B8860B\",\"#C71585\",\"#008B8B\"],YMi=t=\u003e{const{svgDivRef:e,circuitJson:n,circuitJsonKey:o,showGroups:i}=t;ee.useEffect(()=\u003e{if(e.current\u0026\u0026e.current.querySelectorAll(\".schematic-group-overlay\").forEach(a=\u003ea.remove()),!e.current||!i||!n||n.length===0)return;const r=setTimeout(()=\u003e{if(!e.current)return;const s=e.current.querySelector(\"svg\");if(!s)return;s.querySelectorAll(\".schematic-group-overlay\").forEach(A=\u003eA.remove());try{const A=O3(n).source_group?.list().filter(f=\u003e!f.is_subcircuit)||[],c=O3(n).schematic_component?.list()||[],l=new Map;A.forEach(f=\u003e{const I=f;if(I.parent_source_group_id){const C=l.get(I.parent_source_group_id)||[];C.push(f.source_group_id),l.set(I.parent_source_group_id,C)}});const u=f=\u003e{const I=[],C=l.get(f)||[];for(const y of C)I.push(y),I.push(...u(y));return I},g=f=\u003e{const I=A.find(C=\u003eC.source_group_id===f);return I?.parent_source_group_id?1+g(I.parent_source_group_id):0},h=A.length\u003e0\u0026\u0026A.some(f=\u003ef.name\u0026\u0026f.name.trim()!==\"\");let d=[];if(h){const f=new Map;for(const I of c){const C=O3(n).source_component.get(I.source_component_id);C?.source_group_id\u0026\u0026(f.has(C.source_group_id)||f.set(C.source_group_id,[]),f.get(C.source_group_id).push(I))}A.forEach((I,C)=\u003e{let y=f.get(I.source_group_id)||[];const x=u(I.source_group_id);for(const E of x){const B=f.get(E)||[];y=[...y,...B]}if(y.length\u003e0){const E=g(I.source_group_id),B=u(I.source_group_id).length\u003e0;if(I.name?.startsWith(\"unnamed_board\"))return;d.push({id:I.source_group_id,name:I.name||`Group ${C+1}`,components:y,color:ngn[C%ngn.length],depthLevel:E,hasChildren:B,sourceGroupId:I.source_group_id})}})}const p=s.viewBox.baseVal,m=s.getBoundingClientRect(),_=Math.min(m.width/p.width,m.height/p.height)||1;d.sort((f,I)=\u003ef.depthLevel-I.depthLevel),d.forEach(f=\u003e{if(f.components.length===0)return;const I=UMi(f.components,s);if(!I)return;const C=Math.max(8,Math.min(25,15/Math.max(_,.3))),y=f.hasChildren?C*.6:0,x=C+y,E=Math.max(1,2/Math.max(_,.5)),B=f.depthLevel===0?E:E*.7,S=Math.max(4,8/Math.max(_,.5)),Q=f.hasChildren?1.3:1,w=S*Q,M=w*.5,k=document.createElementNS(\"http://www.w3.org/2000/svg\",\"rect\");k.setAttribute(\"class\",\"schematic-group-overlay\"),k.setAttribute(\"x\",(I.minX-x).toString()),k.setAttribute(\"y\",(I.minY-x).toString()),k.setAttribute(\"width\",(I.maxX-I.minX+x*2).toString()),k.setAttribute(\"height\",(I.maxY-I.minY+x*2).toString()),k.setAttribute(\"fill\",\"none\"),k.setAttribute(\"stroke\",f.color),k.setAttribute(\"stroke-width\",B.toString()),k.setAttribute(\"stroke-dasharray\",`${w},${M}`),k.setAttribute(\"opacity\",\"0.8\"),k.setAttribute(\"rx\",\"0\"),k.setAttribute(\"ry\",\"0\");const R=Math.max(6,Math.min(20,14/Math.max(_,.2))),F=f.depthLevel===0||f.depthLevel===1?0:f.depthLevel*.2,O=R*(1-F),U=Math.max(1,O*.2),Y=f.name,W=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\");W.setAttribute(\"font-size\",O.toString()),W.setAttribute(\"font-family\",\"Arial, sans-serif\"),W.textContent=Y,s.appendChild(W);const te=W.getBBox();s.removeChild(W);const j=te.width+U*2,J=O+U*2,oe=I.minX-x,ie=I.minY-x-J,ne=document.createElementNS(\"http://www.w3.org/2000/svg\",\"rect\");ne.setAttribute(\"class\",\"schematic-group-overlay\"),ne.setAttribute(\"x\",oe.toString()),ne.setAttribute(\"y\",(ie-J).toString()),ne.setAttribute(\"width\",j.toString()),ne.setAttribute(\"height\",J.toString()),ne.setAttribute(\"fill\",\"transparent\"),ne.setAttribute(\"rx\",\"0\"),ne.setAttribute(\"ry\",\"0\");const le=document.createElementNS(\"http://www.w3.org/2000/svg\",\"text\");le.setAttribute(\"class\",\"schematic-group-overlay\"),le.setAttribute(\"x\",(oe+U).toString()),le.setAttribute(\"y\",(ie+J-U).toString()),le.setAttribute(\"fill\",f.color),le.setAttribute(\"font-size\",O.toString()),le.setAttribute(\"font-family\",\"Arial, sans-serif\"),le.setAttribute(\"font-weight\",f.depthLevel===0?\"600\":\"500\"),le.setAttribute(\"stroke\",f.color),le.setAttribute(\"stroke-width\",Math.max(.2,O*.02).toString()),le.textContent=Y,s.appendChild(k),s.appendChild(ne),s.appendChild(le)})}catch(A){console.error(\"Error creating group overlays:\",A)}},10);return()=\u003eclearTimeout(r)},[e,o,i])};function UMi(t,e){let n=1/0,o=1/0,i=-1/0,r=-1/0;for(const a of t){let A=e.querySelector(`g[data-schematic-component-id=\"${a.schematic_component_id}\"]`);if(A||(A=e.querySelector(`[data-schematic-component-id=\"${a.schematic_component_id}\"]`)),A){const c=A.getBBox();n=Math.min(n,c.x),o=Math.min(o,c.y),i=Math.max(i,c.x+c.width),r=Math.max(r,c.y+c.height)}}return n===1/0?null:{minX:n,minY:o,maxX:i,maxY:r}}var lje=\"sch-net-faded\",ogn=\"g.trace[data-subcircuit-connectivity-map-key], g.trace-overlays[data-subcircuit-connectivity-map-key]\",uje=\"[data-schematic-net-label-id], [data-schematic-text-id]\",KMi=({svgDivRef:t,circuitJson:e,circuitJsonKey:n,enabled:o})=\u003e{ee.useEffect(()=\u003e{const i=t.current;if(!o||!i)return;const{componentIdToKeys:r,netLabelIdToKey:s,textIdToKey:a}=cje(e);let A=[];const c=new Map;let l=null;const u=()=\u003e{for(const{el:_}of A)_.classList.remove(lje);A=[],c.clear(),l=null;const m=i.querySelector(\"svg\");if(m){for(const _ of Array.from(m.querySelectorAll(ogn))){const f=_.getAttribute(\"data-subcircuit-connectivity-map-key\"),I=new Set;f\u0026\u0026(I.add(f),c.set(_,f)),A.push({el:_,keys:I})}for(const _ of Array.from(m.querySelectorAll(\"g[data-schematic-component-id]\"))){const f=_.getAttribute(\"data-schematic-component-id\");A.push({el:_,keys:r.get(f)??new Set})}for(const _ of Array.from(m.querySelectorAll(uje))){const f=s.get(_.getAttribute(\"data-schematic-net-label-id\"))??a.get(_.getAttribute(\"data-schematic-text-id\")),I=new Set;f\u0026\u0026(I.add(f),c.set(_,f)),A.push({el:_,keys:I})}}},g=m=\u003e{if(m!==l){l=m;for(const{el:_,keys:f}of A)_.classList.toggle(lje,m!==null\u0026\u0026!f.has(m))}},h=m=\u003e{const _=m.target;if(!(_ instanceof Element)){g(null);return}const f=_.closest(`${ogn}, ${uje}`);if(f\u0026\u0026c.has(f)){g(c.get(f));return}for(const[I,C]of c){if(!I.matches(uje))continue;const y=I.getBoundingClientRect();if(m.clientX\u003e=y.left-6\u0026\u0026m.clientX\u003c=y.right+6\u0026\u0026m.clientY\u003e=y.top-6\u0026\u0026m.clientY\u003c=y.bottom+6){g(C);return}}g(null)},d=()=\u003eg(null);u(),i.addEventListener(\"mousemove\",h),i.addEventListener(\"mouseleave\",d);const p=new MutationObserver(u);return p.observe(i,{childList:!0}),()=\u003e{p.disconnect(),i.removeEventListener(\"mousemove\",h),i.removeEventListener(\"mouseleave\",d);for(const{el:m}of A)m.classList.remove(lje)}},[t,n,o])},gje=\"http://www.w3.org/2000/svg\",VMi=({svgDivRef:t,svgContent:e,circuitJsonKey:n})=\u003e{const o=ee.useRef(new Set);ee.useLayoutEffect(()=\u003e{o.current.clear()},[n]),ee.useLayoutEffect(()=\u003e{const i=[];for(const r of t.current?.querySelectorAll(\".schematic-warning\")??[]){const s=r.getAttribute(\"data-warning-id\"),a=r.querySelector('[data-warning-reference=\"callout\"]');if(!s||!a)continue;const A=Array.from(r.children),c=A.map(I=\u003eI.style.display),l=r.getAttribute(\"role\"),u=r.getAttribute(\"aria-label\")??\"Warning\",g=document.createElementNS(gje,\"g\");g.setAttribute(\"data-warning-icon\",\"\"),g.setAttribute(\"aria-hidden\",\"true\"),g.setAttribute(\"transform\",`translate(${a.getAttribute(\"x\")} ${a.getAttribute(\"y\")})`);const h=document.createElementNS(gje,\"rect\");h.setAttribute(\"width\",\"24\"),h.setAttribute(\"height\",\"24\"),h.setAttribute(\"fill\",a.getAttribute(\"fill\")??\"#fffaeb\"),h.setAttribute(\"stroke\",a.getAttribute(\"stroke\")??\"#d99a00\"),h.setAttribute(\"stroke-width\",\"1\");const d=document.createElementNS(gje,\"text\");d.setAttribute(\"x\",\"12\"),d.setAttribute(\"y\",\"12\"),d.setAttribute(\"dominant-baseline\",\"central\"),d.setAttribute(\"text-anchor\",\"middle\"),d.setAttribute(\"font-size\",\"16\"),d.setAttribute(\"font-family\",\"sans-serif\"),d.setAttribute(\"font-weight\",\"bold\"),d.setAttribute(\"fill\",\"#5c4300\"),d.textContent=\"!\",g.append(h,d),r.append(g),r.setAttribute(\"role\",\"button\"),r.setAttribute(\"tabindex\",\"0\"),r.style.cursor=\"pointer\",r.style.outline=\"none\";const p=()=\u003e{const I=o.current.has(s);A.forEach((C,y)=\u003e{C.style.display=I?\"none\":c[y]}),g.style.display=I?\"\":\"none\",r.setAttribute(\"aria-expanded\",String(!I)),r.setAttribute(\"aria-label\",`${I?\"Expand\":\"Minimize\"} warning: ${u}`)},m=I=\u003e{I.preventDefault(),I.stopPropagation(),o.current.has(s)?o.current.delete(s):o.current.add(s),p()},_=I=\u003e{(I.key===\"Enter\"||I.key===\" \")\u0026\u0026(I.repeat?I.preventDefault():m(I))},f=I=\u003eI.stopPropagation();r.addEventListener(\"click\",m),r.addEventListener(\"keydown\",_),r.addEventListener(\"mousedown\",f),r.addEventListener(\"touchstart\",f),p(),i.push(()=\u003e{r.removeEventListener(\"click\",m),r.removeEventListener(\"keydown\",_),r.removeEventListener(\"mousedown\",f),r.removeEventListener(\"touchstart\",f),g.remove(),A.forEach((I,C)=\u003e{I.style.display=c[C]}),l?r.setAttribute(\"role\",l):r.removeAttribute(\"role\"),r.setAttribute(\"aria-label\",u),r.removeAttribute(\"aria-expanded\"),r.removeAttribute(\"tabindex\"),r.style.removeProperty(\"cursor\"),r.style.removeProperty(\"outline\")})}return()=\u003ei.forEach(r=\u003er())},[t,e,n])},dje=t=\u003eString(t??\"\").toLocaleLowerCase(),UZ=(t,e)=\u003e{const n=dje(t);return n===e?0:n.startsWith(e)?1:n.includes(e)?2:Number.POSITIVE_INFINITY},zMi=t=\u003e{if(t)return String(t).replace(/^simple_/,\"\").replaceAll(\"_\",\" \").replace(/\\b\\w/g,e=\u003ee.toLocaleUpperCase())},JMi=(t,e,n)=\u003e{let i=zMi(t?.ftype);t?.ftype===\"simple_chip\"\u0026\u0026t.manufacturer_part_number\u0026\u0026(i=t.manufacturer_part_number);const r=[];t?.display_name===n\u0026\u0026t.name!==n\u0026\u0026r.push(t.name);let s=t?.display_value;if(!s\u0026\u0026t){for(const a of[\"display_resistance\",\"display_capacitance\",\"display_inductance\",\"display_frequency\",\"symbol_display_value\"])if(a in t){const A=t[a];if(typeof A==\"string\"){s=A;break}}}if(s??(s=e.symbol_display_value),i\u0026\u0026r.push(i),s\u0026\u0026r.push(s),!i\u0026\u0026!s\u0026\u0026t?.manufacturer_part_number\u0026\u0026r.push(t.manufacturer_part_number),r.length!==0)return r.join(\" · \")},WMi=t=\u003et.type===\"source_component\"\u0026\u0026\"source_component_id\"in t,jMi=t=\u003et.type===\"source_port\",$Mi=t=\u003et.type===\"source_trace\",qMi=t=\u003et.type===\"schematic_component\",XMi=t=\u003et.type===\"schematic_port\",ZMi=t=\u003et.type===\"schematic_net_label\",eDi=t=\u003et.type===\"schematic_sheet\",hje=({schematicSheets:t,schematicSheetId:e})=\u003e{if(!(t.length\u003c=1||!e))return t.find(n=\u003en.schematic_sheet_id===e)?.name},tDi=(t,e)=\u003e{const n=dje(e).trim();if(!n)return[];const o=new Map(t.filter(WMi).map(l=\u003e[l.source_component_id,l])),i=new Map(t.filter(jMi).map(l=\u003e[l.source_port_id,l])),r=t.filter(XMi),s=t.filter($Mi),a=t.filter(eDi),A=[],c=new Map;for(const l of t.filter(qMi)){const u=l.source_component_id?o.get(l.source_component_id):void 0,g=u?.display_name??u?.name??\"Component\",h=Math.min(UZ(u?.name,n),UZ(u?.display_name,n),UZ(u?.manufacturer_part_number,n));if(Number.isFinite(h)){const d={label:g,detail:JMi(u,l,g),kind:\"component\",schematicSheetId:l.schematic_sheet_id,schematicSheetName:hje({schematicSheets:a,schematicSheetId:l.schematic_sheet_id}),target:{type:\"schematic_component\",id:l.schematic_component_id}};A.push(d),c.set(d,h)}}for(const l of t.filter(ZMi)){if(!dje(l.text).includes(n))continue;const u=new Set;for(const I of s.filter(C=\u003eC.connected_source_net_ids.includes(l.source_net_id)))for(const C of I.connected_source_port_ids)u.add(C);const g=l.anchor_position??l.center,h=r.filter(I=\u003eu.has(I.source_port_id)\u0026\u0026(!l.schematic_sheet_id||!I.schematic_sheet_id||I.schematic_sheet_id===l.schematic_sheet_id)).map(I=\u003e({port:I,distance:Math.hypot(I.center.x-g.x,I.center.y-g.y)})).filter(({distance:I})=\u003eI\u003c=1).sort((I,C)=\u003eI.distance-C.distance)[0]?.port,d=h?i.get(h.source_port_id):void 0,p=d?.source_component_id?o.get(d.source_component_id):void 0,m=d?.name??(d?.pin_number!==void 0?`pin${d.pin_number}`:h?.display_pin_label),_=p?.name\u0026\u0026m?`Connected to ${p.name}.${m}`:void 0,f={label:l.text,detail:_,kind:\"net\",schematicSheetId:l.schematic_sheet_id,schematicSheetName:hje({schematicSheets:a,schematicSheetId:l.schematic_sheet_id}),target:{type:\"schematic_net_label\",id:l.schematic_net_label_id}};A.push(f),c.set(f,UZ(l.text,n))}for(const l of t){if(l.type!==\"schematic_text\"||!l.source_trace_id)continue;const u=UZ(l.text,n);if(!Number.isFinite(u))continue;const g={label:l.text,kind:\"net\",schematicSheetId:l.schematic_sheet_id,schematicSheetName:hje({schematicSheets:a,schematicSheetId:l.schematic_sheet_id}),target:{type:\"schematic_text\",id:l.schematic_text_id}};A.push(g),c.set(g,u)}return A.sort((l,u)=\u003e(c.get(l)??Number.POSITIVE_INFINITY)-(c.get(u)??Number.POSITIVE_INFINITY)||l.label.localeCompare(u.label))},nDi=({containerRect:t,targetRect:e,visibleProjection:n,minimumScale:o})=\u003e{const i=n.a||1,r={x:e.left+e.width/2-t.left,y:e.top+e.height/2-t.top},s={x:(r.x-n.e)/i,y:(r.y-n.f)/i},a=Math.max(i,o);return{a,b:0,c:0,d:a,e:t.width/2-s.x*a,f:t.height/2-s.y*a}},oDi=1.8,ign=350,iDi=({controller:t,circuitJson:e,circuitJsonKey:n,svgDivRef:o,containerRef:i,activeSheetId:r,hasMultipleSheets:s,handleSelectSheet:a,svgString:A,svgToScreenProjection:c,setSvgToScreenProjection:l,setIsInteractionEnabled:u})=\u003e{const[g,h]=ee.useState(\"\"),[d,p]=ee.useState(null),m=ee.useRef(null),_=ee.useMemo(()=\u003etDi(e,g),[e,n,g]),f=ee.useCallback(E=\u003e{const B=o.current,S=i.current;if(!B||!S)return!1;const Q=`data-${E.target.type.replaceAll(\"_\",\"-\")}-id`,w=Array.from(B.querySelectorAll(`[${Q}]`)).find(O=\u003eO.getAttribute(Q)===E.target.id);if(!w)return!1;let M=w.getBoundingClientRect();if(E.focusPoint){const O=w.closest(\"svg\"),U=O?.getAttribute(\"data-real-to-screen-transform\"),Y=O?.getScreenCTM?.();if(U\u0026\u0026Y){const W=Bn(Y,Bn(BV(U),E.focusPoint));M={left:W.x-1,top:W.y-1,width:2,height:2}}}const k=S.getBoundingClientRect();if(!k.width||!k.height||!M.width\u0026\u0026!M.height)return!1;m.current\u0026\u0026clearTimeout(m.current);let R=c;const F=getComputedStyle(B).transform;if(F\u0026\u0026F!==\"none\")try{R=BV(F),B.style.transition=\"none\",B.style.transform=F,B.offsetWidth}catch{}return B.style.transition=`transform ${ign}ms ease-in-out`,B.offsetWidth,l(nDi({containerRect:k,targetRect:M,visibleProjection:R,minimumScale:oDi})),m.current=setTimeout(()=\u003e{B.style.transition=\"\"},ign),B.querySelectorAll(\".schematic-search-match\").forEach(O=\u003eO.classList.remove(\"schematic-search-match\")),B.querySelectorAll(`[${Q}]`).forEach(O=\u003e{O.getAttribute(Q)===E.target.id\u0026\u0026O.classList.add(\"schematic-search-match\")}),!0},[i,l,o,c]),I=ee.useCallback(E=\u003e{if(u(!0),E.schematicSheetId\u0026\u0026E.schematicSheetId!==r\u0026\u0026s){a(E.schematicSheetId),p(E);return}f(E)},[r,f,a,s,u]),C=ee.useCallback(()=\u003e{h(\"\"),p(null),m.current\u0026\u0026(clearTimeout(m.current),m.current=null),o.current\u0026\u0026(o.current.style.transition=\"\",o.current.querySelectorAll(\".schematic-search-match\").forEach(E=\u003eE.classList.remove(\"schematic-search-match\")))},[o]),y=t?.focusRequest,x=t?.onFocusRequestHandled;return ee.useEffect(()=\u003e{if(!y)return;const E=e.find(B=\u003eB.type===\"schematic_component\"\u0026\u0026B.schematic_component_id===y.schematicComponentId);if(E?.type!==\"schematic_component\"){p(null),x?.(y);return}u(!0),E.schematic_sheet_id\u0026\u0026s\u0026\u0026a(E.schematic_sheet_id),p({kind:\"component\",label:E.schematic_component_id,schematicSheetId:E.schematic_sheet_id,target:{type:\"schematic_component\",id:E.schematic_component_id}})},[y,x,e,n,s,a,u]),ee.useEffect(()=\u003e{if(!d||!A||s\u0026\u0026d.schematicSheetId\u0026\u0026d.schematicSheetId!==r)return;const E=requestAnimationFrame(()=\u003e{f(d)\u0026\u0026(p(null),y?.schematicComponentId===d.target.id\u0026\u0026x?.(y))});return()=\u003ecancelAnimationFrame(E)},[f,y,x,d,A,s,r]),ee.useEffect(()=\u003e{g||o.current?.querySelectorAll(\".schematic-search-match\").forEach(E=\u003eE.classList.remove(\"schematic-search-match\"))},[g,o]),ee.useEffect(()=\u003e()=\u003e{m.current\u0026\u0026clearTimeout(m.current)},[]),{searchQuery:g,setSearchQuery:h,searchResults:_,handleSearchResultSelect:I,handleCancelSearch:C}};vc(\"schematic-viewer\");var rDi=()=\u003e{vc.enable(\"schematic-viewer*\")},rgn=t=\u003e{const[e,n]=ee.useState(0),[o,i]=ee.useState(0);return ee.useEffect(()=\u003e{if(!t.current)return;const r=()=\u003e{const a=t.current?.getBoundingClientRect();n(a?.width||0),i(a?.height||0)};r();const s=new ResizeObserver(r);return s.observe(t.current),window.addEventListener(\"resize\",r),()=\u003e{s.disconnect(),window.removeEventListener(\"resize\",r)}},[]),{containerWidth:e,containerHeight:o}},sDi=600,w_e=10,aDi=({containerRef:t})=\u003e{const[e,n]=ee.useState(null),[o,i]=ee.useState(!1),[r,s]=ee.useState({x:0,y:0}),a=ee.useRef(null),A=ee.useRef(null),c=ee.useRef(null),l=ee.useRef(0),u=ee.useCallback(()=\u003e{c.current!==null\u0026\u0026(window.clearTimeout(c.current),c.current=null)},[]),g=ee.useCallback(_=\u003e{if(_.preventDefault(),Date.now()\u003cl.current)return;const f=A.current;if(!f)return;const I=Math.abs(_.clientX-f.x)\u003ew_e||Math.abs(_.clientY-f.y)\u003ew_e;A.current=null,!I\u0026\u0026(n(_.target instanceof Element?_.target:null),s({x:_.clientX,y:_.clientY}),i(!0))},[]),h=ee.useCallback(_=\u003e{if(u(),_.touches.length!==1){A.current=null;return}const f=_.touches[0];if(!f)return;const I=_.target instanceof Element?_.target:null;A.current={x:f.clientX,y:f.clientY},c.current=window.setTimeout(()=\u003e{const C=t.current;if(!C||!A.current)return;n(I);const y=C.getBoundingClientRect();s({x:y.left+y.width/2,y:y.top+y.height/2}),i(!0),l.current=Date.now()+1e3,A.current=null},sDi)},[u,t]),d=ee.useCallback(_=\u003e{const f=A.current;if(!f||_.touches.length!==1)return;const I=_.touches[0];(!I||Math.abs(I.clientX-f.x)\u003ew_e||Math.abs(I.clientY-f.y)\u003ew_e)\u0026\u0026(A.current=null,u())},[u]),p=ee.useCallback(()=\u003e{u(),A.current=null},[u]),m=ee.useCallback(_=\u003e{const f=_.target;a.current?.contains(f)||f.closest?.(\"[data-radix-popper-content-wrapper], [data-radix-dropdown-menu-content]\")||i(!1)},[]);return ee.useEffect(()=\u003e{if(o)return document.addEventListener(\"mousedown\",m),document.addEventListener(\"touchstart\",m),()=\u003e{document.removeEventListener(\"mousedown\",m),document.removeEventListener(\"touchstart\",m)}},[m,o]),ee.useEffect(()=\u003eu,[u]),{menuVisible:o,menuTarget:e,menuPos:r,menuRef:a,setMenuVisible:i,contextMenuEventHandlers:{onMouseDown:_=\u003e{A.current=_.button===2||_.button===0\u0026\u0026_.ctrlKey?{x:_.clientX,y:_.clientY}:null},onContextMenu:g,onTouchStart:h,onTouchMove:d,onTouchEnd:p,onTouchCancel:p}}},ADi=(t,e,n)=\u003et.filter(o=\u003e{if(!o.type.endsWith(\"_warning\"))return!1;const i=o;return[[\"source_component\",e.source_component_id],[\"schematic_component\",e.schematic_component_id],[\"pcb_component\",n?.pcb_component_id]].some(([s,a])=\u003e{if(!a)return!1;const A=i[`${s}_ids`];return i[`${s}_id`]===a||Array.isArray(A)\u0026\u0026A.includes(a)||i.schematic_element_type===s\u0026\u0026i.schematic_element_id===a})}),cDi=new Set([\"type\",\"source_component_id\",\"source_group_id\",\"subcircuit_id\",\"display_name\",\"ftype\",\"are_pins_interchangeable\",\"supplier_part_numbers\"]),sgn=[\"name\",\"resistance\",\"capacitance\",\"inductance\",\"frequency\",\"voltage\",\"current\",\"max_voltage_rating\",\"max_current_rating\",\"power_rating\",\"manufacturer_part_number\"],lDi={jlcpcb:t=\u003e`https://jlcpcb.com/partdetail/${encodeURIComponent(t)}`,lcsc:t=\u003e`https://www.lcsc.com/product-detail/${encodeURIComponent(t)}.html`},uDi=t=\u003e{const e=t.trim(),n=/^c?(\\d+)$/i.exec(e);return n?`C${n[1]}`:e},agn=t=\u003e{const e=sgn.indexOf(t);return e===-1?sgn.length:e},gDi=(t,e,n)=\u003e{if(e===\"name\")return String(n);const o=t[`display_${e}`];if(typeof o==\"string\"\u0026\u0026o.trim()){const i=e===\"resistance\"?o.replace(/Ω$/,\"\"):o;return JSON.stringify(i)}return JSON.stringify(n)??String(n)},dDi=t=\u003eObject.entries(t).filter(([e,n])=\u003ecDi.has(e)||e.startsWith(\"display_\")\u0026\u0026e.slice(8)in t?!1:n!=null\u0026\u0026n!==\"\").sort(([e],[n])=\u003eagn(e)-agn(n)||e.localeCompare(n)).map(([e,n])=\u003e({key:e,label:e,value:gDi(t,e,n)})),hDi=t=\u003e{const e=t.supplier_part_numbers;return e?[\"jlcpcb\",\"lcsc\"].flatMap(n=\u003e{const o=e[n];if(!Array.isArray(o))return[];const i=[...new Set(o.filter(r=\u003e!!(typeof r==\"string\"\u0026\u0026r.trim())).map(uDi))];return i.length?[{key:`supplier_part_numbers.${n}`,label:n,links:i.map(r=\u003e({partNumber:r,href:lDi[n](r)}))}]:[]}):[]},pDi=(t,e)=\u003e{const n=t.find(A=\u003eA.type===\"schematic_component\"\u0026\u0026A.schematic_component_id===e);if(!n)return null;const o=t.find(A=\u003eA.type===\"source_component\"\u0026\u0026A.source_component_id===n.source_component_id);if(!o)return null;const i=t.find(A=\u003eA.type===\"pcb_component\"\u0026\u0026A.source_component_id===o.source_component_id),r=t.find(A=\u003eA.type===\"cad_component\"\u0026\u0026A.source_component_id===o.source_component_id\u0026\u0026(!i||A.pcb_component_id===i.pcb_component_id)),s=i?.footprinter_string??r?.footprinter_string,a=i?mDi(t,i.pcb_component_id):null;return{schematicComponent:n,sourceComponent:o,pcbComponent:i,footprinterString:s,footprintPreviewCircuitJson:a?.circuitJson,footprintPreviewViewBox:a?.viewBox,warnings:ADi(t,n,i)}},P_e=2,mDi=(t,e)=\u003e{const n=t.find(r=\u003er.type===\"pcb_component\"\u0026\u0026r.pcb_component_id===e);if(!n)return null;const o=q0n(n);if(!o)return null;const i={minX:o.minX-P_e,minY:o.minY-P_e,maxX:o.maxX+P_e,maxY:o.maxY+P_e};return{circuitJson:Bwi(t,i),viewBox:i}},_Di=t=\u003e{let e=\"\";for(let o=0;o\u003ct.length;o+=8192)e+=String.fromCharCode(...t.subarray(o,o+8192));return btoa(e)},fDi=(t,e)=\u003e{const n=_Di(RQe(TQe(JSON.stringify(t)))),o=new URL(\"https://svg.tscircuit.com/\");return o.searchParams.set(\"svg_type\",\"pcb\"),o.searchParams.set(\"circuit_json\",n),o.searchParams.set(\"viewbox\",[e.minX,e.minY,e.maxX,e.maxY].join(\",\")),o.searchParams.set(\"background_color\",\"#f8fafc\"),o.toString()},pje=ee.createContext(null),IDi=5,CDi=(t,e)=\u003e!t\u0026\u0026!e?!0:!t||!e?!1:t.minX===e.minX\u0026\u0026t.maxX===e.maxX\u0026\u0026t.minY===e.minY\u0026\u0026t.maxY===e.maxY,yDi=({children:t})=\u003eee.useContext(pje)?K.jsx(K.Fragment,{children:t}):K.jsx(xDi,{children:t}),xDi=({children:t})=\u003e{const e=ee.useRef({pointer:null,boundingBoxes:new Map,hoveringIds:new Set,subscribers:new Set,mouseDownPosition:null}),n=ee.useCallback(()=\u003e{for(const l of e.current.subscribers)l()},[]),o=ee.useCallback(()=\u003e{const l=e.current.pointer,u=new Set;if(l)for(const[h,d]of e.current.boundingBoxes){const p=d.bounds;p\u0026\u0026l.x\u003e=p.minX\u0026\u0026l.x\u003c=p.maxX\u0026\u0026l.y\u003e=p.minY\u0026\u0026l.y\u003c=p.maxY\u0026\u0026u.add(h)}const g=e.current.hoveringIds;u.size===g.size\u0026\u0026[...u].every(h=\u003eg.has(h))||(e.current.hoveringIds=u,n())},[n]),i=ee.useCallback((l,u)=\u003e{e.current.boundingBoxes.set(l,u),o()},[o]),r=ee.useCallback((l,u)=\u003e{const g=e.current.boundingBoxes.get(l);g\u0026\u0026CDi(g.bounds,u.bounds)\u0026\u0026g.onClick===u.onClick||(e.current.boundingBoxes.set(l,u),o())},[o]),s=ee.useCallback(l=\u003e{e.current.boundingBoxes.delete(l)\u0026\u0026o()},[o]),a=ee.useCallback(l=\u003e(e.current.subscribers.add(l),()=\u003e{e.current.subscribers.delete(l)}),[]),A=ee.useCallback(l=\u003ee.current.hoveringIds.has(l),[]);ee.useEffect(()=\u003e{const l=d=\u003e{const{clientX:p,clientY:m}=d,_=e.current.pointer;_\u0026\u0026_.x===p\u0026\u0026_.y===m||(e.current.pointer={x:p,y:m},o())},u=()=\u003e{e.current.pointer!==null\u0026\u0026(e.current.pointer=null,e.current.mouseDownPosition=null,o())},g=d=\u003e{e.current.mouseDownPosition={x:d.clientX,y:d.clientY}},h=d=\u003e{const{clientX:p,clientY:m}=d,_=e.current.mouseDownPosition;if(_\u0026\u0026Math.sqrt(Math.pow(p-_.x,2)+Math.pow(m-_.y,2))\u003eIDi){e.current.mouseDownPosition=null;return}e.current.mouseDownPosition=null;for(const f of e.current.boundingBoxes.values()){const I=f.bounds;I\u0026\u0026p\u003e=I.minX\u0026\u0026p\u003c=I.maxX\u0026\u0026m\u003e=I.minY\u0026\u0026m\u003c=I.maxY\u0026\u0026f.onClick?.(d)}};return window.addEventListener(\"pointermove\",l,{passive:!0}),window.addEventListener(\"pointerdown\",l,{passive:!0}),window.addEventListener(\"pointerup\",l,{passive:!0}),window.addEventListener(\"pointerleave\",u),window.addEventListener(\"pointercancel\",u),window.addEventListener(\"blur\",u),window.addEventListener(\"mousedown\",g,{passive:!0}),window.addEventListener(\"click\",h,{passive:!0}),()=\u003e{window.removeEventListener(\"pointermove\",l),window.removeEventListener(\"pointerdown\",l),window.removeEventListener(\"pointerup\",l),window.removeEventListener(\"pointerleave\",u),window.removeEventListener(\"pointercancel\",u),window.removeEventListener(\"blur\",u),window.removeEventListener(\"mousedown\",g),window.removeEventListener(\"click\",h)}},[o]);const c=ee.useMemo(()=\u003e({registerBoundingBox:i,updateBoundingBox:r,unregisterBoundingBox:s,subscribe:a,isHovering:A}),[i,r,s,a,A]);return K.jsx(pje.Provider,{value:c,children:t})},mje={color:\"#64748b\",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", monospace',fontSize:\"12px\",lineHeight:1.45},EDi=({sourceComponent:t,warnings:e=[],footprinterString:n,footprintPreviewCircuitJson:o,footprintPreviewViewBox:i,left:r,top:s,width:a,maxHeight:A})=\u003e{const c=ee.useMemo(()=\u003edDi(t),[t]),l=ee.useMemo(()=\u003ehDi(t),[t]),u=ee.useMemo(()=\u003eo?.length\u0026\u0026i?fDi(o,i):void 0,[o,i]);return K.jsxs(\"dialog\",{open:!0,\"aria-label\":`${t.name} component details`,\"data-schematic-component-details-tooltip\":!0,style:{position:\"absolute\",left:r,right:\"auto\",top:s,bottom:\"auto\",width:a,maxHeight:A,margin:0,padding:0,overflowY:\"auto\",boxSizing:\"border-box\",border:\"1px solid #cbd5e1\",borderRadius:\"4px\",backgroundColor:\"rgba(255, 255, 255, 0.98)\",boxShadow:\"0 20px 25px -5px rgba(15, 23, 42, 0.18), 0 8px 10px -6px rgba(15, 23, 42, 0.12)\",color:\"#0f172a\",fontFamily:'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif',pointerEvents:\"auto\",userSelect:\"text\",WebkitUserSelect:\"text\",zIndex:ME.schematicComponentDetailsTooltip},onMouseDown:g=\u003eg.stopPropagation(),onClick:g=\u003eg.stopPropagation(),children:[K.jsxs(\"dl\",{style:{display:\"grid\",gridTemplateColumns:\"minmax(110px, 0.8fr) minmax(0, 1.2fr)\",gap:\"6px 12px\",margin:0,padding:\"8px\"},children:[c.map(g=\u003eK.jsxs(\"div\",{style:{display:\"contents\"},children:[K.jsx(\"dt\",{style:mje,children:g.label}),K.jsx(\"dd\",{style:{minWidth:0,margin:0,color:\"#1e293b\",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", monospace',fontSize:\"12px\",lineHeight:1.45,overflowWrap:\"anywhere\"},children:g.value})]},g.key)),l.map(g=\u003eK.jsxs(\"div\",{style:{display:\"contents\"},children:[K.jsx(\"dt\",{style:mje,children:g.label}),K.jsx(\"dd\",{style:{minWidth:0,margin:0,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", monospace',fontSize:\"12px\",lineHeight:1.45,overflowWrap:\"anywhere\"},children:g.links.map((h,d)=\u003eK.jsxs(\"span\",{children:[d\u003e0\u0026\u0026\", \",K.jsx(\"a\",{href:h.href,target:\"_blank\",rel:\"noreferrer noopener\",style:{color:\"#2563eb\",textDecoration:\"underline\"},children:h.partNumber})]},h.href))})]},g.key)),n\u0026\u0026K.jsxs(\"div\",{style:{display:\"contents\"},children:[K.jsx(\"dt\",{style:mje,children:\"footprint\"}),K.jsx(\"dd\",{style:{minWidth:0,margin:0,color:\"#1e293b\",fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", monospace',fontSize:\"12px\",lineHeight:1.45,overflowWrap:\"anywhere\"},children:JSON.stringify(n)})]})]}),e.length\u003e0\u0026\u0026K.jsxs(\"section\",{\"aria-label\":\"Component warnings\",style:{margin:\"0 8px 8px\",padding:\"8px\",border:\"1px solid #fcd34d\",borderRadius:\"4px\",backgroundColor:\"#fffbeb\",color:\"#92400e\",fontSize:\"12px\",lineHeight:1.45,overflowWrap:\"anywhere\"},children:[K.jsxs(\"strong\",{children:[\"Warnings (\",e.length,\")\"]}),K.jsx(\"ul\",{style:{margin:\"4px 0 0\",paddingLeft:\"18px\"},children:e.map((g,h)=\u003eK.jsx(\"li\",{children:g.message},`${g.type}-${h}`))})]}),u\u0026\u0026K.jsx(\"div\",{style:{padding:\"0 4px 4px\"},children:K.jsx(\"div\",{style:{height:\"210px\",overflow:\"hidden\",border:\"1px solid #e2e8f0\",borderRadius:\"2px\",background:\"#f8fafc\"},children:K.jsx(\"img\",{src:u,alt:`${t.name}${n?` ${n}`:\"\"} PCB footprint`,loading:\"lazy\",referrerPolicy:\"no-referrer\",style:{display:\"block\",width:\"100%\",height:\"100%\",objectFit:\"contain\"}})})})]})},Agn=t=\u003e{const e=ee.useContext(pje);if(!e)throw new Error(\"useMouseEventsOverBoundingBox must be used within a MouseTracker\");const n=ee.useId(),o=ee.useRef(t);o.current=t;const i=ee.useMemo(()=\u003es=\u003e{o.current.onClick?.(s)},[]);return ee.useEffect(()=\u003e(e.registerBoundingBox(n,{bounds:o.current.bounds,onClick:o.current.onClick?i:void 0}),()=\u003e{e.unregisterBoundingBox(n)}),[e,i,n]),ee.useEffect(()=\u003e{e.updateBoundingBox(n,{bounds:o.current.bounds,onClick:o.current.onClick?i:void 0})},[e,i,n,t.bounds?.minX,t.bounds?.maxX,t.bounds?.minY,t.bounds?.maxY,t.onClick]),{hovering:ee.useSyncExternalStore(e.subscribe,()=\u003ee.isHovering(n),()=\u003e!1)}},BDi=(t,e)=\u003e!t\u0026\u0026!e?!0:!t||!e?!1:Math.abs(t.bounds.minX-e.bounds.minX)\u003c.5\u0026\u0026Math.abs(t.bounds.maxX-e.bounds.maxX)\u003c.5\u0026\u0026Math.abs(t.bounds.minY-e.bounds.minY)\u003c.5\u0026\u0026Math.abs(t.bounds.maxY-e.bounds.maxY)\u003c.5\u0026\u0026Math.abs(t.rect.left-e.rect.left)\u003c.5\u0026\u0026Math.abs(t.rect.top-e.rect.top)\u003c.5\u0026\u0026Math.abs(t.rect.width-e.rect.width)\u003c.5\u0026\u0026Math.abs(t.rect.height-e.rect.height)\u003c.5,bDi=({componentId:t,svgDivRef:e,containerRef:n,onComponentClick:o,onHoverChange:i,showOutline:r,circuitJsonKey:s})=\u003e{const[a,A]=ee.useState(null),c=ee.useRef(null),l=ee.useCallback(()=\u003e{c.current=null;const m=e.current,_=n.current;if(!m||!_){A(x=\u003ex\u0026\u0026null);return}const f=m.querySelector(`[data-schematic-component-id=\"${t}\"]`);if(!f){A(x=\u003ex\u0026\u0026null);return}const I=f.getBoundingClientRect(),C=_.getBoundingClientRect(),y={bounds:{minX:I.left,maxX:I.right,minY:I.top,maxY:I.bottom},rect:{left:I.left-C.left,top:I.top-C.top,width:I.width,height:I.height}};A(x=\u003eBDi(x,y)?x:y)},[t,n,e]),u=ee.useCallback(()=\u003e{c.current===null\u0026\u0026(c.current=window.requestAnimationFrame(l))},[l]);ee.useEffect(()=\u003e{u()},[u,s]),ee.useEffect(()=\u003e{u();const m=e.current,_=n.current;if(!m||!_)return;const f=typeof ResizeObserver\u003c\"u\"?new ResizeObserver(()=\u003e{u()}):null;f?.observe(_),f?.observe(m);const I=typeof MutationObserver\u003c\"u\"?new MutationObserver(()=\u003e{u()}):null;return I?.observe(m,{attributes:!0,attributeFilter:[\"style\",\"transform\"],subtree:!0,childList:!0}),window.addEventListener(\"scroll\",u,!0),window.addEventListener(\"resize\",u),()=\u003e{f?.disconnect(),I?.disconnect(),window.removeEventListener(\"scroll\",u,!0),window.removeEventListener(\"resize\",u),c.current!==null\u0026\u0026(cancelAnimationFrame(c.current),c.current=null)}},[u,e,n]);const g=ee.useCallback(m=\u003e{o\u0026\u0026o(t,m)},[t,o]),h=a?.bounds??null,{hovering:d}=Agn({bounds:h,onClick:o?g:void 0});if(ee.useEffect(()=\u003e{i\u0026\u0026i(t,d)},[d,t,i]),!a||!d||!r)return null;const p=a.rect;return K.jsx(\"div\",{style:{position:\"absolute\",left:p.left,top:p.top,width:p.width,height:p.height,border:\"1.5px solid rgba(51, 153, 255, 0.9)\",pointerEvents:\"none\",zIndex:ME.schematicComponentHoverOutline}})},SDi=(t,e)=\u003e!t\u0026\u0026!e?!0:!t||!e?!1:Math.abs(t.bounds.minX-e.bounds.minX)\u003c.5\u0026\u0026Math.abs(t.bounds.maxX-e.bounds.maxX)\u003c.5\u0026\u0026Math.abs(t.bounds.minY-e.bounds.minY)\u003c.5\u0026\u0026Math.abs(t.bounds.maxY-e.bounds.maxY)\u003c.5\u0026\u0026Math.abs(t.rect.left-e.rect.left)\u003c.5\u0026\u0026Math.abs(t.rect.top-e.rect.top)\u003c.5\u0026\u0026Math.abs(t.rect.width-e.rect.width)\u003c.5\u0026\u0026Math.abs(t.rect.height-e.rect.height)\u003c.5,QDi=({portId:t,portLabel:e,svgDivRef:n,containerRef:o,onPortClick:i,onHoverChange:r,showOutline:s,circuitJsonKey:a})=\u003e{const[A,c]=ee.useState(null),l=ee.useRef(null),u=ee.useCallback(()=\u003e{l.current=null;const _=n.current,f=o.current;if(!_||!f){c(B=\u003eB\u0026\u0026null);return}const I=_.querySelector(`[data-schematic-port-id=\"${t}\"]`);if(!I){c(B=\u003eB\u0026\u0026null);return}const C=I.getBoundingClientRect(),y=f.getBoundingClientRect(),x=4,E={bounds:{minX:C.left-x,maxX:C.right+x,minY:C.top-x,maxY:C.bottom+x},rect:{left:C.left-y.left-x,top:C.top-y.top-x,width:C.width+x*2,height:C.height+x*2}};c(B=\u003eSDi(B,E)?B:E)},[t,o,n]),g=ee.useCallback(()=\u003e{l.current===null\u0026\u0026(l.current=window.requestAnimationFrame(u))},[u]);ee.useEffect(()=\u003e{g()},[g,a]),ee.useEffect(()=\u003e{g();const _=n.current,f=o.current;if(!_||!f)return;const I=typeof ResizeObserver\u003c\"u\"?new ResizeObserver(()=\u003e{g()}):null;I?.observe(f),I?.observe(_);const C=typeof MutationObserver\u003c\"u\"?new MutationObserver(()=\u003e{g()}):null;return C?.observe(_,{attributes:!0,attributeFilter:[\"style\",\"transform\"],subtree:!0,childList:!0}),window.addEventListener(\"scroll\",g,!0),window.addEventListener(\"resize\",g),()=\u003e{I?.disconnect(),C?.disconnect(),window.removeEventListener(\"scroll\",g,!0),window.removeEventListener(\"resize\",g),l.current!==null\u0026\u0026(cancelAnimationFrame(l.current),l.current=null)}},[g,n,o]);const h=ee.useCallback(_=\u003e{i\u0026\u0026i(t,_)},[t,i]),d=A?.bounds??null,{hovering:p}=Agn({bounds:d,onClick:i?h:void 0});if(ee.useEffect(()=\u003e{r\u0026\u0026r(t,p)},[p,t,r]),!A||!s)return null;const m=A.rect;return K.jsxs(K.Fragment,{children:[K.jsx(\"div\",{style:{position:\"absolute\",left:m.left,top:m.top,width:m.width,height:m.height,border:p?\"1.5px solid rgba(255, 153, 51, 0.9)\":\"1.5px solid rgba(255, 153, 51, 0.3)\",backgroundColor:p?\"rgba(255, 153, 51, 0.15)\":\"rgba(255, 153, 51, 0.05)\",borderRadius:\"50%\",pointerEvents:\"none\",zIndex:ME.schematicPortHoverOutline,transition:\"border-color 0.15s, background-color 0.15s\"}}),p\u0026\u0026e\u0026\u0026K.jsx(\"div\",{style:{position:\"absolute\",left:m.left+m.width/2,top:m.top-24,transform:\"translateX(-50%)\",backgroundColor:\"rgba(0, 0, 0, 0.85)\",color:\"white\",padding:\"4px 8px\",borderRadius:\"4px\",fontSize:\"12px\",fontFamily:\"monospace\",whiteSpace:\"nowrap\",pointerEvents:\"none\",zIndex:ME.schematicPortHoverOutline+1},children:e})]})},KZ=({children:t,size:e,strokeWidth:n})=\u003eK.jsx(\"svg\",{width:e,height:e,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:n,strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:t}),cgn=t=\u003eK.jsxs(KZ,{...t,children:[K.jsx(\"circle\",{cx:\"11\",cy:\"11\",r:\"8\"}),K.jsx(\"path\",{d:\"m21 21-4.34-4.34\"})]}),vDi=t=\u003eK.jsxs(KZ,{...t,children:[K.jsx(\"path\",{d:\"M18 6 6 18\"}),K.jsx(\"path\",{d:\"m6 6 12 12\"})]}),wDi=t=\u003eK.jsxs(KZ,{...t,children:[K.jsx(\"rect\",{x:\"4\",y:\"4\",width:\"16\",height:\"16\",rx:\"2\"}),K.jsx(\"rect\",{x:\"8\",y:\"8\",width:\"8\",height:\"8\",rx:\"1\"}),K.jsx(\"path\",{d:\"M7 2v2M12 2v2M17 2v2M7 20v2M12 20v2M17 20v2M2 7h2M2 12h2M2 17h2M20 7h2M20 12h2M20 17h2\"})]}),PDi=t=\u003eK.jsxs(KZ,{...t,children:[K.jsx(\"path\",{d:\"M15 6a9 9 0 0 0-9 9V3\"}),K.jsx(\"circle\",{cx:\"18\",cy:\"6\",r:\"3\"}),K.jsx(\"circle\",{cx:\"6\",cy:\"18\",r:\"3\"})]}),MDi=t=\u003eK.jsxs(KZ,{...t,children:[K.jsx(\"path\",{d:\"M20 4v7a4 4 0 0 1-4 4H4\"}),K.jsx(\"path\",{d:\"m9 10-5 5 5 5\"})]}),DDi=({text:t,query:e})=\u003e{const n=e.trim().toLocaleLowerCase();if(!n)return t;const o=t.toLocaleLowerCase(),i=[];let r=0,s=o.indexOf(n);for(;s!==-1;)s\u003er\u0026\u0026i.push(t.slice(r,s)),i.push(K.jsx(\"strong\",{style:{fontWeight:700},children:t.slice(s,s+n.length)},`${s}-${r}`)),r=s+n.length,s=o.indexOf(n,r);return r\u003ct.length\u0026\u0026i.push(t.slice(r)),i.length\u003e0?i:t},NDi=()=\u003etypeof navigator\u003e\"u\"?\"Ctrl F\":/mac/i.test(navigator.platform)?\"⌘ F\":\"Ctrl F\",RDi=({query:t,onQueryChange:e,onCancel:n,results:o,onSelect:i,viewerContainerRef:r})=\u003e{const[s,a]=ee.useState(!1),[A,c]=ee.useState(null),[l,u]=ee.useState(null),g=ee.useRef(null),h=ee.useRef(null),d=NDi();ee.useEffect(()=\u003e{c(S=\u003eo.some(Q=\u003eQ.target.id===S)?S:o.find(Q=\u003eQ.kind===\"component\")?.target.id??o[0]?.target.id??null)},[o]),ee.useEffect(()=\u003e{A\u0026\u0026h.current?.querySelector(`[data-search-result-id=\"${A}\"]`)?.scrollIntoView({behavior:\"smooth\",block:\"nearest\"})},[A]),ee.useEffect(()=\u003e{const S=w=\u003e{if(w.key===\"Escape\"\u0026\u0026s){w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation(),n(),a(!1),g.current?.blur();return}w.code!==\"KeyF\"\u0026\u0026w.key.toLocaleLowerCase()!==\"f\"||!w.metaKey\u0026\u0026!w.ctrlKey||r.current?.matches(\":hover\")\u0026\u0026(w.preventDefault(),w.stopPropagation(),w.stopImmediatePropagation(),a(!0),requestAnimationFrame(()=\u003e{g.current?.focus(),g.current?.select()}))},Q=[window];try{window.parent!==window\u0026\u0026window.parent.document\u0026\u0026Q.push(window.parent)}catch{}return Q.forEach(w=\u003ew.addEventListener(\"keydown\",S,{capture:!0})),()=\u003e{Q.forEach(w=\u003ew.removeEventListener(\"keydown\",S,{capture:!0}))}},[s,n,r]);const p=()=\u003e{n(),a(!1),g.current?.blur()},m=S=\u003e{a(!0),S\u0026\u0026requestAnimationFrame(()=\u003eg.current?.focus())},_=o.filter(S=\u003eS.kind===\"component\"),f=o.filter(S=\u003eS.kind===\"net\"),I=[..._,...f],C=I.find(S=\u003eS.target.id===A)??I[0],y=o.length===1?\"1 result\":`${o.length} results`;let x=\"none\";t\u0026\u0026(x=\"1px solid #e8e8e8\");const E=S=\u003e{if(!(S.key===\"Enter\"\u0026\u0026S.target instanceof Element\u0026\u0026S.target.closest('[aria-label=\"Clear search\"]'))){if(S.key===\"Escape\"){S.preventDefault(),p();return}if(I.length\u003e0\u0026\u0026(S.key===\"ArrowDown\"||S.key===\"ArrowUp\")){S.preventDefault();let Q=-1;S.key===\"ArrowDown\"\u0026\u0026(Q=1),c(w=\u003e{const M=I.findIndex(F=\u003eF.target.id===w);let k=M;M===-1\u0026\u0026(k=0,Q===1\u0026\u0026(k=-1));const R=(k+Q+I.length)%I.length;return I[R]?.target.id??null});return}S.key===\"Enter\"\u0026\u0026C\u0026\u0026(S.preventDefault(),i(C))}},B=(S,Q)=\u003eQ.length===0?null:K.jsxs(\"section\",{children:[K.jsx(\"div\",{style:{padding:\"6px 12px 3px\",backgroundColor:\"#f7f7f8\",color:\"#777777\",fontSize:\"11px\",fontWeight:600,letterSpacing:\"0.02em\",textTransform:\"lowercase\"},children:S}),Q.map(w=\u003e{const M=w.target.id===C?.target.id,k=w.target.id===l;let R=\"#ffffff\";(k||M)\u0026\u0026(R=\"#f1f3f5\");let F=K.jsx(PDi,{size:15,strokeWidth:1.8});w.kind===\"component\"\u0026\u0026(F=K.jsx(wDi,{size:15,strokeWidth:1.8}));const O=()=\u003e{g.current?.blur(),c(w.target.id),i(w)};return K.jsxs(\"button\",{type:\"button\",\"data-search-result-id\":w.target.id,onPointerUp:U=\u003e{U.button===0\u0026\u0026O()},onClick:U=\u003e{U.detail===0\u0026\u0026O()},onMouseEnter:()=\u003eu(w.target.id),onMouseLeave:()=\u003eu(null),style:{width:\"100%\",display:\"flex\",alignItems:\"center\",gap:\"9px\",padding:\"7px 12px\",border:\"none\",background:R,color:\"#222222\",cursor:\"pointer\",textAlign:\"left\"},children:[K.jsx(\"span\",{style:{width:\"26px\",height:\"26px\",flexShrink:0,display:\"grid\",placeItems:\"center\",border:\"1px solid #e5e5e5\",borderRadius:\"6px\",backgroundColor:\"#f7f7f7\",color:\"#666666\"},children:F}),K.jsxs(\"span\",{style:{minWidth:0,flex:1},children:[K.jsx(\"span\",{style:{display:\"block\",overflow:\"hidden\",fontSize:\"13px\",fontWeight:400,lineHeight:1.25,textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"},children:K.jsx(DDi,{text:w.label,query:t})}),w.detail\u0026\u0026K.jsx(\"span\",{style:{display:\"block\",overflow:\"hidden\",marginTop:\"2px\",color:\"#777777\",fontSize:\"11px\",lineHeight:1.2,textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"},children:w.detail}),w.schematicSheetName\u0026\u0026K.jsxs(\"span\",{style:{display:\"block\",overflow:\"hidden\",marginTop:\"2px\",color:\"#777777\",fontSize:\"11px\",lineHeight:1.2,textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"},children:[\"Sheet: \",w.schematicSheetName]})]}),M\u0026\u0026K.jsx(\"span\",{title:\"Press Enter to open\",style:{flexShrink:0,color:\"#666666\",fontSize:\"17px\",lineHeight:1},children:K.jsx(MDi,{size:14,strokeWidth:1.8})})]},w.target.id)})]});return K.jsx(\"div\",{\"data-schematic-search\":!0,onPointerDown:S=\u003eS.stopPropagation(),onMouseDown:S=\u003eS.stopPropagation(),onTouchStart:S=\u003eS.stopPropagation(),onTouchEnd:S=\u003eS.stopPropagation(),style:{position:\"relative\",zIndex:ME.schematicSearch,fontFamily:'-apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif'},children:s?K.jsxs(\"div\",{onKeyDown:E,style:{width:\"min(280px, calc(100vw - 32px))\",overflow:\"hidden\",border:\"none\",borderRadius:\"4px\",backgroundColor:\"#ffffff\",boxShadow:\"0 2px 4px rgba(0,0,0,0.1)\"},children:[K.jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"8px\",height:\"32px\",boxSizing:\"border-box\",padding:\"0 12px\",borderBottom:x},children:[K.jsx(cgn,{size:15,strokeWidth:2}),K.jsx(\"input\",{ref:g,value:t,\"aria-label\":\"Search components and nets\",placeholder:\"Search...\",onPointerUp:S=\u003eS.currentTarget.focus(),onChange:S=\u003ee(S.target.value),style:{minWidth:0,flex:1,border:\"none\",outline:\"none\",fontSize:\"13px\",color:\"#222222\",background:\"transparent\"}}),t\u0026\u0026o.length\u003e0?K.jsx(\"span\",{style:{flexShrink:0,color:\"#888888\",fontSize:\"12px\",whiteSpace:\"nowrap\"},children:y}):K.jsx(\"kbd\",{style:{flexShrink:0,padding:\"2px 5px\",border:\"1px solid #dddddd\",borderRadius:\"4px\",backgroundColor:\"#f7f7f7\",color:\"#777777\",fontFamily:\"inherit\",fontSize:\"10px\",lineHeight:1.2},children:d}),s\u0026\u0026K.jsx(\"button\",{type:\"button\",\"aria-label\":\"Clear search\",onPointerUp:S=\u003e{S.button===0\u0026\u0026p()},onClick:S=\u003e{S.detail===0\u0026\u0026p()},style:{border:\"none\",background:\"transparent\",color:\"#777777\",cursor:\"pointer\",width:\"20px\",height:\"20px\",display:\"grid\",placeItems:\"center\",padding:0,lineHeight:1},children:K.jsx(vDi,{size:16,strokeWidth:2})})]}),t\u0026\u0026K.jsx(\"div\",{ref:h,style:{maxHeight:\"240px\",overflowX:\"hidden\",overflowY:\"auto\",overscrollBehavior:\"contain\",scrollBehavior:\"smooth\",touchAction:\"pan-y\",WebkitOverflowScrolling:\"touch\"},onWheel:S=\u003eS.stopPropagation(),onTouchMove:S=\u003eS.stopPropagation(),children:o.length===0?K.jsx(\"div\",{style:{padding:\"12px\",color:\"#777777\",fontSize:\"13px\"},children:\"No matching components or nets\"}):K.jsxs(K.Fragment,{children:[B(\"components\",_),B(\"nets\",f)]})})]}):K.jsx(\"button\",{type:\"button\",title:\"Search schematic\",\"aria-label\":\"Search schematic\",onPointerDown:S=\u003e{S.stopPropagation(),S.pointerType!==\"mouse\"\u0026\u0026m(!1)},onPointerUp:S=\u003e{S.pointerType===\"mouse\"\u0026\u0026S.button===0\u0026\u0026m(!0)},onClick:S=\u003e{S.detail===0\u0026\u0026m(!0)},style:{width:\"32px\",height:\"32px\",display:\"grid\",placeItems:\"center\",padding:0,border:\"none\",borderRadius:\"4px\",backgroundColor:\"#ffffff\",color:\"#000000\",cursor:\"pointer\",boxShadow:\"0 2px 4px rgba(0,0,0,0.1)\"},children:K.jsx(cgn,{size:16,strokeWidth:2})})})},_je='system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',TDi={backgroundColor:\"#ffffff\",color:\"#111111\",borderRadius:8,boxShadow:\"0 6px 24px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08)\",border:\"1px solid #e5e7eb\",padding:4,minWidth:200,maxWidth:320,maxHeight:320,overflowY:\"auto\",fontSize:13,fontFamily:_je,outline:\"none\",zIndex:ME.viewMenu},kDi={display:\"flex\",alignItems:\"center\",gap:8,padding:\"7px 10px 7px 8px\",borderRadius:6,cursor:\"pointer\",outline:\"none\",userSelect:\"none\",color:\"#111111\",fontSize:13,fontFamily:_je},FDi={width:16,height:16,flexShrink:0,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#111111\"},lgn={overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"},LDi=`\n.sv-sheet-item[data-highlighted], .sv-sheet-item:hover { background-color: #f1f3f5; }\n.sv-sheet-chevron { transition: transform 0.2s ease; }\n[data-state=\"open\"] \u003e .sv-sheet-chevron { transform: rotate(180deg); }\n`,HDi=()=\u003eK.jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:K.jsx(\"path\",{d:\"M20 6 9 17l-5-5\"})}),ODi=({className:t})=\u003eK.jsx(\"svg\",{className:t,width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{opacity:.6,flexShrink:0},\"aria-hidden\":\"true\",children:K.jsx(\"path\",{d:\"m6 9 6 6 6-6\"})}),GDi=({sheets:t,selectedSheetId:e,onSelectSheet:n})=\u003e{const[o,i]=ee.useState(!1);if(t.length\u003c=1)return null;const s=t.find(a=\u003ea.schematic_sheet_id===e)?.name??\"Select sheet\";return K.jsxs(K.Fragment,{children:[K.jsx(\"style\",{children:LDi}),K.jsxs(e_e,{open:o,onOpenChange:i,modal:!1,children:[K.jsx(t_e,{asChild:!0,children:K.jsxs(\"button\",{type:\"button\",title:s,onPointerDown:a=\u003ea.stopPropagation(),style:{display:\"flex\",alignItems:\"center\",gap:\"6px\",maxWidth:\"220px\",height:\"32px\",boxSizing:\"border-box\",padding:\"0 12px\",backgroundColor:\"#ffffff\",color:\"#000000\",border:\"none\",outline:\"none\",borderRadius:\"4px\",cursor:\"pointer\",boxShadow:\"0 2px 4px rgba(0,0,0,0.1)\",fontSize:\"13px\",fontFamily:_je},children:[K.jsx(\"span\",{style:{color:\"#888888\",flexShrink:0},children:\"Sheet:\"}),K.jsx(\"span\",{style:{...lgn,minWidth:0},children:s}),K.jsx(ODi,{className:\"sv-sheet-chevron\"})]})}),K.jsx(EU,{children:K.jsx(bZ,{style:TDi,side:\"bottom\",align:\"start\",sideOffset:8,collisionPadding:10,children:t.map(a=\u003e{const A=a.schematic_sheet_id===e;return K.jsxs(SS,{className:\"sv-sheet-item\",style:kDi,title:a.name,onSelect:c=\u003ec.preventDefault(),onPointerUp:()=\u003e{n(a.schematic_sheet_id),i(!1)},children:[K.jsx(\"span\",{style:FDi,children:A\u0026\u0026K.jsx(HDi,{})}),K.jsx(\"span\",{style:{...lgn,minWidth:0},children:a.name})]},a.schematic_sheet_id)})})})]})]})},YDi=({count:t,showWarnings:e,onToggle:n})=\u003e{const o=`${e?\"Hide\":\"Show\"} ${t} ${t===1?\"warning\":\"warnings\"}`;return K.jsxs(\"button\",{type:\"button\",\"data-schematic-warnings\":!0,title:o,\"aria-label\":o,\"aria-pressed\":e,onClick:n,onPointerDown:i=\u003ei.stopPropagation(),onMouseDown:i=\u003ei.stopPropagation(),onTouchStart:i=\u003ei.stopPropagation(),onTouchEnd:i=\u003ei.stopPropagation(),style:{height:\"32px\",display:\"flex\",alignItems:\"center\",gap:\"4px\",padding:\"0 8px\",border:\"none\",borderRadius:\"4px\",backgroundColor:e?\"#fff3cd\":\"#ffffff\",color:\"#946200\",cursor:\"pointer\",boxShadow:\"0 2px 4px rgba(0,0,0,0.1)\",fontFamily:'-apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif',fontSize:\"12px\",fontWeight:600},children:[K.jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:[K.jsx(\"path\",{d:\"M10.3 3.9 1.8 18.1A2 2 0 0 0 3.5 21h17a2 2 0 0 0 1.7-2.9L13.7 3.9a2 2 0 0 0-3.4 0Z\"}),K.jsx(\"path\",{d:\"M12 9v4m0 4h.01\"})]}),K.jsx(\"span\",{children:t})]})},UDi={version:\"2.0.98\"},fje='system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',ugn={backgroundColor:\"#262626\",color:\"#fafafa\",borderRadius:6,boxShadow:\"0px 12px 48px -12px rgba(0, 0, 0, 0.5), 0px 8px 24px -8px rgba(0, 0, 0, 0.3)\",border:\"1px solid #333333\",padding:4,minWidth:208,fontSize:14,fontWeight:400,fontFamily:fje,outline:\"none\",zIndex:ME.contextMenu},TT={display:\"flex\",alignItems:\"center\",gap:8,padding:\"6px 8px\",borderRadius:6,cursor:\"default\",outline:\"none\",userSelect:\"none\",color:\"#fafafa\",fontSize:14,fontWeight:400,fontFamily:fje},VZ={width:16,height:16,flexShrink:0,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#fafafa\"},ggn={height:1,backgroundColor:\"#ffffff1a\",margin:\"4px 0\"},KDi=`\n.sv-vm-item[data-highlighted]:not([data-disabled]),\n.sv-vm-item:hover:not([data-disabled]) { background-color: #404040; }\n.sv-vm-item[data-disabled] { opacity: 0.45; cursor: not-allowed; }\n`,M_e=()=\u003eK.jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:K.jsx(\"path\",{d:\"M20 6 9 17l-5-5\"})}),VDi=({netLocations:t=[],onSelectNetLocation:e,circuitJson:n,circuitJsonKey:o,menuRef:i,menuPos:r,onOpenChange:s,onRunStyleAnalysis:a,showGroups:A,onToggleGroups:c,showGrid:l,onToggleGrid:u,showPorts:g,onTogglePorts:h,showWarnings:d,onToggleWarnings:p})=\u003e{const m=ee.useMemo(()=\u003e{if(!n||n.length===0)return!1;try{if((O3(n).source_group?.list()||[]).length\u003e0)return!0;const I=O3(n).schematic_component?.list()||[];if(I.length\u003e1){const C=new Set;for(const y of I){const x=O3(n).source_component.get(y.source_component_id);x?.ftype\u0026\u0026C.add(x.ftype)}return C.size\u003e1}return!1}catch(f){return console.error(\"Error checking for groups:\",f),!1}},[o]),_=ee.useMemo(()=\u003e{if(!n||n.length===0)return!1;try{return(O3(n).schematic_port?.list()||[]).length\u003e0}catch(f){return console.error(\"Error checking for schematic ports:\",f),!1}},[o]);return K.jsx(\"div\",{ref:i,style:{position:\"fixed\",left:r.x,top:r.y,width:0,height:0},children:K.jsxs(e_e,{open:!0,onOpenChange:s,modal:!1,children:[K.jsx(t_e,{asChild:!0,children:K.jsx(\"div\",{style:{position:\"absolute\",width:1,height:1}})}),K.jsx(EU,{children:K.jsxs(bZ,{style:ugn,align:\"start\",sideOffset:0,collisionPadding:10,avoidCollisions:!0,children:[K.jsx(\"style\",{children:KDi}),t.length\u003e0\u0026\u0026K.jsxs(L0n,{children:[K.jsxs(GWe,{className:\"sv-vm-item\",style:TT,children:[\"Net Locations \",K.jsx(\"span\",{style:{marginLeft:\"auto\"},children:\"›\"})]}),K.jsx(EU,{children:K.jsx(YWe,{style:{...ugn,maxHeight:\"min(400px, var(--radix-dropdown-menu-content-available-height))\",overflowY:\"auto\"},collisionPadding:10,children:t.map((f,I)=\u003eK.jsx(SS,{className:\"sv-vm-item\",style:TT,onSelect:()=\u003ee?.(f),children:f.label},I))})})]}),K.jsxs(SS,{className:\"sv-vm-item\",style:TT,disabled:!_,title:_?void 0:\"No ports found in this schematic\",onSelect:f=\u003ef.preventDefault(),onPointerDown:f=\u003e{f.preventDefault(),_\u0026\u0026h(!g)},children:[K.jsx(\"span\",{style:VZ,children:g\u0026\u0026K.jsx(M_e,{})}),K.jsx(\"span\",{children:\"Show Schematic Ports\"})]}),K.jsxs(SS,{className:\"sv-vm-item\",style:TT,disabled:!m,title:m?void 0:\"No groups found in this schematic\",onSelect:f=\u003ef.preventDefault(),onPointerDown:f=\u003e{f.preventDefault(),m\u0026\u0026c(!A)},children:[K.jsx(\"span\",{style:VZ,children:A\u0026\u0026K.jsx(M_e,{})}),K.jsx(\"span\",{children:\"View Schematic Groups\"})]}),K.jsxs(SS,{className:\"sv-vm-item\",style:TT,onSelect:f=\u003ef.preventDefault(),onPointerDown:f=\u003e{f.preventDefault(),u(!l)},children:[K.jsx(\"span\",{style:VZ,children:l\u0026\u0026K.jsx(M_e,{})}),K.jsx(\"span\",{children:\"Show Grid\"})]}),K.jsxs(HWe,{className:\"sv-vm-item\",style:TT,checked:d,onCheckedChange:p,onSelect:f=\u003ef.preventDefault(),children:[K.jsx(\"span\",{style:VZ,children:K.jsx(OWe,{children:K.jsx(M_e,{})})}),K.jsx(\"span\",{children:\"Show Warnings\"})]}),K.jsx(n_e,{style:ggn}),K.jsxs(SS,{className:\"sv-vm-item\",style:TT,onSelect:a,children:[K.jsx(\"span\",{style:VZ}),K.jsx(\"span\",{children:\"Run Style Analysis\"})]}),K.jsx(n_e,{style:ggn}),K.jsxs(\"div\",{style:{padding:\"4px 8px 4px 32px\",fontSize:11,opacity:.35,color:\"#a1a1aa\",letterSpacing:\"0.2px\",fontFamily:fje},children:[\"@tscircuit/schematic-viewer@\",String(UDi?.version)]})]})})]})})},zDi=({circuitJson:t,containerStyle:e,debugGrid:n=!1,debug:o=!1,clickToInteractEnabled:i=!1,colorOverrides:r,disableGroups:s=!1,netHoverHighlightEnabled:a=!0,onSchematicComponentClicked:A,showSchematicPorts:c,onSchematicPortClicked:l,onSchematicSheetChange:u,searchEnabled:g=!0,controller:h,css:d,className:p})=\u003e{o\u0026\u0026rDi();const m=st=\u003e`${st?.length||0}_${st?.editCount||0}`,_=ee.useMemo(()=\u003em(t),[t]),f=ee.useMemo(()=\u003e{try{return t.filter(st=\u003est?.type===\"schematic_sheet\").slice().sort((st,xt)=\u003e(st.sheet_index??0)-(xt.sheet_index??0))}catch(st){return console.error(\"Failed to derive schematic sheets\",st),[]}},[_]),I=f.length\u003e1,C=f[0]?.schematic_sheet_id,[y,x]=ee.useState(()=\u003e{const st=OMi(DU.SELECTED_SCHEMATIC_SHEET);return st\u0026\u0026f.some(xt=\u003ext.schematic_sheet_id===st)?st:C});ee.useEffect(()=\u003e{y!==void 0\u0026\u0026f.some(xt=\u003ext.schematic_sheet_id===y)||x(C)},[_]);const E=I?y??C:void 0,B=ee.useCallback(st=\u003e{x(st),GMi(DU.SELECTED_SCHEMATIC_SHEET,st),u?.(st)},[u]),[S,Q]=ee.useState(!1),[w,M]=ee.useState(null),[k,R]=ee.useState(!1),F=t.filter(st=\u003est.type.startsWith(\"schematic_\")\u0026\u0026st.type.endsWith(\"_warning\")).length,O=n||S,[U,Y]=ee.useState(!i),[W,te]=ee.useState(()=\u003es?!1:egn(DU.IS_SHOWING_SCHEMATIC_GROUPS,!1)),[j,J]=ee.useState(()=\u003ec??egn(DU.IS_SHOWING_SCHEMATIC_PORTS,!1));ee.useEffect(()=\u003e{c!==void 0\u0026\u0026J(c)},[c]);const[oe,ie]=ee.useState(!1),ne=ee.useRef(new Set),[le,ge]=ee.useState(null),_e=ee.useCallback((st,xt)=\u003e{xt?ne.current.add(st):ne.current.delete(st),ie(ne.current.size\u003e0)},[]),[ue,fe]=ee.useState(!1),pe=ee.useRef(new Set),ye=ee.useCallback((st,xt)=\u003e{xt?pe.current.add(st):pe.current.delete(st),fe(pe.current.size\u003e0)},[]),Me=ee.useRef(null),ve=ee.useRef(null),he=ee.useRef({x:1,y:1}),Qe=ee.useMemo(()=\u003e{try{return(O3(t).schematic_component?.list()??[]).filter(xt=\u003e!E||xt.schematic_sheet_id===E).map(xt=\u003ext.schematic_component_id)}catch(st){return console.error(\"Failed to derive schematic component ids\",st),[]}},[_,t,E]),Pe=ee.useMemo(()=\u003e{if(!j)return[];try{return(O3(t).schematic_port?.list()??[]).filter(xt=\u003e!E||xt.schematic_sheet_id===E).map(xt=\u003e{const Xe=O3(t).source_port.get(xt.source_port_id),dt=(Xe?.source_component_id?O3(t).source_component.get(Xe.source_component_id):null)?.name??\"?\",Ut=xt.display_pin_label??Xe?.pin_number??Xe?.name??\"?\";return{portId:xt.source_port_id,label:`${dt}.${Ut}`}})}catch(st){return console.error(\"Failed to derive schematic port info\",st),[]}},[_,t,j,E]),we=st=\u003e{const xt=st.touches[0];ve.current={x:xt.clientX,y:xt.clientY}},Te=st=\u003e{const xt=st.changedTouches[0],Xe=ve.current;if(!Xe)return;const Ze=Math.abs(xt.clientX-Xe.x),dt=Math.abs(xt.clientY-Xe.y);Ze\u003c10\u0026\u0026dt\u003c10\u0026\u0026(st.preventDefault(),Y(!0)),ve.current=null},Re=ee.useCallback(st=\u003est.target instanceof Element\u0026\u0026st.target.closest(\"[data-schematic-search], [data-schematic-warnings], .schematic-warning\")?!1:st.type!==\"mousedown\"||!(\"button\"in st)?!0:st.button!==2\u0026\u0026!(st.button===0\u0026\u0026st.ctrlKey),[]),{ref:Ee,transform:ke,setTransform:Ce}=YZ({onSetTransform(st){const xt=st.a!==he.current.x||st.d!==he.current.y;he.current={x:st.a,y:st.d},xt\u0026\u0026ge(null),Me.current\u0026\u0026(Me.current.style.transform=iD(st))},enabled:U,shouldDrag:Re}),{menuVisible:Le,menuPos:Ye,menuRef:tt,setMenuVisible:At,contextMenuEventHandlers:at,menuTarget:nt}=aDi({containerRef:Ee}),{containerWidth:gt,containerHeight:bt}=rgn(Ee),Ct=ee.useMemo(()=\u003ele?pDi(t,le.schematicComponentId):null,[_,t,le]),Dt=ee.useMemo(()=\u003e{if(!le||!gt||!bt)return null;const st=12,xt=14,Xe=Math.min(420,gt-st*2),Ze=Math.min(520,bt-st*2),{anchorX:dt,anchorY:Ut}=le,Wt=dt+xt,Xt=dt-Xe-xt,Jt=Wt+Xe\u003c=gt-st?Wt:Xt\u003e=st?Xt:Math.max(st,Math.min(dt-Xe/2,gt-Xe-st)),yn=Math.max(st,Math.min(Ut-24,bt-Ze-st));return{left:Jt,top:yn,width:Xe,maxHeight:Ze}},[le,gt,bt]),kt=ee.useCallback((st,xt)=\u003e{if(xt.target instanceof Element\u0026\u0026xt.target.closest(\"[data-schematic-component-details-tooltip]\"))return;const Xe=Ee.current?.getBoundingClientRect();Xe\u0026\u0026(ge({schematicComponentId:st,anchorX:xt.clientX-Xe.left,anchorY:xt.clientY-Xe.top}),A?.({schematicComponentId:st,event:xt}))},[Ee,A]);ee.useEffect(()=\u003e{ge(null)},[_,E]),ee.useEffect(()=\u003e{if(!le)return;const st=Xe=\u003e{Xe.key===\"Escape\"\u0026\u0026ge(null)},xt=Xe=\u003e{Xe.target instanceof Element\u0026\u0026Xe.target.closest(\"[data-schematic-component-details-tooltip]\")||ge(null)};return window.addEventListener(\"keydown\",st),document.addEventListener(\"mousedown\",xt),()=\u003e{window.removeEventListener(\"keydown\",st),document.removeEventListener(\"mousedown\",xt)}},[le]);const it=ee.useMemo(()=\u003e!gt||!bt?\"\":Dun(t,{width:gt,height:bt||720,drawPorts:j,shouldDrawWarnings:k,schematicSheetId:E,grid:O?{cellSize:1,labelCells:!0}:void 0,colorOverrides:r,css:d,className:p}),[_,gt,bt,O,k,j,E]),Yt=ee.useMemo(()=\u003eit.match(/\u003csvg[^\u003e]*style=\"[^\"]*background-color:\\s*([^;\\\"]+)/i)?.[1]??\"transparent\",[it]),{searchQuery:pn,setSearchQuery:be,searchResults:et,handleSearchResultSelect:It,handleCancelSearch:Bt}=iDi({controller:h,circuitJson:t,circuitJsonKey:_,svgDivRef:Me,containerRef:Ee,activeSheetId:E,hasMultipleSheets:I,handleSelectSheet:B,svgString:it,svgToScreenProjection:ke,setSvgToScreenProjection:Ce,setIsInteractionEnabled:Y});YMi({svgDivRef:Me,circuitJson:t,circuitJsonKey:`${_}_${E??\"\"}`,showGroups:W\u0026\u0026!s}),KMi({svgDivRef:Me,circuitJson:t,circuitJsonKey:`${_}_${E??\"\"}`,enabled:a});const mt=ee.useMemo(()=\u003eK.jsx(\"div\",{ref:Me,style:{pointerEvents:i?U?\"auto\":\"none\":\"auto\",transformOrigin:\"0 0\"},className:\"schematic-component-clickable\",dangerouslySetInnerHTML:{__html:it}}),[it,U,i]);return VMi({svgDivRef:Me,svgContent:mt,circuitJsonKey:_}),K.jsxs(yDi,{children:[a\u0026\u0026K.jsx(\"style\",{children:`.sch-net-faded { opacity: 0.35; }\n svg :is(g.trace, g.trace-overlays, g[data-schematic-component-id], [data-schematic-net-label-id]) { transition: opacity 0.12s ease-in-out; }`}),g\u0026\u0026K.jsx(\"style\",{children:`.schematic-search-match text,\n text.schematic-search-match {\n fill: #ff00d4 !important;\n }\n .schematic-search-match [stroke]:not(text):not([stroke=\"none\"]),\n [stroke]:not(text):not([stroke=\"none\"]).schematic-search-match {\n stroke: #ff00d4 !important;\n }\n .schematic-viewer-toolbar {\n flex-direction: row;\n }\n @media (max-width: 640px) {\n .schematic-viewer-toolbar {\n flex-direction: column;\n }\n }`}),K.jsx(\"style\",{children:\".schematic-component-clickable [data-schematic-component-id]:hover { cursor: pointer !important; }\"}),l\u0026\u0026K.jsx(\"style\",{children:\"[data-schematic-port-id]:hover { cursor: pointer !important; }\"}),K.jsxs(\"div\",{ref:Ee,style:{position:\"relative\",backgroundColor:Yt,overflow:\"hidden\",cursor:i\u0026\u0026!U||oe||ue\u0026\u0026l?\"pointer\":\"grab\",minHeight:\"300px\",userSelect:\"none\",WebkitUserSelect:\"none\",WebkitTouchCallout:\"none\",...e},onMouseDownCapture:st=\u003e{if(at.onMouseDown(st),i\u0026\u0026!U){st.preventDefault(),st.stopPropagation();return}},onContextMenu:at.onContextMenu,onTouchStart:st=\u003e{we(st),at.onTouchStart(st)},onTouchMove:at.onTouchMove,onTouchEnd:st=\u003e{Te(st),at.onTouchEnd()},onTouchCancel:at.onTouchCancel,children:[!U\u0026\u0026i\u0026\u0026K.jsx(\"div\",{onClick:st=\u003e{st.preventDefault(),st.stopPropagation(),Y(!0)},style:{position:\"absolute\",inset:0,cursor:\"pointer\",zIndex:ME.clickToInteractOverlay,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",pointerEvents:\"all\",touchAction:\"pan-x pan-y pinch-zoom\"},children:K.jsx(\"div\",{style:{backgroundColor:\"rgba(0, 0, 0, 0.8)\",color:\"white\",padding:\"12px 24px\",borderRadius:\"8px\",fontSize:\"16px\",fontFamily:\"sans-serif\",pointerEvents:\"none\"},children:typeof window\u003c\"u\"\u0026\u0026(\"ontouchstart\"in window||navigator.maxTouchPoints\u003e0)?\"Touch to Interact\":\"Click to Interact\"})}),w\u0026\u0026K.jsx(HMi,{circuitJson:w,onClose:()=\u003eM(null)}),Le\u0026\u0026K.jsx(VDi,{circuitJson:t,circuitJsonKey:_,netLocations:(()=\u003e{const st=TMi(nt,t);return st?kMi(t,st):[]})(),onSelectNetLocation:st=\u003e{At(!1),It(st)},menuRef:tt,menuPos:Ye,onOpenChange:At,onRunStyleAnalysis:()=\u003e{At(!1),M(structuredClone(t))},showPorts:j,onTogglePorts:st=\u003e{J(st),tgn(DU.IS_SHOWING_SCHEMATIC_PORTS,st)},showGroups:W,onToggleGroups:st=\u003e{s||(te(st),tgn(DU.IS_SHOWING_SCHEMATIC_GROUPS,st))},showWarnings:k,onToggleWarnings:R,showGrid:O,onToggleGrid:Q}),K.jsxs(\"div\",{className:\"schematic-viewer-toolbar\",style:{position:\"absolute\",top:\"16px\",left:\"16px\",display:\"flex\",alignItems:\"flex-start\",gap:\"8px\",zIndex:ME.schematicSearch},children:[K.jsx(GDi,{sheets:f,selectedSheetId:E,onSelectSheet:B}),g\u0026\u0026K.jsx(RDi,{query:pn,onQueryChange:be,onCancel:Bt,results:et,onSelect:It,viewerContainerRef:Ee}),F\u003e0\u0026\u0026K.jsx(YDi,{count:F,showWarnings:k,onToggle:()=\u003eR(st=\u003e!st)})]}),Qe.map(st=\u003eK.jsx(bDi,{componentId:st,svgDivRef:Me,containerRef:Ee,showOutline:!0,circuitJsonKey:_,onHoverChange:_e,onComponentClick:kt},st)),mt,Ct\u0026\u0026Dt\u0026\u0026K.jsx(EDi,{sourceComponent:Ct.sourceComponent,warnings:Ct.warnings,footprinterString:Ct.footprinterString,footprintPreviewCircuitJson:Ct.footprintPreviewCircuitJson,footprintPreviewViewBox:Ct.footprintPreviewViewBox,...Dt}),j\u0026\u0026Pe.map(({portId:st,label:xt})=\u003eK.jsx(QDi,{portId:st,portLabel:xt,svgDivRef:Me,containerRef:Ee,showOutline:!0,circuitJsonKey:_,onHoverChange:ye,onPortClick:l?(Xe,Ze)=\u003e{l?.({schematicPortId:Xe,event:Ze})}:void 0},st))]})]})},JDi=t=\u003e{const e=t.match(/\u003csvg\\b[^\u003e]*\\bstyle=(?:\"([^\"]*)\"|'([^']*)')/i);return(e?.[1]??e?.[2])?.match(/(?:^|;)\\s*background-color\\s*:\\s*([^;]+)/i)?.[1]?.trim()},WDi=t=\u003et.match(/\\.background\\s*\\{[^}]*\\bfill\\s*:\\s*([^;}]+)/i)?.[1]?.trim(),jDi=(t,e)=\u003eJDi(t)??WDi(t)??e?.schematic?.background??$h.schematic.background,Ije='system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',$Di={backgroundColor:\"#ffffff\",color:\"#111111\",borderRadius:8,boxShadow:\"0 6px 24px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08)\",border:\"1px solid #e5e7eb\",padding:4,minWidth:220,maxWidth:360,maxHeight:320,overflowY:\"auto\",fontSize:13,fontFamily:Ije,outline:\"none\",zIndex:ME.viewMenu},qDi={display:\"flex\",alignItems:\"center\",gap:8,padding:\"7px 10px 7px 8px\",borderRadius:6,cursor:\"pointer\",outline:\"none\",userSelect:\"none\",color:\"#111111\",fontSize:13,fontFamily:Ije},XDi={width:16,height:16,flexShrink:0,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#111111\"},dgn={overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"},ZDi=`\n.sv-simulation-item[data-highlighted], .sv-simulation-item:hover { background-color: #f1f3f5; }\n.sv-simulation-chevron { transition: transform 0.2s ease; }\n[data-state=\"open\"] \u003e .sv-simulation-chevron { transform: rotate(180deg); }\n`,eNi=()=\u003eK.jsx(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",children:K.jsx(\"path\",{d:\"M20 6 9 17l-5-5\"})}),tNi=({className:t})=\u003eK.jsx(\"svg\",{className:t,width:\"14\",height:\"14\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{opacity:.6,flexShrink:0},\"aria-hidden\":\"true\",children:K.jsx(\"path\",{d:\"m6 9 6 6 6-6\"})}),nNi=t=\u003e{const e=new Map;return t.map(n=\u003e{const o=(e.get(n.name)??0)+1;return e.set(n.name,o),{simulation:n,label:o===1?n.name:`${n.name} (${o})`}})},oNi=({simulations:t,selectedSimulationExperimentId:e,onSelectSimulation:n})=\u003e{const[o,i]=ee.useState(!1);if(t.length\u003c=1)return null;const r=nNi(t),a=r.find(({simulation:A})=\u003eA.simulation_experiment_id===e)?.label??\"Select simulation\";return K.jsxs(K.Fragment,{children:[K.jsx(\"style\",{children:ZDi}),K.jsxs(e_e,{open:o,onOpenChange:i,modal:!1,children:[K.jsx(t_e,{asChild:!0,children:K.jsxs(\"button\",{type:\"button\",title:a,onPointerDown:A=\u003eA.stopPropagation(),style:{position:\"absolute\",top:\"16px\",left:\"16px\",display:\"flex\",alignItems:\"center\",gap:\"6px\",maxWidth:\"280px\",padding:\"8px 12px\",backgroundColor:\"#ffffff\",color:\"#000000\",border:\"none\",outline:\"none\",borderRadius:\"4px\",cursor:\"pointer\",boxShadow:\"0 2px 4px rgba(0,0,0,0.1)\",fontSize:\"13px\",fontFamily:Ije,zIndex:ME.viewMenuIcon},children:[K.jsx(\"span\",{style:{color:\"#888888\",flexShrink:0},children:\"Simulation:\"}),K.jsx(\"span\",{style:{...dgn,minWidth:0},children:a}),K.jsx(tNi,{className:\"sv-simulation-chevron\"})]})}),K.jsx(EU,{children:K.jsx(bZ,{style:$Di,side:\"bottom\",align:\"start\",sideOffset:8,collisionPadding:10,children:r.map(({simulation:A,label:c})=\u003e{const l=A.simulation_experiment_id===e;return K.jsxs(SS,{className:\"sv-simulation-item\",style:qDi,title:c,onSelect:u=\u003eu.preventDefault(),onPointerUp:()=\u003e{n(A.simulation_experiment_id),i(!1)},children:[K.jsx(\"span\",{style:XDi,children:l\u0026\u0026K.jsx(eNi,{})}),K.jsx(\"span\",{style:{...dgn,minWidth:0},children:c})]},A.simulation_experiment_id)})})})]})]})},iNi=1200,rNi=1,sNi=2,aNi=({circuitJson:t,containerStyle:e,colorOverrides:n,width:o,height:i,className:r,hideSchematic:s=!1,onSimulationChange:a,acSweepView:A=\"magnitude\"})=\u003e{const[c,l]=ee.useState(null),[u,g]=ee.useState(!0),[h,d]=ee.useState(null),[p,m]=ee.useState(null),_=ee.useRef(null),f=ee.useRef(null),{containerWidth:I}=rgn(_),[C,y]=ee.useState(!1),{ref:x}=YZ({onSetTransform(te){f.current\u0026\u0026(f.current.style.transform=iD(te))}}),B=o\u0026\u0026i?o/i:s?sNi:rNi,S=o||(i?i*B:I)||iNi,Q=i||S/B;ee.useEffect(()=\u003e{g(!0),d(null),l(t),g(!1)},[t]);const w=ee.useMemo(()=\u003ec?c.filter(te=\u003ete.type===\"simulation_experiment\"):[],[c]),[M,k]=ee.useState(null),R=(M\u0026\u0026w.some(te=\u003ete.simulation_experiment_id===M)?M:w[0]?.simulation_experiment_id)??null;ee.useEffect(()=\u003e{R!==M\u0026\u0026k(R)},[R,M]);const F=te=\u003e{k(te),a?.(te)},O=ee.useMemo(()=\u003e{if(!c||!S||!Q||!R)return\"\";try{const te={circuitJson:c,simulation_experiment_id:R,ac_sweep_view:A,width:S,height:Q};return s?jun(te):DMi({...te,schematicOptions:{colorOverrides:n}})}catch(te){return console.error(\"Failed to generate simulation SVG:\",te),\"\"}},[c,S,Q,n,s,R,A]);ee.useEffect(()=\u003e{if(!O){m(null);return}try{const te=new Blob([O],{type:\"image/svg+xml\"}),j=URL.createObjectURL(te);return m(j),()=\u003e{URL.revokeObjectURL(j)}}catch(te){console.error(\"Failed to create SVG object URL:\",te),m(null)}},[O]);const U=ee.useMemo(()=\u003ejDi(O,n),[O,n]),Y=te=\u003e{y(!0)},W=te=\u003e{y(!0)};return ee.useEffect(()=\u003e{const te=()=\u003e{y(!1)},j=()=\u003e{y(!1)};return window.addEventListener(\"mouseup\",te),window.addEventListener(\"touchend\",j),()=\u003e{window.removeEventListener(\"mouseup\",te),window.removeEventListener(\"touchend\",j)}},[]),u?K.jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#f5f5f5\",minHeight:\"300px\",fontFamily:\"sans-serif\",fontSize:\"16px\",color:\"#666\",...e},className:r,children:\"Loading circuit...\"}):h?K.jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#fef2f2\",minHeight:\"300px\",fontFamily:\"sans-serif\",fontSize:\"16px\",color:\"#dc2626\",...e},className:r,children:K.jsxs(\"div\",{style:{textAlign:\"center\",padding:\"20px\"},children:[K.jsx(\"div\",{style:{fontWeight:\"bold\",marginBottom:\"8px\"},children:\"Circuit Conversion Error\"}),K.jsx(\"div\",{style:{fontSize:\"14px\"},children:h})]})}):O?K.jsxs(\"div\",{ref:te=\u003e{_.current=te,x.current=te},style:{position:\"relative\",backgroundColor:U,overflow:\"hidden\",minHeight:\"300px\",cursor:C?\"grabbing\":\"grab\",...e},className:r,onMouseDown:Y,onTouchStart:W,children:[K.jsx(oNi,{simulations:w,selectedSimulationExperimentId:R,onSelectSimulation:F}),p?K.jsx(\"img\",{ref:f,src:p,alt:\"Circuit Simulation\",style:{transformOrigin:\"0 0\",width:\"100%\",height:\"100%\",display:\"block\",objectFit:\"contain\"}}):K.jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",height:\"100%\",minHeight:\"300px\",color:\"#666\",fontFamily:\"sans-serif\"},children:\"Failed to render SVG\"})]}):K.jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#f8fafc\",minHeight:\"300px\",fontFamily:\"sans-serif\",gap:\"12px\",...e},className:r,children:[K.jsx(\"div\",{style:{fontSize:\"16px\",color:\"#475569\",fontWeight:500},children:\"No Simulation Found\"}),K.jsxs(\"div\",{style:{fontSize:\"14px\",color:\"#64748b\"},children:[\"Use\",\" \",K.jsx(\"code\",{style:{backgroundColor:\"#e2e8f0\",padding:\"2px 6px\",borderRadius:\"4px\",fontFamily:\"monospace\",fontSize:\"13px\"},children:\"\u003canalogsimulation /\u003e\"}),\" \",\"to create simulations\"]})]})},ANi=()=\u003e{const[t,e]=ee.useState(null),n=ee.useCallback(r=\u003e{e({schematicComponentId:r})},[]),o=ee.useCallback(r=\u003e{e(s=\u003es===r?null:s)},[]);return{controller:ee.useMemo(()=\u003e({focusRequest:t,onFocusRequestHandled:o}),[t,o]),focusSchematicComponent:n}},hgn=t=\u003e{const[e,n]=ee.useState(0),[o,i]=ee.useState(0);return ee.useEffect(()=\u003e{if(!t.current)return;const r=()=\u003e{const a=t.current?.getBoundingClientRect();n(a?.width||0),i(a?.height||0)};r();const s=new ResizeObserver(r);return s.observe(t.current),window.addEventListener(\"resize\",r),()=\u003e{s.disconnect(),window.removeEventListener(\"resize\",r)}},[]),{containerWidth:e,containerHeight:o}};vc(\"assembly-viewer\");var pgn=()=\u003e{vc.enable(\"assembly-viewer*\")},cNi=({circuitJson:t,containerStyle:e,debugGrid:n=!1,debug:o=!1})=\u003e{o\u0026\u0026pgn();const i=ee.useRef(null),{ref:r}=YZ({onSetTransform(l){i.current\u0026\u0026(i.current.style.transform=iD(l))}}),{containerWidth:s,containerHeight:a}=hgn(r),A=ee.useMemo(()=\u003e!s||!a?\"\":_Ut(t,{width:s,height:a||720}),[t,s,a]);ee.useMemo(()=\u003e{if(!A)return QQ();const l=A.match(/data-real-to-screen-transform=\"([^\"]+)\"/)?.[1];try{return BV(l)}catch(u){return console.error(u),QQ()}},[A]);const c=ee.useMemo(()=\u003eK.jsx(\"div\",{ref:i,style:{pointerEvents:\"auto\",transformOrigin:\"0 0\"},dangerouslySetInnerHTML:{__html:A}}),[A]);return K.jsx(\"div\",{ref:r,style:{position:\"relative\",backgroundColor:\"#FFFFFF\",overflow:\"hidden\",minHeight:\"300px\",...e},children:c})},lNi=({circuitJson:t,containerStyle:e,debugGrid:n=!1,debug:o=!1})=\u003e{o\u0026\u0026pgn();const i=ee.useRef(null),{ref:r}=YZ({onSetTransform(l){i.current\u0026\u0026(i.current.style.transform=iD(l))}}),{containerWidth:s,containerHeight:a}=hgn(r),A=ee.useMemo(()=\u003e!s||!a?\"\":SUt(t,{width:s,height:a||720}),[t,s,a]);ee.useMemo(()=\u003e{if(!A)return QQ();const l=A.match(/data-real-to-screen-transform=\"([^\"]+)\"/)?.[1];try{return BV(l)}catch(u){return console.error(u),QQ()}},[A]);const c=ee.useMemo(()=\u003eK.jsx(\"div\",{ref:i,style:{pointerEvents:\"auto\",transformOrigin:\"0 0\"},dangerouslySetInnerHTML:{__html:A}}),[A]);return K.jsx(\"div\",{ref:r,style:{position:\"relative\",backgroundColor:\"#FFFFFF\",overflow:\"hidden\",minHeight:\"300px\",...e},children:c})};const mgn=[\"Initialize a tscircuit project using [tsci init](https://github.com/tscircuit/cli) before adding components.\",\"Define reusable modules with cached routes using [\u003csubcircuit /\u003e](https://docs.tscircuit.com/elements/subcircuit)\",\"Run `tsci dev` on the command line to preview your boards before export\",'Use units like mm or mils consistently across your designs (e.g. pcbX=\"10mm\")',\"Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)\",\"Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)\",\"Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.\",\"You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)\",\"Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more\",\"You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)\",\"Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website\",\"The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM\",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, \".R1 \u003e .pin1\" means \"connect to the first pin of the component R1\"',\"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way\",\"Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work\",\"[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.\",\"Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.\",\"You can display Circuit JSON in 3D, PCB or Schematic mode with the [\u003cCircuitJsonPreview /\u003e](https://docs.tscircuit.com/guides/running-tscircuit/displaying-circuit-json-on-a-webpage#react-display-all-available-previews-with-circuitjsonpreview-) React component\",\"Use a [\u003cgroup /\u003e](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.\",\"Check out the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to upvote features\",\"You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)\",\"Use the [\u003cconstraint /\u003e](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.\",\"When working on component placement and circuit design, autorouting can slow down your iteration cycle. Use [routingDisabled](https://docs.tscircuit.com/elements/board#disabling-routing-with-routingdisabled) on the \u003cboard /\u003e element to disable autorouting temporarily.\",\"Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community.\"],uNi=(()=\u003e{let t=mgn[Math.floor(Math.random()*mgn.length)];return t=t.replace(/\u003c/g,\"\u0026lt;\"),t=t.replace(/\u003e/g,\"\u0026gt;\"),t=t.replace(new RegExp('(?\u003c!href=\")(?\u003c!\\\\()(?\u003c!\\\\]\\\\()(https?:\\\\/\\\\/[^\\\\s\\\\)\\\\]]+)',\"g\"),(e,n)=\u003e`\u003ca class=\"rf-text-blue-500 rf-underline\" href=\"${e}\" target=\"_blank\"\u003e${e}\u003c/a\u003e`),t=t.replace(/\\[([^\\]]+)\\]\\((https?:\\/\\/[^\\)]+)\\)/g,'\u003ca class=\"rf-text-blue-500 rf-underline\" href=\"$2\" target=\"_blank\"\u003e$1\u003c/a\u003e'),t})(),QS=({onRunClicked:t})=\u003eK.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4\",children:[K.jsx(Cbi,{className:\"rf-size-14 rf-mb-4\"}),K.jsxs(\"p\",{className:\"rf-text-md rf-break-words rf-max-w-xl rf-text-center\",children:[\"Tip: \",K.jsx(\"span\",{dangerouslySetInnerHTML:{__html:uNi}})]}),t\u0026\u0026K.jsxs(fA,{className:\"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500\",onClick:t,children:[\"Run Code\",K.jsx(_ln,{className:\"rf-w-3 rf-h-3 rf-ml-2\"})]})]}),D_e=({text:t,onClick:e})=\u003eK.jsx(\"span\",{className:\"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2\",onClick:e,children:t}),N_e=t=\u003eK.jsxs(\"div\",{className:\"rf-leading-5\",children:[K.jsx(\"div\",{className:\"rf-py-2 rf-font-bold\",children:t.column.name}),K.jsx(\"div\",{children:t.field?.()??K.jsx(\"input\",{type:\"text\",className:\"rf-border rf-rounded rf-p-1 rf-w-full\",onChange:e=\u003e{t.onTextChange?.(e.target.value)}})})]}),gNi=({open:t,children:e,title:n,onClose:o})=\u003et?K.jsx(\"div\",{className:\"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50\",onClick:o,children:K.jsxs(\"div\",{className:\"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl\",onClick:i=\u003e{i.preventDefault(),i.stopPropagation()},children:[K.jsx(\"h2\",{className:\"rf-mt-0 rf-text-md rf-pb-4\",children:n}),K.jsx(\"button\",{type:\"button\",className:\"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold\",onClick:o,children:\"×\"}),e]})}):null,dNi=({elements:t})=\u003e{const[e,n]=ee.useState({open:!1}),[o,i]=ee.useReducer((l,u)=\u003e({...l,...u}),{}),r=[...new Set(t.map(l=\u003el.type))],s=t.map(l=\u003e{const u=l[`${l.type}_id`],g=Object.fromEntries(Object.entries(l).filter(([d])=\u003e!(d===`${l.type}_id`||!d.endsWith(\"_id\")))),h=Object.fromEntries(Object.entries(l).filter(([d])=\u003e!d.endsWith(\"_id\")));return{primary_id:u,other_ids:g,...h,_og_elm:l}}),a=s.map(l=\u003e{let u=\"\";const g=h=\u003e{const d=Object.keys(h.other_ids).find(_=\u003e_.startsWith(\"source_\"));if(!d)return`.${h.name}`;const p=d.slice(0,-3),m=s.find(_=\u003e_.type===p\u0026\u0026_.primary_id===h.other_ids[d]);return m?\"name\"in m?`${g(m)} \u003e .${h.name}`:`#${m.primary_id} \u003e .${h.name}`:`??? \u003e .${h.name}`};return\"name\"in l\u0026\u0026(u=g(l)),{...l,selector_path:u}}),A=[{key:\"primary_id\",name:\"primary_id\",renderCell:l=\u003eK.jsxs(\"div\",{className:\"rf-flex rf-items-center\",children:[K.jsx(D_e,{text:l.primary_id,onClick:()=\u003ei({focused_id:l.primary_id,id_search:void 0,selector_search:void 0})}),K.jsx(\"span\",{className:\"rf-flex-grow\"}),K.jsx(D_e,{text:\"(JSON)\",onClick:()=\u003en({open:!0,element:l._og_elm,title:l.primary_id})})]}),renderHeaderCell:l=\u003eK.jsx(N_e,{column:l,onTextChange:u=\u003ei({id_search:u}),field:o.focused_id?()=\u003eK.jsxs(\"div\",{children:[\"Focus:\",\" \",K.jsx(\"span\",{className:\"rf-underline\",children:o.focused_id}),K.jsx(D_e,{text:\"(unfocus)\",onClick:()=\u003ei({focused_id:void 0})})]}):void 0})},{key:\"type\",name:\"type\",renderHeaderCell:l=\u003eK.jsx(N_e,{column:l,field:()=\u003eK.jsxs(\"select\",{onChange:u=\u003ei({component_type_filter:u.target.value}),className:\"rf-border rf-rounded rf-p-1 rf-w-full\",children:[K.jsx(\"option\",{value:\"any\",children:\"any\"},\"any\"),K.jsx(\"option\",{value:\"source\",children:\"source\"},\"source\"),K.jsx(\"option\",{value:\"source/pcb\",children:\"source/pcb\"},\"source/pcb\"),K.jsx(\"option\",{value:\"source/schematic\",children:\"source/schematic\"},\"source/schematic\"),r.map(u=\u003eK.jsx(\"option\",{value:u,children:u},u))]})})},{key:\"name\",name:\"name\",renderHeaderCell:l=\u003eK.jsx(N_e,{column:l,onTextChange:u=\u003ei({name_search:u})})},{key:\"selector_path\",name:\"selector_path\",renderHeaderCell:l=\u003eK.jsx(N_e,{column:l,onTextChange:u=\u003ei({selector_search:u})})},{key:\"other_ids\",name:\"other_ids\",renderCell:l=\u003eK.jsx(\"div\",{className:\"rf-space-x-2\",children:Object.entries(l.other_ids).map(([u,g])=\u003eK.jsx(D_e,{text:g,onClick:()=\u003ei({focused_id:g})},g))})}],c=a.filter(l=\u003eo.name_search?l.name?.toLowerCase()?.includes(o.name_search.toLowerCase()):!0).filter(l=\u003e!o.component_type_filter||o.component_type_filter===\"any\"?!0:o.component_type_filter===\"source\"?l.type.startsWith(\"source_\"):o.component_type_filter===\"source/pcb\"?l.type.startsWith(\"source_\")||l.type.startsWith(\"pcb_\"):o.component_type_filter===\"source/schematic\"?l.type.startsWith(\"source_\")||l.type.startsWith(\"schematic_\"):l.type?.includes(o.component_type_filter)).filter(l=\u003eo.selector_search?o.selector_search.split(\" \").filter(g=\u003eg.length\u003e0).every(g=\u003el.selector_path?.includes(g)):!0).filter(l=\u003eo.id_search?l.primary_id?.includes(o.id_search):!0).filter(l=\u003e!!(!o.focused_id||l.primary_id===o.focused_id||Object.values(l.other_ids).includes(o.focused_id)));return K.jsxs(\"div\",{className:\"rf-font-mono rf-text-xs rf-bg-white\",children:[K.jsx(\"div\",{className:\"rf-overflow-x-auto\",children:K.jsxs(\"table\",{className:\"rf-table-auto rf-w-full rf-text-left\",children:[K.jsx(\"thead\",{children:K.jsx(\"tr\",{children:A.map(l=\u003eK.jsx(\"th\",{className:\"rf-px-4 rf-py-2 rf-border-b\",children:l.renderHeaderCell?l.renderHeaderCell(l):l.name},l.key))})}),K.jsx(\"tbody\",{children:c.map((l,u)=\u003eK.jsx(\"tr\",{className:\"rf-hover:bg-gray-100\",children:A.map(g=\u003eK.jsx(\"td\",{className:\"rf-px-4 rf-py-2 rf-border-b\",children:g.renderCell?g.renderCell(l):l[g.key]},g.key))},u))})]})}),K.jsx(gNi,{open:e.open,onClose:()=\u003en({open:!1}),title:e.open?e.title:\"\",children:K.jsx(\"div\",{className:\"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded\",children:K.jsx(\"pre\",{className:\"rf-whitespace-pre-wrap\",children:e.open?JSON.stringify(e.element,null,2):\"\"})})})]})};var hNi=()=\u003e{if(globalThis.tscircuitDynamicModules)return globalThis.tscircuitDynamicModules;const t={};return globalThis.tscircuitDynamicModules=t,t};function pNi(t,e){return hNi()[t]=e,e}var mNi=[\"circuit-json-to-3d-png\",\"circuit-json-to-bom-csv\",\"circuit-json-to-bpc\",\"circuit-json-to-connectivity-map\",\"circuit-json-to-fdm-component-box\",\"circuit-json-to-gerber\",\"circuit-json-to-gltf\",\"circuit-json-to-kicad\",\"circuit-json-to-lbrn\",\"circuit-json-to-pnp-csv\",\"circuit-json-to-readable-netlist\",\"circuit-json-to-simple-3d\",\"circuit-json-to-spice\",\"circuit-json-to-step\",\"circuit-json-to-tscircuit\",\"circuit-to-canvas\",\"circuit-to-svg\",\"kicad-to-circuit-json\"],Cje=t=\u003e{const e=t.indexOf(\"@\");return e===-1?t:t.slice(0,e)},_Ni=new Set(mNi),fNi=t=\u003e(CNi(t),[INi(t),`https://esm.run/${t}`]);function INi(t){const e=Cje(t),n=t.length===e.length?\"latest\":t.slice(e.length+1);return`https://jscdn.tscircuit.com/${e}/${n}/+esm`}function CNi(t){const e=Cje(t);if(!_Ni.has(e))throw new Error(`Unsupported module: ${t}`)}async function yNi(t){let e;for(const n of fNi(t))try{const o=await import(n);return pNi(Cje(t),o)}catch(o){e=o}throw e}var DE=yNi;const xNi=(t,e)=\u003eK.jsx(\"a\",{className:\"rf-underline rf-text-blue-500\",target:\"_blank\",rel:\"noreferrer\",href:`https://jlcpcb.com/partdetail/${e}`,children:e}),ENi=t=\u003et?.map(({manufacturer:e,mpn:n})=\u003e`${e}: ${n}`).join(\", \"),BNi=t=\u003e{const e=new Set;let n=!1,o=!1;for(const i of t){i.supplier_part_number_columns?.[\"JLCPCB Part #\"]!==void 0\u0026\u0026(n=!0);for(const r of Object.keys(i.extra_columns??{}))e.add(r);(i.manufacturer_mpn_pairs?.length??0)\u003e0\u0026\u0026(o=!0)}return{extraColumnNames:[...e],hasSupplierColumn:n,hasManufacturerColumn:o}},bNi=t=\u003e{const e=[{key:\"designator\",label:\"Designator\",getCell:n=\u003en.designator},{key:\"comment\",label:\"Comment\",getCell:n=\u003en.comment},{key:\"value\",label:\"Component Value\",getCell:n=\u003en.value},{key:\"footprint\",label:\"Footprint\",getCell:n=\u003en.footprint}];t.hasSupplierColumn\u0026\u0026e.push({key:\"supplier:JLCPCB Part #\",label:\"JLCPCB Part #\",getCell:n=\u003e{const o=n.supplier_part_number_columns?.[\"JLCPCB Part #\"];return o?xNi(\"jlcpcb\",o):\"\"}}),t.hasManufacturerColumn\u0026\u0026e.push({key:\"manufacturer_mpn_pairs\",label:\"Manufacturer / MPN\",getCell:n=\u003eENi(n.manufacturer_mpn_pairs)});for(const n of t.extraColumnNames)e.push({key:`extra:${n}`,label:n,getCell:o=\u003eo.extra_columns?.[n]||\"\"});return e},SNi=({circuitJson:t})=\u003e{const[e,n]=ee.useState(null),[o,i]=ee.useState(null);if(ee.useEffect(()=\u003e{let a=!1;return(async()=\u003e{try{i(null),n(null);const{convertCircuitJsonToBomRows:c}=await DE(\"circuit-json-to-bom-csv\"),l=await c({circuitJson:t});a||n(l)}catch(c){a||i(c instanceof Error?c.message:\"Unknown BOM error\")}})(),()=\u003e{a=!0}},[t]),o)throw new Error(o);const r=BNi(e??[]),s=bNi(r);return e?K.jsx(\"div\",{className:\"rf-overflow-x-auto\",children:K.jsxs(\"table\",{className:\"rf-w-full rf-text-left rf-text-sm\",children:[K.jsx(\"thead\",{children:K.jsx(\"tr\",{className:\"rf-border-b\",children:s.map(a=\u003eK.jsx(\"th\",{className:\"rf-p-2\",children:a.label},a.key))})}),K.jsx(\"tbody\",{children:e.map((a,A)=\u003eK.jsx(\"tr\",{className:\"rf-border-b\",children:s.map(c=\u003eK.jsx(\"td\",{className:\"rf-p-2\",children:c.getCell(a)},c.key))},a.designator||`${A}`))})]})}):K.jsx(\"div\",{className:\"rf-p-4 rf-text-sm rf-text-muted-foreground\",children:\"Loading BOM...\"})},yje=ee.forwardRef(({className:t,type:e,...n},o)=\u003eK.jsx(\"input\",{type:e,className:Oi(\"rf-flex rf-h-9 rf-w-full rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-px-3 rf-py-1 rf-text-sm rf-shadow-sm rf-transition-colors file:rf-border-0 file:rf-bg-transparent file:rf-text-sm file:rf-font-medium placeholder:rf-text-zinc-500 focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-placeholder-zinc-400 dark:focus-visible:rf-ring-zinc-300\",t),ref:o,...n}));yje.displayName=\"Input\";function _i(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function RP(){return{a:1,c:0,e:0,b:0,d:1,f:0}}function V6(t){const{a:e,b:n,c:o,d:i,e:r,f:s}=t,a=e*i-n*o;return{a:i/a,b:n/-a,c:o/-a,d:e/a,e:(i*r-o*s)/-a,f:(n*r-e*s)/a}}function zZ(t){return typeof t\u003e\"u\"}function Qd(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function R_e(...t){t=Array.isArray(t[0])?t[0]:t;const e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{const[n,o,...i]=t,r=e(n,o);return R_e(r,...i)}}}function NC(...t){return R_e(...t)}const{cos:QNi,sin:vNi}=Math;function wNi(t,e,n){const o=QNi(t),i=vNi(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return zZ(e)||zZ(n)?r:R_e([Qd(e,n),r,Qd(-e,-n)])}function vS(t,e=void 0,n=void 0,o=void 0){zZ(e)\u0026\u0026(e=t);const i={a:t,c:0,e:0,b:0,d:e,f:0};return zZ(n)||zZ(o)?i:R_e([Qd(n,o),i,Qd(-n,-o)])}function PNi(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function T_e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(i,T_e.prototype),i.expected=e,i.found=n,i.location=o,i.name=\"SyntaxError\",i}PNi(T_e,Error);function xje(t,e,n){return n=n||\" \",t.length\u003ee?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}T_e.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var n=null,o;for(o=0;o\u003ct.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\\r\\n|\\n|\\r/g);break}var i=this.location.start,r=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(i):i,s=this.location.source+\":\"+r.line+\":\"+r.column;if(n){var a=this.location.end,A=xje(\"\",r.line.toString().length,\" \"),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`\n --\u003e `+s+`\n`+A+` |\n`+r.line+\" | \"+c+`\n`+A+\" | \"+xje(\"\",i.column-1,\" \")+xje(\"\",u,\"^\")}else e+=`\n at `+s}return e},T_e.buildMessage=function(t,e){var n={literal:function(c){return'\"'+i(c.text)+'\"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+\"-\"+r(u[1]):r(u)});return\"[\"+(c.inverted?\"^\":\"\")+l.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function r(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length\u003e0){for(u=1,g=1;u\u003cl.length;u++)l[u-1]!==l[u]\u0026\u0026(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+\" or \"+l[1];default:return l.slice(0,-1).join(\", \")+\", or \"+l[l.length-1]}}function A(c){return c?'\"'+i(c)+'\"':\"end of input\"}return\"Expected \"+a(t)+\" but \"+A(e)+\" found.\"};function MNi(t,e=!1,n=!1){e?n?t=NC(t,vS(-1,-1)):t=NC(t,vS(1,-1)):n\u0026\u0026(t=NC(t,vS(-1,1)));const o=t.a,i=t.b,r=t.c,s=t.d;let a,A,c;if(o!==0||r!==0){const l=Math.hypot(o,r);a=l,A=(o*s-i*r)/l;const u=Math.acos(o/l);c=r\u003e0?-u:u}else if(i!==0||s!==0){const l=Math.hypot(i,s);a=(o*s-i*r)/l,A=l;const u=Math.acos(i/l);c=Math.PI/2+(s\u003e0?-u:u)}else a=0,A=0,c=0;return n\u0026\u0026(a=-a),e\u0026\u0026(A=-A),{translate:{tx:t.e,ty:t.f},scale:{sx:a,sy:A},rotation:{angle:c}}}const JZ=t=\u003etypeof t==\"number\"\u0026\u0026!isNaN(t),kT=t=\u003etypeof t==\"string\",NE=t=\u003etypeof t==\"function\",k_e=t=\u003ekT(t)||NE(t)?t:null,Eje=t=\u003eee.isValidElement(t)||kT(t)||NE(t)||JZ(t);function DNi(t,e,n){n===void 0\u0026\u0026(n=300);const{scrollHeight:o,style:i}=t;requestAnimationFrame(()=\u003e{i.minHeight=\"initial\",i.height=o+\"px\",i.transition=`all ${n}ms`,requestAnimationFrame(()=\u003e{i.height=\"0\",i.padding=\"0\",i.margin=\"0\",setTimeout(e,n)})})}function F_e(t){let{enter:e,exit:n,appendPosition:o=!1,collapse:i=!0,collapseDuration:r=300}=t;return function(s){let{children:a,position:A,preventExitTransition:c,done:l,nodeRef:u,isIn:g,playToast:h}=s;const d=o?`${e}--${A}`:e,p=o?`${n}--${A}`:n,m=ee.useRef(0);return ee.useLayoutEffect(()=\u003e{const _=u.current,f=d.split(\" \"),I=C=\u003e{C.target===u.current\u0026\u0026(h(),_.removeEventListener(\"animationend\",I),_.removeEventListener(\"animationcancel\",I),m.current===0\u0026\u0026C.type!==\"animationcancel\"\u0026\u0026_.classList.remove(...f))};_.classList.add(...f),_.addEventListener(\"animationend\",I),_.addEventListener(\"animationcancel\",I)},[]),ee.useEffect(()=\u003e{const _=u.current,f=()=\u003e{_.removeEventListener(\"animationend\",f),i?DNi(_,l,r):l()};g||(c?f():(m.current=1,_.className+=` ${p}`,_.addEventListener(\"animationend\",f)))},[g]),Fs.createElement(Fs.Fragment,null,a)}}function _gn(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const u2=new Map;let WZ=[];const Bje=new Set,NNi=t=\u003eBje.forEach(e=\u003ee(t)),fgn=()=\u003eu2.size\u003e0;function Ign(t,e){var n;if(e)return!((n=u2.get(e))==null||!n.isToastActive(t));let o=!1;return u2.forEach(i=\u003e{i.isToastActive(t)\u0026\u0026(o=!0)}),o}function Cgn(t,e){Eje(t)\u0026\u0026(fgn()||WZ.push({content:t,options:e}),u2.forEach(n=\u003e{n.buildToast(t,e)}))}function ygn(t,e){u2.forEach(n=\u003e{e!=null\u0026\u0026e!=null\u0026\u0026e.containerId?e?.containerId===n.id\u0026\u0026n.toggle(t,e?.id):n.toggle(t,e?.id)})}function RNi(t){const{subscribe:e,getSnapshot:n,setProps:o}=ee.useRef((function(r){const s=r.containerId||1;return{subscribe(a){const A=(function(l,u,g){let h=1,d=0,p=[],m=[],_=[],f=u;const I=new Map,C=new Set,y=()=\u003e{_=Array.from(I.values()),C.forEach(B=\u003eB())},x=B=\u003e{m=B==null?[]:m.filter(S=\u003eS!==B),y()},E=B=\u003e{const{toastId:S,onOpen:Q,updateId:w,children:M}=B.props,k=w==null;B.staleId\u0026\u0026I.delete(B.staleId),I.set(S,B),m=[...m,B.props.toastId].filter(R=\u003eR!==B.staleId),y(),g(_gn(B,k?\"added\":\"updated\")),k\u0026\u0026NE(Q)\u0026\u0026Q(ee.isValidElement(M)\u0026\u0026M.props)};return{id:l,props:f,observe:B=\u003e(C.add(B),()=\u003eC.delete(B)),toggle:(B,S)=\u003e{I.forEach(Q=\u003e{S!=null\u0026\u0026S!==Q.props.toastId||NE(Q.toggle)\u0026\u0026Q.toggle(B)})},removeToast:x,toasts:I,clearQueue:()=\u003e{d-=p.length,p=[]},buildToast:(B,S)=\u003e{if((J=\u003e{let{containerId:oe,toastId:ie,updateId:ne}=J;const le=oe?oe!==l:l!==1,ge=I.has(ie)\u0026\u0026ne==null;return le||ge})(S))return;const{toastId:Q,updateId:w,data:M,staleId:k,delay:R}=S,F=()=\u003e{x(Q)},O=w==null;O\u0026\u0026d++;const U={...f,style:f.toastStyle,key:h++,...Object.fromEntries(Object.entries(S).filter(J=\u003e{let[oe,ie]=J;return ie!=null})),toastId:Q,updateId:w,data:M,closeToast:F,isIn:!1,className:k_e(S.className||f.toastClassName),bodyClassName:k_e(S.bodyClassName||f.bodyClassName),progressClassName:k_e(S.progressClassName||f.progressClassName),autoClose:!S.isLoading\u0026\u0026(Y=S.autoClose,W=f.autoClose,Y===!1||JZ(Y)\u0026\u0026Y\u003e0?Y:W),deleteToast(){const J=I.get(Q),{onClose:oe,children:ie}=J.props;NE(oe)\u0026\u0026oe(ee.isValidElement(ie)\u0026\u0026ie.props),g(_gn(J,\"removed\")),I.delete(Q),d--,d\u003c0\u0026\u0026(d=0),p.length\u003e0?E(p.shift()):y()}};var Y,W;U.closeButton=f.closeButton,S.closeButton===!1||Eje(S.closeButton)?U.closeButton=S.closeButton:S.closeButton===!0\u0026\u0026(U.closeButton=!Eje(f.closeButton)||f.closeButton);let te=B;ee.isValidElement(B)\u0026\u0026!kT(B.type)?te=ee.cloneElement(B,{closeToast:F,toastProps:U,data:M}):NE(B)\u0026\u0026(te=B({closeToast:F,toastProps:U,data:M}));const j={content:te,props:U,staleId:k};f.limit\u0026\u0026f.limit\u003e0\u0026\u0026d\u003ef.limit\u0026\u0026O?p.push(j):JZ(R)?setTimeout(()=\u003e{E(j)},R):E(j)},setProps(B){f=B},setToggle:(B,S)=\u003e{I.get(B).toggle=S},isToastActive:B=\u003em.some(S=\u003eS===B),getSnapshot:()=\u003e_}})(s,r,NNi);u2.set(s,A);const c=A.observe(a);return WZ.forEach(l=\u003eCgn(l.content,l.options)),WZ=[],()=\u003e{c(),u2.delete(s)}},setProps(a){var A;(A=u2.get(s))==null||A.setProps(a)},getSnapshot(){var a;return(a=u2.get(s))==null?void 0:a.getSnapshot()}}})(t)).current;o(t);const i=ee.useSyncExternalStore(e,n,n);return{getToastToRender:function(r){if(!i)return[];const s=new Map;return t.newestOnTop\u0026\u0026i.reverse(),i.forEach(a=\u003e{const{position:A}=a.props;s.has(A)||s.set(A,[]),s.get(A).push(a)}),Array.from(s,a=\u003er(a[0],a[1]))},isToastActive:Ign,count:i?.length}}function TNi(t){const[e,n]=ee.useState(!1),[o,i]=ee.useState(!1),r=ee.useRef(null),s=ee.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:A,closeToast:c,onClick:l,closeOnClick:u}=t;var g,h;function d(){n(!0)}function p(){n(!1)}function m(I){const C=r.current;s.canDrag\u0026\u0026C\u0026\u0026(s.didMove=!0,e\u0026\u0026p(),s.delta=t.draggableDirection===\"x\"?I.clientX-s.start:I.clientY-s.start,s.start!==I.clientX\u0026\u0026(s.canCloseOnClick=!1),C.style.transform=`translate3d(${t.draggableDirection===\"x\"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,C.style.opacity=\"\"+(1-Math.abs(s.delta/s.removalDistance)))}function _(){document.removeEventListener(\"pointermove\",m),document.removeEventListener(\"pointerup\",_);const I=r.current;if(s.canDrag\u0026\u0026s.didMove\u0026\u0026I){if(s.canDrag=!1,Math.abs(s.delta)\u003es.removalDistance)return i(!0),t.closeToast(),void t.collapseAll();I.style.transition=\"transform 0.2s, opacity 0.2s\",I.style.removeProperty(\"transform\"),I.style.removeProperty(\"opacity\")}}(h=u2.get((g={id:t.toastId,containerId:t.containerId,fn:n}).containerId||1))==null||h.setToggle(g.id,g.fn),ee.useEffect(()=\u003e{if(t.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener(\"focus\",d),window.addEventListener(\"blur\",p),()=\u003e{window.removeEventListener(\"focus\",d),window.removeEventListener(\"blur\",p)}},[t.pauseOnFocusLoss]);const f={onPointerDown:function(I){if(t.draggable===!0||t.draggable===I.pointerType){s.didMove=!1,document.addEventListener(\"pointermove\",m),document.addEventListener(\"pointerup\",_);const C=r.current;s.canCloseOnClick=!0,s.canDrag=!0,C.style.transition=\"none\",t.draggableDirection===\"x\"?(s.start=I.clientX,s.removalDistance=C.offsetWidth*(t.draggablePercent/100)):(s.start=I.clientY,s.removalDistance=C.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(I){const{top:C,bottom:y,left:x,right:E}=r.current.getBoundingClientRect();I.nativeEvent.type!==\"touchend\"\u0026\u0026t.pauseOnHover\u0026\u0026I.clientX\u003e=x\u0026\u0026I.clientX\u003c=E\u0026\u0026I.clientY\u003e=C\u0026\u0026I.clientY\u003c=y?p():d()}};return a\u0026\u0026A\u0026\u0026(f.onMouseEnter=p,t.stacked||(f.onMouseLeave=d)),u\u0026\u0026(f.onClick=I=\u003e{l\u0026\u0026l(I),s.canCloseOnClick\u0026\u0026c()}),{playToast:d,pauseToast:p,isRunning:e,preventExitTransition:o,toastRef:r,eventHandlers:f}}function kNi(t){let{delay:e,isRunning:n,closeToast:o,type:i=\"default\",hide:r,className:s,style:a,controlledProgress:A,progress:c,rtl:l,isIn:u,theme:g}=t;const h=r||A\u0026\u0026c===0,d={...a,animationDuration:`${e}ms`,animationPlayState:n?\"running\":\"paused\"};A\u0026\u0026(d.transform=`scaleX(${c})`);const p=NB(\"Toastify__progress-bar\",A?\"Toastify__progress-bar--controlled\":\"Toastify__progress-bar--animated\",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${i}`,{\"Toastify__progress-bar--rtl\":l}),m=NE(s)?s({rtl:l,type:i,defaultClassName:p}):NB(p,s),_={[A\u0026\u0026c\u003e=1?\"onTransitionEnd\":\"onAnimationEnd\"]:A\u0026\u0026c\u003c1?null:()=\u003e{u\u0026\u0026o()}};return Fs.createElement(\"div\",{className:\"Toastify__progress-bar--wrp\",\"data-hidden\":h},Fs.createElement(\"div\",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${i}`}),Fs.createElement(\"div\",{role:\"progressbar\",\"aria-hidden\":h?\"true\":\"false\",\"aria-label\":\"notification timer\",className:m,style:d,..._}))}let FNi=1;const xgn=()=\u003e\"\"+FNi++;function LNi(t){return t\u0026\u0026(kT(t.toastId)||JZ(t.toastId))?t.toastId:xgn()}function jZ(t,e){return Cgn(t,e),e.toastId}function L_e(t,e){return{...e,type:e\u0026\u0026e.type||t,toastId:LNi(e)}}function H_e(t){return(e,n)=\u003ejZ(e,L_e(t,n))}function vd(t,e){return jZ(t,L_e(\"default\",e))}vd.loading=(t,e)=\u003ejZ(t,L_e(\"default\",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),vd.promise=function(t,e,n){let o,{pending:i,error:r,success:s}=e;i\u0026\u0026(o=kT(i)?vd.loading(i,n):vd.loading(i.render,{...n,...i}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},A=(l,u,g)=\u003e{if(u==null)return void vd.dismiss(o);const h={type:l,...a,...n,data:g},d=kT(u)?{render:u}:u;return o?vd.update(o,{...h,...d}):vd(d.render,{...h,...d}),g},c=NE(t)?t():t;return c.then(l=\u003eA(\"success\",s,l)).catch(l=\u003eA(\"error\",r,l)),c},vd.success=H_e(\"success\"),vd.info=H_e(\"info\"),vd.error=H_e(\"error\"),vd.warning=H_e(\"warning\"),vd.warn=vd.warning,vd.dark=(t,e)=\u003ejZ(t,L_e(\"default\",{theme:\"dark\",...e})),vd.dismiss=function(t){(function(e){var n;if(fgn()){if(e==null||kT(n=e)||JZ(n))u2.forEach(o=\u003e{o.removeToast(e)});else if(e\u0026\u0026(\"containerId\"in e||\"id\"in e)){const o=u2.get(e.containerId);o?o.removeToast(e.id):u2.forEach(i=\u003e{i.removeToast(e.id)})}}else WZ=WZ.filter(o=\u003ee!=null\u0026\u0026o.options.toastId!==e)})(t)},vd.clearWaitingQueue=function(t){t===void 0\u0026\u0026(t={}),u2.forEach(e=\u003e{!e.props.limit||t.containerId\u0026\u0026e.id!==t.containerId||e.clearQueue()})},vd.isActive=Ign,vd.update=function(t,e){e===void 0\u0026\u0026(e={});const n=((o,i)=\u003e{var r;let{containerId:s}=i;return(r=u2.get(s||1))==null?void 0:r.toasts.get(o)})(t,e);if(n){const{props:o,content:i}=n,r={delay:100,...o,...e,toastId:e.toastId||t,updateId:xgn()};r.toastId!==t\u0026\u0026(r.staleId=t);const s=r.render||i;delete r.render,jZ(s,r)}},vd.done=t=\u003e{vd.update(t,{progress:1})},vd.onChange=function(t){return Bje.add(t),()=\u003e{Bje.delete(t)}},vd.play=t=\u003eygn(!0,t),vd.pause=t=\u003eygn(!1,t);const HNi=typeof window\u003c\"u\"?ee.useLayoutEffect:ee.useEffect,O_e=t=\u003e{let{theme:e,type:n,isLoading:o,...i}=t;return Fs.createElement(\"svg\",{viewBox:\"0 0 24 24\",width:\"100%\",height:\"100%\",fill:e===\"colored\"?\"currentColor\":`var(--toastify-icon-color-${n})`,...i})},bje={info:function(t){return Fs.createElement(O_e,{...t},Fs.createElement(\"path\",{d:\"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z\"}))},warning:function(t){return Fs.createElement(O_e,{...t},Fs.createElement(\"path\",{d:\"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z\"}))},success:function(t){return Fs.createElement(O_e,{...t},Fs.createElement(\"path\",{d:\"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z\"}))},error:function(t){return Fs.createElement(O_e,{...t},Fs.createElement(\"path\",{d:\"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z\"}))},spinner:function(){return Fs.createElement(\"div\",{className:\"Toastify__spinner\"})}},ONi=t=\u003e{const{isRunning:e,preventExitTransition:n,toastRef:o,eventHandlers:i,playToast:r}=TNi(t),{closeButton:s,children:a,autoClose:A,onClick:c,type:l,hideProgressBar:u,closeToast:g,transition:h,position:d,className:p,style:m,bodyClassName:_,bodyStyle:f,progressClassName:I,progressStyle:C,updateId:y,role:x,progress:E,rtl:B,toastId:S,deleteToast:Q,isIn:w,isLoading:M,closeOnClick:k,theme:R}=t,F=NB(\"Toastify__toast\",`Toastify__toast-theme--${R}`,`Toastify__toast--${l}`,{\"Toastify__toast--rtl\":B},{\"Toastify__toast--close-on-click\":k}),O=NE(p)?p({rtl:B,position:d,type:l,defaultClassName:F}):NB(F,p),U=(function(j){let{theme:J,type:oe,isLoading:ie,icon:ne}=j,le=null;const ge={theme:J,type:oe};return ne===!1||(NE(ne)?le=ne({...ge,isLoading:ie}):ee.isValidElement(ne)?le=ee.cloneElement(ne,ge):ie?le=bje.spinner():(_e=\u003e_e in bje)(oe)\u0026\u0026(le=bje[oe](ge))),le})(t),Y=!!E||!A,W={closeToast:g,type:l,theme:R};let te=null;return s===!1||(te=NE(s)?s(W):ee.isValidElement(s)?ee.cloneElement(s,W):(function(j){let{closeToast:J,theme:oe,ariaLabel:ie=\"close\"}=j;return Fs.createElement(\"button\",{className:`Toastify__close-button Toastify__close-button--${oe}`,type:\"button\",onClick:ne=\u003e{ne.stopPropagation(),J(ne)},\"aria-label\":ie},Fs.createElement(\"svg\",{\"aria-hidden\":\"true\",viewBox:\"0 0 14 16\"},Fs.createElement(\"path\",{fillRule:\"evenodd\",d:\"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z\"})))})(W)),Fs.createElement(h,{isIn:w,done:Q,position:d,preventExitTransition:n,nodeRef:o,playToast:r},Fs.createElement(\"div\",{id:S,onClick:c,\"data-in\":w,className:O,...i,style:m,ref:o},Fs.createElement(\"div\",{...w\u0026\u0026{role:x},className:NE(_)?_({type:l}):NB(\"Toastify__toast-body\",_),style:f},U!=null\u0026\u0026Fs.createElement(\"div\",{className:NB(\"Toastify__toast-icon\",{\"Toastify--animate-icon Toastify__zoom-enter\":!M})},U),Fs.createElement(\"div\",null,a)),te,Fs.createElement(kNi,{...y\u0026\u0026!Y?{key:`pb-${y}`}:{},rtl:B,theme:R,delay:A,isRunning:e,isIn:w,closeToast:g,hide:u,type:l,style:C,className:I,controlledProgress:Y,progress:E||0})))},G_e=function(t,e){return e===void 0\u0026\u0026(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},GNi=F_e(G_e(\"bounce\",!0));F_e(G_e(\"slide\",!0)),F_e(G_e(\"zoom\")),F_e(G_e(\"flip\"));const YNi={position:\"top-right\",transition:GNi,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:\"touch\",draggablePercent:80,draggableDirection:\"x\",role:\"alert\",theme:\"light\"};function UNi(t){let e={...YNi,...t};const n=t.stacked,[o,i]=ee.useState(!0),r=ee.useRef(null),{getToastToRender:s,isToastActive:a,count:A}=RNi(e),{className:c,style:l,rtl:u,containerId:g}=e;function h(p){const m=NB(\"Toastify__toast-container\",`Toastify__toast-container--${p}`,{\"Toastify__toast-container--rtl\":u});return NE(c)?c({position:p,rtl:u,defaultClassName:m}):NB(m,k_e(c))}function d(){n\u0026\u0026(i(!0),vd.play())}return HNi(()=\u003e{if(n){var p;const m=r.current.querySelectorAll('[data-in=\"true\"]'),_=12,f=(p=e.position)==null?void 0:p.includes(\"top\");let I=0,C=0;Array.from(m).reverse().forEach((y,x)=\u003e{const E=y;E.classList.add(\"Toastify__toast--stacked\"),x\u003e0\u0026\u0026(E.dataset.collapsed=`${o}`),E.dataset.pos||(E.dataset.pos=f?\"top\":\"bot\");const B=I*(o?.2:1)+(o?0:_*x);E.style.setProperty(\"--y\",`${f?B:-1*B}px`),E.style.setProperty(\"--g\",`${_}`),E.style.setProperty(\"--s\",\"\"+(1-(o?C:0))),I+=E.offsetHeight,C+=.025})}},[o,A,n]),Fs.createElement(\"div\",{ref:r,className:\"Toastify\",id:g,onMouseEnter:()=\u003e{n\u0026\u0026(i(!1),vd.pause())},onMouseLeave:d},s((p,m)=\u003e{const _=m.length?{...l}:{...l,pointerEvents:\"none\"};return Fs.createElement(\"div\",{className:h(p),style:_,key:`container-${p}`},m.map(f=\u003e{let{content:I,props:C}=f;return Fs.createElement(ONi,{...C,stacked:n,collapseAll:d,isIn:a(C.toastId,C.containerId),style:C.style,key:`toast-${C.key}`},I)}))}))}function KNi(){var t=':root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)\u003e*{opacity:0}.Toastify__toast--stacked:after{content:\"\";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:\"\";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body\u003ediv:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button\u003esvg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}',e=document.createElement(\"style\");e.innerText=t,document.head.appendChild(e)}const VNi=wit(WQn);var Sje,Egn;function zNi(){if(Egn)return Sje;Egn=1;var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(m,_)=\u003e{for(var f in _)t(m,f,{get:_[f],enumerable:!0})},r=(m,_,f,I)=\u003e{if(_\u0026\u0026typeof _==\"object\"||typeof _==\"function\")for(let C of n(_))!o.call(m,C)\u0026\u0026C!==f\u0026\u0026t(m,C,{get:()=\u003e_[C],enumerable:!(I=e(_,C))||I.enumerable});return m},s=m=\u003er(t({},\"__esModule\",{value:!0}),m),a={};i(a,{SuperGrid:()=\u003ep,toMMSI:()=\u003ed,toMeterSI:()=\u003eh}),Sje=s(a);var A=L3(),c=VNi,l=kit(),u=(m,_,f)=\u003e{const I=[];if(_\u003cm)for(let C=m;C\u003e=_;C-=Math.abs(f))I.push(C);else for(let C=m;C\u003c=_;C+=Math.abs(f))I.push(C);return I};function g(m,_){return{x:Math.round(_.x/m)*m,y:Math.round(_.y/m)*m}}function h(m,_=1){return m\u003c0?\"-\"+h(-m):m\u003c1e-6?\"0m\":m\u003e1e3?Math.floor(m/1e3)+\"km\":m\u003e1\u0026\u0026_\u003e1?Math.round(m)+\"m\":m\u003e1\u0026\u0026_\u003c=1?m.toFixed(Math.ceil(-Math.log10(_)))+\"m\":m\u003c1\u0026\u0026_\u003e=1/1e3?Math.round(m*1e3)+\"mm\":m\u003c1\u0026\u0026_\u003c1/1e3?(m*1e3).toFixed(Math.ceil(-Math.log10(_*1e3)))+\"mm\":\"\"}function d(m,_=1){return h(m/1e3,_/1e3)}var p=m=\u003e{var _;const f=(0,A.useRef)(null),[I,C]=(0,A.useState)({x:0,y:0}),{majorColor:y=\"rgba(0,0,0,0.2)\",minorColor:x=\"rgba(0,0,0,0.1)\",textColor:E=(_=m.majorColor)!=null?_:\"rgba(0,0,0,0.5)\",width:B,height:S,screenSpaceCellSize:Q=200,stringifyCoord:w=(F,O,U)=\u003e`${h(F,U)}, ${h(O,U)}`}=m,M=Math.ceil(B/Q)+2,k=Math.ceil(S/Q)+2;(0,A.useEffect)(()=\u003e{if(!f.current)return;const F=f.current.getContext(\"2d\");if(!F)return;const O=Q/10**Math.floor(Math.log10(m.transform.a)),U=m.transform.d\u003c0?-1:1,W=Q/10**Math.log10(m.transform.a)/O;function te(fe,pe,ye){const Me=fe;let ve,he,Qe;for(ve=pe.x;ve\u003c=ye.x;ve+=Me)he=(0,c.applyToPoint)(m.transform,{x:ve,y:pe.y}),Qe=(0,c.applyToPoint)(m.transform,{x:ve,y:ye.y}),F.beginPath(),F.moveTo(he.x,he.y),F.lineTo(Qe.x,Qe.y),F.stroke();const Pe=u(pe.y,ye.y,Me*U);for(const we of Pe)he=(0,c.applyToPoint)(m.transform,{x:pe.x,y:we}),Qe=(0,c.applyToPoint)(m.transform,{x:ye.x,y:we}),F.beginPath(),F.moveTo(he.x,he.y),F.lineTo(Qe.x,Qe.y),F.stroke()}function j(fe,pe,ye){const Me=fe;let ve;for(ve=pe.x;ve\u003c=ye.x;ve+=Me)for(const he of u(pe.y,ye.y,Me*U)){const Qe=(0,c.applyToPoint)(m.transform,{x:ve,y:he});F.fillStyle=E,F.font=\"12px sans-serif\",F.fillText(w(ve,he,fe),Qe.x+2,Qe.y-2)}}F.clearRect(0,0,B,S);const J=(0,c.applyToPoint)((0,c.inverse)(m.transform),{x:0,y:0}),oe={x:Math.floor((J.x-O)/O)*O,y:Math.floor((J.y-O)/O+(U==-1?2:0))*O},ie={x:oe.x+O*M,y:oe.y+O*k*U},le=O*5,ge={x:Math.floor((J.x-le)/le)*le,y:Math.floor((J.y-le)/le+(U==-1?2:0))*le},_e={x:ge.x+le*M,y:ge.y+le*k*U};F.globalAlpha=1,F.strokeStyle=y,te(O,oe,ie),j(le,ge,_e),F.globalAlpha=1-W,te(le/10,ge,_e),F.globalAlpha=1-W,F.strokeStyle=x,te(O/10,oe,ie),F.globalAlpha=Math.max(((1-W)*10-5)/5,0),j(le/10,ge,_e),F.globalAlpha=1;const ue=(0,c.applyToPoint)(m.transform,I);F.font=\"12px sans-serif\",F.fillStyle=E,F.fillText(w(I.x,I.y,O),ue.x+2,ue.y-2),F.strokeStyle=y,F.strokeRect(ue.x-5,ue.y-5,10,10)},[f,m.transform,I,B,S]);const R=F=\u003e{if(!f.current)return;const O=Q/10/10**Math.floor(Math.log10(m.transform.a)),U=f.current.getBoundingClientRect(),Y=(0,c.applyToPoint)((0,c.inverse)(m.transform),{x:F.clientX-U.left,y:F.clientY-U.top}),W=g(O,Y);C(W)};return(0,l.jsx)(\"canvas\",{onMouseUp:F=\u003e{F.button===1\u0026\u0026R(F)},onDoubleClick:R,ref:f,width:m.width,height:m.height})};return Sje}var FT=zNi(),Qje={exports:{}},vje,Bgn;function JNi(){return Bgn||(Bgn=1,vje={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),vje}var wje={exports:{}},Pje,bgn;function WNi(){return bgn||(bgn=1,Pje=function(e){return!e||typeof e==\"string\"?!1:e instanceof Array||Array.isArray(e)||e.length\u003e=0\u0026\u0026(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)\u0026\u0026e.constructor.name!==\"String\")}),Pje}var Sgn;function jNi(){if(Sgn)return wje.exports;Sgn=1;var t=WNi(),e=Array.prototype.concat,n=Array.prototype.slice,o=wje.exports=function(r){for(var s=[],a=0,A=r.length;a\u003cA;a++){var c=r[a];t(c)?s=e.call(s,n.call(c)):s.push(c)}return s};return o.wrap=function(i){return function(){return i(o(arguments))}},wje.exports}var Qgn;function $Ni(){if(Qgn)return Qje.exports;Qgn=1;var t=JNi(),e=jNi(),n=Object.hasOwnProperty,o=Object.create(null);for(var i in t)n.call(t,i)\u0026\u0026(o[t[i]]=i);var r=Qje.exports={to:{},get:{}};r.get=function(A){var c=A.substring(0,3).toLowerCase(),l,u;switch(c){case\"hsl\":l=r.get.hsl(A),u=\"hsl\";break;case\"hwb\":l=r.get.hwb(A),u=\"hwb\";break;default:l=r.get.rgb(A),u=\"rgb\";break}return l?{model:u,value:l}:null},r.get.rgb=function(A){if(!A)return null;var c=/^#([a-f0-9]{3,4})$/i,l=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,u=/^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/,g=/^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/,h=/^(\\w+)$/,d=[0,0,0,1],p,m,_;if(p=A.match(l)){for(_=p[2],p=p[1],m=0;m\u003c3;m++){var f=m*2;d[m]=parseInt(p.slice(f,f+2),16)}_\u0026\u0026(d[3]=parseInt(_,16)/255)}else if(p=A.match(c)){for(p=p[1],_=p[3],m=0;m\u003c3;m++)d[m]=parseInt(p[m]+p[m],16);_\u0026\u0026(d[3]=parseInt(_+_,16)/255)}else if(p=A.match(u)){for(m=0;m\u003c3;m++)d[m]=parseInt(p[m+1],0);p[4]\u0026\u0026(p[5]?d[3]=parseFloat(p[4])*.01:d[3]=parseFloat(p[4]))}else if(p=A.match(g)){for(m=0;m\u003c3;m++)d[m]=Math.round(parseFloat(p[m+1])*2.55);p[4]\u0026\u0026(p[5]?d[3]=parseFloat(p[4])*.01:d[3]=parseFloat(p[4]))}else return(p=A.match(h))?p[1]===\"transparent\"?[0,0,0,0]:n.call(t,p[1])?(d=t[p[1]],d[3]=1,d):null:null;for(m=0;m\u003c3;m++)d[m]=s(d[m],0,255);return d[3]=s(d[3],0,1),d},r.get.hsl=function(A){if(!A)return null;var c=/^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/,l=A.match(c);if(l){var u=parseFloat(l[4]),g=(parseFloat(l[1])%360+360)%360,h=s(parseFloat(l[2]),0,100),d=s(parseFloat(l[3]),0,100),p=s(isNaN(u)?1:u,0,1);return[g,h,d,p]}return null},r.get.hwb=function(A){if(!A)return null;var c=/^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/,l=A.match(c);if(l){var u=parseFloat(l[4]),g=(parseFloat(l[1])%360+360)%360,h=s(parseFloat(l[2]),0,100),d=s(parseFloat(l[3]),0,100),p=s(isNaN(u)?1:u,0,1);return[g,h,d,p]}return null},r.to.hex=function(){var A=e(arguments);return\"#\"+a(A[0])+a(A[1])+a(A[2])+(A[3]\u003c1?a(Math.round(A[3]*255)):\"\")},r.to.rgb=function(){var A=e(arguments);return A.length\u003c4||A[3]===1?\"rgb(\"+Math.round(A[0])+\", \"+Math.round(A[1])+\", \"+Math.round(A[2])+\")\":\"rgba(\"+Math.round(A[0])+\", \"+Math.round(A[1])+\", \"+Math.round(A[2])+\", \"+A[3]+\")\"},r.to.rgb.percent=function(){var A=e(arguments),c=Math.round(A[0]/255*100),l=Math.round(A[1]/255*100),u=Math.round(A[2]/255*100);return A.length\u003c4||A[3]===1?\"rgb(\"+c+\"%, \"+l+\"%, \"+u+\"%)\":\"rgba(\"+c+\"%, \"+l+\"%, \"+u+\"%, \"+A[3]+\")\"},r.to.hsl=function(){var A=e(arguments);return A.length\u003c4||A[3]===1?\"hsl(\"+A[0]+\", \"+A[1]+\"%, \"+A[2]+\"%)\":\"hsla(\"+A[0]+\", \"+A[1]+\"%, \"+A[2]+\"%, \"+A[3]+\")\"},r.to.hwb=function(){var A=e(arguments),c=\"\";return A.length\u003e=4\u0026\u0026A[3]!==1\u0026\u0026(c=\", \"+A[3]),\"hwb(\"+A[0]+\", \"+A[1]+\"%, \"+A[2]+\"%\"+c+\")\"},r.to.keyword=function(A){return o[A.slice(0,3)]};function s(A,c,l){return Math.min(Math.max(c,A),l)}function a(A){var c=Math.round(A).toString(16).toUpperCase();return c.length\u003c2?\"0\"+c:c}return Qje.exports}var Mje,vgn;function qNi(){return vgn||(vgn=1,Mje={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Mje}var Dje,wgn;function Pgn(){if(wgn)return Dje;wgn=1;const t=qNi(),e={};for(const i of Object.keys(t))e[t[i]]=i;const n={rgb:{channels:3,labels:\"rgb\"},hsl:{channels:3,labels:\"hsl\"},hsv:{channels:3,labels:\"hsv\"},hwb:{channels:3,labels:\"hwb\"},cmyk:{channels:4,labels:\"cmyk\"},xyz:{channels:3,labels:\"xyz\"},lab:{channels:3,labels:\"lab\"},lch:{channels:3,labels:\"lch\"},hex:{channels:1,labels:[\"hex\"]},keyword:{channels:1,labels:[\"keyword\"]},ansi16:{channels:1,labels:[\"ansi16\"]},ansi256:{channels:1,labels:[\"ansi256\"]},hcg:{channels:3,labels:[\"h\",\"c\",\"g\"]},apple:{channels:3,labels:[\"r16\",\"g16\",\"b16\"]},gray:{channels:1,labels:[\"gray\"]}};Dje=n;for(const i of Object.keys(n)){if(!(\"channels\"in n[i]))throw new Error(\"missing channels property: \"+i);if(!(\"labels\"in n[i]))throw new Error(\"missing channel labels property: \"+i);if(n[i].labels.length!==n[i].channels)throw new Error(\"channel and label counts mismatch: \"+i);const{channels:r,labels:s}=n[i];delete n[i].channels,delete n[i].labels,Object.defineProperty(n[i],\"channels\",{value:r}),Object.defineProperty(n[i],\"labels\",{value:s})}n.rgb.hsl=function(i){const r=i[0]/255,s=i[1]/255,a=i[2]/255,A=Math.min(r,s,a),c=Math.max(r,s,a),l=c-A;let u,g;c===A?u=0:r===c?u=(s-a)/l:s===c?u=2+(a-r)/l:a===c\u0026\u0026(u=4+(r-s)/l),u=Math.min(u*60,360),u\u003c0\u0026\u0026(u+=360);const h=(A+c)/2;return c===A?g=0:h\u003c=.5?g=l/(c+A):g=l/(2-c-A),[u,g*100,h*100]},n.rgb.hsv=function(i){let r,s,a,A,c;const l=i[0]/255,u=i[1]/255,g=i[2]/255,h=Math.max(l,u,g),d=h-Math.min(l,u,g),p=function(m){return(h-m)/6/d+1/2};return d===0?(A=0,c=0):(c=d/h,r=p(l),s=p(u),a=p(g),l===h?A=a-s:u===h?A=1/3+r-a:g===h\u0026\u0026(A=2/3+s-r),A\u003c0?A+=1:A\u003e1\u0026\u0026(A-=1)),[A*360,c*100,h*100]},n.rgb.hwb=function(i){const r=i[0],s=i[1];let a=i[2];const A=n.rgb.hsl(i)[0],c=1/255*Math.min(r,Math.min(s,a));return a=1-1/255*Math.max(r,Math.max(s,a)),[A,c*100,a*100]},n.rgb.cmyk=function(i){const r=i[0]/255,s=i[1]/255,a=i[2]/255,A=Math.min(1-r,1-s,1-a),c=(1-r-A)/(1-A)||0,l=(1-s-A)/(1-A)||0,u=(1-a-A)/(1-A)||0;return[c*100,l*100,u*100,A*100]};function o(i,r){return(i[0]-r[0])**2+(i[1]-r[1])**2+(i[2]-r[2])**2}return n.rgb.keyword=function(i){const r=e[i];if(r)return r;let s=1/0,a;for(const A of Object.keys(t)){const c=t[A],l=o(i,c);l\u003cs\u0026\u0026(s=l,a=A)}return a},n.keyword.rgb=function(i){return t[i]},n.rgb.xyz=function(i){let r=i[0]/255,s=i[1]/255,a=i[2]/255;r=r\u003e.04045?((r+.055)/1.055)**2.4:r/12.92,s=s\u003e.04045?((s+.055)/1.055)**2.4:s/12.92,a=a\u003e.04045?((a+.055)/1.055)**2.4:a/12.92;const A=r*.4124+s*.3576+a*.1805,c=r*.2126+s*.7152+a*.0722,l=r*.0193+s*.1192+a*.9505;return[A*100,c*100,l*100]},n.rgb.lab=function(i){const r=n.rgb.xyz(i);let s=r[0],a=r[1],A=r[2];s/=95.047,a/=100,A/=108.883,s=s\u003e.008856?s**(1/3):7.787*s+16/116,a=a\u003e.008856?a**(1/3):7.787*a+16/116,A=A\u003e.008856?A**(1/3):7.787*A+16/116;const c=116*a-16,l=500*(s-a),u=200*(a-A);return[c,l,u]},n.hsl.rgb=function(i){const r=i[0]/360,s=i[1]/100,a=i[2]/100;let A,c,l;if(s===0)return l=a*255,[l,l,l];a\u003c.5?A=a*(1+s):A=a+s-a*s;const u=2*a-A,g=[0,0,0];for(let h=0;h\u003c3;h++)c=r+1/3*-(h-1),c\u003c0\u0026\u0026c++,c\u003e1\u0026\u0026c--,6*c\u003c1?l=u+(A-u)*6*c:2*c\u003c1?l=A:3*c\u003c2?l=u+(A-u)*(2/3-c)*6:l=u,g[h]=l*255;return g},n.hsl.hsv=function(i){const r=i[0];let s=i[1]/100,a=i[2]/100,A=s;const c=Math.max(a,.01);a*=2,s*=a\u003c=1?a:2-a,A*=c\u003c=1?c:2-c;const l=(a+s)/2,u=a===0?2*A/(c+A):2*s/(a+s);return[r,u*100,l*100]},n.hsv.rgb=function(i){const r=i[0]/60,s=i[1]/100;let a=i[2]/100;const A=Math.floor(r)%6,c=r-Math.floor(r),l=255*a*(1-s),u=255*a*(1-s*c),g=255*a*(1-s*(1-c));switch(a*=255,A){case 0:return[a,g,l];case 1:return[u,a,l];case 2:return[l,a,g];case 3:return[l,u,a];case 4:return[g,l,a];case 5:return[a,l,u]}},n.hsv.hsl=function(i){const r=i[0],s=i[1]/100,a=i[2]/100,A=Math.max(a,.01);let c,l;l=(2-s)*a;const u=(2-s)*A;return c=s*A,c/=u\u003c=1?u:2-u,c=c||0,l/=2,[r,c*100,l*100]},n.hwb.rgb=function(i){const r=i[0]/360;let s=i[1]/100,a=i[2]/100;const A=s+a;let c;A\u003e1\u0026\u0026(s/=A,a/=A);const l=Math.floor(6*r),u=1-a;c=6*r-l,(l\u00261)!==0\u0026\u0026(c=1-c);const g=s+c*(u-s);let h,d,p;switch(l){default:case 6:case 0:h=u,d=g,p=s;break;case 1:h=g,d=u,p=s;break;case 2:h=s,d=u,p=g;break;case 3:h=s,d=g,p=u;break;case 4:h=g,d=s,p=u;break;case 5:h=u,d=s,p=g;break}return[h*255,d*255,p*255]},n.cmyk.rgb=function(i){const r=i[0]/100,s=i[1]/100,a=i[2]/100,A=i[3]/100,c=1-Math.min(1,r*(1-A)+A),l=1-Math.min(1,s*(1-A)+A),u=1-Math.min(1,a*(1-A)+A);return[c*255,l*255,u*255]},n.xyz.rgb=function(i){const r=i[0]/100,s=i[1]/100,a=i[2]/100;let A,c,l;return A=r*3.2406+s*-1.5372+a*-.4986,c=r*-.9689+s*1.8758+a*.0415,l=r*.0557+s*-.204+a*1.057,A=A\u003e.0031308?1.055*A**(1/2.4)-.055:A*12.92,c=c\u003e.0031308?1.055*c**(1/2.4)-.055:c*12.92,l=l\u003e.0031308?1.055*l**(1/2.4)-.055:l*12.92,A=Math.min(Math.max(0,A),1),c=Math.min(Math.max(0,c),1),l=Math.min(Math.max(0,l),1),[A*255,c*255,l*255]},n.xyz.lab=function(i){let r=i[0],s=i[1],a=i[2];r/=95.047,s/=100,a/=108.883,r=r\u003e.008856?r**(1/3):7.787*r+16/116,s=s\u003e.008856?s**(1/3):7.787*s+16/116,a=a\u003e.008856?a**(1/3):7.787*a+16/116;const A=116*s-16,c=500*(r-s),l=200*(s-a);return[A,c,l]},n.lab.xyz=function(i){const r=i[0],s=i[1],a=i[2];let A,c,l;c=(r+16)/116,A=s/500+c,l=c-a/200;const u=c**3,g=A**3,h=l**3;return c=u\u003e.008856?u:(c-16/116)/7.787,A=g\u003e.008856?g:(A-16/116)/7.787,l=h\u003e.008856?h:(l-16/116)/7.787,A*=95.047,c*=100,l*=108.883,[A,c,l]},n.lab.lch=function(i){const r=i[0],s=i[1],a=i[2];let A;A=Math.atan2(a,s)*360/2/Math.PI,A\u003c0\u0026\u0026(A+=360);const l=Math.sqrt(s*s+a*a);return[r,l,A]},n.lch.lab=function(i){const r=i[0],s=i[1],A=i[2]/360*2*Math.PI,c=s*Math.cos(A),l=s*Math.sin(A);return[r,c,l]},n.rgb.ansi16=function(i,r=null){const[s,a,A]=i;let c=r===null?n.rgb.hsv(i)[2]:r;if(c=Math.round(c/50),c===0)return 30;let l=30+(Math.round(A/255)\u003c\u003c2|Math.round(a/255)\u003c\u003c1|Math.round(s/255));return c===2\u0026\u0026(l+=60),l},n.hsv.ansi16=function(i){return n.rgb.ansi16(n.hsv.rgb(i),i[2])},n.rgb.ansi256=function(i){const r=i[0],s=i[1],a=i[2];return r===s\u0026\u0026s===a?r\u003c8?16:r\u003e248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(s/255*5)+Math.round(a/255*5)},n.ansi16.rgb=function(i){let r=i%10;if(r===0||r===7)return i\u003e50\u0026\u0026(r+=3.5),r=r/10.5*255,[r,r,r];const s=(~~(i\u003e50)+1)*.5,a=(r\u00261)*s*255,A=(r\u003e\u003e1\u00261)*s*255,c=(r\u003e\u003e2\u00261)*s*255;return[a,A,c]},n.ansi256.rgb=function(i){if(i\u003e=232){const c=(i-232)*10+8;return[c,c,c]}i-=16;let r;const s=Math.floor(i/36)/5*255,a=Math.floor((r=i%36)/6)/5*255,A=r%6/5*255;return[s,a,A]},n.rgb.hex=function(i){const s=(((Math.round(i[0])\u0026255)\u003c\u003c16)+((Math.round(i[1])\u0026255)\u003c\u003c8)+(Math.round(i[2])\u0026255)).toString(16).toUpperCase();return\"000000\".substring(s.length)+s},n.hex.rgb=function(i){const r=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let s=r[0];r[0].length===3\u0026\u0026(s=s.split(\"\").map(u=\u003eu+u).join(\"\"));const a=parseInt(s,16),A=a\u003e\u003e16\u0026255,c=a\u003e\u003e8\u0026255,l=a\u0026255;return[A,c,l]},n.rgb.hcg=function(i){const r=i[0]/255,s=i[1]/255,a=i[2]/255,A=Math.max(Math.max(r,s),a),c=Math.min(Math.min(r,s),a),l=A-c;let u,g;return l\u003c1?u=c/(1-l):u=0,l\u003c=0?g=0:A===r?g=(s-a)/l%6:A===s?g=2+(a-r)/l:g=4+(r-s)/l,g/=6,g%=1,[g*360,l*100,u*100]},n.hsl.hcg=function(i){const r=i[1]/100,s=i[2]/100,a=s\u003c.5?2*r*s:2*r*(1-s);let A=0;return a\u003c1\u0026\u0026(A=(s-.5*a)/(1-a)),[i[0],a*100,A*100]},n.hsv.hcg=function(i){const r=i[1]/100,s=i[2]/100,a=r*s;let A=0;return a\u003c1\u0026\u0026(A=(s-a)/(1-a)),[i[0],a*100,A*100]},n.hcg.rgb=function(i){const r=i[0]/360,s=i[1]/100,a=i[2]/100;if(s===0)return[a*255,a*255,a*255];const A=[0,0,0],c=r%1*6,l=c%1,u=1-l;let g=0;switch(Math.floor(c)){case 0:A[0]=1,A[1]=l,A[2]=0;break;case 1:A[0]=u,A[1]=1,A[2]=0;break;case 2:A[0]=0,A[1]=1,A[2]=l;break;case 3:A[0]=0,A[1]=u,A[2]=1;break;case 4:A[0]=l,A[1]=0,A[2]=1;break;default:A[0]=1,A[1]=0,A[2]=u}return g=(1-s)*a,[(s*A[0]+g)*255,(s*A[1]+g)*255,(s*A[2]+g)*255]},n.hcg.hsv=function(i){const r=i[1]/100,s=i[2]/100,a=r+s*(1-r);let A=0;return a\u003e0\u0026\u0026(A=r/a),[i[0],A*100,a*100]},n.hcg.hsl=function(i){const r=i[1]/100,a=i[2]/100*(1-r)+.5*r;let A=0;return a\u003e0\u0026\u0026a\u003c.5?A=r/(2*a):a\u003e=.5\u0026\u0026a\u003c1\u0026\u0026(A=r/(2*(1-a))),[i[0],A*100,a*100]},n.hcg.hwb=function(i){const r=i[1]/100,s=i[2]/100,a=r+s*(1-r);return[i[0],(a-r)*100,(1-a)*100]},n.hwb.hcg=function(i){const r=i[1]/100,a=1-i[2]/100,A=a-r;let c=0;return A\u003c1\u0026\u0026(c=(a-A)/(1-A)),[i[0],A*100,c*100]},n.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},n.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},n.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},n.gray.hsl=function(i){return[0,0,i[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(i){return[0,100,i[0]]},n.gray.cmyk=function(i){return[0,0,0,i[0]]},n.gray.lab=function(i){return[i[0],0,0]},n.gray.hex=function(i){const r=Math.round(i[0]/100*255)\u0026255,a=((r\u003c\u003c16)+(r\u003c\u003c8)+r).toString(16).toUpperCase();return\"000000\".substring(a.length)+a},n.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},Dje}var Nje,Mgn;function XNi(){if(Mgn)return Nje;Mgn=1;const t=Pgn();function e(){const r={},s=Object.keys(t);for(let a=s.length,A=0;A\u003ca;A++)r[s[A]]={distance:-1,parent:null};return r}function n(r){const s=e(),a=[r];for(s[r].distance=0;a.length;){const A=a.pop(),c=Object.keys(t[A]);for(let l=c.length,u=0;u\u003cl;u++){const g=c[u],h=s[g];h.distance===-1\u0026\u0026(h.distance=s[A].distance+1,h.parent=A,a.unshift(g))}}return s}function o(r,s){return function(a){return s(r(a))}}function i(r,s){const a=[s[r].parent,r];let A=t[s[r].parent][r],c=s[r].parent;for(;s[c].parent;)a.unshift(s[c].parent),A=o(t[s[c].parent][c],A),c=s[c].parent;return A.conversion=a,A}return Nje=function(r){const s=n(r),a={},A=Object.keys(s);for(let c=A.length,l=0;l\u003cc;l++){const u=A[l];s[u].parent!==null\u0026\u0026(a[u]=i(u,s))}return a},Nje}var Rje,Dgn;function ZNi(){if(Dgn)return Rje;Dgn=1;const t=Pgn(),e=XNi(),n={},o=Object.keys(t);function i(s){const a=function(...A){const c=A[0];return c==null?c:(c.length\u003e1\u0026\u0026(A=c),s(A))};return\"conversion\"in s\u0026\u0026(a.conversion=s.conversion),a}function r(s){const a=function(...A){const c=A[0];if(c==null)return c;c.length\u003e1\u0026\u0026(A=c);const l=s(A);if(typeof l==\"object\")for(let u=l.length,g=0;g\u003cu;g++)l[g]=Math.round(l[g]);return l};return\"conversion\"in s\u0026\u0026(a.conversion=s.conversion),a}return o.forEach(s=\u003e{n[s]={},Object.defineProperty(n[s],\"channels\",{value:t[s].channels}),Object.defineProperty(n[s],\"labels\",{value:t[s].labels});const a=e(s);Object.keys(a).forEach(c=\u003e{const l=a[c];n[s][c]=r(l),n[s][c].raw=i(l)})}),Rje=n,Rje}var Tje,Ngn;function eRi(){if(Ngn)return Tje;Ngn=1;const t=$Ni(),e=ZNi(),n=[\"keyword\",\"gray\",\"hex\"],o={};for(const g of Object.keys(e))o[[...e[g].labels].sort().join(\"\")]=g;const i={};function r(g,h){if(!(this instanceof r))return new r(g,h);if(h\u0026\u0026h in n\u0026\u0026(h=null),h\u0026\u0026!(h in e))throw new Error(\"Unknown model: \"+h);let d,p;if(g==null)this.model=\"rgb\",this.color=[0,0,0],this.valpha=1;else if(g instanceof r)this.model=g.model,this.color=[...g.color],this.valpha=g.valpha;else if(typeof g==\"string\"){const m=t.get(g);if(m===null)throw new Error(\"Unable to parse color from string: \"+g);this.model=m.model,p=e[this.model].channels,this.color=m.value.slice(0,p),this.valpha=typeof m.value[p]==\"number\"?m.value[p]:1}else if(g.length\u003e0){this.model=h||\"rgb\",p=e[this.model].channels;const m=Array.prototype.slice.call(g,0,p);this.color=u(m,p),this.valpha=typeof g[p]==\"number\"?g[p]:1}else if(typeof g==\"number\")this.model=\"rgb\",this.color=[g\u003e\u003e16\u0026255,g\u003e\u003e8\u0026255,g\u0026255],this.valpha=1;else{this.valpha=1;const m=Object.keys(g);\"alpha\"in g\u0026\u0026(m.splice(m.indexOf(\"alpha\"),1),this.valpha=typeof g.alpha==\"number\"?g.alpha:0);const _=m.sort().join(\"\");if(!(_ in o))throw new Error(\"Unable to parse color from object: \"+JSON.stringify(g));this.model=o[_];const{labels:f}=e[this.model],I=[];for(d=0;d\u003cf.length;d++)I.push(g[f[d]]);this.color=u(I)}if(i[this.model])for(p=e[this.model].channels,d=0;d\u003cp;d++){const m=i[this.model][d];m\u0026\u0026(this.color[d]=m(this.color[d]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze\u0026\u0026Object.freeze(this)}r.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(g){let h=this.model in t.to?this:this.rgb();h=h.round(typeof g==\"number\"?g:1);const d=h.valpha===1?h.color:[...h.color,this.valpha];return t.to[h.model](d)},percentString(g){const h=this.rgb().round(typeof g==\"number\"?g:1),d=h.valpha===1?h.color:[...h.color,this.valpha];return t.to.rgb.percent(d)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const g={},{channels:h}=e[this.model],{labels:d}=e[this.model];for(let p=0;p\u003ch;p++)g[d[p]]=this.color[p];return this.valpha!==1\u0026\u0026(g.alpha=this.valpha),g},unitArray(){const g=this.rgb().color;return g[0]/=255,g[1]/=255,g[2]/=255,this.valpha!==1\u0026\u0026g.push(this.valpha),g},unitObject(){const g=this.rgb().object();return g.r/=255,g.g/=255,g.b/=255,this.valpha!==1\u0026\u0026(g.alpha=this.valpha),g},round(g){return g=Math.max(g||0,0),new r([...this.color.map(a(g)),this.valpha],this.model)},alpha(g){return g!==void 0?new r([...this.color,Math.max(0,Math.min(1,g))],this.model):this.valpha},red:A(\"rgb\",0,c(255)),green:A(\"rgb\",1,c(255)),blue:A(\"rgb\",2,c(255)),hue:A([\"hsl\",\"hsv\",\"hsl\",\"hwb\",\"hcg\"],0,g=\u003e(g%360+360)%360),saturationl:A(\"hsl\",1,c(100)),lightness:A(\"hsl\",2,c(100)),saturationv:A(\"hsv\",1,c(100)),value:A(\"hsv\",2,c(100)),chroma:A(\"hcg\",1,c(100)),gray:A(\"hcg\",2,c(100)),white:A(\"hwb\",1,c(100)),wblack:A(\"hwb\",2,c(100)),cyan:A(\"cmyk\",0,c(100)),magenta:A(\"cmyk\",1,c(100)),yellow:A(\"cmyk\",2,c(100)),black:A(\"cmyk\",3,c(100)),x:A(\"xyz\",0,c(95.047)),y:A(\"xyz\",1,c(100)),z:A(\"xyz\",2,c(108.833)),l:A(\"lab\",0,c(100)),a:A(\"lab\",1),b:A(\"lab\",2),keyword(g){return g!==void 0?new r(g):e[this.model].keyword(this.color)},hex(g){return g!==void 0?new r(g):t.to.hex(this.rgb().round().color)},hexa(g){if(g!==void 0)return new r(g);const h=this.rgb().round().color;let d=Math.round(this.valpha*255).toString(16).toUpperCase();return d.length===1\u0026\u0026(d=\"0\"+d),t.to.hex(h)+d},rgbNumber(){const g=this.rgb().color;return(g[0]\u0026255)\u003c\u003c16|(g[1]\u0026255)\u003c\u003c8|g[2]\u0026255},luminosity(){const g=this.rgb().color,h=[];for(const[d,p]of g.entries()){const m=p/255;h[d]=m\u003c=.04045?m/12.92:((m+.055)/1.055)**2.4}return .2126*h[0]+.7152*h[1]+.0722*h[2]},contrast(g){const h=this.luminosity(),d=g.luminosity();return h\u003ed?(h+.05)/(d+.05):(d+.05)/(h+.05)},level(g){const h=this.contrast(g);return h\u003e=7?\"AAA\":h\u003e=4.5?\"AA\":\"\"},isDark(){const g=this.rgb().color;return(g[0]*2126+g[1]*7152+g[2]*722)/1e4\u003c128},isLight(){return!this.isDark()},negate(){const g=this.rgb();for(let h=0;h\u003c3;h++)g.color[h]=255-g.color[h];return g},lighten(g){const h=this.hsl();return h.color[2]+=h.color[2]*g,h},darken(g){const h=this.hsl();return h.color[2]-=h.color[2]*g,h},saturate(g){const h=this.hsl();return h.color[1]+=h.color[1]*g,h},desaturate(g){const h=this.hsl();return h.color[1]-=h.color[1]*g,h},whiten(g){const h=this.hwb();return h.color[1]+=h.color[1]*g,h},blacken(g){const h=this.hwb();return h.color[2]+=h.color[2]*g,h},grayscale(){const g=this.rgb().color,h=g[0]*.3+g[1]*.59+g[2]*.11;return r.rgb(h,h,h)},fade(g){return this.alpha(this.valpha-this.valpha*g)},opaquer(g){return this.alpha(this.valpha+this.valpha*g)},rotate(g){const h=this.hsl();let d=h.color[0];return d=(d+g)%360,d=d\u003c0?360+d:d,h.color[0]=d,h},mix(g,h){if(!g||!g.rgb)throw new Error('Argument to \"mix\" was not a Color instance, but rather an instance of '+typeof g);const d=g.rgb(),p=this.rgb(),m=h===void 0?.5:h,_=2*m-1,f=d.alpha()-p.alpha(),I=((_*f===-1?_:(_+f)/(1+_*f))+1)/2,C=1-I;return r.rgb(I*d.red()+C*p.red(),I*d.green()+C*p.green(),I*d.blue()+C*p.blue(),d.alpha()*m+p.alpha()*(1-m))}};for(const g of Object.keys(e)){if(n.includes(g))continue;const{channels:h}=e[g];r.prototype[g]=function(...d){return this.model===g?new r(this):d.length\u003e0?new r(d,g):new r([...l(e[this.model][g].raw(this.color)),this.valpha],g)},r[g]=function(...d){let p=d[0];return typeof p==\"number\"\u0026\u0026(p=u(d,h)),new r(p,g)}}function s(g,h){return Number(g.toFixed(h))}function a(g){return function(h){return s(h,g)}}function A(g,h,d){g=Array.isArray(g)?g:[g];for(const p of g)(i[p]||(i[p]=[]))[h]=d;return g=g[0],function(p){let m;return p!==void 0?(d\u0026\u0026(p=d(p)),m=this[g](),m.color[h]=p,m):(m=this[g]().color[h],d\u0026\u0026(m=d(m)),m)}}function c(g){return function(h){return Math.max(0,Math.min(g,h))}}function l(g){return Array.isArray(g)?g:[g]}function u(g,h){for(let d=0;d\u003ch;d++)typeof g[d]!=\"number\"\u0026\u0026(g[d]=0);return g}return Tje=r,Tje}var tRi=eRi();const Ka=_y(tRi);function nRi(t){if(t.sheet)return t.sheet;for(var e=0;e\u003cdocument.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function oRi(t){var e=document.createElement(\"style\");return e.setAttribute(\"data-emotion\",t.key),t.nonce!==void 0\u0026\u0026e.setAttribute(\"nonce\",t.nonce),e.appendChild(document.createTextNode(\"\")),e.setAttribute(\"data-s\",\"\"),e}var iRi=(function(){function t(n){var o=this;this._insertTag=function(i){var r;o.tags.length===0?o.insertionPoint?r=o.insertionPoint.nextSibling:o.prepend?r=o.container.firstChild:r=o.before:r=o.tags[o.tags.length-1].nextSibling,o.container.insertBefore(i,r),o.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(o){o.forEach(this._insertTag)},e.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0\u0026\u0026this._insertTag(oRi(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var r=nRi(i);try{r.insertRule(o,r.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(o));this.ctr++},e.flush=function(){this.tags.forEach(function(o){var i;return(i=o.parentNode)==null?void 0:i.removeChild(o)}),this.tags=[],this.ctr=0},t})(),RC=\"-ms-\",Y_e=\"-moz-\",f0=\"-webkit-\",Rgn=\"comm\",kje=\"rule\",Fje=\"decl\",rRi=\"@import\",Tgn=\"@keyframes\",sRi=\"@layer\",aRi=Math.abs,U_e=String.fromCharCode,ARi=Object.assign;function cRi(t,e){return _I(t,0)^45?(((e\u003c\u003c2^_I(t,0))\u003c\u003c2^_I(t,1))\u003c\u003c2^_I(t,2))\u003c\u003c2^_I(t,3):0}function kgn(t){return t.trim()}function lRi(t,e){return(t=e.exec(t))?t[0]:t}function I0(t,e,n){return t.replace(e,n)}function Lje(t,e){return t.indexOf(e)}function _I(t,e){return t.charCodeAt(e)|0}function $Z(t,e,n){return t.slice(e,n)}function z6(t){return t.length}function Hje(t){return t.length}function K_e(t,e){return e.push(t),t}function uRi(t,e){return t.map(e).join(\"\")}var V_e=1,NU=1,Fgn=0,Xx=0,l_=0,RU=\"\";function z_e(t,e,n,o,i,r,s){return{value:t,root:e,parent:n,type:o,props:i,children:r,line:V_e,column:NU,length:s,return:\"\"}}function qZ(t,e){return ARi(z_e(\"\",null,null,\"\",null,null,0),t,{length:-t.length},e)}function gRi(){return l_}function dRi(){return l_=Xx\u003e0?_I(RU,--Xx):0,NU--,l_===10\u0026\u0026(NU=1,V_e--),l_}function RE(){return l_=Xx\u003cFgn?_I(RU,Xx++):0,NU++,l_===10\u0026\u0026(NU=1,V_e++),l_}function J6(){return _I(RU,Xx)}function J_e(){return Xx}function XZ(t,e){return $Z(RU,t,e)}function ZZ(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Lgn(t){return V_e=NU=1,Fgn=z6(RU=t),Xx=0,[]}function Hgn(t){return RU=\"\",t}function W_e(t){return kgn(XZ(Xx-1,Oje(t===91?t+2:t===40?t+1:t)))}function hRi(t){for(;(l_=J6())\u0026\u0026l_\u003c33;)RE();return ZZ(t)\u003e2||ZZ(l_)\u003e3?\"\":\" \"}function pRi(t,e){for(;--e\u0026\u0026RE()\u0026\u0026!(l_\u003c48||l_\u003e102||l_\u003e57\u0026\u0026l_\u003c65||l_\u003e70\u0026\u0026l_\u003c97););return XZ(t,J_e()+(e\u003c6\u0026\u0026J6()==32\u0026\u0026RE()==32))}function Oje(t){for(;RE();)switch(l_){case t:return Xx;case 34:case 39:t!==34\u0026\u0026t!==39\u0026\u0026Oje(l_);break;case 40:t===41\u0026\u0026Oje(t);break;case 92:RE();break}return Xx}function mRi(t,e){for(;RE()\u0026\u0026t+l_!==57;)if(t+l_===84\u0026\u0026J6()===47)break;return\"/*\"+XZ(e,Xx-1)+\"*\"+U_e(t===47?t:RE())}function _Ri(t){for(;!ZZ(J6());)RE();return XZ(t,Xx)}function fRi(t){return Hgn(j_e(\"\",null,null,null,[\"\"],t=Lgn(t),0,[0],t))}function j_e(t,e,n,o,i,r,s,a,A){for(var c=0,l=0,u=s,g=0,h=0,d=0,p=1,m=1,_=1,f=0,I=\"\",C=i,y=r,x=o,E=I;m;)switch(d=f,f=RE()){case 40:if(d!=108\u0026\u0026_I(E,u-1)==58){Lje(E+=I0(W_e(f),\"\u0026\",\"\u0026\\f\"),\"\u0026\\f\")!=-1\u0026\u0026(_=-1);break}case 34:case 39:case 91:E+=W_e(f);break;case 9:case 10:case 13:case 32:E+=hRi(d);break;case 92:E+=pRi(J_e()-1,7);continue;case 47:switch(J6()){case 42:case 47:K_e(IRi(mRi(RE(),J_e()),e,n),A);break;default:E+=\"/\"}break;case 123*p:a[c++]=z6(E)*_;case 125*p:case 59:case 0:switch(f){case 0:case 125:m=0;case 59+l:_==-1\u0026\u0026(E=I0(E,/\\f/g,\"\")),h\u003e0\u0026\u0026z6(E)-u\u0026\u0026K_e(h\u003e32?Ggn(E+\";\",o,n,u-1):Ggn(I0(E,\" \",\"\")+\";\",o,n,u-2),A);break;case 59:E+=\";\";default:if(K_e(x=Ogn(E,e,n,c,l,i,a,I,C=[],y=[],u),r),f===123)if(l===0)j_e(E,e,x,x,C,r,u,a,y);else switch(g===99\u0026\u0026_I(E,3)===110?100:g){case 100:case 108:case 109:case 115:j_e(t,x,x,o\u0026\u0026K_e(Ogn(t,x,x,0,0,i,a,I,i,C=[],u),y),i,y,u,a,o?C:y);break;default:j_e(E,x,x,x,[\"\"],y,0,a,y)}}c=l=h=0,p=_=1,I=E=\"\",u=s;break;case 58:u=1+z6(E),h=d;default:if(p\u003c1){if(f==123)--p;else if(f==125\u0026\u0026p++==0\u0026\u0026dRi()==125)continue}switch(E+=U_e(f),f*p){case 38:_=l\u003e0?1:(E+=\"\\f\",-1);break;case 44:a[c++]=(z6(E)-1)*_,_=1;break;case 64:J6()===45\u0026\u0026(E+=W_e(RE())),g=J6(),l=u=z6(I=E+=_Ri(J_e())),f++;break;case 45:d===45\u0026\u0026z6(E)==2\u0026\u0026(p=0)}}return r}function Ogn(t,e,n,o,i,r,s,a,A,c,l){for(var u=i-1,g=i===0?r:[\"\"],h=Hje(g),d=0,p=0,m=0;d\u003co;++d)for(var _=0,f=$Z(t,u+1,u=aRi(p=s[d])),I=t;_\u003ch;++_)(I=kgn(p\u003e0?g[_]+\" \"+f:I0(f,/\u0026\\f/g,g[_])))\u0026\u0026(A[m++]=I);return z_e(t,e,n,i===0?kje:a,A,c,l)}function IRi(t,e,n){return z_e(t,e,n,Rgn,U_e(gRi()),$Z(t,2,-2),0)}function Ggn(t,e,n,o){return z_e(t,e,n,Fje,$Z(t,0,o),$Z(t,o+1,-1),o)}function TU(t,e){for(var n=\"\",o=Hje(t),i=0;i\u003co;i++)n+=e(t[i],i,t,e)||\"\";return n}function CRi(t,e,n,o){switch(t.type){case sRi:if(t.children.length)break;case rRi:case Fje:return t.return=t.return||t.value;case Rgn:return\"\";case Tgn:return t.return=t.value+\"{\"+TU(t.children,o)+\"}\";case kje:t.value=t.props.join(\",\")}return z6(n=TU(t.children,o))?t.return=t.value+\"{\"+n+\"}\":\"\"}function yRi(t){var e=Hje(t);return function(n,o,i,r){for(var s=\"\",a=0;a\u003ce;a++)s+=t[a](n,o,i,r)||\"\";return s}}function xRi(t){return function(e){e.root||(e=e.return)\u0026\u0026t(e)}}function ERi(t){var e=Object.create(null);return function(n){return e[n]===void 0\u0026\u0026(e[n]=t(n)),e[n]}}var BRi=function(e,n,o){for(var i=0,r=0;i=r,r=J6(),i===38\u0026\u0026r===12\u0026\u0026(n[o]=1),!ZZ(r);)RE();return XZ(e,Xx)},bRi=function(e,n){var o=-1,i=44;do switch(ZZ(i)){case 0:i===38\u0026\u0026J6()===12\u0026\u0026(n[o]=1),e[o]+=BRi(Xx-1,n,o);break;case 2:e[o]+=W_e(i);break;case 4:if(i===44){e[++o]=J6()===58?\"\u0026\\f\":\"\",n[o]=e[o].length;break}default:e[o]+=U_e(i)}while(i=RE());return e},SRi=function(e,n){return Hgn(bRi(Lgn(e),n))},Ygn=new WeakMap,QRi=function(e){if(!(e.type!==\"rule\"||!e.parent||e.length\u003c1)){for(var n=e.value,o=e.parent,i=e.column===o.column\u0026\u0026e.line===o.line;o.type!==\"rule\";)if(o=o.parent,!o)return;if(!(e.props.length===1\u0026\u0026n.charCodeAt(0)!==58\u0026\u0026!Ygn.get(o))\u0026\u0026!i){Ygn.set(e,!0);for(var r=[],s=SRi(n,r),a=o.props,A=0,c=0;A\u003cs.length;A++)for(var l=0;l\u003ca.length;l++,c++)e.props[c]=r[A]?s[A].replace(/\u0026\\f/g,a[l]):a[l]+\" \"+s[A]}}},vRi=function(e){if(e.type===\"decl\"){var n=e.value;n.charCodeAt(0)===108\u0026\u0026n.charCodeAt(2)===98\u0026\u0026(e.return=\"\",e.value=\"\")}};function Ugn(t,e){switch(cRi(t,e)){case 5103:return f0+\"print-\"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return f0+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return f0+t+Y_e+t+RC+t+t;case 6828:case 4268:return f0+t+RC+t+t;case 6165:return f0+t+RC+\"flex-\"+t+t;case 5187:return f0+t+I0(t,/(\\w+).+(:[^]+)/,f0+\"box-$1$2\"+RC+\"flex-$1$2\")+t;case 5443:return f0+t+RC+\"flex-item-\"+I0(t,/flex-|-self/,\"\")+t;case 4675:return f0+t+RC+\"flex-line-pack\"+I0(t,/align-content|flex-|-self/,\"\")+t;case 5548:return f0+t+RC+I0(t,\"shrink\",\"negative\")+t;case 5292:return f0+t+RC+I0(t,\"basis\",\"preferred-size\")+t;case 6060:return f0+\"box-\"+I0(t,\"-grow\",\"\")+f0+t+RC+I0(t,\"grow\",\"positive\")+t;case 4554:return f0+I0(t,/([^-])(transform)/g,\"$1\"+f0+\"$2\")+t;case 6187:return I0(I0(I0(t,/(zoom-|grab)/,f0+\"$1\"),/(image-set)/,f0+\"$1\"),t,\"\")+t;case 5495:case 3959:return I0(t,/(image-set\\([^]*)/,f0+\"$1 dist/standalone.min.js - muse/esp32-eink-display - tscircuit $1\");case 4968:return I0(I0(t,/(.+:)(flex-)?(.*)/,f0+\"box-pack:$3\"+RC+\"flex-pack:$3\"),/s.+-b[^;]+/,\"justify\")+f0+t+t;case 4095:case 3583:case 4068:case 2532:return I0(t,/(.+)-inline(.+)/,f0+\"$1$2\")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(z6(t)-1-e\u003e6)switch(_I(t,e+1)){case 109:if(_I(t,e+4)!==45)break;case 102:return I0(t,/(.+:)(.+)-([^]+)/,\"$1\"+f0+\"$2-$3$1\"+Y_e+(_I(t,e+3)==108?\"$3\":\"$2-$3\"))+t;case 115:return~Lje(t,\"stretch\")?Ugn(I0(t,\"stretch\",\"fill-available\"),e)+t:t}break;case 4949:if(_I(t,e+1)!==115)break;case 6444:switch(_I(t,z6(t)-3-(~Lje(t,\"!important\")\u0026\u002610))){case 107:return I0(t,\":\",\":\"+f0)+t;case 101:return I0(t,/(.+:)([^;!]+)(;|!.+)?/,\"$1\"+f0+(_I(t,14)===45?\"inline-\":\"\")+\"box$3$1\"+f0+\"$2$3$1\"+RC+\"$2box$3\")+t}break;case 5936:switch(_I(t,e+11)){case 114:return f0+t+RC+I0(t,/[svh]\\w+-[tblr]{2}/,\"tb\")+t;case 108:return f0+t+RC+I0(t,/[svh]\\w+-[tblr]{2}/,\"tb-rl\")+t;case 45:return f0+t+RC+I0(t,/[svh]\\w+-[tblr]{2}/,\"lr\")+t}return f0+t+RC+t+t}return t}var wRi=function(e,n,o,i){if(e.length\u003e-1\u0026\u0026!e.return)switch(e.type){case Fje:e.return=Ugn(e.value,e.length);break;case Tgn:return TU([qZ(e,{value:I0(e.value,\"@\",\"@\"+f0)})],i);case kje:if(e.length)return uRi(e.props,function(r){switch(lRi(r,/(::plac\\w+|:read-\\w+)/)){case\":read-only\":case\":read-write\":return TU([qZ(e,{props:[I0(r,/:(read-\\w+)/,\":\"+Y_e+\"$1\")]})],i);case\"::placeholder\":return TU([qZ(e,{props:[I0(r,/:(plac\\w+)/,\":\"+f0+\"input-$1\")]}),qZ(e,{props:[I0(r,/:(plac\\w+)/,\":\"+Y_e+\"$1\")]}),qZ(e,{props:[I0(r,/:(plac\\w+)/,RC+\"input-$1\")]})],i)}return\"\"})}},PRi=[wRi],MRi=function(e){var n=e.key;if(n===\"css\"){var o=document.querySelectorAll(\"style[data-emotion]:not([data-s])\");Array.prototype.forEach.call(o,function(p){var m=p.getAttribute(\"data-emotion\");m.indexOf(\" \")!==-1\u0026\u0026(document.head.appendChild(p),p.setAttribute(\"data-s\",\"\"))})}var i=e.stylisPlugins||PRi,r={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^=\"'+n+' \"]'),function(p){for(var m=p.getAttribute(\"data-emotion\").split(\" \"),_=1;_\u003cm.length;_++)r[m[_]]=!0;a.push(p)});var A,c=[QRi,vRi];{var l,u=[CRi,xRi(function(p){l.insert(p)})],g=yRi(c.concat(i,u)),h=function(m){return TU(fRi(m),g)};A=function(m,_,f,I){l=f,h(m?m+\"{\"+_.styles+\"}\":_.styles),I\u0026\u0026(d.inserted[_.name]=!0)}}var d={key:n,sheet:new iRi({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:r,registered:{},insert:A};return d.sheet.hydrate(a),d};function DRi(t){for(var e=0,n,o=0,i=t.length;i\u003e=4;++o,i-=4)n=t.charCodeAt(o)\u0026255|(t.charCodeAt(++o)\u0026255)\u003c\u003c8|(t.charCodeAt(++o)\u0026255)\u003c\u003c16|(t.charCodeAt(++o)\u0026255)\u003c\u003c24,n=(n\u002665535)*1540483477+((n\u003e\u003e\u003e16)*59797\u003c\u003c16),n^=n\u003e\u003e\u003e24,e=(n\u002665535)*1540483477+((n\u003e\u003e\u003e16)*59797\u003c\u003c16)^(e\u002665535)*1540483477+((e\u003e\u003e\u003e16)*59797\u003c\u003c16);switch(i){case 3:e^=(t.charCodeAt(o+2)\u0026255)\u003c\u003c16;case 2:e^=(t.charCodeAt(o+1)\u0026255)\u003c\u003c8;case 1:e^=t.charCodeAt(o)\u0026255,e=(e\u002665535)*1540483477+((e\u003e\u003e\u003e16)*59797\u003c\u003c16)}return e^=e\u003e\u003e\u003e13,e=(e\u002665535)*1540483477+((e\u003e\u003e\u003e16)*59797\u003c\u003c16),((e^e\u003e\u003e\u003e15)\u003e\u003e\u003e0).toString(36)}var NRi={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},RRi=/[A-Z]|^ms/g,TRi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Kgn=function(e){return e.charCodeAt(1)===45},Vgn=function(e){return e!=null\u0026\u0026typeof e!=\"boolean\"},Gje=ERi(function(t){return Kgn(t)?t:t.replace(RRi,\"-$\u0026\").toLowerCase()}),zgn=function(e,n){switch(e){case\"animation\":case\"animationName\":if(typeof n==\"string\")return n.replace(TRi,function(o,i,r){return TP={name:i,styles:r,next:TP},i})}return NRi[e]!==1\u0026\u0026!Kgn(e)\u0026\u0026typeof n==\"number\"\u0026\u0026n!==0?n+\"px\":n};function $_e(t,e,n){if(n==null)return\"\";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case\"boolean\":return\"\";case\"object\":{var i=n;if(i.anim===1)return TP={name:i.name,styles:i.styles,next:TP},i.name;var r=n;if(r.styles!==void 0){var s=r.next;if(s!==void 0)for(;s!==void 0;)TP={name:s.name,styles:s.styles,next:TP},s=s.next;var a=r.styles+\";\";return a}return kRi(t,e,n)}}var A=n;if(e==null)return A;var c=e[A];return c!==void 0?c:A}function kRi(t,e,n){var o=\"\";if(Array.isArray(n))for(var i=0;i\u003cn.length;i++)o+=$_e(t,e,n[i])+\";\";else for(var r in n){var s=n[r];if(typeof s!=\"object\"){var a=s;e!=null\u0026\u0026e[a]!==void 0?o+=r+\"{\"+e[a]+\"}\":Vgn(a)\u0026\u0026(o+=Gje(r)+\":\"+zgn(r,a)+\";\")}else if(Array.isArray(s)\u0026\u0026typeof s[0]==\"string\"\u0026\u0026(e==null||e[s[0]]===void 0))for(var A=0;A\u003cs.length;A++)Vgn(s[A])\u0026\u0026(o+=Gje(r)+\":\"+zgn(r,s[A])+\";\");else{var c=$_e(t,e,s);switch(r){case\"animation\":case\"animationName\":{o+=Gje(r)+\":\"+c+\";\";break}default:o+=r+\"{\"+c+\"}\"}}}return o}var Jgn=/label:\\s*([^\\s;{]+)\\s*(;|$)/g,TP;function Yje(t,e,n){if(t.length===1\u0026\u0026typeof t[0]==\"object\"\u0026\u0026t[0]!==null\u0026\u0026t[0].styles!==void 0)return t[0];var o=!0,i=\"\";TP=void 0;var r=t[0];if(r==null||r.raw===void 0)o=!1,i+=$_e(n,e,r);else{var s=r;i+=s[0]}for(var a=1;a\u003ct.length;a++)if(i+=$_e(n,e,t[a]),o){var A=r;i+=A[a]}Jgn.lastIndex=0;for(var c=\"\",l;(l=Jgn.exec(i))!==null;)c+=\"-\"+l[1];var u=DRi(i)+c;return{name:u,styles:i,next:TP}}function Wgn(t,e,n){var o=\"\";return n.split(\" \").forEach(function(i){t[i]!==void 0?e.push(t[i]+\";\"):i\u0026\u0026(o+=i+\" \")}),o}var FRi=function(e,n,o){var i=e.key+\"-\"+n.name;e.registered[i]===void 0\u0026\u0026(e.registered[i]=n.styles)},LRi=function(e,n,o){FRi(e,n);var i=e.key+\"-\"+n.name;if(e.inserted[n.name]===void 0){var r=n;do e.insert(n===r?\".\"+i:\"\",r,e.sheet,!0),r=r.next;while(r!==void 0)}};function jgn(t,e){if(t.inserted[e.name]===void 0)return t.insert(\"\",e,t.sheet,!0)}function $gn(t,e,n){var o=[],i=Wgn(t,o,n);return o.length\u003c2?n:i+e(o)}var HRi=function(e){var n=MRi(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var o=function(){for(var A=arguments.length,c=new Array(A),l=0;l\u003cA;l++)c[l]=arguments[l];var u=Yje(c,n.registered,void 0);return LRi(n,u),n.key+\"-\"+u.name},i=function(){for(var A=arguments.length,c=new Array(A),l=0;l\u003cA;l++)c[l]=arguments[l];var u=Yje(c,n.registered),g=\"animation-\"+u.name;return jgn(n,{name:u.name,styles:\"@keyframes \"+g+\"{\"+u.styles+\"}\"}),g},r=function(){for(var A=arguments.length,c=new Array(A),l=0;l\u003cA;l++)c[l]=arguments[l];var u=Yje(c,n.registered);jgn(n,u)},s=function(){for(var A=arguments.length,c=new Array(A),l=0;l\u003cA;l++)c[l]=arguments[l];return $gn(n.registered,o,ORi(c))};return{css:o,cx:s,injectGlobal:r,keyframes:i,hydrate:function(A){A.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Wgn.bind(null,n.registered),merge:$gn.bind(null,n.registered,o)}},ORi=function t(e){for(var n=\"\",o=0;o\u003ce.length;o++){var i=e[o];if(i!=null){var r=void 0;switch(typeof i){case\"boolean\":break;case\"object\":{if(Array.isArray(i))r=t(i);else{r=\"\";for(var s in i)i[s]\u0026\u0026s\u0026\u0026(r\u0026\u0026(r+=\" \"),r+=s)}break}default:r=i}r\u0026\u0026(n\u0026\u0026(n+=\" \"),n+=r)}}return n},GRi=HRi({key:\"css\"}),kU=GRi.css,YRi=Object.create,Uje=Object.defineProperty,URi=Object.getOwnPropertyDescriptor,Kje=Object.getOwnPropertyNames,KRi=Object.getPrototypeOf,VRi=Object.prototype.hasOwnProperty,zRi=(t,e)=\u003efunction(){return t\u0026\u0026(e=(0,t[Kje(t)[0]])(t=0)),e},Vje=(t,e)=\u003efunction(){return e||(0,t[Kje(t)[0]])((e={exports:{}}).exports,e),e.exports},JRi=(t,e)=\u003e{for(var n in e)Uje(t,n,{get:e[n],enumerable:!0})},WRi=(t,e,n,o)=\u003e{if(e\u0026\u0026typeof e==\"object\"||typeof e==\"function\")for(let i of Kje(e))!VRi.call(t,i)\u0026\u0026i!==n\u0026\u0026Uje(t,i,{get:()=\u003ee[i],enumerable:!(o=URi(e,i))||o.enumerable});return t},qgn=(t,e,n)=\u003e(n=t!=null?YRi(KRi(t)):{},WRi(e||!t||!t.__esModule?Uje(n,\"default\",{value:t,enumerable:!0}):n,t)),jRi=Vje({\"node_modules/toggle-selection/index.js\"(t,e){e.exports=function(){var n=document.getSelection();if(!n.rangeCount)return function(){};for(var o=document.activeElement,i=[],r=0;r\u003cn.rangeCount;r++)i.push(n.getRangeAt(r));switch(o.tagName.toUpperCase()){case\"INPUT\":case\"TEXTAREA\":o.blur();break;default:o=null;break}return n.removeAllRanges(),function(){n.type===\"Caret\"\u0026\u0026n.removeAllRanges(),n.rangeCount||i.forEach(function(s){n.addRange(s)}),o\u0026\u0026o.focus()}}}}),$Ri=Vje({\"node_modules/copy-to-clipboard/index.js\"(t,e){var n=jRi(),o={\"text/plain\":\"Text\",\"text/html\":\"Url\",default:\"Text\"},i=\"Copy to clipboard: #{key}, Enter\";function r(a){var A=(/mac os x/i.test(navigator.userAgent)?\"⌘\":\"Ctrl\")+\"+C\";return a.replace(/#{\\s*key\\s*}/g,A)}function s(a,A){var c,l,u,g,h,d,p=!1;A||(A={}),c=A.debug||!1;try{u=n(),g=document.createRange(),h=document.getSelection(),d=document.createElement(\"span\"),d.textContent=a,d.ariaHidden=\"true\",d.style.all=\"unset\",d.style.position=\"fixed\",d.style.top=0,d.style.clip=\"rect(0, 0, 0, 0)\",d.style.whiteSpace=\"pre\",d.style.webkitUserSelect=\"text\",d.style.MozUserSelect=\"text\",d.style.msUserSelect=\"text\",d.style.userSelect=\"text\",d.addEventListener(\"copy\",function(_){if(_.stopPropagation(),A.format)if(_.preventDefault(),typeof _.clipboardData\u003e\"u\"){c\u0026\u0026console.warn(\"unable to use e.clipboardData\"),c\u0026\u0026console.warn(\"trying IE specific stuff\"),window.clipboardData.clearData();var f=o[A.format]||o.default;window.clipboardData.setData(f,a)}else _.clipboardData.clearData(),_.clipboardData.setData(A.format,a);A.onCopy\u0026\u0026(_.preventDefault(),A.onCopy(_.clipboardData))}),document.body.appendChild(d),g.selectNodeContents(d),h.addRange(g);var m=document.execCommand(\"copy\");if(!m)throw new Error(\"copy command was unsuccessful\");p=!0}catch(_){c\u0026\u0026console.error(\"unable to copy using execCommand: \",_),c\u0026\u0026console.warn(\"trying IE specific stuff\");try{window.clipboardData.setData(A.format||\"text\",a),A.onCopy\u0026\u0026A.onCopy(window.clipboardData),p=!0}catch(f){c\u0026\u0026console.error(\"unable to copy using clipboardData: \",f),c\u0026\u0026console.error(\"falling back to prompt\"),l=r(\"message\"in A?A.message:i),window.prompt(l,a)}}finally{h\u0026\u0026(typeof h.removeRange==\"function\"?h.removeRange(g):h.removeAllRanges()),d\u0026\u0026document.body.removeChild(d),u()}return p}e.exports=s}}),Xgn={};JRi(Xgn,{default:()=\u003eqRi});function qRi(){const t=URL.createObjectURL(new Blob([\"\\\"use strict\\\";(()=\u003e{var _0=Object.defineProperty;var M0=(y,x,e)=\u003ex in y?_0(y,x,{enumerable:!0,configurable:!0,writable:!0,value:e}):y[x]=e;var M=(y,x,e)=\u003eM0(y,typeof x!=\\\"symbol\\\"?x+\\\"\\\":x,e);function V(y,x,e=2){let t=x\u0026\u0026x.length,r=t?x[0]*e:y.length,n=e0(y,0,r,e,!0),o=[];if(!n||n.next===n.prev)return o;let i,a,c;if(t\u0026\u0026(n=R0(y,x,n,e)),y.length\u003e80*e){i=y[0],a=y[1];let d=i,f=a;for(let l=e;l\u003cr;l+=e){let p=y[l],s=y[l+1];p\u003ci\u0026\u0026(i=p),s\u003ca\u0026\u0026(a=s),p\u003ed\u0026\u0026(d=p),s\u003ef\u0026\u0026(f=s)}c=Math.max(d-i,f-a),c=c!==0?32767/c:0}return N(n,o,e,i,a,c,0),o}function e0(y,x,e,t,r){let n;if(r===A0(y,x,e,t)\u003e0)for(let o=x;o\u003ce;o+=t)n=x0(o/t|0,y[o],y[o+1],n);else for(let o=e-t;o\u003e=x;o-=t)n=x0(o/t|0,y[o],y[o+1],n);return n\u0026\u0026U(n,n.next)\u0026\u0026(A(n),n=n.next),n}function I(y,x){if(!y)return y;x||(x=y);let e=y,t;do if(t=!1,!e.steiner\u0026\u0026(U(e,e.next)||v(e.prev,e,e.next)===0)){if(A(e),e=x=e.prev,e===e.next)break;t=!0}else e=e.next;while(t||e!==x);return x}function N(y,x,e,t,r,n,o){if(!y)return;!o\u0026\u0026n\u0026\u0026E0(y,t,r,n);let i=y;for(;y.prev!==y.next;){let a=y.prev,c=y.next;if(n?b0(y,t,r,n):v0(y)){x.push(a.i,y.i,c.i),A(y),y=c.next,i=c.next;continue}if(y=c,y===i){o?o===1?(y=w0(I(y),x),N(y,x,e,t,r,n,2)):o===2\u0026\u0026P0(y,x,e,t,r,n):N(I(y),x,e,t,r,n,1);break}}}function v0(y){let x=y.prev,e=y,t=y.next;if(v(x,e,t)\u003e=0)return!1;let r=x.x,n=e.x,o=t.x,i=x.y,a=e.y,c=t.y,d=Math.min(r,n,o),f=Math.min(i,a,c),l=Math.max(r,n,o),p=Math.max(i,a,c),s=t.next;for(;s!==x;){if(s.x\u003e=d\u0026\u0026s.x\u003c=l\u0026\u0026s.y\u003e=f\u0026\u0026s.y\u003c=p\u0026\u0026F(r,i,n,a,o,c,s.x,s.y)\u0026\u0026v(s.prev,s,s.next)\u003e=0)return!1;s=s.next}return!0}function b0(y,x,e,t){let r=y.prev,n=y,o=y.next;if(v(r,n,o)\u003e=0)return!1;let i=r.x,a=n.x,c=o.x,d=r.y,f=n.y,l=o.y,p=Math.min(i,a,c),s=Math.min(d,f,l),L=Math.max(i,a,c),m=Math.max(d,f,l),u=X(p,s,x,e,t),_=X(L,m,x,e,t),h=y.prevZ,g=y.nextZ;for(;h\u0026\u0026h.z\u003e=u\u0026\u0026g\u0026\u0026g.z\u003c=_;){if(h.x\u003e=p\u0026\u0026h.x\u003c=L\u0026\u0026h.y\u003e=s\u0026\u0026h.y\u003c=m\u0026\u0026h!==r\u0026\u0026h!==o\u0026\u0026F(i,d,a,f,c,l,h.x,h.y)\u0026\u0026v(h.prev,h,h.next)\u003e=0||(h=h.prevZ,g.x\u003e=p\u0026\u0026g.x\u003c=L\u0026\u0026g.y\u003e=s\u0026\u0026g.y\u003c=m\u0026\u0026g!==r\u0026\u0026g!==o\u0026\u0026F(i,d,a,f,c,l,g.x,g.y)\u0026\u0026v(g.prev,g,g.next)\u003e=0))return!1;g=g.nextZ}for(;h\u0026\u0026h.z\u003e=u;){if(h.x\u003e=p\u0026\u0026h.x\u003c=L\u0026\u0026h.y\u003e=s\u0026\u0026h.y\u003c=m\u0026\u0026h!==r\u0026\u0026h!==o\u0026\u0026F(i,d,a,f,c,l,h.x,h.y)\u0026\u0026v(h.prev,h,h.next)\u003e=0)return!1;h=h.prevZ}for(;g\u0026\u0026g.z\u003c=_;){if(g.x\u003e=p\u0026\u0026g.x\u003c=L\u0026\u0026g.y\u003e=s\u0026\u0026g.y\u003c=m\u0026\u0026g!==r\u0026\u0026g!==o\u0026\u0026F(i,d,a,f,c,l,g.x,g.y)\u0026\u0026v(g.prev,g,g.next)\u003e=0)return!1;g=g.nextZ}return!0}function w0(y,x){let e=y;do{let t=e.prev,r=e.next.next;!U(t,r)\u0026\u0026r0(t,e,e.next,r)\u0026\u0026B(t,r)\u0026\u0026B(r,t)\u0026\u0026(x.push(t.i,e.i,r.i),A(e),A(e.next),e=y=r),e=e.next}while(e!==y);return I(e)}function P0(y,x,e,t,r,n){let o=y;do{let i=o.next.next;for(;i!==o.prev;){if(o.i!==i.i\u0026\u0026F0(o,i)){let a=n0(o,i);o=I(o,o.next),a=I(a,a.next),N(o,x,e,t,r,n,0),N(a,x,e,t,r,n,0);return}i=i.next}o=o.next}while(o!==y)}function R0(y,x,e,t){let r=[];for(let n=0,o=x.length;n\u003co;n++){let i=x[n]*t,a=n\u003co-1?x[n+1]*t:y.length,c=e0(y,i,a,t,!1);c===c.next\u0026\u0026(c.steiner=!0),r.push(W0(c))}r.sort(I0);for(let n=0;n\u003cr.length;n++)e=G0(r[n],e);return e}function I0(y,x){let e=y.x-x.x;if(e===0\u0026\u0026(e=y.y-x.y,e===0)){let t=(y.next.y-y.y)/(y.next.x-y.x),r=(x.next.y-x.y)/(x.next.x-x.x);e=t-r}return e}function G0(y,x){let e=T0(y,x);if(!e)return x;let t=n0(e,y);return I(t,t.next),I(e,e.next)}function T0(y,x){let e=x,t=y.x,r=y.y,n=-1/0,o;if(U(y,e))return e;do{if(U(y,e.next))return e.next;if(r\u003c=e.y\u0026\u0026r\u003e=e.next.y\u0026\u0026e.next.y!==e.y){let f=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(f\u003c=t\u0026\u0026f\u003en\u0026\u0026(n=f,o=e.x\u003ce.next.x?e:e.next,f===t))return o}e=e.next}while(e!==x);if(!o)return null;let i=o,a=o.x,c=o.y,d=1/0;e=o;do{if(t\u003e=e.x\u0026\u0026e.x\u003e=a\u0026\u0026t!==e.x\u0026\u0026t0(r\u003cc?t:n,r,a,c,r\u003cc?n:t,r,e.x,e.y)){let f=Math.abs(r-e.y)/(t-e.x);B(e,y)\u0026\u0026(f\u003cd||f===d\u0026\u0026(e.x\u003eo.x||e.x===o.x\u0026\u0026U0(o,e)))\u0026\u0026(o=e,d=f)}e=e.next}while(e!==i);return o}function U0(y,x){return v(y.prev,y,x.prev)\u003c0\u0026\u0026v(x.next,y,y.next)\u003c0}function E0(y,x,e,t){let r=y;do r.z===0\u0026\u0026(r.z=X(r.x,r.y,x,e,t)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==y);r.prevZ.nextZ=null,r.prevZ=null,k0(r)}function k0(y){let x,e=1;do{let t=y,r;y=null;let n=null;for(x=0;t;){x++;let o=t,i=0;for(let c=0;c\u003ce\u0026\u0026(i++,o=o.nextZ,!!o);c++);let a=e;for(;i\u003e0||a\u003e0\u0026\u0026o;)i!==0\u0026\u0026(a===0||!o||t.z\u003c=o.z)?(r=t,t=t.nextZ,i--):(r=o,o=o.nextZ,a--),n?n.nextZ=r:y=r,r.prevZ=n,n=r;t=o}n.nextZ=null,e*=2}while(x\u003e1);return y}function X(y,x,e,t,r){return y=(y-e)*r|0,x=(x-t)*r|0,y=(y|y\u003c\u003c8)\u002616711935,y=(y|y\u003c\u003c4)\u0026252645135,y=(y|y\u003c\u003c2)\u0026858993459,y=(y|y\u003c\u003c1)\u00261431655765,x=(x|x\u003c\u003c8)\u002616711935,x=(x|x\u003c\u003c4)\u0026252645135,x=(x|x\u003c\u003c2)\u0026858993459,x=(x|x\u003c\u003c1)\u00261431655765,y|x\u003c\u003c1}function W0(y){let x=y,e=y;do(x.x\u003ce.x||x.x===e.x\u0026\u0026x.y\u003ce.y)\u0026\u0026(e=x),x=x.next;while(x!==y);return e}function t0(y,x,e,t,r,n,o,i){return(r-o)*(x-i)\u003e=(y-o)*(n-i)\u0026\u0026(y-o)*(t-i)\u003e=(e-o)*(x-i)\u0026\u0026(e-o)*(n-i)\u003e=(r-o)*(t-i)}function F(y,x,e,t,r,n,o,i){return!(y===o\u0026\u0026x===i)\u0026\u0026t0(y,x,e,t,r,n,o,i)}function F0(y,x){return y.next.i!==x.i\u0026\u0026y.prev.i!==x.i\u0026\u0026!N0(y,x)\u0026\u0026(B(y,x)\u0026\u0026B(x,y)\u0026\u0026B0(y,x)\u0026\u0026(v(y.prev,y,x.prev)||v(y,x.prev,x))||U(y,x)\u0026\u0026v(y.prev,y,y.next)\u003e0\u0026\u0026v(x.prev,x,x.next)\u003e0)}function v(y,x,e){return(x.y-y.y)*(e.x-x.x)-(x.x-y.x)*(e.y-x.y)}function U(y,x){return y.x===x.x\u0026\u0026y.y===x.y}function r0(y,x,e,t){let r=S(v(y,x,e)),n=S(v(y,x,t)),o=S(v(e,t,y)),i=S(v(e,t,x));return!!(r!==n\u0026\u0026o!==i||r===0\u0026\u0026O(y,e,x)||n===0\u0026\u0026O(y,t,x)||o===0\u0026\u0026O(e,y,t)||i===0\u0026\u0026O(e,x,t))}function O(y,x,e){return x.x\u003c=Math.max(y.x,e.x)\u0026\u0026x.x\u003e=Math.min(y.x,e.x)\u0026\u0026x.y\u003c=Math.max(y.y,e.y)\u0026\u0026x.y\u003e=Math.min(y.y,e.y)}function S(y){return y\u003e0?1:y\u003c0?-1:0}function N0(y,x){let e=y;do{if(e.i!==y.i\u0026\u0026e.next.i!==y.i\u0026\u0026e.i!==x.i\u0026\u0026e.next.i!==x.i\u0026\u0026r0(e,e.next,y,x))return!0;e=e.next}while(e!==y);return!1}function B(y,x){return v(y.prev,y,y.next)\u003c0?v(y,x,y.next)\u003e=0\u0026\u0026v(y,y.prev,x)\u003e=0:v(y,x,y.prev)\u003c0||v(y,y.next,x)\u003c0}function B0(y,x){let e=y,t=!1,r=(y.x+x.x)/2,n=(y.y+x.y)/2;do e.y\u003en!=e.next.y\u003en\u0026\u0026e.next.y!==e.y\u0026\u0026r\u003c(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x\u0026\u0026(t=!t),e=e.next;while(e!==y);return t}function n0(y,x){let e=$(y.i,y.x,y.y),t=$(x.i,x.x,x.y),r=y.next,n=x.prev;return y.next=x,x.prev=y,e.next=r,r.prev=e,t.next=e,e.prev=t,n.next=t,t.prev=n,t}function x0(y,x,e,t){let r=$(y,x,e);return t?(r.next=t.next,r.prev=t,t.next.prev=r,t.next=r):(r.prev=r,r.next=r),r}function A(y){y.next.prev=y.prev,y.prev.next=y.next,y.prevZ\u0026\u0026(y.prevZ.nextZ=y.nextZ),y.nextZ\u0026\u0026(y.nextZ.prevZ=y.prevZ)}function $(y,x,e){return{i:y,x,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function A0(y,x,e,t){let r=0;for(let n=x,o=e-t;n\u003ce;n+=t)r+=(y[o]-y[n])*(y[n+1]+y[o+1]),o=n;return r}var o0={0:\\\"M0.301025 0.257813 L0.206593 0.283385 L0.122042 0.361307 L0.075923 0.474441 L0.064942 0.642221 L0.091296 0.78289 L0.159376 0.899463 L0.257104 0.961214 L0.344948 0.961214 L0.442678 0.899463 L0.510757 0.78289 L0.537111 0.642221 L0.526131 0.474441 L0.480012 0.361307 L0.39546 0.283385 L0.301025 0.257813\\\",1:\\\"M0.220426 0.40845 L0.381626 0.270996 L0.381626 0.948966\\\",2:\\\"M0.110409 0.39212 L0.125621 0.342293 L0.170571 0.295823 L0.244237 0.26431 L0.291518 0.257813 L0.373319 0.263799 L0.434683 0.290705 L0.468239 0.331966 L0.480292 0.379913 L0.479492 0.411806 L0.465088 0.465192 L0.402571 0.568988 L0.245134 0.766438 L0.07959 0.948045 L0.522462 0.948045\\\",3:\\\"M0.081606 0.345073 L0.119154 0.315633 L0.178996 0.284091 L0.255265 0.257813 L0.349133 0.263062 L0.43127 0.289348 L0.48994 0.336662 L0.525141 0.394491 L0.513407 0.457577 L0.466472 0.504892 L0.384334 0.541692 L0.290464 0.56272 L0.20833 0.573235 L0.290464 0.583749 L0.384334 0.610035 L0.466472 0.652092 L0.519274 0.709922 L0.531007 0.773007 L0.50754 0.841351 L0.454738 0.899179 L0.3726 0.946494 L0.310412 0.961214 L0.209503 0.959111 L0.127367 0.946494 L0.071046 0.929671\\\",4:\\\"M0.418494 0.270996 L0.048828 0.724199 L0.553224 0.724199 M0.414181 0.578167 L0.414181 0.94897\\\",5:\\\"M0.074951 0.270996 L0.074951 0.614701 L0.267655 0.5695 L0.405247 0.586502 L0.460002 0.617189 L0.498028 0.660731 L0.527101 0.779401 L0.513352 0.841049 L0.477274 0.889568 L0.406378 0.93463 L0.324445 0.958337 L0.247399 0.962139 L0.182516 0.949767 L0.130068 0.925508 L0.074951 0.875607 M0.074951 0.270996 L0.527101 0.270996\\\",6:\\\"M0.428549 0.257813 L0.341433 0.285053 L0.26073 0.312099 L0.192188 0.360182 L0.138902 0.410969 L0.098219 0.500422 L0.070249 0.584267 L0.067264 0.670716 L0.065164 0.756863 L0.087163 0.820973 L0.108168 0.861042 L0.157916 0.913131 L0.210981 0.948192 L0.29279 0.961214 L0.384548 0.956206 L0.456409 0.924151 L0.507262 0.881077 L0.5349 0.821975 L0.537111 0.771889 L0.521634 0.718798 L0.498418 0.67372 L0.463042 0.636657 L0.414398 0.613617 L0.34696 0.598591 L0.28284 0.595587 L0.215403 0.605604 L0.145756 0.641665 L0.109274 0.678729 L0.064942 0.724006\\\",7:\\\"M0.071534 0.270996 L0.530519 0.270996 L0.495935 0.291702 L0.477752 0.305407 L0.435186 0.346112 L0.412067 0.374136 L0.388565 0.40796 L0.365315 0.448098 L0.342943 0.495062 L0.322081 0.549366 L0.303364 0.611524 L0.287416 0.68205 L0.270077 0.80465 L0.26253 0.94897\\\",8:\\\"M0.286761 0.257813 L0.210684 0.27162 L0.1414 0.305622 L0.092494 0.382125 L0.111513 0.450128 L0.16857 0.502193 L0.228345 0.539382 L0.377781 0.594635 L0.470161 0.645637 L0.52586 0.706203 L0.538087 0.792269 L0.506841 0.87621 L0.438915 0.927212 L0.339743 0.961214 L0.263666 0.959089 L0.174004 0.929337 L0.102003 0.881523 L0.063965 0.811395 L0.066682 0.741266 L0.102003 0.671139 L0.180797 0.608448 L0.259591 0.580822 L0.358762 0.548945 L0.456576 0.49688 L0.486463 0.446941 L0.487822 0.362999 L0.453859 0.302434 L0.384574 0.265245 L0.286761 0.257813\\\",9:\\\"M0.511026 0.437812 L0.491026 0.347812 L0.451026 0.297812 L0.391026 0.267812 L0.311026 0.257813 L0.231026 0.267812 L0.161026 0.297812 L0.111026 0.347812 L0.091026 0.417812 L0.111026 0.487812 L0.161026 0.537812 L0.231026 0.567812 L0.311026 0.577812 L0.391026 0.557812 L0.451026 0.517812 L0.491026 0.477812 L0.511026 0.437812 M0.510026 0.438812 L0.434026 0.636812 L0.381026 0.777812 L0.337026 0.879812 L0.301026 0.957812\\\",\\\"!\\\":\\\"M0.301026 0.270996 L0.301026 0.749566 M0.251466 0.94897 L0.350587 0.94897\\\",'\\\"':\\\"M0.16504 0.270996 L0.16504 0.523022 M0.437013 0.270996 L0.437013 0.523022\\\",\\\"#\\\":\\\"M0.20958 0.282227 L0.146515 0.949754 M0.461844 0.282227 L0.398779 0.949754 M0.032999 0.526969 L0.600587 0.452796 M0.001465 0.82366 L0.569055 0.749486\\\",$:\\\"M0.307121 0.240234 L0.307121 1.083502 M0.490031 0.415915 L0.404676 0.328075 L0.23396 0.310507 L0.136407 0.398347 L0.099828 0.521324 L0.124213 0.591596 L0.197379 0.644299 L0.429061 0.697003 L0.502224 0.749708 L0.526613 0.837547 L0.477836 0.960526 L0.355897 1.013228 L0.197379 0.99566 L0.112021 0.942957 L0.07544 0.837547\\\",\\\"'\\\":\\\"M0.301026 0.270996 L0.301026 0.523022\\\",\\\"(\\\":\\\"M0.413087 0.241211 L0.372337 0.28347 L0.331589 0.334184 L0.290838 0.393349 L0.25009 0.460965 L0.219528 0.528584 L0.199153 0.5962 L0.188966 0.655364 L0.199153 0.714529 L0.219528 0.782146 L0.25009 0.849764 L0.290838 0.91738 L0.331589 0.976544 L0.372337 1.027258 L0.413087 1.069491\\\",\\\")\\\":\\\"M0.188966 0.241211 L0.229716 0.28347 L0.270466 0.334184 L0.311213 0.393349 L0.351964 0.460965 L0.382526 0.528584 L0.4029 0.5962 L0.413087 0.655364 L0.4029 0.714529 L0.382526 0.782146 L0.351964 0.849764 L0.311213 0.91738 L0.270466 0.976544 L0.229716 1.027258 L0.188966 1.069491\\\",\\\"*\\\":\\\"M0.301026 0.458702 L0.301026 0.681942 M0.301026 0.458702 L0.520997 0.536834 M0.301026 0.458702 L0.439954 0.257813 M0.301026 0.458702 L0.162098 0.257813 M0.301026 0.458702 L0.081055 0.536834\\\",\\\"+\\\":\\\"M0.042969 0.66845 L0.559083 0.66845 M0.301023 0.428223 L0.301023 0.908661\\\",\\\",\\\":\\\"M0.38672 0.852051 L0.215333 1.030661 L0.301025 1.119971\\\",\\\"-\\\":\\\"M0.173829 0.686035 L0.428224 0.686035\\\",\\\".\\\":\\\"M0.362549 0.851074 L0.239503 0.851074\\\",\\\"/\\\":\\\"M0.062501 1.035249 L0.539551 0.270996\\\",\\\"\u003c\\\":\\\"M0.559083 0.441895 L0.042969 0.66939 L0.042969 0.66939 L0.559083 0.896902\\\",\\\"=\\\":\\\"M0.042969 0.545898 L0.559083 0.545898 M0.042969 0.80837 L0.559083 0.80837\\\",\\\"\u003e\\\":\\\"M0.042969 0.441895 L0.559083 0.66939 L0.559083 0.66939 L0.042969 0.896902\\\",A:\\\"M0.018067 0.94897 L0.290179 0.270996 L0.583986 0.94897 M0.155303 0.684521 L0.433548 0.684521\\\",B:\\\"M0.063965 0.94897 L0.063965 0.278953 L0.209356 0.270996 L0.342486 0.294394 L0.432179 0.37292 L0.418224 0.48773 L0.312686 0.549166 L0.084728 0.575531 L0.306377 0.589434 L0.468877 0.647456 L0.538087 0.736658 L0.5324 0.85202 L0.501247 0.902983 L0.42355 0.944398 L0.063965 0.94897\\\",C:\\\"M0.529054 0.419847 L0.498425 0.345196 L0.442238 0.292341 L0.33583 0.257813 L0.257199 0.268357 L0.187906 0.303748 L0.120243 0.385432 L0.072998 0.599844 L0.110073 0.815385 L0.165381 0.902183 L0.222883 0.942801 L0.334904 0.961214 L0.43253 0.937679 L0.504816 0.868999 L0.529054 0.772065\\\",D:\\\"M0.064454 0.94897 L0.071838 0.285078 L0.171217 0.270996 L0.247348 0.272633 L0.37101 0.306078 L0.462461 0.378304 L0.514748 0.475555 L0.535591 0.576392 L0.537599 0.652313 L0.528065 0.717381 L0.508562 0.772419 L0.445948 0.855695 L0.362356 0.90871 L0.225203 0.945862 L0.064454 0.94897\\\",E:\\\"M0.080078 0.270996 L0.080078 0.94897 M0.080078 0.270996 L0.521974 0.270996 M0.080078 0.609981 L0.389405 0.609981 M0.080078 0.94897 L0.521974 0.94897\\\",F:\\\"M0.086426 0.270996 L0.086426 0.94897 M0.091304 0.275607 L0.515626 0.275607 M0.091304 0.607677 L0.447344 0.607677\\\",G:\\\"M0.498034 0.284943 L0.374621 0.257813 L0.244219 0.268648 L0.160577 0.311997 L0.094556 0.398116 L0.056397 0.58404 L0.076752 0.785532 L0.120865 0.858197 L0.188947 0.916734 L0.271008 0.953591 L0.357069 0.961214 L0.43715 0.932047 L0.501262 0.858539 L0.545656 0.648611 L0.329595 0.648131\\\",H:\\\"M0.066895 0.270996 L0.066895 0.94897 M0.066895 0.595658 L0.530009 0.595658 M0.535157 0.270996 L0.535157 0.94897\\\",I:\\\"M0.301026 0.270996 L0.301026 0.94897\\\",J:\\\"M0.506839 0.270996 L0.507814 0.782193 L0.498468 0.846168 L0.480733 0.880789 L0.455864 0.90832 L0.426095 0.929408 L0.360746 0.954812 L0.302508 0.962139 L0.223573 0.953638 L0.16538 0.930312 L0.137072 0.907715 L0.116428 0.880312 L0.102822 0.848819 L0.095633 0.813947 L0.094239 0.776413\\\",K:\\\"M0.035401 0.270996 L0.035401 0.94897 M0.502258 0.316194 L0.035401 0.687823 M0.212484 0.582361 L0.566652 0.933903\\\",L:\\\"M0.07544 0.270996 L0.07544 0.94897 L0.526613 0.94897\\\",M:\\\"M0.042481 0.94897 L0.042481 0.270996 L0.301027 0.712492 L0.559571 0.270996 L0.559571 0.94897\\\",N:\\\"M0.067871 0.94897 L0.067871 0.270996 L0.534181 0.94897 L0.525031 0.270996\\\",O:\\\"M0.287293 0.961214 L0.19843 0.933567 L0.1172 0.849451 L0.057129 0.563945 L0.114348 0.350255 L0.18455 0.289392 L0.306101 0.257813 L0.42054 0.29572 L0.487543 0.365003 L0.544923 0.625294 L0.516366 0.789624 L0.465476 0.884596 L0.375084 0.949287 L0.287293 0.961214\\\",P:\\\"M0.070557 0.94897 L0.070557 0.28379 L0.20704 0.270996 L0.329134 0.278993 L0.408525 0.300514 L0.444022 0.317908 L0.500637 0.368929 L0.525796 0.423728 L0.531496 0.50384 L0.508934 0.554205 L0.473724 0.582043 L0.417577 0.604365 L0.336375 0.620372 L0.226014 0.629268 L0.082368 0.630258\\\",Q:\\\"M0.282435 1.050813 L0.195447 1.019646 L0.115933 0.924817 L0.057129 0.602943 L0.113139 0.362034 L0.18186 0.293418 L0.300844 0.257813 L0.412868 0.300553 L0.478457 0.37866 L0.534625 0.672103 L0.506671 0.857367 L0.456855 0.964437 L0.368371 1.037368 L0.282435 1.050813 M0.341225 0.815559 L0.544923 1.070653\\\",R:\\\"M0.034912 0.944112 L0.034912 0.288556 L0.227127 0.270996 L0.362038 0.276867 L0.443423 0.294907 L0.477644 0.309614 L0.505809 0.328757 L0.526616 0.352817 L0.544963 0.418061 L0.543241 0.475921 L0.524463 0.517817 L0.49076 0.546518 L0.444265 0.564799 L0.355195 0.578739 L0.047653 0.589627 M0.303054 0.617306 L0.56714 0.94897\\\",S:\\\"M0.483037 0.364333 L0.407613 0.267477 L0.22883 0.257813 L0.128623 0.327565 L0.087712 0.455539 L0.104656 0.518727 L0.168054 0.573307 L0.41928 0.617318 L0.503796 0.669342 L0.535157 0.759324 L0.493846 0.900055 L0.367668 0.961214 L0.205436 0.956661 L0.116711 0.907038 L0.066895 0.790334\\\",T:\\\"M0.022949 0.270996 L0.579103 0.270996 M0.309284 0.270996 L0.309284 0.94897\\\",U:\\\"M0.072022 0.270996 L0.07308 0.648875 L0.080372 0.75167 L0.099024 0.827813 L0.134786 0.885729 L0.181571 0.924023 L0.251464 0.95168 L0.339655 0.962139 L0.401553 0.951668 L0.45232 0.924086 L0.482701 0.891771 L0.495745 0.870529 L0.515699 0.81637 L0.525014 0.744626 L0.530031 0.272017\\\",V:\\\"M0.027832 0.270996 L0.320083 0.94897 L0.57422 0.270996\\\",W:\\\"M0 0.270996 L0.079799 0.940377 L0.285198 0.472884 L0.505255 0.94897 L0.602052 0.270996\\\",X:\\\"M0.009034 0.270996 L0.586805 0.94897 M0.593019 0.270996 L0.015246 0.94897\\\",Y:\\\"M0.018067 0.270996 L0.293132 0.574135 M0.583986 0.271959 L0.294954 0.57606 L0.305277 0.94897\\\",Z:\\\"M0.053711 0.270996 L0.548341 0.270996 L0.053711 0.94897 L0.548341 0.94897\\\",\\\"[\\\":\\\"M0.404542 0.240234 L0.197511 0.240234 L0.197511 1.069424 L0.404542 1.069424\\\",\\\"\\\\\\\\\\\":\\\"M0.062501 0.270996 L0.539551 1.035249\\\",\\\"]\\\":\\\"M0.19751 0.240234 L0.404542 0.240234 L0.404542 1.069424 L0.19751 1.069424\\\",\\\"^\\\":\\\"M0.035156 0.523931 L0.301024 0.270996 L0.566896 0.523931\\\",_:\\\"M0 1.160601 L0.602052 1.160601\\\",a:\\\"M0.527101 0.439941 L0.527101 0.973965 M0.527101 0.553824 L0.451366 0.477535 L0.376759 0.439941 L0.263722 0.439941 L0.187989 0.477535 L0.112255 0.553824 L0.074951 0.66881 L0.074951 0.745099 L0.112255 0.85898 L0.187989 0.93527 L0.263722 0.973965 L0.376759 0.973965 L0.451366 0.93527 L0.527101 0.85898\\\",b:\\\"M0.07666 0.240234 L0.07666 0.959985 M0.07666 0.582737 L0.151822 0.514237 L0.225865 0.480483 L0.338045 0.480483 L0.413211 0.514237 L0.488374 0.582737 L0.525392 0.685983 L0.525392 0.754485 L0.488374 0.856739 L0.413211 0.92524 L0.338045 0.959985 L0.225865 0.959985 L0.151822 0.92524 L0.07666 0.856739\\\",c:\\\"M0.512452 0.553823 L0.441624 0.477535 L0.371854 0.439941 L0.26614 0.439941 L0.195312 0.477535 L0.124486 0.553823 L0.0896 0.668808 L0.0896 0.745099 L0.124486 0.858979 L0.195312 0.93527 L0.26614 0.973965 L0.371854 0.973965 L0.441624 0.93527 L0.512452 0.858979\\\",d:\\\"M0.525392 0.240234 L0.525392 0.959985 M0.525392 0.582737 L0.450232 0.514237 L0.376189 0.480483 L0.264006 0.480483 L0.188844 0.514237 L0.11368 0.582737 L0.076661 0.685983 L0.076661 0.754485 L0.11368 0.856739 L0.188844 0.92524 L0.264006 0.959985 L0.376189 0.959985 L0.450232 0.92524 L0.525392 0.856739\\\",e:\\\"M0.059571 0.668808 L0.542482 0.668808 M0.542482 0.592521 L0.502641 0.516231 L0.461594 0.477535 L0.381914 0.439941 L0.261186 0.439941 L0.180299 0.477535 L0.099412 0.553823 L0.059571 0.668808 L0.059571 0.745099 L0.099412 0.858979 L0.180299 0.93527 L0.261186 0.973965 L0.381914 0.973965 L0.461594 0.93527 L0.542482 0.858979\\\",f:\\\"M0.512941 0.240234 L0.406984 0.240234 L0.301026 0.274346 L0.248047 0.374731 L0.248047 0.946817 M0.089112 0.476088 L0.459965 0.476088\\\",g:\\\"M0.525392 0.439941 L0.525392 0.989395 L0.488373 1.091918 L0.45023 1.126757 L0.376189 1.160601 L0.264004 1.160601 L0.188844 1.126757 L0.113681 1.058075 L0.076661 0.954555 M0.525392 0.542467 L0.45023 0.473786 L0.376189 0.439941 L0.264004 0.439941 L0.188844 0.473786 L0.113681 0.542467 L0.076661 0.645988 L0.076661 0.714669 L0.113681 0.817193 L0.188844 0.885875 L0.264004 0.920713 L0.376189 0.920713 L0.45023 0.885875 L0.525392 0.817193\\\",h:\\\"M0.092041 0.240234 L0.092041 0.946817 M0.092041 0.61058 L0.205937 0.509225 L0.282214 0.476086 L0.396109 0.476086 L0.47187 0.509225 L0.510011 0.61058 L0.510011 0.946817\\\",i:\\\"M0.261026 0.240234 L0.341026 0.240234 M0.300978 0.476089 L0.300978 0.946817\\\",j:\\\"M0.3853 0.240234 L0.447023 0.240234 M0.416159 0.465708 L0.416159 1.011689 L0.383887 1.108586 L0.252832 1.140264 L0.15503 1.108586\\\",k:\\\"M0.065186 0.240234 L0.065186 0.946817 M0.493824 0.476086 L0.065186 0.812323 M0.236758 0.677829 L0.536867 0.946817\\\",l:\\\"M0.301026 0.234863 L0.301026 0.946441\\\",m:\\\"M0.050538 0.439941 L0.050538 0.960796 M0.050538 0.588758 L0.114405 0.476607 L0.157178 0.439941 L0.236864 0.439941 L0.279637 0.476607 L0.32241 0.588758 L0.32241 0.960796 M0.32241 0.588758 L0.386281 0.476607 L0.428467 0.439941 L0.50874 0.439941 L0.551515 0.476607 L0.551515 0.960796\\\",n:\\\"M0.092041 0.439941 L0.092041 0.960796 M0.092041 0.588758 L0.205936 0.476607 L0.282216 0.439941 L0.396113 0.439941 L0.471871 0.476607 L0.510011 0.588758 L0.510011 0.960796\\\",o:\\\"M0.247175 0.439941 L0.175178 0.477535 L0.103186 0.553823 L0.066895 0.668808 L0.066895 0.745099 L0.103186 0.858979 L0.175178 0.93527 L0.247175 0.973965 L0.354874 0.973965 L0.426872 0.93527 L0.498866 0.858979 L0.535157 0.745099 L0.535157 0.668808 L0.498866 0.553823 L0.426872 0.477535 L0.354874 0.439941 L0.247175 0.439941\\\",p:\\\"M0.076904 0.439941 L0.076904 1.154244 M0.076904 0.541563 L0.151986 0.473487 L0.225944 0.439941 L0.338005 0.439941 L0.413087 0.473487 L0.488166 0.541563 L0.525148 0.644169 L0.525148 0.712246 L0.488166 0.813866 L0.413087 0.881942 L0.338005 0.916471 L0.225944 0.916471 L0.151986 0.881942 L0.076904 0.813866\\\",q:\\\"M0.525148 0.441895 L0.525148 1.156195 M0.525148 0.5435 L0.450067 0.47544 L0.376106 0.441895 L0.264042 0.441895 L0.188966 0.47544 L0.113885 0.5435 L0.076905 0.646108 L0.076905 0.714187 L0.113885 0.815809 L0.188966 0.883886 L0.264042 0.918418 L0.376106 0.918418 L0.450067 0.883886 L0.525148 0.815809\\\",r:\\\"M0.107422 0.439941 L0.107422 0.960796 M0.107422 0.663164 L0.155824 0.551014 L0.252626 0.476607 L0.349428 0.439941 L0.49463 0.439941\\\",s:\\\"M0.475556 0.477535 L0.400757 0.439941 L0.276092 0.439941 L0.176361 0.477535 L0.101563 0.553823 L0.101563 0.630112 L0.176361 0.668808 L0.301024 0.668808 L0.425688 0.745099 L0.50049 0.821387 L0.50049 0.897677 L0.425688 0.93527 L0.325956 0.973965 L0.201295 0.973965 L0.126496 0.93527 L0.101563 0.858979\\\",t:\\\"M0.246032 0.297852 L0.246032 0.826549 L0.301023 0.919323 L0.411011 0.950848 L0.520997 0.950848 M0.081055 0.515799 L0.466004 0.515799\\\",u:\\\"M0.092041 0.454102 L0.092041 0.826134 L0.13018 0.937211 L0.205936 0.974954 L0.319832 0.974954 L0.396113 0.937211 L0.510011 0.826134 M0.510011 0.454102 L0.510011 0.974954\\\",v:\\\"M0.048828 0.453125 L0.301026 0.961719 M0.553224 0.453125 L0.301026 0.961719\\\",w:\\\"M0 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.150512 0.961719 M0.301024 0.453125 L0.451539 0.961719 M0.602052 0.453125 L0.451539 0.961719\\\",x:\\\"M0.03711 0.453125 L0.564943 0.961719 M0.564943 0.453125 L0.03711 0.961719\\\",y:\\\"M0.084618 0.453125 L0.320232 0.921476 M0.55713 0.453125 L0.320232 0.921476 L0.242119 1.055289 L0.163369 1.122196 L0.084618 1.155166 L0.044922 1.155166\\\",z:\\\"M0.505373 0.452148 L0.09668 0.961651 M0.09668 0.452148 L0.505373 0.452148 M0.09668 0.961651 L0.505373 0.961651\\\"},i0={};for(let y in o0){i0[y]=[];let x=o0[y].split(\\\"M\\\").slice(1).map(e=\u003ee.split(\\\"L\\\").map(t=\u003et.trim().split(\\\" \\\").map(parseFloat)));for(let e of x)for(let t=0;t\u003ce.length-1;t++)i0[y].push({x1:e[t][0],y1:1-e[t][1],x2:e[t+1][0],y2:1-e[t+1][1]})}var C0=.09,O0=.692052,S0=.692052,Y0=1.152,Z0=0;var s0={0:.692052,1:.692052,2:.692052,3:.692052,4:.692052,5:.692052,6:.692052,7:.692052,8:.692052,9:.692052,\\\"!\\\":.692052,'\\\"':.692052,\\\"#\\\":.692052,$:.692052,\\\"'\\\":.692052,\\\"(\\\":.692052,\\\")\\\":.692052,\\\"*\\\":.692052,\\\"+\\\":.692052,\\\",\\\":.692052,\\\"-\\\":.692052,\\\".\\\":.692052,\\\"/\\\":.692052,\\\"\u003c\\\":.692052,\\\"=\\\":.692052,\\\"\u003e\\\":.692052,A:.692052,B:.692052,C:.692052,D:.692052,E:.692052,F:.692052,G:.692052,H:.692052,I:.692052,J:.692052,K:.692052,L:.692052,M:.692052,N:.692052,O:.692052,P:.692052,Q:.692052,R:.692052,S:.692052,T:.692052,U:.692052,V:.692052,W:.692052,X:.692052,Y:.692052,Z:.692052,\\\"[\\\":.692052,\\\"\\\\\\\\\\\":.692052,\\\"]\\\":.692052,\\\"^\\\":.692052,_:.692052,a:.692052,b:.692052,c:.692052,d:.692052,e:.692052,f:.692052,g:.692052,h:.692052,i:.692052,j:.692052,k:.692052,l:.692052,m:.692052,n:.692052,o:.692052,p:.692052,q:.692052,r:.692052,s:.692052,t:.692052,u:.692052,v:.692052,w:.692052,x:.692052,y:.692052,z:.692052,\\\" \\\":.692052},a0={},R={glyphWidthRatio:O0,spaceWidthRatio:S0,lineHeightRatio:Y0,strokeWidthRatio:C0,letterSpacingRatio:Z0};var D0={0:[[{x:.019944796633211075,y:.35828068632415006},{x:.020222641007547733,y:.3550960892473839},{x:.020327535068617307,y:.3519011161217302},{x:.02060526835904108,y:.3507104904820116},{x:.02071153113201321,y:.34949252766745387},{x:.047065531132013214,y:.20882352766745393},{x:.047989939967683706,y:.20564918300405605},{x:.04875673163473768,y:.20243312543665407},{x:.04922094308839032,y:.20142201853303832},{x:.04953201774467938,y:.20035381349539033},{x:.05105794824635218,y:.1974208061920286},{x:.05243742793298141,y:.1944161379022362},{x:.1205174279329814,y:.07784313790223615},{x:.1216536619223176,y:.07627409360623287},{x:.12261018498510404,y:.07458945972562232},{x:.1242345189777056,y:.07271014544101197},{x:.12569143736362237,y:.07069826276137084},{x:.12711194429242206,y:.06938103546641537},{x:.12837874379901673,y:.06791537974577894},{x:.130338502698373,y:.06638906779986004},{x:.132159925645859,y:.06470007355882942},{x:.13381011622947792,y:.06368528357115737},{x:.13533850978527173,y:.062494930337889824},{x:.2330665097852717,y:.000743930337889824},{x:.2364974226485404,y:-.000978818921256936},{x:.23988324554357096,y:-.0027885789630079164},{x:.24043487144166406,y:-.0029559128497863825},{x:.24095002304009888,y:-.0032145836671228292},{x:.2446511035824589,y:-.0042348928870151745},{x:.24832493550927423,y:-.005349337618145378},{x:.24889860729226898,y:-.005405839357118937},{x:.2494543245702404,y:-.005559038796006631},{x:.2532833423420387,y:-.0058376980655201055},{x:.257104,y:-.006214000000000011},{x:.344948,y:-.006214000000000011},{x:.34876845169289644,y:-.005837718351308385},{x:.352597265623821,y:-.005559109487024962},{x:.35315318526669126,y:-.00540585978827806},{x:.3537270644907258,y:-.005349337618145378},{x:.3574006983675983,y:-.004234952964808514},{x:.36110158881940224,y:-.0032147329490055873},{x:.36161692908913895,y:-.0029559733581057666},{x:.36216875445642904,y:-.0027885789630079164},{x:.36555439482758706,y:-.000978916482299381},{x:.3689851386556908,y:.0007437082019616584},{x:.4667151386556908,y:.06249470820196166},{x:.46824382031514195,y:.0636852631221029},{x:.4698943035897058,y:.06470024765114774},{x:.4717154585013725,y:.06638901501054441},{x:.47367495473362387,y:.0679150932923645},{x:.4749419974608878,y:.0693810030307532},{x:.47636275350351887,y:.0706984782301942},{x:.4778194532662604,y:.07271008609647399},{x:.47944357522443626,y:.07458911996296573},{x:.4804002872780698,y:.07627405043044727},{x:.48153671723081914,y:.07784338646721853},{x:.5496157172308191,y:.19441638646721857},{x:.5509951179002539,y:.19742093333312605},{x:.5525209822553206,y:.20035381349539033},{x:.5528320971760705,y:.20142215679791795},{x:.5532963622471587,y:.2024333975455826},{x:.5540631001039363,y:.20564932060673602},{x:.5549874688679868,y:.20882352766745393},{x:.5813414688679868,y:.34949252766745387},{x:.5814477200321959,y:.3507103574246747},{x:.581725430046729,y:.351900851345405},{x:.5818303474337426,y:.35509595676374855},{x:.5821082033667889,y:.35828068632415006},{x:.5819748261451739,y:.3594958443979094},{x:.5820149461972951,y:.36071764184793353},{x:.5710349461972951,y:.5284976418479336},{x:.5705756858728281,y:.5312810757499365},{x:.5703149436633981,y:.5340900680661724},{x:.5698592272920282,y:.5356233082419208},{x:.5695988288779222,y:.5372015019922555},{x:.5686053720955593,y:.5398418557477263},{x:.5678016327590553,y:.5425460057826548},{x:.5216826327590552,y:.6556800057826547},{x:.5211943471023096,y:.656605995281004},{x:.5208498728309648,y:.6575945381025444},{x:.5191405880551111,y:.6605007631972294},{x:.5175679428069421,y:.6634831423933323},{x:.5169083878327574,y:.664296079457111},{x:.5163776774005638,y:.665198424109003},{x:.5141342596628157,y:.6677153419860701},{x:.5120099990343735,y:.6703336077343061},{x:.511204521070525,y:.6710022516480534},{x:.510507969381766,y:.6717837215313657},{x:.425955969381766,y:.7497057215313657},{x:.4243831978740034,y:.750892537075826},{x:.42294870744900304,y:.7522432326643229},{x:.4208707687817478,y:.7535430209032156},{x:.4189143183619635,y:.7550193610827685},{x:.4171402309909699,y:.7558765397994217},{x:.4154697962599445,y:.7569214269519826},{x:.41317820849544135,y:.7577908544006052},{x:.41097133104084405,y:.7588571425751742},{x:.40906410498936707,y:.7593517435666508},{x:.4072219198222394,y:.7600506678559823},{x:.3127869198222394,y:.7856226678559822},{x:.3097655669518694,y:.7861297177594856},{x:.3067801557646532,y:.7868174624905968},{x:.3054245519856559,y:.7868582361795984},{x:.30408703940192616,y:.7870827004032797},{x:.3010248204508113,y:.7869905707806608},{x:.2979626007613803,y:.7870826758597451},{x:.29662508997676323,y:.7868582009159747},{x:.29526948652460844,y:.786817416361878},{x:.2922840808497275,y:.7861296477028675},{x:.28926273204343433,y:.7856225735833884},{x:.19483073204343437,y:.7600505735833885},{x:.19298859701529922,y:.7593516514268194},{x:.1910814199885863,y:.7588570511522524},{x:.1888745059729717,y:.757790729268721},{x:.18658288068670334,y:.7569212665731724},{x:.18491249471518256,y:.7558763912940257},{x:.18313845528709377,y:.7550192228447639},{x:.18118197558509466,y:.7535428424712565},{x:.17910400699337814,y:.7522430123425641},{x:.17766956207459372,y:.7508923379118444},{x:.17609683558545802,y:.7497055417906873},{x:.09154583558545802,y:.6717835417906872},{x:.09084937681091164,y:.6710021668773223},{x:.09004400096562647,y:.6703336077343061},{x:.087919657143162,y:.6677152394449524},{x:.08567616637982708,y:.6651982097729843},{x:.0851455285488078,y:.6642959763928821},{x:.08448605719305789,y:.6634831423933323},{x:.08291335035419628,y:.6605006463960624},{x:.08120401576602496,y:.6575942974079984},{x:.08085959099279398,y:.6566058778839782},{x:.08037136724094471,y:.6556800057826547},{x:.03425236724094472,y:.5425460057826548},{x:.03344866581310472,y:.5398419832899659},{x:.03245524021837327,y:.537201759963462},{x:.0321948107181119,y:.5356234361255728},{x:.03173905633660196,y:.5340900680661724},{x:.03147832642517492,y:.5312812082371015},{x:.031019071243648687,y:.5284979083423142},{x:.020038071243648682,y:.36071790834231426},{x:.020078188427320915,y:.3594959771633442},{x:.019944796633211075,y:.35828068632415006}],[{x:.11021604810185967,y:.3604951889884744},{x:.12035004420691338,y:.5153337161267963},{x:.1599220965290545,y:.612407472440097},{x:.22898846858521874,y:.6760588762479813},{x:.301025186831377,y:.6955662779655215},{x:.373064807645506,y:.6760587099720985},{x:.44213195602343713,y:.6124073435241713},{x:.48170390405887986,y:.5153338430353971},{x:.49183697687726113,y:.3604953223188204},{x:.4679633532090146,y:.23306575687188358},{x:.4093572783633461,y:.13271343144136735},{x:.3319224534250481,y:.08378599999999999},{x:.27012977192577264,y:.08378599999999999},{x:.19269670382412518,y:.13271332265415062},{x:.13408961949133952,y:.23306590258843124},{x:.11021604810185967,y:.3604951889884744}]],1:[[{x:.17556757075794932,y:.5951166967821685},{x:.17573368487361973,y:.586296718297643},{x:.17761729959585784,y:.5776786204828649},{x:.18114602866723137,y:.5695935920037709},{x:.1861842650084615,y:.5623523359706766},{x:.19253839202243023,y:.5562331297919906},{x:.19996422417142623,y:.5514711311294693},{x:.20817639089041826,y:.548249340921154},{x:.21685930321783156,y:.5466915707579493},{x:.225679281702357,y:.5468576848736197},{x:.2342973795171352,y:.5487412995958578},{x:.24238240799622912,y:.5522700286672314},{x:.24962366402932343,y:.5573082650084615},{x:.33662600000000004,y:.6314944876419193},{x:.33662600000000004,y:.051034000000000024},{x:.33749066238185466,y:.042254935509274234},{x:.3400514210369921,y:.033813245543570986},{x:.3442098674463855,y:.026033339514117928},{x:.34980619484660536,y:.019214194846605387},{x:.35662533951411796,y:.013617867446385483},{x:.364405245543571,y:.00945942103699212},{x:.3728469355092743,y:.006898662381854659},{x:.381626,y:.0060340000000000255},{x:.3904050644907258,y:.006898662381854659},{x:.3988467544564291,y:.00945942103699212},{x:.40662666048588214,y:.01361786744638549},{x:.4134458051533947,y:.019214194846605387},{x:.41904213255361455,y:.026033339514117928},{x:.42320057896300795,y:.033813245543570986},{x:.4257613376181454,y:.042254935509274255},{x:.426626,y:.051034000000000024},{x:.426626,y:.729004},{x:.42636789988195944,y:.7316245344755278},{x:.4263183151263803,y:.7342572817023569},{x:.42593657376816557,y:.7360038620015019},{x:.4257613376181454,y:.7377830644907257},{x:.42499695590681574,y:.7403028932959718},{x:.4244347004041422,y:.7428753795171351},{x:.42371955318609683,y:.744513925721078},{x:.42320057896300795,y:.746224754456429},{x:.4219592904188853,y:.7485470419835442},{x:.42090597133276864,y:.7509604079962291},{x:.419884900961423,y:.7524279516932593},{x:.41904213255361455,y:.7540046604858821},{x:.41737163919932724,y:.7560401625275525},{x:.41586773499153856,y:.7582016640293234},{x:.4145799806286405,y:.7594418083381722},{x:.4134458051533947,y:.7608238051533946},{x:.41141030311172405,y:.7624942985076821},{x:.4095136079775698,y:.7643208702080094},{x:.40800865730110464,y:.7652859570783687},{x:.40662666048588214,y:.7664201325536145},{x:.40430437295876726,y:.767661421097737},{x:.4020877758285738,y:.7690828688705307},{x:.4004234632490515,y:.7697358105551997},{x:.3988467544564291,y:.7705785789630079},{x:.39632692565118355,y:.7713429606743374},{x:.3938756091095818,y:.772304659078846},{x:.39211589322607654,y:.7726203633950566},{x:.3904050644907258,y:.7731393376181454},{x:.3877845300151986,y:.7733974377361859},{x:.3851926967821685,y:.7738624292420507},{x:.38340520248922366,y:.7738287638499798},{x:.381626,y:.774004},{x:.37900546552447173,y:.7737458998819594},{x:.376372718297643,y:.7736963151263803},{x:.37462613799849803,y:.7733145737681656},{x:.3728469355092743,y:.7731393376181454},{x:.3703271067040287,y:.7723749559068158},{x:.36775462048286484,y:.7718127004041422},{x:.3661160742789217,y:.7710975531860966},{x:.364405245543571,y:.7705785789630079},{x:.3620829580164563,y:.7693372904188854},{x:.3596695920037709,y:.7682839713327686},{x:.35820204830674063,y:.7672629009614229},{x:.35662533951411796,y:.7664201325536145},{x:.3545898374724472,y:.7647496391993269},{x:.35242833597067663,y:.7632457349915385},{x:.1912283359706766,y:.6257917349915385},{x:.18510912979199054,y:.6194376079775697},{x:.18034713112946932,y:.6120117758285738},{x:.17712534092115398,y:.6037996091095817},{x:.17556757075794932,y:.5951166967821685}]],2:[[{x:.034589999999999996,y:.05195499999999997},{x:.034692251306008066,y:.05091682506774448},{x:.03463809526377374,y:.04987503351343359},{x:.03512383076438082,y:.04653492529109402},{x:.03545466238185463,y:.043175935509274184},{x:.03575748683953214,y:.042177657057450094},{x:.03590761484026801,y:.04114531791601493},{x:.0370356398580977,y:.03796415123181852},{x:.03801542103699209,y:.034734245543570935},{x:.03850718127225641,y:.0338142268532408},{x:.03885582398108696,y:.03283101233894428},{x:.040582789147307716,y:.02993103764454602},{x:.04217386744638545,y:.02695433951411788},{x:.04283566538917773,y:.026147936387598623},{x:.04336942466232366,y:.025251630882832152},{x:.04562896367409083,y:.022744292579413156},{x:.04777019484660536,y:.020135194846605337},{x:.04857659797312457,y:.019473396903813094},{x:.04927496174105457,y:.01869844492647086},{x:.0519802417813102,y:.01668009861889986},{x:.05458933951411791,y:.014538867446385433},{x:.055509358204447995,y:.01404710721112114},{x:.05634548873920743,y:.013423289731094336},{x:.05939254741314285,y:.011971499336069797},{x:.062369245543570956,y:.01038042103699207},{x:.0633675239953951,y:.010077596579314544},{x:.06430928926944049,y:.00962888655251979},{x:.06758102982102647,y:.008799443560749052},{x:.07081093550927423,y:.007819662381854608},{x:.0718491104415297,y:.007717411075846537},{x:.07286031894352762,y:.007461052176974015},{x:.07623101021818018,y:.0072858316174737835},{x:.07959,y:.006954999999999975},{x:.522462,y:.006954999999999975},{x:.5312410644907257,y:.007819662381854608},{x:.539682754456429,y:.01038042103699207},{x:.5474626604858821,y:.014538867446385433},{x:.5542818051533946,y:.020135194846605337},{x:.5598781325536145,y:.02695433951411788},{x:.5640365789630079,y:.034734245543570935},{x:.5665973376181453,y:.043175935509274205},{x:.567462,y:.05195499999999997},{x:.5665973376181453,y:.06073406449072574},{x:.5640365789630079,y:.06917575445642901},{x:.5598781325536145,y:.07695566048588207},{x:.5542818051533946,y:.08377480515339461},{x:.5474626604858821,y:.08937113255361451},{x:.539682754456429,y:.09352957896300787},{x:.5312410644907257,y:.09609033761814534},{x:.522462,y:.09695499999999997},{x:.1815000359059797,y:.09695499999999997},{x:.2783905550735291,y:.2032469617410546},{x:.2792807818102756,y:.20444017254595384},{x:.28031851181367967,y:.20550758629318672},{x:.43775551181367967,y:.4029575862931866},{x:.4393581707982963,y:.4054309283363016},{x:.4411189018513206,y:.4077943501865292},{x:.5036359018513206,y:.5115903501865292},{x:.5044316302389797,y:.5132634494776924},{x:.5054127007337849,y:.5148350555317778},{x:.5063216043693862,y:.5172373109446714},{x:.5074247535047713,y:.5195567934026113},{x:.5078787867151084,y:.5213529834674229},{x:.5085344010842773,y:.5230857889106145},{x:.5229384010842772,y:.5764717889106146},{x:.5230947969602031,y:.5774089507908463},{x:.5233933154704733,y:.5783109589719573},{x:.5238196553887738,y:.5817524776504878},{x:.5243904806061233,y:.5851730002877248},{x:.5243610401661515,y:.586122666187007},{x:.5244778496604383,y:.5870655806061408},{x:.5252778496604383,y:.6189585806061408},{x:.525154398698275,y:.6206444560860672},{x:.5252359209411441,y:.6223328785443973},{x:.5248330095087286,y:.6250334227224941},{x:.5246336028763079,y:.6277565667648055},{x:.5241836259995084,y:.6293859645321488},{x:.5239341869342451,y:.6310578486269935},{x:.5118811869342451,y:.6790048486269935},{x:.5115474759395316,y:.6799350391147754},{x:.5113589931552627,y:.6809051378786065},{x:.5100605296725933,y:.6840797730170447},{x:.5089023081582834,y:.6873082151493771},{x:.5083935381649621,y:.6881554285023456},{x:.5080194201443183,y:.6890701159233712},{x:.5061265656819337,y:.6919304336788418},{x:.5043607612540449,y:.6948708843926746},{x:.5036964840076373,y:.6956025626767983},{x:.5031511078963445,y:.6964266878303904},{x:.4695951078963445,y:.7376876878303904},{x:.46829294792790443,y:.7390014838193654},{x:.46714904955699066,y:.7404551608815331},{x:.46519525859727806,y:.7421268539092958},{x:.4633851429208498,y:.7439531446668906},{x:.4618516947085211,y:.7449876576267703},{x:.4604461776978856,y:.7461902391902692},{x:.4582037971525157,y:.7474486453977692},{x:.45607217068925404,y:.7488867084403534},{x:.4543663637878686,y:.7496021826182516},{x:.45275324136800726,y:.7505074541480116},{x:.3913892413680073,y:.7774134541480116},{x:.3883140702117422,y:.7784156528007931},{x:.3852957573995619,y:.7795779210778271},{x:.3841283231887951,y:.779779788263216},{x:.3830018757962646,y:.7801468976050565},{x:.3797902739335826,y:.7805299031606142},{x:.3766032098633093,y:.781080995160135},{x:.2948022098633093,y:.7870669951601349},{x:.29450281220893076,y:.7870594704966325},{x:.2942070489499988,y:.7871065838776864},{x:.29009611613079095,y:.7869487184427649},{x:.2859834519838158,y:.7868453561974301},{x:.28569127516043946,y:.7867795665334233},{x:.28539200354491423,y:.7867680740946454},{x:.2381110035449142,y:.7802710740946455},{x:.2365476307297285,y:.7798972084805876},{x:.2349498387179436,y:.7797212234138579},{x:.23226739693423346,y:.7788736316211718},{x:.2295313767481002,y:.7782193386355017},{x:.22807098126622102,y:.7775476578384392},{x:.22653822336325463,y:.7770633405173258},{x:.15287222336325462,y:.7455503405173259},{x:.15277120515837472,y:.7454948388638573},{x:.15266147866932564,y:.7454595513468599},{x:.14890641990559073,y:.7433714396994592},{x:.14514076206912752,y:.7413025033471496},{x:.1450525127361761,y:.7412283604682699},{x:.14495177886390068,y:.7411723444149347},{x:.14167624287507044,y:.7383917796239132},{x:.1383865705572421,y:.7356279539035645},{x:.138314481468594,y:.7355380190685297},{x:.13822661135931125,y:.7354634271443719},{x:.09327661135931127,y:.6889934271443718},{x:.09215967204365061,y:.6875853345117547},{x:.09088652507606766,y:.6863167230283468},{x:.0894249598835053,y:.6841377631074377},{x:.0877944205712414,y:.6820821900242812},{x:.08697364817646357,y:.6804832494460014},{x:.08597245819367963,y:.6789906353246448},{x:.0849640705590952,y:.6765684062835642},{x:.08376588401722862,y:.6742342280213215},{x:.08327282036617045,y:.6725058858871059},{x:.08258206253775009,y:.6708466294514168},{x:.06737006253775008,y:.6210196294514168},{x:.06563362911198059,y:.61237067498716},{x:.06561788807912042,y:.6035491464015462},{x:.0673234443582347,y:.5948940500909503},{x:.07068475437800403,y:.5867379965527546},{x:.07557264487941309,y:.5793944183504645},{x:.08179927697165325,y:.5731455250760676},{x:.08912536467535526,y:.5682314581936796},{x:.09726937054858317,y:.56484106253775},{x:.10591832501283995,y:.5631046291119806},{x:.11473985359845373,y:.5630888880791204},{x:.12339494990904962,y:.5647944443582347},{x:.13155100344724535,y:.568155754378004},{x:.13889458164953555,y:.5730436448794131},{x:.14514347492393234,y:.5792702769716532},{x:.15005754180632036,y:.5865963646753553},{x:.1534479374622499,y:.5947403705485832},{x:.16549687462406137,y:.6342067386764809},{x:.19660916323298405,y:.666371100226128},{x:.2563653288901179,y:.6919337213587163},{x:.29295461470925055,y:.696961546277117},{x:.3623268316838737,y:.6918850546595318},{x:.40664087103378327,y:.672454875030618},{x:.4270299373286165,y:.6473841495451277},{x:.4351521014718352,y:.6150740687208592},{x:.4346413299816387,y:.5947115247998124},{x:.4232850296720603,y:.5526213103922067},{x:.3655461500158852,y:.45675834907300783},{x:.21087613207581168,y:.2627785664153893},{x:.04633344492647088,y:.0822700382589454},{x:.04431509861889995,y:.07956475821868986},{x:.04217386744638545,y:.07695566048588207},{x:.04168210721112112,y:.0760356417955519},{x:.04105828973109435,y:.07519951126079251},{x:.03960649933606985,y:.07215245258685718},{x:.03801542103699209,y:.06917575445642901},{x:.037712596579314576,y:.0681774760046049},{x:.037263886552519804,y:.06723571073055948},{x:.036434443560749034,y:.06396397017897336},{x:.03545466238185463,y:.06073406449072574},{x:.03535241107584656,y:.059695889558470286},{x:.035096052176974035,y:.05868468105647236},{x:.03492083161747381,y:.05531398978181981},{x:.034589999999999996,y:.05195499999999997}]],3:[[{x:.02624429558875499,y:.07454886751538828},{x:.02628189246403191,y:.06572740500388341},{x:.028039748887915363,y:.057082779207475086},{x:.03145031142385274,y:.04894719824755728},{x:.036382514066253493,y:.04163330793793327},{x:.042646815033581253,y:.035422176981524986},{x:.05000248075272204,y:.030552495657744837},{x:.05816683711519421,y:.027211403088916904},{x:.11448783711519421,y:.010388403088916982},{x:.11753114712885143,y:.009796523380387901},{x:.12053464064709668,y:.009027703431080128},{x:.20267064064709667,y:-.0035892965689199724},{x:.20562630159751,y:-.003749783589053152},{x:.20856537842676282,y:-.004101230781641964},{x:.30947437842676284,y:-.00620423078164193},{x:.31075400531193675,y:-.006105070212514369},{x:.31203499449415534,y:-.0061847225744922005},{x:.3151428517207607,y:-.005764970678224511},{x:.3182695531731509,y:-.005522677007230838},{x:.31950524711917533,y:-.005175778959545043},{x:.3207771618583987,y:-.005003992231664048},{x:.3829651618583987,y:.009716007768336019},{x:.3849642059743718,y:.010402067561162992},{x:.38702295869345676,y:.010879972006216251},{x:.389126076828856,y:.011830396347599064},{x:.3913090018652735,y:.012579562954916447},{x:.3931357912831918,y:.013642434461507345},{x:.39506175111398195,y:.014512798837572657},{x:.47719975111398194,y:.06182779883757265},{x:.47924722409526294,y:.06329195880211928},{x:.48141099047099317,y:.06457804786673271},{x:.4828265323572166,y:.06585154318044145},{x:.484375351035892,y:.06695911252196202},{x:.4860978389589892,y:.06879458122658251},{x:.48796912564078,y:.07047808832945178},{x:.54077112564078,y:.12830608832945176},{x:.5409949120745448,y:.12860551518367325},{x:.5412686389329152,y:.1288600940829806},{x:.5436334835107667,y:.13213593090859313},{x:.5460522072884215,y:.13537218987116906},{x:.5462132784472015,y:.1357095218897727},{x:.546432079841298,y:.13601261058785885},{x:.5481124005325159,y:.13968686141763526},{x:.5498532864078638,y:.14333280617235186},{x:.5499454524173568,y:.14369507987504085},{x:.5501009199323095,y:.14403503084321223},{x:.5735679199323094,y:.2123790308432122},{x:.5742003382158373,y:.21504899342087444},{x:.5750294951185407,y:.21766455299430504},{x:.5752146521018063,y:.21933125436759},{x:.575601167738761,y:.22096305773765262},{x:.575700550423256,y:.22370509641963415},{x:.5760035049491392,y:.22643215923642232},{x:.5758599468852712,y:.22810295774565637},{x:.5759206866877095,y:.2297788119316045},{x:.5754832145523405,y:.2324875517091097},{x:.575248324328873,y:.23522131827456078},{x:.563515324328873,y:.2983063182745607},{x:.5624930457986839,y:.30183400865706583},{x:.561587550163308,y:.3053934651440046},{x:.5612670272694029,y:.3060647673464004},{x:.5610599744254687,y:.30677926765590185},{x:.5593691204378909,y:.31003973780923805},{x:.5577866081350055,y:.3133541469027738},{x:.5573412794357957,y:.31395001930700017},{x:.5569988129587381,y:.31461039668740554},{x:.5547043620842722,y:.317478348572073},{x:.5525056481741942,y:.32042033938948294},{x:.4997036481741942,y:.378250339389483},{x:.4970091109540712,y:.38067456957783247},{x:.49440132723244246,y:.38319188697894757},{x:.4937347452782226,y:.3836204617554604},{x:.49314561461057166,y:.3841504927896343},{x:.49002990831948917,y:.38600246394071897},{x:.48698112816844114,y:.387962658427834},{x:.4171684643874312,y:.4237087345514058},{x:.48487098803351525,y:.4540412587201935},{x:.4882241875669253,y:.4559584413246188},{x:.4916233115558361,y:.4577929691542233},{x:.4920492459188098,y:.45814540790983926},{x:.4925291804180174,y:.45841980913886743},{x:.49544392539098053,y:.4609543303938907},{x:.49841983754054403,y:.46341674447922576},{x:.545354837540544,y:.5107317444792258},{x:.5454749496657809,y:.5108793107625336},{x:.5456205162109946,y:.5110018387655073},{x:.548258239278959,y:.5142987798858712},{x:.5509236260451226,y:.5175733969812307},{x:.5510126414958236,y:.5177415605329735},{x:.5511315069931322,y:.5178901328189077},{x:.5530753456471339,y:.5216383183828395},{x:.5550506716503533,y:.525370005791429},{x:.5551051696126684,y:.5255523041806199},{x:.555192766127671,y:.525721211199887},{x:.5563680197383496,y:.5297766005381628},{x:.5575773743081012,y:.5338219516056334},{x:.5575952604559016,y:.5340113792074108},{x:.557648221703651,y:.5341941299579837},{x:.569382221703651,y:.5972801299579837},{x:.5696549699390315,y:.6004540423597167},{x:.5701008412017201,y:.6036082951002054},{x:.5700318821169291,y:.6048400880993865},{x:.5701375119403227,y:.6060692795769916},{x:.5697858198023349,y:.6092354166829699},{x:.5696077595908724,y:.6124160465097288},{x:.5692998146426919,y:.6136107177017713},{x:.5691636114574624,y:.614836897966064},{x:.5682009942777376,y:.6178735869028962},{x:.5674058453461934,y:.6209583639953996},{x:.5668707486862845,y:.622070002836373},{x:.5664979467044567,y:.623246050467446},{x:.5649613973213707,y:.6260365929822823},{x:.5635797167972587,y:.6289069710868302},{x:.5283787167972587,y:.6867359710868302},{x:.526364685994031,y:.6894131274243959},{x:.524479650893362,y:.6921826271628648},{x:.5237177195860089,y:.6929316152663909},{x:.5230754099184859,y:.6937854072711274},{x:.5205777908604191,y:.6960182048823972},{x:.5181886735848373,y:.6983667373551676},{x:.4595186735848373,y:.7456807373551677},{x:.45627545779875317,y:.7478078267647688},{x:.4530837115337172,y:.7500113951823929},{x:.4525909707504246,y:.7502243275150239},{x:.4521421155924859,y:.7505187128152536},{x:.44854624273044896,y:.7519722107862162},{x:.4449859301027389,y:.7535107594479447},{x:.362848930102739,y:.7797967594479446},{x:.36158078031831586,y:.7800691142952486},{x:.3603625229719573,y:.7805143446587972},{x:.35727696699365546,y:.7809934249999153},{x:.35422405316989464,y:.781649085623381},{x:.352927136733123,y:.7816688034988555},{x:.3516454277250751,y:.7818678086678129},{x:.2577774277250751,y:.7871168086678129},{x:.2534831925795917,y:.7869349938938289},{x:.24918809681378723,y:.7867747925856998},{x:.2490774333618657,y:.786748457272228},{x:.24896378128970398,y:.7867436453266514},{x:.24478752897123962,y:.7857275603552258},{x:.2406062159909945,y:.7847325056542677},{x:.16433721599099446,y:.7584545056542678},{x:.1612047546311144,y:.7570179671101032},{x:.15801334200327716,y:.7557176430739929},{x:.09817134200327716,y:.7241756430739928},{x:.09479788711775466,y:.721949723610623},{x:.09138819905405325,y:.7197797137879894},{x:.05384019905405325,y:.6903397137879895},{x:.04746503339724546,y:.6842424293748122},{x:.0424018859405069,y:.677018569451043},{x:.0388453306011542,y:.6689457429023652},{x:.036932043806339465,y:.6603341839257509},{x:.036735552094603836,y:.6515148299032538},{x:.03826340653223549,y:.6428266036640077},{x:.041456892530026886,y:.6346033888699733},{x:.046193286212010486,y:.6271611990540533},{x:.05229057062518783,y:.6207860333972455},{x:.05951443054895701,y:.615722885940507},{x:.06758725709763488,y:.6121663306011542},{x:.07619881607424907,y:.6102530438063395},{x:.08501817009674617,y:.6100565520946039},{x:.09370639633599236,y:.6115844065322356},{x:.1019296111300268,y:.6147778925300269},{x:.10937180094594674,y:.6195142862120105},{x:.14372643260130716,y:.6464504840370294},{x:.1969218011618275,y:.6744891243755197},{x:.2615721948597163,y:.6967640072977177},{x:.3408866683163358,y:.6923288252210377},{x:.40955721054777616,y:.6703524458415177},{x:.4555820596629536,y:.6332360369266462},{x:.477752059875079,y:.596814658492312},{x:.4716998550115053,y:.5642759337587675},{x:.44042564505409965,y:.532748518309004},{x:.3700728058889163,y:.5012285825754976},{x:.28267158635688694,y:.4816496665818946},{x:.2026156257994338,y:.47140070238604853},{x:.19958923290487823,y:.4707064281346213},{x:.19652752938874105,y:.4701896668089735},{x:.19529880233776667,y:.46972217540403877},{x:.1940174323454584,y:.4694282207777866},{x:.19118463692903986,y:.4681568668470777},{x:.18828257832087977,y:.4670527262205195},{x:.18716866396437967,y:.46635450477580015},{x:.18596926283986664,y:.4658162155208443},{x:.1834389276407875,y:.4640166393294268},{x:.18080803842542348,y:.46236755090702814},{x:.17985174386742717,y:.4614654316810775},{x:.17878040392329292,y:.4607034939516098},{x:.17664976830422657,y:.45844485220330683},{x:.1743911520787843,y:.45631418952832026},{x:.17362922718285934,y:.45524284045707714},{x:.17272711941234267,y:.45428653509274164},{x:.17107806250525512,y:.45165562612327925},{x:.16927851662463225,y:.44912526936741537},{x:.1687402417372368,y:.44792586179486843},{x:.1680420336360506,y:.4468119390745141},{x:.1669379277730794,y:.44390986724015796},{x:.1656666077762714,y:.4410770565945043},{x:.16537266849946,y:.43979568308103084},{x:.16490519181337332,y:.438566950430106},{x:.16438846716364272,y:.4355052407239498},{x:.16369422916516244,y:.43247883951296023},{x:.16365592142049992,y:.43116474252408066},{x:.16343714101639506,y:.42986841944927895},{x:.1635276550184117,y:.4267647316583033},{x:.16343717819520762,y:.42366104278329114},{x:.1636559741278381,y:.4223647223293339},{x:.1636942976139514,y:.42105062579943375},{x:.1643885718653787,y:.41802423290487795},{x:.16490533319102646,y:.414962529388741},{x:.1653728245959611,y:.41373380233776696},{x:.1656667792222133,y:.41245243234545836},{x:.1669381331529224,y:.40961963692903947},{x:.16804227377948042,y:.40671757832087974},{x:.16874049522419982,y:.4056036639643795},{x:.16927878447915568,y:.4044042628398666},{x:.17107836067057278,y:.40187392764078794},{x:.1727274490929718,y:.3992430384254234},{x:.17362956831892262,y:.3982867438674269},{x:.17439150604839013,y:.3972154039232929},{x:.1766501477966929,y:.39508476830422673},{x:.1787808104716797,y:.39282615207878424},{x:.17985215954292283,y:.39206422718285927},{x:.18080846490725827,y:.39116211941234263},{x:.18343937387672077,y:.38951306250525497},{x:.18596973063258454,y:.3877135166246322},{x:.18716913820513145,y:.3871752417372368},{x:.1882830609254858,y:.38647703363605057},{x:.19118513275984234,y:.3853729277730792},{x:.19401794340549564,y:.3841016077762714},{x:.19529931691896882,y:.38380766849946},{x:.19652804956989395,y:.38334019181337325},{x:.19958975927605035,y:.38282346716364263},{x:.20261616048703973,y:.3821292291651624},{x:.28149235433605535,y:.37203226198800626},{x:.3678476199052635,y:.34785057975990136},{x:.4387239808422848,y:.31155986033736477},{x:.4773813812672204,y:.26922136053481893},{x:.48460036747312013,y:.2304069273293995},{x:.4680118822440525,y:.1820955353962423},{x:.4262197745588727,y:.1363254129914362},{x:.35583608100487274,y:.09578139608686695},{x:.3056218275014876,y:.083895601213743},{x:.2134048551529998,y:.08581745449589688},{x:.13726972612583144,y:.09751265420048184},{x:.0839251628848058,y:.11344659691108305},{x:.0752658675153883,y:.11513070441124498},{x:.06644440500388343,y:.11509310753596806},{x:.05779977920747511,y:.11333525111208462},{x:.0496641982475573,y:.10992468857614723},{x:.04235030793793329,y:.10499248593374648},{x:.036139176981525016,y:.09872818496641873},{x:.03126949565774486,y:.09137251924727793},{x:.027928403088916927,y:.08320816288480577},{x:.02624429558875499,y:.07454886751538828}]],4:[[{x:.003828000000000005,y:.27580099999999996},{x:.0040512821902059844,y:.2735339778783202},{x:.004058111165048277,y:.2712559968420181},{x:.004482570943879651,y:.26915502967601196},{x:.004692662381854638,y:.26702193550927417},{x:.005353928343121064,y:.26484203377636983},{x:.005805038155045426,y:.26260915577382815},{x:.0066312204192078995,y:.26063136609773396},{x:.0072534210369921,y:.25858024554357095},{x:.008327258689269697,y:.2565712366005347},{x:.009205313441189196,y:.2544692698811785},{x:.010401468469599332,y:.25269066304309135},{x:.011411867446385462,y:.25080033951411784},{x:.01285700981091242,y:.2490394284479652},{x:.014128266351129452,y:.24714915041402313},{x:.01564842657685691,y:.24563807727727646},{x:.017008194846605366,y:.24398119484660533},{x:.018769105912757822,y:.24253605248207852},{x:.020384710565360974,y:.24093010545831445},{x:.022170457083446928,y:.23974463571613375},{x:.023827339514117918,y:.23838486744638543},{x:.025836348457154004,y:.2373110297941079},{x:.027734214441385185,y:.2360511294240198},{x:.029716922014597604,y:.23523682001377813},{x:.031607245543570965,y:.23422642103699207},{x:.03378714727647517,y:.23356515507572567},{x:.03589434066689576,y:.23269971862397582},{x:.03799781495511128,y:.23228786299963877},{x:.040048935509274235,y:.2316656623818546},{x:.04231595763095386,y:.23144238019164864},{x:.0445515001672978,y:.23100466589573537},{x:.046694905833262405,y:.23101109143797494},{x:.048828,y:.23080099999999998},{x:.36918100000000004,y:.23080099999999998},{x:.36918100000000004,y:.05103000000000002},{x:.37004566238185466,y:.04225093550927423},{x:.3726064210369921,y:.03380924554357098},{x:.3767648674463855,y:.026029339514117924},{x:.38236119484660536,y:.019210194846605383},{x:.38918033951411796,y:.013613867446385479},{x:.396960245543571,y:.009455421036992116},{x:.4054019355092743,y:.006894662381854655},{x:.414181,y:.0060300000000000215},{x:.4229600644907258,y:.006894662381854655},{x:.4314017544564291,y:.009455421036992116},{x:.43918166048588214,y:.013613867446385486},{x:.4460008051533947,y:.019210194846605383},{x:.45159713255361456,y:.026029339514117924},{x:.45575557896300795,y:.03380924554357098},{x:.4583163376181454,y:.04225093550927425},{x:.459181,y:.05103000000000002},{x:.459181,y:.23080099999999998},{x:.553224,y:.23080099999999998},{x:.5620030644907258,y:.2316656623818546},{x:.5704447544564291,y:.23422642103699207},{x:.5782246604858822,y:.23838486744638543},{x:.5850438051533947,y:.24398119484660533},{x:.5906401325536146,y:.25080033951411784},{x:.5947985789630079,y:.25858024554357095},{x:.5973593376181454,y:.26702193550927417},{x:.5982240000000001,y:.27580099999999996},{x:.5973593376181454,y:.28458006449072576},{x:.5947985789630079,y:.293021754456429},{x:.5906401325536146,y:.3008016604858821},{x:.5850438051533947,y:.3076208051533946},{x:.5782246604858822,y:.3132171325536145},{x:.5704447544564291,y:.3173755789630079},{x:.5620030644907258,y:.31993633761814533},{x:.553224,y:.32080099999999995},{x:.459181,y:.32080099999999995},{x:.459181,y:.421833},{x:.4583163376181454,y:.4306120644907258},{x:.45575557896300795,y:.439053754456429},{x:.45159713255361456,y:.4468336604858821},{x:.4460008051533947,y:.4536528051533947},{x:.43918166048588214,y:.45924913255361455},{x:.4314017544564291,y:.4634075789630079},{x:.4229600644907258,y:.4659683376181454},{x:.414181,y:.466833},{x:.4054019355092743,y:.4659683376181454},{x:.396960245543571,y:.4634075789630079},{x:.38918033951411796,y:.45924913255361455},{x:.38236119484660536,y:.4536528051533947},{x:.3767648674463855,y:.4468336604858821},{x:.3726064210369921,y:.439053754456429},{x:.37004566238185466,y:.4306120644907258},{x:.36918100000000004,y:.421833},{x:.36918100000000004,y:.32080099999999995},{x:.1436046917940101,y:.32080099999999995},{x:.4533648945416855,y:.700560710565361},{x:.45824387057598015,y:.7079102144413851},{x:.4615952813760241,y:.7160703406668958},{x:.46329033410426457,y:.7247275001672978},{x:.46326388883495173,y:.7335490031579818},{x:.46151696184495455,y:.7421958442261718},{x:.45811668655881077,y:.7503357301188214},{x:.4531937336488705,y:.7576558495859769},{x:.446937289434639,y:.7638748945416856},{x:.4395877855586148,y:.7687538705759801},{x:.43142765933310423,y:.7721052813760241},{x:.42277049983270215,y:.7738003341042645},{x:.41394899684201814,y:.7737738888349517},{x:.40530215577382817,y:.7720269618449546},{x:.39716226988117853,y:.7686266865588108},{x:.38984215041402315,y:.7637037336488706},{x:.38362310545831446,y:.757447289434639},{x:.013957105458314502,y:.304244289434639},{x:.012771635716133971,y:.30245854291655333},{x:.011411867446385462,y:.3008016604858821},{x:.010338029794107799,y:.29879265154284573},{x:.009078129424019837,y:.29689478555861476},{x:.008263820013778204,y:.2949120779854024},{x:.0072534210369921,y:.293021754456429},{x:.006592155075725704,y:.29084185272352475},{x:.005726718623975863,y:.2887346593331042},{x:.0053148629996388475,y:.28663118504488877},{x:.004692662381854638,y:.28458006449072576},{x:.00446938019164866,y:.282313042369046},{x:.00403166589573542,y:.2800774998327022},{x:.00403809143797499,y:.27793409416673776},{x:.003828000000000005,y:.27580099999999996}]],5:[[{x:.029951000000000005,y:.38529899999999995},{x:.030026331329377584,y:.3845341481773043},{x:.029977079633894697,y:.38376717530271315},{x:.030458063889865227,y:.38015069392879464},{x:.03081566238185464,y:.37651993550927415},{x:.03103876142924568,y:.3757844765131909},{x:.03114008507636279,y:.3750226322781917},{x:.0323173678705276,y:.3715694759531816},{x:.0333764210369921,y:.36807824554357094},{x:.033738714231120716,y:.3674004426508694},{x:.033986719409902104,y:.366673004302166},{x:.03581505842470893,y:.3635158758870829},{x:.03753486744638546,y:.3602983395141178},{x:.03802243206297786,y:.35970424030984804},{x:.03840758807348568,y:.3590391628952293},{x:.04081672126593952,y:.35629938906452685},{x:.04313119484660537,y:.3534791948466053},{x:.04372529405087513,y:.3529916302300129},{x:.04423279956362368,y:.3524144723015426},{x:.04713014529619686,y:.3501973410270508},{x:.04995033951411792,y:.3478828674463854},{x:.05062814240681941,y:.3475205742522568},{x:.05123849426956635,y:.347053515665452},{x:.054512709170605814,y:.34544423005866864},{x:.057730245543570965,y:.343724421036992},{x:.05846570453965444,y:.3435013219896009},{x:.05915544727260316,y:.34316231154402344},{x:.06268070509966306,y:.34222271554831923},{x:.06617193550927424,y:.3411636623818546},{x:.0669367873319697,y:.34108833105247705},{x:.06767941450870582,y:.34089039672943083},{x:.07132024158048059,y:.34065659849198926},{x:.074951,y:.34029899999999996},{x:.0757158518226955,y:.3403743313293775},{x:.07648282469728679,y:.34032507963389463},{x:.08009930607120508,y:.3408060638898651},{x:.08373006449072577,y:.3411636623818546},{x:.0844655234868091,y:.3413867614292456},{x:.08522736772180821,y:.34148808507636275},{x:.2701097088502776,y:.3848544225750548},{x:.39095673206080095,y:.3699215697302287},{x:.4312208460684155,y:.34735587040502247},{x:.4569274445394237,y:.3179203076157562},{x:.4808881134259603,y:.2201177906149206},{x:.47151862074291284,y:.1781066999956386},{x:.4461217481742335,y:.14395206669668215},{x:.3876788357927069,y:.10680533743499816},{x:.3169820044514503,y:.08634947983662909},{x:.2505487358362677,y:.08307118781270932},{x:.19638270317906092,y:.09339965838335124},{x:.15518503458472022,y:.11245499400015477},{x:.1051531598037562,y:.15775209985578706},{x:.09806479623887651,y:.16300326318775482},{x:.09008818244690309,y:.16677065575830224},{x:.0815298552225249,y:.16890949878372125},{x:.07271870628140957,y:.16933759772602197},{x:.06399334313601493,y:.16803850098293246},{x:.05568907659877849,y:.16506213211374782},{x:.04812503497563989,y:.16052287130494386},{x:.041591900144212934,y:.15459515980375618},{x:.03634073681224515,y:.1475067962388765},{x:.03257334424169774,y:.13953018244690307},{x:.03043450121627874,y:.13097185522252489},{x:.03000640227397801,y:.12216070628140954},{x:.031305499017067515,y:.1134353431360149},{x:.034281867886252176,y:.10513107659877846},{x:.03882112869505611,y:.09756703497563987},{x:.044748840196243804,y:.09103390014421289},{x:.09986584019624378,y:.041132900144212926},{x:.10178680031290575,y:.03970982481314967},{x:.10357183338498165,y:.03811957700249835},{x:.10532248536915285,y:.037090537646117014},{x:.10695420376112348,y:.035881736812245144},{x:.10911588139237749,y:.0348607662023731},{x:.11117685751196796,y:.03364931723433351},{x:.16362485751196798,y:.009390317234333478},{x:.1646572774363771,y:.009030847933342759},{x:.16562545909873666,y:.008523173483185618},{x:.16881529925253239,y:.0075831025339957205},{x:.1719558576504946,y:.006489618860012841},{x:.17303856889723523,y:.006338471796353147},{x:.17408718959239433,y:.0060294350406820685},{x:.23897018959239436,y:-.00634256495931787},{x:.2399001168767359,y:-.006426714843400178},{x:.24080591100583193,y:-.006653392925378379},{x:.24428588214420577,y:-.0068235863462415185},{x:.247755834543085,y:-.007137585190079683},{x:.24868431036339586,y:-.007038698344381461},{x:.24961692261229596,y:-.007084309202250054},{x:.32666292261229596,y:-.003282309202250082},{x:.32746661284147915,y:-.0031629125067284265},{x:.32827905619988357,y:-.00317336931171093},{x:.3318231917274382,y:-.002515696572186591},{x:.33538870069659477,y:-.001986002452099067},{x:.33615365510360457,y:-.0017121077449900682},{x:.3369525276121403,y:-.0015638637889859724},{x:.4188855276121403,y:.02214313621101406},{x:.4207304127428032,y:.02287964098341223},{x:.42264402370761556,y:.023412682727046455},{x:.4248170355152836,y:.024511079778651145},{x:.4270783417525648,y:.02541382586724525},{x:.42874409297954025,y:.02649609814118395},{x:.43051694316083267,y:.027392224616519634},{x:.5014129431608326,y:.07245422461651957},{x:.5044011686844615,y:.0747943741105689},{x:.5074525565132345,y:.07705154573740032},{x:.5078697672823866,y:.07751071502587484},{x:.5083582165656543,y:.07789323111579813},{x:.5108324836553944,y:.0807713891731658},{x:.5133848875831327,y:.08358048611421783},{x:.5494628875831328,y:.1320994861142178},{x:.5497798823390716,y:.1326268676033582},{x:.5501811109693575,y:.13309337858567127},{x:.5520495631508493,y:.13640291633591076},{x:.5540074974944301,y:.13966031511116345},{x:.5542155142604781,y:.14023940572188273},{x:.5545180216173755,y:.1407752286491667},{x:.5557049132287019,y:.14438569149730107},{x:.5569897394368822,y:.14796247431004633},{x:.5570807842453774,y:.1485710199149322},{x:.5572729451408087,y:.14915556341258465},{x:.5710219451408087,y:.2108035634125847},{x:.5712046210163666,y:.21230267395853206},{x:.5715791512667351,y:.2137656948046034},{x:.571736996194895,y:.21667155541097086},{x:.5720890113736304,y:.2195603313107129},{x:.5719757152243157,y:.2210662751632623},{x:.5720576277729665,y:.2225742517011615},{x:.5716455344736617,y:.2254550710286549},{x:.5714272135589309,y:.2283570146640783},{x:.5710222992922247,y:.22981191924551903},{x:.5708084462858501,y:.23130690078257787},{x:.5417354462858501,y:.3499769007825779},{x:.5411002871662289,y:.3517814599872898},{x:.540669734049328,y:.3536454570484658},{x:.5396393400617131,y:.355932176655931},{x:.5388066121493867,y:.3582980512419798},{x:.5378316053978042,y:.3599440229503987},{x:.537045677451414,y:.361688207084494},{x:.5355889653307644,y:.36372996812105773},{x:.5343106788169316,y:.36588792593376723},{x:.5330332933960605,y:.36731205637621067},{x:.5319221933904076,y:.36886939956510134},{x:.49389619339040763,y:.4124113995651013},{x:.49150876583293945,y:.41465677330496736},{x:.4892379705562563,y:.41702003426923534},{x:.48830169237996507,y:.41767302336482964},{x:.48747017448549057,y:.4184550652905171},{x:.4846905699931398,y:.420191530792605},{x:.4820023580684325,y:.4220663721783498},{x:.4272473580684325,y:.4527533721783498},{x:.42330567688981036,y:.45447898255061825},{x:.4193723578126433,y:.45622356923745777},{x:.4192660752068488,y:.4562474610875831},{x:.4191662841579818,y:.4562911481493166},{x:.41496369139475175,y:.45721461755172516},{x:.4107655979622113,y:.4581583300092093},{x:.27317359796221125,y:.47516033000920926},{x:.26964530070808584,y:.4752477446385603},{x:.2661231753027132,y:.4754739203661053},{x:.26524270860794985,y:.4753568201865933},{x:.26435476148695686,y:.47537881934450843},{x:.2608772057270339,y:.4747762176787918},{x:.2573786322781918,y:.4743109149236372},{x:.119951,y:.44207564006371447},{x:.119951,y:.684004},{x:.527101,y:.684004},{x:.5358800644907258,y:.6848686623818546},{x:.544321754456429,y:.6874294210369921},{x:.5521016604858822,y:.6915878674463855},{x:.5589208051533947,y:.6971841948466053},{x:.5645171325536146,y:.7040033395141179},{x:.5686755789630079,y:.711783245543571},{x:.5712363376181454,y:.7202249355092742},{x:.5721010000000001,y:.729004},{x:.5712363376181454,y:.7377830644907257},{x:.5686755789630079,y:.746224754456429},{x:.5645171325536146,y:.7540046604858821},{x:.5589208051533947,y:.7608238051533946},{x:.5521016604858822,y:.7664201325536145},{x:.544321754456429,y:.7705785789630079},{x:.5358800644907258,y:.7731393376181454},{x:.527101,y:.774004},{x:.074951,y:.774004},{x:.06617193550927424,y:.7731393376181454},{x:.05773024554357094,y:.7705785789630079},{x:.04995033951411792,y:.7664201325536145},{x:.04313119484660537,y:.7608238051533946},{x:.03753486744638546,y:.7540046604858821},{x:.0333764210369921,y:.746224754456429},{x:.03081566238185464,y:.7377830644907257},{x:.029951000000000005,y:.729004},{x:.029951000000000005,y:.38529899999999995}]],6:[[{x:.01994450211145162,y:.2755194646798348},{x:.020758274672659796,y:.26806396163938684},{x:.0201773643330274,y:.24423363638780976},{x:.020440223451033163,y:.2406784570189078},{x:.020568639264984916,y:.237115887070161},{x:.02076496657089406,y:.23628629421823594},{x:.02082782677693791,y:.23543610758842642},{x:.021779216218601925,y:.23200052126419074},{x:.022600187477202785,y:.22853145778054884},{x:.04459918747720279,y:.16442145778054884},{x:.04602253566469808,y:.16130748249724527},{x:.047307319174730654,y:.15813382633120915},{x:.06831231917473066,y:.11806482633120913},{x:.06934150993632018,y:.11649740482650416},{x:.07018719324152095,y:.11482382676006757},{x:.07175673818837072,y:.11281909673987861},{x:.07315419088510985,y:.11069082519836773},{x:.0744693948008918,y:.10935430641546007},{x:.07562532742241568,y:.1078778703106287},{x:.1253733274224157,y:.055788870310628645},{x:.12585541612958862,y:.055374327647901005},{x:.12626130847256478,y:.0548849335871293},{x:.1291958120945167,y:.0525019586891126},{x:.1320620582603259,y:.05003730581521479},{x:.13261575702973094,y:.04972477931463493},{x:.1331093263100589,y:.049323974491408525},{x:.1861743263100589,y:.014262974491408516},{x:.18683955107784095,y:.013911818906951787},{x:.187438960697758,y:.013457349607970202},{x:.1907349034619545,y:.011855559414887177},{x:.19397565070571454,y:.010144849670490022},{x:.19469660042216425,y:.009930220356283175},{x:.19537315511619574,y:.009601422573216056},{x:.19891826102894206,y:.008673416864759805},{x:.2024304811380398,y:.007627816351770726},{x:.20317945010986724,y:.007557961391993223},{x:.20390715026053782,y:.0073674706392518954},{x:.2857161502605378,y:-.005654529360748083},{x:.2860775594607644,y:-.005676122674759226},{x:.28642923596273784,y:-.0057621838110407525},{x:.2904772893795591,y:-.005938995755027237},{x:.2945219894833068,y:-.006180656673914681},{x:.2948806669536751,y:-.006131327641200151},{x:.2952423757850646,y:-.006147126454864343},{x:.38700037578506463,y:-.001139126454864331},{x:.39074801870473747,y:-.000562375362895672},{x:.3945101708776463,y:-8942684208443352e-20},{x:.395102371884912,y:.00010774663253235539},{x:.3957192721812796,y:.00020268575218489876},{x:.39928238663684656,y:.0014994835976446027},{x:.4028799824314506,y:.002697304024131271},{x:.47474098243145063,y:.03475230402413133},{x:.4764407459001163,y:.03572046389197228},{x:.4782361407270164,y:.03649705052245801},{x:.48026428101539703,y:.03789829234877595},{x:.4824063061811086,y:.03911835786940705},{x:.4838845305509628,y:.04039952221931584},{x:.48549392283388365,y:.041511451110380196},{x:.5363469228338836,y:.08458545111038014},{x:.5369424578291695,y:.08519979361043255},{x:.5376274627831791,y:.08571247952886965},{x:.5400078699953618,y:.08836201411598918},{x:.5424869876672573,y:.09091942444541115},{x:.5429512273484354,y:.09163814564059086},{x:.5435230500634102,y:.09227461827992436},{x:.5453408198626901,y:.09533763721244376},{x:.5472733759789791,y:.0983295594844189},{x:.5475884798754501,y:.09912503932225875},{x:.5480251455251356,y:.09986083939589693},{x:.5756631455251356,y:.15896283939589692},{x:.5756676990332947,y:.1589757429605767},{x:.575674675284325,y:.15898751446598428},{x:.5771354507402345,y:.1631350040011944},{x:.5785987361645655,y:.16728160865370237},{x:.5786006848177536,y:.16729515262537814},{x:.5786052305152959,y:.16730805894366996},{x:.5792288025114348,y:.17166083878445604},{x:.5798550088797246,y:.1760132404159827},{x:.5798542777922926,y:.17602690430741857},{x:.5798562182477396,y:.17604044945602063},{x:.5820672182477395,y:.2261264494560206},{x:.5819074721227447,y:.22907858468741052},{x:.5819395990078049,y:.232034864293962},{x:.5816696541741431,y:.23347350033714379},{x:.5815905637246603,y:.23493510513282764},{x:.580857954063737,y:.2377993509905685},{x:.5803127220992973,y:.2407050941577823},{x:.5648357220992973,y:.2937960941577823},{x:.5632290277642941,y:.2977974374258546},{x:.5616400226499054,y:.30180583827676916},{x:.5384240226499054,y:.3468838382767692},{x:.5373215489467563,y:.3485896803397862},{x:.5364060617863755,y:.35040275195151915},{x:.5349331318310961,y:.3522852445680167},{x:.5336357086983223,y:.35429272914301846},{x:.5322216254408594,y:.35575071197935654},{x:.5309700163849885,y:.3573503432435408},{x:.49559401638498846,y:.39441334324354077},{x:.4926979475395651,y:.39690515537305066},{x:.48986855873600776,y:.3994724304741097},{x:.48935820160472765,y:.3997787125549045},{x:.48890701524930746,y:.4001669186691625},{x:.48558046512393155,y:.4020458563236817},{x:.4823045917066957,y:.404011815580751},{x:.4336605917066957,y:.42705181558075106},{x:.43309173356321873,y:.4272557130907893},{x:.4325654489917744,y:.42755269513041455},{x:.42894434743018467,y:.4287422729922158},{x:.4253563740806812,y:.43002832091195864},{x:.42475866795602985,y:.4301173218701226},{x:.42418455747331046,y:.430305924456616},{x:.35674655747331047,y:.44533192445661596},{x:.3529000911149492,y:.4457998510145922},{x:.3490659246900917,y:.4463596961147396},{x:.28494592469009167,y:.4493636961147396},{x:.2805873413475358,y:.449139645094856},{x:.27622830276644406,y:.44892463285807194},{x:.20879130276644411,y:.4389076328580719},{x:.2058686377582091,y:.4381749274884603},{x:.2029059705898912,y:.4376259000221244},{x:.2015992206546876,y:.4371045944779896},{x:.20023455588710068,y:.4367624761715421},{x:.19751099279397463,y:.4354736658725529},{x:.19471236238975773,y:.4343572001231398},{x:.1250653623897577,y:.39829620012313977},{x:.12281565387932818,y:.3968352958512946},{x:.12046004217050754,y:.3955521266688945},{x:.11912493361112,y:.39443863469229795},{x:.1176668837895426,y:.39349181371392206},{x:.11574541108214431,y:.3916200839502759},{x:.11440461043594556,y:.3905018447245139},{x:.11499744675527566,y:.4076710597897629},{x:.14015918883207887,y:.48309781218266834},{x:.17625691985197756,y:.5624688107059582},{x:.22079283681825793,y:.6049160879451294},{x:.2812243215554422,y:.6473094683632384},{x:.35529887985725983,y:.6721340784004237},{x:.44197867319461825,y:.699237682451455},{x:.450099621980826,y:.7026829408131323},{x:.45739239245003865,y:.7076463180152294},{x:.4635767275229571,y:.7139370742553635},{x:.4684149666709443,y:.7213134592991232},{x:.47172117907685873,y:.729492002806001},{x:.4733683088520865,y:.7381584079356077},{x:.4732930577230865,y:.7469796295989887},{x:.471498317548545,y:.7556166731946181},{x:.4680530591868676,y:.7637376219808258},{x:.4630896819847706,y:.7710303924500386},{x:.4567989257446365,y:.7772147275229571},{x:.4494225407008768,y:.7820529666709441},{x:.4412439971939989,y:.7853591790768587},{x:.43257759206439217,y:.7870063088520864},{x:.4237563704010112,y:.7869310577230865},{x:.41511932680538177,y:.7851363175485448},{x:.32800332680538175,y:.7578963175485449},{x:.32758097645219697,y:.7577171382279785},{x:.32713377373466446,y:.7576146941984534},{x:.2464307737346645,y:.7305686941984535},{x:.24453959681011464,y:.7297206474805041},{x:.2425703892464572,y:.7290741531131611},{x:.24052462272791658,y:.727920241844807},{x:.2383814751569417,y:.7269592057619036},{x:.2366920823739949,y:.725758503708645},{x:.23488683737580707,y:.7247402582115807},{x:.16634483737580705,y:.6766572582115807},{x:.16379281785599412,y:.6744641039532857},{x:.16114120086592887,y:.6723924725748345},{x:.10785520086592887,y:.6216054725748346},{x:.10512406158167997,y:.61843588774195},{x:.10236095541706475,y:.6152941312068447},{x:.10224621895073822,y:.6150960484276141},{x:.1020967920615373,y:.6149226331776604},{x:.10003648617852028,y:.6112811321861437},{x:.09793939861820375,y:.6076606883504815},{x:.057256398618203745,y:.5182076883504814},{x:.05649445644348035,y:.515973451082899},{x:.055531562043165734,y:.5138181769891187},{x:.02756156204316574,y:.4299731769891187},{x:.02710606704062858,y:.4279720709807987},{x:.026442901166776424,y:.42602987841114226},{x:.0261294707087366,y:.42368163359604843},{x:.025603668479436986,y:.4213716499642221},{x:.02554732210120287,y:.4193201319800137},{x:.025275801747494525,y:.4172858808521062},{x:.022290801747494524,y:.3308368808521062},{x:.022305383523873214,y:.330608131273329},{x:.022277364333027405,y:.33038063638780973},{x:.021194122115214913,y:.2859434614650037},{x:.02071653916751727,y:.2843071590959475},{x:.01994450211145162,y:.2755194646798348}],[{x:.11034731747482908,y:.25010871966048204},{x:.11054573733688708,y:.2582483748303443},{x:.14138614929871246,y:.28974619429248377},{x:.17280436841728808,y:.32166563054627706},{x:.2294333737827033,y:.3509863272379111},{x:.2851142784460479,y:.35925709287120927},{x:.3409693478959939,y:.3566403020317264},{x:.39969116147327427,y:.34355637352239615},{x:.43624565447916347,y:.3262425111990739},{x:.46138408324665353,y:.29990528863548604},{x:.47964461062187336,y:.2644492215688011},{x:.49182659739178797,y:.22266115801633354},{x:.4903391577658353,y:.18896604218391924},{x:.47066764412974615,y:.14689983627465894},{x:.4322187986209955,y:.11433252320671945},{x:.3738017517723872,y:.08827446060346957},{x:.29512698962943984,y:.08398052210424463},{x:.22766698305582697,y:.09471851188045},{x:.18695506157646963,y:.1216176107024183},{x:.1450838647757246,y:.1654591474507099},{x:.12861258258928074,y:.1968796571354811},{x:.11034731747482908,y:.25010871966048204}]],7:[[{x:.026534000000000002,y:.729004},{x:.027398662381854635,y:.7202249355092742},{x:.029959421036992097,y:.711783245543571},{x:.03411786744638546,y:.7040033395141179},{x:.039714194846605363,y:.6971841948466053},{x:.046533339514117915,y:.6915878674463855},{x:.05431324554357096,y:.6874294210369921},{x:.06275493550927423,y:.6848686623818546},{x:.071534,y:.684004},{x:.4019606654607806,y:.684004},{x:.4004737160341744,y:.6825246433416329},{x:.3773547160341744,y:.6545006433416328},{x:.37631768094411194,y:.6529571778549935},{x:.37511206403824765,y:.6515414747212956},{x:.3516100640382476,y:.6177174747212957},{x:.35070717908442606,y:.6160998190359583},{x:.34962595461558005,y:.6145955036421288},{x:.32637595461558006,y:.5744575036421288},{x:.32562538351875275,y:.5728072168885044},{x:.3246890272988689,y:.5712547864166106},{x:.3023170272988689,y:.5242907864166106},{x:.3017220252289498,y:.5226423026482856},{x:.3009361907094137,y:.5210757809262708},{x:.2800741907094137,y:.4667717809262708},{x:.2796297795277362,y:.4651572895546526},{x:.27899211910181604,y:.46360891205912846},{x:.26027511910181605,y:.40145091205912853},{x:.2599700482242006,y:.399900691568321},{x:.2594722021762355,y:.3984012246220316},{x:.2435242021762355,y:.3278752246220315},{x:.24329560198997774,y:.32604433113097486},{x:.24285939794168837,y:.32425152465814894},{x:.22552039794168838,y:.201651524658149},{x:.22543629437721757,y:.19966542745190077},{x:.2251384028560513,y:.1976999971774209},{x:.21759140285605127,y:.0533799971774209},{x:.2179964236931644,y:.04456775725283754},{x:.22011284489303193,y:.03600385769296016},{x:.22385933357584556,y:.028017404355184638},{x:.22909191428257988,y:.020915312162427036},{x:.23560950187114016,y:.014970510534755857},{x:.24316162910560324,y:.010411454864839347},{x:.25145807197163045,y:.007413347105324521},{x:.2601800028225791,y:.006091402856051323},{x:.26899224274716244,y:.0064964236931644576},{x:.27755614230703984,y:.008612844893031955},{x:.2855425956448154,y:.0123593335758456},{x:.29264468783757297,y:.017591914282579925},{x:.29858948946524416,y:.02410950187114019},{x:.30314854513516065,y:.03166162910560326},{x:.30614665289467546,y:.03995807197163046},{x:.3074685971439487,y:.04868000282257914},{x:.3149118365119932,y:.19101580586964154},{x:.33171443080019297,y:.3098230069615897},{x:.3469078029209317,y:.3770118558572018},{x:.3646876244488305,y:.43605754408347375},{x:.3843219343355222,y:.48716585412502805},{x:.40516196826036527,y:.5309139031705462},{x:.42657620329737017,y:.5678827017045378},{x:.4479617026009278,y:.5986606409626235},{x:.4682073320853445,y:.6232016470905397},{x:.5069453480603512,y:.6602460238293135},{x:.5211069187127709,y:.670919967941474},{x:.553634852004927,y:.6903949675582732},{x:.5545334052571363,y:.6910607030437311},{x:.5555196604858821,y:.6915878674463855},{x:.5580709875097788,y:.6936816874233654},{x:.5607229359621996,y:.6956465083018619},{x:.5614743452153894,y:.6964747509099635},{x:.5623388051533946,y:.6971841948466053},{x:.5644326251303754,y:.699735521870503},{x:.5666502995990071,y:.7021799587443133},{x:.5672256886169725,y:.7031388795761127},{x:.5679351325536145,y:.7040033395141179},{x:.5694909811561905,y:.7069141275182039},{x:.5711891576548912,y:.709744242049125},{x:.5715664145603537,y:.7107969903148255},{x:.5720935789630078,y:.711783245543571},{x:.5730516658019124,y:.7149416345772374},{x:.5741650843601849,y:.7180486670509921},{x:.5743297113818354,y:.7191547862251302},{x:.5746543376181453,y:.7202249355092742},{x:.574977843953461,y:.7235095504532041},{x:.5754637165205229,y:.7267740993542682},{x:.5754093871342436,y:.7278910818973009},{x:.575519,y:.729004},{x:.5751954936646845,y:.7322886149439295},{x:.5750351484302645,y:.735585225488817},{x:.5747639504839017,y:.7366701463880269},{x:.5746543376181453,y:.7377830644907257},{x:.5736962507792408,y:.7409414535243923},{x:.5728958497207748,y:.7441434388186243},{x:.5724182051993175,y:.7451546051722857},{x:.5720935789630078,y:.746224754456429},{x:.570537730360432,y:.749135542460515},{x:.5691280324417267,y:.752119852004927},{x:.5684622969562688,y:.7530184052571364},{x:.5679351325536145,y:.7540046604858821},{x:.5658413125766343,y:.756555987509779},{x:.563876491698138,y:.7592079359621996},{x:.5630482490900365,y:.7599593452153895},{x:.5623388051533946,y:.7608238051533946},{x:.5597874781294971,y:.7629176251303754},{x:.5573430412556867,y:.7651352995990072},{x:.5563841204238874,y:.7657106886169726},{x:.5555196604858821,y:.7664201325536145},{x:.5526088724817957,y:.7679759811561907},{x:.5497787579508749,y:.7696741576548912},{x:.5487260096851745,y:.7700514145603538},{x:.547739754456429,y:.7705785789630079},{x:.5445813654227618,y:.7715366658019126},{x:.5414743329490078,y:.7726500843601849},{x:.5403682137748697,y:.7728147113818356},{x:.5392980644907257,y:.7731393376181454},{x:.5360134495467959,y:.773462843953461},{x:.5327489006457318,y:.7739487165205229},{x:.531631918102699,y:.7738943871342436},{x:.530519,y:.774004},{x:.071534,y:.774004},{x:.06275493550927423,y:.7731393376181454},{x:.054313245543570934,y:.7705785789630079},{x:.046533339514117915,y:.7664201325536145},{x:.039714194846605363,y:.7608238051533946},{x:.03411786744638546,y:.7540046604858821},{x:.029959421036992097,y:.746224754456429},{x:.027398662381854635,y:.7377830644907257},{x:.026534000000000002,y:.729004}]],8:[[{x:.018998734783549534,y:.19034712298183487},{x:.01918983868826437,y:.187136446932327},{x:.01920952916989005,y:.18392014879903562},{x:.019451409422642358,y:.18274188004279768},{x:.019522877627479743,y:.18154116541629586},{x:.0203366813486396,y:.1784294641291047},{x:.020983462121705806,y:.17527880768498513},{x:.021450563544301488,y:.17417036752890672},{x:.021754906310756543,y:.17300666705236456},{x:.02316013582774355,y:.17011352146289485},{x:.024409151469860245,y:.16714958466818597},{x:.06244715146986025,y:.097021584668186},{x:.06364531823888224,y:.0952519506947441},{x:.06465809579443724,y:.09337006609963419},{x:.0661122558858275,y:.09160840391706095},{x:.06739294989385258,y:.08971688123025286},{x:.06891333268610705,y:.08821500101819715},{x:.07027378747657535,y:.08656685940733966},{x:.07204368953204261,y:.0851227396301211},{x:.07366879313388441,y:.08351741302778071},{x:.0754529644913056,y:.08234100299139627},{x:.07710881500204132,y:.08098994152260804},{x:.14910981500204132,y:.03317594152260801},{x:.1504928100364302,y:.03244176283843531},{x:.15177178054792087,y:.031538475488709236},{x:.15438005907773164,y:.030378172358910993},{x:.15690151209615905,y:.029039630272177964},{x:.1584011644246711,y:.028589367572161194},{x:.15983178249634203,y:.027952951404511282},{x:.24949378249634205,y:-.0017990485954887184},{x:.251605077566582,y:-.002276091838878668},{x:.25365804064979064,y:-.002962007073194259},{x:.2558970148670134,y:-.0032458471890824472},{x:.2580984148155577,y:-.003743249464233246},{x:.2602622084630055,y:-.003799233220341744},{x:.26240953986016613,y:-.0040714555567724145},{x:.33848653986016614,y:-.006196455556772458},{x:.34211630259529946,y:-.0059410451417675775},{x:.3457527120689106,y:-.005810898556388326},{x:.34651004211407876,y:-.005631877045722989},{x:.3472863241290845,y:-.005577253499755554},{x:.35079651389094996,y:-.004618619143417753},{x:.3543376604369356,y:-.0037815449929937683},{x:.4535096604369356,y:.03022045500700621},{x:.45591274590665615,y:.03131812424947078},{x:.4583949217344816,y:.03222283453480715},{x:.45991547545056405,y:.03314647083206772},{x:.461533744189149,y:.033885655452327273},{x:.46367651039942226,y:.035431052006208004},{x:.4659344916938285,y:.03680262701864639},{x:.5338604916938285,y:.08780462701864639},{x:.5368034713408607,y:.09050382186837246},{x:.5397962541268131,y:.09314768896709699},{x:.5400513850489728,y:.09348269124727963},{x:.5403617177400871,y:.09376731720532937},{x:.5427215620660051,y:.09698879462990716},{x:.5451410464862535,y:.10016572352111452},{x:.5453259194365666,y:.1005440624001799},{x:.5455747614022292,y:.10088376225489704},{x:.547260782913003,y:.10450372268352329},{x:.5490139895381407,y:.10809162577156875},{x:.5802599895381407,y:.1920326257715688},{x:.5808621946470703,y:.19431314395649216},{x:.5816704362178704,y:.19652903198349428},{x:.5819856183913868,y:.19856748893015458},{x:.5825122482529622,y:.20056180773987195},{x:.5826579751325236,y:.20291599079595712},{x:.5830183882594349,y:.20524698126417715},{x:.5829298310737253,y:.20730775882392333},{x:.5830572695913885,y:.20936649774620245},{x:.5827409180393249,y:.21170387573884492},{x:.582639652248002,y:.21406038999182395},{x:.570412652248002,y:.30012638999182395},{x:.5703409363500996,y:.30042034316527866},{x:.5703238989157716,y:.30072243812390526},{x:.5692961437829783,y:.3047027979582916},{x:.5683217827960937,y:.30869656381164773},{x:.5681940974797931,y:.30897087767968473},{x:.5681184516122305,y:.3092638441298401},{x:.5663339148242972,y:.3129672173863048},{x:.5645991308441736,y:.31669415574996157},{x:.5644203829845738,y:.31693828858446854},{x:.5642890357120441,y:.31721086798977133},{x:.5618162960169492,y:.32049493611094637},{x:.5593877558190667,y:.3238118228336772},{x:.5591648145961691,y:.32401639274673566},{x:.5589828135206953,y:.3242581100335041},{x:.5032838135206953,y:.3848241100335041},{x:.5011622073766187,y:.38671918495638496},{x:.4991781602202921,y:.38875783119234486},{x:.4978799327840818,y:.3896509997457094},{x:.496704700181234,y:.39070074870143656},{x:.4942541493273608,y:.39214550546522026},{x:.4919105049301597,y:.39375791128677606},{x:.42072451102124153,y:.4330589294870645},{x:.4777200661568854,y:.4633968522602595},{x:.4805213378044988,y:.46526159042857346},{x:.48340658539474834,y:.46699355971902134},{x:.4841865730327025,y:.4677014480666941},{x:.48506339053858555,y:.46828512408085676},{x:.487447044167244,y:.4706605328159332},{x:.4899389620874836,y:.4729221066835925},{x:.4905658603159866,y:.4737685611946159},{x:.49131196047780046,y:.47451208064740324},{x:.493186393615322,y:.4773068743236967},{x:.4951892188573616,y:.48001114175313947},{x:.5250762188573616,y:.5299501417531395},{x:.5263287500632193,y:.5326029758232522},{x:.5277533683388757,y:.5351675080991},{x:.5282078804872482,y:.5365829335183069},{x:.5288425912810938,y:.5379272372855163},{x:.5295535131980511,y:.5407734546091212},{x:.5304504424054924,y:.5435666393545394},{x:.5306200854295579,y:.5450435386925929},{x:.5309803397786421,y:.5464858379730204},{x:.5311223320761199,y:.5494160600145488},{x:.5314571037289079,y:.5523305567062068},{x:.5328161037289079,y:.6362725567062067},{x:.5325682225912138,y:.6392892202473488},{x:.5325070847315841,y:.6423154334158161},{x:.5322077563487247,y:.6436760218476847},{x:.5320936668790056,y:.6450644677251389},{x:.5312620268462096,y:.647974807711247},{x:.530611678831884,y:.6509309456375182},{x:.530052664324664,y:.6522069946735811},{x:.5296698946987799,y:.6535465042014387},{x:.5282864552309536,y:.656238677898982},{x:.5270718895714029,y:.659011137860374},{x:.493108889571403,y:.7195761378603741},{x:.49086599866607616,y:.7227903647520136},{x:.4886941713149356,y:.7260530293196586},{x:.4883443495413535,y:.7264040725827037},{x:.48806074906628455,y:.7268104928286833},{x:.4852338901214668,y:.7295253929429124},{x:.4824672795427586,y:.7323016638284542},{x:.4820556943532359,y:.7325777150511769},{x:.48169825452511067,y:.7329209983380867},{x:.4783960621447291,y:.7350322395860499},{x:.4751409876314614,y:.737215426256307},{x:.4058559876314614,y:.774404426256307},{x:.40535390944732597,y:.7746134197603937},{x:.4048950878292554,y:.7749053846735706},{x:.40128606998249994,y:.7763066859700772},{x:.39771184087056327,y:.7777944834687843},{x:.3971786373679402,y:.7779015106266721},{x:.3966716723496766,y:.778098353858693},{x:.39285862044769176,y:.7787686450898307},{x:.3890628142527955,y:.7795305574683767},{x:.38851897614326597,y:.7795315052864096},{x:.3879833501061526,y:.7796256622622586},{x:.29017035010615255,y:.7870576622622585},{x:.28883979914978264,y:.7870279344512828},{x:.28751770557027906,y:.7871806372910648},{x:.2844390802539456,y:.7869296114679608},{x:.28135100845003463,y:.7868606162788429},{x:.2800518232654171,y:.7865718820648824},{x:.2787253424971381,y:.7864637231002555},{x:.20264834249713812,y:.7726567231002556},{x:.20090732012312768,y:.7721604024311715},{x:.19912055356042774,y:.7718689262507037},{x:.1966754417776232,y:.7709540028332816},{x:.19416478523538352,y:.7702382792713757},{x:.19255404347725652,y:.7694118386491953},{x:.19085847331495095,y:.7687773822377194},{x:.12157447331495094,y:.7347753822377193},{x:.11864840230662128,y:.7329636093328938},{x:.1156466869822177,y:.7312801255296781},{x:.11490452792065226,y:.7306454666247165},{x:.11407427694169714,y:.7301313894804525},{x:.11155788892673538,y:.7277835811487093},{x:.10894228211787771,y:.7255468394054793},{x:.1083381992447159,y:.7247795872431081},{x:.10762419278113186,y:.7241134140161837},{x:.10561419113974596,y:.7213197952150451},{x:.1034852091492498,y:.7186157522626143},{x:.05457920914924981,y:.6421127522626143},{x:.05400544809690788,y:.6409849569633866},{x:.05327967340990527,y:.639948436299892},{x:.05200937551205521,y:.6370614399018406},{x:.05057918033015655,y:.6342502218929852},{x:.050236465883645505,y:.633032161635733},{x:.04972685190376166,y:.6318739658087451},{x:.04904418748077848,y:.6287946194110116},{x:.04818991452487371,y:.6257584009293389},{x:.04809141700817653,y:.6244968850866522},{x:.047817547914863534,y:.6232615229122788},{x:.04774875137767971,y:.6201081640700103},{x:.04750322987838258,y:.6169636252890404},{x:.04765273449582791,y:.6157071332072875},{x:.04762513492475421,y:.6144420789610904},{x:.04817285008571219,y:.6113358894861711},{x:.048545515296550656,y:.608203873267779},{x:.04893727666953319,y:.607000691233013},{x:.04915700725673716,y:.6057545602402229},{x:.06817600725673716,y:.537751560240223},{x:.0695259178796919,y:.5342803033966695},{x:.07076883034011841,y:.5307693133112962},{x:.07112252784165454,y:.530174666206544},{x:.07137329591617819,y:.5295298232221028},{x:.07337447700044117,y:.5263886201035727},{x:.07527846743280868,y:.5231875729003385},{x:.0757413786311829,y:.522673354732434},{x:.07611313089295507,y:.5220898246495332},{x:.07868867817173447,y:.5193993899302627},{x:.08118057729149615,y:.5166313000580217},{x:.13823757729149616,y:.46456630005802163},{x:.1415344063491032,y:.46210392848613274},{x:.14479841194755694,y:.45959821041612353},{x:.17870395742216458,y:.4385038845164132},{x:.16590813892329467,y:.43401753680148847},{x:.1630836262780146,y:.43270367241359486},{x:.16018787852971583,y:.4315553012665589},{x:.15909238677042803,y:.43084708753997614},{x:.15790960896480868,y:.43029690071741367},{x:.15539569076452509,y:.4284572467838155},{x:.15277962009410193,y:.4267660089056696},{x:.07398562009410191,y:.3640750089056696},{x:.07334669706368892,y:.36345515994886657},{x:.07261876409580822,y:.3629427646304707},{x:.07018582297292754,y:.3603886489381779},{x:.067654053855944,y:.3579324619307791},{x:.06714833408498834,y:.3571998754981266},{x:.06653435151263618,y:.35655531303498644},{x:.06464644192410274,y:.3535756306924294},{x:.06264249835499126,y:.3506727149773525},{x:.06228941637067996,y:.3498555439546183},{x:.061812979199786275,y:.3491035845207174},{x:.026491979199786284,y:.27897658452071744},{x:.026206182636496978,y:.2782362375154344},{x:.02580526951533789,y:.27755135647970497},{x:.024619992088609113,y:.2741272608068926},{x:.023315086847465263,y:.27074694483548933},{x:.02317921632066564,y:.26996506724675395},{x:.022919620294515476,y:.2692151317381758},{x:.022425125568608657,y:.2656255929487299},{x:.02180476064715109,y:.2620556544171705},{x:.02182403758498896,y:.26126229336223583},{x:.021715734783549545,y:.26047612298183487},{x:.018998734783549534,y:.19034712298183487}],[{x:.10940940002433477,y:.19920410482166873},{x:.1112697837122767,y:.2472228194523932},{x:.137749803196691,y:.2997967648781603},{x:.20286290613296581,y:.3516028102138205},{x:.27392321813344717,y:.3765172983642545},{x:.30180455045059645,y:.38547932587505673},{x:.3589974388819276,y:.364332623176267},{x:.44199758150171664,y:.31850914110336725},{x:.48327372240847105,y:.27362627516037924},{x:.4919267227459848,y:.21271770175329152},{x:.46927072007314496,y:.15185335046477932},{x:.41758736799183827,y:.11304708595854013},{x:.33285528741119674,y:.08399594043457195},{x:.2715476841223936,y:.0857083982994813},{x:.19388634557978268,y:.1114782912788902},{x:.13622191473335832,y:.14977174687660325},{x:.10940940002433477,y:.19920410482166873}],[{x:.1412545940070051,y:.610603192179028},{x:.17253143522148345,y:.6595291354872365},{x:.22488466829434647,y:.6852221473073319},{x:.28911227954018853,y:.6968786351876549},{x:.37167628924266627,y:.6906052797020977},{x:.4210229734590171,y:.664118250196117},{x:.4426312796779887,y:.6255849325813003},{x:.4416638895166663,y:.5658316839266069},{x:.4243877259953326,y:.5369644730960824},{x:.3411654121752423,y:.49266641996418925},{x:.3038587353431559,y:.48067475972705925},{x:.2482367446999157,y:.5012406330709052},{x:.1958501022844071,y:.5338329684082593},{x:.1513751879049268,y:.5744167077770947},{x:.1412545940070051,y:.610603192179028}]],9:[[{x:.04617702144416433,y:.5785043710151274},{x:.046308257010348054,y:.5777836867379841},{x:.04632014162646953,y:.5770512474182771},{x:.047097404355444614,y:.5734500590446777},{x:.04775742235616295,y:.5698255492446179},{x:.06775742235616294,y:.499825549244618},{x:.06870401207934061,y:.497431122678351},{x:.06945142103699212,y:.4949672455435709},{x:.07032179921115676,y:.4933388825112154},{x:.07100061044171635,y:.4916218095236955},{x:.07239614115864691,y:.4894580616864063},{x:.07360986744638548,y:.48718733951411786},{x:.07478119941633177,y:.4857600673791044},{x:.07578195180149752,y:.48420841696912487},{x:.07757279404935197,y:.4823584994767568},{x:.07920619484660538,y:.4803681948466053},{x:.1292061948466054,y:.43036819484660543},{x:.1324047212320044,y:.4277432320802026},{x:.1355710052680468,y:.42507946670648067},{x:.13581237417673697,y:.4249466435819557},{x:.13602533951411794,y:.4247718674463855},{x:.13967451194327588,y:.422821344145996},{x:.14329963156393744,y:.42082647364918746},{x:.21329963156393744,y:.39082647364918743},{x:.21510775104315333,y:.39025382151681987},{x:.2168404136401385,y:.3894823898342746},{x:.21930272871556003,y:.3889252240779052},{x:.22170947225776405,y:.3881629808537447},{x:.22359456811709633,y:.38795407868297094},{x:.22544443694348562,y:.38753549554788497},{x:.30544443694348566,y:.37753549554788496},{x:.30933066171136914,y:.37743373006124875},{x:.3132134481214367,y:.3772411973248817},{x:.31373545479679327,y:.3773183852372503},{x:.314262956584918,y:.37730457196617717},{x:.3180943620951528,y:.37796292671622445},{x:.321940103126635,y:.37853158749346005},{x:.39912055139763536,y:.39782669956121014},{x:.3920145202755848,y:.3793136184800785},{x:.3919728818872528,y:.3791621799808353},{x:.39190347676812315,y:.3790212888743934},{x:.33928123709710245,y:.23902627390054626},{x:.29593066247424293,y:.13853176000209894},{x:.2601678276974797,y:.06104561798577861},{x:.25727396725620644,y:.05271224015242973},{x:.25606147289685455,y:.04397442167208486},{x:.2565769400976792,y:.035167952008718584},{x:.2588005597432301,y:.02663125885276897},{x:.2626468793775489,y:.018692402534786497},{x:.2679680870941297,y:.011656468850909336},{x:.274559691864592,y:.005793844786811796},{x:.2821683820142214,y:.0013298276974796769},{x:.29050175984757026,y:-.0015640327437935753},{x:.29923957832791515,y:-.002776527103145486},{x:.30804604799128144,y:-.002261059902320825},{x:.31658274114723106,y:-3744025676995222e-20},{x:.32452159746521353,y:.003808879377548882},{x:.3315575311490907,y:.009130087094129706},{x:.33742015521318824,y:.015721691864591977},{x:.34188417230252033,y:.023330382014221395},{x:.3778841723025203,y:.10133038201422136},{x:.3780704961344211,y:.10186693411204945},{x:.37834550457920557,y:.10236389998544072},{x:.42234550457920556,y:.2043638999854408},{x:.4226728981736059,y:.20538920106595157},{x:.42314852323187685,y:.20635471112560658},{x:.47609350933819694,y:.3472083534084579},{x:.5496013805841499,y:.5387157021808093},{x:.5512752235949963,y:.542063388202502},{x:.5520259437659378,y:.5440252139743784},{x:.5529745491659372,y:.5458993775022888},{x:.553598518494472,y:.5481347580495968},{x:.5544279630456541,y:.5503023109672317},{x:.5547815251174404,y:.5523728990468965},{x:.5553462721645,y:.554396114781092},{x:.555522150986547,y:.5567102734952235},{x:.5559127893965689,y:.5589979940959194},{x:.5558556061770612,y:.5610977729446709},{x:.5560147919588762,y:.5631922898391183},{x:.5557358213499382,y:.5654962948984841},{x:.5556726416037749,y:.5678162673625252},{x:.5552069106120301,y:.5698645436567753},{x:.5549544177082778,y:.5719498706018395},{x:.5349544177082779,y:.6619498706018395},{x:.5345092452033302,y:.663307558548854},{x:.5342480120020212,y:.6647122835522489},{x:.5331378863550271,y:.6674899313564284},{x:.5322058990004909,y:.6703323081518522},{x:.5315044085816177,y:.6715770596583215},{x:.5309741466497647,y:.6729038291953012},{x:.5293434595512297,y:.6754115305058349},{x:.5278748598680685,y:.6780174701150343},{x:.5269440094186665,y:.6791014500786302},{x:.5261650964249364,y:.6802992771399491},{x:.4861650964249363,y:.7302992771399491},{x:.4855393928217795,y:.7309407996522789},{x:.48502142797480674,y:.7316720783612058},{x:.48246447922773295,y:.7340934525762789},{x:.48000567043073006,y:.7366144244690945},{x:.4792668347133476,y:.7371215515888083},{x:.4786161570168623,y:.7377377290536072},{x:.47563595264764597,y:.7396137412876539},{x:.4727325719538572,y:.7416065836124539},{x:.4719089971645242,y:.7419598267287414},{x:.4711506117974981,y:.7424372235949962},{x:.4111506117974981,y:.7724372235949962},{x:.40814803697660645,y:.7735862009991664},{x:.4052110607504687,y:.7748937847545917},{x:.4040364518244048,y:.77515955677446},{x:.40291168903276836,y:.7755899630456542},{x:.39974265347336024,y:.7761310898824948},{x:.39660701348596056,y:.7768405731449995},{x:.3166070134859606,y:.7868395731449994},{x:.31542693671630134,y:.7868704603456931},{x:.31426350899694466,y:.7870703881908964},{x:.3110259999999998,y:.7869856499834279},{x:.3077884910030554,y:.7870703881908964},{x:.3066250632836987,y:.7868704603456931},{x:.30544498651403945,y:.7868395731449994},{x:.22544498651403946,y:.7768405731449995},{x:.22359484289355938,y:.7764219517671516},{x:.22170947225776405,y:.7762130191462554},{x:.21930299190993624,y:.775450859278766},{x:.2168409392495313,y:.7748937847545917},{x:.21510801459933976,y:.7741222619544408},{x:.21329963156393744,y:.7735495263508126},{x:.14329963156393744,y:.7435495263508126},{x:.1396745119432796,y:.741554655854006},{x:.13602533951411788,y:.7396041325536146},{x:.13581237417673678,y:.7394293564180442},{x:.1355710052680468,y:.7392965332935194},{x:.13240472123200803,y:.7366327679198006},{x:.12920619484660534,y:.7340078051533947},{x:.07920619484660535,y:.6840078051533947},{x:.07757279404935197,y:.6820175005232432},{x:.0757819518014975,y:.6801675830308751},{x:.07478119941633177,y:.6786159326208956},{x:.07360986744638545,y:.6771886604858821},{x:.07239614115864686,y:.6749179383135936},{x:.07100061044171635,y:.6727541904763045},{x:.07032179921115676,y:.6710371174887846},{x:.06945142103699209,y:.669408754456429},{x:.06870401207934061,y:.666944877321649},{x:.06775742235616294,y:.664550450755382},{x:.04775742235616295,y:.5945504507553819},{x:.0470974043554446,y:.590925940955322},{x:.04632014162646953,y:.5873247525817227},{x:.046308257010348054,y:.5865923132620157},{x:.04617702144416433,y:.5858716289848723},{x:.0462367922883029,y:.5821879999999999},{x:.04617702144416433,y:.5785043710151274}],[{x:.13782670643108905,y:.5821879999999999},{x:.15109114488080894,y:.6286135345740196},{x:.18671787059591238,y:.6642402602891231},{x:.24291204200407931,y:.688323476606909},{x:.311026,y:.696836869931924},{x:.377796042530131,y:.6884914492411893},{x:.4220611757635009,y:.6663588826245044},{x:.4493630453483168,y:.6322315456434845},{x:.46363172164975686,y:.5680225022870041},{x:.4540425513192988,y:.5488441616260881},{x:.42235697647551157,y:.5171585867823008},{x:.37255000597497323,y:.48395393978194207},{x:.30826669745594837,y:.4678831126521858},{x:.24291230161158606,y:.4760524121327311},{x:.1867178705959123,y:.500135739710877},{x:.15109114488080894,y:.5357624654259804},{x:.13782670643108905,y:.5821879999999999}]],\\\"!\\\":[[{x:.20646600000000004,y:.05103000000000002},{x:.20733066238185466,y:.04225093550927423},{x:.20989142103699213,y:.03380924554357098},{x:.2140498674463855,y:.026029339514117927},{x:.21964619484660539,y:.019210194846605383},{x:.22646533951411793,y:.013613867446385479},{x:.23424524554357098,y:.009455421036992116},{x:.24268693550927425,y:.006894662381854655},{x:.251466,y:.0060300000000000215},{x:.350587,y:.0060300000000000215},{x:.3593660644907258,y:.006894662381854655},{x:.36780775445642905,y:.009455421036992116},{x:.3755876604858821,y:.013613867446385479},{x:.38240680515339465,y:.019210194846605383},{x:.3880031325536145,y:.026029339514117927},{x:.3921615789630079,y:.03380924554357098},{x:.39472233761814535,y:.04225093550927425},{x:.39558699999999997,y:.05103000000000002},{x:.39472233761814535,y:.05980906449072579},{x:.3921615789630079,y:.06825075445642906},{x:.3880031325536145,y:.07603066048588211},{x:.38240680515339465,y:.08284980515339466},{x:.3755876604858821,y:.08844613255361455},{x:.36780775445642905,y:.09260457896300792},{x:.3593660644907258,y:.09516533761814538},{x:.350587,y:.09603000000000002},{x:.251466,y:.09603000000000002},{x:.24268693550927425,y:.09516533761814538},{x:.23424524554357098,y:.09260457896300792},{x:.22646533951411793,y:.08844613255361455},{x:.21964619484660539,y:.08284980515339466},{x:.2140498674463855,y:.07603066048588211},{x:.20989142103699213,y:.06825075445642906},{x:.20733066238185466,y:.05980906449072579},{x:.20646600000000004,y:.05103000000000002}],[{x:.25602600000000003,y:.25043400000000005},{x:.25689066238185465,y:.24165493550927428},{x:.2594514210369921,y:.233213245543571},{x:.2636098674463855,y:.22543333951411795},{x:.26920619484660535,y:.2186141948466054},{x:.27602533951411795,y:.2130178674463855},{x:.283805245543571,y:.20885942103699215},{x:.2922469355092743,y:.20629866238185468},{x:.301026,y:.20543400000000006},{x:.3098050644907258,y:.20629866238185468},{x:.3182467544564291,y:.20885942103699215},{x:.32602666048588214,y:.2130178674463855},{x:.3328458051533947,y:.2186141948466054},{x:.33844213255361455,y:.22543333951411795},{x:.34260057896300794,y:.233213245543571},{x:.3451613376181454,y:.24165493550927428},{x:.346026,y:.25043400000000005},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.25043400000000005}]],'\\\"':[[{x:.12004,y:.476978},{x:.12090466238185463,y:.4681989355092742},{x:.1234654210369921,y:.459757245543571},{x:.12762386744638546,y:.4519773395141179},{x:.13322019484660536,y:.44515819484660535},{x:.1400393395141179,y:.4395618674463855},{x:.14781924554357095,y:.4354034210369921},{x:.15626093550927422,y:.43284266238185465},{x:.16504,y:.43197800000000003},{x:.17381906449072576,y:.43284266238185465},{x:.18226075445642903,y:.4354034210369921},{x:.19004066048588208,y:.4395618674463855},{x:.19685980515339463,y:.44515819484660535},{x:.20245613255361453,y:.4519773395141179},{x:.2066145789630079,y:.459757245543571},{x:.20917533761814536,y:.4681989355092742},{x:.21004,y:.476978},{x:.21004,y:.729004},{x:.20917533761814536,y:.7377830644907257},{x:.2066145789630079,y:.746224754456429},{x:.20245613255361453,y:.7540046604858821},{x:.19685980515339463,y:.7608238051533946},{x:.19004066048588208,y:.7664201325536145},{x:.18226075445642903,y:.7705785789630079},{x:.17381906449072576,y:.7731393376181454},{x:.16504,y:.774004},{x:.15626093550927422,y:.7731393376181454},{x:.14781924554357095,y:.7705785789630079},{x:.1400393395141179,y:.7664201325536145},{x:.13322019484660536,y:.7608238051533946},{x:.12762386744638546,y:.7540046604858821},{x:.1234654210369921,y:.746224754456429},{x:.12090466238185463,y:.7377830644907257},{x:.12004,y:.729004},{x:.12004,y:.476978}],[{x:.392013,y:.476978},{x:.3928776623818546,y:.4681989355092742},{x:.39543842103699206,y:.459757245543571},{x:.39959686744638545,y:.4519773395141179},{x:.4051931948466053,y:.44515819484660535},{x:.4120123395141179,y:.4395618674463855},{x:.419792245543571,y:.4354034210369921},{x:.42823393550927424,y:.43284266238185465},{x:.437013,y:.43197800000000003},{x:.4457920644907258,y:.43284266238185465},{x:.45423375445642905,y:.4354034210369921},{x:.4620136604858821,y:.4395618674463855},{x:.46883280515339465,y:.44515819484660535},{x:.4744291325536145,y:.4519773395141179},{x:.4785875789630079,y:.459757245543571},{x:.48114833761814535,y:.4681989355092742},{x:.48201299999999997,y:.476978},{x:.48201299999999997,y:.729004},{x:.48114833761814535,y:.7377830644907257},{x:.4785875789630079,y:.746224754456429},{x:.4744291325536145,y:.7540046604858821},{x:.46883280515339465,y:.7608238051533946},{x:.4620136604858821,y:.7664201325536145},{x:.45423375445642905,y:.7705785789630079},{x:.4457920644907258,y:.7731393376181454},{x:.437013,y:.774004},{x:.42823393550927424,y:.7731393376181454},{x:.419792245543571,y:.7705785789630079},{x:.4120123395141179,y:.7664201325536145},{x:.4051931948466053,y:.7608238051533946},{x:.39959686744638545,y:.7540046604858821},{x:.39543842103699206,y:.746224754456429},{x:.3928776623818546,y:.7377830644907257},{x:.392013,y:.729004},{x:.392013,y:.476978}]],\\\"#\\\":[[{x:-.04343582416242281,y:.17932596542766122},{x:-.043155600373289436,y:.1705088746946064},{x:-.04116063193533153,y:.16191587083690517},{x:-.037527584366828626,y:.15387717817379684},{x:-.03239607364840174,y:.1467017191561739},{x:-.025963300859175642,y:.14066524265003977},{x:-.01847647384989975,y:.13599972706223024},{x:-.010223307183879607,y:.1328844655403335},{x:-.0015209654276611437,y:.13143917583757725},{x:.007296125305393629,y:.13171939962671061},{x:.11028337660265361,y:.14517801654688708},{x:.10171449233133083,y:.05447855391336175},{x:.10174959121806887,y:.04565708110917159},{x:.10350499965956604,y:.03701195788446062},{x:.10691325829386003,y:.02887541147651351},{x:.11184338965300836,y:.02156012480075985},{x:.11810593155372849,y:.015347220221688843},{x:.1254602180228497,y:.01047545617803717},{x:.13362362795569505,y:.007132051829885598},{x:.14228244608663826,y:.005445492331330834},{x:.15110391889082841,y:.0054805912180688685},{x:.1597490421155394,y:.0072359996595660475},{x:.1678855885234865,y:.010644258293860037},{x:.17520087519924016,y:.015574389653008364},{x:.18141377977831116,y:.02183693155372849},{x:.18628554382196283,y:.029191218022849703},{x:.18962894817011441,y:.03735462795569504},{x:.19131550766866917,y:.04601344608663827},{x:.2018142041879224,y:.1571394809935999},{x:.36570083500909,y:.17855657247605955},{x:.35397849233133083,y:.05447855391336175},{x:.35401359121806886,y:.04565708110917159},{x:.35576899965956604,y:.03701195788446062},{x:.35917725829386,y:.02887541147651351},{x:.3641073896530084,y:.02156012480075985},{x:.3703699315537285,y:.015347220221688843},{x:.37772421802284967,y:.01047545617803717},{x:.38588762795569503,y:.007132051829885598},{x:.39454644608663825,y:.005445492331330834},{x:.4033679188908284,y:.0054805912180688685},{x:.4120130421155394,y:.0072359996595660475},{x:.4201495885234865,y:.010644258293860037},{x:.42746487519924015,y:.015574389653008364},{x:.4336777797783111,y:.02183693155372849},{x:.4385495438219628,y:.029191218022849703},{x:.44189294817011443,y:.03735462795569504},{x:.44357950766866916,y:.04601344608663827},{x:.45723166259435877,y:.19051803692277236},{x:.5748861253053936,y:.20589339962671058},{x:.5834791291630949,y:.20788836806466848},{x:.5915178218262032,y:.2115214156331714},{x:.5986932808438261,y:.21665292635159827},{x:.6047297573499603,y:.22308569914082438},{x:.6093952729377698,y:.23057252615010027},{x:.6125105344596665,y:.2388256928161204},{x:.6139558241624228,y:.24752803457233888},{x:.6136756003732894,y:.25634512530539366},{x:.6116806319353315,y:.2649381291630949},{x:.6080475843668286,y:.2729768218262032},{x:.6029160736484017,y:.2801522808438262},{x:.5964833008591757,y:.2861887573499603},{x:.5889964738498997,y:.29085427293776983},{x:.5807433071838796,y:.29396953445966656},{x:.5720409654276611,y:.2954148241624228},{x:.5632238746946063,y:.2951346003732895},{x:.4659139564059225,y:.28241791072205386},{x:.48521785958998953,y:.48674482074743597},{x:.6064180682130128,y:.5025833921657807},{x:.6150110746232834,y:.5045783496089273},{x:.6230497719348954,y:.5082113868918628},{x:.6302252375183169,y:.5133428884292346},{x:.6362617222552247,y:.5197756534947408},{x:.640927247422479,y:.5272624745344501},{x:.6440425195043586,y:.5355156372144642},{x:.645487820341822,y:.544217977121417},{x:.6452076078342193,y:.5530350682130128},{x:.6432126503910727,y:.5616280746232835},{x:.6395796131081373,y:.5696667719348955},{x:.6344481115707654,y:.576842237518317},{x:.6280153465052593,y:.5828787222552247},{x:.6205285254655499,y:.587544247422479},{x:.6122753627855358,y:.5906595195043587},{x:.603573022878583,y:.592104820341822},{x:.5947559317869872,y:.5918246078342193},{x:.493900150869001,y:.5786446677402959},{x:.5066445076686692,y:.7135404460866382},{x:.5066094087819312,y:.7223619188908285},{x:.5048540003404339,y:.7310070421155394},{x:.50144574170614,y:.7391435885234865},{x:.4965156103469916,y:.7464588751992401},{x:.4902530684462715,y:.7526717797783111},{x:.4828987819771503,y:.7575435438219629},{x:.47473537204430494,y:.7608869481701144},{x:.4660765539133617,y:.7625735076686692},{x:.45725508110917157,y:.7625384087819311},{x:.44860995788446056,y:.760783000340434},{x:.4404734114765135,y:.7573747417061399},{x:.43315812480075977,y:.7524446103469916},{x:.4269452202216888,y:.7461820684462716},{x:.42207345617803715,y:.7388277819771503},{x:.41873005182988554,y:.730664372044305},{x:.4170434923313308,y:.7220055539133617},{x:.40236933467780645,y:.5666833238969633},{x:.23848272425781383,y:.5452664483557571},{x:.25438050766866915,y:.7135404460866382},{x:.2543454087819311,y:.7223619188908285},{x:.25259000034043394,y:.7310070421155394},{x:.24918174170614,y:.7391435885234865},{x:.2442516103469916,y:.7464588751992401},{x:.23798906844627152,y:.7526717797783111},{x:.2306347819771503,y:.7575435438219629},{x:.22247137204430495,y:.7608869481701144},{x:.21381255391336174,y:.7625735076686692},{x:.20499108110917158,y:.7625384087819311},{x:.1963459578844606,y:.760783000340434},{x:.18820941147651346,y:.7573747417061399},{x:.1808941248007598,y:.7524446103469916},{x:.17468122022168883,y:.7461820684462716},{x:.16980945617803714,y:.7388277819771503},{x:.16646605182988555,y:.730664372044305},{x:.16477949233133082,y:.7220055539133617},{x:.14695190806661926,y:.5333051045124245},{x:.02716793178698713,y:.5176516078342193},{x:.01857492537671658,y:.5156566503910727},{x:.01053622806510461,y:.5120236131081373},{x:.0033607624816830023,y:.5068921115707654},{x:-.0026757222552247634,y:.5004593465052593},{x:-.0073412474224789775,y:.4929725254655499},{x:-.010456519504358698,y:.48471936278553585},{x:-.011901820341822023,y:.476017022878583},{x:-.011621607834219276,y:.4671999317869871},{x:-.00962665039107264,y:.45860692537671655},{x:-.005993613108137223,y:.45056822806510455},{x:-.0008621115707654614,y:.44339276248168297},{x:.005570653494740684,y:.4373562777447752},{x:.013057474534450029,y:.432690752577521},{x:.02131063721446411,y:.42957548049564126},{x:.03001297712141698,y:.42813017965817796},{x:.03883006821301287,y:.4284103921657807},{x:.13826961678760774,y:.4414052575195645},{x:.1189656704142173,y:.23707789034616855},{x:-.004366125305393629,y:.2209606003732895},{x:-.012959129163094893,y:.21896563193533158},{x:-.0209978218262032,y:.2153325843668287},{x:-.028173280843826164,y:.2102010736484018},{x:-.034209757349960276,y:.2037683008591757},{x:-.03887527293776982,y:.1962814738498998},{x:-.041990534459666565,y:.18802830718387967},{x:-.04343582416242281,y:.17932596542766122}],[{x:.2104964979994861,y:.24903935479288136},{x:.22980043297880234,y:.4533666013628972},{x:.39368704339879496,y:.4747834769041034},{x:.3743831288206537,y:.27045644627534104},{x:.2104964979994861,y:.24903935479288136}]],$:[[{x:.030517420733400163,y:.165091535964518},{x:.03086584266660257,y:.1562768767808978},{x:.032927224468652025,y:.14769956254897784},{x:.06950822446865203,y:.04228956254897785},{x:.0704003940010533,y:.04035550336969822},{x:.07109145007989037,y:.03834080913001754},{x:.07224350295250744,y:.03635998272422403},{x:.073203348392932,y:.034279214644477654},{x:.0744556913660193,y:.03255637151138059},{x:.07552651634405921,y:.03071520740954014},{x:.07704287290513265,y:.02899719639360223},{x:.07839021289928177,y:.02714366624511229},{x:.07995460247492134,y:.0256982470536212},{x:.08136404514878363,y:.02410136799351792},{x:.08318643266605391,y:.022712194567306505},{x:.08486948969354943,y:.02115713247420773},{x:.0866858072576693,y:.0200446838732511},{x:.08837970353582197,y:.01875345702162473},{x:.17373770353582196,y:-.03394954297837521},{x:.17475219432147746,y:-.03444582628601368},{x:.17568351020275566,y:-.03508468417701866},{x:.17870701554383397,y:-.03638050305696308},{x:.18166188368778688,y:-.037826008286632525},{x:.18275370138776084,y:-.03811483831561822},{x:.18379175728720304,y:-.038559730016208084},{x:.18700996854351615,y:-.03924079346911771},{x:.19019006380536974,y:-.04008205754340442},{x:.19131725047775072,y:-.0401523347177012},{x:.19242215448928965,y:-.04038616328932037},{x:.262121,y:-.048110644533924524},{x:.262121,y:-.08350199999999997},{x:.2629856623818546,y:-.09228106449072573},{x:.26554642103699205,y:-.100722754456429},{x:.26970486744638544,y:-.10850266048588206},{x:.2753011948466053,y:-.1153218051533946},{x:.2821203395141179,y:-.1209181325536145},{x:.28990024554357097,y:-.12507657896300786},{x:.29834193550927424,y:-.12763733761814533},{x:.307121,y:-.12850199999999995},{x:.3159000644907258,y:-.12763733761814533},{x:.32434175445642904,y:-.12507657896300786},{x:.3321216604858821,y:-.1209181325536145},{x:.33894080515339464,y:-.1153218051533946},{x:.3445371325536145,y:-.10850266048588206},{x:.3486955789630079,y:-.100722754456429},{x:.35125633761814534,y:-.09228106449072573},{x:.35212099999999996,y:-.08350199999999997},{x:.35212099999999996,y:-.05796857189257534},{x:.3537665284657676,y:-.05798865052825875},{x:.3565834008023822,y:-.05822276473922817},{x:.35816715833059226,y:-.05804234673933715},{x:.35976104048452195,y:-.05806179518994546},{x:.3625398346041163,y:-.05754422155704884},{x:.36534825494544937,y:-.05722429279787242},{x:.3668663832111493,y:-.05673836571308556},{x:.3684334335709129,y:-.056446489484502926},{x:.37105786033397337,y:-.05539674504422484},{x:.37374990266128777,y:-.05453506799769968},{x:.49568890266128773,y:-.0018330679976996528},{x:.4995437197067623,y:.0003036028478311586},{x:.5033988605511543,y:.0024396894158641644},{x:.5034014762743246,y:.0024419030290919073},{x:.503404473339876,y:.00244356426035406},{x:.5067683773534712,y:.005291217073469004},{x:.510132712931077,y:.008138360005776092},{x:.5101348465393426,y:.008141041387321917},{x:.510137461926978,y:.00814325539697476},{x:.5128811799638975,y:.011592456477016289},{x:.5156254207452635,y:.015041241667436683},{x:.5156269902452553,y:.015044287773311453},{x:.5156291234470946,y:.015046969478205698},{x:.5176472159618929,y:.018965167962033513},{x:.519665902312761,y:.02288306052976895},{x:.5684429023127611,y:.1458620605297689},{x:.5688122064775901,y:.14714915498994666},{x:.5693537919217377,y:.14837377040805427},{x:.5700262192706007,y:.15138021786244946},{x:.5708758841928585,y:.15434145989163614},{x:.5709869926090132,y:.15567587086110493},{x:.5712792610244494,y:.1569826137160382},{x:.5713522390683521,y:.16006247719363653},{x:.5716078682563359,y:.16313258119086366},{x:.5714565110896938,y:.16446302800441426},{x:.5714882307651191,y:.1658016809010868},{x:.5709589549987614,y:.16883660297565092},{x:.5706107247661352,y:.1718975865660398},{x:.570202718587728,y:.17317294089875004},{x:.5699726705538047,y:.1744920601570685},{x:.5455836705538047,y:.26233106015706853},{x:.5448796820390573,y:.26415145628779163},{x:.5443792359109676,y:.2660379863232085},{x:.5432925447356423,y:.2682555269445408},{x:.5424018225194911,y:.2705587850827968},{x:.5413562192793141,y:.27220686146627543},{x:.5404973453311464,y:.27395951015977},{x:.5389989139081434,y:.2759224384285429},{x:.5376759632977357,y:.2780076688235372},{x:.5363289272782685,y:.2794200908086057},{x:.5351446315541886,y:.28097150485378414},{x:.5332920437627642,y:.28260438653745124},{x:.5315877050081386,y:.28439145495451523},{x:.529991002048182,y:.2855139439563835},{x:.528526796368706,y:.2868045033815319},{x:.4553637963687061,y:.3395095033815319},{x:.4552094954443409,y:.33959910378534747},{x:.4550747122553104,y:.3397160246969866},{x:.45139660000367776,y:.341813199213456},{x:.44773515946955245,y:.3439393468807752},{x:.44756634322254935,y:.3439971230209339},{x:.4474113397164003,y:.34408550243429054},{x:.4433947629085852,y:.34542481622689836},{x:.43938888509457313,y:.34679579895012297},{x:.43921204103863115,y:.34681953052195974},{x:.439042773913178,y:.34687597206574233},{x:.35212099999999996,y:.3666493043587998},{x:.35212099999999996,y:.6320956693586206},{x:.3838005126074005,y:.6288356018928482},{x:.4577579663937751,y:.5527249728659002},{x:.46449612147708186,y:.5470313904751531},{x:.47221556762189953,y:.5427617575185425},{x:.48061965084199804,y:.5400801535961528},{x:.48938540693229315,y:.5390896312428609},{x:.49817597280212744,y:.5398282556772123},{x:.5066535319349293,y:.5422676419764202},{x:.5144922964874953,y:.5463140458930298},{x:.5213910271340998,y:.551811966393775},{x:.5270846095248467,y:.5585501214770818},{x:.5313542424814575,y:.5662695676218995},{x:.534035846403847,y:.5746736508419981},{x:.535026368757139,y:.5834394069322931},{x:.5342877443227877,y:.5922299728021274},{x:.5318483580235798,y:.6007075319349293},{x:.5278019541069703,y:.6085462964874953},{x:.5223040336062249,y:.6154450271340998},{x:.4369490336062249,y:.7032850271340998},{x:.435089451582588,y:.7048563301588934},{x:.43337550685970433,y:.706585327551969},{x:.43172842132509603,y:.7076963215886295},{x:.4302108785229181,y:.7089786095248467},{x:.4280804818333404,y:.7101569339468108},{x:.4260621594195314,y:.7115183351118896},{x:.4242299779872524,y:.7122866512623272},{x:.42249143237810044,y:.7132482424814575},{x:.4201720909726226,y:.7139883059538676},{x:.4179269538663623,y:.7149297930076584},{x:.4159800862413552,y:.7153259053130885},{x:.41408734915800194,y:.715929846403847},{x:.4116681940261354,y:.716203208702491},{x:.4092825215873294,y:.7166886008255086},{x:.35212099999999996,y:.7225709645831306},{x:.35212099999999996,y:.7597659999999999},{x:.35125633761814534,y:.7685450644907257},{x:.3486955789630079,y:.776986754456429},{x:.3445371325536145,y:.7847666604858821},{x:.33894080515339464,y:.7915858051533946},{x:.3321216604858821,y:.7971821325536145},{x:.32434175445642904,y:.8013405789630078},{x:.3159000644907258,y:.8039013376181453},{x:.307121,y:.804766},{x:.29834193550927424,y:.8039013376181453},{x:.28990024554357097,y:.8013405789630078},{x:.2821203395141179,y:.7971821325536145},{x:.2753011948466053,y:.7915858051533946},{x:.26970486744638544,y:.7847666604858821},{x:.26554642103699205,y:.776986754456429},{x:.2629856623818546,y:.7685450644907257},{x:.262121,y:.7597659999999999},{x:.262121,y:.7318326623736131},{x:.23856652158732947,y:.7342566008255086},{x:.23743405616423266,y:.7342615520061975},{x:.23631438427367413,y:.7344313675125375},{x:.2330314335362298,y:.7342808004350606},{x:.22974506326706257,y:.734295168567351},{x:.22863339192208898,y:.7340790915684273},{x:.22750210485113245,y:.7340272069677483},{x:.2243116092711877,y:.7332390610779145},{x:.22108558260167874,y:.7326120140964958},{x:.22003742624118275,y:.7321832126358507},{x:.21893799871753236,y:.7319116218242595},{x:.21596256725097532,y:.7305161851266182},{x:.21292085857685591,y:.729271820095334},{x:.21197649726195836,y:.7286467727726252},{x:.21095117966878213,y:.7281659128327016},{x:.2083051564782311,y:.7262168111769735},{x:.20556465695803808,y:.7244029483461277},{x:.204760381964467,y:.7236056753794367},{x:.20384857668186554,y:.7229340254890024},{x:.10629557668186554,y:.6350940254890024},{x:.10393291169686979,y:.6325042238563513},{x:.10146752815288923,y:.6300120075116347},{x:.10096488682836192,y:.6292508655939548},{x:.10035013880638408,y:.6285770182897039},{x:.09853811700104832,y:.6255760458964971},{x:.09660631239978806,y:.6226507443205297},{x:.09626182060918942,y:.6218061670735107},{x:.09579034588565258,y:.6210253361666956},{x:.09459860224176168,y:.6177285186990383},{x:.0932746147506803,y:.6144825495908574},{x:.056695614750680294,y:.49150554959085735},{x:.05654965816703397,y:.490750439567249},{x:.05628361804350595,y:.49002883224693095},{x:.05571374572525952,y:.48642582571377374},{x:.055021470477783566,y:.4828443224653027},{x:.055025633066628665,y:.4820752469521588},{x:.05490548343396577,y:.4813156032607913},{x:.055049472757300266,y:.47767065091379934},{x:.05506921600663437,y:.4740229090450286},{x:.05522333780201598,y:.4732694231830167},{x:.05525369594322076,y:.472500935801646},{x:.05610601347919053,y:.46895411111540136},{x:.056837016503334954,y:.46538031130067065},{x:.05713517469108906,y:.46467137112890816},{x:.05731487395982006,y:.46392357259662753},{x:.08169987395982006,y:.39365157259662753},{x:.08192222202041206,y:.3931695328553223},{x:.08205835369770847,y:.3926564352635495},{x:.08376780756696771,y:.3891683934837906},{x:.08539480756850773,y:.3856411369034641},{x:.08570692456181836,y:.38521173737536313},{x:.08594054088151196,y:.3847350567827023},{x:.08829763126802886,y:.38164753465350854},{x:.09058150254284453,y:.37850546527353984},{x:.0909713939878581,y:.378145207541698},{x:.09129351720579659,y:.37772326251599964},{x:.09420766244788897,y:.3751549117812935},{x:.09706063710369874,y:.372518777565862},{x:.09751331969083687,y:.37224150613287915},{x:.09791157079240381,y:.3718905117848512},{x:.17107757079240382,y:.3191875117848513},{x:.17123114354048857,y:.3190983419119289},{x:.17136528774468962,y:.3189819753030134},{x:.17504412834709762,y:.3168843854977816},{x:.17870637355344754,y:.314757953928811},{x:.1788743916234626,y:.3147004579868701},{x:.17902866028359976,y:.31461249756570947},{x:.183046032465951,y:.31327291855818423},{x:.1870527548771027,y:.3119018143721617},{x:.18722876142884332,y:.31187820189800686},{x:.18739722608682208,y:.3118220279342577},{x:.262121,y:.2948235482063542},{x:.262121,y:.04244038202745839},{x:.212402420161311,y:.04795051974434915},{x:.14928483997433578,y:.08692151049617265},{x:.11795277553134796,y:.17720643745102208},{x:.114257651607068,y:.18521678535552225},{x:.10907078710071823,y:.1923523337548876},{x:.10259151030645056,y:.1983388675257922},{x:.09506881619784838,y:.20294632753270694},{x:.08679179769072982,y:.20599765167145945},{x:.07807853596451803,y:.20737557926659977},{x:.06926387678089782,y:.20702715733339738},{x:.0606865625489779,y:.20496577553134793},{x:.052676214644477706,y:.20127065160706795},{x:.04554066624511235,y:.1960837871007182},{x:.039554132474207776,y:.18960451030645054},{x:.034946672467293015,y:.18208181619784836},{x:.03189534832854049,y:.1738047976907298},{x:.030517420733400163,y:.165091535964518}],[{x:.14709211773983194,y:.4797371545422716},{x:.17592903295677773,y:.5766856037244347},{x:.24922570721126042,y:.6426843927572041},{x:.262121,y:.6413573671491031},{x:.262121,y:.3871228845247169},{x:.21626819752335621,y:.3975536737173561},{x:.16206100150816494,y:.4366002507010456},{x:.14709211773983194,y:.4797371545422716}],[{x:.35212099999999996,y:.034163101195078524},{x:.35212099999999996,y:.2743499680404371},{x:.4101709471377665,y:.26114452085874473},{x:.4630938273127818,y:.2230200535785049},{x:.47920731446793274,y:.1649859973145621},{x:.44287681685863156,y:.07338773859643172},{x:.35212099999999996,y:.034163101195078524}]],\\\"'\\\":[[{x:.25602600000000003,y:.476978},{x:.25689066238185465,y:.4681989355092742},{x:.2594514210369921,y:.459757245543571},{x:.2636098674463855,y:.4519773395141179},{x:.26920619484660535,y:.44515819484660535},{x:.27602533951411795,y:.4395618674463855},{x:.283805245543571,y:.4354034210369921},{x:.2922469355092743,y:.43284266238185465},{x:.301026,y:.43197800000000003},{x:.3098050644907258,y:.43284266238185465},{x:.3182467544564291,y:.4354034210369921},{x:.32602666048588214,y:.4395618674463855},{x:.3328458051533947,y:.44515819484660535},{x:.33844213255361455,y:.4519773395141179},{x:.34260057896300794,y:.459757245543571},{x:.3451613376181454,y:.4681989355092742},{x:.346026,y:.476978},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.476978}]],\\\"(\\\":[[{x:.14398102142772873,y:.343473372436119},{x:.14438344127795402,y:.34024506484177663},{x:.14461855620935057,y:.33700027938992067},{x:.15480555620935058,y:.27783527938992064},{x:.15553530200183258,y:.27518493680242373},{x:.1560666158259812,y:.2724877993619115},{x:.1764416158259812,y:.20487079936191147},{x:.17757136816824137,y:.2021290142392397},{x:.17852197521392682,y:.19932008699588913},{x:.2090839752139268,y:.13170208699588917},{x:.21040800505224358,y:.12940389577393302},{x:.21154775445201235,y:.12700896170152925},{x:.25229575445201236,y:.05939296170152925},{x:.2531150427152032,y:.05829379345186112},{x:.2537782786760274,y:.05709399256856861},{x:.29452927867602746,y:-.0020700074314313824},{x:.29560111146026063,y:-.0033391000809501682},{x:.29650963843516415,y:-.004729783512322571},{x:.3372576384351641,y:-.05544378351232261},{x:.3386866074193021,y:-.05690267270426387},{x:.3399537097957662,y:-.05850416001284604},{x:.38070370979576623,y:-.10073716001284601},{x:.38742176905533504,y:-.10645444032360908},{x:.3951261287468799,y:-.11075123635207199},{x:.40352071464810957,y:-.11346242463653189},{x:.41228292753057777,y:-.11448381573166892},{x:.42107604046711683,y:-.11377615815049966},{x:.4295621390588101,y:-.11136664677700951},{x:.4374151072958377,y:-.10734787778201216},{x:.444333160012846,y:-.10187429020423372},{x:.4500504403236091,y:-.09515623094466494},{x:.45434723635207197,y:-.08745187125312004},{x:.4570584246365319,y:-.07905728535189037},{x:.45807981573166895,y:-.07029507246942218},{x:.4573721581504997,y:-.06150195953288313},{x:.45496264677700954,y:-.053015860941189874},{x:.45094387778201217,y:-.04516289270416226},{x:.44547029020423373,y:-.03824483998715393},{x:.4061377413616867,y:.0025191240684850026},{x:.3677075745656829,y:.050348403515145926},{x:.3286739379437331,y:.10701906379590062},{x:.2900025757951927,y:.1711891536907596},{x:.2617573982317254,y:.23368121626802973},{x:.24303344075060918,y:.2958190240226623},{x:.23462816944303005,y:.34463593546989096},{x:.24303340667749923,y:.39345182392970596},{x:.26175739639474455,y:.45558881969516635},{x:.2900026404789191,y:.5180819536434618},{x:.328674029726828,y:.5822520885061939},{x:.36770768599197223,y:.6389237351633864},{x:.4061420841180472,y:.6867582808236831},{x:.4454798975405431,y:.7275528000242046},{x:.45095135740921277,y:.7344725356602282},{x:.45496771125722263,y:.7423267393839987},{x:.45737461285859093,y:.7508135785511003},{x:.458079566334583,y:.759606908691815},{x:.4570554807184589,y:.768368807060192},{x:.4543417110461325,y:.7767625588156633},{x:.4500425459642118,y:.7844655967855365},{x:.4443231999757953,y:.791181897540543},{x:.4374034643397718,y:.7966533574092127},{x:.4295492606160011,y:.8006697112572226},{x:.42106242144889966,y:.8030766128585909},{x:.41226909130818484,y:.803781566334583},{x:.403507192939808,y:.8027574807184589},{x:.39511344118433667,y:.8000437110461325},{x:.3874104032144634,y:.7957445459642117},{x:.38069410245945684,y:.7900251999757952},{x:.33994410245945683,y:.7477661999757953},{x:.338681775527778,y:.7461697396410558},{x:.3372576384351641,y:.7447157835123226},{x:.29650963843516415,y:.6940017835123226},{x:.2956010143988682,y:.6926109515089496},{x:.29452907712829884,y:.6913417148135671},{x:.2537780771282988,y:.6321767148135672},{x:.25311493656839296,y:.6309770641401381},{x:.25229575445201236,y:.6298780382984708},{x:.21154775445201235,y:.5622620382984707},{x:.21040795156345282,y:.5598669918310725},{x:.2090838723444427,y:.5575686854051248},{x:.17852187234444272,y:.48994968540512485},{x:.17757135012625538,y:.48714095747585867},{x:.17644166886939822,y:.4843993766680373},{x:.1560666688693982,y:.4167833766680374},{x:.15553533856931018,y:.4140862136984408},{x:.15480557779123924,y:.4114358459543075},{x:.14461857779123924,y:.3522718459543075},{x:.14438345368873493,y:.3490270611669966},{x:.14398102471397584,y:.3457987547100726},{x:.14406527252602844,y:.3446360634540339},{x:.14398102142772873,y:.343473372436119}]],\\\")\\\":[[{x:.14397318426833106,y:-.07029507246942218},{x:.14499457536346808,y:-.07905728535189037},{x:.14770576364792798,y:-.08745187125312004},{x:.1520025596763909,y:-.09515623094466495},{x:.15771983998715397,y:-.10187429020423372},{x:.16463789270416226,y:-.10734787778201214},{x:.1724908609411899,y:-.11136664677700951},{x:.18097695953288315,y:-.11377615815049966},{x:.1897700724694222,y:-.11448381573166892},{x:.19853228535189038,y:-.11346242463653189},{x:.20692687125312006,y:-.11075123635207199},{x:.21463123094466496,y:-.10645444032360907},{x:.22134929020423375,y:-.10073716001284601},{x:.2620992902042337,y:-.05850416001284604},{x:.2633660586938147,y:-.05690309470300352},{x:.26479468609075496,y:-.05544462417080616},{x:.30554468609075497,y:-.004730624170806122},{x:.3064541047100432,y:-.003338648753719708},{x:.307526891803669,y:-.002068307996824087},{x:.348273891803669,y:.05709569200317591},{x:.3489362195699084,y:.058293979727073175},{x:.3497544895549002,y:.059391707275619196},{x:.39050548955490016,y:.12700770727561922},{x:.39164563057902163,y:.12940326331913213},{x:.3929700247860732,y:.13170208699588917},{x:.42353202478607316,y:.19932008699588913},{x:.4244827292530259,y:.20212930210713742},{x:.4256125601984483,y:.2048713835354543},{x:.4459865601984483,y:.27248838353545435},{x:.4465177787005257,y:.27518522990297933},{x:.4472474437906494,y:.27783527938992064},{x:.4574344437906494,y:.33700027938992067},{x:.45766955872204595,y:.3402450648417768},{x:.4580719785722712,y:.34347337243611903},{x:.45798772747397154,y:.3446360634540339},{x:.4580719752860241,y:.3457987547100726},{x:.45766954631126505,y:.34902706116699656},{x:.45743442220876074,y:.3522718459543075},{x:.44724742220876074,y:.4114358459543075},{x:.4465177421348676,y:.414085920594514},{x:.44598650715958776,y:.4167827924880124},{x:.42561250715958776,y:.4843987924880123},{x:.42448274729464536,y:.48714066960378194},{x:.42353212765555726,y:.48994968540512485},{x:.3929701276555573,y:.5575686854051248},{x:.39164568407140216,y:.5598676242877579},{x:.39050548955490016,y:.5622632927243807},{x:.3497544895549002,y:.6298792927243808},{x:.3489363257182038,y:.6309768778726063},{x:.34827409333092635,y:.6321750153799588},{x:.3075270933309263,y:.6913400153799587},{x:.3064542017711834,y:.692610500189881},{x:.30554468609075497,y:.6940026241708062},{x:.26479468609075496,y:.7447166241708062},{x:.26337089070969094,y:.7461701617493295},{x:.2621088975405431,y:.7477661999757953},{x:.2213588975405431,y:.7900251999757952},{x:.21464259678553657,y:.7957445459642117},{x:.20693955881566328,y:.8000437110461325},{x:.19854580706019195,y:.8027574807184589},{x:.1897839086918151,y:.803781566334583},{x:.1809905785511003,y:.8030766128585909},{x:.17250373938399882,y:.8006697112572226},{x:.16464953566022822,y:.7966533574092127},{x:.15772980002420467,y:.791181897540543},{x:.15201045403578817,y:.7844655967855365},{x:.14771128895386743,y:.7767625588156633},{x:.14499751928154103,y:.7683688070601918},{x:.14397343366541698,y:.759606908691815},{x:.14467838714140904,y:.7508135785511002},{x:.14708528874277732,y:.7423267393839987},{x:.1511016425907872,y:.7344725356602282},{x:.15657310245945688,y:.7275528000242046},{x:.19591129092993145,y:.6867578918874246},{x:.23434697314436972,y:.6389240958672278},{x:.27337685298529213,y:.5822523693404118},{x:.3120516621801016,y:.518081284004684},{x:.34029647741491703,y:.4555890988936643},{x:.35901954136421654,y:.39345212569273014},{x:.36742483055696995,y:.344635935469891},{x:.359019507292604,y:.29581872226323463},{x:.3402964755778617,y:.23368093707349602},{x:.3120517268674457,y:.17118982332763816},{x:.27337694476991303,y:.10701878295300266},{x:.23434708457036935,y:.05034804280413771},{x:.1959156338111051,y:.0025195128948044543},{x:.15658270979576625,y:-.03824483998715393},{x:.1511091222179878,y:-.045162892704162266},{x:.14709035322299047,y:-.053015860941189874},{x:.1446808418495003,y:-.06150195953288312},{x:.14397318426833106,y:-.07029507246942218}]],\\\"*\\\":[[{x:.03611444520266741,y:.4654782574484574},{x:.03652686631141767,y:.45666636076295464},{x:.038650478626155074,y:.4481042415682919},{x:.04240367291655979,y:.4401209373034283},{x:.04764221603086716,y:.4330232418741738},{x:.05416479369500318,y:.42708391573544136},{x:.06172074690723879,y:.42253120385992987},{x:.07001970462305517,y:.4195400644118251},{x:.0787427425515426,y:.41822544520266736},{x:.08755463923704532,y:.41863786631141764},{x:.09611675843170807,y:.42076147862615504},{x:.25602600000000003,y:.47756000598755177},{x:.25602600000000003,y:.31805799999999995},{x:.25689066238185465,y:.30927893550927416},{x:.2594514210369921,y:.30083724554357094},{x:.2636098674463855,y:.29305733951411783},{x:.26920619484660535,y:.2862381948466053},{x:.27602533951411795,y:.2806418674463854},{x:.283805245543571,y:.276483421036992},{x:.2922469355092743,y:.2739226623818546},{x:.301026,y:.27305799999999997},{x:.3098050644907258,y:.2739226623818546},{x:.3182467544564291,y:.276483421036992},{x:.32602666048588214,y:.2806418674463854},{x:.3328458051533947,y:.2862381948466053},{x:.33844213255361455,y:.29305733951411783},{x:.34260057896300794,y:.30083724554357094},{x:.3451613376181454,y:.30927893550927416},{x:.346026,y:.31805799999999995},{x:.346026,y:.47756000598755177},{x:.505935241568292,y:.42076147862615504},{x:.5144973607629547,y:.41863786631141764},{x:.5233092574484575,y:.41822544520266736},{x:.5320322953769449,y:.4195400644118251},{x:.5403312530927612,y:.42253120385992987},{x:.5478872063049969,y:.42708391573544136},{x:.5544097839691329,y:.4330232418741738},{x:.5596483270834403,y:.4401209373034283},{x:.5634015213738449,y:.4481042415682919},{x:.5655251336885824,y:.45666636076295464},{x:.5659375547973327,y:.4654782574484574},{x:.5646229355881749,y:.4742012953769448},{x:.5616317961400701,y:.4825002530927612},{x:.5570790842645587,y:.4900562063049968},{x:.5511397581258262,y:.4965787839691328},{x:.5440420626965717,y:.5018173270834402},{x:.5360587584317081,y:.5055705213738448},{x:.37146215609131306,y:.5640339630732496},{x:.47696549129035026,y:.7165911114148321},{x:.48124783600971727,y:.7243035129909579},{x:.48394328176908086,y:.732703166943666},{x:.4849482440995321,y:.7414672792821342},{x:.48422410286230105,y:.7502590500841659},{x:.48179868639903156,y:.758740616528321},{x:.47776520210421775,y:.7665860367726678},{x:.4722786545173053,y:.7734938157169785},{x:.4655498885851679,y:.7791984912903502},{x:.45783748700904214,y:.7834808360097172},{x:.449437833056334,y:.7861762817690807},{x:.4406737207178658,y:.7871812440995319},{x:.431881949915834,y:.786457102862301},{x:.4234003834716789,y:.7840316863990314},{x:.4155549632273321,y:.7799982021042177},{x:.40864718428302144,y:.7745116545173052},{x:.40294250870964976,y:.7677828885851677},{x:.301026,y:.6204122684209616},{x:.19910949129035027,y:.7677828885851677},{x:.19340481571697854,y:.7745116545173052},{x:.18649703677266788,y:.7799982021042177},{x:.17865161652832107,y:.7840316863990314},{x:.17017005008416597,y:.786457102862301},{x:.1613782792821342,y:.7871812440995319},{x:.15261416694366597,y:.7861762817690807},{x:.14421451299095783,y:.7834808360097172},{x:.13650211141483212,y:.7791984912903502},{x:.12977334548269473,y:.7734938157169785},{x:.12428679789578226,y:.7665860367726678},{x:.12025331360096844,y:.758740616528321},{x:.11782789713769894,y:.7502590500841659},{x:.11710375590046794,y:.7414672792821342},{x:.11810871823091917,y:.732703166943666},{x:.12080416399028275,y:.7243035129909579},{x:.1250865087096497,y:.7165911114148321},{x:.23058984390868703,y:.5640339630732496},{x:.06599324156829194,y:.5055705213738448},{x:.058009937303428294,y:.5018173270834402},{x:.05091224187417384,y:.4965787839691328},{x:.04497291573544139,y:.4900562063049968},{x:.04042020385992993,y:.4825002530927612},{x:.03742906441182516,y:.4742012953769448},{x:.03611444520266741,y:.4654782574484574}]],\\\"+\\\":[[{x:-.002030999999999998,y:.33155},{x:-.0011663376181453647,y:.3227709355092742},{x:.0013944210369920967,y:.314329245543571},{x:.005552867446385459,y:.3065493395141179},{x:.011149194846605363,y:.29973019484660535},{x:.017968339514117915,y:.2941338674463855},{x:.025748245543570962,y:.2899754210369921},{x:.03418993550927423,y:.28741466238185465},{x:.042969,y:.28655},{x:.256023,y:.28655},{x:.256023,y:.09133899999999995},{x:.2568876623818546,y:.08255993550927418},{x:.25944842103699206,y:.07411824554357091},{x:.26360686744638545,y:.06633833951411786},{x:.2692031948466054,y:.05951919484660531},{x:.2760223395141179,y:.053922867446385414},{x:.2838022455435709,y:.049764421036992045},{x:.2922439355092742,y:.04720366238185458},{x:.301023,y:.04633899999999995},{x:.3098020644907258,y:.04720366238185458},{x:.31824375445642905,y:.049764421036992045},{x:.3260236604858821,y:.053922867446385414},{x:.3328428051533946,y:.05951919484660531},{x:.3384391325536145,y:.06633833951411786},{x:.3425975789630079,y:.07411824554357091},{x:.34515833761814535,y:.08255993550927418},{x:.34602299999999997,y:.09133899999999995},{x:.34602299999999997,y:.28655},{x:.559083,y:.28655},{x:.5678620644907257,y:.28741466238185465},{x:.576303754456429,y:.2899754210369921},{x:.5840836604858821,y:.2941338674463855},{x:.5909028051533947,y:.29973019484660535},{x:.5964991325536145,y:.3065493395141179},{x:.6006575789630079,y:.314329245543571},{x:.6032183376181454,y:.3227709355092742},{x:.604083,y:.33155},{x:.6032183376181454,y:.3403290644907258},{x:.6006575789630079,y:.348770754456429},{x:.5964991325536145,y:.35655066048588213},{x:.5909028051533947,y:.3633698051533947},{x:.5840836604858821,y:.36896613255361455},{x:.576303754456429,y:.37312457896300794},{x:.5678620644907257,y:.3756853376181454},{x:.559083,y:.37655},{x:.34602299999999997,y:.37655},{x:.34602299999999997,y:.571777},{x:.34515833761814535,y:.5805560644907257},{x:.3425975789630079,y:.588997754456429},{x:.3384391325536145,y:.5967776604858821},{x:.3328428051533946,y:.6035968051533946},{x:.3260236604858821,y:.6091931325536145},{x:.31824375445642905,y:.6133515789630078},{x:.3098020644907258,y:.6159123376181453},{x:.301023,y:.616777},{x:.2922439355092742,y:.6159123376181453},{x:.2838022455435709,y:.6133515789630078},{x:.2760223395141179,y:.6091931325536145},{x:.2692031948466054,y:.6035968051533946},{x:.26360686744638545,y:.5967776604858821},{x:.25944842103699206,y:.588997754456429},{x:.2568876623818546,y:.5805560644907257},{x:.256023,y:.571777},{x:.256023,y:.37655},{x:.042969,y:.37655},{x:.03418993550927421,y:.3756853376181454},{x:.025748245543570934,y:.37312457896300794},{x:.017968339514117904,y:.36896613255361455},{x:.011149194846605356,y:.3633698051533947},{x:.005552867446385459,y:.35655066048588213},{x:.0013944210369920967,y:.348770754456429},{x:-.0011663376181453647,y:.3403290644907258},{x:-.002030999999999998,y:.33155}]],\\\",\\\":[[{x:.1703425796668749,y:-.03158948169003215},{x:.1707557440557006,y:-.035050650253961146},{x:.17102563140319493,y:-.03852592771911176},{x:.17127771326913271,y:-.039423300660751795},{x:.17138819577001116,y:-.0403488367651378},{x:.1724686618106471,y:-.0436628955719719},{x:.1734113563482083,y:-.04701874414557815},{x:.1738336633079298,y:-.04784969558537063},{x:.17412258605517572,y:-.048735893706360625},{x:.1758288320436127,y:-.05177548533469908},{x:.17740810654883146,y:-.054882941638058576},{x:.177984409582707,y:-.05561553857817519},{x:.17844066943717352,y:-.05642834261896521},{x:.18070712529694977,y:-.05907665726715373},{x:.18286228913625774,y:-.06181630349720979},{x:.26855428913625773,y:-.1511263034972098},{x:.27525630293239317,y:-.15686238451505874},{x:.2829485933055849,y:-.16118075031492074},{x:.2913355498506774,y:-.16391544852087458},{x:.3000948665311021,y:-.16496138621450188},{x:.3088899277191117,y:-.1642783685968051},{x:.3173827441455781,y:-.16189264365179173},{x:.3252469416380585,y:-.15789589345116858},{x:.33218030349720973,y:-.1524417108637423},{x:.3379163845150587,y:-.14573969706760687},{x:.3422347503149207,y:-.13804740669441512},{x:.3449694485208745,y:-.12966045014932262},{x:.3460153862145018,y:-.12090113346889794},{x:.34533236859680505,y:-.11210607228088836},{x:.34294664365179167,y:-.10361325585442197},{x:.33894989345116855,y:-.09574905836194152},{x:.33349571086374225,y:-.08881569650279031},{x:.277697993368333,y:-.03066214483501502},{x:.41918956700521515,y:.11679250439324337},{x:.42464400414059766,y:.12372566600271688},{x:.42864104306488354,y:.1315897167531037},{x:.43102707981377775,y:.14008244558427704},{x:.4317104203331251,y:.14887748169003212},{x:.4306648042299889,y:.15763683676513773},{x:.4279304139448243,y:.1660238937063606},{x:.4236123305628265,y:.17371634261896518},{x:.41787649560675666,y:.1804185670052151},{x:.41094333399728317,y:.18587300414059763},{x:.4030792832468963,y:.18987004306488353},{x:.39458655441572293,y:.19225607981377774},{x:.3857915183099679,y:.19293942033312508},{x:.37703216323486227,y:.19189380422998883},{x:.36864510629363945,y:.18915941394482427},{x:.3609526573810348,y:.18484133056282648},{x:.35425043299478487,y:.17910549560675662},{x:.18286343299478489,y:.000495495606756581},{x:.18070816857348473,y:-.0022440714967103576},{x:.1784416154849413,y:-.004892302932393237},{x:.17798532578947307,y:-.005705090221499034},{x:.17740899585940237,y:-.006437666002716908},{x:.1758296072680145,y:-.009545064322455634},{x:.1741232496850793,y:-.012584593305585},{x:.17383429440212667,y:-.013470780818460306},{x:.1734119569351165,y:-.014301716753103766},{x:.1724691391914766,y:-.01765753071433596},{x:.17138855147912546,y:-.02097154985067746},{x:.17127803499816427,y:-.02189708189818214},{x:.17102592018622226,y:-.022794445584277102},{x:.17075590524748027,y:-.02626971313843455},{x:.17034261378549817,y:-.029730866531102167},{x:.17041478319291342,y:-.03066017543569507},{x:.1703425796668749,y:-.03158948169003215}]],\\\"-\\\":[[{x:.12882900000000003,y:.31396500000000005},{x:.12969366238185465,y:.30518593550927425},{x:.13225442103699211,y:.29674424554357104},{x:.13641286744638548,y:.28896433951411793},{x:.14200919484660537,y:.2821451948466054},{x:.14882833951411792,y:.2765488674463855},{x:.15660824554357097,y:.2723904210369921},{x:.16504993550927424,y:.2698296623818547},{x:.173829,y:.26896500000000007},{x:.428224,y:.26896500000000007},{x:.4370030644907258,y:.2698296623818547},{x:.44544475445642906,y:.2723904210369921},{x:.4532246604858821,y:.2765488674463855},{x:.4600438051533946,y:.2821451948466054},{x:.4656401325536145,y:.28896433951411793},{x:.4697985789630079,y:.29674424554357104},{x:.47235933761814536,y:.30518593550927425},{x:.473224,y:.31396500000000005},{x:.47235933761814536,y:.32274406449072585},{x:.4697985789630079,y:.33118575445642906},{x:.4656401325536145,y:.33896566048588217},{x:.4600438051533946,y:.3457848051533947},{x:.4532246604858821,y:.3513811325536146},{x:.44544475445642906,y:.355539578963008},{x:.4370030644907258,y:.3581003376181454},{x:.428224,y:.35896500000000003},{x:.173829,y:.35896500000000003},{x:.16504993550927424,y:.3581003376181454},{x:.15660824554357097,y:.355539578963008},{x:.14882833951411792,y:.3513811325536146},{x:.14200919484660537,y:.3457848051533947},{x:.13641286744638548,y:.33896566048588217},{x:.13225442103699211,y:.33118575445642906},{x:.12969366238185465,y:.32274406449072585},{x:.12882900000000003,y:.31396500000000005}]],\\\".\\\":[[{x:.19450299999999998,y:.148926},{x:.19536766238185463,y:.14014693550927423},{x:.1979284210369921,y:.13170524554357096},{x:.20208686744638546,y:.12392533951411791},{x:.20768319484660536,y:.11710619484660537},{x:.2145023395141179,y:.11150986744638547},{x:.22228224554357093,y:.1073514210369921},{x:.2307239355092742,y:.10479066238185464},{x:.239503,y:.103926},{x:.362549,y:.103926},{x:.3713280644907258,y:.10479066238185464},{x:.3797697544564291,y:.1073514210369921},{x:.38754966048588213,y:.11150986744638547},{x:.3943688051533947,y:.11710619484660537},{x:.39996513255361454,y:.12392533951411791},{x:.40412357896300793,y:.13170524554357096},{x:.4066843376181454,y:.14014693550927423},{x:.407549,y:.148926},{x:.4066843376181454,y:.1577050644907258},{x:.40412357896300793,y:.16614675445642904},{x:.39996513255361454,y:.1739266604858821},{x:.3943688051533947,y:.18074580515339464},{x:.38754966048588213,y:.18634213255361454},{x:.3797697544564291,y:.1905005789630079},{x:.3713280644907258,y:.19306133761814537},{x:.362549,y:.193926},{x:.239503,y:.193926},{x:.2307239355092742,y:.19306133761814537},{x:.22228224554357093,y:.1905005789630079},{x:.2145023395141179,y:.18634213255361454},{x:.20768319484660536,y:.18074580515339464},{x:.20208686744638546,y:.1739266604858821},{x:.1979284210369921,y:.16614675445642904},{x:.19536766238185463,y:.1577050644907258},{x:.19450299999999998,y:.148926}]],\\\"/\\\":[[{x:.017522651058219416,y:-.036644753012328966},{x:.01865919532569161,y:-.04539277458837648},{x:.02148055556003016,y:-.053750976595687026},{x:.02587830846966649,y:-.06139815801845333},{x:.031683450876571484,y:-.06804044196318723},{x:.038672894413609195,y:-.07342256918292836},{x:.04657803868537635,y:-.0773377075469538},{x:.0550950934307649,y:-.07963540048356893},{x:.0638967530123289,y:-.08022734894178067},{x:.07264477458837641,y:-.07909080467430848},{x:.08100297659568695,y:-.07626944443996993},{x:.08865015801845323,y:-.0718716915303336},{x:.09529244196318715,y:-.0660665491234286},{x:.10067456918292828,y:-.059077105586390885},{x:.5777245691829282,y:.7051758944136092},{x:.5816397075469537,y:.7130810386853763},{x:.5839374004835688,y:.7215980934307649},{x:.5845293489417805,y:.7303997530123288},{x:.5833928046743084,y:.7391477745883763},{x:.5805714444399699,y:.747505976595687},{x:.5761736915303335,y:.7551531580184532},{x:.5703685491234285,y:.7617954419631872},{x:.5633791055863908,y:.7671775691829282},{x:.5554739613146237,y:.7710927075469537},{x:.5469569065692351,y:.7733904004835688},{x:.5381552469876711,y:.7739823489417805},{x:.5294072254116237,y:.7728458046743084},{x:.521049023404313,y:.7700244444399699},{x:.5134018419815468,y:.7656266915303335},{x:.5067595580368128,y:.7598215491234285},{x:.5013774308170718,y:.7528321055863908},{x:.024327430817071727,y:-.011420894413609283},{x:.020412292453046287,y:-.019326038685376436},{x:.018114599516431164,y:-.027843093430764996},{x:.017522651058219416,y:-.036644753012328966}]],\\\"\u003c\\\":[[{x:-.002019645490236678,y:.32959917016575135},{x:-.0016099914284145765,y:.3262199732716625},{x:-.0013526191024594778,y:.3228257800560043},{x:-.001080072865731869,y:.3218487260950263},{x:-.0009579981642362373,y:.3208417436418168},{x:.00010303311987996846,y:.3176073966113462},{x:.0010176343561875828,y:.3143286327165328},{x:.0014755574652736251,y:.31342352370653337},{x:.001791739066671412,y:.3124597057316259},{x:.003463372735866293,y:.309494502707312},{x:.00500005526992945,y:.3064571691910689},{x:.005625757523098081,y:.30565878796371126},{x:.0061238953427729045,y:.3047751734513664},{x:.008341891452602095,y:.3021930655225286},{x:.010441601436418424,y:.2995138854085287},{x:.011211037446978121,y:.298852913306643},{x:.011871988327878901,y:.29808345906703315},{x:.014551110531708777,y:.29598367519331337},{x:.017133157288130564,y:.2937656078708368},{x:.01801675806170013,y:.2932674456816211},{x:.018815122032139454,y:.29264172140965955},{x:.021852413166145952,y:.29110495510775264},{x:.024817570086352318,y:.28943323966009543},{x:.5409315700863523,y:.06192123966009548},{x:.5493135321567164,y:.059171271257023414},{x:.5580709293975171,y:.05810938240515066},{x:.5668672199439956,y:.058776380897540545},{x:.5753643672834672,y:.061146634356187606},{x:.583235830808931,y:.06512905526992949},{x:.5901791145914712,y:.07057060143641844},{x:.5959273921291632,y:.07726215728813057},{x:.6002597603399046,y:.08494657008635234},{x:.6030097287429766,y:.09332853215671641},{x:.6040716175948494,y:.10208592939751719},{x:.6034046191024595,y:.11088221994399564},{x:.6010343656438124,y:.11937936728346718},{x:.5970519447300705,y:.12725083080893104},{x:.5916103985635816,y:.13419411459147126},{x:.5849188427118694,y:.1399423921291632},{x:.5772344299136477,y:.14427476033990455},{x:.15453394878652635,y:.33060846154195217},{x:.577233294268374,y:.5169277390666714},{x:.5849178265486336,y:.521259895342773},{x:.5916095409329668,y:.527007988327879},{x:.5970512785903404,y:.5339511220321395},{x:.6010339165943431,y:.5418224757210541},{x:.6034044043999703,y:.5503195576866639},{x:.6040716454902366,y:.5591158298342486},{x:.6030099981642363,y:.5678732563581832},{x:.6002602609333286,y:.5762552942683741},{x:.5959281046572271,y:.5839398265486336},{x:.5901800116721211,y:.5906315409329669},{x:.5832368779678606,y:.5960732785903404},{x:.5753655242789459,y:.6000559165943432},{x:.5668684423133362,y:.6024264043999704},{x:.5580721701657515,y:.6030936454902367},{x:.5493147436418169,y:.6020319981642364},{x:.540932705731626,y:.5992822609333287},{x:.024818705731625975,y:.37178726093332853},{x:.02185350270731245,y:.3701156272641339},{x:.018816169191068974,y:.3685789447300705},{x:.01801778796371134,y:.36795324247690187},{x:.01713417345136639,y:.367455104657227},{x:.01455206552252819,y:.3652371085473975},{x:.011872885408528756,y:.3631373985635815},{x:.011211913306643135,y:.3623679625530219},{x:.010442459067033207,y:.36170701167212105},{x:.008342675193313383,y:.3590278894682912},{x:.006124607870836803,y:.3564458427118694},{x:.005626445681621026,y:.3555622419382997},{x:.005000721409659611,y:.3547638779678605},{x:.0034639551077528313,y:.3517265868338544},{x:.0017922396600954515,y:.3487614299136476},{x:.0014760314771086122,y:.3477976206592673},{x:.0010180834056568513,y:.3468925242789459},{x:.00010339174271701993,y:.34361378560971106},{x:-.0009577287429766018,y:.3403794678432836},{x:-.0010798312165939596,y:.33937248875722786},{x:-.0013524043999703778,y:.33839544231333624},{x:-.001609870336301571,y:.33500125619719334},{x:-.0020196175948493655,y:.3316220706024828},{x:-.001942922029511974,y:.3306106193263084},{x:-.002019645490236678,y:.32959917016575135}]],\\\"=\\\":[[{x:-.002030999999999998,y:.19162999999999997},{x:-.0011663376181453647,y:.1828509355092742},{x:.0013944210369920967,y:.17440924554357093},{x:.005552867446385459,y:.16662933951411787},{x:.011149194846605363,y:.15981019484660533},{x:.017968339514117915,y:.15421386744638543},{x:.025748245543570962,y:.15005542103699207},{x:.03418993550927423,y:.1474946623818546},{x:.042969,y:.14662999999999998},{x:.559083,y:.14662999999999998},{x:.5678620644907257,y:.1474946623818546},{x:.576303754456429,y:.15005542103699207},{x:.5840836604858821,y:.15421386744638543},{x:.5909028051533947,y:.15981019484660533},{x:.5964991325536145,y:.16662933951411787},{x:.6006575789630079,y:.17440924554357093},{x:.6032183376181454,y:.1828509355092742},{x:.604083,y:.19162999999999997},{x:.6032183376181454,y:.20040906449072574},{x:.6006575789630079,y:.208850754456429},{x:.5964991325536145,y:.21663066048588206},{x:.5909028051533947,y:.2234498051533946},{x:.5840836604858821,y:.2290461325536145},{x:.576303754456429,y:.23320457896300786},{x:.5678620644907257,y:.23576533761814533},{x:.559083,y:.23662999999999995},{x:.042969,y:.23662999999999995},{x:.03418993550927421,y:.23576533761814533},{x:.025748245543570934,y:.23320457896300786},{x:.017968339514117904,y:.2290461325536145},{x:.011149194846605356,y:.2234498051533946},{x:.005552867446385459,y:.21663066048588206},{x:.0013944210369920967,y:.208850754456429},{x:-.0011663376181453647,y:.20040906449072574},{x:-.002030999999999998,y:.19162999999999997}],[{x:-.002030999999999998,y:.454102},{x:-.0011663376181453647,y:.4453229355092742},{x:.0013944210369920967,y:.436881245543571},{x:.005552867446385459,y:.4291013395141179},{x:.011149194846605363,y:.42228219484660534},{x:.017968339514117915,y:.41668586744638547},{x:.025748245543570962,y:.4125274210369921},{x:.03418993550927423,y:.40996666238185464},{x:.042969,y:.409102},{x:.559083,y:.409102},{x:.5678620644907257,y:.40996666238185464},{x:.576303754456429,y:.4125274210369921},{x:.5840836604858821,y:.41668586744638547},{x:.5909028051533947,y:.42228219484660534},{x:.5964991325536145,y:.4291013395141179},{x:.6006575789630079,y:.436881245543571},{x:.6032183376181454,y:.4453229355092742},{x:.604083,y:.454102},{x:.6032183376181454,y:.4628810644907258},{x:.6006575789630079,y:.471322754456429},{x:.5964991325536145,y:.4791026604858821},{x:.5909028051533947,y:.48592180515339467},{x:.5840836604858821,y:.49151813255361454},{x:.576303754456429,y:.49567657896300793},{x:.5678620644907257,y:.49823733761814537},{x:.559083,y:.499102},{x:.042969,y:.499102},{x:.03418993550927421,y:.49823733761814537},{x:.025748245543570934,y:.49567657896300793},{x:.017968339514117904,y:.49151813255361454},{x:.011149194846605356,y:.48592180515339467},{x:.005552867446385459,y:.4791026604858821},{x:.0013944210369920967,y:.471322754456429},{x:-.0011663376181453647,y:.4628810644907258},{x:-.002030999999999998,y:.454102}]],\\\"\u003e\\\":[[{x:-.002019645490236678,y:.5591158298342487},{x:-.0013524043999703708,y:.5503195576866637},{x:.0010180834056568513,y:.5418224757210541},{x:.005000721409659611,y:.5339511220321396},{x:.01044245906703322,y:.527007988327879},{x:.01713417345136643,y:.521259895342773},{x:.024818705731625975,y:.5169277390666714},{x:.44751805121347366,y:.33060846154195217},{x:.024817570086352318,y:.14427476033990455},{x:.017133157288130554,y:.1399423921291632},{x:.01044160143641841,y:.13419411459147126},{x:.00500005526992945,y:.12725083080893107},{x:.0010176343561875828,y:.11937936728346718},{x:-.0013526191024594778,y:.11088221994399562},{x:-.0020196175948493655,y:.10208592939751718},{x:-.0009577287429766018,y:.0933285321567164},{x:.0017922396600954585,y:.08494657008635234},{x:.00612460787083681,y:.07726215728813059},{x:.011872885408528759,y:.07057060143641844},{x:.018816169191068984,y:.06512905526992947},{x:.02668763271653284,y:.061146634356187606},{x:.03518478005600438,y:.058776380897540545},{x:.04398107060248284,y:.05810938240515066},{x:.052738467843283614,y:.05917127125702342},{x:.06112042991364768,y:.06192123966009548},{x:.5772344299136477,y:.28943323966009543},{x:.5801995868338548,y:.29110495510775297},{x:.5832368779678606,y:.2926417214096596},{x:.5840352419382998,y:.29326744568162105},{x:.5849188427118694,y:.2937656078708368},{x:.5875008894682915,y:.29598367519331353},{x:.5901800116721211,y:.29808345906703315},{x:.5908409625530218,y:.2988529133066429},{x:.5916103985635817,y:.29951388540852875},{x:.5937101085473976,y:.3021930655225282},{x:.5959281046572271,y:.3047751734513664},{x:.5964262424769022,y:.30565878796371176},{x:.5970519447300705,y:.30645716919106897},{x:.5985886272641329,y:.3094945027073105},{x:.6002602609333286,y:.31245970573162596},{x:.6005764425347265,y:.31342352370653376},{x:.6010343656438124,y:.31432863271653283},{x:.6019489668801197,y:.31760739661134507},{x:.6030099981642363,y:.32084174364181683},{x:.6031320728657319,y:.3218487260950267},{x:.6034046191024595,y:.3228257800560044},{x:.6036619914284146,y:.3262199732716634},{x:.6040716454902366,y:.32959917016575135},{x:.603994922029512,y:.330610619326308},{x:.6040716175948494,y:.33162207060248283},{x:.6036618703363014,y:.3350012561971954},{x:.6034044043999703,y:.33839544231333624},{x:.6031318312165941,y:.33937248875722736},{x:.6030097287429766,y:.3403794678432836},{x:.6019486082572825,y:.3436137856097129},{x:.6010339165943431,y:.3468925242789459},{x:.6005759685228916,y:.3477976206592668},{x:.6002597603399046,y:.34876142991364767},{x:.5985880448922466,y:.3517265868338553},{x:.5970512785903404,y:.3547638779678605},{x:.596425554318379,y:.35556224193829966},{x:.5959273921291631,y:.35644584271186947},{x:.5937093248066866,y:.3590278894682911},{x:.5916095409329668,y:.36170701167212105},{x:.5908400866933569,y:.3623679625530219},{x:.5901791145914712,y:.36313739856358157},{x:.5874999344774714,y:.3652371085473978},{x:.5849178265486336,y:.367455104657227},{x:.5840342120362888,y:.36795324247690175},{x:.583235830808931,y:.3685789447300705},{x:.5801984972926872,y:.37011562726413405},{x:.577233294268374,y:.37178726093332853},{x:.06111929426837402,y:.5992822609333287},{x:.05273725635818315,y:.6020319981642364},{x:.04397982983424857,y:.6030936454902367},{x:.035183557686663716,y:.6024264043999704},{x:.02668647572105406,y:.6000559165943432},{x:.018815122032139416,y:.5960732785903404},{x:.011871988327878898,y:.5906315409329669},{x:.006123895342772898,y:.5839398265486336},{x:.001791739066671405,y:.5762552942683741},{x:-.0009579981642362442,y:.5678732563581832},{x:-.002019645490236678,y:.5591158298342487}]],A:[[{x:-.026930267425517032,y:.05053409251215203},{x:-.025968910797820398,y:.041765089843587025},{x:-.02331527881378681,y:.03335213247651147},{x:-.019071349062388714,y:.025618525644501258},{x:-.013400213383949137,y:.018861467521053887},{x:-.006519810342180955,y:.013340628060451547},{x:.0013054500325951415,y:.009268170027042777},{x:.009774847372633092,y:.006800595699190677},{x:.018562907487847988,y:.006032732574482988},{x:.02733191015641301,y:.006994089202179622},{x:.035744867523488544,y:.00964772118621321},{x:.043478474355498745,y:.013891650937611293},{x:.05023553247894613,y:.019562786616050876},{x:.055756371939548466,y:.02644318965781906},{x:.05982882997295724,y:.03426845003259516},{x:.15465984441872488,y:.2705423452957767},{x:.155303,y:.27047899999999997},{x:.433548,y:.27047899999999997},{x:.439584057854266,y:.2710734998088117},{x:.5426964027293978,y:.03313672871631684},{x:.5469805748198717,y:.025425342079263714},{x:.5526868446471364,y:.018697928086846893},{x:.559595923461843,y:.013213017486017727},{x:.5674422992397985,y:.009181392315192764},{x:.5759244401601543,y:.006757985668725375},{x:.5847163823041805,y:.006035927704977205},{x:.5934802562658602,y:.007042966706560308},{x:.6018792712836831,y:.009740402729397836},{x:.6095906579207363,y:.01402457481987169},{x:.6163180719131531,y:.019730844647136342},{x:.6218029825139822,y:.026639923461843008},{x:.6258346076848073,y:.03448629923979854},{x:.6282580143312746,y:.042968440160154345},{x:.6289800722950228,y:.05176038230418057},{x:.6279730332934397,y:.060524256265860256},{x:.6252755972706022,y:.0689232712836832},{x:.3314685972706022,y:.7468972712836831},{x:.3293831787279993,y:.7506509647260751},{x:.32731734906238874,y:.7544154743554987},{x:.32724162770964893,y:.7545056950115825},{x:.32718442518012836,y:.7546086579207363},{x:.324406768107635,y:.7578833802211685},{x:.32164621338394916,y:.7611725324789461},{x:.3215543458189217,y:.761246247067332},{x:.32147815535286367,y:.7613360719131531},{x:.3181150035540548,y:.764005977330098},{x:.314765810342181,y:.7666933719395485},{x:.31466132698386995,y:.7667477476499444},{x:.314569076538157,y:.7668209825139822},{x:.31074967405057474,y:.7687834680795742},{x:.3069405499674049,y:.7707658299729572},{x:.30682746605267575,y:.7707987771773066},{x:.30672270076020147,y:.7708526076848072},{x:.3025938250794972,y:.7720322561793334},{x:.29847115262736695,y:.7732334043008093},{x:.2983538139076442,y:.7732436568565263},{x:.29824055983984565,y:.7732760143312747},{x:.29396088134293,y:.7736274925246428},{x:.289683092512152,y:.774001267425517},{x:.28956600824863027,y:.7739884313326351},{x:.2894486176958195,y:.7739980722950228},{x:.2851826020272766,y:.773507873077374},{x:.280914089843587,y:.7730399107978204},{x:.2808017595188513,y:.7730044793401902},{x:.28068474373413976,y:.7729910332934397},{x:.2765963314836881,y:.7716779947458032},{x:.2725011324765115,y:.7703862788137869},{x:.27239787288194656,y:.7703296136024552},{x:.27228572871631684,y:.7702935972706022},{x:.26853203527393116,y:.7682081787280027},{x:.2647675256445013,y:.7661423490623888},{x:.26467730498841713,y:.7660666277096486},{x:.2645743420792637,y:.7660094251801283},{x:.2612996197788366,y:.7632317681076393},{x:.2580104675210539,y:.7604712133839491},{x:.2579367529326681,y:.7603793458189217},{x:.2578469280868469,y:.7603031553528636},{x:.25517702266989234,y:.7569400035540427},{x:.25248962806045155,y:.7535908103421809},{x:.2524352523500559,y:.7534863269838704},{x:.2523620174860177,y:.753394076538157},{x:.2503995319204231,y:.7495746740505695},{x:.24841717002704278,y:.7457655499674049},{x:-.023694829972957243,y:.06779154996740488},{x:-.026162404300809343,y:.05932215262736691},{x:-.026930267425517032,y:.05053409251215203}],[{x:.19075686729109992,y:.36047899999999994},{x:.2917712201653896,y:.6121588409316518},{x:.4008392655839541,y:.36047899999999994},{x:.19075686729109992,y:.36047899999999994}]],B:[[{x:.018964999999999996,y:.05103000000000002},{x:.018993157630992935,y:.05074411077481729},{x:.01896863696544404,y:.050457886669927884},{x:.019425235762019696,y:.046357147889743},{x:.01982966238185463,y:.04225093550927423},{x:.019913053192865363,y:.04197603284668677},{x:.019944843237820968,y:.04169052471317667},{x:.02119268306568244,y:.037757658485048945},{x:.02239042103699209,y:.03380924554357098},{x:.0225258403659196,y:.03355589379873479},{x:.022612719447780122,y:.03328207355405998},{x:.02460384652213923,y:.029668217721559587},{x:.026548867446385453,y:.026029339514117924},{x:.02673111120436309,y:.02580727485250577},{x:.026869740608734982,y:.025555665255108946},{x:.029527637032761178,y:.022399698271204867},{x:.03214519484660536,y:.019210194846605383},{x:.03236725950821749,y:.019027951088627763},{x:.03255231178483501,y:.01880822135423258},{x:.03577483608951879,y:.016231425260229353},{x:.03896433951411791,y:.013613867446385479},{x:.03921769125895406,y:.013478448117457993},{x:.03944205495260531,y:.013299042336531411},{x:.04310536733612953,y:.011400441961238211},{x:.046744245543570956,y:.009455421036992116},{x:.04701914820615845,y:.009372030225981372},{x:.047274201145921,y:.009239842862072495},{x:.051237522567796415,y:.008092400353164256},{x:.055185935509274225,y:.006894662381854655},{x:.05547182473445692,y:.006866504750861718},{x:.05574776537889109,y:.006786615690234012},{x:.05985878761953148,y:.006434426619834929},{x:.063965,y:.0060300000000000215},{x:.06425088922518268,y:.006058157630992957},{x:.06453711333007213,y:.00603363696544406},{x:.4241221133300721,y:.01060563696544408},{x:.4260098351414485,y:.010815826288282449},{x:.4279092214657345,y:.010813640036582327},{x:.43038314701987823,y:.011302774871886453},{x:.43288947528682337,y:.011581843237821021},{x:.43469991915024053,y:.012156270087817089},{x:.43656323581544765,y:.012524677733968342},{x:.4388942001112364,y:.013487052913568918},{x:.44129792644594007,y:.014249719447780182},{x:.4429615180190356,y:.01516630892323094},{x:.4447171588106798,y:.015891152767997317},{x:.5224141588106799,y:.0573061527679973},{x:.525028554951968,y:.05904868699814221},{x:.5277374225537912,y:.06064039332865708},{x:.5286915199232336,y:.06149010807639827},{x:.529754639763497,y:.06219869339105244},{x:.5319788494519322,y:.06441778869965879},{x:.5343251404217865,y:.06650738469209135},{x:.5350951339540482,y:.06752690757225652},{x:.5359995881074716,y:.06842928201075814},{x:.5377481362120787,y:.07103965980959966},{x:.5396416839038074,y:.07354684346181917},{x:.5707946839038074,y:.12450984346181915},{x:.5718407730360667,y:.12667263757185424},{x:.573076251912317,y:.12873311634664666},{x:.5737567016649755,y:.13063382885667474},{x:.5746357412153917,y:.13245124718509382},{x:.57523978983892,y:.1347765656784282},{x:.576049549867314,y:.13703848290314058},{x:.576346114353134,y:.13903542291661675},{x:.5768537026781452,y:.1409894121704204},{x:.5769924975430949,y:.14338789436140983},{x:.5773454200998597,y:.14576432582559334},{x:.5830324200998597,y:.2611263258255933},{x:.5829003037879823,y:.26382496142481277},{x:.5829742287592172,y:.2665258175697889},{x:.5826851199428378,y:.2682203519457296},{x:.5826010630436497,y:.26993731586400416},{x:.5819450076216034,y:.2725583233230625},{x:.5814906012502021,y:.27522170532098544},{x:.5808764603215925,y:.2768272773619606},{x:.5804590555084463,y:.278494851612457},{x:.5793042728181804,y:.28093750708458076},{x:.5783389976861617,y:.283461062658912},{x:.5774234257367941,y:.284915971131802},{x:.5766887136425759,y:.2864700717712602},{x:.575079581335268,y:.2886405053765124},{x:.5736405324246225,y:.2909272557017569},{x:.5044305324246225,y:.38012925570175693},{x:.5017223718437749,y:.38298983800955333},{x:.499075053174031,y:.3859068173944946},{x:.49869279401231464,y:.38618992769627897},{x:.4983657648506557,y:.38653536283797296},{x:.49515156889241035,y:.38881264393905274},{x:.49198604326106643,y:.39115710813128307},{x:.4915558970220145,y:.39136020348505085},{x:.4911677605809681,y:.39163520096290155},{x:.48757104899345777,y:.3932416662216644},{x:.4840089657752798,y:.3949235187770668},{x:.3737297002329455,y:.43429966367120415},{x:.4408630401939032,y:.4733794631163462},{x:.44336631106573315,y:.475186847643908},{x:.4459719275146733,y:.476843279595192},{x:.4469351296354233,y:.4777635673817196},{x:.4480152047486495,y:.4785433915190981},{x:.45011777274311354,y:.48080441158023823},{x:.45235016915983667,y:.4829373462081214},{x:.4531153243813002,y:.4840278623347861},{x:.4540225100120052,y:.48500341457167107},{x:.4556435746202097,y:.4876311804334344},{x:.4574169612623637,y:.4901586502563309},{x:.45795466509848404,y:.4913774867999537},{x:.45865409861163536,y:.4925112772109775},{x:.4597313632297904,y:.4954048053049642},{x:.460977589843244,y:.49822968107500176},{x:.46126717863714684,y:.4995299988307428},{x:.46173198119508085,y:.5007784564862466},{x:.46222404714804793,y:.5038265501505143},{x:.4628952219429378,y:.5068402734760588},{x:.4768502219429378,y:.6216502734760588},{x:.47694604753136066,y:.6258560133977795},{x:.4770801736029929,y:.6300607061367898},{x:.47704647561686464,y:.6302637547476413},{x:.47705116403527437,y:.6304695272224051},{x:.47632464920624185,y:.6346131496757303},{x:.47563590322258376,y:.6387632171212809},{x:.475563239914934,y:.6389557900590453},{x:.4755276940283349,y:.6391585233384632},{x:.47400675833929046,y:.6430807912362932},{x:.4725216084222428,y:.647016748623825},{x:.4724127722032346,y:.6471914454185},{x:.4723383580201142,y:.6473833485763381},{x:.4700814501766401,y:.6509335313629835},{x:.46785696980463054,y:.6545041220574128},{x:.46771614318912413,y:.6546542292091504},{x:.46760572040480797,y:.6548279275146733},{x:.4646995721096373,y:.6578695936566139},{x:.4618212468158623,y:.6609376018599591},{x:.3721282468158623,y:.739463601859959},{x:.3693406873548985,y:.7414576112446344},{x:.36664335021940475,y:.7435720694617842},{x:.36575927454484214,y:.7440194833243711},{x:.36495338890552403,y:.7445959530105889},{x:.3618303796850022,y:.746007822191186},{x:.35877236079175173,y:.7475554273162446},{x:.35781798626885214,y:.7478217696388809},{x:.3569151218394033,y:.7482299421328396},{x:.35357667835226414,y:.7490054137685334},{x:.3502754956523681,y:.7499266922044516},{x:.21714549565236804,y:.7733246922044517},{x:.2164184100494338,y:.7733799121498203},{x:.21571010443589486,y:.773553134187072},{x:.21202614434596675,y:.7737134914026773},{x:.20834928456346336,y:.7739927377465721},{x:.20762539682958886,y:.7739050492917646},{x:.20689690716677497,y:.7739367593459113},{x:.061505907166774995,y:.7659797593459113},{x:.05835682356136361,y:.7654946428322841},{x:.055185935509274225,y:.7651823376181454},{x:.05400593378019863,y:.7648243880069794},{x:.05278721145616079,y:.7646366437616691},{x:.0497932781460736,y:.7635464928911877},{x:.046744245543570956,y:.7626215789630079},{x:.045656749721751114,y:.7620403003359452},{x:.0444980718907103,y:.7616184026130197},{x:.04177434405403643,y:.7599651112722733},{x:.03896433951411791,y:.7584631325536145},{x:.03801114145411163,y:.7576808631223083},{x:.03695703545532078,y:.7570410252146568},{x:.03460818442533898,y:.7548881284626934},{x:.03214519484660536,y:.7528668051533947},{x:.03136292541529926,y:.7519136070933885},{x:.03045389995114224,y:.7510804176129765},{x:.02857019075568381,y:.7485106500646154},{x:.026548867446385453,y:.7460476604858821},{x:.025967588819322866,y:.7449601646640625},{x:.025238577228599887,y:.7439656426153641},{x:.023892399755650346,y:.7410777589963466},{x:.02239042103699209,y:.738267754456429},{x:.022032471425826126,y:.7370877527273536},{x:.021511489215134356,y:.7359701170349662},{x:.02075457631003429,y:.7328750970932278},{x:.01982966238185463,y:.7298260644907257},{x:.019708797589401895,y:.7285989036590902},{x:.01941586581292807,y:.7274011044358949},{x:.019277305214138767,y:.7242178880520896},{x:.018964999999999996,y:.721047},{x:.018964999999999996,y:.05103000000000002}],[{x:.10896499999999999,y:.09660579683225357},{x:.10896499999999999,y:.37786028838708235},{x:.29722384626437015,y:.36605169579422814},{x:.44137514989764515,y:.3145812530901673},{x:.49232133133007555,y:.24891875813083103},{x:.48801965008125897,y:.1616582425292873},{x:.46925190911582665,y:.130956211173677},{x:.41203782454012283,y:.1004592638951106},{x:.10896499999999999,y:.09660579683225357}],[{x:.10896499999999999,y:.47257215902605326},{x:.10896499999999999,y:.6784424315209651},{x:.20665565807681563,y:.6837888736412973},{x:.32230778354311135,y:.6634626629325134},{x:.3846372425734713,y:.608893375476212},{x:.3762519660226853,y:.5399063743443061},{x:.2981741908903496,y:.4944555775409729},{x:.10896499999999999,y:.47257215902605326}]],C:[[{x:.028007484408327545,y:.4010798543150725},{x:.028340096336253087,y:.39680461654123217},{x:.028649292669517497,y:.39252762152779447},{x:.06572429266951751,y:.1769866215277945},{x:.0657499934516808,y:.17689321918606288},{x:.06575739253020782,y:.1767966283931179},{x:.06691993730130205,y:.17264138379230456},{x:.0680646634579554,y:.1684811950870131},{x:.0681080922997215,y:.16839460141895576},{x:.06813419313592875,y:.16830131007962543},{x:.07008504794245551,y:.16445270857242494},{x:.07201939106115751,y:.16059578172109576},{x:.07207887901649253,y:.16051932447281397},{x:.0721226785698821,y:.1604329177209502},{x:.1274306785698821,y:.07363491772095027},{x:.13009575906138268,y:.07023973030268985},{x:.13274648275581225,y:.06683332229320074},{x:.13281865262016482,y:.06677089175108791},{x:.13287757357360944,y:.06669582922279092},{x:.1361538134974972,y:.06388581079003605},{x:.13941816151489866,y:.0610619864944041},{x:.19692016151489866,y:.020443986494404057},{x:.19808425112310213,y:.019782383965415776},{x:.19914710087537263,y:.01896802966513257},{x:.20191114759162085,y:.01760739299916557},{x:.20458957759683996,y:.01608512525217841},{x:.2058603718000633,y:.015663337846789194},{x:.20706167183504787,y:.015071982836463577},{x:.21003805521400143,y:.014276729186446702},{x:.2129619996426652,y:.013306247159584957},{x:.21429066253234816,y:.013140483931242813},{x:.21558424756339917,y:.01279485365228588},{x:.32760524756339915,y:-.005618146347714133},{x:.32775803960473765,y:-.005628051859015257},{x:.32790622767465843,y:-.005666572281957827},{x:.3321581535063009,y:-.005913311337168391},{x:.3364083102547015,y:-.006188849089881349},{x:.3365600989091985,y:-.006168756021014132},{x:.33671295454862427,y:-.006177626226551311},{x:.34093131721939995,y:-.005590114680318674},{x:.3451535631465426,y:-.005031193603710363},{x:.34529851526132993,y:-.004981874120043047},{x:.3454501643137599,y:-.004960753231150514},{x:.44307616431375996,y:.01857424676884946},{x:.4458503498549469,y:.019539172468847843},{x:.4486819664572553,y:.020319643122350156},{x:.45000735163266253,y:.02098507354168687},{x:.45140809089867484,y:.021472282957461515},{x:.45394072357704407,y:.022959884631265325},{x:.4565656691892177,y:.024277779754777677},{x:.4577357684253341,y:.0251889939358613},{x:.459014543037309,y:.025940112433793877},{x:.4612082951993476,y:.027893222383335445},{x:.4635256946335971,y:.029697896006345384},{x:.5358116946335971,y:.09837789600634546},{x:.5383578959705028,y:.10132350300922108},{x:.5409714489909738,y:.10420951799057969},{x:.5412394420583803,y:.10465705806338507},{x:.5415805729157932,y:.10505169984914184},{x:.5435031902892489,y:.10843744707814906},{x:.545503491029224,y:.11177788699125937},{x:.5456790239480676,y:.11226911056087577},{x:.5459366092786453,y:.11272272074420048},{x:.5471617575812067,y:.11641849583208026},{x:.548471935605029,y:.12008498944441898},{x:.572709935605029,y:.21701898944441894},{x:.5740007070580636,y:.2257455880614603},{x:.5735642017652605,y:.23455632455146336},{x:.571417194380227,y:.24311260725223527},{x:.5676421931927146,y:.25108562301800397},{x:.5623842693813143,y:.2581689733242098},{x:.5558454820094204,y:.2640904489909738},{x:.5482771130087407,y:.26862249102922403},{x:.539970010555581,y:.27159093560502906},{x:.5312434119385397,y:.2728817070580635},{x:.5224326754485367,y:.2724452017652604},{x:.5138763927477648,y:.270298194380227},{x:.5059033769819961,y:.26652319319271456},{x:.49882002667579023,y:.2612652693813142},{x:.49289855100902624,y:.25472648200942033},{x:.488366508970776,y:.24715811300874066},{x:.48539806439497096,y:.23885101055558106},{x:.46433420621000654,y:.15461122058523102},{x:.4102697826671089,y:.10324381045150927},{x:.3332137540403124,y:.08466767669890593},{x:.24039332695070226,y:.09992465997883551},{x:.1985742470214596,y:.12946463056361485},{x:.15288732813236672,y:.2011637190451272},{x:.11884238546013813,y:.39908903228895243},{x:.16184523767713488,y:.5942488915238071},{x:.2166399992296726,y:.6603981208316636},{x:.2708106585112101,y:.6880654725502051},{x:.33167151101531583,y:.6962265900331734},{x:.41875307675349,y:.6679697644015699},{x:.4604926982936834,y:.628705384802963},{x:.487421989657252,y:.5630715564186946},{x:.49155436139101494,y:.5552777692634718},{x:.49712782320648147,y:.5484399232752638},{x:.5039281900917167,y:.5428207930406891},{x:.5116941277610109,y:.5386363185834178},{x:.5201271955849208,y:.5360473069101626},{x:.5289033154962927,y:.5351532522875923},{x:.5376852261286371,y:.5359885127334604},{x:.5461354435813054,y:.5385209896572519},{x:.5539292307365281,y:.5426533613910148},{x:.5607670767247361,y:.5482268232064814},{x:.5663862069593109,y:.5550271900917166},{x:.5705706814165822,y:.5627931277610108},{x:.5731596930898373,y:.5712261955849207},{x:.5740537477124077,y:.5800023154962926},{x:.5732184872665396,y:.588784226128637},{x:.570686010342748,y:.5972344435813053},{x:.540057010342748,y:.6718854435813053},{x:.5396985836895672,y:.6725614478775368},{x:.539454213118803,y:.6732865233897278},{x:.5376352487491008,y:.6764529645154376},{x:.5359246386089851,y:.679679230736528},{x:.5354412171276051,y:.6802723202285732},{x:.5350600868536766,y:.680935789284769},{x:.5326583313554347,y:.6836865257875079},{x:.5303511767935185,y:.686517076724736},{x:.5297613381003629,y:.6870044593160238},{x:.5292580947459566,y:.687580825172473},{x:.47307109474595666,y:.7404358251724731},{x:.4722065860115991,y:.7411021817697292},{x:.4714497622811152,y:.7418887085063782},{x:.4687194058651613,y:.7437900730587934},{x:.46608420409854834,y:.7458212660502541},{x:.46510630693397415,y:.746306161504971},{x:.46421058160492856,y:.7469299263656303},{x:.4611617503991064,y:.748262090618912},{x:.45818091720073817,y:.7497401524453693},{x:.45712721164557074,y:.7500249524971546},{x:.4561270069400303,y:.7504619845480405},{x:.3497190069400303,y:.7849899845480404},{x:.34852117258500637,y:.7852523061157466},{x:.34737251112679673,y:.7856814874310271},{x:.34422084285321763,y:.7861940634064482},{x:.3411016855274714,y:.7868771480384597},{x:.33987569082458696,y:.7869007432807547},{x:.3386653714532072,y:.7870975852636362},{x:.3354742629896646,y:.786985452257037},{x:.33228177619648713,y:.7870468942022847},{x:.3310747354346284,y:.7868308563672394},{x:.32984927004476555,y:.7867877944907101},{x:.25121827004476555,y:.7762437944907102},{x:.24809780050166644,y:.7755083028870222},{x:.24494229970605153,y:.7749416523797719},{x:.24381291428322105,y:.7744983594176508},{x:.24263200473447152,y:.7742200201979198},{x:.2397149814324578,y:.772889887451158},{x:.2367306607297473,y:.771718517308175},{x:.16743766072974728,y:.7363275173081749},{x:.16716950847174827,y:.7361554960544541},{x:.16687461978467572,y:.7360349240533984},{x:.16345937419922074,y:.733775423054901},{x:.16001260855282193,y:.7315643025810339},{x:.15978316844705134,y:.7313432727571054},{x:.15951746839392553,y:.7311674875843215},{x:.15660865257214304,y:.7282851209029094},{x:.15365948376641753,y:.7254440558690711},{x:.15347757306746915,y:.725182511527114},{x:.15325127235232486,y:.7249582685082102},{x:.08558827235232488,y:.6432742685082102},{x:.0845522070982367,y:.6417389136031936},{x:.0833480194008015,y:.6403315480201149},{x:.08209078724421986,y:.6380913122274521},{x:.0806538380596292,y:.6359618836319892},{x:.07993721339171088,y:.6342539038369039},{x:.07903072722802115,y:.632638655023214},{x:.07823470075697891,y:.6301961909068614},{x:.07724079305844417,y:.627827343805619},{x:.07687114846079628,y:.6260123758261444},{x:.07629719958575912,y:.6242513168879111},{x:.02905219958575911,y:.40983931688791114},{x:.028544362954760993,y:.4055813372409792},{x:.028013217832748447,y:.4013262022752188},{x:.028022142274708197,y:.401202753871557},{x:.028007484408327545,y:.4010798543150725}]],D:[[{x:.019456783112310236,y:.0515304721392918},{x:.019516560837245702,y:.0508455251733057},{x:.019462408649259272,y:.05016011050819538},{x:.01989956114396584,y:.04645701928180655},{x:.020223754746627687,y:.042742334175020345},{x:.02041601038349858,y:.04208221032853139},{x:.020496616482350807,y:.04139940114622653},{x:.021647806474261868,y:.03785274800035644},{x:.022690469901424933,y:.03427268656062632},{x:.023007815173924504,y:.033662754022853354},{x:.023220081912440925,y:.03300879029730612},{x:.025041069815762075,y:.029754871123364675},{x:.026762134096652887,y:.026447013104097812},{x:.027192373603928278,y:.025910711240413317},{x:.027528143690388265,y:.025310724430849408},{x:.029948949961216734,y:.02247458551787214},{x:.03228227556070457,y:.019566050047680916},{x:.03280887543977226,y:.01912398863794477},{x:.03325524541805519,y:.01860103590097925},{x:.03618283982900684,y:.01629166847686688},{x:.03903875835284746,y:.013894228942745224},{x:.03964148166567549,y:.013563396159022682},{x:.0401812977878431,y:.013137574275061882},{x:.04350317452751879,y:.011443726034814963},{x:.04677193462845869,y:.0096495146935595},{x:.04742761905614622,y:.009442624254195854},{x:.048040136491355995,y:.009130297319436702},{x:.05162863769958001,y:.008117061901006828},{x:.05518462276008175,y:.0069950292882567724},{x:.05586807071778482,y:.006920031876811272},{x:.05652975076450537,y:.006733202440201605},{x:.060246972352300414,y:.0064395179124900545},{x:.06395352786070822,y:.006032783112310258},{x:.06463847482669428,y:.006092560837245719},{x:.06532388949180462,y:.006038408649259287},{x:.22607288949180462,y:.009146408649259287},{x:.22716730592225892,y:.009275605270020776},{x:.2282688262216939,y:.009242558031150067},{x:.23153975417198444,y:.00979177582685766},{x:.23483359885377353,y:.010180616482350843},{x:.23588178136904675,y:.010520840680108605},{x:.23696858346127098,y:.010703324384590318},{x:.374121583461271,y:.04785532438459028},{x:.3763172878682137,y:.048688585594252994},{x:.37858028056243914,y:.049316523610364836},{x:.3804311803743379,y:.05024979166335608},{x:.3823691959266467,y:.050985260963484026},{x:.38436014929137596,y:.0522308719724549},{x:.38645715458576285,y:.05328823230909956},{x:.47004915458576285,y:.1063032323090996},{x:.47296331256678825,y:.10858070495130694},{x:.47594842000778254,y:.11076435600861785},{x:.476434095048061,y:.11129319075325024},{x:.4769998347544389,y:.11173532762855881},{x:.47941368513584726,y:.11453756329148114},{x:.48191542538645477,y:.11726162167794474},{x:.5445294253864548,y:.20053762167794476},{x:.5457907389554543,y:.20261097926106453},{x:.5472304508598836,y:.2045646816997861},{x:.5480776582474705,y:.2063702359380903},{x:.54911422277829,y:.20807414921008693},{x:.5499468085621922,y:.21035373787896267},{x:.5509777083681839,y:.21255077433219424},{x:.570480708368184,y:.26758877433219413},{x:.5715324066676154,y:.27184261440989077},{x:.5725895850614416,y:.2760950958693092},{x:.5821235850614417,y:.3411630958693092},{x:.5823063349967632,y:.3450227385412275},{x:.5825832689280143,y:.34887676846995497},{x:.5805752689280143,y:.424797768469955},{x:.5800798101377765,y:.42875301375722},{x:.5796594372976747,y:.43271694253692033},{x:.5588164372976746,y:.5335539425369203},{x:.5581925601051908,y:.535556542700639},{x:.5577783377379867,y:.5376127649642906},{x:.5568838034059929,y:.5397575559956548},{x:.5561926080991778,y:.5419762423834013},{x:.555190030621201,y:.5438186507441294},{x:.5543826183570809,y:.5457545524985521},{x:.5020956183570809,y:.6430055524985521},{x:.5018901867095668,y:.6433113858234256},{x:.5017428412228655,y:.6436490624319612},{x:.4994325691935421,y:.6469701275279692},{x:.4971767628200625,y:.6503284258808291},{x:.4969156133622187,y:.650588304977856},{x:.4967052216394318,y:.6508907475465959},{x:.49379143318032753,y:.6536972875938759},{x:.49092379998669317,y:.6565509711937552},{x:.49061696854573045,y:.6567549090549786},{x:.49035161582277553,y:.657010494885618},{x:.39890061582277553,y:.7292364948856179},{x:.3986791836579038,y:.7293785203585265},{x:.39848760231040037,y:.7295587979940886},{x:.39496847203231433,y:.7317585520660096},{x:.39147518928128755,y:.7339991259907827},{x:.39123030407812903,y:.7340952232117042},{x:.391007233490524,y:.7342346611962726},{x:.3871265715837099,y:.7357055993513507},{x:.38326329699273004,y:.7372216156196327},{x:.3830043695523095,y:.737268091626259},{x:.38275838220218455,y:.7373613314362847},{x:.25909638220218456,y:.7708063314362847},{x:.2580664240588666,y:.7709788511982676},{x:.2570738325025125,y:.7713034106651087},{x:.2537238261308602,y:.7717062438265866},{x:.2503960471743838,y:.7722636525302581},{x:.2493522224520667,y:.7722319225075465},{x:.24831538485324267,y:.7723566006488801},{x:.17218438485324267,y:.7739936006488801},{x:.16854768223369815,y:.7737142062783378},{x:.16490357022768087,y:.7735589167265521},{x:.06552457022768086,y:.7594769167265522},{x:.06454980411013514,y:.759239472501363},{x:.06355033417502035,y:.7591522452533723},{x:.06027159361314519,y:.7581973390517399},{x:.056953647958865025,y:.7573891174476861},{x:.056043934769293216,y:.7569660682109414},{x:.05508068656062633,y:.7566855300985751},{x:.05205123903764884,y:.7551093215998242},{x:.04895472299174925,y:.7536693306611393},{x:.04814502249785432,y:.7530769339577588},{x:.0472550131040978,y:.7526138659033472},{x:.04459127858939255,y:.7504769279161366},{x:.04183518952697092,y:.7484605056870383},{x:.041156618064647085,y:.7477215269901124},{x:.040374050047680896,y:.7470937244392954},{x:.03817839436480973,y:.744478178292066},{x:.035868647242901154,y:.7419628147479951},{x:.03534728193289863,y:.7411056525944231},{x:.03470222894274521,y:.7403372416471526},{x:.03305902990826266,y:.7373436013115269},{x:.03128438701344127,y:.73442596046285},{x:.030940263632238257,y:.7334835551134912},{x:.030457514693559486,y:.7326040653715413},{x:.029429919524844063,y:.7293473747667649},{x:.028258579388326675,y:.7261395799150647},{x:.028104922404476318,y:.7251481474789881},{x:.02780302928825676,y:.7241913772399183},{x:.02743052789135989,y:.7207967891595589},{x:.026907504457698045,y:.7174221140620348},{x:.02695021882291786,y:.7164197547317572},{x:.026840783112310238,y:.7154224721392919},{x:.019456783112310236,y:.0515304721392918}],[{x:.1099671672449683,y:.09691838411671685},{x:.1164055200593884,y:.675787686211921},{x:.17390769441284104,y:.6839357418297609},{x:.2408956143230629,y:.6824953400894312},{x:.35035782392371695,y:.652890743688808},{x:.42724604872976657,y:.5921661050862587},{x:.4720072878873445,y:.5089126143655517},{x:.4907125333997566,y:.41841792349882906},{x:.4925121994894803,y:.35037387509349616},{x:.4841787199640398,y:.2934992321564965},{x:.4684498534661817,y:.24911194023683725},{x:.41491413338319044,y:.1779099626338861},{x:.34401115658372555,y:.1329424859013802},{x:.21878934362335548,y:.0990224054430332},{x:.1099671672449683,y:.09691838411671685}]],E:[[{x:.035078,y:.05103000000000002},{x:.03594266238185463,y:.04225093550927423},{x:.03850342103699209,y:.03380924554357098},{x:.042661867446385456,y:.026029339514117924},{x:.04825819484660536,y:.019210194846605383},{x:.05507733951411791,y:.013613867446385479},{x:.06285724554357096,y:.009455421036992116},{x:.07129893550927423,y:.006894662381854655},{x:.080078,y:.0060300000000000215},{x:.521974,y:.0060300000000000215},{x:.5307530644907258,y:.006894662381854655},{x:.5391947544564291,y:.009455421036992116},{x:.5469746604858822,y:.013613867446385479},{x:.5537938051533947,y:.019210194846605383},{x:.5593901325536146,y:.026029339514117924},{x:.5635485789630079,y:.03380924554357098},{x:.5661093376181454,y:.04225093550927425},{x:.5669740000000001,y:.05103000000000002},{x:.5661093376181454,y:.05980906449072579},{x:.5635485789630079,y:.06825075445642906},{x:.5593901325536146,y:.07603066048588211},{x:.5537938051533947,y:.08284980515339466},{x:.5469746604858822,y:.08844613255361455},{x:.5391947544564291,y:.09260457896300792},{x:.5307530644907258,y:.09516533761814538},{x:.521974,y:.09603000000000002},{x:.125078,y:.09603000000000002},{x:.125078,y:.345019},{x:.389405,y:.345019},{x:.3981840644907258,y:.34588366238185464},{x:.40662575445642907,y:.3484444210369921},{x:.4144056604858821,y:.35260286744638547},{x:.42122480515339467,y:.35819919484660534},{x:.42682113255361454,y:.3650183395141179},{x:.4309795789630079,y:.372798245543571},{x:.43354033761814537,y:.3812399355092742},{x:.434405,y:.390019},{x:.43354033761814537,y:.3987980644907258},{x:.4309795789630079,y:.407239754456429},{x:.42682113255361454,y:.4150196604858821},{x:.42122480515339467,y:.42183880515339467},{x:.4144056604858821,y:.42743513255361454},{x:.40662575445642907,y:.43159357896300793},{x:.3981840644907258,y:.43415433761814537},{x:.389405,y:.435019},{x:.125078,y:.435019},{x:.125078,y:.684004},{x:.521974,y:.684004},{x:.5307530644907258,y:.6848686623818546},{x:.5391947544564291,y:.6874294210369921},{x:.5469746604858822,y:.6915878674463855},{x:.5537938051533947,y:.6971841948466053},{x:.5593901325536146,y:.7040033395141179},{x:.5635485789630079,y:.711783245543571},{x:.5661093376181454,y:.7202249355092742},{x:.5669740000000001,y:.729004},{x:.5661093376181454,y:.7377830644907257},{x:.5635485789630079,y:.746224754456429},{x:.5593901325536146,y:.7540046604858821},{x:.5537938051533947,y:.7608238051533946},{x:.5469746604858822,y:.7664201325536145},{x:.5391947544564291,y:.7705785789630079},{x:.5307530644907258,y:.7731393376181454},{x:.521974,y:.774004},{x:.080078,y:.774004},{x:.07129893550927423,y:.7731393376181454},{x:.06285724554357093,y:.7705785789630079},{x:.05507733951411791,y:.7664201325536145},{x:.04825819484660536,y:.7608238051533946},{x:.042661867446385456,y:.7540046604858821},{x:.03850342103699209,y:.746224754456429},{x:.03594266238185463,y:.7377830644907257},{x:.035078,y:.729004},{x:.035078,y:.05103000000000002}]],F:[[{x:.041426000000000004,y:.05103000000000002},{x:.04229066238185464,y:.04225093550927423},{x:.0448514210369921,y:.03380924554357098},{x:.04900986744638546,y:.026029339514117924},{x:.054606194846605366,y:.019210194846605383},{x:.06142533951411792,y:.013613867446385479},{x:.06920524554357096,y:.009455421036992116},{x:.07764693550927423,y:.006894662381854655},{x:.086426,y:.0060300000000000215},{x:.09520506449072577,y:.006894662381854655},{x:.10364675445642904,y:.009455421036992116},{x:.11142666048588211,y:.013613867446385486},{x:.11824580515339464,y:.019210194846605383},{x:.12384213255361454,y:.026029339514117924},{x:.1280005789630079,y:.03380924554357098},{x:.13056133761814537,y:.04225093550927425},{x:.131426,y:.05103000000000002},{x:.131426,y:.347323},{x:.447344,y:.347323},{x:.4561230644907258,y:.3481876623818546},{x:.4645647544564291,y:.35074842103699205},{x:.47234466048588214,y:.35490686744638544},{x:.47916380515339463,y:.3605031948466053},{x:.48476013255361455,y:.36732233951411786},{x:.48891857896300794,y:.37510224554357097},{x:.4914793376181454,y:.3835439355092742},{x:.492344,y:.392323},{x:.4914793376181454,y:.4011020644907258},{x:.48891857896300794,y:.409543754456429},{x:.48476013255361455,y:.4173236604858821},{x:.47916380515339463,y:.42414280515339464},{x:.47234466048588214,y:.4297391325536145},{x:.4645647544564291,y:.4338975789630079},{x:.4561230644907258,y:.43645833761814534},{x:.447344,y:.43732299999999996},{x:.131426,y:.43732299999999996},{x:.131426,y:.679393},{x:.515626,y:.679393},{x:.5244050644907258,y:.6802576623818547},{x:.532846754456429,y:.6828184210369922},{x:.5406266604858821,y:.6869768674463855},{x:.5474458051533947,y:.6925731948466054},{x:.5530421325536146,y:.6993923395141179},{x:.5572005789630079,y:.707172245543571},{x:.5597613376181454,y:.7156139355092743},{x:.5606260000000001,y:.7243930000000001},{x:.5597613376181454,y:.7331720644907258},{x:.5572005789630079,y:.7416137544564291},{x:.5530421325536146,y:.7493936604858822},{x:.5474458051533947,y:.7562128051533947},{x:.5406266604858821,y:.7618091325536146},{x:.532846754456429,y:.7659675789630079},{x:.5244050644907258,y:.7685283376181454},{x:.515626,y:.7693930000000001},{x:.10586481668800227,y:.7693930000000001},{x:.10364675445642904,y:.7705785789630079},{x:.09520506449072577,y:.7731393376181454},{x:.086426,y:.774004},{x:.0776469355092742,y:.7731393376181454},{x:.06920524554357094,y:.7705785789630079},{x:.06142533951411792,y:.7664201325536145},{x:.054606194846605366,y:.7608238051533946},{x:.04900986744638546,y:.7540046604858821},{x:.0448514210369921,y:.746224754456429},{x:.04229066238185464,y:.7377830644907257},{x:.041426000000000004,y:.729004},{x:.041426000000000004,y:.05103000000000002}]],G:[[{x:.011397831509003739,y:.41623356008285023},{x:.011618856500496228,y:.4138403978921803},{x:.011624876992355357,y:.4114370583257866},{x:.031979876992355355,y:.20994505832578658},{x:.0322125865037964,y:.20879027461506633},{x:.03227702681480045,y:.2076140405475535},{x:.033082276634523504,y:.2044745765152392},{x:.033722542929381774,y:.20129735748690203},{x:.034176068118796386,y:.2002101619949014},{x:.03446874211029117,y:.19906910061620064},{x:.03587099832954512,y:.19614705695158466},{x:.03711880677043453,y:.1931557970536144},{x:.03777571891913337,y:.19217797009338475},{x:.03828537929375919,y:.19111593175236494},{x:.08239837929375919,y:.11845093175236496},{x:.08400149586436068,y:.11631468084865614},{x:.08543403702225794,y:.1140604899753128},{x:.08664282877724949,y:.11279494315419919},{x:.08769326713863865,y:.11139516977529508},{x:.08968234215056696,y:.10961271886167734},{x:.09152712825517066,y:.10768131654967852},{x:.15960912825517065,y:.049144316549678456},{x:.16129904644183068,y:.0479582081853546},{x:.16285577619764602,y:.04660201166682107},{x:.1649006360722032,y:.045430348778213794},{x:.16682965744636918,y:.04407642028337947},{x:.16871850259167306,y:.043242789341903884},{x:.17050990103726027,y:.04221635466854622},{x:.25257090103726026,y:.005359354668546305},{x:.2555014876285109,y:.004375276469579791},{x:.2583690572759664,y:.003220377345201267},{x:.25967433471463813,y:.0029740526131209386},{x:.2609335532503684,y:.0025512125194529015},{x:.2639998135747395,y:.0021577721889240492},{x:.26703759331756605,y:.0015844992133087973},{x:.35309859331756605,y:-.006038500786691249},{x:.3541123404679588,y:-.006028536718703998},{x:.3551159915981175,y:-.006171599559831674},{x:.3585153812714738,y:-.005985259459774228},{x:.361919709861342,y:-.005951798491220829},{x:.36291203425126567,y:-.00574425362199294},{x:.3639243106821295,y:-.005688764928569123},{x:.3672220288859873,y:-.004842817275250554},{x:.37055441634545594,y:-.004145847688979236},{x:.3714871835051078,y:-.003748697851442632},{x:.37246918402112983,y:-.003496790022837183},{x:.4525501840211298,y:.02567020997716287},{x:.4548144879103283,y:.026756908839544704},{x:.45716266717941917,y:.02764799841997529},{x:.45878159595452606,y:.02866082810547922},{x:.4605032369247208,y:.02948708879101062},{x:.4625120284186098,y:.03099465081435172},{x:.46464124512829075,y:.032326725408117304},{x:.4660314733714444,y:.03363593119127184},{x:.46755883802994086,y:.034782191000688294},{x:.46923492039795345,y:.03665268142188218},{x:.47106334994415,y:.038374550149380404},{x:.53517534994415,y:.11188255014938031},{x:.5366918789074028,y:.11401106513419482},{x:.5383741006891446,y:.11601120663268963},{x:.5392453250303639,y:.11759493887966013},{x:.5402941837404813,y:.11906705813061697},{x:.5413663203511413,y:.12145053442062861},{x:.5426260104640281,y:.12374042895017842},{x:.5431715236397763,y:.1254636976633839},{x:.5439130326051668,y:.12711215273922669},{x:.5444995752545472,y:.12965899467727895},{x:.5452883245139833,y:.13215064287530112},{x:.5896823245139834,y:.3420786428753011},{x:.5897067631627176,y:.34229945557802055},{x:.5897717252277992,y:.3425119065778641},{x:.5901917436343531,y:.346681442891342},{x:.5906527316031134,y:.3508466486034176},{x:.590633622248786,y:.3510679861958218},{x:.5906558889520306,y:.35128902847947113},{x:.590254400640623,y:.3554603898480228},{x:.5898939395311937,y:.3596354965915505},{x:.5898320165355749,y:.3598488531940917},{x:.589810732180064,y:.3600699922305474},{x:.5886031661213459,y:.3640828755761044},{x:.5874351082520124,y:.3681074363403587},{x:.5873327512810971,y:.3683046127784522},{x:.5872687338126765,y:.3685173503185603},{x:.5853014960930706,y:.3722175427846122},{x:.5833707292727002,y:.37593689595641405},{x:.5832318718474782,y:.3761103148501221},{x:.583127581421558,y:.3763064755095204},{x:.5804762718833937,y:.37955178077467916},{x:.577856994398102,y:.38282299369748307},{x:.5776869727315521,y:.38296599065597503},{x:.5775464171707139,y:.38313803609053093},{x:.5743129241526703,y:.3858037388934479},{x:.5711057933673104,y:.38850110068914456},{x:.5709111412967293,y:.38860818041949885},{x:.5707397220723512,y:.3887494990196469},{x:.5670483068977423,y:.3907331578965531},{x:.5633765710498215,y:.39275301046402805},{x:.5631647689451196,y:.3928200579522583},{x:.5629690736018615,y:.39292521892344706},{x:.5589615952856832,y:.39415060297614785},{x:.5549663571246989,y:.39541532451398326},{x:.5547455444219794,y:.39543976316271745},{x:.5545330934221359,y:.39550472522779906},{x:.5503635571086607,y:.3959247436343527},{x:.5461983513965825,y:.39638573160311336},{x:.5459770138041778,y:.396366622248786},{x:.5457559715205288,y:.3963888889520305},{x:.32969497152052885,y:.39686888895203054},{x:.32091400776945256,y:.3960237321800639},{x:.31246664968143967,y:.39348173381267654},{x:.3046775244904796,y:.389340581421558},{x:.29784596390946905,y:.3837594171707138},{x:.2922345009803531,y:.3769527220723512},{x:.2880587810765529,y:.3691820736018615},{x:.2854792747722009,y:.3607460934221358},{x:.2845951110479695,y:.3519689715205288},{x:.2854402678199361,y:.3431880077694525},{x:.2879822661873235,y:.33474064968143963},{x:.29212341857844204,y:.32695152449047954},{x:.29770458282928614,y:.320119963909469},{x:.3045112779276488,y:.31450850098035305},{x:.31228192639813845,y:.3103327810765529},{x:.3207179065778642,y:.3077532747722009},{x:.3294950284794712,y:.30686911104796943},{x:.49017057214072013,y:.30651215509128404},{x:.45965681956734333,y:.16222033524572274},{x:.4108567628008364,y:.10626833604444391},{x:.35107150330533127,y:.0844934248457151},{x:.2825297162303303,y:.09056463065174497},{x:.21333680545064249,y:.12164203785622632},{x:.15562253329738823,y:.17126485077351794},{x:.1205010051965362,y:.2291186770707186},{x:.10185989085514695,y:.41364510354456796},{x:.13655871914038514,y:.5827099362211221},{x:.190187982415082,y:.6526649281775241},{x:.2569251189377254,y:.6872526727450867},{x:.3715857772516941,y:.6967797369989467},{x:.4883723057362636,y:.6711064406866752},{x:.49713228125159653,y:.6700660353148682},{x:.5059269093127409,y:.6707546074846872},{x:.5144182172953911,y:.6731456957538017},{x:.5222798889957544,y:.6771474119409674},{x:.529209804779262,y:.6826059723372997},{x:.5349416518686954,y:.6893116075279637},{x:.5392551585948644,y:.6970066237131456},{x:.5419845593133248,y:.7053953057362636},{x:.5430249646851317,y:.7141552812515966},{x:.5423363925153128,y:.722949909312741},{x:.5399453042461984,y:.7314412172953911},{x:.5359435880590326,y:.7393028889957545},{x:.5304850276627003,y:.7462328047792621},{x:.5237793924720363,y:.7519646518686954},{x:.5160843762868544,y:.7562781585948645},{x:.5076956942637364,y:.7590075593133249},{x:.38428269426373635,y:.7861375593133247},{x:.3819812519937546,y:.7864108971664274},{x:.3797153389243004,y:.7868977113667894},{x:.37761181025895013,y:.7869298473215656},{x:.37552271874840343,y:.7871779646851318},{x:.3732121724765259,y:.7869970613144796},{x:.370894825552222,y:.7870324638061055},{x:.24049282555222196,y:.7761974638061055},{x:.24043595887820252,y:.7761870527203061},{x:.24037815170992255,y:.776187787986971},{x:.2360978388350013,y:.7753928346522221},{x:.2318155069745089,y:.7746088302209789},{x:.231761764079766,y:.7745875250435272},{x:.2317049242166051,y:.7745769685631748},{x:.227661944055434,y:.7729622424167508},{x:.22361484767780643,y:.7713578609091699},{x:.22356629387164592,y:.7713264803860874},{x:.22351260563766895,y:.7713050378383375},{x:.13987060563766895,y:.7279560378383374},{x:.13900257424615298,y:.727391873258006},{x:.13805978359276902,y:.7269641982011581},{x:.13531067905832161,y:.7249923788161832},{x:.13247402218179744,y:.7231487342752945},{x:.13173273281971745,y:.7224260654354895},{x:.1308914928889356,y:.7218226787027751},{x:.128579894506033,y:.7193524235854973},{x:.12615742040314795,y:.7169907998540069},{x:.12557136040496888,y:.7161373985129647},{x:.12486399957555622,y:.7153814879181388},{x:.05884299957555622,y:.6292624879181389},{x:.05814177883495547,y:.6281337214080167},{x:.057292540659828396,y:.62711165542026},{x:.05581896837632758,y:.6243946553718145},{x:.05418793684040681,y:.6217691571968414},{x:.05372040128165289,y:.6205252782386133},{x:.05308687616260495,y:.6193571728131668},{x:.052171678571706244,y:.6164048994674943},{x:.051084196133809955,y:.613511651036194},{x:.05086831288622884,y:.6122004612006492},{x:.05047484683830003,y:.6109312059739318},{x:.012315846838300032,y:.4250072059739319},{x:.012065742114142504,y:.42261690788694145},{x:.011602778634016861,y:.4202585732767163},{x:.011607833784388823,y:.41824059149262255},{x:.011397831509003739,y:.41623356008285023}]],H:[[{x:.021894999999999998,y:.05103000000000002},{x:.02275966238185463,y:.04225093550927423},{x:.025320421036992093,y:.03380924554357098},{x:.029478867446385455,y:.026029339514117924},{x:.03507519484660536,y:.019210194846605383},{x:.04189433951411791,y:.013613867446385479},{x:.04967424554357096,y:.009455421036992116},{x:.05811593550927423,y:.006894662381854655},{x:.066895,y:.0060300000000000215},{x:.07567406449072576,y:.006894662381854655},{x:.08411575445642903,y:.009455421036992116},{x:.0918956604858821,y:.013613867446385486},{x:.09871480515339463,y:.019210194846605383},{x:.10431113255361453,y:.026029339514117924},{x:.1084695789630079,y:.03380924554357098},{x:.11103033761814536,y:.04225093550927425},{x:.111895,y:.05103000000000002},{x:.111895,y:.359342},{x:.490157,y:.359342},{x:.490157,y:.05103000000000002},{x:.49102166238185463,y:.04225093550927423},{x:.49358242103699207,y:.03380924554357098},{x:.49774086744638546,y:.026029339514117924},{x:.5033371948466053,y:.019210194846605383},{x:.5101563395141179,y:.013613867446385479},{x:.517936245543571,y:.009455421036992116},{x:.5263779355092743,y:.006894662381854655},{x:.535157,y:.0060300000000000215},{x:.5439360644907257,y:.006894662381854655},{x:.552377754456429,y:.009455421036992116},{x:.5601576604858821,y:.013613867446385486},{x:.5669768051533947,y:.019210194846605383},{x:.5725731325536145,y:.026029339514117924},{x:.5767315789630079,y:.03380924554357098},{x:.5792923376181454,y:.04225093550927425},{x:.580157,y:.05103000000000002},{x:.580157,y:.729004},{x:.5792923376181454,y:.7377830644907257},{x:.5767315789630079,y:.746224754456429},{x:.5725731325536145,y:.7540046604858821},{x:.5669768051533947,y:.7608238051533946},{x:.5601576604858821,y:.7664201325536145},{x:.552377754456429,y:.7705785789630079},{x:.5439360644907257,y:.7731393376181454},{x:.535157,y:.774004},{x:.5263779355092743,y:.7731393376181454},{x:.517936245543571,y:.7705785789630079},{x:.5101563395141179,y:.7664201325536145},{x:.5033371948466053,y:.7608238051533946},{x:.49774086744638546,y:.7540046604858821},{x:.49358242103699207,y:.746224754456429},{x:.49102166238185463,y:.7377830644907257},{x:.490157,y:.729004},{x:.490157,y:.44934199999999996},{x:.111895,y:.44934199999999996},{x:.111895,y:.729004},{x:.11103033761814536,y:.7377830644907257},{x:.10846957896300788,y:.746224754456429},{x:.10431113255361453,y:.7540046604858821},{x:.09871480515339463,y:.7608238051533946},{x:.09189566048588207,y:.7664201325536145},{x:.08411575445642903,y:.7705785789630079},{x:.07567406449072576,y:.7731393376181454},{x:.066895,y:.774004},{x:.05811593550927421,y:.7731393376181454},{x:.04967424554357093,y:.7705785789630079},{x:.04189433951411791,y:.7664201325536145},{x:.03507519484660536,y:.7608238051533946},{x:.029478867446385455,y:.7540046604858821},{x:.025320421036992093,y:.746224754456429},{x:.02275966238185463,y:.7377830644907257},{x:.021894999999999998,y:.729004},{x:.021894999999999998,y:.05103000000000002}]],I:[[{x:.25602600000000003,y:.05103000000000002},{x:.25689066238185465,y:.04225093550927423},{x:.2594514210369921,y:.03380924554357098},{x:.2636098674463855,y:.026029339514117924},{x:.26920619484660535,y:.019210194846605383},{x:.27602533951411795,y:.013613867446385479},{x:.283805245543571,y:.009455421036992116},{x:.2922469355092743,y:.006894662381854655},{x:.301026,y:.0060300000000000215},{x:.3098050644907258,y:.006894662381854655},{x:.3182467544564291,y:.009455421036992116},{x:.32602666048588214,y:.013613867446385486},{x:.3328458051533947,y:.019210194846605383},{x:.33844213255361455,y:.026029339514117924},{x:.34260057896300794,y:.03380924554357098},{x:.3451613376181454,y:.04225093550927425},{x:.346026,y:.05103000000000002},{x:.346026,y:.729004},{x:.3451613376181454,y:.7377830644907257},{x:.34260057896300794,y:.746224754456429},{x:.33844213255361455,y:.7540046604858821},{x:.3328458051533947,y:.7608238051533946},{x:.32602666048588214,y:.7664201325536145},{x:.3182467544564291,y:.7705785789630079},{x:.3098050644907258,y:.7731393376181454},{x:.301026,y:.774004},{x:.2922469355092743,y:.7731393376181454},{x:.283805245543571,y:.7705785789630079},{x:.27602533951411795,y:.7664201325536145},{x:.26920619484660535,y:.7608238051533946},{x:.2636098674463855,y:.7540046604858821},{x:.2594514210369921,y:.746224754456429},{x:.25689066238185465,y:.7377830644907257},{x:.25602600000000003,y:.729004},{x:.25602600000000003,y:.05103000000000002}]],J:[[{x:.0492700034030052,y:.22191686675397743},{x:.05066400340300519,y:.18438286675397747},{x:.05116783173382979,y:.18068175768771486},{x:.05155979864248331,y:.17696713613904605},{x:.05874879864248331,y:.14209513613904604},{x:.05880353678004782,y:.1419191061579158},{x:.05882437610196882,y:.14173594355086241},{x:.060112741823836933,y:.13770889095133898},{x:.06136821695472819,y:.13367146342030908},{x:.0614562450600313,y:.133509494686791},{x:.06151241721221637,y:.13333391704789688},{x:.07511841721221638,y:.10184091704789687},{x:.07557207470549994,y:.10102219111224012},{x:.07589401217340325,y:.10014328637013822},{x:.07770640675364808,y:.09717031380613761},{x:.07939396242231754,y:.09412474393402119},{x:.07999862852050488,y:.09341025377409445},{x:.08048584585939292,y:.09261104382444658},{x:.10112984585939291,y:.06520804382444652},{x:.10197173470408774,y:.06429305686105671},{x:.10267645797068833,y:.06326868237508665},{x:.10495244591663212,y:.06105354143298789},{x:.10710291637241387,y:.058716353519649434},{x:.10810713366035453,y:.05798319214000915},{x:.10899816141532707,y:.05711598541156246},{x:.1373061614153271,y:.03451898541156248},{x:.13912164740426522,y:.03334117545586675},{x:.1408101373903697,y:.03198757757075004},{x:.14281300361792376,y:.03094638082514127},{x:.14470672673278473,y:.029717813955661344},{x:.1467171079910441,y:.028916819034200267},{x:.14863722796281134,y:.027918638208003034},{x:.20683022796281134,y:.004592638208003076},{x:.20850921914024034,y:.004104279923540699},{x:.2101185278310492,y:.0034204446176558795},{x:.21273469892125257,y:.0028752394826936905},{x:.21530073387518742,y:.0021288719943945503},{x:.21704273768291169,y:.0019774523068977427},{x:.21875453360851305,y:.0016207172553791283},{x:.2976895336085131,y:-.0068802827446208525},{x:.29850402526559744,y:-.006887701289741747},{x:.2993068957135494,y:-.007024999279811796},{x:.30290822222422875,y:-.006927815554356645},{x:.3065107103471747,y:-.0069606277022222565},{x:.30731099906181086,y:-.006809004262418785},{x:.30812522808832776,y:-.0067870318558802545},{x:.3663632280883278,y:.0005399681441197179},{x:.367446910459264,y:.0007860908462292888},{x:.3685549625674647,y:.000870733572342984},{x:.37174033606180384,y:.0017612008405818037},{x:.37496569353784953,y:.0024937343933679954},{x:.37598053709868623,y:.002946543859479297},{x:.3770507853196353,y:.0032457304419443098},{x:.4423997853196353,y:.028649730441944292},{x:.44339023767510893,y:.0291515261148112},{x:.4444435524779453,y:.029502699422305954},{x:.4473177196266577,y:.03114131738307233},{x:.45026902431580135,y:.03263654520916596},{x:.4511425499275847,y:.03332192668785485},{x:.4521071150681948,y:.03387184382278591},{x:.4818761150681948,y:.0549598438227859},{x:.482276572000261,y:.05530719927286456},{x:.48273081061614365,y:.05558049186877649},{x:.48560514894853896,y:.05819439949693127},{x:.48854004666413575,y:.060740123232255375},{x:.48886504324193186,y:.061158929616590856},{x:.48925723704963914,y:.06151558852974905},{x:.5141262370496392,y:.08904658852974903},{x:.5149956342421861,y:.09022293690705172},{x:.5160117353213701,y:.09127516577002369},{x:.5176116053111659,y:.0937625081737249},{x:.5193693801104602,y:.0961408866071265},{x:.519992577896003,y:.09746424275846524},{x:.5207838752101566,y:.09869448482562238},{x:.5385188752101566,y:.1333154848256224},{x:.5396070973995049,y:.13607819549886616},{x:.5408707323766272,y:.1387652058155645},{x:.5412201620380835,y:.14017334347255597},{x:.5417518824254063,y:.14152324205357814},{x:.5422802166156467,y:.1444451696332536},{x:.5429953614930656,y:.1473270727547606},{x:.5523413614930656,y:.2113020727547606},{x:.5524962602601196,y:.21460328519222147},{x:.5528139181508881,y:.2178928278123641},{x:.5518389181508881,y:.7290898278123641},{x:.5509575131661891,y:.7378672271777721},{x:.5483806584624608,y:.7463040176932935},{x:.5442073811208505,y:.7540759782308231},{x:.5385980578491955,y:.7608844367054697},{x:.5317682517950807,y:.7664677478762799},{x:.5239804285749665,y:.7706113482261165},{x:.5155338698677402,y:.7731560015172932},{x:.5067531721876358,y:.7740039181508881},{x:.4979757728222279,y:.7731225131661891},{x:.4895389823067066,y:.7705456584624607},{x:.48176702176917696,y:.7663723811208505},{x:.4749585632945304,y:.7607630578491954},{x:.46937525212372017,y:.7539332517950806},{x:.4652316517738835,y:.7461454285749665},{x:.46268699848270683,y:.7376988698677401},{x:.461839081849112,y:.7289181721876359},{x:.462807763438783,y:.22103394388498027},{x:.45501827222953295,y:.16771351802238937},{x:.44337725180090903,y:.14498874958374325},{x:.42579959063650114,y:.12552955984883984},{x:.4046143325842134,y:.11052217895574154},{x:.34961801160788414,y:.08914271579513207},{x:.3021031758959219,y:.08316481131246532},{x:.2345584384824393,y:.09043912324952764},{x:.18827433696976265,y:.10899157718530504},{x:.16959144206995366,y:.1239052897771866},{x:.155605251275173,y:.14247066404328695},{x:.14596289111822178,y:.16478926233983734},{x:.14046290234137151,y:.19146830095804884},{x:.13920799659699482,y:.22525713324602253},{x:.1380181031040591,y:.23399805813086086},{x:.13514580323043823,y:.24233889189031887},{x:.13070147784947123,y:.24995910096061402},{x:.12485591989314217,y:.25656584498063745},{x:.11783377087548613,y:.26190523048280423},{x:.10990488804518514,y:.26577206787662816},{x:.10137397392283892,y:.2680177567696118},{x:.09256886675397746,y:.2685559965969948},{x:.08382794186913914,y:.26736610310405906},{x:.07548710810968112,y:.26449380323043825},{x:.06786689903938595,y:.2600494778494712},{x:.06126015501936256,y:.2542039198931421},{x:.055920769517195726,y:.24718177087548612},{x:.052053932123371845,y:.23925288804518513},{x:.04980824323038816,y:.2307219739228389},{x:.0492700034030052,y:.22191686675397743}]],K:[[{x:-.009598999999999996,y:.05103000000000002},{x:-.008734337618145363,y:.04225093550927423},{x:-.006173578963007902,y:.03380924554357098},{x:-.002015132553614539,y:.026029339514117924},{x:.003581194846605365,y:.019210194846605383},{x:.010400339514117916,y:.013613867446385479},{x:.018180245543570964,y:.009455421036992116},{x:.026621935509274233,y:.006894662381854655},{x:.035401,y:.0060300000000000215},{x:.04418006449072578,y:.006894662381854655},{x:.05262175445642904,y:.009455421036992116},{x:.06040166048588211,y:.013613867446385486},{x:.06722080515339464,y:.019210194846605383},{x:.07281713255361454,y:.026029339514117924},{x:.07697557896300791,y:.03380924554357098},{x:.07953633761814537,y:.04225093550927425},{x:.080401,y:.05103000000000002},{x:.080401,y:.29048154892126793},{x:.18934433769134518,y:.3772029724897202},{x:.5349508182082354,y:.03415901207017739},{x:.5417907398770268,y:.02858809778868676},{x:.5495860658299886,y:.024458629583942203},{x:.5580372260624178,y:.02192930060321959},{x:.5668194472260474,y:.021097311540784057},{x:.5755952334866855,y:.021994635269720175},{x:.5840273362998535,y:.024586788142349852},{x:.5917917146832189,y:.028774155177474024},{x:.5985899879298227,y:.03439581820823536},{x:.6041609022113132,y:.04123573987702663},{x:.6082903704160578,y:.04903106582998847},{x:.6108196993967804,y:.05748222606241771},{x:.6116516884592159,y:.06626444722604735},{x:.6107543647302798,y:.07504023348668547},{x:.6081622118576502,y:.08347233629985339},{x:.603974844822526,y:.0912367146832188},{x:.5983531817917647,y:.09803498792982254},{x:.26024203797571366,y:.43363918627462555},{x:.5302838206406747,y:.648598708462355},{x:.5366139141989896,y:.654742773070568},{x:.5416237292416561,y:.6620037211908337},{x:.545120741386121,y:.6701025186588768},{x:.5469705624168195,y:.6787279332298585},{x:.5471021047489336,y:.6875484950590041},{x:.5455103132844098,y:.6962252349018474},{x:.542256359676543,y:.7044247105121999},{x:.537465291537645,y:.7118318206406747},{x:.531321226929432,y:.7181619141989897},{x:.5240602788091663,y:.7231717292416562},{x:.5159614813411232,y:.726668741386121},{x:.5073360667701415,y:.7285185624168196},{x:.498515504940996,y:.7286501047489337},{x:.48983876509815266,y:.7270583132844098},{x:.48163928948780005,y:.723804359676543},{x:.47423217935932527,y:.719013291537645},{x:.080401,y:.4055145384845117},{x:.080401,y:.729004},{x:.07953633761814537,y:.7377830644907257},{x:.07697557896300788,y:.746224754456429},{x:.07281713255361454,y:.7540046604858821},{x:.06722080515339464,y:.7608238051533946},{x:.06040166048588208,y:.7664201325536145},{x:.052621754456429054,y:.7705785789630079},{x:.04418006449072578,y:.7731393376181454},{x:.035401,y:.774004},{x:.026621935509274212,y:.7731393376181454},{x:.018180245543570936,y:.7705785789630079},{x:.010400339514117906,y:.7664201325536145},{x:.003581194846605358,y:.7608238051533946},{x:-.002015132553614539,y:.7540046604858821},{x:-.006173578963007902,y:.746224754456429},{x:-.008734337618145363,y:.7377830644907257},{x:-.009598999999999996,y:.729004},{x:-.009598999999999996,y:.05103000000000002}]],L:[[{x:.030439999999999995,y:.05103000000000002},{x:.03130466238185463,y:.04225093550927423},{x:.03386542103699209,y:.03380924554357098},{x:.03802386744638545,y:.026029339514117924},{x:.043620194846605356,y:.019210194846605383},{x:.05043933951411791,y:.013613867446385479},{x:.058219245543570955,y:.009455421036992116},{x:.06666093550927422,y:.006894662381854655},{x:.07544,y:.0060300000000000215},{x:.526613,y:.0060300000000000215},{x:.5353920644907257,y:.006894662381854655},{x:.543833754456429,y:.009455421036992116},{x:.5516136604858821,y:.013613867446385479},{x:.5584328051533947,y:.019210194846605383},{x:.5640291325536145,y:.026029339514117924},{x:.5681875789630079,y:.03380924554357098},{x:.5707483376181454,y:.04225093550927425},{x:.571613,y:.05103000000000002},{x:.5707483376181454,y:.05980906449072579},{x:.5681875789630079,y:.06825075445642906},{x:.5640291325536145,y:.07603066048588211},{x:.5584328051533947,y:.08284980515339466},{x:.5516136604858821,y:.08844613255361455},{x:.543833754456429,y:.09260457896300792},{x:.5353920644907257,y:.09516533761814538},{x:.526613,y:.09603000000000002},{x:.12043999999999999,y:.09603000000000002},{x:.12043999999999999,y:.729004},{x:.11957533761814536,y:.7377830644907257},{x:.11701457896300788,y:.746224754456429},{x:.11285613255361453,y:.7540046604858821},{x:.10725980515339463,y:.7608238051533946},{x:.10044066048588207,y:.7664201325536145},{x:.09266075445642903,y:.7705785789630079},{x:.08421906449072576,y:.7731393376181454},{x:.07544,y:.774004},{x:.06666093550927422,y:.7731393376181454},{x:.05821924554357093,y:.7705785789630079},{x:.05043933951411791,y:.7664201325536145},{x:.043620194846605356,y:.7608238051533946},{x:.03802386744638545,y:.7540046604858821},{x:.03386542103699209,y:.746224754456429},{x:.03130466238185463,y:.7377830644907257},{x:.030439999999999995,y:.729004},{x:.030439999999999995,y:.05103000000000002}]],M:[[{x:-.0025190000000000004,y:.05103000000000002},{x:-.001654337618145367,y:.04225093550927423},{x:.0009064210369920944,y:.03380924554357098},{x:.005064867446385457,y:.026029339514117924},{x:.010661194846605361,y:.019210194846605383},{x:.017480339514117912,y:.013613867446385479},{x:.02526024554357096,y:.009455421036992116},{x:.03370193550927423,y:.006894662381854655},{x:.042481,y:.0060300000000000215},{x:.051260064490725774,y:.006894662381854655},{x:.05970175445642904,y:.009455421036992116},{x:.06748166048588208,y:.013613867446385486},{x:.07430080515339463,y:.019210194846605383},{x:.07989713255361454,y:.026029339514117924},{x:.0840555789630079,y:.03380924554357098},{x:.08661633761814536,y:.04225093550927425},{x:.087481,y:.05103000000000002},{x:.087481,y:.5631122522964573},{x:.26219554141599577,y:.26476777519375044},{x:.26376288989624813,y:.2626088267569117},{x:.2651577075441738,y:.2603345964826191},{x:.26634817172230724,y:.2590477232579252},{x:.26737807478439135,y:.2576290804774607},{x:.2693364970488442,y:.25581739014918375},{x:.271148193983327,y:.2538589739959976},{x:.27256684023788735,y:.25282907571933333},{x:.27385371747828813,y:.25163861588213104},{x:.27612795245761435,y:.25024380590572387},{x:.27828690618147356,y:.24867646470811877},{x:.2798792167324836,y:.24794311979268302},{x:.28137361418054185,y:.2470265916026687},{x:.2838762642998919,y:.24610226374330602},{x:.28629950743227456,y:.24498622954453103},{x:.28800429067823724,y:.24457762002415934},{x:.28964877947809164,y:.24397024514568044},{x:.29228366929688115,y:.24355192080462856},{x:.2948780779631802,y:.2429300821730634},{x:.29662982004000654,y:.24286191068247276},{x:.29836120340931876,y:.24258703019148947},{x:.3010270755894747,y:.24269078533857608},{x:.3036929481196057,y:.24258703918410057},{x:.30542433056167173,y:.24286192551544342},{x:.30717607240852984,y:.24293010291506947},{x:.3097704789772072,y:.24355195029817853},{x:.3124053673848756,y:.24397028352732772},{x:.31404985413590314,y:.24457766395304856},{x:.3157546360035206,y:.24498627922405064},{x:.3181778753712451,y:.24610232159698525},{x:.32068052237260675,y:.24702665789836697},{x:.32217491672899246,y:.24794319112932822},{x:.32376722480624953,y:.2486765414159958},{x:.3259261732430879,y:.2502438898962479},{x:.3282004035173809,y:.2516387075441738},{x:.329487276742075,y:.2528291717223074},{x:.3309059195225393,y:.2538590747843914},{x:.3327176098508159,y:.2558174970488439},{x:.33467602600400237,y:.257629193983327},{x:.3357059242806667,y:.2590478402378874},{x:.33689638411786893,y:.2603347174782881},{x:.3382911940942761,y:.2626089524576143},{x:.3398585352918812,y:.26476790618147356},{x:.514571,y:.5631111449291359},{x:.514571,y:.05103000000000002},{x:.5154356623818547,y:.04225093550927423},{x:.5179964210369922,y:.03380924554357098},{x:.5221548674463855,y:.026029339514117924},{x:.5277511948466054,y:.019210194846605383},{x:.5345703395141179,y:.013613867446385479},{x:.542350245543571,y:.009455421036992116},{x:.5507919355092743,y:.006894662381854655},{x:.559571,y:.0060300000000000215},{x:.5683500644907258,y:.006894662381854655},{x:.576791754456429,y:.009455421036992116},{x:.5845716604858822,y:.013613867446385486},{x:.5913908051533947,y:.019210194846605383},{x:.5969871325536146,y:.026029339514117924},{x:.6011455789630079,y:.03380924554357098},{x:.6037063376181454,y:.04225093550927425},{x:.6045710000000001,y:.05103000000000002},{x:.6045710000000001,y:.729004},{x:.6044399806971988,y:.7303342613054065},{x:.6044919608158994,y:.7316699481196056},{x:.6040085293496043,y:.7347148603514975},{x:.6037063376181454,y:.7377830644907257},{x:.6033183147080721,y:.7390622046001841},{x:.6031087164726723,y:.7403823673848756},{x:.6020405410986152,y:.7432744596816038},{x:.6011455789630079,y:.746224754456429},{x:.6005154639484909,y:.7474036167328832},{x:.600052342101633,y:.7486575223726067},{x:.5984404722003996,y:.7512856532491108},{x:.5969871325536146,y:.7540046604858821},{x:.596139140401289,y:.7550379419131618},{x:.5954402924558263,y:.7561774035173808},{x:.5933466712837743,y:.758440575377949},{x:.5913908051533947,y:.7608238051533946},{x:.5903575237261146,y:.7616717973057207},{x:.589449806016673,y:.7626530260040023},{x:.5869548902613284,y:.7644642664232344},{x:.5845716604858822,y:.7664201325536145},{x:.5833927982094276,y:.7670502475681318},{x:.5823110938185264,y:.7678355352918812},{x:.579510761693201,y:.7691252393162225},{x:.576791754456429,y:.7705785789630079},{x:.5755126143469705,y:.7709666018730812},{x:.5742984925677255,y:.7715257704554689},{x:.5713003592655512,y:.772244375482538},{x:.5683500644907258,y:.7731393376181454},{x:.5670198031853202,y:.7732703569209465},{x:.5657199220368199,y:.7735819178269366},{x:.5626392041392276,y:.7737018082685412},{x:.559571,y:.774004},{x:.5582407386945936,y:.7738729806971988},{x:.5569050518803944,y:.7739249608158993},{x:.5538601396485026,y:.7734415293496042},{x:.5507919355092743,y:.7731393376181454},{x:.5495127953998159,y:.772751314708072},{x:.5481926326151244,y:.7725417164726722},{x:.5453005403183963,y:.7714735410986151},{x:.542350245543571,y:.7705785789630079},{x:.5411713832671168,y:.7699484639484908},{x:.5399174776273933,y:.769485342101633},{x:.5372893467508892,y:.7678734722003996},{x:.5345703395141179,y:.7664201325536145},{x:.5335370580868383,y:.765572140401289},{x:.5323975964826192,y:.7648732924558262},{x:.5301344246220511,y:.7627796712837742},{x:.5277511948466054,y:.7608238051533946},{x:.5269032026942794,y:.7597905237261146},{x:.5259219739959977,y:.7588828060166729},{x:.5241107335767656,y:.7563878902613284},{x:.5221548674463855,y:.7540046604858821},{x:.5215247524318682,y:.7528257982094275},{x:.5207394647081188,y:.7517440938185264},{x:.30102684980758887,y:.3765575080608823},{x:.08131245858400418,y:.7517442248062496},{x:.0805272117946797,y:.752825865136849},{x:.07989713255361454,y:.7540046604858821},{x:.07794121846393844,y:.7563879486998997},{x:.0761299252156086,y:.7588829195225393},{x:.07514874916275306,y:.7597905823884902},{x:.07430080515339463,y:.7608238051533946},{x:.0719175169393771,y:.7627797192430708},{x:.06965428252171184,y:.764873384117869},{x:.06851488325078628,y:.7655721885442563},{x:.06748166048588208,y:.7664201325536145},{x:.06476258657702469,y:.7678735078373721},{x:.06213438581945812,y:.7694854083973313},{x:.06088054980546198,y:.7699484997219428},{x:.05970175445642904,y:.7705785789630079},{x:.056751387338174995,y:.7714735630437544},{x:.05385922052190834,y:.7725417548543195},{x:.05253913197970031,y:.7727513367372549},{x:.051260064490725774,y:.7731393376181454},{x:.04819178511684276,y:.773441536759571},{x:.0451467965906812,y:.7739249698085104},{x:.04381118578262464,y:.7738729881355436},{x:.042481,y:.774004},{x:.039412720626117295,y:.7737018008585744},{x:.03633192759147018,y:.7735818970849305},{x:.035032121291898165,y:.7732703494826018},{x:.03370193550927423,y:.7731393376181454},{x:.030751568391020223,y:.7722443535373988},{x:.02775336399647938,y:.7715257207759494},{x:.026539313032545114,y:.7709665798438982},{x:.02526024554357096,y:.7705785789630079},{x:.02254117163471342,y:.7691252036792503},{x:.01974077519375046,y:.7678354585840041},{x:.01865913486315115,y:.7670502117946798},{x:.017480339514117912,y:.7664201325536145},{x:.015097051300099952,y:.7644642184639381},{x:.012602080477460715,y:.7626529252156086},{x:.011694417611510011,y:.7616717491627533},{x:.010661194846605361,y:.7608238051533946},{x:.008705280756928618,y:.7584405169393763},{x:.006611615882131057,y:.7561772825217118},{x:.005912811455744052,y:.7550378832507868},{x:.005064867446385457,y:.7540046604858821},{x:.0036114921626275165,y:.7512855865770239},{x:.0019995916026687363,y:.7486573858194581},{x:.0015365002780573323,y:.7474035498054622},{x:.0009064210369920944,y:.746224754456429},{x:11436956245516774e-21,y:.7432743873381747},{x:-.0010567548543195318,y:.7403822205219084},{x:-.0012663367372549837,y:.7390621319797002},{x:-.001654337618145367,y:.7377830644907257},{x:-.0019565367595708303,y:.7347147851168438},{x:-.0024399698085105087,y:.7316697965906812},{x:-.0023879881355436095,y:.730334185782624},{x:-.0025190000000000004,y:.729004},{x:-.0025190000000000004,y:.05103000000000002}]],N:[[{x:.022871000000000002,y:.05103000000000002},{x:.023735662381854636,y:.04225093550927423},{x:.026296421036992097,y:.03380924554357098},{x:.03045486744638546,y:.026029339514117924},{x:.036051194846605364,y:.019210194846605383},{x:.042870339514117915,y:.013613867446385479},{x:.05065024554357096,y:.009455421036992116},{x:.05909193550927423,y:.006894662381854655},{x:.067871,y:.0060300000000000215},{x:.07665006449072577,y:.006894662381854655},{x:.08509175445642904,y:.009455421036992116},{x:.0928716604858821,y:.013613867446385486},{x:.09969080515339464,y:.019210194846605383},{x:.10528713255361455,y:.026029339514117924},{x:.10944557896300791,y:.03380924554357098},{x:.11200633761814537,y:.04225093550927425},{x:.112871,y:.05103000000000002},{x:.112871,y:.5841703094604355},{x:.49710429367778214,y:.025528669675955993},{x:.4971050718109503,y:.02552774709009411},{x:.49710565506134197,y:.025526690456344234},{x:.49994880496714983,y:.022156103119426583},{x:.5027917749380927,y:.01878536401177818},{x:.5027927181072235,y:.018784610959395015},{x:.5027934962896407,y:.018783688415073364},{x:.5062395848358414,y:.016032536999645196},{x:.5096855265142521,y:.01328120162562755},{x:.5096865984738844,y:.013280647046104224},{x:.5096875416832135,y:.013279894044071351},{x:.5136041376200112,y:.011253903755746949},{x:.5175206253992491,y:.009227704391234041},{x:.5175217849545753,y:.009227369596750634},{x:.5175228569438108,y:.00922681507445236},{x:.5217594476858983,y:.008003843583871996},{x:.5259959731369073,y:.006780645934087934},{x:.5259971757268666,y:.006780543790608634},{x:.5259983353000632,y:.006780209058025982},{x:.5303921110410749,y:.006407254473822295},{x:.5347858668666982,y:.00603406533837119},{x:.5347870662764328,y:.00603419977121261},{x:.5347882688718429,y:.006034097691931008},{x:.5391703792739257,y:.006525492449663053},{x:.5435525159020149,y:.007016653277689966},{x:.5435536660388816,y:.007017019120673398},{x:.543554865441438,y:.007017153617542397},{x:.547756908459233,y:.008354013692199154},{x:.5519590228368241,y:.009690649448577907},{x:.5519600795017079,y:.0096912326425627},{x:.551961229619043,y:.009691598546943021},{x:.555821723096155,y:.01182254915564361},{x:.559682330324044,y:.013953293677782128},{x:.5596832529099061,y:.01395407181095043},{x:.5596843095436558,y:.013954655061341997},{x:.5630548968806759,y:.016797804967236304},{x:.5664256359882218,y:.01964077493809272},{x:.5664263890406048,y:.019641718107223288},{x:.5664273115849267,y:.019642496289640633},{x:.5691784630004857,y:.02308858483600535},{x:.5719297983743725,y:.026534526514252196},{x:.5719303529538958,y:.0265355984738845},{x:.5719311059559287,y:.0265365416832135},{x:.5739570962443242,y:.03045313762014873},{x:.575983295608766,y:.03436962539924916},{x:.5759836304032494,y:.03437078495457533},{x:.5759841849255477,y:.0343718569438108},{x:.5772071564160691,y:.03860844768569421},{x:.5784303540659121,y:.04284497313690728},{x:.5784304562093915,y:.04284617572686688},{x:.578430790941974,y:.042847335300063204},{x:.5788037455260991,y:.04724111104014873},{x:.5791769346616289,y:.05163486686669809},{x:.5791768002287875,y:.05163606627643281},{x:.5791769023080691,y:.05163726887184294},{x:.5700269023080691,y:.7296112688718429},{x:.5690438463824576,y:.738377865441438},{x:.566369401453057,y:.746784229619043},{x:.5621063449386581,y:.7545073095436557},{x:.5564185037103594,y:.7612503115849266},{x:.5495244583167865,y:.7667541059559286},{x:.5416891430561892,y:.7708071849255477},{x:.5332136646999368,y:.773253790941974},{x:.5244237311281571,y:.773999902308069},{x:.515657134558562,y:.7730168463824576},{x:.507250770380957,y:.770342401453057},{x:.49952769045634426,y:.766079344938658},{x:.4927846884150734,y:.7603915037103594},{x:.4872808940440714,y:.7534974583167865},{x:.4832278150744524,y:.7456621430561892},{x:.480781209058026,y:.7371866646999369},{x:.48003509769193103,y:.7283967311281571},{x:.48718300813543913,y:.19876859615253395},{x:.10494770632221789,y:.754505330324044},{x:.1022980223560627,y:.75764690179997},{x:.09969080515339464,y:.7608238051533946},{x:.09945603456444842,y:.7610164763964532},{x:.09926022506190729,y:.7612486359882218},{x:.09604856383930557,y:.7638129153509474},{x:.0928716604858821,y:.7664201325536145},{x:.09260381265312083,y:.7665633002029657},{x:.09236647348574781,y:.7667527983743725},{x:.08871625734636118,y:.7686412418060533},{x:.08509175445642904,y:.7705785789630079},{x:.08480112262185491,y:.7706667411661766},{x:.08453137460075086,y:.770806295608766},{x:.08058287930375276,y:.7719463312873718},{x:.07665006449072577,y:.7731393376181454},{x:.07634781747275289,y:.773169106351106},{x:.07605602686309273,y:.7732533540659121},{x:.07196099086840901,y:.7736011710596524},{x:.067871,y:.774004},{x:.06756875298202693,y:.7739742312670393},{x:.06726613313330192,y:.7739999346616289},{x:.06318192637768459,y:.7735421665584931},{x:.05909193550927423,y:.7731393376181454},{x:.05880130367469977,y:.7730511754149765},{x:.05849948409798508,y:.77301734672231},{x:.054583060356599135,y:.7717715852937818},{x:.05065024554357096,y:.7705785789630079},{x:.0503823977108098,y:.7704354113136568},{x:.050092977163175983,y:.7703433505514221},{x:.04649484240404986,y:.768357469710569},{x:.042870339514117915,y:.7664201325536145},{x:.04263556892517204,y:.7662274613105563},{x:.04236966967595597,y:.7660807063222179},{x:.03922809820002561,y:.7634310223560591},{x:.036051194846605364,y:.7608238051533946},{x:.03585852360354703,y:.7605890345644487},{x:.035626364011778155,y:.7603932250619073},{x:.033062084649052234,y:.7571815638393052},{x:.03045486744638546,y:.7540046604858821},{x:.030311699797034096,y:.7537368126531205},{x:.03012220162562753,y:.7534994734857478},{x:.028233758193948882,y:.7498492573463653},{x:.026296421036992097,y:.746224754456429},{x:.026208258833823234,y:.7459341226218545},{x:.026068704391234022,y:.7456643746007509},{x:.02492866871262922,y:.741715879303756},{x:.023735662381854636,y:.7377830644907257},{x:.023705893648893955,y:.7374808174727527},{x:.023621645934087915,y:.7371890268630927},{x:.023273828940347806,y:.7330939908684111},{x:.022871000000000002,y:.729004},{x:.022871000000000002,y:.05103000000000002}]],O:[[{x:.012131736117046842,y:.4355587711738732},{x:.012426138979982786,y:.43287355609157196},{x:.012514983726773468,y:.43017371170811375},{x:.012905745911416293,y:.42849911573111366},{x:.01309315536666239,y:.42678977537085305},{x:.07316415536666239,y:.1412837753708531},{x:.07429915106219231,y:.13768552483470178},{x:.07533122192175289,y:.13405641311271962},{x:.07562440736087628,y:.1334840955199844},{x:.07581784742995093,y:.1328708369543332},{x:.07763301835724021,y:.12956315246900071},{x:.0793532628391043,y:.12620512014747703},{x:.07975246842568721,y:.12570099711853563},{x:.0800618324091279,y:.12513726042963025},{x:.08248742256740031,y:.1222472544549173},{x:.0848297326408542,y:.1192893488327618},{x:.1660597326408542,y:.03517334883276172},{x:.16792084009780786,y:.033590824390739155},{x:.16963596886504836,y:.031851158363102774},{x:.17127304088861567,y:.03074040344046043},{x:.172780173663761,y:.0294588683817891},{x:.1749142556657825,y:.0282698357562587},{x:.17693582072022015,y:.026898201947035502},{x:.17875813439943417,y:.026128166777013812},{x:.18048632312818114,y:.025165283073572443},{x:.1828113681007397,y:.02441543612151622},{x:.18506168183103927,y:.023464545648773483},{x:.2739246818310393,y:-.0041824543512264944},{x:.2748960678404206,y:-.004382857312604547},{x:.27582577451608603,y:-.004728396924478621},{x:.2792086173377598,y:-.005272563034129881},{x:.28256427991205235,y:-.0059648570457577},{x:.28355609768991147,y:-.005971901311054349},{x:.2845353517466465,y:-.006129424701440567},{x:.287959355733624,y:-.0060031749164705245},{x:.2913856000541485,y:-.006027509400590186},{x:.29235973459950004,y:-.005840924262640544},{x:.29335090385307644,y:-.005804377895986514},{x:.3811419038530764,y:.006122622104013507},{x:.38318930529213563,y:.00660893405691686},{x:.3852758334501729,y:.006882342567970358},{x:.387470347489584,y:.0076257947232155985},{x:.38972465411174423,y:.008161252125438313},{x:.3916378405507577,y:.009037647936572414},{x:.39363093730084414,y:.009712864429997858},{x:.3956382440479665,y:.010870159811164118},{x:.3977447722434711,y:.011835121954387393},{x:.39945022100051475,y:.01306792222421872},{x:.4012732927522862,y:.01411899850883961},{x:.4916652927522862,y:.07880999850883955},{x:.49276799959381884,y:.07977586317754862},{x:.49398769122063274,y:.08058901093294302},{x:.4960788615418114,y:.08267585840574071},{x:.4983012083703825,y:.08462241954283417},{x:.4991942961599152,y:.08578485282556958},{x:.5002319144966787,y:.08682032620708877},{x:.5018757798210403,y:.08927504258220473},{x:.5036756696393939,y:.09161775945128844},{x:.5043248175140242,y:.09293208968889465},{x:.5051404874699588,y:.09415009603518716},{x:.5560304874699588,y:.18912209603518723},{x:.5570965448702581,y:.19168827319789875},{x:.5583465570022521,y:.1941700494329812},{x:.5587848767756364,y:.19575236841213633},{x:.559414776433869,y:.19726864147332673},{x:.5599597135111237,y:.1999934877429328},{x:.5607015364856348,y:.20267144261291137},{x:.5892585364856349,y:.36700144261291134},{x:.5895780755292599,y:.371318367211785},{x:.589913428370686,y:.37563409214099147},{x:.5899036127276142,y:.3757163259822715},{x:.58990972616553,y:.3757989176124618},{x:.5893809351459178,y:.38009523269056544},{x:.5888678881103582,y:.38439345626922305},{x:.5314878881103581,y:.6446844562692231},{x:.5303800126922803,y:.6480826863142071},{x:.5293998170293023,y:.651519919480997},{x:.5290148883003433,y:.6522699863013032},{x:.5287535704445262,y:.6530715368858165},{x:.5270040207481954,y:.6561883351212919},{x:.5253720883446767,y:.6593682961290664},{x:.5248482251358019,y:.6600288547560561},{x:.5244355536676654,y:.6607640231862051},{x:.522111563906752,y:.6634796128039058},{x:.5198906090097624,y:.6662800975344761},{x:.4528876090097624,y:.7355630975344761},{x:.4513498405668143,y:.7368687638478525},{x:.44995999895015265,y:.7383308981052339},{x:.44799560298794544,y:.7397167316507253},{x:.4461630292013509,y:.741272707045399},{x:.44440008568631667,y:.7422532816059559},{x:.4427517012434998,y:.743416176715023},{x:.4405546878862334,y:.7443921472166956},{x:.43845377075029196,y:.7455607075703166},{x:.43653340109378364,y:.7461785074476045},{x:.43468982031452474,y:.7469974740014746},{x:.32025082031452473,y:.7849044740014746},{x:.3162756641960007,y:.785800462676764},{x:.3123143949565378,y:.7867559771378485},{x:.3119757732525013,y:.7867696456410259},{x:.3116451697261732,y:.786844162718285},{x:.30757159639863574,y:.7869474207351895},{x:.30350003021295163,y:.7871117699623142},{x:.30316524843732107,y:.7870591140117537},{x:.302826459804451,y:.7870677017158569},{x:.29881101440639224,y:.7863742609266953},{x:.29478561927964103,y:.7857411290712295},{x:.173234619279641,y:.7541621290712296},{x:.17180894449846637,y:.7536379076298808},{x:.17032768986057922,y:.753301394035824},{x:.16767817066393412,y:.7521190197025511},{x:.16495505208167519,y:.7511177274253745},{x:.16365904177145735,y:.7503254433998781},{x:.16227189957151614,y:.7497064173758784},{x:.15990395993272244,y:.7480298664806163},{x:.1574285077432372,y:.7465165596726792},{x:.15631196685338702,y:.745486660093817},{x:.15507224418821702,y:.7446089104628228},{x:.08487024418821705,y:.6837459104628228},{x:.08477922863788438,y:.6836498346778195},{x:.08467166808724909,y:.6835727301071804},{x:.08174665618590948,y:.6804486588585436},{x:.07880340242944883,y:.6773417676286113},{x:.07873287917322891,y:.6772297816598538},{x:.07864242772392874,y:.6771331746094597},{x:.07638309517198695,y:.6734984900001298},{x:.07410251962167697,y:.6698770964908778},{x:.07405519882875666,y:.6697535038963435},{x:.0739853324792622,y:.6696411069209627},{x:.07247850415964274,y:.6656354878421232},{x:.07094824805491862,y:.6616387601752097},{x:.07092594823683183,y:.6615083105489945},{x:.0708793519117729,y:.6613844430013583},{x:.013660351911772894,y:.4476944430013583},{x:.013380528959940628,y:.4459977798389246},{x:.012899536483696877,y:.44434683677239306},{x:.012664423003084308,y:.4416557821956227},{x:.012224847112815455,y:.43899048181468664},{x:.012281403443251489,y:.4372718288093888},{x:.012131736117046842,y:.4355587711738732}],[{x:.10337829031332789,y:.4348001396911351},{x:.15424861715004387,y:.6247803934833692},{x:.2060651876410252,y:.6697037849792326},{x:.3045603004668897,y:.6952928559694175},{x:.3958853477721772,y:.6650421672339206},{x:.4463402797077116,y:.6128703383711886},{x:.499069598507425,y:.373676069990286},{x:.47327322171072966,y:.22523195474705573},{x:.4307624349909165,y:.1458974207255564},{x:.35796896612556683,y:.09380119213930618},{x:.2911281310221294,y:.08472041346861442},{x:.22279798440939425,y:.10597924519162948},{x:.15856873728877424,y:.17249047688925445},{x:.10337829031332789,y:.4348001396911351}]],P:[[{x:.025556999999999996,y:.05103000000000002},{x:.02642166238185463,y:.04225093550927423},{x:.02898242103699209,y:.03380924554357098},{x:.033140867446385454,y:.026029339514117924},{x:.03873719484660536,y:.019210194846605383},{x:.04555633951411791,y:.013613867446385479},{x:.053336245543570956,y:.009455421036992116},{x:.061777935509274226,y:.006894662381854655},{x:.070557,y:.0060300000000000215},{x:.07933606449072576,y:.006894662381854655},{x:.08777775445642903,y:.009455421036992116},{x:.09555766048588209,y:.013613867446385486},{x:.10237680515339463,y:.019210194846605383},{x:.10797313255361454,y:.026029339514117924},{x:.1121315789630079,y:.03380924554357098},{x:.11469233761814536,y:.04225093550927425},{x:.11555699999999999,y:.05103000000000002},{x:.11555699999999999,y:.3249696679740436},{x:.22632413005583354,y:.32573306868659574},{x:.22797244585475993,y:.3259068917113995},{x:.2296296407459454,y:.32587748916779646},{x:.3399906407459454,y:.3347734891677965},{x:.3425199358315593,y:.3352301100895628},{x:.3450781711944775,y:.33547763407671893},{x:.4262801711944775,y:.3514846340767189},{x:.43023360415359113,y:.35267647626036297},{x:.4342017122431381,y:.35381850872164355},{x:.49034871224313803,y:.3761405087216436},{x:.49223471805815816,y:.37711419756221787},{x:.49421014578428074,y:.3778905822551455},{x:.4961445509948513,y:.379132728294546},{x:.49818726580808836,y:.3801873213410173},{x:.49984707528076383,y:.38151024250532195},{x:.5016330805772936,y:.3826570960152846},{x:.5368430805772937,y:.4104950960152846},{x:.538268982488492,y:.41186995272090265},{x:.539835277869678,y:.41308244849417974},{x:.5414366048100854,y:.41492417879038607},{x:.5431934850553138,y:.4166181652891421},{x:.5443237674236908,y:.41824478417169497},{x:.5456234206874699,y:.41973955124896434},{x:.546834674823181,y:.4218582966024136},{x:.5482273167355989,y:.4238624839583804},{x:.5490185434436073,y:.4256783549664296},{x:.5500016096439067,y:.4273979502871872},{x:.5725636096439066,y:.4777629502871872},{x:.5732747072201834,y:.47988746499756846},{x:.5741879174558705,y:.48193325814034926},{x:.5746713208988057,y:.4840600657825243},{x:.5753635933927087,y:.4861283376286891},{x:.5756465551694752,y:.4883507586397718},{x:.5761431038835471,y:.49053540091990977},{x:.5762022992770958,y:.49271564988294925},{x:.5764777701286589,y:.49487923612929946},{x:.5763217220435205,y:.4971141570479765},{x:.5763825271473633,y:.4993536938878067},{x:.5706825271473633,y:.5794656938878067},{x:.5700654182420953,y:.5830779192715516},{x:.5695689975224034,y:.5867086990904052},{x:.5693236589408173,y:.5874197813867033},{x:.5691969863455608,y:.5881612549906394},{x:.5678870248015591,y:.5915836805014664},{x:.5666918126627678,y:.5950478490261242},{x:.5415328126627678,y:.6498468490261241},{x:.5413708296623262,y:.6501242105110185},{x:.5412617638147841,y:.650426323944409},{x:.5391478795722351,y:.653930540410781},{x:.5370840246571379,y:.6574644536133865},{x:.536871043573226,y:.6577048843594048},{x:.5367051339883567,y:.6579799150765678},{x:.5339482287199508,y:.661004400648547},{x:.5312345979336611,y:.6640677725799057},{x:.5309788035098929,y:.664262032968313},{x:.5307624259999995,y:.6644994116930277},{x:.47414742599999943,y:.7155204116930277},{x:.47266946719886654,y:.7166100541651699},{x:.4713261182021025,y:.7178618913781634},{x:.46912758296129603,y:.7192213498885075},{x:.46704701478499566,y:.7207552731949938},{x:.4653848758470294,y:.7215356430341334},{x:.4638231175995642,y:.7225013521577397},{x:.4283261175995643,y:.7398953521577398},{x:.4243082080780145,y:.7413960258251278},{x:.4202985181688539,y:.7429185254841078},{x:.34090751816885384,y:.7644395254841077},{x:.3408415384597873,y:.7644506164558663},{x:.3407789202555512,y:.7644741810938074},{x:.33649241770984384,y:.7651816893280429},{x:.33220802793590354,y:.7659018811363755},{x:.33214115226719376,y:.7658998869955335},{x:.33207514002138977,y:.7659107826399355},{x:.2099811400213898,y:.7739077826399355},{x:.20641155146718015,y:.773790767187745},{x:.20284008504333162,y:.7738075792583221},{x:.0663570850433316,y:.7610135792583221},{x:.06408313636872824,y:.7605723800858132},{x:.061777935509274226,y:.7603453376181454},{x:.05976354040438703,y:.759734277543603},{x:.05769704052657306,y:.7593333282846051},{x:.05555285882676713,y:.7584569812513055},{x:.053336245543570956,y:.7577845789630079},{x:.05147976838249502,y:.7567922712467745},{x:.04953119704042999,y:.7559958719887517},{x:.04759918201567506,y:.7547180546196904},{x:.04555633951411791,y:.7536261325536145},{x:.043929123673028744,y:.7522907110247322},{x:.04217336337061703,y:.7511294669445447},{x:.04052776127482757,y:.7494992850446065},{x:.03873719484660536,y:.7480298051533947},{x:.037401773317722896,y:.7464025893123053},{x:.03590629693874444,y:.7449211263687215},{x:.034610347337597366,y:.7430012269141045},{x:.033140867446385454,y:.7412106604858821},{x:.032148559730151835,y:.7393541833248057},{x:.030970837593177758,y:.7376094333079335},{x:.030074343103068113,y:.7354735969579864},{x:.02898242103699209,y:.733430754456429},{x:.028371360962449563,y:.7314163593515414},{x:.027556652268729623,y:.729475372026062},{x:.027094064670152376,y:.7272056777739226},{x:.02642166238185463,y:.7249890644907258},{x:.02621533264498147,y:.722894163516222},{x:.025794946192721373,y:.7208315299365354},{x:.02578404246766777,y:.7185152008594541},{x:.025556999999999996,y:.71621},{x:.025556999999999996,y:.05103000000000002}],[{x:.11555699999999999,y:.414971805397996},{x:.11555699999999999,y:.6752310456989574},{x:.20767337575712835,y:.6838660911730216},{x:.3217031184787672,y:.6763972896549704},{x:.3925929523867085,y:.6571807523203506},{x:.4185706758911827,y:.6444513238436673},{x:.46361487793542,y:.6038578374443203},{x:.4814895996448674,y:.5649247767123354},{x:.48580725170954087,y:.5042413131675768},{x:.4723746184159119,y:.474255736718963},{x:.45098032059796866,y:.45734081304228297},{x:.40480552914494095,y:.4389833995595593},{x:.3301954695220376,y:.42427584033215343},{x:.22404845814303564,y:.41571952231013837},{x:.11555699999999999,y:.414971805397996}]],Q:[[{x:.012134510452571898,y:.39776120903599943},{x:.012467756958298536,y:.3937322544040442},{x:.012734737801221134,y:.38969836671479857},{x:.012831073490929856,y:.38933975275179394},{x:.012861682585025715,y:.38896968840207613},{x:.0716656825850257,y:.06709568840207614},{x:.07243605319674906,y:.06440524795975149},{x:.07301096718930201,y:.06166637692330789},{x:.07364750148994079,y:.06017438890024393},{x:.07409402290033937,y:.05861495861744442},{x:.07537446994903126,y:.05612650608452361},{x:.07647266436288541,y:.053552421842995857},{x:.07738804025928744,y:.05221328363312273},{x:.0781302116420243,y:.05077092937167972},{x:.07987152826568633,y:.04858009458346291},{x:.08145080010539194,y:.04626971775068952},{x:.16096480010539196,y:-.04855928224931053},{x:.16315500529851779,y:-.05070373085173594},{x:.16521251383898505,y:-.052975804178533654},{x:.1663001767861927,y:-.05378319510572523},{x:.1672680674520078,y:-.05473086511953138},{x:.1698345496348827,y:-.056406820906963286},{x:.172295783242646,y:-.058233836978172464},{x:.17352006120728586,y:-.058813521600477286},{x:.17465423537351554,y:-.059554156299027654},{x:.17749836607515132,y:-.06069721323044178},{x:.18026874092294012,y:-.06200896084304842},{x:.2672567409229401,y:-.09317596084304836},{x:.2695830047845554,y:-.09375972267138269},{x:.2718475349769373,y:-.09454977610873284},{x:.2738508793967248,y:-.09483071995927067},{x:.27581299058749986,y:-.09532309988014809},{x:.2782084422243766,y:-.09544181332278269},{x:.28058359188359605,y:-.09577489818042065},{x:.2826032520283714,y:-.0956596106656824},{x:.28462372036011635,y:-.09575974074040533},{x:.28699630390923414,y:-.09540884370631499},{x:.2893907973658866,y:-.09527215971995788},{x:.3753267973658866,y:-.08182715971995795},{x:.37840631600914065,y:-.08102976437129623},{x:.38152495221950905,y:-.08040256216817918},{x:.38266795913198753,y:-.07992627554804835},{x:.3838666954562622,y:-.07961588068444121},{x:.38673147789694834,y:-.07823302278004476},{x:.38966782930723504,y:-.07700945634885908},{x:.3906959547522998,y:-.07631933185595965},{x:.3918111026603398,y:-.07578103928710583},{x:.3943510569158511,y:-.07386586128072498},{x:.3969922811880835,y:-.07209295159323717},{x:.45217017177581864,y:-.026613783173476364},{x:.5097585536672307,y:-.09873256043298734},{x:.5159122791302333,y:-.10505326271144577},{x:.5231808703268614,y:-.11005198218579294},{x:.5312849993737013,y:-.11353662086994384},{x:.5399132291363312,y:-.11537326605347448},{x:.5487339815837399,y:-.1154913364919842},{x:.5574082801461085,y:-.11388629480473579},{x:.5656027763942881,y:-.11061982184365243},{x:.5730025604329874,y:-.10581744633276943},{x:.5793232627114457,y:-.0996637208697668},{x:.5843219821857929,y:-.09239512967313873},{x:.5878066208699438,y:-.08429100062629874},{x:.5896432660534744,y:-.07566277086366895},{x:.5897613364919841,y:-.06684201841626024},{x:.5881562948047357,y:-.058167719853891554},{x:.5848898218436525,y:-.04997322360571205},{x:.5800874463327694,y:-.042573439567012816},{x:.5106129498444961,y:.04443049374200151},{x:.5474711182959175,y:.12365010382899572},{x:.5481373073434039,y:.1255496832776173},{x:.5490025186311253,y:.12736726941208848},{x:.5495935209593992,y:.1297019482663393},{x:.5503905347901464,y:.13197456307270286},{x:.5506733336355601,y:.13396760967066554},{x:.5511673266667299,y:.13591906574595297},{x:.5791213266667299,y:.32118306574595296},{x:.5792865967797204,y:.3243841932678159},{x:.5796238248970751,y:.32757179562983435},{x:.579513579388425,y:.3287806341158348},{x:.5795761658223595,y:.3299928748079828},{x:.5791137513174164,y:.3331647361616822},{x:.5788226293197903,y:.33635687958013644},{x:.5226546293197903,y:.6297998795801365},{x:.5219105438778229,y:.6323181740447382},{x:.521369234544533,y:.6348876981954499},{x:.5206636104444891,y:.6365383151545928},{x:.5201549436340621,y:.6382598551025291},{x:.5189338607071872,y:.6405845973766512},{x:.5179016631869613,y:.6429991446291672},{x:.5168875780620563,y:.6444803850133782},{x:.5160528293589531,y:.6460696100820955},{x:.5144016744792594,y:.6481114616238732},{x:.5129182555439367,y:.6502782422813739},{x:.4473292555439367,y:.7283852422813738},{x:.4454767413796947,y:.7301964293264013},{x:.4437773055972873,y:.732151966404103},{x:.44233025961343425,y:.7332727172827731},{x:.4410215211764534,y:.7345522595114605},{x:.4388512574885805,y:.735967237520439},{x:.4368029695300015,y:.737553656027496},{x:.4351650804791521,y:.7383705673253327},{x:.43363186277883553,y:.7393702013057781},{x:.431227251583759,y:.7403345934673514},{x:.4289088260065632,y:.7414909282302113},{x:.3168848260065632,y:.7842309282302113},{x:.31544522398579106,y:.7846236280557255},{x:.31406876767085296,y:.7851998529634103},{x:.3111991137964475,y:.7857818972901452},{x:.30837424253549156,y:.7865524758495462},{x:.30688569012846406,y:.7866567776362199},{x:.305423266132861,y:.7869533972381565},{x:.30249520063786056,y:.7869644160479279},{x:.2995742760667897,y:.7871690831124285},{x:.29809397750772,y:.7869809786010931},{x:.2966017859654652,y:.7869865939723252},{x:.2937278327647654,y:.7864261638184524},{x:.2908231043767717,y:.786057054147543},{x:.2894079467091229,y:.7855837720890787},{x:.28794333170435554,y:.785298167434039},{x:.16895933170435556,y:.7496931674340391},{x:.16685145995859063,y:.7488293371508981},{x:.16467103610787698,y:.748169732810473},{x:.1627799564873854,y:.7471607878174731},{x:.16079664289106937,y:.7463480029082842},{x:.1588977982379503,y:.7450895455041626},{x:.15688795304330724,y:.7440172356850165},{x:.15523004539103946,y:.7426587459550258},{x:.15344340707901263,y:.7414746531917952},{x:.15182656105367498,y:.739869930478983},{x:.1500645317387979,y:.7384261234461069},{x:.08134353173879794,y:.6698101234461069},{x:.07898814712174665,y:.6669445493412297},{x:.07654417665723892,y:.6641541443502993},{x:.0761910053095167,y:.6635415309608049},{x:.07574199244846258,y:.6629952594015535},{x:.07399091166125166,y:.6597252337561722},{x:.07213828241215867,y:.6565116506297859},{x:.07191141209628055,y:.6558419081228384},{x:.07157759918584938,y:.6552185349547689},{x:.07049811528111428,y:.6516697230205841},{x:.06930802275051184,y:.6481564579560907},{x:.013298022750511833,y:.4072474579560906},{x:.013249789700227431,y:.40687927578320093},{x:.013136451320225305,y:.40652566731159423},{x:.012677284531251238,y:.4025091147450468},{x:.012152162963867598,y:.3985006516980174},{x:.01217668547678935,y:.39813013424102855},{x:.012134510452571898,y:.39776120903599943}],[{x:.1030741934540208,y:.3959601630333355},{x:.15405220468618464,y:.6152256818322884},{x:.20562817178182732,y:.6667228451191239},{x:.2990925609035841,y:.6946913078929434},{x:.38591644511804135,y:.6615657918309754},{x:.4364618489221904,y:.6013735361946543},{x:.4889800495366121,y:.3269984766785998},{x:.4631403994395801,y:.1557472448128009},{x:.4478929247459949,y:.12297570323093639},{x:.3763894463327694,y:.21252056043298723},{x:.3702357208697667,y:.2188412627114457},{x:.36296712967313866,y:.22383998218579282},{x:.35486300062629866,y:.22732462086994373},{x:.34623477086366883,y:.22916126605347437},{x:.3374140184162602,y:.2292793364919841},{x:.3287397198538915,y:.22767429480473567},{x:.32054522360571197,y:.22440782184365232},{x:.31314543956701274,y:.21960544633276935},{x:.3068247372885543,y:.2134517208697667},{x:.30182601781420715,y:.20618312967313862},{x:.2983413791300562,y:.19807900062629863},{x:.2965047339465256,y:.18945077086366885},{x:.29638666350801585,y:.18063001841626014},{x:.2979917051952643,y:.17195571985389144},{x:.30125817815634764,y:.16376122360571194},{x:.3060605536672306,y:.1563614395670127},{x:.3960043024488616,y:.04372356068896105},{x:.3492507773512258,y:.005187991106938553},{x:.28681342879982186,y:-.004580559340762309},{x:.22209853619564562,y:.018606191220169738},{x:.15806156000107346,y:.09497717514193305},{x:.1030741934540208,y:.3959601630333355}]],R:[[{x:-.010088,y:.05588800000000005},{x:-.009223337618145366,y:.04710893550927426},{x:-.006662578963007905,y:.03866724554357101},{x:-.0025041325536145423,y:.030887339514117953},{x:.0030921948466053617,y:.024068194846605412},{x:.009911339514117913,y:.018471867446385508},{x:.01769124554357096,y:.014313421036992145},{x:.02613293550927423,y:.011752662381854684},{x:.034912,y:.01088800000000005},{x:.043691064490725774,y:.011752662381854684},{x:.05213275445642904,y:.014313421036992145},{x:.059912660485882105,y:.018471867446385515},{x:.06673180515339464,y:.024068194846605412},{x:.07232813255361453,y:.030887339514117953},{x:.0764865789630079,y:.03866724554357101},{x:.07904733761814536,y:.04710893550927428},{x:.079912,y:.05588800000000005},{x:.079912,y:.36648688236049143},{x:.25933152798675563,y:.3728389247505383},{x:.2598033776805002,y:.3702688775066002},{x:.2630584474090824,y:.36206984491555727},{x:.26785052379396923,y:.35466338703825},{x:.5319365237939692,y:.022999387038250052},{x:.5380814500271169,y:.016670129897313986},{x:.5453430800394999,y:.011661303295187019},{x:.5534423534621115,y:.008165393629206541},{x:.5620680197594453,y:.00631674674730745},{x:.5708885994130244,y:.006186405112428031},{x:.5795651224933998,y:.00777937768050025},{x:.5877641550844427,y:.011034447409082423},{x:.59517061296175,y:.015826523793969254},{x:.601499870102686,y:.021971450027116944},{x:.606508696704813,y:.02923308003949996},{x:.6100046063707935,y:.03733235346211146},{x:.6118532532526926,y:.04595801975944533},{x:.6119835948875719,y:.05477859941302443},{x:.6103906223194997,y:.06345512249339977},{x:.6071355525909176,y:.07165415508444274},{x:.6023434762060308,y:.07906061296174999},{x:.36492288462028066,y:.3772356888373974},{x:.45122307475864126,y:.3907421966461853},{x:.4517263325772421,y:.3908725352482557},{x:.4522445282141884,y:.3909141268943158},{x:.4559919550269364,y:.3919772876167318},{x:.459762859565968,y:.3929539131315124},{x:.46023101962685037,y:.3931799280437793},{x:.4607311441523136,y:.39332181547170203},{x:.5072261441523136,y:.41160281547170213},{x:.5099186672764574,y:.4129799887569096},{x:.5126912264123276,y:.4141879634543456},{x:.5138373975854011,y:.41498434320238026},{x:.5150799754049854,y:.4156198976243936},{x:.5174520892726079,y:.41749589411441484},{x:.5199357102894067,y:.4192215573713852},{x:.5536387102894067,y:.4479225573713852},{x:.5544422891842978,y:.4487559165260936},{x:.5553578681885658,y:.44946439490120116},{x:.5574982196806069,y:.4519250983842071},{x:.5597619879819907,y:.4542727608851649},{x:.5603875460278954,y:.4552468777427617},{x:.5611473151639865,y:.4561203635073251},{x:.5627664809673836,y:.45895134712470415},{x:.5645287453623273,y:.46169553923588524},{x:.5649522427143585,y:.46277297903182424},{x:.5655270044804562,y:.4637779046177677},{x:.5843050044804562,y:.5056739046177676},{x:.5856980535944053,y:.5098331481877504},{x:.5870956418010017,y:.5139908687307394},{x:.5870987900445207,y:.5140153439302019},{x:.587106627133701,y:.514038743222053},{x:.5876614810321307,y:.5183898384933372},{x:.5882210839336397,y:.522740325535193},{x:.5899430839336397,y:.580600325535193},{x:.589777587866933,y:.5830153029012521},{x:.5898269599494498,y:.5854354407122341},{x:.5894767504310368,y:.5874052295805413},{x:.5893399666658296,y:.589401226848592},{x:.5887065118476329,y:.5917375144207835},{x:.5882827897945603,y:.5941207819778186},{x:.5699357897945603,y:.6593647819778187},{x:.5695566600666073,y:.6603356321127045},{x:.5693270257483343,y:.6613522723710545},{x:.5679549854437747,y:.6644370937206254},{x:.5667268644118839,y:.6675819841936177},{x:.5661656160899001,y:.668460215174679},{x:.5657420574552864,y:.6694125215424361},{x:.5637945617300048,y:.6721703971299327},{x:.5619765010042908,y:.6750152648867381},{x:.5612547025465381,y:.6757671267898905},{x:.5606534967163777,y:.6766185026674012},{x:.5398464967163776,y:.7006785026674012},{x:.5387925287989109,y:.70167944573824},{x:.5378793324857355,y:.7028102896247742},{x:.535601038014175,y:.7047103734673366},{x:.5334498940671065,y:.7067532939324781},{x:.5322209035416287,y:.707529385222465},{x:.5311046373415733,y:.7084603444980107},{x:.5029396373415734,y:.7276033444980106},{x:.49917038563569516,y:.7296565217962586},{x:.49541206095977475,y:.7317296332429761},{x:.4611910609597748,y:.7464366332429762},{x:.457170688924302,y:.7477143925092122},{x:.45316143447737084,y:.7490266191763204},{x:.37177643447737085,y:.7670666191763205},{x:.36787988134157384,y:.7675363076101905},{x:.36399443936523473,y:.7680904503837813},{x:.2290834393652347,y:.7739614503837813},{x:.2260604581328276,y:.7737959747883908},{x:.2230330269857825,y:.7738173839936113},{x:.030818026985782503,y:.7562573839936113},{x:.028490934977474184,y:.7558115802948838},{x:.02613293550927423,y:.7555793376181453},{x:.024169339379190496,y:.7549836872441402},{x:.022154034015341384,y:.7545976128723226},{x:.01995862841458906,y:.7537063820373993},{x:.01769124554357096,y:.7530185789630078},{x:.01588158498580211,y:.7520512952425895},{x:.013980322522940947,y:.7512794726091756},{x:.012000971535783972,y:.7499770641392344},{x:.009911339514117913,y:.7488601325536145},{x:.008325158769029223,y:.7475583876576994},{x:.006611003657363959,y:.7464304774736483},{x:.004923772632206568,y:.7447669421957904},{x:.0030921948466053617,y:.7432638051533946},{x:.0017904499506900475,y:.7416776244083056},{x:.0003292762098528329,y:.7402369716294513},{x:-.001000995511218774,y:.7382762382714833},{x:-.0025041325536145423,y:.7364446604858821},{x:-.0034714162740331275,y:.7346349999281129},{x:-.004623456556617868,y:.732936968032819},{x:-.005545647377387794,y:.7307543864780955},{x:-.006662578963007905,y:.728664754456429},{x:-.007258229337013042,y:.7267011583263452},{x:-.008056863899357211,y:.7248110017280808},{x:-.008535534543753812,y:.7224904473617442},{x:-.009223337618145366,y:.7202230644907257},{x:-.009424464135908606,y:.7181809926864091},{x:-.009839001899660749,y:.7161713490432334},{x:-.009855757323261527,y:.7138019994682},{x:-.010088,y:.711444},{x:-.010088,y:.05588800000000005}],[{x:.079912,y:.45654326739466394},{x:.079912,y:.6703676283824797},{x:.22820062174801237,y:.6839146886946046},{x:.3561457472749752,y:.6783468266821017},{x:.42954781695254723,y:.662076342723345},{x:.4559144639404158,y:.6507448714849071},{x:.47563211893454127,y:.6373433067928232},{x:.48601322722124407,y:.6253391992627579},{x:.4997779385388953,y:.5763903343143285},{x:.4985264355495565,y:.5343392524542002},{x:.48755361344964526,y:.5098575528750181},{x:.467303195590932,y:.4926125823096997},{x:.43241084881177044,y:.4788935374345549},{x:.3509044963348569,y:.4661372945522357},{x:.079912,y:.45654326739466394}]],S:[[{x:.021897597226735628,y:.20918252956592975},{x:.022856530106274857,y:.20041326151782815},{x:.025507836686771486,y:.19199957102060095},{x:.07532383668677148,y:.0752955710206009},{x:.07606476437254353,y:.07394451179196875},{x:.07662717764446286,y:.07250992955787258},{x:.07818101321859919,y:.07008559601860773},{x:.07956562874320691,y:.06756079148160443},{x:.08055589829123208,y:.06638024029801701},{x:.0813873780598424,y:.06508294454561242},{x:.08338432112997196,y:.06300833217803187},{x:.0852348965856767,y:.0608021661408081},{x:.08643645249257384,y:.05983749092219001},{x:.08750504545666679,y:.05872733599970995},{x:.08986835462050304,y:.05708217099364391},{x:.09211377343035676,y:.05527942517977789},{x:.09348044057646428,y:.05456769785378441},{x:.09474508130770348,y:.05368734639231786},{x:.18347008130770348,y:.00406434639231789},{x:.18531117162778632,y:.0032602675504258996},{x:.18705570252460849,y:.0022638899609980986},{x:.18934358471290644,y:.0014991491478438968},{x:.19155425509545604,y:.0005336596975895336},{x:.19351683738147718,y:.0001042099085839361},{x:.19542223123106015,y:-.0005326814704223887},{x:.1978153459361366,y:-.0008363843304376121},{x:.20017189655491793,y:-.0013520417748285815},{x:.2021805498702545,y:-.0013903589963945293},{x:.20417358345551592,y:-.0016432887864569548},{x:.36640558345551594,y:-.006196288786456984},{x:.3683537351453612,y:-.006059465175549666},{x:.37030515940756886,y:-.006136660097762148},{x:.3727431942064551,y:-.005751182385354602},{x:.3752054496398049,y:-.005578251970786187},{x:.37708947517888647,y:-.005063991846688501},{x:.37901846335331396,y:-.004758999502412188},{x:.3813344490261288,y:-.00390529164215812},{x:.3837156558614866,y:-.003255321831637216},{x:.38546315320491126,y:-.002383387922517842},{x:.38729557535780434,y:-.001707928996501587},{x:.5134735753578044,y:.059451071003498376},{x:.5144073364238021,y:.06002293670994077},{x:.5154151369003129,y:.060451046875811966},{x:.5181619939873726,y:.06232241135953579},{x:.5209964106485654,y:.06405830049148753},{x:.5218006642926897,y:.06480134570578519},{x:.5227055800155168,y:.06541784197435321},{x:.5250345719141375,y:.06778913394790613},{x:.5274758708842278,y:.07004463571609586},{x:.5281197100899656,y:.07093030562736781},{x:.5288869656553633,y:.07171149639276676},{x:.5307085905129939,y:.07449158843544039},{x:.5326629540416582,y:.07718002517181716},{x:.5331216364294024,y:.07817428398206286},{x:.5337217466362741,y:.07909014852127505},{x:.5349660004312154,y:.08217220325496363},{x:.5363583234240663,y:.08519025984344057},{x:.5366142220868877,y:.08625489874416871},{x:.5370241250365293,y:.08727024089657527},{x:.5783351250365293,y:.22800124089657534},{x:.5784689928995229,y:.22870739358153944},{x:.5787167010683089,y:.22938208824013706},{x:.5792894483007394,y:.23303529403132756},{x:.5799781923062021,y:.23666841715613338},{x:.579971724381043,y:.23738711763976203},{x:.5800830465086156,y:.23809717369609615},{x:.5799320834693805,y:.24179192160438975},{x:.5798988062915618,y:.2454896025769029},{x:.5797522511369868,y:.24619323160266243},{x:.5797229091764134,y:.2469113620006918},{x:.5788540372904492,y:.2505056649360105},{x:.5781000177526308,y:.2541258039501414},{x:.5778190074010411,y:.2547873214491718},{x:.5776501289474114,y:.2554859288404322},{x:.5462891289474114,y:.3454679288404322},{x:.5453940585085517,y:.34740151578805634},{x:.5446999978282894,y:.3494160105998292},{x:.5435456407901493,y:.3513945829466735},{x:.5425833616033817,y:.3534733584203385},{x:.5413282655917657,y:.35519517245680393},{x:.5402545326513293,y:.3570355547940282},{x:.5387363559437135,y:.3587509055417339},{x:.537387017705137,y:.36060200657115166},{x:.5358201287566253,y:.36204587934864135},{x:.5344079865107593,y:.36364142435019586},{x:.5325843328131388,y:.3650276335315076},{x:.5308997898345437,y:.36657992334222783},{x:.5290813226127058,y:.36769036763963614},{x:.5273850388959807,y:.368979759405903},{x:.44286903889598056,y:.42100375940590296},{x:.4391930936098881,y:.42279580082266366},{x:.4355432374645799,y:.42464039733796655},{x:.4352309585303121,y:.42472736117212373},{x:.4349395777453148,y:.4248694107387315},{x:.430984654780085,y:.42590987723258605},{x:.42704506666901776,y:.42700697873237736},{x:.18802361397643091,y:.46887992641475673},{x:.1445277950559712,y:.506325930968192},{x:.1345999941059918,y:.5433489412625321},{x:.1668438673565076,y:.6442112383308392},{x:.2418447705661005,y:.6964178007533797},{x:.3847076342900009,y:.6886954406015322},{x:.4475324208368403,y:.608018765726417},{x:.4536085342974724,y:.6016234190133417},{x:.4608155671913789,y:.5965363480257236},{x:.46887655728619765,y:.5929530460487544},{x:.47748172525324006,y:.5910112173678703},{x:.48630037931336645,y:.5907854853702875},{x:.49499362353660437,y:.5922845248100812},{x:.5032273814226823,y:.5954507284422511},{x:.5106852342735829,y:.6001624208368403},{x:.5170805809866582,y:.6062385342974724},{x:.5221676519742764,y:.6134455671913789},{x:.5257509539512455,y:.6215065572861976},{x:.5276927826321296,y:.63011172525324},{x:.5279185146297124,y:.6389303793133664},{x:.5264194751899187,y:.6476236235366044},{x:.5232532715577489,y:.6558573814226824},{x:.5185415791631597,y:.663315234273583},{x:.4431175791631597,y:.760171234273583},{x:.4420344490669973,y:.7613112710002186},{x:.44110391182703096,y:.7625789282836855},{x:.4390031114098716,y:.7645018722698176},{x:.4370414657025276,y:.7665665809866583},{x:.43575673751534005,y:.767473404028016},{x:.4345967726198766,y:.768535164822443},{x:.4321611907321885,y:.7700113141492059},{x:.4298344328086211,y:.7716536519742764},{x:.42839747791415833,y:.7722924126294288},{x:.42705266216361437,y:.7731074740629288},{x:.4243758968514515,y:.7740801011395291},{x:.42177344271380235,y:.7752369539512456},{x:.4202394824828045,y:.7755831050064366},{x:.4187614963922926,y:.7761201447252115},{x:.4159464142454535,y:.7765518720385514},{x:.41316827474676,y:.7771787826321297},{x:.4115962584106506,y:.7772190216964318},{x:.4100419001567639,y:.7774574015652649},{x:.23125890015676387,y:.7871214015652648},{x:.22961427991333744,y:.7870487065186679},{x:.22797320559841586,y:.7871788426312305},{x:.22521775007366066,y:.7868543723294609},{x:.22244596265035355,y:.7867318545526676},{x:.22084712542379714,y:.7863397068281228},{x:.21921219559556868,y:.7861471846952227},{x:.21657298639174055,y:.7852913862936938},{x:.21387836011908076,y:.7846304737606538},{x:.21238674832737245,y:.7839339433752962},{x:.2108207924222569,y:.7834261615145331},{x:.2083992528689725,y:.782071922865878},{x:.2058853407234555,y:.7808980140745921},{x:.20455827617124617,y:.7799238683005129},{x:.20312147299647784,y:.7791203404840283},{x:.10291447299647782,y:.7093683404840284},{x:.10181255131472464,y:.7084283417469311},{x:.10059641238964509,y:.7076416809983432},{x:.09846400643554813,y:.7055718520256913},{x:.09620311784593605,y:.7036431918911783},{x:.09530575393663021,y:.7025062807105057},{x:.09426645267874648,y:.7014974784931097},{x:.09257882390791694,y:.6990514089395268},{x:.09073764058529563,y:.6967187299857058},{x:.09007931964022471,y:.6954285972205445},{x:.08925679581402991,y:.6942364212378118},{x:.08807879885369768,y:.6915081121844703},{x:.08672807644060793,y:.6888610579553555},{x:.08633409736450004,y:.6874672826843552},{x:.08575996009935855,y:.6861375475907227},{x:.04484896009935855,y:.5581635475907226},{x:.04400698871411546,y:.5542371548008082},{x:.04309586967447821,y:.5503262293029391},{x:.04308290316808571,y:.5499278363503387},{x:.04299932697019912,y:.5495380927241992},{x:.04293953506277818,y:.5455228840020936},{x:.042808906634767226,y:.5415093553341928},{x:.04287391188557095,y:.5411160877505585},{x:.04286797679041901,y:.5407175280315513},{x:.04359266213029085,y:.5367678055966908},{x:.04424754429113727,y:.532805911414652},{x:.06119154429113727,y:.4696179114146519},{x:.06126294463056804,y:.4694283141856516},{x:.06129777501412092,y:.46922873472253734},{x:.06281676603792068,y:.46530228011432895},{x:.0643004966052513,y:.46136236601319713},{x:.0644075135916399,y:.46119034135699993},{x:.06448061074086608,y:.46100139182805006},{x:.06673642807197144,y:.45744672339211917},{x:.06896028828319853,y:.453871975109843},{x:.06909880931377366,y:.45372413383751425},{x:.06920736414622189,y:.4535530754671619},{x:.07211331798967527,y:.4505067971180214},{x:.07499184614403663,y:.4474345902263458},{x:.07515654793327702,y:.4473166137950705},{x:.07529638874761438,y:.44717002026055797},{x:.1386943887476144,y:.392590020260558},{x:.14135607757337018,y:.39071931904916735},{x:.1439175788350931,y:.3887136217356019},{x:.14495796828078528,y:.38818782053421796},{x:.14591168674437638,y:.38751752344016943},{x:.1488871876674173,y:.38620203695812855},{x:.15179076253542007,y:.38473460266203335},{x:.15291373991533655,y:.3844218744952798},{x:.15397990142199966,y:.3839505182141148},{x:.15715486761053352,y:.383240799869195},{x:.1602889333309822,y:.3823680212676226},{x:.4030282434963717,y:.3398437611206276},{x:.46657219784598525,y:.30072914754350266},{x:.487912612564808,y:.23949853636308405},{x:.45628203537627,y:.13174508671722343},{x:.35793695341674575,y:.08407681754539842},{x:.21775140382412592,y:.0880110894972649},{x:.15207256592030022,y:.12474460286217379},{x:.10828216331322851,y:.2273324289793991},{x:.10404037125679308,y:.23506720851839558},{x:.09837110341432329,y:.2418258338591919},{x:.09149222656964323,y:.24734857482022213},{x:.08366809210217534,y:.25142319556354265},{x:.07519937711167927,y:.2538931106990613},{x:.06641152956592972,y:.2546634027732644},{x:.05764226151782814,y:.2537044698937252},{x:.04922857102060091,y:.2510531633132285},{x:.04149379148160447,y:.24681137125679312},{x:.034735166140808106,y:.24114210341432332},{x:.029212425179777887,y:.23426322656964324},{x:.025137804436457384,y:.22643909210217536},{x:.022667889300938757,y:.21797037711167933},{x:.021897597226735628,y:.20918252956592975}]],T:[[{x:-.022050999999999998,y:.729004},{x:-.021186337618145364,y:.7202249355092742},{x:-.018625578963007903,y:.711783245543571},{x:-.01446713255361454,y:.7040033395141179},{x:-.008870805153394636,y:.6971841948466053},{x:-.002051660485882085,y:.6915878674463855},{x:.005728245543570962,y:.6874294210369921},{x:.014169935509274232,y:.6848686623818546},{x:.022949,y:.684004},{x:.264284,y:.684004},{x:.264284,y:.05103000000000002},{x:.26514866238185464,y:.04225093550927423},{x:.2677094210369921,y:.03380924554357098},{x:.27186786744638547,y:.026029339514117924},{x:.27746419484660534,y:.019210194846605383},{x:.28428333951411794,y:.013613867446385479},{x:.292063245543571,y:.009455421036992116},{x:.30050493550927426,y:.006894662381854655},{x:.309284,y:.0060300000000000215},{x:.3180630644907258,y:.006894662381854655},{x:.32650475445642907,y:.009455421036992116},{x:.3342846604858821,y:.013613867446385486},{x:.34110380515339467,y:.019210194846605383},{x:.34670013255361454,y:.026029339514117924},{x:.3508585789630079,y:.03380924554357098},{x:.35341933761814537,y:.04225093550927425},{x:.354284,y:.05103000000000002},{x:.354284,y:.684004},{x:.579103,y:.684004},{x:.5878820644907258,y:.6848686623818546},{x:.596323754456429,y:.6874294210369921},{x:.6041036604858822,y:.6915878674463855},{x:.6109228051533947,y:.6971841948466053},{x:.6165191325536146,y:.7040033395141179},{x:.6206775789630079,y:.711783245543571},{x:.6232383376181454,y:.7202249355092742},{x:.6241030000000001,y:.729004},{x:.6232383376181454,y:.7377830644907257},{x:.6206775789630079,y:.746224754456429},{x:.6165191325536146,y:.7540046604858821},{x:.6109228051533947,y:.7608238051533946},{x:.6041036604858822,y:.7664201325536145},{x:.596323754456429,y:.7705785789630079},{x:.5878820644907258,y:.7731393376181454},{x:.579103,y:.774004},{x:.022949,y:.774004},{x:.014169935509274211,y:.7731393376181454},{x:.005728245543570935,y:.7705785789630079},{x:-.0020516604858820953,y:.7664201325536145},{x:-.008870805153394643,y:.7608238051533946},{x:-.01446713255361454,y:.7540046604858821},{x:-.018625578963007903,y:.746224754456429},{x:-.021186337618145364,y:.7377830644907257},{x:-.022050999999999998,y:.729004}]],U:[[{x:.027022176378557076,y:.7288780077818786},{x:.02808017637855708,y:.35099900778187865},{x:.02823473618726791,y:.3494735334648019},{x:.028192796744230073,y:.34794082288884604},{x:.035484796744230065,y:.24514582288884607},{x:.03612518708694976,y:.24139252668431194},{x:.03666424897987138,y:.2376233431565944},{x:.055316248979871384,y:.16148034315659432},{x:.05618736340037885,y:.15900518320818077},{x:.05685851158014249,y:.15646848905542057},{x:.057648252259250334,y:.15485425480263812},{x:.058244846291224776,y:.15315910934454152},{x:.0595821022437829,y:.15090145489330362},{x:.06073523897858293,y:.14854443712190207},{x:.09649723897858292,y:.0906284371219021},{x:.09834293286415725,y:.08820732921922435},{x:.10003759110096133,y:.08567820232322114},{x:.10101147458130413,y:.08470684222595504},{x:.10184538199049184,y:.08361295562088691},{x:.10412794610596264,y:.08159844564215248},{x:.10628345014049506,y:.07944852663140606},{x:.15306845014049508,y:.041154526631406},{x:.15518086878702558,y:.03974701384514513},{x:.15716842451696925,y:.03816808161035298},{x:.15884280372557036,y:.03730705230772802},{x:.16040964618671547,y:.03626305906247794},{x:.1627560674239954,y:.03529470367371844},{x:.16501346722603244,y:.034133863066459845},{x:.23490646722603245,y:.006476863066459913},{x:.23625924682734178,y:.006089880823813601},{x:.23754823013535448,y:.005525708919597472},{x:.24049103862888763,y:.004879315347967098},{x:.24338780663402787,y:.004050652809021178},{x:.24479008944495417,y:.003935020529692536},{x:.24616436977860445,y:.0036331571990539033},{x:.3343553697786044,y:-.006825842800946093},{x:.3363658265006992,y:-.006865793301669296},{x:.3383604992721398,y:-.007120376900508131},{x:.34076517153289726,y:-.0069532142518240045},{x:.3431751712391958,y:-.00700110421331946},{x:.3451547915551648,y:-.0066480664270605625},{x:.3471608040448924,y:-.0065086169201366215},{x:.4090588040448924,y:.003962383079863387},{x:.4119620232343868,y:.004752615784895447},{x:.4149089852784979,y:.005359710588792872},{x:.4162090298953196,y:.005908616535408058},{x:.4175706649775032,y:.0062792425557079215},{x:.42026393287145114,y:.0076206811274584655},{x:.4230358315454356,y:.008791034549085273},{x:.4738028315454356,y:.03637303454908527},{x:.4760785863358737,y:.0379161826666043},{x:.4784624107710392,y:.03928649177082543},{x:.47972093897980134,y:.04038599604431689},{x:.48110410464379305,y:.04132389563682743},{x:.48303507818089647,y:.043281370330868374},{x:.4851057640535682,y:.045090410406577325},{x:.5154867640535682,y:.07740541040657731},{x:.5155903820373309,y:.07753992155387555},{x:.5157174079857786,y:.07765259073212467},{x:.5182811318880063,y:.08103290449336144},{x:.5208701788099869,y:.08439386230433626},{x:.5209455639802052,y:.08454600372347547},{x:.521048168494406,y:.08468128952824439},{x:.5340921684944061,y:.10592328952824437},{x:.5341054861393935,y:.10595068243490303},{x:.5341238592672674,y:.10597497562685786},{x:.5360339092314592,y:.10991723311331511},{x:.5379492688231333,y:.11385691363208547},{x:.5379569864823256,y:.11388637833537296},{x:.5379702672090579,y:.11391378915988949},{x:.557924267209058,y:.16807278915988946},{x:.5580810067186996,y:.16867450001810444},{x:.5583366124011981,y:.1692413235937006},{x:.5591915686944892,y:.17293786157308777},{x:.5601479818122073,y:.1766094575809222},{x:.5601843216510317,y:.17723018509512725},{x:.5603244341481242,y:.17783598350956487},{x:.5696394341481241,y:.2495799835095649},{x:.569721927352796,y:.25224539988339456},{x:.5700114646960025,y:.2548963275892337},{x:.5750284646960026,y:.7275053275892338},{x:.5742570402937379,y:.7362930758081182},{x:.5717860339652341,y:.7447614724740409},{x:.5677104050979391,y:.752585081852262},{x:.5621867778235843,y:.7594632470219072},{x:.5554274220406369,y:.7651316439528263},{x:.5476920960011455,y:.7693724393298378},{x:.5392780639467868,y:.7720226617648687},{x:.5305086724107663,y:.7729804646960026},{x:.5217209241918819,y:.7722090402937379},{x:.5132525275259592,y:.7697380339652341},{x:.505428918147738,y:.7656624050979391},{x:.4985507529780929,y:.7601387778235843},{x:.49288235604717384,y:.753379422040637},{x:.48864156067016223,y:.7456440960011456},{x:.48599133823513135,y:.7372300639467868},{x:.4850335353039975,y:.7284606724107663},{x:.48004487037154997,y:.258520878697574},{x:.4717248917269394,y:.19444051929027983},{x:.4550625667192203,y:.14921575933773623},{x:.4467624246683876,y:.135699076001046},{x:.42448554918380393,y:.11200409455592171},{x:.3866565267646711,y:.09145137140181527},{x:.33852910612300163,y:.08330987698295},{x:.2625775703514966,y:.09231733933890664},{x:.20464797458906397,y:.11524036210229632},{x:.16911733402594603,y:.14432255403825953},{x:.14104265103985364,y:.1897890642955865},{x:.12498883901236212,y:.25532548983758135},{x:.11807553704626646,y:.35278200048003916},{x:.11702182362144292,y:.7291299922181214},{x:.11613258476624799,y:.737906601393955},{x:.11354820087598706,y:.7463410885908555},{x:.10936798837422372,y:.7541093211959605},{x:.10375259048311052,y:.7609127703867312},{x:.09691780379445152,y:.7664899834261845},{x:.0891262853276994,y:.770626631144951},{x:.08067745876799748,y:.7731637444910576},{x:.07189600778187862,y:.7740038236214429},{x:.06311939860604492,y:.773114584766248},{x:.05468491140914452,y:.770530200875987},{x:.04691667880403945,y:.7663499883742237},{x:.04011322961326877,y:.7607345904831105},{x:.03453601657381558,y:.7538998037944515},{x:.030399368855048972,y:.7461082853276993},{x:.027862255508942363,y:.7376594587679974},{x:.027022176378557076,y:.7288780077818786}]],V:[[{x:-.017163400590915968,y:.72836062945125},{x:-.016173311217885875,y:.7195948244454146},{x:-.01349212241321528,y:.7111906087794154},{x:.27875887758678475,y:.033216608779415485},{x:.2789749302503264,y:.03282594254600198},{x:.27911899522766415,y:.032403397706182537},{x:.2811076886540147,y:.028969490703698003},{x:.2830281292409603,y:.025496951748158487},{x:.28331624571443165,y:.0251559418405784},{x:.28353997693249255,y:.024769621764193565},{x:.2861603801951793,y:.021789671162821947},{x:.2887213787977949,y:.018758515442121357},{x:.2890704869266977,y:.018480266679882864},{x:.2893652865202418,y:.018145017430816868},{x:.2925166989914198,y:.015733541060992128},{x:.2956198378696305,y:.013260254189586457},{x:.29601652162435305,y:.013055459516578674},{x:.296371060610326,y:.012784164535463174},{x:.29993237527606087,y:.011033834081706148},{x:.30345840254303674,y:.009213463087028258},{x:.303887417589348,y:.00908999264768462},{x:.3042880712333465,y:.00889307764850001},{x:.3081224287682413,y:.00787115732855266},{x:.3119358411735324,y:.006773658047051503},{x:.31238070070379703,y:.0067362567411129665},{x:.3128120721109714,y:.0066212890568466964},{x:.3167721203052928,y:.006367050695504971},{x:.32072637054875,y:.006034599409084053},{x:.3211699788607,y:.006084704547762943},{x:.3216154906697884,y:.006056102322046737},{x:.325549047092249,y:.006579316156958459},{x:.3294921755545854,y:.0070246887821141385},{x:.32991748502957097,y:.007160374853030322},{x:.330360016471596,y:.007219237253358143},{x:.3341159167548444,y:.008499796470269213},{x:.33789639122058457,y:.00970587758678474},{x:.33828705745399834,y:.009921930250326543},{x:.33870960229381747,y:.01006599522766418},{x:.3421435092963017,y:.012054688654014527},{x:.34561604825184156,y:.013975129240960359},{x:.3459570581594215,y:.014263245714431577},{x:.34634337823580646,y:.014486976932492547},{x:.34932332883717915,y:.01710738019518028},{x:.35235448455787866,y:.01966837879779494},{x:.3526327333201171,y:.020017486926697612},{x:.35296798256918316,y:.020312286520241793},{x:.3553794589390082,y:.023463698991420194},{x:.3578527458104136,y:.026566837869630475},{x:.3580575404834214,y:.026963521624353053},{x:.35832883546453687,y:.02731806061032596},{x:.3600791659182934,y:.03087937527605991},{x:.3618995369129718,y:.03440540254303673},{x:.3620230073523154,y:.034834417589348},{x:.3622199223515,y:.0352350712333465},{x:.6163569223515,y:.7132090712333464},{x:.6186287109431533,y:.7217330721109714},{x:.6191938976779532,y:.7305364906697883},{x:.6180307627466418,y:.7392810164715959},{x:.6151840047723358,y:.7476306022938175},{x:.6107630230675074,y:.7552643782358064},{x:.6049377134797582,y:.7618889825691831},{x:.597931939389674,y:.7672498354645368},{x:.5900149287666535,y:.7711409223515},{x:.5814909278890286,y:.7734127109431533},{x:.5726875093302116,y:.7739778976779532},{x:.5639429835284039,y:.7728147627466418},{x:.5555933977061824,y:.7699680047723358},{x:.5479596217641935,y:.7655470230675074},{x:.5413350174308168,y:.7597217134797583},{x:.5359741645354631,y:.7527159393896741},{x:.5320830776484999,y:.7447989287666535},{x:.3171703309688009,y:.17146543337864517},{x:.06915612241321528,y:.7468173912205845},{x:.06488687075903964,y:.7545370482518415},{x:.059193621202205074,y:.7612754845578786},{x:.05229516213036956,y:.7667737458104136},{x:.04445659745696326,y:.7708205369129717},{x:.0359791588264676,y:.7732603419529485},{x:.027188629451250054,y:.773999400590916},{x:.01842282444541461,y:.7730093112178859},{x:.010018608779415478,y:.7703281224132152},{x:.0022989517481584835,y:.7660588707590397},{x:-.004439484557878664,y:.7603656212022051},{x:-.009937745810413578,y:.7534671621303695},{x:-.013984536912971763,y:.7456285974569633},{x:-.016424341952948517,y:.7371511588264675},{x:-.017163400590915968,y:.72836062945125}]],W:[[{x:-.04486424190193638,y:.7324968210037928},{x:-.04468360364824366,y:.7236771280279449},{x:.03511539635175633,y:.05429612802794491},{x:.03538914303981033,y:.053053468981350556},{x:.035486899606724354,y:.05178477579191172},{x:.03633616861564037,y:.04875449496443272},{x:.037013200434797444,y:.04568114375463893},{x:.03752411791055629,y:.04451576738270255},{x:.03786750587531561,y:.043290523137271594},{x:.039291634880795206,y:.040484152470619886},{x:.040555238800576446,y:.03760193719815913},{x:.041283692791972554,y:.036558628261303676},{x:.041859515947665654,y:.035423918409107566},{x:.04380377647068911,y:.032949305154171604},{x:.045605392901094464,y:.030368987735599786},{x:.046523389329760155,y:.02948784001117424},{x:.047309519115439125,y:.028487270815480248},{x:.049699194314460494,y:.02643951297186818},{x:.05196958814642765,y:.024260253558522238},{x:.05304184892442764,y:.02357512905942291},{x:.054008074813295476,y:.022747151833295932},{x:.056751330810561565,y:.021204943586542027},{x:.059403252082379655,y:.019510489895534},{x:.060588570829346225,y:.019047717572039012},{x:.06169776130235942,y:.01842415101594414},{x:.06468917630833097,y:.01744675856409077},{x:.06762071317273859,y:.01630222750050557},{x:.06887353875396018,y:.016079591433481148},{x:.07008306824328207,y:.01568439886046892},{x:.07320768385688461,y:.015309382847312772},{x:.07630617899620724,y:.014758758098063603},{x:.07757836602719018,y:.014784814066709744},{x:.07884175299285809,y:.014633182505734484},{x:.08197949198836539,y:.014874954586349768},{x:.08512587197205507,y:.014939396351756326},{x:.08636853101864941,y:.015213143039810315},{x:.08763722420808827,y:.015310899606724347},{x:.09066750503556728,y:.016160168615640357},{x:.09374085624536103,y:.01683720043479743},{x:.09490623261729739,y:.017348117910556266},{x:.09613147686272838,y:.017691505875315594},{x:.09893784752938008,y:.01911563488079519},{x:.10182006280184085,y:.020379238800576432},{x:.10286337173869634,y:.02110769279197256},{x:.1039980815908924,y:.02168351594766564},{x:.10647269484582828,y:.023627776470689026},{x:.1090530122644002,y:.025429392901094458},{x:.10993415998882576,y:.026347389329760156},{x:.11093472918451973,y:.02713351911543911},{x:.11298248702813177,y:.02952319431446044},{x:.11516174644147774,y:.03179358814642764},{x:.11584687094057705,y:.032865848924427614},{x:.11667484816670405,y:.03383207481329547},{x:.118217056413458,y:.03657533081056164},{x:.11991151010446596,y:.039227252082379635},{x:.12037428242796094,y:.040412570829346184},{x:.12099784898405583,y:.041521761302359406},{x:.2862381791186236,y:.4176126753554925},{x:.4644074439049092,y:.03214939722735514},{x:.46457066699968924,y:.031871550040082325},{x:.46468087848244366,y:.03156873942729889},{x:.4668033610072479,y:.028070937443703255},{x:.4688757411162635,y:.024543219843286366},{x:.46909003322228215,y:.024302554657928657},{x:.4692572024422568,y:.02402706365982141},{x:.47202128937582516,y:.021010546759784428},{x:.47474207284479647,y:.017954914566682648},{x:.47499919883659564,y:.017760680011347015},{x:.4752169015744166,y:.01752309559247584},{x:.47851637060601154,y:.015103786828781735},{x:.4817809992520572,y:.012637666274559728},{x:.4820710779219699,y:.012497326674279732},{x:.48233094798351184,y:.012306779070622963},{x:.4860390023686124,y:.010577651122297159},{x:.4897220183436901,y:.008795813836836655},{x:.4900339021311097,y:.008714762363747632},{x:.4903259528556443,y:.008578574212853553},{x:.49430009414373083,y:.007606076497244536},{x:.4982599612093785,y:.006576997488159493},{x:.4985816645952609,y:.006558348904918078},{x:.4988946726372282,y:.006481753841050326},{x:.5029821768073245,y:.006303258899985619},{x:.5070667194929276,y:.00606648509648134},{x:.5073858795965667,y:.006110956057683261},{x:.5077078162324508,y:.006096897586191266},{x:.5117516027915979,y:.006719264880154805},{x:.5158038544123874,y:.0072838953667157535},{x:.5161082060899873,y:.007389776878261636},{x:.5164266994754154,y:.007438795258320738},{x:.5202713679739276,y:.008838107561233023},{x:.5241356027726449,y:.01018244390490916},{x:.524413449959918,y:.010345666999689355},{x:.5247162605727012,y:.010455878482443691},{x:.5282140625562944,y:.012578361007246536},{x:.5317417801567137,y:.014650741116263542},{x:.5319824453420714,y:.01486503322228222},{x:.5322579363401786,y:.01503220244225683},{x:.535274453240215,y:.01779628937582467},{x:.5383300854333174,y:.020517072844796484},{x:.5385243199886531,y:.020774198836595797},{x:.5387619044075241,y:.0209919015744166},{x:.5411812131712181,y:.024291370606011366},{x:.5436473337254403,y:.027555999252057217},{x:.5437876733257202,y:.027846077921969747},{x:.5439782209293771,y:.028105947983511865},{x:.5457073488777034,y:.03181400236861376},{x:.5474891861631633,y:.0354970183436901},{x:.5475702376362523,y:.03580890213110964},{x:.5477064257871465,y:.03610095285564429},{x:.548678923502756,y:.040075094143733274},{x:.5497080025118405,y:.04403496120937851},{x:.5497266510950819,y:.04435666459526063},{x:.5498032461589497,y:.04466967263722821},{x:.6466002461589497,y:.7226436726372282},{x:.6469851024138088,y:.7314568162324507},{x:.6456432047416794,y:.7401756994754154},{x:.6426261215175564,y:.7484652605727011},{x:.6380497975577433,y:.7560069363401786},{x:.6320900984255835,y:.7625109044075241},{x:.6249760520164882,y:.7677272209293771},{x:.6169810471443558,y:.7714554257871464},{x:.6084123273627718,y:.7735522461589497},{x:.5995991837675493,y:.7739371024138088},{x:.5908803005245846,y:.7725952047416793},{x:.5825907394272989,y:.7695781215175563},{x:.5750490636598214,y:.7650017975577432},{x:.5685450955924759,y:.7590420984255835},{x:.563328779070623,y:.7519280520164882},{x:.5596005742128536,y:.7439330471443557},{x:.5575037538410503,y:.7353643273627718},{x:.4822251865940539,y:.2081071670095049},{x:.3260455560950909,y:.5459966027726448},{x:.3245096626856286,y:.5486110836728201},{x:.32313748405233433,y:.5513150815908924},{x:.32228015650766817,y:.5524062697730983},{x:.32157725888373645,y:.5536027801567136},{x:.3195608173147473,y:.5558673865996665},{x:.3176874808845609,y:.5582517291845196},{x:.31663374639442166,y:.5591546941850146},{x:.31571092715520355,y:.5601910854333173},{x:.3132914281453504,y:.5620187898634509},{x:.3109889251867045,y:.563991848166704},{x:.30977927817660644,y:.5646718895469083},{x:.3086720007479428,y:.5655083337254402},{x:.3059424242873038,y:.566828898486493},{x:.3032992386976406,y:.5683148489840557},{x:.30198016522380455,y:.5687458331350992},{x:.3007309816563099,y:.5693501861631632},{x:.29779622383750376,y:.570112862691949},{x:.29491393175671793,y:.571054601139531},{x:.29353612307299787,y:.5712199655821879},{x:.29219303879062153,y:.5715690025118404},{x:.28916588071079274,y:.5717444815770724},{x:.2861552470071419,y:.5721058174942654},{x:.2847716515285703,y:.5719992073657418},{x:.2833862805070725,y:.5720795149035186},{x:.28038305415357795,y:.5716610529431293},{x:.27735977579191173,y:.5714281003932755},{x:.27602356431680025,y:.5710536126610233},{x:.27464914558761266,y:.5708621046332842},{x:.27178526326499086,y:.5698657829057354},{x:.26886552313727163,y:.5690474941246844},{x:.26762804552325165,y:.5684195201422382},{x:.26631739722735515,y:.5679635560950907},{x:.26370291632718046,y:.5664276626856288},{x:.2609989184091076,y:.5650554840523343},{x:.25990773022690183,y:.5641981565076682},{x:.2587112198432863,y:.5634952588837364},{x:.25644661340033337,y:.5614788173147471},{x:.2540622708154803,y:.5596054808845607},{x:.2531593058149851,y:.5585517463944213},{x:.2521229145666826,y:.5576289271552034},{x:.2502952101365493,y:.5552094281453507},{x:.24832215183329598,y:.5529069251867045},{x:.2476421104530918,y:.5516972781766065},{x:.24680566627455972,y:.5505900007479427},{x:.245485101513507,y:.5478604242873037},{x:.24399915101594416,y:.5452172386976405},{x:.10495542809967917,y:.22875042455884986},{x:.04468360364824366,y:.734330871972055},{x:.04278579956520255,y:.742945856245361},{x:.03924376119942353,y:.7510250628018409},{x:.034193607098905524,y:.7582580122644001},{x:.02782941185357234,y:.7643667464414777},{x:.020395747917620333,y:.7691165101044659},{x:.012178286827261426,y:.7723247724994944},{x:.003492821003792758,y:.7738682419019364},{x:-.00532687197205508,y:.7736876036482436},{x:-.013941856245361059,y:.7717897995652026},{x:-.022021062801840872,y:.7682477611994235},{x:-.029254012264400202,y:.7631976070989055},{x:-.035362746441477744,y:.7568334118535723},{x:-.04011251010446598,y:.7493997479176203},{x:-.04332077249949441,y:.7411822868272614},{x:-.04486424190193638,y:.7324968210037928}]],X:[[{x:-.03582341524240513,y:.7325834270170574},{x:-.035659804156077404,y:.7237634017461555},{x:-.03377863524060577,y:.7151447697271875},{x:-.030252200762440104,y:.7070587401552579},{x:-.02521601962092907,y:.6998160546121182},{x:.24190189785100796,y:.3863717955888736},{x:-.0190039697420246,y:.08021800391719859},{x:-.024040163260448045,y:.07297532698032597},{x:-.027566611556706647,y:.06488930343468059},{x:-.029447795200430175,y:.056270674630427356},{x:-.029611421359170286,y:.047450649639130975},{x:-.028051201971409197,y:.03876817707487998},{x:-.024827095393237467,y:.030556919489131844},{x:-.02006300223235442,y:.02313243090598055},{x:-.013942003917198569,y:.016780030257975413},{x:-.006699326980325947,y:.011743836739551976},{x:.0013866965653194212,y:.00821738844329338},{x:.010005325369572668,y:.006336204799569846},{x:.018825350360869044,y:.0061725786408297345},{x:.02750782292512003,y:.007732798028590823},{x:.03571908051086817,y:.010956904606762553},{x:.04314356909401947,y:.0157209977676456},{x:.049495969742024595,y:.021841996082801452},{x:.3010259353438819,y:.31699385831754345},{x:.5525549803790709,y:.021842054612118165},{x:.558907370566982,y:.01572104544144637},{x:.5663318510088331,y:.010956939592969957},{x:.5745431030849405,y:.007732818982704524},{x:.5832255729829426,y:.006172584757594898},{x:.5920455982538445,y:.006336195843922615},{x:.6006642302728125,y:.008217364759394247},{x:.6087502598447422,y:.011743799237559922},{x:.6159929453878819,y:.016779980379070948},{x:.6221139545585537,y:.023132370566981995},{x:.6268780604070301,y:.03055685100883309},{x:.6301021810172955,y:.0387681030849405},{x:.6316624152424052,y:.04745057298294264},{x:.6314988041560774,y:.05627059825384449},{x:.6296176352406058,y:.06488923027281246},{x:.6260912007624402,y:.07297525984474214},{x:.6210550196209291,y:.08021794538788188},{x:.36015009139561527,y:.3863716945525663},{x:.6272689697420246,y:.6998159960828014},{x:.632305163260448,y:.7070586730196741},{x:.6358316115567066,y:.7151446965653194},{x:.6377127952004301,y:.7237633253695727},{x:.6378764213591702,y:.7325833503608691},{x:.6363162019714091,y:.74126582292512},{x:.6330920953932374,y:.7494770805108681},{x:.6283280022323544,y:.7569015690940195},{x:.6222070039171985,y:.7632539697420246},{x:.6149643269803259,y:.7682901632604481},{x:.6068783034346805,y:.7718166115567067},{x:.5982596746304273,y:.7736977952004301},{x:.5894396496391309,y:.7738614213591702},{x:.58075717707488,y:.7723012019714092},{x:.5725459194891318,y:.7690770953932374},{x:.5651214309059804,y:.7643130022323544},{x:.5587690302579753,y:.7581920039171985},{x:.30102605390274134,y:.4557496318238965},{x:.04328401962092907,y:.7581919453878818},{x:.03693162943301802,y:.7643129545585536},{x:.029507148991166913,y:.76907706040703},{x:.021295896915059523,y:.7723011810172955},{x:.012613427017057378,y:.7738614152424051},{x:.003793401746155514,y:.7736978041560774},{x:-.004825230272812429,y:.7718166352406057},{x:-.012911259844742107,y:.7682902007624401},{x:-.02015394538788185,y:.7632540196209291},{x:-.02627495455855365,y:.756901629433018},{x:-.031039060407030063,y:.7494771489911669},{x:-.034263181017295495,y:.7412658969150595},{x:-.03582341524240513,y:.7325834270170574}]],Y:[[{x:-.02688005049839745,y:.731186349993587},{x:-.02644216088936969,y:.7223756821949907},{x:-.024293809188388457,y:.7138197369324374},{x:-.020517555346512936,y:.7058473143841377},{x:-.015258518681138845,y:.6987647902776368},{x:.25043465103960333,y:.4059541390643743},{x:.26029423204414154,y:.04978477430584237},{x:.26140149479875585,y:.04103299828270508},{x:.26419486861258723,y:.03266540142918031},{x:.26856700569651215,y:.025003545799746604},{x:.27434988727431814,y:.01834187220942495},{x:.28132128045004745,y:.012936385038381841},{x:.28921327849355916,y:.008994814127168342},{x:.2977225963459245,y:.006668631835443931},{x:.30652222569415766,y:.00604723204414153},{x:.3152740017172949,y:.007154494798755871},{x:.32364159857081976,y:.009947868612587236},{x:.3313034542002534,y:.014320005696512164},{x:.3379651277905751,y:.020102887274318144},{x:.3433706149616182,y:.027074280450047443},{x:.3473121858728317,y:.03496627849355913},{x:.3496383681645561,y:.04347559634592452},{x:.3502597679558585,y:.05227522569415767},{x:.34045421751128274,y:.4064927803087797},{x:.6166036868780955,y:.6970396048261934},{x:.6220250193382449,y:.7039986829780357},{x:.6259845336177533,y:.7118816938899454},{x:.6283300678033804,y:.7203856978734211},{x:.6289714843317633,y:.7291838908244783},{x:.6278841339254269,y:.7379381631220915},{x:.6251098028506934,y:.7463120929913156},{x:.620755107094902,y:.7539838750034306},{x:.6149873951738065,y:.7606586868780956},{x:.6080283170219642,y:.7660800193382449},{x:.6001453061100546,y:.7700395336177532},{x:.5916413021265788,y:.7723850678033803},{x:.5828431091755216,y:.7730264843317632},{x:.5740888368779085,y:.7719391339254268},{x:.5657149070086843,y:.7691648028506933},{x:.5580431249965694,y:.7648101070949019},{x:.5513683131219045,y:.7590423951738065},{x:.29567976193894085,y:.4900232412279098},{x:.051392518681138845,y:.7592432097223631},{x:.04485280102201476,y:.765163657957578},{x:.03728372005126494,y:.7696945108160528},{x:.028976151305805796,y:.7726616501633681},{x:.02024934999358704,y:.7739510504983974},{x:.011438682194990706,y:.7735131608893697},{x:.002882736932437466,y:.7713648091883885},{x:-.0050896856158622154,y:.7675885553465129},{x:-.012172209722363214,y:.7623295186811389},{x:-.01809265795757798,y:.7557898010220148},{x:-.022623510816052815,y:.7482207200512649},{x:-.025590650163368103,y:.7399131513058058},{x:-.02688005049839745,y:.731186349993587}]],Z:[[{x:.008711000000000003,y:.05103000000000002},{x:.00905278632815029,y:.04755978517413498},{x:.009251179439517476,y:.04407842782316871},{x:.009484424544736794,y:.043177288815328604},{x:.009575662381854637,y:.04225093550927423},{x:.01058788670939069,y:.038914079093048184},{x:.01146164687940622,y:.0355383196233794},{x:.011866213744552238,y:.0346999996115786},{x:.012136421036992098,y:.03380924554357098},{x:.013780184150668652,y:.030733981057728944},{x:.015295733266009179,y:.0275935480126292},{x:.015856074613338045,y:.026850263164785913},{x:.01629486744638546,y:.026029339514117927},{x:.01850700045157689,y:.023333847648222647},{x:.020606096809669634,y:.02054942610843994},{x:.02130067903544657,y:.01992974044441782},{x:.021891194846605365,y:.019210194846605383},{x:.024586686712500538,y:.016998061841414044},{x:.027188663217490867,y:.014676655565200585},{x:.02799079391630549,y:.014204383257544266},{x:.028710339514117916,y:.013613867446385479},{x:.03178560399995988,y:.01197010433270896},{x:.03479046815396611,y:.010200923661400137},{x:.035669321892902964,y:.00989421387003954},{x:.036490245543570964,y:.009455421036992116},{x:.03982710195979704,y:.008443196709456058},{x:.04311937851852794,y:.007294230264082269},{x:.04404118144126662,y:.007164869674294513},{x:.04493193550927423,y:.006894662381854655},{x:.048402150335139275,y:.006552876053704368},{x:.05185531895677298,y:.006068277970413476},{x:.052784646693945655,y:.006121237837117864},{x:.053711,y:.0060300000000000215},{x:.548341,y:.0060300000000000215},{x:.5571200644907257,y:.006894662381854655},{x:.565561754456429,y:.009455421036992116},{x:.5733416604858821,y:.013613867446385479},{x:.5801608051533946,y:.019210194846605383},{x:.5857571325536145,y:.026029339514117927},{x:.5899155789630078,y:.03380924554357098},{x:.5924763376181453,y:.04225093550927425},{x:.593341,y:.05103000000000002},{x:.5924763376181453,y:.05980906449072579},{x:.5899155789630078,y:.06825075445642906},{x:.5857571325536145,y:.07603066048588211},{x:.5801608051533946,y:.08284980515339466},{x:.5733416604858821,y:.08844613255361455},{x:.565561754456429,y:.09260457896300792},{x:.5571200644907257,y:.09516533761814538},{x:.548341,y:.09603000000000002},{x:.14224494935878249,y:.09603000000000002},{x:.5846943444347994,y:.7024816632174908},{x:.5851666167424556,y:.7032837939163054},{x:.5857571325536145,y:.7040033395141179},{x:.5874008956672913,y:.7070786039999603},{x:.5891700763385999,y:.7100834681539662},{x:.5894767861299605,y:.7109623218929031},{x:.5899155789630078,y:.711783245543571},{x:.5909278032905438,y:.7151201019597967},{x:.5920767697359177,y:.7184123785185279},{x:.5922061303257055,y:.7193341814412667},{x:.5924763376181453,y:.7202249355092742},{x:.5928181239462956,y:.7236951503351391},{x:.5933027220295866,y:.7271483189567729},{x:.5932497621628822,y:.7280776466939456},{x:.593341,y:.729004},{x:.5929992136718496,y:.7324742148258655},{x:.5928008205604824,y:.7359555721768313},{x:.5925675754552632,y:.7368567111846711},{x:.5924763376181453,y:.7377830644907257},{x:.5914641132906093,y:.7411199209069517},{x:.5905903531205937,y:.7444956803766206},{x:.5901857862554476,y:.7453340003884216},{x:.5899155789630078,y:.746224754456429},{x:.5882718158493319,y:.74930001894227},{x:.5867562667339908,y:.7524404519873709},{x:.5861959253866618,y:.7531837368352144},{x:.5857571325536145,y:.7540046604858821},{x:.5835449995484229,y:.7567001523517777},{x:.5814459031903303,y:.7594845738915601},{x:.5807513209645536,y:.760104259555582},{x:.5801608051533946,y:.7608238051533946},{x:.5774653132874991,y:.7630359381585863},{x:.5748633367825091,y:.7653573444347994},{x:.5740612060836946,y:.7658296167424556},{x:.5733416604858821,y:.7664201325536145},{x:.5702663960000408,y:.7680638956672906},{x:.5672615318460339,y:.7698330763385999},{x:.5663826781070966,y:.7701397861299606},{x:.565561754456429,y:.7705785789630079},{x:.5622248980402041,y:.7715908032905435},{x:.558932621481472,y:.7727397697359177},{x:.5580108185587332,y:.7728691303257055},{x:.5571200644907257,y:.7731393376181454},{x:.553649849664861,y:.7734811239462956},{x:.5501966810432269,y:.7739657220295866},{x:.5492673533060543,y:.7739127621628822},{x:.548341,y:.774004},{x:.053711,y:.774004},{x:.04493193550927421,y:.7731393376181454},{x:.036490245543570936,y:.7705785789630079},{x:.028710339514117906,y:.7664201325536145},{x:.021891194846605358,y:.7608238051533946},{x:.01629486744638546,y:.7540046604858821},{x:.012136421036992098,y:.746224754456429},{x:.009575662381854637,y:.7377830644907257},{x:.008711000000000003,y:.729004},{x:.009575662381854637,y:.7202249355092742},{x:.012136421036992098,y:.711783245543571},{x:.01629486744638546,y:.7040033395141179},{x:.021891194846605365,y:.6971841948466053},{x:.028710339514117916,y:.6915878674463855},{x:.036490245543570964,y:.6874294210369921},{x:.04493193550927423,y:.6848686623818546},{x:.053711,y:.684004},{x:.4598070506412174,y:.684004},{x:.017357655565200567,y:.07755233678250915},{x:.016885383257544267,y:.07675020608369457},{x:.01629486744638546,y:.07603066048588211},{x:.014651104332708876,y:.07295539600004002},{x:.012881923661400112,y:.06995053184603389},{x:.012575213870039523,y:.06907167810709706},{x:.012136421036992098,y:.06825075445642906},{x:.011124196709456038,y:.06491389804020298},{x:.00997523026408225,y:.06162162148147208},{x:.009845869674294495,y:.0606998185587334},{x:.009575662381854637,y:.05980906449072579},{x:.009233876053704348,y:.056338849664860746},{x:.008749277970413458,y:.05288568104322705},{x:.008802237837117845,y:.05195635330605437},{x:.008711000000000003,y:.05103000000000002}]],\\\"[\\\":[[{x:.152511,y:-.06942399999999993},{x:.15337566238185463,y:-.0782030644907257},{x:.1559364210369921,y:-.08664475445642897},{x:.16009486744638546,y:-.09442466048588202},{x:.16569119484660536,y:-.10124380515339457},{x:.1725103395141179,y:-.10684013255361446},{x:.18029024554357093,y:-.11099857896300783},{x:.1887319355092742,y:-.1135593376181453},{x:.197511,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.4486773376181454,y:-.06064493550927416},{x:.44611657896300794,y:-.05220324554357089},{x:.44195813255361455,y:-.04442333951411784},{x:.4363618051533946,y:-.03760419484660529},{x:.42954266048588213,y:-.032007867446385396},{x:.4217627544564291,y:-.027849421036992027},{x:.4133210644907258,y:-.025288662381854565},{x:.404542,y:-.024423999999999932},{x:.24251099999999998,y:-.024423999999999932},{x:.24251099999999998,y:.7147659999999999},{x:.404542,y:.7147659999999999},{x:.4133210644907258,y:.7156306623818546},{x:.4217627544564291,y:.7181914210369921},{x:.42954266048588213,y:.7223498674463854},{x:.4363618051533946,y:.7279461948466053},{x:.44195813255361455,y:.7347653395141178},{x:.44611657896300794,y:.7425452455435709},{x:.4486773376181454,y:.7509869355092742},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.197511,y:.804766},{x:.1887319355092742,y:.8039013376181453},{x:.18029024554357093,y:.8013405789630078},{x:.1725103395141179,y:.7971821325536145},{x:.16569119484660536,y:.7915858051533946},{x:.16009486744638546,y:.7847666604858821},{x:.1559364210369921,y:.776986754456429},{x:.15337566238185463,y:.7685450644907257},{x:.152511,y:.7597659999999999},{x:.152511,y:-.06942399999999993}]],\\\"\\\\\\\\\\\":[[{x:.017522651058219416,y:.7303997530123288},{x:.018114599516431164,y:.7215980934307649},{x:.020412292453046287,y:.7130810386853763},{x:.024327430817071727,y:.7051758944136092},{x:.5013774308170718,y:-.059077105586390885},{x:.5067595580368128,y:-.06606654912342862},{x:.5134018419815468,y:-.0718716915303336},{x:.521049023404313,y:-.07626944443996993},{x:.5294072254116235,y:-.07909080467430848},{x:.5381552469876711,y:-.08022734894178067},{x:.5469569065692351,y:-.07963540048356893},{x:.5554739613146237,y:-.0773377075469538},{x:.5633791055863908,y:-.07342256918292836},{x:.5703685491234285,y:-.06804044196318723},{x:.5761736915303335,y:-.06139815801845332},{x:.5805714444399699,y:-.05375097659568702},{x:.5833928046743084,y:-.04539277458837649},{x:.5845293489417805,y:-.03664475301232898},{x:.5839374004835688,y:-.02784309343076498},{x:.5816397075469537,y:-.01932603868537643},{x:.5777245691829282,y:-.011420894413609283},{x:.10067456918292828,y:.7528321055863908},{x:.09529244196318712,y:.7598215491234285},{x:.0886501580184532,y:.7656266915303336},{x:.08100297659568693,y:.7700244444399699},{x:.07264477458837638,y:.7728458046743084},{x:.06389675301232887,y:.7739823489417805},{x:.055095093430764894,y:.7733904004835688},{x:.04657803868537634,y:.7710927075469537},{x:.03867289441360919,y:.7671775691829282},{x:.03168345087657147,y:.7617954419631872},{x:.025878308469666468,y:.7551531580184532},{x:.021480555560030153,y:.747505976595687},{x:.01865919532569161,y:.7391477745883763},{x:.017522651058219416,y:.7303997530123288}]],\\\"]\\\":[[{x:.15250999999999998,y:-.06942399999999993},{x:.15337466238185463,y:-.0782030644907257},{x:.1559354210369921,y:-.08664475445642897},{x:.16009386744638546,y:-.09442466048588202},{x:.16569019484660535,y:-.10124380515339457},{x:.1725093395141179,y:-.10684013255361446},{x:.18028924554357095,y:-.11099857896300783},{x:.18873093550927422,y:-.1135593376181453},{x:.19751,y:-.11442399999999993},{x:.404542,y:-.11442399999999993},{x:.4133210644907258,y:-.1135593376181453},{x:.4217627544564291,y:-.11099857896300783},{x:.42954266048588213,y:-.10684013255361446},{x:.4363618051533946,y:-.10124380515339457},{x:.44195813255361455,y:-.09442466048588202},{x:.44611657896300794,y:-.08664475445642897},{x:.4486773376181454,y:-.0782030644907257},{x:.449542,y:-.06942399999999993},{x:.449542,y:.7597659999999999},{x:.4486773376181454,y:.7685450644907257},{x:.44611657896300794,y:.776986754456429},{x:.44195813255361455,y:.7847666604858821},{x:.4363618051533946,y:.7915858051533946},{x:.42954266048588213,y:.7971821325536145},{x:.4217627544564291,y:.8013405789630078},{x:.4133210644907258,y:.8039013376181453},{x:.404542,y:.804766},{x:.19751,y:.804766},{x:.18873093550927422,y:.8039013376181453},{x:.18028924554357095,y:.8013405789630078},{x:.1725093395141179,y:.7971821325536145},{x:.16569019484660535,y:.7915858051533946},{x:.16009386744638546,y:.7847666604858821},{x:.1559354210369921,y:.776986754456429},{x:.15337466238185463,y:.7685450644907257},{x:.15250999999999998,y:.7597659999999999},{x:.15337466238185463,y:.7509869355092742},{x:.1559354210369921,y:.7425452455435709},{x:.16009386744638546,y:.7347653395141178},{x:.16569019484660535,y:.7279461948466053},{x:.1725093395141179,y:.7223498674463854},{x:.18028924554357095,y:.7181914210369921},{x:.18873093550927422,y:.7156306623818546},{x:.19751,y:.7147659999999999},{x:.35954200000000003,y:.7147659999999999},{x:.35954200000000003,y:-.024423999999999932},{x:.19751,y:-.024423999999999932},{x:.18873093550927422,y:-.025288662381854565},{x:.18028924554357095,y:-.027849421036992027},{x:.1725093395141179,y:-.03200786744638539},{x:.16569019484660535,y:-.03760419484660529},{x:.16009386744638546,y:-.04442333951411784},{x:.1559354210369921,y:-.052203245543570885},{x:.15337466238185463,y:-.06064493550927414},{x:.15250999999999998,y:-.06942399999999993}]],\\\"^\\\":[[{x:-.009830024293871129,y:.4771904357900641},{x:-.009184411720694952,y:.46839254975009553},{x:-.006834821991481832,y:.4598896653882279},{x:-.002871548521860348,y:.4520085437820153},{x:.002553102311361327,y:.44505205201500053},{x:.009230664218841726,y:.43928752416454453},{x:.016904522241296224,y:.4349364878031557},{x:.02527977431847106,y:.43216615081811305},{x:.034034564209935884,y:.43108297570612886},{x:.04283245024990444,y:.431728588279305},{x:.05133533461177206,y:.4340781780085181},{x:.05921645621798466,y:.4380414514781396},{x:.06617294798499941,y:.4434661023113613},{x:.30102423332324457,y:.6668931783680099},{x:.5358792969655858,y:.44346586927801307},{x:.5428358294884947,y:.4380412707099504},{x:.5507169808710617,y:.43407805645230807},{x:.5592198828854552,y:.4317285306064111},{x:.5680177737757447,y:.431082984132888},{x:.5767725555289304,y:.4321662250206897},{x:.5851477867919753,y:.43493662492998636},{x:.5928216121243246,y:.439287718945922},{x:.5994991307219868,y:.44505229696558585},{x:.6049237292900496,y:.45200882948849475},{x:.6088869435476919,y:.4598899808710617},{x:.6112364693935889,y:.4683928828854553},{x:.6118820158671119,y:.47719077377574476},{x:.6107987749793102,y:.4859455555289303},{x:.6080283750700135,y:.4943207867919753},{x:.6036772810540779,y:.5019946121243246},{x:.5979127030344141,y:.5086721307219868},{x:.33204070303441413,y:.7616071307219868},{x:.3294429315385385,y:.7636328335402047},{x:.3269493357811583,y:.7657854758354554},{x:.3259710287822201,y:.7663401706594313},{x:.32508417051150523,y:.7670317292900496},{x:.3221411194513825,y:.7685117087189752},{x:.3192754777587038,y:.7701365121968442},{x:.31820775306259985,y:.7704896904878621},{x:.3172030191289383,y:.7709949435476919},{x:.31402778830632944,y:.7718723248078522},{x:.310900225681529,y:.7729068491818869},{x:.30978411534954325,y:.7730449384962876},{x:.3087001171145447,y:.7733444693935889},{x:.30541472886927135,y:.7735855352151975},{x:.30214543579006414,y:.7739900242938711},{x:.3010238313163334,y:.7739077179367437},{x:.2999022262242552,y:.773990015867112},{x:.29663293618411596,y:.7735855022258356},{x:.2933475497500956,y:.7733444117206949},{x:.29226355376554153,y:.7730448726791859},{x:.29114744447106966,y:.7729067749793103},{x:.2880198896188706,y:.7718722271075298},{x:.28484466538822795,y:.7709948219914818},{x:.28383993525062523,y:.7704895613829726},{x:.2827722132080247,y:.7701363750700135},{x:.27990658372278143,y:.7685115500622604},{x:.2769635437820154,y:.7670315485218604},{x:.2760766907070934,y:.7663399832281829},{x:.2750983878756754,y:.765785281054078},{x:.27260480829144085,y:.7636326200241867},{x:.2700070520150006,y:.7616068976886387},{x:.004139052015000585,y:.5086718976886386},{x:-.001625475835455463,y:.5019943357811583},{x:-.0059765121968442594,y:.49432047775870375},{x:-.00874684918188691,y:.4859452256815289},{x:-.009830024293871129,y:.4771904357900641}]],_:[[{x:-.045,y:-.160601},{x:-.044135337618145365,y:-.16938006449072576},{x:-.041574578963007904,y:-.17782175445642903},{x:-.03741613255361454,y:-.1856016604858821},{x:-.03181980515339464,y:-.19242080515339463},{x:-.025000660485882086,y:-.19801713255361453},{x:-.017220754456429038,y:-.2021755789630079},{x:-.008779064490725769,y:-.20473633761814536},{x:0,y:-.20560099999999998},{x:.602052,y:-.20560099999999998},{x:.6108310644907258,y:-.20473633761814536},{x:.619272754456429,y:-.2021755789630079},{x:.6270526604858822,y:-.19801713255361453},{x:.6338718051533947,y:-.19242080515339463},{x:.6394681325536146,y:-.1856016604858821},{x:.6436265789630079,y:-.17782175445642903},{x:.6461873376181454,y:-.16938006449072576},{x:.6470520000000001,y:-.160601},{x:.6461873376181454,y:-.15182193550927423},{x:.6436265789630079,y:-.14338024554357096},{x:.6394681325536146,y:-.1356003395141179},{x:.6338718051533947,y:-.12878119484660536},{x:.6270526604858822,y:-.12318486744638546},{x:.619272754456429,y:-.1190264210369921},{x:.6108310644907258,y:-.11646566238185463},{x:.602052,y:-.115601},{x:0,y:-.115601},{x:-.00877906449072579,y:-.11646566238185463},{x:-.017220754456429066,y:-.1190264210369921},{x:-.025000660485882096,y:-.12318486744638546},{x:-.03181980515339464,y:-.12878119484660536},{x:-.03741613255361454,y:-.1356003395141179},{x:-.041574578963007904,y:-.14338024554357096},{x:-.044135337618145365,y:-.15182193550927423},{x:-.045,y:-.160601}]],a:[[{x:.029951000000000005,y:.25490100000000004},{x:.030216131121475042,y:.2522090785486062},{x:.03027571711850824,y:.2495047884160563},{x:.03064747136410999,y:.24782960757010103},{x:.03081566238185464,y:.24612193550927428},{x:.0316008669059687,y:.24353346308961055},{x:.0321868888075612,y:.2408927597850148},{x:.06949088880756119,y:.12701175978501478},{x:.07014919013856018,y:.12551652306247207},{x:.07061771774296957,y:.1239514111231075},{x:.07192248021942128,y:.12148874987750752},{x:.07304546130734973,y:.1189380599695235},{x:.0739828197765546,y:.11759998201998349},{x:.07474768294666384,y:.11615634846888903},{x:.07650781615341086,y:.11399555310027064},{x:.07810683439013419,y:.11171295672570881},{x:.07928722783725009,y:.11058345913436952},{x:.08031903331037206,y:.10931678199931477},{x:.15605303331037207,y:.033026781999314685},{x:.1581401110567553,y:.03130114899494214},{x:.16009013354595797,y:.02942202284781055},{x:.16153164054777758,y:.028496972085311937},{x:.16285166496406625,y:.027405552418137233},{x:.16523529439528092,y:.026120245637685162},{x:.16751444707429886,y:.024657656887915},{x:.24324744707429888,y:-.014037343112084925},{x:.24491821916217926,y:-.014693433733650136},{x:.24650124554357095,y:-.015539578963007873},{x:.24901423193062222,y:-.016301885049470277},{x:.2514585861893129,y:-.017261751399011975},{x:.25322525179064753,y:-.017579283958613606},{x:.2549429355092742,y:-.018100337618145335},{x:.2575563541074305,y:-.01835773688343746},{x:.2601410014196699,y:-.018822289810772906},{x:.26193566856615697,y:-.018789061710219754},{x:.263722,y:-.018964999999999968},{x:.376759,y:-.018964999999999968},{x:.3786816094876915,y:-.018775639493449434},{x:.3806133727303473,y:-.01879962736385296},{x:.3830607170270406,y:-.018344335046447002},{x:.3855380644907258,y:-.018100337618145335},{x:.3873867891740171,y:-.01753953311656589},{x:.3892861139289994,y:-.017186191753697247},{x:.3915976100664607,y:-.016262194563578608},{x:.3939797544564291,y:-.015539578963007873},{x:.3956835488825182,y:-.014628881868892333},{x:.3974774451646465,y:-.013911789983170525},{x:.4720844451646465,y:.0247832100168294},{x:.4742399118062311,y:.026185049737888398},{x:.4765030886255536,y:.02740538646642049},{x:.47792879308654873,y:.028584168427667152},{x:.47947957817165415,y:.02959274452399146},{x:.48132014276352414,y:.0313881589690925},{x:.48210100000000006,y:.032033776942416534},{x:.48210100000000006,y:.02603500000000003},{x:.4829656623818547,y:.01725593550927424},{x:.4855264210369921,y:.008814245543570985},{x:.4896848674463855,y:.0010343395141179344},{x:.4952811948466054,y:-.0057848051533946065},{x:.5021003395141179,y:-.01138113255361451},{x:.509880245543571,y:-.015539578963007873},{x:.5183219355092743,y:-.018100337618145335},{x:.527101,y:-.018964999999999968},{x:.5358800644907258,y:-.018100337618145335},{x:.544321754456429,y:-.015539578963007873},{x:.5521016604858822,y:-.011381132553614504},{x:.5589208051533947,y:-.0057848051533946065},{x:.5645171325536146,y:.0010343395141179344},{x:.5686755789630079,y:.008814245543570992},{x:.5712363376181454,y:.01725593550927426},{x:.5721010000000001,y:.02603500000000003},{x:.5721010000000001,y:.560059},{x:.5712363376181454,y:.5688380644907257},{x:.5686755789630079,y:.577279754456429},{x:.5645171325536146,y:.5850596604858821},{x:.5589208051533947,y:.5918788051533946},{x:.5521016604858822,y:.5974751325536145},{x:.544321754456429,y:.6016335789630078},{x:.5358800644907258,y:.6041943376181453},{x:.527101,y:.605059},{x:.5183219355092743,y:.6041943376181453},{x:.509880245543571,y:.6016335789630078},{x:.5021003395141179,y:.5974751325536145},{x:.4952811948466054,y:.5918788051533946},{x:.4896848674463855,y:.5850596604858821},{x:.4855264210369921,y:.577279754456429},{x:.4829656623818547,y:.5688380644907257},{x:.48210100000000006,y:.560059},{x:.48210100000000006,y:.5551612473179106},{x:.48111784979070266,y:.5559741116228759},{x:.47906658786156825,y:.5579287481398052},{x:.4777260461549398,y:.558778440075324},{x:.476502844006682,y:.5597897782764175},{x:.474008872962507,y:.5611345413953497},{x:.47161569478864906,y:.5626514387693977},{x:.3970086947886491,y:.6002454387693977},{x:.39545173243232984,y:.6008467903430146},{x:.3939797544564291,y:.6016335789630078},{x:.39134652561635536,y:.6024323601988234},{x:.3887796173011618,y:.6034237870938969},{x:.38713525366780027,y:.6037098355781862},{x:.3855380644907258,y:.6041943376181453},{x:.3827995979159321,y:.6044640530341434},{x:.3800885942320307,y:.6049356509696303},{x:.37842002129388747,y:.6048954036817589},{x:.376759,y:.605059},{x:.263722,y:.605059},{x:.26219504701733515,y:.604908608257877},{x:.26066140118579323,y:.6049547986330399},{x:.25781511370268967,y:.6044772224791067},{x:.2549429355092742,y:.6041943376181453},{x:.2534746624734083,y:.6037489418620853},{x:.2519614739213154,y:.6034950452430072},{x:.24926304753974865,y:.6024713624393285},{x:.24650124554357095,y:.6016335789630078},{x:.24514807736385555,y:.6009102955021357},{x:.24371349707866236,y:.6003660689935006},{x:.16798049707866233,y:.5627720689935006},{x:.1654642487594581,y:.5611982224645521},{x:.16285190958182658,y:.5597896123262998},{x:.16173267757498783,y:.5588642237445607},{x:.16050143578237863,y:.5580941146870384},{x:.15834057869520102,y:.5560596134829665},{x:.15605324108782545,y:.5541684273021619},{x:.08031924108782545,y:.47787942730216193},{x:.07924694249287094,y:.47656305714472025},{x:.07802357952480113,y:.4753857561141845},{x:.07646760484406812,y:.47315109973327435},{x:.07474784589903924,y:.4710398973462887},{x:.07395296229881854,y:.46953962579412084},{x:.07298278594430238,y:.4681462799973844},{x:.07189266871370663,y:.46565100631071576},{x:.07061782960809859,y:.46324486175923196},{x:.0701309079335922,y:.4616183434067253},{x:.06945120152585271,y:.46006249834135976},{x:.032147201525852716,y:.3450764983413597},{x:.031582343425880205,y:.34249647318004567},{x:.03081566238185464,y:.3399690644907258},{x:.030641204072877935,y:.33819775955415116},{x:.03026054307811779,y:.33645906634171463},{x:.03020987650767869,y:.3338184172918108},{x:.029951000000000005,y:.33119},{x:.029951000000000005,y:.25490100000000004}],[{x:.119951,y:.2620835578942187},{x:.119951,y:.3240730820964405},{x:.15174843963453788,y:.42208563822492473},{x:.21467365091165175,y:.4854719831046318},{x:.2742766075147511,y:.5150589999999999},{x:.3660620360389177,y:.5150589999999999},{x:.4245839309326211,y:.4855701837142105},{x:.48210100000000006,y:.4276323784447675},{x:.48210100000000006,y:.15956344905445352},{x:.4243936225653894,y:.10143318135145685},{x:.36578354074375496,y:.07103500000000003},{x:.2745522516182332,y:.07103500000000003},{x:.21486246778999646,y:.10153288315838035},{x:.15170083487400915,y:.1651582162341545},{x:.119951,y:.2620835578942187}]],b:[[{x:.03166000000000001,y:.04001500000000002},{x:.03252466238185464,y:.031235935509274233},{x:.0350854210369921,y:.022794245543570978},{x:.039243867446385465,y:.015014339514117927},{x:.04484019484660537,y:.008195194846605386},{x:.05165933951411792,y:.002598867446385482},{x:.05943924554357097,y:-.0015595789630078807},{x:.06788093550927424,y:-.004120337618145342},{x:.07666,y:-.0049849999999999756},{x:.08543906449072577,y:-.004120337618145342},{x:.09388075445642904,y:-.0015595789630078807},{x:.10166066048588211,y:.002598867446385489},{x:.10847980515339464,y:.008195194846605386},{x:.11407613255361454,y:.015014339514117927},{x:.1182345789630079,y:.022794245543570985},{x:.12079533761814537,y:.031235935509274254},{x:.12166,y:.04001500000000002},{x:.12166,y:.041388769861289504},{x:.12338630711141785,y:.04010106584896898},{x:.12512540667363178,y:.03853443023544684},{x:.12691331624345048,y:.03747016444054036},{x:.12858112311649333,y:.036226097502515},{x:.13069431360107225,y:.035219499067818724},{x:.13270563229917137,y:.034022247411931134},{x:.20674863229917137,y:-.0007227525880688923},{x:.20772794171481185,y:-.0010698043626217635},{x:.20864424554357097,y:-.0015595789630078669},{x:.21187816153300185,y:-.0025405766534664824},{x:.21506348921487128,y:-.003669406425619949},{x:.21609168791714548,y:-.0038187359083884913},{x:.21708593550927424,y:-.004120337618145342},{x:.22044909586509742,y:-.004451580001305548},{x:.22379344213248661,y:-.004937293022731791},{x:.22483101702188665,y:-.00488316156543817},{x:.225865,y:-.0049849999999999756},{x:.338045,y:-.0049849999999999756},{x:.33894984805462636,y:-.004895880245274822},{x:.33985755144997865,y:-.004948481373678995},{x:.343332465401001,y:-.004464230112452937},{x:.3468240644907258,y:-.004120337618145342},{x:.3476941397420575,y:-.003856403176165039},{x:.34859466384226984,y:-.0037309094409420443},{x:.351908335561611,y:-.0025780408502315546},{x:.35526575445642905,y:-.0015595789630078807},{x:.35606762040050133,y:-.0011309726863615623},{x:.35692635856942223,y:-.0008322067413783357},{x:.43209235856942224,y:.03391279325862169},{x:.4342218624454842,y:.03516383683568551},{x:.43645162164562873,y:.03622594356254809},{x:.4380158580934015,y:.037392738102356306},{x:.4396984532755396,y:.03838123120587913},{x:.4415429728374372,y:.04002368192832182},{x:.4435226810964235,y:.04150038501262054},{x:.5186856810964235,y:.11000138501262047},{x:.5200684051728882,y:.11153543836568303},{x:.5216038163727121,y:.1129166544997947},{x:.5230144082918019,y:.11480386048953693},{x:.5245918796416693,y:.11655397481445093},{x:.5256487561000858,y:.11832830784782436},{x:.5268852029038621,y:.11998252816661786},{x:.5279005150705119,y:.12210866485417524},{x:.5291062453835067,y:.12413290061668979},{x:.5297966590542814,y:.12607932670695898},{x:.530686625504748,y:.12794298045128052},{x:.567704625504748,y:.2301969804512806},{x:.5685418230641662,y:.23348712941632632},{x:.5695273376181453,y:.23673593550927427},{x:.5696276430094915,y:.2377543532384077},{x:.5698799976366801,y:.23874609563675617},{x:.5700592324586751,y:.24213635445346285},{x:.570392,y:.24551500000000004},{x:.570392,y:.314017},{x:.570065993218988,y:.3173270023951309},{x:.5699006262411136,y:.32064890697528625},{x:.569634437926433,y:.3217086568121163},{x:.5695273376181453,y:.3227960644907258},{x:.5685618455328773,y:.32597886535008125},{x:.5677515846008636,y:.32920467896823863},{x:.5307335846008636,y:.4324506789682387},{x:.5298196963817511,y:.43437967657309706},{x:.5291061063615623,y:.4363913954201699},{x:.5279358002551,y:.43835612690926706},{x:.5269566878799311,y:.4404227969757902},{x:.5256840310027916,y:.4421364386856148},{x:.5245916855370664,y:.44397028841230757},{x:.523060566435399,y:.4456689527415915},{x:.5216970801011935,y:.44750489697372575},{x:.5201145620561008,y:.4489373284986299},{x:.5186854393684929,y:.45052283528838016},{x:.44352243936849295,y:.5190228352883801},{x:.44134657552661755,y:.5206458300432604},{x:.43929971954126384,y:.5224287703137037},{x:.4378191137317927,y:.523276992839783},{x:.43645134158383936,y:.5242972253466508},{x:.43400065578620683,y:.5254645447348341},{x:.43164529517316985,y:.52681390451462},{x:.35647929517316984,y:.56056790451462},{x:.3558506134628383,y:.560778965311121},{x:.35526575445642905,y:.5610915789630079},{x:.351674330744245,y:.5621810254355277},{x:.34811645117964274,y:.5633754754766519},{x:.34745867349333664,y:.563459831081816},{x:.3468240644907258,y:.5636523376181454},{x:.3430891085149791,y:.5640201986736739},{x:.3393665669654169,y:.5644975898222324},{x:.3387049713307353,y:.5644519984974604},{x:.338045,y:.564517},{x:.225865,y:.564517},{x:.22507819619617456,y:.5644395065891945},{x:.22428916125732748,y:.5644893996719887},{x:.22069487882474298,y:.5640077875099223},{x:.21708593550927424,y:.5636523376181454},{x:.21632936813438544,y:.5634228354140474},{x:.21554576062305134,y:.5633178367349442},{x:.2121144991913443,y:.5621442688983362},{x:.20864424554357097,y:.5610915789630079},{x:.20794698905754733,y:.5607188876066144},{x:.20719892257093525,y:.5604630322059678},{x:.13315592257093525,y:.5267090322059678},{x:.13091775246116674,y:.5254099486077729},{x:.12858140317750869,y:.5242970714087468},{x:.1271119341080524,y:.5232009671819817},{x:.12552641140636125,y:.5222806946221156},{x:.12358468574515913,y:.5205699272235509},{x:.12166,y:.5191342684374534},{x:.12166,y:.7597659999999999},{x:.12079533761814537,y:.7685450644907257},{x:.1182345789630079,y:.776986754456429},{x:.11407613255361454,y:.7847666604858821},{x:.10847980515339464,y:.7915858051533946},{x:.10166066048588208,y:.7971821325536145},{x:.09388075445642904,y:.8013405789630078},{x:.08543906449072577,y:.8039013376181453},{x:.07666,y:.804766},{x:.06788093550927421,y:.8039013376181453},{x:.05943924554357094,y:.8013405789630078},{x:.05165933951411792,y:.7971821325536145},{x:.04484019484660537,y:.7915858051533946},{x:.039243867446385465,y:.7847666604858821},{x:.0350854210369921,y:.776986754456429},{x:.03252466238185464,y:.7685450644907257},{x:.03166000000000001,y:.7597659999999999},{x:.03166000000000001,y:.04001500000000002}],[{x:.12166,y:.16313400296117606},{x:.12166,y:.39738980161800674},{x:.17691400696537596,y:.447746357818324},{x:.23563826658076475,y:.474517},{x:.3284048540018634,y:.474517},{x:.3882155063572531,y:.44765846343288423},{x:.44979135555302596,y:.39154114946310603},{x:.480392,y:.30619363915535625},{x:.480392,y:.2534097446111891},{x:.44984564070758065,y:.16903221413717517},{x:.38802932067077023,y:.11269492399652684},{x:.3281476350434013,y:.08501500000000002},{x:.2358983461114888,y:.08501500000000002},{x:.1771018588393058,y:.11260550754658781},{x:.12166,y:.16313400296117606}]],c:[[{x:.0446,y:.25490100000000004},{x:.044822712444716174,y:.2526397626013558},{x:.04482893549381362,y:.2503675925637664},{x:.045254001037800355,y:.24826081602954003},{x:.045464662381854634,y:.24612193550927428},{x:.04612424100165128,y:.2439475961957434},{x:.04657362286091401,y:.24172029932495478},{x:.08145962286091402,y:.1278402993249547},{x:.08196610920465827,y:.1266269431042867},{x:.08230081253195312,y:.125355433994083},{x:.08366176737769918,y:.12256476567779218},{x:.08485778977199918,y:.11969953302126297},{x:.0855912581784792,y:.11860830168404396},{x:.08616758939694805,y:.11742652164475936},{x:.08804682625741464,y:.11495498435675963},{x:.08977884657839008,y:.1123781387363477},{x:.09071111026807865,y:.11145096769089737},{x:.09150692129220603,y:.11040433186669174},{x:.16233292129220603,y:.03411333186669174},{x:.16445877247754231,y:.03223237849112975},{x:.1664474797904295,y:.03020697184383589},{x:.16775479669311927,y:.029316055882572942},{x:.16893962068732413,y:.02826772347496185},{x:.17139158003796548,y:.02683764508339147},{x:.17373721213250964,y:.02523913360696181},{x:.24456521213250962,y:-.013455866393038113},{x:.2467886390083486,y:-.014400746043602006},{x:.24891924554357092,y:-.015539578963007873},{x:.25083834630720225,y:-.016121731815163746},{x:.25268405147305695,y:-.01690609278116076},{x:.2550490927002279,y:-.01739904776899966},{x:.2573609355092742,y:-.018100337618145335},{x:.259356733677244,y:-.018296906580526337},{x:.26131999536931183,y:-.018706117055345653},{x:.26373576373978486,y:-.0187282033967292},{x:.26614,y:-.018964999999999968},{x:.371854,y:-.018964999999999968},{x:.3744001776009888,y:-.018714223394882004},{x:.3769583677219744,y:-.018674567546095353},{x:.3787793796063011,y:-.01828290964379429},{x:.3806330644907258,y:-.018100337618145335},{x:.3830813939144215,y:-.01735764500708899},{x:.3855826926572475,y:-.01681967299983559},{x:.38729230564255435,y:-.01608027889939661},{x:.3890747544564291,y:-.015539578963007873},{x:.391331147776118,y:-.014333511606549179},{x:.393679431632842,y:-.013317897403369645},{x:.463449431632842,y:.02537710259663028},{x:.46566730315778443,y:.026909287408228903},{x:.46799586592077425,y:.028267352155161442},{x:.4692879686356918,y:.029410572352257962},{x:.47070743151062955,y:.03039118797094862},{x:.4725837728278355,y:.03232661755101331},{x:.4746026476214732,y:.03411286752390576},{x:.5454306476214732,y:.11040386752390575},{x:.5507700783887176,y:.11742598212342069},{x:.5546369668925095,y:.12535484002769406},{x:.5568827107762242,y:.13388573967401945},{x:.5574210073618384,y:.14269084337317217},{x:.5562311702134469,y:.15143177592795284},{x:.5533589241053942,y:.15977262820225266},{x:.5489146478448386,y:.16739286592077418},{x:.5430691324760942,y:.17399964762147313},{x:.5360470178765793,y:.17933907838871752},{x:.5281181599723059,y:.18320596689250943},{x:.5195872603259806,y:.1854517107762242},{x:.5107821566268278,y:.1859900073618383},{x:.5020412240720471,y:.18480017021344686},{x:.4937003717977473,y:.18192792410539416},{x:.4860801340792258,y:.17748364784483847},{x:.47947335237852684,y:.17163813247609414},{x:.41352572033101553,y:.10060392571412592},{x:.36021071976053953,y:.07103500000000003},{x:.27763077403847125,y:.07103500000000003},{x:.2233107097601157,y:.10071132697875086},{x:.16448866962379677,y:.16407213041308155},{x:.1346,y:.2616391113440561},{x:.1346,y:.3245158400933278},{x:.1645319520417492,y:.4231721923699009},{x:.2231207776861973,y:.4862793045993598},{x:.27734241586879393,y:.5150589999999999},{x:.3605019191882548,y:.5150589999999999},{x:.41371701660545657,y:.4863852380349392},{x:.47947395272027693,y:.4155592208902026},{x:.48608084903755494,y:.4097138350672089},{x:.4937011738972078,y:.40526970822380387},{x:.5020420824884065,y:.4023976256622846},{x:.5107830383716269,y:.4012079599048077},{x:.5195881315142611,y:.40174642913926084},{x:.5281189871247909,y:.40399234029494097},{x:.5360477692062626,y:.4078593842656568},{x:.5430697791097975,y:.41319895272027696},{x:.5489151649327911,y:.41980584903755497},{x:.5533592917761961,y:.42742617389720783},{x:.5562313743377155,y:.4357670824884066},{x:.5574210400951923,y:.4445080383716269},{x:.5568825708607392,y:.4533131315142611},{x:.5546366597050592,y:.4618439871247909},{x:.5507696157343432,y:.46977276920626265},{x:.5454300472797231,y:.4767947791097975},{x:.4746020472797231,y:.5530827791097974},{x:.47237947035514305,y:.5550491819442839},{x:.4702881116089302,y:.5571546051529963},{x:.469083054274185,y:.5579656532949738},{x:.4679951509624451,y:.5589281649327911},{x:.46543165406806053,y:.5604231806402761},{x:.46296973250196366,y:.5620801448811513},{x:.39319973250196366,y:.5996741448811513},{x:.39109075852725916,y:.6005560023370271},{x:.3890747544564291,y:.6016335789630078},{x:.38703122642603144,y:.6022534764138876},{x:.38506104886577136,y:.6030772968079529},{x:.3828205563795885,y:.6035307692082409},{x:.3806330644907258,y:.6041943376181453},{x:.3785078662851109,y:.6044036513718285},{x:.37641482574826585,y:.6048272797133635},{x:.3741289156203665,y:.604834940368031},{x:.371854,y:.605059},{x:.26614,y:.605059},{x:.26400488750824663,y:.6048487097743618},{x:.26185945318827825,y:.6048549475733314},{x:.2596259398913868,y:.6044174210783497},{x:.2573609355092742,y:.6041943376181453},{x:.2553078741931944,y:.60357154827667},{x:.25320244685788745,y:.6031591127457343},{x:.2510972070775077,y:.6022942563713519},{x:.24891924554357092,y:.6016335789630078},{x:.24702713339817148,y:.6006222239508241},{x:.24504262343928468,y:.5998069647561404},{x:.1742146234392847,y:.5622129647561404},{x:.17162525666515238,y:.5604936738034747},{x:.16894033563687538,y:.5589277936219744},{x:.16795812189104978,y:.5580587651214349},{x:.16686556037036515,y:.5573333247718834},{x:.16466136457832586,y:.5551419091149951},{x:.16233352162359432,y:.5530823147741101},{x:.09150752162359431,y:.47679431477411016},{x:.09067474586023959,y:.4756991081857825},{x:.08970182133886938,y:.4747262717047309},{x:.08801053269383365,y:.4721953272870651},{x:.08616805203977476,y:.4697722296898647},{x:.08556494203519081,y:.46853560069719197},{x:.08480050296804506,y:.467391648838166},{x:.08363547472152838,y:.4645793817614187},{x:.08230111970711389,y:.461843393160995},{x:.08195085264054901,y:.4605128647226562},{x:.08142427599227564,y:.4592417589140625},{x:.046538275992275634,y:.3442567589140625},{x:.04610669192420131,y:.34208755224892967},{x:.045464662381854634,y:.33997106449072584},{x:.04524807462900009,y:.3377720121321243},{x:.04481688692083,y:.3356047976316928},{x:.044816786846426454,y:.33339307378956023},{x:.0446,y:.33119200000000004},{x:.0446,y:.25490100000000004}]],d:[[{x:.03166100000000001,y:.24551500000000004},{x:.03199378652782141,y:.24213616168032864},{x:.032173060891358886,y:.2387457109778176},{x:.032425376075824915,y:.237754159461938},{x:.03252566238185464,y:.23673593550927427},{x:.03351123316568353,y:.23348694405135337},{x:.034348506941927405,y:.23019661460170962},{x:.0713675069419274,y:.12794261460170955},{x:.07225746993456125,y:.1260790095358921},{x:.0729478813145148,y:.12413263082247869},{x:.07415364826248581,y:.12210836405190925},{x:.07516899837159816,y:.11998219518580837},{x:.07640543228727825,y:.1183280219355851},{x:.07746229725612473,y:.11655373492181778},{x:.07903981058640837,y:.11480359733178996},{x:.08045044599662987,y:.11291636718401242},{x:.08198583537337678,y:.11153519469971836},{x:.08336853920306012,y:.1100011842405046},{x:.15853253920306012,y:.04150018424050468},{x:.16051177365736521,y:.04002385498013544},{x:.16235580937568672,y:.038381768082408986},{x:.16403890527939927,y:.03739293492543645},{x:.16560363358955885,y:.03622578962650935},{x:.16783285515961555,y:.03516395710594637},{x:.16996181351033893,y:.03391317596960988},{x:.24512381351033893,y:-.0008318240303901436},{x:.24598297689097734,y:-.0011307574341723537},{x:.24678524554357095,y:-.0015595789630078807},{x:.25014222995258023,y:-.0025779090504023904},{x:.2534554494825366,y:-.0037306956028641883},{x:.25435642329373365,y:-.003856270624521421},{x:.2552269355092742,y:-.004120337618145342},{x:.2587180827488419,y:-.0044641856090968535},{x:.2621925371943035,y:-.004948444626188875},{x:.2631006975177666,y:-.004895835488062085},{x:.264006,y:-.0049849999999999756},{x:.376189,y:-.0049849999999999756},{x:.37722298297811335,y:-.004883161565438171},{x:.3782605578675134,y:-.004937293022731791},{x:.3816049041349026,y:-.004451580001305548},{x:.3849680644907258,y:-.004120337618145342},{x:.3859623120828546,y:-.003818735908388489},{x:.38699051078512875,y:-.003669406425619949},{x:.39017583846699794,y:-.0025405766534665605},{x:.39340975445642906,y:-.0015595789630078807},{x:.39432605828518835,y:-.0010698043626217065},{x:.39530536770082864,y:-.0007227525880688923},{x:.46934836770082866,y:.034022247411931134},{x:.4713599418403825,y:.035219651121148166},{x:.4734733873673339,y:.03622640539423388},{x:.4751409393435705,y:.037470316580519136},{x:.4769285933263682,y:.03853443023544684},{x:.47866791375766776,y:.04010126481479184},{x:.480392,y:.041387347763641016},{x:.480392,y:.04001500000000002},{x:.4812566623818546,y:.031235935509274233},{x:.48381742103699205,y:.022794245543570978},{x:.48797586744638544,y:.015014339514117927},{x:.4935721948466053,y:.008195194846605386},{x:.5003913395141178,y:.002598867446385482},{x:.508171245543571,y:-.0015595789630078807},{x:.5166129355092742,y:-.004120337618145342},{x:.525392,y:-.0049849999999999756},{x:.5341710644907257,y:-.004120337618145342},{x:.542612754456429,y:-.0015595789630078807},{x:.5503926604858821,y:.002598867446385489},{x:.5572118051533946,y:.008195194846605386},{x:.5628081325536145,y:.015014339514117927},{x:.5669665789630078,y:.022794245543570985},{x:.5695273376181453,y:.031235935509274254},{x:.570392,y:.04001500000000002},{x:.570392,y:.7597659999999999},{x:.5695273376181453,y:.7685450644907257},{x:.5669665789630078,y:.776986754456429},{x:.5628081325536145,y:.7847666604858821},{x:.5572118051533946,y:.7915858051533946},{x:.5503926604858821,y:.7971821325536145},{x:.542612754456429,y:.8013405789630078},{x:.5341710644907257,y:.8039013376181453},{x:.525392,y:.804766},{x:.5166129355092742,y:.8039013376181453},{x:.508171245543571,y:.8013405789630078},{x:.5003913395141178,y:.7971821325536145},{x:.4935721948466053,y:.7915858051533946},{x:.48797586744638544,y:.7847666604858821},{x:.48381742103699205,y:.776986754456429},{x:.4812566623818546,y:.7685450644907257},{x:.480392,y:.7597659999999999},{x:.480392,y:.5191356905079497},{x:.47846953719699326,y:.5205697307992189},{x:.47652758859363875,y:.5222806946221157},{x:.47494232329576636,y:.5232008177790934},{x:.47347310730786674,y:.524296763521154},{x:.4711365045177018,y:.5254097994515352},{x:.46889807742906475,y:.5267090322059679},{x:.3948550774290648,y:.5604630322059679},{x:.3941070109424522,y:.5607188876066146},{x:.39340975445642906,y:.5610915789630079},{x:.389939500808656,y:.5621442688983361},{x:.38650823937694867,y:.5633178367349442},{x:.38572463186561456,y:.5634228354140474},{x:.3849680644907258,y:.5636523376181454},{x:.38135912117525683,y:.5640077875099224},{x:.3777648387426725,y:.5644893996719887},{x:.3769758038038255,y:.5644395065891945},{x:.376189,y:.564517},{x:.264006,y:.564517},{x:.26334558239453953,y:.5644519545432365},{x:.2626835384795895,y:.5644975635305632},{x:.2589614482177297,y:.5640201550156564},{x:.2552269355092742,y:.5636523376181454},{x:.25459189738202526,y:.5634597009082802},{x:.2539336765832372,y:.5633752751711479},{x:.2503762430229788,y:.5621808961392286},{x:.24678524554357095,y:.5610915789630079},{x:.24619999105363047,y:.5607787539207695},{x:.24557088842716707,y:.5605675378929096},{x:.17040888842716706,y:.5268135378929095},{x:.16805407047382528,y:.5254644267942322},{x:.16560391365212207,y:.5242973792806265},{x:.16423565717286473,y:.5232767996121171},{x:.1627545512703112,y:.5224282514648534},{x:.16070817900232118,y:.5206456609648356},{x:.15853278093215223,y:.5190230360586235},{x:.08336878093215222,y:.45052303605862365},{x:.08193967718325436,y:.44893757139643337},{x:.08035717944512263,y:.44750518296134467},{x:.07899365114577664,y:.44566921514174185},{x:.07746249136223225,y:.4439705283033309},{x:.07637015625263606,y:.44213672358948825},{x:.0750975108858587,y:.44042312810321155},{x:.07411836195358443,y:.43835642671545355},{x:.07294802033824888,y:.4363916652130956},{x:.07223443169362759,y:.4343799925343442},{x:.07132054574594202,y:.4324510425104215},{x:.034301545745942026,y:.32920504251042143},{x:.033491210284420626,y:.32597904935505284},{x:.03252566238185464,y:.3227960644907258},{x:.03241858101312289,y:.3217088491086539},{x:.03215243067755317,y:.32064928896150824},{x:.031987025628206905,y:.31732719375391183},{x:.03166100000000001,y:.314017},{x:.03166100000000001,y:.24551500000000004}],[{x:.121661,y:.25340994514221},{x:.121661,y:.3061934402169761},{x:.15226243948714763,y:.39154086238640384},{x:.21383969339611897,y:.4476587099299689},{x:.27364661400534074,y:.474517},{x:.3664157334192352,y:.474517},{x:.42513971513426946,y:.4477464845048247},{x:.480392,y:.3973901578243758},{x:.480392,y:.1631336467554691},{x:.4249518651426514,y:.1126053780239199},{x:.3661556538885112,y:.08501500000000002},{x:.2739038430667855,y:.08501500000000002},{x:.21402588591940364,y:.11269467351967463},{x:.15220815290195538,y:.1690325018607451},{x:.121661,y:.25340994514221}]],e:[[{x:.014571,y:.25490100000000004},{x:.014880046743786594,y:.2517631957525991},{x:.01501248842711947,y:.2486129918567585},{x:.015311525398480692,y:.24738231945287367},{x:.015435662381854634,y:.24612193550927428},{x:.016350926120166094,y:.24310471531940006},{x:.01709539726614681,y:.24004087979874045},{x:.05693639726614681,y:.12616087979874036},{x:.057746546207777846,y:.12441615547982068},{x:.05835851556287996,y:.12259245107255745},{x:.05959975008908581,y:.12042512406141898},{x:.06065161969764369,y:.11815983382640528},{x:.06178658068373706,y:.11660668611395116},{x:.06274257829935428,y:.11493741297405176},{x:.06438278737670251,y:.11305388338712186},{x:.06585638180708843,y:.11103732964943176},{x:.06727253892344205,y:.10973544513901749},{x:.06853582634733585,y:.1082847524971091},{x:.14942282634733584,y:.031993752497109104},{x:.15144602889400902,y:.03043003785468449},{x:.15333307828862142,y:.02870446646813117},{x:.1549277151407192,y:.027739074573098352},{x:.15640262843323158,y:.02659912765300345},{x:.15869202130341495,y:.025460166585296706},{x:.1608794538505091,y:.024135896643135493},{x:.2417664538505091,y:-.01455910335686443},{x:.24290092295632487,y:-.014970686687880902},{x:.2439652455435709,y:-.015539578963007873},{x:.24703931387581265,y:-.016472087396775758},{x:.2500591116803148,y:-.017567664555291233},{x:.2512520782049556,y:-.01775001548484057},{x:.2524069355092742,y:-.018100337618145335},{x:.25560385985111694,y:-.01841520718300011},{x:.2587793695882151,y:-.01890059980751419},{x:.2599849884971624,y:-.018846710691637396},{x:.261186,y:-.018964999999999968},{x:.381914,y:-.018964999999999968},{x:.3832466926412995,y:-.01883374123151461},{x:.3845848263549422,y:-.018885671038862982},{x:.3876272824249201,y:-.01840229079619376},{x:.39069306449072577,y:-.018100337618145335},{x:.3919745425012029,y:-.017711605513551366},{x:.39329709535359264,y:-.017501480567117658},{x:.39618678867610163,y:-.016433834605858122},{x:.39913475445642904,y:-.015539578963007873},{x:.4003157713548023,y:-.014908312279081314},{x:.40157191838151796,y:-.014444207562717595},{x:.48125191838151804,y:.02425079243728233},{x:.4833189661071789,y:.02551885102394819},{x:.4854901362659954,y:.026598980192539007},{x:.48706966813422276,y:.027819770278194},{x:.48877129863032925,y:.028863658687316496},{x:.4905512426555404,y:.030510612890229178},{x:.492469971641239,y:.03199356196515255},{x:.573357971641239,y:.10828456196515254},{x:.5791512607417543,y:.11493718669263933},{x:.5835353707163221,y:.12259219773755695},{x:.5863418226772573,y:.13095541731842886},{x:.5874627662495775,y:.13970545159690978},{x:.5868551242004307,y:.1485060416627534},{x:.584542247872996,y:.15701898577515713},{x:.5806130198074609,y:.16491713626599536},{x:.5752184380348474,y:.17189697164123896},{x:.5685658133073607,y:.17769026074175415},{x:.560910802262443,y:.1820743707163221},{x:.5525475826815711,y:.18488082267725728},{x:.5437975484030901,y:.18600176624957743},{x:.5349969583372466,y:.1853941242004306},{x:.5264840142248428,y:.183081247872996},{x:.5185858637340046,y:.17915201980746093},{x:.511606028358761,y:.17375743803484736},{x:.43573388395098006,y:.1021972341849065},{x:.3715652104827451,y:.07103500000000003},{x:.2713955768569904,y:.07103500000000003},{x:.2060606884620834,y:.10229012760321096},{x:.13826613078700495,y:.16623259795801962},{x:.104571,y:.2625454790108076},{x:.104571,y:.28619200000000006},{x:.542482,y:.28619200000000006},{x:.5512610644907258,y:.2870566623818547},{x:.559702754456429,y:.2896174210369921},{x:.5674826604858821,y:.2937758674463855},{x:.5743018051533947,y:.2993721948466054},{x:.5798981325536146,y:.3061913395141179},{x:.5840565789630079,y:.31397124554357103},{x:.5866173376181454,y:.32241293550927425},{x:.5874820000000001,y:.33119200000000004},{x:.5866173376181454,y:.33997106449072584},{x:.5840565789630079,y:.34841275445642905},{x:.5798981325536146,y:.35619266048588216},{x:.5743018051533947,y:.3630118051533947},{x:.5674826604858821,y:.3686081325536146},{x:.5660433240263831,y:.3693774739195968},{x:.5706944449992851,y:.3724210772554575},{x:.5769918122169339,y:.3785986803904119},{x:.5819629867044116,y:.38588613801169297},{x:.5854169290140312,y:.3940033972097681},{x:.5872209060798271,y:.40263851626586683},{x:.5873055920748429,y:.4114596523972937},{x:.5856677325637826,y:.4201278142894682},{x:.5823702695691338,y:.4283098893420352},{x:.5425292695691338,y:.5045998893420351},{x:.54083893518448,y:.5071829952333479},{x:.5393041274419548,y:.5098614335042745},{x:.5384286685906833,y:.5108662746451583},{x:.5376989227445426,y:.5119814449992851},{x:.5355371287009763,y:.5141851493557908},{x:.5335092744740836,y:.5165126960496618},{x:.49246227447408364,y:.5552086960496617},{x:.4903478252727746,y:.5568421196453192},{x:.48836639942178184,y:.5586345815458318},{x:.486865329057947,y:.5595323670561179},{x:.4854811710293013,y:.5606016367187369},{x:.48308868524123094,y:.5617911659624512},{x:.4807956399629947,y:.5631626292028359},{x:.40111563996299465,y:.6007566292028359},{x:.40009264564938235,y:.6011215754533451},{x:.39913475445642904,y:.6016335789630078},{x:.3959457374462889,y:.6026009566970012},{x:.3928069722488333,y:.6037206897930685},{x:.3917324370025758,y:.603879047413643},{x:.39069306449072577,y:.6041943376181453},{x:.38737659751458814,y:.6045209811048129},{x:.38407969371999856,y:.6050068561303112},{x:.38299491132800306,y:.6049525395264004},{x:.381914,y:.605059},{x:.261186,y:.605059},{x:.26023449599616577,y:.6049652850353624},{x:.2592798763752433,y:.6050186117946668},{x:.25585213857488087,y:.6045336605029273},{x:.2524069355092742,y:.6041943376181453},{x:.2514919972706982,y:.6039167941377678},{x:.2505453168634681,y:.6037828591890964},{x:.24727805138745723,y:.6026385076291858},{x:.2439652455435709,y:.6016335789630078},{x:.24312203363365809,y:.6011828728071931},{x:.24221967283726598,y:.6008668231955117},{x:.161332672837266,y:.5632728231955116},{x:.15891596978001063,y:.5618462817840929},{x:.15640337688314435,y:.5605963413854953},{x:.1551260781006526,y:.5596091689500753},{x:.15373589412748892,y:.5587885654418143},{x:.1516439317651508,y:.5569179592459522},{x:.1494234689111216,y:.555201853544281},{x:.06853646891112161,y:.47891385354428107},{x:.06722863655802509,y:.4774120673763562},{x:.06576662511800205,y:.47605991734502884},{x:.06433886916992998,y:.4740937424536807},{x:.06274309028364713,y:.4722613067803989},{x:.06175337150959475,y:.4705332315776763},{x:.06058324359446483,y:.4689218384474283},{x:.05956650326928079,y:.4667149016876259},{x:.05835887729241062,y:.4646063547351938},{x:.05772530643484857,y:.4627183994585984},{x:.05689202940417486,y:.4609096881637455},{x:.017051029404174856,y:.3459246881637455},{x:.016331419439147486,y:.342923979771159},{x:.015435662381854634,y:.33997106449072584},{x:.015304912520774374,y:.33864353887302173},{x:.014993833838408223,y:.33734636893611664},{x:.014873460143664087,y:.33426292937408214},{x:.014571,y:.33119200000000004},{x:.014571,y:.25490100000000004}],[{x:.12278767041868709,y:.376192},{x:.13831799224413532,y:.421014018902617},{x:.20587340146207272,y:.4847284236699839},{x:.27113246747276615,y:.5150589999999999},{x:.37183117966561724,y:.5150589999999999},{x:.4359272756482788,y:.48481767680255794},{x:.4662598881310508,y:.45622238914125884},{x:.5025937304308662,y:.3866481106579649},{x:.5074240772554575,y:.379266555000715},{x:.5104401600015575,y:.376192},{x:.12278767041868709,y:.376192}]],f:[[{x:.044112,y:.5239119999999999},{x:.04497666238185463,y:.5151329355092742},{x:.04753742103699209,y:.5066912455435709},{x:.051695867446385456,y:.4989113395141178},{x:.05729219484660536,y:.49209219484660527},{x:.0641113395141179,y:.4864958674463854},{x:.07189124554357096,y:.482337421036992},{x:.08033293550927423,y:.47977666238185457},{x:.089112,y:.47891199999999995},{x:.20304699999999998,y:.47891199999999995},{x:.20304699999999998,y:.05318299999999998},{x:.20391166238185462,y:.04440393550927419},{x:.2064724210369921,y:.03596224554357094},{x:.21063086744638546,y:.028182339514117884},{x:.21622719484660535,y:.021363194846605343},{x:.2230463395141179,y:.01576686744638544},{x:.23082624554357095,y:.011608421036992077},{x:.23926793550927422,y:.009047662381854615},{x:.248047,y:.008182999999999982},{x:.25682606449072576,y:.009047662381854615},{x:.26526775445642903,y:.011608421036992077},{x:.2730476604858821,y:.015766867446385446},{x:.2798668051533946,y:.021363194846605343},{x:.28546313255361455,y:.028182339514117884},{x:.2896215789630079,y:.03596224554357094},{x:.2921823376181454,y:.04440393550927421},{x:.293047,y:.05318299999999998},{x:.293047,y:.47891199999999995},{x:.459965,y:.47891199999999995},{x:.4687440644907258,y:.47977666238185457},{x:.4771857544564291,y:.482337421036992},{x:.48496566048588213,y:.4864958674463854},{x:.4917848051533946,y:.49209219484660527},{x:.49738113255361455,y:.4989113395141178},{x:.5015395789630079,y:.5066912455435709},{x:.5041003376181454,y:.5151329355092742},{x:.504965,y:.5239119999999999},{x:.5041003376181454,y:.5326910644907257},{x:.5015395789630079,y:.5411327544564289},{x:.49738113255361455,y:.548912660485882},{x:.4917848051533946,y:.5557318051533946},{x:.48496566048588213,y:.5613281325536145},{x:.4771857544564291,y:.5654865789630078},{x:.4687440644907258,y:.5680473376181453},{x:.459965,y:.568912},{x:.293047,y:.568912},{x:.293047,y:.6141229501499061},{x:.3322669208002554,y:.6884371453882767},{x:.4140490730325775,y:.7147659999999999},{x:.512941,y:.7147659999999999},{x:.5217200644907257,y:.7156306623818546},{x:.530161754456429,y:.7181914210369921},{x:.5379416604858821,y:.7223498674463854},{x:.5447608051533946,y:.7279461948466053},{x:.5503571325536145,y:.7347653395141178},{x:.5545155789630078,y:.7425452455435709},{x:.5570763376181453,y:.7509869355092742},{x:.557941,y:.7597659999999999},{x:.5570763376181453,y:.7685450644907257},{x:.5545155789630078,y:.776986754456429},{x:.5503571325536145,y:.7847666604858821},{x:.5447608051533946,y:.7915858051533946},{x:.5379416604858821,y:.7971821325536145},{x:.530161754456429,y:.8013405789630078},{x:.5217200644907257,y:.8039013376181453},{x:.512941,y:.804766},{x:.406984,y:.804766},{x:.40440576588043703,y:.8045120661033809},{x:.40181542834229744,y:.8044681908525655},{x:.400026512750784,y:.8040807473169851},{x:.3982049355092742,y:.8039013376181453},{x:.39572578148103565,y:.8031492944655273},{x:.39319377618916257,y:.8026009124809075},{x:.2872357761891626,y:.7684889124809076},{x:.28342960508890525,y:.7668362808879404},{x:.2796044085190959,y:.7652281761559891},{x:.27938594032962494,y:.7650805300410848},{x:.27914407460343155,y:.764975512444704},{x:.2757334504432472,y:.7626120885587936},{x:.27229547962292316,y:.7602886242777711},{x:.2721100135665551,y:.7601011941121303},{x:.27189328313916555,y:.7599510087370087},{x:.2690092742928275,y:.7569676176126634},{x:.26609064851257996,y:.7540180832118794},{x:.26594531194585036,y:.7537980718316557},{x:.26576204564604555,y:.7536084902175343},{x:.26351548295615396,y:.7501197819025626},{x:.26122836336792754,y:.7466575263349163},{x:.2082493633679275,y:.6462725263349164},{x:.20745880379789322,y:.6443351468057326},{x:.2064724210369921,y:.6424897544564291},{x:.20579637196662365,y:.6402611193438609},{x:.20491647908027386,y:.6381048157198157},{x:.20451907388691828,y:.636050431873947},{x:.20391166238185462,y:.6340480644907258},{x:.20368338854657433,y:.6317303613460921},{x:.20324107652369047,y:.6294438319050109},{x:.20325209776572678,y:.6273513925615422},{x:.20304699999999998,y:.6252690000000001},{x:.20304699999999998,y:.568912},{x:.089112,y:.568912},{x:.0803329355092742,y:.5680473376181453},{x:.07189124554357093,y:.5654865789630078},{x:.0641113395141179,y:.5613281325536145},{x:.05729219484660536,y:.5557318051533946},{x:.051695867446385456,y:.548912660485882},{x:.04753742103699209,y:.5411327544564289},{x:.04497666238185463,y:.5326910644907257},{x:.044112,y:.5239119999999999}]],g:[[{x:.03166100000000001,y:.285331},{x:.03199195389402992,y:.28197076872347165},{x:.03216742697517915,y:.27859884139484714},{x:.032423533978450624,y:.2775888625904497},{x:.03252566238185464,y:.2765519355092742},{x:.03350580569139788,y:.2733208360362635},{x:.034335737494852386,y:.2700479324456657},{x:.07135573749485238,y:.1675239324456658},{x:.07223945098422414,y:.16566943556296815},{x:.07292365731738822,y:.16373243532732273},{x:.07413231799188957,y:.16169720247238553},{x:.07515058411631778,y:.15956034321175439},{x:.07637911169281072,y:.15791388391586245},{x:.07742806119285411,y:.15614758463046624},{x:.07901055202445481,y:.15438725620434748},{x:.0804261330120869,y:.15249010996133996},{x:.08195226304990277,y:.15111496075964967},{x:.08332564517579637,y:.14958724031548856},{x:.1584886451757964,y:.08090524031548854},{x:.16047116284778873,y:.07942238349974136},{x:.16231838489394151,y:.07777404756068641},{x:.16399482319868336,y:.07678680357956279},{x:.16555276842115366,y:.07562151273533077},{x:.16778648358567103,y:.07455391860853194},{x:.1699197861673149,y:.07329763012616651},{x:.2450797861673149,y:.038459630126166475},{x:.2459605302529857,y:.0381521715215269},{x:.24678324554357095,y:.03771242103699209},{x:.2501181687545519,y:.03670078314085588},{x:.253408434365457,y:.03555218561964517},{x:.254332237398671,y:.03542245939316866},{x:.2552249355092742,y:.03515166238185463},{x:.2586931398688001,y:.03481007406735549},{x:.26214426420887293,y:.034325445502994434},{x:.2630756249571383,y:.03437843696081321},{x:.264004,y:.034287},{x:.376189,y:.034287},{x:.37724627227682206,y:.03439113223027483},{x:.37830727432005307,y:.03433688416138392},{x:.3816280756224084,y:.03482270219101675},{x:.3849680644907258,y:.03515166238185463},{x:.38598470638687477,y:.035460057329467706},{x:.38703590484658207,y:.03561384285228289},{x:.39019811948723343,y:.036738182220129235},{x:.39340975445642906,y:.03771242103699209},{x:.39434669699397534,y:.038213227257056566},{x:.39534769490287125,y:.03856913648017993},{x:.4693886949028713,y:.07340713648017996},{x:.47140406041677185,y:.07460963544760885},{x:.47352148667564636,y:.07562166704766733},{x:.4751827197672129,y:.0768642309221422},{x:.47696422705836306,y:.07792719476830276},{x:.47870627197824944,y:.0794997663623443},{x:.480392,y:.08076065187723735},{x:.480392,y:.018480463023952315},{x:.44982106300216956,y:-.06618482166306154},{x:.42509763890365326,y:-.0887666681923909},{x:.3663917896728536,y:-.115601},{x:.27366828971008494,y:-.115601},{x:.21388478385740822,y:-.08868092320279419},{x:.15228882603575622,y:-.032396134475538775},{x:.11903308523020223,y:.0605977685009861},{x:.11526275900748023,y:.06857299605517989},{x:.11000898883421664,y:.07565942769130271},{x:.1034736741518217,y:.08158473581569503},{x:.09590796343849313,y:.08612121416008753},{x:.08760260271404471,y:.08909452840579157},{x:.07887676233341709,y:.09039041575379858},{x:.07006577144893004,y:.08995907598006667},{x:.061508231499013855,y:.08781708523020218},{x:.05353300394482007,y:.08404675900748018},{x:.046446572308697254,y:.07879298883421659},{x:.04052126418430494,y:.07225767415182165},{x:.035984785839912437,y:.06469196343849308},{x:.03301147159420839,y:.05638660271404467},{x:.03171558424620138,y:.04766076233341703},{x:.0321469240199333,y:.038849771448930016},{x:.03428891476979778,y:.030292231499013812},{x:.07130891476979778,y:-.07322776850098624},{x:.07221644299685706,y:-.07514742841768875},{x:.07292365731738822,y:-.07714956467267746},{x:.07409706350042253,y:-.07912543338941479},{x:.07507924099251978,y:-.08120299605518004},{x:.07634383839048098,y:-.08290872027080634},{x:.07742806119285414,y:-.08473441536953392},{x:.07896439356931816,y:-.08644339813281518},{x:.08033301116578337,y:-.08828942769130284},{x:.0819060799658371,y:-.08971566618082738},{x:.08332564517579637,y:-.09129475968451163},{x:.1584886451757964,y:-.15997675968451153},{x:.16066766565506738,y:-.1616065940183929},{x:.16271768036753925,y:-.16339598773796155},{x:.16419165994754753,y:-.1642424237156923},{x:.16555276842115366,y:-.1652604872646693},{x:.16800788453794988,y:-.16643389898185532},{x:.17036760218951646,y:-.1677889719724602},{x:.24552760218951647,y:-.2016329719724602},{x:.24617798725770038,y:-.20185206166908357},{x:.24678324554357095,y:-.2021755789630079},{x:.2503526828238078,y:-.20325835592431216},{x:.25388756161766735,y:-.20444912053505218},{x:.25456819199860076,y:-.20453711665220192},{x:.2552249355092742,y:-.20473633761814536},{x:.25893702635910487,y:-.20510194665533446},{x:.2626362900994872,y:-.20558021041579141},{x:.263321009549333,y:-.20553373131203426},{x:.264004,y:-.20560099999999998},{x:.376189,y:-.20560099999999998},{x:.3769985938815523,y:-.20552126196245651},{x:.37781053527049396,y:-.2055717752142049},{x:.38138177137190815,y:-.20508955666026785},{x:.3849680644907258,y:-.20473633761814536},{x:.3857465461334356,y:-.20450018779358015},{x:.38655274094280934,y:-.2043913285403334},{x:.3899612805709507,y:-.2032216620796743},{x:.39340975445642906,y:-.2021755789630079},{x:.39412720724734457,y:-.20179209245674457},{x:.39489667386274535,y:-.20152804409855607},{x:.4689376738627454,y:-.16768404409855608},{x:.471176129388074,y:-.16638175223486265},{x:.4735129313995788,y:-.16526550692304898},{x:.47497970384913024,y:-.16416890323360386},{x:.4765626813675205,y:-.163247956304222},{x:.47850406105855325,y:-.16153398660426738},{x:.480578193417323,y:-.15998330217620907},{x:.5187211934173229,y:-.125144302176209},{x:.5200982241105119,y:-.12361318710120846},{x:.5216280341275545,y:-.12223470670068204},{x:.5230406381933351,y:-.12034152832018923},{x:.5246201913815024,y:-.1185852292702623},{x:.52567205708302,y:-.11681488878073784},{x:.5269035440443172,y:-.11516444436572898},{x:.5279196645391884,y:-.1130320574948894},{x:.5291262301085498,y:-.11100134969861394},{x:.5298125082093796,y:-.10905981698676002},{x:.5306983467616347,y:-.10720083421055714},{x:.5677173467616347,y:-.0046778342105572215},{x:.5685472301626403,y:-.001405045768812418},{x:.5695273376181453,y:.0018259355092742052},{x:.5696294781899907,y:.002862986138707272},{x:.5698856101392306,y:.003873086692614168},{x:.5700610582123972,y:.007244891642088324},{x:.570392,y:.010604999999999976},{x:.570392,y:.560059},{x:.5695273376181453,y:.5688380644907257},{x:.5669665789630078,y:.577279754456429},{x:.5628081325536145,y:.5850596604858821},{x:.5572118051533946,y:.5918788051533946},{x:.5503926604858821,y:.5974751325536145},{x:.542612754456429,y:.6016335789630078},{x:.5341710644907257,y:.6041943376181453},{x:.525392,y:.605059},{x:.5166129355092742,y:.6041943376181453},{x:.508171245543571,y:.6016335789630078},{x:.5003913395141178,y:.5974751325536145},{x:.4935721948466053,y:.5918788051533946},{x:.48797586744638544,y:.5850596604858821},{x:.48381742103699205,y:.577279754456429},{x:.4812566623818546,y:.5688380644907257},{x:.480392,y:.560059},{x:.480392,y:.5595783858718113},{x:.47850787544975776,y:.5609876460911735},{x:.47656308903374583,y:.5627046621197919},{x:.47498407852937236,y:.5636233247252487},{x:.47352120750708176,y:.5647175018259646},{x:.47118052218859596,y:.5658362200595997},{x:.46893813108831367,y:.5671408350985324},{x:.39489713108831365,y:.6009858350985324},{x:.39412742928685096,y:.6012499737741558},{x:.39340975445642906,y:.6016335789630078},{x:.38996152003118717,y:.6026795894402057},{x:.3865532301567984,y:.60384921275647},{x:.38574678706033977,y:.6039581147092028},{x:.3849680644907258,y:.6041943376181453},{x:.38138202040224084,y:.6045475321329209},{x:.37781103767268465,y:.6050297570960106},{x:.3769988444371686,y:.6049792372848822},{x:.376189,y:.605059},{x:.264004,y:.605059},{x:.2633207613423033,y:.6049917068657756},{x:.2626357925427961,y:.6050381952835313},{x:.25893677979996554,y:.6045599223713788},{x:.2552249355092742,y:.6041943376181453},{x:.25456795333002863,y:.6039950442528821},{x:.2538870765735461,y:.6039070086250592},{x:.2503524457397967,y:.6027162840056636},{x:.24678324554357095,y:.6016335789630078},{x:.24617776729948443,y:.6013099440989677},{x:.24552714829793862,y:.6010907675853725},{x:.17036714829793861,y:.5672457675853725},{x:.16800780172583518,y:.5658908729822889},{x:.16555304759050302,y:.5647176561362495},{x:.1641916021742222,y:.563699355958929},{x:.16271727507130354,y:.5628526987282604},{x:.16066758950642807,y:.5610635523625588},{x:.15848888603577402,y:.5594339797745099},{x:.08332588603577401,y:.49075297977450993},{x:.08190615458499984,y:.48917372437901785},{x:.08033291862515302,y:.48774732555289924},{x:.07896444452212992,y:.48590147772545017},{x:.07742825448734617,y:.4841926782200152},{x:.07634390022195357,y:.48236679190821125},{x:.07507917015624571,y:.48066087782555583},{x:.0740970979464375,y:.4785835213931001},{x:.07292379561819572,y:.47660786018244516},{x:.07221648966449083,y:.47460551074132296},{x:.0713088683600783,y:.4726856387236396},{x:.034288868360078294,y:.36916463872363964},{x:.03348577523186824,y:.3659561323879453},{x:.03252566238185464,y:.3627910644907258},{x:.0324167369020588,y:.3616851255348066},{x:.032146903820267865,y:.36060709221327164},{x:.03198519043554786,y:.35730356073015046},{x:.03166100000000001,y:.354012},{x:.03166100000000001,y:.285331}],[{x:.121661,y:.29320659086815803},{x:.121661,y:.34620780969623244},{x:.15228882172599023,y:.4318540207415116},{x:.21388481974037543,y:.48813802669691503},{x:.2736685500834057,y:.5150589999999999},{x:.3663915263934284,y:.5150589999999999},{x:.4250929420729598,y:.48822590193711934},{x:.480392,y:.4376951204586189},{x:.480392,y:.20264468470162808},{x:.4249051037436742,y:.15194152341431572},{x:.3661311050032371,y:.124287},{x:.2739261218560311,y:.124287},{x:.21407100266628776,y:.15203091487935444},{x:.15223458736534265,y:.208535427414771},{x:.121661,y:.29320659086815803}]],h:[[{x:.047041,y:.05318299999999998},{x:.04790566238185463,y:.04440393550927419},{x:.050466421036992094,y:.03596224554357094},{x:.05462486744638546,y:.028182339514117884},{x:.06022119484660536,y:.021363194846605343},{x:.06704033951411792,y:.01576686744638544},{x:.07482024554357096,y:.011608421036992077},{x:.08326193550927423,y:.009047662381854615},{x:.092041,y:.008182999999999982},{x:.10082006449072577,y:.009047662381854615},{x:.10926175445642904,y:.011608421036992077},{x:.1170416604858821,y:.015766867446385446},{x:.12386080515339463,y:.021363194846605343},{x:.12945713255361452,y:.028182339514117884},{x:.1336155789630079,y:.03596224554357094},{x:.13617633761814535,y:.04440393550927421},{x:.137041,y:.05318299999999998},{x:.137041,y:.3692271498339558},{x:.23047284680205596,y:.45237128863270537},{x:.2915669774325256,y:.478914},{x:.38669764440631527,y:.478914},{x:.43644054132690624,y:.4571557093088599},{x:.465011,y:.38123324165433015},{x:.465011,y:.05318299999999998},{x:.4658756623818546,y:.04440393550927419},{x:.46843642103699207,y:.03596224554357094},{x:.47259486744638546,y:.028182339514117884},{x:.4781911948466053,y:.021363194846605343},{x:.4850103395141179,y:.01576686744638544},{x:.492790245543571,y:.011608421036992077},{x:.5012319355092743,y:.009047662381854615},{x:.510011,y:.008182999999999982},{x:.5187900644907257,y:.009047662381854615},{x:.527231754456429,y:.011608421036992077},{x:.5350116604858821,y:.015766867446385446},{x:.5418308051533947,y:.021363194846605343},{x:.5474271325536145,y:.028182339514117884},{x:.5515855789630079,y:.03596224554357094},{x:.5541463376181454,y:.04440393550927421},{x:.555011,y:.05318299999999998},{x:.555011,y:.38942},{x:.5546506186962206,y:.39307901278178137},{x:.554410350301749,y:.3967478709583736},{x:.5542188683658584,y:.3974626474508545},{x:.5541463376181454,y:.3981990644907258},{x:.5530790429582076,y:.40171746346329923},{x:.5521276325304605,y:.40526895152034226},{x:.5139866325304605,y:.5066239515203422},{x:.5138553396770835,y:.5068902237569821},{x:.5137747554395128,y:.50717595947055},{x:.511905898744729,y:.5108438433478746},{x:.5100853961903059,y:.5145359657635786},{x:.5099046789559015,y:.5147715076888114},{x:.5097698988494882,y:.5150360318659072},{x:.5072213830653152,y:.5182688425286295},{x:.504715563605999,y:.5215348594178236},{x:.5044923668525381,y:.521730619287556},{x:.5043085704011859,y:.5219637664124008},{x:.5011783335599848,y:.5246372687597332},{x:.4980834944323178,y:.5273516689249697},{x:.497826395485866,y:.5275001237971909},{x:.49760064588412606,y:.5276929341565276},{x:.49400898123224624,y:.5297043869925788},{x:.49044405536829966,y:.5317628575577613},{x:.490162934397186,y:.5318583023949868},{x:.48990390707565157,y:.532003366394835},{x:.41414290707565155,y:.5651423663948351},{x:.41372099607879415,y:.5652794559590063},{x:.41332975445642905,y:.5654885789630079},{x:.40952975949805703,y:.5666412948313546},{x:.4057531353317914,y:.5678684156337233},{x:.40531258638921414,y:.5679205603081202},{x:.4048880644907258,y:.5680493376181454},{x:.4009362016599996,y:.5684385621342186},{x:.39699274487562397,y:.5689053213297277},{x:.39655048803612764,y:.5688705172237564},{x:.396109,y:.568914},{x:.282214,y:.568914},{x:.28182836168040026,y:.5688760179407144},{x:.2814421286004882,y:.5689073796745989},{x:.27744221175957573,y:.5684440198796774},{x:.2734349355092742,y:.5680493376181454},{x:.2730641170540284,y:.5679368510695262},{x:.2726791869636831,y:.5678922598605547},{x:.26884652441488044,y:.5666574583296339},{x:.26499324554357095,y:.5654885789630079},{x:.2646514972979566,y:.5653059107200353},{x:.264282662844679,y:.5651870801833616},{x:.18800566284467896,y:.5320480801833616},{x:.1856267698486466,y:.5307235797343987},{x:.1831549202301779,y:.529581917442145},{x:.18178185218619736,y:.5285828381463435},{x:.18029822995654404,y:.527756799180932},{x:.17822344394147954,y:.5259936496360635},{x:.17602181748454487,y:.5243916901265875},{x:.137041,y:.4897030201456747},{x:.137041,y:.7597659999999999},{x:.13617633761814535,y:.7685450644907257},{x:.1336155789630079,y:.776986754456429},{x:.12945713255361452,y:.7847666604858821},{x:.12386080515339463,y:.7915858051533946},{x:.11704166048588208,y:.7971821325536145},{x:.10926175445642904,y:.8013405789630078},{x:.10082006449072577,y:.8039013376181453},{x:.092041,y:.804766},{x:.08326193550927423,y:.8039013376181453},{x:.07482024554357093,y:.8013405789630078},{x:.06704033951411792,y:.7971821325536145},{x:.06022119484660536,y:.7915858051533946},{x:.05462486744638546,y:.7847666604858821},{x:.050466421036992094,y:.776986754456429},{x:.04790566238185463,y:.7685450644907257},{x:.047041,y:.7597659999999999},{x:.047041,y:.05318299999999998}]],i:[[{x:.216026,y:.7597659999999999},{x:.21689066238185462,y:.7509869355092742},{x:.21945142103699208,y:.7425452455435709},{x:.22360986744638545,y:.7347653395141178},{x:.22920619484660534,y:.7279461948466053},{x:.2360253395141179,y:.7223498674463854},{x:.24380524554357094,y:.7181914210369921},{x:.25224693550927424,y:.7156306623818546},{x:.261026,y:.7147659999999999},{x:.341026,y:.7147659999999999},{x:.3498050644907258,y:.7156306623818546},{x:.35824675445642906,y:.7181914210369921},{x:.3660266604858821,y:.7223498674463854},{x:.3728458051533946,y:.7279461948466053},{x:.37844213255361453,y:.7347653395141178},{x:.3826005789630079,y:.7425452455435709},{x:.38516133761814536,y:.7509869355092742},{x:.386026,y:.7597659999999999},{x:.38516133761814536,y:.7685450644907257},{x:.3826005789630079,y:.776986754456429},{x:.37844213255361453,y:.7847666604858821},{x:.3728458051533946,y:.7915858051533946},{x:.3660266604858821,y:.7971821325536145},{x:.35824675445642906,y:.8013405789630078},{x:.3498050644907258,y:.8039013376181453},{x:.341026,y:.804766},{x:.261026,y:.804766},{x:.25224693550927424,y:.8039013376181453},{x:.24380524554357094,y:.8013405789630078},{x:.2360253395141179,y:.7971821325536145},{x:.22920619484660534,y:.7915858051533946},{x:.22360986744638545,y:.7847666604858821},{x:.21945142103699208,y:.776986754456429},{x:.21689066238185462,y:.7685450644907257},{x:.216026,y:.7597659999999999}],[{x:.25597800000000004,y:.05318299999999998},{x:.25684266238185466,y:.04440393550927419},{x:.2594034210369921,y:.03596224554357094},{x:.2635618674463855,y:.028182339514117884},{x:.2691581948466054,y:.021363194846605343},{x:.27597733951411796,y:.01576686744638544},{x:.28375724554357096,y:.011608421036992077},{x:.2921989355092742,y:.009047662381854615},{x:.300978,y:.008182999999999982},{x:.3097570644907258,y:.009047662381854615},{x:.3181987544564291,y:.011608421036992077},{x:.32597866048588214,y:.015766867446385446},{x:.33279780515339463,y:.021363194846605343},{x:.33839413255361456,y:.028182339514117884},{x:.34255257896300795,y:.03596224554357094},{x:.3451133376181454,y:.04440393550927421},{x:.345978,y:.05318299999999998},{x:.345978,y:.523911},{x:.3451133376181454,y:.5326900644907258},{x:.34255257896300795,y:.541131754456429},{x:.33839413255361456,y:.5489116604858821},{x:.33279780515339463,y:.5557308051533947},{x:.32597866048588214,y:.5613271325536145},{x:.3181987544564291,y:.5654855789630079},{x:.3097570644907258,y:.5680463376181454},{x:.300978,y:.5689110000000001},{x:.2921989355092742,y:.5680463376181454},{x:.28375724554357096,y:.5654855789630079},{x:.27597733951411796,y:.5613271325536145},{x:.2691581948466054,y:.5557308051533947},{x:.2635618674463855,y:.5489116604858821},{x:.2594034210369921,y:.541131754456429},{x:.25684266238185466,y:.5326900644907258},{x:.25597800000000004,y:.523911},{x:.25597800000000004,y:.05318299999999998}]],j:[[{x:.11017199870220953,y:-.1121580749666587},{x:.11173080987432929,y:-.12084080046598154},{x:.114953584640513,y:-.12905258085596802},{x:.11971647357384912,y:-.1364778420214504},{x:.12583644152368842,y:-.14283123533997366},{x:.1330783015538362,y:-.147868603469331},{x:.14116375304461573,y:-.15139636317729976},{x:.23896575304461573,y:-.18307436317729964},{x:.2424293887998465,y:-.18383095770413346},{x:.24586120600074532,y:-.1847208108507566},{x:.24673197042105502,y:-.1847708110651418},{x:.2475840766296098,y:-.18495694463669302},{x:.2511287638648936,y:-.18502327959701073},{x:.25466824139749206,y:-.18522652014211538},{x:.25553202888155596,y:-.18510568190524296},{x:.2564040749666586,y:-.1851220012977904},{x:.25989359333942796,y:-.1844955274762681},{x:.2634047110671092,y:-.18400434499968443},{x:.3944597110671092,y:-.15232634499968456},{x:.39510744613291976,y:-.15210060706564532},{x:.39578357398914765,y:-.1519849807175323},{x:.3992672661785621,y:-.15065089524264363},{x:.4027898773796621,y:-.14942325292878383},{x:.40338112711156726,y:-.1490754856432793},{x:.40402170577913904,y:-.1488301750218278},{x:.4071781926350792,y:-.14684208899421944},{x:.4103936167153703,y:-.14495080812962524},{x:.41090565971774945,y:-.14449437599440731},{x:.41148607211771127,y:-.14412880824922783},{x:.41419405162048195,y:-.14156312270000898},{x:.41697872163578864,y:-.1390808841476645},{x:.4173918803832174,y:-.13853332759371953},{x:.41788982159253774,y:-.13806155128824654},{x:.42004522760849955,y:-.13501686407422092},{x:.422292130251795,y:-.13203905886963707},{x:.4225905272853119,y:-.13142142018825975},{x:.42298686170256505,y:-.13086156542133753},{x:.4245068631872901,y:-.12745488216466036},{x:.4261296512500701,y:-.1240959456918764},{x:.4263018193390199,y:-.1234319603912164},{x:.42658131605481786,y:-.12280554206756752},{x:.4588533160548179,y:-.025908542067567514},{x:.4594769463166796,y:-.023162642495487502},{x:.46029433761814537,y:-.02046806449072583},{x:.46045163429328767,y:-.01887100454660151},{x:.46080705178433234,y:-.017306069686551954},{x:.4608830007338393,y:-.01449126757618431},{x:.461159,y:-.01168900000000006},{x:.461159,y:.534292},{x:.46029433761814537,y:.5430710644907257},{x:.4577335789630079,y:.551512754456429},{x:.45357513255361454,y:.5592926604858821},{x:.4479788051533946,y:.5661118051533947},{x:.4411596604858821,y:.5717081325536145},{x:.43337975445642907,y:.5758665789630079},{x:.4249380644907258,y:.5784273376181454},{x:.416159,y:.579292},{x:.4073799355092742,y:.5784273376181454},{x:.39893824554357094,y:.5758665789630079},{x:.39115833951411794,y:.5717081325536145},{x:.3843391948466054,y:.5661118051533947},{x:.37874286744638547,y:.5592926604858821},{x:.3745844210369921,y:.551512754456429},{x:.37202366238185464,y:.5430710644907257},{x:.371159,y:.534292},{x:.371159,y:-.004392296840350002},{x:.3490732119536395,y:-.07070509444595838},{x:.254610065464387,y:-.09353828321774525},{x:.16889624695538427,y:-.06577563682270039},{x:.16027792337039018,y:-.063893055363307},{x:.15145792503334138,y:-.0637279987022096},{x:.14277519953401854,y:-.06528680987432936},{x:.13456341914403205,y:-.06850958464051307},{x:.12713815797854966,y:-.0732724735738492},{x:.12078476466002638,y:-.07939244152368852},{x:.11574739653066908,y:-.08663430155383627},{x:.11221963682270032,y:-.0947197530446158},{x:.11033705536330693,y:-.10333807662960988},{x:.11017199870220953,y:-.1121580749666587}],[{x:.3403,y:.7597659999999999},{x:.3411646623818546,y:.7509869355092742},{x:.34372542103699205,y:.7425452455435709},{x:.34788386744638544,y:.7347653395141178},{x:.3534801948466053,y:.7279461948466053},{x:.3602993395141179,y:.7223498674463854},{x:.36807924554357097,y:.7181914210369921},{x:.37652093550927423,y:.7156306623818546},{x:.3853,y:.7147659999999999},{x:.447023,y:.7147659999999999},{x:.4558020644907258,y:.7156306623818546},{x:.46424375445642907,y:.7181914210369921},{x:.4720236604858821,y:.7223498674463854},{x:.4788428051533946,y:.7279461948466053},{x:.48443913255361454,y:.7347653395141178},{x:.48859757896300793,y:.7425452455435709},{x:.49115833761814537,y:.7509869355092742},{x:.492023,y:.7597659999999999},{x:.49115833761814537,y:.7685450644907257},{x:.48859757896300793,y:.776986754456429},{x:.48443913255361454,y:.7847666604858821},{x:.4788428051533946,y:.7915858051533946},{x:.4720236604858821,y:.7971821325536145},{x:.46424375445642907,y:.8013405789630078},{x:.4558020644907258,y:.8039013376181453},{x:.447023,y:.804766},{x:.3853,y:.804766},{x:.37652093550927423,y:.8039013376181453},{x:.36807924554357097,y:.8013405789630078},{x:.3602993395141179,y:.7971821325536145},{x:.3534801948466053,y:.7915858051533946},{x:.34788386744638544,y:.7847666604858821},{x:.34372542103699205,y:.776986754456429},{x:.3411646623818546,y:.7685450644907257},{x:.3403,y:.7597659999999999}]],k:[[{x:.020185999999999996,y:.05318299999999998},{x:.02105066238185463,y:.04440393550927419},{x:.02361142103699209,y:.03596224554357094},{x:.027769867446385453,y:.028182339514117884},{x:.03336619484660536,y:.021363194846605343},{x:.04018533951411791,y:.01576686744638544},{x:.047965245543570956,y:.011608421036992077},{x:.056406935509274225,y:.009047662381854615},{x:.065186,y:.008182999999999982},{x:.07396506449072576,y:.009047662381854615},{x:.08240675445642903,y:.011608421036992077},{x:.0901866604858821,y:.015766867446385446},{x:.09700580515339463,y:.021363194846605343},{x:.10260213255361453,y:.028182339514117884},{x:.10676057896300789,y:.03596224554357094},{x:.10932133761814536,y:.04440393550927421},{x:.11018599999999999,y:.05318299999999998},{x:.11018599999999999,y:.16578332733911408},{x:.23477705990096162,y:.26351643594805596},{x:.5068321321577423,y:.019673199736523116},{x:.5139466814455551,y:.014457569113271652},{x:.5219420457215526,y:.010730135081525344},{x:.5305109676204599,y:.008634140840755075},{x:.539324148279209,y:.008250134274186548},{x:.5480429021075728,y:.009592872538819623},{x:.5563321722854605,y:.012610754956160736},{x:.5638734068086124,y:.017187805997359452},{x:.5703768002634768,y:.02314813215774228},{x:.5755924308867283,y:.030262681445555134},{x:.5793198649184746,y:.03825804572155257},{x:.5814158591592449,y:.04682696762045996},{x:.5817998657258134,y:.05564014827920904},{x:.5804571274611804,y:.06435890210757275},{x:.5774392450438393,y:.07264817228546054},{x:.5728621940026405,y:.08018940680861247},{x:.5669018678422577,y:.08669280026347684},{x:.3066862956724008,y:.3199242805817128},{x:.5215978711622948,y:.4885076152557163},{x:.5279716470169837,y:.49460635247919954},{x:.533033147947031,y:.5018313661609891},{x:.5365878633102175,y:.5099050030771282},{x:.5384991873886431,y:.5185169978886772},{x:.5386936690698568,y:.5273363964646907},{x:.5371638345319164,y:.5360242742638681},{x:.5339684744581735,y:.5442467610146052},{x:.5292303847442837,y:.5516878711622948},{x:.5231316475208004,y:.5580616470169838},{x:.5159066338390108,y:.5631231479470311},{x:.5078329969228718,y:.5666778633102175},{x:.4992210021113228,y:.5685891873886431},{x:.49040160353530926,y:.5687836690698569},{x:.4817137257361318,y:.5672538345319164},{x:.47349123898539475,y:.5640584744581736},{x:.46605012883770514,y:.5593203847442837},{x:.11018599999999999,y:.28016947631338524},{x:.11018599999999999,y:.7597659999999999},{x:.10932133761814536,y:.7685450644907257},{x:.10676057896300789,y:.776986754456429},{x:.10260213255361453,y:.7847666604858821},{x:.09700580515339463,y:.7915858051533946},{x:.09018666048588207,y:.7971821325536145},{x:.08240675445642903,y:.8013405789630078},{x:.07396506449072576,y:.8039013376181453},{x:.065186,y:.804766},{x:.056406935509274204,y:.8039013376181453},{x:.04796524554357093,y:.8013405789630078},{x:.04018533951411791,y:.7971821325536145},{x:.03336619484660536,y:.7915858051533946},{x:.027769867446385453,y:.7847666604858821},{x:.02361142103699209,y:.776986754456429},{x:.02105066238185463,y:.7685450644907257},{x:.020185999999999996,y:.7597659999999999},{x:.020185999999999996,y:.05318299999999998}]],l:[[{x:.25602600000000003,y:.05355900000000002},{x:.25689066238185465,y:.044779935509274234},{x:.2594514210369921,y:.036338245543570985},{x:.2636098674463855,y:.028558339514117927},{x:.26920619484660535,y:.021739194846605386},{x:.27602533951411795,y:.016142867446385482},{x:.283805245543571,y:.01198442103699212},{x:.2922469355092743,y:.009423662381854658},{x:.301026,y:.008559000000000025},{x:.3098050644907258,y:.009423662381854658},{x:.3182467544564291,y:.01198442103699212},{x:.32602666048588214,y:.01614286744638549},{x:.3328458051533947,y:.021739194846605386},{x:.33844213255361455,y:.028558339514117927},{x:.34260057896300794,y:.036338245543570985},{x:.3451613376181454,y:.044779935509274255},{x:.346026,y:.05355900000000002},{x:.346026,y:.765137},{x:.3451613376181454,y:.7739160644907257},{x:.34260057896300794,y:.782357754456429},{x:.33844213255361455,y:.7901376604858821},{x:.3328458051533947,y:.7969568051533946},{x:.32602666048588214,y:.8025531325536145},{x:.3182467544564291,y:.8067115789630078},{x:.3098050644907258,y:.8092723376181453},{x:.301026,y:.810137},{x:.2922469355092743,y:.8092723376181453},{x:.283805245543571,y:.8067115789630078},{x:.27602533951411795,y:.8025531325536145},{x:.26920619484660535,y:.7969568051533946},{x:.2636098674463855,y:.7901376604858821},{x:.2594514210369921,y:.782357754456429},{x:.25689066238185465,y:.7739160644907257},{x:.25602600000000003,y:.765137},{x:.25602600000000003,y:.05355900000000002}]],m:[[{x:.005538000000000001,y:.03920400000000002},{x:.006402662381854635,y:.030424935509274227},{x:.008963421036992096,y:.02198324554357097},{x:.013121867446385459,y:.01420333951411792},{x:.018718194846605363,y:.00738419484660538},{x:.025537339514117914,y:.0017878674463854757},{x:.03331724554357096,y:-.002370578963007887},{x:.04175893550927423,y:-.004931337618145348},{x:.050538,y:-.005795999999999982},{x:.059317064490725775,y:-.004931337618145348},{x:.06775875445642904,y:-.002370578963007887},{x:.0755386604858821,y:.0017878674463854827},{x:.08235780515339464,y:.00738419484660538},{x:.08795413255361453,y:.01420333951411792},{x:.0921125789630079,y:.02198324554357098},{x:.09467333761814536,y:.030424935509274248},{x:.095538,y:.03920400000000002},{x:.095538,y:.3993271266071161},{x:.14963521853994496,y:.4943223065353007},{x:.1738257653562211,y:.5150589999999999},{x:.22021623464377893,y:.5150589999999999},{x:.2416666625786254,y:.49667119950297894},{x:.27741,y:.4029520066676719},{x:.27741,y:.03920400000000002},{x:.2782746623818546,y:.030424935509274227},{x:.28083542103699205,y:.02198324554357097},{x:.28499386744638544,y:.01420333951411792},{x:.2905901948466053,y:.00738419484660538},{x:.2974093395141179,y:.0017878674463854757},{x:.30518924554357096,y:-.002370578963007887},{x:.31363093550927423,y:-.004931337618145348},{x:.32241,y:-.005795999999999982},{x:.33118906449072577,y:-.004931337618145348},{x:.33963075445642904,y:-.002370578963007887},{x:.3474106604858821,y:.0017878674463854827},{x:.35422980515339464,y:.00738419484660538},{x:.3598261325536145,y:.01420333951411792},{x:.3639845789630079,y:.02198324554357098},{x:.36654533761814534,y:.030424935509274248},{x:.36740999999999996,y:.03920400000000002},{x:.36740999999999996,y:.3993264781598986},{x:.4215891088917321,y:.494459500052724},{x:.445289826307752,y:.5150589999999999},{x:.4920928256254945,y:.5150589999999999},{x:.5065149999999999,y:.5026965582556255},{x:.5065149999999999,y:.03920400000000002},{x:.5073796623818546,y:.030424935509274227},{x:.5099404210369921,y:.02198324554357097},{x:.5140988674463854,y:.01420333951411792},{x:.5196951948466053,y:.00738419484660538},{x:.5265143395141179,y:.0017878674463854757},{x:.534294245543571,y:-.002370578963007887},{x:.5427359355092742,y:-.004931337618145348},{x:.551515,y:-.005795999999999982},{x:.5602940644907257,y:-.004931337618145348},{x:.568735754456429,y:-.002370578963007887},{x:.5765156604858821,y:.0017878674463854827},{x:.5833348051533946,y:.00738419484660538},{x:.5889311325536145,y:.01420333951411792},{x:.5930895789630078,y:.02198324554357098},{x:.5956503376181453,y:.030424935509274248},{x:.596515,y:.03920400000000002},{x:.596515,y:.523393},{x:.5963454778388272,y:.5251141873868636},{x:.5963825315707437,y:.5268433058919912},{x:.5959141404350922,y:.5294936295415332},{x:.5956503376181453,y:.5321720644907257},{x:.5951482857762117,y:.5338271076115645},{x:.59484729324509,y:.5355302304139588},{x:.5938708496195351,y:.5380382502602514},{x:.5930895789630078,y:.540613754456429},{x:.592274291011045,y:.5421390509322689},{x:.5916468191910574,y:.543750727977755},{x:.5901998472565338,y:.5460200622246176},{x:.5889311325536145,y:.5483936604858821},{x:.5878339395503975,y:.5497305940285525},{x:.5869041018316961,y:.5511888894721116},{x:.5850422079081763,y:.5531323288770946},{x:.5833348051533946,y:.5552128051533947},{x:.581997871610724,y:.5563099981566119},{x:.5808014011353795,y:.5575588705221693},{x:.5380264011353795,y:.5942248705221693},{x:.5358211367621821,y:.5957677297988329},{x:.5337406604858821,y:.5974751325536145},{x:.5322153640100423,y:.5982904205055773},{x:.5307982404674333,y:.599281876328501},{x:.5283343527176928,y:.600364864260089},{x:.525960754456429,y:.6016335789630078},{x:.5243057113355902,y:.6021356308049415},{x:.5227223939887274,y:.6028315689939708},{x:.5200945686869033,y:.6034130669616181},{x:.5175190644907257,y:.6041943376181453},{x:.5157978771038628,y:.6043638597793182},{x:.5141092119504517,y:.6047375358201355},{x:.5114184349491921,y:.6047951971830532},{x:.50874,y:.605059},{x:.428467,y:.605059},{x:.42563553135621585,y:.6047801246797119},{x:.42279150043448566,y:.6046996620098968},{x:.4212557149999115,y:.6043487504203328},{x:.4196879355092742,y:.6041943376181453},{x:.41696527861756566,y:.6033684286794448},{x:.4141915924406847,y:.6027346691689239},{x:.4127537761476033,y:.6020908833721776},{x:.4112462455435709,y:.6016335789630078},{x:.40873703058140176,y:.6002923756232341},{x:.4061402803536474,y:.5991296742945802},{x:.40485568767586616,y:.5982177546177817},{x:.4034663395141179,y:.5974751325536145},{x:.4012669942053008,y:.5956701765049598},{x:.3989469715816508,y:.5940232153181825},{x:.3567609715816508,y:.5573572153181825},{x:.3545792701559384,y:.5550484712393128},{x:.3522737143614353,y:.552863400803129},{x:.35155574109793963,y:.5518488790642903},{x:.35070210094674875,y:.5509455305944583},{x:.3490127339279754,y:.5482555195520005},{x:.34717776483660073,y:.5456626430091704},{x:.33048446785976626,y:.5163509060824124},{x:.3216828574856715,y:.5394287684036221},{x:.32062739498214626,y:.5415455848316745},{x:.31976928952310246,y:.5437498007710907},{x:.3186639603788477,y:.5454834136126945},{x:.31774653490223986,y:.5473233854865517},{x:.3162983824161672,y:.5491936173608123},{x:.31502674401548947,y:.5511880718386934},{x:.3136044423732838,y:.5526727347769701},{x:.3123456842645886,y:.5542983712755478},{x:.3105604934838748,y:.5558501466339272},{x:.30892419049215825,y:.5575581938831911},{x:.2661511904921582,y:.594224193883191},{x:.26394553725639397,y:.5957674011217274},{x:.2618646604858821,y:.5974751325536145},{x:.26033982189406285,y:.5982901757614695},{x:.258923146662659,y:.5992813666868191},{x:.25645880963824363,y:.6003646200309664},{x:.25408475445642903,y:.6016335789630078},{x:.25243020816870526,y:.6021354800922637},{x:.25084738219782576,y:.6028312459348294},{x:.24821906447459133,y:.6034129165660671},{x:.24564306449072576,y:.6041943376181453},{x:.24392239379305308,y:.6043638088898747},{x:.2422342441971012,y:.6047374117585159},{x:.2395429505511757,y:.6047951464006902},{x:.236864,y:.605059},{x:.157178,y:.605059},{x:.1544990494488241,y:.6047951464006902},{x:.1518077558028988,y:.6047374117585159},{x:.15011960620694695,y:.6043638088898747},{x:.14839893550927424,y:.6041943376181453},{x:.14582293552540848,y:.6034129165660671},{x:.1431946178021742,y:.6028312459348294},{x:.1416117918312948,y:.6021354800922637},{x:.13995724554357097,y:.6016335789630078},{x:.13758319036175665,y:.6003646200309664},{x:.135118853337341,y:.5992813666868191},{x:.13370217810593676,y:.5982901757614691},{x:.13217733951411792,y:.5974751325536145},{x:.13009646274360603,y:.5957674011217274},{x:.1278908095078418,y:.594224193883191},{x:.09495385911112918,y:.5659898819750746},{x:.09467333761814536,y:.5688380644907257},{x:.0921125789630079,y:.577279754456429},{x:.08795413255361453,y:.5850596604858821},{x:.08235780515339464,y:.5918788051533946},{x:.07553866048588208,y:.5974751325536145},{x:.06775875445642904,y:.6016335789630078},{x:.059317064490725775,y:.6041943376181453},{x:.050538,y:.605059},{x:.04175893550927421,y:.6041943376181453},{x:.033317245543570934,y:.6016335789630078},{x:.025537339514117904,y:.5974751325536145},{x:.018718194846605356,y:.5918788051533946},{x:.013121867446385459,y:.5850596604858821},{x:.008963421036992096,y:.577279754456429},{x:.006402662381854635,y:.5688380644907257},{x:.005538000000000001,y:.560059},{x:.005538000000000001,y:.03920400000000002}]],n:[[{x:.047041,y:.03920400000000002},{x:.04790566238185463,y:.030424935509274227},{x:.050466421036992094,y:.02198324554357097},{x:.05462486744638546,y:.01420333951411792},{x:.06022119484660536,y:.00738419484660538},{x:.06704033951411792,y:.0017878674463854757},{x:.07482024554357096,y:-.002370578963007887},{x:.08326193550927423,y:-.004931337618145348},{x:.092041,y:-.005795999999999982},{x:.10082006449072577,y:-.004931337618145348},{x:.10926175445642904,y:-.002370578963007887},{x:.1170416604858821,y:.0017878674463854827},{x:.12386080515339463,y:.00738419484660538},{x:.12945713255361452,y:.01420333951411792},{x:.1336155789630079,y:.02198324554357098},{x:.13617633761814535,y:.030424935509274248},{x:.137041,y:.03920400000000002},{x:.137041,y:.3923986904044417},{x:.23217657812189968,y:.4860775193429304},{x:.29246969284729285,y:.5150589999999999},{x:.3857956927587408,y:.5150589999999999},{x:.4353266752666751,y:.4910865745843881},{x:.465011,y:.4037995608673687},{x:.465011,y:.03920400000000002},{x:.4658756623818546,y:.030424935509274227},{x:.46843642103699207,y:.02198324554357097},{x:.47259486744638546,y:.01420333951411792},{x:.4781911948466053,y:.00738419484660538},{x:.4850103395141179,y:.0017878674463854757},{x:.492790245543571,y:-.002370578963007887},{x:.5012319355092743,y:-.004931337618145348},{x:.510011,y:-.005795999999999982},{x:.5187900644907257,y:-.004931337618145348},{x:.527231754456429,y:-.002370578963007887},{x:.5350116604858821,y:.0017878674463854827},{x:.5418308051533947,y:.00738419484660538},{x:.5474271325536145,y:.01420333951411792},{x:.5515855789630079,y:.02198324554357098},{x:.5541463376181454,y:.030424935509274248},{x:.555011,y:.03920400000000002},{x:.555011,y:.411242},{x:.5547211401667089,y:.41418499627592825},{x:.5546227314347089,y:.4171405946120584},{x:.5542897326303223,y:.4185651504993601},{x:.5541463376181454,y:.4200210644907258},{x:.5532878972691104,y:.42285096307022063},{x:.5526147708021555,y:.4257305718218671},{x:.5144747708021555,y:.537881571821867},{x:.5144109474804813,y:.5380222238814931},{x:.5143747633675698,y:.5381723808934484},{x:.5125889395552703,y:.5420375142269895},{x:.5108295711501452,y:.5459147613418461},{x:.5107395343200961,y:.546040259499208},{x:.5106747512949527,y:.5461804721160435},{x:.5081691914797779,y:.5496229410537735},{x:.5056872154570532,y:.5530824522038071},{x:.5055744251835149,y:.5531879736350976},{x:.505483532821465,y:.5533128535645805},{x:.5023545242619802,y:.5562003659557777},{x:.4992453215682988,y:.5591091940676126},{x:.49911411231822944,y:.5591906836434047},{x:.49900060356177384,y:.559295431819878},{x:.49536839230215873,y:.5615170221826804},{x:.49175144785337105,y:.5637633826232722},{x:.4916068619246677,y:.563817708744868},{x:.49147509885166074,y:.5638982997546532},{x:.41571709885166075,y:.6005642997546532},{x:.4144883994140345,y:.6010164083750983},{x:.41333375445642906,y:.6016335789630078},{x:.41035728417594536,y:.6025364813514484},{x:.4074382196167836,y:.6036105717354909},{x:.4061449272779714,y:.6038142858466193},{x:.4048920644907258,y:.6041943376181453},{x:.4017966387343604,y:.6044992104448776},{x:.3987241185432898,y:.6049831812385367},{x:.3974159338025849,y:.6049306722213019},{x:.396113,y:.605059},{x:.282216,y:.605059},{x:.28097323419788345,y:.6049365982521052},{x:.2797255990169867,y:.6049900349640848},{x:.2765922846246742,y:.6045051123806029},{x:.2734369355092743,y:.6041943376181453},{x:.2722419284999821,y:.603831836204989},{x:.27100784129389754,y:.6036408445963318},{x:.26802933636200627,y:.6025539603505436},{x:.264995245543571,y:.6016335789630078},{x:.2638939207763026,y:.6010449086106044},{x:.2627208068242762,y:.6006168283817219},{x:.18644080682427616,y:.563950828381722},{x:.18387931815291048,y:.5623935720684188},{x:.18122474955630472,y:.5610008994562176},{x:.18011833133270075,y:.5601070811947741},{x:.17890296169536754,y:.5593681975674947},{x:.17669449694619624,y:.5573411418478543},{x:.17436263208920222,y:.5554573484070612},{x:.137041,y:.5187071981771466},{x:.137041,y:.560059},{x:.13617633761814535,y:.5688380644907257},{x:.1336155789630079,y:.577279754456429},{x:.12945713255361452,y:.5850596604858821},{x:.12386080515339463,y:.5918788051533946},{x:.11704166048588208,y:.5974751325536145},{x:.10926175445642904,y:.6016335789630078},{x:.10082006449072577,y:.6041943376181453},{x:.092041,y:.605059},{x:.08326193550927423,y:.6041943376181453},{x:.07482024554357093,y:.6016335789630078},{x:.06704033951411792,y:.5974751325536145},{x:.06022119484660536,y:.5918788051533946},{x:.05462486744638546,y:.5850596604858821},{x:.050466421036992094,y:.577279754456429},{x:.04790566238185463,y:.5688380644907257},{x:.047041,y:.560059},{x:.047041,y:.03920400000000002}]],o:[[{x:.021894999999999998,y:.25490100000000004},{x:.022142430975592695,y:.2523887911456351},{x:.02217771682540861,y:.24986467341374632},{x:.02257373987793045,y:.24800963837050735},{x:.02275966238185463,y:.24612193550927428},{x:.023492446675001572,y:.24370626943231966},{x:.02401948545822835,y:.2412375358426815},{x:.060310485458228355,y:.12735753584268142},{x:.06080304558444478,y:.12621387418764726},{x:.061129830312657105,y:.12501229639135567},{x:.06254436541764224,y:.12217075210694647},{x:.06379993607002282,y:.11925547753662338},{x:.06450614911208748,y:.11822988473324028},{x:.0650610709625847,y:.11711514745523491},{x:.06700278396163635,y:.114604164756607},{x:.06880297103068717,y:.11198985605258731},{x:.06969569761744246,y:.11112174505713},{x:.07045743125471368,y:.1101366870258529},{x:.14244943125471368,y:.0338456870258529},{x:.144568728324263,y:.03200109409682955},{x:.1465508815997487,y:.0300098604251366},{x:.14788834203377002,y:.029111770054614114},{x:.1491035320893312,y:.02805409342394511},{x:.1515419696884587,y:.026658398178569347},{x:.15387450686277807,y:.025092124424329433},{x:.22587150686277807,y:-.01360287557567049},{x:.22795933917571506,y:-.014473279294209745},{x:.22995424554357097,y:-.015539578963007873},{x:.23202067225559728,y:-.016166422653018674},{x:.2340138134199343,y:-.01699735024728135},{x:.23623133596214702,y:-.01744371352418634},{x:.23839593550927424,y:-.018100337618145335},{x:.2405449475487996,y:-.01831199682974963},{x:.24266189699648397,y:-.01873811583170923},{x:.2449238916202761,y:-.018743285176571887},{x:.247175,y:-.018964999999999968},{x:.354874,y:-.018964999999999968},{x:.35712497901801044,y:-.018743297917588594},{x:.3593868436844028,y:-.018738141970160445},{x:.36150392306047363,y:-.018312009573623896},{x:.3636530644907258,y:-.018100337618145335},{x:.36581753964743763,y:-.017443751257606326},{x:.36803493734305537,y:-.016997426474138877},{x:.370028203326089,y:-.016166460394901543},{x:.3720947544564291,y:-.015539578963007873},{x:.3740895461854217,y:-.014473340569958804},{x:.376177263560353,y:-.01360299896157894},{x:.448175263560353,y:.025092001038420984},{x:.4505076595021602,y:.026658160356610353},{x:.4529459593263057,y:.028053731854915283},{x:.45416130097157975,y:.029111510806286087},{x:.45549891730603415,y:.030009694621828502},{x:.4574809543881169,y:.03200078850323144},{x:.4596001404718476,y:.03384523318438343},{x:.5315941404718476,y:.11013623318438343},{x:.5323560786638525,y:.11112152750713142},{x:.5332490289693128,y:.11198985605258731},{x:.5350490398057314,y:.11460390882403626},{x:.5369905975332091,y:.11711461878219896},{x:.5375456739097991,y:.11822962771804991},{x:.5382520639299772,y:.11925547753662338},{x:.5395075116659538,y:.12217046671076734},{x:.5409219476918898,y:.12501171320336152},{x:.5412488309792026,y:.126213587584214},{x:.5417415145417717,y:.12735753584268142},{x:.5780325145417716,y:.2412375358426815},{x:.5785595533249983,y:.2437062694323195},{x:.5792923376181454,y:.24612193550927428},{x:.5794782601220696,y:.2480096383705079},{x:.5798742831745913,y:.24986467341374632},{x:.5799095690244073,y:.25238879114563434},{x:.580157,y:.25490100000000004},{x:.580157,y:.33119200000000004},{x:.5799156873690254,y:.3336420882589673},{x:.5798881240960263,y:.3361038771468651},{x:.5794843860383102,y:.3380211641581212},{x:.5792923376181454,y:.33997106449072584},{x:.5785776732343003,y:.3423269972319261},{x:.5780703683949873,y:.3447361062088315},{x:.5417793683949873,y:.4597211062088315},{x:.5412650895934552,y:.4609244011905288},{x:.540921633437906,y:.46218711230867804},{x:.5395351283421765,y:.46497211555478546},{x:.5383124760126231,y:.46783284286481475},{x:.5375733277285976,y:.46891268605384906},{x:.5369901282681178,y:.47008412955994733},{x:.5350869372989228,y:.47254512602400234},{x:.5333296776789325,y:.47511235762423976},{x:.5323940649664491,y:.4760272512524403},{x:.5315935342292432,y:.47706240922950055},{x:.45959953422924316,y:.5533504092295005},{x:.4572787448447235,y:.5553702403350376},{x:.45508230823461715,y:.5575246421731296},{x:.45395838697349994,y:.5582600166131206},{x:.4529452394037514,y:.5591417799431011},{x:.45027499383570063,y:.5606700370119551},{x:.44770045819082444,y:.5623545390972755},{x:.3757024581908245,y:.5999485390972755},{x:.37385313535723513,y:.6006937047902838},{x:.3720947544564291,y:.6016335789630078},{x:.36977177563531344,y:.6023382468844833},{x:.3675201821794923,y:.6032455034042244},{x:.36556101895058973,y:.6036155659602718},{x:.3636530644907258,y:.6041943376181453},{x:.36123724716457173,y:.6044322748568528},{x:.35885192047906295,y:.6048828346046191},{x:.35685820639902277,y:.60486357272721},{x:.354874,y:.605059},{x:.247175,y:.605059},{x:.24519066624232813,y:.6048635601834779},{x:.24319682408363533,y:.6048828119349353},{x:.24081162559758007,y:.6044322623250186},{x:.23839593550927424,y:.6041943376181453},{x:.23648785858508298,y:.6036155288111242},{x:.234528571713998,y:.6032454313367869},{x:.23227710201651716,y:.602338209770572},{x:.22995424554357097,y:.6016335789630078},{x:.2281957517789948,y:.6006936444633418},{x:.22634631449119302,y:.5999484204015954},{x:.15434931449119302,y:.5623544204015953},{x:.15177463525955168,y:.5606698034147719},{x:.14910425200363037,y:.5591414183832311},{x:.14809125527340347,y:.55825976164439},{x:.1469674919716301,y:.5575244814106152},{x:.14477093694990967,y:.5553699388664325},{x:.14245003748743465,y:.5533499553954043},{x:.07045803748743465,y:.4770619553954044},{x:.06965771196430402,y:.47602703312304784},{x:.06872232232106745,y:.47511235762423976},{x:.06696488716695402,y:.4725448695811053},{x:.06506154021654398,y:.4700836008922148},{x:.0644784960433022,y:.46891242859710086},{x:.06373952398737684,y:.46783284286481475},{x:.06251674952606694,y:.46497182979435886},{x:.06113014455468816,y:.46218652912371366},{x:.06078678779193787,y:.46092411430034236},{x:.06027263160501272,y:.4597211062088315},{x:.023981631605012717,y:.3447361062088315},{x:.0234743267656997,y:.3423269972319261},{x:.02275966238185463,y:.33997106449072584},{x:.0225676139616898,y:.3380211641581212},{x:.022163875903973694,y:.3361038771468651},{x:.022136312630974576,y:.33364208825896713},{x:.021894999999999998,y:.33119200000000004},{x:.021894999999999998,y:.25490100000000004}],[{x:.111895,y:.2618978965790472},{x:.111895,y:.324259211613835},{x:.14299436878278687,y:.42279496206129447},{x:.20271328316555492,y:.48607750096051383},{x:.25821631520114247,y:.5150589999999999},{x:.3438328207386419,y:.5150589999999999},{x:.3993370917152178,y:.4860772565752743},{x:.4590577300605173,y:.42279464888454726},{x:.490157,y:.324259211613835},{x:.490157,y:.2618978965790472},{x:.4591028039244665,y:.16445082019422033},{x:.39914727445977055,y:.10091681321598435},{x:.3435475642149213,y:.07103500000000003},{x:.2585015743575747,y:.07103500000000003},{x:.20290309936793577,y:.10091656436690524},{x:.14294929572583875,y:.164450507494742},{x:.111895,y:.2618978965790472}]],p:[[{x:.031904,y:-.15424400000000005},{x:.032768662381854635,y:-.16302306449072582},{x:.0353294210369921,y:-.17146475445642909},{x:.03948786744638546,y:-.17924466048588214},{x:.04508419484660536,y:-.18606380515339468},{x:.051903339514117915,y:-.19166013255361458},{x:.05968324554357096,y:-.19581857896300794},{x:.06812493550927423,y:-.1983793376181454},{x:.076904,y:-.19924400000000003},{x:.08568306449072577,y:-.1983793376181454},{x:.09412475445642904,y:-.19581857896300794},{x:.1019046604858821,y:-.19166013255361458},{x:.10872380515339464,y:-.18606380515339468},{x:.11432013255361453,y:-.17924466048588214},{x:.1184785789630079,y:-.17146475445642909},{x:.12103933761814537,y:-.16302306449072582},{x:.121904,y:-.15424400000000005},{x:.121904,y:.08461372659928788},{x:.12362832174470662,y:.08333438131496537},{x:.12536021772829115,y:.08178035235824195},{x:.1271620685101291,y:.08071254912256186},{x:.12884414120453105,y:.07946455014784792},{x:.13094744853162613,y:.07846927732892851},{x:.13294924262910485,y:.07728298474798974},{x:.20690724262910487,y:.04275398474798971},{x:.20784573679964677,y:.04242345923251374},{x:.20872324554357097,y:.041954421036992075},{x:.21199903754957586,y:.040960720395783044},{x:.21522783943974558,y:.03982357810698025},{x:.21621278303720604,y:.03968249467654502},{x:.21716493550927424,y:.0393936623818546},{x:.22057164546850772,y:.03905813073713887},{x:.2239602522910248,y:.038572746319036566},{x:.22495379448531613,y:.03862652673075318},{x:.225944,y:.038528999999999966},{x:.338005,y:.038528999999999966},{x:.33886621477794643,y:.03861382225207184},{x:.3397300481447032,y:.038562076501738984},{x:.34324908380057223,y:.0390454971728409},{x:.3467840644907258,y:.0393936623818546},{x:.3476121832677305,y:.039644869466491955},{x:.3484695134136621,y:.03976264352593092},{x:.35182662109175783,y:.04092330520367998},{x:.35522575445642907,y:.04195442103699206},{x:.3559889530923063,y:.042362359206810904},{x:.35680683330070073,y:.04264512708496585},{x:.4318888333007007,y:.07717412708496588},{x:.43400924312431544,y:.07841428389434572},{x:.43622962614931016,y:.07946501028796468},{x:.4378075563324746,y:.08063579029221077},{x:.43950360927818305,y:.0816277549521855},{x:.44134133343031445,y:.08325775393151234},{x:.4433140658676044,y:.08472146615145025},{x:.5183930658676044,y:.1527974661514503},{x:.519792625068414,y:.15434228537837358},{x:.5213447099268285,y:.1557337827706549},{x:.522746916505161,y:.1576032022519019},{x:.5243158963961404,y:.15933502631539204},{x:.52538718417891,y:.1611232027292085},{x:.5266379784876352,y:.1627907596241023},{x:.5276485364111687,y:.16489781566710873},{x:.5288495066792682,y:.16690245600899573},{x:.5295513540552914,y:.16886527099294393},{x:.530452790490496,y:.17074480411415546},{x:.5674347904904959,y:.2723648041141554},{x:.5682868803844835,y:.2756900562357905},{x:.5692833376181453,y:.27897493550927416},{x:.5693799285821196,y:.2799556400244087},{x:.5696245448495124,y:.2809102467717411},{x:.5698115375679212,y:.2843378395980749},{x:.570148,y:.28775399999999995},{x:.570148,y:.355831},{x:.5698183264321395,y:.3591782319067787},{x:.5696454905753794,y:.362537215959393},{x:.5693867528695432,y:.3635600718226051},{x:.5692833376181453,y:.3646100644907258},{x:.5683069860848939,y:.3678286641524751},{x:.567482165940186,y:.37108938766543825},{x:.530500165940186,y:.47369538766543823},{x:.5295747233109523,y:.4756403735939819},{x:.5288495066792682,y:.4776685439910043},{x:.5276841925618525,y:.47961366765708685},{x:.5267099630491849,y:.4816611880905031},{x:.5254228546094585,y:.48338825675926556},{x:.5243158963961404,y:.48523597368460797},{x:.5227934986603558,y:.48691638083844907},{x:.5214385372739072,y:.48873449599152474},{x:.5198392258792078,y:.49017727712011666},{x:.5183930658676044,y:.4917735338485497},{x:.4433140658676044,y:.5598495338485497},{x:.44114571117720175,y:.5614583923016819},{x:.43910641435493325,y:.5632279843609703},{x:.43761161896162687,y:.5640805897495177},{x:.43622962614931016,y:.5651059897120353},{x:.43378906307257026,y:.5662609093863238},{x:.43144372048223223,y:.5675986521566495},{x:.35636172048223225,y:.6011446521566495},{x:.355773047491519,y:.6013410447411239},{x:.35522575445642907,y:.6016335789630078},{x:.3515938477815883,y:.6027353058079922},{x:.3479935881359665,y:.6039364213810477},{x:.34737791203915763,y:.6040141959337602},{x:.3467840644907258,y:.6041943376181453},{x:.34300700763927916,y:.6045663452480041},{x:.3392415999493003,y:.6050420059085138},{x:.33862258083352115,y:.60499817359702},{x:.338005,y:.605059},{x:.225944,y:.605059},{x:.2251997336627212,y:.6049856961639699},{x:.22445344765540867,y:.6050343071552383},{x:.22081614914993766,y:.6045539507735711},{x:.21716493550927424,y:.6041943376181453},{x:.21644927090994795,y:.6039772431353645},{x:.21570784104506457,y:.6038793269025836},{x:.2122341450916469,y:.6026985986973952},{x:.20872324554357097,y:.6016335789630078},{x:.20806368527139987,y:.6012810366527016},{x:.20735560428285457,y:.6010403560617851},{x:.13339760428285458,y:.5674943560617851},{x:.13116986982932302,y:.566206971138138},{x:.12884414120453105,y:.5651064498521521},{x:.1273598902040749,y:.5640052229355318},{x:.12575970914356202,y:.5630804946901414},{x:.12382593632220404,y:.5613832370749092},{x:.121904,y:.5599572734007121},{x:.121904,y:.560059},{x:.12103933761814537,y:.5688380644907257},{x:.1184785789630079,y:.577279754456429},{x:.11432013255361453,y:.5850596604858821},{x:.10872380515339464,y:.5918788051533946},{x:.10190466048588208,y:.5974751325536145},{x:.09412475445642904,y:.6016335789630078},{x:.08568306449072577,y:.6041943376181453},{x:.076904,y:.605059},{x:.0681249355092742,y:.6041943376181453},{x:.059683245543570934,y:.6016335789630078},{x:.051903339514117915,y:.5974751325536145},{x:.04508419484660536,y:.5918788051533946},{x:.03948786744638546,y:.5850596604858821},{x:.0353294210369921,y:.577279754456429},{x:.032768662381854635,y:.5688380644907257},{x:.031904,y:.560059},{x:.031904,y:-.15424400000000005}],[{x:.121904,y:.20607608160839302},{x:.121904,y:.438494918391607},{x:.17699192809119763,y:.48844251958412144},{x:.23567259519301437,y:.5150589999999999},{x:.3284092961747297,y:.5150589999999999},{x:.38817711429028284,y:.4883552464171925},{x:.4496333594179428,y:.43263133769024387},{x:.48014799999999996,y:.3479689286382035},{x:.48014799999999996,y:.29568777567179994},{x:.44968806913177495,y:.21198926897045803},{x:.3879916447872207,y:.1560475837631447},{x:.32815352882369925,y:.12852899999999995},{x:.2359312215606538,y:.12852899999999995},{x:.17717907548697515,y:.15595879598931894},{x:.121904,y:.20607608160839302}]],q:[[{x:.031905,y:.285813},{x:.03224141038262204,y:.2823973680650777},{x:.0324282929389951,y:.2789703010434802},{x:.03267301908894614,y:.2780151713289937},{x:.032769662381854636,y:.2770339355092742},{x:.03376596546737772,y:.2737495643941025},{x:.03461784473664685,y:.27042480648246636},{x:.07159784473664685,y:.1688028064824664},{x:.0724995244823713,y:.166922651750872},{x:.0732016076706368,y:.1649592141085361},{x:.07440224792307432,y:.1629551516523985},{x:.07541246819615938,y:.16084867156853302},{x:.07666362241043057,y:.15918055247485355},{x:.0777352629490018,y:.15739181137154173},{x:.07930380642556048,y:.15566048970702676},{x:.08070556947724908,y:.15379156924569237},{x:.08225811700526783,y:.15239959067120604},{x:.08365813234923056,y:.15085428642438087},{x:.15873913234923054,y:.08277728642438094},{x:.16071062555900373,y:.0813145118522212},{x:.16254708404197357,y:.07968542770293169},{x:.16424441690754124,y:.07869257021816739},{x:.16582360332185575,y:.07752087268448676},{x:.16804258800473576,y:.07647082416071167},{x:.17016157800418052,y:.07523131768336211},{x:.24523757800418056,y:.0406993176833621},{x:.24605678866737324,y:.04041603175027397},{x:.24682124554357093,y:.04000742103699214},{x:.2502190216384501,y:.03897671692697023},{x:.2535747153580455,y:.03781630621794852},{x:.25443345146196317,y:.037698283616711674},{x:.2552629355092742,y:.03744666238185468},{x:.25879650468596477,y:.037098636194782805},{x:.2623141045905799,y:.03661518582049534},{x:.2631793653883337,y:.03666696209348752},{x:.264042,y:.036582000000000045},{x:.376106,y:.036582000000000045},{x:.3770966034546813,y:.036679565924422064},{x:.37809054588497415,y:.03662578154659327},{x:.38147875036256007,y:.037111169723096304},{x:.3848850644907258,y:.03744666238185468},{x:.3858375996101805,y:.03773561075136079},{x:.38682293652697,y:.03787676837406198},{x:.39005134306992567,y:.03901383585544661},{x:.39332675445642906,y:.04000742103699214},{x:.39420461585020444,y:.04047664772778637},{x:.3951434813083616,y:.04080732274273922},{x:.4691044813083616,y:.07533932274273922},{x:.47110618065167786,y:.07652560719175487},{x:.47320939667814427,y:.07752087268448679},{x:.4748915208069018,y:.0787689461703934},{x:.4766934263594154,y:.07983682509171056},{x:.47842523099597173,y:.08139082758714347},{x:.48014799999999996,y:.08266905805748193},{x:.48014799999999996,y:-.15619500000000008},{x:.4810126623818546,y:-.16497406449072585},{x:.483573421036992,y:-.17341575445642912},{x:.4877318674463854,y:-.18119566048588218},{x:.4933281948466053,y:-.18801480515339472},{x:.5001473395141178,y:-.19361113255361462},{x:.5079272455435709,y:-.19776957896300798},{x:.5163689355092742,y:-.20033033761814545},{x:.525148,y:-.20119500000000007},{x:.5339270644907257,y:-.20033033761814545},{x:.542368754456429,y:-.19776957896300798},{x:.5501486604858821,y:-.19361113255361462},{x:.5569678051533946,y:-.18801480515339472},{x:.5625641325536145,y:-.18119566048588218},{x:.5667225789630078,y:-.17341575445642912},{x:.5692833376181453,y:-.16497406449072585},{x:.570148,y:-.15619500000000008},{x:.570148,y:.5581050000000001},{x:.5692833376181453,y:.5668840644907258},{x:.5667225789630078,y:.5753257544564291},{x:.5625641325536145,y:.5831056604858822},{x:.5569678051533946,y:.5899248051533947},{x:.5501486604858821,y:.5955211325536146},{x:.542368754456429,y:.5996795789630079},{x:.5339270644907257,y:.6022403376181454},{x:.525148,y:.6031050000000001},{x:.5163689355092742,y:.6022403376181454},{x:.5079272455435709,y:.5996795789630079},{x:.5001473395141178,y:.5955211325536146},{x:.4933281948466053,y:.5899248051533947},{x:.4877318674463854,y:.5831056604858822},{x:.483573421036992,y:.5753257544564291},{x:.4810126623818546,y:.5668840644907258},{x:.48014799999999996,y:.5581050000000001},{x:.48014799999999996,y:.558005596763998},{x:.4782247267606458,y:.559432223348863},{x:.47629232280480055,y:.5611281889595863},{x:.4746904859851039,y:.5620538174856352},{x:.4732046002880372,y:.5631560030691136},{x:.4708804506539088,y:.5642554633364756},{x:.4686543108210992,y:.5655418481335316},{x:.3946933108210992,y:.5990868481335316},{x:.3939857884552202,y:.5993273179516839},{x:.39332675445642906,y:.5996795789630079},{x:.3898152875083263,y:.6007447708163117},{x:.38634099890642704,y:.6019255978665906},{x:.3856001580501581,y:.6020234163584227},{x:.3848850644907258,y:.6022403376181454},{x:.38123326077373504,y:.6026000088910167},{x:.3775953617236344,y:.6030803465985108},{x:.3768496724756141,y:.6030317546542387},{x:.376106,y:.6031050000000001},{x:.264042,y:.6031050000000001},{x:.26342400033164626,y:.6030441323453897},{x:.26280456058717394,y:.6030879828235033},{x:.25903957642572706,y:.602612304281983},{x:.2552629355092742,y:.6022403376181454},{x:.254668685221597,y:.6020600737641458},{x:.25405259303422617,y:.6019822349683996},{x:.25045275226756825,y:.6007811844842303},{x:.24682124554357093,y:.5996795789630079},{x:.24627358134186672,y:.5993868463484354},{x:.24568451278884912,y:.5991903095800973},{x:.17060851278884911,y:.5656453095800973},{x:.16826609518471405,y:.5643091772352096},{x:.16582839971196278,y:.5631560030691136},{x:.1644435861855132,y:.5621287897998347},{x:.16294590048199914,y:.5612744987855388},{x:.1609091582647261,y:.559507056844315},{x:.15874327554635076,y:.5579004698017108},{x:.08366227554635075,y:.4898404698017108},{x:.0822135909199537,y:.48824184486316324},{x:.08061175169940471,y:.4867967151276658},{x:.07925889408089541,y:.48498133393711457},{x:.07773859373239328,y:.48330368097737925},{x:.0766296214289207,y:.4814531488185024},{x:.0753404919252871,y:.4797232835162987},{x:.07436779238761855,y:.4776788549378484},{x:.07320399804016177,y:.47573684172476444},{x:.07247735524331753,y:.47370551725863386},{x:.07155047598047157,y:.4717573941431678},{x:.034570475980471575,y:.3691493941431678},{x:.03374586128764337,y:.36588916100716024},{x:.032769662381854636,y:.3626710644907258},{x:.032666195333495754,y:.36162054591923504},{x:.032407352052251925,y:.36059717166956007},{x:.03223462203187315,y:.35723870865311785},{x:.031905,y:.353892},{x:.031905,y:.285813}],[{x:.121905,y:.2937462257558374},{x:.121905,y:.3460304727958324},{x:.1524170009298456,y:.4306917867874386},{x:.21387346155335435,y:.48640130996954867},{x:.2736381428091649,y:.513105},{x:.36637802828147564,y:.513105},{x:.4250638403772601,y:.4864880590885319},{x:.48014799999999996,y:.4365549481293854},{x:.48014799999999996,y:.20413270643748072},{x:.4248733312055972,y:.15401438585682045},{x:.36611835928516706,y:.12658200000000003},{x:.27389496414813935,y:.12658200000000003},{x:.2140623112166411,y:.15410266134357853},{x:.15236330162501277,y:.21004602219345103},{x:.121905,y:.2937462257558374}]],r:[[{x:.062422000000000005,y:.03920400000000002},{x:.06328666238185464,y:.030424935509274227},{x:.0658474210369921,y:.02198324554357097},{x:.07000586744638546,y:.01420333951411792},{x:.07560219484660537,y:.00738419484660538},{x:.08242133951411793,y:.0017878674463854757},{x:.09020124554357097,y:-.002370578963007887},{x:.09864293550927423,y:-.004931337618145348},{x:.107422,y:-.005795999999999982},{x:.11620106449072577,y:-.004931337618145348},{x:.12464275445642904,y:-.002370578963007887},{x:.1324226604858821,y:.0017878674463854827},{x:.13924180515339463,y:.00738419484660538},{x:.14483813255361455,y:.01420333951411792},{x:.14899657896300791,y:.02198324554357098},{x:.15155733761814538,y:.030424935509274248},{x:.152422,y:.03920400000000002},{x:.152422,y:.3275398012121413},{x:.1925108808296549,y:.4204278633799401},{x:.27478075869941443,y:.4836647262821032},{x:.3576648607132649,y:.5150589999999999},{x:.49463,y:.5150589999999999},{x:.5034090644907258,y:.5159236623818546},{x:.511850754456429,y:.5184844210369921},{x:.5196306604858821,y:.5226428674463854},{x:.5264498051533947,y:.5282391948466053},{x:.5320461325536145,y:.5350583395141179},{x:.5362045789630079,y:.542838245543571},{x:.5387653376181454,y:.5512799355092742},{x:.53963,y:.560059},{x:.5387653376181454,y:.5688380644907257},{x:.5362045789630079,y:.577279754456429},{x:.5320461325536145,y:.5850596604858821},{x:.5264498051533947,y:.5918788051533946},{x:.5196306604858821,y:.5974751325536145},{x:.511850754456429,y:.6016335789630078},{x:.5034090644907258,y:.6041943376181453},{x:.49463,y:.605059},{x:.349428,y:.605059},{x:.34572095329292224,y:.6046938877675093},{x:.3420044651532413,y:.6044424555930356},{x:.34133700376168824,y:.6042621064259311},{x:.3406489355092742,y:.6041943376181453},{x:.33708434852821606,y:.6031130319790114},{x:.33348832364990477,y:.6021413801353276},{x:.23668632364990477,y:.5654753801353276},{x:.2347311434313091,y:.5645060813254815},{x:.23268939209293205,y:.5637356779621759},{x:.23078888495220712,y:.562551669954317},{x:.22878273496962892,y:.5615571024090896},{x:.2270542238076375,y:.5602249916656349},{x:.22520200238894322,y:.5590710654608507},{x:.152422,y:.5031286093364514},{x:.152422,y:.560059},{x:.15155733761814538,y:.5688380644907257},{x:.14899657896300791,y:.577279754456429},{x:.14483813255361455,y:.5850596604858821},{x:.13924180515339463,y:.5918788051533946},{x:.1324226604858821,y:.5974751325536145},{x:.12464275445642904,y:.6016335789630078},{x:.11620106449072577,y:.6041943376181453},{x:.107422,y:.605059},{x:.09864293550927423,y:.6041943376181453},{x:.09020124554357094,y:.6016335789630078},{x:.08242133951411793,y:.5974751325536145},{x:.07560219484660537,y:.5918788051533946},{x:.07000586744638546,y:.5850596604858821},{x:.0658474210369921,y:.577279754456429},{x:.06328666238185464,y:.5688380644907257},{x:.062422000000000005,y:.560059},{x:.062422000000000005,y:.03920400000000002}]],s:[[{x:.056563,y:.369888},{x:.056809270227573656,y:.3673875764180495},{x:.05684306423764694,y:.36487528163458033},{x:.05724057756471223,y:.36300843953465567},{x:.057427662381854636,y:.3611089355092742},{x:.05815700903783985,y:.3587046018033244},{x:.05868027810379197,y:.35624717294397146},{x:.05943435615016931,y:.3544937526945111},{x:.0599884210369921,y:.352667245543571},{x:.06117281573842168,y:.3504513989095756},{x:.06216545092350078,y:.34814327358726177},{x:.06324711489275962,y:.3465706581451233},{x:.06414686744638545,y:.3448873395141179},{x:.06574079456909979,y:.3429451336955602},{x:.0671646494598194,y:.3408750118720105},{x:.06853233161222538,y:.3395436359667022},{x:.06974319484660536,y:.33806819484660533},{x:.07168540066516299,y:.33647426772389105},{x:.07348575731657993,y:.3347217030198468},{x:.07508689839402109,y:.33368273068076537},{x:.07656233951411792,y:.33247186744638546},{x:.07877818614811302,y:.331287472744956},{x:.08088585786376518,y:.3299198152391437},{x:.15568385786376518,y:.29122381523914376},{x:.1574569269125657,y:.29051717359061785},{x:.15914024554357095,y:.2896174210369921},{x:.16154457924952065,y:.28888807438100694},{x:.16387856938737105,y:.2879578823843842},{x:.16575542835833412,y:.2876107272686775},{x:.16758193550927422,y:.2870566623818547},{x:.17008235909122482,y:.286810392154281},{x:.17255297371919248,y:.2863534124236203},{x:.17446149597461844,y:.28637908481714247},{x:.176361,y:.28619200000000006},{x:.288347309340128,y:.28619200000000006},{x:.3974525128623667,y:.21942256309828728},{x:.45549,y:.1602321160680505},{x:.45549,y:.13007078589845048},{x:.407404042616179,y:.10590438131127383},{x:.31753214348357883,y:.07103500000000003},{x:.21224543978224936,y:.07103500000000003},{x:.16354378174687056,y:.09622932957230687},{x:.14433666195924297,y:.15500005013212306},{x:.1407876006468136,y:.16307617408904287},{x:.13573115992893667,y:.17030473007440486},{x:.12936165598671553,y:.1764079287355125},{x:.12192386528459082,y:.18115122757053267},{x:.11370361794808405,y:.18435234426530817},{x:.10501681347236942,y:.18588826170046568},{x:.09619728088183255,y:.18569995543032455},{x:.08758394986787689,y:.1837946619592429},{x:.07950782591095708,y:.18024560064681355},{x:.07227926992559508,y:.1751891599289366},{x:.06617607126448745,y:.1688196559867155},{x:.06143277242946728,y:.16138186528459075},{x:.05823165573469179,y:.153161617948084},{x:.05669573829953427,y:.14447481347236937},{x:.0568840445696754,y:.1356552808818325},{x:.05878933804075704,y:.12704194986787684},{x:.08372233804075704,y:.050750949867876836},{x:.08542587043333498,y:.04687444913825993},{x:.08709879890390285,y:.042984643121031924},{x:.08719974017890864,y:.04283789110571456},{x:.0872713993531864,y:.04267482591095703},{x:.0896984666241539,y:.03920515373890898},{x:.0920981137517354,y:.03571646140762123},{x:.09222574536637099,y:.03559222185697407},{x:.09232784007106334,y:.035446269925595034},{x:.09538517138631239,y:.032516763866873036},{x:.0984193200775319,y:.02956325371133576},{x:.09856873722042347,y:.029466301081615798},{x:.09869734401328446,y:.029343071264487396},{x:.10226744784494098,y:.027066310594042624},{x:.10581949746716537,y:.024761484353185106},{x:.18061849746716538,y:-.013933515646814817},{x:.1823912439162618,y:-.014639995851387814},{x:.18407424554357094,y:-.01553957896300786},{x:.18647892276401756,y:-.016269029822976466},{x:.18881326125361947,y:-.017199317363260178},{x:.19068977232738848,y:-.017546377073194466},{x:.1925159355092742,y:-.018100337618145335},{x:.19501671633437545,y:-.018346643031098245},{x:.19748769126025723,y:-.018803648509519946},{x:.19939585369049342,y:-.018777950414796084},{x:.201295,y:-.018964999999999968},{x:.325956,y:-.018964999999999968},{x:.3298421413721484,y:-.018582248482612737},{x:.33373593654739714,y:-.01828737118339306},{x:.334227355251249,y:-.018150342613638803},{x:.3347350644907258,y:-.018100337618145335},{x:.33847186362931597,y:-.016966791992147238},{x:.34223331291484477,y:-.015917938922943478},{x:.44196531291484475,y:.022777061077056446},{x:.44388622686678575,y:.02374867869889352},{x:.4458951331158935,y:.02452214291663178},{x:.5206971331158935,y:.06211514291663188},{x:.5230429253028388,y:.06359852573319036},{x:.5254906604858821,y:.06490686744638552},{x:.526762463529903,y:.06595060923072474},{x:.5281530225051898,y:.06682994172267823},{x:.5301643473216751,y:.06874246310749585},{x:.5323098051533947,y:.07050319484660542},{x:.5333535469377338,y:.07177499789062616},{x:.5345458374532134,y:.07290871885358566},{x:.536145400814505,y:.07517688168239829},{x:.5379061325536145,y:.07732233951411796},{x:.538681702666837,y:.0787733291400739},{x:.5396299056666436,y:.08011787031323085},{x:.5407562372498129,y:.08265451036052812},{x:.5420645789630079,y:.08510224554357101},{x:.5425421726806072,y:.08667666103386074},{x:.5432098492552168,y:.08818035245395842},{x:.5438196647691762,y:.09088798806528645},{x:.5446253376181454,y:.09354393550927428},{x:.5447866012813922,y:.09518127295954937},{x:.5451480929944793,y:.09678632860859225},{x:.545217957571016,y:.09956090686586556},{x:.54549,y:.10232300000000005},{x:.54549,y:.17861300000000002},{x:.5450792542455133,y:.1827833716312913},{x:.5447095428008049,y:.18695758114513777},{x:.5446471218945653,y:.18717088502046353},{x:.5446253376181454,y:.1873920644907258},{x:.5434088850836819,y:.19140217107899518},{x:.5422319296624953,y:.19542404720269643},{x:.5421290946347417,y:.1956210747891699},{x:.5420645789630079,y:.19583375445642906},{x:.5400891672372728,y:.199529489854385},{x:.5381501975764,y:.20324447414399938},{x:.5380109003195782,y:.20341765378196683},{x:.5379061325536145,y:.20361366048588211},{x:.5352476756014034,y:.20685299965477524},{x:.5326212052175259,y:.21011832734743824},{x:.45781920521752584,y:.28640632734743826},{x:.45695946559173245,y:.28712616331644525},{x:.45621413415776596,y:.2879638966272176},{x:.45358375241990234,y:.28995255364350675},{x:.45105542866152953,y:.29206944848930627},{x:.4500717756605794,y:.29260772613156716},{x:.4491773318997613,y:.2932839556822147},{x:.3245133318997613,y:.3695749556822147},{x:.3213472249094816,y:.3711082739568931},{x:.3182447544564291,y:.37276657896300797},{x:.31738368821196916,y:.37302778055263114},{x:.3165738477898179,y:.3734199792757539},{x:.31316944110160955,y:.3743061584374605},{x:.3098030644907258,y:.3753273376181454},{x:.3089075854904768,y:.3754155346015568},{x:.3080367917497669,y:.3756422053074494},{x:.30452491480344407,y:.37584718998797495},{x:.301024,y:.376192},{x:.18731182116617404,y:.376192},{x:.146563,y:.397272996602132},{x:.146563,y:.42779681790574337},{x:.20153437253410483,y:.48386323770148376},{x:.2842918489876165,y:.5150589999999999},{x:.39008456648169626,y:.5150589999999999},{x:.4553477907191711,y:.4822576837794137},{x:.4635801440629335,y:.47908783003036465},{x:.47227272283422006,y:.4775849365970516},{x:.4810914761057044,y:.47780675883128426},{x:.48969750413477736,y:.47974477222900047},{x:.4977600820905977,y:.48332450002217653},{x:.5049693696238691,y:.488408375279255},{x:.5110483178577028,y:.4948010275251766},{x:.5157633162205862,y:.5022567907191711},{x:.5189331699696352,y:.5104891440629334},{x:.5204360634029483,y:.51918172283422},{x:.5202142411687157,y:.5280004761057044},{x:.5182762277709995,y:.5366065041347774},{x:.5146964999778234,y:.5446690820905977},{x:.509612624720745,y:.551878369623869},{x:.5032199724748234,y:.5579573178577029},{x:.49576420928082887,y:.5626723162205862},{x:.42096520928082887,y:.6002663162205862},{x:.41942927464851043,y:.6008577252562829},{x:.41797775445642904,y:.6016335789630078},{x:.4153223812886681,y:.6024390776071881},{x:.41273285593706643,y:.6034361699696352},{x:.41111105567880996,y:.6037165692645292},{x:.40953606449072577,y:.6041943376181453},{x:.40677456858393113,y:.6044663212253706},{x:.4040402771657799,y:.6049390634029483},{x:.4023949361559939,y:.6048976773693867},{x:.400757,y:.605059},{x:.276092,y:.605059},{x:.2724204350331364,y:.6046973824138966},{x:.26873912724910987,y:.6044542166602351},{x:.2680367190736708,y:.6042656240771296},{x:.2673129355092742,y:.6041943376181453},{x:.2637824667250502,y:.6031233816208718},{x:.26021933352302795,y:.6021667007079561},{x:.1604883335230279,y:.5645727007079561},{x:.15963695838633216,y:.5641523105976027},{x:.15873109713512196,y:.563867735718488},{x:.15568848233041307,y:.5622026409240001},{x:.1525785174681621,y:.5606670094317409},{x:.15182551530799093,y:.5600886019499048},{x:.15099257773152036,y:.559632770334096},{x:.14833326979676884,y:.5574060851671644},{x:.1455826488796249,y:.5552932363569977},{x:.14495695714670492,y:.554579039378831},{x:.14422895256892138,y:.5539694683796904},{x:.06943095256892137,y:.47768146837969044},{x:.06680494464711424,y:.4744165369262552},{x:.06414686744638545,y:.4711776604858821},{x:.0640418150384659,y:.470981121254323},{x:.0639021439692389,y:.47080746737336276},{x:.06196355058191934,y:.4670929619312254},{x:.0599884210369921,y:.46339775445642906},{x:.05992373008360734,y:.46318449696300446},{x:.05982062094636722,y:.462986931318802},{x:.05864394115023422,y:.4589655982489849},{x:.057427662381854636,y:.45495606449072584},{x:.05740581892006417,y:.454734284101312},{x:.05734323414113077,y:.4545203990307778},{x:.05697368708086039,y:.4503467759079653},{x:.056563,y:.44617700000000005},{x:.056563,y:.369888}]],t:[[{x:.036055000000000004,y:.484201},{x:.03691966238185464,y:.4754219355092742},{x:.0394804210369921,y:.466980245543571},{x:.04363886744638546,y:.4592003395141179},{x:.049235194846605365,y:.45238119484660533},{x:.05605433951411792,y:.44678486744638546},{x:.06383424554357096,y:.44262642103699207},{x:.07227593550927423,y:.4400656623818546},{x:.081055,y:.439201},{x:.201032,y:.439201},{x:.201032,y:.17345100000000002},{x:.2013458215844704,y:.17026471598156256},{x:.20148726326025637,y:.1670661406603643},{x:.20177732050748418,y:.165883633894134},{x:.20189666238185464,y:.16467193550927425},{x:.20282606714776777,y:.16160809859877695},{x:.20358880215081968,y:.15849857690755997},{x:.20410398165518515,y:.15739537903902878},{x:.2044574210369921,y:.15623024554357098},{x:.20596669248041014,y:.15340659727526443},{x:.20732140933230742,y:.15050562638878262},{x:.2623124093323074,y:.05773162638878261},{x:.2645408071528226,y:.05469603003381387},{x:.2666808493837164,y:.051597510818645845},{x:.2671477670132535,y:.051144744093296994},{x:.26753264280400524,y:.05062045370997057},{x:.2703104380556505,y:.04807792433615628},{x:.27301385108661325,y:.04545644382682572},{x:.2735601274310704,y:.04510346799784869},{x:.2740398919211364,y:.04466433724917905},{x:.27726033549019774,y:.04271258283448707},{x:.28042322867453984,y:.040668883056825214},{x:.28102787064035484,y:.04042926278737637},{x:.28158408674943697,y:.04009216722176761},{x:.28512341879560005,y:.038806192593798694},{x:.288624243922019,y:.03741881178414046},{x:.39861224392201905,y:.005893811784140432},{x:.4004470188387682,y:.005558110934368086},{x:.4022319355092743,y:.0050166623818546086},{x:.4047755505163489,y:.004766138170207483},{x:.4072897364122725,y:.0043061284251197166},{x:.4091547486303562,y:.0043348248023798485},{x:.411011,y:.004151999999999975},{x:.520997,y:.004151999999999975},{x:.5297760644907258,y:.0050166623818546086},{x:.538217754456429,y:.00757742103699207},{x:.5459976604858822,y:.011735867446385433},{x:.5528168051533947,y:.017332194846605337},{x:.5584131325536146,y:.02415133951411788},{x:.5625715789630079,y:.031931245543570935},{x:.5651323376181454,y:.040372935509274205},{x:.5659970000000001,y:.049151999999999973},{x:.5651323376181454,y:.05793106449072574},{x:.5625715789630079,y:.06637275445642901},{x:.5584131325536146,y:.07415266048588207},{x:.5528168051533947,y:.08097180515339461},{x:.5459976604858822,y:.08656813255361451},{x:.538217754456429,y:.09072657896300787},{x:.5297760644907258,y:.09328733761814534},{x:.520997,y:.09415199999999997},{x:.41733272532416527,y:.09415199999999997},{x:.33061421916568134,y:.11900744701827656},{x:.291032,y:.1857856616511605},{x:.291032,y:.439201},{x:.466004,y:.439201},{x:.47478306449072577,y:.4400656623818546},{x:.48322475445642904,y:.44262642103699207},{x:.4910046604858821,y:.44678486744638546},{x:.49782380515339464,y:.45238119484660533},{x:.5034201325536145,y:.4592003395141179},{x:.5075785789630078,y:.466980245543571},{x:.5101393376181453,y:.4754219355092742},{x:.511004,y:.484201},{x:.5101393376181453,y:.4929800644907258},{x:.5075785789630078,y:.501421754456429},{x:.5034201325536145,y:.5092016604858821},{x:.49782380515339464,y:.5160208051533947},{x:.4910046604858821,y:.5216171325536145},{x:.48322475445642904,y:.5257755789630079},{x:.47478306449072577,y:.5283363376181454},{x:.466004,y:.529201},{x:.291032,y:.529201},{x:.291032,y:.702148},{x:.2901673376181454,y:.7109270644907257},{x:.2876065789630079,y:.719368754456429},{x:.28344813255361456,y:.7271486604858821},{x:.27785180515339464,y:.7339678051533947},{x:.2710326604858821,y:.7395641325536145},{x:.26325275445642904,y:.7437225789630079},{x:.25481106449072577,y:.7462833376181454},{x:.246032,y:.747148},{x:.23725293550927423,y:.7462833376181454},{x:.22881124554357096,y:.7437225789630079},{x:.2210313395141179,y:.7395641325536145},{x:.21421219484660536,y:.7339678051533947},{x:.20861586744638547,y:.7271486604858821},{x:.2044574210369921,y:.719368754456429},{x:.20189666238185464,y:.7109270644907257},{x:.201032,y:.702148},{x:.201032,y:.529201},{x:.081055,y:.529201},{x:.07227593550927423,y:.5283363376181454},{x:.06383424554357094,y:.5257755789630079},{x:.05605433951411792,y:.5216171325536145},{x:.049235194846605365,y:.5160208051533947},{x:.04363886744638546,y:.5092016604858821},{x:.0394804210369921,y:.501421754456429},{x:.03691966238185464,y:.4929800644907258},{x:.036055000000000004,y:.484201}]],u:[[{x:.047041,y:.17386599999999997},{x:.04733731084809023,y:.17085750547164297},{x:.04744678100255899,y:.1678364368310572},{x:.0477687404511641,y:.16647712720137547},{x:.04790566238185463,y:.1650869355092742},{x:.048783207866406234,y:.16219405573845885},{x:.04947995583647738,y:.15925239265237093},{x:.08761895583647737,y:.04817539265237096},{x:.08938287590080696,y:.04431825367483454},{x:.09111755940033861,y:.04044787795123246},{x:.0912166047918106,y:.04030846472648272},{x:.0912877277290914,y:.04015294120864865},{x:.09377024504918263,y:.03671403980837168},{x:.09622666993792225,y:.03325645223155292},{x:.09635101037087945,y:.03313904059014135},{x:.09645110783403886,y:.03300038080982997},{x:.09955682066149267,y:.030111872039067004},{x:.10264058790854466,y:.027199945760571206},{x:.10278544504987946,y:.027109047766032002},{x:.10291067034954356,y:.026992580340839414},{x:.10652022788210418,y:.024765467971757132},{x:.11011283004156149,y:.02251110668543916},{x:.1858688300415615,y:-.015231893314560811},{x:.1873332068933575,y:-.0157898639141544},{x:.18871524554357097,y:-.01652857896300789},{x:.19144581156206075,y:-.017356887109087667},{x:.19411224226228255,y:-.018372875537717062},{x:.1956573361874375,y:-.018634439137126358},{x:.19715693550927424,y:-.019089337618145352},{x:.1999966293703256,y:-.019369023051625026},{x:.20281003486202434,y:-.01984529472354478},{x:.2043764687674932,y:-.01980039958033106},{x:.205936,y:-.019953999999999986},{x:.319832,y:-.019953999999999986},{x:.32132997950952447,y:-.01980646189590665},{x:.3228344649392302,y:-.019853723877644197},{x:.3257100002545037,y:-.019375067506000147},{x:.3286110644907258,y:-.019089337618145352},{x:.3300514774877758,y:-.018652393112465325},{x:.33153627500704863,y:-.018405236421526333},{x:.3342631764918695,y:-.017374788187221168},{x:.33705275445642907,y:-.01652857896300789},{x:.3383802466773209,y:-.015819019588053155},{x:.3397882963501792,y:-.015286942317463331},{x:.4160692963501792,y:.02245605768253664},{x:.4183042276197719,y:.02384992521458428},{x:.42064256487504254,y:.025062345668598177},{x:.4220380841989542,y:.02617863282445781},{x:.4235544084161923,y:.027124324140885128},{x:.42547446604244665,y:.028927422360218155},{x:.42753134130624215,y:.03057273346328787},{x:.465011,y:.06712410441560081},{x:.465011,y:.025046000000000013},{x:.4658756623818546,y:.016266935509274223},{x:.46843642103699207,y:.007825245543570968},{x:.47259486744638546,y:45339514117916785e-21},{x:.4781911948466053,y:-.006773805153394624},{x:.4850103395141179,y:-.012370132553614528},{x:.492790245543571,y:-.01652857896300789},{x:.5012319355092743,y:-.019089337618145352},{x:.510011,y:-.019953999999999986},{x:.5187900644907257,y:-.019089337618145352},{x:.527231754456429,y:-.01652857896300789},{x:.5350116604858821,y:-.012370132553614521},{x:.5418308051533947,y:-.006773805153394624},{x:.5474271325536145,y:45339514117916785e-21},{x:.5515855789630079,y:.007825245543570974},{x:.5541463376181454,y:.016266935509274244},{x:.555011,y:.025046000000000013},{x:.555011,y:.545898},{x:.5541463376181454,y:.5546770644907257},{x:.5515855789630079,y:.563118754456429},{x:.5474271325536145,y:.5708986604858821},{x:.5418308051533947,y:.5777178051533947},{x:.5350116604858821,y:.5833141325536145},{x:.527231754456429,y:.5874725789630079},{x:.5187900644907257,y:.5900333376181454},{x:.510011,y:.590898},{x:.5012319355092743,y:.5900333376181454},{x:.492790245543571,y:.5874725789630079},{x:.4850103395141179,y:.5833141325536145},{x:.4781911948466053,y:.5777178051533947},{x:.47259486744638546,y:.5708986604858821},{x:.46843642103699207,y:.563118754456429},{x:.4658756623818546,y:.5546770644907257},{x:.465011,y:.545898},{x:.465011,y:.19283699530520199},{x:.36978450462305706,y:.099969048308901},{x:.30930812362389754,y:.07004600000000001},{x:.2165251763155874,y:.07004600000000001},{x:.16675256431883717,y:.09484360935890679},{x:.137041,y:.18137632992954258},{x:.137041,y:.545898},{x:.13617633761814535,y:.5546770644907257},{x:.1336155789630079,y:.563118754456429},{x:.12945713255361452,y:.5708986604858821},{x:.12386080515339463,y:.5777178051533947},{x:.11704166048588208,y:.5833141325536145},{x:.10926175445642904,y:.5874725789630079},{x:.10082006449072577,y:.5900333376181454},{x:.092041,y:.590898},{x:.08326193550927423,y:.5900333376181454},{x:.07482024554357093,y:.5874725789630079},{x:.06704033951411792,y:.5833141325536145},{x:.06022119484660536,y:.5777178051533947},{x:.05462486744638546,y:.5708986604858821},{x:.050466421036992094,y:.563118754456429},{x:.04790566238185463,y:.5546770644907257},{x:.047041,y:.545898},{x:.047041,y:.17386599999999997}]],v:[[{x:.003930906419490336,y:.5438334563092145},{x:.005386967221411215,y:.5351329102741644},{x:.00851244255100142,y:.5268836061622384},{x:.26071044255100145,y:.018289606162238365},{x:.26144011887972296,y:.017121905714788027},{x:.2620056398700735,y:.01586646241095203},{x:.26377267234206975,y:.013389122267562115},{x:.26538522214413157,y:.010808560104194675},{x:.26632868500311185,y:.009805649483352854},{x:.267128264504625,y:.008684656842684199},{x:.2693446490294707,y:.006599649029470163},{x:.2714296568426842,y:.00438326450462502},{x:.27255064948335267,y:.0035836850031119977},{x:.2735535601041947,y:.0026402221441315446},{x:.27613412226756273,y:.0010276723420693272},{x:.278611462410952,y:-.0007393601299264599},{x:.2798669057147878,y:-.0013048811202769175},{x:.28103460616223835,y:-.0020345574489985807},{x:.28388017640738666,y:-.0031126798553442526},{x:.2866546460885495,y:-.00436245420755494},{x:.28799629407344673,y:-.00467218403223142},{x:.2892839102741644,y:-.005160032778588779},{x:.2922851349323858,y:-.00566229614975999},{x:.29525011283741587,y:-.006346784254711718},{x:.2966264067237199,y:-.006388820170250395},{x:.2979844563092145,y:-.006616093580509658},{x:.301026,y:-.00652319621682493},{x:.30406754369078554,y:-.006616093580509658},{x:.3054255932762801,y:-.006388820170250395},{x:.30680188716258416,y:-.006346784254711718},{x:.30976686506761425,y:-.005662296149759988},{x:.31276808972583564,y:-.005160032778588779},{x:.3140557059265533,y:-.00467218403223142},{x:.3153973539114505,y:-.00436245420755494},{x:.3181718235926135,y:-.0031126798553442175},{x:.3210173938377617,y:-.0020345574489985807},{x:.32218509428521225,y:-.0013048811202769192},{x:.323440537589048,y:-.0007393601299264599},{x:.32591787773243747,y:.0010276723420694187},{x:.32849843989580535,y:.0026402221441315446},{x:.32950135051664736,y:.0035836850031119635},{x:.3306223431573158,y:.00438326450462502},{x:.3327073509705293,y:.006599649029470129},{x:.334923735495375,y:.008684656842684203},{x:.33572331499688823,y:.009805649483352899},{x:.33666677785586846,y:.01080856010419469},{x:.3382793276579303,y:.013389122267562135},{x:.3400463601299265,y:.01586646241095204},{x:.34061188112027707,y:.017121905714788034},{x:.3413415574489986,y:.018289606162238365},{x:.5935395574489987,y:.5268836061622384},{x:.5966650327785888,y:.5351329102741644},{x:.5981210935805097,y:.5438334563092145},{x:.5978517842547117,y:.5526508871625841},{x:.595867454207555,y:.5612463539114505},{x:.5922443601299265,y:.569289537589048},{x:.587121735495375,y:.5764713431573159},{x:.5806964398958053,y:.5825157778558685},{x:.5732153938377617,y:.5871905574489986},{x:.5649660897258356,y:.5903160327785888},{x:.5562655436907855,y:.5917720935805096},{x:.5474481128374159,y:.5915027842547117},{x:.5388526460885495,y:.589518454207555},{x:.5308094624109521,y:.5858953601299265},{x:.5236276568426842,y:.580772735495375},{x:.5175832221441315,y:.5743474398958054},{x:.5129084425510014,y:.5668663938377616},{x:.301026,y:.13957458745236595},{x:.08914355744899859,y:.5668663938377616},{x:.08446877785586845,y:.5743474398958054},{x:.07842434315731579,y:.580772735495375},{x:.07124253758904797,y:.5858953601299265},{x:.06319935391145051,y:.589518454207555},{x:.054603887162584124,y:.5915027842547117},{x:.04578645630921451,y:.5917720935805096},{x:.037085910274164385,y:.5903160327785888},{x:.028836606162238352,y:.5871905574489986},{x:.02135556010419467,y:.5825157778558685},{x:.014930264504625007,y:.5764713431573159},{x:.009807639870073534,y:.569289537589048},{x:.006184545792445054,y:.5612463539114505},{x:.004200215745288276,y:.5526508871625841},{x:.003930906419490336,y:.5438334563092145}]],w:[[{x:-.04481226541001698,y:.5427688011711321},{x:-.0431501306438814,y:.534105261341125},{x:.1073618693561186,y:.025511261341124997},{x:.10747750697825527,y:.02522662926113043},{x:.10753949092041715,y:.02492572151525217},{x:.1091366577408943,y:.021142772088450095},{x:.11068223944402648,y:.01733845540642648},{x:.11085118408582124,y:.017081852232977028},{x:.1109706812129555,y:.01679881881229654},{x:.11327517574267339,y:.0134001494872997},{x:.11553324489331337,y:.009970459715744673},{x:.11574900410692728,y:.009751746564891355},{x:.11592142221145292,y:.009497464285038355},{x:.11884468401801046,y:.006613684018010047},{x:.12172846428503836,y:.0036904222114529234},{x:.12198274656489135,y:.0035180041069272803},{x:.12220145971574467,y:.0033022448933133844},{x:.1256311494872997,y:.001044175742673395},{x:.12902981881229655,y:-.0012603187870445023},{x:.12931285223297703,y:-.0013798159141787526},{x:.12956945540642648,y:-.0015487605559735135},{x:.1333737720884501,y:-.0030943422591057004},{x:.13715672151525218,y:-.004691509079582858},{x:.13745762926113045,y:-.004753493021744735},{x:.137742261341125,y:-.004869130643881392},{x:.14177500717701197,y:-.005642829061426576},{x:.14579686008065018,y:-.006471289947453558},{x:.1461040784358031,y:-.006473378696506754},{x:.14640580117113214,y:-.006531265410016966},{x:.150512,y:-.006503347745684165},{x:.15461819882886788,y:-.006531265410016966},{x:.15491992156419693,y:-.006473378696506754},{x:.15522713991934983,y:-.006471289947453558},{x:.159248992822988,y:-.005642829061426585},{x:.16328173865887502,y:-.004869130643881392},{x:.16356637073886957,y:-.004753493021744732},{x:.16386727848474786,y:-.004691509079582851},{x:.1676502279115502,y:-.0030943422591055763},{x:.17145454459357354,y:-.0015487605559735135},{x:.17171114776702298,y:-.0013798159141787517},{x:.17199418118770346,y:-.0012603187870445023},{x:.17539285051270065,y:.001044175742673613},{x:.17882254028425534,y:.0033022448933133844},{x:.17904125343510863,y:.0035180041069272374},{x:.17929553571496165,y:.0036904222114529095},{x:.18217931598198978,y:.006613684018010279},{x:.1851025777885471,y:.009497464285038375},{x:.18527499589307275,y:.009751746564891386},{x:.18549075510668664,y:.009970459715744683},{x:.1877488242573266,y:.013400149487299715},{x:.1900533187870445,y:.016798818812296553},{x:.19017281591417878,y:.01708185223297707},{x:.19034176055597352,y:.01733845540642648},{x:.19188734225910553,y:.02114277208844964},{x:.19348450907958287,y:.02492572151525217},{x:.19354649302174473,y:.02522662926113043},{x:.1936621306438814,y:.025511261341124997},{x:.30102443002882817,y:.38829842311817664},{x:.4083889386148475,y:.025511027311792445},{x:.40850451632069196,y:.025226547135196155},{x:.40856646677585007,y:.0249257992040805},{x:.410163689741502,y:.021142697708463984},{x:.41170935302882616,y:.01733823938560964},{x:.41187820927072055,y:.017081773507688556},{x:.41199764237598097,y:.016798890297984457},{x:.41430222163921304,y:.013400082779514221},{x:.4165603984391837,y:.009970270005002412},{x:.41677604416644776,y:.009751674265617277},{x:.4169483701745541,y:.009497526820430955},{x:.41987174204670485,y:.006613627545966159},{x:.42275565189129766,y:.0036902661012626486},{x:.42300979995956794,y:.0035179410120882958},{x:.4232283964786704,y:.003302296075210584},{x:.4266582174181369,y:.0010441316765615349},{x:.4300570332693414,y:-.001260435297455717},{x:.43033991691088264,y:-.001379867379883588},{x:.4305963833993421,y:-.0015487226944633017},{x:.43440084731088763,y:-.0030943722258508074},{x:.43818395458161874,y:-.004691581512785238},{x:.43848470273672896,y:-.004753530880516994},{x:.4387691833312223,y:-.0048691075577547704},{x:.44280208680029426,y:-.005642843777199688},{x:.4468241027997286,y:-.0064713155198797695},{x:.44713115788546864,y:-.006473401493455157},{x:.44743272015628793,y:-.006531257986460835},{x:.45153908096424766,y:-.006503346644966049},{x:.45564544187310013,y:-.00653124313893301},{x:.4559470039347234,y:-.006473385555557348},{x:.4562540590129192,y:-.0064712984717510205},{x:.4602760720167908,y:-.005642812186517322},{x:.4643089726882076,y:-.004869061385152536},{x:.46459345286480397,y:-.004753483679308031},{x:.46489420079591953,y:-.0046915332241499325},{x:.46867730229153426,y:-.003094310258498727},{x:.4724817606143904,y:-.0015486469711738574},{x:.4727382264923116,y:-.0013797907292793573},{x:.47302110970201555,y:-.0012603576240190345},{x:.4764199172204845,y:.0010442216392121837},{x:.47984972999499764,y:.0033023984391836667},{x:.4800683257343829,y:.003518044166447842},{x:.48032247317956905,y:.003690370174554085},{x:.483206372454032,y:.0066137420467029156},{x:.48612973389873737,y:.009497651891297622},{x:.4863020589879118,y:.009751799959568049},{x:.48651770392478944,y:.009970396478670394},{x:.4887758683234383,y:.01340021741813658},{x:.49108043529745576,y:.016799033269341422},{x:.49119986737988364,y:.017081916910882677},{x:.4913687226944633,y:.017338383399342037},{x:.4929143722258502,y:.021142847310886045},{x:.4945115815127853,y:.024925954581618698},{x:.4945735308805171,y:.025226702736729056},{x:.4946891075577548,y:.025511183331222268},{x:.6452021075577549,y:.5341051833312223},{x:.6468642579864609,y:.542768720156288},{x:.646804298471751,y:.5515900590129192},{x:.64502453322415,y:.5602302007959196},{x:.641593357624019,y:.5683571097020156},{x:.636642629825446,y:.5756584731795691},{x:.6303626035213297,y:.5818537039247894},{x:.622994616600658,y:.5867047226944633},{x:.6148218166687778,y:.5900251075577548},{x:.6061582798437121,y:.5916872579864608},{x:.5973369409870808,y:.591627298471751},{x:.5886967992040805,y:.58984753322415},{x:.5805698902979844,y:.5864163576240191},{x:.573268526820431,y:.5814656298254459},{x:.5670732960752106,y:.5751856035213296},{x:.5622222773055368,y:.567817616600658},{x:.5589018924422452,y:.5596448166687777},{x:.4515387133151436,y:.1968570925189096},{x:.34417406138515255,y:.5596449726882076},{x:.3440584683142858,y:.559929490683899},{x:.34399650907958285,y:.5602302784847478},{x:.3423992950207163,y:.5640133397974443},{x:.3408536469711739,y:.5678177606143904},{x:.3406847682813525,y:.5680742605871558},{x:.34056531878704455,y:.5683571811877035},{x:.33826075609875456,y:.5717559510329858},{x:.33600260156081635,y:.5751857299949976},{x:.33578692716538155,y:.5754043547947312},{x:.3356145777885471,y:.5756585357149616},{x:.33269122952253233,y:.5785424012737268},{x:.32980734810870244,y:.5814657338987373},{x:.3295531662537196,y:.581638081896991},{x:.3293345402842553,y:.5818537551066867},{x:.3259047490749403,y:.5841118910428063},{x:.32250596673065857,y:.5864164352974557},{x:.322223045482268,y:.5865358832573104},{x:.32196654459357354,y:.5867047605559735},{x:.318162115393689,y:.5882503879717952},{x:.31437904541838135,y:.5898475815127853},{x:.31407825728149374,y:.5899095391161314},{x:.313793738658875,y:.5900251306438814},{x:.30976087354902626,y:.5907988519446131},{x:.3057388972002714,y:.5916273155198798},{x:.3054318012943039,y:.5916294017707667},{x:.3051301988288679,y:.5916872654100169},{x:.30102387855356455,y:.5916593469199811},{x:.29691755812689985,y:.5916872431389331},{x:.2966159559752979,y:.5916293778639092},{x:.2963088600806502,y:.5916272899474536},{x:.29228688822522214,y:.5907988045585649},{x:.28825402731179245,y:.5900250613851525},{x:.2879695093161011,y:.5899094683142858},{x:.2876687215152522,y:.5898475090795828},{x:.2838856602025565,y:.5882502950207166},{x:.28008123938560964,y:.5867046469711739},{x:.27982473941284386,y:.5865357682813523},{x:.27954181881229656,y:.5864163187870445},{x:.276143048967013,y:.5841117560987538},{x:.2727132700050024,y:.5818536015608163},{x:.2724946452052691,y:.5816379271653819},{x:.27224046428503834,y:.5814655777885471},{x:.2693565987262721,y:.5785422295225312},{x:.2664332661012626,y:.5756583481087024},{x:.2662609181030087,y:.5754041662537193},{x:.2660452448933134,y:.5751855402842553},{x:.26378710895719626,y:.5717557490749442},{x:.2614825647025443,y:.5683569667306586},{x:.2613631167426894,y:.5680740454822678},{x:.2611942394440265,y:.5678175445935736},{x:.2596486120282045,y:.5640131153936881},{x:.2580514184872148,y:.5602300454183813},{x:.25798946088386876,y:.5599292572814941},{x:.2578738693561186,y:.559644738658875},{x:.150512,y:.196859029989096},{x:.0431501306438814,y:.559644738658875},{x:.039829760555973516,y:.5678175445935736},{x:.034978755106686646,y:.5751855402842553},{x:.028783535714961644,y:.5814655777885471},{x:.021482181187703456,y:.5864163187870445},{x:.01335527848474783,y:.5898475090795828},{x:.0047151399193498065,y:.5916272899474536},{x:-.004106198828867862,y:.5916872654100169},{x:-.01276973865887501,y:.5900251306438814},{x:-.020942544593573535,y:.5867047605559735},{x:-.028310540284255312,y:.5818537551066867},{x:-.034590577788547086,y:.5756585357149616},{x:-.03954131878704451,y:.5683571811877035},{x:-.04297250907958286,y:.5602302784847478},{x:-.04475228994745356,y:.5515901399193498},{x:-.04481226541001698,y:.5427688011711321}]],x:[[{x:-.007882248997940308,y:.03911618267902263},{x:-.007180671607209664,y:.030322582532795114},{x:-.0047770285451087455,y:.021834819906700376},{x:-.0007636904665355299,y:.013979074758467071},{x:.004705112296856322,y:.007057238968589209},{x:.011419216721809594,y:.001335314804661543},{x:.019120603540586492,y:-.0029668073965882433},{x:.02751331277672888,y:-.0056837994916240225},{x:.036274817320977384,y:-.006711248997940296},{x:.04506841746720488,y:-.006009671607209652},{x:.05355618009329963,y:-.003606028545108733},{x:.061411925241532925,y:.0004073095334644686},{x:.0683337610314108,y:.005876112296856327},{x:.3010265,y:.23008742701759316},{x:.5337192389685892,y:.005876112296856327},{x:.540641074758467,y:.0004073095334644686},{x:.5484968199067003,y:-.003606028545108733},{x:.556984582532795,y:-.006009671607209652},{x:.5657781826790226,y:-.006711248997940296},{x:.5745396872232711,y:-.0056837994916240225},{x:.5829323964594135,y:-.0029668073965882433},{x:.5906337832781904,y:.001335314804661536},{x:.5973478877031436,y:.007057238968589213},{x:.6028166904665355,y:.013979074758467089},{x:.6068300285451087,y:.021834819906700383},{x:.6092336716072096,y:.030322582532795128},{x:.6099352489979403,y:.03911618267902263},{x:.608907799491624,y:.047877687223271126},{x:.6061908073965883,y:.05627039645941352},{x:.6018886851953384,y:.0639717832781904},{x:.5961667610314108,y:.07068588770314368},{x:.36588095484811606,y:.292578},{x:.5961667610314108,y:.5144701122968564},{x:.6018886851953384,y:.5211842167218096},{x:.6061908073965883,y:.5288856035405864},{x:.608907799491624,y:.5372783127767289},{x:.6099352489979403,y:.5460398173209774},{x:.6092336716072096,y:.5548334174672048},{x:.6068300285451087,y:.5633211800932996},{x:.6028166904665355,y:.571176925241533},{x:.5973478877031436,y:.5780987610314108},{x:.5906337832781904,y:.5838206851953385},{x:.5829323964594135,y:.5881228073965883},{x:.5745396872232711,y:.590839799491624},{x:.5657781826790226,y:.5918672489979403},{x:.556984582532795,y:.5911656716072097},{x:.5484968199067003,y:.5887620285451087},{x:.540641074758467,y:.5847486904665355},{x:.5337192389685892,y:.5792798877031436},{x:.3010265,y:.35506857298240685},{x:.0683337610314108,y:.5792798877031436},{x:.06141192524153289,y:.5847486904665355},{x:.05355618009329961,y:.5887620285451087},{x:.0450684174672049,y:.5911656716072097},{x:.03627481732097735,y:.5918672489979403},{x:.02751331277672888,y:.590839799491624},{x:.01912060354058648,y:.5881228073965883},{x:.011419216721809584,y:.5838206851953385},{x:.004705112296856315,y:.5780987610314108},{x:-.0007636904665355368,y:.571176925241533},{x:-.004777028545108752,y:.5633211800932996},{x:-.007180671607209664,y:.5548334174672048},{x:-.007882248997940308,y:.5460398173209774},{x:-.006854799491624035,y:.5372783127767289},{x:-.004137807396588256,y:.5288856035405864},{x:.0001643148046615306,y:.5211842167218096},{x:.005886238968589197,y:.5144701122968564},{x:.23617204515188386,y:.292578},{x:.005886238968589197,y:.07068588770314368},{x:.00016431480466150977,y:.0639717832781904},{x:-.004137807396588256,y:.05627039645941351},{x:-.006854799491624035,y:.047877687223271126},{x:-.007882248997940308,y:.03911618267902263}]],y:[[{x:-7800000000000168e-20,y:-.15516599999999992},{x:.0007866623818546317,y:-.16394506449072568},{x:.003347421036992093,y:-.17238675445642895},{x:.007505867446385456,y:-.180166660485882},{x:.013102194846605353,y:-.18698580515339455},{x:.0199213395141179,y:-.19258213255361445},{x:.02770124554357093,y:-.1967405789630078},{x:.03614293550927421,y:-.19930133761814528},{x:.044922,y:-.2001659999999999},{x:.084618,y:-.2001659999999999},{x:.08470326921416556,y:-.20015760171543356},{x:.08478856964894584,y:-.200165676732115},{x:.08909199801123496,y:-.19972534965725622},{x:.09339706449072577,y:-.19930133761814528},{x:.0934790568568106,y:-.19927646550581232},{x:.09356429362525961,y:-.1992677440740231},{x:.09769912926743524,y:-.1979963205354665},{x:.10183875445642904,y:-.1967405789630078},{x:.1019143190537861,y:-.19670018884423682},{x:.10199621655469396,y:-.19667500612370953},{x:.18074721655469395,y:-.16370500612370958},{x:.18295470197399702,y:-.16251430076809983},{x:.18525522528778574,y:-.16151511930158513},{x:.18682754729843723,y:-.16042530954354395},{x:.18851130436774752,y:-.15951710034658062},{x:.19044407848245243,y:-.15791861501920362},{x:.19250546725178602,y:-.1564898227103016},{x:.27125546725178606,y:-.08958282271030155},{x:.27347158712358693,y:-.0872898341236823},{x:.27580944257935097,y:-.08512109812948883},{x:.27653091968085064,y:-.08412438503144627},{x:.2773860111192193,y:-.08323963374445845},{x:.2791122089873479,y:-.0805583607511536},{x:.2809820438025964,y:-.07797520343727593},{x:.35909504380259644,y:.055837796562724036},{x:.35921507445013207,y:.05609937330868571},{x:.35938084670619436,y:.05633463764830328},{x:.359814044874128,y:.05731131476590327},{x:.3603874218559792,y:.0582128676935936},{x:.5972854218559792,y:.5265638676935935},{x:.6004763520268956,y:.5347880745861305},{x:.6020015061983327,y:.5434767752438966},{x:.6018022735507984,y:.5522960677732933},{x:.5998863104832066,y:.5609070317083322},{x:.5963272463817603,y:.568978752534074},{x:.591261854083932,y:.5762010385458585},{x:.5848847937750224,y:.5822963413425576},{x:.5774411323064065,y:.5870304218559792},{x:.5692169254138695,y:.5902213520268956},{x:.5605282247561034,y:.5917465061983327},{x:.5517089322267067,y:.5915472735507984},{x:.5430979682916678,y:.5896313104832066},{x:.5350262474659261,y:.5860722463817603},{x:.5278039614541415,y:.5810068540839319},{x:.5217086586574424,y:.5746297937750224},{x:.5169745781440208,y:.5671861323064065},{x:.3203411783046204,y:.17843886787959407},{x:.12481771439881506,y:.5670983271806026},{x:.12009991274687032,y:.5745523168465348},{x:.11401856108654926,y:.5809426827476728},{x:.10680736235169674,y:.5860238467061943},{x:.09874343886560628,y:.5896005424407229},{x:.09013668268554793,y:.5915353195400148},{x:.08131784662479694,y:.5917538256051798},{x:.0726258336075076,y:.5902476635706729},{x:.06439467281939737,y:.5870747143988151},{x:.05694068315346515,y:.5823569127468703},{x:.05055031725232718,y:.5762755610865493},{x:.04546915329380567,y:.5690643623516968},{x:.041892457559277035,y:.5610004388656062},{x:.039957680459985136,y:.5523936826855479},{x:.039739174394820276,y:.5435748466247969},{x:.0412453364293271,y:.5348828336075077},{x:.04441828560118493,y:.5266516728193974},{x:.26905653043412125,y:.0801181620528446},{x:.20712852539925722,y:-.025968816269973185},{x:.1395520619925953,y:-.08338263769409424},{x:.07557825049874085,y:-.11016599999999992},{x:.044922,y:-.11016599999999992},{x:.03614293550927422,y:-.11103066238185455},{x:.02770124554357096,y:-.11359142103699202},{x:.01992133951411791,y:-.11774986744638538},{x:.01310219484660536,y:-.12334619484660528},{x:.007505867446385456,y:-.13016533951411782},{x:.003347421036992093,y:-.13794524554357088},{x:.0007866623818546317,y:-.14638693550927412},{x:-7800000000000168e-20,y:-.15516599999999992}]],z:[[{x:.051680000000000004,y:.038348999999999966},{x:.05192127447228559,y:.035899299172703986},{x:.05194879067317478,y:.033437899088824954},{x:.05235257576103353,y:.03152022369965088},{x:.05254466238185464,y:.029569935509274177},{x:.053259213756049764,y:.02721437531096308},{x:.05376639657582897,y:.024805638484003446},{x:.054536542955643516,y:.023003585252525667},{x:.0551054210369921,y:.02112824554357092},{x:.05626578950451143,y:.018957348831652537},{x:.05723314819184797,y:.01669384166703705},{x:.05834005957014514,y:.015076662488338128},{x:.05926386744638546,y:.01334833951411787},{x:.060825460697764414,y:.011445532631778232},{x:.062215820200804926,y:.009414240440453706},{x:.0636169585940798,y:.00804408260344652},{x:.06486019484660537,y:.0065291948466053296},{x:.06676300172894496,y:.004967601595226417},{x:.06852293131171022,y:.0032465857969436324},{x:.07016445175727676,y:.0021761036989109733},{x:.07167933951411792,y:.0009328674463854256},{x:.07385023622603624,y:-.00022750102113387976},{x:.07591210278164046,y:-.0015721027544036703},{x:.07773092256935071,y:-.0023017710867676167},{x:.07945924554357096,y:-.003225578963007937},{x:.08181480574188199,y:-.003940130337203038},{x:.08409937289490133,y:-.004856645714911602},{x:.08602559580031956,y:-.00521745953679684},{x:.08790093550927423,y:-.0057863376181453985},{x:.09035063633657014,y:-.00602761209043098},{x:.09277010945251417,y:-.006480819940600742},{x:.09472971180962335,y:-.006458913379178931},{x:.09668,y:-.006651000000000032},{x:.505373,y:-.006651000000000032},{x:.5141520644907257,y:-.0057863376181453985},{x:.522593754456429,y:-.003225578963007937},{x:.5303736604858821,y:.0009328674463854256},{x:.5371928051533946,y:.0065291948466053296},{x:.5427891325536145,y:.013348339514117874},{x:.5469475789630078,y:.021128245543570928},{x:.5495083376181453,y:.029569935509274198},{x:.550373,y:.038348999999999966},{x:.5495083376181453,y:.047128064490725735},{x:.5469475789630078,y:.055569754456429005},{x:.5427891325536145,y:.06334966048588206},{x:.5371928051533946,y:.0701688051533946},{x:.5303736604858821,y:.0757651325536145},{x:.522593754456429,y:.07992357896300786},{x:.5141520644907257,y:.08248433761814533},{x:.505373,y:.08334899999999996},{x:.190464663126857,y:.08334899999999996},{x:.5404754142030563,y:.5196949313117102},{x:.5415458963010891,y:.5213364517572769},{x:.5427891325536145,y:.5228513395141179},{x:.5439495010211337,y:.525022236226036},{x:.5452941027544036,y:.5270841027816404},{x:.5460237710867677,y:.5289029225693511},{x:.5469475789630078,y:.530631245543571},{x:.5476621303372028,y:.5329868057418816},{x:.5485786457149116,y:.5352713728949013},{x:.5489394595367969,y:.53719759580032},{x:.5495083376181453,y:.5390729355092743},{x:.5497496120904308,y:.5415226363365697},{x:.5502028199406007,y:.5439421094525142},{x:.5501809133791788,y:.5459017118096235},{x:.550373,y:.547852},{x:.5501317255277144,y:.5503017008272966},{x:.5501042093268251,y:.552763100911175},{x:.5497004242389665,y:.5546807763003486},{x:.5495083376181453,y:.5566310644907257},{x:.5487937862439503,y:.5589866246890365},{x:.548286603424171,y:.5613953615159966},{x:.5475164570443563,y:.5631974147474748},{x:.5469475789630078,y:.565072754456429},{x:.5457872104954887,y:.567243651168347},{x:.544819851808152,y:.569507158332963},{x:.5437129404298549,y:.5711243375116617},{x:.5427891325536145,y:.5728526604858821},{x:.5412275393022352,y:.5747554673682221},{x:.539837179799195,y:.5767867595595463},{x:.5384360414059206,y:.578156917396553},{x:.5371928051533946,y:.5796718051533947},{x:.5352899982710546,y:.5812333984047738},{x:.5335300686882897,y:.5829544142030564},{x:.5318885482427235,y:.5840248963010888},{x:.5303736604858821,y:.5852681325536145},{x:.5282027637739638,y:.5864285010211338},{x:.5261408972183595,y:.5877731027544036},{x:.5243220774306487,y:.5885027710867679},{x:.522593754456429,y:.5894265789630079},{x:.5202381942581186,y:.5901411303372028},{x:.5179536271050986,y:.5910576457149116},{x:.5160274041996802,y:.5914184595367968},{x:.5141520644907257,y:.5919873376181454},{x:.5117023636634302,y:.5922286120904309},{x:.5092828905474858,y:.5926818199406008},{x:.5073232881903766,y:.5926599133791789},{x:.505373,y:.592852},{x:.09668,y:.592852},{x:.08790093550927423,y:.5919873376181454},{x:.07945924554357094,y:.5894265789630079},{x:.07167933951411792,y:.5852681325536145},{x:.06486019484660537,y:.5796718051533947},{x:.05926386744638546,y:.5728526604858821},{x:.0551054210369921,y:.565072754456429},{x:.05254466238185464,y:.5566310644907257},{x:.051680000000000004,y:.547852},{x:.05254466238185464,y:.5390729355092743},{x:.0551054210369921,y:.530631245543571},{x:.05926386744638546,y:.5228513395141179},{x:.06486019484660537,y:.5160321948466053},{x:.07167933951411792,y:.5104358674463855},{x:.07945924554357096,y:.5062774210369921},{x:.08790093550927423,y:.5037166623818546},{x:.09668,y:.502852},{x:.41158833687314295,y:.502852},{x:.06157758579694366,y:.06650606868828973},{x:.06050710369891106,y:.06486454824272328},{x:.05926386744638546,y:.06334966048588206},{x:.05810349897886612,y:.06117876377396365},{x:.05675889724559635,y:.059116897218359485},{x:.05602922891323242,y:.05729807743064926},{x:.0551054210369921,y:.055569754456429005},{x:.054390869662797,y:.05321419425811798},{x:.053474354285088434,y:.050929627105098636},{x:.0531135404632032,y:.04900340419968042},{x:.05254466238185464,y:.047128064490725735},{x:.05230338790956906,y:.04467836366342984},{x:.051850180059399294,y:.04225889054748581},{x:.05187208662082111,y:.04029928819037662},{x:.051680000000000004,y:.038348999999999966}]]},c0=D0;function z(y){return!y||typeof y!=\\\"object\\\"?!1:\\\"route_type\\\"in y\u0026\u0026y.route_type===\\\"wire\\\"\u0026\u0026(\\\"start_width\\\"in y||\\\"end_width\\\"in y||\\\"width_interpolation_mode\\\"in y)}function X0(y){let x=[];for(let e=0;e\u003cy.length-1;e++){let t=y[e];if(!z(t))continue;let r=y[e+1];if(!r)continue;let n=r.route_type===\\\"through_pad\\\"?r.start:{x:r.x,y:r.y},o=r.route_type===\\\"via\\\"?r.from_layer:r.route_type===\\\"through_pad\\\"?r.start_layer:r.layer;if(!n||o!==t.layer||t.width!==t.start_width)continue;let i={start:{x:t.x,y:t.y},end:n,start_width:t.start_width,end_width:t.end_width,width_interpolation_mode:t.width_interpolation_mode,layer:t.layer,is_inside_copper_pour:!!(t.is_inside_copper_pour\u0026\u0026r.is_inside_copper_pour)};f0(i)\u0026\u0026x.push(i)}return x}function $0(y){let{start:x,end:e,start_width:t,end_width:r}=y,n=e.x-x.x,o=e.y-x.y,i=Math.hypot(n,o);if(!f0(y))return[];let a=Math.abs(r-t),c=y.width_interpolation_mode===\\\"linear\\\"?1:Math.max(1,Math.ceil(Math.sqrt(a/(.001+a*1e-6)*(3/8)))),d=-o/i,f=n/i,l=[],p=[];for(let s=0;s\u003c=c;s++){let L=s/c,m=t\u003c=r?L:1-L,_=(y.width_interpolation_mode===\\\"quadratic\\\"?Math.min(t,r)+a*m*m:t+(r-t)*L)/2,h=x.x+n*L,g=x.y+o*L;l.push({x:h+d*_,y:g+f*_}),p.push({x:h-d*_,y:g-f*_})}return[...l,...p.reverse()]}function f0(y){let{start:x,end:e,start_width:t,end_width:r}=y,n=Math.hypot(e.x-x.x,e.y-x.y);return!(![x.x,x.y,e.x,e.y,n,t,r].every(Number.isFinite)||n\u003c=0||t\u003c=0||r\u003c=0||y.width_interpolation_mode!==\\\"linear\\\"\u0026\u0026y.width_interpolation_mode!==\\\"quadratic\\\")}var H=class{constructor(y=[1,1,1,1],x=0,e=0){M(this,\\\"color\\\");M(this,\\\"element\\\");M(this,\\\"category\\\");M(this,\\\"vertices\\\",[]);M(this,\\\"indices\\\",[]);this.color=y,this.element=x,this.category=e}polygon(y){if(!y[0]||y[0].length\u003c3)return;let x=[],e=[];for(let[n,o]of y.entries()){n\u0026\u0026e.push(x.length/2);for(let i of o){if(!Number.isFinite(i.x)||!Number.isFinite(i.y))throw new Error(\\\"Non-finite polygon vertex\\\");x.push(i.x,i.y)}}let t=V(x,e,2),r=this.vertices.length/8;for(let n=0;n\u003cx.length;n+=2)this.vertices.push(x[n],x[n+1],...this.color,this.element,this.category);for(let n of t)this.indices.push(r+n)}line(y,x,e){if(!(e\u003e0))return;let t=Math.atan2(x.y-y.y,x.x-y.x),r=e/2,n=[];for(let o=0;o\u003c=12;o++){let i=t+Math.PI/2+o*Math.PI/12;n.push({x:y.x+r*Math.cos(i),y:y.y+r*Math.sin(i)})}for(let o=0;o\u003c=12;o++){let i=t-Math.PI/2+o*Math.PI/12;n.push({x:x.x+r*Math.cos(i),y:x.y+r*Math.sin(i)})}this.polygon([n])}path(y,x,e=!1){for(let t=1;t\u003cy.length;t++)this.line(y[t-1],y[t],x);e\u0026\u0026y.length\u003e2\u0026\u0026this.line(y.at(-1),y[0],x)}build(){return{vertices:new Float32Array(this.vertices),indices:new Uint32Array(this.indices)}}};function Y(y,x,e=0){let t=e*Math.PI/180,r=y.x-x.x,n=y.y-x.y;return{x:x.x+r*Math.cos(t)-n*Math.sin(t),y:x.y+r*Math.sin(t)+n*Math.cos(t)}}function q(y,x,e=x,t=0){return x\u003e0\u0026\u0026e\u003e0?Array.from({length:96},(r,n)=\u003e{let o=n*2*Math.PI/96;return Y({x:y.x+Math.cos(o)*x/2,y:y.y+Math.sin(o)*e/2},y,t)}):[]}function p0(y,x,e,t=0,r=0){if(!(x\u003e0\u0026\u0026e\u003e0))return[];t=Math.max(0,Math.min(t,x/2,e/2));let n=[];for(let o=0;o\u003c4;o++){let i=o===0||o===3?1:-1,a=o\u003c2?1:-1,c=t?24:1;for(let d=0;d\u003cc;d++){let f=(o+d/(c-1||1))*Math.PI/2;n.push(Y({x:y.x+i*(x/2-t)+t*Math.cos(f),y:y.y+a*(e/2-t)+t*Math.sin(f)},y,r))}}return n}function V0(y){let x=[];for(let e=0;e\u003cy.length;e++){let t=y[e],r=y[(e+1)%y.length];x.push({x:t.x,y:t.y});let n=t.bulge??0,o=r.x-t.x,i=r.y-t.y;if(!n||!o\u0026\u0026!i)continue;let a=4*Math.atan(n),c={x:(t.x+r.x)/2-i*(1-n*n)/(4*n),y:(t.y+r.y)/2+o*(1-n*n)/(4*n)},d=Math.atan2(t.y-c.y,t.x-c.x),f=Math.hypot(t.x-c.x,t.y-c.y),l=Math.max(2,Math.ceil(Math.abs(a)/(Math.PI/48)));for(let p=1;p\u003cl;p++)x.push({x:c.x+f*Math.cos(d+a*p/l),y:c.y+f*Math.sin(d+a*p/l)})}return x}function l0(y,x,e){let t=[];for(let r=0;r\u003cy.length;r++){let n=y[r],o=y[(r+1)%y.length],i=n.x+n.y-x,a=o.x+o.y-x,c=e?i\u003e=0:i\u003c=0,d=e?a\u003e=0:a\u003c=0;if(c\u0026\u0026t.push(n),c!==d){let f=i/(i-a);t.push({x:n.x+f*(o.x-n.x),y:n.y+f*(o.y-n.y)})}}return t}function z0(y,x){let e=y.color,t=[e[0]+(1-e[0])*.4,e[1]+(1-e[1])*.4,e[2]+(1-e[2])*.4,e[3]];y.color=[t[0],t[1],t[2],t[3]*.2],y.polygon(x),y.color=t;let r=new H;r.polygon(x);let n=.15*Math.SQRT2/2;for(let o=0;o\u003cr.indices.length;o+=3){let i=r.indices.slice(o,o+3).map(f=\u003e({x:r.vertices[f*8],y:r.vertices[f*8+1]})),a=i.map(f=\u003ef.x+f.y),c=Math.ceil(Math.min(...a)-n),d=Math.floor(Math.max(...a)+n);for(let f=c;f\u003c=d;f++)y.polygon([l0(l0(i,f-n,!0),f+n,!1)])}y.color=e}function H0(y,x){let e=!1;for(let t=0,r=y.length-1;t\u003cy.length;r=t++){let n=y[t],o=y[r];n.y\u003ex.y!=o.y\u003ex.y\u0026\u0026x.x\u003c(o.x-n.x)*(x.y-n.y)/(o.y-n.y)+n.x\u0026\u0026(e=!e)}return e}function u0(y,x){let e=x.filter(t=\u003et.length\u003e=3).map(t=\u003e({ring:t,parents:[]}));for(let[t,r]of e.entries())r.parents=e.flatMap((n,o)=\u003et!==o\u0026\u0026H0(n.ring,r.ring[0])?[o]:[]);for(let[t,r]of e.entries())if(r.parents.length%2===0){let n=e.filter(o=\u003eo.parents.length===r.parents.length+1\u0026\u0026o.parents.includes(t));y.polygon([r.ring,...n.map(o=\u003eo.ring)])}}var q0=y=\u003es0[y]??(y===\\\" \\\"?R.spaceWidthRatio:R.glyphWidthRatio);function d0(y,x,e){let t=q0(y),r=x?R.letterSpacingRatio:0,n=x?a0[y]?.[x]??0:0;return e*(t+r+n)}function j0(y,x){let e=x*R.glyphWidthRatio,t=x*R.letterSpacingRatio,r=x*R.spaceWidthRatio,n=x*R.strokeWidthRatio,o=x*R.lineHeightRatio,i=y.replace(/\\\\\\\\n/g,`\\n`).split(`\\n`),a=i.map(f=\u003e{let l=Array.from(f);return l.reduce((p,s,L)=\u003ep+d0(s,l[L+1],x),0)}),c=a.reduce((f,l)=\u003eMath.max(f,l),0),d=i.length\u003e1?x+(i.length-1)*o:x;return{width:c,height:d,glyphWidth:e,letterSpacing:t,spaceWidth:r,strokeWidth:n,lineHeight:o,lines:i,lineWidths:a}}function K0(y){let{line:x,fontSize:e,startX:t,startY:r}=y,n=e,o=e,i=Array.from(x),a=[],c=t+y.layout.strokeWidth/2;return i.forEach((d,f)=\u003e{let l=c0[d];if(l?.length){let p=[];for(let s of l){let L=s.map(m=\u003e({x:c+m.x*o,y:r+(1-m.y)*n}));L.length\u003e=3\u0026\u0026p.push(L)}p.length\u003e0\u0026\u0026a.push(p)}c+=d0(d,i[f+1],e)}),a}function J0(y){let x=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let n of y)for(let o of n)x=Math.min(x,o.x),e=Math.min(e,o.y),t=Math.max(t,o.x),r=Math.max(r,o.y);return x===Number.POSITIVE_INFINITY||e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||r===Number.NEGATIVE_INFINITY?null:{minX:x,minY:e,maxX:t,maxY:r}}function Q0(y,x,e){let t=x5(y,x),r=e5(t,x,e),n=J0(r.flat()),o=t5(y,x,n);return{bounds:n?i5(n,o):null,glyphGroups:o5(r,o),linePlacements:t.map(({line:i,startX:a,startY:c})=\u003e({line:i,startX:a+o.x,startY:c+o.y})),startOffset:o}}function y5(y,x){let e=x.width+x.strokeWidth,t=x.height+x.strokeWidth,r=0,n=0;return y===\\\"center\\\"||y===\\\"top_center\\\"||y===\\\"bottom_center\\\"?r=-e/2:y===\\\"top_left\\\"||y===\\\"bottom_left\\\"||y===\\\"center_left\\\"?r=0:y===\\\"top_right\\\"||y===\\\"bottom_right\\\"||y===\\\"center_right\\\"?r=-e:(y===\\\"top_center\\\"||y===\\\"bottom_center\\\")\u0026\u0026(r=-e/2),y===\\\"center\\\"||y===\\\"center_left\\\"||y===\\\"center_right\\\"?n=-t/2:y===\\\"top_left\\\"||y===\\\"top_right\\\"||y===\\\"top_center\\\"?n=0:(y===\\\"bottom_left\\\"||y===\\\"bottom_right\\\"||y===\\\"bottom_center\\\")\u0026\u0026(n=-t),{x:r,y:n}}function x5(y,x){return x.lines.map((e,t)=\u003e({line:e,startX:s5({alignment:y,lineWidth:x.lineWidths[t],maxWidth:x.width,strokeWidth:x.strokeWidth}),startY:t*x.lineHeight}))}function e5(y,x,e){return y.flatMap(({line:t,startX:r,startY:n})=\u003eK0({line:t,fontSize:e,startX:r,startY:n,layout:x}))}function t5(y,x,e){return e?{x:-r5(y,e),y:-n5(y,e)}:y5(y,x)}function r5(y,x){return y===\\\"top_left\\\"||y===\\\"bottom_left\\\"||y===\\\"center_left\\\"?x.minX:y===\\\"top_right\\\"||y===\\\"bottom_right\\\"||y===\\\"center_right\\\"?x.maxX:(x.minX+x.maxX)/2}function n5(y,x){return y===\\\"top_left\\\"||y===\\\"top_right\\\"||y===\\\"top_center\\\"?x.minY:y===\\\"bottom_left\\\"||y===\\\"bottom_right\\\"||y===\\\"bottom_center\\\"?x.maxY:(x.minY+x.maxY)/2}function o5(y,x){return x.x===0\u0026\u0026x.y===0?y:y.map(e=\u003ee.map(t=\u003et.map(r=\u003e({x:r.x+x.x,y:r.y+x.y}))))}function i5(y,x){return{minX:y.minX+x.x,minY:y.minY+x.y,maxX:y.maxX+x.x,maxY:y.maxY+x.y}}function s5(y){let{alignment:x,lineWidth:e,maxWidth:t,strokeWidth:r}=y,n=e+r,o=t+r;return x===\\\"top_left\\\"||x===\\\"bottom_left\\\"||x===\\\"center_left\\\"?0:x===\\\"top_right\\\"||x===\\\"bottom_right\\\"||x===\\\"center_right\\\"?o-n:(o-n)/2}function L0(y,x,e=\\\"up\\\"){let t=String(x.text??\\\"\\\");if(!t)return;let r=x.anchor_position??x.center??{x:x.x??0,y:x.y??0},n=x.font_size??1,o=j0(t,n),i=Q0(x.anchor_alignment??\\\"center\\\",o,n),a=x.type===\\\"pcb_note_text\\\",c=x.type===\\\"pcb_fabrication_note_text\\\",d=c?!1:a?x.is_mirrored_from_top_view??x.layer===\\\"bottom\\\":x.type===\\\"pcb_silkscreen_text\\\"?x.layer===\\\"bottom\\\":x.is_mirrored??x.layer===\\\"bottom\\\",f=a||c?0:x.ccw_rotation??0,l=e===\\\"up\\\"?-1:1,p=s=\u003eY({x:r.x+(d?-s.x:s.x),y:r.y+l*s.y},r,-l*f);if(x.is_knockout\u0026\u0026!a\u0026\u0026!c){let s=i.bounds;if(!s)return;let L={left:.2,right:.2,top:.2,bottom:.2,...x.knockout_padding},m=[{x:s.minX-L.left,y:s.minY-L.top},{x:s.maxX+L.right,y:s.minY-L.top},{x:s.maxX+L.right,y:s.maxY+L.bottom},{x:s.minX-L.left,y:s.maxY+L.bottom}];u0(y,[m.map(p),...i.glyphGroups.flatMap(u=\u003eu.map(_=\u003e_.map(p)))]);return}for(let s of i.glyphGroups)u0(y,s.map(L=\u003eL.map(p)))}var b=(y,x,e)=\u003e[y/255,x/255,e/255,1],a5={board:b(70,72,72),top:b(200,52,52),bottom:b(77,127,196),inner1:b(127,200,127),inner2:b(206,125,44),inner3:b(79,203,203),inner4:b(219,98,139),inner5:b(167,165,198),inner6:b(40,204,217),inner7:b(232,178,167),inner8:b(242,237,161),drill:b(255,38,226),top_silkscreen:b(242,237,161),bottom_silkscreen:b(242,237,161),soldermask_top:b(12,55,33),soldermask_bottom:b(12,55,33),top_fabrication:[1,1,1,.5],bottom_fabrication:[1,1,1,.5],top_notes:b(89,148,220),bottom_notes:b(89,148,220),top_courtyard:b(255,0,245),bottom_courtyard:b(38,233,255),edge_cuts:b(208,210,205)},j=y=\u003ey.replace(/_copper$/,\\\"\\\");function c5(y){let x=y.match(/^#([0-9a-f]{3,8})$/i)?.[1];if(x){let t=x.length\u003c=4?[...x].map(r=\u003er+r).join(\\\"\\\"):x;if(t.length!==6\u0026\u0026t.length!==8)throw new Error(`Unsupported color: ${y}`);return[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255,t.length===8?parseInt(t.slice(6),16)/255:1]}let e=y.match(/^rgba?\\\\(([^)]+)\\\\)$/);if(e){let t=e[1].split(\\\",\\\").map(r=\u003eNumber(r.trim()));if((t.length===3||t.length===4)\u0026\u0026t.every(Number.isFinite))return[t[0]/255,t[1]/255,t[2]/255,t[3]??1]}throw new Error(`Unsupported color: ${y}`)}function l5(y,x=0){return y[`${y.type}_id`]??`${y.type}:${x}`}function K(y){return y.center??y.anchor_position??{x:y.x??0,y:y.y??0}}function P(y,x=!1){if(y.shape===\\\"rotated_pill_hole_with_rect_pad\\\"){const museBase=K(y),museCenter=x?{x:museBase.x+(y.hole_offset_x??0),y:museBase.y+(y.hole_offset_y??0)}:museBase,museWidth=x?y.hole_width:y.rect_pad_width,museHeight=x?y.hole_height:y.rect_pad_height;return[p0(museCenter,museWidth,museHeight,x?Math.min(museWidth,museHeight)/2:y.rect_border_radius??0,(x?y.hole_ccw_rotation:y.rect_ccw_rotation)??0)]}if(y.brep_shape)return[y.brep_shape.outer_ring,...y.brep_shape.inner_rings??[]].map(a=\u003eV0(a.vertices));if(y.outline?.length)return[y.outline];let e=x?y.hole_shape??y.shape:y.shape;if(e===\\\"polygon\\\")return[y.points??y.vertices??[]];let t=K(y),r=y.rect_ccw_rotation??y.ccw_rotation??y.rotation??0,n=x?Y({x:t.x+(y.hole_offset_x??0),y:t.y+(y.hole_offset_y??0)},t,r):t;if(e===\\\"circle\\\"||e===\\\"circular_hole_with_rect_pad\\\"\u0026\u0026x||y.type===\\\"pcb_via\\\"){let a=x?y.hole_diameter:y.outer_diameter??(y.radius!=null?y.radius*2:y.diameter);return[q(n,a||y.diameter||y.hole_diameter||y.radius*2)]}let o=x?y.hole_width??y.hole_diameter:y.rect_pad_width??y.outer_width??y.width??y.hole_diameter,i=x?y.hole_height??y.hole_diameter:y.rect_pad_height??y.outer_height??y.height??y.hole_diameter;if(e===\\\"oval\\\")return[q(n,o,i,r)];if([\\\"rect\\\",\\\"square\\\",\\\"rotated_rect\\\",\\\"roundrect\\\",\\\"rounded_rect\\\",\\\"pill\\\",\\\"rotated_pill\\\",\\\"circular_hole_with_rect_pad\\\",\\\"pill_hole_with_rect_pad\\\",void 0].includes(e)){let c=e?.includes(\\\"pill\\\")\u0026\u0026!(e===\\\"pill_hole_with_rect_pad\\\"\u0026\u0026!x)?Math.min(o,i)/2:y.corner_radius??y.rect_border_radius??0;return[p0(n,o,i,c,r)]}throw new Error(`Unsupported shape: ${e}`)}function u5(y,x={}){let e=new Map,t=[],r=y.map(l5),n=y.find(l=\u003el.type===\\\"pcb_board\\\"),o=[\\\"top\\\",...Array.from({length:Math.max(0,Math.min(8,(n?.num_layers??2)-2))},(l,p)=\u003e`inner${p+1}`),\\\"bottom\\\"],i=(l,p,s=!1,L=0)=\u003e{l=j(l),e.has(l)||e.set(l,{paint:new H,erase:new H});let m=e.get(l)[s?\\\"erase\\\":\\\"paint\\\"];return m.color=x.layerColors?.[l]??a5[l]??[.75,.75,.75,1],m.element=p,m.category=L,m},a=[],c=[],d=[];for(let[l,p]of y.entries()){let s=p,L=s.type;try{if(L===\\\"pcb_board\\\"||L===\\\"pcb_panel\\\"){let m=P(s);i(\\\"board\\\",l).polygon(m);for(let u of m)i(\\\"edge_cuts\\\",l).path(u,.1,!0);for(let u of[\\\"top\\\",\\\"bottom\\\"])i(`soldermask_${u}`,l).polygon(m)}else if(L===\\\"pcb_cutout\\\")d.push({rings:P(s),index:l}),i(\\\"edge_cuts\\\",l).path(P(s)[0],.05,!0);else if(L===\\\"pcb_smtpad\\\")i(s.layer,l).polygon(P(s)),s.is_covered_with_solder_mask||i(`soldermask_${s.layer}`,l,!0).polygon(P(s));else if(L===\\\"pcb_via\\\"||L===\\\"pcb_plated_hole\\\"){let m=s.layers??o;if(L===\\\"pcb_via\\\"\u0026\u0026!s.layers\u0026\u0026s.from_layer\u0026\u0026s.to_layer){let u=o.indexOf(s.from_layer),_=o.indexOf(s.to_layer);m=o.slice(Math.min(u,_),Math.max(u,_)+1)}for(let u of m)i(u,l).polygon(P(s));a.push({element:s,index:l,layers:m});for(let u of[\\\"top\\\",\\\"bottom\\\"])m.includes(u)\u0026\u0026!s.is_covered_with_solder_mask\u0026\u0026i(`soldermask_${u}`,l,!0).polygon(P(s))}else if(L===\\\"pcb_hole\\\")a.push({element:{...s,shape:s.hole_shape},index:l,layers:o});else if(L===\\\"pcb_trace\\\"){let m=s.route??[];if(s.route_thickness_mode===\\\"interpolated\\\"\u0026\u0026m.some((u,_)=\u003eu.route_type===\\\"wire\\\"\u0026\u0026!z(u)\u0026\u0026m[_+1]?.route_type===\\\"wire\\\")||m.some(u=\u003eu.route_type===\\\"through_pad\\\"))throw new Error(\\\"Interpolated/through-pad traces are not supported yet\\\");for(let u of X0(m)){let _=$0(u);if(!_.length)throw new Error(\\\"Invalid teardrop geometry or interpolation mode\\\");i(u.layer,l).polygon([_])}for(let u=1;u\u003cm.length;u++){let _=m[u-1],h=m[u];if(z(_))continue;let g=_.route_type===\\\"wire\\\"\u0026\u0026h.route_type===\\\"wire\\\"\u0026\u0026_.layer===h.layer||_.route_type===\\\"wire\\\"\u0026\u0026h.route_type===\\\"via\\\"\u0026\u0026[h.from_layer,h.to_layer].includes(_.layer)?_.layer:_.route_type===\\\"via\\\"\u0026\u0026h.route_type===\\\"wire\\\"\u0026\u0026[_.from_layer,_.to_layer].includes(h.layer)?h.layer:void 0;g\u0026\u0026i(g,l).line(_,h,_.width??h.width??.15)}}else if(L===\\\"pcb_copper_pour\\\")i(s.layer,l,!1,1).polygon(P(s));else if(L===\\\"pcb_copper_text\\\")L0(i(s.layer,l),s,x.textYAxis);else if(/^pcb_(silkscreen|fabrication_note|courtyard|note|user_note)_/.test(L)){let m=L.match(/^pcb_(silkscreen|fabrication_note|courtyard|note|user_note)_/)[1],u={silkscreen:\\\"silkscreen\\\",fabrication_note:\\\"fabrication\\\",courtyard:\\\"courtyard\\\",note:\\\"notes\\\",user_note:\\\"notes\\\"}[m],_=`${s.layer??\\\"top\\\"}_${u}`,h=i(_,l);if(L.endsWith(\\\"_text\\\"))s.color\u0026\u0026(m===\\\"note\\\"||m===\\\"fabrication_note\\\")\u0026\u0026(h.color=c5(s.color)),L0(h,s,x.textYAxis);else if(L.endsWith(\\\"_path\\\")||L.endsWith(\\\"_line\\\")||L.endsWith(\\\"_outline\\\")){let g=s.route??s.points??s.outline??[s.start,s.end].filter(Boolean);h.path(g,s.stroke_width??s.width??.05,L.endsWith(\\\"_outline\\\"))}else if(L===\\\"pcb_silkscreen_graphic\\\"\u0026\u0026s.shape===\\\"brep\\\")h.polygon(P(s));else if(L.endsWith(\\\"_rect\\\")){let g=p0(K(s),s.width,s.height,s.corner_radius??0,s.ccw_rotation??0);s.is_filled?h.polygon([g]):h.path(g,s.stroke_width??.05,!0)}else if(L.endsWith(\\\"_circle\\\")){let g=q(K(s),(s.radius??0)*2);s.is_filled?h.polygon([g]):h.path(g,s.stroke_width??.05,!0)}else throw new Error(\\\"Unsupported annotation geometry\\\")}else if(L===\\\"pcb_keepout\\\")c.push({rings:P(s),index:l,layers:s.layers??[s.layer??\\\"top\\\"]});else if(L.startsWith(\\\"pcb_\\\")\u0026\u0026![\\\"pcb_component\\\",\\\"pcb_port\\\",\\\"pcb_group\\\",\\\"pcb_solder_paste\\\",\\\"pcb_debug_object\\\",\\\"pcb_trace_hint\\\",\\\"pcb_anchor\\\",\\\"pcb_breakout_point\\\"].includes(L)\u0026\u0026!/_(error|warning)$/.test(L))throw new Error(\\\"Unsupported PCB element\\\")}catch(m){t.push({elementId:r[l],type:L,message:String(m)})}}for(let{rings:l,index:p,layers:s}of c)try{for(let L of s)z0(i(L,p),l)}catch(L){t.push({elementId:r[p],type:\\\"pcb_keepout\\\",message:String(L)})}for(let{element:l,index:p,layers:s}of a){let L=P(l,!0);for(let u of s)i(u,p,!0).polygon(L);s.includes(\\\"top\\\")\u0026\u0026s.includes(\\\"bottom\\\")\u0026\u0026(i(\\\"board\\\",p,!0).polygon(L),i(\\\"drill\\\",p).polygon(L));for(let u of[\\\"top\\\",\\\"bottom\\\"])s.includes(u)\u0026\u0026i(`soldermask_${u}`,p,!0).polygon(L)}for(let{rings:l,index:p}of d)for(let s of e.keys())s!==\\\"edge_cuts\\\"\u0026\u0026i(s,p,!0).polygon(l);let f=[...e].map(([l,p])=\u003e({name:l,paint:p.paint.build(),erase:p.erase.build()}));return{layers:f,elementIds:r,diagnostics:t,triangleCount:f.reduce((l,p)=\u003el+(p.paint.indices.length+p.erase.indices.length)/3,0)}}var L5=`\\nstruct Camera { rowX: vec4f, rowY: vec4f, viewport: vec4f }\\n@group(0) @binding(0) var\u003cuniform\u003e camera: Camera;\\n@group(0) @binding(1) var\u003cstorage, read\u003e highlights: array\u003cu32\u003e;\\nstruct VertexOut {\\n @builtin(position) position: vec4f,\\n @location(0) color: vec4f,\\n @location(1) @interpolate(flat) category: u32,\\n @location(2) @interpolate(flat) selected: u32,\\n}\\n@vertex fn vertexMain(@location(0) p: vec2f, @location(1) color: vec4f,\\n @location(2) element: f32, @location(3) category: f32) -\u003e VertexOut {\\n let pixel = vec2f(dot(camera.rowX.xyz, vec3f(p, 1)), dot(camera.rowY.xyz, vec3f(p, 1)));\\n var out: VertexOut;\\n out.position = vec4f(pixel.x / camera.viewport.x * 2 - 1, 1 - pixel.y / camera.viewport.y * 2, 0, 1);\\n let highlight = select(0.0, 1.0, (highlights[u32(element)] \u0026 1u) != 0u);\\n out.color = vec4f(mix(color.rgb, min(vec3f(1), color.rgb * 1.5), highlight), color.a);\\n out.category = u32(category);\\n out.selected = highlights[u32(element)] \u0026 2u;\\n return out;\\n}\\n@fragment fn fragmentMain(in: VertexOut) -\u003e @location(0) vec4f {\\n if (in.category == 1u \u0026\u0026 camera.viewport.z == 0) { discard; }\\n if (camera.viewport.w == 1) {\\n if (in.selected == 0u) { discard; }\\n return vec4f(in.color.rgb, 1);\\n }\\n return vec4f(in.color.rgb * in.color.a, in.color.a);\\n}\\n`,h5=`\\n@group(0) @binding(0) var image: texture_2d\u003cf32\u003e;\\n@group(0) @binding(1) var imageSampler: sampler;\\n@group(0) @binding(2) var\u003cuniform\u003e fade: vec4f;\\nstruct Out { @builtin(position) position: vec4f, @location(0) uv: vec2f }\\n@vertex fn vertexMain(@builtin(vertex_index) index: u32) -\u003e Out {\\n let points = array\u003cvec2f, 6\u003e(vec2f(0,0),vec2f(1,0),vec2f(0,1),vec2f(0,1),vec2f(1,0),vec2f(1,1));\\n var out: Out;\\n out.uv = points[index];\\n out.position = vec4f(out.uv.x * 2 - 1, 1 - out.uv.y * 2, 0, 1);\\n return out;\\n}\\n@fragment fn fragmentMain(in: Out) -\u003e @location(0) vec4f {\\n return textureSample(image, imageSampler, in.uv) * fade.x;\\n}\\n`,h0={color:{srcFactor:\\\"one\\\",dstFactor:\\\"one-minus-src-alpha\\\"},alpha:{srcFactor:\\\"one\\\",dstFactor:\\\"one-minus-src-alpha\\\"}},G,Z=(G=class{constructor(x,e,t,r,n){M(this,\\\"canvas\\\");M(this,\\\"device\\\");M(this,\\\"context\\\");M(this,\\\"config\\\");M(this,\\\"realToCanvasMat\\\",{a:1,b:0,c:0,d:-1,e:0,f:0});M(this,\\\"stats\\\",{geometryUploads:0,frames:0,triangleCount:0,compileMs:0,vertexBytes:0});M(this,\\\"circuit\\\");M(this,\\\"scene\\\");M(this,\\\"layers\\\",[]);M(this,\\\"xRayLayers\\\",[]);M(this,\\\"xRayUniform\\\");M(this,\\\"xRayCameraGroup\\\");M(this,\\\"uniform\\\");M(this,\\\"highlights\\\");M(this,\\\"cameraGroup\\\");M(this,\\\"highlightKey\\\",\\\"\\\");M(this,\\\"highlightIndices\\\",new Map);M(this,\\\"sample\\\");M(this,\\\"size\\\",\\\"\\\");M(this,\\\"disposed\\\",!1);M(this,\\\"adapterInfo\\\");M(this,\\\"lost\\\",!1);M(this,\\\"paintPipeline\\\");M(this,\\\"erasePipeline\\\");M(this,\\\"compositePipeline\\\");M(this,\\\"sampler\\\");M(this,\\\"options\\\",{});this.canvas=x,this.device=e,this.context=t,this.config=n,this.uniform=e.createBuffer({size:48,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.xRayUniform=e.createBuffer({size:48,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.highlights=e.createBuffer({size:4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});let o=e.createShaderModule({code:L5}),i=e.createPipelineLayout({bindGroupLayouts:[e.createBindGroupLayout({entries:[{binding:0,visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,buffer:{type:\\\"uniform\\\"}},{binding:1,visibility:GPUShaderStage.VERTEX,buffer:{type:\\\"read-only-storage\\\"}}]})]}),a=d=\u003e({layout:i,vertex:{module:o,entryPoint:\\\"vertexMain\\\",buffers:[{arrayStride:32,attributes:[{shaderLocation:0,offset:0,format:\\\"float32x2\\\"},{shaderLocation:1,offset:8,format:\\\"float32x4\\\"},{shaderLocation:2,offset:24,format:\\\"float32\\\"},{shaderLocation:3,offset:28,format:\\\"float32\\\"}]}]},fragment:{module:o,entryPoint:\\\"fragmentMain\\\",targets:[{format:\\\"rgba8unorm\\\",blend:d}]},primitive:{topology:\\\"triangle-list\\\"},multisample:{count:n.sampleCount??4}});this.paintPipeline=e.createRenderPipeline(a(h0)),this.erasePipeline=e.createRenderPipeline(a({color:{srcFactor:\\\"zero\\\",dstFactor:\\\"one-minus-src-alpha\\\"},alpha:{srcFactor:\\\"zero\\\",dstFactor:\\\"one-minus-src-alpha\\\"}}));let c=e.createShaderModule({code:h5});this.compositePipeline=e.createRenderPipeline({layout:\\\"auto\\\",vertex:{module:c,entryPoint:\\\"vertexMain\\\"},fragment:{module:c,entryPoint:\\\"fragmentMain\\\",targets:[{format:r,blend:h0}]},primitive:{topology:\\\"triangle-list\\\"}}),this.sampler=e.createSampler({minFilter:\\\"linear\\\",magFilter:\\\"linear\\\"}),e.lost.then(d=\u003e{this.lost=!0,this.disposed||n.onDeviceLost?.(d.message||d.reason)})}static async create(x,e={}){if(!globalThis.navigator?.gpu)throw new Error(\\\"WebGPU is unavailable\\\");let t=await navigator.gpu.requestAdapter({powerPreference:\\\"high-performance\\\"});if(!t)throw new Error(\\\"No WebGPU adapter available\\\");let r=await t.requestDevice(),n=x.getContext(\\\"webgpu\\\");if(!n)throw r.destroy(),new Error(\\\"WebGPU canvas context is unavailable\\\");let o=navigator.gpu.getPreferredCanvasFormat();n.configure({device:r,format:o,alphaMode:\\\"premultiplied\\\"}),r.pushErrorScope(\\\"validation\\\");try{let i=new G(x,r,n,o,e),a=await r.popErrorScope();if(a)throw i.dispose(),new Error(a.message);return r.addEventListener(\\\"uncapturederror\\\",c=\u003ee.onDeviceLost?.(c.error.message)),i.adapterInfo=t.info,i}catch(i){throw n.unconfigure(),r.destroy(),i}}get diagnostics(){return this.scene?.diagnostics??[]}setCircuitJson(x){if(this.assertLive(),this.circuit===x)return;let e=performance.now(),t=u5(x,this.config);this.releaseLayers(),this.highlights.destroy(),this.highlights=this.device.createBuffer({size:Math.max(4,t.elementIds.length*4),usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.highlightIndices=new Map(t.elementIds.map((n,o)=\u003e[n,o])),this.highlightKey=\\\"!\\\",this.cameraGroup=this.device.createBindGroup({layout:this.paintPipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.uniform}},{binding:1,resource:{buffer:this.highlights}}]}),this.xRayCameraGroup=this.device.createBindGroup({layout:this.paintPipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.xRayUniform}},{binding:1,resource:{buffer:this.highlights}}]}),this.stats.vertexBytes=0;let r=n=\u003e{let o=(i,a)=\u003e{let c=this.device.createBuffer({size:Math.max(4,i.byteLength),usage:a|GPUBufferUsage.COPY_DST});return i.byteLength\u0026\u0026this.device.queue.writeBuffer(c,0,i.buffer,i.byteOffset,i.byteLength),this.stats.vertexBytes+=i.byteLength,c};return{vertices:o(n.vertices,GPUBufferUsage.VERTEX),indices:o(n.indices,GPUBufferUsage.INDEX),count:n.indices.length}};this.layers=t.layers.map(n=\u003e({name:n.name,paint:r(n.paint),erase:r(n.erase),opacity:this.device.createBuffer({size:16,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})})),this.xRayLayers=this.layers.filter(n=\u003ethis.isCopper(n.name)||n.name===\\\"drill\\\").map(n=\u003e({...n,opacity:this.device.createBuffer({size:16,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST})})),this.scene=t,this.circuit=x,this.size=\\\"\\\",this.stats.geometryUploads++,this.stats.triangleCount=t.triangleCount,this.stats.compileMs=performance.now()-e}drawElements(x,e={}){this.setCircuitJson(x),this.options={},this.render(e)}render(x={}){this.assertLive(),this.options={...this.options,...x};let e=this.options;e.transform\u0026\u0026(this.realToCanvasMat=e.transform);let t=this.realToCanvasMat,r=this.canvas.width,n=this.canvas.height;if(!r||!n)return;if(![...Object.values(t),r,n].every(Number.isFinite))throw new Error(\\\"Invalid camera or canvas dimensions\\\");if(r\u003ethis.device.limits.maxTextureDimension2D||n\u003ethis.device.limits.maxTextureDimension2D)throw new Error(\\\"Canvas exceeds GPU texture limits\\\");this.resize(r,n),this.device.queue.writeBuffer(this.uniform,0,new Float32Array([t.a,t.c,t.e,0,t.b,t.d,t.f,0,r,n,e.showCopperPours===!1?0:1,0]));let o=e.xRayElementIds??[],i=o.length\u003e0;i\u0026\u0026this.device.queue.writeBuffer(this.xRayUniform,0,new Float32Array([t.a,t.c,t.e,0,t.b,t.d,t.f,0,r,n,e.showCopperPours===!1?0:1,1]));let a=i?[]:e.highlightedElementIds??[],c=JSON.stringify([a,o]);if(c!==this.highlightKey){let u=new Uint32Array(Math.max(1,this.scene?.elementIds.length??0));for(let _ of a){let h=this.highlightIndices.get(_);h!==void 0\u0026\u0026(u[h]=1)}for(let _ of o){let h=this.highlightIndices.get(_);h!==void 0\u0026\u0026(u[h]|=2)}this.device.queue.writeBuffer(this.highlights,0,u),this.highlightKey=c}let d=j(e.selectedLayer??\\\"top\\\"),f=e.layers?new Set(e.layers.map(j)):void 0,l=this.layers.filter(u=\u003ef\u0026\u0026!f.has(u.name)||i\u0026\u0026!this.isCopper(u.name)||u.name===\\\"board\\\"\u0026\u0026!e.showBoardMaterial||u.name.startsWith(\\\"soldermask_\\\")\u0026\u0026(!e.showSolderMask||u.name!==`soldermask_${d}`)||u.name.includes(\\\"silkscreen\\\")\u0026\u0026e.showSilkscreen===!1||u.name.includes(\\\"fabrication\\\")\u0026\u0026!e.showFabricationNotes||u.name.includes(\\\"notes\\\")\u0026\u0026e.showPcbNotes===!1||u.name.includes(\\\"courtyard\\\")\u0026\u0026!e.showCourtyards?!1:i\u0026\u0026this.isCopper(u.name)||this.opacity(u.name,d,e.hiddenLayerOpacity??.4)\u003e0).sort((u,_)=\u003ethis.order(u.name,d)-this.order(_.name,d)),p=i?this.xRayLayers.filter(u=\u003e!f||f.has(u.name)).sort((u,_)=\u003ethis.xRayOrder(u.name,d)-this.xRayOrder(_.name,d)):[],s=[...l.map(u=\u003e({layer:u,xRay:!1})),...p.map(u=\u003e({layer:u,xRay:!0}))],L=this.device.createCommandEncoder();for(let{layer:u,xRay:_}of s){this.ensureTexture(u,r,n);let h=u.texture.createView(),g=(this.config.sampleCount??4)\u003e1,T=L.beginRenderPass({colorAttachments:[{view:g?this.sample.createView():h,...g?{resolveTarget:h}:{},clearValue:[0,0,0,0],loadOp:\\\"clear\\\",storeOp:g?\\\"discard\\\":\\\"store\\\"}]});for(let[C,y0]of[[u.paint,this.paintPipeline],[u.erase,this.erasePipeline]])C.count\u0026\u0026(T.setBindGroup(0,_\u0026\u0026y0===this.paintPipeline?this.xRayCameraGroup:this.cameraGroup),T.setPipeline(y0),T.setVertexBuffer(0,C.vertices),T.setIndexBuffer(C.indices,\\\"uint32\\\"),T.drawIndexed(C.count));T.end(),this.device.queue.writeBuffer(u.opacity,0,new Float32Array([_?1:i\u0026\u0026this.isCopper(u.name)?Math.max(0,Math.min(1,e.hiddenLayerOpacity??.4)):this.opacity(u.name,d,e.hiddenLayerOpacity??.4),0,0,0]))}let m=L.beginRenderPass({colorAttachments:[{view:this.context.getCurrentTexture().createView(),clearValue:e.background??[0,0,0,0],loadOp:\\\"clear\\\",storeOp:\\\"store\\\"}]});m.setPipeline(this.compositePipeline);for(let{layer:u}of s)m.setBindGroup(0,u.composite),m.draw(6);m.end(),this.device.queue.submit([L.finish()]),this.stats.frames++}async flush(){this.assertLive(),await this.device.queue.onSubmittedWorkDone()}isCopper(x){return/^(top|bottom|inner\\\\d+)$/.test(x)}opacity(x,e,t){return[\\\"board\\\",\\\"drill\\\",\\\"edge_cuts\\\"].includes(x)||x===e||x.startsWith(`${e}_`)||x.endsWith(`_${e}`)?1:Math.max(0,Math.min(1,t))}xRayOrder(x,e){return x===\\\"drill\\\"?200:x===e?100:x===\\\"bottom\\\"?0:x.startsWith(\\\"inner\\\")?20-Number(x.slice(5)):40}order(x,e){if(x===\\\"board\\\")return-100;if(x===\\\"drill\\\")return 200;if(x===\\\"edge_cuts\\\")return 150;let t=x===e?100:x.startsWith(\\\"inner\\\")?20-Number(x.slice(5)):x===\\\"bottom\\\"?30:40;return x.includes(\\\"soldermask\\\")?110:x.startsWith(`${e}_`)?120:t}resize(x,e){let t=`${x}:${e}`;if(t!==this.size){this.sample?.destroy(),this.sample=(this.config.sampleCount??4)\u003e1?this.device.createTexture({size:[x,e],format:\\\"rgba8unorm\\\",sampleCount:this.config.sampleCount??4,usage:GPUTextureUsage.RENDER_ATTACHMENT}):void 0;for(let r of[...this.layers,...this.xRayLayers])r.texture?.destroy(),r.texture=void 0,r.composite=void 0;this.size=t}}ensureTexture(x,e,t){x.texture||(x.texture=this.device.createTexture({size:[e,t],format:\\\"rgba8unorm\\\",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING}),x.composite=this.device.createBindGroup({layout:this.compositePipeline.getBindGroupLayout(0),entries:[{binding:0,resource:x.texture.createView()},{binding:1,resource:this.sampler},{binding:2,resource:{buffer:x.opacity}}]}))}assertLive(){if(this.disposed||this.lost)throw new Error(this.lost?\\\"WebGPU device lost\\\":\\\"Renderer disposed\\\")}releaseLayers(){for(let x of this.xRayLayers)x.opacity.destroy(),x.texture?.destroy();this.xRayLayers=[];for(let x of this.layers){for(let e of[x.paint,x.erase])e.vertices.destroy(),e.indices.destroy();x.opacity.destroy(),x.texture?.destroy()}this.layers=[]}dispose(){if(this.disposed)return;this.disposed=!0,this.releaseLayers(),this.sample?.destroy(),this.uniform.destroy(),this.xRayUniform.destroy(),this.highlights.destroy(),this.context.unconfigure();let x=()=\u003ethis.device.destroy();this.device.queue.onSubmittedWorkDone().then(x,x),this.circuit=void 0,this.scene=void 0}},M(G,\\\"supportsXRayNet\\\",!0),G);var k=self,m0=\\\"supportsXRayNet\\\"in Z\u0026\u0026Z.supportsXRayNet===!0,w,E,D,J=!1,W=!1,Q=y=\u003e{W||(W=!0,w?.dispose(),k.postMessage({type:\\\"error\\\",message:y instanceof Error?y.message:String(y)}))};function g0(){if(J||W||!w||!D)return;J=!0;let y=()=\u003e{if(J=!1,!(W||!w||!D))try{let x=D;E.width!==x.width\u0026\u0026(E.width=x.width),E.height!==x.height\u0026\u0026(E.height=x.height),w.render({...x.options,transform:x.transform}),k.postMessage({type:\\\"rendered\\\",xRayActive:m0\u0026\u0026!!x.options.xRayElementIds?.length,geometryUploads:w.stats.geometryUploads,frames:w.stats.frames,compileMs:w.stats.compileMs})}catch(x){Q(x)}};k.requestAnimationFrame?k.requestAnimationFrame(y):setTimeout(y,16)}k.onmessage=async({data:y})=\u003e{try{if(y.type===\\\"init\\\"){if(E=y.canvas,w=await Z.create(E,{onDeviceLost:Q}),W){w.dispose();return}k.postMessage({type:\\\"ready\\\",supportsXRayNet:m0})}else if(y.type===\\\"scene\\\"){if(w.setCircuitJson(y.elements),w.diagnostics.length)throw new Error(`Unsupported WebGPU geometry: ${w.diagnostics.map(x=\u003e`${x.type}: ${x.message}`).join(\\\"; \\\")}`);g0()}else y.type===\\\"view\\\"?(D=y,g0()):(W=!0,w?.dispose())}catch(x){Q(x)}};})();\\n\"],{type:\"text/javascript\"}));try{return new Worker(t)}finally{URL.revokeObjectURL(t)}}var XRi=zRi({\"inline-worker:/home/runner/work/pcb-viewer/pcb-viewer/src/lib/webgpu/pcb-webgpu.worker.ts\"(){}}),ZRi=Vje({\"node_modules/svgson/dist/svgson.umd.js\"(t,e){(function(n,o){typeof t==\"object\"\u0026\u0026typeof e\u003c\"u\"?e.exports=o():typeof define==\"function\"\u0026\u0026define.amd?define(o):(n=typeof globalThis\u003c\"u\"?globalThis:n||self,n.svgson=o())})(t,function(){var n=function(j){return j!=null\u0026\u0026(o(j)||i(j)||!!j._isBuffer)};function o(j){return!!j.constructor\u0026\u0026typeof j.constructor.isBuffer==\"function\"\u0026\u0026j.constructor.isBuffer(j)}function i(j){return typeof j.readFloatLE==\"function\"\u0026\u0026typeof j.slice==\"function\"\u0026\u0026o(j.slice(0,0))}var r=Object.prototype.toString,s=function(J){if(typeof J\u003e\"u\")return\"undefined\";if(J===null)return\"null\";if(J===!0||J===!1||J instanceof Boolean)return\"boolean\";if(typeof J==\"string\"||J instanceof String)return\"string\";if(typeof J==\"number\"||J instanceof Number)return\"number\";if(typeof J==\"function\"||J instanceof Function)return\"function\";if(typeof Array.isArray\u003c\"u\"\u0026\u0026Array.isArray(J))return\"array\";if(J instanceof RegExp)return\"regexp\";if(J instanceof Date)return\"date\";var oe=r.call(J);return oe===\"[object RegExp]\"?\"regexp\":oe===\"[object Date]\"?\"date\":oe===\"[object Arguments]\"?\"arguments\":oe===\"[object Error]\"?\"error\":n(J)?\"buffer\":oe===\"[object Set]\"?\"set\":oe===\"[object WeakSet]\"?\"weakset\":oe===\"[object Map]\"?\"map\":oe===\"[object WeakMap]\"?\"weakmap\":oe===\"[object Symbol]\"?\"symbol\":oe===\"[object Int8Array]\"?\"int8array\":oe===\"[object Uint8Array]\"?\"uint8array\":oe===\"[object Uint8ClampedArray]\"?\"uint8clampedarray\":oe===\"[object Int16Array]\"?\"int16array\":oe===\"[object Uint16Array]\"?\"uint16array\":oe===\"[object Int32Array]\"?\"int32array\":oe===\"[object Uint32Array]\"?\"uint32array\":oe===\"[object Float32Array]\"?\"float32array\":oe===\"[object Float64Array]\"?\"float64array\":\"object\"};function a(j,J){return J={exports:{}},j(J,J.exports),J.exports}var A=a(function(j){(function(){function J(oe,ie){if(typeof ie!=\"function\")return oe;var ne={};for(var le in oe)Object.prototype.hasOwnProperty.call(oe,le)\u0026\u0026(ne[ie(le,oe[le])||le]=oe[le]);return ne}j.exports?j.exports=J:window.rename=J})()}),c=function j(J,oe){var ie=s(J);if(ie!==\"object\"\u0026\u0026ie!==\"array\")throw new Error(\"expected an object\");var ne=[];ie===\"object\"\u0026\u0026(J=A(J,oe),ne={});for(var le in J)if(J.hasOwnProperty(le)){var ge=J[le];s(ge)===\"object\"||s(ge)===\"array\"?ne[le]=j(ge,oe):ne[le]=ge}return ne},l=a(function(j){var J=Object.prototype.hasOwnProperty,oe=\"~\";function ie(){}Object.create\u0026\u0026(ie.prototype=Object.create(null),new ie().__proto__||(oe=!1));function ne(ge,_e,ue){this.fn=ge,this.context=_e,this.once=ue||!1}function le(){this._events=new ie,this._eventsCount=0}le.prototype.eventNames=function(){var _e=[],ue,fe;if(this._eventsCount===0)return _e;for(fe in ue=this._events)J.call(ue,fe)\u0026\u0026_e.push(oe?fe.slice(1):fe);return Object.getOwnPropertySymbols?_e.concat(Object.getOwnPropertySymbols(ue)):_e},le.prototype.listeners=function(_e,ue){var fe=oe?oe+_e:_e,pe=this._events[fe];if(ue)return!!pe;if(!pe)return[];if(pe.fn)return[pe.fn];for(var ye=0,Me=pe.length,ve=new Array(Me);ye\u003cMe;ye++)ve[ye]=pe[ye].fn;return ve},le.prototype.emit=function(_e,ue,fe,pe,ye,Me){var ve=oe?oe+_e:_e;if(!this._events[ve])return!1;var he=this._events[ve],Qe=arguments.length,Pe,we;if(he.fn){switch(he.once\u0026\u0026this.removeListener(_e,he.fn,void 0,!0),Qe){case 1:return he.fn.call(he.context),!0;case 2:return he.fn.call(he.context,ue),!0;case 3:return he.fn.call(he.context,ue,fe),!0;case 4:return he.fn.call(he.context,ue,fe,pe),!0;case 5:return he.fn.call(he.context,ue,fe,pe,ye),!0;case 6:return he.fn.call(he.context,ue,fe,pe,ye,Me),!0}for(we=1,Pe=new Array(Qe-1);we\u003cQe;we++)Pe[we-1]=arguments[we];he.fn.apply(he.context,Pe)}else{var Te=he.length,Re;for(we=0;we\u003cTe;we++)switch(he[we].once\u0026\u0026this.removeListener(_e,he[we].fn,void 0,!0),Qe){case 1:he[we].fn.call(he[we].context);break;case 2:he[we].fn.call(he[we].context,ue);break;case 3:he[we].fn.call(he[we].context,ue,fe);break;case 4:he[we].fn.call(he[we].context,ue,fe,pe);break;default:if(!Pe)for(Re=1,Pe=new Array(Qe-1);Re\u003cQe;Re++)Pe[Re-1]=arguments[Re];he[we].fn.apply(he[we].context,Pe)}}return!0},le.prototype.on=function(_e,ue,fe){var pe=new ne(ue,fe||this),ye=oe?oe+_e:_e;return this._events[ye]?this._events[ye].fn?this._events[ye]=[this._events[ye],pe]:this._events[ye].push(pe):(this._events[ye]=pe,this._eventsCount++),this},le.prototype.once=function(_e,ue,fe){var pe=new ne(ue,fe||this,!0),ye=oe?oe+_e:_e;return this._events[ye]?this._events[ye].fn?this._events[ye]=[this._events[ye],pe]:this._events[ye].push(pe):(this._events[ye]=pe,this._eventsCount++),this},le.prototype.removeListener=function(_e,ue,fe,pe){var ye=oe?oe+_e:_e;if(!this._events[ye])return this;if(!ue)return--this._eventsCount===0?this._events=new ie:delete this._events[ye],this;var Me=this._events[ye];if(Me.fn)Me.fn===ue\u0026\u0026(!pe||Me.once)\u0026\u0026(!fe||Me.context===fe)\u0026\u0026(--this._eventsCount===0?this._events=new ie:delete this._events[ye]);else{for(var ve=0,he=[],Qe=Me.length;ve\u003cQe;ve++)(Me[ve].fn!==ue||pe\u0026\u0026!Me[ve].once||fe\u0026\u0026Me[ve].context!==fe)\u0026\u0026he.push(Me[ve]);he.length?this._events[ye]=he.length===1?he[0]:he:--this._eventsCount===0?this._events=new ie:delete this._events[ye]}return this},le.prototype.removeAllListeners=function(_e){var ue;return _e?(ue=oe?oe+_e:_e,this._events[ue]\u0026\u0026(--this._eventsCount===0?this._events=new ie:delete this._events[ue])):(this._events=new ie,this._eventsCount=0),this},le.prototype.off=le.prototype.removeListener,le.prototype.addListener=le.prototype.on,le.prototype.setMaxListeners=function(){return this},le.prefixed=oe,le.EventEmitter=le,j.exports=le});function u(j,J,oe){return J in j?Object.defineProperty(j,J,{value:oe,enumerable:!0,configurable:!0,writable:!0}):j[J]=oe,j}var g=function(){},h={data:\"state-data\",cdata:\"state-cdata\",tagBegin:\"state-tag-begin\",tagName:\"state-tag-name\",tagEnd:\"state-tag-end\",attributeNameStart:\"state-attribute-name-start\",attributeName:\"state-attribute-name\",attributeNameEnd:\"state-attribute-name-end\",attributeValueBegin:\"state-attribute-value-begin\",attributeValue:\"state-attribute-value\"},d={lt:\"action-lt\",gt:\"action-gt\",space:\"action-space\",equal:\"action-equal\",quote:\"action-quote\",slash:\"action-slash\",char:\"action-char\",error:\"action-error\"},p={text:\"text\",openTag:\"open-tag\",closeTag:\"close-tag\",attributeName:\"attribute-name\",attributeValue:\"attribute-value\"},m={\" \":d.space,\"\t\":d.space,\"\\n\":d.space,\"\\r\":d.space,\"\u003c\":d.lt,\"\u003e\":d.gt,'\"':d.quote,\"'\":d.quote,\"=\":d.equal,\"/\":d.slash},_=function(J){return m[J]||d.char},f=function(J){var oe,ie,ne,le,ge,_e,ue,fe,pe,ye;J=Object.assign({debug:!1},J);var Me=new l,ve=h.data,he=\"\",Qe=\"\",Pe=\"\",we=\"\",Te=\"\",Re=\"\",Ee=function(Le,Ye){if(!(Qe[0]===\"?\"||Qe[0]===\"!\")){var tt={type:Le,value:Ye};J.debug\u0026\u0026console.log(\"emit:\",tt),Me.emit(\"data\",tt)}};Me.stateMachine=(ye={},u(ye,h.data,(oe={},u(oe,d.lt,function(){he.trim()\u0026\u0026Ee(p.text,he),Qe=\"\",Te=!1,ve=h.tagBegin}),u(oe,d.char,function(Ce){he+=Ce}),oe)),u(ye,h.cdata,u({},d.char,function(Ce){he+=Ce,he.substr(-3)===\"]]\u003e\"\u0026\u0026(Ee(p.text,he.slice(0,-3)),he=\"\",ve=h.data)})),u(ye,h.tagBegin,(ie={},u(ie,d.space,g),u(ie,d.char,function(Ce){Qe=Ce,ve=h.tagName}),u(ie,d.slash,function(){Qe=\"\",Te=!0}),ie)),u(ye,h.tagName,(ne={},u(ne,d.space,function(){Te?ve=h.tagEnd:(ve=h.attributeNameStart,Ee(p.openTag,Qe))}),u(ne,d.gt,function(){Ee(Te?p.closeTag:p.openTag,Qe),he=\"\",ve=h.data}),u(ne,d.slash,function(){ve=h.tagEnd,Ee(p.openTag,Qe)}),u(ne,d.char,function(Ce){Qe+=Ce,Qe===\"![CDATA[\"\u0026\u0026(ve=h.cdata,he=\"\",Qe=\"\")}),ne)),u(ye,h.tagEnd,(le={},u(le,d.gt,function(){Ee(p.closeTag,Qe),he=\"\",ve=h.data}),u(le,d.char,g),le)),u(ye,h.attributeNameStart,(ge={},u(ge,d.char,function(Ce){Pe=Ce,ve=h.attributeName}),u(ge,d.gt,function(){he=\"\",ve=h.data}),u(ge,d.space,g),u(ge,d.slash,function(){Te=!0,ve=h.tagEnd}),ge)),u(ye,h.attributeName,(_e={},u(_e,d.space,function(){ve=h.attributeNameEnd}),u(_e,d.equal,function(){Ee(p.attributeName,Pe),ve=h.attributeValueBegin}),u(_e,d.gt,function(){we=\"\",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),he=\"\",ve=h.data}),u(_e,d.slash,function(){Te=!0,we=\"\",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),ve=h.tagEnd}),u(_e,d.char,function(Ce){Pe+=Ce}),_e)),u(ye,h.attributeNameEnd,(ue={},u(ue,d.space,g),u(ue,d.equal,function(){Ee(p.attributeName,Pe),ve=h.attributeValueBegin}),u(ue,d.gt,function(){we=\"\",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),he=\"\",ve=h.data}),u(ue,d.char,function(Ce){we=\"\",Ee(p.attributeName,Pe),Ee(p.attributeValue,we),Pe=Ce,ve=h.attributeName}),ue)),u(ye,h.attributeValueBegin,(fe={},u(fe,d.space,g),u(fe,d.quote,function(Ce){Re=Ce,we=\"\",ve=h.attributeValue}),u(fe,d.gt,function(){we=\"\",Ee(p.attributeValue,we),he=\"\",ve=h.data}),u(fe,d.char,function(Ce){Re=\"\",we=Ce,ve=h.attributeValue}),fe)),u(ye,h.attributeValue,(pe={},u(pe,d.space,function(Ce){Re?we+=Ce:(Ee(p.attributeValue,we),ve=h.attributeNameStart)}),u(pe,d.quote,function(Ce){Re===Ce?(Ee(p.attributeValue,we),ve=h.attributeNameStart):we+=Ce}),u(pe,d.gt,function(Ce){Re?we+=Ce:(Ee(p.attributeValue,we),he=\"\",ve=h.data)}),u(pe,d.slash,function(Ce){Re?we+=Ce:(Ee(p.attributeValue,we),Te=!0,ve=h.tagEnd)}),u(pe,d.char,function(Ce){we+=Ce}),pe)),ye);var ke=function(Le){J.debug\u0026\u0026console.log(ve,Le);var Ye=Me.stateMachine[ve],tt=Ye[_(Le)]||Ye[d.error]||Ye[d.char];tt(Le)};return Me.write=function(Ce){for(var Le=Ce.length,Ye=0;Ye\u003cLe;Ye++)ke(Ce[Ye])},Me},I={State:h,Action:d,Type:p,create:f},C=I.Type,y={element:\"element\",text:\"text\"},x=function(J){return Object.assign({name:\"\",type:y.element,value:\"\",parent:null,attributes:{},children:[]},J)},E=function(J){J=Object.assign({stream:!1,parentNodes:!0,doneEvent:\"done\",tagPrefix:\"tag:\",emitTopLevelOnly:!1,debug:!1},J);var oe=void 0,ie=void 0,ne=void 0,le=void 0,ge=new l,_e=function(fe){switch(fe.type){case C.openTag:if(ne===null)ne=ie,ne.name=fe.value;else{var pe=x({name:fe.value,parent:ne});ne.children.push(pe),ne=pe}break;case C.closeTag:var ye=ne.parent;if(J.parentNodes||(ne.parent=null),ne.name!==fe.value)break;J.stream\u0026\u0026ye===ie\u0026\u0026(ie.children=[],ne.parent=null),(!J.emitTopLevelOnly||ye===ie)\u0026\u0026(ge.emit(J.tagPrefix+ne.name,ne),ge.emit(\"tag\",ne.name,ne)),ne===ie\u0026\u0026(oe.removeAllListeners(\"data\"),ge.emit(J.doneEvent,ne),ie=null),ne=ye;break;case C.text:ne\u0026\u0026ne.children.push(x({type:y.text,value:fe.value,parent:J.parentNodes?ne:null}));break;case C.attributeName:le=fe.value,ne.attributes[le]=\"\";break;case C.attributeValue:ne.attributes[le]=fe.value;break}};return ge.reset=function(){oe=I.create({debug:J.debug}),oe.on(\"data\",_e),ie=x(),ne=null,le=\"\",ge.parse=oe.write},ge.reset(),ge},B=function(J,oe){oe=Object.assign({},oe,{stream:!1,tagPrefix:\":\"});var ie=E(oe),ne=void 0;return ie.on(\"done\",function(le){ne=le}),ie.parse(J),ne},S={parseSync:B},Q=S.parseSync,w=function(J){var oe=Q(\"\u003croot\u003e\".concat(J,\"\u003c/root\u003e\"),{parentNodes:!1}),ie=oe.children\u0026\u0026oe.children.length\u003e0\u0026\u0026oe.children.every(function(ne){return ne.name===\"svg\"});if(ie)return oe.children.length===1?oe.children[0]:oe.children;throw Error(\"nothing to parse\")},M=function(J){return c(J,function(oe){return R(oe)?oe:k(oe)})},k=function(J){return J.replace(/[-|:]([a-z])/gi,function(oe,ie){return ie.toUpperCase()})},R=function(J){return/^(data|aria)(-\\w+)/.test(J)},F=function(J){if(J){var oe=String(J);return/[\u0026\u003c\u003e]/.test(oe)?\"\u003c![CDATA[\".concat(oe.replace(/]]\u003e/,\"]]]]\u003e\u003c![CDATA[\u003e\"),\"]]\u003e\"):oe}return\"\"},O=function(J){return String(J).replace(/\u0026/g,\"\u0026amp;\").replace(/'/g,\"\u0026apos;\").replace(/\"/g,\"\u0026quot;\").replace(/\u003c/g,\"\u0026lt;\").replace(/\u003e/g,\"\u0026gt;\")},U=function(J){var oe=arguments.length\u003e1\u0026\u0026arguments[1]!==void 0?arguments[1]:{},ie=oe.transformNode,ne=ie===void 0?function(ue){return ue}:ie,le=oe.camelcase,ge=le===void 0?!1:le,_e=function(fe){var pe;return pe=ne(fe),ge\u0026\u0026(pe=M(pe)),pe};return _e(w(J))};function Y(){for(var j=arguments.length,J=new Array(j),oe=0;oe\u003cj;oe++)J[oe]=arguments[oe];return new Promise(function(ie,ne){try{var le=U.apply(void 0,J);ie(le)}catch(ge){ne(ge)}})}var W=function j(J){var oe=arguments.length\u003e1\u0026\u0026arguments[1]!==void 0?arguments[1]:{},ie=oe.transformAttr,ne=ie===void 0?function(ve,he,Qe){return\"\".concat(ve,'=\"').concat(Qe(he),'\"')}:ie,le=oe.transformNode,ge=le===void 0?function(ve){return ve}:le,_e=oe.selfClose,ue=_e===void 0?!0:_e;if(Array.isArray(J))return J.map(function(ve){return j(ve,{transformAttr:ne,selfClose:ue,transformNode:ge})}).join(\"\");var fe=ge(J);if(fe.type===\"text\")return F(fe.value);var pe=\"\";for(var ye in fe.attributes){var Me=ne(ye,fe.attributes[ye],O,fe.name);pe+=Me?\" \".concat(Me):\"\"}return fe.children\u0026\u0026fe.children.length\u003e0||!ue?\"\u003c\".concat(fe.name).concat(pe,\"\u003e\").concat(j(fe.children,{transformAttr:ne,transformNode:ge,selfClose:ue}),\"\u003c/\").concat(fe.name,\"\u003e\"):\"\u003c\".concat(fe.name).concat(pe,\"/\u003e\")},te=Object.assign({},{parse:Y,parseSync:U,stringify:W});return te})}}),Zgn=ee.createContext(null),eTi=()=\u003eee.useContext(Zgn),edn=!0,tTi=!1,eee={CCW:-1,CW:1,NOT_ORIENTABLE:0},nTi=2*Math.PI,q_e=1,tdn=0,W6=2,oTi=3,iTi=4,rTi=1,sTi=2,zje=0,tee=1,FU=2,X_e=Object.freeze({__proto__:null,BOUNDARY:W6,CCW:edn,CONTAINS:oTi,CW:tTi,END_VERTEX:FU,INSIDE:q_e,INTERLACE:iTi,NOT_VERTEX:zje,ORIENTATION:eee,OUTSIDE:tdn,OVERLAP_OPPOSITE:sTi,OVERLAP_SAME:rTi,PIx2:nTi,START_VERTEX:tee}),j6=1e-6;function ndn(t){j6=t}function odn(){return j6}var aTi=3;function Jje(t){return t\u003cj6\u0026\u0026t\u003e-j6}function LT(t,e){return t-e\u003cj6\u0026\u0026t-e\u003e-j6}function idn(t,e){return t-e\u003ej6}function ATi(t,e){return t-e\u003e-j6}function rdn(t,e){return t-e\u003c-j6}function cTi(t,e){return t-e\u003cj6}var lTi=Object.freeze({__proto__:null,DECIMALS:aTi,EQ:LT,EQ_0:Jje,GE:ATi,GT:idn,LE:cTi,LT:rdn,getTolerance:odn,setTolerance:ndn}),Ue={Utils:lTi,Errors:void 0,Matrix:void 0,Planar_set:void 0,Point:void 0,Vector:void 0,Line:void 0,Circle:void 0,Segment:void 0,Arc:void 0,Box:void 0,Edge:void 0,Face:void 0,Ray:void 0,Ray_shooting:void 0,Multiline:void 0,Polygon:void 0,Distance:void 0,Inversion:void 0};for(let t in X_e)Ue[t]=X_e[t];Object.defineProperty(Ue,\"DP_TOL\",{get:function(){return odn()},set:function(t){ndn(t)}});var wd=class{static get ILLEGAL_PARAMETERS(){return new ReferenceError(\"Illegal Parameters\")}static get ZERO_DIVISION(){return new Error(\"Zero division\")}static get UNRESOLVED_BOUNDARY_CONFLICT(){return new Error(\"Unresolved boundary conflict in boolean operation\")}static get INFINITE_LOOP(){return new Error(\"Infinite loop\")}static get CANNOT_COMPLETE_BOOLEAN_OPERATION(){return new Error(\"Cannot complete boolean operation\")}static get CANNOT_INVOKE_ABSTRACT_METHOD(){return new Error(\"Abstract method cannot be invoked\")}static get OPERATION_IS_NOT_SUPPORTED(){return new Error(\"Operation is not supported\")}static get UNSUPPORTED_SHAPE_TYPE(){return new Error(\"Unsupported shape type\")}};Ue.Errors=wd;var Wje=class{constructor(t,e){this.first=t,this.last=e||this.first}[Symbol.iterator](){let t;return{next:()=\u003e(t=t?t.next:this.first,{value:t,done:t===void 0})}}get size(){let t=0;for(let e of this)t++;return t}toArray(t=void 0,e=void 0){let n=[],o=t||this.first,i=e||this.last,r=o;if(r===void 0)return n;do n.push(r),r=r.next;while(r!==i.next);return n}append(t){return this.isEmpty()?this.first=t:(t.prev=this.last,this.last.next=t),this.last=t,this.last.next=void 0,this.first.prev=void 0,this}insert(t,e){if(this.isEmpty())this.first=t,this.last=t;else if(e==null)t.next=this.first,this.first.prev=t,this.first=t;else{let n=e.next;e.next=t,n\u0026\u0026(n.prev=t),t.prev=e,t.next=n,this.last===e\u0026\u0026(this.last=t)}return this.last.next=void 0,this.first.prev=void 0,this}remove(t){return t===this.first\u0026\u0026t===this.last?(this.first=void 0,this.last=void 0):(t.prev\u0026\u0026(t.prev.next=t.next),t.next\u0026\u0026(t.next.prev=t.prev),t===this.first\u0026\u0026(this.first=t.next),t===this.last\u0026\u0026(this.last=t.prev)),this}isEmpty(){return this.first===void 0}static testInfiniteLoop(t){let e=t,n=t;do{if(e!=t\u0026\u0026e===n)throw wd.INFINITE_LOOP;e=e.next,n=n.next.next}while(e!=t)}},sdn={stroke:\"black\"},uTi=class{constructor(t=sdn){for(const e in t)this[e]=t[e];this.stroke=t.stroke??sdn.stroke}toAttributesString(){return Object.keys(this).reduce((t,e)=\u003et+(this[e]!==void 0?this.toAttrString(e,this[e]):\"\"),\"\")}toAttrString(t,e){const n=t===\"className\"?\"class\":this.convertCamelToKebabCase(t);return e===null?`${n} `:`${n}=\"${e.toString()}\" `}convertCamelToKebabCase(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).join(\"-\").toLowerCase()}};function HT(t){return new uTi(t).toAttributesString()}function LU(t,e){let n=[],[o,i,r]=t.standard,[s,a,A]=e.standard,c=o*a-i*s,l=r*a-i*A,u=o*A-r*s;if(!Ue.Utils.EQ_0(c)){let g,h;i===0?(g=r/o,h=u/c):a===0?(g=A/s,h=u/c):o===0?(g=l/c,h=r/i):s===0?(g=l/c,h=A/a):(g=l/c,h=u/c),n.push(new Ue.Point(g,h))}return n}function OT(t,e){let n=[],o=e.pc.projectionOn(t),i=e.pc.distanceTo(o)[0];if(Ue.Utils.EQ(i,e.r))n.push(o);else if(Ue.Utils.LT(i,e.r)){let r=Math.sqrt(e.r*e.r-i*i),s,a;s=t.norm.rotate90CCW().multiply(r),a=o.translate(s),n.push(a),s=t.norm.rotate90CW().multiply(r),a=o.translate(s),n.push(a)}return n}function HU(t,e){let n=[];for(let o of e.toSegments()){let i=nee(o,t);for(let r of i)_dn(r,n)||n.push(r)}return n}function Z_e(t,e){let n=[];if(HU(t,e.box).length===0)return n;let o=new Ue.Circle(e.pc,e.r),i=OT(t,o);for(let r of i)r.on(e)\u0026\u0026n.push(r);return n}function nee(t,e){let n=[];if(t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026!t.isZeroLength()\u0026\u0026n.push(t.pe),n.length\u003e0||t.isZeroLength()||t.ps.leftTo(e)\u0026\u0026t.pe.leftTo(e)||!t.ps.leftTo(e)\u0026\u0026!t.pe.leftTo(e))return n;let o=new Ue.Line(t.ps,t.pe);return LU(o,e)}function efe(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;if(e.isZeroLength())return e.ps.on(t)\u0026\u0026n.push(e.ps),n;let o=new Ue.Line(t.ps,t.pe),i=new Ue.Line(e.ps,e.pe);if(o.incidentTo(i))t.ps.on(e)\u0026\u0026n.push(t.ps),t.pe.on(e)\u0026\u0026n.push(t.pe),e.ps.on(t)\u0026\u0026!e.ps.equalTo(t.ps)\u0026\u0026!e.ps.equalTo(t.pe)\u0026\u0026n.push(e.ps),e.pe.on(t)\u0026\u0026!e.pe.equalTo(t.ps)\u0026\u0026!e.pe.equalTo(t.pe)\u0026\u0026n.push(e.pe);else if(o.parallelTo(i)){const r=new Ue.Vector(t.ps,t.pe),s=new Ue.Vector(e.ps,e.pe),a=new Ue.Vector(t.ps,e.ps),A=r.cross(s);if(!Ue.Utils.EQ_0(A)){const c=a.cross(s)/A,l=a.cross(r)/A;Ue.Utils.GE(c,0)\u0026\u0026Ue.Utils.LE(c,1)\u0026\u0026Ue.Utils.GE(l,0)\u0026\u0026Ue.Utils.LE(l,1)\u0026\u0026n.push(adn(t.ps.translate(r.multiply(c)),t,e))}}else{let r=LU(o,i);r.length\u003e0\u0026\u0026Adn(r[0],t)\u0026\u0026Adn(r[0],e)\u0026\u0026n.push(adn(r[0],t,e))}return n}function adn(t,e,n){for(const o of[e.ps,e.pe,n.ps,n.pe])if(t.equalTo(o))return o;return t}function Adn(t,e){const n=e.box;return Ue.Utils.LE(t.x,n.xmax)\u0026\u0026Ue.Utils.GE(t.x,n.xmin)\u0026\u0026Ue.Utils.LE(t.y,n.ymax)\u0026\u0026Ue.Utils.GE(t.y,n.ymin)}function tfe(t,e){let n=[];if(t.isZeroLength()){let[r,s]=t.ps.distanceTo(e.pc);return Ue.Utils.EQ(r,e.r)\u0026\u0026n.push(t.ps),n}let o=new Ue.Line(t.ps,t.pe),i=OT(o,e);for(let r of i)r.on(t)\u0026\u0026n.push(r);return n}function OU(t,e){let n=[];if(t.isZeroLength())return t.ps.on(e)\u0026\u0026n.push(t.ps),n;let o=new Ue.Line(t.ps,t.pe),i=new Ue.Circle(e.pc,e.r),r=OT(o,i);for(let s of r)s.on(t)\u0026\u0026s.on(e)\u0026\u0026n.push(s);return n}function gTi(t,e){let n=[];for(let o of e.toSegments()){let i=efe(o,t);for(let r of i)n.push(r)}return n}function cdn(t,e){let n=[],o=new Ue.Vector(t.pc,e.pc),i=t.r,r=e.r;if(Ue.Utils.EQ_0(i)||Ue.Utils.EQ_0(r))return n;if(Ue.Utils.EQ_0(o.x)\u0026\u0026Ue.Utils.EQ_0(o.y)\u0026\u0026Ue.Utils.EQ(i,r))return n.push(t.pc.translate(-i,0)),n;let s=t.pc.distanceTo(e.pc)[0];if(Ue.Utils.GT(s,i+r)||Ue.Utils.LT(s,Math.abs(i-r)))return n;o.x/=s,o.y/=s;let a;if(Ue.Utils.EQ(s,i+r)||Ue.Utils.EQ(s,Math.abs(i-r)))return a=t.pc.translate(i*o.x,i*o.y),n.push(a),n;let A=i*i/(2*s)-r*r/(2*s)+s/2,c=t.pc.translate(A*o.x,A*o.y),l=Math.sqrt(i*i-A*A);return a=c.translate(o.rotate90CCW().multiply(l)),n.push(a),a=c.translate(o.rotate90CW().multiply(l)),n.push(a),n}function dTi(t,e){let n=[];for(let o of e.toSegments()){let i=tfe(o,t);for(let r of i)n.push(r)}return n}function ldn(t,e){let n=[];if(t.pc.equalTo(e.pc)\u0026\u0026Ue.Utils.EQ(t.r,e.r)){let s;return s=t.start,s.on(e)\u0026\u0026n.push(s),s=t.end,s.on(e)\u0026\u0026n.push(s),s=e.start,s.on(t)\u0026\u0026n.push(s),s=e.end,s.on(t)\u0026\u0026n.push(s),n}let o=new Ue.Circle(t.pc,t.r),i=new Ue.Circle(e.pc,e.r),r=o.intersect(i);for(let s of r)s.on(t)\u0026\u0026s.on(e)\u0026\u0026n.push(s);return n}function jje(t,e){let n=[];if(e.pc.equalTo(t.pc)\u0026\u0026Ue.Utils.EQ(e.r,t.r))return n.push(t.start),n.push(t.end),n;let o=e,i=new Ue.Circle(t.pc,t.r),r=cdn(o,i);for(let s of r)s.on(t)\u0026\u0026n.push(s);return n}function hTi(t,e){let n=[];for(let o of e.toSegments()){let i=OU(o,t);for(let r of i)n.push(r)}return n}function udn(t,e){return t.isSegment?efe(t.shape,e):OU(e,t.shape)}function gdn(t,e){return t.isSegment?OU(t.shape,e):ldn(t.shape,e)}function ddn(t,e){return t.isSegment?nee(t.shape,e):Z_e(e,t.shape)}function pTi(t,e){return t.isSegment?Xje(e,t.shape):Zje(e,t.shape)}function mTi(t,e){return t.isSegment?tfe(t.shape,e):jje(t.shape,e)}function $je(t,e){let n=[];for(let o of e.edges)for(let i of udn(o,t))n.push(i);return n}function qje(t,e){let n=[];for(let o of e.edges)for(let i of gdn(o,t))n.push(i);return n}function oee(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of ddn(o,t))_dn(i,n)||n.push(i);return t.sortPoints(n)}function hdn(t,e){let n=[];if(e.isEmpty())return n;for(let o of e.edges)for(let i of mTi(o,t))n.push(i);return n}function pdn(t,e){return t.isSegment?udn(e,t.shape):t.isArc?gdn(e,t.shape):t.isLine?ddn(e,t.shape):t.isRay?pTi(e,t.shape):[]}function mdn(t,e){let n=[];if(e.isEmpty()||t.shape.box.not_intersect(e.box))return n;let o=e.edges.search(t.shape.box);for(let i of o)n=[...n,...pdn(t,i)];return n}function _Ti(t,e){let n=[];if(e.isEmpty()||t.size===0)return n;for(let o of t)n=[...n,...mdn(o,e)];return n}function fTi(t,e){let n=[];if(t.isEmpty()||e.isEmpty()||t.box.not_intersect(e.box))return n;for(let o of t.edges)n=[...n,...mdn(o,e)];return n}function ITi(t,e){return t instanceof Ue.Line?oee(t,e):t instanceof Ue.Segment?$je(t,e):t instanceof Ue.Arc?qje(t,e):[]}function _dn(t,e){return e.some(n=\u003en.equalTo(t))}function kP(t){return new Ue.Line(t.start,t.norm)}function Xje(t,e){return nee(e,kP(t)).filter(n=\u003et.contains(n))}function Zje(t,e){return Z_e(kP(t),e).filter(n=\u003et.contains(n))}function fdn(t,e){return OT(kP(t),e).filter(n=\u003et.contains(n))}function CTi(t,e){return HU(kP(t),e).filter(n=\u003et.contains(n))}function Idn(t,e){return LU(kP(t),e).filter(n=\u003et.contains(n))}function yTi(t,e){return LU(kP(t),kP(e)).filter(n=\u003et.contains(n)).filter(n=\u003ee.contains(n))}function Cdn(t,e){return oee(kP(t),e).filter(n=\u003et.contains(n))}function ydn(t,e){if(t.intersect\u0026\u0026t.intersect instanceof Function)return t.intersect(e);throw wd.UNSUPPORTED_SHAPE_TYPE}function GU(t,e){let n=[];for(let o of e)n=[...n,...ydn(t,o.shape)];return n}function xTi(t,e){let n=[];for(let o of t)for(let i of e)n=[...n,...ydn(o.shape,i.shape)];return n}var GT=class ene extends Wje{constructor(...e){if(super(),this.isInfinite=!1,e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length\u003e0){const n=e[0],o=n.length,i=A=\u003eA instanceof Ue.Segment||A instanceof Ue.Arc||A instanceof Ue.Ray||A instanceof Ue.Line,r=A=\u003eA instanceof Ue.Segment||A instanceof Ue.Arc||A instanceof Ue.Ray,s=A=\u003eA instanceof Ue.Segment||A instanceof Ue.Arc;if(o===1\u0026\u0026i(n[0])||o\u003e1\u0026\u0026r(n[0])\u0026\u0026r(n[o-1])\u0026\u0026n.slice(1,o-1).every(s)){this.isInfinite=n.some(A=\u003eA instanceof Ue.Ray||A instanceof Ue.Line);for(let A of n){let c=new Ue.Edge(A);this.append(c)}this.setArcLength()}else throw Ue.Errors.ILLEGAL_PARAMETERS}}get edges(){return[...this]}get box(){return this.edges.reduce((e,n)=\u003ee.merge(n.box),new Ue.Box)}get vertices(){let e=this.edges.map(n=\u003en.start);return e.push(this.last.end),e}get length(){if(this.isEmpty())return 0;if(this.isInfinite)return Number.POSITIVE_INFINITY;let e=0;for(let n of this)e+=n.length;return e}clone(){return new ene(this.toShapes())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e)}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}pointAtLength(e){if(e\u003ethis.length||e\u003c0||this.isInfinite)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ue.Edge(o[0]),r=n.prev;return this.insert(i,r),n.shape=o[1],i}getChain(e,n){let o=[];for(let i=e;i!==n.next;i=i.next)o.push(i);return o}split(e){for(let n of e){let o=this.findEdgeByPoint(n);this.addVertex(n,o)}return this}findEdgeByPoint(e){let n;for(let o of this)if(o.shape.contains(e)){n=o;break}return n}distanceTo(e){if(e instanceof Ue.Point){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Line){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Circle){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Segment){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Arc){const[n,o]=Ue.Distance.shape2multiline(e,this);return[n,o.reverse()]}if(e instanceof Ue.Box){const[n,o]=Ue.Distance.shape2multiline(new Ue.Polygon(e),this);return[n,o.reverse()]}if(e instanceof Ue.Multiline)return Ue.Distance.multiline2multiline(this,e);throw Ue.Errors.UNSUPPORTED_SHAPE_TYPE}intersect(e){return e instanceof Ue.Multiline?xTi(this,e):GU(e,this)}contains(e){if(e instanceof Ue.Point)return this.edges.some(n=\u003en.shape.contains(e));throw Ue.Errors.UNSUPPORTED_SHAPE_TYPE}translate(e){return new ene(this.edges.map(n=\u003en.shape.translate(e)))}rotate(e=0,n=new Ue.Point){return new ene(this.edges.map(o=\u003eo.shape.rotate(e,n)))}transform(e=new Ue.Matrix){return new ene(this.edges.map(n=\u003en.shape.transform(e)))}toShapes(){return this.edges.map(e=\u003ee.shape.clone())}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svgPoints(){return this.vertices.map(e=\u003e`${e.x},${e.y}`).join(\" \")}dpath(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e}svg(e={}){let n=`\n\u003cpath ${HT({fill:\"none\",...e})} d=\"`;n+=`\nM${this.first.start.x},${this.first.start.y}`;for(let o of this)n+=o.svg();return n+=`\" \u003e\n\u003c/path\u003e`,n}};Ue.Multiline=GT;var ETi=(...t)=\u003enew Ue.Multiline(...t);Ue.multiline=ETi;function YU(t,e,n){let o=n.length,i=t.shape.split(e);if(i.length===0)return;let r=0;i[0]===null?r=0:i[1]===null?r=t.shape.length:r=i[0].length;let s=zje;LT(r,0)\u0026\u0026(s|=tee),LT(r,t.shape.length)\u0026\u0026(s|=FU);let a;r===1/0?a=i[0].coord(e):a=s\u0026FU\u0026\u0026t.next\u0026\u0026t.next.arc_length===0?0:t.arc_length+r,n.push({id:o,pt:e,arc_length:a,edge_before:t,edge_after:void 0,face:t.face,is_vertex:s})}function iee(t){t.int_points1_sorted=FP(t.int_points1),t.int_points2_sorted=FP(t.int_points2)}function FP(t){let e=new Map,n=0;for(let i of t)e.has(i.face)||(e.set(i.face,n),n++);for(let i of t)i.faceId=e.get(i.face);return t.slice().sort(BTi)}function BTi(t,e){return t.faceId\u003ce.faceId?-1:t.faceId\u003ee.faceId?1:t.arc_length\u003ce.arc_length?-1:t.arc_length\u003ee.arc_length?1:0}function e$e(t){if(t.int_points1.length\u003c2)return;let e=!1,n,o,i,r;for(let s=0;s\u003ct.int_points1_sorted.length;s++)if(t.int_points1_sorted[s].id!==-1){n=t.int_points1_sorted[s],o=t.int_points2[n.id];for(let a=s+1;a\u003ct.int_points1_sorted.length\u0026\u0026(i=t.int_points1_sorted[a],!!LT(i.arc_length,n.arc_length));a++)i.id!==-1\u0026\u0026(r=t.int_points2[i.id],r.id!==-1\u0026\u0026i.edge_before===n.edge_before\u0026\u0026i.edge_after===n.edge_after\u0026\u0026r.edge_before===o.edge_before\u0026\u0026r.edge_after===o.edge_after\u0026\u0026(i.id=-1,r.id=-1,e=!0))}o=t.int_points2_sorted[0],n=t.int_points1[o.id];for(let s=1;s\u003ct.int_points2_sorted.length;s++){let a=t.int_points2_sorted[s];if(a.id===-1)continue;if(o.id===-1||!LT(a.arc_length,o.arc_length)){o=a,n=t.int_points1[o.id];continue}let A=t.int_points1[a.id];A.edge_before===n.edge_before\u0026\u0026A.edge_after===n.edge_after\u0026\u0026a.edge_before===o.edge_before\u0026\u0026a.edge_after===o.edge_after\u0026\u0026(A.id=-1,a.id=-1,e=!0)}e\u0026\u0026(t.int_points1=t.int_points1.filter(s=\u003es.id\u003e=0),t.int_points2=t.int_points2.filter(s=\u003es.id\u003e=0),t.int_points1.forEach((s,a)=\u003es.id=a),t.int_points2.forEach((s,a)=\u003es.id=a))}function t$e(t){for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvStart=void 0,e.edge_before.bvEnd=void 0,e.edge_before.bv=void 0,e.edge_before.overlap=void 0),e.edge_after\u0026\u0026(e.edge_after.bvStart=void 0,e.edge_after.bvEnd=void 0,e.edge_after.bv=void 0,e.edge_after.overlap=void 0);for(let e of t)e.edge_before\u0026\u0026(e.edge_before.bvEnd=W6),e.edge_after\u0026\u0026(e.edge_after.bvStart=W6)}function n$e(t,e){for(let n of t)n.edge_before\u0026\u0026n.edge_before.setInclusion(e),n.edge_after\u0026\u0026n.edge_after.setInclusion(e)}function bTi(t){let e,n,o,i=t.int_points1.length;for(let r=0;r\u003ci;r++){let s=t.int_points1_sorted[r];s.face!==e\u0026\u0026(n=r,e=s.face);let a=r,A=UU(t.int_points1_sorted,r,e),c;a+A\u003ci\u0026\u0026t.int_points1_sorted[a+A].face===e?c=a+A:c=n;let l=UU(t.int_points1_sorted,c,e);o=null;for(let _=c;_\u003cc+l;_++){let f=t.int_points1_sorted[_];if(f.face===e\u0026\u0026t.int_points2[f.id].face===t.int_points2[s.id].face){o=f;break}}if(o===null)continue;let u=s.edge_after,g=o.edge_before;if(!(u.bv===W6\u0026\u0026g.bv===W6)||u!==g)continue;let h=t.int_points2[s.id],d=t.int_points2[o.id],p=h.edge_after,m=d.edge_before;p.bv===W6\u0026\u0026m.bv===W6\u0026\u0026p===m||(h=t.int_points2[o.id],d=t.int_points2[s.id],p=h.edge_after,m=d.edge_before),p.bv===W6\u0026\u0026m.bv===W6\u0026\u0026p===m\u0026\u0026u.setOverlap(p)}}function UU(t,e,n){let o,i,r=1;if(t.length===1)return 1;o=t[e];for(let s=e+1;s\u003ct.length\u0026\u0026!(o.face!==n||(i=t[s],!(i.pt.equalTo(o.pt)\u0026\u0026i.edge_before===o.edge_before\u0026\u0026i.edge_after===o.edge_after)));s++)r++;return r}function KU(t,e){if(e){for(let n of e){let o=n.edge_before;if(n.is_vertex=zje,o.shape.start\u0026\u0026o.shape.start.equalTo(n.pt)\u0026\u0026(n.is_vertex|=tee),o.shape.end\u0026\u0026o.shape.end.equalTo(n.pt)\u0026\u0026(n.is_vertex|=FU),n.is_vertex\u0026tee){n.edge_before=o.prev,o.prev\u0026\u0026(n.is_vertex=FU);continue}if(n.is_vertex\u0026FU)continue;let i=t.addVertex(n.pt,o);n.edge_before=i}for(let n of e)n.edge_before?n.edge_after=n.edge_before.next:t instanceof GT\u0026\u0026n.is_vertex\u0026tee\u0026\u0026(n.edge_after=t.first)}}function xdn(t,e,n){const o=t.edge_before,i=e.edge_after,r=n.length;o.next=n[0],n[0].prev=o,n[r-1].next=i,i.prev=n[r-1]}var{INSIDE:$6,OUTSIDE:q6,BOUNDARY:p1,OVERLAP_SAME:STi,OVERLAP_OPPOSITE:QTi}=X_e,{NOT_VERTEX:wmr,START_VERTEX:Edn,END_VERTEX:Bdn}=X_e,nfe=1,ree=2,YT=3;function vTi(t,e){let[n]=see(t,e,nfe,!0);return n}function o$e(t,e){let o=e.clone().reverse(),[i]=see(t,o,YT,!0);return i}function bdn(t,e){let[n]=see(t,e,ree,!0);return n}function Sdn(t,e){let[n,o]=see(t,e,ree,!1),i=[];for(let s of n.faces)i=[...i,...[...s.edges].map(a=\u003ea.shape)];let r=[];for(let s of o.faces)r=[...r,...[...s.edges].map(a=\u003ea.shape)];return[i,r]}function i$e(t,e){let[n]=see(t,e,YT,!1),o=[];for(let i of n.faces)o=[...o,...[...i.edges].map(r=\u003er.shape)];return o}function Qdn(t,e){let n=t.clone(),o=e.clone(),i=vdn(n,o);iee(i),KU(n,i.int_points1_sorted),KU(o,i.int_points2_sorted),e$e(i),iee(i);let r=i.int_points1_sorted.map(a=\u003ea.pt),s=i.int_points2_sorted.map(a=\u003ea.pt);return[r,s]}function wTi(t,e,n,o){let i=wdn(t,n.int_points1),r=wdn(e,n.int_points2);for(Pdn(i,e),Pdn(r,t),t$e(n.int_points1),t$e(n.int_points2),n$e(n.int_points1,e),n$e(n.int_points2,t);MTi(t,e,n.int_points1,n.int_points1_sorted,n.int_points2,n););bTi(n),r$e(t,o,n.int_points1_sorted,!0),r$e(e,o,n.int_points2_sorted,!1),Mdn(t,i,o,!0),Mdn(e,r,o,!1)}function PTi(t,e,n,o){DTi(t,e,o,n.int_points2),NTi(t,e,n),s$e(t,n.int_points1),s$e(e,n.int_points2),a$e(t,n.int_points1,n.int_points2),a$e(t,n.int_points2,n.int_points1),Ddn(t),Ddn(e)}function see(t,e,n,o){let i=t.clone(),r=e.clone(),s=vdn(i,r);return iee(s),KU(i,s.int_points1_sorted),KU(r,s.int_points2_sorted),e$e(s),iee(s),wTi(i,r,s,n),o\u0026\u0026PTi(i,r,s,n),[i,r]}function vdn(t,e){let n={int_points1:[],int_points2:[]};for(let o of t.edges){let i=e.edges.search(o.box);for(let r of i){let s=o.shape.intersect(r.shape);for(let a of s)YU(o,a,n.int_points1),YU(r,a,n.int_points2)}}return n}function wdn(t,e){let n=[];for(let o of t.faces)e.find(i=\u003ei.face===o)||n.push(o);return n}function Pdn(t,e){for(let n of t)n.first.bv=n.first.bvStart=n.first.bvEnd=void 0,n.first.setInclusion(e)}function MTi(t,e,n,o,i,r){let s,a,A,c=o.length,l=!1;for(let u=0;u\u003cc;u++){let g=o[u];g.face!==s\u0026\u0026(a=u,s=g.face);let h=u,d=UU(o,u,s),p;h+d\u003cc\u0026\u0026o[h+d].face===s?p=h+d:p=a;let m=UU(o,p,s);A=null;for(let I=p;I\u003cp+m;I++){let C=o[I];if(C.face===s\u0026\u0026i[C.id].face===i[g.id].face){A=C;break}}if(A===null)continue;let _=g.edge_after,f=A.edge_before;if(_.bv===p1\u0026\u0026f.bv!=p1){_.bv=f.bv;continue}if(_.bv!=p1\u0026\u0026f.bv===p1){f.bv=_.bv;continue}if(_.bv===p1\u0026\u0026f.bv===p1\u0026\u0026_!=f||_.bv===$6\u0026\u0026f.bv===q6||_.bv===q6\u0026\u0026f.bv===$6){let I=_.next;for(;I!=f;)I.bvStart=void 0,I.bvEnd=void 0,I.bv=void 0,I.setInclusion(e),I=I.next}if(_.bv===p1\u0026\u0026f.bv===p1\u0026\u0026_!=f){let I=_.next,C;for(;I!=f;){if(I.bv!=p1){if(C===void 0)C=I.bv;else if(I.bv!=C)throw wd.UNRESOLVED_BOUNDARY_CONFLICT}I=I.next}C!=null\u0026\u0026(_.bv=C,f.bv=C);continue}if(_.bv===$6\u0026\u0026f.bv===q6||_.bv===q6\u0026\u0026f.bv===$6){let I=_;for(;I!=f;){if(I.bvStart===_.bv\u0026\u0026I.bvEnd===f.bv){let[C,y]=I.shape.distanceTo(e);if(C\u003c10*Ue.DP_TOL){YU(I,y.ps,n);let x=n[n.length-1];if(x.is_vertex\u0026Edn)x.edge_after=I,x.edge_before=I.prev,I.bvStart=p1,I.bv=void 0,I.setInclusion(e);else if(x.is_vertex\u0026Bdn)x.edge_after=I.next,I.bvEnd=p1,I.bv=void 0,I.setInclusion(e);else{let S=e.addVertex(x.pt,I);x.edge_before=S,x.edge_after=S.next,S.setInclusion(e),S.next.bvStart=p1,S.next.bvEnd=void 0,S.next.bv=void 0,S.next.setInclusion(e)}let E=e.findEdgeByPoint(y.pe);YU(E,y.pe,i);let B=i[i.length-1];if(B.is_vertex\u0026Edn)B.edge_after=E,B.edge_before=E.prev;else if(B.is_vertex\u0026Bdn)B.edge_after=E.next;else{let S=i.find(w=\u003ew.edge_after===E),Q=e.addVertex(B.pt,E);B.edge_before=Q,B.edge_after=Q.next,S\u0026\u0026(S.edge_after=Q),Q.bvStart=void 0,Q.bvEnd=p1,Q.bv=void 0,Q.setInclusion(t),Q.next.bvStart=p1,Q.next.bvEnd=void 0,Q.next.bv=void 0,Q.next.setInclusion(t)}iee(r),l=!0;break}}I=I.next}if(l)break;throw wd.UNRESOLVED_BOUNDARY_CONFLICT}}return l}function r$e(t,e,n,o){if(!n)return;let i,r,s,a;for(let A=0;A\u003cn.length;A++){if(s=n[A],s.face!==i\u0026\u0026(r=A,i=s.face),i.isEmpty())continue;let c=A,l=UU(n,A,i),u;c+l\u003cn.length\u0026\u0026n[c+l].face===s.face?u=c+l:u=r,a=n[u];let g=u,h=UU(n,g,i),d=s.edge_after,p=a.edge_before;if(d.bv===$6\u0026\u0026p.bv===$6\u0026\u0026e===nfe||d.bv===q6\u0026\u0026p.bv===q6\u0026\u0026e===ree||(d.bv===q6||p.bv===q6)\u0026\u0026e===YT\u0026\u0026!o||(d.bv===$6||p.bv===$6)\u0026\u0026e===YT\u0026\u0026o||d.bv===p1\u0026\u0026p.bv===p1\u0026\u0026d.overlap\u0026STi\u0026\u0026o||d.bv===p1\u0026\u0026p.bv===p1\u0026\u0026d.overlap\u0026QTi){t.removeChain(i,d,p);for(let m=c;m\u003cc+l;m++)n[m].edge_after=void 0;for(let m=g;m\u003cg+h;m++)n[m].edge_before=void 0}A+=l-1}}function DTi(t,e,n,o){for(let i of e.faces){for(let r of i)t.edges.add(r);o.find(r=\u003er.face===i)===void 0\u0026\u0026t.addFace(i.first,i.last)}}function NTi(t,e,n){if(n.int_points1.length!==0)for(let o=0;o\u003cn.int_points1.length;o++){let i=n.int_points1[o],r=n.int_points2[o];if(i.edge_before!==void 0\u0026\u0026i.edge_after===void 0\u0026\u0026r.edge_before===void 0\u0026\u0026r.edge_after!==void 0\u0026\u0026(i.edge_before.next=r.edge_after,r.edge_after.prev=i.edge_before,i.edge_after=r.edge_after,r.edge_before=i.edge_before),r.edge_before!==void 0\u0026\u0026r.edge_after===void 0\u0026\u0026i.edge_before===void 0\u0026\u0026i.edge_after!==void 0\u0026\u0026(r.edge_before.next=i.edge_after,i.edge_after.prev=r.edge_before,r.edge_after=i.edge_after,i.edge_before=r.edge_before),i.edge_before!==void 0\u0026\u0026i.edge_after===void 0)for(let s of n.int_points1_sorted)s!==i\u0026\u0026s.edge_before===void 0\u0026\u0026s.edge_after!==void 0\u0026\u0026s.pt.equalTo(i.pt)\u0026\u0026(i.edge_before.next=s.edge_after,s.edge_after.prev=i.edge_before,i.edge_after=s.edge_after,s.edge_before=i.edge_before);if(r.edge_before!==void 0\u0026\u0026r.edge_after===void 0)for(let s of n.int_points2_sorted)s!==r\u0026\u0026s.edge_before===void 0\u0026\u0026s.edge_after!==void 0\u0026\u0026s.pt.equalTo(r.pt)\u0026\u0026(r.edge_before.next=s.edge_after,s.edge_after.prev=r.edge_before,r.edge_after=s.edge_after,s.edge_before=r.edge_before)}}function s$e(t,e){for(let n of e)t.faces.delete(n.face),n.face=void 0,n.edge_before\u0026\u0026(n.edge_before.face=void 0),n.edge_after\u0026\u0026(n.edge_after.face=void 0)}function a$e(t,e,n){for(let o of e){if(o.edge_before===void 0||o.edge_after===void 0||o.face||o.edge_after.face||o.edge_before.face)continue;let i=o.edge_after,r=o.edge_before;try{Wje.testInfiniteLoop(i)}catch{throw wd.CANNOT_COMPLETE_BOOLEAN_OPERATION}let s=t.addFace(i,r);for(let a of e)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s);for(let a of n)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.face===s\u0026\u0026a.edge_after.face===s\u0026\u0026(a.face=s)}}function Mdn(t,e,n,o){for(let i of e){let r=i.first.bv;(n===nfe\u0026\u0026r===$6||n===YT\u0026\u0026r===$6\u0026\u0026o||n===YT\u0026\u0026r===q6\u0026\u0026!o||n===ree\u0026\u0026r===q6)\u0026\u0026t.deleteFace(i)}}function Ddn(t){const e=[];for(const n of t.edges)(!n.face||!t.faces.has(n.face))\u0026\u0026e.push(n);for(const n of e)t.edges.delete(n)}var RTi=Object.freeze({__proto__:null,BOOLEAN_INTERSECT:ree,BOOLEAN_SUBTRACT:YT,BOOLEAN_UNION:nfe,calculateIntersections:Qdn,innerClip:Sdn,intersect:bdn,outerClip:i$e,removeNotRelevantChains:r$e,removeOldFaces:s$e,restoreFaces:a$e,subtract:o$e,unify:vTi}),TTi=RegExp(\"T.F..FFF.|T.F...F..\"),kTi=RegExp(\"T........|.T.......|...T.....|....T....\"),FTi=RegExp(\"FT.......|F..T.....|F...T....\"),LTi=RegExp(\"T.F..F...\"),HTi=RegExp(\"T.F..F...|.TF..F...|..FT.F...|..F.TF...\"),VU=class{constructor(){this.m=new Array(9).fill(void 0)}get I2I(){return this.m[0]}set I2I(t){this.m[0]=t}get I2B(){return this.m[1]}set I2B(t){this.m[1]=t}get I2E(){return this.m[2]}set I2E(t){this.m[2]=t}get B2I(){return this.m[3]}set B2I(t){this.m[3]=t}get B2B(){return this.m[4]}set B2B(t){this.m[4]=t}get B2E(){return this.m[5]}set B2E(t){this.m[5]=t}get E2I(){return this.m[6]}set E2I(t){this.m[6]=t}get E2B(){return this.m[7]}set E2B(t){this.m[7]=t}get E2E(){return this.m[8]}set E2E(t){this.m[8]=t}toString(){return this.m.map(t=\u003et instanceof Array\u0026\u0026t.length\u003e0?\"T\":t instanceof Array\u0026\u0026t.length===0?\"F\":\"*\").join(\"\")}equal(){return TTi.test(this.toString())}intersect(){return kTi.test(this.toString())}touch(){return FTi.test(this.toString())}inside(){return LTi.test(this.toString())}covered(){return HTi.test(this.toString())}};function aee(t,e){let n,o=new Ue.Ray(e),i=new Ue.Line(o.pt,o.norm);const r=new Ue.Box(o.box.xmin-Ue.DP_TOL,o.box.ymin-Ue.DP_TOL,o.box.xmax+Ue.DP_TOL,o.box.ymax+Ue.DP_TOL);if(t.box.not_intersect(r))return Ue.OUTSIDE;let s=t.edges.search(r);if(s.length===0)return Ue.OUTSIDE;for(let l of s)if(l.shape.contains(e))return Ue.BOUNDARY;let a=[...t.faces],A=[];for(let l of s)for(let u of o.intersect(l.shape)){if(u.equalTo(e))return Ue.BOUNDARY;A.push({pt:u,edge:l,face_index:a.indexOf(l.face)})}A.sort((l,u)=\u003erdn(l.pt.x,u.pt.x)?-1:idn(l.pt.x,u.pt.x)?1:l.face_index\u003cu.face_index?-1:l.face_index\u003eu.face_index?1:l.edge.arc_length\u003cu.edge.arc_length?-1:l.edge.arc_length\u003eu.edge.arc_length?1:0);let c=0;for(let l=0;l\u003cA.length;l++){let u=A[l];if(u.pt.equalTo(u.edge.shape.start)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.prev===A[l-1].edge)continue;let g=u.edge.prev;for(;Jje(g.length);)g=g.prev;let h=g.shape.tangentInEnd(),d=u.pt.translate(h),p=u.edge.shape.tangentInStart(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.pt.equalTo(u.edge.shape.end)){if(l\u003e0\u0026\u0026u.pt.equalTo(A[l-1].pt)\u0026\u0026u.face_index===A[l-1].face_index\u0026\u0026u.edge.next===A[l-1].edge)continue;let g=u.edge.next;for(;Jje(g.length);)g=g.next;let h=g.shape.tangentInStart(),d=u.pt.translate(h),p=u.edge.shape.tangentInEnd(),m=u.pt.translate(p),_=d.leftTo(i),f=m.leftTo(i);(_\u0026\u0026!f||!_\u0026\u0026f)\u0026\u0026c++}else if(u.edge.shape instanceof Ue.Segment)c++;else{let g=u.edge.shape.box;LT(u.pt.y,g.ymin)||LT(u.pt.y,g.ymax)||c++}}return n=c%2===1?q_e:tdn,n}function OTi(t,e){return zU(t,e).equal()}function Ndn(t,e){return zU(t,e).intersect()}function GTi(t,e){return zU(t,e).touch()}function YTi(t,e){return!Ndn(t,e)}function Rdn(t,e){return zU(t,e).inside()}function Tdn(t,e){return zU(t,e).covered()}function UTi(t,e){return Rdn(e,t)}function kdn(t,e){return Tdn(e,t)}function zU(t,e){if(t instanceof Ue.Line\u0026\u0026e instanceof Ue.Line)return KTi(t,e);if(t instanceof Ue.Line\u0026\u0026e instanceof Ue.Circle)return VTi(t,e);if(t instanceof Ue.Line\u0026\u0026e instanceof Ue.Box)return zTi(t,e);if(t instanceof Ue.Line\u0026\u0026e instanceof Ue.Polygon)return JTi(t,e);if((t instanceof Ue.Segment||t instanceof Ue.Arc)\u0026\u0026e instanceof Ue.Polygon)return Fdn(t,e);if((t instanceof Ue.Segment||t instanceof Ue.Arc)\u0026\u0026(e instanceof Ue.Circle||e instanceof Ue.Box))return Fdn(t,new Ue.Polygon(e));if(t instanceof Ue.Polygon\u0026\u0026e instanceof Ue.Polygon)return ofe(t,e);if((t instanceof Ue.Circle||t instanceof Ue.Box)\u0026\u0026(e instanceof Ue.Circle||e instanceof Ue.Box))return ofe(new Ue.Polygon(t),new Ue.Polygon(e));if((t instanceof Ue.Circle||t instanceof Ue.Box)\u0026\u0026e instanceof Ue.Polygon)return ofe(new Ue.Polygon(t),e);if(t instanceof Ue.Polygon\u0026\u0026(e instanceof Ue.Circle||e instanceof Ue.Box))return ofe(t,new Ue.Polygon(e))}function KTi(t,e){let n=new VU,o=LU(t,e);return o.length===0?t.contains(e.pt)\u0026\u0026e.contains(t.pt)?(n.I2I=[t],n.I2E=[],n.E2I=[]):(n.I2I=[],n.I2E=[t],n.E2I=[e]):(n.I2I=o,n.I2E=t.split(o),n.E2I=e.split(o)),n}function VTi(t,e){let n=new VU,o=OT(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new GT([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ue.Polygon([e.toArc()]).cutWithLine(t)}return n}function zTi(t,e){let n=new VU,o=HU(t,e);if(o.length===0)n.I2I=[],n.I2B=[],n.I2E=[t],n.E2I=[e];else if(o.length===1)n.I2I=[],n.I2B=o,n.I2E=t.split(o),n.E2I=[e];else{let i=new GT([t]),r=t.sortPoints(o);i.split(r);let s=i.toShapes();e.toSegments().some(a=\u003ea.contains(o[0])\u0026\u0026a.contains(o[1]))?(n.I2I=[],n.I2B=[s[1]],n.I2E=[s[0],s[2]],n.E2I=[e]):(n.I2I=[s[1]],n.I2B=r,n.I2E=[s[0],s[2]],n.E2I=new Ue.Polygon(e.toSegments()).cutWithLine(t))}return n}function JTi(t,e){let n=new VU,o=oee(t,e),i=new GT([t]),r=o.length\u003e0?o.slice():t.sortPoints(o);return i.split(r),[...i].forEach(s=\u003es.setInclusion(e)),n.I2I=[...i].filter(s=\u003es.bv===Ue.INSIDE).map(s=\u003es.shape),n.I2B=[...i].slice(1).map(s=\u003es.bv===Ue.BOUNDARY?s.shape:s.shape.start),n.I2E=[...i].filter(s=\u003es.bv===Ue.OUTSIDE).map(s=\u003es.shape),n.E2I=e.cutWithLine(t),n}function Fdn(t,e){let n=new VU,o=ITi(t,e),i=o.length\u003e0?o.slice():t.sortPoints(o),r=new GT([t]);r.split(i),[...r].forEach(s=\u003es.setInclusion(e)),n.I2I=[...r].filter(s=\u003es.bv===Ue.INSIDE).map(s=\u003es.shape),n.I2B=[...r].slice(1).map(s=\u003es.bv===Ue.BOUNDARY?s.shape:s.shape.start),n.I2E=[...r].filter(s=\u003es.bv===Ue.OUTSIDE).map(s=\u003es.shape),n.B2I=[],n.B2B=[],n.B2E=[];for(let s of[t.start,t.end])switch(aee(e,s)){case Ue.INSIDE:n.B2I.push(s);break;case Ue.BOUNDARY:n.B2B.push(s);break;case Ue.OUTSIDE:n.B2E.push(s);break}return n}function ofe(t,e){let n=new VU,[o,i]=Qdn(t,e),r=bdn(t,e),s=o$e(t,e),a=o$e(e,t),[A,c]=Sdn(t,e),l=i$e(t,e),u=i$e(e,t);return n.I2I=r.isEmpty()?[]:[r],n.I2B=c,n.I2E=s.isEmpty()?[]:[s],n.B2I=A,n.B2B=o,n.B2E=l,n.E2I=a.isEmpty()?[]:[a],n.E2B=u,n}var WTi=Object.freeze({__proto__:null,contain:UTi,cover:kdn,covered:Tdn,disjoint:YTi,equal:OTi,inside:Rdn,intersect:Ndn,relate:zU,touch:GTi}),Aee=class Fk{constructor(e=1,n=0,o=0,i=1,r=0,s=0){this.a=e,this.b=n,this.c=o,this.d=i,this.tx=r,this.ty=s}fromMatrix3x3(e){const[n,o,i]=e[0],[r,s,a]=e[1];return new Fk(n,r,o,s,i,a)}toMatrix3x3(){return[[this.a,this.c,this.tx],[this.b,this.d,this.ty],[0,0,1]]}clone(){return new Fk(this.a,this.b,this.c,this.d,this.tx,this.ty)}transform(e){return[e[0]*this.a+e[1]*this.c+this.tx,e[0]*this.b+e[1]*this.d+this.ty]}multiply(e){return new Fk(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.tx+this.c*e.ty+this.tx,this.b*e.tx+this.d*e.ty+this.ty)}translate(...e){let n,o;if(e.length==1\u0026\u0026!isNaN(e[0].x)\u0026\u0026!isNaN(e[0].y))n=e[0].x,o=e[0].y;else if(e.length===2\u0026\u0026typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\")n=e[0],o=e[1];else throw wd.ILLEGAL_PARAMETERS;return this.multiply(new Fk(1,0,0,1,n,o))}rotate(e,n=0,o=0){let i=Math.cos(e),r=Math.sin(e);return this.translate(n,o).multiply(new Fk(i,r,-r,i,0,0)).translate(-n,-o)}scale(e,n){return this.multiply(new Fk(e,0,0,n,0,0))}equalTo(e){return!(!Ue.Utils.EQ(this.tx,e.tx)||!Ue.Utils.EQ(this.ty,e.ty)||!Ue.Utils.EQ(this.a,e.a)||!Ue.Utils.EQ(this.b,e.b)||!Ue.Utils.EQ(this.c,e.c)||!Ue.Utils.EQ(this.d,e.d))}};Ue.Matrix=Aee;var jTi=(...t)=\u003enew Ue.Matrix(...t);Ue.matrix=jTi;var $Ti=class{constructor(t,e){this.low=t,this.high=e}get max(){return this.clone()}less_than(t){return this.low\u003ct.low||this.low===t.low\u0026\u0026this.high\u003ct.high}equal_to(t){return this.low===t.low\u0026\u0026this.high===t.high}intersect(t){return!this.not_intersect(t)}not_intersect(t){return this.high\u003ct.low||t.high\u003cthis.low}merge(t){const e=this.low===void 0?t.low:this.low\u003ct.low?this.low:t.low,n=this.high===void 0?t.high:this.high\u003et.high?this.high:t.high,o=this.clone();return o.low=e,o.high=n,o}output(){return[this.low,this.high]}comparable_less_than(t,e){return t\u003ce}},qTi=class y4n extends $Ti{clone(){return new y4n(this.low,this.high)}},fI=1,cu=0,LP=class{constructor(e,n,o=null,i=null,r=null,s=cu){if(this.left=o,this.right=i,this.parent=r,this.color=s,this.item={key:void 0,values:[]},n!==void 0\u0026\u0026this.item.values.push(n),e!==void 0)if(Array.isArray(e)){const[a,A]=e;if(!Number.isNaN(a)\u0026\u0026!Number.isNaN(A)){let c=a,l=A;c\u003el\u0026\u0026([c,l]=[l,c]),this.item.key=new qTi(c,l)}}else this.item.key=e;this.max=this.item.key?this.item.key.max:void 0}isNil(){return this.item.key===void 0\u0026\u0026this.item.values.length===0\u0026\u0026this.left===null\u0026\u0026this.right===null\u0026\u0026this.color===cu}requireKey(){if(!this.item.key)throw new Error(\"Node key is undefined (nil/sentinel). Operation is not applicable.\");return this.item.key}less_than(e){const n=this.requireKey(),o=e.requireKey();return n.less_than(o)}_value_equal(e){const n=this.item.values[0],o=e.item.values[0];return n\u0026\u0026o\u0026\u0026n.equal_to?n.equal_to(o):n===o}equal_to(e){const n=this.requireKey(),o=e.requireKey();return n.equal_to(o)}intersect(e){const n=this.requireKey(),o=e.requireKey();return n.intersect(o)}copy_data(e){this.item.key=e.item.key,this.item.values=e.item.values.slice()}update_max(){this.max=this.item.key?this.item.key.max:void 0,this.right\u0026\u0026this.right.max\u0026\u0026(this.max=this.max?this.max.merge(this.right.max):this.right.max),this.left\u0026\u0026this.left.max\u0026\u0026(this.max=this.max?this.max.merge(this.left.max):this.left.max)}not_intersect_left_subtree(e){if(!this.left)return!0;const n=this.left.max?this.left.max.high:this.left.item.key.high,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(n,i.low)}not_intersect_right_subtree(e){if(!this.right)return!0;const n=this.right.max?this.right.max.low:this.right.item.key.low,o=this.requireKey(),i=e.requireKey();return o.comparable_less_than(i.high,n)}},A$e=class x4n{constructor(){this.root=null,this.nil_node=new LP}get size(){let e=0;return this.tree_walk(this.root,n=\u003ee+=n.item.values.length),e}get keys(){const e=[];return this.tree_walk(this.root,n=\u003ee.push(n.item.key.output())),e}get values(){const e=[];return this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e.push(o)}),e}get items(){const e=[];return this.tree_walk(this.root,n=\u003e{const o=n.item.key.output();for(const i of n.item.values)e.push({key:o,value:i})}),e}isEmpty(){return this.root==null||this.root===this.nil_node}clear(){this.root=null}insert(e,n=e){if(e===void 0)return;const o=this.tree_search(this.root,new LP(e));if(o)return o.item.values.push(n),o;const i=new LP(e,n,this.nil_node,this.nil_node,null,fI);return this.tree_insert(i),this.recalc_max(i),i}exist(e,n=e){const o=this.tree_search(this.root,new LP(e));return o?arguments.length\u003c2||n===e?!0:o.item.values.some(i=\u003ei\u0026\u0026i.equal_to?i.equal_to(n):i===n):!1}remove(e,n=e){const o=this.tree_search(this.root,new LP(e));if(!o)return;if(arguments.length\u003c2)return this.tree_delete(o),o;const i=o.item.values.findIndex(r=\u003er\u0026\u0026r.equal_to?r.equal_to(n):r===n);if(i\u003e=0)return o.item.values.splice(i,1),o.item.values.length===0\u0026\u0026this.tree_delete(o),o}search(e,n=(o,i)=\u003eo===i?i.output():o){const o=new LP(e),i=[];this.tree_search_interval(this.root,o,i);const r=[];for(const s of i)for(const a of s.item.values)r.push(n(a,s.item.key));return r}intersect_any(e){const n=new LP(e);return this.tree_find_any_interval(this.root,n)}forEach(e){this.tree_walk(this.root,n=\u003e{for(const o of n.item.values)e(n.item.key,o)})}map(e){const n=new x4n;return this.tree_walk(this.root,o=\u003e{for(const i of o.item.values)n.insert(o.item.key,e(i,o.item.key))}),n}*iterate(e,n=(o,i)=\u003eo===i?i.output():o){let o=null;for(e?o=this.tree_search_nearest_forward(this.root,new LP(e)):this.root\u0026\u0026(o=this.local_minimum(this.root));o;){for(const i of o.item.values)yield n(i,o.item.key);o=this.tree_successor(o)}}recalc_max(e){let n=e;for(;n.parent!=null;)n.parent.update_max(),n=n.parent}tree_insert(e){let n=this.root,o=null;if(this.root==null||this.root===this.nil_node)this.root=e;else{for(;n!==this.nil_node;)o=n,e.less_than(n)?n=n.left:n=n.right;e.parent=o,e.less_than(o)?o.left=e:o.right=e}this.insert_fixup(e)}insert_fixup(e){let n,o;for(n=e;n!==this.root\u0026\u0026n.parent.color===fI;)n.parent===n.parent.parent.left?(o=n.parent.parent.right,o.color===fI?(n.parent.color=cu,o.color=cu,n.parent.parent.color=fI,n=n.parent.parent):(n===n.parent.right\u0026\u0026(n=n.parent,this.rotate_left(n)),n.parent.color=cu,n.parent.parent.color=fI,this.rotate_right(n.parent.parent))):(o=n.parent.parent.left,o.color===fI?(n.parent.color=cu,o.color=cu,n.parent.parent.color=fI,n=n.parent.parent):(n===n.parent.left\u0026\u0026(n=n.parent,this.rotate_right(n)),n.parent.color=cu,n.parent.parent.color=fI,this.rotate_left(n.parent.parent)));this.root.color=cu}tree_delete(e){let n,o;e.left===this.nil_node||e.right===this.nil_node?n=e:n=this.tree_successor(e),n.left!==this.nil_node?o=n.left:o=n.right,o.parent=n.parent,n===this.root?this.root=o:(n===n.parent.left?n.parent.left=o:n.parent.right=o,n.parent.update_max()),this.recalc_max(o),n!==e\u0026\u0026(e.copy_data(n),e.update_max(),this.recalc_max(e)),n.color===cu\u0026\u0026this.delete_fixup(o)}delete_fixup(e){let n=e,o;for(;n!==this.root\u0026\u0026n.parent!=null\u0026\u0026n.color===cu;)n===n.parent.left?(o=n.parent.right,o.color===fI\u0026\u0026(o.color=cu,n.parent.color=fI,this.rotate_left(n.parent),o=n.parent.right),o.left.color===cu\u0026\u0026o.right.color===cu?(o.color=fI,n=n.parent):(o.right.color===cu\u0026\u0026(o.color=fI,o.left.color=cu,this.rotate_right(o),o=n.parent.right),o.color=n.parent.color,n.parent.color=cu,o.right.color=cu,this.rotate_left(n.parent),n=this.root)):(o=n.parent.left,o.color===fI\u0026\u0026(o.color=cu,n.parent.color=fI,this.rotate_right(n.parent),o=n.parent.left),o.left.color===cu\u0026\u0026o.right.color===cu?(o.color=fI,n=n.parent):(o.left.color===cu\u0026\u0026(o.color=fI,o.right.color=cu,this.rotate_left(o),o=n.parent.left),o.color=n.parent.color,n.parent.color=cu,o.left.color=cu,this.rotate_right(n.parent),n=this.root));n.color=cu}tree_search(e,n){if(!(e==null||e===this.nil_node))return n.equal_to(e)?e:n.less_than(e)?this.tree_search(e.left,n):this.tree_search(e.right,n)}tree_search_nearest_forward(e,n){let o=null,i=e;for(;i\u0026\u0026i!==this.nil_node;)i.less_than(n)?i.intersect(n)?(o=i,i=i.left):i=i.right:((!o||i.less_than(o))\u0026\u0026(o=i),i=i.left);return o||null}tree_search_interval(e,n,o){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left!==this.nil_node\u0026\u0026!e.not_intersect_left_subtree(n)\u0026\u0026this.tree_search_interval(e.left,n,o),e.intersect(n)\u0026\u0026o.push(e),e.right!==this.nil_node\u0026\u0026!e.not_intersect_right_subtree(n)\u0026\u0026this.tree_search_interval(e.right,n,o))}tree_find_any_interval(e,n){let o=!1;return e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(e.left!==this.nil_node\u0026\u0026!e.not_intersect_left_subtree(n)\u0026\u0026(o=this.tree_find_any_interval(e.left,n)),o||(o=e.intersect(n)),!o\u0026\u0026e.right!==this.nil_node\u0026\u0026!e.not_intersect_right_subtree(n)\u0026\u0026(o=this.tree_find_any_interval(e.right,n))),o}local_minimum(e){let n=e;for(;n.left!=null\u0026\u0026n.left!==this.nil_node;)n=n.left;return n}local_maximum(e){let n=e;for(;n.right!=null\u0026\u0026n.right!==this.nil_node;)n=n.right;return n}tree_successor(e){let n,o,i;if(e.right!==this.nil_node)n=this.local_minimum(e.right);else{for(o=e,i=e.parent;i!=null\u0026\u0026i.right===o;)o=i,i=i.parent;n=i}return n}rotate_left(e){const n=e.right;e.right=n.left,n.left!==this.nil_node\u0026\u0026(n.left.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}rotate_right(e){const n=e.left;e.left=n.right,n.right!==this.nil_node\u0026\u0026(n.right.parent=e),n.parent=e.parent,e===this.root?this.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.right=e,e.parent=n,e!==null\u0026\u0026e!==this.nil_node\u0026\u0026e.update_max(),n!=null\u0026\u0026n!==this.nil_node\u0026\u0026n.update_max()}tree_walk(e,n){e!=null\u0026\u0026e!==this.nil_node\u0026\u0026(this.tree_walk(e.left,n),n(e),this.tree_walk(e.right,n))}testRedBlackProperty(){let e=!0;return this.tree_walk(this.root,function(n){n.color===fI\u0026\u0026(n.left.color===cu\u0026\u0026n.right.color===cu||(e=!1))}),e}testBlackHeightProperty(e){let n=0,o=0,i=0;if(e.color===cu\u0026\u0026n++,e.left!==this.nil_node?o=this.testBlackHeightProperty(e.left):o=1,e.right!==this.nil_node?i=this.testBlackHeightProperty(e.right):i=1,o!==i)throw new Error(\"Red-black height property violated\");return n+=o,n}},XTi=class extends Set{constructor(t){super(t),this.index=new A$e,this.forEach(e=\u003ethis.index.insert(e))}add(t){let e=this.size;const{key:n,value:o}=t,i=n||t.box,r=o||t;return super.add(r),this.size\u003ee\u0026\u0026this.index.insert(i,r),this}delete(t){const{key:e,value:n}=t,o=e||t.box,i=n||t;let r=super.delete(i);return r\u0026\u0026this.index.remove(o,i),r}clear(){super.clear(),this.index=new A$e}search(t){return this.index.search(t)}hit(t){let e=new Ue.Box(t.x-1,t.y-1,t.x+1,t.y+1);return this.index.search(e).filter(o=\u003et.on(o))}svg(){return[...this].reduce((e,n)=\u003ee+n.svg(),\"\")}};Ue.PlanarSet=XTi;var HP=class{get name(){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}get box(){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}clone(){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}translate(...t){return this.transform(new Aee().translate(...t))}rotate(t,e=new Ue.Point){return this.transform(new Aee().rotate(t,e.x,e.y))}scale(t,e){return this.transform(new Aee().scale(t,e))}transform(...t){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}toJSON(){return Object.assign({},this,{name:this.name})}svg(t={}){throw wd.CANNOT_INVOKE_ABSTRACT_METHOD}},ZTi=class E4n extends HP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===2){let n=e[0];if(typeof n[0]==\"number\"\u0026\u0026typeof n[1]==\"number\"){this.x=n[0],this.y=n[1];return}}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"point\"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===2\u0026\u0026typeof e[0]==\"number\"\u0026\u0026typeof e[1]==\"number\"){this.x=e[0],this.y=e[1];return}throw wd.ILLEGAL_PARAMETERS}}get box(){return new Ue.Box(this.x,this.y,this.x,this.y)}clone(){return new Ue.Point(this.x,this.y)}get vertices(){return[this.clone()]}equalTo(e){return Ue.Utils.EQ(this.x,e.x)\u0026\u0026Ue.Utils.EQ(this.y,e.y)}lessThan(e){return!!(Ue.Utils.LT(this.y,e.y)||Ue.Utils.EQ(this.y,e.y)\u0026\u0026Ue.Utils.LT(this.x,e.x))}transform(e){return new Ue.Point(e.transform([this.x,this.y]))}projectionOn(e){if(this.equalTo(e.pt))return this.clone();let n=new Ue.Vector(this,e.pt);if(Ue.Utils.EQ_0(n.cross(e.norm)))return e.pt.clone();let o=n.dot(e.norm),i=e.norm.multiply(o);return this.translate(i)}leftTo(e){let n=new Ue.Vector(e.pt,this);return Ue.Utils.GT(n.dot(e.norm),0)}distanceTo(e){if(e instanceof E4n){let n=e.x-this.x,o=e.y-this.y;return[Math.sqrt(n*n+o*o),new Ue.Segment(this,e)]}if(e instanceof Ue.Line)return Ue.Distance.point2line(this,e);if(e instanceof Ue.Circle)return Ue.Distance.point2circle(this,e);if(e instanceof Ue.Segment)return Ue.Distance.point2segment(this,e);if(e instanceof Ue.Arc)return Ue.Distance.point2arc(this,e);if(e instanceof Ue.Box)return Ue.Distance.point2polygon(this,new Ue.Polygon(e));if(e instanceof Ue.Polygon)return Ue.Distance.point2polygon(this,e);if(e instanceof Ue.PlanarSet)return Ue.Distance.shape2planarSet(this,e);if(e instanceof Ue.Multiline)return Ue.Distance.shape2multiline(this,e)}on(e){if(e instanceof Ue.Point)return this.equalTo(e);if(e.contains\u0026\u0026e.contains instanceof Function)return e.contains(this);throw Ue.Errors.UNSUPPORTED_SHAPE_TYPE}get name(){return\"point\"}svg(e={}){const n=e.r??3;return`\n\u003ccircle cx=\"${this.x}\" cy=\"${this.y}\" r=\"${n}\"\n ${HT({fill:\"red\",...e})} /\u003e`}};Ue.Point=ZTi;var eki=(...t)=\u003enew Ue.Point(...t);Ue.point=eki;var tki=class extends HP{constructor(...e){if(super(),this.x=0,this.y=0,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===2){let n=e[0];if(typeof n[0]==\"number\"\u0026\u0026typeof n[1]==\"number\"){this.x=n[0],this.y=n[1];return}}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"vector\"){let{x:n,y:o}=e[0];this.x=n,this.y=o;return}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"segment\"){let{start:n,end:o}=e[0];this.x=o.x-n.x,this.y=o.y-n.y;return}if(e.length===2){let n=e[0],o=e[1];if(typeof n==\"number\"\u0026\u0026typeof o==\"number\"){this.x=n,this.y=o;return}if(n instanceof Ue.Point\u0026\u0026o instanceof Ue.Point){this.x=o.x-n.x,this.y=o.y-n.y;return}}throw wd.ILLEGAL_PARAMETERS}}clone(){return new Ue.Vector(this.x,this.y)}get slope(){let e=Math.atan2(this.y,this.x);return e\u003c0\u0026\u0026(e=2*Math.PI+e),e}get length(){return Math.sqrt(this.dot(this))}isZeroLength(){return Ue.Utils.EQ_0(this.length)}equalTo(e){return Ue.Utils.EQ(this.x,e.x)\u0026\u0026Ue.Utils.EQ(this.y,e.y)}multiply(e){return new Ue.Vector(e*this.x,e*this.y)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}normalize(){if(this.isZeroLength())throw wd.ZERO_DIVISION;return new Ue.Vector(this.x/this.length,this.y/this.length)}rotate(e,n=new Ue.Point){if(n.x===0\u0026\u0026n.y===0)return this.transform(new Aee().rotate(e));throw wd.OPERATION_IS_NOT_SUPPORTED}transform(e){return new Ue.Vector(e.transform([this.x,this.y]))}rotate90CCW(){return new Ue.Vector(-this.y,this.x)}rotate90CW(){return new Ue.Vector(this.y,-this.x)}invert(){return new Ue.Vector(-this.x,-this.y)}add(e){return new Ue.Vector(this.x+e.x,this.y+e.y)}subtract(e){return new Ue.Vector(this.x-e.x,this.y-e.y)}angleTo(e){let n=this.normalize(),o=e.normalize(),i=Math.atan2(n.cross(o),n.dot(o));return i\u003c0\u0026\u0026(i+=2*Math.PI),i}projectionOn(e){let n=e.normalize(),o=this.dot(n);return n.multiply(o)}get name(){return\"vector\"}};Ue.Vector=tki;var Ldn=(...t)=\u003enew Ue.Vector(...t);Ue.vector=Ldn;var nki=class Sit extends HP{constructor(...e){if(super(),this.ps=new Ue.Point,this.pe=new Ue.Point,e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Array\u0026\u0026e[0].length===4){let n=e[0];this.ps=new Ue.Point(n[0],n[1]),this.pe=new Ue.Point(n[2],n[3]);return}if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"segment\"){let{ps:n,pe:o}=e[0];this.ps=new Ue.Point(n.x,n.y),this.pe=new Ue.Point(o.x,o.y);return}if(e.length===1\u0026\u0026e[0]instanceof Ue.Point){this.ps=e[0].clone();return}if(e.length===2\u0026\u0026e[0]instanceof Ue.Point\u0026\u0026e[1]instanceof Ue.Point){this.ps=e[0].clone(),this.pe=e[1].clone();return}if(e.length===4){this.ps=new Ue.Point(e[0],e[1]),this.pe=new Ue.Point(e[2],e[3]);return}throw wd.ILLEGAL_PARAMETERS}}clone(){return new Ue.Segment(this.start,this.end)}get start(){return this.ps}get end(){return this.pe}get vertices(){return[this.ps.clone(),this.pe.clone()]}get length(){return this.start.distanceTo(this.end)[0]}get slope(){return new Ue.Vector(this.start,this.end).slope}get box(){return new Ue.Box(Math.min(this.start.x,this.end.x),Math.min(this.start.y,this.end.y),Math.max(this.start.x,this.end.x),Math.max(this.start.y,this.end.y))}equalTo(e){return this.ps.equalTo(e.ps)\u0026\u0026this.pe.equalTo(e.pe)}contains(e){return Ue.Utils.EQ_0(this.distanceToPoint(e))}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return nee(this,e);if(e instanceof Ue.Ray)return Xje(e,this);if(e instanceof Ue.Segment)return efe(this,e);if(e instanceof Ue.Circle)return tfe(this,e);if(e instanceof Ue.Box)return gTi(this,e);if(e instanceof Ue.Arc)return OU(this,e);if(e instanceof Ue.Polygon)return $je(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2segment(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle){let[n,o]=Ue.Distance.segment2circle(this,e);return[n,o]}if(e instanceof Ue.Line){let[n,o]=Ue.Distance.segment2line(this,e);return[n,o]}if(e instanceof Ue.Segment){let[n,o]=Ue.Distance.segment2segment(this,e);return[n,o]}if(e instanceof Ue.Arc){let[n,o]=Ue.Distance.segment2arc(this,e);return[n,o]}if(e instanceof Ue.Box){let[n,o]=Ue.Distance.shape2polygon(this,new Ue.Polygon(e));return[n,o]}if(e instanceof Ue.Polygon){let[n,o]=Ue.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ue.PlanarSet){let[n,o]=Ue.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ue.Multiline)return Ue.Distance.shape2multiline(this,e)}tangentInStart(){return new Ue.Vector(this.start,this.end).normalize()}tangentInEnd(){return new Ue.Vector(this.end,this.start).normalize()}reverse(){return new Sit(this.end,this.start)}split(e){return this.start.equalTo(e)?[null,this.clone()]:this.end.equalTo(e)?[this.clone(),null]:[new Ue.Segment(this.start,e),new Ue.Segment(e,this.end)]}middle(){return new Ue.Point((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}pointAtLength(e){if(e\u003ethis.length||e\u003c0)return null;if(e==0)return this.start;if(e==this.length)return this.end;let n=e/this.length;return new Ue.Point((this.end.x-this.start.x)*n+this.start.x,(this.end.y-this.start.y)*n+this.start.y)}distanceToPoint(e){let[n,...o]=Ue.Distance.point2segment(e,this);return n}definiteIntegral(e=0){let n=this.end.x-this.start.x,o=this.start.y-e,i=this.end.y-e;return n*(o+i)/2}transform(e=new Ue.Matrix){return new Sit(this.ps.transform(e),this.pe.transform(e))}isZeroLength(){return this.ps.equalTo(this.pe)}sortPoints(e){return new Ue.Line(this.start,this.end).sortPoints(e)}get name(){return\"segment\"}svg(e={}){return`\n\u003cline x1=\"${this.start.x}\" y1=\"${this.start.y}\" x2=\"${this.end.x}\" y2=\"${this.end.y}\" ${HT(e)} /\u003e`}};Ue.Segment=nki;var oki=(...t)=\u003enew Ue.Segment(...t);Ue.segment=oki;var{vector:cee}=Ue,iki=class B4n extends HP{constructor(...e){if(super(),this.pt=new Ue.Point,this.norm=new Ue.Vector(0,1),e.length!==0){if(e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"line\"){let{pt:n,norm:o}=e[0];this.pt=new Ue.Point(n),this.norm=new Ue.Vector(o);return}if(e.length===2){let n=e[0],o=e[1];if(n instanceof Ue.Point\u0026\u0026o instanceof Ue.Point){this.pt=n,this.norm=B4n.points2norm(n,o),this.norm.dot(cee(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert();return}if(n instanceof Ue.Point\u0026\u0026o instanceof Ue.Vector){if(Ue.Utils.EQ_0(o.x)\u0026\u0026Ue.Utils.EQ_0(o.y))throw wd.ILLEGAL_PARAMETERS;this.pt=n.clone(),this.norm=o.clone(),this.norm=this.norm.normalize(),this.norm.dot(cee(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert();return}if(n instanceof Ue.Vector\u0026\u0026o instanceof Ue.Point){if(Ue.Utils.EQ_0(n.x)\u0026\u0026Ue.Utils.EQ_0(n.y))throw wd.ILLEGAL_PARAMETERS;this.pt=o.clone(),this.norm=n.clone(),this.norm=this.norm.normalize(),this.norm.dot(cee(this.pt.x,this.pt.y))\u003e=0\u0026\u0026this.norm.invert();return}}throw wd.ILLEGAL_PARAMETERS}}clone(){return new Ue.Line(this.pt,this.norm)}get start(){}get end(){}get length(){return Number.POSITIVE_INFINITY}get box(){return new Ue.Box(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY)}get middle(){}get slope(){return new Ue.Vector(this.norm.y,-this.norm.x).slope}get standard(){let e=this.norm.x,n=this.norm.y,o=this.norm.dot(cee(this.pt.x,this.pt.y));return[e,n,o]}parallelTo(e){return Ue.Utils.EQ_0(this.norm.cross(e.norm))}incidentTo(e){return this.parallelTo(e)\u0026\u0026this.pt.on(e)}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ue.Vector(this.pt,e);return Ue.Utils.EQ_0(this.norm.dot(n))}coord(e){return cee(e.x,e.y).cross(this.norm)}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return LU(this,e);if(e instanceof Ue.Ray)return Idn(e,this);if(e instanceof Ue.Circle)return OT(this,e);if(e instanceof Ue.Box)return HU(this,e);if(e instanceof Ue.Segment)return nee(e,this);if(e instanceof Ue.Arc)return Z_e(this,e);if(e instanceof Ue.Polygon)return oee(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle){let[n,o]=Ue.Distance.circle2line(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Segment){let[n,o]=Ue.Distance.segment2line(e,this);return[n,o.reverse()]}if(e instanceof Ue.Arc){let[n,o]=Ue.Distance.arc2line(e,this);return[n,o.reverse()]}if(e instanceof Ue.Box){let[n,o]=Ue.Distance.shape2polygon(this,new Ue.Polygon(e));return[n,o]}if(e instanceof Ue.Polygon){let[n,o]=Ue.Distance.shape2polygon(this,e);return[n,o]}}split(e){if(e instanceof Ue.Point)return[new Ue.Ray(e,this.norm),new Ue.Ray(e,this.norm)];{let n=new Ue.Multiline([this]),o=this.sortPoints(e);return n.split(o),n.toShapes()}}rotate(e,n=new Ue.Point){return new Ue.Line(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ue.Line(this.pt.transform(e),this.norm.clone())}sortPoints(e){return e.slice().sort((n,o)=\u003ethis.coord(n)\u003cthis.coord(o)?-1:this.coord(n)\u003ethis.coord(o)?1:0)}get name(){return\"line\"}svg(e,n={}){let o=HU(this,e);if(o.length===0)return\"\";let i=o[0],r=o.length===2?o[1]:o.find(a=\u003e!a.equalTo(i));return r===void 0\u0026\u0026(r=i),new Ue.Segment(i,r).svg(n)}static points2norm(e,n){if(e.equalTo(n))throw wd.ILLEGAL_PARAMETERS;return new Ue.Vector(e,n).normalize().rotate90CCW()}};Ue.Line=iki;var rki=(...t)=\u003enew Ue.Line(...t);Ue.line=rki;var ski=class extends HP{constructor(...e){if(super(),this.pc=new Ue.Point,this.r=1,e.length===1\u0026\u0026e[0]instanceof Object\u0026\u0026e[0].name===\"circle\"){let{pc:n,r:o}=e[0];this.pc=new Ue.Point(n),this.r=o}else{let[n,o]=[...e];n\u0026\u0026n instanceof Ue.Point\u0026\u0026(this.pc=n.clone()),o!==void 0\u0026\u0026(this.r=o)}}clone(){return new Ue.Circle(this.pc.clone(),this.r)}get center(){return this.pc}get box(){return new Ue.Box(this.pc.x-this.r,this.pc.y-this.r,this.pc.x+this.r,this.pc.y+this.r)}contains(e){if(e instanceof Ue.Point)return Ue.Utils.LE(e.distanceTo(this.center)[0],this.r);if(e instanceof Ue.Segment)return Ue.Utils.LE(e.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ue.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ue.Arc)return this.intersect(e).length===0\u0026\u0026Ue.Utils.LE(e.start.distanceTo(this.center)[0],this.r)\u0026\u0026Ue.Utils.LE(e.end.distanceTo(this.center)[0],this.r);if(e instanceof Ue.Circle)return this.intersect(e).length===0\u0026\u0026Ue.Utils.LE(e.r,this.r)\u0026\u0026Ue.Utils.LE(e.center.distanceTo(this.center)[0],this.r)}toArc(e=!0){return new Ue.Arc(this.center,this.r,Math.PI,-Math.PI,e)}scale(e,n){if(e!==n||!(this.pc.x===0\u0026\u0026this.pc.y===0))throw wd.OPERATION_IS_NOT_SUPPORTED;return new Ue.Circle(this.pc,this.r*e)}transform(e=new Ue.Matrix){return new Ue.Circle(this.pc.transform(e),this.r)}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return OT(e,this);if(e instanceof Ue.Ray)return fdn(e,this);if(e instanceof Ue.Segment)return tfe(e,this);if(e instanceof Ue.Circle)return cdn(e,this);if(e instanceof Ue.Box)return dTi(this,e);if(e instanceof Ue.Arc)return jje(e,this);if(e instanceof Ue.Polygon)return hdn(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle){let[n,o]=Ue.Distance.circle2circle(this,e);return[n,o]}if(e instanceof Ue.Line){let[n,o]=Ue.Distance.circle2line(this,e);return[n,o]}if(e instanceof Ue.Segment){let[n,o]=Ue.Distance.segment2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Arc){let[n,o]=Ue.Distance.arc2circle(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Box){let[n,o]=Ue.Distance.shape2polygon(this,new Ue.Polygon(e));return[n,o]}if(e instanceof Ue.Polygon){let[n,o]=Ue.Distance.shape2polygon(this,e);return[n,o]}if(e instanceof Ue.PlanarSet){let[n,o]=Ue.Distance.shape2planarSet(this,e);return[n,o]}if(e instanceof Ue.Multiline){let[n,o]=Ue.Distance.shape2multiline(this,e);return[n,o]}}get name(){return\"circle\"}svg(e={}){return`\n\u003ccircle cx=\"${this.pc.x}\" cy=\"${this.pc.y}\" r=\"${this.r}\"\n ${HT({fill:\"none\",...e})} /\u003e`}};Ue.Circle=ski;var aki=(...t)=\u003enew Ue.Circle(...t);Ue.circle=aki;var Aki=class extends HP{constructor(...t){if(super(),this.pc=new Ue.Point,this.r=1,this.startAngle=0,this.endAngle=2*Math.PI,this.counterClockwise=!0,t.length!==0)if(t.length===1\u0026\u0026t[0]instanceof Object\u0026\u0026t[0].name===\"arc\"){let{pc:e,r:n,startAngle:o,endAngle:i,counterClockwise:r}=t[0];this.pc=new Ue.Point(e.x,e.y),this.r=n,this.startAngle=o,this.endAngle=i,this.counterClockwise=r}else{let[e,n,o,i,r]=[...t];e\u0026\u0026e instanceof Ue.Point\u0026\u0026(this.pc=e.clone()),n!==void 0\u0026\u0026(this.r=n),o!==void 0\u0026\u0026(this.startAngle=o),i!==void 0\u0026\u0026(this.endAngle=i),r!==void 0\u0026\u0026(this.counterClockwise=r)}}clone(){return new Ue.Arc(this.pc.clone(),this.r,this.startAngle,this.endAngle,this.counterClockwise)}get sweep(){let t=this.startAngle,e=this.endAngle;if(Ue.Utils.EQ(Math.abs(t-e),Ue.PIx2))return Ue.PIx2;Math.abs(t)\u003eUe.PIx2\u0026\u0026(t-=Math.trunc(t/Ue.PIx2)*Ue.PIx2),t\u003c0\u0026\u0026(t+=Ue.PIx2),Math.abs(e)\u003eUe.PIx2\u0026\u0026(e-=Math.trunc(e/Ue.PIx2)*Ue.PIx2),e\u003c0\u0026\u0026(e+=Ue.PIx2);let n=this.counterClockwise?e-t:t-e;return n\u003c0\u0026\u0026(n+=Ue.PIx2),n}get start(){return new Ue.Point(this.pc.x+this.r,this.pc.y).rotate(this.startAngle,this.pc)}get end(){return new Ue.Point(this.pc.x+this.r,this.pc.y).rotate(this.endAngle,this.pc)}get center(){return this.pc.clone()}get vertices(){return[this.start.clone(),this.end.clone()]}get length(){return Math.abs(this.sweep*this.r)}get box(){let e=this.breakToFunctional().reduce((n,o)=\u003en.merge(o.start.box),new Ue.Box);return e=e.merge(this.end.box),e}contains(t){if(!Ue.Utils.EQ(this.pc.distanceTo(t)[0],this.r))return!1;if(t.equalTo(this.start))return!0;let e=new Ue.Vector(this.pc,t).slope,n=new Ue.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise);return Ue.Utils.LE(n.length,this.length)}split(t){if(this.start.equalTo(t))return[null,this.clone()];if(this.end.equalTo(t))return[this.clone(),null];let e=new Ue.Vector(this.pc,t).slope;return[new Ue.Arc(this.pc,this.r,this.startAngle,e,this.counterClockwise),new Ue.Arc(this.pc,this.r,e,this.endAngle,this.counterClockwise)]}middle(){let t=this.counterClockwise?this.startAngle+this.sweep/2:this.startAngle-this.sweep/2;return new Ue.Arc(this.pc,this.r,this.startAngle,t,this.counterClockwise).end}pointAtLength(t){if(t\u003ethis.length||t\u003c0)return null;if(t===0)return this.start;if(t===this.length)return this.end;let e=t/this.length,n=this.counterClockwise?this.startAngle+this.sweep*e:this.startAngle-this.sweep*e;return new Ue.Arc(this.pc,this.r,this.startAngle,n,this.counterClockwise).end}chordHeight(){return(1-Math.cos(Math.abs(this.sweep/2)))*this.r}intersect(t){if(t instanceof Ue.Point)return this.contains(t)?[t]:[];if(t instanceof Ue.Line)return Z_e(t,this);if(t instanceof Ue.Ray)return Zje(t,this);if(t instanceof Ue.Circle)return jje(this,t);if(t instanceof Ue.Segment)return OU(t,this);if(t instanceof Ue.Box)return hTi(this,t);if(t instanceof Ue.Arc)return ldn(this,t);if(t instanceof Ue.Polygon)return qje(this,t);if(t instanceof Ue.Multiline)return GU(this,t)}distanceTo(t){if(t instanceof Ue.Point){let[e,n]=Ue.Distance.point2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ue.Circle){let[e,n]=Ue.Distance.arc2circle(this,t);return[e,n]}if(t instanceof Ue.Line){let[e,n]=Ue.Distance.arc2line(this,t);return[e,n]}if(t instanceof Ue.Segment){let[e,n]=Ue.Distance.segment2arc(t,this);return n=n.reverse(),[e,n]}if(t instanceof Ue.Arc){let[e,n]=Ue.Distance.arc2arc(this,t);return[e,n]}if(t instanceof Ue.Box){let[e,n]=Ue.Distance.shape2polygon(this,new Ue.Polygon(t));return[e,n]}if(t instanceof Ue.Polygon){let[e,n]=Ue.Distance.shape2polygon(this,t);return[e,n]}if(t instanceof Ue.PlanarSet){let[e,n]=Ue.Distance.shape2planarSet(this,t);return[e,n]}if(t instanceof Ue.Multiline)return Ue.Distance.shape2multiline(this,t)}breakToFunctional(){let t=[],e=[0,Math.PI/2,Math.PI,3*Math.PI/2],n=this.startAngle,o=this.endAngle;Ue.Utils.EQ(Math.abs(n-o),Ue.PIx2)\u0026\u0026(o=n),Math.abs(n)\u003eUe.PIx2\u0026\u0026(n-=Math.trunc(n/Ue.PIx2)*Ue.PIx2),n\u003c0\u0026\u0026(n+=Ue.PIx2),Math.abs(o)\u003eUe.PIx2\u0026\u0026(o-=Math.trunc(o/Ue.PIx2)*Ue.PIx2),o\u003c0\u0026\u0026(o+=Ue.PIx2);let i=n,r,s,a;this.counterClockwise?(s=Math.ceil(n/(Math.PI/2))%4,a=1):(s=Math.floor(n/(Math.PI/2))%4,a=-1);for(let A=0,c=s;A\u003c4;A++,c=(c+a+4)%4){if(r=e[c],r===i)continue;let l=this.counterClockwise?r-n:n-r;if(l\u003c0\u0026\u0026(l+=Ue.PIx2),l\u003ethis.sweep)break;t.push(new Ue.Arc(this.pc,this.r,i,r,this.counterClockwise)),i=r}return t.length===0?(t.push(this),t):(r=o,i!==r\u0026\u0026t.push(new Ue.Arc(this.pc,this.r,i,r,this.counterClockwise)),t)}tangentInStart(){let t=new Ue.Vector(this.pc,this.start),e=this.counterClockwise?Math.PI/2:-Math.PI/2;return t.rotate(e).normalize()}tangentInEnd(){let t=new Ue.Vector(this.pc,this.end),e=this.counterClockwise?-Math.PI/2:Math.PI/2;return t.rotate(e).normalize()}reverse(){return new Ue.Arc(this.pc,this.r,this.endAngle,this.startAngle,!this.counterClockwise)}transform(t=new Ue.Matrix){let e=this.start.transform(t),n=this.end.transform(t),o=this.pc.transform(t),i=this.counterClockwise;return t.a*t.d\u003c0\u0026\u0026(i=!i),Ue.Arc.arcSE(o,e,n,i)}static arcSE(t,e,n,o){let{vector:i}=Ue,r=i(t,e).slope,s=i(t,n).slope;Ue.Utils.EQ(r,s)\u0026\u0026(s+=2*Math.PI,o=!0);let a=i(t,e).length;return new Ue.Arc(t,a,r,s,o)}definiteIntegral(t=0){return this.breakToFunctional().reduce((o,i)=\u003eo+i.circularSegmentDefiniteIntegral(t),0)}circularSegmentDefiniteIntegral(t){let n=new Ue.Segment(this.start,this.end).definiteIntegral(t),o=Ue.Utils.EQ(this.sweep,Ue.PIx2)?0:this.circularSegmentArea();return this.counterClockwise?n-o:n+o}circularSegmentArea(){return .5*this.r*this.r*(this.sweep-Math.sin(this.sweep))}sortPoints(t){let{vector:e}=Ue;return t.slice().sort((n,o)=\u003e{let i=e(this.pc,n).slope,r=e(this.pc,o).slope;return i\u003cr?-1:i\u003er?1:0})}get name(){return\"arc\"}svg(t={}){let e=this.sweep\u003c=Math.PI?\"0\":\"1\",n=this.counterClockwise?\"1\":\"0\";return Ue.Utils.EQ(this.sweep,2*Math.PI)?new Ue.Circle(this.pc,this.r).svg(t):`\n\u003cpath d=\"M${this.start.x},${this.start.y}\n A${this.r},${this.r} 0 ${e},${n} ${this.end.x},${this.end.y}\"\n ${HT({fill:\"none\",...t})} /\u003e`}};Ue.Arc=Aki;var cki=(...t)=\u003enew Ue.Arc(...t);Ue.arc=cki;var lki=class tne extends HP{constructor(e=void 0,n=void 0,o=void 0,i=void 0){super(),this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}clone(){return new tne(this.xmin,this.ymin,this.xmax,this.ymax)}get low(){return new Ue.Point(this.xmin,this.ymin)}get high(){return new Ue.Point(this.xmax,this.ymax)}get max(){return this.clone()}get center(){return new Ue.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)}get width(){return Math.abs(this.xmax-this.xmin)}get height(){return Math.abs(this.ymax-this.ymin)}get box(){return this.clone()}not_intersect(e){return this.xmax\u003ce.xmin||this.xmin\u003ee.xmax||this.ymax\u003ce.ymin||this.ymin\u003ee.ymax}intersect(e){return!this.not_intersect(e)}merge(e){return new tne(this.xmin===void 0?e.xmin:Math.min(this.xmin,e.xmin),this.ymin===void 0?e.ymin:Math.min(this.ymin,e.ymin),this.xmax===void 0?e.xmax:Math.max(this.xmax,e.xmax),this.ymax===void 0?e.ymax:Math.max(this.ymax,e.ymax))}less_than(e){return!!(this.low.lessThan(e.low)||this.low.equalTo(e.low)\u0026\u0026this.high.lessThan(e.high))}equal_to(e){return this.low.equalTo(e.low)\u0026\u0026this.high.equalTo(e.high)}output(){return this.clone()}comparable_less_than(e,n){return e.lessThan(n)}set(e,n,o,i){this.xmin=e,this.ymin=n,this.xmax=o,this.ymax=i}extend(e){return e\u003c=0?this.clone():new tne(this.xmin-e,this.ymin-e,this.xmax+e,this.ymax+e)}toPoints(){return[new Ue.Point(this.xmin,this.ymin),new Ue.Point(this.xmax,this.ymin),new Ue.Point(this.xmax,this.ymax),new Ue.Point(this.xmin,this.ymax)]}toSegments(){let e=this.toPoints();return[new Ue.Segment(e[0],e[1]),new Ue.Segment(e[1],e[2]),new Ue.Segment(e[2],e[3]),new Ue.Segment(e[3],e[0])]}rotate(e,n=new Ue.Point){throw wd.OPERATION_IS_NOT_SUPPORTED}transform(e=new Ue.Matrix){return this.toPoints().map(o=\u003eo.transform(e)).reduce((o,i)=\u003eo.merge(i.box),new tne)}contains(e){if(e instanceof Ue.Point)return e.x\u003e=this.xmin\u0026\u0026e.x\u003c=this.xmax\u0026\u0026e.y\u003e=this.ymin\u0026\u0026e.y\u003c=this.ymax;if(e instanceof Ue.Segment)return e.vertices.every(n=\u003ethis.contains(n));if(e instanceof Ue.Box)return e.toSegments().every(n=\u003ethis.contains(n));if(e instanceof Ue.Circle)return this.contains(e.box);if(e instanceof Ue.Arc)return e.vertices.every(n=\u003ethis.contains(n))\u0026\u0026this.toSegments().every(n=\u003eOU(n,e).length===0);if(e instanceof Ue.Line||e instanceof Ue.Ray)return!1;if(e instanceof Ue.Multiline)return e.toShapes().every(n=\u003ethis.contains(n));if(e instanceof Ue.Polygon)return this.contains(e.box)}distanceTo(e){const n=this.toSegments().map(i=\u003ei.distanceTo(e));let o=[Number.MAX_SAFE_INTEGER,null];return n.forEach(i=\u003e{i[0]\u003co[0]\u0026\u0026(o=i)}),o}get name(){return\"box\"}svg(e={}){const n=this.xmax-this.xmin,o=this.ymax-this.ymin;return`\n\u003crect x=\"${this.xmin}\" y=\"${this.ymin}\" width=\"${n}\" height=\"${o}\"\n ${HT({fill:\"none\",...e})} /\u003e`}};Ue.Box=lki;var uki=(...t)=\u003enew Ue.Box(...t);Ue.box=uki;var gki=class{constructor(t){this.shape=t,this.next=void 0,this.prev=void 0,this.face=void 0,this.arc_length=0,this.bvStart=void 0,this.bvEnd=void 0,this.bv=void 0,this.overlap=void 0}get start(){return this.shape.start}get end(){return this.shape.end}get length(){return this.shape.length}get box(){return this.shape.box}get isSegment(){return this.shape instanceof Ue.Segment}get isArc(){return this.shape instanceof Ue.Arc}get isLine(){return this.shape instanceof Ue.Line}get isRay(){return this.shape instanceof Ue.Ray}middle(){return this.shape.middle()}pointAtLength(t){return this.shape.pointAtLength(t)}contains(t){return this.shape.contains(t)}setInclusion(t){if(this.bv!==void 0)return this.bv;if(this.shape instanceof Ue.Line||this.shape instanceof Ue.Ray)return this.bv=Ue.OUTSIDE,this.bv;if(this.bvStart===void 0\u0026\u0026(this.bvStart=aee(t,this.start)),this.bvEnd===void 0\u0026\u0026(this.bvEnd=aee(t,this.end)),this.bvStart===Ue.OUTSIDE||this.bvEnd==Ue.OUTSIDE)this.bv=Ue.OUTSIDE;else if(this.bvStart===Ue.INSIDE||this.bvEnd==Ue.INSIDE)this.bv=Ue.INSIDE;else{let e=aee(t,this.middle());this.bv=e}return this.bv}setOverlap(t){let e,n=this.shape,o=t.shape;n instanceof Ue.Segment\u0026\u0026o instanceof Ue.Segment?n.start.equalTo(o.start)\u0026\u0026n.end.equalTo(o.end)?e=Ue.OVERLAP_SAME:n.start.equalTo(o.end)\u0026\u0026n.end.equalTo(o.start)\u0026\u0026(e=Ue.OVERLAP_OPPOSITE):(n instanceof Ue.Arc\u0026\u0026o instanceof Ue.Arc||n instanceof Ue.Segment\u0026\u0026o instanceof Ue.Arc||n instanceof Ue.Arc\u0026\u0026o instanceof Ue.Segment)\u0026\u0026(n.start.equalTo(o.start)\u0026\u0026n.end.equalTo(o.end)\u0026\u0026n.middle().equalTo(o.middle())?e=Ue.OVERLAP_SAME:n.start.equalTo(o.end)\u0026\u0026n.end.equalTo(o.start)\u0026\u0026n.middle().equalTo(o.middle())\u0026\u0026(e=Ue.OVERLAP_OPPOSITE)),this.overlap===void 0\u0026\u0026(this.overlap=e),t.overlap===void 0\u0026\u0026(t.overlap=e)}svg(){if(this.shape instanceof Ue.Segment)return` L${this.shape.end.x},${this.shape.end.y}`;if(this.shape instanceof Ue.Arc){let t=this.shape,e,n=t.counterClockwise?\"1\":\"0\";if(Ue.Utils.EQ(t.sweep,2*Math.PI)){let o=t.counterClockwise?1:-1,i=new Ue.Arc(t.pc,t.r,t.startAngle,t.startAngle+o*Math.PI,t.counterClockwise),r=new Ue.Arc(t.pc,t.r,t.startAngle+o*Math.PI,t.endAngle,t.counterClockwise);return e=\"0\",` A${i.r},${i.r} 0 ${e},${n} ${i.end.x},${i.end.y}\n A${r.r},${r.r} 0 ${e},${n} ${r.end.x},${r.end.y}`}else return e=t.sweep\u003c=Math.PI?\"0\":\"1\",` A${t.r},${t.r} 0 ${e},${n} ${t.end.x},${t.end.y}`}}toJSON(){return this.shape.toJSON()}};Ue.Edge=gki;var dki=class extends Wje{constructor(t,e){super(t,e),this.setCircularLinks()}setCircularLinks(){this.isEmpty()||(this.last.next=this.first,this.first.prev=this.last)}[Symbol.iterator](){let t;return{next:()=\u003e{let e=t||this.first,n=this.first?t?t===this.first:!1:!0;return t=e?e.next:void 0,{value:e,done:n}}}}append(t){return super.append(t),this.setCircularLinks(),this}insert(t,e){return super.insert(t,e),this.setCircularLinks(),this}remove(t){return super.remove(t),this}},hki=class nne extends dki{constructor(e,...n){if(super(),this._box=void 0,this._orientation=void 0,n.length!==0){if(n.length===1){if(n[0]instanceof Array){let o=n[0];if(o.length===0)return;if(o.every(i=\u003ei instanceof Ue.Point)){let i=nne.points2segments(o);this.shapes2face(e.edges,i)}else if(o.every(i=\u003ei instanceof Array\u0026\u0026i.length===2)){let i=o.map(s=\u003enew Ue.Point(s[0],s[1])),r=nne.points2segments(i);this.shapes2face(e.edges,r)}else if(o.every(i=\u003ei instanceof Ue.Segment||i instanceof Ue.Arc))this.shapes2face(e.edges,o);else if(o.every(i=\u003ei.name===\"segment\"||i.name===\"arc\")){let i=[];for(let r of o){let s;r.name===\"segment\"?s=new Ue.Segment(r):s=new Ue.Arc(r),i.push(s)}this.shapes2face(e.edges,i)}}else if(n[0]instanceof nne){let o=n[0];this.first=o.first,this.last=o.last;for(let i of o)e.edges.add(i)}else if(n[0]instanceof Ue.Circle)this.shapes2face(e.edges,[n[0].toArc(edn)]);else if(n[0]instanceof Ue.Box){let o=n[0];this.shapes2face(e.edges,[new Ue.Segment(new Ue.Point(o.xmin,o.ymin),new Ue.Point(o.xmax,o.ymin)),new Ue.Segment(new Ue.Point(o.xmax,o.ymin),new Ue.Point(o.xmax,o.ymax)),new Ue.Segment(new Ue.Point(o.xmax,o.ymax),new Ue.Point(o.xmin,o.ymax)),new Ue.Segment(new Ue.Point(o.xmin,o.ymax),new Ue.Point(o.xmin,o.ymin))])}}n.length===2\u0026\u0026n[0]instanceof Ue.Edge\u0026\u0026n[1]instanceof Ue.Edge\u0026\u0026(this.first=n[0],this.last=n[1],this.last.next=this.first,this.first.prev=this.last,this.setArcLength())}}get edges(){return this.toArray()}get vertices(){return this.edges.map(e=\u003ee.shape.start.clone())}get shapes(){return this.edges.map(e=\u003ee.shape.clone())}get box(){if(this._box===void 0){let e=new Ue.Box;for(let n of this)e=e.merge(n.box);this._box=e}return this._box}get perimeter(){return this.last.arc_length+this.last.length}pointAtLength(e){if(e\u003ethis.perimeter||e\u003c0)return null;let n=null;for(let o of this)if(e\u003e=o.arc_length\u0026\u0026(o===this.last||e\u003co.next.arc_length)){n=o.pointAtLength(e-o.arc_length);break}return n}static points2segments(e){let n=[];for(let o=0;o\u003ce.length;o++)e[o].equalTo(e[(o+1)%e.length])||n.push(new Ue.Segment(e[o],e[(o+1)%e.length]));return n}shapes2face(e,n){for(let o of n){let i=new Ue.Edge(o);this.append(i),e.add(i)}}append(e){return super.append(e),this.setOneEdgeArcLength(e),e.face=this,this}insert(e,n){return super.insert(e,n),this.setOneEdgeArcLength(e),e.face=this,this}remove(e){return super.remove(e),this.setArcLength(),this}merge_with_next_edge(e){return e.shape.end.x=e.next.shape.end.x,e.shape.end.y=e.next.shape.end.y,this.remove(e.next),this}reverse(){let e=[],n=this.last;do n.shape=n.shape.reverse(),e.push(n),n=n.prev;while(n!==this.last);this.first=void 0,this.last=void 0;for(let o of e)this.first===void 0?(o.prev=o,o.next=o,this.first=o,this.last=o):(o.prev=this.last,this.last.next=o,this.last=o,this.last.next=this.first,this.first.prev=this.last),this.setOneEdgeArcLength(o);this._orientation!==void 0\u0026\u0026(this._orientation=void 0,this._orientation=this.orientation())}setArcLength(){for(let e of this)this.setOneEdgeArcLength(e),e.face=this}setOneEdgeArcLength(e){e===this.first?e.arc_length=0:e.arc_length=e.prev.arc_length+e.prev.length}area(){return Math.abs(this.signedArea())}signedArea(){let e=0,n=this.box.ymin;for(let o of this)e+=o.shape.definiteIntegral(n);return e}orientation(){if(this._orientation===void 0){let e=this.signedArea();Ue.Utils.EQ_0(e)?this._orientation=eee.NOT_ORIENTABLE:Ue.Utils.LT(e,0)?this._orientation=eee.CCW:this._orientation=eee.CW}return this._orientation}isSimple(e){return nne.getSelfIntersections(this,e,!0).length===0}static getSelfIntersections(e,n,o=!1){let i=[];for(let r of e){let s=n.search(r.box);for(let a of s){if(r===a||a.face!==e||r.shape instanceof Ue.Segment\u0026\u0026a.shape instanceof Ue.Segment\u0026\u0026(r.next===a||r.prev===a))continue;let A=r.shape.intersect(a.shape);for(let c of A)if(!(c.equalTo(r.start)\u0026\u0026c.equalTo(a.end)\u0026\u0026a===r.prev)\u0026\u0026!(c.equalTo(r.end)\u0026\u0026c.equalTo(a.start)\u0026\u0026a===r.next)\u0026\u0026(i.push(c),o))break;if(i.length\u003e0\u0026\u0026o)break}if(i.length\u003e0\u0026\u0026o)break}return i}findEdgeByPoint(e){let n;for(let o of this)if(!e.equalTo(o.shape.start)\u0026\u0026(e.equalTo(o.shape.end)||o.shape.contains(e))){n=o;break}return n}toPolygon(){return new Ue.Polygon(this.shapes)}toJSON(){return this.edges.map(e=\u003ee.toJSON())}svg(){let e=`M${this.first.start.x},${this.first.start.y}`;for(let n of this)e+=n.svg();return e+=\" z\",e}};Ue.Face=hki;var pki=class b4n extends HP{constructor(...e){if(super(),this.pt=new Ue.Point,this.norm=new Ue.Vector(0,1),e.length!==0\u0026\u0026(e.length\u003e=1\u0026\u0026e[0]instanceof Ue.Point\u0026\u0026(this.pt=e[0].clone()),e.length!==1)){if(e.length===2\u0026\u0026e[1]instanceof Ue.Vector){this.norm=e[1].clone();return}throw wd.ILLEGAL_PARAMETERS}}clone(){return new b4n(this.pt,this.norm)}get slope(){return new Ue.Vector(this.norm.y,-this.norm.x).slope}get box(){let e=this.slope;return new Ue.Box(e\u003eMath.PI/2\u0026\u0026e\u003c3*Math.PI/2?Number.NEGATIVE_INFINITY:this.pt.x,e\u003e=0\u0026\u0026e\u003c=Math.PI?this.pt.y:Number.NEGATIVE_INFINITY,e\u003e=Math.PI/2\u0026\u0026e\u003c=3*Math.PI/2?this.pt.x:Number.POSITIVE_INFINITY,e\u003e=Math.PI\u0026\u0026e\u003c=2*Math.PI||e===0?this.pt.y:Number.POSITIVE_INFINITY)}get start(){return this.pt}get end(){}get length(){return Number.POSITIVE_INFINITY}contains(e){if(this.pt.equalTo(e))return!0;let n=new Ue.Vector(this.pt,e);return Ue.Utils.EQ_0(this.norm.dot(n))\u0026\u0026Ue.Utils.GE(n.cross(this.norm),0)}coord(e){return Ldn(e.x,e.y).cross(this.norm)}split(e){return this.contains(e)?this.pt.equalTo(e)?[this]:[new Ue.Segment(this.pt,e),new Ue.Ray(e,this.norm)]:[]}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Segment)return Xje(this,e);if(e instanceof Ue.Arc)return Zje(this,e);if(e instanceof Ue.Line)return Idn(this,e);if(e instanceof Ue.Ray)return yTi(this,e);if(e instanceof Ue.Circle)return fdn(this,e);if(e instanceof Ue.Box)return CTi(this,e);if(e instanceof Ue.Polygon)return Cdn(this,e);if(e instanceof Ue.Multiline)return GU(this,e)}rotate(e,n=new Ue.Point){return new Ue.Ray(this.pt.rotate(e,n),this.norm.rotate(e))}transform(e){return new Ue.Ray(this.pt.transform(e),this.norm.clone())}get name(){return\"ray\"}svg(e,n={}){let o=new Ue.Line(this.pt,this.norm),i=HU(o,e);return i=i.filter(s=\u003ethis.contains(s)),i.length===0||i.length===2?\"\":new Ue.Segment(this.pt,i[0]).svg(n)}};Ue.Ray=pki;var mki=(...t)=\u003enew Ue.Ray(...t);Ue.ray=mki;var _ki=class VM{constructor(){this.faces=new Ue.PlanarSet,this.edges=new Ue.PlanarSet;let e=[...arguments];if(e.length===1\u0026\u0026(e[0]instanceof Array\u0026\u0026e[0].length\u003e0||e[0]instanceof Ue.Circle||e[0]instanceof Ue.Box)){let n=e[0];if(e[0]instanceof Array\u0026\u0026e[0].every(o=\u003eo instanceof Array))if(n.every(o=\u003eo instanceof Array\u0026\u0026o.length===2\u0026\u0026typeof o[0]==\"number\"\u0026\u0026typeof o[1]==\"number\"))this.faces.add(new Ue.Face(this,n));else for(let o of n)if(o instanceof Array\u0026\u0026o[0]instanceof Array\u0026\u0026o[0].every(i=\u003ei instanceof Array\u0026\u0026i.length===2\u0026\u0026typeof i[0]==\"number\"\u0026\u0026typeof i[1]==\"number\"))for(let i of o)this.faces.add(new Ue.Face(this,i));else this.faces.add(new Ue.Face(this,o));else this.faces.add(new Ue.Face(this,n))}}get box(){return[...this.faces].reduce((e,n)=\u003ee.merge(n.box),new Ue.Box)}get vertices(){return[...this.faces].flatMap(e=\u003ee.vertices)}clone(){let e=new VM;for(let n of this.faces)e.addFace(n.shapes);return e}createFromArray(e){const n=new VM;return e.forEach(o=\u003e[...o.faces].forEach(i=\u003en.addFace(i.shapes))),n}isEmpty(){return this.edges.size===0||this.faces.size===0}isValid(){let e=!0;for(let n of this.faces)if(!n.isSimple(this.edges)){e=!1;break}return e}area(){let e=[...this.faces].reduce((n,o)=\u003en+o.signedArea(),0);return Math.abs(e)}addFace(...e){let n=new Ue.Face(this,...e);return this.faces.add(n),n}deleteFace(e){for(let n of e)this.edges.delete(n);return this.faces.delete(e)}recreateFaces(){this.faces.clear();for(let o of this.edges)o.face=null;let e,n=!0;for(;n;){n=!1;for(let o of this.edges)if(o.face===null){e=o,n=!0;break}if(n){let o=e;do o=o.next;while(o.next!==e);this.addFace(e,o)}}}removeChain(e,n,o){if(o.next===n){this.deleteFace(e);return}for(let i=n;i!==o.next;i=i.next)if(e.remove(i),this.edges.delete(i),e.isEmpty()){this.deleteFace(e);break}}addVertex(e,n){let o=n.shape.split(e);if(o[0]===null)return n.prev;if(o[1]===null)return n;let i=new Ue.Edge(o[0]),r=n.prev;return n.face.insert(i,r),this.edges.delete(n),this.edges.add(i),n.shape=o[1],this.edges.add(n),i}removeEndVertex(e){const n=e.next;n!==e\u0026\u0026(e.face.merge_with_next_edge(e),this.edges.delete(n))}cut(e){const o=this.splitToIslands().flatMap(i=\u003ei._cutSingleIsland(e)).filter(i=\u003ei.isValid()\u0026\u0026i.isEmpty()===!1);return this.createFromArray(o)}_cutSingleIsland(e){let n=this.clone();const o=e.clone();let i={int_points1:[],int_points2:[],int_points1_sorted:[],int_points2_sorted:[]};for(let a of o.edges)for(let A of n.edges){let c=pdn(a,A);for(let l of c)YU(a,l,i.int_points1),YU(A,l,i.int_points2)}if(i.int_points1.length===0)return n;i.int_points1_sorted=FP(i.int_points1),i.int_points2_sorted=FP(i.int_points2),KU(o,i.int_points1_sorted),KU(n,i.int_points2_sorted),e$e(i),i.int_points1_sorted=FP(i.int_points1),i.int_points2_sorted=FP(i.int_points2),t$e(i.int_points1),n$e(i.int_points1,n);for(let a of i.int_points1_sorted)a.edge_before\u0026\u0026a.edge_after\u0026\u0026a.edge_before.bv===a.edge_after.bv\u0026\u0026(i.int_points2[a.id]=-1,a.id=-1);if(i.int_points1=i.int_points1.filter(a=\u003ea.id\u003e=0),i.int_points2=i.int_points2.filter(a=\u003ea.id\u003e=0),i.int_points1.forEach((a,A)=\u003e{a.id=A}),i.int_points2.forEach((a,A)=\u003e{a.id=A}),i.int_points1.length===0)return n;i.int_points1_sorted=FP(i.int_points1),i.int_points2_sorted=FP(i.int_points2);let r,s;for(let a=1;a\u003ci.int_points1_sorted.length;a++)if(s=i.int_points1_sorted[a],r=i.int_points1_sorted[a-1],s.edge_before\u0026\u0026s.edge_before.bv===q_e){let A=r.edge_after,c=s.edge_before,l=o.getChain(A,c);xdn(i.int_points2[r.id],i.int_points2[s.id],l),l.forEach(u=\u003en.edges.add(u)),l=l.reverse().map(u=\u003enew Ue.Edge(u.shape.reverse()));for(let u=0;u\u003cl.length-1;u++)l[u].next=l[u+1],l[u+1].prev=l[u];xdn(i.int_points2[s.id],i.int_points2[r.id],l),l.forEach(u=\u003en.edges.add(u))}return n.recreateFaces(),n}cutWithLine(e){let n=new GT([e]);return this.cut(n)}findEdgeByPoint(e){let n;for(let o of this.faces)if(n=o.findEdgeByPoint(e),n!==void 0)break;return n}splitToIslands(){if(this.isEmpty())return[];let e=this.toArray();e.sort((i,r)=\u003er.area()-i.area());let n=[...e[0].faces][0].orientation(),o=e.filter(i=\u003e[...i.faces][0].orientation()===n);for(let i of e){let r=[...i.faces][0];if(r.orientation()!==n){for(let s of o)if(r.shapes.every(a=\u003es.contains(a))){s.addFace(r.shapes);break}}}return o}rearrange(){if(this.faces.size\u003c=1)return this.clone();const e=this.splitToIslands(),n=new VM;return e.forEach(o=\u003e{o.faces.forEach(i=\u003en.addFace(i.shapes))}),n}orientation(){return this.isEmpty()?eee.NOT_ORIENTABLE:[...this.faces][0].orientation()}isOuter(e){return e.orientation()===this.orientation()}isMultiPolygon(){let e=0;return this.faces.forEach(n=\u003e{this.isOuter(n)\u0026\u0026e++}),e\u003e1}reverse(){for(let e of this.faces)e.reverse();return this}contains(e){if(e instanceof Ue.Point){let n=aee(this,e);return n===q_e||n===W6}else return kdn(this,e)}distanceTo(e){if(e instanceof Ue.Point){let[n,o]=Ue.Distance.point2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Circle||e instanceof Ue.Line||e instanceof Ue.Segment||e instanceof Ue.Arc){let[n,o]=Ue.Distance.shape2polygon(e,this);return o=o.reverse(),[n,o]}if(e instanceof Ue.Box)return this.distanceTo(new Ue.Polygon(e));if(e instanceof Ue.Polygon){let n=[Number.POSITIVE_INFINITY,new Ue.Segment],o,i;for(let r of this.edges){let s=n[0];[o,i]=Ue.Distance.shape2planarSet(r.shape,e.edges,s),Ue.Utils.LT(o,s)\u0026\u0026(n=[o,i])}return n}}intersect(e){if(e instanceof Ue.Point)return this.contains(e)?[e]:[];if(e instanceof Ue.Line)return oee(e,this);if(e instanceof Ue.Ray)return Cdn(e,this);if(e instanceof Ue.Circle)return hdn(e,this);if(e instanceof Ue.Segment)return $je(e,this);if(e instanceof Ue.Arc)return qje(e,this);if(e instanceof Ue.Polygon)return fTi(e,this);if(e instanceof Ue.Multiline)return _Ti(e,this)}translate(e){let n=new VM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.translate(e)));return n}rotate(e=0,n=new Ue.Point){let o=new VM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.rotate(e,n)));return o}scale(e,n){let o=new VM;for(let i of this.faces)o.addFace(i.shapes.map(r=\u003er.scale(e,n)));return o}transform(e=new Ue.Matrix){let n=new VM;for(let o of this.faces)n.addFace(o.shapes.map(i=\u003ei.transform(e)));return n}toJSON(){return[...this.faces].map(e=\u003ee.toJSON())}toArray(){return[...this.faces].map(e=\u003ee.toPolygon())}dpath(){return[...this.faces].reduce((e,n)=\u003ee+n.svg(),\"\")}svg(e={}){let n=`\n\u003cpath ${HT({fillRule:\"evenodd\",fill:\"lightcyan\",...e})} d=\"`;for(let o of this.faces)n+=`\n${o.svg()}`;return n+=`\" \u003e\n\u003c/path\u003e`,n}};Ue.Polygon=_ki;var fki=(...t)=\u003enew Ue.Polygon(...t);Ue.polygon=fki;var{Circle:c$e,Line:Hdn,Point:Odn,Vector:ife,Utils:l$e}=Ue,Iki=class jye{constructor(e){this.circle=e}get inversion_circle(){return this.circle}static inversePoint(e,n){const o=new ife(e.pc,n),i=e.r*e.r,r=o.dot(o);return l$e.EQ_0(r)?new Odn(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY):e.pc.translate(o.multiply(i/r))}static inverseCircle(e,n){const o=e.pc.distanceTo(n.pc)[0];if(l$e.EQ(o,n.r)){let i=e.r*e.r/(2*n.r),r=new ife(e.pc,n.pc);r=r.normalize();let s=e.pc.translate(r.multiply(i));return new Hdn(s,r)}else{let i=new ife(e.pc,n.pc),r=e.r*e.r/(i.dot(i)-n.r*n.r),s=e.pc.translate(i.multiply(r)),a=Math.abs(r)*n.r;return new c$e(s,a)}}static inverseLine(e,n){const[o,i]=e.pc.distanceTo(n);if(l$e.EQ_0(o))return n.clone();{let r=e.r*e.r/(2*o),s=new ife(e.pc,i.end);return s=s.multiply(r/o),new c$e(e.pc.translate(s),r)}}inverse(e){if(e instanceof Odn)return jye.inversePoint(this.circle,e);if(e instanceof c$e)return jye.inverseCircle(this.circle,e);if(e instanceof Hdn)return jye.inverseLine(this.circle,e)}};Ue.Inversion=Iki;var Cki=t=\u003enew Ue.Inversion(t);Ue.inversion=Cki;var yki=class Fr{static point2point(e,n){return e.distanceTo(n)}static point2line(e,n){let o=e.projectionOn(n);return[new Ue.Vector(e,o).length,new Ue.Segment(e,o)]}static point2circle(e,n){let[o,i]=e.distanceTo(n.center);if(Ue.Utils.EQ_0(o))return[n.r,new Ue.Segment(e,n.toArc().start)];{let r=Math.abs(o-n.r),s=new Ue.Vector(n.pc,e).normalize().multiply(n.r),a=n.pc.translate(s);return[r,new Ue.Segment(e,a)]}}static point2segment(e,n){if(n.start.equalTo(n.end))return Fr.point2point(e,n.start);let o=new Ue.Vector(n.start,n.end),i=new Ue.Vector(n.start,e),r=new Ue.Vector(n.end,e),s=o.dot(i),a=-o.dot(r),A,c;if(Ue.Utils.GE(s,0)\u0026\u0026Ue.Utils.GE(a,0)){let l=n.tangentInStart();return A=Math.abs(l.cross(i)),c=n.start.translate(l.multiply(l.dot(i))),[A,new Ue.Segment(e,c)]}else return s\u003c0?e.distanceTo(n.start):e.distanceTo(n.end)}static point2arc(e,n){let o=new Ue.Circle(n.pc,n.r),i=[],r,s;return[r,s]=Fr.point2circle(e,o),s.end.on(n)\u0026\u0026i.push(Fr.point2circle(e,o)),i.push(Fr.point2point(e,n.start)),i.push(Fr.point2point(e,n.end)),Fr.sort(i),i[0]}static point2edge(e,n){return n.shape instanceof Ue.Segment?Fr.point2segment(e,n.shape):Fr.point2arc(e,n.shape)}static segment2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let i=[];return i.push(Fr.point2line(e.start,n)),i.push(Fr.point2line(e.end,n)),Fr.sort(i),i[0]}static segment2segment(e,n){let o=efe(e,n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let i=[],r,s;return[r,s]=Fr.point2segment(n.start,e),i.push([r,s.reverse()]),[r,s]=Fr.point2segment(n.end,e),i.push([r,s.reverse()]),i.push(Fr.point2segment(e.start,n)),i.push(Fr.point2segment(e.end,n)),Fr.sort(i),i[0]}static segment2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Line(e.ps,e.pe),[r,s]=Fr.point2line(n.center,i);if(Ue.Utils.GE(r,n.r)\u0026\u0026s.end.on(e))return Fr.point2circle(s.end,n);{let[a,A]=Fr.point2circle(e.start,n),[c,l]=Fr.point2circle(e.end,n);return Ue.Utils.LT(a,c)?[a,A]:[c,l]}}static segment2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Line(e.ps,e.pe),r=new Ue.Circle(n.pc,n.r),[s,a]=Fr.point2line(r.center,i);if(Ue.Utils.GE(s,r.r)\u0026\u0026a.end.on(e)){let[u,g]=Fr.point2circle(a.end,r);if(g.end.on(n))return[u,g]}let A=[];A.push(Fr.point2arc(e.start,n)),A.push(Fr.point2arc(e.end,n));let c,l;return[c,l]=Fr.point2segment(n.start,e),A.push([c,l.reverse()]),[c,l]=Fr.point2segment(n.end,e),A.push([c,l.reverse()]),Fr.sort(A),A[0]}static circle2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];if(e.center.equalTo(n.center)){let i=e.toArc(),r=n.toArc();return Fr.point2point(i.start,r.start)}else{let i=new Ue.Line(e.center,n.center),r=i.intersect(e),s=i.intersect(n),a=[];return a.push(Fr.point2point(r[0],s[0])),a.push(Fr.point2point(r[0],s[1])),a.push(Fr.point2point(r[1],s[0])),a.push(Fr.point2point(r[1],s[1])),Fr.sort(a),a[0]}}static circle2line(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let[i,r]=Fr.point2line(e.center,n),[s,a]=Fr.point2circle(r.end,e);return a=a.reverse(),[s,a]}static arc2line(e,n){let o=n.intersect(e);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Circle(e.center,e.r),[r,s]=Fr.point2line(i.center,n);if(Ue.Utils.GE(r,i.r)){let[a,A]=Fr.point2circle(s.end,i);if(A.end.on(e))return[a,A]}else{let a=[];return a.push(Fr.point2line(e.start,n)),a.push(Fr.point2line(e.end,n)),Fr.sort(a),a[0]}}static arc2circle(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Circle(e.center,e.r),[r,s]=Fr.circle2circle(i,n);if(s.start.on(e))return[r,s];{let a=[];return a.push(Fr.point2circle(e.start,n)),a.push(Fr.point2circle(e.end,n)),Fr.sort(a),a[0]}}static arc2arc(e,n){let o=e.intersect(n);if(o.length\u003e0)return[0,new Ue.Segment(o[0],o[0])];let i=new Ue.Circle(e.center,e.r),r=new Ue.Circle(n.center,n.r),[s,a]=Fr.circle2circle(i,r);if(a.start.on(e)\u0026\u0026a.end.on(n))return[s,a];{let A=[],c,l;return[c,l]=Fr.point2arc(e.start,n),l.end.on(n)\u0026\u0026A.push([c,l]),[c,l]=Fr.point2arc(e.end,n),l.end.on(n)\u0026\u0026A.push([c,l]),[c,l]=Fr.point2arc(n.start,e),l.end.on(e)\u0026\u0026A.push([c,l.reverse()]),[c,l]=Fr.point2arc(n.end,e),l.end.on(e)\u0026\u0026A.push([c,l.reverse()]),[c,l]=Fr.point2point(e.start,n.start),A.push([c,l]),[c,l]=Fr.point2point(e.start,n.end),A.push([c,l]),[c,l]=Fr.point2point(e.end,n.start),A.push([c,l]),[c,l]=Fr.point2point(e.end,n.end),A.push([c,l]),Fr.sort(A),A[0]}}static point2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n.edges){let[r,s]=Fr.point2edge(e,i);Ue.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n.edges){let[r,s]=e.distanceTo(i.shape);Ue.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static polygon2polygon(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of e.edges)for(let r of n.edges){let[s,a]=i.shape.distanceTo(r.shape);Ue.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}static box2box_minmax(e,n){let o=Math.max(Math.max(e.xmin-n.xmax,0),Math.max(n.xmin-e.xmax,0)),i=Math.max(Math.max(e.ymin-n.ymax,0),Math.max(n.ymin-e.ymax,0)),r=o*o+i*i,s=e.merge(n),a=s.xmax-s.xmin,A=s.ymax-s.ymin,c=a*a+A*A;return[r,c]}static minmax_tree_process_level(e,n,o,i){let r,s;for(let l of n){[r,s]=Fr.box2box_minmax(e.box,l.item.key);for(let u of l.item.values)u instanceof Ue.Edge?i.insert([r,s],u.shape):i.insert([r,s],u);Ue.Utils.LT(s,o)\u0026\u0026(o=s)}if(n.length===0)return o;let a=n.map(l=\u003el.left.isNil()?void 0:l.left).filter(l=\u003el!==void 0),A=n.map(l=\u003el.right.isNil()?void 0:l.right).filter(l=\u003el!==void 0),c=[...a,...A].filter(l=\u003e{let[u,g]=Fr.box2box_minmax(e.box,l.max);return Ue.Utils.LE(u,o)});return o=Fr.minmax_tree_process_level(e,c,o,i),o}static minmax_tree(e,n,o){let i=new A$e,r=[n.index.root],s=o\u003cNumber.POSITIVE_INFINITY?o*o:Number.POSITIVE_INFINITY;return s=Fr.minmax_tree_process_level(e,r,s,i),i}static minmax_tree_calc_distance(e,n,o){let i,r;if(n!=null\u0026\u0026!n.isNil()){if([i,r]=Fr.minmax_tree_calc_distance(e,n.left,o),r)return[i,r];if(Ue.Utils.LT(i[0],Math.sqrt(n.item.key.low)))return[i,!0];let[s,a]=Fr.distanceToArray(e,n.item.values);return Ue.Utils.LT(s,i[0])\u0026\u0026(i=[s,a]),[i,r]=Fr.minmax_tree_calc_distance(e,n.right,i),[i,r]}return[o,!1]}static shape2planarSet(e,n,o=Number.POSITIVE_INFINITY){let i=[o,new Ue.Segment],r=!1;if(n instanceof Ue.PlanarSet){let s=Fr.minmax_tree(e,n,o);[i,r]=Fr.minmax_tree_calc_distance(e,s.root,i)}return i}static sort(e){e.sort((n,o)=\u003eUe.Utils.LT(n[0],o[0])?-1:Ue.Utils.GT(n[0],o[0])?1:0)}static distance(e,n){return e.distanceTo(n)}static distanceToArray(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n){let[r,s]=e.distanceTo(i);Ue.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static shape2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of n){let[r,s]=Fr.distance(e,i.shape);Ue.Utils.LT(r,o[0])\u0026\u0026(o=[r,s])}return o}static multiline2multiline(e,n){let o=[Number.POSITIVE_INFINITY,new Ue.Segment];for(let i of e)for(let r of n){let[s,a]=Fr.distance(i.shape,r.shape);Ue.Utils.LT(s,o[0])\u0026\u0026(o=[s,a])}return o}};Ue.Distance=yki;var{Multiline:xki,Point:Gdn,Segment:Eki,Polygon:Ydn}=Ue;function u$e(t){return new Gdn(t.split(\" \").map(Number))}function Udn(t){return t.split(\", \").map(u$e)}function g$e(t){const e=Udn(t);let n=[];for(let o=0;o\u003ce.length-1;o++)n.push(new Eki(e[o],e[o+1]));return new xki(n)}function Bki(t){return t.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\").map(g$e)}function Kdn(t){const e=t.replace(/\\(\\(/,\"\").replace(/\\)\\)$/,\"\").split(\"), (\"),n=new Ydn;let o;return e.forEach((i,r)=\u003e{let s=i.split(\", \").map(A=\u003enew Gdn(A.split(\" \").map(Number)));const a=n.addFace(s);r===0?o=a.orientation():a.orientation()===o\u0026\u0026a.reverse()}),n}function bki(t){const n=t.split(/\\)\\), \\(\\(/).map(r=\u003e\"((\"+r+\"))\").map(Kdn),o=new Ydn;return n.reduce((r,s)=\u003e[...r,...s?.faces],[]).forEach(r=\u003eo.addFace([...r?.shapes])),o}function Ski(t){if(t.startsWith(\"POLYGON\")){const e=t.replace(/^POLYGON /,\"\");return Kdn(e)}else{const e=t.replace(/^MULTIPOLYGON \\(\\(\\((.*)\\)\\)\\)$/,\"$1\");return bki(e)}}function Qki(t){return t.split(`\n`).map(n=\u003en.match(/\\(([^)]+)\\)/)[1]).map(u$e)}function vki(t){return t.split(`\n`).map(n=\u003en.match(/\\(([^)]+)\\)/)[1]).map(g$e).reduce((n,o)=\u003e[...n,...o],[])}function Vdn(t){if(t.startsWith(\"POINT\")){const e=t.replace(/^POINT \\(/,\"\").replace(/\\)$/,\"\");return u$e(e)}else if(t.startsWith(\"MULTIPOINT\")){const e=t.replace(/^MULTIPOINT \\(/,\"\").replace(/\\)$/,\"\");return Udn(e)}else if(t.startsWith(\"LINESTRING\")){const e=t.replace(/^LINESTRING \\(/,\"\").replace(/\\)$/,\"\");return g$e(e)}else if(t.startsWith(\"MULTILINESTRING\")){const e=t.replace(/^MULTILINESTRING /,\"\");return Bki(e)}else{if(t.startsWith(\"POLYGON\")||t.startsWith(\"MULTIPOLYGON\"))return Ski(t);if(t.startsWith(\"GEOMETRYCOLLECTION\")){const e=/(?\u003ctype\u003ePOINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON) \\((?:[^\\(\\)]|\\([^\\)]*\\))*\\)/g,n=t.match(e);return n[0].startsWith(\"GEOMETRYCOLLECTION\")\u0026\u0026(n[0]=n[0].replace(\"GEOMETRYCOLLECTION (\",\"\")),n.map(Vdn).map(i=\u003ei instanceof Array?i:[i]).reduce((i,r)=\u003e[...i,...r],[])}else{if(zdn(t))return Qki(t);if(Jdn(t))return vki(t)}}return[]}function zdn(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"POINT\"))}function Jdn(t){return t.split(`\n`)?.every(e=\u003ee.includes(\"LINESTRING\"))}function wki(t){return t.startsWith(\"POINT\")||zdn(t)||t.startsWith(\"LINESTRING\")||Jdn(t)||t.startsWith(\"MULTILINESTRING\")||t.startsWith(\"POLYGON\")||t.startsWith(\"MULTIPOINT\")||t.startsWith(\"MULTIPOLYGON\")||t.startsWith(\"GEOMETRYCOLLECTION\")}Ue.isWktString=wki,Ue.parseWKT=Vdn,Ue.BooleanOperations=RTi,Ue.Relations=WTi;function Wdn(t,e,n){if(!e||!n)return;let o=t.get(e);o||(o=new Set,t.set(e,o)),o.add(n);let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}function jdn(t,e){if(!e.subcircuit_id\u0026\u0026!e.source_group_id)return[...t];let n=e;if(e.subcircuit_id){const a=new Set([e.subcircuit_id]),A=new Map,c=new Map;for(const u of t)if(u.type===\"source_group\"){const g=u.source_group_id,h=u.subcircuit_id;h\u0026\u0026c.set(g,h);const d=u.parent_source_group_id;d\u0026\u0026(A.has(d)||A.set(d,[]),A.get(d).push(g))}let l;for(const[u,g]of c)if(g===e.subcircuit_id){l=u;break}if(l){const u=g=\u003e{const h=A.get(g)||[];for(const d of h){const p=c.get(d);p\u0026\u0026a.add(p),u(d)}};u(l),n={...e,subcircuit_ids:Array.from(a)}}}const o=new Map;for(const a of t){const A=`${a.type}_id`,c=a[A];typeof c==\"string\"\u0026\u0026o.set(c,a)}const i=new Map;for(const a of t){const A=Object.entries(a);for(const[c,l]of A)if(c!==\"parent_source_group_id\"){if(c.endsWith(\"_id\")\u0026\u0026typeof l==\"string\"){const u=o.get(l);Wdn(i,a,u)}else if(c.endsWith(\"_ids\")\u0026\u0026Array.isArray(l)){for(const u of l)if(typeof u==\"string\"){const g=o.get(u);Wdn(i,a,g)}}}}const r=[],s=new Set;for(const a of t){let A=!1;(n.subcircuit_id\u0026\u0026\"subcircuit_id\"in a\u0026\u0026a.subcircuit_id===n.subcircuit_id||n.subcircuit_ids\u0026\u0026\"subcircuit_id\"in a\u0026\u0026a.subcircuit_id\u0026\u0026n.subcircuit_ids.includes(a.subcircuit_id)||n.source_group_id\u0026\u0026\"source_group_id\"in a\u0026\u0026a.source_group_id===n.source_group_id||n.source_group_id\u0026\u0026\"member_source_group_ids\"in a\u0026\u0026Array.isArray(a.member_source_group_ids)\u0026\u0026a.member_source_group_ids.includes(n.source_group_id))\u0026\u0026(A=!0),A\u0026\u0026(r.push(a),s.add(a))}for(;r.length\u003e0;){const a=r.shift(),A=i.get(a);if(A)for(const c of A)s.has(c)||(s.add(c),r.push(c))}return t.filter(a=\u003es.has(a))}var rfe=(t,e={})=\u003e{const n=t;let o=n._internal_store;if(!o){o={counts:{},editCount:0},n._internal_store=o;for(const r of n){const s=r.type,a=r[`${s}_id`];if(!a)continue;const A=Number.parseInt(a.split(\"_\").pop());Number.isNaN(A)||(o.counts[s]=Math.max(o.counts[s]??0,A))}}const i=new Proxy({},{get:(r,s)=\u003e{if(s===\"toArray\")return()=\u003e(n.editCount=o.editCount,n);if(s===\"editCount\")return o.editCount;if(s===\"subtree\")return A=\u003erfe(jdn(n,A),e);if(s===\"insert\")return A=\u003e{const c=A.type;if(!c)throw new Error(\"insert requires an element with a type\");o.counts[c]??=-1,o.counts[c]++;const l=o.counts[c],u={...A,type:c,[`${c}_id`]:`${c}_${l}`};return e.validateInserts\u0026\u0026(R9[c]??U4).parse(u),n.push(u),o.editCount++,u};if(s===\"insertAll\")return A=\u003eA.map(c=\u003ei.insert(c));const a=s;return{get:A=\u003en.find(c=\u003ec.type===a\u0026\u0026c[`${a}_id`]===A),getUsing:A=\u003e{const c=Object.keys(A);if(c.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const l=c[0],u=l.replace(\"_id\",\"\"),g=n.find(h=\u003eh.type===u\u0026\u0026h[l]===A[l]);return g?n.find(h=\u003eh.type===a\u0026\u0026h[`${a}_id`]===g[`${a}_id`]):null},getWhere:A=\u003e{const c=Object.keys(A);return n.find(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},list:A=\u003e{const c=A?Object.keys(A):[];return n.filter(l=\u003el.type===a\u0026\u0026c.every(u=\u003el[u]===A[u]))},insert:A=\u003e{o.counts[a]??=-1,o.counts[a]++;const c=o.counts[a],l={type:a,[`${a}_id`]:`${a}_${c}`,...A};return e.validateInserts\u0026\u0026(R9[a]??U4).parse(l),n.push(l),o.editCount++,l},delete:A=\u003e{const c=n.find(l=\u003el[`${a}_id`]===A);c\u0026\u0026(n.splice(n.indexOf(c),1),o.editCount++)},update:(A,c)=\u003e{const l=n.find(u=\u003eu.type===a\u0026\u0026u[`${a}_id`]===A);return l?(Object.assign(l,c),o.editCount++,l):null},select:A=\u003e{if(a===\"source_component\")return n.find(c=\u003ec.type===\"source_component\"\u0026\u0026c.name===A.replace(/\\./g,\"\"));if(a===\"pcb_port\"||a===\"source_port\"||a===\"schematic_port\"){const[c,l]=A.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),u=n.find(h=\u003eh.type===\"source_component\"\u0026\u0026h.name===c);if(!u)return null;const g=n.find(h=\u003eh.type===\"source_port\"\u0026\u0026h.source_component_id===u.source_component_id\u0026\u0026(h.name===l||(h.port_hints??[]).includes(l)));if(!g)return null;if(a===\"source_port\")return g;if(a===\"pcb_port\")return n.find(h=\u003eh.type===\"pcb_port\"\u0026\u0026h.source_port_id===g.source_port_id);if(a===\"schematic_port\")return n.find(h=\u003eh.type===\"schematic_port\"\u0026\u0026h.source_port_id===g.source_port_id)}}}}});return i};rfe.unparsed=rfe;var wS=rfe;function d$e(t){const e=t.type;return`${e}:${t[`${e}_id`]}`}var h$e=(t,e={})=\u003e{let n=t._internal_store_indexed;if(!n){n={counts:{},editCount:0,indexes:{}};for(const s of t){const a=s.type,A=s[`${a}_id`];if(!A)continue;const c=Number.parseInt(A.split(\"_\").pop()||\"\");Number.isNaN(c)||(n.counts[a]=Math.max(n.counts[a]??0,c))}const i=e.indexConfig||{},r=n.indexes;if(i.byId\u0026\u0026(r.byId=new Map),i.byType\u0026\u0026(r.byType=new Map),i.byRelation\u0026\u0026(r.byRelation=new Map),i.bySubcircuit\u0026\u0026(r.bySubcircuit=new Map),i.byCustomField\u0026\u0026i.byCustomField.length\u003e0){r.byCustomField=new Map;for(const s of i.byCustomField)r.byCustomField.set(s,new Map)}for(const s of t){if(i.byId){const a=d$e(s);r.byId.set(a,s)}if(i.byType){const a=r.byType.get(s.type)||[];a.push(s),r.byType.set(s.type,a)}if(i.byRelation){const a=Object.entries(s);for(const[A,c]of a)if(A.endsWith(\"_id\")\u0026\u0026A!==`${s.type}_id`\u0026\u0026typeof c==\"string\"){const l=r.byRelation.get(A)||new Map,u=l.get(c)||[];u.push(s),l.set(c,u),r.byRelation.set(A,l)}}if(i.bySubcircuit\u0026\u0026\"subcircuit_id\"in s){const a=s.subcircuit_id;if(a\u0026\u0026typeof a==\"string\"){const A=r.bySubcircuit.get(a)||[];A.push(s),r.bySubcircuit.set(a,A)}}if(i.byCustomField\u0026\u0026r.byCustomField){for(const a of i.byCustomField)if(a in s){const A=s[a];if(A!==void 0\u0026\u0026(typeof A==\"string\"||typeof A==\"number\")){const c=String(A),l=r.byCustomField.get(a),u=l.get(c)||[];u.push(s),l.set(c,u)}}}}t._internal_store_indexed=n}const o=new Proxy({},{get:(i,r)=\u003e{if(r===\"toArray\")return()=\u003e(t.editCount=n.editCount,t);if(r===\"editCount\")return n.editCount;if(r===\"insert\")return a=\u003e{const{type:A,...c}=a;if(!A)throw new Error(\"insert requires an element with a type\");return delete c[`${A}_id`],o[A].insert(c)};if(r===\"insertAll\")return a=\u003ea.map(A=\u003eo.insert(A));if(r===\"subtree\")return a=\u003eh$e(jdn(t,a),e);const s=r;return{get:a=\u003e{const A=e.indexConfig||{};return A.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${s}:${a}`)||null:A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(l=\u003el[`${s}_id`]===a)||null:t.find(c=\u003ec.type===s\u0026\u0026c[`${s}_id`]===a)||null},getUsing:a=\u003e{const A=e.indexConfig||{},c=Object.keys(a);if(c.length!==1)throw new Error(\"getUsing requires exactly one key, e.g. { pcb_component_id }\");const l=c[0],u=l.replace(\"_id\",\"\");if(A.byRelation\u0026\u0026n.indexes.byRelation){const h=n.indexes.byRelation.get(l);if(h){const p=(h.get(a[l])||[]).find(_=\u003e_.type===u);if(!p)return null;const m=p[`${s}_id`];return A.byId\u0026\u0026n.indexes.byId?n.indexes.byId.get(`${s}:${m}`)||null:A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(f=\u003ef[`${s}_id`]===m)||null:t.find(_=\u003e_.type===s\u0026\u0026_[`${s}_id`]===m)||null}}const g=t.find(h=\u003eh.type===u\u0026\u0026h[l]===a[l]);return g\u0026\u0026t.find(h=\u003eh.type===s\u0026\u0026h[`${s}_id`]===g[`${s}_id`])||null},getWhere:a=\u003e{const A=e.indexConfig||{},c=Object.keys(a);if(c.length===1\u0026\u0026A.byCustomField\u0026\u0026n.indexes.byCustomField){const l=c[0],u=n.indexes.byCustomField.get(l);if(u){const g=String(a[l]);return(u.get(g)||[]).find(d=\u003ed.type===s)||null}}if(\"subcircuit_id\"in a\u0026\u0026A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const l=a.subcircuit_id;return(n.indexes.bySubcircuit.get(l)||[]).find(g=\u003eg.type===s\u0026\u0026c.every(h=\u003eg[h]===a[h]))||null}return A.byType\u0026\u0026n.indexes.byType?(n.indexes.byType.get(s)||[]).find(u=\u003ec.every(g=\u003eu[g]===a[g]))||null:t.find(l=\u003el.type===s\u0026\u0026c.every(u=\u003el[u]===a[u]))||null},list:a=\u003e{const A=e.indexConfig||{},c=a?Object.keys(a):[];if(c.length===0\u0026\u0026A.byType\u0026\u0026n.indexes.byType)return(n.indexes.byType.get(s)||[]).slice();if(c.length===1\u0026\u0026c[0]===\"subcircuit_id\"\u0026\u0026A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit){const u=a.subcircuit_id;return(n.indexes.bySubcircuit.get(u)||[]).filter(h=\u003eh.type===s)}let l;return A.byType\u0026\u0026n.indexes.byType?l=n.indexes.byType.get(s)||[]:l=t.filter(u=\u003eu.type===s),c.length\u003e0?l.filter(u=\u003ec.every(g=\u003eu[g]===a[g])):l.slice()},insert:a=\u003e{n.counts[s]??=-1,n.counts[s]++;const A=n.counts[s],c={type:s,[`${s}_id`]:`${s}_${A}`,...a};e.validateInserts\u0026\u0026(R9[s]??U4).parse(c),t.push(c),n.editCount++;const l=e.indexConfig||{};if(l.byId\u0026\u0026n.indexes.byId){const u=d$e(c);n.indexes.byId.set(u,c)}if(l.byType\u0026\u0026n.indexes.byType){const u=n.indexes.byType.get(s)||[];u.push(c),n.indexes.byType.set(s,u)}if(l.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(c);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${c.type}_id`\u0026\u0026typeof h==\"string\"){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.push(c),d.set(h,p),n.indexes.byRelation.set(g,d)}}if(l.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c){const u=c.subcircuit_id;if(u\u0026\u0026typeof u==\"string\"){const g=n.indexes.bySubcircuit.get(u)||[];g.push(c),n.indexes.bySubcircuit.set(u,g)}}if(l.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of l.byCustomField)if(u in c){const g=c[u];if(g!==void 0\u0026\u0026(typeof g==\"string\"||typeof g==\"number\")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.push(c),d.set(h,p)}}}return c},delete:a=\u003e{const A=e.indexConfig||{};let c;if(A.byId\u0026\u0026n.indexes.byId?c=n.indexes.byId.get(`${s}:${a}`):A.byType\u0026\u0026n.indexes.byType?c=(n.indexes.byType.get(s)||[]).find(g=\u003eg[`${s}_id`]===a):c=t.find(u=\u003eu[`${s}_id`]===a),!c)return;const l=t.indexOf(c);if(l\u003e=0\u0026\u0026(t.splice(l,1),n.editCount++),A.byId\u0026\u0026n.indexes.byId){const u=d$e(c);n.indexes.byId.delete(u)}if(A.byType\u0026\u0026n.indexes.byType){const g=(n.indexes.byType.get(s)||[]).filter(h=\u003eh[`${s}_id`]!==a);n.indexes.byType.set(s,g)}if(A.byRelation\u0026\u0026n.indexes.byRelation)for(const[u,g]of n.indexes.byRelation.entries())for(const[h,d]of g.entries()){const p=d.filter(m=\u003em!==c);p.length===0?g.delete(h):g.set(h,p)}if(A.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in c){const u=c.subcircuit_id;if(u){const h=(n.indexes.bySubcircuit.get(u)||[]).filter(d=\u003ed!==c);h.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,h)}}if(A.byCustomField\u0026\u0026n.indexes.byCustomField)for(const u of n.indexes.byCustomField.values())for(const[g,h]of u.entries()){const d=h.filter(p=\u003ep!==c);d.length===0?u.delete(g):u.set(g,d)}},update:(a,A)=\u003e{const c=e.indexConfig||{};let l;if(c.byId\u0026\u0026n.indexes.byId?l=n.indexes.byId.get(`${s}:${a}`):c.byType\u0026\u0026n.indexes.byType?l=(n.indexes.byType.get(s)||[]).find(g=\u003eg[`${s}_id`]===a):l=t.find(u=\u003eu.type===s\u0026\u0026u[`${s}_id`]===a),!l)return null;if(c.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${l.type}_id`\u0026\u0026typeof h==\"string\"\u0026\u0026g in A\u0026\u0026A[g]!==h){const d=n.indexes.byRelation.get(g);if(d){const m=(d.get(h)||[]).filter(_=\u003e_!==l);m.length===0?d.delete(h):d.set(h,m)}}}if(c.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in l\u0026\u0026\"subcircuit_id\"in A){const u=l.subcircuit_id,g=A.subcircuit_id;if(u!==g){const d=(n.indexes.bySubcircuit.get(u)||[]).filter(p=\u003ep!==l);d.length===0?n.indexes.bySubcircuit.delete(u):n.indexes.bySubcircuit.set(u,d)}}if(c.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l\u0026\u0026u in A\u0026\u0026l[u]!==A[u]){const g=n.indexes.byCustomField.get(u);if(g){const h=String(l[u]),p=(g.get(h)||[]).filter(m=\u003em!==l);p.length===0?g.delete(h):g.set(h,p)}}}if(Object.assign(l,A),n.editCount++,c.byRelation\u0026\u0026n.indexes.byRelation){const u=Object.entries(l);for(const[g,h]of u)if(g.endsWith(\"_id\")\u0026\u0026g!==`${l.type}_id`\u0026\u0026typeof h==\"string\"\u0026\u0026g in A){const d=n.indexes.byRelation.get(g)||new Map,p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p),n.indexes.byRelation.set(g,d))}}if(c.bySubcircuit\u0026\u0026n.indexes.bySubcircuit\u0026\u0026\"subcircuit_id\"in l\u0026\u0026\"subcircuit_id\"in A){const u=l.subcircuit_id;if(u\u0026\u0026typeof u==\"string\"){const g=n.indexes.bySubcircuit.get(u)||[];g.includes(l)||(g.push(l),n.indexes.bySubcircuit.set(u,g))}}if(c.byCustomField\u0026\u0026n.indexes.byCustomField){for(const u of c.byCustomField)if(u in l\u0026\u0026u in A){const g=l[u];if(g!==void 0\u0026\u0026(typeof g==\"string\"||typeof g==\"number\")){const h=String(g),d=n.indexes.byCustomField.get(u),p=d.get(h)||[];p.includes(l)||(p.push(l),d.set(h,p))}}}return l},select:a=\u003e{if(s===\"source_component\")return t.find(A=\u003eA.type===\"source_component\"\u0026\u0026A.name===a.replace(/\\./g,\"\"))||null;if(s===\"pcb_port\"||s===\"source_port\"||s===\"schematic_port\"){const[A,c]=a.replace(/\\./g,\"\").split(/[\\s\\\u003e]+/),l=t.find(g=\u003eg.type===\"source_component\"\u0026\u0026g.name===A);if(!l)return null;const u=t.find(g=\u003eg.type===\"source_port\"\u0026\u0026g.source_component_id===l.source_component_id\u0026\u0026(g.name===c||(g.port_hints??[]).includes(c)));if(!u)return null;if(s===\"source_port\")return u;if(s===\"pcb_port\")return t.find(g=\u003eg.type===\"pcb_port\"\u0026\u0026g.source_port_id===u.source_port_id)||null;if(s===\"schematic_port\")return t.find(g=\u003eg.type===\"schematic_port\"\u0026\u0026g.source_port_id===u.source_port_id)||null}return null}}}});return o};h$e.unparsed=h$e;var Pki=t=\u003eMath.round(t/(Math.PI/2)),Mki=t=\u003e{switch(t){case\"from_left\":return{x:-1,y:0};case\"from_right\":return{x:1,y:0};case\"from_top\":return{x:0,y:1};case\"from_bottom\":return{x:0,y:-1}}},Dki=({x:t,y:e})=\u003et\u003e0?\"from_right\":t\u003c0?\"from_left\":e\u003e0?\"from_top\":\"from_bottom\",Nki=(t,e)=\u003e{if(!t)return t;if(t===\"from_above\"||t===\"from_below\")return e.isFlipped?t===\"from_above\"?\"from_below\":\"from_above\":t;let{x:n,y:o}=Mki(t),i=Math.round(e.rotationDegrees/90);for(;i\u003e0;)[n,o]=[-o,n],i--;for(;i\u003c0;)[n,o]=[o,-n],i++;return e.isFlipped\u0026\u0026(o=-o),Dki({x:n,y:o})},Rki=(t,e)=\u003e{const n=MNi(e),o=Math.abs(Pki(n.rotation.angle))%2===1,i=n.rotation.angle/Math.PI*180,r=n.scale.sy\u003c0;if(t.type===\"pcb_plated_hole\"||t.type===\"pcb_hole\"||t.type===\"pcb_via\"||t.type===\"pcb_smtpad\"||t.type===\"pcb_solder_paste\"||t.type===\"pcb_port\"){const{x:s,y:a}=_i(e,{x:Number(t.x),y:Number(t.y)});t.x=s,t.y=a,t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"polygon\"\u0026\u0026Array.isArray(t.points)\u0026\u0026(t.points=t.points.map(A=\u003e{const c=_i(e,{x:A.x,y:A.y});return{x:c.x,y:c.y}}))}else if(t.type===\"pcb_keepout\"||t.type===\"pcb_board\")t.center=_i(e,t.center);else if(t.type===\"pcb_silkscreen_text\"||t.type===\"pcb_fabrication_note_text\"||t.type===\"pcb_note_text\")t.anchor_position=_i(e,t.anchor_position);else if(t.type===\"pcb_copper_text\")t.anchor_position\u0026\u0026(t.anchor_position=_i(e,t.anchor_position));else if(t.type===\"pcb_courtyard_rect\")t.center=_i(e,t.center),t.ccw_rotation=((t.ccw_rotation??0)+i)%360;else if(t.type===\"pcb_silkscreen_circle\"||t.type===\"pcb_silkscreen_rect\"||t.type===\"pcb_silkscreen_pill\"||t.type===\"pcb_silkscreen_oval\"||t.type===\"pcb_note_rect\"||t.type===\"pcb_courtyard_circle\")t.center=_i(e,t.center);else if(t.type===\"pcb_component\")t.center=_i(e,t.center),t.rotation=t.rotation+i,t.rotation=t.rotation%360,t.cable_insertion_center\u0026\u0026(t.cable_insertion_center=_i(e,t.cable_insertion_center)),t.insertion_direction=Nki(t.insertion_direction,{rotationDegrees:i,isFlipped:r}),o\u0026\u0026([t.width,t.height]=[t.height,t.width]);else if(t.type===\"pcb_courtyard_outline\")t.outline=t.outline.map(s=\u003e{const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_courtyard_polygon\")t.points=t.points.map(s=\u003e{const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_trace\")t.route=t.route.map(s=\u003e{if(!(\"x\"in s))return s.start=_i(e,s.start),s.end=_i(e,s.end),s;const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_silkscreen_path\"||t.type===\"pcb_trace_hint\"||t.type===\"pcb_fabrication_note_path\"||t.type===\"pcb_note_path\")t.route=t.route.map(s=\u003e{const a=_i(e,s);return s.x=a.x,s.y=a.y,s});else if(t.type===\"pcb_silkscreen_line\"||t.type===\"pcb_note_line\"){const s={x:t.x1,y:t.y1},a={x:t.x2,y:t.y2},A=_i(e,s),c=_i(e,a);t.x1=A.x,t.y1=A.y,t.x2=c.x,t.y2=c.y}else if(t.type===\"cad_component\"){const s=_i(e,{x:t.position.x,y:t.position.y});t.position.x=s.x,t.position.y=s.y}return t},Tki=t=\u003e{const e=t.type;return t[`${e}_id`]},p$e=(t,e)=\u003e({minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}),lee=(t,e,n)=\u003e{const o=n/2;return{minX:t-o,minY:e-o,maxX:t+o,maxY:e+o}},$dn=(t,e,n,o,i)=\u003e{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}].map(u=\u003e({x:t+u.x*A-u.y*c,y:e+u.x*c+u.y*A}));return{minX:Math.min(...l.map(u=\u003eu.x)),minY:Math.min(...l.map(u=\u003eu.y)),maxX:Math.max(...l.map(u=\u003eu.x)),maxY:Math.max(...l.map(u=\u003eu.y))}},kki=(t,e,n,o,i)=\u003e{const r=n/2,s=o/2,a=i*Math.PI/180,A=Math.cos(a),c=Math.sin(a),l=Math.hypot(r*A,s*c),u=Math.hypot(r*c,s*A);return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},Fki=(t,e,n,o,i)=\u003e{const r=Math.min(n,o)/2,s=Math.max(n,o)/2-r,a=i*Math.PI/180,A=n\u003e=o?{x:s,y:0}:{x:0,y:s},c={x:A.x*Math.cos(a)-A.y*Math.sin(a),y:A.x*Math.sin(a)+A.y*Math.cos(a)},l=Math.abs(c.x)+r,u=Math.abs(c.y)+r;return{minX:t-l,minY:e-u,maxX:t+l,maxY:e+u}},sfe=t=\u003et.length===0?null:{minX:Math.min(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxX:Math.max(...t.map(e=\u003ee.x)),maxY:Math.max(...t.map(e=\u003ee.y))},m$e=t=\u003eArray.isArray(t)?t.flatMap(e=\u003e!e||typeof e!=\"object\"?[]:\"x\"in e\u0026\u0026\"y\"in e\u0026\u0026typeof e.x==\"number\"\u0026\u0026typeof e.y==\"number\"?[{x:e.x,y:e.y}]:\"start\"in e\u0026\u0026\"end\"in e?[e.start,e.end].filter(o=\u003e!!(o\u0026\u0026typeof o==\"object\"\u0026\u0026\"x\"in o\u0026\u0026\"y\"in o\u0026\u0026typeof o.x==\"number\"\u0026\u0026typeof o.y==\"number\")):[]):[],Lki=t=\u003e{if(!t.type.startsWith(\"pcb_\"))return null;if(t.type===\"pcb_smtpad\"\u0026\u0026t.shape===\"polygon\"\u0026\u0026Array.isArray(t.points))return sfe(t.points);if(t.type===\"pcb_hole\"\u0026\u0026t.hole_shape===\"circle\")return lee(t.x,t.y,t.hole_diameter);if(t.type===\"pcb_plated_hole\"){let u;if(\"outer_diameter\"in t\u0026\u0026typeof t.outer_diameter==\"number\"?u=lee(t.x,t.y,t.outer_diameter):\"hole_diameter\"in t\u0026\u0026typeof t.hole_diameter==\"number\"\u0026\u0026(u=lee(t.x,t.y,t.hole_diameter)),(t.shape===\"oval\"||t.shape===\"pill\")\u0026\u0026typeof t.outer_width==\"number\"\u0026\u0026typeof t.outer_height==\"number\"\u0026\u0026(u=(t.shape===\"pill\"?Fki:kki)(t.x,t.y,t.outer_width,t.outer_height,t.ccw_rotation??0)),\"rect_pad_width\"in t\u0026\u0026typeof t.rect_pad_width==\"number\"\u0026\u0026\"rect_pad_height\"in t\u0026\u0026typeof t.rect_pad_height==\"number\"){const g=$dn(t.x,t.y,t.rect_pad_width,t.rect_pad_height,\"rect_ccw_rotation\"in t?t.rect_ccw_rotation??0:0);u=u?p$e(u,g):g}if(\"hole_diameter\"in t\u0026\u0026typeof t.hole_diameter==\"number\"){const g=lee(t.x+(\"hole_offset_x\"in t?t.hole_offset_x??0:0),t.y+(\"hole_offset_y\"in t?t.hole_offset_y??0:0),t.hole_diameter);u=u?p$e(u,g):g}if(u)return u}const e=t,n=sfe(m$e(e.route));if(n)return n;const o=sfe(m$e(e.outline));if(o)return o;const i=sfe(m$e(e.points));if(i)return i;let r,s,a,A;\"x\"in t\u0026\u0026\"y\"in t\u0026\u0026(r=Number(t.x),s=Number(t.y)),\"outer_diameter\"in t\u0026\u0026(a=Number(t.outer_diameter),A=Number(t.outer_diameter)),\"width\"in t\u0026\u0026(a=Number(t.width)),\"height\"in t\u0026\u0026(A=Number(t.height)),\"center\"in t\u0026\u0026t.center\u0026\u0026typeof t.center==\"object\"\u0026\u0026\"x\"in t.center\u0026\u0026\"y\"in t.center\u0026\u0026(r=Number(t.center.x),s=Number(t.center.y));let c=0;if(\"rotation\"in t\u0026\u0026typeof t.rotation==\"number\"\u0026\u0026(c=t.rotation),\"ccw_rotation\"in t\u0026\u0026typeof t.ccw_rotation==\"number\"\u0026\u0026(c=t.ccw_rotation),r!==void 0\u0026\u0026s!==void 0)return a!==void 0\u0026\u0026A!==void 0?c?$dn(r,s,a,A,c):{minX:r-a/2,minY:s-A/2,maxX:r+a/2,maxY:s+A/2}:\"radius\"in t\u0026\u0026typeof t.radius==\"number\"?lee(r,s,t.radius*2):{minX:r,minY:s,maxX:r,maxY:s};const l=[e.anchor_position,e.position].filter(u=\u003e!!(u\u0026\u0026typeof u==\"object\"\u0026\u0026\"x\"in u\u0026\u0026\"y\"in u\u0026\u0026typeof u.x==\"number\"\u0026\u0026typeof u.y==\"number\")).at(0);return l?{minX:l.x,minY:l.y,maxX:l.x,maxY:l.y}:null},_$e=t=\u003e{let e={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};for(const n of t){const o=Lki(n);o\u0026\u0026(e=p$e(e,o))}return e};function Hki(t){let e=0;if(t.length==0)return e;for(var n=0;n\u003ct.length;n++){var o=t.charCodeAt(n);e=(e\u003c\u003c5)-e+o,e=e\u0026e}return Math.abs(e)}var qdn=[[\"#69d2e7\",\"#a7dbd8\",\"#e0e4cc\",\"#f38630\",\"#fa6900\"],[\"#fe4365\",\"#fc9d9a\",\"#f9cdad\",\"#c8c8a9\",\"#83af9b\"],[\"#ecd078\",\"#d95b43\",\"#c02942\",\"#542437\",\"#53777a\"],[\"#556270\",\"#4ecdc4\",\"#c7f464\",\"#ff6b6b\",\"#c44d58\"],[\"#774f38\",\"#e08e79\",\"#f1d4af\",\"#ece5ce\",\"#c5e0dc\"],[\"#e8ddcb\",\"#cdb380\",\"#036564\",\"#033649\",\"#031634\"],[\"#490a3d\",\"#bd1550\",\"#e97f02\",\"#f8ca00\",\"#8a9b0f\"],[\"#594f4f\",\"#547980\",\"#45ada8\",\"#9de0ad\",\"#e5fcc2\"],[\"#00a0b0\",\"#6a4a3c\",\"#cc333f\",\"#eb6841\",\"#edc951\"],[\"#e94e77\",\"#d68189\",\"#c6a49a\",\"#c6e5d9\",\"#f4ead5\"],[\"#3fb8af\",\"#7fc7af\",\"#dad8a7\",\"#ff9e9d\",\"#ff3d7f\"],[\"#d9ceb2\",\"#948c75\",\"#d5ded9\",\"#7a6a53\",\"#99b2b7\"],[\"#ffffff\",\"#cbe86b\",\"#f2e9e1\",\"#1c140d\",\"#cbe86b\"],[\"#efffcd\",\"#dce9be\",\"#555152\",\"#2e2633\",\"#99173c\"],[\"#343838\",\"#005f6b\",\"#008c9e\",\"#00b4cc\",\"#00dffc\"],[\"#413e4a\",\"#73626e\",\"#b38184\",\"#f0b49e\",\"#f7e4be\"],[\"#ff4e50\",\"#fc913a\",\"#f9d423\",\"#ede574\",\"#e1f5c4\"],[\"#99b898\",\"#fecea8\",\"#ff847c\",\"#e84a5f\",\"#2a363b\"],[\"#655643\",\"#80bca3\",\"#f6f7bd\",\"#e6ac27\",\"#bf4d28\"],[\"#00a8c6\",\"#40c0cb\",\"#f9f2e7\",\"#aee239\",\"#8fbe00\"],[\"#351330\",\"#424254\",\"#64908a\",\"#e8caa4\",\"#cc2a41\"],[\"#554236\",\"#f77825\",\"#d3ce3d\",\"#f1efa5\",\"#60b99a\"],[\"#5d4157\",\"#838689\",\"#a8caba\",\"#cad7b2\",\"#ebe3aa\"],[\"#8c2318\",\"#5e8c6a\",\"#88a65e\",\"#bfb35a\",\"#f2c45a\"],[\"#fad089\",\"#ff9c5b\",\"#f5634a\",\"#ed303c\",\"#3b8183\"],[\"#ff4242\",\"#f4fad2\",\"#d4ee5e\",\"#e1edb9\",\"#f0f2eb\"],[\"#f8b195\",\"#f67280\",\"#c06c84\",\"#6c5b7b\",\"#355c7d\"],[\"#d1e751\",\"#ffffff\",\"#000000\",\"#4dbce9\",\"#26ade4\"],[\"#1b676b\",\"#519548\",\"#88c425\",\"#bef202\",\"#eafde6\"],[\"#5e412f\",\"#fcebb6\",\"#78c0a8\",\"#f07818\",\"#f0a830\"],[\"#bcbdac\",\"#cfbe27\",\"#f27435\",\"#f02475\",\"#3b2d38\"],[\"#452632\",\"#91204d\",\"#e4844a\",\"#e8bf56\",\"#e2f7ce\"],[\"#eee6ab\",\"#c5bc8e\",\"#696758\",\"#45484b\",\"#36393b\"],[\"#f0d8a8\",\"#3d1c00\",\"#86b8b1\",\"#f2d694\",\"#fa2a00\"],[\"#2a044a\",\"#0b2e59\",\"#0d6759\",\"#7ab317\",\"#a0c55f\"],[\"#f04155\",\"#ff823a\",\"#f2f26f\",\"#fff7bd\",\"#95cfb7\"],[\"#b9d7d9\",\"#668284\",\"#2a2829\",\"#493736\",\"#7b3b3b\"],[\"#bbbb88\",\"#ccc68d\",\"#eedd99\",\"#eec290\",\"#eeaa88\"],[\"#b3cc57\",\"#ecf081\",\"#ffbe40\",\"#ef746f\",\"#ab3e5b\"],[\"#a3a948\",\"#edb92e\",\"#f85931\",\"#ce1836\",\"#009989\"],[\"#300030\",\"#480048\",\"#601848\",\"#c04848\",\"#f07241\"],[\"#67917a\",\"#170409\",\"#b8af03\",\"#ccbf82\",\"#e33258\"],[\"#aab3ab\",\"#c4cbb7\",\"#ebefc9\",\"#eee0b7\",\"#e8caaf\"],[\"#e8d5b7\",\"#0e2430\",\"#fc3a51\",\"#f5b349\",\"#e8d5b9\"],[\"#ab526b\",\"#bca297\",\"#c5ceae\",\"#f0e2a4\",\"#f4ebc3\"],[\"#607848\",\"#789048\",\"#c0d860\",\"#f0f0d8\",\"#604848\"],[\"#b6d8c0\",\"#c8d9bf\",\"#dadabd\",\"#ecdbbc\",\"#fedcba\"],[\"#a8e6ce\",\"#dcedc2\",\"#ffd3b5\",\"#ffaaa6\",\"#ff8c94\"],[\"#3e4147\",\"#fffedf\",\"#dfba69\",\"#5a2e2e\",\"#2a2c31\"],[\"#fc354c\",\"#29221f\",\"#13747d\",\"#0abfbc\",\"#fcf7c5\"],[\"#cc0c39\",\"#e6781e\",\"#c8cf02\",\"#f8fcc1\",\"#1693a7\"],[\"#1c2130\",\"#028f76\",\"#b3e099\",\"#ffeaad\",\"#d14334\"],[\"#a7c5bd\",\"#e5ddcb\",\"#eb7b59\",\"#cf4647\",\"#524656\"],[\"#dad6ca\",\"#1bb0ce\",\"#4f8699\",\"#6a5e72\",\"#563444\"],[\"#5c323e\",\"#a82743\",\"#e15e32\",\"#c0d23e\",\"#e5f04c\"],[\"#edebe6\",\"#d6e1c7\",\"#94c7b6\",\"#403b33\",\"#d3643b\"],[\"#fdf1cc\",\"#c6d6b8\",\"#987f69\",\"#e3ad40\",\"#fcd036\"],[\"#230f2b\",\"#f21d41\",\"#ebebbc\",\"#bce3c5\",\"#82b3ae\"],[\"#b9d3b0\",\"#81bda4\",\"#b28774\",\"#f88f79\",\"#f6aa93\"],[\"#3a111c\",\"#574951\",\"#83988e\",\"#bcdea5\",\"#e6f9bc\"],[\"#5e3929\",\"#cd8c52\",\"#b7d1a3\",\"#dee8be\",\"#fcf7d3\"],[\"#1c0113\",\"#6b0103\",\"#a30006\",\"#c21a01\",\"#f03c02\"],[\"#000000\",\"#9f111b\",\"#b11623\",\"#292c37\",\"#cccccc\"],[\"#382f32\",\"#ffeaf2\",\"#fcd9e5\",\"#fbc5d8\",\"#f1396d\"],[\"#e3dfba\",\"#c8d6bf\",\"#93ccc6\",\"#6cbdb5\",\"#1a1f1e\"],[\"#f6f6f6\",\"#e8e8e8\",\"#333333\",\"#990100\",\"#b90504\"],[\"#1b325f\",\"#9cc4e4\",\"#e9f2f9\",\"#3a89c9\",\"#f26c4f\"],[\"#a1dbb2\",\"#fee5ad\",\"#faca66\",\"#f7a541\",\"#f45d4c\"],[\"#c1b398\",\"#605951\",\"#fbeec2\",\"#61a6ab\",\"#accec0\"],[\"#5e9fa3\",\"#dcd1b4\",\"#fab87f\",\"#f87e7b\",\"#b05574\"],[\"#951f2b\",\"#f5f4d7\",\"#e0dfb1\",\"#a5a36c\",\"#535233\"],[\"#8dccad\",\"#988864\",\"#fea6a2\",\"#f9d6ac\",\"#ffe9af\"],[\"#2d2d29\",\"#215a6d\",\"#3ca2a2\",\"#92c7a3\",\"#dfece6\"],[\"#413d3d\",\"#040004\",\"#c8ff00\",\"#fa023c\",\"#4b000f\"],[\"#eff3cd\",\"#b2d5ba\",\"#61ada0\",\"#248f8d\",\"#605063\"],[\"#ffefd3\",\"#fffee4\",\"#d0ecea\",\"#9fd6d2\",\"#8b7a5e\"],[\"#cfffdd\",\"#b4dec1\",\"#5c5863\",\"#a85163\",\"#ff1f4c\"],[\"#9dc9ac\",\"#fffec7\",\"#f56218\",\"#ff9d2e\",\"#919167\"],[\"#4e395d\",\"#827085\",\"#8ebe94\",\"#ccfc8e\",\"#dc5b3e\"],[\"#a8a7a7\",\"#cc527a\",\"#e8175d\",\"#474747\",\"#363636\"],[\"#f8edd1\",\"#d88a8a\",\"#474843\",\"#9d9d93\",\"#c5cfc6\"],[\"#046d8b\",\"#309292\",\"#2fb8ac\",\"#93a42a\",\"#ecbe13\"],[\"#f38a8a\",\"#55443d\",\"#a0cab5\",\"#cde9ca\",\"#f1edd0\"],[\"#a70267\",\"#f10c49\",\"#fb6b41\",\"#f6d86b\",\"#339194\"],[\"#ff003c\",\"#ff8a00\",\"#fabe28\",\"#88c100\",\"#00c176\"],[\"#ffedbf\",\"#f7803c\",\"#f54828\",\"#2e0d23\",\"#f8e4c1\"],[\"#4e4d4a\",\"#353432\",\"#94ba65\",\"#2790b0\",\"#2b4e72\"],[\"#0ca5b0\",\"#4e3f30\",\"#fefeeb\",\"#f8f4e4\",\"#a5b3aa\"],[\"#4d3b3b\",\"#de6262\",\"#ffb88c\",\"#ffd0b3\",\"#f5e0d3\"],[\"#fffbb7\",\"#a6f6af\",\"#66b6ab\",\"#5b7c8d\",\"#4f2958\"],[\"#edf6ee\",\"#d1c089\",\"#b3204d\",\"#412e28\",\"#151101\"],[\"#9d7e79\",\"#ccac95\",\"#9a947c\",\"#748b83\",\"#5b756c\"],[\"#fcfef5\",\"#e9ffe1\",\"#cdcfb7\",\"#d6e6c3\",\"#fafbe3\"],[\"#9cddc8\",\"#bfd8ad\",\"#ddd9ab\",\"#f7af63\",\"#633d2e\"],[\"#30261c\",\"#403831\",\"#36544f\",\"#1f5f61\",\"#0b8185\"],[\"#aaff00\",\"#ffaa00\",\"#ff00aa\",\"#aa00ff\",\"#00aaff\"],[\"#d1313d\",\"#e5625c\",\"#f9bf76\",\"#8eb2c5\",\"#615375\"],[\"#ffe181\",\"#eee9e5\",\"#fad3b2\",\"#ffba7f\",\"#ff9c97\"],[\"#73c8a9\",\"#dee1b6\",\"#e1b866\",\"#bd5532\",\"#373b44\"],[\"#805841\",\"#dcf7f3\",\"#fffcdd\",\"#ffd8d8\",\"#f5a2a2\"]],Oki=t=\u003e{let{x:e,y:n,width:o,height:i}={...t,...t.size,...t.center,...t.position};if(t.x1!==void 0\u0026\u0026t.x2!==void 0\u0026\u0026t.y1!==void 0\u0026\u0026t.y2!==void 0\u0026\u0026(e=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2,o=Math.abs(t.x1-t.x2),i=Math.abs(t.y1-t.y2)),t.points\u0026\u0026Array.isArray(t.points)\u0026\u0026t.points.length\u003e0){const a=t.points.map(h=\u003eh.x),A=t.points.map(h=\u003eh.y),c=Math.min(...a),l=Math.max(...a),u=Math.min(...A),g=Math.max(...A);e=(c+l)/2,n=(u+g)/2,o=l-c,i=g-u}const r=t.text||t.name||t.source?.text||t.source?.name||\"?\",s=t;return e===void 0||n===void 0?null:(o===void 0\u0026\u0026(\"radius\"in t?(o=t.radius*2,i=t.radius*2):\"outer_diameter\"in t?(o=t.outer_diameter,i=t.outer_diameter):\"rect_pad_width\"in t\u0026\u0026\"rect_pad_height\"in t?(o=t.rect_pad_width,i=t.rect_pad_height,\"hole_diameter\"in t\u0026\u0026(o=Math.max(o,t.hole_diameter),i=Math.max(i,t.hole_diameter))):\"hole_diameter\"in t\u0026\u0026(o=t.hole_diameter,i=t.hole_diameter)),(o===void 0||i===void 0)\u0026\u0026(o=.1,i=.1),{x:e,y:n,width:o,height:i,title:r,content:s,bg_color:qdn[Hki(t.type||r)%qdn.length]?.[4]??\"#f00\"})},Gki=t=\u003e!!t,Yki=t=\u003e{const e=t.filter(c=\u003ec.type.startsWith(\"pcb_\")||c.type.startsWith(\"schematic_\")).concat(t.filter(c=\u003ec.type===\"pcb_trace\"||c.type===\"schematic_trace\").flatMap(c=\u003ec.route)).map(c=\u003eOki(c)).filter(Gki);if(e.length===0)return{center:{x:0,y:0},width:0,height:0};let n=e[0].x-e[0].width/2,o=e[0].x+e[0].width/2,i=e[0].y-e[0].height/2,r=e[0].y+e[0].height/2;for(const c of e.slice(1))n=Math.min(n,c.x-c.width/2),o=Math.max(o,c.x+c.width/2),i=Math.min(i,c.y-c.height/2),r=Math.max(r,c.y+c.height/2);const s=o-n,a=r-i;return{center:{x:n+s/2,y:i+a/2},width:s,height:a}},u_={HIDDEN_LAYER_OPACITY:\"pcb_viewer_hidden_layer_opacity\",IS_SHOWING_PCB_GROUPS:\"pcb_viewer_is_showing_pcb_groups\",PCB_GROUP_VIEW_MODE:\"pcb_viewer_group_view_mode\",IS_SHOWING_COPPER_POURS:\"pcb_viewer_is_showing_copper_pours\",IS_SHOWING_COURTYARDS:\"pcb_viewer_is_showing_courtyards\",IS_SHOWING_GROUP_ANCHOR_OFFSETS:\"pcb_viewer_is_showing_group_anchor_offsets\",IS_SHOWING_SOLDER_MASK:\"pcb_viewer_is_showing_solder_mask\",IS_SHOWING_FABRICATION_NOTES:\"pcb_viewer_is_showing_fabrication_notes\",IS_SHOWING_PCB_NOTES:\"pcb_viewer_is_showing_pcb_notes\",IS_SHOWING_SILKSCREEN:\"pcb_viewer_is_showing_silkscreen\"},OP=(t,e)=\u003e{if(typeof window\u003e\"u\")return e;try{const n=localStorage.getItem(t);return n!==null?JSON.parse(n):e}catch{return e}},GP=(t,e)=\u003e{if(!(typeof window\u003e\"u\"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Uki=(t,e)=\u003e{if(typeof window\u003e\"u\")return e;try{const n=localStorage.getItem(t);return n!==null?JSON.parse(n):e}catch{return e}},Kki=(t,e)=\u003e{if(!(typeof window\u003e\"u\"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Vki=(t,e)=\u003e{if(typeof window\u003e\"u\")return e;try{const n=localStorage.getItem(t),o=n!==null?JSON.parse(n):null;return typeof o==\"number\"\u0026\u0026Number.isFinite(o)?o:e}catch{return e}},zki=(t,e)=\u003e{if(!(typeof window\u003e\"u\"))try{localStorage.setItem(t,JSON.stringify(e))}catch{}},Jki=\"named_only\",Wki=(t={},e=!1)=\u003eiFt(n=\u003e({hidden_layer_opacity:Math.max(0,Math.min(1,Vki(u_.HIDDEN_LAYER_OPACITY,.2))),setHiddenLayerOpacity:o=\u003e{if(!Number.isFinite(o))return;const i=Math.max(0,Math.min(1,o));zki(u_.HIDDEN_LAYER_OPACITY,i),n({hidden_layer_opacity:i})},selected_layer:\"top\",pcb_viewer_id:`pcb_viewer_${Math.random().toString().slice(2,10)}`,in_edit_mode:!1,in_move_footprint_mode:!1,is_moving_component:!1,is_mouse_over_container:!1,is_showing_multiple_traces_length:!1,is_showing_rats_nest:!1,is_showing_autorouting:!0,is_showing_drc_errors:!0,is_showing_drc_warnings:!0,is_showing_copper_pours:OP(u_.IS_SHOWING_COPPER_POURS,!0),is_showing_courtyards:OP(u_.IS_SHOWING_COURTYARDS,!0),is_showing_pcb_groups:e?!1:OP(u_.IS_SHOWING_PCB_GROUPS,!0),is_showing_group_anchor_offsets:OP(u_.IS_SHOWING_GROUP_ANCHOR_OFFSETS,!1),is_showing_solder_mask:OP(u_.IS_SHOWING_SOLDER_MASK,!1),is_showing_silkscreen:OP(u_.IS_SHOWING_SILKSCREEN,!0),is_showing_fabrication_notes:OP(u_.IS_SHOWING_FABRICATION_NOTES,!1),is_showing_pcb_notes:OP(u_.IS_SHOWING_PCB_NOTES,!0),pcb_group_view_mode:e?\"all\":Uki(u_.PCB_GROUP_VIEW_MODE,Jki),hovered_error_id:null,focused_error_id:null,...t,selectLayer:o=\u003en({selected_layer:o}),setEditMode:o=\u003en({in_edit_mode:o!==\"off\",in_move_footprint_mode:o===\"move_footprint\",is_moving_component:!1}),setIsShowingRatsNest:o=\u003en({is_showing_rats_nest:o}),setIsMovingComponent:o=\u003en({is_moving_component:o}),setIsMouseOverContainer:o=\u003en({is_mouse_over_container:o}),setIsShowingMultipleTracesLength:o=\u003en({is_showing_multiple_traces_length:o}),setIsShowingAutorouting:o=\u003en({is_showing_autorouting:o}),setIsShowingDrcErrors:o=\u003en({is_showing_drc_errors:o}),setIsShowingDrcWarnings:o=\u003en({is_showing_drc_warnings:o}),setIsShowingCopperPours:o=\u003e{GP(u_.IS_SHOWING_COPPER_POURS,o),n({is_showing_copper_pours:o})},setIsShowingCourtyards:o=\u003e{GP(u_.IS_SHOWING_COURTYARDS,o),n({is_showing_courtyards:o})},setIsShowingPcbGroups:o=\u003e{e||(GP(u_.IS_SHOWING_PCB_GROUPS,o),n({is_showing_pcb_groups:o}))},setIsShowingGroupAnchorOffsets:o=\u003e{GP(u_.IS_SHOWING_GROUP_ANCHOR_OFFSETS,o),n({is_showing_group_anchor_offsets:o})},setIsShowingSolderMask:o=\u003e{GP(u_.IS_SHOWING_SOLDER_MASK,o),n({is_showing_solder_mask:o})},setIsShowingSilkscreen:o=\u003e{GP(u_.IS_SHOWING_SILKSCREEN,o),n({is_showing_silkscreen:o})},setIsShowingFabricationNotes:o=\u003e{GP(u_.IS_SHOWING_FABRICATION_NOTES,o),n({is_showing_fabrication_notes:o})},setIsShowingPcbNotes:o=\u003e{GP(u_.IS_SHOWING_PCB_NOTES,o),n({is_showing_pcb_notes:o})},setPcbGroupViewMode:o=\u003e{e||(Kki(u_.PCB_GROUP_VIEW_MODE,o),n({pcb_group_view_mode:o}))},setHoveredErrorId:o=\u003en({hovered_error_id:o}),setFocusedErrorId:o=\u003en({focused_error_id:o})})),Kc=t=\u003e{const e=ee.useContext(Xdn);return hFt(e,t)},Xdn=ee.createContext(null),jki=({children:t,initialState:e,disablePcbGroups:n})=\u003e{const o=ee.useMemo(()=\u003eWki(e,n),[n]);return K.jsx(Xdn.Provider,{value:o,children:t})},$ki=()=\u003e{ee.useEffect(()=\u003e{KNi()},[]);const t=Kc(e=\u003ee.pcb_viewer_id);return K.jsx(UNi,{position:\"top-center\",containerId:t})};function qki(){var t=ee.useRef(!1),e=ee.useCallback(function(){return t.current},[]);return ee.useEffect(function(){return t.current=!0,function(){t.current=!1}},[]),e}var Xki=function(t){t===void 0\u0026\u0026(t={});var e=ee.useState(t),n=e[0],o=e[1],i=ee.useCallback(function(r){o(function(s){return Object.assign({},s,r instanceof Function?r(s):r)})},[]);return[n,i]},Zki=Xki,eFi=function(){},Zdn=typeof window\u003c\"u\",tFi=qgn($Ri()),nFi=function(){var t=qki(),e=Zki({value:void 0,error:void 0,noUserInteraction:!0}),n=e[0],o=e[1],i=ee.useCallback(function(r){if(t()){var s,a;try{if(typeof r!=\"string\"\u0026\u0026typeof r!=\"number\"){var A=new Error(\"Cannot copy typeof \"+typeof r+\" to clipboard, must be a string\");console.error(A),o({value:r,error:A,noUserInteraction:!0});return}else if(r===\"\"){var A=new Error(\"Cannot copy empty string to clipboard.\");console.error(A),o({value:r,error:A,noUserInteraction:!0});return}a=r.toString(),s=(0,tFi.default)(a),o({value:a,error:void 0,noUserInteraction:s})}catch(c){o({value:a,error:c,noUserInteraction:s})}}},[]);return[n,i]},oFi=nFi,iFi=Zdn?ee.useLayoutEffect:ee.useEffect,rFi=iFi,ehn={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function sFi(){var t=ee.useState(null),e=t[0],n=t[1],o=ee.useState(ehn),i=o[0],r=o[1],s=ee.useMemo(function(){return new window.ResizeObserver(function(a){if(a[0]){var A=a[0].contentRect,c=A.x,l=A.y,u=A.width,g=A.height,h=A.top,d=A.left,p=A.bottom,m=A.right;r({x:c,y:l,width:u,height:g,top:h,left:d,bottom:p,right:m})}})},[]);return rFi(function(){if(e)return s.observe(e),function(){s.disconnect()}},[e]),[n,i]}var uee=Zdn\u0026\u0026typeof window.ResizeObserver\u003c\"u\"?sFi:function(){return[eFi,ehn]},thn=({initialTransform:t,initialTouch1:e,initialTouch2:n,finalTouch1:o,finalTouch2:i})=\u003e{if(!o||!i)return t;const r={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s={x:(o.x+i.x)/2,y:(o.y+i.y)/2},a=Math.hypot(n.x-e.x,n.y-e.y),A=Math.hypot(i.x-o.x,i.y-o.y),c=a===0?1:A/a,l=s.x-r.x,u=s.y-r.y;return NC(Qd(l,u),Qd(r.x,r.y),vS(c,c),Qd(-r.x,-r.y),t)},aFi=(t={})=\u003e{const e=ee.useRef(null),[n,o]=ee.useState(0),i=t.canvasElm??e.current,[r,s]=ee.useState(t.initialTransform??RP()),[a,A]=ee.useState(0),[c,l]=ee.useReducer(I=\u003eI+1,0),u=ee.useCallback(I=\u003e{t.onSetTransform\u0026\u0026t.onSetTransform(I),t.transform||s(I)},[t.onSetTransform,s]),g=ee.useCallback(I=\u003e{u(I),l()},[u]),h=t.transform??r,d=ee.useCallback(()=\u003e{o(Date.now())},[]),p=ee.useRef(\"none\"),m=ee.useRef(null),_=ee.useRef(null);ee.useEffect(()=\u003e{const I=t.canvasElm??e.current;if(I\u0026\u0026!i){A(a+1);return}if(!I){const U=setTimeout(()=\u003e{A(a+1)},100);return()=\u003eclearTimeout(U)}let C=t.transform??r,y={x:0,y:0},x={x:0,y:0},E=!1;const B=U=\u003e({x:U.pageX-I.getBoundingClientRect().left-window.scrollX,y:U.pageY-I.getBoundingClientRect().top-window.scrollY});function S(U){t.enabled!==!1\u0026\u0026(t.shouldDrag\u0026\u0026!t.shouldDrag(U)||(y=B(U),!(Date.now()-n\u003c100)\u0026\u0026(E=!0,U.preventDefault())))}function Q(U){if(!E||t.enabled===!1||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;x=B(U);const Y=NC(Qd(x.x-y.x,x.y-y.y),C);u(Y),C=Y,E=!1}function w(U){if(B(U),!E||t.enabled===!1||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;x=B(U);const Y=NC(Qd(x.x-y.x,x.y-y.y),C);u(Y)}function M(U){if(t.enabled===!1||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;const Y=B(U),W=NC(Qd(Y.x,Y.y),vS(1-U.deltaY/1e3,1-U.deltaY/1e3),Qd(-Y.x,-Y.y),C);u(W),C=W,U.preventDefault()}function k(U){if(!E||t.shouldDrag\u0026\u0026!t.shouldDrag(U))return;if(I){const W=I.getBoundingClientRect();if(U.clientX\u003e=W.left+10\u0026\u0026U.clientX\u003c=W.right-10\u0026\u0026U.clientY\u003e=W.top+10\u0026\u0026U.clientY\u003c=W.bottom-10)return}E=!1,x=B(U);const Y=NC(Qd(x.x-y.x,x.y-y.y),C);u(Y),C=Y}function R(U){if(U.preventDefault(),t.enabled!==!1){if(U.touches.length===1){p.current=\"drag\";const Y=U.touches[0];m.current={initialTransform:C,initialTouch:{x:Y.clientX,y:Y.clientY}}}else if(U.touches.length===2){p.current=\"pinch\";const Y=U.touches[0],W=U.touches[1];_.current={initialTransform:C,initialTouch1:{x:Y.clientX,y:Y.clientY},initialTouch2:{x:W.clientX,y:W.clientY},finalTouch1:null,finalTouch2:null}}}}function F(U){if(U.preventDefault(),t.enabled!==!1){if(p.current===\"drag\"\u0026\u0026U.touches.length===1\u0026\u0026m.current){const Y=U.touches[0],W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=NC(Qd(te,j),m.current.initialTransform);u(J)}else if(p.current===\"pinch\"\u0026\u0026U.touches.length===2\u0026\u0026_.current){const Y=U.touches[0],W=U.touches[1];_.current.finalTouch1={x:Y.clientX,y:Y.clientY},_.current.finalTouch2={x:W.clientX,y:W.clientY};const te=thn(_.current);u(te)}}}function O(U){U.preventDefault();const Y=U.changedTouches[0];if(p.current===\"drag\"\u0026\u0026m.current\u0026\u0026Y){const W={x:Y.clientX,y:Y.clientY},te=W.x-m.current.initialTouch.x,j=W.y-m.current.initialTouch.y,J=NC(Qd(te,j),m.current.initialTransform);u(J),C=J}else if(p.current===\"pinch\"\u0026\u0026_.current){const W=thn(_.current);u(W),C=W}p.current=\"none\",m.current=null,_.current=null}return I.addEventListener(\"mousedown\",S),I.addEventListener(\"mouseup\",Q),window.addEventListener(\"mousemove\",w),I.addEventListener(\"mouseout\",k),I.addEventListener(\"wheel\",M),I.addEventListener(\"touchstart\",R,{passive:!1}),I.addEventListener(\"touchmove\",F,{passive:!1}),I.addEventListener(\"touchend\",O,{passive:!1}),I.addEventListener(\"touchcancel\",O,{passive:!1}),()=\u003e{I.removeEventListener(\"mousedown\",S),I.removeEventListener(\"mouseup\",Q),window.removeEventListener(\"mousemove\",w),I.removeEventListener(\"mouseout\",k),I.removeEventListener(\"wheel\",M),I.removeEventListener(\"touchstart\",R),I.removeEventListener(\"touchmove\",F),I.removeEventListener(\"touchend\",O),I.removeEventListener(\"touchcancel\",O)}},[i,a,c,n,t.enabled,t.shouldDrag]);const f=ee.useCallback(I=\u003e_i(h,I),[h]);return{ref:e,transform:h,applyTransformToPoint:f,setTransform:g,cancelDrag:d}},AFi=aFi,cFi=(t,e)=\u003e{if(t?.type!==\"pcb_smtpad\"\u0026\u0026t?.type!==\"pcb_plated_hole\")return;const n=e.find(i=\u003ei.type===\"pcb_component\"\u0026\u0026i.pcb_component_id===t.pcb_component_id);if(n?.type!==\"pcb_component\")return;const o=e.find(i=\u003ei.type===\"source_component\"\u0026\u0026i.source_component_id===n.source_component_id);if(o?.type===\"source_component\")return{source_component_id:o.source_component_id,pcb_component_id:n.pcb_component_id,refdes:o.name,manufacturer_part_number:o.manufacturer_part_number}};function lFi(t){const e=new Map;let n=0;function o(i){for(const[,s]of e)if(s.has(i))return s;const r=new Set;return e.set(`connectivity_net${n++}`,r),r}for(const i of t){let r=null;for(const s of i){if(!r)r=o(s);else if(!r.has(s)){const a=o(s);if(a!==r){for(const A of a)r.add(A);e.delete(Array.from(e.entries()).find(([,A])=\u003eA===a)[0])}}r.add(s)}}return Object.fromEntries(Array.from(e.entries()).map(([i,r])=\u003e[i,Array.from(r)]))}var uFi=class{netMap;idToNetMap;constructor(t){this.netMap=t,this.idToNetMap={};for(const[e,n]of Object.entries(t))for(const o of n)this.idToNetMap[o]=e}addConnections(t){for(const e of t){const n=new Set;for(const i of e){const r=this.idToNetMap[i];r\u0026\u0026n.add(r)}let o;if(n.size===0)o=`connectivity_net${Object.keys(this.netMap).length}`,this.netMap[o]=[];else if(n.size===1)o=n.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;else{o=n.values().next().value??`connectivity_net${Object.keys(this.netMap).length}`;for(const i of n)if(i!==o){this.netMap[o].push(...this.netMap[i]),this.netMap[i]=this.netMap[o];for(const r of this.netMap[o])this.idToNetMap[r]=o}}for(const i of e)this.netMap[o].includes(i)||this.netMap[o].push(i),this.idToNetMap[i]=o}}getIdsConnectedToNet(t){return this.netMap[t]||[]}getNetConnectedToId(t){return this.idToNetMap[t]}areIdsConnected(t,e){if(t===e)return!0;const n=this.getNetConnectedToId(t);if(!n)return!1;const o=this.getNetConnectedToId(e);return o?n===o||o===t||o===t:!1}areAllIdsConnected(t){const e=this.getNetConnectedToId(t[0]);for(const n of t){const o=this.getNetConnectedToId(n);if(o===void 0||o!==e)return!1}return!0}},nhn=t=\u003e{const e=[];for(const o of t)if(o.type===\"source_trace\")e.push([o.source_trace_id,...o.connected_source_port_ids??[],...o.connected_source_net_ids??[]].filter(Boolean));else if(o.type===\"pcb_port\"){const{pcb_port_id:i,source_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([r,i])}else if(o.type===\"pcb_smtpad\"){const{pcb_smtpad_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_plated_hole\"){const{pcb_plated_hole_id:i,pcb_port_id:r}=o;r\u0026\u0026i\u0026\u0026e.push([i,r])}else if(o.type===\"pcb_trace\"){const{pcb_trace_id:i,source_trace_id:r}=o,s=Array.isArray(o.route)?o.route.filter(a=\u003ea\u0026\u0026a.route_type===\"wire\"):[];if(r\u0026\u0026i\u0026\u0026e.push([i,r]),Array.isArray(s)){const a=s.find(c=\u003ec?.start_pcb_port_id)?.start_pcb_port_id,A=s.find(c=\u003ec?.end_pcb_port_id)?.end_pcb_port_id;a\u0026\u0026i\u0026\u0026A\u0026\u0026e.push([a,i,A])}}else if(o.type===\"pcb_via\"){const{pcb_via_id:i,pcb_trace_id:r,source_trace_id:s,source_net_id:a}=o,A=[r,s,a].filter(c=\u003e!!c);i\u0026\u0026A.length\u003e0\u0026\u0026e.push([i,...A])}else if(o.type===\"source_component\"\u0026\u0026o.internally_connected_source_port_ids)for(const i of o.internally_connected_source_port_ids)e.push(i);const n=lFi(e);return new uFi(n)};function gFi(t,e){if(t.length\u003c2)throw new Error(\"Stroke must have at least two points\");const n=t.map(u=\u003eArray.isArray(u)?{x:u[0],y:u[1]}:u),o=[],i=[];function r(u,g){const h=g.x-u.x,d=g.y-u.y,p=Math.sqrt(h*h+d*d);return{x:-d/p,y:h/p}}function s(u,g,h,d){const p=d/2,m={x:u.x+g.x*p*h,y:u.y+g.y*p*h};h\u003e0?o.push(m):i.unshift(m)}const a=r(n[0],n[1]),A=n[0].trace_width??e;s(n[0],a,1,A),s(n[0],a,-1,A);for(let u=1;u\u003cn.length-1;u++){const g=n[u-1],h=n[u],d=n[u+1],p=r(g,h),m=r(h,d),_=p.x+m.x,f=p.y+m.y,I=Math.sqrt(_*_+f*f),C=h.trace_width??e;if(I/2\u003e2*(C/2))s(h,p,1,C),s(h,m,1,C),s(h,p,-1,C),s(h,m,-1,C);else{const x=1/I;s(h,{x:_*x,y:f*x},1,C),s(h,{x:_*x,y:f*x},-1,C)}}const c=r(n[n.length-2],n[n.length-1]),l=n[n.length-1].trace_width??e;return s(n[n.length-1],c,1,l),s(n[n.length-1],c,-1,l),[...o,...i]}var dFi=(t,e)=\u003e{const{x:n,y:o,width:i,height:r,layer:s,rect_border_radius:a}=t,A=t.corner_radius??a??0,c=[{_pcb_drawing_object_id:i9(\"rect\"),pcb_drawing_type:\"rect\",x:n,y:o,w:i,h:r,layer:s||\"top\",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,roundness:A,...t.shape===\"rotated_rect\"\u0026\u0026t.ccw_rotation!==void 0?{ccw_rotation:t.ccw_rotation}:{}}];if(t.is_covered_with_solder_mask){const l=s===\"bottom\"?\"soldermask_with_copper_bottom\":\"soldermask_with_copper_top\",g={...{_pcb_drawing_object_id:i9(\"rect\"),pcb_drawing_type:\"rect\",x:n,y:o,w:i,h:r,layer:l,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,roundness:A,...t.shape===\"rotated_rect\"\u0026\u0026t.ccw_rotation!==void 0?{ccw_rotation:t.ccw_rotation}:{}},...\"solder_mask_color\"in t\u0026\u0026t.solder_mask_color?{color:t.solder_mask_color}:{}};c.push(g)}return c},hFi=(t,e)=\u003e{const{x:n,y:o,radius:i,layer:r}=t,s=[{_pcb_drawing_object_id:i9(\"circle\"),pcb_drawing_type:\"circle\",x:n,y:o,r:i,layer:r||\"top\",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port}];if(t.is_covered_with_solder_mask){const a=r===\"bottom\"?\"soldermask_with_copper_bottom\":\"soldermask_with_copper_top\",A={_pcb_drawing_object_id:i9(\"circle\"),pcb_drawing_type:\"circle\",x:n,y:o,r:i,layer:a,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,...\"solder_mask_color\"in t\u0026\u0026t.solder_mask_color?{color:t.solder_mask_color}:{}};s.push(A)}return s},pFi=(t,e)=\u003e{const{layer:n,points:o}=t,i=[{_pcb_drawing_object_id:i9(\"polygon\"),pcb_drawing_type:\"polygon\",points:f$e(o),layer:n||\"top\",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port}];if(t.is_covered_with_solder_mask){const r=n===\"bottom\"?\"soldermask_with_copper_bottom\":\"soldermask_with_copper_top\",s={_pcb_drawing_object_id:i9(\"polygon\"),pcb_drawing_type:\"polygon\",points:f$e(o),layer:r,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,...\"solder_mask_color\"in t\u0026\u0026t.solder_mask_color?{color:t.solder_mask_color}:{}};i.push(s)}return i},mFi=(t,e)=\u003e{const{x:n,y:o,width:i,height:r,layer:s}=t,a=[{_pcb_drawing_object_id:i9(\"pill\"),pcb_drawing_type:\"pill\",x:n,y:o,w:i,h:r,layer:s||\"top\",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port}];if(t.is_covered_with_solder_mask){const A=s===\"bottom\"?\"soldermask_with_copper_bottom\":\"soldermask_with_copper_top\",c={_pcb_drawing_object_id:i9(\"pill\"),pcb_drawing_type:\"pill\",x:n,y:o,w:i,h:r,layer:A,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,...\"solder_mask_color\"in t\u0026\u0026t.solder_mask_color?{color:t.solder_mask_color}:{}};a.push(c)}return a},_Fi=(t,e)=\u003e{const{x:n,y:o,width:i,height:r,layer:s,ccw_rotation:a}=t,A=[{_pcb_drawing_object_id:i9(\"pill\"),pcb_drawing_type:\"pill\",x:n,y:o,w:i,h:r,layer:s||\"top\",_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,ccw_rotation:a}];if(t.is_covered_with_solder_mask){const c=s===\"bottom\"?\"soldermask_with_copper_bottom\":\"soldermask_with_copper_top\",l={_pcb_drawing_object_id:i9(\"pill\"),pcb_drawing_type:\"pill\",x:n,y:o,w:i,h:r,layer:c,_element:t,_parent_pcb_component:e._parent_pcb_component,_parent_source_component:e._parent_source_component,_source_port:e._source_port,ccw_rotation:a,...\"solder_mask_color\"in t\u0026\u0026t.solder_mask_color?{color:t.solder_mask_color}:{}};A.push(l)}return A},Pd=0,i9=t=\u003e`${t}_${Pd++}`,f$e=t=\u003e(t??[]).map(e=\u003e({x:lt.parse(e.x),y:lt.parse(e.y)}));function fFi(t){const e=new Map;for(const n of t){const o=n[`${n.type}_id`];o!==void 0\u0026\u0026!e.has(`${n.type}:${o}`)\u0026\u0026e.set(`${n.type}:${o}`,n)}return e}var IFi=(t,e,n)=\u003e{const o=(A,c)=\u003e{if(c!==void 0)return n?n.get(`${A}:${c}`):e.find(l=\u003el.type===A\u0026\u0026l[`${A}_id`]===c)},i=o(\"pcb_component\",\"pcb_component_id\"in t?t.pcb_component_id:void 0),r=o(\"source_component\",i?.source_component_id),s=\"source_port_id\"in t?t.source_port_id:\"pcb_port_id\"in t?o(\"pcb_port\",t.pcb_port_id)?.source_port_id:void 0,a=o(\"source_port\",s);switch(t.type){case\"pcb_smtpad\":{const A={_parent_pcb_component:i,_parent_source_component:r,_source_port:a};return t.shape===\"rect\"||t.shape===\"rotated_rect\"?dFi(t,A):t.shape===\"circle\"?hFi(t,A):t.shape===\"polygon\"?pFi(t,A):t.shape===\"pill\"?mFi(t,A):t.shape===\"rotated_pill\"?_Fi(t,A):[]}case\"pcb_trace\":{const A=[];if(t.route_thickness_mode===\"interpolated\"){const u=t.route.flatMap(d=\u003ed.route_type===\"through_pad\"?[{...d.start,trace_width:d.width},{...d.end,trace_width:d.width}]:[{x:d.x,y:d.y,trace_width:d.route_type===\"wire\"?d.width:.5}]),g=gFi(u,.5),h=t.route[0].layer;return A.push({_pcb_drawing_object_id:`polygon_${Pd++}`,_element:t,pcb_drawing_type:\"polygon\",points:g,layer:h}),t.route.forEach(d=\u003e{d.route_type===\"via\"\u0026\u0026A.push({_pcb_drawing_object_id:`circle_${Pd++}`,_element:t,pcb_drawing_type:\"circle\",x:d.x,y:d.y,r:d.outer_diameter/2,layer:d.from_layer})}),A}let c=null,l=null;for(const u of t.route)u.route_type===\"wire\"\u0026\u0026(c!==null\u0026\u0026l!==null\u0026\u0026A.push({_pcb_drawing_object_id:`line_${Pd++}`,_element:t,pcb_drawing_type:\"line\",x1:c,y1:l,x2:u.x,y2:u.y,width:u.width,squareCap:!1,layer:u.layer}),c=u.x,l=u.y);return A}case\"pcb_via\":{const{x:A,y:c,outer_diameter:l,hole_diameter:u}=t,g=t.from_layer,h=t.to_layer,d=t.layers,p=[];g\u0026\u0026h?p.push(g,h):d\u0026\u0026Array.isArray(d)?p.push(...d):p.push(\"top\",\"bottom\");const m=[];for(const _ of p)m.push({_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:\"circle\",x:A,y:c,r:l/2,layer:_,_element:t,_parent_pcb_component:i,_parent_source_component:r});return m.push({_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:\"circle\",x:A,y:c,r:u/2,layer:\"drill\",_element:t}),m}case\"pcb_plated_hole\":if(t.shape===\"circle\"){const{x:A,y:c,hole_diameter:l,outer_diameter:u}=t;return[{_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:\"circle\",x:A,y:c,r:u/2,layer:\"top\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a},{_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:\"circle\",x:A,y:c,r:l/2,layer:\"drill\",_element:t}]}else if(t.shape===\"oval\"){const{x:A,y:c,outer_height:l,outer_width:u,hole_height:g,hole_width:h}=t;return[{_pcb_drawing_object_id:`oval_${Pd++}`,pcb_drawing_type:\"oval\",x:A,y:c,rX:u/2,rY:l/2,layer:\"top\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a},{_pcb_drawing_object_id:`oval_${Pd++}`,_element:t,pcb_drawing_type:\"oval\",x:A,y:c,rX:h/2,rY:g/2,layer:\"drill\"}]}else if(t.shape===\"pill\"){const{x:A,y:c,outer_height:l,outer_width:u,hole_height:g,hole_width:h}=t;return[{_pcb_drawing_object_id:`pill_${Pd++}`,pcb_drawing_type:\"pill\",x:A,y:c,w:u,h:l,layer:\"top\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,ccw_rotation:t.ccw_rotation},{_pcb_drawing_object_id:`pill_${Pd++}`,_element:t,pcb_drawing_type:\"pill\",x:A,y:c,w:h,h:g,layer:\"drill\",ccw_rotation:t.ccw_rotation}]}else if(t.shape===\"circular_hole_with_rect_pad\"){const{x:A,y:c,hole_diameter:l,rect_pad_width:u,rect_pad_height:g,rect_border_radius:h,hole_offset_x:d,hole_offset_y:p}=t,m=lt.parse(d??0),_=lt.parse(p??0);return[{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:\"rect\",x:A,y:c,w:u,h:g,layer:\"top\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:h},{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:\"rect\",x:A,y:c,w:u,h:g,layer:\"bottom\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:h,is_hoverable:!1},{_pcb_drawing_object_id:`circle_${Pd++}`,_element:t,pcb_drawing_type:\"circle\",x:A+m,y:c+_,r:l/2,layer:\"drill\",is_hoverable:!1}]}else if(t.shape===\"pill_hole_with_rect_pad\"){const{x:A,y:c,hole_width:l,hole_height:u,rect_pad_width:g,rect_pad_height:h,rect_border_radius:d}=t;return[{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:\"rect\",x:A,y:c,w:g,h,layer:\"top\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:d},{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:\"rect\",x:A,y:c,w:g,h,layer:\"bottom\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,roundness:d,is_hoverable:!1},{_pcb_drawing_object_id:`pill_${Pd++}`,_element:t,pcb_drawing_type:\"pill\",x:A,y:c,w:l,h:u,layer:\"drill\",is_hoverable:!1}]}else if(t.shape===\"rotated_pill_hole_with_rect_pad\"){const{x:A,y:c,hole_width:l,hole_height:u,hole_ccw_rotation:g,rect_pad_width:h,rect_pad_height:d,rect_ccw_rotation:p,rect_border_radius:m}=t;return[{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:\"rect\",x:A,y:c,w:h,h:d,layer:\"top\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,ccw_rotation:p,roundness:m},{_pcb_drawing_object_id:`rect_${Pd++}`,pcb_drawing_type:\"rect\",x:A,y:c,w:h,h:d,layer:\"bottom\",_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a,ccw_rotation:p,roundness:m,is_hoverable:!1},{_pcb_drawing_object_id:`pill_${Pd++}`,_element:t,pcb_drawing_type:\"pill\",x:A,y:c,w:l,h:u,layer:\"drill\",ccw_rotation:g,is_hoverable:!1}]}else if(t.shape===\"hole_with_polygon_pad\"){const{x:A,y:c,pad_outline:l,hole_shape:u,hole_diameter:g,hole_width:h,hole_height:d,layers:p,hole_offset_x:m,hole_offset_y:_}=t,f=lt.parse(m??0),I=lt.parse(_??0),C=l,y=[];if(C\u0026\u0026Array.isArray(C)){const B=f$e(C).map(S=\u003e({x:S.x+A,y:S.y+c}));for(const S of p||[\"top\",\"bottom\"])y.push({_pcb_drawing_object_id:`polygon_${Pd++}`,pcb_drawing_type:\"polygon\",points:B,layer:S,_element:t,_parent_pcb_component:i,_parent_source_component:r,_source_port:a})}const x={x:A+f,y:c+I},E=[];return u===\"circle\"?E.push({_pcb_drawing_object_id:`circle_${Pd++}`,pcb_drawing_type:\"circle\",x:x.x,y:x.y,r:(g??0)/2,layer:\"drill\",_element:t,_parent_pcb_component:i,_parent_source_component:r}):u===\"oval\"?E.push({_pcb_drawing_object_id:`oval_${Pd++}`,pcb_drawing_type:\"oval\",x:x.x,y:x.y,rX:(h??0)/2,rY:(d??0)/2,layer:\"drill\",_element:t,_parent_pcb_component:i,_parent_source_component:r}):(u===\"pill\"||u===\"rotated_pill\")\u0026\u0026E.push({_pcb_drawing_object_id:`pill_${Pd++}`,pcb_drawing_type:\"pill\",x:x.x,y:x.y,w:h??0,h:d??0,layer:\"drill\",_element:t,_parent_pcb_component:i,_parent_source_component:r,ccw_rotation:t.ccw_rotation}),[...y,...E]}else return[]}return[]};function CFi({primitivesWithoutInteractionMetadata:t,drawingObjectIdsWithMouseOver:e,primitiveIdsInMousedOverNet:n}){const o=[];for(const i of t){const r={...i},s=i._element,a=i._parent_pcb_component;i?.layer===\"drill\"?(r.is_in_highlighted_net=!1,r.is_mouse_over=!1):e.has(i._pcb_drawing_object_id)?r.is_mouse_over=!0:s\u0026\u0026(\"pcb_trace_id\"in s\u0026\u0026n.includes(s.pcb_trace_id)||\"pcb_port_id\"in s\u0026\u0026n.includes(s.pcb_port_id)||\"pcb_via_id\"in s\u0026\u0026n.includes(s.pcb_via_id)||\"pcb_component_id\"in s\u0026\u0026n.includes(s.pcb_component_id)||a\u0026\u0026\"pcb_component_id\"in a\u0026\u0026n.includes(a.pcb_component_id))?r.is_in_highlighted_net=!0:(r.is_in_highlighted_net=!1,r.is_mouse_over=!1),o.push(r)}return o}var ohn=t=\u003e{const e=new Map,n=new Map,o=new Map,i=new Map,r=new Map;for(const s of t)s.type===\"pcb_trace\"\u0026\u0026s.pcb_trace_id?e.set(s.pcb_trace_id,s):s.type===\"pcb_port\"\u0026\u0026s.pcb_port_id?n.set(s.pcb_port_id,s):s.type===\"pcb_via\"\u0026\u0026s.pcb_via_id?o.set(s.pcb_via_id,s):s.type===\"pcb_component\"\u0026\u0026s.pcb_component_id?i.set(s.pcb_component_id,s):s.type===\"pcb_board\"\u0026\u0026s.pcb_board_id\u0026\u0026r.set(s.pcb_board_id,s);return{tracesById:e,portsById:n,viasById:o,componentsById:i,boardsById:r}},I4=(t,e)=\u003ee?t?{minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}:e:t,UT=(t,e=.45)=\u003e({minX:t.x-e,maxX:t.x+e,minY:t.y-e,maxY:t.y+e}),yFi=t=\u003e{if(t.length===0)return null;let e=null;for(const n of t){const o=Math.max((n.width??.2)/2,.3);e=I4(e,UT(n,o))}return e},ihn=t=\u003e{if(!t?.center)return null;const e=Math.max(t.width??0,1.2),n=Math.max(t.height??0,1.2);return{minX:t.center.x-e/2,maxX:t.center.x+e/2,minY:t.center.y-n/2,maxY:t.center.y+n/2}},xFi=t=\u003e!t?.center||typeof t.width!=\"number\"||typeof t.height!=\"number\"?null:{minX:t.center.x-t.width/2,maxX:t.center.x+t.width/2,minY:t.center.y-t.height/2,maxY:t.center.y+t.height/2},EFi=(t,e)=\u003e({minX:t.minX-e,maxX:t.maxX+e,minY:t.minY-e,maxY:t.maxY+e}),BFi=(t,e=.35)=\u003e{const n=Oh(t);return n?EFi(n,e):null},rhn=({error:t,tracesById:e,portsById:n,viasById:o,componentsById:i})=\u003e{if(t.center)return t.center;if(t.pcb_center)return t.pcb_center;if(t.component_center)return t.component_center;if(t.pcb_via_ids?.length){const r=t.pcb_via_ids.map(s=\u003eo.get(s)).filter(Boolean);if(r.length\u003e0)return{x:r.reduce((s,a)=\u003es+a.x,0)/r.length,y:r.reduce((s,a)=\u003es+a.y,0)/r.length}}if(t.pcb_port_ids?.length){const r=t.pcb_port_ids.map(s=\u003en.get(s)).filter(Boolean);if(r.length\u003e0)return{x:r.reduce((s,a)=\u003es+a.x,0)/r.length,y:r.reduce((s,a)=\u003es+a.y,0)/r.length}}if(t.pcb_trace_id){const r=e.get(t.pcb_trace_id);if(r?.route?.length){const s=Math.floor(r.route.length/2);return{x:r.route[s].x,y:r.route[s].y}}}return t.pcb_component_id?i.get(t.pcb_component_id)?.center??null:null},bFi=({error:t,indexes:e})=\u003erhn({error:t,...e}),SFi=({error:t,boardsById:e})=\u003e{if(!t.component_bounds||!t.pcb_board_id)return null;const n=xFi(e.get(t.pcb_board_id));if(!n)return null;const o=t.component_bounds,i=[];return o.min_x\u003cn.minX\u0026\u0026(i.push({x:n.minX,y:Math.max(o.min_y,n.minY)}),i.push({x:n.minX,y:Math.min(o.max_y,n.maxY)})),o.max_x\u003en.maxX\u0026\u0026(i.push({x:n.maxX,y:Math.max(o.min_y,n.minY)}),i.push({x:n.maxX,y:Math.min(o.max_y,n.maxY)})),o.min_y\u003cn.minY\u0026\u0026(i.push({x:Math.max(o.min_x,n.minX),y:n.minY}),i.push({x:Math.min(o.max_x,n.maxX),y:n.minY})),o.max_y\u003en.maxY\u0026\u0026(i.push({x:Math.max(o.min_x,n.minX),y:n.maxY}),i.push({x:Math.min(o.max_x,n.maxX),y:n.maxY})),BFi(i,.3)},shn=new Set([\"source_failed_to_create_component_error\"]),QFi=({error:t,indexes:e})=\u003e{if(shn.has(t.error_type)||shn.has(t.type))return null;let n=null;const o=rhn({error:t,...e});if(o\u0026\u0026(n=I4(n,UT(o,.35))),t.error_type===\"pcb_component_outside_board_error\"?n=I4(n,SFi({error:t,boardsById:e.boardsById})):t.component_bounds\u0026\u0026!o\u0026\u0026(n=I4(n,{minX:t.component_bounds.min_x,maxX:t.component_bounds.max_x,minY:t.component_bounds.min_y,maxY:t.component_bounds.max_y})),t.center\u0026\u0026!o\u0026\u0026(n=I4(n,UT(t.center))),t.pcb_center\u0026\u0026!o\u0026\u0026(n=I4(n,UT(t.pcb_center))),t.component_center\u0026\u0026!o\u0026\u0026(n=I4(n,UT(t.component_center))),t.pcb_port_ids\u0026\u0026!o)for(const i of t.pcb_port_ids){const r=e.portsById.get(i);r\u0026\u0026(n=I4(n,UT({x:r.x,y:r.y},.4)))}if(t.pcb_trace_id\u0026\u0026!o){const i=e.tracesById.get(t.pcb_trace_id);i?.route\u0026\u0026(n=I4(n,yFi(i.route)))}if(t.pcb_via_ids)for(const i of t.pcb_via_ids){const r=e.viasById.get(i);r\u0026\u0026(n=I4(n,UT({x:r.x,y:r.y},Math.max((r.outer_diameter??.5)/2,.28))))}if(t.pcb_component_id\u0026\u0026!o\u0026\u0026(n=I4(n,ihn(e.componentsById.get(t.pcb_component_id)))),t.pcb_component_ids\u0026\u0026!o)for(const i of t.pcb_component_ids)n=I4(n,ihn(e.componentsById.get(i)));return n},vFi=({bounds:t,width:e,height:n})=\u003e{const o={x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2},i=Math.max(t.maxX-t.minX,.8)+1.4,r=Math.max(t.maxY-t.minY,.8)+1.4,s=Math.min(e/i,n/r,240)*.92;return NC(Qd(e/2,n/2),vS(s,-s,0,0),Qd(-o.x,-o.y))},wFi=t=\u003e{const e=new Set;t.pcb_trace_id\u0026\u0026e.add(t.pcb_trace_id);for(const n of t.pcb_port_ids??[])e.add(n);for(const n of t.pcb_via_ids??[])e.add(n);t.pcb_component_id\u0026\u0026e.add(t.pcb_component_id);for(const n of t.pcb_component_ids??[])e.add(n);return[...e]},JU=(t,e)=\u003e{const n=[\"pcb_trace_error_id\",\"pcb_via_clearance_error_id\",\"pcb_component_outside_board_error_id\",\"source_failed_to_create_component_error_id\",\"pcb_error_id\"];for(const o of n)if(typeof t?.[o]==\"string\"\u0026\u0026t[o].length\u003e0)return t[o];for(const[o,i]of Object.entries(t??{}))if(o.endsWith(\"_error_id\")\u0026\u0026typeof i==\"string\"\u0026\u0026i.length\u003e0)return i;return`error_${e}_${t?.error_type}_${t?.message?.slice(0,20)}`},ahn=(t,e)=\u003ee?t.find((n,o)=\u003en.type?.includes(\"error\")?JU(n,o)===e:!1)??null:null,PFi=t=\u003e1-(1-t)**3,MFi=(t,e,n)=\u003e({a:t.a+(e.a-t.a)*n,b:t.b+(e.b-t.b)*n,c:t.c+(e.c-t.c)*n,d:t.d+(e.d-t.d)*n,e:t.e+(e.e-t.e)*n,f:t.f+(e.f-t.f)*n}),Ahn=t=\u003e{t!==null\u0026\u0026window.cancelAnimationFrame(t)},DFi=({startTransform:t,endTransform:e,durationMs:n,onUpdate:o,setAnimationFrameId:i,onComplete:r})=\u003e{const s=performance.now(),a=c=\u003e{const l=c-s,u=Math.min(1,l/n),g=PFi(u);if(o(MFi(t,e,g)),u\u003c1){i(window.requestAnimationFrame(a));return}i(null),r?.()},A=window.requestAnimationFrame(a);return i(A),A},afe=t=\u003et?.trim()||null;function I$e({primitiveElement:t,elements:e}){const n=t.source_trace_id;if(!n)return null;const o=wS(e),i=o.source_trace.get(n),r=afe(i?.name);if(r)return r;const s=o.source_net.get(n),a=afe(s?.name);if(a)return a;for(const A of i?.connected_source_net_ids??[]){const c=afe(o.source_net.get(A)?.name);if(c)return c}return null}function chn({primitiveElement:t,elements:e}){const n=wS(e).source_trace.get(t?.source_trace_id),o=t.trace_length,i=typeof o==\"number\",r=n?.max_length,s=i?`${o.toFixed(3)}${typeof r==\"number\"?` / ${r}`:\"\"} mm`:\"\",a=I$e({primitiveElement:t,elements:e})??afe(n?.display_name);if(!s\u0026\u0026!a)return null;const A=!!(i\u0026\u0026typeof r==\"number\"\u0026\u0026o\u003er);return{text:s,name:a,isOverLength:A}}function gee(t,e){if(!t)return;const n=[];for(const o of[`${t.type}_id`,\"pcb_port_id\",\"pcb_trace_id\",\"source_trace_id\",\"source_net_id\"]){const i=t[o];typeof i==\"string\"\u0026\u0026n.push(i)}for(const o of n){const i=e.getNetConnectedToId(o);if(i)return i}}function lhn(t){return t\u0026\u0026[\"pcb_trace\",\"pcb_smtpad\",\"pcb_plated_hole\",\"pcb_via\"].includes(t.type)}function NFi(t,e,n){const o=t.type===\"pcb_trace\"?I$e({primitiveElement:t,elements:e}):null;if(o)return o;const i=gee(t,n),r=i?e.filter(s=\u003egee(s,n)===i):[];for(const s of[\"source_net\",\"source_trace\"])for(const a of r)if(a.type===s\u0026\u0026\"name\"in a\u0026\u0026typeof a.name==\"string\"\u0026\u0026a.name.trim())return a.name.trim();if(t.type===\"pcb_trace\"){const s=chn({primitiveElement:t,elements:e})?.name;if(s)return s}for(const s of r)if(s.type===\"source_trace\"\u0026\u0026s.display_name?.trim())return s.display_name.trim();return\"Net\"}function RFi(t,e,n){return e.flatMap(o=\u003e{if(o.type!==\"source_bus\")return[];const i=[...new Set(o.source_trace_ids.flatMap(r=\u003e{const s=n.getNetConnectedToId(r);return s?[s]:[]}))];return i.includes(t)?[{id:o.source_bus_id,name:o.name?.trim()||\"Bus\",netIds:i}]:[]})}var TFi=async()=\u003e{const{default:t}=await Promise.resolve().then(()=\u003e(XRi(),Xgn));return new t};function kFi(t){const{elements:e,primitives:n,transform:o,width:i=500,height:r=500}=t,s=ee.useRef(null),a=ee.useRef(void 0),A=ee.useRef(!1),[c,l]=ee.useState(null),[u,g]=ee.useState(),h=Kc(w=\u003ew.selected_layer),d=Kc(w=\u003ew.hidden_layer_opacity),p=Kc(w=\u003ew.is_showing_copper_pours),m=Kc(w=\u003ew.is_showing_solder_mask),_=Kc(w=\u003ew.is_showing_silkscreen),f=Kc(w=\u003ew.is_showing_fabrication_notes),I=Kc(w=\u003ew.is_showing_pcb_notes),C=Kc(w=\u003ew.is_showing_courtyards),y=ee.useMemo(()=\u003e[...new Set(n.flatMap(w=\u003e{if(!w.is_mouse_over\u0026\u0026!w.is_in_highlighted_net)return[];const M=w._element,k=M?.[`${M.type}_id`];return k?[k]:[]}))],[n]),x=ee.useMemo(()=\u003e(t.xRayElements??[]).map(w=\u003ew[`${w.type}_id`]),[t.xRayElements]),E=ee.useMemo(()=\u003e({selectedLayer:h,hiddenLayerOpacity:d,showCopperPours:p,showSolderMask:m,showSilkscreen:_,showFabricationNotes:f,showPcbNotes:I,showCourtyards:C,highlightedElementIds:y,xRayElementIds:x}),[h,d,p,m,_,f,I,C,y,x]),B=ee.useRef(e),S=ee.useRef(void 0);if(B.current=e,o){const w=typeof window\u003e\"u\"?1:window.devicePixelRatio||1;S.current={type:\"view\",width:Math.max(1,Math.round(i*w)),height:Math.max(1,Math.round(r*w)),transform:{a:o.a*w,b:o.b*w,c:o.c*w,d:o.d*w,e:o.e*w,f:o.f*w},options:E}}ee.useEffect(()=\u003e{let w=!1,M=!1,k;const R=document.createElement(\"canvas\");R.className=\"pcb-webgpu-canvas\",R.style.cssText=\"position:absolute;inset:0;width:100%;height:100%;pointer-events:none\",s.current?.append(R);const F=U=\u003e{w||M||(M=!0,clearTimeout(O),R.remove(),A.current=!1,k?.terminate(),k=void 0,a.current=void 0,s.current\u0026\u0026(s.current.dataset.xRayNetActive=\"false\"),g(U))},O=setTimeout(()=\u003eF(\"WebGPU worker startup timed out\"),15e3);return(async()=\u003e{try{if(!navigator.gpu||typeof Worker\u003e\"u\"||!R.transferControlToOffscreen)throw new Error(\"WebGPU workers are unavailable\");if(k=await TFi(),w||M){k.terminate();return}a.current=k,k.onmessage=({data:Y})=\u003e{w||M||(Y.type===\"rendered\"?s.current\u0026\u0026(s.current.dataset.xRayNetActive=String(Y.xRayActive)):Y.type===\"error\"?F(Y.message):Y.type===\"ready\"\u0026\u0026(clearTimeout(O),l(Y.supportsXRayNet),A.current=!0,k.postMessage({type:\"scene\",elements:B.current}),S.current\u0026\u0026k.postMessage(S.current)))},k.onerror=Y=\u003e{Y.preventDefault(),F(Y.message||\"WebGPU worker failed\")},k.addEventListener(\"messageerror\",()=\u003e{F(\"WebGPU worker communication failed\")});const U=R.transferControlToOffscreen();k.postMessage({type:\"init\",canvas:U},[U])}catch(U){F(String(U))}})(),()=\u003e{w=!0,clearTimeout(O),A.current=!1,a.current=void 0,k?.terminate(),R.remove()}},[]),ee.useEffect(()=\u003e{A.current\u0026\u0026a.current?.postMessage({type:\"scene\",elements:e})},[e]),ee.useEffect(()=\u003e{A.current\u0026\u0026S.current\u0026\u0026a.current?.postMessage(S.current)},[o,i,r,E]);const Q=!!(t.xRayElements\u0026\u0026c===!1);return K.jsx(\"div\",{ref:s,\"data-pcb-renderer\":\"webgpu\",\"data-webgpu-error\":u,style:{width:i,height:r,background:\"black\",position:\"relative\",overflow:\"hidden\"},children:u?K.jsxs(\"div\",{role:\"alert\",style:{padding:16,color:\"white\",position:\"relative\"},children:[K.jsx(\"strong\",{children:\"WebGPU rendering failed\"}),K.jsx(\"div\",{children:u})]}):K.jsxs(K.Fragment,{children:[K.jsx(FT.SuperGrid,{textColor:\"rgba(0,255,0,0.8)\",majorColor:\"rgba(0,255,0,0.4)\",minorColor:\"rgba(0,255,0,0.2)\",screenSpaceCellSize:200,width:i,height:r,transform:o,stringifyCoord:(w,M,k)=\u003e`${FT.toMMSI(w,k)}, ${FT.toMMSI(M,k)}`}),Q\u0026\u0026K.jsx(\"div\",{role:\"status\",style:{padding:16,color:\"white\",position:\"relative\"},children:\"X-Ray is unavailable in this WebGPU renderer.\"})]})})}var qi={board:{anchor:\"rgb(255, 38, 226)\",aux_items:\"rgb(255, 255, 255)\",b_adhes:\"rgb(0, 0, 132)\",b_crtyd:\"rgb(38, 233, 255)\",b_fab:\"rgb(88, 93, 132)\",b_mask:\"rgba(2, 255, 238, 0.400)\",b_paste:\"rgb(0, 194, 194)\",b_silks:\"rgb(242, 237, 161)\",background:\"rgb(0, 16, 35)\",cmts_user:\"rgb(89, 148, 220)\",copper:{b:\"rgb(77, 127, 196)\",f:\"rgb(200, 52, 52)\",in1:\"rgb(127, 200, 127)\",in10:\"rgb(237, 124, 51)\",in11:\"rgb(91, 195, 235)\",in12:\"rgb(247, 111, 142)\",in13:\"rgb(167, 165, 198)\",in14:\"rgb(40, 204, 217)\",in15:\"rgb(232, 178, 167)\",in16:\"rgb(242, 237, 161)\",in17:\"rgb(237, 124, 51)\",in18:\"rgb(91, 195, 235)\",in19:\"rgb(247, 111, 142)\",in2:\"rgb(206, 125, 44)\",in20:\"rgb(167, 165, 198)\",in21:\"rgb(40, 204, 217)\",in22:\"rgb(232, 178, 167)\",in23:\"rgb(242, 237, 161)\",in24:\"rgb(237, 124, 51)\",in25:\"rgb(91, 195, 235)\",in26:\"rgb(247, 111, 142)\",in27:\"rgb(167, 165, 198)\",in28:\"rgb(40, 204, 217)\",in29:\"rgb(232, 178, 167)\",in3:\"rgb(79, 203, 203)\",in30:\"rgb(242, 237, 161)\",in4:\"rgb(219, 98, 139)\",in5:\"rgb(167, 165, 198)\",in6:\"rgb(40, 204, 217)\",in7:\"rgb(232, 178, 167)\",in8:\"rgb(242, 237, 161)\",in9:\"rgb(141, 203, 129)\"},cursor:\"rgb(255, 255, 255)\",drc:\"rgb(194, 194, 194)\",drc_error:\"rgba(215, 91, 107, 0.800)\",drc_exclusion:\"rgb(255, 255, 255)\",drc_warning:\"rgba(255, 208, 66, 0.902)\",dwgs_user:\"rgb(194, 194, 194)\",eco1_user:\"rgb(180, 219, 210)\",eco2_user:\"rgb(216, 200, 82)\",edge_cuts:\"rgb(208, 210, 205)\",f_adhes:\"rgb(132, 0, 132)\",f_crtyd:\"rgb(255, 0, 245)\",f_fab:\"rgb(175, 175, 175)\",f_mask:\"rgba(216, 100, 255, 0.400)\",f_paste:\"rgba(180, 160, 154, 0.902)\",f_silks:\"rgb(242, 237, 161)\",footprint_text_back:\"rgb(0, 0, 132)\",footprint_text_front:\"rgb(194, 194, 194)\",footprint_text_invisible:\"rgb(132, 132, 132)\",grid:\"rgb(132, 132, 132)\",grid_axes:\"rgb(194, 194, 194)\",margin:\"rgb(255, 38, 226)\",microvia:\"rgb(0, 132, 132)\",no_connect:\"rgb(0, 0, 132)\",pad_back:\"rgb(77, 127, 196)\",pad_front:\"rgb(200, 52, 52)\",pad_plated_hole:\"rgb(194, 194, 0)\",pad_through_hole:\"rgb(227, 183, 46)\",plated_hole:\"rgb(26, 196, 210)\",ratsnest:\"rgba(245, 255, 213, 0.702)\",select_overlay:\"rgb(4, 255, 67)\",soldermaskWithCopper:{top:\"rgb(18, 82, 50)\",bottom:\"rgb(77, 127, 196)\"},soldermask:{top:\"rgb(12, 55, 33)\",bottom:\"rgb(12, 55, 33)\"},through_via:\"rgb(236, 236, 236)\",user_1:\"rgb(194, 194, 194)\",user_2:\"rgb(89, 148, 220)\",user_3:\"rgb(180, 219, 210)\",user_4:\"rgb(216, 200, 82)\",user_5:\"rgb(194, 194, 194)\",user_6:\"rgb(89, 148, 220)\",user_7:\"rgb(180, 219, 210)\",user_8:\"rgb(216, 200, 82)\",user_9:\"rgb(232, 178, 167)\",via_blind_buried:\"rgb(187, 151, 38)\",via_hole:\"rgb(227, 183, 46)\",via_micro:\"rgb(0, 132, 132)\",via_through:\"rgb(236, 236, 236)\",worksheet:\"rgb(200, 114, 171)\"}},Zx=(t,e=1)=\u003e{if(Math.abs(t.a)!==Math.abs(t.d))throw new Error(\"Cannot scale non-uniformly\");return e*Math.abs(t.a)},Ru={elementOverlay:40,dimensionOverlay:40,errorOverlay:40,pcbGroupOverlay:35,ratsNestOverlay:30,toolbarOverlay:70,warnings:30,topLayer:30,clickToInteractOverlay:100},dee={red:\"red\",black:\"black\",green:\"green\",board:\"rgb(255, 255, 255)\",other:\"#eee\",top:qi.board.copper.f,inner1:qi.board.copper.in1,inner2:qi.board.copper.in2,inner3:qi.board.copper.in3,inner4:qi.board.copper.in4,inner5:qi.board.copper.in5,inner6:qi.board.copper.in6,inner7:qi.board.copper.in7,inner8:qi.board.copper.in8,bottom:qi.board.copper.b,drill:qi.board.anchor,keepout:qi.board.background,tkeepout:qi.board.b_crtyd,tplace:qi.board.b_silks,top_courtyard:qi.board.f_crtyd,bottom_courtyard:qi.board.b_crtyd,top_silkscreen:qi.board.f_silks,bottom_silkscreen:qi.board.b_silks,top_fabrication:qi.board.f_fab,bottom_fabrication:qi.board.b_fab,soldermask_top:qi.board.soldermask.top,soldermask_bottom:qi.board.soldermask.bottom,soldermask_with_copper_top:qi.board.soldermaskWithCopper.top,soldermask_with_copper_bottom:qi.board.soldermaskWithCopper.bottom,bottom_notes:qi.board.user_2,top_notes:qi.board.user_2,...qi.board},FFi=[\"board\",\"bottom\",\"soldermask_bottom\",\"bottom_silkscreen\",\"top\",\"soldermask_top\",\"bottom_courtyard\",\"bottom_fabrication\",\"top_courtyard\",\"top_fabrication\",\"edge_cuts\",\"top_silkscreen\"],LFi=class{canvasLayerMap;ctxLayerMap;aperture;transform;foregroundLayer=\"top\";hiddenLayerOpacity=.2;xRayNetActive=!1;lastPoint;constructor(t){this.canvasLayerMap=t,this.ctxLayerMap=Object.fromEntries(Object.entries(t).map(([e,n])=\u003e[e,n.getContext(\"2d\")])),this.transform=RP(),this.transform.d*=-1,this.transform=NC(this.transform,Qd(0,-500)),this.lastPoint={x:0,y:0},this.equip({})}clear(){for(const t of Object.values(this.ctxLayerMap))t.clearRect(0,0,t.canvas.width,t.canvas.height)}equip(t){this.aperture={fontSize:0,shape:\"circle\",mode:\"add\",size:0,color:\"red\",layer:\"top\",opacity:this.foregroundLayer===t.color?1:.5,...t}}drawMeshPattern(t,e,n,o,i,r=45){const s=this.getLayerCtx(),[a,A]=_i(this.transform,[t,e]),[c,l]=_i(this.transform,[t+n,e+o]),u=Zx(this.transform,i);s.lineWidth=1,s.strokeStyle=this.aperture.color;const g=h=\u003e{const d=Math.sin(h),p=Math.cos(h),m=Math.sqrt((c-a)**2+(l-A)**2);for(let _=-m;_\u003c=m;_+=u)s.beginPath(),s.moveTo(a+_*p-m*d,A+_*d+m*p),s.lineTo(a+_*p+m*d,A+_*d-m*p),s.stroke()};g(r*Math.PI/180),g((r+90)*Math.PI/180)}rect({x:t,y:e,w:n,h:o,mesh_fill:i,is_filled:r=!0,has_stroke:s,is_stroke_dashed:a,stroke_width:A,roundness:c}){const[l,u]=_i(this.transform,[t-n/2,e-o/2]),[g,h]=_i(this.transform,[t+n/2,e+o/2]);this.applyAperture();const d=this.getLayerCtx(),p=c?Zx(this.transform,c):0,m=s===void 0?r===!1:s;if(i)d.save(),d.beginPath(),p\u003e0\u0026\u0026d.roundRect?d.roundRect(l,u,g-l,h-u,p):d.rect(l,u,g-l,h-u),d.clip(),this.drawMeshPattern(t-n/2,e-o/2,n,o,.15),d.restore(),p\u003e0\u0026\u0026d.roundRect?(d.beginPath(),d.roundRect(l,u,g-l,h-u,p),d.stroke()):d.strokeRect(l,u,g-l,h-u);else if(r!==!1\u0026\u0026(p\u003e0\u0026\u0026d.roundRect?(d.beginPath(),d.roundRect(l,u,g-l,h-u,p),d.fill()):d.fillRect(l,u,g-l,h-u)),m){const _=d.lineWidth;if(A!==void 0\u0026\u0026(d.lineWidth=Zx(this.transform,A)),a){let f=[];const I=Math.abs(this.transform.a);if(I\u003e0){const y=.1*I,x=y*1.3;y\u003e.5\u0026\u0026(f=[y,x])}d.setLineDash(f)}p\u003e0\u0026\u0026d.roundRect?(d.beginPath(),d.roundRect(l,u,g-l,h-u,p),d.stroke()):d.strokeRect(l,u,g-l,h-u),a\u0026\u0026d.setLineDash([]),A!==void 0\u0026\u0026(d.lineWidth=_)}}rotatedRect(t,e,n,o,i,r,s){const a=this.getLayerCtx();this.applyAperture();const[A,c]=_i(this.transform,[t-n/2,e-o/2]),[l,u]=_i(this.transform,[t+n/2,e+o/2]),g=r?Zx(this.transform,r):0;a.save();const[h,d]=_i(this.transform,[t,e]);a.translate(h,d);const p=360-i;i\u0026\u0026a.rotate(p*Math.PI/180),a.translate(-h,-d),s?(a.beginPath(),g\u003e0\u0026\u0026a.roundRect?a.roundRect(A,c,l-A,u-c,g):a.rect(A,c,l-A,u-c),a.clip(),this.drawMeshPattern(t-n/2,e-o/2,n,o,.15),g\u003e0\u0026\u0026a.roundRect?(a.beginPath(),a.roundRect(A,c,l-A,u-c,g),a.stroke()):a.strokeRect(A,c,l-A,u-c)):g\u003e0\u0026\u0026a.roundRect?(a.beginPath(),a.roundRect(A,c,l-A,u-c,g),a.fill()):a.fillRect(A,c,l-A,u-c),a.restore()}rotatedPill(t,e,n,o,i){const r=this.getLayerCtx();this.applyAperture(),r.save();const[s,a]=_i(this.transform,[t,e]);r.translate(s,a);const A=360-i;i\u0026\u0026r.rotate(A*Math.PI/180),r.translate(-s,-a),this.pill(t,e,n,o),r.restore()}circle(t,e,n,o,i=!0){const r=Zx(this.transform,n),[s,a]=_i(this.transform,[t,e]);this.applyAperture();const A=this.getLayerCtx();o?(A.save(),A.beginPath(),A.arc(s,a,r,0,2*Math.PI),A.clip(),this.drawMeshPattern(t-n,e-n,n*2,n*2,.15),A.restore(),A.beginPath(),A.arc(s,a,r,0,2*Math.PI),A.stroke()):(A.beginPath(),A.arc(s,a,r,0,2*Math.PI),A.fill())}oval(t,e,n,o){const i=Zx(this.transform,n),r=Zx(this.transform,o),[s,a]=_i(this.transform,[t,e]);this.applyAperture();const A=this.getLayerCtx();A.beginPath(),A.ellipse(s,a,i,r,0,0,2*Math.PI),A.fill(),A.closePath()}pill(t,e,n,o){const[i,r]=_i(this.transform,[t-n/2,e+o/2]),s=Zx(this.transform,n),a=Zx(this.transform,o),A=Math.min(s,a)/2;this.applyAperture();const c=this.getLayerCtx();c.beginPath(),c.arc(i+A,r+A,A,Math.PI,Math.PI*1.5),c.arc(i+s-A,r+A,A,Math.PI*1.5,0),c.arc(i+s-A,r+a-A,A,0,Math.PI*.5),c.arc(i+A,r+a-A,A,Math.PI*.5,Math.PI),c.fill(),c.closePath()}polygon(t){if(t.length\u003c3)return;this.applyAperture();const e=this.getLayerCtx(),n=t.map(i=\u003e_i(this.transform,[i.x,i.y]));e.beginPath(),e.moveTo(n[0][0],n[0][1]);for(let i=1;i\u003cn.length;i++)e.lineTo(n[i][0],n[i][1]);e.closePath(),e.fill(\"evenodd\");const o=Zx(this.transform,this.aperture.size);o\u003e0\u0026\u0026(e.lineWidth=o,e.stroke())}debugText(t,e,n){const[o,i]=_i(this.transform,[e,n]);this.applyAperture();const r=this.getLayerCtx();r.font=\"10px sans-serif\",r.fillText(t,o,i)}getLayerCtx(){const t=this.ctxLayerMap[this.aperture.layer];if(!t)throw new Error(`No context for layer \"${this.aperture.layer}\"`);return t}getLayerOpacity(t){if(this.xRayNetActive)return/^(top|bottom|inner\\d+)$/.test(t)?this.hiddenLayerOpacity:0;const e=this.foregroundLayer,n=(e===\"top\"||e===\"bottom\")\u0026\u0026(t.startsWith(`${e}_`)||t.endsWith(`_${e}`)),o=[\"board\",\"drill\",\"edge_cuts\",\"other\"].includes(t);return t===e||n||o?1:this.hiddenLayerOpacity}orderAndFadeLayers(){const{canvasLayerMap:t,foregroundLayer:e}=this,o=[\"board\",...Object.keys(t).filter(u=\u003e/^inner\\d+$/.test(u)).sort((u,g)=\u003eNumber(g.slice(5))-Number(u.slice(5))),...FFi.filter(u=\u003eu!==\"board\")],i=e===\"top\"?\"soldermask_top\":e===\"bottom\"?\"soldermask_bottom\":void 0,r=e===\"top\"?\"top_silkscreen\":e===\"bottom\"?\"bottom_silkscreen\":void 0,s=e===\"top\"?\"top_notes\":e===\"bottom\"?\"bottom_notes\":void 0,a=e===\"top\"?\"top_fabrication\":e===\"bottom\"?\"bottom_fabrication\":void 0,A=e===\"top\"?\"top_courtyard\":e===\"bottom\"?\"bottom_courtyard\":void 0,c=[e,\"edge_cuts\",...i?[i]:[],...r?[r]:[],...s?[s]:[],...a?[a]:[],...A?[A]:[]],l=[...o.filter(u=\u003e!c.includes(u)),...e===\"drill\"?[]:[e],...i?[i]:[],\"edge_cuts\",...r?[r]:[],...s?[s]:[],...a?[a]:[],...A?[A]:[],\"drill\"];l.forEach((u,g)=\u003e{const h=t[u];h\u0026\u0026(h.style.zIndex=`${Ru.topLayer-(l.length-g)}`)});for(const[u,g]of Object.entries(t)){const h=this.getLayerOpacity(u);g.style.opacity=String(h),g.style.display=h===0?\"none\":\"\"}}applyAperture(){const{transform:t,aperture:e}=this;let{size:n,mode:o,color:i,fontSize:r,layer:s}=e;s in this.ctxLayerMap||(this.aperture.layer=\"other\");const a=this.getLayerCtx();if(!a)throw new Error(`No context for layer \"${this.foregroundLayer}\"`);if(i||(i=\"undefined\"),a.lineWidth=Zx(t,n),a.lineCap=\"round\",o===\"add\"){a.globalCompositeOperation=\"source-over\";let A=dee[i.toLowerCase()];if(!A)try{A=Ka(i).rgb().toString()}catch{console.warn(`Invalid color format: '${i}'`),A=\"white\"}a.fillStyle=A,a.strokeStyle=A}else a.globalCompositeOperation=\"destination-out\",a.fillStyle=\"rgba(0,0,0,1)\",a.strokeStyle=\"rgba(0,0,0,1)\";a.font=`${Zx(V6(t),r)}px sans-serif`}moveTo(t,e){this.lastPoint={x:t,y:e}}lineTo(t,e){const[n,o]=_i(this.transform,[t,e]),{size:i,shape:r,mode:s}=this.aperture,a=Zx(this.transform,i),{lastPoint:A}=this,c=_i(this.transform,A);this.applyAperture();const l=this.getLayerCtx();r===\"square\"\u0026\u0026l.fillRect(c.x-a/2,c.y-a/2,a,a),l.beginPath(),l.moveTo(c.x,c.y),l.lineTo(n,o),l.stroke(),l.closePath(),r===\"square\"\u0026\u0026l.fillRect(n-a/2,o-a/2,a,a),this.lastPoint={x:t,y:e}}polygonWithArcs(t){const e=this.getLayerCtx(),n=o=\u003e{if(o.vertices.length===0)return;const i=o.vertices[0],r=_i(this.transform,[i.x,i.y]);e.moveTo(r[0],r[1]);for(let s=0;s\u003co.vertices.length;s++){const a=o.vertices[s],A=o.vertices[(s+1)%o.vertices.length];if(a.bulge\u0026\u0026a.bulge!==0){const c=a.bulge,l=A.x-a.x,u=A.y-a.y,g=Math.sqrt(l*l+u*u);if(g\u003c1e-9){const M=_i(this.transform,[A.x,A.y]);e.lineTo(M[0],M[1]);continue}const h=4*Math.atan(c),d=Math.abs(g/(2*Math.sin(h/2))),p=(a.x+A.x)/2,m=(a.y+A.y)/2,_=l/g,I=-(u/g),C=_,y=Math.sqrt(Math.max(0,d*d-(g/2)**2)),x=p+y*I*Math.sign(c),E=m+y*C*Math.sign(c),B=Math.atan2(a.y-E,a.x-x);let S=Math.atan2(A.y-E,A.x-x);c\u003e0\u0026\u0026S\u003cB?S+=2*Math.PI:c\u003c0\u0026\u0026S\u003eB\u0026\u0026(S-=2*Math.PI);const Q=_i(this.transform,[x,E]),w=Zx(this.transform,d);e.arc(Q[0],Q[1],w,-B,-S,c\u003e0)}else{const c=_i(this.transform,[A.x,A.y]);e.lineTo(c[0],c[1])}}e.closePath()};if(e.beginPath(),n(t.outer_ring),t.inner_rings)for(const o of t.inner_rings)n(o);e.fill(\"evenodd\")}},HFi=(t=2)=\u003e{const e=Math.max(2,Math.min(10,Math.floor(t)));return[\"top\",...Array.from({length:e-2},(n,o)=\u003e`inner${o+1}`),\"bottom\"]},Afe=t=\u003e{const e=t.find(n=\u003en.type===\"pcb_board\");return HFi(e?.num_layers??2)},C$e=t=\u003e`${t}_copper`,uhn=t=\u003et.map(e=\u003ee.endsWith(\"_copper\")?e.slice(0,-7):e),OFi=t=\u003e[\"board\",\"bottom\",\"soldermask_bottom\",\"bottom_silkscreen\",\"top\",\"soldermask_top\",\"soldermask_with_copper_bottom\",\"soldermask_with_copper_top\",\"top_fabrication\",\"bottom_fabrication\",...Afe(t).filter(n=\u003en.startsWith(\"inner\")),\"drill\",\"edge_cuts\",\"bottom_notes\",\"top_notes\",\"top_silkscreen\",\"top_courtyard\",\"bottom_courtyard\",\"other\"],GFi=(t,e)=\u003e{const n=Afe(t).reverse();return[...n.filter(o=\u003eo!==e),...n.filter(o=\u003eo===e)]};function YFi(t){return t.type===\"pcb_copper_pour\"}function UFi({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=e.filter(YFi);if(i.length===0)return;const r=new xl(t);r.realToCanvasMat=o,r.drawElements(i,{layers:n})}var KFi={...i2,courtyard:{top:qi.board.f_crtyd,bottom:qi.board.b_crtyd}};function VFi(t){return t.type===\"pcb_courtyard_circle\"||t.type===\"pcb_courtyard_rect\"||t.type===\"pcb_courtyard_outline\"}function ghn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.configure({colorOverrides:KFi}),i.realToCanvasMat=o;const r=e.filter(VFi);i.drawElements(r,{layers:n})}var zFi={...i2,silkscreen:{top:qi.board.f_fab,bottom:qi.board.b_fab}};function JFi(t){return t.type.includes(\"pcb_fabrication_note\")}function dhn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.configure({colorOverrides:zFi}),i.realToCanvasMat=o;const r=e.filter(JFi);i.drawElements(r,{layers:n})}function WFi(t){return t.type===\"pcb_hole\"}function jFi({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermask:i}){const r=new xl(t);r.realToCanvasMat=o;const s=e.filter(WFi);r.drawElements(s,{layers:n,drawSoldermask:i})}function $Fi(t){return t.type===\"pcb_board\"}function hhn({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermask:i}){const r=new xl(t);r.realToCanvasMat=o;const s=e.filter($Fi);for(const a of s)r.drawElements([a],{layers:n,drawSoldermask:!1,drawBoardMaterial:i??!1,minBoardOutlineStrokePx:2})}function qFi(t){return t.type===\"pcb_copper_text\"}function XFi({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=e.filter(qFi);if(i.length===0)return;const r=new xl(t);r.realToCanvasMat=o,r.drawElements(i,{layers:n})}function ZFi(t){return t.type===\"pcb_cutout\"}function eLi({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.realToCanvasMat=o;const r=e.filter(ZFi);i.drawElements(r,{layers:n})}function tLi(t){return t.type===\"pcb_keepout\"}function nLi({elements:t,layer:e}){return t.filter(tLi).filter(n=\u003en.layers.includes(e))}function oLi(t){return Ka(dee[t]).lighten(.4).hex()}function iLi({canvas:t,elements:e,layer:n,realToCanvasMat:o}){const i=nLi({elements:e,layer:n});if(i.length===0)return;const r=new xl(t),s=oLi(n);r.configure({colorOverrides:{keepout:{top:s,bottom:s}}}),r.realToCanvasMat=o,r.drawElements(i,{layers:[C$e(n)]})}function rLi(t){return t.type.startsWith(\"pcb_note_\")}function phn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.realToCanvasMat=o;const r=e.filter(rLi);i.drawElements(r,{layers:n})}function sLi(t){return t.type===\"pcb_panel\"}function aLi({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermask:i}){const r=new xl(t);r.realToCanvasMat=o;const s=e.filter(sLi);for(const a of s)r.drawElements([a],{layers:n})}var ALi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()}};function cLi(t){return t.type===\"pcb_smtpad\"}function mhn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,drawSoldermask:r}){const s=new Set(uhn(n)),a=e.filter(cLi).filter(u=\u003es.has(u.layer));if(a.length===0)return;const A=new Set;if(i)for(const u of i)(u.is_mouse_over||u.is_in_highlighted_net)\u0026\u0026u._element?.type===\"pcb_smtpad\"\u0026\u0026A.add(u._element.pcb_smtpad_id);const c=a.filter(u=\u003eA.has(u.pcb_smtpad_id)),l=a.filter(u=\u003e!A.has(u.pcb_smtpad_id));if(l.length\u003e0){const u=new xl(t);u.realToCanvasMat=o,u.drawElements(l,{layers:n,drawSoldermask:r})}if(c.length\u003e0){const u=new xl(t);u.configure({colorOverrides:ALi}),u.realToCanvasMat=o,u.drawElements(c,{layers:n,drawSoldermask:r})}}var lLi={...i2,copper:Object.fromEntries(Object.entries(i2.copper).map(([t,e])=\u003e[t,Ka(e).lighten(.5).toString()]))};function uLi(t){return t.type===\"pcb_trace\"}var gLi=(t,e)=\u003e{const n=t.route.filter(r=\u003er.route_type===\"wire\"\u0026\u0026\"layer\"in r\u0026\u0026e.has(r.layer)?!0:r.route_type===\"via\"?e.has(r.from_layer)||e.has(r.to_layer):!1),o=n.filter(r=\u003er.route_type===\"wire\").length,i=n.some(r=\u003er.route_type===\"via\");return o\u003c2\u0026\u0026!i?null:{...t,route:n}},dLi=t=\u003e({...t,route:t.route.map(e=\u003e!(\"is_inside_copper_pour\"in e)||e.is_inside_copper_pour!==!0?e:{...e,is_inside_copper_pour:!1})}),hLi=(t,e)=\u003ee?t:t.filter(n=\u003en.type!==\"pcb_copper_pour\"),pLi=({primitives:t})=\u003e{const e=new Set;for(const n of t)(n.is_mouse_over||n.is_in_highlighted_net)\u0026\u0026n._element?.type===\"pcb_trace\"\u0026\u0026e.add(n._element.pcb_trace_id);return e};function _hn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,showCopperPours:r}){const s=new Set(uhn(n)),a=e.filter(uLi).map(g=\u003egLi(g,s)).filter(g=\u003eg!==null).map(g=\u003er?g:dLi(g));if(a.length===0)return;const A=pLi({primitives:i??[]}),c=[],l=[];for(const g of a)A.has(g.pcb_trace_id)?c.push(g):l.push(g);const u=hLi(e,r);if(l.length\u003e0){const g=new xl(t);g.realToCanvasMat=o,g.drawElements(l,{layers:n,clipContextElements:u})}if(c.length\u003e0){const g=new xl(t);g.configure({colorOverrides:lLi}),g.realToCanvasMat=o,g.drawElements(c,{layers:n,clipContextElements:u})}}var mLi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()}};function _Li(t){return t.type===\"pcb_plated_hole\"}function fhn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,drawSoldermask:r}){const s=e.filter(_Li);if(s.length===0)return;const a=new Set;if(i)for(const l of i)(l.is_mouse_over||l.is_in_highlighted_net)\u0026\u0026l._element?.type===\"pcb_plated_hole\"\u0026\u0026a.add(l._element.pcb_plated_hole_id);const A=s.filter(l=\u003ea.has(l.pcb_plated_hole_id)),c=s.filter(l=\u003e!a.has(l.pcb_plated_hole_id));if(c.length\u003e0){const l=new xl(t);l.realToCanvasMat=o,l.drawElements(c,{layers:n,drawSoldermask:r})}if(A.length\u003e0){const l=new xl(t);l.configure({colorOverrides:mLi}),l.realToCanvasMat=o,l.drawElements(A,{layers:n,drawSoldermask:r})}}function Ihn(t){const{lines:e,anchorPoint:n,ccwRotation:o}=t;if(!o)return e;const i=o*Math.PI/180,r=wNi(i),s=NC(Qd(n.x,n.y),r,Qd(-n.x,-n.y));return _i(s,n),e.map(a=\u003e({...a,x1:_i(s,{x:a.x1,y:a.y1}).x,y1:_i(s,{x:a.x1,y:a.y1}).y,x2:_i(s,{x:a.x2,y:a.y2}).x,y2:_i(s,{x:a.x2,y:a.y2}).y}))}var fLi=.6,Chn=.2,yhn=t=\u003e{const e=t.size*.7,n=e*fLi,o=e*Chn,i=e*Chn,r=t.text.split(/\\r?\\n/),s=t.text.length\u003e0\u0026\u0026e\u003e0,a=s?r.length:0,A=s?r.map(u=\u003eu.length===0?0:u.length*n+(u.length-1)*o):[],c=A.length\u003e0?Math.max(...A):0,l=a\u003e0?a*e+(a-1)*i:0;return{text_lines:r,line_count:a,line_widths:A,target_height:e,target_width_char:n,space_between_chars:o,space_between_lines:i,width:c,height:l}},xhn=t=\u003e{const e=yhn(t);return{width:e.width,height:e.height,lineHeight:e.target_height,lineSpacing:e.space_between_lines,lineCount:e.line_count}},Ehn=t=\u003e{const{text_lines:e,line_count:n,line_widths:o,target_height:i,target_width_char:r,space_between_chars:s,space_between_lines:a,width:A}=yhn(t);if(i\u003c=0||n===0)return[];const c=i/12,l=[];for(let u=0;u\u003cn;u++){const g=-u*(i+a),h=o[u],d=(A-h)/2;let p=t.x+d;for(let m=0;m\u003ce[u].length;m++){const _=e[u][m],f=Ov[_]??Ov[_.toUpperCase()];if(!f){p+=r+s;continue}for(const{x1:I,y1:C,x2:y,y2:x}of f)l.push({_pcb_drawing_object_id:i9(\"line\"),pcb_drawing_type:\"line\",x1:p+r*I,y1:t.y+g+i*C,x2:p+r*y,y2:t.y+g+i*x,width:c,layer:t.layer,unit:t.unit,color:t.color});p+=r+s}}return l};function X6(t){const n=t.color??dee[t.layer];let o=Ka(n);return t._element?.type===\"pcb_copper_pour\"\u0026\u0026(o=o.alpha(.7)),t.is_mouse_over||t.is_in_highlighted_net?o.lighten(.5).rgb().toString():o.rgb().toString()}var Bhn=(t,e)=\u003e{t.equip({size:e.zoomIndependent?e.width/t.transform.a:e.width,shape:e.squareCap?\"square\":\"circle\",color:X6(e),layer:e.layer}),t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2)},ILi=(t,e,n)=\u003e{switch(n){case\"top_left\":return{x:0,y:-e};case\"top_center\":return{x:-t/2,y:-e};case\"top_right\":return{x:-t,y:-e};case\"center_left\":return{x:0,y:-e/2};case\"center\":return{x:-t/2,y:-e/2};case\"center_right\":return{x:-t,y:-e/2};case\"bottom_left\":return{x:0,y:0};case\"bottom_center\":return{x:-t/2,y:0};case\"bottom_right\":return{x:-t,y:0};default:return{x:0,y:0}}},bhn=t=\u003et.layer===\"bottom_silkscreen\"||t.layer===\"bottom\"?t.is_mirrored!==!1:t.is_mirrored===!0,CLi=(t,e)=\u003e{t.equip({fontSize:e.size,color:X6(e),layer:e.layer});const{width:n,height:o}=xhn(e),i=ILi(n,o,e.align);e.x??=0,e.y??=0;const r={x:e.x,y:e.y};let s=Ehn({...e,x:e.x+i.x,y:e.y+i.y});if(bhn(e)\u0026\u0026(s=s.map(a=\u003e({...a,x1:2*e.x-a.x1,x2:2*e.x-a.x2}))),e.ccw_rotation){const a={lines:s,anchorPoint:r,ccwRotation:e.ccw_rotation};s=Ihn(a)}for(const a of s)Bhn(t,a)},yLi=(t,e)=\u003e{const{width:n,height:o,lineHeight:i}=xhn(e);e.x??=0,e.y??=0;const r=e.knockout_padding??{left:e.size*.5,right:e.size*.5,top:e.size*.3,bottom:e.size*.3},s=n+r.left+r.right,a=o+r.top+r.bottom,A=n/2,c=i-o/2,l=e.x-A,u=e.y-c,g={x:e.x,y:e.y},h={_pcb_drawing_object_id:`knockout_rect_${e._pcb_drawing_object_id}`,x:e.x,y:e.y,w:s,h:a,layer:e.layer,ccw_rotation:e.ccw_rotation};e.ccw_rotation?Qhn(t,h):Shn(t,h);let d=Ehn({...e,x:l,y:u});if(bhn(e)\u0026\u0026(d=d.map(p=\u003e({...p,x1:2*e.x-p.x1,x2:2*e.x-p.x2}))),e.ccw_rotation){const p={lines:d,anchorPoint:g,ccwRotation:e.ccw_rotation};d=Ihn(p)}for(const p of d)t.equip({size:p.width,shape:\"circle\",color:\"black\",layer:e.layer,mode:\"subtract\"}),t.moveTo(p.x1,p.y1),t.lineTo(p.x2,p.y2);t.equip({mode:\"add\"})},Shn=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer,size:e.stroke_width}),t.rect({x:e.x,y:e.y,w:e.w,h:e.h,mesh_fill:e.mesh_fill,is_filled:e.is_filled,has_stroke:e.has_stroke,is_stroke_dashed:e.is_stroke_dashed,stroke_width:e.stroke_width,roundness:e.roundness})},Qhn=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer}),t.rotatedRect(e.x,e.y,e.w,e.h,e.ccw_rotation,e.roundness,e.mesh_fill)},xLi=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer}),t.rotatedPill(e.x,e.y,e.w,e.h,e.ccw_rotation)},ELi=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer}),t.circle(e.x,e.y,e.r,e.mesh_fill)},BLi=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer}),t.oval(e.x,e.y,e.rX,e.rY)},bLi=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer}),t.pill(e.x,e.y,e.w,e.h)},SLi=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer}),t.polygon(e.points)},QLi=(t,e)=\u003e{t.equip({color:X6(e),layer:e.layer}),t.polygonWithArcs(e.brep_shape)},vLi=(t,e)=\u003e{switch(e.pcb_drawing_type){case\"line\":return Bhn(t,e);case\"text\":return e.is_knockout?yLi(t,e):CLi(t,e);case\"rect\":return e.ccw_rotation?Qhn(t,e):Shn(t,e);case\"circle\":return ELi(t,e);case\"oval\":return BLi(t,e);case\"pill\":return e.ccw_rotation?xLi(t,e):bLi(t,e);case\"polygon\":return SLi(t,e);case\"polygon_with_arcs\":return QLi(t,e)}},wLi=(t,e)=\u003e{for(const n of e)vLi(t,n)},PLi={...i2,silkscreen:{top:qi.board.f_silks,bottom:qi.board.b_silks}};function MLi(t){return t.type.includes(\"pcb_silkscreen\")}function vhn({canvas:t,elements:e,layers:n,realToCanvasMat:o}){const i=new xl(t);i.configure({colorOverrides:PLi}),i.realToCanvasMat=o;const r=e.filter(MLi);i.drawElements(r,{layers:n})}var DLi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()},soldermask:{...i2.soldermask,top:Ka(qi.board.soldermask.top).lighten(.35).toString(),bottom:Ka(qi.board.soldermask.bottom).lighten(.35).toString()}};function whn({canvas:t,elements:e,layers:n,realToCanvasMat:o,drawSoldermaskTop:i,drawSoldermaskBottom:r,primitives:s}){const a=new xl(t);a.realToCanvasMat=o;const A=e.filter(g=\u003eg.type===\"pcb_board\");if(a.drawElements(e,{layers:n,drawSoldermask:!0,drawSoldermaskTop:i,drawSoldermaskBottom:r,drawBoardMaterial:!1}),A.length\u003e1\u0026\u0026hhn({canvas:t,elements:A,layers:[],realToCanvasMat:o,drawSoldermask:!1}),!s)return;const c=new Set;for(const g of s){if(!(g.is_mouse_over||g.is_in_highlighted_net))continue;const h=g._element;h?.type===\"pcb_smtpad\"?c.add(h.pcb_smtpad_id):h?.type===\"pcb_plated_hole\"?c.add(h.pcb_plated_hole_id):h?.type===\"pcb_via\"\u0026\u0026c.add(h.pcb_via_id)}if(c.size===0)return;const l=e.filter(g=\u003eg.type===\"pcb_smtpad\"?c.has(g.pcb_smtpad_id):g.type===\"pcb_plated_hole\"?c.has(g.pcb_plated_hole_id):g.type===\"pcb_via\"?c.has(g.pcb_via_id):!1);if(l.length===0)return;const u=new xl(t);u.configure({colorOverrides:DLi}),u.realToCanvasMat=o,u.drawElements(l,{layers:n,clipContextElements:e,drawSoldermask:!0,drawSoldermaskTop:i,drawSoldermaskBottom:r,drawBoardMaterial:!1})}var NLi={...i2,copper:{...i2.copper,top:Ka(qi.board.pad_front).lighten(.5).toString(),bottom:Ka(qi.board.pad_back).lighten(.5).toString(),inner1:Ka(qi.board.copper.in1).lighten(.5).toString(),inner2:Ka(qi.board.copper.in2).lighten(.5).toString(),inner3:Ka(qi.board.copper.in3).lighten(.5).toString(),inner4:Ka(qi.board.copper.in4).lighten(.5).toString(),inner5:Ka(qi.board.copper.in5).lighten(.5).toString(),inner6:Ka(qi.board.copper.in6).lighten(.5).toString(),inner7:Ka(qi.board.copper.in7).lighten(.5).toString(),inner8:Ka(qi.board.copper.in8).lighten(.5).toString()}};function RLi(t){return t.type===\"pcb_via\"}function Phn({canvas:t,elements:e,layers:n,realToCanvasMat:o,primitives:i,drawSoldermask:r}){const s=e.filter(RLi).filter(l=\u003en.some(u=\u003eu.includes(\"copper\")));if(s.length===0)return;const a=new Set;if(i)for(const l of i)(l.is_mouse_over||l.is_in_highlighted_net)\u0026\u0026l._element?.type===\"pcb_via\"\u0026\u0026a.add(l._element.pcb_via_id);const A=s.filter(l=\u003ea.has(l.pcb_via_id)),c=s.filter(l=\u003e!a.has(l.pcb_via_id));if(c.length\u003e0){const l=new xl(t);l.realToCanvasMat=o,l.drawElements(c,{layers:n,drawSoldermask:r,drawSoldermaskTop:n.includes(\"top_copper\"),drawSoldermaskBottom:n.includes(\"bottom_copper\"),clipContextElements:e})}if(A.length\u003e0){const l=new xl(t);l.configure({colorOverrides:NLi}),l.realToCanvasMat=o,l.drawElements(A,{layers:n,drawSoldermask:r,drawSoldermaskTop:n.includes(\"top_copper\"),drawSoldermaskBottom:n.includes(\"bottom_copper\"),clipContextElements:e})}}var TLi=({primitives:t,isShowingSolderMask:e,isShowingSilkscreen:n,isShowingFabricationNotes:o})=\u003et.filter(i=\u003ee||!i.layer?.includes(\"soldermask\")).filter(i=\u003en||!i.layer?.includes(\"silkscreen\")).filter(i=\u003eo||!i.layer?.includes(\"fabrication\")).filter(i=\u003ei.layer!==\"board\").filter(i=\u003ei._element?.type!==\"pcb_smtpad\").filter(i=\u003ei._element?.type!==\"pcb_plated_hole\"||i.layer===\"drill\").filter(i=\u003ei._element?.type!==\"pcb_via\").filter(i=\u003ei._element?.type!==\"pcb_trace\").filter(i=\u003ei._element?.type!==\"pcb_copper_text\"),kLi=({primitives:t,elements:e,xRayElements:n,transform:o,grid:i,width:r=500,height:s=500})=\u003e{const a=ee.useRef(null),A=ee.useRef({}),c=Kc(_=\u003e_.hidden_layer_opacity),l=Kc(_=\u003e_.selected_layer),u=Kc(_=\u003e_.is_showing_copper_pours),g=Kc(_=\u003e_.is_showing_solder_mask),h=Kc(_=\u003e_.is_showing_fabrication_notes),d=Kc(_=\u003e_.is_showing_pcb_notes),p=Kc(_=\u003e_.is_showing_courtyards),m=Kc(_=\u003e_.is_showing_silkscreen);return ee.useEffect(()=\u003e{if(!A.current||Object.keys(A.current).length===0)return;const _=Object.fromEntries(Object.entries(A.current).filter(([x,E])=\u003e!!E));if(Object.keys(_).length===0)return;const f=new LFi(_);o\u0026\u0026(f.transform=o),f.clear(),f.foregroundLayer=l,f.hiddenLayerOpacity=c,f.xRayNetActive=!!n;const I=Object.fromEntries(Object.entries(_).filter(([x])=\u003ef.getLayerOpacity(x)\u003e0)),C=TLi({primitives:t,isShowingSolderMask:g,isShowingSilkscreen:m,isShowingFabricationNotes:h});if(wLi(f,C.filter(x=\u003ef.getLayerOpacity(x.layer??\"other\")\u003e0)),o){const x=Afe(e).map(Q=\u003e({canvas:I[Q],layer:Q,copperLayer:C$e(Q)}));for(const{canvas:Q,copperLayer:w}of x)Q\u0026\u0026_hn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,showCopperPours:u});for(const{canvas:Q,copperLayer:w}of x)Q\u0026\u0026XFi({canvas:Q,elements:e,layers:[w],realToCanvasMat:o});for(const{canvas:Q,copperLayer:w,layer:M}of x)Q\u0026\u0026fhn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,drawSoldermask:g\u0026\u0026(M===\"top\"||M===\"bottom\")});for(const{canvas:Q,copperLayer:w}of x)Q\u0026\u0026UFi({canvas:Q,elements:e,layers:[w],realToCanvasMat:o});for(const{canvas:Q,copperLayer:w}of x)Q\u0026\u0026mhn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,drawSoldermask:g});for(const{canvas:Q,copperLayer:w,layer:M}of x)Q\u0026\u0026Phn({canvas:Q,elements:e,layers:[w],realToCanvasMat:o,primitives:t,drawSoldermask:g\u0026\u0026(M===\"top\"||M===\"bottom\")});if(g){const Q=l===\"bottom\"?\"bottom\":\"top\",w=Q===\"top\",M=Q===\"bottom\",k=I.soldermask_top;k\u0026\u0026Q===\"top\"\u0026\u0026whn({canvas:k,elements:e,layers:[\"top_soldermask\"],realToCanvasMat:o,drawSoldermaskTop:w,drawSoldermaskBottom:M,primitives:t});const R=I.soldermask_bottom;R\u0026\u0026Q===\"bottom\"\u0026\u0026whn({canvas:R,elements:e,layers:[\"bottom_soldermask\"],realToCanvasMat:o,drawSoldermaskTop:w,drawSoldermaskBottom:M,primitives:t})}const E=I.drill;if(E\u0026\u0026jFi({canvas:E,elements:e,layers:[\"drill\"],realToCanvasMat:o}),m){const Q=I.top_silkscreen;Q\u0026\u0026vhn({canvas:Q,elements:e,layers:[\"top_silkscreen\"],realToCanvasMat:o});const w=I.bottom_silkscreen;w\u0026\u0026vhn({canvas:w,elements:e,layers:[\"bottom_silkscreen\"],realToCanvasMat:o})}if(h){const Q=I.top_fabrication;Q\u0026\u0026dhn({canvas:Q,elements:e,layers:[\"top_fabrication_note\"],realToCanvasMat:o});const w=I.bottom_fabrication;w\u0026\u0026dhn({canvas:w,elements:e,layers:[\"bottom_fabrication_note\"],realToCanvasMat:o})}if(d){const Q=I.bottom_notes;Q\u0026\u0026phn({canvas:Q,elements:e,layers:[\"bottom_user_note\"],realToCanvasMat:o});const w=I.top_notes;w\u0026\u0026phn({canvas:w,elements:e,layers:[\"top_user_note\"],realToCanvasMat:o})}if(p){const Q=I.top_courtyard;Q\u0026\u0026ghn({canvas:Q,elements:e,layers:[\"top_courtyard\"],realToCanvasMat:o});const w=I.bottom_courtyard;w\u0026\u0026ghn({canvas:w,elements:e,layers:[\"bottom_courtyard\"],realToCanvasMat:o})}const B=I.board;B\u0026\u0026(aLi({canvas:B,elements:e,layers:[],realToCanvasMat:o,drawSoldermask:g}),hhn({canvas:B,elements:e,layers:[],realToCanvasMat:o,drawSoldermask:g}));const S=I.edge_cuts;S\u0026\u0026eLi({canvas:S,elements:e,layers:[\"edge_cuts\"],realToCanvasMat:o});for(const{canvas:Q,layer:w}of x)Q\u0026\u0026iLi({canvas:Q,elements:e,layer:w,realToCanvasMat:o})}f.orderAndFadeLayers();const y=a.current;if(y\u0026\u0026o\u0026\u0026n){y.getContext(\"2d\").clearRect(0,0,r,s);for(const E of GFi(e,l)){const B={canvas:y,elements:n,layers:[C$e(E)],realToCanvasMat:o,drawSoldermask:!1};_hn({...B,showCopperPours:!1}),mhn(B),fhn(B),Phn(B)}const x=new xl(y);x.realToCanvasMat=o,x.drawElements(n.filter(E=\u003eE.type===\"pcb_via\"||E.type===\"pcb_plated_hole\"),{layers:[\"drill\"],drawSoldermask:!1})}},[t,e,n,r,s,o,l,c,u,g,h,d,p,m]),K.jsxs(\"div\",{style:{backgroundColor:\"black\",width:r,height:s,position:\"relative\"},children:[K.jsx(FT.SuperGrid,{textColor:\"rgba(0,255,0,0.8)\",majorColor:\"rgba(0,255,0,0.4)\",minorColor:\"rgba(0,255,0,0.2)\",screenSpaceCellSize:200,width:r,height:s,transform:o,stringifyCoord:(_,f,I)=\u003e`${FT.toMMSI(_,I)}, ${FT.toMMSI(f,I)}`}),n\u0026\u0026K.jsx(\"canvas\",{ref:a,className:\"pcb-x-ray-net\",width:r,height:s,style:{position:\"absolute\",left:0,top:0,zIndex:Ru.topLayer,pointerEvents:\"none\"}}),OFi(e).filter(_=\u003e!(!g\u0026\u0026_.includes(\"soldermask\")||!m\u0026\u0026_.includes(\"silkscreen\"))).map(_=\u003e_.replace(/-/g,\"\")).map((_,f)=\u003eK.jsx(\"canvas\",{className:`pcb-layer-${_}`,ref:I=\u003e{A.current??={},I?A.current[_]=I:delete A.current[_]},style:{position:\"absolute\",zIndex:f,left:0,top:0,pointerEvents:\"none\"},width:r,height:s},_))]})};new TextEncoder,(()=\u003e{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)\u0026t[0])})();var FLi=new Uint16Array([255]),LLi=new Uint8Array(FLi.buffer);LLi[0];var HLi=new Uint16Array([255]),OLi=new Uint8Array(HLi.buffer);OLi[0],new TextDecoder(\"latin1\");var YP=1e-9,cfe=(t,e,n)=\u003et\u003e=e-YP\u0026\u0026t\u003c=n+YP,GLi=t=\u003e{const e=[];for(const n of t)e.some(o=\u003eMath.abs(o.x-n.x)\u003cYP\u0026\u0026Math.abs(o.y-n.y)\u003cYP)||e.push(n);return e};function YLi(t,e){const{origin:n,directionVector:o}=t;if(Math.abs(o.x)\u003cYP\u0026\u0026Math.abs(o.y)\u003cYP)return null;const i=[];if(Math.abs(o.x)\u003e=YP){const c=(e.minX-n.x)/o.x,l=n.y+c*o.y;cfe(l,e.minY,e.maxY)\u0026\u0026i.push({x:e.minX,y:l});const u=(e.maxX-n.x)/o.x,g=n.y+u*o.y;cfe(g,e.minY,e.maxY)\u0026\u0026i.push({x:e.maxX,y:g})}if(Math.abs(o.y)\u003e=YP){const c=(e.minY-n.y)/o.y,l=n.x+c*o.x;cfe(l,e.minX,e.maxX)\u0026\u0026i.push({x:l,y:e.minY});const u=(e.maxY-n.y)/o.y,g=n.x+u*o.x;cfe(g,e.minX,e.maxX)\u0026\u0026i.push({x:g,y:e.maxY})}const r=GLi(i);if(r.length\u003c2)return null;let s=r[0],a=r[1],A=(s.x-a.x)**2+(s.y-a.y)**2;for(let c=0;c\u003cr.length;c++)for(let l=c+1;l\u003cr.length;l++){const u=r[c],g=r[l],h=(u.x-g.x)**2+(u.y-g.y)**2;h\u003eA\u0026\u0026(s=u,a=g,A=h)}return[s,a]}function ULi(t,e,n){const o=V6(t),i=[_i(o,{x:0,y:0}),_i(o,{x:e,y:0}),_i(o,{x:0,y:n}),_i(o,{x:e,y:n})];return{minX:Math.min(...i.map(r=\u003er.x)),maxX:Math.max(...i.map(r=\u003er.x)),minY:Math.min(...i.map(r=\u003er.y)),maxY:Math.max(...i.map(r=\u003er.y))}}var KLi=.6,VLi=1,Mhn=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),Dhn=t=\u003e(t.ccwRotationDegrees??0)*Math.PI/180,zLi=t=\u003et.a*t.d-t.b*t.c\u003c0?1:-1,JLi=(t,e)=\u003eDhn(t)*zLi(e),WLi=(t,e)=\u003e{const n=Math.cos(e),o=Math.sin(e);return{x:t.x*n-t.y*o,y:t.x*o+t.y*n}},jLi=t=\u003eNhn(t,Dhn(t)),$Li=(t,e)=\u003eNhn(t,JLi(t,e)),Nhn=(t,e)=\u003e{const n=t.width/2,o=t.height/2;return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(i=\u003e{const r=WLi(i,e);return{x:t.center.x+r.x,y:t.center.y+r.y}})},qLi=(t,e)=\u003e{const n=$Li(t,e).map(c=\u003e_i(e,c)),o=_i(e,t.center),i=Mhn(n[0],n[1]),r=Mhn(n[1],n[2]),s=n.length\u003e=2?Math.atan2(n[1].y-n[0].y,n[1].x-n[0].x):0,a=s*180/Math.PI,A=n.reduce((c,l)=\u003e({minX:Math.min(c.minX,l.x),maxX:Math.max(c.maxX,l.x),minY:Math.min(c.minY,l.y),maxY:Math.max(c.maxY,l.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0});return{center:o,corners:n,width:i,height:r,angleRadians:s,angleDegrees:a,bounds:A}},XLi=2,ZLi=12,eHi=12,lfe=t=\u003e({tip:{...t},base:{...t},leftWing:{...t},rightWing:{...t}}),Rhn=(t,e,n)=\u003e{const o=t.x-e.x,i=t.y-e.y,r=Math.hypot(o,i);if(r===0)return lfe(t);const s=o/r,A=-(i/r)*(n/2),c=s*(n/2);return{tip:{...t},base:{...e},leftWing:{x:e.x+A,y:e.y+c},rightWing:{x:e.x-A,y:e.y-c}}};function Thn(t){const{start:e,end:n}=t,o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i),s=XLi,a=ZLi;if(r===0){const f=t.doubleSided?[lfe(e),lfe(e)]:[lfe(e)];return{shaftStart:{...e},shaftEnd:{...e},heads:f,shaftWidth:s,headLength:0,headWidth:a,length:r}}const A=o/r,c=i/r,l=Math.min(eHi,r*.5),u=Math.max(l,s*2),g=t.doubleSided?r/2:r,h=Math.min(u,g),d={x:n.x-A*h,y:n.y-c*h},p=[Rhn(n,d,a)];let m={...e};const _={...d};if(t.doubleSided){const f={x:e.x+A*h,y:e.y+c*h};p.unshift(Rhn(e,f,a)),m=f}return{shaftStart:m,shaftEnd:_,heads:p,shaftWidth:s,headLength:h,headWidth:a,length:r}}function tHi(t){const e=Thn(t);return[e.shaftStart,e.shaftEnd,...e.heads.flatMap(o=\u003e[o.tip,o.base,o.leftWing,o.rightWing])].reduce((o,i)=\u003e({minX:Math.min(o.minX,i.x),maxX:Math.max(o.maxX,i.x),minY:Math.min(o.minY,i.y),maxY:Math.max(o.maxY,i.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function khn(t,e,{fontSize:n=12,strokeWidth:o=2,normalPadding:i=6,alongOffset:r=0}={}){const s={x:(t.x+e.x)/2,y:(t.y+e.y)/2},a=e.x-t.x,A=e.y-t.y,c=Math.hypot(a,A);if(c===0)return{x:s.x+r,y:s.y-(o/2+n*.65+i),angleRadians:0,angleDegrees:0,direction:{x:1,y:0},normal:{x:0,y:-1}};let l=a/c,u=A/c,g=-u,h=l;(l\u003c0||l===0\u0026\u0026u\u003c0)\u0026\u0026(l=-l,u=-u,g=-g,h=-h);const p=Math.atan2(u,l),m=o/2+n*.65+i;return{x:s.x+g*m+l*r,y:s.y+h*m+u*r,angleRadians:p,angleDegrees:p*180/Math.PI,direction:{x:l,y:u},normal:{x:g,y:h}}}var UP=[\"rgba(239, 68, 68, 0.8)\",\"rgba(249, 115, 22, 0.8)\",\"rgba(245, 158, 11, 0.8)\",\"rgba(234, 179, 8, 0.8)\",\"rgba(132, 204, 22, 0.8)\",\"rgba(34, 197, 94, 0.8)\",\"rgba(16, 185, 129, 0.8)\",\"rgba(20, 184, 166, 0.8)\",\"rgba(6, 182, 212, 0.8)\",\"rgba(14, 165, 233, 0.8)\",\"rgba(59, 130, 246, 0.8)\",\"rgba(99, 102, 241, 0.8)\",\"rgba(139, 92, 246, 0.8)\",\"rgba(168, 85, 247, 0.8)\",\"rgba(217, 70, 239, 0.8)\",\"rgba(236, 72, 153, 0.8)\",\"rgba(249, 168, 212, 0.8)\",\"rgba(161, 161, 170, 0.8)\"];function Fhn(t,e,n,o={}){const i=o.padding??40,r=o.yFlip??!1;let s;if(\"center\"in t){const l=t.width/2,u=t.height/2;s={minX:t.center.x-l,maxX:t.center.x+l,minY:t.center.y-u,maxY:t.center.y+u}}else s=t;const a=s.maxX-s.minX||1,A=s.maxY-s.minY||1,c=Math.min((e-2*i)/a,(n-2*i)/A);return NC(Qd(e/2,n/2),vS(c,r?-c:c),Qd(-(s.minX+a/2),-(s.minY+A/2)))}function nHi(t){const e=[...t.points||[],...(t.lines||[]).flatMap(n=\u003en.points),...(t.polygons||[]).flatMap(n=\u003en.points),...(t.rects||[]).flatMap(n=\u003ejLi(n)),...(t.circles||[]).flatMap(n=\u003e[{x:n.center.x-n.radius,y:n.center.y},{x:n.center.x+n.radius,y:n.center.y},{x:n.center.x,y:n.center.y-n.radius},{x:n.center.x,y:n.center.y+n.radius}]),...(t.arrows||[]).flatMap(n=\u003e{const o=tHi(n);return[{x:o.minX,y:o.minY},{x:o.maxX,y:o.maxY}]}),...(t.texts||[]).flatMap(n=\u003e{const o=n.fontSize??12,i=n.text.length*o*KLi,r=o*VLi,s=n.anchorSide??\"center\",a={top_left:{dx:0,dy:0},top_center:{dx:-i/2,dy:0},top_right:{dx:-i,dy:0},center_left:{dx:0,dy:-r/2},center:{dx:-i/2,dy:-r/2},center_right:{dx:-i,dy:-r/2},bottom_left:{dx:0,dy:-r},bottom_center:{dx:-i/2,dy:-r},bottom_right:{dx:-i,dy:-r}},{dx:A,dy:c}=a[s],l=n.x+A,u=n.y+c;return[{x:l,y:u},{x:l+i,y:u+r}]})];return e.length===0?{minX:-1,maxX:1,minY:-1,maxY:1}:e.reduce((n,o)=\u003e({minX:Math.min(n.minX,o.x),maxX:Math.max(n.maxX,o.x),minY:Math.min(n.minY,o.y),maxY:Math.max(n.maxY,o.y)}),{minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0})}function oHi(t,e,n={}){const o=n.disableLabels!==!1,i=n.hideInlineLabels??o,r=e instanceof HTMLCanvasElement?e.getContext(\"2d\"):e;if(!r)throw new Error(\"Could not get 2D context from canvas\");const s=e instanceof HTMLCanvasElement?e.width:e.canvas.width,a=e instanceof HTMLCanvasElement?e.height:e.canvas.height;let A;if(n.transform)A=n.transform;else if(n.viewbox)A=Fhn(n.viewbox,s,a,{padding:n.padding,yFlip:n.yFlip});else{const c=nHi(t),l=t.coordinateSystem===\"cartesian\";A=Fhn(c,s,a,{padding:n.padding??40,yFlip:l})}if(r.clearRect(0,0,s,a),r.save(),t.rects\u0026\u0026t.rects.length\u003e0\u0026\u0026t.rects.forEach(c=\u003e{const l=qLi(c,A);r.save(),r.translate(l.center.x,l.center.y),Math.abs(l.angleRadians)\u003e1e-6\u0026\u0026r.rotate(l.angleRadians),r.beginPath(),r.rect(-l.width/2,-l.height/2,l.width,l.height),c.fill\u0026\u0026(r.fillStyle=c.fill,r.fill()),c.stroke\u0026\u0026(r.strokeStyle=c.stroke,r.stroke()),r.restore()}),t.circles\u0026\u0026t.circles.length\u003e0\u0026\u0026t.circles.forEach(c=\u003e{const l=_i(A,c.center),u=c.radius*Math.abs(A.a);r.beginPath(),r.arc(l.x,l.y,u,0,2*Math.PI),c.fill\u0026\u0026(r.fillStyle=c.fill,r.fill()),c.stroke\u0026\u0026(r.strokeStyle=c.stroke??\"transparent\",r.stroke())}),t.polygons\u0026\u0026t.polygons.length\u003e0\u0026\u0026t.polygons.forEach(c=\u003e{if(c.points.length===0)return;const l=c.points.map(u=\u003e_i(A,u));r.beginPath(),r.moveTo(l[0].x,l[0].y);for(let u=1;u\u003cl.length;u++)r.lineTo(l[u].x,l[u].y);r.closePath(),c.fill\u0026\u0026(r.fillStyle=c.fill,r.fill()),c.stroke\u0026\u0026(r.strokeStyle=c.stroke,c.strokeWidth!==void 0\u0026\u0026(r.lineWidth=c.strokeWidth*Math.abs(A.a)),r.stroke())}),t.arrows\u0026\u0026t.arrows.length\u003e0\u0026\u0026t.arrows.forEach((c,l)=\u003e{const u=Thn(c),g=_i(A,u.shaftStart),h=_i(A,u.shaftEnd),d=c.color||UP[l%UP.length],p=Math.hypot(A.a,A.b);r.strokeStyle=d,r.fillStyle=d,r.lineWidth=u.shaftWidth*(p||1),r.lineCap=\"round\",r.setLineDash([]),r.beginPath(),r.moveTo(g.x,g.y),r.lineTo(h.x,h.y),r.stroke(),u.heads.forEach(y=\u003e{const x=_i(A,y.tip),E=_i(A,y.leftWing),B=_i(A,y.rightWing);r.beginPath(),r.moveTo(x.x,x.y),r.lineTo(E.x,E.y),r.lineTo(B.x,B.y),r.closePath(),r.fill()});const m=12,_=u.shaftWidth*(p||1),f=m*.6,I=khn(g,h,{fontSize:m,strokeWidth:_,normalPadding:6,alongOffset:c.label?f:0}),C=khn(g,h,{fontSize:m,strokeWidth:_,normalPadding:12,alongOffset:c.inlineLabel?-f:0});if(r.fillStyle=d,r.font=`${m}px sans-serif`,!o\u0026\u0026c.label){const y=C.x,x=C.y;r.save(),r.textAlign=\"center\",r.textBaseline=\"middle\",r.fillText(c.label,y,x),r.restore()}!i\u0026\u0026c.inlineLabel\u0026\u0026(r.save(),r.translate(I.x,I.y),r.rotate(I.angleRadians),r.textAlign=\"center\",r.textBaseline=\"middle\",r.fillText(c.inlineLabel,0,0),r.restore())}),t.lines\u0026\u0026t.lines.length\u003e0\u0026\u0026t.lines.map((c,l)=\u003e({line:c,originalIndex:l})).sort((c,l)=\u003e(c.line.zIndex??0)-(l.line.zIndex??0)||c.originalIndex-l.originalIndex).forEach(({line:c,originalIndex:l})=\u003e{if(c.points.length===0)return;r.beginPath();const u=_i(A,c.points[0]);r.moveTo(u.x,u.y);for(let g=1;g\u003cc.points.length;g++){const h=_i(A,c.points[g]);r.lineTo(h.x,h.y)}if(r.strokeStyle=c.strokeColor||UP[l%UP.length],c.strokeWidth?r.lineWidth=c.strokeWidth*A.a:r.lineWidth=2,r.lineCap=\"round\",c.strokeDash)if(typeof c.strokeDash==\"string\"){let g;if(c.strokeDash.includes(\",\"))g=c.strokeDash.split(\",\").map(h=\u003eparseFloat(h.trim())).filter(h=\u003e!Number.isNaN(h));else{const h=parseFloat(c.strokeDash.trim());g=Number.isNaN(h)?[]:[h]}r.setLineDash(g)}else r.setLineDash(c.strokeDash.map(g=\u003eg*Math.abs(A.a)));else r.setLineDash([]);r.stroke()}),t.infiniteLines\u0026\u0026t.infiniteLines.length\u003e0){const c=ULi(A,s,a);t.infiniteLines.forEach((l,u)=\u003e{const g=YLi(l,c);if(!g)return;const[h,d]=g,p=_i(A,h),m=_i(A,d);if(r.beginPath(),r.moveTo(p.x,p.y),r.lineTo(m.x,m.y),r.strokeStyle=l.strokeColor||UP[u%UP.length],r.lineWidth=l.strokeWidth?l.strokeWidth*Math.abs(A.a):2,r.lineCap=\"round\",l.strokeDash)if(typeof l.strokeDash==\"string\"){let _;if(l.strokeDash.includes(\",\"))_=l.strokeDash.split(\",\").map(f=\u003eparseFloat(f.trim())).filter(f=\u003e!Number.isNaN(f));else{const f=parseFloat(l.strokeDash.trim());_=Number.isNaN(f)?[]:[f]}r.setLineDash(_)}else r.setLineDash(l.strokeDash.map(_=\u003e_*Math.abs(A.a)));else r.setLineDash([]);r.stroke()})}t.texts\u0026\u0026t.texts.length\u003e0\u0026\u0026t.texts.forEach(c=\u003e{const l=_i(A,{x:c.x,y:c.y});r.fillStyle=c.color||\"black\",r.font=`${(c.fontSize??12)*Math.abs(A.a)}px sans-serif`;const u=c.anchorSide??\"center\",g={top_left:\"left\",center_left:\"left\",bottom_left:\"left\",top_center:\"center\",center:\"center\",bottom_center:\"center\",top_right:\"right\",center_right:\"right\",bottom_right:\"right\"},h={top_left:\"top\",top_center:\"top\",top_right:\"top\",center_left:\"middle\",center:\"middle\",center_right:\"middle\",bottom_left:\"bottom\",bottom_center:\"bottom\",bottom_right:\"bottom\"};r.textAlign=g[u],r.textBaseline=h[u],r.fillText(c.text,l.x,l.y)}),t.points\u0026\u0026t.points.length\u003e0\u0026\u0026t.points.forEach((c,l)=\u003e{const u=_i(A,c);r.beginPath(),r.arc(u.x,u.y,3,0,2*Math.PI),r.fillStyle=c.color||UP[l%UP.length],r.fill(),c.label\u0026\u0026!o\u0026\u0026(r.fillStyle=c.color||\"black\",r.font=\"12px sans-serif\",r.fillText(c.label,u.x+5,u.y-5))}),r.restore()}qgn(ZRi(),1);var iHi=({children:t,transform:e,debugGraphics:n})=\u003e{const o=ee.useRef(null),[i,{width:r,height:s}]=uee(),a=Kc(A=\u003eA.is_showing_autorouting);return ee.useEffect(()=\u003e{a\u0026\u0026o.current\u0026\u0026n\u0026\u0026r\u0026\u0026s\u0026\u0026(o.current.width=r,o.current.height=s,oHi(n,o.current,{transform:e,disableLabels:!0}))},[n,e,r,s,a]),a?K.jsxs(\"div\",{ref:i,style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:[t,K.jsx(\"canvas\",{ref:o,style:{position:\"absolute\",top:0,left:0,opacity:.5,zIndex:100,width:\"100%\",height:\"100%\",pointerEvents:\"none\"}})]}):t},ufe=(t,e,n)=\u003en(t,e),Lhn=(t,e,n,o,i)=\u003e{const r=i*Math.PI/180,s=Math.cos(r),a=Math.sin(r),A=t-n,c=e-o,l=A*s-c*a,u=A*a+c*s;return{x:l+n,y:u+o}},hee=t=\u003e{if(t.length===0)return null;let e=t[0].x,n=t[0].x,o=t[0].y,i=t[0].y;for(const r of t)e=ufe(e,r.x,Math.min),n=ufe(n,r.x,Math.max),o=ufe(o,r.y,Math.min),i=ufe(i,r.y,Math.max);return{minX:e,maxX:n,minY:o,maxY:i}},rHi=(t,e)=\u003e({minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}),sHi=(t,e)=\u003et?rHi(t,e):e,aHi=t=\u003e{switch(t.pcb_drawing_type){case\"line\":{const e=(t.width??0)/2,n=[{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}],o=hee(n);return o?{minX:o.minX-e,maxX:o.maxX+e,minY:o.minY-e,maxY:o.maxY+e}:null}case\"rect\":{const e=t.w/2,n=t.h/2,o=[{x:t.x-e,y:t.y-n},{x:t.x+e,y:t.y-n},{x:t.x+e,y:t.y+n},{x:t.x-e,y:t.y+n}],i=t.ccw_rotation??0,r=i===0?o:o.map(s=\u003eLhn(s.x,s.y,t.x,t.y,i));return hee(r)}case\"circle\":return{minX:t.x-t.r,maxX:t.x+t.r,minY:t.y-t.r,maxY:t.y+t.r};case\"oval\":return{minX:t.x-t.rX,maxX:t.x+t.rX,minY:t.y-t.rY,maxY:t.y+t.rY};case\"pill\":{const e=t.w/2,n=t.h/2,o=[{x:t.x-e,y:t.y-n},{x:t.x+e,y:t.y-n},{x:t.x+e,y:t.y+n},{x:t.x-e,y:t.y+n}],i=t.ccw_rotation??0,r=i===0?o:o.map(s=\u003eLhn(s.x,s.y,t.x,t.y,i));return hee(r)}case\"polygon\":return hee(t.points);case\"polygon_with_arcs\":{const e=t.brep_shape.outer_ring.vertices.map(n=\u003e({x:n.x,y:n.y}));return hee(e)}case\"text\":{const e=t.size??0,n=t.text?t.text.length*e*.6:0,o=e;if(n===0\u0026\u0026o===0)return{minX:t.x,maxX:t.x,minY:t.y,maxY:t.y};const i=n/2,r=o/2;return{minX:t.x-i,maxX:t.x+i,minY:t.y-r,maxY:t.y+r}}default:return null}};function AHi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t,a=n.x-e.x,A=n.y-e.y,c=Math.sqrt(a*a+A*A),l=i.x-o.x,u=i.y-o.y,g=Math.sqrt(l*l+u*u),h=Math.atan2(u,l)*(180/Math.PI),d=Math.abs(h)%90,m=Math.min(d,90-d)\u003e15,_=(o.x+i.x)/2,f=(o.y+i.y)/2,I=15,C=h+90;let y=Math.cos(C*Math.PI/180)*I,x=Math.sin(C*Math.PI/180)*I;const E=l\u003e0\u0026\u0026u\u003c0,B=l\u003e0\u0026\u0026u\u003e0,S=l\u003c0\u0026\u0026u\u003e0;r!==s\u0026\u0026!E\u0026\u0026(y=-y,x=-x),E\u0026\u0026(y+=Math.cos(C*Math.PI/180)*-45,x+=Math.sin(C*Math.PI/180)*-45),B\u0026\u0026(y+=Math.cos(C*Math.PI/180)+-20,x+=Math.sin(C*Math.PI/180)+-10),S\u0026\u0026(y+=Math.cos(C*Math.PI/180)*10,x+=Math.sin(C*Math.PI/180)*10);const Q=_+y,w=f+x;return{distance:c,screenDistance:g,x:Q,y:w,show:c\u003e.01\u0026\u0026g\u003e30\u0026\u0026m}}function cHi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t;return ee.useMemo(()=\u003eAHi({dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}),[e,n,o,i,r,s])}var lHi=(t,e,n)=\u003e{const o=n*Math.PI/180,i=Math.cos(o),r=Math.sin(o),s=t.x-e.x,a=t.y-e.y,A=s*i-a*r,c=s*r+a*i;return{x:A+e.x,y:c+e.y}},Hhn=(t,e,n,o)=\u003e{const i={top_left:{x:t.x-e,y:t.y-n},top_center:{x:t.x,y:t.y-n},top_right:{x:t.x+e,y:t.y-n},center_left:{x:t.x-e,y:t.y},center:{x:t.x,y:t.y},center_right:{x:t.x+e,y:t.y},bottom_left:{x:t.x-e,y:t.y+n},bottom_center:{x:t.x,y:t.y+n},bottom_right:{x:t.x+e,y:t.y+n}};return o===0?Object.entries(i).map(([r,s])=\u003e({anchor:r,point:s})):Object.entries(i).map(([r,s])=\u003e({anchor:r,point:lHi(s,t,o)}))},uHi=t=\u003e{switch(t.pcb_drawing_type){case\"rect\":{const e=t.ccw_rotation??0;return Hhn({x:t.x,y:t.y},t.w/2,t.h/2,e)}case\"pill\":{const e=t.ccw_rotation??0;return Hhn({x:t.x,y:t.y},t.w/2,t.h/2,e)}case\"circle\":return[{anchor:\"circle_center\",point:{x:t.x,y:t.y}},{anchor:\"circle_right\",point:{x:t.x+t.r,y:t.y}},{anchor:\"circle_left\",point:{x:t.x-t.r,y:t.y}},{anchor:\"circle_top\",point:{x:t.x,y:t.y-t.r}},{anchor:\"circle_bottom\",point:{x:t.x,y:t.y+t.r}}];case\"oval\":return[{anchor:\"oval_center\",point:{x:t.x,y:t.y}},{anchor:\"oval_right\",point:{x:t.x+t.rX,y:t.y}},{anchor:\"oval_left\",point:{x:t.x-t.rX,y:t.y}},{anchor:\"oval_top\",point:{x:t.x,y:t.y-t.rY}},{anchor:\"oval_bottom\",point:{x:t.x,y:t.y+t.rY}}];case\"line\":{const e={x:(t.x1+t.x2)/2,y:(t.y1+t.y2)/2};return[{anchor:\"line_start\",point:{x:t.x1,y:t.y1}},{anchor:\"line_mid\",point:e},{anchor:\"line_end\",point:{x:t.x2,y:t.y2}}]}case\"polygon\":return t.points.map((e,n)=\u003e({anchor:`polygon_vertex_${n}`,point:e}));case\"polygon_with_arcs\":return t.brep_shape.outer_ring.vertices.map((e,n)=\u003e({anchor:`polygon_with_arcs_vertex_${n}`,point:{x:e.x,y:e.y}}));default:return[]}},Ohn=({screenPoint:{x:t,y:e}})=\u003e`M${t-2.5},${e-2.5}l5,5m0,-5l-5,5`,gHi=ee.memo(function({points:e,startId:n,endId:o}){const{path:i,pointsById:r}=ee.useMemo(()=\u003e({path:e.map(Ohn).join(\"\"),pointsById:new Map(e.map(a=\u003e[a.id,a]))}),[e]),s=[...new Set([n,o])].flatMap(a=\u003e{const A=a===null?void 0:r.get(a);return A?[Ohn(A)]:[]}).join(\"\");return K.jsxs(\"svg\",{\"aria-hidden\":\"true\",width:\"100%\",height:\"100%\",style:{position:\"absolute\",left:0,top:0,overflow:\"visible\",pointerEvents:\"none\",zIndex:Ru.dimensionOverlay},fill:\"none\",strokeWidth:1,children:[K.jsx(\"path\",{d:i,stroke:\"white\"}),K.jsx(\"path\",{d:s,stroke:\"#66ccff\"})]})}),dHi=16,hHi=[],pHi=RP(),Ghn=t=\u003e{if(t.pcb_drawing_type===\"text\")return!0;const e=t._element;if(!e||typeof e!=\"object\")return!1;const n=typeof e.type==\"string\"?e.type:void 0;return n?!!(n.startsWith(\"pcb_silkscreen_\")||n.startsWith(\"pcb_note_\")||n===\"pcb_text\"||n.startsWith(\"pcb_fabrication_note_\")\u0026\u0026n!==\"pcb_fabrication_note_rect\"):!1},mHi=({children:t,transform:e,focusOnHover:n=!1,primitives:o=hHi,onBoundsSelected:i,cancelPanDrag:r})=\u003e{e||(e=pHi);const[s,a]=ee.useState(!1),[A,c]=ee.useState(!1),[l,u]=ee.useState(!1),[g,h]=ee.useState(!1),[d,p]=ee.useState(!1),[m,_]=ee.useState(!1),[f,I]=ee.useState({start:null,end:null}),C=Kc(ve=\u003eve.is_mouse_over_container),y=ee.useCallback(()=\u003e{l\u0026\u0026(u(!1),window.dispatchEvent(new Event(\"disarm-dimension-tool\")))},[l]),x=ee.useCallback(()=\u003e{g\u0026\u0026(h(!1),window.dispatchEvent(new Event(\"disarm-bounds-tool\")))},[g]),[E,B]=ee.useState({x:0,y:0}),[S,Q]=ee.useState({x:0,y:0}),[w,M]=ee.useState({x:0,y:0}),[k,R]=ee.useState({x:0,y:0}),F=ee.useRef({x:0,y:0}),O=ee.useRef(!1),U=ee.useRef(null),W=U.current?.getBoundingClientRect(),te=ee.useMemo(()=\u003e{const ve=new Map;for(const he of o){if(!he._element||Ghn(he)||he.pcb_drawing_type===\"pill\"||he.pcb_drawing_type===\"rect\"\u0026\u0026he.ccw_rotation\u0026\u0026he.ccw_rotation!==0)continue;const Qe=aHi(he);if(!Qe)continue;const Pe=ve.get(he._element);ve.set(he._element,sHi(Pe??void 0,Qe))}return ve},[o]),j=ee.useMemo(()=\u003e{const ve=[];for(const he of o){if(!he._element||Ghn(he))continue;const Qe=uHi(he);if(Qe.length!==0)for(const Pe of Qe)ve.push({anchor:Pe.anchor,point:Pe.point,element:he._element})}return ve},[o]),J=ee.useMemo(()=\u003e{const ve=[];te.forEach((he,Qe)=\u003e{if(!he)return;const Pe=(he.minX+he.maxX)/2,we=(he.minY+he.maxY)/2,Te={top_left:{x:he.minX,y:he.minY},top_center:{x:Pe,y:he.minY},top_right:{x:he.maxX,y:he.minY},center_left:{x:he.minX,y:we},center:{x:Pe,y:we},center_right:{x:he.maxX,y:we},bottom_left:{x:he.minX,y:he.maxY},bottom_center:{x:Pe,y:he.maxY},bottom_right:{x:he.maxX,y:he.maxY}};for(const[Re,Ee]of Object.entries(Te))ve.push({anchor:Re,point:Ee,element:Qe})});for(const he of j)ve.push(he);return ve.push({anchor:\"origin\",point:{x:0,y:0},element:null}),ve},[te,j]),oe=ee.useMemo(()=\u003eJ.map((ve,he)=\u003e({...ve,id:`${he}-${ve.anchor}`,screenPoint:_i(e,ve.point)})),[J,e]),ie=ee.useCallback(ve=\u003e{if(oe.length===0)return{point:ve,id:null};const he=_i(e,ve);let Qe=null;for(const Pe of oe){const we=Pe.screenPoint.x-he.x,Te=Pe.screenPoint.y-he.y,Re=Math.hypot(we,Te);Re\u003edHi||(!Qe||Re\u003cQe.distance)\u0026\u0026(Qe={distance:Re,id:Pe.id,point:Pe.point})}return Qe?{point:Qe.point,id:Qe.id}:{point:ve,id:null}},[oe,e]);ee.useEffect(()=\u003e{const ve=Pe=\u003e{const we=Pe.target;if(we.tagName===\"INPUT\"||we.tagName===\"TEXTAREA\"||we.isContentEditable)return;const Te=U.current?.contains(document.activeElement)||document.activeElement===U.current;if(!(!C\u0026\u0026!Te)){if(Pe.key===\"d\"){const Re=ie({x:F.current.x,y:F.current.y});B({x:Re.point.x,y:Re.point.y}),Q({x:Re.point.x,y:Re.point.y}),I({start:Re.id,end:Re.id}),s?(a(!1),c(!1),I({start:null,end:null})):(a(!0),c(!0)),y()}Pe.key===\"Escape\"\u0026\u0026(a(!1),c(!1),I({start:null,end:null}),p(!1),_(!1),y(),x())}},he=()=\u003e{u(!0),h(!1),window.dispatchEvent(new Event(\"disarm-bounds-tool\"))},Qe=()=\u003e{h(!0),u(!1),a(!1),c(!1),window.dispatchEvent(new Event(\"disarm-dimension-tool\"))};return window.addEventListener(\"keydown\",ve),window.addEventListener(\"arm-dimension-tool\",he),window.addEventListener(\"arm-bounds-tool\",Qe),()=\u003e{window.removeEventListener(\"keydown\",ve),window.removeEventListener(\"arm-dimension-tool\",he),window.removeEventListener(\"arm-bounds-tool\",Qe),y(),x()}},[C,s,y,x,ie]);const ne=_i(e,E),le=_i(e,S),ge=_i(e,w),_e=_i(e,k),ue={minX:Math.min(w.x,k.x),minY:Math.min(w.y,k.y),maxX:Math.max(w.x,k.x),maxY:Math.max(w.y,k.y)},fe={left:Math.min(ge.x,_e.x),top:Math.min(ge.y,_e.y),width:Math.abs(ge.x-_e.x),height:Math.abs(ge.y-_e.y)},pe=ee.useCallback((ve,he)=\u003e{const Qe={minX:Math.min(ve.x,he.x),minY:Math.min(ve.y,he.y),maxX:Math.max(ve.x,he.x),maxY:Math.max(ve.y,he.y)};i?.(Qe),window.dispatchEvent(new CustomEvent(\"pcb-viewer:bounds-selected\",{detail:Qe}))},[i]),ye={left:Math.min(ne.x,le.x),right:Math.max(ne.x,le.x),top:Math.min(ne.y,le.y),bottom:Math.max(ne.y,le.y),flipX:ne.x\u003ele.x,flipY:ne.y\u003ele.y,width:0,height:0};ye.width=ye.right-ye.left,ye.height=ye.bottom-ye.top;const Me=cHi({dimensionStart:E,dimensionEnd:S,screenDimensionStart:ne,screenDimensionEnd:le,flipX:ye.flipX,flipY:ye.flipY});return K.jsxs(\"div\",{ref:U,\"data-pcb-viewer\":!0,tabIndex:0,style:{position:\"relative\",outline:\"none\"},onMouseDownCapture:()=\u003e{O.current=!1},onClickCapture:ve=\u003e{O.current\u0026\u0026(O.current=!1,ve.stopPropagation(),U.current?.focus())},onContextMenuCapture:ve=\u003e{!l\u0026\u0026!s\u0026\u0026!O.current||(ve.preventDefault(),ve.stopPropagation())},onMouseEnter:()=\u003e{n\u0026\u0026U.current\u0026\u0026U.current.focus()},onMouseLeave:()=\u003e{U.current\u0026\u0026U.current.blur()},onClick:()=\u003e{U.current\u0026\u0026U.current.focus()},onMouseMove:ve=\u003e{const he=ve.currentTarget.getBoundingClientRect(),Qe=ve.clientX-he.left,Pe=ve.clientY-he.top,we=_i(V6(e),{x:Qe,y:Pe});if(F.current.x=we.x,F.current.y=we.y,A){const Te=ie(we);Q({x:Te.point.x,y:Te.point.y}),I(Re=\u003e({...Re,end:Te.id}))}m\u0026\u0026(r?.(),R({x:we.x,y:we.y}))},onMouseDown:ve=\u003e{O.current=l||s;const he=ve.currentTarget.getBoundingClientRect(),Qe=ve.clientX-he.left,Pe=ve.clientY-he.top,we=_i(V6(e),{x:Qe,y:Pe});if(g)ve.preventDefault(),ve.stopPropagation(),r?.(),M({x:we.x,y:we.y}),R({x:we.x,y:we.y}),p(!0),_(!0),x();else if(l\u0026\u0026!s){const Te=ie(we);B({x:Te.point.x,y:Te.point.y}),Q({x:Te.point.x,y:Te.point.y}),I({start:Te.id,end:Te.id}),a(!0),c(!0),y()}else A?(c(!1),I(Te=\u003e({...Te,end:null}))):s\u0026\u0026(a(!1),I({start:null,end:null}))},onMouseUp:ve=\u003e{if(!m)return;const he=ve.currentTarget.getBoundingClientRect(),Qe=ve.clientX-he.left,Pe=ve.clientY-he.top,we=_i(V6(e),{x:Qe,y:Pe}),Te={x:we.x,y:we.y};ve.preventDefault(),ve.stopPropagation(),r?.(),R(Te),_(!1),pe(w,Te)},children:[t,d\u0026\u0026K.jsxs(K.Fragment,{children:[K.jsx(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\",mixBlendMode:\"difference\",zIndex:Ru.dimensionOverlay},width:W.width,height:W.height,children:K.jsx(\"rect\",{x:fe.left,y:fe.top,width:fe.width,height:fe.height,stroke:\"red\",strokeWidth:1.5,strokeDasharray:\"4,3\",fill:\"rgba(255, 0, 0, 0.12)\"})}),K.jsxs(\"div\",{style:{left:0,bottom:s?58:0,position:\"absolute\",color:\"red\",fontFamily:\"sans-serif\",fontSize:12,margin:4,pointerEvents:\"none\",mixBlendMode:\"difference\",zIndex:Ru.dimensionOverlay},children:[\"minX: \",ue.minX.toFixed(2),\", minY:\",\" \",ue.minY.toFixed(2),K.jsx(\"br\",{}),\"maxX: \",ue.maxX.toFixed(2),\", maxY:\",\" \",ue.maxY.toFixed(2)]})]}),s\u0026\u0026K.jsxs(K.Fragment,{children:[Me.show\u0026\u0026K.jsx(\"div\",{style:{position:\"absolute\",left:Me.x,top:Me.y,color:\"red\",mixBlendMode:\"difference\",pointerEvents:\"none\",fontSize:12,fontFamily:\"sans-serif\",whiteSpace:\"nowrap\",zIndex:Ru.dimensionOverlay},children:Me.distance.toFixed(2)}),K.jsx(\"div\",{style:{position:\"absolute\",left:ye.left,width:ye.width,textAlign:\"center\",top:ne.y+2,color:\"red\",mixBlendMode:\"difference\",pointerEvents:\"none\",marginTop:ye.flipY?0:-20,fontSize:12,fontFamily:\"sans-serif\",zIndex:Ru.dimensionOverlay},children:Math.abs(E.x-S.x).toFixed(2)}),K.jsx(\"div\",{style:{position:\"absolute\",left:le.x,height:ye.height,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",top:ye.top,color:\"red\",pointerEvents:\"none\",mixBlendMode:\"difference\",fontSize:12,fontFamily:\"sans-serif\",zIndex:Ru.dimensionOverlay},children:K.jsx(\"div\",{style:{marginLeft:ye.flipX?\"-100%\":4,paddingRight:4},children:Math.abs(E.y-S.y).toFixed(2)})}),K.jsxs(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\",mixBlendMode:\"difference\",zIndex:Ru.dimensionOverlay},width:W.width,height:W.height,children:[K.jsx(\"defs\",{children:K.jsx(\"marker\",{id:\"head\",orient:\"auto\",markerWidth:\"3\",markerHeight:\"4\",refX:\"2\",refY:\"2\",children:K.jsx(\"path\",{d:\"M0,0 V4 L2,2 Z\",fill:\"red\"})})}),K.jsx(\"line\",{x1:ne.x,y1:ne.y,x2:le.x,y2:le.y,markerEnd:\"url(#head)\",strokeWidth:1.5,fill:\"none\",stroke:\"red\"}),K.jsx(\"line\",{x1:ne.x,y1:ne.y,x2:le.x,y2:ne.y,strokeWidth:1.5,fill:\"none\",strokeDasharray:\"2,2\",stroke:\"red\"}),K.jsx(\"line\",{x1:le.x,y1:ne.y,x2:le.x,y2:le.y,strokeWidth:1.5,fill:\"none\",strokeDasharray:\"2,2\",stroke:\"red\"})]}),A\u0026\u0026K.jsx(gHi,{points:oe,startId:f.start,endId:f.end}),K.jsxs(\"div\",{style:{right:0,bottom:0,position:\"absolute\",color:\"red\",fontFamily:\"sans-serif\",fontSize:12,margin:4},children:[\"(\",E.x.toFixed(2),\",\",E.y.toFixed(2),\")\",K.jsx(\"br\",{}),\"(\",S.x.toFixed(2),\",\",S.y.toFixed(2),\")\",K.jsx(\"br\",{}),\"dist:\",\" \",Math.sqrt((S.x-E.x)**2+(S.y-E.y)**2).toFixed(2)]})]})]})},_Hi=(t,e,n=0)=\u003e{const o=t.width/2,i=t.height/2,r=t.center.x-o-n,s=t.center.x+o+n,a=t.center.y-i-n,A=t.center.y+i+n;return e.x\u003er\u0026\u0026e.x\u003cs\u0026\u0026e.y\u003ea\u0026\u0026e.y\u003cA},fHi=({children:t,disabled:e,transform:n,soup:o,cancelPanDrag:i,onCreateEditEvent:r,onModifyEditEvent:s})=\u003e{n||(n=RP());const a=ee.useRef(null),[A,c]=ee.useState(null),[l,u]=ee.useState(null),g=A!==null;Kc(m=\u003em.in_edit_mode);const h=Kc(m=\u003em.in_move_footprint_mode),d=Kc(m=\u003em.setIsMovingComponent),p=e||!h;return K.jsxs(\"div\",{ref:a,style:{position:\"relative\",overflow:\"hidden\"},onMouseDown:m=\u003e{if(p)return;const _=m.currentTarget.getBoundingClientRect(),f=m.clientX-_.left,I=m.clientY-_.top;if(Number.isNaN(f)||Number.isNaN(I))return;const C=_i(V6(n),{x:f,y:I});let y=!1;for(const x of o)if(x.type===\"pcb_component\"\u0026\u0026_Hi(x,C,10/n.a)){i(),c(x.pcb_component_id),y=!0;const E=Math.random().toString();u({dragStart:C,originalCenter:x.center,dragEnd:C,edit_event_id:E}),r({edit_event_id:E,edit_event_type:\"edit_pcb_component_location\",pcb_edit_event_type:\"edit_component_location\",pcb_component_id:x.pcb_component_id,original_center:x.center,new_center:x.center,in_progress:!0,created_at:Date.now()}),d(!0);break}if(y||c(null),y)return m.preventDefault(),!1},onMouseMove:m=\u003e{if(!A||!l)return;const _=m.currentTarget.getBoundingClientRect(),f=m.clientX-_.left,I=m.clientY-_.top;if(Number.isNaN(f)||Number.isNaN(I))return;const C=_i(V6(n),{x:f,y:I});u({...l,dragEnd:C}),s({edit_event_id:l.edit_event_id,new_center:{x:l.originalCenter.x+C.x-l.dragStart.x,y:l.originalCenter.y+C.y-l.dragStart.y}})},onMouseUp:m=\u003e{A\u0026\u0026(c(null),d(!1),l\u0026\u0026(s({edit_event_id:l.edit_event_id,in_progress:!1}),u(null)))},children:[t,!p\u0026\u0026o.filter(m=\u003em.type===\"pcb_component\").map(m=\u003e{if(!m?.center)return null;const _=_i(n,m.center);return K.jsx(\"div\",{style:{position:\"absolute\",pointerEvents:\"none\",left:_.x,top:_.y,width:m.width*n.a+20,height:m.height*n.a+20,transform:\"translate(-50%, -50%)\",background:g\u0026\u0026A===m.pcb_component_id?\"rgba(255, 0, 0, 0.2)\":\"\"}},m.pcb_component_id)})]})},y$e=(t,e)=\u003e{const n=e.current;if(!n)return{transform:\"translate(-50%, -100%)\",left:t.x,top:t.y};const o=n.getBoundingClientRect(),i=200,r=10,s=60;let a=\"-50%\",A=\"-100%\",c=t.x,l=t.y;return t.x+s+i\u003co.width-r?(c=t.x+s,a=\"0%\"):t.x-s-i\u003er?(c=t.x-s,a=\"-100%\"):(c=t.x,a=\"-50%\"),{transform:`translate(${a}, ${A})`,left:c,top:l}},IHi=({center:t})=\u003eK.jsxs(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\",mixBlendMode:\"difference\",zIndex:Ru.errorOverlay+30},width:\"100%\",height:\"100%\",children:[K.jsx(\"circle\",{cx:t.x,cy:t.y,r:11,fill:\"none\",stroke:\"#ff6b6b\",strokeWidth:2.5,opacity:.95}),K.jsx(\"circle\",{cx:t.x,cy:t.y,r:4.5,fill:\"#ff6b6b\",opacity:.95}),K.jsx(\"line\",{x1:t.x-18,y1:t.y,x2:t.x-8,y2:t.y,stroke:\"#ff6b6b\",strokeWidth:2}),K.jsx(\"line\",{x1:t.x+8,y1:t.y,x2:t.x+18,y2:t.y,stroke:\"#ff6b6b\",strokeWidth:2}),K.jsx(\"line\",{x1:t.x,y1:t.y-18,x2:t.x,y2:t.y-8,stroke:\"#ff6b6b\",strokeWidth:2}),K.jsx(\"line\",{x1:t.x,y1:t.y+8,x2:t.x,y2:t.y+18,stroke:\"#ff6b6b\",strokeWidth:2})]}),Yhn=({errorCenter:t,isHighlighted:e=!1})=\u003eK.jsx(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\",mixBlendMode:\"difference\",zIndex:Ru.errorOverlay},width:\"100%\",height:\"100%\",children:K.jsx(\"rect\",{x:t.x-7,y:t.y-7,width:14,height:14,transform:`rotate(45 ${t.x} ${t.y})`,fill:e?\"#ff4444\":\"transparent\",stroke:e?\"#ff4444\":\"red\",strokeWidth:e?2.5:1.5})}),x$e=kU`\n opacity: 0;\n pointer-events: none;\n background-color: rgba(0, 0, 0, 0.8);\n padding: 8px 12px;\n border-radius: 4px;\n width: 200px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);\n word-wrap: break-word;\n line-height: 1.4;\n transition: opacity 0.2s;\n margin-bottom: 10px;\n color: red;\n`,CHi=({children:t,transform:e=RP(),elements:n})=\u003e{const o=ee.useRef(null),{isShowingDRCErrors:i,hoveredErrorId:r,focusedErrorId:s}=Kc(p=\u003e({isShowingDRCErrors:p.is_showing_drc_errors,hoveredErrorId:p.hovered_error_id,focusedErrorId:p.focused_error_id})),a=s??r;if(!n)return K.jsx(\"div\",{style:{position:\"relative\"},ref:o,children:t});const A=n.filter(p=\u003ep.type===\"pcb_trace_error\"\u0026\u0026!p.message?.includes(\"Multiple components found with name\")),c=n.filter(p=\u003ep.type===\"pcb_via_clearance_error\"),l=n.filter(p=\u003ep.type===\"pcb_trace_error\"\u0026\u0026p.message?.includes(\"Multiple components found with name\")),u=ohn(n),g=ahn(n,a),h=p=\u003e{const m=bFi({error:p,indexes:u});if(!m||typeof m.x!=\"number\"||typeof m.y!=\"number\")return null;const _=_i(e,m);return Number.isNaN(_.x)||Number.isNaN(_.y)?null:_};let d=null;return g\u0026\u0026(d=h(g)),K.jsxs(\"div\",{style:{position:\"relative\"},ref:o,children:[t,A.map((p,m)=\u003e{const _=JU(p,m),f=a===_;if(!f\u0026\u0026!i)return null;const I=h(p);if(!I)return null;const C=y$e(I,o);return K.jsxs(ee.Fragment,{children:[K.jsx(Yhn,{errorCenter:I,isHighlighted:f}),K.jsx(\"div\",{style:{position:\"absolute\",left:I.x-15,top:I.y-15,width:30,height:30,zIndex:Ru.errorOverlay+5,cursor:\"pointer\",borderRadius:\"50%\"},onMouseEnter:y=\u003e{const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(\".error-message\");E\u0026\u0026(E.style.opacity=\"1\")}},onMouseLeave:y=\u003e{if(!f){const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(\".error-message\");E\u0026\u0026(E.style.opacity=\"0\")}}}}),K.jsx(\"div\",{style:{position:\"absolute\",zIndex:f?200:100,left:C.left,top:C.top,color:f?\"#ff4444\":\"red\",textAlign:\"center\",fontFamily:\"sans-serif\",fontSize:12,display:i||f?\"flex\":\"none\",flexDirection:\"column\",alignItems:\"center\",pointerEvents:\"none\",transform:C.transform},children:K.jsx(\"div\",{className:`error-message ${x$e}`,style:{opacity:f?1:0,border:`1px solid ${f?\"#ff4444\":\"red\"}`},children:p.message})})]},_)}),c.map((p,m)=\u003e{const _=JU(p,m),f=a===_;if(!f\u0026\u0026!i)return null;const I=h(p);if(!I)return null;const C=y$e({x:I.x,y:I.y},o);return K.jsxs(ee.Fragment,{children:[K.jsx(Yhn,{errorCenter:I,isHighlighted:f}),K.jsx(\"div\",{style:{position:\"absolute\",left:I.x-15,top:I.y-15,width:30,height:30,zIndex:Ru.errorOverlay+5,cursor:\"pointer\",borderRadius:\"50%\"},onMouseEnter:y=\u003e{const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(\".error-message\");E\u0026\u0026(E.style.opacity=\"1\")}},onMouseLeave:y=\u003e{if(!f){const x=y.currentTarget.nextElementSibling;if(x){const E=x.querySelector(\".error-message\");E\u0026\u0026(E.style.opacity=\"0\")}}}}),K.jsx(\"div\",{style:{position:\"absolute\",zIndex:f?Ru.errorOverlay+10:Ru.errorOverlay+1,left:C.left,top:C.top,color:f?\"#ff4444\":\"red\",textAlign:\"center\",fontFamily:\"sans-serif\",fontSize:12,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",pointerEvents:\"none\",transform:C.transform},children:K.jsx(\"div\",{className:`error-message ${x$e}`,style:{opacity:f?1:0,border:`1px solid ${f?\"#ff4444\":\"red\"}`},children:p.message})})]},_)}),l.map((p,m)=\u003e{const _=p.component_name||p.message?.match(/name \"([^\"]+)\"/)?.[1];if(!_)return null;const f=n?.filter(y=\u003ey.type===\"source_component\"\u0026\u0026y.name===_||y.type===\"pcb_component\"\u0026\u0026n?.find(x=\u003ex.type===\"source_component\"\u0026\u0026x.source_component_id===y.source_component_id\u0026\u0026x.name===_))||[],I=JU(p,m),C=a===I;return!C\u0026\u0026!i?null:f.map((y,x)=\u003e{let E={x:0,y:0};if(y.type===\"pcb_component\")E=y.center||{x:0,y:0};else if(y.type===\"source_component\"){const F=n?.find(O=\u003eO.type===\"pcb_component\"\u0026\u0026O.source_component_id===y.source_component_id);F\u0026\u0026F.type===\"pcb_component\"\u0026\u0026(E=F.center||{x:0,y:0})}const B=_i(e,E);if(Number.isNaN(B.x)||Number.isNaN(B.y))return null;const S=Math.abs(e.a),k=Math.max(8,Math.min(30,.5*S)),R=y$e(B,o);return K.jsxs(ee.Fragment,{children:[K.jsx(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\",mixBlendMode:\"difference\",zIndex:Ru.errorOverlay},width:\"100%\",height:\"100%\",children:C?K.jsx(\"polygon\",{points:`${B.x},${B.y-k*1.25} ${B.x+k},${B.y} ${B.x},${B.y+k*1.25} ${B.x-k},${B.y}`,fill:\"#ff4444\"}):K.jsx(\"circle\",{cx:B.x,cy:B.y,r:k,fill:\"none\",stroke:C?\"#ff4444\":\"red\",strokeWidth:C?Math.max(2,k*.15):Math.max(1,k*.1),opacity:1})}),K.jsx(\"div\",{style:{position:\"absolute\",left:B.x-(k+10),top:B.y-(k+10),width:(k+10)*2,height:(k+10)*2,zIndex:Ru.errorOverlay+5,cursor:\"pointer\",borderRadius:\"50%\"},onMouseEnter:F=\u003e{const O=F.currentTarget.nextElementSibling;if(O){const U=O.querySelector(\".error-message\");U\u0026\u0026(U.style.opacity=\"1\")}},onMouseLeave:F=\u003e{if(!C){const O=F.currentTarget.nextElementSibling;if(O){const U=O.querySelector(\".error-message\");U\u0026\u0026(U.style.opacity=\"0\")}}}}),K.jsx(\"div\",{style:{position:\"absolute\",zIndex:C?Ru.errorOverlay+20:Ru.errorOverlay+10,left:R.left,top:R.top,color:C?\"#ff4444\":\"red\",textAlign:\"center\",fontFamily:\"sans-serif\",fontSize:12,display:i||C?\"flex\":\"none\",flexDirection:\"column\",alignItems:\"center\",pointerEvents:\"none\",transform:R.transform},children:K.jsx(\"div\",{className:`error-message ${x$e}`,style:{opacity:C?1:0,border:`1px solid ${C?\"#ff4444\":\"red\"}`},children:p.message})})]},`${I}_${x}`)})}),d\u0026\u0026K.jsx(IHi,{center:d})]})};function yHi(t,e){return t.size!==e.size?!1:Array.from(t).every(n=\u003ee.has(n))}var KP=t=\u003et?.type===\"pcb_component\",Uhn=t=\u003et?.type===\"pcb_group\",xHi=t=\u003et?.type===\"pcb_panel\",E$e=t=\u003et?.type===\"pcb_board\",Gg={MIN_LINE_LENGTH_FOR_LABEL:40,LABEL_OFFSET_ABOVE:2,LABEL_OFFSET_BELOW:-18,LABEL_OFFSET_RIGHT:8,LABEL_OFFSET_LEFT:-120,Y_LABEL_MIN_WIDTH:110,LINE_STROKE_WIDTH:1.5,LINE_DASH_PATTERN:\"4,4\",COMPONENT_MARKER_RADIUS:3,LABEL_FONT_SIZE:11,ANCHOR_MARKER_SIZE:6,ANCHOR_MARKER_STROKE_WIDTH:1.5},TE={OFFSET_LINE:\"white\",COMPONENT_MARKER_FILL:\"#66ccff\",COMPONENT_MARKER_STROKE:\"white\",LABEL_TEXT:\"white\"},B$e=({targets:t,transform:e,containerWidth:n,containerHeight:o})=\u003e{if(t.length===0)return null;const i={color:TE.LABEL_TEXT,mixBlendMode:\"difference\",pointerEvents:\"none\",fontSize:Gg.LABEL_FONT_SIZE,fontFamily:\"monospace\",fontWeight:\"bold\"},r=new Map;return t.forEach(s=\u003e{if(!r.has(s.anchor_id)){const a=_i(e,s.anchor);r.set(s.anchor_id,a)}}),K.jsx(\"div\",{style:{position:\"absolute\",left:0,top:0,width:n,height:o,overflow:\"hidden\",pointerEvents:\"none\",zIndex:Ru.dimensionOverlay},children:K.jsxs(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\"},width:n,height:o,children:[t.map(s=\u003e{const a=s.anchor,A=s.anchor_id,c=s.target,l=r.get(A),u=_i(e,c),g=c.x-a.x,h=c.y-a.y,d=Math.abs(u.x-l.x),p=Math.abs(u.y-l.y),m=u.y\u003cl.y,_=u.x\u003el.x,f=m?Gg.LABEL_OFFSET_ABOVE:Gg.LABEL_OFFSET_BELOW,I=_?Gg.LABEL_OFFSET_RIGHT:Gg.LABEL_OFFSET_LEFT,C=d\u003eGg.MIN_LINE_LENGTH_FOR_LABEL,y=p\u003eGg.MIN_LINE_LENGTH_FOR_LABEL,x=`${s.display_offset_x??g.toFixed(2)}mm`,E=`${s.display_offset_y??h.toFixed(2)}mm`;return K.jsxs(\"g\",{children:[K.jsx(\"line\",{x1:l.x,y1:l.y,x2:u.x,y2:l.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.LINE_STROKE_WIDTH,strokeDasharray:Gg.LINE_DASH_PATTERN}),K.jsx(\"line\",{x1:u.x,y1:l.y,x2:u.x,y2:u.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.LINE_STROKE_WIDTH,strokeDasharray:Gg.LINE_DASH_PATTERN}),s.type===\"component\"||s.type===\"board\"?K.jsx(\"circle\",{cx:u.x,cy:u.y,r:Gg.COMPONENT_MARKER_RADIUS,fill:TE.COMPONENT_MARKER_FILL,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1}):K.jsxs(K.Fragment,{children:[K.jsx(\"line\",{x1:u.x-Gg.ANCHOR_MARKER_SIZE,y1:u.y,x2:u.x+Gg.ANCHOR_MARKER_SIZE,y2:u.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH}),K.jsx(\"line\",{x1:u.x,y1:u.y-Gg.ANCHOR_MARKER_SIZE,x2:u.x,y2:u.y+Gg.ANCHOR_MARKER_SIZE,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH})]}),C\u0026\u0026K.jsx(\"foreignObject\",{x:Math.min(l.x,u.x),y:l.y+f,width:Math.abs(u.x-l.x),height:20,style:{overflow:\"visible\"},children:K.jsx(\"div\",{style:{...i,textAlign:\"center\"},children:x})}),y\u0026\u0026K.jsx(\"foreignObject\",{x:u.x+I,y:Math.min(l.y,u.y),width:Gg.Y_LABEL_MIN_WIDTH,height:Math.abs(u.y-l.y),style:{overflow:\"visible\"},children:K.jsx(\"div\",{style:{...i,display:\"flex\",alignItems:\"center\",justifyContent:_?\"flex-start\":\"flex-end\",whiteSpace:\"nowrap\",padding:\"0 4px\",height:\"100%\"},children:E})})]},s.id)}),Array.from(r.entries()).map(([s,a])=\u003eK.jsxs(\"g\",{children:[K.jsx(\"line\",{x1:a.x-Gg.ANCHOR_MARKER_SIZE,y1:a.y,x2:a.x+Gg.ANCHOR_MARKER_SIZE,y2:a.y,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH}),K.jsx(\"line\",{x1:a.x,y1:a.y-Gg.ANCHOR_MARKER_SIZE,x2:a.x,y2:a.y+Gg.ANCHOR_MARKER_SIZE,stroke:TE.OFFSET_LINE,strokeWidth:Gg.ANCHOR_MARKER_STROKE_WIDTH})]},`anchor-${s}`))]})})},EHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=\u003e{const r=t.filter(_=\u003eE$e(_)),s=t.filter(_=\u003eKP(_)),a=t.filter(_=\u003eUhn(_)),A=e.map(_=\u003eKP(_._parent_pcb_component)?_._parent_pcb_component.pcb_component_id:KP(_._element)?_._element.pcb_component_id:null).filter(_=\u003e!!_),c=new Set;if(A.forEach(_=\u003e{const f=s.find(I=\u003eI.pcb_component_id===_);f?.pcb_group_id\u0026\u0026c.add(f.pcb_group_id)}),!Kc(_=\u003e_.is_showing_group_anchor_offsets)\u0026\u0026A.length===0)return null;const u=s.map(_=\u003e{const f=_.positioned_relative_to_pcb_board_id;if(!f)return null;const I=r.find(C=\u003eC.pcb_board_id===f);return I?{component:_,board:I,type:\"component\"}:null}).filter(_=\u003e!!_),g=a.map(_=\u003e{const f=_.positioned_relative_to_pcb_board_id;if(!f||!_.center)return null;const I=r.find(C=\u003eC.pcb_board_id===f);return I?{group:_,board:I,type:\"group\"}:null}).filter(_=\u003e!!_),h=[...u,...g];if(h.length===0)return null;const d=A.length===0,p=h.filter(_=\u003e_.type===\"component\"?d||A.includes(_.component.pcb_component_id):d||c.has(_.group.pcb_group_id));if(p.length===0)return null;const m=p.map(_=\u003e_.type===\"component\"?{id:`${_.board.pcb_board_id}-${_.component.pcb_component_id}-${_.type}`,anchor:_.board.center,anchor_id:_.board.pcb_board_id,target:_.component.center,type:\"component\",display_offset_x:_.component.display_offset_x,display_offset_y:_.component.display_offset_y}:{id:`${_.board.pcb_board_id}-${_.group.pcb_group_id}-${_.type}`,anchor:_.board.center,anchor_id:_.board.pcb_board_id,target:{x:_.group.anchor_position?.x??_.group.center.x,y:_.group.anchor_position?.y??_.group.center.y},type:\"group\",display_offset_x:_.group.display_offset_x,display_offset_y:_.group.display_offset_y}).filter(_=\u003e!!_);return K.jsx(B$e,{targets:m,transform:n,containerWidth:o,containerHeight:i})},BHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=\u003e{const r=t.filter(_=\u003eUhn(_)),s=t.filter(_=\u003eKP(_)),a=e.map(_=\u003eKP(_._parent_pcb_component)?_._parent_pcb_component.pcb_component_id:KP(_._element)?_._element.pcb_component_id:null).filter(_=\u003e!!_),A=(_,f)=\u003e{if(f.has(_))return;f.add(_);const I=r.find(C=\u003eC.pcb_group_id===_);I?.position_mode===\"relative_to_group_anchor\"\u0026\u0026I.positioned_relative_to_pcb_group_id\u0026\u0026A(I.positioned_relative_to_pcb_group_id,f)},c=new Set;if(a.forEach(_=\u003e{const f=s.find(I=\u003eI.pcb_component_id===_);f\u0026\u0026(f.position_mode===\"relative_to_group_anchor\"\u0026\u0026f.positioned_relative_to_pcb_group_id\u0026\u0026A(f.positioned_relative_to_pcb_group_id,c),f.pcb_group_id\u0026\u0026A(f.pcb_group_id,c))}),!Kc(_=\u003e_.is_showing_group_anchor_offsets)\u0026\u0026a.length===0)return null;const u=s.map(_=\u003e{if(_.position_mode===\"relative_to_group_anchor\"\u0026\u0026_.positioned_relative_to_pcb_group_id){const f=r.find(I=\u003eI.pcb_group_id===_.positioned_relative_to_pcb_group_id);return f\u0026\u0026f.anchor_position?{component:_,parentGroup:f,type:\"component\"}:null}if(_.pcb_group_id){const f=r.find(I=\u003eI.pcb_group_id===_.pcb_group_id);return f\u0026\u0026f.anchor_position?{component:_,parentGroup:f,type:\"component\"}:null}return null}).filter(_=\u003e!!_),g=r.map(_=\u003e{if(_.position_mode===\"relative_to_group_anchor\"\u0026\u0026_.positioned_relative_to_pcb_group_id){const f=r.find(I=\u003eI.pcb_group_id===_.positioned_relative_to_pcb_group_id);if(f\u0026\u0026f.anchor_position\u0026\u0026_.anchor_position)return{group:_,parentGroup:f,type:\"group\"}}return null}).filter(_=\u003e!!_),h=[...u,...g];if(h.length===0)return null;const d=a.length===0,p=h.filter(_=\u003e_.type===\"component\"?d||a.includes(_.component.pcb_component_id):d||c.has(_.group.pcb_group_id)||c.has(_.parentGroup.pcb_group_id));if(p.length===0)return null;const m=p.map(_=\u003e{const f=_.parentGroup.anchor_position;return f?_.type===\"component\"?_.component.center?{id:`${_.parentGroup.pcb_group_id}-${_.component.pcb_component_id}-${_.type}`,anchor:f,anchor_id:_.parentGroup.pcb_group_id,target:_.component.center,type:\"component\",display_offset_x:_.component.display_offset_x,display_offset_y:_.component.display_offset_y}:null:_.group.anchor_position?{id:`${_.parentGroup.pcb_group_id}-${_.group.pcb_group_id}-${_.type}`,anchor:f,anchor_id:_.parentGroup.pcb_group_id,target:_.group.anchor_position,type:\"group\",display_offset_x:_.group.display_offset_x,display_offset_y:_.group.display_offset_y}:null:null}).filter(_=\u003e!!_);return K.jsx(B$e,{targets:m,transform:n,containerWidth:o,containerHeight:i})},bHi=(t,e)=\u003e{const n=t.pcb_component_id,o=e.filter(i=\u003e(i.type===\"pcb_smtpad\"||i.type===\"pcb_plated_hole\")\u0026\u0026i.pcb_component_id===n||i.type===\"pcb_hole\"\u0026\u0026i.pcb_component_id===n);return o.length===0?_$e([t]):_$e(o)},SHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=\u003e{const r=new Map;for(const a of e)KP(a._parent_pcb_component)\u0026\u0026r.set(a._parent_pcb_component.pcb_component_id,a._parent_pcb_component),KP(a._element)\u0026\u0026r.set(a._element.pcb_component_id,a._element);if(r.size===0)return null;const s=[];for(const a of r.values()){const A=bHi(a,t);if(!A)continue;const c=a.positioned_relative_to_pcb_group_id??a.pcb_group_id,l=c?wS(t).pcb_group.get(c):null;s.push({component:a,bbox:A,group:l})}return s.length===0?null:K.jsx(\"div\",{style:{position:\"absolute\",left:0,top:0,width:o,height:i,overflow:\"hidden\",pointerEvents:\"none\",zIndex:Ru.dimensionOverlay},children:K.jsx(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\"},width:o,height:i,children:s.map(({component:a,bbox:A,group:c})=\u003e{const l=_i(n,{x:A.minX,y:A.maxY}),u=_i(n,{x:A.maxX,y:A.minY}),g={x:Math.min(l.x,u.x),y:Math.min(l.y,u.y),width:Math.abs(u.x-l.x),height:Math.abs(u.y-l.y)},h=a.center??{x:(A.minX+A.maxX)/2,y:(A.minY+A.maxY)/2},d=_i(n,h);return K.jsxs(\"g\",{children:[K.jsx(\"rect\",{x:g.x,y:g.y,width:g.width,height:g.height,fill:\"none\",stroke:\"white\",strokeWidth:1.5,strokeDasharray:\"4,4\"}),K.jsx(\"line\",{x1:d.x-6,y1:d.y,x2:d.x+6,y2:d.y,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1.5}),K.jsx(\"line\",{x1:d.x,y1:d.y-6,x2:d.x,y2:d.y+6,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1.5}),K.jsx(\"circle\",{cx:d.x,cy:d.y,r:Gg.COMPONENT_MARKER_RADIUS,fill:TE.COMPONENT_MARKER_FILL,stroke:TE.COMPONENT_MARKER_STROKE,strokeWidth:1})]},a.pcb_component_id)})})})},QHi=({elements:t,highlightedPrimitives:e,transform:n,containerWidth:o,containerHeight:i})=\u003e{const r=t.filter(h=\u003exHi(h)),s=t.filter(h=\u003eE$e(h)),a=e.map(h=\u003eE$e(h._element)?h._element.pcb_board_id:null).filter(h=\u003e!!h);if(!Kc(h=\u003eh.is_showing_group_anchor_offsets)\u0026\u0026a.length===0)return null;const c=s.map(h=\u003e{const d=h.pcb_panel_id,p=h.position_mode;if(!d||p!==\"relative_to_panel_anchor\")return null;const m=r.find(_=\u003e_.pcb_panel_id===d);return m?{board:h,panel:m,type:\"board\"}:null}).filter(h=\u003e!!h);if(c.length===0)return null;const l=a.length===0,u=c.filter(h=\u003el||a.includes(h.board.pcb_board_id));if(u.length===0)return null;const g=u.map(h=\u003eh.board.center?{id:`${h.panel.pcb_panel_id}-${h.board.pcb_board_id}-${h.type}`,anchor:h.panel.center,anchor_id:h.panel.pcb_panel_id,target:h.board.center,type:\"board\",display_offset_x:h.board.display_offset_x,display_offset_y:h.board.display_offset_y}:null).filter(h=\u003e!!h);return K.jsx(B$e,{targets:g,transform:n,containerWidth:o,containerHeight:i})};function vHi(t){const{primitives:e,is_showing_multiple_traces_length:n,elements:o}=t,i=e.filter(A=\u003eA._element.type===\"pcb_trace\"),r=o.filter(A=\u003eA.type===\"source_trace\"),s=e.filter(A=\u003eA._element.type!==\"pcb_trace\"),a=i.filter(A=\u003er.some(l=\u003eA._element.source_trace_id===l.source_trace_id\u0026\u0026l.max_length!==void 0)||I$e({primitiveElement:A._element,elements:o})!==null);if(!n)return[...s,...a];if(i.length\u003e1){const A=i.reduce((c,l)=\u003e{const u=c._element.trace_length;return l._element.trace_length\u003cu?l:c},i[0]);return[...s,A]}return e}var wHi={position:\"absolute\",left:0,top:0,pointerEvents:\"none\",color:\"red\",fontFamily:\"sans-serif\",fontSize:12,textShadow:\"0 0 2px black\"},PHi=t=\u003e{const{_element:e,_parent_pcb_component:n,_parent_source_component:o,_source_port:i}=t;switch(e.type){case\"pcb_trace\":return e.trace_length?`${e.trace_length.toFixed(3)}`:\"\";case\"pcb_smtpad\":case\"pcb_plated_hole\":{const r=[],s=Array.from(new Set((e.port_hints??[]).concat(i?.port_hints??[]))).filter(A=\u003e!/^[0-9]+$/.test(A)).filter(A=\u003e!A.includes(\"unnamed_\")).sort((A,c)=\u003ec.localeCompare(A)),a=o\u0026\u0026\"name\"in o\u0026\u0026o.name\u0026\u0026!o.name.includes(\"unnamed_\")?o.name:null;return s.length\u003e0?a?r.push(...s.map(A=\u003e`${a}.${A}`)):r.push(...s):a\u0026\u0026r.push(a),r.join(\", \")}default:return\"\"}},MHi={top:\"red\",bottom:\"aqua\"},DHi=({primitive:t,mousePos:e,elements:n})=\u003e{const[o,i]=ee.useState(!1),r=t._element;ee.useEffect(()=\u003e{setTimeout(()=\u003e{i(!0)},100)},[]);const[s,a,A,c]=[t.screen_x,t.screen_y,t.screen_w,t.screen_h],l=t.same_space_index??0,u=26,g=MHi[t?._element?.layer]??\"red\";let h=0;if(r.type===\"pcb_smtpad\"\u0026\u0026r?.shape===\"rotated_rect\"?h=r?.ccw_rotation??0:(r.type===\"pcb_smtpad\"\u0026\u0026(r?.shape===\"pill\"||r?.shape===\"rotated_pill\")\u0026\u0026\"ccw_rotation\"in t||r.type===\"pcb_plated_hole\"\u0026\u0026(r?.shape===\"pill\"||r?.shape===\"oval\")\u0026\u0026\"ccw_rotation\"in t)\u0026\u0026(h=r.ccw_rotation??0),r.type===\"pcb_trace\"){const m=chn({primitiveElement:r,elements:n});return m?K.jsx(\"div\",{style:{zIndex:Ru.elementOverlay,position:\"absolute\",left:e.x+12,top:e.y+12,color:g,pointerEvents:\"none\"},children:K.jsxs(\"div\",{style:{backgroundColor:\"#f2efcc\",color:m.isOverLength?\"red\":\"black\",textShadow:\"none\",WebkitFontSmoothing:\"antialiased\",MozOsxFontSmoothing:\"grayscale\",padding:\"4px 6px\",borderRadius:\"4px\",fontSize:\"11px\",lineHeight:1.2,textAlign:\"left\",whiteSpace:\"nowrap\"},children:[m.text\u0026\u0026K.jsx(\"div\",{children:m.text}),m.name\u0026\u0026K.jsx(\"div\",{style:{marginTop:m.text?\"2px\":0},children:m.name})]})}):null}const d=PHi(t);return d.trim().length===0?null:K.jsx(\"div\",{style:{zIndex:Ru.elementOverlay,position:\"absolute\",left:s-A/2-8,top:a-c/2-8,width:A+16,height:c+16,color:g,transform:`rotate(${-h}deg)`,transformOrigin:\"center center\"},children:K.jsx(\"div\",{style:{width:o?`calc(100% + ${u*2*l}px)`:\"100%\",height:o?`calc(100% + ${u*2*l}px)`:\"100%\",marginLeft:o?`${-u*l}px`:0,marginTop:o?`${-u*l}px`:0,border:`1px solid ${g}`,opacity:o||l===0?1:0,transition:\"width 0.2s, height 0.2s, margin-left 0.2s, margin-top 0.2s, opacity 0.2s\"},children:K.jsx(\"div\",{style:{position:\"absolute\",bottom:c+20+u*l,marginRight:o?`${-u*l}px`:0,marginBottom:o?0:-u*l,transition:\"margin-right 0.2s, margin-bottom 0.2s\",backgroundColor:\"#f2efcc\",color:\"black\",textShadow:\"none\",WebkitFontSmoothing:\"antialiased\",MozOsxFontSmoothing:\"grayscale\",padding:\"6px 6px\",borderRadius:\"6px\",fontSize:\"14px\",transform:`rotate(${h}deg)`,minWidth:\"45px\",textAlign:\"center\"},children:d})})})},NHi=({highlightedPrimitives:t,mousePos:e,elements:n})=\u003e{const[o,i]=Kc(a=\u003e[a.is_moving_component,a.is_showing_multiple_traces_length]),r=t.some(a=\u003ea._element.type===\"pcb_smtpad\")\u0026\u0026t.some(a=\u003ea._element.type===\"pcb_trace\");let s=t;return r\u0026\u0026(s=s.filter(a=\u003ea._element.type===\"pcb_smtpad\")),s=vHi({primitives:s,is_showing_multiple_traces_length:i,elements:n}),K.jsx(\"div\",{style:wHi,children:!o\u0026\u0026s.map(a=\u003eK.jsx(DHi,{primitive:a,mousePos:e,elements:n},a._pcb_drawing_object_id))})},gfe=t=\u003e{if(t.length===0)return null;let e=t[0].x,n=t[0].y,o=t[0].x,i=t[0].y;for(const r of t)r.x\u003ce\u0026\u0026(e=r.x),r.y\u003cn\u0026\u0026(n=r.y),r.x\u003eo\u0026\u0026(o=r.x),r.y\u003ei\u0026\u0026(i=r.y);return{center:{x:(e+o)/2,y:(n+i)/2},width:o-e,height:i-n}},Khn=(t,e)=\u003e{if(e.length\u003c3)return!1;let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o].x,s=e[o].y,a=e[i].x,A=e[i].y;s\u003et.y!=A\u003et.y\u0026\u0026t.x\u003c(a-r)*(t.y-s)/(A-s||Number.EPSILON)+r\u0026\u0026(n=!n)}return n},b$e=(t,e,n,o,i=!1)=\u003e{const r=[];for(const s of t){if(!s._element||!i\u0026\u0026s._element.type===\"pcb_trace\"\u0026\u0026s.layer!==o)continue;if(\"x1\"in s\u0026\u0026s._element?.type===\"pcb_trace\"){const c=Zd({x:e.x,y:e.y},{x:s.x1,y:s.y1},{x:s.x2,y:s.y2}),l=s.width||.5,u=Math.max(l*25,2)/n.a;c\u003cu\u0026\u0026r.push(s);continue}if(s.pcb_drawing_type===\"polygon\"){const c=s.points.map(u=\u003e({x:lt.parse(u.x),y:lt.parse(u.y)})),l=gfe(c);if(!l||e.x\u003cl.center.x-l.width/2||e.x\u003el.center.x+l.width/2||e.y\u003cl.center.y-l.height/2||e.y\u003el.center.y+l.height/2)continue;Khn(e,c)\u0026\u0026r.push(s);continue}if(s.pcb_drawing_type===\"polygon_with_arcs\"){const c=s.brep_shape.outer_ring.vertices.map(u=\u003e({x:lt.parse(u.x),y:lt.parse(u.y)})),l=gfe(c);if(!l||e.x\u003cl.center.x-l.width/2||e.x\u003el.center.x+l.width/2||e.y\u003cl.center.y-l.height/2||e.y\u003el.center.y+l.height/2)continue;Khn(e,c)\u0026\u0026r.push(s);continue}if(!(\"x\"in s\u0026\u0026\"y\"in s))continue;let a=0,A=0;if(\"w\"in s\u0026\u0026\"h\"in s)a=s.w,A=s.h;else if(\"r\"in s)a=s.r*2,A=s.r*2;else if(\"rX\"in s\u0026\u0026\"rY\"in s)a=s.rX*2,A=s.rY*2;else continue;Math.abs(s.x-e.x)\u003ca/2\u0026\u0026Math.abs(s.y-e.y)\u003cA/2\u0026\u0026r.push(s)}return r},RHi=({elements:t,children:e,transform:n,primitives:o,selectedLayer:i,onMouseHoverOverPrimitives:r})=\u003e{const[s,a]=ee.useState([]),[A,c]=ee.useState({x:0,y:0}),[l,{width:u,height:g}]=uee();ee.useEffect(()=\u003e{a([]),r([])},[i,o,r]);const h=ee.useMemo(()=\u003e{const p=[];for(const m of s){if(m._element?.type===\"pcb_via\"||m._element?.type===\"pcb_component\"||m?.layer===\"drill\"||m?.is_hoverable===!1)continue;let _=null,f=0,I=0;if(m.pcb_drawing_type===\"polygon\"){const E=gfe(m.points);if(!E)continue;_=E.center,f=E.width,I=E.height}else if(m.pcb_drawing_type===\"polygon_with_arcs\"){const E=m.brep_shape.outer_ring.vertices.map(S=\u003e({x:S.x,y:S.y})),B=gfe(E);if(!B)continue;_=B.center,f=B.width,I=B.height}else m.pcb_drawing_type===\"line\"?(_={x:(m.x1+m.x2)/2,y:(m.y1+m.y2)/2},f=Math.abs(m.x2-m.x1),I=Math.abs(m.y2-m.y1)):\"x\"in m\u0026\u0026\"y\"in m\u0026\u0026(_={x:m.x,y:m.y},f=\"w\"in m?m.w:\"r\"in m?m.r*2:\"rX\"in m\u0026\u0026\"rY\"in m?m.rX*2:0,I=\"h\"in m?m.h:\"r\"in m?m.r*2:\"rX\"in m\u0026\u0026\"rY\"in m?m.rY*2:0);if(!_)continue;const C=_i(n,_),y={w:f*n.a,h:I*n.a},x=p.filter(E=\u003eC.x===E.screen_x\u0026\u0026C.y===E.screen_y\u0026\u0026y.w===E.screen_w\u0026\u0026y.h===E.screen_h).length;p.push({...m,x:_.x,y:_.y,w:f,h:I,screen_x:C.x,screen_y:C.y,screen_w:y.w,screen_h:y.h,same_space_index:x})}return p},[s,n]),d=(p,m,_,f)=\u003e{c({x:p,y:m});const I=_i(V6(_),{x:p,y:m}),C=b$e(f,I,_,i);yHi(new Set(C.map(y=\u003ey._pcb_drawing_object_id)),new Set(s.map(y=\u003ey._pcb_drawing_object_id)))||(a(C),r(C))};return K.jsxs(\"div\",{ref:l,style:{position:\"relative\",width:\"100%\",height:\"100%\"},onMouseMove:p=\u003e{if(n){const m=p.currentTarget.getBoundingClientRect(),_=p.clientX-m.left,f=p.clientY-m.top;d(_,f,n,o)}},onTouchStart:p=\u003e{if(n){const m=p.touches[0],_=p.currentTarget.getBoundingClientRect(),f=m.clientX-_.left,I=m.clientY-_.top;d(f,I,n,o)}},children:[e,K.jsx(NHi,{elements:t,mousePos:A,highlightedPrimitives:h}),n\u0026\u0026K.jsxs(K.Fragment,{children:[K.jsx(EHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g}),K.jsx(BHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g}),K.jsx(SHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g}),K.jsx(QHi,{elements:t,highlightedPrimitives:h,transform:n,containerWidth:u,containerHeight:g})]})]})},Vhn=[\"rgb(255, 100, 100)\",\"rgb(100, 255, 100)\",\"rgb(100, 100, 255)\",\"rgb(255, 255, 100)\",\"rgb(255, 100, 255)\",\"rgb(100, 255, 255)\",\"rgb(255, 150, 100)\",\"rgb(150, 100, 255)\",\"rgb(100, 255, 150)\",\"rgb(255, 100, 150)\"],THi=({children:t,transform:e=RP(),elements:n=[],hoveredComponentIds:o=[]})=\u003e{const[i,{width:r,height:s}]=uee(),a=ee.useRef(null),{is_showing_pcb_groups:A,pcb_group_view_mode:c,is_showing_group_anchor_offsets:l}=Kc(u=\u003e({is_showing_pcb_groups:u.is_showing_pcb_groups,pcb_group_view_mode:u.pcb_group_view_mode,is_showing_group_anchor_offsets:u.is_showing_group_anchor_offsets}));return ee.useEffect(()=\u003e{const u=a.current;if(!u||!r||!s)return;u.width=r,u.height=s;const g=u.getContext(\"2d\");if(!g||(g.clearRect(0,0,r,s),!A))return;const h=n.filter(x=\u003ex.type===\"pcb_group\"),d=n.filter(x=\u003ex.type===\"pcb_component\"),p=n.filter(x=\u003ex.type===\"source_group\"),m=new Map(p.map(x=\u003e[x.source_group_id,x])),_=h.filter(x=\u003e{if(x.name?.toLowerCase().includes(\"subpanel\"))return!1;if(c===\"all\")return!0;if(!x.source_group_id)return!1;const E=m.get(x.source_group_id);return E?E.was_automatically_named!==!0:!1}),f=new Map;p.forEach(x=\u003e{const E=x;if(E.parent_source_group_id){const B=f.get(E.parent_source_group_id)||[];B.push(x.source_group_id),f.set(E.parent_source_group_id,B)}});const I=x=\u003e{const E=[],B=f.get(x)||[];for(const S of B)E.push(S),E.push(...I(S));return E},C=x=\u003e{const E=p.find(B=\u003eB.source_group_id===x);return E?.parent_source_group_id?1+C(E.parent_source_group_id):0},y=new Set;if(o.length\u003e0)for(const x of d){if(!o.includes(x.pcb_component_id))continue;const E=x.positioned_relative_to_pcb_group_id??x.pcb_group_id;E\u0026\u0026y.add(E)}_.forEach((x,E)=\u003e{let B=d.filter(we=\u003ewe.pcb_group_id===x.pcb_group_id);if(x.source_group_id){const we=I(x.source_group_id),Te=h.filter(Re=\u003eRe.source_group_id\u0026\u0026we.includes(Re.source_group_id));for(const Re of Te){const Ee=d.filter(ke=\u003eke.pcb_group_id===Re.pcb_group_id);B=[...B,...Ee]}}let S,Q,w,M,k=!1;if(x.center\u0026\u0026x.width\u0026\u0026x.height){k=!0;const we=x.width/2,Te=x.height/2;S=x.center.x-we,w=x.center.x+we,Q=x.center.y-Te,M=x.center.y+Te}else if(B.length===0||(S=1/0,Q=1/0,w=-1/0,M=-1/0,B.forEach(we=\u003e{if(we.center\u0026\u0026typeof we.width==\"number\"\u0026\u0026typeof we.height==\"number\"){const Te=we.center.x-we.width/2,Re=we.center.x+we.width/2,Ee=we.center.y+we.height/2,ke=we.center.y-we.height/2;S=Math.min(S,Te),w=Math.max(w,Re),Q=Math.min(Q,ke),M=Math.max(M,Ee)}}),S===1/0||w===-1/0))return;const R=x.source_group_id?C(x.source_group_id):0,F=x.source_group_id?I(x.source_group_id).length\u003e0:!1;if(!k){const Re=1+(F?.5:0);S-=Re,w+=Re,Q-=Re,M+=Re}const O=_i(e,{x:S,y:M}),U=_i(e,{x:w,y:M}),Y=_i(e,{x:S,y:Q}),W=_i(e,{x:w,y:Q}),te=Vhn[E%Vhn.length];g.strokeStyle=te,g.lineWidth=2;const j=Math.max(4,Math.min(12,8*Math.abs(e.a))),J=Math.max(2,Math.min(6,4*Math.abs(e.a))),ie=j*(F?1.3:1),ne=J;g.setLineDash([ie,ne]),g.beginPath(),g.moveTo(O.x,O.y),g.lineTo(U.x,U.y),g.lineTo(W.x,W.y),g.lineTo(Y.x,Y.y),g.closePath(),g.stroke();const le=Math.max(8,Math.min(12,10*Math.abs(e.a))),ge=R==0||R==1?0:R*.11,_e=le*(1-ge),ue=4,fe=x.name||`Group ${E+1}`;g.font=`${_e}px sans-serif`,g.setLineDash([]);const ye=g.measureText(fe).width+ue*2,Me=_e+ue*2,ve=O.x-5,he=O.y-5,Qe=3;if(g.fillStyle=\"rgba(0, 0, 0, 0.8)\",g.beginPath(),g.roundRect(ve,he-Me,ye,Me,Qe),g.fill(),g.fillStyle=te,g.textAlign=\"left\",g.textBaseline=\"middle\",g.fillText(fe,ve+ue,he-Me/2),l\u0026\u0026y.has(x.pcb_group_id)\u0026\u0026!!x.anchor_position\u0026\u0026x.anchor_position){const we=Array.isArray(x.anchor_position)?{x:x.anchor_position[0]??0,y:x.anchor_position[1]??0}:{x:x.anchor_position.x,y:x.anchor_position.y},Te=_i(e,we);g.strokeStyle=\"white\",g.lineWidth=1.5,g.setLineDash([]);const Re=Math.max(4,Math.min(8,6*Math.abs(e.a)));g.beginPath(),g.moveTo(Te.x-Re,Te.y),g.lineTo(Te.x+Re,Te.y),g.stroke(),g.beginPath(),g.moveTo(Te.x,Te.y-Re),g.lineTo(Te.x,Te.y+Re),g.stroke()}})},[n,e,r,s,A,c,l,o]),K.jsxs(\"div\",{ref:i,style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:[t,K.jsx(\"canvas\",{ref:a,style:{position:\"absolute\",top:0,left:0,pointerEvents:\"none\",zIndex:Ru.pcbGroupOverlay,display:A?\"block\":\"none\"}})]})},kHi=({transform:t,soup:e,children:n})=\u003e{const o=Kc(a=\u003ea.is_showing_rats_nest),{netMap:i,idToNetMap:r}=ee.useMemo(()=\u003enhn(e||[]),[e]),s=ee.useMemo(()=\u003e{if(!e||!o)return[];const a=g=\u003e{const h=wS(e)[g.replace(/_\\d+$/,\"\")].get(g);return h\u0026\u0026\"x\"in h\u0026\u0026\"y\"in h?{x:h.x,y:h.y}:null},A=(g,h)=\u003e{const d=i[h]||[];let p=null,m=1/0;return d.forEach(_=\u003e{const f=a(_);if(f){const I=Math.sqrt((g.x-f.x)**2+(g.y-f.y)**2);I\u003cm\u0026\u0026I\u003e0\u0026\u0026(m=I,p=f)}}),p},c=wS(e).pcb_port.list(),l=wS(e).source_trace.list(),u=[];return c.forEach((g,h)=\u003e{const d=r[g.pcb_port_id];let p=!1;for(const f of l)f.connected_source_port_ids.includes(g.source_port_id)\u0026\u0026f.connected_source_net_ids.length\u003e0\u0026\u0026(p=!0);if(!d)return;const m={x:g.x,y:g.y},_=A(m,d);_\u0026\u0026u.push({key:`${g.pcb_port_id}-${h}`,startPoint:m,endPoint:_,isInNet:p})}),u},[e,i,r,o]);return!e||!o?n:(t||(t=RP()),K.jsxs(\"div\",{style:{position:\"relative\"},children:[n,K.jsx(\"svg\",{style:{position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\",opacity:.5,zIndex:Ru.ratsNestOverlay},children:s.map(({key:a,startPoint:A,endPoint:c,isInNet:l})=\u003e{const u=_i(t,A),g=_i(t,c);return K.jsx(\"line\",{x1:u.x,y1:u.y,x2:g.x,y2:g.y,stroke:\"white\",strokeWidth:\"1\",strokeDasharray:l?\"6,6\":void 0},a)})})]}))},FHi={version:\"1.11.414\"},Z6=(t,e,n)=\u003e{const o=Kc(s=\u003es.is_mouse_over_container),i=ee.useRef(o),r=ee.useRef(e);ee.useEffect(()=\u003e{i.current=o},[o]),ee.useEffect(()=\u003e{r.current=e},[e]),ee.useEffect(()=\u003e{if(!t)return;const s=a=\u003e{const A=a.target;if(A.tagName===\"INPUT\"||A.tagName===\"TEXTAREA\"||A.isContentEditable)return;const c=t.split(\"+\"),l=c.includes(\"ctrl\"),u=c.includes(\"shift\"),g=c.includes(\"alt\"),h=c.includes(\"meta\"),d=c[c.length-1],p=n?.current?n.current.contains(document.activeElement)||document.activeElement===n.current:!1;(i.current||p)\u0026\u0026(!l||a.ctrlKey)\u0026\u0026(!u||a.shiftKey)\u0026\u0026(!g||a.altKey)\u0026\u0026(!h||a.metaKey)\u0026\u0026a.key.toLowerCase()===d.toLowerCase()\u0026\u0026(a.preventDefault(),r.current())};return window.addEventListener(\"keydown\",s),()=\u003e{window.removeEventListener(\"keydown\",s)}},[t])},LHi=()=\u003e{const[t,e]=ee.useState(!1);return ee.useEffect(()=\u003e{const n=()=\u003e{e(window.innerWidth\u003c=768)};return n(),window.addEventListener(\"resize\",n),()=\u003ewindow.removeEventListener(\"resize\",n)},[]),t},pee=(t,e={stopPropagation:!0})=\u003e{const n=ee.useRef(0),o=ee.useCallback(s=\u003e{e.stopPropagation\u0026\u0026s.stopPropagation();const a=Date.now();a-n.current\u003c300||(n.current=a,t?.(s))},[t,e.stopPropagation]),i=ee.useCallback(s=\u003e{s.preventDefault(),o(s)},[o]);return{onClick:o,onTouchEnd:i,style:{touchAction:\"manipulation\"}}},dfe=kU`\n background: #222;\n color: #eee;\n border: 1px solid #555;\n border-radius: 4px;\n padding: 4px;\n font: 12px sans-serif;\n box-shadow: 0 4px 16px #0008;\n`,e8=kU`\n display: block;\n width: 100%;\n padding: 8px;\n border: 0;\n border-radius: 2px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n white-space: nowrap;\n cursor: pointer;\n \u0026:hover, \u0026:focus-visible { background: #444; }\n`,HHi=({component:t,onViewSchematicComponent:e,position:n,onClose:o,onXRayNet:i,xRayGroups:r=[],onXRayGroup:s,xRayDisplayName:a=\"Net\",onExitXRayNet:A})=\u003e{const c=eTi(),[l,u]=ee.useState(!1),g=Kc(x=\u003ex.hidden_layer_opacity),h=Kc(x=\u003ex.setHiddenLayerOpacity),[d,p]=ee.useState(!1),[m,_]=ee.useState(!1),f=ee.useRef(null),I=window.innerWidth\u003c480,C=!I\u0026\u0026n.x+460\u003ewindow.innerWidth,y=I?{position:\"relative\"}:{position:\"absolute\",top:0,...C?{right:\"100%\"}:{left:\"100%\"}};return ee.useEffect(()=\u003e{const x=B=\u003e{f.current?.contains(B.target)||(B.preventDefault(),o())},E=B=\u003e{B.key===\"Escape\"\u0026\u0026(B.preventDefault(),o())};return f.current?.querySelector(\"button\")?.focus(),window.addEventListener(\"pointerdown\",x,!0),window.addEventListener(\"keydown\",E),window.addEventListener(\"resize\",o),window.addEventListener(\"scroll\",o,!0),()=\u003e{window.removeEventListener(\"pointerdown\",x,!0),window.removeEventListener(\"keydown\",E),window.removeEventListener(\"resize\",o),window.removeEventListener(\"scroll\",o,!0)}},[o]),c6.createPortal(K.jsxs(\"div\",{ref:f,role:\"menu\",\"aria-label\":\"PCB context menu\",className:dfe,onContextMenu:x=\u003e{x.preventDefault(),x.stopPropagation()},onPointerDown:x=\u003ex.stopPropagation(),onMouseDown:x=\u003ex.stopPropagation(),onClick:x=\u003ex.stopPropagation(),onKeyDown:x=\u003e{x.stopPropagation();const E=x.target.closest(\"button\");if(!E)return;const B=E.closest('[role=\"menu\"]'),S=Array.from(B.querySelectorAll(\"button:not(:disabled)\")).filter(Q=\u003eQ.closest('[role=\"menu\"]')===B);if(x.key===\"ArrowDown\"||x.key===\"ArrowUp\"){x.preventDefault();const Q=x.key===\"ArrowDown\"?1:-1;S[(S.indexOf(E)+Q+S.length)%S.length]?.focus()}else x.key===\"ArrowRight\"\u0026\u0026E.hasAttribute(\"aria-haspopup\")?(x.preventDefault(),E.click(),requestAnimationFrame(()=\u003eE.parentElement?.querySelector('[role=\"menu\"] button')?.focus())):x.key===\"ArrowLeft\"?(x.preventDefault(),B.parentElement?.querySelector(\":scope \u003e button\")?.focus(),B.getAttribute(\"aria-label\")===\"Hidden Layer Visibility\"?_(!1):B.getAttribute(\"aria-label\")===\"Visibility\"?p(!1):B.getAttribute(\"aria-label\")===\"Rendering Engine\"\u0026\u0026u(!1)):x.key===\"Escape\"\u0026\u0026(x.preventDefault(),o())},style:{position:\"fixed\",zIndex:1e4,left:Math.max(C?310:4,Math.min(n.x,window.innerWidth-(I?248:168))),top:Math.max(4,Math.min(n.y,window.innerHeight-(I?340:260))),width:I?230:150,maxHeight:window.innerHeight-8,...I?{overflowY:\"auto\"}:{}},children:[i\u0026\u0026K.jsxs(\"button\",{type:\"button\",role:\"menuitem\",className:e8,style:{whiteSpace:\"normal\",overflowWrap:\"anywhere\"},onClick:()=\u003e{i(),o()},children:[\"X-Ray \",a]}),s\u0026\u0026r.map(x=\u003eK.jsxs(\"button\",{type:\"button\",role:\"menuitem\",className:e8,style:{whiteSpace:\"normal\",overflowWrap:\"anywhere\"},onClick:()=\u003e{s(x),o()},children:[\"X-Ray \",x.name]},x.id)),A\u0026\u0026K.jsx(\"button\",{type:\"button\",role:\"menuitem\",className:e8,onClick:()=\u003e{A(),o()},children:\"Exit X-Ray Net\"}),K.jsxs(\"div\",{style:{position:\"relative\"},onMouseEnter:()=\u003e{p(!0),u(!1)},children:[K.jsx(\"button\",{type:\"button\",role:\"menuitem\",\"aria-haspopup\":\"menu\",\"aria-expanded\":d,className:e8,onClick:()=\u003e{p(!0),u(!1)},children:\"Visibility ▸\"}),d\u0026\u0026K.jsx(\"div\",{role:\"menu\",\"aria-label\":\"Visibility\",className:dfe,style:y,children:K.jsxs(\"div\",{style:{position:\"relative\"},onMouseEnter:()=\u003e_(!0),children:[K.jsx(\"button\",{type:\"button\",role:\"menuitem\",\"aria-haspopup\":\"menu\",\"aria-expanded\":m,className:e8,onClick:()=\u003e_(!0),children:\"Hidden Layer Visibility ▸\"}),m\u0026\u0026K.jsx(\"div\",{role:\"menu\",\"aria-label\":\"Hidden Layer Visibility\",className:dfe,style:{minWidth:80,...y},children:[0,.05,.1,.2,.4,.6,.8,1].map(x=\u003eK.jsxs(\"button\",{type:\"button\",role:\"menuitemradio\",\"aria-checked\":g===x,className:e8,onClick:()=\u003e{h(x),o()},children:[K.jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"inline-block\",width:16},children:g===x?\"✓\":\"\"}),x===0?\"Hide\":`${x*100}%`]},x))})]})})]}),c\u0026\u0026K.jsxs(\"div\",{style:{position:\"relative\"},onMouseEnter:()=\u003e{u(!0),p(!1)},children:[K.jsx(\"button\",{type:\"button\",role:\"menuitem\",\"aria-haspopup\":\"menu\",\"aria-expanded\":l,className:e8,onClick:()=\u003e{u(!0),p(!1)},children:\"Rendering Engine ▸\"}),l\u0026\u0026K.jsx(\"div\",{role:\"menu\",\"aria-label\":\"Rendering Engine\",className:dfe,style:y,children:[\"canvas\",\"webgpu\"].map(x=\u003eK.jsxs(\"button\",{type:\"button\",role:\"menuitemradio\",\"aria-checked\":c.renderer===x,className:e8,onClick:()=\u003e{c.setRenderer(x),o()},children:[K.jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"inline-block\",width:16},children:c.renderer===x?\"✓\":\"\"}),x===\"canvas\"?\"Canvas\":\"WebGPU (experimental)\"]},x))})]}),t\u0026\u0026e\u0026\u0026K.jsxs(\"button\",{type:\"button\",role:\"menuitem\",className:e8,style:{whiteSpace:\"normal\",overflowWrap:\"anywhere\"},onClick:()=\u003e{o(),e({source_component_id:t.source_component_id,pcb_component_id:t.pcb_component_id,refdes:t.refdes})},children:[K.jsx(\"svg\",{\"aria-hidden\":\"true\",width:\"12\",height:\"12\",viewBox:\"0 0 16 16\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",style:{verticalAlign:\"-1px\",marginRight:5},children:K.jsx(\"path\",{d:\"M5 11 11 5M5 5h6v6\"})}),t.refdes,\" on Schematic\"]}),t?.manufacturer_part_number\u0026\u0026K.jsxs(\"button\",{type:\"button\",role:\"menuitem\",disabled:!0,\"aria-label\":`Manufacturer part number: ${t.manufacturer_part_number}`,className:e8,style:{marginTop:4,background:\"#292929\",color:\"#aaa\",cursor:\"default\",whiteSpace:\"normal\",overflowWrap:\"anywhere\"},children:[\"MPN: \",t.manufacturer_part_number]})]}),document.body)},WU=({children:t,isSmallScreen:e,onClick:n,...o})=\u003e{const{style:i,...r}=pee(n);return K.jsx(\"div\",{...o,...r,style:{backgroundColor:\"#1F1F1F\",border:\"1px solid #666\",margin:0,padding:4,paddingLeft:e?8:6,paddingRight:e?8:6,borderRadius:2,color:\"#eee\",cursor:\"pointer\",fontSize:12,height:\"fit-content\",userSelect:\"none\",whiteSpace:\"nowrap\",...i,...o.style},children:t})},OHi=t=\u003e{const e=new Map;return t.forEach((n,o)=\u003e{const i=n.error_type||\"unknown_error\",r=e.get(i)||[];r.push({error:n,index:o,errorId:JU(n,o)}),e.set(i,r)}),Array.from(e.entries()).map(([n,o])=\u003e({errorType:n,errors:o}))},GHi=({onClose:t,setHoveredErrorId:e,setFocusedErrorId:n,highlightDurationMs:o=3e3})=\u003e{const i=ee.useRef(null),r=ee.useRef(null),s=ee.useRef(null),a=ee.useCallback(()=\u003e{i.current!==null\u0026\u0026(window.clearTimeout(i.current),i.current=null),r.current!==null\u0026\u0026(window.cancelAnimationFrame(r.current),r.current=null)},[]);ee.useEffect(()=\u003ea,[a]);const A=ee.useCallback(l=\u003e{a(),s.current=l,e(l),n(null),r.current=window.requestAnimationFrame(()=\u003e{n(l),r.current=null}),t(),i.current=window.setTimeout(()=\u003e{s.current=null,e(null),n(null),i.current=null},o)},[a,o,t,n,e]),c=ee.useCallback(l=\u003es.current===l,[]);return{handleErrorSelect:A,isSelectedError:c}},YHi=({errorId:t,errorMessage:e,copiedErrorId:n,onCopy:o})=\u003e{const{style:i,...r}=pee(()=\u003eo(e,t));return K.jsx(\"button\",{type:\"button\",\"aria-label\":n===t?\"Error message copied\":\"Copy error message\",style:{position:\"absolute\",top:12,right:16,cursor:\"pointer\",color:\"#888\",fontSize:16,background:\"none\",border:\"none\",padding:0,display:\"flex\",alignItems:\"center\",...i},...r,children:n===t?K.jsx(\"span\",{style:{color:\"#4caf50\",fontSize:12},children:\"Copied!\"}):K.jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"currentColor\",children:K.jsx(\"path\",{d:\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"})})})},UHi=({elements:t,isOpen:e,isSmallScreen:n,onToggle:o,onClose:i,setHoveredErrorId:r,setFocusedErrorId:s})=\u003e{const[a,A]=ee.useState(null),[c,l]=ee.useState(new Set),[u,g]=ee.useState(new Set),[,h]=oFi(),{handleErrorSelect:d,isSelectedError:p}=GHi({onClose:i,setHoveredErrorId:r,setFocusedErrorId:s}),m=ee.useMemo(()=\u003et?.filter(y=\u003ey.type.includes(\"error\"))??[],[t]),_=m.length,f=ee.useMemo(()=\u003eOHi(m),[m]),I=ee.useCallback(y=\u003e{l(x=\u003e{const E=new Set(x);return E.has(y)?E.delete(y):E.add(y),E})},[]),C=ee.useCallback(y=\u003e{g(x=\u003e{const E=new Set(x);return E.has(y)?E.delete(y):E.add(y),E})},[]);return K.jsxs(\"div\",{style:{position:\"relative\"},children:[K.jsx(WU,{isSmallScreen:n,style:_\u003e0?{color:\"red\"}:void 0,onClick:o,children:K.jsxs(\"div\",{children:[_,\" errors\"]})}),e\u0026\u0026_\u003e0\u0026\u0026K.jsx(\"div\",{style:{position:\"absolute\",top:\"100%\",left:0,backgroundColor:\"#2a2a2a\",border:\"1px solid #666\",borderRadius:4,marginTop:4,zIndex:1e3,minWidth:n?\"280px\":\"400px\",maxWidth:n?\"90vw\":\"600px\",maxHeight:\"400px\",overflow:\"auto\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.3)\"},children:f.map(({errorType:y,errors:x},E)=\u003e{const B=c.has(y);return K.jsxs(\"div\",{style:{borderBottom:E\u003cf.length-1?\"1px solid #444\":\"none\"},children:[K.jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",padding:\"12px 16px\",cursor:\"pointer\",backgroundColor:\"#232323\",transition:\"background-color 0.2s ease\",touchAction:\"manipulation\",position:\"sticky\",top:0,zIndex:1},onMouseEnter:S=\u003e{S.currentTarget.style.backgroundColor=\"#303030\"},onMouseLeave:S=\u003e{S.currentTarget.style.backgroundColor=\"#232323\"},onTouchStart:S=\u003e{S.stopPropagation(),S.currentTarget.style.backgroundColor=\"#303030\"},onTouchEnd:S=\u003e{S.stopPropagation(),S.preventDefault(),S.currentTarget.style.backgroundColor=\"#232323\",I(y)},onClick:S=\u003e{S.stopPropagation(),I(y)},children:[K.jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:8,color:\"#ff6b6b\"},children:[K.jsx(\"div\",{style:{color:\"#888\",fontSize:\"16px\",transform:B?\"rotate(90deg)\":\"rotate(0deg)\",transition:\"transform 0.2s ease\",flexShrink:0},children:\"›\"}),K.jsx(\"div\",{style:{fontWeight:\"bold\",fontSize:n?\"12px\":\"13px\"},children:y})]}),K.jsx(\"div\",{style:{fontSize:n?\"12px\":\"13px\",color:\"#aaa\",whiteSpace:\"nowrap\",marginLeft:12},children:x.length})]}),!B\u0026\u0026x.map(({error:S,index:Q,errorId:w})=\u003e{const M=u.has(w),k=S.message??\"No error message\";return K.jsxs(\"div\",{style:{borderTop:\"1px solid #3a3a3a\"},children:[K.jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:12,padding:\"12px 16px 12px 24px\",cursor:\"pointer\",backgroundColor:\"#2a2a2a\",transition:\"background-color 0.2s ease\",touchAction:\"manipulation\"},onMouseEnter:R=\u003e{R.currentTarget.style.backgroundColor=\"#333\",r(w)},onMouseLeave:R=\u003e{R.currentTarget.style.backgroundColor=\"#2a2a2a\",p(w)||r(null)},onTouchStart:R=\u003e{R.stopPropagation(),R.currentTarget.style.backgroundColor=\"#333\",r(w)},onTouchEnd:R=\u003e{R.stopPropagation(),R.preventDefault(),R.currentTarget.style.backgroundColor=\"#2a2a2a\",d(w)},onClick:R=\u003e{R.stopPropagation(),d(w)},children:[K.jsx(\"div\",{style:{flex:1,fontSize:n?\"12px\":\"13px\",color:\"#ddd\",lineHeight:1.4,overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\",userSelect:\"text\"},children:k}),K.jsx(\"button\",{type:\"button\",\"aria-label\":M?\"Collapse error details\":\"Expand error details\",style:{color:\"#888\",fontSize:\"16px\",transform:M?\"rotate(0deg)\":\"rotate(90deg)\",transition:\"transform 0.2s ease\",flexShrink:0,background:\"none\",border:\"none\",padding:0,cursor:\"pointer\"},onMouseDown:R=\u003eR.stopPropagation(),onClick:R=\u003e{R.stopPropagation(),C(w)},onTouchEnd:R=\u003e{R.stopPropagation(),R.preventDefault(),C(w)},children:\"›\"})]}),M\u0026\u0026K.jsxs(\"div\",{\"data-error-id\":Q,style:{display:\"block\",padding:\"12px 16px 12px 24px\",backgroundColor:\"#1a1a1a\",borderTop:\"1px solid #444\",position:\"relative\"},children:[K.jsx(\"div\",{style:{fontSize:n?\"11px\":\"12px\",color:\"#ccc\",lineHeight:1.5,wordWrap:\"break-word\",overflowWrap:\"break-word\",hyphens:\"auto\",userSelect:\"text\",paddingRight:30},onMouseDown:R=\u003eR.stopPropagation(),onClick:R=\u003eR.stopPropagation(),children:k}),K.jsx(YHi,{errorId:w,errorMessage:k,copiedErrorId:a,onCopy:(R,F)=\u003e{h(R),A(F),setTimeout(()=\u003eA(null),2e3)}})]})]},w)})]},y)})})]})},KHi=({name:t,selected:e,onClick:n})=\u003e{const{style:o,...i}=pee(n);return K.jsxs(\"div\",{className:kU`\n margin-top: 2px;\n padding: 4px;\n padding-left: 8px;\n padding-right: 18px;\n cursor: pointer;\n\n \u0026:hover {\n background-color: rgba(255, 255, 255, 0.1);\n }\n `,...i,style:o,children:[K.jsx(\"span\",{style:{marginRight:2,opacity:e?1:0},children:\"•\"}),K.jsx(\"span\",{style:{marginLeft:2,fontWeight:500,color:dee[t.replace(/-/,\"\")]},children:t})]})},C4=({label:t,checked:e,onClick:n})=\u003e{const{style:o,...i}=pee(n);return K.jsxs(\"div\",{className:kU`\n margin-top: 2px;\n padding: 4px;\n padding-left: 8px;\n padding-right: 18px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n\n \u0026:hover {\n background-color: rgba(255, 255, 255, 0.1);\n }\n `,...i,style:o,children:[K.jsx(\"input\",{type:\"checkbox\",checked:e,onChange:()=\u003e{},readOnly:!0}),K.jsx(\"span\",{style:{color:\"#eee\"},children:t})]})},zhn=({label:t,checked:e,onClick:n})=\u003e{const{style:o,...i}=pee(n);return K.jsxs(\"div\",{className:kU`\n margin-top: 2px;\n padding: 4px;\n padding-left: 8px;\n padding-right: 18px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n\n \u0026:hover {\n background-color: rgba(255, 255, 255, 0.1);\n }\n `,...i,style:o,children:[K.jsx(\"input\",{type:\"radio\",checked:e,onChange:()=\u003e{},readOnly:!0}),K.jsx(\"span\",{style:{color:\"#eee\"},children:t})]})},VHi=({children:t,elements:e,onContextMenuOpenChange:n,getNetAtPoint:o,getComponentAtPoint:i,onViewSchematicComponent:r,xRayNetIds:s=[],onXRayNetsChange:a})=\u003e{const A=LHi(),{isMouseOverContainer:c,setIsMouseOverContainer:l,selectedLayer:u,selectLayer:g,viewSettings:h,setIsShowingRatsNest:d,setIsShowingMultipleTracesLength:p,setIsShowingAutorouting:m,setIsShowingDrcErrors:_,setIsShowingDrcWarnings:f,setIsShowingCopperPours:I,setIsShowingCourtyards:C,setIsShowingPcbGroups:y,setIsShowingGroupAnchorOffsets:x,setIsShowingSolderMask:E,setIsShowingSilkscreen:B,setIsShowingFabricationNotes:S,setIsShowingPcbNotes:Q,setPcbGroupViewMode:w,setHoveredErrorId:M,setFocusedErrorId:k}=Kc(it=\u003e({isMouseOverContainer:it.is_mouse_over_container,setIsMouseOverContainer:it.setIsMouseOverContainer,selectedLayer:it.selected_layer,selectLayer:it.selectLayer,viewSettings:{is_showing_rats_nest:it.is_showing_rats_nest,is_showing_multiple_traces_length:it.is_showing_multiple_traces_length,is_showing_autorouting:it.is_showing_autorouting,is_showing_drc_errors:it.is_showing_drc_errors,is_showing_drc_warnings:it.is_showing_drc_warnings,is_showing_copper_pours:it.is_showing_copper_pours,is_showing_courtyards:it.is_showing_courtyards,is_showing_pcb_groups:it.is_showing_pcb_groups,is_showing_group_anchor_offsets:it.is_showing_group_anchor_offsets,is_showing_solder_mask:it.is_showing_solder_mask,is_showing_silkscreen:it.is_showing_silkscreen,is_showing_fabrication_notes:it.is_showing_fabrication_notes,is_showing_pcb_notes:it.is_showing_pcb_notes,pcb_group_view_mode:it.pcb_group_view_mode},setIsShowingRatsNest:it.setIsShowingRatsNest,setIsShowingMultipleTracesLength:it.setIsShowingMultipleTracesLength,setIsShowingAutorouting:it.setIsShowingAutorouting,setIsShowingDrcErrors:it.setIsShowingDrcErrors,setIsShowingDrcWarnings:it.setIsShowingDrcWarnings,setIsShowingCopperPours:it.setIsShowingCopperPours,setIsShowingCourtyards:it.setIsShowingCourtyards,setIsShowingPcbGroups:it.setIsShowingPcbGroups,setIsShowingGroupAnchorOffsets:it.setIsShowingGroupAnchorOffsets,setIsShowingSolderMask:it.setIsShowingSolderMask,setIsShowingSilkscreen:it.setIsShowingSilkscreen,setIsShowingFabricationNotes:it.setIsShowingFabricationNotes,setIsShowingPcbNotes:it.setIsShowingPcbNotes,setPcbGroupViewMode:it.setPcbGroupViewMode,setHoveredErrorId:it.setHoveredErrorId,setFocusedErrorId:it.setFocusedErrorId})),[R,F]=ee.useState(null),[O,U]=ee.useState([]),[Y,W]=ee.useState(),[te,j]=ee.useState(\"Net\"),[J,oe]=ee.useState(),ie=it=\u003e{const Yt=it.currentTarget.getBoundingClientRect();return i?.({x:it.clientX-Yt.left,y:it.clientY-Yt.top})},ne=ee.useRef(null),le=Kc(it=\u003eit.in_edit_mode),ge=it=\u003e{const Yt=it.currentTarget.getBoundingClientRect();return o?.({x:it.clientX-Yt.left,y:it.clientY-Yt.top})},_e=ee.useCallback(()=\u003e{F(null),n?.(!1)},[n]),[ue,fe]=ee.useState(!1),[pe,ye]=ee.useState(!1),[Me,ve]=ee.useState(!1),[he,Qe]=ee.useState(!1),[Pe,we]=ee.useState(!1);ee.useEffect(()=\u003e{const it=()=\u003eQe(!0),Yt=()=\u003eQe(!1),pn=()=\u003ewe(!0),be=()=\u003ewe(!1);return window.addEventListener(\"arm-dimension-tool\",it),window.addEventListener(\"disarm-dimension-tool\",Yt),window.addEventListener(\"arm-bounds-tool\",pn),window.addEventListener(\"disarm-bounds-tool\",be),()=\u003e{window.removeEventListener(\"arm-dimension-tool\",it),window.removeEventListener(\"disarm-dimension-tool\",Yt),window.removeEventListener(\"arm-bounds-tool\",pn),window.removeEventListener(\"disarm-bounds-tool\",be)}},[]);const Te=Afe(e??[]),Re=Te,Ee=ee.useRef(!1),ke=ee.useRef(null),Ce={1:Te[0]?()=\u003eg(Te[0]):()=\u003e{},2:Te[1]?()=\u003eg(Te[1]):()=\u003e{},3:Te[2]?()=\u003eg(Te[2]):()=\u003e{},4:Te[3]?()=\u003eg(Te[3]):()=\u003e{},5:Te[4]?()=\u003eg(Te[4]):()=\u003e{},6:Te[5]?()=\u003eg(Te[5]):()=\u003e{},7:Te[6]?()=\u003eg(Te[6]):()=\u003e{},8:Te[7]?()=\u003eg(Te[7]):()=\u003e{},9:Te[8]?()=\u003eg(Te[8]):()=\u003e{},0:Te[9]?()=\u003eg(Te[9]):()=\u003e{}};Z6(\"1\",Ce[1],ke),Z6(\"2\",Ce[2],ke),Z6(\"3\",Ce[3],ke),Z6(\"4\",Ce[4],ke),Z6(\"5\",Ce[5],ke),Z6(\"6\",Ce[6],ke),Z6(\"7\",Ce[7],ke),Z6(\"8\",Ce[8],ke),Z6(\"9\",Ce[9],ke),Z6(\"0\",Ce[0],ke),ee.useLayoutEffect(()=\u003e{if(Ee.current)return;Ee.current=!0;const it=Yt=\u003e{if(ke.current){const pn=ke.current.getBoundingClientRect();Yt.clientX\u003e=pn.left\u0026\u0026Yt.clientX\u003c=pn.right\u0026\u0026Yt.clientY\u003e=pn.top\u0026\u0026Yt.clientY\u003c=pn.bottom\u0026\u0026l(!0)}document.removeEventListener(\"mousemove\",it)};return document.addEventListener(\"mousemove\",it),()=\u003e{document.removeEventListener(\"mousemove\",it)}},[l]);const Le=ee.useCallback(()=\u003e{l(!0)},[l]),Ye=ee.useCallback(()=\u003e{c||l(!0)},[c,l]),tt=ee.useCallback(()=\u003e{l(!1),ye(!1),fe(!1),ve(!1)},[l]),At=ee.useCallback(()=\u003e{ye(!pe)},[pe]),at=ee.useCallback(()=\u003e{const it=!Me;ve(it),it\u0026\u0026fe(!1),it||M(null)},[Me,M]),nt=ee.useCallback(()=\u003e{ve(!1)},[]),gt=ee.useCallback(()=\u003e{d(!h.is_showing_rats_nest)},[h.is_showing_rats_nest,d]),bt=ee.useCallback(()=\u003e{Qe(!0),we(!1),window.dispatchEvent(new Event(\"arm-dimension-tool\"))},[]),Ct=ee.useCallback(()=\u003e{we(!0),Qe(!1),window.dispatchEvent(new Event(\"arm-bounds-tool\"))},[]),Dt=ee.useCallback(()=\u003e{const it=!ue;fe(it),it\u0026\u0026ve(!1)},[ue]),kt=ee.useCallback(it=\u003e{it.stopPropagation()},[]);return K.jsxs(\"div\",{ref:ke,onPointerDown:it=\u003e{ne.current={x:it.clientX,y:it.clientY}},onClick:it=\u003e{if(it.detail\u003e1||le||he||Pe||it.target.closest(\"button, input, select, [role=menu]\"))return;const Yt=ne.current;if(!Yt||Math.hypot(it.clientX-Yt.x,it.clientY-Yt.y)\u003e4)return;const pn=ge(it),be=ie(it);if(!pn\u0026\u0026!be)return;const et=pn?.netId;et\u0026\u0026s.includes(et)?(a?.(s.filter(It=\u003eIt!==et)),_e()):(W(et),j(pn?.displayName??\"Net\"),U(pn?.groups??[]),oe(be),n?.(!0),F({x:it.clientX,y:it.clientY}))},onDoubleClick:()=\u003e{a?.([]),_e()},onContextMenu:it=\u003e{it.preventDefault(),it.stopPropagation();const Yt=ge(it);oe(ie(it)),W(Yt?.netId),j(Yt?.displayName??\"Net\"),U(Yt?.groups??[]),n?.(!0),F({x:it.clientX,y:it.clientY})},style:{position:\"relative\",zIndex:\"999 !important\"},onMouseEnter:Le,onMouseLeave:tt,onMouseMove:Ye,children:[t,R\u0026\u0026K.jsx(HHi,{position:R,component:J,onViewSchematicComponent:r,onClose:_e,xRayDisplayName:te,xRayGroups:O.filter(it=\u003eit.netIds.some(Yt=\u003e!s.includes(Yt))),onXRayGroup:it=\u003ea?.([...new Set([...s,...it.netIds])]),onXRayNet:Y\u0026\u0026!s.includes(Y)?()=\u003ea?.([...s,Y]):void 0,onExitXRayNet:s.length\u003e0?()=\u003ea?.([]):void 0}),K.jsxs(\"div\",{style:{position:\"absolute\",bottom:4,right:8,pointerEvents:\"none\",color:\"white\",fontSize:11,opacity:c?.5:0,transition:\"opacity 1s\",transitionDelay:\"2s\",fontFamily:\"sans-serif\"},children:[\"@tscircuit/pcb-viewer@\",FHi.version]}),K.jsxs(\"div\",{\"data-toolbar-overlay\":!0,onTouchStart:it=\u003eit.stopPropagation(),onTouchEnd:it=\u003eit.stopPropagation(),onTouchMove:it=\u003eit.stopPropagation(),onMouseDown:kt,onMouseMove:kt,onMouseUp:kt,onPointerDown:kt,onPointerMove:kt,onPointerUp:kt,onWheel:kt,style:{position:\"absolute\",opacity:A||c?1:0,top:16,left:16,right:A?16:\"auto\",transition:c?\"opacity 100ms linear\":\"opacity 300ms linear\",zIndex:Ru.toolbarOverlay,color:\"red\",display:\"flex\",flexWrap:\"wrap\",maxWidth:\"550px\",gap:4,fontSize:12,fontFamily:\"sans-serif\"},children:[K.jsxs(WU,{isSmallScreen:A,onClick:At,onMouseLeave:()=\u003e{pe\u0026\u0026ye(!1)},children:[K.jsxs(\"div\",{children:[\"layer:\",\" \",K.jsx(\"span\",{style:{marginLeft:2,fontWeight:500,color:dee[u]},children:u})]}),pe\u0026\u0026K.jsx(\"div\",{style:{marginTop:4,minWidth:120},children:Re.map(it=\u003eK.jsx(KHi,{name:it,selected:it===u,onClick:()=\u003e{g(it)}},it))})]}),K.jsx(UHi,{elements:e,isOpen:Me,isSmallScreen:A,onToggle:at,onClose:nt,setHoveredErrorId:M,setFocusedErrorId:k}),K.jsx(WU,{isSmallScreen:A,style:{},onClick:gt,children:K.jsxs(\"div\",{children:[h.is_showing_rats_nest?\"✖ \":\"\",\"Rats Nest\"]})}),K.jsx(WU,{isSmallScreen:A,style:he?{backgroundColor:\"#444\"}:{},onClick:bt,children:K.jsx(\"div\",{children:\"📏\"})}),K.jsx(WU,{isSmallScreen:A,style:Pe?{backgroundColor:\"#444\"}:{},onClick:Ct,children:K.jsx(\"div\",{children:\"Bounds\"})}),K.jsx(WU,{isSmallScreen:A,onClick:Dt,children:K.jsxs(\"div\",{children:[K.jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"4px\"},children:[\"View\",K.jsx(\"span\",{style:{fontSize:\"8px\",transform:ue?\"rotate(180deg)\":\"rotate(0)\",transition:\"transform 0.1s ease\",display:\"inline-block\"},children:\"▼\"})]}),ue\u0026\u0026K.jsxs(\"div\",{style:{marginTop:4,minWidth:120},children:[K.jsx(C4,{label:\"Show All Trace Lengths\",checked:h.is_showing_multiple_traces_length,onClick:()=\u003e{p(!h.is_showing_multiple_traces_length)}}),K.jsx(C4,{label:\"Show Autorouting Animation\",checked:h.is_showing_autorouting,onClick:()=\u003e{m(!h.is_showing_autorouting)}}),K.jsx(C4,{label:\"Show DRC Errors\",checked:h.is_showing_drc_errors,onClick:()=\u003e{_(!h.is_showing_drc_errors)}}),K.jsx(C4,{label:\"Show DRC Warnings\",checked:h.is_showing_drc_warnings,onClick:()=\u003e{f(!h.is_showing_drc_warnings)}}),K.jsx(C4,{label:\"Show Copper Pours\",checked:h.is_showing_copper_pours,onClick:()=\u003e{I(!h.is_showing_copper_pours)}}),K.jsx(C4,{label:\"Show Courtyards\",checked:h.is_showing_courtyards,onClick:()=\u003e{C(!h.is_showing_courtyards)}}),K.jsx(C4,{label:\"Show Solder Mask\",checked:h.is_showing_solder_mask,onClick:()=\u003e{E(!h.is_showing_solder_mask)}}),K.jsx(C4,{label:\"Show Silkscreen\",checked:h.is_showing_silkscreen,onClick:()=\u003e{B(!h.is_showing_silkscreen)}}),K.jsx(C4,{label:\"Show Fabrication Notes\",checked:h.is_showing_fabrication_notes,onClick:()=\u003e{S(!h.is_showing_fabrication_notes)}}),K.jsx(C4,{label:\"Show PCB Notes\",checked:h.is_showing_pcb_notes,onClick:()=\u003e{Q(!h.is_showing_pcb_notes)}}),K.jsx(C4,{label:\"Show Group Anchor Offsets\",checked:h.is_showing_group_anchor_offsets,onClick:()=\u003e{x(!h.is_showing_group_anchor_offsets)}}),K.jsx(C4,{label:\"Show PCB Groups\",checked:h.is_showing_pcb_groups,onClick:()=\u003e{y(!h.is_showing_pcb_groups)}}),h.is_showing_pcb_groups\u0026\u0026K.jsxs(\"div\",{style:{marginLeft:16},children:[K.jsx(zhn,{label:\"Show All Groups\",checked:h.pcb_group_view_mode===\"all\",onClick:()=\u003e{w(\"all\")}}),K.jsx(zhn,{label:\"Show Named Groups\",checked:h.pcb_group_view_mode===\"named_only\",onClick:()=\u003e{w(\"named_only\")}})]})]})]})})]})]})},zHi=t=\u003et.type===\"pcb_manual_edit_conflict_warning\"||t.type===\"pcb_connector_not_in_accessible_orientation_warning\",JHi=t=\u003et.type===\"pcb_connector_not_in_accessible_orientation_warning\"?`Connector faces ${t.facing_direction}; expected ${t.recommended_facing_direction}`:\"Manual Edit Conflict\",WHi=({children:t,transform:e=RP(),elements:n=[]})=\u003e{const[o,{width:i,height:r}]=uee(),s=ee.useRef(null),a=Kc(A=\u003eA.is_showing_drc_warnings);return ee.useEffect(()=\u003e{const A=s.current;if(!A||!i||!r)return;A.width=i,A.height=r;const c=A.getContext(\"2d\");if(!c)return;c.clearRect(0,0,i,r);const l=n.filter(g=\u003eg.type===\"pcb_component\"),u=n.filter(zHi);c.strokeStyle=qi.board.drc_warning,c.lineWidth=2,u.forEach(g=\u003e{const h=l.find(U=\u003eU.pcb_component_id===g.pcb_component_id);if(!h)return;const{width:d,height:p,center:m}=h,_=_i(e,m),f=d*Math.abs(e.a),I=p*Math.abs(e.d),C=.1*Math.abs(e.a),y=f+C*2,x=I+C*2,E=_.x-y/2,B=_.y-x/2;c.beginPath(),c.rect(E,B,y,x),c.stroke();const S=JHi(g),Q=4,w=Math.max(8,Math.min(12,10*Math.abs(e.a)));c.font=`${w}px sans-serif`;const k=c.measureText(S).width+Q*2,R=w+Q*2,F=E+(y-k)/2,O=B+x+5;c.fillStyle=\"rgba(0, 0, 0, 0.7)\",c.beginPath(),c.roundRect(F,O,k,R,3),c.fill(),c.fillStyle=qi.board.drc_warning,c.textAlign=\"center\",c.textBaseline=\"middle\",c.fillText(S,F+k/2,O+R/2)})},[n,e,i,r,a]),a?K.jsxs(\"div\",{ref:o,style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:[t,K.jsx(\"canvas\",{ref:s,style:{position:\"absolute\",top:0,left:0,pointerEvents:\"none\",zIndex:Ru.warnings}})]}):K.jsx(\"div\",{ref:o,style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:t})},jHi=t=\u003e{const{transform:e,elements:n}=t,{hoveredErrorId:o,focusedErrorId:i,isShowingCopperPours:r,selectedLayer:s}=Kc(w=\u003e({hoveredErrorId:w.hovered_error_id,focusedErrorId:w.focused_error_id,isShowingCopperPours:w.is_showing_copper_pours,selectedLayer:w.selected_layer})),a=i??o,A=ee.useMemo(()=\u003er?n:n.filter(w=\u003ew.type!==\"pcb_copper_pour\"),[n,r]),c=ee.useMemo(()=\u003e{const w=fFi(n);return A.flatMap(M=\u003eIFi(M,n,w))},[A,n]),l=ee.useMemo(()=\u003enhn(n),[n]),[u,g]=ee.useState([]);ee.useEffect(()=\u003eg([]),[l]),ee.useEffect(()=\u003e{if(u.length===0)return;const w=M=\u003e{M.key===\"Escape\"\u0026\u0026g([])};return window.addEventListener(\"keydown\",w,!0),()=\u003ewindow.removeEventListener(\"keydown\",w,!0)},[u.length]);const h=ee.useMemo(()=\u003eu.length\u003e0?A.filter(w=\u003elhn(w)\u0026\u0026u.includes(gee(w,l)??\"\")):void 0,[A,l,u]),d=ee.useMemo(()=\u003e{if(!h)return c;const w=new Set(h);return c.filter(M=\u003e(M._element?.type===\"pcb_smtpad\"||M._element?.type===\"pcb_plated_hole\")\u0026\u0026w.has(M._element))},[c,h]),p=w=\u003e{if(!e)return;const M=b$e(c,_i(V6(e),w),e,s).filter(k=\u003ek._element?.type===\"pcb_smtpad\"||k._element?.type===\"pcb_plated_hole\");return M.sort((k,R)=\u003e+(R.layer===s)-+(k.layer===s)),cFi(M[0]?._element,n)},m=w=\u003e{if(!e)return;const M=(F,O)=\u003e({netId:F,displayName:NFi(O,n,l),groups:RFi(F,n,l)}),R=b$e(c,_i(V6(e),w),e,s,u.length\u003e0).filter(F=\u003elhn(F._element)\u0026\u0026F.layer!==\"drill\");R.sort((F,O)=\u003e+(O.layer===s)-+(F.layer===s));for(const F of R){const O=gee(F._element,l);if(O\u0026\u0026u.includes(O))return M(O,F._element)}for(const F of R){const O=gee(F._element,l);if(O)return M(O,F._element)}},[_,f]=ee.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),[I,C]=ee.useState([]),y=ee.useRef(e??null),x=ee.useRef(null),E=ee.useMemo(()=\u003eohn(n),[n]),B=ee.useMemo(()=\u003e{if(!a)return[];const M=n.filter(k=\u003ek.type.includes(\"error\")).find((k,R)=\u003eJU(k,R)===a);return M?wFi(M):[]},[a,n]);ee.useEffect(()=\u003e{e\u0026\u0026(y.current=e)},[e]),ee.useEffect(()=\u003e()=\u003e{Ahn(x.current)},[]),ee.useEffect(()=\u003e{if(!t.width||!t.height||!t.setTransform||!i)return;const w=ahn(n,i);if(!w)return;const M=QFi({error:w,indexes:E});if(!M)return;const k=y.current??e;if(!k)return;const R=vFi({bounds:M,width:t.width,height:t.height});Ahn(x.current),DFi({startTransform:k,endTransform:R,durationMs:420,setAnimationFrameId:F=\u003e{x.current=F},onUpdate:F=\u003e{y.current=F,t.setTransform?.(F)}})},[i,n,E,t.height,t.setTransform,t.width]);const S=ee.useMemo(()=\u003e{if(u.length\u003e0)return c;const w=[..._.primitiveIdsInMousedOverNet,...B];return CFi({primitivesWithoutInteractionMetadata:c,drawingObjectIdsWithMouseOver:_.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:w})},[c,_,B,u]),Q=ee.useCallback(w=\u003e{const M=[];for(const F of w)if(F._element){const O=l.getNetConnectedToId(\"pcb_port_id\"in F._element?F._element?.pcb_port_id:\"pcb_trace_id\"in F._element?F._element?.pcb_trace_id:\"\");M.push(...l.getIdsConnectedToNet(O))}const k=new Set(w.map(F=\u003eF._pcb_drawing_object_id));f({drawingObjectIdsWithMouseOver:k,primitiveIdsInMousedOverNet:M});const R=w.map(F=\u003eF._parent_pcb_component?.type===\"pcb_component\"\u0026\u0026F._parent_pcb_component.pcb_component_id?F._parent_pcb_component.pcb_component_id:F._element?.type===\"pcb_component\"\u0026\u0026F._element.pcb_component_id?F._element.pcb_component_id:null).filter(F=\u003e!!F);C(Array.from(new Set(R)))},[l]);return K.jsx(RHi,{elements:A,transform:e,primitives:d,selectedLayer:s,onMouseHoverOverPrimitives:Q,children:K.jsx(fHi,{disabled:!t.allowEditing,transform:e,soup:n,cancelPanDrag:t.cancelPanDrag,onCreateEditEvent:t.onCreateEditEvent,onModifyEditEvent:t.onModifyEditEvent,children:K.jsx(mHi,{transform:e,focusOnHover:t.focusOnHover,primitives:c,onBoundsSelected:t.onBoundsSelected,cancelPanDrag:t.cancelPanDrag,children:K.jsx(VHi,{elements:n,getNetAtPoint:m,xRayNetIds:u,onXRayNetsChange:g,onContextMenuOpenChange:t.onContextMenuOpenChange,getComponentAtPoint:p,onViewSchematicComponent:t.onViewSchematicComponent,children:K.jsx(CHi,{transform:e,elements:n,children:K.jsx(kHi,{transform:e,soup:n,children:K.jsx(THi,{transform:e,elements:n,hoveredComponentIds:I,children:K.jsx(iHi,{transform:e,debugGraphics:t.debugGraphics,children:K.jsx(WHi,{transform:e,elements:n,children:t.renderer===\"canvas\"?K.jsx(kLi,{transform:e,primitives:S,elements:A,xRayElements:h,width:t.width,height:t.height,grid:t.grid}):K.jsx(kFi,{transform:e,primitives:S,elements:n,xRayElements:h,width:t.width,height:t.height,grid:t.grid})})})})})})})})})})},hfe=t=\u003eNumber.isFinite(t)?t.toFixed(4):\"NaN\",$Hi=t=\u003e{let e=5381;for(let n=0;n\u003ct.length;n++)e=(e\u003c\u003c5)+e+t.charCodeAt(n);return Math.abs(e)},qHi=t=\u003e{if(!t?.length)return\"0\";const e=[];for(const i of t){if(!i?.type?.startsWith(\"pcb_\"))continue;const r=Tki(i),s=_$e([i]),a=[hfe(s.minX),hfe(s.minY),hfe(s.maxX),hfe(s.maxY)].join(\",\");let A=`${r}:${a}`;if(i.type===\"pcb_trace\"){const c=(i.route??[]).length;A+=`:${c}`;for(const l of i.route??[])l.route_type===\"via\"\u0026\u0026(A+=`:${l.tented_on_top}:${l.tented_on_bottom}`)}i.type===\"pcb_board\"\u0026\u0026(A+=`:${i.default_via_tented_on_top}:${i.default_via_tented_on_bottom}`),i.type===\"pcb_via\"\u0026\u0026(A+=`:${i.tented_on_top}:${i.tented_on_bottom}`),e.push(A)}if(e.length===0)return\"0\";e.sort();const n=e.join(\",\"),o=$Hi(n);return`${e.length}_${o.toString(36)}`},XHi=t=\u003e{if(!t)return\"empty\";const e=t.find(o=\u003eo.type===\"pcb_board\");if(!e)return\"no-board\";const n=o=\u003eMath.round(o*1e3)/1e3;return e.outline?e.outline.map(o=\u003e`${n(o.x)}_${n(o.y)}`).join(\",\"):`${n(e.width)}_${n(e.height)}`};function ZHi({circuitJson:t,editEvents:e}){let n=structuredClone(t);for(const o of e){if(o.edit_event_type===\"edit_pcb_component_location\"){const a=wS(n).pcb_component.get(o.pcb_component_id);if(a?.center.x===o.new_center.x\u0026\u0026a.center.y===o.new_center.y)continue;const c=Qd(o.new_center.x-o.original_center.x,o.new_center.y-o.original_center.y);n=n.map(l=\u003e\"pcb_component_id\"in l\u0026\u0026l.pcb_component_id===o.pcb_component_id?Rki(l,c):l);continue}if(o.edit_event_type===\"edit_schematic_component_location\"){n=n.map(a=\u003ea.type===\"schematic_component\"\u0026\u0026a.schematic_component_id===o.schematic_component_id?{...a,center:o.new_center}:a);continue}if(o.edit_event_type!==\"edit_pcb_trace_hint\"||!o.pcb_trace_hint_id)continue;if(wS(n).pcb_trace_hint.get(o.pcb_trace_hint_id)){n=n.map(a=\u003ea.type===\"pcb_trace_hint\"\u0026\u0026a.pcb_trace_hint_id===o.pcb_trace_hint_id?{...a,route:o.route}:a);continue}const r=wS(n).pcb_port.get(o.pcb_port_id);if(!r?.pcb_component_id)continue;const s={type:\"pcb_trace_hint\",pcb_trace_hint_id:o.pcb_trace_hint_id,route:o.route,pcb_port_id:o.pcb_port_id,pcb_component_id:r.pcb_component_id};n=n.filter(a=\u003ea.type!==\"pcb_trace_hint\"||a.pcb_port_id!==o.pcb_port_id).concat(s)}return n}var eOi=NC(Qd(400,300),vS(40,-40)),S$e=({circuitJson:t,debugGraphics:e,height:n=600,renderer:o=\"webgpu\",initialState:i,allowEditing:r=!0,editEvents:s,onEditEventsChanged:a,onBoundsSelected:A,onViewSchematicComponent:c,focusOnHover:l=!1,clickToInteractEnabled:u=!1,disablePcbGroups:g=!1})=\u003e{const[h,d]=ee.useState(o);ee.useEffect(()=\u003ed(o),[o]);const p=ee.useMemo(()=\u003e({renderer:h,setRenderer:d}),[h]),[m,_]=ee.useState(!u),[f,I]=ee.useState(!1),C=ee.useRef(!1),[y,x]=uee(),[E,B]=ee.useState(eOi),S=ee.useCallback(le=\u003e{if(C.current||le instanceof MouseEvent\u0026\u0026(le.button===2||(le.buttons\u00262)!==0))return!1;const ge=le.target;return ge instanceof Element?!ge.closest(\"[data-toolbar-overlay]\"):!0},[]),{ref:Q,setTransform:w,cancelDrag:M}=AFi({transform:E,onSetTransform:B,enabled:m\u0026\u0026!f,shouldDrag:S}),k=ee.useCallback(le=\u003e{C.current=le,le\u0026\u0026M(),I(le)},[M]);let[R,F]=ee.useState([]);R=s??R;const O=ee.useRef(!1),U=ee.useRef(null),Y=ee.useMemo(()=\u003eqHi(t),[t]),W=XHi(t),te=()=\u003e{const le=x?.width\u003e0?x:{width:500,height:500},{center:ge,width:_e,height:ue}=J.some(ye=\u003eye.type.startsWith(\"pcb_\"))?Yki(J.filter(ye=\u003eye.type.startsWith(\"pcb_\"))):{center:{x:0,y:0},width:.001,height:.001},fe=Math.min((le.width??0)/_e,(le.height??0)/ue,100)*.75,pe=NC(Qd((le.width??0)/2,(le.height??0)/2),vS(fe,-fe,0,0),Qd(-ge.x,-ge.y));w(pe)};ee.useEffect(()=\u003e{x?.width\u0026\u0026t\u0026\u0026t.length!==0\u0026\u0026(O.current||(te(),O.current=!0))},[t,x]),ee.useEffect(()=\u003e{O.current===!0\u0026\u0026te()},[W]);const j=ee.useMemo(()=\u003et?.filter(le=\u003ele.type.startsWith(\"pcb_\")||le.type.startsWith(\"source_\"))??[],[Y]),J=ee.useMemo(()=\u003eZHi({circuitJson:j,editEvents:R}),[j,R]),oe=le=\u003e{F([...R,le]),a?.([...R,le])},ie=le=\u003e{const ge=R.map(_e=\u003e_e.edit_event_id===le.edit_event_id?{..._e,...le}:_e);F(ge),a?.(ge)},ne=ee.useMemo(()=\u003e({...i,...g\u0026\u0026{is_showing_pcb_groups:!1}}),[i,g]);return K.jsx(Zgn.Provider,{value:p,children:K.jsxs(\"div\",{ref:Q,style:{position:\"relative\"},onContextMenu:le=\u003ele.preventDefault(),children:[K.jsx(\"div\",{ref:y,children:K.jsxs(jki,{initialState:ne,disablePcbGroups:g,children:[K.jsx(jHi,{renderer:h,transform:E,setTransform:w,height:n,width:x.width,allowEditing:r,focusOnHover:l,onBoundsSelected:A,onViewSchematicComponent:c,cancelPanDrag:M,onContextMenuOpenChange:k,onCreateEditEvent:oe,onModifyEditEvent:ie,grid:{spacing:1,view_window:{left:0,right:x.width||500,top:n,bottom:0}},elements:J,debugGraphics:e}),K.jsx($ki,{})]})}),u\u0026\u0026!m\u0026\u0026K.jsx(\"div\",{onClick:()=\u003e{_(!0),te()},onTouchStart:le=\u003e{const ge=le.touches[0];U.current={x:ge.clientX,y:ge.clientY}},onTouchEnd:le=\u003e{const ge=le.changedTouches[0],_e=U.current;if(!_e)return;const ue=Math.abs(ge.clientX-_e.x),fe=Math.abs(ge.clientY-_e.y);ue\u003c10\u0026\u0026fe\u003c10\u0026\u0026(le.preventDefault(),_(!0),te()),U.current=null},style:{position:\"absolute\",inset:0,cursor:\"pointer\",zIndex:Ru.clickToInteractOverlay,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",touchAction:\"pan-x pan-y pinch-zoom\"},children:K.jsx(\"div\",{style:{backgroundColor:\"rgba(0, 0, 0, 0.8)\",color:\"white\",padding:\"12px 24px\",borderRadius:\"8px\",fontSize:\"16px\",pointerEvents:\"none\"},children:typeof window\u003c\"u\"\u0026\u0026(\"ontouchstart\"in window||navigator.maxTouchPoints\u003e0)?\"Touch to Interact\":\"Click to Interact\"})})]})})};const tOi=({circuitJson:t,containerClassName:e,...n})=\u003e{const o=ee.useRef(null),[i,r]=ee.useState(620);return ee.useLayoutEffect(()=\u003e{const s=()=\u003e{if(o.current){const A=o.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(A,620),c))}};s();const a=new ResizeObserver(s);return o.current\u0026\u0026a.observe(o.current),window.addEventListener(\"resize\",s),()=\u003e{a.disconnect(),window.removeEventListener(\"resize\",s)}},[]),K.jsx(\"div\",{ref:o,className:e||\"rf-w-full rf-h-full\",children:K.jsx(S$e,{...n,circuitJson:t,height:i})})},nOi='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\\\[50\\\\%\\\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\\\[4px\\\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\\\.5{top:.625rem}.rf-top-\\\\[50\\\\%\\\\]{top:50%}.rf-top-\\\\[6px\\\\]{top:6px}.\\\\!rf-z-\\\\[101\\\\]{z-index:101!important}.\\\\!rf-z-\\\\[200\\\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\\\[100\\\\]{z-index:100}.rf-z-\\\\[101\\\\]{z-index:101}.rf-z-\\\\[102\\\\]{z-index:102}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-0{margin:0}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-0{margin-bottom:0}.rf-mb-0\\\\.5{margin-bottom:.125rem}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-7{margin-bottom:1.75rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mr-auto{margin-right:auto}.rf-mt-0{margin-top:0}.rf-mt-0\\\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-\\\\[4\\\\/3\\\\]{aspect-ratio:4/3}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-2{height:.5rem;width:.5rem}.rf-size-3{height:.75rem;width:.75rem}.rf-size-4{height:1rem;width:1rem}.\\\\!rf-h-2{height:.5rem!important}.\\\\!rf-h-2\\\\.5{height:.625rem!important}.rf-h-0{height:0}.rf-h-0\\\\.5{height:.125rem}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\\\[400px\\\\]{height:400px}.rf-h-\\\\[calc\\\\(100vh-52px\\\\)\\\\]{height:calc(100vh - 52px)}.rf-h-\\\\[calc\\\\(100vh-60px\\\\)\\\\]{height:calc(100vh - 60px)}.rf-h-\\\\[var\\\\(--radix-select-trigger-height\\\\)\\\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\\\!rf-max-h-\\\\[40vh\\\\]{max-height:40vh!important}.\\\\!rf-max-h-\\\\[80vh\\\\]{max-height:80vh!important}.rf-max-h-16{max-height:4rem}.rf-max-h-20{max-height:5rem}.rf-max-h-24{max-height:6rem}.rf-max-h-28{max-height:7rem}.rf-max-h-32{max-height:8rem}.rf-max-h-64{max-height:16rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\\\[120px\\\\]{max-height:120px}.rf-max-h-\\\\[150px\\\\]{max-height:150px}.rf-max-h-\\\\[200px\\\\]{max-height:200px}.rf-max-h-\\\\[300px\\\\]{max-height:300px}.rf-max-h-\\\\[90vh\\\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-max-h-none{max-height:none}.rf-min-h-0{min-height:0}.rf-min-h-56{min-height:14rem}.rf-min-h-72{min-height:18rem}.rf-min-h-\\\\[100px\\\\]{min-height:100px}.rf-min-h-\\\\[200px\\\\]{min-height:200px}.rf-min-h-\\\\[300px\\\\]{min-height:300px}.rf-min-h-\\\\[360px\\\\]{min-height:360px}.rf-min-h-\\\\[400px\\\\]{min-height:400px}.rf-min-h-\\\\[620px\\\\]{min-height:620px}.rf-min-h-\\\\[calc\\\\(100vh-240px\\\\)\\\\]{min-height:calc(100vh - 240px)}.rf-min-h-full{min-height:100%}.\\\\!rf-w-2{width:.5rem!important}.\\\\!rf-w-2\\\\.5{width:.625rem!important}.\\\\!rf-w-\\\\[95vw\\\\]{width:95vw!important}.rf-w-1{width:.25rem}.rf-w-10{width:2.5rem}.rf-w-11{width:2.75rem}.rf-w-11\\\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-7{width:1.75rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\\\[12px\\\\]{min-width:12px}.rf-min-w-\\\\[148px\\\\]{min-width:148px}.rf-min-w-\\\\[192px\\\\]{min-width:192px}.rf-min-w-\\\\[600px\\\\]{min-width:600px}.rf-min-w-\\\\[8rem\\\\]{min-width:8rem}.rf-min-w-\\\\[var\\\\(--radix-select-trigger-width\\\\)\\\\]{min-width:var(--radix-select-trigger-width)}.\\\\!rf-max-w-\\\\[95vw\\\\]{max-width:95vw!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-7xl{max-width:80rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\\\[1000px\\\\]{max-width:1000px}.rf-max-w-\\\\[150px\\\\]{max-width:150px}.rf-max-w-\\\\[200px\\\\]{max-width:200px}.rf-max-w-\\\\[320px\\\\]{max-width:320px}.rf-max-w-\\\\[40\\\\%\\\\]{max-width:40%}.rf-max-w-\\\\[600px\\\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\\\[--radix-popover-content-transform-origin\\\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\\\/2,.rf--translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-0{--tw-translate-y:-0px}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf--translate-y-1,.rf-translate-x-\\\\[-50\\\\%\\\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-x-\\\\[-50\\\\%\\\\]{--tw-translate-x:-50%}.rf-translate-y-\\\\[-50\\\\%\\\\]{--tw-translate-y:-50%}.-rf-rotate-90,.rf-translate-y-\\\\[-50\\\\%\\\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-rotate-90{--tw-rotate:-90deg}.rf-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-content-center{place-content:center}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-baseline{align-items:baseline}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-1\\\\.5{gap:.375rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.rf-gap-y-1{row-gap:.25rem}.rf-space-x-2\u003e:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-1\u003e:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-2\u003e:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3\u003e:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4\u003e:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6\u003e:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y\u003e:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-text-nowrap{text-wrap:nowrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-none{border-radius:0}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-0{border-width:0}.rf-border-2{border-width:2px}.rf-border-y{border-top-width:1px}.rf-border-b,.rf-border-y{border-bottom-width:1px}.rf-border-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-r{border-right-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-100{--tw-border-opacity:1;border-color:rgb(219 234 254/var(--tw-border-opacity,1))}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-border{border-color:hsl(var(--border))}.rf-border-emerald-500{--tw-border-opacity:1;border-color:rgb(16 185 129/var(--tw-border-opacity,1))}.rf-border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.rf-border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity,1))}.rf-border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.rf-border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.rf-border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.rf-border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity,1))}.rf-border-slate-800\\\\/60{border-color:rgba(30,41,59,.6)}.rf-border-transparent{border-color:transparent}.rf-border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.rf-border-zinc-100{--tw-border-opacity:1;border-color:rgb(244 244 245/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-border-l-blue-500{--tw-border-opacity:1;border-left-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-t-blue-600{--tw-border-opacity:1;border-top-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-emerald-500{--tw-bg-opacity:1;background-color:rgb(16 185 129/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-orange-50\\\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity,1))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-50\\\\/50{background-color:rgba(254,242,242,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-red-950{--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.rf-bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.rf-from-blue-500{--tw-gradient-from:#3b82f6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(59,130,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-from-emerald-500{--tw-gradient-from:#10b981 var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-from-green-500{--tw-gradient-from:#22c55e var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,197,94,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-from-red-500{--tw-gradient-from:#ef4444 var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.rf-to-blue-600{--tw-gradient-to:#2563eb var(--tw-gradient-to-position)}.rf-to-emerald-600{--tw-gradient-to:#059669 var(--tw-gradient-to-position)}.rf-to-green-600{--tw-gradient-to:#16a34a var(--tw-gradient-to-position)}.rf-to-red-600{--tw-gradient-to:#dc2626 var(--tw-gradient-to-position)}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-stroke-1{stroke-width:1}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-1\\\\.5{padding-left:.375rem;padding-right:.375rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-2\\\\.5{padding-left:.625rem;padding-right:.625rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-5{padding-left:1.25rem;padding-right:1.25rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-1\\\\.5{padding-bottom:.375rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-1{padding-top:.25rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-align-bottom{vertical-align:bottom}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\\\[10px\\\\]{font-size:10px}.rf-text-\\\\[11px\\\\]{font-size:11px}.rf-text-\\\\[8px\\\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-normal{font-weight:400}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-4{line-height:1rem}.rf-leading-5{line-height:1.25rem}.rf-leading-\\\\[0\\\\.95rem\\\\]{line-height:.95rem}.rf-leading-\\\\[1rem\\\\]{line-height:1rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-tight{letter-spacing:-.025em}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-wider{letter-spacing:.05em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity,1))}.rf-text-foreground{color:hsl(var(--foreground))}.rf-text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted{color:hsl(var(--muted))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-accent-blue-600{accent-color:#2563eb}.rf-opacity-0{opacity:0}.rf-opacity-10{opacity:.1}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-shadow-sm,.rf-shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-150{transition-duration:.15s}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-animate-in{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.rf-fade-in-0{--tw-enter-opacity:0}.rf-zoom-in-95{--tw-enter-scale:.95}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-150{animation-duration:.15s}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.file\\\\:rf-border-0::file-selector-button{border-width:0}.file\\\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\\\:rf--translate-y-0\\\\.5:hover{--tw-translate-y:-0.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\\\:rf-border-zinc-300:hover{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity,1))}.hover\\\\:\\\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-red-500\\\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\\\:rf-bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\\\:rf-bg-zinc-100\\\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\\\:rf-bg-zinc-900\\\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\\\:rf-text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\\\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\\\:rf-underline:hover{text-decoration-line:underline}.hover\\\\:rf-shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\\\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\\\:rf-ring-zinc-900:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(24 24 27/var(--tw-ring-opacity,1))}.focus-visible\\\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\\\:rf-text-gray-500:disabled{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.disabled\\\\:rf-opacity-40:disabled{opacity:.4}.disabled\\\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\\\:rf-scale-\\\\[1\\\\.03\\\\]{--tw-scale-x:1.03;--tw-scale-y:1.03;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-group:hover .group-hover\\\\:rf-opacity-100,.rf-group\\\\/bar:hover .group-hover\\\\/bar\\\\:rf-opacity-100{opacity:1}.rf-peer:disabled~.peer-disabled\\\\:rf-cursor-not-allowed{cursor:not-allowed}.rf-peer:disabled~.peer-disabled\\\\:rf-opacity-70{opacity:.7}.data-\\\\[disabled\\\\=true\\\\]\\\\:rf-pointer-events-none[data-disabled=true],.data-\\\\[disabled\\\\]\\\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\\\[side\\\\=bottom\\\\]\\\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\\\[side\\\\=bottom\\\\]\\\\:rf-translate-y-1[data-side=bottom],.data-\\\\[side\\\\=left\\\\]\\\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\\\[side\\\\=left\\\\]\\\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\\\[side\\\\=right\\\\]\\\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\\\[side\\\\=right\\\\]\\\\:rf-translate-x-1[data-side=right],.data-\\\\[side\\\\=top\\\\]\\\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\\\[side\\\\=top\\\\]\\\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\\\[selected\\\\=true\\\\]\\\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\\\[state\\\\=active\\\\]\\\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\\\[state\\\\=checked\\\\]\\\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\\\[state\\\\=open\\\\]\\\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\\\[selected\\\\=true\\\\]\\\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\\\[state\\\\=active\\\\]\\\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\\\[state\\\\=checked\\\\]\\\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\\\[disabled\\\\=true\\\\]\\\\:rf-opacity-50[data-disabled=true],.data-\\\\[disabled\\\\]\\\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\\\[state\\\\=active\\\\]\\\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\\\[state\\\\=open\\\\]\\\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\\\[state\\\\=closed\\\\]\\\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\\\[state\\\\=closed\\\\]\\\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\\\[state\\\\=open\\\\]\\\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\\\[state\\\\=closed\\\\]\\\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\\\[state\\\\=open\\\\]\\\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\\\[side\\\\=bottom\\\\]\\\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\\\[side\\\\=left\\\\]\\\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\\\[side\\\\=right\\\\]\\\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\\\[side\\\\=top\\\\]\\\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\\\[state\\\\=closed\\\\]\\\\:rf-slide-out-to-left-1\\\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\\\[state\\\\=closed\\\\]\\\\:rf-slide-out-to-top-\\\\[48\\\\%\\\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\\\[state\\\\=open\\\\]\\\\:rf-slide-in-from-left-1\\\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\\\[state\\\\=open\\\\]\\\\:rf-slide-in-from-top-\\\\[48\\\\%\\\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\\\:rf-bg-zinc-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.dark\\\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\\\:rf-text-zinc-300:is(.rf-dark *){--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.dark\\\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\\\:placeholder\\\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\\\:placeholder\\\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\\\:hover\\\\:rf-bg-red-900\\\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\\\:hover\\\\:rf-bg-zinc-50\\\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\\\:hover\\\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\\\:hover\\\\:rf-bg-zinc-800\\\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\\\:hover\\\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\\\:focus\\\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\\\:focus\\\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\\\:focus-visible\\\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\\\:data-\\\\[selected\\\\=true\\\\]\\\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\\\:data-\\\\[state\\\\=active\\\\]\\\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\\\:data-\\\\[state\\\\=checked\\\\]\\\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\\\:data-\\\\[state\\\\=open\\\\]\\\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\\\:data-\\\\[selected\\\\=true\\\\]\\\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\\\:data-\\\\[state\\\\=active\\\\]\\\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\\\:data-\\\\[state\\\\=checked\\\\]\\\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\\\:rf-order-1{order:1}.sm\\\\:rf-order-2{order:2}.sm\\\\:rf-mt-0{margin-top:0}.sm\\\\:rf-mt-4{margin-top:1rem}.sm\\\\:rf-block{display:block}.sm\\\\:rf-inline{display:inline}.sm\\\\:rf-grid{display:grid}.sm\\\\:rf-hidden{display:none}.sm\\\\:rf-h-5{height:1.25rem}.sm\\\\:rf-w-1\\\\/2{width:50%}.sm\\\\:rf-w-5{width:1.25rem}.sm\\\\:rf-w-\\\\[90vw\\\\]{width:90vw}.sm\\\\:rf-w-auto{width:auto}.sm\\\\:rf-max-w-\\\\[500px\\\\]{max-width:500px}.sm\\\\:rf-max-w-md{max-width:28rem}.sm\\\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\\\:rf-grid-cols-\\\\[1fr_auto\\\\]{grid-template-columns:1fr auto}.sm\\\\:rf-grid-cols-\\\\[minmax\\\\(0\\\\2c 1fr\\\\)_auto\\\\]{grid-template-columns:minmax(0,1fr) auto}.sm\\\\:rf-flex-row{flex-direction:row}.sm\\\\:rf-items-center{align-items:center}.sm\\\\:rf-justify-end{justify-content:flex-end}.sm\\\\:rf-gap-3{gap:.75rem}.sm\\\\:rf-gap-4{gap:1rem}.sm\\\\:rf-space-x-2\u003e:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\\\:rf-p-3{padding:.75rem}.sm\\\\:rf-p-6{padding:1.5rem}.sm\\\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\\\:rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\\\:rf-px-8{padding-left:2rem;padding-right:2rem}.sm\\\\:rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.sm\\\\:rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.sm\\\\:rf-text-left{text-align:left}.sm\\\\:rf-text-2xl{font-size:1.5rem;line-height:2rem}.sm\\\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\\\\:rf-text-base{font-size:1rem;line-height:1.5rem}.sm\\\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\\\:rf-w-52{width:13rem}.md\\\\:rf-w-auto{width:auto}.md\\\\:rf-min-w-0{min-width:0}.md\\\\:rf-max-w-\\\\[660px\\\\]{max-width:660px}.md\\\\:rf-max-w-lg{max-width:32rem}.md\\\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\\\:rf-grid-cols-\\\\[220px_1fr\\\\]{grid-template-columns:220px 1fr}.md\\\\:rf-flex-row{flex-direction:row}.md\\\\:rf-flex-col{flex-direction:column}.md\\\\:rf-overflow-y-auto{overflow-y:auto}.md\\\\:rf-overflow-x-hidden{overflow-x:hidden}.md\\\\:rf-border-b-0{border-bottom-width:0}.md\\\\:rf-border-r{border-right-width:1px}.md\\\\:rf-p-8{padding:2rem}.md\\\\:rf-py-8{padding-bottom:2rem;padding-top:2rem}.md\\\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\\\\:rf-max-w-\\\\[720px\\\\]{max-width:720px}.lg\\\\:rf-max-w-xl{max-width:36rem}.lg\\\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1280px){.xl\\\\:rf-max-w-\\\\[800px\\\\]{max-width:800px}}.\\\\[\\\\\u0026\\\\\u003espan\\\\]\\\\:rf-line-clamp-1\u003espan{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\\\[\\\\\u0026\\\\\u003esvg\\\\]\\\\:rf-size-4\u003esvg{height:1rem;width:1rem}.\\\\[\\\\\u0026\\\\\u003esvg\\\\]\\\\:rf-shrink-0\u003esvg{flex-shrink:0}.\\\\[\\\\\u0026\\\\\u003esvg\\\\]\\\\:rf-text-red-300\u003esvg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\\\[\\\\\u0026\\\\\u003esvg\\\\]\\\\:hover\\\\:rf-text-red-400:hover\u003esvg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\\\[\\\\\u0026_\\\\[cmdk-group-heading\\\\]\\\\]\\\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\\\[\\\\\u0026_\\\\[cmdk-group-heading\\\\]\\\\]\\\\:rf-py-1\\\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\\\[\\\\\u0026_\\\\[cmdk-group-heading\\\\]\\\\]\\\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\\\[\\\\\u0026_\\\\[cmdk-group-heading\\\\]\\\\]\\\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\\\[\\\\\u0026_\\\\[cmdk-group-heading\\\\]\\\\]\\\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\\\:\\\\[\\\\\u0026_\\\\[cmdk-group-heading\\\\]\\\\]\\\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\\\[\\\\\u0026_\\\\[cmdk-group\\\\]\\\\:not\\\\(\\\\[hidden\\\\]\\\\)_\\\\~\\\\[cmdk-group\\\\]\\\\]\\\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\\\[\\\\\u0026_\\\\[cmdk-group\\\\]\\\\]\\\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\\\[\\\\\u0026_\\\\[cmdk-input-wrapper\\\\]_svg\\\\]\\\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\\\[\\\\\u0026_\\\\[cmdk-input-wrapper\\\\]_svg\\\\]\\\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\\\[\\\\\u0026_\\\\[cmdk-input\\\\]\\\\]\\\\:rf-h-12 [cmdk-input]{height:3rem}.\\\\[\\\\\u0026_\\\\[cmdk-item\\\\]\\\\]\\\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\\\[\\\\\u0026_\\\\[cmdk-item\\\\]\\\\]\\\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\\\[\\\\\u0026_\\\\[cmdk-item\\\\]_svg\\\\]\\\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\\\[\\\\\u0026_\\\\[cmdk-item\\\\]_svg\\\\]\\\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\\\[\\\\\u0026_svg\\\\]\\\\:rf-pointer-events-none svg{pointer-events:none}.\\\\[\\\\\u0026_svg\\\\]\\\\:rf-size-4 svg{height:1rem;width:1rem}.\\\\[\\\\\u0026_svg\\\\]\\\\:rf-shrink-0 svg{flex-shrink:0}',mee=()=\u003e{ee.useEffect(()=\u003e{if(document.querySelector('style[data-styles=\"tscircuit-runframe\"]'))return;const e=document.createElement(\"style\");e.setAttribute(\"data-styles\",\"tscircuit-runframe\"),e.textContent=nOi,document.head.appendChild(e)},[])},oOi=t=\u003e{ee.useEffect(()=\u003e(t?document.body.style.overflow=\"hidden\":document.body.style.overflow=\"\",()=\u003e{document.body.style.overflow=\"\"}),[t])},Jhn=t=\u003e`hsl(${rE.indexOf(t)*137.5%360}, 70%, 50%)`,iOi=({phaseTimings:t})=\u003e{if(!t)return null;const e=Object.values(t).reduce((n,o)=\u003en+o,0);return K.jsxs(\"div\",{className:\"rf-space-y-2 rf-w-full rf-px-4\",children:[K.jsx(\"div\",{className:\"rf-relative rf-h-8 rf-flex rf-rounded-sm\",children:rE.map(n=\u003e{const o=t[n]||0,i=o/e*100;return K.jsx(\"div\",{className:\"rf-group/bar rf-relative rf-overflow-visible\",style:{width:`${i}%`,backgroundColor:Jhn(n)},children:K.jsxs(\"div\",{className:\"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none\",children:[n,\": \",o.toFixed(1),\"ms\"]})},n)})}),K.jsxs(\"div\",{className:\"rf-text-xs rf-text-gray-500\",children:[\"Total: \",e.toFixed(2),\"ms\"]})]})},rOi=t=\u003e{if(t instanceof Blob)return t;if(t==null)return\"\";if(typeof t==\"string\")return t;if(typeof t==\"object\")try{return JSON.stringify(t,null,2)}catch{return String(t)}return String(t)},sOi=({renderLog:t,onRerunWithDebug:e})=\u003e{const[n,o]=ee.useState(\"chronological\"),[i,r]=ee.useState(\"\"),s=[{value:\"\",label:\"None\"},{value:\"DEBUG=Group_doInitialSchematicTraceRender\",label:\"DEBUG=Group_doInitialSchematicTraceRender\"},{value:\"DEBUG=Group_doInitialSchematicLayoutMatchpack\",label:\"DEBUG=Group_doInitialSchematicLayoutMatchpack\"},{value:\"DEBUG=Group_doInitialPcbLayoutPack\",label:\"DEBUG=Group_doInitialPcbLayoutPack\"}];if(!t)return K.jsxs(\"div\",{className:\"rf-p-4 rf-bg-gray-100 rf-rounded-md\",children:[K.jsx(\"div\",{className:\"rf-mb-4\",children:\"No render log, make sure this tab is open when you render\"}),e\u0026\u0026K.jsxs(\"div\",{className:\"rf-flex rf-gap-2 rf-items-center\",children:[K.jsx(\"select\",{value:i,onChange:c=\u003er(c.target.value),className:\"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white\",children:s.map(c=\u003eK.jsx(\"option\",{value:c.value,children:c.label},c.value))}),K.jsx(fA,{onClick:()=\u003ee(i),size:\"sm\",className:\"rf-text-xs\",children:\"Rerun Render with Debug\"})]})]});const a=Object.entries(t?.phaseTimings??{});n===\"chronological\"?a.sort((c,l)=\u003erE.indexOf(c[0])-rE.indexOf(l[0])):a.sort((c,l)=\u003el[1]-c[1]);const A=a.reduce((c,[l,u])=\u003ec+u,0);return K.jsxs(\"div\",{className:\"rf-bg-white\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-justify-between rf-items-center rf-mb-4\",children:[K.jsx(\"div\",{children:\"Render Logs\"}),K.jsxs(\"div\",{className:\"rf-flex rf-gap-4 rf-items-center\",children:[e\u0026\u0026K.jsxs(\"div\",{className:\"rf-flex rf-gap-2 rf-items-center\",children:[K.jsx(\"select\",{value:i,onChange:c=\u003er(c.target.value),className:\"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white\",children:s.map(c=\u003eK.jsx(\"option\",{value:c.value,children:c.label},c.value))}),K.jsx(fA,{onClick:()=\u003ee(i),size:\"sm\",className:\"rf-text-xs\",children:\"Rerun Render with Debug\"})]}),K.jsx(\"div\",{className:\"rf-flex rf-gap-2 rf-items-center\",children:K.jsxs(\"select\",{onChange:c=\u003e{if(c.target.value){const l=t?.debugOutputs?.find(u=\u003eu.name===c.target.value);if(l){const u=rOi(l.content),g=u instanceof Blob?u:new Blob([u],{type:\"text/plain\"}),h=URL.createObjectURL(g),d=document.createElement(\"a\");d.href=h,d.download=`debug-${l.name}.txt`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(h)}c.target.value=\"\"}},disabled:!t?.debugOutputs||t.debugOutputs.length===0,className:\"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed\",children:[K.jsx(\"option\",{value:\"\",children:\"Download Debug Output\"}),t?.debugOutputs?.map(c=\u003eK.jsx(\"option\",{value:c.name,children:c.name},c.name))]})}),K.jsxs(\"div\",{className:\"rf-flex rf-text-xs rf-items-center\",children:[K.jsx(\"div\",{className:\"rf-mr-2\",children:\"Sort by:\"}),K.jsxs(\"select\",{value:n,onChange:c=\u003eo(c.target.value),className:\"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs\",children:[K.jsx(\"option\",{value:\"chronological\",children:\"Phase Order\"}),K.jsx(\"option\",{value:\"longest\",children:\"Duration\"})]})]})]})]}),K.jsx(iOi,{phaseTimings:t.phaseTimings}),K.jsxs(\"table\",{className:\"rf-w-full rf-text-xs\",children:[K.jsx(\"thead\",{children:K.jsxs(\"tr\",{children:[K.jsx(\"th\",{className:\"rf-text-left rf-p-2\",children:\"Phase Order\"}),K.jsx(\"th\",{className:\"rf-text-left rf-p-2\",children:\"Phase\"}),K.jsx(\"th\",{className:\"rf-text-left rf-p-2\",children:\"Duration (ms)\"})]})}),K.jsx(\"tbody\",{children:a.map(([c,l])=\u003eK.jsxs(\"tr\",{children:[K.jsx(\"td\",{className:\"rf-p-2\",children:rE.indexOf(c)}),K.jsx(\"td\",{className:\"rf-p-2\",children:c}),K.jsx(\"td\",{className:\"rf-p-2\",children:K.jsx(\"div\",{className:\"rf-w-8\",children:K.jsx(\"div\",{className:\"rf-h-2 rf-rounded-sm\",style:{backgroundColor:Jhn(c),width:`${l/A*100}%`}})})}),K.jsx(\"td\",{className:\"rf-p-2\",children:K.jsxs(\"div\",{className:\"rf-flex w-full\",children:[K.jsxs(\"span\",{className:\"rf-flex-grow\",children:[l,\"ms\"]}),K.jsxs(\"span\",{className:\"rf-text-gray-500 rf-pr-2\",children:[(l/A*100).toFixed(1),\"%\"]})]})})]},c))})]})]})};var aOi=8,Q$e=t=\u003eMath.hypot(t.a,t.b)||1,AOi=t=\u003e[t.label,t.inlineLabel].filter(Boolean).join(`\n`),_ee=(t,e)=\u003eMath.hypot(t.x-e.x,t.y-e.y),Whn=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=o*o+i*i;if(r===0)return _ee(t,e);const s=((t.x-e.x)*o+(t.y-e.y)*i)/r,a=Math.max(0,Math.min(1,s));return _ee(t,{x:e.x+o*a,y:e.y+i*a})},cOi=(t,e,n)=\u003e{const o=n.x-e.x,i=n.y-e.y,r=Math.hypot(o,i);return r===0?_ee(t,e):Math.abs(i*t.x-o*t.y+n.x*e.y-n.y*e.x)/r},v$e=(t,e)=\u003e{let n=!1;for(let o=0,i=e.length-1;o\u003ce.length;i=o++){const r=e[o],s=e[i];r.y\u003et.y!=s.y\u003et.y\u0026\u0026t.x\u003c(s.x-r.x)*(t.y-r.y)/(s.y-r.y)+r.x\u0026\u0026(n=!n)}return n},w$e=(t,e,n,o=!1)=\u003e{if(e.length===0)return!1;const i=o?e.length:e.length-1;for(let r=0;r\u003ci;r+=1){const s=e[r],a=e[(r+1)%e.length];if(Whn(t,s,a)\u003c=n)return!0}return!1},jhn=(t,e,n)=\u003eMath.max(n,(t??2)*Q$e(e)/2+4),PS=(t,e)=\u003eBn(t,e),P$e=(t,e,n,o)=\u003e_ee(t,PS(n,e))\u003c=o,lOi=(t,e,n,o)=\u003e{if(e.points.length===0)return!1;if(e.points.length===1)return P$e(t,e.points[0],n,o);const i=e.points.map(r=\u003ePS(n,r));return w$e(t,i,jhn(e.strokeWidth,n,o))},uOi=(t,e,n,o)=\u003e{const{origin:i,directionVector:r}=e;if(r.x===0\u0026\u0026r.y===0)return!1;const s=PS(n,i),a=PS(n,{x:i.x+r.x,y:i.y+r.y});return cOi(t,s,a)\u003c=jhn(e.strokeWidth,n,o)},gOi=(t,e,n,o)=\u003e{const i=VQe(e,n).corners;return v$e(t,i)||w$e(t,i,o,!0)},dOi=(t,e,n,o)=\u003e{const i=PS(n,e.center),r=e.radius*Q$e(n);return _ee(t,i)\u003c=r+o},hOi=(t,e,n,o)=\u003e{if(e.points.length===0)return!1;if(e.points.length===1)return P$e(t,e.points[0],n,o);const i=e.points.map(r=\u003ePS(n,r));return v$e(t,i)||w$e(t,i,o,!0)},pOi=(t,e,n,o)=\u003e{const i=jW(e),r=PS(n,i.shaftStart),s=PS(n,i.shaftEnd),a=Math.max(o,i.shaftWidth*Q$e(n)/2+4);return Whn(t,r,s)\u003c=a?!0:i.heads.some(A=\u003e{const c=[A.tip,A.leftWing,A.rightWing].map(l=\u003ePS(n,l));return v$e(t,c)})};function mOi(t,e,n,o={}){const i=o.hitSlop??aOi;for(let s=(t.points?.length??0)-1;s\u003e=0;s-=1){const a=t.points?.[s];if(a?.label\u0026\u0026P$e(n,a,e,i))return a.label}for(let s=(t.infiniteLines?.length??0)-1;s\u003e=0;s-=1){const a=t.infiniteLines?.[s];if(a?.label\u0026\u0026uOi(n,a,e,i))return a.label}const r=t.lines?.map((s,a)=\u003e({line:s,originalIndex:a})).sort((s,a)=\u003e(s.line.zIndex??0)-(a.line.zIndex??0)||s.originalIndex-a.originalIndex)??[];for(let s=r.length-1;s\u003e=0;s-=1){const a=r[s]?.line;if(a?.label\u0026\u0026lOi(n,a,e,i))return a.label}for(let s=(t.arrows?.length??0)-1;s\u003e=0;s-=1){const a=t.arrows?.[s],A=a?AOi(a):\"\";if(!(!a||!A)\u0026\u0026pOi(n,a,e,i))return A}for(let s=(t.polygons?.length??0)-1;s\u003e=0;s-=1){const a=t.polygons?.[s];if(a?.label\u0026\u0026hOi(n,a,e,i))return a.label}for(let s=(t.circles?.length??0)-1;s\u003e=0;s-=1){const a=t.circles?.[s];if(a?.label\u0026\u0026dOi(n,a,e,i))return a.label}for(let s=(t.rects?.length??0)-1;s\u003e=0;s-=1){const a=t.rects?.[s];if(a?.label\u0026\u0026gOi(n,a,e,i))return a.label}return null}const _Oi=Fs[typeof document\u003c\"u\"\u0026\u0026document.createElement!==void 0?\"useLayoutEffect\":\"useEffect\"],fOi=t=\u003e{const e=ee.useRef(t);return ee.useEffect(()=\u003e{e.current=t}),e};function IOi(){}function $hn(t,e,n={}){const o=yOi(n.polyfill),i=fOi(e);return _Oi(()=\u003e{let r=!1;const s=t\u0026\u0026\"current\"in t?t.current:t;if(!s)return IOi;function a(A,c){r||i.current(A,c)}return o.subscribe(s,a),()=\u003e{r=!0,o.unsubscribe(s,a)}},[t,o,i]),o.observer}function COi(t){let e=!1,n=[];const o=new Map,i=new(t||window.ResizeObserver)((r,s)=\u003e{n=n.concat(r);function a(){const A=new Set;for(let c=0;c\u003cn.length;c++){if(A.has(n[c].target))continue;A.add(n[c].target);const l=o.get(n[c].target);l?.forEach(u=\u003eu(n[c],s))}n=[],e=!1}e||window.requestAnimationFrame(a),e=!0});return{observer:i,subscribe(r,s){var a;i.observe(r);const A=(a=o.get(r))!==null\u0026\u0026a!==void 0?a:[];A.push(s),o.set(r,A)},unsubscribe(r,s){var a;const A=(a=o.get(r))!==null\u0026\u0026a!==void 0?a:[];if(A.length===1){i.unobserve(r),o.delete(r);return}const c=A.indexOf(s);c!==-1\u0026\u0026A.splice(c,1),o.set(r,A)}}}let M$e;const yOi=t=\u003eM$e||(M$e=COi(t));var xOi=t=\u003e{const e={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(const n of t.lines??[])for(const o of n.points??[])e.minX=Math.min(e.minX,o.x),e.minY=Math.min(e.minY,o.y),e.maxX=Math.max(e.maxX,o.x),e.maxY=Math.max(e.maxY,o.y);for(const n of t.rects??[]){const o=hmo(n);e.minX=Math.min(e.minX,o.minX),e.minY=Math.min(e.minY,o.minY),e.maxX=Math.max(e.maxX,o.maxX),e.maxY=Math.max(e.maxY,o.maxY)}for(const n of t.polygons??[])for(const o of n.points??[])e.minX=Math.min(e.minX,o.x),e.minY=Math.min(e.minY,o.y),e.maxX=Math.max(e.maxX,o.x),e.maxY=Math.max(e.maxY,o.y);for(const n of t.points??[])e.minX=Math.min(e.minX,n.x),e.minY=Math.min(e.minY,n.y),e.maxX=Math.max(e.maxX,n.x),e.maxY=Math.max(e.maxY,n.y);for(const n of t.circles??[])e.minX=Math.min(e.minX,n.center.x-n.radius),e.minY=Math.min(e.minY,n.center.y-n.radius),e.maxX=Math.max(e.maxX,n.center.x+n.radius),e.maxY=Math.max(e.maxY,n.center.y+n.radius);for(const n of t.arrows??[]){const o=lbt(n);e.minX=Math.min(e.minX,o.minX),e.minY=Math.min(e.minY,o.minY),e.maxX=Math.max(e.maxX,o.maxX),e.maxY=Math.max(e.maxY,o.maxY)}for(const n of t.texts??[])e.minX=Math.min(e.minX,n.x),e.minY=Math.min(e.minY,n.y),e.maxX=Math.max(e.maxX,n.x),e.maxY=Math.max(e.maxY,n.y);return e};function qhn(t){const e=l=\u003e!l||l.length===0?0:l.reduce((u,g)=\u003e{const h=Number.isNaN(g.step)?0:g.step||0;return Math.max(u,h)},0),n=e(t.points),o=e(t.lines),i=e(t.infiniteLines),r=e(t.rects),s=e(t.polygons),a=e(t.circles),A=e(t.texts),c=e(t.arrows);return Math.max(n,o,i,r,s,a,A,c)}var EOi=t=\u003et.slice().sort((e,n)=\u003en.width*n.height-e.width*e.height);function BOi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t,a=n.x-e.x,A=n.y-e.y,c=Math.sqrt(a*a+A*A),l=i.x-o.x,u=i.y-o.y,g=Math.sqrt(l*l+u*u),h=Math.atan2(u,l)*(180/Math.PI),d=Math.abs(h)%90,m=Math.min(d,90-d)\u003e15,_=(o.x+i.x)/2,f=(o.y+i.y)/2,I=15,C=h+90;let y=Math.cos(C*Math.PI/180)*I,x=Math.sin(C*Math.PI/180)*I;const E=l\u003e0\u0026\u0026u\u003c0,B=l\u003e0\u0026\u0026u\u003e0,S=l\u003c0\u0026\u0026u\u003e0;r!==s\u0026\u0026!E\u0026\u0026(y=-y,x=-x),E\u0026\u0026(y+=Math.cos(C*Math.PI/180)*-45,x+=Math.sin(C*Math.PI/180)*-45),B\u0026\u0026(y+=Math.cos(C*Math.PI/180)+-20,x+=Math.sin(C*Math.PI/180)+-10),S\u0026\u0026(y+=Math.cos(C*Math.PI/180)*10,x+=Math.sin(C*Math.PI/180)*10);const Q=_+y,w=f+x;return{distance:c,screenDistance:g,x:Q,y:w,show:c\u003e.01\u0026\u0026g\u003e30\u0026\u0026m}}function bOi(t){const{dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}=t;return ee.useMemo(()=\u003eBOi({dimensionStart:e,dimensionEnd:n,screenDimensionStart:o,screenDimensionEnd:i,flipX:r,flipY:s}),[e,n,o,i,r,s])}var SOi=({children:t,transform:e})=\u003e{e||(e=QQ());const[n,o]=ee.useState(!1),[i,r]=ee.useState(!1),[s,a]=ee.useState({x:0,y:0}),[A,c]=ee.useState({x:0,y:0}),l=ee.useRef({x:0,y:0}),u=ee.useRef(null),g=ee.useRef(!1),d=u.current?.getBoundingClientRect(),p=ee.useCallback(()=\u003e{g.current=!0,u.current?.focus()},[]),m=ee.useCallback(()=\u003e{g.current=!1},[]);ee.useEffect(()=\u003e{const y=x=\u003e{const E=u.current?.contains(document.activeElement)||document.activeElement===u.current;!g.current\u0026\u0026!E||(x.key===\"d\"\u0026\u0026(a({x:l.current.x,y:l.current.y}),c({x:l.current.x,y:l.current.y}),o(B=\u003e!B),r(!0)),x.key===\"Escape\"\u0026\u0026(o(!1),r(!1)))};return window.addEventListener(\"keydown\",y),()=\u003e{window.removeEventListener(\"keydown\",y)}},[]);const _=Bn(e,s),f=Bn(e,A),I={left:Math.min(_.x,f.x),right:Math.max(_.x,f.x),top:Math.min(_.y,f.y),bottom:Math.max(_.y,f.y),flipX:_.x\u003ef.x,flipY:_.y\u003ef.y,width:0,height:0};I.width=I.right-I.left,I.height=I.bottom-I.top;const C=bOi({dimensionStart:s,dimensionEnd:A,screenDimensionStart:_,screenDimensionEnd:f,flipX:I.flipX,flipY:I.flipY});return K.jsxs(\"div\",{ref:u,tabIndex:0,style:{position:\"relative\"},onMouseMove:y=\u003e{const x=y.currentTarget.getBoundingClientRect(),E=y.clientX-x.left,B=y.clientY-x.top,S=Bn(bV(e),{x:E,y:B});l.current.x=S.x,l.current.y=S.y,i\u0026\u0026c({x:S.x,y:S.y})},onMouseDown:()=\u003e{i?r(!1):n\u0026\u0026o(!1)},onMouseEnter:p,onMouseLeave:m,children:[t,n\u0026\u0026K.jsxs(K.Fragment,{children:[C.show\u0026\u0026K.jsx(\"div\",{style:{position:\"absolute\",left:C.x,top:C.y,color:\"red\",mixBlendMode:\"difference\",pointerEvents:\"none\",fontSize:12,fontFamily:\"sans-serif\",whiteSpace:\"nowrap\",zIndex:30},children:C.distance.toFixed(2)}),K.jsx(\"div\",{style:{position:\"absolute\",left:I.left,width:I.width,textAlign:\"center\",top:_.y+2,color:\"red\",mixBlendMode:\"difference\",pointerEvents:\"none\",marginTop:I.flipY?0:-20,fontSize:12,fontFamily:\"sans-serif\",zIndex:30},children:Math.abs(s.x-A.x).toFixed(2)}),K.jsx(\"div\",{style:{position:\"absolute\",left:f.x,height:I.height,display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",top:I.top,color:\"red\",pointerEvents:\"none\",mixBlendMode:\"difference\",fontSize:12,fontFamily:\"sans-serif\",zIndex:30},children:K.jsx(\"div\",{style:{marginLeft:I.flipX?\"-100%\":4,paddingRight:4},children:Math.abs(s.y-A.y).toFixed(2)})}),K.jsxs(\"svg\",{style:{position:\"absolute\",left:0,top:0,pointerEvents:\"none\",mixBlendMode:\"difference\",zIndex:30},width:d?.width||\"100%\",height:d?.height||\"100%\",children:[K.jsx(\"defs\",{children:K.jsx(\"marker\",{id:\"head\",orient:\"auto\",markerWidth:\"3\",markerHeight:\"4\",refX:\"2\",refY:\"2\",children:K.jsx(\"path\",{d:\"M0,0 V4 L2,2 Z\",fill:\"red\"})})}),K.jsx(\"line\",{x1:_.x,y1:_.y,x2:f.x,y2:f.y,markerEnd:\"url(#head)\",strokeWidth:1.5,fill:\"none\",stroke:\"red\"}),K.jsx(\"line\",{x1:_.x,y1:_.y,x2:f.x,y2:_.y,strokeWidth:1.5,fill:\"none\",strokeDasharray:\"2,2\",stroke:\"red\"}),K.jsx(\"line\",{x1:f.x,y1:_.y,x2:f.x,y2:f.y,strokeWidth:1.5,fill:\"none\",strokeDasharray:\"2,2\",stroke:\"red\"})]}),K.jsxs(\"div\",{style:{right:0,bottom:0,position:\"absolute\",color:\"red\",fontFamily:\"sans-serif\",fontSize:12,margin:4},children:[\"(\",s.x.toFixed(2),\",\",s.y.toFixed(2),\")\",K.jsx(\"br\",{}),\"(\",A.x.toFixed(2),\",\",A.y.toFixed(2),\")\",K.jsx(\"br\",{}),\"dist:\",\" \",Math.sqrt((A.x-s.x)**2+(A.y-s.y)**2).toFixed(2)]})]})]})},Xhn=({label:t,onClose:e})=\u003eK.jsx(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":\"Object label\",onClick:e,style:{position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:16,background:\"rgba(0, 0, 0, 0.28)\"},children:K.jsxs(\"div\",{onClick:n=\u003e{n.stopPropagation()},style:{width:\"min(420px, 100%)\",background:\"#fff\",borderRadius:10,boxShadow:\"0 12px 32px rgba(0, 0, 0, 0.2)\",padding:16},children:[K.jsx(\"div\",{style:{fontWeight:600,marginBottom:8},children:\"Object label\"}),K.jsx(\"div\",{style:{whiteSpace:\"pre-wrap\",wordBreak:\"break-word\",marginBottom:16},children:t}),K.jsx(\"div\",{style:{display:\"flex\",justifyContent:\"flex-end\"},children:K.jsx(\"button\",{type:\"button\",onClick:e,children:\"Close\"})})]})}),Zhn=(t,e,n,o,i,r)=\u003e{const s=t-n,a=e-o,A=i-n,c=r-o,l=s*A+a*c,u=A*A+c*c;let g=-1;u!==0\u0026\u0026(g=l/u);let h=0,d=0;g\u003c0?(h=n,d=o):g\u003e1?(h=i,d=r):(h=n+g*A,d=o+g*c);const p=t-h,m=e-d;return Math.sqrt(p*p+m*m)},r9=(t,e)=\u003e{try{return qpo(t,e)}catch{return e}},QOi=({arrow:t,index:e,interactiveState:n})=\u003e{const{realToScreen:o,onObjectClicked:i,setHoverTooltip:r}=n,[s,a]=ee.useState(!1),A=ee.useMemo(()=\u003ejW(t),[t]),c=ee.useMemo(()=\u003e({shaftStart:Bn(o,A.shaftStart),shaftEnd:Bn(o,A.shaftEnd),heads:A.heads.map(y=\u003e({tip:Bn(o,y.tip),base:Bn(o,y.base),leftWing:Bn(o,y.leftWing),rightWing:Bn(o,y.rightWing)}))}),[A,o]),l=Math.abs(o.a),u=12,g=A.shaftWidth*(l||1),h=u*.6,d=ee.useMemo(()=\u003eVce(c.shaftStart,c.shaftEnd,{fontSize:u,strokeWidth:g,normalPadding:6,alongOffset:t.label?h:0}),[c,u,g,t.label,h]),p=ee.useMemo(()=\u003eVce(c.shaftStart,c.shaftEnd,{fontSize:u,strokeWidth:g,normalPadding:12,alongOffset:t.inlineLabel?-h:0}),[c,u,g,t.inlineLabel,h]),m=t.color||rh[e%rh.length]||\"black\",_=s?r9(.2,m):m,f=[t.label,t.inlineLabel].filter(Boolean).join(`\n`),I=t.label?p:d;ee.useEffect(()=\u003e{if(!(!s||!f))return r?.({text:f,x:I.x,y:I.y}),()=\u003e{r?.(null)}},[s,r,I.x,I.y,f]);const C=y=\u003e{const x=y.currentTarget.getBoundingClientRect(),E=y.clientX-x.left,B=y.clientY-x.top,S=10,w=[{from:c.shaftStart,to:c.shaftEnd},...c.heads.flatMap(M=\u003e[{from:M.base,to:M.leftWing},{from:M.leftWing,to:M.tip},{from:M.tip,to:M.rightWing},{from:M.rightWing,to:M.base}])].some(({from:M,to:k})=\u003eZhn(E,B,M.x,M.y,k.x,k.y)\u003cS);a(w)};return K.jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",pointerEvents:\"none\"},children:K.jsxs(\"svg\",{style:{width:\"100%\",height:\"100%\",pointerEvents:\"auto\"},onMouseMove:C,onMouseLeave:()=\u003e{a(!1),r?.(null)},onClick:s?y=\u003e{y.stopPropagation(),i?.({type:\"arrow\",index:e,object:t})}:void 0,children:[K.jsx(\"line\",{x1:c.shaftStart.x,y1:c.shaftStart.y,x2:c.shaftEnd.x,y2:c.shaftEnd.y,stroke:_,strokeWidth:g,strokeLinecap:\"round\",pointerEvents:\"stroke\"}),c.heads.map((y,x)=\u003eK.jsx(\"polygon\",{points:`${y.tip.x},${y.tip.y} ${y.leftWing.x},${y.leftWing.y} ${y.rightWing.x},${y.rightWing.y}`,fill:_},x))]})})},vOi=({circle:t,interactiveState:e,index:n})=\u003e{const o=rh[n%rh.length];let{center:i,radius:r,fill:s,stroke:a,layer:A,step:c,label:l}=t;const{activeLayers:u,activeStep:g,realToScreen:h,onObjectClicked:d,setHoverTooltip:p}=e,[m,_]=ee.useState(!1),f=Bn(h,i),I=r*h.a;let C=s||o;return m\u0026\u0026(C=r9(.2,C),a=a\u0026\u0026r9(.2,a)),ee.useEffect(()=\u003e{if(!(!m||!l))return p?.({text:l,x:f.x,y:f.y-I}),()=\u003e{p?.(null)}},[m,l,f.x,f.y,I,p]),K.jsx(\"div\",{style:{position:\"absolute\",left:f.x-I,top:f.y-I,width:I*2,height:I*2,borderRadius:\"50%\",backgroundColor:C,border:a?`2px solid ${a}`:\"none\",cursor:\"pointer\",transition:\"border-color 0.2s\"},onMouseEnter:()=\u003e_(!0),onMouseLeave:()=\u003e{_(!1),p?.(null)},onClick:()=\u003ed?.({type:\"circle\",index:n,object:t})})},wOi=({x:t,y:e,onSaveCamera:n,onLoadCamera:o,onClearCamera:i,onAddMark:r,onClearMarks:s,onClose:a})=\u003e{const A=ee.useRef(null);ee.useEffect(()=\u003e{const h=d=\u003e{A.current\u0026\u0026!A.current.contains(d.target)\u0026\u0026a()};return document.addEventListener(\"mousedown\",h),()=\u003e{document.removeEventListener(\"mousedown\",h)}},[a]);const c={position:\"absolute\",left:t,top:e,backgroundColor:\"white\",border:\"1px solid #ccc\",borderRadius:3,boxShadow:\"0 2px 6px rgba(0,0,0,0.1)\",padding:0,zIndex:1e3,minWidth:160,fontSize:\"12px\"},l={padding:\"4px 8px\",cursor:\"pointer\",userSelect:\"none\",lineHeight:\"1.5\"},u=h=\u003e{h.currentTarget.style.backgroundColor=\"#f5f5f5\"},g=h=\u003e{h.currentTarget.style.backgroundColor=\"\"};return K.jsxs(\"div\",{ref:A,style:c,children:[K.jsx(\"div\",{style:l,onClick:()=\u003e{n(),a()},onMouseEnter:u,onMouseLeave:g,children:\"Save Camera Position\"}),K.jsx(\"div\",{style:l,onClick:()=\u003e{o(),a()},onMouseEnter:u,onMouseLeave:g,children:\"Load Camera Position\"}),K.jsx(\"div\",{style:l,onClick:()=\u003e{i(),a()},onMouseEnter:u,onMouseLeave:g,children:\"Clear Saved Camera Position\"}),K.jsx(\"div\",{style:l,onClick:()=\u003e{r(),a()},onMouseEnter:u,onMouseLeave:g,children:\"Add Mark\"}),K.jsx(\"div\",{style:l,onClick:()=\u003e{s(),a()},onMouseEnter:u,onMouseLeave:g,children:\"Clear Marks\"})]})},POi=({infiniteLine:t,index:e,interactiveState:n,size:o})=\u003e{const{realToScreen:i,onObjectClicked:r,setHoverTooltip:s}=n,[a,A]=ee.useState(!1),c=obt(i,o.width,o.height),l=nbt(t,c);if(!l)return null;const[u,g]=l,h=Bn(i,u),d=Bn(i,g),p=t.strokeColor??rh[e%rh.length],m=(t.strokeWidth??1/Math.abs(i.a))*Math.abs(i.a),_=(h.x+d.x)/2,f=(h.y+d.y)/2;return K.jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:o.width,height:o.height,pointerEvents:\"none\"},children:K.jsxs(\"svg\",{style:{width:o.width,height:o.height,pointerEvents:\"none\"},children:[K.jsx(\"line\",{x1:h.x,y1:h.y,x2:d.x,y2:d.y,stroke:\"transparent\",strokeWidth:m+10,pointerEvents:\"stroke\",onMouseEnter:()=\u003e{A(!0),t.label\u0026\u0026s?.({text:t.label,x:_,y:f})},onMouseLeave:()=\u003e{A(!1),s?.(null)},onClick:()=\u003er?.({type:\"infinite-line\",index:e,object:t})}),K.jsx(\"line\",{x1:h.x,y1:h.y,x2:d.x,y2:d.y,stroke:a?r9(.2,p):p,strokeWidth:m,strokeDasharray:t.strokeDash?typeof t.strokeDash==\"string\"?t.strokeDash:t.strokeDash.map(I=\u003eI*Math.abs(i.a)).join(\",\"):void 0,pointerEvents:\"none\"})]})})},MOi=({line:t,index:e,interactiveState:n,size:o,mousePosition:i})=\u003e{const{activeLayers:r,activeStep:s,realToScreen:a,onObjectClicked:A,setHoverTooltip:c}=n,{points:l,layer:u,step:g,strokeColor:h,strokeWidth:d=1/a.a,strokeDash:p}=t,m=l.map(B=\u003eBn(a,B)),_=d*Math.abs(a.a),C=Math.max(_/2+3,6),y=C*2,x=ee.useMemo(()=\u003e{if(!i)return!1;for(let B=0;B\u003cm.length-1;B++)if(Zhn(i.x,i.y,m[B].x,m[B].y,m[B+1].x,m[B+1].y)\u003c=C)return!0;return!1},[C,i,m]),E=h??rh[e%rh.length];return ee.useEffect(()=\u003e{if(!(!x||!t.label||!i))return c?.({text:t.label,x:i.x,y:i.y}),()=\u003e{c?.(null)}},[x,t.label,i?.x,i?.y,c]),K.jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:o.width,height:o.height,pointerEvents:\"none\"},children:K.jsxs(\"svg\",{style:{width:o.width,height:o.height,overflow:\"visible\",pointerEvents:\"none\"},children:[K.jsx(\"polyline\",{points:m.map(B=\u003e`${B.x},${B.y}`).join(\" \"),stroke:\"transparent\",fill:\"none\",strokeWidth:y,strokeLinecap:\"round\",strokeLinejoin:\"round\",pointerEvents:\"stroke\",onClick:x?()=\u003eA?.({type:\"line\",index:e,object:t}):void 0}),K.jsx(\"polyline\",{points:m.map(B=\u003e`${B.x},${B.y}`).join(\" \"),stroke:x?r9(.2,E):E,fill:\"none\",strokeWidth:_,strokeDasharray:p?typeof p==\"string\"?p:`${p[0]*Math.abs(a.a)}, ${p[1]*Math.abs(a.a)}`:void 0,strokeLinecap:\"round\",strokeLinejoin:\"round\",pointerEvents:\"none\"})]})})},DOi=({marker:t,transform:e})=\u003e{const[n,o]=Bn(e,[t.x,t.y]);return K.jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,pointerEvents:\"none\",zIndex:900},children:K.jsxs(\"g\",{transform:`translate(${n}, ${o})`,children:[K.jsx(\"circle\",{r:7,fill:\"rgba(255, 0, 0, 0.5)\",stroke:\"rgba(255, 0, 0, 0.8)\",strokeWidth:2}),K.jsx(\"circle\",{r:2,fill:\"rgba(255, 0, 0, 0.9)\"})]})})},NOi=({point:t,interactiveState:e,index:n})=\u003e{const{color:o,label:i,layer:r,step:s}=t,{activeLayers:a,activeStep:A,realToScreen:c,onObjectClicked:l,setHoverTooltip:u}=e,[g,h]=ee.useState(!1),d=Bn(c,t),p=10,m=`${i?`${i}\n`:\"\"}x: ${t.x.toFixed(2)}, y: ${t.y.toFixed(2)}`;return ee.useEffect(()=\u003e{if(g)return u?.({text:m,x:d.x,y:d.y-p/2}),()=\u003e{u?.(null)}},[g,d.x,d.y,u,m]),K.jsx(\"div\",{style:{position:\"absolute\",left:d.x-p/2,top:d.y-p/2,width:p,height:p,borderRadius:\"50%\",border:`2px solid ${g?r9(.2,o??rh[n%rh.length]):o??rh[n%rh.length]}`,cursor:\"pointer\",transition:\"border-color 0.2s\"},onMouseEnter:()=\u003eh(!0),onMouseLeave:()=\u003e{h(!1),u?.(null)},onClick:()=\u003el?.({type:\"point\",index:n,object:t})})},ROi=({polygon:t,interactiveState:e,index:n})=\u003e{const{points:o,fill:i,stroke:r,strokeWidth:s}=t,{realToScreen:a,onObjectClicked:A,setHoverTooltip:c}=e,[l,u]=ee.useState(!1),g=!!(o\u0026\u0026o.length\u003e0),h=g?o.map(U=\u003eBn(a,U)):[],d=h.map(U=\u003eU.x),p=h.map(U=\u003eU.y),m=g?Math.min(...d):0,_=g?Math.max(...d):0,f=g?Math.min(...p):0,I=g?Math.max(...p):0,C=4,y=m-C,x=f-C,E=Math.max(_-m,0)+C*2,B=Math.max(I-f,0)+C*2,S=h.map(U=\u003e({x:U.x-y,y:U.y-x})),Q=rh[n%rh.length],M=i!==void 0||r!==void 0?i||\"transparent\":Q,k=r,R=l?r9(.2,M):M,F=k?l?r9(.2,k):k:void 0,O=s===void 0?void 0:s*a.a;return ee.useEffect(()=\u003e{if(!(!g||!l||!t.label))return c?.({text:t.label,x:(m+_)/2,y:x}),()=\u003e{c?.(null)}},[g,l,_,m,t.label,c,x]),g?K.jsx(\"div\",{style:{position:\"absolute\",top:x,left:y,width:E,height:B,pointerEvents:\"none\"},children:K.jsx(\"svg\",{width:E,height:B,style:{display:\"block\"},children:K.jsx(\"polygon\",{points:S.map(U=\u003e`${U.x},${U.y}`).join(\" \"),fill:R,stroke:F??\"none\",strokeWidth:O,pointerEvents:\"all\",onMouseEnter:()=\u003eu(!0),onMouseLeave:()=\u003e{u(!1),c?.(null)},onClick:()=\u003eA?.({type:\"polygon\",index:n,object:t})})})}):null},TOi=({rect:t,interactiveState:e,index:n})=\u003e{const o=rh[n%rh.length];let{fill:i,stroke:r}=t;const{activeLayers:s,activeStep:a,realToScreen:A,onObjectClicked:c,setHoverTooltip:l}=e,[u,g]=ee.useState(!1),h=VQe(t,A);let p=i!==void 0||r!==void 0?i||\"transparent\":o;return u\u0026\u0026(p=r9(.2,p),r=r9(.2,r)),ee.useEffect(()=\u003e{if(!(!u||!t.label))return l?.({text:t.label,x:h.center.x,y:h.center.y-h.height/2}),()=\u003e{l?.(null)}},[u,h.center.x,h.center.y,h.height,t.label,l]),K.jsx(\"div\",{style:{position:\"absolute\",left:h.center.x,top:h.center.y,width:h.width,height:h.height,transform:\"translate(-50%, -50%)\",pointerEvents:\"none\"},children:K.jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor:p,border:r?`2px solid ${u?r9(.2,r):r}`:\"none\",boxSizing:\"border-box\",cursor:\"pointer\",transition:\"border-color 0.2s\",transformOrigin:\"center\",transform:`rotate(${h.angleDegrees}deg)`,pointerEvents:\"auto\"},onMouseEnter:()=\u003eg(!0),onMouseLeave:()=\u003e{g(!1),l?.(null)},onClick:()=\u003ec?.({type:\"rect\",index:n,object:t})})})},kOi=({textObj:t,interactiveState:e,index:n})=\u003e{const{realToScreen:o,onObjectClicked:i}=e,{x:r,y:s,text:a,color:A,fontSize:c,anchorSide:l}=t,u=Bn(o,{x:r,y:s}),h={top_left:\"translate(0%, 0%)\",top_center:\"translate(-50%, 0%)\",top_right:\"translate(-100%, 0%)\",center_left:\"translate(0%, -50%)\",center:\"translate(-50%, -50%)\",center_right:\"translate(-100%, -50%)\",bottom_left:\"translate(0%, -100%)\",bottom_center:\"translate(-50%, -100%)\",bottom_right:\"translate(-100%, -100%)\"}[l??\"center\"];return K.jsx(\"div\",{style:{position:\"absolute\",left:u.x,top:u.y,transform:h,color:A||\"black\",fontSize:c??12,whiteSpace:\"pre\",cursor:\"default\"},onClick:()=\u003ei?.({type:\"text\",index:n,object:t}),children:a})},epn=({text:t})=\u003eK.jsx(\"div\",{style:{background:\"white\",border:\"1px solid #ccc\",boxShadow:\"0 0 10px 0 rgba(0, 0, 0, 0.1)\",borderRadius:\"4px\",padding:\"4px 8px\",fontSize:\"12px\",minWidth:\"120px\",maxWidth:\"300px\",whiteSpace:\"pre-wrap\",overflowWrap:\"anywhere\",zIndex:100},children:t}),y4=5,FOi=(t,e)=\u003eee.useMemo(()=\u003e(n,o)=\u003e{const i=Bn(t,n),r=Bn(t,o),s=-y4,a=e.width+y4,A=-y4,c=e.height+y4;if(i.x\u003e=s\u0026\u0026i.x\u003c=a\u0026\u0026i.y\u003e=A\u0026\u0026i.y\u003c=c||r.x\u003e=s\u0026\u0026r.x\u003c=a\u0026\u0026r.y\u003e=A\u0026\u0026r.y\u003c=c)return!0;const l=(u,g,h,d)=\u003e{const p=(g.x-u.x)*(d.y-h.y)-(g.y-u.y)*(d.x-h.x);if(p===0)return!1;const m=((d.y-h.y)*(d.x-u.x)+(h.x-d.x)*(d.y-u.y))/p,_=((u.y-g.y)*(d.x-u.x)+(g.x-u.x)*(d.y-u.y))/p;return m\u003e=0\u0026\u0026m\u003c=1\u0026\u0026_\u003e=0\u0026\u0026_\u003c=1};return l(i,r,{x:s,y:A},{x:a,y:A})||l(i,r,{x:a,y:A},{x:a,y:c})||l(i,r,{x:s,y:c},{x:a,y:c})||l(i,r,{x:s,y:A},{x:s,y:c})},[t,e]),LOi=(t,e)=\u003eee.useMemo(()=\u003en=\u003e{const o=Bn(t,n);return o.x\u003e=-y4\u0026\u0026o.x\u003c=e.width+y4\u0026\u0026o.y\u003e=-y4\u0026\u0026o.y\u003c=e.height+y4},[t,e]),HOi=({isPointOnScreen:t,doesLineIntersectViewport:e,filterLayerAndStep:n})=\u003eee.useMemo(()=\u003eo=\u003e{if(!n(o))return!1;if(o.points.some(i=\u003et(i)))return!0;for(let i=0;i\u003co.points.length-1;i++)if(e(o.points[i],o.points[i+1]))return!0;return!!(o.points.length\u003e2\u0026\u0026o.closed\u0026\u0026e(o.points[o.points.length-1],o.points[0]))},[t,e,n]),OOi=({isPointOnScreen:t,filterLayerAndStep:e})=\u003eee.useMemo(()=\u003en=\u003ee(n)?t(n):!1,[t,e]),GOi=({realToScreen:t,isPointOnScreen:e,doesLineIntersectViewport:n,filterLayerAndStep:o})=\u003eee.useMemo(()=\u003ei=\u003e{if(!o(i))return!1;const{center:r}=i,[s,a,A,c]=abt(i,t);return e(r)||e(s)||e(a)||e(A)||e(c)?!0:n(s,a)||n(a,A)||n(A,c)||n(c,s)},[t,e,n,o]),YOi=({isPointOnScreen:t,filterLayerAndStep:e,realToScreen:n,size:o})=\u003eee.useMemo(()=\u003ei=\u003e{if(!e(i))return!1;const{center:r,radius:s}=i;if(t(r)||t({x:r.x+s,y:r.y})||t({x:r.x-s,y:r.y})||t({x:r.x,y:r.y+s})||t({x:r.x,y:r.y-s}))return!0;const a=Bn(n,r),A=Math.abs(n.a),c=s*A,l=-y4,u=o.width+y4,g=-y4,h=o.height+y4;if(a.x\u003e=l\u0026\u0026a.x\u003c=u\u0026\u0026(Math.abs(a.y-g)\u003c=c||Math.abs(a.y-h)\u003c=c)||a.y\u003e=g\u0026\u0026a.y\u003c=h\u0026\u0026(Math.abs(a.x-l)\u003c=c||Math.abs(a.x-u)\u003c=c))return!0;const d=(m,_)=\u003e{const f=a.x-m,I=a.y-_;return f*f+I*I},p=c*c;return d(l,g)\u003c=p||d(u,g)\u003c=p||d(l,h)\u003c=p||d(u,h)\u003c=p},[t,e,n,o]),UOi=({isPointOnScreen:t,filterLayerAndStep:e})=\u003eee.useMemo(()=\u003en=\u003ee(n)?t({x:n.x,y:n.y}):!1,[t,e]),KOi=({isPointOnScreen:t,doesLineIntersectViewport:e})=\u003eee.useMemo(()=\u003en=\u003e{const o=jW(n),{shaftStart:i,shaftEnd:r,heads:s}=o;return t(i)||t(r)||s.some(A=\u003et(A.tip)||t(A.leftWing)||t(A.rightWing)||t(A.base))?!0:[[i,r],...s.flatMap(A=\u003e[[A.base,A.leftWing],[A.leftWing,A.tip],[A.tip,A.rightWing],[A.rightWing,A.base]])].some(([A,c])=\u003ee(A,c))},[t,e]),VOi=({isPointOnScreen:t,doesLineIntersectViewport:e,filterLayerAndStep:n})=\u003eee.useMemo(()=\u003eo=\u003e{if(!n(o)||!o.points||o.points.length===0)return!1;if(o.points.some(i=\u003et(i)))return!0;for(let i=0;i\u003co.points.length;i++){const r=o.points[i],s=o.points[(i+1)%o.points.length];if(e(r,s))return!0}return!1},[t,e,n]),zOi=1e3,JOi=({graphics:t,onObjectClicked:e,objectLimit:n,height:o=600,stepMetadata:i,alwaysShowToolbar:r=!1})=\u003e{const[s,a]=ee.useState(null),[A,c]=ee.useState(null),[l,u]=ee.useState(!0),[g,h]=ee.useState({width:600,height:o}),[d,p]=ee.useState(null),[m,_]=ee.useState(!1),[f,I]=ee.useState(null),[C,y]=ee.useState([]),[x,E]=ee.useState(null),[B,S]=ee.useState(null),Q=Array.from(new Set([...t.lines?.map(Ct=\u003eCt.layer).filter(Boolean)??[],...t.infiniteLines?.map(Ct=\u003eCt.layer).filter(Boolean)??[],...t.rects?.map(Ct=\u003eCt.layer).filter(Boolean)??[],...t.polygons?.map(Ct=\u003eCt.layer).filter(Boolean)??[],...t.points?.map(Ct=\u003eCt.layer).filter(Boolean)??[],...t.texts?.map(Ct=\u003eCt.layer).filter(Boolean)??[],...t.circles?.map(Ct=\u003eCt.layer).filter(Boolean)??[]])),w=qhn(t),M=ee.useMemo(()=\u003e{const Ct=xOi(t),Dt=Ct.maxX-Ct.minX,kt=Ct.maxY-Ct.minY;return{minX:Ct.minX-Dt/10,minY:Ct.minY-kt/10,maxX:Ct.maxX+Dt/10,maxY:Ct.maxY+kt/10}},[t]),k=ee.useCallback(()=\u003e{const Ct=window.location.pathname,Dt=window.location.search;return`saved-camera-position-${Ct}${Dt}`},[]),R=ee.useCallback(()=\u003e{const Ct=Math.max(M.maxX-M.minX,1),Dt=Math.max(M.maxY-M.minY,1),kt=Math.min(g.width/Ct,g.height/Dt);return Ad(pA(g.width/2,g.height/2),dC(kt,-kt),pA(-(M.maxX+M.minX)/2,-(M.maxY+M.minY)/2))},[g,M]),F=ee.useCallback(()=\u003e{try{const Ct=localStorage.getItem(k());if(Ct)return JSON.parse(Ct)}catch(Ct){console.error(\"Error loading saved data:\",Ct)}return null},[k]),O=ee.useCallback(()=\u003eF()?.transform||null,[F]),{transform:U,ref:Y,setTransform:W}=Xun({initialTransform:R()});$hn(Y,Ct=\u003e{h({width:Ct.contentRect.width,height:Ct.contentRect.height})}),ee.useEffect(()=\u003e{const Ct=F();Ct?.markers\u0026\u0026y(Ct.markers)},[F]);const te=ee.useCallback(Ct=\u003e{Ct.preventDefault();const Dt=Ct.clientX,kt=Ct.clientY,it=Ct.currentTarget.getBoundingClientRect(),Yt=it.left,pn=it.top,be=window.innerWidth,et=window.innerHeight,It=160,Bt=100;let mt=Dt-Yt,st=kt-pn;Dt\u003ebe/2\u0026\u0026(mt=mt-It),kt\u003eet/2\u0026\u0026(st=st-Bt),p({x:mt,y:st,clientX:Dt,clientY:kt})},[]),j=ee.useCallback((Ct,Dt)=\u003e{try{const kt={transform:Ct,markers:Dt};localStorage.setItem(k(),JSON.stringify(kt))}catch(kt){console.error(\"Error saving data:\",kt)}},[k]),J=ee.useCallback(()=\u003e{j(U,C)},[j,U,C]),oe=ee.useCallback(()=\u003e{try{const Ct=O();Ct\u0026\u0026W(Ct)}catch(Ct){console.error(\"Error loading camera position:\",Ct)}},[O,W]),ie=ee.useCallback(()=\u003e{try{const Ct=R();j(Ct,C),W(Ct)}catch(Ct){console.error(\"Error clearing camera position:\",Ct)}},[j,R,W,C]),ne=ee.useCallback(()=\u003e{if(d)try{const Ct={x:d.clientX,y:d.clientY},Dt=Y.current?.getBoundingClientRect();if(Dt){const kt=Ct.x-Dt.left,it=Ct.y-Dt.top,Yt=bV(U),[pn,be]=Bn(Yt,[kt,it]),et={x:pn,y:be},It=[...C,et];y(It);const Bt=F();Bt?.transform\u0026\u0026j(Bt.transform,It)}}catch(Ct){console.error(\"Error adding marker:\",Ct)}},[d,Y,U,C,j]),le=ee.useCallback(()=\u003e{y([]);const Ct=F();Ct?.transform\u0026\u0026j(Ct.transform,[])},[F,j]),ge=ee.useCallback(Ct=\u003e{switch(Ct.type){case\"arrow\":return[Ct.object.label,Ct.object.inlineLabel].filter(Boolean).join(`\n`);case\"text\":return Ct.object.text??\"\";default:return Ct.object.label??\"\"}},[]),_e=ee.useCallback(Ct=\u003e{if(e?.(Ct),!m)return;const Dt=ge(Ct);I(Dt||null)},[m,ge,e]);ee.useEffect(()=\u003e{if(!f)return;const Ct=Dt=\u003e{Dt.key===\"Escape\"\u0026\u0026I(null)};return window.addEventListener(\"keydown\",Ct),()=\u003e{window.removeEventListener(\"keydown\",Ct)}},[f]);const ue={activeLayers:s,activeStep:l?w:A,realToScreen:U,onObjectClicked:_e,setHoverTooltip:S},fe=w\u003e0?i?.[l?w:A??-1]?.title:void 0,pe=LOi(U,g),ye=FOi(U,g),Me=Ct=\u003e{if(s\u0026\u0026Ct.layer\u0026\u0026!s.includes(Ct.layer))return!1;const Dt=l?w:A;return!(Dt!==null\u0026\u0026Ct.step!==void 0\u0026\u0026Ct.step!==Dt)},ve=HOi({isPointOnScreen:pe,doesLineIntersectViewport:ye,filterLayerAndStep:Me}),he=OOi({isPointOnScreen:pe,filterLayerAndStep:Me}),Qe=GOi({realToScreen:U,isPointOnScreen:pe,doesLineIntersectViewport:ye,filterLayerAndStep:Me}),Pe=YOi({isPointOnScreen:pe,filterLayerAndStep:Me,realToScreen:U,size:g}),we=UOi({isPointOnScreen:pe,filterLayerAndStep:Me}),Te=KOi({isPointOnScreen:pe,doesLineIntersectViewport:ye}),Re=VOi({isPointOnScreen:pe,doesLineIntersectViewport:ye,filterLayerAndStep:Me}),Ee=(Ct,Dt)=\u003e{if(!Ct)return[];const kt=Ct.map((it,Yt)=\u003e({...it,originalIndex:Yt})).filter(Dt);return n?kt.slice(-n):kt},ke=ee.useMemo(()=\u003eEe(t.lines,ve).sort((Ct,Dt)=\u003e(Ct.zIndex??0)-(Dt.zIndex??0)||Ct.originalIndex-Dt.originalIndex),[t.lines,ve,n]),Ce=ee.useMemo(()=\u003eEe(t.infiniteLines,Me),[t.infiniteLines,Me,n]),Le=ee.useMemo(()=\u003eEOi(Ee(t.rects,Qe)),[t.rects,Qe,n]),Ye=ee.useMemo(()=\u003eEe(t.polygons,Re),[t.polygons,Re,n]),tt=ee.useMemo(()=\u003eEe(t.points,he),[t.points,he,n]),At=ee.useMemo(()=\u003eEe(t.circles,Pe),[t.circles,Pe,n]),at=ee.useMemo(()=\u003eEe(t.texts,we),[t.texts,we,n]),nt=ee.useMemo(()=\u003eEe(t.arrows,Te),[t.arrows,Te,n]),gt=Ce.length+ke.length+Le.length+Ye.length+tt.length+At.length+at.length+nt.length,bt=n\u0026\u0026gt\u003en;return K.jsxs(\"div\",{children:[K.jsxs(\"div\",{style:{margin:8,display:\"flex\",alignItems:\"center\",gap:12,flexWrap:\"wrap\"},children:[Q.length\u003e1\u0026\u0026K.jsxs(\"select\",{value:s?s[0]:\"\",onChange:Ct=\u003e{const Dt=Ct.target.value;a(Dt===\"\"?null:[Dt])},style:{marginRight:8},children:[K.jsx(\"option\",{value:\"\",children:\"All Layers\"}),Q.map(Ct=\u003eK.jsx(\"option\",{value:Ct,children:Ct},Ct))]}),w\u003e0\u0026\u0026K.jsxs(\"div\",{style:{display:\"inline-flex\",alignItems:\"center\",gap:8},children:[\"Step:\",K.jsx(\"input\",{type:\"number\",min:0,max:w,value:A??0,onChange:Ct=\u003e{const Dt=parseInt(Ct.target.value);u(!1),c(Number.isNaN(Dt)?null:Dt)},disabled:A===null}),K.jsxs(\"label\",{children:[K.jsx(\"input\",{type:\"checkbox\",style:{marginRight:4},checked:A!==null,onChange:Ct=\u003e{u(!1),c(Ct.target.checked?0:null)}}),\"Filter by step\"]}),K.jsxs(\"label\",{children:[K.jsx(\"input\",{type:\"checkbox\",style:{marginRight:4},checked:l,onChange:Ct=\u003e{u(Ct.target.checked),c(null)}}),\"Show last step\"]}),bt\u0026\u0026K.jsxs(\"span\",{style:{color:\"red\",fontSize:\"12px\"},children:[\"Display limited to \",n,\" objects. Received:\",\" \",gt,\".\"]})]}),K.jsxs(\"label\",{children:[K.jsx(\"input\",{type:\"checkbox\",style:{marginRight:4},checked:m,onChange:Ct=\u003e{const Dt=Ct.target.checked;_(Dt),Dt||I(null)}}),\"Enable Object Interation\"]}),w\u003e0\u0026\u0026fe\u0026\u0026K.jsx(\"div\",{style:{marginLeft:\"auto\",textAlign:\"right\"},children:fe})]}),K.jsxs(\"div\",{ref:Y,style:{position:\"relative\",height:o,overflow:\"hidden\"},onMouseMove:Ct=\u003e{const Dt=Y.current?.getBoundingClientRect();Dt\u0026\u0026E({x:Ct.clientX-Dt.left,y:Ct.clientY-Dt.top})},onMouseLeave:()=\u003eE(null),onContextMenu:te,children:[K.jsxs(SOi,{transform:U,children:[nt.map(Ct=\u003eK.jsx(QOi,{arrow:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),Ce.map(Ct=\u003eK.jsx(POi,{infiniteLine:Ct,index:Ct.originalIndex,interactiveState:ue,size:g},Ct.originalIndex)),ke.map(Ct=\u003eK.jsx(MOi,{line:Ct,index:Ct.originalIndex,interactiveState:ue,size:g,mousePosition:x},Ct.originalIndex)),Le.map(Ct=\u003eK.jsx(TOi,{rect:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),Ye.map(Ct=\u003eK.jsx(ROi,{polygon:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),At.map(Ct=\u003eK.jsx(vOi,{circle:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),at.map(Ct=\u003eK.jsx(kOi,{textObj:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),tt.map(Ct=\u003eK.jsx(NOi,{point:Ct,index:Ct.originalIndex,interactiveState:ue},Ct.originalIndex)),K.jsx(FT.SuperGrid,{stringifyCoord:(Ct,Dt)=\u003e`${Ct.toFixed(2)}, ${Dt.toFixed(2)}`,width:g.width,height:g.height,transform:U})]}),C.map((Ct,Dt)=\u003eK.jsx(DOi,{marker:Ct,index:Dt,transform:U},Dt)),B\u0026\u0026K.jsx(\"div\",{style:{position:\"absolute\",left:B.x,top:B.y-8,transform:\"translate(-50%, -100%)\",pointerEvents:\"none\",zIndex:zOi},children:K.jsx(epn,{text:B.text})}),d\u0026\u0026K.jsx(wOi,{x:d.x,y:d.y,onSaveCamera:J,onLoadCamera:oe,onClearCamera:ie,onAddMark:ne,onClearMarks:le,onClose:()=\u003ep(null)}),f\u0026\u0026K.jsx(Xhn,{label:f,onClose:()=\u003e{I(null)}})]})]})};function WOi(t,{showLastStep:e,activeStep:n,maxStep:o}){const i=e?o:n;return i===null?t:{...t,points:t.points?.filter(s=\u003es.step===void 0||s.step===i),lines:t.lines?.filter(s=\u003es.step===void 0||s.step===i),infiniteLines:t.infiniteLines?.filter(s=\u003es.step===void 0||s.step===i),rects:t.rects?.filter(s=\u003es.step===void 0||s.step===i),polygons:t.polygons?.filter(s=\u003es.step===void 0||s.step===i),circles:t.circles?.filter(s=\u003es.step===void 0||s.step===i),texts:t.texts?.filter(s=\u003es.step===void 0||s.step===i)}}function jOi(t){const e=V5(t),n=e.maxX-e.minX,o=e.maxY-e.minY;return{minX:e.minX-n/10,minY:e.minY-o/10,maxX:e.maxX+n/10,maxY:e.maxY+o/10}}function $Oi({graphics:t,showLabelsByDefault:e=!0,showGrid:n=!0,height:o=500,width:i=\"100%\",stepMetadata:r,alwaysShowToolbar:s=!1}){const a=ee.useRef(null),A=ee.useRef(null),[c,l]=ee.useState({width:600,height:600}),[u,g]=ee.useState(null),[h,d]=ee.useState(!0),[p,m]=ee.useState(!1),[_,f]=ee.useState(null),[I,C]=ee.useState(null),[y,x]=ee.useState(null),E=qhn(t),B=s||E\u003e0||e,S=E\u003e0?r?.[h?E:u??-1]?.title:void 0,Q=WOi(t,{activeStep:u,showLastStep:h,maxStep:E}),w=jOi(t),{transform:M,ref:k}=Xun({initialTransform:Ad(pA(c.width/2,c.height/2),dC(Math.min(c.width/(w.maxX-w.minX),c.height/(w.maxY-w.minY)),-Math.min(c.width/(w.maxX-w.minX),c.height/(w.maxY-w.minY))),pA(-(w.maxX+w.minX)/2,-(w.maxY+w.minY)/2))});$hn(A,j=\u003e{l({width:j.contentRect.width,height:j.contentRect.height})});const R=()=\u003e{a.current\u0026\u0026(a.current.width=c.width,a.current.height=c.height,fmo(Q,a.current,{transform:M,disableLabels:!0,hideInlineLabels:!0}),n\u0026\u0026F(a.current,M))},F=(j,J)=\u003e{const oe=j.getContext(\"2d\");if(!oe)return;oe.save(),oe.beginPath();const ie={x:-1e3,y:0},ne={x:1e3,y:0},le=O(ie,J),ge=O(ne,J);oe.moveTo(le.x,le.y),oe.lineTo(ge.x,ge.y);const _e={x:0,y:-1e3},ue={x:0,y:1e3},fe=O(_e,J),pe=O(ue,J);oe.moveTo(fe.x,fe.y),oe.lineTo(pe.x,pe.y),oe.strokeStyle=\"#aaa\",oe.lineWidth=1,oe.stroke(),oe.beginPath(),oe.setLineDash([2,2]);const ye=10;for(let Me=-100;Me\u003c=100;Me+=ye){if(Me===0)continue;const ve=O({x:Me,y:-100},J),he=O({x:Me,y:100},J);oe.moveTo(ve.x,ve.y),oe.lineTo(he.x,he.y)}for(let Me=-100;Me\u003c=100;Me+=ye){if(Me===0)continue;const ve=O({x:-100,y:Me},J),he=O({x:100,y:Me},J);oe.moveTo(ve.x,ve.y),oe.lineTo(he.x,he.y)}oe.strokeStyle=\"#ddd\",oe.stroke(),oe.restore()},O=(j,J)=\u003e({x:J.a*j.x+J.c*j.y+J.e,y:J.b*j.x+J.d*j.y+J.f}),U=j=\u003e{if(!a.current)return{label:null,overlayPoint:null};const J=a.current,oe=J.getBoundingClientRect(),ie=oe.width===0?1:J.width/oe.width,ne=oe.height===0?1:J.height/oe.height,le={x:j.clientX-oe.left,y:j.clientY-oe.top};return{label:mOi(Q,M,{x:le.x*ie,y:le.y*ne},{hitSlop:8}),overlayPoint:le}},Y=j=\u003e{const{label:J,overlayPoint:oe}=U(j);f(J),C(J?oe:null)},W=()=\u003e{f(null),C(null)},te=j=\u003e{if(!p)return;const{label:J}=U(j);x(J)};return ee.useEffect(()=\u003e{R()},[M,c,Q,n]),ee.useEffect(()=\u003e{if(!y)return;const j=J=\u003e{J.key===\"Escape\"\u0026\u0026x(null)};return window.addEventListener(\"keydown\",j),()=\u003e{window.removeEventListener(\"keydown\",j)}},[y]),K.jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:\"10px\"},children:[B\u0026\u0026K.jsxs(\"div\",{style:{display:\"flex\",gap:\"12px\",alignItems:\"center\"},children:[K.jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"8px\"},children:E\u003e0\u0026\u0026K.jsxs(K.Fragment,{children:[K.jsxs(\"label\",{children:[K.jsx(\"input\",{type:\"checkbox\",style:{marginRight:4},checked:u!==null,onChange:j=\u003e{g(j.target.checked?0:null)}}),\"Filter by step\"]}),K.jsx(\"input\",{type:\"number\",min:0,max:E,value:u??0,onChange:j=\u003e{const J=parseInt(j.target.value);d(!1),g(Number.isNaN(J)?0:Math.min(J,E))},disabled:u===null,style:{width:\"60px\"}}),K.jsxs(\"label\",{children:[K.jsx(\"input\",{type:\"checkbox\",style:{marginRight:4},checked:h,onChange:j=\u003e{d(j.target.checked),g(null)}}),\"Show last step\"]})]})}),K.jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"8px\"},children:K.jsxs(\"label\",{children:[K.jsx(\"input\",{type:\"checkbox\",style:{marginRight:4},checked:p,onChange:j=\u003e{const J=j.target.checked;m(J),J||x(null)}}),\"Enable Object Interation\"]})}),E\u003e0\u0026\u0026S\u0026\u0026K.jsx(\"div\",{style:{marginLeft:\"auto\",textAlign:\"right\"},children:S})]}),K.jsxs(\"div\",{ref:j=\u003e{A.current=j,k\u0026\u0026j\u0026\u0026(k.current=j)},style:{position:\"relative\",width:i,height:o,border:\"1px solid #ccc\",overflow:\"hidden\"},children:[K.jsx(\"canvas\",{ref:a,onMouseMove:Y,onMouseLeave:W,onClick:te,style:{position:\"absolute\",top:0,left:0,width:i,height:o}}),_\u0026\u0026I\u0026\u0026K.jsx(\"div\",{style:{position:\"absolute\",left:I.x,top:I.y-12,transform:\"translate(-50%, -100%)\",pointerEvents:\"none\"},children:K.jsx(epn,{text:_})}),y\u0026\u0026K.jsx(Xhn,{label:y,onClose:()=\u003e{x(null)}})]})]})}var fee=t=\u003e{if(t===null||typeof t!=\"object\")return t;if(Array.isArray(t))return t.map(fee);const e={};for(const[n,o]of Object.entries(t))n.startsWith(\"_\")||(e[n]=fee(o));return e},qOi=({solver:t,className:e=\"\"})=\u003e{const[n,o]=ee.useState(!1),i=ee.useRef(null);ee.useEffect(()=\u003e{const A=c=\u003e{i.current\u0026\u0026!i.current.contains(c.target)\u0026\u0026o(!1)};return document.addEventListener(\"mousedown\",A),()=\u003edocument.removeEventListener(\"mousedown\",A)},[]);const r=()=\u003e{try{if(typeof t.getConstructorParams!=\"function\"){alert(`getConstructorParams() is not implemented for ${t.getSolverName()}`);return}const A=fee(t.getConstructorParams()),c=new Blob([JSON.stringify(A,null,2)],{type:\"application/json\"}),l=URL.createObjectURL(c),u=document.createElement(\"a\");u.href=l,u.download=`${t.getSolverName()}_params.json`,u.click(),URL.revokeObjectURL(l)}catch(A){alert(`Error downloading params for ${t.getSolverName()}: ${A instanceof Error?A.message:String(A)}`)}o(!1)},s=()=\u003e{try{const A=fee(t.getConstructorParams()),c=t.getSolverName(),l=c===\"SchematicTracePipelineSolver\";let u;l?u=`import { PipelineDebugger } from \"site/components/PipelineDebugger\"\nimport type { InputProblem } from \"lib/types/InputProblem\"\n\nconst inputProblem: InputProblem = ${JSON.stringify(A,null,2)}\n\nexport default () =\u003e \u003cPipelineDebugger inputProblem={inputProblem} /\u003e\n`:u=`import { useMemo } from \"react\"\nimport { GenericSolverDebugger } from \"../components/GenericSolverDebugger\"\nimport { ${c} } from \"lib/solvers/${c}/${c}\"\n\nexport const inputProblem = ${JSON.stringify(A,null,2)}\n\nexport default () =\u003e {\n const solver = useMemo(() =\u003e {\n return new ${c}(inputProblem as any)\n }, [])\n return \u003cGenericSolverDebugger solver={solver} /\u003e\n}\n`;const g=new Blob([u],{type:\"text/plain\"}),h=URL.createObjectURL(g),d=document.createElement(\"a\");d.href=h,d.download=`${c}.page.tsx`,d.click(),URL.revokeObjectURL(h)}catch(A){alert(`Error generating page.tsx for ${t.getSolverName()}: ${A instanceof Error?A.message:String(A)}`)}o(!1)},a=()=\u003e{try{const A=fee(t.getConstructorParams()),c=t.getSolverName(),l=`import { ${c} } from \"lib/solvers/${c}/${c}\"\nimport { test, expect } from \"bun:test\"\n\ntest(\"${c} should solve problem correctly\", () =\u003e {\n const input = ${JSON.stringify(A,null,2)}\n \n const solver = new ${c}(input as any)\n solver.solve()\n\n expect(solver).toMatchSolverSnapshot(import.meta.path)\n \n // Add more specific assertions based on expected output\n // expect(solver.netLabelPlacementSolver!.netLabelPlacements).toMatchInlineSnapshot()\n})\n`,u=new Blob([l],{type:\"text/plain\"}),g=URL.createObjectURL(u),h=document.createElement(\"a\");h.href=g,h.download=`${c}.test.ts`,h.click(),URL.revokeObjectURL(g)}catch(A){alert(`Error generating test.ts for ${t.getSolverName()}: ${A instanceof Error?A.message:String(A)}`)}o(!1)};return K.jsxs(\"div\",{className:`relative ${e}`,ref:i,children:[K.jsx(\"button\",{className:\"px-2 py-1 rounded text-xs cursor-pointer\",onClick:()=\u003eo(!n),title:`Download options for ${t.getSolverName()}`,children:t.getSolverName()}),n\u0026\u0026K.jsxs(\"div\",{className:\"absolute top-full left-0 mt-1 bg-white border border-gray-300 rounded shadow-lg z-10 min-w-[150px]\",children:[K.jsx(\"button\",{className:\"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs\",onClick:r,children:\"Download JSON\"}),K.jsx(\"button\",{className:\"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs\",onClick:s,children:\"Download page.tsx\"}),K.jsx(\"button\",{className:\"w-full text-left px-3 py-2 hover:bg-gray-100 text-xs\",onClick:a,children:\"Download test.ts\"})]})]})},tpn=t=\u003et.activeSubSolver?[t,...tpn(t.activeSubSolver)]:[t],XOi=({solver:t})=\u003e{const e=tpn(t);return K.jsx(\"div\",{className:\"flex gap-1 items-center text-sm pt-1\",children:e.map((n,o)=\u003eK.jsxs(\"div\",{className:\"flex items-center\",children:[o\u003e0\u0026\u0026K.jsx(\"span\",{className:\"text-gray-400 mx-1\",children:\"→\"}),K.jsx(qOi,{solver:n})]},n.getSolverName()))})},ZOi=({solver:t,triggerRender:e,animationSpeed:n=25,renderer:o,onRendererChange:i,onAnimationSpeedChange:r,onDownloadVisualization:s,onSolverStarted:a,onSolverCompleted:A})=\u003e{const[c,l]=ee.useReducer(B=\u003e!B,!1),u=ee.useRef(void 0),g=ee.useRef(null),h=\"solver-debugger-last-iteration\",[d,p]=ee.useState(null),m=ee.useRef(null),_=ee.useMemo(()=\u003e[{label:\"Slow\",value:250,description:\"250ms\"},{label:\"Normal\",value:100,description:\"100ms\"},{label:\"Fast\",value:10,description:\"10ms\"},{label:\"Fast (2x)\",value:5,description:\"5ms\"},{label:\"Fast (10x)\",value:1,description:\"1ms\"},{label:\"Fast 20x\",value:.5,description:\"2 steps / 1ms\"},{label:\"Fast 100x\",value:.1,description:\"10 steps / 1ms\"}],[]),f=()=\u003e{const B=Math.max(1,n),S=n\u003c1?Math.round(1/n):1;u.current=setInterval(()=\u003e{if(t.solved||t.failed){u.current\u0026\u0026(clearInterval(u.current),u.current=void 0),l(),e(),A\u0026\u0026t.solved\u0026\u0026A(t);return}for(let Q=0;Q\u003cS\u0026\u0026!(t.solved||t.failed);Q++)t.step();e()},B)},I=()=\u003e{u.current\u0026\u0026(clearInterval(u.current),u.current=void 0)},C=()=\u003e{!t.solved\u0026\u0026!t.failed\u0026\u0026(t.step(),e())},y=()=\u003e{!t.solved\u0026\u0026!t.failed\u0026\u0026(a\u0026\u0026a(t),t.solve(),e(),A\u0026\u0026A(t))},x=()=\u003e{c?(I(),l()):(l(),f())},E=()=\u003e{if(t.solved||t.failed||c)return;g.current===null\u0026\u0026typeof window\u003c\"u\"\u0026\u0026(g.current=window.localStorage.getItem(h));const B=window.prompt(\"Step until which iteration?\",g.current??`${t.iterations}`);if(B===null)return;g.current=B,typeof window\u003c\"u\"\u0026\u0026window.localStorage.setItem(h,B);const S=Number(B);if(!Number.isFinite(S)){window.alert(\"Please enter a valid number for the iteration\");return}for(;t.iterations\u003cS\u0026\u0026!t.solved\u0026\u0026!t.failed;)t.step();e(),t.solved\u0026\u0026A\u0026\u0026A(t)};return ee.useEffect(()=\u003e()=\u003e{I()},[]),ee.useEffect(()=\u003e{(t.solved||t.failed)\u0026\u0026c\u0026\u0026(I(),l())},[t.solved,t.failed,c]),ee.useEffect(()=\u003e{c\u0026\u0026(I(),f())},[n,c]),ee.useEffect(()=\u003e{if(typeof document\u003e\"u\")return;const B=S=\u003e{m.current\u0026\u0026!m.current.contains(S.target)\u0026\u0026p(null)};return document.addEventListener(\"mousedown\",B),()=\u003e{document.removeEventListener(\"mousedown\",B)}},[]),K.jsxs(\"div\",{className:\"space-y-2 p-2 border-b\",children:[K.jsx(\"div\",{className:\"flex items-center\",children:K.jsxs(\"div\",{className:\"flex items-center gap-2\",ref:m,children:[K.jsxs(\"div\",{className:\"flex h-9 items-center space-x-1 rounded-md border border-slate-200 bg-white p-1 shadow-sm\",children:[K.jsxs(\"div\",{className:\"relative\",children:[K.jsx(\"button\",{type:\"button\",onClick:()=\u003ep(d===\"renderer\"?null:\"renderer\"),className:\"flex select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100\",\"data-state\":d===\"renderer\"?\"open\":\"closed\",children:\"Renderer\"}),d===\"renderer\"\u0026\u0026K.jsx(\"div\",{className:\"absolute left-0 z-50 mt-1 min-w-[10rem] rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md\",children:[\"vector\",\"canvas\"].map(B=\u003eK.jsxs(\"button\",{type:\"button\",onClick:()=\u003e{i(B),p(null)},className:\"flex w-full items-center rounded-sm px-2 py-1.5 text-sm hover:bg-slate-100\",children:[B===\"vector\"?\"Vector\":\"Canvas\",o===B\u0026\u0026K.jsx(\"span\",{className:\"ml-auto text-xs text-slate-500\",children:\"✓\"})]},B))})]}),K.jsxs(\"div\",{className:\"relative\",children:[K.jsx(\"button\",{type:\"button\",onClick:()=\u003ep(d===\"debug\"?null:\"debug\"),className:\"flex select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100\",\"data-state\":d===\"debug\"?\"open\":\"closed\",children:\"Debug\"}),d===\"debug\"\u0026\u0026K.jsx(\"div\",{className:\"absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md\",children:K.jsx(\"button\",{type:\"button\",onClick:()=\u003e{s(),p(null)},className:\"flex w-full items-center rounded-sm px-2 py-1.5 text-sm hover:bg-slate-100\",children:\"Download Visualization\"})})]}),K.jsxs(\"div\",{className:\"relative\",children:[K.jsx(\"button\",{type:\"button\",onClick:()=\u003ep(d===\"animation\"?null:\"animation\"),className:\"flex select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100\",\"data-state\":d===\"animation\"?\"open\":\"closed\",children:\"Animation\"}),d===\"animation\"\u0026\u0026K.jsx(\"div\",{className:\"absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md\",children:_.map(B=\u003eK.jsxs(\"button\",{type:\"button\",onClick:()=\u003e{r(B.value),p(null)},className:\"flex w-full items-center rounded-sm px-2 py-1.5 text-sm hover:bg-slate-100\",children:[B.label,K.jsx(\"span\",{className:\"ml-auto text-xs text-slate-500\",children:B.description}),n===B.value\u0026\u0026K.jsx(\"span\",{className:\"ml-2 text-xs text-slate-500\",children:\"✓\"})]},B.value))})]})]}),K.jsx(XOi,{solver:t})]})}),K.jsxs(\"div\",{className:\"flex gap-2 items-center flex-wrap\",children:[K.jsx(\"button\",{onClick:C,disabled:t.solved||t.failed||c,className:\"bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm\",children:\"Step\"}),K.jsx(\"button\",{onClick:y,disabled:t.solved||t.failed||c,className:\"bg-green-500 hover:bg-green-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm\",children:\"Solve\"}),K.jsx(\"button\",{onClick:x,disabled:t.solved||t.failed,className:`px-3 py-1 rounded text-white text-sm ${c?\"bg-red-500 hover:bg-red-600\":\"bg-yellow-500 hover:bg-yellow-600\"} disabled:bg-gray-300`,children:c?\"Stop\":\"Animate\"}),K.jsx(\"button\",{onClick:E,disabled:t.solved||t.failed||c,className:\"bg-orange-500 hover:bg-orange-600 disabled:bg-gray-300 text-white px-3 py-1 rounded text-sm\",children:\"Step Until Iteration\"}),K.jsxs(\"div\",{className:\"text-sm text-gray-600\",children:[\"Iterations: \",t.iterations]}),t.timeToSolve!==void 0\u0026\u0026K.jsxs(\"div\",{className:\"text-sm text-gray-600\",children:[\"Time: \",(t.timeToSolve/1e3).toFixed(3),\"s\"]}),t.solved\u0026\u0026K.jsx(\"div\",{className:\"px-2 py-1 bg-green-100 text-green-800 rounded text-sm\",children:\"Solved\"}),t.failed\u0026\u0026K.jsx(\"div\",{className:\"px-2 py-1 bg-red-100 text-red-800 rounded text-sm\",children:\"Failed\"})]}),t.error\u0026\u0026K.jsxs(\"div\",{className:\"text-red-600 text-sm\",children:[\"Error: \",t.error]})]})},eGi=t=\u003et!==null\u0026\u0026\"pipelineDef\"in t\u0026\u0026Array.isArray(t.pipelineDef),tGi=(t,e,n)=\u003e{const o=t.currentPipelineStageIndex;return e\u003co?\"Completed\":e===o\u0026\u0026t.activeSubSolver?t.activeSubSolver.failed?\"Failed\":\"In Progress\":\"Not Started\"},nGi=(t,e)=\u003e{const o=t.pipelineDef[e].solverName,i=tGi(t,e),r=t[o],s=t.firstIterationOfStage?.[o]??(e===t.currentPipelineStageIndex?t.iterations:null),a=t.iterations;let A=0;if(i===\"Completed\"){const g=t.pipelineDef[e+1],h=g?t.firstIterationOfStage?.[g.solverName]:void 0;h!==void 0\u0026\u0026s!==null?A=h-s:s!==null\u0026\u0026(A=a-s)}else i===\"In Progress\"\u0026\u0026s!==null\u0026\u0026(A=a-s);const c=t.timeSpentOnStage?.[o]??0;let l=0;i===\"Completed\"?l=1:i===\"In Progress\"\u0026\u0026r\u0026\u0026(l=r.progress??0);const u=r?.stats??null;return{index:e,name:o,status:i,firstIteration:s,iterations:A,progress:l,timeSpent:c,stats:u\u0026\u0026Object.keys(u).length\u003e0?u:null,solverInstance:r??null}},oGi=({status:t})=\u003e{const e={\"Not Started\":\"text-blue-600\",\"In Progress\":\"text-yellow-600\",Completed:\"text-green-600\",Failed:\"text-red-600\"};return K.jsx(\"span\",{className:`font-medium ${e[t]}`,children:t})},iGi=({progress:t})=\u003e{if(t===0)return null;const e=Math.round(t*100);return K.jsxs(\"div\",{className:\"flex items-center gap-2\",children:[K.jsx(\"div\",{className:\"w-20 h-2 bg-gray-200 rounded overflow-hidden\",children:K.jsx(\"div\",{className:\"h-full bg-blue-500 transition-all duration-200\",style:{width:`${e}%`}})}),K.jsxs(\"span\",{className:\"text-xs text-gray-500\",children:[e,\"%\"]})]})},npn=t=\u003e{if(typeof t==\"string\")return t;if(typeof t==\"number\"||typeof t==\"boolean\"||typeof t==\"bigint\"||t==null)return String(t);if(typeof t==\"object\")try{return JSON.stringify(t)}catch{return String(t)}return String(t)},rGi=t=\u003eObject.entries(t).map(([e,n])=\u003e`${e}: ${npn(n)}`).join(\", \"),sGi=({stats:t})=\u003e{if(!t||Object.keys(t).length===0)return K.jsx(\"span\",{children:\"-\"});const e=Object.entries(t),n=rGi(t);return K.jsxs(\"details\",{className:\"cursor-pointer\",children:[K.jsx(\"summary\",{className:\"whitespace-nowrap overflow-hidden text-ellipsis max-w-[200px]\",children:n}),K.jsx(\"div\",{className:\"mt-1 text-xs\",children:e.map(([o,i])=\u003eK.jsxs(\"div\",{children:[o,\": \",npn(i)]},o))})]})},D$e=t=\u003e{if(t===null||typeof t!=\"object\")return t;if(Array.isArray(t))return t.map(D$e);const e={};for(const[n,o]of Object.entries(t))n.startsWith(\"_\")||(e[n]=D$e(o));return e},aGi=(t,e)=\u003e{try{if(typeof t.getConstructorParams!=\"function\"){alert(`getConstructorParams() is not implemented for ${e}`);return}const n=D$e(t.getConstructorParams()),o=new Blob([JSON.stringify(n,null,2)],{type:\"application/json\"}),i=URL.createObjectURL(o),r=document.createElement(\"a\");r.href=i,r.download=`${e}_input.json`,r.click(),URL.revokeObjectURL(i)}catch(n){alert(`Error downloading input for ${e}: ${n instanceof Error?n.message:String(n)}`)}},AGi=({expanded:t})=\u003eK.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"currentColor\",className:`w-4 h-4 transition-transform duration-200 ${t?\"rotate-90\":\"\"}`,children:K.jsx(\"path\",{fillRule:\"evenodd\",d:\"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z\",clipRule:\"evenodd\"})}),opn=t=\u003e{let e=t;for(;e.activeSubSolver;)e=e.activeSubSolver;return e},ipn=({solver:t,onStepUntilPhase:e,onDownloadInput:n,isNested:o=!1,indentLevel:i=0,triggerRender:r})=\u003e{const[s,a]=ee.useState(new Set),A=t.pipelineDef.map((m,_)=\u003enGi(t,_)),c=m=\u003e{a(_=\u003e{const f=new Set(_);return f.has(m)?f.delete(m):f.add(m),f})},l=m=\u003e{e?.(m)},u=m=\u003e{m.solverInstance\u0026\u0026(n?n(m.solverInstance,m.name):aGi(m.solverInstance,m.name))},g=m=\u003e`${(m/1e3).toFixed(2)}s`,h=()=\u003e{if(!t.solved\u0026\u0026!t.failed){const m=t.activeSubSolver;for(;!t.solved\u0026\u0026!t.failed\u0026\u0026(t.step(),!(t.activeSubSolver\u0026\u0026t.activeSubSolver!==m)););r?.()}},d=()=\u003e{if(!t.solved\u0026\u0026!t.failed){const m=opn(t);for(;!t.solved\u0026\u0026!t.failed\u0026\u0026(t.step(),opn(t)===m););r?.()}},p=i*24;return K.jsxs(\"div\",{className:o?\"\":\"border-t border-gray-200\",children:[!o\u0026\u0026K.jsxs(\"div\",{className:\"px-4 py-2 bg-gray-50 border-b border-gray-200 flex items-center justify-between\",children:[K.jsx(\"h3\",{className:\"text-sm font-semibold text-gray-700\",children:\"Pipeline Stages\"}),K.jsxs(\"div\",{className:\"flex gap-2\",children:[K.jsx(\"button\",{onClick:d,disabled:t.solved||t.failed,className:\"bg-indigo-500 hover:bg-indigo-600 disabled:bg-gray-300 disabled:cursor-not-allowed cursor-pointer text-white px-3 py-1 rounded text-sm\",children:\"Next Solver\"}),K.jsx(\"button\",{onClick:h,disabled:t.solved||t.failed,className:\"bg-purple-500 hover:bg-purple-600 disabled:bg-gray-300 disabled:cursor-not-allowed cursor-pointer text-white px-3 py-1 rounded text-sm\",children:\"Next Stage\"})]})]}),K.jsx(\"div\",{className:\"overflow-x-auto\",children:K.jsxs(\"table\",{className:\"w-full text-sm\",children:[!o\u0026\u0026K.jsx(\"thead\",{children:K.jsxs(\"tr\",{className:\"bg-gray-50 border-b border-gray-200\",children:[K.jsx(\"th\",{className:\"px-4 py-2 text-left font-semibold text-gray-700\",children:\"Stage\"}),K.jsx(\"th\",{className:\"px-4 py-2 text-left font-semibold text-gray-700\",children:\"Status\"}),K.jsxs(\"th\",{className:\"px-4 py-2 text-center font-semibold text-gray-700\",children:[\"i\",K.jsx(\"sub\",{children:\"0\"})]}),K.jsx(\"th\",{className:\"px-4 py-2 text-left font-semibold text-gray-700\",children:\"Iterations\"}),K.jsx(\"th\",{className:\"px-4 py-2 text-left font-semibold text-gray-700\",children:\"Progress\"}),K.jsx(\"th\",{className:\"px-4 py-2 text-left font-semibold text-gray-700\",children:\"Time\"}),K.jsx(\"th\",{className:\"px-4 py-2 text-left font-semibold text-gray-700\",children:\"Stats\"}),K.jsx(\"th\",{className:\"px-4 py-2 text-left font-semibold text-gray-700\",children:\"Input\"})]})}),K.jsx(\"tbody\",{children:A.map(m=\u003e{const _=eGi(m.solverInstance),f=s.has(m.name);return K.jsxs(Fs.Fragment,{children:[K.jsxs(\"tr\",{className:`border-b border-gray-100 ${m.status===\"In Progress\"?\"bg-yellow-50\":\"\"}`,children:[K.jsx(\"td\",{className:\"px-4 py-2\",children:K.jsxs(\"div\",{className:\"flex items-center gap-2\",style:{paddingLeft:p},children:[_?K.jsx(\"button\",{onClick:()=\u003ec(m.name),className:\"text-gray-500 hover:text-gray-700\",title:f?\"Collapse\":\"Expand\",children:K.jsx(AGi,{expanded:f})}):K.jsx(\"span\",{className:\"w-4\"}),K.jsx(\"span\",{className:\"text-gray-400 w-6\",children:String(m.index+1).padStart(2,\"0\")}),K.jsx(\"button\",{onClick:()=\u003el(m.name),disabled:m.status===\"Completed\"||t.solved||t.failed,className:\"text-blue-500 hover:text-blue-700 disabled:text-gray-300 disabled:cursor-not-allowed\",title:`Step until ${m.name} completes`,children:K.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"currentColor\",className:\"w-4 h-4\",children:K.jsx(\"path\",{fillRule:\"evenodd\",d:\"M4.5 5.653c0-1.426 1.529-2.33 2.779-1.643l11.54 6.348c1.295.712 1.295 2.573 0 3.285L7.28 19.991c-1.25.687-2.779-.217-2.779-1.643V5.653z\",clipRule:\"evenodd\"})})}),K.jsx(\"span\",{className:\"font-medium text-gray-900\",children:m.name})]})}),K.jsx(\"td\",{className:\"px-4 py-2\",children:K.jsx(oGi,{status:m.status})}),K.jsx(\"td\",{className:\"px-4 py-2 text-center text-gray-600\",children:m.firstIteration!==null?m.firstIteration:\"\"}),K.jsx(\"td\",{className:\"px-4 py-2 text-gray-600\",children:m.iterations}),K.jsx(\"td\",{className:\"px-4 py-2\",children:K.jsx(iGi,{progress:m.progress})}),K.jsx(\"td\",{className:\"px-4 py-2 text-gray-600\",children:g(m.timeSpent)}),K.jsx(\"td\",{className:\"px-4 py-2 text-gray-500\",children:K.jsx(sGi,{stats:m.stats})}),K.jsx(\"td\",{className:\"px-4 py-2\",children:m.solverInstance?K.jsxs(\"button\",{onClick:()=\u003eu(m),className:\"flex items-center gap-1 text-blue-500 hover:text-blue-700\",title:`Download input for ${m.name}`,children:[K.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"currentColor\",className:\"w-4 h-4\",children:K.jsx(\"path\",{fillRule:\"evenodd\",d:\"M12 2.25a.75.75 0 01.75.75v11.69l3.22-3.22a.75.75 0 111.06 1.06l-4.5 4.5a.75.75 0 01-1.06 0l-4.5-4.5a.75.75 0 111.06-1.06l3.22 3.22V3a.75.75 0 01.75-.75zm-9 13.5a.75.75 0 01.75.75v2.25a1.5 1.5 0 001.5 1.5h13.5a1.5 1.5 0 001.5-1.5V16.5a.75.75 0 011.5 0v2.25a3 3 0 01-3 3H5.25a3 3 0 01-3-3V16.5a.75.75 0 01.75-.75z\",clipRule:\"evenodd\"})}),K.jsx(\"span\",{children:\"Input\"})]}):null})]}),_\u0026\u0026f\u0026\u0026K.jsx(\"tr\",{children:K.jsx(\"td\",{colSpan:8,className:\"p-0\",children:K.jsx(ipn,{solver:m.solverInstance,onStepUntilPhase:e,onDownloadInput:n,isNested:!0,indentLevel:i+1,triggerRender:r})})})]},m.name)})})]})})]})};function cGi({graphics:t}){const e=t.points??[],n=t.lines??[],o=t.rects??[],i=t.circles??[],r=t.texts??[];let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;const l=(m,_)=\u003e{typeof m==\"number\"\u0026\u0026(m\u003cs\u0026\u0026(s=m),m\u003eA\u0026\u0026(A=m)),typeof _==\"number\"\u0026\u0026(_\u003ca\u0026\u0026(a=_),_\u003ec\u0026\u0026(c=_))};for(const m of e)l(m.x,m.y);for(const m of n){const _=m.points??[];for(const f of _)l(f.x,f.y)}for(const m of o){const _=m.x??0,f=m.y??0,I=m.width??0,C=m.height??0;l(_,f),l(_+I,f+C)}for(const m of i){const _=m.x??0,f=m.y??0,I=m.radius??1;l(_-I,f-I),l(_+I,f+I)}for(const m of r)l(m.x,m.y);(!isFinite(s)||!isFinite(a)||!isFinite(A)||!isFinite(c))\u0026\u0026(s=-20,a=-20,A=20,c=20);const u=10,g=s-u,h=a-u,d=Math.max(1,A-s+2*u),p=Math.max(1,c-a+2*u);return K.jsxs(\"svg\",{className:\"w-full h-[400px] bg-white\",viewBox:`${g} ${h} ${d} ${p}`,role:\"img\",\"aria-label\":\"Graphics fallback\",children:[o.map((m,_)=\u003eK.jsx(\"rect\",{x:m.x??0,y:m.y??0,width:m.width??0,height:m.height??0,fill:\"none\",stroke:m.strokeColor??\"black\",strokeWidth:m.strokeWidth??1},`rect-${_}`)),n.map((m,_)=\u003eK.jsx(\"polyline\",{fill:\"none\",stroke:m.strokeColor??\"black\",strokeWidth:m.strokeWidth??1,points:(m.points??[]).map(f=\u003e`${f.x??0},${f.y??0}`).join(\" \")},`line-${_}`)),i.map((m,_)=\u003eK.jsx(\"circle\",{cx:m.x??0,cy:m.y??0,r:m.radius??1.5,fill:m.fillColor??\"none\",stroke:m.strokeColor??\"black\",strokeWidth:m.strokeWidth??1},`circle-${_}`)),e.map((m,_)=\u003eK.jsx(\"circle\",{cx:m.x??0,cy:m.y??0,r:m.radius??1.5,fill:m.color??\"black\"},`point-${_}`)),r.map((m,_)=\u003eK.jsx(\"text\",{x:m.x??0,y:m.y??0,fontSize:m.fontSize??10,fill:m.color??\"black\",children:m.text??\"\"},`text-${_}`))]})}var lGi=class extends Fs.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){console.error(\"InteractiveGraphics render error:\",t)}render(){return this.state.hasError?this.props.fallback:this.props.children}},uGi=({solver:t,createSolver:e,animationSpeed:n=25,onSolverStarted:o,onSolverCompleted:i})=\u003e{const[r,s]=ee.useReducer(f=\u003ef+1,0),[a]=ee.useState(()=\u003e{if(e)return e();if(!t)throw new Error(\"GenericSolverDebugger requires solver or createSolver\");return t}),[A,c]=ee.useState(()=\u003etypeof window\u003e\"u\"?\"vector\":window.localStorage.getItem(\"solver-utils-renderer\")===\"canvas\"?\"canvas\":\"vector\"),[l,u]=ee.useState(n),g=ee.useMemo(()=\u003e{try{return a.visualize()||{points:[],lines:[],rects:[],circles:[]}}catch(f){return console.error(\"Visualization error:\",f),{points:[],lines:[],rects:[],circles:[]}}},[a,r]),h=ee.useMemo(()=\u003e(g.rects?.length||0)===0\u0026\u0026(g.lines?.length||0)===0\u0026\u0026(g.points?.length||0)===0\u0026\u0026(g.circles?.length||0)===0,[g]);ee.useEffect(()=\u003e{if(!(typeof document\u003e\"u\")\u0026\u0026!document.querySelector('script[src=\"https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4\"]')){const f=document.createElement(\"script\");f.src=\"https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4\",document.head.appendChild(f)}},[]),ee.useEffect(()=\u003e{u(n)},[n]);const d=a.pipelineDef!==void 0,p=f=\u003e{const I=a;if(!a.solved\u0026\u0026!a.failed){for(;!a.solved\u0026\u0026!a.failed\u0026\u0026I.currentPipelineStageIndex\u003c=I.pipelineDef.findIndex(C=\u003eC.solverName===f);)a.step();s()}},m=()=\u003e{const f=JSON.stringify(g,null,2),I=new Blob([f],{type:\"application/json\"}),C=URL.createObjectURL(I),y=document.createElement(\"a\");y.download=\"visualization.json\",y.href=C,document.body.appendChild(y),y.click(),document.body.removeChild(y),URL.revokeObjectURL(C)},_=f=\u003e{c(f),typeof window\u003c\"u\"\u0026\u0026window.localStorage.setItem(\"solver-utils-renderer\",f)};return K.jsxs(\"div\",{children:[K.jsx(ZOi,{solver:a,triggerRender:s,animationSpeed:l,renderer:A,onRendererChange:_,onAnimationSpeedChange:u,onDownloadVisualization:m,onSolverStarted:o,onSolverCompleted:i}),h?K.jsx(\"div\",{className:\"p-4 text-gray-500\",children:\"No Graphics Yet\"}):K.jsx(lGi,{fallback:K.jsx(cGi,{graphics:g}),children:A===\"canvas\"?K.jsx($Oi,{graphics:g}):K.jsx(JOi,{graphics:g})}),d\u0026\u0026K.jsx(ipn,{solver:a,onStepUntilPhase:p,triggerRender:s})]})};const gGi=()=\u003e{ee.useEffect(()=\u003e{const t=\"tailwind-cdn-script\";if(document.getElementById(t)||window.tailwind)return;const e=document.createElement(\"div\");e.className=\"hidden\",document.body.appendChild(e);const n=window.getComputedStyle(e).display===\"none\";if(document.body.removeChild(e),n)return;const o=document.createElement(\"script\");o.id=t,o.src=\"https://cdn.tailwindcss.com\",document.head.appendChild(o)},[])},dGi=1e3,kE=(t,e)=\u003e{const{fileName:n,mimeType:o=\"text/plain\"}=e,i=t instanceof Blob?t:new Blob([t],{type:o}),r=URL.createObjectURL(i),s=document.createElement(\"a\");s.href=r,s.download=n,s.target=\"_blank\",s.rel=\"noopener noreferrer\",s.style.display=\"none\",document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=\u003e{URL.revokeObjectURL(r)},dGi)},N$e=t=\u003e{let e=t.trim().replace(/[\\\\/:*?\"\u003c\u003e|]/g,\"_\").replace(/[\\x00-\\x1f]/g,\"\").replace(/^\\.+/,\"\").replace(/\\.+$/,\"\").replace(/\\s+/g,\" \").replace(/_+/g,\"_\");return/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i.test(e)\u0026\u0026(e=`_${e}`),e=e.slice(0,200),e||\"untitled\"},hGi=t=\u003e{const e=t.solverConstructorArgs??[t.solverParams];if(t.solverName!==\"AutoroutingPipelineSolver7_MultiGraph\"||e.length!==1)return e;const[{input:n,options:o}]=e;return[n,o]},t8=\"https://github.com/tscircuit/tscircuit-autorouter/issues/new\",rpn=\"https://github.com/tscircuit/copper-pour-solver/issues/new\",spn=\"https://github.com/tscircuit/calculate-packing/issues/new\",pGi=\"https://github.com/tscircuit/matchpack/issues/new\",apn=\"https://github.com/tscircuit/schematic-trace-solver/issues/new?template=json-bug-report.yml\",mGi={PackSolver2:spn,LayoutPipelineSolver:pGi,AutoroutingPipelineSolver:t8,AssignableAutoroutingPipeline2:t8,AssignableAutoroutingPipeline3:t8,AutoroutingPipeline1_OriginalUnravel:t8,AutoroutingPipelineSolver3_HgPortPointPathing:t8,AutoroutingPipelineSolver4:t8,AutoroutingPipelineSolver5:t8,AutoroutingPipelineSolver7_MultiGraph:t8,AutoroutingPipelineSolver8:t8,CopperPourPipelineSolver:rpn,SchematicTracePipelineSolver:apn},_Gi=t=\u003et.toLowerCase().includes(\"pack\")?mln:t.toLowerCase().includes(\"rout\")?fln:rbi,Apn=t=\u003e{const e=mGi[t];if(e)return e;const n=t.toLowerCase();return n.includes(\"autorout\")?t8:n.includes(\"schematic\")\u0026\u0026n.includes(\"trace\")?apn:n.includes(\"copperpour\")?rpn:n.includes(\"pack\")?spn:null},fGi=t=\u003e`${N$e(`${t.componentName}-${t.solverName}`)}-solver-input.json`,cpn=t=\u003e{kE(JSON.stringify(t.solverParams,null,2),{fileName:fGi(t),mimeType:\"application/json\"})},IGi=({solverEvent:t})=\u003e{const e=Apn(t.solverName);return K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-justify-end rf-gap-2 rf-border-b rf-border-gray-200 rf-bg-gray-50 rf-px-4 rf-py-2\",children:[K.jsxs(fA,{type:\"button\",variant:\"outline\",size:\"sm\",onClick:()=\u003ecpn(t),children:[K.jsx(mZ,{className:\"rf-w-4 rf-h-4\"}),\"Download\"]}),e?K.jsx(fA,{asChild:!0,variant:\"outline\",size:\"sm\",children:K.jsxs(\"a\",{href:e,target:\"_blank\",rel:\"noopener noreferrer\",children:[K.jsx(Bme,{className:\"rf-w-4 rf-h-4\"}),\"Report\"]})}):K.jsxs(fA,{type:\"button\",variant:\"outline\",size:\"sm\",disabled:!0,title:\"No report link configured for this solver\",children:[K.jsx(Bme,{className:\"rf-w-4 rf-h-4\"}),\"Report\"]})]})},CGi=({solverEvent:t})=\u003e{const e=Apn(t.solverName);return e?K.jsx(fA,{asChild:!0,variant:\"ghost\",size:\"icon\",className:\"rf-h-8 rf-w-8\",children:K.jsx(\"a\",{href:e,target:\"_blank\",rel:\"noopener noreferrer\",title:\"Report solver bug\",\"aria-label\":\"Report solver bug\",children:K.jsx(Bme,{className:\"rf-w-4 rf-h-4\"})})}):K.jsx(fA,{type:\"button\",variant:\"ghost\",size:\"icon\",className:\"rf-h-8 rf-w-8\",disabled:!0,title:\"No report link configured for this solver\",\"aria-label\":\"Report solver bug\",children:K.jsx(Bme,{className:\"rf-w-4 rf-h-4\"})})},yGi=({solverEvents:t=[]})=\u003e{const[e,n]=ee.useState(null);gGi();const o=ee.useMemo(()=\u003e{const a=new Map;for(const A of t){const c=`${A.componentName}-${A.solverName}`;a.set(c,A)}return a},[t]),i=ee.useMemo(()=\u003eArray.from(o.keys()),[o]),r=e?o.get(e):null,s=ee.useMemo(()=\u003e{if(!r)return{instance:null,error:null,classFound:!1};const a=mMe[r.solverName];if(!a)return{instance:null,error:`Solver class \"${r.solverName}\" not found in SOLVERS registry. Available: ${Object.keys(mMe).join(\", \")}`,classFound:!1};try{return{instance:new a(...hGi(r)),error:null,classFound:!0}}catch(A){const c=A instanceof Error?A.message:String(A);return console.error(\"Failed to reconstruct solver:\",A),{instance:null,error:`Failed to instantiate solver: ${c}`,classFound:!0}}},[r]);return t.length===0?K.jsx(\"div\",{className:\"rf-p-4\",children:K.jsx(\"div\",{className:\"rf-bg-gray-50 rf-rounded-md rf-border rf-border-gray-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-3\",children:\"No Solvers Detected\"}),K.jsx(\"p\",{className:\"rf-text-sm rf-text-gray-600\",children:\"Solvers will appear here when the circuit runs. Solvers are used for tasks like component packing and autorouting.\"})]})})}):K.jsxs(\"div\",{className:\"rf-flex rf-h-full rf-overflow-hidden\",children:[K.jsxs(\"div\",{className:\"rf-w-64 rf-border-r rf-border-gray-200 rf-overflow-y-auto rf-flex-shrink-0\",children:[K.jsxs(\"div\",{className:\"rf-text-xs rf-font-semibold rf-text-gray-500 rf-px-3 rf-py-2 rf-bg-gray-50 rf-border-b rf-border-gray-200\",children:[i.length,\" \",i.length===1?\"Solver\":\"Solvers\"]}),i.map(a=\u003e{const A=o.get(a),c=e===a;return K.jsx(\"div\",{className:`rf-px-3 rf-py-2 rf-cursor-pointer rf-border-b rf-border-gray-100 ${c?\"rf-bg-blue-50 rf-border-l-2 rf-border-l-blue-500\":\"hover:rf-bg-gray-50\"}`,onClick:()=\u003en(a),children:(()=\u003e{const l=_Gi(A.solverName);return K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[K.jsx(l,{className:\"rf-w-4 rf-h-4 rf-text-blue-500 rf-flex-shrink-0\"}),K.jsxs(\"div\",{className:\"rf-flex-1 rf-min-w-0\",children:[K.jsx(\"div\",{className:\"rf-text-sm rf-font-medium rf-text-gray-800 rf-truncate\",children:A.componentName}),K.jsx(\"div\",{className:\"rf-text-xs rf-text-gray-500 rf-truncate\",children:A.solverName})]})]})})()},a)})]}),K.jsx(\"div\",{className:\"rf-flex-1 rf-overflow-hidden\",children:r?s.instance?K.jsxs(\"div\",{className:\"rf-flex rf-h-full rf-flex-col rf-overflow-y-auto\",children:[K.jsx(IGi,{solverEvent:r}),K.jsx(\"div\",{className:\"rf-min-h-0 rf-flex-1\",children:K.jsx(bE,{fallback:K.jsx(\"div\",{className:\"rf-p-4\",children:K.jsxs(\"div\",{className:\"rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200 rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-2\",children:\"Error Loading Solver Debugger\"}),K.jsxs(\"p\",{className:\"rf-text-sm rf-text-red-600\",children:[\"Failed to render the solver debugger for\",\" \",r.solverName]})]})}),children:K.jsx(uGi,{solver:s.instance})})})]}):K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsxs(\"div\",{className:\"rf-mb-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-gray-800\",children:r.solverName}),K.jsxs(\"p\",{className:\"rf-text-sm rf-text-gray-500\",children:[\"Component: \",r.componentName]})]}),s.error\u0026\u0026K.jsx(\"div\",{className:`rf-rounded-md rf-border rf-p-4 rf-mb-4 ${s.classFound?\"rf-bg-red-50 rf-border-red-200\":\"rf-bg-yellow-50 rf-border-yellow-200\"}`,children:K.jsx(\"p\",{className:`rf-text-sm ${s.classFound?\"rf-text-red-700\":\"rf-text-yellow-700\"}`,children:s.error})}),K.jsxs(\"div\",{className:\"rf-border rf-border-gray-200 rf-rounded-md rf-overflow-hidden\",children:[K.jsxs(\"div\",{className:\"rf-px-3 rf-py-2 rf-bg-gray-50 rf-flex rf-items-center rf-justify-between rf-gap-2\",children:[K.jsx(\"span\",{className:\"rf-text-sm rf-font-medium rf-text-gray-700\",children:\"Solver Parameters\"}),K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-1\",children:[K.jsx(CGi,{solverEvent:r}),K.jsx(fA,{type:\"button\",variant:\"ghost\",size:\"icon\",className:\"rf-h-8 rf-w-8\",\"aria-label\":\"Download solver input JSON\",title:\"Download solver input JSON\",onClick:()=\u003ecpn(r),children:K.jsx(mZ,{className:\"rf-w-4 rf-h-4\"})})]})]}),K.jsx(\"div\",{className:\"rf-p-3 rf-bg-white rf-border-t rf-border-gray-200\",children:K.jsx(\"pre\",{className:\"rf-text-xs rf-font-mono rf-text-gray-600 rf-whitespace-pre-wrap rf-overflow-x-auto\",children:JSON.stringify(r.solverParams,null,2)})})]})]}):K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-justify-center rf-h-full\",children:K.jsx(\"p\",{className:\"rf-text-sm rf-text-gray-500\",children:\"Select a solver from the list to view details\"})})})]})},xGi=[\"subcircuit_id\",\"componentDisplayName\",\"phaseName\",\"routingPhaseIndex\",\"phaseOrdinal\",\"phaseCount\",\"phaseStageIndex\",\"phaseStageCount\",\"connectionCount\",\"obstacleCount\",\"previousTraceCount\",\"isReroutePhase\",\"autorouterName\",\"autorouterVersion\",\"solverName\",\"effort\",\"cacheStatus\"],EGi=[\"phaseOrdinal\",\"routingPhaseIndex\",\"phaseName\",\"phaseStageIndex\"];function BGi(t,e){let n=-1,o=-1;for(let i=t.length-1;i\u003e=0;i--){const r=t[i];if(r.status!==\"running\"||r.subcircuit_id!==e.subcircuit_id||r.componentDisplayName!==e.componentDisplayName)continue;let s=0,a=!1;for(const A of EGi)if(!(r[A]===void 0||e[A]===void 0)){if(r[A]!==e[A]){a=!0;break}s++}!a\u0026\u0026s\u003eo\u0026\u0026(n=i,o=s)}return n}function bGi(t,e){const n=Object.fromEntries(xGi.filter(s=\u003ee[s]!==void 0).map(s=\u003e[s,e[s]])),o=e.simpleRouteJson?structuredClone(e.simpleRouteJson):void 0,i=e.type===\"autorouting:start\"?-1:BGi(t,e),r={...i===-1?{id:`autorouting_phase_${t.length+1}`}:t[i],...n,status:e.type===\"autorouting:start\"?\"running\":e.type===\"autorouting:end\"?\"complete\":\"error\",...e.type===\"autorouting:start\"?{startSimpleRouteJson:o}:e.type===\"autorouting:end\"?{endSimpleRouteJson:o}:{errorSimpleRouteJson:o,error:e.error?{...e.error}:void 0}};return i===-1?[...t,r]:t.map((s,a)=\u003ea===i?r:s)}const SGi=new Map([[\"custom\",\"Custom\"],[\"fanout\",\"Fanout\"],[\"single_layer_fanout\",\"Single layer fanout\"],[\"tscircuit_simplify\",\"Simplify\"]]),QGi=new Set([\"tscircuit\",\"default\",\"auto\",\"auto_local\"]);function vGi(t){if(t===\"FanoutSolver\")return\"Fanout\";if(t===\"AutoroutingPipelineSolver11_Simplification\")return\"Simplify\";const e=t.match(/^AutoroutingPipeline(?:Solver)?(\\d+)(?:_|$)/);if(e)return`Pipeline${e[1]}`;const n=t.match(/^AssignableAutoroutingPipeline(\\d+)$/);return n?`Assignable${n[1]}`:t}function wGi(t){const e=t.autorouterName?.trim(),n=e?.replace(/-/g,\"_\"),o=n\u0026\u0026SGi.get(n);if(o)return o;if(n\u0026\u0026!QGi.has(n))return e;const i=t.solverName?.trim();if(i)return vGi(i);const r=t.autorouterVersion?.trim();if(r){const s=r.match(/^beta[_-]pipeline(\\d+)$/);return s?`Pipeline${s[1]}`:r===\"latest\"?\"default\":r}return e?\"default\":\"Unknown\"}const R$e=\"#fbbf24\";function PGi(t){const e=t.endSimpleRouteJson?.traces??[],n=new Set(e.flatMap(i=\u003e[i.pcb_trace_id,i.__replaces_pcb_trace_id].filter(r=\u003er!==void 0)));return[...(t.startSimpleRouteJson?.traces??[]).filter(i=\u003e!n.has(i.pcb_trace_id)),...e]}function lpn(t){const e=new Map((t.startSimpleRouteJson?.traces??[]).map(n=\u003e[n.pcb_trace_id,n]));return(t.endSimpleRouteJson?.traces??[]).filter(n=\u003e{const o=e.get(n.pcb_trace_id);return!o||!!n.__replaces_pcb_trace_id\u0026\u0026n.__replaces_pcb_trace_id!==o.__replaces_pcb_trace_id||JSON.stringify(o.route)!==JSON.stringify(n.route)}).map(n=\u003en.pcb_trace_id)}function MGi(t,e){return{outer_diameter:t.via_diameter??e.minViaPadDiameter??e.min_via_pad_diameter??e.minViaDiameter??.6,hole_diameter:t.via_hole_diameter??e.minViaHoleDiameter??e.min_via_hole_diameter??.3}}function upn(t,e){const n=[];for(const a of t.route)a.route_type===\"wire\"?n.push({...a,layer:a.layer}):a.route_type===\"via\"?n.push({route_type:\"via\",x:a.x,y:a.y,from_layer:a.from_layer,to_layer:a.to_layer,...MGi(a,e)}):a.route_type===\"through_obstacle\"\u0026\u0026n.push({route_type:\"through_pad\",start:{...a.start},end:{...a.end},width:a.width,start_layer:a.from_layer,end_layer:a.to_layer,pcb_smtpad_id:a.circuitJsonMetadata?.pcb_smtpad_id,pcb_plated_hole_id:a.circuitJsonMetadata?.pcb_plated_hole_id});const o=a=\u003e{let A=-1,c=Number.POSITIVE_INFINITY;return n.forEach((l,u)=\u003e{if(l.route_type!==\"wire\")return;const g=Math.hypot(l.x-a.x,l.y-a.y);g\u003cc\u0026\u0026(c=g,A=u)}),A},i=t.route.filter(a=\u003ea.route_type===\"jumper\").map(a=\u003e[o(a.start),o(a.end)].sort((A,c)=\u003eA-c)).filter(([a,A])=\u003ea\u003e=0\u0026\u0026A\u003ea).sort(([a],[A])=\u003ea-A),r=[];let s=0;for(const[a,A]of i)a\u003e=s\u0026\u0026r.push(n.slice(s,a+1)),s=Math.max(s,A);return s\u003cn.length\u0026\u0026r.push(n.slice(s)),r}function DGi(t){const e=[],n=[],o=t.endSimpleRouteJson;if(!o)return{lines:e,circles:n};const i=new Set(lpn(t));for(const r of o.traces??[])if(i.has(r.pcb_trace_id))for(const s of upn(r,o)){let a;for(const A of s){if(A.route_type===\"through_pad\"){a={...A.end,layer:A.end_layer,width:A.width};continue}const c=A.route_type===\"wire\"?A.layer:A.from_layer;a\u0026\u0026a.layer===c\u0026\u0026(a.x!==A.x||a.y!==A.y)\u0026\u0026e.push({points:[{x:a.x,y:a.y},{x:A.x,y:A.y}],strokeWidth:A.route_type===\"wire\"?A.width:a.width,strokeColor:R$e,layer:c}),A.route_type===\"via\"\u0026\u0026n.push({center:{x:A.x,y:A.y},radius:A.outer_diameter/2,stroke:R$e,fill:\"transparent\"}),a={x:A.x,y:A.y,layer:A.route_type===\"wire\"?A.layer:A.to_layer,width:A.route_type===\"wire\"?A.width:a?.width??o.minTraceWidth}}}return{coordinateSystem:\"cartesian\",lines:e,circles:n}}function NGi(t){const e=JSON.stringify(t);let n=2166136261;for(let o=0;o\u003ce.length;o++)n=Math.imul(n^e.charCodeAt(o),16777619);return(n\u003e\u003e\u003e0).toString(36)}const RGi=new Set([\"pcb_trace\",\"pcb_via\",\"pcb_copper_pour\",\"pcb_ground_plane\",\"pcb_ground_plane_region\",\"pcb_thermal_spoke\",\"pcb_breakout_point\"]);function TGi(t,e,n){const o=n===\"input\"?e.startSimpleRouteJson??e.errorSimpleRouteJson:e.endSimpleRouteJson,i=t.filter(c=\u003e!RGi.has(c.type)\u0026\u0026!c.type.endsWith(\"_error\")\u0026\u0026!c.type.endsWith(\"_warning\"));if(!o)return i;const r=n===\"input\"?o.traces??[]:PGi(e),s=new Set(t.filter(c=\u003ec.type===\"source_trace\").map(c=\u003ec.source_trace_id)),a=[\"top\",...Array.from({length:Math.max(0,o.layerCount-2)},(c,l)=\u003e`inner${l+1}`),...o.layerCount\u003e1?[\"bottom\"]:[]],A=[];for(const c of r){const u=o.connections.find(h=\u003eh.name===c.connection_name||h.source_trace_id===c.connection_name)?.source_trace_id??c.connection_name??\"\",g=upn(c,o);for(const[h,d]of g.entries()){const p={type:\"pcb_trace\",pcb_trace_id:`${e.id}_${n}_${c.pcb_trace_id}_${h}_${NGi(d)}`,subcircuit_id:e.subcircuit_id??void 0,source_trace_id:s.has(u)?u:void 0,route:d};A.push(p);for(const[m,_]of d.entries()){if(_.route_type!==\"via\")continue;const f=a.indexOf(_.from_layer),I=a.indexOf(_.to_layer),C={type:\"pcb_via\",pcb_via_id:`${p.pcb_trace_id}_via_${m}`,pcb_trace_id:p.pcb_trace_id,subcircuit_id:e.subcircuit_id??void 0,x:_.x,y:_.y,outer_diameter:_.outer_diameter,hole_diameter:_.hole_diameter,layers:f\u003e=0\u0026\u0026I\u003e=0?a.slice(Math.min(f,I),Math.max(f,I)+1):[_.from_layer,_.to_layer]};A.push(C)}}}return[...i,...A]}const T$e=(t,e)=\u003et.phaseName||`Phase ${t.phaseOrdinal??e+1}`,gpn=t=\u003et.componentDisplayName?.match(/name=\"([^\"]+)\"/)?.[1]?.replace(/^\\./,\"\")||t.componentDisplayName||t.subcircuit_id||\"Board\",dpn=t=\u003et.startSimpleRouteJson??t.endSimpleRouteJson??t.errorSimpleRouteJson,kGi={is_showing_autorouting:!0,is_showing_rats_nest:!1,is_showing_drc_errors:!1,is_showing_drc_warnings:!1,is_showing_pcb_groups:!1},FGi=({circuitJson:t,phases:e=[],isRunning:n=!1})=\u003e{const[o,i]=ee.useState(null),[r,s]=ee.useState(\"output\"),[a,A]=ee.useState(!0),[c,l]=ee.useState(!1),u=ee.useRef(null),[g,h]=ee.useState(480),d=o?e.findIndex(R=\u003eR.id===o.id\u0026\u0026dpn(R)===dpn(o)):-1,p=d\u003c0?e.length-1:d,m=e[p],_=d\u003c0,f=!!m?.endSimpleRouteJson,I=m?.startSimpleRouteJson??m?.errorSimpleRouteJson,C=!!I,y=r===\"output\"\u0026\u0026!f?\"input\":r===\"input\"\u0026\u0026!C?\"output\":r,x=y===\"input\"?I:m?.endSimpleRouteJson,E=ee.useMemo(()=\u003e!m||!x?null:TGi(t??[],m,y),[t,m,x,y]),B=ee.useMemo(()=\u003em\u0026\u0026y===\"output\"\u0026\u0026a?DGi(m):{lines:[],circles:[]},[m,y,a]);if(ee.useLayoutEffect(()=\u003e{const R=u.current;if(!R)return;const F=()=\u003eh(Math.max(360,R.clientHeight));F();const O=new ResizeObserver(F);return O.observe(R),()=\u003eO.disconnect()},[!!m]),!m)return K.jsxs(\"div\",{className:\"rf-flex rf-min-h-[400px] rf-flex-col rf-items-center rf-justify-center rf-gap-3 rf-p-8 rf-text-center\",children:[K.jsx(fln,{className:\"rf-h-7 rf-w-7 rf-text-blue-500\"}),K.jsx(\"h3\",{className:\"rf-text-base rf-font-medium\",children:n?\"Waiting for autorouting\":\"No autorouting captures\"}),K.jsx(\"p\",{className:\"rf-max-w-md rf-text-sm rf-text-gray-500\",children:n?\"Phases appear as the circuit routes. Each capture includes its input and output on the PCB.\":\"Run a circuit with autorouting enabled to inspect its phases. A circuit JSON file alone does not include routing history.\"})]});const S=T$e(m,p),Q=m.status===\"running\"\u0026\u0026n,w=!f,M=I?.connections.length,k=E?.filter(R=\u003eR.type===\"pcb_trace\").length??0;return K.jsxs(\"div\",{className:\"rf-flex rf-h-full rf-min-h-[620px] rf-flex-col rf-bg-white md:rf-flex-row\",\"data-testid\":\"autorouting-explorer\",children:[K.jsxs(\"aside\",{className:\"rf-flex rf-shrink-0 rf-flex-col rf-border-b rf-border-gray-200 md:rf-w-52 md:rf-border-b-0 md:rf-border-r\",\"aria-label\":\"Routing phases\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-justify-between rf-px-3 rf-py-2 rf-text-xs rf-text-gray-500\",children:[K.jsx(\"span\",{children:\"Routing phases\"}),K.jsx(\"span\",{children:e.length})]}),K.jsx(\"div\",{className:\"rf-flex rf-gap-1 rf-overflow-x-auto rf-px-1.5 rf-pb-1.5 md:rf-flex-col md:rf-overflow-x-hidden md:rf-overflow-y-auto\",children:e.map((R,F)=\u003e{const O=lpn(R).length,U=R.endSimpleRouteJson?`${O} ${O===1?\"trace\":\"traces\"} routed`:R.status===\"error\"?\"Failed\":R.status===\"running\"\u0026\u0026n?\"Routing…\":\"No output\";return K.jsxs(\"button\",{type:\"button\",\"aria-pressed\":F===p,title:`${gpn(R)} · ${U}`,onClick:()=\u003ei(R),className:Oi(\"rf-flex rf-min-w-[192px] rf-items-start rf-gap-2 rf-rounded-md rf-border rf-px-2 rf-py-2 rf-text-left md:rf-min-w-0\",F===p?\"rf-border-blue-200 rf-bg-blue-50\":\"rf-border-transparent hover:rf-bg-gray-50\"),children:[K.jsx(\"span\",{className:Oi(\"rf-flex rf-h-5 rf-w-5 rf-shrink-0 rf-items-center rf-justify-center rf-rounded-full rf-text-[11px]\",F===p?\"rf-bg-blue-600 rf-text-white\":\"rf-bg-gray-100 rf-text-gray-500\"),children:F+1}),K.jsxs(\"span\",{className:\"rf-min-w-0 rf-flex-1\",children:[K.jsxs(\"span\",{className:\"rf-flex rf-items-center rf-gap-1\",children:[K.jsx(\"span\",{className:\"rf-min-w-0 rf-flex-1 rf-truncate rf-text-xs rf-font-medium rf-leading-5 rf-text-gray-800\",title:T$e(R,F),children:T$e(R,F)}),R.status===\"complete\"?K.jsx(CS,{\"aria-label\":\"Captured\",className:\"rf-h-3 rf-w-3 rf-shrink-0 rf-text-green-600\"}):R.status===\"error\"?K.jsx(oWe,{\"aria-label\":\"Failed\",className:\"rf-h-3 rf-w-3 rf-shrink-0 rf-text-red-500\"}):n?K.jsx(SE,{\"aria-label\":\"Routing\",className:\"rf-h-3 rf-w-3 rf-shrink-0 rf-animate-spin rf-text-blue-500\"}):null]}),K.jsxs(\"span\",{className:\"rf-block rf-text-[11px] rf-leading-4 rf-text-gray-500\",children:[wGi(R),\" · \",U]})]})]},R.id)})})]}),K.jsxs(\"div\",{className:\"rf-flex rf-min-w-0 rf-flex-1 rf-flex-col\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-flex-wrap rf-items-center rf-gap-3 rf-border-b rf-border-gray-200 rf-px-4 rf-py-3\",children:[K.jsxs(\"h3\",{className:\"rf-mr-auto rf-flex rf-items-center rf-gap-2 rf-text-sm rf-font-medium\",children:[S,K.jsxs(\"span\",{className:\"rf-text-xs rf-font-normal rf-text-gray-500\",children:[p+1,\" of \",e.length]})]}),n\u0026\u0026K.jsx(\"button\",{type:\"button\",onClick:()=\u003ei(null),disabled:_,className:\"rf-text-xs rf-text-blue-600 disabled:rf-text-gray-500\",children:_?\"Following latest\":\"Follow latest\"}),K.jsx(\"div\",{className:\"rf-flex rf-rounded-md rf-bg-gray-100 rf-p-1\",\"aria-label\":\"Phase snapshot\",children:[\"input\",\"output\"].map(R=\u003eK.jsx(\"button\",{type:\"button\",\"aria-pressed\":y===R,disabled:R===\"input\"?!C:!f,onClick:()=\u003es(R),className:Oi(\"rf-rounded rf-px-3 rf-py-1 rf-text-xs disabled:rf-opacity-40\",y===R?\"rf-bg-white rf-text-gray-900 rf-shadow-sm\":\"rf-text-gray-500\"),children:R===\"input\"?\"Input\":\"Output\"},R))})]}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-wrap rf-items-center rf-justify-between rf-gap-2 rf-px-4 rf-py-2 rf-text-xs rf-text-gray-600\",children:[K.jsxs(\"label\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[K.jsx(\"input\",{type:\"checkbox\",checked:a,disabled:y!==\"output\",onChange:R=\u003eA(R.target.checked),className:\"rf-accent-blue-600\"}),K.jsx(\"span\",{\"aria-hidden\":\"true\",className:\"rf-inline-block rf-h-0.5 rf-w-3\",style:{backgroundColor:R$e}}),\"Highlight changes (all layers)\"]}),K.jsxs(\"span\",{children:[y===\"input\"?\"Before this phase\":\"After this phase\",\" \",\"· \",k,\" traces\"]})]}),w\u0026\u0026K.jsx(\"div\",{className:Oi(\"rf-border-y rf-px-4 rf-py-2 rf-text-xs\",m.status===\"error\"?\"rf-border-red-100 rf-bg-red-50 rf-text-red-700\":\"rf-border-blue-100 rf-bg-blue-50 rf-text-blue-700\"),role:\"status\",children:m.status===\"error\"?`Routing failed: ${m.error?.message||\"No output was captured.\"}`:Q?\"Routing in progress. Showing captured input until output is available.\":\"No output was captured for this phase. Showing the available input.\"}),K.jsx(\"div\",{ref:u,className:\"rf-relative rf-min-h-[360px] rf-flex-1\",\"data-testid\":\"autorouting-pcb\",children:E?K.jsx(S$e,{circuitJson:E,height:g,allowEditing:!1,clickToInteractEnabled:!1,initialState:kGi,debugGraphics:B}):K.jsx(\"div\",{className:\"rf-p-6 rf-text-sm rf-text-gray-500\",children:\"No PCB snapshot available for this capture.\"})}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-wrap rf-items-center rf-justify-between rf-gap-2 rf-border-t rf-border-gray-200 rf-px-4 rf-py-3 rf-text-xs rf-text-gray-500\",children:[K.jsxs(\"span\",{children:[M===void 0?\"Input unavailable\":`${M} input connections`,` · ${gpn(m)}`]}),K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-4\",children:[K.jsxs(\"button\",{type:\"button\",disabled:!x,onClick:()=\u003ekE(JSON.stringify(x,null,2),{fileName:`${m.id}-${y}.srj.json`,mimeType:\"application/json\"}),className:\"rf-flex rf-items-center rf-gap-1 disabled:rf-opacity-40\",children:[K.jsx(mZ,{className:\"rf-h-3 rf-w-3\"}),\"Download SRJ\"]}),K.jsxs(\"button\",{type:\"button\",\"aria-expanded\":c,onClick:()=\u003el(!c),className:\"rf-flex rf-items-center rf-gap-1\",children:[K.jsx(bT,{className:Oi(\"rf-h-3 rf-w-3\",c\u0026\u0026\"rf-rotate-90\")}),\"Inspect SRJ\"]})]})]}),c\u0026\u0026K.jsx(\"pre\",{className:\"rf-m-0 rf-max-h-64 rf-overflow-auto rf-border-t rf-border-gray-200 rf-bg-gray-50 rf-p-4 rf-text-xs\",\"aria-label\":`${S} ${y} SRJ`,children:x?JSON.stringify(x,null,2):\"No snapshot captured.\"})]})]})},hpn=({errorMessage:t,errorStack:e,circuitJsonErrors:n})=\u003e{ee.useEffect(()=\u003e{if(t){const o=new Error(t);e\u0026\u0026(o.stack=e);try{dG.captureException(o)}catch{}}},[t,e]),ee.useEffect(()=\u003e{if(n\u0026\u0026n.length\u003e0)for(const o of n){const i=new Error(o.message||\"Circuit JSON Error\");o.stack\u0026\u0026(i.stack=o.stack);try{dG.captureException(i,{error_type:o.type})}catch{}}},[n])},ppn=t=\u003e{ee.useEffect(()=\u003e{try{bUo(t)}catch{}},[t.source,t.component,t.isWebEmbedded,t.activeTab])},mpn=\"0.0.2885\",LGi={version:mpn},pfe=pFt()(mFt(t=\u003e({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=\u003e{t({lastRunEvalVersion:e})}}),{name:\"runframe-runner-store\"})),HGi=t=\u003e{const[e,n]=ee.useState([]),[o,i]=ee.useState(null),[r,s]=ee.useState(\"\"),[a,A]=OO(\"eval-version-selection\",null),c=pfe(h=\u003eh.setLastRunEvalVersion),l=pfe(h=\u003eh.lastRunEvalVersion);return ee.useEffect(()=\u003e{t\u0026\u0026fetch(\"https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval\").then(h=\u003eh.json()).then(h=\u003e{if(Array.isArray(h?.versions)){let d=[...h.versions];h.tags?.latest\u0026\u0026(i(h.tags.latest),d=d.filter(p=\u003ep!==h.tags.latest)),n(d)}}).catch(()=\u003e{})},[t]),ee.useEffect(()=\u003e{t\u0026\u0026(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,c(a)):o\u0026\u0026(window.TSCIRCUIT_LATEST_EVAL_VERSION=o,c(o)))},[t,a,o]),{versions:ee.useMemo(()=\u003ee.filter(h=\u003eh.includes(r)).slice(0,50),[e,r]),latestVersion:o,lastRunEvalVersion:l,search:r,setSearch:s,selectVersion:h=\u003e{A(h),s(\"\")}}},OGi=({snippetNames:t,onSelect:e,onCancel:n,isOpen:o})=\u003e{const[i,r]=ee.useState(\"\"),[s,a]=ee.useState(\"\");if(!o)return null;const A=t.filter(u=\u003eu.toLowerCase().includes(s.toLowerCase())),c=s\u0026\u0026!t.includes(s),l=u=\u003e{u.key===\"Enter\"\u0026\u0026(A.length===1?r(A[0]):c\u0026\u0026r(s))};return K.jsx(\"div\",{className:\"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]\",children:K.jsxs(\"div\",{className:\"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96\",children:[K.jsx(\"h2\",{className:\"rf-text-lg rf-font-semibold rf-mb-4\",children:\"Select Snippet\"}),K.jsx(\"input\",{type:\"text\",className:\"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4\",placeholder:\"Search snippets or new snippet name...\",value:s,onChange:u=\u003ea(u.target.value),onKeyDown:l}),K.jsxs(\"div\",{className:\"rf-h-60 rf-overflow-y-auto\",children:[A.map(u=\u003eK.jsx(\"button\",{type:\"button\",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===u?\"bg-blue-50\":\"\"}`,onClick:()=\u003er(u),children:u},u)),c\u0026\u0026K.jsxs(\"button\",{type:\"button\",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===s?\"bg-blue-50\":\"\"}`,onClick:()=\u003er(s),children:['Create new \"',s,'\"']})]}),K.jsxs(\"div\",{className:\"rf-mt-4 rf-flex rf-justify-end rf-gap-2\",children:[K.jsx(\"button\",{type:\"button\",className:\"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800\",onClick:n,children:\"Cancel\"}),K.jsx(\"button\",{type:\"button\",className:\"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50\",onClick:()=\u003ei\u0026\u0026e(i),disabled:!i,children:i===s?`Create \"${i}\"`:`Save to ${i}`})]})]})})},GGi=t=\u003e{const e=ee.useRef(null),n=md(o=\u003eo.recentEvents);ee.useEffect(()=\u003e{if(n.length===0)return;const o=n[0];o.event_id!==e.current\u0026\u0026(t(o),e.current=o.event_id)},[n,t])};var YGi=Object.defineProperty,MS=(t,e)=\u003eYGi(t,\"name\",{value:e,configurable:!0}),UGi=\"AlertDialog\",[KGi,Pmr]=Nx(UGi,[Y0n]),DS=Y0n(),VGi=MS(t=\u003e{const{__scopeAlertDialog:e,...n}=t,o=DS(e);return K.jsx(r_e,{...o,...n,modal:!0})},\"AlertDialog\");ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(iwi,{...r,...i,ref:n})},\"AlertDialogTrigger\"));var zGi=MS(t=\u003e{const{__scopeAlertDialog:e,...n}=t,o=DS(e);return K.jsx(s_e,{...o,...n})},\"AlertDialogPortal\"),JGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(wZ,{...r,...i,ref:n})},\"AlertDialogOverlay\")),WGi=\"AlertDialogContent\",[jGi,$Gi]=KGi(WGi),qGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,children:i,...r}=e,s=DS(o),a=ee.useRef(null),A=$A(n,a),c=ee.useRef(null);return K.jsx(jGi,{scope:o,cancelRef:c,children:K.jsx(MZ,{role:\"alertdialog\",...s,...r,ref:A,onOpenAutoFocus:ar(r.onOpenAutoFocus,l=\u003e{l.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=\u003el.preventDefault(),onInteractOutside:l=\u003el.preventDefault(),children:i})})},\"AlertDialogContent\")),XGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(a_e,{...r,...i,ref:n})},\"AlertDialogTitle\")),ZGi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(A_e,{...r,...i,ref:n})},\"AlertDialogDescription\")),eYi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,r=DS(o);return K.jsx(VWe,{...r,...i,ref:n})},\"AlertDialogAction\")),tYi=\"AlertDialogCancel\",nYi=ee.forwardRef(MS(function(e,n){const{__scopeAlertDialog:o,...i}=e,{cancelRef:r}=$Gi(tYi,o),s=DS(o),a=$A(n,r);return K.jsx(VWe,{...s,...i,ref:a})},\"AlertDialogCancel\")),oYi=VGi,iYi=zGi,_pn=JGi,fpn=qGi,Ipn=eYi,Cpn=nYi,ypn=XGi,xpn=ZGi;const Epn=oYi,rYi=iYi,Bpn=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(_pn,{className:Oi(\"rf-fixed rf-inset-0 rf-z-50 rf-bg-black/80 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0\",t),...e,ref:n}));Bpn.displayName=_pn.displayName;const k$e=ee.forwardRef(({className:t,...e},n)=\u003eK.jsxs(rYi,{children:[K.jsx(Bpn,{}),K.jsx(fpn,{ref:n,className:Oi(\"rf-fixed rf-left-[50%] rf-top-[50%] rf-z-50 rf-grid rf-w-full rf-max-w-lg rf-translate-x-[-50%] rf-translate-y-[-50%] rf-gap-4 rf-border rf-border-zinc-200 rf-bg-white rf-p-6 rf-shadow-lg rf-duration-200 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[state=closed]:rf-slide-out-to-left-1/2 data-[state=closed]:rf-slide-out-to-top-[48%] data-[state=open]:rf-slide-in-from-left-1/2 data-[state=open]:rf-slide-in-from-top-[48%] sm:rf-rounded-lg dark:rf-border-zinc-800 dark:rf-bg-zinc-950\",t),...e})]}));k$e.displayName=fpn.displayName;const F$e=({className:t,...e})=\u003eK.jsx(\"div\",{className:Oi(\"rf-flex rf-flex-col rf-space-y-2 rf-text-center sm:rf-text-left\",t),...e});F$e.displayName=\"AlertDialogHeader\";const L$e=({className:t,...e})=\u003eK.jsx(\"div\",{className:Oi(\"rf-flex rf-flex-col-reverse sm:rf-flex-row sm:rf-justify-end sm:rf-space-x-2\",t),...e});L$e.displayName=\"AlertDialogFooter\";const H$e=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(ypn,{ref:n,className:Oi(\"rf-text-lg rf-font-semibold\",t),...e}));H$e.displayName=ypn.displayName;const O$e=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(xpn,{ref:n,className:Oi(\"rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400\",t),...e}));O$e.displayName=xpn.displayName;const sYi=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(Ipn,{ref:n,className:Oi(gU(),t),...e}));sYi.displayName=Ipn.displayName;const G$e=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(Cpn,{ref:n,className:Oi(gU({variant:\"outline\"}),\"rf-mt-2 sm:rf-mt-0\",t),...e}));G$e.displayName=Cpn.displayName;var aYi=Object.defineProperty,NS=(t,e)=\u003eaYi(t,\"name\",{value:e,configurable:!0}),Y$e=\"Checkbox\",[AYi,Mmr]=Nx(Y$e),[cYi,U$e]=AYi(Y$e);function bpn(t){const{__scopeCheckbox:e,checked:n,children:o,defaultChecked:i,disabled:r,form:s,name:a,onCheckedChange:A,required:c,value:l=\"on\",internal_do_not_use_render:u}=t,[g,h]=DB({prop:n,defaultProp:i??!1,onChange:A,caller:Y$e}),[d,p]=ee.useState(null),[m,_]=ee.useState(null),f=ee.useRef(!1),[I,C]=ee.useReducer(E=\u003eE+1,0),y=d?!!s||!!d.closest(\"form\"):!0,x={checked:g,disabled:r,setChecked:h,control:d,setControl:p,name:a,form:s,value:l,hasConsumerStoppedPropagationRef:f,userInteractionCount:I,onUserInteraction:C,required:c,defaultChecked:RS(i)?!1:i,isFormControl:y,bubbleInput:m,setBubbleInput:_};return K.jsx(cYi,{scope:e,...x,children:Qpn(u)?u(x):o})}NS(bpn,\"CheckboxProvider\");var lYi=\"CheckboxTrigger\",uYi=ee.forwardRef(NS(function({__scopeCheckbox:e,onKeyDown:n,onClick:o,...i},r){const{control:s,value:a,disabled:A,checked:c,required:l,setControl:u,setChecked:g,hasConsumerStoppedPropagationRef:h,onUserInteraction:d,isFormControl:p,bubbleInput:m}=U$e(lYi,e),_=$A(r,u),f=ee.useRef(c);return ee.useEffect(()=\u003e{const I=s?.form;if(I){const C=NS(()=\u003eg(f.current),\"reset\");return I.addEventListener(\"reset\",C),()=\u003eI.removeEventListener(\"reset\",C)}},[s,g]),K.jsx(Na.button,{type:\"button\",role:\"checkbox\",\"aria-checked\":RS(c)?\"mixed\":c,\"aria-required\":l,\"data-state\":K$e(c),\"data-disabled\":A?\"\":void 0,disabled:A,value:a,...i,ref:_,onKeyDown:ar(n,I=\u003e{I.key===\"Enter\"\u0026\u0026I.preventDefault()}),onClick:ar(o,I=\u003e{d(),g(C=\u003eRS(C)?!0:!C),m\u0026\u0026p\u0026\u0026(h.current=I.isPropagationStopped(),h.current||I.stopPropagation())})})},\"CheckboxTrigger\")),Spn=ee.forwardRef(NS(function(e,n){const{__scopeCheckbox:o,name:i,checked:r,defaultChecked:s,required:a,disabled:A,value:c,onCheckedChange:l,form:u,...g}=e;return K.jsx(bpn,{__scopeCheckbox:o,checked:r,defaultChecked:s,disabled:A,required:a,onCheckedChange:l,name:i,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=\u003eK.jsxs(K.Fragment,{children:[K.jsx(uYi,{...g,ref:n,__scopeCheckbox:o}),h\u0026\u0026K.jsx(pYi,{__scopeCheckbox:o})]})})},\"Checkbox\")),gYi=\"CheckboxIndicator\",dYi=ee.forwardRef(NS(function(e,n){const{__scopeCheckbox:o,forceMount:i,...r}=e,s=U$e(gYi,o);return K.jsx(uE,{present:i||RS(s.checked)||s.checked===!0,children:K.jsx(Na.span,{\"data-state\":K$e(s.checked),\"data-disabled\":s.disabled?\"\":void 0,...r,ref:n,style:{pointerEvents:\"none\",...e.style}})})},\"CheckboxIndicator\")),hYi=\"CheckboxBubbleInput\",pYi=ee.forwardRef(NS(function({__scopeCheckbox:e,onClick:n,...o},i){const{control:r,hasConsumerStoppedPropagationRef:s,userInteractionCount:a,checked:A,defaultChecked:c,required:l,disabled:u,name:g,value:h,form:d,bubbleInput:p,setBubbleInput:m}=U$e(hYi,e),_=$A(i,m),f=SWe(r),I=ee.useRef(!1),C=ee.useRef(A),y=ee.useRef(a);ee.useEffect(()=\u003e{const E=p;if(!E)return;const B=window.HTMLInputElement.prototype,Q=Object.getOwnPropertyDescriptor(B,\"checked\").set,w=a!==y.current;y.current=a;const M=C.current!==A;C.current=A;const k=!(w\u0026\u0026s.current);if(M\u0026\u0026Q){I.current=!w;const R=new Event(\"click\",{bubbles:k});E.indeterminate=RS(A),Q.call(E,RS(A)?!1:A),E.dispatchEvent(R),I.current=!1}},[p,A,s,a]);const x=ee.useRef(RS(A)?!1:A);return K.jsx(Na.input,{type:\"checkbox\",\"aria-hidden\":!0,defaultChecked:c??x.current,required:l,disabled:u,name:g,value:h,form:d,...o,tabIndex:-1,ref:_,onClick:ar(n,E=\u003e{I.current\u0026\u0026E.stopPropagation()}),style:{...o.style,...f,position:\"absolute\",pointerEvents:\"none\",opacity:0,margin:0,transform:\"translateX(-100%)\"}})},\"CheckboxBubbleInput\"));function Qpn(t){return typeof t==\"function\"}NS(Qpn,\"isFunction\");function RS(t){return t===\"indeterminate\"}NS(RS,\"isIndeterminate\");function K$e(t){return RS(t)?\"indeterminate\":t?\"checked\":\"unchecked\"}NS(K$e,\"getState\");const Iee=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(Spn,{ref:n,className:Oi(\"rf-peer rf-h-4 rf-w-4 rf-shrink-0 rf-rounded-sm rf-border rf-border-zinc-200 rf-border-zinc-900 rf-shadow focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 data-[state=checked]:rf-bg-zinc-900 data-[state=checked]:rf-text-zinc-50 dark:rf-border-zinc-800 dark:rf-border-zinc-50 dark:focus-visible:rf-ring-zinc-300 dark:data-[state=checked]:rf-bg-zinc-50 dark:data-[state=checked]:rf-text-zinc-900\",t),...e,children:K.jsx(dYi,{className:Oi(\"rf-flex rf-items-center rf-justify-center rf-text-current\"),children:K.jsx(CS,{className:\"rf-h-4 rf-w-4\"})})}));Iee.displayName=Spn.displayName;const KT=r_e,mYi=s_e,vpn=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(wZ,{className:Oi(\"rf-fixed rf-inset-0 rf-z-50 rf-bg-black/80 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0\",t),...e,ref:n}));vpn.displayName=wZ.displayName;const VP=ee.forwardRef(({className:t,children:e,showOverlay:n=!0,...o},i)=\u003eK.jsxs(mYi,{children:[K.jsx(vpn,{className:Oi(n?\"\":\"rf-hidden\")}),K.jsx(MZ,{ref:i,className:Oi(\"rf-fixed rf-left-[50%] rf-top-[50%] rf-z-50 rf-grid rf-w-full rf-max-w-lg rf-translate-x-[-50%] rf-translate-y-[-50%] rf-gap-4 rf-border rf-border-zinc-200 rf-bg-white rf-p-6 rf-shadow-lg rf-duration-200 data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[state=closed]:rf-slide-out-to-left-1/2 data-[state=closed]:rf-slide-out-to-top-[48%] data-[state=open]:rf-slide-in-from-left-1/2 data-[state=open]:rf-slide-in-from-top-[48%] sm:rf-rounded-lg dark:rf-border-zinc-800 dark:rf-bg-zinc-950\",t),...o,children:e})]}));VP.displayName=MZ.displayName;const zP=({className:t,...e})=\u003eK.jsx(\"div\",{className:Oi(\"rf-flex rf-flex-col rf-space-y-2 rf-text-center sm:rf-text-left\",t),...e});zP.displayName=\"DialogHeader\";const jU=({className:t,...e})=\u003eK.jsx(\"div\",{className:Oi(\"rf-flex rf-flex-col-reverse sm:rf-flex-row sm:rf-justify-end sm:rf-space-x-2\",t),...e});jU.displayName=\"DialogFooter\";const JP=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(a_e,{ref:n,className:Oi(\"rf-text-lg rf-font-semibold\",t),...e}));JP.displayName=a_e.displayName;const VT=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(A_e,{ref:n,className:Oi(\"rf-text-sm rf-text-zinc-500 dark:rf-text-zinc-400\",t),...e}));VT.displayName=A_e.displayName;const mfe={\"tscircuit.com\":{label:\"tscircuit.com\",placeholder:\"Search tscircuit packages...\",emptyMessage:\"No packages found\"},jlcpcb:{label:\"JLCPCB Parts\",placeholder:\"Search JLCPCB parts (e.g. C14663)...\",emptyMessage:\"No parts found\"},kicad:{label:\"KiCad Footprints\",placeholder:\"Search KiCad footprints...\",emptyMessage:\"No footprints found\"}},_Yi=\"https://cdn.jsdelivr.net/npm/easyeda@latest/dist/browser/index.js\";let V$e=null;const z$e=async()=\u003e(V$e||(V$e=import(_Yi)),V$e),fYi=t=\u003e(e,n)=\u003e{const o=new Headers(n?.headers),i={};return o.forEach((r,s)=\u003e{i[s]=r}),fetch(`${t?.apiBase??QC}/proxy`,{...n,headers:{...i,\"X-Target-Url\":e.toString(),\"X-Sender-Origin\":i.origin??\"\",\"X-Sender-Host\":i.host??\"https://easyeda.com\",\"X-Sender-Referer\":i.referer??\"\",\"X-Sender-User-Agent\":i[\"user-agent\"]??\"\",\"X-Sender-Cookie\":i.cookie??\"\",authority:i.authority??\"\",\"content-type\":i[\"content-type\"]??\"\",...t?.headers}})},IYi=async(t,e=10)=\u003e{const n=encodeURIComponent(t),o=await fetch(`https://jlcsearch.tscircuit.com/api/search?limit=${e}\u0026q=${n}`);if(!o.ok)throw new Error(`JLCPCB API error: ${o.status}`);return(await o.json()).components??[]},CYi=t=\u003e({lcscId:t.lcsc,manufacturer:t.mfr,description:t.description,partNumber:`C${t.lcsc}`,package:t.package,price:t.price,stock:t.stock,isBasic:t.is_basic}),wpn=async(t,e)=\u003e{const{fetchEasyEDAComponent:n}=await z$e();return n(t,{fetch:fYi(e),includeModelMetadata:e?.includeModelMetadata})},yYi=async(t,e)=\u003e{const{convertRawEasyToTsx:n}=await z$e(),o=await wpn(t,e);return n({rawEasy:o})},xYi=async(t,e)=\u003e{const{EasyEdaJsonSchema:n,convertEasyEdaJsonToCircuitJson:o}=await z$e(),i=await wpn(t,{...e,includeModelMetadata:!1}),r=n.parse(i);return o(r,{shouldRecenter:!0,showDesignator:!0,useModelCdn:!1})};function WP(t){return Array.isArray?Array.isArray(t):Mpn(t)===\"[object Array]\"}function EYi(t){if(typeof t==\"string\")return t;if(typeof t==\"bigint\")return t.toString();const e=t+\"\";return e==\"0\"\u0026\u00261/t==-1/0?\"-0\":e}function J$e(t){return t==null?\"\":EYi(t)}function TC(t){return typeof t==\"string\"}function _fe(t){return typeof t==\"number\"}function BYi(t){return t===!0||t===!1||bYi(t)\u0026\u0026Mpn(t)==\"[object Boolean]\"}function Ppn(t){return typeof t==\"object\"}function bYi(t){return Ppn(t)\u0026\u0026t!==null}function FE(t){return t!=null}function ffe(t){return!t.trim().length}function Mpn(t){return t==null?t===void 0?\"[object Undefined]\":\"[object Null]\":Object.prototype.toString.call(t)}const SYi=\"Incorrect 'index' type\",W$e=\"Invalid doc index: must be a non-negative integer within the bounds of the docs array\",QYi=t=\u003e`Invalid value for key ${t}`,vYi=t=\u003e`Pattern length exceeds max of ${t}.`,wYi=t=\u003e`Missing ${t} property in key`,PYi=t=\u003e`Property 'weight' in key '${t}' must be a positive integer`,MYi=\"Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.\",Dpn=Object.prototype.hasOwnProperty;var DYi=class{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(n=\u003e{const o=Npn(n);this._keys.push(o),this._keyMap[o.id]=o,e+=o.weight}),this._keys.forEach(n=\u003e{n.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Npn(t){let e=null,n=null,o=null,i=1,r=null;if(TC(t)||WP(t))o=t,e=Rpn(t),n=Ife(t);else{if(!Dpn.call(t,\"name\"))throw new Error(wYi(\"name\"));const s=t.name;if(o=s,Dpn.call(t,\"weight\")\u0026\u0026t.weight!==void 0\u0026\u0026(i=t.weight,i\u003c=0))throw new Error(PYi(Ife(s)));e=Rpn(s),n=Ife(s),r=t.getFn??null}return{path:e,id:n,weight:i,src:o,getFn:r}}function Rpn(t){return WP(t)?t:t.split(\".\")}function Ife(t){return WP(t)?t.join(\".\"):t}function NYi(t,e){const n=[];let o=!1;const i=(r,s,a,A)=\u003e{if(FE(r))if(!s[a])n.push(A!==void 0?{v:r,i:A}:r);else{const c=r[s[a]];if(!FE(c))return;if(a===s.length-1\u0026\u0026(TC(c)||_fe(c)||BYi(c)||typeof c==\"bigint\"))n.push(A!==void 0?{v:J$e(c),i:A}:J$e(c));else if(WP(c)){o=!0;for(let l=0,u=c.length;l\u003cu;l+=1)i(c[l],s,a+1,l)}else s.length\u0026\u0026i(c,s,a+1,A)}};return i(t,TC(e)?e.split(\".\"):e,0),o?n:n[0]}const wa=Object.freeze({...{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=\u003et.score===e.score?t.idx\u003ce.idx?-1:1:t.score\u003ce.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:\"any\",getFn:NYi,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}});function RYi(t){return t\u003e=9\u0026\u0026t\u003c=13||t===32||t===160}function TYi(t=1,e=3){const n=new Map,o=Math.pow(10,e);return{get(i){let r=0,s=!1;for(let A=0;A\u003ci.length;A++)RYi(i.charCodeAt(A))?s=!1:s||(r++,s=!0);if(r===0\u0026\u0026(r=1),n.has(r))return n.get(r);const a=Math.round(o/Math.pow(r,.5*t))/o;return n.set(r,a),a},clear(){n.clear()}}}var j$e=class{constructor({getFn:t=wa.getFn,fieldNormWeight:e=wa.fieldNormWeight}={}){this.norm=TYi(e,3),this.getFn=t,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((e,n)=\u003e{this._keysMap[e.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const t=this.docs.length;this.records=new Array(t);let e=0;if(TC(this.docs[0]))for(let n=0;n\u003ct;n++){const o=this._createStringRecord(this.docs[n],n);o\u0026\u0026(this.records[e++]=o)}else for(let n=0;n\u003ct;n++)this.records[e++]=this._createObjectRecord(this.docs[n],n);this.records.length=e,this.norm.clear()}add(t,e){if(!Number.isInteger(e)||e\u003c0)throw new Error(W$e);if(TC(t)){const o=this._createStringRecord(t,e);return o\u0026\u0026this.records.push(o),o}const n=this._createObjectRecord(t,e);return this.records.push(n),n}removeAt(t){if(!Number.isInteger(t)||t\u003c0)throw new Error(W$e);for(let e=0,n=this.records.length;e\u003cn;e+=1)if(this.records[e].i===t){this.records.splice(e,1);break}for(let e=0,n=this.records.length;e\u003cn;e+=1)this.records[e].i\u003et\u0026\u0026(this.records[e].i-=1)}removeAll(t){const e=new Set;for(const o of t)Number.isInteger(o)\u0026\u0026o\u003e=0\u0026\u0026e.add(o);if(e.size===0)return;this.records=this.records.filter(o=\u003e!e.has(o.i));const n=Array.from(e).sort((o,i)=\u003eo-i);for(const o of this.records){let i=0,r=n.length;for(;i\u003cr;){const s=i+r\u003e\u003e\u003e1;n[s]\u003co.i?i=s+1:r=s}o.i-=i}}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_createStringRecord(t,e){return!FE(t)||ffe(t)?null:{v:t,i:e,n:this.norm.get(t)}}_createObjectRecord(t,e){const n={i:e,$:{}};for(let o=0,i=this.keys.length;o\u003ci;o++){const r=this.keys[o],s=r.getFn?r.getFn(t):this.getFn(t,r.path);if(FE(s)){if(WP(s)){const a=[];for(let A=0,c=s.length;A\u003cc;A+=1){const l=s[A];if(FE(l)){if(TC(l)){if(!ffe(l)){const u={v:l,i:A,n:this.norm.get(l)};a.push(u)}}else if(FE(l.v)){const u=TC(l.v)?l.v:J$e(l.v);if(!ffe(u)){const g={v:u,i:l.i,n:this.norm.get(u)};a.push(g)}}}}n.$[o]=a}else if(TC(s)\u0026\u0026!ffe(s)){const a={v:s,n:this.norm.get(s)};n.$[o]=a}}}return n}toJSON(){return{keys:this.keys.map(({getFn:t,...e})=\u003ee),records:this.records}}};function Tpn(t,e,{getFn:n=wa.getFn,fieldNormWeight:o=wa.fieldNormWeight}={}){const i=new j$e({getFn:n,fieldNormWeight:o});return i.setKeys(t.map(Npn)),i.setSources(e),i.create(),i}function kYi(t,{getFn:e=wa.getFn,fieldNormWeight:n=wa.fieldNormWeight}={}){const{keys:o,records:i}=t,r=new j$e({getFn:e,fieldNormWeight:n});return r.setKeys(o),r.setIndexRecords(i),r}function FYi(t=[],e=wa.minMatchCharLength){const n=[];let o=-1,i=-1,r=0;for(let s=t.length;r\u003cs;r+=1){const a=t[r];a\u0026\u0026o===-1?o=r:!a\u0026\u0026o!==-1\u0026\u0026(i=r-1,i-o+1\u003e=e\u0026\u0026n.push([o,i]),o=-1)}return t[r-1]\u0026\u0026r-o\u003e=e\u0026\u0026n.push([o,r-1]),n}function LYi(t,e,n,{location:o=wa.location,distance:i=wa.distance,threshold:r=wa.threshold,findAllMatches:s=wa.findAllMatches,minMatchCharLength:a=wa.minMatchCharLength,includeMatches:A=wa.includeMatches,ignoreLocation:c=wa.ignoreLocation}={}){if(e.length\u003e32)throw new Error(vYi(32));const l=e.length,u=t.length,g=Math.max(0,Math.min(o,u));let h=r,d=g;const p=(S,Q)=\u003e{const w=S/l;if(c)return w;const M=Math.abs(g-Q);return i?w+M/i:M?1:w},m=a\u003e1||A,_=m?Array(u):[];let f;for(;(f=t.indexOf(e,d))\u003e-1;){const S=p(0,f);if(h=Math.min(S,h),d=f+l,m){let Q=0;for(;Q\u003cl;)_[f+Q]=1,Q+=1}}d=-1;let I=[],C=1,y=0,x=l+u;const E=1\u003c\u003cl-1;for(let S=0;S\u003cl;S+=1){let Q=0,w=x;for(;Q\u003cw;)p(S,g+w)\u003c=h?Q=w:x=w,w=Math.floor((x-Q)/2+Q);x=w;let M=Math.max(1,g-w+1);const k=s?u:Math.min(g+w,u)+l,R=Array(k+2);R[k+1]=(1\u003c\u003cS)-1;for(let F=k;F\u003e=M;F-=1){const O=F-1,U=n[t[O]];if(R[F]=(R[F+1]\u003c\u003c1|1)\u0026U,S\u0026\u0026(R[F]|=(I[F+1]|I[F])\u003c\u003c1|1|I[F+1]),R[F]\u0026E\u0026\u0026(C=p(S,O),C\u003c=h)){if(h=C,d=O,y=S,d\u003c=g)break;M=Math.max(1,2*g-d)}}if(p(S+1,g)\u003eh)break;I=R}if(m\u0026\u0026d\u003e=0){const S=Math.min(u-1,d+l-1+y);for(let Q=d;Q\u003c=S;Q+=1)n[t[Q]]\u0026\u0026(_[Q]=1)}const B={isMatch:d\u003e=0,score:Math.max(.001,C)};if(m){const S=FYi(_,a);S.length?A\u0026\u0026(B.indices=S):B.isMatch=!1}return B}function HYi(t){const e={};for(let n=0,o=t.length;n\u003co;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1\u003c\u003co-n-1}return e}function $e(t){if(t.length\u003c=1)return t;t.sort((n,o)=\u003en[0]-o[0]||n[1]-o[1]);const e=[t[0]];for(let n=1,o=t.length;n\u003co;n+=1){const i=e[e.length-1],r=t[n];r[0]\u003c=i[1]+1?i[1]=Math.max(i[1],r[1]):e.push(r)}return e}const kpn={ł:\"l\",Ł:\"L\",đ:\"d\",Đ:\"D\",ø:\"o\",Ø:\"O\",ħ:\"h\",Ħ:\"H\",ŧ:\"t\",Ŧ:\"T\",ı:\"i\",ß:\"ss\"},OYi=new RegExp(\"[\"+Object.keys(kpn).join(\"\")+\"]\",\"g\"),Cee=typeof String.prototype.normalize==\"function\"?t=\u003et.normalize(\"NFD\").replace(/[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F]/g,\"\").replace(OYi,e=\u003ekpn[e]):t=\u003et;var q$e=class{constructor(t,{location:e=wa.location,threshold:n=wa.threshold,distance:o=wa.distance,includeMatches:i=wa.includeMatches,findAllMatches:r=wa.findAllMatches,minMatchCharLength:s=wa.minMatchCharLength,isCaseSensitive:a=wa.isCaseSensitive,ignoreDiacritics:A=wa.ignoreDiacritics,ignoreLocation:c=wa.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:o,includeMatches:i,findAllMatches:r,minMatchCharLength:s,isCaseSensitive:a,ignoreDiacritics:A,ignoreLocation:c},t=a?t:t.toLowerCase(),t=A?Cee(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const l=(g,h)=\u003e{this.chunks.push({pattern:g,alphabet:HYi(g),startIndex:h})},u=this.pattern.length;if(u\u003e32){let g=0;const h=u%32,d=u-h;for(;g\u003cd;)l(this.pattern.substr(g,32),g),g+=32;if(h){const p=u-32;l(this.pattern.substr(p),p)}}else l(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:n,includeMatches:o}=this.options;if(t=e?t:t.toLowerCase(),t=n?Cee(t):t,this.pattern===t){if(t.length\u003cthis.options.minMatchCharLength)return{isMatch:!1,score:1};const d={isMatch:!0,score:0};return o\u0026\u0026(d.indices=[[0,t.length-1]]),d}const{location:i,distance:r,threshold:s,findAllMatches:a,minMatchCharLength:A,ignoreLocation:c}=this.options,l=[];let u=0,g=!1;this.chunks.forEach(({pattern:d,alphabet:p,startIndex:m})=\u003e{const{isMatch:_,score:f,indices:I}=LYi(t,d,p,{location:i+m,distance:r,threshold:s,findAllMatches:a,minMatchCharLength:A,includeMatches:o,ignoreLocation:c});_\u0026\u0026(g=!0),u+=f,_\u0026\u0026I\u0026\u0026l.push(...I)});const h={isMatch:g,score:g?u/this.chunks.length:1};return g\u0026\u0026o\u0026\u0026(h.indices=$e(l)),h}};const GYi=new Set([\"fuzzy\",\"include\"]);function YYi(t){return t.startsWith(\"inverse\")}const X$e=[{type:\"exact\",multiRegex:/^=\"(.*)\"$/,singleRegex:/^=(.*)$/,create:t=\u003e({type:\"exact\",search(e){const n=e===t;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:\"include\",multiRegex:/^'\"(.*)\"$/,singleRegex:/^'(.*)$/,create:t=\u003e({type:\"include\",search(e){let n=0,o;const i=[],r=t.length;for(;(o=e.indexOf(t,n))\u003e-1;)n=o+r,i.push([o,n-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}})},{type:\"prefix-exact\",multiRegex:/^\\^\"(.*)\"$/,singleRegex:/^\\^(.*)$/,create:t=\u003e({type:\"prefix-exact\",search(e){const n=e.startsWith(t);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:\"inverse-prefix-exact\",multiRegex:/^!\\^\"(.*)\"$/,singleRegex:/^!\\^(.*)$/,create:t=\u003e({type:\"inverse-prefix-exact\",search(e){const n=!e.startsWith(t);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:\"inverse-suffix-exact\",multiRegex:/^!\"(.*)\"\\$/,singleRegex:/^!(.*)\\$/,create:t=\u003e({type:\"inverse-suffix-exact\",search(e){const n=!e.endsWith(t);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:\"suffix-exact\",multiRegex:/^\"(.*)\"\\$/,singleRegex:/^(.*)\\$/,create:t=\u003e({type:\"suffix-exact\",search(e){const n=e.endsWith(t);return{isMatch:n,score:n?0:1,indices:[e.length-t.length,e.length-1]}}})},{type:\"inverse-exact\",multiRegex:/^!\"(.*)\"$/,singleRegex:/^!(.*)$/,create:t=\u003e({type:\"inverse-exact\",search(e){const n=e.indexOf(t)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:\"fuzzy\",multiRegex:/^\"(.*)\"$/,singleRegex:/^(.*)$/,create:(t,e={})=\u003e{const n=new q$e(t,{location:e.location??wa.location,threshold:e.threshold??wa.threshold,distance:e.distance??wa.distance,includeMatches:e.includeMatches??wa.includeMatches,findAllMatches:e.findAllMatches??wa.findAllMatches,minMatchCharLength:e.minMatchCharLength??wa.minMatchCharLength,isCaseSensitive:e.isCaseSensitive??wa.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics??wa.ignoreDiacritics,ignoreLocation:e.ignoreLocation??wa.ignoreLocation});return{type:\"fuzzy\",search(o){return n.searchIn(o)}}}}],Fpn=X$e.length,UYi=\"\\0\",KYi=\"|\";function VYi(t){const e=[],n=t.length;let o=0;for(;o\u003cn;){for(;o\u003cn\u0026\u0026t[o]===\" \";)o++;if(o\u003e=n)break;let i=o;for(;i\u003cn\u0026\u0026t[i]!==\" \"\u0026\u0026t[i]!=='\"';)i++;if(i\u003cn\u0026\u0026t[i]==='\"'){for(i++;i\u003cn;){if(t[i]==='\"'){const r=i+1;if(r\u003e=n||t[r]===\" \"){i++;break}if(t[r]===\"$\"\u0026\u0026(r+1\u003e=n||t[r+1]===\" \")){i+=2;break}}i++}e.push(t.substring(o,i)),o=i}else{for(;i\u003cn\u0026\u0026t[i]!==\" \";)i++;e.push(t.substring(o,i)),o=i}}return e}function Lpn(t,e){const n=t.match(e);return n?n[1]:null}function zYi(t,e={}){return t.replace(/\\\\\\|/g,UYi).split(KYi).map(n=\u003e{const o=VYi(n.replace(/\\u0000/g,\"|\").trim()).filter(r=\u003er\u0026\u0026!!r.trim()),i=[];for(let r=0,s=o.length;r\u003cs;r+=1){const a=o[r];let A=!1,c=-1;for(;!A\u0026\u0026++c\u003cFpn;){const l=X$e[c],u=Lpn(a,l.multiRegex);u\u0026\u0026(i.push(l.create(u,e)),A=!0)}if(!A)for(c=-1;++c\u003cFpn;){const l=X$e[c],u=Lpn(a,l.singleRegex);if(u){i.push(l.create(u,e));break}}}return i})}var JYi=class{constructor(t,{isCaseSensitive:e=wa.isCaseSensitive,ignoreDiacritics:n=wa.ignoreDiacritics,includeMatches:o=wa.includeMatches,minMatchCharLength:i=wa.minMatchCharLength,ignoreLocation:r=wa.ignoreLocation,findAllMatches:s=wa.findAllMatches,location:a=wa.location,threshold:A=wa.threshold,distance:c=wa.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:n,includeMatches:o,minMatchCharLength:i,findAllMatches:s,ignoreLocation:r,location:a,threshold:A,distance:c},t=e?t:t.toLowerCase(),t=n?Cee(t):t,this.pattern=t,this.query=zYi(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:o,ignoreDiacritics:i}=this.options;t=o?t:t.toLowerCase(),t=i?Cee(t):t;let r=0;const s=[];let a=0,A=!1;for(let c=0,l=e.length;c\u003cl;c+=1){const u=e[c];s.length=0,r=0,A=!1;for(let g=0,h=u.length;g\u003ch;g+=1){const d=u[g],{isMatch:p,indices:m,score:_}=d.search(t);if(p)r+=1,a+=_,YYi(d.type)\u0026\u0026(A=!0),n\u0026\u0026(GYi.has(d.type)?s.push(...m):s.push(m));else{a=0,r=0,s.length=0,A=!1;break}}if(r){const g={isMatch:!0,score:a/r};return A\u0026\u0026(g.hasInverse=!0),n\u0026\u0026(g.indices=$e(s)),g}}return{isMatch:!1,score:1}}};const Z$e=[];function eqe(...t){Z$e.push(...t)}function Cfe(t,e){for(let n=0,o=Z$e.length;n\u003co;n+=1){const i=Z$e[n];if(i.condition(t,e))return new i(t,e)}return new q$e(t,e)}const yfe={AND:\"$and\",OR:\"$or\"},tqe={PATH:\"$path\",PATTERN:\"$val\"},nqe=t=\u003e!!(t[yfe.AND]||t[yfe.OR]),WYi=t=\u003e!!t[tqe.PATH],jYi=t=\u003e!WP(t)\u0026\u0026Ppn(t)\u0026\u0026!nqe(t),Hpn=t=\u003e({[yfe.AND]:Object.keys(t).map(e=\u003e({[e]:t[e]}))});function Opn(t,e,{auto:n=!0}={}){const o=i=\u003e{if(TC(i)){const A={keyId:null,pattern:i};return n\u0026\u0026(A.searcher=Cfe(i,e)),A}const r=Object.keys(i),s=WYi(i);if(!s\u0026\u0026r.length\u003e1\u0026\u0026!nqe(i))return o(Hpn(i));if(jYi(i)){const A=s?i[tqe.PATH]:r[0],c=s?i[tqe.PATTERN]:i[A];if(!TC(c))throw new Error(QYi(A));const l={keyId:Ife(A),pattern:c};return n\u0026\u0026(l.searcher=Cfe(c,e)),l}const a={children:[],operator:r[0]};return r.forEach(A=\u003e{const c=i[A];WP(c)\u0026\u0026c.forEach(l=\u003e{a.children.push(o(l))})}),a};return nqe(t)||(t=Hpn(t)),o(t)}function oqe(t,{ignoreFieldNorm:e=wa.ignoreFieldNorm}){let n=1;return t.forEach(({key:o,norm:i,score:r})=\u003e{const s=o?o.weight:null;n*=Math.pow(r===0\u0026\u0026s?Number.EPSILON:r,(s||1)*(e?1:i))}),n}function $Yi(t,{ignoreFieldNorm:e=wa.ignoreFieldNorm}){t.forEach(n=\u003e{n.score=oqe(n.matches,{ignoreFieldNorm:e})})}var qYi=class{constructor(t,e){this.limit=t,this.heap=[],this.comparator=e}get size(){return this.heap.length}insert(t){this.size\u003cthis.limit?(this.heap.push(t),this._bubbleUp(this.size-1)):this.comparator(t,this.heap[0])\u003c0\u0026\u0026(this.heap[0]=t,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(t){const e=this.heap;for(;t\u003e0;){const n=t-1\u003e\u003e1;if(this.comparator(e[t],e[n])\u003c=0)break;const o=e[t];e[t]=e[n],e[n]=o,t=n}}_sinkDown(t){const e=this.heap,n=e.length;let o=t;do{t=o;const i=2*t+1,r=2*t+2;if(i\u003cn\u0026\u0026this.comparator(e[i],e[o])\u003e0\u0026\u0026(o=i),r\u003cn\u0026\u0026this.comparator(e[r],e[o])\u003e0\u0026\u0026(o=r),o!==t){const s=e[t];e[t]=e[o],e[o]=s}}while(o!==t)}};function XYi(t){const e=[];return t.matches.forEach(n=\u003e{if(!FE(n.indices)||!n.indices.length)return;const o={indices:n.indices,value:n.value};n.key\u0026\u0026(o.key=n.key.id),n.idx\u003e-1\u0026\u0026(o.refIndex=n.idx),e.push(o)}),e}function ZYi(t,e,{includeMatches:n=wa.includeMatches,includeScore:o=wa.includeScore}={}){return t.map(i=\u003e{const{idx:r}=i,s={item:e[r],refIndex:r};return n\u0026\u0026(s.matches=XYi(i)),o\u0026\u0026(s.score=i.score),s})}const eUi=/[\\p{L}\\p{M}\\p{N}_]+/gu,Gpn=new WeakSet;function tUi(t){Gpn.has(t)||(Gpn.add(t),console.warn(`[Fuse] tokenize regex ${t} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function nUi(t){if(typeof t==\"function\"){let e=!1;return n=\u003e{const o=t(n);if(!e\u0026\u0026(e=!0,!Array.isArray(o)||o.some(i=\u003etypeof i!=\"string\")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(o)?\"array containing non-strings\":typeof o}.`);return o}}return t instanceof RegExp?(t.global||tUi(t),e=\u003ee.match(t)||[]):e=\u003ee.match(eUi)||[]}function iqe({isCaseSensitive:t=!1,ignoreDiacritics:e=!1,tokenize:n}={}){const o=nUi(n);return{tokenize(i){return t||(i=i.toLowerCase()),e\u0026\u0026(i=Cee(i)),o(i)}}}var oUi=class{static condition(t,e){return e.useTokenSearch}constructor(t,e){this.options=e,this.analyzer=iqe({isCaseSensitive:e.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics,tokenize:e.tokenize});const n=this.analyzer.tokenize(t),{df:o,fieldCount:i}=e._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of n){this.termSearchers.push(new q$e(r,{location:e.location,threshold:e.threshold,distance:e.distance,includeMatches:e.includeMatches,findAllMatches:e.findAllMatches,minMatchCharLength:e.minMatchCharLength,isCaseSensitive:e.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics,ignoreLocation:!0}));const s=o.get(r)||0,a=Math.log(1+(i-s+.5)/(s+.5));this.idfWeights.push(a)}this.combineAll=e.tokenMatch===\"all\",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms\u003c=31}searchIn(t){if(!this.termSearchers.length)return{isMatch:!1,score:1};const e=[];let n=0,o=0,i=0,r=0;const s=this.combineAll\u0026\u0026!this.useMask?new Set:null;for(let c=0;c\u003cthis.termSearchers.length;c++){const l=this.termSearchers[c].searchIn(t),u=this.idfWeights[c];o+=u,l.isMatch\u0026\u0026(i++,n+=u*(1-l.score),l.indices\u0026\u0026e.push(...l.indices),this.combineAll\u0026\u0026(this.useMask?r|=1\u003c\u003cc:s.add(c)))}if(i===0)return{isMatch:!1,score:1};const a=o\u003e0?1-n/o:0,A={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches\u0026\u0026e.length\u0026\u0026(A.indices=$e(e)),this.combineAll\u0026\u0026(this.useMask?A.matchedMask=r:A.matchedTerms=s,A.termCount=this.numTerms),A}};function rqe(t,e,n,o){const i=o.tokenize(e);if(!i.length)return;t.fieldCount++,t.docFieldCount.set(n,(t.docFieldCount.get(n)||0)+1);const r=new Set(i);let s=t.docTermFieldHits.get(n);s||(s=new Map,t.docTermFieldHits.set(n,s));for(const a of r)s.set(a,(s.get(a)||0)+1),t.df.set(a,(t.df.get(a)||0)+1)}function Ypn(t,e,n,o){const{i,v:r,$:s}=e;if(r!==void 0){rqe(t,r,i,o);return}if(s)for(let a=0;a\u003cn;a++){const A=s[a];if(A)if(Array.isArray(A))for(const c of A)rqe(t,c.v,i,o);else rqe(t,A.v,i,o)}}function iUi(t,e,n){const o={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of t)Ypn(o,i,e,n);return o}function rUi(t,e,n,o){Ypn(t,e,n,o)}function sUi(t,e){const n=t.docFieldCount.get(e);if(n===void 0)return;t.fieldCount-=n,t.docFieldCount.delete(e);const o=t.docTermFieldHits.get(e);if(o){for(const[i,r]of o){const s=(t.df.get(i)||0)-r;s\u003c=0?t.df.delete(i):t.df.set(i,s)}t.docTermFieldHits.delete(e)}}function Upn(t,e){if(e.length===0)return;const n=Array.from(new Set(e)).sort((a,A)=\u003ea-A);for(const a of n)sUi(t,a);const o=a=\u003e{let A=0,c=n.length;for(;A\u003cc;){const l=A+c\u003e\u003e\u003e1;n[l]\u003ca?A=l+1:c=l}return a-A},i=n[0],r=new Map;for(const[a,A]of t.docFieldCount)r.set(a\u003ei?o(a):a,A);t.docFieldCount=r;const s=new Map;for(const[a,A]of t.docTermFieldHits)s.set(a\u003ei?o(a):a,A);t.docTermFieldHits=s}var jP=class{constructor(t,e,n){this.options={...wa,...e},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new DYi(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const e=Cfe(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=e,e}setCollection(t,e){if(this._docs=t,e\u0026\u0026!(e instanceof j$e))throw new Error(SYi);if(this._myIndex=e||Tpn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=iqe({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=iUi(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(t){if(!FE(t))return;this._docs.push(t);const e=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex\u0026\u0026e){const n=iqe({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});rUi(this._invertedIndex,e,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(t=()=\u003e!1){const e=[],n=[];for(let o=0,i=this._docs.length;o\u003ci;o+=1)t(this._docs[o],o)\u0026\u0026(e.push(this._docs[o]),n.push(o));if(n.length){this._invertedIndex\u0026\u0026Upn(this._invertedIndex,n);const o=new Set(n);this._docs=this._docs.filter((i,r)=\u003e!o.has(r)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return e}removeAt(t){if(!Number.isInteger(t)||t\u003c0||t\u003e=this._docs.length)throw new Error(W$e);this._invertedIndex\u0026\u0026Upn(this._invertedIndex,[t]);const e=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),e}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(t=\u003ethis._keyStore.get(t.id)||t)}search(t,e){const{limit:n=-1}=e||{},{includeMatches:o,includeScore:i,shouldSort:r,sortFn:s,ignoreFieldNorm:a}=this.options;if(TC(t)\u0026\u0026!t.trim()){let g=this._docs.map((h,d)=\u003e({item:h,refIndex:d}));return _fe(n)\u0026\u0026n\u003e-1\u0026\u0026(g=g.slice(0,n)),g}const A=r\u0026\u0026_fe(n)\u0026\u0026n\u003e0\u0026\u0026TC(t),c=s,l=(g,h)=\u003ec(g,h)||g.idx-h.idx;let u;if(A){const g=new qYi(n,l);TC(this._docs[0])?this._searchStringList(t,{heap:g,ignoreFieldNorm:a}):this._searchObjectList(t,{heap:g,ignoreFieldNorm:a}),u=g.extractSorted()}else u=TC(t)?TC(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),$Yi(u,{ignoreFieldNorm:a}),r\u0026\u0026u.sort(TC(t)?l:c),_fe(n)\u0026\u0026n\u003e-1\u0026\u0026(u=u.slice(0,n));return ZYi(u,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(t,{heap:e,ignoreFieldNorm:n}={}){const o=this._getSearcher(t),i=this.options.useTokenSearch\u0026\u0026this.options.tokenMatch===\"all\",{records:r}=this._myIndex,s=e?null:[];return r.forEach(({v:a,i:A,n:c})=\u003e{if(!FE(a))return;const l=o.searchIn(a);if(l.isMatch){const u={score:l.score,value:a,norm:c,indices:l.indices};i\u0026\u0026(u.matchedMask=l.matchedMask,u.matchedTerms=l.matchedTerms,u.termCount=l.termCount);const g=[u];if(!i||this._coversAllTokens(g)){const h={item:a,idx:A,matches:g};e?(h.score=oqe(h.matches,{ignoreFieldNorm:n}),e.insert(h)):s.push(h)}}}),s}_searchLogical(t){const e=Opn(t,this.options),n=this._normalizedKeys(),o=(a,A,c)=\u003e{if(!(\"children\"in a)){const{keyId:h,searcher:d}=a;let p;return h===null?(p=[],n.forEach((m,_)=\u003e{p.push(...this._findMatches({key:m,value:A[_],searcher:d}))})):p=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(A,h),searcher:d}),p\u0026\u0026p.length?[{idx:c,item:A,matches:p}]:[]}const{children:l,operator:u}=a,g=[];for(let h=0,d=l.length;h\u003cd;h+=1){const p=l[h],m=o(p,A,c);if(m.length)g.push(...m);else if(u===yfe.AND)return[]}return g},i=this._myIndex.records,r=new Map,s=[];return i.forEach(({$:a,i:A})=\u003e{if(FE(a)){const c=o(e,a,A);c.length\u0026\u0026(r.has(A)||(r.set(A,{idx:A,item:a,matches:[]}),s.push(r.get(A))),c.forEach(({matches:l})=\u003e{r.get(A).matches.push(...l)}))}}),s}_searchObjectList(t,{heap:e,ignoreFieldNorm:n}={}){const o=this._getSearcher(t),i=this.options.useTokenSearch\u0026\u0026this.options.tokenMatch===\"all\",{records:r}=this._myIndex,s=this._normalizedKeys(),a=e?null:[];return r.forEach(({$:A,i:c})=\u003e{if(!FE(A))return;const l=[];let u=!1,g=!1;if(s.forEach((h,d)=\u003e{const p=this._findMatches({key:h,value:A[d],searcher:o});p.length?(l.push(...p),p[0].hasInverse\u0026\u0026(g=!0)):u=!0}),!(g\u0026\u0026u)\u0026\u0026l.length\u0026\u0026(!i||this._coversAllTokens(l))){const h={idx:c,item:A,matches:l};e?(h.score=oqe(h.matches,{ignoreFieldNorm:n}),e.insert(h)):a.push(h)}}),a}_findMatches({key:t,value:e,searcher:n}){if(!FE(e))return[];const o=[];if(WP(e))e.forEach(({v:i,i:r,n:s})=\u003e{if(!FE(i))return;const a=n.searchIn(i);if(a.isMatch){const A={score:a.score,key:t,value:i,idx:r,norm:s,indices:a.indices,hasInverse:a.hasInverse};a.termCount!==void 0\u0026\u0026(A.matchedMask=a.matchedMask,A.matchedTerms=a.matchedTerms,A.termCount=a.termCount),o.push(A)}});else{const{v:i,n:r}=e,s=n.searchIn(i);if(s.isMatch){const a={score:s.score,key:t,value:i,norm:r,indices:s.indices,hasInverse:s.hasInverse};s.termCount!==void 0\u0026\u0026(a.matchedMask=s.matchedMask,a.matchedTerms=s.matchedTerms,a.termCount=s.termCount),o.push(a)}}return o}_coversAllTokens(t){const e=t.length?t[0].termCount:void 0;if(e===void 0)return!0;if(e\u003c=31){let o=0;for(let i=0;i\u003ct.length;i++)o|=t[i].matchedMask||0;return o===2**e-1}const n=new Set;for(let o=0;o\u003ct.length;o++){const i=t[o].matchedTerms;if(i)for(const r of i)n.add(r)}return n.size===e}};jP.version=\"7.5.0\",jP.createIndex=Tpn,jP.parseIndex=kYi,jP.config=wa,jP.match=function(t,e,n){if(n\u0026\u0026n.useTokenSearch)throw new Error(MYi);return Cfe(t,{...wa,...n}).searchIn(e)},jP.parseQuery=Opn,eqe(JYi),eqe(oUi),jP.use=function(...t){t.forEach(e=\u003eeqe(e))};var aUi=jP;const AUi=\"https://kicad-mod-cache.tscircuit.com\";let sqe=null,yee=null,aqe=null;const cUi=async()=\u003esqe||yee||(yee=fetch(\"https://kicad-mod-cache.tscircuit.com/kicad_files.json\").then(t=\u003et.json()).then(t=\u003e(sqe=t,yee=null,t)),yee),lUi=async(t,e=20)=\u003e{const n=await cUi();return aqe||(aqe=new aUi(n)),aqe.search(t).slice(0,e).map(o=\u003eo.item)},uUi=t=\u003e{const e=t.replace(\".pretty/\",\"/\").replace(\".kicad_mod\",\"\"),n=`kicad:${e}`;return{path:t,qualifiedName:n,description:e}},gUi=t=\u003et.replace(/^\\/+/,\"\").split(\"/\").map(e=\u003eencodeURIComponent(e)).join(\"/\"),dUi=async t=\u003e{const e=await fetch(`${AUi}/${gUi(t)}`);if(!e.ok)throw new Error(`KiCad footprint fetch failed: ${e.status}`);const n=await e.text(),{KicadFootprintToCircuitJsonConverter:o}=await DE(\"kicad-to-circuit-json\"),i=new o;return i.addFile(t.split(\"/\").pop()??\"selected-footprint.kicad_mod\",n),i.runUntilFinished(),i.getOutput()},Kpn=t=\u003et?.source===\"jlcpcb\"||t?.source===\"kicad\",hUi=async(t,e)=\u003e{if(t.source===\"jlcpcb\")return xYi(t.component.partNumber,e?.jlcpcb);if(t.source===\"kicad\")return dUi(t.footprint.path);throw new Error(\"Footprint preview is not available for this source\")},pUi=({query:t,placeholder:e,isSearching:n,onQueryChange:o,onSubmit:i})=\u003e{const r=ee.useCallback(s=\u003e{s.key===\"Enter\"\u0026\u0026(s.preventDefault(),i())},[i]);return K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2 rf-mt-4\",children:[K.jsxs(\"div\",{className:\"rf-relative rf-flex-grow\",children:[K.jsx(iWe,{className:\"rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground\"}),K.jsx(yje,{placeholder:e,className:\"rf-pl-8\",spellCheck:!1,autoComplete:\"off\",value:t,onChange:s=\u003eo(s.target.value),onKeyDown:r})]}),K.jsx(fA,{onClick:i,disabled:n||t.trim().length\u003c1,className:\"sm:rf-px-4 rf-px-3\",children:n?K.jsx(SE,{className:\"rf-h-4 rf-w-4 rf-animate-spin\"}):K.jsxs(K.Fragment,{children:[K.jsx(iWe,{className:\"rf-h-4 rf-w-4 sm:rf-hidden\"}),K.jsx(\"span\",{className:\"rf-hidden sm:rf-inline\",children:\"Search\"})]})})]})},mUi=new Intl.NumberFormat(\"en-US\",{style:\"currency\",currency:\"USD\"}),_Ui=t=\u003emUi.format(t),Vpn=t=\u003e{switch(t.source){case\"tscircuit.com\":{const e=t.package;return`tscircuit-${e.package_id??`${e.org_owner_tscircuit_handle??\"unknown\"}-${e.unscoped_name??e.name??\"package\"}`}`}case\"jlcpcb\":return`jlc-${t.component.lcscId}`;case\"kicad\":return`kicad-${t.footprint.path}`;default:return\"unknown\"}},fUi=t=\u003e{switch(t.source){case\"tscircuit.com\":return t.package.unscoped_name;case\"jlcpcb\":return t.component.isDirectLookup?t.component.partNumber:t.component.manufacturer;case\"kicad\":return t.footprint.qualifiedName}},IUi=t=\u003e{switch(t.source){case\"tscircuit.com\":return t.package.description||(t.package.org_owner_tscircuit_handle?`Component by ${t.package.org_owner_tscircuit_handle}`:void 0);case\"jlcpcb\":return t.component.description;case\"kicad\":return t.footprint.description}},CUi=t=\u003e{switch(t.source){case\"tscircuit.com\":return t.package.name;case\"jlcpcb\":return t.component.isDirectLookup?void 0:t.component.partNumber;case\"kicad\":return}},yUi=({results:t,selected:e,onSelect:n,onShowDetails:o})=\u003e{const i=e?Vpn(e):null;return K.jsx(\"div\",{className:\"rf-divide-y rf-w-full rf-overflow-hidden\",children:t.map(r=\u003e{const s=Vpn(r),a=i===s,A=fUi(r),c=IUi(r),l=CUi(r),u=r.source===\"jlcpcb\"?r.component.stock:null,g=r.source===\"jlcpcb\"?r.component.price:null,h=r.source===\"jlcpcb\"?r.component.isBasic:null,d=r.source===\"jlcpcb\"?r.component.isDirectLookup:!1;return K.jsxs(\"div\",{className:`rf-p-3 rf-flex rf-flex-col sm:rf-grid sm:rf-grid-cols-[minmax(0,1fr)_auto] rf-items-start sm:rf-items-center rf-cursor-pointer hover:rf-bg-zinc-100 rf-gap-2 rf-overflow-hidden ${a?\"rf-bg-zinc-100\":\"\"}`,onClick:()=\u003en(r),children:[K.jsxs(\"div\",{className:\"rf-min-w-0 rf-overflow-hidden rf-w-full\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-start rf-gap-2 rf-min-w-0\",children:[K.jsxs(\"div\",{className:\"rf-font-medium rf-text-sm rf-truncate rf-flex-1 rf-min-w-0 rf-flex rf-items-center rf-gap-1.5\",children:[A,r.source===\"jlcpcb\"\u0026\u0026h!=null\u0026\u0026K.jsx(\"span\",{className:`rf-text-xs rf-px-1.5 rf-py-0.5 rf-rounded rf-font-medium rf-flex-shrink-0 ${h?\"rf-bg-green-100 rf-text-green-700\":\"rf-bg-orange-100 rf-text-orange-700\"}`,children:h?\"Basic\":\"Extended\"}),d\u0026\u0026K.jsx(\"span\",{className:\"rf-text-xs rf-px-1.5 rf-py-0.5 rf-rounded rf-font-medium rf-flex-shrink-0 rf-bg-blue-100 rf-text-blue-700\",children:\"Direct lookup\"}),r.source===\"tscircuit.com\"\u0026\u0026r.package.is_private\u0026\u0026K.jsx(ybi,{className:\"rf-ml-1 rf-h-3 rf-w-3 rf-text-zinc-400 rf-flex-shrink-0\"})]}),r.source===\"jlcpcb\"\u0026\u0026u!=null?K.jsxs(\"div\",{className:\"rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0 sm:rf-hidden\",children:[u.toLocaleString(),\" in stock\"]}):null]}),K.jsxs(\"div\",{className:\"rf-text-xs rf-text-zinc-500 rf-truncate rf-w-full\",children:[l?K.jsx(\"span\",{className:\"rf-mr-2\",children:l}):null,c]})]}),K.jsxs(\"div\",{children:[r.source===\"tscircuit.com\"\u0026\u0026o?K.jsx(\"div\",{className:\"rf-flex-shrink-0 rf-w-full sm:rf-w-auto\",children:K.jsx(fA,{variant:\"outline\",size:\"sm\",className:\"rf-text-xs rf-w-full sm:rf-w-auto\",onClick:p=\u003e{p.stopPropagation(),o(r)},children:\"See Details\"})}):r.source===\"jlcpcb\"\u0026\u0026u!=null?K.jsxs(\"div\",{className:\"rf-hidden sm:rf-block rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0\",children:[u.toLocaleString(),\" in stock\"]}):null,g!=null\u0026\u0026K.jsx(\"div\",{className:\"rf-hidden sm:rf-block rf-text-xs rf-text-zinc-500 rf-font-medium rf-whitespace-nowrap rf-flex-shrink-0 rf-text-right\",children:_Ui(g)})]})]},s)})})},xUi=({circuitJson:t,error:e,isLoading:n,height:o})=\u003eK.jsx(\"section\",{className:\"rf-flex rf-min-w-0 rf-items-center rf-justify-center\",style:{height:o},children:n?K.jsxs(\"div\",{className:\"rf-flex rf-w-full rf-items-center rf-justify-center rf-gap-2 rf-bg-zinc-950 rf-text-sm rf-text-zinc-300\",style:{height:o},children:[K.jsx(SE,{className:\"rf-h-4 rf-w-4 rf-animate-spin\"}),\"Loading preview...\"]}):e?K.jsx(\"div\",{className:\"rf-flex rf-w-full rf-items-center rf-justify-center rf-bg-zinc-950 rf-p-4\",style:{height:o},children:K.jsxs(\"div\",{className:\"rf-flex rf-max-w-[320px] rf-items-start rf-gap-2 rf-text-sm rf-text-zinc-300\",children:[K.jsx(oWe,{className:\"rf-mt-0.5 rf-h-4 rf-w-4 rf-flex-shrink-0\"}),K.jsx(\"span\",{children:e})]})}):t?K.jsx(\"div\",{className:\"rf-w-full rf-min-w-0 rf-overflow-hidden\",children:K.jsx(S$e,{circuitJson:t,height:o,allowEditing:!1,clickToInteractEnabled:!1,focusOnHover:!1,disablePcbGroups:!0})}):K.jsx(\"div\",{className:\"rf-flex rf-w-full rf-items-center rf-justify-center rf-bg-zinc-950 rf-text-sm rf-text-zinc-300\",style:{height:o},children:\"No preview\"})}),zpn={importComponentDialog:101,importComponentDetailsDialog:102},EUi=({packageResult:t,isOpen:e,onOpenChange:n,isLoading:o,details:i,previewTab:r,onPreviewTabChange:s,isSubmitting:a,onImport:A})=\u003e{const c=t?.package??null,l=c?.latest_pcb_preview_image_url,u=c?.latest_sch_preview_image_url,g=c?.latest_cad_preview_image_url,h=c?.unscoped_name?.split(\"/\").pop()??c?.unscoped_name,d=c?.org_owner_tscircuit_handle??void 0,p=d?`https://tscircuit.com/${d}`:void 0,m=d\u0026\u0026h?`https://tscircuit.com/${d}/${h}`:void 0;return K.jsx(KT,{open:e,onOpenChange:n,children:K.jsxs(VP,{showOverlay:!1,style:{width:\"calc(100vw - 2rem)\",zIndex:zpn.importComponentDetailsDialog},className:\"rf-max-w-5xl no-scrollbar !rf-overflow-y-auto rf-max-h-[90vh] rf-overflow-hidden rf-flex rf-flex-col rf-rounded-sm\",children:[K.jsx(zP,{className:\"rf-pb-4 rf-border-b\",children:K.jsx(\"div\",{className:\"rf-flex rf-items-start rf-justify-between rf-gap-4\",children:K.jsxs(\"div\",{className:\"rf-flex-1 rf-min-w-0\",children:[K.jsx(JP,{className:\"rf-text-xl rf-font-semibold rf-truncate\",children:h}),K.jsx(VT,{children:c?.description})]})})}),K.jsxs(\"div\",{className:\"rf-flex-1 rf-overflow-y-auto rf-py-4 rf-space-y-6\",children:[d?K.jsxs(\"div\",{children:[K.jsx(\"span\",{className:\"rf-text-xs rf-font-medium rf-text-gray-500 rf-uppercase rf-tracking-wide\",children:\"Created by\"}),K.jsx(\"div\",{className:\"rf-mt-1 rf-text-sm rf-font-medium\",children:p?K.jsx(\"a\",{href:p,target:\"_blank\",rel:\"noopener noreferrer\",className:\"rf-text-black hover:rf-underline\",children:d}):d})]}):null,(g||l||u)\u0026\u0026K.jsx(K.Fragment,{children:K.jsxs(\"div\",{children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-mb-4\",children:\"Preview\"}),K.jsxs(dRe,{value:r,onValueChange:_=\u003es(_),children:[K.jsxs(Jge,{className:\"rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400\",children:[l\u0026\u0026K.jsx(p6,{value:\"pcb\",children:\"PCB\"}),u\u0026\u0026K.jsx(p6,{value:\"schematic\",children:\"Schematic\"}),g\u0026\u0026K.jsx(p6,{value:\"3d\",children:\"3D\"})]}),K.jsxs(\"div\",{className:\"rf-mt-4\",children:[K.jsx(cI,{value:\"pcb\",className:\"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50\",children:l?K.jsx(\"img\",{src:l,alt:`${h??\"package\"} PCB preview`,className:\"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4\"}):null}),K.jsx(cI,{value:\"schematic\",className:\"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50\",children:u?K.jsx(\"img\",{src:u,alt:`${h??\"package\"} schematic preview`,className:\"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4\"}):null}),K.jsx(cI,{value:\"3d\",className:\"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50\",children:g?K.jsx(\"img\",{src:g,alt:`${h??\"package\"} 3D preview`,className:\"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4\"}):null})]})]})]})}),i?.ai_description?K.jsxs(\"section\",{children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-mb-3\",children:\"AI Description\"}),K.jsx(\"div\",{className:\"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4\",children:K.jsx(\"p\",{className:\"rf-text-sm rf-text-gray-700 rf-leading-relaxed\",children:i.ai_description})})]}):null,i?.ai_usage_instructions?K.jsxs(\"section\",{children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-mb-3\",children:\"Usage Instructions\"}),K.jsx(\"div\",{className:\"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4\",children:K.jsx(\"p\",{className:\"rf-text-sm rf-text-gray-700 rf-leading-relaxed rf-whitespace-pre-wrap\",children:i.ai_usage_instructions})})]}):null,o?K.jsxs(\"div\",{className:\"rf-flex rf-justify-center rf-items-center rf-gap-2 rf-text-gray-500\",children:[K.jsx(SE,{className:\"rf-h-4 rf-w-4 rf-animate-spin\"}),K.jsx(\"span\",{className:\"rf-text-sm\",children:\"Loading package details...\"})]}):null]}),K.jsxs(jU,{className:\"rf-pt-4 rf-border-t rf-flex rf-flex-col sm:rf-flex-row rf-justify-between rf-gap-2\",children:[K.jsx(\"div\",{className:\"rf-flex-1\",children:m?K.jsxs(fA,{variant:\"outline\",size:\"sm\",className:\"rf-gap-2 rf-w-full sm:rf-w-auto\",onClick:()=\u003ewindow.open(m,\"_blank\"),children:[K.jsx(hbi,{className:\"rf-h-4 rf-w-4\"}),\"View on tscircuit.com\"]}):null}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2\",children:[K.jsx(fA,{variant:\"outline\",onClick:()=\u003en(!1),className:\"rf-order-2 sm:rf-order-1\",children:\"Close\"}),K.jsx(fA,{onClick:A,disabled:a,className:\"rf-bg-blue-600 hover:rf-bg-blue-700\",children:a?K.jsx(SE,{className:\"rf-h-4 rf-w-4 rf-animate-spin\"}):\"Import Component\"})]})]})]})})},BUi=()=\u003e{const[t,e]=ee.useState(null),[n,o]=ee.useState(!1),i=ee.useCallback(async(s,a)=\u003e{o(!0);try{const A=await fetch(`https://api.tscircuit.com/packages/get?name=${encodeURIComponent(`${s}/${a}`)}`);if(!A.ok)throw new Error(`Failed to load package details: ${A.status}`);const c=await A.json();e(c.package??null)}catch(A){console.error(\"Failed to fetch package details\",A),e(null)}finally{o(!1)}},[]),r=ee.useCallback(()=\u003e{e(null),o(!1)},[]);return{details:t,isLoading:n,fetchDetails:i,reset:r}},bUi=(t,e)=\u003e{const[n,o]=ee.useState({circuitJson:null,error:null,isLoading:!1});return ee.useEffect(()=\u003e{if(!t||!Kpn(t)){o({circuitJson:null,error:null,isLoading:!1});return}let i=!1;return o({circuitJson:null,error:null,isLoading:!0}),hUi(t,e).then(r=\u003e{i||o({circuitJson:r,error:null,isLoading:!1})}).catch(r=\u003e{i||o({circuitJson:null,error:r instanceof Error?r.message:\"Failed to load footprint preview\",isLoading:!1})}),()=\u003e{i=!0}},[t,e]),n},SUi=async(t,e)=\u003e{const n={\"Content-Type\":\"application/json\"};e\u0026\u0026(n.Authorization=`Bearer ${e}`);const o=await fetch(\"https://registry-api.tscircuit.com/packages/search\",{method:\"POST\",headers:n,body:JSON.stringify({query:t})});if(!o.ok)throw new Error(`tscircuit registry error: ${o.status}`);return(await o.json()).packages??[]},QUi=({sessionToken:t})=\u003e{const[e,n]=ee.useState([]),[o,i]=ee.useState(!1),[r,s]=ee.useState(null),[a,A]=ee.useState(!1),c=ee.useCallback(async u=\u003e{const g=u.trim();if(!g)return[];i(!0),s(null);try{const d=(await SUi(g,t)).map(p=\u003e({source:\"tscircuit.com\",package:p}));return n(d),d}catch(h){return console.error(\"Error searching tscircuit packages\",h),n([]),s(h instanceof Error?h.message:\"Failed to search tscircuit packages\"),[]}finally{i(!1),A(!0)}},[t]),l=ee.useCallback(()=\u003e{n([]),i(!1),s(null),A(!1)},[]);return{results:e,isSearching:o,error:r,hasSearched:a,search:c,reset:l}},vUi=t=\u003e{const e=/^C(\\d+)$/i.exec(t.trim());if(!e)return null;const n=Number(e[1]);if(!Number.isSafeInteger(n))return null;const o=`C${e[1]}`;return{source:\"jlcpcb\",component:{lcscId:n,manufacturer:o,partNumber:o,description:\"Import directly from EasyEDA; stock and availability are unknown\",package:\"\",isDirectLookup:!0}}},Jpn=(t,e)=\u003e{const n=vUi(t);return n?e.some(i=\u003ei.component.partNumber.toUpperCase()===n.component.partNumber)?e:[n,...e]:e},wUi=t=\u003e{const e=t.trim();return/^C\\d+/i.test(e)?e.replace(/^C/i,\"\"):e},PUi=()=\u003e{const[t,e]=ee.useState([]),[n,o]=ee.useState(!1),[i,r]=ee.useState(null),[s,a]=ee.useState(!1),A=ee.useCallback(async l=\u003e{const u=wUi(l);if(!u)return[];o(!0),r(null);try{const g=await IYi(u,10),h=Jpn(l,g.map(d=\u003e({source:\"jlcpcb\",component:CYi(d)})));return e(h),h}catch(g){console.error(\"Error searching JLCPCB components\",g);const h=Jpn(l,[]);return e(h),r(h.length\u003e0?null:g instanceof Error?g.message:\"Failed to search JLCPCB components\"),h}finally{o(!1),a(!0)}},[]),c=ee.useCallback(()=\u003e{e([]),o(!1),r(null),a(!1)},[]);return{results:t,isSearching:n,error:i,hasSearched:s,search:A,reset:c}},MUi=()=\u003e{const[t,e]=ee.useState([]),[n,o]=ee.useState(!1),[i,r]=ee.useState(null),[s,a]=ee.useState(!1),A=ee.useCallback(async l=\u003e{const u=l.trim();if(!u)return[];o(!0),r(null);try{const h=(await lUi(u,20)).map(d=\u003e({source:\"kicad\",footprint:uUi(d)}));return e(h),h}catch(g){return console.error(\"Error searching KiCad footprints\",g),e([]),r(g instanceof Error?g.message:\"Failed to search KiCad footprints\"),[]}finally{o(!1),a(!0)}},[]),c=ee.useCallback(()=\u003e{e([]),o(!1),r(null),a(!1)},[]);return{results:t,isSearching:n,error:i,hasSearched:s,search:A,reset:c}},DUi=({onTscircuitPackageSelected:t,onJlcpcbComponentTsxLoaded:e,onKicadStringSelected:n})=\u003e{const o=[];return t\u0026\u0026o.push(\"tscircuit.com\"),e\u0026\u0026o.push(\"jlcpcb\"),n\u0026\u0026o.push(\"kicad\"),o},NUi=({isOpen:t,onClose:e,jlcpcbProxyRequestHeaders:n,onKicadStringSelected:o,onTscircuitPackageSelected:i,onJlcpcbComponentTsxLoaded:r,jlcpcbProxyApiBase:s,tscircuitSessionToken:a})=\u003e{mee();const A=ee.useMemo(()=\u003eDUi({onKicadStringSelected:o,onTscircuitPackageSelected:i,onJlcpcbComponentTsxLoaded:r}),[o,i,r]),c=A.length\u003e0,l=A.length===1,[u,g]=ee.useState(A[0]??\"tscircuit.com\"),[h,d]=ee.useState(\"\"),[p,m]=ee.useState(null),{results:_,isSearching:f,error:I,hasSearched:C,search:y,reset:x}=QUi({sessionToken:a}),{results:E,isSearching:B,error:S,hasSearched:Q,search:w,reset:M}=PUi(),{results:k,isSearching:R,error:F,hasSearched:O,search:U,reset:Y}=MUi(),{details:W,isLoading:te,fetchDetails:j,reset:J}=BUi(),[oe,ie]=ee.useState(null),[ne,le]=ee.useState(!1),[ge,_e]=ee.useState(\"pcb\"),[ue,fe]=ee.useState(null),[pe,ye]=ee.useState(!1),Me=ee.useMemo(()=\u003e({jlcpcb:{headers:n,apiBase:s}}),[s,n]),{circuitJson:ve,error:he,isLoading:Qe}=bUi(p,Me),Pe=Kpn(p);ee.useEffect(()=\u003e{fe(null)},[p]);const we=ee.useCallback(()=\u003e{x(),M(),Y(),m(null)},[M,Y,x]);ee.useEffect(()=\u003e{t||(we(),d(\"\"),le(!1),ie(null),fe(null))},[t,we]),ee.useEffect(()=\u003e{d(\"\"),m(null),u===\"tscircuit.com\"?x():u===\"jlcpcb\"?M():u===\"kicad\"\u0026\u0026Y()},[u,M,Y,x]);const Te=nt=\u003e{m(nt),ie(nt),_e(\"pcb\"),le(!0),J();const gt=nt.package.org_owner_tscircuit_handle,bt=nt.package.unscoped_name;if(gt\u0026\u0026bt){const Ct=bt.split(\"/\").pop()??bt;j(gt,Ct)}},Re=async()=\u003e{h.trim()\u0026\u0026(m(null),u===\"tscircuit.com\"?await y(h):u===\"jlcpcb\"?await w(h):u===\"kicad\"\u0026\u0026await U(h))},Ee=async nt=\u003e{try{if(fe(null),ye(!0),nt.source===\"kicad\"){if(!o)throw new Error(\"KiCad handler not provided\");await o({result:nt,footprint:nt.footprint.qualifiedName})}else if(nt.source===\"jlcpcb\"){if(!r)throw new Error(\"JLCPCB handler not provided\");const gt=await yYi(nt.component.partNumber,{headers:n,apiBase:s});await r({result:nt,tsx:gt})}else if(nt.source===\"tscircuit.com\"){if(!i)throw new Error(\"tscircuit package handler not provided\");const gt=nt.package.org_owner_tscircuit_handle,bt=nt.package.unscoped_name;if(!gt||!bt)throw new Error(\"Missing package metadata\");const Ct=bt.split(\"/\").pop()??bt,Dt=`@tsci/${gt}.${Ct}`;await i({result:nt,fullPackageName:Dt})}return!0}catch(gt){return console.error(\"Failed to import component\",gt),fe(gt instanceof Error?gt.message:\"Failed to import component\"),!1}finally{ye(!1)}};let ke=[],Ce=!1,Le=null,Ye=!1;u===\"tscircuit.com\"?(ke=_,Ce=f,Le=I,Ye=C):u===\"jlcpcb\"?(ke=E,Ce=B,Le=S,Ye=Q):u===\"kicad\"\u0026\u0026(ke=k,Ce=R,Le=F,Ye=O);const tt=async()=\u003e{if(!p)return;await Ee(p)\u0026\u0026(e(),we(),d(\"\"))},At=nt=\u003e{nt||e()},at=nt=\u003e{le(nt),nt||ie(null)};return K.jsxs(KT,{open:t,onOpenChange:At,children:[K.jsxs(VP,{style:{width:\"calc(100vw - 2rem)\",maxWidth:Pe?\"min(1120px, calc(100vw - 2rem))\":\"min(672px, calc(100vw - 2rem))\",zIndex:zpn.importComponentDialog},className:\"rf-rounded-sm rf-max-h-[90vh] rf-overflow-y-auto rf-overflow-x-hidden rf-flex rf-flex-col\",children:[K.jsxs(zP,{children:[K.jsxs(JP,{className:\"rf-text-lg sm:rf-text-xl\",children:[\"Import \",l?mfe[u].label:\"\",\" \",\"Component\"]}),K.jsx(VT,{className:\"rf-text-sm\",children:c?\"Search for components from available sources.\":\"Import options are disabled because no handlers were provided.\"})]}),c?K.jsxs(dRe,{value:u,onValueChange:nt=\u003eg(nt),className:\"rf-min-w-0 rf-w-full\",children:[!l\u0026\u0026K.jsx(Jge,{className:\"rf-flex rf-w-full rf-gap-2\",children:A.map(nt=\u003eK.jsx(p6,{value:nt,className:\"rf-flex-1 rf-text-xs sm:rf-text-sm\",children:mfe[nt].label},nt))}),K.jsxs(\"div\",{className:\"rf-min-w-0\",style:Pe?{display:\"grid\",gridTemplateColumns:\"minmax(0, 1fr) minmax(360px, 0.95fr)\",gap:\"1.5rem\",alignItems:\"start\"}:void 0,children:[K.jsxs(\"div\",{className:\"rf-min-w-0\",children:[K.jsx(pUi,{query:h,placeholder:mfe[u].placeholder,isSearching:Ce,onQueryChange:d,onSubmit:Re}),K.jsx(\"div\",{className:\"no-scrollbar rf-mt-4 rf-flex-1 rf-min-h-[200px] !rf-max-h-[40vh] !rf-overflow-y-auto rf-overflow-x-hidden rf-border rf-rounded-md rf-min-w-0\",children:Ce?K.jsxs(\"div\",{className:\"rf-p-8 rf-text-center rf-text-zinc-500\",children:[K.jsx(SE,{className:\"rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2\"}),K.jsx(\"p\",{children:\"Searching...\"})]}):ke.length\u003e0?K.jsx(yUi,{results:ke,selected:p,onSelect:m,onShowDetails:u===\"tscircuit.com\"?Te:void 0}):K.jsx(\"div\",{className:\"rf-p-8 rf-text-center rf-text-zinc-500\",children:Le?`Error: ${Le}`:Ye?mfe[u].emptyMessage:\"Enter a search term to find components\"})})]}),Pe?K.jsx(\"div\",{className:\"rf-mt-4\",children:K.jsx(xUi,{circuitJson:ve,error:he,isLoading:Qe,height:325})}):null]})]}):null,ue?K.jsx(\"div\",{className:\"rf-text-sm rf-text-red-600 rf-mt-2\",children:ue}):null,K.jsxs(jU,{className:\"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2\",children:[K.jsx(fA,{variant:\"outline\",onClick:e,className:\"rf-order-2 sm:rf-order-1\",children:\"Cancel\"}),K.jsx(fA,{onClick:tt,disabled:!p||pe,className:\"rf-order-1 sm:rf-order-2\",children:pe?K.jsx(SE,{className:\"rf-h-4 rf-w-4 rf-animate-spin\"}):\"Import\"})]})]}),K.jsx(EUi,{packageResult:oe,isOpen:ne,onOpenChange:at,isLoading:te,details:W,previewTab:ge,onPreviewTabChange:nt=\u003e_e(nt),isSubmitting:pe,onImport:()=\u003e{oe\u0026\u0026Ee(oe).then(nt=\u003e{nt\u0026\u0026(le(!1),e(),we(),d(\"\"))})}})]})},RUi=t=\u003e{const e=t.match(/export const (\\w+) =/);if(!e)throw new Error(\"Could not determine component name from TSX contents\");return e[1]},Wpn=t=\u003e{const e=md(s=\u003es.pushEvent),n=md(s=\u003es.upsertFile),o=async({result:s,fullPackageName:a})=\u003e{const c=s.package.unscoped_name??s.package.name;await ua.promise(e({event_type:\"INSTALL_PACKAGE\",full_package_name:a}),{loading:`Requesting install for \"${c}\"`,success:`Install requested for \"${c}\"`,error:l=\u003e`Failed to request install: ${l instanceof Error?l.message:String(l)}`})},i=async({footprint:s})=\u003e{await ua.promise(navigator.clipboard.writeText(s),{loading:`Copying \"${s}\"`,success:`Copied \"${s}\" to clipboard`,error:a=\u003e`Failed to copy footprint: ${a instanceof Error?a.message:String(a)}`})},r=async({result:s,tsx:a})=\u003e{const c=`imports/${RUi(a)}.tsx`;await ua.promise(n(c,a),{loading:`Importing ${s.component.partNumber}`,success:`Imported to \"${c}\"`,error:l=\u003e`Failed to import component: ${l instanceof Error?l.message:String(l)}`})};return K.jsx(NUi,{...t,onTscircuitPackageSelected:o,onKicadStringSelected:i,onJlcpcbComponentTsxLoaded:r})};Wpn.displayName=\"ImportComponentDialogForCli\";const TUi=async({circuitJson:t,projectName:e})=\u003e{const{convertCircuitJsonToAltiumZip:n}=await Promise.resolve().then(()=\u003eAdr),o=await n(t,e);return new Blob([new Uint8Array(o)],{type:\"application/zip\"})},kUi=async({circuitJson:t,projectName:e})=\u003e{await ua.promise((async()=\u003e{const n=await TUi({circuitJson:t,projectName:e});kE(n,{fileName:`${e}_altium_project.zip`})})(),{loading:\"Generating Altium project...\",success:\"Altium project ZIP ready\",error:n=\u003e`Failed to generate Altium project: ${n instanceof Error?n.message:String(n)}`})};var Aqe={exports:{}},jpn;function FUi(){return jpn||(jpn=1,(function(t,e){var n={env:{},version:\"\"};(function(o){t.exports=o()})(function(){return(function o(i,r,s){function a(l,u){if(!r[l]){if(!i[l]){var g=typeof U8==\"function\"\u0026\u0026U8;if(!u\u0026\u0026g)return g(l,!0);if(A)return A(l,!0);var h=new Error(\"Cannot find module '\"+l+\"'\");throw h.code=\"MODULE_NOT_FOUND\",h}var d=r[l]={exports:{}};i[l][0].call(d.exports,function(p){var m=i[l][1][p];return a(m||p)},d,d.exports,o,i,r,s)}return r[l].exports}for(var A=typeof U8==\"function\"\u0026\u0026U8,c=0;c\u003cs.length;c++)a(s[c]);return a})({1:[function(o,i,r){var s=o(\"./utils\"),a=o(\"./support\"),A=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";r.encode=function(c){for(var l,u,g,h,d,p,m,_=[],f=0,I=c.length,C=I,y=s.getTypeOf(c)!==\"string\";f\u003cc.length;)C=I-f,g=y?(l=c[f++],u=f\u003cI?c[f++]:0,f\u003cI?c[f++]:0):(l=c.charCodeAt(f++),u=f\u003cI?c.charCodeAt(f++):0,f\u003cI?c.charCodeAt(f++):0),h=l\u003e\u003e2,d=(3\u0026l)\u003c\u003c4|u\u003e\u003e4,p=1\u003cC?(15\u0026u)\u003c\u003c2|g\u003e\u003e6:64,m=2\u003cC?63\u0026g:64,_.push(A.charAt(h)+A.charAt(d)+A.charAt(p)+A.charAt(m));return _.join(\"\")},r.decode=function(c){var l,u,g,h,d,p,m=0,_=0,f=\"data:\";if(c.substr(0,f.length)===f)throw new Error(\"Invalid base64 input, it looks like a data url.\");var I,C=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,\"\")).length/4;if(c.charAt(c.length-1)===A.charAt(64)\u0026\u0026C--,c.charAt(c.length-2)===A.charAt(64)\u0026\u0026C--,C%1!=0)throw new Error(\"Invalid base64 input, bad content length.\");for(I=a.uint8array?new Uint8Array(0|C):new Array(0|C);m\u003cc.length;)l=A.indexOf(c.charAt(m++))\u003c\u003c2|(h=A.indexOf(c.charAt(m++)))\u003e\u003e4,u=(15\u0026h)\u003c\u003c4|(d=A.indexOf(c.charAt(m++)))\u003e\u003e2,g=(3\u0026d)\u003c\u003c6|(p=A.indexOf(c.charAt(m++))),I[_++]=l,d!==64\u0026\u0026(I[_++]=u),p!==64\u0026\u0026(I[_++]=g);return I}},{\"./support\":30,\"./utils\":32}],2:[function(o,i,r){var s=o(\"./external\"),a=o(\"./stream/DataWorker\"),A=o(\"./stream/Crc32Probe\"),c=o(\"./stream/DataLengthProbe\");function l(u,g,h,d,p){this.compressedSize=u,this.uncompressedSize=g,this.crc32=h,this.compression=d,this.compressedContent=p}l.prototype={getContentWorker:function(){var u=new a(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c(\"data_length\")),g=this;return u.on(\"end\",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error(\"Bug : uncompressed data size mismatch\")}),u},getCompressedWorker:function(){return new a(s.Promise.resolve(this.compressedContent)).withStreamInfo(\"compressedSize\",this.compressedSize).withStreamInfo(\"uncompressedSize\",this.uncompressedSize).withStreamInfo(\"crc32\",this.crc32).withStreamInfo(\"compression\",this.compression)}},l.createWorkerFrom=function(u,g,h){return u.pipe(new A).pipe(new c(\"uncompressedSize\")).pipe(g.compressWorker(h)).pipe(new c(\"compressedSize\")).withStreamInfo(\"compression\",g)},i.exports=l},{\"./external\":6,\"./stream/Crc32Probe\":25,\"./stream/DataLengthProbe\":26,\"./stream/DataWorker\":27}],3:[function(o,i,r){var s=o(\"./stream/GenericWorker\");r.STORE={magic:\"\\0\\0\",compressWorker:function(){return new s(\"STORE compression\")},uncompressWorker:function(){return new s(\"STORE decompression\")}},r.DEFLATE=o(\"./flate\")},{\"./flate\":7,\"./stream/GenericWorker\":28}],4:[function(o,i,r){var s=o(\"./utils\"),a=(function(){for(var A,c=[],l=0;l\u003c256;l++){A=l;for(var u=0;u\u003c8;u++)A=1\u0026A?3988292384^A\u003e\u003e\u003e1:A\u003e\u003e\u003e1;c[l]=A}return c})();i.exports=function(A,c){return A!==void 0\u0026\u0026A.length?s.getTypeOf(A)!==\"string\"?(function(l,u,g,h){var d=a,p=h+g;l^=-1;for(var m=h;m\u003cp;m++)l=l\u003e\u003e\u003e8^d[255\u0026(l^u[m])];return-1^l})(0|c,A,A.length,0):(function(l,u,g,h){var d=a,p=h+g;l^=-1;for(var m=h;m\u003cp;m++)l=l\u003e\u003e\u003e8^d[255\u0026(l^u.charCodeAt(m))];return-1^l})(0|c,A,A.length,0):0}},{\"./utils\":32}],5:[function(o,i,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(o,i,r){var s=null;s=typeof Promise\u003c\"u\"?Promise:o(\"lie\"),i.exports={Promise:s}},{lie:37}],7:[function(o,i,r){var s=typeof Uint8Array\u003c\"u\"\u0026\u0026typeof Uint16Array\u003c\"u\"\u0026\u0026typeof Uint32Array\u003c\"u\",a=o(\"pako\"),A=o(\"./utils\"),c=o(\"./stream/GenericWorker\"),l=s?\"uint8array\":\"array\";function u(g,h){c.call(this,\"FlateWorker/\"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=h,this.meta={}}r.magic=\"\\b\\0\",A.inherits(u,c),u.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null\u0026\u0026this._createPako(),this._pako.push(A.transformTo(l,g.data),!1)},u.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null\u0026\u0026this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(h){g.push({data:h,meta:g.meta})}},r.compressWorker=function(g){return new u(\"Deflate\",g)},r.uncompressWorker=function(){return new u(\"Inflate\",{})}},{\"./stream/GenericWorker\":28,\"./utils\":32,pako:38}],8:[function(o,i,r){function s(d,p){var m,_=\"\";for(m=0;m\u003cp;m++)_+=String.fromCharCode(255\u0026d),d\u003e\u003e\u003e=8;return _}function a(d,p,m,_,f,I){var C,y,x=d.file,E=d.compression,B=I!==l.utf8encode,S=A.transformTo(\"string\",I(x.name)),Q=A.transformTo(\"string\",l.utf8encode(x.name)),w=x.comment,M=A.transformTo(\"string\",I(w)),k=A.transformTo(\"string\",l.utf8encode(w)),R=Q.length!==x.name.length,F=k.length!==w.length,O=\"\",U=\"\",Y=\"\",W=x.dir,te=x.date,j={crc32:0,compressedSize:0,uncompressedSize:0};p\u0026\u0026!m||(j.crc32=d.crc32,j.compressedSize=d.compressedSize,j.uncompressedSize=d.uncompressedSize);var J=0;p\u0026\u0026(J|=8),B||!R\u0026\u0026!F||(J|=2048);var oe=0,ie=0;W\u0026\u0026(oe|=16),f===\"UNIX\"?(ie=798,oe|=(function(le,ge){var _e=le;return le||(_e=ge?16893:33204),(65535\u0026_e)\u003c\u003c16})(x.unixPermissions,W)):(ie=20,oe|=(function(le){return 63\u0026(le||0)})(x.dosPermissions)),C=te.getUTCHours(),C\u003c\u003c=6,C|=te.getUTCMinutes(),C\u003c\u003c=5,C|=te.getUTCSeconds()/2,y=te.getUTCFullYear()-1980,y\u003c\u003c=4,y|=te.getUTCMonth()+1,y\u003c\u003c=5,y|=te.getUTCDate(),R\u0026\u0026(U=s(1,1)+s(u(S),4)+Q,O+=\"up\"+s(U.length,2)+U),F\u0026\u0026(Y=s(1,1)+s(u(M),4)+k,O+=\"uc\"+s(Y.length,2)+Y);var ne=\"\";return ne+=`\n\\0`,ne+=s(J,2),ne+=E.magic,ne+=s(C,2),ne+=s(y,2),ne+=s(j.crc32,4),ne+=s(j.compressedSize,4),ne+=s(j.uncompressedSize,4),ne+=s(S.length,2),ne+=s(O.length,2),{fileRecord:g.LOCAL_FILE_HEADER+ne+S+O,dirRecord:g.CENTRAL_FILE_HEADER+s(ie,2)+ne+s(M.length,2)+\"\\0\\0\\0\\0\"+s(oe,4)+s(_,4)+S+O+M}}var A=o(\"../utils\"),c=o(\"../stream/GenericWorker\"),l=o(\"../utf8\"),u=o(\"../crc32\"),g=o(\"../signature\");function h(d,p,m,_){c.call(this,\"ZipFileWorker\"),this.bytesWritten=0,this.zipComment=p,this.zipPlatform=m,this.encodeFileName=_,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}A.inherits(h,c),h.prototype.push=function(d){var p=d.meta.percent||0,m=this.entriesCount,_=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,c.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:m?(p+100*(m-_-1))/m:100}}))},h.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var p=this.streamFiles\u0026\u0026!d.file.dir;if(p){var m=a(d,p,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:m.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(d){this.accumulate=!1;var p=this.streamFiles\u0026\u0026!d.file.dir,m=a(d,p,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(m.dirRecord),p)this.push({data:(function(_){return g.DATA_DESCRIPTOR+s(_.crc32,4)+s(_.compressedSize,4)+s(_.uncompressedSize,4)})(d),meta:{percent:100}});else for(this.push({data:m.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var d=this.bytesWritten,p=0;p\u003cthis.dirRecords.length;p++)this.push({data:this.dirRecords[p],meta:{percent:100}});var m=this.bytesWritten-d,_=(function(f,I,C,y,x){var E=A.transformTo(\"string\",x(y));return g.CENTRAL_DIRECTORY_END+\"\\0\\0\\0\\0\"+s(f,2)+s(f,2)+s(I,4)+s(C,4)+s(E.length,2)+E})(this.dirRecords.length,m,d,this.zipComment,this.encodeFileName);this.push({data:_,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(d){this._sources.push(d);var p=this;return d.on(\"data\",function(m){p.processChunk(m)}),d.on(\"end\",function(){p.closedSource(p.previous.streamInfo),p._sources.length?p.prepareNextSource():p.end()}),d.on(\"error\",function(m){p.error(m)}),this},h.prototype.resume=function(){return!!c.prototype.resume.call(this)\u0026\u0026(!this.previous\u0026\u0026this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(d){var p=this._sources;if(!c.prototype.error.call(this,d))return!1;for(var m=0;m\u003cp.length;m++)try{p[m].error(d)}catch{}return!0},h.prototype.lock=function(){c.prototype.lock.call(this);for(var d=this._sources,p=0;p\u003cd.length;p++)d[p].lock()},i.exports=h},{\"../crc32\":4,\"../signature\":23,\"../stream/GenericWorker\":28,\"../utf8\":31,\"../utils\":32}],9:[function(o,i,r){var s=o(\"../compressions\"),a=o(\"./ZipFileWorker\");r.generateWorker=function(A,c,l){var u=new a(c.streamFiles,l,c.platform,c.encodeFileName),g=0;try{A.forEach(function(h,d){g++;var p=(function(I,C){var y=I||C,x=s[y];if(!x)throw new Error(y+\" is not a valid compression method !\");return x})(d.options.compression,c.compression),m=d.options.compressionOptions||c.compressionOptions||{},_=d.dir,f=d.date;d._compressWorker(p,m).withStreamInfo(\"file\",{name:h,dir:_,date:f,comment:d.comment||\"\",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(u)}),u.entriesCount=g}catch(h){u.error(h)}return u}},{\"../compressions\":3,\"./ZipFileWorker\":8}],10:[function(o,i,r){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error(\"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.\");this.files=Object.create(null),this.comment=null,this.root=\"\",this.clone=function(){var a=new s;for(var A in this)typeof this[A]!=\"function\"\u0026\u0026(a[A]=this[A]);return a}}(s.prototype=o(\"./object\")).loadAsync=o(\"./load\"),s.support=o(\"./support\"),s.defaults=o(\"./defaults\"),s.version=\"3.10.2\",s.loadAsync=function(a,A){return new s().loadAsync(a,A)},s.external=o(\"./external\"),i.exports=s},{\"./defaults\":5,\"./external\":6,\"./load\":11,\"./object\":15,\"./support\":30}],11:[function(o,i,r){var s=o(\"./utils\"),a=o(\"./external\"),A=o(\"./utf8\"),c=o(\"./zipEntries\"),l=o(\"./stream/Crc32Probe\"),u=o(\"./nodejsUtils\");function g(h){return new a.Promise(function(d,p){var m=h.decompressed.getContentWorker().pipe(new l);m.on(\"error\",function(_){p(_)}).on(\"end\",function(){m.streamInfo.crc32!==h.decompressed.crc32?p(new Error(\"Corrupted zip : CRC32 mismatch\")):d()}).resume()})}i.exports=function(h,d){var p=this;return d=s.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:A.utf8decode}),u.isNode\u0026\u0026u.isStream(h)?a.Promise.reject(new Error(\"JSZip can't accept a stream when loading a zip file.\")):s.prepareContent(\"the loaded zip file\",h,!0,d.optimizedBinaryString,d.base64).then(function(m){var _=new c(d);return _.load(m),_}).then(function(m){var _=[a.Promise.resolve(m)],f=m.files;if(d.checkCRC32)for(var I=0;I\u003cf.length;I++)_.push(g(f[I]));return a.Promise.all(_)}).then(function(m){for(var _=m.shift(),f=_.files,I=0;I\u003cf.length;I++){var C=f[I],y=C.fileNameStr,x=s.resolve(C.fileNameStr);p.file(x,C.decompressed,{binary:!0,optimizedBinaryString:!0,date:C.date,dir:C.dir,comment:C.fileCommentStr.length?C.fileCommentStr:null,unixPermissions:C.unixPermissions,dosPermissions:C.dosPermissions,createFolders:d.createFolders}),C.dir||(p.file(x).unsafeOriginalName=y)}return _.zipComment.length\u0026\u0026(p.comment=_.zipComment),p})}},{\"./external\":6,\"./nodejsUtils\":14,\"./stream/Crc32Probe\":25,\"./utf8\":31,\"./utils\":32,\"./zipEntries\":33}],12:[function(o,i,r){var s=o(\"../utils\"),a=o(\"../stream/GenericWorker\");function A(c,l){a.call(this,\"Nodejs stream input adapter for \"+c),this._upstreamEnded=!1,this._bindStream(l)}s.inherits(A,a),A.prototype._bindStream=function(c){var l=this;(this._stream=c).pause(),c.on(\"data\",function(u){l.push({data:u,meta:{percent:0}})}).on(\"error\",function(u){l.isPaused?this.generatedError=u:l.error(u)}).on(\"end\",function(){l.isPaused?l._upstreamEnded=!0:l.end()})},A.prototype.pause=function(){return!!a.prototype.pause.call(this)\u0026\u0026(this._stream.pause(),!0)},A.prototype.resume=function(){return!!a.prototype.resume.call(this)\u0026\u0026(this._upstreamEnded?this.end():this._stream.resume(),!0)},i.exports=A},{\"../stream/GenericWorker\":28,\"../utils\":32}],13:[function(o,i,r){var s=o(\"readable-stream\").Readable;function a(A,c,l){s.call(this,c),this._helper=A;var u=this;A.on(\"data\",function(g,h){u.push(g)||u._helper.pause(),l\u0026\u0026l(h)}).on(\"error\",function(g){u.emit(\"error\",g)}).on(\"end\",function(){u.push(null)})}o(\"../utils\").inherits(a,s),a.prototype._read=function(){this._helper.resume()},i.exports=a},{\"../utils\":32,\"readable-stream\":16}],14:[function(o,i,r){i.exports={isNode:typeof Buffer\u003c\"u\",newBufferFrom:function(s,a){if(Buffer.from\u0026\u0026Buffer.from!==Uint8Array.from)return Buffer.from(s,a);if(typeof s==\"number\")throw new Error('The \"data\" argument must not be a number');return new Buffer(s,a)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var a=new Buffer(s);return a.fill(0),a},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s\u0026\u0026typeof s.on==\"function\"\u0026\u0026typeof s.pause==\"function\"\u0026\u0026typeof s.resume==\"function\"}}},{}],15:[function(o,i,r){function s(x,E,B){var S,Q=A.getTypeOf(E),w=A.extend(B||{},u);w.date=w.date||new Date,w.compression!==null\u0026\u0026(w.compression=w.compression.toUpperCase()),typeof w.unixPermissions==\"string\"\u0026\u0026(w.unixPermissions=parseInt(w.unixPermissions,8)),w.unixPermissions\u0026\u002616384\u0026w.unixPermissions\u0026\u0026(w.dir=!0),w.dosPermissions\u0026\u002616\u0026w.dosPermissions\u0026\u0026(w.dir=!0),w.dir\u0026\u0026(x=f(x)),w.createFolders\u0026\u0026(S=_(x))\u0026\u0026I.call(this,S,!0);var M=Q===\"string\"\u0026\u0026w.binary===!1\u0026\u0026w.base64===!1;B\u0026\u0026B.binary!==void 0||(w.binary=!M),(E instanceof g\u0026\u0026E.uncompressedSize===0||w.dir||!E||E.length===0)\u0026\u0026(w.base64=!1,w.binary=!0,E=\"\",w.compression=\"STORE\",Q=\"string\");var k=null;k=E instanceof g||E instanceof c?E:p.isNode\u0026\u0026p.isStream(E)?new m(x,E):A.prepareContent(x,E,w.binary,w.optimizedBinaryString,w.base64);var R=new h(x,k,w);this.files[x]=R}var a=o(\"./utf8\"),A=o(\"./utils\"),c=o(\"./stream/GenericWorker\"),l=o(\"./stream/StreamHelper\"),u=o(\"./defaults\"),g=o(\"./compressedObject\"),h=o(\"./zipObject\"),d=o(\"./generate\"),p=o(\"./nodejsUtils\"),m=o(\"./nodejs/NodejsStreamInputAdapter\"),_=function(x){x.slice(-1)===\"/\"\u0026\u0026(x=x.substring(0,x.length-1));var E=x.lastIndexOf(\"/\");return 0\u003cE?x.substring(0,E):\"\"},f=function(x){return x.slice(-1)!==\"/\"\u0026\u0026(x+=\"/\"),x},I=function(x,E){return E=E!==void 0?E:u.createFolders,x=f(x),this.files[x]||s.call(this,x,null,{dir:!0,createFolders:E}),this.files[x]};function C(x){return Object.prototype.toString.call(x)===\"[object RegExp]\"}var y={load:function(){throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\")},forEach:function(x){var E,B,S;for(E in this.files)S=this.files[E],(B=E.slice(this.root.length,E.length))\u0026\u0026E.slice(0,this.root.length)===this.root\u0026\u0026x(B,S)},filter:function(x){var E=[];return this.forEach(function(B,S){x(B,S)\u0026\u0026E.push(S)}),E},file:function(x,E,B){if(arguments.length!==1)return x=this.root+x,s.call(this,x,E,B),this;if(C(x)){var S=x;return this.filter(function(w,M){return!M.dir\u0026\u0026S.test(w)})}var Q=this.files[this.root+x];return Q\u0026\u0026!Q.dir?Q:null},folder:function(x){if(!x)return this;if(C(x))return this.filter(function(Q,w){return w.dir\u0026\u0026x.test(Q)});var E=this.root+x,B=I.call(this,E),S=this.clone();return S.root=B.name,S},remove:function(x){x=this.root+x;var E=this.files[x];if(E||(x.slice(-1)!==\"/\"\u0026\u0026(x+=\"/\"),E=this.files[x]),E\u0026\u0026!E.dir)delete this.files[x];else for(var B=this.filter(function(Q,w){return w.name.slice(0,x.length)===x}),S=0;S\u003cB.length;S++)delete this.files[B[S].name];return this},generate:function(){throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\")},generateInternalStream:function(x){var E,B={};try{if((B=A.extend(x||{},{streamFiles:!1,compression:\"STORE\",compressionOptions:null,type:\"\",platform:\"DOS\",comment:null,mimeType:\"application/zip\",encodeFileName:a.utf8encode})).type=B.type.toLowerCase(),B.compression=B.compression.toUpperCase(),B.type===\"binarystring\"\u0026\u0026(B.type=\"string\"),!B.type)throw new Error(\"No output type specified.\");A.checkSupport(B.type),B.platform!==\"darwin\"\u0026\u0026B.platform!==\"freebsd\"\u0026\u0026B.platform!==\"linux\"\u0026\u0026B.platform!==\"sunos\"||(B.platform=\"UNIX\"),B.platform===\"win32\"\u0026\u0026(B.platform=\"DOS\");var S=B.comment||this.comment||\"\";E=d.generateWorker(this,B,S)}catch(Q){(E=new c(\"error\")).error(Q)}return new l(E,B.type||\"string\",B.mimeType)},generateAsync:function(x,E){return this.generateInternalStream(x).accumulate(E)},generateNodeStream:function(x,E){return(x=x||{}).type||(x.type=\"nodebuffer\"),this.generateInternalStream(x).toNodejsStream(E)}};i.exports=y},{\"./compressedObject\":2,\"./defaults\":5,\"./generate\":9,\"./nodejs/NodejsStreamInputAdapter\":12,\"./nodejsUtils\":14,\"./stream/GenericWorker\":28,\"./stream/StreamHelper\":29,\"./utf8\":31,\"./utils\":32,\"./zipObject\":35}],16:[function(o,i,r){i.exports=o(\"stream\")},{stream:void 0}],17:[function(o,i,r){var s=o(\"./DataReader\");function a(A){s.call(this,A);for(var c=0;c\u003cthis.data.length;c++)A[c]=255\u0026A[c]}o(\"../utils\").inherits(a,s),a.prototype.byteAt=function(A){return this.data[this.zero+A]},a.prototype.lastIndexOfSignature=function(A){for(var c=A.charCodeAt(0),l=A.charCodeAt(1),u=A.charCodeAt(2),g=A.charCodeAt(3),h=this.length-4;0\u003c=h;--h)if(this.data[h]===c\u0026\u0026this.data[h+1]===l\u0026\u0026this.data[h+2]===u\u0026\u0026this.data[h+3]===g)return h-this.zero;return-1},a.prototype.readAndCheckSignature=function(A){var c=A.charCodeAt(0),l=A.charCodeAt(1),u=A.charCodeAt(2),g=A.charCodeAt(3),h=this.readData(4);return c===h[0]\u0026\u0026l===h[1]\u0026\u0026u===h[2]\u0026\u0026g===h[3]},a.prototype.readData=function(A){if(this.checkOffset(A),A===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{\"../utils\":32,\"./DataReader\":18}],18:[function(o,i,r){var s=o(\"../utils\");function a(A){this.data=A,this.length=A.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(A){this.checkIndex(this.index+A)},checkIndex:function(A){if(this.length\u003cthis.zero+A||A\u003c0)throw new Error(\"End of data reached (data length = \"+this.length+\", asked index = \"+A+\"). Corrupted zip ?\")},setIndex:function(A){this.checkIndex(A),this.index=A},skip:function(A){this.setIndex(this.index+A)},byteAt:function(){},readInt:function(A){var c,l=0;for(this.checkOffset(A),c=this.index+A-1;c\u003e=this.index;c--)l=(l\u003c\u003c8)+this.byteAt(c);return this.index+=A,l},readString:function(A){return s.transformTo(\"string\",this.readData(A))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var A=this.readInt(4);return new Date(Date.UTC(1980+(A\u003e\u003e25\u0026127),(A\u003e\u003e21\u002615)-1,A\u003e\u003e16\u002631,A\u003e\u003e11\u002631,A\u003e\u003e5\u002663,(31\u0026A)\u003c\u003c1))}},i.exports=a},{\"../utils\":32}],19:[function(o,i,r){var s=o(\"./Uint8ArrayReader\");function a(A){s.call(this,A)}o(\"../utils\").inherits(a,s),a.prototype.readData=function(A){this.checkOffset(A);var c=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{\"../utils\":32,\"./Uint8ArrayReader\":21}],20:[function(o,i,r){var s=o(\"./DataReader\");function a(A){s.call(this,A)}o(\"../utils\").inherits(a,s),a.prototype.byteAt=function(A){return this.data.charCodeAt(this.zero+A)},a.prototype.lastIndexOfSignature=function(A){return this.data.lastIndexOf(A)-this.zero},a.prototype.readAndCheckSignature=function(A){return A===this.readData(4)},a.prototype.readData=function(A){this.checkOffset(A);var c=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{\"../utils\":32,\"./DataReader\":18}],21:[function(o,i,r){var s=o(\"./ArrayReader\");function a(A){s.call(this,A)}o(\"../utils\").inherits(a,s),a.prototype.readData=function(A){if(this.checkOffset(A),A===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+A);return this.index+=A,c},i.exports=a},{\"../utils\":32,\"./ArrayReader\":17}],22:[function(o,i,r){var s=o(\"../utils\"),a=o(\"../support\"),A=o(\"./ArrayReader\"),c=o(\"./StringReader\"),l=o(\"./NodeBufferReader\"),u=o(\"./Uint8ArrayReader\");i.exports=function(g){var h=s.getTypeOf(g);return s.checkSupport(h),h!==\"string\"||a.uint8array?h===\"nodebuffer\"?new l(g):a.uint8array?new u(s.transformTo(\"uint8array\",g)):new A(s.transformTo(\"array\",g)):new c(g)}},{\"../support\":30,\"../utils\":32,\"./ArrayReader\":17,\"./NodeBufferReader\":19,\"./StringReader\":20,\"./Uint8ArrayReader\":21}],23:[function(o,i,r){r.LOCAL_FILE_HEADER=\"PK\u0003\u0004\",r.CENTRAL_FILE_HEADER=\"PK\u0001\u0002\",r.CENTRAL_DIRECTORY_END=\"PK\u0005\u0006\",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR=\"PK\u0006\\x07\",r.ZIP64_CENTRAL_DIRECTORY_END=\"PK\u0006\u0006\",r.DATA_DESCRIPTOR=\"PK\\x07\\b\"},{}],24:[function(o,i,r){var s=o(\"./GenericWorker\"),a=o(\"../utils\");function A(c){s.call(this,\"ConvertWorker to \"+c),this.destType=c}a.inherits(A,s),A.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},i.exports=A},{\"../utils\":32,\"./GenericWorker\":28}],25:[function(o,i,r){var s=o(\"./GenericWorker\"),a=o(\"../crc32\");function A(){s.call(this,\"Crc32Probe\"),this.withStreamInfo(\"crc32\",0)}o(\"../utils\").inherits(A,s),A.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},i.exports=A},{\"../crc32\":4,\"../utils\":32,\"./GenericWorker\":28}],26:[function(o,i,r){var s=o(\"../utils\"),a=o(\"./GenericWorker\");function A(c){a.call(this,\"DataLengthProbe for \"+c),this.propName=c,this.withStreamInfo(c,0)}s.inherits(A,a),A.prototype.processChunk=function(c){if(c){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+c.data.length}a.prototype.processChunk.call(this,c)},i.exports=A},{\"../utils\":32,\"./GenericWorker\":28}],27:[function(o,i,r){var s=o(\"../utils\"),a=o(\"./GenericWorker\");function A(c){a.call(this,\"DataWorker\");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=\"\",this._tickScheduled=!1,c.then(function(u){l.dataIsReady=!0,l.data=u,l.max=u\u0026\u0026u.length||0,l.type=s.getTypeOf(u),l.isPaused||l._tickAndRepeat()},function(u){l.error(u)})}s.inherits(A,a),A.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},A.prototype.resume=function(){return!!a.prototype.resume.call(this)\u0026\u0026(!this._tickScheduled\u0026\u0026this.dataIsReady\u0026\u0026(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},A.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},A.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,l=Math.min(this.max,this.index+16384);if(this.index\u003e=this.max)return this.end();switch(this.type){case\"string\":c=this.data.substring(this.index,l);break;case\"uint8array\":c=this.data.subarray(this.index,l);break;case\"array\":case\"nodebuffer\":c=this.data.slice(this.index,l)}return this.index=l,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=A},{\"../utils\":32,\"./GenericWorker\":28}],28:[function(o,i,r){function s(a){this.name=a||\"default\",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(a){this.emit(\"data\",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(\"end\"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit(\"error\",a)}return!0},error:function(a){return!this.isFinished\u0026\u0026(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit(\"error\",a),this.previous\u0026\u0026this.previous.error(a),this.cleanUp()),!0)},on:function(a,A){return this._listeners[a].push(A),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,A){if(this._listeners[a])for(var c=0;c\u003cthis._listeners[a].length;c++)this._listeners[a][c].call(this,A)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error(\"The stream '\"+this+\"' has already been used.\");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var A=this;return a.on(\"data\",function(c){A.processChunk(c)}),a.on(\"end\",function(){A.end()}),a.on(\"error\",function(c){A.error(c)}),this},pause:function(){return!this.isPaused\u0026\u0026!this.isFinished\u0026\u0026(this.isPaused=!0,this.previous\u0026\u0026this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError\u0026\u0026(this.error(this.generatedError),a=!0),this.previous\u0026\u0026this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,A){return this.extraStreamInfo[a]=A,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)\u0026\u0026(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error(\"The stream '\"+this+\"' has already been used.\");this.isLocked=!0,this.previous\u0026\u0026this.previous.lock()},toString:function(){var a=\"Worker \"+this.name;return this.previous?this.previous+\" -\u003e \"+a:a}},i.exports=s},{}],29:[function(o,i,r){var s=o(\"../utils\"),a=o(\"./ConvertWorker\"),A=o(\"./GenericWorker\"),c=o(\"../base64\"),l=o(\"../support\"),u=o(\"../external\"),g=null;if(l.nodestream)try{g=o(\"../nodejs/NodejsStreamOutputAdapter\")}catch{}function h(p,m){return new u.Promise(function(_,f){var I=[],C=p._internalType,y=p._outputType,x=p._mimeType;p.on(\"data\",function(E,B){I.push(E),m\u0026\u0026m(B)}).on(\"error\",function(E){I=[],f(E)}).on(\"end\",function(){try{var E=(function(B,S,Q){switch(B){case\"blob\":return s.newBlob(s.transformTo(\"arraybuffer\",S),Q);case\"base64\":return c.encode(S);default:return s.transformTo(B,S)}})(y,(function(B,S){var Q,w=0,M=null,k=0;for(Q=0;Q\u003cS.length;Q++)k+=S[Q].length;switch(B){case\"string\":return S.join(\"\");case\"array\":return Array.prototype.concat.apply([],S);case\"uint8array\":for(M=new Uint8Array(k),Q=0;Q\u003cS.length;Q++)M.set(S[Q],w),w+=S[Q].length;return M;case\"nodebuffer\":return Buffer.concat(S);default:throw new Error(\"concat : unsupported type '\"+B+\"'\")}})(C,I),x);_(E)}catch(B){f(B)}I=[]}).resume()})}function d(p,m,_){var f=m;switch(m){case\"blob\":case\"arraybuffer\":f=\"uint8array\";break;case\"base64\":f=\"string\"}try{this._internalType=f,this._outputType=m,this._mimeType=_,s.checkSupport(f),this._worker=p.pipe(new a(f)),p.lock()}catch(I){this._worker=new A(\"error\"),this._worker.error(I)}}d.prototype={accumulate:function(p){return h(this,p)},on:function(p,m){var _=this;return p===\"data\"?this._worker.on(p,function(f){m.call(_,f.data,f.meta)}):this._worker.on(p,function(){s.delay(m,arguments,_)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(p){if(s.checkSupport(\"nodestream\"),this._outputType!==\"nodebuffer\")throw new Error(this._outputType+\" is not supported by this method\");return new g(this,{objectMode:this._outputType!==\"nodebuffer\"},p)}},i.exports=d},{\"../base64\":1,\"../external\":6,\"../nodejs/NodejsStreamOutputAdapter\":13,\"../support\":30,\"../utils\":32,\"./ConvertWorker\":24,\"./GenericWorker\":28}],30:[function(o,i,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer\u003c\"u\"\u0026\u0026typeof Uint8Array\u003c\"u\",r.nodebuffer=typeof Buffer\u003c\"u\",r.uint8array=typeof Uint8Array\u003c\"u\",typeof ArrayBuffer\u003e\"u\")r.blob=!1;else{var s=new ArrayBuffer(0);try{r.blob=new Blob([s],{type:\"application/zip\"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(s),r.blob=a.getBlob(\"application/zip\").size===0}catch{r.blob=!1}}}try{r.nodestream=!!o(\"readable-stream\").Readable}catch{r.nodestream=!1}},{\"readable-stream\":16}],31:[function(o,i,r){for(var s=o(\"./utils\"),a=o(\"./support\"),A=o(\"./nodejsUtils\"),c=o(\"./stream/GenericWorker\"),l=new Array(256),u=0;u\u003c256;u++)l[u]=252\u003c=u?6:248\u003c=u?5:240\u003c=u?4:224\u003c=u?3:192\u003c=u?2:1;l[254]=l[254]=1;function g(){c.call(this,\"utf-8 decode\"),this.leftOver=null}function h(){c.call(this,\"utf-8 encode\")}r.utf8encode=function(d){return a.nodebuffer?A.newBufferFrom(d,\"utf-8\"):(function(p){var m,_,f,I,C,y=p.length,x=0;for(I=0;I\u003cy;I++)(64512\u0026(_=p.charCodeAt(I)))==55296\u0026\u0026I+1\u003cy\u0026\u0026(64512\u0026(f=p.charCodeAt(I+1)))==56320\u0026\u0026(_=65536+(_-55296\u003c\u003c10)+(f-56320),I++),x+=_\u003c128?1:_\u003c2048?2:_\u003c65536?3:4;for(m=a.uint8array?new Uint8Array(x):new Array(x),I=C=0;C\u003cx;I++)(64512\u0026(_=p.charCodeAt(I)))==55296\u0026\u0026I+1\u003cy\u0026\u0026(64512\u0026(f=p.charCodeAt(I+1)))==56320\u0026\u0026(_=65536+(_-55296\u003c\u003c10)+(f-56320),I++),_\u003c128?m[C++]=_:(_\u003c2048?m[C++]=192|_\u003e\u003e\u003e6:(_\u003c65536?m[C++]=224|_\u003e\u003e\u003e12:(m[C++]=240|_\u003e\u003e\u003e18,m[C++]=128|_\u003e\u003e\u003e12\u002663),m[C++]=128|_\u003e\u003e\u003e6\u002663),m[C++]=128|63\u0026_);return m})(d)},r.utf8decode=function(d){return a.nodebuffer?s.transformTo(\"nodebuffer\",d).toString(\"utf-8\"):(function(p){var m,_,f,I,C=p.length,y=new Array(2*C);for(m=_=0;m\u003cC;)if((f=p[m++])\u003c128)y[_++]=f;else if(4\u003c(I=l[f]))y[_++]=65533,m+=I-1;else{for(f\u0026=I===2?31:I===3?15:7;1\u003cI\u0026\u0026m\u003cC;)f=f\u003c\u003c6|63\u0026p[m++],I--;1\u003cI?y[_++]=65533:f\u003c65536?y[_++]=f:(f-=65536,y[_++]=55296|f\u003e\u003e10\u00261023,y[_++]=56320|1023\u0026f)}return y.length!==_\u0026\u0026(y.subarray?y=y.subarray(0,_):y.length=_),s.applyFromCharCode(y)})(d=s.transformTo(a.uint8array?\"uint8array\":\"array\",d))},s.inherits(g,c),g.prototype.processChunk=function(d){var p=s.transformTo(a.uint8array?\"uint8array\":\"array\",d.data);if(this.leftOver\u0026\u0026this.leftOver.length){if(a.uint8array){var m=p;(p=new Uint8Array(m.length+this.leftOver.length)).set(this.leftOver,0),p.set(m,this.leftOver.length)}else p=this.leftOver.concat(p);this.leftOver=null}var _=(function(I,C){var y;for((C=C||I.length)\u003eI.length\u0026\u0026(C=I.length),y=C-1;0\u003c=y\u0026\u0026(192\u0026I[y])==128;)y--;return y\u003c0||y===0?C:y+l[I[y]]\u003eC?y:C})(p),f=p;_!==p.length\u0026\u0026(a.uint8array?(f=p.subarray(0,_),this.leftOver=p.subarray(_,p.length)):(f=p.slice(0,_),this.leftOver=p.slice(_,p.length))),this.push({data:r.utf8decode(f),meta:d.meta})},g.prototype.flush=function(){this.leftOver\u0026\u0026this.leftOver.length\u0026\u0026(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=g,s.inherits(h,c),h.prototype.processChunk=function(d){this.push({data:r.utf8encode(d.data),meta:d.meta})},r.Utf8EncodeWorker=h},{\"./nodejsUtils\":14,\"./stream/GenericWorker\":28,\"./support\":30,\"./utils\":32}],32:[function(o,i,r){var s=o(\"./support\"),a=o(\"./base64\"),A=o(\"./nodejsUtils\"),c=o(\"./external\");function l(m){return m}function u(m,_){for(var f=0;f\u003cm.length;++f)_[f]=255\u0026m.charCodeAt(f);return _}o(\"setimmediate\"),r.newBlob=function(m,_){r.checkSupport(\"blob\");try{return new Blob([m],{type:_})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(m),f.getBlob(_)}catch{throw new Error(\"Bug : can't construct the Blob.\")}}};var g={stringifyByChunk:function(m,_,f){var I=[],C=0,y=m.length;if(y\u003c=f)return String.fromCharCode.apply(null,m);for(;C\u003cy;)_===\"array\"||_===\"nodebuffer\"?I.push(String.fromCharCode.apply(null,m.slice(C,Math.min(C+f,y)))):I.push(String.fromCharCode.apply(null,m.subarray(C,Math.min(C+f,y)))),C+=f;return I.join(\"\")},stringifyByChar:function(m){for(var _=\"\",f=0;f\u003cm.length;f++)_+=String.fromCharCode(m[f]);return _},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array\u0026\u0026String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer\u0026\u0026String.fromCharCode.apply(null,A.allocBuffer(1)).length===1}catch{return!1}})()}};function h(m){var _=65536,f=r.getTypeOf(m),I=!0;if(f===\"uint8array\"?I=g.applyCanBeUsed.uint8array:f===\"nodebuffer\"\u0026\u0026(I=g.applyCanBeUsed.nodebuffer),I)for(;1\u003c_;)try{return g.stringifyByChunk(m,f,_)}catch{_=Math.floor(_/2)}return g.stringifyByChar(m)}function d(m,_){for(var f=0;f\u003cm.length;f++)_[f]=m[f];return _}r.applyFromCharCode=h;var p={};p.string={string:l,array:function(m){return u(m,new Array(m.length))},arraybuffer:function(m){return p.string.uint8array(m).buffer},uint8array:function(m){return u(m,new Uint8Array(m.length))},nodebuffer:function(m){return u(m,A.allocBuffer(m.length))}},p.array={string:h,array:l,arraybuffer:function(m){return new Uint8Array(m).buffer},uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return A.newBufferFrom(m)}},p.arraybuffer={string:function(m){return h(new Uint8Array(m))},array:function(m){return d(new Uint8Array(m),new Array(m.byteLength))},arraybuffer:l,uint8array:function(m){return new Uint8Array(m)},nodebuffer:function(m){return A.newBufferFrom(new Uint8Array(m))}},p.uint8array={string:h,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return m.buffer},uint8array:l,nodebuffer:function(m){return A.newBufferFrom(m)}},p.nodebuffer={string:h,array:function(m){return d(m,new Array(m.length))},arraybuffer:function(m){return p.nodebuffer.uint8array(m).buffer},uint8array:function(m){return d(m,new Uint8Array(m.length))},nodebuffer:l},r.transformTo=function(m,_){if(_=_||\"\",!m)return _;r.checkSupport(m);var f=r.getTypeOf(_);return p[f][m](_)},r.resolve=function(m){for(var _=m.split(\"/\"),f=[],I=0;I\u003c_.length;I++){var C=_[I];C===\".\"||C===\"\"\u0026\u0026I!==0\u0026\u0026I!==_.length-1||(C===\"..\"?f.pop():f.push(C))}return f.join(\"/\")},r.getTypeOf=function(m){if(typeof m==\"string\")return\"string\";var _=Object.prototype.toString.call(m);return _===\"[object Array]\"?\"array\":s.nodebuffer\u0026\u0026A.isBuffer(m)?\"nodebuffer\":s.uint8array\u0026\u0026_===\"[object Uint8Array]\"?\"uint8array\":s.arraybuffer\u0026\u0026_===\"[object ArrayBuffer]\"?\"arraybuffer\":void 0},r.checkSupport=function(m){if(!s[m.toLowerCase()])throw new Error(m+\" is not supported by this platform\")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(m){var _,f,I=\"\";for(f=0;f\u003c(m||\"\").length;f++)I+=\"\\\\x\"+((_=m.charCodeAt(f))\u003c16?\"0\":\"\")+_.toString(16).toUpperCase();return I},r.delay=function(m,_,f){setImmediate(function(){m.apply(f||null,_||[])})},r.inherits=function(m,_){function f(){}f.prototype=_.prototype,m.prototype=new f},r.extend=function(){var m,_,f={};for(m=0;m\u003carguments.length;m++)for(_ in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],_)\u0026\u0026f[_]===void 0\u0026\u0026(f[_]=arguments[m][_]);return f},r.prepareContent=function(m,_,f,I,C){return c.Promise.resolve(_).then(function(y){return s.blob\u0026\u0026(y instanceof Blob||[\"[object File]\",\"[object Blob]\"].indexOf(Object.prototype.toString.call(y))!==-1)?Blob.prototype.arrayBuffer!==void 0?y.arrayBuffer():typeof FileReader\u003c\"u\"?new c.Promise(function(x,E){var B=new FileReader;B.onload=function(S){x(S.target.result)},B.onerror=function(S){E(S.target.error)},B.readAsArrayBuffer(y)}):c.Promise.reject(new Error(m+\" is a Blob, but we have no way of reading it.\")):y}).then(function(y){var x=r.getTypeOf(y);return x?(x===\"arraybuffer\"?y=r.transformTo(\"uint8array\",y):x===\"string\"\u0026\u0026(C?y=a.decode(y):f\u0026\u0026I!==!0\u0026\u0026(y=(function(E){return u(E,s.uint8array?new Uint8Array(E.length):new Array(E.length))})(y))),y):c.Promise.reject(new Error(\"Can't read the data of '\"+m+\"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?\"))})}},{\"./base64\":1,\"./external\":6,\"./nodejsUtils\":14,\"./support\":30,setimmediate:54}],33:[function(o,i,r){var s=o(\"./reader/readerFor\"),a=o(\"./utils\"),A=o(\"./signature\"),c=o(\"./zipEntry\"),l=o(\"./support\");function u(g){this.files=[],this.loadOptions=g}u.prototype={checkSignature:function(g){if(!this.reader.readAndCheckSignature(g)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error(\"Corrupted zip or bug: unexpected signature (\"+a.pretty(h)+\", expected \"+a.pretty(g)+\")\")}},isSignature:function(g,h){var d=this.reader.index;this.reader.setIndex(g);var p=this.reader.readString(4)===h;return this.reader.setIndex(d),p},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var g=this.reader.readData(this.zipCommentLength),h=l.uint8array?\"uint8array\":\"array\",d=a.transformTo(h,g);this.zipComment=this.loadOptions.decodeFileName(d)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var g,h,d,p=this.zip64EndOfCentralSize-44;0\u003cp;)g=this.reader.readInt(2),h=this.reader.readInt(4),d=this.reader.readData(h),this.zip64ExtensibleData[g]={id:g,length:h,value:d}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1\u003cthis.disksCount)throw new Error(\"Multi-volumes zip are not supported\")},readLocalFiles:function(){var g,h;for(g=0;g\u003cthis.files.length;g++)h=this.files[g],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(A.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var g;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(A.CENTRAL_FILE_HEADER);)(g=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(g);if(this.centralDirRecords!==this.files.length\u0026\u0026this.centralDirRecords!==0\u0026\u0026this.files.length===0)throw new Error(\"Corrupted zip or bug: expected \"+this.centralDirRecords+\" records in central dir, got \"+this.files.length)},readEndOfCentral:function(){var g=this.reader.lastIndexOfSignature(A.CENTRAL_DIRECTORY_END);if(g\u003c0)throw this.isSignature(0,A.LOCAL_FILE_HEADER)?new Error(\"Corrupted zip: can't find end of central directory\"):new Error(\"Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html\");this.reader.setIndex(g);var h=g;if(this.checkSignature(A.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(g=this.reader.lastIndexOfSignature(A.ZIP64_CENTRAL_DIRECTORY_LOCATOR))\u003c0)throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory locator\");if(this.reader.setIndex(g),this.checkSignature(A.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,A.ZIP64_CENTRAL_DIRECTORY_END)\u0026\u0026(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(A.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir\u003c0))throw new Error(\"Corrupted zip: can't find the ZIP64 end of central directory\");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(A.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64\u0026\u0026(d+=20,d+=12+this.zip64EndOfCentralSize);var p=h-d;if(0\u003cp)this.isSignature(h,A.CENTRAL_FILE_HEADER)||(this.reader.zero=p);else if(p\u003c0)throw new Error(\"Corrupted zip: missing \"+Math.abs(p)+\" bytes.\")},prepareReader:function(g){this.reader=s(g)},load:function(g){this.prepareReader(g),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},i.exports=u},{\"./reader/readerFor\":22,\"./signature\":23,\"./support\":30,\"./utils\":32,\"./zipEntry\":34}],34:[function(o,i,r){var s=o(\"./reader/readerFor\"),a=o(\"./utils\"),A=o(\"./compressedObject\"),c=o(\"./crc32\"),l=o(\"./utf8\"),u=o(\"./compressions\"),g=o(\"./support\");function h(d,p){this.options=d,this.loadOptions=p}h.prototype={isEncrypted:function(){return(1\u0026this.bitFlag)==1},useUTF8:function(){return(2048\u0026this.bitFlag)==2048},readLocalPart:function(d){var p,m;if(d.skip(22),this.fileNameLength=d.readInt(2),m=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(m),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error(\"Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)\");if((p=(function(_){for(var f in u)if(Object.prototype.hasOwnProperty.call(u,f)\u0026\u0026u[f].magic===_)return u[f];return null})(this.compressionMethod))===null)throw new Error(\"Corrupted zip : compression \"+a.pretty(this.compressionMethod)+\" unknown (inner file : \"+a.transformTo(\"string\",this.fileName)+\")\");this.decompressed=new A(this.compressedSize,this.uncompressedSize,this.crc32,p,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var p=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error(\"Encrypted zip are not supported\");d.skip(p),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy\u003e\u003e8;this.dir=!!(16\u0026this.externalFileAttributes),d==0\u0026\u0026(this.dosPermissions=63\u0026this.externalFileAttributes),d==3\u0026\u0026(this.unixPermissions=this.externalFileAttributes\u003e\u003e16\u002665535),this.dir||this.fileNameStr.slice(-1)!==\"/\"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=s(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS\u0026\u0026(this.uncompressedSize=d.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS\u0026\u0026(this.compressedSize=d.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS\u0026\u0026(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS\u0026\u0026(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var p,m,_,f=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4\u003cf;)p=d.readInt(2),m=d.readInt(2),_=d.readData(m),this.extraFields[p]={id:p,length:m,value:_};d.setIndex(f)},handleUTF8:function(){var d=g.uint8array?\"uint8array\":\"array\";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var p=this.findExtraFieldUnicodePath();if(p!==null)this.fileNameStr=p;else{var m=a.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(m)}var _=this.findExtraFieldUnicodeComment();if(_!==null)this.fileCommentStr=_;else{var f=a.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var p=s(d.value);return p.readInt(1)!==1||c(this.fileName)!==p.readInt(4)?null:l.utf8decode(p.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var p=s(d.value);return p.readInt(1)!==1||c(this.fileComment)!==p.readInt(4)?null:l.utf8decode(p.readData(d.length-5))}return null}},i.exports=h},{\"./compressedObject\":2,\"./compressions\":3,\"./crc32\":4,\"./reader/readerFor\":22,\"./support\":30,\"./utf8\":31,\"./utils\":32}],35:[function(o,i,r){function s(p,m,_){this.name=p,this.dir=_.dir,this.date=_.date,this.comment=_.comment,this.unixPermissions=_.unixPermissions,this.dosPermissions=_.dosPermissions,this._data=m,this._dataBinary=_.binary,this.options={compression:_.compression,compressionOptions:_.compressionOptions}}var a=o(\"./stream/StreamHelper\"),A=o(\"./stream/DataWorker\"),c=o(\"./utf8\"),l=o(\"./compressedObject\"),u=o(\"./stream/GenericWorker\");s.prototype={internalStream:function(p){var m=null,_=\"string\";try{if(!p)throw new Error(\"No output type specified.\");var f=(_=p.toLowerCase())===\"string\"||_===\"text\";_!==\"binarystring\"\u0026\u0026_!==\"text\"||(_=\"string\"),m=this._decompressWorker();var I=!this._dataBinary;I\u0026\u0026!f\u0026\u0026(m=m.pipe(new c.Utf8EncodeWorker)),!I\u0026\u0026f\u0026\u0026(m=m.pipe(new c.Utf8DecodeWorker))}catch(C){(m=new u(\"error\")).error(C)}return new a(m,_,\"\")},async:function(p,m){return this.internalStream(p).accumulate(m)},nodeStream:function(p,m){return this.internalStream(p||\"nodebuffer\").toNodejsStream(m)},_compressWorker:function(p,m){if(this._data instanceof l\u0026\u0026this._data.compression.magic===p.magic)return this._data.getCompressedWorker();var _=this._decompressWorker();return this._dataBinary||(_=_.pipe(new c.Utf8EncodeWorker)),l.createWorkerFrom(_,p,m)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof u?this._data:new A(this._data)}};for(var g=[\"asText\",\"asBinary\",\"asNodeBuffer\",\"asUint8Array\",\"asArrayBuffer\"],h=function(){throw new Error(\"This method has been removed in JSZip 3.0, please check the upgrade guide.\")},d=0;d\u003cg.length;d++)s.prototype[g[d]]=h;i.exports=s},{\"./compressedObject\":2,\"./stream/DataWorker\":27,\"./stream/GenericWorker\":28,\"./stream/StreamHelper\":29,\"./utf8\":31}],36:[function(o,i,r){(function(s){var a,A,c=s.MutationObserver||s.WebKitMutationObserver;if(c){var l=0,u=new c(p),g=s.document.createTextNode(\"\");u.observe(g,{characterData:!0}),a=function(){g.data=l=++l%2}}else if(s.setImmediate||s.MessageChannel===void 0)a=\"document\"in s\u0026\u0026\"onreadystatechange\"in s.document.createElement(\"script\")?function(){var m=s.document.createElement(\"script\");m.onreadystatechange=function(){p(),m.onreadystatechange=null,m.parentNode.removeChild(m),m=null},s.document.documentElement.appendChild(m)}:function(){setTimeout(p,0)};else{var h=new s.MessageChannel;h.port1.onmessage=p,a=function(){h.port2.postMessage(0)}}var d=[];function p(){var m,_;A=!0;for(var f=d.length;f;){for(_=d,d=[],m=-1;++m\u003cf;)_[m]();f=d.length}A=!1}i.exports=function(m){d.push(m)!==1||A||a()}}).call(this,typeof my\u003c\"u\"?my:typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{})},{}],37:[function(o,i,r){var s=o(\"immediate\");function a(){}var A={},c=[\"REJECTED\"],l=[\"FULFILLED\"],u=[\"PENDING\"];function g(f){if(typeof f!=\"function\")throw new TypeError(\"resolver must be a function\");this.state=u,this.queue=[],this.outcome=void 0,f!==a\u0026\u0026m(this,f)}function h(f,I,C){this.promise=f,typeof I==\"function\"\u0026\u0026(this.onFulfilled=I,this.callFulfilled=this.otherCallFulfilled),typeof C==\"function\"\u0026\u0026(this.onRejected=C,this.callRejected=this.otherCallRejected)}function d(f,I,C){s(function(){var y;try{y=I(C)}catch(x){return A.reject(f,x)}y===f?A.reject(f,new TypeError(\"Cannot resolve promise with itself\")):A.resolve(f,y)})}function p(f){var I=f\u0026\u0026f.then;if(f\u0026\u0026(typeof f==\"object\"||typeof f==\"function\")\u0026\u0026typeof I==\"function\")return function(){I.apply(f,arguments)}}function m(f,I){var C=!1;function y(B){C||(C=!0,A.reject(f,B))}function x(B){C||(C=!0,A.resolve(f,B))}var E=_(function(){I(x,y)});E.status===\"error\"\u0026\u0026y(E.value)}function _(f,I){var C={};try{C.value=f(I),C.status=\"success\"}catch(y){C.status=\"error\",C.value=y}return C}(i.exports=g).prototype.finally=function(f){if(typeof f!=\"function\")return this;var I=this.constructor;return this.then(function(C){return I.resolve(f()).then(function(){return C})},function(C){return I.resolve(f()).then(function(){throw C})})},g.prototype.catch=function(f){return this.then(null,f)},g.prototype.then=function(f,I){if(typeof f!=\"function\"\u0026\u0026this.state===l||typeof I!=\"function\"\u0026\u0026this.state===c)return this;var C=new this.constructor(a);return this.state!==u?d(C,this.state===l?f:I,this.outcome):this.queue.push(new h(C,f,I)),C},h.prototype.callFulfilled=function(f){A.resolve(this.promise,f)},h.prototype.otherCallFulfilled=function(f){d(this.promise,this.onFulfilled,f)},h.prototype.callRejected=function(f){A.reject(this.promise,f)},h.prototype.otherCallRejected=function(f){d(this.promise,this.onRejected,f)},A.resolve=function(f,I){var C=_(p,I);if(C.status===\"error\")return A.reject(f,C.value);var y=C.value;if(y)m(f,y);else{f.state=l,f.outcome=I;for(var x=-1,E=f.queue.length;++x\u003cE;)f.queue[x].callFulfilled(I)}return f},A.reject=function(f,I){f.state=c,f.outcome=I;for(var C=-1,y=f.queue.length;++C\u003cy;)f.queue[C].callRejected(I);return f},g.resolve=function(f){return f instanceof this?f:A.resolve(new this(a),f)},g.reject=function(f){var I=new this(a);return A.reject(I,f)},g.all=function(f){var I=this;if(Object.prototype.toString.call(f)!==\"[object Array]\")return this.reject(new TypeError(\"must be an array\"));var C=f.length,y=!1;if(!C)return this.resolve([]);for(var x=new Array(C),E=0,B=-1,S=new this(a);++B\u003cC;)Q(f[B],B);return S;function Q(w,M){I.resolve(w).then(function(k){x[M]=k,++E!==C||y||(y=!0,A.resolve(S,x))},function(k){y||(y=!0,A.reject(S,k))})}},g.race=function(f){var I=this;if(Object.prototype.toString.call(f)!==\"[object Array]\")return this.reject(new TypeError(\"must be an array\"));var C=f.length,y=!1;if(!C)return this.resolve([]);for(var x=-1,E=new this(a);++x\u003cC;)B=f[x],I.resolve(B).then(function(S){y||(y=!0,A.resolve(E,S))},function(S){y||(y=!0,A.reject(E,S))});var B;return E}},{immediate:36}],38:[function(o,i,r){var s={};(0,o(\"./lib/utils/common\").assign)(s,o(\"./lib/deflate\"),o(\"./lib/inflate\"),o(\"./lib/zlib/constants\")),i.exports=s},{\"./lib/deflate\":39,\"./lib/inflate\":40,\"./lib/utils/common\":41,\"./lib/zlib/constants\":44}],39:[function(o,i,r){var s=o(\"./zlib/deflate\"),a=o(\"./utils/common\"),A=o(\"./utils/strings\"),c=o(\"./zlib/messages\"),l=o(\"./zlib/zstream\"),u=Object.prototype.toString,g=0,h=-1,d=0,p=8;function m(f){if(!(this instanceof m))return new m(f);this.options=a.assign({level:h,method:p,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:\"\"},f||{});var I=this.options;I.raw\u0026\u00260\u003cI.windowBits?I.windowBits=-I.windowBits:I.gzip\u0026\u00260\u003cI.windowBits\u0026\u0026I.windowBits\u003c16\u0026\u0026(I.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var C=s.deflateInit2(this.strm,I.level,I.method,I.windowBits,I.memLevel,I.strategy);if(C!==g)throw new Error(c[C]);if(I.header\u0026\u0026s.deflateSetHeader(this.strm,I.header),I.dictionary){var y;if(y=typeof I.dictionary==\"string\"?A.string2buf(I.dictionary):u.call(I.dictionary)===\"[object ArrayBuffer]\"?new Uint8Array(I.dictionary):I.dictionary,(C=s.deflateSetDictionary(this.strm,y))!==g)throw new Error(c[C]);this._dict_set=!0}}function _(f,I){var C=new m(I);if(C.push(f,!0),C.err)throw C.msg||c[C.err];return C.result}m.prototype.push=function(f,I){var C,y,x=this.strm,E=this.options.chunkSize;if(this.ended)return!1;y=I===~~I?I:I===!0?4:0,typeof f==\"string\"?x.input=A.string2buf(f):u.call(f)===\"[object ArrayBuffer]\"?x.input=new Uint8Array(f):x.input=f,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0\u0026\u0026(x.output=new a.Buf8(E),x.next_out=0,x.avail_out=E),(C=s.deflate(x,y))!==1\u0026\u0026C!==g)return this.onEnd(C),!(this.ended=!0);x.avail_out!==0\u0026\u0026(x.avail_in!==0||y!==4\u0026\u0026y!==2)||(this.options.to===\"string\"?this.onData(A.buf2binstring(a.shrinkBuf(x.output,x.next_out))):this.onData(a.shrinkBuf(x.output,x.next_out)))}while((0\u003cx.avail_in||x.avail_out===0)\u0026\u0026C!==1);return y===4?(C=s.deflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===g):y!==2||(this.onEnd(g),!(x.avail_out=0))},m.prototype.onData=function(f){this.chunks.push(f)},m.prototype.onEnd=function(f){f===g\u0026\u0026(this.options.to===\"string\"?this.result=this.chunks.join(\"\"):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},r.Deflate=m,r.deflate=_,r.deflateRaw=function(f,I){return(I=I||{}).raw=!0,_(f,I)},r.gzip=function(f,I){return(I=I||{}).gzip=!0,_(f,I)}},{\"./utils/common\":41,\"./utils/strings\":42,\"./zlib/deflate\":46,\"./zlib/messages\":51,\"./zlib/zstream\":53}],40:[function(o,i,r){var s=o(\"./zlib/inflate\"),a=o(\"./utils/common\"),A=o(\"./utils/strings\"),c=o(\"./zlib/constants\"),l=o(\"./zlib/messages\"),u=o(\"./zlib/zstream\"),g=o(\"./zlib/gzheader\"),h=Object.prototype.toString;function d(m){if(!(this instanceof d))return new d(m);this.options=a.assign({chunkSize:16384,windowBits:0,to:\"\"},m||{});var _=this.options;_.raw\u0026\u00260\u003c=_.windowBits\u0026\u0026_.windowBits\u003c16\u0026\u0026(_.windowBits=-_.windowBits,_.windowBits===0\u0026\u0026(_.windowBits=-15)),!(0\u003c=_.windowBits\u0026\u0026_.windowBits\u003c16)||m\u0026\u0026m.windowBits||(_.windowBits+=32),15\u003c_.windowBits\u0026\u0026_.windowBits\u003c48\u0026\u0026(15\u0026_.windowBits)==0\u0026\u0026(_.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var f=s.inflateInit2(this.strm,_.windowBits);if(f!==c.Z_OK)throw new Error(l[f]);this.header=new g,s.inflateGetHeader(this.strm,this.header)}function p(m,_){var f=new d(_);if(f.push(m,!0),f.err)throw f.msg||l[f.err];return f.result}d.prototype.push=function(m,_){var f,I,C,y,x,E,B=this.strm,S=this.options.chunkSize,Q=this.options.dictionary,w=!1;if(this.ended)return!1;I=_===~~_?_:_===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof m==\"string\"?B.input=A.binstring2buf(m):h.call(m)===\"[object ArrayBuffer]\"?B.input=new Uint8Array(m):B.input=m,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0\u0026\u0026(B.output=new a.Buf8(S),B.next_out=0,B.avail_out=S),(f=s.inflate(B,c.Z_NO_FLUSH))===c.Z_NEED_DICT\u0026\u0026Q\u0026\u0026(E=typeof Q==\"string\"?A.string2buf(Q):h.call(Q)===\"[object ArrayBuffer]\"?new Uint8Array(Q):Q,f=s.inflateSetDictionary(this.strm,E)),f===c.Z_BUF_ERROR\u0026\u0026w===!0\u0026\u0026(f=c.Z_OK,w=!1),f!==c.Z_STREAM_END\u0026\u0026f!==c.Z_OK)return this.onEnd(f),!(this.ended=!0);B.next_out\u0026\u0026(B.avail_out!==0\u0026\u0026f!==c.Z_STREAM_END\u0026\u0026(B.avail_in!==0||I!==c.Z_FINISH\u0026\u0026I!==c.Z_SYNC_FLUSH)||(this.options.to===\"string\"?(C=A.utf8border(B.output,B.next_out),y=B.next_out-C,x=A.buf2string(B.output,C),B.next_out=y,B.avail_out=S-y,y\u0026\u0026a.arraySet(B.output,B.output,C,y,0),this.onData(x)):this.onData(a.shrinkBuf(B.output,B.next_out)))),B.avail_in===0\u0026\u0026B.avail_out===0\u0026\u0026(w=!0)}while((0\u003cB.avail_in||B.avail_out===0)\u0026\u0026f!==c.Z_STREAM_END);return f===c.Z_STREAM_END\u0026\u0026(I=c.Z_FINISH),I===c.Z_FINISH?(f=s.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===c.Z_OK):I!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(B.avail_out=0))},d.prototype.onData=function(m){this.chunks.push(m)},d.prototype.onEnd=function(m){m===c.Z_OK\u0026\u0026(this.options.to===\"string\"?this.result=this.chunks.join(\"\"):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},r.Inflate=d,r.inflate=p,r.inflateRaw=function(m,_){return(_=_||{}).raw=!0,p(m,_)},r.ungzip=p},{\"./utils/common\":41,\"./utils/strings\":42,\"./zlib/constants\":44,\"./zlib/gzheader\":47,\"./zlib/inflate\":49,\"./zlib/messages\":51,\"./zlib/zstream\":53}],41:[function(o,i,r){var s=typeof Uint8Array\u003c\"u\"\u0026\u0026typeof Uint16Array\u003c\"u\"\u0026\u0026typeof Int32Array\u003c\"u\";r.assign=function(c){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var u=l.shift();if(u){if(typeof u!=\"object\")throw new TypeError(u+\"must be non-object\");for(var g in u)u.hasOwnProperty(g)\u0026\u0026(c[g]=u[g])}}return c},r.shrinkBuf=function(c,l){return c.length===l?c:c.subarray?c.subarray(0,l):(c.length=l,c)};var a={arraySet:function(c,l,u,g,h){if(l.subarray\u0026\u0026c.subarray)c.set(l.subarray(u,u+g),h);else for(var d=0;d\u003cg;d++)c[h+d]=l[u+d]},flattenChunks:function(c){var l,u,g,h,d,p;for(l=g=0,u=c.length;l\u003cu;l++)g+=c[l].length;for(p=new Uint8Array(g),l=h=0,u=c.length;l\u003cu;l++)d=c[l],p.set(d,h),h+=d.length;return p}},A={arraySet:function(c,l,u,g,h){for(var d=0;d\u003cg;d++)c[h+d]=l[u+d]},flattenChunks:function(c){return[].concat.apply([],c)}};r.setTyped=function(c){c?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,a)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,A))},r.setTyped(s)},{}],42:[function(o,i,r){var s=o(\"./common\"),a=!0,A=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{A=!1}for(var c=new s.Buf8(256),l=0;l\u003c256;l++)c[l]=252\u003c=l?6:248\u003c=l?5:240\u003c=l?4:224\u003c=l?3:192\u003c=l?2:1;function u(g,h){if(h\u003c65537\u0026\u0026(g.subarray\u0026\u0026A||!g.subarray\u0026\u0026a))return String.fromCharCode.apply(null,s.shrinkBuf(g,h));for(var d=\"\",p=0;p\u003ch;p++)d+=String.fromCharCode(g[p]);return d}c[254]=c[254]=1,r.string2buf=function(g){var h,d,p,m,_,f=g.length,I=0;for(m=0;m\u003cf;m++)(64512\u0026(d=g.charCodeAt(m)))==55296\u0026\u0026m+1\u003cf\u0026\u0026(64512\u0026(p=g.charCodeAt(m+1)))==56320\u0026\u0026(d=65536+(d-55296\u003c\u003c10)+(p-56320),m++),I+=d\u003c128?1:d\u003c2048?2:d\u003c65536?3:4;for(h=new s.Buf8(I),m=_=0;_\u003cI;m++)(64512\u0026(d=g.charCodeAt(m)))==55296\u0026\u0026m+1\u003cf\u0026\u0026(64512\u0026(p=g.charCodeAt(m+1)))==56320\u0026\u0026(d=65536+(d-55296\u003c\u003c10)+(p-56320),m++),d\u003c128?h[_++]=d:(d\u003c2048?h[_++]=192|d\u003e\u003e\u003e6:(d\u003c65536?h[_++]=224|d\u003e\u003e\u003e12:(h[_++]=240|d\u003e\u003e\u003e18,h[_++]=128|d\u003e\u003e\u003e12\u002663),h[_++]=128|d\u003e\u003e\u003e6\u002663),h[_++]=128|63\u0026d);return h},r.buf2binstring=function(g){return u(g,g.length)},r.binstring2buf=function(g){for(var h=new s.Buf8(g.length),d=0,p=h.length;d\u003cp;d++)h[d]=g.charCodeAt(d);return h},r.buf2string=function(g,h){var d,p,m,_,f=h||g.length,I=new Array(2*f);for(d=p=0;d\u003cf;)if((m=g[d++])\u003c128)I[p++]=m;else if(4\u003c(_=c[m]))I[p++]=65533,d+=_-1;else{for(m\u0026=_===2?31:_===3?15:7;1\u003c_\u0026\u0026d\u003cf;)m=m\u003c\u003c6|63\u0026g[d++],_--;1\u003c_?I[p++]=65533:m\u003c65536?I[p++]=m:(m-=65536,I[p++]=55296|m\u003e\u003e10\u00261023,I[p++]=56320|1023\u0026m)}return u(I,p)},r.utf8border=function(g,h){var d;for((h=h||g.length)\u003eg.length\u0026\u0026(h=g.length),d=h-1;0\u003c=d\u0026\u0026(192\u0026g[d])==128;)d--;return d\u003c0||d===0?h:d+c[g[d]]\u003eh?d:h}},{\"./common\":41}],43:[function(o,i,r){i.exports=function(s,a,A,c){for(var l=65535\u0026s|0,u=s\u003e\u003e\u003e16\u002665535|0,g=0;A!==0;){for(A-=g=2e3\u003cA?2e3:A;u=u+(l=l+a[c++]|0)|0,--g;);l%=65521,u%=65521}return l|u\u003c\u003c16|0}},{}],44:[function(o,i,r){i.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(o,i,r){var s=(function(){for(var a,A=[],c=0;c\u003c256;c++){a=c;for(var l=0;l\u003c8;l++)a=1\u0026a?3988292384^a\u003e\u003e\u003e1:a\u003e\u003e\u003e1;A[c]=a}return A})();i.exports=function(a,A,c,l){var u=s,g=l+c;a^=-1;for(var h=l;h\u003cg;h++)a=a\u003e\u003e\u003e8^u[255\u0026(a^A[h])];return-1^a}},{}],46:[function(o,i,r){var s,a=o(\"../utils/common\"),A=o(\"./trees\"),c=o(\"./adler32\"),l=o(\"./crc32\"),u=o(\"./messages\"),g=0,h=4,d=0,p=-2,m=-1,_=4,f=2,I=8,C=9,y=286,x=30,E=19,B=2*y+1,S=15,Q=3,w=258,M=w+Q+1,k=42,R=113,F=1,O=2,U=3,Y=4;function W(he,Qe){return he.msg=u[Qe],Qe}function te(he){return(he\u003c\u003c1)-(4\u003che?9:0)}function j(he){for(var Qe=he.length;0\u003c=--Qe;)he[Qe]=0}function J(he){var Qe=he.state,Pe=Qe.pending;Pe\u003ehe.avail_out\u0026\u0026(Pe=he.avail_out),Pe!==0\u0026\u0026(a.arraySet(he.output,Qe.pending_buf,Qe.pending_out,Pe,he.next_out),he.next_out+=Pe,Qe.pending_out+=Pe,he.total_out+=Pe,he.avail_out-=Pe,Qe.pending-=Pe,Qe.pending===0\u0026\u0026(Qe.pending_out=0))}function oe(he,Qe){A._tr_flush_block(he,0\u003c=he.block_start?he.block_start:-1,he.strstart-he.block_start,Qe),he.block_start=he.strstart,J(he.strm)}function ie(he,Qe){he.pending_buf[he.pending++]=Qe}function ne(he,Qe){he.pending_buf[he.pending++]=Qe\u003e\u003e\u003e8\u0026255,he.pending_buf[he.pending++]=255\u0026Qe}function le(he,Qe){var Pe,we,Te=he.max_chain_length,Re=he.strstart,Ee=he.prev_length,ke=he.nice_match,Ce=he.strstart\u003ehe.w_size-M?he.strstart-(he.w_size-M):0,Le=he.window,Ye=he.w_mask,tt=he.prev,At=he.strstart+w,at=Le[Re+Ee-1],nt=Le[Re+Ee];he.prev_length\u003e=he.good_match\u0026\u0026(Te\u003e\u003e=2),ke\u003ehe.lookahead\u0026\u0026(ke=he.lookahead);do if(Le[(Pe=Qe)+Ee]===nt\u0026\u0026Le[Pe+Ee-1]===at\u0026\u0026Le[Pe]===Le[Re]\u0026\u0026Le[++Pe]===Le[Re+1]){Re+=2,Pe++;do;while(Le[++Re]===Le[++Pe]\u0026\u0026Le[++Re]===Le[++Pe]\u0026\u0026Le[++Re]===Le[++Pe]\u0026\u0026Le[++Re]===Le[++Pe]\u0026\u0026Le[++Re]===Le[++Pe]\u0026\u0026Le[++Re]===Le[++Pe]\u0026\u0026Le[++Re]===Le[++Pe]\u0026\u0026Le[++Re]===Le[++Pe]\u0026\u0026Re\u003cAt);if(we=w-(At-Re),Re=At-w,Ee\u003cwe){if(he.match_start=Qe,ke\u003c=(Ee=we))break;at=Le[Re+Ee-1],nt=Le[Re+Ee]}}while((Qe=tt[Qe\u0026Ye])\u003eCe\u0026\u0026--Te!=0);return Ee\u003c=he.lookahead?Ee:he.lookahead}function ge(he){var Qe,Pe,we,Te,Re,Ee,ke,Ce,Le,Ye,tt=he.w_size;do{if(Te=he.window_size-he.lookahead-he.strstart,he.strstart\u003e=tt+(tt-M)){for(a.arraySet(he.window,he.window,tt,tt,0),he.match_start-=tt,he.strstart-=tt,he.block_start-=tt,Qe=Pe=he.hash_size;we=he.head[--Qe],he.head[Qe]=tt\u003c=we?we-tt:0,--Pe;);for(Qe=Pe=tt;we=he.prev[--Qe],he.prev[Qe]=tt\u003c=we?we-tt:0,--Pe;);Te+=tt}if(he.strm.avail_in===0)break;if(Ee=he.strm,ke=he.window,Ce=he.strstart+he.lookahead,Le=Te,Ye=void 0,Ye=Ee.avail_in,Le\u003cYe\u0026\u0026(Ye=Le),Pe=Ye===0?0:(Ee.avail_in-=Ye,a.arraySet(ke,Ee.input,Ee.next_in,Ye,Ce),Ee.state.wrap===1?Ee.adler=c(Ee.adler,ke,Ye,Ce):Ee.state.wrap===2\u0026\u0026(Ee.adler=l(Ee.adler,ke,Ye,Ce)),Ee.next_in+=Ye,Ee.total_in+=Ye,Ye),he.lookahead+=Pe,he.lookahead+he.insert\u003e=Q)for(Re=he.strstart-he.insert,he.ins_h=he.window[Re],he.ins_h=(he.ins_h\u003c\u003che.hash_shift^he.window[Re+1])\u0026he.hash_mask;he.insert\u0026\u0026(he.ins_h=(he.ins_h\u003c\u003che.hash_shift^he.window[Re+Q-1])\u0026he.hash_mask,he.prev[Re\u0026he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=Re,Re++,he.insert--,!(he.lookahead+he.insert\u003cQ)););}while(he.lookahead\u003cM\u0026\u0026he.strm.avail_in!==0)}function _e(he,Qe){for(var Pe,we;;){if(he.lookahead\u003cM){if(ge(he),he.lookahead\u003cM\u0026\u0026Qe===g)return F;if(he.lookahead===0)break}if(Pe=0,he.lookahead\u003e=Q\u0026\u0026(he.ins_h=(he.ins_h\u003c\u003che.hash_shift^he.window[he.strstart+Q-1])\u0026he.hash_mask,Pe=he.prev[he.strstart\u0026he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart),Pe!==0\u0026\u0026he.strstart-Pe\u003c=he.w_size-M\u0026\u0026(he.match_length=le(he,Pe)),he.match_length\u003e=Q)if(we=A._tr_tally(he,he.strstart-he.match_start,he.match_length-Q),he.lookahead-=he.match_length,he.match_length\u003c=he.max_lazy_match\u0026\u0026he.lookahead\u003e=Q){for(he.match_length--;he.strstart++,he.ins_h=(he.ins_h\u003c\u003che.hash_shift^he.window[he.strstart+Q-1])\u0026he.hash_mask,Pe=he.prev[he.strstart\u0026he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart,--he.match_length!=0;);he.strstart++}else he.strstart+=he.match_length,he.match_length=0,he.ins_h=he.window[he.strstart],he.ins_h=(he.ins_h\u003c\u003che.hash_shift^he.window[he.strstart+1])\u0026he.hash_mask;else we=A._tr_tally(he,0,he.window[he.strstart]),he.lookahead--,he.strstart++;if(we\u0026\u0026(oe(he,!1),he.strm.avail_out===0))return F}return he.insert=he.strstart\u003cQ-1?he.strstart:Q-1,Qe===h?(oe(he,!0),he.strm.avail_out===0?U:Y):he.last_lit\u0026\u0026(oe(he,!1),he.strm.avail_out===0)?F:O}function ue(he,Qe){for(var Pe,we,Te;;){if(he.lookahead\u003cM){if(ge(he),he.lookahead\u003cM\u0026\u0026Qe===g)return F;if(he.lookahead===0)break}if(Pe=0,he.lookahead\u003e=Q\u0026\u0026(he.ins_h=(he.ins_h\u003c\u003che.hash_shift^he.window[he.strstart+Q-1])\u0026he.hash_mask,Pe=he.prev[he.strstart\u0026he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart),he.prev_length=he.match_length,he.prev_match=he.match_start,he.match_length=Q-1,Pe!==0\u0026\u0026he.prev_length\u003che.max_lazy_match\u0026\u0026he.strstart-Pe\u003c=he.w_size-M\u0026\u0026(he.match_length=le(he,Pe),he.match_length\u003c=5\u0026\u0026(he.strategy===1||he.match_length===Q\u0026\u00264096\u003che.strstart-he.match_start)\u0026\u0026(he.match_length=Q-1)),he.prev_length\u003e=Q\u0026\u0026he.match_length\u003c=he.prev_length){for(Te=he.strstart+he.lookahead-Q,we=A._tr_tally(he,he.strstart-1-he.prev_match,he.prev_length-Q),he.lookahead-=he.prev_length-1,he.prev_length-=2;++he.strstart\u003c=Te\u0026\u0026(he.ins_h=(he.ins_h\u003c\u003che.hash_shift^he.window[he.strstart+Q-1])\u0026he.hash_mask,Pe=he.prev[he.strstart\u0026he.w_mask]=he.head[he.ins_h],he.head[he.ins_h]=he.strstart),--he.prev_length!=0;);if(he.match_available=0,he.match_length=Q-1,he.strstart++,we\u0026\u0026(oe(he,!1),he.strm.avail_out===0))return F}else if(he.match_available){if((we=A._tr_tally(he,0,he.window[he.strstart-1]))\u0026\u0026oe(he,!1),he.strstart++,he.lookahead--,he.strm.avail_out===0)return F}else he.match_available=1,he.strstart++,he.lookahead--}return he.match_available\u0026\u0026(we=A._tr_tally(he,0,he.window[he.strstart-1]),he.match_available=0),he.insert=he.strstart\u003cQ-1?he.strstart:Q-1,Qe===h?(oe(he,!0),he.strm.avail_out===0?U:Y):he.last_lit\u0026\u0026(oe(he,!1),he.strm.avail_out===0)?F:O}function fe(he,Qe,Pe,we,Te){this.good_length=he,this.max_lazy=Qe,this.nice_length=Pe,this.max_chain=we,this.func=Te}function pe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=I,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*B),this.dyn_dtree=new a.Buf16(2*(2*x+1)),this.bl_tree=new a.Buf16(2*(2*E+1)),j(this.dyn_ltree),j(this.dyn_dtree),j(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(S+1),this.heap=new a.Buf16(2*y+1),j(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*y+1),j(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(he){var Qe;return he\u0026\u0026he.state?(he.total_in=he.total_out=0,he.data_type=f,(Qe=he.state).pending=0,Qe.pending_out=0,Qe.wrap\u003c0\u0026\u0026(Qe.wrap=-Qe.wrap),Qe.status=Qe.wrap?k:R,he.adler=Qe.wrap===2?0:1,Qe.last_flush=g,A._tr_init(Qe),d):W(he,p)}function Me(he){var Qe=ye(he);return Qe===d\u0026\u0026(function(Pe){Pe.window_size=2*Pe.w_size,j(Pe.head),Pe.max_lazy_match=s[Pe.level].max_lazy,Pe.good_match=s[Pe.level].good_length,Pe.nice_match=s[Pe.level].nice_length,Pe.max_chain_length=s[Pe.level].max_chain,Pe.strstart=0,Pe.block_start=0,Pe.lookahead=0,Pe.insert=0,Pe.match_length=Pe.prev_length=Q-1,Pe.match_available=0,Pe.ins_h=0})(he.state),Qe}function ve(he,Qe,Pe,we,Te,Re){if(!he)return p;var Ee=1;if(Qe===m\u0026\u0026(Qe=6),we\u003c0?(Ee=0,we=-we):15\u003cwe\u0026\u0026(Ee=2,we-=16),Te\u003c1||C\u003cTe||Pe!==I||we\u003c8||15\u003cwe||Qe\u003c0||9\u003cQe||Re\u003c0||_\u003cRe)return W(he,p);we===8\u0026\u0026(we=9);var ke=new pe;return(he.state=ke).strm=he,ke.wrap=Ee,ke.gzhead=null,ke.w_bits=we,ke.w_size=1\u003c\u003cke.w_bits,ke.w_mask=ke.w_size-1,ke.hash_bits=Te+7,ke.hash_size=1\u003c\u003cke.hash_bits,ke.hash_mask=ke.hash_size-1,ke.hash_shift=~~((ke.hash_bits+Q-1)/Q),ke.window=new a.Buf8(2*ke.w_size),ke.head=new a.Buf16(ke.hash_size),ke.prev=new a.Buf16(ke.w_size),ke.lit_bufsize=1\u003c\u003cTe+6,ke.pending_buf_size=4*ke.lit_bufsize,ke.pending_buf=new a.Buf8(ke.pending_buf_size),ke.d_buf=1*ke.lit_bufsize,ke.l_buf=3*ke.lit_bufsize,ke.level=Qe,ke.strategy=Re,ke.method=Pe,Me(he)}s=[new fe(0,0,0,0,function(he,Qe){var Pe=65535;for(Pe\u003ehe.pending_buf_size-5\u0026\u0026(Pe=he.pending_buf_size-5);;){if(he.lookahead\u003c=1){if(ge(he),he.lookahead===0\u0026\u0026Qe===g)return F;if(he.lookahead===0)break}he.strstart+=he.lookahead,he.lookahead=0;var we=he.block_start+Pe;if((he.strstart===0||he.strstart\u003e=we)\u0026\u0026(he.lookahead=he.strstart-we,he.strstart=we,oe(he,!1),he.strm.avail_out===0)||he.strstart-he.block_start\u003e=he.w_size-M\u0026\u0026(oe(he,!1),he.strm.avail_out===0))return F}return he.insert=0,Qe===h?(oe(he,!0),he.strm.avail_out===0?U:Y):(he.strstart\u003ehe.block_start\u0026\u0026(oe(he,!1),he.strm.avail_out),F)}),new fe(4,4,8,4,_e),new fe(4,5,16,8,_e),new fe(4,6,32,32,_e),new fe(4,4,16,16,ue),new fe(8,16,32,32,ue),new fe(8,16,128,128,ue),new fe(8,32,128,256,ue),new fe(32,128,258,1024,ue),new fe(32,258,258,4096,ue)],r.deflateInit=function(he,Qe){return ve(he,Qe,I,15,8,0)},r.deflateInit2=ve,r.deflateReset=Me,r.deflateResetKeep=ye,r.deflateSetHeader=function(he,Qe){return he\u0026\u0026he.state?he.state.wrap!==2?p:(he.state.gzhead=Qe,d):p},r.deflate=function(he,Qe){var Pe,we,Te,Re;if(!he||!he.state||5\u003cQe||Qe\u003c0)return he?W(he,p):p;if(we=he.state,!he.output||!he.input\u0026\u0026he.avail_in!==0||we.status===666\u0026\u0026Qe!==h)return W(he,he.avail_out===0?-5:p);if(we.strm=he,Pe=we.last_flush,we.last_flush=Qe,we.status===k)if(we.wrap===2)he.adler=0,ie(we,31),ie(we,139),ie(we,8),we.gzhead?(ie(we,(we.gzhead.text?1:0)+(we.gzhead.hcrc?2:0)+(we.gzhead.extra?4:0)+(we.gzhead.name?8:0)+(we.gzhead.comment?16:0)),ie(we,255\u0026we.gzhead.time),ie(we,we.gzhead.time\u003e\u003e8\u0026255),ie(we,we.gzhead.time\u003e\u003e16\u0026255),ie(we,we.gzhead.time\u003e\u003e24\u0026255),ie(we,we.level===9?2:2\u003c=we.strategy||we.level\u003c2?4:0),ie(we,255\u0026we.gzhead.os),we.gzhead.extra\u0026\u0026we.gzhead.extra.length\u0026\u0026(ie(we,255\u0026we.gzhead.extra.length),ie(we,we.gzhead.extra.length\u003e\u003e8\u0026255)),we.gzhead.hcrc\u0026\u0026(he.adler=l(he.adler,we.pending_buf,we.pending,0)),we.gzindex=0,we.status=69):(ie(we,0),ie(we,0),ie(we,0),ie(we,0),ie(we,0),ie(we,we.level===9?2:2\u003c=we.strategy||we.level\u003c2?4:0),ie(we,3),we.status=R);else{var Ee=I+(we.w_bits-8\u003c\u003c4)\u003c\u003c8;Ee|=(2\u003c=we.strategy||we.level\u003c2?0:we.level\u003c6?1:we.level===6?2:3)\u003c\u003c6,we.strstart!==0\u0026\u0026(Ee|=32),Ee+=31-Ee%31,we.status=R,ne(we,Ee),we.strstart!==0\u0026\u0026(ne(we,he.adler\u003e\u003e\u003e16),ne(we,65535\u0026he.adler)),he.adler=1}if(we.status===69)if(we.gzhead.extra){for(Te=we.pending;we.gzindex\u003c(65535\u0026we.gzhead.extra.length)\u0026\u0026(we.pending!==we.pending_buf_size||(we.gzhead.hcrc\u0026\u0026we.pending\u003eTe\u0026\u0026(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),J(he),Te=we.pending,we.pending!==we.pending_buf_size));)ie(we,255\u0026we.gzhead.extra[we.gzindex]),we.gzindex++;we.gzhead.hcrc\u0026\u0026we.pending\u003eTe\u0026\u0026(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),we.gzindex===we.gzhead.extra.length\u0026\u0026(we.gzindex=0,we.status=73)}else we.status=73;if(we.status===73)if(we.gzhead.name){Te=we.pending;do{if(we.pending===we.pending_buf_size\u0026\u0026(we.gzhead.hcrc\u0026\u0026we.pending\u003eTe\u0026\u0026(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),J(he),Te=we.pending,we.pending===we.pending_buf_size)){Re=1;break}Re=we.gzindex\u003cwe.gzhead.name.length?255\u0026we.gzhead.name.charCodeAt(we.gzindex++):0,ie(we,Re)}while(Re!==0);we.gzhead.hcrc\u0026\u0026we.pending\u003eTe\u0026\u0026(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),Re===0\u0026\u0026(we.gzindex=0,we.status=91)}else we.status=91;if(we.status===91)if(we.gzhead.comment){Te=we.pending;do{if(we.pending===we.pending_buf_size\u0026\u0026(we.gzhead.hcrc\u0026\u0026we.pending\u003eTe\u0026\u0026(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),J(he),Te=we.pending,we.pending===we.pending_buf_size)){Re=1;break}Re=we.gzindex\u003cwe.gzhead.comment.length?255\u0026we.gzhead.comment.charCodeAt(we.gzindex++):0,ie(we,Re)}while(Re!==0);we.gzhead.hcrc\u0026\u0026we.pending\u003eTe\u0026\u0026(he.adler=l(he.adler,we.pending_buf,we.pending-Te,Te)),Re===0\u0026\u0026(we.status=103)}else we.status=103;if(we.status===103\u0026\u0026(we.gzhead.hcrc?(we.pending+2\u003ewe.pending_buf_size\u0026\u0026J(he),we.pending+2\u003c=we.pending_buf_size\u0026\u0026(ie(we,255\u0026he.adler),ie(we,he.adler\u003e\u003e8\u0026255),he.adler=0,we.status=R)):we.status=R),we.pending!==0){if(J(he),he.avail_out===0)return we.last_flush=-1,d}else if(he.avail_in===0\u0026\u0026te(Qe)\u003c=te(Pe)\u0026\u0026Qe!==h)return W(he,-5);if(we.status===666\u0026\u0026he.avail_in!==0)return W(he,-5);if(he.avail_in!==0||we.lookahead!==0||Qe!==g\u0026\u0026we.status!==666){var ke=we.strategy===2?(function(Ce,Le){for(var Ye;;){if(Ce.lookahead===0\u0026\u0026(ge(Ce),Ce.lookahead===0)){if(Le===g)return F;break}if(Ce.match_length=0,Ye=A._tr_tally(Ce,0,Ce.window[Ce.strstart]),Ce.lookahead--,Ce.strstart++,Ye\u0026\u0026(oe(Ce,!1),Ce.strm.avail_out===0))return F}return Ce.insert=0,Le===h?(oe(Ce,!0),Ce.strm.avail_out===0?U:Y):Ce.last_lit\u0026\u0026(oe(Ce,!1),Ce.strm.avail_out===0)?F:O})(we,Qe):we.strategy===3?(function(Ce,Le){for(var Ye,tt,At,at,nt=Ce.window;;){if(Ce.lookahead\u003c=w){if(ge(Ce),Ce.lookahead\u003c=w\u0026\u0026Le===g)return F;if(Ce.lookahead===0)break}if(Ce.match_length=0,Ce.lookahead\u003e=Q\u0026\u00260\u003cCe.strstart\u0026\u0026(tt=nt[At=Ce.strstart-1])===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026tt===nt[++At]){at=Ce.strstart+w;do;while(tt===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026tt===nt[++At]\u0026\u0026At\u003cat);Ce.match_length=w-(at-At),Ce.match_length\u003eCe.lookahead\u0026\u0026(Ce.match_length=Ce.lookahead)}if(Ce.match_length\u003e=Q?(Ye=A._tr_tally(Ce,1,Ce.match_length-Q),Ce.lookahead-=Ce.match_length,Ce.strstart+=Ce.match_length,Ce.match_length=0):(Ye=A._tr_tally(Ce,0,Ce.window[Ce.strstart]),Ce.lookahead--,Ce.strstart++),Ye\u0026\u0026(oe(Ce,!1),Ce.strm.avail_out===0))return F}return Ce.insert=0,Le===h?(oe(Ce,!0),Ce.strm.avail_out===0?U:Y):Ce.last_lit\u0026\u0026(oe(Ce,!1),Ce.strm.avail_out===0)?F:O})(we,Qe):s[we.level].func(we,Qe);if(ke!==U\u0026\u0026ke!==Y||(we.status=666),ke===F||ke===U)return he.avail_out===0\u0026\u0026(we.last_flush=-1),d;if(ke===O\u0026\u0026(Qe===1?A._tr_align(we):Qe!==5\u0026\u0026(A._tr_stored_block(we,0,0,!1),Qe===3\u0026\u0026(j(we.head),we.lookahead===0\u0026\u0026(we.strstart=0,we.block_start=0,we.insert=0))),J(he),he.avail_out===0))return we.last_flush=-1,d}return Qe!==h?d:we.wrap\u003c=0?1:(we.wrap===2?(ie(we,255\u0026he.adler),ie(we,he.adler\u003e\u003e8\u0026255),ie(we,he.adler\u003e\u003e16\u0026255),ie(we,he.adler\u003e\u003e24\u0026255),ie(we,255\u0026he.total_in),ie(we,he.total_in\u003e\u003e8\u0026255),ie(we,he.total_in\u003e\u003e16\u0026255),ie(we,he.total_in\u003e\u003e24\u0026255)):(ne(we,he.adler\u003e\u003e\u003e16),ne(we,65535\u0026he.adler)),J(he),0\u003cwe.wrap\u0026\u0026(we.wrap=-we.wrap),we.pending!==0?d:1)},r.deflateEnd=function(he){var Qe;return he\u0026\u0026he.state?(Qe=he.state.status)!==k\u0026\u0026Qe!==69\u0026\u0026Qe!==73\u0026\u0026Qe!==91\u0026\u0026Qe!==103\u0026\u0026Qe!==R\u0026\u0026Qe!==666?W(he,p):(he.state=null,Qe===R?W(he,-3):d):p},r.deflateSetDictionary=function(he,Qe){var Pe,we,Te,Re,Ee,ke,Ce,Le,Ye=Qe.length;if(!he||!he.state||(Re=(Pe=he.state).wrap)===2||Re===1\u0026\u0026Pe.status!==k||Pe.lookahead)return p;for(Re===1\u0026\u0026(he.adler=c(he.adler,Qe,Ye,0)),Pe.wrap=0,Ye\u003e=Pe.w_size\u0026\u0026(Re===0\u0026\u0026(j(Pe.head),Pe.strstart=0,Pe.block_start=0,Pe.insert=0),Le=new a.Buf8(Pe.w_size),a.arraySet(Le,Qe,Ye-Pe.w_size,Pe.w_size,0),Qe=Le,Ye=Pe.w_size),Ee=he.avail_in,ke=he.next_in,Ce=he.input,he.avail_in=Ye,he.next_in=0,he.input=Qe,ge(Pe);Pe.lookahead\u003e=Q;){for(we=Pe.strstart,Te=Pe.lookahead-(Q-1);Pe.ins_h=(Pe.ins_h\u003c\u003cPe.hash_shift^Pe.window[we+Q-1])\u0026Pe.hash_mask,Pe.prev[we\u0026Pe.w_mask]=Pe.head[Pe.ins_h],Pe.head[Pe.ins_h]=we,we++,--Te;);Pe.strstart=we,Pe.lookahead=Q-1,ge(Pe)}return Pe.strstart+=Pe.lookahead,Pe.block_start=Pe.strstart,Pe.insert=Pe.lookahead,Pe.lookahead=0,Pe.match_length=Pe.prev_length=Q-1,Pe.match_available=0,he.next_in=ke,he.input=Ce,he.avail_in=Ee,Pe.wrap=Re,d},r.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":41,\"./adler32\":43,\"./crc32\":45,\"./messages\":51,\"./trees\":52}],47:[function(o,i,r){i.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}},{}],48:[function(o,i,r){i.exports=function(s,a){var A,c,l,u,g,h,d,p,m,_,f,I,C,y,x,E,B,S,Q,w,M,k,R,F,O;A=s.state,c=s.next_in,F=s.input,l=c+(s.avail_in-5),u=s.next_out,O=s.output,g=u-(a-s.avail_out),h=u+(s.avail_out-257),d=A.dmax,p=A.wsize,m=A.whave,_=A.wnext,f=A.window,I=A.hold,C=A.bits,y=A.lencode,x=A.distcode,E=(1\u003c\u003cA.lenbits)-1,B=(1\u003c\u003cA.distbits)-1;e:do{C\u003c15\u0026\u0026(I+=F[c++]\u003c\u003cC,C+=8,I+=F[c++]\u003c\u003cC,C+=8),S=y[I\u0026E];t:for(;;){if(I\u003e\u003e\u003e=Q=S\u003e\u003e\u003e24,C-=Q,(Q=S\u003e\u003e\u003e16\u0026255)===0)O[u++]=65535\u0026S;else{if(!(16\u0026Q)){if((64\u0026Q)==0){S=y[(65535\u0026S)+(I\u0026(1\u003c\u003cQ)-1)];continue t}if(32\u0026Q){A.mode=12;break e}s.msg=\"invalid literal/length code\",A.mode=30;break e}w=65535\u0026S,(Q\u0026=15)\u0026\u0026(C\u003cQ\u0026\u0026(I+=F[c++]\u003c\u003cC,C+=8),w+=I\u0026(1\u003c\u003cQ)-1,I\u003e\u003e\u003e=Q,C-=Q),C\u003c15\u0026\u0026(I+=F[c++]\u003c\u003cC,C+=8,I+=F[c++]\u003c\u003cC,C+=8),S=x[I\u0026B];n:for(;;){if(I\u003e\u003e\u003e=Q=S\u003e\u003e\u003e24,C-=Q,!(16\u0026(Q=S\u003e\u003e\u003e16\u0026255))){if((64\u0026Q)==0){S=x[(65535\u0026S)+(I\u0026(1\u003c\u003cQ)-1)];continue n}s.msg=\"invalid distance code\",A.mode=30;break e}if(M=65535\u0026S,C\u003c(Q\u0026=15)\u0026\u0026(I+=F[c++]\u003c\u003cC,(C+=8)\u003cQ\u0026\u0026(I+=F[c++]\u003c\u003cC,C+=8)),d\u003c(M+=I\u0026(1\u003c\u003cQ)-1)){s.msg=\"invalid distance too far back\",A.mode=30;break e}if(I\u003e\u003e\u003e=Q,C-=Q,(Q=u-g)\u003cM){if(m\u003c(Q=M-Q)\u0026\u0026A.sane){s.msg=\"invalid distance too far back\",A.mode=30;break e}if(R=f,(k=0)===_){if(k+=p-Q,Q\u003cw){for(w-=Q;O[u++]=f[k++],--Q;);k=u-M,R=O}}else if(_\u003cQ){if(k+=p+_-Q,(Q-=_)\u003cw){for(w-=Q;O[u++]=f[k++],--Q;);if(k=0,_\u003cw){for(w-=Q=_;O[u++]=f[k++],--Q;);k=u-M,R=O}}}else if(k+=_-Q,Q\u003cw){for(w-=Q;O[u++]=f[k++],--Q;);k=u-M,R=O}for(;2\u003cw;)O[u++]=R[k++],O[u++]=R[k++],O[u++]=R[k++],w-=3;w\u0026\u0026(O[u++]=R[k++],1\u003cw\u0026\u0026(O[u++]=R[k++]))}else{for(k=u-M;O[u++]=O[k++],O[u++]=O[k++],O[u++]=O[k++],2\u003c(w-=3););w\u0026\u0026(O[u++]=O[k++],1\u003cw\u0026\u0026(O[u++]=O[k++]))}break}}break}}while(c\u003cl\u0026\u0026u\u003ch);c-=w=C\u003e\u003e3,I\u0026=(1\u003c\u003c(C-=w\u003c\u003c3))-1,s.next_in=c,s.next_out=u,s.avail_in=c\u003cl?l-c+5:5-(c-l),s.avail_out=u\u003ch?h-u+257:257-(u-h),A.hold=I,A.bits=C}},{}],49:[function(o,i,r){var s=o(\"../utils/common\"),a=o(\"./adler32\"),A=o(\"./crc32\"),c=o(\"./inffast\"),l=o(\"./inftrees\"),u=1,g=2,h=0,d=-2,p=1,m=852,_=592;function f(k){return(k\u003e\u003e\u003e24\u0026255)+(k\u003e\u003e\u003e8\u002665280)+((65280\u0026k)\u003c\u003c8)+((255\u0026k)\u003c\u003c24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function C(k){var R;return k\u0026\u0026k.state?(R=k.state,k.total_in=k.total_out=R.total=0,k.msg=\"\",R.wrap\u0026\u0026(k.adler=1\u0026R.wrap),R.mode=p,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new s.Buf32(m),R.distcode=R.distdyn=new s.Buf32(_),R.sane=1,R.back=-1,h):d}function y(k){var R;return k\u0026\u0026k.state?((R=k.state).wsize=0,R.whave=0,R.wnext=0,C(k)):d}function x(k,R){var F,O;return k\u0026\u0026k.state?(O=k.state,R\u003c0?(F=0,R=-R):(F=1+(R\u003e\u003e4),R\u003c48\u0026\u0026(R\u0026=15)),R\u0026\u0026(R\u003c8||15\u003cR)?d:(O.window!==null\u0026\u0026O.wbits!==R\u0026\u0026(O.window=null),O.wrap=F,O.wbits=R,y(k))):d}function E(k,R){var F,O;return k?(O=new I,(k.state=O).window=null,(F=x(k,R))!==h\u0026\u0026(k.state=null),F):d}var B,S,Q=!0;function w(k){if(Q){var R;for(B=new s.Buf32(512),S=new s.Buf32(32),R=0;R\u003c144;)k.lens[R++]=8;for(;R\u003c256;)k.lens[R++]=9;for(;R\u003c280;)k.lens[R++]=7;for(;R\u003c288;)k.lens[R++]=8;for(l(u,k.lens,0,288,B,0,k.work,{bits:9}),R=0;R\u003c32;)k.lens[R++]=5;l(g,k.lens,0,32,S,0,k.work,{bits:5}),Q=!1}k.lencode=B,k.lenbits=9,k.distcode=S,k.distbits=5}function M(k,R,F,O){var U,Y=k.state;return Y.window===null\u0026\u0026(Y.wsize=1\u003c\u003cY.wbits,Y.wnext=0,Y.whave=0,Y.window=new s.Buf8(Y.wsize)),O\u003e=Y.wsize?(s.arraySet(Y.window,R,F-Y.wsize,Y.wsize,0),Y.wnext=0,Y.whave=Y.wsize):(O\u003c(U=Y.wsize-Y.wnext)\u0026\u0026(U=O),s.arraySet(Y.window,R,F-O,U,Y.wnext),(O-=U)?(s.arraySet(Y.window,R,F-O,O,0),Y.wnext=O,Y.whave=Y.wsize):(Y.wnext+=U,Y.wnext===Y.wsize\u0026\u0026(Y.wnext=0),Y.whave\u003cY.wsize\u0026\u0026(Y.whave+=U))),0}r.inflateReset=y,r.inflateReset2=x,r.inflateResetKeep=C,r.inflateInit=function(k){return E(k,15)},r.inflateInit2=E,r.inflate=function(k,R){var F,O,U,Y,W,te,j,J,oe,ie,ne,le,ge,_e,ue,fe,pe,ye,Me,ve,he,Qe,Pe,we,Te=0,Re=new s.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!k||!k.state||!k.output||!k.input\u0026\u0026k.avail_in!==0)return d;(F=k.state).mode===12\u0026\u0026(F.mode=13),W=k.next_out,U=k.output,j=k.avail_out,Y=k.next_in,O=k.input,te=k.avail_in,J=F.hold,oe=F.bits,ie=te,ne=j,Qe=h;e:for(;;)switch(F.mode){case p:if(F.wrap===0){F.mode=13;break}for(;oe\u003c16;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(2\u0026F.wrap\u0026\u0026J===35615){Re[F.check=0]=255\u0026J,Re[1]=J\u003e\u003e\u003e8\u0026255,F.check=A(F.check,Re,2,0),oe=J=0,F.mode=2;break}if(F.flags=0,F.head\u0026\u0026(F.head.done=!1),!(1\u0026F.wrap)||(((255\u0026J)\u003c\u003c8)+(J\u003e\u003e8))%31){k.msg=\"incorrect header check\",F.mode=30;break}if((15\u0026J)!=8){k.msg=\"unknown compression method\",F.mode=30;break}if(oe-=4,he=8+(15\u0026(J\u003e\u003e\u003e=4)),F.wbits===0)F.wbits=he;else if(he\u003eF.wbits){k.msg=\"invalid window size\",F.mode=30;break}F.dmax=1\u003c\u003che,k.adler=F.check=1,F.mode=512\u0026J?10:12,oe=J=0;break;case 2:for(;oe\u003c16;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(F.flags=J,(255\u0026F.flags)!=8){k.msg=\"unknown compression method\",F.mode=30;break}if(57344\u0026F.flags){k.msg=\"unknown header flags set\",F.mode=30;break}F.head\u0026\u0026(F.head.text=J\u003e\u003e8\u00261),512\u0026F.flags\u0026\u0026(Re[0]=255\u0026J,Re[1]=J\u003e\u003e\u003e8\u0026255,F.check=A(F.check,Re,2,0)),oe=J=0,F.mode=3;case 3:for(;oe\u003c32;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}F.head\u0026\u0026(F.head.time=J),512\u0026F.flags\u0026\u0026(Re[0]=255\u0026J,Re[1]=J\u003e\u003e\u003e8\u0026255,Re[2]=J\u003e\u003e\u003e16\u0026255,Re[3]=J\u003e\u003e\u003e24\u0026255,F.check=A(F.check,Re,4,0)),oe=J=0,F.mode=4;case 4:for(;oe\u003c16;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}F.head\u0026\u0026(F.head.xflags=255\u0026J,F.head.os=J\u003e\u003e8),512\u0026F.flags\u0026\u0026(Re[0]=255\u0026J,Re[1]=J\u003e\u003e\u003e8\u0026255,F.check=A(F.check,Re,2,0)),oe=J=0,F.mode=5;case 5:if(1024\u0026F.flags){for(;oe\u003c16;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}F.length=J,F.head\u0026\u0026(F.head.extra_len=J),512\u0026F.flags\u0026\u0026(Re[0]=255\u0026J,Re[1]=J\u003e\u003e\u003e8\u0026255,F.check=A(F.check,Re,2,0)),oe=J=0}else F.head\u0026\u0026(F.head.extra=null);F.mode=6;case 6:if(1024\u0026F.flags\u0026\u0026(te\u003c(le=F.length)\u0026\u0026(le=te),le\u0026\u0026(F.head\u0026\u0026(he=F.head.extra_len-F.length,F.head.extra||(F.head.extra=new Array(F.head.extra_len)),s.arraySet(F.head.extra,O,Y,le,he)),512\u0026F.flags\u0026\u0026(F.check=A(F.check,O,le,Y)),te-=le,Y+=le,F.length-=le),F.length))break e;F.length=0,F.mode=7;case 7:if(2048\u0026F.flags){if(te===0)break e;for(le=0;he=O[Y+le++],F.head\u0026\u0026he\u0026\u0026F.length\u003c65536\u0026\u0026(F.head.name+=String.fromCharCode(he)),he\u0026\u0026le\u003cte;);if(512\u0026F.flags\u0026\u0026(F.check=A(F.check,O,le,Y)),te-=le,Y+=le,he)break e}else F.head\u0026\u0026(F.head.name=null);F.length=0,F.mode=8;case 8:if(4096\u0026F.flags){if(te===0)break e;for(le=0;he=O[Y+le++],F.head\u0026\u0026he\u0026\u0026F.length\u003c65536\u0026\u0026(F.head.comment+=String.fromCharCode(he)),he\u0026\u0026le\u003cte;);if(512\u0026F.flags\u0026\u0026(F.check=A(F.check,O,le,Y)),te-=le,Y+=le,he)break e}else F.head\u0026\u0026(F.head.comment=null);F.mode=9;case 9:if(512\u0026F.flags){for(;oe\u003c16;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(J!==(65535\u0026F.check)){k.msg=\"header crc mismatch\",F.mode=30;break}oe=J=0}F.head\u0026\u0026(F.head.hcrc=F.flags\u003e\u003e9\u00261,F.head.done=!0),k.adler=F.check=0,F.mode=12;break;case 10:for(;oe\u003c32;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}k.adler=F.check=f(J),oe=J=0,F.mode=11;case 11:if(F.havedict===0)return k.next_out=W,k.avail_out=j,k.next_in=Y,k.avail_in=te,F.hold=J,F.bits=oe,2;k.adler=F.check=1,F.mode=12;case 12:if(R===5||R===6)break e;case 13:if(F.last){J\u003e\u003e\u003e=7\u0026oe,oe-=7\u0026oe,F.mode=27;break}for(;oe\u003c3;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}switch(F.last=1\u0026J,oe-=1,3\u0026(J\u003e\u003e\u003e=1)){case 0:F.mode=14;break;case 1:if(w(F),F.mode=20,R!==6)break;J\u003e\u003e\u003e=2,oe-=2;break e;case 2:F.mode=17;break;case 3:k.msg=\"invalid block type\",F.mode=30}J\u003e\u003e\u003e=2,oe-=2;break;case 14:for(J\u003e\u003e\u003e=7\u0026oe,oe-=7\u0026oe;oe\u003c32;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if((65535\u0026J)!=(J\u003e\u003e\u003e16^65535)){k.msg=\"invalid stored block lengths\",F.mode=30;break}if(F.length=65535\u0026J,oe=J=0,F.mode=15,R===6)break e;case 15:F.mode=16;case 16:if(le=F.length){if(te\u003cle\u0026\u0026(le=te),j\u003cle\u0026\u0026(le=j),le===0)break e;s.arraySet(U,O,Y,le,W),te-=le,Y+=le,j-=le,W+=le,F.length-=le;break}F.mode=12;break;case 17:for(;oe\u003c14;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(F.nlen=257+(31\u0026J),J\u003e\u003e\u003e=5,oe-=5,F.ndist=1+(31\u0026J),J\u003e\u003e\u003e=5,oe-=5,F.ncode=4+(15\u0026J),J\u003e\u003e\u003e=4,oe-=4,286\u003cF.nlen||30\u003cF.ndist){k.msg=\"too many length or distance symbols\",F.mode=30;break}F.have=0,F.mode=18;case 18:for(;F.have\u003cF.ncode;){for(;oe\u003c3;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}F.lens[Ee[F.have++]]=7\u0026J,J\u003e\u003e\u003e=3,oe-=3}for(;F.have\u003c19;)F.lens[Ee[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,Pe={bits:F.lenbits},Qe=l(0,F.lens,0,19,F.lencode,0,F.work,Pe),F.lenbits=Pe.bits,Qe){k.msg=\"invalid code lengths set\",F.mode=30;break}F.have=0,F.mode=19;case 19:for(;F.have\u003cF.nlen+F.ndist;){for(;fe=(Te=F.lencode[J\u0026(1\u003c\u003cF.lenbits)-1])\u003e\u003e\u003e16\u0026255,pe=65535\u0026Te,!((ue=Te\u003e\u003e\u003e24)\u003c=oe);){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(pe\u003c16)J\u003e\u003e\u003e=ue,oe-=ue,F.lens[F.have++]=pe;else{if(pe===16){for(we=ue+2;oe\u003cwe;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(J\u003e\u003e\u003e=ue,oe-=ue,F.have===0){k.msg=\"invalid bit length repeat\",F.mode=30;break}he=F.lens[F.have-1],le=3+(3\u0026J),J\u003e\u003e\u003e=2,oe-=2}else if(pe===17){for(we=ue+3;oe\u003cwe;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}oe-=ue,he=0,le=3+(7\u0026(J\u003e\u003e\u003e=ue)),J\u003e\u003e\u003e=3,oe-=3}else{for(we=ue+7;oe\u003cwe;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}oe-=ue,he=0,le=11+(127\u0026(J\u003e\u003e\u003e=ue)),J\u003e\u003e\u003e=7,oe-=7}if(F.have+le\u003eF.nlen+F.ndist){k.msg=\"invalid bit length repeat\",F.mode=30;break}for(;le--;)F.lens[F.have++]=he}}if(F.mode===30)break;if(F.lens[256]===0){k.msg=\"invalid code -- missing end-of-block\",F.mode=30;break}if(F.lenbits=9,Pe={bits:F.lenbits},Qe=l(u,F.lens,0,F.nlen,F.lencode,0,F.work,Pe),F.lenbits=Pe.bits,Qe){k.msg=\"invalid literal/lengths set\",F.mode=30;break}if(F.distbits=6,F.distcode=F.distdyn,Pe={bits:F.distbits},Qe=l(g,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,Pe),F.distbits=Pe.bits,Qe){k.msg=\"invalid distances set\",F.mode=30;break}if(F.mode=20,R===6)break e;case 20:F.mode=21;case 21:if(6\u003c=te\u0026\u0026258\u003c=j){k.next_out=W,k.avail_out=j,k.next_in=Y,k.avail_in=te,F.hold=J,F.bits=oe,c(k,ne),W=k.next_out,U=k.output,j=k.avail_out,Y=k.next_in,O=k.input,te=k.avail_in,J=F.hold,oe=F.bits,F.mode===12\u0026\u0026(F.back=-1);break}for(F.back=0;fe=(Te=F.lencode[J\u0026(1\u003c\u003cF.lenbits)-1])\u003e\u003e\u003e16\u0026255,pe=65535\u0026Te,!((ue=Te\u003e\u003e\u003e24)\u003c=oe);){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(fe\u0026\u0026(240\u0026fe)==0){for(ye=ue,Me=fe,ve=pe;fe=(Te=F.lencode[ve+((J\u0026(1\u003c\u003cye+Me)-1)\u003e\u003eye)])\u003e\u003e\u003e16\u0026255,pe=65535\u0026Te,!(ye+(ue=Te\u003e\u003e\u003e24)\u003c=oe);){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}J\u003e\u003e\u003e=ye,oe-=ye,F.back+=ye}if(J\u003e\u003e\u003e=ue,oe-=ue,F.back+=ue,F.length=pe,fe===0){F.mode=26;break}if(32\u0026fe){F.back=-1,F.mode=12;break}if(64\u0026fe){k.msg=\"invalid literal/length code\",F.mode=30;break}F.extra=15\u0026fe,F.mode=22;case 22:if(F.extra){for(we=F.extra;oe\u003cwe;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}F.length+=J\u0026(1\u003c\u003cF.extra)-1,J\u003e\u003e\u003e=F.extra,oe-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=23;case 23:for(;fe=(Te=F.distcode[J\u0026(1\u003c\u003cF.distbits)-1])\u003e\u003e\u003e16\u0026255,pe=65535\u0026Te,!((ue=Te\u003e\u003e\u003e24)\u003c=oe);){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if((240\u0026fe)==0){for(ye=ue,Me=fe,ve=pe;fe=(Te=F.distcode[ve+((J\u0026(1\u003c\u003cye+Me)-1)\u003e\u003eye)])\u003e\u003e\u003e16\u0026255,pe=65535\u0026Te,!(ye+(ue=Te\u003e\u003e\u003e24)\u003c=oe);){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}J\u003e\u003e\u003e=ye,oe-=ye,F.back+=ye}if(J\u003e\u003e\u003e=ue,oe-=ue,F.back+=ue,64\u0026fe){k.msg=\"invalid distance code\",F.mode=30;break}F.offset=pe,F.extra=15\u0026fe,F.mode=24;case 24:if(F.extra){for(we=F.extra;oe\u003cwe;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}F.offset+=J\u0026(1\u003c\u003cF.extra)-1,J\u003e\u003e\u003e=F.extra,oe-=F.extra,F.back+=F.extra}if(F.offset\u003eF.dmax){k.msg=\"invalid distance too far back\",F.mode=30;break}F.mode=25;case 25:if(j===0)break e;if(le=ne-j,F.offset\u003ele){if((le=F.offset-le)\u003eF.whave\u0026\u0026F.sane){k.msg=\"invalid distance too far back\",F.mode=30;break}ge=le\u003eF.wnext?(le-=F.wnext,F.wsize-le):F.wnext-le,le\u003eF.length\u0026\u0026(le=F.length),_e=F.window}else _e=U,ge=W-F.offset,le=F.length;for(j\u003cle\u0026\u0026(le=j),j-=le,F.length-=le;U[W++]=_e[ge++],--le;);F.length===0\u0026\u0026(F.mode=21);break;case 26:if(j===0)break e;U[W++]=F.length,j--,F.mode=21;break;case 27:if(F.wrap){for(;oe\u003c32;){if(te===0)break e;te--,J|=O[Y++]\u003c\u003coe,oe+=8}if(ne-=j,k.total_out+=ne,F.total+=ne,ne\u0026\u0026(k.adler=F.check=F.flags?A(F.check,U,ne,W-ne):a(F.check,U,ne,W-ne)),ne=j,(F.flags?J:f(J))!==F.check){k.msg=\"incorrect data check\",F.mode=30;break}oe=J=0}F.mode=28;case 28:if(F.wrap\u0026\u0026F.flags){for(;oe\u003c32;){if(te===0)break e;te--,J+=O[Y++]\u003c\u003coe,oe+=8}if(J!==(4294967295\u0026F.total)){k.msg=\"incorrect length check\",F.mode=30;break}oe=J=0}F.mode=29;case 29:Qe=1;break e;case 30:Qe=-3;break e;case 31:return-4;default:return d}return k.next_out=W,k.avail_out=j,k.next_in=Y,k.avail_in=te,F.hold=J,F.bits=oe,(F.wsize||ne!==k.avail_out\u0026\u0026F.mode\u003c30\u0026\u0026(F.mode\u003c27||R!==4))\u0026\u0026M(k,k.output,k.next_out,ne-k.avail_out)?(F.mode=31,-4):(ie-=k.avail_in,ne-=k.avail_out,k.total_in+=ie,k.total_out+=ne,F.total+=ne,F.wrap\u0026\u0026ne\u0026\u0026(k.adler=F.check=F.flags?A(F.check,U,ne,k.next_out-ne):a(F.check,U,ne,k.next_out-ne)),k.data_type=F.bits+(F.last?64:0)+(F.mode===12?128:0)+(F.mode===20||F.mode===15?256:0),(ie==0\u0026\u0026ne===0||R===4)\u0026\u0026Qe===h\u0026\u0026(Qe=-5),Qe)},r.inflateEnd=function(k){if(!k||!k.state)return d;var R=k.state;return R.window\u0026\u0026(R.window=null),k.state=null,h},r.inflateGetHeader=function(k,R){var F;return k\u0026\u0026k.state?(2\u0026(F=k.state).wrap)==0?d:((F.head=R).done=!1,h):d},r.inflateSetDictionary=function(k,R){var F,O=R.length;return k\u0026\u0026k.state?(F=k.state).wrap!==0\u0026\u0026F.mode!==11?d:F.mode===11\u0026\u0026a(1,R,O,0)!==F.check?-3:M(k,R,O,O)?(F.mode=31,-4):(F.havedict=1,h):d},r.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":41,\"./adler32\":43,\"./crc32\":45,\"./inffast\":48,\"./inftrees\":50}],50:[function(o,i,r){var s=o(\"../utils/common\"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],A=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];i.exports=function(u,g,h,d,p,m,_,f){var I,C,y,x,E,B,S,Q,w,M=f.bits,k=0,R=0,F=0,O=0,U=0,Y=0,W=0,te=0,j=0,J=0,oe=null,ie=0,ne=new s.Buf16(16),le=new s.Buf16(16),ge=null,_e=0;for(k=0;k\u003c=15;k++)ne[k]=0;for(R=0;R\u003cd;R++)ne[g[h+R]]++;for(U=M,O=15;1\u003c=O\u0026\u0026ne[O]===0;O--);if(O\u003cU\u0026\u0026(U=O),O===0)return p[m++]=20971520,p[m++]=20971520,f.bits=1,0;for(F=1;F\u003cO\u0026\u0026ne[F]===0;F++);for(U\u003cF\u0026\u0026(U=F),k=te=1;k\u003c=15;k++)if(te\u003c\u003c=1,(te-=ne[k])\u003c0)return-1;if(0\u003cte\u0026\u0026(u===0||O!==1))return-1;for(le[1]=0,k=1;k\u003c15;k++)le[k+1]=le[k]+ne[k];for(R=0;R\u003cd;R++)g[h+R]!==0\u0026\u0026(_[le[g[h+R]]++]=R);if(B=u===0?(oe=ge=_,19):u===1?(oe=a,ie-=257,ge=A,_e-=257,256):(oe=c,ge=l,-1),k=F,E=m,W=R=J=0,y=-1,x=(j=1\u003c\u003c(Y=U))-1,u===1\u0026\u0026852\u003cj||u===2\u0026\u0026592\u003cj)return 1;for(;;){for(S=k-W,w=_[R]\u003cB?(Q=0,_[R]):_[R]\u003eB?(Q=ge[_e+_[R]],oe[ie+_[R]]):(Q=96,0),I=1\u003c\u003ck-W,F=C=1\u003c\u003cY;p[E+(J\u003e\u003eW)+(C-=I)]=S\u003c\u003c24|Q\u003c\u003c16|w|0,C!==0;);for(I=1\u003c\u003ck-1;J\u0026I;)I\u003e\u003e=1;if(I!==0?(J\u0026=I-1,J+=I):J=0,R++,--ne[k]==0){if(k===O)break;k=g[h+_[R]]}if(U\u003ck\u0026\u0026(J\u0026x)!==y){for(W===0\u0026\u0026(W=U),E+=F,te=1\u003c\u003c(Y=k-W);Y+W\u003cO\u0026\u0026!((te-=ne[Y+W])\u003c=0);)Y++,te\u003c\u003c=1;if(j+=1\u003c\u003cY,u===1\u0026\u0026852\u003cj||u===2\u0026\u0026592\u003cj)return 1;p[y=J\u0026x]=U\u003c\u003c24|Y\u003c\u003c16|E-m|0}}return J!==0\u0026\u0026(p[E+J]=k-W\u003c\u003c24|64\u003c\u003c16|0),f.bits=U,0}},{\"../utils/common\":41}],51:[function(o,i,r){i.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],52:[function(o,i,r){var s=o(\"../utils/common\"),a=0,A=1;function c(Te){for(var Re=Te.length;0\u003c=--Re;)Te[Re]=0}var l=0,u=29,g=256,h=g+1+u,d=30,p=19,m=2*h+1,_=15,f=16,I=7,C=256,y=16,x=17,E=18,B=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=new Array(2*(h+2));c(M);var k=new Array(2*d);c(k);var R=new Array(512);c(R);var F=new Array(256);c(F);var O=new Array(u);c(O);var U,Y,W,te=new Array(d);function j(Te,Re,Ee,ke,Ce){this.static_tree=Te,this.extra_bits=Re,this.extra_base=Ee,this.elems=ke,this.max_length=Ce,this.has_stree=Te\u0026\u0026Te.length}function J(Te,Re){this.dyn_tree=Te,this.max_code=0,this.stat_desc=Re}function oe(Te){return Te\u003c256?R[Te]:R[256+(Te\u003e\u003e\u003e7)]}function ie(Te,Re){Te.pending_buf[Te.pending++]=255\u0026Re,Te.pending_buf[Te.pending++]=Re\u003e\u003e\u003e8\u0026255}function ne(Te,Re,Ee){Te.bi_valid\u003ef-Ee?(Te.bi_buf|=Re\u003c\u003cTe.bi_valid\u002665535,ie(Te,Te.bi_buf),Te.bi_buf=Re\u003e\u003ef-Te.bi_valid,Te.bi_valid+=Ee-f):(Te.bi_buf|=Re\u003c\u003cTe.bi_valid\u002665535,Te.bi_valid+=Ee)}function le(Te,Re,Ee){ne(Te,Ee[2*Re],Ee[2*Re+1])}function ge(Te,Re){for(var Ee=0;Ee|=1\u0026Te,Te\u003e\u003e\u003e=1,Ee\u003c\u003c=1,0\u003c--Re;);return Ee\u003e\u003e\u003e1}function _e(Te,Re,Ee){var ke,Ce,Le=new Array(_+1),Ye=0;for(ke=1;ke\u003c=_;ke++)Le[ke]=Ye=Ye+Ee[ke-1]\u003c\u003c1;for(Ce=0;Ce\u003c=Re;Ce++){var tt=Te[2*Ce+1];tt!==0\u0026\u0026(Te[2*Ce]=ge(Le[tt]++,tt))}}function ue(Te){var Re;for(Re=0;Re\u003ch;Re++)Te.dyn_ltree[2*Re]=0;for(Re=0;Re\u003cd;Re++)Te.dyn_dtree[2*Re]=0;for(Re=0;Re\u003cp;Re++)Te.bl_tree[2*Re]=0;Te.dyn_ltree[2*C]=1,Te.opt_len=Te.static_len=0,Te.last_lit=Te.matches=0}function fe(Te){8\u003cTe.bi_valid?ie(Te,Te.bi_buf):0\u003cTe.bi_valid\u0026\u0026(Te.pending_buf[Te.pending++]=Te.bi_buf),Te.bi_buf=0,Te.bi_valid=0}function pe(Te,Re,Ee,ke){var Ce=2*Re,Le=2*Ee;return Te[Ce]\u003cTe[Le]||Te[Ce]===Te[Le]\u0026\u0026ke[Re]\u003c=ke[Ee]}function ye(Te,Re,Ee){for(var ke=Te.heap[Ee],Ce=Ee\u003c\u003c1;Ce\u003c=Te.heap_len\u0026\u0026(Ce\u003cTe.heap_len\u0026\u0026pe(Re,Te.heap[Ce+1],Te.heap[Ce],Te.depth)\u0026\u0026Ce++,!pe(Re,ke,Te.heap[Ce],Te.depth));)Te.heap[Ee]=Te.heap[Ce],Ee=Ce,Ce\u003c\u003c=1;Te.heap[Ee]=ke}function Me(Te,Re,Ee){var ke,Ce,Le,Ye,tt=0;if(Te.last_lit!==0)for(;ke=Te.pending_buf[Te.d_buf+2*tt]\u003c\u003c8|Te.pending_buf[Te.d_buf+2*tt+1],Ce=Te.pending_buf[Te.l_buf+tt],tt++,ke===0?le(Te,Ce,Re):(le(Te,(Le=F[Ce])+g+1,Re),(Ye=B[Le])!==0\u0026\u0026ne(Te,Ce-=O[Le],Ye),le(Te,Le=oe(--ke),Ee),(Ye=S[Le])!==0\u0026\u0026ne(Te,ke-=te[Le],Ye)),tt\u003cTe.last_lit;);le(Te,C,Re)}function ve(Te,Re){var Ee,ke,Ce,Le=Re.dyn_tree,Ye=Re.stat_desc.static_tree,tt=Re.stat_desc.has_stree,At=Re.stat_desc.elems,at=-1;for(Te.heap_len=0,Te.heap_max=m,Ee=0;Ee\u003cAt;Ee++)Le[2*Ee]!==0?(Te.heap[++Te.heap_len]=at=Ee,Te.depth[Ee]=0):Le[2*Ee+1]=0;for(;Te.heap_len\u003c2;)Le[2*(Ce=Te.heap[++Te.heap_len]=at\u003c2?++at:0)]=1,Te.depth[Ce]=0,Te.opt_len--,tt\u0026\u0026(Te.static_len-=Ye[2*Ce+1]);for(Re.max_code=at,Ee=Te.heap_len\u003e\u003e1;1\u003c=Ee;Ee--)ye(Te,Le,Ee);for(Ce=At;Ee=Te.heap[1],Te.heap[1]=Te.heap[Te.heap_len--],ye(Te,Le,1),ke=Te.heap[1],Te.heap[--Te.heap_max]=Ee,Te.heap[--Te.heap_max]=ke,Le[2*Ce]=Le[2*Ee]+Le[2*ke],Te.depth[Ce]=(Te.depth[Ee]\u003e=Te.depth[ke]?Te.depth[Ee]:Te.depth[ke])+1,Le[2*Ee+1]=Le[2*ke+1]=Ce,Te.heap[1]=Ce++,ye(Te,Le,1),2\u003c=Te.heap_len;);Te.heap[--Te.heap_max]=Te.heap[1],(function(nt,gt){var bt,Ct,Dt,kt,it,Yt,pn=gt.dyn_tree,be=gt.max_code,et=gt.stat_desc.static_tree,It=gt.stat_desc.has_stree,Bt=gt.stat_desc.extra_bits,mt=gt.stat_desc.extra_base,st=gt.stat_desc.max_length,xt=0;for(kt=0;kt\u003c=_;kt++)nt.bl_count[kt]=0;for(pn[2*nt.heap[nt.heap_max]+1]=0,bt=nt.heap_max+1;bt\u003cm;bt++)st\u003c(kt=pn[2*pn[2*(Ct=nt.heap[bt])+1]+1]+1)\u0026\u0026(kt=st,xt++),pn[2*Ct+1]=kt,be\u003cCt||(nt.bl_count[kt]++,it=0,mt\u003c=Ct\u0026\u0026(it=Bt[Ct-mt]),Yt=pn[2*Ct],nt.opt_len+=Yt*(kt+it),It\u0026\u0026(nt.static_len+=Yt*(et[2*Ct+1]+it)));if(xt!==0){do{for(kt=st-1;nt.bl_count[kt]===0;)kt--;nt.bl_count[kt]--,nt.bl_count[kt+1]+=2,nt.bl_count[st]--,xt-=2}while(0\u003cxt);for(kt=st;kt!==0;kt--)for(Ct=nt.bl_count[kt];Ct!==0;)be\u003c(Dt=nt.heap[--bt])||(pn[2*Dt+1]!==kt\u0026\u0026(nt.opt_len+=(kt-pn[2*Dt+1])*pn[2*Dt],pn[2*Dt+1]=kt),Ct--)}})(Te,Re),_e(Le,at,Te.bl_count)}function he(Te,Re,Ee){var ke,Ce,Le=-1,Ye=Re[1],tt=0,At=7,at=4;for(Ye===0\u0026\u0026(At=138,at=3),Re[2*(Ee+1)+1]=65535,ke=0;ke\u003c=Ee;ke++)Ce=Ye,Ye=Re[2*(ke+1)+1],++tt\u003cAt\u0026\u0026Ce===Ye||(tt\u003cat?Te.bl_tree[2*Ce]+=tt:Ce!==0?(Ce!==Le\u0026\u0026Te.bl_tree[2*Ce]++,Te.bl_tree[2*y]++):tt\u003c=10?Te.bl_tree[2*x]++:Te.bl_tree[2*E]++,Le=Ce,at=(tt=0)===Ye?(At=138,3):Ce===Ye?(At=6,3):(At=7,4))}function Qe(Te,Re,Ee){var ke,Ce,Le=-1,Ye=Re[1],tt=0,At=7,at=4;for(Ye===0\u0026\u0026(At=138,at=3),ke=0;ke\u003c=Ee;ke++)if(Ce=Ye,Ye=Re[2*(ke+1)+1],!(++tt\u003cAt\u0026\u0026Ce===Ye)){if(tt\u003cat)for(;le(Te,Ce,Te.bl_tree),--tt!=0;);else Ce!==0?(Ce!==Le\u0026\u0026(le(Te,Ce,Te.bl_tree),tt--),le(Te,y,Te.bl_tree),ne(Te,tt-3,2)):tt\u003c=10?(le(Te,x,Te.bl_tree),ne(Te,tt-3,3)):(le(Te,E,Te.bl_tree),ne(Te,tt-11,7));Le=Ce,at=(tt=0)===Ye?(At=138,3):Ce===Ye?(At=6,3):(At=7,4)}}c(te);var Pe=!1;function we(Te,Re,Ee,ke){ne(Te,(l\u003c\u003c1)+(ke?1:0),3),(function(Ce,Le,Ye,tt){fe(Ce),ie(Ce,Ye),ie(Ce,~Ye),s.arraySet(Ce.pending_buf,Ce.window,Le,Ye,Ce.pending),Ce.pending+=Ye})(Te,Re,Ee)}r._tr_init=function(Te){Pe||((function(){var Re,Ee,ke,Ce,Le,Ye=new Array(_+1);for(Ce=ke=0;Ce\u003cu-1;Ce++)for(O[Ce]=ke,Re=0;Re\u003c1\u003c\u003cB[Ce];Re++)F[ke++]=Ce;for(F[ke-1]=Ce,Ce=Le=0;Ce\u003c16;Ce++)for(te[Ce]=Le,Re=0;Re\u003c1\u003c\u003cS[Ce];Re++)R[Le++]=Ce;for(Le\u003e\u003e=7;Ce\u003cd;Ce++)for(te[Ce]=Le\u003c\u003c7,Re=0;Re\u003c1\u003c\u003cS[Ce]-7;Re++)R[256+Le++]=Ce;for(Ee=0;Ee\u003c=_;Ee++)Ye[Ee]=0;for(Re=0;Re\u003c=143;)M[2*Re+1]=8,Re++,Ye[8]++;for(;Re\u003c=255;)M[2*Re+1]=9,Re++,Ye[9]++;for(;Re\u003c=279;)M[2*Re+1]=7,Re++,Ye[7]++;for(;Re\u003c=287;)M[2*Re+1]=8,Re++,Ye[8]++;for(_e(M,h+1,Ye),Re=0;Re\u003cd;Re++)k[2*Re+1]=5,k[2*Re]=ge(Re,5);U=new j(M,B,g+1,h,_),Y=new j(k,S,0,d,_),W=new j(new Array(0),Q,0,p,I)})(),Pe=!0),Te.l_desc=new J(Te.dyn_ltree,U),Te.d_desc=new J(Te.dyn_dtree,Y),Te.bl_desc=new J(Te.bl_tree,W),Te.bi_buf=0,Te.bi_valid=0,ue(Te)},r._tr_stored_block=we,r._tr_flush_block=function(Te,Re,Ee,ke){var Ce,Le,Ye=0;0\u003cTe.level?(Te.strm.data_type===2\u0026\u0026(Te.strm.data_type=(function(tt){var At,at=4093624447;for(At=0;At\u003c=31;At++,at\u003e\u003e\u003e=1)if(1\u0026at\u0026\u0026tt.dyn_ltree[2*At]!==0)return a;if(tt.dyn_ltree[18]!==0||tt.dyn_ltree[20]!==0||tt.dyn_ltree[26]!==0)return A;for(At=32;At\u003cg;At++)if(tt.dyn_ltree[2*At]!==0)return A;return a})(Te)),ve(Te,Te.l_desc),ve(Te,Te.d_desc),Ye=(function(tt){var At;for(he(tt,tt.dyn_ltree,tt.l_desc.max_code),he(tt,tt.dyn_dtree,tt.d_desc.max_code),ve(tt,tt.bl_desc),At=p-1;3\u003c=At\u0026\u0026tt.bl_tree[2*w[At]+1]===0;At--);return tt.opt_len+=3*(At+1)+5+5+4,At})(Te),Ce=Te.opt_len+3+7\u003e\u003e\u003e3,(Le=Te.static_len+3+7\u003e\u003e\u003e3)\u003c=Ce\u0026\u0026(Ce=Le)):Ce=Le=Ee+5,Ee+4\u003c=Ce\u0026\u0026Re!==-1?we(Te,Re,Ee,ke):Te.strategy===4||Le===Ce?(ne(Te,2+(ke?1:0),3),Me(Te,M,k)):(ne(Te,4+(ke?1:0),3),(function(tt,At,at,nt){var gt;for(ne(tt,At-257,5),ne(tt,at-1,5),ne(tt,nt-4,4),gt=0;gt\u003cnt;gt++)ne(tt,tt.bl_tree[2*w[gt]+1],3);Qe(tt,tt.dyn_ltree,At-1),Qe(tt,tt.dyn_dtree,at-1)})(Te,Te.l_desc.max_code+1,Te.d_desc.max_code+1,Ye+1),Me(Te,Te.dyn_ltree,Te.dyn_dtree)),ue(Te),ke\u0026\u0026fe(Te)},r._tr_tally=function(Te,Re,Ee){return Te.pending_buf[Te.d_buf+2*Te.last_lit]=Re\u003e\u003e\u003e8\u0026255,Te.pending_buf[Te.d_buf+2*Te.last_lit+1]=255\u0026Re,Te.pending_buf[Te.l_buf+Te.last_lit]=255\u0026Ee,Te.last_lit++,Re===0?Te.dyn_ltree[2*Ee]++:(Te.matches++,Re--,Te.dyn_ltree[2*(F[Ee]+g+1)]++,Te.dyn_dtree[2*oe(Re)]++),Te.last_lit===Te.lit_bufsize-1},r._tr_align=function(Te){ne(Te,2,3),le(Te,C,M),(function(Re){Re.bi_valid===16?(ie(Re,Re.bi_buf),Re.bi_buf=0,Re.bi_valid=0):8\u003c=Re.bi_valid\u0026\u0026(Re.pending_buf[Re.pending++]=255\u0026Re.bi_buf,Re.bi_buf\u003e\u003e=8,Re.bi_valid-=8)})(Te)}},{\"../utils/common\":41}],53:[function(o,i,r){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(o,i,r){(function(s){(function(a,A){if(!a.setImmediate){var c,l,u,g,h=1,d={},p=!1,m=a.document,_=Object.getPrototypeOf\u0026\u0026Object.getPrototypeOf(a);_=_\u0026\u0026_.setTimeout?_:a,c={}.toString.call(a.process)===\"[object process]\"?function(y){n.nextTick(function(){I(y)})}:(function(){if(a.postMessage\u0026\u0026!a.importScripts){var y=!0,x=a.onmessage;return a.onmessage=function(){y=!1},a.postMessage(\"\",\"*\"),a.onmessage=x,y}})()?(g=\"setImmediate$\"+Math.random()+\"$\",a.addEventListener?a.addEventListener(\"message\",C,!1):a.attachEvent(\"onmessage\",C),function(y){a.postMessage(g+y,\"*\")}):a.MessageChannel?((u=new MessageChannel).port1.onmessage=function(y){I(y.data)},function(y){u.port2.postMessage(y)}):m\u0026\u0026\"onreadystatechange\"in m.createElement(\"script\")?(l=m.documentElement,function(y){var x=m.createElement(\"script\");x.onreadystatechange=function(){I(y),x.onreadystatechange=null,l.removeChild(x),x=null},l.appendChild(x)}):function(y){setTimeout(I,0,y)},_.setImmediate=function(y){typeof y!=\"function\"\u0026\u0026(y=new Function(\"\"+y));for(var x=new Array(arguments.length-1),E=0;E\u003cx.length;E++)x[E]=arguments[E+1];var B={callback:y,args:x};return d[h]=B,c(h),h++},_.clearImmediate=f}function f(y){delete d[y]}function I(y){if(p)setTimeout(I,0,y);else{var x=d[y];if(x){p=!0;try{(function(E){var B=E.callback,S=E.args;switch(S.length){case 0:B();break;case 1:B(S[0]);break;case 2:B(S[0],S[1]);break;case 3:B(S[0],S[1],S[2]);break;default:B.apply(A,S)}})(x)}finally{f(y),p=!1}}}}function C(y){y.source===a\u0026\u0026typeof y.data==\"string\"\u0026\u0026y.data.indexOf(g)===0\u0026\u0026I(+y.data.slice(g.length))}})(typeof self\u003e\"u\"?s===void 0?this:s:self)}).call(this,typeof my\u003c\"u\"?my:typeof self\u003c\"u\"?self:typeof window\u003c\"u\"?window:{})},{}]},{},[10])(10)})})(Aqe)),Aqe.exports}var LUi=FUi();const xfe=_y(LUi),HUi=async({circuitJson:t,projectName:e})=\u003e{await ua.promise((async()=\u003e{const n=new xfe,[o,{convertCircuitJsonToBomRows:i,convertBomRowsToCsv:r},{convertCircuitJsonToPickAndPlaceCsv:s}]=await Promise.all([DE(\"circuit-json-to-gerber\"),DE(\"circuit-json-to-bom-csv\"),DE(\"circuit-json-to-pnp-csv\")]),a=t.filter(h=\u003e!(\"error_type\"in h)\u0026\u0026!(\"warning_type\"in h)),A=o.convertCircuitJsonToGerberFiles(a,{flip_y_axis:!1});for(const[h,d]of Object.entries(A))n.file(`gerber/${h}`,d);const c=await i({circuitJson:t}),l=await r(c);n.file(\"bom.csv\",l);const u=await s(t,{supplier:\"jlcpcb\"});n.file(\"pick_and_place.csv\",u);const g=await n.generateAsync({type:\"blob\"});kE(g,{fileName:`${e}_fabrication_files.zip`})})(),{loading:\"Generating fabrication files...\",success:\"Fabrication ZIP ready\",error:n=\u003e`Failed to generate fabrication files: ${n instanceof Error?n.message:String(n)}`})},OUi=async t=\u003e{const{createFdmComponentBox:e,renderFdmComponentBoxPng:n}=await DE(\"circuit-json-to-fdm-component-box\"),[o,i]=await Promise.all([e(t),n(t,{},{width:960,height:640})]);return{...o,previewPng:i}},GUi=async t=\u003e{const{createFdmComponentBox:e}=await DE(\"circuit-json-to-fdm-component-box\");return e(t)},$pn=({generatedBox:t,projectName:e})=\u003e{const n=Uint8Array.from(t.threeMf);kE(new Blob([n.buffer],{type:\"model/3mf\"}),{fileName:`${N$e(e)}-component-box.3mf`})},YUi=async({circuitJson:t,projectName:e})=\u003e{await ua.promise((async()=\u003e{const n=await GUi(t);$pn({generatedBox:n,projectName:e})})(),{loading:\"Generating component box...\",success:\"Component box 3MF ready\",error:n=\u003e`Failed to generate component box: ${n instanceof Error?n.message:String(n)}`})},UUi=async({circuitJson:t,projectName:e})=\u003e{let n;try{const{convertCircuitJsonToGltf:o}=await DE(\"circuit-json-to-gltf\");console.log(\"convertCircuitJsonToGltf\",o);const i=await o(t,{format:\"glb\",boardTextureResolution:1024});if(!i||!(i instanceof ArrayBuffer))throw new Error(\"Invalid GLB data returned from converter\");n=new Blob([i],{type:\"model/gltf-binary\"})}catch(o){console.error(\"GLB Export Error:\",o);return}kE(n,{fileName:`${e}.glb`})},KUi=async({circuitJson:t,libraryName:e})=\u003e{const{CircuitJsonToKicadLibraryConverter:n}=await DE(\"circuit-json-to-kicad\"),o=new n(t,{libraryName:e,footprintLibraryName:e});o.runUntilFinished();const i=o.getOutput(),r=new xfe;r.file(`${e}.kicad_sym`,i.kicadSymString);for(const s of i.footprints){const a=r.folder(`${e}.pretty`);a\u0026\u0026a.file(`${s.footprintName}.kicad_mod`,`${s.kicadModString}\n`)}if(i.model3dSourcePaths.length\u003e0){const s=r.folder(`${e}.3dshapes`);if(s)for(const a of i.model3dSourcePaths)try{const A=a.split(\"/\").pop()||a,c=await fetch(a);if(c.ok){const l=await c.arrayBuffer();s.file(A,l)}}catch{}}return r.file(\"fp-lib-table\",i.fpLibTableString),r.file(\"sym-lib-table\",i.symLibTableString),r},VUi=async({circuitJson:t,projectName:e})=\u003e{await ua.promise((async()=\u003e{const o=await(await KUi({circuitJson:t,libraryName:e})).generateAsync({type:\"blob\"});kE(o,{fileName:`${e}_kicad_library.zip`})})(),{loading:\"Generating KiCad library...\",success:\"KiCad library ZIP ready\",error:n=\u003e`Failed to generate KiCad library: ${n instanceof Error?n.message:String(n)}`})},zUi=async({circuitJson:t,projectName:e})=\u003e{const{CircuitJsonToKicadPcbConverter:n,CircuitJsonToKicadSchConverter:o,CircuitJsonToKicadProConverter:i,resolveAndLoadKicad3dModelFiles:r}=await DE(\"circuit-json-to-kicad\"),s=new o(t);s.runUntilFinished();const a=s.getOutputString(),A=new n(t,{includeBuiltin3dModels:!0,projectName:e});A.runUntilFinished();const c=A.getOutputString(),l=new i(t,{projectName:e,schematicFilename:`${e}.kicad_sch`,pcbFilename:`${e}.kicad_pcb`});l.runUntilFinished();const u=l.getOutputString(),g=new xfe;return g.file(`${e}.kicad_sch`,a),g.file(`${e}.kicad_pcb`,c),g.file(`${e}.kicad_pro`,u),await r({projectName:e,model3dSourcePaths:A.getModel3dSourcePaths(),fetch,onModelFile:({outputPath:h,content:d})=\u003e{g.file(h,d)},onError:({sourcePath:h})=\u003e{console.warn(`Failed to load 3D model from ${h}`)}}),g},JUi=async({circuitJson:t,projectName:e})=\u003e{await ua.promise((async()=\u003e{const o=await(await zUi({circuitJson:t,projectName:e})).generateAsync({type:\"blob\"});kE(o,{fileName:`${e}_kicad_project.zip`})})(),{loading:\"Generating KiCad project...\",success:\"KiCad project ZIP ready\",error:n=\u003e`Failed to generate KiCad project: ${n instanceof Error?n.message:String(n)}`})},qpn=async({circuitJson:t,projectName:e,options:n={}})=\u003e{try{const{convertCircuitJsonToLbrn:o}=await DE(\"circuit-json-to-lbrn\"),r=(await o(t,{includeSilkscreen:n.includeSilkscreen??!1,includeOxidationCleaningLayer:n.includeOxidationCleaningLayer??!0})).toXml(),s=new Blob([r],{type:\"application/lbrn\"});kE(s,{fileName:`${e}.lbrn2`})}catch(o){const i=o instanceof Error?o.message:\"Unknown error\";ua.error(`Failed to export to LBRN format: ${i}`)}},WUi=async({circuitJson:t,projectName:e})=\u003e{const{convertCircuitJsonToPinoutSvg:n}=await DE(\"circuit-to-svg\"),o=n(t);kE(o,{fileName:`${e}-pinout.svg`,mimeType:\"image/svg+xml\"})},jUi=async({circuitJson:t,projectName:e})=\u003e{const{circuitJsonToStep:n}=await DE(\"circuit-json-to-step\"),o=t.find(c=\u003ec.type===\"pcb_board\"),i=o\u0026\u0026\"width\"in o?o.width:void 0,r=o\u0026\u0026\"height\"in o?o.height:void 0,s=o\u0026\u0026\"thickness\"in o?o.thickness:void 0;if(i===void 0||r===void 0||s===void 0){ua.error(\"Board dimensions not found. Please add a pcb_board with width, height, and thickness to your circuit.\");return}let a;try{a=await n(t,{boardWidth:i,boardHeight:r,boardThickness:s,productName:e,includeComponents:!0,includeExternalMeshes:!0})}catch(c){const l=c instanceof Error?c.message:\"Unknown error\";ua.error(`Failed to convert circuit to STEP format: ${l}`);return}const A=new Blob([a],{type:\"application/step\"});try{kE(A,{fileName:`${e}.step`})}catch(c){const l=c instanceof Error?c.message:\"Unknown error\";ua.error(`Failed to download STEP file: ${l}`)}},$Ui=[{extension:\"json\",name:\"Circuit JSON\"},{extension:\"json\",name:\"Simple Route JSON\"},{extension:\"zip\",name:\"Fabrication Files\"},{extension:\"zip\",name:\"KiCad Project\"},{extension:\"zip\",name:\"Altium Project\"},{extension:\"zip\",name:\"KiCad Library\"},{extension:\"glb\",name:\"GLB (Binary GLTF)\"},{extension:\"svg\",name:\"Pinout SVG\"},{extension:\"step\",name:\"STEP\"},{extension:\"lbrn2\",name:\"LightBurn\"}],qUi=async({exportName:t,circuitJson:e,simpleRouteJson:n,projectName:o})=\u003e{const i=N$e(o);if(t===\"Fabrication Files\"){await HUi({circuitJson:e,projectName:i});return}if(t===\"KiCad Project\"){await JUi({circuitJson:e,projectName:i});return}if(t===\"Altium Project\"){await kUi({circuitJson:e,projectName:i});return}if(t===\"KiCad Library\"){await VUi({circuitJson:e,projectName:i});return}if(t===\"Circuit JSON\"){kE(JSON.stringify(e,null,2),{fileName:`${i}.circuit.json`,mimeType:\"application/json\"});return}if(t===\"Simple Route JSON\"){if(!n)throw new Error(\"No Simple Route JSON available to export\");kE(JSON.stringify(n,null,2),{fileName:`${i}.simple-route.json`,mimeType:\"application/json\"});return}if(t===\"GLB (Binary GLTF)\"){await UUi({circuitJson:e,projectName:i});return}if(t===\"Pinout SVG\"){WUi({circuitJson:e,projectName:i});return}if(t===\"STEP\"){await jUi({circuitJson:e,projectName:i});return}if(t===\"Component Box (3MF)\"){await YUi({circuitJson:e,projectName:i});return}if(t===\"LightBurn\"){await qpn({circuitJson:e,projectName:i});return}throw new Error(`Unsupported export type: \"${t}\"`)},XUi=({packageName:t,onSelectReview:e})=\u003e{const n=md(u=\u003eu.fsMap),o=md(u=\u003eu.circuitJson),[i,r]=ee.useState([]),[s,a]=ee.useState(!1),[A,c]=ee.useState(!1);ee.useEffect(()=\u003e{!t||!zge()||(a(!0),gq.get(\"ai_reviews/list\",{searchParams:{package_name:t}}).json().then(u=\u003er(u.ai_reviews)).catch(u=\u003e{console.error(\"Failed to load AI reviews\",u),ua.error(\"Failed to load AI reviews\")}).finally(()=\u003ea(!1)))},[t]);const l=async()=\u003e{if(!o){ua.error(\"Need Circuit JSON to Request AI Review\");return}if(!zge()){ua.error(\"Missing registry token\");return}c(!0);try{const{ai_review:u}=await gq.post(\"ai_reviews/create\",{json:{package_name:t??\"unknown\",fs_map:Object.fromEntries(n),circuit_json:o}}).json();r(g=\u003e[u,...g]),e(u),ua.success(\"AI review requested\")}catch(u){console.error(\"Failed to create AI review\",u),ua.error(\"Failed to request AI review\")}finally{c(!1)}};return K.jsxs(K.Fragment,{children:[K.jsxs(zP,{children:[K.jsx(JP,{children:\"AI Review\"}),K.jsx(VT,{children:\"Select an AI review or request a new one.\"})]}),K.jsx(\"div\",{className:\"rf-flex rf-gap-4 rf-mt-4\",children:K.jsx(\"div\",{className:\"rf-w-48 rf-h-64 rf-overflow-y-auto rf-border rf-rounded rf-p-2 rf-flex-shrink-0\",children:s?K.jsx(\"div\",{className:\"rf-text-sm\",children:\"Loading...\"}):i.length\u003e0?i.map(u=\u003eK.jsx(\"div\",{className:\"rf-text-sm rf-p-2 rf-cursor-pointer rf-rounded hover:rf-bg-zinc-100\",onClick:()=\u003ee(u),children:new Date(u.created_at||\"\").toLocaleString()},u.ai_review_id)):K.jsx(\"div\",{className:\"rf-text-sm rf-text-muted-foreground\",children:\"No AI reviews found.\"})})}),K.jsx(jU,{className:\"rf-mt-4\",children:K.jsx(fA,{onClick:l,disabled:A,children:A?\"Requesting...\":\"Review my Board\"})})]})};function cqe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zT=cqe();function Xpn(t){zT=t}var xee={exec:()=\u003enull};function L0(t,e=\"\"){let n=typeof t==\"string\"?t:t.source;const o={replace:(i,r)=\u003e{let s=typeof r==\"string\"?r:r.source;return s=s.replace(g2.caret,\"$1\"),n=n.replace(i,s),o},getRegex:()=\u003enew RegExp(n,e)};return o}var g2={codeRemoveIndent:/^(?: {1,4}| {0,3}\\t)/gm,outputLinkReplace:/\\\\([\\[\\]])/g,indentCodeCompensation:/^(\\s+)(?:```)/,beginningSpace:/^\\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\\n/g,tabCharGlobal:/\\t/g,multipleSpaceGlobal:/\\s+/g,blankLine:/^[ \\t]*$/,doubleBlankLine:/\\n[ \\t]*\\n[ \\t]*$/,blockquoteStart:/^ {0,3}\u003e/,blockquoteSetextReplace:/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g,blockquoteSetextReplace2:/^ {0,3}\u003e[ \\t]?/gm,listReplaceTabs:/^\\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\\[[ xX]\\] /,listReplaceTask:/^\\[[ xX]\\] +/,anyLine:/\\n.*\\n/,hrefBrackets:/^\u003c(.*)\u003e$/,tableDelimiter:/[:|]/,tableAlignChars:/^\\||\\| *$/g,tableRowBlankLine:/\\n[ \\t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^\u003ca /i,endATag:/^\u003c\\/a\u003e/i,startPreScriptTag:/^\u003c(pre|code|kbd|script)(\\s|\u003e)/i,endPreScriptTag:/^\u003c\\/(pre|code|kbd|script)(\\s|\u003e)/i,startAngleBracket:/^\u003c/,endAngleBracket:/\u003e$/,pedanticHrefTitle:/^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/,unicodeAlphaNumeric:/[\\p{L}\\p{N}]/u,escapeTest:/[\u0026\u003c\u003e\"']/,escapeReplace:/[\u0026\u003c\u003e\"']/g,escapeTestNoEncode:/[\u003c\u003e\"']|\u0026(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/,escapeReplaceNoEncode:/[\u003c\u003e\"']|\u0026(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/g,unescapeTest:/\u0026(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig,caret:/(^|[^\\[])\\^/g,percentDecode:/%25/g,findPipe:/\\|/g,splitPipe:/ \\|/,slashPipe:/\\\\\\|/g,carriageReturn:/\\r\\n|\\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\\S*/,endingNewline:/\\n$/,listItemRegex:t=\u003enew RegExp(`^( {0,3}${t})((?:[\t ][^\\\\n]*)?(?:\\\\n|$))`),nextBulletRegex:t=\u003enew RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \t][^\\\\n]*)?(?:\\\\n|$))`),hrRegex:t=\u003enew RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`),fencesBeginRegex:t=\u003enew RegExp(`^ {0,${Math.min(3,t-1)}}(?:\\`\\`\\`|~~~)`),headingBeginRegex:t=\u003enew RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=\u003enew RegExp(`^ {0,${Math.min(3,t-1)}}\u003c(?:[a-z].*\u003e|!--)`,\"i\")},ZUi=/^(?:[ \\t]*(?:\\n|$))+/,eKi=/^((?: {4}| {0,3}\\t)[^\\n]+(?:\\n(?:[ \\t]*(?:\\n|$))*)?)+/,tKi=/^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,Eee=/^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,nKi=/^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,lqe=/(?:[*+-]|\\d{1,9}[.)])/,Zpn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,emn=L0(Zpn).replace(/bull/g,lqe).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}\u003e/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}\u003c[^\\n\u003e]+\u003e\\n/).replace(/\\|table/g,\"\").getRegex(),oKi=L0(Zpn).replace(/bull/g,lqe).replace(/blockCode/g,/(?: {4}| {0,3}\\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}\u003e/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}\u003c[^\\n\u003e]+\u003e\\n/).replace(/table/g,/ {0,3}\\|?(?:[:\\- ]*\\|)+[\\:\\- ]*\\n/).getRegex(),uqe=/^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,iKi=/^[^\\n]+/,gqe=/(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/,rKi=L0(/^ {0,3}\\[(label)\\]: *(?:\\n[ \\t]*)?([^\u003c\\s][^\\s]*|\u003c.*?\u003e)(?:(?: +(?:\\n[ \\t]*)?| *\\n[ \\t]*)(title))? *(?:\\n+|$)/).replace(\"label\",gqe).replace(\"title\",/(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/).getRegex(),sKi=L0(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/).replace(/bull/g,lqe).getRegex(),Efe=\"address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul\",dqe=/\u003c!--(?:-?\u003e|[\\s\\S]*?(?:--\u003e|$))/,aKi=L0(\"^ {0,3}(?:\u003c(script|pre|style|textarea)[\\\\s\u003e][\\\\s\\\\S]*?(?:\u003c/\\\\1\u003e[^\\\\n]*\\\\n+|$)|comment[^\\\\n]*(\\\\n+|$)|\u003c\\\\?[\\\\s\\\\S]*?(?:\\\\?\u003e\\\\n*|$)|\u003c![A-Z][\\\\s\\\\S]*?(?:\u003e\\\\n*|$)|\u003c!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]\u003e\\\\n*|$)|\u003c/?(tag)(?: +|\\\\n|/?\u003e)[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|\u003c(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?\u003e(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$)|\u003c/(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*\u003e(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n[ \t]*)+\\\\n|$))\",\"i\").replace(\"comment\",dqe).replace(\"tag\",Efe).replace(\"attribute\",/ +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=\u003c\u003e`]+)?/).getRegex(),tmn=L0(uqe).replace(\"hr\",Eee).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}\u003e\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)]) \").replace(\"html\",\"\u003c/?(?:tag)(?: +|\\\\n|/?\u003e)|\u003c(?:script|pre|style|textarea|!--)\").replace(\"tag\",Efe).getRegex(),AKi=L0(/^( {0,3}\u003e ?(paragraph|[^\\n]*)(?:\\n|$))+/).replace(\"paragraph\",tmn).getRegex(),hqe={blockquote:AKi,code:eKi,def:rKi,fences:tKi,heading:nKi,hr:Eee,html:aKi,lheading:emn,list:sKi,newline:ZUi,paragraph:tmn,table:xee,text:iKi},nmn=L0(\"^ *([^\\\\n ].*)\\\\n {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)\").replace(\"hr\",Eee).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"blockquote\",\" {0,3}\u003e\").replace(\"code\",\"(?: {4}| {0,3}\t)[^\\\\n]\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)]) \").replace(\"html\",\"\u003c/?(?:tag)(?: +|\\\\n|/?\u003e)|\u003c(?:script|pre|style|textarea|!--)\").replace(\"tag\",Efe).getRegex(),cKi={...hqe,lheading:oKi,table:nmn,paragraph:L0(uqe).replace(\"hr\",Eee).replace(\"heading\",\" {0,3}#{1,6}(?:\\\\s|$)\").replace(\"|lheading\",\"\").replace(\"table\",nmn).replace(\"blockquote\",\" {0,3}\u003e\").replace(\"fences\",\" {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n\").replace(\"list\",\" {0,3}(?:[*+-]|1[.)]) \").replace(\"html\",\"\u003c/?(?:tag)(?: +|\\\\n|/?\u003e)|\u003c(?:script|pre|style|textarea|!--)\").replace(\"tag\",Efe).getRegex()},lKi={...hqe,html:L0(`^ *(?:comment *(?:\\\\n|\\\\s*$)|\u003c(tag)[\\\\s\\\\S]+?\u003c/\\\\1\u003e *(?:\\\\n{2,}|\\\\s*$)|\u003ctag(?:\"[^\"]*\"|'[^']*'|\\\\s[^'\"/\u003e\\\\s]*)*?/?\u003e *(?:\\\\n{2,}|\\\\s*$))`).replace(\"comment\",dqe).replace(/tag/g,\"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b\").getRegex(),def:/^ *\\[([^\\]]+)\\]: *\u003c?([^\\s\u003e]+)\u003e?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,heading:/^(#{1,6})(.*)(?:\\n+|$)/,fences:xee,lheading:/^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,paragraph:L0(uqe).replace(\"hr\",Eee).replace(\"heading\",` *#{1,6} *[^\n]`).replace(\"lheading\",emn).replace(\"|table\",\"\").replace(\"blockquote\",\" {0,3}\u003e\").replace(\"|fences\",\"\").replace(\"|list\",\"\").replace(\"|html\",\"\").replace(\"|tag\",\"\").getRegex()},uKi=/^\\\\([!\"#$%\u0026'()*+,\\-./:;\u003c=\u003e?@\\[\\]\\\\^_`{|}~])/,gKi=/^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,omn=/^( {2,}|\\\\)\\n(?!\\s*$)/,dKi=/^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\\u003c!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/,Bfe=/[\\p{P}\\p{S}]/u,pqe=/[\\s\\p{P}\\p{S}]/u,imn=/[^\\s\\p{P}\\p{S}]/u,hKi=L0(/^((?![*_])punctSpace)/,\"u\").replace(/punctSpace/g,pqe).getRegex(),rmn=/(?!~)[\\p{P}\\p{S}]/u,pKi=/(?!~)[\\s\\p{P}\\p{S}]/u,mKi=/(?:[^\\s\\p{P}\\p{S}]|~)/u,_Ki=/\\[[^[\\]]*?\\]\\((?:\\\\.|[^\\\\\\(\\)]|\\((?:\\\\.|[^\\\\\\(\\)])*\\))*\\)|`[^`]*?`|\u003c[^\u003c\u003e]*?\u003e/g,smn=/^(?:\\*+(?:((?!\\*)punct)|[^\\s*]))|^_+(?:((?!_)punct)|([^\\s_]))/,fKi=L0(smn,\"u\").replace(/punct/g,Bfe).getRegex(),IKi=L0(smn,\"u\").replace(/punct/g,rmn).getRegex(),amn=\"^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\\\*)punct(\\\\*+)(?=[\\\\s]|$)|notPunctSpace(\\\\*+)(?!\\\\*)(?=punctSpace|$)|(?!\\\\*)punctSpace(\\\\*+)(?=notPunctSpace)|[\\\\s](\\\\*+)(?!\\\\*)(?=punct)|(?!\\\\*)punct(\\\\*+)(?!\\\\*)(?=punct)|notPunctSpace(\\\\*+)(?=notPunctSpace)\",CKi=L0(amn,\"gu\").replace(/notPunctSpace/g,imn).replace(/punctSpace/g,pqe).replace(/punct/g,Bfe).getRegex(),yKi=L0(amn,\"gu\").replace(/notPunctSpace/g,mKi).replace(/punctSpace/g,pKi).replace(/punct/g,rmn).getRegex(),xKi=L0(\"^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)\",\"gu\").replace(/notPunctSpace/g,imn).replace(/punctSpace/g,pqe).replace(/punct/g,Bfe).getRegex(),EKi=L0(/\\\\(punct)/,\"gu\").replace(/punct/g,Bfe).getRegex(),BKi=L0(/^\u003c(scheme:[^\\s\\x00-\\x1f\u003c\u003e]*|email)\u003e/).replace(\"scheme\",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(\"email\",/[a-zA-Z0-9.!#$%\u0026'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bKi=L0(dqe).replace(\"(?:--\u003e|$)\",\"--\u003e\").getRegex(),SKi=L0(\"^comment|^\u003c/[a-zA-Z][\\\\w:-]*\\\\s*\u003e|^\u003c[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?\u003e|^\u003c\\\\?[\\\\s\\\\S]*?\\\\?\u003e|^\u003c![a-zA-Z]+\\\\s[\\\\s\\\\S]*?\u003e|^\u003c!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]\u003e\").replace(\"comment\",bKi).replace(\"attribute\",/\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=\u003c\u003e`]+)?/).getRegex(),bfe=/(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/,QKi=L0(/^!?\\[(label)\\]\\(\\s*(href)(?:(?:[ \\t]*(?:\\n[ \\t]*)?)(title))?\\s*\\)/).replace(\"label\",bfe).replace(\"href\",/\u003c(?:\\\\.|[^\\n\u003c\u003e\\\\])+\u003e|[^ \\t\\n\\x00-\\x1f]*/).replace(\"title\",/\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/).getRegex(),Amn=L0(/^!?\\[(label)\\]\\[(ref)\\]/).replace(\"label\",bfe).replace(\"ref\",gqe).getRegex(),cmn=L0(/^!?\\[(ref)\\](?:\\[\\])?/).replace(\"ref\",gqe).getRegex(),vKi=L0(\"reflink|nolink(?!\\\\()\",\"g\").replace(\"reflink\",Amn).replace(\"nolink\",cmn).getRegex(),mqe={_backpedal:xee,anyPunctuation:EKi,autolink:BKi,blockSkip:_Ki,br:omn,code:gKi,del:xee,emStrongLDelim:fKi,emStrongRDelimAst:CKi,emStrongRDelimUnd:xKi,escape:uKi,link:QKi,nolink:cmn,punctuation:hKi,reflink:Amn,reflinkSearch:vKi,tag:SKi,text:dKi,url:xee},wKi={...mqe,link:L0(/^!?\\[(label)\\]\\((.*?)\\)/).replace(\"label\",bfe).getRegex(),reflink:L0(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace(\"label\",bfe).getRegex()},_qe={...mqe,emStrongRDelimAst:yKi,emStrongLDelim:IKi,url:L0(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s\u003c]*|^email/,\"i\").replace(\"email\",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'\"~()\u0026]+|\\([^)]*\\)|\u0026(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,del:/^(~~?)(?=[^\\s~])((?:\\\\.|[^\\\\])*?(?:\\\\.|[^\\s~\\\\]))\\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%\u0026'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\\u003c!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%\u0026'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%\u0026'*+\\/=?_`{\\|}~-]+@)))/},PKi={..._qe,br:L0(omn).replace(\"{2,}\",\"*\").getRegex(),text:L0(_qe.text).replace(\"\\\\b_\",\"\\\\b_| {2,}\\\\n\").replace(/\\{2,\\}/g,\"*\").getRegex()},Sfe={normal:hqe,gfm:cKi,pedantic:lKi},Bee={normal:mqe,gfm:_qe,breaks:PKi,pedantic:wKi},MKi={\"\u0026\":\"\u0026amp;\",\"\u003c\":\"\u0026lt;\",\"\u003e\":\"\u0026gt;\",'\"':\"\u0026quot;\",\"'\":\"\u0026#39;\"},lmn=t=\u003eMKi[t];function n8(t,e){if(e){if(g2.escapeTest.test(t))return t.replace(g2.escapeReplace,lmn)}else if(g2.escapeTestNoEncode.test(t))return t.replace(g2.escapeReplaceNoEncode,lmn);return t}function umn(t){try{t=encodeURI(t).replace(g2.percentDecode,\"%\")}catch{return null}return t}function gmn(t,e){const n=t.replace(g2.findPipe,(r,s,a)=\u003e{let A=!1,c=s;for(;--c\u003e=0\u0026\u0026a[c]===\"\\\\\";)A=!A;return A?\"|\":\" |\"}),o=n.split(g2.splitPipe);let i=0;if(o[0].trim()||o.shift(),o.length\u003e0\u0026\u0026!o.at(-1)?.trim()\u0026\u0026o.pop(),e)if(o.length\u003ee)o.splice(e);else for(;o.length\u003ce;)o.push(\"\");for(;i\u003co.length;i++)o[i]=o[i].trim().replace(g2.slashPipe,\"|\");return o}function bee(t,e,n){const o=t.length;if(o===0)return\"\";let i=0;for(;i\u003co\u0026\u0026t.charAt(o-i-1)===e;)i++;return t.slice(0,o-i)}function DKi(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let o=0;o\u003ct.length;o++)if(t[o]===\"\\\\\")o++;else if(t[o]===e[0])n++;else if(t[o]===e[1]\u0026\u0026(n--,n\u003c0))return o;return n\u003e0?-2:-1}function dmn(t,e,n,o,i){const r=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,\"$1\");o.state.inLink=!0;const A={type:t[0].charAt(0)===\"!\"?\"image\":\"link\",raw:n,href:r,title:s,text:a,tokens:o.inlineTokens(a)};return o.state.inLink=!1,A}function NKi(t,e,n){const o=t.match(n.other.indentCodeCompensation);if(o===null)return e;const i=o[1];return e.split(`\n`).map(r=\u003e{const s=r.match(n.other.beginningSpace);if(s===null)return r;const[a]=s;return a.length\u003e=i.length?r.slice(i.length):r}).join(`\n`)}var Qfe=class{options;rules;lexer;constructor(t){this.options=t||zT}space(t){const e=this.rules.block.newline.exec(t);if(e\u0026\u0026e[0].length\u003e0)return{type:\"space\",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,\"\");return{type:\"code\",raw:e[0],codeBlockStyle:\"indented\",text:this.options.pedantic?n:bee(n,`\n`)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],o=NKi(n,e[3]||\"\",this.rules);return{type:\"code\",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,\"$1\"):e[2],text:o}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){const o=bee(n,\"#\");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))\u0026\u0026(n=o.trim())}return{type:\"heading\",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:\"hr\",raw:bee(e[0],`\n`)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=bee(e[0],`\n`).split(`\n`),o=\"\",i=\"\";const r=[];for(;n.length\u003e0;){let s=!1;const a=[];let A;for(A=0;A\u003cn.length;A++)if(this.rules.other.blockquoteStart.test(n[A]))a.push(n[A]),s=!0;else if(!s)a.push(n[A]);else break;n=n.slice(A);const c=a.join(`\n`),l=c.replace(this.rules.other.blockquoteSetextReplace,`\n $1`).replace(this.rules.other.blockquoteSetextReplace2,\"\");o=o?`${o}\n${c}`:c,i=i?`${i}\n${l}`:l;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,r,!0),this.lexer.state.top=u,n.length===0)break;const g=r.at(-1);if(g?.type===\"code\")break;if(g?.type===\"blockquote\"){const h=g,d=h.raw+`\n`+n.join(`\n`),p=this.blockquote(d);r[r.length-1]=p,o=o.substring(0,o.length-h.raw.length)+p.raw,i=i.substring(0,i.length-h.text.length)+p.text;break}else if(g?.type===\"list\"){const h=g,d=h.raw+`\n`+n.join(`\n`),p=this.list(d);r[r.length-1]=p,o=o.substring(0,o.length-g.raw.length)+p.raw,i=i.substring(0,i.length-h.raw.length)+p.raw,n=d.substring(r.at(-1).raw.length).split(`\n`);continue}}return{type:\"blockquote\",raw:o,tokens:r,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const o=n.length\u003e1,i={type:\"list\",raw:\"\",ordered:o,start:o?+n.slice(0,-1):\"\",loose:!1,items:[]};n=o?`\\\\d{1,9}\\\\${n.slice(-1)}`:`\\\\${n}`,this.options.pedantic\u0026\u0026(n=o?n:\"[*+-]\");const r=this.rules.other.listItemRegex(n);let s=!1;for(;t;){let A=!1,c=\"\",l=\"\";if(!(e=r.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let u=e[2].split(`\n`,1)[0].replace(this.rules.other.listReplaceTabs,_=\u003e\" \".repeat(3*_.length)),g=t.split(`\n`,1)[0],h=!u.trim(),d=0;if(this.options.pedantic?(d=2,l=u.trimStart()):h?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d\u003e4?1:d,l=u.slice(d),d+=e[1].length),h\u0026\u0026this.rules.other.blankLine.test(g)\u0026\u0026(c+=g+`\n`,t=t.substring(g.length+1),A=!0),!A){const _=this.rules.other.nextBulletRegex(d),f=this.rules.other.hrRegex(d),I=this.rules.other.fencesBeginRegex(d),C=this.rules.other.headingBeginRegex(d),y=this.rules.other.htmlBeginRegex(d);for(;t;){const x=t.split(`\n`,1)[0];let E;if(g=x,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting,\" \"),E=g):E=g.replace(this.rules.other.tabCharGlobal,\" \"),I.test(g)||C.test(g)||y.test(g)||_.test(g)||f.test(g))break;if(E.search(this.rules.other.nonSpaceChar)\u003e=d||!g.trim())l+=`\n`+E.slice(d);else{if(h||u.replace(this.rules.other.tabCharGlobal,\" \").search(this.rules.other.nonSpaceChar)\u003e=4||I.test(u)||C.test(u)||f.test(u))break;l+=`\n`+g}!h\u0026\u0026!g.trim()\u0026\u0026(h=!0),c+=x+`\n`,t=t.substring(x.length+1),u=E.slice(d)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)\u0026\u0026(s=!0));let p=null,m;this.options.gfm\u0026\u0026(p=this.rules.other.listIsTask.exec(l),p\u0026\u0026(m=p[0]!==\"[ ] \",l=l.replace(this.rules.other.listReplaceTask,\"\"))),i.items.push({type:\"list_item\",raw:c,task:!!p,checked:m,loose:!1,text:l,tokens:[]}),i.raw+=c}const a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let A=0;A\u003ci.items.length;A++)if(this.lexer.state.top=!1,i.items[A].tokens=this.lexer.blockTokens(i.items[A].text,[]),!i.loose){const c=i.items[A].tokens.filter(u=\u003eu.type===\"space\"),l=c.length\u003e0\u0026\u0026c.some(u=\u003ethis.rules.other.anyLine.test(u.raw));i.loose=l}if(i.loose)for(let A=0;A\u003ci.items.length;A++)i.items[A].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:\"html\",block:!0,raw:e[0],pre:e[1]===\"pre\"||e[1]===\"script\"||e[1]===\"style\",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,\" \"),o=e[2]?e[2].replace(this.rules.other.hrefBrackets,\"$1\").replace(this.rules.inline.anyPunctuation,\"$1\"):\"\",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,\"$1\"):e[3];return{type:\"def\",tag:n,raw:e[0],href:o,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const n=gmn(e[1]),o=e[2].replace(this.rules.other.tableAlignChars,\"\").split(\"|\"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,\"\").split(`\n`):[],r={type:\"table\",raw:e[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const s of o)this.rules.other.tableAlignRight.test(s)?r.align.push(\"right\"):this.rules.other.tableAlignCenter.test(s)?r.align.push(\"center\"):this.rules.other.tableAlignLeft.test(s)?r.align.push(\"left\"):r.align.push(null);for(let s=0;s\u003cn.length;s++)r.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:r.align[s]});for(const s of i)r.rows.push(gmn(s,r.header.length).map((a,A)=\u003e({text:a,tokens:this.lexer.inline(a),header:!1,align:r.align[A]})));return r}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:\"heading\",raw:e[0],depth:e[2].charAt(0)===\"=\"?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===`\n`?e[1].slice(0,-1):e[1];return{type:\"paragraph\",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:\"text\",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:\"escape\",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink\u0026\u0026this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink\u0026\u0026this.rules.other.endATag.test(e[0])\u0026\u0026(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock\u0026\u0026this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock\u0026\u0026this.rules.other.endPreScriptTag.test(e[0])\u0026\u0026(this.lexer.state.inRawBlock=!1),{type:\"html\",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic\u0026\u0026this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const r=bee(n.slice(0,-1),\"\\\\\");if((n.length-r.length)%2===0)return}else{const r=DKi(e[2],\"()\");if(r===-2)return;if(r\u003e-1){const a=(e[0].indexOf(\"!\")===0?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,a).trim(),e[3]=\"\"}}let o=e[2],i=\"\";if(this.options.pedantic){const r=this.rules.other.pedanticHrefTitle.exec(o);r\u0026\u0026(o=r[1],i=r[3])}else i=e[3]?e[3].slice(1,-1):\"\";return o=o.trim(),this.rules.other.startAngleBracket.test(o)\u0026\u0026(this.options.pedantic\u0026\u0026!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),dmn(e,{href:o\u0026\u0026o.replace(this.rules.inline.anyPunctuation,\"$1\"),title:i\u0026\u0026i.replace(this.rules.inline.anyPunctuation,\"$1\")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,\" \"),i=e[o.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:\"text\",raw:r,text:r}}return dmn(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=\"\"){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]\u0026\u0026n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||\"\")||!n||this.rules.inline.punctuation.exec(n)){const r=[...o[0]].length-1;let s,a,A=r,c=0;const l=o[0][0]===\"*\"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);(o=l.exec(e))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(a=[...s].length,o[3]||o[4]){A+=a;continue}else if((o[5]||o[6])\u0026\u0026r%3\u0026\u0026!((r+a)%3)){c+=a;continue}if(A-=a,A\u003e0)continue;a=Math.min(a,a+A+c);const u=[...o[0]][0].length,g=t.slice(0,r+o.index+u+a);if(Math.min(r,a)%2){const d=g.slice(1,-1);return{type:\"em\",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}const h=g.slice(2,-2);return{type:\"strong\",raw:g,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal,\" \");const o=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)\u0026\u0026this.rules.other.endingSpaceChar.test(n);return o\u0026\u0026i\u0026\u0026(n=n.substring(1,n.length-1)),{type:\"codespan\",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:\"br\",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:\"del\",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,o;return e[2]===\"@\"?(n=e[1],o=\"mailto:\"+n):(n=e[1],o=n),{type:\"link\",raw:e[0],text:n,href:o,tokens:[{type:\"text\",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,o;if(e[2]===\"@\")n=e[0],o=\"mailto:\"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??\"\";while(i!==e[0]);n=e[0],e[1]===\"www.\"?o=\"http://\"+e[0]:o=e[0]}return{type:\"link\",raw:e[0],text:n,href:o,tokens:[{type:\"text\",raw:n,text:n}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const n=this.lexer.state.inRawBlock;return{type:\"text\",raw:e[0],text:e[0],escaped:n}}}},TS=class Qit{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||zT,this.options.tokenizer=this.options.tokenizer||new Qfe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:g2,block:Sfe.normal,inline:Bee.normal};this.options.pedantic?(n.block=Sfe.pedantic,n.inline=Bee.pedantic):this.options.gfm\u0026\u0026(n.block=Sfe.gfm,this.options.breaks?n.inline=Bee.breaks:n.inline=Bee.gfm),this.tokenizer.rules=n}static get rules(){return{block:Sfe,inline:Bee}}static lex(e,n){return new Qit(n).lex(e)}static lexInline(e,n){return new Qit(n).inlineTokens(e)}lex(e){e=e.replace(g2.carriageReturn,`\n`),this.blockTokens(e,this.tokens);for(let n=0;n\u003cthis.inlineQueue.length;n++){const o=this.inlineQueue[n];this.inlineTokens(o.src,o.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],o=!1){for(this.options.pedantic\u0026\u0026(e=e.replace(g2.tabCharGlobal,\" \").replace(g2.spaceLine,\"\"));e;){let i;if(this.options.extensions?.block?.some(s=\u003e(i=s.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);const s=n.at(-1);i.raw.length===1\u0026\u0026s!==void 0?s.raw+=`\n`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type===\"paragraph\"||s?.type===\"text\"?(s.raw+=`\n`+i.raw,s.text+=`\n`+i.text,this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type===\"paragraph\"||s?.type===\"text\"?(s.raw+=`\n`+i.raw,s.text+=`\n`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let r=e;if(this.options.extensions?.startBlock){let s=1/0;const a=e.slice(1);let A;this.options.extensions.startBlock.forEach(c=\u003e{A=c.call({lexer:this},a),typeof A==\"number\"\u0026\u0026A\u003e=0\u0026\u0026(s=Math.min(s,A))}),s\u003c1/0\u0026\u0026s\u003e=0\u0026\u0026(r=e.substring(0,s+1))}if(this.state.top\u0026\u0026(i=this.tokenizer.paragraph(r))){const s=n.at(-1);o\u0026\u0026s?.type===\"paragraph\"?(s.raw+=`\n`+i.raw,s.text+=`\n`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i),o=r.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);const s=n.at(-1);s?.type===\"text\"?(s.raw+=`\n`+i.raw,s.text+=`\n`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(e){const s=\"Infinite loop on byte: \"+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let o=e,i=null;if(this.tokens.links){const a=Object.keys(this.tokens.links);if(a.length\u003e0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)a.includes(i[0].slice(i[0].lastIndexOf(\"[\")+1,-1))\u0026\u0026(o=o.slice(0,i.index)+\"[\"+\"a\".repeat(i[0].length-2)+\"]\"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,i.index)+\"++\"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,i.index)+\"[\"+\"a\".repeat(i[0].length-2)+\"]\"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let r=!1,s=\"\";for(;e;){r||(s=\"\"),r=!1;let a;if(this.options.extensions?.inline?.some(c=\u003e(a=c.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);const c=n.at(-1);a.type===\"text\"\u0026\u0026c?.type===\"text\"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,o,s)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink\u0026\u0026(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let A=e;if(this.options.extensions?.startInline){let c=1/0;const l=e.slice(1);let u;this.options.extensions.startInline.forEach(g=\u003e{u=g.call({lexer:this},l),typeof u==\"number\"\u0026\u0026u\u003e=0\u0026\u0026(c=Math.min(c,u))}),c\u003c1/0\u0026\u0026c\u003e=0\u0026\u0026(A=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(A)){e=e.substring(a.raw.length),a.raw.slice(-1)!==\"_\"\u0026\u0026(s=a.raw.slice(-1)),r=!0;const c=n.at(-1);c?.type===\"text\"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(e){const c=\"Infinite loop on byte: \"+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},vfe=class{options;parser;constructor(t){this.options=t||zT}space(t){return\"\"}code({text:t,lang:e,escaped:n}){const o=(e||\"\").match(g2.notSpaceStart)?.[0],i=t.replace(g2.endingNewline,\"\")+`\n`;return o?'\u003cpre\u003e\u003ccode class=\"language-'+n8(o)+'\"\u003e'+(n?i:n8(i,!0))+`\u003c/code\u003e\u003c/pre\u003e\n`:\"\u003cpre\u003e\u003ccode\u003e\"+(n?i:n8(i,!0))+`\u003c/code\u003e\u003c/pre\u003e\n`}blockquote({tokens:t}){return`\u003cblockquote\u003e\n${this.parser.parse(t)}\u003c/blockquote\u003e\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`\u003ch${e}\u003e${this.parser.parseInline(t)}\u003c/h${e}\u003e\n`}hr(t){return`\u003chr\u003e\n`}list(t){const e=t.ordered,n=t.start;let o=\"\";for(let s=0;s\u003ct.items.length;s++){const a=t.items[s];o+=this.listitem(a)}const i=e?\"ol\":\"ul\",r=e\u0026\u0026n!==1?' start=\"'+n+'\"':\"\";return\"\u003c\"+i+r+`\u003e\n`+o+\"\u003c/\"+i+`\u003e\n`}listitem(t){let e=\"\";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type===\"paragraph\"?(t.tokens[0].text=n+\" \"+t.tokens[0].text,t.tokens[0].tokens\u0026\u0026t.tokens[0].tokens.length\u003e0\u0026\u0026t.tokens[0].tokens[0].type===\"text\"\u0026\u0026(t.tokens[0].tokens[0].text=n+\" \"+n8(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:\"text\",raw:n+\" \",text:n+\" \",escaped:!0}):e+=n+\" \"}return e+=this.parser.parse(t.tokens,!!t.loose),`\u003cli\u003e${e}\u003c/li\u003e\n`}checkbox({checked:t}){return\"\u003cinput \"+(t?'checked=\"\" ':\"\")+'disabled=\"\" type=\"checkbox\"\u003e'}paragraph({tokens:t}){return`\u003cp\u003e${this.parser.parseInline(t)}\u003c/p\u003e\n`}table(t){let e=\"\",n=\"\";for(let i=0;i\u003ct.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let o=\"\";for(let i=0;i\u003ct.rows.length;i++){const r=t.rows[i];n=\"\";for(let s=0;s\u003cr.length;s++)n+=this.tablecell(r[s]);o+=this.tablerow({text:n})}return o\u0026\u0026(o=`\u003ctbody\u003e${o}\u003c/tbody\u003e`),`\u003ctable\u003e\n\u003cthead\u003e\n`+e+`\u003c/thead\u003e\n`+o+`\u003c/table\u003e\n`}tablerow({text:t}){return`\u003ctr\u003e\n${t}\u003c/tr\u003e\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?\"th\":\"td\";return(t.align?`\u003c${n} align=\"${t.align}\"\u003e`:`\u003c${n}\u003e`)+e+`\u003c/${n}\u003e\n`}strong({tokens:t}){return`\u003cstrong\u003e${this.parser.parseInline(t)}\u003c/strong\u003e`}em({tokens:t}){return`\u003cem\u003e${this.parser.parseInline(t)}\u003c/em\u003e`}codespan({text:t}){return`\u003ccode\u003e${n8(t,!0)}\u003c/code\u003e`}br(t){return\"\u003cbr\u003e\"}del({tokens:t}){return`\u003cdel\u003e${this.parser.parseInline(t)}\u003c/del\u003e`}link({href:t,title:e,tokens:n}){const o=this.parser.parseInline(n),i=umn(t);if(i===null)return o;t=i;let r='\u003ca href=\"'+t+'\"';return e\u0026\u0026(r+=' title=\"'+n8(e)+'\"'),r+=\"\u003e\"+o+\"\u003c/a\u003e\",r}image({href:t,title:e,text:n,tokens:o}){o\u0026\u0026(n=this.parser.parseInline(o,this.parser.textRenderer));const i=umn(t);if(i===null)return n8(n);t=i;let r=`\u003cimg src=\"${t}\" alt=\"${n}\"`;return e\u0026\u0026(r+=` title=\"${n8(e)}\"`),r+=\"\u003e\",r}text(t){return\"tokens\"in t\u0026\u0026t.tokens?this.parser.parseInline(t.tokens):\"escaped\"in t\u0026\u0026t.escaped?t.text:n8(t.text)}},fqe=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return\"\"+t}image({text:t}){return\"\"+t}br(){return\"\"}},kS=class vit{options;renderer;textRenderer;constructor(e){this.options=e||zT,this.options.renderer=this.options.renderer||new vfe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fqe}static parse(e,n){return new vit(n).parse(e)}static parseInline(e,n){return new vit(n).parseInline(e)}parse(e,n=!0){let o=\"\";for(let i=0;i\u003ce.length;i++){const r=e[i];if(this.options.extensions?.renderers?.[r.type]){const a=r,A=this.options.extensions.renderers[a.type].call({parser:this},a);if(A!==!1||![\"space\",\"hr\",\"heading\",\"code\",\"table\",\"blockquote\",\"list\",\"html\",\"paragraph\",\"text\"].includes(a.type)){o+=A||\"\";continue}}const s=r;switch(s.type){case\"space\":{o+=this.renderer.space(s);continue}case\"hr\":{o+=this.renderer.hr(s);continue}case\"heading\":{o+=this.renderer.heading(s);continue}case\"code\":{o+=this.renderer.code(s);continue}case\"table\":{o+=this.renderer.table(s);continue}case\"blockquote\":{o+=this.renderer.blockquote(s);continue}case\"list\":{o+=this.renderer.list(s);continue}case\"html\":{o+=this.renderer.html(s);continue}case\"paragraph\":{o+=this.renderer.paragraph(s);continue}case\"text\":{let a=s,A=this.renderer.text(a);for(;i+1\u003ce.length\u0026\u0026e[i+1].type===\"text\";)a=e[++i],A+=`\n`+this.renderer.text(a);n?o+=this.renderer.paragraph({type:\"paragraph\",raw:A,text:A,tokens:[{type:\"text\",raw:A,text:A,escaped:!0}]}):o+=A;continue}default:{const a='Token with \"'+s.type+'\" type was not found.';if(this.options.silent)return console.error(a),\"\";throw new Error(a)}}}return o}parseInline(e,n=this.renderer){let o=\"\";for(let i=0;i\u003ce.length;i++){const r=e[i];if(this.options.extensions?.renderers?.[r.type]){const a=this.options.extensions.renderers[r.type].call({parser:this},r);if(a!==!1||![\"escape\",\"html\",\"link\",\"image\",\"strong\",\"em\",\"codespan\",\"br\",\"del\",\"text\"].includes(r.type)){o+=a||\"\";continue}}const s=r;switch(s.type){case\"escape\":{o+=n.text(s);break}case\"html\":{o+=n.html(s);break}case\"link\":{o+=n.link(s);break}case\"image\":{o+=n.image(s);break}case\"strong\":{o+=n.strong(s);break}case\"em\":{o+=n.em(s);break}case\"codespan\":{o+=n.codespan(s);break}case\"br\":{o+=n.br(s);break}case\"del\":{o+=n.del(s);break}case\"text\":{o+=n.text(s);break}default:{const a='Token with \"'+s.type+'\" type was not found.';if(this.options.silent)return console.error(a),\"\";throw new Error(a)}}}return o}},wfe=class{options;block;constructor(t){this.options=t||zT}static passThroughHooks=new Set([\"preprocess\",\"postprocess\",\"processAllTokens\"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?TS.lex:TS.lexInline}provideParser(){return this.block?kS.parse:kS.parseInline}},RKi=class{defaults=cqe();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=kS;Renderer=vfe;TextRenderer=fqe;Lexer=TS;Tokenizer=Qfe;Hooks=wfe;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const o of t)switch(n=n.concat(e.call(this,o)),o.type){case\"table\":{const i=o;for(const r of i.header)n=n.concat(this.walkTokens(r.tokens,e));for(const r of i.rows)for(const s of r)n=n.concat(this.walkTokens(s.tokens,e));break}case\"list\":{const i=o;n=n.concat(this.walkTokens(i.items,e));break}default:{const i=o;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(r=\u003e{const s=i[r].flat(1/0);n=n.concat(this.walkTokens(s,e))}):i.tokens\u0026\u0026(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=\u003e{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions\u0026\u0026(n.extensions.forEach(i=\u003e{if(!i.name)throw new Error(\"extension name required\");if(\"renderer\"in i){const r=e.renderers[i.name];r?e.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1\u0026\u0026(a=r.apply(this,s)),a}:e.renderers[i.name]=i.renderer}if(\"tokenizer\"in i){if(!i.level||i.level!==\"block\"\u0026\u0026i.level!==\"inline\")throw new Error(\"extension level must be 'block' or 'inline'\");const r=e[i.level];r?r.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start\u0026\u0026(i.level===\"block\"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level===\"inline\"\u0026\u0026(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}\"childTokens\"in i\u0026\u0026i.childTokens\u0026\u0026(e.childTokens[i.name]=i.childTokens)}),o.extensions=e),n.renderer){const i=this.defaults.renderer||new vfe(this.defaults);for(const r in n.renderer){if(!(r in i))throw new Error(`renderer '${r}' does not exist`);if([\"options\",\"parser\"].includes(r))continue;const s=r,a=n.renderer[s],A=i[s];i[s]=(...c)=\u003e{let l=a.apply(i,c);return l===!1\u0026\u0026(l=A.apply(i,c)),l||\"\"}}o.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new Qfe(this.defaults);for(const r in n.tokenizer){if(!(r in i))throw new Error(`tokenizer '${r}' does not exist`);if([\"options\",\"rules\",\"lexer\"].includes(r))continue;const s=r,a=n.tokenizer[s],A=i[s];i[s]=(...c)=\u003e{let l=a.apply(i,c);return l===!1\u0026\u0026(l=A.apply(i,c)),l}}o.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new wfe;for(const r in n.hooks){if(!(r in i))throw new Error(`hook '${r}' does not exist`);if([\"options\",\"block\"].includes(r))continue;const s=r,a=n.hooks[s],A=i[s];wfe.passThroughHooks.has(r)?i[s]=c=\u003e{if(this.defaults.async)return Promise.resolve(a.call(i,c)).then(u=\u003eA.call(i,u));const l=a.call(i,c);return A.call(i,l)}:i[s]=(...c)=\u003e{let l=a.apply(i,c);return l===!1\u0026\u0026(l=A.apply(i,c)),l}}o.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,r=n.walkTokens;o.walkTokens=function(s){let a=[];return a.push(r.call(this,s)),i\u0026\u0026(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return TS.lex(t,e??this.defaults)}parser(t,e){return kS.parse(t,e??this.defaults)}parseMarkdown(t){return(n,o)=\u003e{const i={...o},r={...this.defaults,...i},s=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0\u0026\u0026i.async===!1)return s(new Error(\"marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.\"));if(typeof n\u003e\"u\"||n===null)return s(new Error(\"marked(): input parameter is undefined or null\"));if(typeof n!=\"string\")return s(new Error(\"marked(): input parameter is of type \"+Object.prototype.toString.call(n)+\", string expected\"));r.hooks\u0026\u0026(r.hooks.options=r,r.hooks.block=t);const a=r.hooks?r.hooks.provideLexer():t?TS.lex:TS.lexInline,A=r.hooks?r.hooks.provideParser():t?kS.parse:kS.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(c=\u003ea(c,r)).then(c=\u003er.hooks?r.hooks.processAllTokens(c):c).then(c=\u003er.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=\u003ec):c).then(c=\u003eA(c,r)).then(c=\u003er.hooks?r.hooks.postprocess(c):c).catch(s);try{r.hooks\u0026\u0026(n=r.hooks.preprocess(n));let c=a(n,r);r.hooks\u0026\u0026(c=r.hooks.processAllTokens(c)),r.walkTokens\u0026\u0026this.walkTokens(c,r.walkTokens);let l=A(c,r);return r.hooks\u0026\u0026(l=r.hooks.postprocess(l)),l}catch(c){return s(c)}}}onError(t,e){return n=\u003e{if(n.message+=`\nPlease report this to https://github.com/markedjs/marked.`,t){const o=\"\u003cp\u003eAn error occurred:\u003c/p\u003e\u003cpre\u003e\"+n8(n.message+\"\",!0)+\"\u003c/pre\u003e\";return e?Promise.resolve(o):o}if(e)return Promise.reject(n);throw n}}},JT=new RKi;function lu(t,e){return JT.parse(t,e)}lu.options=lu.setOptions=function(t){return JT.setOptions(t),lu.defaults=JT.defaults,Xpn(lu.defaults),lu},lu.getDefaults=cqe,lu.defaults=zT,lu.use=function(...t){return JT.use(...t),lu.defaults=JT.defaults,Xpn(lu.defaults),lu},lu.walkTokens=function(t,e){return JT.walkTokens(t,e)},lu.parseInline=JT.parseInline,lu.Parser=kS,lu.parser=kS.parse,lu.Renderer=vfe,lu.TextRenderer=fqe,lu.Lexer=TS,lu.lexer=TS.lex,lu.Tokenizer=Qfe,lu.Hooks=wfe,lu.parse=lu,lu.options,lu.setOptions,lu.use,lu.walkTokens,lu.parseInline,kS.parse,TS.lex;const TKi=({review:t,onBack:e})=\u003e{const[n,o]=ee.useState(t.ai_review_text??null),i=Hw(),r=t.ai_review_id;ee.useEffect(()=\u003e{if(!r)return;let a;async function A(){try{const c=await i.get(\"ai_reviews/get\",{searchParams:{ai_review_id:r}}),{ai_review:l}=await c.json();if(l.ai_review_text){o(l.ai_review_text);return}}catch(c){console.error(\"Failed to load AI review text\",c)}a=setTimeout(A,1e3)}return a=setTimeout(A,1e3),()=\u003eclearTimeout(a)},[r]);const s=ee.useMemo(()=\u003elu.parse(t.ai_review_text||\"\"),[t.ai_review_text]);return K.jsxs(K.Fragment,{children:[K.jsxs(zP,{className:\"rf-flex rf-flex-row rf-items-center rf-justify-between\",children:[K.jsx(fA,{variant:\"ghost\",size:\"sm\",onClick:e,children:\"Back\"}),K.jsx(JP,{children:\"AI Review\"})]}),n?K.jsx(\"div\",{className:\"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2\",dangerouslySetInnerHTML:{__html:s}}):K.jsx(\"div\",{className:\"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2\",children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-justify-center rf-h-full\",children:[K.jsxs(\"svg\",{className:\"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2\",xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",children:[K.jsx(\"circle\",{className:\"rf-opacity-25\",cx:\"12\",cy:\"12\",r:\"10\",stroke:\"currentColor\",strokeWidth:\"4\"}),K.jsx(\"path\",{className:\"rf-opacity-75\",fill:\"currentColor\",d:\"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z\"})]}),K.jsx(\"span\",{children:\"Loading...\"})]})})]})},kKi=({isOpen:t,onClose:e,packageName:n})=\u003e{const[o,i]=ee.useState(\"list_reviews\"),[r,s]=ee.useState(null),a=A=\u003e{s(A),i(\"view_review\")};return K.jsx(KT,{open:t,onOpenChange:A=\u003e{A||(i(\"list_reviews\"),s(null),e())},children:K.jsxs(VP,{className:\"rf-max-w-2xl\",children:[o===\"list_reviews\"\u0026\u0026K.jsx(XUi,{packageName:n,onSelectReview:a}),o===\"view_review\"\u0026\u0026r\u0026\u0026K.jsx(TKi,{review:r,onBack:()=\u003ei(\"list_reviews\")})]})})};var $U=(function(){function t(){this.listeners=[]}var e=t.prototype;return e.subscribe=function(o){var i=this,r=o||function(){};return this.listeners.push(r),this.onSubscribe(),function(){i.listeners=i.listeners.filter(function(s){return s!==r}),i.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length\u003e0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},t})(),Pfe=typeof window\u003e\"u\";function II(){}function FKi(t,e){return typeof t==\"function\"?t(e):t}function Iqe(t){return typeof t==\"number\"\u0026\u0026t\u003e=0\u0026\u0026t!==1/0}function Mfe(t){return Array.isArray(t)?t:[t]}function hmn(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Dfe(t,e,n){return See(t)?typeof e==\"function\"?ca({},n,{queryKey:t,queryFn:e}):ca({},e,{queryKey:t}):t}function LKi(t,e,n){return See(t)?ca({},e,{mutationKey:t}):typeof t==\"function\"?ca({},e,{mutationFn:t}):ca({},t)}function $P(t,e,n){return See(t)?[ca({},e,{queryKey:t}),n]:[t||{},e]}function HKi(t,e){if(t===!0\u0026\u0026e===!0||t==null\u0026\u0026e==null)return\"all\";if(t===!1\u0026\u0026e===!1)return\"none\";var n=t??!e;return n?\"active\":\"inactive\"}function pmn(t,e){var n=t.active,o=t.exact,i=t.fetching,r=t.inactive,s=t.predicate,a=t.queryKey,A=t.stale;if(See(a)){if(o){if(e.queryHash!==Cqe(a,e.options))return!1}else if(!Nfe(e.queryKey,a))return!1}var c=HKi(n,r);if(c===\"none\")return!1;if(c!==\"all\"){var l=e.isActive();if(c===\"active\"\u0026\u0026!l||c===\"inactive\"\u0026\u0026l)return!1}return!(typeof A==\"boolean\"\u0026\u0026e.isStale()!==A||typeof i==\"boolean\"\u0026\u0026e.isFetching()!==i||s\u0026\u0026!s(e))}function mmn(t,e){var n=t.exact,o=t.fetching,i=t.predicate,r=t.mutationKey;if(See(r)){if(!e.options.mutationKey)return!1;if(n){if(WT(e.options.mutationKey)!==WT(r))return!1}else if(!Nfe(e.options.mutationKey,r))return!1}return!(typeof o==\"boolean\"\u0026\u0026e.state.status===\"loading\"!==o||i\u0026\u0026!i(e))}function Cqe(t,e){var n=e?.queryKeyHashFn||WT;return n(t)}function WT(t){var e=Mfe(t);return OKi(e)}function OKi(t){return JSON.stringify(t,function(e,n){return yqe(n)?Object.keys(n).sort().reduce(function(o,i){return o[i]=n[i],o},{}):n})}function Nfe(t,e){return _mn(Mfe(t),Mfe(e))}function _mn(t,e){return t===e?!0:typeof t!=typeof e?!1:t\u0026\u0026e\u0026\u0026typeof t==\"object\"\u0026\u0026typeof e==\"object\"?!Object.keys(e).some(function(n){return!_mn(t[n],e[n])}):!1}function Rfe(t,e){if(t===e)return t;var n=Array.isArray(t)\u0026\u0026Array.isArray(e);if(n||yqe(t)\u0026\u0026yqe(e)){for(var o=n?t.length:Object.keys(t).length,i=n?e:Object.keys(e),r=i.length,s=n?[]:{},a=0,A=0;A\u003cr;A++){var c=n?A:i[A];s[c]=Rfe(t[c],e[c]),s[c]===t[c]\u0026\u0026a++}return o===r\u0026\u0026a===o?t:s}return e}function GKi(t,e){if(t\u0026\u0026!e||e\u0026\u0026!t)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}function yqe(t){if(!fmn(t))return!1;var e=t.constructor;if(typeof e\u003e\"u\")return!0;var n=e.prototype;return!(!fmn(n)||!n.hasOwnProperty(\"isPrototypeOf\"))}function fmn(t){return Object.prototype.toString.call(t)===\"[object Object]\"}function See(t){return typeof t==\"string\"||Array.isArray(t)}function YKi(t){return new Promise(function(e){setTimeout(e,t)})}function Imn(t){Promise.resolve().then(t).catch(function(e){return setTimeout(function(){throw e})})}function Cmn(){if(typeof AbortController==\"function\")return new AbortController}var UKi=(function(t){NN(e,t);function e(){var o;return o=t.call(this)||this,o.setup=function(i){var r;if(!Pfe\u0026\u0026((r=window)!=null\u0026\u0026r.addEventListener)){var s=function(){return i()};return window.addEventListener(\"visibilitychange\",s,!1),window.addEventListener(\"focus\",s,!1),function(){window.removeEventListener(\"visibilitychange\",s),window.removeEventListener(\"focus\",s)}}},o}var n=e.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var r,s=this;this.setup=i,(r=this.cleanup)==null||r.call(this),this.cleanup=i(function(a){typeof a==\"boolean\"?s.setFocused(a):s.onFocus()})},n.setFocused=function(i){this.focused=i,i\u0026\u0026this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(i){i()})},n.isFocused=function(){return typeof this.focused==\"boolean\"?this.focused:typeof document\u003e\"u\"?!0:[void 0,\"visible\",\"prerender\"].includes(document.visibilityState)},e})($U),Qee=new UKi,KKi=(function(t){NN(e,t);function e(){var o;return o=t.call(this)||this,o.setup=function(i){var r;if(!Pfe\u0026\u0026((r=window)!=null\u0026\u0026r.addEventListener)){var s=function(){return i()};return window.addEventListener(\"online\",s,!1),window.addEventListener(\"offline\",s,!1),function(){window.removeEventListener(\"online\",s),window.removeEventListener(\"offline\",s)}}},o}var n=e.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var i;(i=this.cleanup)==null||i.call(this),this.cleanup=void 0}},n.setEventListener=function(i){var r,s=this;this.setup=i,(r=this.cleanup)==null||r.call(this),this.cleanup=i(function(a){typeof a==\"boolean\"?s.setOnline(a):s.onOnline()})},n.setOnline=function(i){this.online=i,i\u0026\u0026this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(i){i()})},n.isOnline=function(){return typeof this.online==\"boolean\"?this.online:typeof navigator\u003e\"u\"||typeof navigator.onLine\u003e\"u\"?!0:navigator.onLine},e})($U),Tfe=new KKi;function VKi(t){return Math.min(1e3*Math.pow(2,t),3e4)}function kfe(t){return typeof t?.cancel==\"function\"}var ymn=function(e){this.revert=e?.revert,this.silent=e?.silent};function Ffe(t){return t instanceof ymn}var xmn=function(e){var n=this,o=!1,i,r,s,a;this.abort=e.abort,this.cancel=function(g){return i?.(g)},this.cancelRetry=function(){o=!0},this.continueRetry=function(){o=!1},this.continue=function(){return r?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(g,h){s=g,a=h});var A=function(h){n.isResolved||(n.isResolved=!0,e.onSuccess==null||e.onSuccess(h),r?.(),s(h))},c=function(h){n.isResolved||(n.isResolved=!0,e.onError==null||e.onError(h),r?.(),a(h))},l=function(){return new Promise(function(h){r=h,n.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){r=void 0,n.isPaused=!1,e.onContinue==null||e.onContinue()})},u=function g(){if(!n.isResolved){var h;try{h=e.fn()}catch(d){h=Promise.reject(d)}i=function(p){if(!n.isResolved\u0026\u0026(c(new ymn(p)),n.abort==null||n.abort(),kfe(h)))try{h.cancel()}catch{}},n.isTransportCancelable=kfe(h),Promise.resolve(h).then(A).catch(function(d){var p,m;if(!n.isResolved){var _=(p=e.retry)!=null?p:3,f=(m=e.retryDelay)!=null?m:VKi,I=typeof f==\"function\"?f(n.failureCount,d):f,C=_===!0||typeof _==\"number\"\u0026\u0026n.failureCount\u003c_||typeof _==\"function\"\u0026\u0026_(n.failureCount,d);if(o||!C){c(d);return}n.failureCount++,e.onFail==null||e.onFail(n.failureCount,d),YKi(I).then(function(){if(!Qee.isFocused()||!Tfe.isOnline())return l()}).then(function(){o?c(d):g()})}})}};u()},zKi=(function(){function t(){this.queue=[],this.transactions=0,this.notifyFn=function(n){n()},this.batchNotifyFn=function(n){n()}}var e=t.prototype;return e.batch=function(o){var i;this.transactions++;try{i=o()}finally{this.transactions--,this.transactions||this.flush()}return i},e.schedule=function(o){var i=this;this.transactions?this.queue.push(o):Imn(function(){i.notifyFn(o)})},e.batchCalls=function(o){var i=this;return function(){for(var r=arguments.length,s=new Array(r),a=0;a\u003cr;a++)s[a]=arguments[a];i.schedule(function(){o.apply(void 0,s)})}},e.flush=function(){var o=this,i=this.queue;this.queue=[],i.length\u0026\u0026Imn(function(){o.batchNotifyFn(function(){i.forEach(function(r){o.notifyFn(r)})})})},e.setNotifyFunction=function(o){this.notifyFn=o},e.setBatchNotifyFunction=function(o){this.batchNotifyFn=o},t})(),dh=new zKi,Emn=console;function Lfe(){return Emn}function JKi(t){Emn=t}var WKi=(function(){function t(n){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=n.meta,this.scheduleGc()}var e=t.prototype;return e.setOptions=function(o){var i;this.options=ca({},this.defaultOptions,o),this.meta=o?.meta,this.cacheTime=Math.max(this.cacheTime||0,(i=this.options.cacheTime)!=null?i:300*1e3)},e.setDefaultOptions=function(o){this.defaultOptions=o},e.scheduleGc=function(){var o=this;this.clearGcTimeout(),Iqe(this.cacheTime)\u0026\u0026(this.gcTimeout=setTimeout(function(){o.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout\u0026\u0026(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers\u0026\u0026this.scheduleGc():this.cache.remove(this))},e.setData=function(o,i){var r,s,a=this.state.data,A=FKi(o,a);return(r=(s=this.options).isDataEqual)!=null\u0026\u0026r.call(s,a,A)?A=a:this.options.structuralSharing!==!1\u0026\u0026(A=Rfe(a,A)),this.dispatch({data:A,type:\"success\",dataUpdatedAt:i?.updatedAt}),A},e.setState=function(o,i){this.dispatch({type:\"setState\",state:o,setStateOptions:i})},e.cancel=function(o){var i,r=this.promise;return(i=this.retryer)==null||i.cancel(o),r?r.then(II).catch(II):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(o){return o.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(o){return o.getCurrentResult().isStale})},e.isStaleByTime=function(o){return o===void 0\u0026\u0026(o=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!hmn(this.state.dataUpdatedAt,o)},e.onFocus=function(){var o,i=this.observers.find(function(r){return r.shouldFetchOnWindowFocus()});i\u0026\u0026i.refetch(),(o=this.retryer)==null||o.continue()},e.onOnline=function(){var o,i=this.observers.find(function(r){return r.shouldFetchOnReconnect()});i\u0026\u0026i.refetch(),(o=this.retryer)==null||o.continue()},e.addObserver=function(o){this.observers.indexOf(o)===-1\u0026\u0026(this.observers.push(o),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:\"observerAdded\",query:this,observer:o}))},e.removeObserver=function(o){this.observers.indexOf(o)!==-1\u0026\u0026(this.observers=this.observers.filter(function(i){return i!==o}),this.observers.length||(this.retryer\u0026\u0026(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:\"observerRemoved\",query:this,observer:o}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:\"invalidate\"})},e.fetch=function(o,i){var r=this,s,a,A;if(this.state.isFetching){if(this.state.dataUpdatedAt\u0026\u0026i?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(o\u0026\u0026this.setOptions(o),!this.options.queryFn){var l=this.observers.find(function(f){return f.options.queryFn});l\u0026\u0026this.setOptions(l.options)}var u=Mfe(this.queryKey),g=Cmn(),h={queryKey:u,pageParam:void 0,meta:this.meta};Object.defineProperty(h,\"signal\",{enumerable:!0,get:function(){if(g)return r.abortSignalConsumed=!0,g.signal}});var d=function(){return r.options.queryFn?(r.abortSignalConsumed=!1,r.options.queryFn(h)):Promise.reject(\"Missing queryFn\")},p={fetchOptions:i,options:this.options,queryKey:u,state:this.state,fetchFn:d,meta:this.meta};if((s=this.options.behavior)!=null\u0026\u0026s.onFetch){var m;(m=this.options.behavior)==null||m.onFetch(p)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=p.fetchOptions)==null?void 0:a.meta)){var _;this.dispatch({type:\"fetch\",meta:(_=p.fetchOptions)==null?void 0:_.meta})}return this.retryer=new xmn({fn:p.fetchFn,abort:g==null||(A=g.abort)==null?void 0:A.bind(g),onSuccess:function(I){r.setData(I),r.cache.config.onSuccess==null||r.cache.config.onSuccess(I,r),r.cacheTime===0\u0026\u0026r.optionalRemove()},onError:function(I){Ffe(I)\u0026\u0026I.silent||r.dispatch({type:\"error\",error:I}),Ffe(I)||(r.cache.config.onError==null||r.cache.config.onError(I,r),Lfe().error(I)),r.cacheTime===0\u0026\u0026r.optionalRemove()},onFail:function(){r.dispatch({type:\"failed\"})},onPause:function(){r.dispatch({type:\"pause\"})},onContinue:function(){r.dispatch({type:\"continue\"})},retry:p.options.retry,retryDelay:p.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(o){var i=this;this.state=this.reducer(this.state,o),dh.batch(function(){i.observers.forEach(function(r){r.onQueryUpdate(o)}),i.cache.notify({query:i,type:\"queryUpdated\",action:o})})},e.getDefaultState=function(o){var i=typeof o.initialData==\"function\"?o.initialData():o.initialData,r=typeof o.initialData\u003c\"u\",s=r?typeof o.initialDataUpdatedAt==\"function\"?o.initialDataUpdatedAt():o.initialDataUpdatedAt:0,a=typeof i\u003c\"u\";return{data:i,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?\"success\":\"idle\"}},e.reducer=function(o,i){var r,s;switch(i.type){case\"failed\":return ca({},o,{fetchFailureCount:o.fetchFailureCount+1});case\"pause\":return ca({},o,{isPaused:!0});case\"continue\":return ca({},o,{isPaused:!1});case\"fetch\":return ca({},o,{fetchFailureCount:0,fetchMeta:(r=i.meta)!=null?r:null,isFetching:!0,isPaused:!1},!o.dataUpdatedAt\u0026\u0026{error:null,status:\"loading\"});case\"success\":return ca({},o,{data:i.data,dataUpdateCount:o.dataUpdateCount+1,dataUpdatedAt:(s=i.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:\"success\"});case\"error\":var a=i.error;return Ffe(a)\u0026\u0026a.revert\u0026\u0026this.revertState?ca({},this.revertState):ca({},o,{error:a,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:\"error\"});case\"invalidate\":return ca({},o,{isInvalidated:!0});case\"setState\":return ca({},o,i.state);default:return o}},t})(),jKi=(function(t){NN(e,t);function e(o){var i;return i=t.call(this)||this,i.config=o||{},i.queries=[],i.queriesMap={},i}var n=e.prototype;return n.build=function(i,r,s){var a,A=r.queryKey,c=(a=r.queryHash)!=null?a:Cqe(A,r),l=this.get(c);return l||(l=new WKi({cache:this,queryKey:A,queryHash:c,options:i.defaultQueryOptions(r),state:s,defaultOptions:i.getQueryDefaults(A),meta:r.meta}),this.add(l)),l},n.add=function(i){this.queriesMap[i.queryHash]||(this.queriesMap[i.queryHash]=i,this.queries.push(i),this.notify({type:\"queryAdded\",query:i}))},n.remove=function(i){var r=this.queriesMap[i.queryHash];r\u0026\u0026(i.destroy(),this.queries=this.queries.filter(function(s){return s!==i}),r===i\u0026\u0026delete this.queriesMap[i.queryHash],this.notify({type:\"queryRemoved\",query:i}))},n.clear=function(){var i=this;dh.batch(function(){i.queries.forEach(function(r){i.remove(r)})})},n.get=function(i){return this.queriesMap[i]},n.getAll=function(){return this.queries},n.find=function(i,r){var s=$P(i,r),a=s[0];return typeof a.exact\u003e\"u\"\u0026\u0026(a.exact=!0),this.queries.find(function(A){return pmn(a,A)})},n.findAll=function(i,r){var s=$P(i,r),a=s[0];return Object.keys(a).length\u003e0?this.queries.filter(function(A){return pmn(a,A)}):this.queries},n.notify=function(i){var r=this;dh.batch(function(){r.listeners.forEach(function(s){s(i)})})},n.onFocus=function(){var i=this;dh.batch(function(){i.queries.forEach(function(r){r.onFocus()})})},n.onOnline=function(){var i=this;dh.batch(function(){i.queries.forEach(function(r){r.onOnline()})})},e})($U),$Ki=(function(){function t(n){this.options=ca({},n.defaultOptions,n.options),this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.observers=[],this.state=n.state||Bmn(),this.meta=n.meta}var e=t.prototype;return e.setState=function(o){this.dispatch({type:\"setState\",state:o})},e.addObserver=function(o){this.observers.indexOf(o)===-1\u0026\u0026this.observers.push(o)},e.removeObserver=function(o){this.observers=this.observers.filter(function(i){return i!==o})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(II).catch(II)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var o=this,i,r=this.state.status===\"loading\",s=Promise.resolve();return r||(this.dispatch({type:\"loading\",variables:this.options.variables}),s=s.then(function(){o.mutationCache.config.onMutate==null||o.mutationCache.config.onMutate(o.state.variables,o)}).then(function(){return o.options.onMutate==null?void 0:o.options.onMutate(o.state.variables)}).then(function(a){a!==o.state.context\u0026\u0026o.dispatch({type:\"loading\",context:a,variables:o.state.variables})})),s.then(function(){return o.executeMutation()}).then(function(a){i=a,o.mutationCache.config.onSuccess==null||o.mutationCache.config.onSuccess(i,o.state.variables,o.state.context,o)}).then(function(){return o.options.onSuccess==null?void 0:o.options.onSuccess(i,o.state.variables,o.state.context)}).then(function(){return o.options.onSettled==null?void 0:o.options.onSettled(i,null,o.state.variables,o.state.context)}).then(function(){return o.dispatch({type:\"success\",data:i}),i}).catch(function(a){return o.mutationCache.config.onError==null||o.mutationCache.config.onError(a,o.state.variables,o.state.context,o),Lfe().error(a),Promise.resolve().then(function(){return o.options.onError==null?void 0:o.options.onError(a,o.state.variables,o.state.context)}).then(function(){return o.options.onSettled==null?void 0:o.options.onSettled(void 0,a,o.state.variables,o.state.context)}).then(function(){throw o.dispatch({type:\"error\",error:a}),a})})},e.executeMutation=function(){var o=this,i;return this.retryer=new xmn({fn:function(){return o.options.mutationFn?o.options.mutationFn(o.state.variables):Promise.reject(\"No mutationFn found\")},onFail:function(){o.dispatch({type:\"failed\"})},onPause:function(){o.dispatch({type:\"pause\"})},onContinue:function(){o.dispatch({type:\"continue\"})},retry:(i=this.options.retry)!=null?i:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(o){var i=this;this.state=qKi(this.state,o),dh.batch(function(){i.observers.forEach(function(r){r.onMutationUpdate(o)}),i.mutationCache.notify(i)})},t})();function Bmn(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:\"idle\",variables:void 0}}function qKi(t,e){switch(e.type){case\"failed\":return ca({},t,{failureCount:t.failureCount+1});case\"pause\":return ca({},t,{isPaused:!0});case\"continue\":return ca({},t,{isPaused:!1});case\"loading\":return ca({},t,{context:e.context,data:void 0,error:null,isPaused:!1,status:\"loading\",variables:e.variables});case\"success\":return ca({},t,{data:e.data,error:null,status:\"success\",isPaused:!1});case\"error\":return ca({},t,{data:void 0,error:e.error,failureCount:t.failureCount+1,isPaused:!1,status:\"error\"});case\"setState\":return ca({},t,e.state);default:return t}}var XKi=(function(t){NN(e,t);function e(o){var i;return i=t.call(this)||this,i.config=o||{},i.mutations=[],i.mutationId=0,i}var n=e.prototype;return n.build=function(i,r,s){var a=new $Ki({mutationCache:this,mutationId:++this.mutationId,options:i.defaultMutationOptions(r),state:s,defaultOptions:r.mutationKey?i.getMutationDefaults(r.mutationKey):void 0,meta:r.meta});return this.add(a),a},n.add=function(i){this.mutations.push(i),this.notify(i)},n.remove=function(i){this.mutations=this.mutations.filter(function(r){return r!==i}),i.cancel(),this.notify(i)},n.clear=function(){var i=this;dh.batch(function(){i.mutations.forEach(function(r){i.remove(r)})})},n.getAll=function(){return this.mutations},n.find=function(i){return typeof i.exact\u003e\"u\"\u0026\u0026(i.exact=!0),this.mutations.find(function(r){return mmn(i,r)})},n.findAll=function(i){return this.mutations.filter(function(r){return mmn(i,r)})},n.notify=function(i){var r=this;dh.batch(function(){r.listeners.forEach(function(s){s(i)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var i=this.mutations.filter(function(r){return r.state.isPaused});return dh.batch(function(){return i.reduce(function(r,s){return r.then(function(){return s.continue().catch(II)})},Promise.resolve())})},e})($U);function ZKi(){return{onFetch:function(e){e.fetchFn=function(){var n,o,i,r,s,a,A=(n=e.fetchOptions)==null||(o=n.meta)==null?void 0:o.refetchPage,c=(i=e.fetchOptions)==null||(r=i.meta)==null?void 0:r.fetchMore,l=c?.pageParam,u=c?.direction===\"forward\",g=c?.direction===\"backward\",h=((s=e.state.data)==null?void 0:s.pages)||[],d=((a=e.state.data)==null?void 0:a.pageParams)||[],p=Cmn(),m=p?.signal,_=d,f=!1,I=e.options.queryFn||function(){return Promise.reject(\"Missing queryFn\")},C=function(R,F,O,U){return _=U?[F].concat(_):[].concat(_,[F]),U?[O].concat(R):[].concat(R,[O])},y=function(R,F,O,U){if(f)return Promise.reject(\"Cancelled\");if(typeof O\u003e\"u\"\u0026\u0026!F\u0026\u0026R.length)return Promise.resolve(R);var Y={queryKey:e.queryKey,signal:m,pageParam:O,meta:e.meta},W=I(Y),te=Promise.resolve(W).then(function(J){return C(R,O,J,U)});if(kfe(W)){var j=te;j.cancel=W.cancel}return te},x;if(!h.length)x=y([]);else if(u){var E=typeof l\u003c\"u\",B=E?l:bmn(e.options,h);x=y(h,E,B)}else if(g){var S=typeof l\u003c\"u\",Q=S?l:eVi(e.options,h);x=y(h,S,Q,!0)}else(function(){_=[];var k=typeof e.options.getNextPageParam\u003e\"u\",R=A\u0026\u0026h[0]?A(h[0],0,h):!0;x=R?y([],k,d[0]):Promise.resolve(C([],d[0],h[0]));for(var F=function(Y){x=x.then(function(W){var te=A\u0026\u0026h[Y]?A(h[Y],Y,h):!0;if(te){var j=k?d[Y]:bmn(e.options,W);return y(W,k,j)}return Promise.resolve(C(W,d[Y],h[Y]))})},O=1;O\u003ch.length;O++)F(O)})();var w=x.then(function(k){return{pages:k,pageParams:_}}),M=w;return M.cancel=function(){f=!0,p?.abort(),kfe(x)\u0026\u0026x.cancel()},w}}}}function bmn(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function eVi(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}var tVi=(function(){function t(n){n===void 0\u0026\u0026(n={}),this.queryCache=n.queryCache||new jKi,this.mutationCache=n.mutationCache||new XKi,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=t.prototype;return e.mount=function(){var o=this;this.unsubscribeFocus=Qee.subscribe(function(){Qee.isFocused()\u0026\u0026Tfe.isOnline()\u0026\u0026(o.mutationCache.onFocus(),o.queryCache.onFocus())}),this.unsubscribeOnline=Tfe.subscribe(function(){Qee.isFocused()\u0026\u0026Tfe.isOnline()\u0026\u0026(o.mutationCache.onOnline(),o.queryCache.onOnline())})},e.unmount=function(){var o,i;(o=this.unsubscribeFocus)==null||o.call(this),(i=this.unsubscribeOnline)==null||i.call(this)},e.isFetching=function(o,i){var r=$P(o,i),s=r[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(o){return this.mutationCache.findAll(ca({},o,{fetching:!0})).length},e.getQueryData=function(o,i){var r;return(r=this.queryCache.find(o,i))==null?void 0:r.state.data},e.getQueriesData=function(o){return this.getQueryCache().findAll(o).map(function(i){var r=i.queryKey,s=i.state,a=s.data;return[r,a]})},e.setQueryData=function(o,i,r){var s=Dfe(o),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(i,r)},e.setQueriesData=function(o,i,r){var s=this;return dh.batch(function(){return s.getQueryCache().findAll(o).map(function(a){var A=a.queryKey;return[A,s.setQueryData(A,i,r)]})})},e.getQueryState=function(o,i){var r;return(r=this.queryCache.find(o,i))==null?void 0:r.state},e.removeQueries=function(o,i){var r=$P(o,i),s=r[0],a=this.queryCache;dh.batch(function(){a.findAll(s).forEach(function(A){a.remove(A)})})},e.resetQueries=function(o,i,r){var s=this,a=$P(o,i,r),A=a[0],c=a[1],l=this.queryCache,u=ca({},A,{active:!0});return dh.batch(function(){return l.findAll(A).forEach(function(g){g.reset()}),s.refetchQueries(u,c)})},e.cancelQueries=function(o,i,r){var s=this,a=$P(o,i,r),A=a[0],c=a[1],l=c===void 0?{}:c;typeof l.revert\u003e\"u\"\u0026\u0026(l.revert=!0);var u=dh.batch(function(){return s.queryCache.findAll(A).map(function(g){return g.cancel(l)})});return Promise.all(u).then(II).catch(II)},e.invalidateQueries=function(o,i,r){var s,a,A,c=this,l=$P(o,i,r),u=l[0],g=l[1],h=ca({},u,{active:(s=(a=u.refetchActive)!=null?a:u.active)!=null?s:!0,inactive:(A=u.refetchInactive)!=null?A:!1});return dh.batch(function(){return c.queryCache.findAll(u).forEach(function(d){d.invalidate()}),c.refetchQueries(h,g)})},e.refetchQueries=function(o,i,r){var s=this,a=$P(o,i,r),A=a[0],c=a[1],l=dh.batch(function(){return s.queryCache.findAll(A).map(function(g){return g.fetch(void 0,ca({},c,{meta:{refetchPage:A?.refetchPage}}))})}),u=Promise.all(l).then(II);return c?.throwOnError||(u=u.catch(II)),u},e.fetchQuery=function(o,i,r){var s=Dfe(o,i,r),a=this.defaultQueryOptions(s);typeof a.retry\u003e\"u\"\u0026\u0026(a.retry=!1);var A=this.queryCache.build(this,a);return A.isStaleByTime(a.staleTime)?A.fetch(a):Promise.resolve(A.state.data)},e.prefetchQuery=function(o,i,r){return this.fetchQuery(o,i,r).then(II).catch(II)},e.fetchInfiniteQuery=function(o,i,r){var s=Dfe(o,i,r);return s.behavior=ZKi(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(o,i,r){return this.fetchInfiniteQuery(o,i,r).then(II).catch(II)},e.cancelMutations=function(){var o=this,i=dh.batch(function(){return o.mutationCache.getAll().map(function(r){return r.cancel()})});return Promise.all(i).then(II).catch(II)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(o){return this.mutationCache.build(this,o).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(o){this.defaultOptions=o},e.setQueryDefaults=function(o,i){var r=this.queryDefaults.find(function(s){return WT(o)===WT(s.queryKey)});r?r.defaultOptions=i:this.queryDefaults.push({queryKey:o,defaultOptions:i})},e.getQueryDefaults=function(o){var i;return o?(i=this.queryDefaults.find(function(r){return Nfe(o,r.queryKey)}))==null?void 0:i.defaultOptions:void 0},e.setMutationDefaults=function(o,i){var r=this.mutationDefaults.find(function(s){return WT(o)===WT(s.mutationKey)});r?r.defaultOptions=i:this.mutationDefaults.push({mutationKey:o,defaultOptions:i})},e.getMutationDefaults=function(o){var i;return o?(i=this.mutationDefaults.find(function(r){return Nfe(o,r.mutationKey)}))==null?void 0:i.defaultOptions:void 0},e.defaultQueryOptions=function(o){if(o?._defaulted)return o;var i=ca({},this.defaultOptions.queries,this.getQueryDefaults(o?.queryKey),o,{_defaulted:!0});return!i.queryHash\u0026\u0026i.queryKey\u0026\u0026(i.queryHash=Cqe(i.queryKey,i)),i},e.defaultQueryObserverOptions=function(o){return this.defaultQueryOptions(o)},e.defaultMutationOptions=function(o){return o?._defaulted?o:ca({},this.defaultOptions.mutations,this.getMutationDefaults(o?.mutationKey),o,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},t})(),nVi=(function(t){NN(e,t);function e(o,i){var r;return r=t.call(this)||this,r.client=o,r.options=i,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(i),r}var n=e.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){this.listeners.length===1\u0026\u0026(this.currentQuery.addObserver(this),Smn(this.currentQuery,this.options)\u0026\u0026this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return xqe(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return xqe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(i,r){var s=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(i),typeof this.options.enabled\u003c\"u\"\u0026\u0026typeof this.options.enabled!=\"boolean\")throw new Error(\"Expected enabled to be a boolean\");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();var A=this.hasListeners();A\u0026\u0026Qmn(this.currentQuery,a,this.options,s)\u0026\u0026this.executeFetch(),this.updateResult(r),A\u0026\u0026(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)\u0026\u0026this.updateStaleTimeout();var c=this.computeRefetchInterval();A\u0026\u0026(this.currentQuery!==a||this.options.enabled!==s.enabled||c!==this.currentRefetchInterval)\u0026\u0026this.updateRefetchInterval(c)},n.getOptimisticResult=function(i){var r=this.client.defaultQueryObserverOptions(i),s=this.client.getQueryCache().build(this.client,r);return this.createResult(s,r)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(i,r){var s=this,a={},A=function(l){s.trackedProps.includes(l)||s.trackedProps.push(l)};return Object.keys(i).forEach(function(c){Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:function(){return A(c),i[c]}})}),(r.useErrorBoundary||r.suspense)\u0026\u0026A(\"error\"),a},n.getNextResult=function(i){var r=this;return new Promise(function(s,a){var A=r.subscribe(function(c){c.isFetching||(A(),c.isError\u0026\u0026i?.throwOnError?a(c.error):s(c))})})},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(i){return this.fetch(ca({},i,{meta:{refetchPage:i?.refetchPage}}))},n.fetchOptimistic=function(i){var r=this,s=this.client.defaultQueryObserverOptions(i),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return r.createResult(a,s)})},n.fetch=function(i){var r=this;return this.executeFetch(i).then(function(){return r.updateResult(),r.currentResult})},n.executeFetch=function(i){this.updateQuery();var r=this.currentQuery.fetch(this.options,i);return i?.throwOnError||(r=r.catch(II)),r},n.updateStaleTimeout=function(){var i=this;if(this.clearStaleTimeout(),!(Pfe||this.currentResult.isStale||!Iqe(this.options.staleTime))){var r=hmn(this.currentResult.dataUpdatedAt,this.options.staleTime),s=r+1;this.staleTimeoutId=setTimeout(function(){i.currentResult.isStale||i.updateResult()},s)}},n.computeRefetchInterval=function(){var i;return typeof this.options.refetchInterval==\"function\"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(i=this.options.refetchInterval)!=null?i:!1},n.updateRefetchInterval=function(i){var r=this;this.clearRefetchInterval(),this.currentRefetchInterval=i,!(Pfe||this.options.enabled===!1||!Iqe(this.currentRefetchInterval)||this.currentRefetchInterval===0)\u0026\u0026(this.refetchIntervalId=setInterval(function(){(r.options.refetchIntervalInBackground||Qee.isFocused())\u0026\u0026r.executeFetch()},this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId\u0026\u0026(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId\u0026\u0026(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(i,r){var s=this.currentQuery,a=this.options,A=this.currentResult,c=this.currentResultState,l=this.currentResultOptions,u=i!==s,g=u?i.state:this.currentQueryInitialState,h=u?this.currentResult:this.previousQueryResult,d=i.state,p=d.dataUpdatedAt,m=d.error,_=d.errorUpdatedAt,f=d.isFetching,I=d.status,C=!1,y=!1,x;if(r.optimisticResults){var E=this.hasListeners(),B=!E\u0026\u0026Smn(i,r),S=E\u0026\u0026Qmn(i,s,r,a);(B||S)\u0026\u0026(f=!0,p||(I=\"loading\"))}if(r.keepPreviousData\u0026\u0026!d.dataUpdateCount\u0026\u0026h?.isSuccess\u0026\u0026I!==\"error\")x=h.data,p=h.dataUpdatedAt,I=h.status,C=!0;else if(r.select\u0026\u0026typeof d.data\u003c\"u\")if(A\u0026\u0026d.data===c?.data\u0026\u0026r.select===this.selectFn)x=this.selectResult;else try{this.selectFn=r.select,x=r.select(d.data),r.structuralSharing!==!1\u0026\u0026(x=Rfe(A?.data,x)),this.selectResult=x,this.selectError=null}catch(M){Lfe().error(M),this.selectError=M}else x=d.data;if(typeof r.placeholderData\u003c\"u\"\u0026\u0026typeof x\u003e\"u\"\u0026\u0026(I===\"loading\"||I===\"idle\")){var Q;if(A?.isPlaceholderData\u0026\u0026r.placeholderData===l?.placeholderData)Q=A.data;else if(Q=typeof r.placeholderData==\"function\"?r.placeholderData():r.placeholderData,r.select\u0026\u0026typeof Q\u003c\"u\")try{Q=r.select(Q),r.structuralSharing!==!1\u0026\u0026(Q=Rfe(A?.data,Q)),this.selectError=null}catch(M){Lfe().error(M),this.selectError=M}typeof Q\u003c\"u\"\u0026\u0026(I=\"success\",x=Q,y=!0)}this.selectError\u0026\u0026(m=this.selectError,x=this.selectResult,_=Date.now(),I=\"error\");var w={status:I,isLoading:I===\"loading\",isSuccess:I===\"success\",isError:I===\"error\",isIdle:I===\"idle\",data:x,dataUpdatedAt:p,error:m,errorUpdatedAt:_,failureCount:d.fetchFailureCount,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount\u003e0||d.errorUpdateCount\u003e0,isFetchedAfterMount:d.dataUpdateCount\u003eg.dataUpdateCount||d.errorUpdateCount\u003eg.errorUpdateCount,isFetching:f,isRefetching:f\u0026\u0026I!==\"loading\",isLoadingError:I===\"error\"\u0026\u0026d.dataUpdatedAt===0,isPlaceholderData:y,isPreviousData:C,isRefetchError:I===\"error\"\u0026\u0026d.dataUpdatedAt!==0,isStale:Eqe(i,r),refetch:this.refetch,remove:this.remove};return w},n.shouldNotifyListeners=function(i,r){if(!r)return!0;var s=this.options,a=s.notifyOnChangeProps,A=s.notifyOnChangePropsExclusions;if(!a\u0026\u0026!A||a===\"tracked\"\u0026\u0026!this.trackedProps.length)return!0;var c=a===\"tracked\"?this.trackedProps:a;return Object.keys(i).some(function(l){var u=l,g=i[u]!==r[u],h=c?.some(function(p){return p===l}),d=A?.some(function(p){return p===l});return g\u0026\u0026!d\u0026\u0026(!c||h)})},n.updateResult=function(i){var r=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!GKi(this.currentResult,r)){var s={cache:!0};i?.listeners!==!1\u0026\u0026this.shouldNotifyListeners(this.currentResult,r)\u0026\u0026(s.listeners=!0),this.notify(ca({},s,i))}},n.updateQuery=function(){var i=this.client.getQueryCache().build(this.client,this.options);if(i!==this.currentQuery){var r=this.currentQuery;this.currentQuery=i,this.currentQueryInitialState=i.state,this.previousQueryResult=this.currentResult,this.hasListeners()\u0026\u0026(r?.removeObserver(this),i.addObserver(this))}},n.onQueryUpdate=function(i){var r={};i.type===\"success\"?r.onSuccess=!0:i.type===\"error\"\u0026\u0026!Ffe(i.error)\u0026\u0026(r.onError=!0),this.updateResult(r),this.hasListeners()\u0026\u0026this.updateTimers()},n.notify=function(i){var r=this;dh.batch(function(){i.onSuccess?(r.options.onSuccess==null||r.options.onSuccess(r.currentResult.data),r.options.onSettled==null||r.options.onSettled(r.currentResult.data,null)):i.onError\u0026\u0026(r.options.onError==null||r.options.onError(r.currentResult.error),r.options.onSettled==null||r.options.onSettled(void 0,r.currentResult.error)),i.listeners\u0026\u0026r.listeners.forEach(function(s){s(r.currentResult)}),i.cache\u0026\u0026r.client.getQueryCache().notify({query:r.currentQuery,type:\"observerResultsUpdated\"})})},e})($U);function oVi(t,e){return e.enabled!==!1\u0026\u0026!t.state.dataUpdatedAt\u0026\u0026!(t.state.status===\"error\"\u0026\u0026e.retryOnMount===!1)}function Smn(t,e){return oVi(t,e)||t.state.dataUpdatedAt\u003e0\u0026\u0026xqe(t,e,e.refetchOnMount)}function xqe(t,e,n){if(e.enabled!==!1){var o=typeof n==\"function\"?n(t):n;return o===\"always\"||o!==!1\u0026\u0026Eqe(t,e)}return!1}function Qmn(t,e,n,o){return n.enabled!==!1\u0026\u0026(t!==e||o.enabled===!1)\u0026\u0026(!n.suspense||t.state.status!==\"error\")\u0026\u0026Eqe(t,n)}function Eqe(t,e){return t.isStaleByTime(e.staleTime)}var iVi=(function(t){NN(e,t);function e(o,i){var r;return r=t.call(this)||this,r.client=o,r.setOptions(i),r.bindMethods(),r.updateResult(),r}var n=e.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(i){this.options=this.client.defaultMutationOptions(i)},n.onUnsubscribe=function(){if(!this.listeners.length){var i;(i=this.currentMutation)==null||i.removeObserver(this)}},n.onMutationUpdate=function(i){this.updateResult();var r={listeners:!0};i.type===\"success\"?r.onSuccess=!0:i.type===\"error\"\u0026\u0026(r.onError=!0),this.notify(r)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(i,r){return this.mutateOptions=r,this.currentMutation\u0026\u0026this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,ca({},this.options,{variables:typeof i\u003c\"u\"?i:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var i=this.currentMutation?this.currentMutation.state:Bmn(),r=ca({},i,{isLoading:i.status===\"loading\",isSuccess:i.status===\"success\",isError:i.status===\"error\",isIdle:i.status===\"idle\",mutate:this.mutate,reset:this.reset});this.currentResult=r},n.notify=function(i){var r=this;dh.batch(function(){r.mutateOptions\u0026\u0026(i.onSuccess?(r.mutateOptions.onSuccess==null||r.mutateOptions.onSuccess(r.currentResult.data,r.currentResult.variables,r.currentResult.context),r.mutateOptions.onSettled==null||r.mutateOptions.onSettled(r.currentResult.data,null,r.currentResult.variables,r.currentResult.context)):i.onError\u0026\u0026(r.mutateOptions.onError==null||r.mutateOptions.onError(r.currentResult.error,r.currentResult.variables,r.currentResult.context),r.mutateOptions.onSettled==null||r.mutateOptions.onSettled(void 0,r.currentResult.error,r.currentResult.variables,r.currentResult.context))),i.listeners\u0026\u0026r.listeners.forEach(function(s){s(r.currentResult)})})},e})($U),rVi=NFt.unstable_batchedUpdates;dh.setBatchNotifyFunction(rVi);var sVi=console;JKi(sVi);var vmn=Fs.createContext(void 0),wmn=Fs.createContext(!1);function Pmn(t){return t\u0026\u0026typeof window\u003c\"u\"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=vmn),window.ReactQueryClientContext):vmn}var Bqe=function(){var e=Fs.useContext(Pmn(Fs.useContext(wmn)));if(!e)throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");return e},aVi=function(e){var n=e.client,o=e.contextSharing,i=o===void 0?!1:o,r=e.children;Fs.useEffect(function(){return n.mount(),function(){n.unmount()}},[n]);var s=Pmn(i);return Fs.createElement(wmn.Provider,{value:i},Fs.createElement(s.Provider,{value:n},r))};function AVi(){var t=!1;return{clearReset:function(){t=!1},reset:function(){t=!0},isReset:function(){return t}}}var cVi=Fs.createContext(AVi()),lVi=function(){return Fs.useContext(cVi)};function Mmn(t,e,n){return typeof e==\"function\"?e.apply(void 0,n):typeof e==\"boolean\"?e:!!t}function uVi(t,e,n){var o=Fs.useRef(!1),i=Fs.useState(0),r=i[1],s=LKi(t,e),a=Bqe(),A=Fs.useRef();A.current?A.current.setOptions(s):A.current=new iVi(a,s);var c=A.current.getCurrentResult();Fs.useEffect(function(){o.current=!0;var u=A.current.subscribe(dh.batchCalls(function(){o.current\u0026\u0026r(function(g){return g+1})}));return function(){o.current=!1,u()}},[]);var l=Fs.useCallback(function(u,g){A.current.mutate(u,g).catch(II)},[]);if(c.error\u0026\u0026Mmn(void 0,A.current.options.useErrorBoundary,[c.error]))throw c.error;return ca({},c,{mutate:l,mutateAsync:c.mutate})}function gVi(t,e){var n=Fs.useRef(!1),o=Fs.useState(0),i=o[1],r=Bqe(),s=lVi(),a=r.defaultQueryObserverOptions(t);a.optimisticResults=!0,a.onError\u0026\u0026(a.onError=dh.batchCalls(a.onError)),a.onSuccess\u0026\u0026(a.onSuccess=dh.batchCalls(a.onSuccess)),a.onSettled\u0026\u0026(a.onSettled=dh.batchCalls(a.onSettled)),a.suspense\u0026\u0026(typeof a.staleTime!=\"number\"\u0026\u0026(a.staleTime=1e3),a.cacheTime===0\u0026\u0026(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)\u0026\u0026(s.isReset()||(a.retryOnMount=!1));var A=Fs.useState(function(){return new e(r,a)}),c=A[0],l=c.getOptimisticResult(a);if(Fs.useEffect(function(){n.current=!0,s.clearReset();var u=c.subscribe(dh.batchCalls(function(){n.current\u0026\u0026i(function(g){return g+1})}));return c.updateResult(),function(){n.current=!1,u()}},[s,c]),Fs.useEffect(function(){c.setOptions(a,{listeners:!1})},[a,c]),a.suspense\u0026\u0026l.isLoading)throw c.fetchOptimistic(a).then(function(u){var g=u.data;a.onSuccess==null||a.onSuccess(g),a.onSettled==null||a.onSettled(g,null)}).catch(function(u){s.clearReset(),a.onError==null||a.onError(u),a.onSettled==null||a.onSettled(void 0,u)});if(l.isError\u0026\u0026!s.isReset()\u0026\u0026!l.isFetching\u0026\u0026Mmn(a.suspense,a.useErrorBoundary,[l.error,c.getCurrentQuery()]))throw l.error;return a.notifyOnChangeProps===\"tracked\"\u0026\u0026(l=c.trackResult(l,a)),l}function dVi(t,e,n){var o=Dfe(t,e,n);return gVi(o,nVi)}function hVi({orderQuote:t,selectedShippingCarrier:e,onSelectShippingCarrier:n,lowestShippingCarrierCost:o}){const i=e?t.shipping_options.find(r=\u003er.carrier===e):null;return K.jsxs(\"div\",{className:\"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[K.jsx(bbi,{className:\"rf-w-6 rf-h-6 rf-text-blue-500\"}),K.jsx(\"span\",{className:\"rf-font-semibold rf-text-lg\",children:t.vendor_name.toUpperCase()})]}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-end\",children:[K.jsx(\"span\",{className:\"rf-text-gray-500 rf-text-sm\",children:\"Fully Assembled PCB\"}),K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[K.jsxs(\"span\",{className:\"rf-text-gray-400 rf-line-through rf-text-base\",children:[\"$\",o.toFixed(2)]}),K.jsx(\"span\",{className:\"rf-font-bold rf-text-xl rf-text-blue-600\",children:\"$50.00\"})]})]})]}),K.jsx(\"hr\",{className:\"rf-border-gray-200\"}),K.jsxs(\"div\",{className:\"rf-px-6 rf-pt-4 rf-pb-2\",children:[K.jsx(\"div\",{className:\"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700\",children:\"Shipping Options:\"}),K.jsx(\"div\",{className:\"rf-flex rf-flex-col rf-gap-2 rf-mb-2\",children:t.shipping_options.map((r,s)=\u003eK.jsxs(\"button\",{type:\"button\",className:Oi(\"rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white\",e===r.carrier?\"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500\":\"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300\"),onClick:()=\u003en(r.carrier),children:[K.jsx(wbi,{className:\"rf-w-5 rf-h-5 rf-text-yellow-500\"}),K.jsxs(\"div\",{className:\"rf-text-left rf-flex-1\",children:[K.jsx(\"div\",{className:\"rf-leading-tight rf-font-medium\",children:r.carrier}),K.jsx(\"div\",{className:\"rf-text-xs rf-text-gray-500\",children:\"Express, 5-12 days\"})]}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-end rf-ml-2\",children:[K.jsxs(\"span\",{className:\"rf-text-gray-400 rf-line-through rf-text-sm\",children:[\"$\",r.cost.toFixed(2)]}),K.jsx(\"span\",{className:\"rf-text-xs rf-text-blue-600 rf-font-medium\",children:\"waived\"})]})]},r.carrier+s))})]}),e!==null\u0026\u0026i\u0026\u0026K.jsx(\"div\",{className:\"rf-px-6 rf-pb-4 rf-pt-2\",children:K.jsxs(\"div\",{className:\"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2\",children:[K.jsx(\"span\",{className:\"rf-text-gray-700 rf-font-bold\",children:\"Total (incl. shipping):\"}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-end\",children:[K.jsxs(\"div\",{className:\"rf-text-gray-400 rf-line-through rf-text-base\",children:[\"$\",(t.total_cost_without_shipping+i.cost).toFixed(2)]}),K.jsx(\"div\",{className:\"rf-flex rf-items-center\",children:K.jsx(\"span\",{className:\"rf-font-bold rf-text-xl rf-text-blue-600\",children:\"$50.00\"})})]})]})})]})}const pVi=async t=\u003e{try{const{order_quote_id:e}=await gq.post(\"order_quotes/create\",{json:{package_release_id:t,vendor_name:\"jlcpcb\"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof Wb){const n=await e.response.json();throw{error:{message:n.message,error_code:n.error_code}}}throw e}},mVi=async t=\u003e{const{order_quote:e}=await gq.get(\"order_quotes/get\",{searchParams:{order_quote_id:t}}).json();return e},_Vi=()=\u003e{const t=Bqe();return uVi({mutationKey:[\"createOrderQuote\"],mutationFn:e=\u003epVi(e),onSuccess:e=\u003e{t.invalidateQueries([\"getOrderQuote\",e.order_quote_id])}})},fVi=t=\u003e{const{data:e,error:n,status:o}=dVi([\"getOrderQuote\",t],()=\u003emVi(t||\"\"),{enabled:!!t,refetchInterval:i=\u003ei?.is_completed||i?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:o===\"loading\"?\"loading\":o===\"error\"?\"error\":\"success\",data:e??null,error:n instanceof Error?n:null}},IVi=({onCancel:t,packageReleaseId:e,signIn:n,isLoggedIn:o})=\u003e{const[i,r]=ee.useState(null),[s,a]=ee.useState(null),{mutate:A,error:c}=_Vi();ee.useEffect(()=\u003e{e\u0026\u0026A(e,{onSuccess:p=\u003e{a(p.order_quote_id)}})},[e]);const{data:l}=fVi(s||void 0),u=c\u0026\u0026c.error?.message||l?.error?.message;hpn({errorMessage:u});const g=async p=\u003e{const m=uq(\"TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL\");window.location.href=`${m}?client_reference_id=${p}\u0026shipping_option=${i}`};ee.useEffect(()=\u003e{if(i===null\u0026\u0026l\u0026\u0026Array.isArray(l.shipping_options)\u0026\u0026l.shipping_options.length\u003e0){const p=l.shipping_options.reduce((m,_)=\u003e_.cost\u003cm.cost?_:m,l.shipping_options[0]);r(p?.carrier||null)}},[l]);const h=ee.useMemo(()=\u003el\u0026\u0026Array.isArray(l.shipping_options)\u0026\u0026l.shipping_options.length\u003e0?l.shipping_options.reduce((p,m)=\u003em.cost\u003cp.cost?m:p,l.shipping_options[0]).cost:0,[l]),d=c\u0026\u0026c.error?.error_code?.includes(\"no_token\")||l?.error?.error_code?.includes(\"no_token\")\u0026\u0026n;return!o||d?K.jsx(xVi,{signIn:n}):K.jsxs(\"div\",{className:`\n rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl \n rf-p-4 sm:rf-p-6 md:rf-p-8 \n rf-flex rf-flex-col rf-gap-3\n rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl\n `,children:[K.jsx(\"h2\",{className:\"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center\",children:\"Order PCB\"}),!(c||l?.error)\u0026\u0026(!s||!l||l?.is_processing)\u0026\u0026K.jsx(CVi,{message:\"Fetching quotes...\"}),(c||l?.error)\u0026\u0026K.jsx(yVi,{message:c\u0026\u0026c.error?.message||l?.error?.message||\"Failed to fetch quotes\"}),l?.is_completed\u0026\u0026!c\u0026\u0026!l?.error\u0026\u0026Array.isArray(l?.shipping_options)\u0026\u0026l.shipping_options.length\u003e0\u0026\u0026K.jsxs(K.Fragment,{children:[K.jsx(\"div\",{className:\"rf-bg-blue-100 rf-text-blue-800 rf-p-2 sm:rf-p-3 rf-rounded-md rf-text-center rf-text-xs sm:rf-text-sm\",children:\"This board is eligible for the tscircuit Flat Fee\"}),K.jsx(hVi,{orderQuote:l,selectedShippingCarrier:i,onSelectShippingCarrier:r,lowestShippingCarrierCost:h+(l.total_cost_without_shipping||0)},l?.order_quote_id)]}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col-reverse sm:rf-flex-row rf-justify-between rf-mt-5 rf-gap-3 sm:rf-gap-4\",children:[K.jsx(fA,{variant:\"outline\",type:\"button\",className:\"rf-w-full sm:rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600 rf-text-sm sm:rf-text-base\",onClick:t,children:\"Cancel\"}),K.jsx(fA,{type:\"button\",className:\"rf-w-full sm:rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700 rf-text-sm sm:rf-text-base\",disabled:i===null,onClick:()=\u003e{if(i===null){ua.error(\"Please select a shipping option.\");return}l\u0026\u0026g(l.order_quote_id)},children:\"Continue\"})]}),K.jsx(\"div\",{className:\"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-3 sm:rf-mt-4 rf-px-2\",children:\"Pricing may vary based on specifications.\"})]})},CVi=({message:t})=\u003eK.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12\",children:[K.jsx(SE,{className:\"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400\"}),K.jsx(\"p\",{className:\"rf-text-gray-600\",children:t})]}),yVi=({message:t})=\u003eK.jsx(\"div\",{className:\"rf-text-red-600 rf-text-center rf-py-12\",children:t}),xVi=({signIn:t})=\u003eK.jsxs(\"div\",{className:`\n rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl \n rf-p-4 sm:rf-p-6 md:rf-p-8 \n rf-flex rf-flex-col rf-gap-3\n rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl\n `,children:[K.jsx(\"h2\",{className:\"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center\",children:\"Order PCB\"}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4 sm:rf-py-6 md:rf-py-8\",children:[K.jsx(\"p\",{className:\"rf-text-gray-600 rf-text-sm sm:rf-text-base rf-text-center rf-px-2\",children:\"Please sign in to continue\"}),K.jsxs(fA,{onClick:t,className:\"rf-flex rf-items-center rf-gap-2 rf-text-sm sm:rf-text-base rf-px-4 sm:rf-px-6\",children:[K.jsx(nWe,{className:\"rf-w-4 rf-h-4 sm:rf-w-5 sm:rf-h-5\"}),\"Sign in with GitHub\"]})]})]}),EVi=new tVi,BVi=({isOpen:t,onClose:e,stage:n,setStage:o,circuitJson:i,packageReleaseId:r,signIn:s,isLoggedIn:a})=\u003eK.jsx(aVi,{client:EVi,children:K.jsx(KT,{open:t,onOpenChange:A=\u003e{A||e()},children:K.jsx(VP,{className:`\n !rf-p-0 !rf-z-[101] rf-rounded-md\n !rf-w-[95vw] !rf-max-w-[95vw]\n sm:rf-w-[90vw] sm:rf-max-w-[500px]\n md:rf-w-auto md:rf-max-w-[660px]\n lg:rf-max-w-[720px]\n xl:rf-max-w-[800px]\n rf-max-h-[90vh] rf-overflow-y-auto\n `,children:K.jsx(\"div\",{className:\"rf-relative rf-w-full\",children:n===\"initial\"\u0026\u0026K.jsx(IVi,{onCancel:e,packageReleaseId:r??\"\",signIn:s??(()=\u003e{}),isLoggedIn:a})})})})}),bVi=({isOpen:t,onClose:e,stage:n,setStage:o,signIn:i,isLoggedIn:r})=\u003e{const s=md(a=\u003ea.circuitJson);return K.jsx(BVi,{signIn:i,isOpen:t,onClose:e,stage:n,setStage:o,circuitJson:s,isLoggedIn:r??!1})},SVi=()=\u003e{const[t,e]=ee.useState(!1),[n,o]=ee.useState(\"initial\");return{isOpen:t,stage:n,open:()=\u003ee(!0),close:()=\u003e{e(!1),o(\"initial\")},setStage:o,OrderDialog:bVi}};async function Dmn(){const t=await fetch(`${QC}/files/list`),{file_list:e}=await t.json(),n=new Map;for(const o of e){const r=await(await fetch(`${QC}/files/get?file_path=${encodeURIComponent(o.file_path)}`)).json();(r.file?.text_content||r.file?.binary_content_b64)\u0026\u0026n.set(o.file_path,{text_content:r.file.text_content,binary_content_b64:r.file.binary_content_b64})}return n}const QVi=\"https://api.tscircuit.com/bug_reports/view?bug_report_id=\",vVi=t=\u003e`${QVi}${t}`,wVi=t=\u003e{const[e,n]=ee.useState(!1),[o,i]=ee.useState(!1),[r,s]=ee.useState(null),[a,A]=ee.useState(null),[c,l]=ee.useState([]),u=ee.useRef(null),[g,h]=ee.useState(null),[d,p]=ee.useState(0),m=t?.onLoginRequired,_=ee.useMemo(()=\u003ezge()?!0:typeof document\u003e\"u\"?!1:document.cookie.split(\";\").some(x=\u003ex.trim().startsWith(\"session=\")),[e]);ee.useEffect(()=\u003e{if(e\u0026\u0026!g\u0026\u0026u.current){const x=typeof window\u003c\"u\"?window.__TSCIRCUIT_LAST_EXECUTION_ERROR:void 0;x\u0026\u0026(u.current.value=`I'm getting this execution error:\n\n${x}`)}},[e,g]),ee.useEffect(()=\u003e{e\u0026\u0026!g\u0026\u0026Dmn().then(x=\u003e{p(x.size)}).catch(x=\u003e{console.error(\"Failed to fetch file count\",x),p(0)})},[e,g]);const f=ee.useCallback(()=\u003e{s(null),h(null),A(null),l([]),u.current\u0026\u0026(u.current.value=\"\"),n(!0)},[]),I=ee.useCallback(()=\u003e{n(!1)},[]),C=ee.useCallback(async()=\u003e{i(!0),s(null),A(null),l([]);const x=Hw(),E=u.current?.value||\"\";try{const B=await Dmn();if(B.size===0){ua.error(\"No project files available to include in the bug report\"),i(!1);return}const S=new Date(Date.now()+1440*60*1e3).toISOString(),w=(await x.post(\"bug_reports/create\",{json:{text:E.trim()||void 0,is_auto_deleted:!0,delete_at:S}}).json()).bug_report.bug_report_id,M=Array.from(B.entries()),k=[];for(let F=0;F\u003cM.length;F++){const[O,U]=M[F];A({current:F+1,total:M.length,currentFile:O});try{const Y={bug_report_id:w,file_path:O};U.text_content\u0026\u0026(Y.content_text=U.text_content),U.binary_content_b64\u0026\u0026(Y.content_base64=U.binary_content_b64),await x.post(\"bug_reports/upload_file\",{json:Y})}catch(Y){const W=Y instanceof Wb?`HTTP ${Y.response.status}`:Y instanceof Error?Y.message:\"Upload failed\";k.push({filePath:O,message:W}),l([...k])}}A(null);const R=vVi(w);h({bugReportUrl:R})}catch(B){if(console.error(\"Failed to submit bug report\",B),B instanceof Wb)if(B.response.status===401)if(_){const S=\"Your session has expired. Please sign in again to continue.\";s(S),ua.error(S),m\u0026\u0026(I(),m())}else{const S=\"You must be logged in to report a bug. Please sign in via cli and try again.\";s(S),ua.error(S),setTimeout(()=\u003e{m\u0026\u0026(I(),m())},1e3)}else{const S=`Failed to submit bug report (${B.response.status})`;s(S),ua.error(S)}else if(B instanceof Error)s(B.message),ua.error(B.message);else{const S=\"Failed to submit bug report\";s(S),ua.error(S)}}finally{i(!1)}},[_,m]);return{BugReportDialog:ee.useMemo(()=\u003e{const x=a?Math.round(a.current/a.total*100):0;return K.jsx(Epn,{open:e,onOpenChange:E=\u003e{E?(s(null),h(null),A(null),l([]),n(!0)):o||I()},children:K.jsxs(k$e,{children:[K.jsxs(F$e,{children:[K.jsx(H$e,{children:g?\"Bug Report Created\":\"Report Bug\"}),K.jsx(O$e,{asChild:!0,children:g?K.jsxs(\"div\",{className:\"rf-text-left rf-space-y-3 rf-text-sm\",children:[K.jsx(\"p\",{children:\"Bug report created successfully.\"}),c.length\u003e0\u0026\u0026K.jsxs(\"div\",{className:\"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-28 rf-overflow-y-auto rf-overflow-x-hidden\",children:[K.jsxs(\"p\",{className:\"rf-text-red-700 rf-font-medium rf-text-xs rf-mb-1\",children:[c.length,\" file(s) failed:\"]}),c.map((E,B)=\u003eK.jsxs(\"div\",{className:\"rf-text-red-600 rf-text-xs rf-mb-0.5\",title:`${E.filePath}: ${E.message}`,children:[K.jsx(\"span\",{className:\"rf-font-medium rf-break-all\",children:E.filePath.split(\"/\").pop()}),K.jsx(\"span\",{className:\"rf-text-red-500 rf-block rf-truncate\",children:E.message})]},B))]}),K.jsx(\"div\",{children:K.jsx(\"a\",{className:\"rf-text-blue-600 hover:rf-underline\",href:g.bugReportUrl,target:\"_blank\",rel:\"noreferrer\",children:\"View bug report\"})}),K.jsxs(\"p\",{children:[\"Please share this link privately with tscircuit staff so we can help debug. Join the\",K.jsx(\"a\",{className:\"rf-ml-1 rf-text-blue-600 hover:rf-underline\",href:\"https://tscircuit.com/join\",target:\"_blank\",rel:\"noreferrer\",children:\"tscircuit Discord\"}),\".\"]})]}):K.jsx(\"div\",{className:\"rf-text-left rf-space-y-3 rf-text-sm\",children:a?K.jsxs(\"div\",{className:\"rf-space-y-2 rf-overflow-hidden\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-justify-between rf-text-xs\",children:[K.jsx(\"span\",{children:\"Uploading files...\"}),K.jsxs(\"span\",{children:[a.current,\"/\",a.total]})]}),K.jsx(\"div\",{className:\"rf-w-full rf-h-2 rf-bg-gray-200 rf-rounded-full rf-overflow-hidden\",children:K.jsx(\"div\",{className:\"rf-h-full rf-bg-blue-500 rf-transition-all rf-duration-150\",style:{width:`${x}%`}})}),K.jsx(\"p\",{className:\"rf-text-xs rf-text-gray-500 rf-break-all rf-truncate rf-w-full rf-max-w-full\",children:`${a.currentFile.slice(0,60)}${a.currentFile.length\u003e60?\"...\":\"\"}`}),c.length\u003e0\u0026\u0026K.jsx(\"div\",{className:\"rf-bg-red-50 rf-border rf-border-red-200 rf-rounded rf-p-2 rf-max-h-20 rf-overflow-y-auto rf-overflow-x-hidden\",children:c.map((E,B)=\u003eK.jsxs(\"div\",{className:\"rf-text-red-600 rf-text-xs rf-mb-0.5\",title:`${E.filePath}: ${E.message}`,children:[K.jsx(\"span\",{className:\"rf-font-medium rf-break-all\",children:E.filePath.split(\"/\").pop()}),K.jsx(\"span\",{className:\"rf-text-red-500 rf-block rf-truncate\",children:E.message})]},B))})]}):K.jsxs(K.Fragment,{children:[K.jsxs(\"p\",{children:[\"Reporting a bug will upload your entire project\",d\u003e0?` (${d} file${d===1?\"\":\"s\"})`:\"\",\" \",\"to tscircuit support.\"]}),K.jsxs(\"div\",{className:\"rf-space-y-2\",children:[K.jsx(\"label\",{htmlFor:\"bug-description\",className:\"rf-block rf-font-medium\",children:\"Description (optional)\"}),K.jsx(\"textarea\",{ref:u,id:\"bug-description\",className:\"rf-w-full rf-min-h-[100px] rf-px-3 rf-py-2 rf-text-sm rf-border rf-border-gray-300 rf-rounded-md focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-blue-500\",placeholder:\"Describe the issue you're experiencing...\",disabled:o})]}),K.jsxs(\"p\",{children:[\"Share the generated bug report link privately with tscircuit staff so we can help debug your issue. You can also reach out on our\",K.jsx(\"a\",{className:\"rf-ml-1 rf-text-blue-600 hover:rf-underline\",href:\"https://tscircuit.com/join\",target:\"_blank\",rel:\"noreferrer\",children:\"Discord community\"}),\".\"]}),!_\u0026\u0026K.jsx(\"p\",{className:\"rf-text-red-600\",children:\"You appear to be logged out. Please log in before reporting a bug or the upload will fail.\"}),r\u0026\u0026K.jsx(\"p\",{className:\"rf-text-red-600\",children:r})]})})})]}),K.jsx(L$e,{children:g?K.jsx(\"button\",{type:\"button\",className:gU(),onClick:()=\u003e{I()},children:\"Close\"}):K.jsxs(K.Fragment,{children:[K.jsx(G$e,{disabled:o,onClick:()=\u003e{o||I()},children:\"Cancel\"}),!_\u0026\u0026m?K.jsx(\"button\",{type:\"button\",className:gU(),onClick:E=\u003e{E.preventDefault(),I(),m()},children:\"Sign In\"}):K.jsx(\"button\",{type:\"button\",className:NB(gU(),o\u0026\u0026\"rf-opacity-70 rf-cursor-not-allowed\"),disabled:o,onClick:E=\u003e{E.preventDefault(),C()},children:o?\"Reporting...\":\"Upload \u0026 Report\"})]})})]})},\"bug-report-dialog\")},[e,o,I,r,g,d,_,C,m,a,c]),openBugReportDialog:f}};function PVi({open:t,onOpenChange:e,onExport:n}){const[o,i]=ee.useState(!1),r=()=\u003e{n({includeSilkscreen:o}),e(!1)},s=()=\u003e{e(!1)};return K.jsx(KT,{open:t,onOpenChange:e,children:K.jsxs(VP,{children:[K.jsxs(zP,{children:[K.jsx(JP,{children:\"LightBurn Export Options\"}),K.jsx(VT,{children:\"Configure export settings for PCB laser ablation with LightBurn\"})]}),K.jsx(\"div\",{className:\"rf-flex rf-flex-col rf-gap-4 rf-py-4\",children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-space-x-2\",children:[K.jsx(Iee,{id:\"includeSilkscreen\",checked:o,onCheckedChange:a=\u003ei(a===!0)}),K.jsx(\"label\",{htmlFor:\"includeSilkscreen\",className:\"rf-text-xs rf-font-medium rf-leading-none peer-disabled:rf-cursor-not-allowed peer-disabled:rf-opacity-70\",children:\"Include silkscreen layer\"})]})}),K.jsxs(jU,{children:[K.jsx(fA,{variant:\"outline\",onClick:s,children:\"Cancel\"}),K.jsx(fA,{onClick:r,children:\"Export\"})]})]})})}const MVi=/#(\\d+)/,DVi=t=\u003e{const e=t.match(MVi);if(!e)return null;const n=Number.parseInt(e[1],10);return Number.isFinite(n)?n:null},NVi=t=\u003e{if(typeof t==\"number\")return Number.isFinite(t)?t:null;if(typeof t==\"string\"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null},RVi=t=\u003e{if(!t)return null;let e=null,n=-1,o=-1;for(const[i,r]of Object.entries(t)){const s=DVi(i),a=NVi(r.createdAt);if(s!==null){s\u003en\u0026\u0026(n=s,e={key:i,value:r});continue}if(n===-1){if(a!==null\u0026\u0026a\u003eo){o=a,e={key:i,value:r};continue}e||(e={key:i,value:r})}}return e};var TVi=Object.defineProperty,kVi=(t,e)=\u003eTVi(t,\"name\",{value:e,configurable:!0});function bqe(t,[e,n]){return Math.min(n,Math.max(e,t))}kVi(bqe,\"clamp\");var FVi=Object.defineProperty,LVi=(t,e)=\u003eFVi(t,\"name\",{value:e,configurable:!0});function Nmn(t){const e=ee.useRef({value:t,previous:t});return ee.useMemo(()=\u003e(e.current.value!==t\u0026\u0026(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}LVi(Nmn,\"usePrevious\");var HVi=Object.defineProperty,OVi=(t,e)=\u003eHVi(t,\"name\",{value:e,configurable:!0}),Rmn=Object.freeze({position:\"absolute\",border:0,width:1,height:1,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",wordWrap:\"normal\"}),GVi=ee.forwardRef(OVi(function(e,n){return K.jsx(Na.span,{...e,ref:n,style:{...Rmn,...e.style}})},\"VisuallyHidden\")),YVi=GVi,UVi=Object.defineProperty,nl=(t,e)=\u003eUVi(t,\"name\",{value:e,configurable:!0}),KVi=[\" \",\"Enter\",\"ArrowUp\",\"ArrowDown\"],VVi=[\" \",\"Enter\"],qU=\"Select\",[Hfe,Ofe,zVi]=tge(qU),[jT,kmr]=Nx(qU,[zVi,PP]),Sqe=PP(),[JVi,qP]=jT(qU),[WVi,jVi]=jT(qU);function Tmn(t){const{__scopeSelect:e,children:n,open:o,defaultOpen:i,onOpenChange:r,value:s,defaultValue:a,onValueChange:A,dir:c,name:l,autoComplete:u,disabled:g,required:h,form:d,internal_do_not_use_render:p}=t,m=Sqe(e),[_,f]=ee.useState(null),[I,C]=ee.useState(null),[y,x]=ee.useState(!1),E=Q$(c),[B,S]=DB({prop:o,defaultProp:i??!1,onChange:r,caller:qU}),[Q,w]=DB({prop:s,defaultProp:a,onChange:A,caller:qU}),M=ee.useRef(null),k=ee.useRef(Q);ee.useEffect(()=\u003e{const J=d?_?.ownerDocument.getElementById(d):_?.form;if(J instanceof HTMLFormElement){const oe=nl(()=\u003ew(k.current),\"reset\");return J.addEventListener(\"reset\",oe),()=\u003eJ.removeEventListener(\"reset\",oe)}},[d,_,w]);const R=_?!!d||!!_.closest(\"form\"):!0,[F,O]=ee.useState(new Set),U=t_(),Y=Array.from(F).map(J=\u003eJ.props.value).join(\";\"),W=ee.useCallback(J=\u003e{O(oe=\u003enew Set(oe).add(J))},[]),te=ee.useCallback(J=\u003e{O(oe=\u003e{const ie=new Set(oe);return ie.delete(J),ie})},[]),j={required:h,trigger:_,onTriggerChange:f,valueNode:I,onValueNodeChange:C,valueNodeHasChildren:y,onValueNodeHasChildrenChange:x,contentId:U,value:Q,onValueChange:w,open:B,onOpenChange:S,dir:E,triggerPointerDownPosRef:M,disabled:g,name:l,autoComplete:u,form:d,nativeOptions:F,nativeSelectKey:Y,isFormControl:R};return K.jsx(CZ,{...m,children:K.jsx(JVi,{scope:e,...j,children:K.jsx(Hfe.Provider,{scope:e,children:K.jsx(WVi,{scope:e,onNativeOptionAdd:W,onNativeOptionRemove:te,children:$mn(p)?p(j):n})})})})}nl(Tmn,\"SelectProvider\");var $Vi=nl(t=\u003e{const{__scopeSelect:e,children:n,...o}=t;return K.jsx(Tmn,{__scopeSelect:e,...o,internal_do_not_use_render:({isFormControl:i})=\u003eK.jsxs(K.Fragment,{children:[n,i?K.jsx(Izi,{__scopeSelect:e}):null]})})},\"Select\"),qVi=\"SelectTrigger\",kmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,disabled:i=!1,...r}=e,s=Sqe(o),a=qP(qVi,o),A=a.disabled||i,c=$A(n,a.onTriggerChange),l=Ofe(o),u=ee.useRef(\"touch\"),[g,h,d]=wqe(m=\u003e{const _=l().filter(C=\u003e!C.disabled),f=_.find(C=\u003eC.value===a.value),I=Pqe(_,m,f);I!==void 0\u0026\u0026a.onValueChange(I.value)}),p=nl(m=\u003e{A||(a.onOpenChange(!0),d()),m\u0026\u0026(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})},\"handleOpen\");return K.jsx(Hme,{asChild:!0,...s,children:K.jsx(Na.button,{type:\"button\",role:\"combobox\",\"aria-controls\":a.open?a.contentId:void 0,\"aria-expanded\":a.open,\"aria-required\":a.required,\"aria-autocomplete\":\"none\",dir:a.dir,\"data-state\":a.open?\"open\":\"closed\",disabled:A,\"data-disabled\":A?\"\":void 0,\"data-placeholder\":vee(a.value)?\"\":void 0,...r,ref:c,onClick:ar(r.onClick,m=\u003e{m.currentTarget.focus(),u.current!==\"mouse\"\u0026\u0026p(m)}),onPointerDown:ar(r.onPointerDown,m=\u003e{u.current=m.pointerType;const _=m.target;_.hasPointerCapture(m.pointerId)\u0026\u0026_.releasePointerCapture(m.pointerId),m.button===0\u0026\u0026m.ctrlKey===!1\u0026\u0026m.pointerType===\"mouse\"\u0026\u0026(p(m),m.preventDefault())}),onKeyDown:ar(r.onKeyDown,m=\u003e{const _=g.current!==\"\";!(m.ctrlKey||m.altKey||m.metaKey)\u0026\u0026m.key.length===1\u0026\u0026h(m.key),!(_\u0026\u0026m.key===\" \")\u0026\u0026KVi.includes(m.key)\u0026\u0026(p(),m.preventDefault())})})})},\"SelectTrigger\")),XVi=\"SelectValue\",ZVi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,className:i,style:r,children:s,placeholder:a=\"\",...A}=e,c=qP(XVi,o),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,g=$A(n,c.onValueNodeChange);Ep(()=\u003e{l(u)},[l,u]);const h=vee(c.value);return K.jsx(Na.span,{...A,asChild:h?!1:A.asChild,ref:g,style:{pointerEvents:\"none\"},children:K.jsx(ee.Fragment,{children:h?a:s},h?\"placeholder\":\"value\")})},\"SelectValue\")),ezi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,children:i,...r}=e;return K.jsx(Na.span,{\"aria-hidden\":!0,...r,ref:n,children:i||\"▼\"})},\"SelectIcon\")),tzi=\"SelectPortal\",[nzi,ozi]=jT(tzi,{forceMount:void 0}),izi=nl(t=\u003e{const{__scopeSelect:e,forceMount:n,...o}=t;return K.jsx(nzi,{scope:t.__scopeSelect,forceMount:n,children:K.jsx(Gme,{asChild:!0,...o})})},\"SelectPortal\"),$T=\"SelectContent\",Fmn=ee.forwardRef(nl(function(e,n){const o=ozi($T,e.__scopeSelect),{forceMount:i=o.forceMount,...r}=e,s=qP($T,e.__scopeSelect),[a,A]=ee.useState();return Ep(()=\u003e{A(new DocumentFragment)},[]),K.jsx(uE,{present:i||s.open,children:({present:c})=\u003ec?K.jsx(azi,{...r,ref:n}):K.jsx(rzi,{...r,fragment:a})})},\"SelectContent\")),rzi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,children:i,fragment:r}=e;return r?c6.createPortal(K.jsx(Lmn,{scope:o,children:K.jsx(Hfe.Slot,{scope:o,children:K.jsx(\"div\",{ref:n,children:i})})}),r):null},\"SelectContentFragment\")),s9=10,[Lmn,qT]=jT($T),szi=MB(\"SelectContent.RemoveScroll\"),azi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o}=e,{position:i=\"item-aligned\",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:A,sideOffset:c,align:l,alignOffset:u,arrowPadding:g,collisionBoundary:h,collisionPadding:d,sticky:p,hideWhenDetached:m,avoidCollisions:_,...f}=e,I=qP($T,o),[C,y]=ee.useState(null),[x,E]=ee.useState(null),B=$A(n,y),[S,Q]=ee.useState(null),[w,M]=ee.useState(null),k=Ofe(o),[R,F]=ee.useState(!1),O=ee.useRef(!1);ee.useEffect(()=\u003e{if(C)return Kme(C)},[C]),hU();const U=ee.useCallback(_e=\u003e{const[ue,...fe]=k().map(Me=\u003eMe.ref.current),[pe]=fe.slice(-1),ye=document.activeElement;for(const Me of _e)if(Me===ye||(Me?.scrollIntoView({block:\"nearest\"}),Me===ue\u0026\u0026x\u0026\u0026(x.scrollTop=0),Me===pe\u0026\u0026x\u0026\u0026(x.scrollTop=x.scrollHeight),Me?.focus(),document.activeElement!==ye))return},[k,x]),Y=ee.useCallback(()=\u003eU([S,C]),[U,S,C]);ee.useEffect(()=\u003e{R\u0026\u0026Y()},[R,Y]);const{onOpenChange:W,triggerPointerDownPosRef:te}=I;ee.useEffect(()=\u003e{if(C){let _e={x:0,y:0};const ue=nl(pe=\u003e{_e={x:Math.abs(Math.round(pe.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(pe.pageY)-(te.current?.y??0))}},\"handlePointerMove\"),fe=nl(pe=\u003e{_e.x\u003c=10\u0026\u0026_e.y\u003c=10?pe.preventDefault():pe.composedPath().includes(C)||W(!1),document.removeEventListener(\"pointermove\",ue),te.current=null},\"handlePointerUp\");return te.current!==null\u0026\u0026(document.addEventListener(\"pointermove\",ue),document.addEventListener(\"pointerup\",fe,{capture:!0,once:!0})),()=\u003e{document.removeEventListener(\"pointermove\",ue),document.removeEventListener(\"pointerup\",fe,{capture:!0})}}},[C,W,te]),ee.useEffect(()=\u003e{const _e=nl(()=\u003eW(!1),\"close\");return window.addEventListener(\"blur\",_e),window.addEventListener(\"resize\",_e),()=\u003e{window.removeEventListener(\"blur\",_e),window.removeEventListener(\"resize\",_e)}},[W]);const[j,J]=wqe(_e=\u003e{const ue=k().filter(ye=\u003e!ye.disabled),fe=ue.find(ye=\u003eye.ref.current===document.activeElement),pe=Pqe(ue,_e,fe);pe\u0026\u0026setTimeout(()=\u003epe.ref.current?.focus())}),oe=ee.useCallback((_e,ue,fe)=\u003e{const pe=!O.current\u0026\u0026!fe;(I.value!==void 0\u0026\u0026I.value===ue||pe)\u0026\u0026(Q(_e),pe\u0026\u0026(O.current=!0))},[I.value]),ie=ee.useCallback(()=\u003eC?.focus(),[C]),ne=ee.useCallback((_e,ue,fe)=\u003e{const pe=!O.current\u0026\u0026!fe;(I.value!==void 0\u0026\u0026I.value===ue||pe)\u0026\u0026M(_e)},[I.value]),le=i===\"popper\"?Hmn:Azi,ge=le===Hmn?{side:A,sideOffset:c,align:l,alignOffset:u,arrowPadding:g,collisionBoundary:h,collisionPadding:d,sticky:p,hideWhenDetached:m,avoidCollisions:_}:{};return K.jsx(Lmn,{scope:o,content:C,viewport:x,onViewportChange:E,itemRefCallback:oe,selectedItem:S,onItemLeave:ie,itemTextRefCallback:ne,focusSelectedItem:Y,selectedItemText:w,position:i,isPositioned:R,searchRef:j,children:K.jsx(yZ,{as:szi,allowPinchZoom:!0,children:K.jsx(Sme,{asChild:!0,trapped:I.open,onMountAutoFocus:_e=\u003e{_e.preventDefault()},onUnmountAutoFocus:ar(r,_e=\u003e{I.trigger?.focus({preventScroll:!0}),_e.preventDefault()}),children:K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:_e=\u003e_e.preventDefault(),onDismiss:()=\u003eI.onOpenChange(!1),children:K.jsx(le,{role:\"listbox\",id:I.contentId,\"data-state\":I.open?\"open\":\"closed\",dir:I.dir,onContextMenu:_e=\u003e_e.preventDefault(),...f,...ge,onPlaced:()=\u003eF(!0),ref:B,style:{display:\"flex\",flexDirection:\"column\",outline:\"none\",...f.style},onKeyDown:ar(f.onKeyDown,_e=\u003e{const ue=_e.ctrlKey||_e.altKey||_e.metaKey;if(_e.key===\"Tab\"\u0026\u0026_e.preventDefault(),!ue\u0026\u0026_e.key.length===1\u0026\u0026J(_e.key),[\"ArrowUp\",\"ArrowDown\",\"Home\",\"End\"].includes(_e.key)){let pe=k().filter(ye=\u003e!ye.disabled).map(ye=\u003eye.ref.current);if([\"ArrowUp\",\"End\"].includes(_e.key)\u0026\u0026(pe=pe.slice().reverse()),[\"ArrowUp\",\"ArrowDown\"].includes(_e.key)){const ye=_e.target,Me=pe.indexOf(ye);pe=pe.slice(Me+1)}setTimeout(()=\u003eU(pe)),_e.preventDefault()}})})})})})})},\"SelectContentImpl\")),Azi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,onPlaced:i,...r}=e,s=qP($T,o),a=qT($T,o),[A,c]=ee.useState(null),[l,u]=ee.useState(null),g=$A(n,u),h=Ofe(o),d=ee.useRef(!1),p=ee.useRef(!0),{viewport:m,selectedItem:_,selectedItemText:f,focusSelectedItem:I}=a,C=ee.useCallback(()=\u003e{if(s.trigger\u0026\u0026s.valueNode\u0026\u0026A\u0026\u0026l\u0026\u0026m\u0026\u0026_\u0026\u0026f){const B=s.trigger.getBoundingClientRect(),S=l.getBoundingClientRect(),Q=s.valueNode.getBoundingClientRect(),w=f.getBoundingClientRect();if(s.dir!==\"rtl\"){const ye=w.left-S.left,Me=Q.left-ye,ve=B.left-Me,he=B.width+ve,Qe=Math.max(he,S.width),Pe=window.innerWidth-s9,we=bqe(Me,[s9,Math.max(s9,Pe-Qe)]);A.style.minWidth=he+\"px\",A.style.left=we+\"px\"}else{const ye=S.right-w.right,Me=window.innerWidth-Q.right-ye,ve=window.innerWidth-B.right-Me,he=B.width+ve,Qe=Math.max(he,S.width),Pe=window.innerWidth-s9,we=bqe(Me,[s9,Math.max(s9,Pe-Qe)]);A.style.minWidth=he+\"px\",A.style.right=we+\"px\"}const M=h(),k=window.innerHeight-s9*2,R=m.scrollHeight,F=window.getComputedStyle(l),O=parseInt(F.borderTopWidth,10),U=parseInt(F.paddingTop,10),Y=parseInt(F.borderBottomWidth,10),W=parseInt(F.paddingBottom,10),te=O+U+R+W+Y,j=Math.min(_.offsetHeight*5,te),J=window.getComputedStyle(m),oe=parseInt(J.paddingTop,10),ie=parseInt(J.paddingBottom,10),ne=B.top+B.height/2-s9,le=k-ne,ge=_.offsetHeight/2,_e=_.offsetTop+ge,ue=O+U+_e,fe=te-ue;if(ue\u003c=ne){const ye=M.length\u003e0\u0026\u0026_===M[M.length-1].ref.current;A.style.bottom=\"0px\";const Me=l.clientHeight-m.offsetTop-m.offsetHeight,ve=Math.max(le,ge+(ye?ie:0)+Me+Y),he=ue+ve;A.style.height=he+\"px\"}else{const ye=M.length\u003e0\u0026\u0026_===M[0].ref.current;A.style.top=\"0px\";const ve=Math.max(ne,O+m.offsetTop+(ye?oe:0)+ge)+fe;A.style.height=ve+\"px\",m.scrollTop=ue-ne+m.offsetTop}A.style.margin=`${s9}px 0`,A.style.minHeight=j+\"px\",A.style.maxHeight=k+\"px\",i?.(),requestAnimationFrame(()=\u003ed.current=!0)}},[h,s.trigger,s.valueNode,A,l,m,_,f,s.dir,i]);Ep(()=\u003eC(),[C]);const[y,x]=ee.useState();Ep(()=\u003e{l\u0026\u0026x(window.getComputedStyle(l).zIndex)},[l]);const E=ee.useCallback(B=\u003e{B\u0026\u0026p.current===!0\u0026\u0026(C(),I?.(),p.current=!1)},[C,I]);return K.jsx(czi,{scope:o,contentWrapper:A,shouldExpandOnScrollRef:d,onScrollButtonChange:E,children:K.jsx(\"div\",{ref:c,style:{display:\"flex\",flexDirection:\"column\",position:\"fixed\",zIndex:y},children:K.jsx(Na.div,{...r,ref:g,style:{boxSizing:\"border-box\",maxHeight:\"100%\",...r.style}})})})},\"SelectItemAlignedPosition\")),Hmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,align:i=\"start\",collisionPadding:r=s9,...s}=e,a=Sqe(o);return K.jsx(Ome,{...a,...s,ref:n,align:i,collisionPadding:r,style:{boxSizing:\"border-box\",...s.style,\"--radix-select-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-select-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-select-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-select-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-select-trigger-height\":\"var(--radix-popper-anchor-height)\"}})},\"SelectPopperPosition\")),[czi,Qqe]=jT($T,{}),Omn=\"SelectViewport\",lzi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,nonce:i,...r}=e,s=qT(Omn,o),a=Qqe(Omn,o),A=$A(n,s.onViewportChange),c=ee.useRef(0);return K.jsxs(K.Fragment,{children:[K.jsx(\"style\",{dangerouslySetInnerHTML:{__html:\"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}\"},nonce:i}),K.jsx(Hfe.Slot,{scope:o,children:K.jsx(Na.div,{\"data-radix-select-viewport\":\"\",role:\"presentation\",...r,ref:A,style:{position:\"relative\",flex:1,overflow:\"hidden auto\",...r.style},onScroll:ar(r.onScroll,l=\u003e{const u=l.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:h}=a;if(h?.current\u0026\u0026g){const d=Math.abs(c.current-u.scrollTop);if(d\u003e0){const p=window.innerHeight-s9*2,m=parseFloat(g.style.minHeight),_=parseFloat(g.style.height),f=Math.max(m,_);if(f\u003cp){const I=f+d,C=Math.min(p,I),y=I-C;g.style.height=C+\"px\",g.style.bottom===\"0px\"\u0026\u0026(u.scrollTop=y\u003e0?y:0,g.style.justifyContent=\"flex-end\")}}}c.current=u.scrollTop})})})]})},\"SelectViewport\")),uzi=\"SelectGroup\",[Fmr,gzi]=jT(uzi),dzi=\"SelectLabel\",Gmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,...i}=e,r=gzi(dzi,o);return K.jsx(Na.div,{id:r.id,...i,ref:n})},\"SelectLabel\")),vqe=\"SelectItem\",[hzi,Ymn]=jT(vqe),Umn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,value:i,disabled:r=!1,textValue:s,...a}=e,A=qP(vqe,o),c=qT(vqe,o),l=A.value===i,[u,g]=ee.useState(s??\"\"),[h,d]=ee.useState(!1),p=lE(C=\u003ec.itemRefCallback?.(C,i,r)),m=$A(n,p),_=t_(),f=ee.useRef(\"touch\"),I=nl(()=\u003e{r||(A.onValueChange(i),A.onOpenChange(!1))},\"handleSelect\");return K.jsx(hzi,{scope:o,value:i,disabled:r,textId:_,isSelected:l,onItemTextChange:ee.useCallback(C=\u003e{g(y=\u003ey||(C?.textContent??\"\").trim())},[]),children:K.jsx(Hfe.ItemSlot,{scope:o,value:i,disabled:r,textValue:u,children:K.jsx(Na.div,{role:\"option\",\"aria-labelledby\":_,\"data-highlighted\":h?\"\":void 0,\"aria-selected\":l\u0026\u0026h,\"data-state\":l?\"checked\":\"unchecked\",\"aria-disabled\":r||void 0,\"data-disabled\":r?\"\":void 0,tabIndex:r?void 0:-1,...a,ref:m,onFocus:ar(a.onFocus,()=\u003ed(!0)),onBlur:ar(a.onBlur,()=\u003ed(!1)),onClick:ar(a.onClick,()=\u003e{f.current!==\"mouse\"\u0026\u0026I()}),onPointerUp:ar(a.onPointerUp,()=\u003e{f.current===\"mouse\"\u0026\u0026I()}),onPointerDown:ar(a.onPointerDown,C=\u003e{f.current=C.pointerType}),onPointerMove:ar(a.onPointerMove,C=\u003e{f.current=C.pointerType,r?c.onItemLeave?.():f.current===\"mouse\"\u0026\u0026C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ar(a.onPointerLeave,C=\u003e{C.currentTarget===document.activeElement\u0026\u0026c.onItemLeave?.()}),onKeyDown:ar(a.onKeyDown,C=\u003e{r||C.target!==C.currentTarget||c.searchRef?.current!==\"\"\u0026\u0026C.key===\" \"||(VVi.includes(C.key)\u0026\u0026I(),C.key===\" \"\u0026\u0026C.preventDefault())})})})})},\"SelectItem\")),Gfe=\"SelectItemText\",pzi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,className:i,style:r,...s}=e,a=qP(Gfe,o),A=qT(Gfe,o),c=Ymn(Gfe,o),l=jVi(Gfe,o),[u,g]=ee.useState(null),h=lE(I=\u003eA.itemTextRefCallback?.(I,c.value,c.disabled)),d=$A(n,g,c.onItemTextChange,h),p=u?.textContent,m=ee.useMemo(()=\u003eK.jsx(\"option\",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:_,onNativeOptionRemove:f}=l;return Ep(()=\u003e(_(m),()=\u003ef(m)),[_,f,m]),K.jsxs(K.Fragment,{children:[K.jsx(Na.span,{id:c.textId,...s,ref:d}),c.isSelected\u0026\u0026a.valueNode\u0026\u0026!a.valueNodeHasChildren\u0026\u0026!vee(a.value)?c6.createPortal(s.children,a.valueNode):null]})},\"SelectItemText\")),mzi=\"SelectItemIndicator\",_zi=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,...i}=e;return Ymn(mzi,o).isSelected?K.jsx(Na.span,{\"aria-hidden\":!0,...i,ref:n}):null},\"SelectItemIndicator\")),Kmn=\"SelectScrollUpButton\",Vmn=ee.forwardRef(nl(function(e,n){const o=qT(Kmn,e.__scopeSelect),i=Qqe(Kmn,e.__scopeSelect),[r,s]=ee.useState(!1),a=$A(n,i.onScrollButtonChange);return Ep(()=\u003e{if(o.viewport\u0026\u0026o.isPositioned){let A=function(){const l=c.scrollTop\u003e0;s(l)};nl(A,\"handleScroll\");const c=o.viewport;return A(),c.addEventListener(\"scroll\",A),()=\u003ec.removeEventListener(\"scroll\",A)}},[o.viewport,o.isPositioned]),r?K.jsx(Wmn,{...e,ref:a,onAutoScroll:()=\u003e{const{viewport:A,selectedItem:c}=o;A\u0026\u0026c\u0026\u0026(A.scrollTop=A.scrollTop-c.offsetHeight)}}):null},\"SelectScrollUpButton\")),zmn=\"SelectScrollDownButton\",Jmn=ee.forwardRef(nl(function(e,n){const o=qT(zmn,e.__scopeSelect),i=Qqe(zmn,e.__scopeSelect),[r,s]=ee.useState(!1),a=$A(n,i.onScrollButtonChange);return Ep(()=\u003e{if(o.viewport\u0026\u0026o.isPositioned){let A=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)\u003cl;s(u)};nl(A,\"handleScroll\");const c=o.viewport;return A(),c.addEventListener(\"scroll\",A),()=\u003ec.removeEventListener(\"scroll\",A)}},[o.viewport,o.isPositioned]),r?K.jsx(Wmn,{...e,ref:a,onAutoScroll:()=\u003e{const{viewport:A,selectedItem:c}=o;A\u0026\u0026c\u0026\u0026(A.scrollTop=A.scrollTop+c.offsetHeight)}}):null},\"SelectScrollDownButton\")),Wmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,onAutoScroll:i,...r}=e,s=qT(\"SelectScrollButton\",o),a=ee.useRef(null),A=Ofe(o),c=ee.useCallback(()=\u003e{a.current!==null\u0026\u0026(window.clearInterval(a.current),a.current=null)},[]);return ee.useEffect(()=\u003e()=\u003ec(),[c]),Ep(()=\u003e{A().find(u=\u003eu.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:\"nearest\"})},[A]),K.jsx(Na.div,{\"aria-hidden\":!0,...r,ref:n,style:{flexShrink:0,...r.style},onPointerDown:ar(r.onPointerDown,()=\u003e{a.current===null\u0026\u0026(a.current=window.setInterval(i,50))}),onPointerMove:ar(r.onPointerMove,()=\u003e{s.onItemLeave?.(),a.current===null\u0026\u0026(a.current=window.setInterval(i,50))}),onPointerLeave:ar(r.onPointerLeave,()=\u003e{c()})})},\"SelectScrollButtonImpl\")),jmn=ee.forwardRef(nl(function(e,n){const{__scopeSelect:o,...i}=e;return K.jsx(Na.div,{\"aria-hidden\":!0,...i,ref:n})},\"SelectSeparator\")),fzi=\"SelectBubbleInput\",Izi=ee.forwardRef(nl(function({__scopeSelect:e,...n},o){const i=qP(fzi,e),{value:r,onValueChange:s,required:a,disabled:A,name:c,autoComplete:l,form:u}=i,{nativeOptions:g,nativeSelectKey:h}=i,d=ee.useRef(null),p=$A(o,d),m=r??\"\",_=Nmn(m),f=Array.from(g).some(I=\u003e(I.props.value??\"\")===\"\");return ee.useEffect(()=\u003e{const I=d.current;if(!I)return;const C=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(C,\"value\").set;if(_!==m\u0026\u0026x){const E=new Event(\"change\",{bubbles:!0});x.call(I,m),I.dispatchEvent(E)}},[_,m]),K.jsxs(Na.select,{\"aria-hidden\":!0,required:a,tabIndex:-1,name:c,autoComplete:l,disabled:A,form:u,onChange:I=\u003es(I.target.value),...n,style:{...Rmn,...n.style},ref:p,defaultValue:m,children:[vee(r)\u0026\u0026!f?K.jsx(\"option\",{value:\"\"}):null,Array.from(g)]},h)},\"SelectBubbleInput\"));function $mn(t){return typeof t==\"function\"}nl($mn,\"isFunction\");function vee(t){return t===\"\"||t===void 0}nl(vee,\"shouldShowPlaceholder\");function wqe(t){const e=lE(t),n=ee.useRef(\"\"),o=ee.useRef(0),i=ee.useCallback(s=\u003e{const a=n.current+s;e(a),nl((function A(c){n.current=c,window.clearTimeout(o.current),c!==\"\"\u0026\u0026(o.current=window.setTimeout(()=\u003eA(\"\"),1e3))}),\"updateSearch\")(a)},[e]),r=ee.useCallback(()=\u003e{n.current=\"\",window.clearTimeout(o.current)},[]);return ee.useEffect(()=\u003e()=\u003ewindow.clearTimeout(o.current),[]),[n,i,r]}nl(wqe,\"useTypeaheadSearch\");function Pqe(t,e,n){const i=e.length\u003e1\u0026\u0026Array.from(e).every(c=\u003ec===e[0])?e[0]:e,r=n?t.indexOf(n):-1;let s=qmn(t,Math.max(r,0));i.length===1\u0026\u0026(s=s.filter(c=\u003ec!==n));const A=s.find(c=\u003ec.textValue.toLowerCase().startsWith(i.toLowerCase()));return A!==n?A:void 0}nl(Pqe,\"findNextItem\");function qmn(t,e){return t.map((n,o)=\u003et[(e+o)%t.length])}nl(qmn,\"wrapArray\");const Czi=$Vi,yzi=ZVi,Xmn=ee.forwardRef(({className:t,children:e,...n},o)=\u003eK.jsxs(kmn,{ref:o,className:Oi(\"rf-flex rf-h-10 rf-w-full rf-items-center rf-justify-between rf-rounded-md rf-border rf-border-input rf-bg-background rf-px-3 rf-py-2 rf-text-sm rf-ring-offset-background rf-placeholder:text-muted-foreground focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-ring focus:rf-ring-offset-2 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 [\u0026\u003espan]:rf-line-clamp-1\",t),...n,children:[e,K.jsx(ezi,{asChild:!0,children:K.jsx(pZ,{className:\"rf-h-4 rf-w-4 rf-opacity-50\"})})]}));Xmn.displayName=kmn.displayName;const Zmn=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(Vmn,{ref:n,className:Oi(\"rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1\",t),...e,children:K.jsx(sbi,{className:\"rf-h-4 rf-w-4\"})}));Zmn.displayName=Vmn.displayName;const e_n=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(Jmn,{ref:n,className:Oi(\"rf-flex rf-cursor-default rf-items-center rf-justify-center rf-py-1\",t),...e,children:K.jsx(pZ,{className:\"rf-h-4 rf-w-4\"})}));e_n.displayName=Jmn.displayName;const t_n=ee.forwardRef(({className:t,children:e,position:n=\"popper\",...o},i)=\u003eK.jsx(izi,{children:K.jsxs(Fmn,{ref:i,className:Oi(\"rf-relative rf-z-[100] rf-max-h-96 rf-min-w-[8rem] rf-overflow-hidden rf-rounded-md rf-border rf-bg-white rf-text-black rf-shadow-md data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2\",n===\"popper\"\u0026\u0026\"data-[side=bottom]:rf-translate-y-1 data-[side=left]:-rf-translate-x-1 data-[side=right]:rf-translate-x-1 data-[side=top]:-rf-translate-y-1\",t),position:n,...o,children:[K.jsx(Zmn,{}),K.jsx(lzi,{className:Oi(\"rf-p-1\",n===\"popper\"\u0026\u0026\"rf-h-[var(--radix-select-trigger-height)] rf-w-full rf-min-w-[var(--radix-select-trigger-width)]\"),children:e}),K.jsx(e_n,{})]})}));t_n.displayName=Fmn.displayName;const xzi=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(Gmn,{ref:n,className:Oi(\"rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-font-semibold\",t),...e}));xzi.displayName=Gmn.displayName;const n_n=ee.forwardRef(({className:t,children:e,...n},o)=\u003eK.jsxs(Umn,{ref:o,className:Oi(\"rf-relative rf-flex rf-w-full rf-cursor-default rf-select-none rf-items-center rf-rounded-sm rf-py-1.5 rf-pl-8 rf-pr-2 rf-text-sm rf-text-gray-800 rf-outline-none focus:rf-bg-gray-100 focus:rf-text-gray-900 data-[disabled]:rf-pointer-events-none data-[disabled]:rf-opacity-50\",t),...n,children:[K.jsx(\"span\",{className:\"rf-absolute rf-left-2 rf-flex rf-h-3.5 rf-w-3.5 rf-items-center rf-justify-center\",children:K.jsx(_zi,{children:K.jsx(CS,{className:\"rf-h-4 rf-w-4\"})})}),K.jsx(pzi,{children:e})]}));n_n.displayName=Umn.displayName;const Ezi=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(jmn,{ref:n,className:Oi(\"-rf-mx-1 rf-my-1 rf-h-px rf-bg-muted\",t),...e}));Ezi.displayName=jmn.displayName;const o_n=\"Component Box (3MF)\",Mqe=t=\u003e`${t.toFixed(1)} mm`;function Bzi({open:t,onOpenChange:e,circuitJson:n,projectName:o}){mee();const[i,r]=ee.useState(\"\"),[s,a]=ee.useState(null),[A,c]=ee.useState(null),[l,u]=ee.useState(!1),[g,h]=ee.useState(null);ee.useEffect(()=\u003e()=\u003e{A\u0026\u0026URL.revokeObjectURL(A)},[A]),ee.useEffect(()=\u003e{if(!t||i!==o_n)return;let p=!1;return u(!0),a(null),h(null),OUi(n).then(m=\u003e{if(p)return;const _=Uint8Array.from(m.previewPng);a(m),c(URL.createObjectURL(new Blob([_.buffer],{type:\"image/png\"})))}).catch(m=\u003e{p||h(m instanceof Error?m.message:String(m))}).finally(()=\u003e{p||u(!1)}),()=\u003e{p=!0}},[n,t,i]);const d=p=\u003e{p||(r(\"\"),a(null),c(null),h(null),u(!1)),e(p)};return K.jsx(KT,{open:t,onOpenChange:d,children:K.jsxs(VP,{className:\"rf-max-h-[90vh] rf-max-w-3xl rf-overflow-y-auto\",children:[K.jsxs(zP,{children:[K.jsx(JP,{children:\"Export Accessory\"}),K.jsx(VT,{children:\"Generate a printable accessory from the components in this circuit.\"})]}),K.jsxs(\"div\",{className:\"rf-grid rf-gap-5 md:rf-grid-cols-[220px_1fr]\",children:[K.jsxs(\"div\",{className:\"rf-space-y-2\",children:[K.jsx(\"label\",{htmlFor:\"accessory-select\",className:\"rf-text-sm rf-font-medium\",children:\"Accessory\"}),K.jsxs(Czi,{value:i,onValueChange:p=\u003er(p),children:[K.jsx(Xmn,{id:\"accessory-select\",children:K.jsx(yzi,{placeholder:\"Choose an accessory\"})}),K.jsx(t_n,{children:K.jsx(n_n,{value:o_n,children:\"Component Box\"})})]}),K.jsx(\"p\",{className:\"rf-text-xs rf-leading-relaxed rf-text-zinc-500\",children:\"Creates grouped compartments with raised refdes labels as a multi-material 3MF.\"})]}),K.jsxs(\"div\",{className:\"rf-overflow-hidden rf-rounded-lg rf-border rf-border-zinc-200 rf-bg-zinc-50 dark:rf-border-zinc-800 dark:rf-bg-zinc-900\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-min-h-56 rf-items-center rf-justify-center\",children:[!i\u0026\u0026K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-p-8 rf-text-center rf-text-zinc-500\",children:[K.jsx(Bbi,{className:\"rf-h-10 rf-w-10 rf-stroke-1\"}),K.jsx(\"p\",{className:\"rf-text-sm\",children:\"Choose an accessory to generate its preview.\"})]}),l\u0026\u0026K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-p-8 rf-text-zinc-600 dark:rf-text-zinc-300\",children:[K.jsx(SE,{className:\"rf-h-8 rf-w-8 rf-animate-spin\"}),K.jsx(\"p\",{className:\"rf-text-sm\",children:\"Generating component box…\"})]}),g\u0026\u0026!l\u0026\u0026K.jsxs(\"div\",{className:\"rf-p-8 rf-text-center\",children:[K.jsx(\"p\",{className:\"rf-text-sm rf-font-medium rf-text-red-600\",children:\"Could not generate the preview\"}),K.jsx(\"p\",{className:\"rf-mt-1 rf-text-xs rf-text-red-500\",children:g})]}),A\u0026\u0026s\u0026\u0026!l\u0026\u0026K.jsx(\"img\",{src:A,alt:\"Generated component box preview\",className:\"rf-block rf-h-auto rf-max-h-[300px] rf-w-full rf-object-contain\"})]}),s\u0026\u0026!l\u0026\u0026K.jsxs(\"div\",{className:\"rf-flex rf-flex-wrap rf-gap-x-5 rf-gap-y-1 rf-border-t rf-border-zinc-200 rf-bg-white rf-px-4 rf-py-3 rf-text-xs rf-text-zinc-600 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-300\",children:[K.jsxs(\"span\",{children:[s.compartments.length,\" compartments\"]}),K.jsxs(\"span\",{children:[Mqe(s.dimensions.width),\" ×\",\" \",Mqe(s.dimensions.depth),\" ×\",\" \",Mqe(s.dimensions.height)]})]})]})]}),K.jsxs(jU,{children:[K.jsx(fA,{variant:\"outline\",onClick:()=\u003ed(!1),children:\"Cancel\"}),K.jsxs(fA,{disabled:!s||l,onClick:()=\u003e{s\u0026\u0026$pn({generatedBox:s,projectName:o})},children:[K.jsx(mZ,{}),\"Download 3MF\"]})]})]})})}const Yfe=t=\u003e{const e=pfe(ye=\u003eye.lastRunEvalVersion),n=md(ye=\u003eye.currentMainComponentPath),[o,i]=ee.useState(null),[r,s]=ee.useState(!1),[a,A]=ee.useState(!0),[c,l]=ee.useState(!1),[u,g]=ee.useState(null),[h,d]=ee.useState(null),[p,m]=ee.useState(!1),[_,f]=ee.useState(null),[I,C]=ee.useState(null),[y,x]=ee.useState(!1),[E,B]=ee.useState(!1),[S,Q]=ee.useState(!1),[w,M]=ee.useState(!1),[k,R]=ee.useState(null),F=SVi(),O=md(ye=\u003eye.pushEvent),U=md(ye=\u003eye.recentEvents),Y=ee.useMemo(()=\u003eDate.now(),[]);GGi(ye=\u003e{if(!(new Date(ye.created_at).valueOf()\u003cY+500)){if(ye.event_type===\"FILE_UPDATED\"){s(!0);return}if(ye.event_type===\"SNIPPET_SAVED\"){s(!1),A(!1),f(\"Snippet saved successfully.\"),x(!1);return}ye.event_type===\"REQUEST_EXPORT\"\u0026\u0026(B(!0),f(\"Export processing...\"),x(!1)),ye.event_type===\"EXPORT_CREATED\"\u0026\u0026(f(`Export created: ${ye.exportFilePath}`),x(!1),B(!1))}}),ee.useEffect(()=\u003e{if(!c||u===null)return;const ye=U.filter(he=\u003enew Date(he.created_at).valueOf()\u003eu),Me=ye.find(he=\u003ehe.event_type===\"FAILED_TO_SAVE_SNIPPET\"),ve=ye.find(he=\u003ehe.event_type===\"SNIPPET_SAVED\");Me\u0026\u0026(l(!1),g(null),C(Me.message??\"Failed to save snippet. See console for error.\"),console.error(Me.message),x(!0),Me.error_code===\"SNIPPET_UNSET\"\u0026\u0026Me.available_snippet_names\u0026\u0026(d(Me.available_snippet_names),m(!0))),ve\u0026\u0026(l(!1),g(null),f(\"Snippet saved successfully.\"),x(!1))},[U,c]);const W=async()=\u003e{l(!0),g(Date.now()),f(null),x(!1),await O({event_type:\"REQUEST_TO_SAVE_SNIPPET\",snippet_name:o})},j=md(ye=\u003eye.circuitJson)??t.circuitJson,J=ee.useMemo(()=\u003e{let ye=\"Untitled\";if(n){const Me=n.split(\"/\").pop();Me\u0026\u0026(ye=Me.replace(/\\.[^.]+$/,\"\"))}return(t.projectName??o??ye).replace(/\\.(board|circuit)$/,\"\")},[n,t.projectName,o]),[oe,ie]=ee.useState(!1),[ne,le]=ee.useState(!1),{BugReportDialog:ge,openBugReportDialog:_e}=wVi({onLoginRequired:t.onLoginRequired}),ue=async ye=\u003e{k\u0026\u0026(await qpn({circuitJson:k.circuitJson,projectName:k.projectName,options:ye}),R(null))},fe=ee.useMemo(()=\u003eRVi(t.autoroutingLog),[t.autoroutingLog]),pe=ye=\u003e{if(!j){ua.error(\"No Circuit JSON to export\");return}const Me=fe?.value.simpleRouteJson;if(ye===\"LightBurn\"){R({circuitJson:j,projectName:J}),Q(!0);return}qUi({exportName:ye,circuitJson:j,simpleRouteJson:Me,projectName:J})};return K.jsxs(K.Fragment,{children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-1 rf-flex-shrink-0\",children:[K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsx(\"div\",{className:\"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative\",children:\"File\"})}),K.jsxs(vZ,{className:\"rf-z-[101]\",children:[!t.isWebEmbedded\u0026\u0026K.jsxs(K.Fragment,{children:[K.jsx(bp,{className:\"rf-text-xs\",onSelect:W,disabled:c,children:c?\"Saving...\":\"Push\"}),parseInt(window.location.port)\u003e5e3\u0026\u0026K.jsx(bp,{className:\"rf-text-xs\",onSelect:()=\u003e{F.open()},children:\"Order\"}),K.jsx(bp,{className:\"rf-text-xs\",onSelect:()=\u003eie(!0),disabled:c,children:\"Import\"}),K.jsx(bp,{className:\"rf-text-xs\",onSelect:()=\u003e{if(!zge()){ua.error(\"Requires tscircuit token\");return}le(!0)},children:\"AI Review\"})]}),!t.isWebEmbedded\u0026\u0026t.onLoginRequired\u0026\u0026K.jsx(bp,{className:\"rf-text-xs\",onSelect:()=\u003e{t.onLoginRequired?.()},children:\"Sign In\"}),!t.isWebEmbedded\u0026\u0026K.jsxs(QZ,{children:[K.jsx(BU,{className:\"rf-text-xs\",children:\"Report Bug\"}),K.jsx(SZ,{children:K.jsxs(bU,{children:[K.jsx(bp,{className:\"rf-text-xs\",onSelect:()=\u003e{_e()},children:\"Report Entire Circuit\"}),K.jsx(bp,{className:\"rf-text-xs\",disabled:!fe||!t.onReportAutoroutingLog,onSelect:()=\u003e{!fe||!t.onReportAutoroutingLog||t.onReportAutoroutingLog(fe.key,{simpleRouteJson:fe.value.simpleRouteJson})},children:\"Report Autorouter Bug\"})]})})]}),K.jsxs(QZ,{children:[K.jsx(BU,{className:\"rf-text-xs\",disabled:E,children:E?\"Exporting...\":\"Export\"}),K.jsx(SZ,{children:K.jsx(bU,{children:$Ui.map((ye,Me)=\u003eK.jsx(bp,{onSelect:()=\u003epe(ye.name),disabled:E||ye.name===\"Simple Route JSON\"\u0026\u0026!fe,children:K.jsx(\"span\",{className:\"rf-text-xs\",children:ye.name})},Me))})})]}),K.jsx(bp,{className:\"rf-text-xs\",disabled:E,onSelect:()=\u003e{if(!j){ua.error(\"No Circuit JSON to export\");return}M(!0)},children:\"Export Accessory…\"}),!t.isWebEmbedded\u0026\u0026K.jsxs(QZ,{children:[K.jsx(BU,{className:\"rf-text-xs\",children:\"Advanced\"}),K.jsx(SZ,{children:K.jsxs(bU,{children:[K.jsx(bp,{className:\"rf-flex rf-items-center rf-gap-2\",children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[K.jsx(Iee,{id:\"load-latest-eval\",checked:t.shouldLoadLatestEval,onCheckedChange:ye=\u003e{t.onChangeShouldLoadLatestEval?.(ye===!0)}}),K.jsx(\"label\",{htmlFor:\"load-latest-eval\",className:\"rf-text-xs rf-cursor-pointer\",children:\"Force Latest @tscircuit/eval\"})]})}),e\u0026\u0026K.jsx(bp,{className:\"rf-flex rf-items-center rf-gap-2\",children:K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:K.jsxs(\"span\",{className:\"rf-text-xs\",children:[\"@tscircuit/eval@\",e]})})}),K.jsx(bp,{className:\"rf-flex rf-items-center rf-gap-2\",children:K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:K.jsxs(\"span\",{className:\"rf-text-xs\",children:[\"@tscircuit/runframe@\",LGi.version]})})}),K.jsx(bp,{className:\"rf-flex rf-items-center rf-gap-2\",onClick:()=\u003e{window.open(\"/api/admin\",\"_blank\")},children:K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:K.jsx(\"span\",{className:\"rf-text-xs\",children:\"CLI Admin Panel\"})})})]})})]})]}),K.jsx(Epn,{open:y,onOpenChange:x,children:K.jsxs(k$e,{children:[K.jsxs(F$e,{children:[K.jsx(H$e,{children:\"Error Saving Snippet\"}),K.jsx(O$e,{children:I})]}),K.jsx(L$e,{children:K.jsx(G$e,{onClick:()=\u003ex(!1),children:\"Dismiss\"})})]})}),K.jsx(OGi,{snippetNames:h??[],onSelect:async ye=\u003e{l(!0),g(Date.now()),i(ye),await O({event_type:\"REQUEST_TO_SAVE_SNIPPET\",snippet_name:ye}),m(!1)},onCancel:()=\u003em(!1),isOpen:p})]}),K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsx(\"div\",{className:\"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative\",children:\"View\"})}),K.jsx(vZ,{className:\"rf-z-[101]\",children:K.jsxs(QZ,{children:[K.jsx(BU,{className:\"rf-text-xs\",children:\"Schematic\"}),K.jsx(SZ,{children:K.jsxs(bU,{children:[K.jsx(bp,{className:\"rf-flex rf-items-center rf-gap-2\",onSelect:ye=\u003eye.preventDefault(),children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[K.jsx(Iee,{id:\"show-schematic-ports\",checked:t.showSchematicPorts,onCheckedChange:ye=\u003e{t.onChangeShowSchematicPorts?.(ye===!0)}}),K.jsx(\"label\",{htmlFor:\"show-schematic-ports\",className:\"rf-text-xs rf-cursor-pointer\",children:\"Show Schematic Ports\"})]})}),K.jsx(bp,{className:\"rf-flex rf-items-center rf-gap-2\",onSelect:ye=\u003eye.preventDefault(),children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[K.jsx(Iee,{id:\"show-schematic-grid\",checked:t.showSchematicDebugGrid,onCheckedChange:ye=\u003e{t.onChangeShowSchematicDebugGrid?.(ye===!0)}}),K.jsx(\"label\",{htmlFor:\"show-schematic-grid\",className:\"rf-text-xs rf-cursor-pointer\",children:\"Show Schematic Grid\"})]})})]})})]})})]})]}),ge,K.jsx(PVi,{open:S,onOpenChange:Q,onExport:ue}),j\u0026\u0026K.jsx(Bzi,{open:w,onOpenChange:M,circuitJson:j,projectName:J}),K.jsx(Wpn,{isOpen:oe,onClose:()=\u003eie(!1)}),K.jsx(kKi,{isOpen:ne,onClose:()=\u003ele(!1),packageName:o}),K.jsx(ein,{position:\"top-center\",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{className:\"rf-break-all\",style:{zIndex:1e5}}}),K.jsx(F.OrderDialog,{isOpen:F.isOpen,onClose:F.close,stage:F.stage,setStage:F.setStage})]})};var bzi=Object.defineProperty,CI=(t,e)=\u003ebzi(t,\"name\",{value:e,configurable:!0}),[Dqe,Lmr]=Nx(\"Tooltip\",[PP]),Nqe=PP(),Szi=\"TooltipProvider\",Qzi=700,Rqe=\"tooltip.open\",[vzi,Tqe]=Dqe(Szi),wzi=CI(t=\u003e{const{__scopeTooltip:e,delayDuration:n=Qzi,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:r}=t,s=ee.useRef(!0),a=ee.useRef(!1),A=ee.useRef(0);return ee.useEffect(()=\u003e{const c=A.current;return()=\u003ewindow.clearTimeout(c)},[]),K.jsx(vzi,{scope:e,isOpenDelayedRef:s,delayDuration:n,onOpen:ee.useCallback(()=\u003e{o\u003c=0||(window.clearTimeout(A.current),s.current=!1)},[o]),onClose:ee.useCallback(()=\u003e{o\u003c=0||(window.clearTimeout(A.current),A.current=window.setTimeout(()=\u003es.current=!0,o))},[o]),isPointerInTransitRef:a,onPointerInTransitChange:ee.useCallback(c=\u003e{a.current=c},[]),disableHoverableContent:i,children:r})},\"TooltipProvider\"),kqe=\"Tooltip\",[Pzi,Ufe]=Dqe(kqe),Mzi=CI(t=\u003e{const{__scopeTooltip:e,children:n,open:o,defaultOpen:i,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=t,A=Tqe(kqe,t.__scopeTooltip),c=Nqe(e),[l,u]=ee.useState(null),[g,h]=ee.useState(void 0),d=t_(),p=ee.useRef(0),m=s??A.disableHoverableContent,_=a??A.delayDuration,f=ee.useRef(!1),[I,C]=DB({prop:o,defaultProp:i??!1,onChange:CI(Q=\u003e{Q?(A.onOpen(),document.dispatchEvent(new CustomEvent(Rqe))):A.onClose(),r?.(Q)},\"onChange\"),caller:kqe}),y=ee.useMemo(()=\u003eI?f.current?\"delayed-open\":\"instant-open\":\"closed\",[I]),x=ee.useCallback(()=\u003e{window.clearTimeout(p.current),p.current=0,f.current=!1,C(!0)},[C]),E=ee.useCallback(()=\u003e{window.clearTimeout(p.current),p.current=0,C(!1)},[C]),B=ee.useCallback(()=\u003e{window.clearTimeout(p.current),p.current=window.setTimeout(()=\u003e{f.current=!0,C(!0),p.current=0},_)},[_,C]);ee.useEffect(()=\u003e()=\u003e{p.current\u0026\u0026(window.clearTimeout(p.current),p.current=0)},[]);const S=g??d;return K.jsx(CZ,{...c,children:K.jsx(Pzi,{scope:e,contentId:S,setContentId:h,open:I,stateAttribute:y,trigger:l,onTriggerChange:u,onTriggerEnter:ee.useCallback(()=\u003e{A.isOpenDelayedRef.current?B():x()},[A.isOpenDelayedRef,B,x]),onTriggerLeave:ee.useCallback(()=\u003e{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:x,onClose:E,disableHoverableContent:m,children:n})})},\"Tooltip\"),i_n=\"TooltipTrigger\",Dzi=ee.forwardRef(CI(function(e,n){const{__scopeTooltip:o,...i}=e,r=Ufe(i_n,o),s=Tqe(i_n,o),a=Nqe(o),A=ee.useRef(null),c=$A(n,A,r.onTriggerChange),l=ee.useRef(!1),u=ee.useRef(!1),g=ee.useCallback(()=\u003el.current=!1,[]);return ee.useEffect(()=\u003e()=\u003edocument.removeEventListener(\"pointerup\",g),[g]),K.jsx(Hme,{asChild:!0,...a,children:K.jsx(Na.button,{\"aria-describedby\":r.open?r.contentId:void 0,\"data-state\":r.stateAttribute,...i,ref:c,onPointerMove:ar(e.onPointerMove,h=\u003e{h.pointerType!==\"touch\"\u0026\u0026!u.current\u0026\u0026!s.isPointerInTransitRef.current\u0026\u0026(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:ar(e.onPointerLeave,()=\u003e{r.onTriggerLeave(),u.current=!1}),onPointerDown:ar(e.onPointerDown,()=\u003e{r.open\u0026\u0026r.onClose(),l.current=!0,document.addEventListener(\"pointerup\",g,{once:!0})}),onFocus:ar(e.onFocus,()=\u003e{l.current||r.onOpen()}),onBlur:ar(e.onBlur,r.onClose),onClick:ar(e.onClick,r.onClose)})})},\"TooltipTrigger\")),Nzi=\"TooltipPortal\",[Hmr,Rzi]=Dqe(Nzi,{forceMount:void 0}),wee=\"TooltipContent\",Tzi=ee.forwardRef(CI(function(e,n){const o=Rzi(wee,e.__scopeTooltip),{forceMount:i=o.forceMount,side:r=\"top\",...s}=e,a=Ufe(wee,e.__scopeTooltip);return K.jsx(uE,{present:i||a.open,children:a.disableHoverableContent?K.jsx(r_n,{side:r,...s,ref:n}):K.jsx(kzi,{side:r,...s,ref:n})})},\"TooltipContent\")),kzi=ee.forwardRef(CI(function(e,n){const o=Ufe(wee,e.__scopeTooltip),i=Tqe(wee,e.__scopeTooltip),r=ee.useRef(null),s=$A(n,r),[a,A]=ee.useState(null),{trigger:c,onClose:l}=o,u=r.current,{onPointerInTransitChange:g}=i,h=ee.useCallback(()=\u003e{A(null),g(!1)},[g]),d=ee.useCallback((p,m)=\u003e{const _=p.currentTarget,f={x:p.clientX,y:p.clientY},I=s_n(f,_.getBoundingClientRect()),C=a_n(f,I),y=A_n(m.getBoundingClientRect()),x=l_n([...C,...y]);A(x),g(!0)},[g]);return ee.useEffect(()=\u003e()=\u003eh(),[h]),ee.useEffect(()=\u003e{if(c\u0026\u0026u){const p=CI(_=\u003ed(_,u),\"handleTriggerLeave\"),m=CI(_=\u003ed(_,c),\"handleContentLeave\");return c.addEventListener(\"pointerleave\",p),u.addEventListener(\"pointerleave\",m),()=\u003e{c.removeEventListener(\"pointerleave\",p),u.removeEventListener(\"pointerleave\",m)}}},[c,u,d,h]),ee.useEffect(()=\u003e{if(a){const p=CI(m=\u003e{const _=m.target,f={x:m.clientX,y:m.clientY},I=c?.contains(_)||u?.contains(_),C=!c_n(f,a);I?h():C\u0026\u0026(h(),l())},\"handleTrackPointerGrace\");return document.addEventListener(\"pointermove\",p),()=\u003edocument.removeEventListener(\"pointermove\",p)}},[c,u,a,l,h]),K.jsx(r_n,{...e,ref:s})},\"TooltipContentHoverable\")),Fzi=EFt(\"TooltipContent\"),r_n=ee.forwardRef(CI(function(e,n){const{__scopeTooltip:o,children:i,\"aria-label\":r,id:s,onEscapeKeyDown:a,onPointerDownOutside:A,...c}=e,l=Ufe(wee,o),u=Nqe(o),{onClose:g}=l;ee.useEffect(()=\u003e(document.addEventListener(Rqe,g),()=\u003edocument.removeEventListener(Rqe,g)),[g]),ee.useEffect(()=\u003e{if(l.trigger){const d=CI(p=\u003e{p.target instanceof Node\u0026\u0026p.target.contains(l.trigger)\u0026\u0026g()},\"handleScroll\");return window.addEventListener(\"scroll\",d,{capture:!0}),()=\u003ewindow.removeEventListener(\"scroll\",d,{capture:!0})}},[l.trigger,g]);const{setContentId:h}=l;return Ep(()=\u003e(h(s),()=\u003e{h(void 0)}),[s,h]),K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:A,onFocusOutside:d=\u003ed.preventDefault(),onDismiss:g,children:K.jsxs(Ome,{\"data-state\":l.stateAttribute,role:r?void 0:\"tooltip\",id:r?void 0:l.contentId,...u,...c,ref:n,style:{...c.style,\"--radix-tooltip-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-tooltip-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-tooltip-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-tooltip-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-tooltip-trigger-height\":\"var(--radix-popper-anchor-height)\"},children:[K.jsx(Fzi,{children:i}),r?K.jsx(YVi,{id:l.contentId,role:\"tooltip\",children:r}):null]})})},\"TooltipContentImpl\"));function s_n(t,e){const n=Math.abs(e.top-t.y),o=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),r=Math.abs(e.left-t.x);switch(Math.min(n,o,i,r)){case r:return\"left\";case i:return\"right\";case n:return\"top\";case o:return\"bottom\";default:throw new Error(\"unreachable\")}}CI(s_n,\"getExitSideFromRect\");function a_n(t,e,n=5){const o=[];switch(e){case\"top\":o.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case\"bottom\":o.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case\"left\":o.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case\"right\":o.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return o}CI(a_n,\"getPaddedExitPoints\");function A_n(t){const{top:e,right:n,bottom:o,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:o},{x:i,y:o}]}CI(A_n,\"getPointsFromRect\");function c_n(t,e){const{x:n,y:o}=t;let i=!1;for(let r=0,s=e.length-1;r\u003ce.length;s=r++){const a=e[r],A=e[s],c=a.x,l=a.y,u=A.x,g=A.y;l\u003eo!=g\u003eo\u0026\u0026n\u003c(u-c)*(o-l)/(g-l)+c\u0026\u0026(i=!i)}return i}CI(c_n,\"isPointInPolygon\");function l_n(t){const e=t.slice();return e.sort((n,o)=\u003en.x\u003co.x?-1:n.x\u003eo.x?1:n.y\u003co.y?-1:n.y\u003eo.y?1:0),u_n(e)}CI(l_n,\"getHull\");function u_n(t){if(t.length\u003c=1)return t.slice();const e=[];for(let o=0;o\u003ct.length;o++){const i=t[o];for(;e.length\u003e=2;){const r=e[e.length-1],s=e[e.length-2];if((r.x-s.x)*(i.y-s.y)\u003e=(r.y-s.y)*(i.x-s.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let o=t.length-1;o\u003e=0;o--){const i=t[o];for(;n.length\u003e=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)\u003e=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1\u0026\u0026n.length===1\u0026\u0026e[0].x===n[0].x\u0026\u0026e[0].y===n[0].y?e:e.concat(n)}CI(u_n,\"getHullPresorted\");var Lzi=wzi,Hzi=Mzi,Ozi=Dzi,g_n=Tzi;const Fqe=Lzi,Lqe=Hzi,Hqe=Ozi,Kfe=ee.forwardRef(({className:t,sideOffset:e=4,...n},o)=\u003eK.jsx(g_n,{ref:o,sideOffset:e,className:Oi(\"z-50 overflow-hidden rounded-md bg-slate-900 px-3 py-1.5 text-xs text-slate-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-slate-50 dark:text-slate-900\",t),...n}));Kfe.displayName=g_n.displayName;const Gzi=\"24b58135-86c7-4e4b-bf6e-cca862bc4b26\",d_n=\"runframe-crisp-chat-script\",Yzi=\"tscircuit.com\",Pee=t=\u003e{window.$crisp=window.$crisp||[],window.$crisp.push(t)},Uzi=()=\u003e{if(window.$crisp=window.$crisp||[],window.CRISP_WEBSITE_ID=Gzi,window.__RUNFRAME_CRISP_CONFIGURED__||(window.__RUNFRAME_CRISP_CONFIGURED__=!0,Pee([\"do\",\"chat:hide\"]),Pee([\"on\",\"chat:closed\",()=\u003ePee([\"do\",\"chat:hide\"])])),!document.getElementById(d_n)){const t=document.createElement(\"script\");t.id=d_n,t.src=\"https://client.crisp.chat/l.js\",t.async=!0,document.head.appendChild(t)}},Kzi=()=\u003e{Uzi(),Pee([\"do\",\"chat:show\"]),Pee([\"do\",\"chat:open\"])},Vzi=({isCli:t,hostname:e=typeof window\u003c\"u\"?window.location.hostname:void 0}={})=\u003ee?.toLowerCase()===Yzi?!1:!!t,zzi=()=\u003eK.jsx(Fqe,{children:K.jsxs(Lqe,{children:[K.jsx(Hqe,{asChild:!0,children:K.jsx(fA,{type:\"button\",variant:\"ghost\",size:\"icon\",\"aria-label\":\"Get Support or Give Feedback\",onClick:Kzi,className:\"rf-h-8 rf-w-8\",children:K.jsx(xbi,{className:\"rf-h-4 rf-w-4 rf-text-gray-500\"})})}),K.jsx(Kfe,{side:\"bottom\",children:\"Get Support or Give Feedback\"})]})}),Jzi=[\"assembly\",\"pinout\",\"analog_simulation\",\"bom\",\"circuit_json\",\"errors\",\"render_log\",\"autorouting\",\"solvers\"],Oqe=t=\u003et instanceof Error?t.message:\"An unknown error occurred\",h_n=({code:t,fsMap:e,onRunClicked:n=void 0,errorMessage:o,errorStack:i,circuitJson:r,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:A=!1,codeTabContent:c,showJsonTab:l=!0,showRenderLogTab:u=!0,onActiveTabChange:g,renderLog:h,showImportAndFormatButtons:d=!0,className:p,headerClassName:m,leftHeaderContent:_,readOnly:f,isStreaming:I,autoroutingLog:C,onReportAutoroutingLog:y,isRunningCode:x,hasCodeChangedSinceLastRun:E,onEditEvent:B,editEvents:S,defaultActiveTab:Q,defaultTab:w,availableTabs:M,autoRotate3dViewerDisabled:k,showSchematicDebugGrid:R=!1,showSchematicPorts:F=!1,onChangeShowSchematicDebugGrid:O,onChangeShowSchematicPorts:U,showToggleFullScreen:Y=!0,defaultToFullScreen:W=!1,activeEffectName:te,allowSelectingVersion:j=!0,showFileMenu:J=!1,isWebEmbedded:oe=!1,isCli:ie=!1,projectName:ne,schematicSvgOptions:le,hideSchematicInAnalogSimulation:ge=!1,onRerunWithDebug:_e,solverEvents:ue,autoroutingPhases:fe,onPcbBoundsSelected:pe})=\u003e{mee();const{versions:ye,latestVersion:Me,lastRunEvalVersion:ve,search:he,setSearch:Qe,selectVersion:Pe}=HGi(j),we=ee.useMemo(()=\u003er?r.filter(Ze=\u003eZe\u0026\u0026\"error_type\"in Ze||Ze.type.includes(\"error\")):null,[r]),Te=ee.useMemo(()=\u003er?r.filter(Ze=\u003eZe\u0026\u0026\"warning_type\"in Ze||Ze.type.includes(\"warning\")):null,[r]),Re=ee.useMemo(()=\u003er?r.some(Ze=\u003eZe.type===\"schematic_group\"):!0,[r]),Ee=ee.useMemo(()=\u003er?.some(Ze=\u003eZe.type===\"pcb_panel\"),[r]),ke=(!M||M.includes(\"schematic\"))\u0026\u0026Re\u0026\u0026!Ee,{controller:Ce,focusSchematicComponent:Le}=ANi(),Ye=ke?({source_component_id:Ze})=\u003e{const dt=r?.find(Ut=\u003eUt.type===\"schematic_component\"\u0026\u0026Ut.source_component_id===Ze);dt?.type===\"schematic_component\"\u0026\u0026(Le(dt.schematic_component_id),st(\"schematic\"))}:void 0,tt=ee.useMemo(()=\u003e!r||!x||we?.length?!1:r.some(dt=\u003edt.type===\"simulation_experiment\")\u0026\u0026!ojo(r),[r,we,x]),At=ee.useMemo(()=\u003ewe?.find(Ze=\u003eZe.type.startsWith(\"simulation_\")),[we]);hpn({errorMessage:o,errorStack:i,circuitJsonErrors:we});const at=w??M?.[0]??\"pcb\",[nt,gt]=OO(\"runframe-active-tab\",Q??at,Q);ppn({source:\"runframe\",component:\"CircuitJsonPreview\",isWebEmbedded:oe,activeTab:nt});const[bt,Ct]=ee.useState(null),[Dt,kt]=ee.useState(W),[it,Yt]=ee.useState(R),[pn,be]=ee.useState(F),et=O?R:it,It=U?F:pn,Bt=O??Yt,mt=U??be;oOi(Dt);const st=ee.useCallback(Ze=\u003e{gt(Ze),g?.(Ze)},[g,gt]),xt=()=\u003e{kt(!Dt)};ee.useEffect(()=\u003e{o\u0026\u0026(nt!==\"errors\"\u0026\u0026Ct(nt),st(\"errors\"))},[o]),ee.useEffect(()=\u003e{(nt===\"code\"||nt===\"errors\")\u0026\u0026r\u0026\u0026!o\u0026\u0026st(bt??Q??w??M?.[0]??\"pcb\")},[r]);const Xe=ee.useCallback(Ze=\u003e{window.TSCIRCUIT_3D_OBJECT_REF=Ze===null?void 0:Ze},[]);return K.jsx(\"div\",{className:Oi(\"flex flex-col relative rf-overflow-x-hidden rf-h-full\",p),children:K.jsx(\"div\",{className:Oi(\"rf-md:sticky rf-md:top-2 rf-h-full\",Dt\u0026\u0026\"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden\"),children:K.jsxs(dRe,{value:nt,onValueChange:st,className:\"rf-flex-grow rf-flex rf-flex-col rf-h-full\",children:[K.jsxs(\"div\",{className:Oi(\"rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0\",m),children:[_,J\u0026\u0026!_\u0026\u0026K.jsx(Yfe,{isWebEmbedded:oe,circuitJson:r,projectName:ne,autoroutingLog:C,onReportAutoroutingLog:y,showSchematicDebugGrid:et,onChangeShowSchematicDebugGrid:Bt,showSchematicPorts:It,onChangeShowSchematicPorts:mt}),(_||J)\u0026\u0026K.jsx(\"div\",{className:\"rf-flex-grow\"}),!_\u0026\u0026!J\u0026\u0026x\u0026\u0026K.jsx(SE,{className:\"rf-w-4 rf-h-4 rf-animate-spin\"}),!_\u0026\u0026!J\u0026\u0026K.jsx(\"div\",{className:\"rf-flex-grow\"}),h\u0026\u0026h.progress!==1\u0026\u0026!o\u0026\u0026K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs\",children:[te?K.jsx(\"div\",{className:\"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0\",title:te,children:te}):h.lastRenderEvent\u0026\u0026K.jsx(\"div\",{className:\"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0\",title:h.lastRenderEvent?.phase??\"\",children:h.lastRenderEvent?.phase??\"\"}),K.jsx(\"div\",{className:\"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0\",children:K.jsx(SE,{className:\"rf-w-4 rf-h-4 rf-animate-spin\"})}),K.jsxs(\"div\",{className:\"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0\",children:[((h.progress??0)*100).toFixed(1),\"%\"]})]}),a\u0026\u0026Vzi({isCli:ie})\u0026\u0026K.jsx(zzi,{}),a\u0026\u0026K.jsxs(Jge,{children:[A\u0026\u0026K.jsx(p6,{value:\"code\",children:\"Code\"}),!M||M.includes(\"pcb\")?K.jsxs(p6,{value:\"pcb\",className:\"rf-whitespace-nowrap\",children:[r\u0026\u0026K.jsx(\"span\",{className:Oi(\"rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full\",E?\"rf-bg-gray-500\":\"rf-bg-blue-500\")}),\"PCB\"]}):null,!M||M.includes(\"schematic\")?K.jsxs(p6,{value:\"schematic\",className:Oi(\"rf-whitespace-nowrap\",r\u0026\u0026!Re\u0026\u0026\"rf-opacity-50\"),disabled:r?!Re||Ee:!1,children:[r\u0026\u0026K.jsx(\"span\",{className:Oi(\"rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full\",E?\"rf-bg-gray-500\":\"rf-bg-blue-500\")}),\"Schematic\"]}):null,!M||M.includes(\"cad\")?K.jsxs(p6,{value:\"cad\",children:[r\u0026\u0026K.jsx(\"span\",{className:Oi(\"inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full\",E?\"rf-bg-gray-500\":\"rf-bg-blue-500\")}),\"3D\"]}):null,![\"pcb\",\"cad\",\"schematic\"].includes(nt)\u0026\u0026K.jsx(p6,{value:nt,children:xYt(nt)}),K.jsxs(o_e,{children:[K.jsx(i_e,{asChild:!0,children:K.jsxs(\"button\",{type:\"button\",\"aria-label\":\"More views\",className:\"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative\",children:[K.jsx(dbi,{className:\"rf-w-4 rf-h-4\"}),(we\u0026\u0026we.length\u003e0||o)\u0026\u0026K.jsx(\"span\",{className:\"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full\"})]})}),K.jsxs(vZ,{className:\"rf-*:text-xs rf-z-[101]\",children:[Jzi.filter(Ze=\u003e!M||M.includes(Ze)).map(Ze=\u003eK.jsxs(bp,{onSelect:()=\u003est(Ze),children:[nt!==Ze\u0026\u0026K.jsx(pln,{className:\"rf-w-3 rf-h-3 rf-opacity-30\"}),nt===Ze\u0026\u0026K.jsx(CS,{className:\"rf-w-3 rf-h-3\"}),K.jsx(\"div\",{className:\"rf-pr-2\",children:xYt(Ze)}),Ze===\"errors\"\u0026\u0026(we\u0026\u0026we.length\u003e0||o)\u0026\u0026K.jsx(\"span\",{className:\"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full\",children:o?1:we?.length}),Ze===\"solvers\"\u0026\u0026ue\u0026\u0026ue.length\u003e0\u0026\u0026K.jsx(\"span\",{className:\"rf-inline-flex rf-items-center rf-justify-center rf-min-w-[12px] rf-h-3 rf-px-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-blue-500 rf-rounded-full\",children:ue.length})]},Ze)),K.jsx(bp,{disabled:!0,className:\"rf-opacity-60 rf-cursor-default rf-select-none\",children:K.jsxs(\"div\",{className:\"rf-pr-2 rf-text-xs rf-text-gray-500\",children:[\"@tscircuit/runframe@\",mpn.split(\".\").map((Ze,dt)=\u003edt===2?parseInt(Ze)+1:Ze).join(\".\")]})}),j?K.jsxs(QZ,{onOpenChange:Ze=\u003e!Ze\u0026\u0026Qe(\"\"),children:[K.jsx(BU,{className:\"rf-text-xs rf-opacity-60\",children:K.jsxs(\"div\",{className:\"rf-pr-2 rf-text-xs rf-text-gray-500\",children:[\"@tscircuit/eval@\",ve??Me??\"latest\"]})}),K.jsx(SZ,{children:K.jsxs(bU,{className:\"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto\",children:[K.jsx(\"div\",{className:\"rf-p-1\",children:K.jsx(yje,{value:he,onChange:Ze=\u003eQe(Ze.target.value),placeholder:\"Search...\",className:\"rf-h-7 rf-text-xs\"})}),K.jsx(H0n,{}),K.jsx(bp,{onSelect:()=\u003ePe(null),children:Me?`${Me} (latest)`:\"latest\"}),ye.map(Ze=\u003eK.jsx(bp,{onSelect:()=\u003ePe(Ze),children:Ze},Ze))]})})]}):ve\u0026\u0026K.jsx(bp,{disabled:!0,className:\"rf-opacity-60 rf-cursor-default rf-select-none\",children:K.jsxs(\"div\",{className:\"rf-pr-2 rf-text-xs rf-text-gray-500\",children:[\"@tscircuit/eval@\",ve]})})]})]})]}),Y\u0026\u0026K.jsx(fA,{onClick:xt,variant:\"ghost\",children:Dt?K.jsx(Ebi,{size:16}):K.jsx(fbi,{size:16})})]}),A\u0026\u0026K.jsx(cI,{value:\"code\",className:\"rf-flex-grow rf-overflow-hidden\",children:K.jsx(\"div\",{className:\"rf-h-full\",children:c})}),(!M||M.includes(\"pcb\"))\u0026\u0026K.jsx(cI,{value:\"pcb\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-hidden\",Dt?\"rf-h-[calc(100vh-52px)]\":\"rf-h-full\"),children:K.jsx(bE,{fallbackRender:({error:Ze})=\u003eK.jsx(\"div\",{className:\"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3\",children:\"Error loading PCB viewer\"}),K.jsx(\"p\",{className:\"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2\",children:Oqe(Ze)})]})}),children:r?K.jsx(tOi,{focusOnHover:!1,circuitJson:r,debugGraphics:s,onBoundsSelected:pe,onViewSchematicComponent:Ye,containerClassName:Oi(\"rf-h-full rf-w-full\",Dt?\"rf-min-h-[calc(100vh-240px)]\":\"rf-min-h-[620px]\"),onEditEventsChanged:Ze=\u003e{if(B)for(const dt of Ze)B(dt)}}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"assembly\"))\u0026\u0026K.jsx(cI,{value:\"assembly\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallback:K.jsx(\"div\",{children:\"Error loading Assembly\"}),children:r?K.jsx(cNi,{circuitJson:r,containerStyle:{height:\"100%\"},editingEnabled:!0,debugGrid:!0}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"pinout\"))\u0026\u0026K.jsx(cI,{value:\"pinout\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallback:K.jsx(\"div\",{children:\"Error loading Pinout Viewer\"}),children:r?K.jsx(lNi,{circuitJson:r,containerStyle:{height:\"100%\"}}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"schematic\"))\u0026\u0026K.jsx(cI,{value:\"schematic\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto rf-bg-white\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallbackRender:({error:Ze})=\u003eK.jsx(\"div\",{className:\"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3\",children:\"Error loading Schematic\"}),K.jsx(\"p\",{className:\"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2\",children:Oqe(Ze)})]})}),children:r?K.jsx(zDi,{controller:Ce,circuitJson:r,containerStyle:{height:\"100%\"},debugGrid:et,showSchematicPorts:It,css:le?.css,className:le?.className}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"cad\"))\u0026\u0026K.jsx(cI,{value:\"cad\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallbackRender:({error:Ze,resetErrorBoundary:dt})=\u003eK.jsx(J8i,{error:Ze,resetErrorBoundary:dt}),children:r?K.jsx(V8i,{ref:Xe,circuitJson:r,autoRotateDisabled:k,onViewSchematicComponent:Ye},`cad-${Dt}`):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"analog_simulation\"))\u0026\u0026K.jsx(cI,{value:\"analog_simulation\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallback:K.jsx(\"div\",{children:\"Error loading Analog Simulation\"}),children:r?At?K.jsx(\"div\",{className:\"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3\",children:\"Error running analog simulation\"}),K.jsx(\"p\",{className:\"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2\",children:At.message})]})}):tt?K.jsx(\"div\",{className:\"rf-flex rf-h-full rf-min-h-[300px] rf-items-center rf-justify-center rf-bg-slate-50\",children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2 rf-text-sm rf-text-slate-600\",children:[K.jsx(SE,{className:\"rf-h-4 rf-w-4 rf-animate-spin\"}),\"Running analog simulation...\"]})}):K.jsx(aNi,{circuitJson:r,hideSchematic:ge,containerStyle:{height:\"100%\"}}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"bom\"))\u0026\u0026K.jsx(cI,{value:\"bom\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallbackRender:({error:Ze})=\u003eK.jsx(\"div\",{className:\"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3\",children:\"Error loading Bill of Materials\"}),K.jsx(\"p\",{className:\"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2\",children:Oqe(Ze)})]})}),children:r?K.jsx(SNi,{circuitJson:r}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"circuit_json\"))\u0026\u0026K.jsx(cI,{value:\"circuit_json\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallback:K.jsx(\"div\",{children:\"Error loading JSON viewer\"}),children:r?K.jsx(dNi,{elements:r}):K.jsx(QS,{onRunClicked:n})})})}),(!M||M.includes(\"errors\"))\u0026\u0026K.jsx(cI,{value:\"errors\",className:\"rf-h-full\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-hidden\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:o||we\u0026\u0026we.length\u003e0||r?K.jsx(ewi,{code:t,fsMap:e,circuitJsonErrors:we,circuitJsonWarnings:Te,errorMessage:o,errorStack:i,circuitJson:r,evalVersion:ve,autoroutingLog:C,onReportAutoroutingLog:y}):K.jsx(QS,{onRunClicked:n})})}),u\u0026\u0026(!M||M.includes(\"render_log\"))\u0026\u0026K.jsx(cI,{value:\"render_log\",children:K.jsx(sOi,{renderLog:h,onRerunWithDebug:_e})}),(!M||M.includes(\"autorouting\"))\u0026\u0026K.jsx(cI,{value:\"autorouting\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-auto\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallback:K.jsx(\"div\",{className:\"rf-p-4\",children:\"Error loading autorouting captures\"}),children:K.jsx(FGi,{circuitJson:r,phases:fe,isRunning:x})})})}),(!M||M.includes(\"solvers\"))\u0026\u0026K.jsx(cI,{value:\"solvers\",children:K.jsx(\"div\",{className:Oi(\"rf-overflow-hidden\",Dt?\"rf-h-[calc(100vh-60px)]\":\"rf-h-full rf-min-h-[620px]\"),children:K.jsx(bE,{fallback:K.jsx(\"div\",{children:\"Error loading Solvers view\"}),children:K.jsx(yGi,{solverEvents:ue})})})})]})})})};const p_n=Symbol(\"Comlink.proxy\"),Wzi=Symbol(\"Comlink.endpoint\"),m_n=Symbol(\"Comlink.releaseProxy\"),Gqe=Symbol(\"Comlink.finalizer\"),Vfe=Symbol(\"Comlink.thrown\"),__n=t=\u003etypeof t==\"object\"\u0026\u0026t!==null||typeof t==\"function\",jzi={canHandle:t=\u003e__n(t)\u0026\u0026t[p_n],serialize(t){const{port1:e,port2:n}=new MessageChannel;return I_n(t,e),[n,[n]]},deserialize(t){return t.start(),y_n(t)}},$zi={canHandle:t=\u003e__n(t)\u0026\u0026Vfe in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},f_n=new Map([[\"proxy\",jzi],[\"throw\",$zi]]);function qzi(t,e){for(const n of t)if(e===n||n===\"*\"||n instanceof RegExp\u0026\u0026n.test(e))return!0;return!1}function I_n(t,e=globalThis,n=[\"*\"]){e.addEventListener(\"message\",function o(i){if(!i||!i.data)return;if(!qzi(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:r,type:s,path:a}=Object.assign({path:[]},i.data),A=(i.data.argumentList||[]).map(XT);let c;try{const l=a.slice(0,-1).reduce((g,h)=\u003eg[h],t),u=a.reduce((g,h)=\u003eg[h],t);switch(s){case\"GET\":c=u;break;case\"SET\":l[a.slice(-1)[0]]=XT(i.data.value),c=!0;break;case\"APPLY\":c=u.apply(l,A);break;case\"CONSTRUCT\":{const g=new u(...A);c=Uqe(g)}break;case\"ENDPOINT\":{const{port1:g,port2:h}=new MessageChannel;I_n(t,h),c=nJi(g,[g])}break;case\"RELEASE\":c=void 0;break;default:return}}catch(l){c={value:l,[Vfe]:0}}Promise.resolve(c).catch(l=\u003e({value:l,[Vfe]:0})).then(l=\u003e{const[u,g]=jfe(l);e.postMessage(Object.assign(Object.assign({},u),{id:r}),g),s===\"RELEASE\"\u0026\u0026(e.removeEventListener(\"message\",o),C_n(e),Gqe in t\u0026\u0026typeof t[Gqe]==\"function\"\u0026\u0026t[Gqe]())}).catch(l=\u003e{const[u,g]=jfe({value:new TypeError(\"Unserializable return value\"),[Vfe]:0});e.postMessage(Object.assign(Object.assign({},u),{id:r}),g)})}),e.start\u0026\u0026e.start()}function Xzi(t){return t.constructor.name===\"MessagePort\"}function C_n(t){Xzi(t)\u0026\u0026t.close()}function y_n(t,e){const n=new Map;return t.addEventListener(\"message\",function(i){const{data:r}=i;if(!r||!r.id)return;const s=n.get(r.id);if(s)try{s(r)}finally{n.delete(r.id)}}),Yqe(t,n,[],e)}function zfe(t){if(t)throw new Error(\"Proxy has been released and is not useable\")}function x_n(t){return XU(t,new Map,{type:\"RELEASE\"}).then(()=\u003e{C_n(t)})}const Jfe=new WeakMap,Wfe=\"FinalizationRegistry\"in globalThis\u0026\u0026new FinalizationRegistry(t=\u003e{const e=(Jfe.get(t)||0)-1;Jfe.set(t,e),e===0\u0026\u0026x_n(t)});function Zzi(t,e){const n=(Jfe.get(e)||0)+1;Jfe.set(e,n),Wfe\u0026\u0026Wfe.register(t,e,t)}function eJi(t){Wfe\u0026\u0026Wfe.unregister(t)}function Yqe(t,e,n=[],o=function(){}){let i=!1;const r=new Proxy(o,{get(s,a){if(zfe(i),a===m_n)return()=\u003e{eJi(r),x_n(t),e.clear(),i=!0};if(a===\"then\"){if(n.length===0)return{then:()=\u003er};const A=XU(t,e,{type:\"GET\",path:n.map(c=\u003ec.toString())}).then(XT);return A.then.bind(A)}return Yqe(t,e,[...n,a])},set(s,a,A){zfe(i);const[c,l]=jfe(A);return XU(t,e,{type:\"SET\",path:[...n,a].map(u=\u003eu.toString()),value:c},l).then(XT)},apply(s,a,A){zfe(i);const c=n[n.length-1];if(c===Wzi)return XU(t,e,{type:\"ENDPOINT\"}).then(XT);if(c===\"bind\")return Yqe(t,e,n.slice(0,-1));const[l,u]=E_n(A);return XU(t,e,{type:\"APPLY\",path:n.map(g=\u003eg.toString()),argumentList:l},u).then(XT)},construct(s,a){zfe(i);const[A,c]=E_n(a);return XU(t,e,{type:\"CONSTRUCT\",path:n.map(l=\u003el.toString()),argumentList:A},c).then(XT)}});return Zzi(r,t),r}function tJi(t){return Array.prototype.concat.apply([],t)}function E_n(t){const e=t.map(jfe);return[e.map(n=\u003en[0]),tJi(e.map(n=\u003en[1]))]}const B_n=new WeakMap;function nJi(t,e){return B_n.set(t,e),t}function Uqe(t){return Object.assign(t,{[p_n]:!0})}function jfe(t){for(const[e,n]of f_n)if(n.canHandle(t)){const[o,i]=n.serialize(t);return[{type:\"HANDLER\",name:e,value:o},i]}return[{type:\"RAW\",value:t},B_n.get(t)||[]]}function XT(t){switch(t.type){case\"HANDLER\":return f_n.get(t.name).deserialize(t.value);case\"RAW\":return t.value}}function XU(t,e,n,o){return new Promise(i=\u003e{const r=oJi();e.set(r,i),t.start\u0026\u0026t.start(),t.postMessage(Object.assign({id:r},n),o)})}function oJi(){return new Array(4).fill(0).map(()=\u003eMath.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join(\"-\")}function Kqe(t,e=\"\"){const n=[];for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const i=t[o],r=e?`${e}.${o}`:o;if(i!==null\u0026\u0026typeof i==\"object\"\u0026\u0026!Array.isArray(i)){const s=Kqe(i,r);n.push(...s)}else n.push(r)}return n}function b_n(t,e){const n=e.split(\".\");let o=t;for(const i of n)o=o[i];return o}var iJi=(t=\"latest\")=\u003e[`https://jscdn.tscircuit.com/@tscircuit/eval/${t}/dist/webworker/entrypoint.js`,`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${t}/dist/webworker/entrypoint.js`,`https://unpkg.com/@tscircuit/eval@${t}/dist/webworker/entrypoint.js`],rJi=async(t=\"latest\",e=!1)=\u003e{let n;for(const o of iJi(t))try{const i=await globalThis.fetch(o);if(!i.ok)throw new Error(`Failed to fetch webworker entrypoint from ${o}: ${i.status} ${i.statusText}`);return await i.blob()}catch(i){n=i,e\u0026\u0026console.warn(`[Worker] Failed to fetch webworker entrypoint from ${o}, trying next CDN fallback if available`,i)}throw n instanceof Error?n:new Error(\"Failed to fetch webworker entrypoint from CDN fallbacks\")},S_n=async t=\u003e{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e\u0026\u0026typeof e.kill==\"function\"){t.verbose\u0026\u0026console.log(\"[Worker] Killing previous global worker instance...\");try{await e.kill()}catch(g){t.verbose\u0026\u0026console.warn(\"[Worker] Error killing previous global worker instance:\",g),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e\u0026\u0026(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}t.verbose\u0026\u0026console.log(\"[Worker] Creating circuit web worker with config:\",t);let n=t.webWorkerBlobUrl??t.webWorkerUrl;if(!n){const g=await rJi(t.evalVersion??\"latest\",t.verbose);n=URL.createObjectURL(g)}const o=new Worker(n,{type:\"module\"});let i;o.addEventListener(\"error\",g=\u003e{console.error(\"[Worker] Error in worker\",g),i=g}),o.addEventListener(\"unhandledrejection\",g=\u003e{console.error(\"[Worker] Unhandled rejection in worker\",g)}),o.addEventListener(\"messageerror\",g=\u003e{console.error(\"[Worker] Message error in worker\",g)});const r=g=\u003e{console.log(\"[Worker] Message in worker\",g)};if(o.addEventListener(\"message\",r),o.addEventListener(\"message\",async g=\u003e{const h=g.data;if(h?.type===\"worker_fetch\")try{const d=await globalThis.fetch(h.input,h.init),p=await d.text();o.postMessage({type:\"worker_fetch_result\",requestId:h.requestId,success:!0,response:{body:p,status:d.status,statusText:d.statusText,headers:(()=\u003e{const m={};return d.headers.forEach((_,f)=\u003e{m[f]=_}),m})()}})}catch(d){o.postMessage({type:\"worker_fetch_result\",requestId:h.requestId,success:!1,error:{name:d.name,message:d.message,stack:d.stack}})}}),i)throw i;const s=y_n(o);o.removeEventListener(\"message\",r);function a(g){return!g||typeof g!=\"object\"?g:g.type\u0026\u0026g.props!==void 0?{__isSerializedReactElement:!0,type:g.type,props:A(g.props),key:g.key}:g}function A(g){if(!g||typeof g!=\"object\")return g;const h={};for(const[d,p]of Object.entries(g))d===\"children\"?Array.isArray(p)?h.children=p.map(a):h.children=a(p):h[d]=p;return h}t.enableFetchProxy\u0026\u0026o.postMessage({type:\"override_global_fetch\"}),t.disableCdnLoading\u0026\u0026await s.setDisableCdnLoading(!0),t.snippetsApiBaseUrl\u0026\u0026await s.setSnippetsApiBaseUrl(t.snippetsApiBaseUrl),t.tscircuitSessionToken\u0026\u0026await s.setTscircuitSessionToken(t.tscircuitSessionToken),t.easyEdaProxyConfig\u0026\u0026await s.setEasyEdaProxyConfig(t.easyEdaProxyConfig);const c=g=\u003etypeof g==\"function\"?Uqe(g):g;if(t.platform)for(const g of Kqe(t.platform))await s.setPlatformConfigProperty(g,c(b_n(t.platform,g))).catch(h=\u003e{throw new Error(`Error setting platform config property ${g}: ${h instanceof Error?h.message:String(h)}`)});if(t.projectConfig)for(const g of Kqe(t.projectConfig))await s.setProjectConfigProperty(g,c(b_n(t.projectConfig,g))).catch(h=\u003e{throw new Error(`Error setting project config property ${g}: ${h instanceof Error?h.message:String(h)}`)});let l=!1;const u={clearEventListeners:s.clearEventListeners.bind(s),enableDebug:async(...g)=\u003e{if(l)throw new Error(\"CircuitWebWorker was terminated, can't enableDebug\");return s.enableDebug.bind(s)(...g)},version:s.version.bind(s),execute:async(...g)=\u003e{if(l)throw new Error(\"CircuitWebWorker was terminated, can't execute\");return s.execute.bind(s)(...g)},executeComponent:async g=\u003e{if(l)throw new Error(\"CircuitWebWorker was terminated, can't executeComponent\");if(typeof g==\"function\")return s.executeComponent.bind(s)(g);if(g\u0026\u0026typeof g==\"object\"\u0026\u0026g.type){const h=a(g);return s.executeComponent.bind(s)(h)}return s.executeComponent.bind(s)(g)},executeWithFsMap:async(...g)=\u003e{if(l)throw new Error(\"CircuitWebWorker was terminated, can't executeWithFsMap\");return s.executeWithFsMap.bind(s)(...g)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(g,h)=\u003e{const d=Uqe(h);s.on(g,d)},kill:async()=\u003e{s[m_n](),o.terminate(),l=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===u\u0026\u0026(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return u.__rawWorker=o,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=u,u};const sJi=({error:t,resetErrorBoundary:e,componentStack:n})=\u003e{const o=t instanceof Error?t:new Error(String(t));return K.jsx(\"section\",{className:\"rf-h-full rf-w-full rf-grid rf-place-items-center\",children:K.jsx(\"div\",{className:\"rf-min-h-full rf-flex rf-items-center rf-justify-center rf-px-4\",children:K.jsxs(\"div\",{className:\"rf-max-w-lg rf-w-full rf-text-center\",children:[K.jsxs(\"div\",{className:\"rf-mb-8\",children:[K.jsx(\"div\",{className:\"rf-inline-flex rf-items-center rf-justify-center rf-w-20 rf-h-20 rf-bg-red-100 rf-rounded-full rf-mb-6\",children:K.jsx(vbi,{className:\"rf-w-10 rf-h-10 rf-text-red-600\"})}),K.jsx(\"h1\",{className:\"rf-text-2xl rf-font-bold rf-text-gray-900 rf-mb-3\",children:\"Oops! Something went wrong\"}),K.jsx(\"p\",{className:\"rf-text-gray-600 rf-mb-4\",children:\"RunFrame encountered an unexpected error.\"}),K.jsx(\"pre\",{className:\"rf-text-xs no-scrollbar rf-font-mono rf-text-left rf-whitespace-pre-wrap rf-text-red-600 rf-bg-red-50 rf-border rf-border-red-200 rf-p-3 rf-rounded-lg rf-mb-4 rf-overflow-auto rf-max-h-[120px]\",children:o.message}),o.stack\u0026\u0026K.jsxs(\"details\",{className:\"rf-text-center rf-mb-6\",children:[K.jsx(\"summary\",{className:\"rf-text-xs rf-text-gray-500 rf-cursor-pointer hover:rf-text-gray-700\",children:\"View stack trace\"}),K.jsx(\"pre\",{className:\"rf-text-xs rf-font-mono no-scrollbar rf-whitespace-pre-wrap rf-text-gray-500 rf-bg-gray-100 rf-p-3 rf-rounded-lg rf-mt-2 rf-overflow-auto rf-text-left rf-max-h-[150px]\",children:o.stack})]}),n\u0026\u0026K.jsxs(\"details\",{className:\"rf-text-center rf-mb-6\",children:[K.jsx(\"summary\",{className:\"rf-text-xs rf-text-gray-500 rf-cursor-pointer hover:rf-text-gray-700\",children:\"View component stack\"}),K.jsx(\"pre\",{className:\"rf-text-xs rf-font-mono no-scrollbar rf-whitespace-pre-wrap rf-text-gray-500 rf-bg-gray-100 rf-p-3 rf-rounded-lg rf-mt-2 rf-overflow-auto rf-text-left rf-max-h-[150px]\",children:n})]})]}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-gap-2 rf-justify-center\",children:[K.jsx(fA,{variant:\"destructive\",size:\"lg\",onClick:()=\u003ewindow.location.reload(),children:\"Refresh Dev Server\"}),K.jsx(fA,{variant:\"outline\",size:\"lg\",onClick:e,children:\"Try Again\"})]})]})})})},Q_n=t=\u003e{const e={};if(!t)return e;for(const o of rE)e[o]=0;const n=new Map;for(const o of t){const[,,i,r]=o.type.split(\":\");if(r===\"start\"){n.set(`${i}:${o.renderId}`,o);continue}if(r===\"end\"){const s=n.get(`${i}:${o.renderId}`);if(s){const a=o.createdAt-s.createdAt;e[i]=(e[i]||0)+a}}}return e},$fe=t=\u003e{const e=t.toLowerCase(),n=e.split(\"/\").pop();return e.endsWith(\".circuit.json\")||n===\"circuit.json\"},aJi=t=\u003et.endsWith(\".tsx\")||$fe(t)||t.endsWith(\".jsx\"),AJi=({mainComponentPath:t,fsMap:e})=\u003eee.useMemo(()=\u003e{if(!(t!=null\u0026\u0026$fe(t)))return{isStaticCircuitJson:!1,circuitJson:null,error:null};const o=e.get(t);if(!o)return{isStaticCircuitJson:!0,circuitJson:null,error:`Circuit JSON file not found: ${t}`};try{return{isStaticCircuitJson:!0,circuitJson:JSON.parse(o),error:null}}catch(i){return{isStaticCircuitJson:!0,circuitJson:null,error:`Failed to parse circuit.json: ${i instanceof Error?i.message:String(i)}`}}},[t,e]),cJi=(t,e)=\u003e{const n={};for(const[o,i]of t.entries()){const r=e.get(o);r!==i\u0026\u0026(n[o]={old:i,new:r})}for(const[o,i]of e.entries())t.has(o)||(n[o]={old:void 0,new:i});return n},lJi=({message:t=\"Loading files...\"})=\u003eK.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-w-full rf-h-full\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b\",children:[K.jsx(\"div\",{className:\"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse\"}),K.jsx(\"div\",{className:\"rf-flex rf-gap-6 rf-ml-auto\",children:[\"PCB\",\"Schematic\",\"3D\"].map((e,n)=\u003eK.jsx(\"div\",{className:\"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse\"},n))})]}),K.jsx(\"div\",{className:\"rf-flex-1 rf-p-4\",children:K.jsx(\"div\",{className:\"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center\",children:K.jsx(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-4\",children:K.jsx(\"div\",{className:\"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500\",children:t})})})})]}),v_n=({projectBaseUrl:t})=\u003e({projectBaseUrl:t,enablePartOrientationAnalysis:!0}),uJi=t=\u003e!t||typeof t!=\"object\"?!1:!!(\"error_type\"in t||typeof t.type==\"string\"\u0026\u0026t.type.includes(\"error\")),gJi=t=\u003et instanceof Error?{name:t.name,message:t.message,stack:t.stack}:typeof t==\"string\"?{message:t}:t\u0026\u0026typeof t==\"object\"?t:{message:String(t)},dJi=t=\u003eArray.isArray(t)?t.filter(uJi):[],Vqe=({circuitJson:t,executionError:e})=\u003e{const n=[];e\u0026\u0026n.push(gJi(e));const o=dJi(t);return n.push(...o),{hasExecutionError:!!e,...n.length\u003e0?{errors:n}:{}}};function hJi(){const t=ee.useRef(Promise.resolve()),e=ee.useRef(!1),n=ee.useRef(null),o=ee.useCallback(async s=\u003e{await t.current;const a={cancelled:!1};n.current=a;let A;const c=new Promise(l=\u003e{A=l});try{return t.current=c,e.current=!0,await s()}catch(l){if(!a.cancelled)throw l}finally{e.current=!1,n.current=null,A()}},[]),i=ee.useCallback(()=\u003e{n.current\u0026\u0026(n.current.cancelled=!0),t.current=Promise.resolve(),e.current=!1},[]),r=ee.useCallback(()=\u003ee.current,[]);return{runWithMutex:o,isLocked:r,cancel:i}}const pJi=26,e3=vc(\"run-frame:RunFrame\"),mJi=async()=\u003e{try{const t=await fetch(\"https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval\");if(t.ok)return(await t.json()).tags?.latest}catch(t){console.error(\"Failed to fetch latest eval version\",t)}},w_n=async(t,e)=\u003e{if(t)return t;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const n=await mJi();if(n)return window.TSCIRCUIT_LATEST_EVAL_VERSION=n,n}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:\"latest\"},P_n=t=\u003e{mee();const e=md(ve=\u003eve.circuitJson),n=md(ve=\u003eve.setCircuitJson),[o,i]=ee.useState(null),[r,s]=ee.useState(null),a=ee.useRef(null),[A,c]=ee.useState(null),[l,u]=ee.useReducer((ve,he)=\u003eve+1,0),g=pfe(ve=\u003eve.setLastRunEvalVersion),h=ee.useRef(0),d=hJi(),[p,m]=ee.useState(!1),[_,f]=ee.useState(!1),[I,C]=ee.useState({}),[y,x]=ee.useState(\"\"),[E,B]=ee.useState(!1),[S,Q]=ee.useState(!1),w=Object.values(I).sort((ve,he)=\u003eve.startTime-he.startTime)[0]?.effectName,M=ve=\u003e{t.onRunCompleted?.(ve)};ee.useEffect(()=\u003e{const ve=he=\u003e{(he.ctrlKey||he.metaKey)\u0026\u0026he.key===\"Enter\"\u0026\u0026!p\u0026\u0026(he.preventDefault(),he.stopPropagation(),u(1))};return window.addEventListener(\"keydown\",ve,{capture:!0}),()=\u003ewindow.removeEventListener(\"keydown\",ve,{capture:!0})},[p]),ee.useEffect(()=\u003e{let ve=!1;return(async()=\u003e{try{if(!globalThis.runFrameWorker){const Qe=await w_n(t.evalVersion,t.forceLatestEvalVersion),Pe=await S_n({evalVersion:Qe,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,projectConfig:v_n({projectBaseUrl:t.projectBaseUrl||`${QC}/files/static`}),...t.platformConfig\u0026\u0026{platform:t.platformConfig},verbose:!0,...t.enableFetchProxy\u0026\u0026{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI\u0026\u0026{disableCdnLoading:!0},...t.tscircuitSessionToken\u0026\u0026{tscircuitSessionToken:t.tscircuitSessionToken},...t.easyEdaProxyConfig\u0026\u0026{easyEdaProxyConfig:t.easyEdaProxyConfig}});if(ve)return;globalThis.runFrameWorker=Pe,g(Qe)}ve||f(!0)}catch(Qe){console.error(\"Failed to preload eval worker\",Qe)}})(),()=\u003e{ve=!0}},[t.evalVersion,t.evalWebWorkerBlobUrl,t.forceLatestEvalVersion,t.tscircuitSessionToken]);const[k,R]=ee.useState(null),[F,O]=ee.useState({}),[U,Y]=ee.useState([]),[W,te]=ee.useState([]),j=ee.useRef(0),[J,oe]=ee.useState(t.defaultActiveTab??t.defaultTab??\"pcb\");ppn({source:\"runframe\",component:\"RunFrame\",isWebEmbedded:t.isWebEmbedded,activeTab:J}),ee.useEffect(()=\u003e{t.debug\u0026\u0026vc.enable(\"run-frame*\")},[t.debug]);const ie=t.fsMap instanceof Map?t.fsMap:Object.entries(t.fsMap??{}).reduce((ve,[he,Qe])=\u003eve.set(he,Qe),new Map),ne=ee.useRef(null),le=ee.useRef(null),{isStaticCircuitJson:ge,circuitJson:_e,error:ue}=AJi({mainComponentPath:t.mainComponentPath,fsMap:ie});ee.useEffect(()=\u003e{ge\u0026\u0026(_e?(n(_e),i(null)):ue\u0026\u0026i({error:ue,stack:\"\"}))},[ge,_e,ue]),ee.useEffect(()=\u003e{if(t.isLoadingFiles||ge)return;const ve=ie instanceof Map?Object.fromEntries(ie.entries()):ie;if(!ve||Object.keys(ve).length===0){i({error:\"No files provided. Please provide at least one file with code to execute.\",stack:\"\"}),m(!1);return}const he=l!==h.current;if(ne.current\u0026\u0026e){const Pe=cJi(ne.current,ie);if(Object.keys(Pe).length\u003e0)e3(\"code changes detected\");else if(le.current!==t.entrypoint)e3(\"render triggered by entrypoint change\");else if(!he){e3(\"render triggered without changes to fsMap, skipping\");return}}if(t.showRunButton\u0026\u0026l===h.current)return;ne.current=ie,le.current=t.entrypoint??null,h.current=l,m(!0);const Qe=async()=\u003e{e3(\"running render worker\"),i(null),R(null),C({}),Y([]),te([]);const Pe=++j.current,we={progress:0,debugOutputs:[]};let Te=!1;a.current=()=\u003e{Te=!0};const Re=await w_n(t.evalVersion,!globalThis.runFrameWorker\u0026\u0026t.forceLatestEvalVersion);e3(\"resolvedEvalVersion\",Re);const Ee=globalThis.runFrameWorker??await S_n({evalVersion:Re,webWorkerBlobUrl:t.evalWebWorkerBlobUrl,verbose:!0,projectConfig:v_n({projectBaseUrl:t.projectBaseUrl||`${QC}/files/static`}),...t.platformConfig\u0026\u0026{platform:t.platformConfig},...t.enableFetchProxy\u0026\u0026{enableFetchProxy:t.enableFetchProxy},...window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI\u0026\u0026{disableCdnLoading:!0},...t.tscircuitSessionToken\u0026\u0026{tscircuitSessionToken:t.tscircuitSessionToken},...t.easyEdaProxyConfig\u0026\u0026{easyEdaProxyConfig:t.easyEdaProxyConfig}});globalThis.runFrameWorker=Ee,g(Re),await Ee.clearEventListeners(),y?.trim()\u0026\u0026Ee.enableDebug(y.replace(\"DEBUG=\",\"\")),e3(\"Starting render...\"),t.onRenderStarted?.();const ke=ie instanceof Map?Object.fromEntries(ie.entries()):ie;let Ce=Date.now();Ee.on(\"asyncEffect:start\",nt=\u003e{const gt=`${nt.phase}|${nt.componentDisplayName??\"\"}|${nt.effectName}`;C(bt=\u003e({...bt,[gt]:{...nt,startTime:Date.now()}}))}),Ee.on(\"asyncEffect:end\",nt=\u003e{const gt=`${nt.phase}|${nt.componentDisplayName??\"\"}|${nt.effectName}`;C(bt=\u003e{const{[gt]:Ct,...Dt}=bt;return Dt})});let Le=[];const Ye=nt=\u003e{Te||Pe!==j.current||(Le=bGi(Le,nt),te(Le))};Ee.on(\"autorouting:end\",nt=\u003eYe({...nt,type:\"autorouting:end\"})),Ee.on(\"autorouting:error\",nt=\u003eYe({...nt,type:\"autorouting:error\"})),Ee.on(\"autorouting:start\",nt=\u003e{Ye({...nt,type:\"autorouting:start\"}),O({...F,[nt.componentDisplayName]:{simpleRouteJson:nt.simpleRouteJson,createdAt:Date.now()}})}),Ee.on(\"solver:started\",nt=\u003e{e3(\"solver:started\",nt),Y(gt=\u003e{const bt=`${nt.componentName}-${nt.solverName}`;return gt.some(Dt=\u003e`${Dt.componentName}-${Dt.solverName}`===bt)?gt:[...gt,nt]})}),Ee.on(\"board:renderPhaseStarted\",nt=\u003e{we.lastRenderEvent=nt,we.eventsProcessed=(we.eventsProcessed??0)+1;const gt=rE.indexOf(nt.phase)/pJi*.75+we.eventsProcessed/1e3*.25,bt=1-Math.exp(-gt*3);we.progress=bt,Te||R({...we})}),J===\"render_log\"\u0026\u0026Ee.on(\"renderable:renderLifecycle:anyEvent\",nt=\u003e{we.renderEvents=we.renderEvents??[],nt.createdAt=Date.now(),we.renderEvents.push(nt),Date.now()-Ce\u003e500\u0026\u0026(we.phaseTimings=Q_n(we.renderEvents??[]),Ce=Date.now()),Te||R({...we})}),Ee.on(\"autorouting:progress\",nt=\u003e{c(nt.debugGraphics)}),Ee.on(\"debug:logOutput\",nt=\u003e{we.debugOutputs=we.debugOutputs??[],we.debugOutputs.push({type:\"debug\",name:nt.name,content:nt.content}),Te||R({...we})}),e3(\"Executing fsMap...\");const tt=await Ee.executeWithFsMap({entrypoint:t.entrypoint,fsMap:ke,...t.mainComponentPath?{mainComponentPath:t.mainComponentPath}:{}}).then(()=\u003e({success:!0})).catch(nt=\u003e{const gt=nt.message.replace(\"Error: \",\"\");return e3(`eval error: ${gt}`),t.onError?.(nt),M(Vqe({executionError:nt})),i({error:gt,stack:nt.stack}),R(null),console.error(nt),{success:!1}});if(e3(\"worker call started\"),!tt.success){m(!1),C({});return}const At=Ee.renderUntilSettled();e3(\"waiting for initial circuit json...\");let at=await Ee.getCircuitJson().catch(nt=\u003e(e3(\"error getting initial circuit json\",nt),t.onError?.(nt),M(Vqe({executionError:nt})),i({error:nt.message,stack:nt.stack}),R(null),m(!1),C({}),null));at\u0026\u0026(e3(\"got initial circuit json\"),n(at),t.onCircuitJsonChange?.(at),t.onInitialRender?.({circuitJson:at}),await At,e3(\"getting final circuit json\"),at=await Ee.getCircuitJson(),t.onCircuitJsonChange?.(at),n(at),M(Vqe({circuitJson:at})),t.onRenderFinished?.({circuitJson:at}),c({}),J===\"render_log\"\u0026\u0026(we.phaseTimings=Q_n(we.renderEvents??[])),we.progress=1,Te||R({...we}),m(!1),C({}),x(\"\"),a.current=null)};d.runWithMutex(Qe)},[t.fsMap,t.entrypoint,l,t.evalVersion,t.mainComponentPath,t.isLoadingFiles,y,ge]);const fe=ee.useRef(null),pe=ee.useRef(null),ye=ve=\u003e{if(!ve||ve===null){console.warn(\"[RunFrame] handleEditEvent received null or undefined event.\");return}ve.in_progress?(fe.current=ve,pe.current\u0026\u0026(clearTimeout(pe.current),pe.current=null)):(pe.current\u0026\u0026clearTimeout(pe.current),pe.current=setTimeout(()=\u003e{const he=ve||fe.current;t.onEditEvent?.(he),fe.current=null,pe.current=null},100))},Me=async(ve,he)=\u003e{let Qe=\"\";const Pe=Array.isArray(e)\u0026\u0026e.find(Re=\u003eRe.type===\"software_project_metadata\"),we=t.projectUrl??Pe?.project_url;if(we)try{Qe=new URL(we).pathname}catch{Qe=we}const Te=Qe?`${Qe} - ${ve}`:ve;await gq.post(\"autorouting/bug_reports/create\",{json:{title:Te,simple_route_json:he.simpleRouteJson}}).json().then(({autorouting_bug_report:Re})=\u003e{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${Re.autorouting_bug_report_id}`,\"_blank\")}).catch(Re=\u003e{console.error(\"Failed to report autorouting bug\",Re);const Ee=Re instanceof Wb\u0026\u0026Re.response?.status===401,ke=Re instanceof Wb\u0026\u0026Re.response?.status===413;if(Ee){t.onLoginRequired?t.onLoginRequired():alert(\"You must be logged in to report autorouting bugs\");return}if(ke){alert(\"This autorouting log is too large to report online. Download the log and attach it to a GitHub issue.\");return}const Ce=Re instanceof Error?Re.message:\"Failed to report autorouting bug\";alert(`Failed to report autorouting bug: ${Ce}`)})};return t.isLoadingFiles?K.jsx(lJi,{}):K.jsx(bE,{onError:(ve,he)=\u003e{s(he.componentStack??null)},onReset:()=\u003es(null),fallbackRender:ve=\u003eK.jsx(sJi,{...ve,componentStack:r}),children:K.jsx(h_n,{code:ie.get(t.entrypoint??t.mainComponentPath),fsMap:ie,defaultActiveTab:t.defaultActiveTab??t.defaultTab,defaultTab:t.defaultTab,availableTabs:t.availableTabs,schematicSvgOptions:t.schematicSvgOptions,showToggleFullScreen:t.showToggleFullScreen,autoroutingGraphics:A,autoroutingLog:F,onReportAutoroutingLog:t.onReportAutoroutingLog||Me,leftHeaderContent:K.jsxs(K.Fragment,{children:[t.showRunButton\u0026\u0026K.jsx(Fqe,{children:K.jsxs(Lqe,{children:[K.jsx(Hqe,{asChild:!0,children:K.jsxs(\"div\",{className:\"rf-relative rf-inline-flex\",children:[K.jsxs(\"button\",{type:\"button\",onClick:()=\u003e{u(1)},className:\"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200\",disabled:p||!_,children:[\"Run\",\" \",p||!_?K.jsx(SE,{className:\"rf-w-3 rf-h-3 rf-animate-spin\"}):K.jsx(_ln,{className:\"rf-w-3 rf-h-3\"})]}),p\u0026\u0026K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-ml-1\",children:K.jsx(fA,{onClick:ve=\u003e{ve.stopPropagation(),m(!1),R(null),i(null),a.current\u0026\u0026(a.current(),a.current=null),d.cancel(),C({}),globalThis.runFrameWorker\u0026\u0026(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:\"ghost\",size:\"icon\",className:\"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [\u0026\u003esvg]:rf-text-red-300 [\u0026\u003esvg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center\",children:K.jsx(Qbi,{className:\"!rf-h-2.5 !rf-w-2.5\",fill:\"currentColor\",stroke:\"currentColor\"})})})]})}),K.jsx(Kfe,{sideOffset:8,className:\"rf-p-0 rf-bg-transparent rf-border-none rf-shadow-none rf-pointer-events-none\",children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2 rf-px-2.5 rf-py-1.5 rf-bg-slate-900 rf-rounded-md rf-shadow-xl rf-border rf-border-slate-800/60\",children:[K.jsx(\"kbd\",{className:\"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none\",children:\"Ctrl\"}),K.jsx(\"span\",{className:\"rf-text-slate-500 rf-text-[11px] rf-font-medium rf-leading-none\",children:\"+\"}),K.jsx(\"kbd\",{className:\"rf-bg-slate-800 rf-px-1.5 rf-py-0.5 rf-rounded rf-text-[10px] rf-font-sans rf-font-medium rf-border rf-border-slate-700 rf-text-slate-200 rf-leading-none\",children:\"Enter\"})]})})]})}),t.showFileMenu!==!1\u0026\u0026K.jsx(Yfe,{isWebEmbedded:t.isWebEmbedded,onLoginRequired:t.onLoginRequired,showSchematicDebugGrid:E,onChangeShowSchematicDebugGrid:B,showSchematicPorts:S,onChangeShowSchematicPorts:Q,autoroutingLog:F,onReportAutoroutingLog:t.onReportAutoroutingLog||Me,shouldLoadLatestEval:t.shouldLoadLatestEval,onChangeShouldLoadLatestEval:t.onChangeShouldLoadLatestEval}),t.leftHeaderContent]}),onActiveTabChange:oe,circuitJson:e,renderLog:k,activeEffectName:w,isRunningCode:p,errorMessage:o?.error,errorStack:o?.stack,onEditEvent:ye,editEvents:t.editEvents,onPcbBoundsSelected:t.onPcbBoundsSelected,defaultToFullScreen:t.defaultToFullScreen,onRerunWithDebug:ve=\u003e{x(ve||\"\"),u(1)},solverEvents:U,autoroutingPhases:ge?[]:W,isCli:t.isCli,showSchematicDebugGrid:E,showSchematicPorts:S,onChangeShowSchematicDebugGrid:B,onChangeShowSchematicPorts:Q})})},_Ji=t=\u003enew Promise(e=\u003esetTimeout(e,t)),fJi=({isOpen:t,onClose:e,onLoginSuccess:n})=\u003e{const[o,i]=ee.useState(\"idle\"),[r,s]=ee.useState(null),[a,A]=ee.useState(null),c=md(p=\u003ep.pushEvent),l=ee.useRef(null);ee.useEffect(()=\u003e()=\u003e{l.current\u0026\u0026l.current.abort()},[]);const u=ee.useCallback(async()=\u003e{i(\"creating\"),A(null),l.current=new AbortController;try{const p=Hw(),{login_page:m}=await p.post(\"sessions/login_page/create\",{json:{},signal:l.current?.signal}).json();s(m.url),i(\"waiting\");const _=new URL(m.url);for(_.searchParams.set(\"autoclose\",\"true\"),window.open(_.toString(),\"_blank\");!l.current?.signal.aborted;){const{login_page:I}=await p.post(\"sessions/login_page/get\",{json:{login_page_id:m.login_page_id},headers:{Authorization:`Bearer ${m.login_page_auth_token}`},signal:l.current?.signal}).json();if(I.was_login_successful){i(\"exchanging\");break}if(I.is_expired)throw new Error(\"Login page expired. Please try again.\");await _Ji(1e3)}if(l.current?.signal.aborted){i(\"idle\");return}const{session:f}=await p.post(\"sessions/login_page/exchange_for_cli_session\",{json:{login_page_id:m.login_page_id},headers:{Authorization:`Bearer ${m.login_page_auth_token}`},signal:l.current?.signal}).json();typeof window\u003c\"u\"\u0026\u0026(window.TSCIRCUIT_REGISTRY_TOKEN=f.token),await c({event_type:\"TOKEN_UPDATED\",registry_token:f.token}),i(\"success\"),ua.success(\"Successfully logged in!\"),n?.(),setTimeout(()=\u003e{e(),i(\"idle\"),s(null)},1e3)}catch(p){if(p instanceof DOMException\u0026\u0026p.name===\"AbortError\"){i(\"idle\");return}console.error(\"Login error:\",p);const m=p instanceof Error?p.message:\"Failed to complete login\";A(m),i(\"error\"),ua.error(m)}},[c,n,e]),g=ee.useCallback(()=\u003e{l.current\u0026\u0026l.current.abort(),i(\"idle\"),s(null),A(null),e()},[e]),h=o===\"creating\"||o===\"waiting\"||o===\"exchanging\",d=()=\u003e{switch(o){case\"creating\":return\"Creating login page...\";case\"waiting\":return\"Waiting for you to complete login in the browser...\";case\"exchanging\":return\"Generating token...\";case\"success\":return\"Successfully logged in!\";case\"error\":return a||\"An error occurred\";default:return null}};return K.jsx(KT,{open:t,onOpenChange:p=\u003e!p\u0026\u0026!h\u0026\u0026g(),children:K.jsxs(VP,{className:\"rf-max-w-md\",children:[K.jsxs(zP,{children:[K.jsx(JP,{children:\"Sign In Required\"}),K.jsx(VT,{children:o===\"idle\"||o===\"error\"?\"Sign in to continue. A new browser window will open for authentication.\":\"Complete the login process in the opened browser window.\"})]}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4\",children:[o===\"idle\"||o===\"error\"?K.jsx(fA,{onClick:u,className:\"rf-w-full\",children:\"Sign In\"}):K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-3 rf-w-full\",children:[o!==\"success\"\u0026\u0026K.jsx(\"div\",{className:\"rf-animate-spin rf-w-6 rf-h-6 rf-border-2 rf-border-gray-300 rf-border-t-blue-600 rf-rounded-full\"}),K.jsx(\"p\",{className:\"rf-text-sm rf-text-gray-600 rf-text-center\",children:d()}),r\u0026\u0026o===\"waiting\"\u0026\u0026K.jsx(\"a\",{href:r,target:\"_blank\",rel:\"noreferrer\",className:\"rf-text-xs rf-text-blue-600 hover:rf-underline\",children:\"Click here if the window didn't open\"})]}),a\u0026\u0026o===\"error\"\u0026\u0026K.jsx(\"p\",{className:\"rf-text-sm rf-text-red-600 rf-text-center\",children:a}),h\u0026\u0026K.jsx(fA,{variant:\"outline\",onClick:g,className:\"rf-w-full\",children:\"Cancel\"})]})]})})},IJi=()=\u003e{const[t,e]=ee.useState(!1),n=ee.useCallback(()=\u003e{e(!0)},[]),o=ee.useCallback(()=\u003e{e(!1)},[]),i=ee.useCallback(()=\u003e{e(!1)},[]);return{LoginDialog:K.jsx(fJi,{isOpen:t,onClose:o,onLoginSuccess:i}),openLoginDialog:n}},CJi=({apiBaseUrl:t,fetchImpl:e=globalThis.fetch.bind(globalThis)})=\u003e{const n=`${t.replace(/\\/$/,\"\")}/cache`;return{getItem:async o=\u003e{try{const i=await e(`${n}?key=${encodeURIComponent(o)}`);return i.ok?await i.text():null}catch{return null}},setItem:async(o,i)=\u003e{try{await e(`${n}?key=${encodeURIComponent(o)}`,{method:\"POST\",headers:{\"Content-Type\":\"text/plain; charset=utf-8\"},body:i})}catch{}}}},yJi=t=\u003e{const[e,n]=OO(\"load-latest-eval\",!0),o=t.evalWebWorkerBlobUrl??t.workerBlobUrl,i=t.apiBaseUrl??QC,r=ee.useMemo(()=\u003e({...t.platformConfig,localCacheEngine:t.platformConfig?.localCacheEngine??CJi({apiBaseUrl:i})}),[i,t.platformConfig]),[s]=ee.useState(()=\u003etypeof window\u003e\"u\"?void 0:new URLSearchParams(window.location.hash.slice(1)).get(\"main_component\")??void 0),a=ee.useCallback(l=\u003e{if(typeof window\u003e\"u\")return;const u=new URLSearchParams(window.location.hash.slice(1));if(u.get(\"main_component\")===l)return;u.set(\"main_component\",l);const g=u.toString(),h=`${window.location.pathname}${window.location.search}${g.length\u003e0?`#${g}`:\"\"}`;window.history.replaceState(null,\"\",h)},[]),{LoginDialog:A,openLoginDialog:c}=IJi();return K.jsxs(K.Fragment,{children:[A,K.jsx(Cfn,{debug:t.debug,forceLatestEvalVersion:!o\u0026\u0026e,defaultToFullScreen:!0,showToggleFullScreen:!1,evalWebWorkerBlobUrl:o,apiBaseUrl:t.apiBaseUrl,platformConfig:r,isCli:!0,showFilesSwitch:!0,enableFetchProxy:t.enableFetchProxy,initialMainComponentPath:s,onLoginRequired:c,onMainComponentPathChange:a,shouldLoadLatestEval:!o\u0026\u0026e,onChangeShouldLoadLatestEval:l=\u003e{n(l),globalThis.runFrameWorker=null},leftHeaderContent:K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-justify-between\",children:t.scenarioSelectorContent})})]})};vc(\"run-frame:ImportComponentDialog\");var M_n=1,xJi=.9,EJi=.8,BJi=.17,zqe=.1,Jqe=.999,bJi=.9999,SJi=.99,QJi=/[\\\\\\/_+.#\"@\\[\\(\\{\u0026]/,vJi=/[\\\\\\/_+.#\"@\\[\\(\\{\u0026]/g,wJi=/[\\s-]/,D_n=/[\\s-]/g;function Wqe(t,e,n,o,i,r,s){if(r===e.length)return i===t.length?M_n:SJi;var a=`${i},${r}`;if(s[a]!==void 0)return s[a];for(var A=o.charAt(r),c=n.indexOf(A,i),l=0,u,g,h,d;c\u003e=0;)u=Wqe(t,e,n,o,c+1,r+1,s),u\u003el\u0026\u0026(c===i?u*=M_n:QJi.test(t.charAt(c-1))?(u*=EJi,h=t.slice(i,c-1).match(vJi),h\u0026\u0026i\u003e0\u0026\u0026(u*=Math.pow(Jqe,h.length))):wJi.test(t.charAt(c-1))?(u*=xJi,d=t.slice(i,c-1).match(D_n),d\u0026\u0026i\u003e0\u0026\u0026(u*=Math.pow(Jqe,d.length))):(u*=BJi,i\u003e0\u0026\u0026(u*=Math.pow(Jqe,c-i))),t.charAt(c)!==e.charAt(r)\u0026\u0026(u*=bJi)),(u\u003czqe\u0026\u0026n.charAt(c-1)===o.charAt(r+1)||o.charAt(r+1)===o.charAt(r)\u0026\u0026n.charAt(c-1)!==o.charAt(r))\u0026\u0026(g=Wqe(t,e,n,o,c+1,r+2,s),g*zqe\u003eu\u0026\u0026(u=g*zqe)),u\u003el\u0026\u0026(l=u),c=n.indexOf(A,c+1);return s[a]=l,l}function N_n(t){return t.toLowerCase().replace(D_n,\" \")}function PJi(t,e,n){return t=n\u0026\u0026n.length\u003e0?`${t+\" \"+n.join(\" \")}`:t,Wqe(t,e,N_n(t),N_n(e),0,0,{})}var Mee='[cmdk-group=\"\"]',jqe='[cmdk-group-items=\"\"]',MJi='[cmdk-group-heading=\"\"]',R_n='[cmdk-item=\"\"]',T_n=`${R_n}:not([aria-disabled=\"true\"])`,$qe=\"cmdk-item-select\",ZU=\"data-value\",DJi=(t,e,n)=\u003ePJi(t,e,n),k_n=ee.createContext(void 0),Dee=()=\u003eee.useContext(k_n),F_n=ee.createContext(void 0),qqe=()=\u003eee.useContext(F_n),L_n=ee.createContext(void 0),H_n=ee.forwardRef((t,e)=\u003e{let n=eK(()=\u003e{var J,oe;return{search:\"\",value:(oe=(J=t.value)!=null?J:t.defaultValue)!=null?oe:\"\",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=eK(()=\u003enew Set),i=eK(()=\u003enew Map),r=eK(()=\u003enew Map),s=eK(()=\u003enew Set),a=O_n(t),{label:A,children:c,value:l,onValueChange:u,filter:g,shouldFilter:h,loop:d,disablePointerSelection:p=!1,vimBindings:m=!0,..._}=t,f=t_(),I=t_(),C=t_(),y=ee.useRef(null),x=UJi();ZT(()=\u003e{if(l!==void 0){let J=l.trim();n.current.value=J,E.emit()}},[l]),ZT(()=\u003e{x(6,k)},[]);let E=ee.useMemo(()=\u003e({subscribe:J=\u003e(s.current.add(J),()=\u003es.current.delete(J)),snapshot:()=\u003en.current,setState:(J,oe,ie)=\u003e{var ne,le,ge,_e;if(!Object.is(n.current[J],oe)){if(n.current[J]=oe,J===\"search\")M(),Q(),x(1,w);else if(J===\"value\"){if(document.activeElement.hasAttribute(\"cmdk-input\")||document.activeElement.hasAttribute(\"cmdk-root\")){let ue=document.getElementById(C);ue?ue.focus():(ne=document.getElementById(f))==null||ne.focus()}if(x(7,()=\u003e{var ue;n.current.selectedItemId=(ue=R())==null?void 0:ue.id,E.emit()}),ie||x(5,k),((le=a.current)==null?void 0:le.value)!==void 0){let ue=oe??\"\";(_e=(ge=a.current).onValueChange)==null||_e.call(ge,ue);return}}E.emit()}},emit:()=\u003e{s.current.forEach(J=\u003eJ())}}),[]),B=ee.useMemo(()=\u003e({value:(J,oe,ie)=\u003e{var ne;oe!==((ne=r.current.get(J))==null?void 0:ne.value)\u0026\u0026(r.current.set(J,{value:oe,keywords:ie}),n.current.filtered.items.set(J,S(oe,ie)),x(2,()=\u003e{Q(),E.emit()}))},item:(J,oe)=\u003e(o.current.add(J),oe\u0026\u0026(i.current.has(oe)?i.current.get(oe).add(J):i.current.set(oe,new Set([J]))),x(3,()=\u003e{M(),Q(),n.current.value||w(),E.emit()}),()=\u003e{r.current.delete(J),o.current.delete(J),n.current.filtered.items.delete(J);let ie=R();x(4,()=\u003e{M(),ie?.getAttribute(\"id\")===J\u0026\u0026w(),E.emit()})}),group:J=\u003e(i.current.has(J)||i.current.set(J,new Set),()=\u003e{r.current.delete(J),i.current.delete(J)}),filter:()=\u003ea.current.shouldFilter,label:A||t[\"aria-label\"],getDisablePointerSelection:()=\u003ea.current.disablePointerSelection,listId:f,inputId:C,labelId:I,listInnerRef:y}),[]);function S(J,oe){var ie,ne;let le=(ne=(ie=a.current)==null?void 0:ie.filter)!=null?ne:DJi;return J?le(J,n.current.search,oe):0}function Q(){if(!n.current.search||a.current.shouldFilter===!1)return;let J=n.current.filtered.items,oe=[];n.current.filtered.groups.forEach(ne=\u003e{let le=i.current.get(ne),ge=0;le.forEach(_e=\u003e{let ue=J.get(_e);ge=Math.max(ue,ge)}),oe.push([ne,ge])});let ie=y.current;F().sort((ne,le)=\u003e{var ge,_e;let ue=ne.getAttribute(\"id\"),fe=le.getAttribute(\"id\");return((ge=J.get(fe))!=null?ge:0)-((_e=J.get(ue))!=null?_e:0)}).forEach(ne=\u003e{let le=ne.closest(jqe);le?le.appendChild(ne.parentElement===le?ne:ne.closest(`${jqe} \u003e *`)):ie.appendChild(ne.parentElement===ie?ne:ne.closest(`${jqe} \u003e *`))}),oe.sort((ne,le)=\u003ele[1]-ne[1]).forEach(ne=\u003e{var le;let ge=(le=y.current)==null?void 0:le.querySelector(`${Mee}[${ZU}=\"${encodeURIComponent(ne[0])}\"]`);ge?.parentElement.appendChild(ge)})}function w(){let J=F().find(ie=\u003eie.getAttribute(\"aria-disabled\")!==\"true\"),oe=J?.getAttribute(ZU);E.setState(\"value\",oe||void 0)}function M(){var J,oe,ie,ne;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=o.current.size;return}n.current.filtered.groups=new Set;let le=0;for(let ge of o.current){let _e=(oe=(J=r.current.get(ge))==null?void 0:J.value)!=null?oe:\"\",ue=(ne=(ie=r.current.get(ge))==null?void 0:ie.keywords)!=null?ne:[],fe=S(_e,ue);n.current.filtered.items.set(ge,fe),fe\u003e0\u0026\u0026le++}for(let[ge,_e]of i.current)for(let ue of _e)if(n.current.filtered.items.get(ue)\u003e0){n.current.filtered.groups.add(ge);break}n.current.filtered.count=le}function k(){var J,oe,ie;let ne=R();ne\u0026\u0026(((J=ne.parentElement)==null?void 0:J.firstChild)===ne\u0026\u0026((ie=(oe=ne.closest(Mee))==null?void 0:oe.querySelector(MJi))==null||ie.scrollIntoView({block:\"nearest\"})),ne.scrollIntoView({block:\"nearest\"}))}function R(){var J;return(J=y.current)==null?void 0:J.querySelector(`${R_n}[aria-selected=\"true\"]`)}function F(){var J;return Array.from(((J=y.current)==null?void 0:J.querySelectorAll(T_n))||[])}function O(J){let oe=F()[J];oe\u0026\u0026E.setState(\"value\",oe.getAttribute(ZU))}function U(J){var oe;let ie=R(),ne=F(),le=ne.findIndex(_e=\u003e_e===ie),ge=ne[le+J];(oe=a.current)!=null\u0026\u0026oe.loop\u0026\u0026(ge=le+J\u003c0?ne[ne.length-1]:le+J===ne.length?ne[0]:ne[le+J]),ge\u0026\u0026E.setState(\"value\",ge.getAttribute(ZU))}function Y(J){let oe=R(),ie=oe?.closest(Mee),ne;for(;ie\u0026\u0026!ne;)ie=J\u003e0?GJi(ie,Mee):YJi(ie,Mee),ne=ie?.querySelector(T_n);ne?E.setState(\"value\",ne.getAttribute(ZU)):U(J)}let W=()=\u003eO(F().length-1),te=J=\u003e{J.preventDefault(),J.metaKey?W():J.altKey?Y(1):U(1)},j=J=\u003e{J.preventDefault(),J.metaKey?O(0):J.altKey?Y(-1):U(-1)};return ee.createElement(Na.div,{ref:e,tabIndex:-1,..._,\"cmdk-root\":\"\",onKeyDown:J=\u003e{var oe;(oe=_.onKeyDown)==null||oe.call(_,J);let ie=J.nativeEvent.isComposing||J.keyCode===229;if(!(J.defaultPrevented||ie))switch(J.key){case\"n\":case\"j\":{m\u0026\u0026J.ctrlKey\u0026\u0026te(J);break}case\"ArrowDown\":{te(J);break}case\"p\":case\"k\":{m\u0026\u0026J.ctrlKey\u0026\u0026j(J);break}case\"ArrowUp\":{j(J);break}case\"Home\":{J.preventDefault(),O(0);break}case\"End\":{J.preventDefault(),W();break}case\"Enter\":{J.preventDefault();let ne=R();if(ne){let le=new Event($qe);ne.dispatchEvent(le)}}}}},ee.createElement(\"label\",{\"cmdk-label\":\"\",htmlFor:B.inputId,id:B.labelId,style:VJi},A),qfe(t,J=\u003eee.createElement(F_n.Provider,{value:E},ee.createElement(k_n.Provider,{value:B},J))))}),NJi=ee.forwardRef((t,e)=\u003e{var n,o;let i=t_(),r=ee.useRef(null),s=ee.useContext(L_n),a=Dee(),A=O_n(t),c=(o=(n=A.current)==null?void 0:n.forceMount)!=null?o:s?.forceMount;ZT(()=\u003e{if(!c)return a.item(i,s?.id)},[c]);let l=G_n(i,r,[t.value,t.children,r],t.keywords),u=qqe(),g=XP(x=\u003ex.value\u0026\u0026x.value===l.current),h=XP(x=\u003ec||a.filter()===!1?!0:x.search?x.filtered.items.get(i)\u003e0:!0);ee.useEffect(()=\u003e{let x=r.current;if(!(!x||t.disabled))return x.addEventListener($qe,d),()=\u003ex.removeEventListener($qe,d)},[h,t.onSelect,t.disabled]);function d(){var x,E;p(),(E=(x=A.current).onSelect)==null||E.call(x,l.current)}function p(){u.setState(\"value\",l.current,!0)}if(!h)return null;let{disabled:m,value:_,onSelect:f,forceMount:I,keywords:C,...y}=t;return ee.createElement(Na.div,{ref:_R(r,e),...y,id:i,\"cmdk-item\":\"\",role:\"option\",\"aria-disabled\":!!m,\"aria-selected\":!!g,\"data-disabled\":!!m,\"data-selected\":!!g,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:d},t.children)}),RJi=ee.forwardRef((t,e)=\u003e{let{heading:n,children:o,forceMount:i,...r}=t,s=t_(),a=ee.useRef(null),A=ee.useRef(null),c=t_(),l=Dee(),u=XP(h=\u003ei||l.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);ZT(()=\u003el.group(s),[]),G_n(s,a,[t.value,t.heading,A]);let g=ee.useMemo(()=\u003e({id:s,forceMount:i}),[i]);return ee.createElement(Na.div,{ref:_R(a,e),...r,\"cmdk-group\":\"\",role:\"presentation\",hidden:u?void 0:!0},n\u0026\u0026ee.createElement(\"div\",{ref:A,\"cmdk-group-heading\":\"\",\"aria-hidden\":!0,id:c},n),qfe(t,h=\u003eee.createElement(\"div\",{\"cmdk-group-items\":\"\",role:\"group\",\"aria-labelledby\":n?c:void 0},ee.createElement(L_n.Provider,{value:g},h))))}),TJi=ee.forwardRef((t,e)=\u003e{let{alwaysRender:n,...o}=t,i=ee.useRef(null),r=XP(s=\u003e!s.search);return!n\u0026\u0026!r?null:ee.createElement(Na.div,{ref:_R(i,e),...o,\"cmdk-separator\":\"\",role:\"separator\"})}),kJi=ee.forwardRef((t,e)=\u003e{let{onValueChange:n,...o}=t,i=t.value!=null,r=qqe(),s=XP(c=\u003ec.search),a=XP(c=\u003ec.selectedItemId),A=Dee();return ee.useEffect(()=\u003e{t.value!=null\u0026\u0026r.setState(\"search\",t.value)},[t.value]),ee.createElement(Na.input,{ref:e,...o,\"cmdk-input\":\"\",autoComplete:\"off\",autoCorrect:\"off\",spellCheck:!1,\"aria-autocomplete\":\"list\",role:\"combobox\",\"aria-expanded\":!0,\"aria-controls\":A.listId,\"aria-labelledby\":A.labelId,\"aria-activedescendant\":a,id:A.inputId,type:\"text\",value:i?t.value:s,onChange:c=\u003e{i||r.setState(\"search\",c.target.value),n?.(c.target.value)}})}),FJi=ee.forwardRef((t,e)=\u003e{let{children:n,label:o=\"Suggestions\",...i}=t,r=ee.useRef(null),s=ee.useRef(null),a=XP(c=\u003ec.selectedItemId),A=Dee();return ee.useEffect(()=\u003e{if(s.current\u0026\u0026r.current){let c=s.current,l=r.current,u,g=new ResizeObserver(()=\u003e{u=requestAnimationFrame(()=\u003e{let h=c.offsetHeight;l.style.setProperty(\"--cmdk-list-height\",h.toFixed(1)+\"px\")})});return g.observe(c),()=\u003e{cancelAnimationFrame(u),g.unobserve(c)}}},[]),ee.createElement(Na.div,{ref:_R(r,e),...i,\"cmdk-list\":\"\",role:\"listbox\",tabIndex:-1,\"aria-activedescendant\":a,\"aria-label\":o,id:A.listId},qfe(t,c=\u003eee.createElement(\"div\",{ref:_R(s,A.listInnerRef),\"cmdk-list-sizer\":\"\"},c)))}),LJi=ee.forwardRef((t,e)=\u003e{let{open:n,onOpenChange:o,overlayClassName:i,contentClassName:r,container:s,...a}=t;return ee.createElement(r_e,{open:n,onOpenChange:o},ee.createElement(s_e,{container:s},ee.createElement(wZ,{\"cmdk-overlay\":\"\",className:i}),ee.createElement(MZ,{\"aria-label\":t.label,\"cmdk-dialog\":\"\",className:r},ee.createElement(H_n,{ref:e,...a}))))}),HJi=ee.forwardRef((t,e)=\u003eXP(n=\u003en.filtered.count===0)?ee.createElement(Na.div,{ref:e,...t,\"cmdk-empty\":\"\",role:\"presentation\"}):null),OJi=ee.forwardRef((t,e)=\u003e{let{progress:n,children:o,label:i=\"Loading...\",...r}=t;return ee.createElement(Na.div,{ref:e,...r,\"cmdk-loading\":\"\",role:\"progressbar\",\"aria-valuenow\":n,\"aria-valuemin\":0,\"aria-valuemax\":100,\"aria-label\":i},qfe(t,s=\u003eee.createElement(\"div\",{\"aria-hidden\":!0},s)))}),t3=Object.assign(H_n,{List:FJi,Item:NJi,Input:kJi,Group:RJi,Separator:TJi,Dialog:LJi,Empty:HJi,Loading:OJi});function GJi(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function YJi(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function O_n(t){let e=ee.useRef(t);return ZT(()=\u003e{e.current=t}),e}var ZT=typeof window\u003e\"u\"?ee.useEffect:ee.useLayoutEffect;function eK(t){let e=ee.useRef();return e.current===void 0\u0026\u0026(e.current=t()),e}function XP(t){let e=qqe(),n=()=\u003et(e.snapshot());return ee.useSyncExternalStore(e.subscribe,n,n)}function G_n(t,e,n,o=[]){let i=ee.useRef(),r=Dee();return ZT(()=\u003e{var s;let a=(()=\u003e{var c;for(let l of n){if(typeof l==\"string\")return l.trim();if(typeof l==\"object\"\u0026\u0026\"current\"in l)return l.current?(c=l.current.textContent)==null?void 0:c.trim():i.current}})(),A=o.map(c=\u003ec.trim());r.value(t,a,A),(s=e.current)==null||s.setAttribute(ZU,a),i.current=a}),i}var UJi=()=\u003e{let[t,e]=ee.useState(),n=eK(()=\u003enew Map);return ZT(()=\u003e{n.current.forEach(o=\u003eo()),n.current=new Map},[t]),(o,i)=\u003e{n.current.set(o,i),e({})}};function KJi(t){let e=t.type;return typeof e==\"function\"?e(t.props):\"render\"in e?e.render(t.props):t}function qfe({asChild:t,children:e},n){return t\u0026\u0026ee.isValidElement(e)?ee.cloneElement(KJi(e),{ref:e.ref},n(e.props.children)):n(e)}var VJi={position:\"absolute\",width:\"1px\",height:\"1px\",padding:\"0\",margin:\"-1px\",overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",borderWidth:\"0\"};const Y_n=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(t3,{ref:n,className:Oi(\"rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50\",t),...e}));Y_n.displayName=t3.displayName;const U_n=ee.forwardRef(({className:t,...e},n)=\u003eK.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-border-b rf-px-3\",\"cmdk-input-wrapper\":\"\",children:[K.jsx(iWe,{className:\"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50\"}),K.jsx(t3.Input,{ref:n,className:Oi(\"rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400\",t),...e})]}));U_n.displayName=t3.Input.displayName;const K_n=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(t3.List,{ref:n,className:Oi(\"rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden rf-py-1\",t),...e}));K_n.displayName=t3.List.displayName;const Xqe=ee.forwardRef((t,e)=\u003eK.jsx(t3.Empty,{ref:e,className:\"rf-py-6 rf-text-center rf-text-sm\",...t}));Xqe.displayName=t3.Empty.displayName;const Nee=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(t3.Group,{ref:n,className:Oi(\"rf-overflow-hidden rf-px-1 rf-py-0 rf-text-zinc-950 [\u0026_[cmdk-group-heading]]:rf-px-2 [\u0026_[cmdk-group-heading]]:rf-py-1.5 [\u0026_[cmdk-group-heading]]:rf-text-xs [\u0026_[cmdk-group-heading]]:rf-font-medium [\u0026_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[\u0026_[cmdk-group-heading]]:rf-text-zinc-400\",t),...e}));Nee.displayName=t3.Group.displayName;const zJi=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(t3.Separator,{ref:n,className:Oi(\"rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800\",t),...e}));zJi.displayName=t3.Separator.displayName;const Ree=ee.forwardRef(({className:t,...e},n)=\u003eK.jsx(t3.Item,{ref:n,className:Oi(\"rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [\u0026_svg]:rf-pointer-events-none [\u0026_svg]:rf-size-4 [\u0026_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50\",t),...e}));Ree.displayName=t3.Item.displayName;var JJi=Object.defineProperty,ZP=(t,e)=\u003eJJi(t,\"name\",{value:e,configurable:!0}),Zqe=\"Popover\",[V_n,Gmr]=Nx(Zqe,[PP]),eXe=PP(),[WJi,tK]=V_n(Zqe),jJi=ZP(t=\u003e{const{__scopePopover:e,children:n,open:o,defaultOpen:i,onOpenChange:r,modal:s=!1}=t,a=eXe(e),A=ee.useRef(null),[c,l]=ee.useState(!1),[u,g]=DB({prop:o,defaultProp:i??!1,onChange:r,caller:Zqe});return K.jsx(CZ,{...a,children:K.jsx(WJi,{scope:e,contentId:t_(),triggerRef:A,open:u,onOpenChange:g,onOpenToggle:ee.useCallback(()=\u003eg(h=\u003e!h),[g]),hasCustomAnchor:c,onCustomAnchorAdd:ee.useCallback(()=\u003el(!0),[]),onCustomAnchorRemove:ee.useCallback(()=\u003el(!1),[]),modal:s,children:n})})},\"Popover\"),$Ji=\"PopoverTrigger\",qJi=ee.forwardRef(ZP(function(e,n){const{__scopePopover:o,...i}=e,r=tK($Ji,o),s=eXe(o),a=$A(n,r.triggerRef),A=K.jsx(Na.button,{type:\"button\",\"aria-haspopup\":\"dialog\",\"aria-expanded\":r.open,\"aria-controls\":r.open?r.contentId:void 0,\"data-state\":tXe(r.open),...i,ref:a,onClick:ar(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?A:K.jsx(Hme,{asChild:!0,...s,children:A})},\"PopoverTrigger\")),z_n=\"PopoverPortal\",[XJi,ZJi]=V_n(z_n,{forceMount:void 0}),eWi=ZP(t=\u003e{const{__scopePopover:e,forceMount:n,children:o,container:i}=t,r=tK(z_n,e);return K.jsx(XJi,{scope:e,forceMount:n,children:K.jsx(uE,{present:n||r.open,children:K.jsx(Gme,{asChild:!0,container:i,children:o})})})},\"PopoverPortal\"),Tee=\"PopoverContent\",tWi=ee.forwardRef(ZP(function(e,n){const o=ZJi(Tee,e.__scopePopover),{forceMount:i=o.forceMount,...r}=e,s=tK(Tee,e.__scopePopover);return K.jsx(uE,{present:i||s.open,children:s.modal?K.jsx(oWi,{...r,ref:n}):K.jsx(iWi,{...r,ref:n})})},\"PopoverContent\")),nWi=MB(\"PopoverContent.RemoveScroll\"),oWi=ee.forwardRef(ZP(function(e,n){const o=tK(Tee,e.__scopePopover),i=ee.useRef(null),r=$A(n,i),s=ee.useRef(!1);return ee.useEffect(()=\u003e{const a=i.current;if(a)return Kme(a)},[]),K.jsx(yZ,{as:nWi,allowPinchZoom:!0,children:K.jsx(J_n,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ar(e.onCloseAutoFocus,a=\u003e{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:ar(e.onPointerDownOutside,a=\u003e{const A=a.detail.originalEvent,c=A.button===0\u0026\u0026A.ctrlKey===!0,l=A.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ar(e.onFocusOutside,a=\u003ea.preventDefault(),{checkForDefaultPrevented:!1})})})},\"PopoverContentModal\")),iWi=ee.forwardRef(ZP(function(e,n){const o=tK(Tee,e.__scopePopover),i=ee.useRef(!1),r=ee.useRef(!1);return K.jsx(J_n,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=\u003e{e.onCloseAutoFocus?.(s),s.defaultPrevented||(i.current||o.triggerRef.current?.focus(),s.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:s=\u003e{e.onInteractOutside?.(s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type===\"pointerdown\"\u0026\u0026(r.current=!0));const a=s.target;o.triggerRef.current?.contains(a)\u0026\u0026s.preventDefault(),s.detail.originalEvent.type===\"focusin\"\u0026\u0026r.current\u0026\u0026s.preventDefault()}})},\"PopoverContentNonModal\")),J_n=ee.forwardRef(ZP(function(e,n){const{__scopePopover:o,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:A,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...g}=e,h=tK(Tee,o),d=eXe(o);return hU(),K.jsx(Sme,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:s,children:K.jsx(_Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:A,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=\u003eh.onOpenChange(!1),deferPointerDownOutside:!0,children:K.jsx(Ome,{\"data-state\":tXe(h.open),role:\"dialog\",id:h.contentId,...d,...g,ref:n,style:{...g.style,\"--radix-popover-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-popover-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-popover-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-popover-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-popover-trigger-height\":\"var(--radix-popper-anchor-height)\"}})})})},\"PopoverContentImpl\"));function tXe(t){return t?\"open\":\"closed\"}ZP(tXe,\"getState\");var rWi=jJi,sWi=qJi,aWi=eWi,W_n=tWi;const AWi=rWi,cWi=sWi,j_n=ee.forwardRef(({className:t,align:e=\"center\",sideOffset:n=4,...o},i)=\u003eK.jsx(aWi,{children:K.jsx(W_n,{ref:i,align:e,sideOffset:n,className:Oi(\"rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50\",t),...o})}));j_n.displayName=W_n.displayName;function $_n(t,e){const n=t.lastIndexOf(\".\"),o=e.lastIndexOf(\".\"),i=n\u003e0?t.substring(0,n):t,r=o\u003e0?e.substring(0,o):e;if(i!==r\u0026\u0026t.substring(n)===e.substring(o)){if(i.startsWith(r))return 1;if(r.startsWith(i))return-1}return t.localeCompare(e,void 0,{numeric:!0,sensitivity:\"base\"})}function lWi(t){const e=[],n=new Map;n.set(\"\",{name:\"\",path:\"\",type:\"folder\",children:e});for(const o of t){const i=o.split(\"/\");let r=\"\";for(let s=0;s\u003ci.length;s++){const a=i[s],A=r;if(r=r?`${r}/${a}`:a,!n.has(r)){const c=s===i.length-1,l={name:a,path:r,type:c?\"file\":\"folder\",children:c?void 0:[]};n.set(r,l);const u=n.get(A);u\u0026\u0026u.children\u0026\u0026u.children.push(l)}}}return e}function q_n(t,e){for(const n of t){if(n.path===e)return n;if(n.children){const o=q_n(n.children,e);if(o)return o}}return null}function uWi(t,e){let n;if(e?n=q_n(t,e):n={name:\"\",path:\"\",type:\"folder\",children:t},!n||!n.children)return{files:[],folders:[]};const o=n.children.filter(r=\u003er.type===\"file\"),i=n.children.filter(r=\u003er.type===\"folder\");return o.sort((r,s)=\u003e$_n(r.name,s.name)),i.sort((r,s)=\u003e$_n(r.name,s.name)),{files:o,folders:i}}const gWi=t=\u003e{const e=t.split(\"/\").pop()||\"\";return e.endsWith(\".py.tsx\")?e.slice(0,-4):e};function nXe(t){const e=t.lastIndexOf(\"/\");return e===-1?\"/\":t.substring(0,e)}function dWi({currentFile:t,files:e}){const[n,o]=ee.useState(!1),[i,r]=ee.useState(()=\u003e{if(typeof window\u003c\"u\"){const A=new URLSearchParams(window.location.search),c=new URLSearchParams(window.location.hash.slice(1)),l=A.get(\"file\")??c.get(\"file\");if(l\u0026\u0026e.includes(l)){const u=nXe(l);return u===\"/\"?null:u}}if(t\u0026\u0026e.includes(t)){const A=nXe(t);return A===\"/\"?null:A}return null});return ee.useEffect(()=\u003e{if(t\u0026\u0026!n\u0026\u0026e.includes(t)){const A=nXe(t);r(A===\"/\"?null:A)}},[t,n,e]),{currentFolder:i,navigateToFolder:A=\u003e{r(A),o(!0)},resetManualNavigation:()=\u003e{o(!1)}}}const oXe=t=\u003et.endsWith(\".tsx\")||t.endsWith(\".jsx\")?K.jsx(gbi,{className:\"rf-h-4 rf-w-4 rf-text-blue-500\"}):t.endsWith(\".md\")||t.endsWith(\".txt\")?K.jsx(pbi,{className:\"rf-h-4 rf-w-4 rf-text-gray-600\"}):K.jsx(mbi,{className:\"rf-h-4 rf-w-4 rf-text-gray-500\"}),hWi=t=\u003et.endsWith(\".tsx\")||$fe(t)||t.endsWith(\".jsx\"),pWi=t=\u003egWi(t),X_n=t=\u003et.substring(0,t.lastIndexOf(\"/\"))||\"/\",Z_n=({files:t,onFileChange:e,currentFile:n,fileFilter:o=hWi,getDisplayName:i=pWi,placeholder:r=\"Select file\",searchPlaceholder:s=\"Search for file\",emptyMessage:a=\"No files found in this directory.\",pinnedFiles:A=[],onToggleFavorite:c,recentlySavedFiles:l=[]})=\u003e{const[u,g]=ee.useState(!1),[h,d]=ee.useState(n),{currentFolder:p,navigateToFolder:m,resetManualNavigation:_}=dWi({currentFile:h,files:t}),[f,I]=ee.useState(0),[C,y]=ee.useState(\"\"),[x,E]=OO(\"runframe:recentlyViewed\",[]),[B,S]=OO(\"runframe:showRecents\",!1);ee.useEffect(()=\u003e{const ie=ne=\u003e{(ne.metaKey||ne.ctrlKey)\u0026\u0026ne.key===\"k\"\u0026\u0026(ne.preventDefault(),g(le=\u003e!le))};return window.addEventListener(\"keydown\",ie),()=\u003ewindow.removeEventListener(\"keydown\",ie)},[]);const Q=t.filter(o),w=ee.useRef(null);ee.useEffect(()=\u003e{const ie=()=\u003e{w.current\u0026\u0026(clearTimeout(w.current),w.current=null)};return d(n),n\u0026\u0026Q.includes(n)\u0026\u0026(ie(),w.current=setTimeout(()=\u003e{E(ne=\u003e{if(ne[0]===n)return ne;const le=ne.filter(ge=\u003ege!==n);return[n,...le].slice(0,10)})},500)),ie},[n,Q,E]);const M=lWi(Q),{files:k,folders:R}=uWi(M,p||\"\"),O=(()=\u003e{if(!C.trim())return{currentDirResults:[],globalResults:[]};const ie=C.toLowerCase(),le=Q.map(ue=\u003e{const fe=ue.split(\"/\").pop()||\"\";return{path:ue,fileName:fe}}).filter(ue=\u003eue.fileName.toLowerCase().includes(ie)||ue.path.toLowerCase().includes(ie)),ge=le.filter(ue=\u003ep?ue.path.substring(0,ue.path.lastIndexOf(\"/\"))===p:!ue.path.includes(\"/\")),_e=le.filter(ue=\u003ep?ue.path.substring(0,ue.path.lastIndexOf(\"/\"))!==p:ue.path.includes(\"/\"));return{currentDirResults:ge,globalResults:_e}})(),U=C.trim().length\u003e0,Y=ie=\u003e{m(ie),I(0)},W=ee.useCallback(()=\u003e{if(!p)return;const ie=p.lastIndexOf(\"/\"),ne=ie===-1?null:p.substring(0,ie);Y(ne)},[p,Y]);ee.useEffect(()=\u003e{if(!u)return;const ie=ne=\u003e{(ne.metaKey||ne.ctrlKey)\u0026\u0026ne.key===\"ArrowUp\"\u0026\u0026(ne.preventDefault(),W())};return window.addEventListener(\"keydown\",ie),()=\u003ewindow.removeEventListener(\"keydown\",ie)},[u,W]);const te=ee.useCallback((ie,ne,le=!1)=\u003e{if(d(ie),I(ne),g(!1),e(ie),le){const ge=ie.lastIndexOf(\"/\"),_e=ge===-1?null:ie.substring(0,ge);Y(_e)}},[e,Y]);ee.useEffect(()=\u003e{const ie=ne=\u003e{if((ne.metaKey||ne.ctrlKey)\u0026\u0026(ne.key===\"ArrowLeft\"||ne.key===\"ArrowRight\")){if(ne.preventDefault(),!n||k.length===0)return;const le=k.findIndex(ue=\u003eue.path===n);if(le===-1)return;let ge;ne.key===\"ArrowLeft\"?ge=le===0?k.length-1:le-1:ge=le===k.length-1?0:le+1;const _e=k[ge];_e\u0026\u0026te(_e.path,ge)}};return window.addEventListener(\"keydown\",ie),()=\u003ewindow.removeEventListener(\"keydown\",ie)},[n,k,te]),ee.useEffect(()=\u003e{if(k.length\u003e0){const ie=k.findIndex(ne=\u003ene.path===n);ie\u003e=0\u0026\u0026I(ie)}},[k,n]);const j=ee.useMemo(()=\u003e{const ie=l.filter(ge=\u003eQ.includes(ge)),ne=x.filter(ge=\u003eQ.includes(ge)),le=[];ie.length\u003e0\u0026\u0026le.push({path:ie[0],type:\"saved\"});for(const ge of ne){if(le.length\u003e=3)break;le.some(_e=\u003e_e.path===ge)||le.push({path:ge,type:\"viewed\"})}return le},[l,x,Q]),J=p??\"/\";J.length\u003e25\u0026\u0026\"\"+J.slice(-22);const oe=()=\u003e`rf-w-full rf-min-w-[600px] ${U?\"rf-max-w-[600px]\":\"rf-max-w-[1000px]\"}`;return K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-gap-1\",children:K.jsxs(AWi,{open:u,onOpenChange:ie=\u003e{g(ie),ie||(y(\"\"),_())},children:[K.jsx(cWi,{asChild:!0,children:K.jsxs(fA,{variant:\"outline\",role:\"combobox\",\"aria-expanded\":u,className:\"rf-w-fit rf-min-w-32 rf-max-w-100 rf-justify-center rf-items-center rf-gap-1 !rf-font-normal\",children:[K.jsx(\"span\",{className:\"rf-truncate rf-text-left\",children:h?i(h):r}),K.jsx(abi,{className:\"rf-opacity-50 rf-flex-shrink-0\"})]})}),K.jsx(j_n,{className:Oi(\"!rf-p-0 !rf-overflow-y-auto !rf-max-h-[80vh] !rf-z-[200]\",oe()),children:K.jsxs(Y_n,{shouldFilter:!1,children:[K.jsx(U_n,{placeholder:s,className:\"rf-h-9 rf-w-full\",value:C,onValueChange:y}),j.length\u003e0\u0026\u0026K.jsxs(\"div\",{className:\"rf-border-b rf-border-gray-200\",children:[K.jsxs(\"button\",{onClick:()=\u003eS(!B),className:\"rf-w-full rf-px-3 rf-py-2 rf-flex rf-items-center rf-justify-between rf-text-xs rf-text-slate-600 hover:rf-bg-slate-50 rf-bg-transparent rf-border-none rf-cursor-pointer\",children:[K.jsx(\"span\",{className:\"rf-font-medium\",children:\"Recent Files\"}),K.jsx(pZ,{className:Oi(\"rf-h-4 rf-w-4 rf-transition-transform\",!B\u0026\u0026\"-rf-rotate-90\")})]}),B\u0026\u0026K.jsx(\"div\",{className:\"rf-pb-1\",children:j.map((ie,ne)=\u003eK.jsxs(\"div\",{onClick:()=\u003ete(ie.path,ne,!0),className:Oi(\"rf-flex rf-items-center rf-px-3 rf-py-1.5 rf-cursor-pointer hover:rf-bg-slate-100\",ie.path===n\u0026\u0026\"rf-font-medium\"),children:[ie.type===\"saved\"?K.jsx(\"span\",{title:\"Recently saved\",children:K.jsx(Sbi,{className:\"rf-mr-2 rf-h-4 rf-w-4 rf-text-green-500\"})}):K.jsx(\"span\",{title:\"Recently viewed\",children:K.jsx(ubi,{className:\"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-500\"})}),K.jsx(\"span\",{className:\"rf-text-sm\",children:i(ie.path.split(\"/\").pop()||\"\")}),K.jsx(\"span\",{className:\"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]\",children:X_n(ie.path)}),K.jsx(CS,{className:Oi(\"rf-ml-auto rf-h-4 rf-w-4\",ie.path===n?\"rf-opacity-100\":\"rf-opacity-0\")})]},ie.path))})]}),K.jsxs(\"div\",{className:\"rf-px-3 rf-py-2 rf-bg-slate-50 rf-flex rf-items-center rf-justify-between rf-gap-2\",children:[K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-text-xs rf-text-slate-600 rf-min-w-0 rf-flex-1\",children:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-min-w-0\",children:[K.jsx(\"button\",{onClick:()=\u003eY(null),className:\"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-flex-shrink-0\",children:\"root\"}),p?.split(\"/\").filter(Boolean).map((ie,ne,le)=\u003e{const ge=le.slice(0,ne+1).join(\"/\");return K.jsxs(\"span\",{className:\"rf-flex rf-items-center rf-min-w-0\",children:[K.jsx(\"span\",{className:\"rf-mx-1 rf-flex-shrink-0\",children:\"/\"}),ne===le.length-1?K.jsx(\"span\",{className:\"rf-text-slate-800 rf-truncate rf-max-w-[200px]\",title:ie,children:ie}):K.jsx(\"button\",{onClick:()=\u003eY(ge),className:\"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-truncate rf-max-w-[150px]\",title:ie,children:ie})]},ge)})]})}),K.jsx(\"div\",{className:\"rf-flex rf-items-center rf-gap-2 rf-flex-shrink-0\",children:p\u0026\u0026K.jsxs(\"button\",{onClick:W,className:\"rf-flex rf-items-center rf-gap-1 rf-text-slate-600 hover:rf-text-slate-800 rf-bg-transparent rf-border-none rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-colors\",title:\"Go up one level\",children:[K.jsx(ibi,{className:\"rf-h-3 rf-w-3\"}),K.jsx(\"span\",{className:\"rf-text-xs rf-font-medium\",children:\"Up\"})]})})]}),K.jsx(K_n,{className:\"rf-overflow-visible rf-max-h-none\",children:U?K.jsx(K.Fragment,{children:O.currentDirResults.length===0\u0026\u0026O.globalResults.length===0?K.jsxs(Xqe,{children:['No files found matching \"',C,'\".']}):K.jsxs(K.Fragment,{children:[O.currentDirResults.length\u003e0\u0026\u0026K.jsx(Nee,{children:O.currentDirResults.map((ie,ne)=\u003eK.jsxs(Ree,{value:`search-current:${ie.path}`,onSelect:()=\u003e{d(ie.path),g(!1),e(ie.path)},className:Oi(ie.path===n\u0026\u0026\"rf-font-medium\",\"rf-group\"),children:[K.jsx(\"span\",{className:\"rf-mr-2\",children:oXe(ie.fileName)}),K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-w-full rf-min-w-0\",children:[K.jsx(\"span\",{className:\"rf-truncate rf-flex-1\",children:i(ie.fileName)}),K.jsx(\"span\",{className:\"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]\",children:p||\"/\"}),ie.path===n\u0026\u0026K.jsx(CS,{className:\"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0\"})]})]},ie.path))}),O.globalResults.length\u003e0\u0026\u0026K.jsx(Nee,{children:O.globalResults.map(ie=\u003eK.jsxs(Ree,{value:`search-global:${ie.path}`,onSelect:()=\u003e{d(ie.path),g(!1),e(ie.path)},className:Oi(ie.path===n\u0026\u0026\"rf-font-medium\",\"rf-group\"),children:[K.jsx(\"span\",{className:\"rf-mr-2\",children:oXe(ie.fileName)}),K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-w-full rf-min-w-0\",children:[K.jsx(\"span\",{className:\"rf-truncate rf-flex-1\",children:i(ie.fileName)}),K.jsx(\"span\",{className:\"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]\",children:X_n(ie.path)}),ie.path===n\u0026\u0026K.jsx(CS,{className:\"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0\"})]})]},ie.path))})]})}):K.jsxs(K.Fragment,{children:[K.jsx(Xqe,{children:a}),k.length\u003e0\u0026\u0026K.jsx(Nee,{children:k.map((ie,ne)=\u003eK.jsxs(Ree,{value:`current:${ie.path}`,onSelect:()=\u003ete(ie.path,ne),className:Oi(ie.path===n\u0026\u0026\"rf-font-medium\",\"rf-group\"),children:[K.jsx(\"span\",{className:\"rf-mr-2\",children:oXe(ie.name)}),i(ie.name),K.jsx(\"div\",{className:\"rf-ml-auto rf-flex rf-items-center rf-gap-1\",children:K.jsx(CS,{className:Oi(\"rf-h-4 rf-w-4\",ie.path===n?\"rf-opacity-100\":\"rf-opacity-0\")})})]},ie.path))}),R.length\u003e0\u0026\u0026K.jsx(Nee,{children:R.map(ie=\u003eK.jsxs(Ree,{value:`folder-${ie.path}`,onSelect:()=\u003eY(ie.path),className:\"rf-text-slate-600 hover:rf-text-slate-900\",children:[K.jsx(_bi,{className:\"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600\"}),ie.name,K.jsx(bT,{className:\"rf-ml-auto rf-h-4 rf-w-4\"})]},ie.path))}),k.length===0\u0026\u0026R.length===0\u0026\u0026K.jsx(\"div\",{className:\"rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm\",children:\"No files or folders in this directory\"})]})})]})})]})})},mWi=({files:t,onFileChange:e,currentFile:n})=\u003eK.jsx(Z_n,{files:t,onFileChange:e,currentFile:n,fileFilter:()=\u003e!0,placeholder:\"Select circuit\",searchPlaceholder:\"Search for circuit file\",emptyMessage:\"No circuit files found in this directory.\"}),efn=t=\u003et!==null\u0026\u0026![\"0\",\"false\",\"off\",\"no\"].includes(t.toLowerCase()),_Wi=({hash:t,search:e=\"\"})=\u003e{const n=new URLSearchParams(t.startsWith(\"#\")?t.slice(1):t),o=new URLSearchParams(e.startsWith(\"?\")?e.slice(1):e);return efn(n.get(\"gallery\"))||efn(o.get(\"gallery\"))},fWi=({hash:t,initialCircuitPath:e})=\u003e{const n=new URLSearchParams(t.startsWith(\"#\")?t.slice(1):t);return n.get(\"file\")??n.get(\"main_component\")??e??\"\"},IWi=({hash:t,filePath:e})=\u003e{const n=new URLSearchParams(t.startsWith(\"#\")?t.slice(1):t);if(n.get(\"file\")===e\u0026\u0026!n.has(\"gallery\")\u0026\u0026(!n.has(\"main_component\")||n.get(\"main_component\")===e))return t.startsWith(\"#\")?t:t?`#${t}`:\"\";n.delete(\"gallery\"),n.set(\"file\",e),n.has(\"main_component\")\u0026\u0026n.set(\"main_component\",e);const o=n.toString();return o?`#${o}`:\"\"},CWi=(t,e=!1)=\u003e{const[n,o]=ee.useState(()=\u003etypeof window\u003e\"u\"?t??\"\":fWi({hash:window.location.hash,initialCircuitPath:t})),[i,r]=ee.useState(()=\u003etypeof window\u003e\"u\"?e:e||_Wi({hash:window.location.hash,search:window.location.search})),s=ee.useCallback(l=\u003e{if(typeof window\u003e\"u\")return;const u=new URLSearchParams(window.location.hash.slice(1)),g=new URLSearchParams(window.location.search.slice(1));l?u.set(\"gallery\",\"true\"):(u.delete(\"gallery\"),g.delete(\"gallery\"));const h=g.toString(),d=u.toString();window.history.replaceState(null,\"\",`${window.location.pathname}${h?`?${h}`:\"\"}${d?`#${d}`:\"\"}`)},[]),a=ee.useCallback(()=\u003e{r(!0),s(!0)},[s]),A=ee.useCallback(()=\u003e{r(!1),s(!1)},[s]),c=ee.useCallback(l=\u003e{if(typeof window\u003e\"u\")return;const u=IWi({hash:window.location.hash,filePath:l}),g=new URLSearchParams(window.location.search.slice(1));g.delete(\"gallery\");const h=g.toString(),d=`${window.location.pathname}${h?`?${h}`:\"\"}${u}`;u===window.location.hash\u0026\u0026`${h?`?${h}`:\"\"}`===window.location.search||window.history.replaceState(null,\"\",d)},[]);return{currentCircuitJsonPath:n,setCurrentCircuitJsonPath:o,updateFileHash:c,isGalleryVisible:i,showGallery:a,hideGallery:A}},yWi=t=\u003e{const e=t.fileStaticAssetUrl,n=e.search(/[?#]/),o=n===-1?e:e.slice(0,n),i=n===-1?\"\":e.slice(n),r=o.includes(\"/\")?o.slice(0,o.lastIndexOf(\"/\")+1):\"\";return[\"3d.png\",\"pcb.png\",\"pcb.svg\",\"schematic.png\",\"schematic.svg\"].map(s=\u003e`${r}${s}${i}`)},tfn=t=\u003e(t.split(\"/\").pop()??t).replace(/(\\.board|\\.circuit)?\\.(tsx|jsx|json)$/i,\"\"),xWi=({fileRef:t})=\u003e{const e=yWi(t),[n,o]=ee.useState(0);return n\u003e=e.length?K.jsx(\"div\",{className:\"rf-flex rf-h-full rf-w-full rf-items-center rf-justify-center rf-bg-zinc-100 rf-text-zinc-400\",children:K.jsx(Ibi,{className:\"rf-h-8 rf-w-8\",\"aria-hidden\":\"true\"})}):K.jsx(\"img\",{src:e[n],alt:`Preview of ${tfn(t.filePath)}`,className:\"rf-h-full rf-w-full rf-object-contain rf-transition-transform rf-duration-200 group-hover:rf-scale-[1.03]\",loading:\"lazy\",onError:()=\u003eo(i=\u003ei+1)})},EWi=({files:t,projectName:e,onSelectFile:n,onClose:o})=\u003e(ee.useEffect(()=\u003e{const i=r=\u003e{r.key===\"Escape\"\u0026\u0026o()};return window.addEventListener(\"keydown\",i),()=\u003ewindow.removeEventListener(\"keydown\",i)},[o]),K.jsx(\"main\",{className:\"rf-h-full rf-w-full rf-overflow-y-auto rf-bg-zinc-50\",children:K.jsxs(\"div\",{className:\"rf-mx-auto rf-w-full rf-max-w-7xl rf-px-5 rf-py-8 sm:rf-px-8 sm:rf-py-10\",children:[K.jsxs(\"div\",{className:\"rf-mb-7 rf-flex rf-items-start rf-justify-between rf-gap-4\",children:[K.jsxs(\"div\",{children:[K.jsx(\"p\",{className:\"rf-mb-1 rf-text-xs rf-font-medium rf-uppercase rf-tracking-wider rf-text-zinc-500\",children:e??\"tscircuit project\"}),K.jsx(\"h1\",{className:\"rf-text-2xl rf-font-semibold rf-tracking-tight rf-text-zinc-950 sm:rf-text-3xl\",children:\"Circuit gallery\"}),K.jsxs(\"p\",{className:\"rf-mt-2 rf-text-sm rf-text-zinc-600\",children:[\"Explore \",t.length,\" \",t.length===1?\"board\":\"boards\",\". Select one to open its interactive preview.\"]})]}),K.jsxs(fA,{type:\"button\",variant:\"outline\",onClick:o,children:[K.jsx(obi,{className:\"rf-h-4 rf-w-4\"}),\"Back to circuit\"]})]}),K.jsx(\"div\",{className:\"rf-grid rf-grid-cols-1 rf-gap-5 sm:rf-grid-cols-2 lg:rf-grid-cols-3\",children:t.map(i=\u003eK.jsxs(\"button\",{type:\"button\",onClick:()=\u003en(i.filePath),className:\"group rf-overflow-hidden rf-rounded-xl rf-border rf-border-zinc-200 rf-bg-white rf-text-left rf-shadow-sm rf-transition-all hover:rf--translate-y-0.5 hover:rf-border-zinc-300 hover:rf-shadow-md focus-visible:rf-outline-none focus-visible:rf-ring-2 focus-visible:rf-ring-zinc-900 focus-visible:rf-ring-offset-2\",children:[K.jsx(\"div\",{className:\"rf-aspect-[4/3] rf-w-full rf-overflow-hidden rf-bg-white rf-p-3\",children:K.jsx(xWi,{fileRef:i})}),K.jsxs(\"div\",{className:\"rf-border-t rf-border-zinc-100 rf-px-4 rf-py-3\",children:[K.jsx(\"div\",{className:\"rf-truncate rf-text-sm rf-font-medium rf-text-zinc-900\",children:tfn(i.filePath)}),K.jsx(\"div\",{className:\"rf-mt-0.5 rf-truncate rf-text-xs rf-text-zinc-500\",children:i.filePath})]})]},i.filePath))})]})})),BWi=t=\u003et instanceof Error?t.message:\"An unknown error occurred\",bWi=t=\u003e{mee();const{currentCircuitJsonPath:e,setCurrentCircuitJsonPath:n,updateFileHash:o,isGalleryVisible:i,showGallery:r,hideGallery:s}=CWi(t.initialCircuitPath,t.defaultToGallery),[a,A]=ee.useState(null),[c,l]=ee.useState(!1),[u,g]=ee.useState({}),[h,d]=ee.useState(new Set),[p,m]=ee.useState(new Set),_=t.files,f=_.map(S=\u003eS.filePath),I=ee.useCallback(async S=\u003e{if(!S.fileStaticAssetUrl)throw new Error(`No fileStaticAssetUrl provided for ${S.filePath}`);const Q=await fetch(S.fileStaticAssetUrl);if(!Q.ok)throw new Error(`Failed to fetch ${S.filePath}: ${Q.statusText}`);return await Q.json()},[]),C=ee.useCallback(async S=\u003e{if(u[S]){A(u[S]),o(S),t.onCircuitJsonPathChange?.(S);return}if(p.has(S)){console.warn(`Skipping failed file: ${S}`),A(null);return}if(!h.has(S)){d(Q=\u003enew Set(Q).add(S)),l(!0),A(null);try{const Q=_.find(k=\u003ek.filePath===S);if(!Q)throw new Error(`File reference not found for ${S}`);const M=await(t.onFetchFile||I)(Q);g(k=\u003e({...k,[S]:M})),A(M),o(S),t.onCircuitJsonPathChange?.(S),m(k=\u003e{const R=new Set(k);return R.delete(S),R})}catch(Q){console.error(`Failed to load circuit JSON file ${S}:`,Q),m(w=\u003enew Set(w).add(S)),A(null)}finally{d(Q=\u003e{const w=new Set(Q);return w.delete(S),w}),l(!1)}}},[_,u,h,p,t.onFetchFile,t.onCircuitJsonPathChange,I,o]);ee.useEffect(()=\u003e{if(f.length===0||i)return;let S=e;(!S||!f.includes(S))\u0026\u0026(S=Ifn(f)??f[0],n(S)),S\u0026\u0026f.includes(S)\u0026\u0026C(S)},[e,i]);const y=ee.useCallback(S=\u003e{s(),n(S)},[s]),x=ee.useCallback(S=\u003e{m(Q=\u003e{const w=new Set(Q);return w.delete(S),w}),C(S)},[C]);if(f.length===0)return K.jsx(\"div\",{className:\"rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center\",children:K.jsxs(\"div\",{className:\"rf-text-center rf-p-8\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2\",children:\"No Circuit JSON Files Found\"}),K.jsx(\"p\",{className:\"rf-text-sm rf-text-gray-600\",children:\"Please provide circuit JSON files to view.\"})]})});if(i)return K.jsx(EWi,{files:_,projectName:t.projectName,onSelectFile:y,onClose:s});const E=f.length\u003e1?K.jsxs(K.Fragment,{children:[K.jsx(mWi,{currentFile:e,files:f,onFileChange:y}),K.jsx(fA,{type:\"button\",variant:\"outline\",size:\"icon\",onClick:r,\"aria-label\":`Browse all ${f.length} circuits as a gallery`,title:\"Open circuit gallery\",children:K.jsx(mln,{className:\"rf-h-4 rf-w-4\"})})]}):null,B=p.has(e);return K.jsx(bE,{fallbackRender:({error:S})=\u003eK.jsx(\"div\",{className:\"rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200\",children:K.jsxs(\"div\",{className:\"rf-p-4\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3\",children:\"Error loading Circuit JSON Preview\"}),K.jsx(\"p\",{className:\"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2\",children:BWi(S)})]})}),children:B?K.jsxs(\"div\",{className:\"rf-w-full rf-h-full rf-flex rf-flex-col\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200\",children:[(t.showFileMenu??!0)\u0026\u0026K.jsx(Yfe,{isWebEmbedded:!0,circuitJson:null,projectName:t.projectName}),f.length\u003e1\u0026\u0026K.jsx(\"div\",{className:\"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2\",children:E})]}),K.jsx(\"div\",{className:\"rf-flex-1 rf-flex rf-items-center rf-justify-center\",children:K.jsxs(\"div\",{className:\"rf-text-center rf-p-8\",children:[K.jsx(\"h3\",{className:\"rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2\",children:\"Failed to Load Circuit File\"}),K.jsxs(\"p\",{className:\"rf-text-sm rf-text-gray-600 rf-mb-4\",children:[\"Could not load: \",e]}),K.jsxs(\"div\",{className:\"rf-flex rf-flex-col rf-items-center rf-gap-2\",children:[K.jsx(\"button\",{onClick:()=\u003ex(e),className:\"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600\",children:\"Retry\"}),f.length\u003e1\u0026\u0026K.jsx(\"p\",{className:\"rf-text-xs rf-text-gray-500\",children:\"Or select a different file from the dropdown above\"})]})]})})]}):K.jsx(h_n,{circuitJson:a,defaultToFullScreen:t.defaultToFullScreen,showToggleFullScreen:t.showToggleFullScreen,showFileMenu:!1,isWebEmbedded:!1,projectName:t.projectName,defaultActiveTab:t.tabSelected,leftHeaderContent:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-justify-between rf-w-full\",children:[(t.showFileMenu??!0)\u0026\u0026K.jsx(Yfe,{isWebEmbedded:!0,circuitJson:a,projectName:t.projectName}),f.length\u003e1\u0026\u0026K.jsx(\"div\",{className:`rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2 ${c?\"rf-opacity-50\":\"\"}`,children:E})]})})})},SWi=()=\u003e{const t=md(e=\u003ee.fsMap);ee.useEffect(()=\u003e{if(!document||!t)return;const e=Array.from(t.keys()),n=Ifn(e),o=t.get(\"package.json\");try{if(o){const i=JSON.parse(o);if(i?.name){document.title=i.name;return}}}catch{}n\u0026\u0026(document.title=n)},[t])},nfn=(t,e,n)=\u003e{const o=t instanceof RegExp?ofn(t,n):t,i=e instanceof RegExp?ofn(e,n):e,r=o!==null\u0026\u0026i!=null\u0026\u0026QWi(o,i,n);return r\u0026\u0026{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+o.length,r[1]),post:n.slice(r[1]+i.length)}},ofn=(t,e)=\u003e{const n=e.match(t);return n?n[0]:null},QWi=(t,e,n)=\u003e{let o,i,r,s,a,A=n.indexOf(t),c=n.indexOf(e,A+1),l=A;if(A\u003e=0\u0026\u0026c\u003e0){if(t===e)return[A,c];for(o=[],r=n.length;l\u003e=0\u0026\u0026!a;){if(l===A)o.push(l),A=n.indexOf(t,l+1);else if(o.length===1){const u=o.pop();u!==void 0\u0026\u0026(a=[u,c])}else i=o.pop(),i!==void 0\u0026\u0026i\u003cr\u0026\u0026(r=i,s=c),c=n.indexOf(e,l+1);l=A\u003cc\u0026\u0026A\u003e=0?A:c}o.length\u0026\u0026s!==void 0\u0026\u0026(a=[r,s])}return a},ifn=\"\\0SLASH\"+Math.random()+\"\\0\",rfn=\"\\0OPEN\"+Math.random()+\"\\0\",iXe=\"\\0CLOSE\"+Math.random()+\"\\0\",sfn=\"\\0COMMA\"+Math.random()+\"\\0\",afn=\"\\0PERIOD\"+Math.random()+\"\\0\",vWi=new RegExp(ifn,\"g\"),wWi=new RegExp(rfn,\"g\"),PWi=new RegExp(iXe,\"g\"),MWi=new RegExp(sfn,\"g\"),DWi=new RegExp(afn,\"g\"),NWi=/\\\\\\\\/g,RWi=/\\\\{/g,TWi=/\\\\}/g,kWi=/\\\\,/g,FWi=/\\\\\\./g,LWi=1e5,HWi=4e6,OWi=1e3,GWi=1e3;function rXe(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function YWi(t){return t.replace(NWi,ifn).replace(RWi,rfn).replace(TWi,iXe).replace(kWi,sfn).replace(FWi,afn)}function UWi(t){return t.replace(vWi,\"\\\\\").replace(wWi,\"{\").replace(PWi,\"}\").replace(MWi,\",\").replace(DWi,\".\")}function sXe(t,e){for(let n=0;n\u003ce.length;n++)t.push(e[n])}function KWi(t){const e=[];let n=\"\";for(;;){const o=nfn(\"{\",\"}\",t);if(!o){const A=t.split(\",\");return A[0]=n+A[0],sXe(e,A),e}const{pre:i,body:r,post:s}=o,a=i.split(\",\");if(a[0]=n+a[0],a[a.length-1]+=\"{\"+r+\"}\",!s.length)return sXe(e,a),e;n=a.pop(),sXe(e,a),t=s}}function VWi(t,e={}){if(!t)return[];const{max:n=LWi,maxLength:o=HWi,maxDepth:i=OWi,maxRewrites:r=GWi}=e;return t.slice(0,2)===\"{}\"\u0026\u0026(t=\"\\\\{\\\\}\"+t.slice(2)),aXe(YWi(t),n,o,i,0,r,!0).map(UWi)}function zWi(t){return\"{\"+t+\"}\"}function JWi(t){return/^-?0\\d/.test(t)}function WWi(t,e){return t\u003c=e}function jWi(t,e){return t\u003e=e}function kee(t,e,n,o,i,r){const s=[];let a=0;for(let A=0;A\u003ct.length;A++)for(let c=0;c\u003cn.length;c++){if(s.length\u003e=o)return s;const l=t[A]+e+n[c];if(!(r\u0026\u0026!l)){if(a+l.length\u003ei)return s;s.push(l),a+=l.length}}return s}function $Wi(t,e,n,o){const i=t.split(/\\.\\./),r=[];if(i[0]===void 0||i[1]===void 0)return r;const s=rXe(i[0]),a=rXe(i[1]),A=Math.max(i[0].length,i[1].length);let c=i.length===3\u0026\u0026i[2]!==void 0?Math.max(Math.abs(rXe(i[2])),1):1,l=WWi;a\u003cs\u0026\u0026(c*=-1,l=jWi);const g=i.some(JWi);let h=0;for(let d=s;l(d,a)\u0026\u0026r.length\u003cn;d+=c){let p;if(e)p=String.fromCharCode(d),p===\"\\\\\"\u0026\u0026(p=\"\");else if(p=String(d),g){const m=A-p.length;if(m\u003e0){const _=new Array(m+1).join(\"0\");d\u003c0?p=\"-\"+_+p.slice(1):p=_+p}}if(h+p.length\u003eo)break;r.push(p),h+=p.length}return r}function aXe(t,e,n,o,i,r,s){if(i\u003eo)return[t];let a=[\"\"],A=0,c=!1,l=!0;for(;;){const u=nfn(\"{\",\"}\",t);if(!u)return kee(a,t,[\"\"],e,n,c);const g=u.pre;if(/\\$/.test(g)){if(a=kee(a,g+\"{\"+u.body+\"}\",[\"\"],e,n,c\u0026\u0026!u.post.length),l=!1,!u.post.length)break;t=u.post;continue}const h=/^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(u.body),d=/^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(u.body),p=h||d,m=u.body.indexOf(\",\")\u003e=0;if(!p\u0026\u0026!m){if(A\u003cr\u0026\u0026u.post.match(/,(?!,).*\\}/)){A++,t=u.pre+\"{\"+u.body+iXe+u.post,s=!0;continue}return kee(a,g+\"{\"+u.body+\"}\"+u.post,[\"\"],e,n,c)}l\u0026\u0026(c=s\u0026\u0026!p,l=!1);let _;if(p)_=$Wi(u.body,d,e,n);else{let f=KWi(u.body);if(f.length===1\u0026\u0026f[0]!==void 0\u0026\u0026(f=aXe(f[0],e,n,o,i+1,r,!1).map(zWi),f.length===1)){if(a=kee(a,g+f[0],[\"\"],e,n,c\u0026\u0026!u.post.length),!u.post.length)break;t=u.post;continue}let I=c\u0026\u0026!u.post.length\u0026\u0026!g;for(let y=0;I\u0026\u0026y\u003ca.length;y++)a[y]\u0026\u0026(I=!1);_=[];let C=0;e:for(let y=0;y\u003cf.length;y++){const x=aXe(f[y],e,n,o,i+1,r,!1);for(let E=0;E\u003cx.length;E++){const B=x[E];if(!(I\u0026\u0026!B)){if(_.length\u003e=e||C+B.length\u003en)break e;_.push(B),C+=B.length}}}}if(a=kee(a,g,_,e,n,c\u0026\u0026!u.post.length),!u.post.length)break;t=u.post}return a}const qWi=1024*64,Xfe=t=\u003e{if(typeof t!=\"string\")throw new TypeError(\"invalid pattern\");if(t.length\u003eqWi)throw new TypeError(\"pattern is too long\")},XWi={\"[:alnum:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\",!0],\"[:alpha:]\":[\"\\\\p{L}\\\\p{Nl}\",!0],\"[:ascii:]\":[\"\\\\x00-\\\\x7f\",!1],\"[:blank:]\":[\"\\\\p{Zs}\\\\t\",!0],\"[:cntrl:]\":[\"\\\\p{Cc}\",!0],\"[:digit:]\":[\"\\\\p{Nd}\",!0],\"[:graph:]\":[\"\\\\p{Z}\\\\p{C}\",!0,!0],\"[:lower:]\":[\"\\\\p{Ll}\",!0],\"[:print:]\":[\"\\\\p{C}\",!0],\"[:punct:]\":[\"\\\\p{P}\",!0],\"[:space:]\":[\"\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f\",!0],\"[:upper:]\":[\"\\\\p{Lu}\",!0],\"[:word:]\":[\"\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}\",!0],\"[:xdigit:]\":[\"A-Fa-f0-9\",!1]},Fee=t=\u003et.replace(/[[\\]\\\\-]/g,\"\\\\$\u0026\"),ZWi=t=\u003et.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$\u0026\"),Afn=t=\u003et.join(\"\"),eji=(t,e)=\u003e{const n=e;if(t.charAt(n)!==\"[\")throw new Error(\"not in a brace expression\");const o=[],i=[];let r=n+1,s=!1,a=!1,A=!1,c=!1,l=n,u=\"\";e:for(;r\u003ct.length;){const p=t.charAt(r);if((p===\"!\"||p===\"^\")\u0026\u0026r===n+1){c=!0,r++;continue}if(p===\"]\"\u0026\u0026s\u0026\u0026!A){l=r+1;break}if(s=!0,p===\"\\\\\"\u0026\u0026!A){A=!0,r++;continue}if(p===\"[\"\u0026\u0026!A){for(const[m,[_,f,I]]of Object.entries(XWi))if(t.startsWith(m,r)){if(u)return[\"$.\",!1,t.length-n,!0];r+=m.length,I?i.push(_):o.push(_),a=a||f;continue e}}if(A=!1,u){p\u003eu?o.push(Fee(u)+\"-\"+Fee(p)):p===u\u0026\u0026o.push(Fee(p)),u=\"\",r++;continue}if(t.startsWith(\"-]\",r+1)){o.push(Fee(p+\"-\")),r+=2;continue}if(t.startsWith(\"-\",r+1)){u=p,r+=2;continue}o.push(Fee(p)),r++}if(l\u003cr)return[\"\",!1,0,!1];if(!o.length\u0026\u0026!i.length)return[\"$.\",!1,t.length-n,!0];if(i.length===0\u0026\u0026o.length===1\u0026\u0026/^\\\\?.$/.test(o[0])\u0026\u0026!c){const p=o[0].length===2?o[0].slice(-1):o[0];return[ZWi(p),!1,l-n,!1]}const g=\"[\"+(c?\"^\":\"\")+Afn(o)+\"]\",h=\"[\"+(c?\"\":\"^\")+Afn(i)+\"]\";return[o.length\u0026\u0026i.length?\"(\"+g+\"|\"+h+\")\":o.length?g:h,a,l-n,!0]},Lee=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!0}={})=\u003en?e?t.replace(/\\[([^/\\\\])\\]/g,\"$1\"):t.replace(/((?!\\\\).|^)\\[([^/\\\\])\\]/g,\"$1$2\").replace(/\\\\([^/])/g,\"$1\"):e?t.replace(/\\[([^/\\\\{}])\\]/g,\"$1\"):t.replace(/((?!\\\\).|^)\\[([^/\\\\{}])\\]/g,\"$1$2\").replace(/\\\\([^/{}])/g,\"$1\");var n3;const tji=new Set([\"!\",\"?\",\"+\",\"*\",\"@\"]),AXe=t=\u003etji.has(t),cfn=t=\u003eAXe(t.type),nji=new Map([[\"!\",[\"@\"]],[\"?\",[\"?\",\"@\"]],[\"@\",[\"@\"]],[\"*\",[\"*\",\"+\",\"?\",\"@\"]],[\"+\",[\"+\",\"@\"]]]),oji=new Map([[\"!\",[\"?\"]],[\"@\",[\"?\"]],[\"+\",[\"?\",\"*\"]]]),iji=new Map([[\"!\",[\"?\",\"@\"]],[\"?\",[\"?\",\"@\"]],[\"@\",[\"?\",\"@\"]],[\"*\",[\"*\",\"+\",\"?\",\"@\"]],[\"+\",[\"+\",\"@\",\"?\",\"*\"]]]),lfn=new Map([[\"!\",new Map([[\"!\",\"@\"]])],[\"?\",new Map([[\"*\",\"*\"],[\"+\",\"*\"]])],[\"@\",new Map([[\"!\",\"!\"],[\"?\",\"?\"],[\"@\",\"@\"],[\"*\",\"*\"],[\"+\",\"+\"]])],[\"+\",new Map([[\"?\",\"*\"],[\"*\",\"*\"]])]]),rji=\"(?!(?:^|/)\\\\.\\\\.?(?:$|/))\",Zfe=\"(?!\\\\.)\",sji=new Set([\"[\",\".\"]),aji=new Set([\"..\",\".\"]),Aji=new Set(\"().*{}+?[]^$\\\\!\"),cji=t=\u003et.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$\u0026\"),cXe=\"[^/]\",ufn=cXe+\"*?\",gfn=cXe+\"+?\";let lji=0;class lXe{type;#o;#n;#i=!1;#t=[];#e;#s;#r;#c=!1;#a;#l;#g=!1;id=++lji;get depth(){return(this.#e?.depth??-1)+1}[Symbol.for(\"nodejs.util.inspect.custom\")](){return{\"@@type\":\"AST\",id:this.id,type:this.type,root:this.#o.id,parent:this.#e?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,n,o={}){this.type=e,e\u0026\u0026(this.#n=!0),this.#e=n,this.#o=this.#e?this.#e.#o:this,this.#a=this.#o===this?o:this.#o.#a,this.#r=this.#o===this?[]:this.#o.#r,e===\"!\"\u0026\u0026!this.#o.#c\u0026\u0026this.#r.push(this),this.#s=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const e of this.#t)if(typeof e!=\"string\"\u0026\u0026(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+\"(\"+this.#t.map(e=\u003eString(e)).join(\"|\")+\")\":this.#l=this.#t.map(e=\u003eString(e)).join(\"\")}#d(){if(this!==this.#o)throw new Error(\"should only call on root\");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#r.pop();){if(e.type!==\"!\")continue;let n=e,o=n.#e;for(;o;){for(let i=n.#s+1;!o.type\u0026\u0026i\u003co.#t.length;i++)for(const r of e.#t){if(typeof r==\"string\")throw new Error(\"string part in extglob AST??\");r.copyIn(o.#t[i])}n=o,o=n.#e}}return this}push(...e){for(const n of e)if(n!==\"\"){if(typeof n!=\"string\"\u0026\u0026!(n instanceof n3\u0026\u0026n.#e===this))throw new Error(\"invalid part: \"+n);this.#t.push(n)}}toJSON(){const e=this.type===null?this.#t.slice().map(n=\u003etypeof n==\"string\"?n:n.toJSON()):[this.type,...this.#t.map(n=\u003en.toJSON())];return this.isStart()\u0026\u0026!this.type\u0026\u0026e.unshift([]),this.isEnd()\u0026\u0026(this===this.#o||this.#o.#c\u0026\u0026this.#e?.type===\"!\")\u0026\u0026e.push({}),e}isStart(){if(this.#o===this)return!0;if(!this.#e?.isStart())return!1;if(this.#s===0)return!0;const e=this.#e;for(let n=0;n\u003cthis.#s;n++){const o=e.#t[n];if(!(o instanceof n3\u0026\u0026o.type===\"!\"))return!1}return!0}isEnd(){if(this.#o===this||this.#e?.type===\"!\")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const e=this.#e?this.#e.#t.length:0;return this.#s===e-1}copyIn(e){typeof e==\"string\"?this.push(e):this.push(e.clone(this))}clone(e){const n=new n3(this.type,e);for(const o of this.#t)n.copyIn(o);return n}static#A(e,n,o,i,r){const s=i.maxExtglobRecursion??2;let a=!1,A=!1,c=-1,l=!1;if(n.type===null){let p=o,m=\"\";for(;p\u003ce.length;){const _=e.charAt(p++);if(a||_===\"\\\\\"){a=!a,m+=_;continue}if(A){p===c+1?(_===\"^\"||_===\"!\")\u0026\u0026(l=!0):_===\"]\"\u0026\u0026!(p===c+2\u0026\u0026l)\u0026\u0026(A=!1),m+=_;continue}else if(_===\"[\"){A=!0,c=p,l=!1,m+=_;continue}if(!i.noext\u0026\u0026AXe(_)\u0026\u0026e.charAt(p)===\"(\"\u0026\u0026r\u003c=s){n.push(m),m=\"\";const I=new n3(_,n);p=n3.#A(e,I,p,i,r+1),n.push(I);continue}m+=_}return n.push(m),p}let u=o+1,g=new n3(null,n);const h=[];let d=\"\";for(;u\u003ce.length;){const p=e.charAt(u++);if(a||p===\"\\\\\"){a=!a,d+=p;continue}if(A){u===c+1?(p===\"^\"||p===\"!\")\u0026\u0026(l=!0):p===\"]\"\u0026\u0026!(u===c+2\u0026\u0026l)\u0026\u0026(A=!1),d+=p;continue}else if(p===\"[\"){A=!0,c=u,l=!1,d+=p;continue}if(!i.noext\u0026\u0026AXe(p)\u0026\u0026e.charAt(u)===\"(\"\u0026\u0026(r\u003c=s||n\u0026\u0026n.#u(p))){const _=n\u0026\u0026n.#u(p)?0:1;g.push(d),d=\"\";const f=new n3(p,g);g.push(f),u=n3.#A(e,f,u,i,r+_);continue}if(p===\"|\"){g.push(d),d=\"\",h.push(g),g=new n3(null,n);continue}if(p===\")\")return d===\"\"\u0026\u0026n.#t.length===0\u0026\u0026(n.#g=!0),g.push(d),d=\"\",n.push(...h,g),u;d+=p}return n.type=null,n.#n=void 0,n.#t=[e.substring(o-1)],u}#m(e){return this.#_(e,oji)}#_(e,n=nji){if(!e||typeof e!=\"object\"||e.type!==null||e.#t.length!==1||this.type===null)return!1;const o=e.#t[0];return!o||typeof o!=\"object\"||o.type===null?!1:this.#u(o.type,n)}#u(e,n=iji){return!!n.get(this.type)?.includes(e)}#h(e,n){const o=e.#t[0],i=new n3(null,o,this.options);i.#t.push(\"\"),o.push(i),this.#p(e,n)}#p(e,n){const o=e.#t[0];this.#t.splice(n,1,...o.#t);for(const i of o.#t)typeof i==\"object\"\u0026\u0026(i.#e=this);this.#l=void 0}#C(e){return!!lfn.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=\"object\"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;const n=e.#t[0];return!n||typeof n!=\"object\"||n.type===null?!1:this.#C(n.type)}#x(e){const n=lfn.get(this.type),o=e.#t[0],i=n?.get(o.type);if(!i)return!1;this.#t=o.#t;for(const r of this.#t)typeof r==\"object\"\u0026\u0026(r.#e=this);this.type=i,this.#l=void 0,this.#g=!1}static fromGlob(e,n={}){const o=new n3(null,void 0,n);return n3.#A(e,o,0,n,0),o}toMMPattern(){if(this!==this.#o)return this.#o.toMMPattern();const e=this.toString(),[n,o,i,r]=this.toRegExpSource();if(!(i||this.#n||this.#a.nocase\u0026\u0026!this.#a.nocaseMagicOnly\u0026\u0026e.toUpperCase()!==e.toLowerCase()))return o;const a=(this.#a.nocase?\"i\":\"\")+(r?\"u\":\"\");return Object.assign(new RegExp(`^${n} dist/standalone.min.js - muse/esp32-eink-display - tscircuit ,a),{_src:n,_glob:e})}get options(){return this.#a}toRegExpSource(e){const n=e??!!this.#a.dot;if(this.#o===this\u0026\u0026(this.#f(),this.#d()),!cfn(this)){const A=this.isStart()\u0026\u0026this.isEnd()\u0026\u0026!this.#t.some(h=\u003etypeof h!=\"string\"),c=this.#t.map(h=\u003e{const[d,p,m,_]=typeof h==\"string\"?n3.#E(h,this.#n,A):h.toRegExpSource(e);return this.#n=this.#n||m,this.#i=this.#i||_,d}).join(\"\");let l=\"\";if(this.isStart()\u0026\u0026typeof this.#t[0]==\"string\"\u0026\u0026!(this.#t.length===1\u0026\u0026aji.has(this.#t[0]))){const d=sji,p=n\u0026\u0026d.has(c.charAt(0))||c.startsWith(\"\\\\.\")\u0026\u0026d.has(c.charAt(2))||c.startsWith(\"\\\\.\\\\.\")\u0026\u0026d.has(c.charAt(4)),m=!n\u0026\u0026!e\u0026\u0026d.has(c.charAt(0));l=p?rji:m?Zfe:\"\"}let u=\"\";return this.isEnd()\u0026\u0026this.#o.#c\u0026\u0026this.#e?.type===\"!\"\u0026\u0026(u=\"(?:$|\\\\/)\"),[l+c+u,Lee(c),this.#n=!!this.#n,this.#i]}const o=this.type===\"*\"||this.type===\"+\",i=this.type===\"!\"?\"(?:(?!(?:\":\"(?:\";let r=this.#I(n);if(this.isStart()\u0026\u0026this.isEnd()\u0026\u0026!r\u0026\u0026this.type!==\"!\"){const A=this.toString(),c=this;return c.#t=[A],c.type=null,c.#n=void 0,[A,Lee(this.toString()),!1,!1]}let s=!o||e||n||!Zfe?\"\":this.#I(!0);s===r\u0026\u0026(s=\"\"),s\u0026\u0026(r=`(?:${r})(?:${s})*?`);let a=\"\";if(this.type===\"!\"\u0026\u0026this.#g)a=(this.isStart()\u0026\u0026!n?Zfe:\"\")+gfn;else{const A=this.type===\"!\"?\"))\"+(this.isStart()\u0026\u0026!n\u0026\u0026!e?Zfe:\"\")+ufn+\")\":this.type===\"@\"?\")\":this.type===\"?\"?\")?\":this.type===\"+\"\u0026\u0026s?\")\":this.type===\"*\"\u0026\u0026s?\")?\":`)${this.type}`;a=i+r+A}return[a,Lee(r),this.#n=!!this.#n,this.#i]}#f(){if(cfn(this)){let e=0,n=!1;do{n=!0;for(let o=0;o\u003cthis.#t.length;o++){const i=this.#t[o];typeof i==\"object\"\u0026\u0026(i.#f(),this.#_(i)?(n=!1,this.#p(i,o)):this.#m(i)?(n=!1,this.#h(i,o)):this.#y(i)\u0026\u0026(n=!1,this.#x(i)))}}while(!n\u0026\u0026++e\u003c10)}else for(const e of this.#t)typeof e==\"object\"\u0026\u0026e.#f();this.#l=void 0}#I(e){return this.#t.map(n=\u003e{if(typeof n==\"string\")throw new Error(\"string type in extglob ast??\");const[o,i,r,s]=n.toRegExpSource(e);return this.#i=this.#i||s,o}).filter(n=\u003e!(this.isStart()\u0026\u0026this.isEnd())||!!n).join(\"|\")}static#E(e,n,o=!1){let i=!1,r=\"\",s=!1,a=!1;for(let A=0;A\u003ce.length;A++){const c=e.charAt(A);if(i){i=!1,r+=(Aji.has(c)?\"\\\\\":\"\")+c;continue}if(c===\"*\"){if(a)continue;a=!0,r+=o\u0026\u0026/^[*]+$/.test(e)?gfn:ufn,n=!0;continue}else a=!1;if(c===\"\\\\\"){A===e.length-1?r+=\"\\\\\\\\\":i=!0;continue}if(c===\"[\"){const[l,u,g,h]=eji(e,A);if(g){r+=l,s=s||u,A+=g-1,n=n||h;continue}}if(c===\"?\"){r+=cXe,n=!0;continue}r+=cji(c)}return[r,Lee(e),!!n,s]}}n3=lXe;const uji=(t,{windowsPathsNoEscape:e=!1,magicalBraces:n=!1}={})=\u003en?e?t.replace(/[?*()[\\]{}]/g,\"[$\u0026]\"):t.replace(/[?*()[\\]\\\\{}]/g,\"\\\\$\u0026\"):e?t.replace(/[?*()[\\]]/g,\"[$\u0026]\"):t.replace(/[?*()[\\]\\\\]/g,\"\\\\$\u0026\");var nK={env:{}};const d2=(t,e,n={})=\u003e(Xfe(e),!n.nocomment\u0026\u0026e.charAt(0)===\"#\"?!1:new Hee(e,n).match(t)),gji=/^\\*+([^+@!?*[(]*)$/,dji=t=\u003ee=\u003e!e.startsWith(\".\")\u0026\u0026e.endsWith(t),hji=t=\u003ee=\u003ee.endsWith(t),pji=t=\u003e(t=t.toLowerCase(),e=\u003e!e.startsWith(\".\")\u0026\u0026e.toLowerCase().endsWith(t)),mji=t=\u003e(t=t.toLowerCase(),e=\u003ee.toLowerCase().endsWith(t)),_ji=/^\\*+\\.\\*+$/,fji=t=\u003e!t.startsWith(\".\")\u0026\u0026t.includes(\".\"),Iji=t=\u003et!==\".\"\u0026\u0026t!==\"..\"\u0026\u0026t.includes(\".\"),Cji=/^\\.\\*+$/,yji=t=\u003et!==\".\"\u0026\u0026t!==\"..\"\u0026\u0026t.startsWith(\".\"),xji=/^\\*+$/,Eji=t=\u003et.length!==0\u0026\u0026!t.startsWith(\".\"),Bji=t=\u003et.length!==0\u0026\u0026t!==\".\"\u0026\u0026t!==\"..\",bji=/^\\?+([^+@!?*[(]*)?$/,Sji=([t,e=\"\"])=\u003e{const n=dfn([t]);return e?(e=e.toLowerCase(),o=\u003en(o)\u0026\u0026o.toLowerCase().endsWith(e)):n},Qji=([t,e=\"\"])=\u003e{const n=hfn([t]);return e?(e=e.toLowerCase(),o=\u003en(o)\u0026\u0026o.toLowerCase().endsWith(e)):n},vji=([t,e=\"\"])=\u003e{const n=hfn([t]);return e?o=\u003en(o)\u0026\u0026o.endsWith(e):n},wji=([t,e=\"\"])=\u003e{const n=dfn([t]);return e?o=\u003en(o)\u0026\u0026o.endsWith(e):n},dfn=([t])=\u003e{const e=t.length;return n=\u003en.length===e\u0026\u0026!n.startsWith(\".\")},hfn=([t])=\u003e{const e=t.length;return n=\u003en.length===e\u0026\u0026n!==\".\"\u0026\u0026n!==\"..\"},pfn=typeof nK==\"object\"\u0026\u0026nK?typeof nK.env==\"object\"\u0026\u0026nK.env\u0026\u0026nK.env.__MINIMATCH_TESTING_PLATFORM__||nK.platform:\"posix\",mfn={win32:{sep:\"\\\\\"},posix:{sep:\"/\"}},Pji=pfn===\"win32\"?mfn.win32.sep:mfn.posix.sep;d2.sep=Pji;const kC=Symbol(\"globstar **\");d2.GLOBSTAR=kC;const Mji=\"[^/]\"+\"*?\",Dji=\"(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?\",Nji=\"(?:(?!(?:\\\\/|^)\\\\.).)*?\",Rji=(t,e={})=\u003en=\u003ed2(n,t,e);d2.filter=Rji;const x4=(t,e={})=\u003eObject.assign({},t,e),Tji=t=\u003e{if(!t||typeof t!=\"object\"||!Object.keys(t).length)return d2;const e=d2;return Object.assign((o,i,r={})=\u003ee(o,i,x4(t,r)),{Minimatch:class extends e.Minimatch{constructor(i,r={}){super(i,x4(t,r))}static defaults(i){return e.defaults(x4(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,r,s={}){super(i,r,x4(t,s))}static fromGlob(i,r={}){return e.AST.fromGlob(i,x4(t,r))}},unescape:(o,i={})=\u003ee.unescape(o,x4(t,i)),escape:(o,i={})=\u003ee.escape(o,x4(t,i)),filter:(o,i={})=\u003ee.filter(o,x4(t,i)),defaults:o=\u003ee.defaults(x4(t,o)),makeRe:(o,i={})=\u003ee.makeRe(o,x4(t,i)),braceExpand:(o,i={})=\u003ee.braceExpand(o,x4(t,i)),match:(o,i,r={})=\u003ee.match(o,i,x4(t,r)),sep:e.sep,GLOBSTAR:kC})};d2.defaults=Tji;const _fn=(t,e={})=\u003e(Xfe(t),e.nobrace||!/\\{(?:(?!\\{).)*\\}/.test(t)?[t]:VWi(t,{max:e.braceExpandMax}));d2.braceExpand=_fn;const kji=(t,e={})=\u003enew Hee(t,e).makeRe();d2.makeRe=kji;const Fji=(t,e,n={})=\u003e{const o=new Hee(e,n);return t=t.filter(i=\u003eo.match(i)),o.options.nonull\u0026\u0026!t.length\u0026\u0026t.push(e),t};d2.match=Fji;const ffn=/[?*]|[+@!]\\(.*?\\)|\\[|\\]/,Lji=t=\u003et.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$\u0026\");class Hee{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,n={}){Xfe(e),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=e,this.platform=n.platform||pfn,this.isWindows=this.platform===\"win32\";const o=\"allowWindowsEscape\";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[o]===!1,this.windowsPathsNoEscape\u0026\u0026(this.pattern=this.pattern.replace(/\\\\/g,\"/\")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows\u0026\u0026this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces\u0026\u0026this.set.length\u003e1)return!0;for(const e of this.set)for(const n of e)if(typeof n!=\"string\")return!0;return!1}debug(...e){}make(){const e=this.pattern,n=this.options;if(!n.nocomment\u0026\u0026e.charAt(0)===\"#\"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug\u0026\u0026(this.debug=(...r)=\u003econsole.error(...r)),this.debug(this.pattern,this.globSet);const o=this.globSet.map(r=\u003ethis.slashSplit(r));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,s,a)=\u003e{if(this.isWindows\u0026\u0026this.windowsNoMagicRoot){const A=r[0]===\"\"\u0026\u0026r[1]===\"\"\u0026\u0026(r[2]===\"?\"||!ffn.test(r[2]))\u0026\u0026!ffn.test(r[3]),c=/^[a-z]:/i.test(r[0]);if(A)return[...r.slice(0,4),...r.slice(4).map(l=\u003ethis.parse(l))];if(c)return[r[0],...r.slice(1).map(l=\u003ethis.parse(l))]}return r.map(A=\u003ethis.parse(A))});if(this.debug(this.pattern,i),this.set=i.filter(r=\u003er.indexOf(!1)===-1),this.isWindows)for(let r=0;r\u003cthis.set.length;r++){const s=this.set[r];s[0]===\"\"\u0026\u0026s[1]===\"\"\u0026\u0026this.globParts[r][2]===\"?\"\u0026\u0026typeof s[3]==\"string\"\u0026\u0026/^[a-z]:$/i.test(s[3])\u0026\u0026(s[2]=\"?\")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(const o of e)for(let i=0;i\u003co.length;i++)o[i]===\"**\"\u0026\u0026(o[i]=\"*\");const{optimizationLevel:n=1}=this.options;return n\u003e=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n\u003e=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=\u003e{let o=-1;for(;(o=n.indexOf(\"**\",o+1))!==-1;){let i=o;for(;n[i+1]===\"**\";)i++;i!==o\u0026\u0026n.splice(o,i-o)}return n})}levelOneOptimize(e){return e.map(n=\u003e(n=n.reduce((o,i)=\u003e{const r=o[o.length-1];return i===\"**\"\u0026\u0026r===\"**\"?o:i===\"..\"\u0026\u0026r\u0026\u0026r!==\"..\"\u0026\u0026r!==\".\"\u0026\u0026r!==\"**\"?(o.pop(),o):(o.push(i),o)},[]),n.length===0?[\"\"]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i\u003ce.length-1;i++){const r=e[i];i===1\u0026\u0026r===\"\"\u0026\u0026e[0]===\"\"||(r===\".\"||r===\"\")\u0026\u0026(n=!0,e.splice(i,1),i--)}e[0]===\".\"\u0026\u0026e.length===2\u0026\u0026(e[1]===\".\"||e[1]===\"\")\u0026\u0026(n=!0,e.pop())}let o=0;for(;(o=e.indexOf(\"..\",o+1))!==-1;){const i=e[o-1];i\u0026\u0026i!==\".\"\u0026\u0026i!==\"..\"\u0026\u0026i!==\"**\"\u0026\u0026!(this.isWindows\u0026\u0026/^[a-z]:$/i.test(i))\u0026\u0026(n=!0,e.splice(o-1,2),o-=2)}}while(n);return e.length===0?[\"\"]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let o of e){let i=-1;for(;(i=o.indexOf(\"**\",i+1))!==-1;){let s=i;for(;o[s+1]===\"**\";)s++;s\u003ei\u0026\u0026o.splice(i+1,s-i);let a=o[i+1];const A=o[i+2],c=o[i+3];if(a!==\"..\"||!A||A===\".\"||A===\"..\"||!c||c===\".\"||c===\"..\")continue;n=!0,o.splice(i,1);const l=o.slice(0);l[i]=\"**\",e.push(l),i--}if(!this.preserveMultipleSlashes){for(let s=1;s\u003co.length-1;s++){const a=o[s];s===1\u0026\u0026a===\"\"\u0026\u0026o[0]===\"\"||(a===\".\"||a===\"\")\u0026\u0026(n=!0,o.splice(s,1),s--)}o[0]===\".\"\u0026\u0026o.length===2\u0026\u0026(o[1]===\".\"||o[1]===\"\")\u0026\u0026(n=!0,o.pop())}let r=0;for(;(r=o.indexOf(\"..\",r+1))!==-1;){const s=o[r-1];if(s\u0026\u0026s!==\".\"\u0026\u0026s!==\"..\"\u0026\u0026s!==\"**\"){n=!0;const A=r===1\u0026\u0026o[r+1]===\"**\"?[\".\"]:[];o.splice(r-1,2,...A),o.length===0\u0026\u0026o.push(\"\"),r-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n\u003ce.length-1;n++)for(let o=n+1;o\u003ce.length;o++){const i=this.partsMatch(e[n],e[o],!this.preserveMultipleSlashes);if(i){e[n]=[],e[o]=i;break}}return e.filter(n=\u003en.length)}partsMatch(e,n,o=!1){let i=0,r=0,s=[],a=\"\";for(;i\u003ce.length\u0026\u0026r\u003cn.length;)if(e[i]===n[r])s.push(a===\"b\"?n[r]:e[i]),i++,r++;else if(o\u0026\u0026e[i]===\"**\"\u0026\u0026n[r]===e[i+1])s.push(e[i]),i++;else if(o\u0026\u0026n[r]===\"**\"\u0026\u0026e[i]===n[r+1])s.push(n[r]),r++;else if(e[i]===\"*\"\u0026\u0026n[r]\u0026\u0026(this.options.dot||!n[r].startsWith(\".\"))\u0026\u0026n[r]!==\"**\"){if(a===\"b\")return!1;a=\"a\",s.push(e[i]),i++,r++}else if(n[r]===\"*\"\u0026\u0026e[i]\u0026\u0026(this.options.dot||!e[i].startsWith(\".\"))\u0026\u0026e[i]!==\"**\"){if(a===\"a\")return!1;a=\"b\",s.push(n[r]),i++,r++}else return!1;return e.length===n.length\u0026\u0026s}parseNegate(){if(this.nonegate)return;const e=this.pattern;let n=!1,o=0;for(let i=0;i\u003ce.length\u0026\u0026e.charAt(i)===\"!\";i++)n=!n,o++;o\u0026\u0026(this.pattern=e.slice(o)),this.negate=n}matchOne(e,n,o=!1){let i=0,r=0;if(this.isWindows){const a=typeof e[0]==\"string\"\u0026\u0026/^[a-z]:$/i.test(e[0]),A=!a\u0026\u0026e[0]===\"\"\u0026\u0026e[1]===\"\"\u0026\u0026e[2]===\"?\"\u0026\u0026/^[a-z]:$/i.test(e[3]),c=typeof n[0]==\"string\"\u0026\u0026/^[a-z]:$/i.test(n[0]),l=!c\u0026\u0026n[0]===\"\"\u0026\u0026n[1]===\"\"\u0026\u0026n[2]===\"?\"\u0026\u0026typeof n[3]==\"string\"\u0026\u0026/^[a-z]:$/i.test(n[3]),u=A?3:a?0:void 0,g=l?3:c?0:void 0;if(typeof u==\"number\"\u0026\u0026typeof g==\"number\"){const[h,d]=[e[u],n[g]];h.toLowerCase()===d.toLowerCase()\u0026\u0026(n[g]=h,r=g,i=u)}}const{optimizationLevel:s=1}=this.options;return s\u003e=2\u0026\u0026(e=this.levelTwoFileOptimize(e)),n.includes(kC)?this.#o(e,n,o,i,r):this.#i(e,n,o,i,r)}#o(e,n,o,i,r){const s=n.indexOf(kC,r),a=n.lastIndexOf(kC),[A,c,l]=o?[n.slice(r,s),n.slice(s+1),[]]:[n.slice(r,s),n.slice(s+1,a),n.slice(a+1)];if(A.length){const f=e.slice(i,i+A.length);if(!this.#i(f,A,o,0,0))return!1;i+=A.length,r+=A.length}let u=0;if(l.length){if(l.length+i\u003ee.length)return!1;let f=e.length-l.length;if(this.#i(e,l,o,f,0))u=l.length;else{if(e[e.length-1]!==\"\"||i+l.length===e.length||(f--,!this.#i(e,l,o,f,0)))return!1;u=l.length+1}}if(!c.length){let f=!!u;for(let I=i;I\u003ce.length-u;I++){const C=String(e[I]);if(f=!0,C===\".\"||C===\"..\"||!this.options.dot\u0026\u0026C.startsWith(\".\"))return!1}return o||f}const g=[[[],0]];let h=g[0],d=0;const p=[0];for(const f of c)f===kC?(p.push(d),h=[[],0],g.push(h)):(h[0].push(f),d++);let m=g.length-1;const _=e.length-u;for(const f of g)f[1]=_-(p[m--]+f[0].length);return!!this.#n(e,g,i,0,o,0,!!u)}#n(e,n,o,i,r,s,a){const A=n[i];if(!A){for(let u=o;u\u003ce.length;u++){a=!0;const g=e[u];if(g===\".\"||g===\"..\"||!this.options.dot\u0026\u0026g.startsWith(\".\"))return!1}return a}const[c,l]=A;for(;o\u003c=l;){if(this.#i(e.slice(0,o+c.length),c,r,o,0)\u0026\u0026s\u003cthis.maxGlobstarRecursion){const h=this.#n(e,n,o+c.length,i+1,r,s+1,a);if(h!==!1)return h}const g=e[o];if(g===\".\"||g===\"..\"||!this.options.dot\u0026\u0026g.startsWith(\".\"))return!1;o++}return r||null}#i(e,n,o,i,r){let s,a,A,c;for(s=i,a=r,c=e.length,A=n.length;s\u003cc\u0026\u0026a\u003cA;s++,a++){this.debug(\"matchOne loop\");let l=n[a],u=e[s];if(this.debug(n,l,u),l===!1||l===kC)return!1;let g;if(typeof l==\"string\"?(g=u===l,this.debug(\"string match\",l,u,g)):(g=l.test(u),this.debug(\"pattern match\",l,u,g)),!g)return!1}if(s===c\u0026\u0026a===A)return!0;if(s===c)return o;if(a===A)return s===c-1\u0026\u0026e[s]===\"\";throw new Error(\"wtf?\")}braceExpand(){return _fn(this.pattern,this.options)}parse(e){Xfe(e);const n=this.options;if(e===\"**\")return kC;if(e===\"\")return\"\";let o,i=null;(o=e.match(xji))?i=n.dot?Bji:Eji:(o=e.match(gji))?i=(n.nocase?n.dot?mji:pji:n.dot?hji:dji)(o[1]):(o=e.match(bji))?i=(n.nocase?n.dot?Qji:Sji:n.dot?vji:wji)(o):(o=e.match(_ji))?i=n.dot?Iji:fji:(o=e.match(Cji))\u0026\u0026(i=yji);const r=lXe.fromGlob(e,this.options).toMMPattern();return i\u0026\u0026typeof r==\"object\"\u0026\u0026Reflect.defineProperty(r,\"test\",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const n=this.options,o=n.noglobstar?Mji:n.dot?Dji:Nji,i=new Set(n.nocase?[\"i\"]:[]);let r=e.map(A=\u003e{const c=A.map(u=\u003e{if(u instanceof RegExp)for(const g of u.flags.split(\"\"))i.add(g);return typeof u==\"string\"?Lji(u):u===kC?kC:u._src});c.forEach((u,g)=\u003e{const h=c[g+1],d=c[g-1];u!==kC||d===kC||(d===void 0?h!==void 0\u0026\u0026h!==kC?c[g+1]=\"(?:\\\\/|\"+o+\"\\\\/)?\"+h:c[g]=o:h===void 0?c[g-1]=d+\"(?:\\\\/|\\\\/\"+o+\")?\":h!==kC\u0026\u0026(c[g-1]=d+\"(?:\\\\/|\\\\/\"+o+\"\\\\/)\"+h,c[g+1]=kC))});const l=c.filter(u=\u003eu!==kC);if(this.partial\u0026\u0026l.length\u003e=1){const u=[];for(let g=1;g\u003c=l.length;g++)u.push(l.slice(0,g).join(\"/\"));return\"(?:\"+u.join(\"|\")+\")\"}return l.join(\"/\")}).join(\"|\");const[s,a]=e.length\u003e1?[\"(?:\",\")\"]:[\"\",\"\"];r=\"^\"+s+r+a+\"$\",this.partial\u0026\u0026(r=\"^(?:\\\\/|\"+s+r.slice(1,-1)+a+\")$\"),this.negate\u0026\u0026(r=\"^(?!\"+r+\").+$\");try{this.regexp=new RegExp(r,[...i].join(\"\"))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(\"/\"):this.isWindows\u0026\u0026/^\\/\\/[^/]+/.test(e)?[\"\",...e.split(/\\/+/)]:e.split(/\\/+/)}match(e,n=this.partial){if(this.debug(\"match\",e,this.pattern),this.comment)return!1;if(this.empty)return e===\"\";if(e===\"/\"\u0026\u0026n)return!0;const o=this.options;this.isWindows\u0026\u0026(e=e.split(\"\\\\\").join(\"/\"));const i=this.slashSplit(e);this.debug(this.pattern,\"split\",i);const r=this.set;this.debug(this.pattern,\"set\",r);let s=i[i.length-1];if(!s)for(let a=i.length-2;!s\u0026\u0026a\u003e=0;a--)s=i[a];for(const a of r){let A=i;if(o.matchBase\u0026\u0026a.length===1\u0026\u0026(A=[s]),this.matchOne(A,a,n))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(e){return d2.defaults(e).Minimatch}}d2.AST=lXe,d2.Minimatch=Hee,d2.escape=uji,d2.unescape=Lee;const Hji=t=\u003e(t.endsWith(\".tsx\")||t.endsWith(\".ts\")||t.endsWith(\".jsx\")||t.endsWith(\".js\")||$fe(t))\u0026\u0026!t.endsWith(\".d.ts\"),Oji=t=\u003e{if(!t)return null;try{const e=JSON.parse(t);return LDn.parse(e)}catch(e){return console.warn(\"Failed to parse tscircuit.config.json\",e),null}},Gji=(t,e)=\u003e{const o=Oji(e)?.includeBoardFiles?.filter(Boolean);if(o\u0026\u0026o.length\u003e0){const i=o.map(r=\u003enew Hee(r,{dot:!0}));return t.filter(r=\u003ei.some(s=\u003es.match(r)))}return t.filter(Hji)},uXe=vc(\"run-frame:RunFrameWithApi\"),Yji=()=\u003e{const e=!!md(o=\u003eo.error),n=e?\"Dev server disconnected\":\"Dev server connected\";return K.jsx(Fqe,{children:K.jsxs(Lqe,{children:[K.jsx(Hqe,{asChild:!0,children:K.jsx(\"button\",{type:\"button\",\"aria-label\":n,className:\"rf-inline-flex rf-items-center rf-justify-center rf-p-2 rf-rounded-full rf-outline-none\",children:K.jsx(\"span\",{className:Oi(\"rf-inline-flex rf-size-2 rf-rounded-full rf-flex-shrink-0\",e?\"rf-bg-red-600\":\"rf-bg-green-600 rf-opacity-50\"),\"aria-hidden\":\"true\"})})}),K.jsx(Kfe,{side:\"right\",children:n})]})})},Ifn=t=\u003et.find(e=\u003ee.includes(\"entrypoint.\"))??t.find(e=\u003ee.includes(\"index.\"))??t.find(e=\u003ee.includes(\"main.\"))??t.find(e=\u003ee.endsWith(\".tsx\")),Uji=t=\u003et.find(e=\u003ee.includes(\"manual-edits.\"))??t.find(e=\u003ee.includes(\"manual-edit.\"))??t.find(e=\u003ee.endsWith(\".json\")),Cfn=t=\u003e{const{apiBaseUrl:e,leftHeaderContent:n}=t;ee.useEffect(()=\u003e{t.debug\u0026\u0026vc.enable(\"run-frame*\")},[t.debug]);const o=md(k=\u003ek.startPolling),i=md(k=\u003ek.stopPolling),r=md(k=\u003ek.setCurrentMainComponentPath),s=md(k=\u003ek.pushEvent),a=zFo(),A=md(k=\u003ek.fsMap),c=md(k=\u003ek.recentlySavedFiles),l=ee.useMemo(()=\u003eArray.from(A.keys()),[A]),u=ee.useMemo(()=\u003e{const k=A.get(\"tscircuit.config.json\");return typeof k==\"string\"?k:void 0},[A]),g=ee.useMemo(()=\u003eGji(l,u),[l,u]),h=md(k=\u003ek.circuitJson),[d,p]=ee.useState(()=\u003etypeof window\u003e\"u\"?t.initialMainComponentPath??\"\":new URLSearchParams(window.location.hash.slice(1)).get(\"file\")??t.initialMainComponentPath??\"\"),[m,_]=OO(\"runframe:favorites\",[]),f=!a,I=ee.useCallback(k=\u003e{_(R=\u003eR.includes(k)?R.filter(F=\u003eF!==k):[...R,k])},[_]),C=t.fileFilter??aJi,y=ee.useMemo(()=\u003eg.filter(C),[g,C]);ee.useEffect(()=\u003e{if(d\u0026\u0026(y.includes(d)||g.includes(d)))return;if(d){const U=d.includes(\"/\")?d.substring(0,d.lastIndexOf(\"/\")):\"\",Y=y.find(W=\u003e(W.includes(\"/\")?W.substring(0,W.lastIndexOf(\"/\")):\"\")===U);if(Y){p(Y);return}}const k=window?.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH,R=[t.initialMainComponentPath,k].filter(U=\u003e!!U);for(const U of R)if(y.includes(U)){p(U);return}const O=(y.length\u003e0?y:g)[0];O\u0026\u0026p(O)},[y,g,t.initialMainComponentPath,d]);const x=ee.useCallback(k=\u003e{if(typeof window\u003e\"u\")return;const R=new URLSearchParams(window.location.hash.slice(1));if(R.get(\"file\")===k)return;R.set(\"file\",k);const F=R.toString(),O=`${window.location.pathname}${window.location.search}${F.length\u003e0?`#${F}`:\"\"}`;window.history.replaceState(null,\"\",O)},[]);ee.useEffect(()=\u003e{d\u0026\u0026(x(d),t.onMainComponentPathChange?.(d),r(d))},[d,t.onMainComponentPathChange,x,r]),SWi();const{editEventsForRender:E,pushEditEvent:B,markRenderStarted:S,markRenderComplete:Q}=VFo();ee.useEffect(()=\u003e{e\u0026\u0026(window.TSCIRCUIT_FILESERVER_API_BASE_URL=e)},[e]),ee.useEffect(()=\u003e(o(),()=\u003ei()),[o,i]);const w=ee.useMemo(()=\u003eString(d).length\u003e0?{mainComponentPath:d}:{},[d]),M=ee.useCallback(async k=\u003e{try{await s({event_type:\"RUN_COMPLETED\",initiator:\"runframe\",...k})}catch(R){uXe(\"Failed to push RUN_COMPLETED event\",R)}},[s]);return K.jsx(P_n,{fsMap:A,showFileMenu:t.showFileMenu,shouldLoadLatestEval:t.shouldLoadLatestEval,onChangeShouldLoadLatestEval:t.onChangeShouldLoadLatestEval,isCli:t.isCli,schematicSvgOptions:t.schematicSvgOptions,isLoadingFiles:f,evalVersion:t.evalVersion,forceLatestEvalVersion:t.forceLatestEvalVersion,evalWebWorkerBlobUrl:t.evalWebWorkerBlobUrl??t.workerBlobUrl,platformConfig:t.platformConfig,enableFetchProxy:t.enableFetchProxy,leftHeaderContent:K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-justify-between rf-w-full\",children:[K.jsxs(\"div\",{className:\"rf-flex rf-items-center rf-gap-2\",children:[t.leftHeaderContent,K.jsx(Yji,{})]}),t.showFilesSwitch\u0026\u0026K.jsx(\"div\",{className:\"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2\",children:K.jsx(Z_n,{currentFile:d,files:y,onFileChange:k=\u003e{typeof A.get(k)==\"string\"\u0026\u0026p(k)},pinnedFiles:m,onToggleFavorite:I,fileFilter:C,recentlySavedFiles:c})})]}),defaultToFullScreen:t.defaultToFullScreen,showToggleFullScreen:t.showToggleFullScreen,onInitialRender:()=\u003e{uXe(\"onInitialRender / markRenderStarted\"),S()},onRenderFinished:()=\u003e{uXe(\"onRenderFinished / markRenderComplete\"),Q()},onRunCompleted:M,editEvents:E,onEditEvent:k=\u003e{B(k),fetch(`${QC}/events/create`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({event_type:\"USER_CREATED_MANUAL_EDIT\",...k})});const R=Uji(Array.from(A.keys()))??\"manual-edits.json\",F=A.get(R),O=JSON.parse(F??\"{}\");VRt({circuitJson:h,editEvents:[k],manualEditsFile:O}),fetch(`${QC}/files/upsert`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({file_path:R,text_content:JSON.stringify(O),initiator:\"runframe\"})})},onLoginRequired:t.onLoginRequired,easyEdaProxyConfig:{proxyEndpointUrl:`${QC}/proxy`},...w})},Kji=()=\u003enew Promise(t=\u003e{document.readyState===\"loading\"?document.addEventListener(\"DOMContentLoaded\",()=\u003et()):t()}),Vji=()=\u003e{const t=window.location.hash.slice(1),n=new URLSearchParams(t).get(\"tab\")?.toLowerCase()?.trim();return n\u0026\u0026[\"pcb\",\"schematic\",\"cad\"].includes(n)?n:\"pcb\"},zji=()=\u003e{const t=document.getElementById(\"root\");if(t)return t;const e=document.createElement(\"div\");return e.id=\"root\",e.style.height=\"100vh\",document.body.appendChild(e),e},Jji=async()=\u003e{const t=Array.from(document.querySelectorAll(\"script[type='tscircuit-tsx']\")),e=new Map;return await Promise.all(t.map(async(n,o)=\u003e{const i=n.dataset.path||n.getAttribute(\"data-file-path\")||`script${o?o+1:\"\"}.tsx`;if(n.src){const s=await(await fetch(n.src)).text();e.set(i,s)}else e.set(i,n.textContent||\"\")})),{fsMap:e}},yfn=\"\u003c--INJECT_TSCIRCUIT_EVAL_WEB_WORKER_BLOB_URL--\u003e\",gXe={evalWebWorkerBlobUrl:yfn.includes(\"\u003c--\")?void 0:yfn,enableFetchProxy:\"\u003c--INJECT_ENABLE_FETCH_PROXY--\u003e\".includes(\"\u003c--\")?void 0:!0};(async()=\u003e{await Kji();const t=H4n.createRoot(zji()),e=window.TSCIRCUIT_RUNFRAME_STATIC_FILE_LIST,n=window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH,o=window.TSCIRCUIT_PACKAGE_NAME;if(Array.isArray(e)){const i=Vji();t.render(K.jsx(bWi,{files:e,initialCircuitPath:n,tabSelected:i,projectName:o}))}else if(window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI)t.render(K.jsx(yJi,{...gXe}));else{const{fsMap:i}=await Jji();i.size\u003e0?t.render(K.jsx(P_n,{...gXe,fsMap:i})):t.render(K.jsx(Cfn,{...gXe}))}})();const xfn=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:\"Module\"}));var Wji=0,o8=class{_nodeId;hasExplicitNodeId;_sourceLocation;_dirty=!1;_parent;_revision=0;constructor(t={}){this.hasExplicitNodeId=t.nodeId!==void 0,this._nodeId=t.nodeId??Efn(t.sourceLocation,this.constructor.name)??`altium-node-${(++Wji).toString(36)}`,this._sourceLocation=t.sourceLocation}get document(){let t=this;for(;t.parent;)t=t.parent;return t}get nodeId(){return this._nodeId}get isDirty(){return this._dirty}get parent(){return this._parent}get revision(){return this._revision}get sourceLocation(){return this._sourceLocation}setParent(t){return this._parent=t,this}setSourceLocation(t){return this._sourceLocation=t,this.hasExplicitNodeId||(this._nodeId=Efn(t,this.constructor.name)??this._nodeId),this}adoptChildren(t){for(const e of t)e.setParent(this)}markDirty(){this._dirty=!0,this._revision++,this.parent?.markDirty()}clearDirty(t=!1){if(this._dirty=!1,t)for(const e of this.getChildren())e.clearDirty(!0)}*walk(t=!0){t\u0026\u0026(yield this);for(const e of this.getChildren())yield*e.walk(!0)}visit(t){const e=(n,o,i)=\u003e{if(t(n,{depth:i,parent:o})!==!1)for(const s of n.getChildren())e(s,n,i+1)};e(this,this.parent,0)}findAll(t,e=!0){return[...this.walk(e)].filter(t)}deepEquals(t){if(this.type!==t.type||this.getString()!==t.getString())return!1;const e=this.getChildren(),n=t.getChildren();return e.length===n.length\u0026\u0026e.every((o,i)=\u003e{const r=n[i];return r!==void 0\u0026\u0026o.deepEquals(r)})}getStructuralHash(){let t=2166136261;const e=`${this.type}\\0${this.getString()}`;for(let n=0;n\u003ce.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t\u003e\u003e\u003e0).toString(16).padStart(8,\"0\")}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,text:this.getString(),children:this.getChildren().map(t=\u003et.toJSON())}}};function Efn(t,e){if(!t)return;const n=t.streamPath!==void 0?[t.streamPath,t.recordIndex??\"\",t.fieldIndex??\"\",t.byteOffset??\"\"].join(\":\"):t.startOffset!==void 0?`text:${t.startOffset}`:t.byteOffset!==void 0?`byte:${t.byteOffset}`:void 0;return n===void 0?void 0:`${n}:${e}`}var ek=class extends Error{code;constructor(t,e=\"ALTIUM_ERROR\",n){super(t,n),this.name=new.target.name,this.code=e}},eM=class extends ek{excerpt;fieldName;location;recordKind;constructor(t,e={}){super(t,\"ALTIUM_SYNTAX\",{cause:e.cause}),this.excerpt=e.excerpt,this.fieldName=e.fieldName,this.location=e.location,this.recordKind=e.recordKind}},yI=class extends ek{constructor(t,e){super(t,\"ALTIUM_FORMAT_DETECTION\",e)}},aA=class extends ek{byteOffset;constructor(t,e={}){super(t,\"ALTIUM_CORRUPT_CONTAINER\",{cause:e.cause}),this.byteOffset=e.byteOffset}},jji=class extends ek{constructor(t,e){super(t,\"ALTIUM_UNSUPPORTED_VERSION\",e)}},dXe=class extends ek{constructor(t,e){super(t,\"ALTIUM_UNSUPPORTED_FEATURE\",e)}},Yg=class extends ek{constructor(t,e){super(t,\"ALTIUM_SERIALIZATION\",e)}},hh=class extends ek{byteOffset;constructor(t,e,n){super(t,\"ALTIUM_TRUNCATED_RECORD\",n),this.byteOffset=e}},$ji=class extends o8{type=\"embedded-model\";index;record;stream;constructor(t){super({sourceLocation:t.stream.sourceLocation}),this.index=t.index,this.record=t.record,this.stream=t.stream}get compressedSize(){return this.stream.metadata.size}get isCompressedDataLoaded(){return this.stream.isContentLoaded}getCompressedBytes(){return this.stream.content.slice()}async getDecompressedBytes(t={}){return qji(this.stream.content,t)}getChildren(){return[this.record,this.stream]}getString(){return this.record.getString()}};async function qji(t,e={}){const n=e.maximumOutputSize??67108864;if(!Number.isSafeInteger(n)||n\u003c=0)throw new RangeError(\"maximumOutputSize must be a positive safe integer number of bytes\");const o=[];let i=0;try{const a=new Lce(c=\u003e{if(i+=c.byteLength,i\u003en)throw new aA(`Embedded model expands beyond the ${n}-byte limit`);o.push(c)}),A=64*1024;for(let c=0;c\u003ct.byteLength;){const l=Math.min(c+A,t.byteLength);a.push(t.subarray(c,l),l===t.byteLength),c=l}}catch(a){throw a instanceof aA?a:new aA(`Embedded model zlib decompression failed: ${a instanceof Error?a.message:String(a)}`)}const r=new Uint8Array(i);let s=0;for(const a of o)r.set(a,s),s+=a.byteLength;return r}function xI(t){if(!Number.isFinite(t))return t;const e=(t%360+360)%360;return Object.is(e,-0)?0:e}function hXe(t,e,n=1e-9){return Math.abs(t.x-e.x)\u003c=n\u0026\u0026Math.abs(t.y-e.y)\u003c=n}function Xji(t){if(t.length===0)return;let e=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const r of t)!Number.isFinite(r.x)||!Number.isFinite(r.y)||(e=Math.min(e,r.x),n=Math.min(n,r.y),o=Math.max(o,r.x),i=Math.max(i,r.y));return Number.isFinite(e)?{minX:e,minY:n,maxX:o,maxY:i}:void 0}function Zji(t){if(t.length\u003c3)return 0;let e=0;for(let n=0;n\u003ct.length;n++){const o=t[n],i=t[(n+1)%t.length];!o||!i||(e+=o.x*i.y-i.x*o.y)}return e/2}function e$i(t){const e=Zji(t);return Math.abs(e)\u003c=Number.EPSILON?\"degenerate\":e\u003c0?\"clockwise\":\"counterclockwise\"}var pXe=class extends o8{terminator;constructor(t={}){super(t),this.terminator=t.terminator??\"\"}},a9=class extends o8{type=\"field\";_key;_value;constructor(t){super(t),Bfn(t.key),bfn(t.value??\"\"),this._key=t.key,this._value=t.value??\"\"}get key(){return this._key}set key(t){Bfn(t),t!==this._key\u0026\u0026(this._key=t,this.markDirty())}get value(){return this._value}set value(t){bfn(t),t!==this._value\u0026\u0026(this._value=t,this.markDirty())}getChildren(){return[]}getString(){return`${this.key}=${this.value}`}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,key:this.key,value:this.value}}};function Bfn(t){if(t.length===0||/[=|\\r\\n]/u.test(t))throw new Error(`Invalid Altium field key: ${JSON.stringify(t)}`)}function bfn(t){if(/[|\\r\\n]/u.test(t))throw new Error(`Altium field values cannot contain record delimiters: ${JSON.stringify(t)}`)}var t$i={cm:1e4/25.4,in:1e3,inch:1e3,inches:1e3,mil:1,mils:1,mm:1e3/25.4},n$i=/^([+-]?(?:\\d+\\.\\d*|\\d+|\\.\\d+)(?:e[+-]?\\d+)?)([a-z]+)?$/iu,Oee=class S4n{unit;value;#o;constructor(e){if(!Number.isFinite(e.value))throw new RangeError(\"Altium measurement value must be finite\");this.value=e.value,this.unit=e.unit,this.#o=e.raw??`${r$i(e.value)}${e.unit===void 0?\"\":e.unit}`}static parse(e){const n=n$i.exec(e.trim());if(!n?.[1])return;const o=Number(n[1]);if(Number.isFinite(o))return new S4n({raw:e,unit:n[2],value:o})}get normalizedUnit(){return this.unit?.toLowerCase()}get raw(){return this.#o}toMils(){return this.normalizedUnit===void 0?this.value:this.value*(t$i[this.normalizedUnit]??1)}toMillimeters(){return this.toMils()*.0254}to(e){const n=this.toMils();return e===\"mil\"?n:e===\"mm\"?n*.0254:e===\"cm\"?n*.00254:n/1e3}equals(e,n=0){return Math.abs(this.toMils()-e.toMils())\u003c=n}toString(){return this.raw}toJSON(){return{raw:this.raw,unit:this.unit,value:this.value}}};function oK(t){return t===void 0?void 0:Oee.parse(t)}function Gee(t){return oK(t)?.toMils()}function o$i(t,e=\"mil\"){if(t instanceof Oee)return t;if(typeof t==\"string\"){const n=Oee.parse(t);if(!n)throw new TypeError(`Invalid Altium measurement ${JSON.stringify(t)}`);return n}return typeof t==\"number\"?new Oee({unit:e,value:t}):new Oee(t)}function i$i(t,e=\"mil\"){return o$i(t,e).toString()}function r$i(t){return Object.is(t,-0)?\"-0\":String(t)}var Ol=class extends pXe{type=\"record\";items;_originalBinaryPayload;constructor(t={}){super(t),this.items=t.items??[],this._originalBinaryPayload=t.originalBinaryPayload?.slice(),this.adoptChildren(this.items)}get originalBinaryPayload(){return this._originalBinaryPayload?.slice()}setOriginalBinaryPayload(t){return this._originalBinaryPayload=t?.slice(),this}getAltiumMeasurement(t){return oK(this.getCaseInsensitive(t))}get recordKind(){return this.get(\"RECORD\")}get fields(){return this.items.filter(t=\u003et instanceof a9)}get(t){return this.fields.find(e=\u003ee.key===t)?.value}getCaseInsensitive(t){const e=t.toUpperCase();return this.fields.find(n=\u003en.key.toUpperCase()===e)?.value}getDecoded(t){const e=this.getCaseInsensitive(`%UTF8%${t}`);return e===void 0?this.getCaseInsensitive(t):A$i(e)}getAll(t){return this.fields.filter(e=\u003ee.key===t).map(e=\u003ee.value)}getFirstField(t){return this.fields.find(e=\u003ee.key===t)}getLastField(t){return this.fields.findLast(e=\u003ee.key===t)}getAllFields(t){return this.fields.filter(e=\u003ee.key===t)}getBoolean(t){const e=this.getCaseInsensitive(t)?.toUpperCase();if(e===\"TRUE\"||e===\"T\")return!0;if(e===\"FALSE\"||e===\"F\")return!1}getNumber(t){const e=this.getCaseInsensitive(t);if(!(e===void 0||!s$i(e)))return Number(e)}getMeasurement(t){const e=this.getCaseInsensitive(t);if(e===void 0)return;const n=/^\\s*([+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?)\\s*([a-z]+)?\\s*$/iu.exec(e);if(!n?.[1])return;const o=n[2];return o===void 0?{value:Number(n[1])}:{value:Number(n[1]),unit:o}}set(t,e){const n=this.fields.find(o=\u003eo.key===t);if(n)n.value=e;else{const o=new a9({key:t,value:e}).setParent(this);this.items.push(o),this.markDirty()}return this}setMeasurement(t,e,n=\"mil\"){return this.set(t,i$i(e,n))}setPoint(t,e,n=\"mil\"){return this.setMeasurement(t.x,e.x,n),this.setMeasurement(t.y,e.y,n),this}setSize(t,e,n=\"mil\"){return this.setMeasurement(t.width,e.width,n),this.setMeasurement(t.height,e.height,n),this}setAngle(t,e){if(!Number.isFinite(e))throw new RangeError(\"Altium angles must be finite\");return this.set(t,String(xI(e)))}insertField(t,e,n={}){const o=new a9({key:t,value:e}).setParent(this);let i=n.index;if(i===void 0\u0026\u0026n.beforeKey!==void 0\u0026\u0026(i=this.items.findIndex(s=\u003es instanceof a9\u0026\u0026s.key===n.beforeKey)),i===void 0\u0026\u0026n.afterKey!==void 0){const s=this.items.findLastIndex(a=\u003ea instanceof a9\u0026\u0026a.key===n.afterKey);i=s\u003c0?this.items.length:s+1}const r=i===void 0?this.items.length:Math.min(Math.max(i,0),this.items.length);return this.items.splice(r,0,o),this.markDirty(),o}replaceFieldOccurrence(t,e,n){if(!Number.isInteger(e)||e\u003c0)return!1;const o=this.getAllFields(t)[e];return o?(o.value=n,!0):!1}delete(t){const e=this.items.length;this.items=this.items.filter(o=\u003e!(o instanceof a9\u0026\u0026o.key===t));const n=e-this.items.length;return n\u003e0\u0026\u0026this.markDirty(),n}getChildren(){return[...this.items]}getString(){return`|${this.items.map(t=\u003et.getString()).join(\"|\")}`}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,recordKind:this.recordKind,originalBinaryPayloadLength:this._originalBinaryPayload?.byteLength,fields:this.fields.map(t=\u003e({key:t.key,value:t.value})),items:this.items.map(t=\u003et.toJSON())}}};function s$i(t){return/^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?$/iu.test(t.trim())}var a$i=new Map([[\"€\",128],[\"‚\",130],[\"ƒ\",131],[\"„\",132],[\"…\",133],[\"†\",134],[\"‡\",135],[\"ˆ\",136],[\"‰\",137],[\"Š\",138],[\"‹\",139],[\"Œ\",140],[\"Ž\",142],[\"‘\",145],[\"’\",146],[\"“\",147],[\"”\",148],[\"•\",149],[\"–\",150],[\"—\",151],[\"˜\",152],[\"™\",153],[\"š\",154],[\"›\",155],[\"œ\",156],[\"ž\",158],[\"Ÿ\",159]]);function A$i(t){const e=[];for(const n of t){const o=a$i.get(n);if(o!==void 0){e.push(o);continue}const i=n.codePointAt(0);if(i===void 0||i\u003e255)return t;e.push(i)}try{return new TextDecoder(\"utf-8\",{fatal:!0}).decode(Uint8Array.from(e))}catch{return t}}function tc(t,...e){for(const n of e){const o=Gee(t.getCaseInsensitive(n));if(o!==void 0)return o}}function qh(t,e,n){const o=tc(t,...e),i=tc(t,...n);return o===void 0||i===void 0?void 0:{x:o,y:i}}function Yee(t,e,n){const o=tc(t,...e),i=tc(t,...n);return o===void 0||i===void 0?void 0:{width:o,height:i}}function pi(t,...e){for(const n of e){const o=t.getDecoded(n);if(o!==void 0)return o}}function c$i(t,...e){for(const n of e){const o=t.getNumber(n);if(o!==void 0)return o}}var e1e=class extends Ol{type=\"component-record\";constructor(t={}){super(t)}get id(){return this.getNumber(\"ID\")}get designator(){return pi(this,\"SOURCEDESIGNATOR\",\"DESIGNATOR\")}get comment(){return pi(this,\"SOURCECOMMENT\",\"COMMENT\")}get footprint(){return pi(this,\"PATTERN\",\"FOOTPRINT\")}get footprintLibrary(){return pi(this,\"SOURCEFOOTPRINTLIBRARY\")}get sourceLibrary(){return pi(this,\"SOURCECOMPONENTLIBRARY\")}get sourceLibraryReference(){return pi(this,\"SOURCELIBREFERENCE\")}get sourceUniqueId(){return pi(this,\"SOURCEUNIQUEID\")}get sourceHierarchicalPath(){return pi(this,\"SOURCEHIERARCHICALPATH\")}get position(){return qh(this,[\"X\",\"LOCATION.X\"],[\"Y\",\"LOCATION.Y\"])}get rotation(){return xI(this.getNumber(\"ROTATION\")??0)}get side(){const t=this.getCaseInsensitive(\"LAYER\")?.toUpperCase();return t===\"TOP\"||t===\"TOP LAYER\"?\"top\":t===\"BOTTOM\"||t===\"BOTTOM LAYER\"?\"bottom\":\"unknown\"}get mirrored(){return this.side===\"bottom\"}get locked(){return this.getBoolean(\"LOCKED\")}get selected(){return this.getBoolean(\"SELECTION\")}get unionIndex(){return this.getNumber(\"UNIONINDEX\")}get channelOffset(){return this.getNumber(\"CHANNELOFFSET\")}get heightMils(){return tc(this,\"HEIGHT\")}getOwnedPrimitives(t){return t.getRecordsOwnedByComponent(this)}getBounds(t,e){return t.getComponentBounds(this,e)}},t1e=class extends Ol{type=\"net-record\";constructor(t={}){super(t)}get id(){return this.getNumber(\"ID\")}get name(){return pi(this,\"NAME\")}get visible(){return this.getBoolean(\"VISIBLE\")}get color(){return this.getNumber(\"COLOR\")}},l$i=65535,Sfn=new WeakMap,u$i=class{constructor(t){this.document=t,this.components=t.getRecordsByKind(\"Component\").filter(e=\u003ee instanceof e1e),this.nets=t.getRecordsByKind(\"Net\").filter(e=\u003ee instanceof t1e),this.polygons=t.getRecordsByKind(\"Polygon\"),this.rules=[...t.getRecordsByKind(\"Rule\"),...t.getRecordsByKind(\"DXPRule\")],this.componentTargets=o1e(this.components),this.netTargets=o1e(this.nets),this.polygonTargets=o1e(this.polygons),this.ruleTargets=o1e(this.rules);for(const e of t.records){fXe(this.byKind,e.recordKind??\"Unknown\",e);const n=e.getDecoded(\"LAYER\");n!==void 0\u0026\u0026fXe(this.byLayer,n.toUpperCase(),e),i1e(this.byComponent,e,\"COMPONENT\"),i1e(this.byNet,e,\"NET\"),i1e(this.byPolygon,e,\"POLYGON\"),i1e(this.byRule,e,\"RULE\");const o=e.getDecoded(\"UNIQUEID\");if(!o)continue;const i=o.toUpperCase(),r=this.uniqueIds.get(i);if(!r){this.uniqueIds.set(i,e);continue}const s=this.duplicateUniqueIds.get(i)??[r];s.push(e),this.duplicateUniqueIds.set(i,s)}}document;byComponent=new Map;byKind=new Map;byLayer=new Map;byNet=new Map;byPolygon=new Map;byRule=new Map;components;duplicateUniqueIds=new Map;nets;polygons;rules;uniqueIds=new Map;componentTargets;netTargets;polygonTargets;ruleTargets;getComponent(t){return nk(t)?this.componentTargets.get(t):void 0}getNet(t){return nk(t)?this.netTargets.get(t):void 0}getPolygon(t){return nk(t)?this.polygonTargets.get(t):void 0}getRule(t){return nk(t)?this.ruleTargets.get(t):void 0}getRecordByUniqueId(t){return this.uniqueIds.get(t.toUpperCase())}getDanglingReferences(){const t=[],e=[[\"COMPONENT\",this.componentTargets],[\"NET\",this.netTargets],[\"POLYGON\",this.polygonTargets],[\"RULE\",this.ruleTargets]];for(const n of this.document.records)for(const[o,i]of e){const r=tk(n,o);r!==void 0\u0026\u0026!i.has(r)\u0026\u0026t.push({field:o,index:r,record:n})}return t}};function rg(t){const e=Sfn.get(t);if(e?.revision===t.revision)return e.index;const n=new u$i(t);return Sfn.set(t,{index:n,revision:t.revision}),n}function Qfn(t,e){return rg(t).getComponent(e)}function vfn(t,e){return rg(t).getNet(e)}function wfn(t,e){return rg(t).getPolygon(e)}function Pfn(t,e){return rg(t).getRule(e)}function mXe(t,e){return e instanceof e1e?tM(rg(t).components,e):tk(e,\"COMPONENT\")}function _Xe(t,e){return e instanceof t1e?tM(rg(t).nets,e):tk(e,\"NET\")}function g$i(t,e){return e.recordKind===\"Polygon\"?tM(rg(t).polygons,e):tk(e,\"POLYGON\")}function d$i(t,e){return e.recordKind===\"Rule\"||e.recordKind===\"DXPRule\"?tM(rg(t).rules,e):tk(e,\"RULE\")??tk(e,\"RULEINDEX\")}function Mfn(t,e){const n=mXe(t,e);return n===void 0?void 0:rg(t).getComponent(n)}function Dfn(t,e){const n=_Xe(t,e);return n===void 0?void 0:rg(t).getNet(n)}function Nfn(t,e){const n=g$i(t,e);return n===void 0?void 0:rg(t).getPolygon(n)}function Rfn(t,e){const n=d$i(t,e);return n===void 0?void 0:rg(t).getRule(n)}function n1e(t,e){const n=typeof e==\"number\"?e:tM(rg(t).components,e);return n===void 0?[]:[...rg(t).byComponent.get(n)??[]]}function Tfn(t,e){const n=typeof e==\"number\"?e:tM(rg(t).nets,e);return n===void 0?[]:[...rg(t).byNet.get(n)??[]]}function kfn(t,e){const n=typeof e==\"number\"?e:tM(rg(t).polygons,e);return n===void 0?[]:[...rg(t).byPolygon.get(n)??[]]}function Ffn(t,e){const n=typeof e==\"number\"?e:tM(rg(t).rules,e);return n===void 0?[]:[...rg(t).byRule.get(n)??[]]}function o1e(t){const e=new Map,n=t.some(o=\u003eo.getNumber(\"ID\")!==void 0);return t.forEach((o,i)=\u003e{const r=n?o.getNumber(\"ID\"):i;r!==void 0\u0026\u0026nk(r)\u0026\u0026e.set(r,o)}),e}function tM(t,e){if(t.some(i=\u003ei.getNumber(\"ID\")!==void 0)){const i=e.getNumber(\"ID\");return i!==void 0\u0026\u0026nk(i)?i:void 0}const o=t.indexOf(e);return o\u003e=0?o:void 0}function i1e(t,e,n){const o=tk(e,n);o!==void 0\u0026\u0026fXe(t,o,e)}function fXe(t,e,n){const o=t.get(e);o?o.push(n):t.set(e,[n])}function tk(t,e){const n=t.getNumber(e);return n!==void 0\u0026\u0026nk(n)?n:void 0}function nk(t){return Number.isInteger(t)\u0026\u0026t\u003e=0\u0026\u0026t\u003cl$i}var Lfn=1e5,h$i=1e4;function IXe(t){return a1e(p$i(t))}function p$i(t){return Hfn(Ufn(t))}function Hfn(t){const e=[];for(let n=0;n\u003cLfn;n++){const o=ok(t,`VX${n}`),i=ok(t,`VY${n}`);if(o===void 0||i===void 0)break;const r=yXe(t,`KIND${n}`),s={x:o,y:i};if(r!==1){e.push({index:n,kind:r===void 0||r===0?\"line\":\"unknown\",position:s,rawKind:r});continue}const a=ok(t,`CX${n}`),A=ok(t,`CY${n}`),c=ok(t,`R${n}`),l=yXe(t,`SA${n}`),u=yXe(t,`EA${n}`),g=a!==void 0\u0026\u0026A!==void 0\u0026\u0026c!==void 0\u0026\u0026c\u003e0\u0026\u0026l!==void 0\u0026\u0026u!==void 0?{center:{x:a,y:A},endAngleDegrees:u,radiusMils:c,startAngleDegrees:l}:void 0;e.push({arc:g,index:n,kind:g?\"arc\":\"unknown\",position:s,rawKind:r})}return e}function r1e(t){const e=Ufn(t),n=[],o=Kfn(e.get(\"HOLECOUNT\"),h$i);for(let i=0;i\u003co;i++){const r=Kfn(e.get(`HOLE${i}COUNT`),Lfn),s=[];for(let a=0;a\u003cr;a++){const A=ok(e,`HOLE${i}VX${a}`),c=ok(e,`HOLE${i}VY${a}`);if(A===void 0||c===void 0)break;s.push({index:a,kind:\"line\",position:{x:A,y:c},rawKind:0})}s.length\u003e=3\u0026\u0026n.push(a1e(s))}return{holes:n,outline:a1e(Hfn(e)),record:t}}function Ofn(t){const e=t.board?IXe(t.board):a1e([]),n=t.records.filter(o=\u003eo.recordKind===\"BoardRegion\"||o.recordKind===\"Region\");return{cutouts:n.filter(o=\u003es1e(o)===\"BOARD_CUTOUT\").map(r1e),layerStackRegions:n.filter(o=\u003es1e(o)===\"LAYER_STACK_REGION\").map(r1e),outline:e,polygonCutouts:n.filter(o=\u003es1e(o)===\"POLYGON_CUTOUT\").map(r1e)}}function s1e(t){if(t.recordKind===\"BoardRegion\"||t.getDecoded(\"OBJECTKIND\")?.toUpperCase()===\"BOARDREGION\"||t.getDecoded(\"LAYERSTACKID\")!==void 0)return\"LAYER_STACK_REGION\";const n=(t.getDecoded(\"REGIONKIND\")??t.getDecoded(\"KIND\")??void 0)?.replace(/[\\s-]+/gu,\"_\").toUpperCase();return n===\"0\"?t.getBoolean(\"ISBOARDCUTOUT\")===!0?\"BOARD_CUTOUT\":\"COPPER\":n===\"1\"?\"POLYGON_CUTOUT\":n===\"2\"?\"DASHED_OUTLINE\":n===\"3\"?\"UNKNOWN_3\":n===\"4\"?\"CAVITY_DEFINITION\":n}function a1e(t){const e=[];for(const i of t){if(!i.arc){Yfn(e,i.position);continue}for(const r of m$i(i.position,i.arc))Yfn(e,r)}const n=e[0],o=e.at(-1);return{bounds:Xji(e),isExplicitlyClosed:n!==void 0\u0026\u0026o!==void 0\u0026\u0026hXe(n,o,1e-4),points:e,vertices:t,winding:e$i(e)}}function m$i(t,e){const n=CXe(e.center,e.radiusMils,e.startAngleDegrees),o=CXe(e.center,e.radiusMils,e.endAngleDegrees),i=_$i(e.endAngleDegrees-e.startAngleDegrees)||360,r=Gfn(t,n)\u003c=Gfn(t,o),s=r?e.startAngleDegrees:e.endAngleDegrees,a=r?i:-i,A=Math.max(2,Math.ceil(Math.abs(a)/7.5)),c=[];for(let l=0;l\u003c=A;l++)c.push(CXe(e.center,e.radiusMils,s+a*l/A));return c}function CXe(t,e,n){const o=n*Math.PI/180;return{x:t.x+Math.cos(o)*e,y:t.y+Math.sin(o)*e}}function _$i(t){return(t%360+360)%360}function Gfn(t,e){const n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function Yfn(t,e){const n=t.at(-1);n\u0026\u0026hXe(n,e,1e-4)||t.push(e)}function Ufn(t){const e=new Map;for(const n of t.fields){const o=n.key.toUpperCase();e.has(o)||e.set(o,n.value)}return e}function ok(t,e){return Gee(t.get(e.toUpperCase()))}function yXe(t,e){const n=Number(t.get(e.toUpperCase()));return Number.isFinite(n)?n:void 0}function Kfn(t,e){const n=Number(t??0);return Number.isInteger(n)?Math.min(Math.max(n,0),e):0}var Vfn=class extends Ol{type=\"dimension-record\";constructor(t={}){super(t)}get dimensionKind(){return pi(this,\"DIMENSIONKIND\",\"KIND\")}get start(){return this.referencePoints[0]??qh(this,[\"X1\"],[\"Y1\"])}get end(){return this.referencePoints[1]??qh(this,[\"X2\"],[\"Y2\"])}get dimensionLineAnchor(){return qh(this,[\"X1\"],[\"Y1\"])}get referencePoints(){return zfn({pointInfix:\"POINT\",prefix:\"REFERENCE\",record:this})}get textPoints(){const t=qh(this,[\"TEXTX\"],[\"TEXTY\"]);return t?[t]:zfn({pointInfix:\"\",prefix:\"TEXT\",record:this})}get unit(){return pi(this,\"TEXTDIMENSIONUNIT\",\"DIMENSIONUNIT\",\"UNIT\")}get precision(){return c$i(this,\"TEXTPRECISION\",\"PRECISION\")??tc(this,\"TEXTPRECISION\",\"PRECISION\")}get prefix(){return pi(this,\"TEXTPREFIX\",\"PREFIX\")}get suffix(){return pi(this,\"TEXTSUFFIX\",\"SUFFIX\")}get lineWidthMils(){return tc(this,\"LINEWIDTH\",\"ARROWLINEWIDTH\",\"WIDTH\")}get textHeightMils(){return tc(this,\"TEXTHEIGHT\",\"HEIGHT\")}};function zfn({pointInfix:t,prefix:e,record:n}){const o=[],i=e===\"REFERENCE\"?n.getNumber(\"REFERENCES_COUNT\"):void 0,r=Math.min(Math.max(i??100,0),1e4),s=e===\"REFERENCE\"?0:1;for(let a=s;a\u003cs+r;a++){const A=qh(n,[`${e}${a}${t}X`],[`${e}${a}${t}Y`]);if(!A)break;o.push(A)}return o}var f$i=class extends Ol{type=\"coordinate-record\";get position(){return qh(this,[\"X\",\"LOCATION.X\"],[\"Y\",\"LOCATION.Y\"])}};function I$i(t){return t.replace(/[\\s_-]/gu,\"\").toUpperCase()}function iK(t){return Gee(t)}function Md(t,e,n=0){return iK(t.getCaseInsensitive(e))??n}function C$i(t){return IXe(t).points}function y$i(t){if(!(t instanceof Vfn))return;const e=t,n=e.start,o=e.end;if(!n||!o)return;const i=o.x-n.x,r=o.y-n.y,s=Math.hypot(i,r);if(s===0)return;const a=-r/s,A=i/s,c=e.dimensionLineAnchor??n,l=(c.x-n.x)*a+(c.y-n.y)*A,u={x:n.x+a*l,y:n.y+A*l},g={x:o.x+a*l,y:o.y+A*l},h=e.textPoints[0]??{x:(u.x+g.x)/2,y:(u.y+g.y)/2},d=x$i({dimension:e,measuredDistanceMils:s}),p=e.textHeightMils??50,m=Jfn({fallbackMils:10,fieldName:\"TEXTGAP\",record:t});return{arrowSize:Jfn({fallbackMils:40,fieldName:\"ARROWSIZE\",record:t}),dimensionEnd:g,dimensionStart:u,estimatedTextHalfWidth:d.length*p*.3+m,label:d,lineWidth:e.lineWidthMils??8,referenceEnd:o,referenceStart:n,textHeight:p,textPosition:h}}function x$i({dimension:t,measuredDistanceMils:e}){const n=t.getDecoded(\"TEXTFORMAT\")?.trim();if(n\u0026\u0026n!==\"\u003c\u003e\")return n;const o=Math.min(Math.max(t.precision??2,0),6),i=t.unit?.toUpperCase()??\"MILS\",{amount:r,unitLabel:s}=E$i({measuredDistanceMils:e,normalizedUnit:i}),a=t.prefix??\"\",A=t.suffix??` ${s}`;return`${a}${r.toFixed(o)}${A}`}function E$i({measuredDistanceMils:t,normalizedUnit:e}){return e.includes(\"MILLIMETER\")?{amount:t*.0254,unitLabel:\"mm\"}:e.includes(\"CENTIMETER\")?{amount:t*.00254,unitLabel:\"cm\"}:e.includes(\"INCH\")?{amount:t/1e3,unitLabel:\"in\"}:{amount:t,unitLabel:\"mil\"}}function Jfn({fallbackMils:t,fieldName:e,record:n}){return n.getAltiumMeasurement(e)?.toMils()??t}var xXe=I$i;function B$i(t,e){const n=S$i(t,e),o=t.getNumber(\"PADMODE\")??0,i=b$i(t,n,o),r=t.getCaseInsensitive(`LAYER${n}ALTSHAPE`)?.toUpperCase(),s=Number(t.getCaseInsensitive(`LAYER${n}CORNERRADIUS`)??0),a=r===\"ROUNDRECT\"\u0026\u0026Number.isFinite(s)?Math.min(i.width,i.height)*s/200:0,A=t.getNumber(\"HOLETYPE\"),c=t.getCaseInsensitive(\"HOLESHAPE\")?.toUpperCase()??(A===1?\"SQUARE\":A===2?\"SLOT\":\"ROUND\"),l=Md(t,\"HOLESIZE\"),u=iK(t.getCaseInsensitive(\"SLOTLENGTH\"))??(c===\"SLOT\"?iK(t.getCaseInsensitive(\"HOLEWIDTH\")):void 0)??l;return{cornerRadius:a,height:i.height,holeOffsetX:Md(t,`LAYER${n}HOLEXOFFSET`,Md(t,`PADXOFFSET${n}`)),holeOffsetY:Md(t,`LAYER${n}HOLEYOFFSET`,Md(t,`PADYOFFSET${n}`)),holeRotation:Number(t.getCaseInsensitive(\"SLOTROTATION\")??t.getCaseInsensitive(\"HOLEROTATION\")??0),holeShape:c,holeSize:l,layerOrdinal:n,plated:t.getBoolean(\"PLATED\")!==!1,rotation:Number(t.getCaseInsensitive(\"ROTATION\")??0),shape:r===\"ROUNDRECT\"?r:i.shape,slotLength:u,width:i.width,x:Md(t,\"X\"),y:Md(t,\"Y\")}}function b$i(t,e,n){if(!(xXe(t.getCaseInsensitive(\"LAYER\")??\"\")===\"MULTILAYER\")||n===0||e===0)return{height:FS(t,[\"YSIZE\",\"TOPYSIZE\"])??FS(t,[\"XSIZE\",\"TOPXSIZE\"])??20,shape:A1e(t,[\"SHAPE\",\"TOPSHAPE\"])?.toUpperCase()??\"ROUND\",width:FS(t,[\"XSIZE\",\"TOPXSIZE\"])??20};if(e===31){const s=FS(t,[\"BOTTOMXSIZE\",\"BOTXSIZE\",\"XSIZE\",\"TOPXSIZE\"])??20;return{height:FS(t,[\"BOTTOMYSIZE\",\"BOTYSIZE\",\"YSIZE\",\"TOPYSIZE\"])??s,shape:A1e(t,[\"BOTTOMSHAPE\",\"BOTSHAPE\",\"SHAPE\",\"TOPSHAPE\"])?.toUpperCase()??\"ROUND\",width:s}}if(n===2\u0026\u0026e\u003e=2){const s=FS(t,[`LAYER${e}XSIZE`,\"MIDXSIZE\",\"XSIZE\"])??20;return{height:FS(t,[`LAYER${e}YSIZE`,\"MIDYSIZE\",\"YSIZE\"])??s,shape:A1e(t,[`LAYER${e}SHAPE`,\"MIDSHAPE\",\"SHAPE\"])?.toUpperCase()??\"ROUND\",width:s}}const r=FS(t,[\"MIDXSIZE\",\"XSIZE\",\"TOPXSIZE\"])??20;return{height:FS(t,[\"MIDYSIZE\",\"YSIZE\",\"TOPYSIZE\"])??r,shape:A1e(t,[\"MIDSHAPE\",\"SHAPE\",\"TOPSHAPE\"])?.toUpperCase()??\"ROUND\",width:r}}function S$i(t,e){const n=e?.length===1?xXe(e[0]??\"\"):xXe(t.getCaseInsensitive(\"LAYER\")??\"\");if(n===\"BOTTOM\")return 31;if(n===\"TOP\")return 0;const o=/^(?:MIDLAYER|MID|INTERNALPLANE)(\\d+)$/u.exec(n);return o?.[1]?Math.min(Math.max(Number(o[1]),1),30):0}function FS(t,e){for(const n of e){const o=iK(t.getCaseInsensitive(n));if(o!==void 0)return o}}function A1e(t,e){for(const n of e){const o=t.getCaseInsensitive(n);if(o!==void 0)return o}}function EXe(t){if(t.length!==0)return{minX:Math.min(...t.map(e=\u003ee.x)),minY:Math.min(...t.map(e=\u003ee.y)),maxX:Math.max(...t.map(e=\u003ee.x)),maxY:Math.max(...t.map(e=\u003ee.y))}}function Q$i(t,e){return t?e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t:e}function BXe(t,e){return{minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e}}function v$i(t,e){const n=t.recordKind;if(n===\"Dimension\"){const o=y$i(t);if(!o)return;const i=o.dimensionEnd.x-o.dimensionStart.x,r=o.dimensionEnd.y-o.dimensionStart.y,s=Math.hypot(i,r),a={x:i/s,y:r/s},A=EXe([o.referenceStart,o.referenceEnd,o.dimensionStart,o.dimensionEnd,o.textPosition,{x:o.textPosition.x-a.x*o.estimatedTextHalfWidth,y:o.textPosition.y-a.y*o.estimatedTextHalfWidth},{x:o.textPosition.x+a.x*o.estimatedTextHalfWidth,y:o.textPosition.y+a.y*o.estimatedTextHalfWidth}]);return A?BXe(A,Math.max(o.arrowSize,o.textHeight)):void 0}if(n===\"Track\"){const o=EXe([{x:Md(t,\"X1\"),y:Md(t,\"Y1\")},{x:Md(t,\"X2\"),y:Md(t,\"Y2\")}]),i=Md(t,\"WIDTH\");return o\u0026\u0026i\u003e0?BXe(o,i/2):o}if(n===\"Pad\"){const o=B$i(t,e),i=o.rotation*Math.PI/180,r=o.width/2,s=o.height/2,a=Math.abs(Math.cos(i))*r+Math.abs(Math.sin(i))*s,A=Math.abs(Math.sin(i))*r+Math.abs(Math.cos(i))*s;return{minX:o.x-a,minY:o.y-A,maxX:o.x+a,maxY:o.y+A}}if(n===\"Via\"){const o=Md(t,\"X\"),i=Md(t,\"Y\"),r=iK(t.getCaseInsensitive(\"DIAMETER\"))??iK(t.getCaseInsensitive(\"TOPLAYERSIZE\"))??20;return{minX:o-r/2,minY:i-r/2,maxX:o+r/2,maxY:i+r/2}}if(n===\"Arc\"){const o=Md(t,\"LOCATION.X\"),i=Md(t,\"LOCATION.Y\"),r=Md(t,\"RADIUS\"),s=Md(t,\"WIDTH\"),a=r+Math.max(s/2,0);return{minX:o-a,minY:i-a,maxX:o+a,maxY:i+a}}if(n===\"ComponentBody\"||n===\"Region\"||n===\"Polygon\"||n===\"Board\")return EXe(C$i(t));if(n===\"Text\"){const o=Md(t,\"X\"),i=Md(t,\"Y\"),r=Md(t,\"HEIGHT\",30);return BXe({minX:o,minY:i,maxX:o,maxY:i},r)}if(n===\"Fill\"){const o=Md(t,\"X1\"),i=Md(t,\"Y1\"),r=Md(t,\"X2\"),s=Md(t,\"Y2\"),a=(o+r)/2,A=(i+s)/2,c=Math.abs(r-o)/2,l=Math.abs(s-i)/2,u=Number(t.getCaseInsensitive(\"ROTATION\")??0)*Math.PI/180,g=Math.abs(Math.cos(u))*c+Math.abs(Math.sin(u))*l,h=Math.abs(Math.sin(u))*c+Math.abs(Math.cos(u))*l;return{minX:a-g,minY:A-h,maxX:a+g,maxY:A+h}}}var Wfn=new WeakMap,w$i=class{constructor(t){this.document=t;const e=rg(t);this.edges=e.nets.flatMap((n,o)=\u003e{const i=n.getNumber(\"ID\")??o,r=e.byNet.get(i)??[],s=new Map;for(const a of r){const A=mXe(t,a),c=s.get(A);c?c.push(a):s.set(A,[a])}return[...s].map(([a,A])=\u003e({component:a===void 0?void 0:e.getComponent(a),net:n,primitives:A}))})}document;edges;getConnectedRecords(t){const e=_Xe(this.document,t);return e===void 0?[]:[...rg(this.document).byNet.get(e)??[]].filter(n=\u003en!==t)}getNetsForComponent(t){const e=rg(this.document),n=new Set;for(const o of n1e(this.document,t)){const i=_Xe(this.document,o),r=i===void 0?void 0:e.getNet(i);r\u0026\u0026n.add(r)}return[...n]}getComponentsForNet(t){const e=rg(this.document),n=typeof t==\"number\"?t:t.getNumber(\"ID\")??e.nets.indexOf(t);if(n\u003c0)return[];const o=new Set;for(const i of e.byNet.get(n)??[]){const r=mXe(this.document,i),s=r===void 0?void 0:e.getComponent(r);s\u0026\u0026o.add(s)}return[...o]}getConnectedComponents(t){const e=new Set,n=typeof t==\"number\"?rg(this.document).getComponent(t):t;for(const o of this.getNetsForComponent(t))for(const i of this.getComponentsForNet(o))i!==n\u0026\u0026e.add(i);return[...e]}};function jfn(t){const e=Wfn.get(t);if(e?.revision===t.revision)return e.graph;const n=new w$i(t);return Wfn.set(t,{graph:n,revision:t.revision}),n}function $fn(t,e,n){let o;for(const i of n1e(t,e))o=Q$i(o,v$i(i,n));return o}var P$i=class extends o8{type=\"binary-pcb-document\";compoundFile;embeddedModels;primitiveRecords;propertyRecords;streamSummaries;wideStrings;constructor(t){super({sourceLocation:{byteOffset:0,streamPath:\"/\"}}),this.compoundFile=t.compoundFile,this.primitiveRecords=t.primitiveRecords,this.propertyRecords=t.propertyRecords,this.streamSummaries=t.streamSummaries,this.wideStrings=t.wideStrings??new Map,this.embeddedModels=this.models.flatMap((e,n)=\u003e{const o=this.compoundFile.getStream([\"Models\",String(n)]);return o?[new $ji({index:n,record:e,stream:o})]:[]}),this.adoptChildren([this.compoundFile,...this.records]),this.clearDirty(!0)}get records(){return[...this.propertyRecords.values(),...this.primitiveRecords.values()].flat()}get board(){return this.propertyRecords.get(\"Board6\")?.[0]}get components(){return this.propertyRecords.get(\"Components6\")??[]}get componentBodies(){return this.primitiveRecords.get(\"ShapeBasedComponentBodies6\")??this.primitiveRecords.get(\"ComponentBodies6\")??[]}get legacyComponentBodies(){return this.primitiveRecords.get(\"ComponentBodies6\")??[]}get nets(){return this.propertyRecords.get(\"Nets6\")??[]}get index(){return rg(this)}get connectivity(){return jfn(this)}get boardGeometry(){return Ofn(this)}get polygons(){return this.propertyRecords.get(\"Polygons6\")??[]}get rules(){return this.propertyRecords.get(\"Rules6\")??[]}getComponentByIndex(t){return Qfn(this,t)}getNetByIndex(t){return vfn(this,t)}getPolygonByIndex(t){return wfn(this,t)}getRuleByIndex(t){return Pfn(this,t)}getComponentForRecord(t){return Mfn(this,t)}getNetForRecord(t){return Dfn(this,t)}getPolygonForRecord(t){return Nfn(this,t)}getRuleForRecord(t){return Rfn(this,t)}getRecordsOwnedByComponent(t){return n1e(this,t)}getRecordsOnNet(t){return Tfn(this,t)}getRecordsForPolygon(t){return kfn(this,t)}getRecordsForRule(t){return Ffn(this,t)}getRecordsByLayer(t){return[...this.index.byLayer.get(t.toUpperCase())??[]]}getComponentBounds(t,e){return $fn(this,t,e)}getRecordByUniqueId(t){return this.index.getRecordByUniqueId(t)}get models(){return this.propertyRecords.get(\"Models\")??[]}getModelsById(t){const e=t.toUpperCase();return this.models.filter(n=\u003en.getDecoded(\"ID\")?.toUpperCase()===e)}getModelForComponentBody(t){const e=t.getDecoded(\"MODELID\");if(!e)return;const n=this.getModelsById(e);return n.length\u003c=1?n[0]:n.find(o=\u003ebXe(o.getNumber(\"ROTX\"),t.getNumber(\"MODEL.3D.ROTX\"))\u0026\u0026bXe(o.getNumber(\"ROTY\"),t.getNumber(\"MODEL.3D.ROTY\"))\u0026\u0026bXe(o.getNumber(\"ROTZ\"),t.getNumber(\"MODEL.3D.ROTZ\")))??n[0]}getEmbeddedModelForComponentBody(t){const e=this.getModelForComponentBody(t);return this.embeddedModels.find(n=\u003en.record===e)}get tracks(){return this.primitiveRecords.get(\"Tracks6\")??[]}get arcs(){return this.primitiveRecords.get(\"Arcs6\")??[]}get vias(){return this.primitiveRecords.get(\"Vias6\")??[]}get pads(){return this.primitiveRecords.get(\"Pads6\")??[]}get fills(){return this.primitiveRecords.get(\"Fills6\")??[]}get regions(){return this.primitiveRecords.get(\"ShapeBasedRegions6\")??this.primitiveRecords.get(\"Regions6\")??[]}get regionFills(){return this.primitiveRecords.get(\"Regions6\")??[]}get boardRegions(){return this.primitiveRecords.get(\"BoardRegions\")??[]}get texts(){return this.primitiveRecords.get(\"Texts6\")??[]}getRecordsByKind(t){return this.records.filter(e=\u003ee.recordKind===t)}getStreamSummary(t){return this.streamSummaries.find(e=\u003ee.family.toLowerCase()===t.toLowerCase())}getBytes(){if(this.isDirty)throw new Yg(\"Modified binary PCB documents cannot yet be serialized safely\");return this.compoundFile.getBytes()}getChildren(){return[this.compoundFile,...this.records]}getString(){return this.records.map(t=\u003et.getString()).join(`\n`)}};function bXe(t,e){return t!==void 0\u0026\u0026e!==void 0\u0026\u0026Math.abs(t-e)\u003cNumber.EPSILON}function SXe(t,e){if(e!==void 0)return{encoding:e,text:e===\"utf-16le\"?l1e(t,!0):e===\"utf-16be\"?l1e(t,!1):new TextDecoder(e,{fatal:e===\"utf-8\"}).decode(t)};if(t[0]===239\u0026\u0026t[1]===187\u0026\u0026t[2]===191)return{encoding:\"utf-8-bom\",text:`\\uFEFF${new TextDecoder().decode(t.subarray(3))}`};if(t[0]===255\u0026\u0026t[1]===254)return{encoding:\"utf-16le-bom\",text:`\\uFEFF${l1e(t.subarray(2),!0)}`};if(t[0]===254\u0026\u0026t[1]===255)return{encoding:\"utf-16be-bom\",text:`\\uFEFF${l1e(t.subarray(2),!1)}`};try{return{encoding:\"utf-8\",text:new TextDecoder(\"utf-8\",{fatal:!0}).decode(t)}}catch{return{encoding:\"windows-1252\",text:new TextDecoder(\"windows-1252\").decode(t)}}}function c1e(t,e=\"utf-8\"){const n=e.endsWith(\"-bom\"),o=n\u0026\u0026t.startsWith(\"\\uFEFF\")?t.slice(1):t;if(e===\"utf-8\"||e===\"utf-8-bom\"){const c=new TextEncoder().encode(o);return n?Uint8Array.from([239,187,191,...c]):c}if(e===\"windows-1252\")return D$i(o);const i=e===\"utf-16le\"||e===\"utf-16le-bom\",r=o.length*2+(n?2:0),s=new Uint8Array(r),a=new DataView(s.buffer);let A=0;n\u0026\u0026(s[0]=i?255:254,s[1]=i?254:255,A=2);for(let c=0;c\u003co.length;c++)a.setUint16(A,o.charCodeAt(c),i),A+=2;return s}function l1e(t,e){const n=new DataView(t.buffer,t.byteOffset,t.byteLength),o=[],i=8192;for(let r=0;r+2\u003c=t.byteLength;r+=i*2){const s=Math.min(r+i*2,t.byteLength),a=[];for(let A=r;A+2\u003c=s;A+=2)a.push(n.getUint16(A,e));o.push(String.fromCharCode(...a))}return o.join(\"\")}var M$i=new Map([[\"€\",128],[\"‚\",130],[\"ƒ\",131],[\"„\",132],[\"…\",133],[\"†\",134],[\"‡\",135],[\"ˆ\",136],[\"‰\",137],[\"Š\",138],[\"‹\",139],[\"Œ\",140],[\"Ž\",142],[\"‘\",145],[\"’\",146],[\"“\",147],[\"”\",148],[\"•\",149],[\"–\",150],[\"—\",151],[\"˜\",152],[\"™\",153],[\"š\",154],[\"›\",155],[\"œ\",156],[\"ž\",158],[\"Ÿ\",159]]);function D$i(t){const e=[];for(const n of t){const o=M$i.get(n);if(o!==void 0){e.push(o);continue}const i=n.codePointAt(0);if(i===void 0||i\u003e255)throw new RangeError(`Character ${JSON.stringify(n)} cannot be encoded as Windows-1252`);e.push(i)}return Uint8Array.from(e)}function N$i(t){const e=new Map(t.fields.map(r=\u003e[r.key.toUpperCase(),r.value])),n=[...QXe(e,\"LAYER_V8_\",\"v8\"),...QXe(e,\"LAYERV7_\",\"v7\")];n.length===0\u0026\u0026n.push(...QXe(e,\"LAYER\",\"legacy\"));const o=e.has(\"V9_MASTERSTACK_ID\")?\"V9_MASTERSTACK_\":\"LAYERMASTERSTACK_V8\",i=T$i(e);return{entries:n.sort((r,s)=\u003er.index-s.index),id:EI(e,`${o}ID`),impedanceProfiles:R$i(e,i),isFlex:h2(EI(e,`${o}ISFLEX`)),layerPairs:F$i(e),name:EI(e,`${o}NAME`),style:EI(e,`${o}STYLE`)??EI(e,\"LAYERSTACKSTYLE\"),subStacks:k$i(e),traceImpedanceConfigurations:i}}function R$i(t,e){return[...Uee(t,/^V9_IMPEDANCEPROFILE(\\d+)_ID$/u)].sort((n,o)=\u003en-o).map(n=\u003e{const o=`V9_IMPEDANCEPROFILE${n}_`,i=EI(t,`${o}ID`);return{displayName:EI(t,`${o}DISPLAY_NAME`),id:i,index:n,isDifferentialPair:h2(EI(t,`${o}ISDIFFPAIR`)),name:EI(t,`${o}NAME`),targetImpedanceOhms:nM(EI(t,`${o}IMPEDANCE`)),traceConfigurations:e.filter(({profileId:r})=\u003ei!==void 0\u0026\u0026r?.toUpperCase()===i.toUpperCase())}})}function T$i(t){return[...Uee(t,/^V9_TRACEIMPEDANCE(\\d+)_PROFILE_ID$/u)].sort((e,n)=\u003ee-n).map(e=\u003e{const n=`V9_TRACEIMPEDANCE${e}_`,o=r=\u003eEI(t,`${n}${r}`),i=r=\u003eGee(o(r));return{calculatedImpedanceOhms:nM(o(\"CALC_IMPEDANCE\")),differentialPairGapMils:i(\"DIFF_PAIR_GAP\"),differentialPairMaximumGapMils:i(\"DIFF_PAIR_MAXGAP\"),differentialPairMinimumGapMils:i(\"DIFF_PAIR_MINGAP\"),enabled:h2(o(\"ENABLED\")),etchFactor:nM(o(\"ETCH_FACTOR\")),impedanceErrorPercent:nM(o(\"IMPEDANCE_ERR\")),index:e,layerId:o(\"LAYER_V7ID\"),profileId:o(\"PROFILE_ID\"),propagationSpeed:nM(o(\"PROPAGATION_SPEED\")),referenceBottomLayerId:o(\"REF_BOT_V7ID\"),referenceTopLayerId:o(\"REF_TOP_V7ID\"),subStackId:o(\"SUBSTACK_ID\"),traceGapLocked:h2(o(\"TRACEGAP_LOCKED\")),traceMaximumWidthMils:i(\"TRACE_MAXWIDTH\"),traceMinimumWidthMils:i(\"TRACE_MINWIDTH\"),traceWidthLocked:h2(o(\"TRACEWIDTH_LOCKED\")),traceWidthMils:i(\"TRACE_WIDTH\")}})}function k$i(t){const e=Uee(t,/^V9_SUBSTACK(\\d+)_ID$/u),n=e.size\u003e0?\"v9\":\"v8\";return[...n===\"v9\"?e:Uee(t,/^LAYERSUBSTACK_V8_(\\d+)ID$/u)].sort((i,r)=\u003ei-r).map(i=\u003e{const r=n===\"v9\"?`V9_SUBSTACK${i}_`:`LAYERSUBSTACK_V8_${i}`,s=a=\u003eEI(t,`${r}${a}`);return{id:s(\"ID\"),index:i,isFlex:h2(s(\"ISFLEX\")),name:s(\"NAME\"),service:h2(s(\"SERVICE\")),showBottomDielectric:h2(s(\"SHOWBOTTOMDIELECTRIC\")),showTopDielectric:h2(s(\"SHOWTOPDIELECTRIC\")),source:n,type:nM(s(\"TYPE\")),usedByPrimitives:h2(s(\"USEDBYPRIMS\"))}})}function F$i(t){return[...Uee(t,/^LAYERPAIR(\\d+)LOW$/u)].sort((n,o)=\u003en-o).map(n=\u003e{const o=`LAYERPAIR${n}`,i=`${o}SUBSTACK_`,r=[...t].flatMap(([s,a])=\u003e{if(!s.startsWith(i))return[];const A=s.slice(i.length);return/^\\d+$/u.test(A)?[{index:Number(A),value:a}]:[]}).sort((s,a)=\u003es.index-a.index).map(({value:s})=\u003es);return{drillDrawing:h2(EI(t,`${o}DRILLDRAWING`)),drillGuide:h2(EI(t,`${o}DRILLGUIDE`)),highLayer:EI(t,`${o}HIGH`),index:n,lowLayer:EI(t,`${o}LOW`),subStackIds:r}})}function Uee(t,e){const n=new Set;for(const o of t.keys()){const i=e.exec(o)?.[1];i!==void 0\u0026\u0026n.add(Number(i))}return n}function QXe(t,e,n){const o=new Set,i=n===\"legacy\"?/^LAYER(\\d+)NAME$/u:new RegExp(`^${L$i(e)}(\\\\d+)(?:_|)(?:ID|NAME|LAYERID) dist/standalone.min.js - muse/esp32-eink-display - tscircuit ,\"u\");for(const r of t.keys()){const s=i.exec(r);s?.[1]\u0026\u0026o.add(Number(s[1]))}return[...o].map(r=\u003e{const s=`${e}${r}`,a=c=\u003eEI(t,`${s}${c}`),A={index:r,source:n};return n===\"v8\"?(A.id=a(\"ID\"),A.name=a(\"NAME\"),A.layerId=a(\"LAYERID\"),A.usedByPrimitives=h2(a(\"USEDBYPRIMS\")),A.mechanicalEnabled=h2(a(\"MECHENABLED\")),A.copperThickness=oK(a(\"COPTHICK\")??\"\"),A.dielectricType=a(\"DIELTYPE\"),A.dielectricConstant=nM(a(\"DIELCONST\")),A.dielectricHeight=oK(a(\"DIELHEIGHT\")??\"\"),A.dielectricMaterial=a(\"DIELMATERIAL\"),A):(A.layerId=a(\"LAYERID\"),A.name=a(\"NAME\"),A.previous=a(\"PREV\"),A.next=a(\"NEXT\"),A.mechanicalEnabled=h2(a(\"MECHENABLED\")),A.copperThickness=oK(a(\"COPTHICK\")??\"\"),A.dielectricType=a(\"DIELTYPE\"),A.dielectricConstant=nM(a(\"DIELCONST\")),A.dielectricHeight=oK(a(\"DIELHEIGHT\")??\"\"),A.dielectricMaterial=a(\"DIELMATERIAL\"),A)})}function EI(t,e){return t.get(e.toUpperCase())}function h2(t){if(t!==void 0){if(/^(?:T|TRUE|1)$/iu.test(t))return!0;if(/^(?:F|FALSE|0)$/iu.test(t))return!1}}function nM(t){if(t===void 0)return;const e=Number(t);return Number.isFinite(e)?e:void 0}function L$i(t){return t.replace(/[.*+?^${}()|[\\]\\\\]/gu,\"\\\\$\u0026\")}var qfn=class extends Ol{type=\"board-record\";constructor(t={}){super(t)}get fileName(){return pi(this,\"FILENAME\")}get version(){return pi(this,\"VERSION\")}get date(){return pi(this,\"DATE\")}get time(){return pi(this,\"TIME\")}get displayUnit(){return pi(this,\"DISPLAYUNIT\")}get origin(){return qh(this,[\"ORIGINX\",\"ORIGIN.X\"],[\"ORIGINY\",\"ORIGIN.Y\"])}get sheetOrigin(){return qh(this,[\"SHEETX\"],[\"SHEETY\"])}get sheetSize(){return Yee(this,[\"SHEETWIDTH\"],[\"SHEETHEIGHT\"])}get uniqueId(){return pi(this,\"UNIQUEID\")}get grid(){return{dotGrid:this.getBoolean(\"DOTGRID\"),electricalGridEnabled:this.getBoolean(\"ELECTRICALGRIDENABLED\"),electricalGridRangeMils:tc(this,\"ELECTRICALGRIDRANGE\"),largeVisibleGridMultiplier:this.getNumber(\"BIGVISIBLEGRIDMULTFACTOR\"),largeVisibleGridSize:this.getNumber(\"BIGVISIBLEGRIDSIZE\"),snapEnabled:this.getBoolean(\"GRIDSNAPENABLED\"),snapSizeMils:tc(this,\"GRIDSIZE\"),visibleGridMultiplier:this.getNumber(\"VISIBLEGRIDMULTFACTOR\"),visibleGridSize:this.getNumber(\"VISIBLEGRIDSIZE\")}}get outline(){return IXe(this)}get layerStack(){return N$i(this)}},vXe=class extends Ol{type=\"class-record\";constructor(t={}){super(t)}get name(){return pi(this,\"NAME\")}get classKind(){return pi(this,\"KIND\")}get superClass(){return this.getBoolean(\"SUPERCLASS\")}get uniqueId(){return pi(this,\"UNIQUEID\")}get members(){const t=[];for(let e=0;e\u003c1e5;e++){const n=pi(this,`M${e}`);if(n===void 0)break;t.push(n)}return t}},H$i=class extends vXe{type=\"signal-class-record\"},Xfn=class extends Ol{type=\"polygon-record\";constructor(t={}){super(t)}get id(){return this.getNumber(\"ID\")}get name(){return pi(this,\"NAME\")}get layer(){return pi(this,\"LAYER\")}get netIndex(){return this.getNumber(\"NET\")}get polygonType(){return pi(this,\"POLYGONTYPE\")}get pourOverStyle(){return pi(this,\"POUROVERSTYLE\",\"POUROVER\")}get hatchStyle(){return pi(this,\"HATCHSTYLE\")}get pourIndex(){return this.getNumber(\"POURINDEX\")}get priority(){return this.getNumber(\"POURORDER\")??this.getNumber(\"PRIORITY\")}get shelved(){return this.getBoolean(\"SHELVED\")}get removeDeadCopper(){return this.getBoolean(\"REMOVEDEAD\")}get trackWidthMils(){return tc(this,\"TRACKWIDTH\")}get gridSizeMils(){return tc(this,\"GRIDSIZE\")}},wXe=class extends Ol{type=\"rule-record\";constructor(t={}){super(t)}get name(){return pi(this,\"NAME\")}get ruleKind(){return pi(this,\"RULEKIND\")}get priority(){return this.getNumber(\"PRIORITY\")??this.getNumber(\"INDEXFORSAVE\")}get enabled(){return this.getBoolean(\"ENABLED\")}get scope1Expression(){return pi(this,\"SCOPE1EXPRESSION\")}get scope2Expression(){return pi(this,\"SCOPE2EXPRESSION\")}get comment(){return pi(this,\"COMMENT\")}get uniqueId(){return pi(this,\"UNIQUEID\")}get category(){const t=this.ruleKind?.toUpperCase();return t?[\"BOARDOUTLINECLEARANCE\",\"CLEARANCE\",\"COMPONENTCLEARANCE\",\"HOLETOHOLECLEARANCE\",\"PLANECLEARANCE\"].includes(t)?\"clearance\":t===\"WIDTH\"?\"routing-width\":t===\"ROUTINGVIAS\"?\"via-style\":t===\"ROUTINGLAYERS\"?\"routing-layer\":t===\"DIFFPAIRSROUTING\"?\"differential-pair\":t===\"LENGTH\"||t===\"MATCHEDLENGTHS\"?\"length\":t===\"PLANECONNECT\"?\"plane-connect\":t===\"POLYGONCONNECT\"?\"polygon-connect\":t===\"SOLDERMASKEXPANSION\"||t===\"PASTEMASKEXPANSION\"?\"mask\":/(?:ASSEMBLY|FABRICATION|HEIGHT|HOLE|SILK|SLIVER|TESTPOINT)/u.test(t)?\"manufacturing\":\"unknown\":\"unknown\"}get clearanceMils(){if(this.category===\"clearance\")return tc(this,\"GAP\",\"GENERICCLEARANCE\",\"CLEARANCE\")}get verticalClearanceMils(){if(this.category===\"clearance\")return tc(this,\"VERTICALGAP\")}get widthConstraint(){if(this.normalizedRuleKind===\"WIDTH\")return oM(this,[\"MINLIMIT\"],[\"PREFEREDWIDTH\",\"PREFERREDWIDTH\"],[\"MAXLIMIT\"])}get layerConstraints(){if(![\"DIFFPAIRSROUTING\",\"WIDTH\"].includes(this.normalizedRuleKind??\"\"))return[];const t=new Map;for(const e of this.fields){const n=/^(TOPLAYER|BOTTOMLAYER|MIDLAYER(\\d+))_(MINWIDTH|PREFWIDTH|MAXWIDTH|MINGAP|PREFGAP|MAXGAP)$/u.exec(e.key.toUpperCase());if(!n?.[1]||!n[3])continue;const o=O$i(n[1],n[2]),i=t.get(o)??{layer:o},r=tc(this,e.key);r!==void 0\u0026\u0026(n[3].endsWith(\"GAP\")?(i.gap??={},e1n(i.gap,n[3],r)):e1n(i,n[3],r),t.set(o,i))}return[...t.values()]}get viaDiameterConstraint(){if(this.normalizedRuleKind===\"ROUTINGVIAS\")return oM(this,[\"MINWIDTH\"],[\"WIDTH\",\"PREFEREDWIDTH\"],[\"MAXWIDTH\"])}get viaHoleConstraint(){if(this.normalizedRuleKind===\"ROUTINGVIAS\")return oM(this,[\"MINHOLEWIDTH\"],[\"HOLEWIDTH\",\"PREFEREDHOLEWIDTH\"],[\"MAXHOLEWIDTH\"])}get viaStyle(){if(this.normalizedRuleKind===\"ROUTINGVIAS\")return pi(this,\"VIASTYLE\")}get routingLayers(){if(this.normalizedRuleKind!==\"ROUTINGLAYERS\")return[];const t=new Map;for(const e of this.fields){const n=/^(TOP LAYER|BOTTOM LAYER|MID LAYER (\\d+))(_V5)?$/u.exec(e.key.toUpperCase());if(!n?.[1])continue;const o=G$i(n[1],n[2]),i=t.get(o)??{layer:o};n[3]?i.enabled=Y$i(e.value):i.mode=e.value,t.set(o,i)}return[...t.values()]}get differentialPairGap(){if(this.normalizedRuleKind===\"DIFFPAIRSROUTING\")return oM(this,[\"MINLIMIT\"],[\"MOSTFREQGAP\",\"PREFEREDGAP\",\"PREFERREDGAP\"],[\"MAXLIMIT\"])}get maximumUncoupledLengthMils(){if(this.normalizedRuleKind===\"DIFFPAIRSROUTING\")return tc(this,\"MAXUNCOUPLEDLENGTH\")}get matchedLengthToleranceMils(){if([\"LENGTH\",\"MATCHEDLENGTHS\"].includes(this.normalizedRuleKind??\"\"))return tc(this,\"TOLERANCE\")}get impedanceConstraint(){if(this.normalizedRuleKind!==\"WIDTH\")return;const t={maximum:this.getNumber(\"MAXIMP\"),minimum:this.getNumber(\"MINIMP\"),preferred:this.getNumber(\"FAVIMP\")};return u1e(t)?t:void 0}get thermalRelief(){if(![\"PLANECONNECT\",\"POLYGONCONNECT\"].includes(this.normalizedRuleKind??\"\"))return;const t={airGapMils:tc(this,\"AIRGAPWIDTH\",\"RELIEFAIRGAP\"),angle:pi(this,\"POLYGONRELIEFANGLE\"),conductorWidthMils:tc(this,\"RELIEFCONDUCTORWIDTH\"),connectionStyle:pi(this,\"CONNECTSTYLE\",\"PLANECONNECTSTYLE\"),expansionMils:tc(this,\"RELIEFEXPANSION\"),spokeCount:this.getNumber(\"RELIEFENTRIES\")};return u1e(t)?t:void 0}get maskExpansionMils(){if([\"PASTEMASKEXPANSION\",\"SOLDERMASKEXPANSION\"].includes(this.normalizedRuleKind??\"\"))return tc(this,\"EXPANSION\")}get heightConstraint(){if(this.normalizedRuleKind===\"HEIGHT\")return oM(this,[\"MINHEIGHT\"],[\"PREFHEIGHT\",\"PREFEREDHEIGHT\"],[\"MAXHEIGHT\"])}get holeSizeConstraint(){if(this.normalizedRuleKind===\"HOLESIZE\")return oM(this,[\"MINLIMIT\"],[],[\"MAXLIMIT\"])}get minimumSolderMaskSliverMils(){if(this.normalizedRuleKind===\"MINIMUMSOLDERMASKSLIVER\")return tc(this,\"MINSOLDERMASKWIDTH\")}get minimumSilkClearanceMils(){if([\"SILKTOBOARDREGIONCLEARANCE\",\"SILKTOSILKCLEARANCE\",\"SILKTOSOLDERMASKCLEARANCE\"].includes(this.normalizedRuleKind??\"\"))return tc(this,\"MINSILKSCREENTOMASKGAP\",\"SILKTOSILKCLEARANCE\")}get testPointSettings(){if(!this.normalizedRuleKind?.includes(\"TESTPOINT\"))return;const t={allowBottom:this.getBoolean(\"ALLOWSIDEBOTTOM\"),allowTop:this.getBoolean(\"ALLOWSIDETOP\"),gridMils:tc(this,\"TESTPOINTGRID\"),holeSize:oM(this,[\"MINHOLESIZE\"],[\"PREFEREDHOLESIZE\",\"PREFERREDHOLESIZE\"],[\"MAXHOLESIZE\"]),padSize:oM(this,[\"MINSIZE\"],[\"PREFEREDSIZE\",\"PREFERREDSIZE\"],[\"MAXSIZE\"]),underComponent:this.getBoolean(\"TESTPOINTUNDERCOMPONENT\"),useGrid:this.getBoolean(\"USEGRID\")};return u1e(t)?t:void 0}get normalizedRuleKind(){return this.ruleKind?.toUpperCase()}},Zfn=class extends wXe{type=\"dxp-rule-record\"};function oM(t,e,n,o){const i={maximumMils:tc(t,...o),minimumMils:tc(t,...e),preferredMils:tc(t,...n)};return u1e(i)?i:void 0}function e1n(t,e,n){e.startsWith(\"MIN\")?t.minimumMils=n:e.startsWith(\"MAX\")?t.maximumMils=n:t.preferredMils=n}function O$i(t,e){return t===\"TOPLAYER\"?\"TOP\":t===\"BOTTOMLAYER\"?\"BOTTOM\":`MID-LAYER${e??\"\"}`}function G$i(t,e){return t===\"TOP LAYER\"?\"TOP\":t===\"BOTTOM LAYER\"?\"BOTTOM\":`MID-LAYER${e??\"\"}`}function Y$i(t){if(/^(?:TRUE|T|1)$/iu.test(t))return!0;if(/^(?:FALSE|F|0)$/iu.test(t))return!1}function u1e(t){return Object.values(t).some(e=\u003ee!==void 0)}var U$i=class extends o8{type=\"pcb-document\";_lines;originalBytes;originalSource;sourceEncoding;constructor(t={}){super({sourceLocation:{column:1,endOffset:t.originalSource?.length,line:1,startOffset:0}}),this._lines=t.lines??[],this.originalBytes=t.originalBytes?.slice(),this.originalSource=t.originalSource,this.sourceEncoding=t.sourceEncoding,this.adoptChildren(this._lines),this.clearDirty(!0)}setOriginalBytes(t,e){return this.originalBytes=t.slice(),this.sourceEncoding=e,this}getBytes(){return!this.isDirty\u0026\u0026this.originalBytes?this.originalBytes.slice():c1e(this.getString(),this.sourceEncoding)}get lines(){return this._lines}set lines(t){t!==this._lines\u0026\u0026(this._lines=t,this.adoptChildren(t),this.markDirty())}get records(){return this.lines.filter(t=\u003et instanceof Ol)}get board(){return this.records.find(t=\u003et instanceof qfn)}get components(){return this.records.filter(t=\u003et instanceof e1e)}get nets(){return this.records.filter(t=\u003et instanceof t1e)}get classes(){return this.records.filter(t=\u003et instanceof vXe)}get index(){return rg(this)}get connectivity(){return jfn(this)}get boardGeometry(){return Ofn(this)}get polygons(){return this.records.filter(t=\u003et instanceof Xfn)}get rules(){return this.records.filter(t=\u003et instanceof wXe||t instanceof Zfn)}getComponentByIndex(t){return Qfn(this,t)}getNetByIndex(t){return vfn(this,t)}getPolygonByIndex(t){return wfn(this,t)}getRuleByIndex(t){return Pfn(this,t)}getComponentForRecord(t){return Mfn(this,t)}getNetForRecord(t){return Dfn(this,t)}getPolygonForRecord(t){return Nfn(this,t)}getRuleForRecord(t){return Rfn(this,t)}getRecordsOwnedByComponent(t){return n1e(this,t)}getRecordsOnNet(t){return Tfn(this,t)}getRecordsForPolygon(t){return kfn(this,t)}getRecordsForRule(t){return Ffn(this,t)}getRecordsByLayer(t){return[...this.index.byLayer.get(t.toUpperCase())??[]]}getComponentBounds(t,e){return $fn(this,t,e)}getRecordByUniqueId(t){return this.index.getRecordByUniqueId(t)}getRecordsByKind(t){return this.records.filter(e=\u003ee.recordKind===t)}insertRecord(t,e=this.lines.length){const n=Math.min(Math.max(e,0),this.lines.length);return t.setParent(this),this.lines.splice(n,0,t),this.markDirty(),this}removeRecord(t){const e=this.lines.indexOf(t);return e\u003c0?!1:(this.lines.splice(e,1),t.setParent(void 0),this.markDirty(),!0)}allocateRecordId(t,e=\"ID\"){const n=new Set(this.getRecordsByKind(t).map(i=\u003ei.getNumber(e)).filter(i=\u003ei!==void 0));let o=0;for(;n.has(o);)o++;return o}getChildren(){return[...this.lines]}getString(){return!this.isDirty\u0026\u0026this.originalSource!==void 0?this.originalSource:this.lines.map(t=\u003e`${t.getString()}${t.terminator}`).join(\"\")}},K$i=class{index;name;record;storage;compressedBytes;decodedPayload;constructor(t){this.compressedBytes=t.compressedBytes,this.index=t.index,this.name=t.name,this.record=t.record,this.storage=t.storage}get compressedSize(){return this.compressedBytes.byteLength}getCompressedBytes(){return this.compressedBytes.slice()}getBitmapBytes(t={}){return this.getPayload(t).bitmapBytes.slice()}getEnhancedMetafileBytes(t={}){return this.getPayload(t).enhancedMetafileBytes?.slice()}getNativePngBytes(t={}){return this.getPayload(t).nativePngBytes?.slice()}getDataUrl(t={}){return`data:image/png;base64,${X$i(this.getPngBytes(t))}`}getPngBytes(t={}){const e=this.getPayload(t);return e.nativePngBytes?.slice()??$i(e.bitmapBytes)}getPayload(t){return Object.keys(t).length\u003e0?t1n(this.compressedBytes,t):(this.decodedPayload??=t1n(this.compressedBytes),this.decodedPayload)}};function V$i(t,e){if(!t||e.length===0)return[];const n=z$i(t.content),o=new Set(n);return e.flatMap((i,r)=\u003e{const s=o1n(i.fileName),a=n.find(A=\u003eo.has(A)\u0026\u0026o1n(A.name)===s)??n.find(A=\u003eo.has(A));return a?(o.delete(a),[new K$i({compressedBytes:a.compressedBytes,index:r,name:a.name,record:i,storage:t})]):[]})}function z$i(t){if(t.byteLength\u003c4)throw new aA(\"Schematic image storage header is truncated\");const e=new DataView(t.buffer,t.byteOffset,t.byteLength);let o=4+e.getUint32(0,!0);if(o\u003et.byteLength)throw new aA(\"Schematic image storage header exceeds the stream\");const i=[];for(;o\u003ct.byteLength;){if(o+4\u003et.byteLength)throw new aA(\"Schematic image storage frame length is truncated\");const r=e.getUint32(o,!0)\u002616777215,s=o+4,a=s+r;if(r===0||a\u003et.byteLength)throw new aA(`Invalid schematic image storage frame length ${r}`);if(s+2\u003ea||t[s]!==208)throw new aA(\"Schematic image storage entry header is invalid\");const A=t[s+1]??0,c=s+2,l=c+A;if(l+4\u003ea)throw new aA(\"Schematic image storage entry name is truncated\");const u=e.getUint32(l,!0),g=l+4,h=g+u;if(h\u003ea)throw new aA(\"Schematic image storage compressed payload is truncated\");i.push({compressedBytes:t.subarray(g,h),name:new TextDecoder(\"windows-1252\").decode(t.subarray(c,l))}),o=a}return i}function t1n(t,e={}){const n=e.maximumBitmapSize??33554432,o=e.maximumMetafileSize??32*1024*1024,i=e.maximumNativeImageSize??32*1024*1024,r=e.maximumOutputSize??64*1024*1024;for(const[g,h]of[[\"maximumBitmapSize\",n],[\"maximumMetafileSize\",o],[\"maximumNativeImageSize\",i],[\"maximumOutputSize\",r]])if(!Number.isSafeInteger(h)||h\u003c=0)throw new RangeError(`${g} must be a positive safe integer`);let s=0;const a=[];try{const g=new Lce(d=\u003e{if(s+=d.byteLength,s\u003er)throw new aA(`Schematic image expands beyond the ${r}-byte limit`);a.push(d.slice())}),h=64*1024;for(let d=0;d\u003ct.byteLength;){const p=Math.min(d+h,t.byteLength);g.push(t.subarray(d,p),p===t.byteLength),d=p}}catch(g){throw g instanceof aA?g:new aA(`Schematic image zlib decompression failed: ${g instanceof Error?g.message:String(g)}`)}const A=n1n(a);if(A.byteLength\u003c6||A[0]!==66||A[1]!==77)throw new aA(\"Embedded schematic image is not a Windows bitmap\");const l=new DataView(A.buffer,A.byteOffset,A.byteLength).getUint32(2,!0);if(l\u003c14||l\u003en)throw new aA(`Embedded schematic bitmap declares invalid size ${l}`);if(l\u003eA.byteLength)throw new aA(\"Embedded schematic bitmap payload is truncated\");const u=J$i(A,l,o,i);return{bitmapBytes:A.slice(0,l),...u}}function J$i(t,e,n,o){if(e\u003e=t.byteLength)return{};const i=t[e]??0,r=e+1,s=r+i;if(s\u003et.byteLength)return{};const a=new TextDecoder(\"windows-1252\").decode(t.subarray(r,s));if(a===\"TdxPNGImage\"){const d=j$i(t.subarray(s),o);return d?{nativePngBytes:d}:{}}if(a!==\"TMetafile\"||s+88\u003et.byteLength)return{};const A=new DataView(t.buffer,t.byteOffset+s,t.byteLength-s),c=A.getUint32(0,!0),l=A.getUint32(4,!0),u=A.getUint32(40,!0),g=A.getUint32(48,!0);if(c!==1||![88,100,108].includes(l)||u!==1179469088||g\u003cl||g%4!==0||g\u003en||s+g\u003et.byteLength)return{};const h=t.slice(s,s+g);return W$i(h,l)?{enhancedMetafileBytes:h}:{}}function W$i(t,e){const n=new DataView(t.buffer,t.byteOffset,t.byteLength);let o=e;for(;o+8\u003c=t.byteLength;){const i=n.getUint32(o,!0),r=n.getUint32(o+4,!0),s=o+r;if(r\u003c8||r%4!==0||s\u003c=o||s\u003et.byteLength)return!1;if(i===14)return r\u003e=20\u0026\u0026s===t.byteLength;o=s}return!1}function j$i(t,e){const n=[137,80,78,71,13,10,26,10];if(t.byteLength\u003c20||t.byteLength\u003ee||!n.every((s,a)=\u003et[a]===s))return;const o=new DataView(t.buffer,t.byteOffset,t.byteLength);let i=n.length,r=!1;for(;i+12\u003c=t.byteLength;){const s=o.getUint32(i),a=i+12+s;if(s\u003ee||a\u003et.byteLength||a\u003ee)return;const A=new TextDecoder().decode(t.subarray(i+4,i+8));if(!r){if(A!==\"IHDR\"||s!==13)return;r=!0}if(A===\"IEND\")return s!==0?void 0:t.slice(0,a);i=a}}function $i(t){if(t.byteLength\u003c54||t[0]!==66||t[1]!==77)throw new aA(\"Embedded schematic image is not a supported Windows bitmap\");const e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=e.getUint32(10,!0),o=e.getUint32(14,!0),i=e.getInt32(18,!0),r=e.getInt32(22,!0),s=e.getUint16(26,!0),a=e.getUint16(28,!0),A=e.getUint32(30,!0),c=Math.abs(r);if(o\u003c40||i\u003c=0||c\u003c=0||i\u003e16384||c\u003e16384||s!==1||a!==24\u0026\u0026a!==32||A!==0)throw new aA(`Unsupported schematic bitmap (${i}x${r}, ${a}-bit, compression ${A})`);const l=a/8,u=Math.ceil(i*l/4)*4,g=u*c;if(!Number.isSafeInteger(g)||n\u003c14+o||n+g\u003et.byteLength)throw new aA(\"Embedded schematic bitmap pixel payload is truncated\");const h=1+i*4,d=new Uint8Array(h*c),p=r\u003c0;for(let f=0;f\u003cc;f++){const I=p?f:c-f-1,C=n+I*u,y=f*h;d[y]=0;for(let x=0;x\u003ci;x++){const E=C+x*l,B=y+1+x*4;d[B]=t[E+2]??0,d[B+1]=t[E+1]??0,d[B+2]=t[E]??0,d[B+3]=a===32?t[E+3]??255:255}}const m=new Uint8Array(13),_=new DataView(m.buffer);return _.setUint32(0,i),_.setUint32(4,c),m[8]=8,m[9]=6,n1n([new Uint8Array([137,80,78,71,13,10,26,10]),PXe(\"IHDR\",m),PXe(\"IDAT\",w8t(d,{level:6})),PXe(\"IEND\",new Uint8Array)])}function PXe(t,e){const n=new TextEncoder().encode(t),o=new Uint8Array(12+e.byteLength),i=new DataView(o.buffer);return i.setUint32(0,e.byteLength),o.set(n,4),o.set(e,8),i.setUint32(8+e.byteLength,q$i(o.subarray(4,8+e.byteLength))),o}function q$i(t){let e=4294967295;for(const n of t){e^=n;for(let o=0;o\u003c8;o++)e=e\u003e\u003e\u003e1^(e\u00261?3988292384:0)}return(e^4294967295)\u003e\u003e\u003e0}function n1n(t){const e=new Uint8Array(t.reduce((o,i)=\u003eo+i.byteLength,0));let n=0;for(const o of t)e.set(o,n),n+=o.byteLength;return e}function o1n(t){return t?.replace(/\\\\/gu,\"/\").split(\"/\").at(-1)?.toLowerCase()}function X$i(t){const e=[];for(let o=0;o\u003ct.byteLength;o+=32768)e.push(String.fromCharCode(...t.subarray(o,o+32768)));return btoa(e.join(\"\"))}var ol=class extends Ol{type=\"schematic-record\";constructor(t={}){super(t)}get ownerIndex(){return this.getNumber(\"OWNERINDEX\")}get ownerPartId(){return this.getNumber(\"OWNERPARTID\")}get indexInSheet(){return this.getNumber(\"INDEXINSHEET\")}get uniqueId(){return pi(this,\"UNIQUEID\")}get position(){const t=l1n(this,\"LOCATION.X\"),e=l1n(this,\"LOCATION.Y\");return t===void 0||e===void 0?void 0:{x:t,y:e}}},i1n=class extends ol{type=\"schematic-component-record\";get libraryReference(){return pi(this,\"LIBREFERENCE\")}},MXe=class extends ol{type=\"schematic-pin-record\";get name(){return pi(this,\"NAME\")}get designator(){return pi(this,\"DESIGNATOR\")}get electricalType(){return this.getNumber(\"ELECTRICAL\")}get hidden(){return this.getBoolean(\"ISHIDDEN\")}},DXe=class extends ol{type=\"schematic-label-record\";get text(){return pi(this,\"TEXT\")}},Z$i=class extends ol{type=\"schematic-bezier-record\"},eqi=class extends ol{type=\"schematic-polyline-record\"},tqi=class extends ol{type=\"schematic-polygon-record\"},nqi=class extends ol{type=\"schematic-ellipse-record\"},oqi=class extends ol{type=\"schematic-rounded-rectangle-record\"},iqi=class extends ol{type=\"schematic-elliptical-arc-record\"},rqi=class extends ol{type=\"schematic-arc-record\"},sqi=class extends ol{type=\"schematic-line-record\"},aqi=class extends ol{type=\"schematic-rectangle-record\"},r1n=class extends ol{type=\"schematic-sheet-symbol-record\";get fileName(){return pi(this,\"FILENAME\")}},Aqi=class extends ol{type=\"schematic-sheet-entry-record\";get name(){return pi(this,\"NAME\")}},NXe=class extends ol{type=\"schematic-power-port-record\";get text(){return pi(this,\"TEXT\")}},RXe=class extends ol{type=\"schematic-port-record\";get name(){return pi(this,\"NAME\")}},TXe=class extends ol{type=\"schematic-net-label-record\";get text(){return pi(this,\"TEXT\")}},cqi=class extends ol{type=\"schematic-bus-record\"},lqi=class extends ol{type=\"schematic-bus-entry-record\"},s1n=class extends ol{type=\"schematic-wire-record\"},uqi=class extends ol{type=\"schematic-no-erc-record\"},gqi=class extends ol{type=\"schematic-text-frame-record\";get text(){return pi(this,\"TEXT\")}},dqi=class extends ol{type=\"schematic-junction-record\"},a1n=class extends ol{type=\"schematic-image-record\";get fileName(){return pi(this,\"FILENAME\")}},hqi=class extends ol{type=\"schematic-sheet-record\"},A1n=class extends ol{type=\"schematic-sheet-name-record\"},c1n=class extends ol{type=\"schematic-sheet-file-name-record\"},pqi=class extends ol{type=\"schematic-designator-record\";get text(){return pi(this,\"TEXT\")}},mqi=class extends ol{type=\"schematic-template-record\";get fileName(){return pi(this,\"FILENAME\")}},_qi=class extends ol{type=\"schematic-parameter-record\";get name(){return pi(this,\"NAME\")}get text(){return pi(this,\"TEXT\")}},fqi=class extends ol{type=\"schematic-implementation-list-record\"},Iqi=class extends ol{type=\"schematic-implementation-record\";get modelName(){return pi(this,\"MODELNAME\")}get modelType(){return pi(this,\"MODELTYPE\")}},Cqi=class extends ol{type=\"schematic-implementation-map-record\"},yqi=class extends ol{type=\"schematic-implementation-parameter-record\"},xqi=class extends ol{type=\"schematic-note-record\";get text(){return pi(this,\"TEXT\")}};function l1n(t,e){const n=t.getCaseInsensitive(e);if(n===void 0)return;const o=Number(n);if(!Number.isFinite(o))return;const i=t.getCaseInsensitive(`${e}_FRAC`);if(i===void 0)return o;const r=+`0.${i.replace(/^[+-]/u,\"\")}`;return Number.isFinite(r)?o\u003c0?o-r:o+r:o}var u1n=new WeakMap,g1n=new WeakMap,Eqi=class{constructor(t){this.document=t,this.records=t.records;for(const e of this.records){const n=e.getNumber(\"OWNERINDEX\");if(n!==void 0\u0026\u0026n\u003e=0){const a=this.byOwner.get(n);a?a.push(e):this.byOwner.set(n,[e])}const o=e.getDecoded(\"UNIQUEID\");if(!o)continue;const i=o.toUpperCase(),r=this.uniqueIds.get(i);if(!r){this.uniqueIds.set(i,e);continue}const s=this.duplicateUniqueIds.get(i)??[r];s.push(e),this.duplicateUniqueIds.set(i,s)}}document;byOwner=new Map;duplicateUniqueIds=new Map;records;uniqueIds=new Map;getParent(t){const e=t.getNumber(\"OWNERINDEX\");return e===void 0||e\u003c0?void 0:this.records[e]}getOwnedRecords(t){const e=typeof t==\"number\"?t:this.records.indexOf(t);return e\u003c0?[]:[...this.byOwner.get(e)??[]]}getRecordByUniqueId(t){return this.uniqueIds.get(t.toUpperCase())}getOwnershipCycles(){const t=[],e=new Set;for(const n of this.records){if(e.has(n))continue;const o=[],i=new Map;let r=n;for(;r;){const s=i.get(r);if(s!==void 0){t.push(o.slice(s));break}if(e.has(r))break;i.set(r,o.length),o.push(r),r=this.getParent(r)}for(const s of o)e.add(s)}return t}},Bqi=class{constructor(t){this.document=t;const e=new wqi,n=new Map,o=new Map;for(const a of t.wires){const A=Qqi(a);for(const c of A){const l=g1e(c);e.add(l),o.set(l,c),p1n(n,l,a)}for(let c=1;c\u003cA.length;c++){const l=A[c-1],u=A[c];l\u0026\u0026u\u0026\u0026e.union(g1e(l),g1e(u))}}const i=[...t.pins,...t.labels,...t.netLabels,...t.ports,...t.powerPorts];for(const a of i){const A=a.position;if(!A)continue;const c=g1e(A);e.add(c),o.set(c,A),p1n(n,c,a)}const r=new Map;for(const[a,A]of n){const c=e.find(a),l=r.get(c)??{names:new Set,points:new Map,records:new Set},u=o.get(a);u\u0026\u0026l.points.set(a,u);for(const g of A){l.records.add(g);const h=vqi(g);h\u0026\u0026l.names.add(h)}r.set(c,l)}const s=[];for(const[a,A]of r){const c=new Set([...A.names].map(g=\u003eg.toUpperCase())),l=s.filter(g=\u003e[...g.names].some(h=\u003ec.has(h.toUpperCase())));if(l.length===0||c.size===0){s.push({id:a,...A});continue}const u=l[0];if(u){m1n(u,A);for(const g of l.slice(1)){m1n(u,g);const h=s.indexOf(g);h\u003e=0\u0026\u0026s.splice(h,1)}}}this.nets=s.map(a=\u003e({id:a.id,names:[...a.names],points:[...a.points.values()],records:[...a.records]}));for(const a of this.nets)for(const A of a.records)this.recordNets.set(A,a)}document;nets;recordNets=new Map;getNetForRecord(t){return this.recordNets.get(t)}getNetsByName(t){const e=t.toUpperCase();return this.nets.filter(n=\u003en.names.some(o=\u003eo.toUpperCase()===e))}getPinsForComponent(t){return kXe(this.document).getOwnedRecords(t).filter(e=\u003ee instanceof MXe)}};function kXe(t){const e=u1n.get(t);if(e?.revision===t.revision)return e.index;const n=new Eqi(t);return u1n.set(t,{index:n,revision:t.revision}),n}function bqi(t){const e=g1n.get(t);if(e?.revision===t.revision)return e.graph;const n=new Bqi(t);return g1n.set(t,{graph:n,revision:t.revision}),n}function Sqi(t){const e=kXe(t);return t.sheetSymbols.map(n=\u003e{const o=e.getOwnedRecords(n),i=o.find(s=\u003es instanceof A1n),r=o.find(s=\u003es instanceof c1n);return{fileName:r?.getDecoded(\"TEXT\"),fileNameRecord:r,name:i?.getDecoded(\"TEXT\"),nameRecord:i,symbol:n}})}function Qqi(t){const e=t.getNumber(\"LOCATIONCOUNT\"),n=e===void 0?1e5:Math.min(Math.max(e,0),1e5),o=[];for(let i=1;i\u003c=n;i++){const r=d1n(t,`X${i}`),s=d1n(t,`Y${i}`);if(r===void 0||s===void 0)break;o.push({x:r,y:s})}return o}function vqi(t){if(t instanceof TXe||t instanceof DXe||t instanceof NXe)return t.getDecoded(\"TEXT\");if(t instanceof RXe)return t.getDecoded(\"NAME\")}function d1n(t,e){const n=t.getCaseInsensitive(e);if(n===void 0)return;const o=Number(n);if(!Number.isFinite(o))return;const i=t.getCaseInsensitive(`${e}_FRAC`);if(i===void 0)return o;const r=+`0.${i.replace(/^[+-]/u,\"\")}`;return Number.isFinite(r)?o\u003c0?o-r:o+r:o}function g1e(t){return`${h1n(t.x)},${h1n(t.y)}`}function h1n(t){return t.toFixed(6).replace(/\\.?0+$/u,\"\")}function p1n(t,e,n){const o=t.get(e);o?o.push(n):t.set(e,[n])}function m1n(t,e){for(const n of e.names)t.names.add(n);for(const[n,o]of e.points)t.points.set(n,o);for(const n of e.records)t.records.add(n)}var wqi=class{parents=new Map;add(t){this.parents.has(t)||this.parents.set(t,t)}find(t){this.add(t);const e=this.parents.get(t);if(e===void 0||e===t)return t;const n=this.find(e);return this.parents.set(t,n),n}union(t,e){const n=this.find(t),o=this.find(e);n!==o\u0026\u0026this.parents.set(o,n)}},d1e=class extends o8{type=\"schematic-document\";compoundFile;embeddedImages;originalBytes;originalText;sourceEncoding;sourceFormat;_lines;constructor(t){super({sourceLocation:t.sourceFormat===\"binary\"?{byteOffset:0,streamPath:\"/\"}:{column:1,endOffset:t.originalText?.length,line:1,startOffset:0}}),this.compoundFile=t.compoundFile,this._lines=t.lines??[],this.originalBytes=t.originalBytes,this.originalText=t.originalText,this.sourceEncoding=t.sourceEncoding,this.sourceFormat=t.sourceFormat,this.embeddedImages=V$i(this.compoundFile?.getStream(\"/Storage\"),this.records.filter(e=\u003ee instanceof a1n)),this.adoptChildren([...this.compoundFile?[this.compoundFile]:[],...this._lines]),this.clearDirty(!0)}get lines(){return this._lines}set lines(t){t!==this._lines\u0026\u0026(this._lines=t,this.adoptChildren(t),this.markDirty())}get header(){return this.lines.find(t=\u003et instanceof Ol\u0026\u0026t.getCaseInsensitive(\"HEADER\")!==void 0)}get records(){return this.lines.filter(t=\u003et instanceof Ol\u0026\u0026t.recordKind!==void 0)}get index(){return kXe(this)}get netGraph(){return bqi(this)}get components(){return this.records.filter(t=\u003et instanceof i1n)}get pins(){return this.records.filter(t=\u003et instanceof MXe)}get wires(){return this.records.filter(t=\u003et instanceof s1n)}get labels(){return this.records.filter(t=\u003et instanceof DXe)}get netLabels(){return this.records.filter(t=\u003et instanceof TXe)}get ports(){return this.records.filter(t=\u003et instanceof RXe)}get powerPorts(){return this.records.filter(t=\u003et instanceof NXe)}get sheetSymbols(){return this.records.filter(t=\u003et instanceof r1n)}get sheetLinks(){return Sqi(this)}getEmbeddedImageForRecord(t){return this.embeddedImages.find(e=\u003ee.record===t)}getRecordsByKind(t){return this.records.filter(e=\u003ee.recordKind===t)}getParent(t){return this.index.getParent(t)}getOwnedRecords(t){return this.index.getOwnedRecords(t)}getRecordByUniqueId(t){return this.index.getRecordByUniqueId(t)}getBytes(){if(!this.isDirty\u0026\u0026this.originalBytes)return this.originalBytes.slice();if(this.sourceFormat===\"binary\")throw new Yg(\"Modified binary schematic documents cannot yet be serialized safely\");return c1e(this.getString(),this.sourceEncoding)}getChildren(){return[...this.compoundFile?[this.compoundFile]:[],...this.lines]}getString(){return!this.isDirty\u0026\u0026this.originalText!==void 0?this.originalText:this.lines.map(t=\u003e`${t.getString()}${t.terminator}`).join(\"\")}},_1n=class extends o8{metadata;path;constructor(t,e){super(),this.metadata=t,this.path=e,this.setSourceLocation({recordIndex:t.id,streamPath:`/${e.join(\"/\")}`})}get name(){return this.metadata.name}get pathString(){return`/${this.path.join(\"/\")}`}getString(){return this.pathString}},FXe=class extends _1n{type=\"compound-stream\";contentSource;loadedContent;constructor(t,e,n){super(t,e),this.contentSource=n,n instanceof Uint8Array\u0026\u0026(this.loadedContent=n)}get content(){return this.loadedContent??=typeof this.contentSource==\"function\"?this.contentSource():this.contentSource,this.loadedContent}get isContentLoaded(){return this.loadedContent!==void 0}replaceContent(t){this.loadedContent=t.slice(),this.markDirty()}getChildren(){return[]}},f1n=class Q4n extends _1n{type=\"compound-storage\";entries;constructor(e,n,o){super(e,n),this.entries=o,this.adoptChildren(o)}get storages(){return this.entries.filter(e=\u003ee instanceof Q4n)}get streams(){return this.entries.filter(e=\u003ee instanceof FXe)}getChildren(){return[...this.entries]}},Pqi=class extends o8{type=\"compound-file\";header;originalBytes;root;constructor(t){super({sourceLocation:{byteOffset:0,streamPath:\"/\"}}),this.header=t.header,this.originalBytes=t.originalBytes,this.root=t.root,this.adoptChildren([this.root]),this.clearDirty(!0)}get entries(){const t=[],e=n=\u003e{for(const o of n.entries)t.push(o),o instanceof f1n\u0026\u0026e(o)};return e(this.root),t}get streams(){return this.entries.filter(t=\u003et instanceof FXe)}getStream(t){const e=Mqi(t);return this.streams.find(n=\u003en.path.length===e.length\u0026\u0026n.path.every((o,i)=\u003eo.toLowerCase()===e[i]?.toLowerCase()))}getBytes(){if(this.isDirty)throw new Yg(\"Modified compound files cannot yet be serialized safely\");return this.originalBytes.slice()}getChildren(){return[this.root]}getString(){return this.entries.map(t=\u003et.pathString).join(`\n`)}};function Mqi(t){return(Array.isArray(t)?t:t.split(/[\\\\/]/u)).filter(Boolean)}var LXe=class extends pXe{},Kee=class extends LXe{type=\"ini-section-line\";_name;leading;trailing;constructor(t){super(t),this._name=t.name,this.leading=t.leading??\"\",this.trailing=t.trailing??\"\"}get name(){return this._name}set name(t){if(/[\\]\\r\\n]/u.test(t))throw new Error(\"INI section names cannot contain closing brackets\");t!==this._name\u0026\u0026(this._name=t,this.markDirty())}getChildren(){return[]}getString(){return`${this.leading}[${this.name}]${this.trailing}`}},HXe=class extends LXe{type=\"ini-key-value-line\";_key;_value;afterEquals;beforeEquals;leading;constructor(t){super(t),this._key=t.key,this._value=t.value??\"\",this.leading=t.leading??\"\",this.beforeEquals=t.beforeEquals??\"\",this.afterEquals=t.afterEquals??\"\"}get key(){return this._key}set key(t){if(t.length===0||/[=\\r\\n]/u.test(t))throw new Error(\"INI keys must be non-empty and cannot contain '='\");t!==this._key\u0026\u0026(this._key=t,this.markDirty())}get value(){return this._value}set value(t){if(/[\\r\\n]/u.test(t))throw new Error(\"INI values cannot contain line terminators\");t!==this._value\u0026\u0026(this._value=t,this.markDirty())}getChildren(){return[]}getString(){return`${this.leading}${this.key}${this.beforeEquals}=${this.afterEquals}${this.value}`}},I1n=class extends LXe{type=\"ini-comment-line\";_raw;constructor(t){super(t),this._raw=t.raw}get raw(){return this._raw}set raw(t){if(/[\\r\\n]/u.test(t))throw new Error(\"INI comments cannot contain line terminators\");t!==this._raw\u0026\u0026(this._raw=t,this.markDirty())}getChildren(){return[]}getString(){return this.raw}},Dqi=class extends I1n{type=\"ini-raw-line\"},h1e=class extends o8{type=\"ini-document\";_lines;originalBytes;originalSource;sourceEncoding;constructor(t={}){super({sourceLocation:{column:1,endOffset:t.originalSource?.length,line:1,startOffset:0}}),this._lines=t.lines??[],this.originalBytes=t.originalBytes?.slice(),this.originalSource=t.originalSource,this.sourceEncoding=t.sourceEncoding,this.adoptChildren(this._lines),this.clearDirty(!0)}setOriginalBytes(t,e){return this.originalBytes=t.slice(),this.sourceEncoding=e,this}getBytes(){return!this.isDirty\u0026\u0026this.originalBytes?this.originalBytes.slice():c1e(this.getString(),this.sourceEncoding)}get lines(){return this._lines}set lines(t){t!==this._lines\u0026\u0026(this._lines=t,this.adoptChildren(t),this.markDirty())}get sections(){const t=[{entries:[],name:\"\"}];for(const e of this.lines)e instanceof Kee?t.push({entries:[],header:e,name:e.name}):e instanceof HXe\u0026\u0026t.at(-1)?.entries.push(e);return t}getSection(t){const e=t.toUpperCase();return this.sections.find(n=\u003en.name.toUpperCase()===e)}getAll(t,e){const n=e.toUpperCase();return this.getSection(t)?.entries.filter(o=\u003eo.key.toUpperCase()===n).map(o=\u003eo.value)??[]}get(t,e){return this.getAll(t,e)[0]}set(t,e,n){const o=this.getSection(t),i=e.toUpperCase(),r=o?.entries.find(A=\u003eA.key.toUpperCase()===i);if(r)return r.value=n,this;let s=this.lines.length;if(o){const A=o.header?this.lines.indexOf(o.header):-1,c=this.lines.findIndex((l,u)=\u003eu\u003eA\u0026\u0026l instanceof Kee);s=c\u003c0?this.lines.length:c}else{const A=C1n(this),c=this.lines.at(-1);c\u0026\u0026c.terminator===\"\"\u0026\u0026(c.terminator=A,c.markDirty());const l=new Kee({name:t,terminator:A}).setParent(this);this.lines.push(l),s=this.lines.length}const a=new HXe({key:e,terminator:C1n(this),value:n}).setParent(this);return this.lines.splice(s,0,a),this.markDirty(),this}removeSection(t){const e=this.getSection(t);if(!e)return!1;const n=e.header?this.lines.indexOf(e.header):0,o=this.lines.findIndex((s,a)=\u003ea\u003en\u0026\u0026s instanceof Kee),i=(o\u003c0?this.lines.length:o)-n,r=this.lines.splice(n,i);for(const s of r)s.setParent(void 0);return this.markDirty(),!0}getChildren(){return[...this.lines]}getString(){return!this.isDirty\u0026\u0026this.originalSource!==void 0?this.originalSource:this.lines.map(t=\u003e`${t.getString()}${t.terminator}`).join(\"\")}};function Nqi(t){return new h1e({lines:p1e(t),originalSource:t})}function p1e(t){return Rqi(t).map(({content:e,lineNumber:n,startOffset:o,terminator:i})=\u003e{const r={column:1,endColumn:e.length+1,endLine:n,endOffset:o+e.length,line:n,startOffset:o},s={nodeId:`ini:${o}`,sourceLocation:r,terminator:i},a=/^(\\s*)\\[([^\\]]*)\\](\\s*)$/u.exec(e);if(a?.[2]!==void 0)return new Kee({...s,leading:a[1],name:a[2],trailing:a[3]});if(/^\\s*[;#]/u.test(e))return new I1n({...s,raw:e});const A=e.indexOf(\"=\");if(A\u003e0){const c=e.slice(0,A),l=/^\\s*/u.exec(c)?.[0]??\"\",u=c.slice(l.length),g=u.trimEnd(),h=u.slice(g.length),d=e.slice(A+1),p=/^\\s*/u.exec(d)?.[0]??\"\";return new HXe({...s,afterEquals:p,beforeEquals:h,key:g,leading:l,value:d.slice(p.length)})}return new Dqi({...s,raw:e})})}function Rqi(t){const e=[];let n=0,o=1;for(let i=0;i\u003ct.length;i++){const r=t[i];if(r!==\"\\r\"\u0026\u0026r!==`\n`)continue;const s=r===\"\\r\"\u0026\u0026t[i+1]===`\n`;e.push({content:t.slice(n,i),lineNumber:o,startOffset:n,terminator:s?`\\r\n`:r}),s\u0026\u0026i++,n=i+1,o++}return n\u003ct.length\u0026\u0026e.push({content:t.slice(n),lineNumber:o,startOffset:n,terminator:\"\"}),e}function C1n(t){return t.lines.find(e=\u003ee.terminator!==\"\")?.terminator??`\n`}var Tqi=class extends h1e{type=\"output-job-document\";constructor(t={}){super(t)}get outputs(){return this.sections.flatMap(t=\u003e{const e=rK(t,\"OUTPUTTYPE\")??rK(t,\"OUTPUTGENERATOR\")??rK(t,\"OUTPUTNAME\");return e===void 0?[]:[{category:Lqi(e),dataSource:rK(t,\"DATASOURCE\")??rK(t,\"SOURCE\"),outputType:e,section:t,settings:Fqi(t),variant:rK(t,\"VARIANT\")}]})}get containers(){return this.sections.filter(t=\u003et.entries.some(e=\u003e/^(?:CONTAINERTYPE|OUTPUTMEDIUM|OUTPUTCONTAINER)$/iu.test(e.key)))}get fabricationOutputs(){return this.outputs.filter(t=\u003et.category===\"fabrication\")}get drillOutputs(){return this.outputs.filter(t=\u003et.category===\"drill\")}get pickAndPlaceOutputs(){return this.outputs.filter(t=\u003et.category===\"pick-and-place\")}get bomOutputs(){return this.outputs.filter(t=\u003et.category===\"bom\")}get drawingOutputs(){return this.outputs.filter(t=\u003et.category===\"drawing\")}get reportOutputs(){return this.outputs.filter(t=\u003et.category===\"report\")}};function kqi(t){return new Tqi({lines:p1e(t),originalSource:t})}function rK(t,e){const n=e.toUpperCase();return t.entries.find(o=\u003eo.key.toUpperCase()===n)?.value}function Fqi(t){const e={};for(const n of t.entries){const o=n.key.toUpperCase(),i=e[o];i?i.push(n.value):e[o]=[n.value]}return e}function Lqi(t){return/GERBER|ODB|IPC.?2581/iu.test(t)?\"fabrication\":/DRILL|NC\\b/iu.test(t)?\"drill\":/PICK.?AND.?PLACE|PICK.?PLACE|PICKPLACE|CENTROID/iu.test(t)?\"pick-and-place\":/\\bBOM\\b|BILL OF MATERIAL/iu.test(t)?\"bom\":/DRAWING|PDF|DRAFTSMAN|PRINT/iu.test(t)?\"drawing\":/ASSEMBLY/iu.test(t)?\"assembly\":/REPORT|VALIDATION|DESIGN RULE|ERC|DRC/iu.test(t)?\"report\":\"unknown\"}var Hqi=class{constructor(t,e){this.project=t,this.baseDirectory=e,this.nodes=t.documents.map(n=\u003e({kind:n.kind,path:n.path,reference:n,resolvedPath:OXe(e,n.path),uniqueId:n.uniqueId}));for(const n of this.nodes)this.byPath.set(m1e(n.resolvedPath).toUpperCase(),n),n.uniqueId\u0026\u0026this.byUniqueId.set(n.uniqueId.toUpperCase(),n)}project;baseDirectory;byPath=new Map;byUniqueId=new Map;nodes;getByKind(t){const e=t.toUpperCase();return this.nodes.filter(n=\u003en.kind?.toUpperCase()===e)}getByPath(t){return this.byPath.get(m1e(t).toUpperCase())}getByUniqueId(t){return this.byUniqueId.get(t.toUpperCase())}},Oqi=class extends h1e{type=\"project-document\";constructor(t={}){super(t)}get documents(){return this.sections.flatMap(t=\u003e{const e=sK(t,\"DOCUMENTPATH\");return e?[{kind:sK(t,\"DOCUMENTKIND\")??E1n(e),path:e,section:t,uniqueId:sK(t,\"DOCUMENTUNIQUEID\")}]:[]})}get variants(){return this.sections.flatMap(t=\u003e{if(!t.name.toUpperCase().includes(\"VARIANT\"))return[];const e=sK(t,\"VARIANTNAME\")??sK(t,\"NAME\")??t.name;return[{alternateParts:GXe(t,/ALTERNATE|PARTCHOICE/iu),description:sK(t,\"DESCRIPTION\"),name:e,parameters:GXe(t,/PARAMETER/iu),section:t}]})}get projectOptions(){return this.sections.filter(t=\u003e/^(?:DESIGN|PROJECTOPTIONS?|OPTIONS?|PREFERENCES)$/iu.test(t.name))}get projectParameters(){return this.sections.flatMap(t=\u003eGXe(t,/PARAMETER/iu,/PARAMETER|PARAMETERS/iu.test(t.name)))}get compilerSettings(){return this.sections.filter(t=\u003e/COMPILER|COMPILATION/iu.test(t.name))}get ecoSettings(){return this.sections.filter(t=\u003e/\\bECO\\b/iu.test(t.name))}resolveDocumentPaths(t){return this.documents.map(e=\u003eOXe(t,e.path))}getDocumentGraph(t){return new Hqi(this,t)}addDocument(t,e={}){if(t.trim().length===0||t.includes(\"\\0\")||/[\\r\\n]/u.test(t))throw new TypeError(\"Project document paths must be non-empty single-line values\");const n=B1n(this,\"Document\");this.set(n,\"DocumentPath\",t);const o=e.kind??E1n(t);o\u0026\u0026this.set(n,\"DocumentKind\",o),e.uniqueId\u0026\u0026this.set(n,\"DocumentUniqueId\",e.uniqueId);const i=this.documents.find(r=\u003er.section.name===n);if(!i)throw new Error(\"Failed to create project document reference\");return i}removeDocument(t){const e=typeof t==\"string\"?this.documents.find(n=\u003en.path===t||n.uniqueId===t):t;return e?this.removeSection(e.section.name):!1}addVariant(t,e={}){if(t.trim().length===0||t.includes(\"\\0\")||/[\\r\\n]/u.test(t))throw new TypeError(\"Project variant names must be non-empty single-line values\");const n=B1n(this,\"Variant\");this.set(n,\"VariantName\",t),e.description\u0026\u0026this.set(n,\"Description\",e.description);const o=this.variants.find(i=\u003ei.section.name===n);if(!o)throw new Error(\"Failed to create project variant\");return o}removeVariant(t){const e=typeof t==\"string\"?this.variants.find(n=\u003en.name===t):t;return e?this.removeSection(e.section.name):!1}};function y1n(t){return new Oqi({lines:p1e(t),originalSource:t})}function OXe(t,e){if(Gqi(e))return m1e(e);const n=/\\\\/u.test(t)?\"\\\\\":\"/\",o=`${x1n(t)}${n}${e}`;return m1e(o,n)}function Gqi(t){return/^(?:[a-z]:[\\\\/]|\\\\\\\\|\\/)/iu.test(t)}function m1e(t,e){const n=e??(/\\\\/u.test(t)\u0026\u0026!/\\//u.test(t)?\"\\\\\":\"/\"),o=/^([a-z]:|\\\\\\\\[^\\\\/]+[\\\\/][^\\\\/]+|\\/)/iu.exec(t)?.[0]??\"\",i=t.slice(o.length).split(/[\\\\/]+/u).filter(Boolean),r=[];for(const A of i)A!==\".\"\u0026\u0026(A===\"..\"\u0026\u0026r.length\u003e0?r.pop():A!==\"..\"\u0026\u0026r.push(A));const s=x1n(o),a=r.join(n);return o===\"/\"?`/${a}`:s?a?`${s}${n}${a}`:s:a}function x1n(t){let e=t.length;for(;e\u003e0;){const n=t[e-1];if(n!==\"/\"\u0026\u0026n!==\"\\\\\")break;e--}return t.slice(0,e)}function E1n(t){const e=/\\.([^.\\\\/]+)$/u.exec(t)?.[1]?.toLowerCase();return e===void 0?void 0:{outjob:\"output-job\",pcbdoc:\"pcb-document\",pcblib:\"pcb-library\",schdoc:\"schematic-document\",schlib:\"schematic-library\"}[e]}function sK(t,e){const n=e.toUpperCase();return t.entries.find(o=\u003eo.key.toUpperCase()===n)?.value}function GXe(t,e,n=!1){return t.entries.filter(o=\u003en||e.test(o.key)).map(o=\u003e({key:o.key,section:t,value:o.value}))}function B1n(t,e){const n=new Set(t.sections.map(i=\u003ei.name.toUpperCase()));let o=1;for(;n.has(`${e}${o}`.toUpperCase());)o++;return`${e}${o}`}var Yqi=class extends h1e{type=\"workspace-document\";constructor(t={}){super(t)}get projects(){return this.sections.flatMap(t=\u003e/SESSION|WINDOW|VIEW|RECENT|UI/iu.test(t.name)?[]:t.entries.filter(e=\u003e/PROJECT/iu.test(e.key)\u0026\u0026/\\.PRJPCB(?:$|[?#])/iu.test(e.value.trim())).map(e=\u003e({key:e.key,path:e.value,section:t})))}get sessionSections(){return this.sections.filter(t=\u003e/SESSION|WINDOW|VIEW|RECENT|UI/iu.test(t.name))}resolveProjectPaths(t){return this.projects.map(e=\u003eOXe(t,e.path))}};function Uqi(t){return new Yqi({lines:p1e(t),originalSource:t})}var b1n=new Uint8Array([208,207,17,224,161,177,26,225]),S1n=4294967290,Q1n=4294967294,_1e=4294967295,v1n=4294967295;function f1e(t){return t.byteLength\u003e=b1n.byteLength\u0026\u0026b1n.every((e,n)=\u003et[n]===e)}function Vee(t,e={}){const n=e.maxFileSize??268435456,o=e.maxChainLength??1e6,i=e.maxDirectoryEntries??1e5;if(t.byteLength\u003en)throw new aA(`Compound file is ${t.byteLength} bytes, exceeding the ${n}-byte limit`);if(t.byteLength\u003c512)throw new aA(\"Compound file header is truncated\",{byteOffset:t.byteLength});if(!f1e(t))throw new aA(\"Input does not begin with the OLE/CFB signature\",{byteOffset:0});const r=new DataView(t.buffer,t.byteOffset,t.byteLength),s=r.getUint16(24,!0),a=r.getUint16(26,!0),A=r.getUint16(28,!0),c=r.getUint16(30,!0),l=r.getUint16(32,!0);if(a!==3\u0026\u0026a!==4)throw new jji(`Unsupported CFB major version ${a}`);const u=a===3?9:12;if(c!==u)throw new aA(`CFB version ${a} must use sector shift ${u}, got ${c}`,{byteOffset:30});if(A!==65534)throw new aA(`Unsupported CFB byte order 0x${A.toString(16)}`,{byteOffset:28});const g=2**c,h=2**l,d=Math.floor(t.byteLength/g)-1;if(d\u003c0)throw new aA(\"Compound file has no sectors\");const p=r.getUint32(40,!0),m=r.getUint32(44,!0),_=r.getUint32(48,!0),f=r.getUint32(56,!0),I=r.getUint32(60,!0),C=r.getUint32(64,!0),y=r.getUint32(68,!0),x=r.getUint32(72,!0),E={byteOrder:A,directorySectorCount:p,fatSectorCount:m,majorVersion:a,miniFatSectorCount:C,miniSectorSize:h,miniStreamCutoffSize:f,minorVersion:s,sectorSize:g},B=ne=\u003e{zqi(ne,d);const le=(ne+1)*g,ge=le+g;if(ge\u003et.byteLength)throw new aA(`Sector ${ne} extends beyond the file`,{byteOffset:le});return t.subarray(le,ge)},S=[];for(let ne=0;ne\u003c109;ne++){const le=r.getUint32(76+ne*4,!0);le!==_1e\u0026\u0026S.push(le)}let Q=y;const w=new Set;for(let ne=0;ne\u003cx;ne++){if(Q===Q1n||Q===_1e)throw new aA(`DIFAT chain ended after ${ne} of ${x} sectors`);if(w.has(Q))throw new aA(`DIFAT chain contains a loop at sector ${Q}`);w.add(Q);const le=B(Q),ge=zee(le),_e=g/4-1;for(let ue=0;ue\u003c_e;ue++){const fe=ge.getUint32(ue*4,!0);fe!==_1e\u0026\u0026S.push(fe)}Q=ge.getUint32(g-4,!0)}if(S.length\u003cm)throw new aA(`Header declares ${m} FAT sectors, but DIFAT contains ${S.length}`);S.length=m;const M=[];for(const ne of S){const le=B(ne),ge=zee(le);for(let _e=0;_e\u003cle.byteLength;_e+=4)M.push(ge.getUint32(_e,!0))}const k=(ne,le)=\u003ew1n({allocationTable:M,expectedSize:le,maxChainLength:o,readUnit:B,startSector:ne,unitSize:g}),R=k(_),F=Kqi(R,a,i),O=F[0];if(O?.rawType!==5)throw new aA(\"Directory entry 0 is not a root storage\");const U=k(O.metadata.startSector,O.metadata.size),Y=C===0?new Uint8Array:k(I,C*g),W=zee(Y),te=[];for(let ne=0;ne+4\u003c=Y.byteLength;ne+=4)te.push(W.getUint32(ne,!0));const j=ne=\u003e{const le=ne*h,ge=le+h;if(ne\u003c0||ge\u003eU.byteLength)throw new aA(`Mini sector ${ne} extends beyond the root mini stream`);return U.subarray(le,ge)},J=ne=\u003e{if(ne.size===0)return new Uint8Array;if(ne.size\u003cf){if(te.length===0)throw new aA(`Stream ${JSON.stringify(ne.name)} requires a MiniFAT`);return w1n({allocationTable:te,expectedSize:ne.size,maxChainLength:o,readUnit:j,startSector:ne.startSector,unitSize:h})}return k(ne.startSector,ne.size)},oe=new Set([0]),ie=(ne,le)=\u003e{const ge=ne.rawType===5?le:[...le,ne.metadata.name],_e=[],ue=Vqi(ne.metadata.childId,F);for(const fe of ue){if(oe.has(fe))throw new aA(`Directory entry ${fe} is referenced more than once`);oe.add(fe);const pe=F[fe];!pe||pe.rawType===0||(pe.rawType===1?_e.push(ie(pe,ge)):pe.rawType===2\u0026\u0026_e.push(new FXe(pe.metadata,[...ge,pe.metadata.name],()=\u003eJ(pe.metadata))))}return new f1n(ne.metadata,ge,_e)};return new Pqi({header:E,originalBytes:t.slice(),root:ie(O,[])})}function Kqi(t,e,n){const o=Math.floor(t.byteLength/128);if(o\u003en)throw new aA(`Directory contains ${o} entries, exceeding the ${n}-entry limit`);const i=[],r=zee(t);for(let s=0;s\u003co;s++){const a=s*128,A=r.getUint16(a+64,!0),c=r.getUint8(a+66);if(A\u003e64||A%2!==0)throw new aA(`Directory entry ${s} has invalid UTF-16 name length ${A}`,{byteOffset:a+64});const l=t.subarray(a,a+Math.max(A-2,0)),u=r.getBigUint64(a+120,!0),g=Number(e===3?u\u00260xffffffffn:u);if(!Number.isSafeInteger(g))throw new aA(`Directory entry ${s} stream size exceeds JavaScript's safe integer range`);i.push({metadata:{childId:r.getUint32(a+76,!0),clsid:Wqi(t.subarray(a+80,a+96)),color:r.getUint8(a+67),creationTime:r.getBigUint64(a+100,!0),id:s,leftSiblingId:r.getUint32(a+68,!0),modifiedTime:r.getBigUint64(a+108,!0),name:l.byteLength===0?\"\":jqi(l),rightSiblingId:r.getUint32(a+72,!0),size:g,startSector:r.getUint32(a+116,!0),stateBits:r.getUint32(a+96,!0),type:Jqi(c)},rawType:c})}return i}function Vqi(t,e){if(t===v1n)return[];const n=[],o=new Set,i=r=\u003e{if(r===v1n)return;if(r\u003e=e.length)throw new aA(`Directory sibling tree references missing entry ${r}`);if(o.has(r))throw new aA(`Directory sibling tree contains a loop at entry ${r}`);o.add(r);const s=e[r];s\u0026\u0026(i(s.metadata.leftSiblingId),n.push(r),i(s.metadata.rightSiblingId))};return i(t),n}function w1n(t){if(t.expectedSize===0)return new Uint8Array;const e=[],n=new Set;let o=t.startSector;for(;o!==Q1n;){if(o\u003e=S1n||o\u003e=t.allocationTable.length)throw new aA(`Sector chain references invalid sector ${o}`);if(n.has(o))throw new aA(`Sector chain contains a loop at sector ${o}`);if(e.length\u003e=t.maxChainLength)throw new aA(`Sector chain exceeds the ${t.maxChainLength}-sector limit`);n.add(o),e.push(o),o=t.allocationTable[o]??_1e}const i=e.length*t.unitSize;if(t.expectedSize!==void 0\u0026\u0026i\u003ct.expectedSize)throw new aA(`Sector chain contains ${i} bytes, expected ${t.expectedSize}`);const r=t.expectedSize??i,s=new Uint8Array(r);let a=0;for(const A of e){if(a\u003e=r)break;const c=t.readUnit(A),l=r-a;s.set(c.subarray(0,Math.min(c.byteLength,l)),a),a+=Math.min(c.byteLength,l)}return s}function zqi(t,e){if(t\u003e=S1n||t\u003e=e)throw new aA(`Invalid regular sector ${t}; file contains ${e} sectors`)}function zee(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Jqi(t){return t===1?\"storage\":t===2?\"stream\":t===5?\"root\":\"stream\"}function Wqi(t){return[...t].map(e=\u003ee.toString(16).padStart(2,\"0\")).join(\"\")}function jqi(t){const e=zee(t),n=[];for(let o=0;o+2\u003c=t.byteLength;o+=2)n.push(e.getUint16(o,!0));return String.fromCharCode(...n)}function $qi(t,e={}){const n=e.maxFileSize??268435456;if(!Number.isSafeInteger(n)||n\u003c=0)throw new RangeError(\"maxFileSize must be a positive safe integer\");if(t.byteLength\u003en)throw new RangeError(`Altium file is ${t.byteLength} bytes, exceeding the ${n}-byte detection limit`);if(t.byteLength\u003e=4\u0026\u0026t[0]===80\u0026\u0026t[1]===75\u0026\u0026(t[2]===3||t[2]===5||t[2]===7)\u0026\u0026(t[3]===4||t[3]===6||t[3]===8))return{confidence:1,container:\"zip\",documentKind:\"zip-container\",encoding:\"binary\",evidence:[\"ZIP local-file or directory signature\"]};if(f1e(t)){const a=Vee(t,e),A=[\"OLE/CFB signature\"];if(a.getStream(\"/Board6/Data\")\u0026\u0026a.getStream(\"/Board6/Header\"))return A.push(\"Board6/Data and Board6/Header streams\"),{confidence:1,container:\"cfb\",documentKind:\"pcb-document\",encoding:\"binary\",evidence:A};const c=a.getStream(\"/FileHeader\"),u=(c?qqi(c.content):void 0)?.toLowerCase();return u?.includes(\"schematic library\")?(A.push(\"schematic library FileHeader stream\"),{confidence:.95,container:\"cfb\",documentKind:\"schematic-library\",encoding:\"binary\",evidence:A}):u?.includes(\"pcb library\")?(A.push(\"PCB library FileHeader stream\"),{confidence:.95,container:\"cfb\",documentKind:\"pcb-library\",encoding:\"binary\",evidence:A}):u?.includes(\"integrated library\")?(A.push(\"integrated library FileHeader stream\"),{confidence:.9,container:\"cfb\",documentKind:\"integrated-library\",encoding:\"binary\",evidence:A}):u?.includes(\"schematic capture\")?(A.push(\"schematic capture FileHeader stream\"),{confidence:1,container:\"cfb\",documentKind:\"schematic-document\",encoding:\"binary\",evidence:A}):{confidence:.8,container:\"cfb\",documentKind:\"compound-file\",encoding:\"binary\",evidence:A}}const o=SXe(t,e.encoding),i=o.text.replace(/^\\uFEFF/u,\"\"),r=i.trimStart(),s=[];if(/^\u003c\\?xml(?:\\s|\u003e)/iu.test(r)||/^\u003c[a-z][^\u003e]*\u003e/iu.test(r))return{confidence:.85,container:\"xml\",documentKind:\"xml-document\",encoding:o.encoding,evidence:[\"XML declaration or root element\"]};if(/^\\|RECORD=Board(?:\\||$)/imu.test(i))return s.push(\"Board root record\"),{confidence:.98,container:\"ascii\",documentKind:\"pcb-document\",encoding:o.encoding,evidence:s};if(/^\\|HEADER=[^\\r\\n]*Schematic Library/imu.test(i))return{confidence:.95,container:\"ascii\",documentKind:\"schematic-library\",encoding:o.encoding,evidence:[\"schematic library header\"]};if(/^\\|HEADER=[^\\r\\n]*(?:PCB|Printed Circuit Board) Library/imu.test(i)||/^\\|RECORD=(?:Pcb)?Library(?:\\||$)/imu.test(i))return{confidence:.9,container:\"ascii\",documentKind:\"pcb-library\",encoding:o.encoding,evidence:[\"PCB library header or root record\"]};if(/^\\|HEADER=[^\\r\\n]*Schematic Capture/imu.test(i)||/^\\|RECORD=31(?:\\||$)/imu.test(i))return s.push(\"schematic header or sheet record\"),{confidence:.95,container:\"ascii\",documentKind:\"schematic-document\",encoding:o.encoding,evidence:s};if(/^\\|(?:RECORD|HEADER)=/mu.test(i))return s.push(\"Altium property records\"),{confidence:.65,container:\"ascii\",documentKind:\"unknown\",encoding:o.encoding,evidence:s};if(/^\\s*\\[[^\\]\\r\\n]+\\]\\s*$/mu.test(i)){const a=i.toUpperCase();return/DOCUMENTPATH\\s*=/u.test(a)||/\\[(?:DESIGN|DOCUMENT\\d+|SOURCEPROJECT)\\]/u.test(a)?{confidence:.86,container:\"ini\",documentKind:\"project\",encoding:o.encoding,evidence:[\"INI sections and project document metadata\"]}:/OUTPUT(?:TYPE|GENERATOR|MEDIUM|CONTAINER)\\s*=/u.test(a)||/\\[OUTPUTJOB/u.test(a)?{confidence:.86,container:\"ini\",documentKind:\"output-job\",encoding:o.encoding,evidence:[\"INI sections and output-job metadata\"]}:/\\[(?:PROJECTGROUP|WORKSPACE)/u.test(a)?{confidence:.8,container:\"ini\",documentKind:\"workspace\",encoding:o.encoding,evidence:[\"INI sections and workspace metadata\"]}:{confidence:.65,container:\"ini\",documentKind:\"ini-document\",encoding:o.encoding,evidence:[\"INI section syntax\"]}}return{confidence:.1,container:\"ascii\",documentKind:\"unknown\",encoding:o.encoding,evidence:s}}function qqi(t){if(t.byteLength\u003c8)return;const n=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0,!0)\u002616777215;if(n===0||n\u003et.byteLength-4)return;const o=t.subarray(4,4+n);return new TextDecoder(\"windows-1252\").decode(o)}var P1n=class extends Ol{type=\"arc-record\";constructor(t={}){super(t)}get center(){return qh(this,[\"LOCATION.X\",\"X\"],[\"LOCATION.Y\",\"Y\"])}get radiusMils(){return tc(this,\"RADIUS\")}get widthMils(){return tc(this,\"WIDTH\")}get startAngle(){return xI(this.getNumber(\"STARTANGLE\")??0)}get endAngle(){return xI(this.getNumber(\"ENDANGLE\")??360)}get layer(){return pi(this,\"LAYER\")}get netIndex(){return this.getNumber(\"NET\")}get componentIndex(){return this.getNumber(\"COMPONENT\")}get polygonIndex(){return this.getNumber(\"POLYGON\")}get isFullCircle(){const t=this.getNumber(\"STARTANGLE\")??0,e=this.getNumber(\"ENDANGLE\")??360;return Math.abs(e-t)\u003e=360||e===t}},M1n=class extends Ol{type=\"fill-record\";constructor(t={}){super(t)}get start(){return qh(this,[\"X1\"],[\"Y1\"])}get end(){return qh(this,[\"X2\"],[\"Y2\"])}get bounds(){if(!(!this.start||!this.end))return{minX:Math.min(this.start.x,this.end.x),minY:Math.min(this.start.y,this.end.y),maxX:Math.max(this.start.x,this.end.x),maxY:Math.max(this.start.y,this.end.y)}}get rotation(){return xI(this.getNumber(\"ROTATION\")??0)}get layer(){return pi(this,\"LAYER\")}get netIndex(){return this.getNumber(\"NET\")}get componentIndex(){return this.getNumber(\"COMPONENT\")}},D1n=class extends Ol{type=\"pad-record\";constructor(t={}){super(t)}get name(){return pi(this,\"NAME\")}get componentIndex(){return this.getNumber(\"COMPONENT\")}get netIndex(){return this.getNumber(\"NET\")}get layer(){return pi(this,\"LAYER\")}get position(){return qh(this,[\"X\"],[\"Y\"])}get size(){return Yee(this,[\"XSIZE\"],[\"YSIZE\"])}get middleSize(){return Yee(this,[\"MIDXSIZE\",\"MIDLAYER1XSIZE\"],[\"MIDYSIZE\",\"MIDLAYER1YSIZE\"])}get bottomSize(){return Yee(this,[\"BOTTOMXSIZE\",\"BOTTOMLAYERXSIZE\"],[\"BOTTOMYSIZE\",\"BOTTOMLAYERYSIZE\"])}get holeSizeMils(){return tc(this,\"HOLESIZE\")}get holeWidthMils(){return tc(this,\"HOLEWIDTH\")}get shape(){return pi(this,\"SHAPE\")}get middleShape(){return pi(this,\"MIDSHAPE\")}get bottomShape(){return pi(this,\"BOTTOMSHAPE\")}get holeType(){return pi(this,\"HOLETYPE\",\"HOLESHAPE\")}get rotation(){return xI(this.getNumber(\"ROTATION\")??0)}get holeRotation(){return xI(this.getNumber(\"HOLEROTATION\")??this.getNumber(\"SLOTROTATION\")??0)}get plated(){return this.getBoolean(\"PLATED\")}get padMode(){return this.getNumber(\"PADMODE\")}get behavior(){const t=this.layer?.toUpperCase();return(this.holeSizeMils??0)\u003e0||t===\"MULTILAYER\"?\"through-hole\":t===\"TOP\"||t===\"BOTTOM\"||t===\"TOP LAYER\"||t===\"BOTTOM LAYER\"?\"smd\":\"unknown\"}get pasteMaskExpansionMils(){return tc(this,\"PASTEMASKEXPANSION_MANUAL\")}get solderMaskExpansionMils(){return tc(this,\"SOLDERMASKEXPANSION_MANUAL\")}get tentedTop(){return this.getBoolean(\"TENTEDTOP\")??this.getBoolean(\"TENTINGTOP\")}get tentedBottom(){return this.getBoolean(\"TENTEDBOTTOM\")??this.getBoolean(\"TENTINGBOTTOM\")}};function N1n(t){if(!t)return\"\";if(!/^\\d+(?:,\\d+)*$/u.test(t))return t;try{return String.fromCodePoint(...t.split(\",\").map(e=\u003eNumber(e)))}catch{return t}}var R1n=class extends Ol{type=\"text-record\";constructor(t={}){super(t)}get text(){const t=this.getDecoded(\"WIDESTRING\");return t===void 0?pi(this,\"TEXT\"):N1n(t)}get position(){return qh(this,[\"X\"],[\"Y\"])}get layer(){return pi(this,\"LAYER\")}get heightMils(){return tc(this,\"HEIGHT\")}get strokeWidthMils(){return tc(this,\"WIDTH\")}get rotation(){return xI(this.getNumber(\"ROTATION\")??0)}get mirrored(){return this.getBoolean(\"MIRROR\")}get inverted(){return this.getBoolean(\"INVERTED\")}get justification(){return pi(this,\"JUSTIFICATION\")}get fontName(){return pi(this,\"FONTNAME\")}get usesTrueTypeFont(){return this.getBoolean(\"USETTFONTS\")??this.getBoolean(\"FONTTYPE\")}get textBoxSize(){return Yee(this,[\"TEXTBOXWIDTH\"],[\"TEXTBOXHEIGHT\"])}get componentIndex(){return this.getNumber(\"COMPONENT\")}get isDesignator(){return this.getBoolean(\"DESIGNATOR\")===!0}get isComment(){return this.getBoolean(\"COMMENT\")===!0}},T1n=class extends Ol{type=\"track-record\";constructor(t={}){super(t)}get start(){return qh(this,[\"X1\"],[\"Y1\"])}get end(){return qh(this,[\"X2\"],[\"Y2\"])}get widthMils(){return tc(this,\"WIDTH\")}get layer(){return pi(this,\"LAYER\")}get netIndex(){return this.getNumber(\"NET\")}get componentIndex(){return this.getNumber(\"COMPONENT\")}get polygonIndex(){return this.getNumber(\"POLYGON\")}get unionIndex(){return this.getNumber(\"UNIONINDEX\")}get uniqueId(){return pi(this,\"UNIQUEID\")}get keepout(){return this.getBoolean(\"KEEPOUT\")}get polygonOutline(){return this.getBoolean(\"POLYGONOUTLINE\")}get userRouted(){return this.getBoolean(\"USERROUTED\")}get isZeroLength(){return this.start!==void 0\u0026\u0026this.end!==void 0?hXe(this.start,this.end):!1}},k1n=class extends Ol{type=\"via-record\";constructor(t={}){super(t)}get position(){return qh(this,[\"X\"],[\"Y\"])}get diameterMils(){return tc(this,\"DIAMETER\",\"TOPLAYERSIZE\")}get holeSizeMils(){return tc(this,\"HOLESIZE\")}get startLayer(){return pi(this,\"STARTLAYER\",\"FROMLAYER\")}get endLayer(){return pi(this,\"ENDLAYER\",\"TOLAYER\")}get netIndex(){return this.getNumber(\"NET\")}get kind(){const t=this.startLayer?.toUpperCase(),e=this.endLayer?.toUpperCase();return!t||!e?\"unknown\":t.includes(\"TOP\")\u0026\u0026e.includes(\"BOTTOM\")||t.includes(\"BOTTOM\")\u0026\u0026e.includes(\"TOP\")?\"through\":\"blind-buried\"}get tentedTop(){return this.getBoolean(\"TENTEDTOP\")??this.getBoolean(\"TENTINGTOP\")}get tentedBottom(){return this.getBoolean(\"TENTEDBOTTOM\")??this.getBoolean(\"TENTINGBOTTOM\")}},F1n=class extends o8{type=\"raw-field\";_raw;constructor(t){if(super(t),/[|\\r\\n]/u.test(t.raw))throw new Error(\"Raw Altium fields cannot contain record delimiters\");this._raw=t.raw}get raw(){return this._raw}set raw(t){if(/[|\\r\\n]/u.test(t))throw new Error(\"Raw Altium fields cannot contain record delimiters\");t!==this._raw\u0026\u0026(this._raw=t,this.markDirty())}getChildren(){return[]}getString(){return this.raw}toJSON(){return{type:this.type,nodeId:this.nodeId,sourceLocation:this.sourceLocation,raw:this.raw}}},I1e=class extends Ol{type=\"unknown-record\";constructor(t={}){super(t)}},L1n=class extends Ol{type=\"component-body-record\";constructor(t={}){super(t)}get componentIndex(){return this.getNumber(\"COMPONENT\")}get bodyKind(){return pi(this,\"KIND\")}get identifier(){return pi(this,\"IDENTIFIER\",\"NAME\")}get modelId(){return pi(this,\"MODELID\")}get modelEmbedded(){return this.getBoolean(\"MODEL.EMBED\")}get modelPosition(){return qh(this,[\"MODEL.2D.X\"],[\"MODEL.2D.Y\"])}get modelRotation2d(){return xI(this.getNumber(\"MODEL.2D.ROTATION\")??0)}get modelRotation3d(){return{x:xI(this.getNumber(\"MODEL.3D.ROTX\")??0),y:xI(this.getNumber(\"MODEL.3D.ROTY\")??0),z:xI(this.getNumber(\"MODEL.3D.ROTZ\")??0)}}get standoffHeightMils(){return tc(this,\"STANDOFFHEIGHT\")}get overallHeightMils(){return tc(this,\"OVERALLHEIGHT\")}get opacity(){return this.getNumber(\"BODYOPACITY3D\")}},Xqi=class extends Ol{type=\"differential-pair-record\";constructor(t={}){super(t)}get name(){return pi(this,\"NAME\")}get positiveNet(){return pi(this,\"POSITIVENET\",\"POSITIVE\")}get negativeNet(){return pi(this,\"NEGATIVENET\",\"NEGATIVE\")}},Zqi=class extends Ol{type=\"from-to-record\";get from(){return pi(this,\"FROM\")}get to(){return pi(this,\"TO\")}get netIndex(){return this.getNumber(\"NET\")}},eXi=class extends Ol{type=\"connection-record\";get netIndex(){return this.getNumber(\"NET\")}get from(){return pi(this,\"FROM\")}get to(){return pi(this,\"TO\")}},tXi=class extends Ol{type=\"embedded-board-record\";constructor(t={}){super(t)}get sourcePath(){return pi(this,\"SOURCEPATH\",\"FILENAME\")}get position(){return qh(this,[\"X\",\"ORIGINX\"],[\"Y\",\"ORIGINY\"])}get rotation(){return xI(this.getNumber(\"ROTATION\")??0)}get mirrored(){return this.getBoolean(\"MIRROR\")}},nXi=class extends Ol{type=\"file-version-info-record\";constructor(t={}){super(t)}get versions(){const t=[];for(let e=0;e\u003c1e4;e++){const n=pi(this,`VER${e}`);if(n===void 0)break;t.push(n)}return t}},oXi=class extends Ol{type=\"unique-id-primitive-information-record\";get primitiveIndex(){return this.getNumber(\"PRIMITIVEINDEX\")}get primitiveObjectId(){return pi(this,\"PRIMITIVEOBJECTID\")}get uniqueId(){return pi(this,\"UNIQUEID\")}},iM=class extends Ol{type=\"option-record\";get optionFamily(){return this.recordKind}},iXi=class extends iM{type=\"advanced-placer-options-record\"},rXi=class extends iM{type=\"design-rule-checker-options-record\"},sXi=class extends iM{type=\"engineering-change-order-options-record\"},aXi=class extends iM{type=\"gerber-options-record\"},AXi=class extends iM{type=\"output-options-record\"},cXi=class extends iM{type=\"pin-swap-options-record\"},lXi=class extends iM{type=\"printer-options-record\"},uXi=class extends iM{type=\"testpoint-options-record\"},gXi=class extends Ol{type=\"model-record\";constructor(t={}){super(t)}get id(){return pi(this,\"ID\")}get name(){return pi(this,\"NAME\")}get checksum(){return pi(this,\"CHECKSUM\")}get embedded(){return this.getBoolean(\"EMBED\")}get rotation(){return{x:xI(this.getNumber(\"ROTX\")??0),y:xI(this.getNumber(\"ROTY\")??0),z:xI(this.getNumber(\"ROTZ\")??0)}}get standoffRaw(){return this.getNumber(\"DZ\")}},dXi=class extends Ol{type=\"parameter-record\";constructor(t={}){super(t)}get name(){return pi(this,\"NAME\")}get value(){return pi(this,\"VALUE\")}get primitiveIndex(){return this.getNumber(\"PRIMITIVEINDEX\")}get imported(){return this.getBoolean(\"ISIMPORTED\")}},YXe=class extends Ol{type=\"region-record\";constructor(t={}){super(t)}get layer(){return pi(this,\"LAYER\")}get regionKind(){return s1e(this)}get componentIndex(){return this.getNumber(\"COMPONENT\")}get netIndex(){return this.getNumber(\"NET\")}get polygonIndex(){return this.getNumber(\"POLYGON\")}get holeCount(){return Math.max(this.getNumber(\"HOLECOUNT\")??0,0)}get isGeneratedPour(){return this.recordKind===\"RegionFill\"}get isBoardCutout(){return this.regionKind===\"BOARD_CUTOUT\"}get isLayerStackRegion(){return this.regionKind===\"LAYER_STACK_REGION\"}get isPolygonCutout(){return this.regionKind===\"POLYGON_CUTOUT\"}get layerStackId(){return pi(this,\"LAYERSTACKID\")}get geometry(){return r1e(this)}},hXi=class extends Ol{type=\"room-record\";constructor(t={}){super(t)}get name(){return pi(this,\"NAME\")}get start(){return qh(this,[\"X1\"],[\"Y1\"])}get end(){return qh(this,[\"X2\"],[\"Y2\"])}get bounds(){if(!(!this.start||!this.end))return{minX:Math.min(this.start.x,this.end.x),minY:Math.min(this.start.y,this.end.y),maxX:Math.max(this.start.x,this.end.x),maxY:Math.max(this.start.y,this.end.y)}}get ruleIndex(){return this.getNumber(\"RULE\")}},pXi=class extends Ol{type=\"smart-union-record\";constructor(t={}){super(t)}get start(){return qh(this,[\"X1\"],[\"Y1\"])}get end(){return qh(this,[\"X2\"],[\"Y2\"])}get bounds(){if(!(!this.start||!this.end))return{minX:Math.min(this.start.x,this.end.x),minY:Math.min(this.start.y,this.end.y),maxX:Math.max(this.start.x,this.end.x),maxY:Math.max(this.start.y,this.end.y)}}get unionType(){return pi(this,\"UNIONTYPE\")}get unionIndex(){return this.getNumber(\"UNIONINDEX\")}get rotation(){return xI(this.getNumber(\"ROTATION\")??0)}get mirrored(){return this.getBoolean(\"MIRROR\")}},H1n=new Map([[\"Arc\",P1n],[\"1\",i1n],[\"2\",MXe],[\"4\",DXe],[\"5\",Z$i],[\"6\",eqi],[\"7\",tqi],[\"8\",nqi],[\"10\",oqi],[\"11\",iqi],[\"12\",rqi],[\"13\",sqi],[\"14\",aqi],[\"15\",r1n],[\"16\",Aqi],[\"17\",NXe],[\"18\",RXe],[\"22\",uqi],[\"25\",TXe],[\"26\",cqi],[\"27\",s1n],[\"28\",gqi],[\"29\",dqi],[\"30\",a1n],[\"31\",hqi],[\"32\",A1n],[\"33\",c1n],[\"34\",pqi],[\"37\",lqi],[\"39\",mqi],[\"41\",_qi],[\"44\",fqi],[\"45\",Iqi],[\"46\",Cqi],[\"48\",yqi],[\"209\",xqi],[\"AdvancedPlacerOptions\",iXi],[\"Board\",qfn],[\"BoardRegion\",YXe],[\"Class\",vXe],[\"ComponentBody\",L1n],[\"ComponentBodyLegacy\",L1n],[\"Component\",e1e],[\"Connection\",eXi],[\"Coordinate\",f$i],[\"DesignRuleCheckerOptions\",rXi],[\"DifferentialPair\",Xqi],[\"Dimension\",Vfn],[\"DXPRule\",Zfn],[\"EmbeddedBoard\",tXi],[\"EngineeringChangeOrderOptions\",sXi],[\"FileVersionInfo\",nXi],[\"Fill\",M1n],[\"FromTo\",Zqi],[\"GerberOptions\",aXi],[\"Model\",gXi],[\"Net\",t1e],[\"OutputOptions\",AXi],[\"Pad\",D1n],[\"ParamItem\",dXi],[\"PinSwapOptions\",cXi],[\"Polygon\",Xfn],[\"PrinterOptions\",lXi],[\"Region\",YXe],[\"RegionFill\",YXe],[\"Room\",hXi],[\"Rule\",wXe],[\"SignalClass\",H$i],[\"SmartUnion\",pXi],[\"TestpointOptions\",uXi],[\"Text\",R1n],[\"Track\",T1n],[\"UniqueIDPrimitiveInformation\",oXi],[\"Via\",k1n]]);function UXe(t,e,n){const o=t.at(-1)===0?t.subarray(0,t.byteLength-1):t,i=_Xi(o,124);i[0]?.byteLength===0\u0026\u0026i.shift();const r=i.map(mXi);let s=fXi(r,\"RECORD\");s===void 0\u0026\u0026e!==void 0\u0026\u0026(r.unshift(new a9({key:\"RECORD\",value:e})),s=e);const a=(s===void 0?void 0:H1n.get(s))??I1e,A=new a({items:r,originalBinaryPayload:t,sourceLocation:n});for(const[c,l]of r.entries())l.setSourceLocation(n?{...n,fieldIndex:c}:void 0);return A}function mXi(t){const e=t.indexOf(61);if(e\u003c=0)return new F1n({raw:KXe(t)});const n=t.subarray(0,e),o=t.subarray(e+1),i=KXe(n),s=(i.toUpperCase().startsWith(\"%UTF8%\")?new TextDecoder().decode(o):KXe(o)).replaceAll(\"\\r\",\"\").replaceAll(`\n`,\"\");return new a9({key:i,value:s})}function _Xi(t,e){const n=[];let o=0;for(let i=0;i\u003ct.byteLength;i++)t[i]===e\u0026\u0026(n.push(t.subarray(o,i)),o=i+1);return n.push(t.subarray(o)),n}function fXi(t,e){const n=e.toUpperCase();return t.find(o=\u003eo instanceof a9\u0026\u0026o.key.toUpperCase()===n)?.value}function KXe(t){return new TextDecoder(\"windows-1252\").decode(t)}var C1e={Arcs6:1,BoardRegions:11,ComponentBodies6:12,Fills6:6,Pads6:2,Regions6:11,ShapeBasedRegions6:11,ShapeBasedComponentBodies6:12,Texts6:5,Tracks6:4,Vias6:3},IXi=512,CXi={BoardRegions:{extendedVertices:!1,recordKind:\"BoardRegion\"},ComponentBodies6:{extendedVertices:!1,recordKind:\"ComponentBodyLegacy\"},Regions6:{extendedVertices:!1,recordKind:\"RegionFill\"},ShapeBasedRegions6:{extendedVertices:!0,recordKind:\"Region\"},ShapeBasedComponentBodies6:{extendedVertices:!0,recordKind:\"ComponentBody\"}};function yXi(t,e,n={}){if(t===\"Pads6\")return y1e(EXi(e,n),t);if(t===\"Texts6\")return y1e(BXi(e,n),t);if(t===\"BoardRegions\"||t===\"ComponentBodies6\"||t===\"Regions6\"||t===\"ShapeBasedRegions6\"||t===\"ShapeBasedComponentBodies6\")return y1e(SXi(t,e,n),t);const o=n.maximumRecordLength??16*1024*1024,i=[],r=new DataView(e.buffer,e.byteOffset,e.byteLength);let s=0;for(;s\u003ce.byteLength;){const a=s;if(s+5\u003ee.byteLength)throw new hh(`${t} primitive frame header is truncated`,s);const A=e[s],l=r.getUint32(s+1,!0)\u002616777215;if(s+=5,A!==C1e[t])throw new yI(`${t} frame at offset ${a} has unexpected primitive type ${A}`);if(l===0||l\u003eo)throw new hh(`Invalid ${t} primitive length ${l}`,a+1);if(s+l\u003ee.byteLength)throw new hh(`${t} primitive at offset ${a} exceeds its stream`,a);const u=e.subarray(s,s+l);i.push(xXi(t,u,a)),s+=l}if(n.expectedRecordCount!==void 0\u0026\u0026i.length!==n.expectedRecordCount)throw new yI(`${t} stream declares ${n.expectedRecordCount} records but contains ${i.length}`);return y1e(i,t)}function y1e(t,e){for(const[n,o]of t.entries()){const i={recordIndex:n,streamPath:`/${e}/Data`};o.setSourceLocation(i);for(const[r,s]of o.items.entries())s.setSourceLocation({...i,fieldIndex:r})}return t}function xXi(t,e,n){const o=t===\"Tracks6\"?33:t===\"Arcs6\"?45:t===\"Fills6\"?37:31;if(e.byteLength\u003co)throw new hh(`${t} primitive payload is shorter than ${o} bytes`,n);const i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=LS(i.getUint8(0));if(t===\"Fills6\"){const A=i.getUint8(2)===2,c=[fi(\"RECORD\",\"Fill\"),fi(\"LAYER\",r),fi(\"LOCKED\",g_((i.getUint8(1)\u00264)===0)),fi(\"KEEPOUT\",g_(A)),fi(\"NET\",String(i.getUint16(3,!0))),fi(\"COMPONENT\",String(i.getUint16(7,!0))),na(\"X1\",i.getInt32(13,!0)),na(\"Y1\",i.getInt32(17,!0)),na(\"X2\",i.getInt32(21,!0)),na(\"Y2\",i.getInt32(25,!0)),fi(\"ROTATION\",i8(i.getFloat64(29,!0))),fi(\"KEEPOUTRESTRICTIONS\",String(e.byteLength\u003e=47?i.getUint8(46):A?31:0))];return e.byteLength\u003e=46\u0026\u0026c.push(fi(\"LAYER_V7_ID\",String(i.getUint32(42,!0)))),e.byteLength\u003e37\u0026\u0026e.byteLength\u003c46\u0026\u0026c.push(fi(\"UNPARSEDTRAILINGBYTES\",String(e.byteLength-37))),e.byteLength\u003e47\u0026\u0026c.push(fi(\"UNPARSEDTRAILINGBYTES\",String(e.byteLength-47))),new M1n({items:c,originalBinaryPayload:e})}const s=i.getUint16(1,!0),a=[fi(\"LAYER\",r),fi(\"LOCKED\",g_((i.getUint8(1)\u00264)===0)),...(s\u0026IXi)!==0?[fi(\"KEEPOUT\",\"TRUE\")]:[],fi(\"NET\",String(i.getUint16(3,!0))),fi(\"COMPONENT\",String(i.getUint16(7,!0))),fi(\"POLYGON\",String(i.getUint16(9,!0)))];return t===\"Tracks6\"?new T1n({originalBinaryPayload:e,items:[fi(\"RECORD\",\"Track\"),...a,na(\"X1\",i.getInt32(13,!0)),na(\"Y1\",i.getInt32(17,!0)),na(\"X2\",i.getInt32(21,!0)),na(\"Y2\",i.getInt32(25,!0)),na(\"WIDTH\",i.getInt32(29,!0))]}):t===\"Arcs6\"?new P1n({originalBinaryPayload:e,items:[fi(\"RECORD\",\"Arc\"),...a,na(\"LOCATION.X\",i.getInt32(13,!0)),na(\"LOCATION.Y\",i.getInt32(17,!0)),na(\"RADIUS\",i.getInt32(21,!0)),fi(\"STARTANGLE\",i8(i.getFloat64(25,!0))),fi(\"ENDANGLE\",i8(i.getFloat64(33,!0))),na(\"WIDTH\",i.getInt32(41,!0))]}):new k1n({originalBinaryPayload:e,items:[fi(\"RECORD\",\"Via\"),fi(\"LAYER\",\"MULTILAYER\"),fi(\"LOCKED\",g_((i.getUint8(1)\u00264)===0)),fi(\"TENTEDTOP\",g_((i.getUint8(1)\u002632)!==0)),fi(\"TENTEDBOTTOM\",g_((i.getUint8(1)\u002664)!==0)),fi(\"NET\",String(i.getUint16(3,!0))),na(\"X\",i.getInt32(13,!0)),na(\"Y\",i.getInt32(17,!0)),na(\"DIAMETER\",i.getInt32(21,!0)),na(\"HOLESIZE\",i.getInt32(25,!0)),fi(\"STARTLAYER\",LS(i.getUint8(29))),fi(\"ENDLAYER\",LS(i.getUint8(30)))]})}function EXi(t,e){const n=e.maximumRecordLength??16777216,o=[],i=new DataView(t.buffer,t.byteOffset,t.byteLength);let r=0;for(;r\u003ct.byteLength;){const s=r;if(t[r]!==C1e.Pads6)throw new yI(`Pads6 record at offset ${s} has unexpected primitive type ${t[r]}`);r+=1;const a=[];for(let l=0;l\u003c6;l++){const u=r;if(r+4\u003et.byteLength)throw new hh(`Pads6 subrecord ${l+1} length is truncated`,r);const g=i.getUint32(r,!0)\u002616777215;if(r+=4,g\u003en)throw new hh(`Invalid Pads6 subrecord length ${g}`,u);if(r+g\u003et.byteLength)throw new hh(`Pads6 subrecord ${l+1} at offset ${u} exceeds its stream`,u);a.push(t.subarray(r,r+g)),r+=g}const A=MXi(a[0]??new Uint8Array),c=a[4];if(!c||c.byteLength\u003c110)throw new hh(\"Pads6 geometry subrecord is shorter than 110 bytes\",s);o.push(vXi(A,c,a[5]))}if(e.expectedRecordCount!==void 0\u0026\u0026o.length!==e.expectedRecordCount)throw new yI(`Pads6 stream declares ${e.expectedRecordCount} records but contains ${o.length}`);return o}function BXi(t,e){const n=e.maximumRecordLength??16777216,o=[],i=new DataView(t.buffer,t.byteOffset,t.byteLength);let r=0;for(;r\u003ct.byteLength;){const s=r;if(t[r]!==C1e.Texts6)throw new yI(`Texts6 record at offset ${s} has unexpected primitive type ${t[r]}`);r+=1;const a=VXe(\"Texts6 properties\",t,i,r,n);r=a.nextOffset;const A=VXe(\"Texts6 legacy text\",t,i,r,n);r=A.nextOffset,o.push(bXi(a.payload,A.payload,e.wideStrings,s))}return O1n(\"Texts6\",o,e.expectedRecordCount),o}function bXi(t,e,n,o){if(t.byteLength\u003c40)throw new hh(\"Texts6 properties subrecord is shorter than 40 bytes\",o);const i=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.byteLength\u003e=119?i.getUint32(115,!0):4294967295,s=n?.get(r)??DXi(e),a=[fi(\"RECORD\",\"Text\"),fi(\"LAYER\",LS(i.getUint8(0))),fi(\"LOCKED\",g_((i.getUint8(1)\u00264)===0)),fi(\"COMPONENT\",String(i.getUint16(7,!0))),na(\"X\",i.getInt32(13,!0)),na(\"Y\",i.getInt32(17,!0)),na(\"HEIGHT\",i.getInt32(21,!0)),fi(\"STROKEFONT\",String(i.getUint16(25,!0))),fi(\"ROTATION\",i8(i.getFloat64(27,!0))),fi(\"MIRROR\",g_(i.getUint8(35)!==0)),na(\"WIDTH\",i.getInt32(36,!0)),fi(\"WIDESTRINGINDEX\",String(r)),fi(\"WIDESTRING\",RXi(s))];return t.byteLength\u003e=137\u0026\u0026a.push(fi(\"COMMENT\",g_(i.getUint8(40)!==0)),fi(\"DESIGNATOR\",g_(i.getUint8(41)!==0)),fi(\"FONTTYPE\",String(i.getUint8(43))),fi(\"BOLD\",g_(i.getUint8(44)!==0)),fi(\"ITALIC\",g_(i.getUint8(45)!==0)),fi(\"FONTNAME\",NXi(t.subarray(46,110))),fi(\"INVERTED\",g_(i.getUint8(110)!==0)),na(\"MARGINBORDERWIDTH\",i.getInt32(111,!0)),fi(\"INVERTEDRECT\",g_(i.getUint8(123)!==0)),na(\"TEXTBOXWIDTH\",i.getInt32(124,!0)),na(\"TEXTBOXHEIGHT\",i.getInt32(128,!0)),fi(\"JUSTIFICATION\",String(i.getUint8(132))),na(\"TEXTOFFSET\",i.getInt32(133,!0))),t.byteLength\u003e=230\u0026\u0026a.push(fi(\"LAYER_V7\",LS(i.getUint32(226,!0)))),new R1n({items:a,originalBinaryPayload:t})}function SXi(t,e,n){const o=CXi[t],i=n.maximumRecordLength??16*1024*1024,r=[],s=new DataView(e.buffer,e.byteOffset,e.byteLength);let a=0;for(;a\u003ce.byteLength;){const A=a;if(e[a]!==C1e[t])throw new yI(`${t} record at offset ${A} has unexpected primitive type ${e[a]}`);a+=1;const c=VXe(t,e,s,a,i);r.push(QXi(c.payload,A,t,o.recordKind,o.extendedVertices)),a=c.nextOffset}return O1n(t,r,n.expectedRecordCount),r}function QXi(t,e,n,o,i){if(t.byteLength\u003c26)throw new hh(`${n} payload is shorter than 26 bytes`,e);const r=new DataView(t.buffer,t.byteOffset,t.byteLength),s=r.getUint32(18,!0)\u002616777215,a=22,A=a+s;if(A+4\u003et.byteLength)throw new hh(`${n} property block exceeds its record`,e+a);const c=new Uint8Array(s+1);c[0]=124,c.set(t.subarray(a,A),1);const l=UXe(c,o),u=r.getUint8(1),g=Number(l.getCaseInsensitive(\"KIND\")??0),h=l.getBoolean(\"ISBOARDCUTOUT\")===!0,d=[fi(\"SOURCESTREAM\",n),fi(\"LAYER\",LS(r.getUint8(0))),fi(\"LOCKED\",g_((u\u00264)===0)),fi(\"TEARDROP\",g_((u\u002616)!==0)),fi(\"KEEPOUT\",g_(r.getUint8(2)===2)),fi(\"NET\",String(r.getUint16(3,!0))),fi(\"POLYGON\",String(r.getUint16(5,!0))),fi(\"COMPONENT\",String(r.getUint16(7,!0))),fi(\"HOLECOUNT\",String(r.getUint16(14,!0)))];(n===\"BoardRegions\"||n===\"Regions6\"||n===\"ShapeBasedRegions6\")\u0026\u0026d.push(fi(\"REGIONKIND\",PXi(n,g,h)));let p=A;const _=r.getUint32(p,!0)+(i?1:0);p+=4,i?zXe(`${n} outline`,_,37,p,t.byteLength,e):zXe(`${n} outline`,_,16,p,t.byteLength,e);for(let y=0;y\u003c_;y++)if(i){const x=r.getUint8(p)!==0;d.push(fi(`KIND${y}`,x?\"1\":\"0\"),na(`VX${y}`,r.getInt32(p+1,!0)),na(`VY${y}`,r.getInt32(p+5,!0)),na(`CX${y}`,r.getInt32(p+9,!0)),na(`CY${y}`,r.getInt32(p+13,!0)),na(`R${y}`,r.getInt32(p+17,!0)),fi(`SA${y}`,i8(r.getFloat64(p+21,!0))),fi(`EA${y}`,i8(r.getFloat64(p+29,!0)))),p+=37}else d.push(fi(`KIND${y}`,\"0\"),na(`VX${y}`,r.getFloat64(p,!0)),na(`VY${y}`,r.getFloat64(p+8,!0))),p+=16;const f=r.getUint16(14,!0);for(let y=0;y\u003cf;y++){if(p+4\u003et.byteLength)throw new hh(`${n} hole ${y} count is truncated`,e+p);const x=r.getUint32(p,!0);p+=4,zXe(`${n} hole ${y}`,x,16,p,t.byteLength,e),d.push(fi(`HOLE${y}COUNT`,String(x)));for(let E=0;E\u003cx;E++)d.push(na(`HOLE${y}VX${E}`,r.getFloat64(p,!0)),na(`HOLE${y}VY${E}`,r.getFloat64(p+8,!0))),p+=16}p!==t.byteLength\u0026\u0026d.push(fi(\"UNPARSEDTRAILINGBYTES\",String(t.byteLength-p)));const I=l.items,C=[];I[0]\u0026\u0026C.push(I[0]);for(const y of d)C.push(y.setParent(l));for(let y=1;y\u003cI.length;y+=1){const x=I[y];x\u0026\u0026C.push(x)}return l.items=C,l.setOriginalBinaryPayload(t),l}function vXi(t,e,n){const o=new DataView(e.buffer,e.byteOffset,e.byteLength),i=o.getUint8(49),r=o.getUint8(1),s=o.getUint8(62),a=[fi(\"RECORD\",\"Pad\"),fi(\"NAME\",t),fi(\"LAYER\",LS(o.getUint8(0))),fi(\"LOCKED\",g_((r\u00264)===0)),fi(\"TENTEDTOP\",g_((r\u002632)!==0)),fi(\"TENTEDBOTTOM\",g_((r\u002664)!==0)),fi(\"NET\",String(o.getUint16(3,!0))),fi(\"COMPONENT\",String(o.getUint16(7,!0))),na(\"X\",o.getInt32(13,!0)),na(\"Y\",o.getInt32(17,!0)),na(\"XSIZE\",o.getInt32(21,!0)),na(\"YSIZE\",o.getInt32(25,!0)),na(\"MIDXSIZE\",o.getInt32(29,!0)),na(\"MIDYSIZE\",o.getInt32(33,!0)),na(\"BOTTOMXSIZE\",o.getInt32(37,!0)),na(\"BOTTOMYSIZE\",o.getInt32(41,!0)),na(\"HOLESIZE\",o.getInt32(45,!0)),fi(\"SHAPE\",x1e(i)),fi(\"MIDSHAPE\",x1e(o.getUint8(50))),fi(\"BOTTOMSHAPE\",x1e(o.getUint8(51))),fi(\"ROTATION\",i8(o.getFloat64(52,!0))),fi(\"PLATED\",o.getUint8(60)===0?\"FALSE\":\"TRUE\"),fi(\"PADMODE\",String(s)),fi(\"PADSTACKMODE\",FXi(s)),na(\"PASTEMASKEXPANSION_MANUAL\",o.getInt32(86,!0)),na(\"SOLDERMASKEXPANSION_MANUAL\",o.getInt32(90,!0)),fi(\"PASTEMASKEXPANSIONMODE\",G1n(o.getUint8(101))),fi(\"SOLDERMASKEXPANSIONMODE\",G1n(o.getUint8(102)))];return e.byteLength\u003e=114\u0026\u0026a.push(fi(\"HOLEROTATION\",i8(o.getFloat64(106,!0)))),e.byteLength\u003e=120\u0026\u0026a.push(fi(\"TOLAYER\",LS(o.getUint8(114))),fi(\"FROMLAYER\",LS(o.getUint8(117)))),n\u0026\u0026n.byteLength\u003e=596\u0026\u0026a.push(...wXi(n)),new D1n({items:a,originalBinaryPayload:e})}function wXi(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=[fi(\"STACKDATALENGTH\",String(t.byteLength)),fi(\"HOLETYPE\",String(e.getUint8(262))),fi(\"HOLESHAPE\",kXi(e.getUint8(262))),na(\"SLOTLENGTH\",e.getInt32(263,!0)),fi(\"SLOTROTATION\",i8(e.getFloat64(267,!0)))];t.byteLength\u003e596\u0026\u0026n.push(fi(\"UNPARSEDSTACKBYTES\",String(t.byteLength-596)));for(let o=0;o\u003c32;o++)n.push(na(`LAYER${o}HOLEXOFFSET`,e.getInt32(275+o*4,!0)),na(`LAYER${o}HOLEYOFFSET`,e.getInt32(403+o*4,!0)),fi(`LAYER${o}ALTSHAPE`,TXi(e.getUint8(532+o))),fi(`LAYER${o}CORNERRADIUS`,String(e.getUint8(564+o))));for(let o=0;o\u003c29;o++){const i=o+2;n.push(na(`LAYER${i}XSIZE`,e.getInt32(o*4,!0)),na(`LAYER${i}YSIZE`,e.getInt32(116+o*4,!0)),fi(`LAYER${i}SHAPE`,x1e(e.getUint8(232+o))))}return n}function VXe(t,e,n,o,i){if(o+4\u003ee.byteLength)throw new hh(`${t} subrecord length is truncated`,o);const r=o,s=n.getUint32(o,!0)\u002616777215;if(o+=4,s\u003ei)throw new hh(`Invalid ${t} subrecord length ${s}`,r);if(o+s\u003ee.byteLength)throw new hh(`${t} subrecord at offset ${r} exceeds its stream`,r);return{nextOffset:o+s,payload:e.subarray(o,o+s)}}function O1n(t,e,n){if(n!==void 0\u0026\u0026e.length!==n)throw new yI(`${t} stream declares ${n} records but contains ${e.length}`)}function zXe(t,e,n,o,i,r){const s=i-o;if(e\u003eMath.floor(s/n))throw new hh(`${t} declares ${e} vertices but exceeds its record`,r+o)}function PXi(t,e,n){return t===\"BoardRegions\"?\"LAYER_STACK_REGION\":e===0?n?\"BOARD_CUTOUT\":\"COPPER\":e===1?\"POLYGON_CUTOUT\":e===2?\"DASHED_OUTLINE\":e===3?\"UNKNOWN_3\":e===4?\"CAVITY_DEFINITION\":`UNKNOWN_${e}`}function MXi(t){if(t.byteLength===0)return\"\";const e=t[0]??0,n=Math.min(e+1,t.byteLength);return new TextDecoder(\"windows-1252\").decode(t.subarray(1,n))}function DXi(t){if(t.byteLength===0)return\"\";const e=t[0]??0,n=Math.min(e+1,t.byteLength);return new TextDecoder(\"windows-1252\").decode(t.subarray(1,n)).replaceAll(`\\r\n`,`\n`)}function NXi(t){return Y1n(t).replace(/\\0.*$/su,\"\")}function RXi(t){return Array.from(t,e=\u003eString(e.codePointAt(0)??0)).join(\",\")}function x1e(t){return t===1?\"ROUND\":t===2?\"RECTANGLE\":t===3?\"OCTAGONAL\":`SHAPE${t}`}function TXi(t){return t===0?\"DEFAULT\":t===1?\"ROUND\":t===2?\"RECTANGLE\":t===3?\"OCTAGONAL\":t===9?\"ROUNDRECT\":`ALTSHAPE${t}`}function kXi(t){return t===0?\"ROUND\":t===1?\"SQUARE\":t===2?\"SLOT\":`HOLESHAPE${t}`}function FXi(t){return t===0?\"SIMPLE\":t===1?\"TOP_MIDDLE_BOTTOM\":t===2?\"FULL_STACK\":`PADMODE${t}`}function G1n(t){return t===0?\"None\":t===1?\"Rule\":t===2?\"Manual\":`Mode${t}`}function fi(t,e){return new a9({key:t,value:e})}function g_(t){return t?\"TRUE\":\"FALSE\"}function na(t,e){return fi(t,`${i8(e/1e4,4)}mil`)}function i8(t,e=10){return Number.isFinite(t)?t.toFixed(e).replace(/\\.?0+$/u,\"\").replace(/^-0$/u,\"0\"):\"0\"}function LS(t){return t===1?\"TOP\":t\u003e=2\u0026\u0026t\u003c=31?`MID-LAYER${t-1}`:t===32?\"BOTTOM\":t===33?\"TOPOVERLAY\":t===34?\"BOTTOMOVERLAY\":t===35?\"TOPPASTE\":t===36?\"BOTTOMPASTE\":t===37?\"TOPSOLDER\":t===38?\"BOTTOMSOLDER\":t\u003e=39\u0026\u0026t\u003c=54?`INTERNALPLANE${t-38}`:t===55?\"DRILLGUIDE\":t===56?\"KEEPOUT\":t\u003e=57\u0026\u0026t\u003c=72?`MECHANICAL${t-56}`:t===73?\"DRILLDRAWING\":t===74?\"MULTILAYER\":t===75?\"CONNECTIONS\":t===76?\"BACKGROUND\":t===77?\"DRCERROR\":t===78?\"SELECTIONS\":t===79?\"VISIBLEGRID1\":t===80?\"VISIBLEGRID2\":t===81?\"PADHOLES\":t===82?\"VIAHOLES\":t\u003e=83\u0026\u0026t\u003c=98?`MECHANICAL${t-66}`:`LAYER${t}`}function LXi(t,e=16*1024*1024){const n=new Map,o=new DataView(t.buffer,t.byteOffset,t.byteLength);let i=0;for(;i\u003ct.byteLength;){if(i+8\u003et.byteLength)throw new hh(\"WideStrings6 entry header is truncated\",i);const r=o.getUint32(i,!0),s=o.getUint32(i+4,!0);if(i+=8,s\u003ee||i+s\u003et.byteLength)throw new hh(`WideStrings6 entry ${r} has invalid length ${s}`,i-4);const a=s\u003c=2?0:s,A=a===0?\"\":Y1n(t.subarray(i,i+a-2)).replaceAll(`\\r\n`,`\n`);n.set(r,A),i+=a}return n}function Y1n(t){let e=\"\";for(let n=0;n+1\u003ct.byteLength;n+=2)e+=String.fromCharCode((t[n]??0)|(t[n+1]??0)\u003c\u003c8);return e}var HXi={Board6:{recordKind:\"Board\"},Classes6:{recordKind:\"Class\"},Components6:{recordKind:\"Component\"},Connections6:{allowOpaqueRecords:!0,recordKind:\"Connection\"},Dimensions6:{headerSize:6,recordKind:\"Dimension\"},FileVersionInfo:{recordKind:\"FileVersionInfo\"},FromTos6:{recordKind:\"FromTo\"},Models:{recordKind:\"Model\"},Nets6:{recordKind:\"Net\"},Polygons6:{recordKind:\"Polygon\"},Rules6:{headerSize:6,recordKind:\"Rule\"},SignalClasses:{recordKind:\"SignalClass\"},SmartUnions:{recordKind:\"SmartUnion\"},UniqueIDPrimitiveInformation:{recordKind:\"UniqueIDPrimitiveInformation\"}},OXi=new Set([\"Arcs6\",\"BoardRegions\",\"ComponentBodies6\",\"Fills6\",\"Pads6\",\"Regions6\",\"ShapeBasedRegions6\",\"ShapeBasedComponentBodies6\",\"Texts6\",\"Tracks6\",\"Vias6\"]);function U1n(t,e={}){if(!f1e(t))throw new yI(\"Binary PcbDoc input does not begin with the OLE/CFB signature\");const n=Vee(t,e);if(!n.getStream(\"/Board6/Data\")||!n.getStream(\"/Board6/Header\"))throw new yI(\"Compound document does not contain the Board6 PCB streams\");const o=new Set(n.streams.filter(c=\u003ec.path.length\u003e=2).map(c=\u003ec.path[0]).filter(c=\u003ec!==void 0)),i=new Map,r=new Map,s=[],a=n.getStream(\"/WideStrings6/Data\"),A=a?LXi(a.content):new Map;for(const c of[...o].sort()){const l=n.getStream([c,\"Data\"]),u=n.getStream([c,\"Header\"]),g=u?YXi(u.content):void 0,h=HXi[c],d=l\u0026\u0026h?GXi({allowOpaqueRecords:h.allowOpaqueRecords,allowMissingLeadingDelimiter:c===\"Models\",bytes:l.content,expectedRecordCount:g,family:c,headerSize:h.headerSize,maximumRecordLength:e.maxPropertyRecordLength,recordKind:h.recordKind}):[],p=l\u0026\u0026OXi.has(c)?yXi(c,l.content,{expectedRecordCount:g,maximumRecordLength:e.maxPrimitiveRecordLength,wideStrings:A}):[];d.length\u003e0\u0026\u0026i.set(c,d),p.length\u003e0\u0026\u0026r.set(c,p),s.push({dataSize:l?.content.byteLength,declaredRecordCount:g,decodedPrimitiveRecordCount:p.length,decodedPropertyRecordCount:d.length,family:c,hasData:l!==void 0,hasHeader:u!==void 0})}return new P$i({compoundFile:n,primitiveRecords:r,propertyRecords:i,streamSummaries:s,wideStrings:A})}function GXi({allowOpaqueRecords:t=!1,allowMissingLeadingDelimiter:e=!1,bytes:n,expectedRecordCount:o,recordKind:i,family:r=i,headerSize:s=4,maximumRecordLength:a=16*1024*1024}){if(n.byteLength===0)return[];const A=[],c=new DataView(n.buffer,n.byteOffset,n.byteLength);let l=0,u=0;for(;l\u003cn.byteLength;){const g=l;if(l+s\u003en.byteLength)throw new hh(`${i} property record length is truncated`,l);const d=c.getUint32(s===6?l+2:l,!0)\u002616777215,p=s===6?c.getUint16(l,!0):void 0;if(l+=s,d===0||d\u003ea)throw new hh(`Invalid ${i} property record length ${d}`,g);if(l+d\u003en.byteLength)throw new hh(`${i} property record at offset ${g} exceeds its stream`,g);const m=n.subarray(l,l+d);if(m[0]!==124\u0026\u0026!e){if(t){u+=1,l+=d;continue}throw new yI(`${i} property record at offset ${g} does not begin with \"|\"`)}const f={byteOffset:g,recordIndex:u,streamPath:`/${r}/Data`},I=UXe(m,i,f);p!==void 0\u0026\u0026(I.insertField(\"BINARYRECORDTYPE\",String(p),{index:1}),I.clearDirty(!0)),A.push(I),u+=1,l+=d}if(o!==void 0\u0026\u0026u!==o)throw new yI(`${i} stream declares ${o} records but contains ${u}`);return A}function YXi(t){if(!(t.byteLength\u003c4))return new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(0,!0)}var K1n=class extends pXe{type=\"raw-line\";_raw;constructor(t){if(super(t),/[\\r\\n]/u.test(t.raw))throw new Error(\"Raw Altium lines cannot include their line terminator\");this._raw=t.raw}get raw(){return this._raw}set raw(t){if(/[\\r\\n]/u.test(t))throw new Error(\"Raw Altium lines cannot include their line terminator\");t!==this._raw\u0026\u0026(this._raw=t,this.markDirty())}getChildren(){return[]}getString(){return this.raw}};function JXe(t,e={}){if(typeof t!=\"string\")throw new eM(\"parseAltiumAscii expects decoded text; use parseAltiumFile() for binary or byte input\");z1n(e.signal);const n=t.startsWith(\"\\uFEFF\"),o=n?t.slice(1):t,i=zXi(o,n?1:0),r=e.maxLineCount??1e6;if(i.length\u003er)throw new eM(`Altium text has ${i.length} lines, exceeding the configured limit of ${r}`);const s=i.map((A,c)=\u003e(z1n(e.signal),UXi(A.content,A.terminator,c+1,A.startOffset,e)));return n?[new K1n({raw:\"\\uFEFF\",terminator:\"\",nodeId:\"text:bom\",sourceLocation:{column:1,endColumn:2,endLine:1,endOffset:1,line:1,startOffset:0}}),...s]:s}function UXi(t,e,n,o,i){const r={column:1,endColumn:t.length+1,endLine:n,endOffset:o+t.length,line:n,startOffset:o},s=i.maxLineLength??16*1024*1024;if(t.length\u003es)throw new eM(`Altium line ${n} has ${t.length} characters, exceeding the configured limit of ${s}`,{excerpt:ik(i,t),location:r});if(!t.startsWith(\"|\")){if(V1n(i)\u0026\u0026t.length\u003e0)throw new eM(i.redactSourceText?`Expected an Altium record at line ${n}`:`Expected an Altium record at line ${n}, got ${JSON.stringify(t.slice(0,40))}`,{excerpt:ik(i,t),location:r});return t.length\u003e0\u0026\u0026WXe(i,{code:\"ALTIUM_RAW_TEXT_LINE\",excerpt:ik(i,t),location:r,message:`Preserved non-record text at line ${n}`,severity:\"warning\"}),new K1n({raw:t,terminator:e,nodeId:`text:${o}:raw-line`,sourceLocation:r})}const a=t.slice(1).split(\"|\"),A=i.maxFieldsPerRecord??1e5;if(a.length\u003eA)throw new eM(`Altium record at line ${n} has ${a.length} fields, exceeding the configured limit of ${A}`,{excerpt:ik(i,t),location:r});let c=o+1;const l=a.map((h,d)=\u003e{const p=KXi(h,{itemIndex:d,lineStartOffset:o,lineNumber:n,options:i,startOffset:c});return c+=h.length+1,p}),u=VXi(l);if(u===void 0){if(V1n(i))throw new eM(`Altium record at line ${n} has no RECORD field`,{excerpt:ik(i,t),location:r});return WXe(i,{code:\"ALTIUM_RECORD_KIND_MISSING\",excerpt:ik(i,t),location:r,message:`Preserved record without a RECORD field at line ${n}`,severity:\"warning\"}),new I1e({items:l,terminator:e,nodeId:`text:${o}:unknown-record`,sourceLocation:r})}const g=H1n.get(u)??I1e;return new g({items:l,terminator:e,nodeId:`text:${o}:record:${u}`,sourceLocation:r})}function KXi(t,e){const n={column:e.startOffset-e.lineStartOffset+1,endColumn:e.startOffset-e.lineStartOffset+t.length+1,endLine:e.lineNumber,endOffset:e.startOffset+t.length,line:e.lineNumber,startOffset:e.startOffset},o=`text:${e.startOffset}:item:${e.itemIndex}`,i=t.indexOf(\"=\");return i\u003c=0?(t.length\u003e0\u0026\u0026WXe(e.options,{code:\"ALTIUM_RAW_FIELD\",excerpt:ik(e.options,t),location:n,message:`Preserved malformed field segment at line ${e.lineNumber}`,severity:\"warning\"}),new F1n({raw:t,nodeId:o,sourceLocation:n})):new a9({key:t.slice(0,i),nodeId:o,sourceLocation:n,value:t.slice(i+1)})}function VXi(t){return new I1e({items:t}).recordKind}function zXi(t,e=0){const n=[];let o=0;for(let i=0;i\u003ct.length;i++){const r=t[i];if(r!==\"\\r\"\u0026\u0026r!==`\n`)continue;const s=r===\"\\r\"\u0026\u0026t[i+1]===`\n`,a=s?`\\r\n`:r;n.push({content:t.slice(o,i),startOffset:e+o,terminator:a}),s\u0026\u0026i++,o=i+1}return o\u003ct.length\u0026\u0026n.push({content:t.slice(o),startOffset:e+o,terminator:\"\"}),n}function V1n(t){return t.strict===!0||t.mode===\"strict\"}function WXe(t,e){t.onDiagnostic?.(e)}function JXi(t,e=120){return t.length\u003c=e?t:`${t.slice(0,e)}…`}function ik(t,e){return t.redactSourceText?void 0:JXi(e)}function z1n(t){t?.throwIfAborted()}function E1e(t,e={}){if(typeof t!=\"string\")throw new eM(\"parseAltiumPcbDoc expects decoded text; use parseAltiumFile() for binary or byte input\");const n=JXe(t,e),o=n.find(i=\u003ei instanceof Ol);if(o?.recordKind!==\"Board\")throw new eM(`Expected an Altium Board root record, got ${o?.recordKind??\"none\"}`,{location:o?.sourceLocation,recordKind:o?.recordKind});return new U$i({lines:n,originalSource:t})}function jXe(t,e={}){if(typeof t==\"string\"){const s=new d1e({lines:JXe(t,e),originalText:t,sourceFormat:\"ascii\"});return J1n(s),s}if(!f1e(t)){const s=SXe(t,e.encoding),a=new d1e({lines:JXe(s.text,e),originalBytes:t.slice(),originalText:s.text,sourceEncoding:s.encoding,sourceFormat:\"ascii\"});return J1n(a),a}const n=Vee(t,e),o=n.getStream(\"/FileHeader\");if(!o)throw new yI(\"Compound document does not contain a FileHeader stream\");const i=WXi(o.content,e.maxRecordLength);if(!i[0]?.getCaseInsensitive(\"HEADER\")?.toLowerCase().includes(\"schematic capture\"))throw new yI(\"FileHeader is not an Altium schematic record stream\");return new d1e({compoundFile:n,lines:i,originalBytes:t.slice(),sourceFormat:\"binary\"})}function J1n(t){if(!t.header?.getCaseInsensitive(\"HEADER\")?.toLowerCase().includes(\"schematic capture\")\u0026\u0026t.getRecordsByKind(\"31\").length===0)throw new yI(\"Expected an Altium schematic header or sheet record\")}function WXi(t,e=16*1024*1024){const n=[],o=new DataView(t.buffer,t.byteOffset,t.byteLength);let i=0;for(;i\u003ct.byteLength;){const r=i;if(i+4\u003et.byteLength)throw new hh(\"Schematic record length is truncated\",i);const a=o.getUint32(i,!0)\u002616777215;if(i+=4,a===0||a\u003ee)throw new hh(`Invalid schematic record length ${a}`,r);if(i+a\u003et.byteLength)throw new hh(`Schematic record at offset ${r} declares ${a} bytes with only ${t.byteLength-i} available`,r);const A=UXe(t.subarray(i,i+a),void 0,{byteOffset:r,recordIndex:n.length,streamPath:\"/FileHeader\"}),c=i+a\u003ct.byteLength?`\n`:\"\";A.terminator=c,n.push(A),i+=a}return n}function jXi(t,e={}){const n=e.maxFileSize??268435456;if(!Number.isSafeInteger(n)||n\u003c=0)throw new RangeError(\"maxFileSize must be a positive safe integer\");if(t.byteLength\u003en)throw new aA(`Altium file is ${t.byteLength} bytes, exceeding the ${n}-byte limit`);if(e.signal?.aborted)throw e.signal.reason??new DOMException(\"Parsing aborted\",\"AbortError\");const o=$qi(t,e);if(o.container===\"cfb\"){if(o.documentKind===\"pcb-document\")return{detection:o,document:U1n(t,e)};if(o.documentKind===\"schematic-document\")return{detection:o,document:jXe(t,e)};if(o.documentKind===\"pcb-library\"||o.documentKind===\"schematic-library\"||o.documentKind===\"integrated-library\"){if(e.allowUnknownCompoundFile)return{detection:o,document:Vee(t,e)};throw new dXe(`${o.documentKind} detection is supported, but semantic parsing is not yet fixture-verified`)}if(e.allowUnknownCompoundFile)return{detection:o,document:Vee(t,e)};throw new yI(\"Compound file is not a recognized Altium PCB or schematic document\")}if(o.container===\"zip\"||o.container===\"xml\")throw new dXe(`${o.documentKind} detection is supported, but semantic parsing is not yet implemented`);if(o.documentKind===\"pcb-library\"||o.documentKind===\"schematic-library\"||o.documentKind===\"integrated-library\")throw new dXe(`${o.documentKind} detection is supported, but semantic parsing is not yet fixture-verified`);const i=SXe(t,e.encoding);if(o.documentKind===\"project\"){const r=y1n(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind===\"output-job\"){const r=kqi(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind===\"workspace\"){const r=Uqi(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind===\"ini-document\"){if(!e.allowUnknownIni\u0026\u0026o.documentKind===\"ini-document\")throw new yI(\"INI input is not a recognized Altium project, workspace, or output job\");const r=Nqi(i.text).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind===\"pcb-document\"){const r=E1e(i.text,e).setOriginalBytes(t,i.encoding);return{detection:o,document:r}}if(o.documentKind===\"schematic-document\")return{detection:o,document:jXe(t,e)};throw new yI(\"Text input is not a recognized Altium PCB or schematic document\")}var LE=class{constructor(t=256,e=64*1024*1024){if(this.maximumLength=e,!Number.isSafeInteger(t)||t\u003c0||!Number.isSafeInteger(e)||e\u003c=0||t\u003ee)throw new RangeError(\"Invalid binary writer capacity or limit\");this.bytes=new Uint8Array(t),this.view=new DataView(this.bytes.buffer)}maximumLength;bytes;view;_length=0;get length(){return this._length}uint8(t){return this.ensure(1),this.view.setUint8(this._length,t),this._length++,this}int8(t){return this.ensure(1),this.view.setInt8(this._length,t),this._length++,this}uint16(t){return this.ensure(2),this.view.setUint16(this._length,t,!0),this._length+=2,this}int16(t){return this.ensure(2),this.view.setInt16(this._length,t,!0),this._length+=2,this}uint32(t){return this.ensure(4),this.view.setUint32(this._length,t,!0),this._length+=4,this}int32(t){return this.ensure(4),this.view.setInt32(this._length,t,!0),this._length+=4,this}float64(t){return this.ensure(8),this.view.setFloat64(this._length,t,!0),this._length+=8,this}writeBytes(t){return this.ensure(t.byteLength),this.bytes.set(t,this._length),this._length+=t.byteLength,this}uint32LengthPrefixedBytes(t){return this.uint32(t.byteLength).writeBytes(t)}pascalString(t,e=\"windows-1252\"){const n=$Xi(t,e);if(n.byteLength\u003e255)throw new RangeError(\"Pascal string exceeds 255 bytes\");return this.uint8(n.byteLength).writeBytes(n)}guid(t){const e=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/iu.exec(t);if(!e)throw new TypeError(\"Invalid GUID\");return this.uint32(Number.parseInt(e[1]??\"\",16)),this.uint16(Number.parseInt(e[2]??\"\",16)),this.uint16(Number.parseInt(e[3]??\"\",16)),this.writeBytes(Uint8Array.from(`${e[4]}${e[5]}`.match(/.{2}/gu)?.map(n=\u003eNumber.parseInt(n,16))??[]))}toUint8Array(){return this.bytes.slice(0,this._length)}ensure(t){const e=this._length+t;if(!Number.isSafeInteger(e)||e\u003ethis.maximumLength)throw new RangeError(`Binary output exceeds the ${this.maximumLength}-byte limit`);if(e\u003c=this.bytes.byteLength)return;let n=Math.max(this.bytes.byteLength,1);for(;n\u003ce;)if(n=Math.min(n*2,this.maximumLength),n\u003ce\u0026\u0026n===this.maximumLength)throw new RangeError(`Binary output exceeds the ${this.maximumLength}-byte limit`);const o=new Uint8Array(n);o.set(this.bytes),this.bytes=o,this.view=new DataView(o.buffer)}};function $Xi(t,e){if(e===\"utf-8\")return new TextEncoder().encode(t);const n=[];for(const o of t){const i=o.codePointAt(0);if(i===void 0||i\u003e255)throw new RangeError(\"Windows-1252 writer currently accepts only single-byte code points\");n.push(i)}return Uint8Array.from(n)}var $Xe={exports:{}};const qXi=wit(xfn);var W1n;function XXi(){return W1n||(W1n=1,(function(t){var e={},n=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";function o(Y){for(var W=\"\",te=0,j=0,J=0,oe=0,ie=0,ne=0,le=0,ge=0;ge\u003cY.length;)te=Y.charCodeAt(ge++),oe=te\u003e\u003e2,j=Y.charCodeAt(ge++),ie=(te\u00263)\u003c\u003c4|j\u003e\u003e4,J=Y.charCodeAt(ge++),ne=(j\u002615)\u003c\u003c2|J\u003e\u003e6,le=J\u002663,isNaN(j)?ne=le=64:isNaN(J)\u0026\u0026(le=64),W+=n.charAt(oe)+n.charAt(ie)+n.charAt(ne)+n.charAt(le);return W}function i(Y){var W=\"\",te=0,j=0,J=0,oe=0,ie=0,ne=0,le=0;Y=Y.replace(/[^\\w\\+\\/\\=]/g,\"\");for(var ge=0;ge\u003cY.length;)oe=n.indexOf(Y.charAt(ge++)),ie=n.indexOf(Y.charAt(ge++)),te=oe\u003c\u003c2|ie\u003e\u003e4,W+=String.fromCharCode(te),ne=n.indexOf(Y.charAt(ge++)),j=(ie\u002615)\u003c\u003c4|ne\u003e\u003e2,ne!==64\u0026\u0026(W+=String.fromCharCode(j)),le=n.indexOf(Y.charAt(ge++)),J=(ne\u00263)\u003c\u003c6|le,le!==64\u0026\u0026(W+=String.fromCharCode(J));return W}var r=(function(){return typeof Buffer\u003c\"u\"\u0026\u0026typeof e\u003c\"u\"\u0026\u0026typeof e.versions\u003c\"u\"\u0026\u0026!!e.versions.node})(),s=(function(){if(typeof Buffer\u003c\"u\"){var Y=!Buffer.from;if(!Y)try{Buffer.from(\"foo\",\"utf8\")}catch{Y=!0}return Y?function(W,te){return te?new Buffer(W,te):new Buffer(W)}:Buffer.from.bind(Buffer)}return function(){}})();function a(Y){if(r){if(Buffer.alloc)return Buffer.alloc(Y);var W=new Buffer(Y);return W.fill(0),W}return typeof Uint8Array\u003c\"u\"?new Uint8Array(Y):new Array(Y)}function A(Y){return r?Buffer.allocUnsafe?Buffer.allocUnsafe(Y):new Buffer(Y):typeof Uint8Array\u003c\"u\"?new Uint8Array(Y):new Array(Y)}var c=function(W){return r?s(W,\"binary\"):W.split(\"\").map(function(te){return te.charCodeAt(0)\u0026255})},l=/\\u0000/g,u=/[\\u0001-\\u0006]/g,g=function(Y){for(var W=[],te=0;te\u003cY[0].length;++te)W.push.apply(W,Y[0][te]);return W},h=g,d=function(Y,W,te){for(var j=[],J=W;J\u003cte;J+=2)j.push(String.fromCharCode(y(Y,J)));return j.join(\"\").replace(l,\"\")},p=d,m=function(Y,W,te){for(var j=[],J=W;J\u003cW+te;++J)j.push((\"0\"+Y[J].toString(16)).slice(-2));return j.join(\"\")},_=m,f=function(Y){if(Array.isArray(Y[0]))return[].concat.apply([],Y);var W=0,te=0;for(te=0;te\u003cY.length;++te)W+=Y[te].length;var j=new Uint8Array(W);for(te=0,W=0;te\u003cY.length;W+=Y[te].length,++te)j.set(Y[te],W);return j},I=f;r\u0026\u0026(d=function(Y,W,te){return Buffer.isBuffer(Y)?Y.toString(\"utf16le\",W,te).replace(l,\"\"):p(Y,W,te)},m=function(Y,W,te){return Buffer.isBuffer(Y)?Y.toString(\"hex\",W,W+te):_(Y,W,te)},g=function(Y){return Y[0].length\u003e0\u0026\u0026Buffer.isBuffer(Y[0][0])?Buffer.concat(Y[0]):h(Y)},c=function(Y){return s(Y,\"binary\")},I=function(Y){return Buffer.isBuffer(Y[0])?Buffer.concat(Y):f(Y)});var C=function(Y,W){return Y[W]},y=function(Y,W){return Y[W+1]*256+Y[W]},x=function(Y,W){var te=Y[W+1]*256+Y[W];return te\u003c32768?te:(65535-te+1)*-1},E=function(Y,W){return Y[W+3]*(1\u003c\u003c24)+(Y[W+2]\u003c\u003c16)+(Y[W+1]\u003c\u003c8)+Y[W]},B=function(Y,W){return(Y[W+3]\u003c\u003c24)+(Y[W+2]\u003c\u003c16)+(Y[W+1]\u003c\u003c8)+Y[W]};function S(Y,W){var te,j,J=0;switch(Y){case 1:te=C(this,this.l);break;case 2:te=(W!==\"i\"?y:x)(this,this.l);break;case 4:te=B(this,this.l);break;case 16:J=2,j=m(this,this.l,Y)}return this.l+=Y,J===0?te:j}var Q=function(Y,W,te){Y[te]=W\u0026255,Y[te+1]=W\u003e\u003e\u003e8\u0026255,Y[te+2]=W\u003e\u003e\u003e16\u0026255,Y[te+3]=W\u003e\u003e\u003e24\u0026255},w=function(Y,W,te){Y[te]=W\u0026255,Y[te+1]=W\u003e\u003e8\u0026255,Y[te+2]=W\u003e\u003e16\u0026255,Y[te+3]=W\u003e\u003e24\u0026255};function M(Y,W,te){var j=0,J=0;switch(te){case\"hex\":for(;J\u003cY;++J)this[this.l++]=parseInt(W.slice(2*J,2*J+2),16)||0;return this;case\"utf16le\":var oe=this.l+Y;for(J=0;J\u003cMath.min(W.length,Y);++J){var ie=W.charCodeAt(J);this[this.l++]=ie\u0026255,this[this.l++]=ie\u003e\u003e8}for(;this.l\u003coe;)this[this.l++]=0;return this}switch(Y){case 1:j=1,this[this.l]=W\u0026255;break;case 2:j=2,this[this.l]=W\u0026255,W\u003e\u003e\u003e=8,this[this.l+1]=W\u0026255;break;case 4:j=4,Q(this,W,this.l);break;case-4:j=4,w(this,W,this.l);break}return this.l+=j,this}function k(Y,W){var te=m(this,this.l,Y.length\u003e\u003e1);if(te!==Y)throw new Error(W+\"Expected \"+Y+\" saw \"+te);this.l+=Y.length\u003e\u003e1}function R(Y,W){Y.l=W,Y.read_shift=S,Y.chk=k,Y.write_shift=M}function F(Y){var W=a(Y);return R(W,0),W}var O=(function(){var Y={};Y.version=\"1.2.1\";function W(){for(var Ee=0,ke=new Array(256),Ce=0;Ce!=256;++Ce)Ee=Ce,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,Ee=Ee\u00261?-306674912^Ee\u003e\u003e\u003e1:Ee\u003e\u003e\u003e1,ke[Ce]=Ee;return typeof Int32Array\u003c\"u\"?new Int32Array(ke):ke}var te=W();function j(Ee){var ke=0,Ce=0,Le=0,Ye=typeof Int32Array\u003c\"u\"?new Int32Array(4096):new Array(4096);for(Le=0;Le!=256;++Le)Ye[Le]=Ee[Le];for(Le=0;Le!=256;++Le)for(Ce=Ee[Le],ke=256+Le;ke\u003c4096;ke+=256)Ce=Ye[ke]=Ce\u003e\u003e\u003e8^Ee[Ce\u0026255];var tt=[];for(Le=1;Le!=16;++Le)tt[Le-1]=typeof Int32Array\u003c\"u\"?Ye.subarray(Le*256,Le*256+256):Ye.slice(Le*256,Le*256+256);return tt}var J=j(te),oe=J[0],ie=J[1],ne=J[2],le=J[3],ge=J[4],_e=J[5],ue=J[6],fe=J[7],pe=J[8],ye=J[9],Me=J[10],ve=J[11],he=J[12],Qe=J[13],Pe=J[14];function we(Ee,ke){for(var Ce=ke^-1,Le=0,Ye=Ee.length;Le\u003cYe;)Ce=Ce\u003e\u003e\u003e8^te[(Ce^Ee.charCodeAt(Le++))\u0026255];return~Ce}function Te(Ee,ke){for(var Ce=ke^-1,Le=Ee.length-15,Ye=0;Ye\u003cLe;)Ce=Pe[Ee[Ye++]^Ce\u0026255]^Qe[Ee[Ye++]^Ce\u003e\u003e8\u0026255]^he[Ee[Ye++]^Ce\u003e\u003e16\u0026255]^ve[Ee[Ye++]^Ce\u003e\u003e\u003e24]^Me[Ee[Ye++]]^ye[Ee[Ye++]]^pe[Ee[Ye++]]^fe[Ee[Ye++]]^ue[Ee[Ye++]]^_e[Ee[Ye++]]^ge[Ee[Ye++]]^le[Ee[Ye++]]^ne[Ee[Ye++]]^ie[Ee[Ye++]]^oe[Ee[Ye++]]^te[Ee[Ye++]];for(Le+=15;Ye\u003cLe;)Ce=Ce\u003e\u003e\u003e8^te[(Ce^Ee[Ye++])\u0026255];return~Ce}function Re(Ee,ke){for(var Ce=ke^-1,Le=0,Ye=Ee.length,tt=0,At=0;Le\u003cYe;)tt=Ee.charCodeAt(Le++),tt\u003c128?Ce=Ce\u003e\u003e\u003e8^te[(Ce^tt)\u0026255]:tt\u003c2048?(Ce=Ce\u003e\u003e\u003e8^te[(Ce^(192|tt\u003e\u003e6\u002631))\u0026255],Ce=Ce\u003e\u003e\u003e8^te[(Ce^(128|tt\u002663))\u0026255]):tt\u003e=55296\u0026\u0026tt\u003c57344?(tt=(tt\u00261023)+64,At=Ee.charCodeAt(Le++)\u00261023,Ce=Ce\u003e\u003e\u003e8^te[(Ce^(240|tt\u003e\u003e8\u00267))\u0026255],Ce=Ce\u003e\u003e\u003e8^te[(Ce^(128|tt\u003e\u003e2\u002663))\u0026255],Ce=Ce\u003e\u003e\u003e8^te[(Ce^(128|At\u003e\u003e6\u002615|(tt\u00263)\u003c\u003c4))\u0026255],Ce=Ce\u003e\u003e\u003e8^te[(Ce^(128|At\u002663))\u0026255]):(Ce=Ce\u003e\u003e\u003e8^te[(Ce^(224|tt\u003e\u003e12\u002615))\u0026255],Ce=Ce\u003e\u003e\u003e8^te[(Ce^(128|tt\u003e\u003e6\u002663))\u0026255],Ce=Ce\u003e\u003e\u003e8^te[(Ce^(128|tt\u002663))\u0026255]);return~Ce}return Y.table=te,Y.bstr=we,Y.buf=Te,Y.str=Re,Y})(),U=(function(){var W={};W.version=\"1.2.2\";function te(Et,Gt){for(var Rt=Et.split(\"/\"),Ht=Gt.split(\"/\"),Qt=0,Nt=0,_n=Math.min(Rt.length,Ht.length);Qt\u003c_n;++Qt){if(Nt=Rt[Qt].length-Ht[Qt].length)return Nt;if(Rt[Qt]!=Ht[Qt])return Rt[Qt]\u003cHt[Qt]?-1:1}return Rt.length-Ht.length}function j(Et){if(Et.charAt(Et.length-1)==\"/\")return Et.slice(0,-1).indexOf(\"/\")===-1?Et:j(Et.slice(0,-1));var Gt=Et.lastIndexOf(\"/\");return Gt===-1?Et:Et.slice(0,Gt+1)}function J(Et){if(Et.charAt(Et.length-1)==\"/\")return J(Et.slice(0,-1));var Gt=Et.lastIndexOf(\"/\");return Gt===-1?Et:Et.slice(Gt+1)}function oe(Et,Gt){typeof Gt==\"string\"\u0026\u0026(Gt=new Date(Gt));var Rt=Gt.getHours();Rt=Rt\u003c\u003c6|Gt.getMinutes(),Rt=Rt\u003c\u003c5|Gt.getSeconds()\u003e\u003e\u003e1,Et.write_shift(2,Rt);var Ht=Gt.getFullYear()-1980;Ht=Ht\u003c\u003c4|Gt.getMonth()+1,Ht=Ht\u003c\u003c5|Gt.getDate(),Et.write_shift(2,Ht)}function ie(Et){var Gt=Et.read_shift(2)\u002665535,Rt=Et.read_shift(2)\u002665535,Ht=new Date,Qt=Rt\u002631;Rt\u003e\u003e\u003e=5;var Nt=Rt\u002615;Rt\u003e\u003e\u003e=4,Ht.setMilliseconds(0),Ht.setFullYear(Rt+1980),Ht.setMonth(Nt-1),Ht.setDate(Qt);var _n=Gt\u002631;Gt\u003e\u003e\u003e=5;var qn=Gt\u002663;return Gt\u003e\u003e\u003e=6,Ht.setHours(Gt),Ht.setMinutes(qn),Ht.setSeconds(_n\u003c\u003c1),Ht}function ne(Et){R(Et,0);for(var Gt={},Rt=0;Et.l\u003c=Et.length-4;){var Ht=Et.read_shift(2),Qt=Et.read_shift(2),Nt=Et.l+Qt,_n={};Ht===21589\u0026\u0026(Rt=Et.read_shift(1),Rt\u00261\u0026\u0026(_n.mtime=Et.read_shift(4)),Qt\u003e5\u0026\u0026(Rt\u00262\u0026\u0026(_n.atime=Et.read_shift(4)),Rt\u00264\u0026\u0026(_n.ctime=Et.read_shift(4))),_n.mtime\u0026\u0026(_n.mt=new Date(_n.mtime*1e3))),Et.l=Nt,Gt[Ht]=_n}return Gt}var le;function ge(){return le||(le=qXi)}function _e(Et,Gt){if(Et[0]==80\u0026\u0026Et[1]==75)return Ro(Et,Gt);if((Et[0]|32)==109\u0026\u0026(Et[1]|32)==105)return Rs(Et,Gt);if(Et.length\u003c512)throw new Error(\"CFB file size \"+Et.length+\" \u003c 512\");var Rt=3,Ht=512,Qt=0,Nt=0,_n=0,qn=0,En=0,Rn=[],Hn=Et.slice(0,512);R(Hn,0);var Lo=ue(Hn);switch(Rt=Lo[0],Rt){case 3:Ht=512;break;case 4:Ht=4096;break;case 0:if(Lo[1]==0)return Ro(Et,Gt);default:throw new Error(\"Major Version: Expected 3 or 4 saw \"+Rt)}Ht!==512\u0026\u0026(Hn=Et.slice(0,Ht),R(Hn,28));var Io=Et.slice(0,Ht);fe(Hn,Rt);var gi=Hn.read_shift(4,\"i\");if(Rt===3\u0026\u0026gi!==0)throw new Error(\"# Directory Sectors: Expected 0 saw \"+gi);Hn.l+=4,_n=Hn.read_shift(4,\"i\"),Hn.l+=4,Hn.chk(\"00100000\",\"Mini Stream Cutoff Size: \"),qn=Hn.read_shift(4,\"i\"),Qt=Hn.read_shift(4,\"i\"),En=Hn.read_shift(4,\"i\"),Nt=Hn.read_shift(4,\"i\");for(var jo=-1,oi=0;oi\u003c109\u0026\u0026(jo=Hn.read_shift(4,\"i\"),!(jo\u003c0));++oi)Rn[oi]=jo;var Ji=pe(Et,Ht);ve(En,Nt,Ji,Ht,Rn);var wi=Qe(Ji,_n,Rn,Ht);wi[_n].name=\"!Directory\",Qt\u003e0\u0026\u0026qn!==At\u0026\u0026(wi[qn].name=\"!MiniFAT\"),wi[Rn[0]].name=\"!FAT\",wi.fat_addrs=Rn,wi.ssz=Ht;var Br={},gr=[],oa=[],hs=[];Pe(_n,wi,Ji,gr,Qt,Br,oa,qn),ye(oa,hs,gr),gr.shift();var Li={FileIndex:oa,FullPaths:hs};return Gt\u0026\u0026Gt.raw\u0026\u0026(Li.raw={header:Io,sectors:Ji}),Li}function ue(Et){if(Et[Et.l]==80\u0026\u0026Et[Et.l+1]==75)return[0,0];Et.chk(at,\"Header Signature: \"),Et.l+=16;var Gt=Et.read_shift(2,\"u\");return[Et.read_shift(2,\"u\"),Gt]}function fe(Et,Gt){var Rt=9;switch(Et.l+=2,Rt=Et.read_shift(2)){case 9:if(Gt!=3)throw new Error(\"Sector Shift: Expected 9 saw \"+Rt);break;case 12:if(Gt!=4)throw new Error(\"Sector Shift: Expected 12 saw \"+Rt);break;default:throw new Error(\"Sector Shift: Expected 9 or 12 saw \"+Rt)}Et.chk(\"0600\",\"Mini Sector Shift: \"),Et.chk(\"000000000000\",\"Reserved: \")}function pe(Et,Gt){for(var Rt=Math.ceil(Et.length/Gt)-1,Ht=[],Qt=1;Qt\u003cRt;++Qt)Ht[Qt-1]=Et.slice(Qt*Gt,(Qt+1)*Gt);return Ht[Rt-1]=Et.slice(Rt*Gt),Ht}function ye(Et,Gt,Rt){for(var Ht=0,Qt=0,Nt=0,_n=0,qn=0,En=Rt.length,Rn=[],Hn=[];Ht\u003cEn;++Ht)Rn[Ht]=Hn[Ht]=Ht,Gt[Ht]=Rt[Ht];for(;qn\u003cHn.length;++qn)Ht=Hn[qn],Qt=Et[Ht].L,Nt=Et[Ht].R,_n=Et[Ht].C,Rn[Ht]===Ht\u0026\u0026(Qt!==-1\u0026\u0026Rn[Qt]!==Qt\u0026\u0026(Rn[Ht]=Rn[Qt]),Nt!==-1\u0026\u0026Rn[Nt]!==Nt\u0026\u0026(Rn[Ht]=Rn[Nt])),_n!==-1\u0026\u0026(Rn[_n]=Ht),Qt!==-1\u0026\u0026Ht!=Rn[Ht]\u0026\u0026(Rn[Qt]=Rn[Ht],Hn.lastIndexOf(Qt)\u003cqn\u0026\u0026Hn.push(Qt)),Nt!==-1\u0026\u0026Ht!=Rn[Ht]\u0026\u0026(Rn[Nt]=Rn[Ht],Hn.lastIndexOf(Nt)\u003cqn\u0026\u0026Hn.push(Nt));for(Ht=1;Ht\u003cEn;++Ht)Rn[Ht]===Ht\u0026\u0026(Nt!==-1\u0026\u0026Rn[Nt]!==Nt?Rn[Ht]=Rn[Nt]:Qt!==-1\u0026\u0026Rn[Qt]!==Qt\u0026\u0026(Rn[Ht]=Rn[Qt]));for(Ht=1;Ht\u003cEn;++Ht)if(Et[Ht].type!==0){if(qn=Ht,qn!=Rn[qn])do qn=Rn[qn],Gt[Ht]=Gt[qn]+\"/\"+Gt[Ht];while(qn!==0\u0026\u0026Rn[qn]!==-1\u0026\u0026qn!=Rn[qn]);Rn[Ht]=-1}for(Gt[0]+=\"/\",Ht=1;Ht\u003cEn;++Ht)Et[Ht].type!==2\u0026\u0026(Gt[Ht]+=\"/\")}function Me(Et,Gt,Rt){for(var Ht=Et.start,Qt=Et.size,Nt=[],_n=Ht;Rt\u0026\u0026Qt\u003e0\u0026\u0026_n\u003e=0;)Nt.push(Gt.slice(_n*tt,_n*tt+tt)),Qt-=tt,_n=B(Rt,_n*4);return Nt.length===0?F(0):I(Nt).slice(0,Et.size)}function ve(Et,Gt,Rt,Ht,Qt){var Nt=At;if(Et===At){if(Gt!==0)throw new Error(\"DIFAT chain shorter than expected\")}else if(Et!==-1){var _n=Rt[Et],qn=(Ht\u003e\u003e\u003e2)-1;if(!_n)return;for(var En=0;En\u003cqn\u0026\u0026(Nt=B(_n,En*4))!==At;++En)Qt.push(Nt);Gt\u003e=1\u0026\u0026ve(B(_n,Ht-4),Gt-1,Rt,Ht,Qt)}}function he(Et,Gt,Rt,Ht,Qt){var Nt=[],_n=[];Qt||(Qt=[]);var qn=Ht-1,En=0,Rn=0;for(En=Gt;En\u003e=0;){Qt[En]=!0,Nt[Nt.length]=En,_n.push(Et[En]);var Hn=Rt[Math.floor(En*4/Ht)];if(Rn=En*4\u0026qn,Ht\u003c4+Rn)throw new Error(\"FAT boundary crossed: \"+En+\" 4 \"+Ht);if(!Et[Hn])break;En=B(Et[Hn],Rn)}return{nodes:Nt,data:g([_n])}}function Qe(Et,Gt,Rt,Ht){var Qt=Et.length,Nt=[],_n=[],qn=[],En=[],Rn=Ht-1,Hn=0,Lo=0,Io=0,gi=0;for(Hn=0;Hn\u003cQt;++Hn)if(qn=[],Io=Hn+Gt,Io\u003e=Qt\u0026\u0026(Io-=Qt),!_n[Io]){En=[];var jo=[];for(Lo=Io;Lo\u003e=0;){jo[Lo]=!0,_n[Lo]=!0,qn[qn.length]=Lo,En.push(Et[Lo]);var oi=Rt[Math.floor(Lo*4/Ht)];if(gi=Lo*4\u0026Rn,Ht\u003c4+gi)throw new Error(\"FAT boundary crossed: \"+Lo+\" 4 \"+Ht);if(!Et[oi]||(Lo=B(Et[oi],gi),jo[Lo]))break}Nt[Io]={nodes:qn,data:g([En])}}return Nt}function Pe(Et,Gt,Rt,Ht,Qt,Nt,_n,qn){for(var En=0,Rn=Ht.length?2:0,Hn=Gt[Et].data,Lo=0,Io=0,gi;Lo\u003cHn.length;Lo+=128){var jo=Hn.slice(Lo,Lo+128);R(jo,64),Io=jo.read_shift(2),gi=d(jo,0,Io-Rn),Ht.push(gi);var oi={name:gi,type:jo.read_shift(1),color:jo.read_shift(1),L:jo.read_shift(4,\"i\"),R:jo.read_shift(4,\"i\"),C:jo.read_shift(4,\"i\"),clsid:jo.read_shift(16),state:jo.read_shift(4,\"i\"),start:0,size:0},Ji=jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2);Ji!==0\u0026\u0026(oi.ct=we(jo,jo.l-8));var wi=jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2)+jo.read_shift(2);wi!==0\u0026\u0026(oi.mt=we(jo,jo.l-8)),oi.start=jo.read_shift(4,\"i\"),oi.size=jo.read_shift(4,\"i\"),oi.size\u003c0\u0026\u0026oi.start\u003c0\u0026\u0026(oi.size=oi.type=0,oi.start=At,oi.name=\"\"),oi.type===5?(En=oi.start,Qt\u003e0\u0026\u0026En!==At\u0026\u0026(Gt[En].name=\"!StreamData\")):oi.size\u003e=4096?(oi.storage=\"fat\",Gt[oi.start]===void 0\u0026\u0026(Gt[oi.start]=he(Rt,oi.start,Gt.fat_addrs,Gt.ssz)),Gt[oi.start].name=oi.name,oi.content=Gt[oi.start].data.slice(0,oi.size)):(oi.storage=\"minifat\",oi.size\u003c0?oi.size=0:En!==At\u0026\u0026oi.start!==At\u0026\u0026Gt[En]\u0026\u0026(oi.content=Me(oi,Gt[En].data,(Gt[qn]||{}).data))),oi.content\u0026\u0026R(oi.content,0),Nt[gi]=oi,_n.push(oi)}}function we(Et,Gt){return new Date((E(Et,Gt+4)/1e7*Math.pow(2,32)+E(Et,Gt)/1e7-11644473600)*1e3)}function Te(Et,Gt){return ge(),_e(le.readFileSync(Et),Gt)}function Re(Et,Gt){var Rt=Gt\u0026\u0026Gt.type;switch(Rt||r\u0026\u0026Buffer.isBuffer(Et)\u0026\u0026(Rt=\"buffer\"),Rt||\"base64\"){case\"file\":return Te(Et,Gt);case\"base64\":return _e(c(i(Et)),Gt);case\"binary\":return _e(c(Et),Gt)}return _e(Et,Gt)}function Ee(Et,Gt){var Rt=Gt||{},Ht=Rt.root||\"Root Entry\";if(Et.FullPaths||(Et.FullPaths=[]),Et.FileIndex||(Et.FileIndex=[]),Et.FullPaths.length!==Et.FileIndex.length)throw new Error(\"inconsistent CFB structure\");Et.FullPaths.length===0\u0026\u0026(Et.FullPaths[0]=Ht+\"/\",Et.FileIndex[0]={name:Ht,type:5}),Rt.CLSID\u0026\u0026(Et.FileIndex[0].clsid=Rt.CLSID),ke(Et)}function ke(Et){var Gt=\"\u0001Sh33tJ5\";if(!U.find(Et,\"/\"+Gt)){var Rt=F(4);Rt[0]=55,Rt[1]=Rt[3]=50,Rt[2]=54,Et.FileIndex.push({name:Gt,type:2,content:Rt,size:4,L:69,R:69,C:69}),Et.FullPaths.push(Et.FullPaths[0]+Gt),Ce(Et)}}function Ce(Et,Gt){Ee(Et);for(var Rt=!1,Ht=!1,Qt=Et.FullPaths.length-1;Qt\u003e=0;--Qt){var Nt=Et.FileIndex[Qt];switch(Nt.type){case 0:Ht?Rt=!0:(Et.FileIndex.pop(),Et.FullPaths.pop());break;case 1:case 2:case 5:Ht=!0,isNaN(Nt.R*Nt.L*Nt.C)\u0026\u0026(Rt=!0),Nt.R\u003e-1\u0026\u0026Nt.L\u003e-1\u0026\u0026Nt.R==Nt.L\u0026\u0026(Rt=!0);break;default:Rt=!0;break}}if(!(!Rt\u0026\u0026!Gt)){var _n=new Date(1987,1,19),qn=0,En=Object.create?Object.create(null):{},Rn=[];for(Qt=0;Qt\u003cEt.FullPaths.length;++Qt)En[Et.FullPaths[Qt]]=!0,Et.FileIndex[Qt].type!==0\u0026\u0026Rn.push([Et.FullPaths[Qt],Et.FileIndex[Qt]]);for(Qt=0;Qt\u003cRn.length;++Qt){var Hn=j(Rn[Qt][0]);for(Ht=En[Hn];!Ht;){for(;j(Hn)\u0026\u0026!En[j(Hn)];)Hn=j(Hn);Rn.push([Hn,{name:J(Hn).replace(\"/\",\"\"),type:1,clsid:gt,ct:_n,mt:_n,content:null}]),En[Hn]=!0,Hn=j(Rn[Qt][0]),Ht=En[Hn]}}for(Rn.sort(function(gi,jo){return te(gi[0],jo[0])}),Et.FullPaths=[],Et.FileIndex=[],Qt=0;Qt\u003cRn.length;++Qt)Et.FullPaths[Qt]=Rn[Qt][0],Et.FileIndex[Qt]=Rn[Qt][1];for(Qt=0;Qt\u003cRn.length;++Qt){var Lo=Et.FileIndex[Qt],Io=Et.FullPaths[Qt];if(Lo.name=J(Io).replace(\"/\",\"\"),Lo.L=Lo.R=Lo.C=-(Lo.color=1),Lo.size=Lo.content?Lo.content.length:0,Lo.start=0,Lo.clsid=Lo.clsid||gt,Qt===0)Lo.C=Rn.length\u003e1?1:-1,Lo.size=0,Lo.type=5;else if(Io.slice(-1)==\"/\"){for(qn=Qt+1;qn\u003cRn.length\u0026\u0026j(Et.FullPaths[qn])!=Io;++qn);for(Lo.C=qn\u003e=Rn.length?-1:qn,qn=Qt+1;qn\u003cRn.length\u0026\u0026j(Et.FullPaths[qn])!=j(Io);++qn);Lo.R=qn\u003e=Rn.length?-1:qn,Lo.type=1}else j(Et.FullPaths[Qt+1]||\"\")==j(Io)\u0026\u0026(Lo.R=Qt+1),Lo.type=2}}}function Le(Et,Gt){var Rt=Gt||{};if(Rt.fileType==\"mad\")return ur(Et,Rt);if(Ce(Et),Rt.fileType===\"zip\")return uo(Et,Rt);var Ht=(function(gi){for(var jo=0,oi=0,Ji=0;Ji\u003cgi.FileIndex.length;++Ji){var wi=gi.FileIndex[Ji];if(wi.content){var Br=wi.content.length;Br\u003e0\u0026\u0026(Br\u003c4096?jo+=Br+63\u003e\u003e6:oi+=Br+511\u003e\u003e9)}}for(var gr=gi.FullPaths.length+3\u003e\u003e2,oa=jo+7\u003e\u003e3,hs=jo+127\u003e\u003e7,Li=oa+oi+gr+hs,ys=Li+127\u003e\u003e7,dr=ys\u003c=109?0:Math.ceil((ys-109)/127);Li+ys+dr+127\u003e\u003e7\u003eys;)dr=++ys\u003c=109?0:Math.ceil((ys-109)/127);var cA=[1,dr,ys,hs,gr,oi,jo,0];return gi.FileIndex[0].size=jo\u003c\u003c6,cA[7]=(gi.FileIndex[0].start=cA[0]+cA[1]+cA[2]+cA[3]+cA[4]+cA[5])+(cA[6]+7\u003e\u003e3),cA})(Et),Qt=F(Ht[7]\u003c\u003c9),Nt=0,_n=0;{for(Nt=0;Nt\u003c8;++Nt)Qt.write_shift(1,nt[Nt]);for(Nt=0;Nt\u003c8;++Nt)Qt.write_shift(2,0);for(Qt.write_shift(2,62),Qt.write_shift(2,3),Qt.write_shift(2,65534),Qt.write_shift(2,9),Qt.write_shift(2,6),Nt=0;Nt\u003c3;++Nt)Qt.write_shift(2,0);for(Qt.write_shift(4,0),Qt.write_shift(4,Ht[2]),Qt.write_shift(4,Ht[0]+Ht[1]+Ht[2]+Ht[3]-1),Qt.write_shift(4,0),Qt.write_shift(4,4096),Qt.write_shift(4,Ht[3]?Ht[0]+Ht[1]+Ht[2]-1:At),Qt.write_shift(4,Ht[3]),Qt.write_shift(-4,Ht[1]?Ht[0]-1:At),Qt.write_shift(4,Ht[1]),Nt=0;Nt\u003c109;++Nt)Qt.write_shift(-4,Nt\u003cHt[2]?Ht[1]+Nt:-1)}if(Ht[1])for(_n=0;_n\u003cHt[1];++_n){for(;Nt\u003c236+_n*127;++Nt)Qt.write_shift(-4,Nt\u003cHt[2]?Ht[1]+Nt:-1);Qt.write_shift(-4,_n===Ht[1]-1?At:_n+1)}var qn=function(gi){for(_n+=gi;Nt\u003c_n-1;++Nt)Qt.write_shift(-4,Nt+1);gi\u0026\u0026(++Nt,Qt.write_shift(-4,At))};for(_n=Nt=0,_n+=Ht[1];Nt\u003c_n;++Nt)Qt.write_shift(-4,bt.DIFSECT);for(_n+=Ht[2];Nt\u003c_n;++Nt)Qt.write_shift(-4,bt.FATSECT);qn(Ht[3]),qn(Ht[4]);for(var En=0,Rn=0,Hn=Et.FileIndex[0];En\u003cEt.FileIndex.length;++En)Hn=Et.FileIndex[En],Hn.content\u0026\u0026(Rn=Hn.content.length,!(Rn\u003c4096)\u0026\u0026(Hn.start=_n,qn(Rn+511\u003e\u003e9)));for(qn(Ht[6]+7\u003e\u003e3);Qt.l\u0026511;)Qt.write_shift(-4,bt.ENDOFCHAIN);for(_n=Nt=0,En=0;En\u003cEt.FileIndex.length;++En)Hn=Et.FileIndex[En],Hn.content\u0026\u0026(Rn=Hn.content.length,!(!Rn||Rn\u003e=4096)\u0026\u0026(Hn.start=_n,qn(Rn+63\u003e\u003e6)));for(;Qt.l\u0026511;)Qt.write_shift(-4,bt.ENDOFCHAIN);for(Nt=0;Nt\u003cHt[4]\u003c\u003c2;++Nt){var Lo=Et.FullPaths[Nt];if(!Lo||Lo.length===0){for(En=0;En\u003c17;++En)Qt.write_shift(4,0);for(En=0;En\u003c3;++En)Qt.write_shift(4,-1);for(En=0;En\u003c12;++En)Qt.write_shift(4,0);continue}Hn=Et.FileIndex[Nt],Nt===0\u0026\u0026(Hn.start=Hn.size?Hn.start-1:At);var Io=Nt===0\u0026\u0026Rt.root||Hn.name;if(Io.length\u003e32\u0026\u0026(console.error(\"Name \"+Io+\" will be truncated to \"+Io.slice(0,32)),Io=Io.slice(0,32)),Rn=2*(Io.length+1),Qt.write_shift(64,Io,\"utf16le\"),Qt.write_shift(2,Rn),Qt.write_shift(1,Hn.type),Qt.write_shift(1,Hn.color),Qt.write_shift(-4,Hn.L),Qt.write_shift(-4,Hn.R),Qt.write_shift(-4,Hn.C),Hn.clsid)Qt.write_shift(16,Hn.clsid,\"hex\");else for(En=0;En\u003c4;++En)Qt.write_shift(4,0);Qt.write_shift(4,Hn.state||0),Qt.write_shift(4,0),Qt.write_shift(4,0),Qt.write_shift(4,0),Qt.write_shift(4,0),Qt.write_shift(4,Hn.start),Qt.write_shift(4,Hn.size),Qt.write_shift(4,0)}for(Nt=1;Nt\u003cEt.FileIndex.length;++Nt)if(Hn=Et.FileIndex[Nt],Hn.size\u003e=4096)if(Qt.l=Hn.start+1\u003c\u003c9,r\u0026\u0026Buffer.isBuffer(Hn.content))Hn.content.copy(Qt,Qt.l,0,Hn.size),Qt.l+=Hn.size+511\u0026-512;else{for(En=0;En\u003cHn.size;++En)Qt.write_shift(1,Hn.content[En]);for(;En\u0026511;++En)Qt.write_shift(1,0)}for(Nt=1;Nt\u003cEt.FileIndex.length;++Nt)if(Hn=Et.FileIndex[Nt],Hn.size\u003e0\u0026\u0026Hn.size\u003c4096)if(r\u0026\u0026Buffer.isBuffer(Hn.content))Hn.content.copy(Qt,Qt.l,0,Hn.size),Qt.l+=Hn.size+63\u0026-64;else{for(En=0;En\u003cHn.size;++En)Qt.write_shift(1,Hn.content[En]);for(;En\u002663;++En)Qt.write_shift(1,0)}if(r)Qt.l=Qt.length;else for(;Qt.l\u003cQt.length;)Qt.write_shift(1,0);return Qt}function Ye(Et,Gt){var Rt=Et.FullPaths.map(function(En){return En.toUpperCase()}),Ht=Rt.map(function(En){var Rn=En.split(\"/\");return Rn[Rn.length-(En.slice(-1)==\"/\"?2:1)]}),Qt=!1;Gt.charCodeAt(0)===47?(Qt=!0,Gt=Rt[0].slice(0,-1)+Gt):Qt=Gt.indexOf(\"/\")!==-1;var Nt=Gt.toUpperCase(),_n=Qt===!0?Rt.indexOf(Nt):Ht.indexOf(Nt);if(_n!==-1)return Et.FileIndex[_n];var qn=!Nt.match(u);for(Nt=Nt.replace(l,\"\"),qn\u0026\u0026(Nt=Nt.replace(u,\"!\")),_n=0;_n\u003cRt.length;++_n)if((qn?Rt[_n].replace(u,\"!\"):Rt[_n]).replace(l,\"\")==Nt||(qn?Ht[_n].replace(u,\"!\"):Ht[_n]).replace(l,\"\")==Nt)return Et.FileIndex[_n];return null}var tt=64,At=-2,at=\"d0cf11e0a1b11ae1\",nt=[208,207,17,224,161,177,26,225],gt=\"00000000000000000000000000000000\",bt={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:At,FREESECT:-1,HEADER_SIGNATURE:at,HEADER_MINOR_VERSION:\"3e00\",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:gt,EntryTypes:[\"unknown\",\"storage\",\"stream\",\"lockbytes\",\"property\",\"root\"]};function Ct(Et,Gt,Rt){ge();var Ht=Le(Et,Rt);le.writeFileSync(Gt,Ht)}function Dt(Et){for(var Gt=new Array(Et.length),Rt=0;Rt\u003cEt.length;++Rt)Gt[Rt]=String.fromCharCode(Et[Rt]);return Gt.join(\"\")}function kt(Et,Gt){var Rt=Le(Et,Gt);switch(Gt\u0026\u0026Gt.type||\"buffer\"){case\"file\":return ge(),le.writeFileSync(Gt.filename,Rt),Rt;case\"binary\":return typeof Rt==\"string\"?Rt:Dt(Rt);case\"base64\":return o(typeof Rt==\"string\"?Rt:Dt(Rt));case\"buffer\":if(r)return Buffer.isBuffer(Rt)?Rt:s(Rt);case\"array\":return typeof Rt==\"string\"?c(Rt):Rt}return Rt}var it;function Yt(Et){try{var Gt=Et.InflateRaw,Rt=new Gt;if(Rt._processChunk(new Uint8Array([3,0]),Rt._finishFlushFlag),Rt.bytesRead)it=Et;else throw new Error(\"zlib does not expose bytesRead\")}catch(Ht){console.error(\"cannot use native zlib: \"+(Ht.message||Ht))}}function pn(Et,Gt){if(!it)return To(Et,Gt);var Rt=it.InflateRaw,Ht=new Rt,Qt=Ht._processChunk(Et.slice(Et.l),Ht._finishFlushFlag);return Et.l+=Ht.bytesRead,Qt}function be(Et){return it?it.deflateRawSync(Et):qt(Et)}var et=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],It=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],Bt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function mt(Et){var Gt=(Et\u003c\u003c1|Et\u003c\u003c11)\u0026139536|(Et\u003c\u003c5|Et\u003c\u003c15)\u0026558144;return(Gt\u003e\u003e16|Gt\u003e\u003e8|Gt)\u0026255}for(var st=typeof Uint8Array\u003c\"u\",xt=st?new Uint8Array(256):[],Xe=0;Xe\u003c256;++Xe)xt[Xe]=mt(Xe);function Ze(Et,Gt){var Rt=xt[Et\u0026255];return Gt\u003c=8?Rt\u003e\u003e\u003e8-Gt:(Rt=Rt\u003c\u003c8|xt[Et\u003e\u003e8\u0026255],Gt\u003c=16?Rt\u003e\u003e\u003e16-Gt:(Rt=Rt\u003c\u003c8|xt[Et\u003e\u003e16\u0026255],Rt\u003e\u003e\u003e24-Gt))}function dt(Et,Gt){var Rt=Gt\u00267,Ht=Gt\u003e\u003e\u003e3;return(Et[Ht]|(Rt\u003c=6?0:Et[Ht+1]\u003c\u003c8))\u003e\u003e\u003eRt\u00263}function Ut(Et,Gt){var Rt=Gt\u00267,Ht=Gt\u003e\u003e\u003e3;return(Et[Ht]|(Rt\u003c=5?0:Et[Ht+1]\u003c\u003c8))\u003e\u003e\u003eRt\u00267}function Wt(Et,Gt){var Rt=Gt\u00267,Ht=Gt\u003e\u003e\u003e3;return(Et[Ht]|(Rt\u003c=4?0:Et[Ht+1]\u003c\u003c8))\u003e\u003e\u003eRt\u002615}function Xt(Et,Gt){var Rt=Gt\u00267,Ht=Gt\u003e\u003e\u003e3;return(Et[Ht]|(Rt\u003c=3?0:Et[Ht+1]\u003c\u003c8))\u003e\u003e\u003eRt\u002631}function Jt(Et,Gt){var Rt=Gt\u00267,Ht=Gt\u003e\u003e\u003e3;return(Et[Ht]|(Rt\u003c=1?0:Et[Ht+1]\u003c\u003c8))\u003e\u003e\u003eRt\u0026127}function yn(Et,Gt,Rt){var Ht=Gt\u00267,Qt=Gt\u003e\u003e\u003e3,Nt=(1\u003c\u003cRt)-1,_n=Et[Qt]\u003e\u003e\u003eHt;return Rt\u003c8-Ht||(_n|=Et[Qt+1]\u003c\u003c8-Ht,Rt\u003c16-Ht)||(_n|=Et[Qt+2]\u003c\u003c16-Ht,Rt\u003c24-Ht)||(_n|=Et[Qt+3]\u003c\u003c24-Ht),_n\u0026Nt}function An(Et,Gt,Rt){var Ht=Gt\u00267,Qt=Gt\u003e\u003e\u003e3;return Ht\u003c=5?Et[Qt]|=(Rt\u00267)\u003c\u003cHt:(Et[Qt]|=Rt\u003c\u003cHt\u0026255,Et[Qt+1]=(Rt\u00267)\u003e\u003e8-Ht),Gt+3}function kn(Et,Gt,Rt){var Ht=Gt\u00267,Qt=Gt\u003e\u003e\u003e3;return Rt=(Rt\u00261)\u003c\u003cHt,Et[Qt]|=Rt,Gt+1}function $n(Et,Gt,Rt){var Ht=Gt\u00267,Qt=Gt\u003e\u003e\u003e3;return Rt\u003c\u003c=Ht,Et[Qt]|=Rt\u0026255,Rt\u003e\u003e\u003e=8,Et[Qt+1]=Rt,Gt+8}function ht(Et,Gt,Rt){var Ht=Gt\u00267,Qt=Gt\u003e\u003e\u003e3;return Rt\u003c\u003c=Ht,Et[Qt]|=Rt\u0026255,Rt\u003e\u003e\u003e=8,Et[Qt+1]=Rt\u0026255,Et[Qt+2]=Rt\u003e\u003e\u003e8,Gt+16}function Kt(Et,Gt){var Rt=Et.length,Ht=2*Rt\u003eGt?2*Rt:Gt+5,Qt=0;if(Rt\u003e=Gt)return Et;if(r){var Nt=A(Ht);if(Et.copy)Et.copy(Nt);else for(;Qt\u003cEt.length;++Qt)Nt[Qt]=Et[Qt];return Nt}else if(st){var _n=new Uint8Array(Ht);if(_n.set)_n.set(Et);else for(;Qt\u003cRt;++Qt)_n[Qt]=Et[Qt];return _n}return Et.length=Ht,Et}function rn(Et){for(var Gt=new Array(Et),Rt=0;Rt\u003cEt;++Rt)Gt[Rt]=0;return Gt}function Lt(Et,Gt,Rt){var Ht=1,Qt=0,Nt=0,_n=0,qn=0,En=Et.length,Rn=st?new Uint16Array(32):rn(32);for(Nt=0;Nt\u003c32;++Nt)Rn[Nt]=0;for(Nt=En;Nt\u003cRt;++Nt)Et[Nt]=0;En=Et.length;var Hn=st?new Uint16Array(En):rn(En);for(Nt=0;Nt\u003cEn;++Nt)Rn[Qt=Et[Nt]]++,Ht\u003cQt\u0026\u0026(Ht=Qt),Hn[Nt]=0;for(Rn[0]=0,Nt=1;Nt\u003c=Ht;++Nt)Rn[Nt+16]=qn=qn+Rn[Nt-1]\u003c\u003c1;for(Nt=0;Nt\u003cEn;++Nt)qn=Et[Nt],qn!=0\u0026\u0026(Hn[Nt]=Rn[qn+16]++);var Lo=0;for(Nt=0;Nt\u003cEn;++Nt)if(Lo=Et[Nt],Lo!=0)for(qn=Ze(Hn[Nt],Ht)\u003e\u003eHt-Lo,_n=(1\u003c\u003cHt+4-Lo)-1;_n\u003e=0;--_n)Gt[qn|_n\u003c\u003cLo]=Lo\u002615|Nt\u003c\u003c4;return Ht}var Ho=st?new Uint16Array(512):rn(512),Ao=st?new Uint16Array(32):rn(32);if(!st){for(var qe=0;qe\u003c512;++qe)Ho[qe]=0;for(qe=0;qe\u003c32;++qe)Ao[qe]=0}(function(){for(var Et=[],Gt=0;Gt\u003c32;Gt++)Et.push(5);Lt(Et,Ao,32);var Rt=[];for(Gt=0;Gt\u003c=143;Gt++)Rt.push(8);for(;Gt\u003c=255;Gt++)Rt.push(9);for(;Gt\u003c=279;Gt++)Rt.push(7);for(;Gt\u003c=287;Gt++)Rt.push(8);Lt(Rt,Ho,288)})();var vt=(function(){for(var Gt=st?new Uint8Array(32768):[],Rt=0,Ht=0;Rt\u003cBt.length-1;++Rt)for(;Ht\u003cBt[Rt+1];++Ht)Gt[Ht]=Rt;for(;Ht\u003c32768;++Ht)Gt[Ht]=29;var Qt=st?new Uint8Array(259):[];for(Rt=0,Ht=0;Rt\u003cIt.length-1;++Rt)for(;Ht\u003cIt[Rt+1];++Ht)Qt[Ht]=Rt;function Nt(qn,En){for(var Rn=0;Rn\u003cqn.length;){var Hn=Math.min(65535,qn.length-Rn),Lo=Rn+Hn==qn.length;for(En.write_shift(1,+Lo),En.write_shift(2,Hn),En.write_shift(2,~Hn\u002665535);Hn-- \u003e0;)En[En.l++]=qn[Rn++]}return En.l}function _n(qn,En){for(var Rn=0,Hn=0,Lo=st?new Uint16Array(32768):[];Hn\u003cqn.length;){var Io=Math.min(65535,qn.length-Hn);if(Io\u003c10){for(Rn=An(En,Rn,+(Hn+Io==qn.length)),Rn\u00267\u0026\u0026(Rn+=8-(Rn\u00267)),En.l=Rn/8|0,En.write_shift(2,Io),En.write_shift(2,~Io\u002665535);Io-- \u003e0;)En[En.l++]=qn[Hn++];Rn=En.l*8;continue}Rn=An(En,Rn,+(Hn+Io==qn.length)+2);for(var gi=0;Io-- \u003e0;){var jo=qn[Hn];gi=(gi\u003c\u003c5^jo)\u002632767;var oi=-1,Ji=0;if((oi=Lo[gi])\u0026\u0026(oi|=Hn\u0026-32768,oi\u003eHn\u0026\u0026(oi-=32768),oi\u003cHn))for(;qn[oi+Ji]==qn[Hn+Ji]\u0026\u0026Ji\u003c250;)++Ji;if(Ji\u003e2){jo=Qt[Ji],jo\u003c=22?Rn=$n(En,Rn,xt[jo+1]\u003e\u003e1)-1:($n(En,Rn,3),Rn+=5,$n(En,Rn,xt[jo-23]\u003e\u003e5),Rn+=3);var wi=jo\u003c8?0:jo-4\u003e\u003e2;wi\u003e0\u0026\u0026(ht(En,Rn,Ji-It[jo]),Rn+=wi),jo=Gt[Hn-oi],Rn=$n(En,Rn,xt[jo]\u003e\u003e3),Rn-=3;var Br=jo\u003c4?0:jo-2\u003e\u003e1;Br\u003e0\u0026\u0026(ht(En,Rn,Hn-oi-Bt[jo]),Rn+=Br);for(var gr=0;gr\u003cJi;++gr)Lo[gi]=Hn\u002632767,gi=(gi\u003c\u003c5^qn[Hn])\u002632767,++Hn;Io-=Ji-1}else jo\u003c=143?jo=jo+48:Rn=kn(En,Rn,1),Rn=$n(En,Rn,xt[jo]),Lo[gi]=Hn\u002632767,++Hn}Rn=$n(En,Rn,0)-1}return En.l=(Rn+7)/8|0,En.l}return function(En,Rn){return En.length\u003c8?Nt(En,Rn):_n(En,Rn)}})();function qt(Et){var Gt=F(50+Math.floor(Et.length*1.1)),Rt=vt(Et,Gt);return Gt.slice(0,Rt)}var Zt=st?new Uint16Array(32768):rn(32768),nn=st?new Uint16Array(32768):rn(32768),zn=st?new Uint16Array(128):rn(128),Nn=1,Co=1;function ei(Et,Gt){var Rt=Xt(Et,Gt)+257;Gt+=5;var Ht=Xt(Et,Gt)+1;Gt+=5;var Qt=Wt(Et,Gt)+4;Gt+=4;for(var Nt=0,_n=st?new Uint8Array(19):rn(19),qn=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],En=1,Rn=st?new Uint8Array(8):rn(8),Hn=st?new Uint8Array(8):rn(8),Lo=_n.length,Io=0;Io\u003cQt;++Io)_n[et[Io]]=Nt=Ut(Et,Gt),En\u003cNt\u0026\u0026(En=Nt),Rn[Nt]++,Gt+=3;var gi=0;for(Rn[0]=0,Io=1;Io\u003c=En;++Io)Hn[Io]=gi=gi+Rn[Io-1]\u003c\u003c1;for(Io=0;Io\u003cLo;++Io)(gi=_n[Io])!=0\u0026\u0026(qn[Io]=Hn[gi]++);var jo=0;for(Io=0;Io\u003cLo;++Io)if(jo=_n[Io],jo!=0){gi=xt[qn[Io]]\u003e\u003e8-jo;for(var oi=(1\u003c\u003c7-jo)-1;oi\u003e=0;--oi)zn[gi|oi\u003c\u003cjo]=jo\u00267|Io\u003c\u003c3}var Ji=[];for(En=1;Ji.length\u003cRt+Ht;)switch(gi=zn[Jt(Et,Gt)],Gt+=gi\u00267,gi\u003e\u003e\u003e=3){case 16:for(Nt=3+dt(Et,Gt),Gt+=2,gi=Ji[Ji.length-1];Nt-- \u003e0;)Ji.push(gi);break;case 17:for(Nt=3+Ut(Et,Gt),Gt+=3;Nt-- \u003e0;)Ji.push(0);break;case 18:for(Nt=11+Jt(Et,Gt),Gt+=7;Nt-- \u003e0;)Ji.push(0);break;default:Ji.push(gi),En\u003cgi\u0026\u0026(En=gi);break}var wi=Ji.slice(0,Rt),Br=Ji.slice(Rt);for(Io=Rt;Io\u003c286;++Io)wi[Io]=0;for(Io=Ht;Io\u003c30;++Io)Br[Io]=0;return Nn=Lt(wi,Zt,286),Co=Lt(Br,nn,30),Gt}function ro(Et,Gt){if(Et[0]==3\u0026\u0026!(Et[1]\u00263))return[a(Gt),2];for(var Rt=0,Ht=0,Qt=A(Gt||1\u003c\u003c18),Nt=0,_n=Qt.length\u003e\u003e\u003e0,qn=0,En=0;(Ht\u00261)==0;){if(Ht=Ut(Et,Rt),Rt+=3,Ht\u003e\u003e\u003e1)Ht\u003e\u003e1==1?(qn=9,En=5):(Rt=ei(Et,Rt),qn=Nn,En=Co);else{Rt\u00267\u0026\u0026(Rt+=8-(Rt\u00267));var Rn=Et[Rt\u003e\u003e\u003e3]|Et[(Rt\u003e\u003e\u003e3)+1]\u003c\u003c8;if(Rt+=32,Rn\u003e0)for(!Gt\u0026\u0026_n\u003cNt+Rn\u0026\u0026(Qt=Kt(Qt,Nt+Rn),_n=Qt.length);Rn-- \u003e0;)Qt[Nt++]=Et[Rt\u003e\u003e\u003e3],Rt+=8;continue}for(;;){!Gt\u0026\u0026_n\u003cNt+32767\u0026\u0026(Qt=Kt(Qt,Nt+32767),_n=Qt.length);var Hn=yn(Et,Rt,qn),Lo=Ht\u003e\u003e\u003e1==1?Ho[Hn]:Zt[Hn];if(Rt+=Lo\u002615,Lo\u003e\u003e\u003e=4,(Lo\u003e\u003e\u003e8\u0026255)===0)Qt[Nt++]=Lo;else{if(Lo==256)break;Lo-=257;var Io=Lo\u003c8?0:Lo-4\u003e\u003e2;Io\u003e5\u0026\u0026(Io=0);var gi=Nt+It[Lo];Io\u003e0\u0026\u0026(gi+=yn(Et,Rt,Io),Rt+=Io),Hn=yn(Et,Rt,En),Lo=Ht\u003e\u003e\u003e1==1?Ao[Hn]:nn[Hn],Rt+=Lo\u002615,Lo\u003e\u003e\u003e=4;var jo=Lo\u003c4?0:Lo-2\u003e\u003e1,oi=Bt[Lo];for(jo\u003e0\u0026\u0026(oi+=yn(Et,Rt,jo),Rt+=jo),!Gt\u0026\u0026_n\u003cgi\u0026\u0026(Qt=Kt(Qt,gi+100),_n=Qt.length);Nt\u003cgi;)Qt[Nt]=Qt[Nt-oi],++Nt}}}return Gt?[Qt,Rt+7\u003e\u003e\u003e3]:[Qt.slice(0,Nt),Rt+7\u003e\u003e\u003e3]}function To(Et,Gt){var Rt=Et.slice(Et.l||0),Ht=ro(Rt,Gt);return Et.l+=Ht[1],Ht[0]}function yo(Et,Gt){if(Et)typeof console\u003c\"u\"\u0026\u0026console.error(Gt);else throw new Error(Gt)}function Ro(Et,Gt){var Rt=Et;R(Rt,0);var Ht=[],Qt=[],Nt={FileIndex:Ht,FullPaths:Qt};Ee(Nt,{root:Gt.root});for(var _n=Rt.length-4;(Rt[_n]!=80||Rt[_n+1]!=75||Rt[_n+2]!=5||Rt[_n+3]!=6)\u0026\u0026_n\u003e=0;)--_n;Rt.l=_n+4,Rt.l+=4;var qn=Rt.read_shift(2);Rt.l+=6;var En=Rt.read_shift(4);for(Rt.l=En,_n=0;_n\u003cqn;++_n){Rt.l+=20;var Rn=Rt.read_shift(4),Hn=Rt.read_shift(4),Lo=Rt.read_shift(2),Io=Rt.read_shift(2),gi=Rt.read_shift(2);Rt.l+=8;var jo=Rt.read_shift(4),oi=ne(Rt.slice(Rt.l+Lo,Rt.l+Lo+Io));Rt.l+=Lo+Io+gi;var Ji=Rt.l;Rt.l=jo+4,On(Rt,Rn,Hn,Nt,oi),Rt.l=Ji}return Nt}function On(Et,Gt,Rt,Ht,Qt){Et.l+=2;var Nt=Et.read_shift(2),_n=Et.read_shift(2),qn=ie(Et);if(Nt\u00268257)throw new Error(\"Unsupported ZIP encryption\");for(var En=Et.read_shift(4),Rn=Et.read_shift(4),Hn=Et.read_shift(4),Lo=Et.read_shift(2),Io=Et.read_shift(2),gi=\"\",jo=0;jo\u003cLo;++jo)gi+=String.fromCharCode(Et[Et.l++]);if(Io){var oi=ne(Et.slice(Et.l,Et.l+Io));(oi[21589]||{}).mt\u0026\u0026(qn=oi[21589].mt),((Qt||{})[21589]||{}).mt\u0026\u0026(qn=Qt[21589].mt)}Et.l+=Io;var Ji=Et.slice(Et.l,Et.l+Rn);switch(_n){case 8:Ji=pn(Et,Hn);break;case 0:break;default:throw new Error(\"Unsupported ZIP Compression method \"+_n)}var wi=!1;Nt\u00268\u0026\u0026(En=Et.read_shift(4),En==134695760\u0026\u0026(En=Et.read_shift(4),wi=!0),Rn=Et.read_shift(4),Hn=Et.read_shift(4)),Rn!=Gt\u0026\u0026yo(wi,\"Bad compressed size: \"+Gt+\" != \"+Rn),Hn!=Rt\u0026\u0026yo(wi,\"Bad uncompressed size: \"+Rt+\" != \"+Hn);var Br=O.buf(Ji,0);En\u003e\u003e0!=Br\u003e\u003e0\u0026\u0026yo(wi,\"Bad CRC32 checksum: \"+En+\" != \"+Br),bi(Ht,gi,Ji,{unsafe:!0,mt:qn})}function uo(Et,Gt){var Rt=Gt||{},Ht=[],Qt=[],Nt=F(1),_n=Rt.compression?8:0,qn=0,En=0,Rn=0,Hn=0,Lo=0,Io=Et.FullPaths[0],gi=Io,jo=Et.FileIndex[0],oi=[],Ji=0;for(En=1;En\u003cEt.FullPaths.length;++En)if(gi=Et.FullPaths[En].slice(Io.length),jo=Et.FileIndex[En],!(!jo.size||!jo.content||gi==\"\u0001Sh33tJ5\")){var wi=Hn,Br=F(gi.length);for(Rn=0;Rn\u003cgi.length;++Rn)Br.write_shift(1,gi.charCodeAt(Rn)\u0026127);Br=Br.slice(0,Br.l),oi[Lo]=O.buf(jo.content,0);var gr=jo.content;_n==8\u0026\u0026(gr=be(gr)),Nt=F(30),Nt.write_shift(4,67324752),Nt.write_shift(2,20),Nt.write_shift(2,qn),Nt.write_shift(2,_n),jo.mt?oe(Nt,jo.mt):Nt.write_shift(4,0),Nt.write_shift(-4,oi[Lo]),Nt.write_shift(4,gr.length),Nt.write_shift(4,jo.content.length),Nt.write_shift(2,Br.length),Nt.write_shift(2,0),Hn+=Nt.length,Ht.push(Nt),Hn+=Br.length,Ht.push(Br),Hn+=gr.length,Ht.push(gr),Nt=F(46),Nt.write_shift(4,33639248),Nt.write_shift(2,0),Nt.write_shift(2,20),Nt.write_shift(2,qn),Nt.write_shift(2,_n),Nt.write_shift(4,0),Nt.write_shift(-4,oi[Lo]),Nt.write_shift(4,gr.length),Nt.write_shift(4,jo.content.length),Nt.write_shift(2,Br.length),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(4,0),Nt.write_shift(4,wi),Ji+=Nt.l,Qt.push(Nt),Ji+=Br.length,Qt.push(Br),++Lo}return Nt=F(22),Nt.write_shift(4,101010256),Nt.write_shift(2,0),Nt.write_shift(2,0),Nt.write_shift(2,Lo),Nt.write_shift(2,Lo),Nt.write_shift(4,Ji),Nt.write_shift(4,Hn),Nt.write_shift(2,0),I([I(Ht),I(Qt),Nt])}var Oo={htm:\"text/html\",xml:\"text/xml\",gif:\"image/gif\",jpg:\"image/jpeg\",png:\"image/png\",mso:\"application/x-mso\",thmx:\"application/vnd.ms-officetheme\",sh33tj5:\"application/octet-stream\"};function ko(Et,Gt){if(Et.ctype)return Et.ctype;var Rt=Et.name||\"\",Ht=Rt.match(/\\.([^\\.]+)$/);return Ht\u0026\u0026Oo[Ht[1]]||Gt\u0026\u0026(Ht=(Rt=Gt).match(/[\\.\\\\]([^\\.\\\\])+$/),Ht\u0026\u0026Oo[Ht[1]])?Oo[Ht[1]]:\"application/octet-stream\"}function Ko(Et){for(var Gt=o(Et),Rt=[],Ht=0;Ht\u003cGt.length;Ht+=76)Rt.push(Gt.slice(Ht,Ht+76));return Rt.join(`\\r\n`)+`\\r\n`}function mi(Et){var Gt=Et.replace(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7E-\\xFF=]/g,function(Rn){var Hn=Rn.charCodeAt(0).toString(16).toUpperCase();return\"=\"+(Hn.length==1?\"0\"+Hn:Hn)});Gt=Gt.replace(/ $/mg,\"=20\").replace(/\\t$/mg,\"=09\"),Gt.charAt(0)==`\n`\u0026\u0026(Gt=\"=0D\"+Gt.slice(1)),Gt=Gt.replace(/\\r(?!\\n)/mg,\"=0D\").replace(/\\n\\n/mg,`\n=0A`).replace(/([^\\r\\n])\\n/mg,\"$1=0A\");for(var Rt=[],Ht=Gt.split(`\\r\n`),Qt=0;Qt\u003cHt.length;++Qt){var Nt=Ht[Qt];if(Nt.length==0){Rt.push(\"\");continue}for(var _n=0;_n\u003cNt.length;){var qn=76,En=Nt.slice(_n,_n+qn);En.charAt(qn-1)==\"=\"?qn--:En.charAt(qn-2)==\"=\"?qn-=2:En.charAt(qn-3)==\"=\"\u0026\u0026(qn-=3),En=Nt.slice(_n,_n+qn),_n+=qn,_n\u003cNt.length\u0026\u0026(En+=\"=\"),Rt.push(En)}}return Rt.join(`\\r\n`)}function Fo(Et){for(var Gt=[],Rt=0;Rt\u003cEt.length;++Rt){for(var Ht=Et[Rt];Rt\u003c=Et.length\u0026\u0026Ht.charAt(Ht.length-1)==\"=\";)Ht=Ht.slice(0,Ht.length-1)+Et[++Rt];Gt.push(Ht)}for(var Qt=0;Qt\u003cGt.length;++Qt)Gt[Qt]=Gt[Qt].replace(/[=][0-9A-Fa-f]{2}/g,function(Nt){return String.fromCharCode(parseInt(Nt.slice(1),16))});return c(Gt.join(`\\r\n`))}function Nr(Et,Gt,Rt){for(var Ht=\"\",Qt=\"\",Nt=\"\",_n,qn=0;qn\u003c10;++qn){var En=Gt[qn];if(!En||En.match(/^\\s*$/))break;var Rn=En.match(/^(.*?):\\s*([^\\s].*)$/);if(Rn)switch(Rn[1].toLowerCase()){case\"content-location\":Ht=Rn[2].trim();break;case\"content-type\":Nt=Rn[2].trim();break;case\"content-transfer-encoding\":Qt=Rn[2].trim();break}}switch(++qn,Qt.toLowerCase()){case\"base64\":_n=c(i(Gt.slice(qn).join(\"\")));break;case\"quoted-printable\":_n=Fo(Gt.slice(qn));break;default:throw new Error(\"Unsupported Content-Transfer-Encoding \"+Qt)}var Hn=bi(Et,Ht.slice(Rt.length),_n,{unsafe:!0});Nt\u0026\u0026(Hn.ctype=Nt)}function Rs(Et,Gt){if(Dt(Et.slice(0,13)).toLowerCase()!=\"mime-version:\")throw new Error(\"Unsupported MAD header\");var Rt=Gt\u0026\u0026Gt.root||\"\",Ht=(r\u0026\u0026Buffer.isBuffer(Et)?Et.toString(\"binary\"):Dt(Et)).split(`\\r\n`),Qt=0,Nt=\"\";for(Qt=0;Qt\u003cHt.length;++Qt)if(Nt=Ht[Qt],!!/^Content-Location:/i.test(Nt)\u0026\u0026(Nt=Nt.slice(Nt.indexOf(\"file\")),Rt||(Rt=Nt.slice(0,Nt.lastIndexOf(\"/\")+1)),Nt.slice(0,Rt.length)!=Rt))for(;Rt.length\u003e0\u0026\u0026(Rt=Rt.slice(0,Rt.length-1),Rt=Rt.slice(0,Rt.lastIndexOf(\"/\")+1),Nt.slice(0,Rt.length)!=Rt););var _n=(Ht[1]||\"\").match(/boundary=\"(.*?)\"/);if(!_n)throw new Error(\"MAD cannot find boundary\");var qn=\"--\"+(_n[1]||\"\"),En=[],Rn=[],Hn={FileIndex:En,FullPaths:Rn};Ee(Hn);var Lo,Io=0;for(Qt=0;Qt\u003cHt.length;++Qt){var gi=Ht[Qt];gi!==qn\u0026\u0026gi!==qn+\"--\"||(Io++\u0026\u0026Nr(Hn,Ht.slice(Lo,Qt),Rt),Lo=Qt)}return Hn}function ur(Et,Gt){var Rt=Gt||{},Ht=Rt.boundary||\"SheetJS\";Ht=\"------=\"+Ht;for(var Qt=[\"MIME-Version: 1.0\",'Content-Type: multipart/related; boundary=\"'+Ht.slice(2)+'\"',\"\",\"\",\"\"],Nt=Et.FullPaths[0],_n=Nt,qn=Et.FileIndex[0],En=1;En\u003cEt.FullPaths.length;++En)if(_n=Et.FullPaths[En].slice(Nt.length),qn=Et.FileIndex[En],!(!qn.size||!qn.content||_n==\"\u0001Sh33tJ5\")){_n=_n.replace(/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7E-\\xFF]/g,function(Ji){return\"_x\"+Ji.charCodeAt(0).toString(16)+\"_\"}).replace(/[\\u0080-\\uFFFF]/g,function(Ji){return\"_u\"+Ji.charCodeAt(0).toString(16)+\"_\"});for(var Rn=qn.content,Hn=r\u0026\u0026Buffer.isBuffer(Rn)?Rn.toString(\"binary\"):Dt(Rn),Lo=0,Io=Math.min(1024,Hn.length),gi=0,jo=0;jo\u003c=Io;++jo)(gi=Hn.charCodeAt(jo))\u003e=32\u0026\u0026gi\u003c128\u0026\u0026++Lo;var oi=Lo\u003e=Io*4/5;Qt.push(Ht),Qt.push(\"Content-Location: \"+(Rt.root||\"file:///C:/SheetJS/\")+_n),Qt.push(\"Content-Transfer-Encoding: \"+(oi?\"quoted-printable\":\"base64\")),Qt.push(\"Content-Type: \"+ko(qn,_n)),Qt.push(\"\"),Qt.push(oi?mi(Hn):Ko(Hn))}return Qt.push(Ht+`--\\r\n`),Qt.join(`\\r\n`)}function zi(Et){var Gt={};return Ee(Gt,Et),Gt}function bi(Et,Gt,Rt,Ht){var Qt=Ht\u0026\u0026Ht.unsafe;Qt||Ee(Et);var Nt=!Qt\u0026\u0026U.find(Et,Gt);if(!Nt){var _n=Et.FullPaths[0];Gt.slice(0,_n.length)==_n?_n=Gt:(_n.slice(-1)!=\"/\"\u0026\u0026(_n+=\"/\"),_n=(_n+Gt).replace(\"//\",\"/\")),Nt={name:J(Gt),type:2},Et.FileIndex.push(Nt),Et.FullPaths.push(_n),Qt||U.utils.cfb_gc(Et)}return Nt.content=Rt,Nt.size=Rt?Rt.length:0,Ht\u0026\u0026(Ht.CLSID\u0026\u0026(Nt.clsid=Ht.CLSID),Ht.mt\u0026\u0026(Nt.mt=Ht.mt),Ht.ct\u0026\u0026(Nt.ct=Ht.ct)),Nt}function Ar(Et,Gt){Ee(Et);var Rt=U.find(Et,Gt);if(Rt){for(var Ht=0;Ht\u003cEt.FileIndex.length;++Ht)if(Et.FileIndex[Ht]==Rt)return Et.FileIndex.splice(Ht,1),Et.FullPaths.splice(Ht,1),!0}return!1}function ws(Et,Gt,Rt){Ee(Et);var Ht=U.find(Et,Gt);if(Ht){for(var Qt=0;Qt\u003cEt.FileIndex.length;++Qt)if(Et.FileIndex[Qt]==Ht)return Et.FileIndex[Qt].name=J(Rt),Et.FullPaths[Qt]=Rt,!0}return!1}function ds(Et){Ce(Et,!0)}return W.find=Ye,W.read=Re,W.parse=_e,W.write=kt,W.writeFile=Ct,W.utils={cfb_new:zi,cfb_add:bi,cfb_del:Ar,cfb_mov:ws,cfb_gc:ds,ReadShift:S,CheckField:k,prep_blob:R,bconcat:I,use_zlib:Yt,_deflateRaw:qt,_inflateRaw:To,consts:bt},W})();typeof U8\u003c\"u\"\u0026\u0026typeof DO_NOT_EXPORT_CFB\u003e\"u\"\u0026\u0026(t.exports=U)})($Xe)),$Xe.exports}var ZXi=XXi();const A9=_y(ZXi);function j1n(t){return[...t].map(e=\u003ee===\"|\"||new RegExp(\"\\\\p{Cc}\",\"u\").test(e)?\" \":e).join(\"\")}function $1n(){return A9.utils.cfb_new({root:\"Root Entry\"})}function rk({compoundFile:t,content:e,path:n}){A9.utils.cfb_add(t,n,e)}function aK(t){const e=new Uint8Array(t.reduce((o,i)=\u003eo+i.byteLength,0));let n=0;for(const o of t)e.set(o,n),n+=o.byteLength;return e}function B1e(t){return new LE(4,4).uint32(t).toUint8Array()}function o3({compoundFile:t,content:e,name:n,recordCount:o}){rk({compoundFile:t,content:B1e(o),path:`/${n}/Header`}),rk({compoundFile:t,content:e,path:`/${n}/Data`})}function q1n(t){const e=A9.write(t,{type:\"buffer\",fileType:\"cfb\"});return new Uint8Array(e)}var X1n=65535,eZi=1e4;function Z1n(t){if(typeof t==\"string\")return t;if(\"sourceFormat\"in t\u0026\u0026t.sourceFormat!==\"ascii\")throw new Yg(\"Binary Altium input is already a compound document\");return t.getString()}function c9(t){return new Map(qXe(t).map(({fieldName:e,fieldText:n})=\u003e[e,n]))}function tZi(t){return qXe(t).map(({fieldName:e})=\u003ee)}function nZi(t){return c9(t).get(\"RECORD\")??\"\"}function rM(t){const e=[];for(const{fieldName:n,fieldText:o}of qXe(t))/[^\\x20-\\x7e]/u.test(o)\u0026\u0026e.push(...new TextEncoder().encode(`|%UTF8%${n}=${o}||`)),e.push(...tIn(`|${n}=${o.replace(/[^\\x20-\\x7e]/gu,\"?\")}`));return e.push(0),Uint8Array.from(e)}function b1e(t){const e=new LE;for(const n of t)e.uint32LengthPrefixedBytes(rM(n));return e.toUint8Array()}function oZi(t){const e=new LE;for(const n of t){const o=c9(n),i=iZi(o.get(\"BINARYRECORDTYPE\")),r=n.split(\"|\").filter(a=\u003ea\u0026\u0026!/^BINARYRECORDTYPE=/iu.test(a)).map(a=\u003e`|${a}`).join(\"\"),s=rM(r);e.uint16(i).uint32(s.byteLength).writeBytes(s)}return e.toUint8Array()}function _c(t){if(t===void 0)return 0;const e=Gee(t);if(e===void 0||!Number.isFinite(e))throw new Yg(`Invalid Altium measurement: ${JSON.stringify(t)}`);return Math.round(e*eZi)}function S1e(t){if(t===void 0)return X1n;const e=Number(t);if(!Number.isInteger(e)||e\u003c0||e\u003eX1n)throw new Yg(`Invalid Altium record index: ${JSON.stringify(t)}`);return e}function iZi(t){if(t===void 0)return 0;const e=Number(t);if(!Number.isInteger(e)||e\u003c0||e\u003e65535)throw new Yg(`Invalid Altium binary record type: ${JSON.stringify(t)}`);return e}function E4(t){if(t===void 0)return 0;const e=Number(t);if(!Number.isFinite(e))throw new Yg(`Invalid finite Altium number: ${JSON.stringify(t)}`);return e}function i3(t){if(t===void 0||t.toUpperCase()===\"FALSE\")return!1;if(t.toUpperCase()===\"TRUE\")return!0;throw new Yg(`Invalid Altium boolean: ${JSON.stringify(t)}`)}function AK(t){const e=tIn(t.slice(0,255));return aK([Uint8Array.of(e.byteLength),e])}function eIn(t,e){const n=new Uint8Array(e??(t.length+1)*2),o=new DataView(n.buffer),i=Math.min(t.length,n.byteLength/2);for(let r=0;r\u003ci;r++)o.setUint16(r*2,t.charCodeAt(r),!0);return n}function rZi(t){return t.replace(/[^\\x20-\\x7e]/gu,\"?\")}function qXe(t){return t.split(\"|\").filter(Boolean).map(e=\u003e{const n=e.indexOf(\"=\");if(n\u003c1)throw new Yg(`Invalid Altium record field: ${JSON.stringify(e)}`);return{fieldName:e.slice(0,n).toUpperCase(),fieldText:e.slice(n+1)}})}function tIn(t){return Uint8Array.from(t,e=\u003ee.charCodeAt(0)\u0026127)}var sZi={BACKGROUND:76,BOTTOM:32,BOTTOMOVERLAY:34,BOTTOMPASTE:36,BOTTOMSOLDER:38,CONNECTIONS:75,DRCERROR:77,DRILLDRAWING:73,DRILLGUIDE:55,KEEPOUT:56,MULTILAYER:74,PADHOLES:81,SELECTIONS:78,TOP:1,TOPOVERLAY:33,TOPPASTE:35,TOPSOLDER:37,VIAHOLES:82,VISIBLEGRID1:79,VISIBLEGRID2:80};function B4(t,e=1){if(t===void 0)return e;const n=t.toUpperCase(),o=sZi[n];if(o!==void 0)return o;const i=aZi(n);if(i!==void 0)return i;throw new Yg(`Unsupported Altium PCB layer: ${JSON.stringify(t)}`)}function aZi(t){const e=/^(MID-LAYER|INTERNALPLANE|MECHANICAL)(\\d{1,2})$/u.exec(t),n=Number.parseInt(e?.[2]??\"\",10);if(!(!e||!Number.isInteger(n)||n\u003c1)){if(e[1]===\"MID-LAYER\"\u0026\u0026n\u003c=30)return n+1;if(e[1]===\"INTERNALPLANE\"\u0026\u0026n\u003c=16)return n+38;if(e[1]===\"MECHANICAL\"\u0026\u0026n\u003c=16)return n+56;if(e[1]===\"MECHANICAL\"\u0026\u0026n\u003c=32)return n+66}}var sk=[\"COMPONENT\",\"LAYER\",\"LOCKED\",\"NET\",\"POLYGON\",\"RECORD\"],AZi={ComponentBody:new Set([...sk,\"ARCRESOLUTION\",\"BODYCOLOR3D\",\"BODYOPACITY3D\",\"BODYPROJECTION\",\"CAVITYHEIGHT\",\"HOLECOUNT\",\"IDENTIFIER\",\"ISSHAPEBASED\",\"KEEPOUT\",\"KIND\",\"NAME\",\"OVERALLHEIGHT\",\"STANDOFFHEIGHT\",\"SUBPOLYINDEX\",\"TEARDROP\",\"TEXTURE\",\"TEXTURECENTERX\",\"TEXTURECENTERY\",\"TEXTUREROTATION\",\"TEXTURESIZEX\",\"TEXTURESIZEY\",\"UNIONINDEX\",\"V7_LAYER\"]),Fill:new Set([...sk,\"KEEPOUT\",\"ROTATION\",\"X1\",\"X2\",\"Y1\",\"Y2\"]),Pad:new Set([...sk,\"HOLESHAPE\",\"HOLESIZE\",\"HOLEROTATION\",\"HOLEWIDTH\",\"NAME\",\"PLATED\",\"ROTATION\",\"SHAPE\",\"TENTEDBOTTOM\",\"TENTEDTOP\",\"X\",\"XSIZE\",\"Y\",\"YSIZE\"]),Region:new Set([...sk,\"HOLECOUNT\",\"KEEPOUT\",\"REGIONKIND\",\"TEARDROP\"]),Text:new Set([...sk,\"BOLD\",\"COMMENT\",\"DESIGNATOR\",\"FONTNAME\",\"HEIGHT\",\"INVERTED\",\"INVERTEDRECT\",\"ITALIC\",\"ISSHAPEBASED\",\"JUSTIFICATION\",\"MARGINBORDERWIDTH\",\"MIRROR\",\"ROTATION\",\"STROKEFONT\",\"TEXT\",\"TEXTBOXHEIGHT\",\"TEXTBOXWIDTH\",\"TEXTOFFSET\",\"USETTFONTS\",\"WIDESTRING\",\"WIDTH\",\"X\",\"Y\"]),Track:new Set([...sk,\"KEEPOUT\",\"WIDTH\",\"X1\",\"X2\",\"Y1\",\"Y2\"]),Via:new Set([...sk,\"DIAMETER\",\"ENDLAYER\",\"HOLESIZE\",\"STARTLAYER\",\"STOPLAYER\",\"TENTEDBOTTOM\",\"TENTEDTOP\",\"X\",\"Y\"])};function cZi(t,e){const n=tZi(t),o=n.filter((r,s)=\u003en.indexOf(r)!==s);if(o.length\u003e0)throw new Yg(`${e} binary serialization does not support duplicate fields: ${[...new Set(o)].join(\", \")}`);const i=n.filter(r=\u003e!uZi(r,e));if(i.length\u003e0)throw new Yg(`${e} binary serialization does not support fields: ${i.join(\", \")}`);lZi(c9(t),e)}function nIn(t){if(t===void 0||t.toUpperCase()===\"RECTANGLE\")return 2;if(t.toUpperCase()===\"ROUND\")return 1;throw new Yg(`Unsupported Altium pad shape: ${JSON.stringify(t)}`)}function lZi(t,e){B4(t.get(\"LAYER\"),e===\"Via\"?74:1);for(const n of[\"BOLD\",\"COMMENT\",\"DESIGNATOR\",\"INVERTED\",\"INVERTEDRECT\",\"ITALIC\",\"KEEPOUT\",\"LOCKED\",\"MIRROR\",\"PLATED\",\"TENTEDBOTTOM\",\"TENTEDTOP\",\"TEARDROP\",\"USETTFONTS\"])t.has(n)\u0026\u0026i3(t.get(n));if(e===\"Pad\"){nIn(t.get(\"SHAPE\"));const n=t.get(\"HOLESHAPE\")?.toUpperCase();if(n!==void 0\u0026\u0026n!==\"ROUND\"\u0026\u0026n!==\"SLOT\"\u0026\u0026n!==\"SQUARE\")throw new Yg(`Unsupported Altium pad hole shape: ${JSON.stringify(n)}`)}if(e===\"Via\"){const n=t.get(\"LAYER\")?.toUpperCase();if(n!==void 0\u0026\u0026n!==\"MULTILAYER\")throw new Yg(`Via binary serialization requires MULTILAYER, got ${JSON.stringify(n)}`);B4(t.get(\"STARTLAYER\"),1),B4(t.get(\"ENDLAYER\")??t.get(\"STOPLAYER\"),32)}if(e===\"Region\"){const n=t.get(\"REGIONKIND\")?.toUpperCase()??\"COPPER\";if(n!==\"COPPER\"\u0026\u0026n!==\"POLYGON_CUTOUT\")throw new Yg(`Unsupported Altium region kind: ${JSON.stringify(n)}`)}}function uZi(t,e){return AZi[e].has(t)?!0:e!==\"Region\"\u0026\u0026e!==\"ComponentBody\"?!1:/^(?:KIND|VX|VY|CX|CY|R|SA|EA)\\d+$/u.test(t)||/^HOLE\\d+(?:COUNT|V[XY]\\d+)$/u.test(t)}var oIn=65535,gZi=4,dZi=8,hZi=32,pZi=64,mZi=512,_Zi=209,ak={componentBody:12,fill:6,pad:2,region:11,text:5,track:4,via:3};function fZi(t){const e=c9(t),n=B4(e.get(\"LAYER\")),o=nIn(e.get(\"SHAPE\")),i=_c(e.get(\"XSIZE\")),r=_c(e.get(\"YSIZE\")),s=new LE;cK({defaultLayerId:n,fields:e,writer:s}),s.int32(_c(e.get(\"X\"))).int32(_c(e.get(\"Y\")));for(let a=0;a\u003c3;a++)s.int32(i).int32(r);return s.int32(_c(e.get(\"HOLESIZE\"))).uint8(o).uint8(o).uint8(o).float64(E4(e.get(\"ROTATION\"))).uint8(i3(e.get(\"PLATED\"))?1:0).uint8(0).uint8(0).int32(0).writeBytes(new Uint8Array(38)).uint8(0).float64(E4(e.get(\"HOLEROTATION\"))),[AK(e.get(\"NAME\")??\"\"),AK(\"\"),AK(\"\"),AK(\"\"),s.toUint8Array(),bZi(e)]}function IZi(t){const e=c9(t),n=new LE;return cK({defaultLayerId:B4(e.get(\"LAYER\")),fields:e,writer:n}),n.int32(_c(e.get(\"X1\"))).int32(_c(e.get(\"Y1\"))).int32(_c(e.get(\"X2\"))).int32(_c(e.get(\"Y2\"))).int32(_c(e.get(\"WIDTH\"))).uint16(0),[n.toUint8Array()]}function CZi(t){const e=c9(t),n=new LE;return cK({defaultLayerId:B4(e.get(\"LAYER\")),fields:e,writer:n}),n.int32(_c(e.get(\"X1\"))).int32(_c(e.get(\"Y1\"))).int32(_c(e.get(\"X2\"))).int32(_c(e.get(\"Y2\"))).float64(E4(e.get(\"ROTATION\"))),[n.toUint8Array()]}function yZi(t){const e=c9(t),n=new LE;return cK({defaultLayerId:B4(\"MULTILAYER\"),fields:e,writer:n}),n.int32(_c(e.get(\"X\"))).int32(_c(e.get(\"Y\"))).int32(_c(e.get(\"DIAMETER\"))).int32(_c(e.get(\"HOLESIZE\"))).uint8(B4(e.get(\"STARTLAYER\"),1)).uint8(B4(e.get(\"ENDLAYER\")??e.get(\"STOPLAYER\"),32)).writeBytes(new Uint8Array(_Zi-n.length)),[n.toUint8Array()]}function xZi(t,e){const n=c9(t),o=iIn(n),i=new LE(137,137);return cK({defaultLayerId:B4(n.get(\"LAYER\")),fields:n,writer:i}),i.int32(_c(n.get(\"X\"))).int32(_c(n.get(\"Y\"))).int32(_c(n.get(\"HEIGHT\"))).uint16(E4(n.get(\"STROKEFONT\"))).float64(E4(n.get(\"ROTATION\"))).uint8(i3(n.get(\"MIRROR\"))?1:0).int32(_c(n.get(\"WIDTH\"))).uint8(i3(n.get(\"COMMENT\"))?1:0).uint8(i3(n.get(\"DESIGNATOR\"))?1:0).uint8(0).uint8(i3(n.get(\"USETTFONTS\"))?1:0).uint8(i3(n.get(\"BOLD\"))?1:0).uint8(i3(n.get(\"ITALIC\"))?1:0).writeBytes(eIn(n.get(\"FONTNAME\")??\"\",64)).uint8(i3(n.get(\"INVERTED\"))?1:0).int32(_c(n.get(\"MARGINBORDERWIDTH\"))).uint32(e).writeBytes(new Uint8Array(4)).uint8(i3(n.get(\"INVERTEDRECT\"))?1:0).int32(_c(n.get(\"TEXTBOXWIDTH\"))).int32(_c(n.get(\"TEXTBOXHEIGHT\"))).uint8(E4(n.get(\"JUSTIFICATION\"))).int32(_c(n.get(\"TEXTOFFSET\"))),[i.toUint8Array(),AK(rZi(o))]}function EZi(t){const e=new LE;for(const[n,o]of t.entries()){const i=eIn(iIn(c9(o)));e.uint32(n).uint32(i.byteLength),i.byteLength\u003e2\u0026\u0026e.writeBytes(i)}return e.toUint8Array()}function iIn(t){const e=t.get(\"WIDESTRING\");return e===void 0?t.get(\"TEXT\")??\"\":N1n(e)}function Ak(t,e){const n=new LE;for(const o of e){n.uint8(t);for(const i of o)n.uint32LengthPrefixedBytes(i)}return n.toUint8Array()}function cK({defaultLayerId:t,fields:e,writer:n}){n.uint8(B4(e.get(\"LAYER\"),t)).uint16(BZi(e)).uint16(S1e(e.get(\"NET\"))).uint16(S1e(e.get(\"POLYGON\"))).uint16(S1e(e.get(\"COMPONENT\"))).uint16(oIn).uint16(oIn)}function BZi(t){let e=dZi;return i3(t.get(\"LOCKED\"))||(e|=gZi),i3(t.get(\"TENTEDTOP\"))\u0026\u0026(e|=hZi),i3(t.get(\"TENTEDBOTTOM\"))\u0026\u0026(e|=pZi),i3(t.get(\"KEEPOUT\"))\u0026\u0026(e|=mZi),e}function bZi(t){const e=t.get(\"HOLESHAPE\")?.toUpperCase();if(e!==\"SLOT\"\u0026\u0026e!==\"SQUARE\")return new Uint8Array;const n=new Uint8Array(596),o=new DataView(n.buffer);return o.setUint8(262,e===\"SLOT\"?2:1),o.setInt32(263,_c(t.get(\"HOLEWIDTH\")),!0),o.setFloat64(267,E4(t.get(\"HOLEROTATION\")),!0),n}function rIn({fields:t,propertyBytes:e}){const n=SZi(t),o=QZi(t),i=new LE;cK({defaultLayerId:B4(t.get(\"LAYER\")),fields:t,writer:i}),i.uint8(0).uint16(o).uint16(0).uint32(e.byteLength).writeBytes(e).uint32(n-1);for(let r=0;r\u003cn;r++)vZi({fields:t,vertexIndex:r,writer:i});for(let r=0;r\u003co;r++)wZi({fields:t,holeIndex:r,writer:i});return[i.toUint8Array()]}function SZi(t){const e=[...t.keys()].flatMap(o=\u003e{const i=/^VX(\\d+)$/u.exec(o);return i?.[1]===void 0?[]:[Number(i[1])]}),n=Math.max(...e,-1)+1;if(n\u003c4)throw new Yg(\"Altium contours require an explicitly closed outline\");for(let o=0;o\u003cn;o++)if(!t.has(`VX${o}`)||!t.has(`VY${o}`))throw new Yg(`Altium contour outline is missing vertex ${o}`);if(_c(t.get(\"VX0\"))!==_c(t.get(`VX${n-1}`))||_c(t.get(\"VY0\"))!==_c(t.get(`VY${n-1}`)))throw new Yg(\"Altium contour outline must repeat its first vertex\");return n}function QZi(t){const e=E4(t.get(\"HOLECOUNT\"));if(!Number.isInteger(e)||e\u003c0||e\u003e65535)throw new Yg(`Invalid Altium contour hole count: ${e}`);return e}function vZi({fields:t,vertexIndex:e,writer:n}){const o=E4(t.get(`KIND${e}`));if(o!==0\u0026\u0026o!==1)throw new Yg(`Unsupported Altium contour vertex kind at index ${e}: ${o}`);n.uint8(o).int32(_c(t.get(`VX${e}`))).int32(_c(t.get(`VY${e}`))).int32(_c(t.get(`CX${e}`))).int32(_c(t.get(`CY${e}`))).int32(_c(t.get(`R${e}`))).float64(E4(t.get(`SA${e}`))).float64(E4(t.get(`EA${e}`)))}function wZi({fields:t,holeIndex:e,writer:n}){const o=E4(t.get(`HOLE${e}COUNT`));if(!Number.isInteger(o)||o\u003c3||o\u003e4294967295)throw new Yg(`Invalid Altium contour hole ${e} vertex count: ${o}`);n.uint32(o);for(let i=0;i\u003co;i++){const r=t.get(`HOLE${e}VX${i}`),s=t.get(`HOLE${e}VY${i}`);if(r===void 0||s===void 0)throw new Yg(`Altium contour hole ${e} is missing vertex ${i}`);n.float64(_c(r)).float64(_c(s))}}var PZi=/^(?:KIND|VX|VY|CX|CY|R|SA|EA)\\d+$|^HOLE\\d+(?:COUNT|V[XY]\\d+)$/u,MZi=new Set([\"COMPONENT\",\"HOLECOUNT\",\"KEEPOUT\",\"LAYER\",\"LOCKED\",\"NET\",\"POLYGON\",\"RECORD\",\"SOURCESTREAM\",\"TEARDROP\"]);function DZi(t){const e=c9(t),n=[...e.entries()].filter(([o])=\u003e!MZi.has(o)\u0026\u0026!PZi.test(o)).map(([o,i])=\u003e`|${o}=${i}`).join(\"\");return rIn({fields:e,propertyBytes:rM(n).subarray(1)})}var NZi=65535;function RZi(t){const e=c9(t);return rIn({fields:e,propertyBytes:TZi(e)})}function TZi(t){const e=t.get(\"LAYER\")??\"TOP\",n=S1e(t.get(\"POLYGON\")),o=kZi(t.get(\"REGIONKIND\")),i=[`V7_LAYER=${e}`,\"NAME= \",`KIND=${o}`,`SUBPOLYINDEX=${n===NZi?-1:n}`,\"UNIONINDEX=0\",\"ARCRESOLUTION=0.5mil\",\"ISSHAPEBASED=FALSE\",\"CAVITYHEIGHT=0mil\"].join(\"|\");return rM(`|${i}`).subarray(1)}function kZi(t){return t?.toUpperCase()===\"POLYGON_CUTOUT\"?1:0}var FZi=[\"Arcs6\",\"Regions6\",\"ComponentBodies6\",\"Classes6\",\"DifferentialPairs6\",\"Connections6\"];function LZi(t){const e=Z1n(t);if(E1e(e).boardGeometry.outline.vertices.length\u003c3)throw new Yg(\"Cannot create a binary PcbDoc without a board outline\");const o=HZi(e),i=$1n();YZi(i),o3({compoundFile:i,content:b1e(o.Board),name:\"Board6\",recordCount:o.Board.length}),o3({compoundFile:i,content:b1e(o.Net),name:\"Nets6\",recordCount:o.Net.length}),o3({compoundFile:i,content:b1e(o.Component),name:\"Components6\",recordCount:o.Component.length}),o3({compoundFile:i,content:b1e(o.Polygon),name:\"Polygons6\",recordCount:o.Polygon.length}),o3({compoundFile:i,content:oZi(o.Dimension),name:\"Dimensions6\",recordCount:o.Dimension.length}),o3({compoundFile:i,content:Ak(ak.pad,o.Pad.map(fZi)),name:\"Pads6\",recordCount:o.Pad.length}),o3({compoundFile:i,content:Ak(ak.via,o.Via.map(yZi)),name:\"Vias6\",recordCount:o.Via.length}),o3({compoundFile:i,content:Ak(ak.track,o.Track.map(IZi)),name:\"Tracks6\",recordCount:o.Track.length}),o3({compoundFile:i,content:Ak(ak.fill,o.Fill.map(CZi)),name:\"Fills6\",recordCount:o.Fill.length}),o3({compoundFile:i,content:Ak(ak.region,o.Region.map(RZi)),name:\"ShapeBasedRegions6\",recordCount:o.Region.length}),o3({compoundFile:i,content:Ak(ak.componentBody,o.ComponentBody.map(DZi)),name:\"ShapeBasedComponentBodies6\",recordCount:o.ComponentBody.length}),o3({compoundFile:i,content:Ak(ak.text,o.Text.map(xZi)),name:\"Texts6\",recordCount:o.Text.length}),o3({compoundFile:i,content:EZi(o.Text),name:\"WideStrings6\",recordCount:o.Text.length});for(const r of FZi)o3({compoundFile:i,content:new Uint8Array,name:r,recordCount:0});return q1n(i)}function HZi(t){const e={Board:[],Component:[],ComponentBody:[],Dimension:[],Fill:[],Net:[],Pad:[],Polygon:[],Region:[],Text:[],Track:[],Via:[]};for(const n of t.split(/\\r?\\n|\\r/u).filter(Boolean)){const o=nZi(n);if(!OZi(o))throw new Yg(`Unsupported PCB record kind for binary serialization: ${JSON.stringify(o||\"missing RECORD\")}`);GZi(o)\u0026\u0026cZi(n,o),e[o].push(n)}return e}function OZi(t){return[\"Board\",\"Component\",\"ComponentBody\",\"Dimension\",\"Fill\",\"Net\",\"Pad\",\"Polygon\",\"Region\",\"Text\",\"Track\",\"Via\"].includes(t)}function GZi(t){return[\"ComponentBody\",\"Fill\",\"Pad\",\"Region\",\"Text\",\"Track\",\"Via\"].includes(t)}function YZi(t){const e=new LE().uint32(19);for(const i of\"PCB 5.0 Bi\")e.uint16(i.charCodeAt(0));rk({compoundFile:t,content:e.toUint8Array(),path:\"/FileHeader\"});const n=\"PCB 6.0 Binary File\",o=new LE().uint32(n.length).writeBytes(AK(n)).float64(5.01);rk({compoundFile:t,content:o.toUint8Array(),path:\"/FileHeaderSix\"})}function UZi(t,e={}){const o=Z1n(t).split(/\\r?\\n|\\r/u).filter(Boolean).filter(a=\u003e!a.startsWith(\"|HEADER=\")),i=\"Protel for Windows - Schematic Capture Binary File Version 5.0\",r=[Q1e(rM(`|HEADER=${i}|WEIGHT=${o.length}|MINORVERSION=0|UNIQUEID=ALTIUMTS`)),...o.map(a=\u003eQ1e(rM(a)))],s=$1n();return rk({compoundFile:s,content:aK(r),path:\"/FileHeader\"}),rk({compoundFile:s,content:KZi(e.embeddedImages??[]),path:\"/Storage\"}),rk({compoundFile:s,content:Q1e(rM(`|HEADER=${i}`)),path:\"/Additional\"}),q1n(s)}function KZi(t){const e=Q1e(rM(\"|HEADER=Icon storage\")),n=t.map(({compressedBytes:o,name:i})=\u003e{const r=c1e(i,\"windows-1252\");if(r.byteLength===0||r.byteLength\u003e255)throw new RangeError(\"Embedded schematic image names must be 1 to 255 Windows-1252 bytes\");if(o.byteLength===0)throw new RangeError(\"Embedded schematic image compressed bytes must not be empty\");const s=aK([Uint8Array.of(208,r.byteLength),r,B1e(o.byteLength),o]);if(s.byteLength\u003e16777215)throw new RangeError(\"Embedded schematic image storage entries must fit in 24 bits\");return aK([B1e(s.byteLength),s])});return aK([e,...n])}function Q1e(t){return aK([B1e(t.byteLength),t])}[...Array.from({length:30},(t,e)=\u003e`MID${e+1}`),...Array.from({length:30},(t,e)=\u003e`MIDLAYER${e+1}`)],[...Array.from({length:16},(t,e)=\u003e`PLANE${e+1}`),...Array.from({length:16},(t,e)=\u003e`INTERNALPLANE${e+1}`)],[...Array.from({length:32},(t,e)=\u003e`MECHANICAL${e+1}`)];const sg=39.3700787402,VZi=100,zZi=80,fr=(t,e=0)=\u003etypeof t==\"number\"\u0026\u0026Number.isFinite(t)?t:e,Tu=(t,e)=\u003e{const n=fr(t,e);return n\u003e0?n:e},ti=(t,e=\"\")=\u003etypeof t==\"string\"?t:e,HE=t=\u003et!==null\u0026\u0026typeof t==\"object\"\u0026\u0026!Array.isArray(t),AA=t=\u003e{if(HE(t)\u0026\u0026!(typeof t.x!=\"number\"||!Number.isFinite(t.x)||typeof t.y!=\"number\"||!Number.isFinite(t.y)))return{x:t.x,y:t.y}},uu=t=\u003e{const e=typeof t==\"number\"\u0026\u0026Number.isFinite(t)?String(t):ti(t);return j1n(e).trim()},JZi=t=\u003e{const e=t.replace(/[^a-z0-9._-]+/giu,\"-\").replace(/^[.-]+|[.-]+$/gu,\"\").slice(0,80);return e?/^(?:aux|con|nul|prn|com[1-9]|lpt[1-9])$/iu.test(e)?`board-${e}`:e:\"board\"},Sp=t=\u003e{const e=Math.round(t*1e4)/1e4;return Number.isInteger(e)?String(e):e.toFixed(4)},Xi=t=\u003e`${Sp(t)}mil`,Dd=(t,e)=\u003et.filter(n=\u003en.type===e),r3=(t,e)=\u003eMath.abs(t.x-e.x)\u003c1e-9\u0026\u0026Math.abs(t.y-e.y)\u003c1e-9,v1e=t=\u003e{let e=0;for(const[n,o]of t.entries()){const i=t[(n+1)%t.length];i\u0026\u0026(e+=o.x*i.y-i.x*o.y)}return Math.abs(e/2)};class w1e{constructor(e,n){this.maxIterations=1e3,this.iteration=0,this.finished=!1,this.input=e,this.context=n}step(){if(this.iteration++,this.iteration\u003ethis.maxIterations)throw new Error(`${this.constructor.name} exceeded ${this.maxIterations} iterations`);this._step()}runUntilFinished(){for(;!this.finished;)this.step()}}function sM(t){const e=(t%360+360)%360;return e===0?0:e}function WZi(t){const e=Math.min(...t.map(i=\u003ei.x)),n=Math.min(...t.map(i=\u003ei.y)),o=Ad(pA(1e3,1e3),dC(sg,sg),pA(-e,-n));return i=\u003eBn(o,i)}function jZi({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=XZi(t),i=[];for(const r of Dd(t,\"cad_component\")){const s=n.get(ti(r.pcb_component_id));if(s===void 0)continue;const a=sIn(r.position),A=sIn(r.size);if(!a||!A)continue;$Zi(A,ti(r.cad_component_id));const c=ZZi(r),l=qZi({position:a,rotationDegrees:eer(r),size:A}).map(e),u=ter({boardThicknessMm:o,layer:c,positionZMm:a.z,sizeZMm:A.z});i.push([\"|RECORD=ComponentBody\",`LAYER=${c===\"bottom\"?\"MECHANICAL14\":\"MECHANICAL13\"}`,\"LOCKED=FALSE\",\"KEEPOUT=FALSE\",\"NET=65535\",\"POLYGON=65535\",`COMPONENT=${s}`,\"TEARDROP=FALSE\",\"HOLECOUNT=0\",\"ISSHAPEBASED=TRUE\",\"KIND=0\",`STANDOFFHEIGHT=${Xi(u*sg)}`,`OVERALLHEIGHT=${Xi(A.z*sg)}`,`BODYOPACITY3D=${r.show_as_translucent_model===!0?\"0.5\":\"1\"}`,`V7_LAYER=${c===\"bottom\"?\"14\":\"13\"}`,...l.flatMap((g,h)=\u003e[`KIND${h}=0`,`VX${h}=${Xi(g.x)}`,`VY${h}=${Xi(g.y)}`])].join(\"|\"))}return i}function sIn(t){if(!HE(t))return;const e=AA(t);if(!(!e||typeof t.z!=\"number\"||!Number.isFinite(t.z)))return{...e,z:t.z}}function $Zi(t,e){if(!(t.x\u003e0\u0026\u0026t.y\u003e0\u0026\u0026t.z\u003e=0))throw new Error(`CAD component ${JSON.stringify(e)} has an invalid body size`)}function qZi({position:t,rotationDegrees:e,size:n}){const o=Ad(pA(t.x,t.y),vQ(e*Math.PI/180)),i=n.x/2,r=n.y/2;return[{x:-i,y:-r},{x:i,y:-r},{x:i,y:r},{x:-i,y:r},{x:-i,y:-r}].map(a=\u003eBn(o,a))}function XZi(t){const e=Dd(t,\"pcb_board\")[0];return Math.max(fr(e?.thickness),0)}function ZZi(t){return ti(t.layer).toLowerCase()===\"bottom\"?\"bottom\":\"top\"}function eer(t){return HE(t.rotation)?fr(t.rotation.z):0}function ter({boardThicknessMm:t,layer:e,positionZMm:n,sizeZMm:o}){const i=e===\"bottom\"?-t/2:t/2;return(e===\"bottom\"?i-n:n-i)-o/2}const ner=Math.PI/24;function oer({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n,netEntries:o}){const i=new Map(o.flatMap(l=\u003el.sourceNetIds.map(u=\u003e[u,l]))),r=t.flatMap(l=\u003el.type!==\"pcb_copper_pour\"?[]:[{copperPour:ixe.parse(l),polygonId:ier(l.altium_polygon_id),polygonRole:rer(l.altium_polygon_role),polygonCutoutCount:Math.max(0,Math.trunc(fr(l.altium_polygon_cutout_count))),pcbComponentId:ti(l.pcb_component_id)}]),s=[],a=new Set(r.flatMap(({polygonId:l})=\u003el===void 0?[]:[l]));let A=0;const c=()=\u003e{for(;a.has(A);)A++;const l=A;return a.add(l),A++,l};for(const l of r){const{copperPour:u,pcbComponentId:g,polygonCutoutCount:h,polygonRole:d}=l,p=l.polygonId??c(),m=ser(u),_={outerRing:m.outerRing.map(e),innerRings:m.innerRings.map(S=\u003eS.map(e))},f=cer(u.layer),I=Math.min(h,_.innerRings.length),C=_.innerRings.length-I,y=_.innerRings.slice(0,C),x=_.innerRings.slice(C),E=u.source_net_id?i.get(u.source_net_id):void 0,B=n.get(g);if(B!==void 0){s.push(Wee({altiumComponentIndex:B,innerRings:_.innerRings,layer:f,outerRing:_.outerRing})),!u.covered_with_solder_mask\u0026\u0026cIn(f)\u0026\u0026s.push(Wee({altiumComponentIndex:B,innerRings:_.innerRings,layer:f===\"TOP\"?\"TOPSOLDER\":\"BOTTOMSOLDER\",outerRing:_.outerRing}));continue}d!==\"region\"\u0026\u0026s.push(ler({layer:f,net:E,outerRing:_.outerRing,polygonIndex:p})),d!==\"outline\"\u0026\u0026s.push(Wee({innerRings:y,layer:f,net:E,outerRing:_.outerRing,polygonIndex:p})),s.push(...x.map(S=\u003eWee({innerRings:[],layer:f,net:E,outerRing:Jee(S),polygonIndex:p,regionKind:\"POLYGON_CUTOUT\"}))),d!==\"outline\"\u0026\u0026!u.covered_with_solder_mask\u0026\u0026cIn(f)\u0026\u0026s.push(Wee({innerRings:_.innerRings,layer:f===\"TOP\"?\"TOPSOLDER\":\"BOTTOMSOLDER\",outerRing:_.outerRing}))}return s}function ier(t){return typeof t==\"number\"\u0026\u0026Number.isInteger(t)\u0026\u0026t\u003e=0\u0026\u0026t\u003c65535?t:void 0}function rer(t){return t===\"outline\"||t===\"region\"?t:void 0}function ser(t){return t.shape===\"rect\"?{innerRings:[],outerRing:Jee(aer(t))}:t.shape===\"polygon\"?{innerRings:[],outerRing:Jee(t.points)}:{innerRings:t.brep_shape.inner_rings.map(e=\u003eAIn(aIn(e.vertices))),outerRing:Jee(aIn(t.brep_shape.outer_ring.vertices))}}function aer(t){const e=Ad(pA(t.center.x,t.center.y),vQ((t.rotation??0)*Math.PI/180)),n=t.width/2,o=t.height/2;return[{x:-n,y:-o},{x:n,y:-o},{x:n,y:o},{x:-n,y:o}].map(i=\u003eBn(e,i))}function aIn(t){const e=AIn(t);if(e.length\u003c3)throw new Error(\"A PCB copper pour ring requires at least three vertices\");const n=[];for(const[o,i]of e.entries()){const r=e[(o+1)%e.length];if(r){XXe(n,i);for(const s of Aer({bulge:i.bulge??0,end:r,start:i}))XXe(n,s)}}return Jee(n)}function Aer({bulge:t,end:e,start:n}){if(Math.abs(t)\u003c1e-12||r3(n,e))return[e];const o=e.x-n.x,i=e.y-n.y,r=(1-t*t)/(4*t),s={x:(n.x+e.x)/2-i*r,y:(n.y+e.y)/2+o*r},a=Math.hypot(n.x-s.x,n.y-s.y),A=Math.atan2(n.y-s.y,n.x-s.x),c=4*Math.atan(t),l=Math.max(2,Math.ceil(Math.abs(c)/ner));return Array.from({length:l},(u,g)=\u003e{const h=A+c*(g+1)/l;return{x:s.x+a*Math.cos(h),y:s.y+a*Math.sin(h)}})}function Jee(t){const e=[];for(const o of t)XXe(e,o);const n=e[0];if(n\u0026\u0026!r3(n,e.at(-1)??n)\u0026\u0026e.push(n),e.length\u003c4)throw new Error(\"A PCB copper pour ring requires at least three vertices\");return e}function AIn(t){const e=[...t],n=e[0],o=e.at(-1);return n\u0026\u0026o\u0026\u0026r3(n,o)\u0026\u0026e.pop(),e}function XXe(t,e){const n=t.at(-1);(!n||!r3(n,e))\u0026\u0026t.push(e)}function cer(t){if(t===\"top\")return\"TOP\";if(t===\"bottom\")return\"BOTTOM\";const e=/^inner(\\d+)$/u.exec(t);if(!e?.[1])throw new Error(`Unsupported PCB copper pour layer: ${t}`);return`MID-LAYER${Number(e[1])}`}function cIn(t){return t===\"TOP\"||t===\"BOTTOM\"}function ler({layer:t,net:e,outerRing:n,polygonIndex:o}){return[\"|RECORD=Polygon\",`NET=${e?.index??65535}`,`ID=${o}`,\"POLYGONTYPE=Polygon\",\"POUROVERSTYLE=1\",\"HATCHSTYLE=Solid\",\"SELECTION=FALSE\",`LAYER=${t}`,\"LOCKED=FALSE\",...lIn(n)].join(\"|\")}function Wee({altiumComponentIndex:t,innerRings:e,layer:n,net:o,outerRing:i,polygonIndex:r,regionKind:s=\"COPPER\"}){return[\"|RECORD=Region\",...t===void 0?[]:[`COMPONENT=${t}`],...o?[`NET=${o.index}`]:[],...r===void 0?[]:[`POLYGON=${r}`],`LAYER=${n}`,\"LOCKED=FALSE\",\"KEEPOUT=FALSE\",\"TEARDROP=FALSE\",`REGIONKIND=${s}`,`HOLECOUNT=${e.length}`,...lIn(i),...e.flatMap(uer)].join(\"|\")}function lIn(t){return t.flatMap((e,n)=\u003e[`KIND${n}=0`,`VX${n}=${Xi(e.x)}`,`VY${n}=${Xi(e.y)}`])}function uer(t,e){return[`HOLE${e}COUNT=${t.length}`,...t.flatMap((n,o)=\u003e[`HOLE${e}VX${o}=${Xi(n.x)}`,`HOLE${e}VY${o}=${Xi(n.y)}`])]}function lK({altiumComponentIndex:t,circuitPoints:e,circuitToAltiumPcbPoint:n,closePath:o=!1,isKeepout:i=!1,layer:r,strokeWidthMm:s}){const a=o?tZe(e):[...e],A=[];for(let c=1;c\u003ca.length;c++){const l=a[c-1],u=a[c];if(!l||!u)continue;const g=n(l),h=n(u);r3(g,h)||A.push([\"|RECORD=Track\",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${r}`,...i?[\"KEEPOUT=TRUE\"]:[],\"LOCKED=FALSE\",`X1=${Xi(g.x)}`,`Y1=${Xi(g.y)}`,`X2=${Xi(h.x)}`,`Y2=${Xi(h.y)}`,`WIDTH=${Xi(s*sg)}`].join(\"|\"))}return A}function uIn({altiumComponentIndex:t,center:e,circuitToAltiumPcbPoint:n,heightMm:o,isKeepout:i=!1,layer:r,rotationDegrees:s=0,widthMm:a}){const A=n({x:e.x-a/2,y:e.y-o/2}),c=n({x:e.x+a/2,y:e.y+o/2});return[\"|RECORD=Fill\",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${r}`,`KEEPOUT=${i?\"TRUE\":\"FALSE\"}`,\"LOCKED=FALSE\",`X1=${Xi(A.x)}`,`Y1=${Xi(A.y)}`,`X2=${Xi(c.x)}`,`Y2=${Xi(c.y)}`,`ROTATION=${Sp(sM(s))}`].join(\"|\")}function ZXe({altiumComponentIndex:t,circuitPoints:e,circuitToAltiumPcbPoint:n,innerRings:o=[],isKeepout:i=!1,layer:r}){const s=tZe(e).map(n),a=o.map(A=\u003etZe(A).map(n));if(s.length\u003c4)throw new Error(\"An Altium PCB region requires at least three vertices\");return[\"|RECORD=Region\",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${r}`,\"LOCKED=FALSE\",`KEEPOUT=${i?\"TRUE\":\"FALSE\"}`,\"TEARDROP=FALSE\",\"REGIONKIND=COPPER\",`HOLECOUNT=${a.length}`,...ger(s),...a.flatMap(der)].join(\"|\")}function ger(t){return t.flatMap((e,n)=\u003e[`KIND${n}=0`,`VX${n}=${Xi(e.x)}`,`VY${n}=${Xi(e.y)}`])}function der(t,e){return[`HOLE${e}COUNT=${t.length}`,...t.flatMap((n,o)=\u003e[`HOLE${e}VX${o}=${Xi(n.x)}`,`HOLE${e}VY${o}=${Xi(n.y)}`])]}function eZe({center:t,radiusMm:e}){return Array.from({length:48},(o,i)=\u003e{const r=i*Math.PI*2/48;return{x:t.x+Math.cos(r)*e,y:t.y+Math.sin(r)*e}})}function jee({center:t,cornerRadiusMm:e,heightMm:n,rotationDegrees:o=0,widthMm:i}){const r=i/2,s=n/2,a=Math.min(Math.max(e,0),r,s),A=a===0?[{x:-r,y:-s},{x:r,y:-s},{x:r,y:s},{x:-r,y:s}]:her({halfHeightMm:s,halfWidthMm:r,radiusMm:a}),c=Ad(pA(t.x,t.y),vQ(o*Math.PI/180));return A.map(l=\u003eBn(c,l))}function her({halfHeightMm:t,halfWidthMm:e,radiusMm:n}){const o=[{x:e-n,y:t-n,start:0},{x:-e+n,y:t-n,start:90},{x:-e+n,y:-t+n,start:180},{x:e-n,y:-t+n,start:270}],i=8;return o.flatMap(r=\u003eArray.from({length:i},(s,a)=\u003e{const c=(r.start+a*90/i)*Math.PI/180;return{x:r.x+Math.cos(c)*n,y:r.y+Math.sin(c)*n}}))}function tZe(t){const e=[...t],n=e[0],o=e.at(-1);return n\u0026\u0026o\u0026\u0026!r3(n,o)\u0026\u0026e.push(n),e}const per=.05;function mer({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=[];for(const i of t){const r=_er(i);if(!r)continue;const s=n.get(r.pcbComponentId);if(s===void 0)throw new Error(`PCB courtyard references missing component ${r.pcbComponentId}`);o.push(...lK({altiumComponentIndex:s,circuitPoints:r.points,circuitToAltiumPcbPoint:e,closePath:!0,layer:fer(r.layer),strokeWidthMm:per}))}return o}function _er(t){if(t.type===\"pcb_courtyard_outline\"){const e=sxe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:e.outline}}if(t.type===\"pcb_courtyard_polygon\"){const e=axe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:e.points}}if(t.type===\"pcb_courtyard_rect\"){const e=rxe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:jee({center:e.center,cornerRadiusMm:0,heightMm:e.height,rotationDegrees:e.ccw_rotation,widthMm:e.width})}}if(t.type===\"pcb_courtyard_circle\"){const e=Axe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:eZe({center:e.center,radiusMm:e.radius})}}if(t.type===\"pcb_courtyard_pill\"){const e=cxe.parse(t);return{layer:e.layer,pcbComponentId:e.pcb_component_id,points:jee({center:e.center,cornerRadiusMm:e.radius,heightMm:e.height,widthMm:e.width})}}}function fer(t){return t.toLowerCase()===\"bottom\"?\"MECHANICAL16\":\"MECHANICAL15\"}const OE=1e-9,Ier=4,gIn=8;function Cer({circuitJson:t,circuitToAltiumPcbPoint:e}){const n=[];for(const o of t){if(o.type!==\"pcb_cutout\")continue;const i=Z2e.parse(o);for(const r of yer(i))n.push(ber({circuitToAltiumPcbPoint:e,innerRings:r.innerRings??[],outerRing:r.outerRing}))}return n}function yer(t){return t.shape===\"rect\"?[{outerRing:jee({center:t.center,cornerRadiusMm:t.corner_radius??0,heightMm:t.height,rotationDegrees:t.rotation??0,widthMm:t.width})}]:t.shape===\"circle\"?[{outerRing:eZe({center:t.center,radiusMm:t.radius})}]:t.shape===\"polygon\"?[{outerRing:t.points}]:xer(t)}function xer(t){const e=nZe(t.route),n=e[0],o=e.at(-1),i=e.length\u003e=3\u0026\u0026n!==void 0\u0026\u0026o!==void 0\u0026\u0026r3(n,o);if(i\u0026\u0026e.pop(),e.length===0)return[];const r=t.slot_width/2,s=Math.min(Math.max(t.slot_corner_radius??r,0),r);if(e.length===1){const A=e[0];return A?[{outerRing:jee({center:A,cornerRadiusMm:s,heightMm:t.slot_width,widthMm:t.slot_width})}]:[]}if(t.slot_length!==void 0\u0026\u0026t.slot_length\u003eOE\u0026\u0026t.space_between_slots!==void 0\u0026\u0026t.space_between_slots\u003eOE){const A=i?[...e,e[0]]:e;return Ber({dashLength:t.slot_length,gapLength:t.space_between_slots,points:A}).flatMap(c=\u003edIn({cornerRadiusMm:s,halfWidthMm:r,points:c}))}return i?Eer({halfWidthMm:r,points:e}):dIn({cornerRadiusMm:s,halfWidthMm:r,points:e})}function dIn({cornerRadiusMm:t,halfWidthMm:e,points:n}){const o=nZe(n);if(o.length\u003c2||e\u003c=OE)return[];const i=o[0],r=o.at(-1),s=uK(i,o[1]),a=uK(o.at(-2),r);if(!i||!r||!s||!a)return[];const A=hIn(o,e),c=hIn(o,-e),l=s3(A[0],pm(s,-(e-t))),u=s3(A.at(-1),pm(a,e-t)),g=s3(c.at(-1),pm(a,e-t)),h=s3(c[0],pm(s,-(e-t)));A[0]=l,A[A.length-1]=u,c[0]=h,c[c.length-1]=g;const d=[...A];return _In({center:r,cornerRadiusMm:t,halfWidthMm:e,normal:gK(a),outward:a,points:d}),d.push(...c.slice(0,-1).reverse()),_In({center:i,cornerRadiusMm:t,halfWidthMm:e,normal:pm(gK(s),-1),outward:pm(s,-1),points:d}),[{outerRing:d}]}function Eer({halfWidthMm:t,points:e}){if(e.length\u003c3||t\u003c=OE)return[];const n=pIn(e,t),o=pIn(e,-t);if(n.length\u003c3||o.length\u003c3)return[];const[i,r]=v1e(n)\u003e=v1e(o)?[n,o]:[o,n];return[{innerRings:[r],outerRing:i}]}function hIn(t,e){const n=uK(t[0],t[1]),o=uK(t.at(-2),t.at(-1)),i=t[0],r=t.at(-1);if(!i||!r||!n||!o)return[];const s=[s3(i,pm(gK(n),e))];for(let a=1;a\u003ct.length-1;a++)mIn({boundary:s,index:a,offset:e,points:t});return s.push(s3(r,pm(gK(o),e))),s}function pIn(t,e){const n=[];for(const[o]of t.entries())mIn({boundary:n,index:o,offset:e,points:t,wrap:!0});return n}function mIn({boundary:t,index:e,offset:n,points:o,wrap:i=!1}){const r=o[e],s=o[i?(e-1+o.length)%o.length:e-1],a=o[i?(e+1)%o.length:e+1],A=uK(s,r),c=uK(r,a);if(!r||!A||!c)return;const l=s3(r,pm(gK(A),n)),u=s3(r,pm(gK(c),n)),g=ver({firstDirection:A,firstPoint:l,secondDirection:c,secondPoint:u});if(g\u0026\u0026Math.hypot(g.x-r.x,g.y-r.y)\u003c=Math.abs(n)*Ier){aM(t,g);return}aM(t,l),aM(t,u)}function _In({center:t,cornerRadiusMm:e,halfWidthMm:n,normal:o,outward:i,points:r}){if(e\u003c=OE){aM(r,s3(t,pm(i,n),pm(o,n))),aM(r,s3(t,pm(i,n),pm(o,-n)));return}const s=n-e,a=s3(t,pm(i,s),pm(o,s));fIn({center:a,endAngleRadians:0,normal:o,outward:i,points:r,radius:e,startAngleRadians:Math.PI/2});const A=s3(t,pm(i,s),pm(o,-s));fIn({center:A,endAngleRadians:-Math.PI/2,normal:o,outward:i,points:r,radius:e,startAngleRadians:0})}function fIn({center:t,endAngleRadians:e,normal:n,outward:o,points:i,radius:r,startAngleRadians:s}){for(let a=1;a\u003c=gIn;a++){const A=s+(e-s)*a/gIn;aM(i,s3(t,pm(o,Math.cos(A)*r),pm(n,Math.sin(A)*r)))}}function Ber({dashLength:t,gapLength:e,points:n}){const o=[0];for(let s=1;s\u003cn.length;s++){const a=n[s-1],A=n[s];!a||!A||o.push((o.at(-1)??0)+Math.hypot(A.x-a.x,A.y-a.y))}const i=o.at(-1)??0,r=[];for(let s=0;s\u003ci-OE;s+=t+e){const a=Math.min(s+t,i),A=[],c=IIn({cumulativeLengths:o,distance:s,points:n}),l=IIn({cumulativeLengths:o,distance:a,points:n});if(!(!c||!l)){A.push(c);for(let u=1;u\u003cn.length-1;u++){const g=o[u],h=n[u];h\u0026\u0026g!==void 0\u0026\u0026g\u003es+OE\u0026\u0026g\u003ca-OE\u0026\u0026A.push(h)}aM(A,l),A.length\u003e=2\u0026\u0026r.push(A)}}return r}function IIn({cumulativeLengths:t,distance:e,points:n}){for(let o=1;o\u003ct.length;o++){const i=t[o-1],r=t[o],s=n[o-1],a=n[o];if(i===void 0||r===void 0||!s||!a||e\u003er+OE)continue;const A=r-i;if(A\u003c=OE)continue;const c=Math.min(Math.max((e-i)/A,0),1);return{x:s.x+(a.x-s.x)*c,y:s.y+(a.y-s.y)*c}}return n.at(-1)}function ber({circuitToAltiumPcbPoint:t,innerRings:e,outerRing:n}){const o=CIn(n).map(t),i=e.map(r=\u003eCIn(r).map(t));return[\"|RECORD=Region\",\"LAYER=MULTILAYER\",\"LOCKED=FALSE\",\"KEEPOUT=FALSE\",\"TEARDROP=FALSE\",\"ISBOARDCUTOUT=TRUE\",\"REGIONKIND=COPPER\",`HOLECOUNT=${i.length}`,...Ser(o),...i.flatMap(Qer)].join(\"|\")}function CIn(t){const e=nZe(t),n=e[0],o=e.at(-1);if(n\u0026\u0026o\u0026\u0026!r3(n,o)\u0026\u0026e.push(n),e.length\u003c4||v1e(e)\u003c=OE)throw new Error(\"A PCB board cutout requires at least three vertices\");return e}function Ser(t){return t.flatMap((e,n)=\u003e[`KIND${n}=0`,`VX${n}=${Xi(e.x)}`,`VY${n}=${Xi(e.y)}`])}function Qer(t,e){return[`HOLE${e}COUNT=${t.length}`,...t.flatMap((n,o)=\u003e[`HOLE${e}VX${o}=${Xi(n.x)}`,`HOLE${e}VY${o}=${Xi(n.y)}`])]}function nZe(t){const e=[];for(const n of t)aM(e,n);return e}function aM(t,e){const n=t.at(-1);(!n||!r3(n,e))\u0026\u0026t.push(e)}function uK(t,e){if(!t||!e)return;const n=e.x-t.x,o=e.y-t.y,i=Math.hypot(n,o);if(!(i\u003c=OE))return{x:n/i,y:o/i}}function gK(t){return{x:-t.y,y:t.x}}function pm(t,e){return{x:t.x*e,y:t.y*e}}function s3(...t){return t.reduce((e,n)=\u003e({x:e.x+n.x,y:e.y+n.y}),{x:0,y:0})}function yIn(t,e){return t.x*e.y-t.y*e.x}function ver({firstDirection:t,firstPoint:e,secondDirection:n,secondPoint:o}){const i=yIn(t,n);if(Math.abs(i)\u003c=OE)return;const r={x:o.x-e.x,y:o.y-e.y},s=yIn(r,n)/i;return s3(e,pm(t,s))}function xIn({altiumComponentIndex:t,circuitToAltiumPcbPoint:e,dimension:n,layer:o}){const i=n.to.x-n.from.x,r=n.to.y-n.from.y;if(Math.hypot(i,r)===0)throw new Error(\"A PCB dimension requires distinct from and to points\");const a=wer({deltaX:i,deltaY:r,offsetDirection:n.offset_direction}),A=\"offset\"in n?n.offset:void 0,c=n.offset_distance??A??0,l={x:n.from.x+a.x*c,y:n.from.y+a.y*c},u={x:n.to.x+a.x*c,y:n.to.y+a.y*c},g=e(n.from),h=e(n.to),d=e(l),p=e(u),m={x:(d.x+p.x)/2,y:(d.y+p.y)/2},_=n.font_size,f=n.arrow_size;return[\"|RECORD=Dimension\",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${o}`,\"DIMENSIONKIND=0\",`TEXTFORMAT=${n.text?uu(n.text):\"\u003c\u003e\"}`,`HEIGHT=${Xi(Math.abs(c)*sg)}`,`LINEWIDTH=${Xi(Math.max(.05,_*.1)*sg)}`,`TEXTHEIGHT=${Xi(_*sg)}`,`TEXTLINEWIDTH=${Xi(Math.max(.05,_*.1)*sg)}`,\"TEXTPRECISION=3\",\"TEXTBOLD=FALSE\",\"ITALIC=FALSE\",`TEXTGAP=${Xi(_*.2*sg)}`,`ARROWSIZE=${Xi(f*sg)}`,\"TEXTPOSITION=Manual\",`X1=${Xi(d.x)}`,`Y1=${Xi(d.y)}`,\"REFERENCES_COUNT=2\",`REFERENCE0POINTX=${Xi(g.x)}`,`REFERENCE0POINTY=${Xi(g.y)}`,`REFERENCE1POINTX=${Xi(h.x)}`,`REFERENCE1POINTY=${Xi(h.y)}`,`TEXT1X=${Xi(m.x)}`,`TEXT1Y=${Xi(m.y)}`,\"TEXTDIMENSIONUNIT=Millimeters\",\"TEXTSUFFIX=mm\",`ANGLE=${Sp(Per({end:p,start:d}))}`].join(\"|\")}function wer({deltaX:t,deltaY:e,offsetDirection:n}){const o=n??{x:-e,y:t},i=Math.hypot(o.x,o.y);if(i===0)throw new Error(\"A PCB dimension offset direction cannot be zero\");return{x:o.x/i,y:o.y/i}}function Per({end:t,start:e}){return(Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI%360+360)%360}function oZe({altiumComponentIndex:t,circuitText:e,circuitToAltiumPcbPoint:n,layer:o}){const i=AA(e.anchor_position)??AA(e.center)??{x:0,y:0},r=n(i),s=ti(e.layer).toLowerCase()===\"bottom\",a=typeof e.is_mirrored==\"boolean\"?e.is_mirrored:e.is_mirrored_from_top_view,A=typeof a==\"boolean\"?a:s,c=Tu(e.font_size,1);return[\"|RECORD=Text\",...t===void 0?[]:[`COMPONENT=${t}`],`LAYER=${o}`,`X=${Xi(r.x)}`,`Y=${Xi(r.y)}`,`ROTATION=${Sp(sM(fr(e.ccw_rotation)))}`,`MIRROR=${A?\"TRUE\":\"FALSE\"}`,`HEIGHT=${Xi(c*sg)}`,`WIDTH=${Xi(Math.max(.05,c*.1)*sg)}`,\"USETTFONTS=TRUE\",\"FONTNAME=Arial\",`JUSTIFICATION=${Mer(e.anchor_alignment)}`,`WIDESTRING=${Der(ti(e.text))}`].join(\"|\")}function Mer(t){switch(t){case\"top_left\":return 1;case\"center_left\":return 2;case\"bottom_left\":return 3;case\"top_center\":return 4;case\"center\":return 5;case\"bottom_center\":return 6;case\"top_right\":return 7;case\"center_right\":return 8;case\"bottom_right\":return 9;default:return 5}}function Der(t){const e=[];for(const n of t){const o=n.codePointAt(0);o!==void 0\u0026\u0026e.push(o)}return e.join(\",\")}function Ner({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=[];for(const i of t){if(!Rer(i))continue;const r=Ter({componentIndex:n,element:i});if(i.type===\"pcb_fabrication_note_path\"){const s=K2e.parse(i);o.push(...lK({altiumComponentIndex:r,circuitPoints:s.route,circuitToAltiumPcbPoint:e,layer:HS(s.layer),strokeWidthMm:s.stroke_width}))}else if(i.type===\"pcb_note_path\"){const s=j2e.parse(i);o.push(...lK({altiumComponentIndex:r,circuitPoints:s.route,circuitToAltiumPcbPoint:e,layer:HS(s.layer),strokeWidthMm:s.stroke_width}))}else if(i.type===\"pcb_note_line\"){const s=$2e.parse(i);if(s.is_dashed)throw new Error(\"Altium PCB note lines do not preserve dashed strokes\");o.push(...lK({altiumComponentIndex:r,circuitPoints:[{x:s.x1,y:s.y1},{x:s.x2,y:s.y2}],circuitToAltiumPcbPoint:e,layer:HS(s.layer),strokeWidthMm:s.stroke_width}))}else if(i.type===\"pcb_fabrication_note_rect\"){const s=V2e.parse(i);o.push(...EIn({altiumComponentIndex:r,center:s.center,circuitToAltiumPcbPoint:e,cornerRadiusMm:s.corner_radius??0,hasStroke:s.has_stroke!==!1,heightMm:s.height,isFilled:s.is_filled===!0,isStrokeDashed:s.is_stroke_dashed===!0,layer:HS(s.layer),strokeWidthMm:s.stroke_width,widthMm:s.width}))}else if(i.type===\"pcb_note_rect\"){const s=W2e.parse(i);o.push(...EIn({altiumComponentIndex:r,center:s.center,circuitToAltiumPcbPoint:e,cornerRadiusMm:s.corner_radius??0,hasStroke:s.has_stroke!==!1,heightMm:s.height,isFilled:s.is_filled===!0,isStrokeDashed:s.is_stroke_dashed===!0,layer:HS(s.layer),strokeWidthMm:s.stroke_width,widthMm:s.width}))}else if(i.type===\"pcb_fabrication_note_text\"){const s=U2e.parse(i);o.push(oZe({altiumComponentIndex:r,circuitText:i,circuitToAltiumPcbPoint:e,layer:HS(s.layer)}))}else if(i.type===\"pcb_note_text\"){const s=J2e.parse(i);o.push(oZe({altiumComponentIndex:r,circuitText:i,circuitToAltiumPcbPoint:e,layer:HS(s.layer)}))}else if(i.type===\"pcb_fabrication_note_dimension\"){const s=z2e.parse(i);o.push(xIn({altiumComponentIndex:r,circuitToAltiumPcbPoint:e,dimension:s,layer:HS(s.layer)}))}else if(i.type===\"pcb_note_dimension\"){const s=q2e.parse(i);o.push(xIn({altiumComponentIndex:r,circuitToAltiumPcbPoint:e,dimension:s,layer:HS(s.layer)}))}}return o}function Rer(t){return[\"pcb_fabrication_note_dimension\",\"pcb_fabrication_note_path\",\"pcb_fabrication_note_rect\",\"pcb_fabrication_note_text\",\"pcb_note_dimension\",\"pcb_note_line\",\"pcb_note_path\",\"pcb_note_rect\",\"pcb_note_text\"].includes(t.type??\"\")}function EIn({altiumComponentIndex:t,center:e,circuitToAltiumPcbPoint:n,cornerRadiusMm:o,hasStroke:i,heightMm:r,isFilled:s,isStrokeDashed:a,layer:A,strokeWidthMm:c,widthMm:l}){if(a)throw new Error(\"Altium PCB note rectangles do not preserve dashed strokes\");const u=jee({center:e,cornerRadiusMm:o,heightMm:r,widthMm:l}),g=[];return s\u0026\u0026g.push(o===0?uIn({altiumComponentIndex:t,center:e,circuitToAltiumPcbPoint:n,heightMm:r,layer:A,widthMm:l}):ZXe({altiumComponentIndex:t,circuitPoints:u,circuitToAltiumPcbPoint:n,layer:A})),i\u0026\u0026g.push(...lK({altiumComponentIndex:t,circuitPoints:u,circuitToAltiumPcbPoint:n,closePath:!0,layer:A,strokeWidthMm:c})),g}function Ter({componentIndex:t,element:e}){if(typeof e.pcb_component_id!=\"string\")return;const n=t.get(e.pcb_component_id);if(n===void 0)throw new Error(`PCB annotation references missing component ${e.pcb_component_id}`);return n}function HS(t){return t.toLowerCase()===\"bottom\"?\"MECHANICAL2\":\"MECHANICAL1\"}class ker{constructor(e){this.parentByTraceIndex=Array.from({length:e},(n,o)=\u003eo)}getRoot(e){if(!Number.isInteger(e)||e\u003c0||e\u003e=this.parentByTraceIndex.length)throw new RangeError(`Unknown trace index: ${e}`);let n=e,o=this.parentByTraceIndex[n];for(;o!==n;){if(o===void 0)throw new RangeError(`Unknown trace index: ${n}`);n=o,o=this.parentByTraceIndex[n]}let i=e;for(;this.parentByTraceIndex[i]!==i;){const r=this.parentByTraceIndex[i];if(r===void 0)throw new RangeError(`Unknown trace index: ${i}`);this.parentByTraceIndex[i]=n,i=r}return n}connect(e,n){const o=this.getRoot(e),i=this.getRoot(n);if(o===i)return;const r=Math.min(o,i);this.parentByTraceIndex[o]=r,this.parentByTraceIndex[i]=r}}function BIn({basePcbNetName:t,useCountByPcbNetName:e}){const n=(e.get(t)??0)+1;return e.set(t,n),n===1?t:`${t}-${n}`}function bIn(t,e){return Math.min(...t.sourceNetIds.map(n=\u003ee.get(n)??Number.POSITIVE_INFINITY))}const SIn=t=\u003e{const e=new Map(Dd(t,\"source_net\").flatMap(g=\u003e{const h=ti(g.source_net_id);return h?[[h,uu(g.name)||h]]:[]})),n=new Map([...e.keys()].map((g,h)=\u003e[g,h])),o=Dd(t,\"source_trace\"),i=new ker(o.length),r=new Map,s=new Map;for(const[g,h]of o.entries()){const d=Array.isArray(h.connected_source_port_ids)?h.connected_source_port_ids.map(m=\u003eti(m)):[],p=Array.isArray(h.connected_source_net_ids)?h.connected_source_net_ids.map(m=\u003eti(m)):[];for(const[m,_]of[...d.map(f=\u003e[f,r]),...p.map(f=\u003e[f,s])]){if(!m)continue;const f=_.get(m);f===void 0?_.set(m,g):i.connect(f,g)}}const a=new Map;for(const g of o.keys()){const h=i.getRoot(g);a.set(h,[...a.get(h)??[],g])}const A=new Map,c=[];for(const g of a.values()){const h=g.flatMap(I=\u003e{const C=o[I];return C?[C]:[]}),d=[...new Set(h.flatMap(I=\u003eArray.isArray(I.connected_source_net_ids)?I.connected_source_net_ids.map(C=\u003eti(C)).filter(Boolean):[]))],p=[...new Set(h.flatMap(I=\u003eArray.isArray(I.connected_source_port_ids)?I.connected_source_port_ids.map(C=\u003eti(C)).filter(Boolean):[]))],m=h.map(I=\u003euu(I.name)||uu(I.display_name)).find(Boolean);if(d.length===0\u0026\u0026p.length===0\u0026\u0026!m)continue;const _=c.length,f=d.map(I=\u003ee.get(I)).find(Boolean)||m||`Net-${_+1}`;c.push({index:_,name:BIn({basePcbNetName:f,useCountByPcbNetName:A}),sourceNetIds:d,sourcePortIds:p,traceIds:h.map((I,C)=\u003eti(I.source_trace_id)||`source_trace_${g[C]??C}`)})}const l=new Set(c.flatMap(g=\u003eg.sourceNetIds)),u=new Set([...e.keys(),...Dd(t,\"pcb_copper_pour\").map(g=\u003eti(g.source_net_id)).filter(Boolean)]);for(const g of u){if(l.has(g))continue;const h=e.get(g)??g;c.push({index:c.length,name:BIn({basePcbNetName:h,useCountByPcbNetName:A}),sourceNetIds:[g],sourcePortIds:[],traceIds:[]}),l.add(g)}c.sort((g,h)=\u003e{const d=bIn(g,n),p=bIn(h,n);return d!==p?d-p:g.index-h.index});for(const[g,h]of c.entries())h.index=g;return c};function QIn(t){if(/[\\r\\n|*?]/u.test(t))throw new Error(`Cannot represent keepout exclusion query name: ${JSON.stringify(t)}`);return`'${t.replaceAll(\"'\",\"''\")}'`}function Fer({circuitJson:t,excludedComponentIds:e,unionIndex:n}){const o=Dd(t,\"pcb_component\"),i=Dd(t,\"source_component\"),r=o.map((u,g)=\u003e{const h=i.find(d=\u003ed.source_component_id===u.source_component_id);return uu(h?.name)||`Component-${g+1}`}),s=new Set,a=[...new Set(e)].map(u=\u003e{const g=o.findIndex(d=\u003ed.pcb_component_id===u);if(g===-1)throw new Error(`Keepout exclusion references missing PCB component ${u}`);const h=r[g];if(r.filter(d=\u003ed.toLowerCase()===h.toLowerCase()).length!==1)throw new Error(`Keepout exclusion has ambiguous Altium component name ${h}`);return s.add(ti(o[g].source_component_id)),QIn(h)}),A=new Set(Dd(t,\"source_port\").filter(u=\u003es.has(ti(u.source_component_id))).map(u=\u003eti(u.source_port_id))),c=SIn(t).filter(u=\u003eu.sourcePortIds.some(g=\u003eA.has(g))).map(u=\u003eQIn(u.name)),l=[`InComponent(${a.join(\", \")})`];return c.length\u0026\u0026l.push(`((IsTrack Or IsArc) And InNet(${c.join(\", \")}))`),[\"|RECORD=Rule\",\"BINARYRECORDTYPE=0\",\"RULEKIND=Clearance\",\"NETSCOPE=AnyNet\",\"LAYERKIND=SameLayer\",`SCOPE1EXPRESSION=IsKeepOut And InUnion(${n})`,`SCOPE2EXPRESSION=${l.join(\" Or \")}`,`NAME=TscircuitKeepoutExclusion${n}`,\"ENABLED=TRUE\",`PRIORITY=${n}`,\"GAP=0mil\",\"DEFINEDBYLOGICALDOCUMENT=FALSE\"].join(\"|\")}function Ler({circuitJson:t,circuitToAltiumPcbPoint:e}){const n=[];let o=0;for(const i of t){if(i.type!==\"pcb_keepout\")continue;const r=X2e.parse(i),s=r.excluded_pcb_component_ids?.length?++o:void 0;s!==void 0\u0026\u0026n.push(Fer({circuitJson:t,excludedComponentIds:r.excluded_pcb_component_ids,unionIndex:s}));const a=A=\u003es===void 0?A:`${A}|UNIONINDEX=${s}`;if(r.shape===\"outline\"\u0026\u0026r.stroke_width\u003c=0)throw new Error(`PCB keepout outline ${r.pcb_keepout_id} requires a stroke width`);for(const A of r.layers.map(Her)){if(r.shape===\"rect\"){n.push(a(uIn({center:r.center,circuitToAltiumPcbPoint:e,heightMm:r.height,isKeepout:!0,layer:A,widthMm:r.width})));continue}if(r.shape===\"circle\"){n.push(a(ZXe({circuitPoints:eZe({center:r.center,radiusMm:r.radius}),circuitToAltiumPcbPoint:e,isKeepout:!0,layer:A})));continue}n.push(...lK({circuitPoints:r.outline,circuitToAltiumPcbPoint:e,isKeepout:!0,layer:A,strokeWidthMm:r.stroke_width}).map(a))}}return n}function Her(t){const e=t.toLowerCase();if(e===\"top\")return\"TOP\";if(e===\"bottom\")return\"BOTTOM\";if(e===\"all\"||e===\"multilayer\")return\"KEEPOUT\";const n=/^inner(\\d+)$/u.exec(e);if(n?.[1])return`MID-LAYER${Number(n[1])}`;throw new Error(`Unsupported PCB keepout layer: ${t}`)}function Oer({circuitJson:t,circuitToAltiumPcbPoint:e,componentIndex:n}){const o=[];for(const i of t){if(i.type!==\"pcb_silkscreen_graphic\")continue;const r=Ger(i);r\u0026\u0026o.push(ZXe({altiumComponentIndex:n.get(ti(i.pcb_component_id)),circuitPoints:r.outerRing,circuitToAltiumPcbPoint:e,innerRings:r.innerRings,layer:ti(i.layer).toLowerCase()===\"bottom\"?\"BOTTOMOVERLAY\":\"TOPOVERLAY\"}))}return o}function Ger(t){if(t.shape!==\"brep\"||!HE(t.brep_shape))return;const e=vIn(t.brep_shape.outer_ring);return e.length\u003c3?void 0:{innerRings:Array.isArray(t.brep_shape.inner_rings)?t.brep_shape.inner_rings.map(vIn).filter(o=\u003eo.length\u003e=3):[],outerRing:e}}function vIn(t){return!HE(t)||!Array.isArray(t.vertices)?[]:t.vertices.flatMap(e=\u003e{const n=AA(e);return n?[n]:[]})}function Yer({altiumComponentIndex:t,circuitToAltiumPcbPoint:e,silkscreenText:n}){const o=ti(n.layer).toLowerCase()===\"bottom\";return oZe({altiumComponentIndex:t,circuitText:n,circuitToAltiumPcbPoint:e,layer:o?\"BOTTOMOVERLAY\":\"TOPOVERLAY\"})}const Uer=t=\u003e{const e=Array.isArray(t?.outline)?t.outline.map(AA):[],n=e.filter(c=\u003e!!c),o=n.length===e.length,i=n[0],r=n.at(-1);if(n.length\u003e1\u0026\u0026i\u0026\u0026r\u0026\u0026r3(i,r)\u0026\u0026n.pop(),o\u0026\u0026n.length\u003e=3\u0026\u0026v1e(n)\u003e1e-9)return n;const s=AA(t?.center)??{x:0,y:0},a=Tu(t?.width,VZi),A=Tu(t?.height,zZi);return[{x:s.x-a/2,y:s.y-A/2},{x:s.x+a/2,y:s.y-A/2},{x:s.x+a/2,y:s.y+A/2},{x:s.x-a/2,y:s.y+A/2}]};function wIn(t,e){const n=e.pcbPorts.get(ti(t.pcb_port_id));return e.netBySourcePortId.get(ti(n?.source_port_id))}function PIn(t,e){const n=e.pcbPorts.get(ti(t.pcb_port_id)),o=e.sourcePorts.get(ti(n?.source_port_id));return uu(o?.pin_number?.toString())||uu(o?.name)||\"1\"}const Ker=t=\u003e{const e=Dd(t,\"pcb_board\")[0],n=Uer(e),o=WZi(n),i=n[0]??{x:0,y:0},a=[[\"|RECORD=Board\",\"KIND=Protel_Advanced_PCB\",\"VERSION=5.00\",...[...n,i].flatMap((f,I)=\u003e{const C=o(f);return[`KIND${I}=0`,`VX${I}=${Xi(C.x)}`,`VY${I}=${Xi(C.y)}`]})].join(\"|\")],A=new Map(Dd(t,\"source_component\").filter(f=\u003etypeof f.source_component_id==\"string\").map(f=\u003e[ti(f.source_component_id),f])),c=new Map(Dd(t,\"source_port\").map(f=\u003e[ti(f.source_port_id),f])),l=new Map(Dd(t,\"pcb_port\").map(f=\u003e[ti(f.pcb_port_id),f])),u=SIn(t),g=new Map(u.flatMap(f=\u003ef.traceIds.map(I=\u003e[I,f]))),h=new Map(u.flatMap(f=\u003ef.sourcePortIds.map(I=\u003e[I,f]))),d=Dd(t,\"pcb_component\"),p=new Map(d.map((f,I)=\u003e[ti(f.pcb_component_id)||`pcb_component_${I}`,I]));for(const f of u)a.push(`|RECORD=Net|ID=${f.index}|NAME=${uu(f.name)}|VISIBLE=FALSE|JUMPERSVISIBLE=FALSE`);a.push(...Cer({circuitJson:t,circuitToAltiumPcbPoint:o})),a.push(...oer({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p,netEntries:u}));for(const[f,I]of d.entries()){const C=ti(I.pcb_component_id)||`pcb_component_${f}`,y=A.get(ti(I.source_component_id)),x=o(AA(I.center)??{x:0,y:0}),E=uu(y?.name)||`Component-${f+1}`,B=`TSCIRCUIT-${Sp(Tu(I.width,1))}x${Sp(Tu(I.height,1))}mm`,S=ti(I.layer).toLowerCase()===\"bottom\"?\"BOTTOM\":\"TOP\";a.push([\"|RECORD=Component\",`ID=${f}`,`LAYER=${S}`,`X=${Xi(x.x)}`,`Y=${Xi(x.y)}`,`ROTATION=${Sp(sM(fr(I.rotation)))}`,`PATTERN=${B}`,`SOURCEDESIGNATOR=${E}`,\"NAMEON=TRUE\",\"COMMENTON=TRUE\",`SOURCEUNIQUEID=${uu(C)}`].join(\"|\"))}a.push(...jZi({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p})),a.push(...Ler({circuitJson:t,circuitToAltiumPcbPoint:o}),...mer({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p}),...Ner({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p}));const m={netBySourcePortId:h,pcbPorts:l,sourcePorts:c};for(const f of Dd(t,\"pcb_smtpad\")){const I=o({x:fr(f.x),y:fr(f.y)}),C=p.get(ti(f.pcb_component_id)),y=wIn(f,m),x=Tu(f.radius,.5)*2,E=Tu(f.width,x),B=Tu(f.height,E),S=f.shape===\"circle\"?\"ROUND\":\"RECTANGLE\",Q=ti(f.layer).toLowerCase()===\"bottom\"?\"BOTTOM\":\"TOP\";a.push([\"|RECORD=Pad\",...C===void 0?[]:[`COMPONENT=${C}`],...y?[`NET=${y.index}`]:[],`LAYER=${Q}`,`ROTATION=${Sp(sM(fr(f.ccw_rotation)))}`,`NAME=${PIn(f,m)}`,\"HOLESIZE=0mil\",\"PLATED=TRUE\",\"LOCKED=FALSE\",`X=${Xi(I.x)}`,`Y=${Xi(I.y)}`,`SHAPE=${S}`,`XSIZE=${Xi(E*sg)}`,`YSIZE=${Xi(B*sg)}`].join(\"|\"))}for(const f of Dd(t,\"pcb_plated_hole\")){const I=o({x:fr(f.x),y:fr(f.y)}),C=p.get(ti(f.pcb_component_id)),y=wIn(f,m),x=Tu(f.outer_width,Tu(f.outer_diameter,1.6)),E=Tu(f.outer_height,x),B=Tu(f.hole_width,Tu(f.hole_diameter,.8)),S=Tu(f.hole_height,B),Q=Math.abs(B-S)\u003e1e-9;a.push([\"|RECORD=Pad\",...C===void 0?[]:[`COMPONENT=${C}`],...y?[`NET=${y.index}`]:[],\"LAYER=MULTILAYER\",`ROTATION=${Sp(sM(fr(f.ccw_rotation)))}`,`NAME=${PIn(f,m)}`,`HOLESIZE=${Xi(Math.min(B,S)*sg)}`,`HOLEWIDTH=${Xi(Math.max(B,S)*sg)}`,`HOLESHAPE=${Q?\"SLOT\":\"ROUND\"}`,`HOLEROTATION=${Sp(sM(fr(f.ccw_rotation)))}`,\"PLATED=TRUE\",\"LOCKED=FALSE\",`X=${Xi(I.x)}`,`Y=${Xi(I.y)}`,`SHAPE=${f.shape===\"circle\"||f.shape===\"oval\"||f.shape===\"pill\"?\"ROUND\":\"RECTANGLE\"}`,`XSIZE=${Xi(x*sg)}`,`YSIZE=${Xi(E*sg)}`].join(\"|\"))}for(const[f,I]of Dd(t,\"pcb_hole\").entries()){const C=o({x:fr(I.x),y:fr(I.y)}),y=p.get(ti(I.pcb_component_id)),x=Tu(I.hole_diameter,1),E=Tu(I.hole_width,x),B=Tu(I.hole_height,x),S=Math.abs(E-B)\u003e1e-9;a.push([\"|RECORD=Pad\",...y===void 0?[]:[`COMPONENT=${y}`],\"LAYER=MULTILAYER\",`ROTATION=${Sp(sM(fr(I.ccw_rotation)))}`,`NAME=NPTH-${f+1}`,`HOLESIZE=${Xi(Math.min(E,B)*sg)}`,`HOLEWIDTH=${Xi(Math.max(E,B)*sg)}`,`HOLESHAPE=${S?\"SLOT\":\"ROUND\"}`,`HOLEROTATION=${Sp(sM(fr(I.ccw_rotation)))}`,\"PLATED=FALSE\",\"LOCKED=FALSE\",`X=${Xi(C.x)}`,`Y=${Xi(C.y)}`,`SHAPE=${S?\"RECTANGLE\":\"ROUND\"}`,`XSIZE=${Xi(E*sg)}`,`YSIZE=${Xi(B*sg)}`].join(\"|\"))}for(const f of Dd(t,\"pcb_trace\")){const I=Array.isArray(f.route)?f.route.flatMap(y=\u003eHE(y)\u0026\u0026AA(y)?[y]:[]):[],C=g.get(ti(f.source_trace_id));for(let y=1;y\u003cI.length;y++){const x=I[y-1],E=I[y];if(!x||!E||x.route_type===\"via\"\u0026\u0026E.route_type===\"via\")continue;const B=o({x:fr(x.x),y:fr(x.y)}),S=o({x:fr(E.x),y:fr(E.y)});if(r3(B,S))continue;const Q=ti(E.layer,ti(x.layer)).toLowerCase()===\"bottom\"?\"BOTTOM\":\"TOP\";a.push([\"|RECORD=Track\",...C?[`NET=${C.index}`]:[],`LAYER=${Q}`,\"LOCKED=FALSE\",`X1=${Xi(B.x)}`,`Y1=${Xi(B.y)}`,`X2=${Xi(S.x)}`,`Y2=${Xi(S.y)}`,`WIDTH=${Xi(Tu(E.width,Tu(x.width,.2))*sg)}`].join(\"|\"))}}const _=new Map(Dd(t,\"pcb_trace\").map(f=\u003e[ti(f.pcb_trace_id),f]));for(const f of Dd(t,\"pcb_via\")){const I=o({x:fr(f.x),y:fr(f.y)}),C=_.get(ti(f.pcb_trace_id)),y=g.get(ti(f.source_trace_id,ti(C?.source_trace_id)));a.push([\"|RECORD=Via\",...y?[`NET=${y.index}`]:[],`X=${Xi(I.x)}`,`Y=${Xi(I.y)}`,`DIAMETER=${Xi(Tu(f.outer_diameter,.6)*sg)}`,`HOLESIZE=${Xi(Tu(f.hole_diameter,.3)*sg)}`,\"STARTLAYER=TOP\",\"STOPLAYER=BOTTOM\",\"LOCKED=FALSE\"].join(\"|\"))}for(const f of Dd(t,\"pcb_silkscreen_path\")){const I=Array.isArray(f.route)?f.route.flatMap(x=\u003eHE(x)\u0026\u0026AA(x)?[x]:[]):[],C=p.get(ti(f.pcb_component_id)),y=ti(f.layer).toLowerCase()===\"bottom\"?\"BOTTOMOVERLAY\":\"TOPOVERLAY\";for(let x=1;x\u003cI.length;x++){const E=AA(I[x-1]),B=AA(I[x]);if(!E||!B)continue;const S=o(E),Q=o(B);r3(S,Q)||a.push([\"|RECORD=Track\",...C===void 0?[]:[`COMPONENT=${C}`],`LAYER=${y}`,\"LOCKED=FALSE\",`X1=${Xi(S.x)}`,`Y1=${Xi(S.y)}`,`X2=${Xi(Q.x)}`,`Y2=${Xi(Q.y)}`,`WIDTH=${Xi(Tu(f.stroke_width,.15)*sg)}`].join(\"|\"))}}a.push(...Oer({circuitJson:t,circuitToAltiumPcbPoint:o,componentIndex:p}));for(const f of Dd(t,\"pcb_silkscreen_text\"))a.push(Yer({altiumComponentIndex:p.get(ti(f.pcb_component_id)),circuitToAltiumPcbPoint:o,silkscreenText:f}));return`${a.join(`\\r\n`)}\\r\n`},Ver=/(?:^|\\|)RECORD=Region(?:\\||$)/iu,P1e=/\\|ISBOARDCUTOUT=TRUE(?=\\||$)/giu,MIn=\"/ShapeBasedRegions6/Data\",zer=11,DIn=18,NIn=22,M1e=new TextEncoder().encode(\"|ISBOARDCUTOUT=TRUE\");function RIn(t){const{cutoutRegionIndexes:e,source:n}=Jer(t),o=LZi(n);if(e.size===0)return o;const i=A9.read(o,{type:\"buffer\"}),r=A9.find(i,MIn);if(!r)throw new Error(`Altium PCB is missing ${MIn}`);const s=Wer(Uint8Array.from(r.content),e);if(s.count!==e.size)throw new Error(`Expected to mark ${e.size} Altium board-cutout regions, marked ${s.count}`);return r.content=s.stream,r.size=s.stream.byteLength,new Uint8Array(A9.write(i,{fileType:\"cfb\",type:\"buffer\"}))}function Jer(t){let e=0;const n=new Set,o=t.split(new RegExp(\"(?\u003c=\\\\n)\",\"u\")).map(i=\u003e{if(!Ver.test(i))return i;const r=e++;return P1e.test(i)?(P1e.lastIndex=0,n.add(r),i.replace(P1e,\"\")):i});return P1e.lastIndex=0,{cutoutRegionIndexes:n,source:o.join(\"\")}}function Wer(t,e){const n=new DataView(t.buffer,t.byteOffset,t.byteLength),o=[];let i=0,r=0,s=0;for(;i\u003ct.byteLength;){if(t.byteLength-i\u003c5)throw new Error(\"Truncated Altium region record header\");const c=n.getUint8(i),l=n.getUint32(i+1,!0),u=i+5,g=u+l;if(g\u003et.byteLength)throw new Error(\"Truncated Altium region record payload\");if(c!==zer)throw new Error(`Unexpected Altium region object ID ${c}`);const h=t.subarray(u,g),d=e.has(r)?jer(h,r):h;d!==h\u0026\u0026s++,o.push($er(c,d)),r++,i=g}const a=new Uint8Array(o.reduce((c,l)=\u003ec+l.byteLength,0));let A=0;for(const c of o)a.set(c,A),A+=c.byteLength;return{count:s,stream:a}}function jer(t,e){if(t.byteLength\u003cNIn)throw new Error(`Altium region ${e} has no property block`);const o=new DataView(t.buffer,t.byteOffset,t.byteLength).getUint32(DIn,!0),i=NIn+o;if(o\u003c1||i\u003et.byteLength)throw new Error(`Altium region ${e} has an invalid property block`);const r=i-1;if(t[r]!==0)throw new Error(`Altium region ${e} has an unterminated property block`);const s=new Uint8Array(t.byteLength+M1e.byteLength);return s.set(t.subarray(0,r),0),s.set(M1e,r),s.set(t.subarray(r),r+M1e.byteLength),new DataView(s.buffer).setUint32(DIn,o+M1e.byteLength,!0),s}function $er(t,e){const n=new Uint8Array(e.byteLength+5),o=new DataView(n.buffer);return o.setUint8(0,t),o.setUint32(1,e.byteLength,!0),n.set(e,5),n}const qer={Fill:\"Fills6\",Track:\"Tracks6\",Region:\"ShapeBasedRegions6\"};function Xer(t){const e=E1e(t,{mode:\"strict\"}),n=e.getRecordsByKind(\"Rule\");if(!n.length)return RIn(t);const o=t.split(/\\r?\\n/u).filter(a=\u003e!/^\\|RECORD=Rule\\|/u.test(a)).map(a=\u003ea.replace(/\\|UNIONINDEX=\\d+/gu,\"\")).join(`\\r\n`),i=A9.read(RIn(o),{type:\"buffer\"}),r=n.map(a=\u003e{if(a.get(\"RULEKIND\")!==\"Clearance\"||a.getNumber(\"BINARYRECORDTYPE\")!==0)throw new Error(\"Keepout rule serializer only supports native Clearance rules\");const A=a.getString().trim().replace(/\\|(?:RECORD|BINARYRECORDTYPE)=[^|]*/gu,\"\");if(/[^\\x20-\\x7e]/u.test(A))throw new Error(\"Keepout rule serialization requires ASCII query names\");const c=new TextEncoder().encode(`${A}\\0`),l=new Uint8Array(c.length+6);return new DataView(l.buffer).setUint32(2,c.length,!0),l.set(c,6),l}),s=new Uint8Array(4);new DataView(s.buffer).setUint32(0,n.length,!0),A9.utils.cfb_add(i,\"Rules6/Header\",s),A9.utils.cfb_add(i,\"Rules6/Data\",iZe(r));for(const[a,A]of Object.entries(qer)){const c=e.getRecordsByKind(a);if(!c.some(p=\u003ep.getNumber(\"UNIONINDEX\")!==void 0))continue;const l=A9.find(i,`/${A}/Data`);if(!l)throw new Error(`Missing Altium ${A} stream`);const u=Uint8Array.from(l.content),g=new DataView(u.buffer),h=[];let d=0;for(const p of c){if(d+5\u003eu.length)throw new Error(`Truncated ${A} header`);const m=g.getUint32(d+1,!0),_=d+5+m;if(_\u003eu.length)throw new Error(`Truncated ${A} record`);const f=p.getNumber(\"UNIONINDEX\"),I=u.slice(d+5,_),C=f===void 0?I:Zer(I,a,f),y=new Uint8Array(5+C.length);y[0]=u[d],new DataView(y.buffer).setUint32(1,C.length,!0),y.set(C,5),h.push(y),d=_}if(d!==u.length)throw new Error(`Unexpected trailing ${A} records`);l.content=iZe(h),l.size=l.content.length}return new Uint8Array(A9.write(i,{fileType:\"cfb\",type:\"buffer\"}))}function Zer(t,e,n){if(!Number.isInteger(n)||n\u003c=0||n\u003e4294967295)throw new Error(\"Invalid keepout union index\");if(e===\"Region\"){if(t.length\u003c22)throw new Error(\"Truncated region properties\");const s=new DataView(t.buffer).getUint32(18,!0);if(22+s\u003et.length)throw new Error(\"Truncated region property block\");const a=new TextDecoder().decode(t.subarray(22,22+s));if(!a.includes(\"UNIONINDEX=0\"))throw new Error(\"Missing region union field\");const A=new TextEncoder().encode(a.replace(\"UNIONINDEX=0\",`UNIONINDEX=${n}`)),c=iZe([t.subarray(0,22),A,t.subarray(22+s)]);return new DataView(c.buffer).setUint32(18,A.length,!0),c}const o=e===\"Track\"?35:37,i=e===\"Track\"?36:37;if(t.length!==o)throw new Error(`Unexpected ${e} binary layout`);const r=new Uint8Array(i+9);return r.set(t),new DataView(r.buffer).setUint32(i,n,!0),r}function iZe(t){const e=new Uint8Array(t.reduce((o,i)=\u003eo+i.length,0));let n=0;for(const o of t)e.set(o,n),n+=o.length;return e}class etr extends w1e{_step(){const e=Ker(this.input);this.context.pcb={asciiContent:e,content:Xer(e),filename:`${this.context.safeProjectName}.PcbDoc`},this.finished=!0}getOutput(){if(!this.context.pcb)throw new Error(\"PCB document stage has not finished\");return this.context.pcb}}class ttr extends w1e{_step(){if(!this.context.pcb||!this.context.schematics)throw new Error(\"PCB and schematic stages must finish before the project\");const e=[\"[Design]\",`ProjectName=${this.context.safeProjectName}`,\"\",...[{path:this.context.pcb.filename,kind:\"pcb-document\"},...this.context.schematics.map(({filename:n})=\u003e({path:n,kind:\"schematic-document\"}))].flatMap((n,o)=\u003e[`[Document${o+1}]`,`DocumentPath=${n.path}`,`DocumentKind=${n.kind}`,\"\"])].join(`\\r\n`);this.context.project={content:e,filename:`${this.context.safeProjectName}.PrjPcb`},this.finished=!0}getOutput(){if(!this.context.project)throw new Error(\"Project document stage has not finished\");return this.context.project}}const rZe={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const t in rZe)Object.freeze(rZe[t]);const $ee=Object.freeze(rZe),TIn=Object.create(null);for(const t in $ee)Object.hasOwn($ee,t)\u0026\u0026(TIn[$ee[t]]=t);const a3={to:{},get:{}};a3.get=function(t){const e=t.slice(0,3).toLowerCase();let n,o;switch(e){case\"hsl\":{n=a3.get.hsl(t),o=\"hsl\";break}case\"hwb\":{n=a3.get.hwb(t),o=\"hwb\";break}default:{n=a3.get.rgb(t),o=\"rgb\";break}}return n?{model:o,value:n}:null},a3.get.rgb=function(t){if(!t)return null;const e=/^#([a-f\\d]{3,4})$/i,n=/^#([a-f\\d]{6})([a-f\\d]{2})?$/i,o=/^rgba?\\(\\s*([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)(?=[\\s,])\\s*(?:,\\s*)?([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)(?=[\\s,])\\s*(?:,\\s*)?([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)\\s*(?:[\\s,|/]\\s*([+-]?(?:\\d*\\.)?\\d+(?:e\\d+)?)(%?)\\s*)?\\)$/i,i=/^rgba?\\(\\s*([+-]?[\\d.]+)%\\s*,?\\s*([+-]?[\\d.]+)%\\s*,?\\s*([+-]?[\\d.]+)%\\s*(?:[\\s,|/]\\s*([+-]?[\\d.]+)(%?)\\s*)?\\)$/i,r=/^(\\w+)$/;let s=[0,0,0,1],a,A,c;if(a=t.match(n)){for(c=a[2],a=a[1],A=0;A\u003c3;A++){const l=A*2;s[A]=Number.parseInt(a.slice(l,l+2),16)}c\u0026\u0026(s[3]=Number.parseInt(c,16)/255)}else if(a=t.match(e)){for(a=a[1],c=a[3],A=0;A\u003c3;A++)s[A]=Number.parseInt(a[A]+a[A],16);c\u0026\u0026(s[3]=Number.parseInt(c+c,16)/255)}else if(a=t.match(o)){for(A=0;A\u003c3;A++)s[A]=Number.parseFloat(a[A+1]);a[4]\u0026\u0026(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(i)){for(A=0;A\u003c3;A++)s[A]=Math.round(Number.parseFloat(a[A+1])*2.55);a[4]\u0026\u0026(s[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.toLowerCase().match(r))?a[1]===\"transparent\"?[0,0,0,0]:Object.hasOwn($ee,a[1])?(s=$ee[a[1]].slice(),s[3]=1,s):null:null;for(A=0;A\u003c3;A++)s[A]=AM(s[A],0,255);return s[3]=AM(s[3],0,1),s},a3.get.hsl=function(t){if(!t)return null;const e=/^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d.]+)%\\s*,?\\s*([+-]?[\\d.]+)%\\s*(?:[,|/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:e[+-]?\\d+)?)\\s*)?\\)$/i,n=t.match(e);if(n){const o=Number.parseFloat(n[4]),i=(Number.parseFloat(n[1])%360+360)%360,r=AM(Number.parseFloat(n[2]),0,100),s=AM(Number.parseFloat(n[3]),0,100),a=AM(Number.isNaN(o)?1:o,0,1);return[i,r,s,a]}return null},a3.get.hwb=function(t){if(!t)return null;const e=/^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*[\\s,]\\s*([+-]?[\\d.]+)%\\s*[\\s,]\\s*([+-]?[\\d.]+)%\\s*(?:[\\s,]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:e[+-]?\\d+)?)\\s*)?\\)$/i,n=t.match(e);if(n){const o=Number.parseFloat(n[4]),i=(Number.parseFloat(n[1])%360+360)%360,r=AM(Number.parseFloat(n[2]),0,100),s=AM(Number.parseFloat(n[3]),0,100),a=AM(Number.isNaN(o)?1:o,0,1);return[i,r,s,a]}return null},a3.to.hex=function(...t){return\"#\"+D1e(t[0])+D1e(t[1])+D1e(t[2])+(t[3]\u003c1?D1e(Math.round(t[3]*255)):\"\")},a3.to.rgb=function(...t){return t.length\u003c4||t[3]===1?\"rgb(\"+Math.round(t[0])+\", \"+Math.round(t[1])+\", \"+Math.round(t[2])+\")\":\"rgba(\"+Math.round(t[0])+\", \"+Math.round(t[1])+\", \"+Math.round(t[2])+\", \"+t[3]+\")\"},a3.to.rgb.percent=function(...t){const e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),o=Math.round(t[2]/255*100);return t.length\u003c4||t[3]===1?\"rgb(\"+e+\"%, \"+n+\"%, \"+o+\"%)\":\"rgba(\"+e+\"%, \"+n+\"%, \"+o+\"%, \"+t[3]+\")\"},a3.to.hsl=function(...t){return t.length\u003c4||t[3]===1?\"hsl(\"+t[0]+\", \"+t[1]+\"%, \"+t[2]+\"%)\":\"hsla(\"+t[0]+\", \"+t[1]+\"%, \"+t[2]+\"%, \"+t[3]+\")\"},a3.to.hwb=function(...t){let e=\"\";return t.length\u003e=4\u0026\u0026t[3]!==1\u0026\u0026(e=\", \"+t[3]),\"hwb(\"+t[0]+\", \"+t[1]+\"%, \"+t[2]+\"%\"+e+\")\"},a3.to.keyword=function(...t){return TIn[t.slice(0,3)]};function AM(t,e,n){return Math.min(Math.max(e,t),n)}function D1e(t){const e=Math.round(t).toString(16).toUpperCase();return e.length\u003c2?\"0\"+e:e}function qee({cssColor:t,fallbackAltiumColor:e}){const n=a3.get.rgb(t.trim());if(!n||n.length\u003c3)return e;const[o=0,i=0,r=0]=n.map(Math.round);return o|i\u003c\u003c8|r\u003c\u003c16}const b4=132,kIn=16317695,Xee=16777215;function OS(t,e){const n=Math.round(e*1e5);if(!Number.isSafeInteger(n))throw new RangeError(`Invalid schematic coordinate ${t}: ${e}`);const o=Math.trunc(n/1e5),i=n-o*1e5;return[`${t}=${o}`,...i===0?[]:[`${t}_FRAC=${i\u003c0?\"-\":\"\"}${String(Math.abs(i)).padStart(5,\"0\")}`]]}const ntr=16777215,FIn=16711680,otr=16,itr=8,ck=3,rtr=\"Times New Roman\",sZe=11;function str({hasInputArrow:t,hasOutputArrow:e}){return t\u0026\u0026e?3:t?1:e?2:0}function atr({altiumPortPosition:t,facingDirection:e,hasInputArrow:n,hasOutputArrow:o,portName:i}){const r=Math.max([...i].length*itr,otr);return[\"RECORD=18\",`LOCATION.X=${t.x}`,`LOCATION.Y=${t.y}`,`WIDTH=${r}`,`IOTYPE=${str({hasInputArrow:n,hasOutputArrow:o})}`,...e===\"up\"||e===\"down\"?[\"STYLE=4\"]:[],`NAME=${i}`,`FONTID=${ck}`,`COLOR=${FIn}`,`AREACOLOR=${ntr}`,`TEXTCOLOR=${FIn}`]}const N1e=20,Zee=4,LIn=\"Arial\",R1e=.18,HIn=.15,OIn=.2;function Atr({netLabelTextPresentations:t=[],schematicElements:e,templateFontFields:n=[]}){const o=new Map,i=new Map([[1,Zee],[2,Zee],[ck,sZe]]),r=sZe/N1e;o.set(r,ck);const s=e.some(d=\u003ed.type===\"schematic_net_label\"),a=[...new Set([...s?[R1e]:[],...e.flatMap(d=\u003e{const p=d.type===\"schematic_text\"?fr(d.font_size):0;return p\u003e0?[p]:[]})])].sort((d,p)=\u003ed-p),A=[];let c=ck+1;for(const d of a){if(o.has(d))continue;const p=c++;o.set(d,p),i.set(p,d*N1e),A.push(`SIZE${p}=${Sp(d*N1e)}`,`FONTNAME${p}=${LIn}`)}const l=new Map;for(const d of n){const p=c++;l.set(d.sourceFontId,p),A.push(...d.fields.map(m=\u003em.replace(/^(\\w+?)\\d+=/u,`$1${p}=`)))}const u=new Map(o),g=new Map([[Zee,1]]);for(const[d,p]of i)d\u003eck\u0026\u0026Number.isInteger(p)\u0026\u0026g.set(p,d);const h=[...e.flatMap(d=\u003ed.type===\"schematic_text\"\u0026\u0026(ti(d.schematic_component_id)||ti(d.source_trace_id))?[fr(d.font_size)]:[]),...s?[R1e]:[],...t.map(d=\u003efr(d.font_size)),...e.flatMap(d=\u003ed.type===\"schematic_port\"\u0026\u0026ti(d.schematic_component_id)?[OIn,Tu(d.display_pin_label_font_size,HIn)]:[])];for(const d of h){if(d\u003c=0)continue;const p=u.get(d);if(p!==void 0\u0026\u0026Number.isInteger(i.get(p)))continue;const m=Math.max(1,Math.ceil(Number(Sp(d*N1e))));let _=g.get(m);_===void 0\u0026\u0026(_=c++,g.set(m,_),i.set(_,m),A.push(`SIZE${_}=${m}`,`FONTNAME${_}=${LIn}`)),u.set(d,_)}return{nativeTextFontIdBySizeCircuitUnits:u,fontIdBySizeCircuitUnits:o,fontSizePointsById:i,sheetRecordFields:[`FONTIDCOUNT=${c-1}`,`SIZE1=${Zee}`,\"FONTNAME1=Arial\",`SIZE2=${Zee}`,\"FONTNAME2=Arial\",`SIZE${ck}=${sZe}`,`FONTNAME${ck}=${rtr}`,...A],templateFontIdBySourceFontId:l}}const ctr=[.278,.333,.408,.556,.556,.889,.778,.191,.333,.333,.5,.584,.278,.333,.278,.278,.556,.556,.556,.556,.556,.556,.556,.556,.556,.556,.278,.278,.584,.584,.584,.556,1.015,.722,.667,.722,.722,.667,.611,.778,.722,.333,.5,.722,.611,.889,.722,.778,.667,.778,.722,.667,.611,.722,.722,.944,.722,.722,.611,.333,.278,.333,.469,.556,.333,.556,.556,.5,.556,.556,.333,.556,.556,.278,.278,.5,.278,.833,.556,.556,.556,.556,.333,.5,.278,.556,.5,.722,.5,.5,.5,.48,.259,.48,.584];function ltr(t,e){return[...t].reduce((n,o)=\u003en+(ctr[o.codePointAt(0)-32]??1)*e,0)}const utr={bottom:1,bottom_left:0,bottom_center:1,bottom_right:2,left:3,center_left:3,center:4,center_right:5,right:5,top:7,top_left:6,top_center:7,top_right:8};function aZe(t){return utr[t]??0}function AZe(t){const e=(t%360+360)%360;return e===90||e===270?1:0}function cZe({circuitToAltiumSchematicPoint:t,fallbackAltiumColor:e,fallbackAltiumPosition:n,fallbackFontId:o,fallbackJustification:i,fontTable:r,schematicText:s}){const a=AA(s?.position),A=fr(s?.font_size);return{color:qee({cssColor:ti(s?.color),fallbackAltiumColor:e}),fontId:r.fontIdBySizeCircuitUnits.get(A)??o,justification:s?aZe(ti(s.anchor)):i,orientation:AZe(fr(s?.rotation)),position:a?t(a):n}}const GIn=2,gtr=132,dtr=10,YIn={bottom:{x:0,y:1},left:{x:1,y:0},right:{x:-1,y:0},top:{x:0,y:-1}},htr={bottom:{justification:3,orientation:1},left:{justification:3,orientation:0},right:{justification:5,orientation:0},top:{justification:5,orientation:1}},ptr={bottom:1,left:3,right:5,top:7},UIn={right:0,up:1,left:2,down:3},KIn={rail:2,ground:4};function mtr(t){return t in UIn}function _tr(t){return t in KIn}function ftr(t){return t in YIn}function lZe(t,e){const n=\"ABCDEFGHIJKLMNOPQRSTUVWXY\";let o=Math.max(Math.floor(t),0),i=\"\";for(let r=0;r\u003c4;r++)i=n[o%n.length]+i,o=Math.floor(o/n.length);return`CJN${e}${i}`}function Itr({altiumLabelCenter:t,altiumLabelPosition:e,anchorSide:n,fontSize:o,textFontSize:i,labelText:r}){if(!ftr(n))return;const s=YIn[n],a={x:t.x-e.x,y:t.y-e.y},A=a.x*s.x+a.y*s.y,c=o*.3,l=o*.5,u=o*.2,g=ltr(r,i),h=Math.max(A*2,l+g+u,dtr),d={x:-s.y,y:s.x},p=(f,I=0)=\u003e({x:e.x+s.x*f+d.x*I,y:e.y+s.y*f+d.y*I}),m=o*(.2/.18)/2,_=htr[n];return{orientation:_.orientation,outlinePoints:[p(0),p(c,m),p(h,m),p(h,-m),p(c,-m)],textJustification:_.justification,textPosition:p(l)}}function VIn(t){const e=t.lastIndexOf(\"_\");if(e\u003c1)return;const n=t.slice(0,e),o=t.slice(e+1);if(!(!_tr(n)||!mtr(o)))return{orientationIndex:UIn[o],styleIndex:KIn[n]}}function Ctr({anchorSide:t,altiumLabelCenter:e,altiumLabelPosition:n,decorationIndex:o,fontTable:i,labelText:r,symbolName:s,textPresentation:a}){const A=VIn(s),c=i.fontIdBySizeCircuitUnits.get(fr(a?.font_size))??(A?GIn:i.fontIdBySizeCircuitUnits.get(R1e)??GIn),l=A?c:i.nativeTextFontIdBySizeCircuitUnits.get(fr(a?.font_size))??i.nativeTextFontIdBySizeCircuitUnits.get(R1e)??c,u=qee({cssColor:ti(a?.color),fallbackAltiumColor:A?gtr:b4});if(A)return[[\"RECORD=17\",`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`FONTID=${l}`,`ORIENTATION=${A.orientationIndex}`,`STYLE=${A.styleIndex}`,`COLOR=${u}`,\"SHOWNETNAME=T\",`TEXT=${r}`]];const g=[\"RECORD=25\",`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`FONTID=${l}`,`ORIENTATION=${AZe(fr(a?.rotation))}`,`JUSTIFICATION=${a?aZe(ti(a.anchor)):ptr[t]??0}`,`COLOR=${u}`,`TEXT=${r}`];if(a\u0026\u0026r3(e,n))return[g];const h=Itr({altiumLabelCenter:e,altiumLabelPosition:n,anchorSide:t,fontSize:i.fontSizePointsById.get(c)??4,textFontSize:i.fontSizePointsById.get(l)??4,labelText:r});return h?[[\"RECORD=27\",\"LINEWIDTH=0\",\"LOCATIONCOUNT=2\",...OS(\"X1\",n.x),...OS(\"Y1\",n.y),...OS(\"X2\",h.textPosition.x),...OS(\"Y2\",h.textPosition.y),\"COLOR=34816\",`UNIQUEID=${lZe(o,\"W\")}`],[\"RECORD=7\",\"OWNERPARTID=-1\",\"LINEWIDTH=0\",`LOCATIONCOUNT=${h.outlinePoints.length}`,...h.outlinePoints.flatMap((d,p)=\u003e[...OS(`X${p+1}`,d.x),...OS(`Y${p+1}`,d.y)]),`COLOR=${u}`,`AREACOLOR=${kIn}`,\"ISSOLID=T\",`UNIQUEID=${lZe(o,\"P\")}`],[\"RECORD=25\",...OS(\"LOCATION.X\",h.textPosition.x),...OS(\"LOCATION.Y\",h.textPosition.y),`FONTID=${l}`,`ORIENTATION=${h.orientation}`,`JUSTIFICATION=${h.textJustification}`,`COLOR=${u}`,`TEXT=${r}`,`UNIQUEID=${lZe(o,\"T\")}`]]:[g]}const ytr=255;function zIn({altiumNoConnectPosition:t}){return[\"RECORD=22\",`LOCATION.X=${t.x}`,`LOCATION.Y=${t.y}`,\"ISACTIVE=T\",\"SYMBOL=Thin Cross\",\"ORIENTATION=1\",\"OWNERPARTID=-1\",`COLOR=${ytr}`,\"SUPPRESSALL=T\"]}const xtr=new Set([\"schematic_line\",\"schematic_path\",\"schematic_rect\",\"schematic_text\"]);function T1e(t){return xtr.has(t.type??\"\")\u0026\u0026!ti(t.schematic_component_id)\u0026\u0026!ti(t.schematic_symbol_id)}const Etr=20,k1e=3615007,JIn=16777215;function uZe(t){return Sp(Math.max(fr(t.stroke_width),0)*Etr)}function dK({annotation:t,colorFieldName:e,fallbackAltiumColor:n}){return qee({cssColor:ti(t[e]),fallbackAltiumColor:n})}function Btr({annotation:t,circuitToAltiumSchematicPoint:e,fontTable:n}){const o=j1n(ti(t.text)),i=AA(t.position),r=fr(t.font_size),s=n.fontIdBySizeCircuitUnits.get(r);if(!o||!i||!s)return;const a=e(i);return[\"RECORD=4\",`LOCATION.X=${a.x}`,`LOCATION.Y=${a.y}`,`FONTID=${s}`,`TEXT=${o}`,`COLOR=${dK({annotation:t,colorFieldName:\"color\",fallbackAltiumColor:k1e})}`,`ORIENTATION=${AZe(fr(t.rotation))}`,`JUSTIFICATION=${aZe(ti(t.anchor))}`]}function btr({annotation:t,circuitToAltiumSchematicPoint:e}){const n=AA(t.center),o=fr(t.width),i=fr(t.height);if(!n||o\u003c=0||i\u003c=0)return;const r=e({x:n.x-o/2,y:n.y-i/2}),s=e({x:n.x+o/2,y:n.y+i/2}),a=dK({annotation:t,colorFieldName:\"color\",fallbackAltiumColor:k1e}),A=t.is_filled===!0;return[\"RECORD=14\",`LOCATION.X=${r.x}`,`LOCATION.Y=${r.y}`,`CORNER.X=${s.x}`,`CORNER.Y=${s.y}`,`LINEWIDTH=${uZe(t)}`,`COLOR=${a}`,`AREACOLOR=${dK({annotation:t,colorFieldName:\"fill_color\",fallbackAltiumColor:A?a:JIn})}`,`ISSOLID=${A?\"T\":\"F\"}`]}function Str({annotation:t,circuitToAltiumSchematicPoint:e}){const n=e({x:fr(t.x1),y:fr(t.y1)}),o=e({x:fr(t.x2),y:fr(t.y2)});return[\"RECORD=13\",`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`CORNER.X=${o.x}`,`CORNER.Y=${o.y}`,`LINEWIDTH=${uZe(t)}`,`LINESTYLE=${t.is_dashed===!0?1:0}`,`COLOR=${dK({annotation:t,colorFieldName:\"color\",fallbackAltiumColor:k1e})}`]}function Qtr({annotation:t,circuitToAltiumSchematicPoint:e}){if(!Array.isArray(t.points))return;const n=t.points.flatMap(r=\u003e{const s=AA(r);return s?[s]:[]});if(n.length\u003c2)return;const o=n.map(e),i=t.is_filled===!0;return[`RECORD=${i?7:6}`,`LINEWIDTH=${uZe(t)}`,`LOCATIONCOUNT=${o.length}`,...o.flatMap((r,s)=\u003e[`X${s+1}=${r.x}`,`Y${s+1}=${r.y}`]),`COLOR=${dK({annotation:t,colorFieldName:\"stroke_color\",fallbackAltiumColor:k1e})}`,...i?[`AREACOLOR=${dK({annotation:t,colorFieldName:\"fill_color\",fallbackAltiumColor:JIn})}`,\"ISSOLID=T\"]:[]]}function WIn(t){if(T1e(t.annotation)){if(t.annotation.type===\"schematic_text\")return Btr(t);if(t.annotation.type===\"schematic_line\")return Str(t);if(t.annotation.type===\"schematic_rect\")return btr(t);if(t.annotation.type===\"schematic_path\")return Qtr(t)}}const vtr=10,wtr=10,Ptr=60,Mtr=160,gZe=132,jIn=12779519;function Dtr({childSheets:t,circuitJson:e}){const n=new Map(e.filter(o=\u003eo.type===\"source_port\").map(o=\u003e[ti(o.source_port_id),o]));return t.map(o=\u003e{const i=e.find(c=\u003ec.type===\"schematic_component\"\u0026\u0026c.is_schematic_group===!0\u0026\u0026!ti(c.schematic_sheet_id)\u0026\u0026o.subcircuitId!==void 0\u0026\u0026ti(c.subcircuit_id)===o.subcircuitId),r=e.filter(c=\u003ec.type===\"schematic_port\"\u0026\u0026ti(c.schematic_sheet_id)===o.schematicSheetId\u0026\u0026!ti(c.schematic_component_id)),s={0:0,1:0},a=r.flatMap(c=\u003e{const l=n.get(ti(c.source_port_id)),u=ti(c.display_pin_label)||ti(l?.name);if(!u)return[];const g=c.has_input_arrow===!0,h=c.has_output_arrow===!0,d=Ftr(c);return s[d]++,[{distanceFromTop:i?ktr({placementComponent:i,schematicPort:c}):s[d],doNotConnect:l?.do_not_connect===!0,ioType:g?h?3:1:h?2:0,name:u,side:d}]}),A=Math.max(o.name.length,o.filename.length,...a.map(c=\u003ec.name.length*2));return{childSheet:o,entries:a,height:Math.max(Ptr,Math.max(s[0],s[1])*vtr+20),placementComponent:i,width:Math.max(Mtr,A*6+20)}})}function Ntr({location:t,plan:e}){return e.entries.flatMap(n=\u003en.doNotConnect?[zIn({altiumNoConnectPosition:{x:t.x+(n.side===1?e.width:0),y:t.y-n.distanceFromTop*wtr}})]:[])}function Rtr({altiumSymbolRecordIndex:t,location:e,plan:n}){const{childSheet:o,entries:i}=n;return[[\"RECORD=32\",`OWNERINDEX=${t}`,\"OWNERPARTID=-1\",`LOCATION.X=${e.x}`,`LOCATION.Y=${e.y+10}`,\"COLOR=8388608\",\"FONTID=1\",`TEXT=${uu(o.name)}`],[\"RECORD=33\",`OWNERINDEX=${t}`,\"OWNERPARTID=-1\",`LOCATION.X=${e.x}`,`LOCATION.Y=${e.y}`,\"COLOR=8388608\",\"FONTID=1\",`TEXT=${uu(o.filename)}`],...i.map(r=\u003e[\"RECORD=16\",`OWNERINDEX=${t}`,\"OWNERPARTID=-1\",...r.side===1?[\"SIDE=1\"]:[],`DISTANCEFROMTOP=${r.distanceFromTop}`,`COLOR=${gZe}`,`AREACOLOR=${jIn}`,`TEXTCOLOR=${gZe}`,\"TEXTFONTID=1\",\"TEXTSTYLE=Full\",`NAME=${uu(r.name)}`,`IOTYPE=${r.ioType}`,\"ARROWKIND=Block \u0026 Triangle\"])]}function Ttr({location:t,plan:e}){return[\"RECORD=15\",\"OWNERPARTID=-1\",`LOCATION.X=${t.x}`,`LOCATION.Y=${t.y}`,`XSIZE=${e.width}`,`YSIZE=${e.height}`,`COLOR=${gZe}`,`AREACOLOR=${jIn}`,\"ISSOLID=T\",`UNIQUEID=${uu(e.childSheet.schematicSheetId)}`,\"SYMBOLTYPE=Normal\"]}function ktr({placementComponent:t,schematicPort:e}){const n=AA(t.center),o=AA(e.center),i=HE(t.size)?t.size:void 0;if(!n||!o||!i)return 0;const r=n.y+fr(i.height)/2;return Math.max(Math.round((r-o.y)*2),0)}function Ftr(t){const e=ti(t.facing_direction);return e===\"right\"?1:e===\"left\"?0:t.has_output_arrow===!0\u0026\u0026t.has_input_arrow!==!0?1:0}function Ltr({graphicPrimitive:t,symbolMapping:e}){return t.type===\"path\"?Htr({pathPrimitive:t,symbolMapping:e}):t.type===\"circle\"?Otr({circlePrimitive:t,symbolMapping:e}):Gtr({boxPrimitive:t,symbolMapping:e})}function Htr({pathPrimitive:t,symbolMapping:e}){const n=t.points.map(r=\u003eUtr({symbolMapping:e,symbolPoint:r})),o=n[0],i=n.at(-1);return t.closed\u0026\u0026o\u0026\u0026i\u0026\u0026!r3(o,i)\u0026\u0026n.push(o),[`RECORD=${t.fill?7:6}`,...ete(e.altiumComponentRecordIndex),\"LINEWIDTH=1\",`LOCATIONCOUNT=${n.length}`,...n.flatMap((r,s)=\u003e[...qIn(`X${s+1}`,r.x),...qIn(`Y${s+1}`,r.y)]),`COLOR=${b4}`,...t.fill?[`AREACOLOR=${b4}`,\"ISSOLID=T\"]:[]]}const $In=5,dZe=10**$In;function qIn(t,e){const n=Math.round(e*dZe)/dZe,o=Math.trunc(n),i=Math.round(Math.abs(n-o)*dZe);return[`${t}=${o}`,...i\u003e0?[`${t}_FRAC=${String(i).padStart($In,\"0\")}`]:[]]}function Otr({circlePrimitive:t,symbolMapping:e}){const n=lk({symbolMapping:e,symbolPoint:{x:t.x,y:t.y}}),o=lk({symbolMapping:e,symbolPoint:{x:t.x+t.radius,y:t.y}}),i=Math.max(1,Math.abs(o.x-n.x));return[\"RECORD=8\",...ete(e.altiumComponentRecordIndex),`LOCATION.X=${n.x}`,`LOCATION.Y=${n.y}`,`RADIUS=${i}`,`SECONDARYRADIUS=${i}`,\"LINEWIDTH=1\",`COLOR=${b4}`,`AREACOLOR=${t.fill?b4:Xee}`,`ISSOLID=${t.fill?\"T\":\"F\"}`]}function Gtr({boxPrimitive:t,symbolMapping:e}){const n=Ytr(t),o=lk({symbolMapping:e,symbolPoint:{x:n.x-t.width/2,y:n.y-t.height/2}}),i=lk({symbolMapping:e,symbolPoint:{x:n.x+t.width/2,y:n.y+t.height/2}});return[\"RECORD=14\",...ete(e.altiumComponentRecordIndex),`LOCATION.X=${o.x}`,`LOCATION.Y=${o.y}`,`CORNER.X=${i.x}`,`CORNER.Y=${i.y}`,\"LINEWIDTH=1\",`COLOR=${b4}`,`AREACOLOR=${Xee}`,\"ISSOLID=F\"]}function Ytr(t){const e=t.anchor.endsWith(\"_left\")?t.width/2:t.anchor.endsWith(\"_right\")?-t.width/2:0,n=t.anchor.startsWith(\"top_\")?-t.height/2:t.anchor.startsWith(\"bottom_\")?t.height/2:0;return{x:t.x+e,y:t.y+n}}function lk({symbolMapping:t,symbolPoint:e}){const n=Bn(t.symbolToCircuitMatrix,e);return t.circuitToAltiumSchematicPoint(n)}function Utr({symbolMapping:t,symbolPoint:e}){const n=Bn(t.symbolToCircuitMatrix,e);return t.circuitToAltiumSchematicPrecisePoint(n)}function ete(t){return[`OWNERINDEX=${t}`,\"OWNERPARTID=1\",\"OWNERPARTDISPLAYMODE=0\"]}const Ktr=3615007;function XIn({altiumComponentRecordIndex:t,circuitToAltiumSchematicPoint:e,fontTable:n,schematicText:o}){const i=uu(ti(o.text));if(!i)return;const r=cZe({circuitToAltiumSchematicPoint:e,fallbackAltiumColor:Ktr,fallbackAltiumPosition:{x:0,y:0},fallbackFontId:2,fallbackJustification:0,fontTable:n,schematicText:o});return[\"RECORD=4\",`OWNERINDEX=${t}`,\"OWNERPARTID=1\",`LOCATION.X=${r.position.x}`,`LOCATION.Y=${r.position.y}`,`FONTID=${r.fontId}`,`TEXT=${i}`,`COLOR=${r.color}`,`ORIENTATION=${r.orientation}`,`JUSTIFICATION=${r.justification}`]}const Vtr=new Set([\"schematic_arc\",\"schematic_circle\",\"schematic_line\",\"schematic_path\",\"schematic_rect\"]);function F1e(t){return Vtr.has(t.type??\"\")||t.type===\"schematic_text\"\u0026\u0026typeof t.schematic_symbol_id==\"string\"\u0026\u0026t.schematic_symbol_id.length\u003e0}function ztr({circuitToAltiumSchematicLength:t,graphic:e}){return Sp(Math.max(1,t(Math.max(fr(e.stroke_width),0))))}function cM({colorFieldName:t,fallbackAltiumColor:e,graphic:n}){return qee({cssColor:ti(n[t]),fallbackAltiumColor:e})}function tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:n}){return[...ete(t),`LINEWIDTH=${ztr({circuitToAltiumSchematicLength:e,graphic:n})}`,`LINESTYLE=${n.is_dashed===!0?1:0}`]}function L1e({circuitToAltiumSchematicLength:t,radius:e}){return Math.max(1,t(e))}function Jtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){if(!Array.isArray(o.points))return;const i=o.points.flatMap(a=\u003e{const A=AA(a);return A?[A]:[]});if(i.length\u003c2)return;const r=i.map(n),s=o.is_filled===!0;return[`RECORD=${s?7:6}`,...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATIONCOUNT=${r.length}`,...r.flatMap((a,A)=\u003e[`X${A+1}=${a.x}`,`Y${A+1}=${a.y}`]),`COLOR=${cM({graphic:o,colorFieldName:\"stroke_color\",fallbackAltiumColor:b4})}`,...s?[`AREACOLOR=${cM({graphic:o,colorFieldName:\"fill_color\",fallbackAltiumColor:Xee})}`,\"ISSOLID=T\"]:[]]}function Wtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=AA(o.center),r=fr(o.radius);if(!i||r\u003c=0)return;const s=n(i),a=o.is_filled===!0;return[\"RECORD=8\",...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${s.x}`,`LOCATION.Y=${s.y}`,`RADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:r}))}`,`SECONDARYRADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:r}))}`,`COLOR=${cM({graphic:o,colorFieldName:\"color\",fallbackAltiumColor:b4})}`,`AREACOLOR=${cM({graphic:o,colorFieldName:\"fill_color\",fallbackAltiumColor:Xee})}`,`ISSOLID=${a?\"T\":\"F\"}`]}function jtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=AA(o.center),r=fr(o.radius);if(!i||r\u003c=0)return;const s=n(i),a=fr(o.start_angle_degrees),A=fr(o.end_angle_degrees),c=ti(o.direction)===\"clockwise\",l=fr(o.altium_secondary_radius),u=l\u003e0;return[`RECORD=${u?11:12}`,...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${s.x}`,`LOCATION.Y=${s.y}`,`RADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:r}))}`,...u?[`SECONDARYRADIUS=${Sp(L1e({circuitToAltiumSchematicLength:e,radius:l}))}`]:[],`STARTANGLE=${Sp(c?A:a)}`,`ENDANGLE=${Sp(c?a:A)}`,`COLOR=${cM({graphic:o,colorFieldName:\"color\",fallbackAltiumColor:b4})}`]}function $tr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=n({x:fr(o.x1),y:fr(o.y1)}),r=n({x:fr(o.x2),y:fr(o.y2)});return[\"RECORD=13\",...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${i.x}`,`LOCATION.Y=${i.y}`,`CORNER.X=${r.x}`,`CORNER.Y=${r.y}`,`COLOR=${cM({graphic:o,colorFieldName:\"color\",fallbackAltiumColor:b4})}`]}function qtr({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,circuitToAltiumSchematicPoint:n,graphic:o}){const i=AA(o.center),r=fr(o.width),s=fr(o.height),a=(fr(o.rotation)%360+360)%360;if(!i||r\u003c=0||s\u003c=0||a!==0)return;const A=n({x:i.x-r/2,y:i.y-s/2}),c=n({x:i.x+r/2,y:i.y+s/2}),l=o.is_filled===!0,u=cM({graphic:o,colorFieldName:\"color\",fallbackAltiumColor:b4});return[\"RECORD=14\",...tte({altiumComponentRecordIndex:t,circuitToAltiumSchematicLength:e,graphic:o}),`LOCATION.X=${A.x}`,`LOCATION.Y=${A.y}`,`CORNER.X=${c.x}`,`CORNER.Y=${c.y}`,`COLOR=${u}`,`AREACOLOR=${cM({graphic:o,colorFieldName:\"fill_color\",fallbackAltiumColor:l?u:Xee})}`,`ISSOLID=${l?\"T\":\"F\"}`]}function Xtr(t){if(F1e(t.graphic)){if(t.graphic.type===\"schematic_text\")return XIn({altiumComponentRecordIndex:t.altiumComponentRecordIndex,circuitToAltiumSchematicPoint:t.circuitToAltiumSchematicPoint,fontTable:t.fontTable,schematicText:t.graphic});if(t.graphic.type===\"schematic_path\")return Jtr(t);if(t.graphic.type===\"schematic_circle\")return Wtr(t);if(t.graphic.type===\"schematic_arc\")return jtr(t);if(t.graphic.type===\"schematic_line\")return $tr(t);if(t.graphic.type===\"schematic_rect\")return qtr(t)}}function GE(t,e){return Array.isArray(e)?[t.a*e[0]+t.c*e[1]+t.e,t.b*e[0]+t.d*e[1]+t.f]:{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function ZIn(t){return typeof t\u003e\"u\"}function eCn(t,e=0){return{a:1,c:0,e:t,b:0,d:1,f:e}}function H1e(...t){t=Array.isArray(t[0])?t[0]:t;let e=(n,o)=\u003e({a:n.a*o.a+n.c*o.b,c:n.a*o.c+n.c*o.d,e:n.a*o.e+n.c*o.f+n.e,b:n.b*o.a+n.d*o.b,d:n.b*o.c+n.d*o.d,f:n.b*o.e+n.d*o.f+n.f});switch(t.length){case 0:throw new Error(\"no matrices provided\");case 1:return t[0];case 2:return e(t[0],t[1]);default:{let[n,o,...i]=t,r=e(n,o);return H1e(r,...i)}}}var{cos:Ztr,sin:enr}=Math;function tnr(t,e,n){let o=Ztr(t),i=enr(t),r={a:o,c:-i,e:0,b:i,d:o,f:0};return ZIn(e)||ZIn(n)?r:H1e([eCn(e,n),r,eCn(-e,-n)])}function nnr(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function O1e(t,e,n,o){var i=Error.call(this,t);return Object.setPrototypeOf\u0026\u0026Object.setPrototypeOf(i,O1e.prototype),i.expected=e,i.found=n,i.location=o,i.name=\"SyntaxError\",i}nnr(O1e,Error);function hZe(t,e,n){return n=n||\" \",t.length\u003ee?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}O1e.prototype.format=function(t){var e=\"Error: \"+this.message;if(this.location){var n=null,o;for(o=0;o\u003ct.length;o++)if(t[o].source===this.location.source){n=t[o].text.split(/\\r\\n|\\n|\\r/g);break}var i=this.location.start,r=this.location.source\u0026\u0026typeof this.location.source.offset==\"function\"?this.location.source.offset(i):i,s=this.location.source+\":\"+r.line+\":\"+r.column;if(n){var a=this.location.end,A=hZe(\"\",r.line.toString().length,\" \"),c=n[i.line-1],l=i.line===a.line?a.column:c.length+1,u=l-i.column||1;e+=`\n --\u003e `+s+`\n`+A+` |\n`+r.line+\" | \"+c+`\n`+A+\" | \"+hZe(\"\",i.column-1,\" \")+hZe(\"\",u,\"^\")}else e+=`\n at `+s}return e},O1e.buildMessage=function(t,e){var n={literal:function(c){return'\"'+i(c.text)+'\"'},class:function(c){var l=c.parts.map(function(u){return Array.isArray(u)?r(u[0])+\"-\"+r(u[1]):r(u)});return\"[\"+(c.inverted?\"^\":\"\")+l.join(\"\")+\"]\"},any:function(){return\"any character\"},end:function(){return\"end of input\"},other:function(c){return c.description}};function o(c){return c.charCodeAt(0).toString(16).toUpperCase()}function i(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function r(c){return c.replace(/\\\\/g,\"\\\\\\\\\").replace(/\\]/g,\"\\\\]\").replace(/\\^/g,\"\\\\^\").replace(/-/g,\"\\\\-\").replace(/\\0/g,\"\\\\0\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x0F]/g,function(l){return\"\\\\x0\"+o(l)}).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g,function(l){return\"\\\\x\"+o(l)})}function s(c){return n[c.type](c)}function a(c){var l=c.map(s),u,g;if(l.sort(),l.length\u003e0){for(u=1,g=1;u\u003cl.length;u++)l[u-1]!==l[u]\u0026\u0026(l[g]=l[u],g++);l.length=g}switch(l.length){case 1:return l[0];case 2:return l[0]+\" or \"+l[1];default:return l.slice(0,-1).join(\", \")+\", or \"+l[l.length-1]}}function A(c){return c?'\"'+i(c)+'\"':\"end of input\"}return\"Expected \"+a(t)+\" but \"+A(e)+\" found.\"};function GS(t){if(t.length===0)return{minX:0,maxX:0,minY:0,maxY:0};let e=1/0,n=-1/0,o=1/0,i=-1/0,r=s=\u003e{e=Math.min(e,s.x),n=Math.max(n,s.x),o=Math.min(o,s.y),i=Math.max(i,s.y)};return t.forEach(s=\u003e{switch(s.type){case\"path\":s.points.forEach(r);break;case\"text\":r({x:s.x,y:s.y});break;case\"circle\":{let{x:a,y:A,radius:c}=s;r({x:a-c,y:A-c}),r({x:a+c,y:A+c});break}case\"box\":{let{x:a,y:A,width:c,height:l}=s,u=c/2,g=l/2;r({x:a-u,y:A-g}),r({x:a+u,y:A+g});break}}}),{minX:e,maxX:n,minY:o,maxY:i}}var onr=(t,e=\"right\")=\u003e{switch(e){case\"down\":switch(t){case\"middle_top\":return\"middle_right\";case\"middle_bottom\":return\"middle_left\";case\"middle_left\":return\"middle_bottom\";case\"middle_right\":return\"middle_top\"}break;case\"up\":switch(t){case\"middle_top\":return\"middle_left\";case\"middle_bottom\":return\"middle_right\";case\"middle_left\":return\"middle_top\";case\"middle_right\":return\"middle_bottom\"}break;case\"left\":switch(t){case\"middle_top\":return\"middle_bottom\";case\"middle_bottom\":return\"middle_top\";case\"middle_left\":return\"middle_right\";case\"middle_right\":return\"middle_left\"}break;case\"right\":return t}return t},hK=(t,e)=\u003e{let{primitives:n,center:o,ports:i,size:r}=t,s=H1e({a:1,b:0,c:0,d:-1,e:0,f:2*o.y}),a=n.map(c=\u003e{switch(c={...c},c.type){case\"path\":return{...c,points:c.points.map(h=\u003eGE(s,h))};case\"text\":let l=GE(s,{x:c.x,y:c.y}),u={top_left:\"bottom_left\",top_right:\"bottom_right\",bottom_left:\"top_left\",bottom_right:\"top_right\",center:\"center\",middle_top:\"middle_bottom\",middle_bottom:\"middle_top\",middle_left:\"middle_left\",middle_right:\"middle_right\"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case\"circle\":case\"box\":let g=GE(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=\u003e({...c,...GE(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},pK=(t,e)=\u003e{let{primitives:n,center:o,ports:i,size:r}=t,s=H1e({a:-1,b:0,c:0,d:1,e:0,f:2*o.x}),a=n.map(c=\u003e{switch(c={...c},c.type){case\"path\":return{...c,points:c.points.map(h=\u003eGE(s,h))};case\"text\":let l=GE(s,{x:c.x,y:c.y}),u={top_left:\"top_right\",top_right:\"top_left\",bottom_left:\"bottom_right\",bottom_right:\"bottom_left\",center:\"center\",middle_top:\"middle_top\",middle_bottom:\"middle_bottom\",middle_left:\"middle_right\",middle_right:\"middle_left\"};return{...c,x:l.x,y:l.y,anchor:u[c.anchor]};case\"circle\":case\"box\":let g=GE(s,{x:c.x,y:c.y});return{...c,x:g.x,y:g.y}}}),A=i.map(c=\u003e({...c,...GE(s,c)}));return{primitives:a,center:o,ports:A,size:r,...e}},nte=(t,e)=\u003e{let{newOrientation:n,overrides:o}=e,i={up:Math.PI/2,right:0,down:-Math.PI/2,left:-Math.PI},r=tnr(n?i[n]:Math.PI/2,t.center.x,t.center.y),{primitives:s,center:a,size:A,ports:c}=t,l=s.map(h=\u003e{switch(h={...h},h.type){case\"path\":return{...h,points:h.points.map(_=\u003eGE(r,_))};case\"text\":let d=GE(r,{x:h.x,y:h.y});return h.anchor=onr(h.anchor,n??\"right\"),{...h,x:d.x,y:d.y};case\"circle\":let p=GE(r,{x:h.x,y:h.y});return{...h,x:p.x,y:p.y};case\"box\":let m=GE(r,{x:h.x,y:h.y});return{...h,x:m.x,y:m.y,width:h.height,height:h.width}}}),u=c.map(h=\u003e({...h,...GE(r,h)})),g=GS(l);return{primitives:l,center:a,ports:u,size:{width:g.maxX-g.minX,height:g.maxY-g.minY},...o}},si=(t,e=\"down\",n={})=\u003ente(t,{newOrientation:e,overrides:n}),inr=class{symbol;constructor(t){this.symbol=JSON.parse(JSON.stringify(t)),this.symbol.size=this.computeSize()}changeTextAnchor(t,e,n){return this.symbol={...this.symbol,primitives:this.symbol.primitives.map(o=\u003eo.type===\"text\"\u0026\u0026o.text===t?{...o,anchor:e,...n?{x:o.x+n.x,y:o.y+n.y}:{}}:o)},this}labelPort(t,e){return this.symbol={...this.symbol,ports:this.symbol.ports.map(n=\u003en.labels.includes(t)?{...n,labels:e}:n)},this}rotateRightFacingSymbol(t){return this.symbol=nte(this.symbol,{newOrientation:t}),this}computeSize(){let t=GS(this.symbol.primitives);return{width:t.maxX-t.minX,height:t.maxY-t.minY}}build(){return{...this.symbol,size:this.computeSize()}}},Ln=t=\u003e{let e=t.primitives??[...Object.values(t.paths??{}),...Object.values(t.texts??{}),...Object.values(t.circles??{}),...Object.values(t.rects??{})],n=t.ports??Object.entries(t.refblocks).flatMap(([i,r])=\u003e[{...r,labels:[i]}]),o=t.center??{x:t.bounds.centerX,y:t.bounds.centerY};return n.length===2\u0026\u0026(o={x:(n[0].x+n[1].x)/2,y:(n[0].y+n[1].y)/2}),new inr({...t,primitives:e,ports:n,center:o})},mK={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:\"primary\",fill:!1},path17:{type:\"path\",points:[{x:0,y:-.13},{x:.07,y:-.11}],color:\"primary\",fill:!1},path18:{type:\"path\",points:[{x:.07,y:-.11},{x:.14,y:-.13}],color:\"primary\",fill:!1},path19:{type:\"path\",points:[{x:-.15,y:-.13},{x:-.07,y:-.11}],color:\"primary\",fill:!1},path20:{type:\"path\",points:[{x:-.07,y:-.11},{x:0,y:-.13}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:rnr,bounds:G1e,refblocks:tCn,circles:snr}=mK,anr=Ln({primitives:[...Object.values(rnr),...Object.values(snr),{type:\"text\",text:\"{REF}\",x:-.15,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3894553499999995}],ports:[{...tCn.left1,labels:[\"1\"]},{...tCn.right1,labels:[\"2\"]}],size:{width:G1e.width,height:G1e.height},center:{x:G1e.centerX,y:G1e.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Anr,bounds:Y1e,refblocks:nCn,circles:cnr}=mK,lnr=Ln({primitives:[...Object.values(Anr),...Object.values(cnr),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{...nCn.left1,labels:[\"1\"]},{...nCn.right1,labels:[\"2\"]}],size:{width:Y1e.width,height:Y1e.height},center:{x:Y1e.centerX,y:Y1e.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:unr,bounds:U1e,refblocks:oCn,circles:gnr}=mK,dnr=Ln({primitives:[...Object.values(unr),...Object.values(gnr),{type:\"text\",text:\"{REF}\",x:-0,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.4094553499999995}],ports:[{...oCn.left1,labels:[\"1\"]},{...oCn.right1,labels:[\"2\"]}],size:{width:U1e.width,height:U1e.height},center:{x:U1e.centerX,y:U1e.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:hnr,bounds:K1e,refblocks:iCn,circles:pnr}=mK,mnr=Ln({primitives:[...Object.values(hnr),...Object.values(pnr),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{...iCn.left1,labels:[\"1\"]},{...iCn.right1,labels:[\"2\"]}],size:{width:K1e.width,height:K1e.height},center:{x:K1e.centerX,y:K1e.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:_nr,bounds:V1e,refblocks:rCn,circles:fnr}=mK,Inr=Ln({primitives:[...Object.values(_nr),...Object.values(fnr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...rCn.left1,labels:[\"1\"]},{...rCn.right1,labels:[\"2\"]}],size:{width:V1e.width,height:V1e.height},center:{x:V1e.centerX,y:V1e.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Cnr,bounds:z1e,refblocks:sCn,circles:ynr}=mK,xnr=Ln({primitives:[...Object.values(Cnr),...Object.values(ynr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...sCn.left1,labels:[\"1\"]},{...sCn.right1,labels:[\"2\"]}],size:{width:z1e.width,height:z1e.height},center:{x:z1e.centerX,y:z1e.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),_K={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.14,y:.18},{x:.08,y:.2}],color:\"primary\",fill:!1},\"path43-8-3\":{type:\"path\",points:[{x:.21,y:-.11},{x:.15,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:Enr,texts:Vmr,bounds:J1e,refblocks:aCn,circles:Bnr}=_K,bnr=Ln({primitives:[...Object.values(Enr),...Object.values(Bnr),{type:\"text\",text:\"{REF}\",x:-.15,y:.3294553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3294553499999995}],ports:[{...aCn.left1,labels:[\"1\"]},{...aCn.right1,labels:[\"2\"]}],size:{width:J1e.width,height:J1e.height},center:{x:J1e.centerX,y:J1e.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Snr=Ln(_K).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Qnr,texts:zmr,bounds:W1e,refblocks:ACn,circles:vnr}=_K,wnr=Ln({primitives:[...Object.values(Qnr),...Object.values(vnr),{type:\"text\",text:\"{REF}\",x:-0,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.3294553499999995}],ports:[{...ACn.left1,labels:[\"1\"]},{...ACn.right1,labels:[\"2\"]}],size:{width:W1e.width,height:W1e.height},center:{x:W1e.centerX,y:W1e.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Pnr=Ln(_K).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Mnr,texts:Jmr,bounds:j1e,refblocks:cCn,circles:Dnr}=_K,Nnr=Ln({primitives:[...Object.values(Mnr),...Object.values(Dnr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2294553499999995}],ports:[{...cCn.left1,labels:[\"1\"]},{...cCn.right1,labels:[\"2\"]}],size:{width:j1e.width,height:j1e.height},center:{x:j1e.centerX,y:j1e.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Rnr,texts:Wmr,bounds:$1e,refblocks:lCn,circles:Tnr}=_K,knr=Ln({primitives:[...Object.values(Rnr),...Object.values(Tnr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2294553499999995}],ports:[{...lCn.left1,labels:[\"1\"]},{...lCn.right1,labels:[\"2\"]}],size:{width:$1e.width,height:$1e.height},center:{x:$1e.centerX,y:$1e.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),pZe={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:.14,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.18,y:.18},{x:.11,y:.18}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.18,y:-.09},{x:.11,y:-.09}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:Fnr,bounds:q1e,refblocks:uCn,circles:Lnr}=pZe,Hnr=Ln({primitives:[...Object.values(Fnr),...Object.values(Lnr),{type:\"text\",text:\"{REF}\",x:-.16,y:.2294553499999995},{type:\"text\",text:\"{VAL}\",x:.16,y:.2294553499999995}],ports:[{...uCn.left1,labels:[\"1\"]},{...uCn.right1,labels:[\"2\"]}],size:{width:q1e.width,height:q1e.height},center:{x:q1e.centerX,y:q1e.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:Onr,bounds:X1e,refblocks:gCn,circles:Gnr}=pZe,dCn=Ln({primitives:[...Object.values(Onr),...Object.values(Gnr),{type:\"text\",text:\"{REF}\",x:-1118e-7,y:-.18},{type:\"text\",text:\"{VAL}\",x:1118e-7,y:.2738453}],ports:[{...gCn.left1,labels:[\"1\"]},{...gCn.right1,labels:[\"2\"]}],size:{width:X1e.width,height:X1e.height},center:{x:X1e.centerX,y:X1e.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\"]).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Ynr,bounds:Z1e,refblocks:hCn,circles:Unr}=pZe,Knr=Ln({primitives:[...Object.values(Ynr),...Object.values(Unr),{type:\"text\",text:\"{REF}\",x:-.0050250999999996715,y:.27384529999999985,anchor:\"middle_left\"},{type:\"text\",text:\"{VAL}\",x:-.00011179999999999524,y:-.27384530000000007,anchor:\"middle_left\"}],ports:[{...hCn.left1,labels:[\"1\"]},{...hCn.right1,labels:[\"2\"]}],size:{width:Z1e.width,height:Z1e.height},center:{x:Z1e.centerX,y:Z1e.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"right1\",[\"2\"]).labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),mZe=si(dCn,\"down\"),_Ze=mZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),fZe=mZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");_Ze.anchor=\"middle_left\",fZe.anchor=\"middle_left\",_Ze.x=.25,_Ze.y+=.21,fZe.y-=.21,fZe.x=.25;var Vnr=mZe,ote={paths:{path43:{type:\"path\",points:[{x:-.06,y:.19},{x:-.06,y:-.12}],color:\"primary\",fill:!1},\"path43-6\":{type:\"path\",points:[{x:.02,y:.13},{x:.02,y:-.06}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.06,y:.03},{x:-.5,y:.03}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.5,y:.03},{x:.03,y:.03}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.03,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.28}},refblocks:{left1:{x:-.5,y:.03},right1:{x:.5,y:.03}},bounds:{width:1,height:.29,centerX:0,centerY:.06},circles:{}},{paths:znr,bounds:pCn,refblocks:mCn,circles:Jnr}=ote,Wnr=Ln({primitives:[...Object.values(znr),...Object.values(Jnr),{type:\"text\",text:\"{REF}\",x:-.2,y:.31},{type:\"text\",text:\"{VAL}\",x:.2,y:.31}],ports:[{...mCn.left1,labels:[\"1\"]},{...mCn.right1,labels:[\"2\"]}],center:{x:pCn.centerX,y:pCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_left\").build(),jnr={...Wnr,size:{width:1,height:.9}};function Gl(t){let e=t.size;if(!e){let n=GS(t.primitives);e={width:n.maxX-n.minX,height:n.maxY-n.minY}}return{...t,size:e}}var{paths:$nr,texts:_Cn,bounds:eIe,refblocks:fCn,circles:qnr}=ote,ICn=Gl({primitives:[...Object.values($nr),...Object.values(qnr),{..._Cn.top1,anchor:\"middle_bottom\"},{..._Cn.bottom1,anchor:\"middle_top\"}],ports:[{...fCn.left1,labels:[\"1\"]},{...fCn.right1,labels:[\"2\"]}],size:{width:eIe.width,height:eIe.height},center:{x:eIe.centerX,y:eIe.centerY}}),{paths:Xnr,bounds:CCn,refblocks:yCn,circles:Znr}=ote,eor=Ln({primitives:[...Object.values(Xnr),...Object.values(Znr),{type:\"text\",text:\"{REF}\",x:0,y:-.22},{type:\"text\",text:\"{VAL}\",x:0,y:.28}],ports:[{...yCn.left1,labels:[\"1\"]},{...yCn.right1,labels:[\"2\"]}],center:{x:CCn.centerX,y:CCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),tor={...eor,size:{width:1,height:.65}},{paths:nor,bounds:xCn,refblocks:ECn,circles:oor}=ote,ior=Ln({primitives:[...Object.values(nor),...Object.values(oor),{type:\"text\",text:\"{REF}\",x:0,y:.28},{type:\"text\",text:\"{VAL}\",x:0,y:-.22}],ports:[{...ECn.left1,labels:[\"1\"]},{...ECn.right1,labels:[\"2\"]}],center:{x:xCn.centerX,y:xCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),ror={...ior,size:{width:1,height:.65}},{paths:sor,bounds:BCn,refblocks:bCn,circles:aor}=ote,Aor=Ln({primitives:[...Object.values(sor),...Object.values(aor),{type:\"text\",text:\"{REF}\",x:.2,y:-.25},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.25}],ports:[{...bCn.left1,labels:[\"1\"]},{...bCn.right1,labels:[\"2\"]}],center:{x:BCn.centerX,y:BCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_left\").build(),cor={...Aor,size:{width:1,height:.9}},lor=nte(ICn,{newOrientation:\"up\"}),tIe={paths:{path1:{type:\"path\",points:[{x:-.3,y:0},{x:-.19998,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path2:{type:\"path\",points:[{x:.19998,y:0},{x:.3,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path3:{type:\"path\",points:[{x:-.19998,y:.07998},{x:.19998,y:.07998},{x:.19998,y:-.07998},{x:-.19998,y:-.07998},{x:-.19998,y:.07998}],color:\"primary\",fill:!1,strokeWidth:.012}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:uor,bounds:SCn,refblocks:QCn,circles:gor}=tIe,dor=Ln({primitives:[...Object.values(uor),...Object.values(gor),{type:\"text\",text:\"{REF}\",x:-.16,y:.16},{type:\"text\",text:\"{VAL}\",x:.16,y:.16}],ports:[{...QCn.left1,labels:[\"1\"]},{...QCn.right1,labels:[\"2\"]}],center:{x:SCn.centerX,y:SCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),hor={...dor,size:{width:.9,height:.6}},{paths:por,bounds:vCn,refblocks:wCn,circles:mor}=tIe,_or=Ln({primitives:[...Object.values(por),...Object.values(mor),{type:\"text\",text:\"{REF}\",x:0,y:-.16},{type:\"text\",text:\"{VAL}\",x:0,y:.16}],ports:[{...wCn.left1,labels:[\"1\"]},{...wCn.right1,labels:[\"2\"]}],center:{x:vCn.centerX,y:vCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Ior={..._or,size:{width:.6,height:.65}},{paths:Cor,bounds:PCn,refblocks:MCn,circles:yor}=tIe,xor=Ln({primitives:[...Object.values(Cor),...Object.values(yor),{type:\"text\",text:\"{REF}\",x:0,y:.16},{type:\"text\",text:\"{VAL}\",x:0,y:-.16}],ports:[{...MCn.left1,labels:[\"1\"]},{...MCn.right1,labels:[\"2\"]}],center:{x:PCn.centerX,y:PCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Eor={...xor,size:{width:.6,height:.65}},nIe={paths:{path2:{type:\"path\",points:[{x:.15,y:-.01},{x:.55,y:-.01}],color:\"primary\",fill:!0},\"path2-5\":{type:\"path\",points:[{x:-.15,y:.06},{x:.14,y:.06}],color:\"primary\",fill:!0},\"path2-5-1\":{type:\"path\",points:[{x:.14,y:.06},{x:.14,y:-.08}],color:\"primary\",fill:!0},\"path2-5-1-6\":{type:\"path\",points:[{x:-.16,y:.06},{x:-.16,y:-.08}],color:\"primary\",fill:!0},\"path2-5-4\":{type:\"path\",points:[{x:-.15,y:-.08},{x:.14,y:-.08}],color:\"primary\",fill:!0},\"path2-9\":{type:\"path\",points:[{x:-.55,y:-.01},{x:-.17,y:-.01}],color:\"primary\",fill:!0}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{width:1.16,height:.35,centerX:0,centerY:0},circles:{}},{paths:Bor,bounds:oIe,refblocks:DCn,circles:bor}=nIe,Sor=Ln({primitives:[...Object.values(Bor),...Object.values(bor),{type:\"text\",text:\"{REF}\",x:-.2,y:.1404553499999995},{type:\"text\",text:\"{VAL}\",x:.2,y:.1494553499999995}],ports:[{...DCn.left1,labels:[\"1\"]},{...DCn.right1,labels:[\"2\"]}],size:{width:oIe.width,height:oIe.height},center:{x:oIe.centerX,y:oIe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Qor,bounds:iIe,refblocks:NCn,circles:vor}=nIe,wor=Ln({primitives:[...Object.values(Qor),...Object.values(vor),{type:\"text\",text:\"{REF}\",x:0,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.1704553499999995}],ports:[{...NCn.left1,labels:[\"1\"]},{...NCn.right1,labels:[\"2\"]}],size:{width:iIe.width,height:iIe.height},center:{x:iIe.centerX,y:iIe.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:Por,bounds:rIe,refblocks:RCn,circles:Mor}=nIe,Dor=Ln({primitives:[...Object.values(Por),...Object.values(Mor),{type:\"text\",text:\"{REF}\",x:0,y:.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.1704553499999995}],ports:[{...RCn.left1,labels:[\"1\"]},{...RCn.right1,labels:[\"2\"]}],size:{width:rIe.width,height:rIe.height},center:{x:rIe.centerX,y:rIe.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:Nor,bounds:sIe,refblocks:TCn,circles:Ror}=nIe,Tor=Ln({primitives:[...Object.values(Nor),...Object.values(Ror),{type:\"text\",text:\"{REF}\",x:.2,y:-.1404553499999995},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.1494553499999995}],ports:[{...TCn.left1,labels:[\"1\"]},{...TCn.right1,labels:[\"2\"]}],size:{width:sIe.width,height:sIe.height},center:{x:sIe.centerX,y:sIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:kor,bounds:kCn,refblocks:FCn,circles:For}=tIe,Lor=Ln({primitives:[...Object.values(kor),...Object.values(For),{type:\"text\",text:\"{REF}\",x:.16,y:-.16},{type:\"text\",text:\"{VAL}\",x:-.16,y:-.16}],ports:[{...FCn.left1,labels:[\"1\"]},{...FCn.right1,labels:[\"2\"]}],center:{x:kCn.centerX,y:kCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Hor={...Lor,size:{width:.9,height:.6}},IZe={paths:{\"horizontal-bar\":{type:\"path\",points:[{x:-.4,y:0},{x:.4,y:0}],color:\"primary\",fill:!1},\"middle-dash-1\":{type:\"path\",points:[{x:0,y:.2},{x:0,y:.07}],color:\"primary\",fill:!1},\"middle-dash-2\":{type:\"path\",points:[{x:0,y:.01},{x:0,y:-.12}],color:\"primary\",fill:!1},\"middle-dash-3\":{type:\"path\",points:[{x:0,y:-.18},{x:0,y:-.31}],color:\"primary\",fill:!1},\"left-vertical\":{type:\"path\",points:[{x:-.25,y:0},{x:-.25,y:-.2}],color:\"primary\",fill:!1},\"right-vertical\":{type:\"path\",points:[{x:.25,y:0},{x:.25,y:-.2}],color:\"primary\",fill:!1},\"left-ground\":{type:\"path\",points:[{x:-.3,y:-.2},{x:-.25,y:-.3},{x:-.2,y:-.2},{x:-.3,y:-.2}],color:\"primary\",fill:!1},\"right-ground\":{type:\"path\",points:[{x:.2,y:-.2},{x:.25,y:-.3},{x:.3,y:-.2},{x:.2,y:-.2}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.4,y:0},right1:{x:.4,y:0}},bounds:{centerX:0,centerY:-.02},circles:{}},{paths:Oor,bounds:LCn,refblocks:HCn,circles:Gor}=IZe,Yor=Ln({primitives:[...Object.values(Oor),...Object.values(Gor),{type:\"text\",text:\"{REF}\",x:0,y:.2594553499999995}],ports:[{...HCn.left1,labels:[\"1\"]},{...HCn.right1,labels:[\"2\"]}],center:{x:LCn.centerX,y:LCn.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:Uor,bounds:OCn,refblocks:GCn,circles:Kor}=IZe,YCn=Ln({primitives:[...Object.values(Uor),...Object.values(Kor),{type:\"text\",text:\"{REF}\",x:0,y:.2594553499999995}],ports:[{...GCn.left1,labels:[\"1\"]},{...GCn.right1,labels:[\"2\"]}],center:{x:OCn.centerX,y:OCn.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Vor=pK(YCn),{paths:zor,bounds:UCn,refblocks:KCn,circles:Jor}=IZe,Wor=Ln({primitives:[...Object.values(zor),...Object.values(Jor),{type:\"text\",text:\"{REF}\",x:0,y:.2594553499999995}],ports:[{...KCn.left1,labels:[\"1\"]},{...KCn.right1,labels:[\"2\"]}],center:{x:UCn.centerX,y:UCn.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),aIe={paths:{path27:{type:\"path\",points:[{x:.3,y:0},{x:.06,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path28:{type:\"path\",points:[{x:-.06,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path29:{type:\"path\",points:[{x:.06,y:.16002},{x:.06,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012},path30:{type:\"path\",points:[{x:-.06,y:.16002},{x:-.06,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.24,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.24,anchor:\"middle_top\"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.24,maxY:.24,width:.6,height:.48,centerX:0,centerY:0},circles:{}},{paths:jor,texts:jmr,bounds:AIe,refblocks:VCn,circles:$or}=aIe,qor=Ln({primitives:[...Object.values(jor),...Object.values($or),{type:\"text\",text:\"{REF}\",x:-.2,y:.115},{type:\"text\",text:\"{VAL}\",x:.2,y:.115}],ports:[{...VCn.left1,labels:[\"1\"]},{...VCn.right1,labels:[\"2\"]}],size:{width:AIe.width,height:AIe.height},center:{x:AIe.centerX,y:AIe.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),Xor={...qor,size:{width:.9,height:.6}},Zor=Ln(aIe).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),eir={...Zor,size:{width:.6,height:.65}},cIe={paths:{path27:{type:\"path\",points:[{x:.3,y:0},{x:657e-6,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path28:{type:\"path\",points:[{x:-.038683,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1,strokeWidth:.012},path30:{type:\"path\",points:[{x:-.074255,y:.16002},{x:-.074255,y:.16002},{x:-.069544,y:.149352},{x:-.065126,y:.138684},{x:-.061005,y:.128016},{x:-.057182,y:.117348},{x:-.053663,y:.10668},{x:-.05045,y:.096012},{x:-.047547,y:.085344},{x:-.044957,y:.074676},{x:-.042684,y:.064008},{x:-.040732,y:.05334},{x:-.039103,y:.042672},{x:-.037801,y:.032004},{x:-.03683,y:.021336},{x:-.036193,y:.010668},{x:-.035893,y:0},{x:-.036193,y:-.010668},{x:-.03683,y:-.021336},{x:-.037801,y:-.032004},{x:-.039103,y:-.042672},{x:-.040732,y:-.05334},{x:-.042684,y:-.064008},{x:-.044957,y:-.074676},{x:-.047547,y:-.085344},{x:-.05045,y:-.096012},{x:-.053663,y:-.10668},{x:-.057182,y:-.117348},{x:-.061005,y:-.128016},{x:-.065126,y:-.138684},{x:-.069544,y:-.149352},{x:-.074255,y:-.16002},{x:-.074255,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012},\"path30-7\":{type:\"path\",points:[{x:-385e-6,y:.16002},{x:-385e-6,y:-.16002}],color:\"primary\",fill:!1,strokeWidth:.012},\"path30-9-2\":{type:\"path\",points:[{x:.156026,y:.2},{x:.085846,y:.2}],color:\"primary\",fill:!1,strokeWidth:.012},\"path30-9-2-9\":{type:\"path\",points:[{x:.120936,y:.16491},{x:.120936,y:.23509}],color:\"primary\",fill:!1,strokeWidth:.012}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.42,anchor:\"middle_bottom\"},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.42,anchor:\"middle_top\"}},refblocks:{left1:{x:-.3,y:0},right1:{x:.3,y:0}},bounds:{minX:-.3,maxX:.3,minY:-.55,maxY:.55,width:.6,height:1.1,centerX:0,centerY:0},circles:{\"viewbox-padding-min\":{type:\"circle\",x:-.3,y:-.55,radius:0,fill:!1,color:\"transparent\"},\"viewbox-padding-max\":{type:\"circle\",x:.3,y:.55,radius:0,fill:!1,color:\"transparent\"}}},tir=Ln(cIe).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.7,y:.3}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-.12,y:-.3}).build(),nir=Ln(cIe).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),oir=Ln(cIe).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.78}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.78}).build(),iir=Ln(cIe).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:-.12,y:.3}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.72,y:-.3}).build(),rir=Ln(aIe).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),sir={...rir,size:{width:.6,height:.65}},{paths:air,texts:$mr,bounds:lIe,refblocks:zCn,circles:Air}=aIe,cir=Ln({primitives:[...Object.values(air),...Object.values(Air),{type:\"text\",text:\"{REF}\",x:.2,y:-.095},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.095}],ports:[{...zCn.left1,labels:[\"1\"]},{...zCn.right1,labels:[\"2\"]}],size:{width:lIe.width,height:lIe.height},center:{x:lIe.centerX,y:lIe.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),lir={...cir,size:{width:.9,height:.6}},fK={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.03},{x:.54,y:.03}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.29,y:.29},{x:.29,y:-.23}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.02,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:-.37}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.37,maxY:.37,width:1.14,height:.74,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:uir,texts:qmr,bounds:uIe,refblocks:JCn,circles:gir}=fK,dir=Ln({primitives:[...Object.values(uir),...Object.values(gir),{type:\"text\",text:\"{REF}\",x:-.15,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3894553499999995}],ports:[{...JCn.left1,labels:[\"1\"]},{...JCn.right1,labels:[\"2\"]}],size:{width:uIe.width,height:uIe.height},center:{x:uIe.centerX,y:uIe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),hir=Ln(fK).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:pir,texts:Xmr,bounds:gIe,refblocks:WCn,circles:mir}=fK,_ir=Ln({primitives:[...Object.values(pir),...Object.values(mir),{type:\"text\",text:\"{REF}\",x:-0,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.3894553499999995}],ports:[{...WCn.left1,labels:[\"1\"]},{...WCn.right1,labels:[\"2\"]}],size:{width:gIe.width,height:gIe.height},center:{x:gIe.centerX,y:gIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),fir=Ln(fK).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\",\"neg\"]).labelPort(\"right1\",[\"2\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Iir,texts:Zmr,bounds:dIe,refblocks:jCn,circles:Cir}=fK,yir=Ln({primitives:[...Object.values(Iir),...Object.values(Cir),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...jCn.left1,labels:[\"1\"]},{...jCn.right1,labels:[\"2\"]}],size:{width:dIe.width,height:dIe.height},center:{x:dIe.centerX,y:dIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:xir,texts:e_r,bounds:hIe,refblocks:$Cn,circles:Eir}=fK,Bir=Ln({primitives:[...Object.values(xir),...Object.values(Eir),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...$Cn.left1,labels:[\"1\"]},{...$Cn.right1,labels:[\"2\"]}],size:{width:hIe.width,height:hIe.height},center:{x:hIe.centerX,y:hIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),pIe={paths:{path27:{type:\"path\",points:[{x:.54,y:-.01},{x:.13,y:-.01}],color:\"primary\",fill:!1},path29:{type:\"path\",points:[{x:.13,y:.25},{x:.13,y:-.27}],color:\"primary\",fill:!1},\"path29-2\":{type:\"path\",points:[{x:.07,y:.25},{x:.07,y:-.28}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-.14,y:.25},{x:-.14,y:-.27}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-.08,y:.26},{x:-.08,y:-.27}],color:\"primary\",fill:!1},\"path29-2-7\":{type:\"path\",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:\"primary\",fill:!1},\"path29-2-7-6\":{type:\"path\",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-.21,y:.32},{x:.2,y:.32}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:.71},{x:0,y:.33},{x:0,y:.32}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:-.21,y:.32},{x:-.21,y:.25}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.2,y:.32},{x:.2,y:.25}],color:\"primary\",fill:!1},\"path43-9\":{type:\"path\",points:[{x:.19,y:-.35},{x:-.22,y:-.35}],color:\"primary\",fill:!1},\"path44-0-5\":{type:\"path\",points:[{x:-.02,y:-.71},{x:-.02,y:-.36},{x:-.02,y:-.35}],color:\"primary\",fill:!1},\"path43-8-1\":{type:\"path\",points:[{x:.19,y:-.35},{x:.19,y:-.28}],color:\"primary\",fill:!1},\"path43-8-8-9\":{type:\"path\",points:[{x:-.22,y:-.35},{x:-.22,y:-.28}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-.14,y:-.01},{x:-.54,y:-.01}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"{REF}\",x:.53,y:.28},right1:{type:\"text\",text:\"{VAL}\",x:.54,y:-.28}},refblocks:{top1:{x:0,y:.71},bottom1:{x:-.02,y:-.71},left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.74,maxY:.74,width:1.14,height:1.48,centerX:0,centerY:0},circles:{}},{paths:bir,texts:t_r,bounds:mIe,refblocks:_Ie,circles:Sir}=pIe,Qir=Ln({primitives:[...Object.values(bir),...Object.values(Sir),{type:\"text\",text:\"{REF}\",x:-.4,y:.4094554499999995},{type:\"text\",text:\"{VAL}\",x:.4,y:.4094553499999995}],ports:[{..._Ie.left1,labels:[\"1\"]},{..._Ie.right1,labels:[\"3\"]},{..._Ie.bottom1,labels:[\"2\"]},{..._Ie.top1,labels:[\"4\"]}],size:{width:mIe.width,height:mIe.height},center:{x:mIe.centerX,y:mIe.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),vir=Ln(pIe).labelPort(\"top1\",[\"2\",\"gnd1\"]).labelPort(\"bottom1\",[\"4\",\"gnd2\"]).labelPort(\"left1\",[\"3\"]).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),wir=Ln(pIe).labelPort(\"top1\",[\"4\",\"gnd1\"]).labelPort(\"bottom1\",[\"2\",\"gnd2\"]).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),{paths:Pir,texts:n_r,bounds:fIe,refblocks:IIe,circles:Mir}=pIe,Dir=Ln({primitives:[...Object.values(Pir),...Object.values(Mir),{type:\"text\",text:\"{VAL}\",x:-.4,y:-.4094554499999995},{type:\"text\",text:\"{REF}\",x:.4,y:-.4094553499999995}],ports:[{...IIe.left1,labels:[\"1\"]},{...IIe.right1,labels:[\"3\"]},{...IIe.bottom1,labels:[\"2\"]},{...IIe.top1,labels:[\"4\"]}],size:{width:fIe.width,height:fIe.height},center:{x:fIe.centerX,y:fIe.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"bottom_left\").changeTextAnchor(\"{VAL}\",\"top_left\").build(),CIe={paths:{path27:{type:\"path\",points:[{x:.55,y:-.01},{x:.13,y:-.01}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-.14,y:-.01},{x:-.55,y:-.01}],color:\"primary\",fill:!1},path29:{type:\"path\",points:[{x:.13,y:-.28},{x:.13,y:.25}],color:\"primary\",fill:!1},\"path29-2\":{type:\"path\",points:[{x:.07,y:-.28},{x:.07,y:.25}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-.14,y:-.28},{x:-.14,y:.25}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-.08,y:-.28},{x:-.08,y:.25}],color:\"primary\",fill:!1},\"path29-2-7\":{type:\"path\",points:[{x:.07,y:-.28},{x:-.08,y:-.28}],color:\"primary\",fill:!1},\"path29-2-7-6\":{type:\"path\",points:[{x:.07,y:.26},{x:-.08,y:.26}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{VAL}\",x:-.01,y:-.42},bottom1:{type:\"text\",text:\"{REF}\",x:0,y:.43}},refblocks:{left1:{x:-.55,y:-.01},right1:{x:.55,y:-.01}},bounds:{minX:-.58,maxX:.58,minY:-.52,maxY:.43,width:1.16,height:1,centerX:0,centerY:-.04},circles:{}},{paths:Nir,texts:o_r,bounds:yIe,refblocks:qCn,circles:Rir}=CIe,Tir=Ln({primitives:[...Object.values(Nir),...Object.values(Rir),{type:\"text\",text:\"{REF}\",x:-.3,y:.3094553499999995},{type:\"text\",text:\"{VAL}\",x:.3,y:.3094553499999995}],ports:[{...qCn.left1,labels:[\"1\"]},{...qCn.right1,labels:[\"2\"]}],size:{width:yIe.width,height:yIe.height},center:{x:yIe.centerX,y:yIe.centerY}}).changeTextAnchor(\"{VAL}\",\"top_left\").rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),kir=Ln(CIe).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"right1\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Fir=Ln(CIe).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Lir,texts:i_r,bounds:xIe,refblocks:XCn,circles:Hir}=CIe,Oir=Ln({primitives:[...Object.values(Lir),...Object.values(Hir),{type:\"text\",text:\"{REF}\",x:.3,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.3094553499999995}],ports:[{...XCn.left1,labels:[\"1\"]},{...XCn.right1,labels:[\"2\"]}],size:{width:xIe.width,height:xIe.height},center:{x:xIe.centerX,y:xIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"bottom_left\").build(),ite=.6,CZe=.3,Gir=[{type:\"path\",points:[{x:-ite,y:0},{x:-CZe,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:CZe,y:0},{x:ite,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:CZe,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],Yir=Ln({primitives:[...Gir,{type:\"text\",text:\"{REF}\",x:-.2,y:.35},{type:\"text\",text:\"{VAL}\",x:.2,y:.35}],ports:[{x:-ite,y:0,labels:[\"1\"]},{x:ite,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:ite*2,height:.9}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),rte=.6,yZe=.3,Uir=[{type:\"path\",points:[{x:-rte,y:0},{x:-yZe,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:yZe,y:0},{x:rte,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:yZe,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],Kir=Ln({primitives:[...Uir,{type:\"text\",text:\"{REF}\",x:0,y:-.4},{type:\"text\",text:\"{VAL}\",x:0,y:.4}],ports:[{x:-rte,y:0,labels:[\"1\"]},{x:rte,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:rte*2,height:.9}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),ste=.6,xZe=.3,Vir=[{type:\"path\",points:[{x:-ste,y:0},{x:-xZe,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:xZe,y:0},{x:ste,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:xZe,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],zir=Ln({primitives:[...Vir,{type:\"text\",text:\"{REF}\",x:0,y:.4},{type:\"text\",text:\"{VAL}\",x:0,y:-.4}],ports:[{x:-ste,y:0,labels:[\"1\"]},{x:ste,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:ste*2,height:.9}}).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),ate=.6,EZe=.3,Jir=[{type:\"path\",points:[{x:-ate,y:0},{x:-EZe,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:EZe,y:0},{x:ate,y:0}],color:\"primary\",fill:!1},{type:\"circle\",x:0,y:0,radius:EZe,color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.1,y:0},{x:.15,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:.08}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:.15,y:0},{x:.05,y:-.08}],color:\"primary\",fill:!1}],Wir=Ln({primitives:[...Jir,{type:\"text\",text:\"{REF}\",x:.2,y:-.35},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.35}],ports:[{x:-ate,y:0,labels:[\"1\"]},{x:ate,y:0,labels:[\"2\"]}],center:{x:0,y:0},size:{width:ate*2,height:.9}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),IK={paths:{path11:{type:\"path\",points:[{x:1.99,y:-1.64},{x:2.1,y:-1.64}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:2.1,y:-1.48},{x:2.1,y:-1.8}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:2.22,y:-1.5},{x:2.11,y:-1.58}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:2.23,y:-1.78},{x:2.11,y:-1.7}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:2.23,y:-1.49},{x:2.23,y:-1.14}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:2.23,y:-1.97},{x:2.23,y:-1.79}],color:\"primary\",fill:!1},\"arrow-2\":{type:\"path\",points:[{x:2.17,y:-1.7},{x:2.13,y:-1.76},{x:2.19,y:-1.76},{x:2.17,y:-1.7}],color:\"primary\",fill:!0},path1:{type:\"path\",points:[{x:1.6,y:-1.5},{x:1.86,y:-1.5}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:1.87,y:-1.34},{x:1.87,y:-1.66}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:1.99,y:-1.36},{x:1.87,y:-1.44}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:1.99,y:-1.64},{x:1.88,y:-1.56}],color:\"primary\",fill:!1},\"arrow-1\":{type:\"path\",points:[{x:1.94,y:-1.56},{x:1.89,y:-1.62},{x:1.96,y:-1.62},{x:1.94,y:-1.56}],color:\"primary\",fill:!0},path9:{type:\"path\",points:[{x:1.99,y:-1.35},{x:2.23,y:-1.36}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:1.88,y:-1.94},right1:{type:\"text\",text:\"{REF}\",x:1.88,y:-1.14}},refblocks:{right1:{x:2.23,y:-1.97},right2:{x:1.6,y:-1.5},right3:{x:2.23,y:-1.14}},bounds:{minX:1.58,maxX:2.35,minY:-1.98,maxY:-1.12,width:.77,height:.86,centerX:1.96,centerY:-1.55},circles:{\"path1-0\":{type:\"circle\",x:2.05,y:-1.54,radius:.3,color:\"primary\",fill:!1}}},jir=Ln(IK).rotateRightFacingSymbol(\"down\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.8,y:-.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0,y:.15}).build(),$ir=Ln(IK).rotateRightFacingSymbol(\"right\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_right\").changeTextAnchor(\"{REF}\",\"middle_right\").build(),qir=Ln(IK).rotateRightFacingSymbol(\"left\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-.8}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:0,y:.8}).build(),Xir=Ln(IK).rotateRightFacingSymbol(\"right\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_right\").changeTextAnchor(\"{REF}\",\"middle_right\").build(),Zir=Ln(IK).rotateRightFacingSymbol(\"up\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.8,y:.15}).build(),err=Ln(IK).rotateRightFacingSymbol(\"up\").labelPort(\"right2\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"3\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:0,y:-.15}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.8,y:.15}).build(),trr={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:ZCn,bounds:EIe,refblocks:eyn,circles:nrr}=trr,Ate=Gl({primitives:[ZCn.path11,ZCn.path12,{type:\"path\",points:[{x:-.12,y:.14},{x:.12,y:.14}],color:\"primary\",fill:!1},...Object.values(nrr),{type:\"text\",text:\"{REF}\",x:0,y:.3594553499999995,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-.35,anchor:\"middle_top\"},{type:\"path\",points:[{x:-.095,y:-.16},{x:0,y:.09}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:0,y:.09},{x:.095,y:-.16}],color:\"primary\",fill:!1},{type:\"path\",points:[{x:-.048,y:-.045},{x:.048,y:-.045}],color:\"primary\",fill:!1}],ports:[{...eyn.left1,labels:[\"1\"]},{...eyn.right1,labels:[\"2\"]}],size:{width:EIe.width,height:EIe.height},center:{x:EIe.centerX,y:EIe.centerY}}),BZe=structuredClone(Ate);BZe.primitives=BZe.primitives.map(t=\u003et.type!==\"text\"?t:t.text===\"{REF}\"?{...t,x:-.16,y:.3594553499999995,anchor:\"middle_bottom\"}:t.text===\"{VAL}\"?{...t,x:.16,y:.35,anchor:\"middle_bottom\"}:t);var tyn=nte(BZe,{newOrientation:\"down\"}),orr=pK(Ate),irr=Ate,bZe=structuredClone(Ate);bZe.primitives=bZe.primitives.map(t=\u003et.type!==\"text\"?t:t.text===\"{REF}\"?{...t,x:.16,y:-.3594553499999995,anchor:\"middle_top\"}:t.text===\"{VAL}\"?{...t,x:-.16,y:-.35,anchor:\"middle_top\"}:t);var rrr=nte(bZe,{newOrientation:\"up\"}),CK={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:-.12,y:-.14},{x:.12,y:-.14}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.04}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:srr,bounds:BIe,refblocks:nyn,circles:arr}=CK,Arr=Ln({primitives:[...Object.values(srr),...Object.values(arr),{type:\"text\",text:\"{REF}\",x:-.15,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3894553499999995}],ports:[{...nyn.left1,labels:[\"1\"]},{...nyn.right1,labels:[\"2\"]}],size:{width:BIe.width,height:BIe.height},center:{x:BIe.centerX,y:BIe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:crr,bounds:bIe,refblocks:oyn,circles:lrr}=CK,urr=Ln({primitives:[...Object.values(crr),...Object.values(lrr),{type:\"text\",text:\"{REF}\",x:-0,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.3294553499999995}],ports:[{...oyn.left1,labels:[\"1\"]},{...oyn.right1,labels:[\"2\"]}],size:{width:bIe.width,height:bIe.height},center:{x:bIe.centerX,y:bIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:grr,bounds:SIe,refblocks:iyn,circles:drr}=CK,hrr=Ln({primitives:[...Object.values(grr),...Object.values(drr),{type:\"text\",text:\"{REF}\",x:-0,y:-.3294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.4294553499999995}],ports:[{...iyn.left1,labels:[\"1\"]},{...iyn.right1,labels:[\"2\"]}],size:{width:SIe.width,height:SIe.height},center:{x:SIe.centerX,y:SIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:prr,bounds:QIe,refblocks:ryn,circles:mrr}=CK,_rr=Ln({primitives:[...Object.values(prr),...Object.values(mrr),{type:\"text\",text:\"{REF}\",x:-0,y:.3894553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.3294553499999995}],ports:[{...ryn.left1,labels:[\"1\"]},{...ryn.right1,labels:[\"2\"]}],size:{width:QIe.width,height:QIe.height},center:{x:QIe.centerX,y:QIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:frr,bounds:vIe,refblocks:syn,circles:Irr}=CK,Crr=Ln({primitives:[...Object.values(frr),...Object.values(Irr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...syn.left1,labels:[\"1\"]},{...syn.right1,labels:[\"2\"]}],size:{width:vIe.width,height:vIe.height},center:{x:vIe.centerX,y:vIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:yrr,bounds:wIe,refblocks:ayn,circles:xrr}=CK,Err=Ln({primitives:[...Object.values(yrr),...Object.values(xrr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...ayn.left1,labels:[\"1\"]},{...ayn.right1,labels:[\"2\"]}],size:{width:wIe.width,height:wIe.height},center:{x:wIe.centerX,y:wIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),yK={paths:{path11:{type:\"path\",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.1,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:\"primary\",fill:!0},\"path11-0-9-0\":{type:\"path\",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.03,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.42}},refblocks:{left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.05,radius:.29,color:\"primary\",fill:!1}}},Brr=Ln(yK).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:-.03,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.8,y:-.2}).build(),brr=Ln(yK).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.1}).changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Srr=Ln(yK).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.8}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.9}).build(),Qrr=Ln(yK).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.1}).changeTextAnchor(\"{VAL}\",\"middle_top\").build(),vrr=Ln(yK).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.7,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-.13,y:-.2}).build(),wrr=Ln(yK).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.7,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:-.13,y:-.2}).build(),PIe={paths:{triangle:{type:\"path\",points:[{x:-.06,y:-.09},{x:-.06,y:.09},{x:.06,y:0},{x:-.06,y:-.09}],color:\"primary\",fill:!1},stem:{type:\"path\",points:[{x:-.11,y:0},{x:-.06,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.11,y:0}},bounds:{centerX:0,centerY:0}},{paths:Prr,bounds:Ayn,refblocks:Mrr}=PIe,Drr=Ln({primitives:[...Object.values(Prr),{type:\"text\",text:\"{REF}\",x:-.13,y:-0}],ports:[{...Mrr.left1,labels:[\"1\"]}],center:{x:Ayn.centerX,y:Ayn.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),{paths:Nrr,bounds:cyn,refblocks:Rrr}=PIe,Trr=Ln({primitives:[...Object.values(Nrr),{type:\"text\",text:\"{REF}\",x:-.13,y:0}],ports:[{...Rrr.left1,labels:[\"1\"]}],center:{x:cyn.centerX,y:cyn.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:krr,bounds:lyn,refblocks:Frr}=PIe,Lrr=Ln({primitives:[...Object.values(krr),{type:\"text\",text:\"{REF}\",x:-.13,y:-0}],ports:[{...Frr.left1,labels:[\"1\"]}],center:{x:lyn.centerX,y:lyn.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:Hrr,bounds:uyn,refblocks:Orr}=PIe,Grr=Ln({primitives:[...Object.values(Hrr),{type:\"text\",text:\"{REF}\",x:-.13,y:0}],ports:[{...Orr.left1,labels:[\"1\"]}],center:{x:uyn.centerX,y:uyn.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Yrr={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},MIe=Ln(Yrr).labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Urr=si(MIe,\"down\"),Krr=si(MIe,\"left\"),Vrr=si(MIe,\"up\"),zrr={paths:{path1:{type:\"path\",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:\"primary\",fill:!1},\"path-1-2\":{type:\"path\",points:[{x:-.07,y:.22},{x:.11,y:.16}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:.13},{x:.37,y:.13}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.36},{x:.37,y:.36}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:\"primary\",fill:!1},\"path4-5\":{type:\"path\",points:[{x:-.07,y:-.19},{x:.1,y:-.24}],color:\"primary\",fill:!1},path5:{type:\"path\",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:\"primary\",fill:!1},\"path1-4-join\":{type:\"path\",points:[{x:0,y:-.2},{x:0,y:.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.56},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.42}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{\"circle-2\":{type:\"circle\",x:.08,y:.13,radius:.02,color:\"primary\",fill:!1},\"circle-5\":{type:\"circle\",x:.08,y:-.27,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:.08,y:.37,radius:.02,color:\"primary\",fill:!1},\"circle-6\":{type:\"circle\",x:.08,y:-.04,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.22,radius:.02,color:\"primary\",fill:!1},\"circle-4\":{type:\"circle\",x:-.1,y:-.18,radius:.02,color:\"primary\",fill:!1}}},DIe=Ln(zrr).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right3\",[\"6\"]).labelPort(\"left2\",[\"4\"]).labelPort(\"right5\",[\"5\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),SZe=si(DIe,\"down\"),QZe=SZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),vZe=SZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");QZe.anchor=\"middle_bottom\",vZe.anchor=\"middle_top\",QZe.x=0,QZe.y+=.537,vZe.y-=.5375,vZe.x=0;var Jrr=SZe,wZe=si(DIe,\"left\"),PZe=wZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),MZe=wZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");PZe.anchor=\"middle_bottom\",MZe.anchor=\"middle_top\",PZe.x=0,PZe.y+=1,MZe.y-=1,MZe.x=0;var Wrr=wZe,DZe=si(DIe,\"up\"),NZe=DZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),RZe=DZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");NZe.anchor=\"middle_bottom\",RZe.anchor=\"middle_top\",NZe.x=0,NZe.y+=.537,RZe.y-=.5375,RZe.x=0;var jrr=DZe,$rr={paths:{path1:{type:\"path\",points:[{x:-.37,y:.22},{x:-.13,y:.22}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-.07,y:.23},{x:.11,y:.33}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:.13},{x:.37,y:.13}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.36},{x:.37,y:.36}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-.37,y:-.18},{x:-.13,y:-.18}],color:\"primary\",fill:!1},\"path4-6\":{type:\"path\",points:[{x:-.07,y:-.18},{x:.11,y:-.07}],color:\"primary\",fill:!1},path5:{type:\"path\",points:[{x:.1,y:-.27},{x:.37,y:-.27}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.12,y:-.04},{x:.37,y:-.04}],color:\"primary\",fill:!1},\"path1-4-join\":{type:\"path\",points:[{x:0,y:-.12},{x:0,y:.27}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.61},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.52}},refblocks:{left1:{x:-.37,y:.22},left2:{x:-.37,y:-.18},right1:{x:.37,y:.36},right2:{x:.37,y:.13},right3:{x:.37,y:-.04},right5:{x:.37,y:-.27}},bounds:{minX:-.4,maxX:.4,minY:-.47,maxY:.56,width:1,height:1.04,centerX:0,centerY:.05},circles:{\"circle-2\":{type:\"circle\",x:.08,y:.13,radius:.02,color:\"primary\",fill:!1},\"circle-5\":{type:\"circle\",x:.08,y:-.27,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:.08,y:.37,radius:.02,color:\"primary\",fill:!1},\"circle-6\":{type:\"circle\",x:.08,y:-.04,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.22,radius:.02,color:\"primary\",fill:!1},\"circle-4\":{type:\"circle\",x:-.1,y:-.18,radius:.02,color:\"primary\",fill:!1}}},NIe=Ln($rr).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"3\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right3\",[\"6\"]).labelPort(\"left2\",[\"4\"]).labelPort(\"right5\",[\"5\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),TZe=si(NIe,\"down\"),kZe=TZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),FZe=TZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");kZe.anchor=\"middle_bottom\",FZe.anchor=\"middle_top\",kZe.x=0,kZe.y+=.565,FZe.y-=.555,FZe.x=0;var qrr=TZe,LZe=si(NIe,\"left\"),HZe=LZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),OZe=LZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");HZe.anchor=\"middle_bottom\",OZe.anchor=\"middle_top\",HZe.x=0,HZe.y+=1.09,OZe.y-=1.09,OZe.x=0;var Xrr=LZe,GZe=si(NIe,\"up\"),YZe=GZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),UZe=GZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");YZe.anchor=\"middle_bottom\",UZe.anchor=\"middle_top\",YZe.x=0,YZe.y+=.565,UZe.y-=.555,UZe.x=0;var Zrr=GZe,esr={paths:{path11:{type:\"path\",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:.07},{x:.11,y:.11}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.13,y:.06},{x:.38,y:.06}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:-.09,y:-.17},{x:.11,y:-.12}],color:\"primary\",fill:!1},\"path12-0\":{type:\"path\",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.31},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.31}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{\"circle-4\":{type:\"circle\",x:.1,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.1,y:-.17,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:-.11,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.11,y:-.17,radius:.02,color:\"primary\",fill:!1}}},RIe=Ln(esr).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"4\"]).labelPort(\"left3\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),KZe=si(RIe,\"down\"),VZe=KZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),zZe=KZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");VZe.anchor=\"middle_bottom\",zZe.anchor=\"middle_top\",VZe.x=.4,VZe.y+=.265,zZe.y-=.265,zZe.x=.4;var tsr=KZe,JZe=si(RIe,\"left\"),WZe=JZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),jZe=JZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");WZe.anchor=\"middle_bottom\",jZe.anchor=\"middle_top\",WZe.x=0,WZe.y+=.67,jZe.y-=.67,jZe.x=0;var nsr=JZe,$Ze=si(RIe,\"up\"),qZe=$Ze.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),XZe=$Ze.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");qZe.anchor=\"middle_bottom\",XZe.anchor=\"middle_top\",qZe.x=.46,qZe.y+=.265,XZe.y-=.265,XZe.x=.46;var osr=$Ze,isr={paths:{path11:{type:\"path\",points:[{x:-.38,y:.06},{x:-.14,y:.06}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:.07},{x:.1,y:.2}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.13,y:.06},{x:.38,y:.06}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-.38,y:-.17},{x:-.14,y:-.17}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:-.09,y:-.16},{x:.1,y:-.03}],color:\"primary\",fill:!1},\"path12-0\":{type:\"path\",points:[{x:.13,y:-.17},{x:.38,y:-.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.42}},refblocks:{left1:{x:-.38,y:-.17},left3:{x:-.38,y:.06},right1:{x:.38,y:-.17},right3:{x:.38,y:.06}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.81,height:.79,centerX:0,centerY:0},circles:{\"circle-4\":{type:\"circle\",x:.1,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.1,y:-.17,radius:.02,color:\"primary\",fill:!1},\"circle-3\":{type:\"circle\",x:-.11,y:.06,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.11,y:-.17,radius:.02,color:\"primary\",fill:!1}}},TIe=Ln(isr).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"right3\",[\"4\"]).labelPort(\"left3\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),ZZe=si(TIe,\"down\"),eet=ZZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),tet=ZZe.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");eet.anchor=\"middle_bottom\",tet.anchor=\"middle_top\",eet.x=.4,eet.y+=.295,tet.y-=.295,tet.x=.42;var rsr=ZZe,net=si(TIe,\"left\"),oet=net.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),iet=net.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");oet.anchor=\"middle_bottom\",iet.anchor=\"middle_top\",oet.x=0,oet.y+=.795,iet.y-=.795,iet.x=0;var ssr=net,ret=si(TIe,\"up\"),set=ret.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),aet=ret.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");set.anchor=\"middle_bottom\",aet.anchor=\"middle_top\",set.x=.46,set.y+=.315,aet.y-=.315,aet.x=.46;var asr=ret,gyn={paths:{path5:{type:\"path\",points:[{x:-.44,y:0},{x:-.16,y:0}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.17,y:0},{x:.44,y:.01}],color:\"primary\",fill:!1},path9:{type:\"path\",points:[{x:-.25,y:-.16},{x:.02,y:.3},{x:.25,y:.17},{x:-.02,y:-.29},{x:-.25,y:-.16}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.37}},refblocks:{left1:{x:-.44,y:0},right1:{x:.44,y:.01}},bounds:{minX:-.57,maxX:.57,minY:-.25,maxY:.25,width:1.13,height:.5,centerX:0,centerY:0},circles:{}},{paths:Asr,texts:r_r,bounds:kIe,refblocks:dyn,circles:csr}=gyn,hyn=Ln({primitives:[...Object.values(Asr),...Object.values(csr),{type:\"text\",text:\"{REF}\",x:.18,y:-.3204553499999995},{type:\"text\",text:\"{VAL}\",x:-.25,y:-.3294553499999995}],ports:[{...dyn.left1,labels:[\"1\"]},{...dyn.right1,labels:[\"2\"]}],size:{width:kIe.width,height:kIe.height},center:{x:kIe.centerX,y:kIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Aet=hK(hyn),cet=Aet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),uet=Aet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");cet.anchor=\"middle_left\",uet.anchor=\"middle_left\",cet.y+=.4,cet.x=.32,uet.y-=.45,uet.x=.32;var lsr=Aet,pyn=Ln(gyn).labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),usr=pK(pyn),xK={paths:{path11:{type:\"path\",points:[{x:-.56,y:.04},{x:-.22,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.14,y:.05},{x:.48,y:.05}],color:\"primary\",fill:!1},\"path12-6\":{type:\"path\",points:[{x:.14,y:-.15},{x:.14,y:.25}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.22,y:.25},{x:-.21,y:-.15},{x:.14,y:.05},{x:-.22,y:.25}],color:\"primary\",fill:!0}},refblocks:{left1:{x:-.56,y:.04},right1:{x:.48,y:.05}},bounds:{width:1.18,height:.76,centerX:0,centerY:0},circles:{}},{paths:gsr,bounds:FIe,refblocks:myn,circles:dsr}=xK,hsr=Ln({primitives:[...Object.values(gsr),...Object.values(dsr),{type:\"text\",text:\"{REF}\",x:-.15,y:.3294553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.3294553499999995}],ports:[{...myn.left1,labels:[\"1\"]},{...myn.right1,labels:[\"2\"]}],size:{width:FIe.width,height:FIe.height},center:{x:FIe.centerX,y:FIe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:psr,bounds:LIe,refblocks:_yn,circles:msr}=xK,_sr=Ln({primitives:[...Object.values(psr),...Object.values(msr),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{..._yn.left1,labels:[\"1\"]},{..._yn.right1,labels:[\"2\"]}],size:{width:LIe.width,height:LIe.height},center:{x:LIe.centerX,y:LIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:fsr,bounds:HIe,refblocks:fyn,circles:Isr}=xK,Csr=Ln({primitives:[...Object.values(fsr),...Object.values(Isr),{type:\"text\",text:\"{REF}\",x:-0,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.4094553499999995}],ports:[{...fyn.left1,labels:[\"1\"]},{...fyn.right1,labels:[\"2\"]}],size:{width:HIe.width,height:HIe.height},center:{x:HIe.centerX,y:HIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_bottom\").rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:ysr,bounds:OIe,refblocks:Iyn,circles:xsr}=xK,Esr=Ln({primitives:[...Object.values(ysr),...Object.values(xsr),{type:\"text\",text:\"{REF}\",x:-0,y:.4094553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.4094553499999995}],ports:[{...Iyn.left1,labels:[\"1\"]},{...Iyn.right1,labels:[\"2\"]}],size:{width:OIe.width,height:OIe.height},center:{x:OIe.centerX,y:OIe.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Bsr,bounds:GIe,refblocks:Cyn,circles:bsr}=xK,Ssr=Ln({primitives:[...Object.values(Bsr),...Object.values(bsr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...Cyn.left1,labels:[\"1\"]},{...Cyn.right1,labels:[\"2\"]}],size:{width:GIe.width,height:GIe.height},center:{x:GIe.centerX,y:GIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Qsr,bounds:YIe,refblocks:yyn,circles:vsr}=xK,wsr=Ln({primitives:[...Object.values(Qsr),...Object.values(vsr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2894553499999995}],ports:[{...yyn.left1,labels:[\"1\"]},{...yyn.right1,labels:[\"2\"]}],size:{width:YIe.width,height:YIe.height},center:{x:YIe.centerX,y:YIe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Psr={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"Hz\",x:0,y:-.04}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:Msr,texts:Dsr,bounds:UIe,refblocks:xyn,circles:Nsr}=Psr,get=Gl({primitives:[...Object.values(Msr),...Object.values(Nsr),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...Dsr.left1,x:0,y:.01,anchor:\"center\",fontSize:.2}],ports:[{...xyn.left1,labels:[\"1\"]},{...xyn.right1,labels:[\"2\"]}],size:{width:UIe.width,height:UIe.height},center:{x:UIe.centerX,y:UIe.centerY}}),{5:Rsr,...Tsr}=get.primitives;function ksr(t){return typeof t==\"object\"}var Eyn=si({...get,primitives:Object.values(Tsr).filter(ksr)}),Fsr={...Eyn,primitives:[...Eyn.primitives,Rsr]},Lsr={paths:{path10:{type:\"path\",points:[{x:-.53,y:.04},{x:.53,y:.04}],color:\"primary\",fill:!1},path14:{type:\"path\",points:[{x:0,y:.17},{x:.27,y:.17},{x:.27,y:-.1},{x:-.26,y:-.1},{x:-.26,y:.17},{x:0,y:.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.24}},refblocks:{left1:{x:-.53,y:.04},right1:{x:.53,y:.04}},bounds:{width:1.13,height:.47,centerX:0,centerY:0}},{paths:Hsr,texts:Osr,bounds:KIe,refblocks:Byn}=Lsr,byn=Gl({primitives:[...Object.values(Hsr),{...Osr.top1,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-.2,anchor:\"middle_top\"}],ports:[{...Byn.left1,labels:[\"1\"]},{...Byn.right1,labels:[\"2\"]}],size:{width:KIe.width,height:KIe.height},center:{x:KIe.centerX,y:KIe.centerY}}),Gsr=si(byn),EK={paths:{path1:{type:\"path\",points:[{x:-.29,y:.01},{x:.04,y:0}],color:\"primary\",fill:!0},path2:{type:\"path\",points:[{x:.04,y:-.22},{x:.04,y:.22}],color:\"primary\",fill:!0},path3:{type:\"path\",points:[{x:.12,y:-.17},{x:.12,y:.17}],color:\"primary\",fill:!0},path4:{type:\"path\",points:[{x:.19,y:-.06},{x:.19,y:.06}],color:\"primary\",fill:!0}},texts:{right1:{type:\"text\",text:\"{REF}\",x:.31,y:-.02}},refblocks:{left1:{x:-.29,y:.01}},bounds:{minX:-.31,maxX:.31,minY:-.22,maxY:.22,width:.62,height:.45,centerX:0,centerY:0},circles:{}},Ysr=Ln(EK).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),Usr=Ln(EK).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Ksr=Ln(EK).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),Vsr=Ln(EK).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),zsr=Ln(EK).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Jsr=Ln(EK).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),det={paths:{path11:{type:\"path\",points:[{x:-.52,y:.03},{x:-.18,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.19,y:.04},{x:.52,y:.04}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.31,y:.2},{x:-.31,y:-.11},{x:-.01,y:.04},{x:-.3,y:.2}],color:\"primary\",fill:!0},\"path11-0-9-5\":{type:\"path\",points:[{x:.33,y:.2},{x:.33,y:-.1},{x:.04,y:.04},{x:.33,y:.2}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.04,y:.32},bottom1:{type:\"text\",text:\"{VAL}\",x:.04,y:-.32}},refblocks:{left1:{x:-.52,y:.03},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.32,maxY:.32,width:1.09,height:.63,centerX:0,centerY:0},circles:{}},{paths:s_r,texts:a_r,bounds:A_r,refblocks:c_r,circles:l_r}=det,Wsr=Ln(det).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),jsr=Ln(det).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{VAL}\",\"middle_right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),$sr={paths:{path45:{type:\"path\",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:\"primary\",fill:!1},\"path1-8\":{type:\"path\",points:[{x:.13,y:0},{x:.3,y:0}],color:\"primary\",fill:!1},path46:{type:\"path\",points:[{x:-.13,y:.13},{x:.14,y:0}],color:\"primary\",fill:!1},path47:{type:\"path\",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:\"primary\",fill:!1},path48:{type:\"path\",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:\"primary\",fill:!1},path49:{type:\"path\",points:[{x:-.13,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path25:{type:\"path\",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:\"primary\",fill:!0},path78:{type:\"path\",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:\"primary\",fill:!1},box:{type:\"path\",points:[{x:-.3,y:-.4},{x:.3,y:-.4},{x:.3,y:.4},{x:-.3,y:.4},{x:-.3,y:-.4},{x:-.3,y:.4}],color:\"primary\",fill:!1},\"path48-1\":{type:\"path\",points:[{x:-.3,y:.13},{x:-.54,y:.13}],color:\"primary\",fill:!1},\"path48-2\":{type:\"path\",points:[{x:-.3,y:-.13},{x:-.54,y:-.13}],color:\"primary\",fill:!1},\"path48-3\":{type:\"path\",points:[{x:.3,y:-.13},{x:.54,y:-.13}],color:\"primary\",fill:!1},\"path48-4\":{type:\"path\",points:[{x:.3,y:.13},{x:.54,y:.13}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.43},right1:{type:\"text\",text:\"{REF}\",x:0,y:.43}},refblocks:{left1:{x:-.54,y:.13},left2:{x:-.54,y:-.13},right1:{x:.54,y:-.13},right2:{x:.54,y:.13}},bounds:{minX:-.56,maxX:.56,minY:-.32,maxY:.32,width:1.13,height:.65,centerX:0,centerY:0},circles:{}},VIe=Ln($sr).labelPort(\"left1\",[\"1\",\"DIN\"]).labelPort(\"left2\",[\"2\",\"POWER\"]).labelPort(\"right1\",[\"3\",\"GND\"]).labelPort(\"right2\",[\"4\",\"DOUT\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),qsr=si(VIe,\"down\"),Xsr=pK(VIe),het=si(VIe,\"up\"),pet=het.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),met=het.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");pet.anchor=\"middle_left\",met.anchor=\"middle_left\",pet.y+=.21,pet.x=.44,met.y-=.21,met.x=.44;var Zsr=het,ear={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:-.01,y:0}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:.01,y:-.12},{x:.01,y:.14}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.28,y:-.25},{x:.28,y:-.56}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.28,y:.56},{x:.28,y:.27}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.17,y:-.22},{x:.28,y:-.23},{x:.23,y:-.14}],color:\"primary\",fill:!0},path17:{type:\"path\",points:[{x:.08,y:-.09},{x:.23,y:-.2}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.11},{x:.28,y:.26}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.02,y:-.42}},refblocks:{top1:{x:.28,y:.56},bottom1:{x:.28,y:-.56},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.17,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.14,y:.01,radius:.29,color:\"primary\",fill:!1}}},Syn=Ln(ear).changeTextAnchor(\"{VAL}\",\"middle_right\").labelPort(\"left1\",[\"3\"]).labelPort(\"top1\",[\"2\"]).labelPort(\"bottom1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),_et=si(Syn),fet=_et.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Qyn=_et.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");fet.anchor=\"middle_left\",Qyn.anchor=\"middle_right\",fet.x=.45,fet.y+=.065,Qyn.y+=.065;var tar=_et,nar={paths:{\"path12-1-8-6-9\":{type:\"path\",points:[{x:.02,y:-.02},{x:.02,y:-.1}],color:\"primary\",fill:!1},\"path12-1-5-6\":{type:\"path\",points:[{x:-.47,y:-.19},{x:-.17,y:-.19}],color:\"primary\",fill:!1},\"path12-1-5-6-8\":{type:\"path\",points:[{x:.02,y:.17},{x:.02,y:.11}],color:\"primary\",fill:!1},\"path12-1-8-0\":{type:\"path\",points:[{x:-.15,y:-.03},{x:.2,y:-.19}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.2,y:-.19},{x:.47,y:-.19}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4\":{type:\"path\",points:[{x:.02,y:.12},{x:.02,y:.02}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-3\":{type:\"path\",points:[{x:.08,y:.11},{x:.08,y:.05}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-3-1\":{type:\"path\",points:[{x:-.04,y:.11},{x:-.04,y:.05}],color:\"primary\",fill:!1},\"path12-1-8-6-9-4-4\":{type:\"path\",points:[{x:.08,y:.11},{x:-.04,y:.11}],color:\"primary\",fill:!1},\"path14-5\":{type:\"path\",points:[{x:-.01,y:.28},{x:.01,y:.25},{x:.04,y:.23},{x:.06,y:.2}],color:\"primary\",fill:!0},\"path14-5-3\":{type:\"path\",points:[{x:-.01,y:.2},{x:.01,y:.23},{x:.04,y:.25},{x:.06,y:.28}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.38},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.38}},refblocks:{left1:{x:-.47,y:-.19},right1:{x:.47,y:-.19}},bounds:{minX:-.5,maxX:.5,minY:-.38,maxY:.38,width:1,height:.76,centerX:0,centerY:0},circles:{path9:{type:\"circle\",x:.02,y:.24,radius:.06,color:\"primary\",fill:!1}}},vyn=Ln(nar).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),wyn=si(vyn),Pyn=wyn.primitives.filter(t=\u003et.type===\"text\"),Iet=Pyn.find(t=\u003et.text===\"{VAL}\");Iet.x=-.35,Iet.y=0,Iet.anchor=\"middle_right\";var Cet=Pyn.find(t=\u003et.text===\"{REF}\");Cet.y=0,Cet.x=.35,Cet.anchor=\"middle_left\";var oar=wyn,zIe={paths:{path8698:{type:\"path\",points:[{x:-.19796749999999919,y:-.023826854587889912},{x:-.2004570399999992,y:-.018993393814014044},{x:-.2029465799999992,y:-.014174384106555204},{x:-.20543611999999922,y:-.009384187436300498},{x:-.20792565999999923,y:-.004636988132081332},{x:-.21041519999999925,y:5329457033053167e-20},{x:-.21290473999999926,y:.004673092344940184},{x:-.21539427999999927,y:.009209271428771242},{x:-.21788381999999928,y:.013649213595881985},{x:-.2203733599999993,y:.01798089395292432},{x:-.2228628999999993,y:.022192955076609913},{x:-.22535243999999932,y:.02627477703600152},{x:-.22784197999999933,y:.030216542867918667},{x:-.23033151999999935,y:.03400929910178016},{x:-.23282105999999936,y:.03764501096072756},{x:-.23531059999999937,y:.04111661189869628},{x:-.23780013999999938,y:.04441804716802203},{x:-.2402896799999994,y:.04754431114897349},{x:-.2427792199999994,y:.05049147821106258},{x:-.24526875999999942,y:.053256726915861724},{x:-.24775829999999943,y:.05583835741211009},{x:-.25024783999999944,y:.05823580191586174},{x:-.25273737999999946,y:.060449628211062575},{x:-.25522691999999947,y:.0624815361489735},{x:-.2577164599999995,y:.06433434716802203},{x:-.2602059999999995,y:.06601198689869628},{x:-.2626955399999995,y:.06751946096072757},{x:-.2651850799999995,y:.06886282410178016},{x:-.26767461999999953,y:.07004914286791866},{x:-.27016415999999954,y:.0710864520360015},{x:-.27265369999999955,y:.07198370507660991},{x:-.27514323999999957,y:.07275071895292433},{x:-.2776327799999996,y:.07339811359588198},{x:-.2801223199999996,y:.07393724642877124},{x:-.2826118599999996,y:.07438014234494018},{x:-.2851013999999996,y:.07473941957033053},{x:-.28759093999999963,y:.07502821186791866},{x:-.29008047999999964,y:.07526008756369952},{x:-.29257001999999965,y:.07544896589344477},{x:-.29505955999999967,y:.07560903118598594},{x:-.2975490999999997,y:.07575464541211008},{x:-.30003863749999965,y:.07560903118598594},{x:-.3025281749999997,y:.07544896589344477},{x:-.30501771249999965,y:.07526008756369951},{x:-.3075072499999996,y:.07502821186791866},{x:-.30999678749999965,y:.07473941957033052},{x:-.3124863249999996,y:.07438014234494018},{x:-.3149758624999996,y:.07393724642877124},{x:-.31746539999999956,y:.07339811359588198},{x:-.3199549374999996,y:.07275071895292431},{x:-.32244447499999956,y:.07198370507660991},{x:-.32493401249999954,y:.0710864520360015},{x:-.32742354999999956,y:.07004914286791866},{x:-.32991308749999954,y:.06886282410178016},{x:-.3324026249999995,y:.06751946096072756},{x:-.33489216249999954,y:.06601198689869628},{x:-.3373816999999995,y:.06433434716802203},{x:-.3398712374999995,y:.06248153614897349},{x:-.3423607749999995,y:.06044962821106258},{x:-.3448503124999994,y:.05823580191586174},{x:-.34733984999999945,y:.05583835741211009},{x:-.3498293874999995,y:.053256726915861724},{x:-.35231892499999945,y:.050491478211062576},{x:-.3548084624999994,y:.0475443111489735},{x:-.3572979999999994,y:.04441804716802203},{x:-.35978753749999937,y:.04111661189869628},{x:-.3622770749999994,y:.03764501096072756},{x:-.36476661249999937,y:.03400929910178016},{x:-.36725614999999934,y:.030216542867918673},{x:-.36974568749999936,y:.02627477703600152},{x:-.37223522499999934,y:.022192955076609917},{x:-.3747247624999993,y:.017980893952924324},{x:-.37721429999999934,y:.013649213595881985},{x:-.3797038374999993,y:.00920927142877125},{x:-.3821933749999993,y:.004673092344940191},{x:-.3846829124999993,y:5329457033053514e-20},{x:-.3871724499999993,y:-.004636988132081328},{x:-.38966198749999925,y:-.009384187436300498},{x:-.3921515249999992,y:-.014174384106555197},{x:-.39464106249999925,y:-.01899339381401404},{x:-.3971305999999992,y:-.023826854587889912}],color:\"primary\",fill:!1},path8700:{type:\"path\",points:[{x:.0011955000000007932,y:-.02382615458789039},{x:-.00129403749999919,y:-.01899269131401453},{x:-.0037835749999991734,y:-.014173679106555696},{x:-.006273112499999156,y:-.009383479936300985},{x:-.00876264999999914,y:-.004636278132081827},{x:-.011252187499999122,y:5400707033003174e-20},{x:-.013741724999999105,y:.004673807344939681},{x:-.016231262499999087,y:.009209988928770731},{x:-.018720799999999073,y:.013649933595881476},{x:-.021210337499999055,y:.017981616452923805},{x:-.023699874999999038,y:.022193680076609393},{x:-.026189412499999024,y:.026275504536001},{x:-.028678949999999002,y:.030217272867918137},{x:-.03116848749999899,y:.034010031601779636},{x:-.03365802499999897,y:.03764574596072702},{x:-.03614756249999895,y:.04111734939869574},{x:-.03863709999999894,y:.04441878716802149},{x:-.04112663749999892,y:.04754505364897295},{x:-.043616174999998904,y:.05049222321106203},{x:-.04610571249999888,y:.05325747441586117},{x:-.04859524999999887,y:.055839107412109526},{x:-.051084787499998854,y:.05823655441586117},{x:-.05357432499999884,y:.06045038321106201},{x:-.05606386249999881,y:.06248229364897292},{x:-.0585533999999988,y:.06433510716802145},{x:-.061042937499998784,y:.0660127493986957},{x:-.06353247499999877,y:.06752022596072697},{x:-.06602201249999876,y:.06886359160177957},{x:-.06851154999999873,y:.07004991286791806},{x:-.07100108749999871,y:.07108722453600091},{x:-.0734906249999987,y:.0719844800766093},{x:-.07598016249999869,y:.07275149645292371},{x:-.07846969999999867,y:.07339889359588138},{x:-.08095923749999864,y:.07393802892877062},{x:-.08344877499999863,y:.07438092734493956},{x:-.08593831249999861,y:.07474020707032991},{x:-.0884278499999986,y:.07502900186791804},{x:-.09091738749999859,y:.07526088006369888},{x:-.09340692499999856,y:.07544976089344414},{x:-.09589646249999854,y:.0756098286859853},{x:-.09838599999999853,y:.07575544541210943},{x:-.10087553999999854,y:.0756098286859853},{x:-.10336507999999855,y:.07544976089344414},{x:-.10585461999999857,y:.07526088006369887},{x:-.10834415999999858,y:.07502900186791804},{x:-.11083369999999859,y:.0747402070703299},{x:-.1133232399999986,y:.07438092734493956},{x:-.11581277999999862,y:.07393802892877062},{x:-.11830231999999863,y:.07339889359588138},{x:-.12079185999999864,y:.07275149645292371},{x:-.12328139999999865,y:.0719844800766093},{x:-.12577093999999867,y:.07108722453600091},{x:-.12826047999999868,y:.07004991286791806},{x:-.1307500199999987,y:.06886359160177957},{x:-.1332395599999987,y:.06752022596072697},{x:-.13572909999999871,y:.0660127493986957},{x:-.13821863999999873,y:.06433510716802145},{x:-.14070817999999874,y:.06248229364897291},{x:-.14319771999999875,y:.06045038321106202},{x:-.14568725999999876,y:.05823655441586117},{x:-.14817679999999878,y:.055839107412109526},{x:-.1506663399999988,y:.05325747441586117},{x:-.1531558799999988,y:.05049222321106202},{x:-.1556454199999988,y:.047545053648972956},{x:-.15813495999999883,y:.04441878716802149},{x:-.16062449999999884,y:.04111734939869574},{x:-.16311403999999885,y:.03764574596072702},{x:-.16560357999999886,y:.034010031601779636},{x:-.16809311999999887,y:.03021727286791814},{x:-.1705826599999989,y:.026275504536001},{x:-.1730721999999989,y:.022193680076609396},{x:-.1755617399999989,y:.017981616452923805},{x:-.17805127999999892,y:.013649933595881474},{x:-.18054081999999894,y:.00920998892877074},{x:-.18303035999999895,y:.0046738073449396865},{x:-.18551989999999896,y:5400707033003521e-20},{x:-.18800943999999897,y:-.004636278132081827},{x:-.19049897999999899,y:-.009383479936300985},{x:-.192988519999999,y:-.01417367910655569},{x:-.19547805999999898,y:-.018992691314014522},{x:-.19796759999999902,y:-.02382615458789039}],color:\"primary\",fill:!1},path8702:{type:\"path\",points:[{x:.2003586000000006,y:-.02382615458789039},{x:.19786906000000057,y:-.01899269131401453},{x:.19537952000000058,y:-.014173679106555696},{x:.19288998000000057,y:-.009383479936300985},{x:.1904004400000006,y:-.004636278132081827},{x:.18791090000000055,y:5400707033003174e-20},{x:.1854213600000005,y:.004673807344939681},{x:.18293182000000052,y:.009209988928770731},{x:.1804422800000005,y:.013649933595881476},{x:.17795274000000053,y:.017981616452923805},{x:.17546320000000049,y:.022193680076609393},{x:.17297366000000047,y:.026275504536001},{x:.17048412000000046,y:.030217272867918137},{x:.16799458000000045,y:.034010031601779636},{x:.16550504000000044,y:.03764574596072702},{x:.16301550000000042,y:.04111734939869574},{x:.1605259600000004,y:.04441878716802149},{x:.1580364200000004,y:.04754505364897295},{x:.1555468800000004,y:.05049222321106203},{x:.15305734000000037,y:.05325747441586117},{x:.15056780000000036,y:.055839107412109526},{x:.14807826000000035,y:.05823655441586117},{x:.14558872000000034,y:.06045038321106201},{x:.14309918000000033,y:.06248229364897292},{x:.1406096400000003,y:.06433510716802145},{x:.1381201000000003,y:.0660127493986957},{x:.1356305600000003,y:.06752022596072697},{x:.13314102000000028,y:.06886359160177957},{x:.13065148000000026,y:.07004991286791806},{x:.12816194000000025,y:.07108722453600091},{x:.12567240000000024,y:.0719844800766093},{x:.12318286000000023,y:.07275149645292371},{x:.12069332000000021,y:.07339889359588138},{x:.1182037800000002,y:.07393802892877062},{x:.11571424000000019,y:.07438092734493956},{x:.11322470000000018,y:.07474020707032991},{x:.11073516000000017,y:.07502900186791804},{x:.10824562000000015,y:.07526088006369888},{x:.10575608000000014,y:.07544976089344414},{x:.10326654000000013,y:.0756098286859853},{x:.10077700000000012,y:.07575544541210943},{x:.09828746250000013,y:.0756098286859853},{x:.09579792500000014,y:.07544976089344414},{x:.09330838750000017,y:.07526088006369887},{x:.09081885000000019,y:.07502900186791804},{x:.0883293125000002,y:.0747402070703299},{x:.08583977500000022,y:.07438092734493956},{x:.08335023750000023,y:.07393802892877062},{x:.08086070000000026,y:.07339889359588138},{x:.07837116250000027,y:.07275149645292371},{x:.07588162500000029,y:.0719844800766093},{x:.0733920875000003,y:.07108722453600091},{x:.07090255000000031,y:.07004991286791806},{x:.06841301250000034,y:.06886359160177957},{x:.06592347500000036,y:.06752022596072697},{x:.06343393750000037,y:.0660127493986957},{x:.060944400000000384,y:.06433510716802145},{x:.0584548625000004,y:.06248229364897291},{x:.05596532500000043,y:.06045038321106202},{x:.05347578750000044,y:.05823655441586117},{x:.050986250000000455,y:.055839107412109526},{x:.04849671250000047,y:.05325747441586117},{x:.04600717500000048,y:.05049222321106202},{x:.04351763750000051,y:.047545053648972956},{x:.041028100000000525,y:.04441878716802149},{x:.03853856250000054,y:.04111734939869574},{x:.036049025000000554,y:.03764574596072702},{x:.03355948750000057,y:.034010031601779636},{x:.031069950000000596,y:.03021727286791814},{x:.02858041250000061,y:.026275504536001},{x:.026090875000000624,y:.022193680076609396},{x:.023601337500000638,y:.017981616452923805},{x:.021111800000000652,y:.013649933595881474},{x:.01862226250000068,y:.00920998892877074},{x:.016132725000000694,y:.0046738073449396865},{x:.013643187500000709,y:5400707033003521e-20},{x:.011153650000000723,y:-.004636278132081827},{x:.008664112500000737,y:-.009383479936300985},{x:.006174575000000764,y:-.01417367910655569},{x:.0036850375000007786,y:-.018992691314014522},{x:.0011955000000007932,y:-.02382615458789039}],color:\"primary\",fill:!1},path8704:{type:\"path\",points:[{x:.3995216000000006,y:-.02382615458789039},{x:.39703206250000056,y:-.01899269131401453},{x:.3945425250000006,y:-.014173679106555696},{x:.3920529875000006,y:-.009383479936300985},{x:.38956345000000064,y:-.004636278132081827},{x:.38707391250000067,y:5400707033003174e-20},{x:.3845843750000007,y:.004673807344939681},{x:.38209483750000073,y:.009209988928770731},{x:.37960530000000076,y:.013649933595881476},{x:.3771157625000008,y:.017981616452923805},{x:.37462622500000076,y:.022193680076609393},{x:.37213668750000073,y:.026275504536001},{x:.36964715000000076,y:.030217272867918137},{x:.3671576125000008,y:.034010031601779636},{x:.3646680750000008,y:.03764574596072702},{x:.36217853750000084,y:.04111734939869574},{x:.3596890000000008,y:.04441878716802149},{x:.3571994625000009,y:.04754505364897295},{x:.35470992500000087,y:.05049222321106203},{x:.35222038750000095,y:.05325747441586117},{x:.3497308500000009,y:.055839107412109526},{x:.3472413125000009,y:.05823655441586117},{x:.344751775000001,y:.06045038321106201},{x:.34226223750000095,y:.06248229364897292},{x:.33977270000000104,y:.06433510716802145},{x:.337283162500001,y:.0660127493986957},{x:.334793625000001,y:.06752022596072697},{x:.33230408750000107,y:.06886359160177957},{x:.3298145500000011,y:.07004991286791806},{x:.32732501250000107,y:.07108722453600091},{x:.3248354750000011,y:.0719844800766093},{x:.3223459375000011,y:.07275149645292371},{x:.3198564000000011,y:.07339889359588138},{x:.3173668625000012,y:.07393802892877062},{x:.31487732500000115,y:.07438092734493956},{x:.3123877875000012,y:.07474020707032991},{x:.3098982500000012,y:.07502900186791804},{x:.30740871250000124,y:.07526088006369888},{x:.30491917500000126,y:.07544976089344414},{x:.30242963750000124,y:.0756098286859853},{x:.29994010000000126,y:.07575544541210943},{x:.29745056000000125,y:.0756098286859853},{x:.29496102000000124,y:.07544976089344414},{x:.2924714800000012,y:.07526088006369887},{x:.2899819400000012,y:.07502900186791804},{x:.2874924000000012,y:.0747402070703299},{x:.2850028600000012,y:.07438092734493956},{x:.2825133200000012,y:.07393802892877062},{x:.28002378000000117,y:.07339889359588138},{x:.27753424000000115,y:.07275149645292371},{x:.27504470000000114,y:.0719844800766093},{x:.27255516000000113,y:.07108722453600091},{x:.2700656200000011,y:.07004991286791806},{x:.2675760800000011,y:.06886359160177957},{x:.2650865400000011,y:.06752022596072697},{x:.2625970000000011,y:.0660127493986957},{x:.26010746000000107,y:.06433510716802145},{x:.25761792000000105,y:.06248229364897291},{x:.25512838000000104,y:.06045038321106202},{x:.25263884000000103,y:.05823655441586117},{x:.250149300000001,y:.055839107412109526},{x:.247659760000001,y:.05325747441586117},{x:.245170220000001,y:.05049222321106202},{x:.24268068000000098,y:.047545053648972956},{x:.24019114000000097,y:.04441878716802149},{x:.23770160000000096,y:.04111734939869574},{x:.23521206000000094,y:.03764574596072702},{x:.23272252000000093,y:.034010031601779636},{x:.23023298000000092,y:.03021727286791814},{x:.2277434400000009,y:.026275504536001},{x:.2252539000000009,y:.022193680076609396},{x:.22276436000000088,y:.017981616452923805},{x:.22027482000000087,y:.013649933595881474},{x:.21778528000000086,y:.00920998892877074},{x:.21529574000000085,y:.0046738073449396865},{x:.21280620000000083,y:5400707033003521e-20},{x:.21031666000000082,y:-.004636278132081827},{x:.2078271200000008,y:-.009383479936300985},{x:.2053375800000008,y:-.01417367910655569},{x:.20284804000000078,y:-.018992691314014522},{x:.20035850000000077,y:-.02382615458789039}],color:\"primary\",fill:!1},path8706:{type:\"path\",points:[{x:-.40026109999999937,y:-.022544054587890106},{x:-.5272914999999991,y:-.022544054587890106}],color:\"primary\",fill:!1},\"path8706-5\":{type:\"path\",points:[{x:.5282280000000006,y:-.027111054587890093},{x:.4011975999999997,y:-.027111054587890093}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.0020145999999989783,y:.22997364541210996},bottom1:{type:\"text\",text:\"{VAL}\",x:-.002185205294839676,y:-.22997364541210996}},refblocks:{left1:{x:-.5279125,y:-.021272154587890446},right1:{x:.5279125,y:-.026521254587889898}},bounds:{minX:-.556070941,maxX:.556070941,minY:-.22997364541210996,maxY:.22997364541210996,width:1.112141882,height:.4599472908242199,centerX:0,centerY:0},circles:{}},iar=Ln(zIe).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\",{x:-.5,y:0}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.5,y:0}).build(),rar=Ln(zIe).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.5}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.5}).build(),sar=Ln(zIe).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),aar=Ln(zIe).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Myn={paths:{path11:{type:\"path\",points:[{x:-.54,y:-.06},{x:-.15,y:-.06}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.13,y:-.05},{x:-.13,y:-.18}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.13,y:.08},{x:.13,y:-.05}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.13,y:-.18},{x:-.13,y:.08}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.13,y:.08},{x:.13,y:-.18}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.14,y:-.05},{x:.54,y:-.06}],color:\"primary\",fill:!1},\"path25-0-9-8\":{type:\"path\",points:[{x:-.03,y:.39},{x:-.05,y:.47},{x:-.08,y:.39}],color:\"primary\",fill:!0},\"path78-6-5-5\":{type:\"path\",points:[{x:-.05,y:.27},{x:-.05,y:.29},{x:-.05,y:.41},{x:-.05,y:.42}],color:\"primary\",fill:!1},\"path25-0-9-8-2\":{type:\"path\",points:[{x:.07,y:.39},{x:.04,y:.47},{x:.02,y:.39}],color:\"primary\",fill:!0},\"path78-6-5-5-7\":{type:\"path\",points:[{x:.04,y:.27},{x:.04,y:.29},{x:.04,y:.41},{x:.04,y:.42}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:.03,y:.06},{x:.03,y:-.16}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.38,y:.38},bottom1:{type:\"text\",text:\"{VAL}\",x:.38,y:-.47}},refblocks:{left1:{x:-.54,y:-.06},right1:{x:.54,y:-.06}},bounds:{minX:-.57,maxX:.57,minY:-.47,maxY:.47,width:1.14,height:.93,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:-.05,radius:.29,color:\"primary\",fill:!1}}};Myn.bounds.width+=.2;var JIe=Ln(Myn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),yet=si(JIe,\"down\"),xet=yet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Eet=yet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");xet.anchor=\"middle_left\",Eet.anchor=\"middle_left\",xet.y+=.9,xet.x=.3,Eet.y-=.1,Eet.x=.3;var Aar=yet,Bet=si(JIe,\"left\"),bet=Bet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Qet=Bet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");bet.anchor=\"middle_left\",Qet.anchor=\"middle_left\",bet.y+=.71,bet.x=.44,Qet.y-=.71,Qet.x=.44;var car=Bet,vet=si(JIe,\"up\"),wet=vet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Pet=vet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");wet.anchor=\"middle_left\",Pet.anchor=\"middle_left\",wet.y+=.1,wet.x=.3,Pet.y-=.71,Pet.x=.3;var lar=vet,uar={paths:{path45:{type:\"path\",points:[{x:.14,y:0},{x:-.13,y:-.14}],color:\"primary\",fill:!1},\"path1-8\":{type:\"path\",points:[{x:.13,y:0},{x:.54,y:0}],color:\"primary\",fill:!1},path46:{type:\"path\",points:[{x:-.13,y:.13},{x:.14,y:0}],color:\"primary\",fill:!1},path47:{type:\"path\",points:[{x:-.13,y:-.14},{x:-.13,y:.13}],color:\"primary\",fill:!1},path48:{type:\"path\",points:[{x:.14,y:.13},{x:.14,y:-.14}],color:\"primary\",fill:!1},path49:{type:\"path\",points:[{x:-.13,y:0},{x:-.54,y:0}],color:\"primary\",fill:!1},path25:{type:\"path\",points:[{x:.16,y:.29},{x:.25,y:.3},{x:.22,y:.21}],color:\"primary\",fill:!0},path78:{type:\"path\",points:[{x:.08,y:.17},{x:.09,y:.17},{x:.21,y:.27},{x:.21,y:.27}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:-.02,y:.31},{x:.08,y:.32},{x:.04,y:.23}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:-.1,y:.19},{x:-.09,y:.2},{x:.04,y:.29},{x:.04,y:.29}],color:\"primary\",fill:!1}},texts:{bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.21},right1:{type:\"text\",text:\"{REF}\",x:0,y:.41}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.13,height:.65,centerX:0,centerY:0},circles:{}},{paths:gar,texts:Dyn,bounds:WIe,refblocks:Nyn,circles:dar}=uar,Met=Gl({primitives:[...Object.values(gar),...Object.values(dar),{...Dyn.bottom1,anchor:\"middle_top\"},{...Dyn.right1,anchor:\"middle_bottom\"}],ports:[{...Nyn.left1,labels:[\"1\"]},{...Nyn.right1,labels:[\"2\"]}],size:{width:WIe.width,height:WIe.height},center:{x:WIe.centerX,y:WIe.centerY}}),Det=si(Met,\"up\"),Net=Det.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ret=Det.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Net.anchor=\"middle_left\",Ret.anchor=\"middle_left\",Net.y+=.21,Net.x=.21,Ret.y-=.21,Ret.x=.21;var Ryn=Det,Tet=hK(Ryn),ket=Tet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Fet=Tet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ket.anchor=\"middle_left\",Fet.anchor=\"middle_left\",ket.y+=.4,ket.x=.2,Fet.y-=.41,Fet.x=.2;var har=Tet,par=pK(Met),mar={paths:{path11:{type:\"path\",points:[{x:-.52,y:-.01},{x:-.18,y:-.01}],color:\"primary\",fill:!1},\"path11-2\":{type:\"path\",points:[{x:-.17,y:-.11},{x:-.17,y:.08}],color:\"primary\",fill:!1},\"path11-5\":{type:\"path\",points:[{x:-.17,y:-.12},{x:.16,y:-.12}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:-.17,y:.08},{x:.16,y:.08}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.17,y:-.01},{x:.52,y:-.01}],color:\"primary\",fill:!1},\"path11-2-1\":{type:\"path\",points:[{x:.16,y:-.12},{x:.16,y:.08}],color:\"primary\",fill:!1},\"path25-0-9\":{type:\"path\",points:[{x:-.4,y:-.21},{x:-.33,y:-.18},{x:-.34,y:-.27}],color:\"primary\",fill:!0},\"path78-6-5\":{type:\"path\",points:[{x:-.45,y:-.34},{x:-.44,y:-.32},{x:-.35,y:-.22},{x:-.35,y:-.22}],color:\"primary\",fill:!1},\"path25-0-9-0\":{type:\"path\",points:[{x:-.3,y:-.34},{x:-.22,y:-.31},{x:-.24,y:-.4}],color:\"primary\",fill:!0},\"path78-6-5-9\":{type:\"path\",points:[{x:-.35,y:-.46},{x:-.34,y:-.45},{x:-.25,y:-.35},{x:-.25,y:-.35}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.17,y:-.41},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:.46}},refblocks:{left1:{x:-.52,y:-.01},right1:{x:.52,y:-.01}},bounds:{width:1.1,height:.62,centerX:0,centerY:-.02},circles:{path1:{type:\"circle\",x:0,y:-.02,radius:.28,color:\"primary\",fill:!1}}},{paths:_ar,texts:Tyn,bounds:jIe,refblocks:kyn,circles:far}=mar,Fyn=Gl({primitives:[...Object.values(_ar),...Object.values(far),{...Tyn.top1,anchor:\"middle_left\",x:0},{...Tyn.bottom1,anchor:\"middle_left\",x:0}],ports:[{...kyn.left1,labels:[\"1\"]},{...kyn.right1,labels:[\"2\"]}],size:{width:jIe.width,height:jIe.height},center:{x:jIe.centerX,y:jIe.centerY}}),Lyn=si(Fyn),Hyn=Lyn.primitives.filter(t=\u003et.type===\"text\"),Let=Hyn.find(t=\u003et.text===\"{VAL}\");Let.x=-.35,Let.y=0,Let.anchor=\"middle_right\";var Het=Hyn.find(t=\u003et.text===\"{REF}\");Het.y=0,Het.x=.35,Het.anchor=\"middle_left\";var Iar=Lyn,Car={paths:{path208:{type:\"path\",points:[{x:.38,y:.13},{x:.52,y:-.13}],color:\"primary\",fill:!1},path209:{type:\"path\",points:[{x:.25,y:-.13},{x:.38,y:.13}],color:\"primary\",fill:!1},path210:{type:\"path\",points:[{x:.52,y:-.13},{x:.25,y:-.13}],color:\"primary\",fill:!1},path211:{type:\"path\",points:[{x:.25,y:.13},{x:.52,y:.13}],color:\"primary\",fill:!1},path212:{type:\"path\",points:[{x:.12,y:-.4},{x:.38,y:-.4}],color:\"primary\",fill:!1},path213:{type:\"path\",points:[{x:.38,y:.4},{x:.12,y:.4}],color:\"primary\",fill:!1},path214:{type:\"path\",points:[{x:.12,y:.54},{x:.12,y:.18}],color:\"primary\",fill:!1},path215:{type:\"path\",points:[{x:.12,y:-.54},{x:.12,y:0}],color:\"primary\",fill:!1},path216:{type:\"path\",points:[{x:.38,y:-.4},{x:.38,y:.4}],color:\"primary\",fill:!1},path217:{type:\"path\",points:[{x:-.14,y:.26},{x:-.14,y:-.27}],color:\"primary\",fill:!1},path218:{type:\"path\",points:[{x:-.22,y:-.27},{x:-.22,y:.26}],color:\"primary\",fill:!1},path219:{type:\"path\",points:[{x:-.54,y:-.27},{x:-.22,y:-.27}],color:\"primary\",fill:!1},path220:{type:\"path\",points:[{x:-.14,y:-.19},{x:.12,y:-.19}],color:\"primary\",fill:!1},path221:{type:\"path\",points:[{x:-.14,y:.18},{x:.12,y:.18}],color:\"primary\",fill:!1},path222:{type:\"path\",points:[{x:-.07,y:0},{x:.12,y:0}],color:\"primary\",fill:!1}},texts:{right1:{type:\"text\",text:\"{VAL}\",x:.57,y:.02},right2:{type:\"text\",text:\"{REF}\",x:.57,y:.21}},refblocks:{top1:{x:.12,y:.54},bottom1:{x:.12,y:-.54},left1:{x:-.54,y:-.27}},bounds:{centerX:0,centerY:0}};function cte(t,e){return{width:Math.max(...e.map(n=\u003eMath.abs(n.x-t.x)))*2,height:Math.max(...e.map(n=\u003eMath.abs(n.y-t.y)))*2}}var{paths:yar,texts:Oyn,bounds:Gyn,refblocks:BK}=Car,Yyn={x:Gyn.centerX+.2,y:Gyn.centerY},Uyn=Gl({primitives:[...Object.values(yar),{...Oyn.right1,anchor:\"middle_left\"},{...Oyn.right2,anchor:\"middle_left\"}],ports:[{...BK.top1,labels:[\"1\"]},{...BK.bottom1,labels:[\"2\"]},{...BK.left1,labels:[\"3\"]}],size:cte(Yyn,[BK.top1,BK.bottom1,BK.left1]),center:Yyn}),Oet=si(Uyn),Kyn=Oet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Get=Oet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Kyn.anchor=\"middle_top\",Get.anchor=\"middle_top\",Kyn.x=Get.x,Get.y+=.15;var xar=Oet,Ear={paths:{\"path12-1-8-6-9\":{type:\"path\",points:[{x:.01,y:.07},{x:.01,y:-.01}],color:\"primary\",fill:!1},\"path12-1-5-6\":{type:\"path\",points:[{x:-.47,y:-.09},{x:-.17,y:-.09}],color:\"primary\",fill:!1},\"path12-1-8-0\":{type:\"path\",points:[{x:-.16,y:-.01},{x:.17,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.2,y:-.09},{x:.47,y:-.09}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:-.1,y:.06},{x:-.1,y:.06},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.07},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.08},{x:-.1,y:.09},{x:-.09,y:.09},{x:-.09,y:.09},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.1},{x:-.09,y:.11},{x:-.09,y:.11},{x:-.08,y:.11},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.08,y:.12},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.07,y:.13},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.06,y:.14},{x:-.05,y:.14},{x:-.05,y:.15},{x:-.05,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.04,y:.15},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.03,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.02,y:.16},{x:-.01,y:.16},{x:-.01,y:.16},{x:0,y:.16},{x:0,y:.16},{x:0,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.01,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.02,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.03,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.04,y:.16},{x:.05,y:.15},{x:.05,y:.15},{x:.05,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.15},{x:.06,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.07,y:.14},{x:.08,y:.14},{x:.08,y:.13},{x:.08,y:.13},{x:.08,y:.13},{x:.09,y:.13},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.09,y:.12},{x:.1,y:.11},{x:.1,y:.11},{x:.1,y:.1},{x:.1,y:.1},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.09},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.08},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.07},{x:.11,y:.06},{x:.11,y:.06},{x:.1,y:.06},{x:.1,y:.06},{x:.09,y:.06},{x:.09,y:.06},{x:.08,y:.06},{x:.07,y:.06},{x:.07,y:.06},{x:.06,y:.06},{x:.05,y:.06},{x:.05,y:.06},{x:.04,y:.06},{x:.03,y:.06},{x:.03,y:.06},{x:.02,y:.06},{x:.01,y:.06},{x:.01,y:.06},{x:0,y:.06},{x:-.01,y:.06},{x:-.01,y:.06},{x:-.02,y:.06},{x:-.03,y:.06},{x:-.03,y:.06},{x:-.04,y:.06},{x:-.05,y:.06},{x:-.05,y:.06},{x:-.06,y:.06},{x:-.07,y:.06},{x:-.07,y:.06},{x:-.08,y:.06},{x:-.09,y:.06},{x:-.09,y:.06}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:-.16,y:-.27}},refblocks:{left1:{x:-.47,y:-.09},right1:{x:.47,y:-.09}},bounds:{width:1,height:.53,centerX:0,centerY:0},circles:{}},{paths:Bar,texts:Vyn,bounds:$Ie,refblocks:zyn,circles:bar}=Ear,Jyn=Gl({primitives:[...Object.values(Bar),...Object.values(bar),{...Vyn.top1,anchor:\"middle_bottom\",x:0},{...Vyn.bottom1,anchor:\"middle_top\",x:0}],ports:[{...zyn.left1,labels:[\"1\"]},{...zyn.right1,labels:[\"2\"]}],size:{width:$Ie.width,height:$Ie.height},center:{x:$Ie.centerX+.006,y:$Ie.centerY+.06}}),Yet=si(Jyn),lte=Yet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),qIe=Yet.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");lte.anchor=\"middle_left\",qIe.anchor=\"middle_right\",lte.x=lte.x-.03,lte.y=lte.y,qIe.x=qIe.x,qIe.y=0;var Sar=Yet,t0=({horizontalSymbol:t,verticalSymbol:e,gateSide:n,drainSide:o})=\u003e{let i=n===\"left\"||n===\"right\",r=o===\"left\"||o===\"right\";if(i===r)throw new Error(`Invalid MOSFET orientation: gate ${n}, drain ${o}. Gate and drain must be perpendicular.`);let s=i?t:e;return(n===\"right\"||r\u0026\u0026o===\"left\")\u0026\u0026(s=pK(s)),(n===\"bottom\"||!r\u0026\u0026o===\"bottom\")\u0026\u0026(s=hK(s)),s},Qar={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:war,texts:Wyn,bounds:jyn,refblocks:bK,circles:Par}=Qar,$yn={x:jyn.centerX,y:jyn.centerY},r8=Gl({primitives:[...Object.values(war),...Object.values(Par),{...Wyn.top1,anchor:\"middle_right\",x:0},{...Wyn.bottom1,anchor:\"middle_right\",x:0}],ports:[{...bK.top1,labels:[\"1\",\"drain\"]},{...bK.bottom1,labels:[\"2\",\"source\"]},{...bK.left1,labels:[\"3\",\"gate\"]}],size:cte($yn,[bK.top1,bK.bottom1,bK.left1]),center:$yn}),qyn=si(r8),Xyn=qyn.primitives.filter(t=\u003et.type===\"text\"),Uet=Xyn.find(t=\u003et.text===\"{VAL}\");Uet.x=-.35,Uet.y=0,Uet.anchor=\"middle_right\";var Ket=Xyn.find(t=\u003et.text===\"{REF}\");Ket.y=0,Ket.x=.35,Ket.anchor=\"middle_left\";var YS=qyn,Mar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"bottom\",drainSide:\"left\"}),Dar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"bottom\",drainSide:\"right\"}),Nar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"left\",drainSide:\"bottom\"}),Rar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"left\",drainSide:\"top\"}),Tar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"right\",drainSide:\"bottom\"}),kar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"right\",drainSide:\"top\"}),Far=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"top\",drainSide:\"left\"}),Lar=t0({horizontalSymbol:r8,verticalSymbol:YS,gateSide:\"top\",drainSide:\"right\"}),Har={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-8-3-7\":{type:\"path\",points:[{x:.09,y:.15},{x:.09,y:.07}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},\"path2-8-3\":{type:\"path\",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:\"primary\",fill:!1},\"path2-8-3-2\":{type:\"path\",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.27,y:-.04},{x:.27,y:.03},{x:.2,y:0},{x:.27,y:-.04}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:Oar,texts:Zyn,bounds:e2n,refblocks:SK,circles:Gar}=Har,t2n={x:e2n.centerX,y:e2n.centerY},s8=Gl({primitives:[...Object.values(Oar),...Object.values(Gar),{...Zyn.top1,anchor:\"middle_right\",x:0},{...Zyn.bottom1,anchor:\"middle_right\",x:0}],ports:[{...SK.top1,labels:[\"1\",\"drain\"]},{...SK.bottom1,labels:[\"2\",\"source\"]},{...SK.left1,labels:[\"3\",\"gate\"]}],size:cte(t2n,[SK.top1,SK.bottom1,SK.left1]),center:t2n}),n2n=si(s8),o2n=n2n.primitives.filter(t=\u003et.type===\"text\"),Vet=o2n.find(t=\u003et.text===\"{VAL}\");Vet.x=-.35,Vet.y=0,Vet.anchor=\"middle_right\";var zet=o2n.find(t=\u003et.text===\"{REF}\");zet.y=0,zet.x=.35,zet.anchor=\"middle_left\";var US=n2n,Yar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"bottom\",drainSide:\"left\"}),Uar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"bottom\",drainSide:\"right\"}),Kar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"left\",drainSide:\"bottom\"}),Var=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"left\",drainSide:\"top\"}),zar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"right\",drainSide:\"bottom\"}),Jar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"right\",drainSide:\"top\"}),War=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"top\",drainSide:\"left\"}),jar=t0({horizontalSymbol:s8,verticalSymbol:US,gateSide:\"top\",drainSide:\"right\"}),$ar={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.28,y:.55},{x:.28,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.11},{x:.29,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:-.08,y:.06},{x:-.08,y:-.07},{x:.01,y:0},{x:-.08,y:.06}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.15,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:qar,texts:i2n,bounds:XIe,refblocks:Jet,circles:Xar}=$ar,r2n=Gl({primitives:[...Object.values(qar),...Object.values(Xar),{...i2n.top1,anchor:\"middle_right\",x:0},{...i2n.bottom1,anchor:\"middle_right\",x:0}],ports:[{...Jet.top1,labels:[\"1\",\"drain\"]},{...Jet.bottom1,labels:[\"2\",\"source\"]},{...Jet.left1,labels:[\"3\",\"gate\"]}],size:{width:XIe.width,height:XIe.height},center:{x:XIe.centerX,y:XIe.centerY}}),s2n=si(r2n),a2n=s2n.primitives.filter(t=\u003et.type===\"text\"),Wet=a2n.find(t=\u003et.text===\"{VAL}\");Wet.x=-.35,Wet.y=0,Wet.anchor=\"middle_right\";var jet=a2n.find(t=\u003et.text===\"{REF}\");jet.y=0,jet.x=.35,jet.anchor=\"middle_left\";var Zar=s2n,eAr={paths:{diag1:{type:\"path\",points:[{x:-.1,y:-.1},{x:.1,y:.1}],color:\"primary\",fill:!1},diag2:{type:\"path\",points:[{x:-.1,y:.1},{x:.1,y:-.1}],color:\"primary\",fill:!1},stem:{type:\"path\",points:[{x:-.2,y:0},{x:0,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.2,y:0}},bounds:{centerX:0,centerY:0}},{paths:tAr,bounds:A2n,refblocks:nAr}=eAr,ZIe=Ln({primitives:[...Object.values(tAr)],ports:[{...nAr.left1,labels:[\"1\"]}],center:{x:A2n.centerX,y:A2n.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).build(),oAr=si(ZIe,\"down\"),iAr=si(ZIe,\"left\"),rAr=si(ZIe,\"up\"),QK={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:.28,y:.24},{x:.08,y:.11}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:.25},{x:.29,y:.55}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.19,y:-.1},{x:.12,y:-.2},{x:.22,y:-.2},{x:.19,y:-.1}],color:\"primary\",fill:!0}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{\"path1-0\":{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:sAr,bounds:eCe,refblocks:$et,circles:aAr}=QK,AAr=Ln({primitives:[...Object.values(sAr),...Object.values(aAr),{type:\"text\",text:\"{REF}\",x:-.3,y:.5094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.5094553499999995}],ports:[{...$et.top1,labels:[\"1\",\"collector\"]},{...$et.bottom1,labels:[\"3\",\"emitter\"]},{...$et.left1,labels:[\"2\",\"base\"]}],size:{width:eCe.width,height:eCe.height},center:{x:eCe.centerX,y:eCe.centerY}}).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_right\").build(),{paths:cAr,bounds:tCe,refblocks:qet,circles:lAr}=QK,uAr=Ln({primitives:[...Object.values(cAr),...Object.values(lAr),{type:\"text\",text:\"{REF}\",x:.55,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.4094553499999995}],ports:[{...qet.top1,labels:[\"1\",\"collector\"]},{...qet.bottom1,labels:[\"3\",\"emitter\"]},{...qet.left1,labels:[\"2\",\"base\"]}],size:{width:tCe.width,height:tCe.height},center:{x:tCe.centerX,y:tCe.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:gAr,bounds:nCe,refblocks:Xet,circles:dAr}=QK,hAr=Ln({primitives:[...Object.values(gAr),...Object.values(dAr),{type:\"text\",text:\"{REF}\",x:-.5,y:.3094553499999995},{type:\"text\",text:\"{VAL}\",x:.55,y:.3094553499999995}],ports:[{...Xet.top1,labels:[\"1\",\"collector\"]},{...Xet.bottom1,labels:[\"3\",\"emitter\"]},{...Xet.left1,labels:[\"2\",\"base\"]}],size:{width:nCe.width,height:nCe.height},center:{x:nCe.centerX,y:nCe.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:pAr,bounds:oCe,refblocks:Zet,circles:mAr}=QK,_Ar=Ln({primitives:[...Object.values(pAr),...Object.values(mAr),{type:\"text\",text:\"{REF}\",x:.55,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.4094553499999995}],ports:[{...Zet.top1,labels:[\"1\",\"collector\"]},{...Zet.bottom1,labels:[\"3\",\"emitter\"]},{...Zet.left1,labels:[\"2\",\"base\"]}],size:{width:oCe.width,height:oCe.height},center:{x:oCe.centerX,y:oCe.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:fAr,bounds:iCe,refblocks:ett,circles:IAr}=QK,CAr=Ln({primitives:[...Object.values(fAr),...Object.values(IAr),{type:\"text\",text:\"{REF}\",x:-.3,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:.4094553499999995}],ports:[{...ett.top1,labels:[\"1\",\"collector\"]},{...ett.bottom1,labels:[\"3\",\"emitter\"]},{...ett.left1,labels:[\"2\",\"base\"]}],size:{width:iCe.width,height:iCe.height},center:{x:iCe.centerX,y:iCe.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:yAr,bounds:rCe,refblocks:ttt,circles:xAr}=QK,EAr=Ln({primitives:[...Object.values(yAr),...Object.values(xAr),{type:\"text\",text:\"{REF}\",x:-.3,y:-.4094553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:.4094553499999995}],ports:[{...ttt.top1,labels:[\"1\",\"collector\"]},{...ttt.bottom1,labels:[\"3\",\"emitter\"]},{...ttt.left1,labels:[\"2\",\"base\"]}],size:{width:rCe.width,height:rCe.height},center:{x:rCe.centerX,y:rCe.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),BAr={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.43,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"rect1577-3\":{type:\"path\",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.3}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},sCe=Ln(BAr).labelPort(\"left1\",[\"1\",\"inp1\"]).labelPort(\"left2\",[\"2\",\"inp2\"]).labelPort(\"right1\",[\"3\",\"out\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),bAr=si(sCe,\"down\"),SAr=hK(si(sCe,\"left\")),QAr=si(sCe,\"up\"),vAr={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.32,y:-.21}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.32,y:.31},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.32,y:-.21},{x:-.32,y:.31}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:.18},{x:-.57,y:.18}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-.32,y:-.09},{x:-.57,y:-.09}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.43,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path44-1\":{type:\"path\",points:[{x:-.1,y:.44},{x:-.1,y:.18}],color:\"primary\",fill:!1},\"path44-2\":{type:\"path\",points:[{x:-.09,y:-.34},{x:-.09,y:-.09}],color:\"primary\",fill:!1},\"rect1577-3\":{type:\"path\",points:[{x:-.19,y:.18},{x:-.27,y:.18}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-.19,y:-.09},{x:-.27,y:-.09}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-.23,y:.14},{x:-.23,y:.22}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.25,y:.32},bottom1:{type:\"text\",text:\"{VAL}\",x:.25,y:-.24}},refblocks:{left1:{x:-.57,y:.18},left2:{x:-.57,y:-.09},right1:{x:.43,y:.04},top2:{x:-.1,y:.44},bottom1:{x:-.09,y:-.34}},bounds:{minX:-.57,maxX:.43,minY:-.38,maxY:.27,width:1.09,height:.3,centerX:-.07,centerY:.05},circles:{}},aCe=Ln(vAr).labelPort(\"left1\",[\"1\",\"inp1\"]).labelPort(\"left2\",[\"2\",\"inp2\"]).labelPort(\"right1\",[\"4\",\"out\"]).labelPort(\"top2\",[\"5\",\"V+\"]).labelPort(\"bottom1\",[\"3\",\"V-\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),wAr=si(aCe,\"down\"),PAr=hK(si(aCe,\"left\")),MAr=si(aCe,\"up\"),DAr={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.09,y:.19},{x:.09,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.17},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:NAr,texts:c2n,bounds:l2n,refblocks:vK,circles:RAr}=DAr,u2n={x:l2n.centerX,y:l2n.centerY},a8=Gl({primitives:[...Object.values(NAr),...Object.values(RAr),{...c2n.top1,anchor:\"middle_right\",x:0},{...c2n.bottom1,anchor:\"middle_right\",x:0}],ports:[{...vK.top1,labels:[\"1\",\"drain\"]},{...vK.bottom1,labels:[\"2\",\"source\"]},{...vK.left1,labels:[\"3\",\"gate\"]}],size:cte(u2n,[vK.top1,vK.bottom1,vK.left1]),center:u2n}),g2n=si(a8),d2n=g2n.primitives.filter(t=\u003et.type===\"text\"),ntt=d2n.find(t=\u003et.text===\"{VAL}\");ntt.x=-.35,ntt.y=0,ntt.anchor=\"middle_right\";var ott=d2n.find(t=\u003et.text===\"{REF}\");ott.y=0,ott.x=.35,ott.anchor=\"middle_left\";var KS=g2n,TAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"bottom\",drainSide:\"left\"}),kAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"bottom\",drainSide:\"right\"}),FAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"left\",drainSide:\"bottom\"}),LAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"left\",drainSide:\"top\"}),HAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"right\",drainSide:\"bottom\"}),OAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"right\",drainSide:\"top\"}),GAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"top\",drainSide:\"left\"}),YAr=t0({horizontalSymbol:a8,verticalSymbol:KS,gateSide:\"top\",drainSide:\"right\"}),UAr={paths:{path11:{type:\"path\",points:[{x:-.42,y:-.1},{x:.05,y:-.11}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.3,y:.55},{x:.3,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.31,y:-.55},{x:.31,y:-.01}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.09,y:.11},{x:.31,y:.11}],color:\"primary\",fill:!1},\"path2-8-3-7\":{type:\"path\",points:[{x:.09,y:.15},{x:.09,y:.07}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.09,y:-.1},{x:.31,y:-.1}],color:\"primary\",fill:!1},\"path2-8-3\":{type:\"path\",points:[{x:.09,y:-.08},{x:.09,y:-.15}],color:\"primary\",fill:!1},\"path2-8-3-2\":{type:\"path\",points:[{x:.09,y:.03},{x:.09,y:-.04}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.2,y:.03},{x:.2,y:-.04},{x:.27,y:-.01},{x:.2,y:.03}],color:\"primary\",fill:!0},\"path2-0\":{type:\"path\",points:[{x:.09,y:0},{x:.31,y:-.01}],color:\"primary\",fill:!1},\"path12-1-0\":{type:\"path\",points:[{x:.05,y:.11},{x:.05,y:-.11}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.13,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.06,y:-.42}},refblocks:{top1:{x:.3,y:.55},bottom1:{x:.31,y:-.55},left1:{x:-.42,y:-.1}},bounds:{centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.16,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:KAr,texts:h2n,bounds:p2n,refblocks:wK,circles:VAr}=UAr,m2n={x:p2n.centerX,y:p2n.centerY},A8=Gl({primitives:[...Object.values(KAr),...Object.values(VAr),{...h2n.top1,anchor:\"middle_right\",x:0},{...h2n.bottom1,anchor:\"middle_right\",x:0}],ports:[{...wK.top1,labels:[\"1\",\"drain\"]},{...wK.bottom1,labels:[\"2\",\"source\"]},{...wK.left1,labels:[\"3\",\"gate\"]}],size:cte(m2n,[wK.top1,wK.bottom1,wK.left1]),center:m2n}),_2n=si(A8),f2n=_2n.primitives.filter(t=\u003et.type===\"text\"),itt=f2n.find(t=\u003et.text===\"{VAL}\");itt.x=-.35,itt.y=0,itt.anchor=\"middle_right\";var rtt=f2n.find(t=\u003et.text===\"{REF}\");rtt.y=0,rtt.x=.35,rtt.anchor=\"middle_left\";var VS=_2n,zAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"bottom\",drainSide:\"left\"}),JAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"bottom\",drainSide:\"right\"}),WAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"left\",drainSide:\"bottom\"}),jAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"left\",drainSide:\"top\"}),$Ar=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"right\",drainSide:\"bottom\"}),qAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"right\",drainSide:\"top\"}),XAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"top\",drainSide:\"left\"}),ZAr=t0({horizontalSymbol:A8,verticalSymbol:VS,gateSide:\"top\",drainSide:\"right\"}),ecr={paths:{path11:{type:\"path\",points:[{x:-.54,y:-.01},{x:-.15,y:-.02}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.13,y:0},{x:-.13,y:-.13}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.13,y:.13},{x:.13,y:0}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.13,y:-.13},{x:-.13,y:.13}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.13,y:.13},{x:.13,y:-.13}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.14,y:0},{x:.54,y:-.01}],color:\"primary\",fill:!1},\"path25-0\":{type:\"path\",points:[{x:.2,y:.38},{x:.16,y:.28},{x:.26,y:.3}],color:\"primary\",fill:!0},\"path78-6\":{type:\"path\",points:[{x:.33,y:.43},{x:.32,y:.42},{x:.21,y:.31},{x:.21,y:.31}],color:\"primary\",fill:!1},\"path25-0-9\":{type:\"path\",points:[{x:.35,y:.35},{x:.31,y:.26},{x:.41,y:.27}],color:\"primary\",fill:!0},\"path78-6-5\":{type:\"path\",points:[{x:.48,y:.4},{x:.47,y:.39},{x:.35,y:.29},{x:.35,y:.29}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.1,y:.35},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.43}},refblocks:{left1:{x:-.54,y:-.01},right1:{x:.54,y:-.01}},bounds:{minX:-.57,maxX:.57,minY:-.43,maxY:.43,width:1.14,height:.85,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:-.01,radius:.29,color:\"primary\",fill:!1}}},I2n=Ln(ecr).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),C2n=si(I2n),tcr=C2n.primitives.filter(t=\u003et.type===\"text\"),y2n=tcr.find(t=\u003et.text===\"{REF}\");y2n.y=0,y2n.anchor=\"middle_left\";var ncr=C2n,ocr={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},path40:{type:\"path\",points:[{x:.07,y:.19},{x:.07,y:-.18}],color:\"primary\",fill:!1},\"path12-1\":{type:\"path\",points:[{x:.28,y:.55},{x:.28,y:.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.1}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.11},{x:.29,y:.11}],color:\"primary\",fill:!1},\"path2-5\":{type:\"path\",points:[{x:.07,y:-.1},{x:.29,y:-.1}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.01,y:-.07},{x:.01,y:.06},{x:-.08,y:0},{x:.01,y:-.07}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.15,y:.36},bottom1:{type:\"text\",text:\"{VAL}\",x:.04,y:-.42}},refblocks:{top1:{x:.28,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{width:.85,height:1.16,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:icr,texts:x2n,bounds:ACe,refblocks:stt,circles:rcr}=ocr,E2n=Gl({primitives:[...Object.values(icr),...Object.values(rcr),{...x2n.top1,anchor:\"middle_right\",x:0},{...x2n.bottom1,anchor:\"middle_right\"}],ports:[{...stt.top1,labels:[\"1\",\"drain\"]},{...stt.bottom1,labels:[\"2\",\"source\"]},{...stt.left1,labels:[\"3\",\"gate\"]}],size:{width:ACe.width,height:ACe.height},center:{x:ACe.centerX,y:ACe.centerY}}),B2n=si(E2n),b2n=B2n.primitives.filter(t=\u003et.type===\"text\"),att=b2n.find(t=\u003et.text===\"{VAL}\");att.x=-.35,att.y=0,att.anchor=\"middle_right\";var Att=b2n.find(t=\u003et.text===\"{REF}\");Att.y=0,Att.x=.35,Att.anchor=\"middle_left\";var scr=B2n,uk={paths:{path11:{type:\"path\",points:[{x:-.4,y:0},{x:.06,y:-.01}],color:\"primary\",fill:!1},\"path40-0\":{type:\"path\",points:[{x:.07,y:.27},{x:.07,y:-.28}],color:\"primary\",fill:!1},\"path40-0-5\":{type:\"path\",points:[{x:.28,y:.24},{x:.08,y:.11}],color:\"primary\",fill:!1},\"path40-0-5-0\":{type:\"path\",points:[{x:.29,y:-.24},{x:.09,y:-.11}],color:\"primary\",fill:!1},\"path12-1-5\":{type:\"path\",points:[{x:.29,y:.25},{x:.29,y:.55}],color:\"primary\",fill:!1},\"path12-1-5-3\":{type:\"path\",points:[{x:.29,y:-.55},{x:.29,y:-.25}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:.15,y:-.23},{x:.22,y:-.12},{x:.12,y:-.12},{x:.15,y:-.23}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.08,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:-.07,y:-.41}},refblocks:{top1:{x:.29,y:.55},bottom1:{x:.29,y:-.55},left1:{x:-.4,y:0}},bounds:{minX:-.43,maxX:.43,minY:-.58,maxY:.58,width:.85,height:1.16,centerX:0,centerY:0},circles:{\"path1-0\":{type:\"circle\",x:.14,y:0,radius:.29,color:\"primary\",fill:!1}}},{paths:acr,texts:u_r,bounds:cCe,refblocks:ctt,circles:Acr}=uk,ccr=Ln({primitives:[...Object.values(acr),...Object.values(Acr),{type:\"text\",text:\"{REF}\",x:-.1,y:.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:-.3094553499999995}],ports:[{...ctt.top1,labels:[\"1\",\"collector\"]},{...ctt.bottom1,labels:[\"3\",\"emitter\"]},{...ctt.left1,labels:[\"2\",\"base\"]}],size:{width:cCe.width,height:cCe.height},center:{x:cCe.centerX,y:cCe.centerY}}).rotateRightFacingSymbol(\"right\").changeTextAnchor(\"{REF}\",\"middle_right\").changeTextAnchor(\"{VAL}\",\"middle_right\").build(),{paths:g_r,texts:d_r,bounds:h_r,refblocks:p_r,circles:m_r}=uk,lcr=Ln(uk).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{VAL}\",\"middle_left\").labelPort(\"left1\",[\"2\",\"base\"]).labelPort(\"top1\",[\"1\",\"collector\"]).labelPort(\"bottom1\",[\"3\",\"emitter\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:ucr,texts:__r,bounds:lCe,refblocks:ltt,circles:gcr}=uk,dcr=Ln({primitives:[...Object.values(ucr),...Object.values(gcr),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...ltt.top1,labels:[\"1\",\"collector\"]},{...ltt.bottom1,labels:[\"3\",\"emitter\"]},{...ltt.left1,labels:[\"2\",\"base\"]}],size:{width:lCe.width,height:lCe.height},center:{x:lCe.centerX,y:lCe.centerY}}).rotateRightFacingSymbol(\"down\").changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_bottom\").build(),{paths:hcr,texts:f_r,bounds:uCe,refblocks:utt,circles:pcr}=uk,mcr=Ln({primitives:[...Object.values(hcr),...Object.values(pcr),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...utt.top1,labels:[\"1\",\"collector\"]},{...utt.bottom1,labels:[\"3\",\"emitter\"]},{...utt.left1,labels:[\"2\",\"base\"]}],size:{width:uCe.width,height:uCe.height},center:{x:uCe.centerX,y:uCe.centerY}}).rotateRightFacingSymbol(\"up\").changeTextAnchor(\"{REF}\",\"middle_top\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:_cr,texts:I_r,bounds:gCe,refblocks:gtt,circles:fcr}=uk,Icr=Ln({primitives:[...Object.values(_cr),...Object.values(fcr),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...gtt.top1,labels:[\"1\",\"collector\"]},{...gtt.bottom1,labels:[\"3\",\"emitter\"]},{...gtt.left1,labels:[\"2\",\"base\"]}],size:{width:gCe.width,height:gCe.height},center:{x:gCe.centerX,y:gCe.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Ccr,texts:C_r,bounds:dCe,refblocks:dtt,circles:ycr}=uk,xcr=Ln({primitives:[...Object.values(Ccr),...Object.values(ycr),{type:\"text\",text:\"{REF}\",x:-.1,y:-.3094553499999995},{type:\"text\",text:\"{VAL}\",x:-.1,y:.3094553499999995}],ports:[{...dtt.top1,labels:[\"1\",\"collector\"]},{...dtt.bottom1,labels:[\"3\",\"emitter\"]},{...dtt.left1,labels:[\"2\",\"base\"]}],size:{width:dCe.width,height:dCe.height},center:{x:dCe.centerX,y:dCe.centerY}}).rotateRightFacingSymbol(\"left\").changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Ecr={paths:{path40:{type:\"path\",points:[{x:-.19,y:.33},{x:-.26,y:.14}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.38,y:.26},{x:-.19,y:.33}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.26,y:.14},{x:-.38,y:.26}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-.26,y:.39},{x:-.13,y:.26}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:.2},{x:-.52,y:0}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:.52},{x:-.19,y:.33}],color:\"primary\",fill:!1},\"path40-4\":{type:\"path\",points:[{x:-.19,y:-.32},{x:-.38,y:-.26}],color:\"primary\",fill:!1},\"path41-1\":{type:\"path\",points:[{x:-.26,y:-.13},{x:-.19,y:-.32}],color:\"primary\",fill:!1},\"path42-7\":{type:\"path\",points:[{x:-.38,y:-.26},{x:-.26,y:-.13}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:-.13,y:-.26},{x:-.26,y:-.39}],color:\"primary\",fill:!1},\"path44-8\":{type:\"path\",points:[{x:-.32,y:-.19},{x:-.51,y:-.01}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:-.01,y:-.5},{x:-.19,y:-.32}],color:\"primary\",fill:!1},\"path40-4-0\":{type:\"path\",points:[{x:.32,y:.19},{x:.13,y:.26}],color:\"primary\",fill:!1},\"path41-1-2\":{type:\"path\",points:[{x:.26,y:.38},{x:.32,y:.19}],color:\"primary\",fill:!1},\"path42-7-1\":{type:\"path\",points:[{x:.13,y:.26},{x:.26,y:.38}],color:\"primary\",fill:!1},\"path43-1-8\":{type:\"path\",points:[{x:.39,y:.26},{x:.26,y:.13}],color:\"primary\",fill:!1},\"path44-8-7\":{type:\"path\",points:[{x:.2,y:.32},{x:.01,y:.51}],color:\"primary\",fill:!1},\"path44-0-7-1\":{type:\"path\",points:[{x:.52,y:0},{x:.32,y:.19}],color:\"primary\",fill:!1},\"path40-4-8\":{type:\"path\",points:[{x:.32,y:-.19},{x:.26,y:-.38}],color:\"primary\",fill:!1},\"path41-1-4\":{type:\"path\",points:[{x:.13,y:-.26},{x:.32,y:-.19}],color:\"primary\",fill:!1},\"path42-7-0\":{type:\"path\",points:[{x:.26,y:-.38},{x:.13,y:-.26}],color:\"primary\",fill:!1},\"path43-1-0\":{type:\"path\",points:[{x:.26,y:-.13},{x:.39,y:-.26}],color:\"primary\",fill:!1},\"path44-8-9\":{type:\"path\",points:[{x:.19,y:-.32},{x:0,y:-.52}],color:\"primary\",fill:!1},\"path44-0-7-3\":{type:\"path\",points:[{x:.5,y:-.01},{x:.32,y:-.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.29,y:.46},bottom1:{type:\"text\",text:\"{VAL}\",x:-.29,y:-.5}},refblocks:{left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.09,centerX:0,centerY:0}},{paths:Bcr,texts:S2n,bounds:hCe,refblocks:Q2n}=Ecr,v2n=Gl({primitives:[...Object.values(Bcr),{...S2n.bottom1,y:.35,anchor:\"middle_top\"},{...S2n.top1,anchor:\"middle_left\"}],ports:[{...Q2n.left1,labels:[\"1\"]},{...Q2n.right1,labels:[\"2\"]}],size:{width:hCe.width+.05,height:hCe.height},center:{x:hCe.centerX,y:hCe.centerY}}),bcr=si(v2n),Scr=bcr,Qcr={paths:{path18:{type:\"path\",points:[{x:-.53,y:0},{x:-.27,y:0}],color:\"primary\",fill:!1},path19:{type:\"path\",points:[{x:.26,y:0},{x:.53,y:0}],color:\"primary\",fill:!1},path20:{type:\"path\",points:[{x:0,y:.13},{x:.26,y:.13},{x:.26,y:-.13},{x:-.27,y:-.13},{x:-.27,y:.13},{x:0,y:.13}],color:\"primary\",fill:!1},path24:{type:\"path\",points:[{x:.29,y:-.29},{x:.26,y:-.16},{x:.16,y:-.26},{x:.29,y:-.29}],color:\"primary\",fill:!0},path26:{type:\"path\",points:[{x:-.3,y:.29},{x:.2,y:-.2}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.06,y:.2},bottom1:{type:\"text\",text:\"{VAL}\",x:-.1,y:-.28}},refblocks:{left1:{x:-.53,y:0},right1:{x:.53,y:0}},bounds:{width:1.13,height:.58,centerX:0,centerY:0}},{paths:vcr,texts:w2n,bounds:pCe,refblocks:P2n}=Qcr,mCe=Gl({primitives:[...Object.values(vcr),{...w2n.bottom1,x:0,y:-.35,anchor:\"middle_top\"},{...w2n.top1,x:0,y:.35,anchor:\"middle_bottom\"}],ports:[{...P2n.left1,labels:[\"1\"]},{...P2n.right1,labels:[\"2\"]}],size:{width:pCe.width+.05,height:pCe.height},center:{x:pCe.centerX,y:pCe.centerY}}),htt=si(mCe,\"down\"),ptt=htt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),mtt=htt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ptt.anchor=\"middle_left\",mtt.anchor=\"middle_left\",ptt.y+=.31,ptt.x=.34,mtt.y-=.31,mtt.x=.34;var wcr=htt,_tt=si(mCe,\"left\"),ftt=_tt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Itt=_tt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ftt.anchor=\"middle_bottom\",Itt.anchor=\"middle_top\",ftt.y+=.73,ftt.x=0,Itt.y-=.7,Itt.x=0;var Pcr=_tt,Ctt=si(mCe,\"up\"),ytt=Ctt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),xtt=Ctt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ytt.anchor=\"middle_left\",xtt.anchor=\"middle_left\",ytt.y+=.21,ytt.x=.34,xtt.y-=.21,xtt.x=.34;var Mcr=Ctt,_Ce={paths:{path1:{type:\"path\",points:[{x:-.42,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},\"path1-2-1\":{type:\"path\",points:[{x:-.3,y:0},{x:-.25,y:.1},{x:-.15,y:-.1},{x:-.05,y:.1},{x:.05,y:-.1},{x:.15,y:.1},{x:.25,y:-.1},{x:.3,y:0}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.3,y:0},{x:.42,y:0}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:0,y:-.17},{x:0,y:-.4}],color:\"primary\",fill:!1},path15:{type:\"path\",points:[{x:0,y:-.12},{x:.05,y:-.2},{x:-.05,y:-.2},{x:0,y:-.12}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.3,y:.25},bottom1:{type:\"text\",text:\"{VAL}\",x:.3,y:-.25}},refblocks:{left:{x:-.42,y:0},right:{x:.42,y:0},bottom:{x:0,y:-.4}},bounds:{minX:-.42,maxX:.42,minY:-.2,maxY:.2,width:.84,height:.4,centerX:0,centerY:0},circles:{}},{paths:Dcr,texts:y_r,bounds:fCe,refblocks:Ett,circles:Ncr}=_Ce,Rcr=Ln({primitives:[...Object.values(Dcr),...Object.values(Ncr),{type:\"text\",text:\"{REF}\",x:-.15,y:.2394553499999995},{type:\"text\",text:\"{VAL}\",x:.15,y:.2394553499999995}],ports:[{...Ett.left,labels:[\"1\"]},{...Ett.right,labels:[\"3\"]},{...Ett.bottom,labels:[\"2\"]}],size:{width:fCe.width,height:fCe.height},center:{x:fCe.centerX,y:fCe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:Tcr,texts:x_r,bounds:ICe,refblocks:Btt,circles:kcr}=_Ce,Fcr=Ln({primitives:[...Object.values(Tcr),...Object.values(kcr),{type:\"text\",text:\"{REF}\",x:-.3,y:-.3894553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:.3194553499999995}],ports:[{...Btt.left,labels:[\"1\"]},{...Btt.right,labels:[\"3\"]},{...Btt.bottom,labels:[\"2\"]}],size:{width:ICe.width,height:ICe.height},center:{x:ICe.centerX,y:ICe.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),Lcr=Ln(_Ce).labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"3\"]).labelPort(\"bottom\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:Hcr,texts:E_r,bounds:CCe,refblocks:btt,circles:Ocr}=_Ce,Gcr=Ln({primitives:[...Object.values(Hcr),...Object.values(Ocr),{type:\"text\",text:\"{REF}\",x:.3,y:-.2894553499999995},{type:\"text\",text:\"{VAL}\",x:-.3,y:-.2894553499999995}],ports:[{...btt.left,labels:[\"1\"]},{...btt.right,labels:[\"3\"]},{...btt.bottom,labels:[\"2\"]}],size:{width:CCe.width,height:CCe.height},center:{x:CCe.centerX,y:CCe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).labelPort(\"bottom\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),Ycr={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.03},{x:.54,y:.03}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{width:1.14,height:.79,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:Ucr,bounds:yCe,refblocks:M2n,circles:Kcr}=Ycr,D2n=Gl({primitives:[...Object.values(Ucr),...Object.values(Kcr),{type:\"text\",text:\"{REF}\",x:0,y:.43330070000000065,anchor:\"middle_bottom\"},{type:\"text\",text:\"{VAL}\",x:0,y:-.43330070000000065,anchor:\"middle_top\"},{type:\"text\",text:\"COS φ\",x:0,y:.014279000000000375,anchor:\"center\"}],ports:[{...M2n.left1,labels:[\"1\"]},{...M2n.right1,labels:[\"2\"]}],size:{width:yCe.width,height:yCe.height},center:{x:yCe.centerX,y:yCe.centerY}}),N2n=si(D2n),Stt=N2n.primitives.filter(t=\u003et.type===\"text\"),Qtt=Stt.find(t=\u003et.text===\"{REF}\"),vtt=Stt.find(t=\u003et.text===\"{VAL}\"),wtt=Stt.find(t=\u003et.text===\"COS φ\");Qtt.x=.35,Qtt.y=.4279000000000375,Qtt.anchor=\"middle_left\",vtt.anchor=\"middle_left\",vtt.x=.35,vtt.y=-.4279000000000375,wtt.x=0,wtt.y=.014279000000000375,wtt.anchor=\"center\";var Vcr=N2n,zcr={paths:{\"path12-1-8-6-9-9\":{type:\"path\",points:[{x:.01,y:.03},{x:.01,y:-.09}],color:\"primary\",fill:!1},\"path12-1-5-6-4\":{type:\"path\",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:\"primary\",fill:!1},\"path12-1-8-0-0\":{type:\"path\",points:[{x:-.16,y:-.09},{x:.18,y:-.09}],color:\"primary\",fill:!1},\"path12-1-0-1\":{type:\"path\",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.22},bottom1:{type:\"text\",text:\"{VAL}\",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:-.14,y:-.05,radius:.02,color:\"primary\",fill:!1},circle:{type:\"circle\",x:.17,y:-.05,radius:.02,color:\"primary\",fill:!1}}},{paths:Jcr,texts:R2n,bounds:T2n,refblocks:k2n,circles:Wcr}=zcr,F2n=Gl({primitives:[...Object.values(Jcr),...Object.values(Wcr),{...R2n.top1,anchor:\"middle_left\"},{...R2n.bottom1,anchor:\"middle_left\"}],ports:[{...k2n.left1,labels:[\"1\"]},{...k2n.right1,labels:[\"2\"]}],center:{x:T2n.centerX,y:T2n.centerY}}),jcr=si(F2n,\"up\"),L2n={paths:{\"path12-1-8-6-9-9\":{type:\"path\",points:[{x:-.05,y:.09},{x:-.05,y:.04}],color:\"primary\",fill:!1},\"path12-1-8-7-9-9\":{type:\"path\",points:[{x:-.05,y:.09},{x:.07,y:.09}],color:\"primary\",fill:!1},\"path12-1-8-6-9-10\":{type:\"path\",points:[{x:.07,y:.09},{x:.07,y:.04}],color:\"primary\",fill:!1},\"path12-1-5-6-4\":{type:\"path\",points:[{x:-.47,y:-.05},{x:-.17,y:-.05}],color:\"primary\",fill:!1},\"path12-1-8-0-0\":{type:\"path\",points:[{x:-.16,y:.04},{x:.18,y:.04}],color:\"primary\",fill:!1},\"path12-1-0-1\":{type:\"path\",points:[{x:.2,y:-.05},{x:.47,y:-.05}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.29},bottom1:{type:\"text\",text:\"{VAL}\",x:-.16,y:-.22}},refblocks:{left1:{x:-.47,y:-.05},right1:{x:.47,y:-.05}},bounds:{centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:-.14,y:-.05,radius:.02,color:\"primary\",fill:!1},circle:{type:\"circle\",x:.17,y:-.05,radius:.02,color:\"primary\",fill:!1}}},{paths:$cr,texts:H2n,bounds:O2n,refblocks:G2n,circles:qcr}=L2n,ute=Gl({primitives:[...Object.values($cr),...Object.values(qcr),{...H2n.top1,x:0,y:.3594553499999995,anchor:\"middle_bottom\"},{...H2n.bottom1,x:0,y:-.3594553499999995,anchor:\"middle_top\"}],ports:[{...G2n.left1,labels:[\"1\"]},{...G2n.right1,labels:[\"2\"]}],center:{x:O2n.centerX,y:O2n.centerY}}),Ptt=si(ute,\"down\"),Mtt=Ptt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Dtt=Ptt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Mtt.anchor=\"middle_bottom\",Dtt.anchor=\"middle_top\",Mtt.y=.4,Mtt.x=.35,Dtt.y=-.4,Dtt.x=.35;var Xcr=Ptt,{paths:Zcr,texts:Y2n,bounds:U2n,refblocks:K2n,circles:elr}=L2n,tlr=Gl({primitives:[...Object.values(Zcr),...Object.values(elr),{...Y2n.top1,x:0,y:.3594553499999995,anchor:\"middle_bottom\"},{...Y2n.bottom1,x:0,y:-.3594553499999995,anchor:\"middle_top\"}],ports:[{...K2n.left1,labels:[\"1\"]},{...K2n.right1,labels:[\"2\"]}],center:{x:U2n.centerX,y:U2n.centerY}}),Ntt=si(ute,\"left\"),Rtt=Ntt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ttt=Ntt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Rtt.anchor=\"middle_bottom\",Ttt.anchor=\"middle_top\",Rtt.y=.4,Rtt.x=0,Ttt.y=-.4,Ttt.x=0;var nlr=Ntt,ktt=si(ute,\"up\"),Ftt=ktt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ltt=ktt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ftt.anchor=\"middle_left\",Ltt.anchor=\"middle_left\",Ftt.y+=.4,Ftt.x=.34,Ltt.y-=.41,Ltt.x=.34;var olr=ktt,Htt=si(ute,\"up\"),Ott=Htt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Gtt=Htt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ott.anchor=\"middle_left\",Gtt.anchor=\"middle_left\",Ott.y+=.4,Ott.x=.34,Gtt.y-=.41,Gtt.x=.34;var ilr=Htt,xCe={paths:{path12_rotated:{type:\"path\",points:[{x:-.09,y:.12},{x:-.09,y:-.12}],color:\"primary\",fill:!1},path2_rotated:{type:\"path\",points:[{x:-.09,y:0},{x:.09,y:0}],color:\"primary\",fill:!1}},refblocks:{left1:{x:.09,y:0}},bounds:{centerX:0,centerY:0},circles:{}},{paths:rlr,bounds:V2n,refblocks:slr,circles:alr}=xCe,Alr=Ln({primitives:[...Object.values(rlr),...Object.values(alr),{type:\"text\",text:\"{REF}\",x:-.14,y:-0}],ports:[{...slr.left1,labels:[\"1\"]}],center:{x:V2n.centerX,y:V2n.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),{paths:clr,bounds:z2n,refblocks:llr,circles:ulr}=xCe,glr=Ln({primitives:[...Object.values(clr),...Object.values(ulr),{type:\"text\",text:\"{REF}\",x:-.13,y:0}],ports:[{...llr.left1,labels:[\"1\"]}],center:{x:z2n.centerX,y:z2n.centerY}}).changeTextAnchor(\"{VAL}\",\"middle_top\").rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),{paths:dlr,bounds:J2n,refblocks:hlr,circles:plr}=xCe,mlr=Ln({primitives:[...Object.values(dlr),...Object.values(plr),{type:\"text\",text:\"{REF}\",x:-.14,y:-0}],ports:[{...hlr.left1,labels:[\"1\"]}],center:{x:J2n.centerX,y:J2n.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),{paths:_lr,bounds:W2n,refblocks:flr}=xCe,Ilr=Ln({primitives:[...Object.values(_lr),{type:\"text\",text:\"{REF}\",x:-.14,y:0}],ports:[{...flr.left1,labels:[\"1\"]}],center:{x:W2n.centerX,y:W2n.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Clr={paths:{path40:{type:\"path\",points:[{x:-.19,y:-.33},{x:-.26,y:-.14}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.38,y:-.26},{x:-.19,y:-.33}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.26,y:-.14},{x:-.38,y:-.26}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:-.26,y:-.39},{x:-.13,y:-.26}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.32,y:-.2},{x:-.52,y:0}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:0,y:-.52},{x:-.19,y:-.33}],color:\"primary\",fill:!1},\"path40-4\":{type:\"path\",points:[{x:-.19,y:.32},{x:-.38,y:.26}],color:\"primary\",fill:!1},\"path41-1\":{type:\"path\",points:[{x:-.26,y:.13},{x:-.19,y:.32}],color:\"primary\",fill:!1},\"path42-7\":{type:\"path\",points:[{x:-.38,y:.26},{x:-.26,y:.13}],color:\"primary\",fill:!1},\"path43-1\":{type:\"path\",points:[{x:-.13,y:.26},{x:-.26,y:.39}],color:\"primary\",fill:!1},\"path44-8\":{type:\"path\",points:[{x:-.32,y:.19},{x:-.51,y:.01}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:-.01,y:.5},{x:-.19,y:.32}],color:\"primary\",fill:!1},\"path40-4-0\":{type:\"path\",points:[{x:.32,y:-.19},{x:.13,y:-.26}],color:\"primary\",fill:!1},\"path41-1-2\":{type:\"path\",points:[{x:.26,y:-.38},{x:.32,y:-.19}],color:\"primary\",fill:!1},\"path42-7-1\":{type:\"path\",points:[{x:.13,y:-.26},{x:.26,y:-.38}],color:\"primary\",fill:!1},\"path43-1-8\":{type:\"path\",points:[{x:.39,y:-.26},{x:.26,y:-.13}],color:\"primary\",fill:!1},\"path44-8-7\":{type:\"path\",points:[{x:.2,y:-.32},{x:.01,y:-.51}],color:\"primary\",fill:!1},\"path44-0-7-1\":{type:\"path\",points:[{x:.52,y:0},{x:.32,y:-.19}],color:\"primary\",fill:!1},\"path40-4-8\":{type:\"path\",points:[{x:.32,y:.19},{x:.26,y:.38}],color:\"primary\",fill:!1},\"path41-1-4\":{type:\"path\",points:[{x:.13,y:.26},{x:.32,y:.19}],color:\"primary\",fill:!1},\"path42-7-0\":{type:\"path\",points:[{x:.26,y:.38},{x:.13,y:.26}],color:\"primary\",fill:!1},\"path43-1-0\":{type:\"path\",points:[{x:.26,y:.13},{x:.39,y:.26}],color:\"primary\",fill:!1},\"path44-8-9\":{type:\"path\",points:[{x:.19,y:.32},{x:0,y:.52}],color:\"primary\",fill:!1},\"path44-0-7-3\":{type:\"path\",points:[{x:.5,y:.01},{x:.32,y:.19}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.29,y:-.46},bottom1:{type:\"text\",text:\"{VAL}\",x:-.29,y:.5}},refblocks:{top1:{x:0,y:-.52},bottom1:{x:0,y:.52},left1:{x:-.52,y:0},right1:{x:.52,y:0}},bounds:{width:1.09,height:1.1,centerX:0,centerY:0},circles:{}},{paths:ylr,texts:j2n,bounds:ECe,refblocks:BCe,circles:xlr}=Clr,$2n=Gl({primitives:[...Object.values(ylr),...Object.values(xlr),{...j2n.top1,anchor:\"middle_right\"},{...j2n.bottom1,anchor:\"middle_right\"}],ports:[{...BCe.top1,labels:[\"1\"]},{...BCe.bottom1,labels:[\"2\"]},{...BCe.left1,labels:[\"3\"]},{...BCe.right1,labels:[\"4\"]}],size:{width:ECe.width,height:ECe.height},center:{x:ECe.centerX,y:ECe.centerY}}),Ytt=si($2n),Elr=Ytt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Blr=Ytt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Elr.anchor=\"middle_left\",Blr.anchor=\"middle_right\";var blr=Ytt,bCe={paths:{path27:{type:\"path\",points:[{x:.47,y:.04},{x:.21,y:.04}],color:\"primary\",fill:!1},\"path27-0\":{type:\"path\",points:[{x:-.21,y:.04},{x:-.47,y:.04}],color:\"primary\",fill:!1},\"path27-8-2-4\":{type:\"path\",points:[{x:.21,y:.04},{x:.19,y:-.05}],color:\"primary\",fill:!1},\"path27-8-2-4-29\":{type:\"path\",points:[{x:-.19,y:.14},{x:-.21,y:.04}],color:\"primary\",fill:!1},\"path27-8-2-4-5\":{type:\"path\",points:[{x:.19,y:-.05},{x:.13,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1\":{type:\"path\",points:[{x:.08,y:-.05},{x:.13,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9\":{type:\"path\",points:[{x:.08,y:-.05},{x:.03,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2\":{type:\"path\",points:[{x:-.03,y:-.05},{x:.03,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1\":{type:\"path\",points:[{x:-.03,y:-.05},{x:-.08,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1-2\":{type:\"path\",points:[{x:-.13,y:-.05},{x:-.08,y:.14}],color:\"primary\",fill:!1},\"path27-8-2-4-5-1-9-2-1-2-2\":{type:\"path\",points:[{x:-.13,y:-.05},{x:-.19,y:.14}],color:\"primary\",fill:!1}},refblocks:{left1:{x:-.47,y:.04},right1:{x:.47,y:.04}},bounds:{width:.99,height:.84,centerX:0,centerY:0},circles:{}},{paths:Slr,bounds:SCe,refblocks:q2n,circles:Qlr}=bCe,vlr=Ln({primitives:[...Object.values(Slr),...Object.values(Qlr),{type:\"text\",text:\"{REF}\",x:-.2,y:.2194553499999995},{type:\"text\",text:\"{VAL}\",x:.2,y:.2194553499999995}],ports:[{...q2n.left1,labels:[\"1\"]},{...q2n.right1,labels:[\"2\"]}],size:{width:SCe.width,height:SCe.height},center:{x:SCe.centerX,y:SCe.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:wlr,bounds:QCe,refblocks:X2n,circles:Plr}=bCe,Mlr=Ln({primitives:[...Object.values(wlr),...Object.values(Plr),{type:\"text\",text:\"{REF}\",x:0,y:-.1704553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:.2294553499999995}],ports:[{...X2n.left1,labels:[\"1\"]},{...X2n.right1,labels:[\"2\"]}],size:{width:QCe.width,height:QCe.height},center:{x:QCe.centerX,y:QCe.centerY}}).rotateRightFacingSymbol(\"left\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:Dlr,bounds:vCe,refblocks:Z2n,circles:Nlr}=bCe,Rlr=Ln({primitives:[...Object.values(Dlr),...Object.values(Nlr),{type:\"text\",text:\"{REF}\",x:0,y:.2294553499999995},{type:\"text\",text:\"{VAL}\",x:0,y:-.1704553499999995}],ports:[{...Z2n.left1,labels:[\"1\"]},{...Z2n.right1,labels:[\"2\"]}],size:{width:vCe.width,height:vCe.height},center:{x:vCe.centerX,y:vCe.centerY}}).rotateRightFacingSymbol(\"right\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),{paths:Tlr,bounds:wCe,refblocks:exn,circles:klr}=bCe,Flr=Ln({primitives:[...Object.values(Tlr),...Object.values(klr),{type:\"text\",text:\"{REF}\",x:.2,y:-.1404553499999995},{type:\"text\",text:\"{VAL}\",x:-.2,y:-.1494553499999995}],ports:[{...exn.left1,labels:[\"1\"]},{...exn.right1,labels:[\"2\"]}],size:{width:wCe.width,height:wCe.height},center:{x:wCe.centerX,y:wCe.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left\",[\"1\"]).labelPort(\"right\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),txn={paths:{path27:{type:\"path\",points:[{x:.76,y:-.28},{x:.31,y:-.28}],color:\"primary\",fill:!1},path28:{type:\"path\",points:[{x:-.3,y:-.02},{x:-.77,y:-.02}],color:\"primary\",fill:!1},path30:{type:\"path\",points:[{x:-.3,y:.35},{x:-.3,y:-.28}],color:\"primary\",fill:!1},\"path27-3\":{type:\"path\",points:[{x:.77,y:.35},{x:.32,y:.35}],color:\"primary\",fill:!1},\"path29-5\":{type:\"path\",points:[{x:-.07,y:-.28},{x:-.3,y:-.28}],color:\"primary\",fill:!1},\"path29-5-7\":{type:\"path\",points:[{x:.33,y:-.28},{x:.11,y:-.28}],color:\"primary\",fill:!1},\"path29-5-7-6\":{type:\"path\",points:[{x:-.06,y:-.17},{x:-.06,y:-.39}],color:\"primary\",fill:!1},\"path29-5-7-6-6\":{type:\"path\",points:[{x:.09,y:-.17},{x:.09,y:-.39}],color:\"primary\",fill:!1},\"path29-5-9\":{type:\"path\",points:[{x:-.07,y:.35},{x:-.3,y:.35}],color:\"primary\",fill:!1},\"path29-5-7-2\":{type:\"path\",points:[{x:.33,y:.35},{x:.11,y:.35}],color:\"primary\",fill:!1},\"path29-5-7-6-0\":{type:\"path\",points:[{x:-.06,y:.46},{x:-.06,y:.24}],color:\"primary\",fill:!1},\"path29-5-7-6-6-2\":{type:\"path\",points:[{x:.09,y:.46},{x:.09,y:.24}],color:\"primary\",fill:!1},\"path29-5-92\":{type:\"path\",points:[{x:.33,y:.13},{x:.33,y:.35}],color:\"primary\",fill:!1},\"path29-5-7-28\":{type:\"path\",points:[{x:.33,y:-.28},{x:.33,y:-.05}],color:\"primary\",fill:!1},\"path29-5-7-6-9\":{type:\"path\",points:[{x:.44,y:.11},{x:.22,y:.11}],color:\"primary\",fill:!1},\"path29-5-7-6-6-7\":{type:\"path\",points:[{x:.44,y:-.04},{x:.22,y:-.04}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2\":{type:\"path\",points:[{x:.44,y:.07},{x:.22,y:.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-4\":{type:\"path\",points:[{x:.44,y:0},{x:.44,y:.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-4-6\":{type:\"path\",points:[{x:.22,y:0},{x:.22,y:.07}],color:\"primary\",fill:!1},\"path29-5-7-6-9-2-9\":{type:\"path\",points:[{x:.44,y:0},{x:.22,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.02,y:.53},bottom1:{type:\"text\",text:\"{VAL}\",x:.01,y:-.54}},refblocks:{left1:{x:-.77,y:-.02},right1:{x:.76,y:-.28},right2:{x:.77,y:.35}},bounds:{width:1.59,height:1.07,centerX:0,centerY:0},circles:{}},{paths:Llr,texts:nxn,bounds:PCe,refblocks:Utt,circles:Hlr}=txn,MCe=Gl({primitives:[...Object.values(Llr),...Object.values(Hlr),{...nxn.top1,anchor:\"middle_bottom\"},{...nxn.bottom1,anchor:\"middle_top\"}],ports:[{...Utt.left1,labels:[\"1\"]},{...Utt.right1,labels:[\"2\"]},{...Utt.right2,labels:[\"3\"]}],size:{width:PCe.width,height:PCe.height},center:{x:PCe.centerX,y:PCe.centerY}}),Ktt=si(MCe,\"down\"),Vtt=Ktt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),ztt=Ktt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Vtt.anchor=\"middle_bottom\",ztt.anchor=\"middle_top\",Vtt.y+=.3,Vtt.x+=.101,ztt.y-=.49999,ztt.x+=1.19999;var Olr=Ktt,{paths:Glr,bounds:DCe,refblocks:Jtt,circles:Ylr}=txn,oxn=Gl({primitives:[...Object.values(Glr),...Object.values(Ylr),{type:\"text\",text:\"{REF}\",x:.01596175000000022,y:-.5308501500000009,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:.013116750000000454,y:.5408501499999989,anchor:\"middle_bottom\"}],ports:[{...Jtt.left1,labels:[\"1\"]},{...Jtt.right1,labels:[\"2\"]},{...Jtt.right2,labels:[\"3\"]}],size:{width:DCe.width,height:DCe.height},center:{x:DCe.centerX,y:DCe.centerY}}),Wtt=si(MCe,\"left\"),jtt=Wtt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),$tt=Wtt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");jtt.anchor=\"middle_bottom\",$tt.anchor=\"middle_top\",jtt.y+=.99,jtt.x-=0,$tt.y-=1.10999,$tt.x=0;var Ulr=Wtt,qtt=si(MCe,\"up\"),Xtt=qtt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ztt=qtt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Xtt.anchor=\"middle_bottom\",Ztt.anchor=\"middle_top\",Xtt.y+=.499,Xtt.x=.62,Ztt.y-=.29999,Ztt.x+=.1;var Klr=qtt,Vlr=si(oxn),zlr={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-7\":{type:\"path\",points:[{x:.21,y:.18},{x:.14,y:.18}],color:\"primary\",fill:!1},\"path43-7-9\":{type:\"path\",points:[{x:.21,y:.13},{x:.21,y:.18}],color:\"primary\",fill:!1},\"path43-7-2\":{type:\"path\",points:[{x:.08,y:-.09},{x:.14,y:-.09}],color:\"primary\",fill:!1},\"path43-7-9-3\":{type:\"path\",points:[{x:.08,y:-.04},{x:.08,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},NCe=Ln(zlr).labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{VAL}\",\"middle_top\").changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),ent=si(NCe,\"down\"),tnt=ent.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),nnt=ent.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");tnt.anchor=\"middle_left\",nnt.anchor=\"middle_left\",tnt.y+=.3,tnt.x=.3,nnt.y-=.3,nnt.x=.3;var Jlr=ent,ont=si(NCe,\"left\"),int=ont.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),rnt=ont.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");int.anchor=\"middle_bottom\",rnt.anchor=\"middle_top\",int.y+=.5,int.x=0,rnt.y-=.55,rnt.x=0;var Wlr=ont,snt=si(NCe,\"up\"),ant=snt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Ant=snt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");ant.anchor=\"middle_left\",Ant.anchor=\"middle_left\",ant.y+=.3,ant.x=.3,Ant.y-=.3,Ant.x=.3;var jlr=snt,ixn={paths:{path11:{type:\"path\",points:[{x:-.52,y:.04},{x:-.18,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.19,y:.05},{x:.52,y:.05}],color:\"primary\",fill:!1},\"path12-6\":{type:\"path\",points:[{x:.18,y:-.15},{x:.18,y:.25}],color:\"primary\",fill:!1},\"path12-2\":{type:\"path\",points:[{x:.19,y:0},{x:.35,y:-.14}],color:\"primary\",fill:!1},\"path12-2-9\":{type:\"path\",points:[{x:.35,y:-.14},{x:.34,y:-.35}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.17,y:.27},{x:-.17,y:-.15},{x:.18,y:.05},{x:-.17,y:.27}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.22,y:.38},bottom1:{type:\"text\",text:\"{VAL}\",x:.11,y:-.38}},refblocks:{bottom1:{x:.34,y:-.35},left1:{x:-.52,y:.04},right1:{x:.52,y:.05}},bounds:{minX:-.55,maxX:.55,minY:-.38,maxY:.38,width:1.09,height:.77,centerX:0,centerY:0},circles:{}},{paths:B_r,texts:b_r,bounds:S_r,refblocks:Q_r,circles:v_r}=ixn,rxn=Ln(ixn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"bottom1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),sxn=si(rxn),$lr=sxn.primitives.filter(t=\u003et.type===\"text\"),axn=$lr.find(t=\u003et.text===\"{REF}\");axn.y=0,axn.anchor=\"middle_left\";var qlr=sxn,Axn={paths:{path44:{type:\"path\",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:.07,y:-.025},{x:-.07,y:-.025}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.4458008,y:-.025023700000000426},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},Xlr=Ln(Axn).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),cnt=Ln(Axn).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),cxn=si(cnt,\"left\"),lnt=cxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");lnt.anchor=\"middle_bottom\",lnt.y+=.4,lnt.x=0;var Zlr=cxn,lxn=si(cnt,\"up\"),unt=lxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");unt.anchor=\"middle_left\",unt.y+=0,unt.x=.2;var e0r=lxn,uxn={paths:{path44:{type:\"path\",points:[{x:-.195,y:-.025},{x:-.45,y:-.025}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:-.025},{x:.195,y:-.025}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.07,y:.1},{x:.07,y:-.15}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.07,y:-.15}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.07,y:.1},{x:-.082252,y:.099398},{x:-.094386,y:.097598},{x:-.106286,y:.094618},{x:-.117835,y:.090485},{x:-.128925,y:.08524},{x:-.139446,y:.078934},{x:-.149299,y:.071626},{x:-.158388,y:.063388},{x:-.166626,y:.054299},{x:-.173934,y:.044446},{x:-.18024,y:.033925},{x:-.185485,y:.022835},{x:-.189618,y:.011286},{x:-.192598,y:-614e-6},{x:-.194398,y:-.012748},{x:-.195,y:-.025},{x:-.194398,y:-.037252},{x:-.192598,y:-.049386},{x:-.189618,y:-.061286},{x:-.185485,y:-.072835},{x:-.18024,y:-.083925},{x:-.173934,y:-.094446},{x:-.166626,y:-.104299},{x:-.158388,y:-.113388},{x:-.149299,y:-.121626},{x:-.139446,y:-.128934},{x:-.128925,y:-.13524},{x:-.117835,y:-.140485},{x:-.106286,y:-.144618},{x:-.094386,y:-.147598},{x:-.082252,y:-.149398},{x:-.07,y:-.15}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.07,y:.1},{x:.082252,y:.099398},{x:.094386,y:.097598},{x:.106286,y:.094618},{x:.117835,y:.090485},{x:.128925,y:.08524},{x:.139446,y:.078934},{x:.149299,y:.071626},{x:.158388,y:.063388},{x:.166626,y:.054299},{x:.173934,y:.044446},{x:.18024,y:.033925},{x:.185485,y:.022835},{x:.189618,y:.011286},{x:.192598,y:-614e-6},{x:.194398,y:-.012748},{x:.195,y:-.025},{x:.194398,y:-.037252},{x:.192598,y:-.049386},{x:.189618,y:-.061286},{x:.185485,y:-.072835},{x:.18024,y:-.083925},{x:.173934,y:-.094446},{x:.166626,y:-.104299},{x:.158388,y:-.113388},{x:.149299,y:-.121626},{x:.139446,y:-.128934},{x:.128925,y:-.13524},{x:.117835,y:-.140485},{x:.106286,y:-.144618},{x:.094386,y:-.147598},{x:.082252,y:-.149398},{x:.07,y:-.15}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.15414649999999952}},refblocks:{left1:{x:-.44,y:-.02},right1:{x:.4458008,y:-.02514810000000045}},bounds:{minX:-.45,maxX:.45,minY:-.15,maxY:.1,width:.9,height:.25,centerX:0,centerY:-.025},circles:{}},t0r=Ln(uxn).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),gnt=Ln(uxn).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),gxn=si(gnt,\"left\"),dnt=gxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");dnt.anchor=\"middle_bottom\",dnt.y+=.4,dnt.x=0;var n0r=gxn,dxn=si(gnt,\"up\"),hnt=dxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");hnt.anchor=\"middle_left\",hnt.y+=.05,hnt.x=.2;var o0r=dxn,hxn={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1},path1:{type:\"path\",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},i0r=Ln(hxn).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),pnt=Ln(hxn).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),pxn=si(pnt,\"left\"),mnt=pxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");mnt.anchor=\"middle_left\",mnt.y+=.5,mnt.x=.2;var r0r=pxn,mxn=si(pnt,\"up\"),_nt=mxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");_nt.anchor=\"middle_left\",_nt.y+=.3,_nt.x=.2;var s0r=mxn,_xn={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1},path1:{type:\"path\",points:[{x:-.045,y:.1},{x:-.125,y:.1}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:.125,y:.1},{x:.045,y:.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},a0r=Ln(_xn).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),fnt=Ln(_xn).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),fxn=si(fnt,\"left\"),Int=fxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Int.anchor=\"middle_left\",Int.y+=.5,Int.x=.2;var A0r=fxn,Ixn=si(fnt,\"up\"),Cnt=Ixn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Cnt.anchor=\"middle_left\",Cnt.y+=.4,Cnt.x=.2;var c0r=Ixn,Cxn={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1},\"path44-0-7\":{type:\"path\",points:[{x:.125,y:.1},{x:.045,y:.1}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.28}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},l0r=Ln(Cxn).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),ynt=Ln(Cxn).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),yxn=si(ynt,\"left\"),xnt=yxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");xnt.anchor=\"middle_left\",xnt.y+=.6,xnt.x=.3;var u0r=yxn,xxn=si(ynt,\"up\"),Ent=xxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Ent.anchor=\"middle_left\",Ent.y+=.4,Ent.x=.2;var g0r=xxn,Exn={paths:{path44:{type:\"path\",points:[{x:-.25,y:.1},{x:-.45,y:.1}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.45,y:.1},{x:.25,y:.1}],color:\"primary\",fill:!1},\"path44-5\":{type:\"path\",points:[{x:0,y:-.025},{x:0,y:-.275}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.125,y:.225},{x:.125,y:-.025}],color:\"primary\",fill:!0},\"path2-88\":{type:\"path\",points:[{x:.045,y:.225},{x:.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5\":{type:\"path\",points:[{x:-.045,y:.225},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-88-5-1\":{type:\"path\",points:[{x:.045,y:.225},{x:-.045,y:.225}],color:\"primary\",fill:!0},\"path2-88-5-1-6\":{type:\"path\",points:[{x:.045,y:-.025},{x:-.045,y:-.025}],color:\"primary\",fill:!0},\"path2-8\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.125,y:-.025}],color:\"primary\",fill:!0},\"path8704-1\":{type:\"path\",points:[{x:-.125,y:.225},{x:-.137252,y:.224398},{x:-.149386,y:.222598},{x:-.161286,y:.219618},{x:-.172835,y:.215485},{x:-.183925,y:.21024},{x:-.194446,y:.203934},{x:-.204299,y:.196626},{x:-.213388,y:.188388},{x:-.221626,y:.179299},{x:-.228934,y:.169446},{x:-.23524,y:.158925},{x:-.240485,y:.147835},{x:-.244618,y:.136286},{x:-.247598,y:.124386},{x:-.249398,y:.112252},{x:-.25,y:.1},{x:-.249398,y:.087748},{x:-.247598,y:.075614},{x:-.244618,y:.063714},{x:-.240485,y:.052165},{x:-.23524,y:.041075},{x:-.228934,y:.030554},{x:-.221626,y:.020701},{x:-.213388,y:.011612},{x:-.204299,y:.003374},{x:-.194446,y:-.003934},{x:-.183925,y:-.01024},{x:-.172835,y:-.015485},{x:-.161286,y:-.019618},{x:-.149386,y:-.022598},{x:-.137252,y:-.024398},{x:-.125,y:-.025}],color:\"primary\",fill:!1},\"path8704-1-7\":{type:\"path\",points:[{x:.125,y:.225},{x:.137252,y:.224398},{x:.149386,y:.222598},{x:.161286,y:.219618},{x:.172835,y:.215485},{x:.183925,y:.21024},{x:.194446,y:.203934},{x:.204299,y:.196626},{x:.213388,y:.188388},{x:.221626,y:.179299},{x:.228934,y:.169446},{x:.23524,y:.158925},{x:.240485,y:.147835},{x:.244618,y:.136286},{x:.247598,y:.124386},{x:.249398,y:.112252},{x:.25,y:.1},{x:.249398,y:.087748},{x:.247598,y:.075614},{x:.244618,y:.063714},{x:.240485,y:.052165},{x:.23524,y:.041075},{x:.228934,y:.030554},{x:.221626,y:.020701},{x:.213388,y:.011612},{x:.204299,y:.003374},{x:.194446,y:-.003934},{x:.183925,y:-.01024},{x:.172835,y:-.015485},{x:.161286,y:-.019618},{x:.149386,y:-.022598},{x:.137252,y:-.024398},{x:.125,y:-.025}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.020635199999998965,y:.28075747049999955}},refblocks:{left1:{x:-.45,y:.1},right1:{x:.45,y:.1},bottom1:{x:0,y:-.275}},bounds:{minX:-.45,maxX:.45,minY:-.28,maxY:.28,width:.9,height:.56,centerX:0,centerY:0},circles:{}},d0r=Ln(Exn).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Bnt=Ln(Exn).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"bottom1\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Bxn=si(Bnt,\"left\"),bnt=Bxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");bnt.anchor=\"middle_left\",bnt.y+=.5,bnt.x=.3;var h0r=Bxn,bxn=si(Bnt,\"up\"),Snt=bxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Snt.anchor=\"middle_left\",Snt.y+=.3,Snt.x=.2;var p0r=bxn,m0r={paths:{path1:{type:\"path\",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-.07,y:.03},{x:.11,y:-.03}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.17},{x:.37,y:.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.37},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.37}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right2:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{\"circle-3\":{type:\"circle\",x:.08,y:-.07,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.03,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.08,y:.17,radius:.02,color:\"primary\",fill:!1}}},RCe=Ln(m0r).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right2\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Qnt=si(RCe,\"down\"),vnt=Qnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),wnt=Qnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");vnt.anchor=\"middle_bottom\",wnt.anchor=\"middle_top\",vnt.x=.44,vnt.y+=.28,wnt.y-=.28,wnt.x=.44;var _0r=Qnt,Pnt=si(RCe,\"left\"),Mnt=Pnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Dnt=Pnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Mnt.anchor=\"middle_bottom\",Dnt.anchor=\"middle_top\",Mnt.x=0,Mnt.y+=.625,Dnt.y-=.695,Dnt.x=0;var f0r=Pnt,Nnt=si(RCe,\"up\"),Rnt=Nnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Tnt=Nnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Rnt.anchor=\"middle_bottom\",Tnt.anchor=\"middle_top\",Rnt.x=.4,Rnt.y+=.28,Tnt.y-=.28,Tnt.x=.4;var I0r=Nnt,C0r={paths:{path1:{type:\"path\",points:[{x:-.37,y:.03},{x:-.13,y:.03}],color:\"primary\",fill:!1},\"path-1-3\":{type:\"path\",points:[{x:-.07,y:.03},{x:.11,y:.14}],color:\"primary\",fill:!1},path2:{type:\"path\",points:[{x:.1,y:-.06},{x:.37,y:-.06}],color:\"primary\",fill:!1},path3:{type:\"path\",points:[{x:.12,y:.17},{x:.37,y:.17}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.4},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.4}},refblocks:{left1:{x:-.37,y:.03},right1:{x:.37,y:-.06},right3:{x:.37,y:.17}},bounds:{minX:-.4,maxX:.4,minY:-.4,maxY:.4,width:.79,height:.79,centerX:0,centerY:0},circles:{\"circle-3\":{type:\"circle\",x:.08,y:-.07,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:.03,radius:.02,color:\"primary\",fill:!1},\"circle-2\":{type:\"circle\",x:.08,y:.17,radius:.02,color:\"primary\",fill:!1}}},TCe=Ln(C0r).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right3\",[\"2\"]).labelPort(\"right1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),knt=si(TCe,\"down\"),Fnt=knt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Lnt=knt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Fnt.anchor=\"middle_bottom\",Lnt.anchor=\"middle_top\",Fnt.x=.44,Fnt.y+=.28,Lnt.y-=.28,Lnt.x=.44;var y0r=knt,Hnt=si(TCe,\"left\"),Ont=Hnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Gnt=Hnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Ont.anchor=\"middle_bottom\",Gnt.anchor=\"middle_top\",Ont.x=0,Ont.y+=.625,Gnt.y-=.695,Gnt.x=0;var x0r=Hnt,Ynt=si(TCe,\"up\"),Unt=Ynt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Knt=Ynt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Unt.anchor=\"middle_bottom\",Knt.anchor=\"middle_top\",Unt.x=.4,Unt.y+=.28,Knt.y-=.28,Knt.x=.4;var E0r=Ynt,PK={paths:{\"lead-positive\":{type:\"path\",points:[{x:-.4,y:.19999999999999996},{x:-.20000000000000007,y:.19999999999999996}],color:\"primary\",fill:!1},\"lead-negative\":{type:\"path\",points:[{x:-.4,y:-.20000000000000018},{x:-.20000000000000007,y:-.20000000000000018}],color:\"primary\",fill:!1},\"voice-coil\":{type:\"path\",points:[{x:-.20000000000000007,y:.19999999999999996},{x:0,y:.19999999999999996},{x:0,y:-.20000000000000018},{x:-.20000000000000007,y:-.20000000000000018},{x:-.20000000000000007,y:.19999999999999996}],color:\"primary\",fill:!1},cone:{type:\"path\",points:[{x:0,y:.19999999999999996},{x:.3999999999999999,y:.3999999999999999},{x:.3999999999999999,y:-.40000000000000013},{x:0,y:-.20000000000000018},{x:0,y:.19999999999999996}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.6},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.6000000000000001}},refblocks:{left1:{x:-.4,y:-.20000000000000018},left2:{x:-.4,y:.19999999999999996}},bounds:{minX:-.4,maxX:.3999999999999999,minY:-.6000000000000001,maxY:.6,width:.7999999999999999,height:1.2000000000000002,centerX:-5551115123125783e-32,centerY:-5551115123125783e-32},circles:{}},Sxn=Ln(PK).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),kCe=GS(Sxn.primitives),B0r={...Sxn,center:{x:(kCe.minX+kCe.maxX)/2,y:(kCe.minY+kCe.maxY)/2}},Qxn=Ln(PK).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),FCe=GS(Qxn.primitives),b0r={...Qxn,center:{x:(FCe.minX+FCe.maxX)/2,y:(FCe.minY+FCe.maxY)/2}},vxn=Ln(PK).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),LCe=GS(vxn.primitives),S0r={...vxn,center:{x:(LCe.minX+LCe.maxX)/2,y:(LCe.minY+LCe.maxY)/2}},wxn=Ln(PK).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),HCe=GS(wxn.primitives),Q0r={...wxn,center:{x:(HCe.minX+HCe.maxX)/2,y:(HCe.minY+HCe.maxY)/2}},Pxn=Ln(PK).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),OCe=GS(Pxn.primitives),v0r={...Pxn,center:{x:(OCe.minX+OCe.maxX)/2,y:(OCe.minY+OCe.maxY)/2}},Mxn=Ln(PK).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"2\",\"neg\"]).labelPort(\"left2\",[\"1\",\"pos\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),GCe=GS(Mxn.primitives),w0r={...Mxn,center:{x:(GCe.minX+GCe.maxX)/2,y:(GCe.minY+GCe.maxY)/2}},YCe={paths:{path11:{type:\"path\",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.07,y:0},{x:.11,y:.05}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.12,y:-.01},{x:.38,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.31},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.28}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:.1,y:0,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:0,radius:.02,color:\"primary\",fill:!1}}};delete YCe.refblocks.left1,delete YCe.refblocks.right1,YCe.bounds.width+=.2;var UCe=Ln(YCe).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left2\",[\"1\"]).labelPort(\"right2\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Vnt=si(UCe,\"down\"),znt=Vnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Jnt=Vnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");znt.anchor=\"middle_bottom\",Jnt.anchor=\"middle_top\",znt.x=.3,znt.y+=.265,Jnt.y-=.265,Jnt.x=.3;var P0r=Vnt,Wnt=si(UCe,\"left\"),jnt=Wnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),$nt=Wnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");jnt.anchor=\"middle_bottom\",$nt.anchor=\"middle_top\",jnt.x=0,jnt.y+=.57,$nt.y-=.57,$nt.x=0;var M0r=Wnt,qnt=si(UCe,\"up\"),Xnt=qnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Znt=qnt.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Xnt.anchor=\"middle_bottom\",Znt.anchor=\"middle_top\",Xnt.x=.3,Xnt.y+=.265,Znt.y-=.265,Znt.x=.3;var D0r=qnt,KCe={paths:{path11:{type:\"path\",points:[{x:-.38,y:0},{x:-.12,y:-.01}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.07,y:.01},{x:.1,y:.14}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.12,y:-.01},{x:.38,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:0,y:.25},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.25}},refblocks:{left1:{x:-.12,y:-.01},left2:{x:-.38,y:0},right1:{x:.12,y:-.01},right2:{x:.38,y:0}},bounds:{minX:-.4,maxX:.4,minY:-.25,maxY:.25,width:.81,height:.5,centerX:0,centerY:0},circles:{\"circle-2\":{type:\"circle\",x:.1,y:0,radius:.02,color:\"primary\",fill:!1},\"circle-1\":{type:\"circle\",x:-.1,y:0,radius:.02,color:\"primary\",fill:!1}}};delete KCe.refblocks.left1,delete KCe.refblocks.right1,KCe.bounds.width+=.2;var VCe=Ln(KCe).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left2\",[\"1\"]).labelPort(\"right2\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),eot=si(VCe,\"down\"),tot=eot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),not=eot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");tot.anchor=\"middle_bottom\",not.anchor=\"middle_top\",tot.x=.3,tot.y+=.265,not.y-=.265,not.x=.3;var N0r=eot,oot=si(VCe,\"left\"),iot=oot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),rot=oot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");iot.anchor=\"middle_bottom\",rot.anchor=\"middle_top\",iot.x=0,iot.y+=.57,rot.y-=.57,rot.x=0;var R0r=oot,sot=si(VCe,\"up\"),aot=sot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Aot=sot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");aot.anchor=\"middle_bottom\",Aot.anchor=\"middle_top\",aot.x=.3,aot.y+=.265,Aot.y-=.265,Aot.x=.3;var T0r=sot,zCe={paths:{path44:{type:\"path\",points:[{x:-.16845120000000047,y:.02621170000000017},{x:-.4458008,y:.02709619999999968}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.4458008,y:.026971799999999657},{x:.1677968999999997,y:.027926399999999685}],color:\"primary\",fill:!1},\"path8704-1\":{type:\"path\",points:[{x:-.0040837000000002455,y:-.13467459999999964},{x:-.0040837000000002455,y:-.13467459999999964},{x:-.017668143940740948,y:-.1311205263185182},{x:-.03043520885925943,y:-.12727072121481456},{x:-.04240966440000013,y:-.1231399985999998},{x:-.05361628020740751,y:-.11874317238518502},{x:-.064079825925926,y:-.11409505648148131},{x:-.07382507120000005,y:-.10921046479999987},{x:-.0828767856740741,y:-.10410421125185171},{x:-.0912597389925926,y:-.09879110974814802},{x:-.09899870079999995,y:-.0932859741999998},{x:-.10611844074074069,y:-.08760361851851838},{x:-.11264372845925916,y:-.0817588566148146},{x:-.11859933359999993,y:-.07576650239999982},{x:-.12401002580740728,y:-.06964136978518495},{x:-.12890057472592584,y:-.06339827268148127},{x:-.13329574999999985,y:-.05705202499999972},{x:-.13722032127407394,y:-.05061744065185156},{x:-.14069905819259243,y:-.04410933354814783},{x:-.14375673039999987,y:-.03754251759999966},{x:-.14641810754074058,y:-.030931806718518143},{x:-.1487079592592591,y:-.0242920148148144},{x:-.15065105519999983,y:-.017637955799999563},{x:-.15227216500740723,y:-.01098444358518472},{x:-.15359605832592574,y:-.004346292081480994},{x:-.1546475047999998,y:.00226168480000051},{x:-.15545127407407386,y:.008824673148148676},{x:-.1560321357925924,y:.015327859051852397},{x:-.1564148595999998,y:.02175642860000056},{x:-.1566242151407405,y:.028095567881482052},{x:-.15668497205925902,y:.03433046298518576},{x:-.15662189999999976,y:.04044630000000058},{x:-.15662189999999976,y:.0404463000000006},{x:-.15662189999999976,y:.0404463000000006},{x:-.15622857394444417,y:.04717166472222282},{x:-.1553217675555553,y:.05388046444444503},{x:-.15392183849999977,y:.060558907500000585},{x:-.1520491444444442,y:.0671932022222228},{x:-.1497240430555553,y:.07376955694444502},{x:-.14696689199999974,y:.08027418000000058},{x:-.14379804894444415,y:.0866932797222228},{x:-.1402378715555553,y:.09301306444444506},{x:-.13630671749999965,y:.09921974250000057},{x:-.13202494444444415,y:.10529952222222282},{x:-.12741291005555522,y:.11123861194444501},{x:-.1224909719999997,y:.1170232200000006},{x:-.11727948794444407,y:.12263955472222278},{x:-.11179881555555524,y:.12807382444444504},{x:-.10606931249999965,y:.13331223750000057},{x:-.1001113364444441,y:.13834100222222284},{x:-.09394524505555521,y:.14314632694444504},{x:-.08759139599999967,y:.14771442000000062},{x:-.08107014694444413,y:.15203148972222283},{x:-.07440185555555523,y:.15608374444444503},{x:-.0676068794999997,y:.15985739250000058},{x:-.06070557644444415,y:.16333864222222283},{x:-.05371830405555529,y:.16651370194444504},{x:-.04666541999999976,y:.1693687800000006},{x:-.03956728194444424,y:.1718900847222228},{x:-.03244424755555539,y:.17406382444444501},{x:-.025316674499999876,y:.17587620750000055},{x:-.01820492044444437,y:.17731344222222278},{x:-.01112934305555553,y:.178361736944445},{x:-.004110300000000034,y:.17900730000000054},{x:-.004110300000000011,y:.17900730000000054}],color:\"primary\",fill:!1},\"path8704-1-9\":{type:\"path\",points:[{x:.004158700000000071,y:-.1355885000000001},{x:.004158700000000071,y:-.1355885000000001},{x:.017743143940740766,y:-.1320344263185187},{x:.03051020885925925,y:-.12818462121481505},{x:.042484664399999955,y:-.12405389860000024},{x:.053691280207407335,y:-.11965707238518546},{x:.0641548259259258,y:-.11500895648148178},{x:.07390007119999986,y:-.1101243648000003},{x:.0829517856740739,y:-.10501811125185218},{x:.0913347389925924,y:-.09970500974814848},{x:.09907370079999973,y:-.09419987420000027},{x:.10619344074074046,y:-.08851751851851883},{x:.11271872845925893,y:-.08267275661481507},{x:.11867433359999968,y:-.07668040240000029},{x:.12408502580740703,y:-.0705552697851854},{x:.12897557472592555,y:-.06431217268148172},{x:.13337074999999957,y:-.05796592500000018},{x:.13729532127407365,y:-.05153134065185202},{x:.14077405819259214,y:-.045023233548148286},{x:.14383173039999952,y:-.038456417600000126},{x:.14649310754074024,y:-.03184570671851861},{x:.14878295925925875,y:-.02520591481481487},{x:.1507260551999995,y:-.01855185580000003},{x:.15234716500740686,y:-.011898343585185192},{x:.15367105832592537,y:-.005260192081481464},{x:.15472250479999944,y:.001347784800000043},{x:.1555262740740735,y:.007910773148148207},{x:.156107135792592,y:.01441395905185193},{x:.1564898595999994,y:.020842528600000094},{x:.15669921514074014,y:.02718166788148159},{x:.15675997205925862,y:.03341656298518529},{x:.15669689999999936,y:.03953240000000011},{x:.15669689999999936,y:.039532400000000134},{x:.15669689999999936,y:.039532400000000134},{x:.1563035739444438,y:.04625776472222235},{x:.15539676755555493,y:.05296656444444457},{x:.15399683849999934,y:.05964500750000013},{x:.1521241444444438,y:.06627930222222234},{x:.14979904305555491,y:.07285565694444456},{x:.14704189199999937,y:.07936028000000013},{x:.1438730489444438,y:.08577937972222234},{x:.1403128715555549,y:.09209916444444458},{x:.13638171749999925,y:.0983058425000001},{x:.13209994444444376,y:.10438562222222235},{x:.12748791005555482,y:.11032471194444453},{x:.12256597199999929,y:.11610932000000013},{x:.1173544879444437,y:.1217256547222223},{x:.11187381555555485,y:.12715992444444457},{x:.10614431249999925,y:.1323983375000001},{x:.10018633644444369,y:.13742710222222235},{x:.09402024505555481,y:.14223242694444457},{x:.08766639599999927,y:.14680052000000016},{x:.08114514694444372,y:.15111758972222236},{x:.07447685555555483,y:.15516984444444457},{x:.06768187949999929,y:.15894349250000012},{x:.06078057644444377,y:.16242474222222236},{x:.053793304055554894,y:.16559980194444457},{x:.046740419999999366,y:.16845488000000014},{x:.039642281944443844,y:.17097618472222234},{x:.03251924755555499,y:.17314992444444455},{x:.02539167449999948,y:.17496230750000008},{x:.018279920444443973,y:.17639954222222232},{x:.011204343055555134,y:.17744783694444452},{x:.004185299999999637,y:.17809340000000007},{x:.004185299999999614,y:.17809340000000007}],color:\"primary\",fill:!1},path4:{type:\"path\",points:[{x:-.08039130000000005,y:.0179576999999993},{x:-.08039130000000005,y:.09650599999999931}],color:\"primary\",fill:!0},\"path4-5\":{type:\"path\",points:[{x:.01494479999999987,y:-.055216500000000224},{x:.01494479999999987,y:.09691909999999937}],color:\"primary\",fill:!0},\"path4-5-8\":{type:\"path\",points:[{x:.06871169999999927,y:-.056870000000000864},{x:.06871169999999927,y:.018784499999999538}],color:\"primary\",fill:!0},\"path4-1\":{type:\"path\",points:[{x:-.08179359999999969,y:.09650570000000003},{x:.015771699999999722,y:.09650570000000003}],color:\"primary\",fill:!0},\"path4-1-6\":{type:\"path\",points:[{x:.0117995999999998,y:-.05594970000000088},{x:.06843709999999925,y:-.05594970000000088}],color:\"primary\",fill:!0},\"rect1577-4\":{type:\"path\",points:[{x:-.17162450000000073,y:.11125030000000025},{x:-.2688274000000015,y:.11125030000000025},{x:-.2688274000000015,y:.11469129999999961},{x:-.17162450000000073,y:.11469129999999961}],color:\"primary\",fill:!0},\"rect1577-4-7\":{type:\"path\",points:[{x:-.2184661999999995,y:.16159429999999997},{x:-.2184661999999995,y:.06439139999999943},{x:-.22190719999999908,y:.06439139999999943},{x:-.22190719999999908,y:.16159429999999997}],color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.0024445000000006267,y:.23933980000000044},bottom1:{type:\"text\",text:\"{VAL}\",x:.00341719999999901,y:-.23933980000000066}},refblocks:{left1:{x:-.4458008,y:.02709619999999968},right1:{x:.4458008,y:.026971799999999657}},bounds:{minX:-.473959241,maxX:.473959241,minY:-.23933980000000066,maxY:.23933980000000044,width:.947918482,height:.4786796000000011,centerX:0,centerY:-11102230246251565e-32},circles:{}},k0r=Ln(zCe).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.02,y:.2}).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.5,y:-.2}).build(),F0r=Ln(zCe).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\",{x:0,y:.45}).changeTextAnchor(\"{VAL}\",\"middle_top\",{x:0,y:-.55}).build(),L0r=Ln(zCe).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),H0r=Ln(zCe).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\",\"pos\"]).labelPort(\"right1\",[\"2\",\"neg\"]).changeTextAnchor(\"{VAL}\",\"middle_left\",{x:.02,y:-.2}).changeTextAnchor(\"{REF}\",\"middle_left\",{x:.5,y:.2}).build(),Dxn={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-5\":{type:\"path\",points:[{x:.19,y:-.09},{x:.15,y:-.09}],color:\"primary\",fill:!1},\"path43-5-2\":{type:\"path\",points:[{x:.19,y:-.14},{x:.19,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:w_r,texts:P_r,bounds:M_r,refblocks:D_r,circles:N_r}=Dxn,Nxn=Ln(Dxn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),O0r=si(Nxn),G0r={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"RPM\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:Y0r,texts:U0r,bounds:JCe,refblocks:Rxn,circles:K0r}=G0r,cot=Gl({primitives:[...Object.values(Y0r),...Object.values(K0r),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...U0r.left1,y:.01,anchor:\"center\",fontSize:.2}],ports:[{...Rxn.left1,labels:[\"1\"]},{...Rxn.right1,labels:[\"2\"]}],size:{width:JCe.width,height:JCe.height},center:{x:JCe.centerX,y:JCe.centerY}}),{5:V0r,...z0r}=cot.primitives;function J0r(t){return typeof t==\"object\"}var Txn=si({...cot,primitives:Object.values(z0r).filter(J0r)}),W0r={...Txn,primitives:[...Txn.primitives,V0r]},WCe=Gl({primitives:[{type:\"path\",points:[{x:-.2,y:0},{x:0,y:0}],color:\"primary\",fill:!1},{type:\"path\",points:Array.from({length:32},(t,e)=\u003e{let n=Math.PI/2-e*Math.PI/31,o=.1;return{x:.1-o*Math.cos(n),y:o*Math.sin(n)}}),color:\"primary\",fill:!1},{type:\"text\",text:\"{REF}\",x:.125,y:0,anchor:\"middle_left\"}],ports:[{x:-.2,y:0,labels:[\"1\"]}],center:{x:0,y:0}}),kxn=si(WCe,\"down\"),Fxn=kxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Fxn\u0026\u0026(Fxn.anchor=\"middle_top\");var j0r=kxn,$0r=si(WCe,\"left\"),Lxn=si(WCe,\"up\"),Hxn=Lxn.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\");Hxn\u0026\u0026(Hxn.anchor=\"middle_bottom\");var q0r=Lxn,X0r={paths:{path40:{type:\"path\",points:[{x:.44,y:.04},{x:.19,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:.19,y:.18},{x:.44,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:.19,y:-.09},{x:.19,y:.18}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:.19,y:.04},{x:-.11,y:.04}],color:\"primary\",fill:!1},path45:{type:\"path\",points:[{x:-.43,y:.22},{x:-.11,y:.04}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{right1:{x:-.43,y:.22}},bounds:{minX:-.55,maxX:.55,minY:-.27,maxY:.27,width:1.09,height:.55,centerX:0,centerY:0},circles:{}},lot=Ln(X0r).labelPort(\"right1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").changeTextAnchor(\"{VAL}\",\"middle_top\").build(),uot=si(lot,\"up\"),got=uot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),dot=uot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");got.anchor=\"middle_bottom\",dot.anchor=\"middle_top\",got.x=.4,got.y+=.2,dot.y-=.3,dot.x=.4;var Oxn=uot,hot=hK(Oxn),pot=hot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),mot=hot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");pot.anchor=\"middle_bottom\",mot.anchor=\"middle_top\",pot.x=.35,pot.y+=.4,mot.y-=.4,mot.x=.35;var Z0r=hot,_ot=si(lot,\"left\"),fot=_ot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Iot=_ot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");fot.anchor=\"middle_bottom\",Iot.anchor=\"middle_top\",fot.x=0,fot.y+=.5,Iot.y-=.6,Iot.x=0;var eur=_ot,Gxn={paths:{path11:{type:\"path\",points:[{x:-.54,y:.04},{x:-.11,y:.04}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.1,y:.04},{x:.54,y:.04}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.09,y:-.15},{x:-.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:.09,y:-.15},{x:.09,y:.26}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.08,y:.06},{x:-.08,y:-.15},{x:.09,y:-.05},{x:-.08,y:.06}],color:\"primary\",fill:!0},\"path11-0-9-0\":{type:\"path\",points:[{x:.08,y:.26},{x:.08,y:.05},{x:-.09,y:.15},{x:.07,y:.26}],color:\"primary\",fill:!0},\"path12-2\":{type:\"path\",points:[{x:.09,y:-.06},{x:.27,y:-.17}],color:\"primary\",fill:!1},\"path12-2-9\":{type:\"path\",points:[{x:.27,y:-.18},{x:.27,y:-.31}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:.01,y:.42},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.42}},refblocks:{bottom1:{x:.27,y:-.31},left1:{x:-.54,y:.04},right1:{x:.54,y:.04}},bounds:{minX:-.57,maxX:.57,minY:-.42,maxY:.42,width:1.14,height:.83,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.05,radius:.29,color:\"primary\",fill:!1}}},{paths:R_r,texts:T_r,bounds:k_r,refblocks:F_r,circles:L_r}=Gxn,Yxn=Ln(Gxn).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).labelPort(\"bottom1\",[\"3\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Uxn=si(Yxn),Kxn=Uxn.primitives.filter(t=\u003et.type===\"text\"),tur=Kxn.find(t=\u003et.text===\"{REF}\"),nur=Kxn.find(t=\u003et.text===\"{VAL}\");tur.y=0,nur.y=0;var our=Uxn,iur={paths:{path40:{type:\"path\",points:[{x:.14,y:.04},{x:-.12,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.12,y:.18},{x:.14,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.12,y:-.09},{x:-.12,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14,y:.18},{x:.14,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.15,y:.04}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.14,y:.18},{x:.08,y:.18}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.14,y:-.09},{x:.08,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:rur,texts:Vxn,bounds:jCe,refblocks:zxn,circles:sur}=iur,Jxn=Gl({primitives:[...Object.values(rur),...Object.values(sur),{...Vxn.top1,anchor:\"middle_bottom\"},{...Vxn.bottom1,anchor:\"middle_top\"}],ports:[{...zxn.left1,labels:[\"1\"]},{...zxn.right1,labels:[\"2\"]}],size:{width:jCe.width,height:jCe.height},center:{x:jCe.centerX,y:jCe.centerY}}),Cot=si(Jxn),aur=Cot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),Aur=Cot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");aur.anchor=\"middle_left\",Aur.anchor=\"middle_right\";var cur=Cot,lur={paths:{path11:{type:\"path\",points:[{x:-.34,y:.22},{x:-.02,y:.01}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.23,y:.13},{x:.23,y:.4}],color:\"primary\",fill:!1},\"path12-2\":{type:\"path\",points:[{x:.23,y:-.08},{x:.23,y:-.35}],color:\"primary\",fill:!1},\"path11-0\":{type:\"path\",points:[{x:-.01,y:-.18},{x:-.01,y:.23}],color:\"primary\",fill:!1},\"path11-0-3\":{type:\"path\",points:[{x:.23,y:.12},{x:-.01,y:.12}],color:\"primary\",fill:!1},\"path11-0-9\":{type:\"path\",points:[{x:-.11,y:.13},{x:-.17,y:.04},{x:-.06,y:.03},{x:-.11,y:.13}],color:\"primary\",fill:!0},\"path11-0-3-8\":{type:\"path\",points:[{x:.23,y:-.08},{x:-.01,y:-.08}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.2,y:.39},bottom1:{type:\"text\",text:\"{VAL}\",x:-.03,y:-.42}},refblocks:{top1:{x:.23,y:.4},bottom1:{x:.23,y:-.35},left1:{x:-.34,y:.22}},bounds:{width:.74,height:.85,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:.08,y:.01,radius:.29,color:\"primary\",fill:!1}}},{paths:uur,texts:Wxn,bounds:$Ce,refblocks:yot,circles:gur}=lur,jxn=Gl({primitives:[...Object.values(uur),...Object.values(gur),{...Wxn.top1,anchor:\"middle_left\"},{...Wxn.bottom1,anchor:\"middle_right\"}],ports:[{...yot.top1,labels:[\"1\"]},{...yot.bottom1,labels:[\"2\"]},{...yot.left1,labels:[\"3\"]}],size:{width:$Ce.width,height:$Ce.height},center:{x:$Ce.centerX,y:$Ce.centerY}}),$xn=si(jxn),qxn=$xn.primitives.filter(t=\u003et.type===\"text\"),dur=qxn.find(t=\u003et.text===\"{REF}\");dur.y=.1;var Xxn=qxn.find(t=\u003et.text===\"{VAL}\");Xxn.y=.1,Xxn.x=-.4;var hur=$xn,pur={paths:{capsule_outer:{type:\"path\",points:[{x:-.44,y:.34},{x:-.45,y:.39},{x:-.46,y:.42},{x:-.49,y:.44},{x:-.52,y:.46},{x:-.56,y:.46},{x:-.6,y:.46},{x:-.63,y:.44},{x:-.65,y:.42},{x:-.67,y:.39},{x:-.68,y:.34},{x:-.68,y:-.34},{x:-.67,y:-.39},{x:-.65,y:-.42},{x:-.63,y:-.44},{x:-.6,y:-.45},{x:-.56,y:-.46},{x:-.52,y:-.45},{x:-.49,y:-.44},{x:-.46,y:-.42},{x:-.45,y:-.39},{x:-.44,y:-.34},{x:-.44,y:.34}],color:\"primary\",fill:!1},capsule_inner:{type:\"path\",points:[{x:-.51,y:.28},{x:-.52,y:.32},{x:-.53,y:.34},{x:-.56,y:.35},{x:-.57,y:.35},{x:-.58,y:.34},{x:-.6,y:.32},{x:-.61,y:.28},{x:-.61,y:-.28},{x:-.6,y:-.32},{x:-.58,y:-.34},{x:-.57,y:-.35},{x:-.56,y:-.35},{x:-.53,y:-.34},{x:-.52,y:-.32},{x:-.51,y:-.28},{x:-.51,y:.28}],color:\"primary\",fill:!0},usb_vertical:{type:\"path\",points:[{x:.1,y:-.4},{x:.1,y:.4}],color:\"primary\",fill:!1},usb_left_branch:{type:\"path\",points:[{x:.1,y:-.1},{x:-.03,y:.05},{x:-.03,y:.15}],color:\"primary\",fill:!1},usb_right_branch:{type:\"path\",points:[{x:.1,y:0},{x:.25,y:.15},{x:.25,y:.25}],color:\"primary\",fill:!1},usb_arrow:{type:\"path\",points:[{x:.05,y:.4},{x:.1,y:.5},{x:.15,y:.4},{x:.05,y:.4}],color:\"primary\",fill:!0},usb_square:{type:\"path\",points:[{x:.2,y:.25},{x:.3,y:.25},{x:.3,y:.35},{x:.2,y:.35},{x:.2,y:.25}],color:\"primary\",fill:!0}},circles:{usb_base:{type:\"circle\",x:.1,y:-.4,radius:.07,color:\"primary\",fill:!0},usb_tip_circle:{type:\"circle\",x:-.03,y:.15,radius:.04,color:\"primary\",fill:!0}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.25,y:.7}},refblocks:{},bounds:{minX:-.75,maxX:.35,minY:-.6,maxY:.75,width:1.1,height:1.35,centerX:-.2,centerY:.08}},mur=Ln(pur).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),_ur={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.18,y:-.36},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:.43},left1:{type:\"text\",text:\"Var\",x:-.19,y:.07}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:fur,texts:xot,bounds:qCe,refblocks:Zxn,circles:Iur}=_ur,e3n=Gl({primitives:[...Object.values(fur),...Object.values(Iur),{...xot.top1,x:0,y:-.3594553499999995,anchor:\"middle_top\"},{...xot.bottom1,x:0,y:.35,anchor:\"middle_bottom\"},{...xot.left1,x:-.02,y:.01,fontSize:.2,anchor:\"center\"}],ports:[{...Zxn.left1,labels:[\"1\"]},{...Zxn.right1,labels:[\"2\"]}],size:{width:qCe.width,height:qCe.height},center:{x:qCe.centerX,y:qCe.centerY}}),Cur=si(e3n),yur={paths:{path40:{type:\"path\",points:[{x:.08,y:.04},{x:-.18,y:-.09}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.18,y:.18},{x:.08,y:.04}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.18,y:-.09},{x:-.18,y:.18}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.09,y:.17},{x:.1,y:-.09}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.2,y:.04},{x:-.52,y:.04}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.52,y:.04},{x:.21,y:.04}],color:\"primary\",fill:!1},\"path43-6\":{type:\"path\",points:[{x:.19,y:.17},{x:.19,y:-.09}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.01,y:.27},bottom1:{type:\"text\",text:\"{VAL}\",x:0,y:-.27}},refblocks:{left1:{x:-.52,y:.04},right1:{x:.52,y:.04}},bounds:{width:1.09,height:.55,centerX:0,centerY:0},circles:{}},{paths:xur,texts:t3n,bounds:XCe,refblocks:n3n,circles:Eur}=yur,o3n=Gl({primitives:[...Object.values(xur),...Object.values(Eur),{...t3n.top1,anchor:\"middle_bottom\"},{...t3n.bottom1,anchor:\"middle_top\"}],ports:[{...n3n.left1,labels:[\"1\"]},{...n3n.right1,labels:[\"2\"]}],size:{width:XCe.width,height:XCe.height},center:{x:XCe.centerX,y:XCe.centerY}}),Eot=si(o3n),Bur=Eot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{REF}\"),bur=Eot.primitives.find(t=\u003et.type===\"text\"\u0026\u0026t.text===\"{VAL}\");Bur.anchor=\"middle_left\",bur.anchor=\"middle_right\";var Sur=Eot,Qur={paths:{path5:{type:\"path\",points:[{x:-.54,y:0},{x:-.26,y:0}],color:\"primary\",fill:!1},path6:{type:\"path\",points:[{x:.27,y:0},{x:.54,y:.01}],color:\"primary\",fill:!1},path7:{type:\"path\",points:[{x:.27,y:-.23},{x:-.26,y:.24}],color:\"primary\",fill:!1},path8:{type:\"path\",points:[{x:.38,y:-.23},{x:.27,y:-.23}],color:\"primary\",fill:!1},path9:{type:\"path\",points:[{x:0,y:.14},{x:.27,y:.14},{x:.27,y:-.13},{x:-.26,y:-.13},{x:-.26,y:.14},{x:0,y:.14}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.06,y:.25},bottom1:{type:\"text\",text:\"{VAL}\",x:.01,y:-.25}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:.01}},bounds:{width:1.13,height:.5,centerX:0,centerY:0}},{paths:vur,texts:i3n,bounds:ZCe,refblocks:r3n}=Qur,s3n=Gl({primitives:[...Object.values(vur),{...i3n.top1,anchor:\"middle_left\"},{...i3n.bottom1,anchor:\"middle_right\"}],ports:[{...r3n.left1,labels:[\"1\",\"-\"]},{...r3n.right1,labels:[\"2\",\"+\"]}],size:{width:ZCe.width,height:ZCe.height},center:{x:ZCe.centerX,y:ZCe.centerY}}),wur=si(s3n),Pur={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"Var\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:Mur,texts:Dur,bounds:eye,refblocks:a3n,circles:Nur}=Pur,Bot=Gl({primitives:[...Object.values(Mur),...Object.values(Nur),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...Dur.left1,anchor:\"center\",y:.02,fontSize:.2}],ports:[{...a3n.left1,labels:[\"1\"]},{...a3n.right1,labels:[\"2\"]}],size:{width:eye.width,height:eye.height},center:{x:eye.centerX,y:eye.centerY}}),{5:Rur,...Tur}=Bot.primitives;function kur(t){return typeof t==\"object\"}var A3n=si({...Bot,primitives:Object.values(Tur).filter(kur)}),Fur={...A3n,primitives:[...A3n.primitives,Rur]},tye={paths:{\"path28-2\":{type:\"path\",points:[{x:.19,y:0},{x:0,y:.09}],color:\"primary\",fill:!1},\"path28-2-6\":{type:\"path\",points:[{x:.19,y:0},{x:0,y:-.09}],color:\"primary\",fill:!1},\"path29-3\":{type:\"path\",points:[{x:.19,y:0},{x:-.23,y:0}],color:\"primary\",fill:!1}},texts:{right1:{type:\"text\",text:\"{REF}\",x:.25,y:0}},refblocks:{left1:{x:-.23,y:0}},bounds:{minX:-.25,maxX:.25,minY:-.09,maxY:.09,width:.5,height:.19,centerX:0,centerY:0},circles:{}};function nye(t,e){let{width:n,height:o}=t.size,i=1,r=1;e.width!==void 0\u0026\u0026e.height!==void 0?(i=e.width/n,r=e.height/o):e.width!==void 0?i=r=e.width/n:e.height!==void 0\u0026\u0026(i=r=e.height/o);let s=t.primitives.map(a=\u003e{switch(a.type){case\"path\":return{...a,points:a.points.map(A=\u003e({x:A.x*i,y:A.y*r}))};case\"text\":return{...a,x:a.x*i,y:a.y*r,fontSize:a.fontSize?a.fontSize*i:void 0};case\"circle\":return{...a,x:a.x*i,y:a.y*r,radius:a.radius*i};case\"box\":return{...a,x:a.x*i,y:a.y*r,width:a.width*i,height:a.height*r};default:return a}});return{...t,primitives:s,center:{x:t.center.x*i,y:t.center.y*r},ports:t.ports.map(a=\u003e({...a,x:a.x*i,y:a.y*r})),size:{width:n*i,height:o*r}}}var Lur=Ln(tye).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_top\").build(),Hur=nye(Lur,{width:.24,height:.23}),Our=Ln(tye).rotateRightFacingSymbol(\"left\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_right\").build(),Gur=nye(Our,{width:.23,height:.24}),Yur=Ln(tye).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_left\").build(),Uur=nye(Yur,{width:.23,height:.24}),Kur=Ln(tye).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),Vur=nye(Kur,{width:.24,height:.23}),bot={paths:{path11:{type:\"path\",points:[{x:-.54,y:.03},{x:-.3,y:.03}],color:\"primary\",fill:!1},\"path11-5-5\":{type:\"path\",points:[{x:.1,y:.13},{x:0,y:-.06},{x:-.11,y:.13}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:.03},{x:.54,y:.03}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.02,y:.4},bottom1:{type:\"text\",text:\"{VAL}\",x:-.01,y:-.4}},refblocks:{left1:{x:-.54,y:.03},right1:{x:.54,y:.03}},bounds:{minX:-.57,maxX:.57,minY:-.4,maxY:.4,width:1.14,height:.8,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:0,y:.04,radius:.29,color:\"primary\",fill:!1}}},{paths:H_r,texts:O_r,bounds:G_r,circles:Y_r,refblocks:U_r}=bot,zur=Ln(bot).changeTextAnchor(\"{VAL}\",\"middle_top\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_bottom\").build(),{paths:Jur,texts:K_r,bounds:c3n,circles:Wur,refblocks:l3n}=bot,jur=Ln({primitives:[...Object.values(Jur),...Object.values(Wur),{type:\"text\",text:\"{REF}\",x:-.2,y:.35},{type:\"text\",text:\"{VAL}\",x:.2,y:.35}],ports:[{...l3n.left1,labels:[\"left1\"]},{...l3n.right1,labels:[\"right1\"]}],center:{x:c3n.centerX,y:c3n.centerY}}).rotateRightFacingSymbol(\"down\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),$ur=jur,qur={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"Wh\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:Xur,texts:Zur,bounds:oye,refblocks:u3n,circles:egr}=qur,Sot=Gl({primitives:[...Object.values(Xur),...Object.values(egr),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...Zur.left1,anchor:\"center\",y:.01,fontSize:.2}],ports:[{...u3n.left1,labels:[\"1\"]},{...u3n.right1,labels:[\"2\"]}],size:{width:oye.width,height:oye.height},center:{x:oye.centerX,y:oye.centerY}}),{5:tgr,...ngr}=Sot.primitives;function ogr(t){return typeof t==\"object\"}var g3n=si({...Sot,primitives:Object.values(ngr).filter(ogr)}),igr={...g3n,primitives:[...g3n.primitives,tgr]},rgr={paths:{path11:{type:\"path\",points:[{x:-.54,y:0},{x:-.3,y:0}],color:\"primary\",fill:!1},path12:{type:\"path\",points:[{x:.29,y:0},{x:.54,y:0}],color:\"primary\",fill:!1}},texts:{left1:{type:\"text\",text:\"W\",x:0,y:-.02}},refblocks:{left1:{x:-.54,y:0},right1:{x:.54,y:0}},bounds:{width:1.06,height:1,centerX:0,centerY:0},circles:{path1:{type:\"circle\",x:-.01,y:-.01,radius:.29,color:\"primary\",fill:!1}}},{paths:sgr,texts:agr,bounds:iye,refblocks:d3n,circles:Agr}=rgr,Qot=Gl({primitives:[...Object.values(sgr),...Object.values(Agr),{type:\"text\",text:\"{REF}\",x:0,y:-.3594553499999995,anchor:\"middle_top\"},{type:\"text\",text:\"{VAL}\",x:0,y:.35,anchor:\"middle_bottom\"},{...agr.left1,anchor:\"center\",y:.01,fontSize:.3}],ports:[{...d3n.left1,labels:[\"1\"]},{...d3n.right1,labels:[\"2\"]}],size:{width:iye.width,height:iye.height},center:{x:iye.centerX,y:iye.centerY}}),{5:cgr,...lgr}=Qot.primitives;function ugr(t){return typeof t==\"object\"}var h3n=si({...Qot,primitives:Object.values(lgr).filter(ugr)}),ggr={...h3n,primitives:[...h3n.primitives,cgr]},p3n={paths:{path40:{type:\"path\",points:[{x:.14458890000000002,y:.04403629999999992},{x:-.1199943999999995,y:-.08825540000000043}],color:\"primary\",fill:!1},path41:{type:\"path\",points:[{x:-.1199943999999995,y:.17632800000000026},{x:.14458890000000002,y:.04403629999999992}],color:\"primary\",fill:!1},path42:{type:\"path\",points:[{x:-.1199943999999995,y:-.0882553999999991},{x:-.1199943999999995,y:.17632800000000026}],color:\"primary\",fill:!1},path43:{type:\"path\",points:[{x:.14458890000000002,y:.17632800000000026},{x:.14458890000000002,y:-.0882553999999991}],color:\"primary\",fill:!1},path44:{type:\"path\",points:[{x:-.12219909999999956,y:.04403629999999992},{x:-.5168693999999996,y:.04403629999999992}],color:\"primary\",fill:!1},\"path44-0\":{type:\"path\",points:[{x:.5233797000000002,y:.043951100000000354},{x:.1496715999999998,y:.043951100000000354}],color:\"primary\",fill:!1},\"path43-8\":{type:\"path\",points:[{x:.14458890000000002,y:.17632800000000026},{x:.21069330000000042,y:.17632800000000026}],color:\"primary\",fill:!1},\"path43-8-8\":{type:\"path\",points:[{x:.14458890000000002,y:-.0882553999999991},{x:.07848449999999962,y:-.0882553999999991}],color:\"primary\",fill:!1}},texts:{top1:{type:\"text\",text:\"{REF}\",x:-.0050250999999996715,y:.27384530000000007},bottom1:{type:\"text\",text:\"{VAL}\",x:-.00011179999999977319,y:-.27384529999999985}},refblocks:{left1:{x:-.5191471000000001,y:.044920700000000924},right1:{x:.5191470999999999,y:.04389609999999999}},bounds:{minX:-.5473055410000001,maxX:.5473055409999998,minY:-.27384529999999985,maxY:.27384530000000007,width:1.094611082,height:.5476905999999999,centerX:-11102230246251565e-32,centerY:11102230246251565e-32},circles:{}},dgr=Ln(p3n).rotateRightFacingSymbol(\"right\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),{paths:hgr,bounds:rye,refblocks:m3n,circles:pgr}=p3n,mgr=Ln({primitives:[...Object.values(hgr),...Object.values(pgr),{type:\"text\",text:\"{REF}\",x:.15,y:-.2294553499999995},{type:\"text\",text:\"{VAL}\",x:-.15,y:-.2294553499999995}],ports:[{...m3n.left1,labels:[\"1\"]},{...m3n.right1,labels:[\"2\"]}],size:{width:rye.width,height:rye.height},center:{x:rye.centerX,y:rye.centerY}}).rotateRightFacingSymbol(\"up\").labelPort(\"left1\",[\"1\"]).labelPort(\"right1\",[\"2\"]).changeTextAnchor(\"{REF}\",\"middle_left\").changeTextAnchor(\"{VAL}\",\"middle_left\").build(),_3n={ac_voltmeter_down:anr,ac_voltmeter_horz:lnr,ac_voltmeter_left:dnr,ac_voltmeter_right:mnr,ac_voltmeter_up:Inr,ac_voltmeter_vert:xnr,avalanche_diode_down:bnr,avalanche_diode_horz:Snr,avalanche_diode_left:wnr,avalanche_diode_right:Pnr,avalanche_diode_up:Nnr,avalanche_diode_vert:knr,backward_diode_down:Hnr,backward_diode_left:dCn,backward_diode_right:Knr,backward_diode_up:Vnr,battery_down:jnr,battery_horz:ICn,battery_left:tor,battery_right:ror,battery_up:cor,battery_vert:lor,boxresistor_down:hor,boxresistor_left:Ior,boxresistor_right:Eor,boxresistor_small_down:Sor,boxresistor_small_left:wor,boxresistor_small_right:Dor,boxresistor_small_up:Tor,boxresistor_up:Hor,bridged_ground_down:Yor,bridged_ground_left:Vor,bridged_ground_right:YCn,bridged_ground_up:Wor,capacitor_down:Xor,capacitor_left:eir,capacitor_polarized_down:tir,capacitor_polarized_left:nir,capacitor_polarized_right:oir,capacitor_polarized_up:iir,capacitor_right:sir,capacitor_up:lir,constant_current_diode_down:dir,constant_current_diode_horz:hir,constant_current_diode_left:_ir,constant_current_diode_right:fir,constant_current_diode_up:yir,constant_current_diode_vert:Bir,crystal_4pin_down:Qir,crystal_4pin_left:vir,crystal_4pin_right:wir,crystal_4pin_up:Dir,crystal_down:Tir,crystal_left:kir,crystal_right:Fir,crystal_up:Oir,current_source_down:Yir,current_source_left:Kir,current_source_right:zir,current_source_up:Wir,darlington_pair_transistor_down:jir,darlington_pair_transistor_horz:$ir,darlington_pair_transistor_left:qir,darlington_pair_transistor_right:Xir,darlington_pair_transistor_up:Zir,darlington_pair_transistor_vert:err,dc_ammeter_down:tyn,dc_ammeter_horz:Ate,dc_ammeter_left:orr,dc_ammeter_right:irr,dc_ammeter_up:rrr,dc_ammeter_vert:tyn,dc_voltmeter_down:Arr,dc_voltmeter_horz:urr,dc_voltmeter_left:hrr,dc_voltmeter_right:_rr,dc_voltmeter_up:Crr,dc_voltmeter_vert:Err,diac_down:Brr,diac_horz:brr,diac_left:Srr,diac_right:Qrr,diac_up:vrr,diac_vert:wrr,digital_ground_down:Drr,digital_ground_left:Trr,digital_ground_right:Lrr,digital_ground_up:Grr,diode_down:Urr,diode_left:Krr,diode_right:MIe,diode_up:Vrr,dpdt_normally_closed_switch_down:Jrr,dpdt_normally_closed_switch_left:Wrr,dpdt_normally_closed_switch_right:DIe,dpdt_normally_closed_switch_up:jrr,dpdt_switch_down:qrr,dpdt_switch_left:Xrr,dpdt_switch_right:NIe,dpdt_switch_up:Zrr,dpst_normally_closed_switch_down:tsr,dpst_normally_closed_switch_left:nsr,dpst_normally_closed_switch_right:RIe,dpst_normally_closed_switch_up:osr,dpst_switch_down:rsr,dpst_switch_left:ssr,dpst_switch_right:TIe,dpst_switch_up:asr,ferrite_bead_down:lsr,ferrite_bead_left:usr,ferrite_bead_right:pyn,ferrite_bead_up:hyn,filled_diode_down:hsr,filled_diode_horz:_sr,filled_diode_left:Csr,filled_diode_right:Esr,filled_diode_up:Ssr,filled_diode_vert:wsr,frequency_meter_horz:get,frequency_meter_vert:Fsr,fuse_horz:byn,fuse_vert:Gsr,ground_down:Ysr,ground_horz:Usr,ground_left:Ksr,ground_right:Vsr,ground_up:zsr,ground_vert:Jsr,gunn_diode_horz:Wsr,gunn_diode_vert:jsr,icled_down:qsr,icled_left:Xsr,icled_right:VIe,icled_up:Zsr,igbt_transistor_horz:Syn,igbt_transistor_vert:tar,illuminated_push_button_normally_open_horz:vyn,illuminated_push_button_normally_open_vert:oar,inductor_down:iar,inductor_left:rar,inductor_right:sar,inductor_up:aar,laser_diode_down:Aar,laser_diode_left:car,laser_diode_right:JIe,laser_diode_up:lar,led_down:har,led_left:par,led_right:Met,led_up:Ryn,light_dependent_resistor_horz:Fyn,light_dependent_resistor_vert:Iar,mosfet_depletion_normally_on_horz:Uyn,mosfet_depletion_normally_on_vert:xar,mushroom_head_normally_open_momentary_horz:Jyn,mushroom_head_normally_open_momentary_vert:Sar,n_channel_d_mosfet_transistor_gate_bottom_drain_left:Mar,n_channel_d_mosfet_transistor_gate_bottom_drain_right:Dar,n_channel_d_mosfet_transistor_gate_left_drain_bottom:Nar,n_channel_d_mosfet_transistor_gate_left_drain_top:Rar,n_channel_d_mosfet_transistor_gate_right_drain_bottom:Tar,n_channel_d_mosfet_transistor_gate_right_drain_top:kar,n_channel_d_mosfet_transistor_gate_top_drain_left:Far,n_channel_d_mosfet_transistor_gate_top_drain_right:Lar,n_channel_d_mosfet_transistor_horz:r8,n_channel_d_mosfet_transistor_vert:YS,n_channel_e_mosfet_transistor_gate_bottom_drain_left:Yar,n_channel_e_mosfet_transistor_gate_bottom_drain_right:Uar,n_channel_e_mosfet_transistor_gate_left_drain_bottom:Kar,n_channel_e_mosfet_transistor_gate_left_drain_top:Var,n_channel_e_mosfet_transistor_gate_right_drain_bottom:zar,n_channel_e_mosfet_transistor_gate_right_drain_top:Jar,n_channel_e_mosfet_transistor_gate_top_drain_left:War,n_channel_e_mosfet_transistor_gate_top_drain_right:jar,n_channel_e_mosfet_transistor_horz:s8,n_channel_e_mosfet_transistor_vert:US,njfet_transistor_horz:r2n,njfet_transistor_vert:Zar,not_connected_down:oAr,not_connected_left:iAr,not_connected_right:ZIe,not_connected_up:rAr,npn_bipolar_transistor_down:AAr,npn_bipolar_transistor_horz:uAr,npn_bipolar_transistor_left:hAr,npn_bipolar_transistor_right:_Ar,npn_bipolar_transistor_up:CAr,npn_bipolar_transistor_vert:EAr,opamp_no_power_down:bAr,opamp_no_power_left:SAr,opamp_no_power_right:sCe,opamp_no_power_up:QAr,opamp_with_power_down:wAr,opamp_with_power_left:PAr,opamp_with_power_right:aCe,opamp_with_power_up:MAr,p_channel_d_mosfet_transistor_gate_bottom_drain_left:TAr,p_channel_d_mosfet_transistor_gate_bottom_drain_right:kAr,p_channel_d_mosfet_transistor_gate_left_drain_bottom:FAr,p_channel_d_mosfet_transistor_gate_left_drain_top:LAr,p_channel_d_mosfet_transistor_gate_right_drain_bottom:HAr,p_channel_d_mosfet_transistor_gate_right_drain_top:OAr,p_channel_d_mosfet_transistor_gate_top_drain_left:GAr,p_channel_d_mosfet_transistor_gate_top_drain_right:YAr,p_channel_d_mosfet_transistor_horz:a8,p_channel_d_mosfet_transistor_vert:KS,p_channel_e_mosfet_transistor_gate_bottom_drain_left:zAr,p_channel_e_mosfet_transistor_gate_bottom_drain_right:JAr,p_channel_e_mosfet_transistor_gate_left_drain_bottom:WAr,p_channel_e_mosfet_transistor_gate_left_drain_top:jAr,p_channel_e_mosfet_transistor_gate_right_drain_bottom:$Ar,p_channel_e_mosfet_transistor_gate_right_drain_top:qAr,p_channel_e_mosfet_transistor_gate_top_drain_left:XAr,p_channel_e_mosfet_transistor_gate_top_drain_right:ZAr,p_channel_e_mosfet_transistor_horz:A8,p_channel_e_mosfet_transistor_vert:VS,photodiode_horz:I2n,photodiode_vert:ncr,pjfet_transistor_horz:E2n,pjfet_transistor_vert:scr,pnp_bipolar_transistor_down:ccr,pnp_bipolar_transistor_horz:lcr,pnp_bipolar_transistor_left:dcr,pnp_bipolar_transistor_right:mcr,pnp_bipolar_transistor_up:Icr,pnp_bipolar_transistor_vert:xcr,potentiometer_horz:v2n,potentiometer_vert:Scr,potentiometer2_down:wcr,potentiometer2_left:Pcr,potentiometer2_right:mCe,potentiometer2_up:Mcr,potentiometer3_down:Rcr,potentiometer3_left:Fcr,potentiometer3_right:Lcr,potentiometer3_up:Gcr,power_factor_meter_horz:D2n,power_factor_meter_vert:Vcr,push_button_normally_closed_momentary_horz:F2n,push_button_normally_closed_momentary_vert:jcr,push_button_normally_open_momentary_down:Xcr,push_button_normally_open_momentary_horz:tlr,push_button_normally_open_momentary_left:nlr,push_button_normally_open_momentary_right:ute,push_button_normally_open_momentary_up:olr,push_button_normally_open_momentary_vert:ilr,rail_down:Alr,rail_left:glr,rail_right:mlr,rail_up:Ilr,rectifier_diode_horz:$2n,rectifier_diode_vert:blr,resistor_down:vlr,resistor_left:Mlr,resistor_right:Rlr,resistor_up:Flr,resonator_down:Olr,resonator_horz:oxn,resonator_left:Ulr,resonator_right:MCe,resonator_up:Klr,resonator_vert:Vlr,schottky_diode_down:Jlr,schottky_diode_left:Wlr,schottky_diode_right:NCe,schottky_diode_up:jlr,silicon_controlled_rectifier_horz:rxn,silicon_controlled_rectifier_vert:qlr,solderjumper2_bridged12_down:Xlr,solderjumper2_bridged12_left:Zlr,solderjumper2_bridged12_right:cnt,solderjumper2_bridged12_up:e0r,solderjumper2_down:t0r,solderjumper2_left:n0r,solderjumper2_right:gnt,solderjumper2_up:o0r,solderjumper3_bridged12_down:i0r,solderjumper3_bridged12_left:r0r,solderjumper3_bridged12_right:pnt,solderjumper3_bridged12_up:s0r,solderjumper3_bridged123_down:a0r,solderjumper3_bridged123_left:A0r,solderjumper3_bridged123_right:fnt,solderjumper3_bridged123_up:c0r,solderjumper3_bridged23_down:l0r,solderjumper3_bridged23_left:u0r,solderjumper3_bridged23_right:ynt,solderjumper3_bridged23_up:g0r,solderjumper3_down:d0r,solderjumper3_left:h0r,solderjumper3_right:Bnt,solderjumper3_up:p0r,spdt_normally_closed_switch_down:_0r,spdt_normally_closed_switch_left:f0r,spdt_normally_closed_switch_right:RCe,spdt_normally_closed_switch_up:I0r,spdt_switch_down:y0r,spdt_switch_left:x0r,spdt_switch_right:TCe,spdt_switch_up:E0r,speaker_down:B0r,speaker_horz:b0r,speaker_left:S0r,speaker_right:Q0r,speaker_up:v0r,speaker_vert:w0r,spst_normally_closed_switch_down:P0r,spst_normally_closed_switch_left:M0r,spst_normally_closed_switch_right:UCe,spst_normally_closed_switch_up:D0r,spst_switch_down:N0r,spst_switch_left:R0r,spst_switch_right:VCe,spst_switch_up:T0r,square_wave_down:k0r,square_wave_left:F0r,square_wave_right:L0r,square_wave_up:H0r,step_recovery_diode_horz:Nxn,step_recovery_diode_vert:O0r,tachometer_horz:cot,tachometer_vert:W0r,testpoint_down:j0r,testpoint_left:$0r,testpoint_right:WCe,testpoint_up:q0r,tilted_ground_down:Z0r,tilted_ground_left:eur,tilted_ground_right:lot,tilted_ground_up:Oxn,triac_horz:Yxn,triac_vert:our,tunnel_diode_horz:Jxn,tunnel_diode_vert:cur,unijunction_transistor_horz:jxn,unijunction_transistor_vert:hur,usbc:mur,var_meter_horz:e3n,var_meter_vert:Cur,varactor_diode_horz:o3n,varactor_diode_vert:Sur,varistor_horz:s3n,varistor_vert:wur,varmeter_horz:Bot,varmeter_vert:Fur,vcc_down:Hur,vcc_left:Gur,vcc_right:Uur,vcc_up:Vur,volt_meter_horz:zur,volt_meter_vert:$ur,watt_hour_meter_horz:Sot,watt_hour_meter_vert:igr,wattmeter_horz:Qot,wattmeter_vert:ggr,zener_diode_horz:dgr,zener_diode_vert:mgr};Object.fromEntries(Object.keys(_3n).map(t=\u003e[t,t]));const _gr={bottom_left:0,middle_bottom:1,bottom_right:2,middle_left:3,center:4,middle_right:5,top_left:6,middle_top:7,top_right:8};function fgr({altiumComponentRecordIndex:t,circuitComponentCenter:e,circuitToAltiumSchematicPoint:n,circuitToAltiumSchematicPrecisePoint:o,symbolName:i}){const r=ygr(i);if(!r)return;const s=Ad(pA(e.x,e.y),pA(-r.center.x,-r.center.y)),a=n(e),A=o(e),c={altiumComponentRecordIndex:t,circuitToAltiumSchematicPoint:n,circuitToAltiumSchematicPrecisePoint:p=\u003e{const m=o(p);return{x:m.x+a.x-A.x,y:m.y+a.y-A.y}},symbolToCircuitMatrix:s},l=[],{pinGeometryByLabel:u,pinGeometryByTerminal:g}=Cgr({schematicSymbol:r,symbolMapping:c});let h,d;for(const p of r.primitives){if(p.type!==\"text\"){l.push(Ltr({graphicPrimitive:p,symbolMapping:c}));continue}const m=f3n({symbolMapping:c,textPrimitive:p});p.text===\"{REF}\"?d=m:p.text===\"{VAL}\"?h=m:l.push(xgr({symbolMapping:c,textPrimitive:p}))}return{commentPlacement:h,designatorPlacement:d,graphicRecordFields:l,pinGeometryByLabel:u,pinGeometryByTerminal:g}}function Igr(t){return`${t.x}:${t.y}`}function Cgr({schematicSymbol:t,symbolMapping:e}){const n=new Map,o=new Map;for(const i of t.ports){const s=t.primitives.flatMap(l=\u003e{if(l.type!==\"path\"||l.points.length\u003c2)return[];const u=l.points[0],g=l.points.at(-1);if(u?.x===i.x\u0026\u0026u.y===i.y)return l.points[1]?[l.points[1]]:[];if(g?.x===i.x\u0026\u0026g.y===i.y){const h=l.points.at(-2);return h?[h]:[]}return[]}).toSorted((l,u)=\u003e{const g=Math.hypot(l.x-i.x,l.y-i.y),h=Math.hypot(u.x-i.x,u.y-i.y);return g-h})[0];if(!s)continue;const a=lk({symbolMapping:e,symbolPoint:s}),A=lk({symbolMapping:e,symbolPoint:i}),c={length:Math.max(1,Math.round(Math.hypot(A.x-a.x,A.y-a.y))),location:a};o.set(Igr(A),c);for(const l of i.labels)n.has(l)||n.set(l,c)}return{pinGeometryByLabel:n,pinGeometryByTerminal:o}}function ygr(t){return Object.entries(_3n).find(([e])=\u003ee===t)?.[1]}function xgr({symbolMapping:t,textPrimitive:e}){const n=f3n({symbolMapping:t,textPrimitive:e});return[\"RECORD=4\",...ete(t.altiumComponentRecordIndex),`LOCATION.X=${n.position.x}`,`LOCATION.Y=${n.position.y}`,\"FONTID=2\",`TEXT=${uu(e.text)}`,\"ORIENTATION=0\",`JUSTIFICATION=${n.justification}`]}function f3n({symbolMapping:t,textPrimitive:e}){return{justification:_gr[e.anchor],position:lk({symbolMapping:t,symbolPoint:{x:e.x,y:e.y}})}}function sye({componentTexts:t,excludedText:e,renderedText:n}){if(n)return t.find(o=\u003eo!==e\u0026\u0026o.type===\"schematic_text\"\u0026\u0026uu(o.text)===n)}const Egr=.05;function Bgr({excludedTexts:t,renderedText:e,schematicTexts:n,targetPosition:o}){const i=n.filter(r=\u003e!t.has(r)\u0026\u0026r.type===\"schematic_text\"\u0026\u0026uu(r.text)===e).map(r=\u003e{const s=AA(r.position);return{distanceSquared:s?(s.x-o.x)**2+(s.y-o.y)**2:Number.POSITIVE_INFINITY,schematicText:r}}).sort((r,s)=\u003er.distanceSquared-s.distanceSquared)[0];return i\u0026\u0026i.distanceSquared\u003c=Egr**2?i.schematicText:void 0}const m1=20,bgr=300,Sgr=400,I3n=100;function Qgr(t,e){const n=Bn(e,t);return{x:Math.round(n.x),y:Math.round(n.y)}}function vgr({element:t,points:e}){if(t.type===\"schematic_line\"){e.push({x:fr(t.x1),y:fr(t.y1)},{x:fr(t.x2),y:fr(t.y2)});return}if(t.type===\"schematic_path\"\u0026\u0026Array.isArray(t.points)){for(const o of t.points){const i=AA(o);i\u0026\u0026e.push(i)}return}const n=AA(t.center);if(n){if(t.type===\"schematic_rect\"){const o=fr(t.width),i=fr(t.height);e.push({x:n.x-o/2,y:n.y-i/2},{x:n.x+o/2,y:n.y+i/2});return}if(t.type===\"schematic_circle\"||t.type===\"schematic_arc\"){const o=fr(t.radius),i=t.type===\"schematic_arc\"?fr(t.altium_secondary_radius):0,r=i\u003e0?i:o;e.push({x:n.x-o,y:n.y-r},{x:n.x+o,y:n.y+r});return}}}function wgr(t,e){const n=[];for(const I of t){const C=AA(I.center);C\u0026\u0026n.push(C),F1e(I)\u0026\u0026(ti(I.schematic_symbol_id)||ti(I.schematic_component_id))\u0026\u0026vgr({element:I,points:n});const y=AA(I.anchor_position);y\u0026\u0026n.push(y);const x=T1e(I),E=x?AA(I.position):void 0;if(E\u0026\u0026n.push(E),x\u0026\u0026I.type===\"schematic_rect\"){const B=fr(I.width),S=fr(I.height);C\u0026\u0026B\u003e0\u0026\u0026S\u003e0\u0026\u0026n.push({x:C.x-B/2,y:C.y-S/2},{x:C.x+B/2,y:C.y+S/2})}if(x\u0026\u0026I.type===\"schematic_path\"\u0026\u0026Array.isArray(I.points))for(const B of I.points){const S=AA(B);S\u0026\u0026n.push(S)}if(I.type===\"schematic_trace\"\u0026\u0026Array.isArray(I.edges))for(const B of I.edges){if(!HE(B))continue;const S=AA(B.from),Q=AA(B.to);S\u0026\u0026n.push(S),Q\u0026\u0026n.push(Q)}if(I.type===\"schematic_trace\"\u0026\u0026Array.isArray(I.junctions))for(const B of I.junctions){const S=AA(B);S\u0026\u0026n.push(S)}}const o=n.length\u003e0?Math.min(...n.map(I=\u003eI.x)):0,i=n.length\u003e0?Math.min(...n.map(I=\u003eI.y)):0,r=n.length\u003e0?Math.max(...n.map(I=\u003eI.x)):0,s=n.length\u003e0?Math.max(...n.map(I=\u003eI.y)):0,a=Math.round(o*m1)/m1,A=Math.round(i*m1)/m1,c=Math.round(r*m1)/m1,l=Math.round(s*m1)/m1,u=(c-a)*m1,g=(l-A)*m1,h=e?e.width*m1:Math.max(Sgr,u+I3n*2),d=e?e.height*m1:Math.max(bgr,g+I3n*2),p=(h-u)/2,m=(d-g)/2,_=e?.circuitOrigin?Ad(pA(e.circuitOrigin.x*m1,e.circuitOrigin.y*m1),dC(m1,m1)):Ad(pA(p,m),dC(m1,m1),pA(-a,-A)),f=Bn(_,{x:0,y:0});return{circuitToAltiumSchematicLength:I=\u003e{const C=Bn(_,{x:I,y:0});return Math.abs(C.x-f.x)},circuitToAltiumSchematicPoint:I=\u003eQgr(I,_),circuitToAltiumSchematicPrecisePoint:I=\u003eBn(_,I),width:h,height:d}}const Pgr=32,Mgr=8,Dgr=16,C3n=16,Ngr=1,Rgr=.1,Tgr=3,kgr=1,y3n=3615007,Fgr=12779519,Lgr={left:2,right:0,up:1,down:3},x3n={x:-1,y:0},Hgr={left:x3n,right:{x:1,y:0},up:{x:0,y:1},down:{x:0,y:-1}};function vot({element:t,id:e,map:n}){e\u0026\u0026n.set(e,[...n.get(e)??[],t])}function Ogr(t){const e={byComponentId:new Map,bySymbolId:new Map};for(const n of t.filter(F1e))vot({element:n,id:ti(n.schematic_component_id),map:e.byComponentId}),vot({element:n,id:ti(n.schematic_symbol_id),map:e.bySymbolId});return e}function Ggr({maps:t,schematicComponent:e}){const n=ti(e.schematic_component_id),o=ti(e.schematic_symbol_id),i=t.byComponentId.get(n)??[],r=i.filter(A=\u003e{const c=ti(A.schematic_symbol_id);return!o||!c||c===o}),a=[...new Set(o?[o]:i.map(A=\u003eti(A.schematic_symbol_id)).filter(Boolean))].flatMap(A=\u003et.bySymbolId.get(A)??[]);return[...new Set([...r,...a])]}function Ygr({circuitComponentCenter:t,circuitComponentHeight:e,circuitComponentWidth:n,circuitToAltiumSchematicPoint:o}){const i=o({x:t.x-n/2,y:t.y-e/2}),r=o({x:t.x+n/2,y:t.y+e/2});return{bottom:Math.min(i.y,r.y),left:Math.min(i.x,r.x),right:Math.max(i.x,r.x),top:Math.max(i.y,r.y)}}function Ugr({circuitPinTerminal:t,circuitToAltiumSchematicPoint:e,distanceFromComponentEdge:n,facingDirection:o}){const i=Hgr[o]??x3n,r={x:t.x-i.x*n,y:t.y-i.y*n},s=e(r),a=e(t);return{length:Math.max(1,Math.round(Math.hypot(a.x-s.x,a.y-s.y))),location:s}}function Kgr({element:t,includeAllSchematicElements:e,schematicSheetId:n}){const o=ti(t.schematic_sheet_id);return n?o===n||e\u0026\u0026!o:!o||e}function Vgr({element:t,schematicComponents:e}){if(t.type!==\"schematic_rect\"||t.is_filled!==!0||!T1e(t))return!1;const n=AA(t.center),o=fr(t.width)/2,i=fr(t.height)/2;return!n||o\u003c=0||i\u003c=0?!1:e.some(r=\u003e{const s=AA(r.center),a=HE(r.size)?r.size:void 0,A=fr(a?.width)/2,c=fr(a?.height)/2;return s!==void 0\u0026\u0026A\u003e0\u0026\u0026c\u003e0\u0026\u0026Math.abs(s.x-n.x)+A\u003c=o\u0026\u0026Math.abs(s.y-n.y)+c\u003c=i})}function d_(t,e){const n=e.nextRecordIndex;return e.lines.push(`|${t.join(\"|\")}`),e.nextRecordIndex++,n}function zgr({fontIdBySourceFontId:t,recordFields:e}){return e.map(n=\u003e{const o=/^FONTID=(\\d+)$/iu.exec(n),i=Number(o?.[1]),r=t.get(i);return r===void 0?n:`FONTID=${r}`})}function Jgr({childSheets:t=[],circuitJson:e,includeAllSchematicElements:n,schematicSheetId:o,sheetSettings:i,template:r}){const s=new Map(Dd(e,\"source_port\").map(ne=\u003e[ti(ne.source_port_id),ne])),a=e.filter(ne=\u003ene.type?.startsWith(\"schematic_\")===!0\u0026\u0026ne.type!==\"schematic_sheet\"\u0026\u0026!(ne.type===\"schematic_port\"\u0026\u0026!ti(ne.schematic_component_id)\u0026\u0026ne.is_connected===!1\u0026\u0026s.get(ti(ne.source_port_id))?.do_not_connect!==!0)\u0026\u0026Kgr({element:ne,includeAllSchematicElements:n,schematicSheetId:o})),{circuitToAltiumSchematicLength:A,circuitToAltiumSchematicPoint:c,circuitToAltiumSchematicPrecisePoint:l,width:u,height:g}=wgr(a,i),h=Dtr({childSheets:t,circuitJson:e}),d=a.some(ne=\u003ene.type!==\"schematic_graphic\"\u0026\u0026ne.type!==\"schematic_group\"\u0026\u0026ne.type!==\"schematic_symbol\"),p=new Set(h.flatMap(ne=\u003ene.placementComponent?[ne.placementComponent]:[])),m=h.filter(ne=\u003e!ne.placementComponent),_=Math.max(Math.ceil(Math.sqrt(m.length)),1),f=Math.ceil(m.length/_),I=Math.max(...m.map(ne=\u003ene.width),0),C=Math.max(...m.map(ne=\u003ene.height),0),y=d?u+40:60,x=_*I+Math.max(_-1,0)*40,E=f*C+Math.max(f-1,0)*40,B=Math.max(u,m.length\u003e0?y+x+60:0),S=Math.max(g,m.length\u003e0?E+120:0),Q=a.filter(ne=\u003ene.type===\"schematic_text\"\u0026\u0026T1e(ne)),w=new Set,M=[];for(const[ne,le]of a.filter(ge=\u003ege.type===\"schematic_net_label\").entries()){const ge=uu(le.text);if(!ge)continue;const _e=AA(le.anchor_position)??AA(le.center)??{x:0,y:0},ue=Bgr({excludedTexts:w,renderedText:ge,schematicTexts:Q,targetPosition:_e});ue\u0026\u0026w.add(ue),M.push({circuitLabelPosition:_e,labelText:ge,netLabelIndex:ne,schematicNetLabel:le,textPresentation:ue})}const k=Atr({netLabelTextPresentations:M.flatMap(({schematicNetLabel:ne,textPresentation:le})=\u003ele\u0026\u0026!VIn(ti(ne.symbol_name))?[le]:[]),schematicElements:a,templateFontFields:r?.fontFields}),R={...k,fontIdBySizeCircuitUnits:k.nativeTextFontIdBySizeCircuitUnits},F={lines:[\"|HEADER=Protel for Windows - Schematic Capture Ascii File Version 5.0\"],nextRecordIndex:0};d_([\"RECORD=31\",...k.sheetRecordFields,`AREACOLOR=${kIn}`,`CUSTOMX=${B}`,`CUSTOMY=${S}`,\"USECUSTOMSHEET=T\",\"SNAPGRIDON=T\",\"SNAPGRIDSIZE=10\",...r?.sheetRecordFields??[]],F);for(const ne of r?.recordFields??[])d_(zgr({fontIdBySourceFontId:k.templateFontIdBySourceFontId,recordFields:ne}),F);const O=a.filter(ne=\u003ene.type===\"schematic_component\"),U=new Set(a.filter(ne=\u003eVgr({element:ne,schematicComponents:O})));for(const ne of U){const le=WIn({annotation:ne,circuitToAltiumSchematicPoint:c,fontTable:k});le\u0026\u0026d_(le,F)}let Y=0;for(const ne of h){let le=ne,ge;if(ne.placementComponent){const ue=AA(ne.placementComponent.center)??{x:0,y:0},fe=HE(ne.placementComponent.size)?ne.placementComponent.size:{},pe=A(Tu(fe.width,ne.width/20)),ye=A(Tu(fe.height,ne.height/20)),Me=c(ue);ge={x:Me.x-pe/2,y:Me.y+ye/2},le={...ne,height:ye,width:pe}}else{const ue=Y%_,fe=Math.floor(Y/_);ge={x:y+ue*(I+40),y:S-60-fe*(C+40)},Y++}const _e=d_(Ttr({location:ge,plan:le}),F);for(const ue of Rtr({altiumSymbolRecordIndex:_e,location:ge,plan:le}))d_(ue,F);for(const ue of Ntr({location:ge,plan:le}))d_(ue,F)}const W=new Map(Dd(e,\"source_component\").filter(ne=\u003etypeof ne.source_component_id==\"string\").map(ne=\u003e[ti(ne.source_component_id),ne])),te=new Map(Dd(e,\"schematic_symbol\").map(ne=\u003e[ti(ne.schematic_symbol_id),ne])),j=new Map,J=new Map,oe=Ogr(a);for(const ne of a.filter(le=\u003ele.type===\"schematic_port\")){const le=ti(ne.schematic_component_id);le\u0026\u0026j.set(le,[...j.get(le)??[],ne])}for(const ne of a.filter(le=\u003ele.type===\"schematic_text\"\u0026\u0026!F1e(le)))vot({element:ne,id:ti(ne.schematic_component_id),map:J});for(const[ne,le]of a.filter(ge=\u003ege.type===\"schematic_component\"\u0026\u0026!p.has(ge)).entries()){const ge=AA(le.center)??{x:0,y:0},_e=c(ge),ue=W.get(ti(le.source_component_id)),fe=uu(ue?.name)||`U${ne+1}`,pe=uu(le.symbol_display_value),ye=ti(le.schematic_component_id),Me=J.get(ye)??[],ve=sye({componentTexts:Me,excludedText:void 0,renderedText:fe}),he=sye({componentTexts:Me,excludedText:ve,renderedText:pe}),Qe=Me.filter(kt=\u003ekt!==ve\u0026\u0026kt!==he),Pe=Me.length\u003e0,we=te.get(ti(le.schematic_symbol_id)),Te=uu(we?.name)||uu(le.symbol_name)||fe,Re=d_([\"RECORD=1\",`LOCATION.X=${_e.x}`,`LOCATION.Y=${_e.y}`,\"ORIENTATION=0\",`LIBREFERENCE=${Te}`,\"SHOWHIDDENPINS=F\",\"CURRENTPARTID=1\",\"ISMIRRORED=F\",`UNIQUEID=${uu(le.schematic_component_id)}`],F),Ee=HE(le.size)?le.size:{},ke=Tu(Ee.width,2),Ce=Tu(Ee.height,1.5),Le=Ygr({circuitComponentCenter:ge,circuitComponentHeight:Ce,circuitComponentWidth:ke,circuitToAltiumSchematicPoint:c}),Ye=Ggr({maps:oe,schematicComponent:le}).flatMap(kt=\u003e{const it=Xtr({altiumComponentRecordIndex:Re,circuitToAltiumSchematicLength:A,circuitToAltiumSchematicPoint:c,fontTable:k,graphic:kt});return it?[it]:[]}),tt=Ye.length\u003e0,At=!ve\u0026\u0026(Pe||tt),at=tt?void 0:fgr({altiumComponentRecordIndex:Re,circuitComponentCenter:ge,circuitToAltiumSchematicPoint:c,circuitToAltiumSchematicPrecisePoint:l,symbolName:ti(le.symbol_name)});if(tt)for(const kt of Ye)d_(kt,F);else if(at)for(const kt of at.graphicRecordFields)d_(kt,F);else d_([\"RECORD=14\",`OWNERINDEX=${Re}`,\"OWNERPARTID=1\",`LOCATION.X=${Le.left}`,`LOCATION.Y=${Le.bottom}`,`CORNER.X=${Le.right}`,`CORNER.Y=${Le.top}`,\"LINEWIDTH=1\",\"COLOR=136\",`AREACOLOR=${Fgr}`,\"ISSOLID=T\"],F);const nt=at?.designatorPlacement,gt=at?.commentPlacement,bt=cZe({circuitToAltiumSchematicPoint:c,fallbackAltiumColor:y3n,fallbackAltiumPosition:nt?.position??{x:Le.left,y:Le.top+12},fallbackFontId:1,fallbackJustification:nt?.justification??0,fontTable:R,schematicText:ve}),Ct=cZe({circuitToAltiumSchematicPoint:c,fallbackAltiumColor:y3n,fallbackAltiumPosition:gt?.position??{x:Le.left,y:Le.bottom-12},fallbackFontId:2,fallbackJustification:gt?.justification??0,fontTable:R,schematicText:he});d_([\"RECORD=34\",`OWNERINDEX=${Re}`,\"OWNERPARTID=-1\",`LOCATION.X=${bt.position.x}`,`LOCATION.Y=${bt.position.y}`,`FONTID=${bt.fontId}`,\"NAME=Designator\",`TEXT=${fe}`,`COLOR=${bt.color}`,\"SHOWNAME=F\",`ISHIDDEN=${At?\"T\":\"F\"}`,`ORIENTATION=${bt.orientation}`,`JUSTIFICATION=${bt.justification}`],F),d_([\"RECORD=41\",`OWNERINDEX=${Re}`,\"OWNERPARTID=-1\",`LOCATION.X=${Ct.position.x}`,`LOCATION.Y=${Ct.position.y}`,`FONTID=${Ct.fontId}`,\"NAME=Comment\",`TEXT=${pe}`,`COLOR=${Ct.color}`,\"SHOWNAME=F\",`ISHIDDEN=${pe?\"F\":\"T\"}`,`ORIENTATION=${Ct.orientation}`,`JUSTIFICATION=${Ct.justification}`],F);const Dt=j.get(ye)??[];for(const[kt,it]of Dt.entries()){const Yt=s.get(ti(it.source_port_id)),pn=AA(it.center)??{x:0,y:0},be=ti(it.facing_direction),et=Ugr({circuitPinTerminal:pn,circuitToAltiumSchematicPoint:c,distanceFromComponentEdge:Math.max(fr(it.distance_from_component_edge),0),facingDirection:be}),It=Lgr[be]??2,Bt=!at\u0026\u0026!tt,mt=uu(it.display_pin_label)||uu(Yt?.name)||`Pin ${kt+1}`,st=uu(Yt?.pin_number)||`${kt+1}`,xt=[ti(it.display_pin_label),ti(Yt?.name),...Array.isArray(Yt?.port_hints)?Yt.port_hints.flatMap(Ao=\u003etypeof Ao==\"string\"?[Ao]:[]):[],st],Xe=c(pn),Ze=at?.pinGeometryByTerminal.get(`${Xe.x}:${Xe.y}`)??xt.map(Ao=\u003eat?.pinGeometryByLabel.get(Ao)).find(Ao=\u003eAo!==void 0),dt=Ze?.location??(at?c(pn):et.location),Ut=Ze?.length??(at?10:et.length),Wt=typeof it.display_pin_label==\"string\"?sye({componentTexts:Qe,excludedText:void 0,renderedText:mt}):void 0,Xt=typeof it.pin_number==\"number\"?sye({componentTexts:Qe,excludedText:Wt,renderedText:st}):void 0,Jt=tt\u0026\u0026typeof it.display_pin_label==\"string\",yn=!tt\u0026\u0026(Pe?typeof it.display_pin_label==\"string\":Bt),An=Wt===void 0\u0026\u0026(Jt||yn),kn=Xt===void 0\u0026\u0026!tt\u0026\u0026(Pe?typeof it.pin_number==\"number\":Bt),$n=(An?Mgr:0)|(kn?Dgr:0),ht=Pgr|$n|It,rn=qee({cssColor:ti((Wt??Xt)?.color),fallbackAltiumColor:b4}),Lt=R.fontIdBySizeCircuitUnits.get(Tu(it.display_pin_label_font_size,HIn)),Ho=R.fontIdBySizeCircuitUnits.get(OIn);d_([\"RECORD=2\",`OWNERINDEX=${Re}`,\"OWNERPARTID=1\",`DESIGNATOR=${st}`,`NAME=${mt}`,`PINCONGLOMERATE=${ht}`,`LOCATION.X=${dt.x}`,`LOCATION.Y=${dt.y}`,`PINLENGTH=${Ut}`,...it.has_input_arrow===!0?[`SYMBOL_INNEREDGE=${Tgr}`]:[],...it.is_drawn_with_inversion_circle===!0?[`SYMBOL_OUTEREDGE=${kgr}`]:[],`COLOR=${rn}`,`PINNAME_POSITIONCONGLOMERATE=${C3n|Ngr}`,...OS(\"NAME_CUSTOMPOSITION_MARGIN\",-A(Rgr)),`NAME_CUSTOMFONTID=${Lt}`,`NAME_CUSTOMCOLOR=${rn}`,`PINDESIGNATOR_POSITIONCONGLOMERATE=${C3n}`,`DESIGNATOR_CUSTOMFONTID=${Ho}`,`DESIGNATOR_CUSTOMCOLOR=${rn}`],F)}for(const kt of Qe){const it=XIn({altiumComponentRecordIndex:Re,circuitToAltiumSchematicPoint:c,fontTable:R,schematicText:kt});it\u0026\u0026d_(it,F)}}for(const ne of a.filter(le=\u003ele.type===\"schematic_port\"\u0026\u0026!ti(le.schematic_component_id))){const le=s.get(ti(ne.source_port_id));if(le?.do_not_connect===!0\u0026\u0026ne.is_internal_circuit_port!==!0)continue;const _e=uu(ne.display_pin_label)||uu(le?.name),ue=AA(ne.center);!_e||!ue||d_(atr({altiumPortPosition:c(ue),facingDirection:ti(ne.facing_direction),hasInputArrow:ne.has_input_arrow===!0,hasOutputArrow:ne.has_output_arrow===!0,portName:_e}),F)}for(const ne of a.filter(le=\u003ele.type===\"schematic_trace\"))if(Array.isArray(ne.edges))for(const le of ne.edges){if(!HE(le))continue;const ge=AA(le.from),_e=AA(le.to);if(!ge||!_e)continue;const ue=c(ge),fe=c(_e);d_([\"RECORD=27\",\"LINEWIDTH=1\",\"LOCATIONCOUNT=2\",`X1=${ue.x}`,`Y1=${ue.y}`,`X2=${fe.x}`,`Y2=${fe.y}`,\"COLOR=34816\"],F)}const ie=new Set;for(const ne of a.filter(le=\u003ele.type===\"schematic_trace\"))if(Array.isArray(ne.junctions))for(const le of ne.junctions){const ge=AA(le);if(!ge)continue;const _e=c(ge),ue=`${_e.x}:${_e.y}`;ie.has(ue)||(ie.add(ue),d_([\"RECORD=29\",`LOCATION.X=${_e.x}`,`LOCATION.Y=${_e.y}`,\"COLOR=34816\"],F))}for(const{circuitLabelPosition:ne,labelText:le,netLabelIndex:ge,schematicNetLabel:_e,textPresentation:ue}of M){const fe=Ctr({anchorSide:ti(_e.anchor_side),altiumLabelCenter:c(AA(_e.center)??ne),altiumLabelPosition:c(ne),decorationIndex:ge,fontTable:ti(ue?.source_trace_id)?R:k,labelText:le,symbolName:ti(_e.symbol_name),textPresentation:ue});for(const pe of fe)d_(pe,F)}for(const ne of a.filter(le=\u003ele.type===\"schematic_port\")){if(s.get(ti(ne.source_port_id))?.do_not_connect!==!0)continue;const ge=AA(ne.center);ge\u0026\u0026d_(zIn({altiumNoConnectPosition:c(ge)}),F)}for(const ne of a){if(w.has(ne)||U.has(ne))continue;const le=WIn({annotation:ne,circuitToAltiumSchematicPoint:c,fontTable:ti(ne.source_trace_id)?R:k});le\u0026\u0026d_(le,F)}return`${F.lines.join(`\\r\n`)}\\r\n`}const Wgr=\"39\",jgr=\"30\",$gr=new Set([\"AREACOLOR\",\"CUSTOMX\",\"CUSTOMY\",\"FONTIDCOUNT\",\"RECORD\",\"SNAPGRIDON\",\"SNAPGRIDSIZE\",\"USECUSTOMSHEET\"]),E3n=/^(?:BOLD|FONTNAME|ITALIC|ROTATION|SIZE|STRIKEOUT|UNDERLINE)(\\d+)$/u;function qgr({ancestor:t,document:e,record:n}){const o=new Set;let i=e.getParent(n);for(;i\u0026\u0026!o.has(i);){if(i===t)return!0;o.add(i),i=e.getParent(i)}return!1}function Xgr(t){if(!t)return[];const e=new Map;for(const n of t.fields){const o=E3n.exec(n.key.toUpperCase()),i=Number(o?.[1]);!Number.isSafeInteger(i)||i\u003c1||e.set(i,[...e.get(i)??[],`${n.key}=${n.value}`])}return[...e.entries()].sort(([n],[o])=\u003en-o).map(([n,o])=\u003e({fields:o,sourceFontId:n}))}function Zgr(t){return t?t.fields.flatMap(e=\u003e{const n=e.key.toUpperCase();return $gr.has(n)||E3n.test(n)?[]:[`${e.key}=${e.value}`]}):[]}function edr(t){return new Set(t.flatMap(e=\u003e{const n=e.getDecoded(\"TEXT\")??\"\";return n.startsWith(\"=\")\u0026\u0026n.length\u003e1?[n.slice(1)]:[]}))}function tdr({content:t}){const e=jXi(t).document;if(!(e instanceof d1e))throw new TypeError(`Expected an Altium SchDot or SchDoc template, got ${e.type}`);const n=e.records,o=n.find(u=\u003eu.recordKind===Wgr);if(!o)throw new TypeError(\"Altium schematic template has no RECORD=39 template\");const i=n.filter(u=\u003eu===o||qgr({ancestor:o,document:e,record:u})),r=edr(i),s=n.filter(u=\u003ei.includes(u)||u.recordKind===jgr\u0026\u0026e.getParent(u)===void 0?!0:u.recordKind===\"41\"\u0026\u0026e.getParent(u)===void 0\u0026\u0026r.has(u.getDecoded(\"NAME\")??\"\")),a=new Set(s),A=new Map(s.map((u,g)=\u003e[u,g+1])),c=s.map(u=\u003e{const g=e.getParent(u),h=g?A.get(g):void 0;return u.fields.map(d=\u003e{if(d.key.toUpperCase()!==\"OWNERINDEX\")return`${d.key}=${d.value}`;if(h===void 0)throw new TypeError(\"Altium schematic template record has an owner outside its template\");return`${d.key}=${h}`})}),l=n.find(u=\u003eu.recordKind===\"31\");return{embeddedImages:e.embeddedImages.flatMap(u=\u003ea.has(u.record)?[{compressedBytes:u.getCompressedBytes(),name:u.name}]:[]),fontFields:Xgr(l),recordFields:c,sheetRecordFields:Zgr(l)}}function ndr(t,e){return t.find(n=\u003en.schematicSheetId===e)}function odr({fallbackFilename:t,sourceFilename:e}){let i=e.replaceAll(\"\\\\\",\"/\").split(\"/\").at(-1)?.replace(/\\.SchDoc$/iu,\"\")?.replace(/[\u003c\u003e:\"/\\\\|?*]/gu,\"-\").replace(/[. ]+$/gu,\"\").trim();for(let r=0;r\u003c=31;r++)i=i?.replaceAll(String.fromCharCode(r),\"-\");return i?`${i}.SchDoc`:t}class idr extends w1e{_step(){const n=Dd(this.input,\"schematic_sheet\").sort((s,a)=\u003efr(s.sheet_index)-fr(a.sheet_index)).map((s,a)=\u003e{const A=`${this.context.safeProjectName}-${String(a+1).padStart(2,\"0\")}.SchDoc`;return{filename:odr({fallbackFilename:A,sourceFilename:ti(s.source_filename)}),name:ti(s.display_name)||ti(s.name)||`Sheet ${a+1}`,schematicSheetId:ti(s.schematic_sheet_id),subcircuitId:ti(s.subcircuit_id)||void 0}}),o=new Set,i=n.filter(s=\u003e{const a=s.filename.toLocaleLowerCase(\"en-US\");return o.has(a)?!1:(o.add(a),!0)}),r=n.length===0?[{childSheets:[],filename:`${this.context.safeProjectName}.SchDoc`,includeAllSchematicElements:!0,schematicSheetId:void 0}]:[{childSheets:n,filename:`${this.context.safeProjectName}.SchDoc`,includeAllSchematicElements:!1,schematicSheetId:void 0},...i.map(s=\u003e({childSheets:[],filename:s.filename,includeAllSchematicElements:!1,schematicSheetId:s.schematicSheetId}))];this.context.schematics=r.map(s=\u003e{const a=ndr(this.context.schematicSheets,s.schematicSheetId),A=a?.templateContent?tdr({content:a.templateContent}):void 0,c=Jgr({childSheets:s.childSheets,circuitJson:this.input,schematicSheetId:s.schematicSheetId,includeAllSchematicElements:s.includeAllSchematicElements,sheetSettings:a,template:A});return{asciiContent:c,content:UZi(c,{embeddedImages:A?.embeddedImages}),filename:s.filename}}),this.finished=!0}getOutput(){if(!this.context.schematics)throw new Error(\"Schematic document stage has not finished\");return this.context.schematics}}class rdr extends w1e{_step(){const{pcb:e,project:n,schematics:o}=this.context;if(!e||!n||!o)throw new Error(\"Every document stage must finish before validation\");E1e(e.asciiContent,{mode:\"strict\"}),U1n(e.content);for(const i of o)jXe(i.content);y1n(n.content),this.context.validated=!0,this.finished=!0}getOutput(){if(!this.context.validated)throw new Error(\"Altium document validation has not finished\");return!0}}function sdr(t){return t.map(e=\u003e{const n={};for(const[o,i]of Object.entries(e))n[o]=i;return n})}class B3n{constructor(e,n={}){this.currentStageIndex=0,this.finished=!1;const o=n.projectName??\"board\",i=sdr(e);this.context={circuitJson:i,projectName:o,safeProjectName:JZi(o),schematicSheets:n.schematicSheets??[],validated:!1},this.pipeline=[new etr(i,this.context),new idr(i,this.context),new ttr(i,this.context),new rdr(i,this.context)]}get currentStage(){return this.pipeline[this.currentStageIndex]}step(){const e=this.currentStage;if(!e){this.finished=!0;return}e.step(),e.finished\u0026\u0026(this.currentStageIndex++,this.finished=this.currentStageIndex\u003e=this.pipeline.length)}runUntilFinished(){for(;!this.finished;)this.step()}getOutput(){const{pcb:e,project:n,schematics:o,validated:i}=this.context;if(!this.finished||!i||!e||!n||!o)throw new Error(\"Converter must finish before its output is read\");return{pcb:e,project:n,schematics:o}}async getOutputZip(){const{pcb:e,project:n,schematics:o}=this.getOutput(),i=new xfe;i.file(n.filename,n.content),i.file(e.filename,e.content);for(const r of o)i.file(r.filename,r.content);return i.file(\"README.txt\",[`${this.context.projectName} — Altium Designer project`,\"\",\"Generated in Altium's native binary document format from the board's routed Circuit JSON.\",`Open ${n.filename} in Altium Designer.`].join(`\\r\n`)),i.generateAsync({type:\"uint8array\"})}}async function adr(t,e){const n=new B3n(t,{projectName:e});return n.runUntilFinished(),n.getOutputZip()}const Adr=Object.freeze(Object.defineProperty({__proto__:null,CircuitJsonToAltiumConverter:B3n,convertCircuitJsonToAltiumZip:adr},Symbol.toStringTag,{value:\"Module\"}))}));\n","content_mimetype":"application/javascript","created_at":"2026-10-03T03:04:54.914Z"}; window.SSR_PACKAGE_RELEASES = [{"package_release_id":"43abb248-47c9-4cfd-9d4c-99af86d33572","package_id":"78c97ef5-3f00-466a-93ba-5ad748a0cb2d","version":"1.3.4","github_commit_sha":null,"is_locked":false,"is_latest":true,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-03T02:59:53.108Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-f95e3b44ac11a208f017f25beb325180","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=43abb248-47c9-4cfd-9d4c-99af86d33572\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=43abb248-47c9-4cfd-9d4c-99af86d33572\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=43abb248-47c9-4cfd-9d4c-99af86d33572\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"e78dc6d3-bc8f-492b-8c2f-366f631c6b7b","user_code_job_started_at":"2026-10-03T03:01:08.754Z","user_code_job_completed_at":"2026-10-03T03:05:45.696Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=f74eaa772b0db39f1a550e05e30f67bbb1797f48a1a31929a3896acc64604da1","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":null},{"package_release_id":"cd03e48e-6329-4399-ba40-0f5f9f8894c9","package_id":"78c97ef5-3f00-466a-93ba-5ad748a0cb2d","version":"1.3.3","github_commit_sha":null,"is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-03T02:54:41.739Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-bbb7b4f3c5e99c4063231a4b65dd2fca","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=cd03e48e-6329-4399-ba40-0f5f9f8894c9\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"0b05de52-a077-4e70-ade2-70e3e9aea388","user_code_job_started_at":"2026-10-03T02:54:50.177Z","user_code_job_completed_at":"2026-10-03T02:59:06.405Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=e0f31401043f1249fbb9345ed6ec9ecab9a8afd385cf8097a3aa18a293a7e5be","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":null},{"package_release_id":"57e014a8-9e28-4c2e-93a7-be4d4c01a034","package_id":"78c97ef5-3f00-466a-93ba-5ad748a0cb2d","version":"1.3.2","github_commit_sha":null,"is_locked":false,"is_latest":false,"ready_to_build":true,"is_pr_preview":false,"created_at":"2026-10-03T00:28:20.276Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":true,"transpilation_display_status":"pending","fs_sha":"md5-1f2a9b9c1e21c123b75f6eee171121d3","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":true,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":true,"image_generation_display_status":"pending","pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=57e014a8-9e28-4c2e-93a7-be4d4c01a034\u0026file_path=dist%2Findex%2Fpcb.svg","sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=57e014a8-9e28-4c2e-93a7-be4d4c01a034\u0026file_path=dist%2Findex%2Fschematic.svg","cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=57e014a8-9e28-4c2e-93a7-be4d4c01a034\u0026file_path=dist%2Findex%2F3d.png","package_release_website_url":null,"display_status":"pending","latest_package_build_id":"436492a8-0ef0-4f09-83b0-44e2321ee75a","user_code_job_started_at":"2026-10-03T00:28:29.615Z","user_code_job_completed_at":"2026-10-03T00:31:05.241Z","user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":"https://usercode.tscircuit.com/user_code_jobs/view_log_stream?user_code_job_id=1d16c4b2083aed302acb01706db0f455317f62f168c8ef37d9eea4ae59bb0800","ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":null},{"package_release_id":"2c1a5fc9-4b10-470e-af29-c62fc6d0ba52","package_id":"78c97ef5-3f00-466a-93ba-5ad748a0cb2d","version":"1.3.1","github_commit_sha":null,"is_locked":false,"is_latest":false,"ready_to_build":false,"is_pr_preview":false,"created_at":"2026-10-03T00:27:03.376Z","circuit_json_build_error":null,"circuit_json_build_error_last_updated_at":null,"has_transpiled":false,"transpilation_error":null,"transpilation_logs":null,"transpilation_in_progress":false,"transpilation_started_at":null,"transpilation_completed_at":null,"transpilation_is_stale":false,"transpilation_display_status":"pending","fs_sha":"md5-88906ed00b35c39006cb9d3243021c22","circuit_json_build_logs":null,"circuit_json_build_in_progress":false,"circuit_json_build_started_at":null,"circuit_json_build_completed_at":null,"circuit_json_build_is_stale":false,"circuit_json_build_display_status":"pending","image_generation_error":null,"image_generation_error_last_updated_at":null,"image_generation_logs":null,"image_generation_in_progress":false,"image_generation_started_at":null,"image_generation_completed_at":null,"image_generation_is_stale":false,"image_generation_display_status":"pending","pcb_preview_image_url":null,"sch_preview_image_url":null,"cad_preview_image_url":null,"package_release_website_url":null,"display_status":"pending","latest_package_build_id":null,"user_code_job_started_at":null,"user_code_job_completed_at":null,"user_code_job_error":null,"user_code_job_completed_logs":null,"user_code_job_log_stream_url":null,"ai_review_requested":false,"github_pr_number":null,"github_pr_title":null,"github_branch_name":null}]; window.SSR_PACKAGE_BUILDS = []; window.SSR_RELATED_PACKAGES = [{"package_id":"7c4f7ef6-0c20-441e-b5a5-1952d955eccf","creator_account_id":"d16b4134-1b33-4d60-bdf2-151748766d5b","latest_package_release_id":"cbdd52b4-d52e-4095-8882-d107ff959339","last_built_release_id":"cbdd52b4-d52e-4095-8882-d107ff959339","latest_package_release_fs_sha":"md5-2ea962e9b2b863a7a4703b259838dc8e","latest_pcb_preview_image_url":"https://registry-api.tscircuit.com/package_files/view?package_release_id=cbdd52b4-d52e-4095-8882-d107ff959339\u0026file_path=dist%2Findex%2Fpcb.svg","latest_sch_preview_image_url":"https://registry-api.tscircuit.com/package_files/view?package_release_id=cbdd52b4-d52e-4095-8882-d107ff959339\u0026file_path=dist%2Findex%2Fschematic.svg","latest_cad_preview_image_url":"https://registry-api.tscircuit.com/package_files/download?package_release_id=cbdd52b4-d52e-4095-8882-d107ff959339\u0026file_path=dist%2Findex%2F3d.png","latest_version":"0.0.1","license":"unset","owner_org_id":"9e4219cf-4b9e-4932-9128-52cef42cad89","org_owner_tscircuit_handle":"0hmx3","owner_github_username":null,"github_repo_full_name":null,"is_source_from_github":false,"description":"","name":"aura/diy-power-delivery-trigger","unscoped_name":"diy-power-delivery-trigger","star_count":0,"created_at":"2026-04-23T21:10:31.029Z","updated_at":"2026-04-25T11:57:14.077Z","ai_description":"This hardware design implements a USB Type-C port with supporting power management and signal conditioning components, including a USB-C connector, a FUSB302 USB-C port controller, ESD protection diodes, a buck converter for 3.3V power regulation, an STM32 microcontroller for control and processing, an RGB LED indicator, push button, terminal block connections, and associated filtering and support components.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"files","website":null,"github_installation_id":null,"allow_pr_previews":false,"related_type":"similar_ai_description","thumbnail_url":"https://registry-api.tscircuit.com/package_files/view?package_release_id=cbdd52b4-d52e-4095-8882-d107ff959339\u0026file_path=dist%2Findex%2Fpcb.svg"},{"package_id":"ff0458bb-01f3-4b11-83c0-af6a7376c78c","creator_account_id":"9f398687-69d0-4ef4-a48c-bb6dc990e7df","latest_package_release_id":"3d6952c4-e6ee-4711-a7c7-dded0cdef4eb","last_built_release_id":"3d6952c4-e6ee-4711-a7c7-dded0cdef4eb","latest_package_release_fs_sha":"md5-e2eca081d125c743037cfd068a7f1ea6","latest_pcb_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3d6952c4-e6ee-4711-a7c7-dded0cdef4eb\u0026file_path=dist%2Fpreview%2Fpcb.svg","latest_sch_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3d6952c4-e6ee-4711-a7c7-dded0cdef4eb\u0026file_path=dist%2Fpreview%2Fschematic.svg","latest_cad_preview_image_url":"https://api.tscircuit.com/package_files/view?package_release_id=3d6952c4-e6ee-4711-a7c7-dded0cdef4eb\u0026file_path=dist%2Fpreview%2F3d.png","latest_version":"0.8.0","license":"unset","owner_org_id":"73c53bc8-79f1-48be-83e3-30e34f471a77","org_owner_tscircuit_handle":"tscircuit","owner_github_username":"tscircuit","github_repo_full_name":"tscircuit/standard-jst-programmer","is_source_from_github":false,"description":"26 × 42 mm USB-C RP2040 programmer with JST and TC2030 IDC SWD, NRST, selectable sensed 5 V / 3.3 V power, RGB status, and importable JST SH/Tag-Connect targets. Top-side assembly.","name":"tscircuit/standard-jst-programmer","unscoped_name":"standard-jst-programmer","star_count":0,"created_at":"2026-09-18T20:07:41.694Z","updated_at":"2026-09-30T21:54:42.582Z","ai_description":"A compact USB‑C RP2040 programmer board with QSPI flash, JST/Tag‑Connect SWD and UART interfaces, selectable 5 V/3.3 V target power with INA219 current sensing, NRST control, and RGB status indication.","ai_usage_instructions":null,"is_private":false,"is_unlisted":false,"is_public":true,"public_dist_enabled":false,"has_public_dist":true,"starred_at":null,"default_view":"3d","website":null,"github_installation_id":"9ab576d9-9831-42b4-98c6-1d64c1e90890","allow_pr_previews":false,"related_type":"random","thumbnail_url":"https://api.tscircuit.com/package_files/view?package_release_id=3d6952c4-e6ee-4711-a7c7-dded0cdef4eb\u0026file_path=dist%2Fpreview%2F3d.png"}]; window.SSR_PACKAGE_ROUTE = {"author":"muse","packageName":"esp32-eink-display","packageNameWithScope":"muse/esp32-eink-display","version":null,"isLegacyRoute":false,"kind":"file","filePath":"dist/standalone.min.js"};